aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--.travis.yml23
-rw-r--r--README.md8
-rw-r--r--build/build.xml40
-rwxr-xr-xbuild/build_announcement.php40
-rw-r--r--build/code_sniffer/phpbb/Sniffs/Commenting/FileCommentSniff.php210
-rw-r--r--build/code_sniffer/phpbb/Tests/Commenting/FileCommentUnitTest.inc19
-rw-r--r--build/code_sniffer/phpbb/Tests/Commenting/FileCommentUnitTest.php51
-rw-r--r--build/code_sniffer/phpbb/build.xml23
-rw-r--r--build/code_sniffer/phpbb/phpbbCodingStandard.php43
-rw-r--r--build/code_sniffer/ruleset-minimum.xml15
-rw-r--r--build/code_sniffer/ruleset-php-legacy.xml47
-rw-r--r--build/code_sniffer/ruleset-php-strict.xml51
-rwxr-xr-xbuild/package.php64
-rw-r--r--phpBB/.htaccess24
-rw-r--r--phpBB/adm/images/alert_close.pngbin0 -> 2097 bytes
-rw-r--r--phpBB/adm/images/corners_left.gifbin796 -> 0 bytes
-rw-r--r--phpBB/adm/images/corners_left2.gifbin55 -> 0 bytes
-rw-r--r--phpBB/adm/images/corners_right.gifbin175 -> 0 bytes
-rw-r--r--phpBB/adm/images/corners_right2.gifbin56 -> 0 bytes
-rw-r--r--phpBB/adm/images/loading.gifbin0 -> 1320 bytes
-rw-r--r--phpBB/adm/images/no_avatar.gifbin474 -> 930 bytes
-rw-r--r--phpBB/adm/images/toggle.gifbin788 -> 0 bytes
-rw-r--r--phpBB/adm/index.php563
-rw-r--r--phpBB/adm/style/acp_attachments.html133
-rw-r--r--phpBB/adm/style/acp_avatar_options_gravatar.html11
-rw-r--r--phpBB/adm/style/acp_avatar_options_local.html21
-rw-r--r--phpBB/adm/style/acp_avatar_options_remote.html11
-rw-r--r--phpBB/adm/style/acp_avatar_options_upload.html11
-rw-r--r--phpBB/adm/style/acp_ban.html22
-rw-r--r--phpBB/adm/style/acp_bbcodes.html14
-rw-r--r--phpBB/adm/style/acp_board.html6
-rw-r--r--phpBB/adm/style/acp_bots.html22
-rw-r--r--phpBB/adm/style/acp_captcha.html20
-rw-r--r--phpBB/adm/style/acp_database.html12
-rw-r--r--phpBB/adm/style/acp_disallow.html6
-rw-r--r--phpBB/adm/style/acp_email.html16
-rw-r--r--phpBB/adm/style/acp_ext_delete_data.html40
-rw-r--r--phpBB/adm/style/acp_ext_details.html97
-rw-r--r--phpBB/adm/style/acp_ext_disable.html34
-rw-r--r--phpBB/adm/style/acp_ext_enable.html40
-rw-r--r--phpBB/adm/style/acp_ext_list.html76
-rw-r--r--phpBB/adm/style/acp_forums.html122
-rw-r--r--phpBB/adm/style/acp_forums_copy_perm.html2
-rw-r--r--phpBB/adm/style/acp_groups.html155
-rw-r--r--phpBB/adm/style/acp_groups_position.html171
-rw-r--r--phpBB/adm/style/acp_icons.html36
-rw-r--r--phpBB/adm/style/acp_inactive.html21
-rw-r--r--phpBB/adm/style/acp_jabber.html20
-rw-r--r--phpBB/adm/style/acp_language.html30
-rw-r--r--phpBB/adm/style/acp_logs.html20
-rw-r--r--phpBB/adm/style/acp_main.html72
-rw-r--r--phpBB/adm/style/acp_modules.html43
-rw-r--r--phpBB/adm/style/acp_permission_roles.html41
-rw-r--r--phpBB/adm/style/acp_permissions.html34
-rw-r--r--phpBB/adm/style/acp_php_info.html4
-rw-r--r--phpBB/adm/style/acp_profile.html75
-rw-r--r--phpBB/adm/style/acp_prune_forums.html24
-rw-r--r--phpBB/adm/style/acp_prune_users.html45
-rw-r--r--phpBB/adm/style/acp_ranks.html18
-rw-r--r--phpBB/adm/style/acp_reasons.html26
-rw-r--r--phpBB/adm/style/acp_search.html42
-rw-r--r--phpBB/adm/style/acp_send_statistics.html4
-rw-r--r--phpBB/adm/style/acp_styles.html607
-rw-r--r--phpBB/adm/style/acp_update.html78
-rw-r--r--phpBB/adm/style/acp_users.html36
-rw-r--r--phpBB/adm/style/acp_users_avatar.html95
-rw-r--r--phpBB/adm/style/acp_users_feedback.html21
-rw-r--r--phpBB/adm/style/acp_users_overview.html52
-rw-r--r--phpBB/adm/style/acp_users_prefs.html67
-rw-r--r--phpBB/adm/style/acp_users_profile.html46
-rw-r--r--phpBB/adm/style/acp_users_signature.html70
-rw-r--r--phpBB/adm/style/acp_users_warnings.html4
-rw-r--r--phpBB/adm/style/acp_words.html8
-rw-r--r--phpBB/adm/style/admin.css1189
-rw-r--r--phpBB/adm/style/admin.js246
-rw-r--r--phpBB/adm/style/ajax.js90
-rw-r--r--phpBB/adm/style/auth_provider_ldap.html32
-rw-r--r--phpBB/adm/style/auth_provider_oauth.html17
-rw-r--r--phpBB/adm/style/avatars.js15
-rw-r--r--phpBB/adm/style/captcha_default_acp_demo.html2
-rw-r--r--phpBB/adm/style/captcha_gd_acp.html18
-rw-r--r--phpBB/adm/style/captcha_qa_acp.html14
-rw-r--r--phpBB/adm/style/captcha_qa_acp_demo.html2
-rw-r--r--phpBB/adm/style/captcha_recaptcha_acp.html6
-rw-r--r--phpBB/adm/style/colour_swatch.html78
-rw-r--r--phpBB/adm/style/confirm_body.html14
-rw-r--r--phpBB/adm/style/confirm_body_prune.html28
-rw-r--r--phpBB/adm/style/custom_profile_fields.html32
-rw-r--r--phpBB/adm/style/editor.js403
-rw-r--r--phpBB/adm/style/install_convert.html8
-rw-r--r--phpBB/adm/style/install_error.html2
-rw-r--r--phpBB/adm/style/install_footer.html17
-rw-r--r--phpBB/adm/style/install_header.html30
-rw-r--r--phpBB/adm/style/install_install.html4
-rw-r--r--phpBB/adm/style/install_main.html2
-rw-r--r--phpBB/adm/style/install_update.html111
-rw-r--r--phpBB/adm/style/install_update_diff.html30
-rw-r--r--phpBB/adm/style/message_body.html2
-rw-r--r--phpBB/adm/style/overall_footer.html34
-rw-r--r--phpBB/adm/style/overall_header.html108
-rw-r--r--phpBB/adm/style/pagination.html12
-rw-r--r--phpBB/adm/style/permission_forum_copy.html6
-rw-r--r--phpBB/adm/style/permission_mask.html10
-rw-r--r--phpBB/adm/style/permission_roles_mask.html8
-rw-r--r--phpBB/adm/style/permission_trace.html4
-rw-r--r--phpBB/adm/style/permissions.js185
-rw-r--r--phpBB/adm/style/profilefields/bool.html7
-rw-r--r--phpBB/adm/style/profilefields/date.html5
-rw-r--r--phpBB/adm/style/profilefields/dropdown.html5
-rw-r--r--phpBB/adm/style/profilefields/int.html3
-rw-r--r--phpBB/adm/style/profilefields/string.html3
-rw-r--r--phpBB/adm/style/profilefields/text.html3
-rw-r--r--phpBB/adm/style/profilefields/url.html3
-rw-r--r--phpBB/adm/style/progress_bar.html2
-rw-r--r--phpBB/adm/style/simple_body.html2
-rw-r--r--phpBB/adm/style/simple_footer.html4
-rw-r--r--phpBB/adm/style/simple_header.html21
-rw-r--r--phpBB/adm/style/timezone.js13
-rw-r--r--phpBB/adm/style/timezone_option.html19
-rw-r--r--phpBB/adm/style/tooltip.js102
-rw-r--r--phpBB/adm/style/viewsource.html21
-rw-r--r--phpBB/adm/swatch.php53
-rw-r--r--phpBB/app.php31
-rw-r--r--phpBB/assets/javascript/core.js1085
-rw-r--r--phpBB/assets/javascript/editor.js (renamed from phpBB/styles/subsilver2/template/editor.js)322
-rw-r--r--phpBB/assets/javascript/jquery.js2
-rw-r--r--phpBB/assets/javascript/plupload.js685
-rw-r--r--phpBB/assets/plupload/img/done.gifbin0 -> 1024 bytes
-rw-r--r--phpBB/assets/plupload/img/error.gifbin0 -> 994 bytes
-rw-r--r--phpBB/assets/plupload/img/throbber.gifbin0 -> 1922 bytes
-rw-r--r--phpBB/assets/plupload/plupload.full.min.js28
-rwxr-xr-xphpBB/bin/phpbbcli.php36
-rw-r--r--phpBB/common.php114
-rw-r--r--phpBB/composer.json15
-rw-r--r--phpBB/composer.lock910
-rw-r--r--phpBB/config/.htaccess4
-rw-r--r--phpBB/config/auth_providers.yml83
-rw-r--r--phpBB/config/avatars.yml59
-rw-r--r--phpBB/config/console.yml70
-rw-r--r--phpBB/config/cron_tasks.yml111
-rw-r--r--phpBB/config/feed.yml106
-rw-r--r--phpBB/config/migrator.yml53
-rw-r--r--phpBB/config/mimetype_guessers.yml43
-rw-r--r--phpBB/config/notifications.yml368
-rw-r--r--phpBB/config/passwords.yml62
-rw-r--r--phpBB/config/profilefields.yml91
-rw-r--r--phpBB/config/routing.yml9
-rw-r--r--phpBB/config/services.yml334
-rw-r--r--phpBB/config/tables.yml20
-rw-r--r--phpBB/cron.php230
-rw-r--r--phpBB/develop/add_permissions.php2
-rw-r--r--phpBB/develop/adjust_avatars.php2
-rw-r--r--phpBB/develop/adjust_bbcodes.php2
-rw-r--r--phpBB/develop/adjust_magic_urls.php2
-rw-r--r--phpBB/develop/adjust_sizes.php2
-rw-r--r--phpBB/develop/adjust_smilies.php2
-rw-r--r--phpBB/develop/adjust_uids.php1
-rw-r--r--phpBB/develop/adjust_usernames.php2
-rw-r--r--phpBB/develop/benchmark.php24
-rw-r--r--phpBB/develop/blank.gif (renamed from phpBB/language/en/mods/index.htm)0
-rw-r--r--phpBB/develop/blank.jpg (renamed from phpBB/styles/prosilver/imageset/en/index.htm)0
-rw-r--r--phpBB/develop/calc_email_hash.php2
-rw-r--r--phpBB/develop/change_smiley_ref.php2
-rw-r--r--phpBB/develop/create_schema_files.php1923
-rw-r--r--phpBB/develop/create_search_index.php1
-rw-r--r--phpBB/develop/create_variable_overview.php8
-rw-r--r--phpBB/develop/export_events_for_wiki.php332
-rw-r--r--phpBB/develop/fill.php8
-rw-r--r--phpBB/develop/generate_utf_casefold.php2
-rw-r--r--phpBB/develop/generate_utf_confusables.php2
-rw-r--r--phpBB/develop/generate_utf_tables.php2
-rw-r--r--phpBB/develop/imageset_to_css.php374
-rw-r--r--phpBB/develop/lang_duplicates.php6
-rw-r--r--phpBB/develop/merge_attachment_tables.php2
-rw-r--r--phpBB/develop/merge_post_tables.php6
-rw-r--r--phpBB/develop/migration_tips.php42
-rw-r--r--phpBB/develop/mysql_upgrader.php1227
-rw-r--r--phpBB/develop/namespacify.php189
-rw-r--r--phpBB/develop/nuke-db.php2
-rw-r--r--phpBB/develop/regex.php2
-rwxr-xr-xphpBB/develop/remove-php-end-tags.py65
-rw-r--r--phpBB/develop/rename_interfaces.php51
-rw-r--r--phpBB/develop/repair_bots.php4
-rw-r--r--phpBB/develop/search_fill.php6
-rw-r--r--phpBB/develop/unicode_testing.php2
-rw-r--r--phpBB/develop/update_email_hash.php1
-rw-r--r--phpBB/develop/utf_normalizer_test.php2
-rw-r--r--phpBB/docs/AUTHORS6
-rw-r--r--phpBB/docs/CHANGELOG.html1077
-rw-r--r--phpBB/docs/FAQ.html19
-rw-r--r--phpBB/docs/INSTALL.html45
-rw-r--r--phpBB/docs/README.html50
-rw-r--r--phpBB/docs/auth_api.html15
-rw-r--r--phpBB/docs/coding-guidelines.html310
-rw-r--r--phpBB/docs/events.md655
-rw-r--r--phpBB/docs/hook_system.html22
-rw-r--r--phpBB/docs/lighttpd.sample.conf10
-rw-r--r--phpBB/docs/nginx.sample.conf8
-rw-r--r--phpBB/docs/sphinx.sample.conf100
-rw-r--r--phpBB/download/file.php738
-rw-r--r--phpBB/faq.php7
-rw-r--r--phpBB/feed.php1335
-rw-r--r--phpBB/includes/acp/acp_attachments.php324
-rw-r--r--phpBB/includes/acp/acp_ban.php9
-rw-r--r--phpBB/includes/acp/acp_bbcodes.php138
-rw-r--r--phpBB/includes/acp/acp_board.php386
-rw-r--r--phpBB/includes/acp/acp_bots.php15
-rw-r--r--phpBB/includes/acp/acp_captcha.php22
-rw-r--r--phpBB/includes/acp/acp_database.php91
-rw-r--r--phpBB/includes/acp/acp_disallow.php5
-rw-r--r--phpBB/includes/acp/acp_email.php5
-rw-r--r--phpBB/includes/acp/acp_extensions.php355
-rw-r--r--phpBB/includes/acp/acp_forums.php215
-rw-r--r--phpBB/includes/acp/acp_groups.php415
-rw-r--r--phpBB/includes/acp/acp_icons.php65
-rw-r--r--phpBB/includes/acp/acp_inactive.php30
-rw-r--r--phpBB/includes/acp/acp_jabber.php5
-rw-r--r--phpBB/includes/acp/acp_language.php147
-rw-r--r--phpBB/includes/acp/acp_logs.php19
-rw-r--r--phpBB/includes/acp/acp_main.php90
-rw-r--r--phpBB/includes/acp/acp_modules.php152
-rw-r--r--phpBB/includes/acp/acp_permission_roles.php96
-rw-r--r--phpBB/includes/acp/acp_permissions.php68
-rw-r--r--phpBB/includes/acp/acp_php_info.php5
-rw-r--r--phpBB/includes/acp/acp_profile.php651
-rw-r--r--phpBB/includes/acp/acp_prune.php212
-rw-r--r--phpBB/includes/acp/acp_ranks.php31
-rw-r--r--phpBB/includes/acp/acp_reasons.php38
-rw-r--r--phpBB/includes/acp/acp_search.php71
-rw-r--r--phpBB/includes/acp/acp_send_statistics.php11
-rw-r--r--phpBB/includes/acp/acp_styles.php4370
-rw-r--r--phpBB/includes/acp/acp_update.php65
-rw-r--r--phpBB/includes/acp/acp_users.php347
-rw-r--r--phpBB/includes/acp/acp_words.php5
-rw-r--r--phpBB/includes/acp/auth.php56
-rw-r--r--phpBB/includes/acp/info/acp_attachments.php8
-rw-r--r--phpBB/includes/acp/info/acp_ban.php5
-rw-r--r--phpBB/includes/acp/info/acp_bbcodes.php5
-rw-r--r--phpBB/includes/acp/info/acp_board.php5
-rw-r--r--phpBB/includes/acp/info/acp_bots.php6
-rw-r--r--phpBB/includes/acp/info/acp_captcha.php5
-rw-r--r--phpBB/includes/acp/info/acp_database.php5
-rw-r--r--phpBB/includes/acp/info/acp_disallow.php6
-rw-r--r--phpBB/includes/acp/info/acp_email.php6
-rw-r--r--phpBB/includes/acp/info/acp_extensions.php34
-rw-r--r--phpBB/includes/acp/info/acp_forums.php5
-rw-r--r--phpBB/includes/acp/info/acp_groups.php6
-rw-r--r--phpBB/includes/acp/info/acp_icons.php5
-rw-r--r--phpBB/includes/acp/info/acp_inactive.php5
-rw-r--r--phpBB/includes/acp/info/acp_jabber.php4
-rw-r--r--phpBB/includes/acp/info/acp_language.php7
-rw-r--r--phpBB/includes/acp/info/acp_logs.php5
-rw-r--r--phpBB/includes/acp/info/acp_main.php5
-rw-r--r--phpBB/includes/acp/info/acp_modules.php5
-rw-r--r--phpBB/includes/acp/info/acp_permission_roles.php5
-rw-r--r--phpBB/includes/acp/info/acp_permissions.php5
-rw-r--r--phpBB/includes/acp/info/acp_php_info.php5
-rw-r--r--phpBB/includes/acp/info/acp_profile.php5
-rw-r--r--phpBB/includes/acp/info/acp_prune.php7
-rw-r--r--phpBB/includes/acp/info/acp_ranks.php5
-rw-r--r--phpBB/includes/acp/info/acp_reasons.php5
-rw-r--r--phpBB/includes/acp/info/acp_search.php5
-rw-r--r--phpBB/includes/acp/info/acp_send_statistics.php5
-rw-r--r--phpBB/includes/acp/info/acp_styles.php12
-rw-r--r--phpBB/includes/acp/info/acp_update.php5
-rw-r--r--phpBB/includes/acp/info/acp_users.php5
-rw-r--r--phpBB/includes/acp/info/acp_words.php5
-rw-r--r--phpBB/includes/auth/auth_apache.php249
-rw-r--r--phpBB/includes/auth/auth_db.php276
-rw-r--r--phpBB/includes/auth/auth_ldap.php353
-rw-r--r--phpBB/includes/bbcode.php30
-rw-r--r--phpBB/includes/captcha/captcha_factory.php52
-rw-r--r--phpBB/includes/captcha/captcha_gd.php52
-rw-r--r--phpBB/includes/captcha/captcha_gd_wave.php11
-rw-r--r--phpBB/includes/captcha/captcha_non_gd.php5
-rw-r--r--phpBB/includes/captcha/plugins/captcha_abstract.php24
-rw-r--r--phpBB/includes/captcha/plugins/phpbb_captcha_gd_plugin.php38
-rw-r--r--phpBB/includes/captcha/plugins/phpbb_captcha_gd_wave_plugin.php27
-rw-r--r--phpBB/includes/captcha/plugins/phpbb_captcha_nogd_plugin.php15
-rw-r--r--phpBB/includes/captcha/plugins/phpbb_captcha_qa_plugin.php70
-rw-r--r--phpBB/includes/captcha/plugins/phpbb_recaptcha_plugin.php22
-rw-r--r--phpBB/includes/constants.php20
-rw-r--r--phpBB/includes/diff/diff.php5
-rw-r--r--phpBB/includes/diff/engine.php5
-rw-r--r--phpBB/includes/diff/renderer.php5
-rw-r--r--phpBB/includes/functions.php2351
-rw-r--r--phpBB/includes/functions_acp.php680
-rw-r--r--phpBB/includes/functions_admin.php747
-rw-r--r--phpBB/includes/functions_compatibility.php125
-rw-r--r--phpBB/includes/functions_compress.php58
-rw-r--r--phpBB/includes/functions_container.php287
-rw-r--r--phpBB/includes/functions_content.php261
-rw-r--r--phpBB/includes/functions_convert.php58
-rw-r--r--phpBB/includes/functions_database_helper.php8
-rw-r--r--phpBB/includes/functions_display.php542
-rw-r--r--phpBB/includes/functions_download.php756
-rw-r--r--phpBB/includes/functions_install.php228
-rw-r--r--phpBB/includes/functions_jabber.php13
-rw-r--r--phpBB/includes/functions_messenger.php360
-rw-r--r--phpBB/includes/functions_module.php357
-rw-r--r--phpBB/includes/functions_posting.php1223
-rw-r--r--phpBB/includes/functions_privmsgs.php286
-rw-r--r--phpBB/includes/functions_profile_fields.php1185
-rw-r--r--phpBB/includes/functions_template.php814
-rw-r--r--phpBB/includes/functions_transfer.php15
-rw-r--r--phpBB/includes/functions_upload.php138
-rw-r--r--phpBB/includes/functions_url_matcher.php106
-rw-r--r--phpBB/includes/functions_user.php1097
-rw-r--r--phpBB/includes/hooks/index.php5
-rw-r--r--phpBB/includes/mcp/info/mcp_ban.php5
-rw-r--r--phpBB/includes/mcp/info/mcp_logs.php5
-rw-r--r--phpBB/includes/mcp/info/mcp_main.php5
-rw-r--r--phpBB/includes/mcp/info/mcp_notes.php5
-rw-r--r--phpBB/includes/mcp/info/mcp_pm_reports.php5
-rw-r--r--phpBB/includes/mcp/info/mcp_queue.php7
-rw-r--r--phpBB/includes/mcp/info/mcp_reports.php5
-rw-r--r--phpBB/includes/mcp/info/mcp_warn.php5
-rw-r--r--phpBB/includes/mcp/mcp_ban.php5
-rw-r--r--phpBB/includes/mcp/mcp_forum.php80
-rw-r--r--phpBB/includes/mcp/mcp_front.php136
-rw-r--r--phpBB/includes/mcp/mcp_logs.php16
-rw-r--r--phpBB/includes/mcp/mcp_main.php750
-rw-r--r--phpBB/includes/mcp/mcp_notes.php19
-rw-r--r--phpBB/includes/mcp/mcp_pm_reports.php34
-rw-r--r--phpBB/includes/mcp/mcp_post.php63
-rw-r--r--phpBB/includes/mcp/mcp_queue.php1158
-rw-r--r--phpBB/includes/mcp/mcp_reports.php108
-rw-r--r--phpBB/includes/mcp/mcp_topic.php118
-rw-r--r--phpBB/includes/mcp/mcp_warn.php42
-rw-r--r--phpBB/includes/message_parser.php146
-rw-r--r--phpBB/includes/questionnaire/questionnaire.php31
-rw-r--r--phpBB/includes/sphinxapi.php1712
-rw-r--r--phpBB/includes/startup.php48
-rw-r--r--phpBB/includes/template.php692
-rw-r--r--phpBB/includes/ucp/info/ucp_attachments.php5
-rw-r--r--phpBB/includes/ucp/info/ucp_auth_link.php34
-rw-r--r--phpBB/includes/ucp/info/ucp_groups.php5
-rw-r--r--phpBB/includes/ucp/info/ucp_main.php5
-rw-r--r--phpBB/includes/ucp/info/ucp_notifications.php35
-rw-r--r--phpBB/includes/ucp/info/ucp_pm.php6
-rw-r--r--phpBB/includes/ucp/info/ucp_prefs.php5
-rw-r--r--phpBB/includes/ucp/info/ucp_profile.php10
-rw-r--r--phpBB/includes/ucp/info/ucp_zebra.php5
-rw-r--r--phpBB/includes/ucp/ucp_activate.php12
-rw-r--r--phpBB/includes/ucp/ucp_attachments.php16
-rw-r--r--phpBB/includes/ucp/ucp_auth_link.php142
-rw-r--r--phpBB/includes/ucp/ucp_confirm.php5
-rw-r--r--phpBB/includes/ucp/ucp_groups.php235
-rw-r--r--phpBB/includes/ucp/ucp_login_link.php243
-rw-r--r--phpBB/includes/ucp/ucp_main.php118
-rw-r--r--phpBB/includes/ucp/ucp_notifications.php245
-rw-r--r--phpBB/includes/ucp/ucp_pm.php43
-rw-r--r--phpBB/includes/ucp/ucp_pm_compose.php45
-rw-r--r--phpBB/includes/ucp/ucp_pm_options.php11
-rw-r--r--phpBB/includes/ucp/ucp_pm_viewfolder.php39
-rw-r--r--phpBB/includes/ucp/ucp_pm_viewmessage.php123
-rw-r--r--phpBB/includes/ucp/ucp_prefs.php107
-rw-r--r--phpBB/includes/ucp/ucp_profile.php294
-rw-r--r--phpBB/includes/ucp/ucp_register.php195
-rw-r--r--phpBB/includes/ucp/ucp_remind.php22
-rw-r--r--phpBB/includes/ucp/ucp_resend.php10
-rw-r--r--phpBB/includes/ucp/ucp_zebra.php55
-rw-r--r--phpBB/includes/utf/data/case_fold_c.php2
-rw-r--r--phpBB/includes/utf/data/case_fold_f.php2
-rw-r--r--phpBB/includes/utf/data/case_fold_s.php2
-rw-r--r--phpBB/includes/utf/data/confusables.php2
-rw-r--r--phpBB/includes/utf/data/recode_basic.php2
-rw-r--r--phpBB/includes/utf/data/recode_cjk.php2
-rw-r--r--phpBB/includes/utf/data/search_indexer_0.php2
-rw-r--r--phpBB/includes/utf/data/search_indexer_1.php2
-rw-r--r--phpBB/includes/utf/data/search_indexer_19.php2
-rw-r--r--phpBB/includes/utf/data/search_indexer_2.php2
-rw-r--r--phpBB/includes/utf/data/search_indexer_20.php2
-rw-r--r--phpBB/includes/utf/data/search_indexer_21.php2
-rw-r--r--phpBB/includes/utf/data/search_indexer_26.php2
-rw-r--r--phpBB/includes/utf/data/search_indexer_3.php2
-rw-r--r--phpBB/includes/utf/data/search_indexer_31.php2
-rw-r--r--phpBB/includes/utf/data/search_indexer_32.php2
-rw-r--r--phpBB/includes/utf/data/search_indexer_33.php2
-rw-r--r--phpBB/includes/utf/data/search_indexer_36.php2
-rw-r--r--phpBB/includes/utf/data/search_indexer_4.php2
-rw-r--r--phpBB/includes/utf/data/search_indexer_448.php2
-rw-r--r--phpBB/includes/utf/data/search_indexer_5.php2
-rw-r--r--phpBB/includes/utf/data/search_indexer_58.php2
-rw-r--r--phpBB/includes/utf/data/search_indexer_6.php2
-rw-r--r--phpBB/includes/utf/data/search_indexer_64.php2
-rw-r--r--phpBB/includes/utf/data/search_indexer_84.php2
-rw-r--r--phpBB/includes/utf/data/search_indexer_9.php2
-rw-r--r--phpBB/includes/utf/data/search_indexer_95.php2
-rw-r--r--phpBB/includes/utf/data/utf_canonical_comp.php2
-rw-r--r--phpBB/includes/utf/data/utf_canonical_decomp.php2
-rw-r--r--phpBB/includes/utf/data/utf_compatibility_decomp.php2
-rw-r--r--phpBB/includes/utf/data/utf_nfc_qc.php2
-rw-r--r--phpBB/includes/utf/data/utf_nfkc_qc.php2
-rw-r--r--phpBB/includes/utf/data/utf_normalizer_common.php2
-rw-r--r--phpBB/includes/utf/utf_normalizer.php19
-rw-r--r--phpBB/includes/utf/utf_tools.php196
-rw-r--r--phpBB/index.php117
-rw-r--r--phpBB/install/convertors/convert_phpbb20.php71
-rw-r--r--phpBB/install/convertors/functions_phpbb20.php121
-rw-r--r--phpBB/install/data/confusables.php5
-rw-r--r--phpBB/install/data/new_normalizer.php5
-rw-r--r--phpBB/install/database_update.php2322
-rw-r--r--phpBB/install/index.php179
-rw-r--r--phpBB/install/install_convert.php189
-rw-r--r--phpBB/install/install_install.php389
-rw-r--r--phpBB/install/install_main.php5
-rw-r--r--phpBB/install/install_update.php275
-rw-r--r--phpBB/install/phpinfo.php2
-rw-r--r--phpBB/install/schemas/firebird_schema.sql1466
-rw-r--r--phpBB/install/schemas/mssql_schema.sql1788
-rw-r--r--phpBB/install/schemas/mysql_40_schema.sql1029
-rw-r--r--phpBB/install/schemas/mysql_41_schema.sql1029
-rw-r--r--phpBB/install/schemas/oracle_schema.sql1879
-rw-r--r--phpBB/install/schemas/postgres_schema.sql1227
-rw-r--r--phpBB/install/schemas/schema.json3324
-rw-r--r--phpBB/install/schemas/schema_data.sql160
-rw-r--r--phpBB/install/schemas/sqlite_schema.sql998
-rw-r--r--phpBB/language/en/acp/attachments.php6
-rw-r--r--phpBB/language/en/acp/ban.php19
-rw-r--r--phpBB/language/en/acp/board.php104
-rw-r--r--phpBB/language/en/acp/bots.php5
-rw-r--r--phpBB/language/en/acp/common.php104
-rw-r--r--phpBB/language/en/acp/database.php5
-rw-r--r--phpBB/language/en/acp/email.php11
-rw-r--r--phpBB/language/en/acp/extensions.php109
-rw-r--r--phpBB/language/en/acp/forums.php5
-rw-r--r--phpBB/language/en/acp/groups.php33
-rw-r--r--phpBB/language/en/acp/language.php7
-rw-r--r--phpBB/language/en/acp/modules.php5
-rw-r--r--phpBB/language/en/acp/permissions.php93
-rw-r--r--phpBB/language/en/acp/permissions_phpbb.php338
-rw-r--r--phpBB/language/en/acp/posting.php45
-rw-r--r--phpBB/language/en/acp/profile.php15
-rw-r--r--phpBB/language/en/acp/prune.php20
-rw-r--r--phpBB/language/en/acp/search.php50
-rw-r--r--phpBB/language/en/acp/styles.php158
-rw-r--r--phpBB/language/en/acp/users.php11
-rw-r--r--phpBB/language/en/app.php49
-rw-r--r--phpBB/language/en/captcha_qa.php5
-rw-r--r--phpBB/language/en/captcha_recaptcha.php6
-rw-r--r--phpBB/language/en/common.php866
-rw-r--r--phpBB/language/en/email/admin_send_email.txt4
-rw-r--r--phpBB/language/en/email/admin_welcome_inactive.txt2
-rw-r--r--phpBB/language/en/email/bookmark.txt20
-rw-r--r--phpBB/language/en/email/coppa_resend_inactive.txt2
-rw-r--r--phpBB/language/en/email/coppa_welcome_inactive.txt2
-rw-r--r--phpBB/language/en/email/email_notify.txt6
-rw-r--r--phpBB/language/en/email/group_approved.txt10
-rw-r--r--phpBB/language/en/email/installed.txt2
-rw-r--r--phpBB/language/en/email/newtopic_notify.txt2
-rw-r--r--phpBB/language/en/email/post_approved.txt1
-rw-r--r--phpBB/language/en/email/post_disapproved.txt3
-rw-r--r--phpBB/language/en/email/post_in_queue.txt13
-rw-r--r--phpBB/language/en/email/privmsg_notify.txt2
-rw-r--r--phpBB/language/en/email/profile_send_email.txt4
-rw-r--r--phpBB/language/en/email/quote.txt20
-rw-r--r--phpBB/language/en/email/report_closed.txt3
-rw-r--r--phpBB/language/en/email/report_deleted.txt3
-rw-r--r--phpBB/language/en/email/report_pm.txt10
-rw-r--r--phpBB/language/en/email/report_post.txt13
-rw-r--r--phpBB/language/en/email/short/bookmark.txt20
-rw-r--r--phpBB/language/en/email/short/newtopic_notify.txt13
-rw-r--r--phpBB/language/en/email/short/post_approved.txt13
-rw-r--r--phpBB/language/en/email/short/post_disapproved.txt11
-rw-r--r--phpBB/language/en/email/short/post_in_queue.txt13
-rw-r--r--phpBB/language/en/email/short/privmsg_notify.txt15
-rw-r--r--phpBB/language/en/email/short/quote.txt20
-rw-r--r--phpBB/language/en/email/short/report_pm.txt10
-rw-r--r--phpBB/language/en/email/short/report_post.txt13
-rw-r--r--phpBB/language/en/email/short/topic_approved.txt10
-rw-r--r--phpBB/language/en/email/short/topic_disapproved.txt11
-rw-r--r--phpBB/language/en/email/short/topic_in_queue.txt13
-rw-r--r--phpBB/language/en/email/short/topic_notify.txt20
-rw-r--r--phpBB/language/en/email/topic_approved.txt3
-rw-r--r--phpBB/language/en/email/topic_disapproved.txt3
-rw-r--r--phpBB/language/en/email/topic_in_queue.txt13
-rw-r--r--phpBB/language/en/email/topic_notify.txt2
-rw-r--r--phpBB/language/en/email/user_reactivate_account.txt3
-rw-r--r--phpBB/language/en/email/user_resend_inactive.txt3
-rw-r--r--phpBB/language/en/email/user_welcome.txt2
-rw-r--r--phpBB/language/en/email/user_welcome_inactive.txt2
-rw-r--r--phpBB/language/en/groups.php5
-rw-r--r--phpBB/language/en/help_bbcode.php7
-rw-r--r--phpBB/language/en/help_faq.php21
-rw-r--r--phpBB/language/en/install.php48
-rw-r--r--phpBB/language/en/mcp.php71
-rw-r--r--phpBB/language/en/memberlist.php45
-rw-r--r--phpBB/language/en/migrator.php56
-rw-r--r--phpBB/language/en/plupload.php77
-rw-r--r--phpBB/language/en/posting.php87
-rw-r--r--phpBB/language/en/search.php31
-rw-r--r--phpBB/language/en/search_ignore_words.php5
-rw-r--r--phpBB/language/en/search_synonyms.php4
-rw-r--r--phpBB/language/en/ucp.php208
-rw-r--r--phpBB/language/en/viewforum.php11
-rw-r--r--phpBB/language/en/viewtopic.php39
-rw-r--r--phpBB/mcp.php106
-rw-r--r--phpBB/memberlist.php532
-rw-r--r--phpBB/phpbb/auth/auth.php (renamed from phpBB/includes/auth.php)56
-rw-r--r--phpBB/phpbb/auth/index.htm (renamed from phpBB/includes/auth/index.htm)0
-rw-r--r--phpBB/phpbb/auth/provider/apache.php262
-rw-r--r--phpBB/phpbb/auth/provider/base.php106
-rw-r--r--phpBB/phpbb/auth/provider/db.php299
-rw-r--r--phpBB/phpbb/auth/provider/index.htm (renamed from phpBB/includes/db/index.htm)0
-rw-r--r--phpBB/phpbb/auth/provider/ldap.php348
-rw-r--r--phpBB/phpbb/auth/provider/oauth/oauth.php621
-rw-r--r--phpBB/phpbb/auth/provider/oauth/service/base.php49
-rw-r--r--phpBB/phpbb/auth/provider/oauth/service/bitly.php92
-rw-r--r--phpBB/phpbb/auth/provider/oauth/service/exception.php19
-rw-r--r--phpBB/phpbb/auth/provider/oauth/service/facebook.php92
-rw-r--r--phpBB/phpbb/auth/provider/oauth/service/google.php103
-rw-r--r--phpBB/phpbb/auth/provider/oauth/service/service_interface.php71
-rw-r--r--phpBB/phpbb/auth/provider/oauth/token_storage.php360
-rw-r--r--phpBB/phpbb/auth/provider/provider_interface.php191
-rw-r--r--phpBB/phpbb/avatar/driver/driver.php129
-rw-r--r--phpBB/phpbb/avatar/driver/driver_interface.php110
-rw-r--r--phpBB/phpbb/avatar/driver/gravatar.php174
-rw-r--r--phpBB/phpbb/avatar/driver/local.php199
-rw-r--r--phpBB/phpbb/avatar/driver/remote.php197
-rw-r--r--phpBB/phpbb/avatar/driver/upload.php187
-rw-r--r--phpBB/phpbb/avatar/manager.php309
-rw-r--r--phpBB/phpbb/cache/driver/apc.php (renamed from phpBB/includes/acm/acm_apc.php)25
-rw-r--r--phpBB/phpbb/cache/driver/base.php17
-rw-r--r--phpBB/phpbb/cache/driver/driver_interface.php165
-rw-r--r--phpBB/phpbb/cache/driver/eaccelerator.php (renamed from phpBB/includes/acm/acm_eaccelerator.php)31
-rw-r--r--phpBB/phpbb/cache/driver/file.php (renamed from phpBB/includes/acm/acm_file.php)144
-rw-r--r--phpBB/phpbb/cache/driver/memcache.php (renamed from phpBB/includes/acm/acm_memcache.php)35
-rw-r--r--phpBB/phpbb/cache/driver/memory.php (renamed from phpBB/includes/acm/acm_memory.php)68
-rw-r--r--phpBB/phpbb/cache/driver/null.php (renamed from phpBB/includes/acm/acm_null.php)52
-rw-r--r--phpBB/phpbb/cache/driver/redis.php (renamed from phpBB/includes/acm/acm_redis.php)64
-rw-r--r--phpBB/phpbb/cache/driver/wincache.php (renamed from phpBB/includes/acm/acm_wincache.php)22
-rw-r--r--phpBB/phpbb/cache/driver/xcache.php (renamed from phpBB/includes/acm/acm_xcache.php)31
-rw-r--r--phpBB/phpbb/cache/service.php (renamed from phpBB/includes/cache.php)275
-rw-r--r--phpBB/phpbb/class_loader.php162
-rw-r--r--phpBB/phpbb/config/config.php164
-rw-r--r--phpBB/phpbb/config/db.php201
-rw-r--r--phpBB/phpbb/config/db_text.php157
-rw-r--r--phpBB/phpbb/console/application.php23
-rw-r--r--phpBB/phpbb/console/command/command.php14
-rw-r--r--phpBB/phpbb/console/command/config/command.php22
-rw-r--r--phpBB/phpbb/console/command/config/delete.php46
-rw-r--r--phpBB/phpbb/console/command/config/get.php54
-rw-r--r--phpBB/phpbb/console/command/config/increment.php52
-rw-r--r--phpBB/phpbb/console/command/config/set.php52
-rw-r--r--phpBB/phpbb/console/command/config/set_atomic.php65
-rw-r--r--phpBB/phpbb/console/command/extension/command.php22
-rw-r--r--phpBB/phpbb/console/command/extension/disable.php47
-rw-r--r--phpBB/phpbb/console/command/extension/enable.php47
-rw-r--r--phpBB/phpbb/console/command/extension/purge.php47
-rw-r--r--phpBB/phpbb/console/command/extension/show.php58
-rw-r--r--phpBB/phpbb/console/command/fixup/recalculate_email_hash.php71
-rw-r--r--phpBB/phpbb/content_visibility.php650
-rw-r--r--phpBB/phpbb/controller/exception.php18
-rw-r--r--phpBB/phpbb/controller/helper.php149
-rw-r--r--phpBB/phpbb/controller/provider.php83
-rw-r--r--phpBB/phpbb/controller/resolver.php148
-rw-r--r--phpBB/phpbb/cron/manager.php132
-rw-r--r--phpBB/phpbb/cron/task/base.php70
-rw-r--r--phpBB/phpbb/cron/task/core/prune_all_forums.php87
-rw-r--r--phpBB/phpbb/cron/task/core/prune_forum.php157
-rw-r--r--phpBB/phpbb/cron/task/core/prune_notifications.php59
-rw-r--r--phpBB/phpbb/cron/task/core/queue.php76
-rw-r--r--phpBB/phpbb/cron/task/core/tidy_cache.php70
-rw-r--r--phpBB/phpbb/cron/task/core/tidy_database.php64
-rw-r--r--phpBB/phpbb/cron/task/core/tidy_plupload.php116
-rw-r--r--phpBB/phpbb/cron/task/core/tidy_search.php98
-rw-r--r--phpBB/phpbb/cron/task/core/tidy_sessions.php57
-rw-r--r--phpBB/phpbb/cron/task/core/tidy_warnings.php78
-rw-r--r--phpBB/phpbb/cron/task/parametrized.php46
-rw-r--r--phpBB/phpbb/cron/task/task.php49
-rw-r--r--phpBB/phpbb/cron/task/wrapper.php102
-rw-r--r--phpBB/phpbb/datetime.php160
-rw-r--r--phpBB/phpbb/db/driver/driver.php (renamed from phpBB/includes/db/dbal.php)114
-rw-r--r--phpBB/phpbb/db/driver/firebird.php (renamed from phpBB/includes/db/firebird.php)50
-rw-r--r--phpBB/phpbb/db/driver/mssql.php (renamed from phpBB/includes/db/mssql.php)58
-rw-r--r--phpBB/phpbb/db/driver/mssql_base.php59
-rw-r--r--phpBB/phpbb/db/driver/mssql_odbc.php (renamed from phpBB/includes/db/mssql_odbc.php)69
-rw-r--r--phpBB/phpbb/db/driver/mssqlnative.php (renamed from phpBB/includes/db/mssqlnative.php)247
-rw-r--r--phpBB/phpbb/db/driver/mysql.php (renamed from phpBB/includes/db/mysql.php)149
-rw-r--r--phpBB/phpbb/db/driver/mysql_base.php139
-rw-r--r--phpBB/phpbb/db/driver/mysqli.php (renamed from phpBB/includes/db/mysqli.php)158
-rw-r--r--phpBB/phpbb/db/driver/oracle.php (renamed from phpBB/includes/db/oracle.php)35
-rw-r--r--phpBB/phpbb/db/driver/postgres.php (renamed from phpBB/includes/db/postgres.php)66
-rw-r--r--phpBB/phpbb/db/driver/sqlite.php (renamed from phpBB/includes/db/sqlite.php)35
-rw-r--r--phpBB/phpbb/db/migration/data/v30x/local_url_bbcode.php59
-rw-r--r--phpBB/phpbb/db/migration/data/v30x/release_3_0_0.php1177
-rw-r--r--phpBB/phpbb/db/migration/data/v30x/release_3_0_1.php30
-rw-r--r--phpBB/phpbb/db/migration/data/v30x/release_3_0_10.php30
-rw-r--r--phpBB/phpbb/db/migration/data/v30x/release_3_0_10_rc1.php32
-rw-r--r--phpBB/phpbb/db/migration/data/v30x/release_3_0_10_rc2.php30
-rw-r--r--phpBB/phpbb/db/migration/data/v30x/release_3_0_10_rc3.php30
-rw-r--r--phpBB/phpbb/db/migration/data/v30x/release_3_0_11.php30
-rw-r--r--phpBB/phpbb/db/migration/data/v30x/release_3_0_11_rc1.php97
-rw-r--r--phpBB/phpbb/db/migration/data/v30x/release_3_0_11_rc2.php52
-rw-r--r--phpBB/phpbb/db/migration/data/v30x/release_3_0_12.php33
-rw-r--r--phpBB/phpbb/db/migration/data/v30x/release_3_0_12_rc1.php125
-rw-r--r--phpBB/phpbb/db/migration/data/v30x/release_3_0_12_rc2.php33
-rw-r--r--phpBB/phpbb/db/migration/data/v30x/release_3_0_12_rc3.php33
-rw-r--r--phpBB/phpbb/db/migration/data/v30x/release_3_0_1_rc1.php115
-rw-r--r--phpBB/phpbb/db/migration/data/v30x/release_3_0_2.php30
-rw-r--r--phpBB/phpbb/db/migration/data/v30x/release_3_0_2_rc1.php34
-rw-r--r--phpBB/phpbb/db/migration/data/v30x/release_3_0_2_rc2.php82
-rw-r--r--phpBB/phpbb/db/migration/data/v30x/release_3_0_3.php30
-rw-r--r--phpBB/phpbb/db/migration/data/v30x/release_3_0_3_rc1.php85
-rw-r--r--phpBB/phpbb/db/migration/data/v30x/release_3_0_4.php51
-rw-r--r--phpBB/phpbb/db/migration/data/v30x/release_3_0_4_rc1.php125
-rw-r--r--phpBB/phpbb/db/migration/data/v30x/release_3_0_5.php30
-rw-r--r--phpBB/phpbb/db/migration/data/v30x/release_3_0_5_rc1.php126
-rw-r--r--phpBB/phpbb/db/migration/data/v30x/release_3_0_5_rc1part2.php44
-rw-r--r--phpBB/phpbb/db/migration/data/v30x/release_3_0_6.php30
-rw-r--r--phpBB/phpbb/db/migration/data/v30x/release_3_0_6_rc1.php326
-rw-r--r--phpBB/phpbb/db/migration/data/v30x/release_3_0_6_rc2.php30
-rw-r--r--phpBB/phpbb/db/migration/data/v30x/release_3_0_6_rc3.php42
-rw-r--r--phpBB/phpbb/db/migration/data/v30x/release_3_0_6_rc4.php30
-rw-r--r--phpBB/phpbb/db/migration/data/v30x/release_3_0_7.php30
-rw-r--r--phpBB/phpbb/db/migration/data/v30x/release_3_0_7_pl1.php30
-rw-r--r--phpBB/phpbb/db/migration/data/v30x/release_3_0_7_rc1.php78
-rw-r--r--phpBB/phpbb/db/migration/data/v30x/release_3_0_7_rc2.php75
-rw-r--r--phpBB/phpbb/db/migration/data/v30x/release_3_0_8.php30
-rw-r--r--phpBB/phpbb/db/migration/data/v30x/release_3_0_8_rc1.php223
-rw-r--r--phpBB/phpbb/db/migration/data/v30x/release_3_0_9.php30
-rw-r--r--phpBB/phpbb/db/migration/data/v30x/release_3_0_9_rc1.php126
-rw-r--r--phpBB/phpbb/db/migration/data/v30x/release_3_0_9_rc2.php30
-rw-r--r--phpBB/phpbb/db/migration/data/v30x/release_3_0_9_rc3.php30
-rw-r--r--phpBB/phpbb/db/migration/data/v30x/release_3_0_9_rc4.php30
-rw-r--r--phpBB/phpbb/db/migration/data/v310/acp_prune_users_module.php77
-rw-r--r--phpBB/phpbb/db/migration/data/v310/acp_style_components_module.php42
-rw-r--r--phpBB/phpbb/db/migration/data/v310/allow_cdn.php33
-rw-r--r--phpBB/phpbb/db/migration/data/v310/alpha1.php44
-rw-r--r--phpBB/phpbb/db/migration/data/v310/alpha2.php28
-rw-r--r--phpBB/phpbb/db/migration/data/v310/alpha3.php30
-rw-r--r--phpBB/phpbb/db/migration/data/v310/auth_provider_oauth.php73
-rw-r--r--phpBB/phpbb/db/migration/data/v310/avatar_types.php60
-rw-r--r--phpBB/phpbb/db/migration/data/v310/avatars.php69
-rw-r--r--phpBB/phpbb/db/migration/data/v310/beta1.php33
-rw-r--r--phpBB/phpbb/db/migration/data/v310/boardindex.php25
-rw-r--r--phpBB/phpbb/db/migration/data/v310/config_db_text.php47
-rw-r--r--phpBB/phpbb/db/migration/data/v310/dev.php411
-rw-r--r--phpBB/phpbb/db/migration/data/v310/extensions.php71
-rw-r--r--phpBB/phpbb/db/migration/data/v310/forgot_password.php30
-rw-r--r--phpBB/phpbb/db/migration/data/v310/jquery_update.php33
-rw-r--r--phpBB/phpbb/db/migration/data/v310/migrations_table.php47
-rw-r--r--phpBB/phpbb/db/migration/data/v310/mod_rewrite.php27
-rw-r--r--phpBB/phpbb/db/migration/data/v310/mysql_fulltext_drop.php47
-rw-r--r--phpBB/phpbb/db/migration/data/v310/namespaces.php30
-rw-r--r--phpBB/phpbb/db/migration/data/v310/notification_options_reconvert.php137
-rw-r--r--phpBB/phpbb/db/migration/data/v310/notifications.php98
-rw-r--r--phpBB/phpbb/db/migration/data/v310/notifications_cron.php27
-rw-r--r--phpBB/phpbb/db/migration/data/v310/notifications_cron_p2.php27
-rw-r--r--phpBB/phpbb/db/migration/data/v310/notifications_schema_fix.php94
-rw-r--r--phpBB/phpbb/db/migration/data/v310/passwords.php46
-rw-r--r--phpBB/phpbb/db/migration/data/v310/passwords_p2.php40
-rw-r--r--phpBB/phpbb/db/migration/data/v310/plupload.php32
-rw-r--r--phpBB/phpbb/db/migration/data/v310/postgres_fulltext_drop.php47
-rw-r--r--phpBB/phpbb/db/migration/data/v310/profilefield_aol.php51
-rw-r--r--phpBB/phpbb/db/migration/data/v310/profilefield_aol_cleanup.php47
-rw-r--r--phpBB/phpbb/db/migration/data/v310/profilefield_change_load_settings.php30
-rw-r--r--phpBB/phpbb/db/migration/data/v310/profilefield_cleanup.php51
-rw-r--r--phpBB/phpbb/db/migration/data/v310/profilefield_contact_field.php51
-rw-r--r--phpBB/phpbb/db/migration/data/v310/profilefield_icq.php50
-rw-r--r--phpBB/phpbb/db/migration/data/v310/profilefield_icq_cleanup.php47
-rw-r--r--phpBB/phpbb/db/migration/data/v310/profilefield_interests.php48
-rw-r--r--phpBB/phpbb/db/migration/data/v310/profilefield_location.php48
-rw-r--r--phpBB/phpbb/db/migration/data/v310/profilefield_location_cleanup.php47
-rw-r--r--phpBB/phpbb/db/migration/data/v310/profilefield_occupation.php47
-rw-r--r--phpBB/phpbb/db/migration/data/v310/profilefield_on_memberlist.php47
-rw-r--r--phpBB/phpbb/db/migration/data/v310/profilefield_show_novalue.php45
-rw-r--r--phpBB/phpbb/db/migration/data/v310/profilefield_types.php106
-rw-r--r--phpBB/phpbb/db/migration/data/v310/profilefield_website.php52
-rw-r--r--phpBB/phpbb/db/migration/data/v310/profilefield_website_cleanup.php47
-rw-r--r--phpBB/phpbb/db/migration/data/v310/profilefield_wlm.php51
-rw-r--r--phpBB/phpbb/db/migration/data/v310/profilefield_wlm_cleanup.php47
-rw-r--r--phpBB/phpbb/db/migration/data/v310/profilefield_yahoo.php51
-rw-r--r--phpBB/phpbb/db/migration/data/v310/profilefield_yahoo_cleanup.php47
-rw-r--r--phpBB/phpbb/db/migration/data/v310/reported_posts_display.php49
-rw-r--r--phpBB/phpbb/db/migration/data/v310/signature_module_auth.php53
-rw-r--r--phpBB/phpbb/db/migration/data/v310/soft_delete_mod_convert.php128
-rw-r--r--phpBB/phpbb/db/migration/data/v310/soft_delete_mod_convert2.php62
-rw-r--r--phpBB/phpbb/db/migration/data/v310/softdelete_mcp_modules.php57
-rw-r--r--phpBB/phpbb/db/migration/data/v310/softdelete_p1.php198
-rw-r--r--phpBB/phpbb/db/migration/data/v310/softdelete_p2.php74
-rw-r--r--phpBB/phpbb/db/migration/data/v310/style_update_p1.php187
-rw-r--r--phpBB/phpbb/db/migration/data/v310/style_update_p2.php147
-rw-r--r--phpBB/phpbb/db/migration/data/v310/teampage.php106
-rw-r--r--phpBB/phpbb/db/migration/data/v310/timezone.php165
-rw-r--r--phpBB/phpbb/db/migration/data/v310/timezone_p2.php45
-rw-r--r--phpBB/phpbb/db/migration/data/v310/ucp_popuppm_module.php42
-rw-r--r--phpBB/phpbb/db/migration/exception.php73
-rw-r--r--phpBB/phpbb/db/migration/helper.php82
-rw-r--r--phpBB/phpbb/db/migration/migration.php184
-rw-r--r--phpBB/phpbb/db/migration/profilefield_base_migration.php155
-rw-r--r--phpBB/phpbb/db/migration/schema_generator.php179
-rw-r--r--phpBB/phpbb/db/migration/tool/config.php156
-rw-r--r--phpBB/phpbb/db/migration/tool/module.php484
-rw-r--r--phpBB/phpbb/db/migration/tool/permission.php624
-rw-r--r--phpBB/phpbb/db/migration/tool/tool_interface.php35
-rw-r--r--phpBB/phpbb/db/migrator.php757
-rw-r--r--phpBB/phpbb/db/sql_insert_buffer.php144
-rw-r--r--phpBB/phpbb/db/tools.php (renamed from phpBB/includes/db/db_tools.php)637
-rw-r--r--phpBB/phpbb/di/extension/config.php78
-rw-r--r--phpBB/phpbb/di/extension/core.php63
-rw-r--r--phpBB/phpbb/di/extension/ext.php63
-rw-r--r--phpBB/phpbb/di/pass/collection_pass.php40
-rw-r--r--phpBB/phpbb/di/pass/kernel_pass.php62
-rw-r--r--phpBB/phpbb/di/service_collection.php43
-rw-r--r--phpBB/phpbb/error_collector.php (renamed from phpBB/includes/error_collector.php)15
-rw-r--r--phpBB/phpbb/event/data.php62
-rw-r--r--phpBB/phpbb/event/dispatcher.php36
-rw-r--r--phpBB/phpbb/event/extension_subscriber_loader.php35
-rw-r--r--phpBB/phpbb/event/kernel_exception_subscriber.php78
-rw-r--r--phpBB/phpbb/event/kernel_request_subscriber.php77
-rw-r--r--phpBB/phpbb/event/kernel_terminate_subscriber.php37
-rw-r--r--phpBB/phpbb/extension/base.php129
-rw-r--r--phpBB/phpbb/extension/exception.php21
-rw-r--r--phpBB/phpbb/extension/extension_interface.php61
-rw-r--r--phpBB/phpbb/extension/finder.php530
-rw-r--r--phpBB/phpbb/extension/manager.php533
-rw-r--r--phpBB/phpbb/extension/metadata_manager.php375
-rw-r--r--phpBB/phpbb/extension/provider.php70
-rw-r--r--phpBB/phpbb/feed/base.php255
-rw-r--r--phpBB/phpbb/feed/factory.php123
-rw-r--r--phpBB/phpbb/feed/forum.php139
-rw-r--r--phpBB/phpbb/feed/forums.php66
-rw-r--r--phpBB/phpbb/feed/helper.php178
-rw-r--r--phpBB/phpbb/feed/news.php106
-rw-r--r--phpBB/phpbb/feed/overall.php84
-rw-r--r--phpBB/phpbb/feed/post_base.php89
-rw-r--r--phpBB/phpbb/feed/topic.php110
-rw-r--r--phpBB/phpbb/feed/topic_base.php53
-rw-r--r--phpBB/phpbb/feed/topics.php85
-rw-r--r--phpBB/phpbb/feed/topics_active.php130
-rw-r--r--phpBB/phpbb/filesystem.php47
-rw-r--r--phpBB/phpbb/groupposition/exception.php17
-rw-r--r--phpBB/phpbb/groupposition/groupposition_interface.php78
-rw-r--r--phpBB/phpbb/groupposition/legend.php245
-rw-r--r--phpBB/phpbb/groupposition/teampage.php598
-rw-r--r--phpBB/phpbb/hook/finder.php78
-rw-r--r--phpBB/phpbb/json_response.php35
-rw-r--r--phpBB/phpbb/lock/db.php143
-rw-r--r--phpBB/phpbb/lock/flock.php138
-rw-r--r--phpBB/phpbb/log/log.php733
-rw-r--r--phpBB/phpbb/log/log_interface.php100
-rw-r--r--phpBB/phpbb/log/null.php72
-rw-r--r--phpBB/phpbb/mimetype/content_guesser.php33
-rw-r--r--phpBB/phpbb/mimetype/extension_guesser.php509
-rw-r--r--phpBB/phpbb/mimetype/guesser.php130
-rw-r--r--phpBB/phpbb/mimetype/guesser_base.php38
-rw-r--r--phpBB/phpbb/mimetype/guesser_interface.php49
-rw-r--r--phpBB/phpbb/notification/exception.php23
-rw-r--r--phpBB/phpbb/notification/manager.php912
-rw-r--r--phpBB/phpbb/notification/method/base.php110
-rw-r--r--phpBB/phpbb/notification/method/email.php46
-rw-r--r--phpBB/phpbb/notification/method/jabber.php63
-rw-r--r--phpBB/phpbb/notification/method/messenger_base.php94
-rw-r--r--phpBB/phpbb/notification/method/method_interface.php42
-rw-r--r--phpBB/phpbb/notification/type/admin_activate_user.php166
-rw-r--r--phpBB/phpbb/notification/type/approve_post.php141
-rw-r--r--phpBB/phpbb/notification/type/approve_topic.php139
-rw-r--r--phpBB/phpbb/notification/type/base.php485
-rw-r--r--phpBB/phpbb/notification/type/bookmark.php132
-rw-r--r--phpBB/phpbb/notification/type/disapprove_post.php121
-rw-r--r--phpBB/phpbb/notification/type/disapprove_topic.php121
-rw-r--r--phpBB/phpbb/notification/type/group_request.php157
-rw-r--r--phpBB/phpbb/notification/type/group_request_approved.php112
-rw-r--r--phpBB/phpbb/notification/type/pm.php178
-rw-r--r--phpBB/phpbb/notification/type/post.php412
-rw-r--r--phpBB/phpbb/notification/type/post_in_queue.php148
-rw-r--r--phpBB/phpbb/notification/type/quote.php216
-rw-r--r--phpBB/phpbb/notification/type/report_pm.php223
-rw-r--r--phpBB/phpbb/notification/type/report_pm_closed.php149
-rw-r--r--phpBB/phpbb/notification/type/report_post.php197
-rw-r--r--phpBB/phpbb/notification/type/report_post_closed.php156
-rw-r--r--phpBB/phpbb/notification/type/topic.php278
-rw-r--r--phpBB/phpbb/notification/type/topic_in_queue.php148
-rw-r--r--phpBB/phpbb/notification/type/type_interface.php183
-rw-r--r--phpBB/phpbb/pagination.php315
-rw-r--r--phpBB/phpbb/passwords/driver/base.php45
-rw-r--r--phpBB/phpbb/passwords/driver/bcrypt.php104
-rw-r--r--phpBB/phpbb/passwords/driver/bcrypt_2y.php34
-rw-r--r--phpBB/phpbb/passwords/driver/driver_interface.php60
-rw-r--r--phpBB/phpbb/passwords/driver/helper.php144
-rw-r--r--phpBB/phpbb/passwords/driver/phpass.php26
-rw-r--r--phpBB/phpbb/passwords/driver/salted_md5.php160
-rw-r--r--phpBB/phpbb/passwords/helper.php103
-rw-r--r--phpBB/phpbb/passwords/manager.php341
-rw-r--r--phpBB/phpbb/path_helper.php209
-rw-r--r--phpBB/phpbb/permissions.php335
-rw-r--r--phpBB/phpbb/php/ini.php169
-rw-r--r--phpBB/phpbb/plupload/plupload.php371
-rw-r--r--phpBB/phpbb/profilefields/lang_helper.php130
-rw-r--r--phpBB/phpbb/profilefields/manager.php436
-rw-r--r--phpBB/phpbb/profilefields/type/type_base.php191
-rw-r--r--phpBB/phpbb/profilefields/type/type_bool.php387
-rw-r--r--phpBB/phpbb/profilefields/type/type_date.php358
-rw-r--r--phpBB/phpbb/profilefields/type/type_dropdown.php297
-rw-r--r--phpBB/phpbb/profilefields/type/type_int.php234
-rw-r--r--phpBB/phpbb/profilefields/type/type_interface.php205
-rw-r--r--phpBB/phpbb/profilefields/type/type_string.php156
-rw-r--r--phpBB/phpbb/profilefields/type/type_string_common.php128
-rw-r--r--phpBB/phpbb/profilefields/type/type_text.php201
-rw-r--r--phpBB/phpbb/profilefields/type/type_url.php70
-rw-r--r--phpBB/phpbb/recursive_dot_prefix_filter_iterator.php28
-rw-r--r--phpBB/phpbb/request/deactivated_super_global.php114
-rw-r--r--phpBB/phpbb/request/request.php417
-rw-r--r--phpBB/phpbb/request/request_interface.php143
-rw-r--r--phpBB/phpbb/request/type_cast_helper.php188
-rw-r--r--phpBB/phpbb/request/type_cast_helper_interface.php57
-rw-r--r--phpBB/phpbb/search/base.php (renamed from phpBB/includes/search/search.php)32
-rw-r--r--phpBB/phpbb/search/fulltext_mysql.php (renamed from phpBB/includes/search/fulltext_mysql.php)522
-rw-r--r--phpBB/phpbb/search/fulltext_native.php (renamed from phpBB/includes/search/fulltext_native.php)545
-rw-r--r--phpBB/phpbb/search/fulltext_postgres.php955
-rw-r--r--phpBB/phpbb/search/fulltext_sphinx.php904
-rw-r--r--phpBB/phpbb/search/index.htm (renamed from phpBB/includes/search/index.htm)0
-rw-r--r--phpBB/phpbb/search/sphinx/config.php282
-rw-r--r--phpBB/phpbb/search/sphinx/config_comment.php43
-rw-r--r--phpBB/phpbb/search/sphinx/config_section.php156
-rw-r--r--phpBB/phpbb/search/sphinx/config_variable.php74
-rw-r--r--phpBB/phpbb/session.php (renamed from phpBB/includes/session.php)1113
-rw-r--r--phpBB/phpbb/symfony_request.php40
-rw-r--r--phpBB/phpbb/template/asset.php181
-rw-r--r--phpBB/phpbb/template/base.php152
-rw-r--r--phpBB/phpbb/template/context.php401
-rw-r--r--phpBB/phpbb/template/template.php177
-rw-r--r--phpBB/phpbb/template/twig/definition.php63
-rw-r--r--phpBB/phpbb/template/twig/environment.php200
-rw-r--r--phpBB/phpbb/template/twig/extension.php182
-rw-r--r--phpBB/phpbb/template/twig/lexer.php343
-rw-r--r--phpBB/phpbb/template/twig/loader.php144
-rw-r--r--phpBB/phpbb/template/twig/node/definenode.php52
-rw-r--r--phpBB/phpbb/template/twig/node/event.php79
-rw-r--r--phpBB/phpbb/template/twig/node/expression/binary/equalequal.php19
-rw-r--r--phpBB/phpbb/template/twig/node/expression/binary/notequalequal.php19
-rw-r--r--phpBB/phpbb/template/twig/node/includeasset.php77
-rw-r--r--phpBB/phpbb/template/twig/node/includecss.php33
-rw-r--r--phpBB/phpbb/template/twig/node/includejs.php35
-rw-r--r--phpBB/phpbb/template/twig/node/includenode.php50
-rw-r--r--phpBB/phpbb/template/twig/node/includephp.php85
-rw-r--r--phpBB/phpbb/template/twig/node/php.php49
-rw-r--r--phpBB/phpbb/template/twig/tokenparser/defineparser.php67
-rw-r--r--phpBB/phpbb/template/twig/tokenparser/event.php41
-rw-r--r--phpBB/phpbb/template/twig/tokenparser/includecss.php40
-rw-r--r--phpBB/phpbb/template/twig/tokenparser/includejs.php41
-rw-r--r--phpBB/phpbb/template/twig/tokenparser/includeparser.php40
-rw-r--r--phpBB/phpbb/template/twig/tokenparser/includephp.php50
-rw-r--r--phpBB/phpbb/template/twig/tokenparser/php.php49
-rw-r--r--phpBB/phpbb/template/twig/twig.php335
-rw-r--r--phpBB/phpbb/tree/nestedset.php870
-rw-r--r--phpBB/phpbb/tree/nestedset_forum.php40
-rw-r--r--phpBB/phpbb/tree/tree_interface.php116
-rw-r--r--phpBB/phpbb/user.php887
-rw-r--r--phpBB/phpbb/user_loader.php226
-rw-r--r--phpBB/phpbb/version_helper.php271
-rw-r--r--phpBB/posting.php356
-rw-r--r--phpBB/report.php58
-rw-r--r--phpBB/search.php219
-rw-r--r--phpBB/style.php293
-rw-r--r--phpBB/styles/prosilver/imageset/en/button_pm_forward.gifbin2168 -> 0 bytes
-rw-r--r--phpBB/styles/prosilver/imageset/en/button_pm_new.gifbin2005 -> 0 bytes
-rw-r--r--phpBB/styles/prosilver/imageset/en/button_pm_reply.gifbin2126 -> 0 bytes
-rw-r--r--phpBB/styles/prosilver/imageset/en/button_topic_locked.gifbin1923 -> 0 bytes
-rw-r--r--phpBB/styles/prosilver/imageset/en/button_topic_new.gifbin2737 -> 0 bytes
-rw-r--r--phpBB/styles/prosilver/imageset/en/button_topic_reply.gifbin2135 -> 0 bytes
-rw-r--r--phpBB/styles/prosilver/imageset/en/imageset.cfg35
-rw-r--r--phpBB/styles/prosilver/imageset/icon_contact_msnm.gifbin588 -> 0 bytes
-rw-r--r--phpBB/styles/prosilver/imageset/imageset.cfg116
-rw-r--r--phpBB/styles/prosilver/style.cfg13
-rw-r--r--phpBB/styles/prosilver/template/ajax.js409
-rw-r--r--phpBB/styles/prosilver/template/avatars.js15
-rw-r--r--phpBB/styles/prosilver/template/bbcode.html8
-rw-r--r--phpBB/styles/prosilver/template/captcha_default.html6
-rw-r--r--phpBB/styles/prosilver/template/captcha_qa.html6
-rw-r--r--phpBB/styles/prosilver/template/captcha_recaptcha.html6
-rw-r--r--phpBB/styles/prosilver/template/confirm_body.html23
-rw-r--r--phpBB/styles/prosilver/template/confirm_delete_body.html74
-rw-r--r--phpBB/styles/prosilver/template/custom_profile_fields.html31
-rw-r--r--phpBB/styles/prosilver/template/drafts.html29
-rw-r--r--phpBB/styles/prosilver/template/editor.js459
-rw-r--r--phpBB/styles/prosilver/template/faq_body.html8
-rw-r--r--phpBB/styles/prosilver/template/forum_fn.js1002
-rw-r--r--phpBB/styles/prosilver/template/forumlist_body.html68
-rw-r--r--phpBB/styles/prosilver/template/index_body.html40
-rw-r--r--phpBB/styles/prosilver/template/jumpbox.html13
-rw-r--r--phpBB/styles/prosilver/template/login_body.html26
-rw-r--r--phpBB/styles/prosilver/template/login_body_oauth.html8
-rw-r--r--phpBB/styles/prosilver/template/login_forum.html8
-rw-r--r--phpBB/styles/prosilver/template/mcp_approve.html40
-rw-r--r--phpBB/styles/prosilver/template/mcp_ban.html30
-rw-r--r--phpBB/styles/prosilver/template/mcp_footer.html2
-rw-r--r--phpBB/styles/prosilver/template/mcp_forum.html78
-rw-r--r--phpBB/styles/prosilver/template/mcp_front.html76
-rw-r--r--phpBB/styles/prosilver/template/mcp_header.html26
-rw-r--r--phpBB/styles/prosilver/template/mcp_logs.html34
-rw-r--r--phpBB/styles/prosilver/template/mcp_message.html2
-rw-r--r--phpBB/styles/prosilver/template/mcp_move.html43
-rw-r--r--phpBB/styles/prosilver/template/mcp_notes_front.html8
-rw-r--r--phpBB/styles/prosilver/template/mcp_notes_user.html52
-rw-r--r--phpBB/styles/prosilver/template/mcp_post.html85
-rw-r--r--phpBB/styles/prosilver/template/mcp_queue.html75
-rw-r--r--phpBB/styles/prosilver/template/mcp_reports.html59
-rw-r--r--phpBB/styles/prosilver/template/mcp_topic.html94
-rw-r--r--phpBB/styles/prosilver/template/mcp_viewlogs.html53
-rw-r--r--phpBB/styles/prosilver/template/mcp_warn_front.html26
-rw-r--r--phpBB/styles/prosilver/template/mcp_warn_list.html28
-rw-r--r--phpBB/styles/prosilver/template/mcp_warn_post.html24
-rw-r--r--phpBB/styles/prosilver/template/mcp_warn_user.html20
-rw-r--r--phpBB/styles/prosilver/template/mcp_whois.html10
-rw-r--r--phpBB/styles/prosilver/template/memberlist_body.html78
-rw-r--r--phpBB/styles/prosilver/template/memberlist_email.html24
-rw-r--r--phpBB/styles/prosilver/template/memberlist_im.html130
-rw-r--r--phpBB/styles/prosilver/template/memberlist_leaders.html76
-rw-r--r--phpBB/styles/prosilver/template/memberlist_search.html92
-rw-r--r--phpBB/styles/prosilver/template/memberlist_team.html47
-rw-r--r--phpBB/styles/prosilver/template/memberlist_view.html88
-rw-r--r--phpBB/styles/prosilver/template/message_body.html6
-rw-r--r--phpBB/styles/prosilver/template/overall_footer.html60
-rw-r--r--phpBB/styles/prosilver/template/overall_header.html205
-rw-r--r--phpBB/styles/prosilver/template/pagination.html18
-rw-r--r--phpBB/styles/prosilver/template/plupload.html69
-rw-r--r--phpBB/styles/prosilver/template/posting_attach_body.html82
-rw-r--r--phpBB/styles/prosilver/template/posting_buttons.html72
-rw-r--r--phpBB/styles/prosilver/template/posting_editor.html194
-rw-r--r--phpBB/styles/prosilver/template/posting_layout.html27
-rw-r--r--phpBB/styles/prosilver/template/posting_pm_header.html82
-rw-r--r--phpBB/styles/prosilver/template/posting_pm_layout.html16
-rw-r--r--phpBB/styles/prosilver/template/posting_poll_body.html24
-rw-r--r--phpBB/styles/prosilver/template/posting_preview.html12
-rw-r--r--phpBB/styles/prosilver/template/posting_review.html8
-rw-r--r--phpBB/styles/prosilver/template/posting_smilies.html18
-rw-r--r--phpBB/styles/prosilver/template/posting_topic_review.html17
-rw-r--r--phpBB/styles/prosilver/template/profilefields/bool.html7
-rw-r--r--phpBB/styles/prosilver/template/profilefields/date.html5
-rw-r--r--phpBB/styles/prosilver/template/profilefields/dropdown.html5
-rw-r--r--phpBB/styles/prosilver/template/profilefields/int.html3
-rw-r--r--phpBB/styles/prosilver/template/profilefields/string.html3
-rw-r--r--phpBB/styles/prosilver/template/profilefields/text.html3
-rw-r--r--phpBB/styles/prosilver/template/profilefields/url.html3
-rw-r--r--phpBB/styles/prosilver/template/quickreply_editor.html77
-rw-r--r--phpBB/styles/prosilver/template/report_body.html16
-rw-r--r--phpBB/styles/prosilver/template/search_body.html50
-rw-r--r--phpBB/styles/prosilver/template/search_results.html127
-rw-r--r--phpBB/styles/prosilver/template/simple_footer.html10
-rw-r--r--phpBB/styles/prosilver/template/simple_header.html72
-rw-r--r--phpBB/styles/prosilver/template/styleswitcher.js193
-rw-r--r--phpBB/styles/prosilver/template/template.cfg30
-rw-r--r--phpBB/styles/prosilver/template/timezone.js21
-rw-r--r--phpBB/styles/prosilver/template/timezone_option.html20
-rw-r--r--phpBB/styles/prosilver/template/ucp_agreement.html14
-rw-r--r--phpBB/styles/prosilver/template/ucp_attachments.html40
-rw-r--r--phpBB/styles/prosilver/template/ucp_auth_link.html15
-rw-r--r--phpBB/styles/prosilver/template/ucp_auth_link_oauth.html29
-rw-r--r--phpBB/styles/prosilver/template/ucp_avatar_options.html90
-rw-r--r--phpBB/styles/prosilver/template/ucp_avatar_options_gravatar.html11
-rw-r--r--phpBB/styles/prosilver/template/ucp_avatar_options_local.html20
-rw-r--r--phpBB/styles/prosilver/template/ucp_avatar_options_remote.html11
-rw-r--r--phpBB/styles/prosilver/template/ucp_avatar_options_upload.html11
-rw-r--r--phpBB/styles/prosilver/template/ucp_footer.html2
-rw-r--r--phpBB/styles/prosilver/template/ucp_groups_manage.html71
-rw-r--r--phpBB/styles/prosilver/template/ucp_groups_membership.html78
-rw-r--r--phpBB/styles/prosilver/template/ucp_header.html12
-rw-r--r--phpBB/styles/prosilver/template/ucp_login_link.html58
-rw-r--r--phpBB/styles/prosilver/template/ucp_main_bookmarks.html65
-rw-r--r--phpBB/styles/prosilver/template/ucp_main_drafts.html30
-rw-r--r--phpBB/styles/prosilver/template/ucp_main_front.html53
-rw-r--r--phpBB/styles/prosilver/template/ucp_main_subscribed.html99
-rw-r--r--phpBB/styles/prosilver/template/ucp_notifications.html125
-rw-r--r--phpBB/styles/prosilver/template/ucp_pm_history.html11
-rw-r--r--phpBB/styles/prosilver/template/ucp_pm_message_header.html22
-rw-r--r--phpBB/styles/prosilver/template/ucp_pm_options.html30
-rw-r--r--phpBB/styles/prosilver/template/ucp_pm_popup.html25
-rw-r--r--phpBB/styles/prosilver/template/ucp_pm_viewfolder.html45
-rw-r--r--phpBB/styles/prosilver/template/ucp_pm_viewmessage.html121
-rw-r--r--phpBB/styles/prosilver/template/ucp_pm_viewmessage_print.html18
-rw-r--r--phpBB/styles/prosilver/template/ucp_prefs_personal.html74
-rw-r--r--phpBB/styles/prosilver/template/ucp_prefs_post.html16
-rw-r--r--phpBB/styles/prosilver/template/ucp_prefs_view.html34
-rw-r--r--phpBB/styles/prosilver/template/ucp_profile_autologin_keys.html51
-rw-r--r--phpBB/styles/prosilver/template/ucp_profile_avatar.html12
-rw-r--r--phpBB/styles/prosilver/template/ucp_profile_profile_info.html58
-rw-r--r--phpBB/styles/prosilver/template/ucp_profile_reg_details.html26
-rw-r--r--phpBB/styles/prosilver/template/ucp_profile_signature.html12
-rw-r--r--phpBB/styles/prosilver/template/ucp_register.html45
-rw-r--r--phpBB/styles/prosilver/template/ucp_remind.html12
-rw-r--r--phpBB/styles/prosilver/template/ucp_resend.html12
-rw-r--r--phpBB/styles/prosilver/template/ucp_zebra_foes.html10
-rw-r--r--phpBB/styles/prosilver/template/ucp_zebra_friends.html12
-rw-r--r--phpBB/styles/prosilver/template/viewforum_body.html132
-rw-r--r--phpBB/styles/prosilver/template/viewonline_body.html30
-rw-r--r--phpBB/styles/prosilver/template/viewonline_whois.html6
-rw-r--r--phpBB/styles/prosilver/template/viewtopic_body.html287
-rw-r--r--phpBB/styles/prosilver/template/viewtopic_print.html20
-rw-r--r--phpBB/styles/prosilver/template/viewtopic_topic_tools.html39
-rw-r--r--phpBB/styles/prosilver/theme/bidi.css183
-rw-r--r--phpBB/styles/prosilver/theme/buttons.css230
-rw-r--r--phpBB/styles/prosilver/theme/colours.css509
-rw-r--r--phpBB/styles/prosilver/theme/common.css829
-rw-r--r--phpBB/styles/prosilver/theme/content.css363
-rw-r--r--phpBB/styles/prosilver/theme/cp.css304
-rw-r--r--phpBB/styles/prosilver/theme/en/icon_contact_pm.gif (renamed from phpBB/styles/prosilver/imageset/en/icon_contact_pm.gif)bin677 -> 677 bytes
-rw-r--r--phpBB/styles/prosilver/theme/en/icon_post_edit.gif (renamed from phpBB/styles/prosilver/imageset/en/icon_post_edit.gif)bin853 -> 853 bytes
-rw-r--r--phpBB/styles/prosilver/theme/en/icon_post_quote.gif (renamed from phpBB/styles/prosilver/imageset/en/icon_post_quote.gif)bin1109 -> 1109 bytes
-rw-r--r--phpBB/styles/prosilver/theme/en/icon_user_online.gif (renamed from phpBB/styles/prosilver/imageset/en/icon_user_online.gif)bin423 -> 423 bytes
-rw-r--r--phpBB/styles/prosilver/theme/en/stylesheet.css34
-rw-r--r--phpBB/styles/prosilver/theme/forms.css75
-rw-r--r--phpBB/styles/prosilver/theme/images/alert_close.pngbin0 -> 2097 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/announce_read.gif (renamed from phpBB/styles/prosilver/imageset/announce_read.gif)bin754 -> 754 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/announce_read_locked.gif (renamed from phpBB/styles/prosilver/imageset/announce_read_locked.gif)bin738 -> 738 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/announce_read_locked_mine.gif (renamed from phpBB/styles/prosilver/imageset/announce_read_locked_mine.gif)bin753 -> 753 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/announce_read_mine.gif (renamed from phpBB/styles/prosilver/imageset/announce_read_mine.gif)bin750 -> 750 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/announce_unread.gif (renamed from phpBB/styles/prosilver/imageset/announce_unread.gif)bin756 -> 756 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/announce_unread_locked.gif (renamed from phpBB/styles/prosilver/imageset/announce_unread_locked.gif)bin745 -> 745 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/announce_unread_locked_mine.gif (renamed from phpBB/styles/prosilver/imageset/announce_unread_locked_mine.gif)bin755 -> 755 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/announce_unread_mine.gif (renamed from phpBB/styles/prosilver/imageset/announce_unread_mine.gif)bin791 -> 791 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/buttons.pngbin0 -> 2923 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/corners_left.gifbin55 -> 0 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/corners_left.pngbin195 -> 0 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/corners_right.gifbin56 -> 0 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/corners_right.pngbin201 -> 0 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/forum_link.gif (renamed from phpBB/styles/prosilver/imageset/forum_link.gif)bin734 -> 734 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/forum_read.gif (renamed from phpBB/styles/prosilver/imageset/forum_read.gif)bin688 -> 688 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/forum_read_locked.gif (renamed from phpBB/styles/prosilver/imageset/forum_read_locked.gif)bin707 -> 707 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/forum_read_subforum.gif (renamed from phpBB/styles/prosilver/imageset/forum_read_subforum.gif)bin751 -> 751 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/forum_unread.gif (renamed from phpBB/styles/prosilver/imageset/forum_unread.gif)bin693 -> 693 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/forum_unread_locked.gif (renamed from phpBB/styles/prosilver/imageset/forum_unread_locked.gif)bin677 -> 677 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/forum_unread_subforum.gif (renamed from phpBB/styles/prosilver/imageset/forum_unread_subforum.gif)bin751 -> 751 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/icon_back_top.gif (renamed from phpBB/styles/prosilver/imageset/icon_back_top.gif)bin204 -> 204 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/icon_contact_aim.gif (renamed from phpBB/styles/prosilver/imageset/icon_contact_aim.gif)bin546 -> 546 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/icon_contact_email.gif (renamed from phpBB/styles/prosilver/imageset/icon_contact_email.gif)bin523 -> 523 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/icon_contact_icq.gif (renamed from phpBB/styles/prosilver/imageset/icon_contact_icq.gif)bin562 -> 562 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/icon_contact_jabber.gif (renamed from phpBB/styles/prosilver/imageset/icon_contact_jabber.gif)bin1014 -> 1014 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/icon_contact_msnm.gifbin0 -> 1466 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/icon_contact_www.gif (renamed from phpBB/styles/prosilver/imageset/icon_contact_www.gif)bin590 -> 590 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/icon_contact_yahoo.gif (renamed from phpBB/styles/prosilver/imageset/icon_contact_yahoo.gif)bin541 -> 541 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/icon_download.gifbin0 -> 198 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/icon_fontsize.gifbin559 -> 0 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/icon_mark.gifbin0 -> 360 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/icon_notification.gifbin0 -> 551 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/icon_offline.gif (renamed from phpBB/styles/prosilver/imageset/icon_offline.gif)bin384 -> 384 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/icon_online.gif (renamed from phpBB/styles/prosilver/imageset/icon_online.gif)bin393 -> 393 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/icon_pm.gifbin0 -> 576 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/icon_post_delete.gif (renamed from phpBB/styles/prosilver/imageset/icon_post_delete.gif)bin528 -> 528 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/icon_post_info.gif (renamed from phpBB/styles/prosilver/imageset/icon_post_info.gif)bin501 -> 501 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/icon_post_menu.pngbin0 -> 1931 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/icon_post_report.gif (renamed from phpBB/styles/prosilver/imageset/icon_post_report.gif)bin474 -> 474 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/icon_post_target.gif (renamed from phpBB/styles/prosilver/imageset/icon_post_target.gif)bin186 -> 186 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/icon_post_target_unread.gif (renamed from phpBB/styles/prosilver/imageset/icon_post_target_unread.gif)bin151 -> 151 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/icon_rate_bad.gif (renamed from phpBB/styles/prosilver/imageset/icon_rate_bad.gif)bin465 -> 465 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/icon_rate_good.gif (renamed from phpBB/styles/prosilver/imageset/icon_rate_good.gif)bin462 -> 462 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/icon_topic_attach.gif (renamed from phpBB/styles/prosilver/imageset/icon_topic_attach.gif)bin144 -> 144 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/icon_topic_deleted.pngbin0 -> 1205 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/icon_topic_latest.gif (renamed from phpBB/styles/prosilver/imageset/icon_topic_latest.gif)bin186 -> 186 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/icon_topic_newest.gif (renamed from phpBB/styles/prosilver/imageset/icon_topic_newest.gif)bin155 -> 155 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/icon_topic_reported.gif (renamed from phpBB/styles/prosilver/imageset/icon_topic_reported.gif)bin246 -> 246 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/icon_topic_unapproved.gif (renamed from phpBB/styles/prosilver/imageset/icon_topic_unapproved.gif)bin253 -> 253 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/icon_user_warn.gif (renamed from phpBB/styles/prosilver/imageset/icon_user_warn.gif)bin481 -> 481 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/loading.gifbin0 -> 1320 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/no_avatar.gifbin474 -> 930 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/site_logo.gif (renamed from phpBB/styles/prosilver/imageset/site_logo.gif)bin5070 -> 5070 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/sticky_read.gif (renamed from phpBB/styles/prosilver/imageset/sticky_read.gif)bin651 -> 651 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/sticky_read_locked.gif (renamed from phpBB/styles/prosilver/imageset/sticky_read_locked.gif)bin646 -> 646 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/sticky_read_locked_mine.gif (renamed from phpBB/styles/prosilver/imageset/sticky_read_locked_mine.gif)bin662 -> 662 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/sticky_read_mine.gif (renamed from phpBB/styles/prosilver/imageset/sticky_read_mine.gif)bin659 -> 659 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/sticky_unread.gif (renamed from phpBB/styles/prosilver/imageset/sticky_unread.gif)bin648 -> 648 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/sticky_unread_locked.gif (renamed from phpBB/styles/prosilver/imageset/sticky_unread_locked.gif)bin626 -> 626 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/sticky_unread_locked_mine.gif (renamed from phpBB/styles/prosilver/imageset/sticky_unread_locked_mine.gif)bin682 -> 682 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/sticky_unread_mine.gif (renamed from phpBB/styles/prosilver/imageset/sticky_unread_mine.gif)bin669 -> 669 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/subforum_read.gif (renamed from phpBB/styles/prosilver/imageset/subforum_read.gif)bin124 -> 124 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/subforum_unread.gif (renamed from phpBB/styles/prosilver/imageset/subforum_unread.gif)bin124 -> 124 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/topic_moved.gif (renamed from phpBB/styles/prosilver/imageset/topic_moved.gif)bin693 -> 693 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/topic_read.gif (renamed from phpBB/styles/prosilver/imageset/topic_read.gif)bin679 -> 679 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/topic_read_hot.gif (renamed from phpBB/styles/prosilver/imageset/topic_read_hot.gif)bin1469 -> 1469 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/topic_read_hot_mine.gif (renamed from phpBB/styles/prosilver/imageset/topic_read_hot_mine.gif)bin1519 -> 1519 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/topic_read_locked.gif (renamed from phpBB/styles/prosilver/imageset/topic_read_locked.gif)bin748 -> 748 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/topic_read_locked_mine.gif (renamed from phpBB/styles/prosilver/imageset/topic_read_locked_mine.gif)bin749 -> 749 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/topic_read_mine.gif (renamed from phpBB/styles/prosilver/imageset/topic_read_mine.gif)bin695 -> 695 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/topic_unread.gif (renamed from phpBB/styles/prosilver/imageset/topic_unread.gif)bin678 -> 678 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/topic_unread_hot.gif (renamed from phpBB/styles/prosilver/imageset/topic_unread_hot.gif)bin1431 -> 1431 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/topic_unread_hot_mine.gif (renamed from phpBB/styles/prosilver/imageset/topic_unread_hot_mine.gif)bin1364 -> 1364 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/topic_unread_locked.gif (renamed from phpBB/styles/prosilver/imageset/topic_unread_locked.gif)bin745 -> 745 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/topic_unread_locked_mine.gif (renamed from phpBB/styles/prosilver/imageset/topic_unread_locked_mine.gif)bin764 -> 764 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/topic_unread_mine.gif (renamed from phpBB/styles/prosilver/imageset/topic_unread_mine.gif)bin704 -> 704 bytes
-rw-r--r--phpBB/styles/prosilver/theme/imageset.css380
-rw-r--r--phpBB/styles/prosilver/theme/large.css3
-rw-r--r--phpBB/styles/prosilver/theme/links.css117
-rw-r--r--phpBB/styles/prosilver/theme/medium.css3
-rw-r--r--phpBB/styles/prosilver/theme/normal.css3
-rw-r--r--phpBB/styles/prosilver/theme/plupload.css76
-rw-r--r--phpBB/styles/prosilver/theme/print.css2
-rw-r--r--phpBB/styles/prosilver/theme/responsive.css538
-rw-r--r--phpBB/styles/prosilver/theme/stylesheet.css4
-rw-r--r--phpBB/styles/prosilver/theme/theme.cfg35
-rw-r--r--phpBB/styles/prosilver/theme/tweaks.css115
-rw-r--r--phpBB/styles/subsilver2/imageset/en/icon_contact_msnm.gifbin622 -> 0 bytes
-rw-r--r--phpBB/styles/subsilver2/imageset/en/imageset.cfg47
-rw-r--r--phpBB/styles/subsilver2/imageset/imageset.cfg100
-rw-r--r--phpBB/styles/subsilver2/style.cfg13
-rw-r--r--phpBB/styles/subsilver2/template/attachment.html2
-rw-r--r--phpBB/styles/subsilver2/template/avatars.js15
-rw-r--r--phpBB/styles/subsilver2/template/bbcode.html10
-rw-r--r--phpBB/styles/subsilver2/template/breadcrumbs.html6
-rw-r--r--phpBB/styles/subsilver2/template/captcha_default.html2
-rw-r--r--phpBB/styles/subsilver2/template/captcha_qa.html2
-rw-r--r--phpBB/styles/subsilver2/template/captcha_recaptcha.html2
-rw-r--r--phpBB/styles/subsilver2/template/confirm_body.html4
-rw-r--r--phpBB/styles/subsilver2/template/confirm_delete_body.html56
-rw-r--r--phpBB/styles/subsilver2/template/custom_profile_fields.html31
-rw-r--r--phpBB/styles/subsilver2/template/faq_body.html2
-rw-r--r--phpBB/styles/subsilver2/template/forumlist_body.html38
-rw-r--r--phpBB/styles/subsilver2/template/index_body.html16
-rw-r--r--phpBB/styles/subsilver2/template/jumpbox.html6
-rw-r--r--phpBB/styles/subsilver2/template/login_body.html7
-rw-r--r--phpBB/styles/subsilver2/template/login_body_oauth.html7
-rw-r--r--phpBB/styles/subsilver2/template/login_forum.html4
-rw-r--r--phpBB/styles/subsilver2/template/mcp_approve.html6
-rw-r--r--phpBB/styles/subsilver2/template/mcp_ban.html20
-rw-r--r--phpBB/styles/subsilver2/template/mcp_footer.html4
-rw-r--r--phpBB/styles/subsilver2/template/mcp_forum.html12
-rw-r--r--phpBB/styles/subsilver2/template/mcp_front.html26
-rw-r--r--phpBB/styles/subsilver2/template/mcp_header.html21
-rw-r--r--phpBB/styles/subsilver2/template/mcp_jumpbox.html18
-rw-r--r--phpBB/styles/subsilver2/template/mcp_logs.html6
-rw-r--r--phpBB/styles/subsilver2/template/mcp_message.html2
-rw-r--r--phpBB/styles/subsilver2/template/mcp_move.html5
-rw-r--r--phpBB/styles/subsilver2/template/mcp_notes_front.html4
-rw-r--r--phpBB/styles/subsilver2/template/mcp_notes_user.html12
-rw-r--r--phpBB/styles/subsilver2/template/mcp_post.html33
-rw-r--r--phpBB/styles/subsilver2/template/mcp_queue.html46
-rw-r--r--phpBB/styles/subsilver2/template/mcp_reports.html14
-rw-r--r--phpBB/styles/subsilver2/template/mcp_topic.html22
-rw-r--r--phpBB/styles/subsilver2/template/mcp_viewlogs.html52
-rw-r--r--phpBB/styles/subsilver2/template/mcp_warn_front.html8
-rw-r--r--phpBB/styles/subsilver2/template/mcp_warn_list.html6
-rw-r--r--phpBB/styles/subsilver2/template/mcp_warn_post.html2
-rw-r--r--phpBB/styles/subsilver2/template/mcp_warn_user.html8
-rw-r--r--phpBB/styles/subsilver2/template/mcp_whois.html2
-rw-r--r--phpBB/styles/subsilver2/template/memberlist_body.html14
-rw-r--r--phpBB/styles/subsilver2/template/memberlist_email.html4
-rw-r--r--phpBB/styles/subsilver2/template/memberlist_group.html6
-rw-r--r--phpBB/styles/subsilver2/template/memberlist_im.html111
-rw-r--r--phpBB/styles/subsilver2/template/memberlist_leaders.html71
-rw-r--r--phpBB/styles/subsilver2/template/memberlist_search.html75
-rw-r--r--phpBB/styles/subsilver2/template/memberlist_team.html50
-rw-r--r--phpBB/styles/subsilver2/template/memberlist_view.html90
-rw-r--r--phpBB/styles/subsilver2/template/message_body.html2
-rw-r--r--phpBB/styles/subsilver2/template/overall_footer.html17
-rw-r--r--phpBB/styles/subsilver2/template/overall_header.html88
-rw-r--r--phpBB/styles/subsilver2/template/pagination.html12
-rw-r--r--phpBB/styles/subsilver2/template/posting_body.html84
-rw-r--r--phpBB/styles/subsilver2/template/posting_buttons.html34
-rw-r--r--phpBB/styles/subsilver2/template/posting_poll_body.html16
-rw-r--r--phpBB/styles/subsilver2/template/posting_preview.html4
-rw-r--r--phpBB/styles/subsilver2/template/posting_review.html10
-rw-r--r--phpBB/styles/subsilver2/template/posting_smilies.html19
-rw-r--r--phpBB/styles/subsilver2/template/posting_topic_review.html19
-rw-r--r--phpBB/styles/subsilver2/template/profilefields/bool.html7
-rw-r--r--phpBB/styles/subsilver2/template/profilefields/date.html5
-rw-r--r--phpBB/styles/subsilver2/template/profilefields/dropdown.html5
-rw-r--r--phpBB/styles/subsilver2/template/profilefields/int.html3
-rw-r--r--phpBB/styles/subsilver2/template/profilefields/string.html3
-rw-r--r--phpBB/styles/subsilver2/template/profilefields/text.html3
-rw-r--r--phpBB/styles/subsilver2/template/profilefields/url.html3
-rw-r--r--phpBB/styles/subsilver2/template/quickreply_editor.html18
-rw-r--r--phpBB/styles/subsilver2/template/report_body.html8
-rw-r--r--phpBB/styles/subsilver2/template/search_body.html18
-rw-r--r--phpBB/styles/subsilver2/template/search_results.html52
-rw-r--r--phpBB/styles/subsilver2/template/searchbox.html2
-rw-r--r--phpBB/styles/subsilver2/template/simple_footer.html8
-rw-r--r--phpBB/styles/subsilver2/template/simple_header.html16
-rw-r--r--phpBB/styles/subsilver2/template/template.cfg27
-rw-r--r--phpBB/styles/subsilver2/template/timezone.js21
-rw-r--r--phpBB/styles/subsilver2/template/timezone_option.html20
-rw-r--r--phpBB/styles/subsilver2/template/ucp_agreement.html2
-rw-r--r--phpBB/styles/subsilver2/template/ucp_attachments.html6
-rw-r--r--phpBB/styles/subsilver2/template/ucp_auth_link.html19
-rw-r--r--phpBB/styles/subsilver2/template/ucp_auth_link_oauth.html34
-rw-r--r--phpBB/styles/subsilver2/template/ucp_avatar_options_gravatar.html13
-rw-r--r--phpBB/styles/subsilver2/template/ucp_avatar_options_local.html39
-rw-r--r--phpBB/styles/subsilver2/template/ucp_avatar_options_remote.html10
-rw-r--r--phpBB/styles/subsilver2/template/ucp_avatar_options_upload.html12
-rw-r--r--phpBB/styles/subsilver2/template/ucp_footer.html2
-rw-r--r--phpBB/styles/subsilver2/template/ucp_groups_manage.html119
-rw-r--r--phpBB/styles/subsilver2/template/ucp_groups_membership.html4
-rw-r--r--phpBB/styles/subsilver2/template/ucp_header.html6
-rw-r--r--phpBB/styles/subsilver2/template/ucp_login_link.html74
-rw-r--r--phpBB/styles/subsilver2/template/ucp_main_bookmarks.html19
-rw-r--r--phpBB/styles/subsilver2/template/ucp_main_drafts.html17
-rw-r--r--phpBB/styles/subsilver2/template/ucp_main_front.html14
-rw-r--r--phpBB/styles/subsilver2/template/ucp_main_subscribed.html23
-rw-r--r--phpBB/styles/subsilver2/template/ucp_notifications.html139
-rw-r--r--phpBB/styles/subsilver2/template/ucp_pm_history.html6
-rw-r--r--phpBB/styles/subsilver2/template/ucp_pm_message_footer.html2
-rw-r--r--phpBB/styles/subsilver2/template/ucp_pm_options.html16
-rw-r--r--phpBB/styles/subsilver2/template/ucp_pm_popup.html37
-rw-r--r--phpBB/styles/subsilver2/template/ucp_pm_viewfolder.html6
-rw-r--r--phpBB/styles/subsilver2/template/ucp_pm_viewmessage.html16
-rw-r--r--phpBB/styles/subsilver2/template/ucp_pm_viewmessage_print.html14
-rw-r--r--phpBB/styles/subsilver2/template/ucp_prefs_personal.html49
-rw-r--r--phpBB/styles/subsilver2/template/ucp_prefs_post.html12
-rw-r--r--phpBB/styles/subsilver2/template/ucp_prefs_view.html30
-rw-r--r--phpBB/styles/subsilver2/template/ucp_profile_autologin_keys.html49
-rw-r--r--phpBB/styles/subsilver2/template/ucp_profile_avatar.html86
-rw-r--r--phpBB/styles/subsilver2/template/ucp_profile_profile_info.html50
-rw-r--r--phpBB/styles/subsilver2/template/ucp_profile_reg_details.html18
-rw-r--r--phpBB/styles/subsilver2/template/ucp_profile_signature.html9
-rw-r--r--phpBB/styles/subsilver2/template/ucp_register.html27
-rw-r--r--phpBB/styles/subsilver2/template/ucp_remind.html8
-rw-r--r--phpBB/styles/subsilver2/template/ucp_resend.html8
-rw-r--r--phpBB/styles/subsilver2/template/ucp_zebra_foes.html6
-rw-r--r--phpBB/styles/subsilver2/template/ucp_zebra_friends.html8
-rw-r--r--phpBB/styles/subsilver2/template/viewforum_body.html76
-rw-r--r--phpBB/styles/subsilver2/template/viewonline_body.html12
-rw-r--r--phpBB/styles/subsilver2/template/viewonline_whois.html2
-rw-r--r--phpBB/styles/subsilver2/template/viewtopic_body.html130
-rw-r--r--phpBB/styles/subsilver2/template/viewtopic_print.html16
-rw-r--r--phpBB/styles/subsilver2/theme/en/button_pm_new.gif (renamed from phpBB/styles/subsilver2/imageset/en/button_pm_new.gif)bin1135 -> 1135 bytes
-rw-r--r--phpBB/styles/subsilver2/theme/en/button_pm_reply.gif (renamed from phpBB/styles/subsilver2/imageset/en/button_pm_reply.gif)bin1667 -> 1667 bytes
-rw-r--r--phpBB/styles/subsilver2/theme/en/button_topic_locked.gif (renamed from phpBB/styles/subsilver2/imageset/en/button_topic_locked.gif)bin1101 -> 1101 bytes
-rw-r--r--phpBB/styles/subsilver2/theme/en/button_topic_new.gif (renamed from phpBB/styles/subsilver2/imageset/en/button_topic_new.gif)bin1164 -> 1164 bytes
-rw-r--r--phpBB/styles/subsilver2/theme/en/button_topic_reply.gif (renamed from phpBB/styles/subsilver2/imageset/en/button_topic_reply.gif)bin1234 -> 1234 bytes
-rw-r--r--phpBB/styles/subsilver2/theme/en/icon_contact_aim.gif (renamed from phpBB/styles/subsilver2/imageset/en/icon_contact_aim.gif)bin580 -> 580 bytes
-rw-r--r--phpBB/styles/subsilver2/theme/en/icon_contact_email.gif (renamed from phpBB/styles/subsilver2/imageset/en/icon_contact_email.gif)bin659 -> 659 bytes
-rw-r--r--phpBB/styles/subsilver2/theme/en/icon_contact_icq.gif (renamed from phpBB/styles/subsilver2/imageset/en/icon_contact_icq.gif)bin574 -> 574 bytes
-rw-r--r--phpBB/styles/subsilver2/theme/en/icon_contact_jabber.gif (renamed from phpBB/styles/subsilver2/imageset/en/icon_contact_jabber.gif)bin674 -> 674 bytes
-rw-r--r--phpBB/styles/subsilver2/theme/en/icon_contact_msnm.gifbin0 -> 1503 bytes
-rw-r--r--phpBB/styles/subsilver2/theme/en/icon_contact_pm.gif (renamed from phpBB/styles/subsilver2/imageset/en/icon_contact_pm.gif)bin706 -> 706 bytes
-rw-r--r--phpBB/styles/subsilver2/theme/en/icon_contact_www.gif (renamed from phpBB/styles/subsilver2/imageset/en/icon_contact_www.gif)bin604 -> 604 bytes
-rw-r--r--phpBB/styles/subsilver2/theme/en/icon_contact_yahoo.gif (renamed from phpBB/styles/subsilver2/imageset/en/icon_contact_yahoo.gif)bin663 -> 663 bytes
-rw-r--r--phpBB/styles/subsilver2/theme/en/icon_post_delete.gif (renamed from phpBB/styles/subsilver2/imageset/en/icon_post_delete.gif)bin314 -> 314 bytes
-rw-r--r--phpBB/styles/subsilver2/theme/en/icon_post_edit.gif (renamed from phpBB/styles/subsilver2/imageset/en/icon_post_edit.gif)bin662 -> 662 bytes
-rw-r--r--phpBB/styles/subsilver2/theme/en/icon_post_info.gif (renamed from phpBB/styles/subsilver2/imageset/en/icon_post_info.gif)bin305 -> 305 bytes
-rw-r--r--phpBB/styles/subsilver2/theme/en/icon_post_quote.gif (renamed from phpBB/styles/subsilver2/imageset/en/icon_post_quote.gif)bin666 -> 666 bytes
-rw-r--r--phpBB/styles/subsilver2/theme/en/icon_post_report.gif (renamed from phpBB/styles/subsilver2/imageset/en/icon_post_report.gif)bin308 -> 308 bytes
-rw-r--r--phpBB/styles/subsilver2/theme/en/icon_user_offline.gif (renamed from phpBB/styles/subsilver2/imageset/en/icon_user_offline.gif)bin547 -> 547 bytes
-rw-r--r--phpBB/styles/subsilver2/theme/en/icon_user_online.gif (renamed from phpBB/styles/subsilver2/imageset/en/icon_user_online.gif)bin520 -> 520 bytes
-rw-r--r--phpBB/styles/subsilver2/theme/en/icon_user_profile.gif (renamed from phpBB/styles/subsilver2/imageset/en/icon_user_profile.gif)bin667 -> 667 bytes
-rw-r--r--phpBB/styles/subsilver2/theme/en/icon_user_search.gif (renamed from phpBB/styles/subsilver2/imageset/en/icon_user_search.gif)bin608 -> 608 bytes
-rw-r--r--phpBB/styles/subsilver2/theme/en/icon_user_warn.gif (renamed from phpBB/styles/subsilver2/imageset/en/icon_user_warn.gif)bin673 -> 673 bytes
-rw-r--r--phpBB/styles/subsilver2/theme/en/stylesheet.css116
-rw-r--r--phpBB/styles/subsilver2/theme/images/announce_read.gif (renamed from phpBB/styles/subsilver2/imageset/announce_read.gif)bin307 -> 307 bytes
-rw-r--r--phpBB/styles/subsilver2/theme/images/announce_read_locked.gif (renamed from phpBB/styles/subsilver2/imageset/announce_read_locked.gif)bin304 -> 304 bytes
-rw-r--r--phpBB/styles/subsilver2/theme/images/announce_read_locked_mine.gif (renamed from phpBB/styles/subsilver2/imageset/announce_read_locked_mine.gif)bin324 -> 324 bytes
-rw-r--r--phpBB/styles/subsilver2/theme/images/announce_read_mine.gif (renamed from phpBB/styles/subsilver2/imageset/announce_read_mine.gif)bin328 -> 328 bytes
-rw-r--r--phpBB/styles/subsilver2/theme/images/announce_unread.gif (renamed from phpBB/styles/subsilver2/imageset/announce_unread.gif)bin289 -> 289 bytes
-rw-r--r--phpBB/styles/subsilver2/theme/images/announce_unread_locked.gif (renamed from phpBB/styles/subsilver2/imageset/announce_unread_locked.gif)bin292 -> 292 bytes
-rw-r--r--phpBB/styles/subsilver2/theme/images/announce_unread_locked_mine.gif (renamed from phpBB/styles/subsilver2/imageset/announce_unread_locked_mine.gif)bin308 -> 308 bytes
-rw-r--r--phpBB/styles/subsilver2/theme/images/announce_unread_mine.gif (renamed from phpBB/styles/subsilver2/imageset/announce_unread_mine.gif)bin305 -> 305 bytes
-rw-r--r--phpBB/styles/subsilver2/theme/images/forum_link.gif (renamed from phpBB/styles/subsilver2/imageset/forum_link.gif)bin714 -> 714 bytes
-rw-r--r--phpBB/styles/subsilver2/theme/images/forum_read.gif (renamed from phpBB/styles/subsilver2/imageset/forum_read.gif)bin677 -> 677 bytes
-rw-r--r--phpBB/styles/subsilver2/theme/images/forum_read_locked.gif (renamed from phpBB/styles/subsilver2/imageset/forum_read_locked.gif)bin673 -> 673 bytes
-rw-r--r--phpBB/styles/subsilver2/theme/images/forum_read_subforum.gif (renamed from phpBB/styles/subsilver2/imageset/forum_read_subforum.gif)bin705 -> 705 bytes
-rw-r--r--phpBB/styles/subsilver2/theme/images/forum_unread.gif (renamed from phpBB/styles/subsilver2/imageset/forum_unread.gif)bin663 -> 663 bytes
-rw-r--r--phpBB/styles/subsilver2/theme/images/forum_unread_locked.gif (renamed from phpBB/styles/subsilver2/imageset/forum_unread_locked.gif)bin660 -> 660 bytes
-rw-r--r--phpBB/styles/subsilver2/theme/images/forum_unread_subforum.gif (renamed from phpBB/styles/subsilver2/imageset/forum_unread_subforum.gif)bin688 -> 688 bytes
-rw-r--r--phpBB/styles/subsilver2/theme/images/icon_mini_notification.gifbin0 -> 543 bytes
-rw-r--r--phpBB/styles/subsilver2/theme/images/icon_post_target.gif (renamed from phpBB/styles/subsilver2/imageset/icon_post_target.gif)bin122 -> 122 bytes
-rw-r--r--phpBB/styles/subsilver2/theme/images/icon_post_target_unread.gif (renamed from phpBB/styles/subsilver2/imageset/icon_post_target_unread.gif)bin122 -> 122 bytes
-rw-r--r--phpBB/styles/subsilver2/theme/images/icon_topic_attach.gif (renamed from phpBB/styles/subsilver2/imageset/icon_topic_attach.gif)bin217 -> 217 bytes
-rw-r--r--phpBB/styles/subsilver2/theme/images/icon_topic_deleted.pngbin0 -> 1205 bytes
-rw-r--r--phpBB/styles/subsilver2/theme/images/icon_topic_latest.gif (renamed from phpBB/styles/subsilver2/imageset/icon_topic_latest.gif)bin135 -> 135 bytes
-rw-r--r--phpBB/styles/subsilver2/theme/images/icon_topic_newest.gif (renamed from phpBB/styles/subsilver2/imageset/icon_topic_newest.gif)bin133 -> 133 bytes
-rw-r--r--phpBB/styles/subsilver2/theme/images/icon_topic_reported.gif (renamed from phpBB/styles/subsilver2/imageset/icon_topic_reported.gif)bin462 -> 462 bytes
-rw-r--r--phpBB/styles/subsilver2/theme/images/icon_topic_unapproved.gif (renamed from phpBB/styles/subsilver2/imageset/icon_topic_unapproved.gif)bin334 -> 334 bytes
-rw-r--r--phpBB/styles/subsilver2/theme/images/no_avatar.gifbin474 -> 930 bytes
-rw-r--r--phpBB/styles/subsilver2/theme/images/poll_center.gif (renamed from phpBB/styles/subsilver2/imageset/poll_center.gif)bin92 -> 92 bytes
-rw-r--r--phpBB/styles/subsilver2/theme/images/poll_left.gif (renamed from phpBB/styles/subsilver2/imageset/poll_left.gif)bin113 -> 113 bytes
-rw-r--r--phpBB/styles/subsilver2/theme/images/poll_right.gif (renamed from phpBB/styles/subsilver2/imageset/poll_right.gif)bin113 -> 113 bytes
-rw-r--r--phpBB/styles/subsilver2/theme/images/site_logo.gif (renamed from phpBB/styles/subsilver2/imageset/site_logo.gif)bin7151 -> 7151 bytes
-rw-r--r--phpBB/styles/subsilver2/theme/images/sticky_read.gif (renamed from phpBB/styles/subsilver2/imageset/sticky_read.gif)bin344 -> 344 bytes
-rw-r--r--phpBB/styles/subsilver2/theme/images/sticky_read_locked.gif (renamed from phpBB/styles/subsilver2/imageset/sticky_read_locked.gif)bin338 -> 338 bytes
-rw-r--r--phpBB/styles/subsilver2/theme/images/sticky_read_locked_mine.gif (renamed from phpBB/styles/subsilver2/imageset/sticky_read_locked_mine.gif)bin336 -> 336 bytes
-rw-r--r--phpBB/styles/subsilver2/theme/images/sticky_read_mine.gif (renamed from phpBB/styles/subsilver2/imageset/sticky_read_mine.gif)bin352 -> 352 bytes
-rw-r--r--phpBB/styles/subsilver2/theme/images/sticky_unread.gif (renamed from phpBB/styles/subsilver2/imageset/sticky_unread.gif)bin325 -> 325 bytes
-rw-r--r--phpBB/styles/subsilver2/theme/images/sticky_unread_locked.gif (renamed from phpBB/styles/subsilver2/imageset/sticky_unread_locked.gif)bin324 -> 324 bytes
-rw-r--r--phpBB/styles/subsilver2/theme/images/sticky_unread_locked_mine.gif (renamed from phpBB/styles/subsilver2/imageset/sticky_unread_locked_mine.gif)bin336 -> 336 bytes
-rw-r--r--phpBB/styles/subsilver2/theme/images/sticky_unread_mine.gif (renamed from phpBB/styles/subsilver2/imageset/sticky_unread_mine.gif)bin339 -> 339 bytes
-rw-r--r--phpBB/styles/subsilver2/theme/images/topic_moved.gif (renamed from phpBB/styles/subsilver2/imageset/topic_moved.gif)bin660 -> 660 bytes
-rw-r--r--phpBB/styles/subsilver2/theme/images/topic_read.gif (renamed from phpBB/styles/subsilver2/imageset/topic_read.gif)bin344 -> 344 bytes
-rw-r--r--phpBB/styles/subsilver2/theme/images/topic_read_hot.gif (renamed from phpBB/styles/subsilver2/imageset/topic_read_hot.gif)bin1902 -> 1902 bytes
-rw-r--r--phpBB/styles/subsilver2/theme/images/topic_read_hot_mine.gif (renamed from phpBB/styles/subsilver2/imageset/topic_read_hot_mine.gif)bin1903 -> 1903 bytes
-rw-r--r--phpBB/styles/subsilver2/theme/images/topic_read_locked.gif (renamed from phpBB/styles/subsilver2/imageset/topic_read_locked.gif)bin333 -> 333 bytes
-rw-r--r--phpBB/styles/subsilver2/theme/images/topic_read_locked_mine.gif (renamed from phpBB/styles/subsilver2/imageset/topic_read_locked_mine.gif)bin337 -> 337 bytes
-rw-r--r--phpBB/styles/subsilver2/theme/images/topic_read_mine.gif (renamed from phpBB/styles/subsilver2/imageset/topic_read_mine.gif)bin350 -> 350 bytes
-rw-r--r--phpBB/styles/subsilver2/theme/images/topic_unread.gif (renamed from phpBB/styles/subsilver2/imageset/topic_unread.gif)bin336 -> 336 bytes
-rw-r--r--phpBB/styles/subsilver2/theme/images/topic_unread_hot.gif (renamed from phpBB/styles/subsilver2/imageset/topic_unread_hot.gif)bin1888 -> 1888 bytes
-rw-r--r--phpBB/styles/subsilver2/theme/images/topic_unread_hot_mine.gif (renamed from phpBB/styles/subsilver2/imageset/topic_unread_hot_mine.gif)bin1895 -> 1895 bytes
-rw-r--r--phpBB/styles/subsilver2/theme/images/topic_unread_locked.gif (renamed from phpBB/styles/subsilver2/imageset/topic_unread_locked.gif)bin459 -> 459 bytes
-rw-r--r--phpBB/styles/subsilver2/theme/images/topic_unread_locked_mine.gif (renamed from phpBB/styles/subsilver2/imageset/topic_unread_locked_mine.gif)bin334 -> 334 bytes
-rw-r--r--phpBB/styles/subsilver2/theme/images/topic_unread_mine.gif (renamed from phpBB/styles/subsilver2/imageset/topic_unread_mine.gif)bin350 -> 350 bytes
-rw-r--r--phpBB/styles/subsilver2/theme/images/upload_bar.gif (renamed from phpBB/styles/subsilver2/imageset/upload_bar.gif)bin12892 -> 12892 bytes
-rw-r--r--phpBB/styles/subsilver2/theme/stylesheet.css535
-rw-r--r--phpBB/styles/subsilver2/theme/theme.cfg35
-rw-r--r--phpBB/ucp.php63
-rw-r--r--phpBB/viewforum.php282
-rw-r--r--phpBB/viewonline.php109
-rw-r--r--phpBB/viewtopic.php641
-rw-r--r--phpunit.xml.all11
-rw-r--r--phpunit.xml.dist11
-rw-r--r--phpunit.xml.functional11
-rw-r--r--tests/RUNNING_TESTS.md20
-rw-r--r--tests/acp_board/auth_provider/invalid.php15
-rw-r--r--tests/acp_board/auth_provider/valid.php18
-rw-r--r--tests/acp_board/select_auth_method_test.php48
-rw-r--r--tests/auth/fixtures/oauth_tokens.xml10
-rw-r--r--tests/auth/fixtures/user.xml42
-rw-r--r--tests/auth/fixtures/user_533.xml42
-rw-r--r--tests/auth/provider_apache_test.php226
-rw-r--r--tests/auth/provider_db_test.php83
-rw-r--r--tests/auth/provider_oauth_token_storage_test.php207
-rw-r--r--tests/avatar/driver/barfoo.php26
-rw-r--r--tests/avatar/driver/foobar.php26
-rw-r--r--tests/avatar/manager_test.php268
-rw-r--r--tests/bbcode/parser_test.php265
-rw-r--r--tests/bbcode/url_bbcode_test.php4
-rw-r--r--tests/bootstrap.php29
-rw-r--r--tests/cache/apc_driver_test.php53
-rw-r--r--tests/cache/common_test_case.php98
-rw-r--r--tests/cache/file_driver_test.php69
-rw-r--r--tests/cache/fixtures/config.xml18
-rw-r--r--tests/cache/null_driver_test.php75
-rw-r--r--tests/cache/redis_driver_test.php49
-rw-r--r--tests/class_loader/class_loader_test.php97
-rw-r--r--tests/class_loader/phpbb/class_name.php8
-rw-r--r--tests/class_loader/phpbb/dir/class_name.php8
-rw-r--r--tests/class_loader/phpbb/dir/subdir/class_name.php8
-rw-r--r--tests/class_loader/phpbb/dir2/dir2.php8
-rw-r--r--tests/compress/compress_test.php15
-rw-r--r--tests/config/config_test.php120
-rw-r--r--tests/config/db_test.php164
-rw-r--r--tests/config/db_text_test.php115
-rw-r--r--tests/config/fixtures/config.xml18
-rw-r--r--tests/config/fixtures/config_text.xml19
-rw-r--r--tests/content_visibility/delete_post_test.php310
-rw-r--r--tests/content_visibility/fixtures/delete_post.xml163
-rw-r--r--tests/content_visibility/fixtures/get_forums_visibility_sql.xml133
-rw-r--r--tests/content_visibility/fixtures/get_visibility_sql.xml55
-rw-r--r--tests/content_visibility/fixtures/set_post_visibility.xml154
-rw-r--r--tests/content_visibility/fixtures/set_topic_visibility.xml132
-rw-r--r--tests/content_visibility/get_forums_visibility_sql_test.php143
-rw-r--r--tests/content_visibility/get_global_visibility_sql_test.php143
-rw-r--r--tests/content_visibility/get_visibility_sql_test.php90
-rw-r--r--tests/content_visibility/set_post_visibility_test.php143
-rw-r--r--tests/content_visibility/set_topic_visibility_test.php107
-rw-r--r--tests/controller/config/routing.yml3
-rw-r--r--tests/controller/config/services.yml3
-rw-r--r--tests/controller/controller_test.php81
-rw-r--r--tests/controller/ext/vendor2/foo/config/routing.yml7
-rw-r--r--tests/controller/ext/vendor2/foo/config/routing_2.yml6
-rw-r--r--tests/controller/ext/vendor2/foo/config/services.yml3
-rw-r--r--tests/controller/ext/vendor2/foo/controller.php18
-rw-r--r--tests/controller/helper_route_test.php128
-rw-r--r--tests/controller/phpbb/controller/foo.php18
-rw-r--r--tests/cron/ext/testext/cron/dummy_task.php28
-rw-r--r--tests/cron/includes/cron/task/core/dummy_task.php28
-rw-r--r--tests/cron/includes/cron/task/core/second_dummy_task.php28
-rw-r--r--tests/cron/manager_test.php76
-rw-r--r--tests/cron/tasks/simple_not_runnable.php18
-rw-r--r--tests/cron/tasks/simple_ready.php13
-rw-r--r--tests/cron/tasks/simple_should_not_run.php18
-rw-r--r--tests/datetime/from_format_test.php54
-rw-r--r--tests/dbal/auto_increment_test.php3
-rw-r--r--tests/dbal/case_test.php69
-rw-r--r--tests/dbal/concatenate_test.php64
-rw-r--r--tests/dbal/connect_test.php4
-rw-r--r--tests/dbal/db_tools_test.php7
-rw-r--r--tests/dbal/fixtures/massmail_crossjoin.xml8
-rw-r--r--tests/dbal/fixtures/migrator.xml29
-rw-r--r--tests/dbal/fixtures/migrator_module.xml42
-rw-r--r--tests/dbal/fixtures/migrator_permission.xml31
-rw-r--r--tests/dbal/fixtures/styles.xml28
-rw-r--r--tests/dbal/fixtures/three_users.xml8
-rw-r--r--tests/dbal/migration/dummy.php27
-rw-r--r--tests/dbal/migration/fail.php41
-rw-r--r--tests/dbal/migration/if.php44
-rw-r--r--tests/dbal/migration/installed.php30
-rw-r--r--tests/dbal/migration/recall.php38
-rw-r--r--tests/dbal/migration/revert.php40
-rw-r--r--tests/dbal/migration/revert_with_dependency.php16
-rw-r--r--tests/dbal/migration/schema.php44
-rw-r--r--tests/dbal/migration/unfulfillable.php26
-rw-r--r--tests/dbal/migrator_test.php293
-rw-r--r--tests/dbal/migrator_tool_config_test.php86
-rw-r--r--tests/dbal/migrator_tool_module_test.php153
-rw-r--r--tests/dbal/migrator_tool_permission_test.php157
-rw-r--r--tests/dbal/order_lower_test.php21
-rw-r--r--tests/dbal/schema_test.php38
-rw-r--r--tests/dbal/select_test.php12
-rw-r--r--tests/dbal/sql_insert_buffer_test.php116
-rw-r--r--tests/dbal/write_sequence_test.php6
-rw-r--r--tests/dbal/write_test.php6
-rw-r--r--tests/di/create_container_test.php78
-rw-r--r--tests/di/fixtures/config.php11
-rw-r--r--tests/download/http_byte_range_test.php64
-rw-r--r--tests/download/http_user_agent_test.php130
-rw-r--r--tests/error_collector_test.php3
-rw-r--r--tests/event/dispatcher_test.php29
-rw-r--r--tests/extension/ext/barfoo/composer.json22
-rw-r--r--tests/extension/ext/barfoo/ext.php7
-rw-r--r--tests/extension/ext/vendor/moo/composer.json22
-rw-r--r--tests/extension/ext/vendor/moo/ext.php15
-rw-r--r--tests/extension/ext/vendor/moo/feature_class.php7
-rw-r--r--tests/extension/ext/vendor2/bar/acp/a_info.php18
-rw-r--r--tests/extension/ext/vendor2/bar/acp/a_module.php7
-rw-r--r--tests/extension/ext/vendor2/bar/composer.json21
-rw-r--r--tests/extension/ext/vendor2/bar/ext.php26
-rw-r--r--tests/extension/ext/vendor2/foo/a_class.php7
-rw-r--r--tests/extension/ext/vendor2/foo/acp/a_info.php18
-rw-r--r--tests/extension/ext/vendor2/foo/acp/a_module.php7
-rw-r--r--tests/extension/ext/vendor2/foo/acp/fail_info.php22
-rw-r--r--tests/extension/ext/vendor2/foo/acp/fail_module.php11
-rw-r--r--tests/extension/ext/vendor2/foo/b_class.php7
-rw-r--r--tests/extension/ext/vendor2/foo/composer.json21
-rw-r--r--tests/extension/ext/vendor2/foo/ext.php15
-rw-r--r--tests/extension/ext/vendor2/foo/mcp/a_info.php18
-rw-r--r--tests/extension/ext/vendor2/foo/mcp/a_module.php7
-rw-r--r--tests/extension/ext/vendor2/foo/sub/type/alternative.php7
-rw-r--r--tests/extension/ext/vendor2/foo/type/alternative.php7
-rw-r--r--tests/extension/ext/vendor2/foo/type/dummy/empty.txt (renamed from phpBB/styles/prosilver/imageset/index.htm)0
-rw-r--r--tests/extension/ext/vendor2/foo/typewrong/error.php7
-rw-r--r--tests/extension/ext/vendor3/bar/ext.php26
-rw-r--r--tests/extension/ext/vendor3/bar/my/hidden_class.php7
-rw-r--r--tests/extension/ext/vendor3/bar/styles/prosilver/template/foobar_body.html1
-rw-r--r--tests/extension/finder_test.php245
-rw-r--r--tests/extension/fixtures/extensions.xml18
-rw-r--r--tests/extension/includes/acp/acp_foobar.php28
-rw-r--r--tests/extension/includes/acp/info/acp_foobar.php26
-rw-r--r--tests/extension/manager_test.php126
-rw-r--r--tests/extension/metadata_manager_test.php439
-rw-r--r--tests/extension/modules_test.php232
-rw-r--r--tests/extension/phpbb/default/implementation.php5
-rw-r--r--tests/filesystem/clean_path_test.php (renamed from tests/functions/clean_path_test.php)20
-rw-r--r--tests/functional/acp_groups_test.php99
-rw-r--r--tests/functional/acp_permissions_test.php123
-rw-r--r--tests/functional/auth_test.php11
-rw-r--r--tests/functional/avatar_acp_groups_test.php81
-rw-r--r--tests/functional/avatar_acp_users_test.php61
-rw-r--r--tests/functional/avatar_ucp_groups_test.php71
-rw-r--r--tests/functional/avatar_ucp_users_test.php78
-rw-r--r--tests/functional/browse_test.php7
-rw-r--r--tests/functional/common_avatar_test.php80
-rw-r--r--tests/functional/common_groups_test.php46
-rw-r--r--tests/functional/download_test.php345
-rw-r--r--tests/functional/extension_acp_test.php227
-rw-r--r--tests/functional/extension_controller_test.php163
-rw-r--r--tests/functional/extension_global_lang_test.php64
-rw-r--r--tests/functional/extension_module_test.php132
-rw-r--r--tests/functional/extension_permission_lang_test.php82
-rw-r--r--tests/functional/fileupload_form_test.php100
-rw-r--r--tests/functional/fileupload_remote_test.php73
-rw-r--r--tests/functional/fixtures/ext/foo/bar/acp/main_info.php34
-rw-r--r--tests/functional/fixtures/ext/foo/bar/acp/main_module.php30
-rw-r--r--tests/functional/fixtures/ext/foo/bar/adm/style/foobar.html3
-rw-r--r--tests/functional/fixtures/ext/foo/bar/composer.json22
-rw-r--r--tests/functional/fixtures/ext/foo/bar/config/routing.yml35
-rw-r--r--tests/functional/fixtures/ext/foo/bar/config/services.yml20
-rw-r--r--tests/functional/fixtures/ext/foo/bar/controller/controller.php109
-rw-r--r--tests/functional/fixtures/ext/foo/bar/event/permission.php33
-rw-r--r--tests/functional/fixtures/ext/foo/bar/event/user_setup.php36
-rw-r--r--tests/functional/fixtures/ext/foo/bar/ext.php8
-rw-r--r--tests/functional/fixtures/ext/foo/bar/language/en/foo_global.php5
-rw-r--r--tests/functional/fixtures/ext/foo/bar/language/en/permissions_foo.php5
-rw-r--r--tests/functional/fixtures/ext/foo/bar/styles/prosilver/template/foo_bar_body.html3
-rw-r--r--tests/functional/fixtures/ext/foo/bar/styles/prosilver/template/foobar.html3
-rw-r--r--tests/functional/fixtures/ext/foo/bar/styles/prosilver/template/redirect_body.html8
-rw-r--r--tests/functional/fixtures/ext/foo/bar/ucp/main_info.php26
-rw-r--r--tests/functional/fixtures/ext/foo/bar/ucp/main_module.php22
-rw-r--r--tests/functional/fixtures/files/empty.png0
-rw-r--r--tests/functional/fixtures/files/illegal-extension.bifbin0 -> 519 bytes
-rw-r--r--tests/functional/fixtures/files/too-large.pngbin0 -> 284717 bytes
-rw-r--r--tests/functional/fixtures/files/valid.jpgbin0 -> 554 bytes
-rw-r--r--tests/functional/forgot_password_test.php57
-rw-r--r--tests/functional/forum_password_test.php55
-rw-r--r--tests/functional/group_create_test.php31
-rw-r--r--tests/functional/memberlist_test.php105
-rw-r--r--tests/functional/metadata_manager_test.php83
-rw-r--r--tests/functional/notification_test.php88
-rw-r--r--tests/functional/paging_test.php39
-rw-r--r--tests/functional/plupload_test.php149
-rw-r--r--tests/functional/posting_test.php4
-rw-r--r--tests/functional/registration_test.php52
-rw-r--r--tests/functional/search/base.php100
-rw-r--r--tests/functional/search/mysql_test.php19
-rw-r--r--tests/functional/search/native_test.php18
-rw-r--r--tests/functional/search/postgres_test.php19
-rw-r--r--tests/functional/search/sphinx_test.php23
-rw-r--r--tests/functional/softdelete_test.php761
-rw-r--r--tests/functional/ucp_groups_test.php32
-rw-r--r--tests/functional/ucp_pm_test.php48
-rw-r--r--tests/functional/user_password_reset_test.php122
-rw-r--r--tests/functions/build_hidden_fields_for_query_params_test.php71
-rw-r--r--tests/functions/convert_30_dbms_to_31_test.php40
-rw-r--r--tests/functions/fixtures/obtain_online.xml22
-rw-r--r--tests/functions/fixtures/style_select.xml4
-rw-r--r--tests/functions/fixtures/validate_email.xml4
-rw-r--r--tests/functions/fixtures/validate_username.xml6
-rw-r--r--tests/functions/generate_string_list.php60
-rw-r--r--tests/functions/is_absolute_test.php2
-rw-r--r--tests/functions/obtain_online_test.php39
-rw-r--r--tests/functions/quoteattr_test.php44
-rw-r--r--tests/functions/validate_password_test.php1
-rw-r--r--tests/functions_acp/build_cfg_template_test.php287
-rw-r--r--tests/functions_acp/build_select_test.php61
-rw-r--r--tests/functions_acp/h_radio_test.php126
-rw-r--r--tests/functions_acp/validate_config_vars_test.php161
-rw-r--r--tests/functions_acp/validate_range_test.php164
-rw-r--r--tests/functions_install/ignore_new_file_on_update_test.php41
-rw-r--r--tests/functions_user/fixtures/group_user_attributes.xml113
-rw-r--r--tests/functions_user/group_user_attributes_test.php158
-rw-r--r--tests/groupposition/fixtures/legend.xml23
-rw-r--r--tests/groupposition/fixtures/teampage.xml102
-rw-r--r--tests/groupposition/legend_test.php403
-rw-r--r--tests/groupposition/teampage_test.php641
-rw-r--r--tests/lock/db_test.php97
-rw-r--r--tests/lock/fixtures/config.xml13
-rw-r--r--tests/lock/flock_test.php120
-rw-r--r--tests/log/add_test.php88
-rw-r--r--tests/log/fixtures/empty_log.xml15
-rw-r--r--tests/log/fixtures/full_log.xml160
-rw-r--r--tests/log/function_add_log_test.php193
-rw-r--r--tests/log/function_view_log_test.php343
-rw-r--r--tests/migrator/get_schema_steps_test.php200
-rw-r--r--tests/mimetype/fixtures/jpgbin0 -> 519 bytes
-rw-r--r--tests/mimetype/guesser_test.php166
-rw-r--r--tests/mimetype/incorrect_guesser.php18
-rw-r--r--tests/mimetype/null_guesser.php30
-rw-r--r--tests/mock/auth_provider.php23
-rw-r--r--tests/mock/cache.php105
-rw-r--r--tests/mock/container_builder.php179
-rw-r--r--tests/mock/event_dispatcher.php16
-rw-r--r--tests/mock/extension_manager.php19
-rw-r--r--tests/mock/filespec.php32
-rw-r--r--tests/mock/filesystem_extension_manager.php32
-rw-r--r--tests/mock/fileupload.php23
-rw-r--r--tests/mock/lang.php38
-rw-r--r--tests/mock/metadata_manager.php21
-rw-r--r--tests/mock/notification_manager.php94
-rw-r--r--tests/mock/notification_type_post.php36
-rw-r--r--tests/mock/notifications_auth.php40
-rw-r--r--tests/mock/null_cache.php5
-rw-r--r--tests/mock/request.php94
-rw-r--r--tests/mock/search.php23
-rw-r--r--tests/mock/session_testable.php7
-rw-r--r--tests/mock/sql_insert_buffer.php21
-rw-r--r--tests/network/inet_ntop_pton_test.php54
-rw-r--r--tests/network/ip_normalise_test.php64
-rw-r--r--tests/notification/base.php132
-rw-r--r--tests/notification/convert_test.php108
-rw-r--r--tests/notification/ext/test/notification/type/test.php87
-rw-r--r--tests/notification/fixtures/convert.xml66
-rw-r--r--tests/notification/fixtures/group_request.xml24
-rw-r--r--tests/notification/fixtures/notification.xml13
-rw-r--r--tests/notification/fixtures/submit_post_bookmark.xml161
-rw-r--r--tests/notification/fixtures/submit_post_post.xml205
-rw-r--r--tests/notification/fixtures/submit_post_post_in_queue.xml159
-rw-r--r--tests/notification/fixtures/submit_post_quote.xml133
-rw-r--r--tests/notification/fixtures/user_list_trim.xml51
-rw-r--r--tests/notification/group_request_test.php109
-rw-r--r--tests/notification/manager_helper.php67
-rw-r--r--tests/notification/notification_test.php305
-rw-r--r--tests/notification/submit_post_base.php149
-rw-r--r--tests/notification/submit_post_type_bookmark_test.php90
-rw-r--r--tests/notification/submit_post_type_post_in_queue_test.php107
-rw-r--r--tests/notification/submit_post_type_post_test.php96
-rw-r--r--tests/notification/submit_post_type_quote_test.php113
-rw-r--r--tests/notification/user_list_trim_test.php139
-rw-r--r--tests/pagination/config/routing.yml6
-rw-r--r--tests/pagination/pagination_test.php280
-rw-r--r--tests/pagination/templates/pagination.html15
-rw-r--r--tests/passwords/drivers_test.php81
-rw-r--r--tests/passwords/manager_test.php295
-rw-r--r--tests/path_helper/web_root_path_test.php172
-rw-r--r--tests/privmsgs/delete_user_pms_test.php5
-rw-r--r--tests/privmsgs/fixtures/delete_user_pms.xml10
-rw-r--r--tests/profile/custom_string_test.php116
-rw-r--r--tests/profile/custom_test.php44
-rw-r--r--tests/profile/fixtures/profile_fields.xml6
-rw-r--r--tests/profile/get_profile_value_test.php34
-rw-r--r--tests/regex/password_complexity_test.php1
-rw-r--r--tests/request/deactivated_super_global_test.php22
-rw-r--r--tests/request/request_test.php168
-rw-r--r--tests/request/request_var_test.php98
-rw-r--r--tests/request/type_cast_helper_test.php71
-rw-r--r--tests/search/common_test_case.php204
-rw-r--r--tests/search/fixtures/posts.xml43
-rw-r--r--tests/search/mysql_test.php40
-rw-r--r--tests/search/native_test.php207
-rw-r--r--tests/search/postgres_test.php40
-rw-r--r--tests/security/base.php54
-rw-r--r--tests/security/extract_current_page_test.php45
-rw-r--r--tests/security/hash_test.php27
-rw-r--r--tests/security/redirect_test.php78
-rw-r--r--tests/session/append_sid_test.php4
-rw-r--r--tests/session/check_ban_test.php78
-rw-r--r--tests/session/check_isvalid_test.php61
-rw-r--r--tests/session/continue_test.php121
-rw-r--r--tests/session/create_test.php43
-rw-r--r--tests/session/creation_test.php57
-rw-r--r--tests/session/extract_hostname_test.php51
-rw-r--r--tests/session/extract_page_test.php165
-rw-r--r--tests/session/fixtures/sessions_banlist.xml62
-rw-r--r--tests/session/fixtures/sessions_empty.xml8
-rw-r--r--tests/session/fixtures/sessions_full.xml11
-rw-r--r--tests/session/fixtures/sessions_garbage.xml54
-rw-r--r--tests/session/fixtures/sessions_key.xml40
-rw-r--r--tests/session/garbage_collection_test.php53
-rw-r--r--tests/session/session_key_test.php51
-rw-r--r--tests/session/testable_facade.php126
-rw-r--r--tests/session/testable_factory.php58
-rw-r--r--tests/session/unset_admin_test.php48
-rw-r--r--tests/session/validate_referrer_test.php70
-rw-r--r--tests/template/datasets/event_inheritance/ext/kappa/styles/all/template/event/test.html1
-rw-r--r--tests/template/datasets/event_inheritance/ext/kappa/styles/silver/template/event/test.html1
-rw-r--r--tests/template/datasets/event_inheritance/ext/kappa/styles/silver_inherit/template/event/test.html1
-rw-r--r--tests/template/datasets/event_inheritance/ext/omega/styles/all/template/event/test.html1
-rw-r--r--tests/template/datasets/event_inheritance/ext/omega/styles/silver/template/event/test.html1
-rw-r--r--tests/template/datasets/event_inheritance/ext/omega/styles/silver/template/event/two.html1
-rw-r--r--tests/template/datasets/event_inheritance/ext/zeta/styles/all/template/event/test.html1
-rw-r--r--tests/template/datasets/event_inheritance/styles/silver/template/event_test.html1
-rw-r--r--tests/template/datasets/event_inheritance/styles/silver/template/event_two.html1
-rw-r--r--tests/template/datasets/event_inheritance/styles/silver_inherit/template/event_test.html1
-rw-r--r--tests/template/datasets/ext_trivial/ext/trivial/styles/all/template/event/event_variable_spacing.html6
-rw-r--r--tests/template/datasets/ext_trivial/ext/trivial/styles/all/template/event/test_event_loop.html1
-rw-r--r--tests/template/datasets/ext_trivial/ext/trivial/styles/all/template/event/universal.html1
-rw-r--r--tests/template/datasets/ext_trivial/ext/trivial/styles/silver/template/event/simple.html1
-rw-r--r--tests/template/datasets/ext_trivial/styles/silver/template/event_loop.html3
-rw-r--r--tests/template/datasets/ext_trivial/styles/silver/template/event_simple.html1
-rw-r--r--tests/template/datasets/ext_trivial/styles/silver/template/event_universal.html1
-rw-r--r--tests/template/datasets/ext_trivial/styles/silver/template/variable_spacing.html1
-rw-r--r--tests/template/includephp_test.php56
-rw-r--r--tests/template/parent_templates/parent_and_child.html1
-rw-r--r--tests/template/parent_templates/parent_and_child.js1
-rw-r--r--tests/template/parent_templates/parent_only.css0
-rw-r--r--tests/template/parent_templates/parent_only.html1
-rw-r--r--tests/template/parent_templates/parent_only.js1
-rw-r--r--tests/template/subdir/includephp_from_subdir_test.php27
-rw-r--r--tests/template/template_events_test.php130
-rw-r--r--tests/template/template_includecss_test.php28
-rw-r--r--tests/template/template_includejs_test.php105
-rw-r--r--tests/template/template_inheritance_test.php55
-rw-r--r--tests/template/template_parser_test.php29
-rw-r--r--tests/template/template_test.php510
-rw-r--r--tests/template/template_test_case.php127
-rw-r--r--tests/template/template_test_case_with_tree.php35
-rw-r--r--tests/template/templates/basic.html3
-rw-r--r--tests/template/templates/child_only.css0
-rw-r--r--tests/template/templates/child_only.html1
-rw-r--r--tests/template/templates/child_only.js1
-rw-r--r--tests/template/templates/define.html33
-rw-r--r--tests/template/templates/define_advanced.html12
-rw-r--r--tests/template/templates/define_error.html2
-rw-r--r--tests/template/templates/define_include.html3
-rw-r--r--tests/template/templates/define_include2.html11
-rw-r--r--tests/template/templates/events.html4
-rw-r--r--tests/template/templates/expressions.html29
-rw-r--r--tests/template/templates/if.html20
-rw-r--r--tests/template/templates/include_define_variable.html6
-rw-r--r--tests/template/templates/include_loop.html4
-rw-r--r--tests/template/templates/include_loop1.html1
-rw-r--r--tests/template/templates/include_loop2.html1
-rw-r--r--tests/template/templates/include_loop3.html1
-rw-r--r--tests/template/templates/include_loop_define.html6
-rw-r--r--tests/template/templates/include_variable.html1
-rw-r--r--tests/template/templates/include_variables.html1
-rw-r--r--tests/template/templates/includecss.html3
-rw-r--r--tests/template/templates/includejs.html36
-rw-r--r--tests/template/templates/includephp_relative.html (renamed from tests/template/templates/includephp.html)1
-rw-r--r--tests/template/templates/includephp_variables.html2
-rw-r--r--tests/template/templates/invalid/endif_without_if.html1
-rw-r--r--tests/template/templates/invalid/output/endif_without_if.html1
-rw-r--r--tests/template/templates/invalid/output/include_nonexistent_file.html1
-rw-r--r--tests/template/templates/invalid/output/unknown_tag.html1
-rw-r--r--tests/template/templates/lang.html2
-rw-r--r--tests/template/templates/loop.html14
-rw-r--r--tests/template/templates/loop_advanced.html20
-rw-r--r--tests/template/templates/loop_expressions.html11
-rw-r--r--tests/template/templates/loop_include.html4
-rw-r--r--tests/template/templates/loop_include1.html1
-rw-r--r--tests/template/templates/loop_nested.html10
-rw-r--r--tests/template/templates/loop_nested2.html6
-rw-r--r--tests/template/templates/loop_nested_deep_multilevel_ref.html13
-rw-r--r--tests/template/templates/loop_nested_multilevel_ref.html10
-rw-r--r--tests/template/templates/loop_reuse.html6
-rw-r--r--tests/template/templates/loop_size.html39
-rw-r--r--tests/template/templates/loop_underscore.html21
-rw-r--r--tests/template/templates/loop_vars.html26
-rw-r--r--tests/template/templates/parent_and_child.html1
-rw-r--r--tests/template/templates/parent_and_child.js1
-rw-r--r--tests/template/templates/subdir/parent_only.js0
-rw-r--r--tests/template/templates/subdir/subsubdir/parent_only.js0
-rw-r--r--tests/template/templates/subdir/variable.html1
-rw-r--r--tests/template/templates/trivial.html1
-rw-r--r--tests/template/templates/twig.html6
-rw-r--r--tests/template/templates/twig_parent.html7
-rw-r--r--tests/template/templates/variable_spacing.html6
-rw-r--r--tests/test_framework/phpbb_database_test_case.php24
-rw-r--r--tests/test_framework/phpbb_database_test_connection_manager.php100
-rw-r--r--tests/test_framework/phpbb_functional_test_case.php551
-rw-r--r--tests/test_framework/phpbb_search_test_case.php29
-rw-r--r--tests/test_framework/phpbb_session_test_case.php49
-rw-r--r--tests/test_framework/phpbb_test_case_helpers.php185
-rw-r--r--tests/text_processing/censor_text_test.php6
-rw-r--r--tests/text_processing/generate_text_for_display_test.php4
-rw-r--r--tests/text_processing/make_clickable_test.php2
-rw-r--r--tests/tree/fixtures/phpbb_forums.xml13
-rw-r--r--tests/tree/nestedset_forum_base.php115
-rw-r--r--tests/tree/nestedset_forum_get_data_test.php135
-rw-r--r--tests/tree/nestedset_forum_insert_delete_test.php120
-rw-r--r--tests/tree/nestedset_forum_move_test.php569
-rw-r--r--tests/tree/nestedset_forum_regenerate_test.php72
-rw-r--r--tests/tree/nestedset_forum_test.php116
-rw-r--r--tests/upload/filespec_test.php274
-rw-r--r--tests/upload/fileupload_test.php120
-rw-r--r--tests/upload/fixture/copies/.gitkeep0
-rw-r--r--tests/upload/fixture/gifbin0 -> 35 bytes
-rw-r--r--tests/upload/fixture/jpgbin0 -> 519 bytes
-rw-r--r--tests/upload/fixture/pngbin0 -> 69 bytes
-rw-r--r--tests/upload/fixture/tifbin0 -> 256 bytes
-rw-r--r--tests/upload/fixture/txt2
-rw-r--r--tests/user/fixtures/user_loader.xml31
-rw-r--r--tests/user/lang_test.php63
-rw-r--r--tests/user/user_loader_test.php63
-rw-r--r--tests/utf/utf8_clean_string_test.php2
-rw-r--r--tests/version/version_fetch_test.php58
-rw-r--r--tests/version/version_test.php318
-rw-r--r--tests/wrapper/phpbb_php_ini_fake.php16
-rw-r--r--tests/wrapper/phpbb_php_ini_test.php86
-rw-r--r--travis/phpunit-mysql-travis.xml3
-rw-r--r--travis/phpunit-postgres-travis.xml3
-rwxr-xr-xtravis/setup-php-extensions.sh57
1729 files changed, 115604 insertions, 47694 deletions
diff --git a/.gitignore b/.gitignore
index c757210654..06b13923f5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,6 @@
*~
/phpunit.xml
+/phpBB/cache/twig/*
/phpBB/cache/*.html
/phpBB/cache/*.php
/phpBB/cache/*.lock
diff --git a/.travis.yml b/.travis.yml
index 5e70ef97ec..88c902cd4d 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,6 +1,5 @@
language: php
php:
- - 5.2
- 5.3.3
- 5.3
- 5.4
@@ -11,20 +10,28 @@ php:
env:
- DB=mysql
+services:
+ - redis-server
+
+install:
+ - sh -c "if [ '$DB' = 'mariadb' ]; then travis/setup-mariadb.sh; fi"
+ - sh -c "if [ '$TRAVIS_PHP_VERSION' != 'hhvm' ]; then travis/setup-php-extensions.sh; fi"
+ - sh -c "if [ `php -r "echo (int) version_compare(PHP_VERSION, '5.3.19', '>=');"` = "1" ]; then travis/setup-webserver.sh; fi"
+ - cd phpBB
+ - php ../composer.phar install --dev --no-interaction --prefer-source
+ - cd ..
+
before_script:
- sh -c "if [ '$DB' = 'postgres' ]; then psql -c 'DROP DATABASE IF EXISTS phpbb_tests;' -U postgres; fi"
- sh -c "if [ '$DB' = 'postgres' ]; then psql -c 'create database phpbb_tests;' -U postgres; fi"
- - sh -c "if [ '$DB' = 'mariadb' ]; then travis/setup-mariadb.sh; fi"
- sh -c "if [ '$TRAVIS_PHP_VERSION' = '5.3' -a '$DB' = 'mysql' ]; then mysql -e 'SET GLOBAL storage_engine=MyISAM;'; fi"
- sh -c "if [ '$DB' = 'mysql' -o '$DB' = 'mariadb' ]; then mysql -e 'create database IF NOT EXISTS phpbb_tests;'; fi"
- - sh -c "if [ '$TRAVIS_PHP_VERSION' = '5.2' ]; then pear install --force phpunit/DbUnit; phpenv rehash; fi"
- - cd phpBB
- - sh -c "if [ '$TRAVIS_PHP_VERSION' != '5.2' ]; then php ../composer.phar install --dev --no-interaction --prefer-source; fi"
- - cd ..
- - sh -c "if [ `php -r "echo (int) version_compare(PHP_VERSION, '5.3.19', '>=');"` = "1" ]; then travis/setup-webserver.sh; fi"
script:
- - sh -c "if [ '$TRAVIS_PHP_VERSION' = '5.2' ]; then phpunit --configuration travis/phpunit-$DB-travis.xml; else phpBB/vendor/bin/phpunit --configuration travis/phpunit-$DB-travis.xml; fi"
+ - cd build
+ - sh -c "if [ '$TRAVIS_PHP_VERSION' = '5.5' -a '$DB' = 'mysql' ]; then ../phpBB/vendor/bin/phing sniff; fi"
+ - cd ..
+ - phpBB/vendor/bin/phpunit --configuration travis/phpunit-$DB-travis.xml
- sh -c "if [ '$TRAVIS_PHP_VERSION' = '5.5' -a '$DB' = 'mysql' -a '$TRAVIS_PULL_REQUEST' != 'false' ]; then git-tools/commit-msg-hook-range.sh origin/$TRAVIS_BRANCH..FETCH_HEAD; fi"
matrix:
diff --git a/README.md b/README.md
index 37a42fa57f..e6fb17f95f 100644
--- a/README.md
+++ b/README.md
@@ -8,6 +8,14 @@ phpBB is a free bulletin board written in PHP.
Find support and lots more on [phpBB.com](http://www.phpbb.com)! Discuss the development on [area51](http://area51.phpbb.com/phpBB/index.php).
+## INSTALLING DEPENDENCIES
+
+To be able to run an installation from the repo (and not from a pre-built package) you need to run the following commands to install phpBB's dependencies.
+
+ cd phpBB
+ php ../composer.phar install --dev
+
+
## CONTRIBUTE
1. [Create an account on phpBB.com](http://www.phpbb.com/community/ucp.php?mode=register)
diff --git a/build/build.xml b/build/build.xml
index a86cb9c36b..10ff242ab9 100644
--- a/build/build.xml
+++ b/build/build.xml
@@ -2,9 +2,9 @@
<project name="phpBB" description="The phpBB forum software" default="all" basedir="../">
<!-- a few settings for the build -->
- <property name="newversion" value="3.0.13-dev" />
- <property name="prevversion" value="3.0.12" />
- <property name="olderversions" value="3.0.2, 3.0.3, 3.0.4, 3.0.5, 3.0.6, 3.0.7, 3.0.7-PL1, 3.0.8, 3.0.9, 3.0.10, 3.0.11" />
+ <property name="newversion" value="3.1.0-b2-dev" />
+ <property name="prevversion" value="3.1.0-b1" />
+ <property name="olderversions" value="3.0.12, 3.1.0-a1, 3.1.0-a2, 3.1.0-a3" />
<!-- no configuration should be needed beyond this point -->
<property name="oldversions" value="${olderversions}, ${prevversion}" />
@@ -74,6 +74,40 @@
passthru="true" />
</target>
+ <target name="sniff">
+ <exec command="phpBB/vendor/bin/phpcs
+ -s
+ --extensions=php
+ --standard=build/code_sniffer/ruleset-php-strict.xml
+ --ignore=phpBB/phpbb/db/migration/data/v30x/*
+ phpBB/phpbb"
+ dir="." returnProperty="retval-php-strict" passthru="true" />
+ <exec command="phpBB/vendor/bin/phpcs
+ -s
+ --extensions=php
+ --standard=build/code_sniffer/ruleset-php-legacy.xml
+ --ignore=phpBB/cache/*
+ --ignore=phpBB/develop/*
+ --ignore=phpBB/includes/diff/*.php
+ --ignore=phpBB/includes/sphinxapi.php
+ --ignore=phpBB/includes/utf/data/*
+ --ignore=phpBB/install/data/*
+ --ignore=phpBB/install/database_update.php
+ --ignore=phpBB/phpbb/*
+ --ignore=phpBB/vendor/*
+ phpBB"
+ dir="." returnProperty="retval-php-legacy" passthru="true" />
+ <if>
+ <or>
+ <not><equals arg1="${retval-php-strict}" arg2="0" /></not>
+ <not><equals arg1="${retval-php-legacy}" arg2="0" /></not>
+ </or>
+ <then>
+ <fail message="PHP Code Sniffer failed." />
+ </then>
+ </if>
+ </target>
+
<target name="docs">
<!-- only works if you setup phpdoctor:
git clone https://github.com/peej/phpdoctor.git
diff --git a/build/build_announcement.php b/build/build_announcement.php
index 3ee96fc67d..a1a496fd68 100755
--- a/build/build_announcement.php
+++ b/build/build_announcement.php
@@ -22,16 +22,20 @@ $checksum_algorithm = $_SERVER['argv'][4];
$series_version = substr($version, 0, 3);
$base_url = "https://download.phpbb.com/pub/release/$series_version";
-if (strpos($version, 'RC') === false)
+if (version_compare($version, "$series_version.0", '<'))
{
- // Final release
- $install_url = "$base_url/$version";
- $update_url = "$base_url/update/to_$version";
+ // Everything before 3.x.0, i.e. unstable (e.g. alpha, beta, rc)
+ $url = "$base_url/unstable/$version";
+}
+else if (strpos($version, 'RC') !== false)
+{
+ // Release candidate of stable release
+ $url = "$base_url/qa/$version";
}
else
{
- $install_url = "$base_url/release_candidates/$version";
- $update_url = "$base_url/release_candidates/update/other_to_$version";
+ // Stable release (e.g. 3.x.0, 3.x.1, 3.x.2, 3.x.3-PL1)
+ $url = "$base_url/$version";
}
if ($mode === 'bbcode')
@@ -58,41 +62,19 @@ function phpbb_string_ends_with($haystack, $needle)
return substr($haystack, -strlen($needle)) === $needle;
}
-function phpbb_is_update_file($filename)
-{
- return strpos($filename, '_to_') !== false;
-}
-
function phpbb_get_checksum($checksum_file)
{
return array_shift(explode(' ', file_get_contents($checksum_file)));
}
-$install_files = $update_files = array();
foreach (phpbb_rnatsort(array_diff(scandir($root), array('.', '..'))) as $filename)
{
if (phpbb_string_ends_with($filename, $checksum_algorithm))
{
continue;
}
- else if (phpbb_is_update_file($filename))
- {
- $update_files[] = $filename;
- }
else
{
- $install_files[] = $filename;
+ printf($template, $url, $filename, phpbb_get_checksum("$root/$filename.$checksum_algorithm"));
}
}
-
-foreach ($install_files as $filename)
-{
- printf($template, $install_url, $filename, phpbb_get_checksum("$root/$filename.$checksum_algorithm"));
-}
-
-echo "\n";
-
-foreach ($update_files as $filename)
-{
- printf($template, $update_url, $filename, phpbb_get_checksum("$root/$filename.$checksum_algorithm"));
-}
diff --git a/build/code_sniffer/phpbb/Sniffs/Commenting/FileCommentSniff.php b/build/code_sniffer/phpbb/Sniffs/Commenting/FileCommentSniff.php
new file mode 100644
index 0000000000..68e9e6bb86
--- /dev/null
+++ b/build/code_sniffer/phpbb/Sniffs/Commenting/FileCommentSniff.php
@@ -0,0 +1,210 @@
+<?php
+/**
+*
+* @package code_sniffer
+* @version $Id: $
+* @copyright (c) 2007 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+/**
+* Checks that each source file contains the standard header.
+*
+* Based on Coding Guidelines 1.ii File Header.
+*
+* @package code_sniffer
+* @author Manuel Pichler <mapi@phpundercontrol.org>
+*/
+class phpbb_Sniffs_Commenting_FileCommentSniff implements PHP_CodeSniffer_Sniff
+{
+ /**
+ * Returns an array of tokens this test wants to listen for.
+ *
+ * @return array
+ */
+ public function register()
+ {
+ return array(T_OPEN_TAG);
+ }
+
+ /**
+ * Processes this test, when one of its tokens is encountered.
+ *
+ * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
+ * @param int $stackPtr The position of the current token
+ * in the stack passed in $tokens.
+ *
+ * @return null
+ */
+ public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
+ {
+ // We are only interested in the first file comment.
+ if ($stackPtr !== 0)
+ {
+ if ($phpcsFile->findPrevious(T_OPEN_TAG, $stackPtr - 1) !== false)
+ {
+ return;
+ }
+ }
+
+ // Fetch next non whitespace token
+ $tokens = $phpcsFile->getTokens();
+ $start = $phpcsFile->findNext(T_WHITESPACE, $stackPtr + 1, null, true);
+
+ // Skip empty files
+ if ($tokens[$start]['code'] === T_CLOSE_TAG)
+ {
+ return;
+ }
+ // Mark as error if this is not a doc comment
+ else if ($start === false || $tokens[$start]['code'] !== T_DOC_COMMENT)
+ {
+ $phpcsFile->addError('Missing required file doc comment.', $stackPtr);
+ return;
+ }
+
+ // Find comment end token
+ $end = $phpcsFile->findNext(T_DOC_COMMENT, $start + 1, null, true) - 1;
+
+ // If there is no end, skip processing here
+ if ($end === false)
+ {
+ return;
+ }
+
+ // List of found comment tags
+ $tags = array();
+
+ // check comment lines without the first(/**) an last(*/) line
+ for ($i = $start + 1, $c = ($end - $start); $i <= $c; ++$i)
+ {
+ $line = $tokens[$i]['content'];
+
+ // Check that each line starts with a '*'
+ if (substr($line, 0, 1) !== '*')
+ {
+ $message = 'The file doc comment should not be idented.';
+ $phpcsFile->addWarning($message, $i);
+ }
+ else if (preg_match('/^\*\s+@([\w]+)\s+(.*)$/', $line, $match) !== 0)
+ {
+ $tags[$match[1]] = array($match[2], $i);
+ }
+ }
+
+ // Check that the first and last line is empty
+ if (trim($tokens[$start + 1]['content']) !== '*')
+ {
+ $message = 'The first file comment line should be empty.';
+ $phpcsFile->addWarning($message, ($start + 1));
+ }
+ if (trim($tokens[$end - $start]['content']) !== '*')
+ {
+ $message = 'The last file comment line should be empty.';
+ $phpcsFile->addWarning($message, ($end - $start));
+ }
+
+ $this->processPackage($phpcsFile, $start, $tags);
+ $this->processVersion($phpcsFile, $start, $tags);
+ $this->processCopyright($phpcsFile, $start, $tags);
+ $this->processLicense($phpcsFile, $start, $tags);
+
+ //print_r($tags);
+ }
+
+ /**
+ * Checks that the tags array contains a valid package tag
+ *
+ * @param PHP_CodeSniffer_File $phpcsFile The context source file instance.
+ * @param integer The stack pointer for the first comment token.
+ * @param array(string=>array) $tags The found file doc comment tags.
+ *
+ * @return null
+ */
+ protected function processPackage(PHP_CodeSniffer_File $phpcsFile, $ptr, $tags)
+ {
+ if (!isset($tags['package']))
+ {
+ $message = 'Missing require @package tag in file doc comment.';
+ $phpcsFile->addError($message, $ptr);
+ }
+ else if (preg_match('/^([\w]+)$/', $tags['package'][0]) === 0)
+ {
+ $message = 'Invalid content found for @package tag.';
+ $phpcsFile->addWarning($message, $tags['package'][1]);
+ }
+ }
+
+ /**
+ * Checks that the tags array contains a valid version tag
+ *
+ * @param PHP_CodeSniffer_File $phpcsFile The context source file instance.
+ * @param integer The stack pointer for the first comment token.
+ * @param array(string=>array) $tags The found file doc comment tags.
+ *
+ * @return null
+ */
+ protected function processVersion(PHP_CodeSniffer_File $phpcsFile, $ptr, $tags)
+ {
+ if (!isset($tags['version']))
+ {
+ $message = 'Missing require @version tag in file doc comment.';
+ $phpcsFile->addError($message, $ptr);
+ }
+ else if (preg_match('/^\$Id:[^\$]+\$$/', $tags['version'][0]) === 0)
+ {
+ $message = 'Invalid content found for @version tag, use "$Id: $".';
+ $phpcsFile->addError($message, $tags['version'][1]);
+ }
+ }
+
+ /**
+ * Checks that the tags array contains a valid copyright tag
+ *
+ * @param PHP_CodeSniffer_File $phpcsFile The context source file instance.
+ * @param integer The stack pointer for the first comment token.
+ * @param array(string=>array) $tags The found file doc comment tags.
+ *
+ * @return null
+ */
+ protected function processCopyright(PHP_CodeSniffer_File $phpcsFile, $ptr, $tags)
+ {
+ if (!isset($tags['copyright']))
+ {
+ $message = 'Missing require @copyright tag in file doc comment.';
+ $phpcsFile->addError($message, $ptr);
+ }
+ else if (preg_match('/^\(c\) 2[0-9]{3} phpBB Group\s*$/', $tags['copyright'][0]) === 0)
+ {
+ $message = 'Invalid content found for @copyright tag, use "(c) <year> phpBB Group".';
+ $phpcsFile->addError($message, $tags['copyright'][1]);
+ }
+ }
+
+ /**
+ * Checks that the tags array contains a valid license tag
+ *
+ * @param PHP_CodeSniffer_File $phpcsFile The context source file instance.
+ * @param integer The stack pointer for the first comment token.
+ * @param array(string=>array) $tags The found file doc comment tags.
+ *
+ * @return null
+ */
+ protected function processLicense(PHP_CodeSniffer_File $phpcsFile, $ptr, $tags)
+ {
+ $license = 'http://opensource.org/licenses/gpl-license.php GNU Public License';
+
+ if (!isset($tags['license']))
+ {
+ $message = 'Missing require @license tag in file doc comment.';
+ $phpcsFile->addError($message, $ptr);
+ }
+ else if (trim($tags['license'][0]) !== $license)
+ {
+ $message = 'Invalid content found for @license tag, use '
+ . '"' . $license . '".';
+ $phpcsFile->addError($message, $tags['license'][1]);
+ }
+ }
+}
diff --git a/build/code_sniffer/phpbb/Tests/Commenting/FileCommentUnitTest.inc b/build/code_sniffer/phpbb/Tests/Commenting/FileCommentUnitTest.inc
new file mode 100644
index 0000000000..0ace1c1bda
--- /dev/null
+++ b/build/code_sniffer/phpbb/Tests/Commenting/FileCommentUnitTest.inc
@@ -0,0 +1,19 @@
+<?php
+/**
+*
+* @package code_sniffer³
+* @version $Id: $
+* @copyright (c) 2008 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php BSD License
+ *
+*/
+?>
+<?php
+/**
+* Broken but not first file doc comment.
+*
+* @version @package_version@
+* @license http://www.opensource.org/licenses/bsd-license.php BSD License
+* @copyright (c) 2007 phpBB Group
+*
+*/
diff --git a/build/code_sniffer/phpbb/Tests/Commenting/FileCommentUnitTest.php b/build/code_sniffer/phpbb/Tests/Commenting/FileCommentUnitTest.php
new file mode 100644
index 0000000000..affa27b56c
--- /dev/null
+++ b/build/code_sniffer/phpbb/Tests/Commenting/FileCommentUnitTest.php
@@ -0,0 +1,51 @@
+<?php
+/**
+*
+* @package code_sniffer
+* @version $Id: $
+* @copyright (c) 2007 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+/**
+* Unit test class for the EmptyStatement sniff.
+*
+* @package code_sniffer
+* @author Manuel Pichler <mapi@phpundercontrol.org>
+*/
+class phpbb_Tests_Commenting_FileCommentUnitTest extends AbstractSniffUnitTest
+{
+
+ /**
+ * Returns the lines where errors should occur.
+ *
+ * The key of the array should represent the line number and the value
+ * should represent the number of errors that should occur on that line.
+ *
+ * @return array(int => int)
+ */
+ public function getErrorList()
+ {
+ return array(
+ 7 => 1 // BSD License error :)
+ );
+ }//end getErrorList()
+
+
+ /**
+ * Returns the lines where warnings should occur.
+ *
+ * The key of the array should represent the line number and the value
+ * should represent the number of warnings that should occur on that line.
+ *
+ * @return array(int => int)
+ */
+ public function getWarningList()
+ {
+ return array(
+ 4 => 1,
+ 8 => 1
+ );
+ }//end getWarningList()
+}
diff --git a/build/code_sniffer/phpbb/build.xml b/build/code_sniffer/phpbb/build.xml
new file mode 100644
index 0000000000..b6d3bf6451
--- /dev/null
+++ b/build/code_sniffer/phpbb/build.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="code_sniffer" basedir="." default="install">
+
+ <property name="working.dir" value="${basedir}" />
+ <property name="target.dir" value="/usr/share/php/PHP/CodeSniffer/Standards" />
+
+ <!--
+ Install phpbb sniff
+ -->
+ <target name="install">
+ <delete dir="${target.dir}/phpbb" />
+ <mkdir dir="${target.dir}/phpbb"/>
+
+ <copy todir="${target.dir}/phpbb">
+ <fileset file="${working.dir}/phpbbCodingStandard.php" />
+ </copy>
+ <copy todir="${target.dir}/phpbb/Sniffs">
+ <fileset dir="${working.dir}/Sniffs" />
+ </copy>
+
+ </target>
+
+</project>
diff --git a/build/code_sniffer/phpbb/phpbbCodingStandard.php b/build/code_sniffer/phpbb/phpbbCodingStandard.php
new file mode 100644
index 0000000000..adbba9d915
--- /dev/null
+++ b/build/code_sniffer/phpbb/phpbbCodingStandard.php
@@ -0,0 +1,43 @@
+<?php
+/**
+*
+* @package code_sniffer
+* @version $Id: $
+* @copyright (c) 2007 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+/**
+ * @ignore
+ */
+if (class_exists('PHP_CodeSniffer_Standards_CodingStandard', true) === false) {
+ throw new PHP_CodeSniffer_Exception(
+ 'Class PHP_CodeSniffer_Standards_CodingStandard not found'
+ );
+}
+
+/**
+ * Primary class for the phpbb coding standard.
+ *
+ * @package code_sniffer
+ */
+class PHP_CodeSniffer_Standards_phpbb_phpbbCodingStandard extends PHP_CodeSniffer_Standards_CodingStandard
+{
+ /**
+ * Return a list of external sniffs to include with this standard.
+ *
+ * External locations can be single sniffs, a whole directory of sniffs, or
+ * an entire coding standard. Locations start with the standard name. For
+ * example:
+ * PEAR => include all sniffs in this standard
+ * PEAR/Sniffs/Files => include all sniffs in this dir
+ * PEAR/Sniffs/Files/LineLengthSniff => include this single sniff
+ *
+ * @return array
+ */
+ public function getIncludedSniffs()
+ {
+ return array();
+ }
+}
diff --git a/build/code_sniffer/ruleset-minimum.xml b/build/code_sniffer/ruleset-minimum.xml
new file mode 100644
index 0000000000..33d0177390
--- /dev/null
+++ b/build/code_sniffer/ruleset-minimum.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0"?>
+<ruleset name="phpBB Minimum Standard">
+
+ <description>phpBB minimum coding standard</description>
+
+ <!-- All code files MUST use only UTF-8 without BOM. -->
+ <rule ref="Generic.Files.ByteOrderMark" />
+
+ <!-- All code files MUST use the Unix LF (linefeed) line ending. -->
+ <rule ref="Generic.Files.LineEndings" />
+
+ <!-- Tabs MUST be used for indentation -->
+ <rule ref="Generic.WhiteSpace.DisallowSpaceIndent" />
+
+</ruleset>
diff --git a/build/code_sniffer/ruleset-php-legacy.xml b/build/code_sniffer/ruleset-php-legacy.xml
new file mode 100644
index 0000000000..550c919b5d
--- /dev/null
+++ b/build/code_sniffer/ruleset-php-legacy.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0"?>
+<ruleset name="phpBB PHP Legacy Standard">
+
+ <description>phpBB legacy coding standard for PHP files</description>
+
+ <rule ref="./ruleset-minimum.xml" />
+
+ <!-- "for (; bar; )" should be "while (bar)" instead -->
+ <rule ref="Generic.CodeAnalysis.ForLoopShouldBeWhileLoop" />
+
+ <!-- A method MUST not only call its parent -->
+ <rule ref="Generic.CodeAnalysis.UselessOverridingMethod" />
+
+ <!-- The body of each structure MUST be enclosed by braces. -->
+ <rule ref="Generic.ControlStructures.InlineControlStructure" />
+
+ <!-- There MUST not be more than one statement per line. -->
+ <rule ref="Generic.Formatting.DisallowMultipleStatements" />
+
+ <!-- Call-time pass-by-reference MUST not be used. -->
+ <rule ref="Generic.Functions.CallTimePassByReference.NotAllowed" />
+
+ <!-- Class constants MUST be declared in all upper case with underscore separators. -->
+ <rule ref="Generic.NamingConventions.UpperCaseConstantName" />
+
+ <!-- Only <?php, no short tags. -->
+ <rule ref="Generic.PHP.DisallowShortOpenTag.EchoFound" />
+
+ <!-- Method arguments with default values MUST go at the end of the argument list. -->
+ <rule ref="PEAR.Functions.ValidDefaultValue" />
+
+ <!-- Each file MUST end with exactly one newline character -->
+ <rule ref="PSR2.Files.EndFileNewline" />
+
+ <!-- In the argument list, there MUST NOT be a space before each comma,
+ and there MUST be one space after each comma. -->
+ <rule ref="Squiz.Functions.FunctionDeclarationArgumentSpacing">
+ <properties>
+ <property name="equalsSpacing" value="1"/>
+ </properties>
+ </rule>
+ <rule ref="Squiz.Functions.FunctionDeclarationArgumentSpacing.SpacingAfterHint" />
+
+ <!-- The ?> closing tag MUST be omitted from files containing only PHP. -->
+ <rule ref="Zend.Files.ClosingTag" />
+
+</ruleset>
diff --git a/build/code_sniffer/ruleset-php-strict.xml b/build/code_sniffer/ruleset-php-strict.xml
new file mode 100644
index 0000000000..5e3c26a616
--- /dev/null
+++ b/build/code_sniffer/ruleset-php-strict.xml
@@ -0,0 +1,51 @@
+<?xml version="1.0"?>
+<ruleset name="phpBB PHP Strict Standard">
+
+ <description>phpBB coding standard for PHP files</description>
+
+ <rule ref="./ruleset-php-legacy.xml" />
+
+ <!-- There SHOULD NOT be more than 80 characters per line
+ There MUST NOT be more than 120 characters per line -->
+ <!--
+ <rule ref="Generic.Files.LineLength">
+ <properties>
+ <property name="lineLimit" value="80"/>
+ <property name="absoluteLineLimit" value="120"/>
+ </properties>
+ </rule>
+ -->
+
+ <!-- The PHP constants true, false, and null MUST be in lower case. -->
+ <rule ref="Generic.PHP.LowerCaseConstant" />
+
+ <!-- PHP keywords MUST be in lower case. -->
+ <rule ref="Generic.PHP.LowerCaseKeyword" />
+
+ <!-- There MUST NOT be trailing whitespace at the end of lines. -->
+ <rule ref="Squiz.WhiteSpace.SuperfluousWhitespace" />
+
+ <!-- There MUST NOT be whitespace before the first content of a file -->
+ <rule ref="Squiz.WhiteSpace.SuperfluousWhitespace.StartFile" />
+
+ <!-- There MUST NOT be whitespace after the last content of a file -->
+ <rule ref="Squiz.WhiteSpace.SuperfluousWhitespace.EndFile" />
+
+ <!-- Functions MUST NOT contain multiple empty lines in a row -->
+ <rule ref="Squiz.WhiteSpace.SuperfluousWhitespace.EmptyLines" />
+
+ <!-- Classes etc. MUST be namespaced -->
+ <rule ref="PSR1.Classes.ClassDeclaration.MissingNamespace" />
+
+ <!-- A file MUST not contain more than one class/interface -->
+ <rule ref="PSR1.Classes.ClassDeclaration.MultipleClasses" />
+
+ <!-- Files containing classes MUST not have any side-effects -->
+ <rule ref="PSR1.Files.SideEffects.FoundWithSymbols" />
+
+ <!-- When present, all use declarations MUST go after the namespace declaration.
+ There MUST be one use keyword per declaration.
+ There MUST be one blank line after the use block. -->
+ <rule ref="PSR2.Namespaces.UseDeclaration" />
+
+</ruleset>
diff --git a/build/package.php b/build/package.php
index 22ea4e52af..89f9d9a1ee 100755
--- a/build/package.php
+++ b/build/package.php
@@ -121,6 +121,7 @@ if (sizeof($package->old_packages))
$package->run_command('cp -Rp ' . $package->get('dest_dir') . '/docs ' . $dest_filename_dir);
$package->run_command('cp -Rp ' . $package->get('dest_dir') . '/install ' . $dest_filename_dir);
+ $package->run_command('cp -Rp ' . $package->get('dest_dir') . '/vendor ' . $dest_filename_dir);
$package->run_command('mkdir ' . $dest_filename_dir . '/install/update');
$package->run_command('mkdir ' . $dest_filename_dir . '/install/update/old');
@@ -173,6 +174,27 @@ if (sizeof($package->old_packages))
$package->run_command('cp ' . $source_filename . ' ' . $dest_filename);
}
+ /**
+ * We try to keep the update packages as small as possible while creating them.
+ * However, we sometimes need to include additional files that are not included
+ * in the diff in order to be able to correctly include the relatively
+ * referenced files from the same or subsequent directories.
+ */
+ $copy_relative_directories = array(
+ 'adm/style/admin.css' => array(
+ 'copied' => false,
+ 'copy' => array(
+ 'adm/images/*' => 'adm/images',
+ ),
+ ),
+ 'config/' => array(
+ 'copied' => false,
+ 'copy' => array(
+ 'config/*.yml' => 'config',
+ ),
+ ),
+ );
+
// Then fill the 'new' directory
foreach ($file_contents['all'] as $file)
{
@@ -184,6 +206,8 @@ if (sizeof($package->old_packages))
continue;
}
+ $filename = $file;
+
// Create Directories along the way?
$file = explode('/', $file);
// Remove filename portion
@@ -204,6 +228,37 @@ if (sizeof($package->old_packages))
}
$package->run_command('cp ' . $source_filename . ' ' . $dest_filename);
+
+ foreach ($copy_relative_directories as $reference => $data)
+ {
+ // Copy all relative referenced files if needed
+ if (strpos($filename, $reference) === 0 && !$data['copied'])
+ {
+ foreach ($data['copy'] as $source_dir_files => $destination_dir)
+ {
+ // Create directories along the way?
+ $directories = explode('/', $destination_dir);
+
+ chdir($dest_filename_dir . '/install/update/new');
+ foreach ($directories as $dir)
+ {
+ $dir = trim($dir);
+ if ($dir)
+ {
+ if (!file_exists('./' . $dir))
+ {
+ $package->run_command('mkdir ' . $dir);
+ }
+ chdir('./' . $dir);
+ }
+ }
+ $source_dir_files = $package->locations['old_versions'] . $package->get('simple_name') . '/' . $source_dir_files;
+ $destination_dir = $dest_filename_dir . '/install/update/new/' . $destination_dir;
+ $package->run_command('cp ' . $source_dir_files . ' ' . $destination_dir);
+ }
+ $copy_relative_directories[$reference]['copied'] = true;
+ }
+ }
}
// Build index.php file for holding the file structure
@@ -256,6 +311,7 @@ $update_info = array(
// Copy the install files to their respective locations
$package->run_command('cp -Rp ' . $package->get('dest_dir') . '/docs ' . $package->get('patch_directory'));
$package->run_command('cp -Rp ' . $package->get('dest_dir') . '/install ' . $package->get('patch_directory'));
+ $package->run_command('cp -Rp ' . $package->get('dest_dir') . '/vendor ' . $package->get('patch_directory'));
// Remove some files
chdir($package->get('patch_directory') . '/install');
@@ -372,14 +428,22 @@ chdir($package->get('dest_dir') . '/install');
// $package->run_command('rm -v database_update.php');
$package->run_command('rm -v install_update.php');
+chdir($package->get('dest_dir'));
+$package->run_command('mv -v styles/subsilver2 ../subsilver2');
+$package->run_command('cp -p docs/COPYING ../subsilver2/license.txt');
+
chdir($package->locations['package_dir']);
foreach ($compress_programs as $extension => $compress_command)
{
$package->begin_status('Packaging phpBB for ' . $extension);
$package->run_command('rm -v ./release_files/' . $package->get('release_filename') . ".{$extension}");
+ $package->run_command('rm -v ./release_files/subsilver2_' . $package->get('new_version_number') . ".{$extension}");
// Build Package
$package->run_command("$compress_command ./release_files/" . $package->get('release_filename') . '.' . $extension . ' ' . $package->get('package_name'));
+
+ // Build subSilver2 Package
+ $package->run_command("$compress_command ./release_files/subsilver2_" . $package->get('new_version_number') . '.' . $extension . ' subsilver2');
}
// Microsoft Web PI packaging
diff --git a/phpBB/.htaccess b/phpBB/.htaccess
index 474f9774c2..6f33916775 100644
--- a/phpBB/.htaccess
+++ b/phpBB/.htaccess
@@ -1,12 +1,30 @@
+<IfModule mod_rewrite.c>
+RewriteEngine on
+
#
# Uncomment the statement below if you want to make use of
# HTTP authentication and it does not already work.
# This could be required if you are for example using PHP via Apache CGI.
#
-#<IfModule mod_rewrite.c>
-#RewriteEngine on
#RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
-#</IfModule>
+
+#
+# The following 3 lines will rewrite URLs passed through the front controller
+# to not require app.php in the actual URL. In other words, a controller is
+# by default accessed at /app.php/my/controller, but can also be accessed at
+# /my/controller
+#
+RewriteCond %{REQUEST_FILENAME} !-f
+RewriteCond %{REQUEST_FILENAME} !-d
+RewriteRule ^(.*)$ app.php [QSA,L]
+
+#
+# If symbolic links are not already being followed,
+# uncomment the line below.
+# http://anothersysadmin.wordpress.com/2008/06/10/mod_rewrite-forbidden-403-with-apache-228/
+#
+#Options +FollowSymLinks
+</IfModule>
<Files "config.php">
Order Allow,Deny
diff --git a/phpBB/adm/images/alert_close.png b/phpBB/adm/images/alert_close.png
new file mode 100644
index 0000000000..79750a013c
--- /dev/null
+++ b/phpBB/adm/images/alert_close.png
Binary files differ
diff --git a/phpBB/adm/images/corners_left.gif b/phpBB/adm/images/corners_left.gif
deleted file mode 100644
index bacd276495..0000000000
--- a/phpBB/adm/images/corners_left.gif
+++ /dev/null
Binary files differ
diff --git a/phpBB/adm/images/corners_left2.gif b/phpBB/adm/images/corners_left2.gif
deleted file mode 100644
index 206e50368d..0000000000
--- a/phpBB/adm/images/corners_left2.gif
+++ /dev/null
Binary files differ
diff --git a/phpBB/adm/images/corners_right.gif b/phpBB/adm/images/corners_right.gif
deleted file mode 100644
index bcb5bd7d14..0000000000
--- a/phpBB/adm/images/corners_right.gif
+++ /dev/null
Binary files differ
diff --git a/phpBB/adm/images/corners_right2.gif b/phpBB/adm/images/corners_right2.gif
deleted file mode 100644
index 0ba66d50b2..0000000000
--- a/phpBB/adm/images/corners_right2.gif
+++ /dev/null
Binary files differ
diff --git a/phpBB/adm/images/loading.gif b/phpBB/adm/images/loading.gif
new file mode 100644
index 0000000000..e1ed0883e0
--- /dev/null
+++ b/phpBB/adm/images/loading.gif
Binary files differ
diff --git a/phpBB/adm/images/no_avatar.gif b/phpBB/adm/images/no_avatar.gif
index 80539c8c71..ad73330e71 100644
--- a/phpBB/adm/images/no_avatar.gif
+++ b/phpBB/adm/images/no_avatar.gif
Binary files differ
diff --git a/phpBB/adm/images/toggle.gif b/phpBB/adm/images/toggle.gif
deleted file mode 100644
index 8af6861bd1..0000000000
--- a/phpBB/adm/images/toggle.gif
+++ /dev/null
Binary files differ
diff --git a/phpBB/adm/index.php b/phpBB/adm/index.php
index 85908476a1..c1e8edbd03 100644
--- a/phpBB/adm/index.php
+++ b/phpBB/adm/index.php
@@ -2,9 +2,8 @@
/**
*
* @package acp
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -18,6 +17,7 @@ define('NEED_SID', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './../';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
require($phpbb_root_path . 'common.' . $phpEx);
+require($phpbb_root_path . 'includes/functions_acp.' . $phpEx);
require($phpbb_root_path . 'includes/functions_admin.' . $phpEx);
require($phpbb_root_path . 'includes/functions_module.' . $phpEx);
@@ -42,7 +42,6 @@ if (!$auth->acl_get('a_'))
// We define the admin variables now, because the user is now able to use the admin related features...
define('IN_ADMIN', true);
-$phpbb_admin_path = (defined('PHPBB_ADMIN_PATH')) ? PHPBB_ADMIN_PATH : './';
// Some oft used variables
$safe_mode = (@ini_get('safe_mode') == '1' || strtolower(@ini_get('safe_mode')) === 'on') ? true : false;
@@ -50,13 +49,11 @@ $file_uploads = (@ini_get('file_uploads') == '1' || strtolower(@ini_get('file_up
$module_id = request_var('i', '');
$mode = request_var('mode', '');
-// Set custom template for admin area
-$template->set_custom_template($phpbb_admin_path . 'style', 'admin');
+// Set custom style for admin area
+$template->set_custom_style('adm', $phpbb_admin_path . 'style');
+$template->assign_var('T_ASSETS_PATH', $phpbb_root_path . 'assets');
$template->assign_var('T_TEMPLATE_PATH', $phpbb_admin_path . 'style');
-// the acp template is never stored in the database
-$user->theme['template_storedb'] = false;
-
// Instantiate new module
$module = new p_master();
@@ -81,553 +78,3 @@ $template->set_filenames(array(
));
adm_page_footer();
-
-/**
-* Header for acp pages
-*/
-function adm_page_header($page_title)
-{
- global $config, $db, $user, $template;
- global $phpbb_root_path, $phpbb_admin_path, $phpEx, $SID, $_SID;
-
- if (defined('HEADER_INC'))
- {
- return;
- }
-
- define('HEADER_INC', true);
-
- // gzip_compression
- if ($config['gzip_compress'])
- {
- if (@extension_loaded('zlib') && !headers_sent())
- {
- ob_start('ob_gzhandler');
- }
- }
-
- $template->assign_vars(array(
- 'PAGE_TITLE' => $page_title,
- 'USERNAME' => $user->data['username'],
-
- 'SID' => $SID,
- '_SID' => $_SID,
- 'SESSION_ID' => $user->session_id,
- 'ROOT_PATH' => $phpbb_admin_path,
-
- 'U_LOGOUT' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=logout'),
- 'U_ADM_LOGOUT' => append_sid("{$phpbb_admin_path}index.$phpEx", 'action=admlogout'),
- 'U_ADM_INDEX' => append_sid("{$phpbb_admin_path}index.$phpEx"),
- 'U_INDEX' => append_sid("{$phpbb_root_path}index.$phpEx"),
-
- 'T_IMAGES_PATH' => "{$phpbb_root_path}images/",
- 'T_SMILIES_PATH' => "{$phpbb_root_path}{$config['smilies_path']}/",
- 'T_AVATAR_PATH' => "{$phpbb_root_path}{$config['avatar_path']}/",
- 'T_AVATAR_GALLERY_PATH' => "{$phpbb_root_path}{$config['avatar_gallery_path']}/",
- 'T_ICONS_PATH' => "{$phpbb_root_path}{$config['icons_path']}/",
- 'T_RANKS_PATH' => "{$phpbb_root_path}{$config['ranks_path']}/",
- 'T_UPLOAD_PATH' => "{$phpbb_root_path}{$config['upload_path']}/",
-
- 'ICON_MOVE_UP' => '<img src="' . $phpbb_admin_path . 'images/icon_up.gif" alt="' . $user->lang['MOVE_UP'] . '" title="' . $user->lang['MOVE_UP'] . '" />',
- 'ICON_MOVE_UP_DISABLED' => '<img src="' . $phpbb_admin_path . 'images/icon_up_disabled.gif" alt="' . $user->lang['MOVE_UP'] . '" title="' . $user->lang['MOVE_UP'] . '" />',
- 'ICON_MOVE_DOWN' => '<img src="' . $phpbb_admin_path . 'images/icon_down.gif" alt="' . $user->lang['MOVE_DOWN'] . '" title="' . $user->lang['MOVE_DOWN'] . '" />',
- 'ICON_MOVE_DOWN_DISABLED' => '<img src="' . $phpbb_admin_path . 'images/icon_down_disabled.gif" alt="' . $user->lang['MOVE_DOWN'] . '" title="' . $user->lang['MOVE_DOWN'] . '" />',
- 'ICON_EDIT' => '<img src="' . $phpbb_admin_path . 'images/icon_edit.gif" alt="' . $user->lang['EDIT'] . '" title="' . $user->lang['EDIT'] . '" />',
- 'ICON_EDIT_DISABLED' => '<img src="' . $phpbb_admin_path . 'images/icon_edit_disabled.gif" alt="' . $user->lang['EDIT'] . '" title="' . $user->lang['EDIT'] . '" />',
- 'ICON_DELETE' => '<img src="' . $phpbb_admin_path . 'images/icon_delete.gif" alt="' . $user->lang['DELETE'] . '" title="' . $user->lang['DELETE'] . '" />',
- 'ICON_DELETE_DISABLED' => '<img src="' . $phpbb_admin_path . 'images/icon_delete_disabled.gif" alt="' . $user->lang['DELETE'] . '" title="' . $user->lang['DELETE'] . '" />',
- 'ICON_SYNC' => '<img src="' . $phpbb_admin_path . 'images/icon_sync.gif" alt="' . $user->lang['RESYNC'] . '" title="' . $user->lang['RESYNC'] . '" />',
- 'ICON_SYNC_DISABLED' => '<img src="' . $phpbb_admin_path . 'images/icon_sync_disabled.gif" alt="' . $user->lang['RESYNC'] . '" title="' . $user->lang['RESYNC'] . '" />',
-
- 'S_USER_LANG' => $user->lang['USER_LANG'],
- 'S_CONTENT_DIRECTION' => $user->lang['DIRECTION'],
- 'S_CONTENT_ENCODING' => 'UTF-8',
- 'S_CONTENT_FLOW_BEGIN' => ($user->lang['DIRECTION'] == 'ltr') ? 'left' : 'right',
- 'S_CONTENT_FLOW_END' => ($user->lang['DIRECTION'] == 'ltr') ? 'right' : 'left',
- ));
-
- // application/xhtml+xml not used because of IE
- header('Content-type: text/html; charset=UTF-8');
-
- header('Cache-Control: private, no-cache="set-cookie"');
- header('Expires: 0');
- header('Pragma: no-cache');
-
- return;
-}
-
-/**
-* Page footer for acp pages
-*/
-function adm_page_footer($copyright_html = true)
-{
- global $db, $config, $template, $user, $auth, $cache;
- global $starttime, $phpbb_root_path, $phpbb_admin_path, $phpEx;
-
- // Output page creation time
- if (defined('DEBUG'))
- {
- $mtime = explode(' ', microtime());
- $totaltime = $mtime[0] + $mtime[1] - $starttime;
-
- if (!empty($_REQUEST['explain']) && $auth->acl_get('a_') && defined('DEBUG_EXTRA') && method_exists($db, 'sql_report'))
- {
- $db->sql_report('display');
- }
-
- $debug_output = sprintf('Time : %.3fs | ' . $db->sql_num_queries() . ' Queries | GZIP : ' . (($config['gzip_compress']) ? 'On' : 'Off') . (($user->load) ? ' | Load : ' . $user->load : ''), $totaltime);
-
- if ($auth->acl_get('a_') && defined('DEBUG_EXTRA'))
- {
- if (function_exists('memory_get_usage'))
- {
- if ($memory_usage = memory_get_usage())
- {
- global $base_memory_usage;
- $memory_usage -= $base_memory_usage;
- $memory_usage = get_formatted_filesize($memory_usage);
-
- $debug_output .= ' | Memory Usage: ' . $memory_usage;
- }
- }
-
- $debug_output .= ' | <a href="' . build_url() . '&amp;explain=1">Explain</a>';
- }
- }
-
- $template->assign_vars(array(
- 'DEBUG_OUTPUT' => (defined('DEBUG')) ? $debug_output : '',
- 'TRANSLATION_INFO' => (!empty($user->lang['TRANSLATION_INFO'])) ? $user->lang['TRANSLATION_INFO'] : '',
- 'S_COPYRIGHT_HTML' => $copyright_html,
- 'CREDIT_LINE' => $user->lang('POWERED_BY', '<a href="https://www.phpbb.com/">phpBB</a>&reg; Forum Software &copy; phpBB Group'),
- 'VERSION' => $config['version'])
- );
-
- $template->display('body');
-
- garbage_collection();
- exit_handler();
-}
-
-/**
-* Generate back link for acp pages
-*/
-function adm_back_link($u_action)
-{
- global $user;
- return '<br /><br /><a href="' . $u_action . '">&laquo; ' . $user->lang['BACK_TO_PREV'] . '</a>';
-}
-
-/**
-* Build select field options in acp pages
-*/
-function build_select($option_ary, $option_default = false)
-{
- global $user;
-
- $html = '';
- foreach ($option_ary as $value => $title)
- {
- $selected = ($option_default !== false && $value == $option_default) ? ' selected="selected"' : '';
- $html .= '<option value="' . $value . '"' . $selected . '>' . $user->lang[$title] . '</option>';
- }
-
- return $html;
-}
-
-/**
-* Build radio fields in acp pages
-*/
-function h_radio($name, $input_ary, $input_default = false, $id = false, $key = false, $separator = '')
-{
- global $user;
-
- $html = '';
- $id_assigned = false;
- foreach ($input_ary as $value => $title)
- {
- $selected = ($input_default !== false && $value == $input_default) ? ' checked="checked"' : '';
- $html .= '<label><input type="radio" name="' . $name . '"' . (($id && !$id_assigned) ? ' id="' . $id . '"' : '') . ' value="' . $value . '"' . $selected . (($key) ? ' accesskey="' . $key . '"' : '') . ' class="radio" /> ' . $user->lang[$title] . '</label>' . $separator;
- $id_assigned = true;
- }
-
- return $html;
-}
-
-/**
-* Build configuration template for acp configuration pages
-*/
-function build_cfg_template($tpl_type, $key, &$new, $config_key, $vars)
-{
- global $user, $module;
-
- $tpl = '';
- $name = 'config[' . $config_key . ']';
-
- // Make sure there is no notice printed out for non-existent config options (we simply set them)
- if (!isset($new[$config_key]))
- {
- $new[$config_key] = '';
- }
-
- switch ($tpl_type[0])
- {
- case 'text':
- case 'password':
- $size = (int) $tpl_type[1];
- $maxlength = (int) $tpl_type[2];
-
- $tpl = '<input id="' . $key . '" type="' . $tpl_type[0] . '"' . (($size) ? ' size="' . $size . '"' : '') . ' maxlength="' . (($maxlength) ? $maxlength : 255) . '" name="' . $name . '" value="' . $new[$config_key] . '"' . (($tpl_type[0] === 'password') ? ' autocomplete="off"' : '') . ' />';
- break;
-
- case 'dimension':
- $size = (int) $tpl_type[1];
- $maxlength = (int) $tpl_type[2];
-
- $tpl = '<input id="' . $key . '" type="text"' . (($size) ? ' size="' . $size . '"' : '') . ' maxlength="' . (($maxlength) ? $maxlength : 255) . '" name="config[' . $config_key . '_width]" value="' . $new[$config_key . '_width'] . '" /> x <input type="text"' . (($size) ? ' size="' . $size . '"' : '') . ' maxlength="' . (($maxlength) ? $maxlength : 255) . '" name="config[' . $config_key . '_height]" value="' . $new[$config_key . '_height'] . '" />';
- break;
-
- case 'textarea':
- $rows = (int) $tpl_type[1];
- $cols = (int) $tpl_type[2];
-
- $tpl = '<textarea id="' . $key . '" name="' . $name . '" rows="' . $rows . '" cols="' . $cols . '">' . $new[$config_key] . '</textarea>';
- break;
-
- case 'radio':
- $key_yes = ($new[$config_key]) ? ' checked="checked"' : '';
- $key_no = (!$new[$config_key]) ? ' checked="checked"' : '';
-
- $tpl_type_cond = explode('_', $tpl_type[1]);
- $type_no = ($tpl_type_cond[0] == 'disabled' || $tpl_type_cond[0] == 'enabled') ? false : true;
-
- $tpl_no = '<label><input type="radio" name="' . $name . '" value="0"' . $key_no . ' class="radio" /> ' . (($type_no) ? $user->lang['NO'] : $user->lang['DISABLED']) . '</label>';
- $tpl_yes = '<label><input type="radio" id="' . $key . '" name="' . $name . '" value="1"' . $key_yes . ' class="radio" /> ' . (($type_no) ? $user->lang['YES'] : $user->lang['ENABLED']) . '</label>';
-
- $tpl = ($tpl_type_cond[0] == 'yes' || $tpl_type_cond[0] == 'enabled') ? $tpl_yes . $tpl_no : $tpl_no . $tpl_yes;
- break;
-
- case 'select':
- case 'custom':
-
- $return = '';
-
- if (isset($vars['method']))
- {
- $call = array($module->module, $vars['method']);
- }
- else if (isset($vars['function']))
- {
- $call = $vars['function'];
- }
- else
- {
- break;
- }
-
- if (isset($vars['params']))
- {
- $args = array();
- foreach ($vars['params'] as $value)
- {
- switch ($value)
- {
- case '{CONFIG_VALUE}':
- $value = $new[$config_key];
- break;
-
- case '{KEY}':
- $value = $key;
- break;
- }
-
- $args[] = $value;
- }
- }
- else
- {
- $args = array($new[$config_key], $key);
- }
-
- $return = call_user_func_array($call, $args);
-
- if ($tpl_type[0] == 'select')
- {
- $tpl = '<select id="' . $key . '" name="' . $name . '">' . $return . '</select>';
- }
- else
- {
- $tpl = $return;
- }
-
- break;
-
- default:
- break;
- }
-
- if (isset($vars['append']))
- {
- $tpl .= $vars['append'];
- }
-
- return $tpl;
-}
-
-/**
-* Going through a config array and validate values, writing errors to $error. The validation method accepts parameters separated by ':' for string and int.
-* The first parameter defines the type to be used, the second the lower bound and the third the upper bound. Only the type is required.
-*/
-function validate_config_vars($config_vars, &$cfg_array, &$error)
-{
- global $phpbb_root_path, $user;
- $type = 0;
- $min = 1;
- $max = 2;
-
- foreach ($config_vars as $config_name => $config_definition)
- {
- if (!isset($cfg_array[$config_name]) || strpos($config_name, 'legend') !== false)
- {
- continue;
- }
-
- if (!isset($config_definition['validate']))
- {
- continue;
- }
-
- $validator = explode(':', $config_definition['validate']);
-
- // Validate a bit. ;) (0 = type, 1 = min, 2= max)
- switch ($validator[$type])
- {
- case 'string':
- $length = utf8_strlen($cfg_array[$config_name]);
-
- // the column is a VARCHAR
- $validator[$max] = (isset($validator[$max])) ? min(255, $validator[$max]) : 255;
-
- if (isset($validator[$min]) && $length < $validator[$min])
- {
- $error[] = sprintf($user->lang['SETTING_TOO_SHORT'], $user->lang[$config_definition['lang']], $validator[$min]);
- }
- else if (isset($validator[$max]) && $length > $validator[2])
- {
- $error[] = sprintf($user->lang['SETTING_TOO_LONG'], $user->lang[$config_definition['lang']], $validator[$max]);
- }
- break;
-
- case 'bool':
- $cfg_array[$config_name] = ($cfg_array[$config_name]) ? 1 : 0;
- break;
-
- case 'int':
- $cfg_array[$config_name] = (int) $cfg_array[$config_name];
-
- if (isset($validator[$min]) && $cfg_array[$config_name] < $validator[$min])
- {
- $error[] = sprintf($user->lang['SETTING_TOO_LOW'], $user->lang[$config_definition['lang']], $validator[$min]);
- }
- else if (isset($validator[$max]) && $cfg_array[$config_name] > $validator[$max])
- {
- $error[] = sprintf($user->lang['SETTING_TOO_BIG'], $user->lang[$config_definition['lang']], $validator[$max]);
- }
-
- if (strpos($config_name, '_max') !== false)
- {
- // Min/max pairs of settings should ensure that min <= max
- // Replace _max with _min to find the name of the minimum
- // corresponding configuration variable
- $min_name = str_replace('_max', '_min', $config_name);
-
- if (isset($cfg_array[$min_name]) && is_numeric($cfg_array[$min_name]) && $cfg_array[$config_name] < $cfg_array[$min_name])
- {
- // A minimum value exists and the maximum value is less than it
- $error[] = sprintf($user->lang['SETTING_TOO_LOW'], $user->lang[$config_definition['lang']], (int) $cfg_array[$min_name]);
- }
- }
- break;
-
- case 'email':
- if (!preg_match('/^' . get_preg_expression('email') . '$/i', $cfg_array[$config_name]))
- {
- $error[] = $user->lang['EMAIL_INVALID_EMAIL'];
- }
- break;
-
- // Absolute path
- case 'script_path':
- if (!$cfg_array[$config_name])
- {
- break;
- }
-
- $destination = str_replace('\\', '/', $cfg_array[$config_name]);
-
- if ($destination !== '/')
- {
- // Adjust destination path (no trailing slash)
- if (substr($destination, -1, 1) == '/')
- {
- $destination = substr($destination, 0, -1);
- }
-
- $destination = str_replace(array('../', './'), '', $destination);
-
- if ($destination[0] != '/')
- {
- $destination = '/' . $destination;
- }
- }
-
- $cfg_array[$config_name] = trim($destination);
-
- break;
-
- // Absolute path
- case 'lang':
- if (!$cfg_array[$config_name])
- {
- break;
- }
-
- $cfg_array[$config_name] = basename($cfg_array[$config_name]);
-
- if (!file_exists($phpbb_root_path . 'language/' . $cfg_array[$config_name] . '/'))
- {
- $error[] = $user->lang['WRONG_DATA_LANG'];
- }
- break;
-
- // Relative path (appended $phpbb_root_path)
- case 'rpath':
- case 'rwpath':
- if (!$cfg_array[$config_name])
- {
- break;
- }
-
- $destination = $cfg_array[$config_name];
-
- // Adjust destination path (no trailing slash)
- if (substr($destination, -1, 1) == '/' || substr($destination, -1, 1) == '\\')
- {
- $destination = substr($destination, 0, -1);
- }
-
- $destination = str_replace(array('../', '..\\', './', '.\\'), '', $destination);
- if ($destination && ($destination[0] == '/' || $destination[0] == "\\"))
- {
- $destination = '';
- }
-
- $cfg_array[$config_name] = trim($destination);
-
- // Path being relative (still prefixed by phpbb_root_path), but with the ability to escape the root dir...
- case 'path':
- case 'wpath':
-
- if (!$cfg_array[$config_name])
- {
- break;
- }
-
- $cfg_array[$config_name] = trim($cfg_array[$config_name]);
-
- // Make sure no NUL byte is present...
- if (strpos($cfg_array[$config_name], "\0") !== false || strpos($cfg_array[$config_name], '%00') !== false)
- {
- $cfg_array[$config_name] = '';
- break;
- }
-
- if (!file_exists($phpbb_root_path . $cfg_array[$config_name]))
- {
- $error[] = sprintf($user->lang['DIRECTORY_DOES_NOT_EXIST'], $cfg_array[$config_name]);
- }
-
- if (file_exists($phpbb_root_path . $cfg_array[$config_name]) && !is_dir($phpbb_root_path . $cfg_array[$config_name]))
- {
- $error[] = sprintf($user->lang['DIRECTORY_NOT_DIR'], $cfg_array[$config_name]);
- }
-
- // Check if the path is writable
- if ($config_definition['validate'] == 'wpath' || $config_definition['validate'] == 'rwpath')
- {
- if (file_exists($phpbb_root_path . $cfg_array[$config_name]) && !phpbb_is_writable($phpbb_root_path . $cfg_array[$config_name]))
- {
- $error[] = sprintf($user->lang['DIRECTORY_NOT_WRITABLE'], $cfg_array[$config_name]);
- }
- }
-
- break;
- }
- }
-
- return;
-}
-
-/**
-* Checks whatever or not a variable is OK for use in the Database
-* param mixed $value_ary An array of the form array(array('lang' => ..., 'value' => ..., 'column_type' =>))'
-* param mixed $error The error array
-*/
-function validate_range($value_ary, &$error)
-{
- global $user;
-
- $column_types = array(
- 'BOOL' => array('php_type' => 'int', 'min' => 0, 'max' => 1),
- 'USINT' => array('php_type' => 'int', 'min' => 0, 'max' => 65535),
- 'UINT' => array('php_type' => 'int', 'min' => 0, 'max' => (int) 0x7fffffff),
- // Do not use (int) 0x80000000 - it evaluates to different
- // values on 32-bit and 64-bit systems.
- // Apparently -2147483648 is a float on 32-bit systems,
- // despite fitting in an int, thus explicit cast is needed.
- 'INT' => array('php_type' => 'int', 'min' => (int) -2147483648, 'max' => (int) 0x7fffffff),
- 'TINT' => array('php_type' => 'int', 'min' => -128, 'max' => 127),
-
- 'VCHAR' => array('php_type' => 'string', 'min' => 0, 'max' => 255),
- );
- foreach ($value_ary as $value)
- {
- $column = explode(':', $value['column_type']);
- $max = $min = 0;
- $type = 0;
- if (!isset($column_types[$column[0]]))
- {
- continue;
- }
- else
- {
- $type = $column_types[$column[0]];
- }
-
- switch ($type['php_type'])
- {
- case 'string' :
- $max = (isset($column[1])) ? min($column[1],$type['max']) : $type['max'];
- if (utf8_strlen($value['value']) > $max)
- {
- $error[] = sprintf($user->lang['SETTING_TOO_LONG'], $user->lang[$value['lang']], $max);
- }
- break;
-
- case 'int':
- $min = (isset($column[1])) ? max($column[1],$type['min']) : $type['min'];
- $max = (isset($column[2])) ? min($column[2],$type['max']) : $type['max'];
- if ($value['value'] < $min)
- {
- $error[] = sprintf($user->lang['SETTING_TOO_LOW'], $user->lang[$value['lang']], $min);
- }
- else if ($value['value'] > $max)
- {
- $error[] = sprintf($user->lang['SETTING_TOO_BIG'], $user->lang[$value['lang']], $max);
- }
- break;
- }
- }
-}
-
-?> \ No newline at end of file
diff --git a/phpBB/adm/style/acp_attachments.html b/phpBB/adm/style/acp_attachments.html
index 9573c34248..82fb229fae 100644
--- a/phpBB/adm/style/acp_attachments.html
+++ b/phpBB/adm/style/acp_attachments.html
@@ -1,6 +1,6 @@
<!-- INCLUDE overall_header.html -->
-<a name="maincontent"></a>
+<a id="maincontent"></a>
<!-- IF U_BACK -->
<a href="{U_BACK}" style="float: {S_CONTENT_FLOW_END};">&laquo; {L_BACK}</a>
@@ -54,7 +54,7 @@
<!-- ELSE -->
<dl>
- <dt><label for="{options.KEY}">{options.TITLE}:</label><!-- IF options.S_EXPLAIN --><br /><span>{options.TITLE_EXPLAIN}</span><!-- ENDIF --></dt>
+ <dt><label for="{options.KEY}">{options.TITLE}{L_COLON}</label><!-- IF options.S_EXPLAIN --><br /><span>{options.TITLE_EXPLAIN}</span><!-- ENDIF --></dt>
<dd>{options.CONTENT}</dd>
</dl>
@@ -78,11 +78,11 @@
<legend>{L_SECURE_TITLE}</legend>
<p>{L_DOWNLOAD_ADD_IPS_EXPLAIN}</p>
<dl>
- <dt><label for="ip_hostname">{L_IP_HOSTNAME}:</label></dt>
+ <dt><label for="ip_hostname">{L_IP_HOSTNAME}{L_COLON}</label></dt>
<dd><textarea id="ip_hostname" cols="40" rows="3" name="ips"></textarea></dd>
</dl>
<dl>
- <dt><label for="exclude">{L_IP_EXCLUDE}:</label><br /><span>{L_EXCLUDE_ENTERED_IP}</span></dt>
+ <dt><label for="exclude">{L_IP_EXCLUDE}{L_COLON}</label><br /><span>{L_EXCLUDE_ENTERED_IP}</span></dt>
<dd><label><input type="radio" id="exclude" name="ipexclude" value="1" class="radio" /> {L_YES}</label>
<label><input type="radio" name="ipexclude" value="0" checked="checked" class="radio" /> {L_NO}</label></dd>
</dl>
@@ -97,7 +97,7 @@
<!-- IF S_DEFINED_IPS -->
<p>{L_DOWNLOAD_REMOVE_IPS_EXPLAIN}</p>
<dl>
- <dt><label for="remove_ip_hostname">{L_IP_HOSTNAME}:</label></dt>
+ <dt><label for="remove_ip_hostname">{L_IP_HOSTNAME}{L_COLON}</label></dt>
<dd><select name="unip[]" id="remove_ip_hostname" multiple="multiple" size="10">{DEFINED_IPS}</select></dd>
</dl>
@@ -122,11 +122,11 @@
{
if (newimage == 'no_image')
{
- document.getElementById('image_upload_icon').src = "{PHPBB_ROOT_PATH}images/spacer.gif";
+ document.getElementById('image_upload_icon').src = "{ROOT_PATH}images/spacer.gif";
}
else
{
- document.getElementById('image_upload_icon').src = "{PHPBB_ROOT_PATH}{IMG_PATH}/" + newimage;
+ document.getElementById('image_upload_icon').src = "{ROOT_PATH}{IMG_PATH}/" + newimage;
}
}
@@ -172,39 +172,39 @@
<legend>{L_LEGEND}</legend>
<dl>
- <dt><label for="group_name">{L_GROUP_NAME}:</label></dt>
+ <dt><label for="group_name">{L_GROUP_NAME}{L_COLON}</label></dt>
<dd><input type="text" id="group_name" size="20" maxlength="100" name="group_name" value="{GROUP_NAME}" /></dd>
</dl>
<dl>
- <dt><label for="category">{L_SPECIAL_CATEGORY}:</label><br /><span>{L_SPECIAL_CATEGORY_EXPLAIN}</span></dt>
+ <dt><label for="category">{L_SPECIAL_CATEGORY}{L_COLON}</label><br /><span>{L_SPECIAL_CATEGORY_EXPLAIN}</span></dt>
<dd>{S_CATEGORY_SELECT}</dd>
</dl>
<dl>
- <dt><label for="allowed">{L_ALLOWED}:</label></dt>
+ <dt><label for="allowed">{L_ALLOWED}{L_COLON}</label></dt>
<dd><input type="checkbox" class="radio" id="allowed" name="allow_group" value="1"<!-- IF ALLOW_GROUP --> checked="checked"<!-- ENDIF --> /></dd>
</dl>
<dl>
- <dt><label for="allow_in_pm">{L_ALLOW_IN_PM}:</label></dt>
+ <dt><label for="allow_in_pm">{L_ALLOW_IN_PM}{L_COLON}</label></dt>
<dd><input type="checkbox" class="radio" id="allow_in_pm" name="allow_in_pm" value="1"<!-- IF ALLOW_IN_PM --> checked="checked"<!-- ENDIF --> /></dd>
</dl>
<dl>
- <dt><label for="upload_icon">{L_UPLOAD_ICON}:</label></dt>
+ <dt><label for="upload_icon">{L_UPLOAD_ICON}{L_COLON}</label></dt>
<dd><select name="upload_icon" id="upload_icon" onchange="update_image(this.options[selectedIndex].value);">
<option value="no_image"<!-- IF S_NO_IMAGE --> selected="selected"<!-- ENDIF -->>{L_NO_IMAGE}</option>{S_FILENAME_LIST}
</select></dd>
- <dd>&nbsp;<img <!-- IF S_NO_IMAGE -->src="{PHPBB_ROOT_PATH}images/spacer.gif"<!-- ELSE -->src="{UPLOAD_ICON_SRC}"<!-- ENDIF --> id="image_upload_icon" alt="" title="" />&nbsp;</dd>
+ <dd>&nbsp;<img <!-- IF S_NO_IMAGE -->src="{ROOT_PATH}images/spacer.gif"<!-- ELSE -->src="{UPLOAD_ICON_SRC}"<!-- ENDIF --> id="image_upload_icon" alt="" title="" />&nbsp;</dd>
</dl>
<dl>
- <dt><label for="extgroup_filesize">{L_MAX_EXTGROUP_FILESIZE}:</label></dt>
- <dd><input type="text" id="extgroup_filesize" size="3" maxlength="15" name="max_filesize" value="{EXTGROUP_FILESIZE}" /> <select name="size_select">{S_EXT_GROUP_SIZE_OPTIONS}</select></dd>
+ <dt><label for="extgroup_filesize">{L_MAX_EXTGROUP_FILESIZE}{L_COLON}</label></dt>
+ <dd><input type="number" id="extgroup_filesize" size="3" maxlength="15" name="max_filesize" value="{EXTGROUP_FILESIZE}" /> <select name="size_select">{S_EXT_GROUP_SIZE_OPTIONS}</select></dd>
</dl>
<dl>
- <dt><label for="assigned_extensions">{L_ASSIGNED_EXTENSIONS}:</label></dt>
+ <dt><label for="assigned_extensions">{L_ASSIGNED_EXTENSIONS}{L_COLON}</label></dt>
<dd><div id="ext">{ASSIGNED_EXTENSIONS}</div> <span>[<a href="{U_EXTENSIONS}">{L_GO_TO_EXTENSIONS}</a> ]</span></dd>
<dd><select name="extensions[]" id="assigned_extensions" class="narrow" onchange="show_extensions(this);" multiple="multiple" size="8">{S_EXTENSION_OPTIONS}</select></dd>
</dl>
<dl>
- <dt><label for="allowed_forums">{L_ALLOWED_FORUMS}:</label><br /><span>{L_ALLOWED_FORUMS_EXPLAIN}</span></dt>
+ <dt><label for="allowed_forums">{L_ALLOWED_FORUMS}{L_COLON}</label><br /><span>{L_ALLOWED_FORUMS_EXPLAIN}</span></dt>
<dd><label><input type="radio" id="allowed_forums" class="radio" name="forum_select" value="0"<!-- IF not S_FORUM_IDS --> checked="checked"<!-- ENDIF --> /> {L_ALLOW_ALL_FORUMS}</label>
<label><input type="radio" class="radio" name="forum_select" value="1"<!-- IF S_FORUM_IDS --> checked="checked"<!-- ENDIF --> /> {L_ALLOW_SELECTED_FORUMS}</label></dd>
<dd><select name="allowed_forums[]" multiple="multiple" size="8">{S_FORUM_ID_OPTIONS}</select></dd>
@@ -224,7 +224,7 @@
<fieldset class="tabulated">
<legend>{L_TITLE}</legend>
- <table cellspacing="1">
+ <table class="table1">
<col class="row1" /><col class="row1" /><col class="row2" />
<thead>
<tr>
@@ -248,13 +248,13 @@
<!-- ELSE --><br /><span>&raquo; {L_ALLOWED_IN_PM_POST}</span><!-- ENDIF -->
</td>
<td>{groups.CATEGORY}</td>
- <td align="center" valign="middle" style="white-space: nowrap;">&nbsp;<a href="{groups.U_EDIT}">{ICON_EDIT}</a>&nbsp;&nbsp;<a href="{groups.U_DELETE}">{ICON_DELETE}</a>&nbsp;</td>
+ <td align="center" valign="middle" style="white-space: nowrap;">&nbsp;<a href="{groups.U_EDIT}">{ICON_EDIT}</a>&nbsp;&nbsp;<a href="{groups.U_DELETE}" data-ajax="row_delete">{ICON_DELETE}</a>&nbsp;</td>
</tr>
<!-- END groups -->
</tbody>
</table>
<p class="quick">
- {L_CREATE_GROUP}: <input type="text" name="group_name" maxlength="30" />
+ {L_CREATE_GROUP}{L_COLON} <input type="text" name="group_name" maxlength="30" />
<input class="button2" name="add" type="submit" value="{L_SUBMIT}" />
</p>
{S_FORM_TOKEN}
@@ -291,7 +291,7 @@
<fieldset class="tabulated">
<legend>{L_TITLE}</legend>
- <table cellspacing="1">
+ <table class="table1">
<col class="row1" /><col class="row1" /><col class="row2" />
<thead>
<tr>
@@ -331,7 +331,7 @@
<fieldset class="tabulated">
<legend>{L_TITLE}</legend>
- <table cellspacing="1">
+ <table class="table1 zebra-table">
<thead>
<tr>
<th>{L_FILENAME}</th>
@@ -344,11 +344,11 @@
</thead>
<tbody>
<!-- BEGIN orphan -->
- <!-- IF orphan.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
+ <tr>
<td><a href="{orphan.U_FILE}">{orphan.REAL_FILENAME}</a></td>
<td>{orphan.FILETIME}</td>
<td>{orphan.FILESIZE}</td>
- <td><strong>{L_ATTACH_ID}: </strong><input type="text" name="post_id[{orphan.ATTACH_ID}]" size="7" maxlength="10" value="{orphan.POST_ID}" /></td>
+ <td><strong>{L_ATTACH_ID}{L_COLON} </strong><input type="number" name="post_id[{orphan.ATTACH_ID}]" size="7" maxlength="10" value="{orphan.POST_ID}" /></td>
<td><input type="checkbox" class="radio" name="add[{orphan.ATTACH_ID}]" /></td>
<td><input type="checkbox" class="radio" name="delete[{orphan.ATTACH_ID}]" /></td>
</tr>
@@ -371,6 +371,89 @@
</fieldset>
</form>
+<!-- ELSEIF S_MANAGE -->
+
+ <form id="attachments" method="post" action="{U_ACTION}">
+
+ <fieldset class="tabulated">
+ <legend>{L_TITLE}</legend>
+
+ <div class="pagination">
+ <!-- IF .pagination or TOTAL_FILES -->
+ {L_NUMBER_FILES}{L_COLON} {TOTAL_FILES} &bull; {L_TOTAL_SIZE}{L_COLON} {TOTAL_SIZE}
+ <!-- IF .pagination -->
+ &bull; <!-- INCLUDE pagination.html -->
+ <!-- ELSE -->
+ &bull; {PAGE_NUMBER}
+ <!-- ENDIF -->
+ <!-- ENDIF -->
+ </div>
+
+ <table class="table1 zebra-table">
+ <thead>
+ <tr>
+ <th>{L_FILENAME}</th>
+ <th>{L_POSTED}</th>
+ <th>{L_FILESIZE}</th>
+ <th>{L_DELETE}</th>
+ </tr>
+ </thead>
+ <tbody>
+ <!-- BEGIN attachments -->
+ <tr>
+ <td>
+ <!-- IF attachments.S_IN_MESSAGE -->{L_EXTENSION_GROUP}{L_COLON} <strong><!-- IF attachments.EXT_GROUP_NAME -->{attachments.EXT_GROUP_NAME}<!-- ELSE -->{L_NO_EXT_GROUP}<!-- ENDIF --></strong><br />{attachments.L_DOWNLOAD_COUNT}<br />{L_IN} {L_PRIVATE_MESSAGE}
+ <!-- ELSE --><a href="{attachments.U_FILE}" style="font-weight: bold;">{attachments.REAL_FILENAME}</a><br /><!-- IF attachments.COMMENT -->{attachments.COMMENT}<br /><!-- ENDIF -->{attachments.L_DOWNLOAD_COUNT}<br />{L_TOPIC}{L_COLON} <a href="{attachments.U_VIEW_TOPIC}">{attachments.TOPIC_TITLE}</a><!-- ENDIF -->
+ </td>
+ <td>{attachments.FILETIME}<br />{L_POST_BY_AUTHOR} {attachments.ATTACHMENT_POSTER}</td>
+ <td>{attachments.FILESIZE}</td>
+ <td><input type="checkbox" class="radio" name="delete[{attachments.ATTACH_ID}]" /></td>
+ </tr>
+ <!-- END attachments -->
+ <tr class="row4">
+ <td colspan="3">&nbsp;</td>
+ <td class="small"><a href="#" onclick="marklist('attachments', 'delete', true); return false;">{L_MARK_ALL}</a> :: <a href="#" onclick="marklist('attachments', 'delete', false); return false;">{L_UNMARK_ALL}</a></td>
+ </tr>
+ </tbody>
+ </table>
+
+ <!-- IF TOTAL_FILES -->
+ <fieldset class="display-options">
+ {L_DISPLAY_LOG}{L_COLON} &nbsp;{S_LIMIT_DAYS}&nbsp;{L_SORT_BY}{L_COLON} {S_SORT_KEY} {S_SORT_DIR}
+ <input class="button2" type="submit" value="{L_GO}" name="sort" />
+ </fieldset>
+
+ <hr />
+
+ <div class="pagination">
+ {L_NUMBER_FILES}{L_COLON} {TOTAL_FILES} &bull; {L_TOTAL_SIZE}{L_COLON} {TOTAL_SIZE}
+ <!-- IF .pagination -->
+ &bull; <!-- INCLUDE pagination.html -->
+ <!-- ELSE -->
+ &bull; {PAGE_NUMBER}
+ <!-- ENDIF -->
+ </div>
+ <!-- ENDIF -->
+
+ <p class="submit-buttons">
+ <input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" />&nbsp;
+ <input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" />
+ </p>
+ {S_FORM_TOKEN}
+ </fieldset>
+ </form>
+
+ <!-- IF S_ACTION_OPTIONS -->
+ <fieldset>
+ <legend>{L_RESYNC_STATS}</legend>
+ <form id="action_stats_form" method="post" action="{U_ACTION}">
+ <dl>
+ <dt><label for="action_stats">{L_RESYNC_FILES_STATS}</label><br /><span>{L_RESYNC_FILES_STATS_EXPLAIN}</span></dt>
+ <dd><input type="hidden" name="action" value="stats" /><input class="button2" type="submit" id="action_stats" name="action_stats" value="{L_RUN}" /></dd>
+ </dl>
+ </form>
+ </fieldset>
+ <!-- ENDIF -->
<!-- ENDIF -->
-<!-- INCLUDE overall_footer.html --> \ No newline at end of file
+<!-- INCLUDE overall_footer.html -->
diff --git a/phpBB/adm/style/acp_avatar_options_gravatar.html b/phpBB/adm/style/acp_avatar_options_gravatar.html
new file mode 100644
index 0000000000..0c2e8cc984
--- /dev/null
+++ b/phpBB/adm/style/acp_avatar_options_gravatar.html
@@ -0,0 +1,11 @@
+<dl>
+ <dt><label for="avatar_gravatar_email">{L_GRAVATAR_AVATAR_EMAIL}{L_COLON}</label><br /><span>{L_GRAVATAR_AVATAR_EMAIL_EXPLAIN}</span></dt>
+ <dd><input type="email" name="avatar_gravatar_email" id="avatar_gravatar_email" value="{AVATAR_GRAVATAR_EMAIL}" class="inputbox" /></dd>
+</dl>
+<dl>
+ <dt><label for="avatar_gravatar_width">{L_GRAVATAR_AVATAR_SIZE}{L_COLON}</label><br /><span>{L_GRAVATAR_AVATAR_SIZE_EXPLAIN}</span></dt>
+ <dd>
+ <input type="number" name="avatar_gravatar_width" id="avatar_gravatar_width" size="3" value="{AVATAR_GRAVATAR_WIDTH}" class="inputbox autowidth" /> {L_PIXEL} &times;&nbsp;
+ <input type="number" name="avatar_gravatar_height" id="avatar_gravatar_height" size="3" value="{AVATAR_GRAVATAR_HEIGHT}" class="inputbox autowidth" /> {L_PIXEL}
+ </dd>
+</dl>
diff --git a/phpBB/adm/style/acp_avatar_options_local.html b/phpBB/adm/style/acp_avatar_options_local.html
new file mode 100644
index 0000000000..0cdb3644d7
--- /dev/null
+++ b/phpBB/adm/style/acp_avatar_options_local.html
@@ -0,0 +1,21 @@
+<dl>
+ <dt><label for="category">{L_AVATAR_CATEGORY}{L_COLON}</label></dt>
+ <dd><select name="avatar_local_cat" id="category">
+ <option value="">{L_NO_AVATAR_CATEGORY}</option>
+ <!-- BEGIN avatar_local_cats -->
+ <option value="{avatar_local_cats.NAME}"<!-- IF avatar_local_cats.SELECTED --> selected="selected"<!-- ENDIF -->>{avatar_local_cats.NAME}</option>
+ <!-- END avatar_local_cats -->
+ </select>&nbsp;<input type="submit" value="{L_GO}" name="avatar_local_go" class="button2" /></dd>
+</dl>
+ <!-- IF AVATAR_LOCAL_SHOW -->
+ <ul id="gallery">
+ <!-- BEGIN avatar_local_row -->
+ <!-- BEGIN avatar_local_col -->
+ <li>
+ <label for="av-{avatar_local_row.S_ROW_COUNT}-{avatar_local_row.avatar_local_col.S_ROW_COUNT}"><img src="{avatar_local_row.avatar_local_col.AVATAR_IMAGE}" alt="" /><br />
+ <input type="radio" name="avatar_local_file" id="av-{avatar_local_row.S_ROW_COUNT}-{avatar_local_row.avatar_local_col.S_ROW_COUNT}" value="{avatar_local_row.avatar_local_col.AVATAR_FILE}" /></label>
+ </li>
+ <!-- END avatar_local_col -->
+ <!-- END avatar_local_row -->
+ </ul>
+ <!-- ENDIF -->
diff --git a/phpBB/adm/style/acp_avatar_options_remote.html b/phpBB/adm/style/acp_avatar_options_remote.html
new file mode 100644
index 0000000000..1c0e3db599
--- /dev/null
+++ b/phpBB/adm/style/acp_avatar_options_remote.html
@@ -0,0 +1,11 @@
+<dl>
+ <dt><label for="avatar_remote_url">{L_LINK_REMOTE_AVATAR}{L_COLON}</label><br /><span>{L_LINK_REMOTE_AVATAR_EXPLAIN}</span></dt>
+ <dd><input type="url" name="avatar_remote_url" id="avatar_remote_url" value="{AVATAR_REMOTE_URL}" class="inputbox" /></dd>
+</dl>
+<dl>
+ <dt><label for="avatar_remote_width">{L_LINK_REMOTE_SIZE}{L_COLON}</label><br /><span>{L_LINK_REMOTE_SIZE_EXPLAIN}</span></dt>
+ <dd>
+ <input type="number" name="avatar_remote_width" id="avatar_remote_width" size="3" value="{AVATAR_REMOTE_WIDTH}" class="inputbox autowidth" /> {L_PIXEL} &times;&nbsp;
+ <input type="number" name="avatar_remote_height" id="avatar_remote_height" size="3" value="{AVATAR_REMOTE_HEIGHT}" class="inputbox autowidth" /> {L_PIXEL}
+ </dd>
+</dl>
diff --git a/phpBB/adm/style/acp_avatar_options_upload.html b/phpBB/adm/style/acp_avatar_options_upload.html
new file mode 100644
index 0000000000..63a734ea7d
--- /dev/null
+++ b/phpBB/adm/style/acp_avatar_options_upload.html
@@ -0,0 +1,11 @@
+<dl>
+ <dt><label for="avatar_upload_file">{L_UPLOAD_AVATAR_FILE}{L_COLON}</label></dt>
+ <dd><input type="hidden" name="MAX_FILE_SIZE" value="{AVATAR_UPLOAD_SIZE}" /><input type="file" name="avatar_upload_file" id="avatar_upload_file" class="inputbox autowidth" /></dd>
+</dl>
+
+<!-- IF S_UPLOAD_AVATAR_URL -->
+ <dl>
+ <dt><label for="avatar_upload_url">{L_UPLOAD_AVATAR_URL}{L_COLON}</label><br /><span>{L_UPLOAD_AVATAR_URL_EXPLAIN}</span></dt>
+ <dd><input type="url" name="avatar_upload_url" id="avatar_upload_url" value="" class="inputbox" /></dd>
+ </dl>
+<!-- ENDIF -->
diff --git a/phpBB/adm/style/acp_ban.html b/phpBB/adm/style/acp_ban.html
index 0e2e71822e..71c737de70 100644
--- a/phpBB/adm/style/acp_ban.html
+++ b/phpBB/adm/style/acp_ban.html
@@ -1,6 +1,6 @@
<!-- INCLUDE overall_header.html -->
-<a name="maincontent"></a>
+<a id="maincontent"></a>
<p>{L_ACP_BAN_EXPLAIN}</p>
@@ -44,26 +44,26 @@
<fieldset>
<legend>{L_TITLE}</legend>
<dl>
- <dt><label for="ban">{L_BAN_CELL}:</label></dt>
+ <dt><label for="ban">{L_BAN_CELL}{L_COLON}</label></dt>
<dd><textarea name="ban" cols="40" rows="3" id="ban"></textarea></dd>
<!-- IF S_USERNAME_BAN --><dd>[ <a href="{U_FIND_USERNAME}" onclick="find_username(this.href); return false;">{L_FIND_USERNAME}</a> ]</dd><!-- ENDIF -->
</dl>
<dl>
- <dt><label for="banlength">{L_BAN_LENGTH}:</label></dt>
+ <dt><label for="banlength">{L_BAN_LENGTH}{L_COLON}</label></dt>
<dd><label for="banlength"><select name="banlength" id="banlength" onchange="if(this.value==-1){document.getElementById('banlengthother').style.display = 'block';}else{document.getElementById('banlengthother').style.display='none';}">{S_BAN_END_OPTIONS}</select></label></dd>
<dd id="banlengthother" style="display: none;"><label><input type="text" name="banlengthother" class="inputbox" /><br /><span>{L_YEAR_MONTH_DAY}</span></label></dd>
</dl>
<dl>
- <dt><label for="banexclude">{L_BAN_EXCLUDE}:</label><br /><span>{L_BAN_EXCLUDE_EXPLAIN}</span></dt>
+ <dt><label for="banexclude">{L_BAN_EXCLUDE}{L_COLON}</label><br /><span>{L_BAN_EXCLUDE_EXPLAIN}</span></dt>
<dd><label><input type="radio" name="banexclude" value="1" class="radio" /> {L_YES}</label>
<label><input type="radio" name="banexclude" id="banexclude" value="0" checked="checked" class="radio" /> {L_NO}</label></dd>
</dl>
<dl>
- <dt><label for="banreason">{L_BAN_REASON}:</label></dt>
+ <dt><label for="banreason">{L_BAN_REASON}{L_COLON}</label></dt>
<dd><input name="banreason" type="text" class="text medium" maxlength="255" id="banreason" /></dd>
</dl>
<dl>
- <dt><label for="bangivereason">{L_BAN_GIVE_REASON}:</label></dt>
+ <dt><label for="bangivereason">{L_BAN_GIVE_REASON}{L_COLON}</label></dt>
<dd><input name="bangivereason" type="text" class="text medium" maxlength="255" id="bangivereason" /></dd>
</dl>
@@ -88,19 +88,19 @@
<!-- IF S_BANNED_OPTIONS -->
<dl>
- <dt><label for="unban">{L_BAN_CELL}:</label></dt>
+ <dt><label for="unban">{L_BAN_CELL}{L_COLON}</label></dt>
<dd><select id="unban" name="unban[]" multiple="multiple" size="10" style="width: 50%" onchange="if (this.selectedIndex > -1) display_details(this.options[this.selectedIndex].value); else display_details(-1);">{BANNED_OPTIONS}</select></dd>
</dl>
<dl>
- <dt><label for="unbanlength">{L_BAN_LENGTH}:</label></dt>
+ <dt><label for="unbanlength">{L_BAN_LENGTH}{L_COLON}</label></dt>
<dd><input style="border: 0;" type="text" class="text full" readonly="readonly" name="unbanlength" id="unbanlength" /></dd>
</dl>
<dl>
- <dt><label for="unbanreason">{L_BAN_REASON}:</label></dt>
+ <dt><label for="unbanreason">{L_BAN_REASON}{L_COLON}</label></dt>
<dd><textarea style="border: 0;" class="text full" readonly="readonly" name="unbanreason" id="unbanreason" rows="5" cols="80">&nbsp;</textarea></dd>
</dl>
<dl>
- <dt><label for="unbangivereason">{L_BAN_GIVE_REASON}:</label></dt>
+ <dt><label for="unbangivereason">{L_BAN_GIVE_REASON}{L_COLON}</label></dt>
<dd><textarea style="border: 0;" class="text full" readonly="readonly" name="unbangivereason" id="unbangivereason" rows="5" cols="80">&nbsp;</textarea></dd>
</dl>
@@ -121,4 +121,4 @@
</form>
-<!-- INCLUDE overall_footer.html --> \ No newline at end of file
+<!-- INCLUDE overall_footer.html -->
diff --git a/phpBB/adm/style/acp_bbcodes.html b/phpBB/adm/style/acp_bbcodes.html
index c81c198fd5..8c8b805975 100644
--- a/phpBB/adm/style/acp_bbcodes.html
+++ b/phpBB/adm/style/acp_bbcodes.html
@@ -1,6 +1,6 @@
<!-- INCLUDE overall_header.html -->
-<a name="maincontent"></a>
+<a id="maincontent"></a>
<!-- IF S_EDIT_BBCODE -->
@@ -47,6 +47,8 @@
</dl>
</fieldset>
+ <!-- EVENT acp_bbcodes_edit_fieldsets_after -->
+
<fieldset class="submit-buttons">
<legend>{L_SUBMIT}</legend>
<input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" />&nbsp;
@@ -56,7 +58,7 @@
<br />
- <table cellspacing="1" id="down">
+ <table class="table1" id="down">
<thead>
<tr>
<th colspan="2">{L_TOKENS}</th>
@@ -71,7 +73,7 @@
</thead>
<tbody>
<!-- BEGIN token -->
- <tr valign="top">
+ <tr style="vertical-align: top;">
<td class="row1">{token.TOKEN}</td>
<td class="row2">{token.EXPLAIN}</td>
</tr>
@@ -90,7 +92,7 @@
<fieldset class="tabulated">
<legend>{L_ACP_BBCODES}</legend>
- <table cellspacing="1" id="down">
+ <table class="table1 zebra-table" id="down">
<thead>
<tr>
<th>{L_BBCODE_TAG}</th>
@@ -99,9 +101,9 @@
</thead>
<tbody>
<!-- BEGIN bbcodes -->
- <!-- IF bbcodes.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
+ <tr>
<td style="text-align: center;">{bbcodes.BBCODE_TAG}</td>
- <td style="text-align: right; width: 40px;"><a href="{bbcodes.U_EDIT}">{ICON_EDIT}</a> <a href="{bbcodes.U_DELETE}">{ICON_DELETE}</a></td>
+ <td class="actions"><!-- EVENT acp_bbcodes_actions_prepend --> <a href="{bbcodes.U_EDIT}">{ICON_EDIT}</a> <a href="{bbcodes.U_DELETE}" data-ajax="row_delete">{ICON_DELETE}</a> <!-- EVENT acp_bbcodes_actions_append --></td>
</tr>
<!-- BEGINELSE -->
<tr class="row3">
diff --git a/phpBB/adm/style/acp_board.html b/phpBB/adm/style/acp_board.html
index bb16204801..1a09c4eee6 100644
--- a/phpBB/adm/style/acp_board.html
+++ b/phpBB/adm/style/acp_board.html
@@ -1,6 +1,6 @@
<!-- INCLUDE overall_header.html -->
-<a name="maincontent"></a>
+<a id="maincontent"></a>
<h1>{L_TITLE}</h1>
@@ -25,7 +25,7 @@
<!-- ELSE -->
<dl>
- <dt><label for="{options.KEY}">{options.TITLE}:</label><!-- IF options.S_EXPLAIN --><br /><span>{options.TITLE_EXPLAIN}</span><!-- ENDIF --></dt>
+ <dt><label for="{options.KEY}">{options.TITLE}{L_COLON}</label><!-- IF options.S_EXPLAIN --><br /><span>{options.TITLE_EXPLAIN}</span><!-- ENDIF --></dt>
<dd>{options.CONTENT}</dd>
</dl>
@@ -34,7 +34,7 @@
<!-- IF S_AUTH -->
<!-- BEGIN auth_tpl -->
- {auth_tpl.TPL}
+ <!-- INCLUDE {auth_tpl.TEMPLATE_FILE} -->
<!-- END auth_tpl -->
<!-- ENDIF -->
diff --git a/phpBB/adm/style/acp_bots.html b/phpBB/adm/style/acp_bots.html
index 7783356574..b0e61015b6 100644
--- a/phpBB/adm/style/acp_bots.html
+++ b/phpBB/adm/style/acp_bots.html
@@ -1,6 +1,6 @@
<!-- INCLUDE overall_header.html -->
-<a name="maincontent"></a>
+<a id="maincontent"></a>
<!-- IF S_EDIT_BOT -->
@@ -22,27 +22,27 @@
<fieldset>
<legend>{L_TITLE}</legend>
<dl>
- <dt><label for="bot_name">{L_BOT_NAME}:</label><br /><span>{L_BOT_NAME_EXPLAIN}</span></dt>
+ <dt><label for="bot_name">{L_BOT_NAME}{L_COLON}</label><br /><span>{L_BOT_NAME_EXPLAIN}</span></dt>
<dd><input name="bot_name" type="text" id="bot_name" value="{BOT_NAME}" maxlength="255" /></dd>
</dl>
<dl>
- <dt><label for="bot_style">{L_BOT_STYLE}:</label><br /><span>{L_BOT_STYLE_EXPLAIN}</span></dt>
+ <dt><label for="bot_style">{L_BOT_STYLE}{L_COLON}</label><br /><span>{L_BOT_STYLE_EXPLAIN}</span></dt>
<dd><select id="bot_style" name="bot_style">{S_STYLE_OPTIONS}</select></dd>
</dl>
<dl>
- <dt><label for="bot_lang">{L_BOT_LANG}:</label><br /><span>{L_BOT_LANG_EXPLAIN}</span></dt>
+ <dt><label for="bot_lang">{L_BOT_LANG}{L_COLON}</label><br /><span>{L_BOT_LANG_EXPLAIN}</span></dt>
<dd><select id="bot_lang" name="bot_lang">{S_LANG_OPTIONS}</select></dd>
</dl>
<dl>
- <dt><label for="bot_active">{L_BOT_ACTIVE}:</label></dt>
+ <dt><label for="bot_active">{L_BOT_ACTIVE}{L_COLON}</label></dt>
<dd><select id="bot_active" name="bot_active">{S_ACTIVE_OPTIONS}</select></dd>
</dl>
<dl>
- <dt><label for="bot_agent">{L_BOT_AGENT}:</label><br /><span>{L_BOT_AGENT_EXPLAIN}</span></dt>
+ <dt><label for="bot_agent">{L_BOT_AGENT}{L_COLON}</label><br /><span>{L_BOT_AGENT_EXPLAIN}</span></dt>
<dd><input name="bot_agent" type="text" id="bot_agent" value="{BOT_AGENT}" maxlength="255" /></dd>
</dl>
<dl>
- <dt><label for="bot_ip">{L_BOT_IP}:</label><br /><span>{L_BOT_IP_EXPLAIN}</span></dt>
+ <dt><label for="bot_ip">{L_BOT_IP}{L_COLON}</label><br /><span>{L_BOT_IP_EXPLAIN}</span></dt>
<dd><input name="bot_ip" type="text" id="bot_ip" value="{BOT_IP}" maxlength="255" /></dd>
</dl>
@@ -62,7 +62,7 @@
<form id="acp_bots" method="post" action="{U_ACTION}">
- <table cellspacing="1">
+ <table class="table1 zebra-table">
<thead>
<tr>
<th>{L_BOT_NAME}</th>
@@ -73,12 +73,12 @@
</thead>
<tbody>
<!-- BEGIN bots -->
- <!-- IF bots.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
+ <tr>
<td style="width: 50%;">{bots.BOT_NAME}</td>
<td style="width: 15%; white-space: nowrap;" align="center">&nbsp;{bots.LAST_VISIT}&nbsp;</td>
- <td style="text-align: center;">&nbsp;<a href="{bots.U_ACTIVATE_DEACTIVATE}">{bots.L_ACTIVATE_DEACTIVATE}</a>&nbsp;</td>
+ <td style="text-align: center;">&nbsp;<a href="{bots.U_ACTIVATE_DEACTIVATE}" data-ajax="activate_deactivate">{bots.L_ACTIVATE_DEACTIVATE}</a>&nbsp;</td>
<td style="text-align: center;">&nbsp;<a href="{bots.U_EDIT}">{L_EDIT}</a>&nbsp;</td>
- <td style="text-align: center;">&nbsp;<a href="{bots.U_DELETE}">{L_DELETE}</a>&nbsp;</td>
+ <td style="text-align: center;">&nbsp;<a href="{bots.U_DELETE}" data-ajax="row_delete">{L_DELETE}</a>&nbsp;</td>
<td style="text-align: center;"><input type="checkbox" class="radio" name="mark[]" value="{bots.BOT_ID}" /></td>
</tr>
<!-- END bots -->
diff --git a/phpBB/adm/style/acp_captcha.html b/phpBB/adm/style/acp_captcha.html
index 8eee370284..df4c675209 100644
--- a/phpBB/adm/style/acp_captcha.html
+++ b/phpBB/adm/style/acp_captcha.html
@@ -1,6 +1,6 @@
<!-- INCLUDE overall_header.html -->
-<a name="maincontent"></a>
+<a id="maincontent"></a>
<h1>{L_ACP_VC_SETTINGS}</h1>
@@ -13,25 +13,25 @@
<legend>{L_GENERAL_OPTIONS}</legend>
<dl>
- <dt><label for="enable_confirm">{L_VISUAL_CONFIRM_REG}:</label><br /><span>{L_VISUAL_CONFIRM_REG_EXPLAIN}</span></dt>
+ <dt><label for="enable_confirm">{L_VISUAL_CONFIRM_REG}{L_COLON}</label><br /><span>{L_VISUAL_CONFIRM_REG_EXPLAIN}</span></dt>
<dd><label><input type="radio" class="radio" id="enable_confirm" name="enable_confirm" value="1"<!-- IF REG_ENABLE --> checked="checked"<!-- ENDIF --> /> {L_ENABLED}</label>
<label><input type="radio" class="radio" name="enable_confirm" value="0"<!-- IF not REG_ENABLE --> checked="checked"<!-- ENDIF --> /> {L_DISABLED}</label></dd>
</dl>
<dl>
- <dt><label for="max_reg_attempts">{L_REG_LIMIT}:</label><br /><span>{L_REG_LIMIT_EXPLAIN}</span></dt>
- <dd><input id="max_reg_attempts" type="text" size="4" maxlength="4" name="max_reg_attempts" value="{REG_LIMIT}" /></dd>
+ <dt><label for="max_reg_attempts">{L_REG_LIMIT}{L_COLON}</label><br /><span>{L_REG_LIMIT_EXPLAIN}</span></dt>
+ <dd><input id="max_reg_attempts" type="number" size="4" maxlength="4" min="0" max="9999" name="max_reg_attempts" value="{REG_LIMIT}" /></dd>
</dl>
<dl>
- <dt><label for="max_login_attempts">{L_MAX_LOGIN_ATTEMPTS}:</label><br /><span>{L_MAX_LOGIN_ATTEMPTS_EXPLAIN}</span></dt>
- <dd><input id="max_login_attempts" type="text" size="4" maxlength="4" name="max_login_attempts" value="{MAX_LOGIN_ATTEMPTS}" /></dd>
+ <dt><label for="max_login_attempts">{L_MAX_LOGIN_ATTEMPTS}{L_COLON}</label><br /><span>{L_MAX_LOGIN_ATTEMPTS_EXPLAIN}</span></dt>
+ <dd><input id="max_login_attempts" type="number" size="4" maxlength="4" min="0" max="9999" name="max_login_attempts" value="{MAX_LOGIN_ATTEMPTS}" /></dd>
</dl>
<dl>
- <dt><label for="enable_post_confirm">{L_VISUAL_CONFIRM_POST}:</label><br /><span>{L_VISUAL_CONFIRM_POST_EXPLAIN}</span></dt>
+ <dt><label for="enable_post_confirm">{L_VISUAL_CONFIRM_POST}{L_COLON}</label><br /><span>{L_VISUAL_CONFIRM_POST_EXPLAIN}</span></dt>
<dd><label><input type="radio" class="radio" id="enable_post_confirm" name="enable_post_confirm" value="1"<!-- IF POST_ENABLE --> checked="checked"<!-- ENDIF --> /> {L_ENABLED}</label>
<label><input type="radio" class="radio" name="enable_post_confirm" value="0"<!-- IF not POST_ENABLE --> checked="checked"<!-- ENDIF --> /> {L_DISABLED}</label></dd>
</dl>
<dl>
- <dt><label for="confirm_refresh">{L_VISUAL_CONFIRM_REFRESH}:</label><br /><span>{L_VISUAL_CONFIRM_REFRESH_EXPLAIN}</span></dt>
+ <dt><label for="confirm_refresh">{L_VISUAL_CONFIRM_REFRESH}{L_COLON}</label><br /><span>{L_VISUAL_CONFIRM_REFRESH_EXPLAIN}</span></dt>
<dd><label><input type="radio" class="radio" id="confirm_refresh" name="confirm_refresh" value="1"<!-- IF CONFIRM_REFRESH --> checked="checked"<!-- ENDIF --> /> {L_ENABLED}</label>
<label><input type="radio" class="radio" name="confirm_refresh" value="0"<!-- IF not CONFIRM_REFRESH --> checked="checked"<!-- ENDIF --> /> {L_DISABLED}</label></dd>
</dl>
@@ -40,12 +40,12 @@
<fieldset>
<legend>{L_AVAILABLE_CAPTCHAS}</legend>
<dl>
- <dt><label for="captcha_select">{L_CAPTCHA_SELECT}:</label><br /><span>{L_CAPTCHA_SELECT_EXPLAIN}</span></dt>
+ <dt><label for="captcha_select">{L_CAPTCHA_SELECT}{L_COLON}</label><br /><span>{L_CAPTCHA_SELECT_EXPLAIN}</span></dt>
<dd><select id="captcha_select" name="select_captcha" onchange="(document.getElementById('acp_captcha')).submit()" >{CAPTCHA_SELECT}</select></dd>
</dl>
<!-- IF S_CAPTCHA_HAS_CONFIG -->
<dl>
- <dt><label for="configure">{L_CAPTCHA_CONFIGURE}:</label><br /><span>{L_CAPTCHA_CONFIGURE_EXPLAIN}</span></dt>
+ <dt><label for="configure">{L_CAPTCHA_CONFIGURE}{L_COLON}</label><br /><span>{L_CAPTCHA_CONFIGURE_EXPLAIN}</span></dt>
<dd><input class="button2" type="submit" id="configure" name="configure" value="{L_CONFIGURE}" /></dd>
</dl>
<!-- ENDIF -->
diff --git a/phpBB/adm/style/acp_database.html b/phpBB/adm/style/acp_database.html
index de02ac6dbe..bf0c80bcd9 100644
--- a/phpBB/adm/style/acp_database.html
+++ b/phpBB/adm/style/acp_database.html
@@ -1,6 +1,6 @@
<!-- INCLUDE overall_header.html -->
-<a name="maincontent"></a>
+<a id="maincontent"></a>
<!-- IF MODE eq 'restore' -->
<h1>{L_ACP_RESTORE}</h1>
@@ -13,7 +13,7 @@
<fieldset>
<legend>{L_RESTORE_OPTIONS}</legend>
<dl>
- <dt><label for="file">{L_SELECT_FILE}:</label></dt>
+ <dt><label for="file">{L_SELECT_FILE}{L_COLON}</label></dt>
<dd><select id="file" name="file" size="10"><!-- BEGIN files --><option value="{files.FILE}"<!-- IF files.S_LAST_ROW --> selected="selected"<!-- ENDIF -->>{files.NAME}</option><!-- END files --></select></dd>
</dl>
@@ -57,26 +57,26 @@
<fieldset>
<legend>{L_BACKUP_OPTIONS}</legend>
<dl>
- <dt><label for="type">{L_BACKUP_TYPE}:</label></dt>
+ <dt><label for="type">{L_BACKUP_TYPE}{L_COLON}</label></dt>
<dd><label><input type="radio" class="radio" name="type" value="full" id="type" checked="checked" /> {L_FULL_BACKUP}</label>
<label><input type="radio" name="type" class="radio" value="structure" /> {L_STRUCTURE_ONLY}</label>
<label><input type="radio" class="radio" name="type" value="data" /> {L_DATA_ONLY}</label></dd>
</dl>
<dl>
- <dt><label for="method">{L_FILE_TYPE}:</label></dt>
+ <dt><label for="method">{L_FILE_TYPE}{L_COLON}</label></dt>
<dd><!-- BEGIN methods -->
<label><input name="method"<!-- IF methods.S_FIRST_ROW --> id="method" checked="checked"<!-- ENDIF --> type="radio" class="radio" value="{methods.TYPE}" /> {methods.TYPE}</label>
<!-- END methods --></dd>
</dl>
<dl>
- <dt><label for="where">{L_ACTION}:</label></dt>
+ <dt><label for="where">{L_ACTION}{L_COLON}</label></dt>
<dd>
<label><input id="where" type="radio" class="radio" name="where" value="store" checked="checked" /> {L_STORE_LOCAL}</label>
<label><input type="radio" class="radio" name="where" value="download" /> {L_DOWNLOAD}</label>
</dd>
</dl>
<dl>
- <dt><label for="table">{L_TABLE_SELECT}:</label></dt>
+ <dt><label for="table">{L_TABLE_SELECT}{L_COLON}</label></dt>
<dd><select id="table" name="table[]" size="10" multiple="multiple">
<!-- BEGIN tables -->
<option value="{tables.TABLE}">{tables.TABLE}</option>
diff --git a/phpBB/adm/style/acp_disallow.html b/phpBB/adm/style/acp_disallow.html
index b68d3ab3c0..0608f29474 100644
--- a/phpBB/adm/style/acp_disallow.html
+++ b/phpBB/adm/style/acp_disallow.html
@@ -1,6 +1,6 @@
<!-- INCLUDE overall_header.html -->
-<a name="maincontent"></a>
+<a id="maincontent"></a>
<h1>{L_ACP_DISALLOW_USERNAMES}</h1>
@@ -11,7 +11,7 @@
<fieldset>
<legend>{L_ADD_DISALLOW_TITLE}</legend>
<dl>
- <dt><label for="user">{L_USERNAME}:</label><br /><span>{L_ADD_DISALLOW_EXPLAIN}</span></dt>
+ <dt><label for="user">{L_USERNAME}{L_COLON}</label><br /><span>{L_ADD_DISALLOW_EXPLAIN}</span></dt>
<dd><input id="user" type="text" class="text medium" maxlength="255" name="disallowed_user" /></dd>
</dl>
@@ -28,7 +28,7 @@
<legend>{L_DELETE_DISALLOW_TITLE}</legend>
<!-- IF S_DISALLOWED_NAMES -->
<dl>
- <dt><label for="disallowed">{L_USERNAME}:</label></dt>
+ <dt><label for="disallowed">{L_USERNAME}{L_COLON}</label></dt>
<dd><select name="disallowed_id" id="disallowed">{S_DISALLOWED_NAMES}</select></dd>
</dl>
diff --git a/phpBB/adm/style/acp_email.html b/phpBB/adm/style/acp_email.html
index ff52500dca..950ecb40b0 100644
--- a/phpBB/adm/style/acp_email.html
+++ b/phpBB/adm/style/acp_email.html
@@ -1,6 +1,6 @@
<!-- INCLUDE overall_header.html -->
-<a name="maincontent"></a>
+<a id="maincontent"></a>
<h1>{L_ACP_MASS_EMAIL}</h1>
@@ -18,32 +18,32 @@
<fieldset>
<legend>{L_COMPOSE}</legend>
<dl>
- <dt><label for="group">{L_SEND_TO_GROUP}:</label></dt>
+ <dt><label for="group">{L_SEND_TO_GROUP}{L_COLON}</label></dt>
<dd><select id="group" name="g">{S_GROUP_OPTIONS}</select></dd>
</dl>
<dl>
- <dt><label for="usernames">{L_SEND_TO_USERS}:</label><br /><span>{L_SEND_TO_USERS_EXPLAIN}</span></dt>
+ <dt><label for="usernames">{L_SEND_TO_USERS}{L_COLON}</label><br /><span>{L_SEND_TO_USERS_EXPLAIN}</span></dt>
<dd><textarea name="usernames" id="usernames" rows="5" cols="40">{USERNAMES}</textarea></dd>
<dd>[ <a href="{U_FIND_USERNAME}" onclick="find_username(this.href); return false;">{L_FIND_USERNAME}</a> ]</dd>
</dl>
<dl>
- <dt><label for="subject">{L_SUBJECT}:</label></dt>
+ <dt><label for="subject">{L_SUBJECT}{L_COLON}</label></dt>
<dd><input name="subject" type="text" id="subject" value="{SUBJECT}" /></dd>
</dl>
<dl>
- <dt><label for="message">{L_MASS_MESSAGE}:</label><br /><span>{L_MASS_MESSAGE_EXPLAIN}</span></dt>
+ <dt><label for="message">{L_MASS_MESSAGE}{L_COLON}</label><br /><span>{L_MASS_MESSAGE_EXPLAIN}</span></dt>
<dd><textarea id="message" name="message" rows="10" cols="60">{MESSAGE}</textarea></dd>
</dl>
<dl>
- <dt><label for="priority">{L_MAIL_PRIORITY}:</label></dt>
+ <dt><label for="priority">{L_MAIL_PRIORITY}{L_COLON}</label></dt>
<dd><select id="priority" name="mail_priority_flag">{S_PRIORITY_OPTIONS}</select></dd>
</dl>
<dl>
- <dt><label for="banned">{L_MAIL_BANNED}:</label><br /><span>{L_MAIL_BANNED_EXPLAIN}</span></dt>
+ <dt><label for="banned">{L_MAIL_BANNED}{L_COLON}</label><br /><span>{L_MAIL_BANNED_EXPLAIN}</span></dt>
<dd><input id="banned" name="mail_banned_flag" type="checkbox" class="radio" /></dd>
</dl>
<dl>
- <dt><label for="send">{L_SEND_IMMEDIATELY}:</label></dt>
+ <dt><label for="send">{L_SEND_IMMEDIATELY}{L_COLON}</label></dt>
<dd><input id="send" type="checkbox" class="radio" name="send_immediately" checked="checked" /></dd>
</dl>
diff --git a/phpBB/adm/style/acp_ext_delete_data.html b/phpBB/adm/style/acp_ext_delete_data.html
new file mode 100644
index 0000000000..0f3adb7cfe
--- /dev/null
+++ b/phpBB/adm/style/acp_ext_delete_data.html
@@ -0,0 +1,40 @@
+<!-- INCLUDE overall_header.html -->
+
+ <a id="maincontent"></a>
+
+ <h1>{L_EXTENSIONS_ADMIN}</h1>
+
+ <p>{L_EXTENSIONS_EXPLAIN}</p>
+ <p>{L_EXTENSION_DELETE_DATA_EXPLAIN}</p>
+
+ <!-- IF MIGRATOR_ERROR -->
+ <div class="errorbox">
+ <p><strong>{L_MIGRATION_EXCEPTION_ERROR}</strong></p>
+ <p>{MIGRATOR_ERROR}</p>
+ <p><a href="{U_RETURN}">{L_RETURN_TO_EXTENSION_LIST}</a></p>
+ </div>
+ <!-- ELSEIF PRE -->
+ <div class="errorbox">
+ <p>{L_CONFIRM_MESSAGE}</p>
+ </div>
+
+ <form id="acp_extensions" method="post" action="{U_PURGE}">
+ <fieldset class="submit-buttons">
+ <legend>{L_EXTENSION_DELETE_DATA}</legend>
+ <input class="button1" type="submit" name="delete_data" value="{L_EXTENSION_DELETE_DATA}" />
+ <input class="button2" type="submit" name="cancel" value="{L_CANCEL}" />
+ </fieldset>
+ </form>
+ <!-- ELSEIF S_NEXT_STEP -->
+ <div class="errorbox">
+ <p>{L_EXTENSION_DELETE_DATA_IN_PROGRESS}</p>
+ </div>
+ <!-- ELSE -->
+ <div class="successbox">
+ <p>{L_EXTENSION_DELETE_DATA_SUCCESS}</p>
+ <br />
+ <p><a href="{U_RETURN}">{L_RETURN_TO_EXTENSION_LIST}</a></p>
+ </div>
+ <!-- ENDIF -->
+
+<!-- INCLUDE overall_footer.html -->
diff --git a/phpBB/adm/style/acp_ext_details.html b/phpBB/adm/style/acp_ext_details.html
new file mode 100644
index 0000000000..6aff4b29cc
--- /dev/null
+++ b/phpBB/adm/style/acp_ext_details.html
@@ -0,0 +1,97 @@
+<!-- INCLUDE overall_header.html -->
+
+<a id="maincontent"></a>
+
+ <a href="{U_BACK}" style="float: {S_CONTENT_FLOW_END};">&laquo; {L_BACK}</a>
+
+ <h1>{L_EXTENSIONS_ADMIN}</h1>
+
+ <fieldset>
+ <legend>{L_EXT_DETAILS}</legend>
+ <!-- IF META_DISPLAY_NAME -->
+ <dl>
+ <dt><label>{L_DISPLAY_NAME}{L_COLON}</label></dt>
+ <dd><strong id="meta_display_name">{META_DISPLAY_NAME}</strong></dd>
+ </dl>
+ <!-- ENDIF -->
+ <dl>
+ <dt><label>{L_CLEAN_NAME}{L_COLON}</label></dt>
+ <dd><strong id="meta_name">{META_NAME}</strong></dd>
+ </dl>
+ <!-- IF META_DESCRIPTION -->
+ <dl>
+ <dt><label>{L_DESCRIPTION}{L_COLON}</label></dt>
+ <dd><span id="meta_description">{META_DESCRIPTION}</span></dd>
+ </dl>
+ <!-- ENDIF -->
+ <dl>
+ <dt><label>{L_VERSION}{L_COLON}</label></dt>
+ <dd><span id="meta_version">{META_VERSION}</span></dd>
+ </dl>
+ <!-- IF META_HOMEPAGE -->
+ <dl>
+ <dt><label>{L_HOMEPAGE}{L_COLON}</label></dt>
+ <dd><strong id="meta_homepage"><a href="{META_HOMEPAGE}">{META_HOMEPAGE}</a></strong></dd>
+ </dl>
+ <!-- ENDIF -->
+ <!-- IF META_TIME -->
+ <dl>
+ <dt><label>{L_TIME}{L_COLON}</label></dt>
+ <dd><span id="meta_time">{META_TIME}</span></dd>
+ </dl>
+ <!-- ENDIF -->
+ <dl>
+ <dt><label>{L_LICENSE}{L_COLON}</label></dt>
+ <dd><span id="meta_license">{META_LICENSE}</span></dd>
+ </dl>
+ </fieldset>
+
+ <!-- IF META_REQUIRE_PHPBB || META_REQUIRE_PHP -->
+ <fieldset>
+ <legend>{L_REQUIREMENTS}</legend>
+ <!-- IF META_REQUIRE_PHPBB -->
+ <dl<!-- IF META_REQUIRE_PHPBB_FAIL --> class="requirements_not_met"<!-- ENDIF -->>
+ <dt><label>{L_PHPBB_VERSION}{L_COLON}</label></dt>
+ <dd><span id="require_phpbb">{META_REQUIRE_PHPBB}</span></dd>
+ </dl>
+ <!-- ENDIF -->
+ <!-- IF META_REQUIRE_PHP -->
+ <dl<!-- IF META_REQUIRE_PHP_FAIL --> class="requirements_not_met"<!-- ENDIF -->>
+ <dt><label>{L_PHP_VERSION}{L_COLON}</label></dt>
+ <dd><span id="require_php">{META_REQUIRE_PHP}</span></dd>
+ </dl>
+ <!-- ENDIF -->
+ </fieldset>
+ <!-- ENDIF -->
+
+ <fieldset>
+ <legend>{L_AUTHOR_INFORMATION}</legend>
+ <!-- BEGIN meta_authors -->
+ <fieldset>
+ <dl>
+ <dt><label>{L_AUTHOR_NAME}{L_COLON}</label></dt>
+ <dd><strong>{meta_authors.AUTHOR_NAME}</strong></dd>
+ </dl>
+ <!-- IF meta_authors.AUTHOR_EMAIL -->
+ <dl>
+ <dt><label>{L_AUTHOR_EMAIL}{L_COLON}</label></dt>
+ <dd><strong><a href="mailto:{meta_authors.AUTHOR_EMAIL}">{meta_authors.AUTHOR_EMAIL}</a></strong></dd>
+ </dl>
+ <!-- ENDIF -->
+ <!-- IF meta_authors.AUTHOR_HOMEPAGE -->
+ <dl>
+ <dt><label>{L_AUTHOR_HOMEPAGE}{L_COLON}</label></dt>
+ <dd><strong><a href="{meta_authors.AUTHOR_HOMEPAGE}">{meta_authors.AUTHOR_HOMEPAGE}</a></strong></dd>
+ </dl>
+ <!-- ENDIF -->
+ <!-- IF meta_authors.AUTHOR_ROLE -->
+ <dl>
+ <dt><label>{L_AUTHOR_ROLE}{L_COLON}</label></dt>
+ <dd><strong>{meta_authors.AUTHOR_ROLE}</strong></dd>
+ </dl>
+ <!-- ENDIF -->
+ </fieldset>
+ <!-- END meta_authors -->
+ </fieldset>
+
+<!-- INCLUDE overall_footer.html -->
diff --git a/phpBB/adm/style/acp_ext_disable.html b/phpBB/adm/style/acp_ext_disable.html
new file mode 100644
index 0000000000..d650544ff7
--- /dev/null
+++ b/phpBB/adm/style/acp_ext_disable.html
@@ -0,0 +1,34 @@
+<!-- INCLUDE overall_header.html -->
+
+ <a id="maincontent"></a>
+
+ <h1>{L_EXTENSIONS_ADMIN}</h1>
+
+ <p>{L_EXTENSIONS_EXPLAIN}</p>
+ <p>{L_EXTENSION_DISABLE_EXPLAIN}</p>
+
+ <!-- IF PRE -->
+ <div class="errorbox">
+ <p>{L_CONFIRM_MESSAGE}</p>
+ </div>
+
+ <form id="acp_extensions" method="post" action="{U_DISABLE}">
+ <fieldset class="submit-buttons">
+ <legend>{L_EXTENSION_DISABLE}</legend>
+ <input class="button1" type="submit" name="disable" value="{L_EXTENSION_DISABLE}" />
+ <input class="button2" type="submit" name="cancel" value="{L_CANCEL}" />
+ </fieldset>
+ </form>
+ <!-- ELSEIF S_NEXT_STEP -->
+ <div class="errorbox">
+ <p>{L_EXTENSION_DISABLE_IN_PROGRESS}</p>
+ </div>
+ <!-- ELSE -->
+ <div class="successbox">
+ <p>{L_EXTENSION_DISABLE_SUCCESS}</p>
+ <br />
+ <p><a href="{U_RETURN}">{L_RETURN_TO_EXTENSION_LIST}</a></p>
+ </div>
+ <!-- ENDIF -->
+
+<!-- INCLUDE overall_footer.html -->
diff --git a/phpBB/adm/style/acp_ext_enable.html b/phpBB/adm/style/acp_ext_enable.html
new file mode 100644
index 0000000000..42523f1f58
--- /dev/null
+++ b/phpBB/adm/style/acp_ext_enable.html
@@ -0,0 +1,40 @@
+<!-- INCLUDE overall_header.html -->
+
+ <a id="maincontent"></a>
+
+ <h1>{L_EXTENSIONS_ADMIN}</h1>
+
+ <p>{L_EXTENSIONS_EXPLAIN}</p>
+ <p>{L_EXTENSION_ENABLE_EXPLAIN}</p>
+
+ <!-- IF MIGRATOR_ERROR -->
+ <div class="errorbox">
+ <p><strong>{L_MIGRATION_EXCEPTION_ERROR}</strong></p>
+ <p>{MIGRATOR_ERROR}</p>
+ <p><a href="{U_RETURN}">{L_RETURN_TO_EXTENSION_LIST}</a></p>
+ </div>
+ <!-- ELSEIF PRE -->
+ <div class="errorbox">
+ <p>{L_CONFIRM_MESSAGE}</p>
+ </div>
+
+ <form id="acp_extensions" method="post" action="{U_ENABLE}">
+ <fieldset class="submit-buttons">
+ <legend>{L_EXTENSION_ENABLE}</legend>
+ <input class="button1" type="submit" name="enable" value="{L_EXTENSION_ENABLE}" />
+ <input class="button2" type="submit" name="cancel" value="{L_CANCEL}" />
+ </fieldset>
+ </form>
+ <!-- ELSEIF S_NEXT_STEP -->
+ <div class="errorbox">
+ <p>{L_EXTENSION_ENABLE_IN_PROGRESS}</p>
+ </div>
+ <!-- ELSE -->
+ <div class="successbox">
+ <p>{L_EXTENSION_ENABLE_SUCCESS}</p>
+ <br />
+ <p><a href="{U_RETURN}">{L_RETURN_TO_EXTENSION_LIST}</a></p>
+ </div>
+ <!-- ENDIF -->
+
+<!-- INCLUDE overall_footer.html -->
diff --git a/phpBB/adm/style/acp_ext_list.html b/phpBB/adm/style/acp_ext_list.html
new file mode 100644
index 0000000000..2fcc6eab31
--- /dev/null
+++ b/phpBB/adm/style/acp_ext_list.html
@@ -0,0 +1,76 @@
+<!-- INCLUDE overall_header.html -->
+
+<a id="maincontent"></a>
+
+ <h1>{L_EXTENSIONS_ADMIN}</h1>
+
+ <p>{L_EXTENSIONS_EXPLAIN}</p>
+
+ <table class="table1">
+ <col class="row1" ><col class="row2" ><col class="row2" >
+ <thead>
+ <tr>
+ <th>{L_EXTENSION_NAME}</th>
+ <th>{L_EXTENSION_OPTIONS}</th>
+ <th>{L_EXTENSION_ACTIONS}</th>
+ </tr>
+ </thead>
+ <tbody>
+ <!-- IF .enabled -->
+ <tr>
+ <td class="row3" colspan="3"><strong>{L_EXTENSIONS_ENABLED}</strong></td>
+ </tr>
+ <!-- BEGIN enabled -->
+ <tr class="ext_enabled">
+ <td><strong>{enabled.META_DISPLAY_NAME}</strong></td>
+ <td style="text-align: center;"><a href="{enabled.U_DETAILS}">{L_DETAILS}</a></td>
+ <td style="text-align: center;">
+ <!-- BEGIN actions -->
+ <a href="{enabled.actions.U_ACTION}"<!-- IF enabled.actions.L_ACTION_EXPLAIN --> title="{enabled.actions.L_ACTION_EXPLAIN}"<!-- ENDIF -->>{enabled.actions.L_ACTION}</a>
+ <!-- IF not enabled.actions.S_LAST_ROW -->&nbsp;|&nbsp;<!-- ENDIF -->
+ <!-- END actions -->
+ </td>
+ </tr>
+ <!-- END enabled -->
+ <!-- ENDIF -->
+
+ <!-- IF .disabled -->
+ <tr>
+ <td class="row3" colspan="3"><strong>{L_EXTENSIONS_DISABLED}</strong></td>
+ </tr>
+ <!-- BEGIN disabled -->
+ <tr class="ext_disabled">
+ <td><strong>{disabled.META_DISPLAY_NAME}</strong></td>
+ <td style="text-align: center;">
+ <!-- IF disabled.U_DETAILS --><a href="{disabled.U_DETAILS}">{L_DETAILS}</a><!-- ENDIF -->
+ </td>
+ <td style="text-align: center;">
+ <!-- BEGIN actions -->
+ <a href="{disabled.actions.U_ACTION}"<!-- IF disabled.actions.L_ACTION_EXPLAIN --> title="{disabled.actions.L_ACTION_EXPLAIN}"<!-- ENDIF -->>{disabled.actions.L_ACTION}</a>
+ <!-- IF not disabled.actions.S_LAST_ROW -->&nbsp;|&nbsp;<!-- ENDIF -->
+ <!-- END actions -->
+ </td>
+ </tr>
+ <!-- END disabled -->
+ <!-- ENDIF -->
+ </tbody>
+ </table>
+ <br />
+
+ <table class="table1">
+ <tr>
+ <th>{L_EXTENSION_UPDATE_HEADLINE}</th>
+ </tr>
+ <tr>
+ <td class="row3">{L_EXTENSION_UPDATE_EXPLAIN}</td>
+ </tr>
+ <tr>
+ <th>{L_EXTENSION_REMOVE_HEADLINE}</th>
+ </tr>
+ <tr>
+ <td class="row3">{L_EXTENSION_REMOVE_EXPLAIN}</td>
+ </tr>
+ </tbody>
+ </table>
+
+<!-- INCLUDE overall_footer.html -->
diff --git a/phpBB/adm/style/acp_forums.html b/phpBB/adm/style/acp_forums.html
index 8577c08860..e8b20007dc 100644
--- a/phpBB/adm/style/acp_forums.html
+++ b/phpBB/adm/style/acp_forums.html
@@ -1,6 +1,6 @@
<!-- INCLUDE overall_header.html -->
-<a name="maincontent"></a>
+<a id="maincontent"></a>
<!-- IF S_EDIT_FORUM -->
@@ -112,13 +112,13 @@
<fieldset>
<legend>{L_FORUM_SETTINGS}</legend>
<dl>
- <dt><label for="forum_type">{L_FORUM_TYPE}:</label></dt>
+ <dt><label for="forum_type">{L_FORUM_TYPE}{L_COLON}</label></dt>
<dd><select id="forum_type" name="forum_type" onchange="display_options(this.options[this.selectedIndex].value);">{S_FORUM_TYPE_OPTIONS}</select></dd>
</dl>
<!-- IF not S_ADD_ACTION and S_FORUM_ORIG_POST -->
<div id="type_actions">
<dl>
- <dt><label for="type_action">{L_DECIDE_MOVE_DELETE_CONTENT}:</label></dt>
+ <dt><label for="type_action">{L_DECIDE_MOVE_DELETE_CONTENT}{L_COLON}</label></dt>
<dd><label><input type="radio" class="radio" name="type_action" value="delete"<!-- IF not S_MOVE_FORUM_OPTIONS --> checked="checked" id="type_action"<!-- ENDIF --> /> {L_DELETE_ALL_POSTS}</label></dd>
<!-- IF S_MOVE_FORUM_OPTIONS --><dd><label><input type="radio" class="radio" name="type_action" id="type_action" value="move" checked="checked" /> {L_MOVE_POSTS_TO}</label> <select name="to_forum_id">{S_MOVE_FORUM_OPTIONS}</select></dd><!-- ENDIF -->
</dl>
@@ -127,7 +127,7 @@
<!-- IF not S_ADD_ACTION and S_FORUM_ORIG_CAT and S_HAS_SUBFORUMS -->
<div id="cat_to_link_actions">
<dl>
- <dt><label for="action_subforums">{L_DECIDE_MOVE_DELETE_SUBFORUMS}:</label></dt>
+ <dt><label for="action_subforums">{L_DECIDE_MOVE_DELETE_SUBFORUMS}{L_COLON}</label></dt>
<!-- IF S_FORUMS_LIST -->
<dd><label><input type="radio" class="radio" id="action_subforums" name="action_subforums" value="move" checked="checked" /> {L_MOVE_SUBFORUMS_TO}</label> <select name="subforums_to_id">{S_FORUMS_LIST}</select></dd>
<!-- ELSE -->
@@ -137,49 +137,49 @@
</div>
<!-- ENDIF -->
<dl>
- <dt><label for="parent">{L_FORUM_PARENT}:</label></dt>
+ <dt><label for="parent">{L_FORUM_PARENT}{L_COLON}</label></dt>
<dd><select id="parent" name="forum_parent_id"><option value="0"<!-- IF not S_FORUM_PARENT_ID --> selected="selected"<!-- ENDIF -->>{L_NO_PARENT}</option>{S_PARENT_OPTIONS}</select></dd>
</dl>
<!-- IF S_CAN_COPY_PERMISSIONS -->
<dl>
- <dt><label for="forum_perm_from">{L_COPY_PERMISSIONS}:</label><br /><span>{L_COPY_PERMISSIONS_EXPLAIN}</span></dt>
+ <dt><label for="forum_perm_from">{L_COPY_PERMISSIONS}{L_COLON}</label><br /><span>{L_COPY_PERMISSIONS_EXPLAIN}</span></dt>
<dd><select id="forum_perm_from" name="forum_perm_from"><option value="0">{L_NO_PERMISSIONS}</option>{S_FORUM_OPTIONS}</select></dd>
</dl>
<!-- ENDIF -->
<dl>
- <dt><label for="forum_name">{L_FORUM_NAME}:</label></dt>
+ <dt><label for="forum_name">{L_FORUM_NAME}{L_COLON}</label></dt>
<dd><input class="text medium" type="text" id="forum_name" name="forum_name" value="{FORUM_NAME}" maxlength="255" /></dd>
</dl>
<dl>
- <dt><label for="forum_desc">{L_FORUM_DESC}:</label><br /><span>{L_FORUM_DESC_EXPLAIN}</span></dt>
- <dd><textarea id="forum_desc" name="forum_desc" rows="5" cols="45">{FORUM_DESC}</textarea></dd>
+ <dt><label for="forum_desc">{L_FORUM_DESC}{L_COLON}</label><br /><span>{L_FORUM_DESC_EXPLAIN}</span></dt>
+ <dd><textarea id="forum_desc" name="forum_desc" rows="5" cols="45" data-bbcode="true">{FORUM_DESC}</textarea></dd>
<dd><label><input type="checkbox" class="radio" name="desc_parse_bbcode"<!-- IF S_DESC_BBCODE_CHECKED --> checked="checked"<!-- ENDIF --> /> {L_PARSE_BBCODE}</label>
<label><input type="checkbox" class="radio" name="desc_parse_smilies"<!-- IF S_DESC_SMILIES_CHECKED --> checked="checked"<!-- ENDIF --> /> {L_PARSE_SMILIES}</label>
<label><input type="checkbox" class="radio" name="desc_parse_urls"<!-- IF S_DESC_URLS_CHECKED --> checked="checked"<!-- ENDIF --> /> {L_PARSE_URLS}</label></dd>
</dl>
<dl>
- <dt><label for="forum_image">{L_FORUM_IMAGE}:</label><br /><span>{L_FORUM_IMAGE_EXPLAIN}</span></dt>
+ <dt><label for="forum_image">{L_FORUM_IMAGE}{L_COLON}</label><br /><span>{L_FORUM_IMAGE_EXPLAIN}</span></dt>
<dd><input class="text medium" type="text" id="forum_image" name="forum_image" value="{FORUM_IMAGE}" maxlength="255" /></dd>
<!-- IF FORUM_IMAGE_SRC -->
<dd><img src="{FORUM_IMAGE_SRC}" alt="{L_FORUM_IMAGE}" /></dd>
<!-- ENDIF -->
</dl>
<dl>
- <dt><label for="forum_password">{L_FORUM_PASSWORD}:</label><br /><span>{L_FORUM_PASSWORD_EXPLAIN}</span></dt>
+ <dt><label for="forum_password">{L_FORUM_PASSWORD}{L_COLON}</label><br /><span>{L_FORUM_PASSWORD_EXPLAIN}</span></dt>
<dd><input type="password" id="forum_password" name="forum_password" value="<!-- IF S_FORUM_PASSWORD_SET -->&#x20;&#x20;&#x20;&#x20;&#x20;&#x20;<!-- ENDIF -->" autocomplete="off" /></dd>
</dl>
<dl>
- <dt><label for="forum_password_confirm">{L_FORUM_PASSWORD_CONFIRM}:</label><br /><span>{L_FORUM_PASSWORD_CONFIRM_EXPLAIN}</span></dt>
+ <dt><label for="forum_password_confirm">{L_FORUM_PASSWORD_CONFIRM}{L_COLON}</label><br /><span>{L_FORUM_PASSWORD_CONFIRM_EXPLAIN}</span></dt>
<dd><input type="password" id="forum_password_confirm" name="forum_password_confirm" value="<!-- IF S_FORUM_PASSWORD_SET -->&#x20;&#x20;&#x20;&#x20;&#x20;&#x20;<!-- ENDIF -->" autocomplete="off" /></dd>
</dl>
<!-- IF S_FORUM_PASSWORD_SET -->
<dl>
- <dt><label for="forum_password_unset">{L_FORUM_PASSWORD_UNSET}:</label><br /><span>{L_FORUM_PASSWORD_UNSET_EXPLAIN}</span></dt>
+ <dt><label for="forum_password_unset">{L_FORUM_PASSWORD_UNSET}{L_COLON}</label><br /><span>{L_FORUM_PASSWORD_UNSET_EXPLAIN}</span></dt>
<dd><input id="forum_password_unset" name="forum_password_unset" type="checkbox" /></dd>
</dl>
<!-- ENDIF -->
<dl>
- <dt><label for="forum_style">{L_FORUM_STYLE}:</label></dt>
+ <dt><label for="forum_style">{L_FORUM_STYLE}{L_COLON}</label></dt>
<dd><select id="forum_style" name="forum_style"><option value="0">{L_DEFAULT_STYLE}</option>{S_STYLES_OPTIONS}</select></dd>
</dl>
</fieldset>
@@ -188,7 +188,7 @@
<fieldset>
<legend>{L_GENERAL_FORUM_SETTINGS}</legend>
<dl>
- <dt><label for="display_active">{L_DISPLAY_ACTIVE_TOPICS}:</label><br /><span>{L_DISPLAY_ACTIVE_TOPICS_EXPLAIN}</span></dt>
+ <dt><label for="display_active">{L_DISPLAY_ACTIVE_TOPICS}{L_COLON}</label><br /><span>{L_DISPLAY_ACTIVE_TOPICS_EXPLAIN}</span></dt>
<dd><label><input type="radio" class="radio" name="display_active" value="1"<!-- IF S_ENABLE_ACTIVE_TOPICS --> id="display_active" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label><input type="radio" class="radio" name="display_active" value="0"<!-- IF not S_ENABLE_ACTIVE_TOPICS --> id="display_active" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
</dl>
@@ -199,81 +199,82 @@
<fieldset>
<legend>{L_GENERAL_FORUM_SETTINGS}</legend>
<dl>
- <dt><label for="forum_status">{L_FORUM_STATUS}:</label></dt>
+ <dt><label for="forum_status">{L_FORUM_STATUS}{L_COLON}</label></dt>
<dd><select id="forum_status" name="forum_status">{S_STATUS_OPTIONS}</select></dd>
</dl>
<dl>
- <dt><label for="display_subforum_list">{L_LIST_SUBFORUMS}:</label><br /><span>{L_LIST_SUBFORUMS_EXPLAIN}</span></dt>
+ <dt><label for="display_subforum_list">{L_LIST_SUBFORUMS}{L_COLON}</label><br /><span>{L_LIST_SUBFORUMS_EXPLAIN}</span></dt>
<dd><label><input type="radio" class="radio" name="display_subforum_list" value="1"<!-- IF S_DISPLAY_SUBFORUM_LIST --> id="display_subforum_list" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label><input type="radio" class="radio" name="display_subforum_list" value="0"<!-- IF not S_DISPLAY_SUBFORUM_LIST --> id="display_subforum_list" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
</dl>
<dl>
- <dt><label for="display_on_index">{L_LIST_INDEX}:</label><br /><span>{L_LIST_INDEX_EXPLAIN}</span></dt>
+ <dt><label for="display_on_index">{L_LIST_INDEX}{L_COLON}</label><br /><span>{L_LIST_INDEX_EXPLAIN}</span></dt>
<dd><label><input type="radio" class="radio" name="display_on_index" value="1"<!-- IF S_DISPLAY_ON_INDEX --> id="display_on_index" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label><input type="radio" class="radio" name="display_on_index" value="0"<!-- IF not S_DISPLAY_ON_INDEX --> id="display_on_index" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
</dl>
<dl>
- <dt><label for="enable_post_review">{L_ENABLE_POST_REVIEW}:</label><br /><span>{L_ENABLE_POST_REVIEW_EXPLAIN}</span></dt>
+ <dt><label for="enable_post_review">{L_ENABLE_POST_REVIEW}{L_COLON}</label><br /><span>{L_ENABLE_POST_REVIEW_EXPLAIN}</span></dt>
<dd><label><input type="radio" class="radio" name="enable_post_review" value="1"<!-- IF S_ENABLE_POST_REVIEW --> id="enable_post_review" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label><input type="radio" class="radio" name="enable_post_review" value="0"<!-- IF not S_ENABLE_POST_REVIEW --> id="enable_post_review" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
</dl>
<dl>
- <dt><label for="enable_quick_reply">{L_ENABLE_QUICK_REPLY}:</label><br /><span>{L_ENABLE_QUICK_REPLY_EXPLAIN}</span></dt>
+ <dt><label for="enable_quick_reply">{L_ENABLE_QUICK_REPLY}{L_COLON}</label><br /><span>{L_ENABLE_QUICK_REPLY_EXPLAIN}</span></dt>
<dd><label><input type="radio" class="radio" name="enable_quick_reply" value="1"<!-- IF S_ENABLE_QUICK_REPLY --> id="enable_quick_reply" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label><input type="radio" class="radio" name="enable_quick_reply" value="0"<!-- IF not S_ENABLE_QUICK_REPLY --> id="enable_quick_reply" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
</dl>
<dl>
- <dt><label for="enable_indexing">{L_ENABLE_INDEXING}:</label><br /><span>{L_ENABLE_INDEXING_EXPLAIN}</span></dt>
+ <dt><label for="enable_indexing">{L_ENABLE_INDEXING}{L_COLON}</label><br /><span>{L_ENABLE_INDEXING_EXPLAIN}</span></dt>
<dd><label><input type="radio" class="radio" name="enable_indexing" value="1"<!-- IF S_ENABLE_INDEXING --> id="enable_indexing" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label><input type="radio" class="radio" name="enable_indexing" value="0"<!-- IF not S_ENABLE_INDEXING --> id="enable_indexing" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
</dl>
<dl>
- <dt><label for="enable_icons">{L_ENABLE_TOPIC_ICONS}:</label></dt>
+ <dt><label for="enable_icons">{L_ENABLE_TOPIC_ICONS}{L_COLON}</label></dt>
<dd><label><input type="radio" class="radio" name="enable_icons" value="1"<!-- IF S_TOPIC_ICONS --> id="enable_icons" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label><input type="radio" class="radio" name="enable_icons" value="0"<!-- IF not S_TOPIC_ICONS --> id="enable_icons" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
</dl>
<dl>
- <dt><label for="display_recent">{L_ENABLE_RECENT}:</label><br /><span>{L_ENABLE_RECENT_EXPLAIN}</span></dt>
+ <dt><label for="display_recent">{L_ENABLE_RECENT}{L_COLON}</label><br /><span>{L_ENABLE_RECENT_EXPLAIN}</span></dt>
<dd><label><input type="radio" class="radio" name="display_recent" value="1"<!-- IF S_DISPLAY_ACTIVE_TOPICS --> id="display_recent" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label><input type="radio" class="radio" name="display_recent" value="0"<!-- IF not S_DISPLAY_ACTIVE_TOPICS --> id="display_recent" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
</dl>
<dl>
- <dt><label for="topics_per_page">{L_FORUM_TOPICS_PAGE}:</label><br /><span>{L_FORUM_TOPICS_PAGE_EXPLAIN}</span></dt>
- <dd><input type="text" id="topics_per_page" name="topics_per_page" value="{TOPICS_PER_PAGE}" size="4" maxlength="4" /></dd>
+ <dt><label for="topics_per_page">{L_FORUM_TOPICS_PAGE}{L_COLON}</label><br /><span>{L_FORUM_TOPICS_PAGE_EXPLAIN}</span></dt>
+ <dd><input type="number" id="topics_per_page" name="topics_per_page" value="{TOPICS_PER_PAGE}" size="4" maxlength="4" min="0" max="9999" /></dd>
</dl>
+ <!-- EVENT acp_forums_normal_settings_append -->
</fieldset>
<fieldset>
<legend>{L_FORUM_PRUNE_SETTINGS}</legend>
<dl>
- <dt><label for="enable_prune">{L_FORUM_AUTO_PRUNE}:</label><br /><span>{L_FORUM_AUTO_PRUNE_EXPLAIN}</span></dt>
+ <dt><label for="enable_prune">{L_FORUM_AUTO_PRUNE}{L_COLON}</label><br /><span>{L_FORUM_AUTO_PRUNE_EXPLAIN}</span></dt>
<dd><label><input type="radio" class="radio" name="enable_prune" value="1"<!-- IF S_PRUNE_ENABLE --> id="enable_prune" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label><input type="radio" class="radio" name="enable_prune" value="0"<!-- IF not S_PRUNE_ENABLE --> id="enable_prune" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
</dl>
<dl>
- <dt><label for="prune_freq">{L_AUTO_PRUNE_FREQ}:</label><br /><span>{L_AUTO_PRUNE_FREQ_EXPLAIN}</span></dt>
- <dd><input type="text" id="prune_freq" name="prune_freq" value="{PRUNE_FREQ}" maxlength="4" size="4" /> {L_DAYS}</dd>
+ <dt><label for="prune_freq">{L_AUTO_PRUNE_FREQ}{L_COLON}</label><br /><span>{L_AUTO_PRUNE_FREQ_EXPLAIN}</span></dt>
+ <dd><input type="number" id="prune_freq" name="prune_freq" value="{PRUNE_FREQ}" maxlength="4" size="4" min="0" max="9999" /> {L_DAYS}</dd>
</dl>
<dl>
- <dt><label for="prune_days">{L_AUTO_PRUNE_DAYS}:</label><br /><span>{L_AUTO_PRUNE_DAYS_EXPLAIN}</span></dt>
- <dd><input type="text" id="prune_days" name="prune_days" value="{PRUNE_DAYS}" maxlength="4" size="4" /> {L_DAYS}</dd>
+ <dt><label for="prune_days">{L_AUTO_PRUNE_DAYS}{L_COLON}</label><br /><span>{L_AUTO_PRUNE_DAYS_EXPLAIN}</span></dt>
+ <dd><input type="number" id="prune_days" name="prune_days" value="{PRUNE_DAYS}" maxlength="4" size="4" min="0" max="9999" /> {L_DAYS}</dd>
</dl>
<dl>
- <dt><label for="prune_viewed">{L_AUTO_PRUNE_VIEWED}:</label><br /><span>{L_AUTO_PRUNE_VIEWED_EXPLAIN}</span></dt>
- <dd><input type="text" id="prune_viewed" name="prune_viewed" value="{PRUNE_VIEWED}" maxlength="4" size="4" /> {L_DAYS}</dd>
+ <dt><label for="prune_viewed">{L_AUTO_PRUNE_VIEWED}{L_COLON}</label><br /><span>{L_AUTO_PRUNE_VIEWED_EXPLAIN}</span></dt>
+ <dd><input type="number" id="prune_viewed" name="prune_viewed" value="{PRUNE_VIEWED}" maxlength="4" size="4" min="0" max="9999" /> {L_DAYS}</dd>
</dl>
<dl>
- <dt><label for="prune_old_polls">{L_PRUNE_OLD_POLLS}:</label><br /><span>{L_PRUNE_OLD_POLLS_EXPLAIN}</span></dt>
+ <dt><label for="prune_old_polls">{L_PRUNE_OLD_POLLS}{L_COLON}</label><br /><span>{L_PRUNE_OLD_POLLS_EXPLAIN}</span></dt>
<dd><label><input type="radio" class="radio" name="prune_old_polls" value="1"<!-- IF S_PRUNE_OLD_POLLS --> id="prune_old_polls" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label><input type="radio" class="radio" name="prune_old_polls" value="0"<!-- IF not S_PRUNE_OLD_POLLS --> id="prune_old_polls" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
</dl>
<dl>
- <dt><label for="prune_announce">{L_PRUNE_ANNOUNCEMENTS}:</label></dt>
+ <dt><label for="prune_announce">{L_PRUNE_ANNOUNCEMENTS}{L_COLON}</label></dt>
<dd><label><input type="radio" class="radio" name="prune_announce" value="1"<!-- IF S_PRUNE_ANNOUNCE --> id="prune_announce" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label><input type="radio" class="radio" name="prune_announce" value="0"<!-- IF not S_PRUNE_ANNOUNCE --> id="prune_announce" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
</dl>
<dl>
- <dt><label for="prune_sticky">{L_PRUNE_STICKY}:</label></dt>
+ <dt><label for="prune_sticky">{L_PRUNE_STICKY}{L_COLON}</label></dt>
<dd><label><input type="radio" class="radio" name="prune_sticky" value="1"<!-- IF S_PRUNE_STICKY --> id="prune_sticky" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label><input type="radio" class="radio" name="prune_sticky" value="0"<!-- IF not S_PRUNE_STICKY --> id="prune_sticky" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
</dl>
@@ -284,16 +285,16 @@
<fieldset>
<legend>{L_GENERAL_FORUM_SETTINGS}</legend>
<dl>
- <dt><label for="link_display_on_index">{L_LIST_INDEX}:</label><br /><span>{L_LIST_INDEX_EXPLAIN}</span></dt>
+ <dt><label for="link_display_on_index">{L_LIST_INDEX}{L_COLON}</label><br /><span>{L_LIST_INDEX_EXPLAIN}</span></dt>
<dd><label><input type="radio" class="radio" name="link_display_on_index" value="1"<!-- IF S_DISPLAY_ON_INDEX --> id="link_display_on_index" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label><input type="radio" class="radio" name="link_display_on_index" value="0"<!-- IF not S_DISPLAY_ON_INDEX --> id="link_display_on_index" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
</dl>
<dl>
- <dt><label for="forum_link">{L_FORUM_LINK}:</label><br /><span>{L_FORUM_LINK_EXPLAIN}</span></dt>
+ <dt><label for="forum_link">{L_FORUM_LINK}{L_COLON}</label><br /><span>{L_FORUM_LINK_EXPLAIN}</span></dt>
<dd><input class="text medium" type="text" id="forum_link" name="forum_link" value="{FORUM_DATA_LINK}" maxlength="255" /></dd>
</dl>
<dl>
- <dt><label for="forum_link_track">{L_FORUM_LINK_TRACK}:</label><br /><span>{L_FORUM_LINK_TRACK_EXPLAIN}</span></dt>
+ <dt><label for="forum_link_track">{L_FORUM_LINK_TRACK}{L_COLON}</label><br /><span>{L_FORUM_LINK_TRACK_EXPLAIN}</span></dt>
<dd><label><input type="radio" class="radio" name="forum_link_track" value="1"<!-- IF S_FORUM_LINK_TRACK --> id="forum_link_track" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label><input type="radio" class="radio" name="forum_link_track" value="0"<!-- IF not S_FORUM_LINK_TRACK --> id="forum_link_track" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
</dl>
@@ -304,18 +305,18 @@
<fieldset>
<legend>{L_FORUM_RULES}</legend>
<dl>
- <dt><label for="forum_rules_link">{L_FORUM_RULES_LINK}:</label><br /><span>{L_FORUM_RULES_LINK_EXPLAIN}</span></dt>
+ <dt><label for="forum_rules_link">{L_FORUM_RULES_LINK}{L_COLON}</label><br /><span>{L_FORUM_RULES_LINK_EXPLAIN}</span></dt>
<dd><input class="text medium" type="text" id="forum_rules_link" name="forum_rules_link" value="{FORUM_RULES_LINK}" maxlength="255" /></dd>
</dl>
<!-- IF FORUM_RULES_PREVIEW -->
<dl>
- <dt><label>{L_FORUM_RULES_PREVIEW}:</label></dt>
+ <dt><label>{L_FORUM_RULES_PREVIEW}{L_COLON}</label></dt>
<dd>{FORUM_RULES_PREVIEW}</dd>
</dl>
<!-- ENDIF -->
<dl>
- <dt><label for="forum_rules">{L_FORUM_RULES}:</label><br /><span>{L_FORUM_RULES_EXPLAIN}</span></dt>
- <dd><textarea id="forum_rules" name="forum_rules" rows="4" cols="70">{FORUM_RULES_PLAIN}</textarea></dd>
+ <dt><label for="forum_rules">{L_FORUM_RULES}{L_COLON}</label><br /><span>{L_FORUM_RULES_EXPLAIN}</span></dt>
+ <dd><textarea id="forum_rules" name="forum_rules" rows="4" cols="70" data-bbcode="true">{FORUM_RULES_PLAIN}</textarea></dd>
<dd><label><input type="checkbox" class="radio" name="rules_parse_bbcode"<!-- IF S_BBCODE_CHECKED --> checked="checked"<!-- ENDIF --> /> {L_PARSE_BBCODE}</label>
<label><input type="checkbox" class="radio" name="rules_parse_smilies"<!-- IF S_SMILIES_CHECKED --> checked="checked"<!-- ENDIF --> /> {L_PARSE_SMILIES}</label>
<label><input type="checkbox" class="radio" name="rules_parse_urls"<!-- IF S_URLS_CHECKED --> checked="checked"<!-- ENDIF --> /> {L_PARSE_URLS}</label></dd>
@@ -351,12 +352,12 @@
<fieldset>
<legend>{L_FORUM_DELETE}</legend>
<dl>
- <dt><label>{L_FORUM_NAME}:</label></dt>
+ <dt><label>{L_FORUM_NAME}{L_COLON}</label></dt>
<dd><strong>{FORUM_NAME}</strong></dd>
</dl>
<!-- IF S_FORUM_POST -->
<dl>
- <dt><label for="delete_action">{L_ACTION}:</label></dt>
+ <dt><label for="delete_action">{L_ACTION}{L_COLON}</label></dt>
<dd><label><input type="radio" class="radio" id="delete_action" name="action_posts" value="delete" checked="checked" /> {L_DELETE_ALL_POSTS}</label></dd>
<!-- IF S_MOVE_FORUM_OPTIONS -->
<dd><label><input type="radio" class="radio" name="action_posts" value="move" /> {L_MOVE_POSTS_TO}</label> <select name="posts_to_id">{S_MOVE_FORUM_OPTIONS}</select></dd>
@@ -365,7 +366,7 @@
<!-- ENDIF -->
<!-- IF S_HAS_SUBFORUMS -->
<dl>
- <dt><label for="sub_delete_action">{L_ACTION}:</label></dt>
+ <dt><label for="sub_delete_action">{L_ACTION}{L_COLON}</label></dt>
<dd><label><input type="radio" class="radio" id="sub_delete_action" name="action_subforums" value="delete" checked="checked" /> {L_DELETE_SUBFORUMS}</label></dd>
<!-- IF S_FORUMS_LIST -->
<dd><label><input type="radio" class="radio" name="action_subforums" value="move" /> {L_MOVE_SUBFORUMS_TO}</label> <select name="subforums_to_id">{S_FORUMS_LIST}</select></dd>
@@ -436,35 +437,26 @@
</div>
<!-- ENDIF -->
- <p><strong>{NAVIGATION}<!-- IF S_NO_FORUMS --> [<a href="{U_EDIT}">{L_EDIT}</a> | <a href="{U_DELETE}">{L_DELETE}</a><!-- IF not S_LINK --> | <a href="{U_SYNC}">{L_RESYNC}</a><!-- ENDIF --->]<!-- ENDIF --></strong></p>
+ <p><strong>{NAVIGATION}<!-- IF S_NO_FORUMS --> [<a href="{U_EDIT}">{L_EDIT}</a> | <a href="{U_DELETE}">{L_DELETE}</a><!-- IF not S_LINK --> | <a href="{U_SYNC}">{L_RESYNC}</a><!-- ENDIF -->]<!-- ENDIF --></strong></p>
<!-- IF .forums -->
- <table cellspacing="1">
+ <table class="table1 forums">
<col class="row1" /><col class="row1" /><col class="row2" />
<tbody>
<!-- BEGIN forums -->
<tr>
- <td style="width: 5%; text-align: center;">{forums.FOLDER_IMAGE}</td>
- <td>
+ <td class="folder">{forums.FOLDER_IMAGE}</td>
+ <td class="forum-desc">
<!-- IF forums.FORUM_IMAGE --><div style="float: {S_CONTENT_FLOW_BEGIN}; margin-right: 5px;">{forums.FORUM_IMAGE}</div><!-- ENDIF -->
<strong><!-- IF forums.S_FORUM_LINK -->{forums.FORUM_NAME}<!-- ELSE --><a href="{forums.U_FORUM}">{forums.FORUM_NAME}</a><!-- ENDIF --></strong>
<!-- IF forums.FORUM_DESCRIPTION --><br /><span>{forums.FORUM_DESCRIPTION}</span><!-- ENDIF -->
- <!-- IF forums.S_FORUM_POST --><br /><br /><span>{L_TOPICS}: <strong>{forums.FORUM_TOPICS}</strong> / {L_POSTS}: <strong>{forums.FORUM_POSTS}</strong></span><!-- ENDIF -->
+ <!-- IF forums.S_FORUM_POST --><br /><br /><span>{L_TOPICS}{L_COLON} <strong>{forums.FORUM_TOPICS}</strong> / {L_POSTS}{L_COLON} <strong>{forums.FORUM_POSTS}</strong></span><!-- ENDIF -->
</td>
- <td style="vertical-align: top; width: 100px; text-align: right; white-space: nowrap;">
- <!-- IF forums.S_FIRST_ROW && not forums.S_LAST_ROW -->
- {ICON_MOVE_UP_DISABLED}
- <a href="{forums.U_MOVE_DOWN}">{ICON_MOVE_DOWN}</a>
- <!-- ELSEIF not forums.S_FIRST_ROW && not forums.S_LAST_ROW -->
- <a href="{forums.U_MOVE_UP}">{ICON_MOVE_UP}</a>
- <a href="{forums.U_MOVE_DOWN}">{ICON_MOVE_DOWN}</a>
- <!-- ELSEIF forums.S_LAST_ROW && not forums.S_FIRST_ROW -->
- <a href="{forums.U_MOVE_UP}">{ICON_MOVE_UP}</a>
- {ICON_MOVE_DOWN_DISABLED}
- <!-- ELSE -->
- {ICON_MOVE_UP_DISABLED}
- {ICON_MOVE_DOWN_DISABLED}
- <!-- ENDIF -->
+ <td class="actions">
+ <span class="up-disabled" style="display:none;">{ICON_MOVE_UP_DISABLED}</span>
+ <span class="up"><a href="{forums.U_MOVE_UP}" data-ajax="row_up" data-overlay="false">{ICON_MOVE_UP}</a></span>
+ <span class="down-disabled" style="display:none;">{ICON_MOVE_DOWN_DISABLED}</span>
+ <span class="down"><a href="{forums.U_MOVE_DOWN}" data-ajax="row_down" data-overlay="false">{ICON_MOVE_DOWN}</a></span>
<a href="{forums.U_EDIT}">{ICON_EDIT}</a>
<!-- IF not forums.S_FORUM_LINK -->
<a href="{forums.U_SYNC}" onclick="popup_progress_bar();">{ICON_SYNC}</a>
@@ -482,7 +474,7 @@
<form id="fselect" method="post" action="{U_SEL_ACTION}">
<fieldset class="quick">
- {L_SELECT_FORUM}: <select name="parent_id" onchange="if(this.options[this.selectedIndex].value != -1){ this.form.submit(); }">{FORUM_BOX}</select>
+ {L_SELECT_FORUM}{L_COLON} <select name="parent_id" onchange="if(this.options[this.selectedIndex].value != -1){ this.form.submit(); }">{FORUM_BOX}</select>
<input class="button2" type="submit" value="{L_GO}" />
{S_FORM_TOKEN}
diff --git a/phpBB/adm/style/acp_forums_copy_perm.html b/phpBB/adm/style/acp_forums_copy_perm.html
index acec3c1967..1fcf2f62a4 100644
--- a/phpBB/adm/style/acp_forums_copy_perm.html
+++ b/phpBB/adm/style/acp_forums_copy_perm.html
@@ -9,7 +9,7 @@
<fieldset>
<dl>
- <dt><label for="forum_perm_from">{L_COPY_PERMISSIONS}:</label><br /><span>{L_COPY_PERMISSIONS_EXPLAIN}</span></dt>
+ <dt><label for="forum_perm_from">{L_COPY_PERMISSIONS}{L_COLON}</label><br /><span>{L_COPY_PERMISSIONS_EXPLAIN}</span></dt>
<dd><select id="forum_perm_from" name="forum_perm_from"><option value="0">{L_NO_PERMISSIONS}</option>{S_FORUM_OPTIONS}</select></dd>
</dl>
<div style="text-align: center;">{S_FORM_TOKEN}{S_HIDDEN_FIELDS}
diff --git a/phpBB/adm/style/acp_groups.html b/phpBB/adm/style/acp_groups.html
index 07f7d072e8..72f4f2b239 100644
--- a/phpBB/adm/style/acp_groups.html
+++ b/phpBB/adm/style/acp_groups.html
@@ -1,6 +1,6 @@
<!-- INCLUDE overall_header.html -->
-<a name="maincontent"></a>
+<a id="maincontent"></a>
<!-- IF S_EDIT -->
@@ -17,16 +17,16 @@
</div>
<!-- ENDIF -->
- <form id="settings" method="post" action="{U_ACTION}"<!-- IF S_CAN_UPLOAD --> enctype="multipart/form-data"<!-- ENDIF -->>
+ <form id="settings" method="post" action="{U_ACTION}" enctype="multipart/form-data">
<fieldset>
<legend>{L_GROUP_DETAILS}</legend>
<dl>
- <dt><label<!-- IF not S_SPECIAL_GROUP --> for="group_name"<!-- ENDIF -->>{L_GROUP_NAME}:</label></dt>
+ <dt><label<!-- IF not S_SPECIAL_GROUP --> for="group_name"<!-- ENDIF -->>{L_GROUP_NAME}{L_COLON}</label></dt>
<dd><!-- IF S_SPECIAL_GROUP --><strong>{GROUP_NAME}</strong><!-- ENDIF --><input name="group_name" type="<!-- IF S_SPECIAL_GROUP -->hidden<!-- ELSE -->text<!-- ENDIF -->" id="group_name" value="{GROUP_INTERNAL_NAME}" /></dd>
</dl>
<dl>
- <dt><label for="group_desc">{L_GROUP_DESC}:</label></dt>
+ <dt><label for="group_desc">{L_GROUP_DESC}{L_COLON}</label></dt>
<dd><textarea id="group_desc" name="group_desc" rows="5" cols="45">{GROUP_DESC}</textarea></dd>
<dd><label><input type="checkbox" class="radio" name="desc_parse_bbcode"<!-- IF S_DESC_BBCODE_CHECKED --> checked="checked"<!-- ENDIF --> /> {L_PARSE_BBCODE}</label>
<label><input type="checkbox" class="radio" name="desc_parse_smilies"<!-- IF S_DESC_SMILIES_CHECKED --> checked="checked"<!-- ENDIF --> /> {L_PARSE_SMILIES}</label>
@@ -34,7 +34,7 @@
</dl>
<!-- IF not S_SPECIAL_GROUP -->
<dl>
- <dt><label for="group_type">{L_GROUP_TYPE}:</label><br /><span>{L_GROUP_TYPE_EXPLAIN}</span></dt>
+ <dt><label for="group_type">{L_GROUP_TYPE}{L_COLON}</label><br /><span>{L_GROUP_TYPE_EXPLAIN}</span></dt>
<dd>
<label><input name="group_type" type="radio" class="radio" id="group_type" value="{GROUP_TYPE_FREE}"{GROUP_FREE} /> {L_GROUP_OPEN}</label>
<label><input name="group_type" type="radio" class="radio" value="{GROUP_TYPE_OPEN}"{GROUP_OPEN} /> {L_GROUP_REQUEST}</label>
@@ -48,7 +48,7 @@
<!-- IF S_ADD_GROUP and S_GROUP_PERM -->
<dl>
- <dt><label for="group_perm_from">{L_COPY_PERMISSIONS}:</label><br /><span>{L_COPY_PERMISSIONS_EXPLAIN}</span></dt>
+ <dt><label for="group_perm_from">{L_COPY_PERMISSIONS}{L_COLON}</label><br /><span>{L_COPY_PERMISSIONS_EXPLAIN}</span></dt>
<dd><select id="group_perm_from" name="group_perm_from"><option value="0">{L_NO_PERMISSIONS}</option>{S_GROUP_OPTIONS}</select></dd>
</dl>
<!-- ENDIF -->
@@ -58,20 +58,24 @@
<legend>{L_GROUP_OPTIONS_SAVE}</legend>
<!-- IF S_USER_FOUNDER -->
<dl>
- <dt><label for="group_founder_manage">{L_GROUP_FOUNDER_MANAGE}:</label><br /><span>{L_GROUP_FOUNDER_MANAGE_EXPLAIN}</span></dt>
+ <dt><label for="group_founder_manage">{L_GROUP_FOUNDER_MANAGE}{L_COLON}</label><br /><span>{L_GROUP_FOUNDER_MANAGE_EXPLAIN}</span></dt>
<dd><input name="group_founder_manage" type="checkbox" value="1" class="radio" id="group_founder_manage"{GROUP_FOUNDER_MANAGE} /></dd>
</dl>
<!-- ENDIF -->
<dl>
- <dt><label for="group_skip_auth">{L_GROUP_SKIP_AUTH}:</label><br /><span>{L_GROUP_SKIP_AUTH_EXPLAIN}</span></dt>
+ <dt><label for="group_skip_auth">{L_GROUP_SKIP_AUTH}{L_COLON}</label><br /><span>{L_GROUP_SKIP_AUTH_EXPLAIN}</span></dt>
<dd><input name="group_skip_auth" type="checkbox" value="1" class="radio" id="group_skip_auth"{GROUP_SKIP_AUTH} /></dd>
</dl>
<dl>
- <dt><label for="group_legend">{L_GROUP_LEGEND}:</label></dt>
+ <dt><label for="group_legend">{L_GROUP_LEGEND}{L_COLON}</label></dt>
<dd><input name="group_legend" type="checkbox" value="1" class="radio" id="group_legend"{GROUP_LEGEND} /></dd>
</dl>
<dl>
- <dt><label for="group_receive_pm">{L_GROUP_RECEIVE_PM}:</label><br /><span>{L_GROUP_RECEIVE_PM_EXPLAIN}</span></dt>
+ <dt><label for="group_teampage">{L_GROUP_TEAMPAGE}{L_COLON}</label></dt>
+ <dd><input name="group_teampage" type="checkbox" value="1" class="radio" id="group_teampage"{GROUP_TEAMPAGE} /></dd>
+ </dl>
+ <dl>
+ <dt><label for="group_receive_pm">{L_GROUP_RECEIVE_PM}{L_COLON}</label><br /><span>{L_GROUP_RECEIVE_PM_EXPLAIN}</span></dt>
<dd><input name="group_receive_pm" type="checkbox" value="1" class="radio" id="group_receive_pm"{GROUP_RECEIVE_PM} /></dd>
</dl>
</fieldset>
@@ -79,19 +83,24 @@
<fieldset>
<legend>{L_GROUP_SETTINGS_SAVE}</legend>
<dl>
- <dt><label for="group_message_limit">{L_GROUP_MESSAGE_LIMIT}:</label><br /><span>{L_GROUP_MESSAGE_LIMIT_EXPLAIN}</span></dt>
- <dd><input name="group_message_limit" type="text" id="group_message_limit" maxlength="4" size="4" value="{GROUP_MESSAGE_LIMIT}" /></dd>
+ <dt><label for="group_message_limit">{L_GROUP_MESSAGE_LIMIT}{L_COLON}</label><br /><span>{L_GROUP_MESSAGE_LIMIT_EXPLAIN}</span></dt>
+ <dd><input name="group_message_limit" type="number" id="group_message_limit" maxlength="4" size="4" min="0" max="9999" value="{GROUP_MESSAGE_LIMIT}" /></dd>
</dl>
<dl>
- <dt><label for="group_max_recipients">{L_GROUP_MAX_RECIPIENTS}:</label><br /><span>{L_GROUP_MAX_RECIPIENTS_EXPLAIN}</span></dt>
- <dd><input name="group_max_recipients" type="text" id="group_max_recipients" maxlength="10" size="4" value="{GROUP_MAX_RECIPIENTS}" /></dd>
+ <dt><label for="group_max_recipients">{L_GROUP_MAX_RECIPIENTS}{L_COLON}</label><br /><span>{L_GROUP_MAX_RECIPIENTS_EXPLAIN}</span></dt>
+ <dd><input name="group_max_recipients" type="number" id="group_max_recipients" maxlength="10" size="4" value="{GROUP_MAX_RECIPIENTS}" /></dd>
</dl>
<dl>
- <dt><label for="group_colour">{L_GROUP_COLOR}:</label><br /><span>{L_GROUP_COLOR_EXPLAIN}</span></dt>
- <dd><input name="group_colour" type="text" id="group_colour" value="{GROUP_COLOUR}" size="6" maxlength="6" /><!-- IF GROUP_COLOUR -->&nbsp;<span style="background-color: #{GROUP_COLOUR}">&nbsp; &nbsp;</span><!-- ENDIF -->&nbsp;&nbsp;<span>[ <a href="{U_SWATCH}" onclick="popup(this.href, 636, 150, '_swatch'); return false">{L_COLOUR_SWATCH}</a> ]</span></dd>
+ <dt><label for="group_colour">{L_GROUP_COLOR}{L_COLON}</label><br /><span>{L_GROUP_COLOR_EXPLAIN}</span></dt>
+ <dd>
+ <input name="group_colour" type="text" id="group_colour" value="{GROUP_COLOUR}" size="6" maxlength="6" />
+ <!-- IF GROUP_COLOUR -->&nbsp;<span style="background-color: #{GROUP_COLOUR}">&nbsp; &nbsp;</span><!-- ENDIF -->&nbsp;&nbsp;<span>
+ [ <a href="#" id="color_palette_toggle">{L_COLOUR_SWATCH}</a> ]</span>
+ <div id="color_palette_placeholder" style="display: none;" data-orientation="h" data-height="12" data-width="15" data-target="#group_colour"></div>
+ </dd>
</dl>
<dl>
- <dt><label for="group_rank">{L_GROUP_RANK}:</label></dt>
+ <dt><label for="group_rank">{L_GROUP_RANK}{L_COLON}</label></dt>
<dd><select name="group_rank" id="group_rank">{S_RANK_OPTIONS}</select></dd>
</dl>
</fieldset>
@@ -99,67 +108,27 @@
<fieldset>
<legend>{L_GROUP_AVATAR}</legend>
<dl>
- <dt><label>{L_CURRENT_IMAGE}:</label><br /><span>{L_AVATAR_EXPLAIN}</span></dt>
- <dd>{AVATAR_IMAGE}</dd>
- <dd><label><input type="checkbox" class="radio" name="delete" /> {L_DELETE_AVATAR}</label></dd>
+ <dt><label>{L_CURRENT_IMAGE}{L_COLON}</label><br /><span>{L_AVATAR_EXPLAIN}</span></dt>
+ <dd>{AVATAR}</dd>
+ <dd><label for="avatar_delete"><input type="checkbox" name="avatar_delete" id="avatar_delete" /> {L_DELETE_AVATAR}</label></dd>
</dl>
- <!-- IF not S_IN_AVATAR_GALLERY -->
- <!-- IF S_CAN_UPLOAD -->
- <dl>
- <dt><label for="uploadfile">{L_UPLOAD_AVATAR_FILE}:</label></dt>
- <dd><input type="file" id="uploadfile" name="uploadfile" /></dd>
- </dl>
- <dl>
- <dt><label for="uploadurl">{L_UPLOAD_AVATAR_URL}:</label><br /><span>{L_UPLOAD_AVATAR_URL_EXPLAIN}</span></dt>
- <dd><input name="uploadurl" type="text" id="uploadurl" value="" /></dd>
- </dl>
- <!-- ENDIF -->
- <dl>
- <dt><label for="remotelink">{L_LINK_REMOTE_AVATAR}:</label><br /><span>{L_LINK_REMOTE_AVATAR_EXPLAIN}</span></dt>
- <dd><input name="remotelink" type="text" id="remotelink" value="" /></dd>
- </dl>
- <dl>
- <dt><label for="width">{L_LINK_REMOTE_SIZE}:</label><br /><span>{L_LINK_REMOTE_SIZE_EXPLAIN}</span></dt>
- <dd><input name="width" type="text" id="width" size="3" value="{AVATAR_WIDTH}" /> <span>{L_PIXEL} &times; </span> <input type="text" name="height" size="3" value="{AVATAR_HEIGHT}" /> <span>{L_PIXEL}</span></dd>
- </dl>
- <!-- IF S_DISPLAY_GALLERY -->
- <dl>
- <dt><label>{L_AVATAR_GALLERY}:</label></dt>
- <dd><input class="button2" type="submit" name="display_gallery" value="{L_DISPLAY_GALLERY}" /></dd>
- </dl>
- <!-- ENDIF -->
- <!-- ELSE -->
- </fieldset>
-
- <fieldset>
- <legend>{L_AVATAR_GALLERY}</legend>
- <dl>
- <dt><label for="category">{L_AVATAR_CATEGORY}:</label></dt>
- <dd><select name="category" id="category">{S_CAT_OPTIONS}</select>&nbsp;<input class="button2" type="submit" value="{L_GO}" name="display_gallery" /></dd>
- </dl>
- <dl>
- <table cellspacing="1">
- <!-- BEGIN avatar_row -->
- <tr>
- <!-- BEGIN avatar_column -->
- <td class="row1" style="text-align: center;"><img src="{avatar_row.avatar_column.AVATAR_IMAGE}" alt="{avatar_row.avatar_column.AVATAR_NAME}" title="{avatar_row.avatar_column.AVATAR_NAME}" /></td>
- <!-- END avatar_column -->
- </tr>
- <tr>
- <!-- BEGIN avatar_option_column -->
- <td class="row2" style="text-align: center;"><input type="radio" class="radio" name="avatar_select" value="{avatar_row.avatar_option_column.S_OPTIONS_AVATAR}" /></td>
- <!-- END avatar_option_column -->
- </tr>
- <!-- END avatar_row -->
- </table>
- </dl>
- </fieldset>
-
- <fieldset class="quick" style="margin-top: -15px;">
- <input class="button2" type="submit" name="cancel" value="{L_CANCEL}" />
- </fieldset>
-
- <!-- ENDIF -->
+ <dl>
+ <dt><label>{L_AVATAR_TYPE}{L_COLON}</label></dt>
+ <dd><select name="avatar_driver" id="avatar_driver">
+ <option value="">{L_NO_AVATAR_CATEGORY}</option>
+ <!-- BEGIN avatar_drivers -->
+ <option value="{avatar_drivers.DRIVER}"<!-- IF avatar_drivers.SELECTED --> selected="selected"<!-- ENDIF -->>{avatar_drivers.L_TITLE}</option>
+ <!-- END avatar_drivers -->
+ </select></dd>
+ </dl>
+ <div id="avatar_options">
+ <!-- BEGIN avatar_drivers -->
+ <div id="avatar_option_{avatar_drivers.DRIVER}">
+ <p>{avatar_drivers.L_EXPLAIN}</p>
+ {avatar_drivers.OUTPUT}
+ </div>
+ <!-- END avatar_drivers -->
+ </div>
</fieldset>
<fieldset class="submit-buttons">
@@ -170,6 +139,8 @@
</fieldset>
</form>
+ <!-- INCLUDEJS avatars.js -->
+
<!-- ELSEIF S_LIST -->
<a href="{U_BACK}" style="float: {S_CONTENT_FLOW_END};">&laquo; {L_BACK}</a>
@@ -184,7 +155,7 @@
<a href="{U_DEFAULT_ALL}">&raquo; {L_MAKE_DEFAULT_FOR_ALL}</a>
</fieldset>
- <table cellspacing="1">
+ <table class="table1 zebra-table">
<thead>
<tr>
<th>{L_USERNAME}</th>
@@ -199,7 +170,7 @@
<td class="row3" colspan="5"><strong>{L_GROUP_LEAD}</strong></td>
</tr>
<!-- BEGIN leader -->
- <!-- IF leader.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
+ <tr>
<td><!-- IF leader.USERNAME_COLOUR --><a href="{leader.U_USER_EDIT}" style="color: #{leader.USERNAME_COLOUR};" class="username-coloured">{leader.USERNAME}</a><!-- ELSE --><a href="{leader.U_USER_EDIT}">{leader.USERNAME}</a><!-- ENDIF --></td>
<td style="text-align: center;"><!-- IF leader.S_GROUP_DEFAULT -->{L_YES}<!-- ELSE -->{L_NO}<!-- ENDIF --></td>
<td style="text-align: center;">{leader.JOINED}</td>
@@ -208,7 +179,7 @@
</tr>
<!-- BEGINELSE -->
<tr>
- <td class="row1" colspan="5" style="text-align: center;">{L_GROUPS_NO_MODS}</td>
+ <td colspan="5" style="text-align: center;">{L_GROUPS_NO_MODS}</td>
</tr>
<!-- END leader -->
<tr>
@@ -220,7 +191,7 @@
<td class="row3" colspan="5"><strong>{L_GROUP_PENDING}</strong></td>
</tr>
<!-- ELSE -->
- <!-- IF member.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
+ <tr>
<td><!-- IF member.USERNAME_COLOUR --><a href="{member.U_USER_EDIT}" style="color: #{member.USERNAME_COLOUR};" class="username-coloured">{member.USERNAME}</a><!-- ELSE --><a href="{member.U_USER_EDIT}">{member.USERNAME}</a><!-- ENDIF --></td>
<td style="text-align: center;"><!-- IF member.S_GROUP_DEFAULT -->{L_YES}<!-- ELSE -->{L_NO}<!-- ENDIF --></td>
<td style="text-align: center;">{member.JOINED}</td>
@@ -230,16 +201,16 @@
<!-- ENDIF -->
<!-- BEGINELSE -->
<tr>
- <td class="row1" colspan="5" style="text-align: center;">{L_GROUPS_NO_MEMBERS}</td>
+ <td colspan="5" style="text-align: center;">{L_GROUPS_NO_MEMBERS}</td>
</tr>
<!-- END member -->
</tbody>
</table>
- <!-- IF PAGINATION -->
<div class="pagination">
- <a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{S_ON_PAGE}</a> &bull; <span>{PAGINATION}</span>
- </div>
+ <!-- IF .pagination -->
+ <!-- INCLUDE pagination.html -->
<!-- ENDIF -->
+ </div>
<fieldset class="quick">
<select name="action"><option class="sep" value="">{L_SELECT_OPTION}</option>{S_ACTION_OPTIONS}</select>
@@ -254,17 +225,17 @@
<fieldset>
<legend>{L_ADD_USERS}</legend>
<dl>
- <dt><label for="leader">{L_USER_GROUP_LEADER}:</label></dt>
+ <dt><label for="leader">{L_USER_GROUP_LEADER}{L_COLON}</label></dt>
<dd><label><input name="leader" type="radio" class="radio" value="1" /> {L_YES}</label>
<label><input name="leader" type="radio" class="radio" id="leader" value="0" checked="checked" /> {L_NO}</label></dd>
</dl>
<dl>
- <dt><label for="default">{L_USER_GROUP_DEFAULT}:</label><br /><span>{L_USER_GROUP_DEFAULT_EXPLAIN}</span></dt>
+ <dt><label for="default">{L_USER_GROUP_DEFAULT}{L_COLON}</label><br /><span>{L_USER_GROUP_DEFAULT_EXPLAIN}</span></dt>
<dd><label><input name="default" type="radio" class="radio" value="1" /> {L_YES}</label>
<label><input name="default" type="radio" class="radio" id="default" value="0" checked="checked" /> {L_NO}</label></dd>
</dl>
<dl>
- <dt><label for="usernames">{L_USERNAME}:</label><br /><span>{L_USERNAMES_EXPLAIN}</span></dt>
+ <dt><label for="usernames">{L_USERNAME}{L_COLON}</label><br /><span>{L_USERNAMES_EXPLAIN}</span></dt>
<dd><textarea id="usernames" name="usernames" cols="40" rows="5"></textarea></dd>
<dd>[ <a href="{U_FIND_USERNAME}" onclick="find_username(this.href); return false;">{L_FIND_USERNAME}</a> ]</dd>
</dl>
@@ -295,7 +266,7 @@
<form id="acp_groups" method="post" action="{U_ACTION}">
- <table cellspacing="1">
+ <table class="table1">
<col class="col1" /><col class="col1" /><col class="col2" /><col class="col2" /><col class="col2" />
<thead>
<tr>
@@ -318,7 +289,7 @@
<fieldset class="quick">
<!-- IF S_GROUP_ADD -->
- {L_CREATE_GROUP}: <input type="text" name="group_name" value="" /> <input class="button2" type="submit" name="submit" value="{L_SUBMIT}" />
+ {L_CREATE_GROUP}{L_COLON} <input type="text" name="group_name" value="" /> <input class="button2" type="submit" name="submit" value="{L_SUBMIT}" />
<input type="hidden" name="add" value="1" />
<!-- ENDIF -->
{S_FORM_TOKEN}
@@ -329,7 +300,7 @@
<p>{L_SPECIAL_GROUPS_EXPLAIN}</p>
- <table cellspacing="1">
+ <table class="table1">
<col class="col1" /><col class="col1" /><col class="col2" /><col class="col2" /><col class="col2" />
<thead>
<tr>
@@ -346,7 +317,7 @@
<td style="text-align: center;">{groups.TOTAL_MEMBERS}</td>
<td style="text-align: center;"><a href="{groups.U_EDIT}">{L_SETTINGS}</a></td>
<td style="text-align: center;"><a href="{groups.U_LIST}">{L_MEMBERS}</a></td>
- <td style="text-align: center;"><!-- IF not groups.S_GROUP_SPECIAL and groups.U_DELETE --><a href="{groups.U_DELETE}">{L_DELETE}</a><!-- ELSE -->{L_DELETE}<!-- ENDIF --></td>
+ <td style="text-align: center;"><!-- IF not groups.S_GROUP_SPECIAL and groups.U_DELETE --><a href="{groups.U_DELETE}" data-ajax="row_delete">{L_DELETE}</a><!-- ELSE -->{L_DELETE}<!-- ENDIF --></td>
</tr>
<!-- ENDIF -->
<!-- END groups -->
diff --git a/phpBB/adm/style/acp_groups_position.html b/phpBB/adm/style/acp_groups_position.html
new file mode 100644
index 0000000000..b1df6b6162
--- /dev/null
+++ b/phpBB/adm/style/acp_groups_position.html
@@ -0,0 +1,171 @@
+<!-- INCLUDE overall_header.html -->
+
+<a id="maincontent"></a>
+
+ <h1>{L_MANAGE_LEGEND}</h1>
+
+ <form id="legend_settings" method="post" action="{U_ACTION}"<!-- IF S_CAN_UPLOAD --> enctype="multipart/form-data"<!-- ENDIF -->>
+
+ <fieldset>
+ <legend>{L_LEGEND_SETTINGS}</legend>
+ <dl>
+ <dt><label for="legend_sort_groupname">{L_LEGEND_SORT_GROUPNAME}{L_COLON}</label><br /><span>{L_LEGEND_SORT_GROUPNAME_EXPLAIN}</span></dt>
+ <dd>
+ <label><input type="radio" name="legend_sort_groupname" class="radio" value="1"<!-- IF LEGEND_SORT_GROUPNAME --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
+ <label><input type="radio" name="legend_sort_groupname" class="radio" value="0"<!-- IF not LEGEND_SORT_GROUPNAME --> checked="checked"<!-- ENDIF --> /> {L_NO}</label>
+ </dd>
+ </dl>
+
+ <p class="submit-buttons">
+ <input class="button1" type="submit" name="update" value="{L_SUBMIT}" />&nbsp;
+ <input class="button2" type="reset" name="reset" value="{L_RESET}" />
+ <input type="hidden" name="action" value="set_config_legend" />
+ {S_FORM_TOKEN}
+ </p>
+ </fieldset>
+ </form>
+
+ <p>{L_LEGEND_EXPLAIN}</p>
+
+ <table class="table1">
+ <col class="col1" /><col class="col2" /><col class="col2" />
+ <thead>
+ <tr>
+ <th style="width: 50%">{L_GROUP}</th>
+ <th>{L_GROUP_TYPE}</th>
+ <th>{L_ACTION}</th>
+ </tr>
+ </thead>
+ <tbody>
+ <!-- BEGIN legend -->
+ <tr>
+ <td><strong<!-- IF legend.GROUP_COLOUR --> style="color: {legend.GROUP_COLOUR}"<!-- ENDIF -->>{legend.GROUP_NAME}</strong></td>
+ <td style="text-align: center;">{legend.GROUP_TYPE}</td>
+ <td class="actions">
+ <span class="up-disabled" style="display: none;">{ICON_MOVE_UP_DISABLED}</span>
+ <span class="up"><a href="{legend.U_MOVE_UP}" data-ajax="row_up" data-overlay="false">{ICON_MOVE_UP}</a></span>
+ <span class="down-disabled" style="display:none;">{ICON_MOVE_DOWN_DISABLED}</span>
+ <span class="down"><a href="{legend.U_MOVE_DOWN}" data-ajax="row_down" data-overlay="false">{ICON_MOVE_DOWN}</a></span>
+ <a href="{legend.U_DELETE}">{ICON_DELETE}</a>
+ </td>
+ </tr>
+ <!-- BEGINELSE -->
+ <tr>
+ <td colspan="3" class="row3">{L_NO_GROUPS_ADDED}</td>
+ </tr>
+ <!-- END legend -->
+ </tbody>
+ </table>
+
+ <form id="legend_add_group" method="post" action="{U_ACTION_LEGEND}">
+ <fieldset class="quick">
+ <select name="g">
+ <option value="0">{L_SELECT_GROUP}</option>
+ <!-- BEGIN add_legend -->
+ <option<!-- IF add_legend.GROUP_SPECIAL --> class="sep"<!-- ENDIF --> value="{add_legend.GROUP_ID}">{add_legend.GROUP_NAME}</option>
+ <!-- END add_legend -->
+ </select>
+ <input class="button2" type="submit" name="submit" value="{L_ADD}" />
+ <input type="hidden" name="action" value="add" />
+ {S_FORM_TOKEN}
+ </fieldset>
+ </form>
+
+ <h1>{L_MANAGE_TEAMPAGE}</h1>
+
+ <form id="teampage_settings" method="post" action="{U_ACTION}"<!-- IF S_CAN_UPLOAD --> enctype="multipart/form-data"<!-- ENDIF -->>
+
+ <fieldset>
+ <legend>{L_TEAMPAGE_SETTINGS}</legend>
+ <dl>
+ <dt><label for="teampage_memberships">{L_TEAMPAGE_MEMBERSHIPS}{L_COLON}</label></dt>
+ <dd>
+ <label><input type="radio" name="teampage_memberships" class="radio" value="0"<!-- IF DISPLAY_MEMBERSHIPS == 0 --> checked="checked"<!-- ENDIF --> /> {L_TEAMPAGE_DISP_FIRST}</label><br />
+ <label><input type="radio" name="teampage_memberships" class="radio" value="1"<!-- IF DISPLAY_MEMBERSHIPS == 1 --> checked="checked"<!-- ENDIF --> /> {L_TEAMPAGE_DISP_DEFAULT}</label><br />
+ <label><input type="radio" name="teampage_memberships" class="radio" value="2"<!-- IF DISPLAY_MEMBERSHIPS == 2 --> checked="checked"<!-- ENDIF --> /> {L_TEAMPAGE_DISP_ALL}</label>
+ </dd>
+ </dl>
+ <dl>
+ <dt><label for="teampage_forums">{L_TEAMPAGE_FORUMS}{L_COLON}</label><br /><span>{L_TEAMPAGE_FORUMS_EXPLAIN}</span></dt>
+ <dd>
+ <label><input type="radio" name="teampage_forums" class="radio" value="1"<!-- IF DISPLAY_FORUMS --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
+ <label><input type="radio" name="teampage_forums" class="radio" value="0"<!-- IF not DISPLAY_FORUMS --> checked="checked"<!-- ENDIF --> /> {L_NO}</label>
+ </dd>
+ </dl>
+
+ <p class="submit-buttons">
+ <input class="button1" type="submit" name="update" value="{L_SUBMIT}" />&nbsp;
+ <input class="button2" type="reset" name="reset" value="{L_RESET}" />
+ <input type="hidden" name="action" value="set_config_teampage" />
+ {S_FORM_TOKEN}
+ </p>
+ </fieldset>
+ </form>
+
+ <p>{L_TEAMPAGE_EXPLAIN}</p>
+
+ <!-- IF S_TEAMPAGE_CATEGORY and CURRENT_CATEGORY_NAME --><p><strong><a href="{U_ACTION}">{L_TEAMPAGE}</a> &raquo; {CURRENT_CATEGORY_NAME}</strong></p><!-- ENDIF -->
+
+ <table class="table1">
+ <col class="col1" /><col class="col2" /><col class="col2" />
+ <thead>
+ <tr>
+ <th style="width: 50%">{L_GROUP}</th>
+ <th>{L_GROUP_TYPE}</th>
+ <th>{L_ACTION}</th>
+ </tr>
+ </thead>
+ <tbody>
+ <!-- BEGIN teampage -->
+ <tr>
+ <td>
+ <!-- IF teampage.U_CATEGORY -->
+ <a href="{teampage.U_CATEGORY}">{teampage.GROUP_NAME}</a>
+ <!-- ELSE -->
+ <strong<!-- IF teampage.GROUP_COLOUR --> style="color: {teampage.GROUP_COLOUR}"<!-- ENDIF -->>{teampage.GROUP_NAME}</strong>
+ <!-- ENDIF -->
+ </td>
+ <td style="text-align: center;"><!-- IF teampage.GROUP_TYPE -->{teampage.GROUP_TYPE}<!-- ELSE -->-<!-- ENDIF -->
+ </td></td>
+ <td class="actions">
+ <span class="up-disabled" style="display: none;">{ICON_MOVE_UP_DISABLED}</span>
+ <span class="up"><a href="{teampage.U_MOVE_UP}" data-ajax="row_up" data-overlay="false">{ICON_MOVE_UP}</a></span>
+ <span class="down-disabled" style="display:none;">{ICON_MOVE_DOWN_DISABLED}</span>
+ <span class="down"><a href="{teampage.U_MOVE_DOWN}" data-ajax="row_down" data-overlay="false">{ICON_MOVE_DOWN}</a></span>
+ <a href="{teampage.U_DELETE}">{ICON_DELETE}</a>
+ </td>
+ </tr>
+ <!-- BEGINELSE -->
+ <tr>
+ <td colspan="3" class="row3">{L_NO_GROUPS_ADDED}</td>
+ </tr>
+ <!-- END teampage -->
+ </tbody>
+ </table>
+
+ <!-- IF not S_TEAMPAGE_CATEGORY -->
+ <form id="teampage_add_category" method="post" action="{U_ACTION_TEAMPAGE}">
+ <fieldset class="quick">
+ <input class="inputbox autowidth" type="text" maxlength="255" name="category_name" placeholder="{L_GROUP_CATEGORY_NAME}" />
+ <input class="button2" type="submit" name="submit" value="{L_ADD_GROUP_CATEGORY}" />
+ <input type="hidden" name="action" value="add_category" />
+ {S_FORM_TOKEN}
+ </fieldset>
+ </form>
+ <!-- ENDIF -->
+
+ <form id="teampage_add_group" method="post" action="{U_ACTION_TEAMPAGE}">
+ <fieldset class="quick">
+ <select name="g">
+ <option value="0">{L_SELECT_GROUP}</option>
+ <!-- BEGIN add_teampage -->
+ <option<!-- IF add_teampage.GROUP_SPECIAL --> class="sep"<!-- ENDIF --> value="{add_teampage.GROUP_ID}">{add_teampage.GROUP_NAME}</option>
+ <!-- END add_teampage -->
+ </select>
+ <input class="button2" type="submit" name="submit" value="{L_ADD}" />
+ <input type="hidden" name="action" value="add" />
+ {S_FORM_TOKEN}
+ </fieldset>
+ </form>
+
+<!-- INCLUDE overall_footer.html -->
diff --git a/phpBB/adm/style/acp_icons.html b/phpBB/adm/style/acp_icons.html
index a34a91043c..9117052d87 100644
--- a/phpBB/adm/style/acp_icons.html
+++ b/phpBB/adm/style/acp_icons.html
@@ -1,6 +1,6 @@
<!-- INCLUDE overall_header.html -->
-<a name="maincontent"></a>
+<a id="maincontent"></a>
<!-- IF S_EDIT -->
@@ -22,7 +22,7 @@
{
var use_element = smiley[newimage];
- document.getElementById('add_image_src').src = '{PHPBB_ROOT_PATH}{IMG_PATH}/' + encodeURI(newimage);
+ document.getElementById('add_image_src').src = '{ROOT_PATH}{IMG_PATH}/' + encodeURI(newimage);
document.getElementById('add_code').value = use_element['code'];
document.getElementById('add_emotion').value = use_element['emotion'];
document.getElementById('add_width').value = use_element['width'];
@@ -74,7 +74,7 @@
<fieldset class="tabulated">
<legend>{L_TITLE}</legend>
- <table cellspacing="1" id="smilies">
+ <table class="table1 zebra-table" id="smilies">
<thead>
<tr>
<th colspan="{COLSPAN}">{L_CONFIG}</th>
@@ -100,7 +100,7 @@
</thead>
<tbody>
<!-- BEGIN items -->
- <!-- IF items.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
+ <tr>
<td style="text-align: center;"><img src="{items.IMG_SRC}" alt="" title="" /><input type="hidden" name="image[{items.IMG}]" value="1" /></td>
<td style="vertical-align: top;">[{items.IMG}]</td>
@@ -108,8 +108,8 @@
<td><input class="text post" type="text" name="code[{items.IMG}]" value="{items.CODE}" size="10" maxlength="50" /></td>
<td><input class="text post" type="text" name="emotion[{items.IMG}]" value="{items.EMOTION}" size="10" maxlength="50" /></td>
<!-- ENDIF -->
- <td><input class="text post" type="text" size="3" name="width[{items.IMG}]" value="{items.WIDTH}" /></td>
- <td><input class="text post" type="text" size="3" name="height[{items.IMG}]" value="{items.HEIGHT}" /></td>
+ <td><input class="text post" type="number" size="3" name="width[{items.IMG}]" value="{items.WIDTH}" /></td>
+ <td><input class="text post" type="number" size="3" name="height[{items.IMG}]" value="{items.HEIGHT}" /></td>
<td>
<input type="checkbox" class="radio" name="display_on_posting[{items.IMG}]"{items.POSTING_CHECKED} onclick="toggle_select('{items.A_IMG}', this.checked, '{items.S_ROW_COUNT}');"/>
<!-- IF items.S_ID -->
@@ -136,8 +136,8 @@
<td style="vertical-align: top;"><img src="{IMG_SRC}" id="add_image_src" alt="" title="" /></td>
<td><input class="text post" type="text" name="add_code" id="add_code" value="{CODE}" size="10" maxlength="50" /></td>
<td><input class="text post" type="text" name="add_emotion" id="add_emotion" value="{EMOTION}" size="10" maxlength="50" /></td>
- <td><input class="text post" type="text" size="3" name="add_width" id="add_width" value="{WIDTH}" /></td>
- <td><input class="text post" type="text" size="3" name="add_height" id="add_height" value="{HEIGHT}" /></td>
+ <td><input class="text post" type="number" size="3" name="add_width" id="add_width" value="{WIDTH}" /></td>
+ <td><input class="text post" type="number" size="3" name="add_height" id="add_height" value="{HEIGHT}" /></td>
<td><input type="checkbox" class="radio" name="add_display_on_posting" checked="checked" onclick="toggle_select('add', this.checked, 'add_order');"/></td>
<td><select id="order_add_order" name="add_order">
<optgroup id="order_disp_add_order" label="{L_DISPLAY_POSTING}">{S_ADD_ORDER_LIST_DISPLAY}</optgroup>
@@ -218,7 +218,7 @@
<legend>{L_TITLE}</legend>
- <table cellspacing="1">
+ <table class="table1 zebra-table">
<thead>
<tr>
<th>{L_TITLE}</th>
@@ -236,16 +236,18 @@
<td class="row3" colspan="{COLSPAN}" style="text-align: center;">{L_NOT_DISPLAYED}</td>
</tr>
<!-- ENDIF -->
- <!-- IF items.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
+ <tr>
<td style="width: 85%; text-align: center;"><img src="{items.IMG_SRC}" width="{items.WIDTH}" height="{items.HEIGHT}" alt="{items.ALT_TEXT}" title="{items.ALT_TEXT}" /></td>
<!-- IF S_SMILIES -->
<td style="text-align: center;">{items.CODE}</td>
<td style="text-align: center;">{items.EMOTION}</td>
<!-- ENDIF -->
- <td style="text-align: right; white-space: nowrap;">
- <!-- IF items.S_FIRST_ROW and not PREVIOUS_PAGE -->{ICON_MOVE_UP_DISABLED}<!-- ELSE --><a href="{items.U_MOVE_UP}">{ICON_MOVE_UP}</a><!-- ENDIF -->&nbsp;
- <!-- IF items.S_LAST_ROW and not NEXT_PAGE -->{ICON_MOVE_DOWN_DISABLED}<!-- ELSE --><a href="{items.U_MOVE_DOWN}">{ICON_MOVE_DOWN}</a><!-- ENDIF -->
- &nbsp;<a href="{items.U_EDIT}">{ICON_EDIT}</a> <a href="{items.U_DELETE}">{ICON_DELETE}</a>
+ <td class="actions" style="text-align: right;">
+ <span class="up-disabled" style="display:none;">{ICON_MOVE_UP_DISABLED}</span>
+ <span class="up"><a href="{items.U_MOVE_UP}" data-ajax="row_up">{ICON_MOVE_UP}</a></span>
+ <span class="down-disabled" style="display:none;">{ICON_MOVE_DOWN_DISABLED}</span>
+ <span class="down"><a href="{items.U_MOVE_DOWN}" data-ajax="row_down">{ICON_MOVE_DOWN}</a></span>
+ <a href="{items.U_EDIT}">{ICON_EDIT}</a> <a href="{items.U_DELETE}" data-ajax="row_delete">{ICON_DELETE}</a>
</td>
</tr>
<!-- BEGINELSE -->
@@ -255,7 +257,11 @@
<!-- END items -->
</tbody>
</table>
- <div>{PAGINATION}</div>
+ <div class="pagination">
+ <!-- IF .pagination -->
+ <!-- INCLUDE pagination.html -->
+ <!-- ENDIF -->
+ </div>
<p class="quick">
<input class="button2" name="add" type="submit" value="{L_ICON_ADD}" />&nbsp; &nbsp;<input class="button2" type="submit" name="edit" value="{L_ICON_EDIT}" />
</p>
diff --git a/phpBB/adm/style/acp_inactive.html b/phpBB/adm/style/acp_inactive.html
index b8e46a6e53..1cdc1abe6b 100644
--- a/phpBB/adm/style/acp_inactive.html
+++ b/phpBB/adm/style/acp_inactive.html
@@ -1,6 +1,6 @@
<!-- INCLUDE overall_header.html -->
-<a name="maincontent"></a>
+<a id="maincontent"></a>
<h2>{L_INACTIVE_USERS}</h2>
@@ -10,13 +10,13 @@
<div class="clearfix"></div>
-<!-- IF PAGINATION -->
+<!-- IF .pagination -->
<div class="pagination">
- <a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{S_ON_PAGE}</a> &bull; <span>{PAGINATION}</span>
+ <!-- INCLUDE pagination.html -->
</div>
<!-- ENDIF -->
-<table cellspacing="1">
+<table class="table1 zebra-table">
<thead>
<tr>
<th>{L_USERNAME}</th>
@@ -29,11 +29,10 @@
</thead>
<tbody>
<!-- BEGIN inactive -->
- <!-- IF inactive.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
-
+ <tr>
<td style="vertical-align: top;">
{inactive.USERNAME_FULL}
- <!-- IF inactive.POSTS --><br />{L_POSTS}: <strong>{inactive.POSTS}</strong> [<a href="{inactive.U_SEARCH_USER}">{L_SEARCH_USER_POSTS}</a>]<!-- ENDIF -->
+ <!-- IF inactive.POSTS --><br />{L_POSTS}{L_COLON} <strong>{inactive.POSTS}</strong> [<a href="{inactive.U_SEARCH_USER}">{L_SEARCH_USER_POSTS}</a>]<!-- ENDIF -->
</td>
<td style="vertical-align: top;">{inactive.JOINED}</td>
<td style="vertical-align: top;">{inactive.INACTIVE_DATE}</td>
@@ -53,15 +52,15 @@
</table>
<fieldset class="display-options">
- {L_DISPLAY_LOG}: &nbsp;{S_LIMIT_DAYS}&nbsp;{L_SORT_BY}: {S_SORT_KEY} {S_SORT_DIR}<!-- IF PAGINATION -->&nbsp;{L_USERS_PER_PAGE}: <input class="inputbox autowidth" type="text" name="users_per_page" id="users_per_page" size="3" value="{USERS_PER_PAGE}" /><!-- ENDIF -->
+ {L_DISPLAY_LOG}{L_COLON} &nbsp;{S_LIMIT_DAYS}&nbsp;{L_SORT_BY}{L_COLON} {S_SORT_KEY} {S_SORT_DIR}<!-- IF .pagination -->&nbsp;{L_USERS_PER_PAGE}{L_COLON} <input class="inputbox autowidth" type="number" name="users_per_page" id="users_per_page" size="3" value="{USERS_PER_PAGE}" /><!-- ENDIF -->
<input class="button2" type="submit" value="{L_GO}" name="sort" />
</fieldset>
<hr />
-<!-- IF PAGINATION -->
+<!-- IF .pagination -->
<div class="pagination">
- <a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{S_ON_PAGE}</a> &bull; <span>{PAGINATION}</span>
+ <!-- INCLUDE pagination.html -->
</div>
<!-- ENDIF -->
@@ -74,4 +73,4 @@
</form>
-<!-- INCLUDE overall_footer.html --> \ No newline at end of file
+<!-- INCLUDE overall_footer.html -->
diff --git a/phpBB/adm/style/acp_jabber.html b/phpBB/adm/style/acp_jabber.html
index 0c4512ba98..4d0b1b0d97 100644
--- a/phpBB/adm/style/acp_jabber.html
+++ b/phpBB/adm/style/acp_jabber.html
@@ -1,6 +1,6 @@
<!-- INCLUDE overall_header.html -->
-<a name="maincontent"></a>
+<a id="maincontent"></a>
<h1>{L_ACP_JABBER_SETTINGS}</h1>
@@ -21,36 +21,36 @@
<p>{L_JAB_GTALK_NOTE}</p>
<!-- ENDIF -->
<dl>
- <dt><label for="jab_enable">{L_JAB_ENABLE}:</label><br /><span>{L_JAB_ENABLE_EXPLAIN}</span></dt>
+ <dt><label for="jab_enable">{L_JAB_ENABLE}{L_COLON}</label><br /><span>{L_JAB_ENABLE_EXPLAIN}</span></dt>
<dd><label><input type="radio" class="radio" id="jab_enable" name="jab_enable" value="1"<!-- IF JAB_ENABLE --> checked="checked"<!-- ENDIF --> /> {L_ENABLED}</label>
<label><input type="radio" class="radio" name="jab_enable" value="0"<!-- IF not JAB_ENABLE --> checked="checked"<!-- ENDIF --> /> {L_DISABLED}</label></dd>
</dl>
<dl>
- <dt><label for="jab_host">{L_JAB_SERVER}:</label><br /><span>{L_JAB_SERVER_EXPLAIN}</span></dt>
+ <dt><label for="jab_host">{L_JAB_SERVER}{L_COLON}</label><br /><span>{L_JAB_SERVER_EXPLAIN}</span></dt>
<dd><input type="text" id="jab_host" name="jab_host" value="{JAB_HOST}" /></dd>
</dl>
<dl>
- <dt><label for="jab_port">{L_JAB_PORT}:</label><br /><span>{L_JAB_PORT_EXPLAIN}</span></dt>
- <dd><input type="text" id="jab_port" name="jab_port" value="{JAB_PORT}" maxlength="5" size="5" /></dd>
+ <dt><label for="jab_port">{L_JAB_PORT}{L_COLON}</label><br /><span>{L_JAB_PORT_EXPLAIN}</span></dt>
+ <dd><input type="number" id="jab_port" name="jab_port" value="{JAB_PORT}" maxlength="5" size="5" /></dd>
</dl>
<dl>
- <dt><label for="jab_username">{L_JAB_USERNAME}:</label><br /><span>{L_JAB_USERNAME_EXPLAIN}</span></dt>
+ <dt><label for="jab_username">{L_JAB_USERNAME}{L_COLON}</label><br /><span>{L_JAB_USERNAME_EXPLAIN}</span></dt>
<dd><input type="text" id="jab_username" name="jab_username" value="{JAB_USERNAME}" /></dd>
</dl>
<dl>
- <dt><label for="jab_password">{L_JAB_PASSWORD}:</label><br /><span>{L_JAB_PASSWORD_EXPLAIN}</span></dt>
+ <dt><label for="jab_password">{L_JAB_PASSWORD}{L_COLON}</label><br /><span>{L_JAB_PASSWORD_EXPLAIN}</span></dt>
<dd><input type="password" id="jab_password" name="jab_password" value="{JAB_PASSWORD}" /></dd>
</dl>
<!-- IF S_CAN_USE_SSL -->
<dl>
- <dt><label for="jab_use_ssl">{L_JAB_USE_SSL}:</label><br /><span>{L_JAB_USE_SSL_EXPLAIN}</span></dt>
+ <dt><label for="jab_use_ssl">{L_JAB_USE_SSL}{L_COLON}</label><br /><span>{L_JAB_USE_SSL_EXPLAIN}</span></dt>
<dd><label><input type="radio" class="radio" id="jab_use_ssl" name="jab_use_ssl" value="1"<!-- IF JAB_USE_SSL --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label><input type="radio" class="radio" name="jab_use_ssl" value="0"<!-- IF not JAB_USE_SSL --> checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
</dl>
<!-- ENDIF -->
<dl>
- <dt><label for="jab_package_size">{L_JAB_PACKAGE_SIZE}:</label><br /><span>{L_JAB_PACKAGE_SIZE_EXPLAIN}</span></dt>
- <dd><input type="text" id="jab_package_size" name="jab_package_size" value="{JAB_PACKAGE_SIZE}" maxlength="5" size="5" /></dd>
+ <dt><label for="jab_package_size">{L_JAB_PACKAGE_SIZE}{L_COLON}</label><br /><span>{L_JAB_PACKAGE_SIZE_EXPLAIN}</span></dt>
+ <dd><input type="number" id="jab_package_size" name="jab_package_size" value="{JAB_PACKAGE_SIZE}" maxlength="5" size="5" min="0" max="99999" /></dd>
</dl>
</fieldset>
diff --git a/phpBB/adm/style/acp_language.html b/phpBB/adm/style/acp_language.html
index 95ac1d5852..d32f6b7eac 100644
--- a/phpBB/adm/style/acp_language.html
+++ b/phpBB/adm/style/acp_language.html
@@ -1,6 +1,6 @@
<!-- INCLUDE overall_header.html -->
-<a name="maincontent"></a>
+<a id="maincontent"></a>
<!-- IF S_SELECT_METHOD -->
@@ -13,7 +13,7 @@
<fieldset>
<legend>{L_DOWNLOAD_AS}</legend>
<dl>
- <dt><label for="use_method">{L_DOWNLOAD_AS}:</label></dt>
+ <dt><label for="use_method">{L_DOWNLOAD_AS}{L_COLON}</label></dt>
<dd>{RADIO_BUTTONS}</dd>
</dl>
@@ -35,19 +35,19 @@
<fieldset>
<legend>{LANG_LOCAL_NAME}</legend>
<dl>
- <dt><label for="lang_english_name">{L_LANG_ENGLISH_NAME}:</label></dt>
+ <dt><label for="lang_english_name">{L_LANG_ENGLISH_NAME}{L_COLON}</label></dt>
<dd><input type="text" id="lang_english_name" name="lang_english_name" value="{LANG_ENGLISH_NAME}" maxlength="100" /></dd>
</dl>
<dl>
- <dt><label for="lang_local_name">{L_LANG_LOCAL_NAME}:</label></dt>
+ <dt><label for="lang_local_name">{L_LANG_LOCAL_NAME}{L_COLON}</label></dt>
<dd><input type="text" id="lang_local_name" name="lang_local_name" value="{LANG_LOCAL_NAME}" maxlength="255" /></dd>
</dl>
<dl>
- <dt><label>{L_LANG_ISO_CODE}:</label></dt>
+ <dt><label>{L_LANG_ISO_CODE}{L_COLON}</label></dt>
<dd><strong>{LANG_ISO}</strong></dd>
</dl>
<dl>
- <dt><label for="lang_author">{L_LANG_AUTHOR}:</label></dt>
+ <dt><label for="lang_author">{L_LANG_AUTHOR}{L_COLON}</label></dt>
<dd><input type="text" id="lang_author" name="lang_author" value="{LANG_AUTHOR}" maxlength="255" /></dd>
</dl>
@@ -75,7 +75,7 @@
<form id="missing" method="post" action="{U_MISSING_ACTION}">
- <table cellspacing="1">
+ <table class="table1">
<thead>
<tr>
<th>{L_LANGUAGE_KEY}</th>
@@ -98,7 +98,7 @@
<br /><br />
<!-- ENDIF -->
- <a name="entries"></a>
+ <a id="entries"></a>
<h1>{L_LANGUAGE_ENTRIES}</h1>
@@ -129,7 +129,7 @@
</style>
<![endif]-->
- <table cellspacing="1">
+ <table class="table1">
<thead>
<!-- IF S_EMAIL_FILE -->
<tr>
@@ -147,7 +147,7 @@
</tr>
<tr>
<td class="row3" style="text-align: right;">
- <!-- IF ALLOW_UPLOAD -->&nbsp;&nbsp;{L_UPLOAD_METHOD}:&nbsp;<!-- BEGIN buttons--><input type="radio" class="radio"<!-- IF buttons.S_FIRST_ROW --> id="method" checked="checked"<!-- ENDIF --> value="{buttons.VALUE}" name="method" />&nbsp;{buttons.VALUE}&nbsp;<!-- END buttons --><input type="submit" name="upload_file" class="button2" value="{L_SUBMIT_AND_UPLOAD}" /><!-- ENDIF --></td>
+ <!-- IF ALLOW_UPLOAD -->&nbsp;&nbsp;{L_UPLOAD_METHOD}{L_COLON}&nbsp;<!-- BEGIN buttons --><input type="radio" class="radio"<!-- IF buttons.S_FIRST_ROW --> id="method" checked="checked"<!-- ENDIF --> value="{buttons.VALUE}" name="method" />&nbsp;{buttons.VALUE}&nbsp;<!-- END buttons --><input type="submit" name="upload_file" class="button2" value="{L_SUBMIT_AND_UPLOAD}" /><!-- ENDIF --></td>
</tr>
</thead>
<tbody>
@@ -186,12 +186,12 @@
<fieldset>
<legend>{L_UPLOAD_SETTINGS}</legend>
<dl>
- <dt><label>{L_UPLOAD_METHOD}:</label></dt>
+ <dt><label>{L_UPLOAD_METHOD}{L_COLON}</label></dt>
<dd><strong>{NAME}</strong></dd>
</dl>
<!-- BEGIN data -->
<dl>
- <dt><label for="{data.DATA}">{data.NAME}:</label><br /><span>{data.EXPLAIN}</span></dt>
+ <dt><label for="{data.DATA}">{data.NAME}{L_COLON}</label><br /><span>{data.EXPLAIN}</span></dt>
<dd><input type="<!-- IF data.DATA == 'password' -->password<!-- ELSE -->text<!-- ENDIF -->" id="{data.DATA}" name="{data.DATA}" value="{data.DEFAULT}" /></dd>
</dl>
<!-- END data -->
@@ -211,7 +211,7 @@
<p>{L_ACP_LANGUAGE_PACKS_EXPLAIN}</p>
- <table cellspacing="1">
+ <table class="table1 zebra-table">
<thead>
<tr>
<th>{L_LANGUAGE_PACK_NAME}</th>
@@ -226,7 +226,7 @@
<td class="row3" colspan="5"><strong>{L_INSTALLED_LANGUAGE_PACKS}</strong></td>
</tr>
<!-- BEGIN lang -->
- <!-- IF lang.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
+ <tr>
<td><a href="{lang.U_DETAILS}">{lang.ENGLISH_NAME}</a> {lang.TAG}</td>
<td>{lang.LOCAL_NAME}</td>
<td style="text-align: center;"><strong>{lang.ISO}</strong></td>
@@ -240,7 +240,7 @@
</tr>
<!-- ENDIF -->
<!-- BEGIN notinst -->
- <!-- IF notinst.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
+ <tr>
<td>{notinst.NAME}</td>
<td>{notinst.LOCAL_NAME}</td>
<td style="text-align: center;"><strong>{notinst.ISO}</strong></td>
diff --git a/phpBB/adm/style/acp_logs.html b/phpBB/adm/style/acp_logs.html
index f2fa5dbc26..592b5bbc16 100644
--- a/phpBB/adm/style/acp_logs.html
+++ b/phpBB/adm/style/acp_logs.html
@@ -1,6 +1,6 @@
<!-- INCLUDE overall_header.html -->
-<a name="maincontent"></a>
+<a id="maincontent"></a>
<h1>{L_TITLE}</h1>
@@ -9,12 +9,12 @@
<form id="list" method="post" action="{U_ACTION}">
<fieldset class="display-options" style="float: left">
- {L_SEARCH_KEYWORDS}: <input type="text" name="keywords" value="{S_KEYWORDS}" />&nbsp;<input type="submit" class="button2" name="filter" value="{L_SEARCH}" />
+ {L_SEARCH_KEYWORDS}{L_COLON} <input type="text" name="keywords" value="{S_KEYWORDS}" />&nbsp;<input type="submit" class="button2" name="filter" value="{L_SEARCH}" />
</fieldset>
-<!-- IF PAGINATION -->
+<!-- IF .pagination -->
<div class="pagination" style="float: right; margin: 15px 0 2px 0">
- <a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{S_ON_PAGE}</a> &bull; <span>{PAGINATION}</span>
+ <!-- INCLUDE pagination.html -->
</div>
<!-- ENDIF -->
@@ -22,7 +22,7 @@
<div><br style="clear: both;" /></div>
<!-- IF .log -->
- <table cellspacing="1">
+ <table class="table1 zebra-table">
<thead>
<tr>
<th>{L_USERNAME}</th>
@@ -36,7 +36,7 @@
</thead>
<tbody>
<!-- BEGIN log -->
- <!-- IF log.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
+ <tr>
<td>
{log.USERNAME}
<!-- IF log.REPORTEE_USERNAME -->
@@ -54,9 +54,9 @@
</tbody>
</table>
-<!-- IF PAGINATION -->
+<!-- IF .pagination -->
<div class="pagination">
- <a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{S_ON_PAGE}</a> &bull; <span>{PAGINATION}</span>
+ <!-- INCLUDE pagination.html -->
</div>
<!-- ENDIF -->
@@ -67,7 +67,7 @@
<!-- ENDIF -->
<fieldset class="display-options">
- {L_DISPLAY_LOG}: &nbsp;{S_LIMIT_DAYS}&nbsp;{L_SORT_BY}: {S_SORT_KEY} {S_SORT_DIR}
+ {L_DISPLAY_LOG}{L_COLON} &nbsp;{S_LIMIT_DAYS}&nbsp;{L_SORT_BY}{L_COLON} {S_SORT_KEY} {S_SORT_DIR}
<input class="button2" type="submit" value="{L_GO}" name="sort" />
{S_FORM_TOKEN}
</fieldset>
@@ -75,7 +75,7 @@
<!-- IF S_SHOW_FORUMS -->
<fieldset class="quick">
- {L_SELECT_FORUM}: <select name="f" onchange="if(this.options[this.selectedIndex].value != -1){ this.form.submit(); }">{S_FORUM_BOX}</select>
+ {L_SELECT_FORUM}{L_COLON} <select name="f" onchange="if(this.options[this.selectedIndex].value != -1){ this.form.submit(); }">{S_FORUM_BOX}</select>
<input class="button2" type="submit" value="{L_GO}" />
</fieldset>
<!-- ENDIF -->
diff --git a/phpBB/adm/style/acp_main.html b/phpBB/adm/style/acp_main.html
index c665c9d893..9a9b3ff2b9 100644
--- a/phpBB/adm/style/acp_main.html
+++ b/phpBB/adm/style/acp_main.html
@@ -1,6 +1,6 @@
<!-- INCLUDE overall_header.html -->
-<a name="maincontent"></a>
+<a id="maincontent"></a>
<!-- IF S_RESTORE_PERMISSIONS -->
@@ -17,6 +17,7 @@
<!-- IF S_VERSIONCHECK_FAIL -->
<div class="errorbox notice">
<p>{L_VERSIONCHECK_FAIL}</p>
+ <p>{VERSIONCHECK_FAIL_REASON}</p>
<p><a href="{U_VERSIONCHECK_FORCE}">{L_VERSIONCHECK_FORCE_UPDATE}</a> &middot; <a href="{U_VERSIONCHECK}">{L_MORE_INFORMATION}</a></p>
</div>
<!-- ELSEIF not S_VERSION_UP_TO_DATE -->
@@ -26,6 +27,12 @@
</div>
<!-- ENDIF -->
+ <!-- IF S_SEARCH_INDEX_MISSING -->
+ <div class="errorbox">
+ <h3>{L_WARNING}</h3>
+ <p>{L_NO_SEARCH_INDEX}</p>
+ </div>
+ <!-- ENDIF -->
<!-- IF S_REMOVE_INSTALL -->
<div class="errorbox">
@@ -76,7 +83,9 @@
</div>
<!-- ENDIF -->
- <table cellspacing="1">
+ <!-- EVENT acp_main_notice_after -->
+
+ <table class="table1 two-columns no-header" data-no-responsive-header="true">
<caption>{L_FORUM_STATS}</caption>
<col class="col1" /><col class="col2" /><col class="col1" /><col class="col2" />
<thead>
@@ -89,56 +98,56 @@
</thead>
<tbody>
<tr>
- <td>{L_NUMBER_POSTS}: </td>
+ <td>{L_NUMBER_POSTS}{L_COLON} </td>
<td><strong>{TOTAL_POSTS}</strong></td>
- <td>{L_POSTS_PER_DAY}: </td>
+ <td>{L_POSTS_PER_DAY}{L_COLON} </td>
<td><strong>{POSTS_PER_DAY}</strong></td>
</tr>
<tr>
- <td>{L_NUMBER_TOPICS}: </td>
+ <td>{L_NUMBER_TOPICS}{L_COLON} </td>
<td><strong>{TOTAL_TOPICS}</strong></td>
- <td>{L_TOPICS_PER_DAY}: </td>
+ <td>{L_TOPICS_PER_DAY}{L_COLON} </td>
<td><strong>{TOPICS_PER_DAY}</strong></td>
</tr>
<tr>
- <td>{L_NUMBER_USERS}: </td>
+ <td>{L_NUMBER_USERS}{L_COLON} </td>
<td><strong>{TOTAL_USERS}</strong></td>
- <td>{L_USERS_PER_DAY}: </td>
+ <td>{L_USERS_PER_DAY}{L_COLON} </td>
<td><strong>{USERS_PER_DAY}</strong></td>
</tr>
<tr>
- <td>{L_NUMBER_FILES}: </td>
+ <td>{L_NUMBER_FILES}{L_COLON} </td>
<td><strong>{TOTAL_FILES}</strong></td>
- <td>{L_FILES_PER_DAY}: </td>
+ <td>{L_FILES_PER_DAY}{L_COLON} </td>
<td><strong>{FILES_PER_DAY}</strong></td>
</tr>
<tr>
- <td>{L_BOARD_STARTED}: </td>
+ <td>{L_BOARD_STARTED}{L_COLON} </td>
<td><strong>{START_DATE}</strong></td>
- <td>{L_AVATAR_DIR_SIZE}: </td>
+ <td>{L_AVATAR_DIR_SIZE}{L_COLON} </td>
<td><strong>{AVATAR_DIR_SIZE}</strong></td>
</tr>
<tr>
- <td>{L_DATABASE_SIZE}: </td>
+ <td>{L_DATABASE_SIZE}{L_COLON} </td>
<td><strong>{DBSIZE}</strong></td>
- <td>{L_UPLOAD_DIR_SIZE}: </td>
+ <td>{L_UPLOAD_DIR_SIZE}{L_COLON} </td>
<td><strong>{UPLOAD_DIR_SIZE}</strong></td>
</tr>
<tr>
- <td>{L_DATABASE_SERVER_INFO}: </td>
+ <td>{L_DATABASE_SERVER_INFO}{L_COLON} </td>
<td><strong>{DATABASE_INFO}</strong></td>
- <td>{L_GZIP_COMPRESSION}: </td>
+ <td>{L_GZIP_COMPRESSION}{L_COLON} </td>
<td><strong>{GZIP_COMPRESSION}</strong></td>
</tr>
<tr>
- <td>{L_BOARD_VERSION}: </td>
+ <td>{L_BOARD_VERSION}{L_COLON} </td>
<td>
<strong><a href="{U_VERSIONCHECK}" <!-- IF S_VERSION_UP_TO_DATE -->style="color: #228822;"<!-- ELSE -->style="color: #BC2A4D;"<!-- ENDIF --> title="{L_MORE_INFORMATION}">{BOARD_VERSION}</a></strong> [&nbsp;<a href="{U_VERSIONCHECK_FORCE}">{L_VERSIONCHECK_FORCE_UPDATE}</a>&nbsp;]
</td>
<!-- IF S_TOTAL_ORPHAN -->
- <td>{L_NUMBER_ORPHAN}: </td>
+ <td>{L_NUMBER_ORPHAN}{L_COLON} </td>
<td><strong>{TOTAL_ORPHAN}</strong></td>
<!-- ELSE -->
<td>&nbsp;</td>
@@ -152,14 +161,14 @@
<fieldset>
<legend>{L_STATISTIC_RESYNC_OPTIONS}</legend>
- <form id="action_online_form" method="post" action="{U_ACTION}">
+ <form id="action_online_form" method="post" action="{U_ACTION}" data-ajax="true">
<dl>
<dt><label for="action_online">{L_RESET_ONLINE}</label><br /><span>&nbsp;</span></dt>
<dd><input type="hidden" name="action" value="online" /><input class="button2" type="submit" id="action_online" name="action_online" value="{L_RUN}" /></dd>
</dl>
</form>
- <form id="action_date_form" method="post" action="{U_ACTION}">
+ <form id="action_date_form" method="post" action="{U_ACTION}" data-ajax="true">
<dl>
<dt><label for="action_date">{L_RESET_DATE}</label><br /><span>&nbsp;</span></dt>
<dd><input type="hidden" name="action" value="date" /><input class="button2" type="submit" id="action_date" name="action_date" value="{L_RUN}" /></dd>
@@ -188,19 +197,22 @@
</form>
<!-- IF S_FOUNDER -->
- <form id="action_purge_sessions_form" method="post" action="{U_ACTION}">
+ <form id="action_purge_sessions_form" method="post" action="{U_ACTION}" data-ajax="true">
<dl>
<dt><label for="action_purge_sessions">{L_PURGE_SESSIONS}</label><br /><span>{L_PURGE_SESSIONS_EXPLAIN}</span></dt>
<dd><input type="hidden" name="action" value="purge_sessions" /><input class="button2" type="submit" id="action_purge_sessions" name="action_purge_sessions" value="{L_RUN}" /></dd>
</dl>
</form>
- <form id="action_purge_cache_form" method="post" action="{U_ACTION}">
+ <!-- ENDIF -->
+
+ <form id="action_purge_cache_form" method="post" action="{U_ACTION}" data-ajax="true">
<dl>
<dt><label for="action_purge_cache">{L_PURGE_CACHE}</label><br /><span>{L_PURGE_CACHE_EXPLAIN}</span></dt>
<dd><input type="hidden" name="action" value="purge_cache" /><input class="button2" type="submit" id="action_purge_cache" name="action_purge_cache" value="{L_RUN}" /></dd>
</dl>
</form>
- <!-- ENDIF -->
+
+ <!-- EVENT acp_main_actions_append -->
</fieldset>
<!-- ENDIF -->
@@ -211,7 +223,7 @@
<div style="text-align: right;"><a href="{U_ADMIN_LOG}">&raquo; {L_VIEW_ADMIN_LOG}</a></div>
- <table cellspacing="1">
+ <table class="table1 zebra-table">
<thead>
<tr>
<th>{L_USERNAME}</th>
@@ -222,8 +234,7 @@
</thead>
<tbody>
<!-- BEGIN log -->
- <!-- IF log.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
-
+ <tr>
<td>{log.USERNAME}</td>
<td style="text-align: center;">{log.IP}</td>
<td style="text-align: center;">{log.DATE}</td>
@@ -244,7 +255,7 @@
<div style="text-align: right;"><a href="{U_INACTIVE_USERS}">&raquo; {L_VIEW_INACTIVE_USERS}</a></div>
- <table cellspacing="1">
+ <table class="table1 zebra-table">
<thead>
<tr>
<th>{L_USERNAME}</th>
@@ -256,11 +267,10 @@
</thead>
<tbody>
<!-- BEGIN inactive -->
- <!-- IF inactive.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
-
+ <tr>
<td style="vertical-align: top;">
{inactive.USERNAME_FULL}
- <!-- IF inactive.POSTS --><br />{L_POSTS}: <strong>{inactive.POSTS}</strong> [<a href="{inactive.U_SEARCH_USER}">{L_SEARCH_USER_POSTS}</a>]<!-- ENDIF -->
+ <!-- IF inactive.POSTS --><br />{L_POSTS}{L_COLON} <strong>{inactive.POSTS}</strong> [<a href="{inactive.U_SEARCH_USER}">{L_SEARCH_USER_POSTS}</a>]<!-- ENDIF -->
</td>
<td style="vertical-align: top;">{inactive.JOINED}</td>
<td style="vertical-align: top;">{inactive.INACTIVE_DATE}</td>
@@ -282,4 +292,4 @@
<!-- ENDIF -->
-<!-- INCLUDE overall_footer.html --> \ No newline at end of file
+<!-- INCLUDE overall_footer.html -->
diff --git a/phpBB/adm/style/acp_modules.html b/phpBB/adm/style/acp_modules.html
index 5396e78557..c7688a610c 100644
--- a/phpBB/adm/style/acp_modules.html
+++ b/phpBB/adm/style/acp_modules.html
@@ -1,6 +1,6 @@
<!-- INCLUDE overall_header.html -->
-<a name="maincontent"></a>
+<a id="maincontent"></a>
<!-- IF S_EDIT_MODULE -->
@@ -72,37 +72,37 @@
<fieldset>
<legend>{L_GENERAL_OPTIONS}</legend>
<dl>
- <dt><label for="module_langname">{L_MODULE_LANGNAME}:</label><br />
+ <dt><label for="module_langname">{L_MODULE_LANGNAME}{L_COLON}</label><br />
<span>{L_MODULE_LANGNAME_EXPLAIN}</span></dt>
<dd><input name="module_langname" type="text" class="text medium" id="module_langname" value="{MODULE_LANGNAME}" /></dd>
</dl>
<dl>
- <dt><label for="module_type">{L_MODULE_TYPE}:</label></dt>
+ <dt><label for="module_type">{L_MODULE_TYPE}{L_COLON}</label></dt>
<dd><select name="module_type" id="module_type" onchange="display_options(this.value);"><option value="category"<!-- IF S_IS_CAT --> selected="selected"<!-- ENDIF -->>{L_CATEGORY}</option><option value="module"<!-- IF not S_IS_CAT --> selected="selected"<!-- ENDIF -->>{L_MODULE}</option></select></dd>
</dl>
<dl>
- <dt><label for="parent_id">{L_PARENT}:</label></dt>
+ <dt><label for="parent_id">{L_PARENT}{L_COLON}</label></dt>
<dd><select name="module_parent_id" id="parent_id">{S_CAT_OPTIONS}</select></dd>
</dl>
<hr />
<dl>
- <dt><label for="module_enabled">{L_MODULE_ENABLED}:</label></dt>
+ <dt><label for="module_enabled">{L_MODULE_ENABLED}{L_COLON}</label></dt>
<dd><label><input type="radio" class="radio" name="module_enabled" id="module_enabled" value="1"<!-- IF MODULE_ENABLED --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label><input type="radio" class="radio" name="module_enabled" value="0"<!-- IF not MODULE_ENABLED --> checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
</dl>
<div id="modoptions"<!-- IF S_IS_CAT --> style="display: none;"<!-- ENDIF -->>
<dl>
- <dt><label for="module_display">{L_MODULE_DISPLAYED}:</label><br /><span>{L_MODULE_DISPLAYED_EXPLAIN}</span></dt>
+ <dt><label for="module_display">{L_MODULE_DISPLAYED}{L_COLON}</label><br /><span>{L_MODULE_DISPLAYED_EXPLAIN}</span></dt>
<dd><label><input type="radio" class="radio" name="module_display" id="module_display" value="1"<!-- IF MODULE_DISPLAY --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label><input type="radio" class="radio" name="module_display" value="0"<!-- IF not MODULE_DISPLAY --> checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
</dl>
<dl>
- <dt><label for="module_basename">{L_CHOOSE_MODULE}:</label><br />
+ <dt><label for="module_basename">{L_CHOOSE_MODULE}{L_COLON}</label><br />
<span>{L_CHOOSE_MODULE_EXPLAIN}</span></dt>
<dd><select name="module_basename" id="module_basename" onchange="display_modes(this.value);">{S_MODULE_NAMES}</select></dd>
</dl>
<dl>
- <dt><label for="module_mode">{L_CHOOSE_MODE}:</label><br />
+ <dt><label for="module_mode">{L_CHOOSE_MODE}{L_COLON}</label><br />
<span>{L_CHOOSE_MODE_EXPLAIN}</span></dt>
<dd><select name="module_mode" id="module_mode">{S_MODULE_MODES}</select></dd>
</dl>
@@ -132,7 +132,7 @@
</div>
<!-- ENDIF -->
- <table cellspacing="1">
+ <table class="table1">
<tbody>
<tr>
<td class="row3">{NAVIGATION}<!-- IF S_NO_MODULES --> [<a href="{U_EDIT}">{L_EDIT}</a> | <a href="{U_DELETE}">{L_DELETE}</a> | <!-- IF MODULE_ENABLED --><a href="{U_DISABLE}">{L_DISABLE}</a><!-- ELSE --><a href="{U_ENABLE}">{L_ENABLE}</a><!-- ENDIF -->]<!-- ENDIF --></td>
@@ -141,7 +141,7 @@
</table>
<!-- IF .modules -->
- <table cellspacing="1">
+ <table class="table1">
<col class="row1" /><col class="row1" /><col class="row2" /><col class="row2" />
<tbody>
<!-- BEGIN modules -->
@@ -149,22 +149,13 @@
<td style="width: 5%; text-align: center;">{modules.MODULE_IMAGE}</td>
<td><a href="{modules.U_MODULE}">{modules.MODULE_TITLE}</a><!-- IF not modules.MODULE_DISPLAYED --> <span class="small">[{L_HIDDEN_MODULE}]</span><!-- ENDIF --></td>
<td style="width: 15%; white-space: nowrap; text-align: center; vertical-align: middle;">&nbsp;<!-- IF modules.MODULE_ENABLED --><a href="{modules.U_DISABLE}">{L_DISABLE}</a><!-- ELSE --><a href="{modules.U_ENABLE}">{L_ENABLE}</a><!-- ENDIF -->&nbsp;</td>
- <td style="width:90px; white-space: nowrap; text-align: right; vertical-align: middle;">
- <!-- IF modules.S_FIRST_ROW && not modules.S_LAST_ROW -->
- {ICON_MOVE_UP_DISABLED}
- <a href="{modules.U_MOVE_DOWN}">{ICON_MOVE_DOWN}</a>
- <!-- ELSEIF not modules.S_FIRST_ROW && not modules.S_LAST_ROW-->
- <a href="{modules.U_MOVE_UP}">{ICON_MOVE_UP}</a>
- <a href="{modules.U_MOVE_DOWN}">{ICON_MOVE_DOWN}</a>
- <!-- ELSEIF modules.S_LAST_ROW && not modules.S_FIRST_ROW -->
- <a href="{modules.U_MOVE_UP}">{ICON_MOVE_UP}</a>
- {ICON_MOVE_DOWN_DISABLED}
- <!-- ELSE -->
- {ICON_MOVE_UP_DISABLED}
- {ICON_MOVE_DOWN_DISABLED}
- <!-- ENDIF -->
+ <td class="actions">
+ <span class="up-disabled" style="display:none;">{ICON_MOVE_UP_DISABLED}</span>
+ <span class="up"><a href="{modules.U_MOVE_UP}" data-ajax="row_up">{ICON_MOVE_UP}</a></span>
+ <span class="down-disabled" style="display:none;">{ICON_MOVE_DOWN_DISABLED}</span>
+ <span class="down"><a href="{modules.U_MOVE_DOWN}" data-ajax="row_down">{ICON_MOVE_DOWN}</a></span>
<a href="{modules.U_EDIT}">{ICON_EDIT}</a>
- <a href="{modules.U_DELETE}">{ICON_DELETE}</a>
+ <a href="{modules.U_DELETE}" data-ajax="row_delete">{ICON_DELETE}</a>
</td>
</tr>
<!-- END modules -->
@@ -201,7 +192,7 @@
<form id="mselect" method="post" action="{U_SEL_ACTION}">
<fieldset class="quick">
- {L_SELECT_MODULE}: <select name="parent_id" onchange="if(this.options[this.selectedIndex].value != -1){ this.form.submit(); }">{MODULE_BOX}</select>
+ {L_SELECT_MODULE}{L_COLON} <select name="parent_id" onchange="if(this.options[this.selectedIndex].value != -1){ this.form.submit(); }">{MODULE_BOX}</select>
<input class="button2" type="submit" value="{L_GO}" />
</fieldset>
diff --git a/phpBB/adm/style/acp_permission_roles.html b/phpBB/adm/style/acp_permission_roles.html
index 220e7dafbe..b3137f134c 100644
--- a/phpBB/adm/style/acp_permission_roles.html
+++ b/phpBB/adm/style/acp_permission_roles.html
@@ -1,6 +1,6 @@
<!-- INCLUDE overall_header.html -->
-<a name="maincontent"></a>
+<a id="maincontent"></a>
<!-- IF S_EDIT -->
@@ -36,11 +36,11 @@
<fieldset>
<legend>{L_ROLE_DETAILS}</legend>
<dl>
- <dt><label for="role_name">{L_ROLE_NAME}:</label></dt>
+ <dt><label for="role_name">{L_ROLE_NAME}{L_COLON}</label></dt>
<dd><input name="role_name" type="text" id="role_name" value="{ROLE_NAME}" maxlength="255" /></dd>
</dl>
<dl>
- <dt><label for="role_description">{L_ROLE_DESCRIPTION}:</label><br /><span>{L_ROLE_DESCRIPTION_EXPLAIN}</span></dt>
+ <dt><label for="role_description">{L_ROLE_DESCRIPTION}{L_COLON}</label><br /><span>{L_ROLE_DESCRIPTION_EXPLAIN}</span></dt>
<dd><textarea id="role_description" name="role_description" rows="3" cols="45">{ROLE_DESCRIPTION}</textarea></dd>
</dl>
@@ -60,7 +60,7 @@
<p>
- <a name="acl"></a>
+ <a id="acl"></a>
<a href="#maincontent">&raquo; {L_BACK_TO_TOP}</a><br />
<br /><br />
@@ -90,9 +90,8 @@
</div>
<!-- BEGIN auth -->
<div class="permissions-panel" id="options00{auth.S_ROW_COUNT}"<!-- IF auth.S_FIRST_ROW --><!-- ELSE --> style="display: none;"<!-- ENDIF -->>
- <span class="corners-top"><span></span></span>
<div class="tablewrap">
- <table id="table00{auth.S_ROW_COUNT}" cellspacing="1">
+ <table id="table00{auth.S_ROW_COUNT}" class="table1 not-responsive">
<colgroup>
<col class="permissions-name" />
<col class="permissions-yes" />
@@ -120,7 +119,6 @@
</tbody>
</table>
</div>
- <span class="corners-bottom"><span></span></span>
</div>
<!-- END auth -->
</div>
@@ -144,7 +142,7 @@
<form id="acp_roles" method="post" action="{U_ACTION}">
- <table cellspacing="1">
+ <table class="table1">
<col class="col2" /><col class="col2" /><col class="col1" /><col class="col2" /><col class="col2" />
<thead>
<tr>
@@ -159,22 +157,13 @@
<!-- IF roles.ROLE_DESCRIPTION --><br /><span>{roles.ROLE_DESCRIPTION}</span><!-- ENDIF -->
</td>
<td style="width: 30%; text-align: center; vertical-align: top; white-space: nowrap;"><!-- IF roles.U_DISPLAY_ITEMS --><a href="{roles.U_DISPLAY_ITEMS}">{L_VIEW_ASSIGNED_ITEMS}</a><!-- ELSE -->{L_VIEW_ASSIGNED_ITEMS}<!-- ENDIF --></td>
- <td style="width: 80px; text-align: right; vertical-align: top; white-space: nowrap;">
- <!-- IF roles.S_FIRST_ROW && not roles.S_LAST_ROW -->
- {ICON_MOVE_UP_DISABLED}
- <a href="{roles.U_MOVE_DOWN}">{ICON_MOVE_DOWN}</a>
- <!-- ELSEIF not roles.S_FIRST_ROW && not roles.S_LAST_ROW-->
- <a href="{roles.U_MOVE_UP}">{ICON_MOVE_UP}</a>
- <a href="{roles.U_MOVE_DOWN}">{ICON_MOVE_DOWN}</a>
- <!-- ELSEIF roles.S_LAST_ROW && not roles.S_FIRST_ROW -->
- <a href="{roles.U_MOVE_UP}">{ICON_MOVE_UP}</a>
- {ICON_MOVE_DOWN_DISABLED}
- <!-- ELSE -->
- {ICON_MOVE_UP_DISABLED}
- {ICON_MOVE_DOWN_DISABLED}
- <!-- ENDIF -->
+ <td class="actions">
+ <span class="up-disabled" style="display:none;">{ICON_MOVE_UP_DISABLED}</span>
+ <span class="up"><a href="{roles.U_MOVE_UP}" data-ajax="row_up">{ICON_MOVE_UP}</a></span>
+ <span class="down-disabled" style="display:none;">{ICON_MOVE_DOWN_DISABLED}</span>
+ <span class="down"><a href="{roles.U_MOVE_DOWN}" data-ajax="row_down">{ICON_MOVE_DOWN}</a></span>
<a href="{roles.U_EDIT}" title="{L_EDIT_ROLE}">{ICON_EDIT}</a>
- <a href="{roles.U_REMOVE}" title="{L_REMOVE_ROLE}">{ICON_DELETE}</a>
+ <a href="{roles.U_REMOVE}" title="{L_REMOVE_ROLE}" data-ajax="row_delete">{ICON_DELETE}</a>
</td>
</tr>
<!-- END roles -->
@@ -182,14 +171,14 @@
</table>
<fieldset class="quick">
- {L_CREATE_ROLE}: <input type="text" name="role_name" value="" maxlength="255" /><!-- IF S_ROLE_OPTIONS --> <select name="options_from"><option value="0" selected="selected">{L_CREATE_ROLE_FROM}</option>{S_ROLE_OPTIONS}</select><!-- ENDIF --> <input class="button2" type="submit" name="add" value="{L_SUBMIT}" /><br />
+ {L_CREATE_ROLE}{L_COLON} <input type="text" name="role_name" value="" maxlength="255" /><!-- IF S_ROLE_OPTIONS --> <select name="options_from"><option value="0" selected="selected">{L_CREATE_ROLE_FROM}</option>{S_ROLE_OPTIONS}</select><!-- ENDIF --> <input class="button2" type="submit" name="add" value="{L_SUBMIT}" /><br />
{S_FORM_TOKEN}
</fieldset>
</form>
<!-- IF S_DISPLAY_ROLE_MASK -->
- <a name="assigned_to"></a>
+ <a id="assigned_to"></a>
<h1>{L_ROLE_ASSIGNED_TO}</h1>
@@ -199,4 +188,4 @@
<!-- ENDIF -->
-<!-- INCLUDE overall_footer.html --> \ No newline at end of file
+<!-- INCLUDE overall_footer.html -->
diff --git a/phpBB/adm/style/acp_permissions.html b/phpBB/adm/style/acp_permissions.html
index 63583093b0..6dc9dca2e7 100644
--- a/phpBB/adm/style/acp_permissions.html
+++ b/phpBB/adm/style/acp_permissions.html
@@ -1,6 +1,6 @@
<!-- INCLUDE overall_header.html -->
-<a name="maincontent"></a>
+<a id="maincontent"></a>
<!-- IF S_INTRO -->
@@ -19,7 +19,7 @@
<p>{L_EXPLAIN}</p>
<!-- IF S_FORUM_NAMES -->
- <p><strong>{L_FORUMS}:</strong> {FORUM_NAMES}</p>
+ <p><strong>{L_FORUMS}{L_COLON}</strong> {FORUM_NAMES}</p>
<!-- ENDIF -->
<!-- IF S_SELECT_FORUM -->
@@ -30,7 +30,7 @@
<legend>{L_LOOK_UP_FORUM}</legend>
<!-- IF S_FORUM_MULTIPLE --><p>{L_LOOK_UP_FORUMS_EXPLAIN}</p><!-- ENDIF -->
<dl>
- <dt><label for="forum">{L_LOOK_UP_FORUM}:</label></dt>
+ <dt><label for="forum">{L_LOOK_UP_FORUM}{L_COLON}</label></dt>
<dd><select id="forum" name="forum_id[]"<!-- IF S_FORUM_MULTIPLE --> multiple="multiple"<!-- ENDIF --> size="10">{S_FORUM_OPTIONS}</select></dd>
<!-- IF S_FORUM_ALL --><dd><label><input type="checkbox" class="radio" name="all_forums" value="1" /> {L_ALL_FORUMS}</label></dd><!-- ENDIF -->
</dl>
@@ -52,7 +52,7 @@
<legend>{L_LOOK_UP_FORUM}</legend>
<p>{L_SELECT_FORUM_SUBFORUM_EXPLAIN}</p>
<dl>
- <dt><label for="sforum">{L_LOOK_UP_FORUM}:</label></dt>
+ <dt><label for="sforum">{L_LOOK_UP_FORUM}{L_COLON}</label></dt>
<dd><select id="sforum" name="subforum_id">{S_SUBFORUM_OPTIONS}</select></dd>
</dl>
@@ -74,7 +74,7 @@
<fieldset>
<legend>{L_LOOK_UP_USER}</legend>
<dl>
- <dt><label for="username">{L_FIND_USERNAME}:</label></dt>
+ <dt><label for="username">{L_FIND_USERNAME}{L_COLON}</label></dt>
<dd><input class="text medium" type="text" id="username" name="username[]" /></dd>
<dd>[ <a href="{U_FIND_USERNAME}" onclick="find_username(this.href); return false;">{L_FIND_USERNAME}</a> ]</dd>
<dd class="full" style="text-align: left;"><label><input type="checkbox" class="radio" id="anonymous" name="user_id[]" value="{ANONYMOUS_USER_ID}" /> {L_SELECT_ANONYMOUS}</label></dd>
@@ -95,7 +95,7 @@
<fieldset>
<legend>{L_LOOK_UP_GROUP}</legend>
<dl>
- <dt><label for="group">{L_LOOK_UP_GROUP}:</label></dt>
+ <dt><label for="group">{L_LOOK_UP_GROUP}{L_COLON}</label></dt>
<dd><select name="group_id[]" id="group">{S_GROUP_OPTIONS}</select></dd>
</dl>
@@ -110,7 +110,7 @@
<!-- ELSEIF S_SELECT_USERGROUP -->
- <div style="float: {S_CONTENT_FLOW_BEGIN}; width: 48%;">
+ <div class="column1">
<!-- IF S_CAN_SELECT_USER -->
@@ -155,7 +155,7 @@
</div>
- <div style="float: {S_CONTENT_FLOW_END}; width: 48%">
+ <div class="column2">
<!-- IF S_CAN_SELECT_GROUP -->
@@ -200,7 +200,7 @@
<!-- ELSEIF S_SELECT_USERGROUP_VIEW -->
- <div style="float: {S_CONTENT_FLOW_BEGIN}; width: 48%;">
+ <div class="column1">
<h1>{L_USERS}</h1>
@@ -225,7 +225,7 @@
<fieldset>
<legend>{L_LOOK_UP_USER}</legend>
<dl>
- <dt><label for="username">{L_FIND_USERNAME}:</label></dt>
+ <dt><label for="username">{L_FIND_USERNAME}{L_COLON}</label></dt>
<dd><input type="text" id="username" name="username[]" /></dd>
<dd>[ <a href="{U_FIND_USERNAME}" onclick="find_username(this.href); return false;">{L_FIND_USERNAME}</a> ]</dd>
<dd class="full" style="text-align: left;"><label><input type="checkbox" class="radio" id="anonymous" name="user_id[]" value="{ANONYMOUS_USER_ID}" /> {L_SELECT_ANONYMOUS}</label></dd>
@@ -241,7 +241,7 @@
</div>
- <div style="float: {S_CONTENT_FLOW_END}; width: 48%">
+ <div class="column2">
<h1>{L_USERGROUPS}</h1>
@@ -266,7 +266,7 @@
<fieldset>
<legend>{L_LOOK_UP_GROUP}</legend>
<dl>
- <dt><label for="group_select">{L_LOOK_UP_GROUP}:</label></dt>
+ <dt><label for="group_select">{L_LOOK_UP_GROUP}{L_COLON}</label></dt>
<dd><select name="group_id[]" id="group_select">{S_ADD_GROUP_OPTIONS}</select></dd>
<dd>&nbsp;</dd>
</dl>
@@ -317,14 +317,14 @@
<fieldset class="quick" style="float: {S_CONTENT_FLOW_BEGIN};">
{S_HIDDEN_FIELDS}
{S_FORM_TOKEN}
- {L_SELECT_TYPE}: <select name="type">{S_PERMISSION_DROPDOWN}</select>
+ {L_SELECT_TYPE}{L_COLON} <select name="type">{S_PERMISSION_DROPDOWN}</select>
<input class="button2" type="submit" name="submit" value="{L_GO}" />
</fieldset>
</form>
<!-- ENDIF -->
- <br /><br />
+ <br class="responsive-hide" /><br class="responsive-hide" />
<!-- include tooltip file -->
<script type="text/javascript" src="style/tooltip.js"></script>
@@ -340,7 +340,7 @@
<!-- INCLUDE permission_mask.html -->
- <br /><br />
+ <br class="responsive-hide" /><br class="responsive-hide" />
<fieldset class="quick" style="float: {S_CONTENT_FLOW_END};">
<input class="button1" type="submit" name="action[apply_all_permissions]" value="{L_APPLY_ALL_PERMISSIONS}" />
@@ -348,10 +348,10 @@
{S_FORM_TOKEN}
</fieldset>
- <br /><br />
+ <br class="responsive-hide" /><br class="responsive-hide" />
</form>
<!-- ENDIF -->
-<!-- INCLUDE overall_footer.html --> \ No newline at end of file
+<!-- INCLUDE overall_footer.html -->
diff --git a/phpBB/adm/style/acp_php_info.html b/phpBB/adm/style/acp_php_info.html
index de065c4896..760cd0e9f6 100644
--- a/phpBB/adm/style/acp_php_info.html
+++ b/phpBB/adm/style/acp_php_info.html
@@ -1,6 +1,6 @@
<!-- INCLUDE overall_header.html -->
-<a name="maincontent"></a>
+<a id="maincontent"></a>
<h1>{L_ACP_PHP_INFO}</h1>
@@ -10,4 +10,4 @@
{PHPINFO}
</div>
-<!-- INCLUDE overall_footer.html --> \ No newline at end of file
+<!-- INCLUDE overall_footer.html -->
diff --git a/phpBB/adm/style/acp_profile.html b/phpBB/adm/style/acp_profile.html
index 1c9c038f8f..64bc3df09b 100644
--- a/phpBB/adm/style/acp_profile.html
+++ b/phpBB/adm/style/acp_profile.html
@@ -1,6 +1,6 @@
<!-- INCLUDE overall_header.html -->
-<a name="maincontent"></a>
+<a id="maincontent"></a>
<!-- IF S_EDIT -->
@@ -24,22 +24,22 @@
<fieldset>
<legend>{L_TITLE}</legend>
<dl>
- <dt><label>{L_FIELD_TYPE}:</label><br /><span>{L_FIELD_TYPE_EXPLAIN}</span></dt>
+ <dt><label>{L_FIELD_TYPE}{L_COLON}</label><br /><span>{L_FIELD_TYPE_EXPLAIN}</span></dt>
<dd><strong>{FIELD_TYPE}</strong></dd>
</dl>
<!-- IF S_EDIT_MODE -->
<dl>
- <dt><label>{L_FIELD_IDENT}:</label><br /><span>{L_FIELD_IDENT_EXPLAIN}</span></dt>
+ <dt><label>{L_FIELD_IDENT}{L_COLON}</label><br /><span>{L_FIELD_IDENT_EXPLAIN}</span></dt>
<dd><input type="hidden" name="field_ident" value="{FIELD_IDENT}" /><strong>{FIELD_IDENT}</strong></dd>
</dl>
<!-- ELSE -->
<dl>
- <dt><label for="field_ident">{L_FIELD_IDENT}:</label><br /><span>{L_FIELD_IDENT_EXPLAIN}</span></dt>
+ <dt><label for="field_ident">{L_FIELD_IDENT}{L_COLON}</label><br /><span>{L_FIELD_IDENT_EXPLAIN}</span></dt>
<dd><input class="text medium" type="text" id="field_ident" name="field_ident" value="{FIELD_IDENT}" /></dd>
</dl>
<!-- ENDIF -->
<dl>
- <dt><label for="field_no_view">{L_DISPLAY_PROFILE_FIELD}:</label><br /><span>{L_DISPLAY_PROFILE_FIELD_EXPLAIN}</span></dt>
+ <dt><label for="field_no_view">{L_DISPLAY_PROFILE_FIELD}{L_COLON}</label><br /><span>{L_DISPLAY_PROFILE_FIELD_EXPLAIN}</span></dt>
<dd><label><input type="radio" class="radio" id="field_no_view" name="field_no_view" value="0"<!-- IF not S_FIELD_NO_VIEW --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label><input type="radio" class="radio" name="field_no_view" value="1"<!-- IF S_FIELD_NO_VIEW --> checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
</dl>
@@ -48,29 +48,43 @@
<fieldset>
<legend>{L_VISIBILITY_OPTION}</legend>
<dl>
- <dt><label for="field_show_profile">{L_DISPLAY_AT_PROFILE}:</label><br /><span>{L_DISPLAY_AT_PROFILE_EXPLAIN}</span></dt>
+ <dt><label for="field_show_profile">{L_DISPLAY_AT_PROFILE}{L_COLON}</label><br /><span>{L_DISPLAY_AT_PROFILE_EXPLAIN}</span></dt>
<dd><input type="checkbox" class="radio" id="field_show_profile" name="field_show_profile" value="1"<!-- IF S_SHOW_PROFILE --> checked="checked"<!-- ENDIF --> /></dd>
</dl>
<dl>
- <dt><label for="field_show_on_reg">{L_DISPLAY_AT_REGISTER}:</label><br /><span>{L_DISPLAY_AT_REGISTER_EXPLAIN}</span></dt>
+ <dt><label for="field_show_on_reg">{L_DISPLAY_AT_REGISTER}{L_COLON}</label><br /><span>{L_DISPLAY_AT_REGISTER_EXPLAIN}</span></dt>
<dd><input type="checkbox" class="radio" id="field_show_on_reg" name="field_show_on_reg" value="1"<!-- IF S_SHOW_ON_REG --> checked="checked"<!-- ENDIF --> /></dd>
</dl>
<dl>
- <dt><label for="field_show_on_vt">{L_DISPLAY_ON_VT}:</label><br /><span>{L_DISPLAY_ON_VT_EXPLAIN}</span></dt>
+ <dt><label for="field_show_on_pm">{L_DISPLAY_ON_PM}{L_COLON}</label><br /><span>{L_DISPLAY_ON_PM_EXPLAIN}</span></dt>
+ <dd><input type="checkbox" class="radio" id="field_show_on_pm" name="field_show_on_pm" value="1"<!-- IF S_SHOW_ON_PM --> checked="checked"<!-- ENDIF --> /></dd>
+ </dl>
+ <dl>
+ <dt><label for="field_show_on_vt">{L_DISPLAY_ON_VT}{L_COLON}</label><br /><span>{L_DISPLAY_ON_VT_EXPLAIN}</span></dt>
<dd><input type="checkbox" class="radio" id="field_show_on_vt" name="field_show_on_vt" value="1"<!-- IF S_SHOW_ON_VT --> checked="checked"<!-- ENDIF --> /></dd>
</dl>
<dl>
- <dt><label for="field_required">{L_REQUIRED_FIELD}:</label><br /><span>{L_REQUIRED_FIELD_EXPLAIN}</span></dt>
+ <dt><label for="field_show_on_ml">{L_DISPLAY_ON_MEMBERLIST}{L_COLON}</label><br /><span>{L_DISPLAY_ON_MEMBERLIST_EXPLAIN}</span></dt>
+ <dd><input type="checkbox" class="radio" id="field_show_on_ml" name="field_show_on_ml" value="1"<!-- IF S_SHOW_ON_MEMBERLIST --> checked="checked"<!-- ENDIF --> /></dd>
+ </dl>
+ <dl>
+ <dt><label for="field_required">{L_REQUIRED_FIELD}{L_COLON}</label><br /><span>{L_REQUIRED_FIELD_EXPLAIN}</span></dt>
<dd><input type="checkbox" class="radio" id="field_required" name="field_required" value="1"<!-- IF S_FIELD_REQUIRED --> checked="checked"<!-- ENDIF --> /></dd>
</dl>
<dl>
- <dt><label for="field_show_novalue">{L_SHOW_NOVALUE_FIELD}:</label><br /><span>{L_SHOW_NOVALUE_FIELD_EXPLAIN}</span></dt>
+ <dt><label for="field_show_novalue">{L_SHOW_NOVALUE_FIELD}{L_COLON}</label><br /><span>{L_SHOW_NOVALUE_FIELD_EXPLAIN}</span></dt>
<dd><input type="checkbox" class="radio" id="field_show_novalue" name="field_show_novalue" value="1"<!-- IF S_FIELD_SHOW_NOVALUE --> checked="checked"<!-- ENDIF --> /></dd>
</dl>
<dl>
- <dt><label for="field_hide">{L_HIDE_PROFILE_FIELD}:</label><br /><span>{L_HIDE_PROFILE_FIELD_EXPLAIN}</span></dt>
+ <dt><label for="field_hide">{L_HIDE_PROFILE_FIELD}{L_COLON}</label><br /><span>{L_HIDE_PROFILE_FIELD_EXPLAIN}</span></dt>
<dd><input type="checkbox" class="radio" id="field_hide" name="field_hide" value="1"<!-- IF S_FIELD_HIDE --> checked="checked"<!-- ENDIF --> /></dd>
</dl>
+ <dl>
+ <dt><label for="field_is_contact">{L_FIELD_IS_CONTACT}{L_COLON}</label><br /><span>{L_FIELD_IS_CONTACT_EXPLAIN}</span></dt>
+ <dd><input type="checkbox" class="radio" id="field_is_contact" name="field_is_contact" value="1"<!-- IF S_FIELD_CONTACT --> checked="checked"<!-- ENDIF --> /></dd>
+ <dd><input class="text medium" type="text" name="field_contact_desc" id="field_contact_desc" value="{FIELD_CONTACT_DESC}" /> <label for="field_contact_desc">{L_FIELD_CONTACT_DESC}</label></dd>
+ <dd><input class="text medium" type="text" name="field_contact_url" id="field_contact_url" value="{FIELD_CONTACT_URL}" /> <label for="field_contact_url">{L_FIELD_CONTACT_URL}</label></dd>
+ </dl>
</fieldset>
<!-- IF S_EDIT_MODE -->
@@ -82,22 +96,22 @@
<fieldset>
<legend>{L_LANG_SPECIFIC}</legend>
<dl>
- <dt><label for="lang_name">{L_USER_FIELD_NAME}:</label></dt>
+ <dt><label for="lang_name">{L_USER_FIELD_NAME}{L_COLON}</label></dt>
<dd><input class="text medium" type="text" id="lang_name" name="lang_name" value="{LANG_NAME}" /></dd>
</dl>
<dl>
- <dt><label for="lang_explain">{L_FIELD_DESCRIPTION}:</label><br /><span>{L_FIELD_DESCRIPTION_EXPLAIN}</span></dt>
+ <dt><label for="lang_explain">{L_FIELD_DESCRIPTION}{L_COLON}</label><br /><span>{L_FIELD_DESCRIPTION_EXPLAIN}</span></dt>
<dd><textarea id="lang_explain" name="lang_explain" rows="3" cols="80">{LANG_EXPLAIN}</textarea></dd>
</dl>
<!-- IF S_TEXT or S_STRING -->
<dl>
- <dt><label for="lang_default_value">{L_DEFAULT_VALUE}:</label><br /><span>{L_DEFAULT_VALUE_EXPLAIN}</span></dt>
+ <dt><label for="lang_default_value">{L_DEFAULT_VALUE}{L_COLON}</label><br /><span>{L_DEFAULT_VALUE_EXPLAIN}</span></dt>
<dd><!-- IF S_STRING --><input class="text medium" type="text" id="lang_default_value" name="lang_default_value" value="{LANG_DEFAULT_VALUE}" /><!-- ELSE --><textarea id="lang_default_value" name="lang_default_value" rows="5" cols="80">{LANG_DEFAULT_VALUE}</textarea><!-- ENDIF --></dd>
</dl>
<!-- ENDIF -->
<!-- IF S_BOOL or S_DROPDOWN -->
<dl>
- <dt><label for="lang_options">{L_ENTRIES}:</label>
+ <dt><label for="lang_options">{L_ENTRIES}{L_COLON}</label>
<!-- IF S_EDIT_MODE and S_DROPDOWN -->
<br /><span>{L_EDIT_DROPDOWN_LANG_EXPLAIN}</span>
<!-- ELSE -->
@@ -126,7 +140,7 @@
<legend>{L_TITLE}</legend>
<!-- BEGIN option -->
<dl>
- <dt><label>{option.TITLE}:</label><!-- IF option.EXPLAIN --><br /><span>{option.EXPLAIN}</span><!-- ENDIF --></dt>
+ <dt><label>{option.TITLE}{L_COLON}</label><!-- IF option.EXPLAIN --><br /><span>{option.EXPLAIN}</span><!-- ENDIF --></dt>
<dd>{option.FIELD}</dd>
</dl>
<!-- END option -->
@@ -149,7 +163,7 @@
<legend>{options.LANGUAGE}</legend>
<!-- BEGIN field -->
<dl>
- <dt><label>{options.field.L_TITLE}:</label><!-- IF options.field.L_EXPLAIN --><br /><span>{options.field.L_EXPLAIN}</span><!-- ENDIF --></dt>
+ <dt><label>{options.field.L_TITLE}{L_COLON}</label><!-- IF options.field.L_EXPLAIN --><br /><span>{options.field.L_EXPLAIN}</span><!-- ENDIF --></dt>
{options.field.FIELD}
</dl>
<!-- END field -->
@@ -181,7 +195,7 @@
</div>
<!-- ENDIF -->
- <table cellspacing="1">
+ <table class="table1 zebra-table">
<thead>
<tr>
<th>{L_FIELD_IDENT}</th>
@@ -191,29 +205,22 @@
</thead>
<tbody>
<!-- BEGIN fields -->
- <!-- IF fields.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
-
+ <tr>
<td>{fields.FIELD_IDENT}</td>
<td>{fields.FIELD_TYPE}</td>
- <td style="text-align: center;"><a href="{fields.U_ACTIVATE_DEACTIVATE}">{fields.L_ACTIVATE_DEACTIVATE}</a><!-- IF fields.S_NEED_EDIT --> | <a href="{fields.U_TRANSLATE}" style="color: red;">{L_TRANSLATE}</a><!-- ENDIF --></td>
-
- <td style="width: 80px; text-align: right; white-space: nowrap;">
- <!-- IF fields.S_FIRST_ROW && not fields.S_LAST_ROW -->
- {ICON_MOVE_UP_DISABLED}
- <a href="{fields.U_MOVE_DOWN}">{ICON_MOVE_DOWN}</a>
- <!-- ELSEIF not fields.S_FIRST_ROW && not fields.S_LAST_ROW-->
- <a href="{fields.U_MOVE_UP}">{ICON_MOVE_UP}</a>
- <a href="{fields.U_MOVE_DOWN}">{ICON_MOVE_DOWN}</a>
- <!-- ELSEIF fields.S_LAST_ROW && not fields.S_FIRST_ROW -->
- <a href="{fields.U_MOVE_UP}">{ICON_MOVE_UP}</a>
- {ICON_MOVE_DOWN_DISABLED}
- <!-- ENDIF -->
+ <td style="text-align: center;"><a href="{fields.U_ACTIVATE_DEACTIVATE}" data-ajax="activate_deactivate">{fields.L_ACTIVATE_DEACTIVATE}</a><!-- IF fields.S_NEED_EDIT --> | <a href="{fields.U_TRANSLATE}" style="color: red;">{L_TRANSLATE}</a><!-- ENDIF --></td>
+
+ <td class="actions" style="width: 80px;">
+ <span class="up-disabled" style="display:none;">{ICON_MOVE_UP_DISABLED}</span>
+ <span class="up"><a href="{fields.U_MOVE_UP}" data-ajax="row_up">{ICON_MOVE_UP}</a></span>
+ <span class="down-disabled" style="display:none;">{ICON_MOVE_DOWN_DISABLED}</span>
+ <span class="down"><a href="{fields.U_MOVE_DOWN}" data-ajax="row_down">{ICON_MOVE_DOWN}</a></span>
<!-- IF not fields.S_NEED_EDIT -->
<a href="{fields.U_EDIT}">{ICON_EDIT}</a>
<!-- ELSE -->
{ICON_EDIT_DISABLED}
<!-- ENDIF -->
- <a href="{fields.U_DELETE}">{ICON_DELETE}</a>
+ <a href="{fields.U_DELETE}" data-ajax="row_delete">{ICON_DELETE}</a>
</td>
</tr>
diff --git a/phpBB/adm/style/acp_prune_forums.html b/phpBB/adm/style/acp_prune_forums.html
index 069d2c91c3..4d748f1cce 100644
--- a/phpBB/adm/style/acp_prune_forums.html
+++ b/phpBB/adm/style/acp_prune_forums.html
@@ -1,6 +1,6 @@
<!-- INCLUDE overall_header.html -->
-<a name="maincontent"></a>
+<a id="maincontent"></a>
<!-- IF S_PRUNED -->
@@ -8,7 +8,7 @@
<p>{L_PRUNE_SUCCESS}</p>
- <table cellspacing="1">
+ <table class="table1 zebra-table">
<thead>
<tr>
<th>{L_FORUM}</th>
@@ -18,7 +18,7 @@
</thead>
<tbody>
<!-- BEGIN pruned -->
- <!-- IF pruned.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
+ <tr>
<td style="text-align: center;">{pruned.FORUM_NAME}</td>
<td style="text-align: center;">{pruned.NUM_TOPICS}</td>
<td style="text-align: center;">{pruned.NUM_POSTS}</td>
@@ -43,7 +43,7 @@
<legend>{L_SELECT_FORUM}</legend>
<p>{L_LOOK_UP_FORUMS_EXPLAIN}</p>
<dl>
- <dt><label for="forum">{L_LOOK_UP_FORUM}:</label></dt>
+ <dt><label for="forum">{L_LOOK_UP_FORUM}{L_COLON}</label></dt>
<dd><select id="forum" name="f[]" multiple="multiple" size="10">{S_FORUM_OPTIONS}</select></dd>
<dd><label><input type="checkbox" class="radio" name="all_forums" value="1" /> {L_ALL_FORUMS}</label></dd>
</dl>
@@ -65,32 +65,32 @@
<h2>{L_FORUM}</h2>
- <p>{L_SELECTED_FORUMS}: {FORUM_LIST}</p>
+ <p>{L_SELECTED_FORUMS}{L_COLON} {FORUM_LIST}</p>
<form id="acp_prune" method="post" action="{U_ACTION}">
<fieldset>
<legend>{L_FORUM_PRUNE}</legend>
<dl>
- <dt><label for="prune_days">{L_PRUNE_NOT_POSTED}:</label></dt>
- <dd><input type="text" id="prune_days" name="prune_days" /></dd>
+ <dt><label for="prune_days">{L_PRUNE_NOT_POSTED}{L_COLON}</label></dt>
+ <dd><input type="number" id="prune_days" name="prune_days" /></dd>
</dl>
<dl>
- <dt><label for="prune_vieweddays">{L_PRUNE_NOT_VIEWED}:</label></dt>
- <dd><input type="text" id="prune_vieweddays" name="prune_vieweddays" /></dd>
+ <dt><label for="prune_vieweddays">{L_PRUNE_NOT_VIEWED}{L_COLON}</label></dt>
+ <dd><input type="number" id="prune_vieweddays" name="prune_vieweddays" /></dd>
</dl>
<dl>
- <dt><label for="polls">{L_PRUNE_OLD_POLLS}:</label><br /><span>{L_PRUNE_OLD_POLLS_EXPLAIN}</span></dt>
+ <dt><label for="polls">{L_PRUNE_OLD_POLLS}{L_COLON}</label><br /><span>{L_PRUNE_OLD_POLLS_EXPLAIN}</span></dt>
<dd><label><input type="radio" class="radio" name="prune_old_polls" value="1" /> {L_YES}</label>
<label><input type="radio" class="radio" id="polls" name="prune_old_polls" value="0" checked="checked" /> {L_NO}</label></dd>
</dl>
<dl>
- <dt><label for="announce">{L_PRUNE_ANNOUNCEMENTS}:</label></dt>
+ <dt><label for="announce">{L_PRUNE_ANNOUNCEMENTS}{L_COLON}</label></dt>
<dd><label><input type="radio" class="radio" name="prune_announce" value="1" /> {L_YES}</label>
<label><input type="radio" class="radio" id="announce" name="prune_announce" value="0" checked="checked" /> {L_NO}</label></dd>
</dl>
<dl>
- <dt><label for="sticky">{L_PRUNE_STICKY}:</label></dt>
+ <dt><label for="sticky">{L_PRUNE_STICKY}{L_COLON}</label></dt>
<dd><label><input type="radio" class="radio" name="prune_sticky" value="1" /> {L_YES}</label>
<label><input type="radio" class="radio" id="sticky" name="prune_sticky" value="0" checked="checked" /> {L_NO}</label></dd>
</dl>
diff --git a/phpBB/adm/style/acp_prune_users.html b/phpBB/adm/style/acp_prune_users.html
index 0f2b23dcef..b8c271355b 100644
--- a/phpBB/adm/style/acp_prune_users.html
+++ b/phpBB/adm/style/acp_prune_users.html
@@ -1,6 +1,6 @@
<!-- INCLUDE overall_header.html -->
-<a name="maincontent"></a>
+<a id="maincontent"></a>
<h1>{L_ACP_PRUNE_USERS}</h1>
@@ -9,39 +9,60 @@
<form id="acp_prune" method="post" action="{U_ACTION}">
<fieldset>
- <legend>{L_ACP_PRUNE_USERS}</legend>
+ <legend>{L_CRITERIA}</legend>
<dl>
- <dt><label for="username">{L_USERNAME}:</label></dt>
+ <dt><label for="username">{L_USERNAME}{L_COLON}</label></dt>
<dd><input type="text" id="username" name="username" /></dd>
</dl>
<dl>
- <dt><label for="email">{L_EMAIL}:</label></dt>
+ <dt><label for="email">{L_EMAIL}{L_COLON}</label></dt>
<dd><input type="text" id="email" name="email" /></dd>
</dl>
<dl>
- <dt><label for="joined">{L_JOINED}:</label><br /><span>{L_JOINED_EXPLAIN}</span></dt>
- <dd><select name="joined_select">{S_JOINED_OPTIONS}</select> <input type="text" id="joined" name="joined" /></dd>
+ <dt><label for="joined_after">{L_JOINED}{L_COLON}</label><br /><span>{L_JOINED_EXPLAIN}</span></dt>
+ <dd>
+ <strong>{L_AFTER}</strong> <input type="text" id="joined_after" name="joined_after" />
+ <br /> <br /> <strong>{L_BEFORE}</strong> <input type="text" id="joined_before" name="joined_before" />
+ </dd>
</dl>
<dl>
- <dt><label for="active">{L_LAST_ACTIVE}:</label><br /><span>{L_LAST_ACTIVE_EXPLAIN}</span></dt>
+ <dt><label for="active">{L_LAST_ACTIVE}{L_COLON}</label><br /><span>{L_LAST_ACTIVE_EXPLAIN}</span></dt>
<dd><select name="active_select">{S_ACTIVE_OPTIONS}</select> <input type="text" id="active" name="active" /></dd>
</dl>
<dl>
- <dt><label for="count">{L_POSTS}:</label></dt>
- <dd><select name="count_select">{S_COUNT_OPTIONS}</select> <input type="text" id="count" name="count" /></dd>
+ <dt><label for="count">{L_POSTS}{L_COLON}</label></dt>
+ <dd><select name="count_select">{S_COUNT_OPTIONS}</select> <input type="number" id="count" name="count" /></dd>
</dl>
<dl>
- <dt><label for="users">{L_ACP_PRUNE_USERS}:</label><br /><span>{L_SELECT_USERS_EXPLAIN}</span></dt>
+ <dt><label for="posts_on_queue">{L_POSTS_ON_QUEUE}{L_COLON}</label></dt>
+ <dd><select name="queue_select">{S_COUNT_OPTIONS}</select> <input type="number" id="posts_on_queue" name="posts_on_queue" /></dd>
+</dl>
+<!-- IF S_GROUP_LIST -->
+<dl>
+ <dt><label for="group_id">{L_GROUP}{L_COLON}</label><br /><span>{L_PRUNE_USERS_GROUP_EXPLAIN}</span></dt>
+ <dd><select id="group_id" name="group_id">{S_GROUP_LIST}</select></dd>
+</dl>
+<!-- ENDIF -->
+</fieldset>
+
+<fieldset>
+ <legend>{L_USERNAMES}</legend>
+<dl>
+ <dt><label for="users">{L_ACP_PRUNE_USERS}{L_COLON}</label><br /><span>{L_SELECT_USERS_EXPLAIN}</span></dt>
<dd><textarea id="users" name="users" cols="40" rows="5"></textarea></dd>
<dd>[ <a href="{U_FIND_USERNAME}" onclick="find_username(this.href); return false;">{L_FIND_USERNAME}</a> ]</dd>
</dl>
+</fieldset>
+
+<fieldset>
+ <legend>{L_OPTIONS}</legend>
<dl>
- <dt><label for="deleteposts">{L_DELETE_USER_POSTS}:</label><br /><span>{L_DELETE_USER_POSTS_EXPLAIN}</span></dt>
+ <dt><label for="deleteposts">{L_DELETE_USER_POSTS}{L_COLON}</label><br /><span>{L_DELETE_USER_POSTS_EXPLAIN}</span></dt>
<dd><label><input type="radio" class="radio" name="deleteposts" value="1" /> {L_YES}</label>
<label><input type="radio" class="radio" id="deleteposts" name="deleteposts" value="0" checked="checked" /> {L_NO}</label></dd>
</dl>
<dl>
- <dt><label for="deactivate">{L_DEACTIVATE_DELETE}:</label><br /><span>{L_DEACTIVATE_DELETE_EXPLAIN}</span></dt>
+ <dt><label for="deactivate">{L_DEACTIVATE_DELETE}{L_COLON}</label><br /><span>{L_DEACTIVATE_DELETE_EXPLAIN}</span></dt>
<dd><label><input type="radio" class="radio" name="action" value="delete" /> {L_DELETE_USERS}</label>
<label><input type="radio" class="radio" id="deactivate" name="action" value="deactivate" checked="checked" /> {L_DEACTIVATE}</label></dd>
</dl>
diff --git a/phpBB/adm/style/acp_ranks.html b/phpBB/adm/style/acp_ranks.html
index 1f45109517..be68dda695 100644
--- a/phpBB/adm/style/acp_ranks.html
+++ b/phpBB/adm/style/acp_ranks.html
@@ -1,6 +1,6 @@
<!-- INCLUDE overall_header.html -->
-<a name="maincontent"></a>
+<a id="maincontent"></a>
<!-- IF S_EDIT -->
@@ -25,23 +25,23 @@
<fieldset>
<legend>{L_ACP_RANKS}</legend>
<dl>
- <dt><label for="title">{L_RANK_TITLE}:</label></dt>
+ <dt><label for="title">{L_RANK_TITLE}{L_COLON}</label></dt>
<dd><input name="title" type="text" id="title" value="{RANK_TITLE}" maxlength="255" /></dd>
</dl>
<dl>
- <dt><label for="rank_image">{L_RANK_IMAGE}:</label></dt>
+ <dt><label for="rank_image">{L_RANK_IMAGE}{L_COLON}</label></dt>
<dd><select name="rank_image" id="rank_image" onchange="update_image(this.options[selectedIndex].value);">{S_FILENAME_LIST}</select></dd>
<dd><img src="{RANK_IMAGE}" id="image" alt="" /></dd>
</dl>
<dl>
- <dt><label for="special_rank">{L_RANK_SPECIAL}:</label></dt>
+ <dt><label for="special_rank">{L_RANK_SPECIAL}{L_COLON}</label></dt>
<dd><label><input onclick="dE('posts', -1)" type="radio" class="radio" name="special_rank" value="1" id="special_rank"<!-- IF S_SPECIAL_RANK --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label><input onclick="dE('posts', 1)" type="radio" class="radio" name="special_rank" value="0"<!-- IF not S_SPECIAL_RANK --> checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
</dl>
<!-- IF S_SPECIAL_RANK --><div id="posts" style="display: none;"><!-- ELSE --><div id="posts"><!-- ENDIF -->
<dl>
- <dt><label for="min_posts">{L_RANK_MINIMUM}:</label></dt>
- <dd><input name="min_posts" type="text" id="min_posts" maxlength="10" value="{MIN_POSTS}" /></dd>
+ <dt><label for="min_posts">{L_RANK_MINIMUM}{L_COLON}</label></dt>
+ <dd><input name="min_posts" type="number" id="min_posts" maxlength="10" value="{MIN_POSTS}" /></dd>
</dl>
</div>
@@ -65,7 +65,7 @@
<fieldset class="tabulated">
<legend>{L_ACP_MANAGE_RANKS}</legend>
- <table cellspacing="1">
+ <table class="table1 zebra-table">
<thead>
<tr>
<th>{L_RANK_IMAGE}</th>
@@ -76,11 +76,11 @@
</thead>
<tbody>
<!-- BEGIN ranks -->
- <!-- IF ranks.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
+ <tr>
<td style="text-align: center;"><!-- IF ranks.S_RANK_IMAGE --><img src="{ranks.RANK_IMAGE}" alt="{ranks.RANK_TITLE}" title="{ranks.RANK_TITLE}" /><!-- ELSE -->&nbsp; - &nbsp;<!-- ENDIF --></td>
<td style="text-align: center;">{ranks.RANK_TITLE}</td>
<td style="text-align: center;"><!-- IF ranks.S_SPECIAL_RANK -->&nbsp; - &nbsp;<!-- ELSE -->{ranks.MIN_POSTS}<!-- ENDIF --></td>
- <td style="text-align: center;"><a href="{ranks.U_EDIT}">{ICON_EDIT}</a> <a href="{ranks.U_DELETE}">{ICON_DELETE}</a></td>
+ <td style="text-align: center;"><a href="{ranks.U_EDIT}">{ICON_EDIT}</a> <a href="{ranks.U_DELETE}" data-ajax="row_delete">{ICON_DELETE}</a></td>
</tr>
<!-- END ranks -->
</tbody>
diff --git a/phpBB/adm/style/acp_reasons.html b/phpBB/adm/style/acp_reasons.html
index 23fcfbdeb8..d629a9553f 100644
--- a/phpBB/adm/style/acp_reasons.html
+++ b/phpBB/adm/style/acp_reasons.html
@@ -1,6 +1,6 @@
<!-- INCLUDE overall_header.html -->
-<a name="maincontent"></a>
+<a id="maincontent"></a>
<!-- IF S_EDIT_REASON -->
@@ -29,7 +29,7 @@
<legend>{L_TITLE}</legend>
<p><!-- IF S_TRANSLATED -->{L_IS_TRANSLATED_EXPLAIN}<!-- ELSE -->{L_IS_NOT_TRANSLATED_EXPLAIN}<!-- ENDIF --></p>
<dl>
- <dt><label for="reason_title">{L_REASON_TITLE}:</label></dt>
+ <dt><label for="reason_title">{L_REASON_TITLE}{L_COLON}</label></dt>
<dd><input name="reason_title" type="text" id="reason_title" value="{REASON_TITLE}" maxlength="255" /></dd>
</dl>
<!-- IF S_TRANSLATED -->
@@ -39,7 +39,7 @@
</dl>
<!-- ENDIF -->
<dl>
- <dt><label for="reason_description">{L_REASON_DESCRIPTION}:</label></dt>
+ <dt><label for="reason_description">{L_REASON_DESCRIPTION}{L_COLON}</label></dt>
<dd><textarea name="reason_description" id="reason_description" rows="8" cols="80">{REASON_DESCRIPTION}</textarea></dd>
</dl>
<!-- IF S_TRANSLATED -->
@@ -68,7 +68,7 @@
<legend>{L_ACP_REASONS}</legend>
<!-- IF .reasons -->
- <table cellspacing="1">
+ <table class="table1">
<col class="row1" /><col class="row1" /><col class="row2" />
<thead>
<tr>
@@ -86,20 +86,14 @@
<br /><span>{reasons.REASON_DESCRIPTION}</span>
</td>
<td style="width: 100px;">{reasons.REASON_COUNT}</td>
- <td style="width: 80px; text-align: right; white-space: nowrap;">
- <!-- IF reasons.S_FIRST_ROW && not reasons.S_LAST_ROW -->
- {ICON_MOVE_UP_DISABLED}
- <a href="{reasons.U_MOVE_DOWN}">{ICON_MOVE_DOWN}</a>
- <!-- ELSEIF not reasons.S_FIRST_ROW && not reasons.S_LAST_ROW-->
- <a href="{reasons.U_MOVE_UP}">{ICON_MOVE_UP}</a>
- <a href="{reasons.U_MOVE_DOWN}">{ICON_MOVE_DOWN}</a>
- <!-- ELSEIF reasons.S_LAST_ROW && not reasons.S_FIRST_ROW -->
- <a href="{reasons.U_MOVE_UP}">{ICON_MOVE_UP}</a>
- {ICON_MOVE_DOWN_DISABLED}
- <!-- ENDIF -->
+ <td class="actions" style="width: 80px;">
+ <span class="up-disabled" style="display:none;">{ICON_MOVE_UP_DISABLED}</span>
+ <span class="up"><a href="{reasons.U_MOVE_UP}" data-ajax="row_up">{ICON_MOVE_UP}</a></span>
+ <span class="down-disabled" style="display:none;">{ICON_MOVE_DOWN_DISABLED}</span>
+ <span class="down"><a href="{reasons.U_MOVE_DOWN}" data-ajax="row_down">{ICON_MOVE_DOWN}</a></span>
<a href="{reasons.U_EDIT}">{ICON_EDIT}</a>
<!-- IF reasons.U_DELETE -->
- <a href="{reasons.U_DELETE}">{ICON_DELETE}</a>
+ <a href="{reasons.U_DELETE}" data-ajax="row_delete">{ICON_DELETE}</a>
<!-- ELSE -->
{ICON_DELETE_DISABLED}
<!-- ENDIF -->
diff --git a/phpBB/adm/style/acp_search.html b/phpBB/adm/style/acp_search.html
index 5fd7a23d97..496a8b2675 100644
--- a/phpBB/adm/style/acp_search.html
+++ b/phpBB/adm/style/acp_search.html
@@ -1,6 +1,6 @@
<!-- INCLUDE overall_header.html -->
-<a name="maincontent"></a>
+<a id="maincontent"></a>
<!-- IF S_SETTINGS -->
<h1>{L_ACP_SEARCH_SETTINGS}</h1>
@@ -12,40 +12,40 @@
<fieldset>
<legend>{L_GENERAL_SEARCH_SETTINGS}</legend>
<dl>
- <dt><label for="load_search">{L_YES_SEARCH}:</label><br /><span>{L_YES_SEARCH_EXPLAIN}</span></dt>
+ <dt><label for="load_search">{L_YES_SEARCH}{L_COLON}</label><br /><span>{L_YES_SEARCH_EXPLAIN}</span></dt>
<dd><label><input type="radio" class="radio" id="load_search" name="config[load_search]" value="1"<!-- IF S_YES_SEARCH --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label><input type="radio" class="radio" name="config[load_search]" value="0"<!-- IF not S_YES_SEARCH --> checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
</dl>
<dl>
- <dt><label for="search_interval">{L_SEARCH_INTERVAL}:</label><br /><span>{L_SEARCH_INTERVAL_EXPLAIN}</span></dt>
- <dd><input id="search_interval" type="text" size="4" maxlength="4" name="config[search_interval]" value="{SEARCH_INTERVAL}" /> {L_SECONDS}</dd>
+ <dt><label for="search_interval">{L_SEARCH_INTERVAL}{L_COLON}</label><br /><span>{L_SEARCH_INTERVAL_EXPLAIN}</span></dt>
+ <dd><input id="search_interval" type="number" size="4" maxlength="4" min="0" max="9999" name="config[search_interval]" value="{SEARCH_INTERVAL}" /> {L_SECONDS}</dd>
</dl>
<dl>
- <dt><label for="search_anonymous_interval">{L_SEARCH_GUEST_INTERVAL}:</label><br /><span>{L_SEARCH_GUEST_INTERVAL_EXPLAIN}</span></dt>
- <dd><input id="search_anonymous_interval" type="text" size="4" maxlength="4" name="config[search_anonymous_interval]" value="{SEARCH_GUEST_INTERVAL}" /> {L_SECONDS}</dd>
+ <dt><label for="search_anonymous_interval">{L_SEARCH_GUEST_INTERVAL}{L_COLON}</label><br /><span>{L_SEARCH_GUEST_INTERVAL_EXPLAIN}</span></dt>
+ <dd><input id="search_anonymous_interval" type="number" size="4" maxlength="4" min="0" max="9999" name="config[search_anonymous_interval]" value="{SEARCH_GUEST_INTERVAL}" /> {L_SECONDS}</dd>
</dl>
<dl>
- <dt><label for="limit_search_load">{L_LIMIT_SEARCH_LOAD}:</label><br /><span>{L_LIMIT_SEARCH_LOAD_EXPLAIN}</span></dt>
+ <dt><label for="limit_search_load">{L_LIMIT_SEARCH_LOAD}{L_COLON}</label><br /><span>{L_LIMIT_SEARCH_LOAD_EXPLAIN}</span></dt>
<dd><input id="limit_search_load" type="text" size="4" maxlength="4" name="config[limit_search_load]" value="{LIMIT_SEARCH_LOAD}" /></dd>
</dl>
<dl>
- <dt><label for="min_search_author_chars">{L_MIN_SEARCH_AUTHOR_CHARS}:</label><br /><span>{L_MIN_SEARCH_AUTHOR_CHARS_EXPLAIN}</span></dt>
- <dd><input id="min_search_author_chars" type="text" size="4" maxlength="4" name="config[min_search_author_chars]" value="{MIN_SEARCH_AUTHOR_CHARS}" /></dd>
+ <dt><label for="min_search_author_chars">{L_MIN_SEARCH_AUTHOR_CHARS}{L_COLON}</label><br /><span>{L_MIN_SEARCH_AUTHOR_CHARS_EXPLAIN}</span></dt>
+ <dd><input id="min_search_author_chars" type="number" size="4" maxlength="4" min="0" max="9999" name="config[min_search_author_chars]" value="{MIN_SEARCH_AUTHOR_CHARS}" /></dd>
</dl>
<dl>
- <dt><label for="max_num_search_keywords">{L_MAX_NUM_SEARCH_KEYWORDS}:</label><br /><span>{L_MAX_NUM_SEARCH_KEYWORDS_EXPLAIN}</span></dt>
- <dd><input id="max_num_search_keywords" type="text" size="4" maxlength="4" name="config[max_num_search_keywords]" value="{MAX_NUM_SEARCH_KEYWORDS}" /></dd>
+ <dt><label for="max_num_search_keywords">{L_MAX_NUM_SEARCH_KEYWORDS}{L_COLON}</label><br /><span>{L_MAX_NUM_SEARCH_KEYWORDS_EXPLAIN}</span></dt>
+ <dd><input id="max_num_search_keywords" type="number" size="4" maxlength="4" min="0" max="9999" name="config[max_num_search_keywords]" value="{MAX_NUM_SEARCH_KEYWORDS}" /></dd>
</dl>
<dl>
- <dt><label for="search_store_results">{L_SEARCH_STORE_RESULTS}:</label><br /><span>{L_SEARCH_STORE_RESULTS_EXPLAIN}</span></dt>
- <dd><input id="search_store_results" type="text" size="4" maxlength="6" name="config[search_store_results]" value="{SEARCH_STORE_RESULTS}" /> {L_SECONDS}</dd>
+ <dt><label for="search_store_results">{L_SEARCH_STORE_RESULTS}{L_COLON}</label><br /><span>{L_SEARCH_STORE_RESULTS_EXPLAIN}</span></dt>
+ <dd><input id="search_store_results" type="number" size="4" maxlength="6" min="0" max="999999" name="config[search_store_results]" value="{SEARCH_STORE_RESULTS}" /> {L_SECONDS}</dd>
</dl>
</fieldset>
<fieldset>
<legend>{L_SEARCH_TYPE}</legend>
<dl>
- <dt><label for="search_type">{L_SEARCH_TYPE}:</label><br /><span>{L_SEARCH_TYPE_EXPLAIN}</span></dt>
+ <dt><label for="search_type">{L_SEARCH_TYPE}{L_COLON}</label><br /><span>{L_SEARCH_TYPE_EXPLAIN}</span></dt>
<dd><select id="search_type" name="config[search_type]">{S_SEARCH_TYPES}</select></dd>
</dl>
</fieldset>
@@ -110,9 +110,9 @@
{backend.S_HIDDEN_FIELDS}
- <legend>{L_INDEX_STATS}: {backend.L_NAME} <!-- IF backend.S_ACTIVE -->({L_ACTIVE}) <!-- ENDIF --></legend>
+ <legend>{L_INDEX_STATS}{L_COLON} {backend.L_NAME} <!-- IF backend.S_ACTIVE -->({L_ACTIVE}) <!-- ENDIF --></legend>
- <table cellspacing="1">
+ <table class="table1">
<caption>{backend.L_NAME} <!-- IF backend.S_ACTIVE -->({L_ACTIVE}) <!-- ENDIF --></caption>
<col class="col1" /><col class="col2" /><col class="col1" /><col class="col2" />
<thead>
@@ -126,9 +126,9 @@
<tbody>
<!-- BEGIN data -->
<tr>
- <td>{backend.data.STATISTIC_1}:</td>
+ <td>{backend.data.STATISTIC_1}{L_COLON}</td>
<td>{backend.data.VALUE_1}</td>
- <td>{backend.data.STATISTIC_2}<!-- IF backend.data.STATISTIC_2 -->:<!-- ENDIF --></td>
+ <td>{backend.data.STATISTIC_2}<!-- IF backend.data.STATISTIC_2 -->{L_COLON}<!-- ENDIF --></td>
<td>{backend.data.VALUE_2}</td>
</tr>
<!-- END data -->
@@ -139,9 +139,11 @@
<p class="quick">
<!-- IF backend.S_INDEXED -->
- <input class="button2" type="submit" name="action[delete]" value="{L_DELETE_INDEX}" onclick="popup_progress_bar('delete');" />
+ <input type="hidden" name="action" value="delete" />
+ <input class="button2" type="submit" value="{L_DELETE_INDEX}" onclick="popup_progress_bar('delete');" />
<!-- ELSE -->
- <input class="button2" type="submit" name="action[create]" value="{L_CREATE_INDEX}" onclick="popup_progress_bar('create');" />
+ <input type="hidden" name="action" value="create" />
+ <input class="button2" type="submit" value="{L_CREATE_INDEX}" onclick="popup_progress_bar('create');" />
<!-- ENDIF -->
</p>
{S_FORM_TOKEN}
diff --git a/phpBB/adm/style/acp_send_statistics.html b/phpBB/adm/style/acp_send_statistics.html
index 2a9b61f314..2d6c4837fd 100644
--- a/phpBB/adm/style/acp_send_statistics.html
+++ b/phpBB/adm/style/acp_send_statistics.html
@@ -1,6 +1,6 @@
<!-- INCLUDE overall_header.html -->
-<a name="maincontent"></a>
+<a id="maincontent"></a>
<h1>{L_SEND_STATISTICS}</h1>
@@ -68,4 +68,4 @@ function iframe_updated()
//]]>
</script>
-<!-- INCLUDE overall_footer.html --> \ No newline at end of file
+<!-- INCLUDE overall_footer.html -->
diff --git a/phpBB/adm/style/acp_styles.html b/phpBB/adm/style/acp_styles.html
index 6aa1c0ccc9..e0149c2a0f 100644
--- a/phpBB/adm/style/acp_styles.html
+++ b/phpBB/adm/style/acp_styles.html
@@ -1,541 +1,164 @@
<!-- INCLUDE overall_header.html -->
-<a name="maincontent"></a>
+<a id="maincontent"></a>
-<!-- IF S_DELETE -->
-
- <a href="{U_BACK}" style="float: {S_CONTENT_FLOW_END};">&laquo; {L_BACK}</a>
-
- <h1>{L_TITLE}</h1>
-
- <p>{L_EXPLAIN}</p>
+<!-- IF S_STYLE_DETAILS -->
+ <a href="{U_ACTION}" style="float: {S_CONTENT_FLOW_END};">&laquo; {L_BACK}</a>
+<!-- ENDIF -->
- <form id="acp_styles" method="post" action="{U_ACTION}">
+<!-- IF S_CONFIRM_ACTION -->
+<form id="confirm" method="post" action="{S_CONFIRM_ACTION}">
- <fieldset>
- <legend>{L_TITLE}</legend>
- <dl>
- <dt><label>{L_NAME}:</label></dt>
- <dd><strong>{NAME}</strong></dd>
- </dl>
- <dl>
- <dt><label for="new_id">{L_REPLACE}:</label><br /><span>{L_REPLACE_EXPLAIN}</span></dt>
- <dd><select id="new_id" name="new_id">{S_REPLACE_OPTIONS}</select></dd>
- </dl>
- <!-- IF S_DELETE_STYLE -->
- <hr />
- <dl>
- <dt><label for="new_template_id">{L_DELETE_TEMPLATE}:</label><br /><span>{L_REPLACE_TEMPLATE_EXPLAIN}</span></dt>
- <dd><select id="new_template_id" name="new_template_id">{S_REPLACE_TEMPLATE_OPTIONS}</select></dd>
- </dl>
- <dl>
- <dt><label for="new_theme_id">{L_DELETE_THEME}:</label><br /><span>{L_REPLACE_THEME_EXPLAIN}</span></dt>
- <dd><select id="new_theme_id" name="new_theme_id">{S_REPLACE_THEME_OPTIONS}</select></dd>
- </dl>
- <dl>
- <dt><label for="new_imageset_id">{L_DELETE_IMAGESET}:</label><br /><span>{L_REPLACE_IMAGESET_EXPLAIN}</span></dt>
- <dd><select id="new_imageset_id" name="new_imageset_id">{S_REPLACE_IMAGESET_OPTIONS}</select></dd>
- </dl>
+<fieldset>
+ <h1>{MESSAGE_TITLE}</h1>
+ <p>{MESSAGE_TEXT}</p>
+ <!-- IF S_CONFIRM_DELETE -->
+ <label><input type="checkbox" class="checkbox" name="confirm_delete_files" /> {L_DELETE_FROM_FS}</label>
<!-- ENDIF -->
- <p class="quick">
- <input class="button1" type="submit" name="update" value="{L_DELETE}" />
- {S_FORM_TOKEN}
- </p>
- </fieldset>
- </form>
-
-<!-- ELSEIF S_EDIT_IMAGESET -->
-
- <a href="{U_BACK}" style="float: {S_CONTENT_FLOW_END};">&laquo; {L_BACK}</a>
-
- <h1>{L_TITLE}</h1>
-
- <p>{L_EXPLAIN}</p>
+ {S_HIDDEN_FIELDS}
- <!-- IF SUCCESS -->
- <div class="successbox">
- <p>{L_IMAGESET_UPDATED}</p>
- </div>
- <!-- ENDIF -->
-
- <!-- IF ERROR -->
- <div class="errorbox">
- <p>{L_NO_IMAGE}</p>
- </div>
- <!-- ENDIF -->
+ <div style="text-align: center;">
+ <input type="submit" name="confirm" value="{L_YES}" class="button2" />&nbsp;
+ <input type="submit" name="cancel" value="{L_NO}" class="button2" />
+ </div>
- <script type="text/javascript" defer="defer">
- // <![CDATA[
- function update_image(newimage)
- {
- document.getElementById('newimg').src = (newimage) ? '../styles/{A_PATH}/imageset/' + encodeURI(newimage) : 'images/no_image.png';
- }
- // ]]>
- </script>
- <script type="text/javascript">
- // <![CDATA[
- /**
- * Handle displaying/hiding the dimension fields
- */
- function display_options(value)
- {
- if (value == 0)
- {
- dE('img_dimensions', -1);
- }
- else
- {
- dE('img_dimensions', 1);
- }
- }
+</fieldset>
+
+</form>
+<!-- ELSE -->
- /**
- * Init the wanted display functionality if javascript is enabled.
- * If javascript is not available, the user is still able to properly administer.
- */
- onload = function()
- {
- <!-- IF not IMAGE_SIZE -->
- dE('img_dimensions', -1);
- <!-- ENDIF -->
- }
- // ]]>
- </script>
+<!-- IF L_TITLE --><h1>{L_TITLE}</h1><!-- ENDIF -->
- <form method="post" action="{U_ACTION}">
+<!-- IF L_EXPLAIN --><p>{L_EXPLAIN}</p><!-- ENDIF -->
- <fieldset class="quick" style="text-align: left;">
- <legend>{L_SELECT_IMAGE}</legend>
- {L_SELECT_IMAGE}: <select name="imgname" onchange="this.form.submit();">
- <!-- BEGIN category -->
- <option class="sep" value="" disabled="disabled">{category.NAME}</option>
- <!-- BEGIN images --><option value="{category.images.VALUE}"<!-- IF category.images.SELECTED--> selected="selected"<!-- ENDIF -->>&nbsp;&nbsp;&nbsp;&nbsp;{category.images.TEXT}</option>
- <!-- END images -->
- <!-- END category -->
- </select>&nbsp; <input class="button1" type="submit" value="{L_SELECT}" tabindex="100" />
- </fieldset>
+<form id="acp_styles" method="post" action="{U_ACTION}">
+{S_HIDDEN_FIELDS}
+{S_FORM_TOKEN}
+<!-- IF S_STYLE_DETAILS -->
+ <input type="hidden" name="id" value="{STYLE_ID}" />
<fieldset>
- <legend>{L_EDIT_IMAGESET}</legend>
<dl>
- <dt><label>{L_CURRENT_IMAGE}:</label></dt>
- <dd><img src="<!-- IF IMAGE_REQUEST -->{IMAGE_REQUEST}<!-- ELSE -->images/no_image.png<!-- ENDIF -->" alt="" /></dd>
+ <dt><label for="name">{L_STYLE_NAME}{L_COLON}</label></dt>
+ <dd><input type="text" id="name" name="style_name" value="{STYLE_NAME}" /></dd>
</dl>
<dl>
- <dt><label>{L_SELECTED_IMAGE}:</label></dt>
- <dd><img src="{IMG_SRC}" id="newimg" alt="" /></dd>
+ <dt><label>{L_STYLE_PATH}</label></dt>
+ <dd><strong>{STYLE_PATH}</strong></dd>
</dl>
- </fieldset>
-
- <fieldset>
- <legend>{L_IMAGE}</legend>
<dl>
- <dt><label for="imgpath">{L_IMAGE}:</label></dt>
- <dd><select id="imgpath" name="imgpath" onchange="update_image(this.options[selectedIndex].value);"><option value=""<!-- IF not IMAGE_SELECT--> selected="selected"<!-- ENDIF -->>{L_NO_IMAGE}</option>
- <!-- BEGIN imagesetlist -->
- <option class="sep" value=""><!-- IF imagesetlist.TYPE -->{L_LOCALISED_IMAGES}<!-- ELSE -->{L_GLOBAL_IMAGES}<!-- ENDIF --></option>
- <!-- BEGIN images -->
- <option value="{imagesetlist.images.VALUE}"<!-- IF imagesetlist.images.SELECTED--> selected="selected"<!-- ENDIF -->>{imagesetlist.images.TEXT}</option>
- <!-- END images -->
- <!-- END imagesetlist -->
- </select>
- </dd>
+ <dt><label for="name">{L_COPYRIGHT}{L_COLON}</label></dt>
+ <dd><strong>{STYLE_COPYRIGHT}</strong></dd>
</dl>
<dl>
- <dt><label for="imgsize">{L_INCLUDE_DIMENSIONS}:</label><br /><span>{L_DIMENSIONS_EXPLAIN}</span></dt>
- <dd><label><input type="radio" class="radio" name="imgsize" id="imgsize" onclick="display_options(1);" value="1"<!-- IF IMAGE_SIZE --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
- <label><input type="radio" class="radio" name="imgsize" onclick="display_options(0);" value="0"<!-- IF not IMAGE_SIZE --> checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
+ <dt><label for="style_parent">{L_INHERITING_FROM}{L_COLON}</label></dt>
+ <dd><select id="style_parent" name="style_parent">
+ <option value=""<!-- IF STYLE_PARENT == 0 --> selected="selected"<!-- ENDIF -->> - </option>
+ <!-- BEGIN parent_styles -->
+ <option value="{parent_styles.STYLE_ID}"<!-- IF parent_styles.STYLE_ID == STYLE_PARENT --> selected="selected"<!-- ENDIF -->>{parent_styles.SPACER}{parent_styles.STYLE_NAME}</option>
+ <!-- END parent_styles -->
+ </select></dd>
</dl>
- <div id="img_dimensions">
- <dl>
- <dt><label for="imgwidth">{L_IMAGE_WIDTH}:</label><br /><span>{L_AUTOMATIC_EXPLAIN}</span></dt>
- <dd><input id="imgwidth" type="text" name="imgwidth" value="{IMAGE_SIZE}" /></dd>
- </dl>
- <dl>
- <dt><label for="imgheight">{L_IMAGE_HEIGHT}:</label><br /><span>{L_AUTOMATIC_EXPLAIN}</span></dt>
- <dd><input id="imgheight" type="text" name="imgheight" value="{IMAGE_HEIGHT}" /></dd>
- </dl>
- </div>
- </fieldset>
-
- <fieldset class="submit-buttons">
- <legend>{L_SUBMIT}</legend>
- <input class="button1" type="submit" name="update" value="{L_SUBMIT}" />&nbsp;&nbsp;<input class="button2" type="reset" value="{L_RESET}" />
- {S_FORM_TOKEN}
- </fieldset>
- </form>
-
-<!-- ELSEIF S_EDIT_TEMPLATE or S_EDIT_THEME -->
-
- <a href="{U_BACK}" style="float: {S_CONTENT_FLOW_END};">&laquo; {L_BACK}</a>
-
- <h1>{L_EDIT}</h1>
-
- <p>{L_EDIT_EXPLAIN}</p>
-
- <p>{L_SELECTED}: <strong>{SELECTED_TEMPLATE}</strong></p>
-
- <form id="acp_styles" method="post" action="{U_ACTION}">
-
- <!-- IF S_EDIT_TEMPLATE or (S_EDIT_THEME and not S_THEME_IN_DB) -->
- <fieldset>
- <legend>{L_SELECT}</legend>
<dl>
- <dt><label for="template_file">{L_FILE}:</label></dt>
- <dd><select id="template_file" name="template_file" onchange="if (this.options[this.selectedIndex].value != '') this.form.submit();">{S_TEMPLATES}</select> <input class="button2" type="submit" value="{L_SELECT}" /></dd>
+ <dt><label for="style_active">{L_STYLE_ACTIVE}{L_COLON}</label></dt>
+ <dd><label><input type="radio" class="radio" name="style_active" value="1"<!-- IF S_STYLE_ACTIVE --> id="style_active" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
+ <label><input type="radio" class="radio" name="style_active" value="0"<!-- IF not S_STYLE_ACTIVE --> id="style_active" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
</dl>
- {S_FORM_TOKEN}
- </fieldset>
- <!-- ENDIF -->
- </form>
-
- <!-- IF TEMPLATE_FILE or (S_EDIT_THEME and S_THEME_IN_DB) -->
- <script type="text/javascript" defer="defer">
- // <![CDATA[
-
- function change_editor_height(height)
- {
- height = Number(height);
-
- if (isNaN(height))
- {
- return;
- }
-
- editor = document.getElementById('template_data');
- editor.rows = Math.max(5, Math.min(height, 999));
-
- append_text_rows('acp_styles', height);
- append_text_rows('acp_template', height);
- }
-
- function append_text_rows(form_name, value)
- {
- value = Number(value);
-
- if (isNaN(value))
- {
- return;
- }
-
- url = document.getElementById(form_name).action;
-
- // Make sure &amp; is actually... &
- url = url.replace(/&amp;/g, '&');
-
- var_start = url.indexOf('&text_rows=');
- if (var_start == -1)
- {
- document.getElementById(form_name).action = url + "&text_rows=" + value;
- }
- else
- {
- url_start = url.substring(0, var_start + 1);
- var_end = url.substring(var_start + 1).indexOf('&');
- if (var_end == -1)
- {
- document.getElementById(form_name).action = url_start + "text_rows=" + value;
- }
- else
- {
- document.getElementById(form_name).action = url_start + url.substring(var_end + var_start + 2) + "&text_rows=" + value;
- }
- }
- }
-
- // ]]>
- </script>
-
- <form id="acp_template" method="post" action="{U_ACTION}">
-
- <fieldset>
- <legend>{L_EDITOR}</legend>
- <!-- IF S_EDIT_TEMPLATE or (S_EDIT_THEME and not S_THEME_IN_DB) -->
- <dl>
- <dt><label>{L_SELECTED_FILE}:</label></dt>
- <dd>{TEMPLATE_FILE}</dd>
- </dl>
- <!-- ENDIF -->
+ <!-- IF not S_STYLE_DEFAULT -->
<dl>
- <dt><label for="text_rows">{L_EDITOR_HEIGHT}:</label></dt>
- <dd><input id="text_rows" type="text" maxlength="3" value="{TEXT_ROWS}" /> <input class="button2" type="button" name="update" onclick="change_editor_height(this.form.text_rows.value);" value="{L_UPDATE}" /></dd>
+ <dt><label for="style_default">{L_STYLE_DEFAULT}{L_COLON}</label></dt>
+ <dd><label><input type="radio" class="radio" name="style_default" value="1" /> {L_YES}</label>
+ <label><input type="radio" class="radio" id="style_default" name="style_default" value="0" checked="checked" /> {L_NO}</label></dd>
</dl>
- <textarea id="template_data" name="template_data" style="font-family:'Courier New', monospace;font-size:9pt;line-height:125%;width:100%;" cols="80" rows="{TEXT_ROWS}">{TEMPLATE_DATA}</textarea>
- </fieldset>
-
- <fieldset class="submit-buttons">
- <legend>{L_SUBMIT}</legend>
- {S_HIDDEN_FIELDS}
- {S_FORM_TOKEN}
- <input class="button1" id="save" type="submit" name="save" value="{L_SUBMIT}" />
- </fieldset>
- </form>
<!-- ENDIF -->
-
-<!-- ELSEIF S_CACHE -->
-
- <a href="{U_BACK}" style="float: {S_CONTENT_FLOW_END};">&laquo; {L_BACK}</a>
-
- <h1>{L_TEMPLATE_CACHE}</h1>
-
- <p>{L_TEMPLATE_CACHE_EXPLAIN}</p>
-
- <form id="acp_styles" method="post" action="{U_ACTION}">
- <fieldset class="tabulated">
- <legend>{L_TEMPLATE_CACHE}</legend>
-
- <table cellspacing="1">
- <thead>
- <tr>
- <th>{L_CACHE_FILENAME}</th>
- <th>{L_CACHE_FILESIZE}</th>
- <th>{L_CACHE_CACHED}</th>
- <th>{L_CACHE_MODIFIED}</th>
- <th>{L_MARK}</th>
- </tr>
- </thead>
- <tbody>
- <!-- BEGIN file -->
- <!-- IF file.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
- <td><a href="{file.U_VIEWSOURCE}" onclick="popup(this.href, 750, 550, '_source'); return false;">{file.FILENAME_PATH}</a></td>
- <td>{file.FILESIZE}</td>
- <td>{file.CACHED}</td>
- <td>{file.MODIFIED}</td>
- <td><input type="checkbox" class="radio" name="delete[]" value="{file.FILENAME}" /></td>
- </tr>
- <!-- BEGINELSE -->
- <tr class="row1">
- <td colspan="5">{L_TEMPLATE_CACHE_EMPTY}</td>
- </tr>
- <!-- END file -->
- </tbody>
- </table>
-
- <p class="quick">
- <span class="small"><a href="#" onclick="marklist('acp_styles', 'delete', true); return false;">{L_MARK_ALL}</a> :: <a href="#" onclick="marklist('acp_styles', 'delete', false); return false;">{L_UNMARK_ALL}</a></span><br />
- {S_FORM_TOKEN}
- <input class="button1" type="submit" id="submit" name="submit" value="{L_DELETE_MARKED}" />
- </p>
</fieldset>
- </form>
-
-<!-- ELSEIF S_EXPORT -->
-
- <a href="{U_BACK}" style="float: {S_CONTENT_FLOW_END};">&laquo; {L_BACK}</a>
- <h1>{L_TITLE}</h1>
-
- <p>{L_EXPLAIN}</p>
-
- <!-- IF S_ERROR_MSG -->
- <div class="errorbox">
- <h3>{L_WARNING}</h3>
- <p>{ERROR_MSG}</p>
- </div>
- <!-- ENDIF -->
-
- <form id="acp_styles" method="post" action="{U_ACTION}">
-
- <fieldset>
- <legend>{L_TITLE}</legend>
- <dl>
- <dt><label>{L_NAME}:</label></dt>
- <dd><strong>{NAME}</strong></dd>
- </dl>
- <!-- IF S_STYLE -->
- <dl>
- <dt><label for="inc_template">{L_INCLUDE_TEMPLATE}:</label></dt>
- <dd><label><input type="radio" class="radio" id="inc_template" name="inc_template" value="1" checked="checked" /> {L_YES}</label>
- <label><input type="radio" class="radio" name="inc_template" value="0" /> {L_NO}</label></dd>
- </dl>
- <dl>
- <dt><label for="inc_theme">{L_INCLUDE_THEME}:</label></dt>
- <dd><label><input type="radio" class="radio" id="inc_theme" name="inc_theme" value="1" checked="checked" /> {L_YES}</label>
- <label><input type="radio" class="radio" name="inc_theme" value="0" /> {L_NO}</label></dd>
- </dl>
- <dl>
- <dt><label for="inc_imageset">{L_INCLUDE_IMAGESET}:</label></dt>
- <dd><label><input type="radio" class="radio" id="inc_imageset" name="inc_imageset" value="1" checked="checked" /> {L_YES}</label>
- <label><input type="radio" class="radio" name="inc_imageset" value="0" /> {L_NO}</label></dd>
- </dl>
- <!-- ENDIF -->
- <dl>
- <dt><label for="store">{L_DOWNLOAD_STORE}:</label><br /><span>{L_DOWNLOAD_STORE_EXPLAIN}</span></dt>
- <dd><label><input type="radio" class="radio" id="store" name="store" value="1" checked="checked" /> {L_EXPORT_STORE}</label>
- <label><input type="radio" class="radio" name="store" value="0" /> {L_EXPORT_DOWNLOAD}</label></dd>
- </dl>
- <dl>
- <dt><label for="format">{L_ARCHIVE_FORMAT}:</label></dt>
- <dd>{FORMAT_BUTTONS}</dd>
- </dl>
-
- <p class="quick">
+ <fieldset class="submit-buttons">
+ <legend>{L_SUBMIT}</legend>
+ <input class="button1" type="submit" name="update" value="{L_SUBMIT}" />&nbsp;
+ <input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" />
{S_FORM_TOKEN}
- <input class="button1" type="submit" name="update" value="{L_SUBMIT}" />
- </p>
</fieldset>
+<!-- ENDIF -->
-
- </form>
-
-<!-- ELSEIF S_FRONTEND -->
-
- <h1>{L_TITLE}</h1>
-
- <p>{L_EXPLAIN}</p>
-
- <!-- IF S_STYLE --> <!-- DEFINE $COLSPAN = 5 --> <!-- ELSE --> <!-- DEFINE $COLSPAN = 4 --> <!-- ENDIF -->
-
- <table cellspacing="1">
- <col class="row1" /><!-- IF S_STYLE --><col class="row1" /><!-- ENDIF --><col class="row2" /><col class="row2" />
+<!-- IF .styles_list -->
+ <table class="table1 styles">
<thead>
<tr>
- <th>{L_NAME}</th>
- <!-- IF S_STYLE --><th>{L_STYLE_USED_BY}</th><!-- ENDIF -->
- <th>{L_OPTIONS}</th>
- <th>{L_ACTIONS}</th>
+ <th>{L_STYLE_NAME}</th>
+ <!-- IF not STYLES_LIST_HIDE_COUNT --><th width="10%" style="white-space: nowrap; text-align: center;">{L_STYLE_USED_BY}</th><!-- ENDIF -->
+ <th width="25%" style="white-space: nowrap; text-align: center;">{L_ACTIONS}</th>
+ {STYLES_LIST_EXTRA}
+ <th>&nbsp;</th>
</tr>
</thead>
- <tbody>
- <tr>
- <td class="row3" colspan="{$COLSPAN}"><strong>{L_INSTALLED}</strong></td>
- </tr>
- <!-- BEGIN installed -->
- <!-- IF installed.S_INACTIVE and not $INACTIVE_STYLES -->
- <!-- DEFINE $INACTIVE_STYLES = 1 -->
- <tr>
- <td class="row3" colspan="{$COLSPAN}"><strong>{L_INACTIVE_STYLES}</strong></td>
- </tr>
- <!-- ENDIF -->
- <tr>
- <td><strong>{installed.NAME}</strong><!-- IF installed.S_DEFAULT_STYLE --> *<!-- ENDIF --></td>
- <!-- IF S_STYLE -->
- <td style="text-align: center;">{installed.STYLE_COUNT}</td>
+ <!-- BEGIN styles_list -->
+ <tbody id="styles-list-{styles_list.S_ROW_COUNT}">
+ <tr<!-- IF styles_list.STYLE_ID and not styles_list.STYLE_ACTIVE --> class="row-inactive"<!-- ENDIF -->>
+ <!-- IF styles_list.LEVEL is odd -->
+ <!-- IF $ROW_CLASS == 'row1a' --><!-- DEFINE $ROW_CLASS = 'row1b' --><!-- ELSE --><!-- DEFINE $ROW_CLASS = 'row1a' --><!-- ENDIF -->
+ <!-- ELSE -->
+ <!-- IF $ROW_CLASS == 'row2a' --><!-- DEFINE $ROW_CLASS = 'row2b' --><!-- ELSE --><!-- DEFINE $ROW_CLASS = 'row2a' --><!-- ENDIF -->
<!-- ENDIF -->
- <td style="text-align: center;">
- {installed.S_OPTIONS}
- </td>
- <td style="text-align: center;">
- <!-- IF S_STYLE -->
- <a href="{installed.U_STYLE_ACT_DEACT}">{installed.L_STYLE_ACT_DEACT}</a> |
+ <td class="{$ROW_CLASS}" style="padding-{S_CONTENT_FLOW_BEGIN}: {styles_list.PADDING}px;">
+ <!-- IF styles_list.STYLE_ID and styles_list.COMMENT == '' and styles_list.STYLE_ACTIVE -->
+ <div class="default-style" style="display: none; float: {S_CONTENT_FLOW_END};">
+ <input class="radio" type="radio" name="default" value="{styles_list.STYLE_ID}"<!-- IF styles_list.DEFAULT --> checked="checked"<!-- ELSE --><!-- DEFINE $S_DEFAULT = 1 --><!-- ENDIF --> title="{L_STYLE_DEFAULT}" />
+ </div>
+ <!-- ENDIF -->
+ <!-- IF styles_list.DEFAULT or styles_list.SHOW_COPYRIGHT -->
+ <strong>{styles_list.STYLE_NAME}</strong>
+ <!-- IF styles_list.SHOW_COPYRIGHT and styles_list.COMMENT == '' --><span><br />{styles_list.STYLE_COPYRIGHT}</span><!-- ENDIF -->
+ <!-- ELSE -->
+ <span>{styles_list.STYLE_NAME}</span>
<!-- ENDIF -->
- {installed.S_ACTIONS}
- <!-- IF S_STYLE -->
- | <a href="{installed.U_PREVIEW}">{L_PREVIEW}</a>
+ <!-- IF styles_list.COMMENT != '' -->
+ <span class="error"><br />{styles_list.COMMENT}</span>
+ <!-- ENDIF -->
+ <!-- IF not styles_list.STYLE_ID and styles_list.COMMENT == '' -->
+ <span class="style-path"><br />{L_STYLE_PATH} {styles_list.STYLE_PATH_FULL}</span>
+ <!-- ENDIF -->
+ </td>
+ <!-- IF not STYLES_LIST_HIDE_COUNT -->
+ <td class="{$ROW_CLASS} users">{styles_list.USERS}</td>
+ <!-- ENDIF -->
+ <td class="{$ROW_CLASS} actions">
+ <!-- BEGIN actions -->
+ <!-- IF styles_list.actions.S_ROW_COUNT > 0 --> | <!-- ENDIF -->
+ <!-- IF styles_list.actions.U_ACTION -->
+ <a href="{styles_list.actions.U_ACTION}"{styles_list.actions.U_ACTION_ATTR}>{styles_list.actions.L_ACTION}</a>
+ <!-- ENDIF -->
+ {styles_list.actions.HTML}
+ <!-- END actions -->
+ </td>
+ {styles_list.EXTRA}
+ <td class="{$ROW_CLASS} mark" width="20">
+ <!-- IF styles_list.STYLE_ID -->
+ <input class="checkbox" type="checkbox" name="ids[]" value="{styles_list.STYLE_ID}" />
+ <!-- ELSE -->
+ <!-- IF styles_list.COMMENT != '' -->
+ &nbsp;
+ <!-- ELSE -->
+ <input class="checkbox" type="checkbox" name="dirs[]" value="{styles_list.STYLE_PATH}" />
+ <!-- ENDIF -->
<!-- ENDIF -->
</td>
</tr>
- <!-- END installed -->
- <tr>
- <td class="row3" colspan="{$COLSPAN}"><strong>{L_UNINSTALLED}</strong></td>
- </tr>
- <!-- IF not .uninstalled -->
- <tr>
- <td class="row1" colspan="{$COLSPAN}" style="text-align: center;">{L_NO_UNINSTALLED}</td>
- </tr>
- <!-- ENDIF -->
- <!-- BEGIN uninstalled -->
- <tr>
- <td<!-- IF S_STYLE --> colspan="2"<!-- ENDIF -->><strong>{uninstalled.NAME}</strong><br /><span>{L_COPYRIGHT}: {uninstalled.COPYRIGHT}</span></td>
- <td style="text-align: center;" colspan="2"><a href="{uninstalled.U_INSTALL}">{L_INSTALL}</a></td>
- </tr>
- <!-- END uninstalled -->
</tbody>
+ <!-- END styles_list -->
</table>
+<!-- ENDIF -->
- <!-- IF S_STYLE -->
- <form id="acp_styles" method="post" action="{U_ACTION}">
-
- <fieldset class="quick">
- <legend>{L_CREATE}</legend>
- {L_CREATE}: <input type="text" name="name" value="" /> {L_FROM} <select name="basis">{S_BASIS_OPTIONS}</select> <input class="button2" type="submit" name="add" value="{L_SUBMIT}" />
- </fieldset>
-
- </form>
- <!-- ENDIF -->
-
-<!-- ELSEIF S_DETAILS -->
-
- <a href="{U_BACK}" style="float: {S_CONTENT_FLOW_END};">&laquo; {L_BACK}</a>
-
- <h1>{L_TITLE}</h1>
-
- <p>{L_EXPLAIN}</p>
-
- <!-- IF S_ERROR_MSG -->
- <div class="errorbox">
- <h3>{L_WARNING}</h3>
- <p>{ERROR_MSG}</p>
- </div>
- <!-- ENDIF -->
-
- <form id="acp_styles" method="post" action="{U_ACTION}">
-
- <fieldset>
- <legend>{L_TITLE}</legend>
- <dl>
- <dt><label for="name">{L_NAME}:</label></dt>
- <dd><!-- IF S_INSTALL --><strong id="name">{NAME}</strong><!-- ELSE --><input type="text" id="name" name="name" value="{NAME}" /><!-- ENDIF --></dd>
- </dl>
- <dl>
- <dt><label for="copyright">{L_COPYRIGHT}:</label></dt>
- <dd><!-- IF S_INSTALL --><strong id="copyright">{COPYRIGHT}</strong><!-- ELSE --><input type="text" id="copyright" name="copyright" value="{COPYRIGHT}" /><!-- ENDIF --></dd>
- </dl>
- <!-- IF S_SUPERTEMPLATE -->
- <dl>
- <dt><label for="inheriting">{L_INHERITING_FROM}:</label></dt>
- <dd><strong id="inheriting">{S_SUPERTEMPLATE}</strong></dd>
- </dl>
- <!-- ENDIF -->
- <!-- IF S_STYLE and not S_BASIS -->
- <dl>
- <dt><label for="template_id">{L_STYLE_TEMPLATE}:</label></dt>
- <dd><!-- IF S_INSTALL --><strong id="template_id">{TEMPLATE_NAME}</strong><!-- ELSE --><select id="template_id" name="template_id">{S_TEMPLATE_OPTIONS}</select><!-- ENDIF --></dd>
- </dl>
- <dl>
- <dt><label for="theme_id">{L_STYLE_THEME}:</label></dt>
- <dd><!-- IF S_INSTALL --><strong id="theme_id">{THEME_NAME}</strong><!-- ELSE --><select id="theme_id" name="theme_id">{S_THEME_OPTIONS}</select><!-- ENDIF --></dd>
- </dl>
- <dl>
- <dt><label for="imageset_id">{L_STYLE_IMAGESET}:</label></dt>
- <dd><!-- IF S_INSTALL --><strong id="imageset_id">{IMAGESET_NAME}</strong><!-- ELSE --><select id="imageset_id" name="imageset_id">{S_IMAGESET_OPTIONS}</select><!-- ENDIF --></dd>
- </dl>
- <!-- ENDIF -->
- <!-- IF (S_TEMPLATE or S_THEME) and (S_LOCATION or not S_INSTALL) -->
- <dl>
- <dt><label for="store_db">{L_LOCATION}:</label><br /><span><!-- IF S_STORE_DB_DISABLED -->{L_LOCATION_DISABLED_EXPLAIN}<!-- ELSE -->{L_LOCATION_EXPLAIN}<!-- ENDIF --></span></dt>
- <dd><label><input type="radio" class="radio" name="store_db" value="0"<!-- IF not S_STORE_DB --> id="store_db" checked="checked"<!-- ENDIF --> <!-- IF S_STORE_DB_DISABLED -->disabled="disabled" <!-- ENDIF --> />{L_STORE_FILESYSTEM}</label>
- <label><input type="radio" class="radio" name="store_db" value="1"<!-- IF S_STORE_DB --> id="store_db" checked="checked"<!-- ENDIF --> <!-- IF S_STORE_DB_DISABLED -->disabled="disabled" <!-- ENDIF -->/> {L_STORE_DATABASE}</label></dd>
- </dl>
- <!-- ENDIF -->
- <!-- IF S_STYLE -->
- </fieldset>
-
- <fieldset>
- <legend>{L_OPTIONS}</legend>
- <dl>
- <dt><label for="style_active">{L_STYLE_ACTIVE}:</label></dt>
- <dd><label><input type="radio" class="radio" name="style_active" value="1"<!-- IF S_STYLE_ACTIVE --> id="style_active" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
- <label><input type="radio" class="radio" name="style_active" value="0"<!-- IF not S_STYLE_ACTIVE --> id="style_active" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
- </dl>
- <!-- IF not S_STYLE_DEFAULT -->
- <dl>
- <dt><label for="style_default">{L_STYLE_DEFAULT}:</label></dt>
- <dd><label><input type="radio" class="radio" name="style_default" value="1" /> {L_YES}</label>
- <label><input type="radio" class="radio" id="style_default" name="style_default" value="0" checked="checked" /> {L_NO}</label></dd>
- </dl>
- <!-- ENDIF -->
- <!-- ENDIF -->
- </fieldset>
-
- <fieldset class="submit-buttons">
- <legend>{L_SUBMIT}</legend>
- <input class="button1" type="submit" name="update" value="{L_SUBMIT}" />
- {S_FORM_TOKEN}
+<!-- IF .extra_actions -->
+ <fieldset class="quick">
+ <!-- BEGIN extra_actions -->
+ <input type="submit" name="{extra_actions.ACTION_NAME}" class="button2" value="{extra_actions.L_ACTION}" />
+ <!-- END extra_actions -->
</fieldset>
+<!-- ENDIF -->
- </form>
+</form>
<!-- ENDIF -->
diff --git a/phpBB/adm/style/acp_update.html b/phpBB/adm/style/acp_update.html
index a87366a78b..0cc995959b 100644
--- a/phpBB/adm/style/acp_update.html
+++ b/phpBB/adm/style/acp_update.html
@@ -1,52 +1,46 @@
<!-- INCLUDE overall_header.html -->
-<a name="maincontent"></a>
-
-<!-- IF S_VERSION_CHECK -->
-
- <h1>{L_VERSION_CHECK}</h1>
-
- <p>{L_VERSION_CHECK_EXPLAIN}</p>
-
- <!-- IF S_UP_TO_DATE and S_UP_TO_DATE_AUTO -->
- <div class="successbox">
- <p>{L_VERSION_UP_TO_DATE_ACP} - <a href="{U_VERSIONCHECK_FORCE}">{L_VERSIONCHECK_FORCE_UPDATE}</a></p>
- </div>
- <!-- ELSE -->
- <div class="errorbox">
- <p>{L_VERSION_NOT_UP_TO_DATE_ACP} - <a href="{U_VERSIONCHECK_FORCE}">{L_VERSIONCHECK_FORCE_UPDATE}</a></p>
- </div>
- <!-- ENDIF -->
-
- <!-- IF NEXT_FEATURE_VERSION -->
- <div class="errorbox">
- <p>{UPGRADE_INSTRUCTIONS}</p>
- </div>
- <!-- ENDIF -->
+<a id="maincontent"></a>
- <fieldset>
- <legend></legend>
+<h1>{L_VERSION_CHECK}</h1>
+
+<p>{L_VERSION_CHECK_EXPLAIN}</p>
+
+<!-- IF S_UP_TO_DATE -->
+ <div class="successbox">
+ <p>{L_VERSION_UP_TO_DATE_ACP} - <a href="{U_VERSIONCHECK_FORCE}">{L_VERSIONCHECK_FORCE_UPDATE}</a></p>
+ </div>
+<!-- ELSE -->
+ <div class="errorbox">
+ <p>{L_VERSION_NOT_UP_TO_DATE_ACP} - <a href="{U_VERSIONCHECK_FORCE}">{L_VERSIONCHECK_FORCE_UPDATE}</a></p>
+ </div>
+<!-- ENDIF -->
+
+<fieldset>
+ <legend></legend>
<dl>
<dt><label>{L_CURRENT_VERSION}</label></dt>
- <dd><strong><!-- IF S_UP_TO_DATE and not S_UP_TO_DATE_AUTO -->{AUTO_VERSION}<!-- ELSE -->{CURRENT_VERSION}<!-- ENDIF --></strong></dd>
+ <dd><strong>{CURRENT_VERSION}</strong></dd>
</dl>
- <dl>
- <dt><label>{L_LATEST_VERSION}</label></dt>
- <dd><strong>{LATEST_VERSION}</strong></dd>
- </dl>
- </fieldset>
+</fieldset>
- <!-- IF S_UP_TO_DATE and not S_UP_TO_DATE_AUTO -->
- {L_UPDATE_INSTRUCTIONS_INCOMPLETE}
- <br /><br />
- {UPDATE_INSTRUCTIONS}
- <br /><br />
- <!-- ENDIF -->
- <!-- IF not S_UP_TO_DATE -->
- {UPDATE_INSTRUCTIONS}
- <br /><br />
- <!-- ENDIF -->
+<!-- BEGIN updates_available -->
+ <fieldset>
+ <legend></legend>
+ <dl>
+ <dt><label>{L_LATEST_VERSION}</label></dt>
+ <dd><strong>{updates_available.current}</strong></dd>
+ </dl>
+ <dl>
+ <dt><label>{L_RELEASE_ANNOUNCEMENT}</label></dt>
+ <dd><strong><a href="{updates_available.announcement}">{updates_available.announcement}</a></strong></dd>
+ </dl>
+ </fieldset>
+<!-- END updates_available -->
+<!-- IF not S_UP_TO_DATE -->
+ {UPDATE_INSTRUCTIONS}
+ <br /><br />
<!-- ENDIF -->
-<!-- INCLUDE overall_footer.html --> \ No newline at end of file
+<!-- INCLUDE overall_footer.html -->
diff --git a/phpBB/adm/style/acp_users.html b/phpBB/adm/style/acp_users.html
index d5a29a21cc..b84e32013f 100644
--- a/phpBB/adm/style/acp_users.html
+++ b/phpBB/adm/style/acp_users.html
@@ -1,6 +1,6 @@
<!-- INCLUDE overall_header.html -->
-<a name="maincontent"></a>
+<a id="maincontent"></a>
<!-- IF S_SELECT_USER -->
@@ -13,7 +13,7 @@
<fieldset>
<legend>{L_SELECT_USER}</legend>
<dl>
- <dt><label for="username">{L_ENTER_USERNAME}:</label></dt>
+ <dt><label for="username">{L_ENTER_USERNAME}{L_COLON}</label></dt>
<dd><input class="text medium" type="text" id="username" name="username" /></dd>
<dd>[ <a href="{U_FIND_USERNAME}" onclick="find_username(this.href); return false;">{L_FIND_USERNAME}</a> ]</dd>
<dd class="full" style="text-align: left;"><label><input type="checkbox" class="radio" id="anonymous" name="u" value="{ANONYMOUS_USER_ID}" /> {L_SELECT_ANONYMOUS}</label></dd>
@@ -68,7 +68,7 @@
<form id="mode_select" method="post" action="{U_MODE_SELECT}">
<fieldset class="quick">
- {L_SELECT_FORM}: <select name="mode" onchange="if (this.options[this.selectedIndex].value != '') this.form.submit();">{S_FORM_OPTIONS}</select> <input class="button2" type="submit" value="{L_GO}" />
+ {L_SELECT_FORM}{L_COLON} <select name="mode" onchange="if (this.options[this.selectedIndex].value != '') this.form.submit();">{S_FORM_OPTIONS}</select> <input class="button2" type="submit" value="{L_GO}" />
{S_FORM_TOKEN}
</fieldset>
</form>
@@ -106,7 +106,7 @@
<fieldset>
<legend>{L_ACP_USER_RANK}</legend>
<dl>
- <dt><label for="user_rank">{L_USER_RANK}:</label></dt>
+ <dt><label for="user_rank">{L_USER_RANK}{L_COLON}</label></dt>
<dd><select name="user_rank" id="user_rank">{S_RANK_OPTIONS}</select></dd>
</dl>
</fieldset>
@@ -125,7 +125,7 @@
<form id="user_groups" method="post" action="{U_ACTION}">
- <table cellspacing="1">
+ <table class="table1 zebra-table">
<tbody>
<!-- BEGIN group -->
<!-- IF group.S_NEW_GROUP_TYPE -->
@@ -133,7 +133,7 @@
<td class="row3" colspan="4"><strong>{group.GROUP_TYPE}</strong></td>
</tr>
<!-- ELSE -->
- <!-- IF group.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
+ <tr>
<td><a href="{group.U_EDIT_GROUP}">{group.GROUP_NAME}</a></td>
<td><!-- IF group.S_IS_MEMBER --><!-- IF group.S_NO_DEFAULT --><a href="{group.U_DEFAULT}">{L_GROUP_DEFAULT}</a><!-- ELSE --><strong>{L_GROUP_DEFAULT}</strong><!-- ENDIF --><!-- ELSEIF not group.S_IS_MEMBER and group.U_APPROVE --><a href="{group.U_APPROVE}">{L_GROUP_APPROVE}</a><!-- ELSE -->&nbsp;<!-- ENDIF --></td>
<td><!-- IF group.S_IS_MEMBER and not group.S_SPECIAL_GROUP --><a href="{group.U_DEMOTE_PROMOTE}">{group.L_DEMOTE_PROMOTE}</a><!-- ELSE -->&nbsp;<!-- ENDIF --></td>
@@ -146,7 +146,7 @@
<!-- IF S_GROUP_OPTIONS -->
<fieldset class="quick">
- {L_USER_GROUP_ADD}: <select name="g">{S_GROUP_OPTIONS}</select> <input class="button1" type="submit" name="update" value="{L_SUBMIT}" />
+ {L_USER_GROUP_ADD}{L_COLON} <select name="g">{S_GROUP_OPTIONS}</select> <input class="button1" type="submit" name="update" value="{L_SUBMIT}" />
{S_FORM_TOKEN}
</fieldset>
<!-- ENDIF -->
@@ -157,14 +157,14 @@
<form id="user_attachments" method="post" action="{U_ACTION}">
- <!-- IF PAGINATION -->
<div class="pagination">
- <a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{S_ON_PAGE}</a> &bull; <span>{PAGINATION}</span>
- </div>
+ <!-- IF .pagination -->
+ <!-- INCLUDE pagination.html -->
<!-- ENDIF -->
+ </div>
<!-- IF .attach -->
- <table cellspacing="1">
+ <table class="table1 zebra-table">
<thead>
<tr>
<th>{L_FILENAME}</th>
@@ -176,8 +176,8 @@
</thead>
<tbody>
<!-- BEGIN attach -->
- <!-- IF attach.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
- <td><a href="{attach.U_DOWNLOAD}">{attach.REAL_FILENAME}</a><br /><span class="small"><!-- IF attach.S_IN_MESSAGE --><strong>{L_PM}: </strong><!-- ELSE --><strong>{L_POST}: </strong><!-- ENDIF --><a href="{attach.U_VIEW_TOPIC}">{attach.TOPIC_TITLE}</a></span></td>
+ <tr>
+ <td><a href="{attach.U_DOWNLOAD}">{attach.REAL_FILENAME}</a><br /><span class="small"><!-- IF attach.S_IN_MESSAGE --><strong>{L_PM}{L_COLON} </strong><!-- ELSE --><strong>{L_POST}{L_COLON} </strong><!-- ENDIF --><a href="{attach.U_VIEW_TOPIC}">{attach.TOPIC_TITLE}</a></span></td>
<td style="text-align: center">{attach.POST_TIME}</td>
<td style="text-align: center">{attach.SIZE}</td>
<td style="text-align: center">{attach.DOWNLOAD_COUNT}</td>
@@ -192,15 +192,15 @@
</div>
<!-- ENDIF -->
<fieldset class="display-options">
- {L_SORT_BY}: <select name="sk">{S_SORT_KEY}</select> <select name="sd">{S_SORT_DIR}</select>
+ {L_SORT_BY}{L_COLON} <select name="sk">{S_SORT_KEY}</select> <select name="sd">{S_SORT_DIR}</select>
<input class="button2" type="submit" value="{L_GO}" name="sort" />
</fieldset>
<hr />
- <!-- IF PAGINATION -->
<div class="pagination">
- <a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{S_ON_PAGE}</a> &bull; <span>{PAGINATION}</span>
- </div>
+ <!-- IF .pagination -->
+ <!-- INCLUDE pagination.html -->
<!-- ENDIF -->
+ </div>
<fieldset class="quick">
<input class="button2" type="submit" name="delmarked" value="{L_DELETE_MARKED}" />
@@ -219,7 +219,7 @@
<form id="select_forum" method="post" action="{U_ACTION}">
<fieldset class="quick" style="text-align: left;">
- {L_SELECT_FORUM}: <select name="f">{S_FORUM_OPTIONS}</select>
+ {L_SELECT_FORUM}{L_COLON} <select name="f">{S_FORUM_OPTIONS}</select>
<input class="button2" type="submit" value="{L_GO}" name="select" />
{S_FORM_TOKEN}
</fieldset>
diff --git a/phpBB/adm/style/acp_users_avatar.html b/phpBB/adm/style/acp_users_avatar.html
index 2b2676a19a..0a72bb0b62 100644
--- a/phpBB/adm/style/acp_users_avatar.html
+++ b/phpBB/adm/style/acp_users_avatar.html
@@ -1,78 +1,39 @@
- <form id="avatar_settings" method="post" action="{U_ACTION}"<!-- IF S_CAN_UPLOAD --> enctype="multipart/form-data"<!-- ENDIF -->>
+ <form id="avatar_settings" method="post" action="{U_ACTION}" enctype="multipart/form-data">
<fieldset>
<legend>{L_ACP_USER_AVATAR}</legend>
- <dl>
- <dt><label>{L_CURRENT_IMAGE}:</label><br /><span>{L_AVATAR_EXPLAIN}</span></dt>
- <dd>{AVATAR_IMAGE}</dd>
- <dd><label><input type="checkbox" class="radio" name="delete" /> {L_DELETE_AVATAR}</label></dd>
- </dl>
- <!-- IF not S_IN_AVATAR_GALLERY -->
- <!-- IF S_UPLOAD_FILE -->
- <dl>
- <dt><label for="uploadfile">{L_UPLOAD_AVATAR_FILE}:</label></dt>
- <dd><input type="hidden" name="MAX_FILE_SIZE" value="{AVATAR_MAX_FILESIZE}" /><input type="file" id="uploadfile" name="uploadfile" /></dd>
- </dl>
- <!-- ENDIF -->
- <!-- IF S_REMOTE_UPLOAD -->
- <dl>
- <dt><label for="uploadurl">{L_UPLOAD_AVATAR_URL}:</label><br /><span>{L_UPLOAD_AVATAR_URL_EXPLAIN}</span></dt>
- <dd><input name="uploadurl" type="text" id="uploadurl" value="" /></dd>
- </dl>
- <!-- ENDIF -->
- <!-- IF S_ALLOW_REMOTE -->
- <dl>
- <dt><label for="remotelink">{L_LINK_REMOTE_AVATAR}:</label><br /><span>{L_LINK_REMOTE_AVATAR_EXPLAIN}</span></dt>
- <dd><input name="remotelink" type="text" id="remotelink" value="" /></dd>
- </dl>
- <dl>
- <dt><label for="width">{L_LINK_REMOTE_SIZE}:</label><br /><span>{L_LINK_REMOTE_SIZE_EXPLAIN}</span></dt>
- <dd><input name="width" type="text" id="width" size="3" value="{USER_AVATAR_WIDTH}" /> <span>{L_PIXEL} &times; </span> <input type="text" name="height" size="3" value="{USER_AVATAR_HEIGHT}" /> <span>{L_PIXEL}</span></dd>
- </dl>
- <!-- ENDIF -->
- <!-- IF S_DISPLAY_GALLERY -->
- <dl>
- <dt><label>{L_AVATAR_GALLERY}:</label></dt>
- <dd><input class="button2" type="submit" name="display_gallery" value="{L_DISPLAY_GALLERY}" /></dd>
- </dl>
- <!-- ENDIF -->
- <!-- ELSE -->
- </fieldset>
-
- <fieldset>
- <legend>{L_AVATAR_GALLERY}</legend>
+ <!-- IF ERROR --><p class="error">{ERROR}</p><!-- ENDIF -->
<dl>
- <dt><label for="category">{L_AVATAR_CATEGORY}:</label></dt>
- <dd><select name="category" id="category">{S_CAT_OPTIONS}</select>&nbsp;<input class="button2" type="submit" value="{L_GO}" name="display_gallery" /></dd>
+ <dt><label>{L_CURRENT_IMAGE}{L_COLON}</label><br /><span>{L_AVATAR_EXPLAIN}</span></dt>
+ <dd>{AVATAR}</dd>
+ <dd><label for="avatar_delete"><input type="checkbox" name="avatar_delete" id="avatar_delete" /> {L_DELETE_AVATAR}</label></dd>
</dl>
+ </fieldset>
+ <fieldset>
+ <legend>{L_AVATAR_SELECT}</legend>
<dl>
- <table cellspacing="1">
- <!-- BEGIN avatar_row -->
- <tr>
- <!-- BEGIN avatar_column -->
- <td class="row1" style="text-align: center;"><img src="{avatar_row.avatar_column.AVATAR_IMAGE}" alt="{avatar_row.avatar_column.AVATAR_NAME}" title="{avatar_row.avatar_column.AVATAR_NAME}" /></td>
- <!-- END avatar_column -->
- </tr>
- <tr>
- <!-- BEGIN avatar_option_column -->
- <td class="row2" style="text-align: center;"><input type="radio" class="radio" name="avatar_select" value="{avatar_row.avatar_option_column.S_OPTIONS_AVATAR}" /></td>
- <!-- END avatar_option_column -->
- </tr>
- <!-- END avatar_row -->
- </table>
+ <dt><label>{L_AVATAR_TYPE}</label></dt>
+ <dd><select name="avatar_driver" id="avatar_driver">
+ <option value="">{L_NO_AVATAR_CATEGORY}</option>
+ <!-- BEGIN avatar_drivers -->
+ <option value="{avatar_drivers.DRIVER}"<!-- IF avatar_drivers.SELECTED --> selected="selected"<!-- ENDIF -->>{avatar_drivers.L_TITLE}</option>
+ <!-- END avatar_drivers -->
+ </select></dd>
</dl>
- </fieldset>
-
- <fieldset class="quick" style="margin-top: -15px;">
- <input class="button2" type="submit" name="cancel" value="{L_CANCEL}" />
- </fieldset>
-
- <!-- ENDIF -->
+ <div id="avatar_options">
+ <!-- BEGIN avatar_drivers -->
+ <div id="avatar_option_{avatar_drivers.DRIVER}">
+ <p>{avatar_drivers.L_EXPLAIN}</p>
+ {avatar_drivers.OUTPUT}
+ </div>
+ <!-- END avatar_drivers -->
+ </div>
</fieldset>
<fieldset class="quick">
- <input class="button1" type="submit" name="update" value="{L_SUBMIT}" />
- {S_FORM_TOKEN}
+ <input type="submit" name="update" value="{L_SUBMIT}" class="button1" />
+ {S_FORM_TOKEN}
</fieldset>
-
- </form> \ No newline at end of file
+ </form>
+
+ <!-- INCLUDEJS avatars.js -->
diff --git a/phpBB/adm/style/acp_users_feedback.html b/phpBB/adm/style/acp_users_feedback.html
index e11a8e6ec1..f251724cd2 100644
--- a/phpBB/adm/style/acp_users_feedback.html
+++ b/phpBB/adm/style/acp_users_feedback.html
@@ -1,13 +1,13 @@
<form id="list" method="post" action="{U_ACTION}">
- <!-- IF PAGINATION -->
<div class="pagination">
- <a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{S_ON_PAGE}</a> &bull; <span>{PAGINATION}</span>
- </div>
+ <!-- IF .pagination -->
+ <!-- INCLUDE pagination.html -->
<!-- ENDIF -->
+ </div>
<!-- IF .log -->
- <table cellspacing="1">
+ <table class="table1 zebra-table">
<thead>
<tr>
<th>{L_REPORT_BY}</th>
@@ -19,8 +19,7 @@
</thead>
<tbody>
<!-- BEGIN log -->
- <!-- IF log.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
-
+ <tr>
<td>{log.USERNAME}</td>
<td style="text-align: center;">{log.IP}</td>
<td style="text-align: center;">{log.DATE}</td>
@@ -40,15 +39,15 @@
<!-- ENDIF -->
<fieldset class="display-options">
- {L_DISPLAY_LOG}: &nbsp;{S_LIMIT_DAYS}&nbsp;{L_SORT_BY}: {S_SORT_KEY} {S_SORT_DIR}
+ {L_DISPLAY_LOG}{L_COLON} &nbsp;{S_LIMIT_DAYS}&nbsp;{L_SORT_BY}{L_COLON} {S_SORT_KEY} {S_SORT_DIR}
<input class="button2" type="submit" value="{L_GO}" name="sort" />
</fieldset>
<hr />
- <!-- IF PAGINATION -->
<div class="pagination">
- <a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{S_ON_PAGE}</a> &bull; <span>{PAGINATION}</span>
- </div>
+ <!-- IF .pagination -->
+ <!-- INCLUDE pagination.html -->
<!-- ENDIF -->
+ </div>
<!-- IF S_CLEARLOGS -->
<fieldset class="quick">
@@ -73,4 +72,4 @@
<input class="button1" type="submit" name="update" value="{L_SUBMIT}" />
</fieldset>
{S_FORM_TOKEN}
- </form> \ No newline at end of file
+ </form>
diff --git a/phpBB/adm/style/acp_users_overview.html b/phpBB/adm/style/acp_users_overview.html
index 964d6e5c17..013be80465 100644
--- a/phpBB/adm/style/acp_users_overview.html
+++ b/phpBB/adm/style/acp_users_overview.html
@@ -3,60 +3,70 @@
<fieldset>
<legend>{L_ACP_USER_OVERVIEW}</legend>
<dl>
- <dt><label for="user">{L_USERNAME}:</label><br /><span>{L_NAME_CHARS_EXPLAIN}</span></dt>
+ <dt><label for="user">{L_USERNAME}{L_COLON}</label><br /><span>{L_NAME_CHARS_EXPLAIN}</span></dt>
<dd><input type="text" id="user" name="user" value="{USER}" /></dd>
<!-- IF U_SWITCH_PERMISSIONS --><dd>[ <a href="{U_SWITCH_PERMISSIONS}">{L_USE_PERMISSIONS}</a> ]</dd><!-- ENDIF -->
</dl>
<!-- IF S_USER_INACTIVE -->
<dl>
- <dt><label>{L_USER_IS_INACTIVE}:</label></dt>
+ <dt><label>{L_USER_IS_INACTIVE}{L_COLON}</label></dt>
<dd><strong>{USER_INACTIVE_REASON}</strong></dd>
</dl>
<!-- ENDIF -->
<dl>
- <dt><label>{L_REGISTERED}:</label></dt>
+ <dt><label>{L_REGISTERED}{L_COLON}</label></dt>
<dd><strong>{USER_REGISTERED}</strong></dd>
</dl>
<!-- IF S_USER_IP -->
<dl>
- <dt><label>{L_REGISTERED_IP}:</label></dt>
+ <dt><label>{L_REGISTERED_IP}{L_COLON}</label></dt>
<dd><a href="{U_SHOW_IP}">{REGISTERED_IP}</a></dd>
<dd>[ <a href="{U_WHOIS}" onclick="popup(this.href, 700, 500, '_whois'); return false;">{L_WHOIS}</a> ]</dd>
</dl>
<!-- ENDIF -->
<dl>
- <dt><label>{L_LAST_ACTIVE}:</label></dt>
+ <dt><label>{L_LAST_ACTIVE}{L_COLON}</label></dt>
<dd><strong>{USER_LASTACTIVE}</strong></dd>
</dl>
<dl>
- <dt><label>{L_POSTS}:</label></dt>
- <dd><strong><!-- IF USER_HAS_POSTS and U_SEARCH_USER --><a href="{U_SEARCH_USER}">{USER_POSTS}</a><!-- ELSE -->{USER_POSTS}<!-- ENDIF --></strong><!-- IF POSTS_IN_QUEUE and U_MCP_QUEUE --> (<a href="{U_MCP_QUEUE}">{L_POSTS_IN_QUEUE}</a>)<!-- ELSEIF POSTS_IN_QUEUE --> ({L_POSTS_IN_QUEUE})<!-- ENDIF --></dd>
+ <dt><label>{L_POSTS}{L_COLON}</label></dt>
+ <dd>
+ <strong>
+ <!-- IF USER_HAS_POSTS and U_SEARCH_USER -->
+ <a href="{U_SEARCH_USER}">{USER_POSTS}</a>
+ <!-- ELSE -->
+ {USER_POSTS}
+ <!-- ENDIF -->
+ </strong>
+ <!-- IF POSTS_IN_QUEUE and U_MCP_QUEUE -->
+ (<a href="{U_MCP_QUEUE}">{L_POSTS_IN_QUEUE}</a>)
+ <!-- ELSEIF POSTS_IN_QUEUE -->
+ ({L_POSTS_IN_QUEUE})
+ <!-- ENDIF -->
+ </dd>
</dl>
<dl>
- <dt><label>{L_WARNINGS}:</label></dt>
+ <dt><label>{L_WARNINGS}{L_COLON}</label></dt>
<dd><strong>{USER_WARNINGS}</strong></dd>
</dl>
<dl>
- <dt><label for="user_founder">{L_FOUNDER}:</label><br /><span>{L_FOUNDER_EXPLAIN}</span></dt>
+ <dt><label for="user_founder">{L_FOUNDER}{L_COLON}</label><br /><span>{L_FOUNDER_EXPLAIN}</span></dt>
<dd><label><input type="radio" class="radio" name="user_founder" value="1"<!-- IF S_USER_FOUNDER --> id="user_founder" checked="checked"<!-- ENDIF --><!-- IF not S_FOUNDER --> disabled="disabled"<!-- ENDIF --> /> {L_YES}</label>
<label><input type="radio" class="radio" name="user_founder" value="0"<!-- IF not S_USER_FOUNDER --> id="user_founder" checked="checked"<!-- ENDIF --><!-- IF not S_FOUNDER --> disabled="disabled"<!-- ENDIF --> /> {L_NO}</label></dd>
</dl>
<dl>
- <dt><label for="user_email">{L_EMAIL}:</label></dt>
- <dd><input class="text medium" type="text" id="user_email" name="user_email" value="{USER_EMAIL}" autocomplete="off" /></dd>
+ <dt><label for="user_email">{L_EMAIL}{L_COLON}</label></dt>
+ <dd><input class="text medium" type="email" id="user_email" name="user_email" value="{USER_EMAIL}" autocomplete="off" /></dd>
</dl>
<dl>
- <dt><label for="email_confirm">{L_CONFIRM_EMAIL}:</label><br /><span>{L_CONFIRM_EMAIL_EXPLAIN}</span></dt>
- <dd><input class="text medium" type="text" id="email_confirm" name="email_confirm" value="" autocomplete="off" /></dd>
-</dl>
-<dl>
- <dt><label for="new_password">{L_NEW_PASSWORD}:</label><br /><span>{L_CHANGE_PASSWORD_EXPLAIN}</span></dt>
+ <dt><label for="new_password">{L_NEW_PASSWORD}{L_COLON}</label><br /><span>{L_CHANGE_PASSWORD_EXPLAIN}</span></dt>
<dd><input type="password" id="new_password" name="new_password" value="" autocomplete="off" /></dd>
</dl>
<dl>
- <dt><label for="password_confirm">{L_CONFIRM_PASSWORD}:</label><br /><span>{L_CONFIRM_PASSWORD_EXPLAIN}</span></dt>
+ <dt><label for="password_confirm">{L_CONFIRM_PASSWORD}{L_COLON}</label><br /><span>{L_CONFIRM_PASSWORD_EXPLAIN}</span></dt>
<dd><input type="password" id="password_confirm" name="password_confirm" value="" autocomplete="off" /></dd>
</dl>
+<!-- EVENT acp_users_overview_options_append -->
<p class="quick">
<input class="button1" type="submit" name="update" value="{L_SUBMIT}" />
@@ -111,16 +121,16 @@
<fieldset>
<legend>{L_USER_TOOLS}</legend>
<dl>
- <dt><label for="quicktools">{L_QUICK_TOOLS}:</label></dt>
+ <dt><label for="quicktools">{L_QUICK_TOOLS}{L_COLON}</label></dt>
<dd><select id="quicktools" name="action" onchange="display_reason(this.options[this.selectedIndex].value);">{S_ACTION_OPTIONS}</select></dd>
</dl>
<div style="display: none;" id="reasons">
<dl>
- <dt><label for="ban_reason">{L_BAN_REASON}:</label></dt>
+ <dt><label for="ban_reason">{L_BAN_REASON}{L_COLON}</label></dt>
<dd><input name="ban_reason" type="text" class="text medium" maxlength="3000" id="ban_reason" /></dd>
</dl>
<dl>
- <dt><label for="ban_give_reason">{L_BAN_GIVE_REASON}:</label></dt>
+ <dt><label for="ban_give_reason">{L_BAN_GIVE_REASON}{L_COLON}</label></dt>
<dd><input name="ban_give_reason" type="text" class="text medium" maxlength="3000" id="ban_give_reason" /></dd>
</dl>
</div>
@@ -139,7 +149,7 @@
<fieldset>
<legend>{L_DELETE_USER}</legend>
<dl>
- <dt><label for="delete_type">{L_DELETE_USER}:</label><br /><span>{L_DELETE_USER_EXPLAIN}</span></dt>
+ <dt><label for="delete_type">{L_DELETE_USER}{L_COLON}</label><br /><span>{L_DELETE_USER_EXPLAIN}</span></dt>
<dd>
<!-- IF USER_HAS_POSTS -->
<select id="delete_type" name="delete_type"><option class="sep" value="">{L_SELECT_OPTION}</option><option value="retain">{L_RETAIN_POSTS}</option><option value="remove">{L_DELETE_POSTS}</option></select>
diff --git a/phpBB/adm/style/acp_users_prefs.html b/phpBB/adm/style/acp_users_prefs.html
index 07a9bc5c78..1092b25b04 100644
--- a/phpBB/adm/style/acp_users_prefs.html
+++ b/phpBB/adm/style/acp_users_prefs.html
@@ -9,60 +9,47 @@
<fieldset>
<legend>{L_UCP_PREFS_PERSONAL}</legend>
<dl>
- <dt><label for="viewemail">{L_SHOW_EMAIL}:</label></dt>
+ <dt><label for="viewemail">{L_SHOW_EMAIL}{L_COLON}</label></dt>
<dd><label><input type="radio" class="radio" name="viewemail" value="1"<!-- IF VIEW_EMAIL --> id="viewemail" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label><input type="radio" class="radio" name="viewemail" value="0"<!-- IF not VIEW_EMAIL --> id="viewemail" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
</dl>
<dl>
- <dt><label for="massemail">{L_ADMIN_EMAIL}:</label></dt>
+ <dt><label for="massemail">{L_ADMIN_EMAIL}{L_COLON}</label></dt>
<dd><label><input type="radio" class="radio" name="massemail" value="1"<!-- IF MASS_EMAIL --> id="massemail" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label><input type="radio" class="radio" name="massemail" value="0"<!-- IF not MASS_EMAIL --> id="massemail" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
</dl>
<dl>
- <dt><label for="allowpm">{L_ALLOW_PM}:</label><br /><span>{L_ALLOW_PM_EXPLAIN}</span></dt>
+ <dt><label for="allowpm">{L_ALLOW_PM}{L_COLON}</label><br /><span>{L_ALLOW_PM_EXPLAIN}</span></dt>
<dd><label><input type="radio" class="radio" name="allowpm" value="1"<!-- IF ALLOW_PM --> id="allowpm" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label><input type="radio" class="radio" name="allowpm" value="0"<!-- IF not ALLOW_PM --> id="allowpm" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
</dl>
<dl>
- <dt><label for="hideonline">{L_HIDE_ONLINE}:</label></dt>
+ <dt><label for="hideonline">{L_HIDE_ONLINE}{L_COLON}</label></dt>
<dd><label><input type="radio" class="radio" name="hideonline" value="1"<!-- IF HIDE_ONLINE --> id="hideonline" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label><input type="radio" class="radio" name="hideonline" value="0"<!-- IF not HIDE_ONLINE --> id="hideonline" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
</dl>
<dl>
- <dt><label for="notifymethod">{L_NOTIFY_METHOD}:</label><br /><span>{L_NOTIFY_METHOD_EXPLAIN}</span></dt>
+ <dt><label for="notifymethod">{L_NOTIFY_METHOD}{L_COLON}</label><br /><span>{L_NOTIFY_METHOD_EXPLAIN}</span></dt>
<dd><label><input type="radio" class="radio" name="notifymethod" value="0"<!-- IF NOTIFY_EMAIL --> id="notifymethod" checked="checked"<!-- ENDIF --> /> {L_NOTIFY_METHOD_EMAIL}</label>
<label><input type="radio" class="radio" name="notifymethod" value="1"<!-- IF NOTIFY_IM --> id="notifymethod" checked="checked"<!-- ENDIF --><!-- IF S_JABBER_DISABLED --> disabled="disabled"<!-- ENDIF --> /> {L_NOTIFY_METHOD_IM}</label>
<label><input type="radio" class="radio" name="notifymethod" value="2"<!-- IF NOTIFY_BOTH --> id="notifymethod" checked="checked"<!-- ENDIF --> /> {L_NOTIFY_METHOD_BOTH}</label></dd>
</dl>
<dl>
- <dt><label for="notifypm">{L_NOTIFY_ON_PM}:</label></dt>
+ <dt><label for="notifypm">{L_NOTIFY_ON_PM}{L_COLON}</label></dt>
<dd><label><input type="radio" class="radio" name="notifypm" value="1"<!-- IF NOTIFY_PM --> id="notifypm" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label><input type="radio" class="radio" name="notifypm" value="0"<!-- IF not NOTIFY_PM --> id="notifypm" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
</dl>
<dl>
- <dt><label for="popuppm">{L_POPUP_ON_PM}:</label></dt>
- <dd><label><input type="radio" class="radio" name="popuppm" value="1"<!-- IF POPUP_PM --> id="popuppm" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
- <label><input type="radio" class="radio" name="popuppm" value="0"<!-- IF not POPUP_PM --> id="popuppm" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
- </dl>
- <dl>
- <dt><label for="lang">{L_BOARD_LANGUAGE}:</label></dt>
+ <dt><label for="lang">{L_BOARD_LANGUAGE}{L_COLON}</label></dt>
<dd><select id="lang" name="lang">{S_LANG_OPTIONS}</select></dd>
</dl>
<dl>
- <dt><label for="style">{L_BOARD_STYLE}:</label></dt>
+ <dt><label for="style">{L_BOARD_STYLE}{L_COLON}</label></dt>
<dd><select id="style" name="style">{S_STYLE_OPTIONS}</select></dd>
</dl>
+ <!-- INCLUDE timezone_option.html -->
<dl>
- <dt><label for="tz">{L_BOARD_TIMEZONE}:</label></dt>
- <dd><select id="tz" name="tz" style="width: 100%;">{S_TZ_OPTIONS}</select></dd>
- </dl>
- <dl>
- <dt><label for="dst">{L_BOARD_DST}:</label></dt>
- <dd><label><input type="radio" class="radio" name="dst" value="1"<!-- IF DST --> id="dst" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
- <label><input type="radio" class="radio" name="dst" value="0"<!-- IF not DST --> id="dst" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
- </dl>
- <dl>
- <dt><label for="dateoptions">{L_BOARD_DATE_FORMAT}:</label><br /><span>{L_BOARD_DATE_FORMAT_EXPLAIN}</span></dt>
+ <dt><label for="dateoptions">{L_BOARD_DATE_FORMAT}{L_COLON}</label><br /><span>{L_BOARD_DATE_FORMAT_EXPLAIN}</span></dt>
<dd><select name="dateoptions" id="dateoptions" onchange="if(this.value=='custom'){dE('custom_date',1);}else{dE('custom_date',-1);} if (this.value == 'custom') { document.getElementById('dateformat').value = default_dateformat; } else { document.getElementById('dateformat').value = this.value; }">{S_DATEFORMAT_OPTIONS}</select></dd>
<dd><div id="custom_date"<!-- IF not S_CUSTOM_DATEFORMAT --> style="display:none;"<!-- ENDIF -->><input type="text" name="dateformat" id="dateformat" value="{DATE_FORMAT}" maxlength="30" /></div></dd>
</dl>
@@ -71,22 +58,22 @@
<fieldset>
<legend>{L_UCP_PREFS_POST}</legend>
<dl>
- <dt><label for="bbcode">{L_DEFAULT_BBCODE}:</label></dt>
+ <dt><label for="bbcode">{L_DEFAULT_BBCODE}{L_COLON}</label></dt>
<dd><label><input type="radio" class="radio" name="bbcode" value="1"<!-- IF BBCODE --> id="bbcode" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label><input type="radio" class="radio" name="bbcode" value="0"<!-- IF not BBCODE --> id="bbcode" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
</dl>
<dl>
- <dt><label for="smilies">{L_DEFAULT_SMILIES}:</label></dt>
+ <dt><label for="smilies">{L_DEFAULT_SMILIES}{L_COLON}</label></dt>
<dd><label><input type="radio" class="radio" name="smilies" value="1"<!-- IF SMILIES --> id="smilies" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label><input type="radio" class="radio" name="smilies" value="0"<!-- IF not SMILIES --> id="smilies" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
</dl>
<dl>
- <dt><label for="sig">{L_DEFAULT_ADD_SIG}:</label></dt>
+ <dt><label for="sig">{L_DEFAULT_ADD_SIG}{L_COLON}</label></dt>
<dd><label><input type="radio" class="radio" name="sig" value="1"<!-- IF ATTACH_SIG --> id="sig" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label><input type="radio" class="radio" name="sig" value="0"<!-- IF not ATTACH_SIG --> id="sig" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
</dl>
<dl>
- <dt><label for="notify">{L_DEFAULT_NOTIFY}:</label></dt>
+ <dt><label for="notify">{L_DEFAULT_NOTIFY}{L_COLON}</label></dt>
<dd><label><input type="radio" class="radio" name="notify" value="1"<!-- IF NOTIFY --> id="notify" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label><input type="radio" class="radio" name="notify" value="0"<!-- IF not NOTIFY --> id="notify" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
</dl>
@@ -95,57 +82,57 @@
<fieldset>
<legend>{L_UCP_PREFS_VIEW}</legend>
<dl>
- <dt><label for="view_images">{L_VIEW_IMAGES}:</label></dt>
+ <dt><label for="view_images">{L_VIEW_IMAGES}{L_COLON}</label></dt>
<dd><label><input type="radio" class="radio" name="view_images" value="1"<!-- IF VIEW_IMAGES --> id="view_images" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label><input type="radio" class="radio" name="view_images" value="0"<!-- IF not VIEW_IMAGES --> id="view_images" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
</dl>
<dl>
- <dt><label for="view_flash">{L_VIEW_FLASH}:</label></dt>
+ <dt><label for="view_flash">{L_VIEW_FLASH}{L_COLON}</label></dt>
<dd><label><input type="radio" class="radio" name="view_flash" value="1"<!-- IF VIEW_FLASH --> id="view_flash" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label><input type="radio" class="radio" name="view_flash" value="0"<!-- IF not VIEW_FLASH --> id="view_flash" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
</dl>
<dl>
- <dt><label for="view_smilies">{L_VIEW_SMILIES}:</label></dt>
+ <dt><label for="view_smilies">{L_VIEW_SMILIES}{L_COLON}</label></dt>
<dd><label><input type="radio" class="radio" name="view_smilies" value="1"<!-- IF VIEW_SMILIES --> id="view_smilies" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label><input type="radio" class="radio" name="view_smilies" value="0"<!-- IF not VIEW_SMILIES --> id="view_smilies" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
</dl>
<dl>
- <dt><label for="view_sigs">{L_VIEW_SIGS}:</label></dt>
+ <dt><label for="view_sigs">{L_VIEW_SIGS}{L_COLON}</label></dt>
<dd><label><input type="radio" class="radio" name="view_sigs" value="1"<!-- IF VIEW_SIGS --> id="view_sigs" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label><input type="radio" class="radio" name="view_sigs" value="0"<!-- IF not VIEW_SIGS --> id="view_sigss" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
</dl>
<dl>
- <dt><label for="view_avatars">{L_VIEW_AVATARS}:</label></dt>
+ <dt><label for="view_avatars">{L_VIEW_AVATARS}{L_COLON}</label></dt>
<dd><label><input type="radio" class="radio" name="view_avatars" value="1"<!-- IF VIEW_AVATARS --> id="view_avatars" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label><input type="radio" class="radio" name="view_avatars" value="0"<!-- IF not VIEW_AVATARS --> id="view_avatars" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
</dl>
<dl>
- <dt><label for="view_wordcensor">{L_DISABLE_CENSORS}:</label></dt>
+ <dt><label for="view_wordcensor">{L_DISABLE_CENSORS}{L_COLON}</label></dt>
<dd><label><input type="radio" class="radio" name="view_wordcensor" value="1"<!-- IF VIEW_WORDCENSOR --> id="view_wordcensor" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label><input type="radio" class="radio" name="view_wordcensor" value="0"<!-- IF not VIEW_WORDCENSOR --> id="view_wordcensor" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
</dl>
<dl>
- <dt><label>{L_VIEW_TOPICS_DAYS}:</label></dt>
+ <dt><label>{L_VIEW_TOPICS_DAYS}{L_COLON}</label></dt>
<dd>{S_TOPIC_SORT_DAYS}</dd>
</dl>
<dl>
- <dt><label>{L_VIEW_TOPICS_KEY}:</label></dt>
+ <dt><label>{L_VIEW_TOPICS_KEY}{L_COLON}</label></dt>
<dd>{S_TOPIC_SORT_KEY}</dd>
</dl>
<dl>
- <dt><label>{L_VIEW_TOPICS_DIR}:</label></dt>
+ <dt><label>{L_VIEW_TOPICS_DIR}{L_COLON}</label></dt>
<dd>{S_TOPIC_SORT_DIR}</dd>
</dl>
<dl>
- <dt><label>{L_VIEW_POSTS_DAYS}:</label></dt>
+ <dt><label>{L_VIEW_POSTS_DAYS}{L_COLON}</label></dt>
<dd>{S_POST_SORT_DAYS}</dd>
</dl>
<dl>
- <dt><label>{L_VIEW_POSTS_KEY}:</label></dt>
+ <dt><label>{L_VIEW_POSTS_KEY}{L_COLON}</label></dt>
<dd>{S_POST_SORT_KEY}</dd>
</dl>
<dl>
- <dt><label>{L_VIEW_POSTS_DIR}:</label></dt>
+ <dt><label>{L_VIEW_POSTS_DIR}{L_COLON}</label></dt>
<dd>{S_POST_SORT_DIR}</dd>
</dl>
</fieldset>
@@ -155,4 +142,4 @@
{S_FORM_TOKEN}
</fieldset>
- </form> \ No newline at end of file
+ </form>
diff --git a/phpBB/adm/style/acp_users_profile.html b/phpBB/adm/style/acp_users_profile.html
index 0d1c6f8e46..d32348ff1c 100644
--- a/phpBB/adm/style/acp_users_profile.html
+++ b/phpBB/adm/style/acp_users_profile.html
@@ -3,44 +3,12 @@
<fieldset>
<legend>{L_USER_PROFILE}</legend>
<dl>
- <dt><label for="icq">{L_UCP_ICQ}:</label></dt>
- <dd><input type="text" id="icq" name="icq" value="{ICQ}" /></dd>
+ <dt><label for="jabber">{L_UCP_JABBER}{L_COLON}</label></dt>
+ <dd><input type="email" id="jabber" name="jabber" value="{JABBER}" /></dd>
</dl>
<dl>
- <dt><label for="aim">{L_UCP_AIM}:</label></dt>
- <dd><input type="text" id="aim" name="aim" value="{AIM}" /></dd>
- </dl>
- <dl>
- <dt><label for="msn">{L_UCP_MSNM}:</label></dt>
- <dd><input type="text" id="msn" name="msn" value="{MSN}" /></dd>
- </dl>
- <dl>
- <dt><label for="yim">{L_UCP_YIM}:</label></dt>
- <dd><input type="text" id="yim" name="yim" value="{YIM}" /></dd>
- </dl>
- <dl>
- <dt><label for="jabber">{L_UCP_JABBER}:</label></dt>
- <dd><input type="text" id="jabber" name="jabber" value="{JABBER}" /></dd>
- </dl>
- <dl>
- <dt><label for="website">{L_WEBSITE}:</label></dt>
- <dd><input type="text" id="website" name="website" value="{WEBSITE}" /></dd>
- </dl>
- <dl>
- <dt><label for="location">{L_LOCATION}:</label></dt>
- <dd><input type="text" id="location" name="location" value="{LOCATION}" /></dd>
- </dl>
- <dl>
- <dt><label for="occupation">{L_OCCUPATION}:</label></dt>
- <dd><textarea id="occupation" name="occupation" rows="3" cols="30">{OCCUPATION}</textarea></dd>
- </dl>
- <dl>
- <dt><label for="interests">{L_INTERESTS}:</label></dt>
- <dd><textarea id="interests" name="interests" rows="3" cols="30">{INTERESTS}</textarea></dd>
- </dl>
- <dl>
- <dt><label for="birthday">{L_BIRTHDAY}:</label><br /><span>{L_BIRTHDAY_EXPLAIN}</span></dt>
- <dd>{L_DAY}: <select id="birthday" name="bday_day">{S_BIRTHDAY_DAY_OPTIONS}</select> {L_MONTH}: <select name="bday_month">{S_BIRTHDAY_MONTH_OPTIONS}</select> {L_YEAR}: <select name="bday_year">{S_BIRTHDAY_YEAR_OPTIONS}</select></dd>
+ <dt><label for="birthday">{L_BIRTHDAY}{L_COLON}</label><br /><span>{L_BIRTHDAY_EXPLAIN}</span></dt>
+ <dd>{L_DAY}{L_COLON} <select id="birthday" name="bday_day">{S_BIRTHDAY_DAY_OPTIONS}</select> {L_MONTH}{L_COLON} <select name="bday_month">{S_BIRTHDAY_MONTH_OPTIONS}</select> {L_YEAR}{L_COLON} <select name="bday_year">{S_BIRTHDAY_YEAR_OPTIONS}</select></dd>
</dl>
</fieldset>
@@ -48,8 +16,8 @@
<fieldset>
<legend>{L_USER_CUSTOM_PROFILE_FIELDS}</legend>
<!-- BEGIN profile_fields -->
- <dl>
- <dt><label<!-- IF profile_fields.FIELD_ID --> for="{profile_fields.FIELD_ID}"<!-- ENDIF -->>{profile_fields.LANG_NAME}:</label><!-- IF profile_fields.LANG_EXPLAIN --><br /><span>{profile_fields.LANG_EXPLAIN}</span><!-- ENDIF --></dt>
+ <dl>
+ <dt><label<!-- IF profile_fields.FIELD_ID --> for="{profile_fields.FIELD_ID}"<!-- ENDIF -->>{profile_fields.LANG_NAME}{L_COLON}</label><!-- IF profile_fields.LANG_EXPLAIN --><br /><span>{profile_fields.LANG_EXPLAIN}</span><!-- ENDIF --></dt>
<dd>{profile_fields.FIELD}</dd>
<!-- IF profile_fields.ERROR -->
<dd><span class="small" style="color: red;">{profile_fields.ERROR}</span></dd>
@@ -63,4 +31,4 @@
<input class="button1" type="submit" name="update" value="{L_SUBMIT}" />
{S_FORM_TOKEN}
</fieldset>
- </form> \ No newline at end of file
+ </form>
diff --git a/phpBB/adm/style/acp_users_signature.html b/phpBB/adm/style/acp_users_signature.html
index 0fd6c04fa5..5b5c3ecf7f 100644
--- a/phpBB/adm/style/acp_users_signature.html
+++ b/phpBB/adm/style/acp_users_signature.html
@@ -3,6 +3,8 @@
var form_name = 'user_signature';
var text_name = 'signature';
+ var load_draft = false;
+ var upload = false;
// Define the bbCode tags
var bbcode = new Array();
@@ -20,19 +22,19 @@
o: '{LA_BBCODE_O_HELP}',
p: '{LA_BBCODE_P_HELP}',
w: '{LA_BBCODE_W_HELP}',
+ a: '{LA_BBCODE_A_HELP}',
s: '{LA_BBCODE_S_HELP}',
f: '{LA_BBCODE_F_HELP}',
y: '{LA_BBCODE_Y_HELP}',
- d: '{LA_BBCODE_D_HELP}',
- tip: '{L_STYLES_TIP}'
+ d: '{LA_BBCODE_D_HELP}'
<!-- BEGIN custom_tags -->
- ,cb_{custom_tags.BBCODE_ID}: '{custom_tags.A_BBCODE_HELPLINE}'
+ ,cb_{custom_tags.BBCODE_ID}{L_COLON} '{custom_tags.A_BBCODE_HELPLINE}'
<!-- END custom_tags -->
}
// ]]>
</script>
-<script type="text/javascript" src="{T_TEMPLATE_PATH}/editor.js"></script>
+<!-- INCLUDEJS {T_ASSETS_PATH}/javascript/editor.js -->
<form id="user_signature" method="post" action="{U_ACTION}">
@@ -47,52 +49,48 @@
<legend>{L_SIGNATURE}</legend>
<p>{L_SIGNATURE_EXPLAIN}</p>
+ <!-- EVENT acp_users_signature_editor_buttons_before -->
<div id="format-buttons">
- <input type="button" class="button2" accesskey="b" name="addbbcode0" value=" B " style="font-weight:bold; width: 30px;" onclick="bbstyle(0)" onmouseover="helpline('b')" onmouseout="helpline('tip')" />
- <input type="button" class="button2" accesskey="i" name="addbbcode2" value=" i " style="font-style:italic; width: 30px;" onclick="bbstyle(2)" onmouseover="helpline('i')" onmouseout="helpline('tip')" />
- <input type="button" class="button2" accesskey="u" name="addbbcode4" value=" u " style="text-decoration: underline; width: 30px;" onclick="bbstyle(4)" onmouseover="helpline('u')" onmouseout="helpline('tip')" />
- <input type="button" class="button2" accesskey="q" name="addbbcode6" value="Quote" style="width: 50px" onclick="bbstyle(6)" onmouseover="helpline('q')" onmouseout="helpline('tip')" />
- <input type="button" class="button2" accesskey="c" name="addbbcode8" value="Code" style="width: 40px" onclick="bbstyle(8)" onmouseover="helpline('c')" onmouseout="helpline('tip')" />
- <input type="button" class="button2" accesskey="l" name="addbbcode10" value="List" style="width: 40px" onclick="bbstyle(10)" onmouseover="helpline('l')" onmouseout="helpline('tip')" />
- <input type="button" class="button2" accesskey="o" name="addbbcode12" value="List=" style="width: 40px" onclick="bbstyle(12)" onmouseover="helpline('o')" onmouseout="helpline('tip')" />
- <input type="button" class="button2" accesskey="y" name="addlistitem" value="[*]" style="width: 40px" onclick="bbstyle(-1)" onmouseover="helpline('y')" onmouseout="helpline('tip')" />
+ <input type="button" class="button2" accesskey="b" name="addbbcode0" value=" B " style="font-weight:bold; width: 30px" onclick="bbstyle(0)" title="{L_BBCODE_B_HELP}" />
+ <input type="button" class="button2" accesskey="i" name="addbbcode2" value=" i " style="font-style:italic; width: 30px" onclick="bbstyle(2)" title="{L_BBCODE_I_HELP}" />
+ <input type="button" class="button2" accesskey="u" name="addbbcode4" value=" u " style="text-decoration: underline; width: 30px" onclick="bbstyle(4)" title="{L_BBCODE_U_HELP}" />
+ <!-- IF S_BBCODE_QUOTE -->
+ <input type="button" class="button2" accesskey="q" name="addbbcode6" value="Quote" style="width: 50px" onclick="bbstyle(6)" title="{L_BBCODE_Q_HELP}" />
+ <!-- ENDIF -->
+ <input type="button" class="button2" accesskey="c" name="addbbcode8" value="Code" style="width: 40px" onclick="bbstyle(8)" title="{L_BBCODE_C_HELP}" />
+ <input type="button" class="button2" accesskey="l" name="addbbcode10" value="List" style="width: 40px" onclick="bbstyle(10)" title="{L_BBCODE_L_HELP}" />
+ <input type="button" class="button2" accesskey="o" name="addbbcode12" value="List=" style="width: 40px" onclick="bbstyle(12)" title="{L_BBCODE_O_HELP}" />
+ <input type="button" class="button2" accesskey="y" name="addlistitem" value="[*]" style="width: 40px" onclick="bbstyle(-1)" title="{L_BBCODE_LISTITEM_HELP}" />
<!-- IF S_BBCODE_IMG -->
- <input type="button" class="button2" accesskey="p" name="addbbcode14" value="Img" style="width: 40px" onclick="bbstyle(14)" onmouseover="helpline('p')" onmouseout="helpline('tip')" />
+ <input type="button" class="button2" accesskey="p" name="addbbcode14" value="Img" style="width: 40px" onclick="bbstyle(14)" title="{L_BBCODE_P_HELP}" />
<!-- ENDIF -->
<!-- IF S_LINKS_ALLOWED -->
- <input type="button" class="button2" accesskey="w" name="addbbcode16" value="URL" style="text-decoration: underline; width: 40px" onclick="bbstyle(16)" onmouseover="helpline('w')" onmouseout="helpline('tip')" />
+ <input type="button" class="button2" accesskey="w" name="addbbcode16" value="URL" style="text-decoration: underline; width: 40px" onclick="bbstyle(16)" title="{L_BBCODE_W_HELP}" />
<!-- ENDIF -->
<!-- IF S_BBCODE_FLASH -->
- <input type="button" class="button2" accesskey="d" name="addbbcode18" value="Flash" onclick="bbstyle(18)" onmouseover="helpline('d')" onmouseout="helpline('tip')" />
+ <input type="button" class="button2" accesskey="d" name="addbbcode18" value="Flash" onclick="bbstyle(18)" title="{L_BBCODE_D_HELP}" />
<!-- ENDIF -->
-
- {L_FONT_SIZE}: <select name="addbbcode20" onchange="bbfontstyle('[size=' + this.form.addbbcode20.options[this.form.addbbcode20.selectedIndex].value + ']', '[/size]');this.form.addbbcode20.selectedIndex = 2;" title="{L_FONT_SIZE}" onmouseover="helpline('f')" onmouseout="helpline('tip')">
+ <select name="addbbcode20" onchange="bbfontstyle('[size=' + this.form.addbbcode20.options[this.form.addbbcode20.selectedIndex].value + ']', '[/size]');this.form.addbbcode20.selectedIndex = 2;" title="{L_BBCODE_F_HELP}">
<option value="50">{L_FONT_TINY}</option>
<option value="85">{L_FONT_SMALL}</option>
<option value="100" selected="selected">{L_FONT_NORMAL}</option>
- <option value="150">{L_FONT_LARGE}</option>
- <option value="200">{L_FONT_HUGE}</option>
+ <!-- IF not MAX_FONT_SIZE or MAX_FONT_SIZE >= 150 -->
+ <option value="150">{L_FONT_LARGE}</option>
+ <!-- IF not MAX_FONT_SIZE or MAX_FONT_SIZE >= 200 -->
+ <option value="200">{L_FONT_HUGE}</option>
+ <!-- ENDIF -->
+ <!-- ENDIF -->
</select>
- <!-- IF .custom_tags -->
- <br /><br />
<!-- BEGIN custom_tags -->
- <input type="button" class="button2" name="addbbcode{custom_tags.BBCODE_ID}" value="{custom_tags.BBCODE_TAG}" onclick="bbstyle({custom_tags.BBCODE_ID})"<!-- IF custom_tags.BBCODE_HELPLINE !== '' --> onmouseover="helpline('cb_{custom_tags.BBCODE_ID}')" onmouseout="helpline('tip')"<!-- ENDIF --> />
+ <input type="button" class="button2" name="addbbcode{custom_tags.BBCODE_ID}" value="{custom_tags.BBCODE_TAG}" onclick="bbstyle({custom_tags.BBCODE_ID})" title="{custom_tags.BBCODE_HELPLINE}" />
<!-- END custom_tags -->
- <!-- ENDIF -->
-
</div>
+ <!-- EVENT acp_users_signature_editor_buttons_after -->
- <p><input type="text" class="text full" style="border: 0; background: none;" name="helpbox" value="{L_STYLES_TIP}" /></p>
-
- <dl>
- <dt style="width: 90px;">
- <script type="text/javascript">
- // <![CDATA[
- colorPalette('v', 12, 10);
- // ]]>
- </script>
+ <dl class="responsive-columns">
+ <dt style="width: 90px;" id="color_palette_placeholder" data-orientation="v" data-height="12" data-width="15" data-bbcode="true">
</dt>
- <dd style="margin-{S_CONTENT_FLOW_BEGIN}: 90px;"><textarea name="signature" rows="10" cols="60" style="width: 95%;" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);" onfocus="initInsertions();">{SIGNATURE}</textarea></dd>
+ <dd style="margin-{S_CONTENT_FLOW_BEGIN}: 90px;"><textarea name="signature" rows="10" cols="60" style="width: 95%;" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);" onfocus="initInsertions();" data-bbcode="true">{SIGNATURE}</textarea></dd>
<dd style="margin-{S_CONTENT_FLOW_BEGIN}: 90px; margin-top: 5px;">
<!-- IF S_BBCODE_ALLOWED -->
<label><input type="checkbox" class="radio" name="disable_bbcode"{S_BBCODE_CHECKED} /> {L_DISABLE_BBCODE}</label>
@@ -104,7 +102,7 @@
<label><input type="checkbox" class="radio" name="disable_magic_url"{S_MAGIC_URL_CHECKED} /> {L_DISABLE_MAGIC_URL}</label>
<!-- ENDIF -->
</dd>
- <dd style="margin-{S_CONTENT_FLOW_BEGIN}: 90px; margin-top: 10px;"><strong>{L_OPTIONS}: </strong>{BBCODE_STATUS} :: {IMG_STATUS} :: {FLASH_STATUS} :: {URL_STATUS} :: {SMILIES_STATUS}</dd>
+ <dd style="margin-{S_CONTENT_FLOW_BEGIN}: 90px; margin-top: 10px;"><strong>{L_OPTIONS}{L_COLON} </strong>{BBCODE_STATUS} :: {IMG_STATUS} :: {FLASH_STATUS} :: {URL_STATUS} :: {SMILIES_STATUS}</dd>
</dl>
</fieldset>
@@ -113,4 +111,4 @@
<input class="button2" type="submit" name="preview" value="{L_PREVIEW}" />
{S_FORM_TOKEN}
</fieldset>
-</form> \ No newline at end of file
+</form>
diff --git a/phpBB/adm/style/acp_users_warnings.html b/phpBB/adm/style/acp_users_warnings.html
index d27f3800fc..6e7f521415 100644
--- a/phpBB/adm/style/acp_users_warnings.html
+++ b/phpBB/adm/style/acp_users_warnings.html
@@ -1,7 +1,7 @@
<form id="list" method="post" action="{U_ACTION}">
<!-- IF .warn -->
- <table cellspacing="1">
+ <table class="table1 zebra-table">
<thead>
<tr>
<th>{L_REPORT_BY}</th>
@@ -12,7 +12,7 @@
</thead>
<tbody>
<!-- BEGIN warn -->
- <!-- IF warn.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
+ <tr>
<td>{warn.USERNAME}</td>
<td style="text-align: center; nowrap: nowrap;">{warn.DATE}</td>
<td>{warn.ACTION}</td>
diff --git a/phpBB/adm/style/acp_words.html b/phpBB/adm/style/acp_words.html
index 3fa4cfc91c..6038fc6161 100644
--- a/phpBB/adm/style/acp_words.html
+++ b/phpBB/adm/style/acp_words.html
@@ -1,6 +1,6 @@
<!-- INCLUDE overall_header.html -->
-<a name="maincontent"></a>
+<a id="maincontent"></a>
<!-- IF S_EDIT_WORD -->
@@ -47,7 +47,7 @@
<input class="button2" name="add" type="submit" value="{L_ADD_WORD}" />
</p>
- <table cellspacing="1">
+ <table class="table1 zebra-table">
<thead>
<tr>
<th>{L_WORD}</th>
@@ -57,10 +57,10 @@
</thead>
<tbody>
<!-- BEGIN words -->
- <!-- IF words.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
+ <tr>
<td style="text-align: center;">{words.WORD}</td>
<td style="text-align: center;">{words.REPLACEMENT}</td>
- <td>&nbsp;<a href="{words.U_EDIT}">{ICON_EDIT}</a>&nbsp;&nbsp;<a href="{words.U_DELETE}">{ICON_DELETE}</a>&nbsp;</td>
+ <td>&nbsp;<a href="{words.U_EDIT}">{ICON_EDIT}</a>&nbsp;&nbsp;<a href="{words.U_DELETE}" data-ajax="row_delete">{ICON_DELETE}</a>&nbsp;</td>
</tr>
<!-- BEGINELSE -->
<tr class="row3">
diff --git a/phpBB/adm/style/admin.css b/phpBB/adm/style/admin.css
index a0e14d65a1..22bbf404ea 100644
--- a/phpBB/adm/style/admin.css
+++ b/phpBB/adm/style/admin.css
@@ -1,4 +1,4 @@
-/* phpBB 3.0 Admin Style Sheet
+/* phpBB 3.1 Admin Style Sheet
------------------------------------------------------------------------
Original author: subBlue ( http://www.subblue.com/ )
Copyright 2007 phpBB Group ( http://www.phpbb.com/ )
@@ -18,11 +18,11 @@ body, div, p, th, td, li, dd {
font-size: x-small;
voice-family: "\"}\"";
voice-family: inherit;
- font-size: small
+ font-size: small;
}
html>body, html>div, html>p, html>th, html>td, html>li, html>dd {
- font-size: small
+ font-size: small;
}
html {
@@ -31,6 +31,7 @@ html {
/* Always show a scrollbar for short pages - stops the jump when the scrollbar appears. non-ie browsers */
height: 100%;
margin-bottom: 1px;
+ word-wrap: break-word;
}
body {
@@ -42,6 +43,10 @@ body {
margin: 10px 15px;
}
+code, samp {
+ font-size: 1.2em;
+}
+
img {
border: 0;
}
@@ -101,6 +106,27 @@ hr {
font-size: 0.85em;
}
+.hidden {
+ display: none;
+}
+
+@media only screen and (max-width: 800px), only screen and (max-device-width: 800px)
+{
+ body {
+ margin: 5px 5px 0;
+ }
+}
+
+@media only screen and (max-width: 700px), only screen and (max-device-width: 700px)
+{
+ html, body {
+ height: auto;
+ margin: 0;
+ padding: 0;
+ }
+}
+
+
/* General links */
a:link, a:visited {
color: #105289;
@@ -132,6 +158,7 @@ li {
list-style-type: inherit;
}
+
/* Main blocks
---------------------------------------- */
#wrap {
@@ -170,7 +197,7 @@ li {
#page-body {
clear: both;
- min-width: 700px;
+ min-width: 650px;
}
#page-footer {
@@ -191,19 +218,23 @@ li {
}
#main {
- float: left;
- width: 76%;
- margin: 0 0 0 3%;
- min-height: 350px;
+ float: right;
+ width: 100%;
+ margin: 0 0 0 -210px;
}
.rtl #main {
- float: right;
- margin: 0 3% 0 0;
+ float: left;
+ margin: 0 -210px 0 0;
+}
+
+.main {
+ margin-left: 210px;
}
-* html #main {
- height: 350px;
+.rtl .main {
+ margin-left: 0;
+ margin-right: 210px;
}
#page-body.simple-page-body {
@@ -212,17 +243,81 @@ li {
min-width: 0;
}
+@media only screen and (max-width: 700px), only screen and (max-device-width: 700px)
+{
+ #wrap, #page-body, #page-body.simple-page-body {
+ padding: 0;
+ min-width: 300px;
+ }
+
+ #page-header {
+ margin: 5px;
+ padding-left: 160px;
+ height: auto;
+ min-height: 54px;
+ overflow: hidden;
+ }
+
+ .rtl #page-header {
+ padding-right: 160px;
+ padding-left: 0;
+ }
+
+ #page-header h1 {
+ font-size: 1.2em;
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ }
+
+ #page-header fieldset {
+ margin-top: 5px;
+ }
+
+ #main, .rtl #main, .main, .rtl .main {
+ float: none;
+ width: auto;
+ margin: 0;
+ }
+
+ #content {
+ background: #F3F3F3 url("../images/innerbox_bg.gif") repeat-x top;
+ padding: 5px;
+ }
+
+ #page-footer {
+ padding: 0 5px 5px;
+ }
+}
+
+@media only screen and (max-width: 400px), only screen and (max-device-width: 400px)
+{
+ #page-header {
+ background-size: 76px 26.5px;
+ padding-left: 80px;
+ min-height: 30px;
+ }
+
+ .rtl #page-header {
+ padding-right: 80px;
+ }
+
+ #page-header h1 {
+ padding-top: 0;
+ font-size: 1.1em;
+ }
+}
+
+
/* Tabbed menu
Based on: http://www.alistapart.com/articles/slidingdoors2/
----------------------------------------*/
#tabs {
line-height: normal;
- margin: 0 0 -6px 7px;
+ margin: 0 7px;
min-width: 600px;
-}
-
-.rtl #tabs {
- margin: 0 7px -6px 0;
+ position: relative;
+ z-index: 2;
}
#tabs ul {
@@ -231,14 +326,27 @@ li {
list-style: none;
}
+#tabs ul:after {
+ content: '';
+ display: block;
+ clear: both;
+}
+
#tabs li {
- display: inline;
+ display: block;
+ float: left;
margin: 0;
padding: 0;
font-size: 0.85em;
font-weight: bold;
}
+#tabs li:after {
+ content: '';
+ display: block;
+ clear: both;
+}
+
#tabs a {
float: left;
background:url("../images/bg_tabs1.gif") no-repeat 0% -34px;
@@ -248,7 +356,7 @@ li {
position: relative;
}
-.rtl #tabs a {
+.rtl #tabs li {
float: right;
}
@@ -257,6 +365,7 @@ li {
display: block;
background: url("../images/bg_tabs2.gif") no-repeat 100% -34px;
padding: 7px 10px 4px 4px;
+ min-height: 14px;
color: #767676;
white-space: nowrap;
font-family: Arial, Helvetica, sans-serif;
@@ -276,122 +385,154 @@ li {
color: #BC2A4D;
}
-#tabs #activetab a {
+#tabs a:hover {
+ background-position: 0 -69px;
+}
+
+#tabs a:hover span {
+ background-position: 100% -69px;
+}
+
+#tabs .activetab a {
background-position: 0 0;
border-bottom: 1px solid #DCDEE2;
}
-#tabs #activetab a span {
+#tabs .activetab a span {
background-position: 100% 0;
padding-bottom: 5px;
color: #23649F;
}
-#tabs a:hover {
- background-position: 0 -69px;
+#tabs .activetab a:hover span {
+ color: #115098;
}
-#tabs a:hover span {
- background-position: 100% -69px;
+.responsive-tab {
+ position: relative;
}
-#tabs #activetab a:hover span {
- color: #115098;
+.responsive-tab .responsive-tab-link span {
+ display: inline-block;
+ font-size: 16px;
+ position: relative;
+ width: 16px;
+ line-height: 14px;
+ text-decoration: none;
}
+.responsive-tab .responsive-tab-link span:before {
+ content: '';
+ position: absolute;
+ left: 5px;
+ top: 8px;
+ height: .125em;
+ width: 14px;
+ border-bottom: 0.125em solid #767676;
+ border-top: 0.375em double #767676;
+}
-/* Main Panel
----------------------------------------- */
-#acp {
- margin: 4px 0;
- padding: 3px 1px;
- min-width: 550px;
- background-color: #FFFFFF;
- border: 1px #999999 solid;
+.responsive-tab .responsive-tab-link:hover span:before {
+ border-color: #BC2A4D;
}
-.panel {
- background: #F3F3F3 url("../images/innerbox_bg.gif") repeat-x top;
- padding: 0;
+.responsive-tab.activetab .responsive-tab-link span:before {
+ border-color: #23649F;
}
-span.corners-top, span.corners-bottom,
-span.corners-top span, span.corners-bottom span {
- font-size: 1px;
- line-height: 1px;
- display: block;
- height: 5px;
- background-repeat: no-repeat;
+.responsive-tab.activetab .responsive-tab-link:hover span:before {
+ border-color: #115098;
}
-span.corners-top {
- background-image: url("../images/corners_left.gif");
- background-position: 0 0;
- margin: -4px -2px 0;
+#tabs .dropdown {
+ top: 18px;
+ margin-right: -1px;
}
-span.corners-top span {
- background-image: url("../images/corners_right.gif");
- background-position: 100% 0;
+#tabs .dropdown-right .dropdown {
+ margin-left: -2px;
}
-span.corners-bottom {
- background-image: url("../images/corners_left.gif");
- background-position: 0 100%;
- margin: 0 -2px -4px;
- clear: both;
+#tabs .dropdown li {
+ display: block !important;
+ float: none;
+ background: transparent none;
+ padding: 0;
}
-span.corners-bottom span {
- background-image: url("../images/corners_right.gif");
- background-position: 100% 100%;
+#tabs .dropdown a, #tabs .dropdown a span {
+ background: transparent;
+ display: block;
+ border-width: 0;
+ float: none;
+ margin: 0;
+ padding: 0;
+ text-align: right;
}
-/* WinIE tweaks \*/
-* html span.corners-top, * html span.corners-bottom { background-image: url("../images/corners_left.gif"); }
-* html span.corners-top span, * html span.corners-bottom span { background-image: url("../images/corners_right.gif"); }
-/* End tweaks */
+#tabs .dropdown a span {
+ padding: 4px 8px;
+ color: inherit !important;
+}
-/* Sub-navigation Menu
----------------------------------------- */
+@media only screen and (max-width: 700px), only screen and (max-device-width: 700px)
+{
+ #tabs {
+ min-width: 0;
+ }
+}
-/* Toggle */
-#toggle {
- padding: 5px;
- width: 5%;
- height: 100px;
- position: absolute;
- left: 15%;
- top: 28px;
- margin-left: 2px;
+/* Main Panel
+---------------------------------------- */
+#acp {
+ clear: both;
+ position: relative;
+ top: -2px;
+ margin: 0 0 2px;
+ padding: 3px 1px;
+ min-width: 550px;
+ background: #F3F3F3 url("../images/innerbox_bg.gif") repeat-x top;
+ border: 1px #999999 solid;
+ border-radius: 5px;
+ box-shadow: #FFF 0 0 0 1px inset;
}
-.rtl #toggle {
- left: 75%;
- margin-right: 0;
- margin-left: 6px;
+#acp:first-child {
+ top: 0;
}
-#toggle-handle {
- display: block;
- width: 18px;
- height: 19px;
- float: right;
- background-image: url(../images/toggle.gif);
+.panel {
+ background: #F3F3F3 url("../images/innerbox_bg.gif") repeat-x top;
+ padding: 5px 0;
+ border-radius: 5px;
+ overflow: hidden;
}
-.rtl #toggle-handle {
- background-image: url(../images/toggle.gif);
- background-position: 100% 50%;
+@media only screen and (max-width: 700px), only screen and (max-device-width: 700px)
+{
+ #acp {
+ min-width: 0;
+ min-height: 0;
+ border-radius: 0;
+ border-width: 1px 0;
+ background: #fff;
+ padding: 1px 0;
+ box-shadow: none;
+ }
}
+/* Sub-navigation Menu
+---------------------------------------- */
+
/* Menu */
#menu {
float: left;
- width: 20%;
+ width: 200px;
font-size: 1.00em;
padding: 0;
border-right: 1px solid #CCCFD3;
+ position: relative;
+ z-index: 1;
}
.rtl #menu {
@@ -408,15 +549,16 @@ span.corners-bottom span {
list-style: none;
margin: 0;
padding: 0;
+ word-wrap: normal;
}
/* Default list state */
-#menu li {
+#menu li, #menu .header {
padding: 0;
margin: 0;
font-size: 0.85em;
font-weight: bold;
- display: inline;
+ display: block;
}
/* Link styles for the sub-section links */
@@ -481,7 +623,7 @@ span.corners-bottom span {
background: url("../images/arrow_down.gif") 99% 50% no-repeat;
}
-#menu li.header {
+#menu .header {
font-family: Tahoma, Helvetica, sans-serif;
display: block;
font-weight: bold;
@@ -491,8 +633,71 @@ span.corners-bottom span {
margin-top: 15px;
text-transform: uppercase;
font-size: 0.75em;
+ text-decoration: none;
+ cursor: inherit;
+ outline-style: none;
+}
+
+@media only screen and (max-width: 700px), only screen and (max-device-width: 700px)
+{
+ #menu, .rtl #menu {
+ float: none;
+ width: auto;
+ border-width: 0;
+ max-width: 200px;
+ margin: 0 auto 10px;
+ }
+
+ #menu p {
+ text-align: center;
+ }
+
+ #menu .menu-block.active {
+ margin: 0 -5px;
+ padding: 0 5px 3px;
+ background: rgba(255, 255, 255, .5);
+ border-radius: 5px;
+ }
+
+ #menu .menu-block.no-header.active {
+ padding-top: 3px;
+ }
+
+ #menu .menu-block .header {
+ margin-top: 5px;
+ cursor: pointer;
+ border-bottom-width: 0;
+ position: relative;
+ text-decoration: underline;
+ }
+
+ #menu .menu-block .header:focus, #menu .menu-block.active .header {
+ color: #D31141;
+ text-decoration: none;
+ }
+
+ #menu .menu-block ul {
+ display: none;
+ }
+
+ .nojs #menu .menu-block:hover ul, #menu .menu-block.active ul, #menu .menu-block.no-header ul {
+ display: block;
+ }
+
+ #menu .menu-block li:last-child {
+ border-bottom: 1px solid #327AA5;
+ }
+
+ #menu .menu-block:last-child li:last-child, #menu .menu-block.active li:last-child {
+ border-bottom-width: 0;
+ }
+
+ #menu .menu-block li a span {
+ border-radius: 2px;
+ }
}
+
/* Table styles
---------------------------------------- */
@@ -525,6 +730,20 @@ td {
text-align: right;
}
+.table1 {
+ border-collapse: separate;
+ border-spacing: 1px;
+}
+
+dt#color_palette_placeholder table {
+ margin-right: 5px;
+ width: 80px;
+}
+
+#color_palette_placeholder td {
+ padding: 0;
+}
+
table.type2 {
border: none;
background: none;
@@ -619,19 +838,221 @@ td.name {
text-align: right;
}
-.row1 { background-color: #F9F9F9; }
-.row2 { background-color: #DCEBFE; }
+.row1 {
+ background-color: #F9F9F9;
+}
+
+table.zebra-table tbody tr:nth-child(odd) {
+ background-color: #F9F9F9;
+}
+
+.row2 {
+ background-color: #DCEBFE;
+}
+
+table.zebra-table tbody tr:nth-child(even) {
+ background-color: #DCEBFE;
+}
+
.row3 { background-color: #DBDFE2; }
.row4 { background-color: #E4E8EB; }
.col1 { background-color: #DCEBFE; }
.col2 { background-color: #F9F9F9; }
+/* 4 row background colours for trees */
+.row1a { background-color: #F9F9F9; }
+.row1b { background-color: #F6F6F6; }
+.row2a { background-color: #E7EEF4; }
+.row2b { background-color: #E3EBF2; }
+
.spacer {
background-color: #DBDFE2;
height: 1px;
line-height: 1px;
}
+/* Deactivated row */
+.row-inactive {
+ color: #999;
+}
+.row-inactive a, .row-inactive strong {
+ color: #888;
+}
+.row-inactive a:hover {
+ color: #BC2A4D;
+}
+
+/* Specific tables */
+table.forums td.folder {
+ width: 27px;
+ text-align: center;
+}
+
+table td.actions {
+ vertical-align: middle;
+ width: 100px;
+ text-align: center;
+ white-space: nowrap;
+}
+
+table tr:first-child td.actions .up, table tr:last-child td.actions .down {
+ display: none;
+}
+
+table tr:first-child td.actions .up-disabled, table tr:last-child td.actions .down-disabled {
+ display: inline !important;
+}
+
+table.styles td.users, table td.mark {
+ text-align: center;
+}
+
+@media only screen and (max-width: 700px), only screen and (max-device-width: 700px)
+{
+ table.responsive, table.responsive tbody, table.responsive tr, table.responsive td {
+ display: block;
+ }
+
+ table.responsive thead, table.responsive th, table.responsive colgroup {
+ display: none;
+ }
+
+ table.responsive.show-header thead, table.responsive.show-header th:first-child, table.responsive caption {
+ display: block;
+ width: auto !important;
+ text-align: left !important;
+ margin: 0;
+ }
+
+ table.responsive {
+ background: transparent none;
+ border-width: 0;
+ padding: 0;
+ }
+
+ table.responsive caption {
+ padding: 3px 4px;
+ color: #FFFFFF;
+ background: #70AED3 url("../images/gradient2b.gif") bottom left repeat-x;
+ border-top: 1px solid #6DACD2;
+ border-bottom: 1px solid #327AA5;
+ text-align: left;
+ font-size: 0.75em;
+ font-weight: bold;
+ text-transform: uppercase;
+ }
+
+ table.responsive.show-header th:first-child span.rank-img, table.responsive.no-caption caption, table.responsive.no-header thead {
+ display: none;
+ }
+
+ table.responsive tr {
+ margin: 2px 0;
+ border: 1px solid #CCCFD3;
+ background-color: #FFFFFF;
+ padding: 1px 1px 0;
+ overflow: hidden;
+ }
+
+ table.responsive tr.row1 td { background-color: #F9F9F9; }
+ table.responsive tr.row2 td { background-color: #DCEBFE; }
+ table.responsive tr.row3 td { background-color: #DBDFE2; }
+ table.responsive tr.row4 td { background-color: #E4E8EB; }
+ table.responsive tr.col1 td { background-color: #DCEBFE; }
+ table.responsive tr.col2 td { background-color: #F9F9F9; }
+ table.responsive tr.row1a td { background-color: #F9F9F9; }
+ table.responsive tr.row1b td { background-color: #F6F6F6; }
+ table.responsive tr.row2a td { background-color: #E7EEF4; }
+ table.responsive tr.row2b td { background-color: #E3EBF2; }
+
+ table.responsive td {
+ width: auto !important;
+ text-align: left !important;
+ padding: 4px;
+ margin-bottom: 1px;
+ }
+
+ table.responsive td.empty {
+ display: none !important;
+ }
+
+ table.responsive td > dfn {
+ display: inline-block !important;
+ }
+
+ table.responsive td > dfn:after {
+ content: ':';
+ padding-right: 5px;
+ }
+
+ table.responsive.two-columns td {
+ width: 50% !important;
+ float: left;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
+ }
+
+ table.responsive.two-columns td:nth-child(2n+1) {
+ clear: left;
+ }
+
+ table.responsive span.rank-img {
+ float: none;
+ padding-right: 5px;
+ }
+
+ table.responsive#memberlist td:first-child input[type="checkbox"] {
+ float: right;
+ }
+
+ /* Specific tables */
+ table.responsive.forums td.folder {
+ float: left;
+ width: 27px;
+ background: transparent;
+ }
+ .rtl table.responsive.forums td.folder {
+ float: right;
+ }
+
+ table.responsive.forums td.forum-desc {
+ margin-left: 35px;
+ min-height: 27px;
+ background: transparent;
+ }
+
+ .rtl table.responsive.forums td.forum-desc {
+ margin-left: 0;
+ margin-right: 35px;
+ }
+
+ table.responsive td.actions {
+ clear: both;
+ text-align: right !important;
+ }
+
+ .rtl table.responsive td.actions {
+ text-align: left !important;
+ }
+
+ table.responsive.styles tr.responsive-style-row td:first-child {
+ padding-left: 4px !important;
+ padding-right: 4px !important;
+ }
+
+ table.responsive.styles td:first-child > dfn, table.responsive td.actions > dfn {
+ display: none !important;
+ }
+
+ .horizontal-palette td:nth-child(2n), .vertical-palette tr:nth-child(2n) {
+ display: none;
+ }
+
+ .colour-palette a {
+ display: inline-block !important;
+ }
+}
+
/* General form styles
----------------------------------------*/
fieldset {
@@ -643,6 +1064,7 @@ fieldset {
border-left: 1px solid #D7D7D7;
background-color: #FFFFFF;
position: relative;
+ border-radius: 3px;
}
.rtl fieldset {
@@ -652,10 +1074,6 @@ fieldset {
border-left: 1px solid #CCCCCC;
}
-* html fieldset {
- padding: 0 10px 5px 10px;
-}
-
fieldset p {
font-size: 0.85em;
}
@@ -674,23 +1092,10 @@ legend {
vertical-align: middle;
}
-* html legend {
- margin: 0 0 -10px -7px;
- line-height: 1em;
- font-size: .85em;
-}
-
-/* Holly hack, .rtl comes after html */
-* html .rtl legend {
- margin: 0;
- margin-right: -7px;
-}
-
input, textarea {
font-family: Verdana, Helvetica, Arial, sans-serif;
font-size: 0.90em;
font-weight: normal;
- cursor: text;
vertical-align: middle;
padding: 2px;
color: #111111;
@@ -852,6 +1257,22 @@ select#full_folder_action {
width: 95%;
}
+@media only screen and (max-width: 700px), only screen and (max-device-width: 700px)
+{
+ fieldset {
+ padding: 5px;
+ }
+
+ fieldset.quick, p.quick {
+ float: none !important;
+ text-align: center;
+ }
+
+ fieldset.display-options {
+ clear: both;
+ }
+}
+
/* Definition list layout for forms
Other general def. list properties defined in prosilver_main.css
---------------------------------------- */
@@ -938,6 +1359,10 @@ fieldset dt {
border-left: 1px solid #CCCCCC;
}
+fieldset #color_palette_placeholder {
+ padding-top: 0;
+}
+
fieldset dd {
margin: 0 0 0 45%;
padding: 0 0 0 5px;
@@ -983,6 +1408,55 @@ input:focus, textarea:focus {
outline-style: none;
}
+@media only screen and (max-width: 700px), only screen and (max-device-width: 700px)
+{
+ fieldset dl {
+ margin-bottom: 5px;
+ padding-bottom: 5px;
+ border-bottom: 1px solid #e8e8e8;
+ }
+
+ fieldset > dl:last-child, fieldset > form:last-child > dl:last-child {
+ border-bottom-width: 0;
+ margin-bottom: 0;
+ }
+
+ fieldset dt, .rtl fieldset dt, fieldset dd, .rtl fieldset dd {
+ border-width: 0;
+ margin-left: 0;
+ margin-right: 0;
+ float: none;
+ width: auto;
+ }
+
+ fieldset .responsive-columns dt {
+ float: left;
+ }
+
+ .ltr fieldset dd {
+ padding-left: 20px;
+ }
+
+ .rtl fieldset dd {
+ padding-right: 20px;
+ }
+
+ select, dd select, dd input {
+ max-width: 300px;
+ }
+
+ input[type="number"], dd input[type="number"] {
+ max-width: 70px;
+ }
+}
+
+@media only screen and (max-width: 400px), only screen and (max-device-width: 400px)
+{
+ select, dd select, dd input {
+ max-width: 240px;
+ }
+}
+
/* Submit button fieldset or paragraph
---------------------------------------- */
fieldset.submit-buttons {
@@ -1009,14 +1483,21 @@ fieldset.submit-buttons legend {
display: none;
}
+@media only screen and (max-width: 700px), only screen and (max-device-width: 700px)
+{
+ p.submit-buttons {
+ margin-top: 0;
+ }
+}
+
/* Input field styles
---------------------------------------- */
-input.radio, input.permissions-checkbox {
+input.radio, input.checkbox, input.permissions-checkbox {
width: auto !important;
background-color: transparent;
border: none;
- cursor: default;
+ cursor: pointer;
}
input.full,
@@ -1024,7 +1505,6 @@ textarea.full {
width: 99%;
}
-* html input.full, * html textarea.full { width: 95%;}
input.medium { width: 50%;}
input.narrow { width: 25%;}
input.tiny { width: 10%;}
@@ -1033,7 +1513,7 @@ input.autowidth { width: auto !important;}
/* Form button styles
---------------------------------------- */
-a.button1, input.button1, input.button3,
+a.button1, input.button1,
a.button2, input.button2 {
width: auto !important;
padding: 1px 3px 0 3px;
@@ -1076,10 +1556,110 @@ input.disabled {
}
/* Focus states */
-input.button1:focus, input.button2:focus, input.button3:focus {
+input.button1:focus, input.button2:focus {
outline-style: none;
}
+/* jQuery popups
+---------------------------------------- */
+.phpbb_alert {
+ background-color: #FFFFFF;
+ border: 1px solid #999999;
+ position: fixed;
+ display: none;
+ top: 150px;
+ left: 0;
+ right: 0;
+ width: 620px;
+ margin: 0 auto;
+ z-index: 50;
+ padding: 25px;
+ padding: 0 25px 20px 25px;
+ text-align: left;
+}
+
+.phpbb_alert .alert_close {
+ display: block;
+ float: right;
+ width: 16px;
+ height: 16px;
+ overflow: hidden;
+ text-decoration: none !important;
+ background: transparent url("../images/alert_close.png") 0 0 no-repeat;
+ margin-top: -7px;
+ margin-right: -31px;
+}
+.phpbb_alert .alert_close:hover {
+ background-position: 0 -16px;
+}
+
+
+.phpbb_alert p {
+ margin: 8px 0;
+ padding-bottom: 8px;
+}
+
+.phpbb_alert label {
+ display: block;
+ margin: 8px 0;
+ padding-bottom: 8px;
+}
+
+.phpbb_alert div.alert_text > p,
+.phpbb_alert div.alert_text > label,
+.phpbb_alert div.alert_text > select,
+.phpbb_alert div.alert_text > textarea,
+.phpbb_alert div.alert_text > input {
+ font-size: 0.9em;
+}
+
+#darkenwrapper {
+ display: none;
+ position: relative;
+ z-index: 44;
+}
+
+#darken {
+ position: fixed;
+ left: 0;
+ top: 0;
+ width: 100%;
+ height: 100%;
+ background-color: #000000;
+ opacity: 0.5;
+ z-index: 45;
+}
+
+@media only screen and (max-height: 500px), only screen and (max-device-width: 500px)
+{
+ .phpbb_alert {
+ top: 25px;
+ }
+}
+
+@media only screen and (max-width: 700px), only screen and (max-device-width: 700px)
+{
+ .phpbb_alert {
+ width: auto;
+ margin: 0 25px;
+ }
+}
+
+#loading_indicator {
+ background: #000000 url("../images/loading.gif") center center no-repeat;
+ border-radius: 5px;
+ display: none;
+ opacity: 0.8;
+ margin-top: -50px;
+ margin-left: -50px;
+ height: 50px;
+ width: 50px;
+ position: fixed;
+ left: 50%;
+ top: 50%;
+ z-index: 51;
+}
+
/* Pagination
---------------------------------------- */
.pagination {
@@ -1087,55 +1667,93 @@ input.button1:focus, input.button2:focus, input.button3:focus {
width: auto;
text-align: right;
margin-top: 5px;
- font-size: 0.85em;
- padding-bottom: 2px;
+ float: right;
}
.rtl .pagination {
text-align: left;
+ float: left;
}
-.pagination strong,
-.pagination b {
- font-weight: normal;
+li.pagination {
+ margin-top: 0;
}
-.pagination span.page-sep {
- display:none;
+.pagination img {
+ vertical-align: middle;
}
-.pagination span strong {
- padding: 0 2px;
- margin: 0 2px;
- font-weight: normal;
- font-size: 0.85em;
- color: #FFFFFF;
- background: #4692BF;
- border: 1px solid #4692BF;
+.pagination ul {
+ display: inline-block;
+ *display: inline; /* IE7 inline-block hack */
+ *zoom: 1;
+ margin-left: 0;
+ margin-bottom: 0;
+}
+
+li.pagination ul {
+ margin-top: -2px;
+ vertical-align: middle;
+}
+
+.pagination ul li, dl .pagination ul li, dl.icon .pagination ul li {
+ display: inline;
+ padding: 0;
+ font-size: 100%;
+ line-height: normal;
}
-.pagination span a, .pagination span a:link, .pagination span a:visited, .pagination span a:active {
+.pagination li a, .pagnation li span, li .pagination li a, li .pagnation li span, .pagination li.active span, .pagination li.ellipsis span {
font-weight: normal;
- font-size: 0.85em;
text-decoration: none;
- color: #5C758C;
- margin: 0 2px;
padding: 0 2px;
- background: #ECEDEE;
- border: 1px solid #B4BAC0;
+ border: 1px solid transparent;
+ font-size: 0.9em;
+ line-height: 1.5em;
}
-.pagination span a:hover {
- border-color: #368AD2;
- background: #368AD2;
+.pagination li a, .pagination li a:link, .pagination li a:visited {
+ color: #5C758C;
+ background-color: #ECEDEE;
+ border-color: #B4BAC0;
+}
+
+.pagination li.ellipsis span {
+ background-color: transparent;
+ color: #000000;
+}
+
+.pagination li.active span {
color: #FFFFFF;
- text-decoration: none;
+ background-color: #4692BF;
+ border-color: #4692BF;
}
-.pagination img {
- vertical-align: middle;
+.pagination li a:hover, .pagination .active a:hover {
+ color: #FFFFFF;
+ background-color: #368AD2;
+ border-color: #368AD2;
+}
+
+.pagination li a:active, .pagination li.active a:active {
+ color: #5C758C;
+ background-color: #ECEDEE;
+ border-color: #B4BAC0;
}
+@media only screen and (max-width: 700px), only screen and (max-device-width: 700px)
+{
+ .pagination, .rtl .pagination {
+ float: none;
+ text-align: center;
+ margin: 5px 0;
+ }
+
+ .pagination li a, .pagination li span {
+ display: inline-block;
+ min-width: 10px;
+ }
+}
/* Action Highlighting
---------------------------------------- */
@@ -1162,8 +1780,6 @@ input.button1:focus, input.button2:focus, input.button3:focus {
background-color: #BC2A4D;
}
-* html .errorbox, * html .successbox { height: 1%; } /* Pixel shift fix for IE */
-
.successbox h3, .errorbox h3 {
color: #FFFFFF;
margin: 0 0 0.5em;
@@ -1257,8 +1873,7 @@ input.button1:focus, input.button2:focus, input.button3:focus {
visibility: hidden;
}*/
-.clearfix, #tabs, .row, #content, fieldset dl, #page-body {
- height: 1%;
+.clearfix, .row, #content, fieldset dl, #page-body {
overflow: hidden;
}
@@ -1312,6 +1927,15 @@ input.button1:focus, input.button2:focus, input.button3:focus {
/* Permission interface
---------------------------------------- */
+.column1, .column2 {
+ width: 48%;
+ float: left;
+}
+
+.ltr .column2, .rtl .column1 {
+ float: right;
+}
+
fieldset.permissions legend {
text-transform: none;
}
@@ -1509,60 +2133,15 @@ fieldset.permissions .padding {
float: left;
background-color: #CADCEB;
width: 100%;
+ border-radius: 5px;
+ overflow: hidden;
+ padding: 5px 0;
}
.rtl .permissions-panel {
float: right;
}
-.permissions-panel span.corners-top {
- background-image: url("../images/corners_left2.gif");
-}
-
-.permissions-panel span.corners-top span {
- background-image: url("../images/corners_right2.gif");
-}
-
-.permissions-panel span.corners-bottom {
- background-image: url("../images/corners_left2.gif");
-}
-
-.permissions-panel span.corners-bottom span {
- background-image: url("../images/corners_right2.gif");
-}
-
-.permissions-panel span.corners-top, .permissions-panel span.corners-bottom,
-.permissions-panel span.corners-top span, .permissions-panel span.corners-bottom span {
- font-size: 1px;
- line-height: 1px;
- display: block;
- height: 5px;
- background-repeat: no-repeat;
-}
-
-.permissions-panel span.corners-top {
- background-image: url("../images/corners_left2.gif");
- background-position: 0 0;
- margin: 0 0;
-}
-
-.permissions-panel span.corners-top span {
- background-image: url("../images/corners_right2.gif");
- background-position: 100% 0;
-}
-
-.permissions-panel span.corners-bottom {
- background-image: url("../images/corners_left2.gif");
- background-position: 0 100%;
- margin: 0 0;
- clear: both;
-}
-
-.permissions-panel span.corners-bottom span {
- background-image: url("../images/corners_right2.gif");
- background-position: 100% 100%;
-}
-
/* Permission table
---------------------------------------- */
.permissions-panel .tablewrap {
@@ -1645,6 +2224,208 @@ fieldset.permissions .padding {
padding: 0;
}
+@media only screen and (max-width: 700px), only screen and (max-device-width: 700px)
+{
+ .column1, .column2 {
+ float: none !important;
+ width: auto;
+ }
+
+ .permissions-simple {
+ clear: both;
+ }
+
+ .permissions-simple td, .permissions-simple dd {
+ width: auto !important;
+ margin-left: 0 !important;
+ margin-right: 0 !important;
+ }
+
+ .permissions-simple dd {
+ margin-top: 5px;
+ }
+
+ .permissions-panel .tablewrap {
+ margin: 0 5px;
+ }
+
+ .permissions-category {
+ min-width: 0;
+ margin: 0 !important;
+ }
+
+ .permissions-category a, .permissions-category a span.tabbg {
+ display: block;
+ float: none !important;
+ background: transparent none;
+ }
+
+ .permissions-category a {
+ background: #d9e5ee;
+ margin: 5px 0;
+ padding: 0 !important;
+ border-radius: 3px;
+ text-decoration: underline;
+ }
+
+ .permissions-category .activetab a {
+ background-color: #dd6900;
+ color: #fff;
+ }
+
+ .permissions-category a span.tabbg {
+ color: inherit !important;
+ padding-top: 6px !important;
+ padding-bottom: 6px !important;
+ }
+
+ .permissions-category .activetab span.colour {
+ border-color: #fff;
+ }
+}
+
+/* Avatars gallery
+---------------------------------------- */
+#gallery {
+ display: block;
+ margin: 0 -5px;
+ padding: 0;
+ overflow: hidden;
+}
+
+#gallery li {
+ display: block;
+ float: left;
+ border: 1px solid #ccc;
+ border-radius: 2px;
+ background: #fff;
+ padding: 5px;
+ margin: 5px;
+}
+
+#gallery li:hover {
+ background-color: #eee;
+}
+
+#gallery li label {
+ display: block;
+ text-align: center;
+ padding: 0;
+}
+
+/* Dropdown menu
+----------------------------------------*/
+.dropdown {
+ position: absolute;
+ left: 0;
+ top: 22px;
+ z-index: 2;
+ border: 1px solid transparent;
+ border-radius: 5px;
+ padding: 9px 0 0;
+}
+
+.dropdown-up .dropdown {
+ top: auto;
+ bottom: 18px;
+ padding: 0 0 9px;
+}
+
+.dropdown-left .dropdown {
+ left: auto;
+ right: 0;
+}
+
+.dropdown .pointer, .dropdown .pointer-inner {
+ position: absolute;
+ width: 0;
+ height: 0;
+ border-top-width: 0;
+ border-bottom: 10px solid transparent;
+ border-left: 10px dashed transparent;
+ border-right: 10px dashed transparent;
+ -webkit-transform: rotate(360deg); /* better anti-aliasing in webkit */
+ display: block;
+}
+
+.dropdown-up .pointer, .dropdown-up .pointer-inner {
+ border-bottom-width: 0;
+ border-top: 10px solid transparent;
+}
+
+.dropdown .pointer {
+ right: auto;
+ left: 10px;
+ top: 0;
+ z-index: 3;
+}
+
+.dropdown-up .pointer {
+ bottom: 0;
+ top: auto;
+}
+
+.dropdown-left .dropdown .pointer {
+ left: auto;
+ right: 10px;
+}
+
+.dropdown .pointer-inner {
+ top: auto;
+ bottom: -11px;
+ left: -10px;
+}
+
+.dropdown-up .pointer-inner {
+ bottom: auto;
+ top: -11px;
+}
+
+.dropdown .pointer {
+ border-color: #B9B9B9 transparent;
+}
+
+.dropdown .pointer-inner {
+ border-color: #FFF transparent;
+}
+
+.dropdown .dropdown-contents {
+ z-index: 2;
+ overflow: hidden;
+ overflow-y: auto;
+ background: #fff;
+ border: 1px solid #b9b9b9;
+ border-radius: 5px;
+ padding: 5px;
+ position: relative;
+ min-width: 40px;
+ max-height: 200px;
+ box-shadow: 1px 3px 5px rgba(0, 0, 0, 0.2);
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
+}
+
+.dropdown-up .dropdown-contents {
+ box-shadow: 1px 0 5px rgba(0, 0, 0, 0.2);
+}
+
+.dropdown li {
+ float: none;
+ margin: 0;
+ white-space: nowrap;
+ text-align: left;
+}
+
+.wrap .dropdown li, .dropdown.wrap li {
+ white-space: normal;
+}
+
+.dropdown li:before, .dropdown li:after {
+ display: none !important;
+}
+
+
/* Classes for additional tasks
---------------------------------------- */
@@ -1657,3 +2438,21 @@ fieldset.permissions .padding {
.phpinfo td, .phpinfo th, .phpinfo h2, .phpinfo h1 {
text-align: left;
}
+
+.requirements_not_met {
+ padding: 5px;
+ background-color: #BC2A4D;
+}
+
+.requirements_not_met dt label, .requirements_not_met dd p {
+ color: #FFFFFF;
+ font-size: 1.4em;
+}
+
+@media only screen and (max-width: 700px), only screen and (max-device-width: 700px)
+{
+ .responsive-hide { display: none !important; }
+ .responsive-show { display: block !important; }
+ .responsive-show-inline { display: inline !important; }
+ .responsive-show-inline-block { display: inline-block !important; }
+}
diff --git a/phpBB/adm/style/admin.js b/phpBB/adm/style/admin.js
new file mode 100644
index 0000000000..dd46124f97
--- /dev/null
+++ b/phpBB/adm/style/admin.js
@@ -0,0 +1,246 @@
+/**
+* phpBB3 ACP functions
+*/
+
+/**
+* Parse document block
+*/
+function parse_document(container)
+{
+ var test = document.createElement('div'),
+ oldBrowser = (typeof test.style.borderRadius == 'undefined');
+
+ delete test;
+
+ /**
+ * Navigation
+ */
+ container.find('#menu').each(function() {
+ var menu = $(this),
+ blocks = menu.children('.menu-block');
+
+ if (!blocks.length) {
+ return;
+ }
+
+ // Set onclick event
+ blocks.children('a.header').click(function() {
+ var parent = $(this).parent();
+ if (!parent.hasClass('active')) {
+ parent.siblings().removeClass('active');
+ }
+ parent.toggleClass('active');
+ });
+
+ // Set active menu
+ menu.find('#activemenu').parents('.menu-block').addClass('active');
+
+ // Check if there is active menu
+ if (!blocks.filter('.active').length) {
+ blocks.filter(':first').addClass('active');
+ }
+ });
+
+ /**
+ * Responsive tables
+ */
+ container.find('table').not('.not-responsive').each(function() {
+ var $this = $(this),
+ th = $this.find('thead > tr > th'),
+ columns = th.length,
+ headers = [],
+ totalHeaders = 0,
+ i, headersLength;
+
+ // Find columns
+ $this.find('colgroup:first').children().each(function(i) {
+ var column = $(this);
+ $this.find('td:nth-child(' + (i + 1) + ')').addClass(column.prop('className'));
+ });
+
+ // Styles table
+ if ($this.hasClass('styles')) {
+ $this.find('td:first-child[style]').each(function() {
+ var style = $(this).attr('style');
+ if (style.length) {
+ $(this).parent('tr').attr('style', style.toLowerCase().replace('padding', 'margin')).addClass('responsive-style-row');
+ }
+ });
+ }
+
+ // Find each header
+ if (!$this.data('no-responsive-header'))
+ {
+ th.each(function(column) {
+ var cell = $(this),
+ colspan = parseInt(cell.attr('colspan')),
+ dfn = cell.attr('data-dfn'),
+ text = dfn ? dfn : cell.text().trim();
+
+ if (text == '&nbsp;') text = '';
+ colspan = isNaN(colspan) || colspan < 1 ? 1 : colspan;
+
+ for (i=0; i<colspan; i++) {
+ headers.push(text);
+ }
+ totalHeaders ++;
+
+ if (dfn && !column) {
+ $this.addClass('show-header');
+ }
+ });
+ }
+
+ headersLength = headers.length;
+
+ // Add header text to each cell as <dfn>
+ $this.addClass('responsive');
+
+ if (totalHeaders < 2) {
+ $this.addClass('show-header');
+ return;
+ }
+
+ $this.find('tbody > tr').each(function() {
+ var row = $(this),
+ cells = row.children('td'),
+ column = 0;
+
+ if (cells.length == 1) {
+ row.addClass('big-column');
+ return;
+ }
+
+ cells.each(function() {
+ var cell = $(this),
+ colspan = parseInt(cell.attr('colspan')),
+ text = cell.text().trim();
+
+ if (headersLength <= column) {
+ return;
+ }
+
+ if ((text.length && text !== '-') || cell.children().length) {
+ if (headers[column] != '') {
+ cell.prepend('<dfn style="display: none;">' + headers[column] + '</dfn>');
+ }
+ }
+ else {
+ cell.addClass('empty');
+ }
+
+ colspan = isNaN(colspan) || colspan < 1 ? 1 : colspan;
+ column += colspan;
+ });
+ });
+
+ // Remove <dfn> in disabled extensions list
+ $this.find('tr.ext_disabled > .empty:nth-child(2) + .empty').siblings(':first-child').children('dfn').remove();
+ });
+
+ /**
+ * Hide empty responsive tables
+ */
+ container.find('table.responsive > tbody').each(function() {
+ var items = $(this).children('tr');
+ if (items.length == 0)
+ {
+ $(this).parent('table:first').addClass('responsive-hide');
+ }
+ });
+
+ /**
+ * Fieldsets with empty <span>
+ */
+ container.find('fieldset dt > span:last-child').each(function() {
+ var $this = $(this);
+ if ($this.html() == '&nbsp;') {
+ $this.addClass('responsive-hide');
+ }
+
+ });
+
+ /**
+ * Responsive tabs
+ */
+ container.find('#tabs').not('[data-skip-responsive]').each(function() {
+ var $this = $(this),
+ $body = $('body'),
+ ul = $this.children(),
+ tabs = ul.children().not('[data-skip-responsive]'),
+ links = tabs.children('a'),
+ item = ul.append('<li class="responsive-tab" style="display:none;"><a href="javascript:void(0);" class="responsive-tab-link"><span>&nbsp;</span></a><div class="dropdown tab-dropdown" style="display: none;"><div class="pointer"><div class="pointer-inner" /></div><ul class="dropdown-contents" /></div></li>').find('li.responsive-tab'),
+ menu = item.find('.dropdown-contents'),
+ maxHeight = 0,
+ lastWidth = false,
+ responsive = false;
+
+ links.each(function() {
+ var link = $(this);
+ maxHeight = Math.max(maxHeight, Math.max(link.outerHeight(true), link.parent().outerHeight(true)));
+ })
+
+ function check() {
+ var width = $body.width(),
+ height = $this.height();
+
+ if (arguments.length == 0 && (!responsive || width <= lastWidth) && height <= maxHeight) {
+ return;
+ }
+
+ tabs.show();
+ item.hide();
+
+ lastWidth = width;
+ height = $this.height();
+ if (height <= maxHeight) {
+ responsive = false;
+ if (item.hasClass('dropdown-visible')) {
+ phpbb.toggleDropdown.call(item.find('a.responsive-tab-link').get(0));
+ }
+ return;
+ }
+
+ responsive = true;
+ item.show();
+ menu.html('');
+
+ var availableTabs = tabs.filter(':not(.activetab, .responsive-tab)'),
+ total = availableTabs.length,
+ i, tab;
+
+ for (i = total - 1; i >= 0; i --) {
+ tab = availableTabs.eq(i);
+ menu.prepend(tab.clone(true));
+ tab.hide();
+ if ($this.height() <= maxHeight) {
+ menu.find('a').click(function() { check(true); });
+ return;
+ }
+ }
+ menu.find('a').click(function() { check(true); });
+ }
+
+ phpbb.registerDropdown(item.find('a.responsive-tab-link'), item.find('.dropdown'), {visibleClass: 'activetab', verticalDirection: 'down'});
+
+ check(true);
+ $(window).resize(check);
+ });
+}
+
+/**
+* Run onload functions
+*/
+(function($) {
+ $(document).ready(function() {
+ // Swap .nojs and .hasjs
+ $('body.nojs').toggleClass('nojs hasjs');
+
+ // Focus forms
+ $('form[data-focus]:first').each(function() {
+ $('#' + this.getAttribute('data-focus')).focus();
+ });
+
+ parse_document($('body'));
+ });
+})(jQuery);
diff --git a/phpBB/adm/style/ajax.js b/phpBB/adm/style/ajax.js
new file mode 100644
index 0000000000..959580d6c2
--- /dev/null
+++ b/phpBB/adm/style/ajax.js
@@ -0,0 +1,90 @@
+(function($) { // Avoid conflicts with other libraries
+
+"use strict";
+
+/**
+ * The following callbacks are for reording items. row_down
+ * is triggered when an item is moved down, and row_up is triggered when
+ * an item is moved up. It moves the row up or down, and deactivates /
+ * activates any up / down icons that require it (the ones at the top or bottom).
+ */
+phpbb.addAjaxCallback('row_down', function(res) {
+ if (typeof res.success === 'undefined' || !res.success) {
+ return;
+ }
+
+ var el = $(this),
+ tr = el.parents('tr'),
+ trSwap = tr.next();
+
+ tr.insertAfter(trSwap);
+});
+
+phpbb.addAjaxCallback('row_up', function(res) {
+ if (typeof res.success === 'undefined' || !res.success) {
+ return;
+ }
+
+ var el = $(this),
+ tr = el.parents('tr'),
+ trSwap = tr.prev();
+
+ tr.insertBefore(trSwap);
+});
+
+/**
+ * This callback replaces activate links with deactivate links and vice versa.
+ * It does this by replacing the text, and replacing all instances of "activate"
+ * in the href with "deactivate", and vice versa.
+ */
+phpbb.addAjaxCallback('activate_deactivate', function(res) {
+ var el = $(this),
+ newHref = el.attr('href');
+
+ el.text(res.text);
+
+ if (newHref.indexOf('deactivate') !== -1) {
+ newHref = newHref.replace('deactivate', 'activate');
+ } else {
+ newHref = newHref.replace('activate', 'deactivate');
+ }
+
+ el.attr('href', newHref);
+});
+
+/**
+ * The removes the parent row of the link or form that triggered the callback,
+ * and is good for stuff like the removal of forums.
+ */
+phpbb.addAjaxCallback('row_delete', function(res) {
+ if (res.SUCCESS !== false) {
+ $(this).parents('tr').remove();
+ }
+});
+
+
+
+$('[data-ajax]').each(function() {
+ var $this = $(this),
+ ajax = $this.attr('data-ajax'),
+ fn;
+
+ if (ajax !== 'false') {
+ fn = (ajax !== 'true') ? ajax : null;
+ phpbb.ajaxify({
+ selector: this,
+ refresh: $this.attr('data-refresh') !== undefined,
+ callback: fn
+ });
+ }
+});
+
+/**
+* Automatically resize textarea
+*/
+$(document).ready(function() {
+ phpbb.resizeTextArea($('textarea:not(.no-auto-resize)'), {minHeight: 75});
+});
+
+
+})(jQuery); // Avoid conflicts with other libraries
diff --git a/phpBB/adm/style/auth_provider_ldap.html b/phpBB/adm/style/auth_provider_ldap.html
new file mode 100644
index 0000000000..81afa44373
--- /dev/null
+++ b/phpBB/adm/style/auth_provider_ldap.html
@@ -0,0 +1,32 @@
+<dl>
+ <dt><label for="ldap_server">{L_LDAP_SERVER}{L_COLON}</label><br /><span>{L_LDAP_SERVER_EXPLAIN}</span></dt>
+ <dd><input type="text" id="ldap_server" size="40" name="config[ldap_server]" value="{AUTH_LDAP_SERVER}" /></dd>
+</dl>
+<dl>
+ <dt><label for="ldap_port">{L_LDAP_PORT}{L_COLON}</label><br /><span>{L_LDAP_PORT_EXPLAIN}</span></dt>
+ <dd><input type="text" id="ldap_port" size="40" name="config[ldap_port]" value="{AUTH_LDAP_PORT}" /></dd>
+</dl>
+<dl>
+ <dt><label for="ldap_dn">{L_LDAP_DN}{L_COLON}</label><br /><span>{L_LDAP_DN_EXPLAIN}</span></dt>
+ <dd><input type="text" id="ldap_dn" size="40" name="config[ldap_base_dn]" value="{AUTH_LDAP_BASE_DN}" /></dd>
+</dl>
+<dl>
+ <dt><label for="ldap_uid">{L_LDAP_UID}{L_COLON}</label><br /><span>{L_LDAP_UID_EXPLAIN}</span></dt>
+ <dd><input type="text" id="ldap_uid" size="40" name="config[ldap_uid]" value="{AUTH_LDAP_UID}" /></dd>
+</dl>
+<dl>
+ <dt><label for="ldap_user_filter">{L_LDAP_USER_FILTER}{L_COLON}</label><br /><span>{L_LDAP_USER_FILTER_EXPLAIN}</span></dt>
+ <dd><input type="text" id="ldap_user_filter" size="40" name="config[ldap_user_filter]" value="{AUTH_LDAP_USER_FILTER}" /></dd>
+</dl>
+<dl>
+ <dt><label for="ldap_email">{L_LDAP_EMAIL}{L_COLON}</label><br /><span>{L_LDAP_EMAIL_EXPLAIN}</span></dt>
+ <dd><input type="email" id="ldap_email" size="40" name="config[ldap_email]" value="{AUTH_LDAP_EMAIL}" /></dd>
+</dl>
+<dl>
+ <dt><label for="ldap_user">{L_LDAP_USER}{L_COLON}</label><br /><span>{L_LDAP_USER_EXPLAIN}</span></dt>
+ <dd><input type="text" id="ldap_user" size="40" name="config[ldap_user]" value="{AUTH_LDAP_USER}" /></dd>
+</dl>
+<dl>
+ <dt><label for="ldap_password">{L_LDAP_PASSWORD}{L_COLON}</label><br /><span>{L_LDAP_PASSWORD_EXPLAIN}</span></dt>
+ <dd><input type="password" id="ldap_password" size="40" name="config[ldap_password]" value="{AUTH_LDAP_PASSWORD}" autocomplete="off" /></dd>
+</dl>
diff --git a/phpBB/adm/style/auth_provider_oauth.html b/phpBB/adm/style/auth_provider_oauth.html
new file mode 100644
index 0000000000..25e40ff596
--- /dev/null
+++ b/phpBB/adm/style/auth_provider_oauth.html
@@ -0,0 +1,17 @@
+<h2>{L_AUTH_PROVIDER_OAUTH_TITLE}</h2>
+
+<p>{L_AUTH_PROVIDER_OAUTH_EXPLAIN}</p>
+
+<!-- BEGIN oauth_services -->
+<fieldset>
+ <legend>{oauth_services.ACTUAL_NAME}</legend>
+ <dl>
+ <dt><label for="oauth_service_{oauth_services.NAME}_key">{L_AUTH_PROVIDER_OAUTH_KEY}{L_COLON}</label></dt>
+ <dd><input type="text" id="oauth_service_{oauth_services.NAME}_key" size="40" name="config[auth_oauth_{oauth_services.NAME}_key]" value="{oauth_services.KEY}" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="oauth_service_{oauth_services.NAME}_secret">{L_AUTH_PROVIDER_OAUTH_SECRET}{L_COLON}</label></dt>
+ <dd><input type="text" id="oauth_service_{oauth_services.NAME}_secret" size="40" name="config[auth_oauth_{oauth_services.NAME}_secret]" value="{oauth_services.SECRET}" /></dd>
+ </dl>
+</fieldset>
+<!-- END oauth_services -->
diff --git a/phpBB/adm/style/avatars.js b/phpBB/adm/style/avatars.js
new file mode 100644
index 0000000000..26ea24c0db
--- /dev/null
+++ b/phpBB/adm/style/avatars.js
@@ -0,0 +1,15 @@
+(function($) { // Avoid conflicts with other libraries
+
+"use strict";
+
+function avatarHide() {
+ $('#avatar_options > div').hide();
+
+ var selected = $('#avatar_driver').val();
+ $('#avatar_option_' + selected).show();
+}
+
+avatarHide();
+$('#avatar_driver').bind('change', avatarHide);
+
+})(jQuery); // Avoid conflicts with other libraries
diff --git a/phpBB/adm/style/captcha_default_acp_demo.html b/phpBB/adm/style/captcha_default_acp_demo.html
index 0b1434f7e0..0f137f28df 100644
--- a/phpBB/adm/style/captcha_default_acp_demo.html
+++ b/phpBB/adm/style/captcha_default_acp_demo.html
@@ -1,4 +1,4 @@
<dl>
- <dt><label for="captcha_preview">{L_PREVIEW}:</label><br /><span>{L_CAPTCHA_PREVIEW_EXPLAIN}</span></dt>
+ <dt><label for="captcha_preview">{L_PREVIEW}{L_COLON}</label><br /><span>{L_CAPTCHA_PREVIEW_EXPLAIN}</span></dt>
<dd><img src="{CONFIRM_IMAGE}" alt="{L_PREVIEW}" width="360" height="96" id="captcha_preview" /></dd>
</dl>
diff --git a/phpBB/adm/style/captcha_gd_acp.html b/phpBB/adm/style/captcha_gd_acp.html
index d0bb758cfe..43d54adc0b 100644
--- a/phpBB/adm/style/captcha_gd_acp.html
+++ b/phpBB/adm/style/captcha_gd_acp.html
@@ -1,6 +1,6 @@
<!-- INCLUDE overall_header.html -->
-<a name="maincontent"></a>
+<a id="maincontent"></a>
<a href="{U_ACTION}" style="float: {S_CONTENT_FLOW_END};">&laquo; {L_BACK}</a>
<h1>{L_ACP_VC_SETTINGS}</h1>
@@ -14,32 +14,32 @@
<legend>{L_GENERAL_OPTIONS}</legend>
<dl>
- <dt><label for="captcha_gd_foreground_noise">{L_CAPTCHA_GD_FOREGROUND_NOISE}:</label><br /><span>{L_CAPTCHA_GD_FOREGROUND_NOISE_EXPLAIN}</span></dt>
+ <dt><label for="captcha_gd_foreground_noise">{L_CAPTCHA_GD_FOREGROUND_NOISE}{L_COLON}</label><br /><span>{L_CAPTCHA_GD_FOREGROUND_NOISE_EXPLAIN}</span></dt>
<dd><label><input id="captcha_gd_foreground_noise" name="captcha_gd_foreground_noise" value="1" class="radio" type="radio"<!-- IF CAPTCHA_GD_FOREGROUND_NOISE --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label><input name="captcha_gd_foreground_noise" value="0" class="radio" type="radio"<!-- IF not CAPTCHA_GD_FOREGROUND_NOISE --> checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
</dl>
<dl>
- <dt><label for="captcha_gd_x_grid">{L_CAPTCHA_GD_X_GRID}:</label><br /><span>{L_CAPTCHA_GD_X_GRID_EXPLAIN}</span></dt>
- <dd><input id="captcha_gd_x_grid" name="captcha_gd_x_grid" value="{CAPTCHA_GD_X_GRID}" type="text" /></dd>
+ <dt><label for="captcha_gd_x_grid">{L_CAPTCHA_GD_X_GRID}{L_COLON}</label><br /><span>{L_CAPTCHA_GD_X_GRID_EXPLAIN}</span></dt>
+ <dd><input id="captcha_gd_x_grid" name="captcha_gd_x_grid" value="{CAPTCHA_GD_X_GRID}" type="number" /></dd>
</dl>
<dl>
- <dt><label for="captcha_gd_y_grid">{L_CAPTCHA_GD_Y_GRID}:</label><br /><span>{L_CAPTCHA_GD_Y_GRID_EXPLAIN}</span></dt>
- <dd><input id="captcha_gd_y_grid" name="captcha_gd_y_grid" value="{CAPTCHA_GD_Y_GRID}" type="text" /></dd>
+ <dt><label for="captcha_gd_y_grid">{L_CAPTCHA_GD_Y_GRID}{L_COLON}</label><br /><span>{L_CAPTCHA_GD_Y_GRID_EXPLAIN}</span></dt>
+ <dd><input id="captcha_gd_y_grid" name="captcha_gd_y_grid" value="{CAPTCHA_GD_Y_GRID}" type="number" /></dd>
</dl>
<dl>
- <dt><label for="captcha_gd_wave">{L_CAPTCHA_GD_WAVE}:</label><br /><span>{L_CAPTCHA_GD_WAVE_EXPLAIN}</span></dt>
+ <dt><label for="captcha_gd_wave">{L_CAPTCHA_GD_WAVE}{L_COLON}</label><br /><span>{L_CAPTCHA_GD_WAVE_EXPLAIN}</span></dt>
<dd><label><input id="captcha_gd_wave" name="captcha_gd_wave" value="1" class="radio" type="radio"<!-- IF CAPTCHA_GD_WAVE --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label><input name="captcha_gd_wave" value="0" class="radio" type="radio"<!-- IF not CAPTCHA_GD_WAVE --> checked="checked"<!-- ENDIF --> /> {L_NO}</label>
</dd>
</dl>
<dl>
- <dt><label for="captcha_gd_3d_noise">{L_CAPTCHA_GD_3D_NOISE}:</label><br /><span>{L_CAPTCHA_GD_3D_NOISE_EXPLAIN}</span></dt>
+ <dt><label for="captcha_gd_3d_noise">{L_CAPTCHA_GD_3D_NOISE}{L_COLON}</label><br /><span>{L_CAPTCHA_GD_3D_NOISE_EXPLAIN}</span></dt>
<dd><label><input id="captcha_gd_3d_noise" name="captcha_gd_3d_noise" value="1" class="radio" type="radio"<!-- IF CAPTCHA_GD_3D_NOISE --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label><input name="captcha_gd_3d_noise" value="0" class="radio" type="radio"<!-- IF not CAPTCHA_GD_3D_NOISE --> checked="checked"<!-- ENDIF --> /> {L_NO}</label>
</dd>
</dl>
<dl>
- <dt><label for="captcha_gd_fonts">{L_CAPTCHA_GD_FONTS}:</label><br /><span>{L_CAPTCHA_GD_FONTS_EXPLAIN}</span></dt>
+ <dt><label for="captcha_gd_fonts">{L_CAPTCHA_GD_FONTS}{L_COLON}</label><br /><span>{L_CAPTCHA_GD_FONTS_EXPLAIN}</span></dt>
<dd><label><input id="captcha_gd_fonts" name="captcha_gd_fonts" value="1" class="radio" type="radio"<!-- IF CAPTCHA_GD_FONTS == 1 --> checked="checked"<!-- ENDIF --> /> {L_CAPTCHA_FONT_DEFAULT}</label>
<label><input name="captcha_gd_fonts" value="2" class="radio" type="radio"<!-- IF CAPTCHA_GD_FONTS == 2 --> checked="checked"<!-- ENDIF --> /> {L_CAPTCHA_FONT_NEW}</label>
<label><input name="captcha_gd_fonts" value="3" class="radio" type="radio"<!-- IF CAPTCHA_GD_FONTS == 3 --> checked="checked"<!-- ENDIF --> /> {L_CAPTCHA_FONT_LOWER}</label>
diff --git a/phpBB/adm/style/captcha_qa_acp.html b/phpBB/adm/style/captcha_qa_acp.html
index e0fc6fc67e..6235f9a104 100644
--- a/phpBB/adm/style/captcha_qa_acp.html
+++ b/phpBB/adm/style/captcha_qa_acp.html
@@ -1,6 +1,6 @@
<!-- INCLUDE overall_header.html -->
-<a name="maincontent"></a>
+<a id="maincontent"></a>
<a href="<!-- IF U_LIST -->{U_LIST}<!-- ELSE -->{U_ACTION}<!-- ENDIF -->" style="float: {S_CONTENT_FLOW_END};">&laquo; {L_BACK}</a>
@@ -14,7 +14,7 @@
<fieldset class="tabulated">
<legend>{L_QUESTIONS}</legend>
- <table cellspacing="1">
+ <table class="table1 zebra-table">
<thead>
<tr>
<th colspan="3">{L_QUESTIONS}</th>
@@ -27,14 +27,12 @@
</thead>
<tbody>
<!-- BEGIN questions -->
-
- <!-- IF questions.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
-
+ <tr>
<td style="text-align: left;">{questions.QUESTION_TEXT}</td>
<td style="text-align: center;">{questions.QUESTION_LANG}</td>
<td style="text-align: center;"><a href="{questions.U_EDIT}">{ICON_EDIT}</a>&nbsp;<a href="{questions.U_DELETE}">{ICON_DELETE}</a></td>
- </tr>
- <!-- END questions -->
+ </tr>
+ <!-- END questions -->
</tbody>
</table>
<fieldset class="quick">
@@ -59,7 +57,7 @@
<fieldset>
<legend>{L_EDIT_QUESTION}</legend>
<dl>
- <dt><label for="strict">{L_QUESTION_STRICT}:</label><br /><span>{L_QUESTION_STRICT_EXPLAIN}</span></dt>
+ <dt><label for="strict">{L_QUESTION_STRICT}{L_COLON}</label><br /><span>{L_QUESTION_STRICT_EXPLAIN}</span></dt>
<dd><label><input type="radio" class="radio" name="strict" value="1"<!-- IF STRICT --> id="strict" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label><input type="radio" class="radio" name="strict" value="0"<!-- IF not STRICT --> id="strict" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
</dl>
diff --git a/phpBB/adm/style/captcha_qa_acp_demo.html b/phpBB/adm/style/captcha_qa_acp_demo.html
index 0ea2d6a024..79170e27c6 100644
--- a/phpBB/adm/style/captcha_qa_acp_demo.html
+++ b/phpBB/adm/style/captcha_qa_acp_demo.html
@@ -1,5 +1,5 @@
<dl>
- <dt><label for="answer"><!-- IF QA_CONFIRM_QUESTION --> {QA_CONFIRM_QUESTION} <!-- ELSE --> {L_CONFIRM_QUESTION} <!-- ENDIF -->:</label><br /><span>{L_CONFIRM_QUESTION_EXPLAIN}</span></dt>
+ <dt><label for="answer"><!-- IF QA_CONFIRM_QUESTION --> {QA_CONFIRM_QUESTION} <!-- ELSE --> {L_CONFIRM_QUESTION} <!-- ENDIF -->{L_COLON}</label><br /><span>{L_CONFIRM_QUESTION_EXPLAIN}</span></dt>
<dd>
<input type="text" tabindex="10" name="answer" id="answer" size="45" class="inputbox autowidth" title="{L_ANSWER}" />
diff --git a/phpBB/adm/style/captcha_recaptcha_acp.html b/phpBB/adm/style/captcha_recaptcha_acp.html
index 5b97cff984..67176ebd07 100644
--- a/phpBB/adm/style/captcha_recaptcha_acp.html
+++ b/phpBB/adm/style/captcha_recaptcha_acp.html
@@ -1,6 +1,6 @@
<!-- INCLUDE overall_header.html -->
-<a name="maincontent"></a>
+<a id="maincontent"></a>
<h1>{L_ACP_VC_SETTINGS}</h1>
@@ -13,11 +13,11 @@
<legend>{L_GENERAL_OPTIONS}</legend>
<dl>
- <dt><label for="recaptcha_pubkey">{L_RECAPTCHA_PUBLIC}:</label><br /><span>{L_RECAPTCHA_PUBLIC_EXPLAIN}</span></dt>
+ <dt><label for="recaptcha_pubkey">{L_RECAPTCHA_PUBLIC}{L_COLON}</label><br /><span>{L_RECAPTCHA_PUBLIC_EXPLAIN}</span></dt>
<dd><input id="recaptcha_pubkey" name="recaptcha_pubkey" value="{RECAPTCHA_PUBKEY}" size="50" type="text" /></dd>
</dl>
<dl>
- <dt><label for="recaptcha_privkey">{L_RECAPTCHA_PRIVATE}:</label><br /><span>{L_RECAPTCHA_PRIVATE_EXPLAIN}</span></dt>
+ <dt><label for="recaptcha_privkey">{L_RECAPTCHA_PRIVATE}{L_COLON}</label><br /><span>{L_RECAPTCHA_PRIVATE_EXPLAIN}</span></dt>
<dd><input id="recaptcha_privkey" name="recaptcha_privkey" value="{RECAPTCHA_PRIVKEY}" size="50" type="text" /></dd>
</dl>
diff --git a/phpBB/adm/style/colour_swatch.html b/phpBB/adm/style/colour_swatch.html
deleted file mode 100644
index c9e89980d8..0000000000
--- a/phpBB/adm/style/colour_swatch.html
+++ /dev/null
@@ -1,78 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}" xml:lang="{S_USER_LANG}">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset={S_CONTENT_ENCODING}" />
-<meta http-equiv="Content-Style-Type" content="text/css" />
-<meta http-equiv="Content-Language" content="{S_USER_LANG}" />
-<meta http-equiv="imagetoolbar" content="no" />
-<title>{L_COLOUR_SWATCH}</title>
-
-<style type="text/css">
-/* <![CDATA[ */
- body {
- background-color: #404040;
- color: #fff;
- }
-
- td {
- border: solid 1px #333;
- }
-
- .over {
- border-color: white;
- }
-
- .out {
- border-color: #333333;
- }
-
- img {
- border: 0;
- }
-/* ]]> */
-</style>
-</head>
-
-<body>
-
-<script type="text/javascript">
-// <![CDATA[
- var r = 0, g = 0, b = 0;
-
- var numberList = new Array(6);
- numberList[0] = '00';
- numberList[1] = '33';
- numberList[2] = '66';
- numberList[3] = '99';
- numberList[4] = 'CC';
- numberList[5] = 'FF';
-
- document.writeln('<table cellspacing="0" cellpadding="0" border="0">');
-
- for (r = 0; r < 6; r++)
- {
- document.writeln('<tr>');
-
- for (g = 0; g < 6; g++)
- {
- for (b = 0; b < 6; b++)
- {
- color = String(numberList[r]) + String(numberList[g]) + String(numberList[b]);
- document.write('<td style="background-color: #' + color + ';" onmouseover="this.className=\'over\'" onmouseout="this.className=\'out\'">');
- document.write('<a href="#" onclick="cell(\'' + color + '\'); return false;"><img src="{T_IMAGES_PATH}spacer.gif" width="15" height="12" alt="#' + color + '" title="#' + color + '" \/><\/a>');
- document.writeln('<\/td>');
- }
- }
- document.writeln('<\/tr>');
- }
- document.writeln('<\/table>');
-
- function cell(color)
- {
- opener.document.forms["{OPENER}"].{NAME}.value = color;
- }
-// ]]>
-</script>
-
-</body>
-</html> \ No newline at end of file
diff --git a/phpBB/adm/style/confirm_body.html b/phpBB/adm/style/confirm_body.html
index 2fbb1a60d7..d0360d1b3a 100644
--- a/phpBB/adm/style/confirm_body.html
+++ b/phpBB/adm/style/confirm_body.html
@@ -1,3 +1,15 @@
+<!-- IF S_AJAX_REQUEST -->
+
+ <h3>{MESSAGE_TITLE}</h3>
+ <p>{MESSAGE_TEXT}</p>
+
+ <fieldset class="submit-buttons">
+ <input type="button" name="confirm" value="{L_YES}" class="button2" />&nbsp;
+ <input type="button" name="cancel" value="{L_NO}" class="button2" />
+ </fieldset>
+
+<!-- ELSE -->
+
<!-- INCLUDE overall_header.html -->
<form id="confirm" method="post" action="{S_CONFIRM_ACTION}">
@@ -14,7 +26,7 @@
</div>
</fieldset>
-
</form>
<!-- INCLUDE overall_footer.html -->
+<!-- ENDIF -->
diff --git a/phpBB/adm/style/confirm_body_prune.html b/phpBB/adm/style/confirm_body_prune.html
index 9481386231..4c00ac2c3d 100644
--- a/phpBB/adm/style/confirm_body_prune.html
+++ b/phpBB/adm/style/confirm_body_prune.html
@@ -2,6 +2,23 @@
<form id="confirm" method="post" action="{S_CONFIRM_ACTION}">
+<fieldset id="userlist">
+ <h2>{L_PRUNE_USERS_LIST}</h2>
+ <!-- IF S_DEACTIVATE --><p>{L_PRUNE_USERS_LIST_DEACTIVATE}</p><!-- ELSE --><p>{L_PRUNE_USERS_LIST_DELETE}</p><!-- ENDIF -->
+
+ <br />
+ <!-- BEGIN users -->
+ &raquo; <input type="checkbox" name="user_ids[]" value="{users.USER_ID}" checked="checked" />
+ <a href="{users.U_PROFILE}">{users.USERNAME}</a>
+ <!-- IF users.U_USER_ADMIN --> [ <a href="{users.U_USER_ADMIN}">{L_USER_ADMIN}</a> ]<!-- ENDIF --><br />
+ <!-- END users -->
+ <br />
+ <span class="small">
+ <a href="#" onclick="marklist('userlist', 'user_ids', true)">{L_MARK_ALL}</a> &bull;
+ <a href="#" onclick="marklist('userlist', 'user_ids', false)">{L_UNMARK_ALL}</a>
+ </span>
+</fieldset>
+
<fieldset>
<h1>{MESSAGE_TITLE}</h1>
<p>{MESSAGE_TEXT}</p>
@@ -12,17 +29,6 @@
<input type="submit" name="confirm" value="{L_YES}" class="button2" />&nbsp;
<input type="submit" name="cancel" value="{L_NO}" class="button2" />
</div>
-
- <h2>{L_PRUNE_USERS_LIST}</h2>
- <!-- IF S_DEACTIVATE --><p>{L_PRUNE_USERS_LIST_DEACTIVATE}</p><!-- ELSE --><p>{L_PRUNE_USERS_LIST_DELETE}</p><!-- ENDIF -->
-
- <br />
- <!-- BEGIN users -->
- &raquo; <a href="{users.U_PROFILE}">{users.USERNAME}</a><!-- IF users.U_USER_ADMIN --> [<a href="{users.U_USER_ADMIN}">{L_USER_ADMIN}</a>]<!-- ENDIF --><br />
- <!-- END users -->
-
- <br /><br />
-
</fieldset>
</form>
diff --git a/phpBB/adm/style/custom_profile_fields.html b/phpBB/adm/style/custom_profile_fields.html
deleted file mode 100644
index 351397d3c7..0000000000
--- a/phpBB/adm/style/custom_profile_fields.html
+++ /dev/null
@@ -1,32 +0,0 @@
-
-<!-- BEGIN dropdown -->
- <select name="{dropdown.FIELD_IDENT}" id="{dropdown.FIELD_IDENT}">
- <!-- BEGIN options --><option value="{dropdown.options.OPTION_ID}"{dropdown.options.SELECTED}>{dropdown.options.VALUE}</option><!-- END options -->
- </select>
-<!-- END dropdown -->
-
-<!-- BEGIN text -->
- <textarea name="{text.FIELD_IDENT}" id="{text.FIELD_IDENT}" rows="{text.FIELD_ROWS}" cols="{text.FIELD_COLS}">{text.FIELD_VALUE}</textarea>
-<!-- END text -->
-
-<!-- BEGIN string -->
- <input type="text" name="{string.FIELD_IDENT}" id="{string.FIELD_IDENT}" size="{string.FIELD_LENGTH}" maxlength="{string.FIELD_MAXLEN}" value="{string.FIELD_VALUE}" />
-<!-- END string -->
-
-<!-- BEGIN bool -->
- <!-- IF bool.FIELD_LENGTH eq 1 -->
- <!-- BEGIN options --><label for="{bool.FIELD_IDENT}_{bool.options.OPTION_ID}"><input type="radio" class="radio" name="{bool.FIELD_IDENT}" id="{bool.FIELD_IDENT}_{bool.options.OPTION_ID}" value="{bool.options.OPTION_ID}"{bool.options.CHECKED} /> {bool.options.VALUE}</label> <!-- END options -->
- <!-- ELSE -->
- <input type="checkbox" class="radio" name="{bool.FIELD_IDENT}" id="{bool.FIELD_IDENT}" value="1"<!-- IF bool.FIELD_VALUE --> checked="checked"<!-- ENDIF --> />
- <!-- ENDIF -->
-<!-- END bool -->
-
-<!-- BEGIN int -->
- <input type="text" name="{int.FIELD_IDENT}" id="{int.FIELD_IDENT}" size="{int.FIELD_LENGTH}" value="{int.FIELD_VALUE}" />
-<!-- END int -->
-
-<!-- BEGIN date -->
- <span>{L_DAY}:</span> <select name="{date.FIELD_IDENT}_day" id="{date.FIELD_IDENT}_day">{date.S_DAY_OPTIONS}</select>
- <span>{L_MONTH}:</span> <select name="{date.FIELD_IDENT}_month" id="{date.FIELD_IDENT}_month">{date.S_MONTH_OPTIONS}</select>
- <span>{L_YEAR}:</span> <select name="{date.FIELD_IDENT}_year" id="{date.FIELD_IDENT}_year">{date.S_YEAR_OPTIONS}</select>
-<!-- END date -->
diff --git a/phpBB/adm/style/editor.js b/phpBB/adm/style/editor.js
deleted file mode 100644
index cad01aa9f2..0000000000
--- a/phpBB/adm/style/editor.js
+++ /dev/null
@@ -1,403 +0,0 @@
-/**
-* bbCode control by subBlue design [ www.subBlue.com ]
-* Includes unixsafe colour palette selector by SHS`
-*/
-
-// Startup variables
-var imageTag = false;
-var theSelection = false;
-
-// Check for Browser & Platform for PC & IE specific bits
-// More details from: http://www.mozilla.org/docs/web-developer/sniffer/browser_type.html
-var clientPC = navigator.userAgent.toLowerCase(); // Get client info
-var clientVer = parseInt(navigator.appVersion); // Get browser version
-
-var is_ie = ((clientPC.indexOf('msie') != -1) && (clientPC.indexOf('opera') == -1));
-var is_win = ((clientPC.indexOf('win') != -1) || (clientPC.indexOf('16bit') != -1));
-
-var baseHeight;
-
-/**
-* Shows the help messages in the helpline window
-*/
-function helpline(help)
-{
- document.forms[form_name].helpbox.value = help_line[help];
-}
-
-/**
-* Fix a bug involving the TextRange object. From
-* http://www.frostjedi.com/terra/scripts/demo/caretBug.html
-*/
-function initInsertions()
-{
- var doc;
- if(document.forms[form_name])
- {
- doc = document;
- }
- else
- {
- doc = opener.document;
- }
-
- var textarea = doc.forms[form_name].elements[text_name];
- if (is_ie && typeof(baseHeight) != 'number')
- {
- textarea.focus();
- baseHeight = doc.selection.createRange().duplicate().boundingHeight;
-
- if (!document.forms[form_name])
- {
- document.body.focus();
- }
- }
-}
-
-/**
-* bbstyle
-*/
-function bbstyle(bbnumber)
-{
- if (bbnumber != -1)
- {
- bbfontstyle(bbtags[bbnumber], bbtags[bbnumber+1]);
- }
- else
- {
- insert_text('[*]');
- document.forms[form_name].elements[text_name].focus();
- }
-}
-
-/**
-* Apply bbcodes
-*/
-function bbfontstyle(bbopen, bbclose)
-{
- theSelection = false;
-
- var textarea = document.forms[form_name].elements[text_name];
-
- textarea.focus();
-
- if ((clientVer >= 4) && is_ie && is_win)
- {
- // Get text selection
- theSelection = document.selection.createRange().text;
-
- if (theSelection)
- {
- // Add tags around selection
- document.selection.createRange().text = bbopen + theSelection + bbclose;
- document.forms[form_name].elements[text_name].focus();
- theSelection = '';
- return;
- }
- }
- else if (document.forms[form_name].elements[text_name].selectionEnd && (document.forms[form_name].elements[text_name].selectionEnd - document.forms[form_name].elements[text_name].selectionStart > 0))
- {
- mozWrap(document.forms[form_name].elements[text_name], bbopen, bbclose);
- document.forms[form_name].elements[text_name].focus();
- theSelection = '';
- return;
- }
-
- //The new position for the cursor after adding the bbcode
- var caret_pos = getCaretPosition(textarea).start;
- var new_pos = caret_pos + bbopen.length;
-
- // Open tag
- insert_text(bbopen + bbclose);
-
- // Center the cursor when we don't have a selection
- // Gecko and proper browsers
- if (!isNaN(textarea.selectionStart))
- {
- textarea.selectionStart = new_pos;
- textarea.selectionEnd = new_pos;
- }
- // IE
- else if (document.selection)
- {
- var range = textarea.createTextRange();
- range.move("character", new_pos);
- range.select();
- storeCaret(textarea);
- }
-
- textarea.focus();
- return;
-}
-
-/**
-* Insert text at position
-*/
-function insert_text(text, spaces, popup)
-{
- var textarea;
-
- if (!popup)
- {
- textarea = document.forms[form_name].elements[text_name];
- }
- else
- {
- textarea = opener.document.forms[form_name].elements[text_name];
- }
-
- if (spaces)
- {
- text = ' ' + text + ' ';
- }
-
- if (!isNaN(textarea.selectionStart))
- {
- var sel_start = textarea.selectionStart;
- var sel_end = textarea.selectionEnd;
-
- mozWrap(textarea, text, '');
- textarea.selectionStart = sel_start + text.length;
- textarea.selectionEnd = sel_end + text.length;
- }
-
- else if (textarea.createTextRange && textarea.caretPos)
- {
- if (baseHeight != textarea.caretPos.boundingHeight)
- {
- textarea.focus();
- storeCaret(textarea);
- }
- var caret_pos = textarea.caretPos;
- caret_pos.text = caret_pos.text.charAt(caret_pos.text.length - 1) == ' ' ? caret_pos.text + text + ' ' : caret_pos.text + text;
-
- }
- else
- {
- textarea.value = textarea.value + text;
- }
-
- if (!popup)
- {
- textarea.focus();
- }
-
-}
-
-/**
-* Add inline attachment at position
-*/
-function attach_inline(index, filename)
-{
- insert_text('[attachment=' + index + ']' + filename + '[/attachment]');
- document.forms[form_name].elements[text_name].focus();
-}
-
-/**
-* Add quote text to message
-*/
-function addquote(post_id, username)
-{
- var message_name = 'message_' + post_id;
- var theSelection = '';
- var divarea = false;
-
- if (document.all)
- {
- divarea = document.all[message_name];
- }
- else
- {
- divarea = document.getElementById(message_name);
- }
-
- // Get text selection - not only the post content :(
- if (window.getSelection)
- {
- theSelection = window.getSelection().toString();
- }
- else if (document.getSelection)
- {
- theSelection = document.getSelection();
- }
- else if (document.selection)
- {
- theSelection = document.selection.createRange().text;
- }
-
- if (theSelection == '' || typeof theSelection == 'undefined' || theSelection == null)
- {
- if (divarea.innerHTML)
- {
- theSelection = divarea.innerHTML.replace(/<br>/ig, '\n');
- theSelection = theSelection.replace(/<br\/>/ig, '\n');
- theSelection = theSelection.replace(/&lt\;/ig, '<');
- theSelection = theSelection.replace(/&gt\;/ig, '>');
- theSelection = theSelection.replace(/&amp\;/ig, '&');
- theSelection = theSelection.replace(/&nbsp\;/ig, ' ');
- }
- else if (document.all)
- {
- theSelection = divarea.innerText;
- }
- else if (divarea.textContent)
- {
- theSelection = divarea.textContent;
- }
- else if (divarea.firstChild.nodeValue)
- {
- theSelection = divarea.firstChild.nodeValue;
- }
- }
-
- if (theSelection)
- {
- insert_text('[quote="' + username + '"]' + theSelection + '[/quote]');
- }
-
- return;
-}
-
-/**
-* From http://www.massless.org/mozedit/
-*/
-function mozWrap(txtarea, open, close)
-{
- var selLength = (typeof(txtarea.textLength) == 'undefined') ? txtarea.value.length : txtarea.textLength;
- var selStart = txtarea.selectionStart;
- var selEnd = txtarea.selectionEnd;
- var scrollTop = txtarea.scrollTop;
-
- if (selEnd == 1 || selEnd == 2)
- {
- selEnd = selLength;
- }
-
- var s1 = (txtarea.value).substring(0,selStart);
- var s2 = (txtarea.value).substring(selStart, selEnd);
- var s3 = (txtarea.value).substring(selEnd, selLength);
-
- txtarea.value = s1 + open + s2 + close + s3;
- txtarea.selectionStart = selStart + open.length;
- txtarea.selectionEnd = selEnd + open.length;
- txtarea.focus();
- txtarea.scrollTop = scrollTop;
-
- return;
-}
-
-/**
-* Insert at Caret position. Code from
-* http://www.faqts.com/knowledge_base/view.phtml/aid/1052/fid/130
-*/
-function storeCaret(textEl)
-{
- if (textEl.createTextRange && document.selection)
- {
- textEl.caretPos = document.selection.createRange().duplicate();
- }
-}
-
-/**
-* Color pallette
-*/
-function colorPalette(dir, width, height)
-{
- var r = 0, g = 0, b = 0;
- var numberList = new Array(6);
- var color = '';
-
- numberList[0] = '00';
- numberList[1] = '40';
- numberList[2] = '80';
- numberList[3] = 'BF';
- numberList[4] = 'FF';
-
- document.writeln('<table class="type2">');
-
- for (r = 0; r < 5; r++)
- {
- if (dir == 'h')
- {
- document.writeln('<tr>');
- }
-
- for (g = 0; g < 5; g++)
- {
- if (dir == 'v')
- {
- document.writeln('<tr>');
- }
-
- for (b = 0; b < 5; b++)
- {
- color = String(numberList[r]) + String(numberList[g]) + String(numberList[b]);
- document.write('<td bgcolor="#' + color + '" style="width: ' + width + 'px; height: ' + height + 'px;">');
- document.write('<a href="#" onclick="bbfontstyle(\'[color=#' + color + ']\', \'[/color]\'); return false;"><img src="images/spacer.gif" width="' + width + '" height="' + height + '" alt="#' + color + '" title="#' + color + '" /></a>');
- document.writeln('</td>');
- }
-
- if (dir == 'v')
- {
- document.writeln('</tr>');
- }
- }
-
- if (dir == 'h')
- {
- document.writeln('</tr>');
- }
- }
- document.writeln('</table>');
-}
-
-
-/**
-* Caret Position object
-*/
-function caretPosition()
-{
- var start = null;
- var end = null;
-}
-
-
-/**
-* Get the caret position in an textarea
-*/
-function getCaretPosition(txtarea)
-{
- var caretPos = new caretPosition();
-
- // simple Gecko/Opera way
- if (txtarea.selectionStart || txtarea.selectionStart == 0)
- {
- caretPos.start = txtarea.selectionStart;
- caretPos.end = txtarea.selectionEnd;
- }
- // dirty and slow IE way
- else if (document.selection)
- {
- // get current selection
- var range = document.selection.createRange();
-
- // a new selection of the whole textarea
- var range_all = document.body.createTextRange();
- range_all.moveToElementText(txtarea);
-
- // calculate selection start point by moving beginning of range_all to beginning of range
- var sel_start;
- for (sel_start = 0; range_all.compareEndPoints('StartToStart', range) < 0; sel_start++)
- {
- range_all.moveStart('character', 1);
- }
-
- txtarea.sel_start = sel_start;
-
- // we ignore the end value for IE, this is already dirty enough and we don't need it
- caretPos.start = txtarea.sel_start;
- caretPos.end = txtarea.sel_start;
- }
-
- return caretPos;
-} \ No newline at end of file
diff --git a/phpBB/adm/style/install_convert.html b/phpBB/adm/style/install_convert.html
index 783e89d6bf..7e22404f56 100644
--- a/phpBB/adm/style/install_convert.html
+++ b/phpBB/adm/style/install_convert.html
@@ -22,7 +22,7 @@
<!-- ENDIF -->
<!-- IF S_LIST -->
- <table cellspacing="1">
+ <table class="table1">
<caption>{L_AVAILABLE_CONVERTORS}</caption>
<col class="col1" /><col class="col2" /><col class="col1" /><col class="col2" />
<thead>
@@ -86,7 +86,7 @@
<!-- ELSE -->
<dl>
- <dt><label>{checks.TITLE}:</label><!-- IF checks.S_EXPLAIN --><br /><span class="explain">{checks.TITLE_EXPLAIN}</span><!-- ENDIF --></dt>
+ <dt><label>{checks.TITLE}{L_COLON}</label><!-- IF checks.S_EXPLAIN --><br /><span class="explain">{checks.TITLE_EXPLAIN}</span><!-- ENDIF --></dt>
<dd>{checks.RESULT}</dd>
</dl>
<!-- ENDIF -->
@@ -109,7 +109,7 @@
<!-- ELSE -->
<dl>
- <dt><label for="{options.KEY}">{options.TITLE}:</label><!-- IF options.S_EXPLAIN --><br /><span class="explain">{options.TITLE_EXPLAIN}</span><!-- ENDIF --></dt>
+ <dt><label for="{options.KEY}">{options.TITLE}{L_COLON}</label><!-- IF options.S_EXPLAIN --><br /><span class="explain">{options.TITLE_EXPLAIN}</span><!-- ENDIF --></dt>
<dd>{options.CONTENT}</dd>
</dl>
@@ -131,4 +131,4 @@
</form>
<!-- ENDIF -->
-<!-- INCLUDE install_footer.html --> \ No newline at end of file
+<!-- INCLUDE install_footer.html -->
diff --git a/phpBB/adm/style/install_error.html b/phpBB/adm/style/install_error.html
index ad53433207..3f7c8b9ed4 100644
--- a/phpBB/adm/style/install_error.html
+++ b/phpBB/adm/style/install_error.html
@@ -5,4 +5,4 @@
<p>{MESSAGE_TEXT}</p>
</div>
-<!-- INCLUDE install_footer.html --> \ No newline at end of file
+<!-- INCLUDE install_footer.html -->
diff --git a/phpBB/adm/style/install_footer.html b/phpBB/adm/style/install_footer.html
index 319f7e06c7..822ab76313 100644
--- a/phpBB/adm/style/install_footer.html
+++ b/phpBB/adm/style/install_footer.html
@@ -1,10 +1,7 @@
-
- </div>
+ </div>
+ </div><!-- /#main -->
</div>
- <span class="corners-bottom"><span></span></span>
- <div class="clear"></div>
- </div>
- </div>
+ </div><!-- /#acp -->
</div>
<div id="page-footer">
@@ -12,5 +9,11 @@
</div>
</div>
+<script type="text/javascript" src="{T_JQUERY_LINK}"></script>
+<!-- IF S_ALLOW_CDN --><script type="text/javascript">window.jQuery || document.write(unescape('%3Cscript src="{T_ASSETS_PATH}/javascript/jquery.js" type="text/javascript"%3E%3C/script%3E'));</script><!-- ENDIF -->
+<script type="text/javascript" src="{T_ASSETS_PATH}/javascript/core.js?assets_version={T_ASSETS_VERSION}"></script>
+<!-- INCLUDEJS admin.js -->
+{$SCRIPTS}
+
</body>
-</html> \ No newline at end of file
+</html>
diff --git a/phpBB/adm/style/install_header.html b/phpBB/adm/style/install_header.html
index fbb6a7b409..99b98ef068 100644
--- a/phpBB/adm/style/install_header.html
+++ b/phpBB/adm/style/install_header.html
@@ -1,15 +1,12 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}" xml:lang="{S_USER_LANG}">
+<!DOCTYPE html>
+<html dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}">
<head>
-
-<meta http-equiv="Content-Type" content="text/html; charset={S_CONTENT_ENCODING}" />
-<meta http-equiv="Content-Style-Type" content="text/css" />
-<meta http-equiv="Content-Language" content="{S_USER_LANG}" />
-<meta http-equiv="imagetoolbar" content="no" />
+<meta charset="utf-8">
+<meta name="viewport" content="width=device-width" />
<!-- IF META -->{META}<!-- ENDIF -->
<title>{PAGE_TITLE}</title>
-<link href="../adm/style/admin.css" rel="stylesheet" type="text/css" media="screen" />
+<link href="{T_TEMPLATE_PATH}/admin.css" rel="stylesheet" type="text/css" media="screen" />
<script type="text/javascript">
// <![CDATA[
@@ -38,36 +35,35 @@ function dE(n, s, type)
</head>
-<body class="{S_CONTENT_DIRECTION}">
+<body class="{S_CONTENT_DIRECTION} nojs">
<div id="wrap">
<div id="page-header">
<h1>{L_INSTALL_PANEL}</h1>
<p id="skip"><a href="#acp">{L_SKIP}</a></p>
<!-- IF S_LANG_SELECT -->
- <form method="post" action="">
+ <form method="post" action="#">
<fieldset class="nobg">
- <label for="language">{L_SELECT_LANG}:</label>
+ <label for="language">{L_SELECT_LANG}{L_COLON}</label>
{S_LANG_SELECT}
<input class="button1" type="submit" id="change_lang" name="change_lang" value="{L_CHANGE}" />
</fieldset>
</form>
<!-- ENDIF -->
</div>
-
+
<div id="page-body">
<div id="tabs">
<ul>
<!-- BEGIN t_block1 -->
- <li<!-- IF t_block1.S_SELECTED --> id="activetab"<!-- ENDIF -->><a href="{t_block1.U_TITLE}"><span>{t_block1.L_TITLE}</span></a></li>
+ <li<!-- IF t_block1.S_SELECTED --> class="activetab"<!-- ENDIF -->><a href="{t_block1.U_TITLE}"><span>{t_block1.L_TITLE}</span></a></li>
<!-- END t_block1 -->
</ul>
</div>
<div id="acp">
- <div class="panel">
- <span class="corners-top"><span></span></span>
<div id="content">
<div id="menu">
+ <div class="menu-block no-header">
<ul>
<!-- BEGIN l_block1 -->
<li<!-- IF l_block1.S_SELECTED --> id="activemenu"<!-- ENDIF -->><a href="{l_block1.U_TITLE}"><span>{l_block1.L_TITLE}</span></a></li>
@@ -76,6 +72,8 @@ function dE(n, s, type)
<li<!-- IF l_block2.S_SELECTED --> id="activemenu"<!-- ENDIF -->><span<!-- IF l_block2.S_COMPLETE --> class="completed"<!-- ENDIF -->>{l_block2.L_TITLE}</span></li>
<!-- END l_block2 -->
</ul>
+ </div>
</div>
-
+
<div id="main" class="install-body">
+ <div class="main">
diff --git a/phpBB/adm/style/install_install.html b/phpBB/adm/style/install_install.html
index 79006fba69..1a809a3588 100644
--- a/phpBB/adm/style/install_install.html
+++ b/phpBB/adm/style/install_install.html
@@ -20,7 +20,7 @@
<!-- ELSE -->
<dl>
- <dt>{checks.TITLE}:<!-- IF checks.S_EXPLAIN --><br /><span class="explain">{checks.TITLE_EXPLAIN}</span><!-- ENDIF --></dt>
+ <dt>{checks.TITLE}{L_COLON}<!-- IF checks.S_EXPLAIN --><br /><span class="explain">{checks.TITLE_EXPLAIN}</span><!-- ENDIF --></dt>
<dd>{checks.RESULT}</dd>
</dl>
<!-- ENDIF -->
@@ -43,7 +43,7 @@
<!-- ELSE -->
<dl>
- <dt><label for="{options.KEY}">{options.TITLE}:</label><!-- IF options.S_EXPLAIN --><br /><span class="explain">{options.TITLE_EXPLAIN}</span><!-- ENDIF --></dt>
+ <dt><label for="{options.KEY}">{options.TITLE}{L_COLON}</label><!-- IF options.S_EXPLAIN --><br /><span class="explain">{options.TITLE_EXPLAIN}</span><!-- ENDIF --></dt>
<dd>{options.CONTENT}</dd>
</dl>
diff --git a/phpBB/adm/style/install_main.html b/phpBB/adm/style/install_main.html
index 2c318bfd65..73e73ad578 100644
--- a/phpBB/adm/style/install_main.html
+++ b/phpBB/adm/style/install_main.html
@@ -3,4 +3,4 @@
<h1>{TITLE}</h1>
<p>{BODY}</p>
-<!-- INCLUDE install_footer.html --> \ No newline at end of file
+<!-- INCLUDE install_footer.html -->
diff --git a/phpBB/adm/style/install_update.html b/phpBB/adm/style/install_update.html
index 818889c89b..d746226753 100644
--- a/phpBB/adm/style/install_update.html
+++ b/phpBB/adm/style/install_update.html
@@ -109,27 +109,14 @@
<!-- ENDIF -->
</fieldset>
- <!-- IF not S_UP_TO_DATE -->
-
- <form id="install_dbupdate" method="post" action="{U_DB_UPDATE_ACTION}">
-
- <fieldset class="submit-buttons">
- <p>{L_UPDATE_DATABASE_EXPLAIN}</p>
- <input class="button1" type="submit" name="db_update" value="{L_UPDATE_DATABASE}" />
- </fieldset>
-
- </form>
-
- <!-- ELSE -->
- <form id="install_update" method="post" action="{U_ACTION}">
+ <form id="install_update" method="post" action="{U_ACTION}">
- <fieldset class="submit-buttons">
- <p>{L_CHECK_FILES_UP_TO_DATE}</p>
- <input class="button1" type="submit" name="submit" value="{L_CHECK_FILES}" />
- </fieldset>
+ <fieldset class="submit-buttons">
+ <p>{L_CHECK_FILES_EXPLAIN}</p>
+ <input class="button1" type="submit" name="submit" value="{L_CHECK_FILES}" />
+ </fieldset>
- </form>
- <!-- ENDIF -->
+ </form>
<!-- ELSEIF S_DB_UPDATE -->
@@ -155,29 +142,29 @@
<!-- ELSE -->
- <h1>{L_UPDATE_DB_SUCCESS}</h1>
+ <div class="successbox">
+ <h3>{L_UPDATE_SUCCESS}</h3>
+ <p>{L_EVERYTHING_UP_TO_DATE}</p>
+ </div>
- <br /><br />
+ <!-- ENDIF -->
- <form id="install_update" method="post" action="{U_ACTION}">
+<!-- ELSEIF S_FILE_CHECK -->
- <fieldset class="submit-buttons">
- <p>{L_CHECK_FILES_EXPLAIN}</p>
- <input class="button1" type="submit" name="submit" value="{L_CHECK_FILES}" />
- </fieldset>
+ <!-- IF S_ALL_UP_TO_DATE -->
- </form>
+ <h1>{L_UPDATE_FILE_SUCCESS}</h1>
+ <p>{L_ALL_FILES_UP_TO_DATE}</p>
- <!-- ENDIF -->
+ <p>{L_UPDATE_DATABASE_EXPLAIN}</p>
-<!-- ELSEIF S_FILE_CHECK -->
+ <form id="install_dbupdate" method="post" action="{U_DB_UPDATE_ACTION}">
- <!-- IF S_ALL_UP_TO_DATE -->
+ <fieldset class="submit-buttons">
+ <input class="button1" type="submit" name="db_update" value="{L_UPDATE_DATABASE}" />
+ </fieldset>
- <div class="successbox">
- <h3>{L_UPDATE_SUCCESS}</h3>
- <p>{L_ALL_FILES_UP_TO_DATE}</p>
- </div>
+ </form>
<!-- ELSE -->
<h1>{L_COLLECTED_INFORMATION}</h1>
@@ -221,13 +208,13 @@
<!-- BEGIN new -->
<dl>
<dt style="width: 60%;"><strong><!-- IF new.DIR_PART -->{new.DIR_PART}<br /><!-- ENDIF -->{new.FILE_PART}</strong>
- <!-- IF new.S_CUSTOM --><br /><span><em>{L_FILE_USED}: </em>{new.CUSTOM_ORIGINAL}</span><!-- ENDIF -->
+ <!-- IF new.S_CUSTOM --><br /><span><em>{L_FILE_USED}{L_COLON} </em>{new.CUSTOM_ORIGINAL}</span><!-- ENDIF -->
</dt>
- <dd style="margin-{S_CONTENT_FLOW_BEGIN}: 60%;">
+ <dd style="margin-{S_CONTENT_FLOW_BEGIN}{L_COLON} 60%;">
<!-- IF not new.S_BINARY -->[<a href="{new.U_SHOW_DIFF}" onclick="diff_popup(this.href); return false;">{new.L_SHOW_DIFF}</a>]<!-- ELSE -->{L_BINARY_FILE}<!-- ENDIF -->
</dd>
<!-- IF new.S_CUSTOM -->
- <dd style="margin-{S_CONTENT_FLOW_BEGIN}: 60%;"><label><input type="checkbox" name="no_update[]" value="{new.FILENAME}" class="radio" /> {L_DO_NOT_UPDATE}</label></dd>
+ <dd style="margin-{S_CONTENT_FLOW_BEGIN}{L_COLON} 60%;"><label><input type="checkbox" name="no_update[]" value="{new.FILENAME}" class="radio" /> {L_DO_NOT_UPDATE}</label></dd>
<!-- ENDIF -->
</dl>
<!-- END new -->
@@ -245,11 +232,11 @@
<!-- BEGIN not_modified -->
<dl>
<dt style="width: 60%;"><strong><!-- IF not_modified.DIR_PART -->{not_modified.DIR_PART}<br /><!-- ENDIF -->{not_modified.FILE_PART}</strong>
- <!-- IF not_modified.S_CUSTOM --><br /><span><em>{L_FILE_USED}: </em>{not_modified.CUSTOM_ORIGINAL}</span><!-- ENDIF -->
+ <!-- IF not_modified.S_CUSTOM --><br /><span><em>{L_FILE_USED}{L_COLON} </em>{not_modified.CUSTOM_ORIGINAL}</span><!-- ENDIF -->
</dt>
- <dd style="margin-{S_CONTENT_FLOW_BEGIN}: 60%;"><!-- IF not not_modified.S_BINARY -->[<a href="{not_modified.U_SHOW_DIFF}" onclick="diff_popup(this.href); return false;">{not_modified.L_SHOW_DIFF}</a>]<!-- ELSE -->{L_BINARY_FILE}<!-- ENDIF --></dd>
+ <dd style="margin-{S_CONTENT_FLOW_BEGIN}{L_COLON} 60%;"><!-- IF not not_modified.S_BINARY -->[<a href="{not_modified.U_SHOW_DIFF}" onclick="diff_popup(this.href); return false;">{not_modified.L_SHOW_DIFF}</a>]<!-- ELSE -->{L_BINARY_FILE}<!-- ENDIF --></dd>
<!-- IF not_modified.S_CUSTOM -->
- <dd style="margin-{S_CONTENT_FLOW_BEGIN}: 60%;"><label><input type="checkbox" name="no_update[]" value="{not_modified.FILENAME}" class="radio" /> {L_DO_NOT_UPDATE}</label></dd>
+ <dd style="margin-{S_CONTENT_FLOW_BEGIN}{L_COLON} 60%;"><label><input type="checkbox" name="no_update[]" value="{not_modified.FILENAME}" class="radio" /> {L_DO_NOT_UPDATE}</label></dd>
<!-- ENDIF -->
</dl>
<!-- END not_modified -->
@@ -266,24 +253,24 @@
<legend><img src="{T_IMAGE_PATH}file_modified.gif" alt="{L_STATUS_MODIFIED}" /></legend>
<dl>
<dt style="width: 60%;"><strong><!-- IF modified.DIR_PART -->{modified.DIR_PART}<br /><!-- ENDIF -->{modified.FILE_PART}</strong>
- <!-- IF modified.S_CUSTOM --><br /><span><em>{L_FILE_USED}: </em>{modified.CUSTOM_ORIGINAL}</span><!-- ENDIF -->
+ <!-- IF modified.S_CUSTOM --><br /><span><em>{L_FILE_USED}{L_COLON} </em>{modified.CUSTOM_ORIGINAL}</span><!-- ENDIF -->
</dt>
- <dd style="margin-{S_CONTENT_FLOW_BEGIN}: 60%;">&nbsp;</dd>
+ <dd style="margin-{S_CONTENT_FLOW_BEGIN}{L_COLON} 60%;">&nbsp;</dd>
<!-- IF modified.S_CUSTOM -->
- <dd style="margin-{S_CONTENT_FLOW_BEGIN}: 60%;"><label><input type="checkbox" name="no_update[]" value="{modified.FILENAME}" class="radio" /> {L_DO_NOT_UPDATE}</label></dd>
+ <dd style="margin-{S_CONTENT_FLOW_BEGIN}{L_COLON} 60%;"><label><input type="checkbox" name="no_update[]" value="{modified.FILENAME}" class="radio" /> {L_DO_NOT_UPDATE}</label></dd>
<!-- ENDIF -->
</dl>
<dl>
<dt style="width: 60%"><label><input type="radio" class="radio" name="modified[{modified.FILENAME}]" value="0" checked="checked" /> {L_MERGE_MODIFICATIONS_OPTION}</label></dt>
- <dd style="margin-{S_CONTENT_FLOW_BEGIN}: 60%;"><!-- IF not modified.S_BINARY -->[<a href="{modified.U_SHOW_DIFF}" onclick="diff_popup(this.href); return false;">{modified.L_SHOW_DIFF}</a>]<!-- ELSE -->{L_BINARY_FILE}<!-- ENDIF --></dd>
+ <dd style="margin-{S_CONTENT_FLOW_BEGIN}{L_COLON} 60%;"><!-- IF not modified.S_BINARY -->[<a href="{modified.U_SHOW_DIFF}" onclick="diff_popup(this.href); return false;">{modified.L_SHOW_DIFF}</a>]<!-- ELSE -->{L_BINARY_FILE}<!-- ENDIF --></dd>
</dl>
<dl>
<dt style="width: 60%"><label><input type="radio" class="radio" name="modified[{modified.FILENAME}]" value="1" /> {L_MERGE_NO_MERGE_NEW_OPTION}</label></dt>
- <dd style="margin-{S_CONTENT_FLOW_BEGIN}: 60%;"><!-- IF not modified.S_BINARY -->[<a href="{modified.U_VIEW_NO_MERGE_NEW}" onclick="diff_popup(this.href); return false;">{L_SHOW_DIFF_FINAL}</a>]<!-- ELSE -->&nbsp;<!-- ENDIF --></dd>
+ <dd style="margin-{S_CONTENT_FLOW_BEGIN}{L_COLON} 60%;"><!-- IF not modified.S_BINARY -->[<a href="{modified.U_VIEW_NO_MERGE_NEW}" onclick="diff_popup(this.href); return false;">{L_SHOW_DIFF_FINAL}</a>]<!-- ELSE -->&nbsp;<!-- ENDIF --></dd>
</dl>
<dl>
<dt style="width: 60%"><label><input type="radio" class="radio" name="modified[{modified.FILENAME}]" value="2" /> {L_MERGE_NO_MERGE_MOD_OPTION}</label></dt>
- <dd style="margin-{S_CONTENT_FLOW_BEGIN}: 60%;"><!-- IF not modified.S_BINARY -->[<a href="{modified.U_VIEW_NO_MERGE_MOD}" onclick="diff_popup(this.href); return false;">{L_SHOW_DIFF_FINAL}</a>]<!-- ELSE -->&nbsp;<!-- ENDIF --></dd>
+ <dd style="margin-{S_CONTENT_FLOW_BEGIN}{L_COLON} 60%;"><!-- IF not modified.S_BINARY -->[<a href="{modified.U_VIEW_NO_MERGE_MOD}" onclick="diff_popup(this.href); return false;">{L_SHOW_DIFF_FINAL}</a>]<!-- ELSE -->&nbsp;<!-- ENDIF --></dd>
</dl>
</fieldset>
<!-- END modified -->
@@ -299,13 +286,13 @@
<!-- BEGIN new_conflict -->
<dl>
<dt style="width: 60%;"><strong><!-- IF new_conflict.DIR_PART -->{new_conflict.DIR_PART}<br /><!-- ENDIF -->{new_conflict.FILE_PART}</strong>
- <!-- IF new_conflict.S_CUSTOM --><br /><span><em>{L_FILE_USED}: </em>{new_conflict.CUSTOM_ORIGINAL}</span><!-- ENDIF -->
+ <!-- IF new_conflict.S_CUSTOM --><br /><span><em>{L_FILE_USED}{L_COLON} </em>{new_conflict.CUSTOM_ORIGINAL}</span><!-- ENDIF -->
</dt>
- <dd style="margin-{S_CONTENT_FLOW_BEGIN}: 60%;">
+ <dd style="margin-{S_CONTENT_FLOW_BEGIN}{L_COLON} 60%;">
<!-- IF not new_conflict.S_BINARY -->[<a href="{new_conflict.U_SHOW_DIFF}" onclick="diff_popup(this.href); return false;">{new_conflict.L_SHOW_DIFF}</a>]<!-- ELSE -->{L_BINARY_FILE}<!-- ENDIF -->
</dd>
<!-- IF new_conflict.S_CUSTOM -->
- <dd style="margin-{S_CONTENT_FLOW_BEGIN}: 60%;"><label><input type="checkbox" name="no_update[]" value="{new_conflict.FILENAME}" class="radio" /> {L_DO_NOT_UPDATE}</label></dd>
+ <dd style="margin-{S_CONTENT_FLOW_BEGIN}{L_COLON} 60%;"><label><input type="checkbox" name="no_update[]" value="{new_conflict.FILENAME}" class="radio" /> {L_DO_NOT_UPDATE}</label></dd>
<!-- ENDIF -->
</dl>
<!-- END new_conflict -->
@@ -322,38 +309,38 @@
<legend><img src="{T_IMAGE_PATH}file_conflict.gif" alt="{L_STATUS_CONFLICT}" /></legend>
<dl>
<dt style="width: 60%;"><strong><!-- IF conflict.DIR_PART -->{conflict.DIR_PART}<br /><!-- ENDIF -->{conflict.FILE_PART}</strong>
- <!-- IF conflict.S_CUSTOM --><br /><span><em>{L_FILE_USED}: </em>{conflict.CUSTOM_ORIGINAL}</span><!-- ENDIF -->
- <!-- IF conflict.NUM_CONFLICTS --><br /><span>{L_NUM_CONFLICTS}: {conflict.NUM_CONFLICTS}</span><!-- ENDIF -->
+ <!-- IF conflict.S_CUSTOM --><br /><span><em>{L_FILE_USED}{L_COLON} </em>{conflict.CUSTOM_ORIGINAL}</span><!-- ENDIF -->
+ <!-- IF conflict.NUM_CONFLICTS --><br /><span>{L_NUM_CONFLICTS}{L_COLON} {conflict.NUM_CONFLICTS}</span><!-- ENDIF -->
</dt>
- <dd style="margin-{S_CONTENT_FLOW_BEGIN}: 60%;">
+ <dd style="margin-{S_CONTENT_FLOW_BEGIN}{L_COLON} 60%;">
<!-- IF not conflict.S_BINARY -->[<a href="{conflict.U_SHOW_DIFF}">{L_DOWNLOAD_CONFLICTS}</a>]<br />{L_DOWNLOAD_CONFLICTS_EXPLAIN}
<!-- ELSE -->{L_BINARY_FILE}<!-- ENDIF -->
</dd>
<!-- IF conflict.S_CUSTOM -->
- <dd style="margin-{S_CONTENT_FLOW_BEGIN}: 60%;"><label><input type="checkbox" name="no_update[]" value="{conflict.FILENAME}" class="radio" /> {L_DO_NOT_UPDATE}</label></dd>
+ <dd style="margin-{S_CONTENT_FLOW_BEGIN}{L_COLON} 60%;"><label><input type="checkbox" name="no_update[]" value="{conflict.FILENAME}" class="radio" /> {L_DO_NOT_UPDATE}</label></dd>
<!-- ENDIF -->
</dl>
<!-- IF conflict.S_BINARY -->
<dl>
<dt style="width: 60%"><label><input type="radio" class="radio" name="conflict[{conflict.FILENAME}]" value="1" checked="checked" /> {L_MERGE_NO_MERGE_NEW_OPTION}</label></dt>
- <dd style="margin-{S_CONTENT_FLOW_BEGIN}: 60%;">&nbsp;</dd>
+ <dd style="margin-{S_CONTENT_FLOW_BEGIN}{L_COLON} 60%;">&nbsp;</dd>
</dl>
<!-- ELSE -->
<dl>
<dt style="width: 60%"><label><input type="radio" class="radio" name="conflict[{conflict.FILENAME}]" value="3" checked="checked" /> {L_MERGE_NEW_FILE_OPTION}</label></dt>
- <dd style="margin-{S_CONTENT_FLOW_BEGIN}: 60%;">[<a href="{conflict.U_VIEW_NEW_FILE}" onclick="diff_popup(this.href); return false;">{L_SHOW_DIFF_MODIFIED}</a>]</dd>
+ <dd style="margin-{S_CONTENT_FLOW_BEGIN}{L_COLON} 60%;">[<a href="{conflict.U_VIEW_NEW_FILE}" onclick="diff_popup(this.href); return false;">{L_SHOW_DIFF_MODIFIED}</a>]</dd>
</dl>
<dl>
<dt style="width: 60%"><label><input type="radio" class="radio" name="conflict[{conflict.FILENAME}]" value="4" /> {L_MERGE_MOD_FILE_OPTION}</label></dt>
- <dd style="margin-{S_CONTENT_FLOW_BEGIN}: 60%;">[<a href="{conflict.U_VIEW_MOD_FILE}" onclick="diff_popup(this.href); return false;">{L_SHOW_DIFF_MODIFIED}</a>]</dd>
+ <dd style="margin-{S_CONTENT_FLOW_BEGIN}{L_COLON} 60%;">[<a href="{conflict.U_VIEW_MOD_FILE}" onclick="diff_popup(this.href); return false;">{L_SHOW_DIFF_MODIFIED}</a>]</dd>
</dl>
<dl>
<dt style="width: 60%"><label><input type="radio" class="radio" name="conflict[{conflict.FILENAME}]" value="1" /> {L_MERGE_NO_MERGE_NEW_OPTION}</label></dt>
- <dd style="margin-{S_CONTENT_FLOW_BEGIN}: 60%;">[<a href="{conflict.U_VIEW_NO_MERGE_NEW}" onclick="diff_popup(this.href); return false;">{L_SHOW_DIFF_FINAL}</a>]</dd>
+ <dd style="margin-{S_CONTENT_FLOW_BEGIN}{L_COLON} 60%;">[<a href="{conflict.U_VIEW_NO_MERGE_NEW}" onclick="diff_popup(this.href); return false;">{L_SHOW_DIFF_FINAL}</a>]</dd>
</dl>
<dl>
<dt style="width: 60%"><label><input type="radio" class="radio" name="conflict[{conflict.FILENAME}]" value="2" /> {L_MERGE_NO_MERGE_MOD_OPTION}</label></dt>
- <dd style="margin-{S_CONTENT_FLOW_BEGIN}: 60%;">[<a href="{conflict.U_VIEW_NO_MERGE_MOD}" onclick="diff_popup(this.href); return false;">{L_SHOW_DIFF_FINAL}</a>]</dd>
+ <dd style="margin-{S_CONTENT_FLOW_BEGIN}{L_COLON} 60%;">[<a href="{conflict.U_VIEW_NO_MERGE_MOD}" onclick="diff_popup(this.href); return false;">{L_SHOW_DIFF_FINAL}</a>]</dd>
</dl>
<!-- ENDIF -->
</fieldset>
@@ -392,7 +379,7 @@
<fieldset>
<legend>{L_SELECT_DOWNLOAD_FORMAT}</legend>
<dl>
- <dt><label for="use_method">{L_DOWNLOAD_AS}:</label></dt>
+ <dt><label for="use_method">{L_DOWNLOAD_AS}{L_COLON}</label></dt>
<dd>{RADIO_BUTTONS}</dd>
</dl>
</fieldset>
@@ -408,7 +395,7 @@
<p>{L_MAPPING_FILE_STRUCTURE}</p>
- <table cellspacing="1">
+ <table class="table1">
<col class="row1" /><col class="row2" /><col class="row1" />
<thead>
<tr>
@@ -455,12 +442,12 @@
<fieldset>
<legend>{L_FTP_SETTINGS}</legend>
<dl>
- <dt><label>{L_UPLOAD_METHOD}:</label></dt>
+ <dt><label>{L_UPLOAD_METHOD}{L_COLON}</label></dt>
<dd><strong>{UPLOAD_METHOD}</strong></dd>
</dl>
<!-- BEGIN data -->
<dl>
- <dt><label for="{data.DATA}">{data.NAME}:</label><br /><span>{data.EXPLAIN}</span></dt>
+ <dt><label for="{data.DATA}">{data.NAME}{L_COLON}</label><br /><span>{data.EXPLAIN}</span></dt>
<dd><input type="<!-- IF data.DATA == 'password' -->password<!-- ELSE -->text<!-- ENDIF -->" id="{data.DATA}" name="{data.DATA}" value="{data.DEFAULT}" /></dd>
</dl>
<!-- END data -->
diff --git a/phpBB/adm/style/install_update_diff.html b/phpBB/adm/style/install_update_diff.html
index 922b4aca31..150ef37e0e 100644
--- a/phpBB/adm/style/install_update_diff.html
+++ b/phpBB/adm/style/install_update_diff.html
@@ -1,15 +1,12 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}" xml:lang="{S_USER_LANG}">
+<!DOCTYPE html>
+<html dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}">
<head>
-
-<meta http-equiv="Content-Type" content="text/html; charset={S_CONTENT_ENCODING}" />
-<meta http-equiv="Content-Style-Type" content="text/css" />
-<meta http-equiv="Content-Language" content="{S_USER_LANG}" />
-<meta http-equiv="imagetoolbar" content="no" />
+<meta charset="utf-8">
+<meta name="viewport" content="width=device-width" />
<!-- IF META -->{META}<!-- ENDIF -->
<title>{PAGE_TITLE}</title>
-<link href="../adm/style/admin.css" rel="stylesheet" type="text/css" media="screen" />
+<link href="{T_TEMPLATE_PATH}/admin.css" rel="stylesheet" type="text/css" media="screen" />
<script type="text/javascript">
// <![CDATA[
@@ -37,7 +34,7 @@ window.onresize = resize_panel;
<style type="text/css">
/* <![CDATA[ */
-#main {
+#main, .rtl #main {
font-size: 1em;
line-height: 0.7em;
margin: 0;
@@ -47,6 +44,7 @@ window.onresize = resize_panel;
#diff_content {
padding: 30px 10px 10px;
+ overflow: hidden;
}
<!-- IF DIFF_MODE neq 'side_by_side' and DIFF_MODE neq 'raw' -->
@@ -225,9 +223,9 @@ table.hrdiff caption span {
<!-- ENDIF -->
<!-- IF not S_DIFF_NEW_FILE -->
<p id="skip"><a href="#acp">{L_SKIP}</a></p>
- <form method="post" action="">
+ <form method="post" action="#">
<fieldset class="quick">
- <label for="diff_mode">{L_SELECT_DIFF_MODE}:</label>
+ <label for="diff_mode">{L_SELECT_DIFF_MODE}{L_COLON}</label>
<select name="diff_mode" id="diff_mode">{S_DIFF_MODE_OPTIONS}</select>
<input class="button1" type="submit" id="submit" name="submit" value="{L_CHANGE}" />
@@ -235,24 +233,22 @@ table.hrdiff caption span {
</form>
<!-- ENDIF -->
<!-- IF S_DIFF_CONFLICT_FILE -->
- <div style="float: {S_CONTENT_FLOW_BEGIN};"><strong>{L_NUM_CONFLICTS}: {NUM_CONFLICTS}</strong></div>
+ <div style="float: {S_CONTENT_FLOW_BEGIN};"><strong>{L_NUM_CONFLICTS}{L_COLON} {NUM_CONFLICTS}</strong></div>
<br style="clear: both;" />
<!-- ENDIF -->
</div>
<div id="page-body">
<div id="acp">
- <div class="panel" id="codepanel">
- <span class="corners-top"><span></span></span>
+ <div id="codepanel">
<div id="diff_content">
<div id="main">
{DIFF_CONTENT}
</div>
</div>
- <span class="corners-bottom"><span></span></span>
- </div>
+ </div>
</div>
</div>
-<!-- INCLUDE simple_footer.html --> \ No newline at end of file
+<!-- INCLUDE simple_footer.html -->
diff --git a/phpBB/adm/style/message_body.html b/phpBB/adm/style/message_body.html
index 5d907e911c..3ea9e5bc24 100644
--- a/phpBB/adm/style/message_body.html
+++ b/phpBB/adm/style/message_body.html
@@ -5,4 +5,4 @@
<p>{MESSAGE_TEXT}</p>
</div>
-<!-- INCLUDE overall_footer.html --> \ No newline at end of file
+<!-- INCLUDE overall_footer.html -->
diff --git a/phpBB/adm/style/overall_footer.html b/phpBB/adm/style/overall_footer.html
index 361d3185fd..8810414fc2 100644
--- a/phpBB/adm/style/overall_footer.html
+++ b/phpBB/adm/style/overall_footer.html
@@ -1,10 +1,7 @@
-
- </div>
+ </div>
+ </div><!-- /#main -->
</div>
- <span class="corners-bottom"><span></span></span>
- <div class="clear"></div>
- </div>
- </div>
+ </div><!-- /#acp -->
</div>
<div id="page-footer">
@@ -17,8 +14,31 @@
<!-- IF S_COPYRIGHT_HTML --><br /><!-- ENDIF -->
{DEBUG_OUTPUT}
<!-- ENDIF -->
+
+ <div id="darkenwrapper" data-ajax-error-title="{L_AJAX_ERROR_TITLE}" data-ajax-error-text="{L_AJAX_ERROR_TEXT}" data-ajax-error-text-abort="{L_AJAX_ERROR_TEXT_ABORT}" data-ajax-error-text-timeout="{L_AJAX_ERROR_TEXT_TIMEOUT}" data-ajax-error-text-parsererror="{L_AJAX_ERROR_TEXT_PARSERERROR}">
+ <div id="darken">&nbsp;</div>
+ </div>
+ <div id="loading_indicator"></div>
+
+ <div id="phpbb_alert" class="phpbb_alert" data-l-err="{L_ERROR}" data-l-timeout-processing-req="{L_TIMEOUT_PROCESSING_REQ}">
+ <a href="#" class="alert_close"></a>
+ <h3 class="alert_title"></h3><p class="alert_text"></p>
+ </div>
+ <div id="phpbb_confirm" class="phpbb_alert">
+ <a href="#" class="alert_close"></a>
+ <div class="alert_text"></div>
+ </div>
</div>
</div>
+<script type="text/javascript" src="{T_JQUERY_LINK}"></script>
+<!-- IF S_ALLOW_CDN --><script type="text/javascript">window.jQuery || document.write(unescape('%3Cscript src="{T_ASSETS_PATH}/javascript/jquery.js?assets_version={T_ASSETS_VERSION}" type="text/javascript"%3E%3C/script%3E'));</script><!-- ENDIF -->
+<script type="text/javascript" src="{T_ASSETS_PATH}/javascript/core.js?assets_version={T_ASSETS_VERSION}"></script>
+<!-- INCLUDEJS ajax.js -->
+<!-- INCLUDEJS admin.js -->
+
+<!-- EVENT acp_overall_footer_after -->
+{$SCRIPTS}
+
</body>
-</html> \ No newline at end of file
+</html>
diff --git a/phpBB/adm/style/overall_header.html b/phpBB/adm/style/overall_header.html
index a376884507..7e7f0cecee 100644
--- a/phpBB/adm/style/overall_header.html
+++ b/phpBB/adm/style/overall_header.html
@@ -1,25 +1,19 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}" xml:lang="{S_USER_LANG}">
+<!DOCTYPE html>
+<html dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}">
<head>
-
-<meta http-equiv="Content-Type" content="text/html; charset={S_CONTENT_ENCODING}" />
-<meta http-equiv="Content-Style-Type" content="text/css" />
-<meta http-equiv="Content-Language" content="{S_USER_LANG}" />
-<meta http-equiv="imagetoolbar" content="no" />
+<meta charset="utf-8">
+<meta name="viewport" content="width=device-width" />
<!-- IF META -->{META}<!-- ENDIF -->
<title>{PAGE_TITLE}</title>
-<link href="style/admin.css" rel="stylesheet" type="text/css" media="screen" />
+<link href="style/admin.css?assets_version={T_ASSETS_VERSION}" rel="stylesheet" type="text/css" media="screen" />
<script type="text/javascript">
// <![CDATA[
-var jump_page = '{LA_JUMP_PAGE}:';
-var on_page = '{ON_PAGE}';
+var jump_page = '{LA_JUMP_PAGE}{L_COLON}';
+var on_page = '{CURRENT_PAGE}';
var per_page = '{PER_PAGE}';
-var base_url = '{A_BASE_URL}';
-
-var menu_state = 'shown';
-
+var base_url = '{BASE_URL|e('js')}';
/**
* Jump to page
@@ -66,11 +60,7 @@ function dE(n, s, type)
*/
function marklist(id, name, state)
{
- var parent = document.getElementById(id);
- if (!parent)
- {
- eval('parent = document.' + id);
- }
+ var parent = document.getElementById(id) || document[id];
if (!parent)
{
@@ -111,61 +101,18 @@ function popup(url, width, height, name)
return false;
}
-/**
-* Hiding/Showing the side menu
-*/
-function switch_menu()
-{
- var menu = document.getElementById('menu');
- var main = document.getElementById('main');
- var toggle = document.getElementById('toggle');
- var handle = document.getElementById('toggle-handle');
-
- switch (menu_state)
- {
- // hide
- case 'shown':
- main.style.width = '93%';
- menu_state = 'hidden';
- menu.style.display = 'none';
- toggle.style.width = '20px';
- handle.style.backgroundImage = 'url(images/toggle.gif)';
- handle.style.backgroundRepeat = 'no-repeat';
-
- <!-- IF S_CONTENT_DIRECTION eq 'rtl' -->
- handle.style.backgroundPosition = '0% 50%';
- toggle.style.left = '96%';
- <!-- ELSE -->
- handle.style.backgroundPosition = '100% 50%';
- toggle.style.left = '0';
- <!-- ENDIF -->
- break;
-
- // show
- case 'hidden':
- main.style.width = '76%';
- menu_state = 'shown';
- menu.style.display = 'block';
- toggle.style.width = '5%';
- handle.style.backgroundImage = 'url(images/toggle.gif)';
- handle.style.backgroundRepeat = 'no-repeat';
-
- <!-- IF S_CONTENT_DIRECTION eq 'rtl' -->
- handle.style.backgroundPosition = '100% 50%';
- toggle.style.left = '75%';
- <!-- ELSE -->
- handle.style.backgroundPosition = '0% 50%';
- toggle.style.left = '15%';
- <!-- ENDIF -->
- break;
- }
-}
-
// ]]>
</script>
+
+<!-- EVENT acp_overall_header_head_append -->
+
+{$STYLESHEETS}
+
</head>
-<body class="{S_CONTENT_DIRECTION}">
+<body class="{S_CONTENT_DIRECTION} nojs">
+
+<!-- EVENT acp_overall_header_body_before -->
<div id="wrap">
<div id="page-header">
@@ -178,29 +125,25 @@ function switch_menu()
<div id="tabs">
<ul>
<!-- BEGIN t_block1 -->
- <li<!-- IF t_block1.S_SELECTED --> id="activetab"<!-- ENDIF -->><a href="{t_block1.U_TITLE}"><span>{t_block1.L_TITLE}</span></a></li>
+ <li<!-- IF t_block1.S_SELECTED --> class="activetab"<!-- ENDIF -->><a href="{t_block1.U_TITLE}"><span>{t_block1.L_TITLE}</span></a></li>
<!-- END t_block1 -->
</ul>
</div>
<div id="acp">
- <div class="panel">
- <span class="corners-top"><span></span></span>
<div id="content">
- <!-- IF not S_USER_NOTICE -->
- <div id="toggle">
- <a id="toggle-handle" accesskey="m" title="{L_MENU_TOGGLE}" onclick="switch_menu(); return false;" href="#"></a></div>
- <!-- ENDIF -->
<div id="menu">
<p>{L_LOGGED_IN_AS}<br /><strong>{USERNAME}</strong> [&nbsp;<a href="{U_LOGOUT}">{L_LOGOUT}</a>&nbsp;][&nbsp;<a href="{U_ADM_LOGOUT}">{L_ADM_LOGOUT}</a>&nbsp;]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</p>
- <ul>
<!-- DEFINE $LI_USED = 0 -->
<!-- BEGIN l_block1 -->
<!-- IF l_block1.S_SELECTED -->
<!-- BEGIN l_block2 -->
<!-- IF .l_block1.l_block2.l_block3 -->
- <li class="header">{l_block1.l_block2.L_TITLE}</li>
+ <!-- IF $LI_USED --></ul></div><!-- ENDIF -->
+ <div class="menu-block">
+ <a class="header" href="javascript:void(0);">{l_block1.l_block2.L_TITLE}</a>
+ <ul>
<!-- DEFINE $LI_USED = 1 -->
<!-- ENDIF -->
@@ -212,10 +155,11 @@ function switch_menu()
<!-- ENDIF -->
<!-- END l_block1 -->
- <!-- IF not $LI_USED -->
- <li></li>
+ <!-- IF $LI_USED -->
+ </ul>
+ </div>
<!-- ENDIF -->
- </ul>
</div>
<div id="main">
+ <div class="main">
diff --git a/phpBB/adm/style/pagination.html b/phpBB/adm/style/pagination.html
new file mode 100644
index 0000000000..7158f83fbc
--- /dev/null
+++ b/phpBB/adm/style/pagination.html
@@ -0,0 +1,12 @@
+
+ <a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{PAGE_NUMBER}</a> &bull;
+ <ul>
+ <!-- BEGIN pagination -->
+ <!-- IF pagination.S_IS_PREV --><li><a href="{pagination.PAGE_URL}">{L_PREVIOUS}</a></li>
+ <!-- ELSEIF pagination.S_IS_CURRENT --><li class="active"><span>{pagination.PAGE_NUMBER}</span></li>
+ <!-- ELSEIF pagination.S_IS_ELLIPSIS --><li class="ellipsis"><span>{L_ELLIPSIS}</span></li>
+ <!-- ELSEIF pagination.S_IS_NEXT --><li><a href="{pagination.PAGE_URL}">{L_NEXT}</a></li>
+ <!-- ELSE --><li><a href="{pagination.PAGE_URL}">{pagination.PAGE_NUMBER}</a></li>
+ <!-- ENDIF -->
+ <!-- END pagination -->
+ </ul>
diff --git a/phpBB/adm/style/permission_forum_copy.html b/phpBB/adm/style/permission_forum_copy.html
index c919310035..1e012a9347 100644
--- a/phpBB/adm/style/permission_forum_copy.html
+++ b/phpBB/adm/style/permission_forum_copy.html
@@ -1,6 +1,6 @@
<!-- INCLUDE overall_header.html -->
-<a name="maincontent"></a>
+<a id="maincontent"></a>
<h1>{L_ACP_FORUM_PERMISSIONS_COPY}</h1>
@@ -12,7 +12,7 @@
<legend>{L_LOOK_UP_FORUM}</legend>
<dl>
- <dt><label for="src_forum">{L_COPY_PERMISSIONS_FROM}:</label><br /><span>{L_COPY_PERMISSIONS_FORUM_FROM_EXPLAIN}</span></dt>
+ <dt><label for="src_forum">{L_COPY_PERMISSIONS_FROM}{L_COLON}</label><br /><span>{L_COPY_PERMISSIONS_FORUM_FROM_EXPLAIN}</span></dt>
<dd><select id="src_forum" name="src_forum_id"><option value="0">{L_SELECT_FORUM}</option><option value="-1">------------------</option>{S_FORUM_OPTIONS}</select></dd>
</dl>
</fieldset>
@@ -22,7 +22,7 @@
<p>{L_LOOK_UP_FORUMS_EXPLAIN}</p>
<dl>
- <dt><label for="dest_forums">{L_COPY_PERMISSIONS_TO}:</label><br /><span>{L_COPY_PERMISSIONS_FORUM_TO_EXPLAIN}</span></dt>
+ <dt><label for="dest_forums">{L_COPY_PERMISSIONS_TO}{L_COLON}</label><br /><span>{L_COPY_PERMISSIONS_FORUM_TO_EXPLAIN}</span></dt>
<dd><select id="dest_forums" name="dest_forum_ids[]" multiple="multiple" size="10">{S_FORUM_OPTIONS}</select></dd>
</dl>
</fieldset>
diff --git a/phpBB/adm/style/permission_mask.html b/phpBB/adm/style/permission_mask.html
index e29609b8b6..7b5c071693 100644
--- a/phpBB/adm/style/permission_mask.html
+++ b/phpBB/adm/style/permission_mask.html
@@ -38,9 +38,9 @@
<a href="#" onclick="swap_options('{p_mask.S_ROW_COUNT}', '{p_mask.f_mask.S_ROW_COUNT}', '0', true); return false;">{L_ADVANCED_PERMISSIONS}</a><!-- IF not p_mask.S_VIEW and p_mask.f_mask.S_CUSTOM --> *<!-- ENDIF -->
</div>
<dl class="permissions-simple">
- <dt style="width: 20%"><label for="role{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}">{L_ROLE}:</label></dt>
+ <dt style="width: 20%"><label for="role{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}">{L_ROLE}{L_COLON}</label></dt>
<!-- IF p_mask.f_mask.S_ROLE_OPTIONS -->
- <dd style="margin-{S_CONTENT_FLOW_BEGIN}: 20%"><select id="role{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}" name="role[{p_mask.f_mask.UG_ID}][{p_mask.f_mask.FORUM_ID}]" onchange="set_role_settings(this.options[selectedIndex].value, 'advanced{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}'); init_colours('{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}')">{p_mask.f_mask.S_ROLE_OPTIONS}</select></dd>
+ <dd style="margin-{S_CONTENT_FLOW_BEGIN}{L_COLON} 20%"><select id="role{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}" name="role[{p_mask.f_mask.UG_ID}][{p_mask.f_mask.FORUM_ID}]" onchange="set_role_settings(this.options[selectedIndex].value, 'advanced{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}'); init_colours('{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}')">{p_mask.f_mask.S_ROLE_OPTIONS}</select></dd>
<!-- ELSE -->
<dd>{L_NO_ROLE_AVAILABLE}</dd>
<!-- ENDIF -->
@@ -75,9 +75,8 @@
<!-- BEGIN category -->
<div class="permissions-panel" id="options{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}{p_mask.f_mask.category.S_ROW_COUNT}" <!-- IF p_mask.S_FIRST_ROW and p_mask.f_mask.S_FIRST_ROW and p_mask.f_mask.category.S_FIRST_ROW --><!-- ELSE --> style="display: none;"<!-- ENDIF -->>
- <span class="corners-top"><span></span></span>
<div class="tablewrap">
- <table id="table{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}{p_mask.f_mask.category.S_ROW_COUNT}" cellspacing="1">
+ <table id="table{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}{p_mask.f_mask.category.S_ROW_COUNT}" class="table1 not-responsive">
<colgroup>
<col class="permissions-name" />
<col class="permissions-yes" />
@@ -118,7 +117,7 @@
</div>
<!-- IF not p_mask.S_VIEW -->
- <fieldset class="quick" style="margin-{S_CONTENT_FLOW_END}: 11px;">
+ <fieldset class="quick" style="margin-{S_CONTENT_FLOW_END}{L_COLON} 11px;">
<p class="small">{L_APPLY_PERMISSIONS_EXPLAIN}</p>
<input class="button1" type="submit" name="psubmit[{p_mask.f_mask.UG_ID}][{p_mask.f_mask.FORUM_ID}]" value="{L_APPLY_PERMISSIONS}" />
<!-- IF .p_mask.f_mask gt 1 or .p_mask gt 1 -->
@@ -128,7 +127,6 @@
<!-- ENDIF -->
- <span class="corners-bottom"><span></span></span>
</div>
<!-- END category -->
<div class="clearfix"></div>
diff --git a/phpBB/adm/style/permission_roles_mask.html b/phpBB/adm/style/permission_roles_mask.html
index e88c5fd2ba..3a14e65004 100644
--- a/phpBB/adm/style/permission_roles_mask.html
+++ b/phpBB/adm/style/permission_roles_mask.html
@@ -1,8 +1,8 @@
<!-- BEGIN role_mask -->
- <table cellspacing="1">
- <caption><!-- IF role_mask.FORUM_ID -->{L_FORUM}: <!-- ENDIF -->{role_mask.NAME}</caption>
+ <table class="table1">
+ <caption><!-- IF role_mask.FORUM_ID -->{L_FORUM}{L_COLON} <!-- ENDIF -->{role_mask.NAME}</caption>
<tbody>
<tr>
<th>{L_USERS}</th>
@@ -25,7 +25,7 @@
<a href="{role_mask.groups.U_PROFILE}">{role_mask.groups.GROUP_NAME}</a><!-- IF not role_mask.groups.S_LAST_ROW --> :: <!-- ENDIF -->
<!-- BEGINELSE -->
{L_GROUPS_NOT_ASSIGNED}
- <!-- END users -->
+ <!-- END groups -->
</td>
</tr>
</tbody>
@@ -35,4 +35,4 @@
<p>{L_ROLE_NOT_ASSIGNED}</p>
-<!-- END role_mask --> \ No newline at end of file
+<!-- END role_mask -->
diff --git a/phpBB/adm/style/permission_trace.html b/phpBB/adm/style/permission_trace.html
index 186bb28b67..7330ffee41 100644
--- a/phpBB/adm/style/permission_trace.html
+++ b/phpBB/adm/style/permission_trace.html
@@ -4,11 +4,11 @@
<!-- IF U_BACK --><a href="{U_BACK}" style="float: {S_CONTENT_FLOW_END};">&laquo; {L_BACK}</a><!-- ENDIF -->
- <h3>{L_TRACE_FOR}: {PERMISSION_USERNAME} / <!-- IF FORUM_NAME -->{FORUM_NAME} / <!-- ENDIF -->{PERMISSION} </h3>
+ <h3>{L_TRACE_FOR}{L_COLON} {PERMISSION_USERNAME} / <!-- IF FORUM_NAME -->{FORUM_NAME} / <!-- ENDIF -->{PERMISSION} </h3>
<br />
- <table cellspacing="1" class="type1">
+ <table class="table1">
<thead>
<tr>
<th>{L_TRACE_WHO}</th>
diff --git a/phpBB/adm/style/permissions.js b/phpBB/adm/style/permissions.js
index adc8995c23..1c85fbd9ef 100644
--- a/phpBB/adm/style/permissions.js
+++ b/phpBB/adm/style/permissions.js
@@ -2,35 +2,27 @@
* Hide and show all checkboxes
* status = true (show boxes), false (hide boxes)
*/
-function display_checkboxes(status)
-{
+function display_checkboxes(status) {
var form = document.getElementById('set-permissions');
var cb = document.getElementsByTagName('input');
var display;
//show
- if (status)
- {
+ if (status) {
display = 'inline';
}
//hide
- else
- {
+ else {
display = 'none';
}
-
- for (var i = 0; i < cb.length; i++ )
- {
- if (cb[i].className == 'permissions-checkbox')
- {
+
+ for (var i = 0; i < cb.length; i++ ) {
+ if (cb[i].className === 'permissions-checkbox') {
cb[i].style.display = display;
}
-
- }
-
+ }
}
-
/**
* Change opacity of element
* e = element
@@ -38,7 +30,7 @@ function display_checkboxes(status)
*/
function set_opacity(e, value) {
e.style.opacity = value/10;
-
+
//IE opacity currently turned off, because of its astronomical stupidity
//e.style.filter = 'alpha(opacity=' + value*10 + ')';
}
@@ -50,13 +42,10 @@ function set_opacity(e, value) {
function toggle_opacity(block_id) {
var cb = document.getElementById('checkbox' + block_id);
var fs = document.getElementById('perm' + block_id);
-
- if (cb.checked)
- {
+
+ if (cb.checked) {
set_opacity(fs, 5);
- }
- else
- {
+ } else {
set_opacity(fs, 10);
}
}
@@ -71,21 +60,17 @@ function reset_opacity(status, except_id) {
var fs = perm.getElementsByTagName('fieldset');
var opacity = 5;
- if (status)
- {
- opacity = 10;
+ if (status) {
+ opacity = 10;
}
-
- for (var i = 0; i < fs.length; i++ )
- {
- if (fs[i].className != 'quick')
- {
+
+ for (var i = 0; i < fs.length; i++ ) {
+ if (fs[i].className !== 'quick') {
set_opacity(fs[i], opacity);
}
}
- if (typeof(except_id) != 'undefined')
- {
+ if (typeof(except_id) !== 'undefined') {
set_opacity(document.getElementById('perm' + except_id), 10);
}
@@ -93,20 +78,15 @@ function reset_opacity(status, except_id) {
marklist('set-permissions', 'inherit', !status);
}
-
/**
* Check whether we have a full radiobutton row of true
* index = offset for the row of inputs (0 == first row, 1 == second, 2 == third),
* rb = array of radiobuttons
*/
-function get_radio_status(index, rb)
-{
- for (var i = index; i < rb.length; i = i + 3 )
- {
- if (rb[i].checked != true)
- {
- if (i > index)
- {
+function get_radio_status(index, rb) {
+ for (var i = index; i < rb.length; i = i + 3 ) {
+ if (rb[i].checked !== true) {
+ if (i > index) {
//at least one is true, but not all (custom)
return 2;
}
@@ -121,17 +101,15 @@ function get_radio_status(index, rb)
/**
* Set tab colours
-* id = panel the tab needs to be set for,
-* init = initialising on open,
+* id = panel the tab needs to be set for,
+* init = initialising on open,
* quick = If no calculation needed, this contains the colour
*/
-function set_colours(id, init, quick)
-{
+function set_colours(id, init, quick) {
var table = document.getElementById('table' + id);
var tab = document.getElementById('tab' + id);
- if (typeof(quick) != 'undefined')
- {
+ if (typeof(quick) !== 'undefined') {
tab.className = 'permissions-preset-' + quick + ' activetab';
return;
}
@@ -141,37 +119,27 @@ function set_colours(id, init, quick)
var status = get_radio_status(0, rb);
- if (status == 1)
- {
+ if (status === 1) {
colour = 'yes';
- }
- else if (status == 0)
- {
+ } else if (status === 0) {
// We move on to No
status = get_radio_status(1, rb);
- if (status == 1)
- {
+ if (status === 1) {
colour = 'no';
- }
- else if (status == 0)
- {
+ } else if (status === 0) {
// We move on to Never
status = get_radio_status(2, rb);
- if (status == 1)
- {
+ if (status === 1) {
colour = 'never';
}
}
}
- if (init)
- {
+ if (init) {
tab.className = 'permissions-preset-' + colour;
- }
- else
- {
+ } else {
tab.className = 'permissions-preset-' + colour + ' activetab';
}
}
@@ -180,16 +148,13 @@ function set_colours(id, init, quick)
* Initialise advanced tab colours on first load
* block_id = block that is opened
*/
-function init_colours(block_id)
-{
+function init_colours(block_id) {
var block = document.getElementById('advanced' + block_id);
var panels = block.getElementsByTagName('div');
var tab = document.getElementById('tab' + id);
- for (var i = 0; i < panels.length; i++)
- {
- if(panels[i].className == 'permissions-panel')
- {
+ for (var i = 0; i < panels.length; i++) {
+ if (panels[i].className === 'permissions-panel') {
set_colours(panels[i].id.replace(/options/, ''), true);
}
}
@@ -203,17 +168,15 @@ function init_colours(block_id)
* adv = we are opening advanced permissions
* view = called from view permissions
*/
-function swap_options(pmask, fmask, cat, adv, view)
-{
+function swap_options(pmask, fmask, cat, adv, view) {
id = pmask + fmask + cat;
active_option = active_pmask + active_fmask + active_cat;
- var old_tab = document.getElementById('tab' + active_option);
+ var old_tab = document.getElementById('tab' + active_option);
var new_tab = document.getElementById('tab' + id);
var adv_block = document.getElementById('advanced' + pmask + fmask);
- if (adv_block.style.display == 'block' && adv == true)
- {
+ if (adv_block.style.display === 'block' && adv === true) {
dE('advanced' + pmask + fmask, -1);
reset_opacity(1);
display_checkboxes(false);
@@ -221,20 +184,16 @@ function swap_options(pmask, fmask, cat, adv, view)
}
// no need to set anything if we are clicking on the same tab again
- if (new_tab == old_tab && !adv)
- {
+ if (new_tab === old_tab && !adv) {
return;
}
// init colours
- if (adv && (pmask + fmask) != (active_pmask + active_fmask))
- {
+ if (adv && (pmask + fmask) !== (active_pmask + active_fmask)) {
init_colours(pmask + fmask);
display_checkboxes(true);
reset_opacity(1);
- }
- else if (adv)
- {
+ } else if (adv) {
//Checkbox might have been clicked, but we need full visibility
display_checkboxes(true);
reset_opacity(1);
@@ -244,31 +203,26 @@ function swap_options(pmask, fmask, cat, adv, view)
old_tab.className = old_tab.className.replace(/\ activetab/g, '');
new_tab.className = new_tab.className + ' activetab';
- if (id == active_option && adv != true)
- {
+ if (id === active_option && adv !== true) {
return;
}
dE('options' + active_option, -1);
-
+
//hiding and showing the checkbox
- if (document.getElementById('checkbox' + active_pmask + active_fmask))
- {
- dE('checkbox' + pmask + fmask, -1);
-
- if ((pmask + fmask) != (active_pmask + active_fmask))
- {
+ if (document.getElementById('checkbox' + active_pmask + active_fmask)) {
+ dE('checkbox' + pmask + fmask, -1);
+
+ if ((pmask + fmask) !== (active_pmask + active_fmask)) {
document.getElementById('checkbox' + active_pmask + active_fmask).style.display = 'inline';
}
}
- if (!view)
- {
+ if (!view) {
dE('advanced' + active_pmask + active_fmask, -1);
}
- if (!view)
- {
+ if (!view) {
dE('advanced' + pmask + fmask, 1);
}
dE('options' + id, 1);
@@ -282,41 +236,33 @@ function swap_options(pmask, fmask, cat, adv, view)
* Mark all radio buttons in one panel
* id = table ID container, s = status ['y'/'u'/'n']
*/
-function mark_options(id, s)
-{
+function mark_options(id, s) {
var t = document.getElementById(id);
- if (!t)
- {
+ if (!t) {
return;
}
var rb = t.getElementsByTagName('input');
- for (var r = 0; r < rb.length; r++)
- {
- if (rb[r].id.substr(rb[r].id.length-1) == s)
- {
+ for (var r = 0; r < rb.length; r++) {
+ if (rb[r].id.substr(rb[r].id.length-1) === s) {
rb[r].checked = true;
}
}
}
-function mark_one_option(id, field_name, s)
-{
+function mark_one_option(id, field_name, s) {
var t = document.getElementById(id);
- if (!t)
- {
+ if (!t) {
return;
}
var rb = t.getElementsByTagName('input');
- for (var r = 0; r < rb.length; r++)
- {
- if (rb[r].id.substr(rb[r].id.length-field_name.length-3, field_name.length) == field_name && rb[r].id.substr(rb[r].id.length-1) == s)
- {
+ for (var r = 0; r < rb.length; r++) {
+ if (rb[r].id.substr(rb[r].id.length-field_name.length-3, field_name.length) === field_name && rb[r].id.substr(rb[r].id.length-1) === s) {
rb[r].checked = true;
}
}
@@ -325,12 +271,10 @@ function mark_one_option(id, field_name, s)
/**
* Reset role dropdown field to Select role... if an option gets changed
*/
-function reset_role(id)
-{
+function reset_role(id) {
var t = document.getElementById(id);
- if (!t)
- {
+ if (!t) {
return;
}
@@ -340,20 +284,17 @@ function reset_role(id)
/**
* Load role and set options accordingly
*/
-function set_role_settings(role_id, target_id)
-{
+function set_role_settings(role_id, target_id) {
settings = role_options[role_id];
- if (!settings)
- {
+ if (!settings) {
return;
}
// Mark all options to no (unset) first...
mark_options(target_id, 'u');
- for (var r in settings)
- {
- mark_one_option(target_id, r, (settings[r] == 1) ? 'y' : 'n');
+ for (var r in settings) {
+ mark_one_option(target_id, r, (settings[r] === 1) ? 'y' : 'n');
}
}
diff --git a/phpBB/adm/style/profilefields/bool.html b/phpBB/adm/style/profilefields/bool.html
new file mode 100644
index 0000000000..f1d7ba75f4
--- /dev/null
+++ b/phpBB/adm/style/profilefields/bool.html
@@ -0,0 +1,7 @@
+<!-- BEGIN bool -->
+<!-- IF bool.FIELD_LENGTH eq 1 -->
+ <!-- BEGIN options --><label for="{bool.FIELD_IDENT}_{bool.options.OPTION_ID}"><input type="radio" class="radio" name="{bool.FIELD_IDENT}" id="{bool.FIELD_IDENT}_{bool.options.OPTION_ID}" value="{bool.options.OPTION_ID}"{bool.options.CHECKED} /> {bool.options.VALUE}</label> <!-- END options -->
+<!-- ELSE -->
+ <input type="checkbox" class="radio" name="{bool.FIELD_IDENT}" id="{bool.FIELD_IDENT}"<!-- IF bool.FIELD_VALUE --> checked="checked"<!-- ENDIF --> />
+<!-- ENDIF -->
+<!-- END bool -->
diff --git a/phpBB/adm/style/profilefields/date.html b/phpBB/adm/style/profilefields/date.html
new file mode 100644
index 0000000000..5d5bc04ed6
--- /dev/null
+++ b/phpBB/adm/style/profilefields/date.html
@@ -0,0 +1,5 @@
+<!-- BEGIN date -->
+<label for="{date.FIELD_IDENT}_day">{L_DAY}{L_COLON} <select name="{date.FIELD_IDENT}_day" id="{date.FIELD_IDENT}_day">{date.S_DAY_OPTIONS}</select></label>
+<label for="{date.FIELD_IDENT}_month">{L_MONTH}{L_COLON} <select name="{date.FIELD_IDENT}_month" id="{date.FIELD_IDENT}_month">{date.S_MONTH_OPTIONS}</select></label>
+<label for="{date.FIELD_IDENT}_year">{L_YEAR}{L_COLON} <select name="{date.FIELD_IDENT}_year" id="{date.FIELD_IDENT}_year">{date.S_YEAR_OPTIONS}</select></label>
+<!-- END date -->
diff --git a/phpBB/adm/style/profilefields/dropdown.html b/phpBB/adm/style/profilefields/dropdown.html
new file mode 100644
index 0000000000..243b7039da
--- /dev/null
+++ b/phpBB/adm/style/profilefields/dropdown.html
@@ -0,0 +1,5 @@
+<!-- BEGIN dropdown -->
+<select name="{dropdown.FIELD_IDENT}" id="{dropdown.FIELD_IDENT}">
+ <!-- BEGIN options --><option value="{dropdown.options.OPTION_ID}"{dropdown.options.SELECTED}>{dropdown.options.VALUE}</option><!-- END options -->
+</select>
+<!-- END dropdown -->
diff --git a/phpBB/adm/style/profilefields/int.html b/phpBB/adm/style/profilefields/int.html
new file mode 100644
index 0000000000..d047c254d8
--- /dev/null
+++ b/phpBB/adm/style/profilefields/int.html
@@ -0,0 +1,3 @@
+<!-- BEGIN int -->
+<input type="number" min="{int.FIELD_MINLEN}" max="{int.FIELD_MAXLEN}" class="autowidth" name="{int.FIELD_IDENT}" id="{int.FIELD_IDENT}" size="{int.FIELD_LENGTH}" value="{int.FIELD_VALUE}" />
+<!-- END int -->
diff --git a/phpBB/adm/style/profilefields/string.html b/phpBB/adm/style/profilefields/string.html
new file mode 100644
index 0000000000..a8855f50d8
--- /dev/null
+++ b/phpBB/adm/style/profilefields/string.html
@@ -0,0 +1,3 @@
+<!-- BEGIN string -->
+<input type="text" class="autowidth" name="{string.FIELD_IDENT}" id="{string.FIELD_IDENT}" size="{string.FIELD_LENGTH}" maxlength="{string.FIELD_MAXLEN}" value="{string.FIELD_VALUE}" />
+<!-- END string -->
diff --git a/phpBB/adm/style/profilefields/text.html b/phpBB/adm/style/profilefields/text.html
new file mode 100644
index 0000000000..6334b61926
--- /dev/null
+++ b/phpBB/adm/style/profilefields/text.html
@@ -0,0 +1,3 @@
+<!-- BEGIN text -->
+<textarea name="{text.FIELD_IDENT}" id="{text.FIELD_IDENT}" rows="{text.FIELD_ROWS}" cols="{text.FIELD_COLS}">{text.FIELD_VALUE}</textarea>
+<!-- END text -->
diff --git a/phpBB/adm/style/profilefields/url.html b/phpBB/adm/style/profilefields/url.html
new file mode 100644
index 0000000000..8dd3a90de1
--- /dev/null
+++ b/phpBB/adm/style/profilefields/url.html
@@ -0,0 +1,3 @@
+<!-- BEGIN url -->
+<input type="url" class="inputbox autowidth" name="{url.FIELD_IDENT}" id="{url.FIELD_IDENT}" size="{url.FIELD_LENGTH}" maxlength="{url.FIELD_MAXLEN}" value="{url.FIELD_VALUE}" />
+<!-- END url -->
diff --git a/phpBB/adm/style/progress_bar.html b/phpBB/adm/style/progress_bar.html
index 00e1e5e885..1822675c15 100644
--- a/phpBB/adm/style/progress_bar.html
+++ b/phpBB/adm/style/progress_bar.html
@@ -37,4 +37,4 @@
// ]]>
</script>
-<!-- INCLUDE simple_footer.html --> \ No newline at end of file
+<!-- INCLUDE simple_footer.html -->
diff --git a/phpBB/adm/style/simple_body.html b/phpBB/adm/style/simple_body.html
index 0b1e11b9a2..ca06bc4f10 100644
--- a/phpBB/adm/style/simple_body.html
+++ b/phpBB/adm/style/simple_body.html
@@ -5,4 +5,4 @@
<p>{MESSAGE_TEXT}</p>
</div>
-<!-- INCLUDE simple_footer.html --> \ No newline at end of file
+<!-- INCLUDE simple_footer.html -->
diff --git a/phpBB/adm/style/simple_footer.html b/phpBB/adm/style/simple_footer.html
index 6395eace6c..a559b25b72 100644
--- a/phpBB/adm/style/simple_footer.html
+++ b/phpBB/adm/style/simple_footer.html
@@ -16,5 +16,9 @@
</div>
+<script type="text/javascript" src="{T_JQUERY_LINK}"></script>
+<!-- IF S_ALLOW_CDN --><script type="text/javascript">window.jQuery || document.write(unescape('%3Cscript src="{T_ASSETS_PATH}/javascript/jquery.js?assets_version={T_ASSETS_VERSION}" type="text/javascript"%3E%3C/script%3E'));</script><!-- ENDIF -->
+<!-- EVENT acp_simple_footer_after -->
+
</body>
</html>
diff --git a/phpBB/adm/style/simple_header.html b/phpBB/adm/style/simple_header.html
index 2339b70a93..770b7da8a6 100644
--- a/phpBB/adm/style/simple_header.html
+++ b/phpBB/adm/style/simple_header.html
@@ -1,22 +1,18 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}" xml:lang="{S_USER_LANG}">
+<!DOCTYPE html>
+<html dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}">
<head>
-
-<meta http-equiv="Content-Type" content="text/html; charset={S_CONTENT_ENCODING}" />
-<meta http-equiv="Content-Style-Type" content="text/css" />
-<meta http-equiv="Content-Language" content="{S_USER_LANG}" />
-<meta http-equiv="imagetoolbar" content="no" />
+<meta charset="utf-8">
<!-- IF META -->{META}<!-- ENDIF -->
<title>{PAGE_TITLE}</title>
-<link href="style/admin.css" rel="stylesheet" type="text/css" media="screen" />
+<link href="style/admin.css?assets_version={T_ASSETS_VERSION}" rel="stylesheet" type="text/css" media="screen" />
<script type="text/javascript">
// <![CDATA[
-var jump_page = '{LA_JUMP_PAGE}:';
-var on_page = '{ON_PAGE}';
+var jump_page = '{LA_JUMP_PAGE}{L_COLON}';
+var on_page = '{CURRENT_PAGE}';
var per_page = '{PER_PAGE}';
-var base_url = '{A_BASE_URL}';
+var base_url = '{BASE_URL|e('js')}';
/**
* Window popup
@@ -105,8 +101,11 @@ function find_username(url)
// ]]>
</script>
+<!-- EVENT acp_simple_header_head_append -->
</head>
<body class="{S_CONTENT_DIRECTION}">
+<!-- EVENT acp_simple_header_body_before -->
+
<div id="page-body" class="simple-page-body">
diff --git a/phpBB/adm/style/timezone.js b/phpBB/adm/style/timezone.js
new file mode 100644
index 0000000000..b5e27c907c
--- /dev/null
+++ b/phpBB/adm/style/timezone.js
@@ -0,0 +1,13 @@
+(function($) { // Avoid conflicts with other libraries
+
+"use strict";
+
+$('#tz_date').change(function() {
+ phpbb.timezoneSwitchDate(false);
+});
+
+$(document).ready(
+ phpbb.timezoneEnableDateSelection
+);
+
+})(jQuery); // Avoid conflicts with other libraries
diff --git a/phpBB/adm/style/timezone_option.html b/phpBB/adm/style/timezone_option.html
new file mode 100644
index 0000000000..7a799b69c6
--- /dev/null
+++ b/phpBB/adm/style/timezone_option.html
@@ -0,0 +1,19 @@
+<dl>
+ <dt><label for="timezone">{L_BOARD_TIMEZONE}{L_COLON}</label></dt>
+ <!-- IF S_TZ_DATE_OPTIONS -->
+ <dd id="tz_select_date" style="display: none;">
+ <select name="tz_date" id="tz_date" class="autowidth tz_select">
+ <option value="">{L_SELECT_CURRENT_TIME}</option>
+ {S_TZ_DATE_OPTIONS}
+ </select>
+ </dd>
+ <!-- ENDIF -->
+ <dd>
+ <select name="tz" id="timezone" class="autowidth tz_select">
+ <option value="">{L_SELECT_TIMEZONE}</option>
+ {S_TZ_OPTIONS}
+ </select>
+
+ <!-- INCLUDEJS timezone.js -->
+ </dd>
+</dl>
diff --git a/phpBB/adm/style/tooltip.js b/phpBB/adm/style/tooltip.js
index 20610b52fe..3a89008706 100644
--- a/phpBB/adm/style/tooltip.js
+++ b/phpBB/adm/style/tooltip.js
@@ -1,6 +1,6 @@
/*
javascript for Bubble Tooltips by Alessandro Fulciniti
-- http://pro.html.it - http://web-graphics.com
+- http://pro.html.it - http://web-graphics.com
obtained from: http://web-graphics.com/mtarchive/001717.php
phpBB Development Team:
@@ -15,14 +15,12 @@ var head_text, tooltip_mode;
/**
* Enable tooltip replacements for links
*/
-function enable_tooltips_link(id, headline, sub_id)
-{
+function enable_tooltips_link(id, headline, sub_id) {
var links, i, hold;
-
+
head_text = headline;
- if (!document.getElementById || !document.getElementsByTagName)
- {
+ if (!document.getElementById || !document.getElementsByTagName) {
return;
}
@@ -33,26 +31,18 @@ function enable_tooltips_link(id, headline, sub_id)
document.getElementsByTagName('body')[0].appendChild(hold);
- if (id == null)
- {
+ if (id === null) {
links = document.getElementsByTagName('a');
- }
- else
- {
+ } else {
links = document.getElementById(id).getElementsByTagName('a');
}
- for (i = 0; i < links.length; i++)
- {
- if (sub_id)
- {
- if (links[i].id.substr(0, sub_id.length) == sub_id)
- {
+ for (i = 0; i < links.length; i++) {
+ if (sub_id) {
+ if (links[i].id.substr(0, sub_id.length) === sub_id) {
prepare(links[i]);
}
- }
- else
- {
+ } else {
prepare(links[i]);
}
}
@@ -63,14 +53,12 @@ function enable_tooltips_link(id, headline, sub_id)
/**
* Enable tooltip replacements for selects
*/
-function enable_tooltips_select(id, headline, sub_id)
-{
+function enable_tooltips_select(id, headline, sub_id) {
var links, i, hold;
-
+
head_text = headline;
- if (!document.getElementById || !document.getElementsByTagName)
- {
+ if (!document.getElementById || !document.getElementsByTagName) {
return;
}
@@ -81,26 +69,18 @@ function enable_tooltips_select(id, headline, sub_id)
document.getElementsByTagName('body')[0].appendChild(hold);
- if (id == null)
- {
+ if (id === null) {
links = document.getElementsByTagName('option');
- }
- else
- {
+ } else {
links = document.getElementById(id).getElementsByTagName('option');
}
- for (i = 0; i < links.length; i++)
- {
- if (sub_id)
- {
- if (links[i].parentNode.id.substr(0, sub_id.length) == sub_id)
- {
+ for (i = 0; i < links.length; i++) {
+ if (sub_id) {
+ if (links[i].parentNode.id.substr(0, sub_id.length) === sub_id) {
prepare(links[i]);
}
- }
- else
- {
+ } else {
prepare(links[i]);
}
}
@@ -111,14 +91,12 @@ function enable_tooltips_select(id, headline, sub_id)
/**
* Prepare elements to replace
*/
-function prepare(element)
-{
+function prepare(element) {
var tooltip, text, desc, title;
text = element.getAttribute('title');
- if (text == null || text.length == 0)
- {
+ if (text === null || text.length === 0) {
return;
}
@@ -139,8 +117,7 @@ function prepare(element)
element.onmouseover = show_tooltip;
element.onmouseout = hide_tooltip;
- if (tooltip_mode == 'link')
- {
+ if (tooltip_mode === 'link') {
element.onmousemove = locate;
}
}
@@ -148,8 +125,7 @@ function prepare(element)
/**
* Show tooltip
*/
-function show_tooltip(e)
-{
+function show_tooltip(e) {
document.getElementById('_tooltip_container').appendChild(this.tooltip);
locate(this);
}
@@ -157,11 +133,9 @@ function show_tooltip(e)
/**
* Hide tooltip
*/
-function hide_tooltip(e)
-{
+function hide_tooltip(e) {
var d = document.getElementById('_tooltip_container');
- if (d.childNodes.length > 0)
- {
+ if (d.childNodes.length > 0) {
d.removeChild(d.firstChild);
}
}
@@ -169,8 +143,7 @@ function hide_tooltip(e)
/**
* Set opacity on tooltip element
*/
-function set_opacity(element)
-{
+function set_opacity(element) {
element.style.filter = 'alpha(opacity:95)';
element.style.KHTMLOpacity = '0.95';
element.style.MozOpacity = '0.95';
@@ -180,8 +153,7 @@ function set_opacity(element)
/**
* Create new element
*/
-function create_element(tag, c)
-{
+function create_element(tag, c) {
var x = document.createElement(tag);
x.className = c;
x.style.display = 'block';
@@ -191,34 +163,26 @@ function create_element(tag, c)
/**
* Correct positioning of tooltip container
*/
-function locate(e)
-{
+function locate(e) {
var posx = 0;
var posy = 0;
e = e.parentNode;
- if (e.offsetParent)
- {
- for (var posx = 0, posy = 0; e.offsetParent; e = e.offsetParent)
- {
+ if (e.offsetParent) {
+ for (posx = 0, posy = 0; e.offsetParent; e = e.offsetParent) {
posx += e.offsetLeft;
posy += e.offsetTop;
}
- }
- else
- {
+ } else {
posx = e.offsetLeft;
posy = e.offsetTop;
}
- if (tooltip_mode == 'link')
- {
+ if (tooltip_mode === 'link') {
document.getElementById('_tooltip_container').style.top=(posy+20) + 'px';
document.getElementById('_tooltip_container').style.left=(posx-20) + 'px';
- }
- else
- {
+ } else {
document.getElementById('_tooltip_container').style.top=(posy+30) + 'px';
document.getElementById('_tooltip_container').style.left=(posx-205) + 'px';
}
diff --git a/phpBB/adm/style/viewsource.html b/phpBB/adm/style/viewsource.html
deleted file mode 100644
index f127c9626f..0000000000
--- a/phpBB/adm/style/viewsource.html
+++ /dev/null
@@ -1,21 +0,0 @@
-<!-- INCLUDE simple_header.html -->
-<div id="acp" style="padding: 0;">
-<div class="panel" style="padding: 10px;">
-<div style="overflow: auto;">
- <h1>{FILENAME}</h1>
-
- <table class="type2">
- <tbody>
- <!-- BEGIN source -->
- <tr valign="top">
- <td class="sourcenum">{source.LINENUM}&nbsp;&nbsp;</td>
- <td class="source">{source.LINE}</td>
- </tr>
- <!-- END source -->
- </tbody>
- </table>
-
-</div>
-</div>
-</div>
-<!-- INCLUDE simple_footer.html --> \ No newline at end of file
diff --git a/phpBB/adm/swatch.php b/phpBB/adm/swatch.php
deleted file mode 100644
index e372c16b9b..0000000000
--- a/phpBB/adm/swatch.php
+++ /dev/null
@@ -1,53 +0,0 @@
-<?php
-/**
-*
-* @package phpBB3
-* @version $Id$
-* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
-*
-*/
-
-/**
-* @ignore
-*/
-define('IN_PHPBB', true);
-define('ADMIN_START', true);
-$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './../';
-$phpEx = substr(strrchr(__FILE__, '.'), 1);
-include($phpbb_root_path . 'common.' . $phpEx);
-
-// Start session management
-$user->session_begin(false);
-$auth->acl($user->data);
-$user->setup();
-
-// Set custom template for admin area
-$template->set_custom_template($phpbb_root_path . 'adm/style', 'admin');
-
-$template->set_filenames(array(
- 'body' => 'colour_swatch.html')
-);
-
-$form = request_var('form', '');
-$name = request_var('name', '');
-
-// We validate form and name here, only id/class allowed
-$form = (!preg_match('/^[a-z0-9_-]+$/i', $form)) ? '' : $form;
-$name = (!preg_match('/^[a-z0-9_-]+$/i', $name)) ? '' : $name;
-
-$template->assign_vars(array(
- 'OPENER' => $form,
- 'NAME' => $name,
- 'T_IMAGES_PATH' => "{$phpbb_root_path}images/",
-
- 'S_USER_LANG' => $user->lang['USER_LANG'],
- 'S_CONTENT_DIRECTION' => $user->lang['DIRECTION'],
- 'S_CONTENT_ENCODING' => 'UTF-8',
-));
-
-$template->display('body');
-
-garbage_collection();
-
-?> \ No newline at end of file
diff --git a/phpBB/app.php b/phpBB/app.php
new file mode 100644
index 0000000000..7dc778e3a8
--- /dev/null
+++ b/phpBB/app.php
@@ -0,0 +1,31 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+/**
+*/
+
+/**
+* @ignore
+*/
+define('IN_PHPBB', true);
+$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
+$phpEx = substr(strrchr(__FILE__, '.'), 1);
+include($phpbb_root_path . 'common.' . $phpEx);
+include($phpbb_root_path . 'includes/functions_url_matcher.' . $phpEx);
+
+// Start session management
+$user->session_begin();
+$auth->acl($user->data);
+$user->setup('app');
+
+$http_kernel = $phpbb_container->get('http_kernel');
+$symfony_request = $phpbb_container->get('symfony_request');
+$response = $http_kernel->handle($symfony_request);
+$response->send();
+$http_kernel->terminate($symfony_request, $response);
diff --git a/phpBB/assets/javascript/core.js b/phpBB/assets/javascript/core.js
new file mode 100644
index 0000000000..4657af90ab
--- /dev/null
+++ b/phpBB/assets/javascript/core.js
@@ -0,0 +1,1085 @@
+var phpbb = {};
+phpbb.alertTime = 100;
+
+(function($) { // Avoid conflicts with other libraries
+
+"use strict";
+
+// define a couple constants for keydown functions.
+var keymap = {
+ ENTER: 13,
+ ESC: 27
+};
+
+var dark = $('#darkenwrapper');
+var loadingIndicator = $('#loading_indicator');
+var phpbbAlertTimer = null;
+
+var isTouch = (window && typeof window.ontouchstart !== 'undefined');
+
+/**
+ * Display a loading screen
+ *
+ * @returns object Returns loadingIndicator.
+ */
+phpbb.loadingIndicator = function() {
+ if (!loadingIndicator.is(':visible')) {
+ loadingIndicator.fadeIn(phpbb.alertTime);
+ // Wait fifteen seconds and display an error if nothing has been returned by then.
+ phpbbAlertTimer = setTimeout(function() {
+ if (loadingIndicator.is(':visible')) {
+ phpbb.alert($('#phpbb_alert').attr('data-l-err'), $('#phpbb_alert').attr('data-l-timeout-processing-req'));
+ }
+ }, 15000);
+ }
+
+ return loadingIndicator;
+};
+
+/**
+ * Clear loading alert timeout
+*/
+phpbb.clearLoadingTimeout = function() {
+ if (phpbbAlertTimer !== null) {
+ clearTimeout(phpbbAlertTimer);
+ phpbbAlertTimer = null;
+ }
+};
+
+/**
+ * Display a simple alert similar to JSs native alert().
+ *
+ * You can only call one alert or confirm box at any one time.
+ *
+ * @param string title Title of the message, eg "Information" (HTML).
+ * @param string msg Message to display (HTML).
+ * @param bool fadedark Remove the dark background when done? Defaults
+ * to yes.
+ *
+ * @returns object Returns the div created.
+ */
+phpbb.alert = function(title, msg, fadedark) {
+ var div = $('#phpbb_alert');
+ div.find('.alert_title').html(title);
+ div.find('.alert_text').html(msg);
+
+ if (!dark.is(':visible')) {
+ dark.fadeIn(phpbb.alertTime);
+ }
+
+ div.bind('click', function(e) {
+ e.stopPropagation();
+ });
+ dark.one('click', function(e) {
+ var fade;
+
+ div.find('.alert_close').unbind('click');
+ fade = (typeof fadedark !== 'undefined' && !fadedark) ? div : dark;
+ fade.fadeOut(phpbb.alertTime, function() {
+ div.hide();
+ });
+
+ e.preventDefault();
+ e.stopPropagation();
+ });
+
+ $(document).bind('keydown', function(e) {
+ if (e.keyCode === keymap.ENTER || e.keyCode === keymap.ESC) {
+ dark.trigger('click');
+
+ e.preventDefault();
+ e.stopPropagation();
+ }
+ });
+
+ div.find('.alert_close').one('click', function(e) {
+ dark.trigger('click');
+
+ e.preventDefault();
+ });
+
+ if (loadingIndicator.is(':visible')) {
+ loadingIndicator.fadeOut(phpbb.alertTime, function() {
+ dark.append(div);
+ div.fadeIn(phpbb.alertTime);
+ });
+ } else if (dark.is(':visible')) {
+ dark.append(div);
+ div.fadeIn(phpbb.alertTime);
+ } else {
+ dark.append(div);
+ div.show();
+ dark.fadeIn(phpbb.alertTime);
+ }
+
+ return div;
+};
+
+/**
+ * Display a simple yes / no box to the user.
+ *
+ * You can only call one alert or confirm box at any one time.
+ *
+ * @param string msg Message to display (HTML).
+ * @param function callback Callback. Bool param, whether the user pressed
+ * yes or no (or whatever their language is).
+ * @param bool fadedark Remove the dark background when done? Defaults
+ * to yes.
+ *
+ * @returns object Returns the div created.
+ */
+phpbb.confirm = function(msg, callback, fadedark) {
+ var div = $('#phpbb_confirm');
+ div.find('.alert_text').html(msg);
+
+ if (!dark.is(':visible')) {
+ dark.fadeIn(phpbb.alertTime);
+ }
+
+ div.bind('click', function(e) {
+ e.stopPropagation();
+ });
+
+ var clickHandler = function(e) {
+ var res = this.name === 'confirm';
+ var fade = (typeof fadedark !== 'undefined' && !fadedark && res) ? div : dark;
+ fade.fadeOut(phpbb.alertTime, function() {
+ div.hide();
+ });
+ div.find('input[type="button"]').unbind('click', clickHandler);
+ callback(res);
+
+ if (e) {
+ e.preventDefault();
+ e.stopPropagation();
+ }
+ };
+ div.find('input[type="button"]').one('click', clickHandler);
+
+ dark.one('click', function(e) {
+ div.find('.alert_close').unbind('click');
+ dark.fadeOut(phpbb.alertTime, function() {
+ div.hide();
+ });
+ callback(false);
+
+ e.preventDefault();
+ e.stopPropagation();
+ });
+
+ $(document).bind('keydown', function(e) {
+ if (e.keyCode === keymap.ENTER) {
+ $('input[name="confirm"]').trigger('click');
+ e.preventDefault();
+ e.stopPropagation();
+ } else if (e.keyCode === keymap.ESC) {
+ $('input[name="cancel"]').trigger('click');
+ e.preventDefault();
+ e.stopPropagation();
+ }
+ });
+
+ div.find('.alert_close').one('click', function(e) {
+ var fade = (typeof fadedark !== 'undefined' && fadedark) ? div : dark;
+ fade.fadeOut(phpbb.alertTime, function() {
+ div.hide();
+ });
+ callback(false);
+
+ e.preventDefault();
+ });
+
+ if (loadingIndicator.is(':visible')) {
+ loadingIndicator.fadeOut(phpbb.alertTime, function() {
+ dark.append(div);
+ div.fadeIn(phpbb.alertTime);
+ });
+ } else if (dark.is(':visible')) {
+ dark.append(div);
+ div.fadeIn(phpbb.alertTime);
+ } else {
+ dark.append(div);
+ div.show();
+ dark.fadeIn(phpbb.alertTime);
+ }
+
+ return div;
+};
+
+/**
+ * Turn a querystring into an array.
+ *
+ * @argument string string The querystring to parse.
+ * @returns object The object created.
+ */
+phpbb.parseQuerystring = function(string) {
+ var params = {}, i, split;
+
+ string = string.split('&');
+ for (i = 0; i < string.length; i++) {
+ split = string[i].split('=');
+ params[split[0]] = decodeURIComponent(split[1]);
+ }
+ return params;
+};
+
+
+/**
+ * Makes a link use AJAX instead of loading an entire page.
+ *
+ * This function will work for links (both standard links and links which
+ * invoke confirm_box) and forms. It will be called automatically for links
+ * and forms with the data-ajax attribute set, and will call the necessary
+ * callback.
+ *
+ * For more info, view the following page on the phpBB wiki:
+ * http://wiki.phpbb.com/JavaScript_Function.phpbb.ajaxify
+ *
+ * @param object options Options.
+ * @param bool/function refresh If we are sent back a refresh, should it be
+ * acted upon? This can either be true / false / a function.
+ * @param function callback Callback to call on completion of event. Has
+ * three parameters: the element that the event was evoked from, the JSON
+ * that was returned and (if it is a form) the form action.
+ */
+phpbb.ajaxify = function(options) {
+ var elements = $(options.selector),
+ refresh = options.refresh,
+ callback = options.callback,
+ overlay = (typeof options.overlay !== 'undefined') ? options.overlay : true,
+ isForm = elements.is('form'),
+ eventName = isForm ? 'submit' : 'click';
+
+ elements.bind(eventName, function(event) {
+ var action, method, data, submit, that = this, $this = $(this);
+
+ if ($this.find('input[type="submit"][data-clicked]').attr('data-ajax') === 'false') {
+ return;
+ }
+
+ /**
+ * Handler for AJAX errors
+ */
+ function errorHandler(jqXHR, textStatus, errorThrown) {
+ if (console && console.log) {
+ console.log('AJAX error. status: ' + textStatus + ', message: ' + errorThrown);
+ }
+ phpbb.clearLoadingTimeout();
+ var errorText = false;
+ if (typeof errorThrown === 'string' && errorThrown.length > 0) {
+ errorText = errorThrown;
+ }
+ else {
+ errorText = dark.attr('data-ajax-error-text-' + textStatus);
+ if (typeof errorText !== 'string' || !errorText.length)
+ errorText = dark.attr('data-ajax-error-text');
+ }
+ phpbb.alert(dark.attr('data-ajax-error-title'), errorText);
+ }
+
+ /**
+ * This is a private function used to handle the callbacks, refreshes
+ * and alert. It calls the callback, refreshes the page if necessary, and
+ * displays an alert to the user and removes it after an amount of time.
+ *
+ * It cannot be called from outside this function, and is purely here to
+ * avoid repetition of code.
+ *
+ * @param object res The object sent back by the server.
+ */
+ function returnHandler(res) {
+ var alert;
+
+ phpbb.clearLoadingTimeout();
+
+ // Is a confirmation required?
+ if (typeof res.S_CONFIRM_ACTION === 'undefined') {
+ // If a confirmation is not required, display an alert and call the
+ // callbacks.
+ if (typeof res.MESSAGE_TITLE !== 'undefined') {
+ alert = phpbb.alert(res.MESSAGE_TITLE, res.MESSAGE_TEXT);
+ } else {
+ dark.fadeOut(phpbb.alertTime);
+ }
+
+ if (typeof phpbb.ajaxCallbacks[callback] === 'function') {
+ phpbb.ajaxCallbacks[callback].call(that, res);
+ }
+
+ // If the server says to refresh the page, check whether the page should
+ // be refreshed and refresh page after specified time if required.
+ if (res.REFRESH_DATA) {
+ if (typeof refresh === 'function') {
+ refresh = refresh(res.REFRESH_DATA.url);
+ } else if (typeof refresh !== 'boolean') {
+ refresh = false;
+ }
+
+ setTimeout(function() {
+ if (refresh) {
+ window.location = res.REFRESH_DATA.url;
+ }
+
+ // Hide the alert even if we refresh the page, in case the user
+ // presses the back button.
+ dark.fadeOut(phpbb.alertTime, function() {
+ alert.hide();
+ });
+ }, res.REFRESH_DATA.time * 1000); // Server specifies time in seconds
+ }
+ } else {
+ // If confirmation is required, display a dialog to the user.
+ phpbb.confirm(res.MESSAGE_BODY, function(del) {
+ if (del) {
+ phpbb.loadingIndicator();
+ data = $('<form>' + res.S_HIDDEN_FIELDS + '</form>').serialize();
+ $.ajax({
+ url: res.S_CONFIRM_ACTION,
+ type: 'POST',
+ data: data + '&confirm=' + res.YES_VALUE + '&' + $('#phpbb_confirm form').serialize(),
+ success: returnHandler,
+ error: errorHandler
+ });
+ }
+ }, false);
+ }
+ }
+
+ // If the element is a form, POST must be used and some extra data must
+ // be taken from the form.
+ var runFilter = (typeof options.filter === 'function');
+
+ if (isForm) {
+ action = $this.attr('action').replace('&amp;', '&');
+ data = $this.serializeArray();
+ method = $this.attr('method') || 'GET';
+
+ if ($this.find('input[type="submit"][data-clicked]')) {
+ submit = $this.find('input[type="submit"][data-clicked]');
+ data.push({
+ name: submit.attr('name'),
+ value: submit.val()
+ });
+ }
+ } else {
+ action = this.href;
+ data = null;
+ method = 'GET';
+ }
+
+ // If filter function returns false, cancel the AJAX functionality,
+ // and return true (meaning that the HTTP request will be sent normally).
+ if (runFilter && !options.filter.call(this, data)) {
+ return;
+ }
+
+ if (overlay && (typeof $this.attr('data-overlay') === 'undefined' || $this.attr('data-overlay') === 'true')) {
+ phpbb.loadingIndicator();
+ }
+
+ var request = $.ajax({
+ url: action,
+ type: method,
+ data: data,
+ success: returnHandler,
+ error: errorHandler
+ });
+ request.always(function() {
+ loadingIndicator.fadeOut(phpbb.alertTime);
+ });
+
+ event.preventDefault();
+ });
+
+ if (isForm) {
+ elements.find('input:submit').click(function () {
+ var $this = $(this);
+
+ $this.siblings('[data-clicked]').removeAttr('data-clicked');
+ $this.attr('data-clicked', 'true');
+ });
+ }
+
+ return this;
+};
+
+/**
+* Hide the optgroups that are not the selected timezone
+*
+* @param bool keepSelection Shall we keep the value selected, or shall the user be forced to repick one.
+*/
+phpbb.timezoneSwitchDate = function(keepSelection) {
+ if ($('#timezone_copy').length === 0) {
+ // We make a backup of the original dropdown, so we can remove optgroups
+ // instead of setting display to none, because IE and chrome will not
+ // hide options inside of optgroups and selects via css
+ $('#timezone').clone().attr('id', 'timezone_copy').css('display', 'none').attr('name', 'tz_copy').insertAfter('#timezone');
+ } else {
+ // Copy the content of our backup, so we can remove all unneeded options
+ $('#timezone').replaceWith($('#timezone_copy').clone().attr('id', 'timezone').css('display', 'block').attr('name', 'tz'));
+ }
+
+ if ($('#tz_date').val() !== '') {
+ $('#timezone > optgroup').remove(":not([label='" + $('#tz_date').val() + "'])");
+ }
+
+ if ($('#tz_date').val() === $('#tz_select_date_suggest').attr('data-suggested-tz')) {
+ $('#tz_select_date_suggest').css('display', 'none');
+ } else {
+ $('#tz_select_date_suggest').css('display', 'inline');
+ }
+
+ if ($("#timezone > optgroup[label='" + $('#tz_date').val() + "'] > option").size() === 1) {
+ // If there is only one timezone for the selected date, we just select that automatically.
+ $("#timezone > optgroup[label='" + $('#tz_date').val() + "'] > option:first").attr('selected', true);
+ keepSelection = true;
+ }
+
+ if (typeof keepSelection !== 'undefined' && !keepSelection) {
+ var timezoneOptions = $('#timezone > optgroup option');
+ if (timezoneOptions.filter(':selected').length <= 0) {
+ timezoneOptions.filter(':first').attr('selected', true);
+ }
+ }
+};
+
+/**
+* Display the date/time select
+*/
+phpbb.timezoneEnableDateSelection = function() {
+ $('#tz_select_date').css('display', 'block');
+};
+
+/**
+* Preselect a date/time or suggest one, if it is not picked.
+*
+* @param bool forceSelector Shall we select the suggestion?
+*/
+phpbb.timezonePreselectSelect = function(forceSelector) {
+
+ // The offset returned here is in minutes and negated.
+ // http://www.w3schools.com/jsref/jsref_getTimezoneOffset.asp
+ var offset = (new Date()).getTimezoneOffset();
+ var sign = '-';
+
+ if (offset < 0) {
+ sign = '+';
+ offset = -offset;
+ }
+
+ var minutes = offset % 60;
+ var hours = (offset - minutes) / 60;
+
+ if (hours < 10) {
+ hours = '0' + hours.toString();
+ } else {
+ hours = hours.toString();
+ }
+
+ if (minutes < 10) {
+ minutes = '0' + minutes.toString();
+ } else {
+ minutes = minutes.toString();
+ }
+
+ var prefix = 'GMT' + sign + hours + ':' + minutes;
+ var prefixLength = prefix.length;
+ var selectorOptions = $('#tz_date > option');
+ var i;
+
+ for (i = 0; i < selectorOptions.length; ++i) {
+ var option = selectorOptions[i];
+
+ if (option.value.substring(0, prefixLength) === prefix) {
+ if ($('#tz_date').val() !== option.value && !forceSelector) {
+ // We do not select the option for the user, but notify him,
+ // that we would suggest a different setting.
+ phpbb.timezoneSwitchDate(true);
+ $('#tz_select_date_suggest').css('display', 'inline');
+ } else {
+ option.selected = true;
+ phpbb.timezoneSwitchDate(!forceSelector);
+ $('#tz_select_date_suggest').css('display', 'none');
+ }
+
+ $('#tz_select_date_suggest').attr('title', $('#tz_select_date_suggest').attr('data-l-suggestion').replace("%s", option.innerHTML));
+ $('#tz_select_date_suggest').attr('value', $('#tz_select_date_suggest').attr('data-l-suggestion').replace("%s", option.innerHTML.substring(0, 9)));
+ $('#tz_select_date_suggest').attr('data-suggested-tz', option.innerHTML);
+
+ // Found the suggestion, there cannot be more, so return from here.
+ return;
+ }
+ }
+};
+
+// Toggle notification list
+$('#notification_list_button').click(function(e) {
+ $('#notification_list').toggle();
+ e.preventDefault();
+});
+$('#phpbb').click(function(e) {
+ var target = $(e.target);
+
+ if (!target.is('#notification_list, #notification_list_button') && !target.parents().is('#notification_list, #notification_list_button')) {
+ $('#notification_list').hide();
+ }
+});
+
+phpbb.ajaxCallbacks = {};
+
+/**
+ * Adds an AJAX callback to be used by phpbb.ajaxify.
+ *
+ * See the phpbb.ajaxify comments for information on stuff like parameters.
+ *
+ * @param string id The name of the callback.
+ * @param function callback The callback to be called.
+ */
+phpbb.addAjaxCallback = function(id, callback) {
+ if (typeof callback === 'function') {
+ phpbb.ajaxCallbacks[id] = callback;
+ }
+ return this;
+};
+
+
+/**
+ * This callback alternates text - it replaces the current text with the text in
+ * the alt-text data attribute, and replaces the text in the attribute with the
+ * current text so that the process can be repeated.
+ */
+phpbb.addAjaxCallback('alt_text', function() {
+ var el = $(this),
+ altText;
+
+ altText = el.attr('data-alt-text');
+ el.attr('data-alt-text', el.text());
+ el.attr('title', altText);
+ el.text(altText);
+});
+
+/**
+ * This callback is based on the alt_text callback.
+ *
+ * It replaces the current text with the text in the alt-text data attribute,
+ * and replaces the text in the attribute with the current text so that the
+ * process can be repeated.
+ * Additionally it replaces the class of the link's parent
+ * and changes the link itself.
+ */
+phpbb.addAjaxCallback('toggle_link', function() {
+ var el = $(this),
+ toggleText,
+ toggleUrl,
+ toggleClass;
+
+ // Toggle link text
+
+ toggleText = el.attr('data-toggle-text');
+ el.attr('data-toggle-text', el.text());
+ el.attr('title', toggleText);
+ el.text(toggleText);
+
+ // Toggle link url
+ toggleUrl = el.attr('data-toggle-url');
+ el.attr('data-toggle-url', el.attr('href'));
+ el.attr('href', toggleUrl);
+
+ // Toggle class of link parent
+ toggleClass = el.attr('data-toggle-class');
+ el.attr('data-toggle-class', el.parent().attr('class'));
+ el.parent().attr('class', toggleClass);
+});
+
+/**
+* Automatically resize textarea
+*
+* This function automatically resizes textarea elements when user
+* types text.
+*
+* @param {jQuery} items jQuery object(s) to resize
+* @param {object} options Optional parameter that adjusts default
+* configuration. See configuration variable
+*
+* Optional parameters:
+* minWindowHeight {number} Minimum browser window height when textareas are resized. Default = 500
+* minHeight {number} Minimum height of textarea. Default = 200
+* maxHeight {number} Maximum height of textarea. Default = 500
+* heightDiff {number} Minimum difference between window and textarea height. Default = 200
+* resizeCallback {function} Function to call after resizing textarea
+* resetCallback {function} Function to call when resize has been canceled
+
+* Callback function format: function(item) {}
+* this points to DOM object
+* item is a jQuery object, same as this
+*/
+phpbb.resizeTextArea = function(items, options) {
+ // Configuration
+ var configuration = {
+ minWindowHeight: 500,
+ minHeight: 200,
+ maxHeight: 500,
+ heightDiff: 200,
+ resizeCallback: function(item) { },
+ resetCallback: function(item) { }
+ };
+
+ if (isTouch) return;
+
+ if (arguments.length > 1) {
+ configuration = $.extend(configuration, options);
+ }
+
+ function resetAutoResize(item)
+ {
+ var $item = $(item);
+ if ($item.hasClass('auto-resized')) {
+ $(item).css({height: '', resize: ''}).removeClass('auto-resized');
+ configuration.resetCallback.call(item, $item);
+ }
+ }
+
+ function autoResize(item)
+ {
+ function setHeight(height)
+ {
+ height += parseInt($item.css('height')) - $item.height();
+ $item.css({height: height + 'px', resize: 'none'}).addClass('auto-resized');
+ configuration.resizeCallback.call(item, $item);
+ }
+
+ var windowHeight = $(window).height();
+
+ if (windowHeight < configuration.minWindowHeight) {
+ resetAutoResize(item);
+ return;
+ }
+
+ var maxHeight = Math.min(Math.max(windowHeight - configuration.heightDiff, configuration.minHeight), configuration.maxHeight),
+ $item = $(item),
+ height = parseInt($item.height()),
+ scrollHeight = (item.scrollHeight) ? item.scrollHeight : 0;
+
+ if (height < 0) {
+ return;
+ }
+
+ if (height > maxHeight) {
+ setHeight(maxHeight);
+ }
+ else if (scrollHeight > (height + 5)) {
+ setHeight(Math.min(maxHeight, scrollHeight));
+ }
+ }
+
+ items.bind('focus change keyup', function() {
+ $(this).each(function() {
+ autoResize(this);
+ });
+ }).change();
+
+ $(window).resize(function() {
+ items.each(function() {
+ if ($(this).hasClass('auto-resized')) {
+ autoResize(this);
+ }
+ });
+ });
+};
+
+/**
+* Check if cursor in textarea is currently inside a bbcode tag
+*
+* @param {object} textarea Textarea DOM object
+* @param {Array} startTags List of start tags to look for
+* For example, Array('[code]', '[code=')
+* @param {Array} endTags List of end tags to look for
+* For example, Array('[/code]')
+*
+* @return {boolean} True if cursor is in bbcode tag
+*/
+phpbb.inBBCodeTag = function(textarea, startTags, endTags) {
+ var start = textarea.selectionStart,
+ lastEnd = -1,
+ lastStart = -1,
+ i, index, value;
+
+ if (typeof start !== 'number') {
+ return false;
+ }
+
+ value = textarea.value.toLowerCase();
+
+ for (i = 0; i < startTags.length; i++) {
+ var tagLength = startTags[i].length;
+ if (start >= tagLength) {
+ index = value.lastIndexOf(startTags[i], start - tagLength);
+ lastStart = Math.max(lastStart, index);
+ }
+ }
+ if (lastStart == -1) return false;
+
+ if (start > 0) {
+ for (i = 0; i < endTags.length; i++) {
+ index = value.lastIndexOf(endTags[i], start - 1);
+ lastEnd = Math.max(lastEnd, index);
+ }
+ }
+
+ return (lastEnd < lastStart);
+}
+
+
+/**
+* Adjust textarea to manage code bbcode
+*
+* This function allows to use tab characters when typing code
+* and keeps indentation of previous line of code when adding new
+* line while typing code.
+*
+* Editor's functionality is changed only when cursor is between
+* [code] and [/code] bbcode tags.
+*
+* @param {object} textarea Textarea DOM object to apply editor to
+*/
+phpbb.applyCodeEditor = function(textarea) {
+ // list of allowed start and end bbcode code tags, in lower case
+ var startTags = ['[code]', '[code='],
+ startTagsEnd = ']',
+ endTags = ['[/code]'];
+
+ if (!textarea || typeof textarea.selectionStart !== 'number') {
+ return;
+ }
+
+ if ($(textarea).data('code-editor') === true) {
+ return;
+ }
+
+ function inTag() {
+ return phpbb.inBBCodeTag(textarea, startTags, endTags);
+ }
+
+ /**
+ * Get line of text before cursor
+ *
+ * @param {boolean} stripCodeStart If true, only part of line
+ * after [code] tag will be returned.
+ *
+ * @return {string} Line of text
+ */
+ function getLastLine(stripCodeStart) {
+ var start = textarea.selectionStart,
+ value = textarea.value,
+ index = value.lastIndexOf("\n", start - 1);
+
+ value = value.substring(index + 1, start);
+
+ if (stripCodeStart) {
+ for (var i = 0; i < startTags.length; i++) {
+ index = value.lastIndexOf(startTags[i]);
+ if (index >= 0) {
+ var tagLength = startTags[i].length;
+
+ value = value.substring(index + tagLength);
+ if (startTags[i].lastIndexOf(startTagsEnd) != tagLength) {
+ index = value.indexOf(startTagsEnd);
+
+ if (index >= 0) {
+ value = value.substr(index + 1);
+ }
+ }
+ }
+ }
+ }
+
+ return value;
+ }
+
+ /**
+ * Append text at cursor position
+ *
+ * @param {string} Text Text to append
+ */
+ function appendText(text) {
+ var start = textarea.selectionStart,
+ end = textarea.selectionEnd,
+ value = textarea.value;
+
+ textarea.value = value.substr(0, start) + text + value.substr(end);
+ textarea.selectionStart = textarea.selectionEnd = start + text.length;
+ }
+
+ $(textarea).data('code-editor', true).on('keydown', function(event) {
+ var key = event.keyCode || event.which;
+
+ // intercept tabs
+ if (key == 9) {
+ if (inTag()) {
+ appendText("\t");
+ event.preventDefault();
+ return;
+ }
+ }
+
+ // intercept new line characters
+ if (key == 13) {
+ if (inTag()) {
+ var lastLine = getLastLine(true),
+ code = '' + /^\s*/g.exec(lastLine);
+
+ if (code.length > 0) {
+ appendText("\n" + code);
+ event.preventDefault();
+ return;
+ }
+ }
+ }
+ });
+};
+
+/**
+* List of classes that toggle dropdown menu,
+* list of classes that contain visible dropdown menu
+*
+* Add your own classes to strings with comma (probably you
+* will never need to do that)
+*/
+phpbb.dropdownHandles = '.dropdown-container.dropdown-visible .dropdown-toggle';
+phpbb.dropdownVisibleContainers = '.dropdown-container.dropdown-visible';
+
+/**
+* Dropdown toggle event handler
+* This handler is used by phpBB.registerDropdown() and other functions
+*/
+phpbb.toggleDropdown = function() {
+ var $this = $(this),
+ options = $this.data('dropdown-options'),
+ parent = options.parent,
+ visible = parent.hasClass('dropdown-visible');
+
+ if (!visible) {
+ // Hide other dropdown menus
+ $(phpbb.dropdownHandles).each(phpbb.toggleDropdown);
+
+ // Figure out direction of dropdown
+ var direction = options.direction,
+ verticalDirection = options.verticalDirection,
+ offset = $this.offset();
+
+ if (direction == 'auto') {
+ if (($(window).width() - $this.outerWidth(true)) / 2 > offset.left) {
+ direction = 'right';
+ }
+ else {
+ direction = 'left';
+ }
+ }
+ parent.toggleClass(options.leftClass, direction == 'left').toggleClass(options.rightClass, direction == 'right');
+
+ if (verticalDirection == 'auto') {
+ var height = $(window).height(),
+ top = offset.top - $(window).scrollTop();
+
+ if (top < height * 0.7) {
+ verticalDirection = 'down';
+ }
+ else {
+ verticalDirection = 'up';
+ }
+ }
+ parent.toggleClass(options.upClass, verticalDirection == 'up').toggleClass(options.downClass, verticalDirection == 'down');
+ }
+
+ options.dropdown.toggle();
+ parent.toggleClass(options.visibleClass, !visible).toggleClass('dropdown-visible', !visible);
+
+ // Check dimensions when showing dropdown
+ // !visible because variable shows state of dropdown before it was toggled
+ if (!visible) {
+ options.dropdown.find('.dropdown-contents').each(function() {
+ var $this = $(this),
+ windowWidth = $(window).width();
+
+ $this.css({
+ marginLeft: 0,
+ left: 0,
+ maxWidth: (windowWidth - 4) + 'px'
+ });
+
+ var offset = $this.offset().left,
+ width = $this.outerWidth(true);
+
+ if (offset < 2) {
+ $this.css('left', (2 - offset) + 'px');
+ }
+ else if ((offset + width + 2) > windowWidth) {
+ $this.css('margin-left', (windowWidth - offset - width - 2) + 'px');
+ }
+ });
+ }
+
+ // Prevent event propagation
+ if (arguments.length > 0) {
+ try {
+ var e = arguments[0];
+ e.preventDefault();
+ e.stopPropagation();
+ }
+ catch (error) { }
+ }
+ return false;
+};
+
+/**
+* Toggle dropdown submenu
+*/
+phpbb.toggleSubmenu = function(e) {
+ $(this).siblings('.dropdown-submenu').toggle();
+ e.preventDefault();
+}
+
+/**
+* Register dropdown menu
+* Shows/hides dropdown, decides which side to open to
+*
+* @param {jQuery} toggle Link that toggles dropdown.
+* @param {jQuery} dropdown Dropdown menu.
+* @param {Object} options List of options. Optional.
+*/
+phpbb.registerDropdown = function(toggle, dropdown, options)
+{
+ var ops = {
+ parent: toggle.parent(), // Parent item to add classes to
+ direction: 'auto', // Direction of dropdown menu. Possible values: auto, left, right
+ verticalDirection: 'auto', // Vertical direction. Possible values: auto, up, down
+ visibleClass: 'visible', // Class to add to parent item when dropdown is visible
+ leftClass: 'dropdown-left', // Class to add to parent item when dropdown opens to left side
+ rightClass: 'dropdown-right', // Class to add to parent item when dropdown opens to right side
+ upClass: 'dropdown-up', // Class to add to parent item when dropdown opens above menu item
+ downClass: 'dropdown-down' // Class to add to parent item when dropdown opens below menu item
+ };
+ if (options) {
+ ops = $.extend(ops, options);
+ }
+ ops.dropdown = dropdown;
+
+ ops.parent.addClass('dropdown-container');
+ toggle.addClass('dropdown-toggle');
+
+ toggle.data('dropdown-options', ops);
+
+ toggle.click(phpbb.toggleDropdown);
+ $('.dropdown-toggle-submenu', ops.parent).click(phpbb.toggleSubmenu);
+};
+
+/**
+* Get the HTML for a color palette table.
+*
+* @param string dir Palette direction - either v or h
+* @param int width Palette cell width.
+* @param int height Palette cell height.
+*/
+phpbb.colorPalette = function(dir, width, height) {
+ var r = 0,
+ g = 0,
+ b = 0,
+ numberList = new Array(6),
+ color = '',
+ html = '';
+
+ numberList[0] = '00';
+ numberList[1] = '40';
+ numberList[2] = '80';
+ numberList[3] = 'BF';
+ numberList[4] = 'FF';
+
+ var table_class = (dir == 'h') ? 'horizontal-palette' : 'vertical-palette';
+ html += '<table class="not-responsive colour-palette ' + table_class + '" style="width: auto;">';
+
+ for (r = 0; r < 5; r++) {
+ if (dir == 'h') {
+ html += '<tr>';
+ }
+
+ for (g = 0; g < 5; g++) {
+ if (dir == 'v') {
+ html += '<tr>';
+ }
+
+ for (b = 0; b < 5; b++) {
+ color = String(numberList[r]) + String(numberList[g]) + String(numberList[b]);
+ html += '<td style="background-color: #' + color + '; width: ' + width + 'px; height: ' + height + 'px;">';
+ html += '<a href="#" data-color="' + color + '" style="display: block; width: ' + width + 'px; height: ' + height + 'px; " alt="#' + color + '" title="#' + color + '"></a>';
+ html += '</td>';
+ }
+
+ if (dir == 'v') {
+ html += '</tr>';
+ }
+ }
+
+ if (dir == 'h') {
+ html += '</tr>';
+ }
+ }
+ html += '</table>';
+ return html;
+}
+
+/**
+* Register a color palette.
+*
+* @param object el jQuery object for the palette container.
+*/
+phpbb.registerPalette = function(el) {
+ var orientation = el.attr('data-orientation'),
+ height = el.attr('data-height'),
+ width = el.attr('data-width'),
+ target = el.attr('data-target'),
+ bbcode = el.attr('data-bbcode');
+
+ // Insert the palette HTML into the container.
+ el.html(phpbb.colorPalette(orientation, width, height));
+
+ // Add toggle control.
+ $('#color_palette_toggle').click(function(e) {
+ el.toggle();
+ e.preventDefault();
+ });
+
+ // Attach event handler when a palette cell is clicked.
+ $(el).on('click', 'a', function(e) {
+ var color = $(this).attr('data-color');
+
+ if (bbcode) {
+ bbfontstyle('[color=#' + color + ']', '[/color]');
+ } else {
+ $(target).val(color);
+ }
+ e.preventDefault();
+ });
+}
+
+/**
+* Apply code editor to all textarea elements with data-bbcode attribute
+*/
+$(document).ready(function() {
+ $('textarea[data-bbcode]').each(function() {
+ phpbb.applyCodeEditor(this);
+ });
+
+ // Hide active dropdowns when click event happens outside
+ $('body').click(function(e) {
+ var parents = $(e.target).parents();
+ if (!parents.is(phpbb.dropdownVisibleContainers)) {
+ $(phpbb.dropdownHandles).each(phpbb.toggleDropdown);
+ }
+ });
+
+ $('#color_palette_placeholder').each(function() {
+ phpbb.registerPalette($(this));
+ });
+});
+
+})(jQuery); // Avoid conflicts with other libraries
diff --git a/phpBB/styles/subsilver2/template/editor.js b/phpBB/assets/javascript/editor.js
index 103a271a71..dfc7dab525 100644
--- a/phpBB/styles/subsilver2/template/editor.js
+++ b/phpBB/assets/javascript/editor.js
@@ -11,18 +11,16 @@ var bbcodeEnabled = true;
// Check for Browser & Platform for PC & IE specific bits
// More details from: http://www.mozilla.org/docs/web-developer/sniffer/browser_type.html
var clientPC = navigator.userAgent.toLowerCase(); // Get client info
-var clientVer = parseInt(navigator.appVersion); // Get browser version
-
-var is_ie = ((clientPC.indexOf('msie') != -1) && (clientPC.indexOf('opera') == -1));
-var is_win = ((clientPC.indexOf('win') != -1) || (clientPC.indexOf('16bit') != -1));
+var clientVer = parseInt(navigator.appVersion, 10); // Get browser version
+var is_ie = ((clientPC.indexOf('msie') !== -1) && (clientPC.indexOf('opera') === -1));
+var is_win = ((clientPC.indexOf('win') !== -1) || (clientPC.indexOf('16bit') !== -1));
var baseHeight;
/**
* Shows the help messages in the helpline window
*/
-function helpline(help)
-{
+function helpline(help) {
document.forms[form_name].helpbox.value = help_line[help];
}
@@ -30,27 +28,22 @@ function helpline(help)
* Fix a bug involving the TextRange object. From
* http://www.frostjedi.com/terra/scripts/demo/caretBug.html
*/
-function initInsertions()
-{
+function initInsertions() {
var doc;
- if (document.forms[form_name])
- {
+ if (document.forms[form_name]) {
doc = document;
- }
- else
- {
+ } else {
doc = opener.document;
}
var textarea = doc.forms[form_name].elements[text_name];
- if (is_ie && typeof(baseHeight) != 'number')
- {
+
+ if (is_ie && typeof(baseHeight) !== 'number') {
textarea.focus();
baseHeight = doc.selection.createRange().duplicate().boundingHeight;
- if (!document.forms[form_name])
- {
+ if (!document.forms[form_name]) {
document.body.focus();
}
}
@@ -59,14 +52,10 @@ function initInsertions()
/**
* bbstyle
*/
-function bbstyle(bbnumber)
-{
- if (bbnumber != -1)
- {
+function bbstyle(bbnumber) {
+ if (bbnumber !== -1) {
bbfontstyle(bbtags[bbnumber], bbtags[bbnumber+1]);
- }
- else
- {
+ } else {
insert_text('[*]');
document.forms[form_name].elements[text_name].focus();
}
@@ -75,36 +64,31 @@ function bbstyle(bbnumber)
/**
* Apply bbcodes
*/
-function bbfontstyle(bbopen, bbclose)
-{
+function bbfontstyle(bbopen, bbclose) {
theSelection = false;
-
+
var textarea = document.forms[form_name].elements[text_name];
textarea.focus();
- if ((clientVer >= 4) && is_ie && is_win)
- {
+ if ((clientVer >= 4) && is_ie && is_win) {
// Get text selection
theSelection = document.selection.createRange().text;
- if (theSelection)
- {
+ if (theSelection) {
// Add tags around selection
document.selection.createRange().text = bbopen + theSelection + bbclose;
- document.forms[form_name].elements[text_name].focus();
+ textarea.focus();
theSelection = '';
return;
}
- }
- else if (document.forms[form_name].elements[text_name].selectionEnd && (document.forms[form_name].elements[text_name].selectionEnd - document.forms[form_name].elements[text_name].selectionStart > 0))
- {
- mozWrap(document.forms[form_name].elements[text_name], bbopen, bbclose);
- document.forms[form_name].elements[text_name].focus();
+ } else if (textarea.selectionEnd && (textarea.selectionEnd - textarea.selectionStart > 0)) {
+ mozWrap(textarea, bbopen, bbclose);
+ textarea.focus();
theSelection = '';
return;
}
-
+
//The new position for the cursor after adding the bbcode
var caret_pos = getCaretPosition(textarea).start;
var new_pos = caret_pos + bbopen.length;
@@ -114,14 +98,12 @@ function bbfontstyle(bbopen, bbclose)
// Center the cursor when we don't have a selection
// Gecko and proper browsers
- if (!isNaN(textarea.selectionStart))
- {
+ if (!isNaN(textarea.selectionStart)) {
textarea.selectionStart = new_pos;
textarea.selectionEnd = new_pos;
- }
+ }
// IE
- else if (document.selection)
- {
+ else if (document.selection) {
var range = textarea.createTextRange();
range.move("character", new_pos);
range.select();
@@ -135,62 +117,49 @@ function bbfontstyle(bbopen, bbclose)
/**
* Insert text at position
*/
-function insert_text(text, spaces, popup)
-{
+function insert_text(text, spaces, popup) {
var textarea;
-
- if (!popup)
- {
+
+ if (!popup) {
textarea = document.forms[form_name].elements[text_name];
- }
- else
- {
+ } else {
textarea = opener.document.forms[form_name].elements[text_name];
}
- if (spaces)
- {
+
+ if (spaces) {
text = ' ' + text + ' ';
}
// Since IE9, IE also has textarea.selectionStart, but it still needs to be treated the old way.
// Therefore we simply add a !is_ie here until IE fixes the text-selection completely.
- if (!isNaN(textarea.selectionStart) && !is_ie)
- {
+ if (!isNaN(textarea.selectionStart) && !is_ie) {
var sel_start = textarea.selectionStart;
var sel_end = textarea.selectionEnd;
mozWrap(textarea, text, '');
textarea.selectionStart = sel_start + text.length;
textarea.selectionEnd = sel_end + text.length;
- }
-
- else if (textarea.createTextRange && textarea.caretPos)
- {
- if (baseHeight != textarea.caretPos.boundingHeight)
- {
+ } else if (textarea.createTextRange && textarea.caretPos) {
+ if (baseHeight !== textarea.caretPos.boundingHeight) {
textarea.focus();
storeCaret(textarea);
- }
+ }
+
var caret_pos = textarea.caretPos;
- caret_pos.text = caret_pos.text.charAt(caret_pos.text.length - 1) == ' ' ? caret_pos.text + text + ' ' : caret_pos.text + text;
-
- }
- else
- {
+ caret_pos.text = caret_pos.text.charAt(caret_pos.text.length - 1) === ' ' ? caret_pos.text + text + ' ' : caret_pos.text + text;
+ } else {
textarea.value = textarea.value + text;
}
- if (!popup)
- {
- textarea.focus();
- }
+ if (!popup) {
+ textarea.focus();
+ }
}
/**
* Add inline attachment at position
*/
-function attach_inline(index, filename)
-{
+function attach_inline(index, filename) {
insert_text('[attachment=' + index + ']' + filename + '[/attachment]');
document.forms[form_name].elements[text_name].focus();
}
@@ -198,79 +167,57 @@ function attach_inline(index, filename)
/**
* Add quote text to message
*/
-function addquote(post_id, username, l_wrote)
-{
+function addquote(post_id, username, l_wrote) {
var message_name = 'message_' + post_id;
var theSelection = '';
var divarea = false;
+ var i;
- if (l_wrote === undefined)
- {
+ if (l_wrote === undefined) {
// Backwards compatibility
l_wrote = 'wrote';
}
- if (document.all)
- {
+ if (document.all) {
divarea = document.all[message_name];
- }
- else
- {
+ } else {
divarea = document.getElementById(message_name);
}
// Get text selection - not only the post content :(
// IE9 must use the document.selection method but has the *.getSelection so we just force no IE
- if (window.getSelection && !is_ie && !window.opera)
- {
+ if (window.getSelection && !is_ie && !window.opera) {
theSelection = window.getSelection().toString();
- }
- else if (document.getSelection && !is_ie)
- {
+ } else if (document.getSelection && !is_ie) {
theSelection = document.getSelection();
- }
- else if (document.selection)
- {
+ } else if (document.selection) {
theSelection = document.selection.createRange().text;
}
- if (theSelection == '' || typeof theSelection == 'undefined' || theSelection == null)
- {
- if (divarea.innerHTML)
- {
+ if (theSelection === '' || typeof theSelection === 'undefined' || theSelection === null) {
+ if (divarea.innerHTML) {
theSelection = divarea.innerHTML.replace(/<br>/ig, '\n');
theSelection = theSelection.replace(/<br\/>/ig, '\n');
theSelection = theSelection.replace(/&lt\;/ig, '<');
theSelection = theSelection.replace(/&gt\;/ig, '>');
theSelection = theSelection.replace(/&amp\;/ig, '&');
theSelection = theSelection.replace(/&nbsp\;/ig, ' ');
- }
- else if (document.all)
- {
+ } else if (document.all) {
theSelection = divarea.innerText;
- }
- else if (divarea.textContent)
- {
+ } else if (divarea.textContent) {
theSelection = divarea.textContent;
- }
- else if (divarea.firstChild.nodeValue)
- {
+ } else if (divarea.firstChild.nodeValue) {
theSelection = divarea.firstChild.nodeValue;
}
}
- if (theSelection)
- {
- if (bbcodeEnabled)
- {
+ if (theSelection) {
+ if (bbcodeEnabled) {
insert_text('[quote="' + username + '"]' + theSelection + '[/quote]');
- }
- else
- {
+ } else {
insert_text(username + ' ' + l_wrote + ':' + '\n');
var lines = split_lines(theSelection);
- for (i = 0; i < lines.length; i++)
- {
+ for (i = 0; i < lines.length; i++) {
insert_text('> ' + lines[i] + '\n');
}
}
@@ -279,39 +226,32 @@ function addquote(post_id, username, l_wrote)
return;
}
-
-function split_lines(text)
-{
+function split_lines(text) {
var lines = text.split('\n');
var splitLines = new Array();
var j = 0;
- for(i = 0; i < lines.length; i++)
- {
- if (lines[i].length <= 80)
- {
+ var i;
+
+ for(i = 0; i < lines.length; i++) {
+ if (lines[i].length <= 80) {
splitLines[j] = lines[i];
j++;
- }
- else
- {
+ } else {
var line = lines[i];
- do
- {
- var splitAt = line.indexOf(' ', 80);
-
- if (splitAt == -1)
- {
+ var splitAt;
+ do {
+ splitAt = line.indexOf(' ', 80);
+
+ if (splitAt === -1) {
splitLines[j] = line;
j++;
- }
- else
- {
+ } else {
splitLines[j] = line.substring(0, splitAt);
line = line.substring(splitAt);
j++;
}
}
- while(splitAt != -1);
+ while(splitAt !== -1);
}
}
return splitLines;
@@ -320,15 +260,13 @@ function split_lines(text)
/**
* From http://www.massless.org/mozedit/
*/
-function mozWrap(txtarea, open, close)
-{
- var selLength = (typeof(txtarea.textLength) == 'undefined') ? txtarea.value.length : txtarea.textLength;
+function mozWrap(txtarea, open, close) {
+ var selLength = (typeof(txtarea.textLength) === 'undefined') ? txtarea.value.length : txtarea.textLength;
var selStart = txtarea.selectionStart;
var selEnd = txtarea.selectionEnd;
var scrollTop = txtarea.scrollTop;
- if (selEnd == 1 || selEnd == 2)
- {
+ if (selEnd === 1 || selEnd === 2) {
selEnd = selLength;
}
@@ -349,110 +287,48 @@ function mozWrap(txtarea, open, close)
* Insert at Caret position. Code from
* http://www.faqts.com/knowledge_base/view.phtml/aid/1052/fid/130
*/
-function storeCaret(textEl)
-{
- if (textEl.createTextRange && document.selection)
- {
+function storeCaret(textEl) {
+ if (textEl.createTextRange && document.selection) {
textEl.caretPos = document.selection.createRange().duplicate();
}
}
/**
-* Color pallette
-*/
-function colorPalette(dir, width, height)
-{
- var r = 0, g = 0, b = 0;
- var numberList = new Array(6);
- var color = '';
-
- numberList[0] = '00';
- numberList[1] = '40';
- numberList[2] = '80';
- numberList[3] = 'BF';
- numberList[4] = 'FF';
-
- document.writeln('<table cellspacing="1" cellpadding="0" border="0">');
-
- for (r = 0; r < 5; r++)
- {
- if (dir == 'h')
- {
- document.writeln('<tr>');
- }
-
- for (g = 0; g < 5; g++)
- {
- if (dir == 'v')
- {
- document.writeln('<tr>');
- }
-
- for (b = 0; b < 5; b++)
- {
- color = String(numberList[r]) + String(numberList[g]) + String(numberList[b]);
- document.write('<td bgcolor="#' + color + '" style="width: ' + width + 'px; height: ' + height + 'px;">');
- document.write('<a href="#" onclick="bbfontstyle(\'[color=#' + color + ']\', \'[/color]\'); return false;"><img src="images/spacer.gif" width="' + width + '" height="' + height + '" alt="#' + color + '" title="#' + color + '" /></a>');
- document.writeln('</td>');
- }
-
- if (dir == 'v')
- {
- document.writeln('</tr>');
- }
- }
-
- if (dir == 'h')
- {
- document.writeln('</tr>');
- }
- }
- document.writeln('</table>');
-}
-
-
-/**
* Caret Position object
*/
-function caretPosition()
-{
+function caretPosition() {
var start = null;
var end = null;
}
-
/**
* Get the caret position in an textarea
*/
-function getCaretPosition(txtarea)
-{
+function getCaretPosition(txtarea) {
var caretPos = new caretPosition();
-
+
// simple Gecko/Opera way
- if(txtarea.selectionStart || txtarea.selectionStart == 0)
- {
+ if (txtarea.selectionStart || txtarea.selectionStart === 0) {
caretPos.start = txtarea.selectionStart;
caretPos.end = txtarea.selectionEnd;
}
// dirty and slow IE way
- else if(document.selection)
- {
+ else if (document.selection) {
// get current selection
var range = document.selection.createRange();
// a new selection of the whole textarea
var range_all = document.body.createTextRange();
range_all.moveToElementText(txtarea);
-
+
// calculate selection start point by moving beginning of range_all to beginning of range
var sel_start;
- for (sel_start = 0; range_all.compareEndPoints('StartToStart', range) < 0; sel_start++)
- {
+ for (sel_start = 0; range_all.compareEndPoints('StartToStart', range) < 0; sel_start++) {
range_all.moveStart('character', 1);
}
-
+
txtarea.sel_start = sel_start;
-
+
// we ignore the end value for IE, this is already dirty enough and we don't need it
caretPos.start = txtarea.sel_start;
caretPos.end = txtarea.sel_start;
@@ -460,3 +336,29 @@ function getCaretPosition(txtarea)
return caretPos;
}
+
+/**
+* Allow to use tab character when typing code
+* Keep indentation of last line of code when typing code
+*/
+(function($) {
+ $(document).ready(function() {
+ var doc, textarea;
+
+ // find textarea, make sure browser supports necessary functions
+ if (document.forms[form_name]) {
+ doc = document;
+ } else {
+ doc = opener.document;
+ }
+
+ if (!doc.forms[form_name]) {
+ return;
+ }
+
+ textarea = doc.forms[form_name].elements[text_name];
+
+ phpbb.applyCodeEditor(textarea);
+ });
+})(jQuery);
+
diff --git a/phpBB/assets/javascript/jquery.js b/phpBB/assets/javascript/jquery.js
new file mode 100644
index 0000000000..83589daa70
--- /dev/null
+++ b/phpBB/assets/javascript/jquery.js
@@ -0,0 +1,2 @@
+/*! jQuery v1.8.3 jquery.com | jquery.org/license */
+(function(e,t){function _(e){var t=M[e]={};return v.each(e.split(y),function(e,n){t[n]=!0}),t}function H(e,n,r){if(r===t&&e.nodeType===1){var i="data-"+n.replace(P,"-$1").toLowerCase();r=e.getAttribute(i);if(typeof r=="string"){try{r=r==="true"?!0:r==="false"?!1:r==="null"?null:+r+""===r?+r:D.test(r)?v.parseJSON(r):r}catch(s){}v.data(e,n,r)}else r=t}return r}function B(e){var t;for(t in e){if(t==="data"&&v.isEmptyObject(e[t]))continue;if(t!=="toJSON")return!1}return!0}function et(){return!1}function tt(){return!0}function ut(e){return!e||!e.parentNode||e.parentNode.nodeType===11}function at(e,t){do e=e[t];while(e&&e.nodeType!==1);return e}function ft(e,t,n){t=t||0;if(v.isFunction(t))return v.grep(e,function(e,r){var i=!!t.call(e,r,e);return i===n});if(t.nodeType)return v.grep(e,function(e,r){return e===t===n});if(typeof t=="string"){var r=v.grep(e,function(e){return e.nodeType===1});if(it.test(t))return v.filter(t,r,!n);t=v.filter(t,r)}return v.grep(e,function(e,r){return v.inArray(e,t)>=0===n})}function lt(e){var t=ct.split("|"),n=e.createDocumentFragment();if(n.createElement)while(t.length)n.createElement(t.pop());return n}function Lt(e,t){return e.getElementsByTagName(t)[0]||e.appendChild(e.ownerDocument.createElement(t))}function At(e,t){if(t.nodeType!==1||!v.hasData(e))return;var n,r,i,s=v._data(e),o=v._data(t,s),u=s.events;if(u){delete o.handle,o.events={};for(n in u)for(r=0,i=u[n].length;r<i;r++)v.event.add(t,n,u[n][r])}o.data&&(o.data=v.extend({},o.data))}function Ot(e,t){var n;if(t.nodeType!==1)return;t.clearAttributes&&t.clearAttributes(),t.mergeAttributes&&t.mergeAttributes(e),n=t.nodeName.toLowerCase(),n==="object"?(t.parentNode&&(t.outerHTML=e.outerHTML),v.support.html5Clone&&e.innerHTML&&!v.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):n==="input"&&Et.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):n==="option"?t.selected=e.defaultSelected:n==="input"||n==="textarea"?t.defaultValue=e.defaultValue:n==="script"&&t.text!==e.text&&(t.text=e.text),t.removeAttribute(v.expando)}function Mt(e){return typeof e.getElementsByTagName!="undefined"?e.getElementsByTagName("*"):typeof e.querySelectorAll!="undefined"?e.querySelectorAll("*"):[]}function _t(e){Et.test(e.type)&&(e.defaultChecked=e.checked)}function Qt(e,t){if(t in e)return t;var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=Jt.length;while(i--){t=Jt[i]+n;if(t in e)return t}return r}function Gt(e,t){return e=t||e,v.css(e,"display")==="none"||!v.contains(e.ownerDocument,e)}function Yt(e,t){var n,r,i=[],s=0,o=e.length;for(;s<o;s++){n=e[s];if(!n.style)continue;i[s]=v._data(n,"olddisplay"),t?(!i[s]&&n.style.display==="none"&&(n.style.display=""),n.style.display===""&&Gt(n)&&(i[s]=v._data(n,"olddisplay",nn(n.nodeName)))):(r=Dt(n,"display"),!i[s]&&r!=="none"&&v._data(n,"olddisplay",r))}for(s=0;s<o;s++){n=e[s];if(!n.style)continue;if(!t||n.style.display==="none"||n.style.display==="")n.style.display=t?i[s]||"":"none"}return e}function Zt(e,t,n){var r=Rt.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function en(e,t,n,r){var i=n===(r?"border":"content")?4:t==="width"?1:0,s=0;for(;i<4;i+=2)n==="margin"&&(s+=v.css(e,n+$t[i],!0)),r?(n==="content"&&(s-=parseFloat(Dt(e,"padding"+$t[i]))||0),n!=="margin"&&(s-=parseFloat(Dt(e,"border"+$t[i]+"Width"))||0)):(s+=parseFloat(Dt(e,"padding"+$t[i]))||0,n!=="padding"&&(s+=parseFloat(Dt(e,"border"+$t[i]+"Width"))||0));return s}function tn(e,t,n){var r=t==="width"?e.offsetWidth:e.offsetHeight,i=!0,s=v.support.boxSizing&&v.css(e,"boxSizing")==="border-box";if(r<=0||r==null){r=Dt(e,t);if(r<0||r==null)r=e.style[t];if(Ut.test(r))return r;i=s&&(v.support.boxSizingReliable||r===e.style[t]),r=parseFloat(r)||0}return r+en(e,t,n||(s?"border":"content"),i)+"px"}function nn(e){if(Wt[e])return Wt[e];var t=v("<"+e+">").appendTo(i.body),n=t.css("display");t.remove();if(n==="none"||n===""){Pt=i.body.appendChild(Pt||v.extend(i.createElement("iframe"),{frameBorder:0,width:0,height:0}));if(!Ht||!Pt.createElement)Ht=(Pt.contentWindow||Pt.contentDocument).document,Ht.write("<!doctype html><html><body>"),Ht.close();t=Ht.body.appendChild(Ht.createElement(e)),n=Dt(t,"display"),i.body.removeChild(Pt)}return Wt[e]=n,n}function fn(e,t,n,r){var i;if(v.isArray(t))v.each(t,function(t,i){n||sn.test(e)?r(e,i):fn(e+"["+(typeof i=="object"?t:"")+"]",i,n,r)});else if(!n&&v.type(t)==="object")for(i in t)fn(e+"["+i+"]",t[i],n,r);else r(e,t)}function Cn(e){return function(t,n){typeof t!="string"&&(n=t,t="*");var r,i,s,o=t.toLowerCase().split(y),u=0,a=o.length;if(v.isFunction(n))for(;u<a;u++)r=o[u],s=/^\+/.test(r),s&&(r=r.substr(1)||"*"),i=e[r]=e[r]||[],i[s?"unshift":"push"](n)}}function kn(e,n,r,i,s,o){s=s||n.dataTypes[0],o=o||{},o[s]=!0;var u,a=e[s],f=0,l=a?a.length:0,c=e===Sn;for(;f<l&&(c||!u);f++)u=a[f](n,r,i),typeof u=="string"&&(!c||o[u]?u=t:(n.dataTypes.unshift(u),u=kn(e,n,r,i,u,o)));return(c||!u)&&!o["*"]&&(u=kn(e,n,r,i,"*",o)),u}function Ln(e,n){var r,i,s=v.ajaxSettings.flatOptions||{};for(r in n)n[r]!==t&&((s[r]?e:i||(i={}))[r]=n[r]);i&&v.extend(!0,e,i)}function An(e,n,r){var i,s,o,u,a=e.contents,f=e.dataTypes,l=e.responseFields;for(s in l)s in r&&(n[l[s]]=r[s]);while(f[0]==="*")f.shift(),i===t&&(i=e.mimeType||n.getResponseHeader("content-type"));if(i)for(s in a)if(a[s]&&a[s].test(i)){f.unshift(s);break}if(f[0]in r)o=f[0];else{for(s in r){if(!f[0]||e.converters[s+" "+f[0]]){o=s;break}u||(u=s)}o=o||u}if(o)return o!==f[0]&&f.unshift(o),r[o]}function On(e,t){var n,r,i,s,o=e.dataTypes.slice(),u=o[0],a={},f=0;e.dataFilter&&(t=e.dataFilter(t,e.dataType));if(o[1])for(n in e.converters)a[n.toLowerCase()]=e.converters[n];for(;i=o[++f];)if(i!=="*"){if(u!=="*"&&u!==i){n=a[u+" "+i]||a["* "+i];if(!n)for(r in a){s=r.split(" ");if(s[1]===i){n=a[u+" "+s[0]]||a["* "+s[0]];if(n){n===!0?n=a[r]:a[r]!==!0&&(i=s[0],o.splice(f--,0,i));break}}}if(n!==!0)if(n&&e["throws"])t=n(t);else try{t=n(t)}catch(l){return{state:"parsererror",error:n?l:"No conversion from "+u+" to "+i}}}u=i}return{state:"success",data:t}}function Fn(){try{return new e.XMLHttpRequest}catch(t){}}function In(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}function $n(){return setTimeout(function(){qn=t},0),qn=v.now()}function Jn(e,t){v.each(t,function(t,n){var r=(Vn[t]||[]).concat(Vn["*"]),i=0,s=r.length;for(;i<s;i++)if(r[i].call(e,t,n))return})}function Kn(e,t,n){var r,i=0,s=0,o=Xn.length,u=v.Deferred().always(function(){delete a.elem}),a=function(){var t=qn||$n(),n=Math.max(0,f.startTime+f.duration-t),r=n/f.duration||0,i=1-r,s=0,o=f.tweens.length;for(;s<o;s++)f.tweens[s].run(i);return u.notifyWith(e,[f,i,n]),i<1&&o?n:(u.resolveWith(e,[f]),!1)},f=u.promise({elem:e,props:v.extend({},t),opts:v.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:qn||$n(),duration:n.duration,tweens:[],createTween:function(t,n,r){var i=v.Tween(e,f.opts,t,n,f.opts.specialEasing[t]||f.opts.easing);return f.tweens.push(i),i},stop:function(t){var n=0,r=t?f.tweens.length:0;for(;n<r;n++)f.tweens[n].run(1);return t?u.resolveWith(e,[f,t]):u.rejectWith(e,[f,t]),this}}),l=f.props;Qn(l,f.opts.specialEasing);for(;i<o;i++){r=Xn[i].call(f,e,l,f.opts);if(r)return r}return Jn(f,l),v.isFunction(f.opts.start)&&f.opts.start.call(e,f),v.fx.timer(v.extend(a,{anim:f,queue:f.opts.queue,elem:e})),f.progress(f.opts.progress).done(f.opts.done,f.opts.complete).fail(f.opts.fail).always(f.opts.always)}function Qn(e,t){var n,r,i,s,o;for(n in e){r=v.camelCase(n),i=t[r],s=e[n],v.isArray(s)&&(i=s[1],s=e[n]=s[0]),n!==r&&(e[r]=s,delete e[n]),o=v.cssHooks[r];if(o&&"expand"in o){s=o.expand(s),delete e[r];for(n in s)n in e||(e[n]=s[n],t[n]=i)}else t[r]=i}}function Gn(e,t,n){var r,i,s,o,u,a,f,l,c,h=this,p=e.style,d={},m=[],g=e.nodeType&&Gt(e);n.queue||(l=v._queueHooks(e,"fx"),l.unqueued==null&&(l.unqueued=0,c=l.empty.fire,l.empty.fire=function(){l.unqueued||c()}),l.unqueued++,h.always(function(){h.always(function(){l.unqueued--,v.queue(e,"fx").length||l.empty.fire()})})),e.nodeType===1&&("height"in t||"width"in t)&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],v.css(e,"display")==="inline"&&v.css(e,"float")==="none"&&(!v.support.inlineBlockNeedsLayout||nn(e.nodeName)==="inline"?p.display="inline-block":p.zoom=1)),n.overflow&&(p.overflow="hidden",v.support.shrinkWrapBlocks||h.done(function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]}));for(r in t){s=t[r];if(Un.exec(s)){delete t[r],a=a||s==="toggle";if(s===(g?"hide":"show"))continue;m.push(r)}}o=m.length;if(o){u=v._data(e,"fxshow")||v._data(e,"fxshow",{}),"hidden"in u&&(g=u.hidden),a&&(u.hidden=!g),g?v(e).show():h.done(function(){v(e).hide()}),h.done(function(){var t;v.removeData(e,"fxshow",!0);for(t in d)v.style(e,t,d[t])});for(r=0;r<o;r++)i=m[r],f=h.createTween(i,g?u[i]:0),d[i]=u[i]||v.style(e,i),i in u||(u[i]=f.start,g&&(f.end=f.start,f.start=i==="width"||i==="height"?1:0))}}function Yn(e,t,n,r,i){return new Yn.prototype.init(e,t,n,r,i)}function Zn(e,t){var n,r={height:e},i=0;t=t?1:0;for(;i<4;i+=2-t)n=$t[i],r["margin"+n]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}function tr(e){return v.isWindow(e)?e:e.nodeType===9?e.defaultView||e.parentWindow:!1}var n,r,i=e.document,s=e.location,o=e.navigator,u=e.jQuery,a=e.$,f=Array.prototype.push,l=Array.prototype.slice,c=Array.prototype.indexOf,h=Object.prototype.toString,p=Object.prototype.hasOwnProperty,d=String.prototype.trim,v=function(e,t){return new v.fn.init(e,t,n)},m=/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source,g=/\S/,y=/\s+/,b=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,w=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,E=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,S=/^[\],:{}\s]*$/,x=/(?:^|:|,)(?:\s*\[)+/g,T=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,N=/"[^"\\\r\n]*"|true|false|null|-?(?:\d\d*\.|)\d+(?:[eE][\-+]?\d+|)/g,C=/^-ms-/,k=/-([\da-z])/gi,L=function(e,t){return(t+"").toUpperCase()},A=function(){i.addEventListener?(i.removeEventListener("DOMContentLoaded",A,!1),v.ready()):i.readyState==="complete"&&(i.detachEvent("onreadystatechange",A),v.ready())},O={};v.fn=v.prototype={constructor:v,init:function(e,n,r){var s,o,u,a;if(!e)return this;if(e.nodeType)return this.context=this[0]=e,this.length=1,this;if(typeof e=="string"){e.charAt(0)==="<"&&e.charAt(e.length-1)===">"&&e.length>=3?s=[null,e,null]:s=w.exec(e);if(s&&(s[1]||!n)){if(s[1])return n=n instanceof v?n[0]:n,a=n&&n.nodeType?n.ownerDocument||n:i,e=v.parseHTML(s[1],a,!0),E.test(s[1])&&v.isPlainObject(n)&&this.attr.call(e,n,!0),v.merge(this,e);o=i.getElementById(s[2]);if(o&&o.parentNode){if(o.id!==s[2])return r.find(e);this.length=1,this[0]=o}return this.context=i,this.selector=e,this}return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e)}return v.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),v.makeArray(e,this))},selector:"",jquery:"1.8.3",length:0,size:function(){return this.length},toArray:function(){return l.call(this)},get:function(e){return e==null?this.toArray():e<0?this[this.length+e]:this[e]},pushStack:function(e,t,n){var r=v.merge(this.constructor(),e);return r.prevObject=this,r.context=this.context,t==="find"?r.selector=this.selector+(this.selector?" ":"")+n:t&&(r.selector=this.selector+"."+t+"("+n+")"),r},each:function(e,t){return v.each(this,e,t)},ready:function(e){return v.ready.promise().done(e),this},eq:function(e){return e=+e,e===-1?this.slice(e):this.slice(e,e+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(l.apply(this,arguments),"slice",l.call(arguments).join(","))},map:function(e){return this.pushStack(v.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:[].sort,splice:[].splice},v.fn.init.prototype=v.fn,v.extend=v.fn.extend=function(){var e,n,r,i,s,o,u=arguments[0]||{},a=1,f=arguments.length,l=!1;typeof u=="boolean"&&(l=u,u=arguments[1]||{},a=2),typeof u!="object"&&!v.isFunction(u)&&(u={}),f===a&&(u=this,--a);for(;a<f;a++)if((e=arguments[a])!=null)for(n in e){r=u[n],i=e[n];if(u===i)continue;l&&i&&(v.isPlainObject(i)||(s=v.isArray(i)))?(s?(s=!1,o=r&&v.isArray(r)?r:[]):o=r&&v.isPlainObject(r)?r:{},u[n]=v.extend(l,o,i)):i!==t&&(u[n]=i)}return u},v.extend({noConflict:function(t){return e.$===v&&(e.$=a),t&&e.jQuery===v&&(e.jQuery=u),v},isReady:!1,readyWait:1,holdReady:function(e){e?v.readyWait++:v.ready(!0)},ready:function(e){if(e===!0?--v.readyWait:v.isReady)return;if(!i.body)return setTimeout(v.ready,1);v.isReady=!0;if(e!==!0&&--v.readyWait>0)return;r.resolveWith(i,[v]),v.fn.trigger&&v(i).trigger("ready").off("ready")},isFunction:function(e){return v.type(e)==="function"},isArray:Array.isArray||function(e){return v.type(e)==="array"},isWindow:function(e){return e!=null&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return e==null?String(e):O[h.call(e)]||"object"},isPlainObject:function(e){if(!e||v.type(e)!=="object"||e.nodeType||v.isWindow(e))return!1;try{if(e.constructor&&!p.call(e,"constructor")&&!p.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}var r;for(r in e);return r===t||p.call(e,r)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw new Error(e)},parseHTML:function(e,t,n){var r;return!e||typeof e!="string"?null:(typeof t=="boolean"&&(n=t,t=0),t=t||i,(r=E.exec(e))?[t.createElement(r[1])]:(r=v.buildFragment([e],t,n?null:[]),v.merge([],(r.cacheable?v.clone(r.fragment):r.fragment).childNodes)))},parseJSON:function(t){if(!t||typeof t!="string")return null;t=v.trim(t);if(e.JSON&&e.JSON.parse)return e.JSON.parse(t);if(S.test(t.replace(T,"@").replace(N,"]").replace(x,"")))return(new Function("return "+t))();v.error("Invalid JSON: "+t)},parseXML:function(n){var r,i;if(!n||typeof n!="string")return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(s){r=t}return(!r||!r.documentElement||r.getElementsByTagName("parsererror").length)&&v.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&g.test(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(C,"ms-").replace(k,L)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,n,r){var i,s=0,o=e.length,u=o===t||v.isFunction(e);if(r){if(u){for(i in e)if(n.apply(e[i],r)===!1)break}else for(;s<o;)if(n.apply(e[s++],r)===!1)break}else if(u){for(i in e)if(n.call(e[i],i,e[i])===!1)break}else for(;s<o;)if(n.call(e[s],s,e[s++])===!1)break;return e},trim:d&&!d.call("\ufeff\u00a0")?function(e){return e==null?"":d.call(e)}:function(e){return e==null?"":(e+"").replace(b,"")},makeArray:function(e,t){var n,r=t||[];return e!=null&&(n=v.type(e),e.length==null||n==="string"||n==="function"||n==="regexp"||v.isWindow(e)?f.call(r,e):v.merge(r,e)),r},inArray:function(e,t,n){var r;if(t){if(c)return c.call(t,e,n);r=t.length,n=n?n<0?Math.max(0,r+n):n:0;for(;n<r;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,n){var r=n.length,i=e.length,s=0;if(typeof r=="number")for(;s<r;s++)e[i++]=n[s];else while(n[s]!==t)e[i++]=n[s++];return e.length=i,e},grep:function(e,t,n){var r,i=[],s=0,o=e.length;n=!!n;for(;s<o;s++)r=!!t(e[s],s),n!==r&&i.push(e[s]);return i},map:function(e,n,r){var i,s,o=[],u=0,a=e.length,f=e instanceof v||a!==t&&typeof a=="number"&&(a>0&&e[0]&&e[a-1]||a===0||v.isArray(e));if(f)for(;u<a;u++)i=n(e[u],u,r),i!=null&&(o[o.length]=i);else for(s in e)i=n(e[s],s,r),i!=null&&(o[o.length]=i);return o.concat.apply([],o)},guid:1,proxy:function(e,n){var r,i,s;return typeof n=="string"&&(r=e[n],n=e,e=r),v.isFunction(e)?(i=l.call(arguments,2),s=function(){return e.apply(n,i.concat(l.call(arguments)))},s.guid=e.guid=e.guid||v.guid++,s):t},access:function(e,n,r,i,s,o,u){var a,f=r==null,l=0,c=e.length;if(r&&typeof r=="object"){for(l in r)v.access(e,n,l,r[l],1,o,i);s=1}else if(i!==t){a=u===t&&v.isFunction(i),f&&(a?(a=n,n=function(e,t,n){return a.call(v(e),n)}):(n.call(e,i),n=null));if(n)for(;l<c;l++)n(e[l],r,a?i.call(e[l],l,n(e[l],r)):i,u);s=1}return s?e:f?n.call(e):c?n(e[0],r):o},now:function(){return(new Date).getTime()}}),v.ready.promise=function(t){if(!r){r=v.Deferred();if(i.readyState==="complete")setTimeout(v.ready,1);else if(i.addEventListener)i.addEventListener("DOMContentLoaded",A,!1),e.addEventListener("load",v.ready,!1);else{i.attachEvent("onreadystatechange",A),e.attachEvent("onload",v.ready);var n=!1;try{n=e.frameElement==null&&i.documentElement}catch(s){}n&&n.doScroll&&function o(){if(!v.isReady){try{n.doScroll("left")}catch(e){return setTimeout(o,50)}v.ready()}}()}}return r.promise(t)},v.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(e,t){O["[object "+t+"]"]=t.toLowerCase()}),n=v(i);var M={};v.Callbacks=function(e){e=typeof e=="string"?M[e]||_(e):v.extend({},e);var n,r,i,s,o,u,a=[],f=!e.once&&[],l=function(t){n=e.memory&&t,r=!0,u=s||0,s=0,o=a.length,i=!0;for(;a&&u<o;u++)if(a[u].apply(t[0],t[1])===!1&&e.stopOnFalse){n=!1;break}i=!1,a&&(f?f.length&&l(f.shift()):n?a=[]:c.disable())},c={add:function(){if(a){var t=a.length;(function r(t){v.each(t,function(t,n){var i=v.type(n);i==="function"?(!e.unique||!c.has(n))&&a.push(n):n&&n.length&&i!=="string"&&r(n)})})(arguments),i?o=a.length:n&&(s=t,l(n))}return this},remove:function(){return a&&v.each(arguments,function(e,t){var n;while((n=v.inArray(t,a,n))>-1)a.splice(n,1),i&&(n<=o&&o--,n<=u&&u--)}),this},has:function(e){return v.inArray(e,a)>-1},empty:function(){return a=[],this},disable:function(){return a=f=n=t,this},disabled:function(){return!a},lock:function(){return f=t,n||c.disable(),this},locked:function(){return!f},fireWith:function(e,t){return t=t||[],t=[e,t.slice?t.slice():t],a&&(!r||f)&&(i?f.push(t):l(t)),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!r}};return c},v.extend({Deferred:function(e){var t=[["resolve","done",v.Callbacks("once memory"),"resolved"],["reject","fail",v.Callbacks("once memory"),"rejected"],["notify","progress",v.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return v.Deferred(function(n){v.each(t,function(t,r){var s=r[0],o=e[t];i[r[1]](v.isFunction(o)?function(){var e=o.apply(this,arguments);e&&v.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[s+"With"](this===i?n:this,[e])}:n[s])}),e=null}).promise()},promise:function(e){return e!=null?v.extend(e,r):r}},i={};return r.pipe=r.then,v.each(t,function(e,s){var o=s[2],u=s[3];r[s[1]]=o.add,u&&o.add(function(){n=u},t[e^1][2].disable,t[2][2].lock),i[s[0]]=o.fire,i[s[0]+"With"]=o.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=l.call(arguments),r=n.length,i=r!==1||e&&v.isFunction(e.promise)?r:0,s=i===1?e:v.Deferred(),o=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?l.call(arguments):r,n===u?s.notifyWith(t,n):--i||s.resolveWith(t,n)}},u,a,f;if(r>1){u=new Array(r),a=new Array(r),f=new Array(r);for(;t<r;t++)n[t]&&v.isFunction(n[t].promise)?n[t].promise().done(o(t,f,n)).fail(s.reject).progress(o(t,a,u)):--i}return i||s.resolveWith(f,n),s.promise()}}),v.support=function(){var t,n,r,s,o,u,a,f,l,c,h,p=i.createElement("div");p.setAttribute("className","t"),p.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",n=p.getElementsByTagName("*"),r=p.getElementsByTagName("a")[0];if(!n||!r||!n.length)return{};s=i.createElement("select"),o=s.appendChild(i.createElement("option")),u=p.getElementsByTagName("input")[0],r.style.cssText="top:1px;float:left;opacity:.5",t={leadingWhitespace:p.firstChild.nodeType===3,tbody:!p.getElementsByTagName("tbody").length,htmlSerialize:!!p.getElementsByTagName("link").length,style:/top/.test(r.getAttribute("style")),hrefNormalized:r.getAttribute("href")==="/a",opacity:/^0.5/.test(r.style.opacity),cssFloat:!!r.style.cssFloat,checkOn:u.value==="on",optSelected:o.selected,getSetAttribute:p.className!=="t",enctype:!!i.createElement("form").enctype,html5Clone:i.createElement("nav").cloneNode(!0).outerHTML!=="<:nav></:nav>",boxModel:i.compatMode==="CSS1Compat",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},u.checked=!0,t.noCloneChecked=u.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!o.disabled;try{delete p.test}catch(d){t.deleteExpando=!1}!p.addEventListener&&p.attachEvent&&p.fireEvent&&(p.attachEvent("onclick",h=function(){t.noCloneEvent=!1}),p.cloneNode(!0).fireEvent("onclick"),p.detachEvent("onclick",h)),u=i.createElement("input"),u.value="t",u.setAttribute("type","radio"),t.radioValue=u.value==="t",u.setAttribute("checked","checked"),u.setAttribute("name","t"),p.appendChild(u),a=i.createDocumentFragment(),a.appendChild(p.lastChild),t.checkClone=a.cloneNode(!0).cloneNode(!0).lastChild.checked,t.appendChecked=u.checked,a.removeChild(u),a.appendChild(p);if(p.attachEvent)for(l in{submit:!0,change:!0,focusin:!0})f="on"+l,c=f in p,c||(p.setAttribute(f,"return;"),c=typeof p[f]=="function"),t[l+"Bubbles"]=c;return v(function(){var n,r,s,o,u="padding:0;margin:0;border:0;display:block;overflow:hidden;",a=i.getElementsByTagName("body")[0];if(!a)return;n=i.createElement("div"),n.style.cssText="visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px",a.insertBefore(n,a.firstChild),r=i.createElement("div"),n.appendChild(r),r.innerHTML="<table><tr><td></td><td>t</td></tr></table>",s=r.getElementsByTagName("td"),s[0].style.cssText="padding:0;margin:0;border:0;display:none",c=s[0].offsetHeight===0,s[0].style.display="",s[1].style.display="none",t.reliableHiddenOffsets=c&&s[0].offsetHeight===0,r.innerHTML="",r.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",t.boxSizing=r.offsetWidth===4,t.doesNotIncludeMarginInBodyOffset=a.offsetTop!==1,e.getComputedStyle&&(t.pixelPosition=(e.getComputedStyle(r,null)||{}).top!=="1%",t.boxSizingReliable=(e.getComputedStyle(r,null)||{width:"4px"}).width==="4px",o=i.createElement("div"),o.style.cssText=r.style.cssText=u,o.style.marginRight=o.style.width="0",r.style.width="1px",r.appendChild(o),t.reliableMarginRight=!parseFloat((e.getComputedStyle(o,null)||{}).marginRight)),typeof r.style.zoom!="undefined"&&(r.innerHTML="",r.style.cssText=u+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=r.offsetWidth===3,r.style.display="block",r.style.overflow="visible",r.innerHTML="<div></div>",r.firstChild.style.width="5px",t.shrinkWrapBlocks=r.offsetWidth!==3,n.style.zoom=1),a.removeChild(n),n=r=s=o=null}),a.removeChild(p),n=r=s=o=u=a=p=null,t}();var D=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,P=/([A-Z])/g;v.extend({cache:{},deletedIds:[],uuid:0,expando:"jQuery"+(v.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(e){return e=e.nodeType?v.cache[e[v.expando]]:e[v.expando],!!e&&!B(e)},data:function(e,n,r,i){if(!v.acceptData(e))return;var s,o,u=v.expando,a=typeof n=="string",f=e.nodeType,l=f?v.cache:e,c=f?e[u]:e[u]&&u;if((!c||!l[c]||!i&&!l[c].data)&&a&&r===t)return;c||(f?e[u]=c=v.deletedIds.pop()||v.guid++:c=u),l[c]||(l[c]={},f||(l[c].toJSON=v.noop));if(typeof n=="object"||typeof n=="function")i?l[c]=v.extend(l[c],n):l[c].data=v.extend(l[c].data,n);return s=l[c],i||(s.data||(s.data={}),s=s.data),r!==t&&(s[v.camelCase(n)]=r),a?(o=s[n],o==null&&(o=s[v.camelCase(n)])):o=s,o},removeData:function(e,t,n){if(!v.acceptData(e))return;var r,i,s,o=e.nodeType,u=o?v.cache:e,a=o?e[v.expando]:v.expando;if(!u[a])return;if(t){r=n?u[a]:u[a].data;if(r){v.isArray(t)||(t in r?t=[t]:(t=v.camelCase(t),t in r?t=[t]:t=t.split(" ")));for(i=0,s=t.length;i<s;i++)delete r[t[i]];if(!(n?B:v.isEmptyObject)(r))return}}if(!n){delete u[a].data;if(!B(u[a]))return}o?v.cleanData([e],!0):v.support.deleteExpando||u!=u.window?delete u[a]:u[a]=null},_data:function(e,t,n){return v.data(e,t,n,!0)},acceptData:function(e){var t=e.nodeName&&v.noData[e.nodeName.toLowerCase()];return!t||t!==!0&&e.getAttribute("classid")===t}}),v.fn.extend({data:function(e,n){var r,i,s,o,u,a=this[0],f=0,l=null;if(e===t){if(this.length){l=v.data(a);if(a.nodeType===1&&!v._data(a,"parsedAttrs")){s=a.attributes;for(u=s.length;f<u;f++)o=s[f].name,o.indexOf("data-")||(o=v.camelCase(o.substring(5)),H(a,o,l[o]));v._data(a,"parsedAttrs",!0)}}return l}return typeof e=="object"?this.each(function(){v.data(this,e)}):(r=e.split(".",2),r[1]=r[1]?"."+r[1]:"",i=r[1]+"!",v.access(this,function(n){if(n===t)return l=this.triggerHandler("getData"+i,[r[0]]),l===t&&a&&(l=v.data(a,e),l=H(a,e,l)),l===t&&r[1]?this.data(r[0]):l;r[1]=n,this.each(function(){var t=v(this);t.triggerHandler("setData"+i,r),v.data(this,e,n),t.triggerHandler("changeData"+i,r)})},null,n,arguments.length>1,null,!1))},removeData:function(e){return this.each(function(){v.removeData(this,e)})}}),v.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=v._data(e,t),n&&(!r||v.isArray(n)?r=v._data(e,t,v.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=v.queue(e,t),r=n.length,i=n.shift(),s=v._queueHooks(e,t),o=function(){v.dequeue(e,t)};i==="inprogress"&&(i=n.shift(),r--),i&&(t==="fx"&&n.unshift("inprogress"),delete s.stop,i.call(e,o,s)),!r&&s&&s.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return v._data(e,n)||v._data(e,n,{empty:v.Callbacks("once memory").add(function(){v.removeData(e,t+"queue",!0),v.removeData(e,n,!0)})})}}),v.fn.extend({queue:function(e,n){var r=2;return typeof e!="string"&&(n=e,e="fx",r--),arguments.length<r?v.queue(this[0],e):n===t?this:this.each(function(){var t=v.queue(this,e,n);v._queueHooks(this,e),e==="fx"&&t[0]!=="inprogress"&&v.dequeue(this,e)})},dequeue:function(e){return this.each(function(){v.dequeue(this,e)})},delay:function(e,t){return e=v.fx?v.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,n){var r,i=1,s=v.Deferred(),o=this,u=this.length,a=function(){--i||s.resolveWith(o,[o])};typeof e!="string"&&(n=e,e=t),e=e||"fx";while(u--)r=v._data(o[u],e+"queueHooks"),r&&r.empty&&(i++,r.empty.add(a));return a(),s.promise(n)}});var j,F,I,q=/[\t\r\n]/g,R=/\r/g,U=/^(?:button|input)$/i,z=/^(?:button|input|object|select|textarea)$/i,W=/^a(?:rea|)$/i,X=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,V=v.support.getSetAttribute;v.fn.extend({attr:function(e,t){return v.access(this,v.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){v.removeAttr(this,e)})},prop:function(e,t){return v.access(this,v.prop,e,t,arguments.length>1)},removeProp:function(e){return e=v.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,s,o,u;if(v.isFunction(e))return this.each(function(t){v(this).addClass(e.call(this,t,this.className))});if(e&&typeof e=="string"){t=e.split(y);for(n=0,r=this.length;n<r;n++){i=this[n];if(i.nodeType===1)if(!i.className&&t.length===1)i.className=e;else{s=" "+i.className+" ";for(o=0,u=t.length;o<u;o++)s.indexOf(" "+t[o]+" ")<0&&(s+=t[o]+" ");i.className=v.trim(s)}}}return this},removeClass:function(e){var n,r,i,s,o,u,a;if(v.isFunction(e))return this.each(function(t){v(this).removeClass(e.call(this,t,this.className))});if(e&&typeof e=="string"||e===t){n=(e||"").split(y);for(u=0,a=this.length;u<a;u++){i=this[u];if(i.nodeType===1&&i.className){r=(" "+i.className+" ").replace(q," ");for(s=0,o=n.length;s<o;s++)while(r.indexOf(" "+n[s]+" ")>=0)r=r.replace(" "+n[s]+" "," ");i.className=e?v.trim(r):""}}}return this},toggleClass:function(e,t){var n=typeof e,r=typeof t=="boolean";return v.isFunction(e)?this.each(function(n){v(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if(n==="string"){var i,s=0,o=v(this),u=t,a=e.split(y);while(i=a[s++])u=r?u:!o.hasClass(i),o[u?"addClass":"removeClass"](i)}else if(n==="undefined"||n==="boolean")this.className&&v._data(this,"__className__",this.className),this.className=this.className||e===!1?"":v._data(this,"__className__")||""})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;n<r;n++)if(this[n].nodeType===1&&(" "+this[n].className+" ").replace(q," ").indexOf(t)>=0)return!0;return!1},val:function(e){var n,r,i,s=this[0];if(!arguments.length){if(s)return n=v.valHooks[s.type]||v.valHooks[s.nodeName.toLowerCase()],n&&"get"in n&&(r=n.get(s,"value"))!==t?r:(r=s.value,typeof r=="string"?r.replace(R,""):r==null?"":r);return}return i=v.isFunction(e),this.each(function(r){var s,o=v(this);if(this.nodeType!==1)return;i?s=e.call(this,r,o.val()):s=e,s==null?s="":typeof s=="number"?s+="":v.isArray(s)&&(s=v.map(s,function(e){return e==null?"":e+""})),n=v.valHooks[this.type]||v.valHooks[this.nodeName.toLowerCase()];if(!n||!("set"in n)||n.set(this,s,"value")===t)this.value=s})}}),v.extend({valHooks:{option:{get:function(e){var t=e.attributes.value;return!t||t.specified?e.value:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,s=e.type==="select-one"||i<0,o=s?null:[],u=s?i+1:r.length,a=i<0?u:s?i:0;for(;a<u;a++){n=r[a];if((n.selected||a===i)&&(v.support.optDisabled?!n.disabled:n.getAttribute("disabled")===null)&&(!n.parentNode.disabled||!v.nodeName(n.parentNode,"optgroup"))){t=v(n).val();if(s)return t;o.push(t)}}return o},set:function(e,t){var n=v.makeArray(t);return v(e).find("option").each(function(){this.selected=v.inArray(v(this).val(),n)>=0}),n.length||(e.selectedIndex=-1),n}}},attrFn:{},attr:function(e,n,r,i){var s,o,u,a=e.nodeType;if(!e||a===3||a===8||a===2)return;if(i&&v.isFunction(v.fn[n]))return v(e)[n](r);if(typeof e.getAttribute=="undefined")return v.prop(e,n,r);u=a!==1||!v.isXMLDoc(e),u&&(n=n.toLowerCase(),o=v.attrHooks[n]||(X.test(n)?F:j));if(r!==t){if(r===null){v.removeAttr(e,n);return}return o&&"set"in o&&u&&(s=o.set(e,r,n))!==t?s:(e.setAttribute(n,r+""),r)}return o&&"get"in o&&u&&(s=o.get(e,n))!==null?s:(s=e.getAttribute(n),s===null?t:s)},removeAttr:function(e,t){var n,r,i,s,o=0;if(t&&e.nodeType===1){r=t.split(y);for(;o<r.length;o++)i=r[o],i&&(n=v.propFix[i]||i,s=X.test(i),s||v.attr(e,i,""),e.removeAttribute(V?i:n),s&&n in e&&(e[n]=!1))}},attrHooks:{type:{set:function(e,t){if(U.test(e.nodeName)&&e.parentNode)v.error("type property can't be changed");else if(!v.support.radioValue&&t==="radio"&&v.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}},value:{get:function(e,t){return j&&v.nodeName(e,"button")?j.get(e,t):t in e?e.value:null},set:function(e,t,n){if(j&&v.nodeName(e,"button"))return j.set(e,t,n);e.value=t}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(e,n,r){var i,s,o,u=e.nodeType;if(!e||u===3||u===8||u===2)return;return o=u!==1||!v.isXMLDoc(e),o&&(n=v.propFix[n]||n,s=v.propHooks[n]),r!==t?s&&"set"in s&&(i=s.set(e,r,n))!==t?i:e[n]=r:s&&"get"in s&&(i=s.get(e,n))!==null?i:e[n]},propHooks:{tabIndex:{get:function(e){var n=e.getAttributeNode("tabindex");return n&&n.specified?parseInt(n.value,10):z.test(e.nodeName)||W.test(e.nodeName)&&e.href?0:t}}}}),F={get:function(e,n){var r,i=v.prop(e,n);return i===!0||typeof i!="boolean"&&(r=e.getAttributeNode(n))&&r.nodeValue!==!1?n.toLowerCase():t},set:function(e,t,n){var r;return t===!1?v.removeAttr(e,n):(r=v.propFix[n]||n,r in e&&(e[r]=!0),e.setAttribute(n,n.toLowerCase())),n}},V||(I={name:!0,id:!0,coords:!0},j=v.valHooks.button={get:function(e,n){var r;return r=e.getAttributeNode(n),r&&(I[n]?r.value!=="":r.specified)?r.value:t},set:function(e,t,n){var r=e.getAttributeNode(n);return r||(r=i.createAttribute(n),e.setAttributeNode(r)),r.value=t+""}},v.each(["width","height"],function(e,t){v.attrHooks[t]=v.extend(v.attrHooks[t],{set:function(e,n){if(n==="")return e.setAttribute(t,"auto"),n}})}),v.attrHooks.contenteditable={get:j.get,set:function(e,t,n){t===""&&(t="false"),j.set(e,t,n)}}),v.support.hrefNormalized||v.each(["href","src","width","height"],function(e,n){v.attrHooks[n]=v.extend(v.attrHooks[n],{get:function(e){var r=e.getAttribute(n,2);return r===null?t:r}})}),v.support.style||(v.attrHooks.style={get:function(e){return e.style.cssText.toLowerCase()||t},set:function(e,t){return e.style.cssText=t+""}}),v.support.optSelected||(v.propHooks.selected=v.extend(v.propHooks.selected,{get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}})),v.support.enctype||(v.propFix.enctype="encoding"),v.support.checkOn||v.each(["radio","checkbox"],function(){v.valHooks[this]={get:function(e){return e.getAttribute("value")===null?"on":e.value}}}),v.each(["radio","checkbox"],function(){v.valHooks[this]=v.extend(v.valHooks[this],{set:function(e,t){if(v.isArray(t))return e.checked=v.inArray(v(e).val(),t)>=0}})});var $=/^(?:textarea|input|select)$/i,J=/^([^\.]*|)(?:\.(.+)|)$/,K=/(?:^|\s)hover(\.\S+|)\b/,Q=/^key/,G=/^(?:mouse|contextmenu)|click/,Y=/^(?:focusinfocus|focusoutblur)$/,Z=function(e){return v.event.special.hover?e:e.replace(K,"mouseenter$1 mouseleave$1")};v.event={add:function(e,n,r,i,s){var o,u,a,f,l,c,h,p,d,m,g;if(e.nodeType===3||e.nodeType===8||!n||!r||!(o=v._data(e)))return;r.handler&&(d=r,r=d.handler,s=d.selector),r.guid||(r.guid=v.guid++),a=o.events,a||(o.events=a={}),u=o.handle,u||(o.handle=u=function(e){return typeof v=="undefined"||!!e&&v.event.triggered===e.type?t:v.event.dispatch.apply(u.elem,arguments)},u.elem=e),n=v.trim(Z(n)).split(" ");for(f=0;f<n.length;f++){l=J.exec(n[f])||[],c=l[1],h=(l[2]||"").split(".").sort(),g=v.event.special[c]||{},c=(s?g.delegateType:g.bindType)||c,g=v.event.special[c]||{},p=v.extend({type:c,origType:l[1],data:i,handler:r,guid:r.guid,selector:s,needsContext:s&&v.expr.match.needsContext.test(s),namespace:h.join(".")},d),m=a[c];if(!m){m=a[c]=[],m.delegateCount=0;if(!g.setup||g.setup.call(e,i,h,u)===!1)e.addEventListener?e.addEventListener(c,u,!1):e.attachEvent&&e.attachEvent("on"+c,u)}g.add&&(g.add.call(e,p),p.handler.guid||(p.handler.guid=r.guid)),s?m.splice(m.delegateCount++,0,p):m.push(p),v.event.global[c]=!0}e=null},global:{},remove:function(e,t,n,r,i){var s,o,u,a,f,l,c,h,p,d,m,g=v.hasData(e)&&v._data(e);if(!g||!(h=g.events))return;t=v.trim(Z(t||"")).split(" ");for(s=0;s<t.length;s++){o=J.exec(t[s])||[],u=a=o[1],f=o[2];if(!u){for(u in h)v.event.remove(e,u+t[s],n,r,!0);continue}p=v.event.special[u]||{},u=(r?p.delegateType:p.bindType)||u,d=h[u]||[],l=d.length,f=f?new RegExp("(^|\\.)"+f.split(".").sort().join("\\.(?:.*\\.|)")+"(\\.|$)"):null;for(c=0;c<d.length;c++)m=d[c],(i||a===m.origType)&&(!n||n.guid===m.guid)&&(!f||f.test(m.namespace))&&(!r||r===m.selector||r==="**"&&m.selector)&&(d.splice(c--,1),m.selector&&d.delegateCount--,p.remove&&p.remove.call(e,m));d.length===0&&l!==d.length&&((!p.teardown||p.teardown.call(e,f,g.handle)===!1)&&v.removeEvent(e,u,g.handle),delete h[u])}v.isEmptyObject(h)&&(delete g.handle,v.removeData(e,"events",!0))},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(n,r,s,o){if(!s||s.nodeType!==3&&s.nodeType!==8){var u,a,f,l,c,h,p,d,m,g,y=n.type||n,b=[];if(Y.test(y+v.event.triggered))return;y.indexOf("!")>=0&&(y=y.slice(0,-1),a=!0),y.indexOf(".")>=0&&(b=y.split("."),y=b.shift(),b.sort());if((!s||v.event.customEvent[y])&&!v.event.global[y])return;n=typeof n=="object"?n[v.expando]?n:new v.Event(y,n):new v.Event(y),n.type=y,n.isTrigger=!0,n.exclusive=a,n.namespace=b.join("."),n.namespace_re=n.namespace?new RegExp("(^|\\.)"+b.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,h=y.indexOf(":")<0?"on"+y:"";if(!s){u=v.cache;for(f in u)u[f].events&&u[f].events[y]&&v.event.trigger(n,r,u[f].handle.elem,!0);return}n.result=t,n.target||(n.target=s),r=r!=null?v.makeArray(r):[],r.unshift(n),p=v.event.special[y]||{};if(p.trigger&&p.trigger.apply(s,r)===!1)return;m=[[s,p.bindType||y]];if(!o&&!p.noBubble&&!v.isWindow(s)){g=p.delegateType||y,l=Y.test(g+y)?s:s.parentNode;for(c=s;l;l=l.parentNode)m.push([l,g]),c=l;c===(s.ownerDocument||i)&&m.push([c.defaultView||c.parentWindow||e,g])}for(f=0;f<m.length&&!n.isPropagationStopped();f++)l=m[f][0],n.type=m[f][1],d=(v._data(l,"events")||{})[n.type]&&v._data(l,"handle"),d&&d.apply(l,r),d=h&&l[h],d&&v.acceptData(l)&&d.apply&&d.apply(l,r)===!1&&n.preventDefault();return n.type=y,!o&&!n.isDefaultPrevented()&&(!p._default||p._default.apply(s.ownerDocument,r)===!1)&&(y!=="click"||!v.nodeName(s,"a"))&&v.acceptData(s)&&h&&s[y]&&(y!=="focus"&&y!=="blur"||n.target.offsetWidth!==0)&&!v.isWindow(s)&&(c=s[h],c&&(s[h]=null),v.event.triggered=y,s[y](),v.event.triggered=t,c&&(s[h]=c)),n.result}return},dispatch:function(n){n=v.event.fix(n||e.event);var r,i,s,o,u,a,f,c,h,p,d=(v._data(this,"events")||{})[n.type]||[],m=d.delegateCount,g=l.call(arguments),y=!n.exclusive&&!n.namespace,b=v.event.special[n.type]||{},w=[];g[0]=n,n.delegateTarget=this;if(b.preDispatch&&b.preDispatch.call(this,n)===!1)return;if(m&&(!n.button||n.type!=="click"))for(s=n.target;s!=this;s=s.parentNode||this)if(s.disabled!==!0||n.type!=="click"){u={},f=[];for(r=0;r<m;r++)c=d[r],h=c.selector,u[h]===t&&(u[h]=c.needsContext?v(h,this).index(s)>=0:v.find(h,this,null,[s]).length),u[h]&&f.push(c);f.length&&w.push({elem:s,matches:f})}d.length>m&&w.push({elem:this,matches:d.slice(m)});for(r=0;r<w.length&&!n.isPropagationStopped();r++){a=w[r],n.currentTarget=a.elem;for(i=0;i<a.matches.length&&!n.isImmediatePropagationStopped();i++){c=a.matches[i];if(y||!n.namespace&&!c.namespace||n.namespace_re&&n.namespace_re.test(c.namespace))n.data=c.data,n.handleObj=c,o=((v.event.special[c.origType]||{}).handle||c.handler).apply(a.elem,g),o!==t&&(n.result=o,o===!1&&(n.preventDefault(),n.stopPropagation()))}}return b.postDispatch&&b.postDispatch.call(this,n),n.result},props:"attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return e.which==null&&(e.which=t.charCode!=null?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,n){var r,s,o,u=n.button,a=n.fromElement;return e.pageX==null&&n.clientX!=null&&(r=e.target.ownerDocument||i,s=r.documentElement,o=r.body,e.pageX=n.clientX+(s&&s.scrollLeft||o&&o.scrollLeft||0)-(s&&s.clientLeft||o&&o.clientLeft||0),e.pageY=n.clientY+(s&&s.scrollTop||o&&o.scrollTop||0)-(s&&s.clientTop||o&&o.clientTop||0)),!e.relatedTarget&&a&&(e.relatedTarget=a===e.target?n.toElement:a),!e.which&&u!==t&&(e.which=u&1?1:u&2?3:u&4?2:0),e}},fix:function(e){if(e[v.expando])return e;var t,n,r=e,s=v.event.fixHooks[e.type]||{},o=s.props?this.props.concat(s.props):this.props;e=v.Event(r);for(t=o.length;t;)n=o[--t],e[n]=r[n];return e.target||(e.target=r.srcElement||i),e.target.nodeType===3&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,s.filter?s.filter(e,r):e},special:{load:{noBubble:!0},focus:{delegateType:"focusin"},blur:{delegateType:"focusout"},beforeunload:{setup:function(e,t,n){v.isWindow(this)&&(this.onbeforeunload=n)},teardown:function(e,t){this.onbeforeunload===t&&(this.onbeforeunload=null)}}},simulate:function(e,t,n,r){var i=v.extend(new v.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?v.event.trigger(i,null,t):v.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},v.event.handle=v.event.dispatch,v.removeEvent=i.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){var r="on"+t;e.detachEvent&&(typeof e[r]=="undefined"&&(e[r]=null),e.detachEvent(r,n))},v.Event=function(e,t){if(!(this instanceof v.Event))return new v.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.returnValue===!1||e.getPreventDefault&&e.getPreventDefault()?tt:et):this.type=e,t&&v.extend(this,t),this.timeStamp=e&&e.timeStamp||v.now(),this[v.expando]=!0},v.Event.prototype={preventDefault:function(){this.isDefaultPrevented=tt;var e=this.originalEvent;if(!e)return;e.preventDefault?e.preventDefault():e.returnValue=!1},stopPropagation:function(){this.isPropagationStopped=tt;var e=this.originalEvent;if(!e)return;e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=tt,this.stopPropagation()},isDefaultPrevented:et,isPropagationStopped:et,isImmediatePropagationStopped:et},v.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){v.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,s=e.handleObj,o=s.selector;if(!i||i!==r&&!v.contains(r,i))e.type=s.origType,n=s.handler.apply(this,arguments),e.type=t;return n}}}),v.support.submitBubbles||(v.event.special.submit={setup:function(){if(v.nodeName(this,"form"))return!1;v.event.add(this,"click._submit keypress._submit",function(e){var n=e.target,r=v.nodeName(n,"input")||v.nodeName(n,"button")?n.form:t;r&&!v._data(r,"_submit_attached")&&(v.event.add(r,"submit._submit",function(e){e._submit_bubble=!0}),v._data(r,"_submit_attached",!0))})},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&v.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){if(v.nodeName(this,"form"))return!1;v.event.remove(this,"._submit")}}),v.support.changeBubbles||(v.event.special.change={setup:function(){if($.test(this.nodeName)){if(this.type==="checkbox"||this.type==="radio")v.event.add(this,"propertychange._change",function(e){e.originalEvent.propertyName==="checked"&&(this._just_changed=!0)}),v.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),v.event.simulate("change",this,e,!0)});return!1}v.event.add(this,"beforeactivate._change",function(e){var t=e.target;$.test(t.nodeName)&&!v._data(t,"_change_attached")&&(v.event.add(t,"change._change",function(e){this.parentNode&&!e.isSimulated&&!e.isTrigger&&v.event.simulate("change",this.parentNode,e,!0)}),v._data(t,"_change_attached",!0))})},handle:function(e){var t=e.target;if(this!==t||e.isSimulated||e.isTrigger||t.type!=="radio"&&t.type!=="checkbox")return e.handleObj.handler.apply(this,arguments)},teardown:function(){return v.event.remove(this,"._change"),!$.test(this.nodeName)}}),v.support.focusinBubbles||v.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,r=function(e){v.event.simulate(t,e.target,v.event.fix(e),!0)};v.event.special[t]={setup:function(){n++===0&&i.addEventListener(e,r,!0)},teardown:function(){--n===0&&i.removeEventListener(e,r,!0)}}}),v.fn.extend({on:function(e,n,r,i,s){var o,u;if(typeof e=="object"){typeof n!="string"&&(r=r||n,n=t);for(u in e)this.on(u,n,r,e[u],s);return this}r==null&&i==null?(i=n,r=n=t):i==null&&(typeof n=="string"?(i=r,r=t):(i=r,r=n,n=t));if(i===!1)i=et;else if(!i)return this;return s===1&&(o=i,i=function(e){return v().off(e),o.apply(this,arguments)},i.guid=o.guid||(o.guid=v.guid++)),this.each(function(){v.event.add(this,e,i,r,n)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,n,r){var i,s;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,v(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if(typeof e=="object"){for(s in e)this.off(s,n,e[s]);return this}if(n===!1||typeof n=="function")r=n,n=t;return r===!1&&(r=et),this.each(function(){v.event.remove(this,e,r,n)})},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},live:function(e,t,n){return v(this.context).on(e,this.selector,t,n),this},die:function(e,t){return v(this.context).off(e,this.selector||"**",t),this},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return arguments.length===1?this.off(e,"**"):this.off(t,e||"**",n)},trigger:function(e,t){return this.each(function(){v.event.trigger(e,t,this)})},triggerHandler:function(e,t){if(this[0])return v.event.trigger(e,t,this[0],!0)},toggle:function(e){var t=arguments,n=e.guid||v.guid++,r=0,i=function(n){var i=(v._data(this,"lastToggle"+e.guid)||0)%r;return v._data(this,"lastToggle"+e.guid,i+1),n.preventDefault(),t[i].apply(this,arguments)||!1};i.guid=n;while(r<t.length)t[r++].guid=n;return this.click(i)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),v.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){v.fn[t]=function(e,n){return n==null&&(n=e,e=null),arguments.length>0?this.on(t,null,e,n):this.trigger(t)},Q.test(t)&&(v.event.fixHooks[t]=v.event.keyHooks),G.test(t)&&(v.event.fixHooks[t]=v.event.mouseHooks)}),function(e,t){function nt(e,t,n,r){n=n||[],t=t||g;var i,s,a,f,l=t.nodeType;if(!e||typeof e!="string")return n;if(l!==1&&l!==9)return[];a=o(t);if(!a&&!r)if(i=R.exec(e))if(f=i[1]){if(l===9){s=t.getElementById(f);if(!s||!s.parentNode)return n;if(s.id===f)return n.push(s),n}else if(t.ownerDocument&&(s=t.ownerDocument.getElementById(f))&&u(t,s)&&s.id===f)return n.push(s),n}else{if(i[2])return S.apply(n,x.call(t.getElementsByTagName(e),0)),n;if((f=i[3])&&Z&&t.getElementsByClassName)return S.apply(n,x.call(t.getElementsByClassName(f),0)),n}return vt(e.replace(j,"$1"),t,n,r,a)}function rt(e){return function(t){var n=t.nodeName.toLowerCase();return n==="input"&&t.type===e}}function it(e){return function(t){var n=t.nodeName.toLowerCase();return(n==="input"||n==="button")&&t.type===e}}function st(e){return N(function(t){return t=+t,N(function(n,r){var i,s=e([],n.length,t),o=s.length;while(o--)n[i=s[o]]&&(n[i]=!(r[i]=n[i]))})})}function ot(e,t,n){if(e===t)return n;var r=e.nextSibling;while(r){if(r===t)return-1;r=r.nextSibling}return 1}function ut(e,t){var n,r,s,o,u,a,f,l=L[d][e+" "];if(l)return t?0:l.slice(0);u=e,a=[],f=i.preFilter;while(u){if(!n||(r=F.exec(u)))r&&(u=u.slice(r[0].length)||u),a.push(s=[]);n=!1;if(r=I.exec(u))s.push(n=new m(r.shift())),u=u.slice(n.length),n.type=r[0].replace(j," ");for(o in i.filter)(r=J[o].exec(u))&&(!f[o]||(r=f[o](r)))&&(s.push(n=new m(r.shift())),u=u.slice(n.length),n.type=o,n.matches=r);if(!n)break}return t?u.length:u?nt.error(e):L(e,a).slice(0)}function at(e,t,r){var i=t.dir,s=r&&t.dir==="parentNode",o=w++;return t.first?function(t,n,r){while(t=t[i])if(s||t.nodeType===1)return e(t,n,r)}:function(t,r,u){if(!u){var a,f=b+" "+o+" ",l=f+n;while(t=t[i])if(s||t.nodeType===1){if((a=t[d])===l)return t.sizset;if(typeof a=="string"&&a.indexOf(f)===0){if(t.sizset)return t}else{t[d]=l;if(e(t,r,u))return t.sizset=!0,t;t.sizset=!1}}}else while(t=t[i])if(s||t.nodeType===1)if(e(t,r,u))return t}}function ft(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function lt(e,t,n,r,i){var s,o=[],u=0,a=e.length,f=t!=null;for(;u<a;u++)if(s=e[u])if(!n||n(s,r,i))o.push(s),f&&t.push(u);return o}function ct(e,t,n,r,i,s){return r&&!r[d]&&(r=ct(r)),i&&!i[d]&&(i=ct(i,s)),N(function(s,o,u,a){var f,l,c,h=[],p=[],d=o.length,v=s||dt(t||"*",u.nodeType?[u]:u,[]),m=e&&(s||!t)?lt(v,h,e,u,a):v,g=n?i||(s?e:d||r)?[]:o:m;n&&n(m,g,u,a);if(r){f=lt(g,p),r(f,[],u,a),l=f.length;while(l--)if(c=f[l])g[p[l]]=!(m[p[l]]=c)}if(s){if(i||e){if(i){f=[],l=g.length;while(l--)(c=g[l])&&f.push(m[l]=c);i(null,g=[],f,a)}l=g.length;while(l--)(c=g[l])&&(f=i?T.call(s,c):h[l])>-1&&(s[f]=!(o[f]=c))}}else g=lt(g===o?g.splice(d,g.length):g),i?i(null,o,g,a):S.apply(o,g)})}function ht(e){var t,n,r,s=e.length,o=i.relative[e[0].type],u=o||i.relative[" "],a=o?1:0,f=at(function(e){return e===t},u,!0),l=at(function(e){return T.call(t,e)>-1},u,!0),h=[function(e,n,r){return!o&&(r||n!==c)||((t=n).nodeType?f(e,n,r):l(e,n,r))}];for(;a<s;a++)if(n=i.relative[e[a].type])h=[at(ft(h),n)];else{n=i.filter[e[a].type].apply(null,e[a].matches);if(n[d]){r=++a;for(;r<s;r++)if(i.relative[e[r].type])break;return ct(a>1&&ft(h),a>1&&e.slice(0,a-1).join("").replace(j,"$1"),n,a<r&&ht(e.slice(a,r)),r<s&&ht(e=e.slice(r)),r<s&&e.join(""))}h.push(n)}return ft(h)}function pt(e,t){var r=t.length>0,s=e.length>0,o=function(u,a,f,l,h){var p,d,v,m=[],y=0,w="0",x=u&&[],T=h!=null,N=c,C=u||s&&i.find.TAG("*",h&&a.parentNode||a),k=b+=N==null?1:Math.E;T&&(c=a!==g&&a,n=o.el);for(;(p=C[w])!=null;w++){if(s&&p){for(d=0;v=e[d];d++)if(v(p,a,f)){l.push(p);break}T&&(b=k,n=++o.el)}r&&((p=!v&&p)&&y--,u&&x.push(p))}y+=w;if(r&&w!==y){for(d=0;v=t[d];d++)v(x,m,a,f);if(u){if(y>0)while(w--)!x[w]&&!m[w]&&(m[w]=E.call(l));m=lt(m)}S.apply(l,m),T&&!u&&m.length>0&&y+t.length>1&&nt.uniqueSort(l)}return T&&(b=k,c=N),x};return o.el=0,r?N(o):o}function dt(e,t,n){var r=0,i=t.length;for(;r<i;r++)nt(e,t[r],n);return n}function vt(e,t,n,r,s){var o,u,f,l,c,h=ut(e),p=h.length;if(!r&&h.length===1){u=h[0]=h[0].slice(0);if(u.length>2&&(f=u[0]).type==="ID"&&t.nodeType===9&&!s&&i.relative[u[1].type]){t=i.find.ID(f.matches[0].replace($,""),t,s)[0];if(!t)return n;e=e.slice(u.shift().length)}for(o=J.POS.test(e)?-1:u.length-1;o>=0;o--){f=u[o];if(i.relative[l=f.type])break;if(c=i.find[l])if(r=c(f.matches[0].replace($,""),z.test(u[0].type)&&t.parentNode||t,s)){u.splice(o,1),e=r.length&&u.join("");if(!e)return S.apply(n,x.call(r,0)),n;break}}}return a(e,h)(r,t,s,n,z.test(e)),n}function mt(){}var n,r,i,s,o,u,a,f,l,c,h=!0,p="undefined",d=("sizcache"+Math.random()).replace(".",""),m=String,g=e.document,y=g.documentElement,b=0,w=0,E=[].pop,S=[].push,x=[].slice,T=[].indexOf||function(e){var t=0,n=this.length;for(;t<n;t++)if(this[t]===e)return t;return-1},N=function(e,t){return e[d]=t==null||t,e},C=function(){var e={},t=[];return N(function(n,r){return t.push(n)>i.cacheLength&&delete e[t.shift()],e[n+" "]=r},e)},k=C(),L=C(),A=C(),O="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[-\\w]|[^\\x00-\\xa0])+",_=M.replace("w","w#"),D="([*^$|!~]?=)",P="\\["+O+"*("+M+")"+O+"*(?:"+D+O+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+_+")|)|)"+O+"*\\]",H=":("+M+")(?:\\((?:(['\"])((?:\\\\.|[^\\\\])*?)\\2|([^()[\\]]*|(?:(?:"+P+")|[^:]|\\\\.)*|.*))\\)|)",B=":(even|odd|eq|gt|lt|nth|first|last)(?:\\("+O+"*((?:-\\d)?\\d*)"+O+"*\\)|)(?=[^-]|$)",j=new RegExp("^"+O+"+|((?:^|[^\\\\])(?:\\\\.)*)"+O+"+$","g"),F=new RegExp("^"+O+"*,"+O+"*"),I=new RegExp("^"+O+"*([\\x20\\t\\r\\n\\f>+~])"+O+"*"),q=new RegExp(H),R=/^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/,U=/^:not/,z=/[\x20\t\r\n\f]*[+~]/,W=/:not\($/,X=/h\d/i,V=/input|select|textarea|button/i,$=/\\(?!\\)/g,J={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),NAME:new RegExp("^\\[name=['\"]?("+M+")['\"]?\\]"),TAG:new RegExp("^("+M.replace("w","w*")+")"),ATTR:new RegExp("^"+P),PSEUDO:new RegExp("^"+H),POS:new RegExp(B,"i"),CHILD:new RegExp("^:(only|nth|first|last)-child(?:\\("+O+"*(even|odd|(([+-]|)(\\d*)n|)"+O+"*(?:([+-]|)"+O+"*(\\d+)|))"+O+"*\\)|)","i"),needsContext:new RegExp("^"+O+"*[>+~]|"+B,"i")},K=function(e){var t=g.createElement("div");try{return e(t)}catch(n){return!1}finally{t=null}},Q=K(function(e){return e.appendChild(g.createComment("")),!e.getElementsByTagName("*").length}),G=K(function(e){return e.innerHTML="<a href='#'></a>",e.firstChild&&typeof e.firstChild.getAttribute!==p&&e.firstChild.getAttribute("href")==="#"}),Y=K(function(e){e.innerHTML="<select></select>";var t=typeof e.lastChild.getAttribute("multiple");return t!=="boolean"&&t!=="string"}),Z=K(function(e){return e.innerHTML="<div class='hidden e'></div><div class='hidden'></div>",!e.getElementsByClassName||!e.getElementsByClassName("e").length?!1:(e.lastChild.className="e",e.getElementsByClassName("e").length===2)}),et=K(function(e){e.id=d+0,e.innerHTML="<a name='"+d+"'></a><div name='"+d+"'></div>",y.insertBefore(e,y.firstChild);var t=g.getElementsByName&&g.getElementsByName(d).length===2+g.getElementsByName(d+0).length;return r=!g.getElementById(d),y.removeChild(e),t});try{x.call(y.childNodes,0)[0].nodeType}catch(tt){x=function(e){var t,n=[];for(;t=this[e];e++)n.push(t);return n}}nt.matches=function(e,t){return nt(e,null,null,t)},nt.matchesSelector=function(e,t){return nt(t,null,null,[e]).length>0},s=nt.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(i===1||i===9||i===11){if(typeof e.textContent=="string")return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=s(e)}else if(i===3||i===4)return e.nodeValue}else for(;t=e[r];r++)n+=s(t);return n},o=nt.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?t.nodeName!=="HTML":!1},u=nt.contains=y.contains?function(e,t){var n=e.nodeType===9?e.documentElement:e,r=t&&t.parentNode;return e===r||!!(r&&r.nodeType===1&&n.contains&&n.contains(r))}:y.compareDocumentPosition?function(e,t){return t&&!!(e.compareDocumentPosition(t)&16)}:function(e,t){while(t=t.parentNode)if(t===e)return!0;return!1},nt.attr=function(e,t){var n,r=o(e);return r||(t=t.toLowerCase()),(n=i.attrHandle[t])?n(e):r||Y?e.getAttribute(t):(n=e.getAttributeNode(t),n?typeof e[t]=="boolean"?e[t]?t:null:n.specified?n.value:null:null)},i=nt.selectors={cacheLength:50,createPseudo:N,match:J,attrHandle:G?{}:{href:function(e){return e.getAttribute("href",2)},type:function(e){return e.getAttribute("type")}},find:{ID:r?function(e,t,n){if(typeof t.getElementById!==p&&!n){var r=t.getElementById(e);return r&&r.parentNode?[r]:[]}}:function(e,n,r){if(typeof n.getElementById!==p&&!r){var i=n.getElementById(e);return i?i.id===e||typeof i.getAttributeNode!==p&&i.getAttributeNode("id").value===e?[i]:t:[]}},TAG:Q?function(e,t){if(typeof t.getElementsByTagName!==p)return t.getElementsByTagName(e)}:function(e,t){var n=t.getElementsByTagName(e);if(e==="*"){var r,i=[],s=0;for(;r=n[s];s++)r.nodeType===1&&i.push(r);return i}return n},NAME:et&&function(e,t){if(typeof t.getElementsByName!==p)return t.getElementsByName(name)},CLASS:Z&&function(e,t,n){if(typeof t.getElementsByClassName!==p&&!n)return t.getElementsByClassName(e)}},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace($,""),e[3]=(e[4]||e[5]||"").replace($,""),e[2]==="~="&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),e[1]==="nth"?(e[2]||nt.error(e[0]),e[3]=+(e[3]?e[4]+(e[5]||1):2*(e[2]==="even"||e[2]==="odd")),e[4]=+(e[6]+e[7]||e[2]==="odd")):e[2]&&nt.error(e[0]),e},PSEUDO:function(e){var t,n;if(J.CHILD.test(e[0]))return null;if(e[3])e[2]=e[3];else if(t=e[4])q.test(t)&&(n=ut(t,!0))&&(n=t.indexOf(")",t.length-n)-t.length)&&(t=t.slice(0,n),e[0]=e[0].slice(0,n)),e[2]=t;return e.slice(0,3)}},filter:{ID:r?function(e){return e=e.replace($,""),function(t){return t.getAttribute("id")===e}}:function(e){return e=e.replace($,""),function(t){var n=typeof t.getAttributeNode!==p&&t.getAttributeNode("id");return n&&n.value===e}},TAG:function(e){return e==="*"?function(){return!0}:(e=e.replace($,"").toLowerCase(),function(t){return t.nodeName&&t.nodeName.toLowerCase()===e})},CLASS:function(e){var t=k[d][e+" "];return t||(t=new RegExp("(^|"+O+")"+e+"("+O+"|$)"))&&k(e,function(e){return t.test(e.className||typeof e.getAttribute!==p&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r,i){var s=nt.attr(r,e);return s==null?t==="!=":t?(s+="",t==="="?s===n:t==="!="?s!==n:t==="^="?n&&s.indexOf(n)===0:t==="*="?n&&s.indexOf(n)>-1:t==="$="?n&&s.substr(s.length-n.length)===n:t==="~="?(" "+s+" ").indexOf(n)>-1:t==="|="?s===n||s.substr(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r){return e==="nth"?function(e){var t,i,s=e.parentNode;if(n===1&&r===0)return!0;if(s){i=0;for(t=s.firstChild;t;t=t.nextSibling)if(t.nodeType===1){i++;if(e===t)break}}return i-=r,i===n||i%n===0&&i/n>=0}:function(t){var n=t;switch(e){case"only":case"first":while(n=n.previousSibling)if(n.nodeType===1)return!1;if(e==="first")return!0;n=t;case"last":while(n=n.nextSibling)if(n.nodeType===1)return!1;return!0}}},PSEUDO:function(e,t){var n,r=i.pseudos[e]||i.setFilters[e.toLowerCase()]||nt.error("unsupported pseudo: "+e);return r[d]?r(t):r.length>1?(n=[e,e,"",t],i.setFilters.hasOwnProperty(e.toLowerCase())?N(function(e,n){var i,s=r(e,t),o=s.length;while(o--)i=T.call(e,s[o]),e[i]=!(n[i]=s[o])}):function(e){return r(e,0,n)}):r}},pseudos:{not:N(function(e){var t=[],n=[],r=a(e.replace(j,"$1"));return r[d]?N(function(e,t,n,i){var s,o=r(e,null,i,[]),u=e.length;while(u--)if(s=o[u])e[u]=!(t[u]=s)}):function(e,i,s){return t[0]=e,r(t,null,s,n),!n.pop()}}),has:N(function(e){return function(t){return nt(e,t).length>0}}),contains:N(function(e){return function(t){return(t.textContent||t.innerText||s(t)).indexOf(e)>-1}}),enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return t==="input"&&!!e.checked||t==="option"&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},parent:function(e){return!i.pseudos.empty(e)},empty:function(e){var t;e=e.firstChild;while(e){if(e.nodeName>"@"||(t=e.nodeType)===3||t===4)return!1;e=e.nextSibling}return!0},header:function(e){return X.test(e.nodeName)},text:function(e){var t,n;return e.nodeName.toLowerCase()==="input"&&(t=e.type)==="text"&&((n=e.getAttribute("type"))==null||n.toLowerCase()===t)},radio:rt("radio"),checkbox:rt("checkbox"),file:rt("file"),password:rt("password"),image:rt("image"),submit:it("submit"),reset:it("reset"),button:function(e){var t=e.nodeName.toLowerCase();return t==="input"&&e.type==="button"||t==="button"},input:function(e){return V.test(e.nodeName)},focus:function(e){var t=e.ownerDocument;return e===t.activeElement&&(!t.hasFocus||t.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},active:function(e){return e===e.ownerDocument.activeElement},first:st(function(){return[0]}),last:st(function(e,t){return[t-1]}),eq:st(function(e,t,n){return[n<0?n+t:n]}),even:st(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:st(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:st(function(e,t,n){for(var r=n<0?n+t:n;--r>=0;)e.push(r);return e}),gt:st(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}},f=y.compareDocumentPosition?function(e,t){return e===t?(l=!0,0):(!e.compareDocumentPosition||!t.compareDocumentPosition?e.compareDocumentPosition:e.compareDocumentPosition(t)&4)?-1:1}:function(e,t){if(e===t)return l=!0,0;if(e.sourceIndex&&t.sourceIndex)return e.sourceIndex-t.sourceIndex;var n,r,i=[],s=[],o=e.parentNode,u=t.parentNode,a=o;if(o===u)return ot(e,t);if(!o)return-1;if(!u)return 1;while(a)i.unshift(a),a=a.parentNode;a=u;while(a)s.unshift(a),a=a.parentNode;n=i.length,r=s.length;for(var f=0;f<n&&f<r;f++)if(i[f]!==s[f])return ot(i[f],s[f]);return f===n?ot(e,s[f],-1):ot(i[f],t,1)},[0,0].sort(f),h=!l,nt.uniqueSort=function(e){var t,n=[],r=1,i=0;l=h,e.sort(f);if(l){for(;t=e[r];r++)t===e[r-1]&&(i=n.push(r));while(i--)e.splice(n[i],1)}return e},nt.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},a=nt.compile=function(e,t){var n,r=[],i=[],s=A[d][e+" "];if(!s){t||(t=ut(e)),n=t.length;while(n--)s=ht(t[n]),s[d]?r.push(s):i.push(s);s=A(e,pt(i,r))}return s},g.querySelectorAll&&function(){var e,t=vt,n=/'|\\/g,r=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,i=[":focus"],s=[":active"],u=y.matchesSelector||y.mozMatchesSelector||y.webkitMatchesSelector||y.oMatchesSelector||y.msMatchesSelector;K(function(e){e.innerHTML="<select><option selected=''></option></select>",e.querySelectorAll("[selected]").length||i.push("\\["+O+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),e.querySelectorAll(":checked").length||i.push(":checked")}),K(function(e){e.innerHTML="<p test=''></p>",e.querySelectorAll("[test^='']").length&&i.push("[*^$]="+O+"*(?:\"\"|'')"),e.innerHTML="<input type='hidden'/>",e.querySelectorAll(":enabled").length||i.push(":enabled",":disabled")}),i=new RegExp(i.join("|")),vt=function(e,r,s,o,u){if(!o&&!u&&!i.test(e)){var a,f,l=!0,c=d,h=r,p=r.nodeType===9&&e;if(r.nodeType===1&&r.nodeName.toLowerCase()!=="object"){a=ut(e),(l=r.getAttribute("id"))?c=l.replace(n,"\\$&"):r.setAttribute("id",c),c="[id='"+c+"'] ",f=a.length;while(f--)a[f]=c+a[f].join("");h=z.test(e)&&r.parentNode||r,p=a.join(",")}if(p)try{return S.apply(s,x.call(h.querySelectorAll(p),0)),s}catch(v){}finally{l||r.removeAttribute("id")}}return t(e,r,s,o,u)},u&&(K(function(t){e=u.call(t,"div");try{u.call(t,"[test!='']:sizzle"),s.push("!=",H)}catch(n){}}),s=new RegExp(s.join("|")),nt.matchesSelector=function(t,n){n=n.replace(r,"='$1']");if(!o(t)&&!s.test(n)&&!i.test(n))try{var a=u.call(t,n);if(a||e||t.document&&t.document.nodeType!==11)return a}catch(f){}return nt(n,null,null,[t]).length>0})}(),i.pseudos.nth=i.pseudos.eq,i.filters=mt.prototype=i.pseudos,i.setFilters=new mt,nt.attr=v.attr,v.find=nt,v.expr=nt.selectors,v.expr[":"]=v.expr.pseudos,v.unique=nt.uniqueSort,v.text=nt.getText,v.isXMLDoc=nt.isXML,v.contains=nt.contains}(e);var nt=/Until$/,rt=/^(?:parents|prev(?:Until|All))/,it=/^.[^:#\[\.,]*$/,st=v.expr.match.needsContext,ot={children:!0,contents:!0,next:!0,prev:!0};v.fn.extend({find:function(e){var t,n,r,i,s,o,u=this;if(typeof e!="string")return v(e).filter(function(){for(t=0,n=u.length;t<n;t++)if(v.contains(u[t],this))return!0});o=this.pushStack("","find",e);for(t=0,n=this.length;t<n;t++){r=o.length,v.find(e,this[t],o);if(t>0)for(i=r;i<o.length;i++)for(s=0;s<r;s++)if(o[s]===o[i]){o.splice(i--,1);break}}return o},has:function(e){var t,n=v(e,this),r=n.length;return this.filter(function(){for(t=0;t<r;t++)if(v.contains(this,n[t]))return!0})},not:function(e){return this.pushStack(ft(this,e,!1),"not",e)},filter:function(e){return this.pushStack(ft(this,e,!0),"filter",e)},is:function(e){return!!e&&(typeof e=="string"?st.test(e)?v(e,this.context).index(this[0])>=0:v.filter(e,this).length>0:this.filter(e).length>0)},closest:function(e,t){var n,r=0,i=this.length,s=[],o=st.test(e)||typeof e!="string"?v(e,t||this.context):0;for(;r<i;r++){n=this[r];while(n&&n.ownerDocument&&n!==t&&n.nodeType!==11){if(o?o.index(n)>-1:v.find.matchesSelector(n,e)){s.push(n);break}n=n.parentNode}}return s=s.length>1?v.unique(s):s,this.pushStack(s,"closest",e)},index:function(e){return e?typeof e=="string"?v.inArray(this[0],v(e)):v.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.prevAll().length:-1},add:function(e,t){var n=typeof e=="string"?v(e,t):v.makeArray(e&&e.nodeType?[e]:e),r=v.merge(this.get(),n);return this.pushStack(ut(n[0])||ut(r[0])?r:v.unique(r))},addBack:function(e){return this.add(e==null?this.prevObject:this.prevObject.filter(e))}}),v.fn.andSelf=v.fn.addBack,v.each({parent:function(e){var t=e.parentNode;return t&&t.nodeType!==11?t:null},parents:function(e){return v.dir(e,"parentNode")},parentsUntil:function(e,t,n){return v.dir(e,"parentNode",n)},next:function(e){return at(e,"nextSibling")},prev:function(e){return at(e,"previousSibling")},nextAll:function(e){return v.dir(e,"nextSibling")},prevAll:function(e){return v.dir(e,"previousSibling")},nextUntil:function(e,t,n){return v.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return v.dir(e,"previousSibling",n)},siblings:function(e){return v.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return v.sibling(e.firstChild)},contents:function(e){return v.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:v.merge([],e.childNodes)}},function(e,t){v.fn[e]=function(n,r){var i=v.map(this,t,n);return nt.test(e)||(r=n),r&&typeof r=="string"&&(i=v.filter(r,i)),i=this.length>1&&!ot[e]?v.unique(i):i,this.length>1&&rt.test(e)&&(i=i.reverse()),this.pushStack(i,e,l.call(arguments).join(","))}}),v.extend({filter:function(e,t,n){return n&&(e=":not("+e+")"),t.length===1?v.find.matchesSelector(t[0],e)?[t[0]]:[]:v.find.matches(e,t)},dir:function(e,n,r){var i=[],s=e[n];while(s&&s.nodeType!==9&&(r===t||s.nodeType!==1||!v(s).is(r)))s.nodeType===1&&i.push(s),s=s[n];return i},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)e.nodeType===1&&e!==t&&n.push(e);return n}});var ct="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",ht=/ jQuery\d+="(?:null|\d+)"/g,pt=/^\s+/,dt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,vt=/<([\w:]+)/,mt=/<tbody/i,gt=/<|&#?\w+;/,yt=/<(?:script|style|link)/i,bt=/<(?:script|object|embed|option|style)/i,wt=new RegExp("<(?:"+ct+")[\\s/>]","i"),Et=/^(?:checkbox|radio)$/,St=/checked\s*(?:[^=]|=\s*.checked.)/i,xt=/\/(java|ecma)script/i,Tt=/^\s*<!(?:\[CDATA\[|\-\-)|[\]\-]{2}>\s*$/g,Nt={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]},Ct=lt(i),kt=Ct.appendChild(i.createElement("div"));Nt.optgroup=Nt.option,Nt.tbody=Nt.tfoot=Nt.colgroup=Nt.caption=Nt.thead,Nt.th=Nt.td,v.support.htmlSerialize||(Nt._default=[1,"X<div>","</div>"]),v.fn.extend({text:function(e){return v.access(this,function(e){return e===t?v.text(this):this.empty().append((this[0]&&this[0].ownerDocument||i).createTextNode(e))},null,e,arguments.length)},wrapAll:function(e){if(v.isFunction(e))return this.each(function(t){v(this).wrapAll(e.call(this,t))});if(this[0]){var t=v(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstChild&&e.firstChild.nodeType===1)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return v.isFunction(e)?this.each(function(t){v(this).wrapInner(e.call(this,t))}):this.each(function(){var t=v(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=v.isFunction(e);return this.each(function(n){v(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){v.nodeName(this,"body")||v(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(e){(this.nodeType===1||this.nodeType===11)&&this.appendChild(e)})},prepend:function(){return this.domManip(arguments,!0,function(e){(this.nodeType===1||this.nodeType===11)&&this.insertBefore(e,this.firstChild)})},before:function(){if(!ut(this[0]))return this.domManip(arguments,!1,function(e){this.parentNode.insertBefore(e,this)});if(arguments.length){var e=v.clean(arguments);return this.pushStack(v.merge(e,this),"before",this.selector)}},after:function(){if(!ut(this[0]))return this.domManip(arguments,!1,function(e){this.parentNode.insertBefore(e,this.nextSibling)});if(arguments.length){var e=v.clean(arguments);return this.pushStack(v.merge(this,e),"after",this.selector)}},remove:function(e,t){var n,r=0;for(;(n=this[r])!=null;r++)if(!e||v.filter(e,[n]).length)!t&&n.nodeType===1&&(v.cleanData(n.getElementsByTagName("*")),v.cleanData([n])),n.parentNode&&n.parentNode.removeChild(n);return this},empty:function(){var e,t=0;for(;(e=this[t])!=null;t++){e.nodeType===1&&v.cleanData(e.getElementsByTagName("*"));while(e.firstChild)e.removeChild(e.firstChild)}return this},clone:function(e,t){return e=e==null?!1:e,t=t==null?e:t,this.map(function(){return v.clone(this,e,t)})},html:function(e){return v.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return n.nodeType===1?n.innerHTML.replace(ht,""):t;if(typeof e=="string"&&!yt.test(e)&&(v.support.htmlSerialize||!wt.test(e))&&(v.support.leadingWhitespace||!pt.test(e))&&!Nt[(vt.exec(e)||["",""])[1].toLowerCase()]){e=e.replace(dt,"<$1></$2>");try{for(;r<i;r++)n=this[r]||{},n.nodeType===1&&(v.cleanData(n.getElementsByTagName("*")),n.innerHTML=e);n=0}catch(s){}}n&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(e){return ut(this[0])?this.length?this.pushStack(v(v.isFunction(e)?e():e),"replaceWith",e):this:v.isFunction(e)?this.each(function(t){var n=v(this),r=n.html();n.replaceWith(e.call(this,t,r))}):(typeof e!="string"&&(e=v(e).detach()),this.each(function(){var t=this.nextSibling,n=this.parentNode;v(this).remove(),t?v(t).before(e):v(n).append(e)}))},detach:function(e){return this.remove(e,!0)},domManip:function(e,n,r){e=[].concat.apply([],e);var i,s,o,u,a=0,f=e[0],l=[],c=this.length;if(!v.support.checkClone&&c>1&&typeof f=="string"&&St.test(f))return this.each(function(){v(this).domManip(e,n,r)});if(v.isFunction(f))return this.each(function(i){var s=v(this);e[0]=f.call(this,i,n?s.html():t),s.domManip(e,n,r)});if(this[0]){i=v.buildFragment(e,this,l),o=i.fragment,s=o.firstChild,o.childNodes.length===1&&(o=s);if(s){n=n&&v.nodeName(s,"tr");for(u=i.cacheable||c-1;a<c;a++)r.call(n&&v.nodeName(this[a],"table")?Lt(this[a],"tbody"):this[a],a===u?o:v.clone(o,!0,!0))}o=s=null,l.length&&v.each(l,function(e,t){t.src?v.ajax?v.ajax({url:t.src,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0}):v.error("no ajax"):v.globalEval((t.text||t.textContent||t.innerHTML||"").replace(Tt,"")),t.parentNode&&t.parentNode.removeChild(t)})}return this}}),v.buildFragment=function(e,n,r){var s,o,u,a=e[0];return n=n||i,n=!n.nodeType&&n[0]||n,n=n.ownerDocument||n,e.length===1&&typeof a=="string"&&a.length<512&&n===i&&a.charAt(0)==="<"&&!bt.test(a)&&(v.support.checkClone||!St.test(a))&&(v.support.html5Clone||!wt.test(a))&&(o=!0,s=v.fragments[a],u=s!==t),s||(s=n.createDocumentFragment(),v.clean(e,n,s,r),o&&(v.fragments[a]=u&&s)),{fragment:s,cacheable:o}},v.fragments={},v.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){v.fn[e]=function(n){var r,i=0,s=[],o=v(n),u=o.length,a=this.length===1&&this[0].parentNode;if((a==null||a&&a.nodeType===11&&a.childNodes.length===1)&&u===1)return o[t](this[0]),this;for(;i<u;i++)r=(i>0?this.clone(!0):this).get(),v(o[i])[t](r),s=s.concat(r);return this.pushStack(s,e,o.selector)}}),v.extend({clone:function(e,t,n){var r,i,s,o;v.support.html5Clone||v.isXMLDoc(e)||!wt.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(kt.innerHTML=e.outerHTML,kt.removeChild(o=kt.firstChild));if((!v.support.noCloneEvent||!v.support.noCloneChecked)&&(e.nodeType===1||e.nodeType===11)&&!v.isXMLDoc(e)){Ot(e,o),r=Mt(e),i=Mt(o);for(s=0;r[s];++s)i[s]&&Ot(r[s],i[s])}if(t){At(e,o);if(n){r=Mt(e),i=Mt(o);for(s=0;r[s];++s)At(r[s],i[s])}}return r=i=null,o},clean:function(e,t,n,r){var s,o,u,a,f,l,c,h,p,d,m,g,y=t===i&&Ct,b=[];if(!t||typeof t.createDocumentFragment=="undefined")t=i;for(s=0;(u=e[s])!=null;s++){typeof u=="number"&&(u+="");if(!u)continue;if(typeof u=="string")if(!gt.test(u))u=t.createTextNode(u);else{y=y||lt(t),c=t.createElement("div"),y.appendChild(c),u=u.replace(dt,"<$1></$2>"),a=(vt.exec(u)||["",""])[1].toLowerCase(),f=Nt[a]||Nt._default,l=f[0],c.innerHTML=f[1]+u+f[2];while(l--)c=c.lastChild;if(!v.support.tbody){h=mt.test(u),p=a==="table"&&!h?c.firstChild&&c.firstChild.childNodes:f[1]==="<table>"&&!h?c.childNodes:[];for(o=p.length-1;o>=0;--o)v.nodeName(p[o],"tbody")&&!p[o].childNodes.length&&p[o].parentNode.removeChild(p[o])}!v.support.leadingWhitespace&&pt.test(u)&&c.insertBefore(t.createTextNode(pt.exec(u)[0]),c.firstChild),u=c.childNodes,c.parentNode.removeChild(c)}u.nodeType?b.push(u):v.merge(b,u)}c&&(u=c=y=null);if(!v.support.appendChecked)for(s=0;(u=b[s])!=null;s++)v.nodeName(u,"input")?_t(u):typeof u.getElementsByTagName!="undefined"&&v.grep(u.getElementsByTagName("input"),_t);if(n){m=function(e){if(!e.type||xt.test(e.type))return r?r.push(e.parentNode?e.parentNode.removeChild(e):e):n.appendChild(e)};for(s=0;(u=b[s])!=null;s++)if(!v.nodeName(u,"script")||!m(u))n.appendChild(u),typeof u.getElementsByTagName!="undefined"&&(g=v.grep(v.merge([],u.getElementsByTagName("script")),m),b.splice.apply(b,[s+1,0].concat(g)),s+=g.length)}return b},cleanData:function(e,t){var n,r,i,s,o=0,u=v.expando,a=v.cache,f=v.support.deleteExpando,l=v.event.special;for(;(i=e[o])!=null;o++)if(t||v.acceptData(i)){r=i[u],n=r&&a[r];if(n){if(n.events)for(s in n.events)l[s]?v.event.remove(i,s):v.removeEvent(i,s,n.handle);a[r]&&(delete a[r],f?delete i[u]:i.removeAttribute?i.removeAttribute(u):i[u]=null,v.deletedIds.push(r))}}}}),function(){var e,t;v.uaMatch=function(e){e=e.toLowerCase();var t=/(chrome)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[];return{browser:t[1]||"",version:t[2]||"0"}},e=v.uaMatch(o.userAgent),t={},e.browser&&(t[e.browser]=!0,t.version=e.version),t.chrome?t.webkit=!0:t.webkit&&(t.safari=!0),v.browser=t,v.sub=function(){function e(t,n){return new e.fn.init(t,n)}v.extend(!0,e,this),e.superclass=this,e.fn=e.prototype=this(),e.fn.constructor=e,e.sub=this.sub,e.fn.init=function(r,i){return i&&i instanceof v&&!(i instanceof e)&&(i=e(i)),v.fn.init.call(this,r,i,t)},e.fn.init.prototype=e.fn;var t=e(i);return e}}();var Dt,Pt,Ht,Bt=/alpha\([^)]*\)/i,jt=/opacity=([^)]*)/,Ft=/^(top|right|bottom|left)$/,It=/^(none|table(?!-c[ea]).+)/,qt=/^margin/,Rt=new RegExp("^("+m+")(.*)$","i"),Ut=new RegExp("^("+m+")(?!px)[a-z%]+$","i"),zt=new RegExp("^([-+])=("+m+")","i"),Wt={BODY:"block"},Xt={position:"absolute",visibility:"hidden",display:"block"},Vt={letterSpacing:0,fontWeight:400},$t=["Top","Right","Bottom","Left"],Jt=["Webkit","O","Moz","ms"],Kt=v.fn.toggle;v.fn.extend({css:function(e,n){return v.access(this,function(e,n,r){return r!==t?v.style(e,n,r):v.css(e,n)},e,n,arguments.length>1)},show:function(){return Yt(this,!0)},hide:function(){return Yt(this)},toggle:function(e,t){var n=typeof e=="boolean";return v.isFunction(e)&&v.isFunction(t)?Kt.apply(this,arguments):this.each(function(){(n?e:Gt(this))?v(this).show():v(this).hide()})}}),v.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Dt(e,"opacity");return n===""?"1":n}}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":v.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(!e||e.nodeType===3||e.nodeType===8||!e.style)return;var s,o,u,a=v.camelCase(n),f=e.style;n=v.cssProps[a]||(v.cssProps[a]=Qt(f,a)),u=v.cssHooks[n]||v.cssHooks[a];if(r===t)return u&&"get"in u&&(s=u.get(e,!1,i))!==t?s:f[n];o=typeof r,o==="string"&&(s=zt.exec(r))&&(r=(s[1]+1)*s[2]+parseFloat(v.css(e,n)),o="number");if(r==null||o==="number"&&isNaN(r))return;o==="number"&&!v.cssNumber[a]&&(r+="px");if(!u||!("set"in u)||(r=u.set(e,r,i))!==t)try{f[n]=r}catch(l){}},css:function(e,n,r,i){var s,o,u,a=v.camelCase(n);return n=v.cssProps[a]||(v.cssProps[a]=Qt(e.style,a)),u=v.cssHooks[n]||v.cssHooks[a],u&&"get"in u&&(s=u.get(e,!0,i)),s===t&&(s=Dt(e,n)),s==="normal"&&n in Vt&&(s=Vt[n]),r||i!==t?(o=parseFloat(s),r||v.isNumeric(o)?o||0:s):s},swap:function(e,t,n){var r,i,s={};for(i in t)s[i]=e.style[i],e.style[i]=t[i];r=n.call(e);for(i in t)e.style[i]=s[i];return r}}),e.getComputedStyle?Dt=function(t,n){var r,i,s,o,u=e.getComputedStyle(t,null),a=t.style;return u&&(r=u.getPropertyValue(n)||u[n],r===""&&!v.contains(t.ownerDocument,t)&&(r=v.style(t,n)),Ut.test(r)&&qt.test(n)&&(i=a.width,s=a.minWidth,o=a.maxWidth,a.minWidth=a.maxWidth=a.width=r,r=u.width,a.width=i,a.minWidth=s,a.maxWidth=o)),r}:i.documentElement.currentStyle&&(Dt=function(e,t){var n,r,i=e.currentStyle&&e.currentStyle[t],s=e.style;return i==null&&s&&s[t]&&(i=s[t]),Ut.test(i)&&!Ft.test(t)&&(n=s.left,r=e.runtimeStyle&&e.runtimeStyle.left,r&&(e.runtimeStyle.left=e.currentStyle.left),s.left=t==="fontSize"?"1em":i,i=s.pixelLeft+"px",s.left=n,r&&(e.runtimeStyle.left=r)),i===""?"auto":i}),v.each(["height","width"],function(e,t){v.cssHooks[t]={get:function(e,n,r){if(n)return e.offsetWidth===0&&It.test(Dt(e,"display"))?v.swap(e,Xt,function(){return tn(e,t,r)}):tn(e,t,r)},set:function(e,n,r){return Zt(e,n,r?en(e,t,r,v.support.boxSizing&&v.css(e,"boxSizing")==="border-box"):0)}}}),v.support.opacity||(v.cssHooks.opacity={get:function(e,t){return jt.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=v.isNumeric(t)?"alpha(opacity="+t*100+")":"",s=r&&r.filter||n.filter||"";n.zoom=1;if(t>=1&&v.trim(s.replace(Bt,""))===""&&n.removeAttribute){n.removeAttribute("filter");if(r&&!r.filter)return}n.filter=Bt.test(s)?s.replace(Bt,i):s+" "+i}}),v(function(){v.support.reliableMarginRight||(v.cssHooks.marginRight={get:function(e,t){return v.swap(e,{display:"inline-block"},function(){if(t)return Dt(e,"marginRight")})}}),!v.support.pixelPosition&&v.fn.position&&v.each(["top","left"],function(e,t){v.cssHooks[t]={get:function(e,n){if(n){var r=Dt(e,t);return Ut.test(r)?v(e).position()[t]+"px":r}}}})}),v.expr&&v.expr.filters&&(v.expr.filters.hidden=function(e){return e.offsetWidth===0&&e.offsetHeight===0||!v.support.reliableHiddenOffsets&&(e.style&&e.style.display||Dt(e,"display"))==="none"},v.expr.filters.visible=function(e){return!v.expr.filters.hidden(e)}),v.each({margin:"",padding:"",border:"Width"},function(e,t){v.cssHooks[e+t]={expand:function(n){var r,i=typeof n=="string"?n.split(" "):[n],s={};for(r=0;r<4;r++)s[e+$t[r]+t]=i[r]||i[r-2]||i[0];return s}},qt.test(e)||(v.cssHooks[e+t].set=Zt)});var rn=/%20/g,sn=/\[\]$/,on=/\r?\n/g,un=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,an=/^(?:select|textarea)/i;v.fn.extend({serialize:function(){return v.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?v.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||an.test(this.nodeName)||un.test(this.type))}).map(function(e,t){var n=v(this).val();return n==null?null:v.isArray(n)?v.map(n,function(e,n){return{name:t.name,value:e.replace(on,"\r\n")}}):{name:t.name,value:n.replace(on,"\r\n")}}).get()}}),v.param=function(e,n){var r,i=[],s=function(e,t){t=v.isFunction(t)?t():t==null?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};n===t&&(n=v.ajaxSettings&&v.ajaxSettings.traditional);if(v.isArray(e)||e.jquery&&!v.isPlainObject(e))v.each(e,function(){s(this.name,this.value)});else for(r in e)fn(r,e[r],n,s);return i.join("&").replace(rn,"+")};var ln,cn,hn=/#.*$/,pn=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,dn=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,vn=/^(?:GET|HEAD)$/,mn=/^\/\//,gn=/\?/,yn=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,bn=/([?&])_=[^&]*/,wn=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,En=v.fn.load,Sn={},xn={},Tn=["*/"]+["*"];try{cn=s.href}catch(Nn){cn=i.createElement("a"),cn.href="",cn=cn.href}ln=wn.exec(cn.toLowerCase())||[],v.fn.load=function(e,n,r){if(typeof e!="string"&&En)return En.apply(this,arguments);if(!this.length)return this;var i,s,o,u=this,a=e.indexOf(" ");return a>=0&&(i=e.slice(a,e.length),e=e.slice(0,a)),v.isFunction(n)?(r=n,n=t):n&&typeof n=="object"&&(s="POST"),v.ajax({url:e,type:s,dataType:"html",data:n,complete:function(e,t){r&&u.each(r,o||[e.responseText,t,e])}}).done(function(e){o=arguments,u.html(i?v("<div>").append(e.replace(yn,"")).find(i):e)}),this},v.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(e,t){v.fn[t]=function(e){return this.on(t,e)}}),v.each(["get","post"],function(e,n){v[n]=function(e,r,i,s){return v.isFunction(r)&&(s=s||i,i=r,r=t),v.ajax({type:n,url:e,data:r,success:i,dataType:s})}}),v.extend({getScript:function(e,n){return v.get(e,t,n,"script")},getJSON:function(e,t,n){return v.get(e,t,n,"json")},ajaxSetup:function(e,t){return t?Ln(e,v.ajaxSettings):(t=e,e=v.ajaxSettings),Ln(e,t),e},ajaxSettings:{url:cn,isLocal:dn.test(ln[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":Tn},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":e.String,"text html":!0,"text json":v.parseJSON,"text xml":v.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:Cn(Sn),ajaxTransport:Cn(xn),ajax:function(e,n){function T(e,n,s,a){var l,y,b,w,S,T=n;if(E===2)return;E=2,u&&clearTimeout(u),o=t,i=a||"",x.readyState=e>0?4:0,s&&(w=An(c,x,s));if(e>=200&&e<300||e===304)c.ifModified&&(S=x.getResponseHeader("Last-Modified"),S&&(v.lastModified[r]=S),S=x.getResponseHeader("Etag"),S&&(v.etag[r]=S)),e===304?(T="notmodified",l=!0):(l=On(c,w),T=l.state,y=l.data,b=l.error,l=!b);else{b=T;if(!T||e)T="error",e<0&&(e=0)}x.status=e,x.statusText=(n||T)+"",l?d.resolveWith(h,[y,T,x]):d.rejectWith(h,[x,T,b]),x.statusCode(g),g=t,f&&p.trigger("ajax"+(l?"Success":"Error"),[x,c,l?y:b]),m.fireWith(h,[x,T]),f&&(p.trigger("ajaxComplete",[x,c]),--v.active||v.event.trigger("ajaxStop"))}typeof e=="object"&&(n=e,e=t),n=n||{};var r,i,s,o,u,a,f,l,c=v.ajaxSetup({},n),h=c.context||c,p=h!==c&&(h.nodeType||h instanceof v)?v(h):v.event,d=v.Deferred(),m=v.Callbacks("once memory"),g=c.statusCode||{},b={},w={},E=0,S="canceled",x={readyState:0,setRequestHeader:function(e,t){if(!E){var n=e.toLowerCase();e=w[n]=w[n]||e,b[e]=t}return this},getAllResponseHeaders:function(){return E===2?i:null},getResponseHeader:function(e){var n;if(E===2){if(!s){s={};while(n=pn.exec(i))s[n[1].toLowerCase()]=n[2]}n=s[e.toLowerCase()]}return n===t?null:n},overrideMimeType:function(e){return E||(c.mimeType=e),this},abort:function(e){return e=e||S,o&&o.abort(e),T(0,e),this}};d.promise(x),x.success=x.done,x.error=x.fail,x.complete=m.add,x.statusCode=function(e){if(e){var t;if(E<2)for(t in e)g[t]=[g[t],e[t]];else t=e[x.status],x.always(t)}return this},c.url=((e||c.url)+"").replace(hn,"").replace(mn,ln[1]+"//"),c.dataTypes=v.trim(c.dataType||"*").toLowerCase().split(y),c.crossDomain==null&&(a=wn.exec(c.url.toLowerCase()),c.crossDomain=!(!a||a[1]===ln[1]&&a[2]===ln[2]&&(a[3]||(a[1]==="http:"?80:443))==(ln[3]||(ln[1]==="http:"?80:443)))),c.data&&c.processData&&typeof c.data!="string"&&(c.data=v.param(c.data,c.traditional)),kn(Sn,c,n,x);if(E===2)return x;f=c.global,c.type=c.type.toUpperCase(),c.hasContent=!vn.test(c.type),f&&v.active++===0&&v.event.trigger("ajaxStart");if(!c.hasContent){c.data&&(c.url+=(gn.test(c.url)?"&":"?")+c.data,delete c.data),r=c.url;if(c.cache===!1){var N=v.now(),C=c.url.replace(bn,"$1_="+N);c.url=C+(C===c.url?(gn.test(c.url)?"&":"?")+"_="+N:"")}}(c.data&&c.hasContent&&c.contentType!==!1||n.contentType)&&x.setRequestHeader("Content-Type",c.contentType),c.ifModified&&(r=r||c.url,v.lastModified[r]&&x.setRequestHeader("If-Modified-Since",v.lastModified[r]),v.etag[r]&&x.setRequestHeader("If-None-Match",v.etag[r])),x.setRequestHeader("Accept",c.dataTypes[0]&&c.accepts[c.dataTypes[0]]?c.accepts[c.dataTypes[0]]+(c.dataTypes[0]!=="*"?", "+Tn+"; q=0.01":""):c.accepts["*"]);for(l in c.headers)x.setRequestHeader(l,c.headers[l]);if(!c.beforeSend||c.beforeSend.call(h,x,c)!==!1&&E!==2){S="abort";for(l in{success:1,error:1,complete:1})x[l](c[l]);o=kn(xn,c,n,x);if(!o)T(-1,"No Transport");else{x.readyState=1,f&&p.trigger("ajaxSend",[x,c]),c.async&&c.timeout>0&&(u=setTimeout(function(){x.abort("timeout")},c.timeout));try{E=1,o.send(b,T)}catch(k){if(!(E<2))throw k;T(-1,k)}}return x}return x.abort()},active:0,lastModified:{},etag:{}});var Mn=[],_n=/\?/,Dn=/(=)\?(?=&|$)|\?\?/,Pn=v.now();v.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Mn.pop()||v.expando+"_"+Pn++;return this[e]=!0,e}}),v.ajaxPrefilter("json jsonp",function(n,r,i){var s,o,u,a=n.data,f=n.url,l=n.jsonp!==!1,c=l&&Dn.test(f),h=l&&!c&&typeof a=="string"&&!(n.contentType||"").indexOf("application/x-www-form-urlencoded")&&Dn.test(a);if(n.dataTypes[0]==="jsonp"||c||h)return s=n.jsonpCallback=v.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,o=e[s],c?n.url=f.replace(Dn,"$1"+s):h?n.data=a.replace(Dn,"$1"+s):l&&(n.url+=(_n.test(f)?"&":"?")+n.jsonp+"="+s),n.converters["script json"]=function(){return u||v.error(s+" was not called"),u[0]},n.dataTypes[0]="json",e[s]=function(){u=arguments},i.always(function(){e[s]=o,n[s]&&(n.jsonpCallback=r.jsonpCallback,Mn.push(s)),u&&v.isFunction(o)&&o(u[0]),u=o=t}),"script"}),v.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(e){return v.globalEval(e),e}}}),v.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),v.ajaxTransport("script",function(e){if(e.crossDomain){var n,r=i.head||i.getElementsByTagName("head")[0]||i.documentElement;return{send:function(s,o){n=i.createElement("script"),n.async="async",e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,i){if(i||!n.readyState||/loaded|complete/.test(n.readyState))n.onload=n.onreadystatechange=null,r&&n.parentNode&&r.removeChild(n),n=t,i||o(200,"success")},r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(0,1)}}}});var Hn,Bn=e.ActiveXObject?function(){for(var e in Hn)Hn[e](0,1)}:!1,jn=0;v.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&Fn()||In()}:Fn,function(e){v.extend(v.support,{ajax:!!e,cors:!!e&&"withCredentials"in e})}(v.ajaxSettings.xhr()),v.support.ajax&&v.ajaxTransport(function(n){if(!n.crossDomain||v.support.cors){var r;return{send:function(i,s){var o,u,a=n.xhr();n.username?a.open(n.type,n.url,n.async,n.username,n.password):a.open(n.type,n.url,n.async);if(n.xhrFields)for(u in n.xhrFields)a[u]=n.xhrFields[u];n.mimeType&&a.overrideMimeType&&a.overrideMimeType(n.mimeType),!n.crossDomain&&!i["X-Requested-With"]&&(i["X-Requested-With"]="XMLHttpRequest");try{for(u in i)a.setRequestHeader(u,i[u])}catch(f){}a.send(n.hasContent&&n.data||null),r=function(e,i){var u,f,l,c,h;try{if(r&&(i||a.readyState===4)){r=t,o&&(a.onreadystatechange=v.noop,Bn&&delete Hn[o]);if(i)a.readyState!==4&&a.abort();else{u=a.status,l=a.getAllResponseHeaders(),c={},h=a.responseXML,h&&h.documentElement&&(c.xml=h);try{c.text=a.responseText}catch(p){}try{f=a.statusText}catch(p){f=""}!u&&n.isLocal&&!n.crossDomain?u=c.text?200:404:u===1223&&(u=204)}}}catch(d){i||s(-1,d)}c&&s(u,f,c,l)},n.async?a.readyState===4?setTimeout(r,0):(o=++jn,Bn&&(Hn||(Hn={},v(e).unload(Bn)),Hn[o]=r),a.onreadystatechange=r):r()},abort:function(){r&&r(0,1)}}}});var qn,Rn,Un=/^(?:toggle|show|hide)$/,zn=new RegExp("^(?:([-+])=|)("+m+")([a-z%]*)$","i"),Wn=/queueHooks$/,Xn=[Gn],Vn={"*":[function(e,t){var n,r,i=this.createTween(e,t),s=zn.exec(t),o=i.cur(),u=+o||0,a=1,f=20;if(s){n=+s[2],r=s[3]||(v.cssNumber[e]?"":"px");if(r!=="px"&&u){u=v.css(i.elem,e,!0)||n||1;do a=a||".5",u/=a,v.style(i.elem,e,u+r);while(a!==(a=i.cur()/o)&&a!==1&&--f)}i.unit=r,i.start=u,i.end=s[1]?u+(s[1]+1)*n:n}return i}]};v.Animation=v.extend(Kn,{tweener:function(e,t){v.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");var n,r=0,i=e.length;for(;r<i;r++)n=e[r],Vn[n]=Vn[n]||[],Vn[n].unshift(t)},prefilter:function(e,t){t?Xn.unshift(e):Xn.push(e)}}),v.Tween=Yn,Yn.prototype={constructor:Yn,init:function(e,t,n,r,i,s){this.elem=e,this.prop=n,this.easing=i||"swing",this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=s||(v.cssNumber[n]?"":"px")},cur:function(){var e=Yn.propHooks[this.prop];return e&&e.get?e.get(this):Yn.propHooks._default.get(this)},run:function(e){var t,n=Yn.propHooks[this.prop];return this.options.duration?this.pos=t=v.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):Yn.propHooks._default.set(this),this}},Yn.prototype.init.prototype=Yn.prototype,Yn.propHooks={_default:{get:function(e){var t;return e.elem[e.prop]==null||!!e.elem.style&&e.elem.style[e.prop]!=null?(t=v.css(e.elem,e.prop,!1,""),!t||t==="auto"?0:t):e.elem[e.prop]},set:function(e){v.fx.step[e.prop]?v.fx.step[e.prop](e):e.elem.style&&(e.elem.style[v.cssProps[e.prop]]!=null||v.cssHooks[e.prop])?v.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},Yn.propHooks.scrollTop=Yn.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},v.each(["toggle","show","hide"],function(e,t){var n=v.fn[t];v.fn[t]=function(r,i,s){return r==null||typeof r=="boolean"||!e&&v.isFunction(r)&&v.isFunction(i)?n.apply(this,arguments):this.animate(Zn(t,!0),r,i,s)}}),v.fn.extend({fadeTo:function(e,t,n,r){return this.filter(Gt).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=v.isEmptyObject(e),s=v.speed(t,n,r),o=function(){var t=Kn(this,v.extend({},e),s);i&&t.stop(!0)};return i||s.queue===!1?this.each(o):this.queue(s.queue,o)},stop:function(e,n,r){var i=function(e){var t=e.stop;delete e.stop,t(r)};return typeof e!="string"&&(r=n,n=e,e=t),n&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,n=e!=null&&e+"queueHooks",s=v.timers,o=v._data(this);if(n)o[n]&&o[n].stop&&i(o[n]);else for(n in o)o[n]&&o[n].stop&&Wn.test(n)&&i(o[n]);for(n=s.length;n--;)s[n].elem===this&&(e==null||s[n].queue===e)&&(s[n].anim.stop(r),t=!1,s.splice(n,1));(t||!r)&&v.dequeue(this,e)})}}),v.each({slideDown:Zn("show"),slideUp:Zn("hide"),slideToggle:Zn("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){v.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),v.speed=function(e,t,n){var r=e&&typeof e=="object"?v.extend({},e):{complete:n||!n&&t||v.isFunction(e)&&e,duration:e,easing:n&&t||t&&!v.isFunction(t)&&t};r.duration=v.fx.off?0:typeof r.duration=="number"?r.duration:r.duration in v.fx.speeds?v.fx.speeds[r.duration]:v.fx.speeds._default;if(r.queue==null||r.queue===!0)r.queue="fx";return r.old=r.complete,r.complete=function(){v.isFunction(r.old)&&r.old.call(this),r.queue&&v.dequeue(this,r.queue)},r},v.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},v.timers=[],v.fx=Yn.prototype.init,v.fx.tick=function(){var e,n=v.timers,r=0;qn=v.now();for(;r<n.length;r++)e=n[r],!e()&&n[r]===e&&n.splice(r--,1);n.length||v.fx.stop(),qn=t},v.fx.timer=function(e){e()&&v.timers.push(e)&&!Rn&&(Rn=setInterval(v.fx.tick,v.fx.interval))},v.fx.interval=13,v.fx.stop=function(){clearInterval(Rn),Rn=null},v.fx.speeds={slow:600,fast:200,_default:400},v.fx.step={},v.expr&&v.expr.filters&&(v.expr.filters.animated=function(e){return v.grep(v.timers,function(t){return e===t.elem}).length});var er=/^(?:body|html)$/i;v.fn.offset=function(e){if(arguments.length)return e===t?this:this.each(function(t){v.offset.setOffset(this,e,t)});var n,r,i,s,o,u,a,f={top:0,left:0},l=this[0],c=l&&l.ownerDocument;if(!c)return;return(r=c.body)===l?v.offset.bodyOffset(l):(n=c.documentElement,v.contains(n,l)?(typeof l.getBoundingClientRect!="undefined"&&(f=l.getBoundingClientRect()),i=tr(c),s=n.clientTop||r.clientTop||0,o=n.clientLeft||r.clientLeft||0,u=i.pageYOffset||n.scrollTop,a=i.pageXOffset||n.scrollLeft,{top:f.top+u-s,left:f.left+a-o}):f)},v.offset={bodyOffset:function(e){var t=e.offsetTop,n=e.offsetLeft;return v.support.doesNotIncludeMarginInBodyOffset&&(t+=parseFloat(v.css(e,"marginTop"))||0,n+=parseFloat(v.css(e,"marginLeft"))||0),{top:t,left:n}},setOffset:function(e,t,n){var r=v.css(e,"position");r==="static"&&(e.style.position="relative");var i=v(e),s=i.offset(),o=v.css(e,"top"),u=v.css(e,"left"),a=(r==="absolute"||r==="fixed")&&v.inArray("auto",[o,u])>-1,f={},l={},c,h;a?(l=i.position(),c=l.top,h=l.left):(c=parseFloat(o)||0,h=parseFloat(u)||0),v.isFunction(t)&&(t=t.call(e,n,s)),t.top!=null&&(f.top=t.top-s.top+c),t.left!=null&&(f.left=t.left-s.left+h),"using"in t?t.using.call(e,f):i.css(f)}},v.fn.extend({position:function(){if(!this[0])return;var e=this[0],t=this.offsetParent(),n=this.offset(),r=er.test(t[0].nodeName)?{top:0,left:0}:t.offset();return n.top-=parseFloat(v.css(e,"marginTop"))||0,n.left-=parseFloat(v.css(e,"marginLeft"))||0,r.top+=parseFloat(v.css(t[0],"borderTopWidth"))||0,r.left+=parseFloat(v.css(t[0],"borderLeftWidth"))||0,{top:n.top-r.top,left:n.left-r.left}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||i.body;while(e&&!er.test(e.nodeName)&&v.css(e,"position")==="static")e=e.offsetParent;return e||i.body})}}),v.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,n){var r=/Y/.test(n);v.fn[e]=function(i){return v.access(this,function(e,i,s){var o=tr(e);if(s===t)return o?n in o?o[n]:o.document.documentElement[i]:e[i];o?o.scrollTo(r?v(o).scrollLeft():s,r?s:v(o).scrollTop()):e[i]=s},e,i,arguments.length,null)}}),v.each({Height:"height",Width:"width"},function(e,n){v.each({padding:"inner"+e,content:n,"":"outer"+e},function(r,i){v.fn[i]=function(i,s){var o=arguments.length&&(r||typeof i!="boolean"),u=r||(i===!0||s===!0?"margin":"border");return v.access(this,function(n,r,i){var s;return v.isWindow(n)?n.document.documentElement["client"+e]:n.nodeType===9?(s=n.documentElement,Math.max(n.body["scroll"+e],s["scroll"+e],n.body["offset"+e],s["offset"+e],s["client"+e])):i===t?v.css(n,r,i,u):v.style(n,r,i,u)},n,o?i:t,o,null)}})}),e.jQuery=e.$=v,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return v})})(window); \ No newline at end of file
diff --git a/phpBB/assets/javascript/plupload.js b/phpBB/assets/javascript/plupload.js
new file mode 100644
index 0000000000..3c2fc5c3cb
--- /dev/null
+++ b/phpBB/assets/javascript/plupload.js
@@ -0,0 +1,685 @@
+plupload.addI18n(phpbb.plupload.i18n);
+phpbb.plupload.ids = [];
+
+(function($) { // Avoid conflicts with other libraries
+
+"use strict";
+
+/**
+ * Set up the uploader.
+ *
+ * @return undefined
+ */
+phpbb.plupload.initialize = function() {
+ // Initialize the Plupload uploader.
+ uploader.init();
+
+ // Set attachment data.
+ phpbb.plupload.setData(phpbb.plupload.data);
+ phpbb.plupload.updateMultipartParams(phpbb.plupload.getSerializedData());
+
+ // Only execute if Plupload initialized successfully.
+ uploader.bind('Init', function() {
+ phpbb.plupload.form = $(phpbb.plupload.config.form_hook)[0],
+ phpbb.plupload.rowTpl = $('#attach-row-tpl')[0].outerHTML;
+
+ // Hide the basic upload panel and remove the attach row template.
+ $('#attach-row-tpl, #attach-panel-basic').remove();
+ // Show multi-file upload options.
+ $('#attach-panel-multi').show();
+ });
+
+ uploader.bind('PostInit', function() {
+ // Point out the drag-and-drop zone if it's supported.
+ if (uploader.features.dragdrop) {
+ $('#drag-n-drop-message').show();
+ }
+ });
+};
+
+/**
+ * Unsets all elements in the object uploader.settings.multipart_params whose keys
+ * begin with 'attachment_data['
+ *
+ * @return undefined
+ */
+phpbb.plupload.clearParams = function() {
+ var obj = uploader.settings.multipart_params;
+ for (var key in obj) {
+ if (!obj.hasOwnProperty(key) || key.indexOf('attachment_data[') !== 0) {
+ continue;
+ }
+
+ delete uploader.settings.multipart_params[key];
+ }
+};
+
+/**
+ * Update uploader.settings.multipart_params object with new data.
+ *
+ * @param object obj
+ * @return undefined
+ */
+phpbb.plupload.updateMultipartParams = function(obj) {
+ uploader.settings.multipart_params = $.extend(
+ uploader.settings.multipart_params,
+ obj
+ );
+};
+
+/**
+ * Convert the array of attachment objects into an object that PHP would expect as POST data.
+ *
+ * @return object An object in the form 'attachment_data[i][key]': value as
+ * expected by the server
+ */
+phpbb.plupload.getSerializedData = function() {
+ var obj = {};
+ for (var i = 0; i < phpbb.plupload.data.length; i++) {
+ var datum = phpbb.plupload.data[i];
+ for (var key in datum) {
+ if (!datum.hasOwnProperty(key)) {
+ continue;
+ }
+
+ obj['attachment_data[' + i + '][' + key + ']'] = datum[key];
+ }
+ }
+ return obj;
+};
+
+/**
+ * Get the index from the phpbb.plupload.data array where the given
+ * attachment id appears.
+ *
+ * @param int attach_id The attachment id of the file.
+ * @return bool Returns false if the id cannot be found.
+ * @return int Returns the index of the file if it exists.
+ */
+phpbb.plupload.getIndex = function(attach_id) {
+ var index = $.inArray(Number(attach_id), phpbb.plupload.ids);
+ return (index !== -1) ? index : false;
+};
+
+/**
+ * Set the data in phpbb.plupload.data and phpbb.plupload.ids arrays.
+ *
+ * @param array data Array containing the new data to use. In the form of
+ * array(index => object(property: value). Requires attach_id to be one of the object properties.
+ *
+ * @return undefined
+ */
+phpbb.plupload.setData = function(data) {
+ // Make sure that the array keys are reset.
+ phpbb.plupload.ids = phpbb.plupload.data = [];
+ phpbb.plupload.data = data;
+
+ for (var i = 0; i < data.length; i++) {
+ phpbb.plupload.ids.push(Number(data[i].attach_id));
+ }
+};
+
+/**
+ * Update the attachment data in the HTML and the phpbb & phpbb.plupload objects.
+ *
+ * @param array data Array containing the new data to use.
+ * @param string action The action that required the update. Used to update the inline attachment bbcodes.
+ * @param int index The index from phpbb.plupload_ids that was affected by the action.
+ * @param array downloadUrl Optional array of download urls to update.
+ * @return undefined
+ */
+phpbb.plupload.update = function(data, action, index, downloadUrl) {
+
+ phpbb.plupload.updateBbcode(action, index);
+ phpbb.plupload.setData(data);
+ phpbb.plupload.updateRows(downloadUrl);
+ phpbb.plupload.clearParams();
+ phpbb.plupload.updateMultipartParams(phpbb.plupload.getSerializedData());
+};
+
+/**
+ * Update the relevant elements and hidden data for all attachments.
+ *
+ * @param array downloadUrl Optional array of download urls to update.
+ * @return undefined
+ */
+phpbb.plupload.updateRows = function(downloadUrl) {
+ for (var i = 0; i < phpbb.plupload.ids.length; i++) {
+ phpbb.plupload.updateRow(i, downloadUrl);
+ }
+};
+
+/**
+ * Insert a row for a new attachment. This expects an HTML snippet in the HTML
+ * using the id "attach-row-tpl" to be present. This snippet is cloned and the
+ * data for the file inserted into it. The row is then appended or prepended to
+ * #file-list based on the attach_order setting.
+ *
+ * @param object file Plupload file object for the new attachment.
+ * @return undefined
+ */
+phpbb.plupload.insertRow = function(file) {
+ var row = $(phpbb.plupload.rowTpl);
+
+ row.attr('id', file.id);
+ row.find('.file-name').html(plupload.xmlEncode(file.name));
+ row.find('.file-size').html(plupload.formatSize(file.size));
+
+ if (phpbb.plupload.order == 'desc') {
+ $('#file-list').prepend(row);
+ } else {
+ $('#file-list').append(row);
+ }
+};
+
+/**
+ * Update the relevant elements and hidden data for an attachment.
+ *
+ * @param int index The index from phpbb.plupload.ids of the attachment to edit.
+ * @param array downloadUrl Optional array of download urls to update.
+ * @return undefined
+ */
+phpbb.plupload.updateRow = function(index, downloadUrl) {
+ var attach = phpbb.plupload.data[index],
+ row = $('[data-attach-id="' + attach.attach_id + '"]');
+
+ // Add the link to the file
+ if (typeof downloadUrl !== 'undefined' && typeof downloadUrl[index] !== 'undefined') {
+ var url = downloadUrl[index].replace('&amp;', '&'),
+ link = $('<a></a>');
+
+ link.attr('href', url).html(attach.real_filename);
+ row.find('.file-name').html(link)
+ }
+
+ row.find('textarea').attr('name', 'comment_list[' + index + ']');
+ phpbb.plupload.updateHiddenData(row, attach, index);
+};
+
+/**
+ * Update hidden input data for an attachment.
+ *
+ * @param object row jQuery object for the attachment row.
+ * @param object attach Attachment data object from phpbb.plupload.data
+ * @param int index Attachment index from phpbb.plupload.ids
+ * @return undefined
+ */
+phpbb.plupload.updateHiddenData = function(row, attach, index) {
+ row.find('input[type="hidden"]').remove();
+
+ for (var key in attach) {
+ var input = $('<input />')
+ .attr('type', 'hidden')
+ .attr('name', 'attachment_data[' + index + '][' + key +']')
+ .attr('value', attach[key]);
+ $('textarea', row).after(input);
+ }
+};
+
+/**
+ * Deleting a file removes it from the queue and fires an AJAX event to the
+ * server to tell it to remove the temporary attachment. The server
+ * responds with the updated attachment data list so that any future
+ * uploads can maintain state with the server
+ *
+ * @param object row jQuery object for the attachment row.
+ * @param int attachId Attachment id of the file to be removed.
+ *
+ * @return undefined
+ */
+phpbb.plupload.deleteFile = function(row, attachId) {
+ // If there's no attach id, then the file hasn't been uploaded. Simply delete the row.
+ if (typeof attachId === 'undefined') {
+ var file = uploader.getFile(row.attr('id'));
+ uploader.removeFile(file);
+
+ row.slideUp(100, function() {
+ row.remove();
+ phpbb.plupload.hideEmptyList();
+ });
+ }
+
+ var index = phpbb.plupload.getIndex(attachId);
+ row.find('.file-status').toggleClass('file-uploaded file-working');
+
+ if (index === false) {
+ return;
+ }
+ var fields = {};
+ fields['delete_file[' + index + ']'] = 1;
+
+ var always = function() {
+ row.find('.file-status').removeClass('file-working');
+ };
+
+ var done = function(response) {
+ var json = {};
+ try {
+ json = $.parseJSON(response);
+ } catch (e) {
+ return;
+ }
+
+ // trigger_error() was called which likely means a permission error was encountered.
+ if (typeof response.title !== 'undefined') {
+ uploader.trigger('Error', {message: response.message});
+ // We will have to assume that the deletion failed. So leave the file status as uploaded.
+ row.find('.file-status').toggleClass('file-uploaded');
+
+ return;
+ }
+ phpbb.plupload.update(response, 'removal', index);
+ // Check if the user can upload files now if he had reached the max files limit.
+ phpbb.plupload.handleMaxFilesReached();
+
+ if (row.attr('id')) {
+ var file = uploader.getFile(row.attr('id'));
+ uploader.removeFile(file);
+ }
+ row.slideUp(100, function() {
+ row.remove();
+ // Hide the file list if it's empty now.
+ phpbb.plupload.hideEmptyList();
+ });
+ uploader.trigger('FilesRemoved');
+ };
+
+ $.ajax(phpbb.plupload.config.url, {
+ type: 'POST',
+ data: $.extend(fields, phpbb.plupload.getSerializedData()),
+ headers: {'X-PHPBB-USING-PLUPLOAD': '1', 'X-Requested-With': 'XMLHttpRequest'}
+ })
+ .always(always)
+ .done(done);
+};
+
+/**
+ * Check the attachment list and hide its container if it's empty.
+ *
+ * @return undefined
+ */
+phpbb.plupload.hideEmptyList = function() {
+ if (!$('#file-list').children().length) {
+ $('#file-list-container').slideUp(100);
+ }
+}
+
+/**
+ * Update the indices used in inline attachment bbcodes. This ensures that the bbcodes
+ * correspond to the correct file after a file is added or removed. This should be called
+ * before the phpbb.plupload,data and phpbb.plupload.ids arrays are updated, otherwise it will
+ * not work correctly.
+ *
+ * @param string action The action that occurred -- either "addition" or "removal"
+ * @param int index The index of the attachment from phpbb.plupload.ids that was affected.
+ *
+ * @return undefined
+ */
+phpbb.plupload.updateBbcode = function(action, index) {
+ var textarea = $('#message', phpbb.plupload.form),
+ text = textarea.val(),
+ removal = (action === 'removal');
+
+ // Return if the bbcode isn't used at all.
+ if (text.indexOf('[attachment=') === -1) {
+ return;
+ }
+
+ // Private function used to replace the bbcode.
+ var updateBbcode = function(match, fileName) {
+ // Remove the bbcode if the file was removed.
+ if (removal && index === i) {
+ return '';
+ }
+ var newIndex = i + ((removal) ? -1 : 1);
+ return '[attachment=' + newIndex +']' + fileName + '[/attachment]';
+ };
+
+ // Private function used to generate search regexp
+ var searchRegexp = function(index) {
+ return new RegExp('\\[attachment=' + index + '\\](.*?)\\[\\/attachment\\]', 'g');
+ }
+ // The update order of the indices is based on the action taken to ensure that we don't corrupt
+ // the bbcode index by updating it several times as we move through the loop.
+ // Removal loop starts at the removed index and moves to the end of the array.
+ // Addition loop starts at the end of the array and moves to the added index at 0.
+ var searchLoop = function() {
+ if (typeof i === 'undefined') {
+ i = (removal) ? index : phpbb.plupload.ids.length - 1;
+ }
+ return (removal) ? (i < phpbb.plupload.ids.length): (i >= index);
+ }
+ var i;
+
+ while (searchLoop()) {
+ text = text.replace(searchRegexp(i), updateBbcode);
+ (removal) ? i++ : i--;
+ }
+ textarea.val(text);
+};
+
+/**
+ * Get Plupload file objects based on their upload status.
+ *
+ * @param int status Plupload status - plupload.DONE, plupload.FAILED, plupload.QUEUED,
+ * plupload.STARTED, plupload.STOPPED
+ *
+ * @return Returns an array of the Plupload file objects matching the status.
+ */
+phpbb.plupload.getFilesByStatus = function(status) {
+ var files = [];
+
+ $.each(uploader.files, function(i, file) {
+ if (file.status === status) {
+ files.push(file);
+ }
+ });
+ return files;
+}
+
+/**
+ * Check whether the user has reached the maximun number of files that he's allowed
+ * to upload. If so, disables the uploader and marks the queued files as failed. Otherwise
+ * makes sure that the uploader is enabled.
+ *
+ * @return bool Returns true if the limit has been reached. False if otherwise.
+ */
+phpbb.plupload.handleMaxFilesReached = function() {
+ // If there is no limit, the user is an admin or moderator.
+ if (!phpbb.plupload.maxFiles) {
+ return false;
+ }
+
+ if (phpbb.plupload.maxFiles <= phpbb.plupload.ids.length) {
+ // Fail the rest of the queue.
+ phpbb.plupload.markQueuedFailed(phpbb.plupload.lang.TOO_MANY_ATTACHMENTS);
+ // Disable the uploader.
+ phpbb.plupload.disableUploader();
+ uploader.trigger('Error', {message: phpbb.plupload.lang.TOO_MANY_ATTACHMENTS});
+
+ return true;
+ } else if(phpbb.plupload.maxFiles > phpbb.plupload.ids.length) {
+ // Enable the uploader if the user is under the limit
+ phpbb.plupload.enableUploader();
+ }
+ return false;
+}
+
+/**
+ * Disable the uploader
+ *
+ * @return undefined
+ */
+phpbb.plupload.disableUploader = function() {
+ $('#add_files').addClass('disabled');
+ uploader.disableBrowse();
+}
+
+/**
+ * Enable the uploader
+ *
+ * @return undefined
+ */
+phpbb.plupload.enableUploader = function() {
+ $('#add_files').removeClass('disabled');
+ uploader.disableBrowse(false);
+}
+
+/**
+ * Mark all queued files as failed.
+ *
+ * @param string error Error message to present to the user.
+ * @return undefined
+ */
+phpbb.plupload.markQueuedFailed = function(error) {
+ var files = phpbb.plupload.getFilesByStatus(plupload.QUEUED);
+
+ $.each(files, function(i, file) {
+ $('#' + file.id).find('.file-progress').hide();
+ phpbb.plupload.fileError(file, error);
+ });
+}
+
+/**
+ * Marks a file as failed and sets the error message for it.
+ *
+ * @param object file Plupload file object that failed.
+ * @param string error Error message to present to the user.
+ * @return undefined
+ */
+phpbb.plupload.fileError = function(file, error) {
+ file.status = plupload.FAILED;
+ file.error = error;
+ $('#' + file.id).find('.file-status').addClass('file-error').attr({'data-error-title': phpbb.plupload.lang.ERROR, 'data-error-message': error});
+}
+
+
+
+
+/**
+ * Set up the Plupload object and get some basic data.
+ */
+var uploader = new plupload.Uploader(phpbb.plupload.config);
+phpbb.plupload.initialize();
+
+
+
+
+/**
+ * Insert inline attachment bbcode.
+ */
+ $('#file-list').on('click', '.file-inline-bbcode', function(e) {
+ var attachId = $(this).parents('.attach-row').attr('data-attach-id'),
+ index = phpbb.plupload.getIndex(attachId);
+
+ attach_inline(index, phpbb.plupload.data[index].real_filename);
+ e.preventDefault();
+});
+
+/**
+ * Delete a file.
+ */
+$('#file-list').on('click', '.file-delete', function(e) {
+ var row = $(this).parents('.attach-row'),
+ attachId = row.attr('data-attach-id');
+
+ phpbb.plupload.deleteFile(row, attachId);
+ e.preventDefault();
+});
+
+/**
+ * Display the error message for a particular file when the error icon is clicked.
+ */
+$('#file-list').on('click', '.file-error', function(e) {
+ phpbb.alert($(this).attr('data-error-title'), $(this).attr('data-error-message'));
+ e.preventDefault();
+});
+
+/**
+ * Fires when an error occurs.
+ */
+uploader.bind('Error', function(up, error) {
+ error.file.name = plupload.xmlEncode(error.file.name);
+
+ // The error message that Plupload provides for these is vague, so we'll be more specific.
+ if (error.code === plupload.FILE_EXTENSION_ERROR) {
+ error.message = plupload.translate('Invalid file extension:') + ' ' + error.file.name;
+ } else if (error.code === plupload.FILE_SIZE_ERROR) {
+ error.message = plupload.translate('File too large:') + ' ' + error.file.name;
+ }
+ phpbb.alert(phpbb.plupload.lang.ERROR, error.message);
+});
+
+/**
+ * Fires before a given file is about to be uploaded. This allows us to
+ * send the real filename along with the chunk. This is necessary because
+ * for some reason the filename is set to 'blob' whenever a file is chunked
+ *
+ * @param object up The plupload.Uploader object
+ * @param object file The plupload.File object that is about to be
+ * uploaded
+ *
+ * @return undefined
+ */
+uploader.bind('BeforeUpload', function(up, file) {
+ if (phpbb.plupload.handleMaxFilesReached()) {
+ return;
+ }
+
+ phpbb.plupload.updateMultipartParams({'real_filename': file.name});
+});
+
+/**
+ * Fired when a single chunk of any given file is uploaded. This parses the
+ * response from the server and checks for an error. If an error occurs it
+ * is reported to the user and the upload of this particular file is halted
+ *
+ * @param object up The plupload.Uploader object
+ * @param object file The plupload.File object whose chunk has just
+ * been uploaded
+ * @param object response The response object from the server
+ *
+ * @return undefined
+ */
+uploader.bind('ChunkUploaded', function(up, file, response) {
+ if (response.chunk >= response.chunks - 1) {
+ return;
+ }
+
+ var json = {};
+ try {
+ json = $.parseJSON(response.response);
+ } catch (e) {
+ file.status = plupload.FAILED;
+ up.trigger('FileUploaded', file, {
+ response: JSON.stringify({
+ error: {
+ message: 'Error parsing server response.'
+ }
+ })
+ });
+ }
+
+ // If trigger_error() was called, then a permission error likely occurred.
+ if (typeof json.title !== 'undefined') {
+ json.error = {message: json.message};
+ }
+
+ if (json.error) {
+ file.status = plupload.FAILED;
+ up.trigger('FileUploaded', file, {
+ response: JSON.stringify({
+ error: {
+ message: json.error.message
+ }
+ })
+ });
+ }
+});
+
+/**
+ * Fires when files are added to the queue.
+ *
+ * @return undefined
+ */
+uploader.bind('FilesAdded', function(up, files) {
+ // Prevent unnecessary requests to the server if the user already uploaded
+ // the maximum number of files allowed.
+ if (phpbb.plupload.handleMaxFilesReached()) {
+ return;
+ }
+
+ // Show the file list if there aren't any files currently.
+ if (!$('#file-list-container').is(':visible')) {
+ $('#file-list-container').show(100);
+ }
+
+ $.each(files, function(i, file) {
+ phpbb.plupload.insertRow(file);
+ });
+
+ up.bind('UploadProgress', function(up, file) {
+ $('#' + file.id + " .file-progress-bar").css('width', file.percent + '%');
+ $('#file-total-progress-bar').css('width', up.total.percent + '%');
+ });
+
+ // Do not allow more files to be added to the running queue.
+ phpbb.plupload.disableUploader();
+
+ // Start uploading the files once the user has selected them.
+ up.start();
+});
+
+
+/**
+ * Fires when an entire file has been uploaded. It checks for errors
+ * returned by the server otherwise parses the list of attachment data and
+ * appends it to the next file upload so that the server can maintain state
+ * with regards to the attachments in a given post
+ *
+ * @param object up The plupload.Uploader object
+ * @param object file The plupload.File object that has just been
+ * uploaded
+ * @param string response The response string from the server
+ *
+ * @return undefined
+ */
+uploader.bind('FileUploaded', function(up, file, response) {
+ var json = {},
+ row = $('#' + file.id),
+ error;
+
+ // Hide the progress indicator.
+ row.find('.file-progress').hide();
+
+ try {
+ json = $.parseJSON(response.response);
+ } catch (e) {
+ error = 'Error parsing server response.';
+ }
+
+ // If trigger_error() was called, then a permission error likely occurred.
+ if (typeof json.title !== 'undefined') {
+ error = json.message;
+ up.trigger('Error', {message: error});
+
+ // The rest of the queue will fail.
+ phpbb.plupload.markQueuedFailed(error);
+ } else if (json.error) {
+ error = json.error.message;
+ }
+
+ if (typeof error !== 'undefined') {
+ phpbb.plupload.fileError(file, error);
+ } else if (file.status === plupload.DONE) {
+ file.attachment_data = json['data'][0];
+
+ row.attr('data-attach-id', file.attachment_data.attach_id);
+ row.find('.file-inline-bbcode').show();
+ row.find('.file-status').addClass('file-uploaded');
+ phpbb.plupload.update(json['data'], 'addition', 0, [json['download_url']]);
+ }
+});
+
+/**
+ * Fires when the entire queue of files have been uploaded.
+ *
+ * @param object up The plupload.Uploader object
+ * @param array files An array of plupload.File objects that have just
+ * been uploaded as part of a queue
+ *
+ * @return undefined
+ */
+uploader.bind('UploadComplete', function(up, files) {
+ // Hide the progress bar
+ setTimeout(function() {
+ $('#file-total-progress-bar').fadeOut(500, function() {
+ $(this).css('width', 0).show();
+ });
+ }, 2000);
+
+ // Re-enable the uploader
+ phpbb.plupload.enableUploader();
+});
+
+})(jQuery); // Avoid conflicts with other libraries
diff --git a/phpBB/assets/plupload/img/done.gif b/phpBB/assets/plupload/img/done.gif
new file mode 100644
index 0000000000..29f3ed7c97
--- /dev/null
+++ b/phpBB/assets/plupload/img/done.gif
Binary files differ
diff --git a/phpBB/assets/plupload/img/error.gif b/phpBB/assets/plupload/img/error.gif
new file mode 100644
index 0000000000..4682b63007
--- /dev/null
+++ b/phpBB/assets/plupload/img/error.gif
Binary files differ
diff --git a/phpBB/assets/plupload/img/throbber.gif b/phpBB/assets/plupload/img/throbber.gif
new file mode 100644
index 0000000000..4ae8b16a5a
--- /dev/null
+++ b/phpBB/assets/plupload/img/throbber.gif
Binary files differ
diff --git a/phpBB/assets/plupload/plupload.full.min.js b/phpBB/assets/plupload/plupload.full.min.js
new file mode 100644
index 0000000000..69d6ad120c
--- /dev/null
+++ b/phpBB/assets/plupload/plupload.full.min.js
@@ -0,0 +1,28 @@
+/**
+ * mOxie - multi-runtime File API & XMLHttpRequest L2 Polyfill
+ * v1.2.0
+ *
+ * Copyright 2013, Moxiecode Systems AB
+ * Released under GPL License.
+ *
+ * License: http://www.plupload.com/license
+ * Contributing: http://www.plupload.com/contributing
+ *
+ * Date: 2014-01-16
+ */
+!function(e,t){"use strict";function n(e,t){for(var n,i=[],r=0;r<e.length;++r){if(n=s[e[r]]||o(e[r]),!n)throw"module definition dependecy not found: "+e[r];i.push(n)}t.apply(null,i)}function i(e,i,r){if("string"!=typeof e)throw"invalid module definition, module id must be defined and be a string";if(i===t)throw"invalid module definition, dependencies must be specified";if(r===t)throw"invalid module definition, definition function must be specified";n(i,function(){s[e]=r.apply(null,arguments)})}function r(e){return!!s[e]}function o(t){for(var n=e,i=t.split(/[.\/]/),r=0;r<i.length;++r){if(!n[i[r]])return;n=n[i[r]]}return n}function a(n){for(var i=0;i<n.length;i++){for(var r=e,o=n[i],a=o.split(/[.\/]/),u=0;u<a.length-1;++u)r[a[u]]===t&&(r[a[u]]={}),r=r[a[u]];r[a[a.length-1]]=s[o]}}var s={},u="moxie/core/utils/Basic",c="moxie/core/I18n",l="moxie/core/utils/Mime",d="moxie/core/utils/Env",f="moxie/core/utils/Dom",p="moxie/core/Exceptions",h="moxie/core/EventTarget",m="moxie/core/utils/Encode",g="moxie/runtime/Runtime",v="moxie/runtime/RuntimeClient",y="moxie/file/Blob",w="moxie/file/File",E="moxie/file/FileInput",_="moxie/file/FileDrop",x="moxie/runtime/RuntimeTarget",R="moxie/file/FileReader",b="moxie/core/utils/Url",T="moxie/file/FileReaderSync",S="moxie/xhr/FormData",A="moxie/xhr/XMLHttpRequest",O="moxie/runtime/Transporter",I="moxie/image/Image",D="moxie/runtime/html5/Runtime",N="moxie/runtime/html5/file/Blob",L="moxie/core/utils/Events",M="moxie/runtime/html5/file/FileInput",C="moxie/runtime/html5/file/FileDrop",F="moxie/runtime/html5/file/FileReader",H="moxie/runtime/html5/xhr/XMLHttpRequest",P="moxie/runtime/html5/utils/BinaryReader",k="moxie/runtime/html5/image/JPEGHeaders",U="moxie/runtime/html5/image/ExifParser",B="moxie/runtime/html5/image/JPEG",z="moxie/runtime/html5/image/PNG",G="moxie/runtime/html5/image/ImageInfo",q="moxie/runtime/html5/image/MegaPixel",X="moxie/runtime/html5/image/Image",j="moxie/runtime/flash/Runtime",V="moxie/runtime/flash/file/Blob",W="moxie/runtime/flash/file/FileInput",Y="moxie/runtime/flash/file/FileReader",$="moxie/runtime/flash/file/FileReaderSync",J="moxie/runtime/flash/xhr/XMLHttpRequest",Z="moxie/runtime/flash/runtime/Transporter",K="moxie/runtime/flash/image/Image",Q="moxie/runtime/silverlight/Runtime",et="moxie/runtime/silverlight/file/Blob",tt="moxie/runtime/silverlight/file/FileInput",nt="moxie/runtime/silverlight/file/FileDrop",it="moxie/runtime/silverlight/file/FileReader",rt="moxie/runtime/silverlight/file/FileReaderSync",ot="moxie/runtime/silverlight/xhr/XMLHttpRequest",at="moxie/runtime/silverlight/runtime/Transporter",st="moxie/runtime/silverlight/image/Image",ut="moxie/runtime/html4/Runtime",ct="moxie/runtime/html4/file/FileInput",lt="moxie/runtime/html4/file/FileReader",dt="moxie/runtime/html4/xhr/XMLHttpRequest",ft="moxie/runtime/html4/image/Image";i(u,[],function(){var e=function(e){var t;return e===t?"undefined":null===e?"null":e.nodeType?"node":{}.toString.call(e).match(/\s([a-z|A-Z]+)/)[1].toLowerCase()},t=function(i){var r;return n(arguments,function(o,s){s>0&&n(o,function(n,o){n!==r&&(e(i[o])===e(n)&&~a(e(n),["array","object"])?t(i[o],n):i[o]=n)})}),i},n=function(e,t){var n,i,r,o;if(e){try{n=e.length}catch(a){n=o}if(n===o){for(i in e)if(e.hasOwnProperty(i)&&t(e[i],i)===!1)return}else for(r=0;n>r;r++)if(t(e[r],r)===!1)return}},i=function(t){var n;if(!t||"object"!==e(t))return!0;for(n in t)return!1;return!0},r=function(t,n){function i(r){"function"===e(t[r])&&t[r](function(e){++r<o&&!e?i(r):n(e)})}var r=0,o=t.length;"function"!==e(n)&&(n=function(){}),t&&t.length||n(),i(r)},o=function(e,t){var i=0,r=e.length,o=new Array(r);n(e,function(e,n){e(function(e){if(e)return t(e);var a=[].slice.call(arguments);a.shift(),o[n]=a,i++,i===r&&(o.unshift(null),t.apply(this,o))})})},a=function(e,t){if(t){if(Array.prototype.indexOf)return Array.prototype.indexOf.call(t,e);for(var n=0,i=t.length;i>n;n++)if(t[n]===e)return n}return-1},s=function(t,n){var i=[];"array"!==e(t)&&(t=[t]),"array"!==e(n)&&(n=[n]);for(var r in t)-1===a(t[r],n)&&i.push(t[r]);return i.length?i:!1},u=function(e,t){var i=[];return n(e,function(e){-1!==a(e,t)&&i.push(e)}),i.length?i:null},c=function(e){var t,n=[];for(t=0;t<e.length;t++)n[t]=e[t];return n},l=function(){var e=0;return function(t){var n=(new Date).getTime().toString(32),i;for(i=0;5>i;i++)n+=Math.floor(65535*Math.random()).toString(32);return(t||"o_")+n+(e++).toString(32)}}(),d=function(e){return e?String.prototype.trim?String.prototype.trim.call(e):e.toString().replace(/^\s*/,"").replace(/\s*$/,""):e},f=function(e){if("string"!=typeof e)return e;var t={t:1099511627776,g:1073741824,m:1048576,k:1024},n;return e=/^([0-9]+)([mgk]?)$/.exec(e.toLowerCase().replace(/[^0-9mkg]/g,"")),n=e[2],e=+e[1],t.hasOwnProperty(n)&&(e*=t[n]),e};return{guid:l,typeOf:e,extend:t,each:n,isEmptyObj:i,inSeries:r,inParallel:o,inArray:a,arrayDiff:s,arrayIntersect:u,toArray:c,trim:d,parseSizeStr:f}}),i(c,[u],function(e){var t={};return{addI18n:function(n){return e.extend(t,n)},translate:function(e){return t[e]||e},_:function(e){return this.translate(e)},sprintf:function(t){var n=[].slice.call(arguments,1);return t.replace(/%[a-z]/g,function(){var t=n.shift();return"undefined"!==e.typeOf(t)?t:""})}}}),i(l,[u,c],function(e,t){var n="application/msword,doc dot,application/pdf,pdf,application/pgp-signature,pgp,application/postscript,ps ai eps,application/rtf,rtf,application/vnd.ms-excel,xls xlb,application/vnd.ms-powerpoint,ppt pps pot,application/zip,zip,application/x-shockwave-flash,swf swfl,application/vnd.openxmlformats-officedocument.wordprocessingml.document,docx,application/vnd.openxmlformats-officedocument.wordprocessingml.template,dotx,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,xlsx,application/vnd.openxmlformats-officedocument.presentationml.presentation,pptx,application/vnd.openxmlformats-officedocument.presentationml.template,potx,application/vnd.openxmlformats-officedocument.presentationml.slideshow,ppsx,application/x-javascript,js,application/json,json,audio/mpeg,mp3 mpga mpega mp2,audio/x-wav,wav,audio/x-m4a,m4a,audio/ogg,oga ogg,audio/aiff,aiff aif,audio/flac,flac,audio/aac,aac,audio/ac3,ac3,audio/x-ms-wma,wma,image/bmp,bmp,image/gif,gif,image/jpeg,jpg jpeg jpe,image/photoshop,psd,image/png,png,image/svg+xml,svg svgz,image/tiff,tiff tif,text/plain,asc txt text diff log,text/html,htm html xhtml,text/css,css,text/csv,csv,text/rtf,rtf,video/mpeg,mpeg mpg mpe m2v,video/quicktime,qt mov,video/mp4,mp4,video/x-m4v,m4v,video/x-flv,flv,video/x-ms-wmv,wmv,video/avi,avi,video/webm,webm,video/3gpp,3gpp 3gp,video/3gpp2,3g2,video/vnd.rn-realvideo,rv,video/ogg,ogv,video/x-matroska,mkv,application/vnd.oasis.opendocument.formula-template,otf,application/octet-stream,exe",i={mimes:{},extensions:{},addMimeType:function(e){var t=e.split(/,/),n,i,r;for(n=0;n<t.length;n+=2){for(r=t[n+1].split(/ /),i=0;i<r.length;i++)this.mimes[r[i]]=t[n];this.extensions[t[n]]=r}},extList2mimes:function(t,n){var i=this,r,o,a,s,u=[];for(o=0;o<t.length;o++)for(r=t[o].extensions.split(/\s*,\s*/),a=0;a<r.length;a++){if("*"===r[a])return[];if(s=i.mimes[r[a]])-1===e.inArray(s,u)&&u.push(s);else{if(!n||!/^\w+$/.test(r[a]))return[];u.push("."+r[a])}}return u},mimes2exts:function(t){var n=this,i=[];return e.each(t,function(t){if("*"===t)return i=[],!1;var r=t.match(/^(\w+)\/(\*|\w+)$/);r&&("*"===r[2]?e.each(n.extensions,function(e,t){new RegExp("^"+r[1]+"/").test(t)&&[].push.apply(i,n.extensions[t])}):n.extensions[t]&&[].push.apply(i,n.extensions[t]))}),i},mimes2extList:function(n){var i=[],r=[];return"string"===e.typeOf(n)&&(n=e.trim(n).split(/\s*,\s*/)),r=this.mimes2exts(n),i.push({title:t.translate("Files"),extensions:r.length?r.join(","):"*"}),i.mimes=n,i},getFileExtension:function(e){var t=e&&e.match(/\.([^.]+)$/);return t?t[1].toLowerCase():""},getFileMime:function(e){return this.mimes[this.getFileExtension(e)]||""}};return i.addMimeType(n),i}),i(d,[u],function(e){function t(e,t,n){var i=0,r=0,o=0,a={dev:-6,alpha:-5,a:-5,beta:-4,b:-4,RC:-3,rc:-3,"#":-2,p:1,pl:1},s=function(e){return e=(""+e).replace(/[_\-+]/g,"."),e=e.replace(/([^.\d]+)/g,".$1.").replace(/\.{2,}/g,"."),e.length?e.split("."):[-8]},u=function(e){return e?isNaN(e)?a[e]||-7:parseInt(e,10):0};for(e=s(e),t=s(t),r=Math.max(e.length,t.length),i=0;r>i;i++)if(e[i]!=t[i]){if(e[i]=u(e[i]),t[i]=u(t[i]),e[i]<t[i]){o=-1;break}if(e[i]>t[i]){o=1;break}}if(!n)return o;switch(n){case">":case"gt":return o>0;case">=":case"ge":return o>=0;case"<=":case"le":return 0>=o;case"==":case"=":case"eq":return 0===o;case"<>":case"!=":case"ne":return 0!==o;case"":case"<":case"lt":return 0>o;default:return null}}var n=function(e){var t="",n="?",i="function",r="undefined",o="object",a="major",s="model",u="name",c="type",l="vendor",d="version",f="architecture",p="console",h="mobile",m="tablet",g={has:function(e,t){return-1!==t.toLowerCase().indexOf(e.toLowerCase())},lowerize:function(e){return e.toLowerCase()}},v={rgx:function(){for(var t,n=0,a,s,u,c,l,d,f=arguments;n<f.length;n+=2){var p=f[n],h=f[n+1];if(typeof t===r){t={};for(u in h)c=h[u],typeof c===o?t[c[0]]=e:t[c]=e}for(a=s=0;a<p.length;a++)if(l=p[a].exec(this.getUA())){for(u=0;u<h.length;u++)d=l[++s],c=h[u],typeof c===o&&c.length>0?2==c.length?t[c[0]]=typeof c[1]==i?c[1].call(this,d):c[1]:3==c.length?t[c[0]]=typeof c[1]!==i||c[1].exec&&c[1].test?d?d.replace(c[1],c[2]):e:d?c[1].call(this,d,c[2]):e:4==c.length&&(t[c[0]]=d?c[3].call(this,d.replace(c[1],c[2])):e):t[c]=d?d:e;break}if(l)break}return t},str:function(t,i){for(var r in i)if(typeof i[r]===o&&i[r].length>0){for(var a=0;a<i[r].length;a++)if(g.has(i[r][a],t))return r===n?e:r}else if(g.has(i[r],t))return r===n?e:r;return t}},y={browser:{oldsafari:{major:{1:["/8","/1","/3"],2:"/4","?":"/"},version:{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}}},device:{sprint:{model:{"Evo Shift 4G":"7373KT"},vendor:{HTC:"APA",Sprint:"Sprint"}}},os:{windows:{version:{ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2000:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",RT:"ARM"}}}},w={browser:[[/(opera\smini)\/((\d+)?[\w\.-]+)/i,/(opera\s[mobiletab]+).+version\/((\d+)?[\w\.-]+)/i,/(opera).+version\/((\d+)?[\w\.]+)/i,/(opera)[\/\s]+((\d+)?[\w\.]+)/i],[u,d,a],[/\s(opr)\/((\d+)?[\w\.]+)/i],[[u,"Opera"],d,a],[/(kindle)\/((\d+)?[\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/\s]?((\d+)?[\w\.]+)*/i,/(avant\s|iemobile|slim|baidu)(?:browser)?[\/\s]?((\d+)?[\w\.]*)/i,/(?:ms|\()(ie)\s((\d+)?[\w\.]+)/i,/(rekonq)((?:\/)[\w\.]+)*/i,/(chromium|flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron)\/((\d+)?[\w\.-]+)/i],[u,d,a],[/(trident).+rv[:\s]((\d+)?[\w\.]+).+like\sgecko/i],[[u,"IE"],d,a],[/(yabrowser)\/((\d+)?[\w\.]+)/i],[[u,"Yandex"],d,a],[/(comodo_dragon)\/((\d+)?[\w\.]+)/i],[[u,/_/g," "],d,a],[/(chrome|omniweb|arora|[tizenoka]{5}\s?browser)\/v?((\d+)?[\w\.]+)/i],[u,d,a],[/(dolfin)\/((\d+)?[\w\.]+)/i],[[u,"Dolphin"],d,a],[/((?:android.+)crmo|crios)\/((\d+)?[\w\.]+)/i],[[u,"Chrome"],d,a],[/((?:android.+))version\/((\d+)?[\w\.]+)\smobile\ssafari/i],[[u,"Android Browser"],d,a],[/version\/((\d+)?[\w\.]+).+?mobile\/\w+\s(safari)/i],[d,a,[u,"Mobile Safari"]],[/version\/((\d+)?[\w\.]+).+?(mobile\s?safari|safari)/i],[d,a,u],[/webkit.+?(mobile\s?safari|safari)((\/[\w\.]+))/i],[u,[a,v.str,y.browser.oldsafari.major],[d,v.str,y.browser.oldsafari.version]],[/(konqueror)\/((\d+)?[\w\.]+)/i,/(webkit|khtml)\/((\d+)?[\w\.]+)/i],[u,d,a],[/(navigator|netscape)\/((\d+)?[\w\.-]+)/i],[[u,"Netscape"],d,a],[/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo\sbrowser|minimo|conkeror)[\/\s]?((\d+)?[\w\.\+]+)/i,/(firefox|seamonkey|k-meleon|icecat|iceape|firebird|phoenix)\/((\d+)?[\w\.-]+)/i,/(mozilla)\/((\d+)?[\w\.]+).+rv\:.+gecko\/\d+/i,/(uc\s?browser|polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|qqbrowser)[\/\s]?((\d+)?[\w\.]+)/i,/(links)\s\(((\d+)?[\w\.]+)/i,/(gobrowser)\/?((\d+)?[\w\.]+)*/i,/(ice\s?browser)\/v?((\d+)?[\w\._]+)/i,/(mosaic)[\/\s]((\d+)?[\w\.]+)/i],[u,d,a]],engine:[[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m)\/([\w\.]+)/i,/(khtml|tasman|links)[\/\s]\(?([\w\.]+)/i,/(icab)[\/\s]([23]\.[\d\.]+)/i],[u,d],[/rv\:([\w\.]+).*(gecko)/i],[d,u]],os:[[/(windows)\snt\s6\.2;\s(arm)/i,/(windows\sphone(?:\sos)*|windows\smobile|windows)[\s\/]?([ntce\d\.\s]+\w)/i],[u,[d,v.str,y.os.windows.version]],[/(win(?=3|9|n)|win\s9x\s)([nt\d\.]+)/i],[[u,"Windows"],[d,v.str,y.os.windows.version]],[/\((bb)(10);/i],[[u,"BlackBerry"],d],[/(blackberry)\w*\/?([\w\.]+)*/i,/(tizen)\/([\w\.]+)/i,/(android|webos|palm\os|qnx|bada|rim\stablet\sos|meego)[\/\s-]?([\w\.]+)*/i],[u,d],[/(symbian\s?os|symbos|s60(?=;))[\/\s-]?([\w\.]+)*/i],[[u,"Symbian"],d],[/mozilla.+\(mobile;.+gecko.+firefox/i],[[u,"Firefox OS"],d],[/(nintendo|playstation)\s([wids3portablevu]+)/i,/(mint)[\/\s\(]?(\w+)*/i,/(joli|[kxln]?ubuntu|debian|[open]*suse|gentoo|arch|slackware|fedora|mandriva|centos|pclinuxos|redhat|zenwalk)[\/\s-]?([\w\.-]+)*/i,/(hurd|linux)\s?([\w\.]+)*/i,/(gnu)\s?([\w\.]+)*/i],[u,d],[/(cros)\s[\w]+\s([\w\.]+\w)/i],[[u,"Chromium OS"],d],[/(sunos)\s?([\w\.]+\d)*/i],[[u,"Solaris"],d],[/\s([frentopc-]{0,4}bsd|dragonfly)\s?([\w\.]+)*/i],[u,d],[/(ip[honead]+)(?:.*os\s*([\w]+)*\slike\smac|;\sopera)/i],[[u,"iOS"],[d,/_/g,"."]],[/(mac\sos\sx)\s?([\w\s\.]+\w)*/i],[u,[d,/_/g,"."]],[/(haiku)\s(\w+)/i,/(aix)\s((\d)(?=\.|\)|\s)[\w\.]*)*/i,/(macintosh|mac(?=_powerpc)|plan\s9|minix|beos|os\/2|amigaos|morphos|risc\sos)/i,/(unix)\s?([\w\.]+)*/i],[u,d]]},E=function(e){var n=e||(window&&window.navigator&&window.navigator.userAgent?window.navigator.userAgent:t);this.getBrowser=function(){return v.rgx.apply(this,w.browser)},this.getEngine=function(){return v.rgx.apply(this,w.engine)},this.getOS=function(){return v.rgx.apply(this,w.os)},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS()}},this.getUA=function(){return n},this.setUA=function(e){return n=e,this},this.setUA(n)};return(new E).getResult()}(),i=function(){var t={define_property:function(){return!1}(),create_canvas:function(){var e=document.createElement("canvas");return!(!e.getContext||!e.getContext("2d"))}(),return_response_type:function(t){try{if(-1!==e.inArray(t,["","text","document"]))return!0;if(window.XMLHttpRequest){var n=new XMLHttpRequest;if(n.open("get","/"),"responseType"in n)return n.responseType=t,n.responseType!==t?!1:!0}}catch(i){}return!1},use_data_uri:function(){var e=new Image;return e.onload=function(){t.use_data_uri=1===e.width&&1===e.height},setTimeout(function(){e.src="data:image/gif;base64,R0lGODlhAQABAIAAAP8AAAAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw=="},1),!1}(),use_data_uri_over32kb:function(){return t.use_data_uri&&("IE"!==r.browser||r.version>=9)},use_data_uri_of:function(e){return t.use_data_uri&&33e3>e||t.use_data_uri_over32kb()},use_fileinput:function(){var e=document.createElement("input");return e.setAttribute("type","file"),!e.disabled}};return function(n){var i=[].slice.call(arguments);return i.shift(),"function"===e.typeOf(t[n])?t[n].apply(this,i):!!t[n]}}(),r={can:i,browser:n.browser.name,version:parseFloat(n.browser.major),os:n.os.name,osVersion:n.os.version,verComp:t,swf_url:"../flash/Moxie.swf",xap_url:"../silverlight/Moxie.xap",global_event_dispatcher:"moxie.core.EventTarget.instance.dispatchEvent"};return r.OS=r.os,r}),i(f,[d],function(e){var t=function(e){return"string"!=typeof e?e:document.getElementById(e)},n=function(e,t){if(!e.className)return!1;var n=new RegExp("(^|\\s+)"+t+"(\\s+|$)");return n.test(e.className)},i=function(e,t){n(e,t)||(e.className=e.className?e.className.replace(/\s+$/,"")+" "+t:t)},r=function(e,t){if(e.className){var n=new RegExp("(^|\\s+)"+t+"(\\s+|$)");e.className=e.className.replace(n,function(e,t,n){return" "===t&&" "===n?" ":""})}},o=function(e,t){return e.currentStyle?e.currentStyle[t]:window.getComputedStyle?window.getComputedStyle(e,null)[t]:void 0},a=function(t,n){function i(e){var t,n,i=0,r=0;return e&&(n=e.getBoundingClientRect(),t="CSS1Compat"===s.compatMode?s.documentElement:s.body,i=n.left+t.scrollLeft,r=n.top+t.scrollTop),{x:i,y:r}}var r=0,o=0,a,s=document,u,c;if(t=t,n=n||s.body,t&&t.getBoundingClientRect&&"IE"===e.browser&&(!s.documentMode||s.documentMode<8))return u=i(t),c=i(n),{x:u.x-c.x,y:u.y-c.y};for(a=t;a&&a!=n&&a.nodeType;)r+=a.offsetLeft||0,o+=a.offsetTop||0,a=a.offsetParent;for(a=t.parentNode;a&&a!=n&&a.nodeType;)r-=a.scrollLeft||0,o-=a.scrollTop||0,a=a.parentNode;return{x:r,y:o}},s=function(e){return{w:e.offsetWidth||e.clientWidth,h:e.offsetHeight||e.clientHeight}};return{get:t,hasClass:n,addClass:i,removeClass:r,getStyle:o,getPos:a,getSize:s}}),i(p,[u],function(e){function t(e,t){var n;for(n in e)if(e[n]===t)return n;return null}return{RuntimeError:function(){function n(e){this.code=e,this.name=t(i,e),this.message=this.name+": RuntimeError "+this.code}var i={NOT_INIT_ERR:1,NOT_SUPPORTED_ERR:9,JS_ERR:4};return e.extend(n,i),n.prototype=Error.prototype,n}(),OperationNotAllowedException:function(){function t(e){this.code=e,this.name="OperationNotAllowedException"}return e.extend(t,{NOT_ALLOWED_ERR:1}),t.prototype=Error.prototype,t}(),ImageError:function(){function n(e){this.code=e,this.name=t(i,e),this.message=this.name+": ImageError "+this.code}var i={WRONG_FORMAT:1,MAX_RESOLUTION_ERR:2};return e.extend(n,i),n.prototype=Error.prototype,n}(),FileException:function(){function n(e){this.code=e,this.name=t(i,e),this.message=this.name+": FileException "+this.code}var i={NOT_FOUND_ERR:1,SECURITY_ERR:2,ABORT_ERR:3,NOT_READABLE_ERR:4,ENCODING_ERR:5,NO_MODIFICATION_ALLOWED_ERR:6,INVALID_STATE_ERR:7,SYNTAX_ERR:8};return e.extend(n,i),n.prototype=Error.prototype,n}(),DOMException:function(){function n(e){this.code=e,this.name=t(i,e),this.message=this.name+": DOMException "+this.code}var i={INDEX_SIZE_ERR:1,DOMSTRING_SIZE_ERR:2,HIERARCHY_REQUEST_ERR:3,WRONG_DOCUMENT_ERR:4,INVALID_CHARACTER_ERR:5,NO_DATA_ALLOWED_ERR:6,NO_MODIFICATION_ALLOWED_ERR:7,NOT_FOUND_ERR:8,NOT_SUPPORTED_ERR:9,INUSE_ATTRIBUTE_ERR:10,INVALID_STATE_ERR:11,SYNTAX_ERR:12,INVALID_MODIFICATION_ERR:13,NAMESPACE_ERR:14,INVALID_ACCESS_ERR:15,VALIDATION_ERR:16,TYPE_MISMATCH_ERR:17,SECURITY_ERR:18,NETWORK_ERR:19,ABORT_ERR:20,URL_MISMATCH_ERR:21,QUOTA_EXCEEDED_ERR:22,TIMEOUT_ERR:23,INVALID_NODE_TYPE_ERR:24,DATA_CLONE_ERR:25};return e.extend(n,i),n.prototype=Error.prototype,n}(),EventException:function(){function t(e){this.code=e,this.name="EventException"}return e.extend(t,{UNSPECIFIED_EVENT_TYPE_ERR:0}),t.prototype=Error.prototype,t}()}}),i(h,[p,u],function(e,t){function n(){var n={};t.extend(this,{uid:null,init:function(){this.uid||(this.uid=t.guid("uid_"))},addEventListener:function(e,i,r,o){var a=this,s;return e=t.trim(e),/\s/.test(e)?(t.each(e.split(/\s+/),function(e){a.addEventListener(e,i,r,o)}),void 0):(e=e.toLowerCase(),r=parseInt(r,10)||0,s=n[this.uid]&&n[this.uid][e]||[],s.push({fn:i,priority:r,scope:o||this}),n[this.uid]||(n[this.uid]={}),n[this.uid][e]=s,void 0)},hasEventListener:function(e){return e?!(!n[this.uid]||!n[this.uid][e]):!!n[this.uid]},removeEventListener:function(e,i){e=e.toLowerCase();var r=n[this.uid]&&n[this.uid][e],o;if(r){if(i){for(o=r.length-1;o>=0;o--)if(r[o].fn===i){r.splice(o,1);break}}else r=[];r.length||(delete n[this.uid][e],t.isEmptyObj(n[this.uid])&&delete n[this.uid])}},removeAllEventListeners:function(){n[this.uid]&&delete n[this.uid]},dispatchEvent:function(i){var r,o,a,s,u={},c=!0,l;if("string"!==t.typeOf(i)){if(s=i,"string"!==t.typeOf(s.type))throw new e.EventException(e.EventException.UNSPECIFIED_EVENT_TYPE_ERR);i=s.type,s.total!==l&&s.loaded!==l&&(u.total=s.total,u.loaded=s.loaded),u.async=s.async||!1}if(-1!==i.indexOf("::")?function(e){r=e[0],i=e[1]}(i.split("::")):r=this.uid,i=i.toLowerCase(),o=n[r]&&n[r][i]){o.sort(function(e,t){return t.priority-e.priority}),a=[].slice.call(arguments),a.shift(),u.type=i,a.unshift(u);var d=[];t.each(o,function(e){a[0].target=e.scope,u.async?d.push(function(t){setTimeout(function(){t(e.fn.apply(e.scope,a)===!1)},1)}):d.push(function(t){t(e.fn.apply(e.scope,a)===!1)})}),d.length&&t.inSeries(d,function(e){c=!e})}return c},bind:function(){this.addEventListener.apply(this,arguments)},unbind:function(){this.removeEventListener.apply(this,arguments)},unbindAll:function(){this.removeAllEventListeners.apply(this,arguments)},trigger:function(){return this.dispatchEvent.apply(this,arguments)},convertEventPropsToHandlers:function(e){var n;"array"!==t.typeOf(e)&&(e=[e]);for(var i=0;i<e.length;i++)n="on"+e[i],"function"===t.typeOf(this[n])?this.addEventListener(e[i],this[n]):"undefined"===t.typeOf(this[n])&&(this[n]=null)}})}return n.instance=new n,n}),i(m,[],function(){var e=function(e){return unescape(encodeURIComponent(e))},t=function(e){return decodeURIComponent(escape(e))},n=function(e,n){if("function"==typeof window.atob)return n?t(window.atob(e)):window.atob(e);var i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",r,o,a,s,u,c,l,d,f=0,p=0,h="",m=[];if(!e)return e;e+="";do s=i.indexOf(e.charAt(f++)),u=i.indexOf(e.charAt(f++)),c=i.indexOf(e.charAt(f++)),l=i.indexOf(e.charAt(f++)),d=s<<18|u<<12|c<<6|l,r=255&d>>16,o=255&d>>8,a=255&d,m[p++]=64==c?String.fromCharCode(r):64==l?String.fromCharCode(r,o):String.fromCharCode(r,o,a);while(f<e.length);return h=m.join(""),n?t(h):h},i=function(t,n){if(n&&e(t),"function"==typeof window.btoa)return window.btoa(t);var i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",r,o,a,s,u,c,l,d,f=0,p=0,h="",m=[];if(!t)return t;do r=t.charCodeAt(f++),o=t.charCodeAt(f++),a=t.charCodeAt(f++),d=r<<16|o<<8|a,s=63&d>>18,u=63&d>>12,c=63&d>>6,l=63&d,m[p++]=i.charAt(s)+i.charAt(u)+i.charAt(c)+i.charAt(l);while(f<t.length);h=m.join("");var g=t.length%3;return(g?h.slice(0,g-3):h)+"===".slice(g||3)};return{utf8_encode:e,utf8_decode:t,atob:n,btoa:i}}),i(g,[u,f,h],function(e,t,n){function i(n,r,a,s,u){var c=this,l,d=e.guid(r+"_"),f=u||"browser";n=n||{},o[d]=this,a=e.extend({access_binary:!1,access_image_binary:!1,display_media:!1,do_cors:!1,drag_and_drop:!1,filter_by_extension:!0,resize_image:!1,report_upload_progress:!1,return_response_headers:!1,return_response_type:!1,return_status_code:!0,send_custom_headers:!1,select_file:!1,select_folder:!1,select_multiple:!0,send_binary_string:!1,send_browser_cookies:!0,send_multipart:!0,slice_blob:!1,stream_upload:!1,summon_file_dialog:!1,upload_filesize:!0,use_http_method:!0},a),n.preferred_caps&&(f=i.getMode(s,n.preferred_caps,f)),l=function(){var t={};return{exec:function(e,n,i,r){return l[n]&&(t[e]||(t[e]={context:this,instance:new l[n]}),t[e].instance[i])?t[e].instance[i].apply(this,r):void 0},removeInstance:function(e){delete t[e]},removeAllInstances:function(){var n=this;e.each(t,function(t,i){"function"===e.typeOf(t.instance.destroy)&&t.instance.destroy.call(t.context),n.removeInstance(i)})}}}(),e.extend(this,{initialized:!1,uid:d,type:r,mode:i.getMode(s,n.required_caps,f),shimid:d+"_container",clients:0,options:n,can:function(t,n){var r=arguments[2]||a;if("string"===e.typeOf(t)&&"undefined"===e.typeOf(n)&&(t=i.parseCaps(t)),"object"===e.typeOf(t)){for(var o in t)if(!this.can(o,t[o],r))return!1;return!0}return"function"===e.typeOf(r[t])?r[t].call(this,n):n===r[t]},getShimContainer:function(){var n,i=t.get(this.shimid);return i||(n=this.options.container?t.get(this.options.container):document.body,i=document.createElement("div"),i.id=this.shimid,i.className="moxie-shim moxie-shim-"+this.type,e.extend(i.style,{position:"absolute",top:"0px",left:"0px",width:"1px",height:"1px",overflow:"hidden"}),n.appendChild(i),n=null),i},getShim:function(){return l},shimExec:function(e,t){var n=[].slice.call(arguments,2);return c.getShim().exec.call(this,this.uid,e,t,n)},exec:function(e,t){var n=[].slice.call(arguments,2);return c[e]&&c[e][t]?c[e][t].apply(this,n):c.shimExec.apply(this,arguments)},destroy:function(){if(c){var e=t.get(this.shimid);e&&e.parentNode.removeChild(e),l&&l.removeAllInstances(),this.unbindAll(),delete o[this.uid],this.uid=null,d=c=l=e=null}}}),this.mode&&n.required_caps&&!this.can(n.required_caps)&&(this.mode=!1)}var r={},o={};return i.order="html5,flash,silverlight,html4",i.getRuntime=function(e){return o[e]?o[e]:!1},i.addConstructor=function(e,t){t.prototype=n.instance,r[e]=t},i.getConstructor=function(e){return r[e]||null},i.getInfo=function(e){var t=i.getRuntime(e);return t?{uid:t.uid,type:t.type,mode:t.mode,can:function(){return t.can.apply(t,arguments)}}:null},i.parseCaps=function(t){var n={};return"string"!==e.typeOf(t)?t||{}:(e.each(t.split(","),function(e){n[e]=!0}),n)},i.can=function(e,t){var n,r=i.getConstructor(e),o;return r?(n=new r({required_caps:t}),o=n.mode,n.destroy(),!!o):!1},i.thatCan=function(e,t){var n=(t||i.order).split(/\s*,\s*/);for(var r in n)if(i.can(n[r],e))return n[r];return null},i.getMode=function(t,n,i){var r=null;if("undefined"===e.typeOf(i)&&(i="browser"),n&&!e.isEmptyObj(t)){if(e.each(n,function(n,i){if(t.hasOwnProperty(i)){var o=t[i](n);if("string"==typeof o&&(o=[o]),r){if(!(r=e.arrayIntersect(r,o)))return r=!1}else r=o}}),r)return-1!==e.inArray(i,r)?i:r[0];if(r===!1)return!1}return i},i.capTrue=function(){return!0},i.capFalse=function(){return!1},i.capTest=function(e){return function(){return!!e}},i}),i(v,[p,u,g],function(e,t,n){return function i(){var i;t.extend(this,{connectRuntime:function(r){function o(t){var s,u;return t.length?(s=t.shift(),(u=n.getConstructor(s))?(i=new u(r),i.bind("Init",function(){i.initialized=!0,setTimeout(function(){i.clients++,a.trigger("RuntimeInit",i)},1)}),i.bind("Error",function(){i.destroy(),o(t)}),i.mode?(i.init(),void 0):(i.trigger("Error"),void 0)):(o(t),void 0)):(a.trigger("RuntimeError",new e.RuntimeError(e.RuntimeError.NOT_INIT_ERR)),i=null,void 0)}var a=this,s;if("string"===t.typeOf(r)?s=r:"string"===t.typeOf(r.ruid)&&(s=r.ruid),s){if(i=n.getRuntime(s))return i.clients++,i;throw new e.RuntimeError(e.RuntimeError.NOT_INIT_ERR)}o((r.runtime_order||n.order).split(/\s*,\s*/))},getRuntime:function(){return i&&i.uid?i:(i=null,null)},disconnectRuntime:function(){i&&--i.clients<=0&&(i.destroy(),i=null)}})}}),i(y,[u,m,v],function(e,t,n){function i(o,a){function s(t,n,o){var a,s=r[this.uid];return"string"===e.typeOf(s)&&s.length?(a=new i(null,{type:o,size:n-t}),a.detach(s.substr(t,a.size)),a):null}n.call(this),o&&this.connectRuntime(o),a?"string"===e.typeOf(a)&&(a={data:a}):a={},e.extend(this,{uid:a.uid||e.guid("uid_"),ruid:o,size:a.size||0,type:a.type||"",slice:function(e,t,n){return this.isDetached()?s.apply(this,arguments):this.getRuntime().exec.call(this,"Blob","slice",this.getSource(),e,t,n)},getSource:function(){return r[this.uid]?r[this.uid]:null},detach:function(e){this.ruid&&(this.getRuntime().exec.call(this,"Blob","destroy",r[this.uid]),this.disconnectRuntime(),this.ruid=null),e=e||"";var n=e.match(/^data:([^;]*);base64,/);n&&(this.type=n[1],e=t.atob(e.substring(e.indexOf("base64,")+7))),this.size=e.length,r[this.uid]=e},isDetached:function(){return!this.ruid&&"string"===e.typeOf(r[this.uid])},destroy:function(){this.detach(),delete r[this.uid]}}),a.data?this.detach(a.data):r[this.uid]=a}var r={};return i}),i(w,[u,l,y],function(e,t,n){function i(i,r){var o,a;if(r||(r={}),a=r.type&&""!==r.type?r.type:t.getFileMime(r.name),r.name)o=r.name.replace(/\\/g,"/"),o=o.substr(o.lastIndexOf("/")+1);else{var s=a.split("/")[0];o=e.guid((""!==s?s:"file")+"_"),t.extensions[a]&&(o+="."+t.extensions[a][0])}n.apply(this,arguments),e.extend(this,{type:a||"",name:o||e.guid("file_"),lastModifiedDate:r.lastModifiedDate||(new Date).toLocaleString()})}return i.prototype=n.prototype,i}),i(E,[u,l,f,p,h,c,w,g,v],function(e,t,n,i,r,o,a,s,u){function c(r){var c=this,d,f,p;if(-1!==e.inArray(e.typeOf(r),["string","node"])&&(r={browse_button:r}),f=n.get(r.browse_button),!f)throw new i.DOMException(i.DOMException.NOT_FOUND_ERR);p={accept:[{title:o.translate("All Files"),extensions:"*"}],name:"file",multiple:!1,required_caps:!1,container:f.parentNode||document.body},r=e.extend({},p,r),"string"==typeof r.required_caps&&(r.required_caps=s.parseCaps(r.required_caps)),"string"==typeof r.accept&&(r.accept=t.mimes2extList(r.accept)),d=n.get(r.container),d||(d=document.body),"static"===n.getStyle(d,"position")&&(d.style.position="relative"),d=f=null,u.call(c),e.extend(c,{uid:e.guid("uid_"),ruid:null,shimid:null,files:null,init:function(){c.convertEventPropsToHandlers(l),c.bind("RuntimeInit",function(t,i){c.ruid=i.uid,c.shimid=i.shimid,c.bind("Ready",function(){c.trigger("Refresh")},999),c.bind("Change",function(){var t=i.exec.call(c,"FileInput","getFiles");c.files=[],e.each(t,function(e){return 0===e.size?!0:(c.files.push(new a(c.ruid,e)),void 0)})},999),c.bind("Refresh",function(){var t,o,a,s;a=n.get(r.browse_button),s=n.get(i.shimid),a&&(t=n.getPos(a,n.get(r.container)),o=n.getSize(a),s&&e.extend(s.style,{top:t.y+"px",left:t.x+"px",width:o.w+"px",height:o.h+"px"})),s=a=null}),i.exec.call(c,"FileInput","init",r)}),c.connectRuntime(e.extend({},r,{required_caps:{select_file:!0}}))},disable:function(t){var n=this.getRuntime();n&&n.exec.call(this,"FileInput","disable","undefined"===e.typeOf(t)?!0:t)},refresh:function(){c.trigger("Refresh")},destroy:function(){var t=this.getRuntime();t&&(t.exec.call(this,"FileInput","destroy"),this.disconnectRuntime()),"array"===e.typeOf(this.files)&&e.each(this.files,function(e){e.destroy()}),this.files=null}})}var l=["ready","change","cancel","mouseenter","mouseleave","mousedown","mouseup"];return c.prototype=r.instance,c}),i(_,[c,f,p,u,w,v,h,l],function(e,t,n,i,r,o,a,s){function u(n){var a=this,u;"string"==typeof n&&(n={drop_zone:n}),u={accept:[{title:e.translate("All Files"),extensions:"*"}],required_caps:{drag_and_drop:!0}},n="object"==typeof n?i.extend({},u,n):u,n.container=t.get(n.drop_zone)||document.body,"static"===t.getStyle(n.container,"position")&&(n.container.style.position="relative"),"string"==typeof n.accept&&(n.accept=s.mimes2extList(n.accept)),o.call(a),i.extend(a,{uid:i.guid("uid_"),ruid:null,files:null,init:function(){a.convertEventPropsToHandlers(c),a.bind("RuntimeInit",function(e,t){a.ruid=t.uid,a.bind("Drop",function(){var e=t.exec.call(a,"FileDrop","getFiles");a.files=[],i.each(e,function(e){a.files.push(new r(a.ruid,e))})},999),t.exec.call(a,"FileDrop","init",n),a.dispatchEvent("ready")}),a.connectRuntime(n)},destroy:function(){var e=this.getRuntime();e&&(e.exec.call(this,"FileDrop","destroy"),this.disconnectRuntime()),this.files=null}})}var c=["ready","dragenter","dragleave","drop","error"];return u.prototype=a.instance,u}),i(x,[u,v,h],function(e,t,n){function i(){this.uid=e.guid("uid_"),t.call(this),this.destroy=function(){this.disconnectRuntime(),this.unbindAll()}}return i.prototype=n.instance,i}),i(R,[u,m,p,h,y,w,x],function(e,t,n,i,r,o,a){function s(){function i(e,i){function l(e){o.readyState=s.DONE,o.error=e,o.trigger("error"),d()}function d(){c.destroy(),c=null,o.trigger("loadend")}function f(t){c.bind("Error",function(e,t){l(t)}),c.bind("Progress",function(e){o.result=t.exec.call(c,"FileReader","getResult"),o.trigger(e)}),c.bind("Load",function(e){o.readyState=s.DONE,o.result=t.exec.call(c,"FileReader","getResult"),o.trigger(e),d()}),t.exec.call(c,"FileReader","read",e,i)}if(c=new a,this.convertEventPropsToHandlers(u),this.readyState===s.LOADING)return l(new n.DOMException(n.DOMException.INVALID_STATE_ERR));if(this.readyState=s.LOADING,this.trigger("loadstart"),i instanceof r)if(i.isDetached()){var p=i.getSource();switch(e){case"readAsText":case"readAsBinaryString":this.result=p;break;case"readAsDataURL":this.result="data:"+i.type+";base64,"+t.btoa(p)}this.readyState=s.DONE,this.trigger("load"),d()}else f(c.connectRuntime(i.ruid));else l(new n.DOMException(n.DOMException.NOT_FOUND_ERR))}var o=this,c;e.extend(this,{uid:e.guid("uid_"),readyState:s.EMPTY,result:null,error:null,readAsBinaryString:function(e){i.call(this,"readAsBinaryString",e)},readAsDataURL:function(e){i.call(this,"readAsDataURL",e)},readAsText:function(e){i.call(this,"readAsText",e)
+},abort:function(){this.result=null,-1===e.inArray(this.readyState,[s.EMPTY,s.DONE])&&(this.readyState===s.LOADING&&(this.readyState=s.DONE),c&&c.getRuntime().exec.call(this,"FileReader","abort"),this.trigger("abort"),this.trigger("loadend"))},destroy:function(){this.abort(),c&&(c.getRuntime().exec.call(this,"FileReader","destroy"),c.disconnectRuntime()),o=c=null}})}var u=["loadstart","progress","load","abort","error","loadend"];return s.EMPTY=0,s.LOADING=1,s.DONE=2,s.prototype=i.instance,s}),i(b,[],function(){var e=function(t,n){for(var i=["source","scheme","authority","userInfo","user","pass","host","port","relative","path","directory","file","query","fragment"],r=i.length,o={http:80,https:443},a={},s=/^(?:([^:\/?#]+):)?(?:\/\/()(?:(?:()(?:([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?))?()(?:(()(?:(?:[^?#\/]*\/)*)()(?:[^?#]*))(?:\\?([^#]*))?(?:#(.*))?)/,u=s.exec(t||"");r--;)u[r]&&(a[i[r]]=u[r]);if(!a.scheme){n&&"string"!=typeof n||(n=e(n||document.location.href)),a.scheme=n.scheme,a.host=n.host,a.port=n.port;var c="";/^[^\/]/.test(a.path)&&(c=n.path,/(\/|\/[^\.]+)$/.test(c)?c+="/":c=c.replace(/\/[^\/]+$/,"/")),a.path=c+(a.path||"")}return a.port||(a.port=o[a.scheme]||80),a.port=parseInt(a.port,10),a.path||(a.path="/"),delete a.source,a},t=function(t){var n={http:80,https:443},i=e(t);return i.scheme+"://"+i.host+(i.port!==n[i.scheme]?":"+i.port:"")+i.path+(i.query?i.query:"")},n=function(t){function n(e){return[e.scheme,e.host,e.port].join("/")}return"string"==typeof t&&(t=e(t)),n(e())===n(t)};return{parseUrl:e,resolveUrl:t,hasSameOrigin:n}}),i(T,[u,v,m],function(e,t,n){return function(){function i(e,t){if(!t.isDetached()){var i=this.connectRuntime(t.ruid).exec.call(this,"FileReaderSync","read",e,t);return this.disconnectRuntime(),i}var r=t.getSource();switch(e){case"readAsBinaryString":return r;case"readAsDataURL":return"data:"+t.type+";base64,"+n.btoa(r);case"readAsText":for(var o="",a=0,s=r.length;s>a;a++)o+=String.fromCharCode(r[a]);return o}}t.call(this),e.extend(this,{uid:e.guid("uid_"),readAsBinaryString:function(e){return i.call(this,"readAsBinaryString",e)},readAsDataURL:function(e){return i.call(this,"readAsDataURL",e)},readAsText:function(e){return i.call(this,"readAsText",e)}})}}),i(S,[p,u,y],function(e,t,n){function i(){var e,i=[];t.extend(this,{append:function(r,o){var a=this,s=t.typeOf(o);o instanceof n?e={name:r,value:o}:"array"===s?(r+="[]",t.each(o,function(e){a.append(r,e)})):"object"===s?t.each(o,function(e,t){a.append(r+"["+t+"]",e)}):"null"===s||"undefined"===s||"number"===s&&isNaN(o)?a.append(r,"false"):i.push({name:r,value:o.toString()})},hasBlob:function(){return!!this.getBlob()},getBlob:function(){return e&&e.value||null},getBlobName:function(){return e&&e.name||null},each:function(n){t.each(i,function(e){n(e.value,e.name)}),e&&n(e.value,e.name)},destroy:function(){e=null,i=[]}})}return i}),i(A,[u,p,h,m,b,g,x,y,T,S,d,l],function(e,t,n,i,r,o,a,s,u,c,l,d){function f(){this.uid=e.guid("uid_")}function p(){function n(e,t){return y.hasOwnProperty(e)?1===arguments.length?l.can("define_property")?y[e]:v[e]:(l.can("define_property")?y[e]=t:v[e]=t,void 0):void 0}function u(t){function i(){k.destroy(),k=null,s.dispatchEvent("loadend"),s=null}function r(r){k.bind("LoadStart",function(e){n("readyState",p.LOADING),s.dispatchEvent("readystatechange"),s.dispatchEvent(e),I&&s.upload.dispatchEvent(e)}),k.bind("Progress",function(e){n("readyState")!==p.LOADING&&(n("readyState",p.LOADING),s.dispatchEvent("readystatechange")),s.dispatchEvent(e)}),k.bind("UploadProgress",function(e){I&&s.upload.dispatchEvent({type:"progress",lengthComputable:!1,total:e.total,loaded:e.loaded})}),k.bind("Load",function(t){n("readyState",p.DONE),n("status",Number(r.exec.call(k,"XMLHttpRequest","getStatus")||0)),n("statusText",h[n("status")]||""),n("response",r.exec.call(k,"XMLHttpRequest","getResponse",n("responseType"))),~e.inArray(n("responseType"),["text",""])?n("responseText",n("response")):"document"===n("responseType")&&n("responseXML",n("response")),U=r.exec.call(k,"XMLHttpRequest","getAllResponseHeaders"),s.dispatchEvent("readystatechange"),n("status")>0?(I&&s.upload.dispatchEvent(t),s.dispatchEvent(t)):(N=!0,s.dispatchEvent("error")),i()}),k.bind("Abort",function(e){s.dispatchEvent(e),i()}),k.bind("Error",function(e){N=!0,n("readyState",p.DONE),s.dispatchEvent("readystatechange"),D=!0,s.dispatchEvent(e),i()}),r.exec.call(k,"XMLHttpRequest","send",{url:E,method:_,async:w,user:R,password:b,headers:x,mimeType:S,encoding:T,responseType:s.responseType,withCredentials:s.withCredentials,options:P},t)}var s=this;M=(new Date).getTime(),k=new a,"string"==typeof P.required_caps&&(P.required_caps=o.parseCaps(P.required_caps)),P.required_caps=e.extend({},P.required_caps,{return_response_type:s.responseType}),t instanceof c&&(P.required_caps.send_multipart=!0),L||(P.required_caps.do_cors=!0),P.ruid?r(k.connectRuntime(P)):(k.bind("RuntimeInit",function(e,t){r(t)}),k.bind("RuntimeError",function(e,t){s.dispatchEvent("RuntimeError",t)}),k.connectRuntime(P))}function g(){n("responseText",""),n("responseXML",null),n("response",null),n("status",0),n("statusText",""),M=C=null}var v=this,y={timeout:0,readyState:p.UNSENT,withCredentials:!1,status:0,statusText:"",responseType:"",responseXML:null,responseText:null,response:null},w=!0,E,_,x={},R,b,T=null,S=null,A=!1,O=!1,I=!1,D=!1,N=!1,L=!1,M,C,F=null,H=null,P={},k,U="",B;e.extend(this,y,{uid:e.guid("uid_"),upload:new f,open:function(o,a,s,u,c){var l;if(!o||!a)throw new t.DOMException(t.DOMException.SYNTAX_ERR);if(/[\u0100-\uffff]/.test(o)||i.utf8_encode(o)!==o)throw new t.DOMException(t.DOMException.SYNTAX_ERR);if(~e.inArray(o.toUpperCase(),["CONNECT","DELETE","GET","HEAD","OPTIONS","POST","PUT","TRACE","TRACK"])&&(_=o.toUpperCase()),~e.inArray(_,["CONNECT","TRACE","TRACK"]))throw new t.DOMException(t.DOMException.SECURITY_ERR);if(a=i.utf8_encode(a),l=r.parseUrl(a),L=r.hasSameOrigin(l),E=r.resolveUrl(a),(u||c)&&!L)throw new t.DOMException(t.DOMException.INVALID_ACCESS_ERR);if(R=u||l.user,b=c||l.pass,w=s||!0,w===!1&&(n("timeout")||n("withCredentials")||""!==n("responseType")))throw new t.DOMException(t.DOMException.INVALID_ACCESS_ERR);A=!w,O=!1,x={},g.call(this),n("readyState",p.OPENED),this.convertEventPropsToHandlers(["readystatechange"]),this.dispatchEvent("readystatechange")},setRequestHeader:function(r,o){var a=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","content-transfer-encoding","date","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","user-agent","via"];if(n("readyState")!==p.OPENED||O)throw new t.DOMException(t.DOMException.INVALID_STATE_ERR);if(/[\u0100-\uffff]/.test(r)||i.utf8_encode(r)!==r)throw new t.DOMException(t.DOMException.SYNTAX_ERR);return r=e.trim(r).toLowerCase(),~e.inArray(r,a)||/^(proxy\-|sec\-)/.test(r)?!1:(x[r]?x[r]+=", "+o:x[r]=o,!0)},getAllResponseHeaders:function(){return U||""},getResponseHeader:function(t){return t=t.toLowerCase(),N||~e.inArray(t,["set-cookie","set-cookie2"])?null:U&&""!==U&&(B||(B={},e.each(U.split(/\r\n/),function(t){var n=t.split(/:\s+/);2===n.length&&(n[0]=e.trim(n[0]),B[n[0].toLowerCase()]={header:n[0],value:e.trim(n[1])})})),B.hasOwnProperty(t))?B[t].header+": "+B[t].value:null},overrideMimeType:function(i){var r,o;if(~e.inArray(n("readyState"),[p.LOADING,p.DONE]))throw new t.DOMException(t.DOMException.INVALID_STATE_ERR);if(i=e.trim(i.toLowerCase()),/;/.test(i)&&(r=i.match(/^([^;]+)(?:;\scharset\=)?(.*)$/))&&(i=r[1],r[2]&&(o=r[2])),!d.mimes[i])throw new t.DOMException(t.DOMException.SYNTAX_ERR);F=i,H=o},send:function(n,r){if(P="string"===e.typeOf(r)?{ruid:r}:r?r:{},this.convertEventPropsToHandlers(m),this.upload.convertEventPropsToHandlers(m),this.readyState!==p.OPENED||O)throw new t.DOMException(t.DOMException.INVALID_STATE_ERR);if(n instanceof s)P.ruid=n.ruid,S=n.type||"application/octet-stream";else if(n instanceof c){if(n.hasBlob()){var o=n.getBlob();P.ruid=o.ruid,S=o.type||"application/octet-stream"}}else"string"==typeof n&&(T="UTF-8",S="text/plain;charset=UTF-8",n=i.utf8_encode(n));this.withCredentials||(this.withCredentials=P.required_caps&&P.required_caps.send_browser_cookies&&!L),I=!A&&this.upload.hasEventListener(),N=!1,D=!n,A||(O=!0),u.call(this,n)},abort:function(){if(N=!0,A=!1,~e.inArray(n("readyState"),[p.UNSENT,p.OPENED,p.DONE]))n("readyState",p.UNSENT);else{if(n("readyState",p.DONE),O=!1,!k)throw new t.DOMException(t.DOMException.INVALID_STATE_ERR);k.getRuntime().exec.call(k,"XMLHttpRequest","abort",D),D=!0}},destroy:function(){k&&("function"===e.typeOf(k.destroy)&&k.destroy(),k=null),this.unbindAll(),this.upload&&(this.upload.unbindAll(),this.upload=null)}})}var h={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",306:"Reserved",307:"Temporary Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Request Entity Too Large",414:"Request-URI Too Long",415:"Unsupported Media Type",416:"Requested Range Not Satisfiable",417:"Expectation Failed",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",426:"Upgrade Required",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",510:"Not Extended"};f.prototype=n.instance;var m=["loadstart","progress","abort","error","load","timeout","loadend"],g=1,v=2;return p.UNSENT=0,p.OPENED=1,p.HEADERS_RECEIVED=2,p.LOADING=3,p.DONE=4,p.prototype=n.instance,p}),i(O,[u,m,v,h],function(e,t,n,i){function r(){function i(){l=d=0,c=this.result=null}function o(t,n){var i=this;u=n,i.bind("TransportingProgress",function(t){d=t.loaded,l>d&&-1===e.inArray(i.state,[r.IDLE,r.DONE])&&a.call(i)},999),i.bind("TransportingComplete",function(){d=l,i.state=r.DONE,c=null,i.result=u.exec.call(i,"Transporter","getAsBlob",t||"")},999),i.state=r.BUSY,i.trigger("TransportingStarted"),a.call(i)}function a(){var e=this,n,i=l-d;f>i&&(f=i),n=t.btoa(c.substr(d,f)),u.exec.call(e,"Transporter","receive",n,l)}var s,u,c,l,d,f;n.call(this),e.extend(this,{uid:e.guid("uid_"),state:r.IDLE,result:null,transport:function(t,n,r){var a=this;if(r=e.extend({chunk_size:204798},r),(s=r.chunk_size%3)&&(r.chunk_size+=3-s),f=r.chunk_size,i.call(this),c=t,l=t.length,"string"===e.typeOf(r)||r.ruid)o.call(a,n,this.connectRuntime(r));else{var u=function(e,t){a.unbind("RuntimeInit",u),o.call(a,n,t)};this.bind("RuntimeInit",u),this.connectRuntime(r)}},abort:function(){var e=this;e.state=r.IDLE,u&&(u.exec.call(e,"Transporter","clear"),e.trigger("TransportingAborted")),i.call(e)},destroy:function(){this.unbindAll(),u=null,this.disconnectRuntime(),i.call(this)}})}return r.IDLE=0,r.BUSY=1,r.DONE=2,r.prototype=i.instance,r}),i(I,[u,f,p,T,A,g,v,O,d,h,y,w,m],function(e,t,n,i,r,o,a,s,u,c,l,d,f){function p(){function i(e){e||(e=this.getRuntime().exec.call(this,"Image","getInfo")),this.size=e.size,this.width=e.width,this.height=e.height,this.type=e.type,this.meta=e.meta,""===this.name&&(this.name=e.name)}function c(t){var i=e.typeOf(t);try{if(t instanceof p){if(!t.size)throw new n.DOMException(n.DOMException.INVALID_STATE_ERR);m.apply(this,arguments)}else if(t instanceof l){if(!~e.inArray(t.type,["image/jpeg","image/png"]))throw new n.ImageError(n.ImageError.WRONG_FORMAT);g.apply(this,arguments)}else if(-1!==e.inArray(i,["blob","file"]))c.call(this,new d(null,t),arguments[1]);else if("string"===i)/^data:[^;]*;base64,/.test(t)?c.call(this,new l(null,{data:t}),arguments[1]):v.apply(this,arguments);else{if("node"!==i||"img"!==t.nodeName.toLowerCase())throw new n.DOMException(n.DOMException.TYPE_MISMATCH_ERR);c.call(this,t.src,arguments[1])}}catch(r){this.trigger("error",r)}}function m(t,n){var i=this.connectRuntime(t.ruid);this.ruid=i.uid,i.exec.call(this,"Image","loadFromImage",t,"undefined"===e.typeOf(n)?!0:n)}function g(t,n){function i(e){r.ruid=e.uid,e.exec.call(r,"Image","loadFromBlob",t)}var r=this;r.name=t.name||"",t.isDetached()?(this.bind("RuntimeInit",function(e,t){i(t)}),n&&"string"==typeof n.required_caps&&(n.required_caps=o.parseCaps(n.required_caps)),this.connectRuntime(e.extend({required_caps:{access_image_binary:!0,resize_image:!0}},n))):i(this.connectRuntime(t.ruid))}function v(e,t){var n=this,i;i=new r,i.open("get",e),i.responseType="blob",i.onprogress=function(e){n.trigger(e)},i.onload=function(){g.call(n,i.response,!0)},i.onerror=function(e){n.trigger(e)},i.onloadend=function(){i.destroy()},i.bind("RuntimeError",function(e,t){n.trigger("RuntimeError",t)}),i.send(null,t)}a.call(this),e.extend(this,{uid:e.guid("uid_"),ruid:null,name:"",size:0,width:0,height:0,type:"",meta:{},clone:function(){this.load.apply(this,arguments)},load:function(){this.bind("Load Resize",function(){i.call(this)},999),this.convertEventPropsToHandlers(h),c.apply(this,arguments)},downsize:function(t,i,r,o){try{if(!this.size)throw new n.DOMException(n.DOMException.INVALID_STATE_ERR);if(this.width>p.MAX_RESIZE_WIDTH||this.height>p.MAX_RESIZE_HEIGHT)throw new n.ImageError(n.ImageError.MAX_RESOLUTION_ERR);(!t&&!i||"undefined"===e.typeOf(r))&&(r=!1),t=t||this.width,i=i||this.height,o="undefined"===e.typeOf(o)?!0:!!o,this.getRuntime().exec.call(this,"Image","downsize",t,i,r,o)}catch(a){this.trigger("error",a)}},crop:function(e,t,n){this.downsize(e,t,!0,n)},getAsCanvas:function(){if(!u.can("create_canvas"))throw new n.RuntimeError(n.RuntimeError.NOT_SUPPORTED_ERR);var e=this.connectRuntime(this.ruid);return e.exec.call(this,"Image","getAsCanvas")},getAsBlob:function(e,t){if(!this.size)throw new n.DOMException(n.DOMException.INVALID_STATE_ERR);return e||(e="image/jpeg"),"image/jpeg"!==e||t||(t=90),this.getRuntime().exec.call(this,"Image","getAsBlob",e,t)},getAsDataURL:function(e,t){if(!this.size)throw new n.DOMException(n.DOMException.INVALID_STATE_ERR);return this.getRuntime().exec.call(this,"Image","getAsDataURL",e,t)},getAsBinaryString:function(e,t){var n=this.getAsDataURL(e,t);return f.atob(n.substring(n.indexOf("base64,")+7))},embed:function(i){function r(){if(u.can("create_canvas")){var t=a.getAsCanvas();if(t)return i.appendChild(t),t=null,a.destroy(),o.trigger("embedded"),void 0}var r=a.getAsDataURL(c,l);if(!r)throw new n.ImageError(n.ImageError.WRONG_FORMAT);if(u.can("use_data_uri_of",r.length))i.innerHTML='<img src="'+r+'" width="'+a.width+'" height="'+a.height+'" />',a.destroy(),o.trigger("embedded");else{var d=new s;d.bind("TransportingComplete",function(){v=o.connectRuntime(this.result.ruid),o.bind("Embedded",function(){e.extend(v.getShimContainer().style,{top:"0px",left:"0px",width:a.width+"px",height:a.height+"px"}),v=null},999),v.exec.call(o,"ImageView","display",this.result.uid,m,g),a.destroy()}),d.transport(f.atob(r.substring(r.indexOf("base64,")+7)),c,e.extend({},h,{required_caps:{display_media:!0},runtime_order:"flash,silverlight",container:i}))}}var o=this,a,c,l,d,h=arguments[1]||{},m=this.width,g=this.height,v;try{if(!(i=t.get(i)))throw new n.DOMException(n.DOMException.INVALID_NODE_TYPE_ERR);if(!this.size)throw new n.DOMException(n.DOMException.INVALID_STATE_ERR);if(this.width>p.MAX_RESIZE_WIDTH||this.height>p.MAX_RESIZE_HEIGHT)throw new n.ImageError(n.ImageError.MAX_RESOLUTION_ERR);if(c=h.type||this.type||"image/jpeg",l=h.quality||90,d="undefined"!==e.typeOf(h.crop)?h.crop:!1,h.width)m=h.width,g=h.height||m;else{var y=t.getSize(i);y.w&&y.h&&(m=y.w,g=y.h)}return a=new p,a.bind("Resize",function(){r.call(o)}),a.bind("Load",function(){a.downsize(m,g,d,!1)}),a.clone(this,!1),a}catch(w){this.trigger("error",w)}},destroy:function(){this.ruid&&(this.getRuntime().exec.call(this,"Image","destroy"),this.disconnectRuntime()),this.unbindAll()}})}var h=["progress","load","error","resize","embedded"];return p.MAX_RESIZE_WIDTH=6500,p.MAX_RESIZE_HEIGHT=6500,p.prototype=c.instance,p}),i(D,[u,p,g,d],function(e,t,n,i){function r(t){var r=this,s=n.capTest,u=n.capTrue,c=e.extend({access_binary:s(window.FileReader||window.File&&window.File.getAsDataURL),access_image_binary:function(){return r.can("access_binary")&&!!a.Image},display_media:s(i.can("create_canvas")||i.can("use_data_uri_over32kb")),do_cors:s(window.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest),drag_and_drop:s(function(){var e=document.createElement("div");return("draggable"in e||"ondragstart"in e&&"ondrop"in e)&&("IE"!==i.browser||i.version>9)}()),filter_by_extension:s(function(){return"Chrome"===i.browser&&i.version>=28||"IE"===i.browser&&i.version>=10}()),return_response_headers:u,return_response_type:function(e){return"json"===e&&window.JSON?!0:i.can("return_response_type",e)},return_status_code:u,report_upload_progress:s(window.XMLHttpRequest&&(new XMLHttpRequest).upload),resize_image:function(){return r.can("access_binary")&&i.can("create_canvas")},select_file:function(){return i.can("use_fileinput")&&window.File},select_folder:function(){return r.can("select_file")&&"Chrome"===i.browser&&i.version>=21},select_multiple:function(){return!(!r.can("select_file")||"Safari"===i.browser&&"Windows"===i.os||"iOS"===i.os&&i.verComp(i.osVersion,"7.0.4","<"))},send_binary_string:s(window.XMLHttpRequest&&((new XMLHttpRequest).sendAsBinary||window.Uint8Array&&window.ArrayBuffer)),send_custom_headers:s(window.XMLHttpRequest),send_multipart:function(){return!!(window.XMLHttpRequest&&(new XMLHttpRequest).upload&&window.FormData)||r.can("send_binary_string")},slice_blob:s(window.File&&(File.prototype.mozSlice||File.prototype.webkitSlice||File.prototype.slice)),stream_upload:function(){return r.can("slice_blob")&&r.can("send_multipart")},summon_file_dialog:s(function(){return"Firefox"===i.browser&&i.version>=4||"Opera"===i.browser&&i.version>=12||"IE"===i.browser&&i.version>=10||!!~e.inArray(i.browser,["Chrome","Safari"])}()),upload_filesize:u},arguments[2]);n.call(this,t,arguments[1]||o,c),e.extend(this,{init:function(){this.trigger("Init")},destroy:function(e){return function(){e.call(r),e=r=null}}(this.destroy)}),e.extend(this.getShim(),a)}var o="html5",a={};return n.addConstructor(o,r),a}),i(N,[D,y],function(e,t){function n(){function e(e,t,n){var i;if(!window.File.prototype.slice)return(i=window.File.prototype.webkitSlice||window.File.prototype.mozSlice)?i.call(e,t,n):null;try{return e.slice(),e.slice(t,n)}catch(r){return e.slice(t,n-t)}}this.slice=function(){return new t(this.getRuntime().uid,e.apply(this,arguments))}}return e.Blob=n}),i(L,[u],function(e){function t(){this.returnValue=!1}function n(){this.cancelBubble=!0}var i={},r="moxie_"+e.guid(),o=function(o,a,s,u){var c,l;a=a.toLowerCase(),o.addEventListener?(c=s,o.addEventListener(a,c,!1)):o.attachEvent&&(c=function(){var e=window.event;e.target||(e.target=e.srcElement),e.preventDefault=t,e.stopPropagation=n,s(e)},o.attachEvent("on"+a,c)),o[r]||(o[r]=e.guid()),i.hasOwnProperty(o[r])||(i[o[r]]={}),l=i[o[r]],l.hasOwnProperty(a)||(l[a]=[]),l[a].push({func:c,orig:s,key:u})},a=function(t,n,o){var a,s;if(n=n.toLowerCase(),t[r]&&i[t[r]]&&i[t[r]][n]){a=i[t[r]][n];for(var u=a.length-1;u>=0&&(a[u].orig!==o&&a[u].key!==o||(t.removeEventListener?t.removeEventListener(n,a[u].func,!1):t.detachEvent&&t.detachEvent("on"+n,a[u].func),a[u].orig=null,a[u].func=null,a.splice(u,1),o===s));u--);if(a.length||delete i[t[r]][n],e.isEmptyObj(i[t[r]])){delete i[t[r]];try{delete t[r]}catch(c){t[r]=s}}}},s=function(t,n){t&&t[r]&&e.each(i[t[r]],function(e,i){a(t,i,n)})};return{addEvent:o,removeEvent:a,removeAllEvents:s}}),i(M,[D,u,f,L,l,d],function(e,t,n,i,r,o){function a(){var e=[],a;t.extend(this,{init:function(s){var u=this,c=u.getRuntime(),l,d,f,p,h,m;a=s,e=[],f=a.accept.mimes||r.extList2mimes(a.accept,c.can("filter_by_extension")),d=c.getShimContainer(),d.innerHTML='<input id="'+c.uid+'" type="file" style="font-size:999px;opacity:0;"'+(a.multiple&&c.can("select_multiple")?"multiple":"")+(a.directory&&c.can("select_folder")?"webkitdirectory directory":"")+(f?' accept="'+f.join(",")+'"':"")+" />",l=n.get(c.uid),t.extend(l.style,{position:"absolute",top:0,left:0,width:"100%",height:"100%"}),p=n.get(a.browse_button),c.can("summon_file_dialog")&&("static"===n.getStyle(p,"position")&&(p.style.position="relative"),h=parseInt(n.getStyle(p,"z-index"),10)||1,p.style.zIndex=h,d.style.zIndex=h-1,i.addEvent(p,"click",function(e){var t=n.get(c.uid);t&&!t.disabled&&t.click(),e.preventDefault()},u.uid)),m=c.can("summon_file_dialog")?p:d,i.addEvent(m,"mouseover",function(){u.trigger("mouseenter")},u.uid),i.addEvent(m,"mouseout",function(){u.trigger("mouseleave")},u.uid),i.addEvent(m,"mousedown",function(){u.trigger("mousedown")},u.uid),i.addEvent(n.get(a.container),"mouseup",function(){u.trigger("mouseup")},u.uid),l.onchange=function g(){if(e=[],a.directory?t.each(this.files,function(t){"."!==t.name&&e.push(t)}):e=[].slice.call(this.files),"IE"!==o.browser)this.value="";else{var n=this.cloneNode(!0);this.parentNode.replaceChild(n,this),n.onchange=g}u.trigger("change")},u.trigger({type:"ready",async:!0}),d=null},getFiles:function(){return e},disable:function(e){var t=this.getRuntime(),i;(i=n.get(t.uid))&&(i.disabled=!!e)},destroy:function(){var t=this.getRuntime(),r=t.getShim(),o=t.getShimContainer();i.removeAllEvents(o,this.uid),i.removeAllEvents(a&&n.get(a.container),this.uid),i.removeAllEvents(a&&n.get(a.browse_button),this.uid),o&&(o.innerHTML=""),r.removeInstance(this.uid),e=a=o=r=null}})}return e.FileInput=a}),i(C,[D,u,f,L,l],function(e,t,n,i,r){function o(){function e(e){for(var n=[],i=0;i<e.length;i++)[].push.apply(n,e[i].extensions.split(/\s*,\s*/));return-1===t.inArray("*",n)?n:[]}function o(e){var n=r.getFileExtension(e.name);return!n||!d.length||-1!==t.inArray(n,d)}function a(e,n){var i=[];t.each(e,function(e){var t=e.webkitGetAsEntry();if(t)if(t.isFile){var n=e.getAsFile();o(n)&&l.push(n)}else i.push(t)}),i.length?s(i,n):n()}function s(e,n){var i=[];t.each(e,function(e){i.push(function(t){u(e,t)})}),t.inSeries(i,function(){n()})}function u(e,t){e.isFile?e.file(function(e){o(e)&&l.push(e),t()},function(){t()}):e.isDirectory?c(e,t):t()}function c(e,t){function n(e){r.readEntries(function(t){t.length?([].push.apply(i,t),n(e)):e()},e)}var i=[],r=e.createReader();n(function(){s(i,t)})}var l=[],d=[],f;t.extend(this,{init:function(n){var r=this,s;f=n,d=e(f.accept),s=f.container,i.addEvent(s,"dragover",function(e){e.preventDefault(),e.stopPropagation(),e.dataTransfer.dropEffect="copy"},r.uid),i.addEvent(s,"drop",function(e){e.preventDefault(),e.stopPropagation(),l=[],e.dataTransfer.items&&e.dataTransfer.items[0].webkitGetAsEntry?a(e.dataTransfer.items,function(){r.trigger("drop")}):(t.each(e.dataTransfer.files,function(e){o(e)&&l.push(e)}),r.trigger("drop"))},r.uid),i.addEvent(s,"dragenter",function(e){e.preventDefault(),e.stopPropagation(),r.trigger("dragenter")},r.uid),i.addEvent(s,"dragleave",function(e){e.preventDefault(),e.stopPropagation(),r.trigger("dragleave")},r.uid)},getFiles:function(){return l},destroy:function(){i.removeAllEvents(f&&n.get(f.container),this.uid),l=d=f=null}})}return e.FileDrop=o}),i(F,[D,m,u],function(e,t,n){function i(){function e(e){return t.atob(e.substring(e.indexOf("base64,")+7))}var i,r=!1;n.extend(this,{read:function(e,t){var o=this;i=new window.FileReader,i.addEventListener("progress",function(e){o.trigger(e)}),i.addEventListener("load",function(e){o.trigger(e)}),i.addEventListener("error",function(e){o.trigger(e,i.error)}),i.addEventListener("loadend",function(){i=null}),"function"===n.typeOf(i[e])?(r=!1,i[e](t.getSource())):"readAsBinaryString"===e&&(r=!0,i.readAsDataURL(t.getSource()))},getResult:function(){return i&&i.result?r?e(i.result):i.result:null},abort:function(){i&&i.abort()},destroy:function(){i=null}})}return e.FileReader=i}),i(H,[D,u,l,b,w,y,S,p,d],function(e,t,n,i,r,o,a,s,u){function c(){function e(e,t){var n=this,i,r;i=t.getBlob().getSource(),r=new window.FileReader,r.onload=function(){t.append(t.getBlobName(),new o(null,{type:i.type,data:r.result})),f.send.call(n,e,t)},r.readAsBinaryString(i)}function c(){return!window.XMLHttpRequest||"IE"===u.browser&&u.version<8?function(){for(var e=["Msxml2.XMLHTTP.6.0","Microsoft.XMLHTTP"],t=0;t<e.length;t++)try{return new ActiveXObject(e[t])}catch(n){}}():new window.XMLHttpRequest}function l(e){var t=e.responseXML,n=e.responseText;return"IE"===u.browser&&n&&t&&!t.documentElement&&/[^\/]+\/[^\+]+\+xml/.test(e.getResponseHeader("Content-Type"))&&(t=new window.ActiveXObject("Microsoft.XMLDOM"),t.async=!1,t.validateOnParse=!1,t.loadXML(n)),t&&("IE"===u.browser&&0!==t.parseError||!t.documentElement||"parsererror"===t.documentElement.tagName)?null:t}function d(e){var t="----moxieboundary"+(new Date).getTime(),n="--",i="\r\n",r="",a=this.getRuntime();if(!a.can("send_binary_string"))throw new s.RuntimeError(s.RuntimeError.NOT_SUPPORTED_ERR);return p.setRequestHeader("Content-Type","multipart/form-data; boundary="+t),e.each(function(e,a){r+=e instanceof o?n+t+i+'Content-Disposition: form-data; name="'+a+'"; filename="'+unescape(encodeURIComponent(e.name||"blob"))+'"'+i+"Content-Type: "+(e.type||"application/octet-stream")+i+i+e.getSource()+i:n+t+i+'Content-Disposition: form-data; name="'+a+'"'+i+i+unescape(encodeURIComponent(e))+i}),r+=n+t+n+i}var f=this,p,h;t.extend(this,{send:function(n,r){var s=this,l="Mozilla"===u.browser&&u.version>=4&&u.version<7,f="Android Browser"===u.browser,m=!1;if(h=n.url.replace(/^.+?\/([\w\-\.]+)$/,"$1").toLowerCase(),p=c(),p.open(n.method,n.url,n.async,n.user,n.password),r instanceof o)r.isDetached()&&(m=!0),r=r.getSource();else if(r instanceof a){if(r.hasBlob())if(r.getBlob().isDetached())r=d.call(s,r),m=!0;else if((l||f)&&"blob"===t.typeOf(r.getBlob().getSource())&&window.FileReader)return e.call(s,n,r),void 0;if(r instanceof a){var g=new window.FormData;r.each(function(e,t){e instanceof o?g.append(t,e.getSource()):g.append(t,e)}),r=g}}p.upload?(n.withCredentials&&(p.withCredentials=!0),p.addEventListener("load",function(e){s.trigger(e)}),p.addEventListener("error",function(e){s.trigger(e)}),p.addEventListener("progress",function(e){s.trigger(e)}),p.upload.addEventListener("progress",function(e){s.trigger({type:"UploadProgress",loaded:e.loaded,total:e.total})})):p.onreadystatechange=function v(){switch(p.readyState){case 1:break;case 2:break;case 3:var e,t;try{i.hasSameOrigin(n.url)&&(e=p.getResponseHeader("Content-Length")||0),p.responseText&&(t=p.responseText.length)}catch(r){e=t=0}s.trigger({type:"progress",lengthComputable:!!e,total:parseInt(e,10),loaded:t});break;case 4:p.onreadystatechange=function(){},0===p.status?s.trigger("error"):s.trigger("load")}},t.isEmptyObj(n.headers)||t.each(n.headers,function(e,t){p.setRequestHeader(t,e)}),""!==n.responseType&&"responseType"in p&&(p.responseType="json"!==n.responseType||u.can("return_response_type","json")?n.responseType:"text"),m?p.sendAsBinary?p.sendAsBinary(r):function(){for(var e=new Uint8Array(r.length),t=0;t<r.length;t++)e[t]=255&r.charCodeAt(t);p.send(e.buffer)}():p.send(r),s.trigger("loadstart")},getStatus:function(){try{if(p)return p.status}catch(e){}return 0},getResponse:function(e){var t=this.getRuntime();try{switch(e){case"blob":var i=new r(t.uid,p.response),o=p.getResponseHeader("Content-Disposition");if(o){var a=o.match(/filename=([\'\"'])([^\1]+)\1/);a&&(h=a[2])}return i.name=h,i.type||(i.type=n.getFileMime(h)),i;case"json":return u.can("return_response_type","json")?p.response:200===p.status&&window.JSON?JSON.parse(p.responseText):null;case"document":return l(p);default:return""!==p.responseText?p.responseText:null}}catch(s){return null}},getAllResponseHeaders:function(){try{return p.getAllResponseHeaders()}catch(e){}return""},abort:function(){p&&p.abort()},destroy:function(){f=h=null}})}return e.XMLHttpRequest=c}),i(P,[],function(){return function(){function e(e,t){var n=r?0:-8*(t-1),i=0,a;for(a=0;t>a;a++)i|=o.charCodeAt(e+a)<<Math.abs(n+8*a);return i}function n(e,t,n){n=3===arguments.length?n:o.length-t-1,o=o.substr(0,t)+e+o.substr(n+t)}function i(e,t,i){var o="",a=r?0:-8*(i-1),s;for(s=0;i>s;s++)o+=String.fromCharCode(255&t>>Math.abs(a+8*s));n(o,e,i)}var r=!1,o;return{II:function(e){return e===t?r:(r=e,void 0)},init:function(e){r=!1,o=e},SEGMENT:function(e,t,i){switch(arguments.length){case 1:return o.substr(e,o.length-e-1);case 2:return o.substr(e,t);case 3:n(i,e,t);break;default:return o}},BYTE:function(t){return e(t,1)},SHORT:function(t){return e(t,2)},LONG:function(n,r){return r===t?e(n,4):(i(n,r,4),void 0)},SLONG:function(t){var n=e(t,4);return n>2147483647?n-4294967296:n},STRING:function(t,n){var i="";for(n+=t;n>t;t++)i+=String.fromCharCode(e(t,1));return i}}}}),i(k,[P],function(e){return function t(n){var i=[],r,o,a,s=0;if(r=new e,r.init(n),65496===r.SHORT(0)){for(o=2;o<=n.length;)if(a=r.SHORT(o),a>=65488&&65495>=a)o+=2;else{if(65498===a||65497===a)break;s=r.SHORT(o+2)+2,a>=65505&&65519>=a&&i.push({hex:a,name:"APP"+(15&a),start:o,length:s,segment:r.SEGMENT(o,s)}),o+=s}return r.init(null),{headers:i,restore:function(e){var t,n;for(r.init(e),o=65504==r.SHORT(2)?4+r.SHORT(4):2,n=0,t=i.length;t>n;n++)r.SEGMENT(o,0,i[n].segment),o+=i[n].length;return e=r.SEGMENT(),r.init(null),e},strip:function(e){var n,i,o;for(i=new t(e),n=i.headers,i.purge(),r.init(e),o=n.length;o--;)r.SEGMENT(n[o].start,n[o].length,"");return e=r.SEGMENT(),r.init(null),e},get:function(e){for(var t=[],n=0,r=i.length;r>n;n++)i[n].name===e.toUpperCase()&&t.push(i[n].segment);return t},set:function(e,t){var n=[],r,o,a;for("string"==typeof t?n.push(t):n=t,r=o=0,a=i.length;a>r&&(i[r].name===e.toUpperCase()&&(i[r].segment=n[o],i[r].length=n[o].length,o++),!(o>=n.length));r++);},purge:function(){i=[],r.init(null),r=null}}}}}),i(U,[u,P],function(e,n){return function i(){function i(e,n){var i=a.SHORT(e),r,o,s,u,d,f,p,h,m=[],g={};for(r=0;i>r;r++)if(p=f=e+12*r+2,s=n[a.SHORT(p)],s!==t){switch(u=a.SHORT(p+=2),d=a.LONG(p+=2),p+=4,m=[],u){case 1:case 7:for(d>4&&(p=a.LONG(p)+c.tiffHeader),o=0;d>o;o++)m[o]=a.BYTE(p+o);break;case 2:d>4&&(p=a.LONG(p)+c.tiffHeader),g[s]=a.STRING(p,d-1);continue;case 3:for(d>2&&(p=a.LONG(p)+c.tiffHeader),o=0;d>o;o++)m[o]=a.SHORT(p+2*o);break;case 4:for(d>1&&(p=a.LONG(p)+c.tiffHeader),o=0;d>o;o++)m[o]=a.LONG(p+4*o);break;case 5:for(p=a.LONG(p)+c.tiffHeader,o=0;d>o;o++)m[o]=a.LONG(p+4*o)/a.LONG(p+4*o+4);break;case 9:for(p=a.LONG(p)+c.tiffHeader,o=0;d>o;o++)m[o]=a.SLONG(p+4*o);break;case 10:for(p=a.LONG(p)+c.tiffHeader,o=0;d>o;o++)m[o]=a.SLONG(p+4*o)/a.SLONG(p+4*o+4);break;default:continue}h=1==d?m[0]:m,g[s]=l.hasOwnProperty(s)&&"object"!=typeof h?l[s][h]:h}return g}function r(){var e=c.tiffHeader;return a.II(18761==a.SHORT(e)),42!==a.SHORT(e+=2)?!1:(c.IFD0=c.tiffHeader+a.LONG(e+=2),u=i(c.IFD0,s.tiff),"ExifIFDPointer"in u&&(c.exifIFD=c.tiffHeader+u.ExifIFDPointer,delete u.ExifIFDPointer),"GPSInfoIFDPointer"in u&&(c.gpsIFD=c.tiffHeader+u.GPSInfoIFDPointer,delete u.GPSInfoIFDPointer),!0)}function o(e,t,n){var i,r,o,u=0;if("string"==typeof t){var l=s[e.toLowerCase()];for(var d in l)if(l[d]===t){t=d;break}}i=c[e.toLowerCase()+"IFD"],r=a.SHORT(i);for(var f=0;r>f;f++)if(o=i+12*f+2,a.SHORT(o)==t){u=o+8;break}return u?(a.LONG(u,n),!0):!1}var a,s,u,c={},l;return a=new n,s={tiff:{274:"Orientation",270:"ImageDescription",271:"Make",272:"Model",305:"Software",34665:"ExifIFDPointer",34853:"GPSInfoIFDPointer"},exif:{36864:"ExifVersion",40961:"ColorSpace",40962:"PixelXDimension",40963:"PixelYDimension",36867:"DateTimeOriginal",33434:"ExposureTime",33437:"FNumber",34855:"ISOSpeedRatings",37377:"ShutterSpeedValue",37378:"ApertureValue",37383:"MeteringMode",37384:"LightSource",37385:"Flash",37386:"FocalLength",41986:"ExposureMode",41987:"WhiteBalance",41990:"SceneCaptureType",41988:"DigitalZoomRatio",41992:"Contrast",41993:"Saturation",41994:"Sharpness"},gps:{0:"GPSVersionID",1:"GPSLatitudeRef",2:"GPSLatitude",3:"GPSLongitudeRef",4:"GPSLongitude"}},l={ColorSpace:{1:"sRGB",0:"Uncalibrated"},MeteringMode:{0:"Unknown",1:"Average",2:"CenterWeightedAverage",3:"Spot",4:"MultiSpot",5:"Pattern",6:"Partial",255:"Other"},LightSource:{1:"Daylight",2:"Fliorescent",3:"Tungsten",4:"Flash",9:"Fine weather",10:"Cloudy weather",11:"Shade",12:"Daylight fluorescent (D 5700 - 7100K)",13:"Day white fluorescent (N 4600 -5400K)",14:"Cool white fluorescent (W 3900 - 4500K)",15:"White fluorescent (WW 3200 - 3700K)",17:"Standard light A",18:"Standard light B",19:"Standard light C",20:"D55",21:"D65",22:"D75",23:"D50",24:"ISO studio tungsten",255:"Other"},Flash:{0:"Flash did not fire.",1:"Flash fired.",5:"Strobe return light not detected.",7:"Strobe return light detected.",9:"Flash fired, compulsory flash mode",13:"Flash fired, compulsory flash mode, return light not detected",15:"Flash fired, compulsory flash mode, return light detected",16:"Flash did not fire, compulsory flash mode",24:"Flash did not fire, auto mode",25:"Flash fired, auto mode",29:"Flash fired, auto mode, return light not detected",31:"Flash fired, auto mode, return light detected",32:"No flash function",65:"Flash fired, red-eye reduction mode",69:"Flash fired, red-eye reduction mode, return light not detected",71:"Flash fired, red-eye reduction mode, return light detected",73:"Flash fired, compulsory flash mode, red-eye reduction mode",77:"Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected",79:"Flash fired, compulsory flash mode, red-eye reduction mode, return light detected",89:"Flash fired, auto mode, red-eye reduction mode",93:"Flash fired, auto mode, return light not detected, red-eye reduction mode",95:"Flash fired, auto mode, return light detected, red-eye reduction mode"},ExposureMode:{0:"Auto exposure",1:"Manual exposure",2:"Auto bracket"},WhiteBalance:{0:"Auto white balance",1:"Manual white balance"},SceneCaptureType:{0:"Standard",1:"Landscape",2:"Portrait",3:"Night scene"},Contrast:{0:"Normal",1:"Soft",2:"Hard"},Saturation:{0:"Normal",1:"Low saturation",2:"High saturation"},Sharpness:{0:"Normal",1:"Soft",2:"Hard"},GPSLatitudeRef:{N:"North latitude",S:"South latitude"},GPSLongitudeRef:{E:"East longitude",W:"West longitude"}},{init:function(e){return c={tiffHeader:10},e!==t&&e.length?(a.init(e),65505===a.SHORT(0)&&"EXIF\0"===a.STRING(4,5).toUpperCase()?r():!1):!1
+},TIFF:function(){return u},EXIF:function(){var t;if(t=i(c.exifIFD,s.exif),t.ExifVersion&&"array"===e.typeOf(t.ExifVersion)){for(var n=0,r="";n<t.ExifVersion.length;n++)r+=String.fromCharCode(t.ExifVersion[n]);t.ExifVersion=r}return t},GPS:function(){var t;return t=i(c.gpsIFD,s.gps),t.GPSVersionID&&"array"===e.typeOf(t.GPSVersionID)&&(t.GPSVersionID=t.GPSVersionID.join(".")),t},setExif:function(e,t){return"PixelXDimension"!==e&&"PixelYDimension"!==e?!1:o("exif",e,t)},getBinary:function(){return a.SEGMENT()},purge:function(){a.init(null),a=u=null,c={}}}}}),i(B,[u,p,k,P,U],function(e,t,n,i,r){function o(o){function a(){for(var e=0,t,n;e<=u.length;){if(t=c.SHORT(e+=2),t>=65472&&65475>=t)return e+=5,{height:c.SHORT(e),width:c.SHORT(e+=2)};n=c.SHORT(e+=2),e+=n-2}return null}function s(){d&&l&&c&&(d.purge(),l.purge(),c.init(null),u=f=l=d=c=null)}var u,c,l,d,f,p;if(u=o,c=new i,c.init(u),65496!==c.SHORT(0))throw new t.ImageError(t.ImageError.WRONG_FORMAT);l=new n(o),d=new r,p=!!d.init(l.get("app1")[0]),f=a.call(this),e.extend(this,{type:"image/jpeg",size:u.length,width:f&&f.width||0,height:f&&f.height||0,setExif:function(t,n){return p?("object"===e.typeOf(t)?e.each(t,function(e,t){d.setExif(t,e)}):d.setExif(t,n),l.set("app1",d.getBinary()),void 0):!1},writeHeaders:function(){return arguments.length?l.restore(arguments[0]):u=l.restore(u)},stripHeaders:function(e){return l.strip(e)},purge:function(){s.call(this)}}),p&&(this.meta={tiff:d.TIFF(),exif:d.EXIF(),gps:d.GPS()})}return o}),i(z,[p,u,P],function(e,t,n){function i(i){function r(){var e,t;return e=a.call(this,8),"IHDR"==e.type?(t=e.start,{width:u.LONG(t),height:u.LONG(t+=4)}):null}function o(){u&&(u.init(null),s=d=c=l=u=null)}function a(e){var t,n,i,r;return t=u.LONG(e),n=u.STRING(e+=4,4),i=e+=4,r=u.LONG(e+t),{length:t,type:n,start:i,CRC:r}}var s,u,c,l,d;s=i,u=new n,u.init(s),function(){var t=0,n=0,i=[35152,20039,3338,6666];for(n=0;n<i.length;n++,t+=2)if(i[n]!=u.SHORT(t))throw new e.ImageError(e.ImageError.WRONG_FORMAT)}(),d=r.call(this),t.extend(this,{type:"image/png",size:s.length,width:d.width,height:d.height,purge:function(){o.call(this)}}),o.call(this)}return i}),i(G,[u,p,B,z],function(e,t,n,i){return function(r){var o=[n,i],a;a=function(){for(var e=0;e<o.length;e++)try{return new o[e](r)}catch(n){}throw new t.ImageError(t.ImageError.WRONG_FORMAT)}(),e.extend(this,{type:"",size:0,width:0,height:0,setExif:function(){},writeHeaders:function(e){return e},stripHeaders:function(e){return e},purge:function(){}}),e.extend(this,a),this.purge=function(){a.purge(),a=null}}}),i(q,[],function(){function e(e,i,r){var o=e.naturalWidth,a=e.naturalHeight,s=r.width,u=r.height,c=r.x||0,l=r.y||0,d=i.getContext("2d");t(e)&&(o/=2,a/=2);var f=1024,p=document.createElement("canvas");p.width=p.height=f;for(var h=p.getContext("2d"),m=n(e,o,a),g=0;a>g;){for(var v=g+f>a?a-g:f,y=0;o>y;){var w=y+f>o?o-y:f;h.clearRect(0,0,f,f),h.drawImage(e,-y,-g);var E=y*s/o+c<<0,_=Math.ceil(w*s/o),x=g*u/a/m+l<<0,R=Math.ceil(v*u/a/m);d.drawImage(p,0,0,w,v,E,x,_,R),y+=f}g+=f}p=h=null}function t(e){var t=e.naturalWidth,n=e.naturalHeight;if(t*n>1048576){var i=document.createElement("canvas");i.width=i.height=1;var r=i.getContext("2d");return r.drawImage(e,-t+1,0),0===r.getImageData(0,0,1,1).data[3]}return!1}function n(e,t,n){var i=document.createElement("canvas");i.width=1,i.height=n;var r=i.getContext("2d");r.drawImage(e,0,0);for(var o=r.getImageData(0,0,1,n).data,a=0,s=n,u=n;u>a;){var c=o[4*(u-1)+3];0===c?s=u:a=u,u=s+a>>1}i=null;var l=u/n;return 0===l?1:l}return{isSubsampled:t,renderTo:e}}),i(X,[D,u,p,m,w,G,q,l,d],function(e,t,n,i,r,o,a,s,u){function c(){function e(){if(!E&&!y)throw new n.ImageError(n.DOMException.INVALID_STATE_ERR);return E||y}function c(e){return i.atob(e.substring(e.indexOf("base64,")+7))}function l(e,t){return"data:"+(t||"")+";base64,"+i.btoa(e)}function d(e){var t=this;y=new Image,y.onerror=function(){g.call(this),t.trigger("error",new n.ImageError(n.ImageError.WRONG_FORMAT))},y.onload=function(){t.trigger("load")},y.src=/^data:[^;]*;base64,/.test(e)?e:l(e,x.type)}function f(e,t){var i=this,r;return window.FileReader?(r=new FileReader,r.onload=function(){t(this.result)},r.onerror=function(){i.trigger("error",new n.FileException(n.FileException.NOT_READABLE_ERR))},r.readAsDataURL(e),void 0):t(e.getAsDataURL())}function p(n,i,r,o){var a=this,s,u,c=0,l=0,d,f,p,g;if(b=o,g=this.meta&&this.meta.tiff&&this.meta.tiff.Orientation||1,-1!==t.inArray(g,[5,6,7,8])){var v=n;n=i,i=v}return d=e(),u=r?Math.max:Math.min,s=u(n/d.width,i/d.height),s>1&&(!r||o)?(this.trigger("Resize"),void 0):(E||(E=document.createElement("canvas")),f=Math.round(d.width*s),p=Math.round(d.height*s),r?(E.width=n,E.height=i,f>n&&(c=Math.round((f-n)/2)),p>i&&(l=Math.round((p-i)/2))):(E.width=f,E.height=p),b||m(E.width,E.height,g),h.call(this,d,E,-c,-l,f,p),this.width=E.width,this.height=E.height,R=!0,a.trigger("Resize"),void 0)}function h(e,t,n,i,r,o){if("iOS"===u.OS)a.renderTo(e,t,{width:r,height:o,x:n,y:i});else{var s=t.getContext("2d");s.drawImage(e,n,i,r,o)}}function m(e,t,n){switch(n){case 5:case 6:case 7:case 8:E.width=t,E.height=e;break;default:E.width=e,E.height=t}var i=E.getContext("2d");switch(n){case 2:i.translate(e,0),i.scale(-1,1);break;case 3:i.translate(e,t),i.rotate(Math.PI);break;case 4:i.translate(0,t),i.scale(1,-1);break;case 5:i.rotate(.5*Math.PI),i.scale(1,-1);break;case 6:i.rotate(.5*Math.PI),i.translate(0,-t);break;case 7:i.rotate(.5*Math.PI),i.translate(e,-t),i.scale(-1,1);break;case 8:i.rotate(-.5*Math.PI),i.translate(-e,0)}}function g(){w&&(w.purge(),w=null),_=y=E=x=null,R=!1}var v=this,y,w,E,_,x,R=!1,b=!0;t.extend(this,{loadFromBlob:function(e){var t=this,i=t.getRuntime(),r=arguments.length>1?arguments[1]:!0;if(!i.can("access_binary"))throw new n.RuntimeError(n.RuntimeError.NOT_SUPPORTED_ERR);return x=e,e.isDetached()?(_=e.getSource(),d.call(this,_),void 0):(f.call(this,e.getSource(),function(e){r&&(_=c(e)),d.call(t,e)}),void 0)},loadFromImage:function(e,t){this.meta=e.meta,x=new r(null,{name:e.name,size:e.size,type:e.type}),d.call(this,t?_=e.getAsBinaryString():e.getAsDataURL())},getInfo:function(){var t=this.getRuntime(),n;return!w&&_&&t.can("access_image_binary")&&(w=new o(_)),n={width:e().width||0,height:e().height||0,type:x.type||s.getFileMime(x.name),size:_&&_.length||x.size||0,name:x.name||"",meta:w&&w.meta||this.meta||{}}},downsize:function(){p.apply(this,arguments)},getAsCanvas:function(){return E&&(E.id=this.uid+"_canvas"),E},getAsBlob:function(e,t){return e!==this.type&&p.call(this,this.width,this.height,!1),new r(null,{name:x.name||"",type:e,data:v.getAsBinaryString.call(this,e,t)})},getAsDataURL:function(e){var t=arguments[1]||90;if(!R)return y.src;if("image/jpeg"!==e)return E.toDataURL("image/png");try{return E.toDataURL("image/jpeg",t/100)}catch(n){return E.toDataURL("image/jpeg")}},getAsBinaryString:function(e,t){if(!R)return _||(_=c(v.getAsDataURL(e,t))),_;if("image/jpeg"!==e)_=c(v.getAsDataURL(e,t));else{var n;t||(t=90);try{n=E.toDataURL("image/jpeg",t/100)}catch(i){n=E.toDataURL("image/jpeg")}_=c(n),w&&(_=w.stripHeaders(_),b&&(w.meta&&w.meta.exif&&w.setExif({PixelXDimension:this.width,PixelYDimension:this.height}),_=w.writeHeaders(_)),w.purge(),w=null)}return R=!1,_},destroy:function(){v=null,g.call(this),this.getRuntime().getShim().removeInstance(this.uid)}})}return e.Image=c}),i(j,[u,d,f,p,g],function(e,t,n,i,r){function o(){var e;try{e=navigator.plugins["Shockwave Flash"],e=e.description}catch(t){try{e=new ActiveXObject("ShockwaveFlash.ShockwaveFlash").GetVariable("$version")}catch(n){e="0.0"}}return e=e.match(/\d+/g),parseFloat(e[0]+"."+e[1])}function a(a){var c=this,l;a=e.extend({swf_url:t.swf_url},a),r.call(this,a,s,{access_binary:function(e){return e&&"browser"===c.mode},access_image_binary:function(e){return e&&"browser"===c.mode},display_media:r.capTrue,do_cors:r.capTrue,drag_and_drop:!1,report_upload_progress:function(){return"client"===c.mode},resize_image:r.capTrue,return_response_headers:!1,return_response_type:function(t){return"json"===t&&window.JSON?!0:!e.arrayDiff(t,["","text","document"])||"browser"===c.mode},return_status_code:function(t){return"browser"===c.mode||!e.arrayDiff(t,[200,404])},select_file:r.capTrue,select_multiple:r.capTrue,send_binary_string:function(e){return e&&"browser"===c.mode},send_browser_cookies:function(e){return e&&"browser"===c.mode},send_custom_headers:function(e){return e&&"browser"===c.mode},send_multipart:r.capTrue,slice_blob:r.capTrue,stream_upload:function(e){return e&&"browser"===c.mode},summon_file_dialog:!1,upload_filesize:function(t){return e.parseSizeStr(t)<=2097152||"client"===c.mode},use_http_method:function(t){return!e.arrayDiff(t,["GET","POST"])}},{access_binary:function(e){return e?"browser":"client"},access_image_binary:function(e){return e?"browser":"client"},report_upload_progress:function(e){return e?"browser":"client"},return_response_type:function(t){return e.arrayDiff(t,["","text","json","document"])?"browser":["client","browser"]},return_status_code:function(t){return e.arrayDiff(t,[200,404])?"browser":["client","browser"]},send_binary_string:function(e){return e?"browser":"client"},send_browser_cookies:function(e){return e?"browser":"client"},send_custom_headers:function(e){return e?"browser":"client"},stream_upload:function(e){return e?"client":"browser"},upload_filesize:function(t){return e.parseSizeStr(t)>=2097152?"client":"browser"}},"client"),o()<10&&(this.mode=!1),e.extend(this,{getShim:function(){return n.get(this.uid)},shimExec:function(e,t){var n=[].slice.call(arguments,2);return c.getShim().exec(this.uid,e,t,n)},init:function(){var n,r,o;o=this.getShimContainer(),e.extend(o.style,{position:"absolute",top:"-8px",left:"-8px",width:"9px",height:"9px",overflow:"hidden"}),n='<object id="'+this.uid+'" type="application/x-shockwave-flash" data="'+a.swf_url+'" ',"IE"===t.browser&&(n+='classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" '),n+='width="100%" height="100%" style="outline:0"><param name="movie" value="'+a.swf_url+'" />'+'<param name="flashvars" value="uid='+escape(this.uid)+"&target="+t.global_event_dispatcher+'" />'+'<param name="wmode" value="transparent" />'+'<param name="allowscriptaccess" value="always" />'+"</object>","IE"===t.browser?(r=document.createElement("div"),o.appendChild(r),r.outerHTML=n,r=o=null):o.innerHTML=n,l=setTimeout(function(){c&&!c.initialized&&c.trigger("Error",new i.RuntimeError(i.RuntimeError.NOT_INIT_ERR))},5e3)},destroy:function(e){return function(){e.call(c),clearTimeout(l),a=l=e=c=null}}(this.destroy)},u)}var s="flash",u={};return r.addConstructor(s,a),u}),i(V,[j,y],function(e,t){var n={slice:function(e,n,i,r){var o=this.getRuntime();return 0>n?n=Math.max(e.size+n,0):n>0&&(n=Math.min(n,e.size)),0>i?i=Math.max(e.size+i,0):i>0&&(i=Math.min(i,e.size)),e=o.shimExec.call(this,"Blob","slice",n,i,r||""),e&&(e=new t(o.uid,e)),e}};return e.Blob=n}),i(W,[j],function(e){var t={init:function(e){this.getRuntime().shimExec.call(this,"FileInput","init",{name:e.name,accept:e.accept,multiple:e.multiple}),this.trigger("ready")}};return e.FileInput=t}),i(Y,[j,m],function(e,t){function n(e,n){switch(n){case"readAsText":return t.atob(e,"utf8");case"readAsBinaryString":return t.atob(e);case"readAsDataURL":return e}return null}var i="",r={read:function(e,t){var r=this,o=r.getRuntime();return"readAsDataURL"===e&&(i="data:"+(t.type||"")+";base64,"),r.bind("Progress",function(t,r){r&&(i+=n(r,e))}),o.shimExec.call(this,"FileReader","readAsBase64",t.uid)},getResult:function(){return i},destroy:function(){i=null}};return e.FileReader=r}),i($,[j,m],function(e,t){function n(e,n){switch(n){case"readAsText":return t.atob(e,"utf8");case"readAsBinaryString":return t.atob(e);case"readAsDataURL":return e}return null}var i={read:function(e,t){var i,r=this.getRuntime();return(i=r.shimExec.call(this,"FileReaderSync","readAsBase64",t.uid))?("readAsDataURL"===e&&(i="data:"+(t.type||"")+";base64,"+i),n(i,e,t.type)):null}};return e.FileReaderSync=i}),i(J,[j,u,y,w,T,S,O],function(e,t,n,i,r,o,a){var s={send:function(e,i){function r(){e.transport=l.mode,l.shimExec.call(c,"XMLHttpRequest","send",e,i)}function s(e,t){l.shimExec.call(c,"XMLHttpRequest","appendBlob",e,t.uid),i=null,r()}function u(e,t){var n=new a;n.bind("TransportingComplete",function(){t(this.result)}),n.transport(e.getSource(),e.type,{ruid:l.uid})}var c=this,l=c.getRuntime();if(t.isEmptyObj(e.headers)||t.each(e.headers,function(e,t){l.shimExec.call(c,"XMLHttpRequest","setRequestHeader",t,e.toString())}),i instanceof o){var d;if(i.each(function(e,t){e instanceof n?d=t:l.shimExec.call(c,"XMLHttpRequest","append",t,e)}),i.hasBlob()){var f=i.getBlob();f.isDetached()?u(f,function(e){f.destroy(),s(d,e)}):s(d,f)}else i=null,r()}else i instanceof n?i.isDetached()?u(i,function(e){i.destroy(),i=e.uid,r()}):(i=i.uid,r()):r()},getResponse:function(e){var n,o,a=this.getRuntime();if(o=a.shimExec.call(this,"XMLHttpRequest","getResponseAsBlob")){if(o=new i(a.uid,o),"blob"===e)return o;try{if(n=new r,~t.inArray(e,["","text"]))return n.readAsText(o);if("json"===e&&window.JSON)return JSON.parse(n.readAsText(o))}finally{o.destroy()}}return null},abort:function(e){var t=this.getRuntime();t.shimExec.call(this,"XMLHttpRequest","abort"),this.dispatchEvent("readystatechange"),this.dispatchEvent("abort")}};return e.XMLHttpRequest=s}),i(Z,[j,y],function(e,t){var n={getAsBlob:function(e){var n=this.getRuntime(),i=n.shimExec.call(this,"Transporter","getAsBlob",e);return i?new t(n.uid,i):null}};return e.Transporter=n}),i(K,[j,u,O,y,T],function(e,t,n,i,r){var o={loadFromBlob:function(e){function t(e){r.shimExec.call(i,"Image","loadFromBlob",e.uid),i=r=null}var i=this,r=i.getRuntime();if(e.isDetached()){var o=new n;o.bind("TransportingComplete",function(){t(o.result.getSource())}),o.transport(e.getSource(),e.type,{ruid:r.uid})}else t(e.getSource())},loadFromImage:function(e){var t=this.getRuntime();return t.shimExec.call(this,"Image","loadFromImage",e.uid)},getAsBlob:function(e,t){var n=this.getRuntime(),r=n.shimExec.call(this,"Image","getAsBlob",e,t);return r?new i(n.uid,r):null},getAsDataURL:function(){var e=this.getRuntime(),t=e.Image.getAsBlob.apply(this,arguments),n;return t?(n=new r,n.readAsDataURL(t)):null}};return e.Image=o}),i(Q,[u,d,f,p,g],function(e,t,n,i,r){function o(e){var t=!1,n=null,i,r,o,a,s,u=0;try{try{n=new ActiveXObject("AgControl.AgControl"),n.IsVersionSupported(e)&&(t=!0),n=null}catch(c){var l=navigator.plugins["Silverlight Plug-In"];if(l){for(i=l.description,"1.0.30226.2"===i&&(i="2.0.30226.2"),r=i.split(".");r.length>3;)r.pop();for(;r.length<4;)r.push(0);for(o=e.split(".");o.length>4;)o.pop();do a=parseInt(o[u],10),s=parseInt(r[u],10),u++;while(u<o.length&&a===s);s>=a&&!isNaN(a)&&(t=!0)}}}catch(d){t=!1}return t}function a(a){var c=this,l;a=e.extend({xap_url:t.xap_url},a),r.call(this,a,s,{access_binary:r.capTrue,access_image_binary:r.capTrue,display_media:r.capTrue,do_cors:r.capTrue,drag_and_drop:!1,report_upload_progress:r.capTrue,resize_image:r.capTrue,return_response_headers:function(e){return e&&"client"===c.mode},return_response_type:function(e){return"json"!==e?!0:!!window.JSON},return_status_code:function(t){return"client"===c.mode||!e.arrayDiff(t,[200,404])},select_file:r.capTrue,select_multiple:r.capTrue,send_binary_string:r.capTrue,send_browser_cookies:function(e){return e&&"browser"===c.mode},send_custom_headers:function(e){return e&&"client"===c.mode},send_multipart:r.capTrue,slice_blob:r.capTrue,stream_upload:!0,summon_file_dialog:!1,upload_filesize:r.capTrue,use_http_method:function(t){return"client"===c.mode||!e.arrayDiff(t,["GET","POST"])}},{return_response_headers:function(e){return e?"client":"browser"},return_status_code:function(t){return e.arrayDiff(t,[200,404])?"client":["client","browser"]},send_browser_cookies:function(e){return e?"browser":"client"},send_custom_headers:function(e){return e?"client":"browser"},use_http_method:function(t){return e.arrayDiff(t,["GET","POST"])?"client":["client","browser"]}}),o("2.0.31005.0")&&"Opera"!==t.browser||(this.mode=!1),e.extend(this,{getShim:function(){return n.get(this.uid).content.Moxie},shimExec:function(e,t){var n=[].slice.call(arguments,2);return c.getShim().exec(this.uid,e,t,n)},init:function(){var e;e=this.getShimContainer(),e.innerHTML='<object id="'+this.uid+'" data="data:application/x-silverlight," type="application/x-silverlight-2" width="100%" height="100%" style="outline:none;">'+'<param name="source" value="'+a.xap_url+'"/>'+'<param name="background" value="Transparent"/>'+'<param name="windowless" value="true"/>'+'<param name="enablehtmlaccess" value="true"/>'+'<param name="initParams" value="uid='+this.uid+",target="+t.global_event_dispatcher+'"/>'+"</object>",l=setTimeout(function(){c&&!c.initialized&&c.trigger("Error",new i.RuntimeError(i.RuntimeError.NOT_INIT_ERR))},"Windows"!==t.OS?1e4:5e3)},destroy:function(e){return function(){e.call(c),clearTimeout(l),a=l=e=c=null}}(this.destroy)},u)}var s="silverlight",u={};return r.addConstructor(s,a),u}),i(et,[Q,u,V],function(e,t,n){return e.Blob=t.extend({},n)}),i(tt,[Q],function(e){var t={init:function(e){function t(e){for(var t="",n=0;n<e.length;n++)t+=(""!==t?"|":"")+e[n].title+" | *."+e[n].extensions.replace(/,/g,";*.");return t}this.getRuntime().shimExec.call(this,"FileInput","init",t(e.accept),e.name,e.multiple),this.trigger("ready")}};return e.FileInput=t}),i(nt,[Q,f,L],function(e,t,n){var i={init:function(){var e=this,i=e.getRuntime(),r;return r=i.getShimContainer(),n.addEvent(r,"dragover",function(e){e.preventDefault(),e.stopPropagation(),e.dataTransfer.dropEffect="copy"},e.uid),n.addEvent(r,"dragenter",function(e){e.preventDefault();var n=t.get(i.uid).dragEnter(e);n&&e.stopPropagation()},e.uid),n.addEvent(r,"drop",function(e){e.preventDefault();var n=t.get(i.uid).dragDrop(e);n&&e.stopPropagation()},e.uid),i.shimExec.call(this,"FileDrop","init")}};return e.FileDrop=i}),i(it,[Q,u,Y],function(e,t,n){return e.FileReader=t.extend({},n)}),i(rt,[Q,u,$],function(e,t,n){return e.FileReaderSync=t.extend({},n)}),i(ot,[Q,u,J],function(e,t,n){return e.XMLHttpRequest=t.extend({},n)}),i(at,[Q,u,Z],function(e,t,n){return e.Transporter=t.extend({},n)}),i(st,[Q,u,K],function(e,t,n){return e.Image=t.extend({},n,{getInfo:function(){var e=this.getRuntime(),n=["tiff","exif","gps"],i={meta:{}},r=e.shimExec.call(this,"Image","getInfo");return r.meta&&t.each(n,function(e){var t=r.meta[e],n,o,a,s;if(t&&t.keys)for(i.meta[e]={},o=0,a=t.keys.length;a>o;o++)n=t.keys[o],s=t[n],s&&(/^(\d|[1-9]\d+)$/.test(s)?s=parseInt(s,10):/^\d*\.\d+$/.test(s)&&(s=parseFloat(s)),i.meta[e][n]=s)}),i.width=parseInt(r.width,10),i.height=parseInt(r.height,10),i.size=parseInt(r.size,10),i.type=r.type,i.name=r.name,i}})}),i(ut,[u,p,g,d],function(e,t,n,i){function r(t){var r=this,s=n.capTest,u=n.capTrue;n.call(this,t,o,{access_binary:s(window.FileReader||window.File&&File.getAsDataURL),access_image_binary:!1,display_media:s(a.Image&&(i.can("create_canvas")||i.can("use_data_uri_over32kb"))),do_cors:!1,drag_and_drop:!1,filter_by_extension:s(function(){return"Chrome"===i.browser&&i.version>=28||"IE"===i.browser&&i.version>=10}()),resize_image:function(){return a.Image&&r.can("access_binary")&&i.can("create_canvas")},report_upload_progress:!1,return_response_headers:!1,return_response_type:function(t){return"json"===t&&window.JSON?!0:!!~e.inArray(t,["text","document",""])},return_status_code:function(t){return!e.arrayDiff(t,[200,404])},select_file:function(){return i.can("use_fileinput")},select_multiple:!1,send_binary_string:!1,send_custom_headers:!1,send_multipart:!0,slice_blob:!1,stream_upload:function(){return r.can("select_file")},summon_file_dialog:s(function(){return"Firefox"===i.browser&&i.version>=4||"Opera"===i.browser&&i.version>=12||!!~e.inArray(i.browser,["Chrome","Safari"])}()),upload_filesize:u,use_http_method:function(t){return!e.arrayDiff(t,["GET","POST"])}}),e.extend(this,{init:function(){this.trigger("Init")},destroy:function(e){return function(){e.call(r),e=r=null}}(this.destroy)}),e.extend(this.getShim(),a)}var o="html4",a={};return n.addConstructor(o,r),a}),i(ct,[ut,u,f,L,l,d],function(e,t,n,i,r,o){function a(){function e(){var r=this,l=r.getRuntime(),d,f,p,h,m,g;g=t.guid("uid_"),d=l.getShimContainer(),a&&(p=n.get(a+"_form"),p&&t.extend(p.style,{top:"100%"})),h=document.createElement("form"),h.setAttribute("id",g+"_form"),h.setAttribute("method","post"),h.setAttribute("enctype","multipart/form-data"),h.setAttribute("encoding","multipart/form-data"),t.extend(h.style,{overflow:"hidden",position:"absolute",top:0,left:0,width:"100%",height:"100%"}),m=document.createElement("input"),m.setAttribute("id",g),m.setAttribute("type","file"),m.setAttribute("name",c.name||"Filedata"),m.setAttribute("accept",u.join(",")),t.extend(m.style,{fontSize:"999px",opacity:0}),h.appendChild(m),d.appendChild(h),t.extend(m.style,{position:"absolute",top:0,left:0,width:"100%",height:"100%"}),"IE"===o.browser&&o.version<10&&t.extend(m.style,{filter:"progid:DXImageTransform.Microsoft.Alpha(opacity=0)"}),m.onchange=function(){var t;this.value&&(t=this.files?this.files[0]:{name:this.value},s=[t],this.onchange=function(){},e.call(r),r.bind("change",function i(){var e=n.get(g),t=n.get(g+"_form"),o;r.unbind("change",i),r.files.length&&e&&t&&(o=r.files[0],e.setAttribute("id",o.uid),t.setAttribute("id",o.uid+"_form"),t.setAttribute("target",o.uid+"_iframe")),e=t=null},998),m=h=null,r.trigger("change"))},l.can("summon_file_dialog")&&(f=n.get(c.browse_button),i.removeEvent(f,"click",r.uid),i.addEvent(f,"click",function(e){m&&!m.disabled&&m.click(),e.preventDefault()},r.uid)),a=g,d=p=f=null}var a,s=[],u=[],c;t.extend(this,{init:function(t){var o=this,a=o.getRuntime(),s;c=t,u=t.accept.mimes||r.extList2mimes(t.accept,a.can("filter_by_extension")),s=a.getShimContainer(),function(){var e,r,u;e=n.get(t.browse_button),a.can("summon_file_dialog")&&("static"===n.getStyle(e,"position")&&(e.style.position="relative"),r=parseInt(n.getStyle(e,"z-index"),10)||1,e.style.zIndex=r,s.style.zIndex=r-1),u=a.can("summon_file_dialog")?e:s,i.addEvent(u,"mouseover",function(){o.trigger("mouseenter")},o.uid),i.addEvent(u,"mouseout",function(){o.trigger("mouseleave")},o.uid),i.addEvent(u,"mousedown",function(){o.trigger("mousedown")},o.uid),i.addEvent(n.get(t.container),"mouseup",function(){o.trigger("mouseup")},o.uid),e=null}(),e.call(this),s=null,o.trigger({type:"ready",async:!0})},getFiles:function(){return s},disable:function(e){var t;(t=n.get(a))&&(t.disabled=!!e)},destroy:function(){var e=this.getRuntime(),t=e.getShim(),r=e.getShimContainer();i.removeAllEvents(r,this.uid),i.removeAllEvents(c&&n.get(c.container),this.uid),i.removeAllEvents(c&&n.get(c.browse_button),this.uid),r&&(r.innerHTML=""),t.removeInstance(this.uid),a=s=u=c=r=t=null}})}return e.FileInput=a}),i(lt,[ut,F],function(e,t){return e.FileReader=t}),i(dt,[ut,u,f,b,p,L,y,S],function(e,t,n,i,r,o,a,s){function u(){function e(e){var t=this,i,r,a,s,u=!1;if(l){if(i=l.id.replace(/_iframe$/,""),r=n.get(i+"_form")){for(a=r.getElementsByTagName("input"),s=a.length;s--;)switch(a[s].getAttribute("type")){case"hidden":a[s].parentNode.removeChild(a[s]);break;case"file":u=!0}a=[],u||r.parentNode.removeChild(r),r=null}setTimeout(function(){o.removeEvent(l,"load",t.uid),l.parentNode&&l.parentNode.removeChild(l);var n=t.getRuntime().getShimContainer();n.children.length||n.parentNode.removeChild(n),n=l=null,e()},1)}}var u,c,l;t.extend(this,{send:function(d,f){function p(){var n=m.getShimContainer()||document.body,r=document.createElement("div");r.innerHTML='<iframe id="'+g+'_iframe" name="'+g+'_iframe" src="javascript:&quot;&quot;" style="display:none"></iframe>',l=r.firstChild,n.appendChild(l),o.addEvent(l,"load",function(){var n;try{n=l.contentWindow.document||l.contentDocument||window.frames[l.id].document,/^4(0[0-9]|1[0-7]|2[2346])\s/.test(n.title)?u=n.title.replace(/^(\d+).*$/,"$1"):(u=200,c=t.trim(n.body.innerHTML),h.trigger({type:"progress",loaded:c.length,total:c.length}),w&&h.trigger({type:"uploadprogress",loaded:w.size||1025,total:w.size||1025}))}catch(r){if(!i.hasSameOrigin(d.url))return e.call(h,function(){h.trigger("error")}),void 0;u=404}e.call(h,function(){h.trigger("load")})},h.uid)}var h=this,m=h.getRuntime(),g,v,y,w;if(u=c=null,f instanceof s&&f.hasBlob()){if(w=f.getBlob(),g=w.uid,y=n.get(g),v=n.get(g+"_form"),!v)throw new r.DOMException(r.DOMException.NOT_FOUND_ERR)}else g=t.guid("uid_"),v=document.createElement("form"),v.setAttribute("id",g+"_form"),v.setAttribute("method",d.method),v.setAttribute("enctype","multipart/form-data"),v.setAttribute("encoding","multipart/form-data"),v.setAttribute("target",g+"_iframe"),m.getShimContainer().appendChild(v);f instanceof s&&f.each(function(e,n){if(e instanceof a)y&&y.setAttribute("name",n);else{var i=document.createElement("input");t.extend(i,{type:"hidden",name:n,value:e}),y?v.insertBefore(i,y):v.appendChild(i)}}),v.setAttribute("action",d.url),p(),v.submit(),h.trigger("loadstart")},getStatus:function(){return u},getResponse:function(e){if("json"===e&&"string"===t.typeOf(c)&&window.JSON)try{return JSON.parse(c.replace(/^\s*<pre[^>]*>/,"").replace(/<\/pre>\s*$/,""))}catch(n){return null}return c},abort:function(){var t=this;l&&l.contentWindow&&(l.contentWindow.stop?l.contentWindow.stop():l.contentWindow.document.execCommand?l.contentWindow.document.execCommand("Stop"):l.src="about:blank"),e.call(this,function(){t.dispatchEvent("abort")})}})}return e.XMLHttpRequest=u}),i(ft,[ut,X],function(e,t){return e.Image=t}),a([u,c,l,d,f,p,h,m,g,v,y,w,E,_,x,R,b,T,S,A,O,I,L])}(this);;(function(){"use strict";var e={},t=moxie.core.utils.Basic.inArray;return function n(r){var i,s;for(i in r)s=typeof r[i],s==="object"&&!~t(i,["Exceptions","Env","Mime"])?n(r[i]):s==="function"&&(e[i]=r[i])}(window.moxie),e.Env=window.moxie.core.utils.Env,e.Mime=window.moxie.core.utils.Mime,e.Exceptions=window.moxie.core.Exceptions,window.mOxie=e,window.o||(window.o=e),e})();
+/**
+ * Plupload - multi-runtime File Uploader
+ * v2.1.1
+ *
+ * Copyright 2013, Moxiecode Systems AB
+ * Released under GPL License.
+ *
+ * License: http://www.plupload.com/license
+ * Contributing: http://www.plupload.com/contributing
+ *
+ * Date: 2014-01-16
+ */
+;(function(e,t,n){function s(e){function r(e,t,r){var i={chunks:"slice_blob",jpgresize:"send_binary_string",pngresize:"send_binary_string",progress:"report_upload_progress",multi_selection:"select_multiple",dragdrop:"drag_and_drop",drop_element:"drag_and_drop",headers:"send_custom_headers",canSendBinary:"send_binary",triggerDialog:"summon_file_dialog"};i[e]?n[i[e]]=t:r||(n[e]=t)}var t=e.required_features,n={};return typeof t=="string"?o.each(t.split(/\s*,\s*/),function(e){r(e,!0)}):typeof t=="object"?o.each(t,function(e,t){r(t,e)}):t===!0&&(e.multipart||(n.send_binary_string=!0),e.chunk_size>0&&(n.slice_blob=!0),e.resize.enabled&&(n.send_binary_string=!0),o.each(e,function(e,t){r(t,!!e,!0)})),n}var r=e.setTimeout,i={},o={VERSION:"2.1.1",STOPPED:1,STARTED:2,QUEUED:1,UPLOADING:2,FAILED:4,DONE:5,GENERIC_ERROR:-100,HTTP_ERROR:-200,IO_ERROR:-300,SECURITY_ERROR:-400,INIT_ERROR:-500,FILE_SIZE_ERROR:-600,FILE_EXTENSION_ERROR:-601,FILE_DUPLICATE_ERROR:-602,IMAGE_FORMAT_ERROR:-700,IMAGE_MEMORY_ERROR:-701,IMAGE_DIMENSIONS_ERROR:-702,mimeTypes:t.mimes,ua:t.ua,typeOf:t.typeOf,extend:t.extend,guid:t.guid,get:function(n){var r=[],i;t.typeOf(n)!=="array"&&(n=[n]);var s=n.length;while(s--)i=t.get(n[s]),i&&r.push(i);return r.length?r:null},each:t.each,getPos:t.getPos,getSize:t.getSize,xmlEncode:function(e){var t={"<":"lt",">":"gt","&":"amp",'"':"quot","'":"#39"},n=/[<>&\"\']/g;return e?(""+e).replace(n,function(e){return t[e]?"&"+t[e]+";":e}):e},toArray:t.toArray,inArray:t.inArray,addI18n:t.addI18n,translate:t.translate,isEmptyObj:t.isEmptyObj,hasClass:t.hasClass,addClass:t.addClass,removeClass:t.removeClass,getStyle:t.getStyle,addEvent:t.addEvent,removeEvent:t.removeEvent,removeAllEvents:t.removeAllEvents,cleanName:function(e){var t,n;n=[/[\300-\306]/g,"A",/[\340-\346]/g,"a",/\307/g,"C",/\347/g,"c",/[\310-\313]/g,"E",/[\350-\353]/g,"e",/[\314-\317]/g,"I",/[\354-\357]/g,"i",/\321/g,"N",/\361/g,"n",/[\322-\330]/g,"O",/[\362-\370]/g,"o",/[\331-\334]/g,"U",/[\371-\374]/g,"u"];for(t=0;t<n.length;t+=2)e=e.replace(n[t],n[t+1]);return e=e.replace(/\s+/g,"_"),e=e.replace(/[^a-z0-9_\-\.]+/gi,""),e},buildUrl:function(e,t){var n="";return o.each(t,function(e,t){n+=(n?"&":"")+encodeURIComponent(t)+"="+encodeURIComponent(e)}),n&&(e+=(e.indexOf("?")>0?"&":"?")+n),e},formatSize:function(e){function t(e,t){return Math.round(e*Math.pow(10,t))/Math.pow(10,t)}if(e===n||/\D/.test(e))return o.translate("N/A");var r=Math.pow(1024,4);return e>r?t(e/r,1)+" "+o.translate("tb"):e>(r/=1024)?t(e/r,1)+" "+o.translate("gb"):e>(r/=1024)?t(e/r,1)+" "+o.translate("mb"):e>1024?Math.round(e/1024)+" "+o.translate("kb"):e+" "+o.translate("b")},parseSize:t.parseSizeStr,predictRuntime:function(e,n){var r,i;return r=new o.Uploader(e),i=t.Runtime.thatCan(r.getOption().required_features,n||e.runtimes),r.destroy(),i},addFileFilter:function(e,t){i[e]=t}};o.addFileFilter("mime_types",function(e,t,n){e.length&&!e.regexp.test(t.name)?(this.trigger("Error",{code:o.FILE_EXTENSION_ERROR,message:o.translate("File extension error."),file:t}),n(!1)):n(!0)}),o.addFileFilter("max_file_size",function(e,t,n){var r;e=o.parseSize(e),t.size!==r&&e&&t.size>e?(this.trigger("Error",{code:o.FILE_SIZE_ERROR,message:o.translate("File size error."),file:t}),n(!1)):n(!0)}),o.addFileFilter("prevent_duplicates",function(e,t,n){if(e){var r=this.files.length;while(r--)if(t.name===this.files[r].name&&t.size===this.files[r].size){this.trigger("Error",{code:o.FILE_DUPLICATE_ERROR,message:o.translate("Duplicate file error."),file:t}),n(!1);return}}n(!0)}),o.Uploader=function(e){function g(){var e,t=0,n;if(this.state==o.STARTED){for(n=0;n<f.length;n++)!e&&f[n].status==o.QUEUED?(e=f[n],this.trigger("BeforeUpload",e)&&(e.status=o.UPLOADING,this.trigger("UploadFile",e))):t++;t==f.length&&(this.state!==o.STOPPED&&(this.state=o.STOPPED,this.trigger("StateChanged")),this.trigger("UploadComplete",f))}}function y(e){e.percent=e.size>0?Math.ceil(e.loaded/e.size*100):100,b()}function b(){var e,t;d.reset();for(e=0;e<f.length;e++)t=f[e],t.size!==n?(d.size+=t.origSize,d.loaded+=t.loaded*t.origSize/t.size):d.size=n,t.status==o.DONE?d.uploaded++:t.status==o.FAILED?d.failed++:d.queued++;d.size===n?d.percent=f.length>0?Math.ceil(d.uploaded/f.length*100):0:(d.bytesPerSec=Math.ceil(d.loaded/((+(new Date)-p||1)/1e3)),d.percent=d.size>0?Math.ceil(d.loaded/d.size*100):0)}function w(){var e=c[0]||h[0];return e?e.getRuntime().uid:!1}function E(e,n){if(e.ruid){var r=t.Runtime.getInfo(e.ruid);if(r)return r.can(n)}return!1}function S(){this.bind("FilesAdded",C),this.bind("CancelUpload",M),this.bind("BeforeUpload",k),this.bind("UploadFile",L),this.bind("UploadProgress",A),this.bind("StateChanged",O),this.bind("QueueChanged",b),this.bind("Error",D),this.bind("FileUploaded",_),this.bind("Destroy",P)}function x(e,n){var r=this,i=0,s=[],u={accept:e.filters.mime_types,runtime_order:e.runtimes,required_caps:e.required_features,preferred_caps:l,swf_url:e.flash_swf_url,xap_url:e.silverlight_xap_url};o.each(e.runtimes.split(/\s*,\s*/),function(t){e[t]&&(u[t]=e[t])}),e.browse_button&&o.each(e.browse_button,function(n){s.push(function(s){var a=new t.FileInput(o.extend({},u,{name:e.file_data_name,multiple:e.multi_selection,container:e.container,browse_button:n}));a.onready=function(){var e=t.Runtime.getInfo(this.ruid);t.extend(r.features,{chunks:e.can("slice_blob"),multipart:e.can("send_multipart"),multi_selection:e.can("select_multiple")}),i++,c.push(this),s()},a.onchange=function(){r.addFile(this.files)},a.bind("mouseenter mouseleave mousedown mouseup",function(r){v||(e.browse_button_hover&&("mouseenter"===r.type?t.addClass(n,e.browse_button_hover):"mouseleave"===r.type&&t.removeClass(n,e.browse_button_hover)),e.browse_button_active&&("mousedown"===r.type?t.addClass(n,e.browse_button_active):"mouseup"===r.type&&t.removeClass(n,e.browse_button_active)))}),a.bind("error runtimeerror",function(){a=null,s()}),a.init()})}),e.drop_element&&o.each(e.drop_element,function(e){s.push(function(n){var s=new t.FileDrop(o.extend({},u,{drop_zone:e}));s.onready=function(){var e=t.Runtime.getInfo(this.ruid);r.features.dragdrop=e.can("drag_and_drop"),i++,h.push(this),n()},s.ondrop=function(){r.addFile(this.files)},s.bind("error runtimeerror",function(){s=null,n()}),s.init()})}),t.inSeries(s,function(){typeof n=="function"&&n(i)})}function T(e,n,r){var i=new t.Image;try{i.onload=function(){i.downsize(n.width,n.height,n.crop,n.preserve_headers)},i.onresize=function(){r(this.getAsBlob(e.type,n.quality)),this.destroy()},i.onerror=function(){r(e)},i.load(e)}catch(s){r(e)}}function N(e,n,r){function f(e,t,n){var r=a[e];switch(e){case"max_file_size":e==="max_file_size"&&(a.max_file_size=a.filters.max_file_size=t);break;case"chunk_size":if(t=o.parseSize(t))a[e]=t;break;case"filters":o.typeOf(t)==="array"&&(t={mime_types:t}),n?o.extend(a.filters,t):a.filters=t,t.mime_types&&(a.filters.mime_types.regexp=function(e){var t=[];return o.each(e,function(e){o.each(e.extensions.split(/,/),function(e){/^\s*\*\s*$/.test(e)?t.push("\\.*"):t.push("\\."+e.replace(new RegExp("["+"/^$.*+?|()[]{}\\".replace(/./g,"\\$&")+"]","g"),"\\$&"))})}),new RegExp("("+t.join("|")+")$","i")}(a.filters.mime_types));break;case"resize":n?o.extend(a.resize,t,{enabled:!0}):a.resize=t;break;case"prevent_duplicates":a.prevent_duplicates=a.filters.prevent_duplicates=!!t;break;case"browse_button":case"drop_element":t=o.get(t);case"container":case"runtimes":case"multi_selection":case"flash_swf_url":case"silverlight_xap_url":a[e]=t,n||(u=!0);break;default:a[e]=t}n||i.trigger("OptionChanged",e,t,r)}var i=this,u=!1;typeof e=="object"?o.each(e,function(e,t){f(t,e,r)}):f(e,n,r),r?(a.required_features=s(o.extend({},a)),l=s(o.extend({},a,{required_features:!0}))):u&&(i.trigger("Destroy"),x.call(i,a,function(e){e?(i.runtime=t.Runtime.getInfo(w()).type,i.trigger("Init",{runtime:i.runtime}),i.trigger("PostInit")):i.trigger("Error",{code:o.INIT_ERROR,message:o.translate("Init error.")})}))}function C(e,t){[].push.apply(f,t),e.trigger("QueueChanged"),e.refresh()}function k(e,t){if(a.unique_names){var n=t.name.match(/\.([^.]+)$/),r="part";n&&(r=n[1]),t.target_name=t.id+"."+r}}function L(e,n){function h(){u-->0?r(p,1e3):(n.loaded=f,e.trigger("Error",{code:o.HTTP_ERROR,message:o.translate("HTTP Error."),file:n,response:m.responseText,status:m.status,responseHeaders:m.getAllResponseHeaders()}))}function p(){var d,v,g,y;if(n.status==o.DONE||n.status==o.FAILED||e.state==o.STOPPED)return;g={name:n.target_name||n.name},s&&a.chunks&&c.size>s?(y=Math.min(s,c.size-f),d=c.slice(f,f+y)):(y=c.size,d=c),s&&a.chunks&&(e.settings.send_chunk_number?(g.chunk=Math.ceil(f/s),g.chunks=Math.ceil(c.size/s)):(g.offset=f,g.total=c.size)),m=new t.XMLHttpRequest,m.upload&&(m.upload.onprogress=function(t){n.loaded=Math.min(n.size,f+t.loaded),e.trigger("UploadProgress",n)}),m.onload=function(){if(m.status>=400){h();return}u=e.settings.max_retries,y<c.size?(d.destroy(),f+=y,n.loaded=Math.min(f,c.size),e.trigger("ChunkUploaded",n,{offset:n.loaded,total:c.size,response:m.responseText,status:m.status,responseHeaders:m.getAllResponseHeaders()}),t.Env.browser==="Android Browser"&&e.trigger("UploadProgress",n)):n.loaded=n.size,d=v=null,!f||f>=c.size?(n.size!=n.origSize&&(c.destroy(),c=null),e.trigger("UploadProgress",n),n.status=o.DONE,e.trigger("FileUploaded",n,{response:m.responseText,status:m.status,responseHeaders:m.getAllResponseHeaders()})):r(p,1)},m.onerror=function(){h()},m.onloadend=function(){this.destroy(),m=null},e.settings.multipart&&a.multipart?(g.name=n.target_name||n.name,m.open("post",i,!0),o.each(e.settings.headers,function(e,t){m.setRequestHeader(t,e)}),v=new t.FormData,o.each(o.extend(g,e.settings.multipart_params),function(e,t){v.append(t,e)}),v.append(e.settings.file_data_name,d),m.send(v,{runtime_order:e.settings.runtimes,required_caps:e.settings.required_features,preferred_caps:l,swf_url:e.settings.flash_swf_url,xap_url:e.settings.silverlight_xap_url})):(i=o.buildUrl(e.settings.url,o.extend(g,e.settings.multipart_params)),m.open("post",i,!0),m.setRequestHeader("Content-Type","application/octet-stream"),o.each(e.settings.headers,function(e,t){m.setRequestHeader(t,e)}),m.send(d,{runtime_order:e.settings.runtimes,required_caps:e.settings.required_features,preferred_caps:l,swf_url:e.settings.flash_swf_url,xap_url:e.settings.silverlight_xap_url}))}var i=e.settings.url,s=e.settings.chunk_size,u=e.settings.max_retries,a=e.features,f=0,c;n.loaded&&(f=n.loaded=s*Math.floor(n.loaded/s)),c=n.getSource(),e.settings.resize.enabled&&E(c,"send_binary_string")&&!!~t.inArray(c.type,["image/jpeg","image/png"])?T.call(this,c,e.settings.resize,function(e){c=e,n.size=e.size,p()}):p()}function A(e,t){y(t)}function O(e){if(e.state==o.STARTED)p=+(new Date);else if(e.state==o.STOPPED)for(var t=e.files.length-1;t>=0;t--)e.files[t].status==o.UPLOADING&&(e.files[t].status=o.QUEUED,b())}function M(){m&&m.abort()}function _(e){b(),r(function(){g.call(e)},1)}function D(e,t){t.file&&(t.file.status=o.FAILED,y(t.file),e.state==o.STARTED&&(e.trigger("CancelUpload"),r(function(){g.call(e)},1)))}function P(e){e.stop(),o.each(f,function(e){e.destroy()}),f=[],c.length&&(o.each(c,function(e){e.destroy()}),c=[]),h.length&&(o.each(h,function(e){e.destroy()}),h=[]),l={},v=!1,p=m=null,d.reset()}var u=o.guid(),a,f=[],l={},c=[],h=[],p,d,v=!1,m;a={runtimes:t.Runtime.order,max_retries:0,chunk_size:0,multipart:!0,multi_selection:!0,file_data_name:"file",flash_swf_url:"js/Moxie.swf",silverlight_xap_url:"js/Moxie.xap",filters:{mime_types:[],prevent_duplicates:!1,max_file_size:0},resize:{enabled:!1,preserve_headers:!0,crop:!1},send_chunk_number:!0},N.call(this,e,null,!0),d=new o.QueueProgress,o.extend(this,{id:u,uid:u,state:o.STOPPED,features:{},runtime:null,files:f,settings:a,total:d,init:function(){var e=this;typeof a.preinit=="function"?a.preinit(e):o.each(a.preinit,function(t,n){e.bind(n,t)});if(!a.browse_button||!a.url){this.trigger("Error",{code:o.INIT_ERROR,message:o.translate("Init error.")});return}S.call(this),x.call(this,a,function(n){typeof a.init=="function"?a.init(e):o.each(a.init,function(t,n){e.bind(n,t)}),n?(e.runtime=t.Runtime.getInfo(w()).type,e.trigger("Init",{runtime:e.runtime}),e.trigger("PostInit")):e.trigger("Error",{code:o.INIT_ERROR,message:o.translate("Init error.")})})},setOption:function(e,t){N.call(this,e,t,!this.runtime)},getOption:function(e){return e?a[e]:a},refresh:function(){c.length&&o.each(c,function(e){e.trigger("Refresh")}),this.trigger("Refresh")},start:function(){this.state!=o.STARTED&&(this.state=o.STARTED,this.trigger("StateChanged"),g.call(this))},stop:function(){this.state!=o.STOPPED&&(this.state=o.STOPPED,this.trigger("StateChanged"),this.trigger("CancelUpload"))},disableBrowse:function(){v=arguments[0]!==n?arguments[0]:!0,c.length&&o.each(c,function(e){e.disable(v)}),this.trigger("DisableBrowse",v)},getFile:function(e){var t;for(t=f.length-1;t>=0;t--)if(f[t].id===e)return f[t]},addFile:function(e,n){function l(e,n){var r=[];t.each(s.settings.filters,function(t,n){i[n]&&r.push(function(r){i[n].call(s,t,e,function(e){r(!e)})})}),t.inSeries(r,n)}function c(e){var i=t.typeOf(e);if(e instanceof t.File){if(!e.ruid&&!e.isDetached()){if(!f)return!1;e.ruid=f,e.connectRuntime(f)}c(new o.File(e))}else e instanceof t.Blob?(c(e.getSource()),e.destroy()):e instanceof o.File?(n&&(e.name=n),u.push(function(t){l(e,function(n){n||(a.push(e),s.trigger("FileFiltered",e)),r(t,1)})})):t.inArray(i,["file","blob"])!==-1?c(new t.File(null,e)):i==="node"&&t.typeOf(e.files)==="filelist"?t.each(e.files,c):i==="array"&&(n=null,t.each(e,c))}var s=this,u=[],a=[],f;f=w(),c(e),u.length&&t.inSeries(u,function(){a.length&&s.trigger("FilesAdded",a)})},removeFile:function(e){var t=typeof e=="string"?e:e.id;for(var n=f.length-1;n>=0;n--)if(f[n].id===t)return this.splice(n,1)[0]},splice:function(e,t){var r=f.splice(e===n?0:e,t===n?f.length:t),i=!1;return this.state==o.STARTED&&(i=!0,this.stop()),this.trigger("FilesRemoved",r),o.each(r,function(e){e.destroy()}),this.trigger("QueueChanged"),this.refresh(),i&&this.start(),r},bind:function(e,t,n){var r=this;o.Uploader.prototype.bind.call(this,e,function(){var e=[].slice.call(arguments);return e.splice(0,1,r),t.apply(this,e)},0,n)},destroy:function(){this.trigger("Destroy"),a=d=null,this.unbindAll()}})},o.Uploader.prototype=t.EventTarget.instance,o.File=function(){function n(n){o.extend(this,{id:o.guid(),name:n.name||n.fileName,type:n.type||"",size:n.size||n.fileSize,origSize:n.size||n.fileSize,loaded:0,percent:0,status:o.QUEUED,lastModifiedDate:n.lastModifiedDate||(new Date).toLocaleString(),getNative:function(){var e=this.getSource().getSource();return t.inArray(t.typeOf(e),["blob","file"])!==-1?e:null},getSource:function(){return e[this.id]?e[this.id]:null},destroy:function(){var t=this.getSource();t&&(t.destroy(),delete e[this.id])}}),e[this.id]=n}var e={};return n}(),o.QueueProgress=function(){var e=this;e.size=0,e.loaded=0,e.uploaded=0,e.failed=0,e.queued=0,e.percent=0,e.bytesPerSec=0,e.reset=function(){e.size=e.loaded=e.uploaded=e.failed=e.queued=e.percent=e.bytesPerSec=0}},e.plupload=o})(window,mOxie); \ No newline at end of file
diff --git a/phpBB/bin/phpbbcli.php b/phpBB/bin/phpbbcli.php
new file mode 100755
index 0000000000..49f4ca13e7
--- /dev/null
+++ b/phpBB/bin/phpbbcli.php
@@ -0,0 +1,36 @@
+#!/usr/bin/env php
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+if (php_sapi_name() != 'cli')
+{
+ echo 'This program must be run from the command line.' . PHP_EOL;
+ exit(1);
+}
+
+define('IN_PHPBB', true);
+$phpbb_root_path = __DIR__ . '/../';
+$phpEx = substr(strrchr(__FILE__, '.'), 1);
+require($phpbb_root_path . 'includes/startup.' . $phpEx);
+require($phpbb_root_path . 'config.' . $phpEx);
+require($phpbb_root_path . 'includes/constants.' . $phpEx);
+require($phpbb_root_path . 'includes/functions.' . $phpEx);
+require($phpbb_root_path . 'includes/functions_container.' . $phpEx);
+require($phpbb_root_path . 'phpbb/class_loader.' . $phpEx);
+
+$phpbb_class_loader = new \phpbb\class_loader('phpbb\\', "{$phpbb_root_path}phpbb/", $phpEx);
+$phpbb_class_loader->register();
+$phpbb_class_loader_ext = new \phpbb\class_loader('\\', "{$phpbb_root_path}ext/", $phpEx);
+$phpbb_class_loader_ext->register();
+
+$phpbb_container = phpbb_create_update_container($phpbb_root_path, $phpEx, "$phpbb_root_path/config");
+
+$application = new \phpbb\console\application('phpBB Console', PHPBB_VERSION);
+$application->register_container_commands($phpbb_container);
+$application->run();
diff --git a/phpBB/common.php b/phpBB/common.php
index 31ca746924..b1da2215fb 100644
--- a/phpBB/common.php
+++ b/phpBB/common.php
@@ -2,11 +2,10 @@
/**
*
* @package phpBB3
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
-* Minimum Requirement: PHP 4.3.3
+* Minimum Requirement: PHP 5.3.3
*/
/**
@@ -45,8 +44,11 @@ if (!defined('PHPBB_INSTALLED'))
// Replace any number of consecutive backslashes and/or slashes with a single slash
// (could happen on some proxy setups and/or Windows servers)
$script_path = preg_replace('#[\\\\/]{2,}#', '/', $script_path);
+
// Eliminate . and .. from the path
- $script_path = phpbb_clean_path($script_path);
+ require($phpbb_root_path . 'phpbb/filesystem.' . $phpEx);
+ $phpbb_filesystem = new phpbb\filesystem();
+ $script_path = $phpbb_filesystem->clean_path($script_path);
$url = (($secure) ? 'https://' : 'http://') . $server_name;
@@ -64,67 +66,91 @@ if (!defined('PHPBB_INSTALLED'))
exit;
}
-if (defined('DEBUG_EXTRA'))
-{
- $base_memory_usage = 0;
- if (function_exists('memory_get_usage'))
- {
- $base_memory_usage = memory_get_usage();
- }
-}
-
-// Load Extensions
-// dl() is deprecated and disabled by default as of PHP 5.3.
-if (!empty($load_extensions) && function_exists('dl'))
-{
- $load_extensions = explode(',', $load_extensions);
-
- foreach ($load_extensions as $extension)
- {
- @dl(trim($extension));
- }
-}
+// In case $phpbb_adm_relative_path is not set (in case of an update), use the default.
+$phpbb_adm_relative_path = (isset($phpbb_adm_relative_path)) ? $phpbb_adm_relative_path : 'adm/';
+$phpbb_admin_path = (defined('PHPBB_ADMIN_PATH')) ? PHPBB_ADMIN_PATH : $phpbb_root_path . $phpbb_adm_relative_path;
// Include files
-require($phpbb_root_path . 'includes/acm/acm_' . $acm_type . '.' . $phpEx);
-require($phpbb_root_path . 'includes/cache.' . $phpEx);
-require($phpbb_root_path . 'includes/template.' . $phpEx);
-require($phpbb_root_path . 'includes/session.' . $phpEx);
-require($phpbb_root_path . 'includes/auth.' . $phpEx);
+require($phpbb_root_path . 'phpbb/class_loader.' . $phpEx);
require($phpbb_root_path . 'includes/functions.' . $phpEx);
require($phpbb_root_path . 'includes/functions_content.' . $phpEx);
+require($phpbb_root_path . 'includes/functions_container.' . $phpEx);
+include($phpbb_root_path . 'includes/functions_compatibility.' . $phpEx);
require($phpbb_root_path . 'includes/constants.' . $phpEx);
-require($phpbb_root_path . 'includes/db/' . $dbms . '.' . $phpEx);
require($phpbb_root_path . 'includes/utf/utf_tools.' . $phpEx);
// Set PHP error handler to ours
set_error_handler(defined('PHPBB_MSG_HANDLER') ? PHPBB_MSG_HANDLER : 'msg_handler');
-// Instantiate some basic classes
-$user = new user();
-$auth = new auth();
-$template = new template();
-$cache = new cache();
-$db = new $sql_db();
+// Setup class loader first
+$phpbb_class_loader = new \phpbb\class_loader('phpbb\\', "{$phpbb_root_path}phpbb/", $phpEx);
+$phpbb_class_loader->register();
+$phpbb_class_loader_ext = new \phpbb\class_loader('\\', "{$phpbb_root_path}ext/", $phpEx);
+$phpbb_class_loader_ext->register();
+
+// Set up container
+$phpbb_container = phpbb_create_default_container($phpbb_root_path, $phpEx);
-// Connect to DB
-$db->sql_connect($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, false, defined('PHPBB_DB_NEW_LINK') ? PHPBB_DB_NEW_LINK : false);
+$phpbb_class_loader->set_cache($phpbb_container->get('cache.driver'));
+$phpbb_class_loader_ext->set_cache($phpbb_container->get('cache.driver'));
-// We do not need this any longer, unset for safety purposes
-unset($dbpasswd);
+// set up caching
+$cache = $phpbb_container->get('cache');
+
+// Instantiate some basic classes
+$phpbb_dispatcher = $phpbb_container->get('dispatcher');
+$request = $phpbb_container->get('request');
+$user = $phpbb_container->get('user');
+$auth = $phpbb_container->get('auth');
+$db = $phpbb_container->get('dbal.conn');
+
+// make sure request_var uses this request instance
+request_var('', 0, false, false, $request); // "dependency injection" for a function
// Grab global variables, re-cache if necessary
-$config = $cache->obtain_config();
+$config = $phpbb_container->get('config');
+set_config(null, null, null, $config);
+set_config_count(null, null, null, $config);
+
+$phpbb_log = $phpbb_container->get('log');
+$symfony_request = $phpbb_container->get('symfony_request');
+$phpbb_filesystem = $phpbb_container->get('filesystem');
+$phpbb_path_helper = $phpbb_container->get('path_helper');
+
+// load extensions
+$phpbb_extension_manager = $phpbb_container->get('ext.manager');
+$phpbb_subscriber_loader = $phpbb_container->get('event.subscriber_loader');
+
+$template = $phpbb_container->get('template');
// Add own hook handler
require($phpbb_root_path . 'includes/hooks/index.' . $phpEx);
-$phpbb_hook = new phpbb_hook(array('exit_handler', 'phpbb_user_session_handler', 'append_sid', array('template', 'display')));
+$phpbb_hook = new phpbb_hook(array('exit_handler', 'phpbb_user_session_handler', 'append_sid', array('\phpbb\template\template', 'display')));
+$phpbb_hook_finder = $phpbb_container->get('hook_finder');
-foreach ($cache->obtain_hooks() as $hook)
+foreach ($phpbb_hook_finder->find() as $hook)
{
@include($phpbb_root_path . 'includes/hooks/' . $hook . '.' . $phpEx);
}
-?> \ No newline at end of file
+if (!$config['use_system_cron'])
+{
+ $cron = $phpbb_container->get('cron.manager');
+}
+
+/**
+* Main event which is triggered on every page
+*
+* You can use this event to load function files and initiate objects
+*
+* NOTE: At this point the global session ($user) and permissions ($auth)
+* do NOT exist yet. If you need to use the user object
+* (f.e. to include language files) or need to check permissions,
+* please use the core.user_setup event instead!
+*
+* @event core.common
+* @since 3.1-A1
+*/
+$phpbb_dispatcher->dispatch('core.common');
diff --git a/phpBB/composer.json b/phpBB/composer.json
index 4b3fe8ebb3..3cf83a8fe9 100644
--- a/phpBB/composer.json
+++ b/phpBB/composer.json
@@ -1,8 +1,21 @@
{
+ "minimum-stability": "beta",
+ "require": {
+ "lusitanian/oauth": "0.2.*",
+ "symfony/config": "2.3.*",
+ "symfony/console": "2.3.*",
+ "symfony/dependency-injection": "2.3.*",
+ "symfony/event-dispatcher": "2.3.*",
+ "symfony/http-kernel": "2.3.*",
+ "symfony/routing": "2.3.*",
+ "symfony/yaml": "2.3.*",
+ "twig/twig": "1.13.*"
+ },
"require-dev": {
"fabpot/goutte": "1.0.*",
"phpunit/dbunit": "1.2.*",
"phpunit/phpunit": "3.7.*",
- "phing/phing": "2.4.*"
+ "phing/phing": "2.4.*",
+ "squizlabs/php_codesniffer": "1.*"
}
}
diff --git a/phpBB/composer.lock b/phpBB/composer.lock
index 61ba0fdebc..c0eb7afcbb 100644
--- a/phpBB/composer.lock
+++ b/phpBB/composer.lock
@@ -3,9 +3,698 @@
"This file locks the dependencies of your project to a known state",
"Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file"
],
- "hash": "ec5fbbc971057677b452c4600e7501c6",
+ "hash": "cc83663b780856890f787b9b4d6ea474",
"packages": [
-
+ {
+ "name": "lusitanian/oauth",
+ "version": "v0.2.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/Lusitanian/PHPoAuthLib.git",
+ "reference": "00c667d93058e983fc1b7d3d1cebdb1bc03fb043"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/Lusitanian/PHPoAuthLib/zipball/00c667d93058e983fc1b7d3d1cebdb1bc03fb043",
+ "reference": "00c667d93058e983fc1b7d3d1cebdb1bc03fb043",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "3.7.*",
+ "predis/predis": "0.8.*@dev",
+ "symfony/http-foundation": "~2.1"
+ },
+ "suggest": {
+ "predis/predis": "Allows using the Redis storage backend.",
+ "symfony/http-foundation": "Allows using the Symfony Session storage backend."
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "0.1-dev"
+ }
+ },
+ "autoload": {
+ "psr-0": {
+ "OAuth": "src",
+ "OAuth\\Unit": "tests"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "David Desberg",
+ "email": "david@daviddesberg.com"
+ },
+ {
+ "name": "Pieter Hordijk",
+ "email": "info@pieterhordijk.com",
+ "homepage": "https://pieterhordijk.com",
+ "role": "developer"
+ }
+ ],
+ "description": "PHP 5.3+ oAuth 1/2 Library",
+ "keywords": [
+ "Authentication",
+ "authorization",
+ "oauth",
+ "security"
+ ],
+ "time": "2013-08-29 21:40:04"
+ },
+ {
+ "name": "psr/log",
+ "version": "1.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/php-fig/log.git",
+ "reference": "fe0936ee26643249e916849d48e3a51d5f5e278b"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/php-fig/log/zipball/fe0936ee26643249e916849d48e3a51d5f5e278b",
+ "reference": "fe0936ee26643249e916849d48e3a51d5f5e278b",
+ "shasum": ""
+ },
+ "type": "library",
+ "autoload": {
+ "psr-0": {
+ "Psr\\Log\\": ""
+ }
+ },
+ "notification-url": "http://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "PHP-FIG",
+ "homepage": "http://www.php-fig.org/"
+ }
+ ],
+ "description": "Common interface for logging libraries",
+ "keywords": [
+ "log",
+ "psr",
+ "psr-3"
+ ],
+ "time": "2012-12-21 11:40:51"
+ },
+ {
+ "name": "symfony/config",
+ "version": "v2.3.4",
+ "target-dir": "Symfony/Component/Config",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/Config.git",
+ "reference": "65a927c15ca5a911ba2fa277a5457fa8129505b0"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/Config/zipball/65a927c15ca5a911ba2fa277a5457fa8129505b0",
+ "reference": "65a927c15ca5a911ba2fa277a5457fa8129505b0",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.3",
+ "symfony/filesystem": "~2.3"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.3-dev"
+ }
+ },
+ "autoload": {
+ "psr-0": {
+ "Symfony\\Component\\Config\\": ""
+ }
+ },
+ "notification-url": "http://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "http://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony Config Component",
+ "homepage": "http://symfony.com",
+ "time": "2013-08-06 05:49:23"
+ },
+ {
+ "name": "symfony/console",
+ "version": "v2.3.6",
+ "target-dir": "Symfony/Component/Console",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/Console.git",
+ "reference": "f880062d56edefb25b36f2defa65aafe65959dc7"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/Console/zipball/f880062d56edefb25b36f2defa65aafe65959dc7",
+ "reference": "f880062d56edefb25b36f2defa65aafe65959dc7",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.3"
+ },
+ "require-dev": {
+ "symfony/event-dispatcher": "~2.1"
+ },
+ "suggest": {
+ "symfony/event-dispatcher": ""
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.3-dev"
+ }
+ },
+ "autoload": {
+ "psr-0": {
+ "Symfony\\Component\\Console\\": ""
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "http://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony Console Component",
+ "homepage": "http://symfony.com",
+ "time": "2013-09-25 06:04:15"
+ },
+ {
+ "name": "symfony/debug",
+ "version": "v2.3.4",
+ "target-dir": "Symfony/Component/Debug",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/Debug.git",
+ "reference": "729f6d19cfc401c4942e43fcc1059103bd6df130"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/Debug/zipball/729f6d19cfc401c4942e43fcc1059103bd6df130",
+ "reference": "729f6d19cfc401c4942e43fcc1059103bd6df130",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.3"
+ },
+ "require-dev": {
+ "symfony/http-foundation": "~2.1",
+ "symfony/http-kernel": "~2.1"
+ },
+ "suggest": {
+ "symfony/class-loader": "",
+ "symfony/http-foundation": "",
+ "symfony/http-kernel": ""
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.3-dev"
+ }
+ },
+ "autoload": {
+ "psr-0": {
+ "Symfony\\Component\\Debug\\": ""
+ }
+ },
+ "notification-url": "http://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "http://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony Debug Component",
+ "homepage": "http://symfony.com",
+ "time": "2013-08-08 14:16:10"
+ },
+ {
+ "name": "symfony/dependency-injection",
+ "version": "v2.3.4",
+ "target-dir": "Symfony/Component/DependencyInjection",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/DependencyInjection.git",
+ "reference": "3678aa969e5bfeb8515a1f3047c63e8104723f5c"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/DependencyInjection/zipball/3678aa969e5bfeb8515a1f3047c63e8104723f5c",
+ "reference": "3678aa969e5bfeb8515a1f3047c63e8104723f5c",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.3"
+ },
+ "require-dev": {
+ "symfony/config": "~2.2",
+ "symfony/yaml": "~2.0"
+ },
+ "suggest": {
+ "symfony/config": "",
+ "symfony/proxy-manager-bridge": "Generate service proxies to lazy load them",
+ "symfony/yaml": ""
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.3-dev"
+ }
+ },
+ "autoload": {
+ "psr-0": {
+ "Symfony\\Component\\DependencyInjection\\": ""
+ }
+ },
+ "notification-url": "http://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "http://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony DependencyInjection Component",
+ "homepage": "http://symfony.com",
+ "time": "2013-07-25 17:13:25"
+ },
+ {
+ "name": "symfony/event-dispatcher",
+ "version": "v2.3.4",
+ "target-dir": "Symfony/Component/EventDispatcher",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/EventDispatcher.git",
+ "reference": "41c9826457c65fa3cf746f214985b7ca9cba42f8"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/EventDispatcher/zipball/41c9826457c65fa3cf746f214985b7ca9cba42f8",
+ "reference": "41c9826457c65fa3cf746f214985b7ca9cba42f8",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.3"
+ },
+ "require-dev": {
+ "symfony/dependency-injection": "~2.0"
+ },
+ "suggest": {
+ "symfony/dependency-injection": "",
+ "symfony/http-kernel": ""
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.3-dev"
+ }
+ },
+ "autoload": {
+ "psr-0": {
+ "Symfony\\Component\\EventDispatcher\\": ""
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "http://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony EventDispatcher Component",
+ "homepage": "http://symfony.com",
+ "time": "2013-07-21 12:12:18"
+ },
+ {
+ "name": "symfony/filesystem",
+ "version": "v2.3.4",
+ "target-dir": "Symfony/Component/Filesystem",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/Filesystem.git",
+ "reference": "87acbbef6d35ba649f96f09cc572c45119b360c3"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/Filesystem/zipball/87acbbef6d35ba649f96f09cc572c45119b360c3",
+ "reference": "87acbbef6d35ba649f96f09cc572c45119b360c3",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.3"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.3-dev"
+ }
+ },
+ "autoload": {
+ "psr-0": {
+ "Symfony\\Component\\Filesystem\\": ""
+ }
+ },
+ "notification-url": "http://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "http://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony Filesystem Component",
+ "homepage": "http://symfony.com",
+ "time": "2013-07-21 12:12:18"
+ },
+ {
+ "name": "symfony/http-foundation",
+ "version": "v2.3.4",
+ "target-dir": "Symfony/Component/HttpFoundation",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/HttpFoundation.git",
+ "reference": "fdf130fe65457aedbc4639a22f4ef9d3be5c002c"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/HttpFoundation/zipball/fdf130fe65457aedbc4639a22f4ef9d3be5c002c",
+ "reference": "fdf130fe65457aedbc4639a22f4ef9d3be5c002c",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.3"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.3-dev"
+ }
+ },
+ "autoload": {
+ "psr-0": {
+ "Symfony\\Component\\HttpFoundation\\": ""
+ },
+ "classmap": [
+ "Symfony/Component/HttpFoundation/Resources/stubs"
+ ]
+ },
+ "notification-url": "http://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "http://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony HttpFoundation Component",
+ "homepage": "http://symfony.com",
+ "time": "2013-08-26 05:49:51"
+ },
+ {
+ "name": "symfony/http-kernel",
+ "version": "v2.3.4",
+ "target-dir": "Symfony/Component/HttpKernel",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/HttpKernel.git",
+ "reference": "9d35da40f07bbe7a4f8dfbc41555d2b69de674bf"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/HttpKernel/zipball/9d35da40f07bbe7a4f8dfbc41555d2b69de674bf",
+ "reference": "9d35da40f07bbe7a4f8dfbc41555d2b69de674bf",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.3",
+ "psr/log": "~1.0",
+ "symfony/debug": "~2.3",
+ "symfony/event-dispatcher": "~2.1",
+ "symfony/http-foundation": "~2.2"
+ },
+ "require-dev": {
+ "symfony/browser-kit": "~2.2",
+ "symfony/class-loader": "~2.1",
+ "symfony/config": "~2.0",
+ "symfony/console": "~2.2",
+ "symfony/dependency-injection": "~2.0",
+ "symfony/finder": "~2.0",
+ "symfony/process": "~2.0",
+ "symfony/routing": "~2.2",
+ "symfony/stopwatch": "~2.2",
+ "symfony/templating": "~2.2"
+ },
+ "suggest": {
+ "symfony/browser-kit": "",
+ "symfony/class-loader": "",
+ "symfony/config": "",
+ "symfony/console": "",
+ "symfony/dependency-injection": "",
+ "symfony/finder": ""
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.3-dev"
+ }
+ },
+ "autoload": {
+ "psr-0": {
+ "Symfony\\Component\\HttpKernel\\": ""
+ }
+ },
+ "notification-url": "http://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "http://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony HttpKernel Component",
+ "homepage": "http://symfony.com",
+ "time": "2013-08-27 08:58:24"
+ },
+ {
+ "name": "symfony/routing",
+ "version": "v2.3.4",
+ "target-dir": "Symfony/Component/Routing",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/Routing.git",
+ "reference": "69af3f07dbf3ae93dd513dbc373f561cb2e7f143"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/Routing/zipball/69af3f07dbf3ae93dd513dbc373f561cb2e7f143",
+ "reference": "69af3f07dbf3ae93dd513dbc373f561cb2e7f143",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.3"
+ },
+ "require-dev": {
+ "doctrine/common": "~2.2",
+ "psr/log": "~1.0",
+ "symfony/config": "~2.2",
+ "symfony/yaml": "~2.0"
+ },
+ "suggest": {
+ "doctrine/common": "",
+ "symfony/config": "",
+ "symfony/yaml": ""
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.3-dev"
+ }
+ },
+ "autoload": {
+ "psr-0": {
+ "Symfony\\Component\\Routing\\": ""
+ }
+ },
+ "notification-url": "http://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "http://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony Routing Component",
+ "homepage": "http://symfony.com",
+ "time": "2013-08-23 15:14:07"
+ },
+ {
+ "name": "symfony/yaml",
+ "version": "v2.3.4",
+ "target-dir": "Symfony/Component/Yaml",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/Yaml.git",
+ "reference": "5a279f1b5f5e1045a6c432354d9ea727ff3a9847"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/Yaml/zipball/5a279f1b5f5e1045a6c432354d9ea727ff3a9847",
+ "reference": "5a279f1b5f5e1045a6c432354d9ea727ff3a9847",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.3"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.3-dev"
+ }
+ },
+ "autoload": {
+ "psr-0": {
+ "Symfony\\Component\\Yaml\\": ""
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "http://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony Yaml Component",
+ "homepage": "http://symfony.com",
+ "time": "2013-08-24 15:26:22"
+ },
+ {
+ "name": "twig/twig",
+ "version": "v1.13.2",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/fabpot/Twig.git",
+ "reference": "6d6a1009427d1f398c9d40904147bf9f723d5755"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/fabpot/Twig/zipball/6d6a1009427d1f398c9d40904147bf9f723d5755",
+ "reference": "6d6a1009427d1f398c9d40904147bf9f723d5755",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.2.4"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.13-dev"
+ }
+ },
+ "autoload": {
+ "psr-0": {
+ "Twig_": "lib/"
+ }
+ },
+ "notification-url": "http://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com"
+ },
+ {
+ "name": "Armin Ronacher",
+ "email": "armin.ronacher@active-4.com"
+ }
+ ],
+ "description": "Twig, the flexible, fast, and secure template language for PHP",
+ "homepage": "http://twig.sensiolabs.org",
+ "keywords": [
+ "templating"
+ ],
+ "time": "2013-08-03 15:35:31"
+ }
],
"packages-dev": [
{
@@ -66,17 +755,17 @@
},
{
"name": "guzzle/common",
- "version": "v3.7.2",
+ "version": "v3.7.3",
"target-dir": "Guzzle/Common",
"source": {
"type": "git",
"url": "https://github.com/guzzle/common.git",
- "reference": "70c8e8a624e2ef1657ce0045d845bee9f46a325e"
+ "reference": "bf73c87375f60861f8c7ccc7b95878023ade5306"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/guzzle/common/zipball/70c8e8a624e2ef1657ce0045d845bee9f46a325e",
- "reference": "70c8e8a624e2ef1657ce0045d845bee9f46a325e",
+ "url": "https://api.github.com/repos/guzzle/common/zipball/bf73c87375f60861f8c7ccc7b95878023ade5306",
+ "reference": "bf73c87375f60861f8c7ccc7b95878023ade5306",
"shasum": ""
},
"require": {
@@ -106,21 +795,21 @@
"event",
"exception"
],
- "time": "2013-08-02 18:31:05"
+ "time": "2013-09-08 21:09:18"
},
{
"name": "guzzle/http",
- "version": "v3.7.2",
+ "version": "v3.7.3",
"target-dir": "Guzzle/Http",
"source": {
"type": "git",
"url": "https://github.com/guzzle/http.git",
- "reference": "a18954489d8af2e04ee9e3bafd3bf703b55459ff"
+ "reference": "1034125dfd906b73119e535f03153a62fccb1989"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/guzzle/http/zipball/a18954489d8af2e04ee9e3bafd3bf703b55459ff",
- "reference": "a18954489d8af2e04ee9e3bafd3bf703b55459ff",
+ "url": "https://api.github.com/repos/guzzle/http/zipball/1034125dfd906b73119e535f03153a62fccb1989",
+ "reference": "1034125dfd906b73119e535f03153a62fccb1989",
"shasum": ""
},
"require": {
@@ -163,11 +852,11 @@
"http",
"http client"
],
- "time": "2013-07-30 22:07:23"
+ "time": "2013-09-06 11:34:26"
},
{
"name": "guzzle/parser",
- "version": "v3.7.2",
+ "version": "v3.7.3",
"target-dir": "Guzzle/Parser",
"source": {
"type": "git",
@@ -211,7 +900,7 @@
},
{
"name": "guzzle/stream",
- "version": "v3.7.2",
+ "version": "v3.7.3",
"target-dir": "Guzzle/Stream",
"source": {
"type": "git",
@@ -374,16 +1063,16 @@
},
{
"name": "phpunit/php-code-coverage",
- "version": "1.2.12",
+ "version": "1.2.13",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
- "reference": "0e9958c459d675fb497d8dc5001c91d335734e48"
+ "reference": "466e7cd2554b4e264c9e3f31216d25ac0e5f3d94"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/0e9958c459d675fb497d8dc5001c91d335734e48",
- "reference": "0e9958c459d675fb497d8dc5001c91d335734e48",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/466e7cd2554b4e264c9e3f31216d25ac0e5f3d94",
+ "reference": "466e7cd2554b4e264c9e3f31216d25ac0e5f3d94",
"shasum": ""
},
"require": {
@@ -431,7 +1120,7 @@
"testing",
"xunit"
],
- "time": "2013-07-06 06:26:16"
+ "time": "2013-09-10 08:14:32"
},
{
"name": "phpunit/php-file-iterator",
@@ -568,16 +1257,16 @@
},
{
"name": "phpunit/php-token-stream",
- "version": "1.2.0",
+ "version": "1.2.1",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-token-stream.git",
- "reference": "31babf400e5b5868573bf49a000a3519d3978233"
+ "reference": "5220af2a7929aa35cf663d97c89ad3d50cf5fa3e"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/31babf400e5b5868573bf49a000a3519d3978233",
- "reference": "31babf400e5b5868573bf49a000a3519d3978233",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/5220af2a7929aa35cf663d97c89ad3d50cf5fa3e",
+ "reference": "5220af2a7929aa35cf663d97c89ad3d50cf5fa3e",
"shasum": ""
},
"require": {
@@ -614,7 +1303,7 @@
"keywords": [
"tokenizer"
],
- "time": "2013-08-04 05:57:48"
+ "time": "2013-09-13 04:58:23"
},
{
"name": "phpunit/phpunit",
@@ -740,6 +1429,76 @@
"time": "2013-01-13 10:24:48"
},
{
+ "name": "squizlabs/php_codesniffer",
+ "version": "1.5.0RC4",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/squizlabs/PHP_CodeSniffer.git",
+ "reference": "146a9b54e4adeaca0a3ae073e0a8a03570d6cc43"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/146a9b54e4adeaca0a3ae073e0a8a03570d6cc43",
+ "reference": "146a9b54e4adeaca0a3ae073e0a8a03570d6cc43",
+ "shasum": ""
+ },
+ "require": {
+ "ext-tokenizer": "*",
+ "php": ">=5.1.2"
+ },
+ "suggest": {
+ "phpunit/php-timer": "dev-master"
+ },
+ "bin": [
+ "scripts/phpcs"
+ ],
+ "type": "library",
+ "autoload": {
+ "classmap": [
+ "CodeSniffer.php",
+ "CodeSniffer/CLI.php",
+ "CodeSniffer/Exception.php",
+ "CodeSniffer/File.php",
+ "CodeSniffer/Report.php",
+ "CodeSniffer/Reporting.php",
+ "CodeSniffer/Sniff.php",
+ "CodeSniffer/Tokens.php",
+ "CodeSniffer/Reports/",
+ "CodeSniffer/CommentParser/",
+ "CodeSniffer/Tokenizers/",
+ "CodeSniffer/DocGenerators/",
+ "CodeSniffer/Standards/AbstractPatternSniff.php",
+ "CodeSniffer/Standards/AbstractScopeSniff.php",
+ "CodeSniffer/Standards/AbstractVariableSniff.php",
+ "CodeSniffer/Standards/IncorrectPatternException.php",
+ "CodeSniffer/Standards/Generic/Sniffs/",
+ "CodeSniffer/Standards/MySource/Sniffs/",
+ "CodeSniffer/Standards/PEAR/Sniffs/",
+ "CodeSniffer/Standards/PSR1/Sniffs/",
+ "CodeSniffer/Standards/PSR2/Sniffs/",
+ "CodeSniffer/Standards/Squiz/Sniffs/",
+ "CodeSniffer/Standards/Zend/Sniffs/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Greg Sherwood",
+ "role": "lead"
+ }
+ ],
+ "description": "PHP_CodeSniffer tokenises PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.",
+ "homepage": "http://www.squizlabs.com/php-codesniffer",
+ "keywords": [
+ "phpcs",
+ "standards"
+ ],
+ "time": "2013-09-26 00:14:02"
+ },
+ {
"name": "symfony/browser-kit",
"version": "v2.3.4",
"target-dir": "Symfony/Component/BrowserKit",
@@ -899,60 +1658,6 @@
"time": "2013-07-21 12:12:18"
},
{
- "name": "symfony/event-dispatcher",
- "version": "v2.3.4",
- "target-dir": "Symfony/Component/EventDispatcher",
- "source": {
- "type": "git",
- "url": "https://github.com/symfony/EventDispatcher.git",
- "reference": "41c9826457c65fa3cf746f214985b7ca9cba42f8"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/symfony/EventDispatcher/zipball/41c9826457c65fa3cf746f214985b7ca9cba42f8",
- "reference": "41c9826457c65fa3cf746f214985b7ca9cba42f8",
- "shasum": ""
- },
- "require": {
- "php": ">=5.3.3"
- },
- "require-dev": {
- "symfony/dependency-injection": "~2.0"
- },
- "suggest": {
- "symfony/dependency-injection": "",
- "symfony/http-kernel": ""
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "2.3-dev"
- }
- },
- "autoload": {
- "psr-0": {
- "Symfony\\Component\\EventDispatcher\\": ""
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Fabien Potencier",
- "email": "fabien@symfony.com"
- },
- {
- "name": "Symfony Community",
- "homepage": "http://symfony.com/contributors"
- }
- ],
- "description": "Symfony EventDispatcher Component",
- "homepage": "http://symfony.com",
- "time": "2013-07-21 12:12:18"
- },
- {
"name": "symfony/finder",
"version": "v2.3.4",
"target-dir": "Symfony/Component/Finder",
@@ -1045,59 +1750,12 @@
"description": "Symfony Process Component",
"homepage": "http://symfony.com",
"time": "2013-08-22 06:42:25"
- },
- {
- "name": "symfony/yaml",
- "version": "v2.3.4",
- "target-dir": "Symfony/Component/Yaml",
- "source": {
- "type": "git",
- "url": "https://github.com/symfony/Yaml.git",
- "reference": "5a279f1b5f5e1045a6c432354d9ea727ff3a9847"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/symfony/Yaml/zipball/5a279f1b5f5e1045a6c432354d9ea727ff3a9847",
- "reference": "5a279f1b5f5e1045a6c432354d9ea727ff3a9847",
- "shasum": ""
- },
- "require": {
- "php": ">=5.3.3"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "2.3-dev"
- }
- },
- "autoload": {
- "psr-0": {
- "Symfony\\Component\\Yaml\\": ""
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Fabien Potencier",
- "email": "fabien@symfony.com"
- },
- {
- "name": "Symfony Community",
- "homepage": "http://symfony.com/contributors"
- }
- ],
- "description": "Symfony Yaml Component",
- "homepage": "http://symfony.com",
- "time": "2013-08-24 15:26:22"
}
],
"aliases": [
],
- "minimum-stability": "stable",
+ "minimum-stability": "beta",
"stability-flags": [
],
diff --git a/phpBB/config/.htaccess b/phpBB/config/.htaccess
new file mode 100644
index 0000000000..4128d345ab
--- /dev/null
+++ b/phpBB/config/.htaccess
@@ -0,0 +1,4 @@
+<Files *>
+ Order Allow,Deny
+ Deny from All
+</Files>
diff --git a/phpBB/config/auth_providers.yml b/phpBB/config/auth_providers.yml
new file mode 100644
index 0000000000..dac8b9d252
--- /dev/null
+++ b/phpBB/config/auth_providers.yml
@@ -0,0 +1,83 @@
+services:
+ auth.provider_collection:
+ class: phpbb\di\service_collection
+ arguments:
+ - @service_container
+ tags:
+ - { name: service_collection, tag: auth.provider }
+ auth.provider.db:
+ class: phpbb\auth\provider\db
+ arguments:
+ - @dbal.conn
+ - @config
+ - @passwords.manager
+ - @request
+ - @user
+ - %core.root_path%
+ - %core.php_ext%
+ tags:
+ - { name: auth.provider }
+ auth.provider.apache:
+ class: phpbb\auth\provider\apache
+ arguments:
+ - @dbal.conn
+ - @config
+ - @passwords.manager
+ - @request
+ - @user
+ - %core.root_path%
+ - %core.php_ext%
+ tags:
+ - { name: auth.provider }
+ auth.provider.ldap:
+ class: phpbb\auth\provider\ldap
+ arguments:
+ - @dbal.conn
+ - @config
+ - @passwords.manager
+ - @user
+ tags:
+ - { name: auth.provider }
+ auth.provider.oauth:
+ class: phpbb\auth\provider\oauth\oauth
+ arguments:
+ - @dbal.conn
+ - @config
+ - @passwords.manager
+ - @request
+ - @user
+ - %tables.auth_provider_oauth_token_storage%
+ - %tables.auth_provider_oauth_account_assoc%
+ - @auth.provider.oauth.service_collection
+ - %tables.users%
+ - %core.root_path%
+ - %core.php_ext%
+ tags:
+ - { name: auth.provider }
+ auth.provider.oauth.service_collection:
+ class: phpbb\di\service_collection
+ arguments:
+ - @service_container
+ tags:
+ - { name: service_collection, tag: auth.provider.oauth.service }
+ auth.provider.oauth.service.bitly:
+ class: phpbb\auth\provider\oauth\service\bitly
+ arguments:
+ - @config
+ - @request
+ tags:
+ - { name: auth.provider.oauth.service }
+ auth.provider.oauth.service.facebook:
+ class: phpbb\auth\provider\oauth\service\facebook
+ arguments:
+ - @config
+ - @request
+ tags:
+ - { name: auth.provider.oauth.service }
+ auth.provider.oauth.service.google:
+ class: phpbb\auth\provider\oauth\service\google
+ arguments:
+ - @config
+ - @request
+ tags:
+ - { name: auth.provider.oauth.service }
diff --git a/phpBB/config/avatars.yml b/phpBB/config/avatars.yml
new file mode 100644
index 0000000000..d22a5db2ae
--- /dev/null
+++ b/phpBB/config/avatars.yml
@@ -0,0 +1,59 @@
+services:
+ avatar.driver.gravatar:
+ class: phpbb\avatar\driver\gravatar
+ arguments:
+ - @config
+ - %core.root_path%
+ - %core.php_ext%
+ - @path_helper
+ - @cache.driver
+ calls:
+ - [set_name, [avatar.driver.gravatar]]
+ tags:
+ - { name: avatar.driver }
+
+ avatar.driver.local:
+ class: phpbb\avatar\driver\local
+ arguments:
+ - @config
+ - %core.root_path%
+ - %core.php_ext%
+ - @path_helper
+ - @cache.driver
+ calls:
+ - [set_name, [avatar.driver.local]]
+ tags:
+ - { name: avatar.driver }
+
+ avatar.driver.remote:
+ class: phpbb\avatar\driver\remote
+ arguments:
+ - @config
+ - %core.root_path%
+ - %core.php_ext%
+ - @path_helper
+ - @cache.driver
+ calls:
+ - [set_name, [avatar.driver.remote]]
+ tags:
+ - { name: avatar.driver }
+
+ avatar.driver.upload:
+ class: phpbb\avatar\driver\upload
+ arguments:
+ - @config
+ - %core.root_path%
+ - %core.php_ext%
+ - @path_helper
+ - @cache.driver
+ calls:
+ - [set_name, [avatar.driver.upload]]
+ tags:
+ - { name: avatar.driver }
+
+ avatar.driver_collection:
+ class: phpbb\di\service_collection
+ arguments:
+ - @service_container
+ tags:
+ - { name: service_collection, tag: avatar.driver }
diff --git a/phpBB/config/console.yml b/phpBB/config/console.yml
new file mode 100644
index 0000000000..a4aae75e40
--- /dev/null
+++ b/phpBB/config/console.yml
@@ -0,0 +1,70 @@
+services:
+ console.command.config.delete:
+ class: phpbb\console\command\config\delete
+ arguments:
+ - @config
+ tags:
+ - { name: console.command }
+
+ console.command.config.increment:
+ class: phpbb\console\command\config\increment
+ arguments:
+ - @config
+ tags:
+ - { name: console.command }
+
+ console.command.config.get:
+ class: phpbb\console\command\config\get
+ arguments:
+ - @config
+ tags:
+ - { name: console.command }
+
+ console.command.config.set:
+ class: phpbb\console\command\config\set
+ arguments:
+ - @config
+ tags:
+ - { name: console.command }
+
+ console.command.config.set_atomic:
+ class: phpbb\console\command\config\set_atomic
+ arguments:
+ - @config
+ tags:
+ - { name: console.command }
+
+ console.command.extension.disable:
+ class: phpbb\console\command\extension\disable
+ arguments:
+ - @ext.manager
+ tags:
+ - { name: console.command }
+
+ console.command.extension.enable:
+ class: phpbb\console\command\extension\enable
+ arguments:
+ - @ext.manager
+ tags:
+ - { name: console.command }
+
+ console.command.extension.purge:
+ class: phpbb\console\command\extension\purge
+ arguments:
+ - @ext.manager
+ tags:
+ - { name: console.command }
+
+ console.command.extension.show:
+ class: phpbb\console\command\extension\show
+ arguments:
+ - @ext.manager
+ tags:
+ - { name: console.command }
+
+ console.command.fixup.recalculate_email_hash:
+ class: phpbb\console\command\fixup\recalculate_email_hash
+ arguments:
+ - @dbal.conn
+ tags:
+ - { name: console.command }
diff --git a/phpBB/config/cron_tasks.yml b/phpBB/config/cron_tasks.yml
new file mode 100644
index 0000000000..fd3aea85dc
--- /dev/null
+++ b/phpBB/config/cron_tasks.yml
@@ -0,0 +1,111 @@
+services:
+ cron.task.core.prune_all_forums:
+ class: phpbb\cron\task\core\prune_all_forums
+ arguments:
+ - %core.root_path%
+ - %core.php_ext%
+ - @config
+ - @dbal.conn
+ calls:
+ - [set_name, [cron.task.core.prune_all_forums]]
+ tags:
+ - { name: cron.task }
+
+ cron.task.core.prune_forum:
+ class: phpbb\cron\task\core\prune_forum
+ arguments:
+ - %core.root_path%
+ - %core.php_ext%
+ - @config
+ - @dbal.conn
+ calls:
+ - [set_name, [cron.task.core.prune_forum]]
+ tags:
+ - { name: cron.task }
+
+ cron.task.core.prune_notifications:
+ class: phpbb\cron\task\core\prune_notifications
+ arguments:
+ - @config
+ - @notification_manager
+ calls:
+ - [set_name, [cron.task.core.prune_notifications]]
+ tags:
+ - { name: cron.task }
+
+ cron.task.core.queue:
+ class: phpbb\cron\task\core\queue
+ arguments:
+ - %core.root_path%
+ - %core.php_ext%
+ - @config
+ calls:
+ - [set_name, [cron.task.core.queue]]
+ tags:
+ - { name: cron.task }
+
+ cron.task.core.tidy_cache:
+ class: phpbb\cron\task\core\tidy_cache
+ arguments:
+ - @config
+ - @cache.driver
+ calls:
+ - [set_name, [cron.task.core.tidy_cache]]
+ tags:
+ - { name: cron.task }
+
+ cron.task.core.tidy_database:
+ class: phpbb\cron\task\core\tidy_database
+ arguments:
+ - %core.root_path%
+ - %core.php_ext%
+ - @config
+ calls:
+ - [set_name, [cron.task.core.tidy_database]]
+ tags:
+ - { name: cron.task }
+
+ cron.task.core.tidy_plupload:
+ class: phpbb\cron\task\core\tidy_plupload
+ arguments:
+ - %core.root_path%
+ - @config
+ calls:
+ - [set_name, [cron.task.core.tidy_plupload]]
+ tags:
+ - { name: cron.task }
+
+ cron.task.core.tidy_search:
+ class: phpbb\cron\task\core\tidy_search
+ arguments:
+ - %core.root_path%
+ - %core.php_ext%
+ - @auth
+ - @config
+ - @dbal.conn
+ - @user
+ calls:
+ - [set_name, [cron.task.core.tidy_search]]
+ tags:
+ - { name: cron.task }
+
+ cron.task.core.tidy_sessions:
+ class: phpbb\cron\task\core\tidy_sessions
+ arguments:
+ - @config
+ - @user
+ calls:
+ - [set_name, [cron.task.core.tidy_sessions]]
+ tags:
+ - { name: cron.task }
+
+ cron.task.core.tidy_warnings:
+ class: phpbb\cron\task\core\tidy_warnings
+ arguments:
+ - %core.root_path%
+ - %core.php_ext%
+ - @config
+ calls:
+ - [set_name, [cron.task.core.tidy_warnings]]
+ tags:
+ - { name: cron.task }
diff --git a/phpBB/config/feed.yml b/phpBB/config/feed.yml
new file mode 100644
index 0000000000..48bd9fe76f
--- /dev/null
+++ b/phpBB/config/feed.yml
@@ -0,0 +1,106 @@
+services:
+ feed.helper:
+ class: phpbb\feed\helper
+ arguments:
+ - @config
+ - @user
+ - %core.root_path%
+ - %core.php_ext%
+
+ feed.factory:
+ class: phpbb\feed\factory
+ arguments:
+ - @service_container
+ - @config
+ - @dbal.conn
+
+ feed.forum:
+ class: phpbb\feed\forum
+ scope: prototype
+ arguments:
+ - @feed.helper
+ - @config
+ - @dbal.conn
+ - @cache.driver
+ - @user
+ - @auth
+ - @content.visibility
+ - %core.php_ext%
+
+ feed.forums:
+ class: phpbb\feed\forums
+ scope: prototype
+ arguments:
+ - @feed.helper
+ - @config
+ - @dbal.conn
+ - @cache.driver
+ - @user
+ - @auth
+ - @content.visibility
+ - %core.php_ext%
+
+ feed.news:
+ class: phpbb\feed\news
+ scope: prototype
+ arguments:
+ - @feed.helper
+ - @config
+ - @dbal.conn
+ - @cache.driver
+ - @user
+ - @auth
+ - @content.visibility
+ - %core.php_ext%
+
+ feed.overall:
+ class: phpbb\feed\overall
+ scope: prototype
+ arguments:
+ - @feed.helper
+ - @config
+ - @dbal.conn
+ - @cache.driver
+ - @user
+ - @auth
+ - @content.visibility
+ - %core.php_ext%
+
+ feed.topic:
+ class: phpbb\feed\topic
+ scope: prototype
+ arguments:
+ - @feed.helper
+ - @config
+ - @dbal.conn
+ - @cache.driver
+ - @user
+ - @auth
+ - @content.visibility
+ - %core.php_ext%
+
+ feed.topics:
+ class: phpbb\feed\topics
+ scope: prototype
+ arguments:
+ - @feed.helper
+ - @config
+ - @dbal.conn
+ - @cache.driver
+ - @user
+ - @auth
+ - @content.visibility
+ - %core.php_ext%
+
+ feed.topics_active:
+ class: phpbb\feed\topics_active
+ scope: prototype
+ arguments:
+ - @feed.helper
+ - @config
+ - @dbal.conn
+ - @cache.driver
+ - @user
+ - @auth
+ - @content.visibility
+ - %core.php_ext%
diff --git a/phpBB/config/migrator.yml b/phpBB/config/migrator.yml
new file mode 100644
index 0000000000..202421c09f
--- /dev/null
+++ b/phpBB/config/migrator.yml
@@ -0,0 +1,53 @@
+services:
+ migrator:
+ class: phpbb\db\migrator
+ arguments:
+ - @config
+ - @dbal.conn
+ - @dbal.tools
+ - %tables.migrations%
+ - %core.root_path%
+ - %core.php_ext%
+ - %core.table_prefix%
+ - @migrator.tool_collection
+ - @migrator.helper
+
+ migrator.helper:
+ class: phpbb\db\migration\helper
+
+ migrator.tool_collection:
+ class: phpbb\di\service_collection
+ arguments:
+ - @service_container
+ tags:
+ - { name: service_collection, tag: migrator.tool }
+
+ migrator.tool.config:
+ class: phpbb\db\migration\tool\config
+ arguments:
+ - @config
+ tags:
+ - { name: migrator.tool }
+
+ migrator.tool.module:
+ class: phpbb\db\migration\tool\module
+ arguments:
+ - @dbal.conn
+ - @cache
+ - @user
+ - %core.root_path%
+ - %core.php_ext%
+ - %tables.modules%
+ tags:
+ - { name: migrator.tool }
+
+ migrator.tool.permission:
+ class: phpbb\db\migration\tool\permission
+ arguments:
+ - @dbal.conn
+ - @cache
+ - @auth
+ - %core.root_path%
+ - %core.php_ext%
+ tags:
+ - { name: migrator.tool }
diff --git a/phpBB/config/mimetype_guessers.yml b/phpBB/config/mimetype_guessers.yml
new file mode 100644
index 0000000000..0115146deb
--- /dev/null
+++ b/phpBB/config/mimetype_guessers.yml
@@ -0,0 +1,43 @@
+parameters:
+ mimetype.guesser.priority.lowest: -2
+ mimetype.guesser.priority.low: -1
+ mimetype.guesser.priority.default: 0
+ mimetype.guesser.priority.high: 1
+ mimetype.guesser.priority.highest: 2
+
+services:
+ mimetype.fileinfo_mimetype_guesser:
+ class: Symfony\Component\HttpFoundation\File\MimeType\FileinfoMimeTypeGuesser
+ tags:
+ - { name: mimetype.guessers }
+
+ mimetype.filebinary_mimetype_guesser:
+ class: Symfony\Component\HttpFoundation\File\MimeType\FileBinaryMimeTypeGuesser
+ tags:
+ - { name: mimetype.guessers }
+
+ mimetype.content_guesser:
+ class: phpbb\mimetype\content_guesser
+ calls:
+ - [set_priority, [%mimetype.guesser.priority.low%]]
+ tags:
+ - { name: mimetype.guessers }
+
+ mimetype.extension_guesser:
+ class: phpbb\mimetype\extension_guesser
+ calls:
+ - [set_priority, [%mimetype.guesser.priority.lowest%]]
+ tags:
+ - { name: mimetype.guessers }
+
+ mimetype.guesser_collection:
+ class: phpbb\di\service_collection
+ arguments:
+ - @service_container
+ tags:
+ - { name: service_collection, tag: mimetype.guessers }
+
+ mimetype.guesser:
+ class: phpbb\mimetype\guesser
+ arguments:
+ - @mimetype.guesser_collection
diff --git a/phpBB/config/notifications.yml b/phpBB/config/notifications.yml
new file mode 100644
index 0000000000..5675e76a99
--- /dev/null
+++ b/phpBB/config/notifications.yml
@@ -0,0 +1,368 @@
+services:
+ notification.type_collection:
+ class: phpbb\di\service_collection
+ arguments:
+ - @service_container
+ tags:
+ - { name: service_collection, tag: notification.type }
+
+ notification.method_collection:
+ class: phpbb\di\service_collection
+ arguments:
+ - @service_container
+ tags:
+ - { name: service_collection, tag: notification.method }
+
+ notification.type.approve_post:
+ class: phpbb\notification\type\approve_post
+ scope: prototype # scope MUST be prototype for this to work! # scope MUST be prototype for this to work!
+ arguments:
+ - @user_loader
+ - @dbal.conn
+ - @cache.driver
+ - @user
+ - @auth
+ - @config
+ - %core.root_path%
+ - %core.php_ext%
+ - %tables.notification_types%
+ - %tables.notifications%
+ - %tables.user_notifications%
+ tags:
+ - { name: notification.type }
+
+ notification.type.approve_topic:
+ class: phpbb\notification\type\approve_topic
+ scope: prototype # scope MUST be prototype for this to work!
+ arguments:
+ - @user_loader
+ - @dbal.conn
+ - @cache.driver
+ - @user
+ - @auth
+ - @config
+ - %core.root_path%
+ - %core.php_ext%
+ - %tables.notification_types%
+ - %tables.notifications%
+ - %tables.user_notifications%
+ tags:
+ - { name: notification.type }
+
+ notification.type.bookmark:
+ class: phpbb\notification\type\bookmark
+ scope: prototype # scope MUST be prototype for this to work!
+ arguments:
+ - @user_loader
+ - @dbal.conn
+ - @cache.driver
+ - @user
+ - @auth
+ - @config
+ - %core.root_path%
+ - %core.php_ext%
+ - %tables.notification_types%
+ - %tables.notifications%
+ - %tables.user_notifications%
+ tags:
+ - { name: notification.type }
+
+ notification.type.disapprove_post:
+ class: phpbb\notification\type\disapprove_post
+ scope: prototype # scope MUST be prototype for this to work!
+ arguments:
+ - @user_loader
+ - @dbal.conn
+ - @cache.driver
+ - @user
+ - @auth
+ - @config
+ - %core.root_path%
+ - %core.php_ext%
+ - %tables.notification_types%
+ - %tables.notifications%
+ - %tables.user_notifications%
+ tags:
+ - { name: notification.type }
+
+ notification.type.disapprove_topic:
+ class: phpbb\notification\type\disapprove_topic
+ scope: prototype # scope MUST be prototype for this to work!
+ arguments:
+ - @user_loader
+ - @dbal.conn
+ - @cache.driver
+ - @user
+ - @auth
+ - @config
+ - %core.root_path%
+ - %core.php_ext%
+ - %tables.notification_types%
+ - %tables.notifications%
+ - %tables.user_notifications%
+ tags:
+ - { name: notification.type }
+
+ notification.type.group_request:
+ class: phpbb\notification\type\group_request
+ scope: prototype # scope MUST be prototype for this to work!
+ arguments:
+ - @user_loader
+ - @dbal.conn
+ - @cache.driver
+ - @user
+ - @auth
+ - @config
+ - %core.root_path%
+ - %core.php_ext%
+ - %tables.notification_types%
+ - %tables.notifications%
+ - %tables.user_notifications%
+ tags:
+ - { name: notification.type }
+
+ notification.type.group_request_approved:
+ class: phpbb\notification\type\group_request_approved
+ scope: prototype # scope MUST be prototype for this to work!
+ arguments:
+ - @user_loader
+ - @dbal.conn
+ - @cache.driver
+ - @user
+ - @auth
+ - @config
+ - %core.root_path%
+ - %core.php_ext%
+ - %tables.notification_types%
+ - %tables.notifications%
+ - %tables.user_notifications%
+ tags:
+ - { name: notification.type }
+
+ notification.type.pm:
+ class: phpbb\notification\type\pm
+ scope: prototype # scope MUST be prototype for this to work!
+ arguments:
+ - @user_loader
+ - @dbal.conn
+ - @cache.driver
+ - @user
+ - @auth
+ - @config
+ - %core.root_path%
+ - %core.php_ext%
+ - %tables.notification_types%
+ - %tables.notifications%
+ - %tables.user_notifications%
+ tags:
+ - { name: notification.type }
+
+ notification.type.post:
+ class: phpbb\notification\type\post
+ scope: prototype # scope MUST be prototype for this to work!
+ arguments:
+ - @user_loader
+ - @dbal.conn
+ - @cache.driver
+ - @user
+ - @auth
+ - @config
+ - %core.root_path%
+ - %core.php_ext%
+ - %tables.notification_types%
+ - %tables.notifications%
+ - %tables.user_notifications%
+ tags:
+ - { name: notification.type }
+
+ notification.type.post_in_queue:
+ class: phpbb\notification\type\post_in_queue
+ scope: prototype # scope MUST be prototype for this to work!
+ arguments:
+ - @user_loader
+ - @dbal.conn
+ - @cache.driver
+ - @user
+ - @auth
+ - @config
+ - %core.root_path%
+ - %core.php_ext%
+ - %tables.notification_types%
+ - %tables.notifications%
+ - %tables.user_notifications%
+ tags:
+ - { name: notification.type }
+
+ notification.type.quote:
+ class: phpbb\notification\type\quote
+ scope: prototype # scope MUST be prototype for this to work!
+ arguments:
+ - @user_loader
+ - @dbal.conn
+ - @cache.driver
+ - @user
+ - @auth
+ - @config
+ - %core.root_path%
+ - %core.php_ext%
+ - %tables.notification_types%
+ - %tables.notifications%
+ - %tables.user_notifications%
+ tags:
+ - { name: notification.type }
+
+ notification.type.report_pm:
+ class: phpbb\notification\type\report_pm
+ scope: prototype # scope MUST be prototype for this to work!
+ arguments:
+ - @user_loader
+ - @dbal.conn
+ - @cache.driver
+ - @user
+ - @auth
+ - @config
+ - %core.root_path%
+ - %core.php_ext%
+ - %tables.notification_types%
+ - %tables.notifications%
+ - %tables.user_notifications%
+ tags:
+ - { name: notification.type }
+
+ notification.type.report_pm_closed:
+ class: phpbb\notification\type\report_pm_closed
+ scope: prototype # scope MUST be prototype for this to work!
+ arguments:
+ - @user_loader
+ - @dbal.conn
+ - @cache.driver
+ - @user
+ - @auth
+ - @config
+ - %core.root_path%
+ - %core.php_ext%
+ - %tables.notification_types%
+ - %tables.notifications%
+ - %tables.user_notifications%
+ tags:
+ - { name: notification.type }
+
+ notification.type.report_post:
+ class: phpbb\notification\type\report_post
+ scope: prototype # scope MUST be prototype for this to work!
+ arguments:
+ - @user_loader
+ - @dbal.conn
+ - @cache.driver
+ - @user
+ - @auth
+ - @config
+ - %core.root_path%
+ - %core.php_ext%
+ - %tables.notification_types%
+ - %tables.notifications%
+ - %tables.user_notifications%
+ tags:
+ - { name: notification.type }
+
+ notification.type.report_post_closed:
+ class: phpbb\notification\type\report_post_closed
+ scope: prototype # scope MUST be prototype for this to work!
+ arguments:
+ - @user_loader
+ - @dbal.conn
+ - @cache.driver
+ - @user
+ - @auth
+ - @config
+ - %core.root_path%
+ - %core.php_ext%
+ - %tables.notification_types%
+ - %tables.notifications%
+ - %tables.user_notifications%
+ tags:
+ - { name: notification.type }
+
+ notification.type.topic:
+ class: phpbb\notification\type\topic
+ scope: prototype # scope MUST be prototype for this to work!
+ arguments:
+ - @user_loader
+ - @dbal.conn
+ - @cache.driver
+ - @user
+ - @auth
+ - @config
+ - %core.root_path%
+ - %core.php_ext%
+ - %tables.notification_types%
+ - %tables.notifications%
+ - %tables.user_notifications%
+ tags:
+ - { name: notification.type }
+
+ notification.type.topic_in_queue:
+ class: phpbb\notification\type\topic_in_queue
+ scope: prototype # scope MUST be prototype for this to work!
+ arguments:
+ - @user_loader
+ - @dbal.conn
+ - @cache.driver
+ - @user
+ - @auth
+ - @config
+ - %core.root_path%
+ - %core.php_ext%
+ - %tables.notification_types%
+ - %tables.notifications%
+ - %tables.user_notifications%
+ tags:
+ - { name: notification.type }
+
+ notification.type.admin_activate_user:
+ class: phpbb\notification\type\admin_activate_user
+ scope: prototype # scope MUST be prototype for this to work!
+ arguments:
+ - @user_loader
+ - @dbal.conn
+ - @cache.driver
+ - @user
+ - @auth
+ - @config
+ - %core.root_path%
+ - %core.php_ext%
+ - %tables.notification_types%
+ - %tables.notifications%
+ - %tables.user_notifications%
+ tags:
+ - { name: notification.type }
+
+ notification.method.email:
+ class: phpbb\notification\method\email
+ scope: prototype # scope MUST be prototype for this to work!
+ arguments:
+ - @user_loader
+ - @dbal.conn
+ - @cache.driver
+ - @user
+ - @auth
+ - @config
+ - %core.root_path%
+ - %core.php_ext%
+ tags:
+ - { name: notification.method }
+
+ notification.method.jabber:
+ class: phpbb\notification\method\jabber
+ scope: prototype # scope MUST be prototype for this to work!
+ arguments:
+ - @user_loader
+ - @dbal.conn
+ - @cache.driver
+ - @user
+ - @auth
+ - @config
+ - %core.root_path%
+ - %core.php_ext%
+ tags:
+ - { name: notification.method }
diff --git a/phpBB/config/passwords.yml b/phpBB/config/passwords.yml
new file mode 100644
index 0000000000..9e249a2c12
--- /dev/null
+++ b/phpBB/config/passwords.yml
@@ -0,0 +1,62 @@
+parameters:
+ passwords.algorithms:
+ - passwords.driver.bcrypt_2y
+ - passwords.driver.bcrypt
+ - passwords.driver.salted_md5
+ - passwords.driver.phpass
+
+services:
+ passwords.driver.bcrypt:
+ class: phpbb\passwords\driver\bcrypt
+ arguments:
+ - @config
+ - @passwords.driver_helper
+ tags:
+ - { name: passwords.driver }
+
+ passwords.driver.bcrypt_2y:
+ class: phpbb\passwords\driver\bcrypt_2y
+ arguments:
+ - @config
+ - @passwords.driver_helper
+ tags:
+ - { name: passwords.driver }
+
+ passwords.driver.salted_md5:
+ class: phpbb\passwords\driver\salted_md5
+ arguments:
+ - @config
+ - @passwords.driver_helper
+ tags:
+ - { name: passwords.driver }
+
+ passwords.driver.phpass:
+ class: phpbb\passwords\driver\phpass
+ arguments:
+ - @config
+ - @passwords.driver_helper
+ tags:
+ - { name: passwords.driver }
+
+ passwords.driver_collection:
+ class: phpbb\di\service_collection
+ arguments:
+ - @service_container
+ tags:
+ - { name: service_collection, tag: passwords.driver }
+
+ passwords.driver_helper:
+ class: phpbb\passwords\driver\helper
+ arguments:
+ - @config
+
+ passwords.manager:
+ class: phpbb\passwords\manager
+ arguments:
+ - @config
+ - @passwords.driver_collection
+ - @passwords.helper
+ - %passwords.algorithms%
+
+ passwords.helper:
+ class: phpbb\passwords\helper
diff --git a/phpBB/config/profilefields.yml b/phpBB/config/profilefields.yml
new file mode 100644
index 0000000000..d12a1f8a37
--- /dev/null
+++ b/phpBB/config/profilefields.yml
@@ -0,0 +1,91 @@
+services:
+ profilefields.manager:
+ class: phpbb\profilefields\manager
+ arguments:
+ - @auth
+ - @dbal.conn
+ - @request
+ - @template
+ - @profilefields.type_collection
+ - @user
+ - %tables.profile_fields%
+ - %tables.profile_fields_language%
+ - %tables.profile_fields_data%
+
+ profilefields.lang_helper:
+ class: phpbb\profilefields\lang_helper
+ arguments:
+ - @dbal.conn
+ - %tables.profile_fields_options_language%
+
+ profilefields.type_collection:
+ class: phpbb\di\service_collection
+ arguments:
+ - @service_container
+ tags:
+ - { name: service_collection, tag: profilefield.type }
+
+ profilefields.type.bool:
+ class: phpbb\profilefields\type\type_bool
+ arguments:
+ - @profilefields.lang_helper
+ - @request
+ - @template
+ - @user
+ tags:
+ - { name: profilefield.type }
+
+ profilefields.type.date:
+ class: phpbb\profilefields\type\type_date
+ arguments:
+ - @request
+ - @template
+ - @user
+ tags:
+ - { name: profilefield.type }
+
+ profilefields.type.dropdown:
+ class: phpbb\profilefields\type\type_dropdown
+ arguments:
+ - @profilefields.lang_helper
+ - @request
+ - @template
+ - @user
+ tags:
+ - { name: profilefield.type }
+
+ profilefields.type.int:
+ class: phpbb\profilefields\type\type_int
+ arguments:
+ - @request
+ - @template
+ - @user
+ tags:
+ - { name: profilefield.type }
+
+ profilefields.type.string:
+ class: phpbb\profilefields\type\type_string
+ arguments:
+ - @request
+ - @template
+ - @user
+ tags:
+ - { name: profilefield.type }
+
+ profilefields.type.text:
+ class: phpbb\profilefields\type\type_text
+ arguments:
+ - @request
+ - @template
+ - @user
+ tags:
+ - { name: profilefield.type }
+
+ profilefields.type.url:
+ class: phpbb\profilefields\type\type_url
+ arguments:
+ - @request
+ - @template
+ - @user
+ tags:
+ - { name: profilefield.type }
diff --git a/phpBB/config/routing.yml b/phpBB/config/routing.yml
new file mode 100644
index 0000000000..d8e890d063
--- /dev/null
+++ b/phpBB/config/routing.yml
@@ -0,0 +1,9 @@
+# Structure:
+#
+# foo_controller:
+# pattern: /foo
+# defaults: { _controller: foo_sevice:method }
+#
+# The above will be accessed via app.php?controller=foo and it will
+# instantiate the "foo_service" service and call the "method" method.
+#
diff --git a/phpBB/config/services.yml b/phpBB/config/services.yml
new file mode 100644
index 0000000000..90a2f3b187
--- /dev/null
+++ b/phpBB/config/services.yml
@@ -0,0 +1,334 @@
+imports:
+ - { resource: tables.yml }
+ - { resource: cron_tasks.yml }
+ - { resource: notifications.yml }
+ - { resource: migrator.yml }
+ - { resource: avatars.yml }
+ - { resource: feed.yml }
+ - { resource: auth_providers.yml }
+ - { resource: console.yml }
+ - { resource: mimetype_guessers.yml }
+ - { resource: passwords.yml }
+ - { resource: profilefields.yml }
+
+services:
+ acl.permissions:
+ class: phpbb\permissions
+ arguments:
+ - @dispatcher
+ - @user
+
+ auth:
+ class: phpbb\auth\auth
+
+ avatar.manager:
+ class: phpbb\avatar\manager
+ arguments:
+ - @config
+ - @avatar.driver_collection
+
+ cache:
+ class: phpbb\cache\service
+ arguments:
+ - @cache.driver
+ - @config
+ - @dbal.conn
+ - %core.root_path%
+ - %core.php_ext%
+
+ cache.driver:
+ class: %cache.driver.class%
+
+ cache.driver.install:
+ class: phpbb\cache\driver\file
+
+ class_loader:
+ class: phpbb\class_loader
+ arguments:
+ - phpbb\
+ - %core.root_path%includes/
+ - %core.php_ext%
+ calls:
+ - [register, []]
+ - [set_cache, [@cache.driver]]
+
+ class_loader.ext:
+ class: phpbb\class_loader
+ arguments:
+ - \
+ - %core.root_path%ext/
+ - %core.php_ext%
+ calls:
+ - [register, []]
+ - [set_cache, [@cache.driver]]
+
+ config:
+ class: phpbb\config\db
+ arguments:
+ - @dbal.conn
+ - @cache.driver
+ - %tables.config%
+
+ config_text:
+ class: phpbb\config\db_text
+ arguments:
+ - @dbal.conn
+ - %tables.config_text%
+
+ content.visibility:
+ class: phpbb\content_visibility
+ arguments:
+ - @auth
+ - @dbal.conn
+ - @user
+ - %core.root_path%
+ - %core.php_ext%
+ - %tables.forums%
+ - %tables.posts%
+ - %tables.topics%
+ - %tables.users%
+
+ controller.helper:
+ class: phpbb\controller\helper
+ arguments:
+ - @template
+ - @user
+ - @config
+ - @controller.provider
+ - %core.root_path%
+ - %core.php_ext%
+
+ controller.resolver:
+ class: phpbb\controller\resolver
+ arguments:
+ - @user
+ - @service_container
+ - @template
+
+ controller.provider:
+ class: phpbb\controller\provider
+ arguments:
+ - @ext.finder
+ calls:
+ - [find, [%core.root_path%]]
+
+ cron.task_collection:
+ class: phpbb\di\service_collection
+ arguments:
+ - @service_container
+ tags:
+ - { name: service_collection, tag: cron.task }
+
+ cron.manager:
+ class: phpbb\cron\manager
+ arguments:
+ - @cron.task_collection
+ - %core.root_path%
+ - %core.php_ext%
+
+ cron.lock_db:
+ class: phpbb\lock\db
+ arguments:
+ - cron_lock
+ - @config
+ - @dbal.conn
+
+ dispatcher:
+ class: phpbb\event\dispatcher
+ arguments:
+ - @service_container
+
+ dbal.conn:
+ class: %dbal.driver.class%
+ calls:
+ - [sql_connect, [%dbal.dbhost%, %dbal.dbuser%, %dbal.dbpasswd%, %dbal.dbname%, %dbal.dbport%, false, %dbal.new_link%]]
+
+ dbal.tools:
+ class: phpbb\db\tools
+ arguments:
+ - @dbal.conn
+
+ event.subscriber_loader:
+ class: phpbb\event\extension_subscriber_loader
+ arguments:
+ - @dispatcher
+ - @event.listener_collection
+ calls:
+ - [load, []]
+
+ event.listener_collection:
+ class: phpbb\di\service_collection
+ arguments:
+ - @service_container
+ tags:
+ - { name: service_collection, tag: event.listener }
+
+ ext.manager:
+ class: phpbb\extension\manager
+ arguments:
+ - @service_container
+ - @dbal.conn
+ - @config
+ - @filesystem
+ - %tables.ext%
+ - %core.root_path%
+ - %core.php_ext%
+ - @cache.driver
+
+ ext.finder:
+ class: phpbb\extension\finder
+ arguments:
+ - @ext.manager
+ - @filesystem
+ - %core.root_path%
+ - @cache.driver
+ - %core.php_ext%
+ - _ext_finder
+
+ filesystem:
+ class: phpbb\filesystem
+
+ groupposition.legend:
+ class: phpbb\groupposition\legend
+ arguments:
+ - @dbal.conn
+ - @user
+
+ groupposition.teampage:
+ class: phpbb\groupposition\teampage
+ arguments:
+ - @dbal.conn
+ - @user
+ - @cache.driver
+
+ http_kernel:
+ class: Symfony\Component\HttpKernel\HttpKernel
+ arguments:
+ - @dispatcher
+ - @controller.resolver
+
+ hook_finder:
+ class: phpbb\hook\finder
+ arguments:
+ - %core.root_path%
+ - %core.php_ext%
+ - @cache.driver
+
+ kernel_request_subscriber:
+ class: phpbb\event\kernel_request_subscriber
+ arguments:
+ - @ext.finder
+ - %core.root_path%
+ - %core.php_ext%
+ tags:
+ - { name: kernel.event_subscriber }
+
+ kernel_exception_subscriber:
+ class: phpbb\event\kernel_exception_subscriber
+ arguments:
+ - @template
+ - @user
+ tags:
+ - { name: kernel.event_subscriber }
+
+ kernel_terminate_subscriber:
+ class: phpbb\event\kernel_terminate_subscriber
+ tags:
+ - { name: kernel.event_subscriber }
+
+ log:
+ class: phpbb\log\log
+ arguments:
+ - @dbal.conn
+ - @user
+ - @auth
+ - @dispatcher
+ - %core.root_path%
+ - %core.adm_relative_path%
+ - %core.php_ext%
+ - %tables.log%
+
+ notification_manager:
+ class: phpbb\notification\manager
+ arguments:
+ - @notification.type_collection
+ - @notification.method_collection
+ - @service_container
+ - @user_loader
+ - @config
+ - @dbal.conn
+ - @cache
+ - @user
+ - %core.root_path%
+ - %core.php_ext%
+ - %tables.notification_types%
+ - %tables.notifications%
+ - %tables.user_notifications%
+
+ pagination:
+ class: phpbb\pagination
+ arguments:
+ - @template
+ - @user
+ - @controller.helper
+
+ path_helper:
+ class: phpbb\path_helper
+ arguments:
+ - @symfony_request
+ - @filesystem
+ - %core.root_path%
+ - %core.php_ext%
+ - %core.adm_relative_path%
+
+ php_ini:
+ class: phpbb\php\ini
+
+ plupload:
+ class: phpbb\plupload\plupload
+ arguments:
+ - %core.root_path%
+ - @config
+ - @request
+ - @user
+ - @php_ini
+ - @mimetype.guesser
+
+ request:
+ class: phpbb\request\request
+
+ symfony_request:
+ class: phpbb\symfony_request
+ arguments:
+ - @request
+
+ template:
+ class: phpbb\template\twig\twig
+ arguments:
+ - @path_helper
+ - @config
+ - @user
+ - @template_context
+ - @ext.manager
+
+ template_context:
+ class: phpbb\template\context
+
+ user:
+ class: phpbb\user
+
+ user_loader:
+ class: phpbb\user_loader
+ arguments:
+ - @dbal.conn
+ - %core.root_path%
+ - %core.php_ext%
+ - %tables.users%
+
+ version_helper:
+ class: phpbb\version_helper
+ scope: prototype
+ arguments:
+ - @cache
+ - @config
+ - @user
diff --git a/phpBB/config/tables.yml b/phpBB/config/tables.yml
new file mode 100644
index 0000000000..e4f7bda89b
--- /dev/null
+++ b/phpBB/config/tables.yml
@@ -0,0 +1,20 @@
+parameters:
+ tables.auth_provider_oauth_token_storage: %core.table_prefix%oauth_tokens
+ tables.auth_provider_oauth_account_assoc: %core.table_prefix%oauth_accounts
+ tables.config: %core.table_prefix%config
+ tables.config_text: %core.table_prefix%config_text
+ tables.ext: %core.table_prefix%ext
+ tables.forums: %core.table_prefix%forums
+ tables.log: %core.table_prefix%log
+ tables.migrations: %core.table_prefix%migrations
+ tables.modules: %core.table_prefix%modules
+ tables.notification_types: %core.table_prefix%notification_types
+ tables.notifications: %core.table_prefix%notifications
+ tables.profile_fields: %core.table_prefix%profile_fields
+ tables.profile_fields_data: %core.table_prefix%profile_fields_data
+ tables.profile_fields_options_language: %core.table_prefix%profile_fields_lang
+ tables.profile_fields_language: %core.table_prefix%profile_lang
+ tables.posts: %core.table_prefix%posts
+ tables.topics: %core.table_prefix%topics
+ tables.user_notifications: %core.table_prefix%user_notifications
+ tables.users: %core.table_prefix%users
diff --git a/phpBB/cron.php b/phpBB/cron.php
index 8000066c92..787183f689 100644
--- a/phpBB/cron.php
+++ b/phpBB/cron.php
@@ -2,9 +2,8 @@
/**
*
* @package phpBB3
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -20,196 +19,89 @@ include($phpbb_root_path . 'common.' . $phpEx);
$user->session_begin(false);
$auth->acl($user->data);
-$cron_type = request_var('cron_type', '');
-
-// Output transparent gif
-header('Cache-Control: no-cache');
-header('Content-type: image/gif');
-header('Content-length: 43');
-
-echo base64_decode('R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==');
+function output_image()
+{
+ // Output transparent gif
+ header('Cache-Control: no-cache');
+ header('Content-type: image/gif');
+ header('Content-length: 43');
-// Flush here to prevent browser from showing the page as loading while running cron.
-flush();
+ echo base64_decode('R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==');
-if (!isset($config['cron_lock']))
-{
- set_config('cron_lock', '0', true);
+ // Flush here to prevent browser from showing the page as loading while
+ // running cron.
+ flush();
}
-// make sure cron doesn't run multiple times in parallel
-if ($config['cron_lock'])
+function do_cron($cron_lock, $run_tasks)
{
- // if the other process is running more than an hour already we have to assume it
- // aborted without cleaning the lock
- $time = explode(' ', $config['cron_lock']);
- $time = $time[0];
+ global $config;
- if ($time + 3600 >= time())
+ foreach ($run_tasks as $task)
{
- exit;
+ if (defined('DEBUG') && $config['use_system_cron'])
+ {
+ echo "[phpBB cron] Running task '{$task->get_name()}'\n";
+ }
+
+ $task->run();
}
-}
-define('CRON_ID', time() . ' ' . unique_id());
+ // Unloading cache and closing db after having done the dirty work.
+ $cron_lock->release();
+ garbage_collection();
+}
-$sql = 'UPDATE ' . CONFIG_TABLE . "
- SET config_value = '" . $db->sql_escape(CRON_ID) . "'
- WHERE config_name = 'cron_lock' AND config_value = '" . $db->sql_escape($config['cron_lock']) . "'";
-$db->sql_query($sql);
+// Thanks to various fatal errors and lack of try/finally, it is quite easy to leave
+// the cron lock locked, especially when working on cron-related code.
+//
+// Attempt to alleviate the problem by doing setup outside of the lock as much as possible.
+//
+// If DEBUG is defined and cron lock cannot be obtained, a message will be printed.
-// another cron process altered the table between script start and UPDATE query so exit
-if ($db->sql_affectedrows() != 1)
+if ($config['use_system_cron'])
{
- exit;
+ $cron = $phpbb_container->get('cron.manager');
}
-
-/**
-* Run cron-like action
-* Real cron-based layer will be introduced in 3.2
-*/
-switch ($cron_type)
+else
{
- case 'queue':
-
- if (time() - $config['queue_interval'] <= $config['last_queue_run'] || !file_exists($phpbb_root_path . 'cache/queue.' . $phpEx))
- {
- break;
- }
-
- include_once($phpbb_root_path . 'includes/functions_messenger.' . $phpEx);
- $queue = new queue();
-
- $queue->process();
-
- break;
-
- case 'tidy_cache':
-
- if (time() - $config['cache_gc'] <= $config['cache_last_gc'] || !method_exists($cache, 'tidy'))
- {
- break;
- }
-
- $cache->tidy();
-
- break;
-
- case 'tidy_search':
-
- // Select the search method
- $search_type = basename($config['search_type']);
-
- if (time() - $config['search_gc'] <= $config['search_last_gc'] || !file_exists($phpbb_root_path . 'includes/search/' . $search_type . '.' . $phpEx))
- {
- break;
- }
-
- include_once("{$phpbb_root_path}includes/search/$search_type.$phpEx");
-
- // We do some additional checks in the module to ensure it can actually be utilised
- $error = false;
- $search = new $search_type($error);
-
- if ($error)
- {
- break;
- }
-
- $search->tidy();
-
- break;
-
- case 'tidy_warnings':
-
- if (time() - $config['warnings_gc'] <= $config['warnings_last_gc'])
- {
- break;
- }
+ $cron_type = request_var('cron_type', '');
- include_once($phpbb_root_path . 'includes/functions_admin.' . $phpEx);
-
- tidy_warnings();
-
- break;
-
- case 'tidy_database':
-
- if (time() - $config['database_gc'] <= $config['database_last_gc'])
- {
- break;
- }
-
- include_once($phpbb_root_path . 'includes/functions_admin.' . $phpEx);
-
- tidy_database();
-
- break;
-
- case 'tidy_sessions':
-
- if (time() - $config['session_gc'] <= $config['session_last_gc'])
- {
- break;
- }
-
- $user->session_gc();
-
- break;
-
- case 'prune_forum':
-
- $forum_id = request_var('f', 0);
-
- $sql = 'SELECT forum_id, prune_next, enable_prune, prune_days, prune_viewed, forum_flags, prune_freq
- FROM ' . FORUMS_TABLE . "
- WHERE forum_id = $forum_id";
- $result = $db->sql_query($sql);
- $row = $db->sql_fetchrow($result);
- $db->sql_freeresult($result);
-
- if (!$row)
- {
- break;
- }
+ // Comment this line out for debugging so the page does not return an image.
+ output_image();
+}
- // Do the forum Prune thang
- if ($row['prune_next'] < time() && $row['enable_prune'])
+$cron_lock = $phpbb_container->get('cron.lock_db');
+if ($cron_lock->acquire())
+{
+ if ($config['use_system_cron'])
+ {
+ $run_tasks = $cron->find_all_ready_tasks();
+ }
+ else
+ {
+ // If invalid task is specified, empty $run_tasks is passed to do_cron which then does nothing
+ $run_tasks = array();
+ $task = $cron->find_task($cron_type);
+ if ($task)
{
- include_once($phpbb_root_path . 'includes/functions_admin.' . $phpEx);
-
- if ($row['prune_days'])
+ if ($task->is_parametrized())
{
- auto_prune($row['forum_id'], 'posted', $row['forum_flags'], $row['prune_days'], $row['prune_freq']);
+ $task->parse_parameters($request);
}
-
- if ($row['prune_viewed'])
+ if ($task->is_ready())
{
- auto_prune($row['forum_id'], 'viewed', $row['forum_flags'], $row['prune_viewed'], $row['prune_freq']);
+ $run_tasks = array($task);
}
}
+ }
- break;
+ do_cron($cron_lock, $run_tasks);
}
-
-// Unloading cache and closing db after having done the dirty work.
-unlock_cron();
-garbage_collection();
-
-exit;
-
-
-/**
-* Unlock cron script
-*/
-function unlock_cron()
+else
{
- global $db;
-
- $sql = 'UPDATE ' . CONFIG_TABLE . "
- SET config_value = '0'
- WHERE config_name = 'cron_lock' AND config_value = '" . $db->sql_escape(CRON_ID) . "'";
- $db->sql_query($sql);
+ if (defined('DEBUG'))
+ {
+ echo "Could not obtain cron lock.\n";
+ }
}
-
-?> \ No newline at end of file
diff --git a/phpBB/develop/add_permissions.php b/phpBB/develop/add_permissions.php
index 6f26bf6ac6..449d931507 100644
--- a/phpBB/develop/add_permissions.php
+++ b/phpBB/develop/add_permissions.php
@@ -409,5 +409,3 @@ function mass_auth($ug_type, $forum_id, $ug_id, $acl_list, $setting)
unset($sql_ary);
}
-
-?> \ No newline at end of file
diff --git a/phpBB/develop/adjust_avatars.php b/phpBB/develop/adjust_avatars.php
index 81599e694b..dc4ae88f37 100644
--- a/phpBB/develop/adjust_avatars.php
+++ b/phpBB/develop/adjust_avatars.php
@@ -143,5 +143,3 @@ function adjust_avatar($old_name, $midfix)
}
return false;
}
-
-?> \ No newline at end of file
diff --git a/phpBB/develop/adjust_bbcodes.php b/phpBB/develop/adjust_bbcodes.php
index f06f0112ab..5a7f065d7f 100644
--- a/phpBB/develop/adjust_bbcodes.php
+++ b/phpBB/develop/adjust_bbcodes.php
@@ -170,5 +170,3 @@ $db->sql_freeresult($result);
// Done
$db->sql_close();
-
-?> \ No newline at end of file
diff --git a/phpBB/develop/adjust_magic_urls.php b/phpBB/develop/adjust_magic_urls.php
index 1430a47a12..c417c755cf 100644
--- a/phpBB/develop/adjust_magic_urls.php
+++ b/phpBB/develop/adjust_magic_urls.php
@@ -122,5 +122,3 @@ $db->sql_freeresult($result);
// Done
$db->sql_close();
-
-?> \ No newline at end of file
diff --git a/phpBB/develop/adjust_sizes.php b/phpBB/develop/adjust_sizes.php
index 7d72813056..9b58389163 100644
--- a/phpBB/develop/adjust_sizes.php
+++ b/phpBB/develop/adjust_sizes.php
@@ -128,5 +128,3 @@ $db->sql_freeresult($result);
// Done
$db->sql_close();
-
-?> \ No newline at end of file
diff --git a/phpBB/develop/adjust_smilies.php b/phpBB/develop/adjust_smilies.php
index 774c8834f6..ecc3461670 100644
--- a/phpBB/develop/adjust_smilies.php
+++ b/phpBB/develop/adjust_smilies.php
@@ -126,5 +126,3 @@ $db->sql_freeresult($result);
// Done
$db->sql_close();
-
-?> \ No newline at end of file
diff --git a/phpBB/develop/adjust_uids.php b/phpBB/develop/adjust_uids.php
index d301f3cadb..3468475b8f 100644
--- a/phpBB/develop/adjust_uids.php
+++ b/phpBB/develop/adjust_uids.php
@@ -126,4 +126,3 @@ $db->sql_freeresult($result);
// Done
$db->sql_close();
echo 'done';
-?> \ No newline at end of file
diff --git a/phpBB/develop/adjust_usernames.php b/phpBB/develop/adjust_usernames.php
index 1afa77af16..111a9a30d7 100644
--- a/phpBB/develop/adjust_usernames.php
+++ b/phpBB/develop/adjust_usernames.php
@@ -48,5 +48,3 @@ echo 'FINISHED';
// Done
$db->sql_close();
-
-?> \ No newline at end of file
diff --git a/phpBB/develop/benchmark.php b/phpBB/develop/benchmark.php
index 5bbe6f53be..27176c97d3 100644
--- a/phpBB/develop/benchmark.php
+++ b/phpBB/develop/benchmark.php
@@ -192,13 +192,13 @@ function get_topic_count($forum_id)
{
global $db;
- $sql = "SELECT forum_topics
+ $sql = "SELECT forum_topics_approved
FROM " . FORUMS_TABLE . "
WHERE (forum_id = $forum_id)";
if($result = $db->sql_query($sql))
{
$row = $db->sql_fetchrow($result);
- $topic_count = $row['forum_topics'];
+ $topic_count = $row['forum_topics_approved'];
unset($result);
unset($row);
@@ -263,7 +263,7 @@ function make_post($new_topic_id, $forum_id, $user_id, $post_username, $text, $m
$post_message = prepare_message($text, $html_on, $bbcode_on, $smilies_on, $bbcode_uid);
- $sql = "INSERT INTO " . POSTS_TABLE . " (topic_id, forum_id, poster_id, attach_id, icon_id, post_username, post_time, poster_ip, post_approved, bbcode_uid, enable_bbcode, enable_html, enable_smilies, enable_sig, post_subject, post_text)
+ $sql = "INSERT INTO " . POSTS_TABLE . " (topic_id, forum_id, poster_id, attach_id, icon_id, post_username, post_time, poster_ip, post_visibility, bbcode_uid, enable_bbcode, enable_html, enable_smilies, enable_sig, post_subject, post_text)
VALUES ($new_topic_id, $forum_id, $user_id, 0, 0, '$post_username', $current_time, '$user_ip', 1, '$bbcode_uid', $bbcode_on, $html_on, $smilies_on, $attach_sig, '$post_subject', '$post_message')";
$result = $db->sql_query($sql);
@@ -282,10 +282,10 @@ function make_post($new_topic_id, $forum_id, $user_id, $post_username, $text, $m
if($db->sql_query($sql))
{
$sql = "UPDATE " . FORUMS_TABLE . "
- SET forum_last_post_id = $new_post_id, forum_posts = forum_posts + 1";
+ SET forum_last_post_id = $new_post_id, forum_posts_approved = forum_posts_approved + 1";
if($mode == "newtopic")
{
- $sql .= ", forum_topics = forum_topics + 1";
+ $sql .= ", forum_topics_approved = forum_topics_approved + 1";
}
$sql .= " WHERE forum_id = $forum_id";
@@ -366,18 +366,10 @@ function make_user($username)
$password = md5("benchpass");
$email = "nobody@localhost";
- $icq = "12345678";
- $website = "http://www.phpbb.com";
- $occupation = "phpBB tester";
- $location = "phpBB world hq";
- $interests = "Eating, sleeping, living, and breathing phpBB";
$signature = "$username: phpBB tester.";
$signature_bbcode_uid = "";
$avatar_filename = "";
$viewemail = 0;
- $aim = 0;
- $yim = 0;
- $msn = 0;
$attachsig = 1;
$allowsmilies = 1;
$allowhtml = 1;
@@ -422,8 +414,8 @@ function make_user($username)
}
- $sql = "INSERT INTO " . USERS_TABLE . " (user_id, username, user_regdate, user_password, user_email, user_icq, user_website, user_occ, user_from, user_interests, user_sig, user_sig_bbcode_uid, user_avatar, user_viewemail, user_aim, user_yim, user_msnm, user_attachsig, user_allowsmilies, user_allowhtml, user_allowbbcode, user_allow_viewonline, user_notify, user_notify_pm, user_timezone, user_dateformat, user_lang, user_style, user_level, user_allow_pm, user_active, user_actkey)
- VALUES ($new_user_id, '$username', " . time() . ", '$password', '$email', '$icq', '$website', '$occupation', '$location', '$interests', '$signature', '$signature_bbcode_uid', '$avatar_filename', $viewemail, '$aim', '$yim', '$msn', $attachsig, $allowsmilies, $allowhtml, $allowbbcode, $allowviewonline, $notifyreply, $notifypm, $user_timezone, '$user_dateformat', '$user_lang', $user_style, 0, 1, ";
+ $sql = "INSERT INTO " . USERS_TABLE . " (user_id, username, user_regdate, user_password, user_email, user_sig, user_sig_bbcode_uid, user_avatar, user_viewemail, user_attachsig, user_allowsmilies, user_allowhtml, user_allowbbcode, user_allow_viewonline, user_notify, user_notify_pm, user_timezone, user_dateformat, user_lang, user_style, user_level, user_allow_pm, user_active, user_actkey)
+ VALUES ($new_user_id, '$username', " . time() . ", '$password', '$email', '$signature', '$signature_bbcode_uid', '$avatar_filename', $viewemail, $attachsig, $allowsmilies, $allowhtml, $allowbbcode, $allowviewonline, $notifyreply, $notifypm, $user_timezone, '$user_dateformat', '$user_lang', $user_style, 0, 1, ";
$sql .= "1, '')";
@@ -458,5 +450,3 @@ function make_user($username)
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/language/en/mods/index.htm b/phpBB/develop/blank.gif
index e69de29bb2..e69de29bb2 100644
--- a/phpBB/language/en/mods/index.htm
+++ b/phpBB/develop/blank.gif
diff --git a/phpBB/styles/prosilver/imageset/en/index.htm b/phpBB/develop/blank.jpg
index e69de29bb2..e69de29bb2 100644
--- a/phpBB/styles/prosilver/imageset/en/index.htm
+++ b/phpBB/develop/blank.jpg
diff --git a/phpBB/develop/calc_email_hash.php b/phpBB/develop/calc_email_hash.php
index fccdfdfca9..c73fd26e17 100644
--- a/phpBB/develop/calc_email_hash.php
+++ b/phpBB/develop/calc_email_hash.php
@@ -68,5 +68,3 @@ do
while ($start);
echo "<p><b>Done</b></p>\n";
-
-?> \ No newline at end of file
diff --git a/phpBB/develop/change_smiley_ref.php b/phpBB/develop/change_smiley_ref.php
index 59ee77b7b1..0a3108947a 100644
--- a/phpBB/develop/change_smiley_ref.php
+++ b/phpBB/develop/change_smiley_ref.php
@@ -46,5 +46,3 @@ while ($row = $db->sql_fetchrow($result))
$db->sql_freeresult($result);
echo "<p><b>Done</b></p>\n";
-
-?> \ No newline at end of file
diff --git a/phpBB/develop/create_schema_files.php b/phpBB/develop/create_schema_files.php
index b5f1202c0d..8e01b3c286 100644
--- a/phpBB/develop/create_schema_files.php
+++ b/phpBB/develop/create_schema_files.php
@@ -12,248 +12,46 @@
*/
$schema_path = dirname(__FILE__) . '/../install/schemas/';
+$supported_dbms = array(
+ 'firebird',
+ 'mssql',
+ 'mysql_40',
+ 'mysql_41',
+ 'oracle',
+ 'postgres',
+ 'sqlite',
+);
if (!is_writable($schema_path))
{
die('Schema path not writable');
}
-$schema_data = get_schema_struct();
-$dbms_type_map = array(
- 'mysql_41' => array(
- 'INT:' => 'int(%d)',
- 'BINT' => 'bigint(20)',
- 'UINT' => 'mediumint(8) UNSIGNED',
- 'UINT:' => 'int(%d) UNSIGNED',
- 'TINT:' => 'tinyint(%d)',
- 'USINT' => 'smallint(4) UNSIGNED',
- 'BOOL' => 'tinyint(1) UNSIGNED',
- 'VCHAR' => 'varchar(255)',
- 'VCHAR:' => 'varchar(%d)',
- 'CHAR:' => 'char(%d)',
- 'XSTEXT' => 'text',
- 'XSTEXT_UNI'=> 'varchar(100)',
- 'STEXT' => 'text',
- 'STEXT_UNI' => 'varchar(255)',
- 'TEXT' => 'text',
- 'TEXT_UNI' => 'text',
- 'MTEXT' => 'mediumtext',
- 'MTEXT_UNI' => 'mediumtext',
- 'TIMESTAMP' => 'int(11) UNSIGNED',
- 'DECIMAL' => 'decimal(5,2)',
- 'DECIMAL:' => 'decimal(%d,2)',
- 'PDECIMAL' => 'decimal(6,3)',
- 'PDECIMAL:' => 'decimal(%d,3)',
- 'VCHAR_UNI' => 'varchar(255)',
- 'VCHAR_UNI:'=> 'varchar(%d)',
- 'VCHAR_CI' => 'varchar(255)',
- 'VARBINARY' => 'varbinary(255)',
- ),
-
- 'mysql_40' => array(
- 'INT:' => 'int(%d)',
- 'BINT' => 'bigint(20)',
- 'UINT' => 'mediumint(8) UNSIGNED',
- 'UINT:' => 'int(%d) UNSIGNED',
- 'TINT:' => 'tinyint(%d)',
- 'USINT' => 'smallint(4) UNSIGNED',
- 'BOOL' => 'tinyint(1) UNSIGNED',
- 'VCHAR' => 'varbinary(255)',
- 'VCHAR:' => 'varbinary(%d)',
- 'CHAR:' => 'binary(%d)',
- 'XSTEXT' => 'blob',
- 'XSTEXT_UNI'=> 'blob',
- 'STEXT' => 'blob',
- 'STEXT_UNI' => 'blob',
- 'TEXT' => 'blob',
- 'TEXT_UNI' => 'blob',
- 'MTEXT' => 'mediumblob',
- 'MTEXT_UNI' => 'mediumblob',
- 'TIMESTAMP' => 'int(11) UNSIGNED',
- 'DECIMAL' => 'decimal(5,2)',
- 'DECIMAL:' => 'decimal(%d,2)',
- 'PDECIMAL' => 'decimal(6,3)',
- 'PDECIMAL:' => 'decimal(%d,3)',
- 'VCHAR_UNI' => 'blob',
- 'VCHAR_UNI:'=> array('varbinary(%d)', 'limit' => array('mult', 3, 255, 'blob')),
- 'VCHAR_CI' => 'blob',
- 'VARBINARY' => 'varbinary(255)',
- ),
-
- 'firebird' => array(
- 'INT:' => 'INTEGER',
- 'BINT' => 'DOUBLE PRECISION',
- 'UINT' => 'INTEGER',
- 'UINT:' => 'INTEGER',
- 'TINT:' => 'INTEGER',
- 'USINT' => 'INTEGER',
- 'BOOL' => 'INTEGER',
- 'VCHAR' => 'VARCHAR(255) CHARACTER SET NONE',
- 'VCHAR:' => 'VARCHAR(%d) CHARACTER SET NONE',
- 'CHAR:' => 'CHAR(%d) CHARACTER SET NONE',
- 'XSTEXT' => 'BLOB SUB_TYPE TEXT CHARACTER SET NONE',
- 'STEXT' => 'BLOB SUB_TYPE TEXT CHARACTER SET NONE',
- 'TEXT' => 'BLOB SUB_TYPE TEXT CHARACTER SET NONE',
- 'MTEXT' => 'BLOB SUB_TYPE TEXT CHARACTER SET NONE',
- 'XSTEXT_UNI'=> 'VARCHAR(100) CHARACTER SET UTF8',
- 'STEXT_UNI' => 'VARCHAR(255) CHARACTER SET UTF8',
- 'TEXT_UNI' => 'BLOB SUB_TYPE TEXT CHARACTER SET UTF8',
- 'MTEXT_UNI' => 'BLOB SUB_TYPE TEXT CHARACTER SET UTF8',
- 'TIMESTAMP' => 'INTEGER',
- 'DECIMAL' => 'DOUBLE PRECISION',
- 'DECIMAL:' => 'DOUBLE PRECISION',
- 'PDECIMAL' => 'DOUBLE PRECISION',
- 'PDECIMAL:' => 'DOUBLE PRECISION',
- 'VCHAR_UNI' => 'VARCHAR(255) CHARACTER SET UTF8',
- 'VCHAR_UNI:'=> 'VARCHAR(%d) CHARACTER SET UTF8',
- 'VCHAR_CI' => 'VARCHAR(255) CHARACTER SET UTF8',
- 'VARBINARY' => 'CHAR(255) CHARACTER SET NONE',
- ),
+define('IN_PHPBB', true);
+define('IN_INSTALL', true);
+$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './../';
+$phpEx = substr(strrchr(__FILE__, '.'), 1);
+include($phpbb_root_path . 'common.' . $phpEx);
- 'mssql' => array(
- 'INT:' => '[int]',
- 'BINT' => '[float]',
- 'UINT' => '[int]',
- 'UINT:' => '[int]',
- 'TINT:' => '[int]',
- 'USINT' => '[int]',
- 'BOOL' => '[int]',
- 'VCHAR' => '[varchar] (255)',
- 'VCHAR:' => '[varchar] (%d)',
- 'CHAR:' => '[char] (%d)',
- 'XSTEXT' => '[varchar] (1000)',
- 'STEXT' => '[varchar] (3000)',
- 'TEXT' => '[varchar] (8000)',
- 'MTEXT' => '[text]',
- 'XSTEXT_UNI'=> '[varchar] (100)',
- 'STEXT_UNI' => '[varchar] (255)',
- 'TEXT_UNI' => '[varchar] (4000)',
- 'MTEXT_UNI' => '[text]',
- 'TIMESTAMP' => '[int]',
- 'DECIMAL' => '[float]',
- 'DECIMAL:' => '[float]',
- 'PDECIMAL' => '[float]',
- 'PDECIMAL:' => '[float]',
- 'VCHAR_UNI' => '[varchar] (255)',
- 'VCHAR_UNI:'=> '[varchar] (%d)',
- 'VCHAR_CI' => '[varchar] (255)',
- 'VARBINARY' => '[varchar] (255)',
- ),
+$classes = $phpbb_container->get('ext.manager')
+ ->get_finder()
+ ->core_path('phpbb/')
+ ->directory('db/migration/data')
+ ->get_classes();
+$db_tools = new \phpbb\db\tools($db, true);
- 'oracle' => array(
- 'INT:' => 'number(%d)',
- 'BINT' => 'number(20)',
- 'UINT' => 'number(8)',
- 'UINT:' => 'number(%d)',
- 'TINT:' => 'number(%d)',
- 'USINT' => 'number(4)',
- 'BOOL' => 'number(1)',
- 'VCHAR' => 'varchar2(255)',
- 'VCHAR:' => 'varchar2(%d)',
- 'CHAR:' => 'char(%d)',
- 'XSTEXT' => 'varchar2(1000)',
- 'STEXT' => 'varchar2(3000)',
- 'TEXT' => 'clob',
- 'MTEXT' => 'clob',
- 'XSTEXT_UNI'=> 'varchar2(300)',
- 'STEXT_UNI' => 'varchar2(765)',
- 'TEXT_UNI' => 'clob',
- 'MTEXT_UNI' => 'clob',
- 'TIMESTAMP' => 'number(11)',
- 'DECIMAL' => 'number(5, 2)',
- 'DECIMAL:' => 'number(%d, 2)',
- 'PDECIMAL' => 'number(6, 3)',
- 'PDECIMAL:' => 'number(%d, 3)',
- 'VCHAR_UNI' => 'varchar2(765)',
- 'VCHAR_UNI:'=> array('varchar2(%d)', 'limit' => array('mult', 3, 765, 'clob')),
- 'VCHAR_CI' => 'varchar2(255)',
- 'VARBINARY' => 'raw(255)',
- ),
-
- 'sqlite' => array(
- 'INT:' => 'int(%d)',
- 'BINT' => 'bigint(20)',
- 'UINT' => 'INTEGER UNSIGNED', //'mediumint(8) UNSIGNED',
- 'UINT:' => 'INTEGER UNSIGNED', // 'int(%d) UNSIGNED',
- 'TINT:' => 'tinyint(%d)',
- 'USINT' => 'INTEGER UNSIGNED', //'mediumint(4) UNSIGNED',
- 'BOOL' => 'INTEGER UNSIGNED', //'tinyint(1) UNSIGNED',
- 'VCHAR' => 'varchar(255)',
- 'VCHAR:' => 'varchar(%d)',
- 'CHAR:' => 'char(%d)',
- 'XSTEXT' => 'text(65535)',
- 'STEXT' => 'text(65535)',
- 'TEXT' => 'text(65535)',
- 'MTEXT' => 'mediumtext(16777215)',
- 'XSTEXT_UNI'=> 'text(65535)',
- 'STEXT_UNI' => 'text(65535)',
- 'TEXT_UNI' => 'text(65535)',
- 'MTEXT_UNI' => 'mediumtext(16777215)',
- 'TIMESTAMP' => 'INTEGER UNSIGNED', //'int(11) UNSIGNED',
- 'DECIMAL' => 'decimal(5,2)',
- 'DECIMAL:' => 'decimal(%d,2)',
- 'PDECIMAL' => 'decimal(6,3)',
- 'PDECIMAL:' => 'decimal(%d,3)',
- 'VCHAR_UNI' => 'varchar(255)',
- 'VCHAR_UNI:'=> 'varchar(%d)',
- 'VCHAR_CI' => 'varchar(255)',
- 'VARBINARY' => 'blob',
- ),
-
- 'postgres' => array(
- 'INT:' => 'INT4',
- 'BINT' => 'INT8',
- 'UINT' => 'INT4', // unsigned
- 'UINT:' => 'INT4', // unsigned
- 'USINT' => 'INT2', // unsigned
- 'BOOL' => 'INT2', // unsigned
- 'TINT:' => 'INT2',
- 'VCHAR' => 'varchar(255)',
- 'VCHAR:' => 'varchar(%d)',
- 'CHAR:' => 'char(%d)',
- 'XSTEXT' => 'varchar(1000)',
- 'STEXT' => 'varchar(3000)',
- 'TEXT' => 'varchar(8000)',
- 'MTEXT' => 'TEXT',
- 'XSTEXT_UNI'=> 'varchar(100)',
- 'STEXT_UNI' => 'varchar(255)',
- 'TEXT_UNI' => 'varchar(4000)',
- 'MTEXT_UNI' => 'TEXT',
- 'TIMESTAMP' => 'INT4', // unsigned
- 'DECIMAL' => 'decimal(5,2)',
- 'DECIMAL:' => 'decimal(%d,2)',
- 'PDECIMAL' => 'decimal(6,3)',
- 'PDECIMAL:' => 'decimal(%d,3)',
- 'VCHAR_UNI' => 'varchar(255)',
- 'VCHAR_UNI:'=> 'varchar(%d)',
- 'VCHAR_CI' => 'varchar_ci',
- 'VARBINARY' => 'bytea',
- ),
-);
+$schema_generator = new \phpbb\db\migration\schema_generator($classes, $config, $db, $db_tools, $phpbb_root_path, $phpEx, 'phpbb_');
+$schema_data = $schema_generator->get_schema();
+$dbms_type_map = phpbb\db\tools::get_dbms_type_map();
-// A list of types being unsigned for better reference in some db's
-$unsigned_types = array('UINT', 'UINT:', 'USINT', 'BOOL', 'TIMESTAMP');
-$supported_dbms = array('firebird', 'mssql', 'mysql_40', 'mysql_41', 'oracle', 'postgres', 'sqlite');
+$fp = fopen($schema_path . 'schema.json', 'wb');
+fwrite($fp, json_encode($schema_data, JSON_PRETTY_PRINT));
+fclose($fp);
foreach ($supported_dbms as $dbms)
{
- $schema_data = get_schema_struct();
- if ($dbms == 'mssql')
- {
- foreach ($schema_data as $table_name => $table_data)
- {
- if (!isset($table_data['PRIMARY_KEY']))
- {
- $schema_data[$table_name]['COLUMNS']['mssqlindex'] = array('UINT', NULL, 'auto_increment');
- $schema_data[$table_name]['PRIMARY_KEY'] = 'mssqlindex';
- }
- }
- }
-
$fp = fopen($schema_path . $dbms . '_schema.sql', 'wb');
- $line = '';
-
// Write Header
switch ($dbms)
{
@@ -281,16 +79,9 @@ foreach ($supported_dbms as $dbms)
break;
}
+ $line = '';
switch ($dbms)
{
- case 'firebird':
- $line .= custom_data('firebird') . "\n";
- break;
-
- case 'sqlite':
- $line .= "BEGIN TRANSACTION;\n\n";
- break;
-
case 'oracle':
$line .= custom_data('oracle') . "\n";
break;
@@ -298,501 +89,7 @@ foreach ($supported_dbms as $dbms)
case 'postgres':
$line .= "BEGIN;\n\n";
$line .= custom_data('postgres') . "\n";
- break;
- }
-
- fwrite($fp, $line);
-
- foreach ($schema_data as $table_name => $table_data)
- {
- // Write comment about table
- switch ($dbms)
- {
- case 'mysql_40':
- case 'mysql_41':
- case 'firebird':
- case 'sqlite':
- fwrite($fp, "# Table: '{$table_name}'\n");
- break;
-
- case 'mssql':
- case 'oracle':
- case 'postgres':
- fwrite($fp, "/*\n\tTable: '{$table_name}'\n*/\n");
- break;
- }
-
- // Create Table statement
- $generator = $textimage = false;
- $line = '';
-
- switch ($dbms)
- {
- case 'mysql_40':
- case 'mysql_41':
- case 'firebird':
- case 'oracle':
- case 'sqlite':
- case 'postgres':
- $line = "CREATE TABLE {$table_name} (\n";
- break;
-
- case 'mssql':
- $line = "CREATE TABLE [{$table_name}] (\n";
- break;
- }
-
- // Table specific so we don't get overlap
- $modded_array = array();
-
- // Write columns one by one...
- foreach ($table_data['COLUMNS'] as $column_name => $column_data)
- {
- if (strlen($column_name) > 30)
- {
- trigger_error("Column name '$column_name' on table '$table_name' is too long. The maximum is 30 characters.", E_USER_ERROR);
- }
- if (isset($column_data[2]) && $column_data[2] == 'auto_increment' && strlen($column_name) > 26) // "${column_name}_gen"
- {
- trigger_error("Index name '${column_name}_gen' on table '$table_name' is too long. The maximum is 30 characters.", E_USER_ERROR);
- }
-
- // Get type
- if (strpos($column_data[0], ':') !== false)
- {
- list($orig_column_type, $column_length) = explode(':', $column_data[0]);
- if (!is_array($dbms_type_map[$dbms][$orig_column_type . ':']))
- {
- $column_type = sprintf($dbms_type_map[$dbms][$orig_column_type . ':'], $column_length);
- }
- else
- {
- if (isset($dbms_type_map[$dbms][$orig_column_type . ':']['rule']))
- {
- switch ($dbms_type_map[$dbms][$orig_column_type . ':']['rule'][0])
- {
- case 'div':
- $column_length /= $dbms_type_map[$dbms][$orig_column_type . ':']['rule'][1];
- $column_length = ceil($column_length);
- $column_type = sprintf($dbms_type_map[$dbms][$orig_column_type . ':'][0], $column_length);
- break;
- }
- }
-
- if (isset($dbms_type_map[$dbms][$orig_column_type . ':']['limit']))
- {
- switch ($dbms_type_map[$dbms][$orig_column_type . ':']['limit'][0])
- {
- case 'mult':
- $column_length *= $dbms_type_map[$dbms][$orig_column_type . ':']['limit'][1];
- if ($column_length > $dbms_type_map[$dbms][$orig_column_type . ':']['limit'][2])
- {
- $column_type = $dbms_type_map[$dbms][$orig_column_type . ':']['limit'][3];
- $modded_array[$column_name] = $column_type;
- }
- else
- {
- $column_type = sprintf($dbms_type_map[$dbms][$orig_column_type . ':'][0], $column_length);
- }
- break;
- }
- }
- }
- $orig_column_type .= ':';
- }
- else
- {
- $orig_column_type = $column_data[0];
- $column_type = $dbms_type_map[$dbms][$column_data[0]];
- if ($column_type == 'text' || $column_type == 'blob')
- {
- $modded_array[$column_name] = $column_type;
- }
- }
-
- // Adjust default value if db-dependant specified
- if (is_array($column_data[1]))
- {
- $column_data[1] = (isset($column_data[1][$dbms])) ? $column_data[1][$dbms] : $column_data[1]['default'];
- }
-
- switch ($dbms)
- {
- case 'mysql_40':
- case 'mysql_41':
- $line .= "\t{$column_name} {$column_type} ";
-
- // For hexadecimal values do not use single quotes
- if (!is_null($column_data[1]) && substr($column_type, -4) !== 'text' && substr($column_type, -4) !== 'blob')
- {
- $line .= (strpos($column_data[1], '0x') === 0) ? "DEFAULT {$column_data[1]} " : "DEFAULT '{$column_data[1]}' ";
- }
- $line .= 'NOT NULL';
-
- if (isset($column_data[2]))
- {
- if ($column_data[2] == 'auto_increment')
- {
- $line .= ' auto_increment';
- }
- else if ($dbms === 'mysql_41' && $column_data[2] == 'true_sort')
- {
- $line .= ' COLLATE utf8_unicode_ci';
- }
- }
-
- $line .= ",\n";
- break;
-
- case 'sqlite':
- if (isset($column_data[2]) && $column_data[2] == 'auto_increment')
- {
- $line .= "\t{$column_name} INTEGER PRIMARY KEY ";
- $generator = $column_name;
- }
- else
- {
- $line .= "\t{$column_name} {$column_type} ";
- }
-
- $line .= 'NOT NULL ';
- $line .= (!is_null($column_data[1])) ? "DEFAULT '{$column_data[1]}'" : '';
- $line .= ",\n";
- break;
-
- case 'firebird':
- $line .= "\t{$column_name} {$column_type} ";
-
- if (!is_null($column_data[1]))
- {
- $line .= 'DEFAULT ' . ((is_numeric($column_data[1])) ? $column_data[1] : "'{$column_data[1]}'") . ' ';
- }
-
- $line .= 'NOT NULL';
-
- // This is a UNICODE column and thus should be given it's fair share
- if (preg_match('/^X?STEXT_UNI|VCHAR_(CI|UNI:?)/', $column_data[0]))
- {
- $line .= ' COLLATE UNICODE';
- }
-
- $line .= ",\n";
-
- if (isset($column_data[2]) && $column_data[2] == 'auto_increment')
- {
- $generator = $column_name;
- }
- break;
-
- case 'mssql':
- if ($column_type == '[text]')
- {
- $textimage = true;
- }
-
- $line .= "\t[{$column_name}] {$column_type} ";
-
- if (!is_null($column_data[1]))
- {
- // For hexadecimal values do not use single quotes
- if (strpos($column_data[1], '0x') === 0)
- {
- $line .= 'DEFAULT (' . $column_data[1] . ') ';
- }
- else
- {
- $line .= 'DEFAULT (' . ((is_numeric($column_data[1])) ? $column_data[1] : "'{$column_data[1]}'") . ') ';
- }
- }
-
- if (isset($column_data[2]) && $column_data[2] == 'auto_increment')
- {
- $line .= 'IDENTITY (1, 1) ';
- }
-
- $line .= 'NOT NULL';
- $line .= " ,\n";
- break;
-
- case 'oracle':
- $line .= "\t{$column_name} {$column_type} ";
- $line .= (!is_null($column_data[1])) ? "DEFAULT '{$column_data[1]}' " : '';
-
- // In Oracle empty strings ('') are treated as NULL.
- // Therefore in oracle we allow NULL's for all DEFAULT '' entries
- $line .= ($column_data[1] === '') ? ",\n" : "NOT NULL,\n";
-
- if (isset($column_data[2]) && $column_data[2] == 'auto_increment')
- {
- $generator = $column_name;
- }
- break;
-
- case 'postgres':
- $line .= "\t{$column_name} {$column_type} ";
-
- if (isset($column_data[2]) && $column_data[2] == 'auto_increment')
- {
- $line .= "DEFAULT nextval('{$table_name}_seq'),\n";
-
- // Make sure the sequence will be created before creating the table
- $line = "CREATE SEQUENCE {$table_name}_seq;\n\n" . $line;
- }
- else
- {
- $line .= (!is_null($column_data[1])) ? "DEFAULT '{$column_data[1]}' " : '';
- $line .= "NOT NULL";
-
- // Unsigned? Then add a CHECK contraint
- if (in_array($orig_column_type, $unsigned_types))
- {
- $line .= " CHECK ({$column_name} >= 0)";
- }
-
- $line .= ",\n";
- }
- break;
- }
- }
-
- switch ($dbms)
- {
- case 'firebird':
- // Remove last line delimiter...
- $line = substr($line, 0, -2);
- $line .= "\n);;\n\n";
- break;
-
- case 'mssql':
- $line = substr($line, 0, -2);
- $line .= "\n)";// ON [PRIMARY]" . (($textimage) ? ' TEXTIMAGE_ON [PRIMARY]' : '') . "\n";
- $line .= "GO\n\n";
- break;
- }
-
- // Write primary key
- if (isset($table_data['PRIMARY_KEY']))
- {
- if (!is_array($table_data['PRIMARY_KEY']))
- {
- $table_data['PRIMARY_KEY'] = array($table_data['PRIMARY_KEY']);
- }
-
- switch ($dbms)
- {
- case 'mysql_40':
- case 'mysql_41':
- case 'postgres':
- $line .= "\tPRIMARY KEY (" . implode(', ', $table_data['PRIMARY_KEY']) . "),\n";
- break;
-
- case 'firebird':
- $line .= "ALTER TABLE {$table_name} ADD PRIMARY KEY (" . implode(', ', $table_data['PRIMARY_KEY']) . ");;\n\n";
- break;
-
- case 'sqlite':
- if ($generator === false || !in_array($generator, $table_data['PRIMARY_KEY']))
- {
- $line .= "\tPRIMARY KEY (" . implode(', ', $table_data['PRIMARY_KEY']) . "),\n";
- }
- break;
-
- case 'mssql':
- $line .= "ALTER TABLE [{$table_name}] WITH NOCHECK ADD \n";
- $line .= "\tCONSTRAINT [PK_{$table_name}] PRIMARY KEY CLUSTERED \n";
- $line .= "\t(\n";
- $line .= "\t\t[" . implode("],\n\t\t[", $table_data['PRIMARY_KEY']) . "]\n";
- $line .= "\t)\n";
- $line .= "GO\n\n";
- break;
-
- case 'oracle':
- $line .= "\tCONSTRAINT pk_{$table_name} PRIMARY KEY (" . implode(', ', $table_data['PRIMARY_KEY']) . "),\n";
- break;
- }
- }
-
- switch ($dbms)
- {
- case 'oracle':
- // UNIQUE contrains to be added?
- if (isset($table_data['KEYS']))
- {
- foreach ($table_data['KEYS'] as $key_name => $key_data)
- {
- if (!is_array($key_data[1]))
- {
- $key_data[1] = array($key_data[1]);
- }
-
- if ($key_data[0] == 'UNIQUE')
- {
- $line .= "\tCONSTRAINT u_phpbb_{$key_name} UNIQUE (" . implode(', ', $key_data[1]) . "),\n";
- }
- }
- }
-
- // Remove last line delimiter...
- $line = substr($line, 0, -2);
- $line .= "\n)\n/\n\n";
- break;
-
- case 'postgres':
- // Remove last line delimiter...
- $line = substr($line, 0, -2);
- $line .= "\n);\n\n";
- break;
-
- case 'sqlite':
- // Remove last line delimiter...
- $line = substr($line, 0, -2);
- $line .= "\n);\n\n";
- break;
- }
-
- // Write Keys
- if (isset($table_data['KEYS']))
- {
- foreach ($table_data['KEYS'] as $key_name => $key_data)
- {
- if (!is_array($key_data[1]))
- {
- $key_data[1] = array($key_data[1]);
- }
-
- if (strlen($table_name . $key_name) > 30)
- {
- trigger_error("Index name '${table_name}_$key_name' on table '$table_name' is too long. The maximum is 30 characters.", E_USER_ERROR);
- }
-
- switch ($dbms)
- {
- case 'mysql_40':
- case 'mysql_41':
- $line .= ($key_data[0] == 'INDEX') ? "\tKEY" : '';
- $line .= ($key_data[0] == 'UNIQUE') ? "\tUNIQUE" : '';
- foreach ($key_data[1] as $key => $col_name)
- {
- if (isset($modded_array[$col_name]))
- {
- switch ($modded_array[$col_name])
- {
- case 'text':
- case 'blob':
- $key_data[1][$key] = $col_name . '(255)';
- break;
- }
- }
- }
- $line .= ' ' . $key_name . ' (' . implode(', ', $key_data[1]) . "),\n";
- break;
-
- case 'firebird':
- $line .= ($key_data[0] == 'INDEX') ? 'CREATE INDEX' : '';
- $line .= ($key_data[0] == 'UNIQUE') ? 'CREATE UNIQUE INDEX' : '';
-
- $line .= ' ' . $table_name . '_' . $key_name . ' ON ' . $table_name . '(' . implode(', ', $key_data[1]) . ");;\n";
- break;
-
- case 'mssql':
- $line .= ($key_data[0] == 'INDEX') ? 'CREATE INDEX' : '';
- $line .= ($key_data[0] == 'UNIQUE') ? 'CREATE UNIQUE INDEX' : '';
- $line .= " [{$key_name}] ON [{$table_name}]([" . implode('], [', $key_data[1]) . "])\n";
- $line .= "GO\n\n";
- break;
-
- case 'oracle':
- if ($key_data[0] == 'UNIQUE')
- {
- continue;
- }
-
- $line .= ($key_data[0] == 'INDEX') ? 'CREATE INDEX' : '';
-
- $line .= " {$table_name}_{$key_name} ON {$table_name} (" . implode(', ', $key_data[1]) . ")\n";
- $line .= "/\n";
- break;
-
- case 'sqlite':
- $line .= ($key_data[0] == 'INDEX') ? 'CREATE INDEX' : '';
- $line .= ($key_data[0] == 'UNIQUE') ? 'CREATE UNIQUE INDEX' : '';
-
- $line .= " {$table_name}_{$key_name} ON {$table_name} (" . implode(', ', $key_data[1]) . ");\n";
- break;
-
- case 'postgres':
- $line .= ($key_data[0] == 'INDEX') ? 'CREATE INDEX' : '';
- $line .= ($key_data[0] == 'UNIQUE') ? 'CREATE UNIQUE INDEX' : '';
-
- $line .= " {$table_name}_{$key_name} ON {$table_name} (" . implode(', ', $key_data[1]) . ");\n";
- break;
- }
- }
- }
-
- switch ($dbms)
- {
- case 'mysql_40':
- // Remove last line delimiter...
- $line = substr($line, 0, -2);
- $line .= "\n);\n\n";
- break;
-
- case 'mysql_41':
- // Remove last line delimiter...
- $line = substr($line, 0, -2);
- $line .= "\n) CHARACTER SET `utf8` COLLATE `utf8_bin`;\n\n";
- break;
-
- // Create Generator
- case 'firebird':
- if ($generator !== false)
- {
- $line .= "\nCREATE GENERATOR {$table_name}_gen;;\n";
- $line .= 'SET GENERATOR ' . $table_name . "_gen TO 0;;\n\n";
-
- $line .= 'CREATE TRIGGER t_' . $table_name . ' FOR ' . $table_name . "\n";
- $line .= "BEFORE INSERT\nAS\nBEGIN\n";
- $line .= "\tNEW.{$generator} = GEN_ID({$table_name}_gen, 1);\nEND;;\n\n";
- }
- break;
-
- case 'oracle':
- if ($generator !== false)
- {
- $line .= "\nCREATE SEQUENCE {$table_name}_seq\n/\n\n";
-
- $line .= "CREATE OR REPLACE TRIGGER t_{$table_name}\n";
- $line .= "BEFORE INSERT ON {$table_name}\n";
- $line .= "FOR EACH ROW WHEN (\n";
- $line .= "\tnew.{$generator} IS NULL OR new.{$generator} = 0\n";
- $line .= ")\nBEGIN\n";
- $line .= "\tSELECT {$table_name}_seq.nextval\n";
- $line .= "\tINTO :new.{$generator}\n";
- $line .= "\tFROM dual;\nEND;\n/\n\n";
- }
- break;
- }
-
- fwrite($fp, $line . "\n");
- }
-
- $line = '';
-
- // Write custom function at the end for some db's
- switch ($dbms)
- {
- case 'mssql':
- // No need to do this, no transaction support for schema changes
- //$line = "\nCOMMIT\nGO\n\n";
- break;
-
- case 'sqlite':
- $line = "\nCOMMIT;";
- break;
-
- case 'postgres':
- $line = "\nCOMMIT;";
+ $line .= "COMMIT;\n\n";
break;
}
@@ -800,1169 +97,6 @@ foreach ($supported_dbms as $dbms)
fclose($fp);
}
-
-/**
-* Define the basic structure
-* The format:
-* array('{TABLE_NAME}' => {TABLE_DATA})
-* {TABLE_DATA}:
-* COLUMNS = array({column_name} = array({column_type}, {default}, {auto_increment}))
-* PRIMARY_KEY = {column_name(s)}
-* KEYS = array({key_name} = array({key_type}, {column_name(s)})),
-*
-* Column Types:
-* INT:x => SIGNED int(x)
-* BINT => BIGINT
-* UINT => mediumint(8) UNSIGNED
-* UINT:x => int(x) UNSIGNED
-* TINT:x => tinyint(x)
-* USINT => smallint(4) UNSIGNED (for _order columns)
-* BOOL => tinyint(1) UNSIGNED
-* VCHAR => varchar(255)
-* CHAR:x => char(x)
-* XSTEXT_UNI => text for storing 100 characters (topic_title for example)
-* STEXT_UNI => text for storing 255 characters (normal input field with a max of 255 single-byte chars) - same as VCHAR_UNI
-* TEXT_UNI => text for storing 3000 characters (short text, descriptions, comments, etc.)
-* MTEXT_UNI => mediumtext (post text, large text)
-* VCHAR:x => varchar(x)
-* TIMESTAMP => int(11) UNSIGNED
-* DECIMAL => decimal number (5,2)
-* DECIMAL: => decimal number (x,2)
-* PDECIMAL => precision decimal number (6,3)
-* PDECIMAL: => precision decimal number (x,3)
-* VCHAR_UNI => varchar(255) BINARY
-* VCHAR_CI => varchar_ci for postgresql, others VCHAR
-*/
-function get_schema_struct()
-{
- $schema_data = array();
-
- $schema_data['phpbb_attachments'] = array(
- 'COLUMNS' => array(
- 'attach_id' => array('UINT', NULL, 'auto_increment'),
- 'post_msg_id' => array('UINT', 0),
- 'topic_id' => array('UINT', 0),
- 'in_message' => array('BOOL', 0),
- 'poster_id' => array('UINT', 0),
- 'is_orphan' => array('BOOL', 1),
- 'physical_filename' => array('VCHAR', ''),
- 'real_filename' => array('VCHAR', ''),
- 'download_count' => array('UINT', 0),
- 'attach_comment' => array('TEXT_UNI', ''),
- 'extension' => array('VCHAR:100', ''),
- 'mimetype' => array('VCHAR:100', ''),
- 'filesize' => array('UINT:20', 0),
- 'filetime' => array('TIMESTAMP', 0),
- 'thumbnail' => array('BOOL', 0),
- ),
- 'PRIMARY_KEY' => 'attach_id',
- 'KEYS' => array(
- 'filetime' => array('INDEX', 'filetime'),
- 'post_msg_id' => array('INDEX', 'post_msg_id'),
- 'topic_id' => array('INDEX', 'topic_id'),
- 'poster_id' => array('INDEX', 'poster_id'),
- 'is_orphan' => array('INDEX', 'is_orphan'),
- ),
- );
-
- $schema_data['phpbb_acl_groups'] = array(
- 'COLUMNS' => array(
- 'group_id' => array('UINT', 0),
- 'forum_id' => array('UINT', 0),
- 'auth_option_id' => array('UINT', 0),
- 'auth_role_id' => array('UINT', 0),
- 'auth_setting' => array('TINT:2', 0),
- ),
- 'KEYS' => array(
- 'group_id' => array('INDEX', 'group_id'),
- 'auth_opt_id' => array('INDEX', 'auth_option_id'),
- 'auth_role_id' => array('INDEX', 'auth_role_id'),
- ),
- );
-
- $schema_data['phpbb_acl_options'] = array(
- 'COLUMNS' => array(
- 'auth_option_id' => array('UINT', NULL, 'auto_increment'),
- 'auth_option' => array('VCHAR:50', ''),
- 'is_global' => array('BOOL', 0),
- 'is_local' => array('BOOL', 0),
- 'founder_only' => array('BOOL', 0),
- ),
- 'PRIMARY_KEY' => 'auth_option_id',
- 'KEYS' => array(
- 'auth_option' => array('UNIQUE', 'auth_option'),
- ),
- );
-
- $schema_data['phpbb_acl_roles'] = array(
- 'COLUMNS' => array(
- 'role_id' => array('UINT', NULL, 'auto_increment'),
- 'role_name' => array('VCHAR_UNI', ''),
- 'role_description' => array('TEXT_UNI', ''),
- 'role_type' => array('VCHAR:10', ''),
- 'role_order' => array('USINT', 0),
- ),
- 'PRIMARY_KEY' => 'role_id',
- 'KEYS' => array(
- 'role_type' => array('INDEX', 'role_type'),
- 'role_order' => array('INDEX', 'role_order'),
- ),
- );
-
- $schema_data['phpbb_acl_roles_data'] = array(
- 'COLUMNS' => array(
- 'role_id' => array('UINT', 0),
- 'auth_option_id' => array('UINT', 0),
- 'auth_setting' => array('TINT:2', 0),
- ),
- 'PRIMARY_KEY' => array('role_id', 'auth_option_id'),
- 'KEYS' => array(
- 'ath_op_id' => array('INDEX', 'auth_option_id'),
- ),
- );
-
- $schema_data['phpbb_acl_users'] = array(
- 'COLUMNS' => array(
- 'user_id' => array('UINT', 0),
- 'forum_id' => array('UINT', 0),
- 'auth_option_id' => array('UINT', 0),
- 'auth_role_id' => array('UINT', 0),
- 'auth_setting' => array('TINT:2', 0),
- ),
- 'KEYS' => array(
- 'user_id' => array('INDEX', 'user_id'),
- 'auth_option_id' => array('INDEX', 'auth_option_id'),
- 'auth_role_id' => array('INDEX', 'auth_role_id'),
- ),
- );
-
- $schema_data['phpbb_banlist'] = array(
- 'COLUMNS' => array(
- 'ban_id' => array('UINT', NULL, 'auto_increment'),
- 'ban_userid' => array('UINT', 0),
- 'ban_ip' => array('VCHAR:40', ''),
- 'ban_email' => array('VCHAR_UNI:100', ''),
- 'ban_start' => array('TIMESTAMP', 0),
- 'ban_end' => array('TIMESTAMP', 0),
- 'ban_exclude' => array('BOOL', 0),
- 'ban_reason' => array('VCHAR_UNI', ''),
- 'ban_give_reason' => array('VCHAR_UNI', ''),
- ),
- 'PRIMARY_KEY' => 'ban_id',
- 'KEYS' => array(
- 'ban_end' => array('INDEX', 'ban_end'),
- 'ban_user' => array('INDEX', array('ban_userid', 'ban_exclude')),
- 'ban_email' => array('INDEX', array('ban_email', 'ban_exclude')),
- 'ban_ip' => array('INDEX', array('ban_ip', 'ban_exclude')),
- ),
- );
-
- $schema_data['phpbb_bbcodes'] = array(
- 'COLUMNS' => array(
- 'bbcode_id' => array('USINT', 0),
- 'bbcode_tag' => array('VCHAR:16', ''),
- 'bbcode_helpline' => array('VCHAR_UNI', ''),
- 'display_on_posting' => array('BOOL', 0),
- 'bbcode_match' => array('TEXT_UNI', ''),
- 'bbcode_tpl' => array('MTEXT_UNI', ''),
- 'first_pass_match' => array('MTEXT_UNI', ''),
- 'first_pass_replace' => array('MTEXT_UNI', ''),
- 'second_pass_match' => array('MTEXT_UNI', ''),
- 'second_pass_replace' => array('MTEXT_UNI', ''),
- ),
- 'PRIMARY_KEY' => 'bbcode_id',
- 'KEYS' => array(
- 'display_on_post' => array('INDEX', 'display_on_posting'),
- ),
- );
-
- $schema_data['phpbb_bookmarks'] = array(
- 'COLUMNS' => array(
- 'topic_id' => array('UINT', 0),
- 'user_id' => array('UINT', 0),
- ),
- 'PRIMARY_KEY' => array('topic_id', 'user_id'),
- );
-
- $schema_data['phpbb_bots'] = array(
- 'COLUMNS' => array(
- 'bot_id' => array('UINT', NULL, 'auto_increment'),
- 'bot_active' => array('BOOL', 1),
- 'bot_name' => array('STEXT_UNI', ''),
- 'user_id' => array('UINT', 0),
- 'bot_agent' => array('VCHAR', ''),
- 'bot_ip' => array('VCHAR', ''),
- ),
- 'PRIMARY_KEY' => 'bot_id',
- 'KEYS' => array(
- 'bot_active' => array('INDEX', 'bot_active'),
- ),
- );
-
- $schema_data['phpbb_config'] = array(
- 'COLUMNS' => array(
- 'config_name' => array('VCHAR', ''),
- 'config_value' => array('VCHAR_UNI', ''),
- 'is_dynamic' => array('BOOL', 0),
- ),
- 'PRIMARY_KEY' => 'config_name',
- 'KEYS' => array(
- 'is_dynamic' => array('INDEX', 'is_dynamic'),
- ),
- );
-
- $schema_data['phpbb_confirm'] = array(
- 'COLUMNS' => array(
- 'confirm_id' => array('CHAR:32', ''),
- 'session_id' => array('CHAR:32', ''),
- 'confirm_type' => array('TINT:3', 0),
- 'code' => array('VCHAR:8', ''),
- 'seed' => array('UINT:10', 0),
- 'attempts' => array('UINT', 0),
- ),
- 'PRIMARY_KEY' => array('session_id', 'confirm_id'),
- 'KEYS' => array(
- 'confirm_type' => array('INDEX', 'confirm_type'),
- ),
- );
-
- $schema_data['phpbb_disallow'] = array(
- 'COLUMNS' => array(
- 'disallow_id' => array('UINT', NULL, 'auto_increment'),
- 'disallow_username' => array('VCHAR_UNI:255', ''),
- ),
- 'PRIMARY_KEY' => 'disallow_id',
- );
-
- $schema_data['phpbb_drafts'] = array(
- 'COLUMNS' => array(
- 'draft_id' => array('UINT', NULL, 'auto_increment'),
- 'user_id' => array('UINT', 0),
- 'topic_id' => array('UINT', 0),
- 'forum_id' => array('UINT', 0),
- 'save_time' => array('TIMESTAMP', 0),
- 'draft_subject' => array('STEXT_UNI', ''),
- 'draft_message' => array('MTEXT_UNI', ''),
- ),
- 'PRIMARY_KEY' => 'draft_id',
- 'KEYS' => array(
- 'save_time' => array('INDEX', 'save_time'),
- ),
- );
-
- $schema_data['phpbb_extensions'] = array(
- 'COLUMNS' => array(
- 'extension_id' => array('UINT', NULL, 'auto_increment'),
- 'group_id' => array('UINT', 0),
- 'extension' => array('VCHAR:100', ''),
- ),
- 'PRIMARY_KEY' => 'extension_id',
- );
-
- $schema_data['phpbb_extension_groups'] = array(
- 'COLUMNS' => array(
- 'group_id' => array('UINT', NULL, 'auto_increment'),
- 'group_name' => array('VCHAR_UNI', ''),
- 'cat_id' => array('TINT:2', 0),
- 'allow_group' => array('BOOL', 0),
- 'download_mode' => array('BOOL', 1),
- 'upload_icon' => array('VCHAR', ''),
- 'max_filesize' => array('UINT:20', 0),
- 'allowed_forums' => array('TEXT', ''),
- 'allow_in_pm' => array('BOOL', 0),
- ),
- 'PRIMARY_KEY' => 'group_id',
- );
-
- $schema_data['phpbb_forums'] = array(
- 'COLUMNS' => array(
- 'forum_id' => array('UINT', NULL, 'auto_increment'),
- 'parent_id' => array('UINT', 0),
- 'left_id' => array('UINT', 0),
- 'right_id' => array('UINT', 0),
- 'forum_parents' => array('MTEXT', ''),
- 'forum_name' => array('STEXT_UNI', ''),
- 'forum_desc' => array('TEXT_UNI', ''),
- 'forum_desc_bitfield' => array('VCHAR:255', ''),
- 'forum_desc_options' => array('UINT:11', 7),
- 'forum_desc_uid' => array('VCHAR:8', ''),
- 'forum_link' => array('VCHAR_UNI', ''),
- 'forum_password' => array('VCHAR_UNI:40', ''),
- 'forum_style' => array('UINT', 0),
- 'forum_image' => array('VCHAR', ''),
- 'forum_rules' => array('TEXT_UNI', ''),
- 'forum_rules_link' => array('VCHAR_UNI', ''),
- 'forum_rules_bitfield' => array('VCHAR:255', ''),
- 'forum_rules_options' => array('UINT:11', 7),
- 'forum_rules_uid' => array('VCHAR:8', ''),
- 'forum_topics_per_page' => array('TINT:4', 0),
- 'forum_type' => array('TINT:4', 0),
- 'forum_status' => array('TINT:4', 0),
- 'forum_posts' => array('UINT', 0),
- 'forum_topics' => array('UINT', 0),
- 'forum_topics_real' => array('UINT', 0),
- 'forum_last_post_id' => array('UINT', 0),
- 'forum_last_poster_id' => array('UINT', 0),
- 'forum_last_post_subject' => array('STEXT_UNI', ''),
- 'forum_last_post_time' => array('TIMESTAMP', 0),
- 'forum_last_poster_name'=> array('VCHAR_UNI', ''),
- 'forum_last_poster_colour'=> array('VCHAR:6', ''),
- 'forum_flags' => array('TINT:4', 32),
- 'forum_options' => array('UINT:20', 0),
- 'display_subforum_list' => array('BOOL', 1),
- 'display_on_index' => array('BOOL', 1),
- 'enable_indexing' => array('BOOL', 1),
- 'enable_icons' => array('BOOL', 1),
- 'enable_prune' => array('BOOL', 0),
- 'prune_next' => array('TIMESTAMP', 0),
- 'prune_days' => array('UINT', 0),
- 'prune_viewed' => array('UINT', 0),
- 'prune_freq' => array('UINT', 0),
- ),
- 'PRIMARY_KEY' => 'forum_id',
- 'KEYS' => array(
- 'left_right_id' => array('INDEX', array('left_id', 'right_id')),
- 'forum_lastpost_id' => array('INDEX', 'forum_last_post_id'),
- ),
- );
-
- $schema_data['phpbb_forums_access'] = array(
- 'COLUMNS' => array(
- 'forum_id' => array('UINT', 0),
- 'user_id' => array('UINT', 0),
- 'session_id' => array('CHAR:32', ''),
- ),
- 'PRIMARY_KEY' => array('forum_id', 'user_id', 'session_id'),
- );
-
- $schema_data['phpbb_forums_track'] = array(
- 'COLUMNS' => array(
- 'user_id' => array('UINT', 0),
- 'forum_id' => array('UINT', 0),
- 'mark_time' => array('TIMESTAMP', 0),
- ),
- 'PRIMARY_KEY' => array('user_id', 'forum_id'),
- );
-
- $schema_data['phpbb_forums_watch'] = array(
- 'COLUMNS' => array(
- 'forum_id' => array('UINT', 0),
- 'user_id' => array('UINT', 0),
- 'notify_status' => array('BOOL', 0),
- ),
- 'KEYS' => array(
- 'forum_id' => array('INDEX', 'forum_id'),
- 'user_id' => array('INDEX', 'user_id'),
- 'notify_stat' => array('INDEX', 'notify_status'),
- ),
- );
-
- $schema_data['phpbb_groups'] = array(
- 'COLUMNS' => array(
- 'group_id' => array('UINT', NULL, 'auto_increment'),
- 'group_type' => array('TINT:4', 1),
- 'group_founder_manage' => array('BOOL', 0),
- 'group_skip_auth' => array('BOOL', 0),
- 'group_name' => array('VCHAR_CI', ''),
- 'group_desc' => array('TEXT_UNI', ''),
- 'group_desc_bitfield' => array('VCHAR:255', ''),
- 'group_desc_options' => array('UINT:11', 7),
- 'group_desc_uid' => array('VCHAR:8', ''),
- 'group_display' => array('BOOL', 0),
- 'group_avatar' => array('VCHAR', ''),
- 'group_avatar_type' => array('TINT:2', 0),
- 'group_avatar_width' => array('USINT', 0),
- 'group_avatar_height' => array('USINT', 0),
- 'group_rank' => array('UINT', 0),
- 'group_colour' => array('VCHAR:6', ''),
- 'group_sig_chars' => array('UINT', 0),
- 'group_receive_pm' => array('BOOL', 0),
- 'group_message_limit' => array('UINT', 0),
- 'group_max_recipients' => array('UINT', 0),
- 'group_legend' => array('BOOL', 1),
- ),
- 'PRIMARY_KEY' => 'group_id',
- 'KEYS' => array(
- 'group_legend_name' => array('INDEX', array('group_legend', 'group_name')),
- ),
- );
-
- $schema_data['phpbb_icons'] = array(
- 'COLUMNS' => array(
- 'icons_id' => array('UINT', NULL, 'auto_increment'),
- 'icons_url' => array('VCHAR', ''),
- 'icons_width' => array('TINT:4', 0),
- 'icons_height' => array('TINT:4', 0),
- 'icons_order' => array('UINT', 0),
- 'display_on_posting' => array('BOOL', 1),
- ),
- 'PRIMARY_KEY' => 'icons_id',
- 'KEYS' => array(
- 'display_on_posting' => array('INDEX', 'display_on_posting'),
- ),
- );
-
- $schema_data['phpbb_lang'] = array(
- 'COLUMNS' => array(
- 'lang_id' => array('TINT:4', NULL, 'auto_increment'),
- 'lang_iso' => array('VCHAR:30', ''),
- 'lang_dir' => array('VCHAR:30', ''),
- 'lang_english_name' => array('VCHAR_UNI:100', ''),
- 'lang_local_name' => array('VCHAR_UNI:255', ''),
- 'lang_author' => array('VCHAR_UNI:255', ''),
- ),
- 'PRIMARY_KEY' => 'lang_id',
- 'KEYS' => array(
- 'lang_iso' => array('INDEX', 'lang_iso'),
- ),
- );
-
- $schema_data['phpbb_log'] = array(
- 'COLUMNS' => array(
- 'log_id' => array('UINT', NULL, 'auto_increment'),
- 'log_type' => array('TINT:4', 0),
- 'user_id' => array('UINT', 0),
- 'forum_id' => array('UINT', 0),
- 'topic_id' => array('UINT', 0),
- 'reportee_id' => array('UINT', 0),
- 'log_ip' => array('VCHAR:40', ''),
- 'log_time' => array('TIMESTAMP', 0),
- 'log_operation' => array('TEXT_UNI', ''),
- 'log_data' => array('MTEXT_UNI', ''),
- ),
- 'PRIMARY_KEY' => 'log_id',
- 'KEYS' => array(
- 'log_type' => array('INDEX', 'log_type'),
- 'forum_id' => array('INDEX', 'forum_id'),
- 'topic_id' => array('INDEX', 'topic_id'),
- 'reportee_id' => array('INDEX', 'reportee_id'),
- 'user_id' => array('INDEX', 'user_id'),
- ),
- );
-
- $schema_data['phpbb_login_attempts'] = array(
- 'COLUMNS' => array(
- 'attempt_ip' => array('VCHAR:40', ''),
- 'attempt_browser' => array('VCHAR:150', ''),
- 'attempt_forwarded_for' => array('VCHAR:255', ''),
- 'attempt_time' => array('TIMESTAMP', 0),
- 'user_id' => array('UINT', 0),
- 'username' => array('VCHAR_UNI:255', 0),
- 'username_clean' => array('VCHAR_CI', 0),
- ),
- 'KEYS' => array(
- 'att_ip' => array('INDEX', array('attempt_ip', 'attempt_time')),
- 'att_for' => array('INDEX', array('attempt_forwarded_for', 'attempt_time')),
- 'att_time' => array('INDEX', array('attempt_time')),
- 'user_id' => array('INDEX', 'user_id'),
- ),
- );
-
- $schema_data['phpbb_moderator_cache'] = array(
- 'COLUMNS' => array(
- 'forum_id' => array('UINT', 0),
- 'user_id' => array('UINT', 0),
- 'username' => array('VCHAR_UNI:255', ''),
- 'group_id' => array('UINT', 0),
- 'group_name' => array('VCHAR_UNI', ''),
- 'display_on_index' => array('BOOL', 1),
- ),
- 'KEYS' => array(
- 'disp_idx' => array('INDEX', 'display_on_index'),
- 'forum_id' => array('INDEX', 'forum_id'),
- ),
- );
-
- $schema_data['phpbb_modules'] = array(
- 'COLUMNS' => array(
- 'module_id' => array('UINT', NULL, 'auto_increment'),
- 'module_enabled' => array('BOOL', 1),
- 'module_display' => array('BOOL', 1),
- 'module_basename' => array('VCHAR', ''),
- 'module_class' => array('VCHAR:10', ''),
- 'parent_id' => array('UINT', 0),
- 'left_id' => array('UINT', 0),
- 'right_id' => array('UINT', 0),
- 'module_langname' => array('VCHAR', ''),
- 'module_mode' => array('VCHAR', ''),
- 'module_auth' => array('VCHAR', ''),
- ),
- 'PRIMARY_KEY' => 'module_id',
- 'KEYS' => array(
- 'left_right_id' => array('INDEX', array('left_id', 'right_id')),
- 'module_enabled' => array('INDEX', 'module_enabled'),
- 'class_left_id' => array('INDEX', array('module_class', 'left_id')),
- ),
- );
-
- $schema_data['phpbb_poll_options'] = array(
- 'COLUMNS' => array(
- 'poll_option_id' => array('TINT:4', 0),
- 'topic_id' => array('UINT', 0),
- 'poll_option_text' => array('TEXT_UNI', ''),
- 'poll_option_total' => array('UINT', 0),
- ),
- 'KEYS' => array(
- 'poll_opt_id' => array('INDEX', 'poll_option_id'),
- 'topic_id' => array('INDEX', 'topic_id'),
- ),
- );
-
- $schema_data['phpbb_poll_votes'] = array(
- 'COLUMNS' => array(
- 'topic_id' => array('UINT', 0),
- 'poll_option_id' => array('TINT:4', 0),
- 'vote_user_id' => array('UINT', 0),
- 'vote_user_ip' => array('VCHAR:40', ''),
- ),
- 'KEYS' => array(
- 'topic_id' => array('INDEX', 'topic_id'),
- 'vote_user_id' => array('INDEX', 'vote_user_id'),
- 'vote_user_ip' => array('INDEX', 'vote_user_ip'),
- ),
- );
-
- $schema_data['phpbb_posts'] = array(
- 'COLUMNS' => array(
- 'post_id' => array('UINT', NULL, 'auto_increment'),
- 'topic_id' => array('UINT', 0),
- 'forum_id' => array('UINT', 0),
- 'poster_id' => array('UINT', 0),
- 'icon_id' => array('UINT', 0),
- 'poster_ip' => array('VCHAR:40', ''),
- 'post_time' => array('TIMESTAMP', 0),
- 'post_approved' => array('BOOL', 1),
- 'post_reported' => array('BOOL', 0),
- 'enable_bbcode' => array('BOOL', 1),
- 'enable_smilies' => array('BOOL', 1),
- 'enable_magic_url' => array('BOOL', 1),
- 'enable_sig' => array('BOOL', 1),
- 'post_username' => array('VCHAR_UNI:255', ''),
- 'post_subject' => array('STEXT_UNI', '', 'true_sort'),
- 'post_text' => array('MTEXT_UNI', ''),
- 'post_checksum' => array('VCHAR:32', ''),
- 'post_attachment' => array('BOOL', 0),
- 'bbcode_bitfield' => array('VCHAR:255', ''),
- 'bbcode_uid' => array('VCHAR:8', ''),
- 'post_postcount' => array('BOOL', 1),
- 'post_edit_time' => array('TIMESTAMP', 0),
- 'post_edit_reason' => array('STEXT_UNI', ''),
- 'post_edit_user' => array('UINT', 0),
- 'post_edit_count' => array('USINT', 0),
- 'post_edit_locked' => array('BOOL', 0),
- ),
- 'PRIMARY_KEY' => 'post_id',
- 'KEYS' => array(
- 'forum_id' => array('INDEX', 'forum_id'),
- 'topic_id' => array('INDEX', 'topic_id'),
- 'poster_ip' => array('INDEX', 'poster_ip'),
- 'poster_id' => array('INDEX', 'poster_id'),
- 'post_approved' => array('INDEX', 'post_approved'),
- 'post_username' => array('INDEX', 'post_username'),
- 'tid_post_time' => array('INDEX', array('topic_id', 'post_time')),
- ),
- );
-
- $schema_data['phpbb_privmsgs'] = array(
- 'COLUMNS' => array(
- 'msg_id' => array('UINT', NULL, 'auto_increment'),
- 'root_level' => array('UINT', 0),
- 'author_id' => array('UINT', 0),
- 'icon_id' => array('UINT', 0),
- 'author_ip' => array('VCHAR:40', ''),
- 'message_time' => array('TIMESTAMP', 0),
- 'enable_bbcode' => array('BOOL', 1),
- 'enable_smilies' => array('BOOL', 1),
- 'enable_magic_url' => array('BOOL', 1),
- 'enable_sig' => array('BOOL', 1),
- 'message_subject' => array('STEXT_UNI', ''),
- 'message_text' => array('MTEXT_UNI', ''),
- 'message_edit_reason' => array('STEXT_UNI', ''),
- 'message_edit_user' => array('UINT', 0),
- 'message_attachment' => array('BOOL', 0),
- 'bbcode_bitfield' => array('VCHAR:255', ''),
- 'bbcode_uid' => array('VCHAR:8', ''),
- 'message_edit_time' => array('TIMESTAMP', 0),
- 'message_edit_count' => array('USINT', 0),
- 'to_address' => array('TEXT_UNI', ''),
- 'bcc_address' => array('TEXT_UNI', ''),
- 'message_reported' => array('BOOL', 0),
- ),
- 'PRIMARY_KEY' => 'msg_id',
- 'KEYS' => array(
- 'author_ip' => array('INDEX', 'author_ip'),
- 'message_time' => array('INDEX', 'message_time'),
- 'author_id' => array('INDEX', 'author_id'),
- 'root_level' => array('INDEX', 'root_level'),
- ),
- );
-
- $schema_data['phpbb_privmsgs_folder'] = array(
- 'COLUMNS' => array(
- 'folder_id' => array('UINT', NULL, 'auto_increment'),
- 'user_id' => array('UINT', 0),
- 'folder_name' => array('VCHAR_UNI', ''),
- 'pm_count' => array('UINT', 0),
- ),
- 'PRIMARY_KEY' => 'folder_id',
- 'KEYS' => array(
- 'user_id' => array('INDEX', 'user_id'),
- ),
- );
-
- $schema_data['phpbb_privmsgs_rules'] = array(
- 'COLUMNS' => array(
- 'rule_id' => array('UINT', NULL, 'auto_increment'),
- 'user_id' => array('UINT', 0),
- 'rule_check' => array('UINT', 0),
- 'rule_connection' => array('UINT', 0),
- 'rule_string' => array('VCHAR_UNI', ''),
- 'rule_user_id' => array('UINT', 0),
- 'rule_group_id' => array('UINT', 0),
- 'rule_action' => array('UINT', 0),
- 'rule_folder_id' => array('INT:11', 0),
- ),
- 'PRIMARY_KEY' => 'rule_id',
- 'KEYS' => array(
- 'user_id' => array('INDEX', 'user_id'),
- ),
- );
-
- $schema_data['phpbb_privmsgs_to'] = array(
- 'COLUMNS' => array(
- 'msg_id' => array('UINT', 0),
- 'user_id' => array('UINT', 0),
- 'author_id' => array('UINT', 0),
- 'pm_deleted' => array('BOOL', 0),
- 'pm_new' => array('BOOL', 1),
- 'pm_unread' => array('BOOL', 1),
- 'pm_replied' => array('BOOL', 0),
- 'pm_marked' => array('BOOL', 0),
- 'pm_forwarded' => array('BOOL', 0),
- 'folder_id' => array('INT:11', 0),
- ),
- 'KEYS' => array(
- 'msg_id' => array('INDEX', 'msg_id'),
- 'author_id' => array('INDEX', 'author_id'),
- 'usr_flder_id' => array('INDEX', array('user_id', 'folder_id')),
- ),
- );
-
- $schema_data['phpbb_profile_fields'] = array(
- 'COLUMNS' => array(
- 'field_id' => array('UINT', NULL, 'auto_increment'),
- 'field_name' => array('VCHAR_UNI', ''),
- 'field_type' => array('TINT:4', 0),
- 'field_ident' => array('VCHAR:20', ''),
- 'field_length' => array('VCHAR:20', ''),
- 'field_minlen' => array('VCHAR', ''),
- 'field_maxlen' => array('VCHAR', ''),
- 'field_novalue' => array('VCHAR_UNI', ''),
- 'field_default_value' => array('VCHAR_UNI', ''),
- 'field_validation' => array('VCHAR_UNI:20', ''),
- 'field_required' => array('BOOL', 0),
- 'field_show_novalue' => array('BOOL', 0),
- 'field_show_on_reg' => array('BOOL', 0),
- 'field_show_on_vt' => array('BOOL', 0),
- 'field_show_profile' => array('BOOL', 0),
- 'field_hide' => array('BOOL', 0),
- 'field_no_view' => array('BOOL', 0),
- 'field_active' => array('BOOL', 0),
- 'field_order' => array('UINT', 0),
- ),
- 'PRIMARY_KEY' => 'field_id',
- 'KEYS' => array(
- 'fld_type' => array('INDEX', 'field_type'),
- 'fld_ordr' => array('INDEX', 'field_order'),
- ),
- );
-
- $schema_data['phpbb_profile_fields_data'] = array(
- 'COLUMNS' => array(
- 'user_id' => array('UINT', 0),
- ),
- 'PRIMARY_KEY' => 'user_id',
- );
-
- $schema_data['phpbb_profile_fields_lang'] = array(
- 'COLUMNS' => array(
- 'field_id' => array('UINT', 0),
- 'lang_id' => array('UINT', 0),
- 'option_id' => array('UINT', 0),
- 'field_type' => array('TINT:4', 0),
- 'lang_value' => array('VCHAR_UNI', ''),
- ),
- 'PRIMARY_KEY' => array('field_id', 'lang_id', 'option_id'),
- );
-
- $schema_data['phpbb_profile_lang'] = array(
- 'COLUMNS' => array(
- 'field_id' => array('UINT', 0),
- 'lang_id' => array('UINT', 0),
- 'lang_name' => array('VCHAR_UNI', ''),
- 'lang_explain' => array('TEXT_UNI', ''),
- 'lang_default_value' => array('VCHAR_UNI', ''),
- ),
- 'PRIMARY_KEY' => array('field_id', 'lang_id'),
- );
-
- $schema_data['phpbb_ranks'] = array(
- 'COLUMNS' => array(
- 'rank_id' => array('UINT', NULL, 'auto_increment'),
- 'rank_title' => array('VCHAR_UNI', ''),
- 'rank_min' => array('UINT', 0),
- 'rank_special' => array('BOOL', 0),
- 'rank_image' => array('VCHAR', ''),
- ),
- 'PRIMARY_KEY' => 'rank_id',
- );
-
- $schema_data['phpbb_reports'] = array(
- 'COLUMNS' => array(
- 'report_id' => array('UINT', NULL, 'auto_increment'),
- 'reason_id' => array('USINT', 0),
- 'post_id' => array('UINT', 0),
- 'pm_id' => array('UINT', 0),
- 'user_id' => array('UINT', 0),
- 'user_notify' => array('BOOL', 0),
- 'report_closed' => array('BOOL', 0),
- 'report_time' => array('TIMESTAMP', 0),
- 'report_text' => array('MTEXT_UNI', ''),
- ),
- 'PRIMARY_KEY' => 'report_id',
- 'KEYS' => array(
- 'post_id' => array('INDEX', 'post_id'),
- 'pm_id' => array('INDEX', 'pm_id'),
- ),
- );
-
- $schema_data['phpbb_reports_reasons'] = array(
- 'COLUMNS' => array(
- 'reason_id' => array('USINT', NULL, 'auto_increment'),
- 'reason_title' => array('VCHAR_UNI', ''),
- 'reason_description' => array('MTEXT_UNI', ''),
- 'reason_order' => array('USINT', 0),
- ),
- 'PRIMARY_KEY' => 'reason_id',
- );
-
- $schema_data['phpbb_search_results'] = array(
- 'COLUMNS' => array(
- 'search_key' => array('VCHAR:32', ''),
- 'search_time' => array('TIMESTAMP', 0),
- 'search_keywords' => array('MTEXT_UNI', ''),
- 'search_authors' => array('MTEXT', ''),
- ),
- 'PRIMARY_KEY' => 'search_key',
- );
-
- $schema_data['phpbb_search_wordlist'] = array(
- 'COLUMNS' => array(
- 'word_id' => array('UINT', NULL, 'auto_increment'),
- 'word_text' => array('VCHAR_UNI', ''),
- 'word_common' => array('BOOL', 0),
- 'word_count' => array('UINT', 0),
- ),
- 'PRIMARY_KEY' => 'word_id',
- 'KEYS' => array(
- 'wrd_txt' => array('UNIQUE', 'word_text'),
- 'wrd_cnt' => array('INDEX', 'word_count'),
- ),
- );
-
- $schema_data['phpbb_search_wordmatch'] = array(
- 'COLUMNS' => array(
- 'post_id' => array('UINT', 0),
- 'word_id' => array('UINT', 0),
- 'title_match' => array('BOOL', 0),
- ),
- 'KEYS' => array(
- 'unq_mtch' => array('UNIQUE', array('word_id', 'post_id', 'title_match')),
- 'word_id' => array('INDEX', 'word_id'),
- 'post_id' => array('INDEX', 'post_id'),
- ),
- );
-
- $schema_data['phpbb_sessions'] = array(
- 'COLUMNS' => array(
- 'session_id' => array('CHAR:32', ''),
- 'session_user_id' => array('UINT', 0),
- 'session_forum_id' => array('UINT', 0),
- 'session_last_visit' => array('TIMESTAMP', 0),
- 'session_start' => array('TIMESTAMP', 0),
- 'session_time' => array('TIMESTAMP', 0),
- 'session_ip' => array('VCHAR:40', ''),
- 'session_browser' => array('VCHAR:150', ''),
- 'session_forwarded_for' => array('VCHAR:255', ''),
- 'session_page' => array('VCHAR_UNI', ''),
- 'session_viewonline' => array('BOOL', 1),
- 'session_autologin' => array('BOOL', 0),
- 'session_admin' => array('BOOL', 0),
- ),
- 'PRIMARY_KEY' => 'session_id',
- 'KEYS' => array(
- 'session_time' => array('INDEX', 'session_time'),
- 'session_user_id' => array('INDEX', 'session_user_id'),
- 'session_fid' => array('INDEX', 'session_forum_id'),
- ),
- );
-
- $schema_data['phpbb_sessions_keys'] = array(
- 'COLUMNS' => array(
- 'key_id' => array('CHAR:32', ''),
- 'user_id' => array('UINT', 0),
- 'last_ip' => array('VCHAR:40', ''),
- 'last_login' => array('TIMESTAMP', 0),
- ),
- 'PRIMARY_KEY' => array('key_id', 'user_id'),
- 'KEYS' => array(
- 'last_login' => array('INDEX', 'last_login'),
- ),
- );
-
- $schema_data['phpbb_sitelist'] = array(
- 'COLUMNS' => array(
- 'site_id' => array('UINT', NULL, 'auto_increment'),
- 'site_ip' => array('VCHAR:40', ''),
- 'site_hostname' => array('VCHAR', ''),
- 'ip_exclude' => array('BOOL', 0),
- ),
- 'PRIMARY_KEY' => 'site_id',
- );
-
- $schema_data['phpbb_smilies'] = array(
- 'COLUMNS' => array(
- 'smiley_id' => array('UINT', NULL, 'auto_increment'),
- // We may want to set 'code' to VCHAR:50 or check if unicode support is possible... at the moment only ASCII characters are allowed.
- 'code' => array('VCHAR_UNI:50', ''),
- 'emotion' => array('VCHAR_UNI:50', ''),
- 'smiley_url' => array('VCHAR:50', ''),
- 'smiley_width' => array('USINT', 0),
- 'smiley_height' => array('USINT', 0),
- 'smiley_order' => array('UINT', 0),
- 'display_on_posting'=> array('BOOL', 1),
- ),
- 'PRIMARY_KEY' => 'smiley_id',
- 'KEYS' => array(
- 'display_on_post' => array('INDEX', 'display_on_posting'),
- ),
- );
-
- $schema_data['phpbb_styles'] = array(
- 'COLUMNS' => array(
- 'style_id' => array('UINT', NULL, 'auto_increment'),
- 'style_name' => array('VCHAR_UNI:255', ''),
- 'style_copyright' => array('VCHAR_UNI', ''),
- 'style_active' => array('BOOL', 1),
- 'template_id' => array('UINT', 0),
- 'theme_id' => array('UINT', 0),
- 'imageset_id' => array('UINT', 0),
- ),
- 'PRIMARY_KEY' => 'style_id',
- 'KEYS' => array(
- 'style_name' => array('UNIQUE', 'style_name'),
- 'template_id' => array('INDEX', 'template_id'),
- 'theme_id' => array('INDEX', 'theme_id'),
- 'imageset_id' => array('INDEX', 'imageset_id'),
- ),
- );
-
- $schema_data['phpbb_styles_template'] = array(
- 'COLUMNS' => array(
- 'template_id' => array('UINT', NULL, 'auto_increment'),
- 'template_name' => array('VCHAR_UNI:255', ''),
- 'template_copyright' => array('VCHAR_UNI', ''),
- 'template_path' => array('VCHAR:100', ''),
- 'bbcode_bitfield' => array('VCHAR:255', 'kNg='),
- 'template_storedb' => array('BOOL', 0),
- 'template_inherits_id' => array('UINT:4', 0),
- 'template_inherit_path' => array('VCHAR', ''),
- ),
- 'PRIMARY_KEY' => 'template_id',
- 'KEYS' => array(
- 'tmplte_nm' => array('UNIQUE', 'template_name'),
- ),
- );
-
- $schema_data['phpbb_styles_template_data'] = array(
- 'COLUMNS' => array(
- 'template_id' => array('UINT', 0),
- 'template_filename' => array('VCHAR:100', ''),
- 'template_included' => array('TEXT', ''),
- 'template_mtime' => array('TIMESTAMP', 0),
- 'template_data' => array('MTEXT_UNI', ''),
- ),
- 'KEYS' => array(
- 'tid' => array('INDEX', 'template_id'),
- 'tfn' => array('INDEX', 'template_filename'),
- ),
- );
-
- $schema_data['phpbb_styles_theme'] = array(
- 'COLUMNS' => array(
- 'theme_id' => array('UINT', NULL, 'auto_increment'),
- 'theme_name' => array('VCHAR_UNI:255', ''),
- 'theme_copyright' => array('VCHAR_UNI', ''),
- 'theme_path' => array('VCHAR:100', ''),
- 'theme_storedb' => array('BOOL', 0),
- 'theme_mtime' => array('TIMESTAMP', 0),
- 'theme_data' => array('MTEXT_UNI', ''),
- ),
- 'PRIMARY_KEY' => 'theme_id',
- 'KEYS' => array(
- 'theme_name' => array('UNIQUE', 'theme_name'),
- ),
- );
-
- $schema_data['phpbb_styles_imageset'] = array(
- 'COLUMNS' => array(
- 'imageset_id' => array('UINT', NULL, 'auto_increment'),
- 'imageset_name' => array('VCHAR_UNI:255', ''),
- 'imageset_copyright' => array('VCHAR_UNI', ''),
- 'imageset_path' => array('VCHAR:100', ''),
- ),
- 'PRIMARY_KEY' => 'imageset_id',
- 'KEYS' => array(
- 'imgset_nm' => array('UNIQUE', 'imageset_name'),
- ),
- );
-
- $schema_data['phpbb_styles_imageset_data'] = array(
- 'COLUMNS' => array(
- 'image_id' => array('UINT', NULL, 'auto_increment'),
- 'image_name' => array('VCHAR:200', ''),
- 'image_filename' => array('VCHAR:200', ''),
- 'image_lang' => array('VCHAR:30', ''),
- 'image_height' => array('USINT', 0),
- 'image_width' => array('USINT', 0),
- 'imageset_id' => array('UINT', 0),
- ),
- 'PRIMARY_KEY' => 'image_id',
- 'KEYS' => array(
- 'i_d' => array('INDEX', 'imageset_id'),
- ),
- );
-
- $schema_data['phpbb_topics'] = array(
- 'COLUMNS' => array(
- 'topic_id' => array('UINT', NULL, 'auto_increment'),
- 'forum_id' => array('UINT', 0),
- 'icon_id' => array('UINT', 0),
- 'topic_attachment' => array('BOOL', 0),
- 'topic_approved' => array('BOOL', 1),
- 'topic_reported' => array('BOOL', 0),
- 'topic_title' => array('STEXT_UNI', '', 'true_sort'),
- 'topic_poster' => array('UINT', 0),
- 'topic_time' => array('TIMESTAMP', 0),
- 'topic_time_limit' => array('TIMESTAMP', 0),
- 'topic_views' => array('UINT', 0),
- 'topic_replies' => array('UINT', 0),
- 'topic_replies_real' => array('UINT', 0),
- 'topic_status' => array('TINT:3', 0),
- 'topic_type' => array('TINT:3', 0),
- 'topic_first_post_id' => array('UINT', 0),
- 'topic_first_poster_name' => array('VCHAR_UNI', ''),
- 'topic_first_poster_colour' => array('VCHAR:6', ''),
- 'topic_last_post_id' => array('UINT', 0),
- 'topic_last_poster_id' => array('UINT', 0),
- 'topic_last_poster_name' => array('VCHAR_UNI', ''),
- 'topic_last_poster_colour' => array('VCHAR:6', ''),
- 'topic_last_post_subject' => array('STEXT_UNI', ''),
- 'topic_last_post_time' => array('TIMESTAMP', 0),
- 'topic_last_view_time' => array('TIMESTAMP', 0),
- 'topic_moved_id' => array('UINT', 0),
- 'topic_bumped' => array('BOOL', 0),
- 'topic_bumper' => array('UINT', 0),
- 'poll_title' => array('STEXT_UNI', ''),
- 'poll_start' => array('TIMESTAMP', 0),
- 'poll_length' => array('TIMESTAMP', 0),
- 'poll_max_options' => array('TINT:4', 1),
- 'poll_last_vote' => array('TIMESTAMP', 0),
- 'poll_vote_change' => array('BOOL', 0),
- ),
- 'PRIMARY_KEY' => 'topic_id',
- 'KEYS' => array(
- 'forum_id' => array('INDEX', 'forum_id'),
- 'forum_id_type' => array('INDEX', array('forum_id', 'topic_type')),
- 'last_post_time' => array('INDEX', 'topic_last_post_time'),
- 'topic_approved' => array('INDEX', 'topic_approved'),
- 'forum_appr_last' => array('INDEX', array('forum_id', 'topic_approved', 'topic_last_post_id')),
- 'fid_time_moved' => array('INDEX', array('forum_id', 'topic_last_post_time', 'topic_moved_id')),
- ),
- );
-
- $schema_data['phpbb_topics_track'] = array(
- 'COLUMNS' => array(
- 'user_id' => array('UINT', 0),
- 'topic_id' => array('UINT', 0),
- 'forum_id' => array('UINT', 0),
- 'mark_time' => array('TIMESTAMP', 0),
- ),
- 'PRIMARY_KEY' => array('user_id', 'topic_id'),
- 'KEYS' => array(
- 'topic_id' => array('INDEX', 'topic_id'),
- 'forum_id' => array('INDEX', 'forum_id'),
- ),
- );
-
- $schema_data['phpbb_topics_posted'] = array(
- 'COLUMNS' => array(
- 'user_id' => array('UINT', 0),
- 'topic_id' => array('UINT', 0),
- 'topic_posted' => array('BOOL', 0),
- ),
- 'PRIMARY_KEY' => array('user_id', 'topic_id'),
- );
-
- $schema_data['phpbb_topics_watch'] = array(
- 'COLUMNS' => array(
- 'topic_id' => array('UINT', 0),
- 'user_id' => array('UINT', 0),
- 'notify_status' => array('BOOL', 0),
- ),
- 'KEYS' => array(
- 'topic_id' => array('INDEX', 'topic_id'),
- 'user_id' => array('INDEX', 'user_id'),
- 'notify_stat' => array('INDEX', 'notify_status'),
- ),
- );
-
- $schema_data['phpbb_user_group'] = array(
- 'COLUMNS' => array(
- 'group_id' => array('UINT', 0),
- 'user_id' => array('UINT', 0),
- 'group_leader' => array('BOOL', 0),
- 'user_pending' => array('BOOL', 1),
- ),
- 'KEYS' => array(
- 'group_id' => array('INDEX', 'group_id'),
- 'user_id' => array('INDEX', 'user_id'),
- 'group_leader' => array('INDEX', 'group_leader'),
- ),
- );
-
- $schema_data['phpbb_users'] = array(
- 'COLUMNS' => array(
- 'user_id' => array('UINT', NULL, 'auto_increment'),
- 'user_type' => array('TINT:2', 0),
- 'group_id' => array('UINT', 3),
- 'user_permissions' => array('MTEXT', ''),
- 'user_perm_from' => array('UINT', 0),
- 'user_ip' => array('VCHAR:40', ''),
- 'user_regdate' => array('TIMESTAMP', 0),
- 'username' => array('VCHAR_CI', ''),
- 'username_clean' => array('VCHAR_CI', ''),
- 'user_password' => array('VCHAR_UNI:40', ''),
- 'user_passchg' => array('TIMESTAMP', 0),
- 'user_pass_convert' => array('BOOL', 0),
- 'user_email' => array('VCHAR_UNI:100', ''),
- 'user_email_hash' => array('BINT', 0),
- 'user_birthday' => array('VCHAR:10', ''),
- 'user_lastvisit' => array('TIMESTAMP', 0),
- 'user_lastmark' => array('TIMESTAMP', 0),
- 'user_lastpost_time' => array('TIMESTAMP', 0),
- 'user_lastpage' => array('VCHAR_UNI:200', ''),
- 'user_last_confirm_key' => array('VCHAR:10', ''),
- 'user_last_search' => array('TIMESTAMP', 0),
- 'user_warnings' => array('TINT:4', 0),
- 'user_last_warning' => array('TIMESTAMP', 0),
- 'user_login_attempts' => array('TINT:4', 0),
- 'user_inactive_reason' => array('TINT:2', 0),
- 'user_inactive_time' => array('TIMESTAMP', 0),
- 'user_posts' => array('UINT', 0),
- 'user_lang' => array('VCHAR:30', ''),
- 'user_timezone' => array('DECIMAL', 0),
- 'user_dst' => array('BOOL', 0),
- 'user_dateformat' => array('VCHAR_UNI:30', 'd M Y H:i'),
- 'user_style' => array('UINT', 0),
- 'user_rank' => array('UINT', 0),
- 'user_colour' => array('VCHAR:6', ''),
- 'user_new_privmsg' => array('INT:4', 0),
- 'user_unread_privmsg' => array('INT:4', 0),
- 'user_last_privmsg' => array('TIMESTAMP', 0),
- 'user_message_rules' => array('BOOL', 0),
- 'user_full_folder' => array('INT:11', -3),
- 'user_emailtime' => array('TIMESTAMP', 0),
- 'user_topic_show_days' => array('USINT', 0),
- 'user_topic_sortby_type' => array('VCHAR:1', 't'),
- 'user_topic_sortby_dir' => array('VCHAR:1', 'd'),
- 'user_post_show_days' => array('USINT', 0),
- 'user_post_sortby_type' => array('VCHAR:1', 't'),
- 'user_post_sortby_dir' => array('VCHAR:1', 'a'),
- 'user_notify' => array('BOOL', 0),
- 'user_notify_pm' => array('BOOL', 1),
- 'user_notify_type' => array('TINT:4', 0),
- 'user_allow_pm' => array('BOOL', 1),
- 'user_allow_viewonline' => array('BOOL', 1),
- 'user_allow_viewemail' => array('BOOL', 1),
- 'user_allow_massemail' => array('BOOL', 1),
- 'user_options' => array('UINT:11', 230271),
- 'user_avatar' => array('VCHAR', ''),
- 'user_avatar_type' => array('TINT:2', 0),
- 'user_avatar_width' => array('USINT', 0),
- 'user_avatar_height' => array('USINT', 0),
- 'user_sig' => array('MTEXT_UNI', ''),
- 'user_sig_bbcode_uid' => array('VCHAR:8', ''),
- 'user_sig_bbcode_bitfield' => array('VCHAR:255', ''),
- 'user_from' => array('VCHAR_UNI:100', ''),
- 'user_icq' => array('VCHAR:15', ''),
- 'user_aim' => array('VCHAR_UNI', ''),
- 'user_yim' => array('VCHAR_UNI', ''),
- 'user_msnm' => array('VCHAR_UNI', ''),
- 'user_jabber' => array('VCHAR_UNI', ''),
- 'user_website' => array('VCHAR_UNI:200', ''),
- 'user_occ' => array('TEXT_UNI', ''),
- 'user_interests' => array('TEXT_UNI', ''),
- 'user_actkey' => array('VCHAR:32', ''),
- 'user_newpasswd' => array('VCHAR_UNI:40', ''),
- 'user_form_salt' => array('VCHAR_UNI:32', ''),
- 'user_new' => array('BOOL', 1),
- 'user_reminded' => array('TINT:4', 0),
- 'user_reminded_time' => array('TIMESTAMP', 0),
- ),
- 'PRIMARY_KEY' => 'user_id',
- 'KEYS' => array(
- 'user_birthday' => array('INDEX', 'user_birthday'),
- 'user_email_hash' => array('INDEX', 'user_email_hash'),
- 'user_type' => array('INDEX', 'user_type'),
- 'username_clean' => array('UNIQUE', 'username_clean'),
- ),
- );
-
- $schema_data['phpbb_warnings'] = array(
- 'COLUMNS' => array(
- 'warning_id' => array('UINT', NULL, 'auto_increment'),
- 'user_id' => array('UINT', 0),
- 'post_id' => array('UINT', 0),
- 'log_id' => array('UINT', 0),
- 'warning_time' => array('TIMESTAMP', 0),
- ),
- 'PRIMARY_KEY' => 'warning_id',
- );
-
- $schema_data['phpbb_words'] = array(
- 'COLUMNS' => array(
- 'word_id' => array('UINT', NULL, 'auto_increment'),
- 'word' => array('VCHAR_UNI', ''),
- 'replacement' => array('VCHAR_UNI', ''),
- ),
- 'PRIMARY_KEY' => 'word_id',
- );
-
- $schema_data['phpbb_zebra'] = array(
- 'COLUMNS' => array(
- 'user_id' => array('UINT', 0),
- 'zebra_id' => array('UINT', 0),
- 'friend' => array('BOOL', 0),
- 'foe' => array('BOOL', 0),
- ),
- 'PRIMARY_KEY' => array('user_id', 'zebra_id'),
- );
-
- return $schema_data;
-}
-
-
/**
* Data put into the header for various dbms
*/
@@ -2098,4 +232,3 @@ EOF;
}
echo 'done';
-
diff --git a/phpBB/develop/create_search_index.php b/phpBB/develop/create_search_index.php
index c1a7125d61..f329b805a0 100644
--- a/phpBB/develop/create_search_index.php
+++ b/phpBB/develop/create_search_index.php
@@ -25,7 +25,6 @@ $phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : '../';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
require($phpbb_root_path . 'common.' . $phpEx);
require($phpbb_root_path . 'includes/acp/acp_search.' . $phpEx);
-require($phpbb_root_path . 'includes/search/' . $class_name . '.' . $phpEx);
$user->session_begin();
$auth->acl($user->data);
diff --git a/phpBB/develop/create_variable_overview.php b/phpBB/develop/create_variable_overview.php
index f926d79eb5..e65de130b3 100644
--- a/phpBB/develop/create_variable_overview.php
+++ b/phpBB/develop/create_variable_overview.php
@@ -38,7 +38,7 @@ fwrite($fp, $contents);
fclose($fp);
$html_skeleton = '
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="subSilver.css" type="text/css">
@@ -356,7 +356,7 @@ echo '<br>Store Files';
$fp = fopen($store_dir . 'index.html', 'w');
$html_data = '
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="subSilver.css" type="text/css">
@@ -421,7 +421,7 @@ fwrite($common_fp, "<?php\n\n \$lang = array(\n");
$fp = fopen($store_dir . 'lang_index.html', 'w');
$html_data = '
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="subSilver.css" type="text/css">
@@ -537,5 +537,3 @@ fclose($fp);
echo '<br>Finished!';
flush();
-
-?> \ No newline at end of file
diff --git a/phpBB/develop/export_events_for_wiki.php b/phpBB/develop/export_events_for_wiki.php
new file mode 100644
index 0000000000..3021b64e05
--- /dev/null
+++ b/phpBB/develop/export_events_for_wiki.php
@@ -0,0 +1,332 @@
+<?php
+/**
+*
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+if (php_sapi_name() != 'cli')
+{
+ die("This program must be run from the command line.\n");
+}
+
+$phpEx = substr(strrchr(__FILE__, '.'), 1);
+$phpbb_root_path = __DIR__ . '/../';
+
+function usage()
+{
+ echo "Usage: export_events_for_wiki.php COMMAND\n";
+ echo "\n";
+ echo "acp:\n";
+ echo " Export all events for files in the acp style.\n";
+ echo "\n";
+ echo "styles:\n";
+ echo " Export all events for files in the prosilver and subsilver2 styles.\n";
+ echo "\n";
+ echo "php:\n";
+ echo " Export all events for php-files.\n";
+ exit(2);
+}
+
+function export_from_eventsmd($phpbb_root_path, $filter)
+{
+ $file_content = file_get_contents($phpbb_root_path . 'docs/events.md');
+
+ $events = explode("\n\n", $file_content);
+ foreach ($events as $event)
+ {
+ // Last row of the file
+ if (strpos($event, "\n===\n") === false) continue;
+
+ list($event_name, $details) = explode("\n===\n", $event);
+
+ if ($filter == 'acp' && strpos($event_name, 'acp_') !== 0) continue;
+ if ($filter == 'styles' && strpos($event_name, 'acp_') === 0) continue;
+
+ list($file_details, $details) = explode("\n* Since: ", $details);
+ list($version, $explanition) = explode("\n* Purpose: ", $details);
+
+ echo "|- id=\"{$event_name}\"\n";
+ echo "| [[#{$event_name}|{$event_name}]] || ";
+
+ if (strpos($file_details, "* Locations:\n + ") === 0)
+ {
+ $file_details = substr($file_details, strlen("* Locations:\n + "));
+ $files = explode("\n + ", $file_details);
+ $prosilver = $subsilver2 = $adm = array();
+ foreach ($files as $file)
+ {
+ if (strpos($file, 'styles/prosilver/template/') === 0)
+ {
+ $prosilver[] = substr($file, strlen('styles/prosilver/template/'));
+ }
+ if (strpos($file, 'styles/subsilver2/template/') === 0)
+ {
+ $subsilver2[] = substr($file, strlen('styles/subsilver2/template/'));
+ }
+ if (strpos($file, 'adm/style/') === 0)
+ {
+ $adm[] = substr($file, strlen('adm/style/'));
+ }
+ }
+ if ($filter == 'acp')
+ {
+ echo implode(', ', $adm);
+ }
+ else
+ {
+ echo implode(', ', $prosilver) . ' || ' . implode(', ', $subsilver2);
+ }
+ }
+ else if ($filter == 'acp')
+ {
+ echo substr($file_details, strlen("* Location: adm/style/"));
+ }
+ echo " || {$version} || " . str_replace("\n", ' ', $explanition) . "\n";
+
+ }
+}
+
+function export_from_php($phpbb_root_path)
+{
+ $files = get_file_list($phpbb_root_path);
+ $events = array();
+ foreach ($files as $file)
+ {
+ $file_events = check_for_events($phpbb_root_path, $file);
+ if (!empty($file_events))
+ {
+ $events = array_merge($events, $file_events);
+ }
+ }
+
+ ksort($events);
+
+ foreach ($events as $event)
+ {
+ echo '|- id="' . $event['event'] . '"' . "\n";
+ echo '| [[#' . $event['event'] . '|' . $event['event'] . ']] || ' . $event['file'] . ' || ' . implode(', ', $event['arguments']) . ' || ' . $event['since'] . ' || ' . $event['description'] . "\n";
+ }
+}
+
+function check_for_events($phpbb_root_path, $file)
+{
+ $events = array();
+ $content = file_get_contents($phpbb_root_path . $file);
+
+ if (strpos($content, "phpbb_dispatcher->trigger_event('") || strpos($content, "phpbb_dispatcher->dispatch('"))
+ {
+ $lines = explode("\n", $content);
+ for ($i = 0, $num_lines = sizeof($lines); $i < $num_lines; $i++)
+ {
+ $event_line = 0;
+ $found_trigger_event = strpos($lines[$i], "phpbb_dispatcher->trigger_event('");
+ if ($found_trigger_event !== false)
+ {
+ $event_line = $i;
+ $event_name = $lines[$event_line];
+ $event_name = substr($event_name, $found_trigger_event + strlen("phpbb_dispatcher->trigger_event('"));
+ $event_name = substr($event_name, 0, strpos($event_name, "'"));
+
+ $current_line = trim($lines[$event_line]);
+ $arguments = array();
+ $found_inline_array = strpos($current_line, "', compact(array('");
+ if ($found_inline_array !== false)
+ {
+ $varsarray = substr($current_line, $found_inline_array + strlen("', compact(array('"), -6);
+ $arguments = explode("', '", $varsarray);
+ }
+
+ if (empty($arguments))
+ {
+ // Find $vars array lines
+ $find_varsarray_line = 1;
+ while (strpos($lines[$event_line - $find_varsarray_line], "vars = array('") === false)
+ {
+ $find_varsarray_line++;
+
+ if ($find_varsarray_line > min(50, $event_line))
+ {
+ throw new LogicException('Can not find "$vars = array()"-line for event "' . $event_name . '" in file "' . $file . '"');
+ }
+ }
+ $varsarray = substr(trim($lines[$event_line - $find_varsarray_line]), strlen("\$vars = array('"), -3);
+ $arguments = explode("', '", $varsarray);
+ }
+
+ // Validate $vars array with @var
+ $find_vars_line = 3;
+ $doc_vars = array();
+ while (strpos(trim($lines[$event_line - $find_vars_line]), '*') === 0)
+ {
+ $var_line = trim($lines[$event_line - $find_vars_line]);
+ $var_line = preg_replace('!\s+!', ' ', $var_line);
+ if (strpos($var_line, '* @var ') === 0)
+ {
+ $doc_line = explode(' ', $var_line);
+ if (isset($doc_line[3]))
+ {
+ $doc_vars[] = $doc_line[3];
+ }
+ }
+ $find_vars_line++;
+ }
+ if (sizeof($arguments) !== sizeof($doc_vars) && array_intersect($arguments, $doc_vars))
+ {
+ throw new LogicException('$vars array does not match the list of @var tags for event "' . $event_name . '" in file "' . $file . '"');
+ }
+ }
+ $found_dispatch = strpos($lines[$i], "phpbb_dispatcher->dispatch('");
+ if ($found_dispatch !== false)
+ {
+ $event_line = $i;
+ $event_name = $lines[$event_line];
+ $event_name = substr($event_name, $found_dispatch + strlen("phpbb_dispatcher->dispatch('"));
+ $event_name = substr($event_name, 0, strpos($event_name, "'"));
+ $arguments = array();
+ }
+
+ if ($event_line)
+ {
+ // Validate @event name
+ $find_event_line = 1;
+ while (strpos($lines[$event_line - $find_event_line], '* @event ') === false)
+ {
+ $find_event_line++;
+
+ if ($find_event_line > min(50, $event_line))
+ {
+ throw new LogicException('Can not find @event tag for event "' . $event_name . '" in file "' . $file . '"');
+ }
+ }
+ $event_name_tag = substr(trim($lines[$event_line - $find_event_line]), strlen('* @event '));
+ if ($event_name_tag !== $event_name)
+ {
+ throw new LogicException('Event name does not match @event tag for event "' . $event_name . '" in file "' . $file . '"');
+ }
+
+ // Find @since
+ $find_since_line = 1;
+ while (strpos($lines[$event_line - $find_since_line], '* @since ') === false)
+ {
+ $find_since_line++;
+
+ if ($find_since_line > min(50, $event_line))
+ {
+ throw new LogicException('Can not find @since tag for event "' . $event_name . '" in file "' . $file . '"');
+ }
+ }
+ $since = substr(trim($lines[$event_line - $find_since_line]), strlen('* @since '));
+ $since = ($since == '3.1-A1') ? '3.1.0-a1' : $since;
+
+ // Find event description line
+ $find_description_line = 3;
+ while (strpos(trim($lines[$event_line - $find_description_line]), '*') === 0)
+ {
+ $find_description_line++;
+
+ if ($find_description_line > min(50, $event_line))
+ {
+ throw new LogicException('Can not find description-line for event "' . $event_name . '" in file "' . $file . '"');
+ }
+ }
+ $description = substr(trim($lines[$event_line - $find_description_line + 1]), strlen('* '));
+
+ $events[$event_name] = array(
+ 'event' => $event_name,
+ 'file' => $file,
+ 'arguments' => $arguments,
+ 'since' => $since,
+ 'description' => $description,
+ );
+ }
+ }
+ }
+
+ return $events;
+}
+
+/**
+* Returns a list of files in that directory
+*
+* Works recursive with any depth
+*
+* @param string $dir Directory to go through
+* @return array List of files (including directories from within $dir
+*/
+function get_file_list($dir, $path = '')
+{
+ try
+ {
+ $iterator = new \DirectoryIterator($dir);
+ }
+ catch (Exception $e)
+ {
+ return array();
+ }
+
+ $files = array();
+ foreach ($iterator as $file_info)
+ {
+ if ($file_info->isDot())
+ {
+ continue;
+ }
+
+ // Do not scan some directories
+ if ($file_info->isDir() && (
+ ($path == '' && in_array($file_info->getFilename(), array('cache', 'develop', 'ext', 'files', 'language', 'store', 'vendor')))
+ || ($path == '/includes' && in_array($file_info->getFilename(), array('utf')))
+ || ($path == '/phpbb/db/migration' && in_array($file_info->getFilename(), array('data')))
+ || ($path == '/phpbb' && in_array($file_info->getFilename(), array('event')))
+ ))
+ {
+ continue;
+ }
+ else if ($file_info->isDir())
+ {
+ $sub_dir = get_file_list($file_info->getPath() . '/' . $file_info->getFilename(), $path . '/' . $file_info->getFilename());
+ foreach ($sub_dir as $file)
+ {
+ $files[] = $file_info->getFilename() . '/' . $file;
+ }
+ }
+ else if (substr($file_info->getFilename(), -4) == '.php')
+ {
+ $files[] = $file_info->getFilename();
+ }
+ }
+
+ return $files;
+}
+
+function validate_argument_count($arguments, $count)
+{
+ if ($arguments <= $count)
+ {
+ usage();
+ }
+}
+
+validate_argument_count($argc, 1);
+
+$action = $argv[1];
+
+switch ($action)
+{
+ case 'acp':
+ export_from_eventsmd($phpbb_root_path, 'acp');
+ break;
+
+ case 'styles':
+ export_from_eventsmd($phpbb_root_path, 'styles');
+ break;
+
+ case 'php':
+ export_from_php($phpbb_root_path);
+ break;
+
+ default:
+ usage();
+}
diff --git a/phpBB/develop/fill.php b/phpBB/develop/fill.php
index e0d054d073..696b1e31c0 100644
--- a/phpBB/develop/fill.php
+++ b/phpBB/develop/fill.php
@@ -38,8 +38,8 @@ $posts_per_topic = 500;
// general vars
-$mode = (isset($_REQUEST['mode'])) ? $_REQUEST['mode'] : 'generate';
-$start = (isset($_REQUEST['start'])) ? intval($_REQUEST['start']) : 0;
+$mode = request_var('mode', 'generate');
+$start = request_var('start', 0);
switch ($mode)
{
@@ -86,7 +86,7 @@ switch ($mode)
$topic_rows[] = "($topic_id, $forum_id, '$forum_id-$topic_id', " . (($topic_id % 34) ? '0' : '1') . ')';
- $sql = 'INSERT IGNORE INTO ' . POSTS_TABLE . ' (topic_id, forum_id, poster_id, post_subject, post_text, post_username, post_approved, post_time, post_reported)
+ $sql = 'INSERT IGNORE INTO ' . POSTS_TABLE . ' (topic_id, forum_id, poster_id, post_subject, post_text, post_username, post_visibility, post_time, post_reported)
VALUES ';
$rows = array();
@@ -183,5 +183,3 @@ function rndm_username()
return $usernames[array_rand($usernames)];
}
-
-?> \ No newline at end of file
diff --git a/phpBB/develop/generate_utf_casefold.php b/phpBB/develop/generate_utf_casefold.php
index 08f67c3eb6..ad511a6153 100644
--- a/phpBB/develop/generate_utf_casefold.php
+++ b/phpBB/develop/generate_utf_casefold.php
@@ -151,5 +151,3 @@ function download($url)
echo "\n";
}
-
-?> \ No newline at end of file
diff --git a/phpBB/develop/generate_utf_confusables.php b/phpBB/develop/generate_utf_confusables.php
index fd0439a4bb..763d8ee875 100644
--- a/phpBB/develop/generate_utf_confusables.php
+++ b/phpBB/develop/generate_utf_confusables.php
@@ -239,5 +239,3 @@ function download($url)
echo "\n";
}
-
-?> \ No newline at end of file
diff --git a/phpBB/develop/generate_utf_tables.php b/phpBB/develop/generate_utf_tables.php
index 6372270b78..e5d907d6a5 100644
--- a/phpBB/develop/generate_utf_tables.php
+++ b/phpBB/develop/generate_utf_tables.php
@@ -568,4 +568,4 @@ function cp_to_utf($cp)
{
return chr($cp);
}
-} \ No newline at end of file
+}
diff --git a/phpBB/develop/imageset_to_css.php b/phpBB/develop/imageset_to_css.php
new file mode 100644
index 0000000000..d49fe9c741
--- /dev/null
+++ b/phpBB/develop/imageset_to_css.php
@@ -0,0 +1,374 @@
+<?php
+
+/*
+ Converts imageset to CSS code
+
+ Change style name and path below, open in browser.
+*/
+
+$phpbb_root_path = '../';
+$style = 'subsilver2';
+
+$imageset_path = $phpbb_root_path . 'styles/' . $style . '/imageset';
+$theme_path = $phpbb_root_path . 'styles/' . $style . '/theme';
+
+// Start output buffering
+ob_start();
+
+// Get global and English images
+$images_global = get_imageset($imageset_path);
+if ($images_global === false)
+{
+ echo 'imageset.cfg was not found.';
+ echo ob_get_clean();
+ return;
+}
+$images_en = get_imageset($imageset_path, 'en');
+if ($images_en === false)
+{
+ echo 'English imageset.cfg was not found.';
+ echo ob_get_clean();
+ return;
+}
+
+// Remove duplicate images
+foreach ($images_en as $key => $row)
+{
+ unset($images_global[$key]);
+}
+
+// CSS replacements
+$not_compatible = array(
+ '{T_TEMPLATE_PATH}',
+ '{T_IMAGESET_PATH}',
+ '{T_IMAGESET_LANG_PATH}',
+ '{T_STYLESHEET_NAME}',
+ '{S_USER_LANG}'
+);
+$replace = array(
+ '{T_THEME_PATH}' => '.',
+);
+// Enable/disable one of lines below to enable/disable replacement of English buttons
+// $replace = array_merge($replace, get_replacements($images_global));
+$replace = array_merge($replace, get_replacements($images_global), get_replacements($images_en));
+
+// BIDI code
+$bidi_code = css($images_global, './images/', true);
+
+// Get all CSS files, parse them
+$files = list_files($theme_path, 'css');
+if ($files === false || !count($files))
+{
+ echo 'No CSS files found in theme directory.<br />';
+}
+else for ($i=0; $i<count($files); $i++)
+{
+ $file = $theme_path . '/' . $files[$i];
+ $data = file_get_contents($file);
+ $hash = md5($data);
+ $data = strtr($data, $replace);
+ $errors = false;
+ for($j=0; $j<count($not_compatible); $j++)
+ {
+ if (strpos($data, $not_compatible[$j]) !== false)
+ {
+ echo 'Error: ', $file, ' contains ', $not_compatible[$j], '. That variable cannot be converted.<br />';
+ continue;
+ }
+ }
+ if (basename($file) == 'bidi.css' && strpos($data, '/* Former imageset */') === false && strlen($bidi_code))
+ {
+ // Add bidi data
+ $data .= "\n/* Former imageset */\n" . $bidi_code;
+ $bidi_code = '';
+ echo 'Note: RTL imageset entries were added at the end of file below:<br />';
+ }
+ if (md5($data) == $hash)
+ {
+ echo 'Nothing to replace in ', $file, '<br />';
+ }
+ else
+ {
+ echo 'Updated ', $file, ':', dump_code($data, $files[$i]);
+ }
+}
+
+// Check if there are invalid images in imageset
+$list = array_merge($images_global, $images_en);
+foreach ($list as $key => $row)
+{
+ if ($row['skip'])
+ {
+ echo 'Unable to generate code to add to CSS files because some images are missing or invalid. See errors above.';
+ echo ob_get_clean();
+ return;
+ }
+}
+
+// Code to add to CSS files
+$code = '
+/* Former imageset */
+span.imageset {
+ display: inline-block;
+ background: transparent none 0 0 no-repeat;
+ margin: 0;
+ padding: 0;
+ width: 0;
+ height: 0;
+ overflow: hidden;
+}
+
+/* Global imageset items */
+' . css($images_global, './images/') . '
+
+/* English images for fallback */
+' . css($images_en, './en/');
+if (strlen($bidi_code))
+{
+ $code .= "\n/* RTL imageset entries */\n" . $bidi_code;
+}
+echo 'Code to add to CSS file:', dump_code($code, 'imageset.css');
+
+
+$list = list_languages($imageset_path);
+for ($i=0; $i<count($list); $i++)
+{
+ $lang = $list[$i];
+ $images = get_imageset($imageset_path . '/' . $lang);
+ if (!count($images))
+ {
+ continue;
+ }
+ $code = '/* ' . strtoupper($lang) . ' Language Pack */
+' . css($images, './');
+ echo 'New CSS file: ', $theme_path, '/', $lang, '/stylesheet.css', dump_code($code, 'stylesheet_' . $lang . '.css');
+}
+
+echo ob_get_clean();
+return;
+
+
+/*
+ Functions
+*/
+function get_imageset($path, $lang = '')
+{
+ $cfg = $path . ($lang ? '/' . $lang : '') . '/imageset.cfg';
+ if (!@file_exists($cfg))
+ {
+ return false;
+ }
+ $data = file($cfg);
+ $result = array();
+ for ($i=0; $i<count($data); $i++)
+ {
+ $str = trim($data[$i]);
+ if (substr($str, 0, 4) != 'img_')
+ {
+ continue;
+ }
+ $list = explode('=', $data[$i]);
+ if (count($list) != 2)
+ {
+ continue;
+ }
+ $key = trim($list[0]);
+ $row = explode('*', trim($list[1]));
+ $file = trim($row[0]);
+ $height = isset($row[1]) && intval($row[1]) ? intval($row[1]) : false;
+ $width = isset($row[2]) && intval($row[2]) ? intval($row[2]) : false;
+ $skip = false;
+ if (strlen($file) && (!$width || !$height))
+ {
+ // Try to detect width/height
+ $filename = $path . ($lang ? '/' . $lang : '') . '/' . $file;
+ if (!@file_exists($filename))
+ {
+ echo 'Error: file ', $filename, ' does not exist and its dimensions are not available in imageset.cfg<br />';
+ $skip = true;
+ }
+ else
+ {
+ $size = @getimagesize($filename);
+ if ($size === false)
+ {
+ echo 'Error: file ', $filename, ' is not a valid image<br />';
+ $skip = true;
+ }
+ else
+ {
+ if(!$width) $width = intval($size[0]);
+ if(!$height) $height = intval($size[1]);
+ }
+ }
+ }
+ $result[$key] = array(
+ 'lang' => $lang,
+ 'file' => $file,
+ 'height' => $height,
+ 'width' => $width,
+ 'skip' => $skip
+ );
+ }
+ return $result;
+}
+
+function get_replacements($list)
+{
+ $result = array();
+ foreach ($list as $key => $row)
+ {
+ $key = '{' . strtoupper($key);
+ $result[$key . '_SRC}'] = strlen($row['file']) ? ($row['lang'] ? './' . $row['lang'] : './images') . '/' . $row['file'] : '';
+ $result[$key . '_WIDTH}'] = intval($row['width']);
+ $result[$key . '_HEIGHT}'] = intval($row['height']);
+ }
+ return $result;
+}
+
+function list_files($dir, $ext)
+{
+ $res = @opendir($dir);
+ if ($res === false)
+ {
+ return false;
+ }
+ $files = array();
+ while (($file = readdir($res)) !== false)
+ {
+ $list = explode('.', $file);
+ if(count($list) > 1 && strtolower($list[count($list) - 1]) == $ext)
+ {
+ $files[] = $file;
+ }
+ }
+ closedir($res);
+ return $files;
+}
+
+function list_languages($dir)
+{
+ $res = @opendir($dir);
+ if ($res === false)
+ {
+ return array();
+ }
+ $files = array();
+ while (($file = readdir($res)) !== false)
+ {
+ if (substr($file, 0, 1) == '.')
+ {
+ continue;
+ }
+ $filename = $dir . '/' . $file;
+ if (is_dir($filename) && file_exists($filename . '/imageset.cfg'))
+ {
+ $files[] = $file;
+ }
+ }
+ closedir($res);
+ return $files;
+}
+
+function dump_code($code, $filename = 'file.txt')
+{
+ $hash = md5($code);
+ if (isset($_GET['download']) && $_GET['download'] === $hash)
+ {
+ // Download file
+ ob_end_clean();
+ header('Pragma: public');
+ header('Expires: 0');
+ header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
+ header('Content-Type: application/force-download');
+ header('Content-Disposition: attachment; filename="' . $filename . '";');
+ header('Content-Transfer-Encoding: binary');
+ header('Content-Length: ' . strlen($code));
+ echo $code;
+ exit;
+ }
+ $list = explode("\n", $code);
+ $height = 15 * count($list);
+ echo ' [ <a href="?download=', $hash, '">download</a> <a href="javascript:void(0);" onclick="document.getElementById(\'code-', $hash, '\').style.height = \'', $height, 'px\'; this.style.display = \'none\'; return false;">expand</a> ]<br />';
+ echo '<textarea id="code-', $hash, '" onfocus="this.select();" style="width: 98%; height: 200px;">', htmlspecialchars($code), '</textarea><br />';
+}
+
+function css($list, $path = './', $bidi = false)
+{
+ $code = '';
+ // Change value to true if you want images to be grouped up by size
+ $group = $bidi;
+ if ($group)
+ {
+ // group up images by size
+ $groups = array();
+ foreach ($list as $key => $row)
+ {
+ if (!strlen($row['file']))
+ {
+ continue;
+ }
+ $groups[$row['width'] . '*' . $row['height']][] = $key;
+ }
+ foreach ($groups as $size => $keys)
+ {
+ $extra = '';
+ for ($i=0; $i<count($keys); $i++)
+ {
+ $code .= ($i == 0 ? '' : ', ') . ($bidi ? '.rtl ' : '') . '.imageset.' . substr($keys[$i], 4);
+ if (!$bidi)
+ {
+ $extra .= '.imageset.' . substr($keys[$i], 4) . ' { background-image: url("' . $path . $list[$keys[$i]]['file'] . "\"); }\n";
+ }
+ }
+ $row = $list[$keys[0]];
+ $code .= ' {';
+ if ($bidi)
+ {
+ $code .= '
+ padding-right: ' . $row['width'] . 'px;
+ padding-left: 0;
+}
+';
+ }
+ else
+ {
+ $code .= '
+ padding-left: ' . $row['width'] . 'px;
+ padding-top: ' . $row['height'] . 'px;
+}
+' . $extra;
+ }
+ }
+ }
+ else
+ {
+ foreach ($list as $key => $row)
+ {
+ if (!strlen($row['file']))
+ {
+ continue;
+ }
+ $code .= ($bidi ? '.rtl ' : '') . '.imageset.' . substr($key, 4) . ' {';
+ if ($bidi)
+ {
+ $code .= '
+ padding-right: ' . $row['width'] . 'px;
+ padding-left: 0;
+}
+';
+ }
+ else
+ {
+ $code .= '
+ background-image: url("' . $path . $row['file'] . '");
+ padding-left: ' . $row['width'] . 'px;
+ padding-top: ' . $row['height'] . 'px;
+}
+';
+ }
+ }
+ }
+ return $code;
+}
+
diff --git a/phpBB/develop/lang_duplicates.php b/phpBB/develop/lang_duplicates.php
index 5be48f69f0..02852798b6 100644
--- a/phpBB/develop/lang_duplicates.php
+++ b/phpBB/develop/lang_duplicates.php
@@ -15,10 +15,8 @@ die("Please read the first lines of this script for instructions on how to enabl
// -------------------------------------------------------------
//
-// $Id$
-//
// @copyright (c) 2005 phpBB Group
-// @license http://opensource.org/licenses/gpl-license.php GNU Public License
+// @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
//
// -------------------------------------------------------------
// Thanks to arod-1
@@ -137,4 +135,4 @@ function find_modules($dirname)
?>
</body>
-</html> \ No newline at end of file
+</html>
diff --git a/phpBB/develop/merge_attachment_tables.php b/phpBB/develop/merge_attachment_tables.php
index 0186b3cc8b..a66a395afa 100644
--- a/phpBB/develop/merge_attachment_tables.php
+++ b/phpBB/develop/merge_attachment_tables.php
@@ -72,5 +72,3 @@ $db->sql_query($sql);
//$db->sql_query("DROP TABLE {$table_prefix}attach_temp");
echo "<p><b>Done</b></p>\n";
-
-?> \ No newline at end of file
diff --git a/phpBB/develop/merge_post_tables.php b/phpBB/develop/merge_post_tables.php
index 2d99d725d0..d687a292f2 100644
--- a/phpBB/develop/merge_post_tables.php
+++ b/phpBB/develop/merge_post_tables.php
@@ -50,7 +50,7 @@ switch ($db->sql_layer)
ADD PRIMARY KEY (post_id),
ADD INDEX topic_id (topic_id),
ADD INDEX poster_ip (poster_ip),
- ADD INDEX post_approved (post_approved),
+ ADD INDEX post_visibility (post_visibility),
MODIFY COLUMN post_id mediumint(8) UNSIGNED NOT NULL auto_increment,
ADD COLUMN post_encoding varchar(11) DEFAULT \'iso-8859-15\' NOT NULL';
break;
@@ -162,7 +162,7 @@ while ($row = $db->sql_fetchrow($result))
$forum_id = $row['forum_id'];
$sql_ary[] = "UPDATE " . $table_prefix . "forums
- SET forum_last_poster_id = " . ((!empty($row['user_id']) && $row['user_id'] != ANONYMOUS) ? $row['user_id'] : ANONYMOUS) . ", forum_last_poster_name = '" . ((!empty($row['user_id']) && $row['user_id'] != ANONYMOUS) ? addslashes($row['username']) : addslashes($row['post_username'])) . "', forum_last_post_time = " . $row['post_time'] . ", forum_posts = " . (($post_count[$forum_id]) ? $post_count[$forum_id] : 0) . ", forum_topics = " . (($topic_count[$forum_id]) ? $topic_count[$forum_id] : 0) . "
+ SET forum_last_poster_id = " . ((!empty($row['user_id']) && $row['user_id'] != ANONYMOUS) ? $row['user_id'] : ANONYMOUS) . ", forum_last_poster_name = '" . ((!empty($row['user_id']) && $row['user_id'] != ANONYMOUS) ? addslashes($row['username']) : addslashes($row['post_username'])) . "', forum_last_post_time = " . $row['post_time'] . ", forum_posts_approved = " . (($post_count[$forum_id]) ? $post_count[$forum_id] : 0) . ", forum_topics_approved = " . (($topic_count[$forum_id]) ? $topic_count[$forum_id] : 0) . "
WHERE forum_id = $forum_id";
$sql = "SELECT t.topic_id, u.username, u.user_id, u2.username as user2, u2.user_id as id2, p.post_username, p2.post_username AS post_username2, p2.post_time
@@ -193,5 +193,3 @@ foreach ($sql_ary as $sql)
}
echo "<p><b>Done</b></p>\n";
-
-?> \ No newline at end of file
diff --git a/phpBB/develop/migration_tips.php b/phpBB/develop/migration_tips.php
new file mode 100644
index 0000000000..51a579bdb5
--- /dev/null
+++ b/phpBB/develop/migration_tips.php
@@ -0,0 +1,42 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+// This is to help with creating migration files for new versions
+// Use this to find what migrations are not depended on by any other migration
+// (the current migration tree tips)
+
+define('IN_PHPBB', true);
+$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './../';
+$phpEx = substr(strrchr(__FILE__, '.'), 1);
+include($phpbb_root_path . 'common.' . $phpEx);
+
+$phpbb_extension_manager = $phpbb_container->get('ext.manager');
+$finder = $phpbb_extension_manager->get_finder();
+
+$migrations = $finder
+ ->core_path('phpbb/db/migration/data/')
+ ->get_classes();
+$tips = $migrations;
+
+foreach ($migrations as $migration_class)
+{
+ foreach ($migration_class::depends_on() as $dependency)
+ {
+ if (($tips_key = array_search($dependency, $tips)) !== false)
+ {
+ unset($tips[$tips_key]);
+ }
+ }
+}
+
+foreach ($tips as $migration)
+{
+ echo "\t\t\t'{$migration}',\n";
+}
+
diff --git a/phpBB/develop/mysql_upgrader.php b/phpBB/develop/mysql_upgrader.php
index dcf2f2c88b..eb34034826 100644
--- a/phpBB/develop/mysql_upgrader.php
+++ b/phpBB/develop/mysql_upgrader.php
@@ -56,68 +56,10 @@ echo "USE $dbname;$newline$newline";
@set_time_limit(0);
-$schema_data = get_schema_struct();
-$dbms_type_map = array(
- 'mysql_41' => array(
- 'INT:' => 'int(%d)',
- 'BINT' => 'bigint(20)',
- 'UINT' => 'mediumint(8) UNSIGNED',
- 'UINT:' => 'int(%d) UNSIGNED',
- 'TINT:' => 'tinyint(%d)',
- 'USINT' => 'smallint(4) UNSIGNED',
- 'BOOL' => 'tinyint(1) UNSIGNED',
- 'VCHAR' => 'varchar(255)',
- 'VCHAR:' => 'varchar(%d)',
- 'CHAR:' => 'char(%d)',
- 'XSTEXT' => 'text',
- 'XSTEXT_UNI'=> 'varchar(100)',
- 'STEXT' => 'text',
- 'STEXT_UNI' => 'varchar(255)',
- 'TEXT' => 'text',
- 'TEXT_UNI' => 'text',
- 'MTEXT' => 'mediumtext',
- 'MTEXT_UNI' => 'mediumtext',
- 'TIMESTAMP' => 'int(11) UNSIGNED',
- 'DECIMAL' => 'decimal(5,2)',
- 'DECIMAL:' => 'decimal(%d,2)',
- 'PDECIMAL' => 'decimal(6,3)',
- 'PDECIMAL:' => 'decimal(%d,3)',
- 'VCHAR_UNI' => 'varchar(255)',
- 'VCHAR_UNI:'=> 'varchar(%d)',
- 'VCHAR_CI' => 'varchar(255)',
- 'VARBINARY' => 'varbinary(255)',
- ),
+require($phpbb_root_path . 'includes/db/schema_data.' . $phpEx);
+require($phpbb_root_path . 'phpbb/db/tools.' . $phpEx);
- 'mysql_40' => array(
- 'INT:' => 'int(%d)',
- 'BINT' => 'bigint(20)',
- 'UINT' => 'mediumint(8) UNSIGNED',
- 'UINT:' => 'int(%d) UNSIGNED',
- 'TINT:' => 'tinyint(%d)',
- 'USINT' => 'smallint(4) UNSIGNED',
- 'BOOL' => 'tinyint(1) UNSIGNED',
- 'VCHAR' => 'varbinary(255)',
- 'VCHAR:' => 'varbinary(%d)',
- 'CHAR:' => 'binary(%d)',
- 'XSTEXT' => 'blob',
- 'XSTEXT_UNI'=> 'blob',
- 'STEXT' => 'blob',
- 'STEXT_UNI' => 'blob',
- 'TEXT' => 'blob',
- 'TEXT_UNI' => 'blob',
- 'MTEXT' => 'mediumblob',
- 'MTEXT_UNI' => 'mediumblob',
- 'TIMESTAMP' => 'int(11) UNSIGNED',
- 'DECIMAL' => 'decimal(5,2)',
- 'DECIMAL:' => 'decimal(%d,2)',
- 'PDECIMAL' => 'decimal(6,3)',
- 'PDECIMAL:' => 'decimal(%d,3)',
- 'VCHAR_UNI' => 'blob',
- 'VCHAR_UNI:'=> array('varbinary(%d)', 'limit' => array('mult', 3, 255, 'blob')),
- 'VCHAR_CI' => 'blob',
- 'VARBINARY' => 'varbinary(255)',
- ),
-);
+$dbms_type_map = phpbb\db\tools::get_dbms_type_map();
foreach ($schema_data as $table_name => $table_data)
{
@@ -176,7 +118,7 @@ foreach ($schema_data as $table_name => $table_data)
$column_type = $dbms_type_map['mysql_41'][$column_data[0]];
}
- // Adjust default value if db-dependant specified
+ // Adjust default value if db-dependent specified
if (is_array($column_data[1]))
{
$column_data[1] = (isset($column_data[1][$dbms])) ? $column_data[1][$dbms] : $column_data[1]['default'];
@@ -255,1164 +197,3 @@ foreach ($schema_data as $table_name => $table_data)
echo "ALTER TABLE $table_name ADD FULLTEXT (post_subject), ADD FULLTEXT (post_text), ADD FULLTEXT post_content (post_subject, post_text);{$newline}";
}
}
-
-/**
-* Define the basic structure
-* The format:
-* array('{TABLE_NAME}' => {TABLE_DATA})
-* {TABLE_DATA}:
-* COLUMNS = array({column_name} = array({column_type}, {default}, {auto_increment}))
-* PRIMARY_KEY = {column_name(s)}
-* KEYS = array({key_name} = array({key_type}, {column_name(s)})),
-*
-* Column Types:
-* INT:x => SIGNED int(x)
-* BINT => BIGINT
-* UINT => mediumint(8) UNSIGNED
-* UINT:x => int(x) UNSIGNED
-* TINT:x => tinyint(x)
-* USINT => smallint(4) UNSIGNED (for _order columns)
-* BOOL => tinyint(1) UNSIGNED
-* VCHAR => varchar(255)
-* CHAR:x => char(x)
-* XSTEXT_UNI => text for storing 100 characters (topic_title for example)
-* STEXT_UNI => text for storing 255 characters (normal input field with a max of 255 single-byte chars) - same as VCHAR_UNI
-* TEXT_UNI => text for storing 3000 characters (short text, descriptions, comments, etc.)
-* MTEXT_UNI => mediumtext (post text, large text)
-* VCHAR:x => varchar(x)
-* TIMESTAMP => int(11) UNSIGNED
-* DECIMAL => decimal number (5,2)
-* DECIMAL: => decimal number (x,2)
-* PDECIMAL => precision decimal number (6,3)
-* PDECIMAL: => precision decimal number (x,3)
-* VCHAR_UNI => varchar(255) BINARY
-* VCHAR_CI => varchar_ci for postgresql, others VCHAR
-*/
-function get_schema_struct()
-{
- $schema_data = array();
-
- $schema_data['phpbb_attachments'] = array(
- 'COLUMNS' => array(
- 'attach_id' => array('UINT', NULL, 'auto_increment'),
- 'post_msg_id' => array('UINT', 0),
- 'topic_id' => array('UINT', 0),
- 'in_message' => array('BOOL', 0),
- 'poster_id' => array('UINT', 0),
- 'is_orphan' => array('BOOL', 1),
- 'physical_filename' => array('VCHAR', ''),
- 'real_filename' => array('VCHAR', ''),
- 'download_count' => array('UINT', 0),
- 'attach_comment' => array('TEXT_UNI', ''),
- 'extension' => array('VCHAR:100', ''),
- 'mimetype' => array('VCHAR:100', ''),
- 'filesize' => array('UINT:20', 0),
- 'filetime' => array('TIMESTAMP', 0),
- 'thumbnail' => array('BOOL', 0),
- ),
- 'PRIMARY_KEY' => 'attach_id',
- 'KEYS' => array(
- 'filetime' => array('INDEX', 'filetime'),
- 'post_msg_id' => array('INDEX', 'post_msg_id'),
- 'topic_id' => array('INDEX', 'topic_id'),
- 'poster_id' => array('INDEX', 'poster_id'),
- 'is_orphan' => array('INDEX', 'is_orphan'),
- ),
- );
-
- $schema_data['phpbb_acl_groups'] = array(
- 'COLUMNS' => array(
- 'group_id' => array('UINT', 0),
- 'forum_id' => array('UINT', 0),
- 'auth_option_id' => array('UINT', 0),
- 'auth_role_id' => array('UINT', 0),
- 'auth_setting' => array('TINT:2', 0),
- ),
- 'KEYS' => array(
- 'group_id' => array('INDEX', 'group_id'),
- 'auth_opt_id' => array('INDEX', 'auth_option_id'),
- 'auth_role_id' => array('INDEX', 'auth_role_id'),
- ),
- );
-
- $schema_data['phpbb_acl_options'] = array(
- 'COLUMNS' => array(
- 'auth_option_id' => array('UINT', NULL, 'auto_increment'),
- 'auth_option' => array('VCHAR:50', ''),
- 'is_global' => array('BOOL', 0),
- 'is_local' => array('BOOL', 0),
- 'founder_only' => array('BOOL', 0),
- ),
- 'PRIMARY_KEY' => 'auth_option_id',
- 'KEYS' => array(
- 'auth_option' => array('UNIQUE', 'auth_option'),
- ),
- );
-
- $schema_data['phpbb_acl_roles'] = array(
- 'COLUMNS' => array(
- 'role_id' => array('UINT', NULL, 'auto_increment'),
- 'role_name' => array('VCHAR_UNI', ''),
- 'role_description' => array('TEXT_UNI', ''),
- 'role_type' => array('VCHAR:10', ''),
- 'role_order' => array('USINT', 0),
- ),
- 'PRIMARY_KEY' => 'role_id',
- 'KEYS' => array(
- 'role_type' => array('INDEX', 'role_type'),
- 'role_order' => array('INDEX', 'role_order'),
- ),
- );
-
- $schema_data['phpbb_acl_roles_data'] = array(
- 'COLUMNS' => array(
- 'role_id' => array('UINT', 0),
- 'auth_option_id' => array('UINT', 0),
- 'auth_setting' => array('TINT:2', 0),
- ),
- 'PRIMARY_KEY' => array('role_id', 'auth_option_id'),
- 'KEYS' => array(
- 'ath_op_id' => array('INDEX', 'auth_option_id'),
- ),
- );
-
- $schema_data['phpbb_acl_users'] = array(
- 'COLUMNS' => array(
- 'user_id' => array('UINT', 0),
- 'forum_id' => array('UINT', 0),
- 'auth_option_id' => array('UINT', 0),
- 'auth_role_id' => array('UINT', 0),
- 'auth_setting' => array('TINT:2', 0),
- ),
- 'KEYS' => array(
- 'user_id' => array('INDEX', 'user_id'),
- 'auth_option_id' => array('INDEX', 'auth_option_id'),
- 'auth_role_id' => array('INDEX', 'auth_role_id'),
- ),
- );
-
- $schema_data['phpbb_banlist'] = array(
- 'COLUMNS' => array(
- 'ban_id' => array('UINT', NULL, 'auto_increment'),
- 'ban_userid' => array('UINT', 0),
- 'ban_ip' => array('VCHAR:40', ''),
- 'ban_email' => array('VCHAR_UNI:100', ''),
- 'ban_start' => array('TIMESTAMP', 0),
- 'ban_end' => array('TIMESTAMP', 0),
- 'ban_exclude' => array('BOOL', 0),
- 'ban_reason' => array('VCHAR_UNI', ''),
- 'ban_give_reason' => array('VCHAR_UNI', ''),
- ),
- 'PRIMARY_KEY' => 'ban_id',
- 'KEYS' => array(
- 'ban_end' => array('INDEX', 'ban_end'),
- 'ban_user' => array('INDEX', array('ban_userid', 'ban_exclude')),
- 'ban_email' => array('INDEX', array('ban_email', 'ban_exclude')),
- 'ban_ip' => array('INDEX', array('ban_ip', 'ban_exclude')),
- ),
- );
-
- $schema_data['phpbb_bbcodes'] = array(
- 'COLUMNS' => array(
- 'bbcode_id' => array('USINT', 0),
- 'bbcode_tag' => array('VCHAR:16', ''),
- 'bbcode_helpline' => array('VCHAR_UNI', ''),
- 'display_on_posting' => array('BOOL', 0),
- 'bbcode_match' => array('TEXT_UNI', ''),
- 'bbcode_tpl' => array('MTEXT_UNI', ''),
- 'first_pass_match' => array('MTEXT_UNI', ''),
- 'first_pass_replace' => array('MTEXT_UNI', ''),
- 'second_pass_match' => array('MTEXT_UNI', ''),
- 'second_pass_replace' => array('MTEXT_UNI', ''),
- ),
- 'PRIMARY_KEY' => 'bbcode_id',
- 'KEYS' => array(
- 'display_on_post' => array('INDEX', 'display_on_posting'),
- ),
- );
-
- $schema_data['phpbb_bookmarks'] = array(
- 'COLUMNS' => array(
- 'topic_id' => array('UINT', 0),
- 'user_id' => array('UINT', 0),
- ),
- 'PRIMARY_KEY' => array('topic_id', 'user_id'),
- );
-
- $schema_data['phpbb_bots'] = array(
- 'COLUMNS' => array(
- 'bot_id' => array('UINT', NULL, 'auto_increment'),
- 'bot_active' => array('BOOL', 1),
- 'bot_name' => array('STEXT_UNI', ''),
- 'user_id' => array('UINT', 0),
- 'bot_agent' => array('VCHAR', ''),
- 'bot_ip' => array('VCHAR', ''),
- ),
- 'PRIMARY_KEY' => 'bot_id',
- 'KEYS' => array(
- 'bot_active' => array('INDEX', 'bot_active'),
- ),
- );
-
- $schema_data['phpbb_config'] = array(
- 'COLUMNS' => array(
- 'config_name' => array('VCHAR', ''),
- 'config_value' => array('VCHAR_UNI', ''),
- 'is_dynamic' => array('BOOL', 0),
- ),
- 'PRIMARY_KEY' => 'config_name',
- 'KEYS' => array(
- 'is_dynamic' => array('INDEX', 'is_dynamic'),
- ),
- );
-
- $schema_data['phpbb_confirm'] = array(
- 'COLUMNS' => array(
- 'confirm_id' => array('CHAR:32', ''),
- 'session_id' => array('CHAR:32', ''),
- 'confirm_type' => array('TINT:3', 0),
- 'code' => array('VCHAR:8', ''),
- 'seed' => array('UINT:10', 0),
- 'attempts' => array('UINT', 0),
- ),
- 'PRIMARY_KEY' => array('session_id', 'confirm_id'),
- 'KEYS' => array(
- 'confirm_type' => array('INDEX', 'confirm_type'),
- ),
- );
-
- $schema_data['phpbb_disallow'] = array(
- 'COLUMNS' => array(
- 'disallow_id' => array('UINT', NULL, 'auto_increment'),
- 'disallow_username' => array('VCHAR_UNI:255', ''),
- ),
- 'PRIMARY_KEY' => 'disallow_id',
- );
-
- $schema_data['phpbb_drafts'] = array(
- 'COLUMNS' => array(
- 'draft_id' => array('UINT', NULL, 'auto_increment'),
- 'user_id' => array('UINT', 0),
- 'topic_id' => array('UINT', 0),
- 'forum_id' => array('UINT', 0),
- 'save_time' => array('TIMESTAMP', 0),
- 'draft_subject' => array('STEXT_UNI', ''),
- 'draft_message' => array('MTEXT_UNI', ''),
- ),
- 'PRIMARY_KEY' => 'draft_id',
- 'KEYS' => array(
- 'save_time' => array('INDEX', 'save_time'),
- ),
- );
-
- $schema_data['phpbb_extensions'] = array(
- 'COLUMNS' => array(
- 'extension_id' => array('UINT', NULL, 'auto_increment'),
- 'group_id' => array('UINT', 0),
- 'extension' => array('VCHAR:100', ''),
- ),
- 'PRIMARY_KEY' => 'extension_id',
- );
-
- $schema_data['phpbb_extension_groups'] = array(
- 'COLUMNS' => array(
- 'group_id' => array('UINT', NULL, 'auto_increment'),
- 'group_name' => array('VCHAR_UNI', ''),
- 'cat_id' => array('TINT:2', 0),
- 'allow_group' => array('BOOL', 0),
- 'download_mode' => array('BOOL', 1),
- 'upload_icon' => array('VCHAR', ''),
- 'max_filesize' => array('UINT:20', 0),
- 'allowed_forums' => array('TEXT', ''),
- 'allow_in_pm' => array('BOOL', 0),
- ),
- 'PRIMARY_KEY' => 'group_id',
- );
-
- $schema_data['phpbb_forums'] = array(
- 'COLUMNS' => array(
- 'forum_id' => array('UINT', NULL, 'auto_increment'),
- 'parent_id' => array('UINT', 0),
- 'left_id' => array('UINT', 0),
- 'right_id' => array('UINT', 0),
- 'forum_parents' => array('MTEXT', ''),
- 'forum_name' => array('STEXT_UNI', ''),
- 'forum_desc' => array('TEXT_UNI', ''),
- 'forum_desc_bitfield' => array('VCHAR:255', ''),
- 'forum_desc_options' => array('UINT:11', 7),
- 'forum_desc_uid' => array('VCHAR:8', ''),
- 'forum_link' => array('VCHAR_UNI', ''),
- 'forum_password' => array('VCHAR_UNI:40', ''),
- 'forum_style' => array('UINT', 0),
- 'forum_image' => array('VCHAR', ''),
- 'forum_rules' => array('TEXT_UNI', ''),
- 'forum_rules_link' => array('VCHAR_UNI', ''),
- 'forum_rules_bitfield' => array('VCHAR:255', ''),
- 'forum_rules_options' => array('UINT:11', 7),
- 'forum_rules_uid' => array('VCHAR:8', ''),
- 'forum_topics_per_page' => array('TINT:4', 0),
- 'forum_type' => array('TINT:4', 0),
- 'forum_status' => array('TINT:4', 0),
- 'forum_posts' => array('UINT', 0),
- 'forum_topics' => array('UINT', 0),
- 'forum_topics_real' => array('UINT', 0),
- 'forum_last_post_id' => array('UINT', 0),
- 'forum_last_poster_id' => array('UINT', 0),
- 'forum_last_post_subject' => array('STEXT_UNI', ''),
- 'forum_last_post_time' => array('TIMESTAMP', 0),
- 'forum_last_poster_name'=> array('VCHAR_UNI', ''),
- 'forum_last_poster_colour'=> array('VCHAR:6', ''),
- 'forum_flags' => array('TINT:4', 32),
- 'forum_options' => array('UINT:20', 0),
- 'display_subforum_list' => array('BOOL', 1),
- 'display_on_index' => array('BOOL', 1),
- 'enable_indexing' => array('BOOL', 1),
- 'enable_icons' => array('BOOL', 1),
- 'enable_prune' => array('BOOL', 0),
- 'prune_next' => array('TIMESTAMP', 0),
- 'prune_days' => array('UINT', 0),
- 'prune_viewed' => array('UINT', 0),
- 'prune_freq' => array('UINT', 0),
- ),
- 'PRIMARY_KEY' => 'forum_id',
- 'KEYS' => array(
- 'left_right_id' => array('INDEX', array('left_id', 'right_id')),
- 'forum_lastpost_id' => array('INDEX', 'forum_last_post_id'),
- ),
- );
-
- $schema_data['phpbb_forums_access'] = array(
- 'COLUMNS' => array(
- 'forum_id' => array('UINT', 0),
- 'user_id' => array('UINT', 0),
- 'session_id' => array('CHAR:32', ''),
- ),
- 'PRIMARY_KEY' => array('forum_id', 'user_id', 'session_id'),
- );
-
- $schema_data['phpbb_forums_track'] = array(
- 'COLUMNS' => array(
- 'user_id' => array('UINT', 0),
- 'forum_id' => array('UINT', 0),
- 'mark_time' => array('TIMESTAMP', 0),
- ),
- 'PRIMARY_KEY' => array('user_id', 'forum_id'),
- );
-
- $schema_data['phpbb_forums_watch'] = array(
- 'COLUMNS' => array(
- 'forum_id' => array('UINT', 0),
- 'user_id' => array('UINT', 0),
- 'notify_status' => array('BOOL', 0),
- ),
- 'KEYS' => array(
- 'forum_id' => array('INDEX', 'forum_id'),
- 'user_id' => array('INDEX', 'user_id'),
- 'notify_stat' => array('INDEX', 'notify_status'),
- ),
- );
-
- $schema_data['phpbb_groups'] = array(
- 'COLUMNS' => array(
- 'group_id' => array('UINT', NULL, 'auto_increment'),
- 'group_type' => array('TINT:4', 1),
- 'group_founder_manage' => array('BOOL', 0),
- 'group_skip_auth' => array('BOOL', 0),
- 'group_name' => array('VCHAR_CI', ''),
- 'group_desc' => array('TEXT_UNI', ''),
- 'group_desc_bitfield' => array('VCHAR:255', ''),
- 'group_desc_options' => array('UINT:11', 7),
- 'group_desc_uid' => array('VCHAR:8', ''),
- 'group_display' => array('BOOL', 0),
- 'group_avatar' => array('VCHAR', ''),
- 'group_avatar_type' => array('TINT:2', 0),
- 'group_avatar_width' => array('USINT', 0),
- 'group_avatar_height' => array('USINT', 0),
- 'group_rank' => array('UINT', 0),
- 'group_colour' => array('VCHAR:6', ''),
- 'group_sig_chars' => array('UINT', 0),
- 'group_receive_pm' => array('BOOL', 0),
- 'group_message_limit' => array('UINT', 0),
- 'group_max_recipients' => array('UINT', 0),
- 'group_legend' => array('BOOL', 1),
- ),
- 'PRIMARY_KEY' => 'group_id',
- 'KEYS' => array(
- 'group_legend_name' => array('INDEX', array('group_legend', 'group_name')),
- ),
- );
-
- $schema_data['phpbb_icons'] = array(
- 'COLUMNS' => array(
- 'icons_id' => array('UINT', NULL, 'auto_increment'),
- 'icons_url' => array('VCHAR', ''),
- 'icons_width' => array('TINT:4', 0),
- 'icons_height' => array('TINT:4', 0),
- 'icons_order' => array('UINT', 0),
- 'display_on_posting' => array('BOOL', 1),
- ),
- 'PRIMARY_KEY' => 'icons_id',
- 'KEYS' => array(
- 'display_on_posting' => array('INDEX', 'display_on_posting'),
- ),
- );
-
- $schema_data['phpbb_lang'] = array(
- 'COLUMNS' => array(
- 'lang_id' => array('TINT:4', NULL, 'auto_increment'),
- 'lang_iso' => array('VCHAR:30', ''),
- 'lang_dir' => array('VCHAR:30', ''),
- 'lang_english_name' => array('VCHAR_UNI:100', ''),
- 'lang_local_name' => array('VCHAR_UNI:255', ''),
- 'lang_author' => array('VCHAR_UNI:255', ''),
- ),
- 'PRIMARY_KEY' => 'lang_id',
- 'KEYS' => array(
- 'lang_iso' => array('INDEX', 'lang_iso'),
- ),
- );
-
- $schema_data['phpbb_log'] = array(
- 'COLUMNS' => array(
- 'log_id' => array('UINT', NULL, 'auto_increment'),
- 'log_type' => array('TINT:4', 0),
- 'user_id' => array('UINT', 0),
- 'forum_id' => array('UINT', 0),
- 'topic_id' => array('UINT', 0),
- 'reportee_id' => array('UINT', 0),
- 'log_ip' => array('VCHAR:40', ''),
- 'log_time' => array('TIMESTAMP', 0),
- 'log_operation' => array('TEXT_UNI', ''),
- 'log_data' => array('MTEXT_UNI', ''),
- ),
- 'PRIMARY_KEY' => 'log_id',
- 'KEYS' => array(
- 'log_type' => array('INDEX', 'log_type'),
- 'forum_id' => array('INDEX', 'forum_id'),
- 'topic_id' => array('INDEX', 'topic_id'),
- 'reportee_id' => array('INDEX', 'reportee_id'),
- 'user_id' => array('INDEX', 'user_id'),
- ),
- );
-
- $schema_data['phpbb_login_attempts'] = array(
- 'COLUMNS' => array(
- 'attempt_ip' => array('VCHAR:40', ''),
- 'attempt_browser' => array('VCHAR:150', ''),
- 'attempt_forwarded_for' => array('VCHAR:255', ''),
- 'attempt_time' => array('TIMESTAMP', 0),
- 'user_id' => array('UINT', 0),
- 'username' => array('VCHAR_UNI:255', 0),
- 'username_clean' => array('VCHAR_CI', 0),
- ),
- 'KEYS' => array(
- 'att_ip' => array('INDEX', array('attempt_ip', 'attempt_time')),
- 'att_for' => array('INDEX', array('attempt_forwarded_for', 'attempt_time')),
- 'att_time' => array('INDEX', array('attempt_time')),
- 'user_id' => array('INDEX', 'user_id'),
- ),
- );
-
- $schema_data['phpbb_moderator_cache'] = array(
- 'COLUMNS' => array(
- 'forum_id' => array('UINT', 0),
- 'user_id' => array('UINT', 0),
- 'username' => array('VCHAR_UNI:255', ''),
- 'group_id' => array('UINT', 0),
- 'group_name' => array('VCHAR_UNI', ''),
- 'display_on_index' => array('BOOL', 1),
- ),
- 'KEYS' => array(
- 'disp_idx' => array('INDEX', 'display_on_index'),
- 'forum_id' => array('INDEX', 'forum_id'),
- ),
- );
-
- $schema_data['phpbb_modules'] = array(
- 'COLUMNS' => array(
- 'module_id' => array('UINT', NULL, 'auto_increment'),
- 'module_enabled' => array('BOOL', 1),
- 'module_display' => array('BOOL', 1),
- 'module_basename' => array('VCHAR', ''),
- 'module_class' => array('VCHAR:10', ''),
- 'parent_id' => array('UINT', 0),
- 'left_id' => array('UINT', 0),
- 'right_id' => array('UINT', 0),
- 'module_langname' => array('VCHAR', ''),
- 'module_mode' => array('VCHAR', ''),
- 'module_auth' => array('VCHAR', ''),
- ),
- 'PRIMARY_KEY' => 'module_id',
- 'KEYS' => array(
- 'left_right_id' => array('INDEX', array('left_id', 'right_id')),
- 'module_enabled' => array('INDEX', 'module_enabled'),
- 'class_left_id' => array('INDEX', array('module_class', 'left_id')),
- ),
- );
-
- $schema_data['phpbb_poll_options'] = array(
- 'COLUMNS' => array(
- 'poll_option_id' => array('TINT:4', 0),
- 'topic_id' => array('UINT', 0),
- 'poll_option_text' => array('TEXT_UNI', ''),
- 'poll_option_total' => array('UINT', 0),
- ),
- 'KEYS' => array(
- 'poll_opt_id' => array('INDEX', 'poll_option_id'),
- 'topic_id' => array('INDEX', 'topic_id'),
- ),
- );
-
- $schema_data['phpbb_poll_votes'] = array(
- 'COLUMNS' => array(
- 'topic_id' => array('UINT', 0),
- 'poll_option_id' => array('TINT:4', 0),
- 'vote_user_id' => array('UINT', 0),
- 'vote_user_ip' => array('VCHAR:40', ''),
- ),
- 'KEYS' => array(
- 'topic_id' => array('INDEX', 'topic_id'),
- 'vote_user_id' => array('INDEX', 'vote_user_id'),
- 'vote_user_ip' => array('INDEX', 'vote_user_ip'),
- ),
- );
-
- $schema_data['phpbb_posts'] = array(
- 'COLUMNS' => array(
- 'post_id' => array('UINT', NULL, 'auto_increment'),
- 'topic_id' => array('UINT', 0),
- 'forum_id' => array('UINT', 0),
- 'poster_id' => array('UINT', 0),
- 'icon_id' => array('UINT', 0),
- 'poster_ip' => array('VCHAR:40', ''),
- 'post_time' => array('TIMESTAMP', 0),
- 'post_approved' => array('BOOL', 1),
- 'post_reported' => array('BOOL', 0),
- 'enable_bbcode' => array('BOOL', 1),
- 'enable_smilies' => array('BOOL', 1),
- 'enable_magic_url' => array('BOOL', 1),
- 'enable_sig' => array('BOOL', 1),
- 'post_username' => array('VCHAR_UNI:255', ''),
- 'post_subject' => array('STEXT_UNI', '', 'true_sort'),
- 'post_text' => array('MTEXT_UNI', ''),
- 'post_checksum' => array('VCHAR:32', ''),
- 'post_attachment' => array('BOOL', 0),
- 'bbcode_bitfield' => array('VCHAR:255', ''),
- 'bbcode_uid' => array('VCHAR:8', ''),
- 'post_postcount' => array('BOOL', 1),
- 'post_edit_time' => array('TIMESTAMP', 0),
- 'post_edit_reason' => array('STEXT_UNI', ''),
- 'post_edit_user' => array('UINT', 0),
- 'post_edit_count' => array('USINT', 0),
- 'post_edit_locked' => array('BOOL', 0),
- ),
- 'PRIMARY_KEY' => 'post_id',
- 'KEYS' => array(
- 'forum_id' => array('INDEX', 'forum_id'),
- 'topic_id' => array('INDEX', 'topic_id'),
- 'poster_ip' => array('INDEX', 'poster_ip'),
- 'poster_id' => array('INDEX', 'poster_id'),
- 'post_approved' => array('INDEX', 'post_approved'),
- 'post_username' => array('INDEX', 'post_username'),
- 'tid_post_time' => array('INDEX', array('topic_id', 'post_time')),
- ),
- );
-
- $schema_data['phpbb_privmsgs'] = array(
- 'COLUMNS' => array(
- 'msg_id' => array('UINT', NULL, 'auto_increment'),
- 'root_level' => array('UINT', 0),
- 'author_id' => array('UINT', 0),
- 'icon_id' => array('UINT', 0),
- 'author_ip' => array('VCHAR:40', ''),
- 'message_time' => array('TIMESTAMP', 0),
- 'enable_bbcode' => array('BOOL', 1),
- 'enable_smilies' => array('BOOL', 1),
- 'enable_magic_url' => array('BOOL', 1),
- 'enable_sig' => array('BOOL', 1),
- 'message_subject' => array('STEXT_UNI', ''),
- 'message_text' => array('MTEXT_UNI', ''),
- 'message_edit_reason' => array('STEXT_UNI', ''),
- 'message_edit_user' => array('UINT', 0),
- 'message_attachment' => array('BOOL', 0),
- 'bbcode_bitfield' => array('VCHAR:255', ''),
- 'bbcode_uid' => array('VCHAR:8', ''),
- 'message_edit_time' => array('TIMESTAMP', 0),
- 'message_edit_count' => array('USINT', 0),
- 'to_address' => array('TEXT_UNI', ''),
- 'bcc_address' => array('TEXT_UNI', ''),
- 'message_reported' => array('BOOL', 0),
- ),
- 'PRIMARY_KEY' => 'msg_id',
- 'KEYS' => array(
- 'author_ip' => array('INDEX', 'author_ip'),
- 'message_time' => array('INDEX', 'message_time'),
- 'author_id' => array('INDEX', 'author_id'),
- 'root_level' => array('INDEX', 'root_level'),
- ),
- );
-
- $schema_data['phpbb_privmsgs_folder'] = array(
- 'COLUMNS' => array(
- 'folder_id' => array('UINT', NULL, 'auto_increment'),
- 'user_id' => array('UINT', 0),
- 'folder_name' => array('VCHAR_UNI', ''),
- 'pm_count' => array('UINT', 0),
- ),
- 'PRIMARY_KEY' => 'folder_id',
- 'KEYS' => array(
- 'user_id' => array('INDEX', 'user_id'),
- ),
- );
-
- $schema_data['phpbb_privmsgs_rules'] = array(
- 'COLUMNS' => array(
- 'rule_id' => array('UINT', NULL, 'auto_increment'),
- 'user_id' => array('UINT', 0),
- 'rule_check' => array('UINT', 0),
- 'rule_connection' => array('UINT', 0),
- 'rule_string' => array('VCHAR_UNI', ''),
- 'rule_user_id' => array('UINT', 0),
- 'rule_group_id' => array('UINT', 0),
- 'rule_action' => array('UINT', 0),
- 'rule_folder_id' => array('INT:11', 0),
- ),
- 'PRIMARY_KEY' => 'rule_id',
- 'KEYS' => array(
- 'user_id' => array('INDEX', 'user_id'),
- ),
- );
-
- $schema_data['phpbb_privmsgs_to'] = array(
- 'COLUMNS' => array(
- 'msg_id' => array('UINT', 0),
- 'user_id' => array('UINT', 0),
- 'author_id' => array('UINT', 0),
- 'pm_deleted' => array('BOOL', 0),
- 'pm_new' => array('BOOL', 1),
- 'pm_unread' => array('BOOL', 1),
- 'pm_replied' => array('BOOL', 0),
- 'pm_marked' => array('BOOL', 0),
- 'pm_forwarded' => array('BOOL', 0),
- 'folder_id' => array('INT:11', 0),
- ),
- 'KEYS' => array(
- 'msg_id' => array('INDEX', 'msg_id'),
- 'author_id' => array('INDEX', 'author_id'),
- 'usr_flder_id' => array('INDEX', array('user_id', 'folder_id')),
- ),
- );
-
- $schema_data['phpbb_profile_fields'] = array(
- 'COLUMNS' => array(
- 'field_id' => array('UINT', NULL, 'auto_increment'),
- 'field_name' => array('VCHAR_UNI', ''),
- 'field_type' => array('TINT:4', 0),
- 'field_ident' => array('VCHAR:20', ''),
- 'field_length' => array('VCHAR:20', ''),
- 'field_minlen' => array('VCHAR', ''),
- 'field_maxlen' => array('VCHAR', ''),
- 'field_novalue' => array('VCHAR_UNI', ''),
- 'field_default_value' => array('VCHAR_UNI', ''),
- 'field_validation' => array('VCHAR_UNI:20', ''),
- 'field_required' => array('BOOL', 0),
- 'field_show_novalue' => array('BOOL', 0),
- 'field_show_on_reg' => array('BOOL', 0),
- 'field_show_on_vt' => array('BOOL', 0),
- 'field_show_profile' => array('BOOL', 0),
- 'field_hide' => array('BOOL', 0),
- 'field_no_view' => array('BOOL', 0),
- 'field_active' => array('BOOL', 0),
- 'field_order' => array('UINT', 0),
- ),
- 'PRIMARY_KEY' => 'field_id',
- 'KEYS' => array(
- 'fld_type' => array('INDEX', 'field_type'),
- 'fld_ordr' => array('INDEX', 'field_order'),
- ),
- );
-
- $schema_data['phpbb_profile_fields_data'] = array(
- 'COLUMNS' => array(
- 'user_id' => array('UINT', 0),
- ),
- 'PRIMARY_KEY' => 'user_id',
- );
-
- $schema_data['phpbb_profile_fields_lang'] = array(
- 'COLUMNS' => array(
- 'field_id' => array('UINT', 0),
- 'lang_id' => array('UINT', 0),
- 'option_id' => array('UINT', 0),
- 'field_type' => array('TINT:4', 0),
- 'lang_value' => array('VCHAR_UNI', ''),
- ),
- 'PRIMARY_KEY' => array('field_id', 'lang_id', 'option_id'),
- );
-
- $schema_data['phpbb_profile_lang'] = array(
- 'COLUMNS' => array(
- 'field_id' => array('UINT', 0),
- 'lang_id' => array('UINT', 0),
- 'lang_name' => array('VCHAR_UNI', ''),
- 'lang_explain' => array('TEXT_UNI', ''),
- 'lang_default_value' => array('VCHAR_UNI', ''),
- ),
- 'PRIMARY_KEY' => array('field_id', 'lang_id'),
- );
-
- $schema_data['phpbb_ranks'] = array(
- 'COLUMNS' => array(
- 'rank_id' => array('UINT', NULL, 'auto_increment'),
- 'rank_title' => array('VCHAR_UNI', ''),
- 'rank_min' => array('UINT', 0),
- 'rank_special' => array('BOOL', 0),
- 'rank_image' => array('VCHAR', ''),
- ),
- 'PRIMARY_KEY' => 'rank_id',
- );
-
- $schema_data['phpbb_reports'] = array(
- 'COLUMNS' => array(
- 'report_id' => array('UINT', NULL, 'auto_increment'),
- 'reason_id' => array('USINT', 0),
- 'post_id' => array('UINT', 0),
- 'pm_id' => array('UINT', 0),
- 'user_id' => array('UINT', 0),
- 'user_notify' => array('BOOL', 0),
- 'report_closed' => array('BOOL', 0),
- 'report_time' => array('TIMESTAMP', 0),
- 'report_text' => array('MTEXT_UNI', ''),
- ),
- 'PRIMARY_KEY' => 'report_id',
- 'KEYS' => array(
- 'post_id' => array('INDEX', 'post_id'),
- 'pm_id' => array('INDEX', 'pm_id'),
- ),
- );
-
- $schema_data['phpbb_reports_reasons'] = array(
- 'COLUMNS' => array(
- 'reason_id' => array('USINT', NULL, 'auto_increment'),
- 'reason_title' => array('VCHAR_UNI', ''),
- 'reason_description' => array('MTEXT_UNI', ''),
- 'reason_order' => array('USINT', 0),
- ),
- 'PRIMARY_KEY' => 'reason_id',
- );
-
- $schema_data['phpbb_search_results'] = array(
- 'COLUMNS' => array(
- 'search_key' => array('VCHAR:32', ''),
- 'search_time' => array('TIMESTAMP', 0),
- 'search_keywords' => array('MTEXT_UNI', ''),
- 'search_authors' => array('MTEXT', ''),
- ),
- 'PRIMARY_KEY' => 'search_key',
- );
-
- $schema_data['phpbb_search_wordlist'] = array(
- 'COLUMNS' => array(
- 'word_id' => array('UINT', NULL, 'auto_increment'),
- 'word_text' => array('VCHAR_UNI', ''),
- 'word_common' => array('BOOL', 0),
- 'word_count' => array('UINT', 0),
- ),
- 'PRIMARY_KEY' => 'word_id',
- 'KEYS' => array(
- 'wrd_txt' => array('UNIQUE', 'word_text'),
- 'wrd_cnt' => array('INDEX', 'word_count'),
- ),
- );
-
- $schema_data['phpbb_search_wordmatch'] = array(
- 'COLUMNS' => array(
- 'post_id' => array('UINT', 0),
- 'word_id' => array('UINT', 0),
- 'title_match' => array('BOOL', 0),
- ),
- 'KEYS' => array(
- 'unq_mtch' => array('UNIQUE', array('word_id', 'post_id', 'title_match')),
- 'word_id' => array('INDEX', 'word_id'),
- 'post_id' => array('INDEX', 'post_id'),
- ),
- );
-
- $schema_data['phpbb_sessions'] = array(
- 'COLUMNS' => array(
- 'session_id' => array('CHAR:32', ''),
- 'session_user_id' => array('UINT', 0),
- 'session_forum_id' => array('UINT', 0),
- 'session_last_visit' => array('TIMESTAMP', 0),
- 'session_start' => array('TIMESTAMP', 0),
- 'session_time' => array('TIMESTAMP', 0),
- 'session_ip' => array('VCHAR:40', ''),
- 'session_browser' => array('VCHAR:150', ''),
- 'session_forwarded_for' => array('VCHAR:255', ''),
- 'session_page' => array('VCHAR_UNI', ''),
- 'session_viewonline' => array('BOOL', 1),
- 'session_autologin' => array('BOOL', 0),
- 'session_admin' => array('BOOL', 0),
- ),
- 'PRIMARY_KEY' => 'session_id',
- 'KEYS' => array(
- 'session_time' => array('INDEX', 'session_time'),
- 'session_user_id' => array('INDEX', 'session_user_id'),
- 'session_fid' => array('INDEX', 'session_forum_id'),
- ),
- );
-
- $schema_data['phpbb_sessions_keys'] = array(
- 'COLUMNS' => array(
- 'key_id' => array('CHAR:32', ''),
- 'user_id' => array('UINT', 0),
- 'last_ip' => array('VCHAR:40', ''),
- 'last_login' => array('TIMESTAMP', 0),
- ),
- 'PRIMARY_KEY' => array('key_id', 'user_id'),
- 'KEYS' => array(
- 'last_login' => array('INDEX', 'last_login'),
- ),
- );
-
- $schema_data['phpbb_sitelist'] = array(
- 'COLUMNS' => array(
- 'site_id' => array('UINT', NULL, 'auto_increment'),
- 'site_ip' => array('VCHAR:40', ''),
- 'site_hostname' => array('VCHAR', ''),
- 'ip_exclude' => array('BOOL', 0),
- ),
- 'PRIMARY_KEY' => 'site_id',
- );
-
- $schema_data['phpbb_smilies'] = array(
- 'COLUMNS' => array(
- 'smiley_id' => array('UINT', NULL, 'auto_increment'),
- // We may want to set 'code' to VCHAR:50 or check if unicode support is possible... at the moment only ASCII characters are allowed.
- 'code' => array('VCHAR_UNI:50', ''),
- 'emotion' => array('VCHAR_UNI:50', ''),
- 'smiley_url' => array('VCHAR:50', ''),
- 'smiley_width' => array('USINT', 0),
- 'smiley_height' => array('USINT', 0),
- 'smiley_order' => array('UINT', 0),
- 'display_on_posting'=> array('BOOL', 1),
- ),
- 'PRIMARY_KEY' => 'smiley_id',
- 'KEYS' => array(
- 'display_on_post' => array('INDEX', 'display_on_posting'),
- ),
- );
-
- $schema_data['phpbb_styles'] = array(
- 'COLUMNS' => array(
- 'style_id' => array('UINT', NULL, 'auto_increment'),
- 'style_name' => array('VCHAR_UNI:255', ''),
- 'style_copyright' => array('VCHAR_UNI', ''),
- 'style_active' => array('BOOL', 1),
- 'template_id' => array('UINT', 0),
- 'theme_id' => array('UINT', 0),
- 'imageset_id' => array('UINT', 0),
- ),
- 'PRIMARY_KEY' => 'style_id',
- 'KEYS' => array(
- 'style_name' => array('UNIQUE', 'style_name'),
- 'template_id' => array('INDEX', 'template_id'),
- 'theme_id' => array('INDEX', 'theme_id'),
- 'imageset_id' => array('INDEX', 'imageset_id'),
- ),
- );
-
- $schema_data['phpbb_styles_template'] = array(
- 'COLUMNS' => array(
- 'template_id' => array('UINT', NULL, 'auto_increment'),
- 'template_name' => array('VCHAR_UNI:255', ''),
- 'template_copyright' => array('VCHAR_UNI', ''),
- 'template_path' => array('VCHAR:100', ''),
- 'bbcode_bitfield' => array('VCHAR:255', 'kNg='),
- 'template_storedb' => array('BOOL', 0),
- 'template_inherits_id' => array('UINT:4', 0),
- 'template_inherit_path' => array('VCHAR', ''),
- ),
- 'PRIMARY_KEY' => 'template_id',
- 'KEYS' => array(
- 'tmplte_nm' => array('UNIQUE', 'template_name'),
- ),
- );
-
- $schema_data['phpbb_styles_template_data'] = array(
- 'COLUMNS' => array(
- 'template_id' => array('UINT', 0),
- 'template_filename' => array('VCHAR:100', ''),
- 'template_included' => array('TEXT', ''),
- 'template_mtime' => array('TIMESTAMP', 0),
- 'template_data' => array('MTEXT_UNI', ''),
- ),
- 'KEYS' => array(
- 'tid' => array('INDEX', 'template_id'),
- 'tfn' => array('INDEX', 'template_filename'),
- ),
- );
-
- $schema_data['phpbb_styles_theme'] = array(
- 'COLUMNS' => array(
- 'theme_id' => array('UINT', NULL, 'auto_increment'),
- 'theme_name' => array('VCHAR_UNI:255', ''),
- 'theme_copyright' => array('VCHAR_UNI', ''),
- 'theme_path' => array('VCHAR:100', ''),
- 'theme_storedb' => array('BOOL', 0),
- 'theme_mtime' => array('TIMESTAMP', 0),
- 'theme_data' => array('MTEXT_UNI', ''),
- ),
- 'PRIMARY_KEY' => 'theme_id',
- 'KEYS' => array(
- 'theme_name' => array('UNIQUE', 'theme_name'),
- ),
- );
-
- $schema_data['phpbb_styles_imageset'] = array(
- 'COLUMNS' => array(
- 'imageset_id' => array('UINT', NULL, 'auto_increment'),
- 'imageset_name' => array('VCHAR_UNI:255', ''),
- 'imageset_copyright' => array('VCHAR_UNI', ''),
- 'imageset_path' => array('VCHAR:100', ''),
- ),
- 'PRIMARY_KEY' => 'imageset_id',
- 'KEYS' => array(
- 'imgset_nm' => array('UNIQUE', 'imageset_name'),
- ),
- );
-
- $schema_data['phpbb_styles_imageset_data'] = array(
- 'COLUMNS' => array(
- 'image_id' => array('UINT', NULL, 'auto_increment'),
- 'image_name' => array('VCHAR:200', ''),
- 'image_filename' => array('VCHAR:200', ''),
- 'image_lang' => array('VCHAR:30', ''),
- 'image_height' => array('USINT', 0),
- 'image_width' => array('USINT', 0),
- 'imageset_id' => array('UINT', 0),
- ),
- 'PRIMARY_KEY' => 'image_id',
- 'KEYS' => array(
- 'i_d' => array('INDEX', 'imageset_id'),
- ),
- );
-
- $schema_data['phpbb_topics'] = array(
- 'COLUMNS' => array(
- 'topic_id' => array('UINT', NULL, 'auto_increment'),
- 'forum_id' => array('UINT', 0),
- 'icon_id' => array('UINT', 0),
- 'topic_attachment' => array('BOOL', 0),
- 'topic_approved' => array('BOOL', 1),
- 'topic_reported' => array('BOOL', 0),
- 'topic_title' => array('STEXT_UNI', '', 'true_sort'),
- 'topic_poster' => array('UINT', 0),
- 'topic_time' => array('TIMESTAMP', 0),
- 'topic_time_limit' => array('TIMESTAMP', 0),
- 'topic_views' => array('UINT', 0),
- 'topic_replies' => array('UINT', 0),
- 'topic_replies_real' => array('UINT', 0),
- 'topic_status' => array('TINT:3', 0),
- 'topic_type' => array('TINT:3', 0),
- 'topic_first_post_id' => array('UINT', 0),
- 'topic_first_poster_name' => array('VCHAR_UNI', ''),
- 'topic_first_poster_colour' => array('VCHAR:6', ''),
- 'topic_last_post_id' => array('UINT', 0),
- 'topic_last_poster_id' => array('UINT', 0),
- 'topic_last_poster_name' => array('VCHAR_UNI', ''),
- 'topic_last_poster_colour' => array('VCHAR:6', ''),
- 'topic_last_post_subject' => array('STEXT_UNI', ''),
- 'topic_last_post_time' => array('TIMESTAMP', 0),
- 'topic_last_view_time' => array('TIMESTAMP', 0),
- 'topic_moved_id' => array('UINT', 0),
- 'topic_bumped' => array('BOOL', 0),
- 'topic_bumper' => array('UINT', 0),
- 'poll_title' => array('STEXT_UNI', ''),
- 'poll_start' => array('TIMESTAMP', 0),
- 'poll_length' => array('TIMESTAMP', 0),
- 'poll_max_options' => array('TINT:4', 1),
- 'poll_last_vote' => array('TIMESTAMP', 0),
- 'poll_vote_change' => array('BOOL', 0),
- ),
- 'PRIMARY_KEY' => 'topic_id',
- 'KEYS' => array(
- 'forum_id' => array('INDEX', 'forum_id'),
- 'forum_id_type' => array('INDEX', array('forum_id', 'topic_type')),
- 'last_post_time' => array('INDEX', 'topic_last_post_time'),
- 'topic_approved' => array('INDEX', 'topic_approved'),
- 'forum_appr_last' => array('INDEX', array('forum_id', 'topic_approved', 'topic_last_post_id')),
- 'fid_time_moved' => array('INDEX', array('forum_id', 'topic_last_post_time', 'topic_moved_id')),
- ),
- );
-
- $schema_data['phpbb_topics_track'] = array(
- 'COLUMNS' => array(
- 'user_id' => array('UINT', 0),
- 'topic_id' => array('UINT', 0),
- 'forum_id' => array('UINT', 0),
- 'mark_time' => array('TIMESTAMP', 0),
- ),
- 'PRIMARY_KEY' => array('user_id', 'topic_id'),
- 'KEYS' => array(
- 'topic_id' => array('INDEX', 'topic_id'),
- 'forum_id' => array('INDEX', 'forum_id'),
- ),
- );
-
- $schema_data['phpbb_topics_posted'] = array(
- 'COLUMNS' => array(
- 'user_id' => array('UINT', 0),
- 'topic_id' => array('UINT', 0),
- 'topic_posted' => array('BOOL', 0),
- ),
- 'PRIMARY_KEY' => array('user_id', 'topic_id'),
- );
-
- $schema_data['phpbb_topics_watch'] = array(
- 'COLUMNS' => array(
- 'topic_id' => array('UINT', 0),
- 'user_id' => array('UINT', 0),
- 'notify_status' => array('BOOL', 0),
- ),
- 'KEYS' => array(
- 'topic_id' => array('INDEX', 'topic_id'),
- 'user_id' => array('INDEX', 'user_id'),
- 'notify_stat' => array('INDEX', 'notify_status'),
- ),
- );
-
- $schema_data['phpbb_user_group'] = array(
- 'COLUMNS' => array(
- 'group_id' => array('UINT', 0),
- 'user_id' => array('UINT', 0),
- 'group_leader' => array('BOOL', 0),
- 'user_pending' => array('BOOL', 1),
- ),
- 'KEYS' => array(
- 'group_id' => array('INDEX', 'group_id'),
- 'user_id' => array('INDEX', 'user_id'),
- 'group_leader' => array('INDEX', 'group_leader'),
- ),
- );
-
- $schema_data['phpbb_users'] = array(
- 'COLUMNS' => array(
- 'user_id' => array('UINT', NULL, 'auto_increment'),
- 'user_type' => array('TINT:2', 0),
- 'group_id' => array('UINT', 3),
- 'user_permissions' => array('MTEXT', ''),
- 'user_perm_from' => array('UINT', 0),
- 'user_ip' => array('VCHAR:40', ''),
- 'user_regdate' => array('TIMESTAMP', 0),
- 'username' => array('VCHAR_CI', ''),
- 'username_clean' => array('VCHAR_CI', ''),
- 'user_password' => array('VCHAR_UNI:40', ''),
- 'user_passchg' => array('TIMESTAMP', 0),
- 'user_pass_convert' => array('BOOL', 0),
- 'user_email' => array('VCHAR_UNI:100', ''),
- 'user_email_hash' => array('BINT', 0),
- 'user_birthday' => array('VCHAR:10', ''),
- 'user_lastvisit' => array('TIMESTAMP', 0),
- 'user_lastmark' => array('TIMESTAMP', 0),
- 'user_lastpost_time' => array('TIMESTAMP', 0),
- 'user_lastpage' => array('VCHAR_UNI:200', ''),
- 'user_last_confirm_key' => array('VCHAR:10', ''),
- 'user_last_search' => array('TIMESTAMP', 0),
- 'user_warnings' => array('TINT:4', 0),
- 'user_last_warning' => array('TIMESTAMP', 0),
- 'user_login_attempts' => array('TINT:4', 0),
- 'user_inactive_reason' => array('TINT:2', 0),
- 'user_inactive_time' => array('TIMESTAMP', 0),
- 'user_posts' => array('UINT', 0),
- 'user_lang' => array('VCHAR:30', ''),
- 'user_timezone' => array('DECIMAL', 0),
- 'user_dst' => array('BOOL', 0),
- 'user_dateformat' => array('VCHAR_UNI:30', 'd M Y H:i'),
- 'user_style' => array('UINT', 0),
- 'user_rank' => array('UINT', 0),
- 'user_colour' => array('VCHAR:6', ''),
- 'user_new_privmsg' => array('INT:4', 0),
- 'user_unread_privmsg' => array('INT:4', 0),
- 'user_last_privmsg' => array('TIMESTAMP', 0),
- 'user_message_rules' => array('BOOL', 0),
- 'user_full_folder' => array('INT:11', -3),
- 'user_emailtime' => array('TIMESTAMP', 0),
- 'user_topic_show_days' => array('USINT', 0),
- 'user_topic_sortby_type' => array('VCHAR:1', 't'),
- 'user_topic_sortby_dir' => array('VCHAR:1', 'd'),
- 'user_post_show_days' => array('USINT', 0),
- 'user_post_sortby_type' => array('VCHAR:1', 't'),
- 'user_post_sortby_dir' => array('VCHAR:1', 'a'),
- 'user_notify' => array('BOOL', 0),
- 'user_notify_pm' => array('BOOL', 1),
- 'user_notify_type' => array('TINT:4', 0),
- 'user_allow_pm' => array('BOOL', 1),
- 'user_allow_viewonline' => array('BOOL', 1),
- 'user_allow_viewemail' => array('BOOL', 1),
- 'user_allow_massemail' => array('BOOL', 1),
- 'user_options' => array('UINT:11', 230271),
- 'user_avatar' => array('VCHAR', ''),
- 'user_avatar_type' => array('TINT:2', 0),
- 'user_avatar_width' => array('USINT', 0),
- 'user_avatar_height' => array('USINT', 0),
- 'user_sig' => array('MTEXT_UNI', ''),
- 'user_sig_bbcode_uid' => array('VCHAR:8', ''),
- 'user_sig_bbcode_bitfield' => array('VCHAR:255', ''),
- 'user_from' => array('VCHAR_UNI:100', ''),
- 'user_icq' => array('VCHAR:15', ''),
- 'user_aim' => array('VCHAR_UNI', ''),
- 'user_yim' => array('VCHAR_UNI', ''),
- 'user_msnm' => array('VCHAR_UNI', ''),
- 'user_jabber' => array('VCHAR_UNI', ''),
- 'user_website' => array('VCHAR_UNI:200', ''),
- 'user_occ' => array('TEXT_UNI', ''),
- 'user_interests' => array('TEXT_UNI', ''),
- 'user_actkey' => array('VCHAR:32', ''),
- 'user_newpasswd' => array('VCHAR_UNI:40', ''),
- 'user_form_salt' => array('VCHAR_UNI:32', ''),
- 'user_new' => array('BOOL', 1),
- 'user_reminded' => array('TINT:4', 0),
- 'user_reminded_time' => array('TIMESTAMP', 0),
- ),
- 'PRIMARY_KEY' => 'user_id',
- 'KEYS' => array(
- 'user_birthday' => array('INDEX', 'user_birthday'),
- 'user_email_hash' => array('INDEX', 'user_email_hash'),
- 'user_type' => array('INDEX', 'user_type'),
- 'username_clean' => array('UNIQUE', 'username_clean'),
- ),
- );
-
- $schema_data['phpbb_warnings'] = array(
- 'COLUMNS' => array(
- 'warning_id' => array('UINT', NULL, 'auto_increment'),
- 'user_id' => array('UINT', 0),
- 'post_id' => array('UINT', 0),
- 'log_id' => array('UINT', 0),
- 'warning_time' => array('TIMESTAMP', 0),
- ),
- 'PRIMARY_KEY' => 'warning_id',
- );
-
- $schema_data['phpbb_words'] = array(
- 'COLUMNS' => array(
- 'word_id' => array('UINT', NULL, 'auto_increment'),
- 'word' => array('VCHAR_UNI', ''),
- 'replacement' => array('VCHAR_UNI', ''),
- ),
- 'PRIMARY_KEY' => 'word_id',
- );
-
- $schema_data['phpbb_zebra'] = array(
- 'COLUMNS' => array(
- 'user_id' => array('UINT', 0),
- 'zebra_id' => array('UINT', 0),
- 'friend' => array('BOOL', 0),
- 'foe' => array('BOOL', 0),
- ),
- 'PRIMARY_KEY' => array('user_id', 'zebra_id'),
- );
-
- return $schema_data;
-}
diff --git a/phpBB/develop/namespacify.php b/phpBB/develop/namespacify.php
new file mode 100644
index 0000000000..4e460eead8
--- /dev/null
+++ b/phpBB/develop/namespacify.php
@@ -0,0 +1,189 @@
+<?php
+/**
+*
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+//
+// Security message:
+//
+// This script is potentially dangerous.
+// Remove or comment the next line (die(".... ) to enable this script.
+// Do NOT FORGET to either remove this script or disable it after you have used it.
+//
+die("Please read the first lines of this script for instructions on how to enable it");
+
+$namespace_dir = realpath(__DIR__ . '/../phpbb/');
+$code_dir = realpath(__DIR__ . '/../');
+$test_dir = realpath(__DIR__ . '/../../tests/');
+$config_dir = realpath(__DIR__ . '/../config/');
+
+function map_class_name($old_class_name, $code_dir)
+{
+ $parts = explode('_', $old_class_name);
+ $cur_dir = array();
+ $cur_name = array();
+ $in_name = false;
+ foreach ($parts as $i => $part)
+ {
+ if (empty($part))
+ {
+ return null;
+ }
+
+ if (!$in_name)
+ {
+ $new_dir = array_merge($cur_dir, array($part));
+ $path = $code_dir . '/' . implode('/', $new_dir);
+
+ if (file_exists($path) && is_dir($path))
+ {
+ $cur_dir = $new_dir;
+ }
+ else
+ {
+ $in_name = true;
+ $cur_name[] = $part;
+ }
+ }
+ else
+ {
+ $cur_name[] = $part;
+ }
+ }
+
+ if (empty($cur_name) && !empty($cur_dir))
+ {
+ $cur_name[] = $cur_dir[count($cur_dir) - 1];
+ }
+
+ if (file_exists($code_dir . '/' . implode('/', $cur_dir) . '/' . implode('_', $cur_name) . '.php'))
+ {
+ return implode('\\', $cur_dir) . '\\' . implode('_', $cur_name);
+ }
+
+ return null;
+}
+
+$iterator = new \AppendIterator();
+$iterator->append(new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($code_dir)));
+$iterator->append(new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($test_dir)));
+$iterator->append(new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($config_dir)));
+
+foreach ($iterator as $file)
+{
+ if (substr($file->getPath(), 0, 6) === 'vendor')
+ {
+ continue;
+ }
+
+ if ($file->getExtension() == 'php')
+ {
+ $code = file_get_contents($file->getPathname());
+ $namespaced_file = false;
+
+ if (preg_match('#^' . preg_quote($namespace_dir, '#') . '#', $file->getPath()))
+ {
+ if (preg_match('#^(?:interface|(?:abstract )?class) (phpbb_[a-z0-9_]+)#m', $code, $matches))
+ {
+ $old_class_name = $matches[1];
+ $dirs = explode(DIRECTORY_SEPARATOR, preg_replace('#^' . preg_quote(dirname($namespace_dir) . DIRECTORY_SEPARATOR, '#') . '#', '', $file->getPath()));
+
+ $namespace = implode('\\', $dirs);
+
+ if ($dirs[count($dirs) - 1] == substr($file->getFilename(), 0, -4))
+ {
+ $class_name = preg_replace('#^' . preg_quote(implode('_', $dirs), '#') . '#', $dirs[count($dirs) - 1], $old_class_name);
+ }
+ else
+ {
+ $class_name = preg_replace('#^' . preg_quote(implode('_', $dirs), '#') . '_#', '', $old_class_name);
+ }
+
+ $code = preg_replace("#^\*/$#m", "*/\n\nnamespace $namespace;", $code, 1, $count);
+ if ($count != 1)
+ {
+ die("Incorrect replacement count for namespace of $old_class_name");
+ }
+ $code = preg_replace("#^(interface|(?:abstract )?class) $old_class_name#m", "\\1 $class_name", $code, -1, $count);
+ if ($count != 1)
+ {
+ die("Incorrect replacement count for $old_class_name");
+ }
+
+ $namespaced_file = true;
+ }
+ }
+
+ if (preg_match_all('#[^a-z0-9_$](phpbb_[a-z0-9_]+)#', $code, $matches))
+ {
+ foreach ($matches[1] as $old_class_name)
+ {
+ $class_name = map_class_name($old_class_name, $code_dir);
+ if ($class_name)
+ {
+ $code = preg_replace("#([^a-z0-9_\$>])$old_class_name([^a-z0-9_])#", '\\1\\\\' . $class_name . '\\2', $code);
+ }
+ }
+ }
+
+ if ($namespaced_file)
+ {
+ $code = preg_replace('#new ([a-zA-Z0-9_][a-zA-Z0-9_\\\\]+)#', 'new \\\\\\1', $code);
+ $code = preg_replace('#([^a-zA-Z0-9_\\\\$])([a-zA-Z0-9_][a-zA-Z0-9_\\\\]+)::#', '\\1\\\\\\2::', $code);
+ $code = preg_replace('#catch \(([a-zA-Z0-9_][a-zA-Z0-9_\\\\]+)#', 'catch (\\\\\\1', $code);
+ $code = preg_replace('#(\(|, )([a-zA-Z0-9_][a-zA-Z0-9_\\\\]+)(\s\$)#', '\\1\\\\\\2\\3', $code);
+ $code = preg_replace('#(implements |extends )([a-zA-Z0-9_][a-zA-Z0-9_\\\\]+)(?=\s*(?:,|\n))#', '\\1\\\\\\2', $code);
+ $abs_classes = array(
+ 'Countable',
+ 'IteratorAggregate',
+ 'ArrayAccess',
+ );
+ $code = preg_replace('#(\s+)(' . implode('|', $abs_classes) . ')#', '\\1\\\\\\2', $code);
+ $rel_classes = array(
+ 'ContainerBuilder',
+ 'YamlFileLoader',
+ 'FileLocator',
+ 'Extension',
+ 'CompilerPassInterface',
+ 'EventSubscriberInterface',
+ 'EventDispatcherInterface',
+ 'ContainerAwareEventDispatcher',
+ 'ContainerInterface',
+ 'KernelEvents',
+ 'RouteCollection',
+ 'ControllerResolverInterface',
+ 'Request',
+ 'include',
+ 'array',
+ 'parent',
+ 'self',
+ );
+ $code = preg_replace('#([^a-zA-Z0-9_])\\\\((?:' . implode('|', $rel_classes) . ')(?:\s|\(|::|;))#', '\\1\\2', $code);
+ }
+
+ file_put_contents($file->getPathname(), $code);
+ }
+
+ if ($file->getExtension() == 'yml')
+ {
+ $code = file_get_contents($file->getPathname());
+
+ if (preg_match_all('#\s*class:\s*(phpbb_[a-z0-9_]+)\s+#', $code, $matches))
+ {
+ foreach ($matches[1] as $old_class_name)
+ {
+ $class_name = map_class_name($old_class_name, $code_dir);
+ if ($class_name)
+ {
+ $code = preg_replace("#(\s*class:\s*)$old_class_name(\s+)#", "\\1$class_name\\2", $code);
+ }
+ }
+ }
+
+ file_put_contents($file->getPathname(), $code);
+ }
+}
+
diff --git a/phpBB/develop/nuke-db.php b/phpBB/develop/nuke-db.php
index d7329c3f56..e1f64a6177 100644
--- a/phpBB/develop/nuke-db.php
+++ b/phpBB/develop/nuke-db.php
@@ -54,5 +54,3 @@ else
flush();
}
}
-?>
-
diff --git a/phpBB/develop/regex.php b/phpBB/develop/regex.php
index 8165ba1f21..46b6fff701 100644
--- a/phpBB/develop/regex.php
+++ b/phpBB/develop/regex.php
@@ -80,5 +80,3 @@ echo 'www.URL: ' . $www_url . "<br />\n";
// no schema and no authority
$relative_url = "$segment$path_abempty(?:\?$query)?(?:\#$fragment)?";
echo 'relative URL: ' . $relative_url . "<br />\n";
-
-?> \ No newline at end of file
diff --git a/phpBB/develop/remove-php-end-tags.py b/phpBB/develop/remove-php-end-tags.py
new file mode 100755
index 0000000000..89b9ee5032
--- /dev/null
+++ b/phpBB/develop/remove-php-end-tags.py
@@ -0,0 +1,65 @@
+#!/usr/bin/env python
+# Remove ending PHP tags '?>'
+# @author Oleg Pudeyev
+# @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+
+import sys, os, os.path, optparse
+
+def error(message, code):
+ print >>sys.stderr, message
+ exit(code)
+
+
+parser = optparse.OptionParser()
+parser.add_option('-a', '--aggressive', help='Remove ending tags when they are followed by whitespace', action='store_true')
+options, args = parser.parse_args()
+
+if len(args) != 1:
+ parser.usage()
+ error("Usage: remove-php-end-tags path", 2)
+
+path = args[0]
+
+if not os.path.exists(path):
+ error("Path does not exist: %s" % path, 3)
+
+if options.aggressive:
+ import re
+
+ fix_re = re.compile(r'\s*\?>\s*$')
+ def fix_content(content):
+ content = fix_re.sub(r'\n', content)
+ return content
+else:
+ def fix_content(content):
+ if content.endswith('?>'):
+ content = content[:-2].strip() + "\n"
+ return content
+
+def process_file(path):
+ f = open(path)
+ try:
+ content = f.read()
+ finally:
+ f.close()
+ fixed_content = fix_content(content)
+ if content != fixed_content:
+ f = open(path, 'w')
+ try:
+ f.write(fixed_content)
+ finally:
+ f.close()
+
+def process_dir(path):
+ for root, dirs, files in os.walk(path):
+ if '.svn' in dirs:
+ dirs.remove('.svn')
+ for file in files:
+ if file.endswith('.php'):
+ path = os.path.join(root, file)
+ process_file(path)
+
+if os.path.isdir(path):
+ process_dir(path)
+else:
+ process_file(path)
diff --git a/phpBB/develop/rename_interfaces.php b/phpBB/develop/rename_interfaces.php
new file mode 100644
index 0000000000..11989350bb
--- /dev/null
+++ b/phpBB/develop/rename_interfaces.php
@@ -0,0 +1,51 @@
+<?php
+/**
+*
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+//
+// Security message:
+//
+// This script is potentially dangerous.
+// Remove or comment the next line (die(".... ) to enable this script.
+// Do NOT FORGET to either remove this script or disable it after you have used it.
+//
+die("Please read the first lines of this script for instructions on how to enable it");
+
+$code_dir = realpath(__DIR__ . '/../');
+$test_dir = realpath(__DIR__ . '/../../tests/');
+$iterator = new \AppendIterator();
+$iterator->append(new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($code_dir)));
+$iterator->append(new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($test_dir)));
+
+$map = array(
+ 'phpbb\request\request_interface' => 'phpbb\request\request_interface',
+ 'phpbb\auth\provider\provider_interface' => 'phpbb\auth\provider\provider_interface',
+ 'phpbb\avatar\driver\driver_interface' => 'phpbb\avatar\driver\driver_interface',
+ 'phpbb\cache\driver\driver_interface' => 'phpbb\cache\driver\driver_interface',
+ 'phpbb\db\migration\tool\tool_interface' => 'phpbb\db\migration\tool\tool_interface',
+ 'phpbb\extension\extension_interface' => 'phpbb\extension\extension_interface',
+ 'phpbb\groupposition\groupposition_interface' => 'phpbb\groupposition\groupposition_interface',
+ 'phpbb\log\log_interface' => 'phpbb\log\log_interface',
+ 'phpbb\notification\method\method_interface' => 'phpbb\notification\method\method_interface',
+ 'phpbb\notification\type\type_interface' => 'phpbb\notification\type\type_interface',
+ 'phpbb\request\request_interface' => 'phpbb\request\request_interface',
+ 'phpbb\tree\tree_interface' => 'phpbb\tree\tree_interface',
+);
+
+foreach ($iterator as $file)
+{
+ if ($file->getExtension() == 'php')
+ {
+ $code = file_get_contents($file->getPathname());
+
+ foreach ($map as $orig => $new)
+ {
+ $code = preg_replace("#([^a-z0-9_\$])$orig([^a-z0-9_])#i", '\\1' . $new . '\\2', $code);
+ }
+ file_put_contents($file->getPathname(), $code);
+ }
+}
diff --git a/phpBB/develop/repair_bots.php b/phpBB/develop/repair_bots.php
index c5aaa75d9b..2c6e9ce091 100644
--- a/phpBB/develop/repair_bots.php
+++ b/phpBB/develop/repair_bots.php
@@ -128,7 +128,7 @@ function add_bots($bots)
'user_email' => '',
'user_lang' => $config['default_lang'],
'user_style' => 1,
- 'user_timezone' => 0,
+ 'user_timezone' => 'UTC',
'user_allow_massemail' => 0,
);
@@ -147,5 +147,3 @@ function add_bots($bots)
}
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/develop/search_fill.php b/phpBB/develop/search_fill.php
index 371c8c74cc..2a4dfb212c 100644
--- a/phpBB/develop/search_fill.php
+++ b/phpBB/develop/search_fill.php
@@ -34,15 +34,13 @@ $user->setup();
$search_type = $config['search_type'];
-if (!file_exists($phpbb_root_path . 'includes/search/' . $search_type . '.' . $phpEx))
+if (!class_exists($search_type))
{
trigger_error('NO_SUCH_SEARCH_MODULE');
}
-require($phpbb_root_path . 'includes/search/' . $search_type . '.' . $phpEx);
-
$error = false;
-$search = new $search_type($error);
+$search = new $search_type($error, $phpbb_root_path, $phpEx, $auth, $config, $db, $user);
if ($error)
{
diff --git a/phpBB/develop/unicode_testing.php b/phpBB/develop/unicode_testing.php
index 25a13d1325..ec3c71d078 100644
--- a/phpBB/develop/unicode_testing.php
+++ b/phpBB/develop/unicode_testing.php
@@ -116,5 +116,3 @@ function utf8_normalize_nfkc($strings)
return $strings;
}
-
-?> \ No newline at end of file
diff --git a/phpBB/develop/update_email_hash.php b/phpBB/develop/update_email_hash.php
index 80fd4bbc17..57aebe3ca0 100644
--- a/phpBB/develop/update_email_hash.php
+++ b/phpBB/develop/update_email_hash.php
@@ -54,4 +54,3 @@ echo 'FINISHED';
// Done
$db->sql_close();
-?> \ No newline at end of file
diff --git a/phpBB/develop/utf_normalizer_test.php b/phpBB/develop/utf_normalizer_test.php
index b8709888fe..af8556507f 100644
--- a/phpBB/develop/utf_normalizer_test.php
+++ b/phpBB/develop/utf_normalizer_test.php
@@ -387,4 +387,4 @@ function cp_to_utf($cp)
{
return chr($cp);
}
-} \ No newline at end of file
+}
diff --git a/phpBB/docs/AUTHORS b/phpBB/docs/AUTHORS
index 465c4de397..5ca52c19c0 100644
--- a/phpBB/docs/AUTHORS
+++ b/phpBB/docs/AUTHORS
@@ -78,9 +78,15 @@ phpMyAdmin (c) 2001,2003 phpMyAdmin Devel team, http://www.phpmyadmin.net/
Jabber Class (c) 2006 Flyspray.org, http://www.flyspray.org/
Chora (c) 2000-2006, The Horde Project. http://horde.org/chora/
Horde Project (c) 2000-2006, The Horde Project. http://horde.org/
+jQuery (c) 2011, John Resig. http://jquery.com/
+Sphinx Technologies Inc (c) 2001-2012 Andrew Aksyonoff, http://sphinxsearch.com/
+Plupload (c) 2010-2013 Moxiecode Systems AB, http://www.plupload.com/
PHP License, version 3.0:
Pear (c) 2001-2004 PHP Group, http://pear.php.net
Text_Diff-0.2.1 http://pear.php.net/package/Text_Diff
+MIT licenced:
+Symfony2 (c) 2004-2011 Fabien Potencier, http://symfony.com/
+
diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html
index 71795f83ac..17f1327a96 100644
--- a/phpBB/docs/CHANGELOG.html
+++ b/phpBB/docs/CHANGELOG.html
@@ -1,16 +1,9 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en" xml:lang="en">
+<!DOCTYPE html>
+<html dir="ltr" lang="en">
<head>
-
-<meta http-equiv="content-type" content="text/html; charset=utf-8" />
-<meta http-equiv="content-style-type" content="text/css" />
-<meta http-equiv="content-language" content="en" />
-<meta http-equiv="imagetoolbar" content="no" />
-<meta name="resource-type" content="document" />
-<meta name="distribution" content="global" />
-<meta name="copyright" content="phpBB Group" />
+<meta charset="utf-8">
<meta name="keywords" content="" />
-<meta name="description" content="phpBB 3.0.x Changelog" />
+<meta name="description" content="phpBB 3.1.x Changelog" />
<title>phpBB3 &bull; Changelog</title>
<link href="stylesheet.css" rel="stylesheet" type="text/css" media="screen, projection" />
@@ -27,7 +20,7 @@
<div id="doc-description">
<a href="../index.php" id="logo"><img src="site_logo.gif" alt="" /></a>
- <h1>phpBB 3.0.x Changelog</h1>
+ <h1>phpBB 3.1.x Changelog</h1>
<p style="display: none;"><a href="#start_here">Skip</a></p>
</div>
@@ -41,7 +34,7 @@
<!-- BEGIN DOCUMENT -->
-<p>This is a non-exhaustive (but still near complete) changelog for phpBB 3.0.x including release candidate versions. Our thanks to all those people who've contributed bug reports and code fixes.</p>
+<p>This is a non-exhaustive (but still near complete) changelog for phpBB 3.1.x including release candidate versions. Our thanks to all those people who've contributed bug reports and code fixes.</p>
<h1>Changelog</h1>
@@ -53,6 +46,10 @@
<ol>
<li><a href="#changelog">Changelog</a>
<ol style="list-style-type: lower-roman;">
+ <li><a href="#v310a3">Changes since 3.1.0-a3</a></li>
+ <li><a href="#v310a2">Changes since 3.1.0-a2</a></li>
+ <li><a href="#v310a1">Changes since 3.1.0-a1</a></li>
+ <li><a href="#v30x">Changes since 3.0.x</a></li>
<li><a href="#v3011">Changes since 3.0.11</a></li>
<li><a href="#v3010">Changes since 3.0.10</a></li>
<li><a href="#v309">Changes since 3.0.9</a></li>
@@ -93,7 +90,1019 @@
<div class="content">
- <a name="v3011"></a><h3>1.i. Changes since 3.0.11</h3>
+ <a name="v310a3"></a><h3>1.i. Changes since 3.1.0-a3</h3>
+
+ <h4>Bug</h4>
+ <ul>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-8041">PHPBB3-8041</a>] - Do not concatenate the destination to L_RETURN_TO to allow better translations</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-8122">PHPBB3-8122</a>] - Reviewing topics/posts - not correctly displayed</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-8785">PHPBB3-8785</a>] - PM recipients/bcc list looks bad</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-8919">PHPBB3-8919</a>] - Localisation imageset being refreshed too frequently causing broken images</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-9106">PHPBB3-9106</a>] - Upload fails to complete for large files.</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-9420">PHPBB3-9420</a>] - BBCode - Unable to use a proper URI token</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-9459">PHPBB3-9459</a>] - Visiting ACP with screen resolution 800x600px</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10175">PHPBB3-10175</a>] - Class loader cannot find a/b_foo.php when a/b/bar.php exists</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10338">PHPBB3-10338</a>] - Attachments list is displayed incorrectly</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10722">PHPBB3-10722</a>] - Code Coverage generation fails</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11038">PHPBB3-11038</a>] - Does not correctly find module info classes using new naming conventions</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11146">PHPBB3-11146</a>] - MCP topic/post approval error</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11151">PHPBB3-11151</a>] - Can use negative start for memberlist.php</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11218">PHPBB3-11218</a>] - File upload functional test fails</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11255">PHPBB3-11255</a>] - Some tests do not run standalone due to dbal dependency on global $cache</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11271">PHPBB3-11271</a>] - Images in ATOM feed display, but attached inline images do not.</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11288">PHPBB3-11288</a>] - &quot;Fulltext native&quot; search fooled by hyphens</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11364">PHPBB3-11364</a>] - Add an easy-to-switch system for app.php?controller= vs mod-rewrite usage in append_sid</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11429">PHPBB3-11429</a>] - Extensions should increment assets number on enable</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11581">PHPBB3-11581</a>] - General Error in UCP if PMs are disabled in ACP</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11625">PHPBB3-11625</a>] - General Error accessing MCP from Global Announcement</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11648">PHPBB3-11648</a>] - Test suite creates files in phpBB directory</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11787">PHPBB3-11787</a>] - Permission language strings use samp for highlight instead of strong</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11880">PHPBB3-11880</a>] - Schema changes can take too long and cause a timeout</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11938">PHPBB3-11938</a>] - Use of deprecated sql_attr_str2ordinal in sphinx.conf</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12003">PHPBB3-12003</a>] - ACP broken when error thrown</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12072">PHPBB3-12072</a>] - Missing word &quot;send&quot; in comment in schema_data.sql</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12078">PHPBB3-12078</a>] - &quot;Can permanently delete own posts&quot; permission has no effect</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12080">PHPBB3-12080</a>] - Responsive design in ACP / User Administration / Signature needs fixing</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12093">PHPBB3-12093</a>] - IE 11 javascript selection is no longer supported</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12126">PHPBB3-12126</a>] - Alert box is aligned to the left instead of center in IE</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12132">PHPBB3-12132</a>] - viewtopic_print_head_append template event is missing in subsilver2</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12134">PHPBB3-12134</a>] - ucp_pm_viewmessage_print_head_append template event is missing in subsilver2</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12136">PHPBB3-12136</a>] - Call to undefined function generate_pagination() in functions_posting.php</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12138">PHPBB3-12138</a>] - Information and pagination of filtered attachments</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12139">PHPBB3-12139</a>] - Spaces missing after $show_guests in viewonline.php</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12141">PHPBB3-12141</a>] - Travis tests fail on 5.5</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12149">PHPBB3-12149</a>] - Division by zero in [ROOT] -/phpbb/pagination.php</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12153">PHPBB3-12153</a>] - PAGE_NUMBER should be assigned by pagination.generate_template_pagination()</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12158">PHPBB3-12158</a>] - pagination.validate_start() returns negative value when $num_items = 0</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12168">PHPBB3-12168</a>] - Nav Header Links Alignment Issues without small-icon</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12170">PHPBB3-12170</a>] - Migration helper replaces table name with 0 when creating tables</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12171">PHPBB3-12171</a>] - Attachments from soft-deleted posts are still downloadable</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12172">PHPBB3-12172</a>] - &quot;Download all attachments&quot; feature leaks post/pm attachments when being able to download one of them</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12175">PHPBB3-12175</a>] - Fix and run functional upload tests</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12176">PHPBB3-12176</a>] - No error shown when attempting to delete a founder</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12183">PHPBB3-12183</a>] - Update user_newpasswd column in users table for passwords manager</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12184">PHPBB3-12184</a>] - Undefined variable tpl_fields in profile field manager on memberlist</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12188">PHPBB3-12188</a>] - Add php 5.6 to travis tests</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12192">PHPBB3-12192</a>] - Avatars in PM report closed notifications are broken</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12194">PHPBB3-12194</a>] - Unknown column 'field_show_novalue' in 'field list' [1054] -</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12200">PHPBB3-12200</a>] - Profile field template files missing in adm/style</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12202">PHPBB3-12202</a>] - Variables read from style.cfg etc. should be htmlspecialchared</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12203">PHPBB3-12203</a>] - user_occ does not have a default value when registering</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12205">PHPBB3-12205</a>] - Custom Profile Field display bug</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12206">PHPBB3-12206</a>] - Errors in plupload doesn't pull lang vars right</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12207">PHPBB3-12207</a>] - prosilver layout breaks when error outputted before &lt;html&gt;</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12208">PHPBB3-12208</a>] - Plupload uploads files even if they were deleted from queue</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12210">PHPBB3-12210</a>] - dbtools::sql_create_table incorrectly throws error related to auto-increment length on non auto-increment fields</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12212">PHPBB3-12212</a>] - HTML in attachment file name rendered before upload</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12216">PHPBB3-12216</a>] - Undefined index: lang_options when creating date profile field</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12220">PHPBB3-12220</a>] - Debug message if no unread messages are present</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12222">PHPBB3-12222</a>] - Replace hardoded comma with translatable separator in forumlist_body.html</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12223">PHPBB3-12223</a>] - Pagination displayes additional &amp;bull; when PAGE_NUMBER is empty</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12226">PHPBB3-12226</a>] - Incorrectly used plurals in ucp.php MOVE_PM_ERROR and FOLDER_MESSAGE_STATUS</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12227">PHPBB3-12227</a>] - &quot;X from Y messages&quot; should be &quot;X out of Y messages&quot;</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12243">PHPBB3-12243</a>] - subsilver2 is missing profile field files</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12245">PHPBB3-12245</a>] - &quot;Invalid id refernce&quot; for label &quot;joined&quot; and &quot;group_id&quot; in acp_prune_users.html</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12249">PHPBB3-12249</a>] - Undefined variable: row when editing profile</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12250">PHPBB3-12250</a>] - Remove deprecated phpbb_clean_path function</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12251">PHPBB3-12251</a>] - Clean up and Enhancement of Custom Profile Fields</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12256">PHPBB3-12256</a>] - phpbb\notification\type\admin_activate_user uses $sql as fetchrow parameter</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12261">PHPBB3-12261</a>] - Login redirect from extension front controllers broken</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12263">PHPBB3-12263</a>] - \phpbb\db\migration\tool\module.php contains several errors</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12267">PHPBB3-12267</a>] - Functional testcase method get_extension_manager() uses undefined variable php_ext</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12271">PHPBB3-12271</a>] - Decouple dropdown header/footer from #notification_list</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12272">PHPBB3-12272</a>] - Hardcoded colon in subforums list</li>
+ </ul>
+ <h4>Improvement</h4>
+ <ul>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-9255">PHPBB3-9255</a>] - Friends Sidebar has scability issues..</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-9479">PHPBB3-9479</a>] - Empty paragraphs for vertical spacing are rather old-fashioned</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-9709">PHPBB3-9709</a>] - Missing language files for MCP could be substituted by default / english ones</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-9871">PHPBB3-9871</a>] - Update version check file to use json format</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10288">PHPBB3-10288</a>] - Templates including other templates in loop can't access variables</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10549">PHPBB3-10549</a>] - Languages variables should be used, not hardcoded</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10555">PHPBB3-10555</a>] - Copyright notice in overall_header.html is not translatable</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10945">PHPBB3-10945</a>] - Show entered search query in the search box when no results are found.</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11019">PHPBB3-11019</a>] - Ability to store array of data in a log</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11022">PHPBB3-11022</a>] - Add &quot;Tahoma&quot; to used font families in css files</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11040">PHPBB3-11040</a>] - PostgreSQL fulltext search improvement</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11111">PHPBB3-11111</a>] - Allow only vertical resize on the textarea.</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11179">PHPBB3-11179</a>] - change the start parameter in search when out of bounds to display last(or first) page</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11201">PHPBB3-11201</a>] - MSNM / WLM closing - redundant profile field</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11254">PHPBB3-11254</a>] - Check CRLF line endings in the test suite</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11297">PHPBB3-11297</a>] - Running tests doc should mention dbunit dependency</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11610">PHPBB3-11610</a>] - Use a more secure hashing method like bcrypt</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11645">PHPBB3-11645</a>] - Rename &quot;.MODs&quot; tab in the ACP</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11693">PHPBB3-11693</a>] - Change phpbb_db_driver::sql_build_array() to support DELETE</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11716">PHPBB3-11716</a>] - Migration to convert soft delete/trash bin mods to 3.1 soft delete</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12029">PHPBB3-12029</a>] - Module names in the ACP should not be truncated when they are too long</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12073">PHPBB3-12073</a>] - Small text size in ACP between &lt;samp&gt;&lt;/samp&gt; and &lt;code&gt;&lt;/code&gt; tags</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12106">PHPBB3-12106</a>] - Document exceptions to &quot;Disable Board&quot; in ACP.</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12114">PHPBB3-12114</a>] - Convert current profile fields to custom-profile-field system</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12117">PHPBB3-12117</a>] - Nested Set Tree Classes Should be able to get all roots</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12166">PHPBB3-12166</a>] - Add template event &quot;quickreply_editor_message_box_before&quot;</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12167">PHPBB3-12167</a>] - Allow users to change style via style parameter by default</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12190">PHPBB3-12190</a>] - Add core event &quot;core.modify_submit_post_data&quot;</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12217">PHPBB3-12217</a>] - Add template events to viewtopic_body.html</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12224">PHPBB3-12224</a>] - Add template method to assign block arrays</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12231">PHPBB3-12231</a>] - Add template events to forumlist_body.html</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12238">PHPBB3-12238</a>] - There is no cancel input type.</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12239">PHPBB3-12239</a>] - Move deprecated password functions to compatibility file</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12240">PHPBB3-12240</a>] - Adding specific class names to buttons in posting_buttons.html</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12241">PHPBB3-12241</a>] - Event to add and/or modify acp_board configurations</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12244">PHPBB3-12244</a>] - Remove ambiguity between Extension Tab and Extensions Management links</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12248">PHPBB3-12248</a>] - Extension Details Homepage should be a clickable link</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12259">PHPBB3-12259</a>] - Too many redundant tests are run on Travis</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12260">PHPBB3-12260</a>] - Add core event to delete_posts() function</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12262">PHPBB3-12262</a>] - Adjust a script to export the events in wiki format</li>
+ </ul>
+ <h4>Sub-task</h4>
+ <ul>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12115">PHPBB3-12115</a>] - Convert occupation/interests profile field to custom field</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12169">PHPBB3-12169</a>] - Convert location user field to profile field </li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12187">PHPBB3-12187</a>] - Convert website user field to profile field</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12233">PHPBB3-12233</a>] - Allowing CPF to be have an icon on viewtopic and be listed in the contact section of the profile</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12234">PHPBB3-12234</a>] - Convert ICQ user field to profile field</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12235">PHPBB3-12235</a>] - Convert MSN/WLM user field to profile field </li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12236">PHPBB3-12236</a>] - Convert AOL user field to profile field</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12237">PHPBB3-12237</a>] - Convert Yahoo user field to profile field</li>
+ </ul>
+ <h4>Task</h4>
+ <ul>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10763">PHPBB3-10763</a>] - Audit code for non-static functions called statically</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10793">PHPBB3-10793</a>] - Use db_tools in create_schema_files</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11509">PHPBB3-11509</a>] - Travis should check commit message format</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11764">PHPBB3-11764</a>] - Remove Subsilver2 from installation packages</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12177">PHPBB3-12177</a>] - Add event ucp_zebra_friend_list_before/after</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12180">PHPBB3-12180</a>] - CodeSniffer: Ensure each file ends with a single newline</li>
+ </ul>
+
+
+ <a name="v310a2"></a><h3>1.ii. Changes since 3.1.0-a2</h3>
+
+<h4>Bug</h4>
+<ul>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10810">PHPBB3-10810</a>] - Manage group in ucp requires access to adm/</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11246">PHPBB3-11246</a>] - Misleading Message in New User Pruning Feature</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11484">PHPBB3-11484</a>] - Topic Reply Notification email links not requiring user to log in</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11507">PHPBB3-11507</a>] - Impossible to prune users by group only</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11672">PHPBB3-11672</a>] - AJAX alerts contain unnecessary messages/links</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11709">PHPBB3-11709</a>] - Bulletin points in navigation menu are misaligned in RTL languages</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11842">PHPBB3-11842</a>] - Avatar driver error thrown when creating group</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11856">PHPBB3-11856</a>] - Require composer.json for extensions</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11859">PHPBB3-11859</a>] - Avatar drivers should return template filename</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11869">PHPBB3-11869</a>] - Strict debug message when registering with profile fields displayed</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11911">PHPBB3-11911</a>] - ACP should warn if there is no search index created for the selected search engine</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11912">PHPBB3-11912</a>] - &quot;Unable to guess the mime type as no guessers are available&quot; when uploading files</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11914">PHPBB3-11914</a>] - plupload should be updated to 2.0.x</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11915">PHPBB3-11915</a>] - plupload should be restyled to match the design of prosilver better</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11959">PHPBB3-11959</a>] - List of users in notifications should be trimmed</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11963">PHPBB3-11963</a>] - Stale MCP notifications get left behind</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11984">PHPBB3-11984</a>] - Ticket for more bugs/improvements for responsive design for both prosilver and ACP</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11988">PHPBB3-11988</a>] - Active tab in ACP should not have hover effect</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11997">PHPBB3-11997</a>] - redirect() does not work for app.php/xyz pages</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12001">PHPBB3-12001</a>] - User input is ignored in AJAX confirmation forms</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12006">PHPBB3-12006</a>] - Disabled Extensions with Modules can break the ACP/UCP/MCP</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12009">PHPBB3-12009</a>] - Incorrectly installed extensions should be ignored</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12011">PHPBB3-12011</a>] - RTL languages have style bugs in prosilver/ACP</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12015">PHPBB3-12015</a>] - Enhance events in viewtopic to increase their usability</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12026">PHPBB3-12026</a>] - Unable to find template - in MCP/UCP, which are added via extensions</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12027">PHPBB3-12027</a>] - Redis tests failing</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12028">PHPBB3-12028</a>] - Don't use L_COLON in a JavaScript context</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12030">PHPBB3-12030</a>] - Include config directory completely in update packages when one file is being updated</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12032">PHPBB3-12032</a>] - Certain notifications incorrectly inherit read status from post/topic</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12036">PHPBB3-12036</a>] - Module Management items have 2 move down buttons and no up</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12038">PHPBB3-12038</a>] - Move up/down buttons are not AJAXified in various ACP pages.</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12040">PHPBB3-12040</a>] - ACP tabs flicker when AJAX background appears</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12042">PHPBB3-12042</a>] - Several strings of plupload are not being translated</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12045">PHPBB3-12045</a>] - Several HTML markup issues in adm/style/acp_prune_users.html</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12049">PHPBB3-12049</a>] - PLUPLOAD_ERR_UPLOAD_LIMIT should be using plurals</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12050">PHPBB3-12050</a>] - phpbb_notification_submit_post_base should be abstract</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12055">PHPBB3-12055</a>] - ACP BBCodes/Smilies Row Color Changes Needed After AJAX operations</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12058">PHPBB3-12058</a>] - Updating database fails in migration v310/avatar_types.php</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12059">PHPBB3-12059</a>] - ACP INCLUDECSS not working, missing {$STYLESHEETS}</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12062">PHPBB3-12062</a>] - INCLUDEJS broken for extension events in the ACP</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12063">PHPBB3-12063</a>] - &lt;tr&gt; tags use invalid valign attribute</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12077">PHPBB3-12077</a>] - General Error thrown when submitting ACP language pack editor </li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12079">PHPBB3-12079</a>] - request.untrimmed_variable() $multibyte param does not have default value</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12091">PHPBB3-12091</a>] - Plupload - File upload does not work in Internet Explorer 11</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12092">PHPBB3-12092</a>] - Plupload - File info missing for several uploaded files</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12095">PHPBB3-12095</a>] - IE11 JavaScript plupload error</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12096">PHPBB3-12096</a>] - Not using plurals correctly in search.php MAX_NUM_SEARCH_KEYWORDS_REFINE</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12100">PHPBB3-12100</a>] - ACP Template files not purged during Extension Enable/Disable</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12107">PHPBB3-12107</a>] - Log table name is hard-coded in log.get_logs()</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12110">PHPBB3-12110</a>] - Update Plupload to 2.1.1</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12123">PHPBB3-12123</a>] - No category specified for soft-delete permission</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12124">PHPBB3-12124</a>] - Plupload broken on IE8</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12125">PHPBB3-12125</a>] - Topic rows are missing background in IE8</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12131">PHPBB3-12131</a>] - prosilver viewtopic print view has invalid imageset var</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12140">PHPBB3-12140</a>] - Avoid endless loop in build script</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12141">PHPBB3-12141</a>] - Travis tests fail on 5.5</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12151">PHPBB3-12151</a>] - Class 'phpbb\profilefields\profilefields' not found</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12154">PHPBB3-12154</a>] - DB Schema not built with develop script</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12156">PHPBB3-12156</a>] - Passwords Manager ~ Bug with OAuth</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12159">PHPBB3-12159</a>] - Fix code sniffer complaints after profilefields and passwords merge</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12161">PHPBB3-12161</a>] - build/save directories are no longer created</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12162">PHPBB3-12162</a>] - Binary files missing from update packages</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12163">PHPBB3-12163</a>] - Page number in viewtopic page title is incorrect</li>
+</ul>
+<h4>Improvement</h4>
+<ul>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10910">PHPBB3-10910</a>] - function build_cfg_template() allow $size for $tpl_type = select</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11346">PHPBB3-11346</a>] - Do not show &quot;Mark topics as read&quot; when there are no topics</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11849">PHPBB3-11849</a>] - Move pagination from functions.php into class</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11950">PHPBB3-11950</a>] - Add 'I forgot my password' link to index page login form</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11961">PHPBB3-11961</a>] - Plupload is not updating uploaded files panel</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11966">PHPBB3-11966</a>] - Add Template Event overall_header_navigation_prepend/append to Subsilver2</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11969">PHPBB3-11969</a>] - Link topic title to unread post instead of first post</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11979">PHPBB3-11979</a>] - Add basic dropdown menu framework to prosilver</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12005">PHPBB3-12005</a>] - Remove code responsible for PM popup completely</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12010">PHPBB3-12010</a>] - Navbar icons should be clickable</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12014">PHPBB3-12014</a>] - Add template event &quot;index_body_forumlist_before&quot;</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12024">PHPBB3-12024</a>] - Add Template Event overall_header_content_before and overall_footer_content_after</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12034">PHPBB3-12034</a>] - AJAXify notifications popup</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12054">PHPBB3-12054</a>] - Improve Index Body Template Events</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12060">PHPBB3-12060</a>] - Add BBCode system core and template events</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12069">PHPBB3-12069</a>] - Add PHP event core.submit_post_modify_return_url in submit_post()</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12104">PHPBB3-12104</a>] - Shadowtopics SQL used in core event should use the SQL builder</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12135">PHPBB3-12135</a>] - editor.js function bbfontstyle()</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12146">PHPBB3-12146</a>] - Add color demo when editing a group from the UCP</li>
+</ul>
+<h4>New Feature</h4>
+<ul>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12039">PHPBB3-12039</a>] - Add config functionality to CLI</li>
+</ul>
+<h4>Sub-task</h4>
+<ul>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11241">PHPBB3-11241</a>] - Improve user interface for mass attachment downloader (all posts, all topics)</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12111">PHPBB3-12111</a>] - Extract profile field types to individual classes</li>
+</ul>
+<h4>Task</h4>
+<ul>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11432">PHPBB3-11432</a>] - Travis should complain when CRLF files are added.</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11509">PHPBB3-11509</a>] - Travis should check commit message format</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11985">PHPBB3-11985</a>] - Enable APC module on Travis to run APC Cache tests</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12064">PHPBB3-12064</a>] - Remove obsolete viewsource.html from adm/style folder</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12147">PHPBB3-12147</a>] - Remove Travis CI notification configuration</li>
+</ul>
+
+ <a name="v310a1"></a><h3>1.iii. Changes since 3.1.0-a1</h3>
+
+<h4>Bug</h4>
+<ul>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-4776">PHPBB3-4776</a>] - Long post gets hidden behind posting profile</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10449">PHPBB3-10449</a>] - Lines spilling in subscriptions view</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10948">PHPBB3-10948</a>] - Color swatch in 3.1 does not display properly</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11030">PHPBB3-11030</a>] - I beam cursor in prosilver when hovering on browse button for uploading attachments</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11073">PHPBB3-11073</a>] - Reported/Unapproved moderator information in viewtopic is striked through instead of underlined</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11138">PHPBB3-11138</a>] - Resync features in ACP should not use AJAX</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11280">PHPBB3-11280</a>] - Double clicking &quot;mark topics read&quot; produces an error the second time</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11525">PHPBB3-11525</a>] - phpbb_avatar_manager::clean_row collapses user_id and group_id</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11534">PHPBB3-11534</a>] - Remote avatar does not properly check if remote file is an image</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11626">PHPBB3-11626</a>] - Auth ACP options should be moved to separate html file</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11663">PHPBB3-11663</a>] - In generate_text_for_storage the function does not check for errors of parse_message:parse() and act accordingly</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11691">PHPBB3-11691</a>] - Soft delete migration conversion should be staggered</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11739">PHPBB3-11739</a>] - Wrong name for UCP Module &quot;Edit &quot;Remember Me&quot; login keys&quot;</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11842">PHPBB3-11842</a>] - Create a new group Error with avatar driver</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11857">PHPBB3-11857</a>] - Avatar manager must not depend on entire container</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11872">PHPBB3-11872</a>] - MCP: Users with most warnings list is invalid</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11896">PHPBB3-11896</a>] - &quot;Mark all notifications read&quot; does not work</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11899">PHPBB3-11899</a>] - New ajax poll vote should give feedback while waiting for servers response</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11916">PHPBB3-11916</a>] - Remove files from hidden attach list after deletion</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11922">PHPBB3-11922</a>] - Migrator fails to remove columns on MSSQL when they have/had an index</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11923">PHPBB3-11923</a>] - UCP avatar error when user has no permissions to change his/her avatar</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11924">PHPBB3-11924</a>] - Add a script to export the events in wiki format</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11926">PHPBB3-11926</a>] - Plupload Migration has a broken dependency.</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11927">PHPBB3-11927</a>] - Missing Files after 3.1.0-A1 Automatic Updater</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11930">PHPBB3-11930</a>] - Avatar paths are incorrect when using app.php</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11935">PHPBB3-11935</a>] - Invalid HTML in &quot;Sort By&quot; form elements in Prosilver</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11936">PHPBB3-11936</a>] - Fixes to Notifications Window</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11939">PHPBB3-11939</a>] - Quick reply editor has unnecessary data-ajax attribute</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11943">PHPBB3-11943</a>] - $VAR = false has unexpected result</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11945">PHPBB3-11945</a>] - Focused buttons are hard to notice</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11947">PHPBB3-11947</a>] - Notification popup does not appear when clicking number in text</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11948">PHPBB3-11948</a>] - Extensions should be allowed to have more then 1 routing file</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11949">PHPBB3-11949</a>] - cannot upgrade to 3.1</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11960">PHPBB3-11960</a>] - Responsive design removed teampage names</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11972">PHPBB3-11972</a>] - Add template event posting_editor_subject_after</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11977">PHPBB3-11977</a>] - Ajax delete should disable moving options</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11982">PHPBB3-11982</a>] - Navigation is shown above AJAX background in ACP</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11983">PHPBB3-11983</a>] - Subscriptions argument missing from docblock in ucp_notifications</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11986">PHPBB3-11986</a>] - Undefined index: poster_id in file.php</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11987">PHPBB3-11987</a>] - {ROOT_PATH} in ACP leads to adm/</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11990">PHPBB3-11990</a>] - Remove result_mssqlnative from acp_database</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11991">PHPBB3-11991</a>] - PHP notices when closing reported posts entries in MCP</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11992">PHPBB3-11992</a>] - Wrong variable to close &quot;Users with most warnings&quot; block at MCP</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11994">PHPBB3-11994</a>] - Admin options for extensions are bad/misleading</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11995">PHPBB3-11995</a>] - Reverting a config.remove fails</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12002">PHPBB3-12002</a>] - Extension management page should use generate/check link hash</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12007">PHPBB3-12007</a>] - Default last_result of callable steps must be integer instead of false</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12008">PHPBB3-12008</a>] - &quot;Prune notifications&quot; cron task always ran, blocking others</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12016">PHPBB3-12016</a>] - Event listeners should be services</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12017">PHPBB3-12017</a>] - Extension tests are broken on current develop</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12018">PHPBB3-12018</a>] - Use path_helper for admin style CSS in sql report</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12023">PHPBB3-12023</a>] - New css files missing after update</li>
+</ul>
+<h4>Improvement</h4>
+<ul>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11552">PHPBB3-11552</a>] - Responsive design for prosilver</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11746">PHPBB3-11746</a>] - Add &quot;account activation required&quot; notification for Administrators</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11921">PHPBB3-11921</a>] - Improve Notifications and PMs in the header</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11928">PHPBB3-11928</a>] - Replace AJAX loading info pop up with animation</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11957">PHPBB3-11957</a>] - Responsive design for admin control panel</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11973">PHPBB3-11973</a>] - Remove logic from language files where possible</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11974">PHPBB3-11974</a>] - All timezones should be translatable</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11975">PHPBB3-11975</a>] - Add ACP link next to MCP</li>
+</ul>
+<h4>Task</h4>
+<ul>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11031">PHPBB3-11031</a>] - Bring phpBB2 converter up to speed with 3.1 changes</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11980">PHPBB3-11980</a>] - Setup PHP Code Sniffer</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11981">PHPBB3-11981</a>] - Review/Fix Code Sniffer complaints</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11998">PHPBB3-11998</a>] - Add console / command line client environment </li>
+</ul>
+
+ <a name="v30x"></a><h3>1.iv. Changes since 3.0.x</h3>
+
+<h4>Bug</h4>
+<ul>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-4412">PHPBB3-4412</a>] - MCP and viewtopic messed up when long profile fields used</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-6109">PHPBB3-6109</a>] - MSN is now called Windows Live Messenger (WLM)</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-6855">PHPBB3-6855</a>] - The word separator has been misspelled in the code</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-7070">PHPBB3-7070</a>] - Making Font Type &amp; Size Easy To modify</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-7252">PHPBB3-7252</a>] - Use IMAGETYPE_ constants in get_supported_image_types()</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-7448">PHPBB3-7448</a>] - Module management calling non-static method p_master::module_auth()</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-8212">PHPBB3-8212</a>] - Comment spelling mistake in includes/acp/acp_board.php</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-8228">PHPBB3-8228</a>] - Coding BBcode has whitespace before the code.</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-8542">PHPBB3-8542</a>] - No custom profile fields in private messages</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-8641">PHPBB3-8641</a>] - Extra and missing comma in acp_board.php</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-8713">PHPBB3-8713</a>] - trimming login inputs isn't sensible</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-8841">PHPBB3-8841</a>] - Unexpected results when using &quot;PHPBB_USE_BOARD_URL_PATH&quot;</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-8912">PHPBB3-8912</a>] - phpbb_styles_template_data contans more than 4k records</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-9022">PHPBB3-9022</a>] - Poll Deletion Problem on Global change</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-9163">PHPBB3-9163</a>] - style.php cannot be properly cached</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-9341">PHPBB3-9341</a>] - Incorrectly named template vars</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-9394">PHPBB3-9394</a>] - wrong comment in functions_upload.php</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-9474">PHPBB3-9474</a>] - Unnecessary mcp_viewlogs.html included</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-9492">PHPBB3-9492</a>] - Group avatar overwrites currently defined user avatars</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-9766">PHPBB3-9766</a>] - phpbb_default_captcha::delete_code() takes no argument but uses $confirm_id</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-9918">PHPBB3-9918</a>] - $redirect variable set, but not used, in mcp functions</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10006">PHPBB3-10006</a>] - phpbb_config::delete is missing</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10013">PHPBB3-10013</a>] - Cache test writes to a temporary location deep in the source tree</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10045">PHPBB3-10045</a>] - Database updater version for changes between 3.0.x and 3.1.0 should be 3.1.0-dev</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10070">PHPBB3-10070</a>] - CRLF in develop</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10080">PHPBB3-10080</a>] - request_var tests fail when other tests using request_var are executed first</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10103">PHPBB3-10103</a>] - Fix remaining usage of flock() by converting it to use the lock class</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10136">PHPBB3-10136</a>] - Missing $request globalizations in includes/functions.php</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10139">PHPBB3-10139</a>] - Use of $cache for two different things in includes/config/db.php </li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10151">PHPBB3-10151</a>] - Version number needs to be updated in installer</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10152">PHPBB3-10152</a>] - Installer places ?&gt; in config.php</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10156">PHPBB3-10156</a>] - Cron tests fail on windows</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10290">PHPBB3-10290</a>] - Who's online broken due to malformed SQL</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10300">PHPBB3-10300</a>] - Groups teampage legends settings</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10316">PHPBB3-10316</a>] - Inconsistency between prosilver and subsilver when locking a topic while moving</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10322">PHPBB3-10322</a>] - No longer possible to include templates via variables, captcha broken</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10329">PHPBB3-10329</a>] - Function pcre_utf8_support() needs the &quot;phpbb_&quot; prefix</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10350">PHPBB3-10350</a>] - class phpbb_template_renderer_eval does not work</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10355">PHPBB3-10355</a>] - Template tests do not correctly end output buffering</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10359">PHPBB3-10359</a>] - Fix phpbb_request regression in download/file.php and style.php</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10360">PHPBB3-10360</a>] - search_results.html gone haywire!</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10364">PHPBB3-10364</a>] - ACP Permissions Roles Tabs Broken</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10371">PHPBB3-10371</a>] - $user-&gt;theme['imageset_path'] - doesn't exist anymore</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10374">PHPBB3-10374</a>] - Template cache viewer broken</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10375">PHPBB3-10375</a>] - Template Cache keeps regenerating cache files</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10378">PHPBB3-10378</a>] - Errors in imageset -&gt; theme conversion</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10380">PHPBB3-10380</a>] - Imageset removal: bidi padding change</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10384">PHPBB3-10384</a>] - 1_DAY language variables are not working in templates anymore</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10392">PHPBB3-10392</a>] - Alternate nested block loop syntax broken for auto variables</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10393">PHPBB3-10393</a>] - Syntax error in cached template code</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10409">PHPBB3-10409</a>] - Running database_update.php multiple times breaks the update</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10417">PHPBB3-10417</a>] - phpbb_test_case_helpers::get_test_config() uses array_merge() on undefined $config</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10444">PHPBB3-10444</a>] - Edit reason remains if a post gets edited by a moderator for the second time</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10457">PHPBB3-10457</a>] - Undefined variable $request, when print-viewing PMs</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10458">PHPBB3-10458</a>] - Invalid html when print-viewing a PM</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10459">PHPBB3-10459</a>] - Make &quot;Reply to all&quot;on PMs as a button</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10463">PHPBB3-10463</a>] - Inherit template causes SQL error</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10464">PHPBB3-10464</a>] - Debug error in search settings/search index</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10477">PHPBB3-10477</a>] - Registration, forgot password broken</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10481">PHPBB3-10481</a>] - Test suite does not run on php 5.3</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10495">PHPBB3-10495</a>] - Tests have version checks against php 6.0.0</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10500">PHPBB3-10500</a>] - Miscellaneous issues in the new template engine</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10541">PHPBB3-10541</a>] - Empty &quot;Select form:&quot; dropdown when editing user</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10547">PHPBB3-10547</a>] - Log out instead of acp statistics page at the end of fresh install </li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10560">PHPBB3-10560</a>] - Post count not updated to include unapproved posts (though topic count is) for moderators</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10575">PHPBB3-10575</a>] - UCP Register: Non-static method phpbb_captcha_factory::get_instance() should not be called statically</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10579">PHPBB3-10579</a>] - New license block has v2 duplicated</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10602">PHPBB3-10602</a>] - A bug in mail queue processing</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10618">PHPBB3-10618</a>] - Hardcoded phpBB 3.0 language in installer</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10634">PHPBB3-10634</a>] - cp modules: function loaded() only checks current module type</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10636">PHPBB3-10636</a>] - cache_moderators() generates invalid query</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10637">PHPBB3-10637</a>] - Extension manager: missed code changes in search</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10641">PHPBB3-10641</a>] - MCP still uses old plurality forms of language variables</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10645">PHPBB3-10645</a>] - Invalid CSS for checkboxes and radio buttons in ACP css</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10652">PHPBB3-10652</a>] - Template inheritance doesn't work</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10655">PHPBB3-10655</a>] - Bug in test case: phpbb_template_template_inheritance_test</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10663">PHPBB3-10663</a>] - Extension manager: finder class adds directories that should not match the query</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10667">PHPBB3-10667</a>] - Fix extensions and group positions tests under MySQL 5.5 strict mode</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10671">PHPBB3-10671</a>] - Integrity tests failing</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10672">PHPBB3-10672</a>] - Statistics .. Total posts</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10678">PHPBB3-10678</a>] - Provide Firebird, Oracle, and increased MSSQL support in unit tests</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10685">PHPBB3-10685</a>] - Template inheritance test produces a notice on php 5.4 due to an incompatible override of setup_engine</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10690">PHPBB3-10690</a>] - Undefined language string in MCP</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10703">PHPBB3-10703</a>] - extensions.php script dies miserably when ext directory is missing</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10704">PHPBB3-10704</a>] - Typo in a comment</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10735">PHPBB3-10735</a>] - Incorrect styles search order, locator's inability to use template inheritance for extensions</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10736">PHPBB3-10736</a>] - Composer is making tests fail</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10742">PHPBB3-10742</a>] - Tables in users list have incorrect width</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10752">PHPBB3-10752</a>] - acp_styles errors</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10754">PHPBB3-10754</a>] - $style should be renamed to $phpbb_style</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10756">PHPBB3-10756</a>] - Template classes don't belong in style directory</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10759">PHPBB3-10759</a>] - Database updater doesn't reset default style</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10777">PHPBB3-10777</a>] - Typo in viewtopic.php comment line 1632</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10778">PHPBB3-10778</a>] - Extra space on the link &quot;Close Window&quot; in prosilver/template/posting_smilies.html</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10779">PHPBB3-10779</a>] - &quot;Serve jQuery using Google's CDN&quot; Should be on ACP Load Settings, not Board Features</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10781">PHPBB3-10781</a>] - Quick Mod tools don't work</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10784">PHPBB3-10784</a>] - Do not show ajax overlay unless needed</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10785">PHPBB3-10785</a>] - Illegal use of $_REQUEST in develop/fill.php</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10801">PHPBB3-10801</a>] - Move topic in quickmod tools not functional</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10802">PHPBB3-10802</a>] - Splitting topics in quickmod tools not functional</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10803">PHPBB3-10803</a>] - When ajax requests fail, the failure message should remain visible until the user dismisses it</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10805">PHPBB3-10805</a>] - &quot;Request timed out&quot; ui appears over function ui in ajax</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10807">PHPBB3-10807</a>] - Deleting topics via quickmod provides no feedback</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10808">PHPBB3-10808</a>] - Locking topics via quickmod provides no feedback</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10811">PHPBB3-10811</a>] - AJAX callback &quot;alt_text&quot; insufficiently changes links</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10813">PHPBB3-10813</a>] - Installer does not check that php json extension is present</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10818">PHPBB3-10818</a>] - Global Announcements Update Dialog does not terminate with exit_handler()</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10826">PHPBB3-10826</a>] - 3.1-dev Database Updater keeps running group_legend query</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10837">PHPBB3-10837</a>] - Undefined index in extension tests</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10844">PHPBB3-10844</a>] - Extensions are not located when front-end file has a diffferent phpbb_root_path</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10845">PHPBB3-10845</a>] - Reported post text does not get bbcode-parsed when viewing a post report</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10847">PHPBB3-10847</a>] - Dependent is misspelled a number of times</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10871">PHPBB3-10871</a>] - In &quot;Posts awaiting approval&quot; if there's more than one post it shows no posts</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10875">PHPBB3-10875</a>] - SQL Cache is not used</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10876">PHPBB3-10876</a>] - Xampp crashes on Develop when template has too many ORs in an IF statement</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10885">PHPBB3-10885</a>] - UCP Main Error if no forums exist</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10888">PHPBB3-10888</a>] - cachepath in template class is set externally</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10905">PHPBB3-10905</a>] - Last topic title missing in subsilver</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10906">PHPBB3-10906</a>] - Last post title does not work for new installs of 3.1-dev due to missing change to schema_data.sql</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10912">PHPBB3-10912</a>] - Undefined variable: last_post_subject_truncated</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10915">PHPBB3-10915</a>] - Sort not installed styles list in admin control panel - styles</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10943">PHPBB3-10943</a>] - Search Box should display keywords entered by the user</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10954">PHPBB3-10954</a>] - Mark topics as read AJAX</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10976">PHPBB3-10976</a>] - Running tests using phpunit.xml.all fails</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10982">PHPBB3-10982</a>] - Allow setting dimming control overlay also as data-overlay</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10998">PHPBB3-10998</a>] - No border-radius for forum rules block</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10999">PHPBB3-10999</a>] - Asset version not defined in adm/</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11002">PHPBB3-11002</a>] - Etc/GMT timezones return wrong offset</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11003">PHPBB3-11003</a>] - Ability to show full list of timezones with JavaScript enabled</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11004">PHPBB3-11004</a>] - The timezone suggestion button is not a real button</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11007">PHPBB3-11007</a>] - Timezone selector shows all timezones</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11014">PHPBB3-11014</a>] - Previous/next links are no longer displayed.</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11018">PHPBB3-11018</a>] - Pagination in memberlist</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11023">PHPBB3-11023</a>] - Fix excess tabbing and spacing in functions.php</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11029">PHPBB3-11029</a>] - Cannot break/continue 1 level in includes\cache\service.php:340</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11041">PHPBB3-11041</a>] - global $php_ext instead of global $phpEx</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11043">PHPBB3-11043</a>] - Update template hook name</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11046">PHPBB3-11046</a>] - No border-radius for UCP message colours block</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11047">PHPBB3-11047</a>] - Unclosed variable shows incorrect language key</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11052">PHPBB3-11052</a>] - Search class changes not reflected in installer or convertor</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11065">PHPBB3-11065</a>] - li tag on topic display options at MCP is unclosed</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11067">PHPBB3-11067</a>] - Pagination in ACP is missing CSS code from pagination change</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11077">PHPBB3-11077</a>] - Feed still has fallback code for global announcement with forum_id = 0</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11086">PHPBB3-11086</a>] - Database Updater still relies on cache factory - needs to be updated to use DIC</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11089">PHPBB3-11089</a>] - Database type mysql sets unusable board</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11092">PHPBB3-11092</a>] - phpbb_gen_download_links strict standards errors</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11095">PHPBB3-11095</a>] - Jumpbox should use &quot;get&quot; method</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11099">PHPBB3-11099</a>] - Clicking Banning tab in MCP causes all tabs to collapse down</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11100">PHPBB3-11100</a>] - jabber::can_use_ssl() should not be called statically in includes/acp/acp_jabber.php on line 124</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11101">PHPBB3-11101</a>] - Container processors are executed before globals exist</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11106">PHPBB3-11106</a>] - Undefined index: EDITED_TIME_TOTAL</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11139">PHPBB3-11139</a>] - Colour swatch window with Fatal error</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11140">PHPBB3-11140</a>] - MCP Front errors on reported posts</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11154">PHPBB3-11154</a>] - Unable to upgrade 3.0 QI-installed board to 3.1</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11157">PHPBB3-11157</a>] - Strict spam renders spambot countermeasures page unusable</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11159">PHPBB3-11159</a>] - Coding guidelines: static public</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11166">PHPBB3-11166</a>] - AJAX confirm box is not using custom templates given</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11171">PHPBB3-11171</a>] - Copy bbcode fields, etc. for reported posts</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11176">PHPBB3-11176</a>] - Functional tests do not run</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11177">PHPBB3-11177</a>] - Postgres search when query has only negation</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11187">PHPBB3-11187</a>] - Functional tests broken by new config class</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11188">PHPBB3-11188</a>] - postgres search result count does not get the total count</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11190">PHPBB3-11190</a>] - Functional tests do not clear the cache between each test</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11194">PHPBB3-11194</a>] - PHP Notice: Undefined index &quot;tag&quot; </li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11198">PHPBB3-11198</a>] - AJAX move up/down links not replaced correctly</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11199">PHPBB3-11199</a>] - Cache purge should remove dumped container</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11200">PHPBB3-11200</a>] - Container construction fails with non-MySQLi drivers</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11204">PHPBB3-11204</a>] - Wrong indentation in functional test case base class</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11205">PHPBB3-11205</a>] - Merge conflict in readme.html</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11206">PHPBB3-11206</a>] - Avatars are broken, includes non-existent files</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11208">PHPBB3-11208</a>] - Functional tests are broken</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11209">PHPBB3-11209</a>] - Always clone Ajax disable images to avoid problems if they are used multiple times on the same page</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11211">PHPBB3-11211</a>] - Call to undefined function phpbb_real_path() in /phpBB/includes/di/extension/ext.php on line 52</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11212">PHPBB3-11212</a>] - Catch non-existent globals if error occurs during container construction</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11213">PHPBB3-11213</a>] - Missing global in install_update.php</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11227">PHPBB3-11227</a>] - @return void -&gt; @return null</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11236">PHPBB3-11236</a>] - Prune users requires group selection if any groups are defined</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11237">PHPBB3-11237</a>] - php spam when pruning users</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11247">PHPBB3-11247</a>] - php spam in flock class</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11248">PHPBB3-11248</a>] - CRLF line endings</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11253">PHPBB3-11253</a>] - Signature module acl is not going to be added to 3.1 boards</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11256">PHPBB3-11256</a>] - Unused service controller.route_collection</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11257">PHPBB3-11257</a>] - Using Service Collection requires set_name() method to exist</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11263">PHPBB3-11263</a>] - PHP Notice: in file functions_messenger.php on line 213: Undefined variable: extension_manager</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11273">PHPBB3-11273</a>] - Missing space after Sphinx &quot;Indexer memory limit&quot; input box </li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11277">PHPBB3-11277</a>] - User DST column is not removed on update, and therefor user_timezone is updated everytime the update file is run</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11279">PHPBB3-11279</a>] - &quot;Something went wrong when processing your request.&quot; is not acceptable language</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11291">PHPBB3-11291</a>] - &quot;Could not open input file: ../composer.phar&quot; error during phing's create-package</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11298">PHPBB3-11298</a>] - ACP_EXTENSIONS_MANAGEMENT missing string</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11302">PHPBB3-11302</a>] - No timezone is selected by default in registration form</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11303">PHPBB3-11303</a>] - Timezone selection is not preserved in registration form</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11305">PHPBB3-11305</a>] - Installer is broken on develop</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11309">PHPBB3-11309</a>] - phpbb_extension_interface::disable_step correct docblock</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11310">PHPBB3-11310</a>] - CSRF in style installation in acp</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11311">PHPBB3-11311</a>] - Include javascript core.js file in subsilver2 overall_footer.html</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11313">PHPBB3-11313</a>] - Typo in alt_text callback breaks replacement of text</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11320">PHPBB3-11320</a>] - Database test cases fail if functions file is not included and config file exists</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11321">PHPBB3-11321</a>] - Recreate schema files with develop/create_schema_files.php</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11323">PHPBB3-11323</a>] - Not possible to define template variable with other variables</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11329">PHPBB3-11329</a>] - Color values should be in colours.css, not buttons.css</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11334">PHPBB3-11334</a>] - Controller helper url() method still generates URLs like app.php/route/to/page instead of app.php?controller=route/to/page</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11335">PHPBB3-11335</a>] - Hook finder fails to load hooks</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11342">PHPBB3-11342</a>] - Marking subforums as read does not change the unread icons of active topics</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11344">PHPBB3-11344</a>] - ACP_STYLE_COMPONENTS</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11345">PHPBB3-11345</a>] - Font size on new buttons is too thin</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11350">PHPBB3-11350</a>] - $db should not be passed by reference to db_tools</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11362">PHPBB3-11362</a>] - Resource locator does not find admin template files from extensions</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11363">PHPBB3-11363</a>] - Migrations module tool does not load info files from extensions</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11367">PHPBB3-11367</a>] - Migrator throws error if migrations table does not exist</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11369">PHPBB3-11369</a>] - Reverting migration throws error (attempt to unserialize string)</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11370">PHPBB3-11370</a>] - Effectively installed migrations not inserted into migrations table</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11372">PHPBB3-11372</a>] - Migrator should only check if effectively installed if the migration is not installed at all</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11381">PHPBB3-11381</a>] - Finder cannot find items for non-enabled extensions (required during installation)</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11383">PHPBB3-11383</a>] - Uninstalling an extension that adds a module causes an error upon purge</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11385">PHPBB3-11385</a>] - get_module_infos from migrator does not return module info</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11386">PHPBB3-11386</a>] - Migrator can include files multiple times</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11387">PHPBB3-11387</a>] - Module add tool logs module as added even if it fails due to error (migrations)</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11388">PHPBB3-11388</a>] - Extension CSS files are not being auto-loaded</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11394">PHPBB3-11394</a>] - Migration Tools are too strict</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11395">PHPBB3-11395</a>] - acp_modules::get_module_infos can include files multiple times</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11396">PHPBB3-11396</a>] - insert_migration also updates migration (should rename function)</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11398">PHPBB3-11398</a>] - Migrations permission tool's method permission_set causes fatal error</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11400">PHPBB3-11400</a>] - Notification system assumes email is always available</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11402">PHPBB3-11402</a>] - Undefined offset 0 post/topic_in_queue (notifications)</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11403">PHPBB3-11403</a>] - Multiinsert for notifications should use batches</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11404">PHPBB3-11404</a>] - Can not access ACP &quot;manage group&quot; page while creating new groups</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11405">PHPBB3-11405</a>] - Users that are subscribed to a forum, don't receive notifications for new replies</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11407">PHPBB3-11407</a>] - UI notifications have wrong &lt;dfn&gt; info next to checkbox</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11408">PHPBB3-11408</a>] - Undefined index jabber (should be user_jabber)</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11411">PHPBB3-11411</a>] - Broken primary key on phpbb_notification_types table</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11413">PHPBB3-11413</a>] - phpbb_notification_types table should have an integer primary key</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11415">PHPBB3-11415</a>] - Accessing phpbb_migrations table from index page (or other pages)</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11416">PHPBB3-11416</a>] - Primary key on phpbb_notifications table too small</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11417">PHPBB3-11417</a>] - Notification Options page in User Control Panel has &quot;Mark read&quot; as submit button.</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11420">PHPBB3-11420</a>] - Notification methods are not (correctly) imported</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11421">PHPBB3-11421</a>] - Submit button missing from UCP notifications module</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11422">PHPBB3-11422</a>] - Assets should be incremented on database update</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11423">PHPBB3-11423</a>] - Email has HTML from username</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11433">PHPBB3-11433</a>] - Loading alert message is shown beneath overlay</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11435">PHPBB3-11435</a>] - Extension template files curly braces bug</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11437">PHPBB3-11437</a>] - Sphinx debug assert failed when no search results are found</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11438">PHPBB3-11438</a>] - Sphinx default config does not work properly</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11439">PHPBB3-11439</a>] - Notification tests are not run via phpunit.xml.dist</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11440">PHPBB3-11440</a>] - Mixed type (string vs integer) in SQL query against phpbb_users</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11442">PHPBB3-11442</a>] - AJAX in the ACP Does not work wherever Confirm Box modals are used</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11443">PHPBB3-11443</a>] - Two migration tests are not run via phpunit.xml.dist </li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11448">PHPBB3-11448</a>] - phpbb_notification_manager::mark_notifications_read takes $user_id as a parameter but isn't using it</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11450">PHPBB3-11450</a>] - phpbb_extension_metadata_manager has wrong docs and too many arguments</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11451">PHPBB3-11451</a>] - class phpbb_notification_method_jabber extends phpbb_notification_method_email</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11452">PHPBB3-11452</a>] - phpbb_notification_method_email::is_available() should return false when user doesn't have an email address</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11454">PHPBB3-11454</a>] - Jabber notifications are not working at all</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11455">PHPBB3-11455</a>] - Sort phpBB/config/tables.yml in alphabetic order</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11457">PHPBB3-11457</a>] - class phpbb_notification_test should not require/use the global set_var() function</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11460">PHPBB3-11460</a>] - New installs have wrong data in phpbb_user_notifications table.</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11464">PHPBB3-11464</a>] - Config table load_cpf_pm is missing on new install</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11466">PHPBB3-11466</a>] - phpunit configs excludes non-existant files</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11471">PHPBB3-11471</a>] - Some email templates contain unrelated text</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11474">PHPBB3-11474</a>] - &quot;Post in queue&quot; notification send to too many moderators</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11478">PHPBB3-11478</a>] - Daylight Savingtime changes old posts in time, too.</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11479">PHPBB3-11479</a>] - Can not access install/index.php?mode=update</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11485">PHPBB3-11485</a>] - migration doesn't add necessary columns to phpbb_styles table when updating schemas.</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11488">PHPBB3-11488</a>] - Notification email error</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11489">PHPBB3-11489</a>] - Change forum list layout to work at any resolution</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11491">PHPBB3-11491</a>] - Functional test for extensions has wrong class name and is in the wrong directory</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11492">PHPBB3-11492</a>] - memberlist user_ids array uninitalized can lead to error</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11494">PHPBB3-11494</a>] - Fix memberlist leaders functional tests</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11501">PHPBB3-11501</a>] - Fix &quot;This test did not perform any assertions&quot; message on some tests</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11503">PHPBB3-11503</a>] - Implementation of DB drivers vary too much</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11516">PHPBB3-11516</a>] - .live() deprecated in new version of jquery</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11535">PHPBB3-11535</a>] - ACP und UCP avatar groups settings do not display an error upon submitting incorrect data</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11549">PHPBB3-11549</a>] - Resource locator does not find admin template files from extensions</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11550">PHPBB3-11550</a>] - Functional extension controller test should use $helpers to copy and remove files</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11551">PHPBB3-11551</a>] - ACP System tab errors: [phpBB Debug] - PHP Notice: in file [ROOT] -/includes/acp/acp_update.php on line 49: Undefined offset: 1</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11553">PHPBB3-11553</a>] - Links list errors</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11554">PHPBB3-11554</a>] - forum_fn.js should be moved to footer</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11555">PHPBB3-11555</a>] - Pagination page selection JS is broken</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11556">PHPBB3-11556</a>] - Remove non-jquery fallback code from forum_fn.js</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11560">PHPBB3-11560</a>] - Missing T_JQUERY_LINK template variable in installer</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11561">PHPBB3-11561</a>] - Notification functional tests fail using phpunit.xml.all</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11562">PHPBB3-11562</a>] - forum_fn.js cleanup</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11563">PHPBB3-11563</a>] - Move subPanels() code from html templates to forum_fn.js</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11564">PHPBB3-11564</a>] - Notifications list errors</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11567">PHPBB3-11567</a>] - Fatal error at database update</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11569">PHPBB3-11569</a>] - Database update fails at continuing on some environments</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11570">PHPBB3-11570</a>] - No way to get back to update routine when in database updater</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11573">PHPBB3-11573</a>] - Test Suite does not work with MySQL STRICT_TRANS_TABLES (MySQL 5.6)</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11574">PHPBB3-11574</a>] - Unable to &quot;auto update&quot; from 3.0 to 3.1</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11585">PHPBB3-11585</a>] - Strict Standars error when editing the role </li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11586">PHPBB3-11586</a>] - Fix/cleanup some of upload_attachment()'s code</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11587">PHPBB3-11587</a>] - Group gets removed from legend when editing one in UCP</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11593">PHPBB3-11593</a>] - filter-&gt;compile_var_tags uses undefined variable</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11594">PHPBB3-11594</a>] - Template filter not aware of extension context</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11599">PHPBB3-11599</a>] - Tree tests are very slow</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11602">PHPBB3-11602</a>] - Do not call avatar_manager's localize_errors() if avatars are disabled</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11605">PHPBB3-11605</a>] - Order of files and directories given to phpbb_test_case_helpers-&gt;remove_files() matters.</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11622">PHPBB3-11622</a>] - Template events are loaded incorrectly</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11647">PHPBB3-11647</a>] - URLs are incorrectly handled by INCLUDEJS</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11660">PHPBB3-11660</a>] - Bootstrap container from config.php bugs</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11664">PHPBB3-11664</a>] - Creating php.html file in root path in tests</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11665">PHPBB3-11665</a>] - Can't change file names already sent to set_filenames</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11675">PHPBB3-11675</a>] - Uncaught exception 'Twig_Error_Syntax' -Permissions User roles- </li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11687">PHPBB3-11687</a>] - assets_version is missing in phpbb_config</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11688">PHPBB3-11688</a>] - Cache purge does not purge the twig directory</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11691">PHPBB3-11691</a>] - Soft delete migration conversion should be staggered</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11692">PHPBB3-11692</a>] - Don't update search_type in dev migration if already appended with phpbb_search_</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11694">PHPBB3-11694</a>] - Twig Error on ACP Login page</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11695">PHPBB3-11695</a>] - Cannot edit first post in a topic more than once without manually changing &quot;Options Per User&quot; to 1 on second edit.</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11696">PHPBB3-11696</a>] - phpbb_db_tools does not autoload</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11697">PHPBB3-11697</a>] - fulltext_mysql.php - author_search() uses incorrect $m_approve_fid_ary parameter</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11701">PHPBB3-11701</a>] - TWIG breaks template events for events inside of looped template code</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11702">PHPBB3-11702</a>] - Forumlink gives general error</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11706">PHPBB3-11706</a>] - getimagesize() should be called with @ to prevent PHP warning in remote avatar</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11707">PHPBB3-11707</a>] - Twig DEFINE not working as expected</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11708">PHPBB3-11708</a>] - Invalid bulletin point in notifications</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11712">PHPBB3-11712</a>] - Typo in editor.js</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11713">PHPBB3-11713</a>] - Module gets removed by ajax even if removal was not successful</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11717">PHPBB3-11717</a>] - View unanswered posts = General error</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11718">PHPBB3-11718</a>] - Twig lexer only correcting statements in IF, not ELSEIF</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11723">PHPBB3-11723</a>] - Can not agree to Terms of Service if more than one language is installed</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11725">PHPBB3-11725</a>] - No Avatar image -upload avatar-</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11727">PHPBB3-11727</a>] - INCLUDECSS and INCLUDEJS incorrectly default to /template/ folder</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11728">PHPBB3-11728</a>] - Fix last occurance of topic_approved index</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11729">PHPBB3-11729</a>] - memberlist.php is empty white page</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11731">PHPBB3-11731</a>] - Make calls for captcha garbage collections non-static</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11733">PHPBB3-11733</a>] - Illegal offset type Warning in [ROOT] -/includes/auth/auth.php via [ROOT] -/feed.php</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11734">PHPBB3-11734</a>] - Missing permession in language file</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11735">PHPBB3-11735</a>] - Missing checkbox in User Control Panel / Manage notifications</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11739">PHPBB3-11739</a>] - Wrong name for UCP Module &quot;Edit &quot;Remember Me&quot; login keys&quot;</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11741">PHPBB3-11741</a>] - Brackets exist even without any text</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11751">PHPBB3-11751</a>] - MCP Softdelete Modules missing when updating board</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11754">PHPBB3-11754</a>] - Remove leftovers of style switcher</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11755">PHPBB3-11755</a>] - MySQL Upgrader out of date for 3.1</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11757">PHPBB3-11757</a>] - Typo in signature_module_auth migration</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11759">PHPBB3-11759</a>] - Migrations update to the wrong 3.0.x version numbers.</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11761">PHPBB3-11761</a>] - Example.org no longer serves blank responses, failing functional tests</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11763">PHPBB3-11763</a>] - Debug and SQL Error when reporting a PM</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11767">PHPBB3-11767</a>] - Unable to update DB from 3.0.X to 3.1.X because of post_visibility</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11770">PHPBB3-11770</a>] - Invalid class for pm list in outbox/sentbox</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11774">PHPBB3-11774</a>] - PHP errors on viewing reported post details</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11777">PHPBB3-11777</a>] - Extension template events are not loaded from subdirectories</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11779">PHPBB3-11779</a>] - Invalid class for unapproved posts in mcp index</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11780">PHPBB3-11780</a>] - Remove unused images from prosilver</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11781">PHPBB3-11781</a>] - update_post_information() is not defined in phpbb_content_visibility-&gt;set_post_visibility</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11782">PHPBB3-11782</a>] - Notices inside posts look messy</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11791">PHPBB3-11791</a>] - Template events are not loaded in ACP</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11792">PHPBB3-11792</a>] - core.user_setup event doesn't support loading language files from extensions</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11796">PHPBB3-11796</a>] - Duplicate code for pagination</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11800">PHPBB3-11800</a>] - Incorrect inclusion of scripts in popup window</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11804">PHPBB3-11804</a>] - &lt;/li&gt; tag at overall_header.html (prosilver) which was not open</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11805">PHPBB3-11805</a>] - pagination does not support controller_helper urls</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11809">PHPBB3-11809</a>] - core.js should be loaded directly after jQuery and after every other JS file</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11811">PHPBB3-11811</a>] - Chrome 30 adds outline to focused elements</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11812">PHPBB3-11812</a>] - No longer able to define empty template variable using DEFINE</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11816">PHPBB3-11816</a>] - Twig regression: parentheses in IF statements stop DEFINE variables and loop lengths from working</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11822">PHPBB3-11822</a>] - Template include asset doesn't follow namespace lookup order</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11824">PHPBB3-11824</a>] - Controller URLs do not work anymore</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11825">PHPBB3-11825</a>] - phpBB/phpbb/ should only contain classes</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11828">PHPBB3-11828</a>] - Twig DEFINE is causing errors</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11832">PHPBB3-11832</a>] - URLs in tests aren't shortened, triggering errors in Composer files</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11833">PHPBB3-11833</a>] - Twig error while viewing user notes</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11835">PHPBB3-11835</a>] - phpbb_db_migration_data_310_auth_provider_oauth: A required module does not exist: UCP_AUTH_LINK</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11836">PHPBB3-11836</a>] - Manage external account associations error</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11837">PHPBB3-11837</a>] - UCP_AUTH_LINK_NOT_SUPPORTED (untranslated)</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11843">PHPBB3-11843</a>] - Regression: using underscores in template DEFINE variables yields unexpected behavior</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11846">PHPBB3-11846</a>] - Empty paragraph elements in jumpbox.html</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11850">PHPBB3-11850</a>] - $user-&gt;page contains bogus data on controller (app.php) pages</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11852">PHPBB3-11852</a>] - filesystem class must not depend on a web request</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11862">PHPBB3-11862</a>] - Events core.delete_user_before and core.delete_user_after compact the wrong vars</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11865">PHPBB3-11865</a>] - includes/bbcode.php is missing namespace change</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11866">PHPBB3-11866</a>] - &quot;You have specified an invalid dbms driver&quot; Error with config sample</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11867">PHPBB3-11867</a>] - Schema files are not created by create_schema_files.php</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11868">PHPBB3-11868</a>] - Class 'phpbb_request_interface' not found</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11871">PHPBB3-11871</a>] - Extension modules are not working with namespaces anymore</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11874">PHPBB3-11874</a>] - RSS Feed -Bug Url-</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11878">PHPBB3-11878</a>] - Missing leading \ in dependencies in soft_delete_mcp_modules</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11882">PHPBB3-11882</a>] - Incorrect dependency in signature module auth migration</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11888">PHPBB3-11888</a>] - On New installation the default search backend is not shown correctly.</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11890">PHPBB3-11890</a>] - Language key used when soft-deleting in MCP.</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11892">PHPBB3-11892</a>] - Undefined variable: to_forum_id after cancelling merge topic/move posts</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11893">PHPBB3-11893</a>] - Font size in &quot;Edit 'Remember Me' login keys&quot; is large</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11895">PHPBB3-11895</a>] - Forum feed stopped working</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11898">PHPBB3-11898</a>] - Unable to login to ACP on AREA51</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11901">PHPBB3-11901</a>] - Undefined offset: 3 in file [ROOT] -/includes/functions_content.php on line 776</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11905">PHPBB3-11905</a>] - Alpha 1 Migration</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11906">PHPBB3-11906</a>] - Missing database entries &quot;read_notification&quot;</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11908">PHPBB3-11908</a>] - class phpbb_auth_provider_oauth_service_exception not using namespaces</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11918">PHPBB3-11918</a>] - Can not update from 3.0.x to 3.1.x with MSSQL</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11919">PHPBB3-11919</a>] - Improper argument order for sql_fetchfield() in notification manager</li>
+</ul>
+<h4>Improvement</h4>
+<ul>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-7598">PHPBB3-7598</a>] - Reminding inactive users</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-7938">PHPBB3-7938</a>] - Display information about unread and new PMs in the header.</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-8065">PHPBB3-8065</a>] - Add an option to lock topics while moving them.</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-8270">PHPBB3-8270</a>] - Automatically loaded language-files for mods</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-8796">PHPBB3-8796</a>] - Mark forum(s) read (or mark topics read) marks some topics you haven't read</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-9346">PHPBB3-9346</a>] - Use different message template for jabber notification</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-9532">PHPBB3-9532</a>] - Optimized Page Titles</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-9549">PHPBB3-9549</a>] - Enhance teampage functionality</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-9596">PHPBB3-9596</a>] - Modular cron and allowing cron tasks to be run from system cron</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-9608">PHPBB3-9608</a>] - Cleanse object references from codebase for 3.1</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-9649">PHPBB3-9649</a>] - Moderator queue does not display icon if the new post is made in old thread</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-9668">PHPBB3-9668</a>] - Automatic UTF-8 normalization</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-9669">PHPBB3-9669</a>] - Native UTF-8 normalization</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-9684">PHPBB3-9684</a>] - Link global announcements to forums</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-9693">PHPBB3-9693</a>] - generate_smilies clean up </li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-9716">PHPBB3-9716</a>] - Handle user input through a request class providing a more complete mechanism than request_var</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-9741">PHPBB3-9741</a>] - Do not store any themes or templates in the database</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-9746">PHPBB3-9746</a>] - Normalise internet protocol version 6 addresses</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-9792">PHPBB3-9792</a>] - Move function definitions out of download/file.php</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-9823">PHPBB3-9823</a>] - Move functions definitions out of adm/index.php</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-9979">PHPBB3-9979</a>] - Autoloading for test suite</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10001">PHPBB3-10001</a>] - Class Based Forum/Topic Image</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10076">PHPBB3-10076</a>] - STARTTLS for emails</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10143">PHPBB3-10143</a>] - Delete-write-read test for config classes</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10148">PHPBB3-10148</a>] - Turn TEMPLATE_BITFIELD into an instance variable in acp_styles.php</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10155">PHPBB3-10155</a>] - Inclusion of jQuery</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10161">PHPBB3-10161</a>] - Use one of &quot;email&quot; or &quot;e-mail&quot;</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10172">PHPBB3-10172</a>] - Display empty birthday box in prosilver when birthdays are enabled but there are none today</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10258">PHPBB3-10258</a>] - Use HTML5 doctype</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10271">PHPBB3-10271</a>] - confirm_box operations should use AJAX</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10272">PHPBB3-10272</a>] - Simple operations should use AJAX</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10273">PHPBB3-10273</a>] - Accepting / denying posts should use AJAX</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10281">PHPBB3-10281</a>] - Reordering forums in the ACP should use AJAX</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10312">PHPBB3-10312</a>] - Un-check &quot;Leave shadow topic in place&quot; checkbox when moving topics</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10325">PHPBB3-10325</a>] - Ability to disable the &quot;I forgot my password&quot; feature</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10336">PHPBB3-10336</a>] - Removing imagesets in 3.1</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10344">PHPBB3-10344</a>] - Add attachment icons to list of reports and queue</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10362">PHPBB3-10362</a>] - HTML5 Fix - &quot;name&quot; attribute is deprecated in anchors. Use &quot;id&quot; attribute instead.</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10383">PHPBB3-10383</a>] - Polls should use AJAX</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10387">PHPBB3-10387</a>] - generate_pagination() should export the current page number as a template variable</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10390">PHPBB3-10390</a>] - Add an ACP option to use jQuery via local copy or remote CDN</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10410">PHPBB3-10410</a>] - Add option to display users in their first teampage group</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10412">PHPBB3-10412</a>] - Use memory_get_peak_usage for debug output instead of memory_get_usage</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10431">PHPBB3-10431</a>] - Remove language from the button-graphics and use text strings instead</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10438">PHPBB3-10438</a>] - Alligning the Smileys on the same line as the text.</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10484">PHPBB3-10484</a>] - Use variables for sql_build_query() calls, so mods/extensions can extend the arrays</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10510">PHPBB3-10510</a>] - Quick-mod markup should be in the template</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10524">PHPBB3-10524</a>] - Wrong version code name in Ascraeus coding guidelines document.</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10535">PHPBB3-10535</a>] - Remove &quot;Confirm Email Address&quot; field from registration form</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10557">PHPBB3-10557</a>] - Missing IN_PHPBB check in phpBB/includes/functions_acp.php</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10601">PHPBB3-10601</a>] - Move inbox to top module in UCP Private Messages Tab</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10614">PHPBB3-10614</a>] - Script to manage extensions</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10617">PHPBB3-10617</a>] - prosilver clean up: adding proper css reset</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10619">PHPBB3-10619</a>] - prosilver clean up: removing duplicate colors</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10632">PHPBB3-10632</a>] - Merging style components</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10640">PHPBB3-10640</a>] - Bigger Topic Title Length</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10650">PHPBB3-10650</a>] - Last Topic Title on Forum list</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10659">PHPBB3-10659</a>] - Allow all administrators to purge cache</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10665">PHPBB3-10665</a>] - INCLUDEJS template tag</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10679">PHPBB3-10679</a>] - Add new permission for changing profile field information</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10705">PHPBB3-10705</a>] - Replace WARNINGS_ZERO_TOTAL with NO_WARNINGS for consistency</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10714">PHPBB3-10714</a>] - Create a class for add_log() and unit tests</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10726">PHPBB3-10726</a>] - Preview from Quick Reply</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10727">PHPBB3-10727</a>] - Don't hide quickreply with javascript</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10733">PHPBB3-10733</a>] - Adding file locator function to style class</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10734">PHPBB3-10734</a>] - CSS3 rounded corners</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10741">PHPBB3-10741</a>] - Automatically resize textarea</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10743">PHPBB3-10743</a>] - Change theme to style in php code</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10762">PHPBB3-10762</a>] - Separate style and phpBB version numbers in style.cfg</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10771">PHPBB3-10771</a>] - Using Remember Me instead of autologin or persistent keys in the UI.</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10780">PHPBB3-10780</a>] - Move colons from template files to language files</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10783">PHPBB3-10783</a>] - assets_version config var appended to assets (css/js) URLs to prevent caching</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10786">PHPBB3-10786</a>] - Render search options by default on memberlist.php</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10799">PHPBB3-10799</a>] - includejs should not put phpbb root path in generated template code</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10800">PHPBB3-10800</a>] - includejs test confusingly includes an html file</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10864">PHPBB3-10864</a>] - Allow extensions to be accessed via controller with shorter access name than &quot;vendor/extname&quot;</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10933">PHPBB3-10933</a>] - Make style code more understandable</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10936">PHPBB3-10936</a>] - MySQL fulltext search improvement - removing check for PCRE UTF support</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10938">PHPBB3-10938</a>] - Display subforum listing on forumlist via template loop instead of PHP implode()</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10947">PHPBB3-10947</a>] - Quickmod tools have stopped autosubmitting</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10955">PHPBB3-10955</a>] - ajaxify should take options as the only argument</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10966">PHPBB3-10966</a>] - Remove code duplication from mysql* and mssql* dbal</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10968">PHPBB3-10968</a>] - Render pagination fully within the template</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10970">PHPBB3-10970</a>] - Allow INCLUDE template macros to accept paths of the form {FOO}/a/{BAR}/c</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10972">PHPBB3-10972</a>] - Add a new method to phpbb_functional_test_case to allow a new user to be created</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10973">PHPBB3-10973</a>] - Allow mocks to be autoloaded in tests</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10975">PHPBB3-10975</a>] - Memberlist functional tests</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10990">PHPBB3-10990</a>] - $user-&gt;lang['COMMA_SEPARATOR'] - is not uniformly used</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11001">PHPBB3-11001</a>] - html5 Placeholder for search box.</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11008">PHPBB3-11008</a>] - Get rid of eval in javascript</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11010">PHPBB3-11010</a>] - HTML5 input types for form fields</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11011">PHPBB3-11011</a>] - Using dependency injection for global variables in all search backends.</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11012">PHPBB3-11012</a>] - Member variable phpEx vs php_ext naming inconstistency</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11013">PHPBB3-11013</a>] - Allow arrays to be assigned and retrieved in templates</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11015">PHPBB3-11015</a>] - Make DBAL classes autoloadable</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11021">PHPBB3-11021</a>] - Link back to main site config setting</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11025">PHPBB3-11025</a>] - Make Last topic title in forum list Bold</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11032">PHPBB3-11032</a>] - Better error reporting for sphinx</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11037">PHPBB3-11037</a>] - Cache drivers require globals</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11044">PHPBB3-11044</a>] - Compress class should keep track of files added and deal with conflicts</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11048">PHPBB3-11048</a>] - Use access specifiers in search backends</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11050">PHPBB3-11050</a>] - Add docblocks missing in properties and methods in all search backends.</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11051">PHPBB3-11051</a>] - Add retrieval functions for all public properties in search backends</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11068">PHPBB3-11068</a>] - Hiding foes posts should use JS to display them, rather then reloading the whole page</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11070">PHPBB3-11070</a>] - Redundant background-position property in Prosilver button CSS?</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11082">PHPBB3-11082</a>] - Redis cache driver should not have executable permission</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11083">PHPBB3-11083</a>] - Abstract cache drivers should use abstract keyword</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11088">PHPBB3-11088</a>] - Combine Style and Extension Management into one Customisations tab in the ACP</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11116">PHPBB3-11116</a>] - Adjust Display of Warning/Error Messages in Extensions Controller</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11129">PHPBB3-11129</a>] - Misleading subscription state messages</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11152">PHPBB3-11152</a>] - Create cached, compiled container class rather than compiling it on every page load</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11156">PHPBB3-11156</a>] - Delete &quot;Misc&quot; tab of forum based permissions + move items</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11174">PHPBB3-11174</a>] - Unit tests for search backends</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11181">PHPBB3-11181</a>] - Bump PHP requirement to 5.3.3</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11183">PHPBB3-11183</a>] - Remove $load_extensions and weird dl() calls</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11189">PHPBB3-11189</a>] - Merge DEBUG and DEBUG_EXTRA</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11193">PHPBB3-11193</a>] - Generalize phpbb_di_pass_collection_pass to handle all collections using service tags</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11197">PHPBB3-11197</a>] - Prefix the css classes for the small arrow with &quot;arrow&quot;.</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11202">PHPBB3-11202</a>] - Add response status checks to functional tests</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11215">PHPBB3-11215</a>] - Separate root path for filesystem and urls/assets</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11217">PHPBB3-11217</a>] - Prefix for template values to give back value URL encoded</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11238">PHPBB3-11238</a>] - Specify goutte version</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11250">PHPBB3-11250</a>] - Remake the unit tests for the BBCode parser.</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11259">PHPBB3-11259</a>] - Make $phpbb_admin_path available everywhere</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11268">PHPBB3-11268</a>] - Delete phpbb_db_driver_mysql4 case</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11275">PHPBB3-11275</a>] - editor.js::colorPalette() breaks page with document.write &gt; add proper target</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11283">PHPBB3-11283</a>] - Extensions as symlinks</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11294">PHPBB3-11294</a>] - Update extension list in running tests doc</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11306">PHPBB3-11306</a>] - Container should be created by a phpbb_create_default_container() function</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11314">PHPBB3-11314</a>] - Improve readability and code cleanup in new JavaScript files</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11328">PHPBB3-11328</a>] - New language variables for buttons</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11373">PHPBB3-11373</a>] - Notifications - Purge old with cron</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11390">PHPBB3-11390</a>] - Remove pagination from ucp_notifications.html when list is empty.</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11393">PHPBB3-11393</a>] - Give more information on database_updater about what exactly happened</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11409">PHPBB3-11409</a>] - No feedback provided when updating group position settings in ACP</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11458">PHPBB3-11458</a>] - Automatically add extension permission language files</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11461">PHPBB3-11461</a>] - [Template Event] - viewtopic_body_footer</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11463">PHPBB3-11463</a>] - Add topic title attribute in search results</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11477">PHPBB3-11477</a>] - Allow customisation of &quot;Board index&quot;</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11482">PHPBB3-11482</a>] - Extend syntax for DEFINE tag</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11495">PHPBB3-11495</a>] - Add nested sets implementation to phpBB core</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11519">PHPBB3-11519</a>] - Rename test event template file</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11533">PHPBB3-11533</a>] - Notification settings page is using topiclist class incorrectly</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11557">PHPBB3-11557</a>] - Allow to use tab when typing code and keep indentation</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11558">PHPBB3-11558</a>] - Notifications link in header should not include [ and ] -</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11577">PHPBB3-11577</a>] - Topiclist/Forumlist Needs tweaking after PR 1331</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11582">PHPBB3-11582</a>] - Split permission logic from translations</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11600">PHPBB3-11600</a>] - Increase code test coverage of avatar manager</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11606">PHPBB3-11606</a>] - make_clickable() in includes/functions_content.php uses deprecated preg_replace() /e modifier (PREG_REPLACE_EVAL)</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11615">PHPBB3-11615</a>] - Partial refactoring of session tests</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11620">PHPBB3-11620</a>] - Improve session test coverage</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11621">PHPBB3-11621</a>] - Improve MySQL fulltext search indexes</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11651">PHPBB3-11651</a>] - Bootstrap container from config.php</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11667">PHPBB3-11667</a>] - phpbb_template_twig_node_includeasset should be abstract</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11669">PHPBB3-11669</a>] - Fix PHP bug #55124 (/./ in recursive mkdirs)</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11684">PHPBB3-11684</a>] - No utility to time-wasting user login confirmation message/screen</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11685">PHPBB3-11685</a>] - No utility to time-wasting user logout confirmation message/screen </li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11700">PHPBB3-11700</a>] - Use namespaces rather than prefixes for class names</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11703">PHPBB3-11703</a>] - Make &quot;Serve jQuery using Google’s CDN&quot; generic</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11724">PHPBB3-11724</a>] - Support &quot;ELSE IF&quot; and &quot;ELSEIF&quot; in the same way</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11744">PHPBB3-11744</a>] - Group join request notification</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11745">PHPBB3-11745</a>] - Group join approved notification</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11747">PHPBB3-11747</a>] - UCP Prefs Core and Template Events</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11749">PHPBB3-11749</a>] - PHP and Template Event Requests for Topic Preview Extension</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11784">PHPBB3-11784</a>] - Remove naming redundancy for event listeners</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11786">PHPBB3-11786</a>] - Fix various defects in PHPDoc in-code documentation</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11795">PHPBB3-11795</a>] - Move all JavaScript from HTML code to external files</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11813">PHPBB3-11813</a>] - Mock authentication provider should implement base provider class</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11831">PHPBB3-11831</a>] - Update fabpot/goutte to 1.0.*</li>
+</ul>
+<h4>New Feature</h4>
+<ul>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-9498">PHPBB3-9498</a>] - External Avatar sources: Gravatar</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-9550">PHPBB3-9550</a>] - Introduce new Event System</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-9558">PHPBB3-9558</a>] - Use PHP timezone handling abilities</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-9627">PHPBB3-9627</a>] - Resume support for attachments / HTTP range support</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-9647">PHPBB3-9647</a>] - Ability to delete auto login keys from UCP</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-9657">PHPBB3-9657</a>] - Soft Delete Posts and Topics </li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-9721">PHPBB3-9721</a>] - Attachments management</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-9726">PHPBB3-9726</a>] - Improved template engine</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-9730">PHPBB3-9730</a>] - PostgreSQL Fulltext Search</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-9737">PHPBB3-9737</a>] - Migrations</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-9790">PHPBB3-9790</a>] - Support for X-Accel-Redirect and X-Sendfile headers for attachment downloads</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10018">PHPBB3-10018</a>] - Refactor Avatars to support custom modules</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10270">PHPBB3-10270</a>] - JavaScript - confirm / alert / input popups</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10323">PHPBB3-10323</a>] - Extensions</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10328">PHPBB3-10328</a>] - There should be a way to send JSON</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10345">PHPBB3-10345</a>] - Support for arbitrary number of plural forms in language packs</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10411">PHPBB3-10411</a>] - Create grouping capability for custom ordered team page</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10586">PHPBB3-10586</a>] - Front-facing file in Extensions</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10600">PHPBB3-10600</a>] - When creating a report for a post, copy the post itself</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10631">PHPBB3-10631</a>] - Extensions Admin</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10739">PHPBB3-10739</a>] - Dependency Injection Container</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10929">PHPBB3-10929</a>] - Improves the attachment uploader to use HTML5 features</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10931">PHPBB3-10931</a>] - Add a wrapper class for ini_get()</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10942">PHPBB3-10942</a>] - Add sql_case() and sql_concatenate() to dbal</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10946">PHPBB3-10946</a>] - Sphinx Search Backend integration</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11042">PHPBB3-11042</a>] - Feature to download all attachments in a post and topic.</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11103">PHPBB3-11103</a>] - Notifications system</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11175">PHPBB3-11175</a>] - Add microdata to breadcrumbs</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11469">PHPBB3-11469</a>] - Add SQL insert buffer class</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11598">PHPBB3-11598</a>] - Replace template engine with Twig</li>
+</ul>
+<h4>Sub-task</h4>
+<ul>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-9556">PHPBB3-9556</a>] - Drop php closing tags</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-9574">PHPBB3-9574</a>] - Drop fallback implementations</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-9688">PHPBB3-9688</a>] - update_session API</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-9738">PHPBB3-9738</a>] - Make installer and updater use migrations</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-9797">PHPBB3-9797</a>] - Adjust existing access to superglobals</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10817">PHPBB3-10817</a>] - Use valid composer.json instead of non-standard extension.json</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10992">PHPBB3-10992</a>] - Use updated Goutte in Fileupload tests</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11109">PHPBB3-11109</a>] - Create a separate set of compress tests for the develop branch</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11243">PHPBB3-11243</a>] - Topics with attachments only show &quot;download all attachments&quot; links on pages containing attachments.</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11318">PHPBB3-11318</a>] - Extensions use migrations</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11351">PHPBB3-11351</a>] - Add appropriate language strings for errors</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11531">PHPBB3-11531</a>] - Add functional tests for new avatar system</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11637">PHPBB3-11637</a>] - generate_text_for_display on search.php</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11638">PHPBB3-11638</a>] - generate_text_for_display on viewtopic.php</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11639">PHPBB3-11639</a>] - generate_text_for_display on includes/functions_posting.php</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11640">PHPBB3-11640</a>] - generate_text_for_display on includes/functions_privmsgs.php</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11641">PHPBB3-11641</a>] - generate_text_for_display on includes/mcp/mcp_pm_reports.php</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11642">PHPBB3-11642</a>] - generate_text_for_display on includes/mcp/mcp_post.php</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11643">PHPBB3-11643</a>] - generate_text_for_display on includes/mcp/mcp_queue.php</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11653">PHPBB3-11653</a>] - generate_text_for_display on includes/mcp/mcp_topic.php</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11654">PHPBB3-11654</a>] - generate_text_for_display on includes/mcp/mcp_warn.php</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11655">PHPBB3-11655</a>] - generate_text_for_display on includes/ucp/ucp_pm_viewmessage.php</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11656">PHPBB3-11656</a>] - generate_text_for_display on memberlist.php</li>
+</ul>
+<h4>Task</h4>
+<ul>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-7090">PHPBB3-7090</a>] - Update minimum PHP version to 5.2</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-9557">PHPBB3-9557</a>] - Update coding guidelines for 3.1 and PHP &gt;= 5.2</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-9682">PHPBB3-9682</a>] - Add a class loader for auto loading and define naming rules for new phpbb classes</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-9783">PHPBB3-9783</a>] - Restore subsilver2</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-9867">PHPBB3-9867</a>] - Adjust the implementation of error messages localization</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-9983">PHPBB3-9983</a>] - Restructure ACM classes</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-9988">PHPBB3-9988</a>] - Replace config with an instance of a class implementing ArrayAccess</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10091">PHPBB3-10091</a>] - Bump minimum required postgresql version for 3.1</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10173">PHPBB3-10173</a>] - Move birthday list logic into templates</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10202">PHPBB3-10202</a>] - Provide a mechanism to manually retrieve long configuration options from a TEXT column</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10260">PHPBB3-10260</a>] - Remove prosilver styleswitcher</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10314">PHPBB3-10314</a>] - Whitelist all files in includes for code coverage reports</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10389">PHPBB3-10389</a>] - JSON extension should be checked in the installer</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10414">PHPBB3-10414</a>] - Functional testing</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10467">PHPBB3-10467</a>] - Check extensions diff for classes/constants not existing in php 5.2</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10609">PHPBB3-10609</a>] - Prefix phpBB functions with phpbb_ to prevent compatibility issues with other software</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10670">PHPBB3-10670</a>] - Require PHP 5.3 at minimum for phpBB 3.1</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10680">PHPBB3-10680</a>] - Add ext/ to .gitignore</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10688">PHPBB3-10688</a>] - Change 3.0 language to 3.1</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10693">PHPBB3-10693</a>] - Change minimum PHP version for Ascraeus to 5.3.2</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10719">PHPBB3-10719</a>] - Remove second 5.2 test suite on ascreaus</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10732">PHPBB3-10732</a>] - Add config_dev.php and config_test.php to .gitignore</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10855">PHPBB3-10855</a>] - Coding guideline change - have curly brackets on same line in JS</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10869">PHPBB3-10869</a>] - Remove PHP 5.2 check from .travis.yml</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10877">PHPBB3-10877</a>] - Have bamboo generate and publish a phpBB package for every build.</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10882">PHPBB3-10882</a>] - Expand test coverage for template engine - add tests for invalid constructs</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10893">PHPBB3-10893</a>] - Update the Usage of Composer</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10909">PHPBB3-10909</a>] - Update Travis Test Configuration: Travis no longer supports PHP 5.3.2</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10932">PHPBB3-10932</a>] - Store composer.phar in the phpBB repository to make sure a working version is always available</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10939">PHPBB3-10939</a>] - Modify the phpbb_request class to handle the $_FILES superglobal as well</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10941">PHPBB3-10941</a>] - Write tests for includes/functions_upload.php</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10944">PHPBB3-10944</a>] - Allow INCLUDEJS to include javascript from the assets directory</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10949">PHPBB3-10949</a>] - 3.1 AJAX code should use new coding guidelines</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10963">PHPBB3-10963</a>] - Use fileinfo in filespec::is_image() instead of trusting the mimetype sent by the browser</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10969">PHPBB3-10969</a>] - Remove remove_comments() and remove_remarks()</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10993">PHPBB3-10993</a>] - Update README to use composer.phar from the repository</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10994">PHPBB3-10994</a>] - Revert changes in PHPBB3-10963</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11054">PHPBB3-11054</a>] - Improper @var documentation syntax in includes/extension/controller.php</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11061">PHPBB3-11061</a>] - Fix README composer instructions</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11195">PHPBB3-11195</a>] - Put conditional opening brace on its own line, as per guidelines</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11225">PHPBB3-11225</a>] - Delete subsilver2 mcp_jumpbox.html</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11287">PHPBB3-11287</a>] - Add Template Event naming guidelines to docs/coding-guidelines.html</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11338">PHPBB3-11338</a>] - Enable Redis tests on Travis</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11441">PHPBB3-11441</a>] - Refactor phpbb_user_loader tests</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11476">PHPBB3-11476</a>] - Remove pass-by-reference from phpbb_db_driver::sql_multi_insert</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11481">PHPBB3-11481</a>] - Feed classes are currently all in feed.php</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11698">PHPBB3-11698</a>] - Move all autoloadable files to phpbb/ rather than includes/</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11722">PHPBB3-11722</a>] - Remove reference assignment for $captcha in report.php</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11760">PHPBB3-11760</a>] - 3.0.x Migration should use the phpbb_version_compare() wrapper.</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11818">PHPBB3-11818</a>] - Upgrade Symfony to 2.3 LTS</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11870">PHPBB3-11870</a>] - No longer exclude ./phpBB/phpbb/search/fulltext_*.php from code coverage</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11885">PHPBB3-11885</a>] - Add migrations for 3.0.12-RCx and 3.0.12</li>
+<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11913">PHPBB3-11913</a>] - Apply reorganisation of download.phpbb.com to build_announcement.php</li>
+</ul>
+
+ <a name="v3011"></a><h3>1.v. Changes since 3.0.11</h3>
<h4>Bug</h4>
<ul>
@@ -248,7 +1257,7 @@
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11753">PHPBB3-11753</a>] - Upgrade mysql_upgrader.php schema data.</li>
</ul>
- <a name="v3010"></a><h3>1.ii. Changes since 3.0.10</h3>
+ <a name="v3010"></a><h3>1.vi. Changes since 3.0.10</h3>
<h4>Bug</h4>
<ul>
@@ -373,7 +1382,7 @@
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10909">PHPBB3-10909</a>] - Update Travis Test Configuration: Travis no longer supports PHP 5.3.2</li>
</ul>
- <a name="v309"></a><h3>1.iii. Changes since 3.0.9</h3>
+ <a name="v309"></a><h3>1.vii. Changes since 3.0.9</h3>
<h4>Bug</h4>
<ul>
@@ -509,7 +1518,7 @@
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10480">PHPBB3-10480</a>] - Automate changelog building</li>
</ul>
- <a name="v308"></a><h3>1.iv. Changes since 3.0.8</h3>
+ <a name="v308"></a><h3>1.viii. Changes since 3.0.8</h3>
<h4> Bug
</h4>
@@ -877,7 +1886,7 @@
</ul>
- <a name="v307-PL1"></a><h3>1.v. Changes since 3.0.7-PL1</h3>
+ <a name="v307-PL1"></a><h3>1.ix. Changes since 3.0.7-PL1</h3>
<h4> Security
</h4>
<ul>
@@ -1335,13 +2344,13 @@
</ul>
- <a name="v307"></a><h3>1.vi. Changes since 3.0.7</h3>
+ <a name="v307"></a><h3>1.x. Changes since 3.0.7</h3>
<ul>
<li>[Sec] Do not expose forum content of forums with ACL entries but no actual permission in ATOM Feeds. (Bug #58595)</li>
</ul>
- <a name="v306"></a><h3>1.vii. Changes since 3.0.6</h3>
+ <a name="v306"></a><h3>1.xi. Changes since 3.0.6</h3>
<ul>
<li>[Fix] Allow ban reason and length to be selected and copied in ACP and subsilver2 MCP. (Bug #51095)</li>
@@ -1445,7 +2454,7 @@
</ul>
- <a name="v305"></a><h3>1.viii. Changes since 3.0.5</h3>
+ <a name="v305"></a><h3>1.xii. Changes since 3.0.5</h3>
<ul>
<li>[Fix] Allow whitespaces in avatar gallery names. (Bug #44955)</li>
@@ -1667,7 +2676,7 @@
<li>[Feature] Send anonymous statistical information to phpBB on installation and update (optional).</li>
</ul>
- <a name="v304"></a><h3>1.ix. Changes since 3.0.4</h3>
+ <a name="v304"></a><h3>1.xiii. Changes since 3.0.4</h3>
<ul>
<li>[Fix] Delete user entry from ban list table upon user deletion (Bug #40015 - Patch by TerraFrost)</li>
@@ -1756,7 +2765,7 @@
<li>[Sec] Only use forum id supplied for posting if global announcement detected. (Reported by nickvergessen)</li>
</ul>
- <a name="v303"></a><h3>1.x. Changes since 3.0.3</h3>
+ <a name="v303"></a><h3>1.xiv. Changes since 3.0.3</h3>
<ul>
<li>[Fix] Allow mixed-case template directories to be inherited (Bug #36725)</li>
@@ -1788,7 +2797,7 @@
<li>[Sec] Ask for forum password if post within passworded forum quoted in private message. (Reported by nickvergessen)</li>
</ul>
- <a name="v302"></a><h3>1.xi. Changes since 3.0.2</h3>
+ <a name="v302"></a><h3>1.xv. Changes since 3.0.2</h3>
<ul>
<li>[Fix] Correctly set topic starter if first post in topic removed (Bug #30575 - Patch by blueray2048)</li>
@@ -1887,7 +2896,7 @@
<li>[Sec Precaution] Stricter validation of the HTTP_HOST header (Thanks to Techie-Micheal et al for pointing out possible issues in derived code)</li>
</ul>
- <a name="v301"></a><h3>1.xii. Changes since 3.0.1</h3>
+ <a name="v301"></a><h3>1.xvi. Changes since 3.0.1</h3>
<ul>
<li>[Fix] Ability to set permissions on non-mysql dbms (Bug #24955)</li>
@@ -1935,7 +2944,7 @@
<li>[Sec] Only allow urls gone through redirect() being used within login_box(). (thanks nookieman)</li>
</ul>
- <a name="v300"></a><h3>1.xiii Changes since 3.0.0</h3>
+ <a name="v300"></a><h3>1.xvii. Changes since 3.0.0</h3>
<ul>
<li>[Change] Validate birthdays (Bug #15004)</li>
@@ -2006,7 +3015,7 @@
<li>[Fix] Find and display colliding usernames correctly when converting from one database to another (Bug #23925)</li>
</ul>
- <a name="v30rc8"></a><h3>1.xiv. Changes since 3.0.RC8</h3>
+ <a name="v30rc8"></a><h3>1.xviii. Changes since 3.0.RC8</h3>
<ul>
<li>[Fix] Cleaned usernames contain only single spaces, so &quot;a_name&quot; and &quot;a__name&quot; are treated as the same name (Bug #15634)</li>
@@ -2015,7 +3024,7 @@
<li>[Fix] Call garbage_collection() within database updater to correctly close connections (affects Oracle for example)</li>
</ul>
- <a name="v30rc7"></a><h3>1.xv. Changes since 3.0.RC7</h3>
+ <a name="v30rc7"></a><h3>1.xix. Changes since 3.0.RC7</h3>
<ul>
<li>[Fix] Fixed MSSQL related bug in the update system</li>
@@ -2050,7 +3059,7 @@
<li>[Fix] No duplication of active topics (Bug #15474)</li>
</ul>
- <a name="v30rc6"></a><h3>1.xvi. Changes since 3.0.RC6</h3>
+ <a name="v30rc6"></a><h3>1.xx. Changes since 3.0.RC6</h3>
<ul>
<li>[Fix] Submitting language changes using acp_language (Bug #14736)</li>
@@ -2060,7 +3069,7 @@
<li>[Fix] Able to request new password (Bug #14743)</li>
</ul>
- <a name="v30rc5"></a><h3>1.xvii. Changes since 3.0.RC5</h3>
+ <a name="v30rc5"></a><h3>1.xxi. Changes since 3.0.RC5</h3>
<ul>
<li>[Feature] Removing constant PHPBB_EMBEDDED in favor of using an exit_handler(); the constant was meant to achive this more or less.</li>
@@ -2123,7 +3132,7 @@
<li>[Sec] New password hashing mechanism for storing passwords (#i42)</li>
</ul>
- <a name="v30rc4"></a><h3>1.xviii. Changes since 3.0.RC4</h3>
+ <a name="v30rc4"></a><h3>1.xxii. Changes since 3.0.RC4</h3>
<ul>
<li>[Fix] MySQL, PostgreSQL and SQLite related database fixes (Bug #13862)</li>
@@ -2174,7 +3183,7 @@
<li>[Fix] odbc_autocommit causing existing result sets to be dropped (Bug #14182)</li>
</ul>
- <a name="v30rc3"></a><h3>1.xix. Changes since 3.0.RC3</h3>
+ <a name="v30rc3"></a><h3>1.xxiii. Changes since 3.0.RC3</h3>
<ul>
<li>[Fix] Fixing some subsilver2 and prosilver style issues</li>
@@ -2283,7 +3292,7 @@
</ul>
- <a name="v30rc2"></a><h3>1.xx. Changes since 3.0.RC2</h3>
+ <a name="v30rc2"></a><h3>1.xxiv. Changes since 3.0.RC2</h3>
<ul>
<li>[Fix] Re-allow searching within the memberlist</li>
@@ -2329,7 +3338,7 @@
</ul>
- <a name="v30rc1"></a><h3>1.xxi. Changes since 3.0.RC1</h3>
+ <a name="v30rc1"></a><h3>1.xxv. Changes since 3.0.RC1</h3>
<ul>
<li>[Fix] (X)HTML issues within the templates (Bug #11255, #11255)</li>
diff --git a/phpBB/docs/FAQ.html b/phpBB/docs/FAQ.html
index 9b6440ab21..a76b6be72a 100644
--- a/phpBB/docs/FAQ.html
+++ b/phpBB/docs/FAQ.html
@@ -1,16 +1,9 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en" xml:lang="en">
+<!DOCTYPE html>
+<html dir="ltr" lang="en">
<head>
-
-<meta http-equiv="content-type" content="text/html; charset=utf-8" />
-<meta http-equiv="content-style-type" content="text/css" />
-<meta http-equiv="content-language" content="en" />
-<meta http-equiv="imagetoolbar" content="no" />
-<meta name="resource-type" content="document" />
-<meta name="distribution" content="global" />
-<meta name="copyright" content="phpBB Group" />
+<meta charset="utf-8">
<meta name="keywords" content="" />
-<meta name="description" content="phpBB 3.0.x frequently asked questions" />
+<meta name="description" content="phpBB 3.1.x frequently asked questions" />
<title>phpBB3 &bull; FAQ</title>
<link href="stylesheet.css" rel="stylesheet" type="text/css" media="screen, projection" />
@@ -27,8 +20,8 @@
<div id="doc-description">
<a href="../index.php" id="logo"><img src="site_logo.gif" alt="" /></a>
- <h1>phpBB 3.0.x FAQ</h1>
- <p>phpBB 3.0.x frequently asked questions</p>
+ <h1>phpBB 3.1.x FAQ</h1>
+ <p>phpBB 3.1.x frequently asked questions</p>
<p style="display: none;"><a href="#start_here">Skip</a></p>
</div>
diff --git a/phpBB/docs/INSTALL.html b/phpBB/docs/INSTALL.html
index 74c017ecff..01eeea6540 100644
--- a/phpBB/docs/INSTALL.html
+++ b/phpBB/docs/INSTALL.html
@@ -1,16 +1,9 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en" xml:lang="en">
+<!DOCTYPE html>
+<html dir="ltr" lang="en">
<head>
-
-<meta http-equiv="content-type" content="text/html; charset=utf-8" />
-<meta http-equiv="content-style-type" content="text/css" />
-<meta http-equiv="content-language" content="en" />
-<meta http-equiv="imagetoolbar" content="no" />
-<meta name="resource-type" content="document" />
-<meta name="distribution" content="global" />
-<meta name="copyright" content="phpBB Group" />
+<meta charset="utf-8">
<meta name="keywords" content="" />
-<meta name="description" content="phpBB 3.0.x Installation, updating and conversion informations" />
+<meta name="description" content="phpBB 3.1.x Installation, updating and conversion informations" />
<title>phpBB3 &bull; Install</title>
<link href="stylesheet.css" rel="stylesheet" type="text/css" media="screen, projection" />
@@ -27,8 +20,8 @@
<div id="doc-description">
<a href="../index.php" id="logo"><img src="site_logo.gif" alt="" /></a>
- <h1>phpBB 3.0.x Install</h1>
- <p>phpBB 3.0.x Installation, updating and conversion informations</p>
+ <h1>phpBB 3.1.x Install</h1>
+ <p>phpBB 3.1.x Installation, updating and conversion informations</p>
<p style="display: none;"><a href="#start_here">Skip</a></p>
</div>
@@ -59,7 +52,7 @@
<li><a href="#quickinstall">Quick install</a></li>
<li><a href="#require">Requirements</a></li>
<li><a href="#install">New installation</a></li>
- <li><a href="#update">Updating from stable releases of phpBB 3.0.x</a>
+ <li><a href="#update">Updating from stable releases of phpBB 3.1.x</a>
<ol style="list-style-type: lower-roman;">
<li><a href="#update_full">Full package</a></li>
<li><a href="#update_files">Changed files</a></li>
@@ -68,7 +61,7 @@
<li><a href="#update_all">All package types</a></li>
</ol>
</li>
- <li><a href="#convert">Conversion from phpBB 2.0.x to phpBB 3.0.x</a>
+ <li><a href="#convert">Conversion from phpBB 2.0.x to phpBB 3.1.x</a>
<ol style="list-style-type: lower-roman;">
<li><a href="#prereq">Requirements before converting</a></li>
<li><a href="#conversion">Converting</a></li>
@@ -132,7 +125,7 @@
<div class="content">
- <p>phpBB 3.0.x has a few requirements which must be met before you are able to install and use it.</p>
+ <p>phpBB 3.1.x has a few requirements which must be met before you are able to install and use it.</p>
<ul>
<li>A webserver or web hosting account running on any major Operating System with support for PHP</li>
@@ -140,14 +133,18 @@
<ul>
<li>MySQL 3.23 or above (MySQLi supported)</li>
<li>MariaDB 5.1 or above</li>
- <li>PostgreSQL 7.3+</li>
+ <li>PostgreSQL 8.3+</li>
<li>SQLite 2.8.2+ (SQLite 3 is not supported)</li>
<li>Firebird 2.1+</li>
<li>MS SQL Server 2000 or above (directly or via ODBC or the native adapter)</li>
<li>Oracle</li>
</ul>
</li>
- <li><strong>PHP (>=4.3.3, >=4.4.0, >=5.0.0)</strong> with support for the database you intend to use.</li>
+ <li><strong>PHP 5.3.3+</strong> with support for the database you intend to use.</li>
+ <li>The following PHP modules are required:</li>
+ <ul>
+ <li>json</li>
+ </ul>
<li>getimagesize() function must be enabled.</li>
<li>Presence of the following modules within PHP will provide access to additional features, but they are not required:
<ul>
@@ -160,7 +157,7 @@
</li>
</ul>
- <p>If your server or hosting account does not meet the requirements above then you will be unable to install phpBB 3.0.x.</p>
+ <p>If your server or hosting account does not meet the requirements above then you will be unable to install phpBB 3.1.x.</p>
</div>
@@ -251,7 +248,7 @@
<hr />
- <a name="update"></a><h2>4. Updating from stable releases of phpBB 3.0.x</h2>
+ <a name="update"></a><h2>4. Updating from stable releases of phpBB 3.1.x</h2>
<div class="paragraph">
<div class="inner"><span class="corners-top"><span></span></span>
@@ -276,7 +273,7 @@
<p>This package is meant for those wanting to only replace the files that were changed between a previous version and the latest version.</p>
- <p>This package contains a number of archives, each contains the files changed from a given release to the latest version. You should select the appropriate archive for your current version, e.g. if you currently have <strong>3.0.11</strong> you should select the appropriate <code>phpBB-3.0.12-files.zip/tar.bz2</code> file.</p>
+ <p>This package contains a number of archives, each contains the files changed from a given release to the latest version. You should select the appropriate archive for your current version, e.g. if you currently have <strong>3.1.0</strong> you should select the appropriate <code>phpBB-3.1.1-files.zip/tar.bz2</code> file.</p>
<p>The directory structure has been preserved, enabling you (if you wish) to simply upload the uncompressed contents of the archive to the appropriate location on your server, i.e. simply overwrite the existing files with the new versions. Do not forget that if you have installed any modifications (MODs) these files will overwrite the originals, possibly destroying them in the process. You will need to re-add MODs to any affected file before uploading.</p>
@@ -288,7 +285,7 @@
<p>The patch file is one solution for those with many Modifications (MODs) or other changes and do not want to re-add them back to all the changed files. To use this you will need command line access to a standard UNIX type <strong>patch</strong> application. If you do not have access to such an application, but still want to use this update approach, we strongly recommend the <a href="#update_auto">Automatic update package</a> explained below. It is also the recommended update method.</p>
- <p>A number of patch files are provided to allow you to update from previous stable releases. Select the correct patch, e.g. if your current version is <strong>3.0.11</strong>, you need the <code>phpBB-3.0.12-patch.zip/tar.bz2</code> file. Place the correct patch in the parent directory containing the phpBB core files (i.e. index.php, viewforum.php, etc.). With this done you should run the following command: <code>patch -cl -d [PHPBB DIRECTORY] -p1 &lt; [PATCH NAME]</code> (where PHPBB DIRECTORY is the directory name your phpBB Installation resides in, for example phpBB, and where PATCH NAME is the relevant filename of the selected patch file). This should complete quickly, hopefully without any HUNK FAILED comments.</p>
+ <p>A number of patch files are provided to allow you to update from previous stable releases. Select the correct patch, e.g. if your current version is <strong>3.1.0</strong>, you need the <code>phpBB-3.1.1-patch.zip/tar.bz2</code> file. Place the correct patch in the parent directory containing the phpBB core files (i.e. index.php, viewforum.php, etc.). With this done you should run the following command: <code>patch -cl -d [PHPBB DIRECTORY] -p1 &lt; [PATCH NAME]</code> (where PHPBB DIRECTORY is the directory name your phpBB Installation resides in, for example phpBB, and where PATCH NAME is the relevant filename of the selected patch file). This should complete quickly, hopefully without any HUNK FAILED comments.</p>
<p>If you do get failures, you should look at using the <a href="#update_files">Changed Files</a> package to replace the files which failed to patch. Please note that you will need to manually re-add any MODs to these particular files. Alternatively, if you know how, you can examine the .rej files to determine what failed where and make manual adjustments to the relevant source.</p>
@@ -298,7 +295,7 @@
<p>This update method is the recommended method for updating. This package detects changed files automatically and merges in changes if needed.</p>
- <p>The automatic update package will update the board from a given version to the latest version. A number of automatic update files are available, and you should choose the one that corresponds to the version of the board that you are currently running. For example, if your current version is <strong>3.0.11</strong>, you need the <code>phpBB-3.0.11_to_3.0.12.zip/tar.bz2</code> file.</p>
+ <p>The automatic update package will update the board from a given version to the latest version. A number of automatic update files are available, and you should choose the one that corresponds to the version of the board that you are currently running. For example, if your current version is <strong>3.0.10</strong>, you need the <code>phpBB-3.0.10_to_3.0.11.zip/tar.bz2</code> file.</p>
<p>To perform the update, either follow the instructions from the <strong>Administration Control Panel-&gt;System</strong> Tab - this should point out that you are running an outdated version and will guide you through the update - or follow the instructions listed below.</p>
@@ -327,7 +324,7 @@
<hr />
- <a name="convert"></a><h2>5. Conversion from phpBB 2.0.x to phpBB 3.0.x</h2>
+ <a name="convert"></a><h2>5. Conversion from phpBB 2.0.x to phpBB 3.1.x</h2>
<div class="paragraph">
<div class="inner"><span class="corners-top"><span></span></span>
diff --git a/phpBB/docs/README.html b/phpBB/docs/README.html
index d54c58eca6..27ace05169 100644
--- a/phpBB/docs/README.html
+++ b/phpBB/docs/README.html
@@ -1,16 +1,9 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en" xml:lang="en">
+<!DOCTYPE html>
+<html dir="ltr" lang="en">
<head>
-
-<meta http-equiv="content-type" content="text/html; charset=utf-8" />
-<meta http-equiv="content-style-type" content="text/css" />
-<meta http-equiv="content-language" content="en" />
-<meta http-equiv="imagetoolbar" content="no" />
-<meta name="resource-type" content="document" />
-<meta name="distribution" content="global" />
-<meta name="copyright" content="phpBB Group" />
+<meta charset="utf-8">
<meta name="keywords" content="" />
-<meta name="description" content="phpBB 3.0.x Readme" />
+<meta name="description" content="phpBB 3.1.x Readme" />
<title>phpBB3 &bull; Readme</title>
<link href="stylesheet.css" rel="stylesheet" type="text/css" media="screen, projection" />
@@ -27,7 +20,7 @@
<div id="doc-description">
<a href="../index.php" id="logo"><img src="site_logo.gif" alt="" /></a>
- <h1>phpBB 3.0.x Readme</h1>
+ <h1>phpBB 3.1.x Readme</h1>
<p style="display: none;"><a href="#start_here">Skip</a></p>
</div>
@@ -91,25 +84,26 @@
<div class="inner"><span class="corners-top"><span></span></span>
<div class="content">
+ <p>Installation, update and conversion instructions can be found in the <a href="INSTALL.html">INSTALL</a> document in this directory. If you are intending on converting from a phpBB 2.0.x or 3.0.x installation we highly recommend that you backup any existing data before proceeding!</p>
- <p>Installation, update and conversion instructions can be found in the <a href="INSTALL.html">INSTALL</a> document in this directory. If you are intending on converting from a phpBB 2.0.x installation we highly recommend that you backup any existing data before proceeding!</p>
-
- <p>Users of phpBB3 Beta versions cannot directly update.</p>
+ <p>Users of phpBB 3.0 and 3.1 Beta versions cannot directly update.</p>
<p>Please note that we don't support the following installation types:</p>
<ul>
- <li>Updates from phpBB3 Beta versions to phpBB3 RC1 and higher</li>
- <li>Conversions from phpBB 2.0.x to phpBB3 Beta versions</li>
- <li>phpBB3 Beta installations</li>
+ <li>Updates from phpBB 3.0 Beta versions to phpBB 3.0 RC1 and higher</li>
+ <li>Updates from phpBB 3.1 Beta versions to phpBB 3.1 RC1 and higher</li>
+ <li>Conversions from phpBB 2.0.x to phpBB 3.0 or 3.1 Beta versions</li>
+ <li>phpBB 3.0 or 3.1 Beta installations</li>
</ul>
<p>We give support for the following installation types:</p>
<ul>
- <li>Updates from phpBB3 RC1 to the latest version</li>
+ <li>Updates from phpBB 3.0 RC1 and 3.1 RC1 to the latest version</li>
<li>Note: if using the <em>Automatic Update Package</em>, updates are supported from phpBB 3.0.2 onward. To update a pre-3.0.2 installation, first update to 3.0.2 and then update to the current version.</li>
<li>Conversions from phpBB 2.0.x to the latest version</li>
- <li>New installations of phpBB3 - only the latest released version</li>
+ <li>New installations of phpBB 3.0.x - only the latest released version</li>
+ <li>New installations of phpBB 3.1.x - only the latest released version</li>
</ul>
</div>
@@ -226,13 +220,13 @@
<div class="content">
- <p>This is the third stable release of phpBB. The 3.0.x line is essentially feature frozen, with only point releases seeing fixes for bugs and security issues, though feature alterations and minor feature additions may be done if deemed absolutely required. Our next major release will be phpBB 3.1. Please do not post questions asking when 3.1 will be available, no release date has been set.</p>
+ <p>This is a stable release of phpBB. The 3.1.x line is feature frozen, with point releases principally including fixes for bugs and security issues. Feature alterations and minor feature additions may be done if deemed absolutely required. The next major release will be phpBB 3.2 which is currently under development. Please do not post questions asking when 3.2 will be available, no release date has been set.</p>
<p>Those interested in the development of phpBB should keep an eye on the development forums to see how things are progressing:</p>
<p><a href="http://area51.phpbb.com/phpBB/">http://area51.phpbb.com/phpBB/</a></p>
- <p>Please note that the development forums should <strong>NOT</strong> be used to seek support for or ask questions about phpBB 2.0.x or phpBB 3.0.x, the main community forums are the place for this. Any such posts will be locked and go unanswered.</p>
+ <p>Please note that the development forums should <strong>NOT</strong> be used to seek support for phpBB, the main community forums are the place for this.</p>
</div>
@@ -266,16 +260,16 @@
<p>If you do post a new bug (i.e. one that isn't already listed in the bug tracker) first make sure that you have logged in (your username and password are the same as for the community forums) then please include the following details:</p>
<ul>
- <li>Your server type/version, e.g. Apache 1.3.28, IIS 4, Sambar, etc.</li>
- <li>PHP version and mode of operation, e.g. PHP 5.1.1 as a module, PHP 4.4.4 running as CGI, etc.</li>
- <li>DB type/version, e.g. MySQL 4.0.1, PostgreSQL 7.3.2, MSSQL Server 2000 SP1, etc.</li>
+ <li>Your server type/version, e.g. Apache 2.2.3, IIS 7, Sambar, etc.</li>
+ <li>PHP version and mode of operation, e.g. PHP 5.3.3 as a module, PHP 5.4.0 running as CGI, etc.</li>
+ <li>DB type/version, e.g. MySQL 5.0.77, PostgreSQL 9.0.6, MSSQL Server 2000 SP1, etc.</li>
</ul>
<p>The relevant database type/version is listed within the administration control panel.</p>
<p>Please be as detailed as you can in your report, and if possible, list the steps required to duplicate the problem. If you have a patch that fixes the issue, please attach it to the ticket or submit a pull request to our repository <a href="https://github.com/phpbb/phpbb3">on GitHub</a>.</p>
- <p>If you create a patch, it is very much appreciated (but not required) if you follow the phpBB coding guidelines. Please note that the coding guidelines are somewhat different between different versions of phpBB. For phpBB 3.0.x the coding guidelines may be found here: <a href="http://area51.phpbb.com/docs/30x/coding-guidelines.html">http://area51.phpbb.com/docs/30x/coding-guidelines.html</a></p>
+ <p>If you create a patch, it is very much appreciated (but not required) if you follow the phpBB coding guidelines. Please note that the coding guidelines are somewhat different between different versions of phpBB. For phpBB 3.1.x the coding guidelines may be found here: <a href="http://area51.phpbb.com/docs/31x/coding-guidelines.html">http://area51.phpbb.com/docs/31x/coding-guidelines.html</a></p>
<p>Once a bug has been submitted you will be emailed any follow up comments added to it. <strong>Please</strong> if you are requested to supply additional information, do so! It is frustrating for us to receive bug reports, ask for additional information but get nothing. In these cases we have a policy of closing the bug, which may leave a very real problem in place. Obviously we would rather not have this situation arise.</p>
@@ -325,11 +319,11 @@
<div class="content">
- <p>phpBB is no longer supported on PHP3 due to several compatibility issues and we recommend that you upgrade to the latest stable release of PHP5 to run phpBB. The minimum version required is PHP 4.3.3. The minimum version that will be required for phpBB 3.1 is PHP 5.3.3.</p>
+ <p>phpBB 3.1.x takes advantage of new features added in PHP 5.3. We recommend that you upgrade to the latest stable release of PHP5 to run phpBB. The minimum version required is PHP 5.3.3.</p>
<p>Please remember that running any application on a development (unstable, e.g. a beta release) version of PHP can lead to strange/unexpected results which may appear to be bugs in the application. Therefore, we recommend you upgrade to the newest stable version of PHP before running phpBB3. If you are running a development version of PHP please check any bugs you find on a system running a stable release before submitting.</p>
- <p>This board has been developed and tested under Linux and Windows (amongst others) running Apache using MySQL 3.23, 4.x, 5.x, MariaDB 5.x, MSSQL Server 2000, PostgreSQL 7.x, Oracle 8, SQLite 2 and Firebird. Versions of PHP used range from 4.3.3 to 5.4.x without problem. </p>
+ <p>This board has been developed and tested under Linux and Windows (amongst others) running Apache using MySQL 3.23, 4.x, 5.x, MariaDB 5.x, MSSQL Server 2000, PostgreSQL 8.x, Oracle 8, SQLite 2 and Firebird. Versions of PHP used range from 5.3.x to 5.4.x without problem.</p>
<a name="phpsec"></a><h3>7.i. Notice on PHP security issues</h3>
diff --git a/phpBB/docs/auth_api.html b/phpBB/docs/auth_api.html
index eb168e26a6..c68ae7821f 100644
--- a/phpBB/docs/auth_api.html
+++ b/phpBB/docs/auth_api.html
@@ -1,14 +1,7 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en" xml:lang="en">
+<!DOCTYPE html>
+<html dir="ltr" lang="en">
<head>
-
-<meta http-equiv="content-type" content="text/html; charset=utf-8" />
-<meta http-equiv="content-style-type" content="text/css" />
-<meta http-equiv="content-language" content="en" />
-<meta http-equiv="imagetoolbar" content="no" />
-<meta name="resource-type" content="document" />
-<meta name="distribution" content="global" />
-<meta name="copyright" content="phpBB Group" />
+<meta charset="utf-8">
<meta name="keywords" content="" />
<meta name="description" content="This is an explanation of how to use the phpBB auth/acl API" />
<title>phpBB3 &bull; Auth API</title>
@@ -93,7 +86,7 @@
<p>To use any methods contained with the <code>auth</code> class it first needs to be instantiated. This is best achieved early in the execution of the script in the following manner:</p>
<div class="codebox"><pre>
-$auth = new auth();
+$auth = new phpbb\auth\auth();
</pre></div>
<p>Once an instance of the class has been created you are free to call the various methods it contains. Please note that should you wish to use the <code>auth_admin</code> methods you will need to instantiate this separately but in the same way.</p>
diff --git a/phpBB/docs/coding-guidelines.html b/phpBB/docs/coding-guidelines.html
index f3d161589b..6cd2627f43 100644
--- a/phpBB/docs/coding-guidelines.html
+++ b/phpBB/docs/coding-guidelines.html
@@ -1,16 +1,9 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en" xml:lang="en">
+<!DOCTYPE html>
+<html dir="ltr" lang="en">
<head>
-
-<meta http-equiv="content-type" content="text/html; charset=utf-8" />
-<meta http-equiv="content-style-type" content="text/css" />
-<meta http-equiv="content-language" content="en" />
-<meta http-equiv="imagetoolbar" content="no" />
-<meta name="resource-type" content="document" />
-<meta name="distribution" content="global" />
-<meta name="copyright" content="phpBB Group" />
+<meta charset="utf-8">
<meta name="keywords" content="" />
-<meta name="description" content="Olympus coding guidelines document" />
+<meta name="description" content="Ascraeus coding guidelines document" />
<title>phpBB3 &bull; Coding Guidelines</title>
<link href="stylesheet.css" rel="stylesheet" type="text/css" media="screen, projection" />
@@ -28,7 +21,7 @@
<div id="doc-description">
<a href="../index.php" id="logo"><img src="site_logo.gif" alt="" /></a>
<h1>Coding Guidelines</h1>
- <p>Olympus coding guidelines document</p>
+ <p>Ascraeus coding guidelines document</p>
<p style="display: none;"><a href="#start_here">Skip</a></p>
</div>
@@ -42,7 +35,7 @@
<!-- BEGIN DOCUMENT -->
-<p>These are the phpBB Coding Guidelines for Olympus, all attempts should be made to follow them as closely as possible.</p>
+<p>These are the phpBB Coding Guidelines for Ascraeus, all attempts should be made to follow them as closely as possible.</p>
<h1>Coding Guidelines</h1>
@@ -62,11 +55,12 @@
</li>
<li><a href="#code">Code Layout/Guidelines</a>
<ol style="list-style-type: lower-roman;">
- <li><a href="#namingvars">Variable/Function Naming</a></li>
+ <li><a href="#namingvars">Variable/Function/Class Naming</a></li>
<li><a href="#codelayout">Code Layout</a></li>
<li><a href="#sql">SQL/SQL Layout</a></li>
<li><a href="#optimizing">Optimizations</a></li>
<li><a href="#general">General Guidelines</a></li>
+ <li><a href="#phprestrictions">Restrictions on the Use of PHP</a></li>
</ol>
</li>
<li><a href="#styling">Styling</a>
@@ -77,7 +71,8 @@
<li><a href="#templating">Templating</a>
<ol style="list-style-type: lower-roman;">
<li><a href="#templates">General Templating</a></li>
- <li><a href="#inheritance">Template Inheritance</a></li>
+ <li><a href="#stylestree">Styles Tree</a></li>
+ <li><a href="#template-events">Template Events</a></li>
</ol></li>
<li><a href="#charsets">Character Sets and Encodings</a></li>
<li><a href="#translation">Translation (<abbr title="Internationalisation">i18n</abbr>/<abbr title="Localisation">L10n</abbr>) Guidelines</a>
@@ -120,7 +115,7 @@
<h3>Linefeeds:</h3>
<p>Ensure that your editor is saving files in the UNIX (LF) line ending format. This means that lines are terminated with a newline, not with Windows Line endings (CR/LF combo) as they are on Win32 or Classic Mac (CR) Line endings. Any decent editor should be able to do this, but it might not always be the default setting. Know your editor. If you want advice for an editor for your Operating System, just ask one of the developers. Some of them do their editing on Win32.</p>
- <a name="fileheader"></a><h3>1.ii. File Header</h3>
+ <a name="fileheader"></a><h3>1.ii. File Layout</h3>
<h4>Standard header for new files:</h4>
<p>This template of the header must be included at the start of all phpBB files: </p>
@@ -137,6 +132,14 @@
<p>Please see the <a href="#locations">File Locations section</a> for the correct package name.</p>
+ <h4>PHP closing tags</h4>
+
+ <p>A file containg only PHP code should not end with the optional PHP closing tag <strong>?&gt;</strong> to avoid issues with whitespace following it.</p>
+
+ <h4>Newline at end of file</h4>
+
+ <p>All files should end in a newline so the last line does not appear as modified in diffs, when a line is appended to the file.</p>
+
<h4>Files containing inline code:</h4>
<p>For those files you have to put an empty comment directly after the header to prevent the documentor assigning the header to the first code element found.</p>
@@ -187,7 +190,7 @@ class ...
<ul>
<li><strong>phpBB3</strong><br />Core files and all files not assigned to a separate package</li>
- <li><strong>acm</strong><br /><code>/includes/acm</code>, <code>/includes/cache.php</code><br />Cache System</li>
+ <li><strong>acm</strong><br /><code>/includes/cache</code><br />Cache System</li>
<li><strong>acp</strong><br /><code>/adm</code>, <code>/includes/acp</code>, <code>/includes/functions_admin.php</code><br />Administration Control Panel</li>
<li><strong>dbal</strong><br /><code>/includes/db</code><br />Database Abstraction Layer.<br />Base class is <code>dbal</code>
<ul>
@@ -246,13 +249,14 @@ PHPBB_QA (Set board to QA-Mode, which means the updater also c
<p>If the <code>PHPBB_USE_BOARD_URL_PATH</code> constant is set to true, phpBB uses generate_board_url() (this will return the boards url with the script path included) on all instances where web-accessible images are loaded. The exact locations are:</p>
<ul>
- <li>/includes/session.php - user::img()</li>
+ <li>/includes/user.php - phpbb_user::img()</li>
<li>/includes/functions_content.php - smiley_text()</li>
</ul>
<p>Path locations for the following template variables are affected by this too:</p>
<ul>
+ <li>{T_ASSETS_PATH} - assets (non-style specific, static resources)</li>
<li>{T_THEME_PATH} - styles/xxx/theme</li>
<li>{T_TEMPLATE_PATH} - styles/xxx/template</li>
<li>{T_SUPER_TEMPLATE_PATH} - styles/xxx/template</li>
@@ -287,16 +291,22 @@ PHPBB_QA (Set board to QA-Mode, which means the updater also c
<p>Please note that these guidelines apply to all php, html, javascript and css files.</p>
- <a name="namingvars"></a><h3>2.i. Variable/Function Naming</h3>
+ <a name="namingvars"></a><h3>2.i. Variable/Function/Class Naming</h3>
<p>We will not be using any form of hungarian notation in our naming conventions. Many of us believe that hungarian naming is one of the primary code obfuscation techniques currently in use.</p>
<h4>Variable Names:</h4>
- <p>Variable names should be in all lowercase, with words separated by an underscore, example:</p>
+ <p>In PHP, variable names should be in all lowercase, with words separated by an underscore, example:</p>
<div class="indent">
<p><code>$current_user</code> is right, but <code>$currentuser</code> and <code> $currentUser</code> are not.</p>
</div>
+
+ <p>In JavaScript, variable names should use camel case:</p>
+
+ <div class="indent">
+ <p><code>currentUser</code> is right, but <code>currentuser</code> and <code>current_user</code> are not.</p>
+ </div>
<p>Names should be descriptive, but concise. We don't want huge sentences as our variable names, but typing an extra couple of characters is always better than wondering what exactly a certain variable is for. </p>
@@ -314,16 +324,46 @@ for ($i = 0; $i &lt; $outer_size; $i++)
</pre></div>
<h4>Function Names:</h4>
- <p>Functions should also be named descriptively. We're not programming in C here, we don't want to write functions called things like "stristr()". Again, all lower-case names with words separated by a single underscore character. Function names should preferably have a verb in them somewhere. Good function names are <code>print_login_status()</code>, <code>get_user_data()</code>, etc. </p>
+ <p>Functions should also be named descriptively. We're not programming in C here, we don't want to write functions called things like "stristr()". Again, all lower-case names with words separated by a single underscore character in PHP, and camel caps in JavaScript. Function names should preferably have a verb in them somewhere. Good function names are <code>print_login_status()</code>, <code>get_user_data()</code>, etc. Constructor functions in JavaScript should begin with a capital letter.</p>
<h4>Function Arguments:</h4>
<p>Arguments are subject to the same guidelines as variable names. We don't want a bunch of functions like: <code>do_stuff($a, $b, $c)</code>. In most cases, we'd like to be able to tell how to use a function by just looking at its declaration. </p>
+ <h4>Class Names:</h4>
+
+ <p>Apart from following the rules for function names, all classes should meet the following conditions:</p>
+ <ul>
+ <li>Every class must be defined in a separate file.</li>
+ <li>The classes have to be located in a subdirectory of <code>includes/</code>.</li>
+ <li>Classnames to be prefixed with <code>phpbb_</code> to avoid name clashes, the filename should not contain the prefix.</li>
+ <li>Class names have to reflect the location of the file they are defined in. The longest list of prefixes, separated by underscores, which is a valid path must be the directory in which the file is located. So the directory names must not contain any underscores, but the filename may. If the filename would be empty the last directory name is used for the filename as well.</li>
+ <li>Directories should typically be a singular noun (e.g. <code>dir</code> in the example below, not <code>dirs</code>.</li>
+ </ul>
+
+ <p>So given the following example directory structure you would result in the below listed lookups</p>
+ <div class="codebox"><pre>
+includes/
+ class_name.php
+ dir/
+ class_name.php
+ dir.php
+ subdir/
+ class_name.php
+ </pre></div>
+
+ <div class="codebox"><pre>
+phpbb_class_name - includes/class_name.php
+phpbb_dir_class_name - includes/dir/class_name.php
+phpbb_dir - includes/dir/dir.php
+phpbb_dir_subdir_class_name - includes/dir/subdir/class_name.php
+ </pre></div>
+
+
<h4>Summary:</h4>
<p>The basic philosophy here is to not hurt code clarity for the sake of laziness. This has to be balanced by a little bit of common sense, though; <code>print_login_status_for_a_given_user()</code> goes too far, for example -- that function would be better named <code>print_user_login_status()</code>, or just <code>print_login_status()</code>.</p>
<h4>Special Namings: </h4>
- <p>For all emoticons use the term <code>smiley</code> in singular and <code>smilies</code> in plural.</p>
+ <p>For all emoticons use the term <code>smiley</code> in singular and <code>smilies</code> in plural. For emails we use the term <code>email</code> (without dash between “e” and “m”).</p>
<a name="codelayout"></a><h3>2.ii. Code Layout</h3>
@@ -364,7 +404,7 @@ for ($i = 0; $i &lt; size; $i++)
</pre></div>
<h4>Where to put the braces:</h4>
- <p>This one is a bit of a holy war, but we're going to use a style that can be summed up in one sentence: Braces always go on their own line. The closing brace should also always be at the same column as the corresponding opening brace, examples:</p>
+ <p>In PHP code, braces always go on their own line. The closing brace should also always be at the same column as the corresponding opening brace, examples:</p>
<div class="codebox"><pre>
if (condition)
@@ -394,6 +434,30 @@ function do_stuff()
...
}
</pre></div>
+
+ <p>In JavaScript code, braces always go on the same line:</p>
+
+ <div class="codebox"><pre>
+if (condition) {
+ while (condition2) {
+ ...
+ }
+} else {
+ ...
+}
+
+for (var i = 0; i &lt; size; i++) {
+ ...
+}
+
+while (condition) {
+ ...
+}
+
+function do_stuff() {
+ ...
+}
+ </pre></div>
<h4>Use spaces between tokens:</h4>
<p>This is another simple, easy step that helps keep code readable without much effort. Whenever you write an assignment, expression, etc.. Always leave <em>one</em> space between the tokens. Basically, write code as if it was English. Put spaces between variable names and operators. Don't put spaces just after an opening bracket or before a closing bracket. Don't put spaces just before a comma or a semicolon. This is best shown with a few examples, examples:</p>
@@ -468,6 +532,26 @@ $post_url = "{$phpbb_root_path}posting.$phpEx?mode=$mode&amp;amp;start=$start";
<p>In SQL statements mixing single and double quotes is partly allowed (following the guidelines listed here about SQL formatting), else one should try to only use one method - mostly single quotes.</p>
+ <h4>Commas after every array element:</h4>
+ <p>If an array is defined with each element on its own line, you still have to modify the previous line to add a comma when appending a new element. PHP allows for trailing (useless) commas in array definitions. These should always be used so each element including the comma can be appended with a single line. In JavaScript, do not use the trailing comma, as it causes browsers to throw errors.</p>
+
+ <p class="bad">// wrong</p>
+ <div class="codebox"><pre>
+$foo = array(
+ 'bar' => 42,
+ 'boo' => 23
+);
+ </pre></div>
+
+ <p class="good">// right </p>
+ <div class="codebox"><pre>
+$foo = array(
+ 'bar' => 42,
+ 'boo' => 23,
+);
+ </pre></div>
+
+
<h4>Associative array keys:</h4>
<p>In PHP, it's legal to use a literal string as a key to an associative array without quoting that string. We don't want to do this -- the string should always be quoted to avoid confusion. Note that this is only when we're using a literal, not when we're using a variable, examples:</p>
@@ -634,10 +718,30 @@ switch ($mode)
}
</pre></div>
+ <h4>Class Members</h4>
+ <p>Use the explicit visibility qualifiers <code>public</code>, <code>private</code> and <code>protected</code> for all properties instead of <code>var</code>.
+
+ <p>Place the <code>static</code> qualifier before the visibility qualifiers.</p>
+
+ <p class="bad">//Wrong </p>
+ <div class="codebox"><pre>
+var $x;
+private static function f()
+ </pre></div>
+
+ <p class="good">// Right </p>
+ <div class="codebox"><pre>
+public $x;
+static private function f()
+ </pre></div>
+
+ <h4>Constants</h4>
+ <p>Prefer class constants over global constants created with <code>define()</code>.</p>
+
<a name="sql"></a><h3>2.iii. SQL/SQL Layout</h3>
<h4>Common SQL Guidelines: </h4>
- <p>All SQL should be cross-DB compatible, if DB specific SQL is used alternatives must be provided which work on all supported DB's (MySQL3/4/5, MSSQL (7.0 and 2000), PostgreSQL (7.0+), Firebird, SQLite, Oracle8, ODBC (generalised if possible)).</p>
+ <p>All SQL should be cross-DB compatible, if DB specific SQL is used alternatives must be provided which work on all supported DB's (MySQL3/4/5, MSSQL (7.0 and 2000), PostgreSQL (8.3+), Firebird, SQLite, Oracle8, ODBC (generalised if possible)).</p>
<p>All SQL commands should utilise the DataBase Abstraction Layer (DBAL)</p>
<h4>SQL code layout:</h4>
@@ -1042,6 +1146,22 @@ append_sid(&quot;{$phpbb_root_path}memberlist.$phpEx&quot;, 'mode=group&amp;amp;
<p>Your page should either call <code>page_footer()</code> in the end to trigger output through the template engine and terminate the script, or alternatively at least call the <code>exit_handler()</code>. That call is necessary because it provides a method for external applications embedding phpBB to be called at the end of the script.</p>
+ <a name="phprestrictions"></a><h3>2.vi. Restrictions on the Use of PHP</h3>
+
+ <h4>Dynamic code execution:</h4>
+
+ <p>Never execute dynamic PHP code (generated or in a constant string) using any of the following PHP functions:</p>
+
+ <ul>
+ <li><strong>eval</strong></li>
+ <li><strong>create_function</strong></li>
+ <li><strong>preg_replace</strong> with the <strong>e</strong> modifier in the pattern</li>
+ </ul>
+
+ <p>If absolutely necessary a file should be created, and a mechanism for creating this file prior to running phpBB should be provided as a setup process.</p>
+
+ <p>The <strong>e</strong> modifier in <strong>preg_replace</strong> can be replaced by <strong>preg_replace_callback</strong> and objects to encapsulate state that is needed in the callback code.</p>
+
</div>
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
@@ -1057,15 +1177,19 @@ append_sid(&quot;{$phpbb_root_path}memberlist.$phpEx&quot;, 'mode=group&amp;amp;
<div class="content">
<a name="cfgfiles"></a><h3>3.i. Style Config Files</h3>
- <p>Style cfg files are simple name-value lists with the information necessary for installing a style. Similar cfg files exist for templates, themes and imagesets. These follow the same principle and will not be introduced individually. Styles can use installed components by using the required_theme/required_template/required_imageset entries. The important part of the style configuration file is assigning an unique name.</p>
+ <p>Style cfg files are simple name-value lists with the information necessary for installing a style. The important part of the style configuration file is assigning an unique name.</p>
<div class="codebox"><pre>
- # General Information about this style
- name = prosilver_duplicate
- copyright = &copy; phpBB Group, 2007
- version = 3.0.3
- required_template = prosilver
- required_theme = prosilver
- required_imageset = prosilver
+# General Information about this style
+name = prosilver_duplicate
+copyright = &copy; phpBB Group, 2007
+version = 3.1.0
+
+# Defining a different template bitfield
+# template_bitfield = lNg=
+
+# Parent style
+# Set value to empty or to this style's name if this style does not have a parent style
+parent = prosilver
</pre></div>
<a name="genstyling"></a><h3>3.2. General Styling Rules</h3>
<p>Templates should be produced in a consistent manner. Where appropriate they should be based off an existing copy, e.g. index, viewforum or viewtopic (the combination of which implement a range of conditional and variable forms). Please also note that the indentation and coding guidelines also apply to templates where possible.</p>
@@ -1088,7 +1212,7 @@ append_sid(&quot;{$phpbb_root_path}memberlist.$phpEx&quot;, 'mode=group&amp;amp;
<p>Row colours/classes are now defined by the template, use an <code>IF S_ROW_COUNT</code> switch, see viewtopic or viewforum for an example.</p>
-<p>Remember block level ordering is important ... while not all pages validate as XHTML 1.0 Strict compliant it is something we're trying to work on.</p>
+<p>Remember block level ordering is important.</p>
<p>Use a standard cellpadding of 2 and cellspacing of 0 on outer tables. Inner tables can vary from 0 to 3 or even 4 depending on the need.</p>
@@ -1156,13 +1280,13 @@ append_sid(&quot;{$phpbb_root_path}memberlist.$phpEx&quot;, 'mode=group&amp;amp;
<p>A bit later loops will be explained further. To not irritate you we will explain conditionals as well as other statements first.</p>
<h4>Including files</h4>
-<p>Something that existed in 2.0.x which no longer exists in 3.0.x is the ability to assign a template to a variable. This was used (for example) to output the jumpbox. Instead (perhaps better, perhaps not but certainly more flexible) we now have INCLUDE. This takes the simple form:</p>
+<p>Something that existed in 2.0.x which no longer exists in 3.x is the ability to assign a template to a variable. This was used (for example) to output the jumpbox. Instead (perhaps better, perhaps not but certainly more flexible) we now have INCLUDE. This takes the simple form:</p>
<div class="codebox"><pre>
<span class="comment">&lt;!-- INCLUDE filename --&gt;</span>
</pre></div>
-<p>You will note in the 3.0 templates the major sources start with <code>&lt;!-- INCLUDE overall_header.html --&gt;</code> or <code>&lt;!-- INCLUDE simple_header.html --&gt;</code>, etc. In 2.0.x control of &quot;which&quot; header to use was defined entirely within the code. In 3.0.x the template designer can output what they like. Note that you can introduce new templates (i.e. other than those in the default set) using this system and include them as you wish ... perhaps useful for a common &quot;menu&quot; bar or some such. No need to modify loads of files as with 2.0.x.</p>
+<p>You will note in the 3.x templates the major sources start with <code>&lt;!-- INCLUDE overall_header.html --&gt;</code> or <code>&lt;!-- INCLUDE simple_header.html --&gt;</code>, etc. In 2.0.x control of &quot;which&quot; header to use was defined entirely within the code. In 3.x the template designer can output what they like. Note that you can introduce new templates (i.e. other than those in the default set) using this system and include them as you wish ... perhaps useful for a common &quot;menu&quot; bar or some such. No need to modify loads of files as with 2.0.x.</p>
<p>Added in <strong>3.0.6</strong> is the ability to include a file using a template variable to specify the file, this functionality only works for root variables (i.e. not block variables).</p>
<div class="codebox"><pre>
@@ -1194,7 +1318,7 @@ append_sid(&quot;{$phpbb_root_path}memberlist.$phpEx&quot;, 'mode=group&amp;amp;
<p>it will be included and executed inline.<br /><br />A note, it is very much encouraged that template designers do not include PHP. The ability to include raw PHP was introduced primarily to allow end users to include banner code, etc. without modifying multiple files (as with 2.0.x). It was not intended for general use ... hence <!-- w --><a href="https://www.phpbb.com">www.phpbb.com</a><!-- w --> will <strong>not</strong> make available template sets which include PHP. And by default templates will have PHP disabled (the admin will need to specifically activate PHP for a template).</p>
<h4>Conditionals/Control structures</h4>
-<p>The most significant addition to 3.0.x are conditions or control structures, &quot;if something then do this else do that&quot;. The system deployed is very similar to Smarty. This may confuse some people at first but it offers great potential and great flexibility with a little imagination. In their most simple form these constructs take the form:</p>
+<p>The most significant addition to 3.x are conditions or control structures, &quot;if something then do this else do that&quot;. The system deployed is very similar to Smarty. This may confuse some people at first but it offers great potential and great flexibility with a little imagination. In their most simple form these constructs take the form:</p>
<div class="codebox"><pre>
<span class="comment">&lt;!-- IF expr --&gt;</span>
@@ -1265,7 +1389,7 @@ div
<span class="comment">&lt;!-- ENDIF --&gt;</span>
</pre></div>
-<p>Each statement will be tested in turn and the relevant output generated when a match (if a match) is found. It is not necessary to always use ELSEIF, ELSE can be used alone to match &quot;everything else&quot;.<br /><br />So what can you do with all this? Well take for example the colouration of rows in viewforum. In 2.0.x row colours were predefined within the source as either row color1, row color2 or row class1, row class2. In 3.0.x this is moved to the template, it may look a little daunting at first but remember control flows from top to bottom and it's not too difficult:</p>
+<p>Each statement will be tested in turn and the relevant output generated when a match (if a match) is found. It is not necessary to always use ELSEIF, ELSE can be used alone to match &quot;everything else&quot;.<br /><br />So what can you do with all this? Well take for example the colouration of rows in viewforum. In 2.0.x row colours were predefined within the source as either row color1, row color2 or row class1, row class2. In 3.x this is moved to the template, it may look a little daunting at first but remember control flows from top to bottom and it's not too difficult:</p>
<div class="codebox"><pre>
&lt;table&gt;
@@ -1536,26 +1660,78 @@ div
&lt;/form&gt;
</pre></div><br />
- <a name="inheritance"></a><h3>4.ii. Template Inheritance</h3>
- <p>When basing a new style on an existing one, it is not necessary to provide all the template files. By declaring the base style name in the <strong>inherit_from</strong> field in the template configuration file, the style can be set to inherit template files from the base style. The limitation on this is that the base style has to be installed and complete, meaning that it is not itself inheriting.</p>
+ <a name="stylestree"></a><h3>4.ii. Styles Tree</h3>
+ <p>When basing a new style on an existing one, it is not necessary to provide all the template files. By declaring the base style name in the <strong>parent</strong> field in the style configuration file, the style can be set to reuse template files from the parent style.</p>
- <p>The effect of doing so is that the template engine will use the template files in the new style where they exist, but fall back to files in the base style otherwise. Declaring a style to inherit from another also causes it to use some of the configuration settings of the base style, notably database storage.</p>
+ <p>The effect of doing so is that the template engine will use the template files in the new style where they exist, but fall back to files in the parent style otherwise.</p>
- <p>We strongly encourage the use of inheritance for styles based on the bundled styles, as it will ease the update procedure.</p>
+ <p>We strongly encourage the use of parent styles for styles based on the bundled styles, as it will ease the update procedure.</p>
<div class="codebox"><pre>
- # General Information about this template
- name = inherits
- copyright = &copy; phpBB Group, 2007
- version = 3.0.3
+# General Information about this style
+name = Custom Style
+copyright = &amp;copy; phpBB Group, 2007
+version = 3.1.0
- # Defining a different template bitfield
- template_bitfield = lNg=
+# Defining a different template bitfield
+# template_bitfield = lNg=
- # Are we inheriting?
- inherit_from = prosilver
+# Parent style
+# Set value to empty or to this style's name if this style does not have a parent style
+parent = prosilver
</pre></div>
+ <a name="template-events"></a><h3>4.iii. Template Events</h3>
+ <p>Template events must follow this format: <code>&lt;!-- EVENT event_name --&gt;</code></p>
+ <p>Using the above example, files named <code>event_name.html</code> located within extensions will be injected into the location of the event.</p>
+
+ <h4>Template event naming guidelines:</h4>
+ <ul>
+ <li>An event name must be all lowercase, with each word separated by an underscore.</li>
+ <li>An event name must briefly describe the location and purpose of the event.</li>
+ <li>An event name must end with one of the following suffixes:</li>
+ <ul>
+ <li><code>_prepend</code> - This event adds an item to the beginning of a block of related items, or adds to the beginning of individual items in a block.</li>
+ <li><code>_append</code> - This event adds an item to the end of a block of related items, or adds to the end of individual items in a block.</li>
+ <li><code>_before</code> - This event adds content directly before the specified block</li>
+ <li><code>_after</code> - This event adds content directly after the specified block</li>
+ </ul>
+ </ul>
+
+ <h4>Template event documentation</h4>
+ <p>Events must be documented in <code>phpBB/docs/events.md</code> in alphabetical order based on the event name. The format is as follows:</p>
+
+ <ul><li>An event found in only one template file:
+ <div class="codebox"><pre>event_name
+===
+* Location: styles/&lt;style_name&gt;/template/filename.html
+* Purpose: A brief description of what this event should be used for.
+This may span multiple lines.
+</pre></div></li>
+ <li>An event found in multiple template files:
+ <div class="codebox"><pre>event_name
+===
+* Locations:
+ + first/file/path.html
+ + second/file/path.html
+* Purpose: Same as above.
+</pre></div>
+ <li>An event that is found multiple times in a file should have the number of instances in parenthesis next to the filename.
+ <div class="codebox"><pre>event_name
+===
+* Locations:
+ + first/file/path.html (2)
+ + second/file/path.html
+* Purpose: Same as above.
+</pre></div></li>
+ <li>An actual example event documentation:
+ <div class="codebox"><pre>forumlist_body_last_post_title_prepend
+====
+* Locations:
+ + styles/prosilver/template/forumlist_body.html
+ + styles/subsilver2/template/forumlist_body.html
+* Purpose: Add content before the post title of the latest post in a forum on the forum list.</pre></div></ul><br />
+
</div>
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
@@ -1668,7 +1844,7 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2))
<p>With phpBB3, the output encoding for the forum in now UTF-8, a Universal Character Encoding by the Unicode Consortium that is by design a superset to US-ASCII and ISO-8859-1. By using one character set which simultaenously supports all scripts which previously would have required different encodings (eg: ISO-8859-1 to ISO-8859-15 (Latin, Greek, Cyrillic, Thai, Hebrew, Arabic); GB2312 (Simplified Chinese); Big5 (Traditional Chinese), EUC-JP (Japanese), EUC-KR (Korean), VISCII (Vietnamese); et cetera), we remove the need to convert between encodings and improves the accessibility of multilingual forums.</p>
- <p>The impact is that the language files for phpBB must now also be encoded as UTF-8, with a caveat that the files must <strong>not contain</strong> a <acronym title="Byte-Order-Mark">BOM</acronym> for compatibility reasons with non-Unicode aware versions of PHP. For those with forums using the Latin character set (ie: most European languages), this change is transparent since UTF-8 is superset to US-ASCII and ISO-8859-1.</p>
+ <p>The impact is that the language files for phpBB must now also be encoded as UTF-8, with a caveat that the files must <strong>not contain</strong> a <abbr title="Byte-Order-Mark">BOM</abbr> for compatibility reasons with non-Unicode aware versions of PHP. For those with forums using the Latin character set (ie: most European languages), this change is transparent since UTF-8 is superset to US-ASCII and ISO-8859-1.</p>
<h4>Language Tag:</h4>
@@ -1678,8 +1854,8 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2))
<p>Most language tags consist of a two- or three-letter language subtag (from <a href="http://www.loc.gov/standards/iso639-2/php/English_list.php">ISO 639-1/ISO 639-2</a>). Sometimes, this is followed by a two-letter or three-digit region subtag (from <a href="http://www.iso.ch/iso/en/prods-services/iso3166ma/02iso-3166-code-lists/list-en1.html">ISO 3166-1 alpha-2</a> or <a href="http://unstats.un.org/unsd/methods/m49/m49.htm">UN M.49</a>). Some examples are:</p>
- <table summary="Examples of various possible language tags as described by RFC 4646 and RFC 4647">
- <caption>Language tag examples</caption>
+ <table>
+ <caption>Examples of various possible language tags as described by RFC 4646 and RFC 4647</caption>
<thead>
<tr>
<th scope="col">Language tag</th>
@@ -1730,8 +1906,8 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2))
<p>Next is the <a href="http://www.unicode.org/iso15924/iso15924-codes.html">ISO 15924</a> language script code and when one should or shouldn't use it. For example, whilst <code>en-Latn</code> is syntaxically correct for describing English written with Latin script, real world English writing is <strong>more-or-less exclusively in the Latin script</strong>. For such languages like English that are written in a single script, the <a href="http://www.iana.org/assignments/language-subtag-registry"><abbr title="Internet Assigned Numbers Authority">IANA</abbr> Language Subtag Registry</a> has a "Suppress-Script" field meaning the script code <strong>should be ommitted</strong> unless a specific language tag requires a specific script code. Some languages are <strong>written in more than one script</strong> and in such cases, the script code <strong>is encouraged</strong> since an end-user may be able to read their language in one script, but not the other. Some examples are:</p>
- <table summary="Examples of using a language subtag in combination with a script subtag">
- <caption>Language subtag + script subtag examples</caption>
+ <table>
+ <caption>Examples of using a language subtag in combination with a script subtag</caption>
<thead>
<tr>
<th scope="col">Language tag</th>
@@ -1797,8 +1973,8 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2))
<p>Examples of English using marco-geographical regions:</p>
- <table summary="Examples for English of ISO 3166-1 alpha-2 vs. UN M.49 code">
- <caption>Coding for English using macro-geographical regions</caption>
+ <table>
+ <caption>Coding for English using macro-geographical regions (examples for English of ISO 3166-1 alpha-2 vs. UN M.49 code)</caption>
<thead>
<tr>
<th scope="col">ISO 639-1/ISO 639-2 + ISO 3166-1 alpha-2</th>
@@ -1823,8 +1999,8 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2))
<p>Examples of Spanish using marco-geographical regions:</p>
- <table summary="Examples for Spanish of ISO 3166-1 alpha-2 vs. UN M.49 code">
- <caption>Coding for Spanish macro-geographical regions</caption>
+ <table>
+ <caption>Coding for Spanish macro-geographical regions (examples for Spanish of ISO 3166-1 alpha-2 vs. UN M.49 code)</caption>
<thead>
<tr>
<th scope="col">ISO 639-1/ISO 639-2 + ISO 3166-1 alpha-2</th>
@@ -1852,7 +2028,7 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2))
<p>Example of where the <a href="http://www.iso.ch/iso/en/prods-services/iso3166ma/02iso-3166-code-lists/list-en1.html">ISO 3166-1 alpha-2</a> is ambiguous and why <a href="http://unstats.un.org/unsd/methods/m49/m49.htm">UN M.49</a> might be preferred:</p>
- <table summary="Example where the ISO 3166-1 alpha-2 is ambiguous">
+ <table>
<caption>Coding for ambiguous ISO 3166-1 alpha-2 regions</caption>
<thead>
<tr>
@@ -1908,7 +2084,7 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2))
<p><a href="http://tools.ietf.org/html/rfc4646">RFC 4646</a> anticipates features which shall be available in (currently draft) <a href="http://www.sil.org/iso639-3/">ISO 639-3</a> which aims to provide as complete enumeration of languages as possible, including living, extinct, ancient and constructed languages, whether majour, minor or unwritten. A new feature of <a href="http://www.sil.org/iso639-3/">ISO 639-3</a> compared to the previous two revisions is the concept of <a href="http://www.sil.org/iso639-3/macrolanguages.asp">macrolanguages</a> where Arabic and Chinese are two such examples. In such cases, their respective codes of <code>ar</code> and <code>zh</code> is very vague as to which dialect/topolect is used or perhaps some terse classical variant which may be difficult for all but very educated users. For such macrolanguages, it is recommended that the sub-language tag is used as a suffix to the macrolanguage tag, eg:</p>
- <table summary="Examples of macrolanguages used with sub-language subtags">
+ <table>
<caption>Macrolanguage subtag + sub-language subtag examples</caption>
<thead>
<tr>
@@ -1952,7 +2128,7 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2))
<p>For phpBB, the language tags are <strong>not</strong> used in their raw form and instead converted to all lower-case and have the hyphen <code>-</code> replaced with an underscore <code>_</code> where appropriate, with some examples below:</p>
- <table summary="Normalisation of language tags for usage in phpBB">
+ <table>
<caption>Language tag normalisation examples</caption>
<thead>
<tr>
@@ -2006,7 +2182,7 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2))
<p>For the English language description, the language name is always first and any additional attributes required to describe the subtags within the language code are then listed in order separated with commas and enclosed within parentheses, eg:</p>
- <table summary="English language description examples of iso.txt for usage in phpBB">
+ <table>
<caption>English language description examples for iso.txt</caption>
<thead>
<tr>
@@ -2058,7 +2234,7 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2))
<p>The various Unicode control characters for bi-directional text and their HTML enquivalents where appropriate are as follows:</p>
- <table summary="Table of the various Unicode bidirectional control characters">
+ <table>
<caption>Unicode bidirectional control characters &amp; HTML elements/entities</caption>
<thead>
<tr>
@@ -2124,7 +2300,7 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2))
<p>For <code>iso.txt</code>, the directionality of the text can be explicitly set using special Unicode characters via any of the three methods provided by left-to-right/right-to-left markers/embeds/overrides, as without them, the ordering of characters will be incorrect, eg:</p>
- <table summary="Effect of using Unicode bidirectional control characters within iso.txt">
+ <table>
<caption>Unicode bidirectional control characters iso.txt</caption>
<thead>
<tr>
@@ -2260,7 +2436,7 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2))
<div class="codebox"><pre>
...
-'FOO_BAR' =&gt; 'PHP version &lt; 4.3.3.&lt;br /&gt;
+'FOO_BAR' =&gt; 'PHP version &lt; 5.3.3.&lt;br /&gt;
Visit &quot;Downloads&quot; at &lt;a href=&quot;http://www.php.net/&quot;&gt;www.php.net&lt;/a&gt;.',
...
</pre></div>
@@ -2269,7 +2445,7 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2))
<div class="codebox"><pre>
...
-'FOO_BAR' =&gt; 'PHP version &amp;lt; 4.3.3.&lt;br /&gt;
+'FOO_BAR' =&gt; 'PHP version &amp;lt; 5.3.3.&lt;br /&gt;
Visit &amp;quot;Downloads&amp;quot; at &lt;a href=&quot;http://www.php.net/&quot;&gt;www.php.net&lt;/a&gt;.',
...
</pre></div>
@@ -2278,7 +2454,7 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2))
<div class="codebox"><pre>
...
-'FOO_BAR' =&gt; 'PHP version &amp;lt; 4.3.3.&lt;br /&gt;
+'FOO_BAR' =&gt; 'PHP version &amp;lt; 5.3.3.&lt;br /&gt;
Visit &ldquo;Downloads&rdquo; at &lt;a href=&quot;http://www.php.net/&quot;&gt;www.php.net&lt;/a&gt;.',
...
</pre></div>
diff --git a/phpBB/docs/events.md b/phpBB/docs/events.md
new file mode 100644
index 0000000000..57c152c242
--- /dev/null
+++ b/phpBB/docs/events.md
@@ -0,0 +1,655 @@
+acp_bbcodes_actions_append
+===
+* Location: adm/style/acp_bbcodes.html
+* Since: 3.1.0-a3
+* Purpose: Add actions to the BBCodes page, after edit/delete buttons
+
+acp_bbcodes_actions_prepend
+===
+* Location: adm/style/acp_bbcodes.html
+* Since: 3.1.0-a3
+* Purpose: Add actions to the BBCodes page, before edit/delete buttons
+
+acp_bbcodes_edit_fieldsets_after
+===
+* Location: adm/style/acp_bbcodes.html
+* Since: 3.1.0-a3
+* Purpose: Add settings to BBCode add/edit form
+
+acp_forums_normal_settings_append
+===
+* Location: adm/style/acp_forums.html
+* Since: 3.1.0-a1
+* Purpose: Add settings to forums
+
+acp_main_actions_append
+===
+* Location: adm/style/acp_main.html
+* Since: 3.1.0-a1
+* Purpose: Add actions to the ACP main page below the cache purge action
+
+acp_main_notice_after
+===
+* Location: adm/style/acp_main.html
+* Since: 3.1.0-a1
+* Purpose: Add notices or other blocks in the ACP below other configuration notices
+
+acp_overall_footer_after
+===
+* Location: adm/style/overall_footer.html
+* Since: 3.1.0-a1
+* Purpose: Add content below the footer in the ACP
+
+acp_overall_header_body_before
+===
+* Location: adm/style/overall_header.html
+* Since: 3.1.0-b2
+* Purpose: Add content to the header body
+
+acp_overall_header_head_append
+===
+* Location: adm/style/overall_header.html
+* Since: 3.1.0-a1
+* Purpose: Add assets within the `<head>` tags in the ACP
+
+acp_simple_footer_after
+===
+* Location: adm/style/simple_footer.html
+* Since: 3.1.0-a1
+* Purpose: Add content below the simple footer in the ACP
+
+acp_simple_header_body_before
+===
+* Location: adm/style/simple_header.html
+* Since: 3.1.0-b2
+* Purpose: Add content to the header body
+
+acp_simple_header_head_append
+===
+* Location: adm/style/overall_header.html
+* Since: 3.1.0-a1
+* Purpose: Add assets within the `<head>` tags in the simple header of the ACP
+
+acp_users_overview_options_append
+===
+* Location: adm/style/acp_users.html
+* Since: 3.1.0-a1
+* Purpose: Add options and settings on user overview page
+
+acp_users_signature_editor_buttons_after
+===
+* Locations:
+ + adm/style/acp_users_signature.html
+* Since: 3.1.0-a3
+* Purpose: Add content after BBCode posting buttons in the ACP user signature
+
+acp_users_signature_editor_buttons_before
+===
+* Locations:
+ + adm/style/acp_users_signature.html
+* Since: 3.1.0-a3
+* Purpose: Add content before BBCode posting buttons in the ACP user signature
+
+forumlist_body_category_header_after
+====
+* Locations:
+ + styles/prosilver/template/forumlist_body.html
+ + styles/subsilver2/template/forumlist_body.html
+* Since: 3.1.0-a4
+* Purpose: Add content after the header of the category on the forum list.
+
+forumlist_body_category_header_before
+====
+* Locations:
+ + styles/prosilver/template/forumlist_body.html
+ + styles/subsilver2/template/forumlist_body.html
+* Since: 3.1.0-a4
+* Purpose: Add content before the header of the category on the forum list.
+
+forumlist_body_last_post_title_prepend
+====
+* Locations:
+ + styles/prosilver/template/forumlist_body.html
+ + styles/subsilver2/template/forumlist_body.html
+* Since: 3.1.0-a1
+* Purpose: Add content before the post title of the latest post in a forum on the forum list.
+
+forumlist_body_subforums_after
+====
+* Locations:
+ + styles/prosilver/template/forumlist_body.html
+ + styles/subsilver2/template/forumlist_body.html
+* Since: 3.1.0-a4
+* Purpose: Add content after the list of subforums (if any) for each forum on the forum list.
+
+forumlist_body_subforums_before
+====
+* Locations:
+ + styles/prosilver/template/forumlist_body.html
+ + styles/subsilver2/template/forumlist_body.html
+* Since: 3.1.0-a4
+* Purpose: Add content before the list of subforums (if any) for each forum on the forum list.
+
+forumlist_body_last_row_after
+====
+* Locations:
+ + styles/prosilver/template/forumlist_body.html
+ + styles/subsilver2/template/forumlist_body.html
+* Since: 3.1.0-b2
+* Purpose: Add content after the very last row of the forum list.
+
+index_body_linklist_after
+===
+* Locations:
+ + styles/prosilver/template/index_body.html
+ + styles/subsilver2/template/index_body.html
+* Since: 3.1.0-a3
+* Purpose: Add content after the linklist above the forum list on Board index
+
+index_body_linklist_before
+===
+* Locations:
+ + styles/prosilver/template/index_body.html
+ + styles/subsilver2/template/index_body.html
+* Since: 3.1.0-a3
+* Purpose: Add content before the linklist above the forum list on Board index
+
+index_body_stat_blocks_before
+===
+* Locations:
+ + styles/prosilver/template/index_body.html
+ + styles/subsilver2/template/index_body.html
+* Since: 3.1.0-a1
+* Purpose: Add new statistic blocks above the Who Is Online and Board Statistics blocks
+
+memberlist_body_username_append
+===
+* Locations:
+ + styles/prosilver/template/memberlist_body.html
+ + styles/subsilver2/template/memberlist_body.html
+* Since: 3.1.0-a1
+* Purpose: Add information after every username in the memberlist. Works in
+all display modes (leader, group and normal memberlist).
+
+memberlist_body_username_prepend
+===
+* Locations:
+ + styles/prosilver/template/memberlist_body.html
+ + styles/subsilver2/template/memberlist_body.html
+* Since: 3.1.0-a1
+* Purpose: Add information before every username in the memberlist. Works in
+all display modes (leader, group and normal memberlist).
+
+memberlist_view_contact_after
+===
+* Locations:
+ + styles/prosilver/template/memberlist_view.html
+ + styles/subsilver2/template/memberlist_view.html
+* Since: 3.1.0-b2
+* Purpose: Add content after the user contact part of any user profile
+
+memberlist_view_contact_before
+===
+* Locations:
+ + styles/prosilver/template/memberlist_view.html
+ + styles/subsilver2/template/memberlist_view.html
+* Since: 3.1.0-b2
+* Purpose: Add content before the user contact part of any user profile
+
+memberlist_view_content_append
+===
+* Locations:
+ + styles/prosilver/template/memberlist_view.html
+ + styles/subsilver2/template/memberlist_view.html
+* Since: 3.1.0-b2
+* Purpose: Add custom content to the user profile view after the main content
+
+memberlist_view_user_statistics_after
+===
+* Locations:
+ + styles/prosilver/template/memberlist_view.html
+ + styles/subsilver2/template/memberlist_view.html
+* Since: 3.1.0-a1
+* Purpose: Add entries after the user statistics part of any user profile
+
+memberlist_view_user_statistics_before
+===
+* Locations:
+ + styles/prosilver/template/memberlist_view.html
+ + styles/subsilver2/template/memberlist_view.html
+* Since: 3.1.0-a1
+* Purpose: Add entries before the user statistics part of any user profile
+
+overall_footer_after
+===
+* Locations:
+ + styles/prosilver/template/overall_footer.html
+ + styles/subsilver2/template/overall_footer.html
+* Since: 3.1.0-a1
+* Purpose: Add content at the end of the file, directly prior to the `</body>` tag
+
+overall_footer_breadcrumb_append
+===
+* Locations:
+ + styles/prosilver/template/overall_footer.html
+* Since: 3.1.0-a1
+* Purpose: Add links to the list of breadcrumbs in the footer
+
+overall_footer_content_after
+===
+* Locations:
+ + styles/prosilver/template/overall_footer.html
+ + styles/subsilver2/template/overall_footer.html
+* Since: 3.1.0-a3
+* Purpose: Add content on all pages after the main content, before the footer
+
+overall_footer_copyright_append
+===
+* Locations:
+ + styles/prosilver/template/overall_footer.html
+ + styles/subsilver2/template/overall_footer.html
+* Since: 3.1.0-a1
+* Purpose: Add content after the copyright line (no new line by default), before the ACP link
+
+overall_footer_copyright_prepend
+===
+* Locations:
+ + styles/prosilver/template/overall_footer.html
+ + styles/subsilver2/template/overall_footer.html
+* Since: 3.1.0-a1
+* Purpose: Add content before the copyright line
+
+overall_header_body_before
+===
+* Locations:
+ + styles/prosilver/template/overall_header.html
+ + styles/subsilver2/template/overall_header.html
+* Since: 3.1.0-b2
+* Purpose: Add content to the header body
+
+overall_header_breadcrumb_append
+===
+* Locations:
+ + styles/prosilver/template/overall_header.html
+ + styles/subsilver2/template/breadcrumbs.html
+* Since: 3.1.0-a1
+* Purpose: Add links to the list of breadcrumbs in the header
+
+overall_header_content_before
+===
+* Locations:
+ + styles/prosilver/template/overall_header.html
+ + styles/subsilver2/template/overall_header.html
+* Since: 3.1.0-a3
+* Purpose: Add content on all pages before the main content, after the header
+
+overall_header_head_append
+===
+* Locations:
+ + styles/prosilver/template/overall_header.html
+ + styles/subsilver2/template/overall_header.html
+* Since: 3.1.0-a1
+* Purpose: Add asset calls directly before the `</head>` tag
+
+overall_header_navigation_append
+===
+* Locations:
+ + styles/prosilver/template/overall_header.html
+ + styles/subsilver2/template/overall_header.html
+* Since: 3.1.0-a1
+* Purpose: Add links after the navigation links in the header
+
+overall_header_navigation_prepend
+===
+* Locations:
+ + styles/prosilver/template/overall_header.html
+ + styles/subsilver2/template/overall_header.html
+* Since: 3.1.0-a1
+* Purpose: Add links before the navigation links in the header
+
+posting_editor_buttons_after
+===
+* Locations:
+ + styles/prosilver/template/posting_buttons.html
+ + styles/subsilver2/template/posting_buttons.html
+* Since: 3.1.0-a3
+* Purpose: Add content after the BBCode posting buttons
+
+posting_editor_buttons_before
+===
+* Locations:
+ + styles/prosilver/template/posting_buttons.html
+ + styles/subsilver2/template/posting_buttons.html
+* Since: 3.1.0-a3
+* Purpose: Add content before the BBCode posting buttons
+
+posting_editor_message_after
+===
+* Locations:
+ + styles/prosilver/template/posting_editor.html
+ + styles/subsilver2/template/posting_body.html
+* Since: 3.1.0-a2
+* Purpose: Add field (e.g. textbox) to the posting screen after the message
+
+posting_editor_message_before
+===
+* Locations:
+ + styles/prosilver/template/posting_editor.html
+ + styles/subsilver2/template/posting_body.html
+* Since: 3.1.0-a2
+* Purpose: Add field (e.g. textbox) to the posting screen before the message
+
+posting_editor_options_prepend
+===
+* Locations:
+ + styles/prosilver/template/posting_editor.html
+ + styles/subsilver2/template/posting_body.html
+* Since: 3.1.0-a1
+* Purpose: Add posting options on the posting screen
+
+posting_editor_subject_after
+===
+* Locations:
+ + styles/prosilver/template/posting_editor.html
+ + styles/subsilver2/template/posting_body.html
+* Since: 3.1.0-a2
+* Purpose: Add field (e.g. textbox) to the posting screen after the subject
+
+posting_editor_subject_before
+===
+* Locations:
+ + styles/prosilver/template/posting_editor.html
+ + styles/subsilver2/template/posting_body.html
+* Since: 3.1.0-a2
+* Purpose: Add field (e.g. textbox) to the posting screen before the subject
+
+quickreply_editor_panel_after
+===
+* Locations:
+ + styles/prosilver/template/quickreply_editor.html
+ + styles/subsilver2/template/quickreply_editor.html
+* Since: 3.1.0-b2
+* Purpose: Add content after the quick reply panel (but inside the form)
+
+quickreply_editor_panel_before
+===
+* Locations:
+ + styles/prosilver/template/quickreply_editor.html
+ + styles/subsilver2/template/quickreply_editor.html
+* Since: 3.1.0-b2
+* Purpose: Add content before the quick reply panel (but inside the form)
+
+quickreply_editor_message_after
+===
+* Locations:
+ + styles/prosilver/template/quickreply_editor.html
+ + styles/subsilver2/template/quickreply_editor.html
+* Since: 3.1.0-a4
+* Purpose: Add content after the quick reply textbox
+
+quickreply_editor_message_before
+===
+* Locations:
+ + styles/prosilver/template/quickreply_editor.html
+ + styles/subsilver2/template/quickreply_editor.html
+* Since: 3.1.0-a4
+* Purpose: Add content before the quick reply textbox
+
+simple_footer_after
+===
+* Locations:
+ + styles/prosilver/template/simple_footer.html
+* Since: 3.1.0-a1
+* Purpose: Add content directly prior to the `</body>` tag of the simple footer
+
+simple_header_body_before
+===
+* Locations:
+ + styles/prosilver/template/simple_header.html
+ + styles/subsilver2/template/simple_header.html
+* Since: 3.1.0-b2
+* Purpose: Add content to the header body
+
+topiclist_row_prepend
+===
+* Locations:
+ + styles/prosilver/template/search_results.html
+ + styles/prosilver/template/viewforum_body.html
+ + styles/subsilver2/template/search_results.html
+ + styles/subsilver2/template/viewforum_body.html
+* Since: 3.1.0-a1
+* Purpose: Add content into topic rows (inside the elements containing topic titles)
+
+topiclist_row_append
+===
+* Locations:
+ + styles/prosilver/template/search_results.html
+ + styles/prosilver/template/viewforum_body.html
+ + styles/subsilver2/template/search_results.html
+ + styles/subsilver2/template/viewforum_body.html
+* Since: 3.1.0-a1
+* Purpose: Add content into topic rows (inside the elements containing topic titles)
+
+ucp_pm_viewmessage_custom_fields_after
+===
+* Locations:
+ + styles/prosilver/template/ucp_pm_viewmessage.html
+* Since: 3.1.0-a1
+* Purpose: Add data after the custom fields on the user profile when viewing
+a private message
+
+ucp_pm_viewmessage_custom_fields_before
+===
+* Locations:
+ + styles/prosilver/template/ucp_pm_viewmessage.html
+* Since: 3.1.0-a1
+* Purpose: Add data before the custom fields on the user profile when viewing
+a private message
+
+ucp_pm_viewmessage_print_head_append
+===
+* Locations:
+ + styles/prosilver/template/ucp_pm_viewmessage_print.html
+ + styles/subsilver2/template/ucp_pm_viewmessage_print.html
+* Since: 3.1.0-a1
+* Purpose: Add asset calls directly before the `</head>` tag of the Print PM screen
+
+ucp_prefs_personal_prepend
+===
+* Locations:
+ + styles/prosilver/template/ucp_prefs_personal.html
+ + styles/subsilver2/template/ucp_prefs_personal.html
+* Since: 3.1.0-a1
+* Purpose: Add user options to the top of the Edit Global Settings block
+
+ucp_prefs_personal_append
+===
+* Locations:
+ + styles/prosilver/template/ucp_prefs_personal.html
+ + styles/subsilver2/template/ucp_prefs_personal.html
+* Since: 3.1.0-a1
+* Purpose: Add user options to the bottom of the Edit Global Settings block
+
+ucp_prefs_post_prepend
+===
+* Locations:
+ + styles/prosilver/template/ucp_prefs_post.html
+ + styles/subsilver2/template/ucp_prefs_post.html
+* Since: 3.1.0-a1
+* Purpose: Add user options to the top of the Edit Posting Defaults block
+
+ucp_prefs_post_append
+===
+* Locations:
+ + styles/prosilver/template/ucp_prefs_post.html
+ + styles/subsilver2/template/ucp_prefs_post.html
+* Since: 3.1.0-a1
+* Purpose: Add user options to the bottom of the Edit Posting Defaults block
+
+ucp_prefs_view_radio_buttons_prepend
+===
+* Locations:
+ + styles/prosilver/template/ucp_prefs_view.html
+ + styles/subsilver2/template/ucp_prefs_view.html
+* Since: 3.1.0-a1
+* Purpose: Add options to the top of the radio buttons block of the Edit
+Display Options screen
+
+ucp_prefs_view_radio_buttons_append
+===
+* Locations:
+ + styles/prosilver/template/ucp_prefs_view.html
+ + styles/subsilver2/template/ucp_prefs_view.html
+* Since: 3.1.0-a1
+* Purpose: Add options to the bottom of the radio buttons block of the Edit
+Display Options screen
+
+ucp_prefs_view_select_menu_prepend
+===
+* Locations:
+ + styles/prosilver/template/ucp_prefs_view.html
+ + styles/subsilver2/template/ucp_prefs_view.html
+* Since: 3.1.0-a1
+* Purpose: Add options to the top of the drop-down lists block of the Edit
+Display Options screen
+
+ucp_prefs_view_select_menu_append
+===
+* Locations:
+ + styles/prosilver/template/ucp_prefs_view.html
+ + styles/subsilver2/template/ucp_prefs_view.html
+* Since: 3.1.0-a1
+* Purpose: Add options to the bottom of the drop-down lists block of the Edit
+Display Options screen
+
+ucp_friend_list_before
+===
+* Locations:
+ + styles/prosilver/template/ucp_zebra_friends.html
+ + styles/subsilver2/template/ucp_zebra_friends.html
+* Since: 3.1.0-a4
+* Purpose: Add optional elements before list of friends in UCP
+
+ucp_friend_list_after
+===
+* Locations:
+ + styles/prosilver/template/ucp_zebra_friends.html
+ + styles/subsilver2/template/ucp_zebra_friends.html
+* Since: 3.1.0-a4
+* Purpose: Add optional elements after list of friends in UCP
+
+viewtopic_print_head_append
+===
+* Locations:
+ + styles/prosilver/template/viewtopic_print.html
+ + styles/subsilver2/template/viewtopic_print.html
+* Since: 3.1.0-a1
+* Purpose: Add asset calls directly before the `</head>` tag of the Print Topic screen
+
+viewtopic_body_footer_before
+===
+* Locations:
+ + styles/prosilver/template/viewtopic_body.html
+ + styles/subsilver2/template/viewtopic_body.html
+* Since: 3.1.0-a1
+* Purpose: Add content to the bottom of the View topic screen below the posts
+and quick reply, directly before the jumpbox in Prosilver, breadcrumbs in
+Subsilver2.
+
+viewtopic_body_post_buttons_after
+===
+* Locations:
+ + styles/prosilver/template/viewtopic_body.html
+ + styles/subsilver2/template/viewtopic_body.html
+* Since: 3.1.0-a1
+* Purpose: Add post button to posts (next to edit, quote etc), at the end of
+the list.
+
+viewtopic_body_post_buttons_before
+===
+* Locations:
+ + styles/prosilver/template/viewtopic_body.html
+ + styles/subsilver2/template/viewtopic_body.html
+* Since: 3.1.0-a1
+* Purpose: Add post button to posts (next to edit, quote etc), at the start of
+the list.
+
+viewtopic_body_postrow_custom_fields_after
+===
+* Locations:
+ + styles/prosilver/template/viewtopic_body.html
+ + styles/subsilver2/template/viewtopic_body.html
+* Since: 3.1.0-a1
+* Purpose: Add data after the custom fields on the user profile when viewing
+a post
+
+viewtopic_body_postrow_custom_fields_before
+===
+* Locations:
+ + styles/prosilver/template/viewtopic_body.html
+ + styles/subsilver2/template/viewtopic_body.html
+* Since: 3.1.0-a1
+* Purpose: Add data before the custom fields on the user profile when viewing
+a post
+
+viewtopic_body_postrow_post_after
+===
+* Locations:
+ + styles/prosilver/template/viewtopic_body.html
+ + styles/subsilver2/template/viewtopic_body.html
+* Since: 3.1.0-a4
+* Purpose: Add data after posts
+
+viewtopic_body_postrow_post_before
+===
+* Locations:
+ + styles/prosilver/template/viewtopic_body.html
+ + styles/subsilver2/template/viewtopic_body.html
+* Since: 3.1.0-a4
+* Purpose: Add data before posts
+
+viewtopic_body_postrow_post_notices_after
+===
+* Locations:
+ + styles/prosilver/template/viewtopic_body.html
+ + styles/subsilver2/template/viewtopic_body.html
+* Since: 3.1.0-b2
+* Purpose: Add posts specific custom notices at the notices bottom.
+
+viewtopic_body_postrow_post_notices_before
+===
+* Locations:
+ + styles/prosilver/template/viewtopic_body.html
+ + styles/subsilver2/template/viewtopic_body.html
+* Since: 3.1.0-b2
+* Purpose: Add posts specific custom notices at the notices top.
+
+viewtopic_body_topic_actions_before
+===
+* Locations:
+ + styles/prosilver/template/viewtopic_body.html
+ + styles/subsilver2/template/viewtopic_body.html
+* Since: 3.1.0-a4
+* Purpose: Add data before the topic actions buttons (after the posts sorting options)
+
+viewtopic_topic_title_prepend
+===
+* Locations:
+ + styles/prosilver/template/viewtopic_body.html
+ + styles/subsilver2/template/viewtopic_body.html
+* Since: 3.1.0-a1
+* Purpose: Add content directly before the topic title link on the View topic screen
+
+viewtopic_topic_tools_after
+===
+* Locations:
+ + styles/prosilver/template/viewtopic_topic_tools.html
+* Since: 3.1.0-a3
+* Purpose: Add a new topic tool after the rest of the existing ones
+
+viewtopic_topic_tools_before
+===
+* Locations:
+ + styles/prosilver/template/viewtopic_topic_tools.html
+* Since: 3.1.0-a3
+* Purpose: Add a new topic tool before the rest of the existing ones
diff --git a/phpBB/docs/hook_system.html b/phpBB/docs/hook_system.html
index fbc8baaf75..3f209b8a34 100644
--- a/phpBB/docs/hook_system.html
+++ b/phpBB/docs/hook_system.html
@@ -1,14 +1,7 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en" xml:lang="en">
+<!DOCTYPE html>
+<html dir="ltr" lang="en">
<head>
-
-<meta http-equiv="content-type" content="text/html; charset=utf-8" />
-<meta http-equiv="content-style-type" content="text/css" />
-<meta http-equiv="content-language" content="en" />
-<meta http-equiv="imagetoolbar" content="no" />
-<meta name="resource-type" content="document" />
-<meta name="distribution" content="global" />
-<meta name="copyright" content="phpBB Group" />
+<meta charset="utf-8">
<meta name="keywords" content="" />
<meta name="description" content="Hook System explanation" />
<title>phpBB3 &bull; Hook System</title>
@@ -375,12 +368,12 @@ a:active { color: #368AD2; }
<p>In phpBB3 there are four functions you are able to hook into with your custom functions:</p>
-<p><code>phpbb_user_session_handler();</code> which is called within user::setup after the session and the user object is correctly initialized.<br />
+<p><code>phpbb_user_session_handler();</code> which is called within phpbb_user::setup after the session and the user object is correctly initialized.<br />
<code>append_sid($url, $params = false, $is_amp = true, $session_id = false);</code> which is called for building urls (appending the session id)<br />
-<code>$template-&gt;display($handle, $include_once = true);</code> which is called directly before outputting the (not-yet-compiled) template.<br />
+<code>$template-&gt;display($handle, $template);</code> which is called directly before outputting the (not-yet-compiled) template.<br />
<code>exit_handler();</code> which is called at the very end of phpBB3's execution.</p>
-<p>Please note: The <code>$template-&gt;display</code> hook takes a third <code>$template</code> argument, which is the template instance being used, which should be used instead of the global.</p>
+<p>Please note: The <code>$template-&gt;display</code> hook takes a <code>$template</code> argument, which is the template instance being used, which should be used instead of the global.</p>
<p>There are also valid external constants you may want to use if you embed phpBB3 into your application:</p>
@@ -395,13 +388,14 @@ PHPBB_USE_BOARD_URL_PATH (use generate_board_url() for image paths instead of $p
<p>If the <code>PHPBB_USE_BOARD_URL_PATH</code> constant is set to true, phpBB uses generate_board_url() (this will return the boards url with the script path included) on all instances where web-accessible images are loaded. The exact locations are:</p>
<ul>
- <li>/includes/session.php - user::img()</li>
+ <li>/includes/user.php - phpbb_user::img()</li>
<li>/includes/functions_content.php - smiley_text()</li>
</ul>
<p>Path locations for the following template variables are affected by this too:</p>
<ul>
+ <li>{T_ASSETS_PATH} - assets</li>
<li>{T_THEME_PATH} - styles/xxx/theme</li>
<li>{T_TEMPLATE_PATH} - styles/xxx/template</li>
<li>{T_SUPER_TEMPLATE_PATH} - styles/xxx/template</li>
diff --git a/phpBB/docs/lighttpd.sample.conf b/phpBB/docs/lighttpd.sample.conf
index 5873d1c945..5862cb319d 100644
--- a/phpBB/docs/lighttpd.sample.conf
+++ b/phpBB/docs/lighttpd.sample.conf
@@ -3,6 +3,15 @@
# from your system's lighttpd.conf.
# Tested with lighttpd 1.4.26
+# If you want to use the X-Sendfile feature,
+# uncomment the 'allow-x-send-file' for the fastcgi
+# server below and add the following to your config.php
+#
+# define('PHPBB_ENABLE_X_SENDFILE', true);
+#
+# See http://blog.lighttpd.net/articles/2006/07/02/x-sendfile
+# for the details on X-Sendfile.
+
# Load moules
server.modules += (
"mod_access",
@@ -54,6 +63,7 @@ $HTTP["host"] == "www.myforums.com" {
"bin-copy-environment" => (
"PATH", "SHELL", "USER"
),
+ #"allow-x-send-file" => "enable",
"broken-scriptfilename" => "enable"
))
)
diff --git a/phpBB/docs/nginx.sample.conf b/phpBB/docs/nginx.sample.conf
index 40b6ee76da..c82f5c8e49 100644
--- a/phpBB/docs/nginx.sample.conf
+++ b/phpBB/docs/nginx.sample.conf
@@ -3,6 +3,14 @@
# from your system's nginx.conf.
# Tested with nginx 0.8.35.
+# If you want to use the X-Accel-Redirect feature,
+# add the following to your config.php.
+#
+# define('PHPBB_ENABLE_X_ACCEL_REDIRECT', true);
+#
+# See http://wiki.nginx.org/XSendfile for the details
+# on X-Accel-Redirect.
+
http {
# Compression - requires gzip and gzip static modules.
gzip on;
diff --git a/phpBB/docs/sphinx.sample.conf b/phpBB/docs/sphinx.sample.conf
new file mode 100644
index 0000000000..0a210ecd1a
--- /dev/null
+++ b/phpBB/docs/sphinx.sample.conf
@@ -0,0 +1,100 @@
+source source_phpbb_{SPHINX_ID}_main
+{
+ type = mysql # mysql or pgsql
+ sql_host = localhost # SQL server host sphinx connects to
+ sql_user = username
+ sql_pass = password
+ sql_db = db_name
+ sql_port = 3306 # optional, default is 3306 for mysql and 5432 for pgsql
+ sql_query_pre = SET NAMES 'utf8'
+ sql_query_pre = UPDATE phpbb_sphinx SET max_doc_id = (SELECT MAX(post_id) FROM phpbb_posts) WHERE counter_id = 1
+ sql_query_range = SELECT MIN(post_id), MAX(post_id) FROM phpbb_posts
+ sql_range_step = 5000
+ sql_query = SELECT \
+ p.post_id AS id, \
+ p.forum_id, \
+ p.topic_id, \
+ p.poster_id, \
+ p.post_visibility, \
+ CASE WHEN p.post_id = t.topic_first_post_id THEN 1 ELSE 0 END as topic_first_post, \
+ p.post_time, \
+ p.post_subject, \
+ p.post_subject as title, \
+ p.post_text as data, \
+ t.topic_last_post_time, \
+ 0 as deleted\
+ FROM phpbb_posts p, phpbb_topics t \
+ WHERE \
+ p.topic_id = t.topic_id \
+ AND p.post_id >= $start AND p.post_id <= $end
+ sql_query_post =
+ sql_query_post_index = UPDATE phpbb_sphinx SET max_doc_id = $maxid WHERE counter_id = 1
+ sql_query_info = SELECT * FROM phpbb_posts WHERE post_id = $id
+ sql_attr_uint = forum_id
+ sql_attr_uint = topic_id
+ sql_attr_uint = poster_id
+ sql_attr_uint = post_visibility
+ sql_attr_bool = topic_first_post
+ sql_attr_bool = deleted
+ sql_attr_timestamp = post_time
+ sql_attr_timestamp = topic_last_post_time
+ sql_attr_string = post_subject
+}
+source source_phpbb_{SPHINX_ID}_delta : source_phpbb_{SPHINX_ID}_main
+{
+ sql_query_pre =
+ sql_query_range =
+ sql_range_step =
+ sql_query = SELECT \
+ p.post_id AS id, \
+ p.forum_id, \
+ p.topic_id, \
+ p.poster_id, \
+ p.post_visibility, \
+ CASE WHEN p.post_id = t.topic_first_post_id THEN 1 ELSE 0 END as topic_first_post, \
+ p.post_time, \
+ p.post_subject, \
+ p.post_subject as title, \
+ p.post_text as data, \
+ t.topic_last_post_time, \
+ 0 as deleted \
+ FROM phpbb_posts p, phpbb_topics t \
+ WHERE \
+ p.topic_id = t.topic_id \
+ AND p.post_id >= ( SELECT max_doc_id FROM phpbb_sphinx WHERE counter_id=1 )
+ sql_query_pre =
+}
+index index_phpbb_{SPHINX_ID}_main
+{
+ path = {DATA_PATH}/index_phpbb_{SPHINX_ID}_main
+ source = source_phpbb_{SPHINX_ID}_main
+ docinfo = extern
+ morphology = none
+ stopwords =
+ min_word_len = 2
+ charset_type = utf-8
+ charset_table = U+FF10..U+FF19->0..9, 0..9, U+FF41..U+FF5A->a..z, U+FF21..U+FF3A->a..z, A..Z->a..z, a..z, U+0149, U+017F, U+0138, U+00DF, U+00FF, U+00C0..U+00D6->U+00E0..U+00F6, U+00E0..U+00F6, U+00D8..U+00DE->U+00F8..U+00FE, U+00F8..U+00FE, U+0100->U+0101, U+0101, U+0102->U+0103, U+0103, U+0104->U+0105, U+0105, U+0106->U+0107, U+0107, U+0108->U+0109, U+0109, U+010A->U+010B, U+010B, U+010C->U+010D, U+010D, U+010E->U+010F, U+010F, U+0110->U+0111, U+0111, U+0112->U+0113, U+0113, U+0114->U+0115, U+0115, U+0116->U+0117, U+0117, U+0118->U+0119, U+0119, U+011A->U+011B, U+011B, U+011C->U+011D, U+011D, U+011E->U+011F, U+011F, U+0130->U+0131, U+0131, U+0132->U+0133, U+0133, U+0134->U+0135, U+0135, U+0136->U+0137, U+0137, U+0139->U+013A, U+013A, U+013B->U+013C, U+013C, U+013D->U+013E, U+013E, U+013F->U+0140, U+0140, U+0141->U+0142, U+0142, U+0143->U+0144, U+0144, U+0145->U+0146, U+0146, U+0147->U+0148, U+0148, U+014A->U+014B, U+014B, U+014C->U+014D, U+014D, U+014E->U+014F, U+014F, U+0150->U+0151, U+0151, U+0152->U+0153, U+0153, U+0154->U+0155, U+0155, U+0156->U+0157, U+0157, U+0158->U+0159, U+0159, U+015A->U+015B, U+015B, U+015C->U+015D, U+015D, U+015E->U+015F, U+015F, U+0160->U+0161, U+0161, U+0162->U+0163, U+0163, U+0164->U+0165, U+0165, U+0166->U+0167, U+0167, U+0168->U+0169, U+0169, U+016A->U+016B, U+016B, U+016C->U+016D, U+016D, U+016E->U+016F, U+016F, U+0170->U+0171, U+0171, U+0172->U+0173, U+0173, U+0174->U+0175, U+0175, U+0176->U+0177, U+0177, U+0178->U+00FF, U+00FF, U+0179->U+017A, U+017A, U+017B->U+017C, U+017C, U+017D->U+017E, U+017E, U+0410..U+042F->U+0430..U+044F, U+0430..U+044F, U+4E00..U+9FFF
+ min_prefix_len = 0
+ min_infix_len = 0
+}
+index index_phpbb_{SPHINX_ID}_delta : index_phpbb_{SPHINX_ID}_main
+{
+ path = {DATA_PATH}/index_phpbb_{SPHINX_ID}_delta
+ source = source_phpbb_{SPHINX_ID}_delta
+}
+indexer
+{
+ mem_limit = 512M
+}
+searchd
+{
+ compat_sphinxql_magics = 0
+ listen = localhost:9312
+ log = {DATA_PATH}/log/searchd.log
+ query_log = {DATA_PATH}/log/sphinx-query.log
+ read_timeout = 5
+ max_children = 30
+ pid_file = {DATA_PATH}/searchd.pid
+ max_matches = 20000
+ binlog_path = {DATA_PATH}
+}
diff --git a/phpBB/download/file.php b/phpBB/download/file.php
index ed33fc0962..163ab673b9 100644
--- a/phpBB/download/file.php
+++ b/phpBB/download/file.php
@@ -2,12 +2,15 @@
/**
*
* @package phpBB3
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
+use Symfony\Component\Config\FileLocator;
+use Symfony\Component\DependencyInjection\ContainerBuilder;
+use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
+
/**
* @ignore
*/
@@ -15,7 +18,6 @@ define('IN_PHPBB', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './../';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
-
// Thank you sun.
if (isset($_SERVER['CONTENT_TYPE']))
{
@@ -39,14 +41,33 @@ if (isset($_GET['avatar']))
exit;
}
- require($phpbb_root_path . 'includes/acm/acm_' . $acm_type . '.' . $phpEx);
- require($phpbb_root_path . 'includes/cache.' . $phpEx);
- require($phpbb_root_path . 'includes/db/' . $dbms . '.' . $phpEx);
+ require($phpbb_root_path . 'phpbb/class_loader.' . $phpEx);
+
require($phpbb_root_path . 'includes/constants.' . $phpEx);
require($phpbb_root_path . 'includes/functions.' . $phpEx);
+ require($phpbb_root_path . 'includes/functions_container.' . $phpEx);
+ require($phpbb_root_path . 'includes/functions_download' . '.' . $phpEx);
+ require($phpbb_root_path . 'includes/utf/utf_tools.' . $phpEx);
+
+ // Setup class loader first
+ $phpbb_class_loader = new \phpbb\class_loader('phpbb\\', "{$phpbb_root_path}phpbb/", $phpEx);
+ $phpbb_class_loader->register();
+ $phpbb_class_loader_ext = new \phpbb\class_loader('\\', "{$phpbb_root_path}ext/", $phpEx);
+ $phpbb_class_loader_ext->register();
- $db = new $sql_db();
- $cache = new cache();
+ // Set up container
+ $phpbb_container = phpbb_create_default_container($phpbb_root_path, $phpEx);
+
+ $phpbb_class_loader->set_cache($phpbb_container->get('cache.driver'));
+ $phpbb_class_loader_ext->set_cache($phpbb_container->get('cache.driver'));
+
+ // set up caching
+ $cache = $phpbb_container->get('cache');
+
+ $phpbb_dispatcher = $phpbb_container->get('dispatcher');
+ $request = $phpbb_container->get('request');
+ $db = $phpbb_container->get('dbal.conn');
+ $phpbb_log = $phpbb_container->get('log');
// Connect to DB
if (!@$db->sql_connect($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, false, false))
@@ -55,10 +76,21 @@ if (isset($_GET['avatar']))
}
unset($dbpasswd);
+ request_var('', 0, false, false, $request);
+
+ $config = $phpbb_container->get('config');
+ set_config(null, null, null, $config);
+ set_config_count(null, null, null, $config);
+
+ // load extensions
+ $phpbb_extension_manager = $phpbb_container->get('ext.manager');
+ $phpbb_subscriber_loader = $phpbb_container->get('event.subscriber_loader');
+
// worst-case default
- $browser = (!empty($_SERVER['HTTP_USER_AGENT'])) ? htmlspecialchars((string) $_SERVER['HTTP_USER_AGENT']) : 'msie 6.0';
+ $browser = strtolower($request->header('User-Agent', 'msie 6.0'));
+
+ $phpbb_avatar_manager = $phpbb_container->get('avatar.manager');
- $config = $cache->obtain_config();
$filename = request_var('avatar', '');
$avatar_group = false;
$exit = false;
@@ -108,8 +140,13 @@ if (isset($_GET['avatar']))
// implicit else: we are not in avatar mode
include($phpbb_root_path . 'common.' . $phpEx);
+require($phpbb_root_path . 'includes/functions_download' . '.' . $phpEx);
$download_id = request_var('id', 0);
+$topic_id = $request->variable('topic_id', 0);
+$post_id = $request->variable('post_id', 0);
+$msg_id = $request->variable('msg_id', 0);
+$archive = $request->variable('archive', '.tar');
$mode = request_var('mode', '');
$thumbnail = request_var('t', false);
@@ -118,616 +155,313 @@ $user->session_begin(false);
$auth->acl($user->data);
$user->setup('viewtopic');
-if (!$download_id)
-{
- send_status_line(404, 'Not Found');
- trigger_error('NO_ATTACHMENT_SELECTED');
-}
-
if (!$config['allow_attachments'] && !$config['allow_pm_attach'])
{
send_status_line(404, 'Not Found');
trigger_error('ATTACHMENT_FUNCTIONALITY_DISABLED');
}
-$sql = 'SELECT attach_id, in_message, post_msg_id, extension, is_orphan, poster_id, filetime
- FROM ' . ATTACHMENTS_TABLE . "
- WHERE attach_id = $download_id";
-$result = $db->sql_query_limit($sql, 1);
-$attachment = $db->sql_fetchrow($result);
-$db->sql_freeresult($result);
-
-if (!$attachment)
+if ($download_id)
{
- send_status_line(404, 'Not Found');
- trigger_error('ERROR_NO_ATTACHMENT');
+ // Attachment id (only 1 attachment)
+ $sql_where = 'attach_id = ' . $download_id;
}
-
-if ((!$attachment['in_message'] && !$config['allow_attachments']) || ($attachment['in_message'] && !$config['allow_pm_attach']))
+else if ($msg_id)
{
- send_status_line(404, 'Not Found');
- trigger_error('ATTACHMENT_FUNCTIONALITY_DISABLED');
+ // Private message id (multiple attachments)
+ $sql_where = 'is_orphan = 0 AND in_message = 1 AND post_msg_id = ' . $msg_id;
}
-
-$row = array();
-
-if ($attachment['is_orphan'])
+else if ($post_id)
{
- // We allow admins having attachment permissions to see orphan attachments...
- $own_attachment = ($auth->acl_get('a_attach') || $attachment['poster_id'] == $user->data['user_id']) ? true : false;
-
- if (!$own_attachment || ($attachment['in_message'] && !$auth->acl_get('u_pm_download')) || (!$attachment['in_message'] && !$auth->acl_get('u_download')))
- {
- send_status_line(404, 'Not Found');
- trigger_error('ERROR_NO_ATTACHMENT');
- }
-
- // Obtain all extensions...
- $extensions = $cache->obtain_attach_extensions(true);
+ // Post id (multiple attachments)
+ $sql_where = 'is_orphan = 0 AND in_message = 0 AND post_msg_id = ' . $post_id;
}
-else
+else if ($topic_id)
{
- if (!$attachment['in_message'])
- {
- //
- $sql = 'SELECT p.forum_id, f.forum_name, f.forum_password, f.parent_id
- FROM ' . POSTS_TABLE . ' p, ' . FORUMS_TABLE . ' f
- WHERE p.post_id = ' . $attachment['post_msg_id'] . '
- AND p.forum_id = f.forum_id';
- $result = $db->sql_query_limit($sql, 1);
- $row = $db->sql_fetchrow($result);
- $db->sql_freeresult($result);
-
- // Global announcement?
- $f_download = (!$row) ? $auth->acl_getf_global('f_download') : $auth->acl_get('f_download', $row['forum_id']);
-
- if ($auth->acl_get('u_download') && $f_download)
- {
- if ($row && $row['forum_password'])
- {
- // Do something else ... ?
- login_forum_box($row);
- }
- }
- else
- {
- send_status_line(403, 'Forbidden');
- trigger_error('SORRY_AUTH_VIEW_ATTACH');
- }
- }
- else
- {
- $row['forum_id'] = false;
- if (!$auth->acl_get('u_pm_download'))
- {
- send_status_line(403, 'Forbidden');
- trigger_error('SORRY_AUTH_VIEW_ATTACH');
- }
-
- // Check if the attachment is within the users scope...
- $sql = 'SELECT user_id, author_id
- FROM ' . PRIVMSGS_TO_TABLE . '
- WHERE msg_id = ' . $attachment['post_msg_id'];
- $result = $db->sql_query($sql);
-
- $allowed = false;
- while ($user_row = $db->sql_fetchrow($result))
- {
- if ($user->data['user_id'] == $user_row['user_id'] || $user->data['user_id'] == $user_row['author_id'])
- {
- $allowed = true;
- break;
- }
- }
- $db->sql_freeresult($result);
-
- if (!$allowed)
- {
- send_status_line(403, 'Forbidden');
- trigger_error('ERROR_NO_ATTACHMENT');
- }
- }
-
- // disallowed?
- $extensions = array();
- if (!extension_allowed($row['forum_id'], $attachment['extension'], $extensions))
- {
- send_status_line(404, 'Forbidden');
- trigger_error(sprintf($user->lang['EXTENSION_DISABLED_AFTER_POSTING'], $attachment['extension']));
- }
+ // Topic id (multiple attachments)
+ $sql_where = 'is_orphan = 0 AND topic_id = ' . $topic_id;
}
-
-if (!download_allowed())
+else
{
- send_status_line(403, 'Forbidden');
- trigger_error($user->lang['LINKAGE_FORBIDDEN']);
+ send_status_line(404, 'Not Found');
+ trigger_error('NO_ATTACHMENT_SELECTED');
}
-$download_mode = (int) $extensions[$attachment['extension']]['download_mode'];
-
-// Fetching filename here to prevent sniffing of filename
-$sql = 'SELECT attach_id, is_orphan, in_message, post_msg_id, extension, physical_filename, real_filename, mimetype, filetime
+$sql = 'SELECT attach_id, post_msg_id, topic_id, in_message, poster_id, is_orphan, physical_filename, real_filename, extension, mimetype, filesize, filetime
FROM ' . ATTACHMENTS_TABLE . "
- WHERE attach_id = $download_id";
-$result = $db->sql_query_limit($sql, 1);
-$attachment = $db->sql_fetchrow($result);
-$db->sql_freeresult($result);
+ WHERE $sql_where";
+$result = $db->sql_query($sql);
-if (!$attachment)
+$attachments = $attachment_ids = array();
+while ($row = $db->sql_fetchrow($result))
{
- send_status_line(404, 'Not Found');
- trigger_error('ERROR_NO_ATTACHMENT');
-}
+ $attachment_id = (int) $row['attach_id'];
-$attachment['physical_filename'] = utf8_basename($attachment['physical_filename']);
-$display_cat = $extensions[$attachment['extension']]['display_cat'];
+ $row['physical_filename'] = utf8_basename($row['physical_filename']);
-if (($display_cat == ATTACHMENT_CATEGORY_IMAGE || $display_cat == ATTACHMENT_CATEGORY_THUMB) && !$user->optionget('viewimg'))
-{
- $display_cat = ATTACHMENT_CATEGORY_NONE;
+ $attachment_ids[$attachment_id] = $attachment_id;
+ $attachments[$attachment_id] = $row;
}
+$db->sql_freeresult($result);
-if ($display_cat == ATTACHMENT_CATEGORY_FLASH && !$user->optionget('viewflash'))
-{
- $display_cat = ATTACHMENT_CATEGORY_NONE;
-}
+// Make $attachment the first of the attachments we fetched.
+$attachment = current($attachments);
-if ($thumbnail)
-{
- $attachment['physical_filename'] = 'thumb_' . $attachment['physical_filename'];
-}
-else if (($display_cat == ATTACHMENT_CATEGORY_NONE/* || $display_cat == ATTACHMENT_CATEGORY_IMAGE*/) && !$attachment['is_orphan'])
+if (empty($attachments))
{
- // Update download count
- $sql = 'UPDATE ' . ATTACHMENTS_TABLE . '
- SET download_count = download_count + 1
- WHERE attach_id = ' . $attachment['attach_id'];
- $db->sql_query($sql);
+ send_status_line(404, 'Not Found');
+ trigger_error('ERROR_NO_ATTACHMENT');
}
-
-if ($display_cat == ATTACHMENT_CATEGORY_IMAGE && $mode === 'view' && (strpos($attachment['mimetype'], 'image') === 0) && (strpos(strtolower($user->browser), 'msie') !== false) && !phpbb_is_greater_ie_version($user->browser, 7))
+else if (!download_allowed())
{
- wrap_img_in_html(append_sid($phpbb_root_path . 'download/file.' . $phpEx, 'id=' . $attachment['attach_id']), $attachment['real_filename']);
- file_gc();
+ send_status_line(403, 'Forbidden');
+ trigger_error($user->lang['LINKAGE_FORBIDDEN']);
}
-else
+else if ($download_id)
{
- // Determine the 'presenting'-method
- if ($download_mode == PHYSICAL_LINK)
- {
- // This presenting method should no longer be used
- if (!@is_dir($phpbb_root_path . $config['upload_path']))
- {
- send_status_line(500, 'Internal Server Error');
- trigger_error($user->lang['PHYSICAL_DOWNLOAD_NOT_POSSIBLE']);
- }
+ // sizeof($attachments) == 1
- redirect($phpbb_root_path . $config['upload_path'] . '/' . $attachment['physical_filename']);
- file_gc();
- }
- else
+ if (!$attachment['in_message'] && !$config['allow_attachments'] || $attachment['in_message'] && !$config['allow_pm_attach'])
{
- send_file_to_browser($attachment, $config['upload_path'], $display_cat);
- file_gc();
+ send_status_line(404, 'Not Found');
+ trigger_error('ATTACHMENT_FUNCTIONALITY_DISABLED');
}
-}
-
-
-/**
-* A simplified function to deliver avatars
-* The argument needs to be checked before calling this function.
-*/
-function send_avatar_to_browser($file, $browser)
-{
- global $config, $phpbb_root_path;
- $prefix = $config['avatar_salt'] . '_';
- $image_dir = $config['avatar_path'];
-
- // Adjust image_dir path (no trailing slash)
- if (substr($image_dir, -1, 1) == '/' || substr($image_dir, -1, 1) == '\\')
+ if ($attachment['is_orphan'])
{
- $image_dir = substr($image_dir, 0, -1) . '/';
- }
- $image_dir = str_replace(array('../', '..\\', './', '.\\'), '', $image_dir);
+ // We allow admins having attachment permissions to see orphan attachments...
+ $own_attachment = ($auth->acl_get('a_attach') || $attachment['poster_id'] == $user->data['user_id']) ? true : false;
- if ($image_dir && ($image_dir[0] == '/' || $image_dir[0] == '\\'))
- {
- $image_dir = '';
- }
- $file_path = $phpbb_root_path . $image_dir . '/' . $prefix . $file;
+ if (!$own_attachment || ($attachment['in_message'] && !$auth->acl_get('u_pm_download')) || (!$attachment['in_message'] && !$auth->acl_get('u_download')))
+ {
+ send_status_line(404, 'Not Found');
+ trigger_error('ERROR_NO_ATTACHMENT');
+ }
- if ((@file_exists($file_path) && @is_readable($file_path)) && !headers_sent())
+ // Obtain all extensions...
+ $extensions = $cache->obtain_attach_extensions(true);
+ }
+ else
{
- header('Pragma: public');
-
- $image_data = @getimagesize($file_path);
- header('Content-Type: ' . image_type_to_mime_type($image_data[2]));
-
- if ((strpos(strtolower($browser), 'msie') !== false) && !phpbb_is_greater_ie_version($browser, 7))
+ if (!$attachment['in_message'])
{
- header('Content-Disposition: attachment; ' . header_filename($file));
+ phpbb_download_handle_forum_auth($db, $auth, $attachment['topic_id']);
- if (strpos(strtolower($browser), 'msie 6.0') !== false)
- {
- header('Expires: -1');
- }
- else
+ $sql = 'SELECT forum_id, post_visibility
+ FROM ' . POSTS_TABLE . '
+ WHERE post_id = ' . (int) $attachment['post_msg_id'];
+ $result = $db->sql_query($sql);
+ $post_row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if (!$post_row || ($post_row['post_visibility'] != ITEM_APPROVED && !$auth->acl_get('m_approve', $post_row['forum_id'])))
{
- header('Expires: ' . gmdate('D, d M Y H:i:s \G\M\T', time() + 31536000));
+ // Attachment of a soft deleted post and the user is not allowed to see the post
+ send_status_line(404, 'Not Found');
+ trigger_error('ERROR_NO_ATTACHMENT');
}
}
else
{
- header('Content-Disposition: inline; ' . header_filename($file));
- header('Expires: ' . gmdate('D, d M Y H:i:s \G\M\T', time() + 31536000));
+ // Attachment is in a private message.
+ $row['forum_id'] = false;
+ phpbb_download_handle_pm_auth($db, $auth, $user->data['user_id'], $attachment['post_msg_id']);
}
- $size = @filesize($file_path);
- if ($size)
+ $extensions = array();
+ if (!extension_allowed($row['forum_id'], $attachment['extension'], $extensions))
{
- header("Content-Length: $size");
- }
-
- if (@readfile($file_path) == false)
- {
- $fp = @fopen($file_path, 'rb');
-
- if ($fp !== false)
- {
- while (!feof($fp))
- {
- echo fread($fp, 8192);
- }
- fclose($fp);
- }
+ send_status_line(403, 'Forbidden');
+ trigger_error(sprintf($user->lang['EXTENSION_DISABLED_AFTER_POSTING'], $attachment['extension']));
}
-
- flush();
- }
- else
- {
- send_status_line(404, 'Not Found');
}
-}
-/**
-* Wraps an url into a simple html page. Used to display attachments in IE.
-* this is a workaround for now; might be moved to template system later
-* direct any complaints to 1 Microsoft Way, Redmond
-*/
-function wrap_img_in_html($src, $title)
-{
- echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-Strict.dtd">';
- echo '<html>';
- echo '<head>';
- echo '<meta http-equiv="content-type" content="text/html; charset=UTF-8" />';
- echo '<title>' . $title . '</title>';
- echo '</head>';
- echo '<body>';
- echo '<div>';
- echo '<img src="' . $src . '" alt="' . $title . '" />';
- echo '</div>';
- echo '</body>';
- echo '</html>';
-}
+ $download_mode = (int) $extensions[$attachment['extension']]['download_mode'];
+ $display_cat = $extensions[$attachment['extension']]['display_cat'];
-/**
-* Send file to browser
-*/
-function send_file_to_browser($attachment, $upload_dir, $category)
-{
- global $user, $db, $config, $phpbb_root_path;
-
- $filename = $phpbb_root_path . $upload_dir . '/' . $attachment['physical_filename'];
-
- if (!@file_exists($filename))
+ if (($display_cat == ATTACHMENT_CATEGORY_IMAGE || $display_cat == ATTACHMENT_CATEGORY_THUMB) && !$user->optionget('viewimg'))
{
- send_status_line(404, 'Not Found');
- trigger_error('ERROR_NO_ATTACHMENT');
+ $display_cat = ATTACHMENT_CATEGORY_NONE;
}
- // Correct the mime type - we force application/octetstream for all files, except images
- // Please do not change this, it is a security precaution
- if ($category != ATTACHMENT_CATEGORY_IMAGE || strpos($attachment['mimetype'], 'image') !== 0)
+ if ($display_cat == ATTACHMENT_CATEGORY_FLASH && !$user->optionget('viewflash'))
{
- $attachment['mimetype'] = (strpos(strtolower($user->browser), 'msie') !== false || strpos(strtolower($user->browser), 'opera') !== false) ? 'application/octetstream' : 'application/octet-stream';
+ $display_cat = ATTACHMENT_CATEGORY_NONE;
}
- if (@ob_get_length())
+ if ($thumbnail)
{
- @ob_end_clean();
+ $attachment['physical_filename'] = 'thumb_' . $attachment['physical_filename'];
}
-
- // Now send the File Contents to the Browser
- $size = @filesize($filename);
-
- // To correctly display further errors we need to make sure we are using the correct headers for both (unsetting content-length may not work)
-
- // Check if headers already sent or not able to get the file contents.
- if (headers_sent() || !@file_exists($filename) || !@is_readable($filename))
+ else if ($display_cat == ATTACHMENT_CATEGORY_NONE && !$attachment['is_orphan'] && !phpbb_http_byte_range($attachment['filesize']))
{
- // PHP track_errors setting On?
- if (!empty($php_errormsg))
- {
- send_status_line(500, 'Internal Server Error');
- trigger_error($user->lang['UNABLE_TO_DELIVER_FILE'] . '<br />' . sprintf($user->lang['TRACKED_PHP_ERROR'], $php_errormsg));
- }
-
- send_status_line(500, 'Internal Server Error');
- trigger_error('UNABLE_TO_DELIVER_FILE');
+ // Update download count
+ phpbb_increment_downloads($db, $attachment['attach_id']);
}
- // Now the tricky part... let's dance
- header('Pragma: public');
-
- /**
- * Commented out X-Sendfile support. To not expose the physical filename within the header if xsendfile is absent we need to look into methods of checking it's status.
- *
- * Try X-Sendfile since it is much more server friendly - only works if the path is *not* outside of the root path...
- * lighttpd has core support for it. An apache2 module is available at http://celebnamer.celebworld.ws/stuff/mod_xsendfile/
- *
- * Not really ideal, but should work fine...
- * <code>
- * if (strpos($upload_dir, '/') !== 0 && strpos($upload_dir, '../') === false)
- * {
- * header('X-Sendfile: ' . $filename);
- * }
- * </code>
- */
-
- // Send out the Headers. Do not set Content-Disposition to inline please, it is a security measure for users using the Internet Explorer.
- header('Content-Type: ' . $attachment['mimetype']);
-
- if (phpbb_is_greater_ie_version($user->browser, 7))
+ if ($display_cat == ATTACHMENT_CATEGORY_IMAGE && $mode === 'view' && (strpos($attachment['mimetype'], 'image') === 0) && (strpos(strtolower($user->browser), 'msie') !== false) && !phpbb_is_greater_ie_version($user->browser, 7))
{
- header('X-Content-Type-Options: nosniff');
- }
-
- if ($category == ATTACHMENT_CATEGORY_FLASH && request_var('view', 0) === 1)
- {
- // We use content-disposition: inline for flash files and view=1 to let it correctly play with flash player 10 - any other disposition will fail to play inline
- header('Content-Disposition: inline');
+ wrap_img_in_html(append_sid($phpbb_root_path . 'download/file.' . $phpEx, 'id=' . $attachment['attach_id']), $attachment['real_filename']);
+ file_gc();
}
else
{
- if (empty($user->browser) || ((strpos(strtolower($user->browser), 'msie') !== false) && !phpbb_is_greater_ie_version($user->browser, 7)))
+ // Determine the 'presenting'-method
+ if ($download_mode == PHYSICAL_LINK)
{
- header('Content-Disposition: attachment; ' . header_filename(htmlspecialchars_decode($attachment['real_filename'])));
- if (empty($user->browser) || (strpos(strtolower($user->browser), 'msie 6.0') !== false))
+ // This presenting method should no longer be used
+ if (!@is_dir($phpbb_root_path . $config['upload_path']))
{
- header('expires: -1');
+ send_status_line(500, 'Internal Server Error');
+ trigger_error($user->lang['PHYSICAL_DOWNLOAD_NOT_POSSIBLE']);
}
+
+ redirect($phpbb_root_path . $config['upload_path'] . '/' . $attachment['physical_filename']);
+ file_gc();
}
else
{
- header('Content-Disposition: ' . ((strpos($attachment['mimetype'], 'image') === 0) ? 'inline' : 'attachment') . '; ' . header_filename(htmlspecialchars_decode($attachment['real_filename'])));
- if (phpbb_is_greater_ie_version($user->browser, 7) && (strpos($attachment['mimetype'], 'image') !== 0))
- {
- header('X-Download-Options: noopen');
- }
+ send_file_to_browser($attachment, $config['upload_path'], $display_cat);
+ file_gc();
}
}
-
- if ($size)
+}
+else
+{
+ // sizeof($attachments) >= 1
+ if ($attachment['in_message'])
{
- header("Content-Length: $size");
+ phpbb_download_handle_pm_auth($db, $auth, $user->data['user_id'], $attachment['post_msg_id']);
}
-
- // Close the db connection before sending the file
- $db->sql_close();
-
- if (!set_modified_headers($attachment['filetime'], $user->browser))
+ else
{
- // Try to deliver in chunks
- @set_time_limit(0);
-
- $fp = @fopen($filename, 'rb');
-
- if ($fp !== false)
- {
- while (!feof($fp))
- {
- echo fread($fp, 8192);
- }
- fclose($fp);
- }
- else
- {
- @readfile($filename);
- }
-
- flush();
+ phpbb_download_handle_forum_auth($db, $auth, $attachment['topic_id']);
}
- file_gc();
-}
-/**
-* Get a browser friendly UTF-8 encoded filename
-*/
-function header_filename($file)
-{
- $user_agent = (!empty($_SERVER['HTTP_USER_AGENT'])) ? htmlspecialchars((string) $_SERVER['HTTP_USER_AGENT']) : '';
-
- // There be dragons here.
- // Not many follows the RFC...
- if (strpos($user_agent, 'MSIE') !== false || strpos($user_agent, 'Safari') !== false || strpos($user_agent, 'Konqueror') !== false)
+ if (!class_exists('compress'))
{
- return "filename=" . rawurlencode($file);
+ require $phpbb_root_path . 'includes/functions_compress.' . $phpEx;
}
- // follow the RFC for extended filename for the rest
- return "filename*=UTF-8''" . rawurlencode($file);
-}
-
-/**
-* Check if downloading item is allowed
-*/
-function download_allowed()
-{
- global $config, $user, $db;
-
- if (!$config['secure_downloads'])
+ if (!in_array($archive, compress::methods()))
{
- return true;
+ $archive = '.tar';
}
- $url = (!empty($_SERVER['HTTP_REFERER'])) ? trim($_SERVER['HTTP_REFERER']) : trim(getenv('HTTP_REFERER'));
-
- if (!$url)
+ $post_visibility = array();
+ if ($msg_id)
{
- return ($config['secure_allow_empty_referer']) ? true : false;
+ $sql = 'SELECT message_subject AS attach_subject
+ FROM ' . PRIVMSGS_TABLE . "
+ WHERE msg_id = $msg_id";
}
-
- // Split URL into domain and script part
- $url = @parse_url($url);
-
- if ($url === false)
+ else if ($post_id)
{
- return ($config['secure_allow_empty_referer']) ? true : false;
+ $sql = 'SELECT post_subject AS attach_subject, forum_id, post_visibility
+ FROM ' . POSTS_TABLE . "
+ WHERE post_id = $post_id";
}
-
- $hostname = $url['host'];
- unset($url);
-
- $allowed = ($config['secure_allow_deny']) ? false : true;
- $iplist = array();
-
- if (($ip_ary = @gethostbynamel($hostname)) !== false)
+ else
{
- foreach ($ip_ary as $ip)
+ $sql = 'SELECT post_id, post_visibility
+ FROM ' . POSTS_TABLE . "
+ WHERE topic_id = $topic_id
+ AND post_attachment = 1";
+ $result = $db->sql_query($sql);
+ while ($row = $db->sql_fetchrow($result))
{
- if ($ip)
- {
- $iplist[] = $ip;
- }
+ $post_visibility[(int) $row['post_id']] = (int) $row['post_visibility'];
}
+ $db->sql_freeresult($result);
+
+ $sql = 'SELECT topic_title AS attach_subject, forum_id
+ FROM ' . TOPICS_TABLE . "
+ WHERE topic_id = $topic_id";
}
- // Check for own server...
- $server_name = $user->host;
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
- // Forcing server vars is the only way to specify/override the protocol
- if ($config['force_server_vars'] || !$server_name)
+ if (empty($row))
{
- $server_name = $config['server_name'];
+ send_status_line(404, 'Not Found');
+ trigger_error('ERROR_NO_ATTACHMENT');
}
- if (preg_match('#^.*?' . preg_quote($server_name, '#') . '.*?$#i', $hostname))
+ $clean_name = phpbb_download_clean_filename($row['attach_subject']);
+ $suffix = '_' . (($msg_id) ? 'm' . $msg_id : (($post_id) ? 'p' . $post_id : 't' . $topic_id)) . '_' . $clean_name;
+ $archive_name = 'attachments' . $suffix;
+
+ $store_name = 'att_' . time() . '_' . unique_id();
+ $archive_path = "{$phpbb_root_path}store/{$store_name}{$archive}";
+
+ if ($archive === '.zip')
{
- $allowed = true;
+ $compress = new compress_zip('w', $archive_path);
}
-
- // Get IP's and Hostnames
- if (!$allowed)
+ else
{
- $sql = 'SELECT site_ip, site_hostname, ip_exclude
- FROM ' . SITELIST_TABLE;
- $result = $db->sql_query($sql);
-
- while ($row = $db->sql_fetchrow($result))
- {
- $site_ip = trim($row['site_ip']);
- $site_hostname = trim($row['site_hostname']);
+ $compress = new compress_tar('w', $archive_path, $archive);
+ }
- if ($site_ip)
- {
- foreach ($iplist as $ip)
- {
- if (preg_match('#^' . str_replace('\*', '.*?', preg_quote($site_ip, '#')) . '$#i', $ip))
- {
- if ($row['ip_exclude'])
- {
- $allowed = ($config['secure_allow_deny']) ? false : true;
- break 2;
- }
- else
- {
- $allowed = ($config['secure_allow_deny']) ? true : false;
- }
- }
- }
- }
+ $extensions = array();
+ $files_added = 0;
+ $forum_id = ($attachment['in_message']) ? false : (int) $row['forum_id'];
+ $disallowed_extension = array();
- if ($site_hostname)
- {
- if (preg_match('#^' . str_replace('\*', '.*?', preg_quote($site_hostname, '#')) . '$#i', $hostname))
- {
- if ($row['ip_exclude'])
- {
- $allowed = ($config['secure_allow_deny']) ? false : true;
- break;
- }
- else
- {
- $allowed = ($config['secure_allow_deny']) ? true : false;
- }
- }
- }
+ foreach ($attachments as $attach)
+ {
+ if (!extension_allowed($forum_id, $attach['extension'], $extensions))
+ {
+ $disallowed_extension[$attach['extension']] = $attach['extension'];
+ continue;
}
- $db->sql_freeresult($result);
- }
- return $allowed;
-}
+ if ($post_id && $row['post_visibility'] != ITEM_APPROVED && !$auth->acl_get('m_approve', $forum_id))
+ {
+ // Attachment of a soft deleted post and the user is not allowed to see the post
+ continue;
+ }
-/**
-* Check if the browser has the file already and set the appropriate headers-
-* @returns false if a resend is in order.
-*/
-function set_modified_headers($stamp, $browser)
-{
- // let's see if we have to send the file at all
- $last_load = isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) ? strtotime(trim($_SERVER['HTTP_IF_MODIFIED_SINCE'])) : false;
-
- if (strpos(strtolower($browser), 'msie 6.0') === false && !phpbb_is_greater_ie_version($browser, 7))
- {
- if ($last_load !== false && $last_load >= $stamp)
+ if ($topic_id && (!isset($post_visibility[$attach['post_msg_id']]) || $post_visibility[$attach['post_msg_id']] != ITEM_APPROVED) && !$auth->acl_get('m_approve', $forum_id))
{
- send_status_line(304, 'Not Modified');
- // seems that we need those too ... browsers
- header('Pragma: public');
- header('Expires: ' . gmdate('D, d M Y H:i:s \G\M\T', time() + 31536000));
- return true;
+ // Attachment of a soft deleted post and the user is not allowed to see the post
+ continue;
}
- else
+
+ $prefix = '';
+ if ($topic_id)
{
- header('Last-Modified: ' . gmdate('D, d M Y H:i:s', $stamp) . ' GMT');
+ $prefix = $attach['post_msg_id'] . '_';
}
+
+ $compress->add_custom_file("{$phpbb_root_path}files/{$attach['physical_filename']}", "{$prefix}{$attach['real_filename']}");
+ $files_added++;
}
- return false;
-}
-function file_gc()
-{
- global $cache, $db;
- if (!empty($cache))
+ $compress->close();
+
+ if ($files_added)
{
- $cache->unload();
+ phpbb_increment_downloads($db, $attachment_ids);
+ $compress->download($store_name, $archive_name);
}
- $db->sql_close();
- exit;
-}
-/**
-* Check if the browser is internet explorer version 7+
-*
-* @param string $user_agent User agent HTTP header
-* @param int $version IE version to check against
-*
-* @return bool true if internet explorer version is greater than $version
-*/
-function phpbb_is_greater_ie_version($user_agent, $version)
-{
- if (preg_match('/msie (\d+)/', strtolower($user_agent), $matches))
+ unlink($archive_path);
+
+ if (!$files_added && !empty($disallowed_extension))
{
- $ie_version = (int) $matches[1];
- return ($ie_version > $version);
+ // None of the attachments had a valid extension
+ $disallowed_extension = implode($user->lang['COMMA_SEPARATOR'], $disallowed_extension);
+ send_status_line(403, 'Forbidden');
+ trigger_error($user->lang('EXTENSION_DISABLED_AFTER_POSTING', $disallowed_extension));
}
- else
+ else if (!$files_added)
{
- return false;
+ send_status_line(404, 'Not Found');
+ trigger_error('ERROR_NO_ATTACHMENT');
}
-}
-?> \ No newline at end of file
+ file_gc();
+}
diff --git a/phpBB/faq.php b/phpBB/faq.php
index 0a04bad8eb..53de850195 100644
--- a/phpBB/faq.php
+++ b/phpBB/faq.php
@@ -2,9 +2,8 @@
/**
*
* @package phpBB3
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -77,7 +76,7 @@ $template->assign_vars(array(
'SWITCH_COLUMN_MANUALLY' => (!$found_switch) ? true : false,
));
-page_header($l_title, false);
+page_header($l_title);
$template->set_filenames(array(
'body' => 'faq_body.html')
@@ -85,5 +84,3 @@ $template->set_filenames(array(
make_jumpbox(append_sid("{$phpbb_root_path}viewforum.$phpEx"));
page_footer();
-
-?> \ No newline at end of file
diff --git a/phpBB/feed.php b/phpBB/feed.php
index 04bb0f40ea..c31a6b6b1d 100644
--- a/phpBB/feed.php
+++ b/phpBB/feed.php
@@ -1,9 +1,8 @@
<?php
/**
* @package phpBB3
-* @version $Id$
* @copyright (c) 2009 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
* Idea and original RSS Feed 2.0 MOD (Version 1.0.8/9) by leviatan21
* Original MOD: http://www.phpbb.com/community/viewtopic.php?f=69&t=1214645
@@ -19,6 +18,7 @@ define('IN_PHPBB', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);
+include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
if (!$config['feed_enable'])
{
@@ -60,10 +60,12 @@ if ($forum_id || $topic_id || $mode)
}
// This boards URL
-$board_url = generate_board_url();
+$phpbb_feed_helper = $phpbb_container->get('feed.helper');
+$board_url = $phpbb_feed_helper->get_board_url();
// Get correct feed object
-$feed = phpbb_feed_factory::init($mode, $forum_id, $topic_id);
+$phpbb_feed_factory = $phpbb_container->get('feed.factory');
+$feed = $phpbb_feed_factory->get_feed($mode, $forum_id, $topic_id);
// No feed found
if ($feed === false)
@@ -103,13 +105,13 @@ while ($row = $feed->get_item())
$item_row = array(
'author' => ($feed->get('creator') !== NULL) ? $row[$feed->get('creator')] : '',
- 'published' => ($published > 0) ? feed_format_date($published) : '',
- 'updated' => ($updated > 0) ? feed_format_date($updated) : '',
+ 'published' => ($published > 0) ? $phpbb_feed_helper->format_date($published) : '',
+ 'updated' => ($updated > 0) ? $phpbb_feed_helper->format_date($updated) : '',
'link' => '',
'title' => censor_text($title),
'category' => ($config['feed_item_statistics'] && !empty($row['forum_id'])) ? $board_url . '/viewforum.' . $phpEx . '?f=' . $row['forum_id'] : '',
'category_name' => ($config['feed_item_statistics'] && isset($row['forum_name'])) ? $row['forum_name'] : '',
- 'description' => censor_text(feed_generate_content($row[$feed->get('text')], $row[$feed->get('bbcode_uid')], $row[$feed->get('bitfield')], $options, $row['forum_id'], (($row['post_attachment']) ? $feed->attachments[$row['post_id']] : array()))),
+ 'description' => censor_text($phpbb_feed_helper->generate_content($row[$feed->get('text')], $row[$feed->get('bbcode_uid')], $row[$feed->get('bitfield')], $options, $row['forum_id'], (($row['post_attachment']) ? $feed->attachments[$row['post_id']] : array()))),
'statistics' => '',
);
@@ -130,12 +132,12 @@ if (!$feed_updated_time)
// Some default assignments
// FEED_IMAGE is not used (atom)
$global_vars = array_merge($global_vars, array(
- 'FEED_IMAGE' => ($user->img('site_logo', '', false, '', 'src')) ? $board_url . '/' . substr($user->img('site_logo', '', false, '', 'src'), strlen($phpbb_root_path)) : '',
- 'SELF_LINK' => feed_append_sid('/feed.' . $phpEx, $params),
+ 'FEED_IMAGE' => '',
+ 'SELF_LINK' => $phpbb_feed_helper->append_sid('feed.' . $phpEx, $params),
'FEED_LINK' => $board_url . '/index.' . $phpEx,
'FEED_TITLE' => $config['sitename'],
'FEED_SUBTITLE' => $config['site_desc'],
- 'FEED_UPDATED' => feed_format_date($feed_updated_time),
+ 'FEED_UPDATED' => $phpbb_feed_helper->format_date($feed_updated_time),
'FEED_LANG' => $user->lang['USER_LANG'],
'FEED_AUTHOR' => $config['sitename'],
));
@@ -154,7 +156,7 @@ if ($config['gzip_compress'])
}
// IF debug extra is enabled and admin want to "explain" the page we need to set other headers...
-if (defined('DEBUG_EXTRA') && request_var('explain', 0) && $auth->acl_get('a_'))
+if (defined('DEBUG') && request_var('explain', 0) && $auth->acl_get('a_'))
{
header('Content-type: text/html; charset=UTF-8');
header('Cache-Control: private, no-cache="set-cookie"');
@@ -235,1314 +237,3 @@ echo '</feed>';
garbage_collection();
exit_handler();
-
-/**
-* Run links through append_sid(), prepend generate_board_url() and remove session id
-**/
-function feed_append_sid($url, $params)
-{
- global $board_url;
-
- return append_sid($board_url . $url, $params, true, '');
-}
-
-/**
-* Generate ISO 8601 date string (RFC 3339)
-**/
-function feed_format_date($time)
-{
- static $zone_offset;
- static $offset_string;
-
- if (empty($offset_string))
- {
- global $user;
-
- $zone_offset = (int) $user->timezone + (int) $user->dst;
-
- $sign = ($zone_offset < 0) ? '-' : '+';
- $time_offset = abs($zone_offset);
-
- $offset_seconds = $time_offset % 3600;
- $offset_minutes = $offset_seconds / 60;
- $offset_hours = ($time_offset - $offset_seconds) / 3600;
-
- $offset_string = sprintf("%s%02d:%02d", $sign, $offset_hours, $offset_minutes);
- }
-
- return gmdate("Y-m-d\TH:i:s", $time + $zone_offset) . $offset_string;
-}
-
-/**
-* Generate text content
-*
-* @param string $content is feed text content
-* @param string $uid is bbcode_uid
-* @param string $bitfield is bbcode bitfield
-* @param int $options bbcode flag options
-* @param int $forum_id is the forum id
-* @param array $post_attachments is an array containing the attachments and their respective info
-* @return string the html content to be printed for the feed
-**/
-function feed_generate_content($content, $uid, $bitfield, $options, $forum_id, $post_attachments)
-{
- global $user, $config, $phpbb_root_path, $phpEx, $board_url;
-
- if (empty($content))
- {
- return '';
- }
-
- // Prepare some bbcodes for better parsing
- $content = preg_replace("#\[quote(=&quot;.*?&quot;)?:$uid\]\s*(.*?)\s*\[/quote:$uid\]#si", "[quote$1:$uid]<br />$2<br />[/quote:$uid]", $content);
-
- $content = generate_text_for_display($content, $uid, $bitfield, $options);
-
- // Add newlines
- $content = str_replace('<br />', '<br />' . "\n", $content);
-
- // Convert smiley Relative paths to Absolute path, Windows style
- $content = str_replace($phpbb_root_path . $config['smilies_path'], $board_url . '/' . $config['smilies_path'], $content);
-
- // Remove "Select all" link and mouse events
- $content = str_replace('<a href="#" onclick="selectCode(this); return false;">' . $user->lang['SELECT_ALL_CODE'] . '</a>', '', $content);
- $content = preg_replace('#(onkeypress|onclick)="(.*?)"#si', '', $content);
-
- // Firefox does not support CSS for feeds, though
-
- // Remove font sizes
-// $content = preg_replace('#<span style="font-size: [0-9]+%; line-height: [0-9]+%;">([^>]+)</span>#iU', '\1', $content);
-
- // Make text strong :P
-// $content = preg_replace('#<span style="font-weight: bold?">(.*?)</span>#iU', '<strong>\1</strong>', $content);
-
- // Italic
-// $content = preg_replace('#<span style="font-style: italic?">([^<]+)</span>#iU', '<em>\1</em>', $content);
-
- // Underline
-// $content = preg_replace('#<span style="text-decoration: underline?">([^<]+)</span>#iU', '<u>\1</u>', $content);
-
- // Remove embed Windows Media Streams
- $content = preg_replace( '#<\!--\[if \!IE\]>-->([^[]+)<\!--<!\[endif\]-->#si', '', $content);
-
- // Do not use &lt; and &gt;, because we want to retain code contained in [code][/code]
-
- // Remove embed and objects
- $content = preg_replace( '#<(object|embed)(.*?) (value|src)=(.*?) ([^[]+)(object|embed)>#si',' <a href=$4 target="_blank"><strong>$1</strong></a> ',$content);
-
- // Remove some specials html tag, because somewhere there are a mod to allow html tags ;)
- $content = preg_replace( '#<(script|iframe)([^[]+)\1>#siU', ' <strong>$1</strong> ', $content);
-
- // Parse inline images to display with the feed
- if (!empty($post_attachments))
- {
- $update_count = array();
- parse_attachments($forum_id, $content, $post_attachments, $update_count);
- }
-
- // Remove Comments from inline attachments [ia]
- $content = preg_replace('#<dd>(.*?)</dd>#','',$content);
-
- // Replace some entities with their unicode counterpart
- $entities = array(
- '&nbsp;' => "\xC2\xA0",
- '&bull;' => "\xE2\x80\xA2",
- '&middot;' => "\xC2\xB7",
- '&copy;' => "\xC2\xA9",
- );
-
- $content = str_replace(array_keys($entities), array_values($entities), $content);
-
- // Remove CDATA blocks. ;)
- $content = preg_replace('#\<\!\[CDATA\[(.*?)\]\]\>#s', '', $content);
-
- // Other control characters
- $content = preg_replace('#(?:[\x00-\x1F\x7F]+|(?:\xC2[\x80-\x9F])+)#', '', $content);
-
- // Convert attachments' relative path to absolute path
- $content = str_replace($phpbb_root_path . 'download/file.' . $phpEx, $board_url . '/download/file.' . $phpEx, $content);
-
- return $content;
-}
-
-/**
-* Factory class to return correct object
-* @package phpBB3
-*/
-class phpbb_feed_factory
-{
- /**
- * Return correct object for specified mode
- *
- * @param string $mode The feeds mode.
- * @param int $forum_id Forum id specified by the script if forum feed provided.
- * @param int $topic_id Topic id specified by the script if topic feed provided.
- *
- * @return object Returns correct feeds object for specified mode.
- */
- function init($mode, $forum_id, $topic_id)
- {
- global $config;
-
- switch ($mode)
- {
- case 'forums':
- if (!$config['feed_overall_forums'])
- {
- return false;
- }
-
- return new phpbb_feed_forums();
- break;
-
- case 'topics':
- case 'topics_new':
- if (!$config['feed_topics_new'])
- {
- return false;
- }
-
- return new phpbb_feed_topics();
- break;
-
- case 'topics_active':
- if (!$config['feed_topics_active'])
- {
- return false;
- }
-
- return new phpbb_feed_topics_active();
- break;
-
- case 'news':
- global $db;
-
- // Get at least one news forum
- $sql = 'SELECT forum_id
- FROM ' . FORUMS_TABLE . '
- WHERE ' . $db->sql_bit_and('forum_options', FORUM_OPTION_FEED_NEWS, '<> 0');
- $result = $db->sql_query_limit($sql, 1, 0, 600);
- $s_feed_news = (int) $db->sql_fetchfield('forum_id');
- $db->sql_freeresult($result);
-
- if (!$s_feed_news)
- {
- return false;
- }
-
- return new phpbb_feed_news();
- break;
-
- default:
- if ($topic_id && $config['feed_topic'])
- {
- return new phpbb_feed_topic($topic_id);
- }
- else if ($forum_id && $config['feed_forum'])
- {
- return new phpbb_feed_forum($forum_id);
- }
- else if ($config['feed_overall'])
- {
- return new phpbb_feed_overall();
- }
-
- return false;
- break;
- }
- }
-}
-
-/**
-* Base class with some generic functions and settings.
-*
-* @package phpBB3
-*/
-class phpbb_feed_base
-{
- /**
- * SQL Query to be executed to get feed items
- */
- var $sql = array();
-
- /**
- * Keys specified for retrieval of title, content, etc.
- */
- var $keys = array();
-
- /**
- * Number of items to fetch. Usually overwritten by $config['feed_something']
- */
- var $num_items = 15;
-
- /**
- * Separator for title elements to separate items (for example forum / topic)
- */
- var $separator = "\xE2\x80\xA2"; // &bull;
-
- /**
- * Separator for the statistics row (Posted by, post date, replies, etc.)
- */
- var $separator_stats = "\xE2\x80\x94"; // &mdash;
-
- /**
- * Constructor
- */
- function phpbb_feed_base()
- {
- global $config;
-
- $this->set_keys();
-
- // Allow num_items to be string
- if (is_string($this->num_items))
- {
- $this->num_items = (int) $config[$this->num_items];
-
- // A precaution
- if (!$this->num_items)
- {
- $this->num_items = 10;
- }
- }
- }
-
- /**
- * Set keys.
- */
- function set_keys()
- {
- }
-
- /**
- * Open feed
- */
- function open()
- {
- }
-
- /**
- * Close feed
- */
- function close()
- {
- global $db;
-
- if (!empty($this->result))
- {
- $db->sql_freeresult($this->result);
- }
- }
-
- /**
- * Set key
- */
- function set($key, $value)
- {
- $this->keys[$key] = $value;
- }
-
- /**
- * Get key
- */
- function get($key)
- {
- return (isset($this->keys[$key])) ? $this->keys[$key] : NULL;
- }
-
- function get_readable_forums()
- {
- global $auth;
- static $forum_ids;
-
- if (!isset($forum_ids))
- {
- $forum_ids = array_keys($auth->acl_getf('f_read', true));
- }
-
- return $forum_ids;
- }
-
- function get_moderator_approve_forums()
- {
- global $auth;
- static $forum_ids;
-
- if (!isset($forum_ids))
- {
- $forum_ids = array_keys($auth->acl_getf('m_approve', true));
- }
-
- return $forum_ids;
- }
-
- function is_moderator_approve_forum($forum_id)
- {
- static $forum_ids;
-
- if (!isset($forum_ids))
- {
- $forum_ids = array_flip($this->get_moderator_approve_forums());
- }
-
- if (!$forum_id)
- {
- // Global announcement, your a moderator in any forum than it's okay.
- return (!empty($forum_ids)) ? true : false;
- }
-
- return (isset($forum_ids[$forum_id])) ? true : false;
- }
-
- function get_excluded_forums()
- {
- global $db, $cache;
- static $forum_ids;
-
- // Matches acp/acp_board.php
- $cache_name = 'feed_excluded_forum_ids';
-
- if (!isset($forum_ids) && ($forum_ids = $cache->get('_' . $cache_name)) === false)
- {
- $sql = 'SELECT forum_id
- FROM ' . FORUMS_TABLE . '
- WHERE ' . $db->sql_bit_and('forum_options', FORUM_OPTION_FEED_EXCLUDE, '<> 0');
- $result = $db->sql_query($sql);
-
- $forum_ids = array();
- while ($forum_id = (int) $db->sql_fetchfield('forum_id'))
- {
- $forum_ids[$forum_id] = $forum_id;
- }
- $db->sql_freeresult($result);
-
- $cache->put('_' . $cache_name, $forum_ids);
- }
-
- return $forum_ids;
- }
-
- function is_excluded_forum($forum_id)
- {
- $forum_ids = $this->get_excluded_forums();
-
- return isset($forum_ids[$forum_id]) ? true : false;
- }
-
- function get_passworded_forums()
- {
- global $user;
-
- return $user->get_passworded_forums();
- }
-
- function get_item()
- {
- global $db, $cache;
- static $result;
-
- if (!isset($result))
- {
- if (!$this->get_sql())
- {
- return false;
- }
-
- // Query database
- $sql = $db->sql_build_query('SELECT', $this->sql);
- $result = $db->sql_query_limit($sql, $this->num_items);
- }
-
- return $db->sql_fetchrow($result);
- }
-
- function user_viewprofile($row)
- {
- global $phpEx, $user;
-
- $author_id = (int) $row[$this->get('author_id')];
-
- if ($author_id == ANONYMOUS)
- {
- // Since we cannot link to a profile, we just return GUEST
- // instead of $row['username']
- return $user->lang['GUEST'];
- }
-
- return '<a href="' . feed_append_sid('/memberlist.' . $phpEx, 'mode=viewprofile&amp;u=' . $author_id) . '">' . $row[$this->get('creator')] . '</a>';
- }
-}
-
-/**
-* Abstract class for post based feeds
-*
-* @package phpBB3
-*/
-class phpbb_feed_post_base extends phpbb_feed_base
-{
- var $num_items = 'feed_limit_post';
- var $attachments = array();
-
- function set_keys()
- {
- $this->set('title', 'post_subject');
- $this->set('title2', 'topic_title');
-
- $this->set('author_id', 'user_id');
- $this->set('creator', 'username');
- $this->set('published', 'post_time');
- $this->set('updated', 'post_edit_time');
- $this->set('text', 'post_text');
-
- $this->set('bitfield', 'bbcode_bitfield');
- $this->set('bbcode_uid','bbcode_uid');
-
- $this->set('enable_bbcode', 'enable_bbcode');
- $this->set('enable_smilies', 'enable_smilies');
- $this->set('enable_magic_url', 'enable_magic_url');
- }
-
- function adjust_item(&$item_row, &$row)
- {
- global $phpEx, $config, $user;
-
- $item_row['link'] = feed_append_sid('/viewtopic.' . $phpEx, "t={$row['topic_id']}&amp;p={$row['post_id']}#p{$row['post_id']}");
-
- if ($config['feed_item_statistics'])
- {
- $item_row['statistics'] = $user->lang['POSTED'] . ' ' . $user->lang['POST_BY_AUTHOR'] . ' ' . $this->user_viewprofile($row)
- . ' ' . $this->separator_stats . ' ' . $user->format_date($row[$this->get('published')])
- . (($this->is_moderator_approve_forum($row['forum_id']) && !$row['post_approved']) ? ' ' . $this->separator_stats . ' ' . $user->lang['POST_UNAPPROVED'] : '');
- }
- }
-
- function fetch_attachments()
- {
- global $db;
-
- $sql_array = array(
- 'SELECT' => 'a.*',
- 'FROM' => array(
- ATTACHMENTS_TABLE => 'a'
- ),
- 'WHERE' => 'a.in_message = 0 ',
- 'ORDER_BY' => 'a.filetime DESC, a.post_msg_id ASC',
- );
-
- if (isset($this->topic_id))
- {
- $sql_array['WHERE'] .= 'AND a.topic_id = ' . (int) $this->topic_id;
- }
- else if (isset($this->forum_id))
- {
- $sql_array['LEFT_JOIN'] = array(
- array(
- 'FROM' => array(TOPICS_TABLE => 't'),
- 'ON' => 'a.topic_id = t.topic_id',
- )
- );
- $sql_array['WHERE'] .= 'AND t.forum_id = ' . (int) $this->forum_id;
- }
-
- $sql = $db->sql_build_query('SELECT', $sql_array);
- $result = $db->sql_query($sql);
-
- // Set attachments in feed items
- while ($row = $db->sql_fetchrow($result))
- {
- $this->attachments[$row['post_msg_id']][] = $row;
- }
- $db->sql_freeresult($result);
- }
-}
-
-/**
-* Abstract class for topic based feeds
-*
-* @package phpBB3
-*/
-class phpbb_feed_topic_base extends phpbb_feed_base
-{
- var $num_items = 'feed_limit_topic';
-
- function set_keys()
- {
- $this->set('title', 'topic_title');
- $this->set('title2', 'forum_name');
-
- $this->set('author_id', 'topic_poster');
- $this->set('creator', 'topic_first_poster_name');
- $this->set('published', 'post_time');
- $this->set('updated', 'post_edit_time');
- $this->set('text', 'post_text');
-
- $this->set('bitfield', 'bbcode_bitfield');
- $this->set('bbcode_uid','bbcode_uid');
-
- $this->set('enable_bbcode', 'enable_bbcode');
- $this->set('enable_smilies', 'enable_smilies');
- $this->set('enable_magic_url', 'enable_magic_url');
- }
-
- function adjust_item(&$item_row, &$row)
- {
- global $phpEx, $config, $user;
-
- $item_row['link'] = feed_append_sid('/viewtopic.' . $phpEx, 't=' . $row['topic_id'] . '&amp;p=' . $row['post_id'] . '#p' . $row['post_id']);
-
- if ($config['feed_item_statistics'])
- {
- $item_row['statistics'] = $user->lang['POSTED'] . ' ' . $user->lang['POST_BY_AUTHOR'] . ' ' . $this->user_viewprofile($row)
- . ' ' . $this->separator_stats . ' ' . $user->format_date($row[$this->get('published')])
- . ' ' . $this->separator_stats . ' ' . $user->lang['REPLIES'] . ' ' . (($this->is_moderator_approve_forum($row['forum_id'])) ? $row['topic_replies_real'] : $row['topic_replies'])
- . ' ' . $this->separator_stats . ' ' . $user->lang['VIEWS'] . ' ' . $row['topic_views']
- . (($this->is_moderator_approve_forum($row['forum_id']) && ($row['topic_replies_real'] != $row['topic_replies'])) ? ' ' . $this->separator_stats . ' ' . $user->lang['POSTS_UNAPPROVED'] : '');
- }
- }
-}
-
-/**
-* Board wide feed (aka overall feed)
-*
-* This will give you the newest {$this->num_items} posts
-* from the whole board.
-*
-* @package phpBB3
-*/
-class phpbb_feed_overall extends phpbb_feed_post_base
-{
- function get_sql()
- {
- global $auth, $db;
-
- $forum_ids = array_diff($this->get_readable_forums(), $this->get_excluded_forums(), $this->get_passworded_forums());
- if (empty($forum_ids))
- {
- return false;
- }
-
- // Add global forum id
- $forum_ids[] = 0;
-
- // m_approve forums
- $fid_m_approve = $this->get_moderator_approve_forums();
- $sql_m_approve = (!empty($fid_m_approve)) ? 'OR ' . $db->sql_in_set('forum_id', $fid_m_approve) : '';
-
- // Determine topics with recent activity
- $sql = 'SELECT topic_id, topic_last_post_time
- FROM ' . TOPICS_TABLE . '
- WHERE ' . $db->sql_in_set('forum_id', $forum_ids) . '
- AND topic_moved_id = 0
- AND (topic_approved = 1
- ' . $sql_m_approve . ')
- ORDER BY topic_last_post_time DESC';
- $result = $db->sql_query_limit($sql, $this->num_items);
-
- $topic_ids = array();
- $min_post_time = 0;
- while ($row = $db->sql_fetchrow())
- {
- $topic_ids[] = (int) $row['topic_id'];
-
- $min_post_time = (int) $row['topic_last_post_time'];
- }
- $db->sql_freeresult($result);
-
- if (empty($topic_ids))
- {
- return false;
- }
-
- // Get the actual data
- $this->sql = array(
- 'SELECT' => 'f.forum_id, f.forum_name, ' .
- 'p.post_id, p.topic_id, p.post_time, p.post_edit_time, p.post_approved, p.post_subject, p.post_text, p.bbcode_bitfield, p.bbcode_uid, p.enable_bbcode, p.enable_smilies, p.enable_magic_url, p.post_attachment, ' .
- 'u.username, u.user_id',
- 'FROM' => array(
- USERS_TABLE => 'u',
- POSTS_TABLE => 'p',
- ),
- 'LEFT_JOIN' => array(
- array(
- 'FROM' => array(FORUMS_TABLE => 'f'),
- 'ON' => 'f.forum_id = p.forum_id',
- ),
- ),
- 'WHERE' => $db->sql_in_set('p.topic_id', $topic_ids) . '
- AND (p.post_approved = 1
- ' . str_replace('forum_id', 'p.forum_id', $sql_m_approve) . ')
- AND p.post_time >= ' . $min_post_time . '
- AND u.user_id = p.poster_id',
- 'ORDER_BY' => 'p.post_time DESC',
- );
-
- return true;
- }
-
- function adjust_item(&$item_row, &$row)
- {
- parent::adjust_item($item_row, $row);
-
- $item_row['title'] = (isset($row['forum_name']) && $row['forum_name'] !== '') ? $row['forum_name'] . ' ' . $this->separator . ' ' . $item_row['title'] : $item_row['title'];
- }
-}
-
-/**
-* Forum feed
-*
-* This will give you the last {$this->num_items} posts made
-* within a specific forum.
-*
-* @package phpBB3
-*/
-class phpbb_feed_forum extends phpbb_feed_post_base
-{
- var $forum_id = 0;
- var $forum_data = array();
-
- function phpbb_feed_forum($forum_id)
- {
- parent::phpbb_feed_base();
-
- $this->forum_id = (int) $forum_id;
- }
-
- function open()
- {
- global $db, $auth;
-
- // Check if forum exists
- $sql = 'SELECT forum_id, forum_name, forum_password, forum_type, forum_options
- FROM ' . FORUMS_TABLE . '
- WHERE forum_id = ' . $this->forum_id;
- $result = $db->sql_query($sql);
- $this->forum_data = $db->sql_fetchrow($result);
- $db->sql_freeresult($result);
-
- if (empty($this->forum_data))
- {
- trigger_error('NO_FORUM');
- }
-
- // Forum needs to be postable
- if ($this->forum_data['forum_type'] != FORUM_POST)
- {
- trigger_error('NO_FEED');
- }
-
- // Make sure forum is not excluded from feed
- if (phpbb_optionget(FORUM_OPTION_FEED_EXCLUDE, $this->forum_data['forum_options']))
- {
- trigger_error('NO_FEED');
- }
-
- // Make sure we can read this forum
- if (!$auth->acl_get('f_read', $this->forum_id))
- {
- trigger_error('SORRY_AUTH_READ');
- }
-
- // Make sure forum is not passworded or user is authed
- if ($this->forum_data['forum_password'])
- {
- $forum_ids_passworded = $this->get_passworded_forums();
-
- if (isset($forum_ids_passworded[$this->forum_id]))
- {
- trigger_error('SORRY_AUTH_READ');
- }
-
- unset($forum_ids_passworded);
- }
- }
-
- function get_sql()
- {
- global $auth, $db;
-
- $m_approve = ($auth->acl_get('m_approve', $this->forum_id)) ? true : false;
- $forum_ids = array(0, $this->forum_id);
-
- // Determine topics with recent activity
- $sql = 'SELECT topic_id, topic_last_post_time
- FROM ' . TOPICS_TABLE . '
- WHERE ' . $db->sql_in_set('forum_id', $forum_ids) . '
- AND topic_moved_id = 0
- ' . ((!$m_approve) ? 'AND topic_approved = 1' : '') . '
- ORDER BY topic_last_post_time DESC';
- $result = $db->sql_query_limit($sql, $this->num_items);
-
- $topic_ids = array();
- $min_post_time = 0;
- while ($row = $db->sql_fetchrow())
- {
- $topic_ids[] = (int) $row['topic_id'];
-
- $min_post_time = (int) $row['topic_last_post_time'];
- }
- $db->sql_freeresult($result);
-
- if (empty($topic_ids))
- {
- return false;
- }
-
- $this->sql = array(
- 'SELECT' => 'p.post_id, p.topic_id, p.post_time, p.post_edit_time, p.post_approved, p.post_subject, p.post_text, p.bbcode_bitfield, p.bbcode_uid, p.enable_bbcode, p.enable_smilies, p.enable_magic_url, p.post_attachment, ' .
- 'u.username, u.user_id',
- 'FROM' => array(
- POSTS_TABLE => 'p',
- USERS_TABLE => 'u',
- ),
- 'WHERE' => $db->sql_in_set('p.topic_id', $topic_ids) . '
- ' . ((!$m_approve) ? 'AND p.post_approved = 1' : '') . '
- AND p.post_time >= ' . $min_post_time . '
- AND p.poster_id = u.user_id',
- 'ORDER_BY' => 'p.post_time DESC',
- );
-
- return true;
- }
-
- function adjust_item(&$item_row, &$row)
- {
- parent::adjust_item($item_row, $row);
-
- $item_row['title'] = (isset($row['forum_name']) && $row['forum_name'] !== '') ? $row['forum_name'] . ' ' . $this->separator . ' ' . $item_row['title'] : $item_row['title'];
- }
-
- function get_item()
- {
- return ($row = parent::get_item()) ? array_merge($this->forum_data, $row) : $row;
- }
-}
-
-/**
-* Topic feed for a specific topic
-*
-* This will give you the last {$this->num_items} posts made within this topic.
-*
-* @package phpBB3
-*/
-class phpbb_feed_topic extends phpbb_feed_post_base
-{
- var $topic_id = 0;
- var $forum_id = 0;
- var $topic_data = array();
-
- function phpbb_feed_topic($topic_id)
- {
- parent::phpbb_feed_base();
-
- $this->topic_id = (int) $topic_id;
- }
-
- function open()
- {
- global $auth, $db, $user;
-
- $sql = 'SELECT f.forum_options, f.forum_password, t.topic_id, t.forum_id, t.topic_approved, t.topic_title, t.topic_time, t.topic_views, t.topic_replies, t.topic_type
- FROM ' . TOPICS_TABLE . ' t
- LEFT JOIN ' . FORUMS_TABLE . ' f
- ON (f.forum_id = t.forum_id)
- WHERE t.topic_id = ' . $this->topic_id;
- $result = $db->sql_query($sql);
- $this->topic_data = $db->sql_fetchrow($result);
- $db->sql_freeresult($result);
-
- if (empty($this->topic_data))
- {
- trigger_error('NO_TOPIC');
- }
-
- if ($this->topic_data['topic_type'] == POST_GLOBAL)
- {
- // We need to find at least one postable forum where feeds are enabled,
- // that the user can read and maybe also has approve permissions.
- $in_fid_ary = $this->get_readable_forums();
-
- if (empty($in_fid_ary))
- {
- // User cannot read any forums
- trigger_error('SORRY_AUTH_READ');
- }
-
- if (!$this->topic_data['topic_approved'])
- {
- // Also require m_approve
- $in_fid_ary = array_intersect($in_fid_ary, $this->get_moderator_approve_forums());
-
- if (empty($in_fid_ary))
- {
- trigger_error('SORRY_AUTH_READ');
- }
- }
-
- // Diff excluded forums
- $in_fid_ary = array_diff($in_fid_ary, $this->get_excluded_forums());
-
- if (empty($in_fid_ary))
- {
- trigger_error('SORRY_AUTH_READ');
- }
-
- // Also exclude passworded forums
- $in_fid_ary = array_diff($in_fid_ary, $this->get_passworded_forums());
-
- if (empty($in_fid_ary))
- {
- trigger_error('SORRY_AUTH_READ');
- }
-
- $sql = 'SELECT forum_id, left_id
- FROM ' . FORUMS_TABLE . '
- WHERE forum_type = ' . FORUM_POST . '
- AND ' . $db->sql_in_set('forum_id', $in_fid_ary) . '
- ORDER BY left_id ASC';
- $result = $db->sql_query_limit($sql, 1);
- $this->forum_data = $db->sql_fetchrow($result);
- $db->sql_freeresult($result);
-
- if (empty($this->forum_data))
- {
- // No forum found.
- trigger_error('SORRY_AUTH_READ');
- }
-
- unset($in_fid_ary);
- }
- else
- {
- $this->forum_id = (int) $this->topic_data['forum_id'];
-
- // Make sure topic is either approved or user authed
- if (!$this->topic_data['topic_approved'] && !$auth->acl_get('m_approve', $this->forum_id))
- {
- trigger_error('SORRY_AUTH_READ');
- }
-
- // Make sure forum is not excluded from feed
- if (phpbb_optionget(FORUM_OPTION_FEED_EXCLUDE, $this->topic_data['forum_options']))
- {
- trigger_error('NO_FEED');
- }
-
- // Make sure we can read this forum
- if (!$auth->acl_get('f_read', $this->forum_id))
- {
- trigger_error('SORRY_AUTH_READ');
- }
-
- // Make sure forum is not passworded or user is authed
- if ($this->topic_data['forum_password'])
- {
- $forum_ids_passworded = $this->get_passworded_forums();
-
- if (isset($forum_ids_passworded[$this->forum_id]))
- {
- trigger_error('SORRY_AUTH_READ');
- }
-
- unset($forum_ids_passworded);
- }
- }
- }
-
- function get_sql()
- {
- global $auth, $db;
-
- $this->sql = array(
- 'SELECT' => 'p.post_id, p.post_time, p.post_edit_time, p.post_approved, p.post_subject, p.post_text, p.bbcode_bitfield, p.bbcode_uid, p.enable_bbcode, p.enable_smilies, p.enable_magic_url, p.post_attachment, ' .
- 'u.username, u.user_id',
- 'FROM' => array(
- POSTS_TABLE => 'p',
- USERS_TABLE => 'u',
- ),
- 'WHERE' => 'p.topic_id = ' . $this->topic_id . '
- ' . ($this->forum_id && !$auth->acl_get('m_approve', $this->forum_id) ? 'AND p.post_approved = 1' : '') . '
- AND p.poster_id = u.user_id',
- 'ORDER_BY' => 'p.post_time DESC',
- );
-
- return true;
- }
-
- function get_item()
- {
- return ($row = parent::get_item()) ? array_merge($this->topic_data, $row) : $row;
- }
-}
-
-/**
-* 'All Forums' feed
-*
-* This will give you a list of all postable forums where feeds are enabled
-* including forum description, topic stats and post stats
-*
-* @package phpBB3
-*/
-class phpbb_feed_forums extends phpbb_feed_base
-{
- var $num_items = 0;
-
- function set_keys()
- {
- $this->set('title', 'forum_name');
- $this->set('text', 'forum_desc');
- $this->set('bitfield', 'forum_desc_bitfield');
- $this->set('bbcode_uid','forum_desc_uid');
- $this->set('updated', 'forum_last_post_time');
- $this->set('options', 'forum_desc_options');
- }
-
- function get_sql()
- {
- global $auth, $db;
-
- $in_fid_ary = array_diff($this->get_readable_forums(), $this->get_excluded_forums());
- if (empty($in_fid_ary))
- {
- return false;
- }
-
- // Build SQL Query
- $this->sql = array(
- 'SELECT' => 'f.forum_id, f.left_id, f.forum_name, f.forum_last_post_time,
- f.forum_desc, f.forum_desc_bitfield, f.forum_desc_uid, f.forum_desc_options,
- f.forum_topics, f.forum_posts',
- 'FROM' => array(FORUMS_TABLE => 'f'),
- 'WHERE' => 'f.forum_type = ' . FORUM_POST . '
- AND ' . $db->sql_in_set('f.forum_id', $in_fid_ary),
- 'ORDER_BY' => 'f.left_id ASC',
- );
-
- return true;
- }
-
- function adjust_item(&$item_row, &$row)
- {
- global $phpEx, $config;
-
- $item_row['link'] = feed_append_sid('/viewforum.' . $phpEx, 'f=' . $row['forum_id']);
-
- if ($config['feed_item_statistics'])
- {
- global $user;
-
- $item_row['statistics'] = sprintf($user->lang['TOTAL_TOPICS_OTHER'], $row['forum_topics'])
- . ' ' . $this->separator_stats . ' ' . sprintf($user->lang['TOTAL_POSTS_OTHER'], $row['forum_posts']);
- }
- }
-}
-
-/**
-* News feed
-*
-* This will give you {$this->num_items} first posts
-* of all topics in the selected news forums.
-*
-* @package phpBB3
-*/
-class phpbb_feed_news extends phpbb_feed_topic_base
-{
- function get_news_forums()
- {
- global $db, $cache;
- static $forum_ids;
-
- // Matches acp/acp_board.php
- $cache_name = 'feed_news_forum_ids';
-
- if (!isset($forum_ids) && ($forum_ids = $cache->get('_' . $cache_name)) === false)
- {
- $sql = 'SELECT forum_id
- FROM ' . FORUMS_TABLE . '
- WHERE ' . $db->sql_bit_and('forum_options', FORUM_OPTION_FEED_NEWS, '<> 0');
- $result = $db->sql_query($sql);
-
- $forum_ids = array();
- while ($forum_id = (int) $db->sql_fetchfield('forum_id'))
- {
- $forum_ids[$forum_id] = $forum_id;
- }
- $db->sql_freeresult($result);
-
- $cache->put('_' . $cache_name, $forum_ids);
- }
-
- return $forum_ids;
- }
-
- function get_sql()
- {
- global $auth, $config, $db;
-
- // Determine forum ids
- $in_fid_ary = array_intersect($this->get_news_forums(), $this->get_readable_forums());
- if (empty($in_fid_ary))
- {
- return false;
- }
-
- $in_fid_ary = array_diff($in_fid_ary, $this->get_passworded_forums());
- if (empty($in_fid_ary))
- {
- return false;
- }
-
- // Add global forum
- $in_fid_ary[] = 0;
-
- // We really have to get the post ids first!
- $sql = 'SELECT topic_first_post_id, topic_time
- FROM ' . TOPICS_TABLE . '
- WHERE ' . $db->sql_in_set('forum_id', $in_fid_ary) . '
- AND topic_moved_id = 0
- AND topic_approved = 1
- ORDER BY topic_time DESC';
- $result = $db->sql_query_limit($sql, $this->num_items);
-
- $post_ids = array();
- while ($row = $db->sql_fetchrow($result))
- {
- $post_ids[] = (int) $row['topic_first_post_id'];
- }
- $db->sql_freeresult($result);
-
- if (empty($post_ids))
- {
- return false;
- }
-
- $this->sql = array(
- 'SELECT' => 'f.forum_id, f.forum_name,
- t.topic_id, t.topic_title, t.topic_poster, t.topic_first_poster_name, t.topic_replies, t.topic_replies_real, t.topic_views, t.topic_time, t.topic_last_post_time,
- p.post_id, p.post_time, p.post_edit_time, p.post_text, p.bbcode_bitfield, p.bbcode_uid, p.enable_bbcode, p.enable_smilies, p.enable_magic_url, p.post_attachment',
- 'FROM' => array(
- TOPICS_TABLE => 't',
- POSTS_TABLE => 'p',
- ),
- 'LEFT_JOIN' => array(
- array(
- 'FROM' => array(FORUMS_TABLE => 'f'),
- 'ON' => 'p.forum_id = f.forum_id',
- ),
- ),
- 'WHERE' => 'p.topic_id = t.topic_id
- AND ' . $db->sql_in_set('p.post_id', $post_ids),
- 'ORDER_BY' => 'p.post_time DESC',
- );
-
- return true;
- }
-}
-
-/**
-* New Topics feed
-*
-* This will give you the last {$this->num_items} created topics
-* including the first post.
-*
-* @package phpBB3
-*/
-class phpbb_feed_topics extends phpbb_feed_topic_base
-{
- function get_sql()
- {
- global $db, $config;
-
- $forum_ids_read = $this->get_readable_forums();
- if (empty($forum_ids_read))
- {
- return false;
- }
-
- $in_fid_ary = array_diff($forum_ids_read, $this->get_excluded_forums(), $this->get_passworded_forums());
- if (empty($in_fid_ary))
- {
- return false;
- }
-
- // Add global forum
- $in_fid_ary[] = 0;
-
- // We really have to get the post ids first!
- $sql = 'SELECT topic_first_post_id, topic_time
- FROM ' . TOPICS_TABLE . '
- WHERE ' . $db->sql_in_set('forum_id', $in_fid_ary) . '
- AND topic_moved_id = 0
- AND topic_approved = 1
- ORDER BY topic_time DESC';
- $result = $db->sql_query_limit($sql, $this->num_items);
-
- $post_ids = array();
- while ($row = $db->sql_fetchrow($result))
- {
- $post_ids[] = (int) $row['topic_first_post_id'];
- }
- $db->sql_freeresult($result);
-
- if (empty($post_ids))
- {
- return false;
- }
-
- $this->sql = array(
- 'SELECT' => 'f.forum_id, f.forum_name,
- t.topic_id, t.topic_title, t.topic_poster, t.topic_first_poster_name, t.topic_replies, t.topic_replies_real, t.topic_views, t.topic_time, t.topic_last_post_time,
- p.post_id, p.post_time, p.post_edit_time, p.post_text, p.bbcode_bitfield, p.bbcode_uid, p.enable_bbcode, p.enable_smilies, p.enable_magic_url, p.post_attachment',
- 'FROM' => array(
- TOPICS_TABLE => 't',
- POSTS_TABLE => 'p',
- ),
- 'LEFT_JOIN' => array(
- array(
- 'FROM' => array(FORUMS_TABLE => 'f'),
- 'ON' => 'p.forum_id = f.forum_id',
- ),
- ),
- 'WHERE' => 'p.topic_id = t.topic_id
- AND ' . $db->sql_in_set('p.post_id', $post_ids),
- 'ORDER_BY' => 'p.post_time DESC',
- );
-
- return true;
- }
-
- function adjust_item(&$item_row, &$row)
- {
- parent::adjust_item($item_row, $row);
-
- $item_row['title'] = (isset($row['forum_name']) && $row['forum_name'] !== '') ? $row['forum_name'] . ' ' . $this->separator . ' ' . $item_row['title'] : $item_row['title'];
- }
-}
-
-/**
-* Active Topics feed
-*
-* This will give you the last {$this->num_items} topics
-* with replies made withing the last {$this->sort_days} days
-* including the last post.
-*
-* @package phpBB3
-*/
-class phpbb_feed_topics_active extends phpbb_feed_topic_base
-{
- var $sort_days = 7;
-
- function set_keys()
- {
- parent::set_keys();
-
- $this->set('author_id', 'topic_last_poster_id');
- $this->set('creator', 'topic_last_poster_name');
- }
-
- function get_sql()
- {
- global $db, $config;
-
- $forum_ids_read = $this->get_readable_forums();
- if (empty($forum_ids_read))
- {
- return false;
- }
-
- $in_fid_ary = array_intersect($forum_ids_read, $this->get_forum_ids());
- $in_fid_ary = array_diff($in_fid_ary, $this->get_passworded_forums());
- if (empty($in_fid_ary))
- {
- return false;
- }
-
- // Add global forum
- $in_fid_ary[] = 0;
-
- // Search for topics in last X days
- $last_post_time_sql = ($this->sort_days) ? ' AND topic_last_post_time > ' . (time() - ($this->sort_days * 24 * 3600)) : '';
-
- // We really have to get the post ids first!
- $sql = 'SELECT topic_last_post_id, topic_last_post_time
- FROM ' . TOPICS_TABLE . '
- WHERE ' . $db->sql_in_set('forum_id', $in_fid_ary) . '
- AND topic_moved_id = 0
- AND topic_approved = 1
- ' . $last_post_time_sql . '
- ORDER BY topic_last_post_time DESC';
- $result = $db->sql_query_limit($sql, $this->num_items);
-
- $post_ids = array();
- while ($row = $db->sql_fetchrow($result))
- {
- $post_ids[] = (int) $row['topic_last_post_id'];
- }
- $db->sql_freeresult($result);
-
- if (empty($post_ids))
- {
- return false;
- }
-
- $this->sql = array(
- 'SELECT' => 'f.forum_id, f.forum_name,
- t.topic_id, t.topic_title, t.topic_replies, t.topic_replies_real, t.topic_views,
- t.topic_last_poster_id, t.topic_last_poster_name, t.topic_last_post_time,
- p.post_id, p.post_time, p.post_edit_time, p.post_text, p.bbcode_bitfield, p.bbcode_uid, p.enable_bbcode, p.enable_smilies, p.enable_magic_url, p.post_attachment',
- 'FROM' => array(
- TOPICS_TABLE => 't',
- POSTS_TABLE => 'p',
- ),
- 'LEFT_JOIN' => array(
- array(
- 'FROM' => array(FORUMS_TABLE => 'f'),
- 'ON' => 'p.forum_id = f.forum_id',
- ),
- ),
- 'WHERE' => 'p.topic_id = t.topic_id
- AND ' . $db->sql_in_set('p.post_id', $post_ids),
- 'ORDER_BY' => 'p.post_time DESC',
- );
-
- return true;
- }
-
- function get_forum_ids()
- {
- global $db, $cache;
- static $forum_ids;
-
- $cache_name = 'feed_topic_active_forum_ids';
-
- if (!isset($forum_ids) && ($forum_ids = $cache->get('_' . $cache_name)) === false)
- {
- $sql = 'SELECT forum_id
- FROM ' . FORUMS_TABLE . '
- WHERE forum_type = ' . FORUM_POST . '
- AND ' . $db->sql_bit_and('forum_options', FORUM_OPTION_FEED_EXCLUDE, '= 0') . '
- AND ' . $db->sql_bit_and('forum_flags', log(FORUM_FLAG_ACTIVE_TOPICS, 2), '<> 0');
- $result = $db->sql_query($sql);
-
- $forum_ids = array();
- while ($forum_id = (int) $db->sql_fetchfield('forum_id'))
- {
- $forum_ids[$forum_id] = $forum_id;
- }
- $db->sql_freeresult($result);
-
- $cache->put('_' . $cache_name, $forum_ids, 180);
- }
-
- return $forum_ids;
- }
-
- function adjust_item(&$item_row, &$row)
- {
- parent::adjust_item($item_row, $row);
-
- $item_row['title'] = (isset($row['forum_name']) && $row['forum_name'] !== '') ? $row['forum_name'] . ' ' . $this->separator . ' ' . $item_row['title'] : $item_row['title'];
- }
-}
-
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/acp/acp_attachments.php b/phpBB/includes/acp/acp_attachments.php
index fc5f44e14f..958a6456c2 100644
--- a/phpBB/includes/acp/acp_attachments.php
+++ b/phpBB/includes/acp/acp_attachments.php
@@ -2,9 +2,8 @@
/**
*
* @package acp
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -21,14 +20,37 @@ if (!defined('IN_PHPBB'))
*/
class acp_attachments
{
- var $u_action;
- var $new_config;
+ /** @var \phpbb\db\driver\driver */
+ protected $db;
+
+ /** @var \phpbb\config\config */
+ protected $config;
+
+ /** @var ContainerBuilder */
+ protected $phpbb_container;
+
+ /** @var \phpbb\template\template */
+ protected $template;
+
+ /** @var \phpbb\user */
+ protected $user;
+
+ public $id;
+ public $u_action;
+ protected $new_config;
function main($id, $mode)
{
- global $db, $user, $auth, $template, $cache;
+ global $db, $user, $auth, $template, $cache, $phpbb_container;
global $config, $phpbb_admin_path, $phpbb_root_path, $phpEx;
+ $this->id = $id;
+ $this->db = $db;
+ $this->config = $config;
+ $this->template = $template;
+ $this->user = $user;
+ $this->phpbb_container = $phpbb_container;
+
$user->add_lang(array('posting', 'viewtopic', 'acp/attachments'));
$error = $notify = array();
@@ -61,6 +83,10 @@ class acp_attachments
$l_title = 'ACP_ORPHAN_ATTACHMENTS';
break;
+ case 'manage':
+ $l_title = 'ACP_MANAGE_ATTACHMENTS';
+ break;
+
default:
trigger_error('NO_MODE', E_USER_ERROR);
break;
@@ -95,7 +121,7 @@ class acp_attachments
}
$db->sql_freeresult($result);
- $l_legend_cat_images = $user->lang['SETTINGS_CAT_IMAGES'] . ' [' . $user->lang['ASSIGNED_GROUP'] . ': ' . ((!empty($s_assigned_groups[ATTACHMENT_CATEGORY_IMAGE])) ? implode(', ', $s_assigned_groups[ATTACHMENT_CATEGORY_IMAGE]) : $user->lang['NO_EXT_GROUP']) . ']';
+ $l_legend_cat_images = $user->lang['SETTINGS_CAT_IMAGES'] . ' [' . $user->lang['ASSIGNED_GROUP'] . ': ' . ((!empty($s_assigned_groups[ATTACHMENT_CATEGORY_IMAGE])) ? implode($user->lang['COMMA_SEPARATOR'], $s_assigned_groups[ATTACHMENT_CATEGORY_IMAGE]) : $user->lang['NO_EXT_GROUP']) . ']';
$display_vars = array(
'title' => 'ACP_ATTACHMENT_SETTINGS',
@@ -114,8 +140,8 @@ class acp_attachments
'attachment_quota' => array('lang' => 'ATTACH_QUOTA', 'validate' => 'string', 'type' => 'custom', 'method' => 'max_filesize', 'explain' => true),
'max_filesize' => array('lang' => 'ATTACH_MAX_FILESIZE', 'validate' => 'string', 'type' => 'custom', 'method' => 'max_filesize', 'explain' => true),
'max_filesize_pm' => array('lang' => 'ATTACH_MAX_PM_FILESIZE','validate' => 'string', 'type' => 'custom', 'method' => 'max_filesize', 'explain' => true),
- 'max_attachments' => array('lang' => 'MAX_ATTACHMENTS', 'validate' => 'int', 'type' => 'text:3:3', 'explain' => false),
- 'max_attachments_pm' => array('lang' => 'MAX_ATTACHMENTS_PM', 'validate' => 'int', 'type' => 'text:3:3', 'explain' => false),
+ 'max_attachments' => array('lang' => 'MAX_ATTACHMENTS', 'validate' => 'int:0:999', 'type' => 'number:0:999', 'explain' => false),
+ 'max_attachments_pm' => array('lang' => 'MAX_ATTACHMENTS_PM', 'validate' => 'int:0:999', 'type' => 'number:0:999', 'explain' => false),
'secure_downloads' => array('lang' => 'SECURE_DOWNLOADS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'secure_allow_deny' => array('lang' => 'SECURE_ALLOW_DENY', 'validate' => 'int', 'type' => 'custom', 'method' => 'select_allow_deny', 'explain' => true),
'secure_allow_empty_referer' => array('lang' => 'SECURE_EMPTY_REFERRER', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
@@ -125,11 +151,11 @@ class acp_attachments
'legend2' => $l_legend_cat_images,
'img_display_inlined' => array('lang' => 'DISPLAY_INLINED', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'img_create_thumbnail' => array('lang' => 'CREATE_THUMBNAIL', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
- 'img_max_thumb_width' => array('lang' => 'MAX_THUMB_WIDTH', 'validate' => 'int', 'type' => 'text:7:15', 'explain' => true, 'append' => ' ' . $user->lang['PIXEL']),
- 'img_min_thumb_filesize' => array('lang' => 'MIN_THUMB_FILESIZE', 'validate' => 'int', 'type' => 'text:7:15', 'explain' => true, 'append' => ' ' . $user->lang['BYTES']),
+ 'img_max_thumb_width' => array('lang' => 'MAX_THUMB_WIDTH', 'validate' => 'int:0:999999999999999', 'type' => 'number:0:999999999999999', 'explain' => true, 'append' => ' ' . $user->lang['PIXEL']),
+ 'img_min_thumb_filesize' => array('lang' => 'MIN_THUMB_FILESIZE', 'validate' => 'int:0:999999999999999', 'type' => 'number:0:999999999999999', 'explain' => true, 'append' => ' ' . $user->lang['BYTES']),
'img_imagick' => array('lang' => 'IMAGICK_PATH', 'validate' => 'string', 'type' => 'text:20:200', 'explain' => true, 'append' => '&nbsp;&nbsp;<span>[ <a href="' . $this->u_action . '&amp;action=imgmagick">' . $user->lang['SEARCH_IMAGICK'] . '</a> ]</span>'),
- 'img_max' => array('lang' => 'MAX_IMAGE_SIZE', 'validate' => 'int', 'type' => 'dimension:3:4', 'explain' => true, 'append' => ' ' . $user->lang['PIXEL']),
- 'img_link' => array('lang' => 'IMAGE_LINK_SIZE', 'validate' => 'int', 'type' => 'dimension:3:4', 'explain' => true, 'append' => ' ' . $user->lang['PIXEL']),
+ 'img_max' => array('lang' => 'MAX_IMAGE_SIZE', 'validate' => 'int:0:9999', 'type' => 'dimension:0:9999', 'explain' => true, 'append' => ' ' . $user->lang['PIXEL']),
+ 'img_link' => array('lang' => 'IMAGE_LINK_SIZE', 'validate' => 'int:0:9999', 'type' => 'dimension:0:9999', 'explain' => true, 'append' => ' ' . $user->lang['PIXEL']),
)
);
@@ -745,7 +771,6 @@ class acp_attachments
}
$template->assign_vars(array(
- 'PHPBB_ROOT_PATH' => $phpbb_root_path,
'IMG_PATH' => $img_path,
'ACTION' => $action,
'GROUP_ID' => $group_id,
@@ -914,7 +939,7 @@ class acp_attachments
$db->sql_query($sql);
add_log('admin', 'LOG_ATTACH_ORPHAN_DEL', implode(', ', $delete_files));
- $notify[] = sprintf($user->lang['LOG_ATTACH_ORPHAN_DEL'], implode(', ', $delete_files));
+ $notify[] = sprintf($user->lang['LOG_ATTACH_ORPHAN_DEL'], implode($user->lang['COMMA_SEPARATOR'], $delete_files));
}
$upload_list = array();
@@ -1043,6 +1068,186 @@ class acp_attachments
$db->sql_freeresult($result);
break;
+
+ case 'manage':
+
+ if ($submit)
+ {
+ $delete_files = (isset($_POST['delete'])) ? array_keys(request_var('delete', array('' => 0))) : array();
+
+ if (sizeof($delete_files))
+ {
+ // Select those attachments we want to delete...
+ $sql = 'SELECT real_filename
+ FROM ' . ATTACHMENTS_TABLE . '
+ WHERE ' . $db->sql_in_set('attach_id', $delete_files) . '
+ AND is_orphan = 0';
+ $result = $db->sql_query($sql);
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $deleted_filenames[] = $row['real_filename'];
+ }
+ $db->sql_freeresult($result);
+
+ if ($num_deleted = delete_attachments('attach', $delete_files))
+ {
+ if (sizeof($delete_files) != $num_deleted)
+ {
+ $error[] = $user->lang['FILES_GONE'];
+ }
+ add_log('admin', 'LOG_ATTACHMENTS_DELETED', implode(', ', $deleted_filenames));
+ $notify[] = sprintf($user->lang['LOG_ATTACHMENTS_DELETED'], implode($user->lang['COMMA_SEPARATOR'], $deleted_filenames));
+ }
+ else
+ {
+ $error[] = $user->lang['NO_FILES_TO_DELETE'];
+ }
+ }
+ }
+
+ if ($action == 'stats')
+ {
+ $this->handle_stats_resync();
+ }
+
+ $stats_error = $this->check_stats_accuracy();
+
+ if ($stats_error)
+ {
+ $error[] = $stats_error;
+
+ // Show option to resync stats
+ $this->template->assign_vars(array(
+ 'S_ACTION_OPTIONS' => $auth->acl_get('a_board'),
+ ));
+ }
+
+ $template->assign_vars(array(
+ 'S_MANAGE' => true,
+ ));
+
+ $start = request_var('start', 0);
+
+ // Sort keys
+ $sort_days = request_var('st', 0);
+ $sort_key = request_var('sk', 't');
+ $sort_dir = request_var('sd', 'd');
+
+ // Sorting
+ $limit_days = array(0 => $user->lang['ALL_ENTRIES'], 1 => $user->lang['1_DAY'], 7 => $user->lang['7_DAYS'], 14 => $user->lang['2_WEEKS'], 30 => $user->lang['1_MONTH'], 90 => $user->lang['3_MONTHS'], 180 => $user->lang['6_MONTHS'], 365 => $user->lang['1_YEAR']);
+ $sort_by_text = array('f' => $user->lang['FILENAME'], 't' => $user->lang['FILEDATE'], 's' => $user->lang['FILESIZE'], 'x' => $user->lang['EXTENSION'], 'd' => $user->lang['DOWNLOADS'],'p' => $user->lang['ATTACH_POST_TYPE'], 'u' => $user->lang['AUTHOR']);
+ $sort_by_sql = array('f' => 'a.real_filename', 't' => 'a.filetime', 's' => 'a.filesize', 'x' => 'a.extension', 'd' => 'a.download_count', 'p' => 'a.in_message', 'u' => 'u.username');
+
+ $s_limit_days = $s_sort_key = $s_sort_dir = $u_sort_param = '';
+ gen_sort_selects($limit_days, $sort_by_text, $sort_days, $sort_key, $sort_dir, $s_limit_days, $s_sort_key, $s_sort_dir, $u_sort_param);
+
+ $min_filetime = ($sort_days) ? (time() - ($sort_days * 86400)) : '';
+ $limit_filetime = ($min_filetime) ? " AND a.filetime >= $min_filetime " : '';
+ $start = ($sort_days && isset($_POST['sort'])) ? 0 : $start;
+
+ $attachments_per_page = (int) $config['topics_per_page'];
+
+ $stats = $this->get_attachment_stats($limit_filetime);
+ $num_files = $stats['num_files'];
+ $total_size = $stats['upload_dir_size'];
+
+ // Make sure $start is set to the last page if it exceeds the amount
+ $pagination = $phpbb_container->get('pagination');
+ $start = $pagination->validate_start($start, $attachments_per_page, $num_files);
+
+ // If the user is trying to reach the second half of the attachments list, fetch it starting from the end
+ $store_reverse = false;
+ $sql_limit = $attachments_per_page;
+
+ if ($start > $num_files / 2)
+ {
+ $store_reverse = true;
+
+ // Select the sort order. Add time sort anchor for non-time sorting cases
+ $sql_sort_anchor = ($sort_key != 't') ? ', a.filetime ' . (($sort_dir == 'd') ? 'ASC' : 'DESC') : '';
+ $sql_sort_order = $sort_by_sql[$sort_key] . ' ' . (($sort_dir == 'd') ? 'ASC' : 'DESC') . $sql_sort_anchor;
+ $sql_limit = $pagination->reverse_limit($start, $sql_limit, $num_files);
+ $sql_start = $pagination->reverse_start($start, $sql_limit, $num_files);
+ }
+ else
+ {
+ // Select the sort order. Add time sort anchor for non-time sorting cases
+ $sql_sort_anchor = ($sort_key != 't') ? ', a.filetime ' . (($sort_dir == 'd') ? 'DESC' : 'ASC') : '';
+ $sql_sort_order = $sort_by_sql[$sort_key] . ' ' . (($sort_dir == 'd') ? 'DESC' : 'ASC') . $sql_sort_anchor;
+ $sql_start = $start;
+ }
+
+ $attachments_list = array();
+
+ // Just get the files
+ $sql = 'SELECT a.*, u.username, u.user_colour, t.topic_title
+ FROM ' . ATTACHMENTS_TABLE . ' a
+ LEFT JOIN ' . USERS_TABLE . ' u ON (u.user_id = a.poster_id)
+ LEFT JOIN ' . TOPICS_TABLE . " t ON (a.topic_id = t.topic_id)
+ WHERE a.is_orphan = 0
+ $limit_filetime
+ ORDER BY $sql_sort_order";
+ $result = $db->sql_query_limit($sql, $sql_limit, $sql_start);
+
+ $i = ($store_reverse) ? $sql_limit - 1 : 0;
+
+ // Store increment value in a variable to save some conditional calls
+ $i_increment = ($store_reverse) ? -1 : 1;
+ while ($attachment_row = $db->sql_fetchrow($result))
+ {
+ $attachments_list[$i] = $attachment_row;
+ $i = $i + $i_increment;
+ }
+ $db->sql_freeresult($result);
+
+ $base_url = $this->u_action . "&amp;$u_sort_param";
+ $pagination->generate_template_pagination($base_url, 'pagination', 'start', $num_files, $attachments_per_page, $start);
+
+ $template->assign_vars(array(
+ 'TOTAL_FILES' => $num_files,
+ 'TOTAL_SIZE' => get_formatted_filesize($total_size),
+
+ 'S_LIMIT_DAYS' => $s_limit_days,
+ 'S_SORT_KEY' => $s_sort_key,
+ 'S_SORT_DIR' => $s_sort_dir)
+ );
+
+ // Grab extensions
+ $extensions = $cache->obtain_attach_extensions(true);
+
+ for ($i = 0, $end = sizeof($attachments_list); $i < $end; ++$i)
+ {
+ $row = $attachments_list[$i];
+
+ $row['extension'] = strtolower(trim((string) $row['extension']));
+ $comment = ($row['attach_comment'] && !$row['in_message']) ? str_replace(array("\n", "\r"), array('<br />', "\n"), $row['attach_comment']) : '';
+ $display_cat = $extensions[$row['extension']]['display_cat'];
+ $l_downloaded_viewed = ($display_cat == ATTACHMENT_CATEGORY_NONE) ? 'DOWNLOAD_COUNTS' : 'VIEWED_COUNTS';
+
+ $template->assign_block_vars('attachments', array(
+ 'ATTACHMENT_POSTER' => get_username_string('full', (int) $row['poster_id'], (string) $row['username'], (string) $row['user_colour'], (string) $row['username']),
+ 'FILESIZE' => get_formatted_filesize((int) $row['filesize']),
+ 'FILETIME' => $user->format_date((int) $row['filetime']),
+ 'REAL_FILENAME' => (!$row['in_message']) ? utf8_wordwrap(utf8_basename((string) $row['real_filename']), 40, '<br />', true) : '',
+ 'PHYSICAL_FILENAME' => utf8_basename((string) $row['physical_filename']),
+ 'EXT_GROUP_NAME' => (!empty($extensions[$row['extension']]['group_name'])) ? $user->lang['EXT_GROUP_' . $extensions[$row['extension']]['group_name']] : '',
+ 'COMMENT' => $comment,
+ 'TOPIC_TITLE' => (!$row['in_message']) ? (string) $row['topic_title'] : '',
+ 'ATTACH_ID' => (int) $row['attach_id'],
+ 'POST_ID' => (int) $row['post_msg_id'],
+ 'TOPIC_ID' => (int) $row['topic_id'],
+ 'POST_IDS' => (!empty($post_ids[$row['attach_id']])) ? (int) $post_ids[$row['attach_id']] : '',
+
+ 'L_DOWNLOAD_COUNT' => $user->lang($l_downloaded_viewed, (int) $row['download_count']),
+
+ 'S_IN_MESSAGE' => (bool) $row['in_message'],
+
+ 'U_VIEW_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "t={$row['topic_id']}&amp;p={$row['post_msg_id']}") . "#p{$row['post_msg_id']}",
+ 'U_FILE' => append_sid($phpbb_root_path . 'download/file.' . $phpEx, 'mode=view&amp;id=' . $row['attach_id']))
+ );
+ }
+
+ break;
}
if (sizeof($error))
@@ -1063,6 +1268,89 @@ class acp_attachments
}
/**
+ * Get attachment file count and size of upload directory
+ *
+ * @param $limit string Additional limit for WHERE clause to filter stats by.
+ * @return array Returns array with stats: num_files and upload_dir_size
+ */
+ public function get_attachment_stats($limit = '')
+ {
+ $sql = 'SELECT COUNT(a.attach_id) AS num_files, SUM(a.filesize) AS upload_dir_size
+ FROM ' . ATTACHMENTS_TABLE . " a
+ WHERE a.is_orphan = 0
+ $limit";
+ $result = $this->db->sql_query($sql);
+ $row = $this->db->sql_fetchrow($result);
+ $this->db->sql_freeresult($result);
+
+ return array(
+ 'num_files' => (int) $row['num_files'],
+ 'upload_dir_size' => (float) $row['upload_dir_size'],
+ );
+ }
+
+ /**
+ * Set config attachment stat values
+ *
+ * @param $stats array Array of config key => value pairs to set.
+ * @return null
+ */
+ public function set_attachment_stats($stats)
+ {
+ foreach ($stats as $key => $value)
+ {
+ $this->config->set($key, $value, true);
+ }
+ }
+
+ /**
+ * Check accuracy of attachment statistics.
+ *
+ * @param $resync bool Resync stats if they're incorrect.
+ * @return bool|string Returns false if stats are correct or error message
+ * otherwise.
+ */
+ public function check_stats_accuracy()
+ {
+ // Get fresh stats.
+ $stats = $this->get_attachment_stats();
+
+ // Get current files stats
+ $num_files = (int) $this->config['num_files'];
+ $total_size = (float) $this->config['upload_dir_size'];
+
+ if (($num_files != $stats['num_files']) || ($total_size != $stats['upload_dir_size']))
+ {
+ return $this->user->lang('FILES_STATS_WRONG', (int) $stats['num_files'], get_formatted_filesize($stats['upload_dir_size']));
+ }
+ return false;
+ }
+
+ /**
+ * Handle stats resync.
+ *
+ * @return null
+ */
+ public function handle_stats_resync()
+ {
+ if (!confirm_box(true))
+ {
+ confirm_box(false, $this->user->lang['RESYNC_FILES_STATS_CONFIRM'], build_hidden_fields(array(
+ 'i' => $this->id,
+ 'mode' => 'manage',
+ 'action' => 'stats',
+ )));
+ }
+ else
+ {
+ $this->set_attachment_stats($this->get_attachment_stats());
+ $log = $this->phpbb_container->get('log');
+ $log->add('admin', $this->user->data['user_id'], $this->user->ip, 'LOG_RESYNC_FILES_STATS');
+ }
+
+ }
+
+ /**
* Build Select for category items
*/
function category_select($select_name, $group_id = false, $key = '')
@@ -1235,6 +1523,7 @@ class acp_attachments
function perform_site_list()
{
global $db, $user;
+ global $request;
if (isset($_REQUEST['securesubmit']))
{
@@ -1243,7 +1532,7 @@ class acp_attachments
$ip_list = array_unique(explode("\n", $ips));
$ip_list_log = implode(', ', $ip_list);
- $ip_exclude = (!empty($_POST['ipexclude'])) ? 1 : 0;
+ $ip_exclude = (int) $request->variable('ipexclude', false, false, \phpbb\request\request_interface::POST);
$iplist = array();
$hostlist = array();
@@ -1441,7 +1730,8 @@ class acp_attachments
$size_var = $filesize['si_identifier'];
$value = $filesize['value'];
- return '<input type="text" id="' . $key . '" size="8" maxlength="15" name="config[' . $key . ']" value="' . $value . '" /> <select name="' . $key . '">' . size_select_options($size_var) . '</select>';
+ // size="8" and maxlength="15" attributes as a fallback for browsers that do not support type="number" yet.
+ return '<input type="number" id="' . $key . '" size="8" maxlength="15" min="0" name="config[' . $key . ']" value="' . $value . '" /> <select name="' . $key . '">' . size_select_options($size_var) . '</select>';
}
/**
@@ -1455,5 +1745,3 @@ class acp_attachments
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/acp/acp_ban.php b/phpBB/includes/acp/acp_ban.php
index f8af1b86e1..3ed9c225f5 100644
--- a/phpBB/includes/acp/acp_ban.php
+++ b/phpBB/includes/acp/acp_ban.php
@@ -2,9 +2,8 @@
/**
*
* @package acp
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -98,7 +97,7 @@ class acp_ban
break;
}
- $this->display_ban_options($mode);
+ self::display_ban_options($mode);
$template->assign_vars(array(
'L_TITLE' => $this->page_title,
@@ -119,7 +118,7 @@ class acp_ban
/**
* Display ban options
*/
- function display_ban_options($mode)
+ static public function display_ban_options($mode)
{
global $user, $db, $template;
@@ -272,5 +271,3 @@ class acp_ban
));
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/acp/acp_bbcodes.php b/phpBB/includes/acp/acp_bbcodes.php
index 31166a56dc..84382b6276 100644
--- a/phpBB/includes/acp/acp_bbcodes.php
+++ b/phpBB/includes/acp/acp_bbcodes.php
@@ -2,9 +2,8 @@
/**
*
* @package acp
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -25,7 +24,7 @@ class acp_bbcodes
function main($id, $mode)
{
- global $db, $user, $auth, $template, $cache;
+ global $db, $user, $auth, $template, $cache, $request, $phpbb_dispatcher;
global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;
$user->add_lang('acp/posting');
@@ -97,7 +96,7 @@ class acp_bbcodes
case 'edit':
case 'add':
- $template->assign_vars(array(
+ $tpl_ary = array(
'S_EDIT_BBCODE' => true,
'U_BACK' => $this->u_action,
'U_ACTION' => $this->u_action . '&amp;action=' . (($action == 'add') ? 'create' : 'modify') . (($bbcode_id) ? "&amp;bbcode=$bbcode_id" : ''),
@@ -106,14 +105,32 @@ class acp_bbcodes
'BBCODE_MATCH' => $bbcode_match,
'BBCODE_TPL' => $bbcode_tpl,
'BBCODE_HELPLINE' => $bbcode_helpline,
- 'DISPLAY_ON_POSTING' => $display_on_posting)
+ 'DISPLAY_ON_POSTING' => $display_on_posting,
);
- foreach ($user->lang['tokens'] as $token => $token_explain)
+ $bbcode_tokens = array('TEXT', 'SIMPLETEXT', 'INTTEXT', 'IDENTIFIER', 'NUMBER', 'EMAIL', 'URL', 'LOCAL_URL', 'RELATIVE_URL', 'COLOR');
+
+ /**
+ * Modify custom bbcode template data before we display the add/edit form
+ *
+ * @event core.acp_bbcodes_edit_add
+ * @var string action Type of the action: add|edit
+ * @var array tpl_ary Array with custom bbcode add/edit data
+ * @var int bbcode_id When editing: the bbcode id,
+ * when creating: 0
+ * @var array bbcode_tokens Array of bbcode tokens
+ * @since 3.1.0-a3
+ */
+ $vars = array('action', 'tpl_ary', 'bbcode_id', 'bbcode_tokens');
+ extract($phpbb_dispatcher->trigger_event('core.acp_bbcodes_edit_add', compact($vars)));
+
+ $template->assign_vars($tpl_ary);
+
+ foreach ($bbcode_tokens as $token)
{
$template->assign_block_vars('token', array(
'TOKEN' => '{' . $token . '}',
- 'EXPLAIN' => ($token === 'LOCAL_URL') ? sprintf($token_explain, generate_board_url() . '/') : $token_explain,
+ 'EXPLAIN' => ($token === 'LOCAL_URL') ? $user->lang(array('tokens', $token), generate_board_url() . '/') : $user->lang(array('tokens', $token)),
));
}
@@ -124,6 +141,27 @@ class acp_bbcodes
case 'modify':
case 'create':
+ $sql_ary = $hidden_fields = array();
+
+ /**
+ * Modify custom bbcode data before the modify/create action
+ *
+ * @event core.acp_bbcodes_modify_create
+ * @var string action Type of the action: modify|create
+ * @var array sql_ary Array with new bbcode data
+ * @var int bbcode_id When editing: the bbcode id,
+ * when creating: 0
+ * @var bool display_on_posting Display bbcode on posting form
+ * @var string bbcode_match The bbcode usage string to match
+ * @var string bbcode_tpl The bbcode HTML replacement string
+ * @var string bbcode_helpline The bbcode help line string
+ * @var array hidden_fields Array of hidden fields for use when
+ * submitting form when $warn_text is true
+ * @since 3.1.0-a3
+ */
+ $vars = array('action', 'sql_ary', 'bbcode_id', 'display_on_posting', 'bbcode_match', 'bbcode_tpl', 'bbcode_helpline', 'hidden_fields');
+ extract($phpbb_dispatcher->trigger_event('core.acp_bbcodes_modify_create', compact($vars)));
+
$warn_text = preg_match('%<[^>]*\{text[\d]*\}[^>]*>%i', $bbcode_tpl);
if (!$warn_text || confirm_box(true))
{
@@ -178,7 +216,7 @@ class acp_bbcodes
trigger_error($user->lang['BBCODE_HELPLINE_TOO_LONG'] . adm_back_link($this->u_action), E_USER_WARNING);
}
- $sql_ary = array(
+ $sql_ary = array_merge($sql_ary, array(
'bbcode_tag' => $data['bbcode_tag'],
'bbcode_match' => $bbcode_match,
'bbcode_tpl' => $bbcode_tpl,
@@ -188,7 +226,7 @@ class acp_bbcodes
'first_pass_replace' => $data['first_pass_replace'],
'second_pass_match' => $data['second_pass_match'],
'second_pass_replace' => $data['second_pass_replace']
- );
+ ));
if ($action == 'create')
{
@@ -244,14 +282,14 @@ class acp_bbcodes
}
else
{
- confirm_box(false, $user->lang['BBCODE_DANGER'], build_hidden_fields(array(
+ confirm_box(false, $user->lang['BBCODE_DANGER'], build_hidden_fields(array_merge($hidden_fields, array(
'action' => $action,
'bbcode' => $bbcode_id,
'bbcode_match' => $bbcode_match,
'bbcode_tpl' => htmlspecialchars($bbcode_tpl),
'bbcode_helpline' => $bbcode_helpline,
'display_on_posting' => $display_on_posting,
- ))
+ )))
, 'confirm_bbcode.html');
}
@@ -273,6 +311,18 @@ class acp_bbcodes
$db->sql_query('DELETE FROM ' . BBCODES_TABLE . " WHERE bbcode_id = $bbcode_id");
$cache->destroy('sql', BBCODES_TABLE);
add_log('admin', 'LOG_BBCODE_DELETE', $row['bbcode_tag']);
+
+ if ($request->is_ajax())
+ {
+ $json_response = new \phpbb\json_response;
+ $json_response->send(array(
+ 'MESSAGE_TITLE' => $user->lang['INFORMATION'],
+ 'MESSAGE_TEXT' => $user->lang['BBCODE_DELETED'],
+ 'REFRESH_DATA' => array(
+ 'time' => 3
+ )
+ ));
+ }
}
else
{
@@ -288,22 +338,57 @@ class acp_bbcodes
break;
}
- $template->assign_vars(array(
- 'U_ACTION' => $this->u_action . '&amp;action=add')
+ $u_action = $this->u_action;
+
+ $template_data = array(
+ 'U_ACTION' => $this->u_action . '&amp;action=add',
);
- $sql = 'SELECT *
- FROM ' . BBCODES_TABLE . '
- ORDER BY bbcode_tag';
- $result = $db->sql_query($sql);
+ $sql_ary = array(
+ 'SELECT' => 'b.*',
+ 'FROM' => array(BBCODES_TABLE => 'b'),
+ 'ORDER_BY' => 'b.bbcode_tag',
+ );
+
+ /**
+ * Modify custom bbcode template data before we display the form
+ *
+ * @event core.acp_bbcodes_display_form
+ * @var string action Type of the action: modify|create
+ * @var string sql_ary The SQL array to get custom bbcode data
+ * @var array template_data Array with form template data
+ * @var string u_action The u_action link
+ * @since 3.1.0-a3
+ */
+ $vars = array('action', 'sql_ary', 'template_data', 'u_action');
+ extract($phpbb_dispatcher->trigger_event('core.acp_bbcodes_display_form', compact($vars)));
+
+ $result = $db->sql_query($db->sql_build_query('SELECT', $sql_ary));
+
+ $template->assign_vars($template_data);
while ($row = $db->sql_fetchrow($result))
{
- $template->assign_block_vars('bbcodes', array(
+ $bbcodes_array = array(
'BBCODE_TAG' => $row['bbcode_tag'],
- 'U_EDIT' => $this->u_action . '&amp;action=edit&amp;bbcode=' . $row['bbcode_id'],
- 'U_DELETE' => $this->u_action . '&amp;action=delete&amp;bbcode=' . $row['bbcode_id'])
+ 'U_EDIT' => $u_action . '&amp;action=edit&amp;bbcode=' . $row['bbcode_id'],
+ 'U_DELETE' => $u_action . '&amp;action=delete&amp;bbcode=' . $row['bbcode_id'],
);
+
+ /**
+ * Modify display of custom bbcodes in the form
+ *
+ * @event core.acp_bbcodes_display_bbcodes
+ * @var array row Array with current bbcode data
+ * @var array bbcodes_array Array of bbcodes template data
+ * @var string u_action The u_action link
+ * @since 3.1.0-a3
+ */
+ $vars = array('bbcodes_array', 'row', 'u_action');
+ extract($phpbb_dispatcher->trigger_event('core.acp_bbcodes_display_bbcodes', compact($vars)));
+
+ $template->assign_block_vars('bbcodes', $bbcodes_array);
+
}
$db->sql_freeresult($result);
}
@@ -317,16 +402,7 @@ class acp_bbcodes
$bbcode_tpl = trim($bbcode_tpl);
$utf8 = strpos($bbcode_match, 'INTTEXT') !== false;
- // make sure we have utf8 support
- $utf8_pcre_properties = false;
- if (version_compare(PHP_VERSION, '5.1.0', '>=') || (version_compare(PHP_VERSION, '5.0.0-dev', '<=') && version_compare(PHP_VERSION, '4.4.0', '>=')))
- {
- // While this is the proper range of PHP versions, PHP may not be linked with the bundled PCRE lib and instead with an older version
- if (@preg_match('/\p{L}/u', 'a') !== false)
- {
- $utf8_pcre_properties = true;
- }
- }
+ $utf8_pcre_properties = phpbb_pcre_utf8_support();
$fp_match = preg_quote($bbcode_match, '!');
$fp_replace = preg_replace('#^\[(.*?)\]#', '[$1:$uid]', $bbcode_match);
@@ -480,5 +556,3 @@ class acp_bbcodes
);
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/acp/acp_board.php b/phpBB/includes/acp/acp_board.php
index ebbf66657e..2c0eb95cd5 100644
--- a/phpBB/includes/acp/acp_board.php
+++ b/phpBB/includes/acp/acp_board.php
@@ -2,9 +2,8 @@
/**
*
* @package acp
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
* @todo add cron intervals to server settings? (database_gc, queue_interval, session_gc, search_gc, cache_gc, warnings_gc)
*/
@@ -29,7 +28,7 @@ class acp_board
{
global $db, $user, $auth, $template;
global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;
- global $cache;
+ global $cache, $phpbb_container, $phpbb_dispatcher;
$user->add_lang('acp/board');
@@ -54,17 +53,19 @@ class acp_board
'legend1' => 'ACP_BOARD_SETTINGS',
'sitename' => array('lang' => 'SITE_NAME', 'validate' => 'string', 'type' => 'text:40:255', 'explain' => false),
'site_desc' => array('lang' => 'SITE_DESC', 'validate' => 'string', 'type' => 'text:40:255', 'explain' => false),
+ 'site_home_url' => array('lang' => 'SITE_HOME_URL', 'validate' => 'string', 'type' => 'url:40:255', 'explain' => true),
+ 'site_home_text' => array('lang' => 'SITE_HOME_TEXT', 'validate' => 'string', 'type' => 'text:40:255', 'explain' => true),
+ 'board_index_text' => array('lang' => 'BOARD_INDEX_TEXT', 'validate' => 'string', 'type' => 'text:40:255', 'explain' => true),
'board_disable' => array('lang' => 'DISABLE_BOARD', 'validate' => 'bool', 'type' => 'custom', 'method' => 'board_disable', 'explain' => true),
'board_disable_msg' => false,
'default_lang' => array('lang' => 'DEFAULT_LANGUAGE', 'validate' => 'lang', 'type' => 'select', 'function' => 'language_select', 'params' => array('{CONFIG_VALUE}'), 'explain' => false),
'default_dateformat' => array('lang' => 'DEFAULT_DATE_FORMAT', 'validate' => 'string', 'type' => 'custom', 'method' => 'dateformat_select', 'explain' => true),
- 'board_timezone' => array('lang' => 'SYSTEM_TIMEZONE', 'validate' => 'string', 'type' => 'select', 'function' => 'tz_select', 'params' => array('{CONFIG_VALUE}', 1), 'explain' => true),
- 'board_dst' => array('lang' => 'SYSTEM_DST', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
+ 'board_timezone' => array('lang' => 'SYSTEM_TIMEZONE', 'validate' => 'timezone', 'type' => 'custom', 'method' => 'timezone_select', 'explain' => true),
'default_style' => array('lang' => 'DEFAULT_STYLE', 'validate' => 'int', 'type' => 'select', 'function' => 'style_select', 'params' => array('{CONFIG_VALUE}', false), 'explain' => false),
'override_user_style' => array('lang' => 'OVERRIDE_STYLE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'legend2' => 'WARNINGS',
- 'warnings_expire_days' => array('lang' => 'WARNINGS_EXPIRE', 'validate' => 'int', 'type' => 'text:3:4', 'explain' => true, 'append' => ' ' . $user->lang['DAYS']),
+ 'warnings_expire_days' => array('lang' => 'WARNINGS_EXPIRE', 'validate' => 'int:0:9999', 'type' => 'number:0:9999', 'explain' => true, 'append' => ' ' . $user->lang['DAYS']),
'legend3' => 'ACP_SUBMIT_CHANGES',
)
@@ -89,6 +90,7 @@ class acp_board
'allow_nocensors' => array('lang' => 'ALLOW_NO_CENSORS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'allow_bookmarks' => array('lang' => 'ALLOW_BOOKMARKS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'allow_birthdays' => array('lang' => 'ALLOW_BIRTHDAYS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
+ 'display_last_subject' => array('lang' => 'DISPLAY_LAST_SUBJECT', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'allow_quick_reply' => array('lang' => 'ALLOW_QUICK_REPLY', 'validate' => 'bool', 'type' => 'custom', 'method' => 'quick_reply', 'explain' => true),
'legend2' => 'ACP_LOAD_SETTINGS',
@@ -96,6 +98,7 @@ class acp_board
'load_moderators' => array('lang' => 'YES_MODERATORS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
'load_jumpbox' => array('lang' => 'YES_JUMPBOX', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
'load_cpf_memberlist' => array('lang' => 'LOAD_CPF_MEMBERLIST', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
+ 'load_cpf_pm' => array('lang' => 'LOAD_CPF_PM', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
'load_cpf_viewprofile' => array('lang' => 'LOAD_CPF_VIEWPROFILE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
'load_cpf_viewtopic' => array('lang' => 'LOAD_CPF_VIEWTOPIC', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
@@ -105,28 +108,43 @@ class acp_board
break;
case 'avatar':
+ $phpbb_avatar_manager = $phpbb_container->get('avatar.manager');
+ $avatar_drivers = $phpbb_avatar_manager->get_all_drivers();
+
+ $avatar_vars = array();
+ foreach ($avatar_drivers as $current_driver)
+ {
+ $driver = $phpbb_avatar_manager->get_driver($current_driver, false);
+
+ /*
+ * First grab the settings for enabling/disabling the avatar
+ * driver and afterwards grab additional settings the driver
+ * might have.
+ */
+ $avatar_vars += $phpbb_avatar_manager->get_avatar_settings($driver);
+ $avatar_vars += $driver->prepare_form_acp($user);
+ }
+
$display_vars = array(
'title' => 'ACP_AVATAR_SETTINGS',
'vars' => array(
'legend1' => 'ACP_AVATAR_SETTINGS',
- 'avatar_min_width' => array('lang' => 'MIN_AVATAR_SIZE', 'validate' => 'int:0', 'type' => false, 'method' => false, 'explain' => false,),
- 'avatar_min_height' => array('lang' => 'MIN_AVATAR_SIZE', 'validate' => 'int:0', 'type' => false, 'method' => false, 'explain' => false,),
- 'avatar_max_width' => array('lang' => 'MAX_AVATAR_SIZE', 'validate' => 'int:0', 'type' => false, 'method' => false, 'explain' => false,),
- 'avatar_max_height' => array('lang' => 'MAX_AVATAR_SIZE', 'validate' => 'int:0', 'type' => false, 'method' => false, 'explain' => false,),
+ 'avatar_min_width' => array('lang' => 'MIN_AVATAR_SIZE', 'validate' => 'int:0', 'type' => false, 'method' => false, 'explain' => false),
+ 'avatar_min_height' => array('lang' => 'MIN_AVATAR_SIZE', 'validate' => 'int:0', 'type' => false, 'method' => false, 'explain' => false),
+ 'avatar_max_width' => array('lang' => 'MAX_AVATAR_SIZE', 'validate' => 'int:0', 'type' => false, 'method' => false, 'explain' => false),
+ 'avatar_max_height' => array('lang' => 'MAX_AVATAR_SIZE', 'validate' => 'int:0', 'type' => false, 'method' => false, 'explain' => false),
'allow_avatar' => array('lang' => 'ALLOW_AVATARS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
- 'allow_avatar_local' => array('lang' => 'ALLOW_LOCAL', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
- 'allow_avatar_remote' => array('lang' => 'ALLOW_REMOTE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
- 'allow_avatar_upload' => array('lang' => 'ALLOW_UPLOAD', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
- 'allow_avatar_remote_upload'=> array('lang' => 'ALLOW_REMOTE_UPLOAD', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
- 'avatar_filesize' => array('lang' => 'MAX_FILESIZE', 'validate' => 'int:0', 'type' => 'text:4:10', 'explain' => true, 'append' => ' ' . $user->lang['BYTES']),
- 'avatar_min' => array('lang' => 'MIN_AVATAR_SIZE', 'validate' => 'int:0', 'type' => 'dimension:3:4', 'explain' => true, 'append' => ' ' . $user->lang['PIXEL']),
- 'avatar_max' => array('lang' => 'MAX_AVATAR_SIZE', 'validate' => 'int:0', 'type' => 'dimension:3:4', 'explain' => true, 'append' => ' ' . $user->lang['PIXEL']),
- 'avatar_path' => array('lang' => 'AVATAR_STORAGE_PATH', 'validate' => 'rwpath', 'type' => 'text:20:255', 'explain' => true),
- 'avatar_gallery_path' => array('lang' => 'AVATAR_GALLERY_PATH', 'validate' => 'rpath', 'type' => 'text:20:255', 'explain' => true)
+ 'avatar_min' => array('lang' => 'MIN_AVATAR_SIZE', 'validate' => 'int:0', 'type' => 'dimension:0', 'explain' => true, 'append' => ' ' . $user->lang['PIXEL']),
+ 'avatar_max' => array('lang' => 'MAX_AVATAR_SIZE', 'validate' => 'int:0', 'type' => 'dimension:0', 'explain' => true, 'append' => ' ' . $user->lang['PIXEL']),
)
);
+
+ if (!empty($avatar_vars))
+ {
+ $display_vars['vars'] += $avatar_vars;
+ }
break;
case 'message':
@@ -136,11 +154,11 @@ class acp_board
'vars' => array(
'legend1' => 'GENERAL_SETTINGS',
'allow_privmsg' => array('lang' => 'BOARD_PM', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
- 'pm_max_boxes' => array('lang' => 'BOXES_MAX', 'validate' => 'int:0', 'type' => 'text:4:4', 'explain' => true),
- 'pm_max_msgs' => array('lang' => 'BOXES_LIMIT', 'validate' => 'int:0', 'type' => 'text:4:4', 'explain' => true),
+ 'pm_max_boxes' => array('lang' => 'BOXES_MAX', 'validate' => 'int:0:9999', 'type' => 'number:0:9999', 'explain' => true),
+ 'pm_max_msgs' => array('lang' => 'BOXES_LIMIT', 'validate' => 'int:0:9999', 'type' => 'number:0:9999', 'explain' => true),
'full_folder_action' => array('lang' => 'FULL_FOLDER_ACTION', 'validate' => 'int', 'type' => 'select', 'method' => 'full_folder_select', 'explain' => true),
- 'pm_edit_time' => array('lang' => 'PM_EDIT_TIME', 'validate' => 'int:0', 'type' => 'text:5:5', 'explain' => true, 'append' => ' ' . $user->lang['MINUTES']),
- 'pm_max_recipients' => array('lang' => 'PM_MAX_RECIPIENTS', 'validate' => 'int:0', 'type' => 'text:5:5', 'explain' => true),
+ 'pm_edit_time' => array('lang' => 'PM_EDIT_TIME', 'validate' => 'int:0:99999', 'type' => 'number:0:99999', 'explain' => true, 'append' => ' ' . $user->lang['MINUTES']),
+ 'pm_max_recipients' => array('lang' => 'PM_MAX_RECIPIENTS', 'validate' => 'int:0:99999', 'type' => 'number:0:99999', 'explain' => true),
'legend2' => 'GENERAL_OPTIONS',
'allow_mass_pm' => array('lang' => 'ALLOW_MASS_PM', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
@@ -177,24 +195,24 @@ class acp_board
'legend2' => 'POSTING',
'bump_type' => false,
- 'edit_time' => array('lang' => 'EDIT_TIME', 'validate' => 'int:0', 'type' => 'text:5:5', 'explain' => true, 'append' => ' ' . $user->lang['MINUTES']),
- 'delete_time' => array('lang' => 'DELETE_TIME', 'validate' => 'int:0', 'type' => 'text:5:5', 'explain' => true, 'append' => ' ' . $user->lang['MINUTES']),
+ 'edit_time' => array('lang' => 'EDIT_TIME', 'validate' => 'int:0:99999', 'type' => 'number:0:99999', 'explain' => true, 'append' => ' ' . $user->lang['MINUTES']),
+ 'delete_time' => array('lang' => 'DELETE_TIME', 'validate' => 'int:0:99999', 'type' => 'number:0:99999', 'explain' => true, 'append' => ' ' . $user->lang['MINUTES']),
'display_last_edited' => array('lang' => 'DISPLAY_LAST_EDITED', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
- 'flood_interval' => array('lang' => 'FLOOD_INTERVAL', 'validate' => 'int:0', 'type' => 'text:3:10', 'explain' => true, 'append' => ' ' . $user->lang['SECONDS']),
+ 'flood_interval' => array('lang' => 'FLOOD_INTERVAL', 'validate' => 'int:0:9999999999', 'type' => 'number:0:9999999999', 'explain' => true, 'append' => ' ' . $user->lang['SECONDS']),
'bump_interval' => array('lang' => 'BUMP_INTERVAL', 'validate' => 'int:0', 'type' => 'custom', 'method' => 'bump_interval', 'explain' => true),
- 'topics_per_page' => array('lang' => 'TOPICS_PER_PAGE', 'validate' => 'int:1', 'type' => 'text:3:4', 'explain' => false),
- 'posts_per_page' => array('lang' => 'POSTS_PER_PAGE', 'validate' => 'int:1', 'type' => 'text:3:4', 'explain' => false),
- 'smilies_per_page' => array('lang' => 'SMILIES_PER_PAGE', 'validate' => 'int:1', 'type' => 'text:3:4', 'explain' => false),
- 'hot_threshold' => array('lang' => 'HOT_THRESHOLD', 'validate' => 'int:0', 'type' => 'text:3:4', 'explain' => true),
- 'max_poll_options' => array('lang' => 'MAX_POLL_OPTIONS', 'validate' => 'int:2:127', 'type' => 'text:4:4', 'explain' => false),
- 'max_post_chars' => array('lang' => 'CHAR_LIMIT', 'validate' => 'int:0', 'type' => 'text:4:6', 'explain' => true),
- 'min_post_chars' => array('lang' => 'MIN_CHAR_LIMIT', 'validate' => 'int:1', 'type' => 'text:4:6', 'explain' => true),
- 'max_post_smilies' => array('lang' => 'SMILIES_LIMIT', 'validate' => 'int:0', 'type' => 'text:4:4', 'explain' => true),
- 'max_post_urls' => array('lang' => 'MAX_POST_URLS', 'validate' => 'int:0', 'type' => 'text:5:4', 'explain' => true),
- 'max_post_font_size' => array('lang' => 'MAX_POST_FONT_SIZE', 'validate' => 'int:0', 'type' => 'text:5:4', 'explain' => true, 'append' => ' %'),
- 'max_quote_depth' => array('lang' => 'QUOTE_DEPTH_LIMIT', 'validate' => 'int:0', 'type' => 'text:4:4', 'explain' => true),
- 'max_post_img_width' => array('lang' => 'MAX_POST_IMG_WIDTH', 'validate' => 'int:0', 'type' => 'text:5:4', 'explain' => true, 'append' => ' ' . $user->lang['PIXEL']),
- 'max_post_img_height' => array('lang' => 'MAX_POST_IMG_HEIGHT', 'validate' => 'int:0', 'type' => 'text:5:4', 'explain' => true, 'append' => ' ' . $user->lang['PIXEL']),
+ 'topics_per_page' => array('lang' => 'TOPICS_PER_PAGE', 'validate' => 'int:1:9999', 'type' => 'number:1:9999', 'explain' => false),
+ 'posts_per_page' => array('lang' => 'POSTS_PER_PAGE', 'validate' => 'int:1:9999', 'type' => 'number:1:9999', 'explain' => false),
+ 'smilies_per_page' => array('lang' => 'SMILIES_PER_PAGE', 'validate' => 'int:1:9999', 'type' => 'number:1:9999', 'explain' => false),
+ 'hot_threshold' => array('lang' => 'HOT_THRESHOLD', 'validate' => 'int:0:9999', 'type' => 'number:0:9999', 'explain' => true),
+ 'max_poll_options' => array('lang' => 'MAX_POLL_OPTIONS', 'validate' => 'int:2:127', 'type' => 'number:2:127', 'explain' => false),
+ 'max_post_chars' => array('lang' => 'CHAR_LIMIT', 'validate' => 'int:0:999999', 'type' => 'number:0:999999', 'explain' => true),
+ 'min_post_chars' => array('lang' => 'MIN_CHAR_LIMIT', 'validate' => 'int:1:999999', 'type' => 'number:1:999999', 'explain' => true),
+ 'max_post_smilies' => array('lang' => 'SMILIES_LIMIT', 'validate' => 'int:0:9999', 'type' => 'number:0:9999', 'explain' => true),
+ 'max_post_urls' => array('lang' => 'MAX_POST_URLS', 'validate' => 'int:0:9999', 'type' => 'number:0:9999', 'explain' => true),
+ 'max_post_font_size' => array('lang' => 'MAX_POST_FONT_SIZE', 'validate' => 'int:0:9999', 'type' => 'number:0:9999', 'explain' => true, 'append' => ' %'),
+ 'max_quote_depth' => array('lang' => 'QUOTE_DEPTH_LIMIT', 'validate' => 'int:0:9999', 'type' => 'number:0:9999', 'explain' => true),
+ 'max_post_img_width' => array('lang' => 'MAX_POST_IMG_WIDTH', 'validate' => 'int:0:9999', 'type' => 'number:0:9999', 'explain' => true, 'append' => ' ' . $user->lang['PIXEL']),
+ 'max_post_img_height' => array('lang' => 'MAX_POST_IMG_HEIGHT', 'validate' => 'int:0:9999', 'type' => 'number:0:9999', 'explain' => true, 'append' => ' ' . $user->lang['PIXEL']),
'legend3' => 'ACP_SUBMIT_CHANGES',
)
@@ -214,12 +232,12 @@ class acp_board
'allow_sig_links' => array('lang' => 'ALLOW_SIG_LINKS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'legend2' => 'GENERAL_SETTINGS',
- 'max_sig_chars' => array('lang' => 'MAX_SIG_LENGTH', 'validate' => 'int:0', 'type' => 'text:5:4', 'explain' => true),
- 'max_sig_urls' => array('lang' => 'MAX_SIG_URLS', 'validate' => 'int:0', 'type' => 'text:5:4', 'explain' => true),
- 'max_sig_font_size' => array('lang' => 'MAX_SIG_FONT_SIZE', 'validate' => 'int:0', 'type' => 'text:5:4', 'explain' => true, 'append' => ' %'),
- 'max_sig_smilies' => array('lang' => 'MAX_SIG_SMILIES', 'validate' => 'int:0', 'type' => 'text:5:4', 'explain' => true),
- 'max_sig_img_width' => array('lang' => 'MAX_SIG_IMG_WIDTH', 'validate' => 'int:0', 'type' => 'text:5:4', 'explain' => true, 'append' => ' ' . $user->lang['PIXEL']),
- 'max_sig_img_height' => array('lang' => 'MAX_SIG_IMG_HEIGHT', 'validate' => 'int:0', 'type' => 'text:5:4', 'explain' => true, 'append' => ' ' . $user->lang['PIXEL']),
+ 'max_sig_chars' => array('lang' => 'MAX_SIG_LENGTH', 'validate' => 'int:0:9999', 'type' => 'number:0:9999', 'explain' => true),
+ 'max_sig_urls' => array('lang' => 'MAX_SIG_URLS', 'validate' => 'int:0:9999', 'type' => 'number:0:9999', 'explain' => true),
+ 'max_sig_font_size' => array('lang' => 'MAX_SIG_FONT_SIZE', 'validate' => 'int:0:9999', 'type' => 'number:0:9999', 'explain' => true, 'append' => ' %'),
+ 'max_sig_smilies' => array('lang' => 'MAX_SIG_SMILIES', 'validate' => 'int:0:9999', 'type' => 'number:0:9999', 'explain' => true),
+ 'max_sig_img_width' => array('lang' => 'MAX_SIG_IMG_WIDTH', 'validate' => 'int:0:9999', 'type' => 'number:0:9999', 'explain' => true, 'append' => ' ' . $user->lang['PIXEL']),
+ 'max_sig_img_height' => array('lang' => 'MAX_SIG_IMG_HEIGHT', 'validate' => 'int:0:9999', 'type' => 'number:0:9999', 'explain' => true, 'append' => ' ' . $user->lang['PIXEL']),
'legend3' => 'ACP_SUBMIT_CHANGES',
)
@@ -235,20 +253,20 @@ class acp_board
'max_pass_chars' => array('lang' => 'PASSWORD_LENGTH', 'validate' => 'int:8:255', 'type' => false, 'method' => false, 'explain' => false,),
'require_activation' => array('lang' => 'ACC_ACTIVATION', 'validate' => 'int', 'type' => 'select', 'method' => 'select_acc_activation', 'explain' => true),
- 'new_member_post_limit' => array('lang' => 'NEW_MEMBER_POST_LIMIT', 'validate' => 'int:0:255', 'type' => 'text:4:4', 'explain' => true, 'append' => ' ' . $user->lang['POSTS']),
+ 'new_member_post_limit' => array('lang' => 'NEW_MEMBER_POST_LIMIT', 'validate' => 'int:0:255', 'type' => 'number:0:255', 'explain' => true, 'append' => ' ' . $user->lang['POSTS']),
'new_member_group_default'=> array('lang' => 'NEW_MEMBER_GROUP_DEFAULT', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'min_name_chars' => array('lang' => 'USERNAME_LENGTH', 'validate' => 'int:1', 'type' => 'custom:5:180', 'method' => 'username_length', 'explain' => true),
'min_pass_chars' => array('lang' => 'PASSWORD_LENGTH', 'validate' => 'int:1', 'type' => 'custom', 'method' => 'password_length', 'explain' => true),
'allow_name_chars' => array('lang' => 'USERNAME_CHARS', 'validate' => 'string', 'type' => 'select', 'method' => 'select_username_chars', 'explain' => true),
'pass_complex' => array('lang' => 'PASSWORD_TYPE', 'validate' => 'string', 'type' => 'select', 'method' => 'select_password_chars', 'explain' => true),
- 'chg_passforce' => array('lang' => 'FORCE_PASS_CHANGE', 'validate' => 'int:0', 'type' => 'text:3:3', 'explain' => true, 'append' => ' ' . $user->lang['DAYS']),
+ 'chg_passforce' => array('lang' => 'FORCE_PASS_CHANGE', 'validate' => 'int:0:999', 'type' => 'number:0:999', 'explain' => true, 'append' => ' ' . $user->lang['DAYS']),
'legend2' => 'GENERAL_OPTIONS',
'allow_namechange' => array('lang' => 'ALLOW_NAME_CHANGE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
'allow_emailreuse' => array('lang' => 'ALLOW_EMAIL_REUSE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'enable_confirm' => array('lang' => 'VISUAL_CONFIRM_REG', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
- 'max_login_attempts' => array('lang' => 'MAX_LOGIN_ATTEMPTS', 'validate' => 'int:0', 'type' => 'text:3:3', 'explain' => true),
- 'max_reg_attempts' => array('lang' => 'REG_LIMIT', 'validate' => 'int:0', 'type' => 'text:4:4', 'explain' => true),
+ 'max_login_attempts' => array('lang' => 'MAX_LOGIN_ATTEMPTS', 'validate' => 'int:0:999', 'type' => 'number:0:999', 'explain' => true),
+ 'max_reg_attempts' => array('lang' => 'REG_LIMIT', 'validate' => 'int:0:9999', 'type' => 'number:0:9999', 'explain' => true),
'legend3' => 'COPPA',
'coppa_enable' => array('lang' => 'ENABLE_COPPA', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
@@ -270,13 +288,13 @@ class acp_board
'feed_http_auth' => array('lang' => 'ACP_FEED_HTTP_AUTH', 'validate' => 'bool', 'type' => 'radio:enabled_disabled', 'explain' => true),
'legend2' => 'ACP_FEED_POST_BASED',
- 'feed_limit_post' => array('lang' => 'ACP_FEED_LIMIT', 'validate' => 'int:5', 'type' => 'text:3:4', 'explain' => true),
+ 'feed_limit_post' => array('lang' => 'ACP_FEED_LIMIT', 'validate' => 'int:5:9999', 'type' => 'number:5:9999', 'explain' => true),
'feed_overall' => array('lang' => 'ACP_FEED_OVERALL', 'validate' => 'bool', 'type' => 'radio:enabled_disabled', 'explain' => true ),
'feed_forum' => array('lang' => 'ACP_FEED_FORUM', 'validate' => 'bool', 'type' => 'radio:enabled_disabled', 'explain' => true ),
'feed_topic' => array('lang' => 'ACP_FEED_TOPIC', 'validate' => 'bool', 'type' => 'radio:enabled_disabled', 'explain' => true ),
'legend3' => 'ACP_FEED_TOPIC_BASED',
- 'feed_limit_topic' => array('lang' => 'ACP_FEED_LIMIT', 'validate' => 'int:5', 'type' => 'text:3:4', 'explain' => true),
+ 'feed_limit_topic' => array('lang' => 'ACP_FEED_LIMIT', 'validate' => 'int:5:9999', 'type' => 'number:5:9999', 'explain' => true),
'feed_topics_new' => array('lang' => 'ACP_FEED_TOPICS_NEW', 'validate' => 'bool', 'type' => 'radio:enabled_disabled', 'explain' => true ),
'feed_topics_active' => array('lang' => 'ACP_FEED_TOPICS_ACTIVE', 'validate' => 'bool', 'type' => 'radio:enabled_disabled', 'explain' => true ),
'feed_news_id' => array('lang' => 'ACP_FEED_NEWS', 'validate' => 'string', 'type' => 'custom', 'method' => 'select_news_forums', 'explain' => true),
@@ -296,7 +314,7 @@ class acp_board
'cookie_domain' => array('lang' => 'COOKIE_DOMAIN', 'validate' => 'string', 'type' => 'text::255', 'explain' => false),
'cookie_name' => array('lang' => 'COOKIE_NAME', 'validate' => 'string', 'type' => 'text::16', 'explain' => false),
'cookie_path' => array('lang' => 'COOKIE_PATH', 'validate' => 'string', 'type' => 'text::255', 'explain' => false),
- 'cookie_secure' => array('lang' => 'COOKIE_SECURE', 'validate' => 'bool', 'type' => 'radio:disabled_enabled', 'explain' => true)
+ 'cookie_secure' => array('lang' => 'COOKIE_SECURE', 'validate' => 'bool', 'type' => 'radio:disabled_enabled', 'explain' => true),
)
);
break;
@@ -306,12 +324,14 @@ class acp_board
'title' => 'ACP_LOAD_SETTINGS',
'vars' => array(
'legend1' => 'GENERAL_SETTINGS',
- 'limit_load' => array('lang' => 'LIMIT_LOAD', 'validate' => 'string', 'type' => 'text:4:4', 'explain' => true),
- 'session_length' => array('lang' => 'SESSION_LENGTH', 'validate' => 'int:60', 'type' => 'text:5:10', 'explain' => true, 'append' => ' ' . $user->lang['SECONDS']),
- 'active_sessions' => array('lang' => 'LIMIT_SESSIONS', 'validate' => 'int:0', 'type' => 'text:4:4', 'explain' => true),
- 'load_online_time' => array('lang' => 'ONLINE_LENGTH', 'validate' => 'int:0', 'type' => 'text:4:3', 'explain' => true, 'append' => ' ' . $user->lang['MINUTES']),
+ 'limit_load' => array('lang' => 'LIMIT_LOAD', 'validate' => 'int:0:9999', 'type' => 'number:0:9999', 'explain' => true),
+ 'session_length' => array('lang' => 'SESSION_LENGTH', 'validate' => 'int:60:9999999999', 'type' => 'number:60:9999999999', 'explain' => true, 'append' => ' ' . $user->lang['SECONDS']),
+ 'active_sessions' => array('lang' => 'LIMIT_SESSIONS', 'validate' => 'int:0:9999', 'type' => 'number:0:9999', 'explain' => true),
+ 'load_online_time' => array('lang' => 'ONLINE_LENGTH', 'validate' => 'int:0:999', 'type' => 'number:0:999', 'explain' => true, 'append' => ' ' . $user->lang['MINUTES']),
+ 'read_notification_expire_days' => array('lang' => 'READ_NOTIFICATION_EXPIRE_DAYS', 'validate' => 'int:0', 'type' => 'number:0', 'explain' => true, 'append' => ' ' . $user->lang['DAYS']),
'legend2' => 'GENERAL_OPTIONS',
+ 'load_notifications' => array('lang' => 'LOAD_NOTIFICATIONS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'load_db_track' => array('lang' => 'YES_POST_MARKING', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'load_db_lastread' => array('lang' => 'YES_READ_MARKING', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'load_anon_lastread' => array('lang' => 'YES_ANON_READ_MARKING', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
@@ -323,10 +343,12 @@ class acp_board
'load_moderators' => array('lang' => 'YES_MODERATORS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
'load_jumpbox' => array('lang' => 'YES_JUMPBOX', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
'load_user_activity' => array('lang' => 'LOAD_USER_ACTIVITY', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
- 'load_tplcompile' => array('lang' => 'RECOMPILE_STYLES', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
+ 'load_tplcompile' => array('lang' => 'RECOMPILE_STYLES', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
+ 'allow_cdn' => array('lang' => 'ALLOW_CDN', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'legend3' => 'CUSTOM_PROFILE_FIELDS',
'load_cpf_memberlist' => array('lang' => 'LOAD_CPF_MEMBERLIST', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
+ 'load_cpf_pm' => array('lang' => 'LOAD_CPF_PM', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
'load_cpf_viewprofile' => array('lang' => 'LOAD_CPF_VIEWPROFILE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
'load_cpf_viewtopic' => array('lang' => 'LOAD_CPF_VIEWTOPIC', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
@@ -340,7 +362,7 @@ class acp_board
'title' => 'ACP_AUTH_SETTINGS',
'vars' => array(
'legend1' => 'ACP_AUTH_SETTINGS',
- 'auth_method' => array('lang' => 'AUTH_METHOD', 'validate' => 'string', 'type' => 'select', 'method' => 'select_auth_method', 'explain' => false)
+ 'auth_method' => array('lang' => 'AUTH_METHOD', 'validate' => 'string', 'type' => 'select', 'method' => 'select_auth_method', 'explain' => false),
)
);
break;
@@ -351,8 +373,10 @@ class acp_board
'vars' => array(
'legend1' => 'ACP_SERVER_SETTINGS',
'gzip_compress' => array('lang' => 'ENABLE_GZIP', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
+ 'use_system_cron' => array('lang' => 'USE_SYSTEM_CRON', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'legend2' => 'PATH_SETTINGS',
+ 'enable_mod_rewrite' => array('lang' => 'MOD_REWRITE_ENABLE', 'validate' => 'bool', 'type' => 'custom', 'method' => 'enable_mod_rewrite', 'explain' => true),
'smilies_path' => array('lang' => 'SMILIES_PATH', 'validate' => 'rpath', 'type' => 'text:20:255', 'explain' => true),
'icons_path' => array('lang' => 'ICONS_PATH', 'validate' => 'rpath', 'type' => 'text:20:255', 'explain' => true),
'upload_icons_path' => array('lang' => 'UPLOAD_ICONS_PATH', 'validate' => 'rpath', 'type' => 'text:20:255', 'explain' => true),
@@ -362,7 +386,7 @@ class acp_board
'force_server_vars' => array('lang' => 'FORCE_SERVER_VARS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'server_protocol' => array('lang' => 'SERVER_PROTOCOL', 'validate' => 'string', 'type' => 'text:10:10', 'explain' => true),
'server_name' => array('lang' => 'SERVER_NAME', 'validate' => 'string', 'type' => 'text:40:255', 'explain' => true),
- 'server_port' => array('lang' => 'SERVER_PORT', 'validate' => 'int:0', 'type' => 'text:5:5', 'explain' => true),
+ 'server_port' => array('lang' => 'SERVER_PORT', 'validate' => 'int:0:99999', 'type' => 'number:0:99999', 'explain' => true),
'script_path' => array('lang' => 'SCRIPT_PATH', 'validate' => 'script_path', 'type' => 'text::255', 'explain' => true),
'legend4' => 'ACP_SUBMIT_CHANGES',
@@ -376,7 +400,8 @@ class acp_board
'vars' => array(
'legend1' => 'ACP_SECURITY_SETTINGS',
'allow_autologin' => array('lang' => 'ALLOW_AUTOLOGIN', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
- 'max_autologin_time' => array('lang' => 'AUTOLOGIN_LENGTH', 'validate' => 'int:0', 'type' => 'text:5:5', 'explain' => true, 'append' => ' ' . $user->lang['DAYS']),
+ 'allow_password_reset' => array('lang' => 'ALLOW_PASSWORD_RESET', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
+ 'max_autologin_time' => array('lang' => 'AUTOLOGIN_LENGTH', 'validate' => 'int:0:99999', 'type' => 'number:0:99999', 'explain' => true, 'append' => ' ' . $user->lang['DAYS']),
'ip_check' => array('lang' => 'IP_VALID', 'validate' => 'int', 'type' => 'custom', 'method' => 'select_ip_check', 'explain' => true),
'browser_check' => array('lang' => 'BROWSER_VALID', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'forwarded_for_check' => array('lang' => 'FORWARDED_FOR_VALID', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
@@ -386,13 +411,13 @@ class acp_board
'max_pass_chars' => array('lang' => 'PASSWORD_LENGTH', 'validate' => 'int:8:255', 'type' => false, 'method' => false, 'explain' => false,),
'min_pass_chars' => array('lang' => 'PASSWORD_LENGTH', 'validate' => 'int:1', 'type' => 'custom', 'method' => 'password_length', 'explain' => true),
'pass_complex' => array('lang' => 'PASSWORD_TYPE', 'validate' => 'string', 'type' => 'select', 'method' => 'select_password_chars', 'explain' => true),
- 'chg_passforce' => array('lang' => 'FORCE_PASS_CHANGE', 'validate' => 'int:0', 'type' => 'text:3:3', 'explain' => true, 'append' => ' ' . $user->lang['DAYS']),
- 'max_login_attempts' => array('lang' => 'MAX_LOGIN_ATTEMPTS', 'validate' => 'int:0', 'type' => 'text:3:3', 'explain' => true),
- 'ip_login_limit_max' => array('lang' => 'IP_LOGIN_LIMIT_MAX', 'validate' => 'int:0', 'type' => 'text:3:3', 'explain' => true),
- 'ip_login_limit_time' => array('lang' => 'IP_LOGIN_LIMIT_TIME', 'validate' => 'int:0', 'type' => 'text:5:5', 'explain' => true, 'append' => ' ' . $user->lang['SECONDS']),
+ 'chg_passforce' => array('lang' => 'FORCE_PASS_CHANGE', 'validate' => 'int:0:999', 'type' => 'number:0:999', 'explain' => true, 'append' => ' ' . $user->lang['DAYS']),
+ 'max_login_attempts' => array('lang' => 'MAX_LOGIN_ATTEMPTS', 'validate' => 'int:0:999', 'type' => 'number:0:999', 'explain' => true),
+ 'ip_login_limit_max' => array('lang' => 'IP_LOGIN_LIMIT_MAX', 'validate' => 'int:0:999', 'type' => 'number:0:999', 'explain' => true),
+ 'ip_login_limit_time' => array('lang' => 'IP_LOGIN_LIMIT_TIME', 'validate' => 'int:0:99999', 'type' => 'number:0:99999', 'explain' => true, 'append' => ' ' . $user->lang['SECONDS']),
'ip_login_limit_use_forwarded' => array('lang' => 'IP_LOGIN_LIMIT_USE_FORWARDED', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'tpl_allow_php' => array('lang' => 'TPL_ALLOW_PHP', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
- 'form_token_lifetime' => array('lang' => 'FORM_TIME_MAX', 'validate' => 'int:-1', 'type' => 'text:5:5', 'explain' => true, 'append' => ' ' . $user->lang['SECONDS']),
+ 'form_token_lifetime' => array('lang' => 'FORM_TIME_MAX', 'validate' => 'int:-1:99999', 'type' => 'number:-1:99999', 'explain' => true, 'append' => ' ' . $user->lang['SECONDS']),
'form_token_sid_guests' => array('lang' => 'FORM_SID_GUESTS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
)
@@ -407,16 +432,16 @@ class acp_board
'email_enable' => array('lang' => 'ENABLE_EMAIL', 'validate' => 'bool', 'type' => 'radio:enabled_disabled', 'explain' => true),
'board_email_form' => array('lang' => 'BOARD_EMAIL_FORM', 'validate' => 'bool', 'type' => 'radio:enabled_disabled', 'explain' => true),
'email_function_name' => array('lang' => 'EMAIL_FUNCTION_NAME', 'validate' => 'string', 'type' => 'text:20:50', 'explain' => true),
- 'email_package_size' => array('lang' => 'EMAIL_PACKAGE_SIZE', 'validate' => 'int:0', 'type' => 'text:5:5', 'explain' => true),
- 'board_contact' => array('lang' => 'CONTACT_EMAIL', 'validate' => 'email', 'type' => 'text:25:100', 'explain' => true),
- 'board_email' => array('lang' => 'ADMIN_EMAIL', 'validate' => 'email', 'type' => 'text:25:100', 'explain' => true),
+ 'email_package_size' => array('lang' => 'EMAIL_PACKAGE_SIZE', 'validate' => 'int:0', 'type' => 'number:0:99999', 'explain' => true),
+ 'board_contact' => array('lang' => 'CONTACT_EMAIL', 'validate' => 'email', 'type' => 'email:25:100', 'explain' => true),
+ 'board_email' => array('lang' => 'ADMIN_EMAIL', 'validate' => 'email', 'type' => 'email:25:100', 'explain' => true),
'board_email_sig' => array('lang' => 'EMAIL_SIG', 'validate' => 'string', 'type' => 'textarea:5:30', 'explain' => true),
'board_hide_emails' => array('lang' => 'BOARD_HIDE_EMAILS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'legend2' => 'SMTP_SETTINGS',
'smtp_delivery' => array('lang' => 'USE_SMTP', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'smtp_host' => array('lang' => 'SMTP_SERVER', 'validate' => 'string', 'type' => 'text:25:50', 'explain' => false),
- 'smtp_port' => array('lang' => 'SMTP_PORT', 'validate' => 'int:0', 'type' => 'text:4:5', 'explain' => true),
+ 'smtp_port' => array('lang' => 'SMTP_PORT', 'validate' => 'int:0:99999', 'type' => 'number:0:99999', 'explain' => true),
'smtp_auth_method' => array('lang' => 'SMTP_AUTH_METHOD', 'validate' => 'string', 'type' => 'select', 'method' => 'mail_auth_select', 'explain' => true),
'smtp_username' => array('lang' => 'SMTP_USERNAME', 'validate' => 'string', 'type' => 'text:25:255', 'explain' => true),
'smtp_password' => array('lang' => 'SMTP_PASSWORD', 'validate' => 'string', 'type' => 'password:25:255', 'explain' => true),
@@ -431,6 +456,18 @@ class acp_board
break;
}
+ /**
+ * Event to add and/or modify acp_board configurations
+ *
+ * @event core.acp_board_config_edit_add
+ * @var array display_vars Array of config values to display and process
+ * @var string mode Mode of the config page we are displaying
+ * @var boolean submit Do we display the form or process the submission
+ * @since 3.1.0-a4
+ */
+ $vars = array('display_vars', 'mode', 'submit');
+ extract($phpbb_dispatcher->trigger_event('core.acp_board_config_edit_add', compact($vars)));
+
if (isset($display_vars['lang']))
{
$user->add_lang($display_vars['lang']);
@@ -440,7 +477,7 @@ class acp_board
$cfg_array = (isset($_REQUEST['config'])) ? utf8_normalize_nfc(request_var('config', array('' => ''), true)) : $this->new_config;
$error = array();
- // We validate the complete config if whished
+ // We validate the complete config if wished
validate_config_vars($display_vars['vars'], $cfg_array, $error);
if ($submit && !check_form_key($form_key))
@@ -499,84 +536,54 @@ class acp_board
if ($mode == 'auth')
{
// Retrieve a list of auth plugins and check their config values
- $auth_plugins = array();
+ $auth_providers = $phpbb_container->get('auth.provider_collection');
- $dp = @opendir($phpbb_root_path . 'includes/auth');
-
- if ($dp)
+ $updated_auth_settings = false;
+ $old_auth_config = array();
+ foreach ($auth_providers as $provider)
{
- while (($file = readdir($dp)) !== false)
+ if ($fields = $provider->acp())
{
- if (preg_match('#^auth_(.*?)\.' . $phpEx . '$#', $file))
+ // Check if we need to create config fields for this plugin and save config when submit was pressed
+ foreach ($fields as $field)
{
- $auth_plugins[] = basename(preg_replace('#^auth_(.*?)\.' . $phpEx . '$#', '\1', $file));
- }
- }
- closedir($dp);
+ if (!isset($config[$field]))
+ {
+ set_config($field, '');
+ }
- sort($auth_plugins);
- }
+ if (!isset($cfg_array[$field]) || strpos($field, 'legend') !== false)
+ {
+ continue;
+ }
- $updated_auth_settings = false;
- $old_auth_config = array();
- foreach ($auth_plugins as $method)
- {
- if ($method && file_exists($phpbb_root_path . 'includes/auth/auth_' . $method . '.' . $phpEx))
- {
- include_once($phpbb_root_path . 'includes/auth/auth_' . $method . '.' . $phpEx);
+ $old_auth_config[$field] = $this->new_config[$field];
+ $config_value = $cfg_array[$field];
+ $this->new_config[$field] = $config_value;
- $method = 'acp_' . $method;
- if (function_exists($method))
- {
- if ($fields = $method($this->new_config))
+ if ($submit)
{
- // Check if we need to create config fields for this plugin and save config when submit was pressed
- foreach ($fields['config'] as $field)
- {
- if (!isset($config[$field]))
- {
- set_config($field, '');
- }
-
- if (!isset($cfg_array[$field]) || strpos($field, 'legend') !== false)
- {
- continue;
- }
-
- $old_auth_config[$field] = $this->new_config[$field];
- $config_value = $cfg_array[$field];
- $this->new_config[$field] = $config_value;
-
- if ($submit)
- {
- $updated_auth_settings = true;
- set_config($field, $config_value);
- }
- }
+ $updated_auth_settings = true;
+ set_config($field, $config_value);
}
- unset($fields);
}
}
+ unset($fields);
}
if ($submit && (($cfg_array['auth_method'] != $this->new_config['auth_method']) || $updated_auth_settings))
{
$method = basename($cfg_array['auth_method']);
- if ($method && in_array($method, $auth_plugins))
+ if (array_key_exists('auth.provider.' . $method, $auth_providers))
{
- include_once($phpbb_root_path . 'includes/auth/auth_' . $method . '.' . $phpEx);
-
- $method = 'init_' . $method;
- if (function_exists($method))
+ $provider = $auth_providers['auth.provider.' . $method];
+ if ($error = $provider->init())
{
- if ($error = $method())
+ foreach ($old_auth_config as $config_name => $config_value)
{
- foreach ($old_auth_config as $config_name => $config_value)
- {
- set_config($config_name, $config_value);
- }
- trigger_error($error . adm_back_link($this->u_action), E_USER_WARNING);
+ set_config($config_name, $config_value);
}
+ trigger_error($error . adm_back_link($this->u_action), E_USER_WARNING);
}
set_config('auth_method', basename($cfg_array['auth_method']));
}
@@ -660,23 +667,22 @@ class acp_board
{
$template->assign_var('S_AUTH', true);
- foreach ($auth_plugins as $method)
+ foreach ($auth_providers as $provider)
{
- if ($method && file_exists($phpbb_root_path . 'includes/auth/auth_' . $method . '.' . $phpEx))
+ $auth_tpl = $provider->get_acp_template($this->new_config);
+ if ($auth_tpl)
{
- $method = 'acp_' . $method;
- if (function_exists($method))
+ if (array_key_exists('BLOCK_VAR_NAME', $auth_tpl))
{
- $fields = $method($this->new_config);
-
- if ($fields['tpl'])
+ foreach ($auth_tpl['BLOCK_VARS'] as $block_vars)
{
- $template->assign_block_vars('auth_tpl', array(
- 'TPL' => $fields['tpl'])
- );
+ $template->assign_block_vars($auth_tpl['BLOCK_VAR_NAME'], $block_vars);
}
- unset($fields);
}
+ $template->assign_vars($auth_tpl['TEMPLATE_VARS']);
+ $template->assign_block_vars('auth_tpl', array(
+ 'TEMPLATE_FILE' => $auth_tpl['TEMPLATE_FILE'],
+ ));
}
}
}
@@ -687,25 +693,19 @@ class acp_board
*/
function select_auth_method($selected_method, $key = '')
{
- global $phpbb_root_path, $phpEx;
+ global $phpbb_root_path, $phpEx, $phpbb_container;
$auth_plugins = array();
+ $auth_providers = $phpbb_container->get('auth.provider_collection');
- $dp = @opendir($phpbb_root_path . 'includes/auth');
-
- if (!$dp)
+ foreach ($auth_providers as $key => $value)
{
- return '';
- }
-
- while (($file = readdir($dp)) !== false)
- {
- if (preg_match('#^auth_(.*?)\.' . $phpEx . '$#', $file))
+ if (!($value instanceof \phpbb\auth\provider\provider_interface))
{
- $auth_plugins[] = preg_replace('#^auth_(.*?)\.' . $phpEx . '$#', '\1', $file);
+ continue;
}
+ $auth_plugins[] = str_replace('auth.provider.', '', $key);
}
- closedir($dp);
sort($auth_plugins);
@@ -775,14 +775,14 @@ class acp_board
global $user, $config;
$act_ary = array(
- 'ACC_DISABLE' => USER_ACTIVATION_DISABLE,
- 'ACC_NONE' => USER_ACTIVATION_NONE,
+ 'ACC_DISABLE' => USER_ACTIVATION_DISABLE,
+ 'ACC_NONE' => USER_ACTIVATION_NONE,
);
if ($config['email_enable'])
{
$act_ary['ACC_USER'] = USER_ACTIVATION_SELF;
$act_ary['ACC_ADMIN'] = USER_ACTIVATION_ADMIN;
- }
+ }
$act_options = '';
foreach ($act_ary as $key => $value)
@@ -801,7 +801,7 @@ class acp_board
{
global $user;
- return '<input id="' . $key . '" type="text" size="3" maxlength="3" name="config[min_name_chars]" value="' . $value . '" /> ' . $user->lang['MIN_CHARS'] . '&nbsp;&nbsp;<input type="text" size="3" maxlength="3" name="config[max_name_chars]" value="' . $this->new_config['max_name_chars'] . '" /> ' . $user->lang['MAX_CHARS'];
+ return '<input id="' . $key . '" type="number" size="3" maxlength="3" min="1" max="999" name="config[min_name_chars]" value="' . $value . '" /> ' . $user->lang['MIN_CHARS'] . '&nbsp;&nbsp;<input type="number" size="3" maxlength="3" min="8" max="180" name="config[max_name_chars]" value="' . $this->new_config['max_name_chars'] . '" /> ' . $user->lang['MAX_CHARS'];
}
/**
@@ -829,7 +829,7 @@ class acp_board
{
global $user;
- return '<input id="' . $key . '" type="text" size="3" maxlength="3" name="config[min_pass_chars]" value="' . $value . '" /> ' . $user->lang['MIN_CHARS'] . '&nbsp;&nbsp;<input type="text" size="3" maxlength="3" name="config[max_pass_chars]" value="' . $this->new_config['max_pass_chars'] . '" /> ' . $user->lang['MAX_CHARS'];
+ return '<input id="' . $key . '" type="number" size="3" maxlength="3" min="1" max="999" name="config[min_pass_chars]" value="' . $value . '" /> ' . $user->lang['MIN_CHARS'] . '&nbsp;&nbsp;<input type="number" size="3" maxlength="3" min="8" max="255" name="config[max_pass_chars]" value="' . $this->new_config['max_pass_chars'] . '" /> ' . $user->lang['MAX_CHARS'];
}
/**
@@ -893,6 +893,18 @@ class acp_board
'<br /><br /><input class="button2" type="submit" id="' . $key . '_enable" name="' . $key . '_enable" value="' . $user->lang['ALLOW_QUICK_REPLY_BUTTON'] . '" />';
}
+ /**
+ * Select guest timezone
+ */
+ function timezone_select($value, $key)
+ {
+ global $user;
+
+ $timezone_select = phpbb_timezone_select($user, $value, true);
+ $timezone_select['tz_select'];
+
+ return '<select name="config[' . $key . ']" id="' . $key . '">' . $timezone_select['tz_select'] . '</select>';
+ }
/**
* Select default dateformat
@@ -903,10 +915,14 @@ class acp_board
// Let the format_date function operate with the acp values
$old_tz = $user->timezone;
- $old_dst = $user->dst;
-
- $user->timezone = $config['board_timezone'] * 3600;
- $user->dst = $config['board_dst'] * 3600;
+ try
+ {
+ $user->timezone = new DateTimeZone($config['board_timezone']);
+ }
+ catch (Exception $e)
+ {
+ // If the board timezone is invalid, we just use the users timezone.
+ }
$dateformat_options = '';
@@ -926,7 +942,6 @@ class acp_board
// Reset users date options
$user->timezone = $old_tz;
- $user->dst = $old_dst;
return "<select name=\"dateoptions\" id=\"dateoptions\" onchange=\"if (this.value == 'custom') { document.getElementById('" . addslashes($key) . "').value = '" . addslashes($value) . "'; } else { document.getElementById('" . addslashes($key) . "').value = this.value; }\">$dateformat_options</select>
<input type=\"text\" name=\"config[$key]\" id=\"$key\" value=\"$value\" maxlength=\"30\" />";
@@ -1000,6 +1015,51 @@ class acp_board
$cache->destroy('sql', FORUMS_TABLE);
}
-}
+ /**
+ * Option to enable/disable removal of 'app.php' from URLs
+ *
+ * Note that if mod_rewrite is on, URLs without app.php will still work,
+ * but any paths generated by the controller helper url() method will not
+ * contain app.php.
+ *
+ * @param int $value The current config value
+ * @param string $key The config key
+ * @return string The HTML for the form field
+ */
+ function enable_mod_rewrite($value, $key)
+ {
+ global $user, $config;
-?> \ No newline at end of file
+ // Determine whether mod_rewrite is enabled on the server
+ // NOTE: This only works on Apache servers on which PHP is NOT
+ // installed as CGI. In that case, there is no way for PHP to
+ // determine whether or not the Apache module is enabled.
+ //
+ // To be clear on the value of $mod_rewite:
+ // null = Cannot determine whether or not the server has mod_rewrite
+ // enabled
+ // false = Can determine that the server does NOT have mod_rewrite
+ // enabled
+ // true = Can determine that the server DOES have mod_rewrite_enabled
+ $mod_rewrite = null;
+ if (function_exists('apache_get_modules'))
+ {
+ $mod_rewrite = (bool) in_array('mod_rewrite', apache_get_modules());
+ }
+
+ // If $message is false, mod_rewrite is enabled.
+ // Otherwise, it is not and we need to:
+ // 1) disable the form field
+ // 2) make sure the config value is set to 0
+ // 3) append the message to the return
+ $value = ($mod_rewrite === false) ? 0 : $value;
+ $message = $mod_rewrite === null ? 'MOD_REWRITE_INFORMATION_UNAVAILABLE' : ($mod_rewrite === false ? 'MOD_REWRITE_DISABLED' : false);
+
+ // Let's do some friendly HTML injection if we want to disable the
+ // form field because h_radio() has no pretty way of doing so
+ $field_name = 'config[enable_mod_rewrite]' . ($message === 'MOD_REWRITE_DISABLED' ? '" disabled="disabled' : '');
+
+ return h_radio($field_name, array(1 => 'YES', 0 => 'NO'), $value) .
+ ($message !== false ? '<br /><span>' . $user->lang($message) . '</span>' : '');
+ }
+}
diff --git a/phpBB/includes/acp/acp_bots.php b/phpBB/includes/acp/acp_bots.php
index d08cabb062..e28a8d6451 100644
--- a/phpBB/includes/acp/acp_bots.php
+++ b/phpBB/includes/acp/acp_bots.php
@@ -2,9 +2,8 @@
/**
*
* @package acp
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -25,7 +24,7 @@ class acp_bots
function main($id, $mode)
{
- global $config, $db, $user, $auth, $template, $cache;
+ global $config, $db, $user, $auth, $template, $cache, $request;
global $phpbb_root_path, $phpbb_admin_path, $phpEx, $table_prefix;
$action = request_var('action', '');
@@ -353,6 +352,14 @@ class acp_bots
break;
}
+
+ if ($request->is_ajax() && ($action == 'activate' || $action == 'deactivate'))
+ {
+ $json_response = new \phpbb\json_response;
+ $json_response->send(array(
+ 'text' => $user->lang['BOT_' . (($action == 'activate') ? 'DE' : '') . 'ACTIVATE'],
+ ));
+ }
$s_options = '';
$_options = array('activate' => 'BOT_ACTIVATE', 'deactivate' => 'BOT_DEACTIVATE', 'delete' => 'DELETE');
@@ -414,5 +421,3 @@ class acp_bots
return ($row) ? false : true;
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/acp/acp_captcha.php b/phpBB/includes/acp/acp_captcha.php
index bfec7c27d8..1a083c20ac 100644
--- a/phpBB/includes/acp/acp_captcha.php
+++ b/phpBB/includes/acp/acp_captcha.php
@@ -2,9 +2,8 @@
/**
*
* @package acp
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*/
/**
@@ -30,7 +29,8 @@ class acp_captcha
$user->add_lang('acp/board');
include($phpbb_root_path . 'includes/captcha/captcha_factory.' . $phpEx);
- $captchas = phpbb_captcha_factory::get_captcha_types();
+ $factory = new phpbb_captcha_factory();
+ $captchas = $factory->get_captcha_types();
$selected = request_var('select_captcha', $config['captcha_plugin']);
$selected = (isset($captchas['available'][$selected]) || isset($captchas['unavailable'][$selected])) ? $selected : $config['captcha_plugin'];
@@ -46,7 +46,7 @@ class acp_captcha
// Delegate
if ($configure)
{
- $config_captcha =& phpbb_captcha_factory::get_instance($selected);
+ $config_captcha = phpbb_captcha_factory::get_instance($selected);
$config_captcha->acp_page($id, $this);
}
else
@@ -78,11 +78,11 @@ class acp_captcha
// sanity check
if (isset($captchas['available'][$selected]))
{
- $old_captcha =& phpbb_captcha_factory::get_instance($config['captcha_plugin']);
+ $old_captcha = phpbb_captcha_factory::get_instance($config['captcha_plugin']);
$old_captcha->uninstall();
set_config('captcha_plugin', $selected);
- $new_captcha =& phpbb_captcha_factory::get_instance($config['captcha_plugin']);
+ $new_captcha = phpbb_captcha_factory::get_instance($config['captcha_plugin']);
$new_captcha->install();
add_log('admin', 'LOG_CONFIG_VISUAL');
@@ -104,16 +104,16 @@ class acp_captcha
foreach ($captchas['available'] as $value => $title)
{
$current = ($selected !== false && $value == $selected) ? ' selected="selected"' : '';
- $captcha_select .= '<option value="' . $value . '"' . $current . '>' . $user->lang[$title] . '</option>';
+ $captcha_select .= '<option value="' . $value . '"' . $current . '>' . $user->lang($title) . '</option>';
}
foreach ($captchas['unavailable'] as $value => $title)
{
$current = ($selected !== false && $value == $selected) ? ' selected="selected"' : '';
- $captcha_select .= '<option value="' . $value . '"' . $current . ' class="disabled-option">' . $user->lang[$title] . '</option>';
+ $captcha_select .= '<option value="' . $value . '"' . $current . ' class="disabled-option">' . $user->lang($title) . '</option>';
}
- $demo_captcha =& phpbb_captcha_factory::get_instance($selected);
+ $demo_captcha = phpbb_captcha_factory::get_instance($selected);
foreach ($config_vars as $config_var => $options)
{
@@ -138,7 +138,7 @@ class acp_captcha
{
global $db, $user, $config;
- $captcha =& phpbb_captcha_factory::get_instance($selected);
+ $captcha = phpbb_captcha_factory::get_instance($selected);
$captcha->init(CONFIRM_REG);
$captcha->execute_demo();
@@ -146,5 +146,3 @@ class acp_captcha
exit_handler();
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/acp/acp_database.php b/phpBB/includes/acp/acp_database.php
index 758cd10434..8afc3709b9 100644
--- a/phpBB/includes/acp/acp_database.php
+++ b/phpBB/includes/acp/acp_database.php
@@ -2,9 +2,8 @@
/**
*
* @package acp
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -29,11 +28,7 @@ class acp_database
global $cache, $db, $user, $auth, $template, $table_prefix;
global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;
- if (!class_exists('phpbb_db_tools'))
- {
- require($phpbb_root_path . 'includes/db/db_tools.' . $phpEx);
- }
- $this->db_tools = new phpbb_db_tools($db);
+ $this->db_tools = new \phpbb\db\tools($db);
$user->add_lang('acp/database');
@@ -99,29 +94,29 @@ class acp_database
case 'mysqli':
case 'mysql4':
case 'mysql':
- $extractor = new mysql_extractor($download, $store, $format, $filename, $time);
+ $extractor = new mysql_extractor($format, $filename, $time, $download, $store);
break;
case 'sqlite':
- $extractor = new sqlite_extractor($download, $store, $format, $filename, $time);
+ $extractor = new sqlite_extractor($format, $filename, $time, $download, $store);
break;
case 'postgres':
- $extractor = new postgres_extractor($download, $store, $format, $filename, $time);
+ $extractor = new postgres_extractor($format, $filename, $time, $download, $store);
break;
case 'oracle':
- $extractor = new oracle_extractor($download, $store, $format, $filename, $time);
+ $extractor = new oracle_extractor($format, $filename, $time, $download, $store);
break;
case 'mssql':
case 'mssql_odbc':
case 'mssqlnative':
- $extractor = new mssql_extractor($download, $store, $format, $filename, $time);
+ $extractor = new mssql_extractor($format, $filename, $time, $download, $store);
break;
case 'firebird':
- $extractor = new firebird_extractor($download, $store, $format, $filename, $time);
+ $extractor = new firebird_extractor($format, $filename, $time, $download, $store);
break;
}
@@ -493,8 +488,10 @@ class base_extractor
var $format;
var $run_comp = false;
- function base_extractor($download = false, $store = false, $format, $filename, $time)
+ function base_extractor($format, $filename, $time, $download = false, $store = false)
{
+ global $request;
+
$this->download = $download;
$this->store = $store;
$this->time = $time;
@@ -539,7 +536,7 @@ class base_extractor
break;
case 'gzip':
- if ((isset($_SERVER['HTTP_ACCEPT_ENCODING']) && strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') !== false) && strpos(strtolower($_SERVER['HTTP_USER_AGENT']), 'msie') === false)
+ if (strpos($request->header('Accept-Encoding'), 'gzip') !== false && strpos(strtolower($request->header('User-Agent')), 'msie') === false)
{
ob_start('ob_gzhandler');
}
@@ -1016,43 +1013,8 @@ class sqlite_extractor extends base_extractor
function write_data($table_name)
{
global $db;
- static $proper;
-
- if (is_null($proper))
- {
- $proper = version_compare(PHP_VERSION, '5.1.3', '>=');
- }
-
- if ($proper)
- {
- $col_types = sqlite_fetch_column_types($db->db_connect_id, $table_name);
- }
- else
- {
- $sql = "SELECT sql
- FROM sqlite_master
- WHERE type = 'table'
- AND name = '" . $table_name . "'";
- $table_data = sqlite_single_query($db->db_connect_id, $sql);
- $table_data = preg_replace('#CREATE\s+TABLE\s+"?' . $table_name . '"?#i', '', $table_data);
- $table_data = trim($table_data);
-
- preg_match('#\((.*)\)#s', $table_data, $matches);
-
- $table_cols = explode(',', trim($matches[1]));
- foreach ($table_cols as $declaration)
- {
- $entities = preg_split('#\s+#', trim($declaration));
- $column_name = preg_replace('/"?([^"]+)"?/', '\1', $entities[0]);
- // Hit a primary key, those are not what we need :D
- if (empty($entities[1]) || (strtolower($entities[0]) === 'primary' && strtolower($entities[1]) === 'key'))
- {
- continue;
- }
- $col_types[$column_name] = $entities[1];
- }
- }
+ $col_types = sqlite_fetch_column_types($db->db_connect_id, $table_name);
$sql = "SELECT *
FROM $table_name";
@@ -1624,7 +1586,7 @@ class mssql_extractor extends base_extractor
}
$this->flush($sql_data);
}
-
+
function write_data_mssqlnative($table_name)
{
global $db;
@@ -1645,16 +1607,17 @@ class mssql_extractor extends base_extractor
return;
}
- $sql = "SELECT * FROM $table_name";
- $result_fields = $db->sql_query_limit($sql, 1);
+ $sql = "SELECT COLUMN_NAME, DATA_TYPE
+ FROM INFORMATION_SCHEMA.COLUMNS
+ WHERE INFORMATION_SCHEMA.COLUMNS.TABLE_NAME = '" . $db->sql_escape($table_name) . "'";
+ $result_fields = $db->sql_query($sql);
- $row = new result_mssqlnative($result_fields);
- $i_num_fields = $row->num_fields();
-
- for ($i = 0; $i < $i_num_fields; $i++)
+ $i_num_fields = 0;
+ while ($row = $db->sql_fetchrow($result_fields))
{
- $ary_type[$i] = $row->field_type($i);
- $ary_name[$i] = $row->field_name($i);
+ $ary_type[$i_num_fields] = $row['DATA_TYPE'];
+ $ary_name[$i_num_fields] = $row['COLUMN_NAME'];
+ $i_num_fields++;
}
$db->sql_freeresult($result_fields);
@@ -1663,7 +1626,7 @@ class mssql_extractor extends base_extractor
WHERE COLUMNPROPERTY(object_id('$table_name'), COLUMN_NAME, 'IsIdentity') = 1";
$result2 = $db->sql_query($sql);
$row2 = $db->sql_fetchrow($result2);
-
+
if (!empty($row2['has_identity']))
{
$sql_data .= "\nSET IDENTITY_INSERT $table_name ON\nGO\n";
@@ -1727,8 +1690,8 @@ class mssql_extractor extends base_extractor
$sql_data .= "\nSET IDENTITY_INSERT $table_name OFF\nGO\n";
}
$this->flush($sql_data);
- }
-
+ }
+
function write_data_odbc($table_name)
{
global $db;
@@ -2464,5 +2427,3 @@ function fgetd_seekless(&$fp, $delim, $read, $seek, $eof, $buffer = 8192)
return false;
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/acp/acp_disallow.php b/phpBB/includes/acp/acp_disallow.php
index e2176b7bcd..f613fa325d 100644
--- a/phpBB/includes/acp/acp_disallow.php
+++ b/phpBB/includes/acp/acp_disallow.php
@@ -2,9 +2,8 @@
/**
*
* @package acp
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -116,5 +115,3 @@ class acp_disallow
);
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/acp/acp_email.php b/phpBB/includes/acp/acp_email.php
index df0d44c0c5..c9d149b6d7 100644
--- a/phpBB/includes/acp/acp_email.php
+++ b/phpBB/includes/acp/acp_email.php
@@ -2,9 +2,8 @@
/**
*
* @package acp
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -281,5 +280,3 @@ class acp_email
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/acp/acp_extensions.php b/phpBB/includes/acp/acp_extensions.php
new file mode 100644
index 0000000000..2ff479d824
--- /dev/null
+++ b/phpBB/includes/acp/acp_extensions.php
@@ -0,0 +1,355 @@
+<?php
+/**
+*
+* @package acp
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* @package acp
+*/
+class acp_extensions
+{
+ var $u_action;
+
+ private $db;
+ private $config;
+ private $template;
+ private $user;
+
+ function main()
+ {
+ // Start the page
+ global $config, $user, $template, $request, $phpbb_extension_manager, $db, $phpbb_root_path, $phpEx;
+
+ $this->db = $db;
+ $this->config = $config;
+ $this->template = $template;
+ $this->user = $user;
+
+ $user->add_lang(array('install', 'acp/extensions', 'migrator'));
+
+ $this->page_title = 'ACP_EXTENSIONS';
+
+ $action = $request->variable('action', 'list');
+ $ext_name = $request->variable('ext_name', '');
+
+ // What is a safe limit of execution time? Half the max execution time should be safe.
+ $safe_time_limit = (ini_get('max_execution_time') / 2);
+ $start_time = time();
+
+ // Cancel action
+ if ($request->is_set_post('cancel'))
+ {
+ $action = 'list';
+ $ext_name = '';
+ }
+
+ if (in_array($action, array('enable', 'disable', 'delete_data')) && !check_link_hash($request->variable('hash', ''), $action . '.' . $ext_name))
+ {
+ trigger_error('FORM_INVALID', E_USER_WARNING);
+ }
+
+ // If they've specified an extension, let's load the metadata manager and validate it.
+ if ($ext_name)
+ {
+ $md_manager = new \phpbb\extension\metadata_manager($ext_name, $config, $phpbb_extension_manager, $template, $phpbb_root_path);
+
+ try
+ {
+ $md_manager->get_metadata('all');
+ }
+ catch(\phpbb\extension\exception $e)
+ {
+ trigger_error($e, E_USER_WARNING);
+ }
+ }
+
+ // What are we doing?
+ switch ($action)
+ {
+ case 'list':
+ default:
+ $this->list_enabled_exts($phpbb_extension_manager);
+ $this->list_disabled_exts($phpbb_extension_manager);
+ $this->list_available_exts($phpbb_extension_manager);
+
+ $this->tpl_name = 'acp_ext_list';
+ break;
+
+ case 'enable_pre':
+ if (!$md_manager->validate_dir())
+ {
+ trigger_error($user->lang['EXTENSION_DIR_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ if (!$md_manager->validate_enable())
+ {
+ trigger_error($user->lang['EXTENSION_NOT_AVAILABLE'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ if ($phpbb_extension_manager->enabled($ext_name))
+ {
+ redirect($this->u_action);
+ }
+
+ $this->tpl_name = 'acp_ext_enable';
+
+ $template->assign_vars(array(
+ 'PRE' => true,
+ 'L_CONFIRM_MESSAGE' => $this->user->lang('EXTENSION_ENABLE_CONFIRM', $md_manager->get_metadata('display-name')),
+ 'U_ENABLE' => $this->u_action . '&amp;action=enable&amp;ext_name=' . urlencode($ext_name) . '&amp;hash=' . generate_link_hash('enable.' . $ext_name),
+ ));
+ break;
+
+ case 'enable':
+ if (!$md_manager->validate_dir())
+ {
+ trigger_error($user->lang['EXTENSION_DIR_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ if (!$md_manager->validate_enable())
+ {
+ trigger_error($user->lang['EXTENSION_NOT_AVAILABLE'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
+ try
+ {
+ while ($phpbb_extension_manager->enable_step($ext_name))
+ {
+ // Are we approaching the time limit? If so we want to pause the update and continue after refreshing
+ if ((time() - $start_time) >= $safe_time_limit)
+ {
+ $template->assign_var('S_NEXT_STEP', true);
+
+ meta_refresh(0, $this->u_action . '&amp;action=enable&amp;ext_name=' . urlencode($ext_name) . '&amp;hash=' . generate_link_hash('enable.' . $ext_name));
+ }
+ }
+ }
+ catch (\phpbb\db\migration\exception $e)
+ {
+ $template->assign_var('MIGRATOR_ERROR', $e->getLocalisedMessage($user));
+ }
+
+ $this->tpl_name = 'acp_ext_enable';
+
+ $template->assign_vars(array(
+ 'U_RETURN' => $this->u_action . '&amp;action=list',
+ ));
+ break;
+
+ case 'disable_pre':
+ if (!$phpbb_extension_manager->enabled($ext_name))
+ {
+ redirect($this->u_action);
+ }
+
+ $this->tpl_name = 'acp_ext_disable';
+
+ $template->assign_vars(array(
+ 'PRE' => true,
+ 'L_CONFIRM_MESSAGE' => $this->user->lang('EXTENSION_DISABLE_CONFIRM', $md_manager->get_metadata('display-name')),
+ 'U_DISABLE' => $this->u_action . '&amp;action=disable&amp;ext_name=' . urlencode($ext_name) . '&amp;hash=' . generate_link_hash('disable.' . $ext_name),
+ ));
+ break;
+
+ case 'disable':
+ while ($phpbb_extension_manager->disable_step($ext_name))
+ {
+ // Are we approaching the time limit? If so we want to pause the update and continue after refreshing
+ if ((time() - $start_time) >= $safe_time_limit)
+ {
+ $template->assign_var('S_NEXT_STEP', true);
+
+ meta_refresh(0, $this->u_action . '&amp;action=disable&amp;ext_name=' . urlencode($ext_name) . '&amp;hash=' . generate_link_hash('disable.' . $ext_name));
+ }
+ }
+
+ $this->tpl_name = 'acp_ext_disable';
+
+ $template->assign_vars(array(
+ 'U_RETURN' => $this->u_action . '&amp;action=list',
+ ));
+ break;
+
+ case 'delete_data_pre':
+ if ($phpbb_extension_manager->enabled($ext_name))
+ {
+ redirect($this->u_action);
+ }
+ $this->tpl_name = 'acp_ext_delete_data';
+
+ $template->assign_vars(array(
+ 'PRE' => true,
+ 'L_CONFIRM_MESSAGE' => $this->user->lang('EXTENSION_DELETE_DATA_CONFIRM', $md_manager->get_metadata('display-name')),
+ 'U_PURGE' => $this->u_action . '&amp;action=delete_data&amp;ext_name=' . urlencode($ext_name) . '&amp;hash=' . generate_link_hash('delete_data.' . $ext_name),
+ ));
+ break;
+
+ case 'delete_data':
+ try
+ {
+ while ($phpbb_extension_manager->purge_step($ext_name))
+ {
+ // Are we approaching the time limit? If so we want to pause the update and continue after refreshing
+ if ((time() - $start_time) >= $safe_time_limit)
+ {
+ $template->assign_var('S_NEXT_STEP', true);
+
+ meta_refresh(0, $this->u_action . '&amp;action=delete_data&amp;ext_name=' . urlencode($ext_name) . '&amp;hash=' . generate_link_hash('delete_data.' . $ext_name));
+ }
+ }
+ }
+ catch (\phpbb\db\migration\exception $e)
+ {
+ $template->assign_var('MIGRATOR_ERROR', $e->getLocalisedMessage($user));
+ }
+
+ $this->tpl_name = 'acp_ext_delete_data';
+
+ $template->assign_vars(array(
+ 'U_RETURN' => $this->u_action . '&amp;action=list',
+ ));
+ break;
+
+ case 'details':
+ // Output it to the template
+ $md_manager->output_template_data();
+
+ $template->assign_var('U_BACK', $this->u_action . '&amp;action=list');
+
+ $this->tpl_name = 'acp_ext_details';
+ break;
+ }
+ }
+
+ /**
+ * Lists all the enabled extensions and dumps to the template
+ *
+ * @param $phpbb_extension_manager An instance of the extension manager
+ * @return null
+ */
+ public function list_enabled_exts(\phpbb\extension\manager $phpbb_extension_manager)
+ {
+ foreach ($phpbb_extension_manager->all_enabled() as $name => $location)
+ {
+ $md_manager = $phpbb_extension_manager->create_extension_metadata_manager($name, $this->template);
+
+ try
+ {
+ $this->template->assign_block_vars('enabled', array(
+ 'META_DISPLAY_NAME' => $md_manager->get_metadata('display-name'),
+
+ 'U_DETAILS' => $this->u_action . '&amp;action=details&amp;ext_name=' . urlencode($name),
+ ));
+
+ $this->output_actions('enabled', array(
+ 'DISABLE' => $this->u_action . '&amp;action=disable_pre&amp;ext_name=' . urlencode($name),
+ ));
+ }
+ catch(\phpbb\extension\exception $e)
+ {
+ $this->template->assign_block_vars('disabled', array(
+ 'META_DISPLAY_NAME' => $this->user->lang('EXTENSION_INVALID_LIST', $name, $e),
+ ));
+ }
+ }
+ }
+
+ /**
+ * Lists all the disabled extensions and dumps to the template
+ *
+ * @param $phpbb_extension_manager An instance of the extension manager
+ * @return null
+ */
+ public function list_disabled_exts(\phpbb\extension\manager $phpbb_extension_manager)
+ {
+ foreach ($phpbb_extension_manager->all_disabled() as $name => $location)
+ {
+ $md_manager = $phpbb_extension_manager->create_extension_metadata_manager($name, $this->template);
+
+ try
+ {
+ $this->template->assign_block_vars('disabled', array(
+ 'META_DISPLAY_NAME' => $md_manager->get_metadata('display-name'),
+
+ 'U_DETAILS' => $this->u_action . '&amp;action=details&amp;ext_name=' . urlencode($name),
+ ));
+
+ $this->output_actions('disabled', array(
+ 'ENABLE' => $this->u_action . '&amp;action=enable_pre&amp;ext_name=' . urlencode($name),
+ 'DELETE_DATA' => $this->u_action . '&amp;action=delete_data_pre&amp;ext_name=' . urlencode($name),
+ ));
+ }
+ catch(\phpbb\extension\exception $e)
+ {
+ $this->template->assign_block_vars('disabled', array(
+ 'META_DISPLAY_NAME' => $this->user->lang('EXTENSION_INVALID_LIST', $name, $e),
+ ));
+ }
+ }
+ }
+
+ /**
+ * Lists all the available extensions and dumps to the template
+ *
+ * @param $phpbb_extension_manager An instance of the extension manager
+ * @return null
+ */
+ public function list_available_exts(\phpbb\extension\manager $phpbb_extension_manager)
+ {
+ $uninstalled = array_diff_key($phpbb_extension_manager->all_available(), $phpbb_extension_manager->all_configured());
+
+ foreach ($uninstalled as $name => $location)
+ {
+ $md_manager = $phpbb_extension_manager->create_extension_metadata_manager($name, $this->template);
+
+ try
+ {
+ $this->template->assign_block_vars('disabled', array(
+ 'META_DISPLAY_NAME' => $md_manager->get_metadata('display-name'),
+
+ 'U_DETAILS' => $this->u_action . '&amp;action=details&amp;ext_name=' . urlencode($name),
+ ));
+
+ $this->output_actions('disabled', array(
+ 'ENABLE' => $this->u_action . '&amp;action=enable_pre&amp;ext_name=' . urlencode($name),
+ ));
+ }
+ catch(\phpbb\extension\exception $e)
+ {
+ $this->template->assign_block_vars('disabled', array(
+ 'META_DISPLAY_NAME' => $this->user->lang('EXTENSION_INVALID_LIST', $name, $e),
+ ));
+ }
+ }
+ }
+
+ /**
+ * Output actions to a block
+ *
+ * @param string $block
+ * @param array $actions
+ */
+ private function output_actions($block, $actions)
+ {
+ foreach ($actions as $lang => $url)
+ {
+ $this->template->assign_block_vars($block . '.actions', array(
+ 'L_ACTION' => $this->user->lang('EXTENSION_' . $lang),
+ 'L_ACTION_EXPLAIN' => (isset($this->user->lang['EXTENSION_' . $lang . '_EXPLAIN'])) ? $this->user->lang('EXTENSION_' . $lang . '_EXPLAIN') : '',
+ 'U_ACTION' => $url,
+ ));
+ }
+ }
+}
diff --git a/phpBB/includes/acp/acp_forums.php b/phpBB/includes/acp/acp_forums.php
index dc2e6b75fb..a1af8c489d 100644
--- a/phpBB/includes/acp/acp_forums.php
+++ b/phpBB/includes/acp/acp_forums.php
@@ -2,9 +2,8 @@
/**
*
* @package acp
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -26,7 +25,7 @@ class acp_forums
function main($id, $mode)
{
- global $db, $user, $auth, $template, $cache;
+ global $db, $user, $auth, $template, $cache, $request, $phpbb_dispatcher;
global $config, $phpbb_admin_path, $phpbb_root_path, $phpEx;
$user->add_lang('acp/forums');
@@ -150,6 +149,17 @@ class acp_forums
'forum_password_unset' => request_var('forum_password_unset', false),
);
+ /**
+ * Request forum data and operate on it (parse texts, etc.)
+ *
+ * @event core.acp_manage_forums_request_data
+ * @var string action Type of the action: add|edit
+ * @var array forum_data Array with new forum data
+ * @since 3.1-A1
+ */
+ $vars = array('action', 'forum_data');
+ extract($phpbb_dispatcher->trigger_event('core.acp_manage_forums_request_data', compact($vars)));
+
// On add, add empty forum_options... else do not consider it (not updating it)
if ($action == 'add')
{
@@ -195,7 +205,7 @@ class acp_forums
($action != 'edit' || empty($forum_id) || ($auth->acl_get('a_fauth') && $auth->acl_get('a_authusers') && $auth->acl_get('a_authgroups') && $auth->acl_get('a_mauth'))))
{
copy_forum_permissions($forum_perm_from, $forum_data['forum_id'], ($action == 'edit') ? true : false);
- cache_moderators();
+ phpbb_cache_moderators($db, $cache, $auth);
$copied_permissions = true;
}
/* Commented out because of questionable UI workflow - re-visit for 3.0.7
@@ -256,6 +266,12 @@ class acp_forums
$cache->destroy('sql', FORUMS_TABLE);
}
+ if ($request->is_ajax())
+ {
+ $json_response = new \phpbb\json_response;
+ $json_response->send(array('success' => ($move_forum_name !== false)));
+ }
+
break;
case 'sync':
@@ -266,7 +282,7 @@ class acp_forums
@set_time_limit(0);
- $sql = 'SELECT forum_name, forum_topics_real
+ $sql = 'SELECT forum_name, (forum_topics_approved + forum_topics_unapproved + forum_topics_softdeleted) AS total_topics
FROM ' . FORUMS_TABLE . "
WHERE forum_id = $forum_id";
$result = $db->sql_query($sql);
@@ -278,7 +294,7 @@ class acp_forums
trigger_error($user->lang['NO_FORUM'] . adm_back_link($this->u_action . '&amp;parent_id=' . $this->parent_id), E_USER_WARNING);
}
- if ($row['forum_topics_real'])
+ if ($row['total_topics'])
{
$sql = 'SELECT MIN(topic_id) as min_topic_id, MAX(topic_id) as max_topic_id
FROM ' . TOPICS_TABLE . '
@@ -297,7 +313,6 @@ class acp_forums
$end = $start + $batch_size;
// Sync all topics in batch mode...
- sync('topic_approved', 'range', 'topic_id BETWEEN ' . $start . ' AND ' . $end, true, false);
sync('topic', 'range', 'topic_id BETWEEN ' . $start . ' AND ' . $end, true, true);
if ($end < $row2['max_topic_id'])
@@ -313,15 +328,15 @@ class acp_forums
$start += $batch_size;
- $url = $this->u_action . "&amp;parent_id={$this->parent_id}&amp;f=$forum_id&amp;action=sync&amp;start=$start&amp;topics_done=$topics_done&amp;total={$row['forum_topics_real']}";
+ $url = $this->u_action . "&amp;parent_id={$this->parent_id}&amp;f=$forum_id&amp;action=sync&amp;start=$start&amp;topics_done=$topics_done&amp;total={$row['total_topics']}";
meta_refresh(0, $url);
$template->assign_vars(array(
- 'U_PROGRESS_BAR' => $this->u_action . "&amp;action=progress_bar&amp;start=$topics_done&amp;total={$row['forum_topics_real']}",
- 'UA_PROGRESS_BAR' => addslashes($this->u_action . "&amp;action=progress_bar&amp;start=$topics_done&amp;total={$row['forum_topics_real']}"),
+ 'U_PROGRESS_BAR' => $this->u_action . "&amp;action=progress_bar&amp;start=$topics_done&amp;total={$row['total_topics']}",
+ 'UA_PROGRESS_BAR' => addslashes($this->u_action . "&amp;action=progress_bar&amp;start=$topics_done&amp;total={$row['total_topics']}"),
'S_CONTINUE_SYNC' => true,
- 'L_PROGRESS_EXPLAIN' => sprintf($user->lang['SYNC_IN_PROGRESS_EXPLAIN'], $topics_done, $row['forum_topics_real']))
+ 'L_PROGRESS_EXPLAIN' => sprintf($user->lang['SYNC_IN_PROGRESS_EXPLAIN'], $topics_done, $row['total_topics']))
);
return;
@@ -335,7 +350,7 @@ class acp_forums
'U_PROGRESS_BAR' => $this->u_action . '&amp;action=progress_bar',
'UA_PROGRESS_BAR' => addslashes($this->u_action . '&amp;action=progress_bar'),
'S_CONTINUE_SYNC' => true,
- 'L_PROGRESS_EXPLAIN' => sprintf($user->lang['SYNC_IN_PROGRESS_EXPLAIN'], 0, $row['forum_topics_real']))
+ 'L_PROGRESS_EXPLAIN' => sprintf($user->lang['SYNC_IN_PROGRESS_EXPLAIN'], 0, $row['total_topics']))
);
return;
@@ -380,6 +395,9 @@ class acp_forums
$forum_data['forum_flags'] += (request_var('enable_quick_reply', false)) ? FORUM_FLAG_QUICK_REPLY : 0;
}
+ // Initialise $row, so we always have it in the event
+ $row = array();
+
// Show form to create/modify a forum
if ($action == 'edit')
{
@@ -447,6 +465,24 @@ class acp_forums
}
}
+ /**
+ * Initialise data before we display the add/edit form
+ *
+ * @event core.acp_manage_forums_initialise_data
+ * @var string action Type of the action: add|edit
+ * @var bool update Do we display the form only
+ * or did the user press submit
+ * @var int forum_id When editing: the forum id,
+ * when creating: the parent forum id
+ * @var array row Array with current forum data
+ * empty when creating new forum
+ * @var array forum_data Array with new forum data
+ * @var string parents_list List of parent options
+ * @since 3.1-A1
+ */
+ $vars = array('action', 'update', 'forum_id', 'row', 'forum_data', 'parents_list');
+ extract($phpbb_dispatcher->trigger_event('core.acp_manage_forums_initialise_data', compact($vars)));
+
$forum_rules_data = array(
'text' => $forum_data['forum_rules'],
'allow_bbcode' => true,
@@ -576,7 +612,7 @@ class acp_forums
$errors[] = $user->lang['FORUM_PASSWORD_OLD'];
}
- $template->assign_vars(array(
+ $template_data = array(
'S_EDIT_FORUM' => true,
'S_ERROR' => (sizeof($errors)) ? true : false,
'S_PARENT_ID' => $this->parent_id,
@@ -641,7 +677,31 @@ class acp_forums
'S_ENABLE_POST_REVIEW' => ($forum_data['forum_flags'] & FORUM_FLAG_POST_REVIEW) ? true : false,
'S_ENABLE_QUICK_REPLY' => ($forum_data['forum_flags'] & FORUM_FLAG_QUICK_REPLY) ? true : false,
'S_CAN_COPY_PERMISSIONS' => ($action != 'edit' || empty($forum_id) || ($auth->acl_get('a_fauth') && $auth->acl_get('a_authusers') && $auth->acl_get('a_authgroups') && $auth->acl_get('a_mauth'))) ? true : false,
- ));
+ );
+
+ /**
+ * Modify forum template data before we display the form
+ *
+ * @event core.acp_manage_forums_display_form
+ * @var string action Type of the action: add|edit
+ * @var bool update Do we display the form only
+ * or did the user press submit
+ * @var int forum_id When editing: the forum id,
+ * when creating: the parent forum id
+ * @var array row Array with current forum data
+ * empty when creating new forum
+ * @var array forum_data Array with new forum data
+ * @var string parents_list List of parent options
+ * @var array errors Array of errors, if you add errors
+ * ensure to update the template variables
+ * S_ERROR and ERROR_MSG to display it
+ * @var array template_data Array with new forum data
+ * @since 3.1-A1
+ */
+ $vars = array('action', 'update', 'forum_id', 'row', 'forum_data', 'parents_list', 'errors', 'template_data');
+ extract($phpbb_dispatcher->trigger_event('core.acp_manage_forums_display_form', compact($vars)));
+
+ $template->assign_vars($template_data);
return;
@@ -706,7 +766,7 @@ class acp_forums
if (!empty($forum_perm_from) && $forum_perm_from != $forum_id)
{
copy_forum_permissions($forum_perm_from, $forum_id, true);
- cache_moderators();
+ phpbb_cache_moderators($db, $cache, $auth);
$auth->acl_clear_prefetch();
$cache->destroy('sql', FORUMS_TABLE);
@@ -795,8 +855,8 @@ class acp_forums
'FORUM_IMAGE_SRC' => ($row['forum_image']) ? $phpbb_root_path . $row['forum_image'] : '',
'FORUM_NAME' => $row['forum_name'],
'FORUM_DESCRIPTION' => generate_text_for_display($row['forum_desc'], $row['forum_desc_uid'], $row['forum_desc_bitfield'], $row['forum_desc_options']),
- 'FORUM_TOPICS' => $row['forum_topics'],
- 'FORUM_POSTS' => $row['forum_posts'],
+ 'FORUM_TOPICS' => $row['forum_topics_approved'],
+ 'FORUM_POSTS' => $row['forum_posts_approved'],
'S_FORUM_LINK' => ($forum_type == FORUM_LINK) ? true : false,
'S_FORUM_POST' => ($forum_type == FORUM_POST) ? true : false,
@@ -866,10 +926,22 @@ class acp_forums
*/
function update_forum_data(&$forum_data)
{
- global $db, $user, $cache, $phpbb_root_path;
+ global $db, $user, $cache, $phpbb_root_path, $phpbb_container, $phpbb_dispatcher;
$errors = array();
+ /**
+ * Validate the forum data before we create/update the forum
+ *
+ * @event core.acp_manage_forums_validate_data
+ * @var array forum_data Array with new forum data
+ * @var array errors Array of errors, should be strings and not
+ * language key.
+ * @since 3.1-A1
+ */
+ $vars = array('forum_data', 'errors');
+ extract($phpbb_dispatcher->trigger_event('core.acp_manage_forums_validate_data', compact($vars)));
+
if ($forum_data['forum_name'] == '')
{
$errors[] = $user->lang['FORUM_NAME_EMPTY'];
@@ -958,11 +1030,29 @@ class acp_forums
}
else
{
- $forum_data_sql['forum_password'] = phpbb_hash($forum_data_sql['forum_password']);
+ // Instantiate passwords manager
+ $passwords_manager = $phpbb_container->get('passwords.manager');
+
+ $forum_data_sql['forum_password'] = $passwords_manager->hash($forum_data_sql['forum_password']);
}
unset($forum_data_sql['forum_password_unset']);
- if (!isset($forum_data_sql['forum_id']))
+ /**
+ * Remove invalid values from forum_data_sql that should not be updated
+ *
+ * @event core.acp_manage_forums_update_data_before
+ * @var array forum_data Array with forum data
+ * @var array forum_data_sql Array with data we are going to update
+ * If forum_data_sql[forum_id] is set, we update
+ * that forum, otherwise a new one is created.
+ * @since 3.1-A1
+ */
+ $vars = array('forum_data', 'forum_data_sql');
+ extract($phpbb_dispatcher->trigger_event('core.acp_manage_forums_update_data_before', compact($vars)));
+
+ $is_new_forum = !isset($forum_data_sql['forum_id']);
+
+ if ($is_new_forum)
{
// no forum_id means we're creating a new forum
unset($forum_data_sql['type_action']);
@@ -1055,7 +1145,8 @@ class acp_forums
return array($user->lang['NO_FORUM_ACTION']);
}
- $forum_data_sql['forum_posts'] = $forum_data_sql['forum_topics'] = $forum_data_sql['forum_topics_real'] = $forum_data_sql['forum_last_post_id'] = $forum_data_sql['forum_last_poster_id'] = $forum_data_sql['forum_last_post_time'] = 0;
+ $forum_data_sql['forum_posts_approved'] = $forum_data_sql['forum_posts_unapproved'] = $forum_data_sql['forum_posts_softdeleted'] = $forum_data_sql['forum_topics_approved'] = $forum_data_sql['forum_topics_unapproved'] = $forum_data_sql['forum_topics_softdeleted'] = 0;
+ $forum_data_sql['forum_last_post_id'] = $forum_data_sql['forum_last_poster_id'] = $forum_data_sql['forum_last_post_time'] = 0;
$forum_data_sql['forum_last_poster_name'] = $forum_data_sql['forum_last_poster_colour'] = '';
}
else if ($row['forum_type'] == FORUM_CAT && $forum_data_sql['forum_type'] == FORUM_LINK)
@@ -1175,9 +1266,12 @@ class acp_forums
else if ($row['forum_type'] == FORUM_CAT && $forum_data_sql['forum_type'] == FORUM_POST)
{
// Changing a category to a forum? Reset the data (you can't post directly in a cat, you must use a forum)
- $forum_data_sql['forum_posts'] = 0;
- $forum_data_sql['forum_topics'] = 0;
- $forum_data_sql['forum_topics_real'] = 0;
+ $forum_data_sql['forum_posts_approved'] = 0;
+ $forum_data_sql['forum_posts_unapproved'] = 0;
+ $forum_data_sql['forum_posts_softdeleted'] = 0;
+ $forum_data_sql['forum_topics_approved'] = 0;
+ $forum_data_sql['forum_topics_unapproved'] = 0;
+ $forum_data_sql['forum_topics_softdeleted'] = 0;
$forum_data_sql['forum_last_post_id'] = 0;
$forum_data_sql['forum_last_post_subject'] = '';
$forum_data_sql['forum_last_post_time'] = 0;
@@ -1233,6 +1327,22 @@ class acp_forums
add_log('admin', 'LOG_FORUM_EDIT', $forum_data['forum_name']);
}
+ /**
+ * Event after a forum was updated or created
+ *
+ * @event core.acp_manage_forums_update_data_after
+ * @var array forum_data Array with forum data
+ * @var array forum_data_sql Array with data we updated
+ * @var bool is_new_forum Did we create a forum or update one
+ * If you want to overwrite this value,
+ * ensure to set forum_data_sql[forum_id]
+ * @var array errors Array of errors, should be strings and not
+ * language key.
+ * @since 3.1-A1
+ */
+ $vars = array('forum_data', 'forum_data_sql', 'is_new_forum', 'errors');
+ extract($phpbb_dispatcher->trigger_event('core.acp_manage_forums_update_data_after', compact($vars)));
+
return $errors;
}
@@ -1241,7 +1351,7 @@ class acp_forums
*/
function move_forum($from_id, $to_id)
{
- global $db, $user;
+ global $db, $user, $phpbb_dispatcher;
$to_data = $moved_ids = $errors = array();
@@ -1253,10 +1363,30 @@ class acp_forums
if ($to_data['forum_type'] == FORUM_LINK)
{
$errors[] = $user->lang['PARENT_IS_LINK_FORUM'];
- return $errors;
}
}
+ /**
+ * Event when we move all children of one forum to another
+ *
+ * This event may be triggered, when a forum is deleted
+ *
+ * @event core.acp_manage_forums_move_children
+ * @var int from_id If of the current parent forum
+ * @var int to_id If of the new parent forum
+ * @var array errors Array of errors, should be strings and not
+ * language key.
+ * @since 3.1-A1
+ */
+ $vars = array('from_id', 'to_id', 'errors');
+ extract($phpbb_dispatcher->trigger_event('core.acp_manage_forums_move_children', compact($vars)));
+
+ // Return if there were errors
+ if (!empty($errors))
+ {
+ return $errors;
+ }
+
$moved_forums = get_forum_branch($from_id, 'children', 'descending');
$from_data = $moved_forums[0];
$diff = sizeof($moved_forums) * 2;
@@ -1336,7 +1466,30 @@ class acp_forums
*/
function move_forum_content($from_id, $to_id, $sync = true)
{
- global $db;
+ global $db, $phpbb_dispatcher;
+
+ $errors = array();
+
+ /**
+ * Event when we move content from one forum to another
+ *
+ * @event core.acp_manage_forums_move_content
+ * @var int from_id If of the current parent forum
+ * @var int to_id If of the new parent forum
+ * @var bool sync Shall we sync the "to"-forum's data
+ * @var array errors Array of errors, should be strings and not
+ * language key. If this array is not empty,
+ * The content will not be moved.
+ * @since 3.1-A1
+ */
+ $vars = array('from_id', 'to_id', 'sync', 'errors');
+ extract($phpbb_dispatcher->trigger_event('core.acp_manage_forums_move_content', compact($vars)));
+
+ // Return if there were errors
+ if (!empty($errors))
+ {
+ return $errors;
+ }
$table_ary = array(LOG_TABLE, POSTS_TABLE, TOPICS_TABLE, DRAFTS_TABLE, TOPICS_TRACK_TABLE);
@@ -1645,7 +1798,7 @@ class acp_forums
FROM ' . POSTS_TABLE . '
WHERE forum_id = ' . $forum_id . '
AND post_postcount = 1
- AND post_approved = 1';
+ AND post_visibility = ' . ITEM_APPROVED;
$result = $db->sql_query($sql);
$post_counts = array();
@@ -1783,7 +1936,7 @@ class acp_forums
// Make sure the overall post/topic count is correct...
$sql = 'SELECT COUNT(post_id) AS stat
FROM ' . POSTS_TABLE . '
- WHERE post_approved = 1';
+ WHERE post_visibility = ' . ITEM_APPROVED;
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
@@ -1792,7 +1945,7 @@ class acp_forums
$sql = 'SELECT COUNT(topic_id) AS stat
FROM ' . TOPICS_TABLE . '
- WHERE topic_approved = 1';
+ WHERE topic_visibility = ' . ITEM_APPROVED;
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
@@ -1945,5 +2098,3 @@ class acp_forums
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/acp/acp_groups.php b/phpBB/includes/acp/acp_groups.php
index c9d476b8ae..7ecedcf51e 100644
--- a/phpBB/includes/acp/acp_groups.php
+++ b/phpBB/includes/acp/acp_groups.php
@@ -2,9 +2,8 @@
/**
*
* @package acp
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -27,6 +26,7 @@ class acp_groups
{
global $config, $db, $user, $auth, $template, $cache;
global $phpbb_root_path, $phpbb_admin_path, $phpEx, $table_prefix, $file_uploads;
+ global $request, $phpbb_container;
$user->add_lang('acp/groups');
$this->tpl_name = 'acp_groups';
@@ -35,6 +35,12 @@ class acp_groups
$form_key = 'acp_groups';
add_form_key($form_key);
+ if ($mode == 'position')
+ {
+ $this->manage_position();
+ return;
+ }
+
include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
// Check and set some common vars
@@ -49,15 +55,16 @@ class acp_groups
// Clear some vars
- $can_upload = (file_exists($phpbb_root_path . $config['avatar_path']) && phpbb_is_writable($phpbb_root_path . $config['avatar_path']) && $file_uploads) ? true : false;
$group_row = array();
// Grab basic data for group, if group_id is set and exists
if ($group_id)
{
- $sql = 'SELECT *
- FROM ' . GROUPS_TABLE . "
- WHERE group_id = $group_id";
+ $sql = 'SELECT g.*, t.teampage_position AS group_teampage
+ FROM ' . GROUPS_TABLE . ' g
+ LEFT JOIN ' . TEAMPAGE_TABLE . ' t
+ ON (t.group_id = g.group_id)
+ WHERE g.group_id = ' . $group_id;
$result = $db->sql_query($sql);
$group_row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
@@ -305,8 +312,25 @@ class acp_groups
$error = array();
$user->add_lang('ucp');
- $avatar_select = basename(request_var('avatar_select', ''));
- $category = basename(request_var('category', ''));
+ // Setup avatar data for later
+ $avatars_enabled = false;
+ $avatar_drivers = null;
+ $avatar_data = null;
+ $avatar_error = array();
+
+ if ($config['allow_avatar'])
+ {
+ $phpbb_avatar_manager = $phpbb_container->get('avatar.manager');
+ $avatar_drivers = $phpbb_avatar_manager->get_enabled_drivers();
+
+ // This is normalised data, without the group_ prefix
+ $avatar_data = \phpbb\avatar\manager::clean_row($group_row, 'group');
+ if (!isset($avatar_data['id']))
+ {
+ $avatar_data['id'] = 'g' . $group_id;
+ }
+ }
+
// Did we submit?
if ($update)
@@ -324,17 +348,12 @@ class acp_groups
$allow_desc_urls = request_var('desc_parse_urls', false);
$allow_desc_smilies = request_var('desc_parse_smilies', false);
- $data['uploadurl'] = request_var('uploadurl', '');
- $data['remotelink'] = request_var('remotelink', '');
- $data['width'] = request_var('width', '');
- $data['height'] = request_var('height', '');
- $delete = request_var('delete', '');
-
$submit_ary = array(
'colour' => request_var('group_colour', ''),
'rank' => request_var('group_rank', 0),
'receive_pm' => isset($_REQUEST['group_receive_pm']) ? 1 : 0,
'legend' => isset($_REQUEST['group_legend']) ? 1 : 0,
+ 'teampage' => isset($_REQUEST['group_teampage']) ? 1 : 0,
'message_limit' => request_var('group_message_limit', 0),
'max_recipients' => request_var('group_max_recipients', 0),
'founder_manage' => 0,
@@ -346,81 +365,39 @@ class acp_groups
$submit_ary['founder_manage'] = isset($_REQUEST['group_founder_manage']) ? 1 : 0;
}
- if (!empty($_FILES['uploadfile']['tmp_name']) || $data['uploadurl'] || $data['remotelink'])
+ if ($config['allow_avatar'])
{
- // Avatar stuff
- $var_ary = array(
- 'uploadurl' => array('string', true, 5, 255),
- 'remotelink' => array('string', true, 5, 255),
- 'width' => array('string', true, 1, 3),
- 'height' => array('string', true, 1, 3),
- );
-
- if (!($error = validate_data($data, $var_ary)))
- {
- $data['user_id'] = "g$group_id";
+ // Handle avatar
+ $driver_name = $phpbb_avatar_manager->clean_driver_name($request->variable('avatar_driver', ''));
- if ((!empty($_FILES['uploadfile']['tmp_name']) || $data['uploadurl']) && $can_upload)
- {
- list($submit_ary['avatar_type'], $submit_ary['avatar'], $submit_ary['avatar_width'], $submit_ary['avatar_height']) = avatar_upload($data, $error);
- }
- else if ($data['remotelink'])
- {
- list($submit_ary['avatar_type'], $submit_ary['avatar'], $submit_ary['avatar_width'], $submit_ary['avatar_height']) = avatar_remote($data, $error);
- }
- }
- }
- else if ($avatar_select && $config['allow_avatar_local'])
- {
- // check avatar gallery
- if (is_dir($phpbb_root_path . $config['avatar_gallery_path'] . '/' . $category))
+ if (in_array($driver_name, $avatar_drivers) && !$request->is_set_post('avatar_delete'))
{
- $submit_ary['avatar_type'] = AVATAR_GALLERY;
+ $driver = $phpbb_avatar_manager->get_driver($driver_name);
+ $result = $driver->process_form($request, $template, $user, $avatar_data, $avatar_error);
- list($submit_ary['avatar_width'], $submit_ary['avatar_height']) = getimagesize($phpbb_root_path . $config['avatar_gallery_path'] . '/' . $category . '/' . $avatar_select);
- $submit_ary['avatar'] = $category . '/' . $avatar_select;
- }
- }
- else if ($delete)
- {
- $submit_ary['avatar'] = '';
- $submit_ary['avatar_type'] = $submit_ary['avatar_width'] = $submit_ary['avatar_height'] = 0;
- }
- else if ($data['width'] && $data['height'])
- {
- // Only update the dimensions?
- if ($config['avatar_max_width'] || $config['avatar_max_height'])
- {
- if ($data['width'] > $config['avatar_max_width'] || $data['height'] > $config['avatar_max_height'])
+ if ($result && empty($avatar_error))
{
- $error[] = sprintf($user->lang['AVATAR_WRONG_SIZE'], $config['avatar_min_width'], $config['avatar_min_height'], $config['avatar_max_width'], $config['avatar_max_height'], $data['width'], $data['height']);
+ $result['avatar_type'] = $driver_name;
+ $submit_ary = array_merge($submit_ary, $result);
}
}
-
- if (!sizeof($error))
+ else
{
- if ($config['avatar_min_width'] || $config['avatar_min_height'])
+ $driver = $phpbb_avatar_manager->get_driver($avatar_data['avatar_type']);
+ if ($driver)
{
- if ($data['width'] < $config['avatar_min_width'] || $data['height'] < $config['avatar_min_height'])
- {
- $error[] = sprintf($user->lang['AVATAR_WRONG_SIZE'], $config['avatar_min_width'], $config['avatar_min_height'], $config['avatar_max_width'], $config['avatar_max_height'], $data['width'], $data['height']);
- }
+ $driver->delete($avatar_data);
}
- }
- if (!sizeof($error))
- {
- $submit_ary['avatar_width'] = $data['width'];
- $submit_ary['avatar_height'] = $data['height'];
+ // Removing the avatar
+ $submit_ary['avatar_type'] = '';
+ $submit_ary['avatar'] = '';
+ $submit_ary['avatar_width'] = 0;
+ $submit_ary['avatar_height'] = 0;
}
- }
- if ((isset($submit_ary['avatar']) && $submit_ary['avatar'] && (!isset($group_row['group_avatar']))) || $delete)
- {
- if (isset($group_row['group_avatar']) && $group_row['group_avatar'])
- {
- avatar_delete('group', $group_row, true);
- }
+ // Merge any avatar errors into the primary error array
+ $error = array_merge($error, $phpbb_avatar_manager->localize_errors($user, $avatar_error));
}
/*
@@ -445,17 +422,21 @@ class acp_groups
// Only set the rank, colour, etc. if it's changed or if we're adding a new
// group. This prevents existing group members being updated if no changes
// were made.
+ // However there are some attributes that need to be set everytime,
+ // otherwise the group gets removed from the feature.
+ $set_attributes = array('legend', 'teampage');
$group_attributes = array();
$test_variables = array(
'rank' => 'int',
'colour' => 'string',
'avatar' => 'string',
- 'avatar_type' => 'int',
+ 'avatar_type' => 'string',
'avatar_width' => 'int',
'avatar_height' => 'int',
'receive_pm' => 'int',
'legend' => 'int',
+ 'teampage' => 'int',
'message_limit' => 'int',
'max_recipients'=> 'int',
'founder_manage'=> 'int',
@@ -464,7 +445,7 @@ class acp_groups
foreach ($test_variables as $test => $type)
{
- if (isset($submit_ary[$test]) && ($action == 'add' || $group_row['group_' . $test] != $submit_ary[$test]))
+ if (isset($submit_ary[$test]) && ($action == 'add' || $group_row['group_' . $test] != $submit_ary[$test] || isset($group_attributes['group_avatar']) && strpos($test, 'avatar') === 0 || in_array($test, $set_attributes)))
{
settype($submit_ary[$test], $type);
$group_attributes['group_' . $test] = $group_row['group_' . $test] = $submit_ary[$test];
@@ -521,7 +502,7 @@ class acp_groups
}
}
- $cache->destroy('sql', GROUPS_TABLE);
+ $cache->destroy('sql', array(GROUPS_TABLE, TEAMPAGE_TABLE));
$message = ($action == 'edit') ? 'GROUP_UPDATED' : 'GROUP_CREATED';
trigger_error($user->lang[$message] . adm_back_link($this->u_action));
@@ -581,13 +562,44 @@ class acp_groups
$type_closed = ($group_type == GROUP_CLOSED) ? ' checked="checked"' : '';
$type_hidden = ($group_type == GROUP_HIDDEN) ? ' checked="checked"' : '';
- $avatar_img = (!empty($group_row['group_avatar'])) ? get_user_avatar($group_row['group_avatar'], $group_row['group_avatar_type'], $group_row['group_avatar_width'], $group_row['group_avatar_height'], 'GROUP_AVATAR') : '<img src="' . $phpbb_admin_path . 'images/no_avatar.gif" alt="" />';
+ // Load up stuff for avatars
+ if ($config['allow_avatar'])
+ {
+ $avatars_enabled = false;
+ $selected_driver = $phpbb_avatar_manager->clean_driver_name($request->variable('avatar_driver', $avatar_data['avatar_type']));
+
+ foreach ($avatar_drivers as $current_driver)
+ {
+ $driver = $phpbb_avatar_manager->get_driver($current_driver);
+
+ $avatars_enabled = true;
+ $config_name = $phpbb_avatar_manager->get_driver_config_name($driver);
+ $template->set_filenames(array(
+ 'avatar' => "acp_avatar_options_{$config_name}.html",
+ ));
+
+ if ($driver->prepare_form($request, $template, $user, $avatar_data, $avatar_error))
+ {
+ $driver_name = $phpbb_avatar_manager->prepare_driver_name($current_driver);
+ $driver_upper = strtoupper($driver_name);
+ $template->assign_block_vars('avatar_drivers', array(
+ 'L_TITLE' => $user->lang($driver_upper . '_TITLE'),
+ 'L_EXPLAIN' => $user->lang($driver_upper . '_EXPLAIN'),
+
+ 'DRIVER' => $driver_name,
+ 'SELECTED' => $current_driver == $selected_driver,
+ 'OUTPUT' => $template->assign_display('avatar'),
+ ));
+ }
+ }
+ }
- $display_gallery = (isset($_POST['display_gallery'])) ? true : false;
+ $avatar = phpbb_get_group_avatar($group_row, 'GROUP_AVATAR', true);
- if ($config['allow_avatar_local'] && $display_gallery)
+ if (isset($phpbb_avatar_manager) && !$update)
{
- avatar_gallery($category, $avatar_select, 4);
+ // Merge any avatar errors into the primary error array
+ $error = array_merge($error, $phpbb_avatar_manager->localize_errors($user, $avatar_error));
}
$back_link = request_var('back_link', '');
@@ -608,12 +620,10 @@ class acp_groups
'S_ADD_GROUP' => ($action == 'add') ? true : false,
'S_GROUP_PERM' => ($action == 'add' && $auth->acl_get('a_authgroups') && $auth->acl_gets('a_aauth', 'a_fauth', 'a_mauth', 'a_uauth')) ? true : false,
'S_INCLUDE_SWATCH' => true,
- 'S_CAN_UPLOAD' => $can_upload,
'S_ERROR' => (sizeof($error)) ? true : false,
'S_SPECIAL_GROUP' => ($group_type == GROUP_SPECIAL) ? true : false,
- 'S_DISPLAY_GALLERY' => ($config['allow_avatar_local'] && !$display_gallery) ? true : false,
- 'S_IN_GALLERY' => ($config['allow_avatar_local'] && $display_gallery) ? true : false,
'S_USER_FOUNDER' => ($user->data['user_type'] == USER_FOUNDER) ? true : false,
+ 'S_AVATARS_ENABLED' => ($config['allow_avatar'] && $avatars_enabled),
'ERROR_MSG' => (sizeof($error)) ? implode('<br />', $error) : '',
'GROUP_NAME' => ($group_type == GROUP_SPECIAL) ? $user->lang['G_' . $group_name] : $group_name,
@@ -622,6 +632,7 @@ class acp_groups
'GROUP_RECEIVE_PM' => (isset($group_row['group_receive_pm']) && $group_row['group_receive_pm']) ? ' checked="checked"' : '',
'GROUP_FOUNDER_MANAGE' => (isset($group_row['group_founder_manage']) && $group_row['group_founder_manage']) ? ' checked="checked"' : '',
'GROUP_LEGEND' => (isset($group_row['group_legend']) && $group_row['group_legend']) ? ' checked="checked"' : '',
+ 'GROUP_TEAMPAGE' => (isset($group_row['group_teampage']) && $group_row['group_teampage']) ? ' checked="checked"' : '',
'GROUP_MESSAGE_LIMIT' => (isset($group_row['group_message_limit'])) ? $group_row['group_message_limit'] : 0,
'GROUP_MAX_RECIPIENTS' => (isset($group_row['group_max_recipients'])) ? $group_row['group_max_recipients'] : 0,
'GROUP_COLOUR' => (isset($group_row['group_colour'])) ? $group_row['group_colour'] : '',
@@ -633,8 +644,7 @@ class acp_groups
'S_RANK_OPTIONS' => $rank_options,
'S_GROUP_OPTIONS' => group_select_options(false, false, (($user->data['user_type'] == USER_FOUNDER) ? false : 0)),
- 'AVATAR' => $avatar_img,
- 'AVATAR_IMAGE' => $avatar_img,
+ 'AVATAR' => empty($avatar) ? '<img src="' . $phpbb_admin_path . 'images/no_avatar.gif" alt="" />' : $avatar,
'AVATAR_MAX_FILESIZE' => $config['avatar_filesize'],
'AVATAR_WIDTH' => (isset($group_row['group_avatar_width'])) ? $group_row['group_avatar_width'] : '',
'AVATAR_HEIGHT' => (isset($group_row['group_avatar_height'])) ? $group_row['group_avatar_height'] : '',
@@ -651,9 +661,8 @@ class acp_groups
'GROUP_HIDDEN' => $type_hidden,
'U_BACK' => $u_back,
- 'U_SWATCH' => append_sid("{$phpbb_admin_path}swatch.$phpEx", 'form=settings&amp;name=group_colour'),
'U_ACTION' => "{$this->u_action}&amp;action=$action&amp;g=$group_id",
- 'L_AVATAR_EXPLAIN' => sprintf($user->lang['AVATAR_EXPLAIN'], $config['avatar_max_width'], $config['avatar_max_height'], round($config['avatar_filesize'] / 1024)),
+ 'L_AVATAR_EXPLAIN' => phpbb_avatar_explanation_string(),
));
return;
@@ -667,6 +676,7 @@ class acp_groups
}
$this->page_title = 'GROUP_MEMBERS';
+ $pagination = $phpbb_container->get('pagination');
// Grab the leaders - always, on every page...
$sql = 'SELECT u.user_id, u.username, u.username_clean, u.user_regdate, u.user_colour, u.user_posts, u.group_id, ug.group_leader, ug.user_pending
@@ -709,13 +719,14 @@ class acp_groups
$s_action_options .= '<option value="' . $option . '">' . $user->lang['GROUP_' . $lang] . '</option>';
}
+ $base_url = $this->u_action . "&amp;action=$action&amp;g=$group_id";
+ $pagination->generate_template_pagination($base_url, 'pagination', 'start', $total_members, $config['topics_per_page'], $start);
+
$template->assign_vars(array(
'S_LIST' => true,
'S_GROUP_SPECIAL' => ($group_row['group_type'] == GROUP_SPECIAL) ? true : false,
'S_ACTION_OPTIONS' => $s_action_options,
- 'S_ON_PAGE' => on_page($total_members, $config['topics_per_page'], $start),
- 'PAGINATION' => generate_pagination($this->u_action . "&amp;action=$action&amp;g=$group_id", $total_members, $config['topics_per_page'], $start, true),
'GROUP_NAME' => ($group_row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $group_row['group_name']] : $group_row['group_name'],
'U_ACTION' => $this->u_action . "&amp;g=$group_id",
@@ -831,6 +842,222 @@ class acp_groups
}
}
}
-}
-?>
+ public function manage_position()
+ {
+ global $config, $db, $template, $user, $request, $phpbb_container;
+
+ $this->tpl_name = 'acp_groups_position';
+ $this->page_title = 'ACP_GROUPS_POSITION';
+
+ $field = $request->variable('field', '');
+ $action = $request->variable('action', '');
+ $group_id = $request->variable('g', 0);
+ $teampage_id = $request->variable('t', 0);
+ $category_id = $request->variable('c', 0);
+
+ if ($field && !in_array($field, array('legend', 'teampage')))
+ {
+ // Invalid mode
+ trigger_error($user->lang['NO_MODE'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+ else if ($field && in_array($field, array('legend', 'teampage')))
+ {
+
+ $group_position = $phpbb_container->get('groupposition.' . $field);
+ }
+
+ if ($field == 'teampage')
+ {
+ try
+ {
+ switch ($action)
+ {
+ case 'add':
+ $group_position->add_group_teampage($group_id, $category_id);
+ break;
+
+ case 'add_category':
+ $group_position->add_category_teampage($request->variable('category_name', '', true));
+ break;
+
+ case 'delete':
+ $group_position->delete_teampage($teampage_id);
+ break;
+
+ case 'move_up':
+ $group_position->move_up_teampage($teampage_id);
+ break;
+
+ case 'move_down':
+ $group_position->move_down_teampage($teampage_id);
+ break;
+ }
+ }
+ catch (\phpbb\groupposition\exception $exception)
+ {
+ trigger_error($user->lang($exception->getMessage()) . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+ }
+ else if ($field == 'legend')
+ {
+ try
+ {
+ switch ($action)
+ {
+ case 'add':
+ $group_position->add_group($group_id);
+ break;
+
+ case 'delete':
+ $group_position->delete_group($group_id);
+ break;
+
+ case 'move_up':
+ $group_position->move_up($group_id);
+ break;
+
+ case 'move_down':
+ $group_position->move_down($group_id);
+ break;
+ }
+ }
+ catch (\phpbb\groupposition\exception $exception)
+ {
+ trigger_error($user->lang($exception->getMessage()) . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+ }
+ else
+ {
+ switch ($action)
+ {
+ case 'set_config_teampage':
+ $config->set('teampage_forums', $request->variable('teampage_forums', 0));
+ $config->set('teampage_memberships', $request->variable('teampage_memberships', 0));
+ trigger_error($user->lang['CONFIG_UPDATED'] . adm_back_link($this->u_action));
+ break;
+
+ case 'set_config_legend':
+ $config->set('legend_sort_groupname', $request->variable('legend_sort_groupname', 0));
+ trigger_error($user->lang['CONFIG_UPDATED'] . adm_back_link($this->u_action));
+ break;
+ }
+ }
+
+ if (($action == 'move_up' || $action == 'move_down') && $request->is_ajax())
+ {
+ $json_response = new \phpbb\json_response;
+ $json_response->send(array('success' => true));
+ }
+
+ $sql = 'SELECT group_id, group_name, group_colour, group_type, group_legend
+ FROM ' . GROUPS_TABLE . '
+ ORDER BY group_legend ASC, group_type DESC, group_name ASC';
+ $result = $db->sql_query($sql);
+
+ $s_group_select_legend = '';
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $group_name = ($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['group_name']] : $row['group_name'];
+ if ($row['group_legend'])
+ {
+ $template->assign_block_vars('legend', array(
+ 'GROUP_NAME' => $group_name,
+ 'GROUP_COLOUR' => ($row['group_colour']) ? '#' . $row['group_colour'] : '',
+ 'GROUP_TYPE' => $user->lang[\phpbb\groupposition\legend::group_type_language($row['group_type'])],
+
+ 'U_MOVE_DOWN' => "{$this->u_action}&amp;field=legend&amp;action=move_down&amp;g=" . $row['group_id'],
+ 'U_MOVE_UP' => "{$this->u_action}&amp;field=legend&amp;action=move_up&amp;g=" . $row['group_id'],
+ 'U_DELETE' => "{$this->u_action}&amp;field=legend&amp;action=delete&amp;g=" . $row['group_id'],
+ ));
+ }
+ else
+ {
+ $template->assign_block_vars('add_legend', array(
+ 'GROUP_ID' => (int) $row['group_id'],
+ 'GROUP_NAME' => $group_name,
+ 'GROUP_SPECIAL' => ($row['group_type'] == GROUP_SPECIAL),
+ ));
+ }
+ }
+ $db->sql_freeresult($result);
+
+ $category_url_param = (($category_id) ? '&amp;c=' . $category_id : '');
+
+ $sql = 'SELECT t.*, g.group_name, g.group_colour, g.group_type
+ FROM ' . TEAMPAGE_TABLE . ' t
+ LEFT JOIN ' . GROUPS_TABLE . ' g
+ ON (t.group_id = g.group_id)
+ WHERE t.teampage_parent = ' . $category_id . '
+ OR t.teampage_id = ' . $category_id . '
+ ORDER BY t.teampage_position ASC';
+ $result = $db->sql_query($sql);
+
+ $category_data = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ if ($row['teampage_id'] == $category_id)
+ {
+ $template->assign_vars(array(
+ 'CURRENT_CATEGORY_NAME' => $row['teampage_name'],
+ ));
+ continue;
+ }
+
+ if ($row['group_id'])
+ {
+ $group_name = ($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['group_name']] : $row['group_name'];
+ $group_type = $user->lang[\phpbb\groupposition\teampage::group_type_language($row['group_type'])];
+ }
+ else
+ {
+ $group_name = $row['teampage_name'];
+ $group_type = '';
+ }
+
+ $template->assign_block_vars('teampage', array(
+ 'GROUP_NAME' => $group_name,
+ 'GROUP_COLOUR' => ($row['group_colour']) ? '#' . $row['group_colour'] : '',
+ 'GROUP_TYPE' => $group_type,
+
+ 'U_CATEGORY' => (!$row['group_id']) ? "{$this->u_action}&amp;c=" . $row['teampage_id'] : '',
+ 'U_MOVE_DOWN' => "{$this->u_action}&amp;field=teampage&amp;action=move_down{$category_url_param}&amp;t=" . $row['teampage_id'],
+ 'U_MOVE_UP' => "{$this->u_action}&amp;field=teampage&amp;action=move_up{$category_url_param}&amp;t=" . $row['teampage_id'],
+ 'U_DELETE' => "{$this->u_action}&amp;field=teampage&amp;action=delete{$category_url_param}&amp;t=" . $row['teampage_id'],
+ ));
+ }
+ $db->sql_freeresult($result);
+
+ $sql = 'SELECT g.group_id, g.group_name, g.group_colour, g.group_type
+ FROM ' . GROUPS_TABLE . ' g
+ LEFT JOIN ' . TEAMPAGE_TABLE . ' t
+ ON (t.group_id = g.group_id)
+ WHERE t.teampage_id IS NULL
+ ORDER BY g.group_type DESC, g.group_name ASC';
+ $result = $db->sql_query($sql);
+
+ $s_group_select_teampage = '';
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $group_name = ($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['group_name']] : $row['group_name'];
+ $template->assign_block_vars('add_teampage', array(
+ 'GROUP_ID' => (int) $row['group_id'],
+ 'GROUP_NAME' => $group_name,
+ 'GROUP_SPECIAL' => ($row['group_type'] == GROUP_SPECIAL),
+ ));
+ }
+ $db->sql_freeresult($result);
+
+ $template->assign_vars(array(
+ 'U_ACTION' => $this->u_action,
+ 'U_ACTION_LEGEND' => $this->u_action . '&amp;field=legend',
+ 'U_ACTION_TEAMPAGE' => $this->u_action . '&amp;field=teampage' . $category_url_param,
+ 'U_ACTION_TEAMPAGE_CAT' => $this->u_action . '&amp;field=teampage_cat',
+
+ 'S_TEAMPAGE_CATEGORY' => $category_id,
+ 'DISPLAY_FORUMS' => ($config['teampage_forums']) ? true : false,
+ 'DISPLAY_MEMBERSHIPS' => $config['teampage_memberships'],
+ 'LEGEND_SORT_GROUPNAME' => ($config['legend_sort_groupname']) ? true : false,
+ ));
+ }
+}
diff --git a/phpBB/includes/acp/acp_icons.php b/phpBB/includes/acp/acp_icons.php
index 24f6cbbcbf..20b1f56182 100644
--- a/phpBB/includes/acp/acp_icons.php
+++ b/phpBB/includes/acp/acp_icons.php
@@ -2,9 +2,8 @@
/**
*
* @package acp
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -28,6 +27,7 @@ class acp_icons
{
global $db, $user, $auth, $template, $cache;
global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;
+ global $request, $phpbb_container;
$user->add_lang('acp/posting');
@@ -307,7 +307,6 @@ class acp_icons
'IMG_SRC' => $phpbb_root_path . $img_path . '/' . $default_row['smiley_url'],
'IMG_PATH' => $img_path,
- 'PHPBB_ROOT_PATH' => $phpbb_root_path,
'CODE' => $default_row['code'],
'EMOTION' => $default_row['emotion'],
@@ -338,7 +337,7 @@ class acp_icons
$image_display_on_posting = (isset($_POST['display_on_posting'])) ? request_var('display_on_posting', array('' => 0)) : array();
// Ok, add the relevant bits if we are adding new codes to existing emoticons...
- if (!empty($_POST['add_additional_code']))
+ if ($request->variable('add_additional_code', false, false, \phpbb\request\request_interface::POST))
{
$add_image = request_var('add_image', '');
$add_code = utf8_normalize_nfc(request_var('add_code', '', true));
@@ -354,7 +353,7 @@ class acp_icons
$image_width[$add_image] = request_var('add_width', 0);
$image_height[$add_image] = request_var('add_height', 0);
- if (!empty($_POST['add_display_on_posting']))
+ if ($request->variable('add_display_on_posting', false, false, \phpbb\request\request_interface::POST))
{
$image_display_on_posting[$add_image] = 1;
}
@@ -378,7 +377,7 @@ class acp_icons
if ($smiley_count + $addable_smileys_count > SMILEY_LIMIT)
{
- trigger_error(sprintf($user->lang['TOO_MANY_SMILIES'], SMILEY_LIMIT) . adm_back_link($this->u_action), E_USER_WARNING);
+ trigger_error($user->lang('TOO_MANY_SMILIES', SMILEY_LIMIT) . adm_back_link($this->u_action), E_USER_WARNING);
}
}
@@ -480,27 +479,13 @@ class acp_icons
$icons_updated++;
}
- }
+ }
}
$cache->destroy('_icons');
$cache->destroy('sql', $table);
- $level = E_USER_NOTICE;
- switch ($icons_updated)
- {
- case 0:
- $suc_lang = "{$lang}_NONE";
- $level = E_USER_WARNING;
- break;
-
- case 1:
- $suc_lang = "{$lang}_ONE";
- break;
-
- default:
- $suc_lang = $lang;
- }
+ $level = ($icons_updated) ? E_USER_NOTICE : E_USER_WARNING;
$errormsgs = '';
foreach ($errors as $img => $error)
{
@@ -508,11 +493,11 @@ class acp_icons
}
if ($action == 'modify')
{
- trigger_error($user->lang[$suc_lang . '_EDITED'] . $errormsgs . adm_back_link($this->u_action), $level);
+ trigger_error($user->lang($lang . '_EDITED', $icons_updated) . $errormsgs . adm_back_link($this->u_action), $level);
}
else
{
- trigger_error($user->lang[$suc_lang . '_ADDED'] . $errormsgs . adm_back_link($this->u_action), $level);
+ trigger_error($user->lang($lang . '_ADDED', $icons_updated) . $errormsgs . adm_back_link($this->u_action), $level);
}
break;
@@ -598,7 +583,7 @@ class acp_icons
$smiley_count = $this->item_count($table);
if ($smiley_count + sizeof($pak_ary) > SMILEY_LIMIT)
{
- trigger_error(sprintf($user->lang['TOO_MANY_SMILIES'], SMILEY_LIMIT) . adm_back_link($this->u_action), E_USER_WARNING);
+ trigger_error($user->lang('TOO_MANY_SMILIES', SMILEY_LIMIT) . adm_back_link($this->u_action), E_USER_WARNING);
}
}
@@ -796,6 +781,18 @@ class acp_icons
$cache->destroy('_icons');
$cache->destroy('sql', $table);
+
+ if ($request->is_ajax())
+ {
+ $json_response = new \phpbb\json_response;
+ $json_response->send(array(
+ 'MESSAGE_TITLE' => $user->lang['INFORMATION'],
+ 'MESSAGE_TEXT' => $notice,
+ 'REFRESH_DATA' => array(
+ 'time' => 3
+ )
+ ));
+ }
}
else
{
@@ -835,9 +832,10 @@ class acp_icons
WHERE {$fields}_order = $switch_order_id
AND {$fields}_id <> $icon_id";
$db->sql_query($sql);
+ $move_executed = (bool) $db->sql_affectedrows();
// Only update the other entry too if the previous entry got updated
- if ($db->sql_affectedrows())
+ if ($move_executed)
{
$sql = "UPDATE $table
SET {$fields}_order = $switch_order_id
@@ -849,6 +847,14 @@ class acp_icons
$cache->destroy('_icons');
$cache->destroy('sql', $table);
+ if ($request->is_ajax())
+ {
+ $json_response = new \phpbb\json_response;
+ $json_response->send(array(
+ 'success' => $move_executed,
+ ));
+ }
+
break;
}
@@ -896,6 +902,7 @@ class acp_icons
);
$spacer = false;
+ $pagination = $phpbb_container->get('pagination');
$pagination_start = request_var('start', 0);
$item_count = $this->item_count($table);
@@ -930,9 +937,7 @@ class acp_icons
}
$db->sql_freeresult($result);
- $template->assign_var('PAGINATION',
- generate_pagination($this->u_action, $item_count, $config['smilies_per_page'], $pagination_start, true)
- );
+ $pagination->generate_template_pagination($this->u_action, 'pagination', 'start', $item_count, $config['smilies_per_page'], $pagination_start);
}
/**
@@ -954,5 +959,3 @@ class acp_icons
return $item_count;
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/acp/acp_inactive.php b/phpBB/includes/acp/acp_inactive.php
index f3f332d707..140815f06a 100644
--- a/phpBB/includes/acp/acp_inactive.php
+++ b/phpBB/includes/acp/acp_inactive.php
@@ -2,9 +2,8 @@
/**
*
* @package acp
-* @version $Id$
* @copyright (c) 2006 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -31,7 +30,7 @@ class acp_inactive
function main($id, $mode)
{
- global $config, $db, $user, $auth, $template;
+ global $config, $db, $user, $auth, $template, $phpbb_container;
global $phpbb_root_path, $phpbb_admin_path, $phpEx, $table_prefix;
include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
@@ -50,6 +49,7 @@ class acp_inactive
$form_key = 'acp_inactive';
add_form_key($form_key);
+ $pagination = $phpbb_container->get('pagination');
// We build the sort key and per page settings here, because they may be needed later
@@ -116,7 +116,7 @@ class acp_inactive
{
$messenger->template('admin_welcome_activated', $row['user_lang']);
- $messenger->to($row['user_email'], $row['username']);
+ $messenger->set_addresses($row);
$messenger->anti_abuse_headers($config, $user);
@@ -137,6 +137,8 @@ class acp_inactive
add_log('admin', 'LOG_USER_ACTIVE', $row['username']);
add_log('user', $row['user_id'], 'LOG_USER_ACTIVE_USER');
}
+
+ trigger_error(sprintf($user->lang['LOG_INACTIVE_ACTIVATE'], implode($user->lang['COMMA_SEPARATOR'], $user_affected) . ' ' . adm_back_link($this->u_action)));
}
// For activate we really need to redirect, else a refresh can result in users being deactivated again
@@ -154,12 +156,11 @@ class acp_inactive
trigger_error($user->lang['NO_AUTH_OPERATION'] . adm_back_link($this->u_action), E_USER_WARNING);
}
- foreach ($mark as $user_id)
- {
- user_delete('retain', $user_id, $user_affected[$user_id]);
- }
+ user_delete('retain', $mark, true);
add_log('admin', 'LOG_INACTIVE_' . strtoupper($action), implode(', ', $user_affected));
+
+ trigger_error(sprintf($user->lang['LOG_INACTIVE_DELETE'], implode($user->lang['COMMA_SEPARATOR'], $user_affected) . ' ' . adm_back_link($this->u_action)));
}
else
{
@@ -203,8 +204,7 @@ class acp_inactive
{
$messenger->template('user_remind_inactive', $row['user_lang']);
- $messenger->to($row['user_email'], $row['username']);
- $messenger->im($row['user_jabber'], $row['username']);
+ $messenger->set_addresses($row);
$messenger->anti_abuse_headers($config, $user);
@@ -231,7 +231,8 @@ class acp_inactive
$db->sql_query($sql);
add_log('admin', 'LOG_INACTIVE_REMIND', implode(', ', $usernames));
- unset($usernames);
+
+ trigger_error(sprintf($user->lang['LOG_INACTIVE_REMIND'], implode($user->lang['COMMA_SEPARATOR'], $usernames) . ' ' . adm_back_link($this->u_action)));
}
$db->sql_freeresult($result);
@@ -284,6 +285,9 @@ class acp_inactive
$option_ary += array('remind' => 'REMIND');
}
+ $base_url = $this->u_action . "&amp;$u_sort_param&amp;users_per_page=$per_page";
+ $pagination->generate_template_pagination($base_url, 'pagination', 'start', $inactive_count, $per_page, $start);
+
$template->assign_vars(array(
'S_INACTIVE_USERS' => true,
'S_INACTIVE_OPTIONS' => build_select($option_ary),
@@ -291,8 +295,6 @@ class acp_inactive
'S_LIMIT_DAYS' => $s_limit_days,
'S_SORT_KEY' => $s_sort_key,
'S_SORT_DIR' => $s_sort_dir,
- 'S_ON_PAGE' => on_page($inactive_count, $per_page, $start),
- 'PAGINATION' => generate_pagination($this->u_action . "&amp;$u_sort_param&amp;users_per_page=$per_page", $inactive_count, $per_page, $start, true),
'USERS_PER_PAGE' => $per_page,
'U_ACTION' => $this->u_action . "&amp;$u_sort_param&amp;users_per_page=$per_page&amp;start=$start",
@@ -302,5 +304,3 @@ class acp_inactive
$this->page_title = 'ACP_INACTIVE_USERS';
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/acp/acp_jabber.php b/phpBB/includes/acp/acp_jabber.php
index 9925527b34..96371075d6 100644
--- a/phpBB/includes/acp/acp_jabber.php
+++ b/phpBB/includes/acp/acp_jabber.php
@@ -2,9 +2,8 @@
/**
*
* @package acp
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
* @todo Check/enter/update transport info
*/
@@ -127,5 +126,3 @@ class acp_jabber
));
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/acp/acp_language.php b/phpBB/includes/acp/acp_language.php
index d560cdd0c5..013aab670f 100644
--- a/phpBB/includes/acp/acp_language.php
+++ b/phpBB/includes/acp/acp_language.php
@@ -2,9 +2,8 @@
/**
*
* @package acp
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -34,6 +33,7 @@ class acp_language
global $config, $db, $user, $auth, $template, $cache;
global $phpbb_root_path, $phpbb_admin_path, $phpEx, $table_prefix;
global $safe_mode, $file_uploads;
+ global $request;
include_once($phpbb_root_path . 'includes/functions_user.' . $phpEx);
@@ -58,7 +58,7 @@ class acp_language
if (isset($_POST['missing_file']))
{
$missing_file = request_var('missing_file', array('' => 0));
- list($_REQUEST['language_file'], ) = array_keys($missing_file);
+ $request->overwrite('language_file', array_shift(array_keys($missing_file)));
}
$selected_lang_file = request_var('language_file', '|common.' . $phpEx);
@@ -68,6 +68,23 @@ class acp_language
$this->language_directory = basename($this->language_directory);
$this->language_file = basename($this->language_file);
+ // detect language file type
+ if ($this->language_directory == 'email')
+ {
+ $language_file_type = 'email';
+ $request_default = '';
+ }
+ else if (strpos($this->language_file, 'help_') === 0)
+ {
+ $language_file_type = 'help';
+ $request_default = array(0 => array(0 => ''));
+ }
+ else
+ {
+ $language_file_type = 'normal';
+ $request_default = array('' => '');
+ }
+
$user->add_lang('acp/language');
$this->tpl_name = 'acp_language';
$this->page_title = 'ACP_LANGUAGE_PACKS';
@@ -83,11 +100,25 @@ class acp_language
switch ($method)
{
case 'ftp':
- $transfer = new ftp(request_var('host', ''), request_var('username', ''), request_var('password', ''), request_var('root_path', ''), request_var('port', ''), request_var('timeout', ''));
+ $transfer = new ftp(
+ request_var('host', ''),
+ request_var('username', ''),
+ htmlspecialchars_decode($request->untrimmed_variable('password', '')),
+ request_var('root_path', ''),
+ request_var('port', ''),
+ request_var('timeout', '')
+ );
break;
case 'ftp_fsock':
- $transfer = new ftp_fsock(request_var('host', ''), request_var('username', ''), request_var('password', ''), request_var('root_path', ''), request_var('port', ''), request_var('timeout', ''));
+ $transfer = new ftp_fsock(
+ request_var('host', ''),
+ request_var('username', ''),
+ htmlspecialchars_decode($request->untrimmed_variable('password', '')),
+ request_var('root_path', ''),
+ request_var('port', ''),
+ request_var('timeout', '')
+ );
break;
default:
@@ -119,7 +150,7 @@ class acp_language
'DATA' => $data,
'NAME' => $user->lang[strtoupper($method . '_' . $data)],
'EXPLAIN' => $user->lang[strtoupper($method . '_' . $data) . '_EXPLAIN'],
- 'DEFAULT' => (!empty($_REQUEST[$data])) ? request_var($data, '') : $default
+ 'DEFAULT' => $request->variable($data, (string) $default),
));
}
@@ -130,7 +161,7 @@ class acp_language
'method' => $method)
);
- $hidden_data .= build_hidden_fields(array('entry' => $_POST['entry']), true, STRIP);
+ $hidden_data .= build_hidden_fields(array('entry' => $request->variable('entry', $request_default, true, \phpbb\request\request_interface::POST)));
$template->assign_vars(array(
'S_UPLOAD' => true,
@@ -187,12 +218,9 @@ class acp_language
trigger_error($user->lang['FORM_INVALID']. adm_back_link($this->u_action), E_USER_WARNING);
}
- if (!$lang_id || empty($_POST['entry']))
- {
- trigger_error($user->lang['NO_LANG_ID'] . adm_back_link($this->u_action), E_USER_WARNING);
- }
+ $entry_value = $request->variable('entry', $request_default, true, \phpbb\request\request_interface::POST);
- if ($this->language_directory != 'email' && !is_array($_POST['entry']))
+ if (!$lang_id || !$entry_value)
{
trigger_error($user->lang['NO_LANG_ID'] . adm_back_link($this->u_action), E_USER_WARNING);
}
@@ -291,10 +319,10 @@ class acp_language
trigger_error(sprintf($user->lang['UNABLE_TO_WRITE_FILE'], $filename) . adm_back_link($this->u_action . '&amp;id=' . $lang_id . '&amp;action=details&amp;language_file=' . urlencode($selected_lang_file)), E_USER_WARNING);
}
- if ($this->language_directory == 'email')
+ if ($language_file_type == 'email')
{
// Email Template
- $entry = $this->prepare_lang_entry($_POST['entry'], false);
+ $entry = $this->prepare_lang_entry(htmlspecialchars_decode($entry_value), false);
fwrite($fp, $entry);
}
else
@@ -302,13 +330,13 @@ class acp_language
$name = (($this->language_directory) ? $this->language_directory . '_' : '') . $this->language_file;
$header = str_replace(array('{FILENAME}', '{LANG_NAME}', '{CHANGED}', '{AUTHOR}'), array($name, $row['lang_english_name'], date('Y-m-d', time()), $row['lang_author']), $this->language_file_header);
- if (strpos($this->language_file, 'help_') === 0)
+ if ($language_file_type == 'help')
{
// Help File
$header .= '$help = array(' . "\n";
fwrite($fp, $header);
- foreach ($_POST['entry'] as $key => $value)
+ foreach ($entry_value as $key => $value)
{
if (!is_array($value))
{
@@ -319,7 +347,7 @@ class acp_language
foreach ($value as $_key => $_value)
{
- $entry .= "\t\t" . (int) $_key . "\t=> '" . $this->prepare_lang_entry($_value) . "',\n";
+ $entry .= "\t\t" . (int) $_key . "\t=> '" . $this->prepare_lang_entry(htmlspecialchars_decode($_value)) . "',\n";
}
$entry .= "\t),\n";
@@ -329,15 +357,15 @@ class acp_language
$footer = ");\n\n?>";
fwrite($fp, $footer);
}
- else
+ else if ($language_file_type == 'normal')
{
// Language File
$header .= $this->lang_header;
fwrite($fp, $header);
- foreach ($_POST['entry'] as $key => $value)
+ foreach ($entry_value as $key => $value)
{
- $entry = $this->format_lang_array($key, $value);
+ $entry = $this->format_lang_array(htmlspecialchars_decode($key), htmlspecialchars_decode($value));
fwrite($fp, $entry);
}
@@ -390,7 +418,14 @@ class acp_language
trigger_error($user->lang['INVALID_UPLOAD_METHOD'], E_USER_ERROR);
}
- $transfer = new $method(request_var('host', ''), request_var('username', ''), request_var('password', ''), request_var('root_path', ''), request_var('port', ''), request_var('timeout', ''));
+ $transfer = new $method(
+ request_var('host', ''),
+ request_var('username', ''),
+ htmlspecialchars_decode($request->untrimmed_variable('password', '')),
+ request_var('root_path', ''),
+ request_var('port', ''),
+ request_var('timeout', '')
+ );
if (($result = $transfer->open_session()) !== true)
{
@@ -782,11 +817,6 @@ class acp_language
$sql = 'DELETE FROM ' . PROFILE_FIELDS_LANG_TABLE . ' WHERE lang_id = ' . $lang_id;
$db->sql_query($sql);
- $sql = 'DELETE FROM ' . STYLES_IMAGESET_DATA_TABLE . " WHERE image_lang = '" . $db->sql_escape($row['lang_iso']) . "'";
- $result = $db->sql_query($sql);
-
- $cache->destroy('sql', STYLES_IMAGESET_DATA_TABLE);
-
add_log('admin', 'LOG_LANGUAGE_PACK_DELETED', $row['lang_english_name']);
trigger_error(sprintf($user->lang['LANGUAGE_PACK_DELETED'], $row['lang_english_name']) . adm_back_link($this->u_action));
@@ -851,66 +881,6 @@ class acp_language
$db->sql_query('INSERT INTO ' . LANG_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary));
$lang_id = $db->sql_nextid();
- $valid_localized = array(
- 'icon_back_top', 'icon_contact_aim', 'icon_contact_email', 'icon_contact_icq', 'icon_contact_jabber', 'icon_contact_msnm', 'icon_contact_pm', 'icon_contact_yahoo', 'icon_contact_www', 'icon_post_delete', 'icon_post_edit', 'icon_post_info', 'icon_post_quote', 'icon_post_report', 'icon_user_online', 'icon_user_offline', 'icon_user_profile', 'icon_user_search', 'icon_user_warn', 'button_pm_forward', 'button_pm_new', 'button_pm_reply', 'button_topic_locked', 'button_topic_new', 'button_topic_reply',
- );
-
- $sql_ary = array();
-
- $sql = 'SELECT *
- FROM ' . STYLES_IMAGESET_TABLE;
- $result = $db->sql_query($sql);
- while ($imageset_row = $db->sql_fetchrow($result))
- {
- if (@file_exists("{$phpbb_root_path}styles/{$imageset_row['imageset_path']}/imageset/{$lang_pack['iso']}/imageset.cfg"))
- {
- $cfg_data_imageset_data = parse_cfg_file("{$phpbb_root_path}styles/{$imageset_row['imageset_path']}/imageset/{$lang_pack['iso']}/imageset.cfg");
- foreach ($cfg_data_imageset_data as $image_name => $value)
- {
- if (strpos($value, '*') !== false)
- {
- if (substr($value, -1, 1) === '*')
- {
- list($image_filename, $image_height) = explode('*', $value);
- $image_width = 0;
- }
- else
- {
- list($image_filename, $image_height, $image_width) = explode('*', $value);
- }
- }
- else
- {
- $image_filename = $value;
- $image_height = $image_width = 0;
- }
-
- if (strpos($image_name, 'img_') === 0 && $image_filename)
- {
- $image_name = substr($image_name, 4);
- if (in_array($image_name, $valid_localized))
- {
- $sql_ary[] = array(
- 'image_name' => (string) $image_name,
- 'image_filename' => (string) $image_filename,
- 'image_height' => (int) $image_height,
- 'image_width' => (int) $image_width,
- 'imageset_id' => (int) $imageset_row['imageset_id'],
- 'image_lang' => (string) $lang_pack['iso'],
- );
- }
- }
- }
- }
- }
- $db->sql_freeresult($result);
-
- if (sizeof($sql_ary))
- {
- $db->sql_multi_insert(STYLES_IMAGESET_DATA_TABLE, $sql_ary);
- $cache->destroy('sql', STYLES_IMAGESET_DATA_TABLE);
- }
-
// Now let's copy the default language entries for custom profile fields for this new language - makes admin's life easier.
$sql = 'SELECT lang_id
FROM ' . LANG_TABLE . "
@@ -1186,10 +1156,9 @@ class acp_language
* {FILENAME} [{LANG_NAME}]
*
* @package language
-* @version $' . 'Id: ' . '$
* @copyright (c) ' . date('Y') . ' phpBB Group
* @author {CHANGED} - {AUTHOR}
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -1461,5 +1430,3 @@ $lang = array_merge($lang, array(
return $entry;
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/acp/acp_logs.php b/phpBB/includes/acp/acp_logs.php
index 2fc86e325f..10852e3a68 100644
--- a/phpBB/includes/acp/acp_logs.php
+++ b/phpBB/includes/acp/acp_logs.php
@@ -2,9 +2,8 @@
/**
*
* @package acp
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -25,8 +24,9 @@ class acp_logs
function main($id, $mode)
{
- global $db, $user, $auth, $template, $cache;
+ global $db, $user, $auth, $template, $cache, $phpbb_container;
global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;
+ global $request;
$user->add_lang('mcp');
@@ -35,8 +35,8 @@ class acp_logs
$forum_id = request_var('f', 0);
$topic_id = request_var('t', 0);
$start = request_var('start', 0);
- $deletemark = (!empty($_POST['delmarked'])) ? true : false;
- $deleteall = (!empty($_POST['delall'])) ? true : false;
+ $deletemark = $request->variable('delmarked', false, false, \phpbb\request\request_interface::POST);
+ $deleteall = $request->variable('delall', false, false, \phpbb\request\request_interface::POST);
$marked = request_var('mark', array(0));
// Sort keys
@@ -46,6 +46,7 @@ class acp_logs
$this->tpl_name = 'acp_logs';
$this->log_type = constant('LOG_' . strtoupper($mode));
+ $pagination = $phpbb_container->get('pagination');
// Delete entries if requested and able
if (($deletemark || $deleteall) && $auth->acl_get('a_clearlogs'))
@@ -129,14 +130,14 @@ class acp_logs
$log_count = 0;
$start = view_log($mode, $log_data, $log_count, $config['topics_per_page'], $start, $forum_id, 0, 0, $sql_where, $sql_sort, $keywords);
+ $base_url = $this->u_action . "&amp;$u_sort_param$keywords_param";
+ $pagination->generate_template_pagination($base_url, 'pagination', 'start', $log_count, $config['topics_per_page'], $start);
+
$template->assign_vars(array(
'L_TITLE' => $l_title,
'L_EXPLAIN' => $l_title_explain,
'U_ACTION' => $this->u_action . "&amp;$u_sort_param$keywords_param&amp;start=$start",
- 'S_ON_PAGE' => on_page($log_count, $config['topics_per_page'], $start),
- 'PAGINATION' => generate_pagination($this->u_action . "&amp;$u_sort_param$keywords_param", $log_count, $config['topics_per_page'], $start, true),
-
'S_LIMIT_DAYS' => $s_limit_days,
'S_SORT_KEY' => $s_sort_key,
'S_SORT_DIR' => $s_sort_dir,
@@ -172,5 +173,3 @@ class acp_logs
}
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/acp/acp_main.php b/phpBB/includes/acp/acp_main.php
index d80b0d1532..fd45027b49 100644
--- a/phpBB/includes/acp/acp_main.php
+++ b/phpBB/includes/acp/acp_main.php
@@ -2,9 +2,8 @@
/**
*
* @package acp
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -25,8 +24,8 @@ class acp_main
function main($id, $mode)
{
- global $config, $db, $user, $auth, $template;
- global $phpbb_root_path, $phpbb_admin_path, $phpEx;
+ global $config, $db, $cache, $user, $auth, $template, $request;
+ global $phpbb_root_path, $phpbb_admin_path, $phpEx, $phpbb_container;
// Show restore permissions notice
if ($user->data['user_perm_from'] && $auth->acl_get('a_switchperm'))
@@ -64,9 +63,7 @@ class acp_main
if ($action === 'admlogout')
{
$user->unset_admin();
- $redirect_url = append_sid("{$phpbb_root_path}index.$phpEx");
- meta_refresh(3, $redirect_url);
- trigger_error($user->lang['ADM_LOGGED_OUT'] . '<br /><br />' . sprintf($user->lang['RETURN_INDEX'], '<a href="' . $redirect_url . '">', '</a>'));
+ redirect(append_sid("{$phpbb_root_path}index.$phpEx"));
}
if (!confirm_box(true))
@@ -130,6 +127,11 @@ class acp_main
set_config('record_online_users', 1, true);
set_config('record_online_date', time(), true);
add_log('admin', 'LOG_RESET_ONLINE');
+
+ if ($request->is_ajax())
+ {
+ trigger_error('RESET_ONLINE_SUCCESS');
+ }
break;
case 'stats':
@@ -140,14 +142,14 @@ class acp_main
$sql = 'SELECT COUNT(post_id) AS stat
FROM ' . POSTS_TABLE . '
- WHERE post_approved = 1';
+ WHERE post_visibility = ' . ITEM_APPROVED;
$result = $db->sql_query($sql);
set_config('num_posts', (int) $db->sql_fetchfield('stat'), true);
$db->sql_freeresult($result);
$sql = 'SELECT COUNT(topic_id) AS stat
FROM ' . TOPICS_TABLE . '
- WHERE topic_approved = 1';
+ WHERE topic_visibility = ' . ITEM_APPROVED;
$result = $db->sql_query($sql);
set_config('num_topics', (int) $db->sql_fetchfield('stat'), true);
$db->sql_freeresult($result);
@@ -180,6 +182,11 @@ class acp_main
update_last_username();
add_log('admin', 'LOG_RESYNC_STATS');
+
+ if ($request->is_ajax())
+ {
+ trigger_error('RESYNC_STATS_SUCCESS');
+ }
break;
case 'user':
@@ -223,7 +230,7 @@ class acp_main
$sql = 'SELECT COUNT(post_id) AS num_posts, poster_id
FROM ' . POSTS_TABLE . '
WHERE post_id BETWEEN ' . ($start + 1) . ' AND ' . ($start + $step) . '
- AND post_postcount = 1 AND post_approved = 1
+ AND post_postcount = 1 AND post_visibility = ' . ITEM_APPROVED . '
GROUP BY poster_id';
$result = $db->sql_query($sql);
@@ -243,6 +250,10 @@ class acp_main
add_log('admin', 'LOG_RESYNC_POSTCOUNTS');
+ if ($request->is_ajax())
+ {
+ trigger_error('RESYNC_POSTCOUNTS_SUCCESS');
+ }
break;
case 'date':
@@ -253,6 +264,11 @@ class acp_main
set_config('board_startdate', time() - 1);
add_log('admin', 'LOG_RESET_DATE');
+
+ if ($request->is_ajax())
+ {
+ trigger_error('RESET_DATE_SUCCESS');
+ }
break;
case 'db_track':
@@ -328,22 +344,27 @@ class acp_main
}
add_log('admin', 'LOG_RESYNC_POST_MARKING');
- break;
- case 'purge_cache':
- if ((int) $user->data['user_type'] !== USER_FOUNDER)
+ if ($request->is_ajax())
{
- trigger_error($user->lang['NO_AUTH_OPERATION'] . adm_back_link($this->u_action), E_USER_WARNING);
+ trigger_error('RESYNC_POST_MARKING_SUCCESS');
}
+ break;
+ case 'purge_cache':
global $cache;
$cache->purge();
// Clear permissions
$auth->acl_clear_prefetch();
- cache_moderators();
+ phpbb_cache_moderators($db, $cache, $auth);
add_log('admin', 'LOG_PURGE_CACHE');
+
+ if ($request->is_ajax())
+ {
+ trigger_error('PURGE_CACHE_SUCCESS');
+ }
break;
case 'purge_sessions':
@@ -390,6 +411,11 @@ class acp_main
$db->sql_query($sql);
add_log('admin', 'LOG_PURGE_SESSIONS');
+
+ if ($request->is_ajax())
+ {
+ trigger_error('PURGE_SESSIONS_SUCCESS');
+ }
break;
}
}
@@ -406,17 +432,19 @@ class acp_main
));
}
- $latest_version_info = false;
- if (($latest_version_info = obtain_latest_version_info(request_var('versioncheck_force', false))) === false)
+ $version_helper = $phpbb_container->get('version_helper');
+ try
{
- $template->assign_var('S_VERSIONCHECK_FAIL', true);
+ $recheck = $request->variable('versioncheck_force', false);
+ $updates_available = $version_helper->get_suggested_updates($recheck);
+
+ $template->assign_var('S_VERSION_UP_TO_DATE', empty($updates_available));
}
- else
+ catch (\RuntimeException $e)
{
- $latest_version_info = explode("\n", $latest_version_info);
-
$template->assign_vars(array(
- 'S_VERSION_UP_TO_DATE' => phpbb_version_compare(trim($latest_version_info[0]), $config['version'], '<='),
+ 'S_VERSIONCHECK_FAIL' => true,
+ 'VERSIONCHECK_FAIL_REASON' => ($e->getMessage() !== $user->lang('VERSIONCHECK_FAIL')) ? $e->getMessage() : '',
));
}
@@ -594,6 +622,22 @@ class acp_main
$template->assign_var('S_REMOVE_INSTALL', true);
}
+ // Warn if no search index is created
+ if ($config['num_posts'] && class_exists($config['search_type']))
+ {
+ $error = false;
+ $search_type = $config['search_type'];
+ $search = new $search_type($error, $phpbb_root_path, $phpEx, $auth, $config, $db, $user);
+
+ if (!$search->index_created())
+ {
+ $template->assign_vars(array(
+ 'S_SEARCH_INDEX_MISSING' => true,
+ 'L_NO_SEARCH_INDEX' => $user->lang('NO_SEARCH_INDEX', $search->get_name(), '<a href="' . append_sid("{$phpbb_admin_path}index.$phpEx", 'i=acp_search&amp;mode=index') . '">', '</a>'),
+ ));
+ }
+ }
+
if (!defined('PHPBB_DISABLE_CONFIG_CHECK') && file_exists($phpbb_root_path . 'config.' . $phpEx) && phpbb_is_writable($phpbb_root_path . 'config.' . $phpEx))
{
// World-Writable? (000x)
@@ -621,5 +665,3 @@ class acp_main
$this->page_title = 'ACP_MAIN';
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/acp/acp_modules.php b/phpBB/includes/acp/acp_modules.php
index 75bc5766a9..c124377ba9 100644
--- a/phpBB/includes/acp/acp_modules.php
+++ b/phpBB/includes/acp/acp_modules.php
@@ -2,9 +2,8 @@
/**
*
* @package acp
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -37,7 +36,7 @@ class acp_modules
function main($id, $mode)
{
- global $db, $user, $auth, $template, $module;
+ global $db, $user, $auth, $template, $module, $request;
global $config, $phpbb_admin_path, $phpbb_root_path, $phpEx;
// Set a global define for modules we might include (the author is able to prevent execution of code by checking this constant)
@@ -111,7 +110,7 @@ class acp_modules
}
break;
-
+
case 'enable':
case 'disable':
if (!$module_id)
@@ -170,7 +169,15 @@ class acp_modules
add_log('admin', 'LOG_MODULE_' . strtoupper($action), $this->lang_name($row['module_langname']), $move_module_name);
$this->remove_cache_file();
}
-
+
+ if ($request->is_ajax())
+ {
+ $json_response = new \phpbb\json_response;
+ $json_response->send(array(
+ 'success' => ($move_module_name !== false),
+ ));
+ }
+
break;
case 'quickadd':
@@ -207,7 +214,7 @@ class acp_modules
if (!sizeof($errors))
{
$this->remove_cache_file();
-
+
trigger_error($user->lang['MODULE_ADDED'] . adm_back_link($this->u_action . '&amp;parent_id=' . $this->parent_id));
}
}
@@ -231,7 +238,7 @@ class acp_modules
{
trigger_error($user->lang['NO_MODULE_ID'] . adm_back_link($this->u_action . '&amp;parent_id=' . $this->parent_id), E_USER_WARNING);
}
-
+
$module_row = $this->get_module_row($module_id);
// no break
@@ -250,7 +257,7 @@ class acp_modules
'module_auth' => '',
);
}
-
+
$module_data = array();
$module_data['module_basename'] = request_var('module_basename', (string) $module_row['module_basename']);
@@ -295,7 +302,7 @@ class acp_modules
if (!sizeof($errors))
{
$this->remove_cache_file();
-
+
trigger_error((($action == 'add') ? $user->lang['MODULE_ADDED'] : $user->lang['MODULE_EDITED']) . adm_back_link($this->u_action . '&amp;parent_id=' . $this->parent_id));
}
}
@@ -316,7 +323,7 @@ class acp_modules
}
// Name options
- $s_name_options .= '<option value="' . $option . '"' . (($option == $module_data['module_basename']) ? ' selected="selected"' : '') . '>' . $this->lang_name($values['title']) . ' [' . $this->module_class . '_' . $option . ']</option>';
+ $s_name_options .= '<option value="' . $option . '"' . (($option == $module_data['module_basename']) ? ' selected="selected"' : '') . '>' . $this->lang_name($values['title']) . ' [' . $option . ']</option>';
$template->assign_block_vars('m_names', array('NAME' => $option, 'A_NAME' => addslashes($option)));
@@ -327,7 +334,7 @@ class acp_modules
{
$s_mode_options .= '<option value="' . $m_mode . '"' . (($m_mode == $module_data['module_mode']) ? ' selected="selected"' : '') . '>' . $this->lang_name($m_values['title']) . '</option>';
}
-
+
$template->assign_block_vars('m_names.modes', array(
'OPTION' => $m_mode,
'VALUE' => $this->lang_name($m_values['title']),
@@ -336,7 +343,7 @@ class acp_modules
);
}
}
-
+
$s_cat_option = '<option value="0"' . (($module_data['parent_id'] == 0) ? ' selected="selected"' : '') . '>' . $user->lang['NO_PARENT'] . '</option>';
$template->assign_vars(array_merge(array(
@@ -349,7 +356,7 @@ class acp_modules
'U_EDIT_ACTION' => $this->u_action . '&amp;parent_id=' . $this->parent_id,
'L_TITLE' => $user->lang[strtoupper($action) . '_MODULE'],
-
+
'MODULENAME' => $this->lang_name($module_data['module_langname']),
'ACTION' => $action,
'MODULE_ID' => $module_id,
@@ -374,6 +381,16 @@ class acp_modules
// Default management page
if (sizeof($errors))
{
+ if ($request->is_ajax())
+ {
+ $json_response = new \phpbb\json_response;
+ $json_response->send(array(
+ 'MESSAGE_TITLE' => $user->lang('ERROR'),
+ 'MESSAGE_TEXT' => implode('<br />', $errors),
+ 'SUCCESS' => false,
+ ));
+ }
+
$template->assign_vars(array(
'S_ERROR' => true,
'ERROR_MSG' => implode('<br />', $errors))
@@ -480,7 +497,7 @@ class acp_modules
foreach ($module_infos as $option => $values)
{
// Name options
- $s_install_options .= '<optgroup label="' . $this->lang_name($values['title']) . ' [' . $this->module_class . '_' . $option . ']">';
+ $s_install_options .= '<optgroup label="' . $this->lang_name($values['title']) . ' [' . $option . ']">';
// Build module modes
foreach ($values['modes'] as $m_mode => $m_values)
@@ -516,7 +533,7 @@ class acp_modules
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
-
+
if (!$row)
{
trigger_error($user->lang['NO_MODULE'] . adm_back_link($this->u_action . '&amp;parent_id=' . $this->parent_id), E_USER_WARNING);
@@ -524,72 +541,79 @@ class acp_modules
return $row;
}
-
+
/**
* Get available module information from module files
+ *
+ * @param string $module
+ * @param bool|string $module_class
+ * @param bool $use_all_available Use all available instead of just all
+ * enabled extensions
+ * @return array
*/
- function get_module_infos($module = '', $module_class = false)
+ function get_module_infos($module = '', $module_class = false, $use_all_available = false)
{
- global $phpbb_root_path, $phpEx;
-
+ global $phpbb_extension_manager, $phpbb_root_path, $phpEx;
+
$module_class = ($module_class === false) ? $this->module_class : $module_class;
$directory = $phpbb_root_path . 'includes/' . $module_class . '/info/';
$fileinfo = array();
- if (!$module)
- {
- $dh = @opendir($directory);
+ $finder = $phpbb_extension_manager->get_finder();
- if (!$dh)
+ $modules = $finder
+ ->extension_suffix('_module')
+ ->extension_directory("/$module_class")
+ ->core_path("includes/$module_class/info/")
+ ->core_prefix($module_class . '_')
+ ->get_classes(true, $use_all_available);
+
+ foreach ($modules as $cur_module)
+ {
+ // Skip entries we do not need if we know the module we are
+ // looking for
+ if ($module && strpos(str_replace('\\', '_', $cur_module), $module) === false && $module !== $cur_module)
{
- return $fileinfo;
+ continue;
}
- while (($file = readdir($dh)) !== false)
- {
- // Is module?
- if (preg_match('/^' . $module_class . '_.+\.' . $phpEx . '$/', $file))
- {
- $class = str_replace(".$phpEx", '', $file) . '_info';
+ $info_class = preg_replace('/_module$/', '_info', $cur_module);
- if (!class_exists($class))
- {
- include($directory . $file);
- }
+ // If the class does not exist it might be following the old
+ // format. phpbb_acp_info_acp_foo needs to be turned into
+ // acp_foo_info and the respective file has to be included
+ // manually because it does not support auto loading
+ $old_info_class_file = str_replace("phpbb_{$module_class}_info_", '', $cur_module);
+ $old_info_class = $old_info_class_file . '_info';
- // Get module title tag
- if (class_exists($class))
- {
- $c_class = new $class();
- $module_info = $c_class->module();
- $fileinfo[str_replace($module_class . '_', '', $module_info['filename'])] = $module_info;
- }
- }
+ if (class_exists($old_info_class))
+ {
+ $info_class = $old_info_class;
}
- closedir($dh);
-
- ksort($fileinfo);
- }
- else
- {
- $filename = $module_class . '_' . basename($module);
- $class = $module_class . '_' . basename($module) . '_info';
-
- if (!class_exists($class))
+ else if (!class_exists($info_class))
{
- include($directory . $filename . '.' . $phpEx);
+ $info_class = $old_info_class;
+ // need to check class exists again because previous checks triggered autoloading
+ if (!class_exists($info_class) && file_exists($directory . $old_info_class_file . '.' . $phpEx))
+ {
+ include($directory . $old_info_class_file . '.' . $phpEx);
+ }
}
- // Get module title tag
- if (class_exists($class))
+ if (class_exists($info_class))
{
- $c_class = new $class();
- $module_info = $c_class->module();
- $fileinfo[str_replace($module_class . '_', '', $module_info['filename'])] = $module_info;
+ $info = new $info_class();
+ $module_info = $info->module();
+
+ $main_class = (isset($module_info['filename'])) ? $module_info['filename'] : $cur_module;
+
+ $fileinfo[$main_class] = $module_info;
}
}
-
+
+ ksort($fileinfo);
+
return $fileinfo;
}
@@ -717,15 +741,15 @@ class acp_modules
*/
function remove_cache_file()
{
- global $cache;
+ global $phpbb_container;
// Sanitise for future path use, it's escaped as appropriate for queries
$p_class = str_replace(array('.', '/', '\\'), '', basename($this->module_class));
-
- $cache->destroy('_modules_' . $p_class);
+
+ $phpbb_container->get('cache.driver')->destroy('_modules_' . $p_class);
// Additionally remove sql cache
- $cache->destroy('sql', MODULES_TABLE);
+ $phpbb_container->get('cache.driver')->destroy('sql', MODULES_TABLE);
}
/**
@@ -1061,5 +1085,3 @@ class acp_modules
return $this->lang_name($target['module_langname']);
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/acp/acp_permission_roles.php b/phpBB/includes/acp/acp_permission_roles.php
index 03ea5a39dd..aca45575d3 100644
--- a/phpBB/includes/acp/acp_permission_roles.php
+++ b/phpBB/includes/acp/acp_permission_roles.php
@@ -2,9 +2,8 @@
/**
*
* @package acp
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -22,16 +21,18 @@ if (!defined('IN_PHPBB'))
class acp_permission_roles
{
var $u_action;
+ protected $auth_admin;
function main($id, $mode)
{
- global $db, $user, $auth, $template, $cache;
+ global $db, $user, $auth, $template, $cache, $phpbb_container;
global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;
+ global $request;
include_once($phpbb_root_path . 'includes/functions_user.' . $phpEx);
include_once($phpbb_root_path . 'includes/acp/auth.' . $phpEx);
- $auth_admin = new auth_admin();
+ $this->auth_admin = new auth_admin();
$user->add_lang('acp/permissions');
add_permission_language();
@@ -46,6 +47,11 @@ class acp_permission_roles
$form_name = 'acp_permissions';
add_form_key($form_name);
+ if (!$role_id && in_array($action, array('remove', 'edit', 'move_up', 'move_down')))
+ {
+ trigger_error($user->lang['NO_ROLE_SELECTED'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
+
switch ($mode)
{
case 'admin_roles':
@@ -85,11 +91,6 @@ class acp_permission_roles
{
case 'remove':
- if (!$role_id)
- {
- trigger_error($user->lang['NO_ROLE_SELECTED'] . adm_back_link($this->u_action), E_USER_WARNING);
- }
-
$sql = 'SELECT *
FROM ' . ACL_ROLES_TABLE . '
WHERE role_id = ' . $role_id;
@@ -123,10 +124,6 @@ class acp_permission_roles
break;
case 'edit':
- if (!$role_id)
- {
- trigger_error($user->lang['NO_ROLE_SELECTED'] . adm_back_link($this->u_action), E_USER_WARNING);
- }
// Get role we edit
$sql = 'SELECT *
@@ -211,7 +208,7 @@ class acp_permission_roles
}
// Now add the auth settings
- $auth_admin->acl_set_role($role_id, $auth_settings);
+ $this->auth_admin->acl_set_role($role_id, $auth_settings);
$role_name = (!empty($user->lang[$role_name])) ? $user->lang[$role_name] : $role_name;
add_log('admin', 'LOG_' . strtoupper($permission_type) . 'ROLE_' . strtoupper($action), $role_name);
@@ -273,12 +270,7 @@ class acp_permission_roles
case 'edit':
if ($action == 'edit')
- {
- if (!$role_id)
- {
- trigger_error($user->lang['NO_ROLE_SELECTED'] . adm_back_link($this->u_action), E_USER_WARNING);
- }
-
+ {
$sql = 'SELECT *
FROM ' . ACL_ROLES_TABLE . '
WHERE role_id = ' . $role_id;
@@ -306,6 +298,8 @@ class acp_permission_roles
trigger_error($user->lang['NO_ROLE_SELECTED'] . adm_back_link($this->u_action), E_USER_WARNING);
}
+ $phpbb_permissions = $phpbb_container->get('acl.permissions');
+
$template->assign_vars(array(
'S_EDIT' => true,
@@ -314,9 +308,8 @@ class acp_permission_roles
'ROLE_NAME' => $role_row['role_name'],
'ROLE_DESCRIPTION' => $role_row['role_description'],
- 'L_ACL_TYPE' => $user->lang['ACL_TYPE_' . strtoupper($permission_type)],
- )
- );
+ 'L_ACL_TYPE' => $phpbb_permissions->get_type_lang($permission_type),
+ ));
// We need to fill the auth options array with ACL_NO options ;)
$sql = 'SELECT auth_option_id, auth_option
@@ -344,7 +337,7 @@ class acp_permission_roles
// Get users/groups/forums using this preset...
if ($action == 'edit')
{
- $hold_ary = $auth_admin->get_role_mask($role_id);
+ $hold_ary = $this->auth_admin->get_role_mask($role_id);
if (sizeof($hold_ary))
{
@@ -355,7 +348,7 @@ class acp_permission_roles
'L_ROLE_ASSIGNED_TO' => sprintf($user->lang['ROLE_ASSIGNED_TO'], $role_name))
);
- $auth_admin->display_role_mask($hold_ary);
+ $this->auth_admin->display_role_mask($hold_ary);
}
}
@@ -365,7 +358,18 @@ class acp_permission_roles
case 'move_up':
case 'move_down':
- $order = request_var('order', 0);
+ $sql = 'SELECT role_order
+ FROM ' . ACL_ROLES_TABLE . "
+ WHERE role_id = $role_id";
+ $result = $db->sql_query($sql);
+ $order = $db->sql_fetchfield('role_order');
+ $db->sql_freeresult($result);
+
+ if ($order === false || ($order == 0 && $action == 'move_up'))
+ {
+ break;
+ }
+ $order = (int) $order;
$order_total = $order * 2 + (($action == 'move_up') ? -1 : 1);
$sql = 'UPDATE ' . ACL_ROLES_TABLE . '
@@ -374,6 +378,14 @@ class acp_permission_roles
AND role_order IN ($order, " . (($action == 'move_up') ? $order - 1 : $order + 1) . ')';
$db->sql_query($sql);
+ if ($request->is_ajax())
+ {
+ $json_response = new \phpbb\json_response;
+ $json_response->send(array(
+ 'success' => (bool) $db->sql_affectedrows(),
+ ));
+ }
+
break;
}
@@ -420,8 +432,8 @@ class acp_permission_roles
'U_EDIT' => $this->u_action . '&amp;action=edit&amp;role_id=' . $row['role_id'],
'U_REMOVE' => $this->u_action . '&amp;action=remove&amp;role_id=' . $row['role_id'],
- 'U_MOVE_UP' => $this->u_action . '&amp;action=move_up&amp;order=' . $row['role_order'],
- 'U_MOVE_DOWN' => $this->u_action . '&amp;action=move_down&amp;order=' . $row['role_order'],
+ 'U_MOVE_UP' => $this->u_action . '&amp;action=move_up&amp;role_id=' . $row['role_id'],
+ 'U_MOVE_DOWN' => $this->u_action . '&amp;action=move_down&amp;role_id=' . $row['role_id'],
'U_DISPLAY_ITEMS' => ($row['role_id'] == $display_item) ? '' : $this->u_action . '&amp;display_item=' . $row['role_id'] . '#assigned_to')
);
@@ -446,8 +458,8 @@ class acp_permission_roles
'S_DISPLAY_ROLE_MASK' => true)
);
- $hold_ary = $auth_admin->get_role_mask($display_item);
- $auth_admin->display_role_mask($hold_ary);
+ $hold_ary = $this->auth_admin->get_role_mask($display_item);
+ $this->auth_admin->display_role_mask($hold_ary);
}
}
@@ -456,14 +468,16 @@ class acp_permission_roles
*/
function display_auth_options($auth_options)
{
- global $template, $user;
+ global $template, $user, $phpbb_container;
+
+ $phpbb_permissions = $phpbb_container->get('acl.permissions');
$content_array = $categories = array();
$key_sort_array = array(0);
$auth_options = array(0 => $auth_options);
// Making use of auth_admin method here (we do not really want to change two similar code fragments)
- auth_admin::build_permission_array($auth_options, $content_array, $categories, $key_sort_array);
+ $this->auth_admin->build_permission_array($auth_options, $content_array, $categories, $key_sort_array);
$content_array = $content_array[0];
@@ -473,7 +487,7 @@ class acp_permission_roles
foreach ($content_array as $cat => $cat_array)
{
$template->assign_block_vars('auth', array(
- 'CAT_NAME' => $user->lang['permission_cat'][$cat],
+ 'CAT_NAME' => $phpbb_permissions->get_category_lang($cat),
'S_YES' => ($cat_array['S_YES'] && !$cat_array['S_NEVER'] && !$cat_array['S_NO']) ? true : false,
'S_NEVER' => ($cat_array['S_NEVER'] && !$cat_array['S_YES'] && !$cat_array['S_NO']) ? true : false,
@@ -488,8 +502,8 @@ class acp_permission_roles
'S_NO' => ($allowed == ACL_NO) ? true : false,
'FIELD_NAME' => $permission,
- 'PERMISSION' => $user->lang['acl_' . $permission]['lang'])
- );
+ 'PERMISSION' => $phpbb_permissions->get_permission_lang($permission),
+ ));
}
}
}
@@ -501,8 +515,6 @@ class acp_permission_roles
{
global $db;
- $auth_admin = new auth_admin();
-
// Get complete auth array
$sql = 'SELECT auth_option, auth_option_id
FROM ' . ACL_OPTIONS_TABLE . "
@@ -530,19 +542,19 @@ class acp_permission_roles
$db->sql_freeresult($result);
// Get role assignments
- $hold_ary = $auth_admin->get_role_mask($role_id);
+ $hold_ary = $this->auth_admin->get_role_mask($role_id);
// Re-assign permissions
foreach ($hold_ary as $forum_id => $forum_ary)
{
if (isset($forum_ary['users']))
{
- $auth_admin->acl_set('user', $forum_id, $forum_ary['users'], $auth_settings, 0, false);
+ $this->auth_admin->acl_set('user', $forum_id, $forum_ary['users'], $auth_settings, 0, false);
}
if (isset($forum_ary['groups']))
{
- $auth_admin->acl_set('group', $forum_id, $forum_ary['groups'], $auth_settings, 0, false);
+ $this->auth_admin->acl_set('group', $forum_id, $forum_ary['groups'], $auth_settings, 0, false);
}
}
@@ -564,8 +576,6 @@ class acp_permission_roles
WHERE role_id = ' . $role_id;
$db->sql_query($sql);
- $auth_admin->acl_clear_prefetch();
+ $this->auth_admin->acl_clear_prefetch();
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/acp/acp_permissions.php b/phpBB/includes/acp/acp_permissions.php
index e9f0af5071..e7dc03db5c 100644
--- a/phpBB/includes/acp/acp_permissions.php
+++ b/phpBB/includes/acp/acp_permissions.php
@@ -2,9 +2,8 @@
/**
*
* @package acp
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -23,15 +22,18 @@ class acp_permissions
{
var $u_action;
var $permission_dropdown;
+ protected $permissions;
function main($id, $mode)
{
- global $db, $user, $auth, $template, $cache;
+ global $db, $user, $auth, $template, $cache, $phpbb_container;
global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;
include_once($phpbb_root_path . 'includes/functions_user.' . $phpEx);
include_once($phpbb_root_path . 'includes/acp/auth.' . $phpEx);
+ $this->permissions = $phpbb_container->get('acl.permissions');
+
$auth_admin = new auth_admin();
$user->add_lang('acp/permissions');
@@ -50,7 +52,7 @@ class acp_permissions
if ($user_id && isset($auth_admin->acl_options['id'][$permission]) && $auth->acl_get('a_viewauth'))
{
- $this->page_title = sprintf($user->lang['TRACE_PERMISSION'], $user->lang['acl_' . $permission]['lang']);
+ $this->page_title = sprintf($user->lang['TRACE_PERMISSION'], $this->permissions->get_permission_lang($permission));
$this->permission_trace($user_id, $forum_id, $permission);
return;
}
@@ -498,7 +500,7 @@ class acp_permissions
$template->assign_vars(array(
'S_FORUM_NAMES' => (sizeof($forum_names)) ? true : false,
- 'FORUM_NAMES' => implode(', ', $forum_names))
+ 'FORUM_NAMES' => implode($user->lang['COMMA_SEPARATOR'], $forum_names))
);
}
@@ -513,7 +515,7 @@ class acp_permissions
$template->assign_vars(array(
'S_PERMISSION_DROPDOWN' => (sizeof($this->permission_dropdown) > 1) ? $this->build_permission_dropdown($this->permission_dropdown, $permission_type, $permission_scope) : false,
- 'L_PERMISSION_TYPE' => $user->lang['ACL_TYPE_' . strtoupper($permission_type)],
+ 'L_PERMISSION_TYPE' => $this->permissions->get_type_lang($permission_type),
'U_ACTION' => $this->u_action,
'S_HIDDEN_FIELDS' => $s_hidden_fields)
@@ -588,7 +590,7 @@ class acp_permissions
*/
function build_permission_dropdown($options, $default_option, $permission_scope)
{
- global $user, $auth;
+ global $auth;
$s_dropdown_options = '';
foreach ($options as $setting)
@@ -599,7 +601,7 @@ class acp_permissions
}
$selected = ($setting == $default_option) ? ' selected="selected"' : '';
- $l_setting = (isset($user->lang['permission_type'][$permission_scope][$setting])) ? $user->lang['permission_type'][$permission_scope][$setting] : $user->lang['permission_type'][$setting];
+ $l_setting = $this->permissions->get_type_lang($setting, $permission_scope);
$s_dropdown_options .= '<option value="' . $setting . '"' . $selected . '>' . $l_setting . '</option>';
}
@@ -657,7 +659,8 @@ class acp_permissions
*/
function set_permissions($mode, $permission_type, &$auth_admin, &$user_id, &$group_id)
{
- global $user, $auth;
+ global $db, $cache, $user, $auth;
+ global $request;
$psubmit = request_var('psubmit', array(0 => array(0 => 0)));
@@ -676,18 +679,17 @@ class acp_permissions
list($ug_id, ) = each($psubmit);
list($forum_id, ) = each($psubmit[$ug_id]);
- if (empty($_POST['setting']) || empty($_POST['setting'][$ug_id]) || empty($_POST['setting'][$ug_id][$forum_id]) || !is_array($_POST['setting'][$ug_id][$forum_id]))
+ $settings = $request->variable('setting', array(0 => array(0 => array('' => 0))), false, \phpbb\request\request_interface::POST);
+ if (empty($settings) || empty($settings[$ug_id]) || empty($settings[$ug_id][$forum_id]))
{
trigger_error('WRONG_PERMISSION_SETTING_FORMAT', E_USER_WARNING);
}
- // We obtain and check $_POST['setting'][$ug_id][$forum_id] directly and not using request_var() because request_var()
- // currently does not support the amount of dimensions required. ;)
- // $auth_settings = request_var('setting', array(0 => array(0 => array('' => 0))));
- $auth_settings = array_map('intval', $_POST['setting'][$ug_id][$forum_id]);
+ $auth_settings = $settings[$ug_id][$forum_id];
// Do we have a role we want to set?
- $assigned_role = (isset($_POST['role'][$ug_id][$forum_id])) ? (int) $_POST['role'][$ug_id][$forum_id] : 0;
+ $roles = $request->variable('role', array(0 => array(0 => 0)), false, \phpbb\request\request_interface::POST);
+ $assigned_role = (isset($roles[$ug_id][$forum_id])) ? (int) $roles[$ug_id][$forum_id] : 0;
// Do the admin want to set these permissions to other items too?
$inherit = request_var('inherit', array(0 => array(0)));
@@ -727,13 +729,13 @@ class acp_permissions
// Do we need to recache the moderator lists?
if ($permission_type == 'm_')
{
- cache_moderators();
+ phpbb_cache_moderators($db, $cache, $auth);
}
// Remove users who are now moderators or admins from everyones foes list
if ($permission_type == 'm_' || $permission_type == 'a_')
{
- update_foes($group_id, $user_id);
+ phpbb_update_foes($db, $auth, $group_id, $user_id);
}
$this->log_action($mode, 'add', $permission_type, $ug_type, $ug_id, $forum_id);
@@ -746,7 +748,8 @@ class acp_permissions
*/
function set_all_permissions($mode, $permission_type, &$auth_admin, &$user_id, &$group_id)
{
- global $user, $auth;
+ global $db, $cache, $user, $auth;
+ global $request;
// User or group to be set?
$ug_type = (sizeof($user_id)) ? 'user' : 'group';
@@ -757,8 +760,8 @@ class acp_permissions
trigger_error($user->lang['NO_AUTH_OPERATION'] . adm_back_link($this->u_action), E_USER_WARNING);
}
- $auth_settings = (isset($_POST['setting'])) ? $_POST['setting'] : array();
- $auth_roles = (isset($_POST['role'])) ? $_POST['role'] : array();
+ $auth_settings = $request->variable('setting', array(0 => array(0 => array('' => 0))), false, \phpbb\request\request_interface::POST);
+ $auth_roles = $request->variable('role', array(0 => array(0 => 0)), false, \phpbb\request\request_interface::POST);
$ug_ids = $forum_ids = array();
// We need to go through the auth settings
@@ -794,13 +797,13 @@ class acp_permissions
// Do we need to recache the moderator lists?
if ($permission_type == 'm_')
{
- cache_moderators();
+ phpbb_cache_moderators($db, $cache, $auth);
}
// Remove users who are now moderators or admins from everyones foes list
if ($permission_type == 'm_' || $permission_type == 'a_')
{
- update_foes($group_id, $user_id);
+ phpbb_update_foes($db, $auth, $group_id, $user_id);
}
$this->log_action($mode, 'add', $permission_type, $ug_type, $ug_ids, $forum_ids);
@@ -858,7 +861,7 @@ class acp_permissions
*/
function remove_permissions($mode, $permission_type, &$auth_admin, &$user_id, &$group_id, &$forum_id)
{
- global $user, $db, $auth;
+ global $user, $db, $cache, $auth;
// User or group to be set?
$ug_type = (sizeof($user_id)) ? 'user' : 'group';
@@ -874,7 +877,7 @@ class acp_permissions
// Do we need to recache the moderator lists?
if ($permission_type == 'm_')
{
- cache_moderators();
+ phpbb_cache_moderators($db, $cache, $auth);
}
$this->log_action($mode, 'del', $permission_type, $ug_type, (($ug_type == 'user') ? $user_id : $group_id), (sizeof($forum_id) ? $forum_id : array(0 => 0)));
@@ -952,12 +955,7 @@ class acp_permissions
if ($user_id != $user->data['user_id'])
{
- $sql = 'SELECT user_id, username, user_permissions, user_type
- FROM ' . USERS_TABLE . '
- WHERE user_id = ' . $user_id;
- $result = $db->sql_query($sql);
- $userdata = $db->sql_fetchrow($result);
- $db->sql_freeresult($result);
+ $userdata = $auth->obtain_user_data($user_id);
}
else
{
@@ -984,7 +982,7 @@ class acp_permissions
$back = request_var('back', 0);
$template->assign_vars(array(
- 'PERMISSION' => $user->lang['acl_' . $permission]['lang'],
+ 'PERMISSION' => $this->permissions->get_permission_lang($permission),
'PERMISSION_USERNAME' => $userdata['username'],
'FORUM_NAME' => $forum_name,
@@ -1105,7 +1103,7 @@ class acp_permissions
{
if ($user_id != $user->data['user_id'])
{
- $auth2 = new auth();
+ $auth2 = new \phpbb\auth\auth();
$auth2->acl($userdata);
$auth_setting = $auth2->acl_get($permission);
}
@@ -1172,7 +1170,7 @@ class acp_permissions
*/
function copy_forum_permissions()
{
- global $auth, $cache, $template, $user;
+ global $db, $auth, $cache, $template, $user;
$user->add_lang('acp/forums');
@@ -1187,7 +1185,7 @@ class acp_permissions
{
if (copy_forum_permissions($src, $dest))
{
- cache_moderators();
+ phpbb_cache_moderators($db, $cache, $auth);
$auth->acl_clear_prefetch();
$cache->destroy('sql', FORUMS_TABLE);
@@ -1311,5 +1309,3 @@ class acp_permissions
);
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/acp/acp_php_info.php b/phpBB/includes/acp/acp_php_info.php
index 7dd345971a..125b77529f 100644
--- a/phpBB/includes/acp/acp_php_info.php
+++ b/phpBB/includes/acp/acp_php_info.php
@@ -2,9 +2,8 @@
/**
*
* @package acp
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -88,5 +87,3 @@ class acp_php_info
return '<a name="' . str_replace(' ', '_', $matches[1]) . '">';
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/acp/acp_profile.php b/phpBB/includes/acp/acp_profile.php
index 19223847f0..4d316d84e4 100644
--- a/phpBB/includes/acp/acp_profile.php
+++ b/phpBB/includes/acp/acp_profile.php
@@ -2,9 +2,8 @@
/**
*
* @package acp
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -25,36 +24,34 @@ class acp_profile
var $edit_lang_id;
var $lang_defs;
+ protected $type_collection;
function main($id, $mode)
{
global $config, $db, $user, $auth, $template, $cache;
global $phpbb_root_path, $phpbb_admin_path, $phpEx, $table_prefix;
+ global $request, $phpbb_container;
include($phpbb_root_path . 'includes/functions_posting.' . $phpEx);
include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
- include($phpbb_root_path . 'includes/functions_profile_fields.' . $phpEx);
$user->add_lang(array('ucp', 'acp/profile'));
$this->tpl_name = 'acp_profile';
$this->page_title = 'ACP_CUSTOM_PROFILE_FIELDS';
+ $field_id = $request->variable('field_id', 0);
$action = (isset($_POST['create'])) ? 'create' : request_var('action', '');
$error = array();
$s_hidden_fields = '';
- // Define some default values for each field type
- $default_values = array(
- FIELD_STRING => array('field_length' => 10, 'field_minlen' => 0, 'field_maxlen' => 20, 'field_validation' => '.*', 'field_novalue' => '', 'field_default_value' => ''),
- FIELD_TEXT => array('field_length' => '5|80', 'field_minlen' => 0, 'field_maxlen' => 1000, 'field_validation' => '.*', 'field_novalue' => '', 'field_default_value' => ''),
- FIELD_INT => array('field_length' => 5, 'field_minlen' => 0, 'field_maxlen' => 100, 'field_validation' => '', 'field_novalue' => 0, 'field_default_value' => 0),
- FIELD_DATE => array('field_length' => 10, 'field_minlen' => 10, 'field_maxlen' => 10, 'field_validation' => '', 'field_novalue' => ' 0- 0- 0', 'field_default_value' => ' 0- 0- 0'),
- FIELD_BOOL => array('field_length' => 1, 'field_minlen' => 0, 'field_maxlen' => 0, 'field_validation' => '', 'field_novalue' => 0, 'field_default_value' => 0),
- FIELD_DROPDOWN => array('field_length' => 0, 'field_minlen' => 0, 'field_maxlen' => 5, 'field_validation' => '', 'field_novalue' => 0, 'field_default_value' => 0),
- );
+ if (!$field_id && in_array($action, array('delete','activate', 'deactivate', 'move_up', 'move_down', 'edit')))
+ {
+ trigger_error($user->lang['NO_FIELD_ID'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
- $cp = new custom_profile_admin();
+ $cp = $phpbb_container->get('profilefields.manager');
+ $this->type_collection = $phpbb_container->get('profilefields.type_collection');
// Build Language array
// Based on this, we decide which elements need to be edited later and which language items are missing
@@ -88,22 +85,16 @@ class acp_profile
// Have some fields been defined?
if (isset($this->lang_defs['entry']))
{
- foreach ($this->lang_defs['entry'] as $field_id => $field_ary)
+ foreach ($this->lang_defs['entry'] as $field_ident => $field_ary)
{
// Fill an array with the languages that are missing for each field
- $this->lang_defs['diff'][$field_id] = array_diff(array_values($this->lang_defs['iso']), $field_ary);
+ $this->lang_defs['diff'][$field_ident] = array_diff(array_values($this->lang_defs['iso']), $field_ary);
}
}
switch ($action)
{
case 'delete':
- $field_id = request_var('field_id', 0);
-
- if (!$field_id)
- {
- trigger_error($user->lang['NO_FIELD_ID'] . adm_back_link($this->u_action), E_USER_WARNING);
- }
if (confirm_box(true))
{
@@ -210,12 +201,6 @@ class acp_profile
break;
case 'activate':
- $field_id = request_var('field_id', 0);
-
- if (!$field_id)
- {
- trigger_error($user->lang['NO_FIELD_ID'] . adm_back_link($this->u_action), E_USER_WARNING);
- }
$sql = 'SELECT lang_id
FROM ' . LANG_TABLE . "
@@ -242,17 +227,20 @@ class acp_profile
$db->sql_freeresult($result);
add_log('admin', 'LOG_PROFILE_FIELD_ACTIVATE', $field_ident);
+
+ if ($request->is_ajax())
+ {
+ $json_response = new \phpbb\json_response();
+ $json_response->send(array(
+ 'text' => $user->lang('DEACTIVATE'),
+ ));
+ }
+
trigger_error($user->lang['PROFILE_FIELD_ACTIVATED'] . adm_back_link($this->u_action));
break;
case 'deactivate':
- $field_id = request_var('field_id', 0);
-
- if (!$field_id)
- {
- trigger_error($user->lang['NO_FIELD_ID'] . adm_back_link($this->u_action), E_USER_WARNING);
- }
$sql = 'UPDATE ' . PROFILE_FIELDS_TABLE . "
SET field_active = 0
@@ -266,14 +254,35 @@ class acp_profile
$field_ident = (string) $db->sql_fetchfield('field_ident');
$db->sql_freeresult($result);
+ if ($request->is_ajax())
+ {
+ $json_response = new \phpbb\json_response();
+ $json_response->send(array(
+ 'text' => $user->lang('ACTIVATE'),
+ ));
+ }
+
add_log('admin', 'LOG_PROFILE_FIELD_DEACTIVATE', $field_ident);
+
trigger_error($user->lang['PROFILE_FIELD_DEACTIVATED'] . adm_back_link($this->u_action));
break;
case 'move_up':
case 'move_down':
- $field_order = request_var('order', 0);
+
+ $sql = 'SELECT field_order
+ FROM ' . PROFILE_FIELDS_TABLE . "
+ WHERE field_id = $field_id";
+ $result = $db->sql_query($sql);
+ $field_order = $db->sql_fetchfield('field_order');
+ $db->sql_freeresult($result);
+
+ if ($field_order === false || ($field_order == 0 && $action == 'move_up'))
+ {
+ break;
+ }
+ $field_order = (int) $field_order;
$order_total = $field_order * 2 + (($action == 'move_up') ? -1 : 1);
$sql = 'UPDATE ' . PROFILE_FIELDS_TABLE . "
@@ -281,12 +290,19 @@ class acp_profile
WHERE field_order IN ($field_order, " . (($action == 'move_up') ? $field_order - 1 : $field_order + 1) . ')';
$db->sql_query($sql);
+ if ($request->is_ajax())
+ {
+ $json_response = new \phpbb\json_response;
+ $json_response->send(array(
+ 'success' => (bool) $db->sql_affectedrows(),
+ ));
+ }
+
break;
case 'create':
case 'edit':
- $field_id = request_var('field_id', 0);
$step = request_var('step', 1);
$submit = (isset($_REQUEST['next']) || isset($_REQUEST['prev'])) ? true : false;
@@ -298,11 +314,6 @@ class acp_profile
// We are editing... we need to grab basic things
if ($action == 'edit')
{
- if (!$field_id)
- {
- trigger_error($user->lang['NO_FIELD_ID'] . adm_back_link($this->u_action), E_USER_WARNING);
- }
-
$sql = 'SELECT l.*, f.*
FROM ' . PROFILE_LANG_TABLE . ' l, ' . PROFILE_FIELDS_TABLE . ' f
WHERE l.lang_id = ' . $this->edit_lang_id . "
@@ -332,6 +343,7 @@ class acp_profile
$this->edit_lang_id = $field_row['lang_id'];
}
$field_type = $field_row['field_type'];
+ $profile_field = $this->type_collection[$field_type];
// Get language entries
$sql = 'SELECT *
@@ -355,14 +367,15 @@ class acp_profile
// We are adding a new field, define basic params
$lang_options = $field_row = array();
- $field_type = request_var('field_type', 0);
+ $field_type = request_var('field_type', '');
- if (!$field_type)
+ if (!isset($this->type_collection[$field_type]))
{
trigger_error($user->lang['NO_FIELD_TYPE'] . adm_back_link($this->u_action), E_USER_WARNING);
}
- $field_row = array_merge($default_values[$field_type], array(
+ $profile_field = $this->type_collection[$field_type];
+ $field_row = array_merge($profile_field->get_default_option_values(), array(
'field_ident' => str_replace(' ', '_', utf8_clean_string(request_var('field_ident', '', true))),
'field_required' => 0,
'field_show_novalue'=> 0,
@@ -370,7 +383,12 @@ class acp_profile
'field_show_profile'=> 0,
'field_no_view' => 0,
'field_show_on_reg' => 0,
+ 'field_show_on_pm' => 0,
'field_show_on_vt' => 0,
+ 'field_show_on_ml' => 0,
+ 'field_is_contact' => 0,
+ 'field_contact_desc'=> '',
+ 'field_contact_url' => '',
'lang_name' => utf8_normalize_nfc(request_var('field_ident', '', true)),
'lang_explain' => '',
'lang_default_value'=> '')
@@ -381,55 +399,40 @@ class acp_profile
// $exclude contains the data we gather in each step
$exclude = array(
- 1 => array('field_ident', 'lang_name', 'lang_explain', 'field_option_none', 'field_show_on_reg', 'field_show_on_vt', 'field_required', 'field_show_novalue', 'field_hide', 'field_show_profile', 'field_no_view'),
+ 1 => array('field_ident', 'lang_name', 'lang_explain', 'field_option_none', 'field_show_on_reg', 'field_show_on_pm', 'field_show_on_vt', 'field_show_on_ml', 'field_required', 'field_show_novalue', 'field_hide', 'field_show_profile', 'field_no_view', 'field_is_contact', 'field_contact_desc', 'field_contact_url'),
2 => array('field_length', 'field_maxlen', 'field_minlen', 'field_validation', 'field_novalue', 'field_default_value'),
3 => array('l_lang_name', 'l_lang_explain', 'l_lang_default_value', 'l_lang_options')
);
- // Text-based fields require the lang_default_value to be excluded
- if ($field_type == FIELD_STRING || $field_type == FIELD_TEXT)
- {
- $exclude[1][] = 'lang_default_value';
- }
-
- // option-specific fields require lang_options to be excluded
- if ($field_type == FIELD_BOOL || $field_type == FIELD_DROPDOWN)
- {
- $exclude[1][] = 'lang_options';
- }
-
- $cp->vars['field_ident'] = ($action == 'create' && $step == 1) ? utf8_clean_string(request_var('field_ident', $field_row['field_ident'], true)) : request_var('field_ident', $field_row['field_ident']);
- $cp->vars['lang_name'] = utf8_normalize_nfc(request_var('lang_name', $field_row['lang_name'], true));
- $cp->vars['lang_explain'] = utf8_normalize_nfc(request_var('lang_explain', $field_row['lang_explain'], true));
- $cp->vars['lang_default_value'] = utf8_normalize_nfc(request_var('lang_default_value', $field_row['lang_default_value'], true));
-
// Visibility Options...
$visibility_ary = array(
'field_required',
'field_show_novalue',
'field_show_on_reg',
+ 'field_show_on_pm',
'field_show_on_vt',
+ 'field_show_on_ml',
'field_show_profile',
'field_hide',
+ 'field_is_contact',
);
- foreach ($visibility_ary as $val)
- {
- $cp->vars[$val] = ($submit || $save) ? request_var($val, 0) : $field_row[$val];
- }
+ $options = $profile_field->prepare_options_form($exclude, $visibility_ary);
- $cp->vars['field_no_view'] = request_var('field_no_view', (int) $field_row['field_no_view']);
+ $cp->vars['field_ident'] = ($action == 'create' && $step == 1) ? utf8_clean_string(request_var('field_ident', $field_row['field_ident'], true)) : request_var('field_ident', $field_row['field_ident']);
+ $cp->vars['lang_name'] = $request->variable('lang_name', $field_row['lang_name'], true);
+ $cp->vars['lang_explain'] = $request->variable('lang_explain', $field_row['lang_explain'], true);
+ $cp->vars['lang_default_value'] = $request->variable('lang_default_value', $field_row['lang_default_value'], true);
+ $cp->vars['field_contact_desc'] = $request->variable('field_contact_desc', $field_row['field_contact_desc'], true);
+ $cp->vars['field_contact_url'] = $request->variable('field_contact_url', $field_row['field_contact_url'], true);
- // A boolean field expects an array as the lang options
- if ($field_type == FIELD_BOOL)
- {
- $options = utf8_normalize_nfc(request_var('lang_options', array(''), true));
- }
- else
+ foreach ($visibility_ary as $val)
{
- $options = utf8_normalize_nfc(request_var('lang_options', '', true));
+ $cp->vars[$val] = ($submit || $save) ? $request->variable($val, 0) : $field_row[$val];
}
+ $cp->vars['field_no_view'] = $request->variable('field_no_view', (int) $field_row['field_no_view']);
+
// If the user has submitted a form with options (i.e. dropdown field)
if ($options)
{
@@ -457,91 +460,9 @@ class acp_profile
{
$var = utf8_normalize_nfc(request_var($key, $field_row[$key], true));
- // Manipulate the intended variables a little bit if needed
- if ($field_type == FIELD_DROPDOWN && $key == 'field_maxlen')
- {
- // Get the number of options if this key is 'field_maxlen'
- $var = sizeof(explode("\n", utf8_normalize_nfc(request_var('lang_options', '', true))));
- }
- else if ($field_type == FIELD_TEXT && $key == 'field_length')
- {
- if (isset($_REQUEST['rows']))
- {
- $cp->vars['rows'] = request_var('rows', 0);
- $cp->vars['columns'] = request_var('columns', 0);
- $var = $cp->vars['rows'] . '|' . $cp->vars['columns'];
- }
- else
- {
- $row_col = explode('|', $var);
- $cp->vars['rows'] = $row_col[0];
- $cp->vars['columns'] = $row_col[1];
- }
- }
- else if ($field_type == FIELD_DATE && $key == 'field_default_value')
- {
- $always_now = request_var('always_now', -1);
-
- if ($always_now == 1 || ($always_now === -1 && $var == 'now'))
- {
- $now = getdate();
-
- $cp->vars['field_default_value_day'] = $now['mday'];
- $cp->vars['field_default_value_month'] = $now['mon'];
- $cp->vars['field_default_value_year'] = $now['year'];
- $var = $_POST['field_default_value'] = 'now';
- }
- else
- {
- if (isset($_REQUEST['field_default_value_day']))
- {
- $cp->vars['field_default_value_day'] = request_var('field_default_value_day', 0);
- $cp->vars['field_default_value_month'] = request_var('field_default_value_month', 0);
- $cp->vars['field_default_value_year'] = request_var('field_default_value_year', 0);
- $var = $_POST['field_default_value'] = sprintf('%2d-%2d-%4d', $cp->vars['field_default_value_day'], $cp->vars['field_default_value_month'], $cp->vars['field_default_value_year']);
- }
- else
- {
- list($cp->vars['field_default_value_day'], $cp->vars['field_default_value_month'], $cp->vars['field_default_value_year']) = explode('-', $var);
- }
- }
- }
- else if ($field_type == FIELD_BOOL && $key == 'field_default_value')
- {
- // 'field_length' == 1 defines radio buttons. Possible values are 1 or 2 only.
- // 'field_length' == 2 defines checkbox. Possible values are 0 or 1 only.
- // If we switch the type on step 2, we have to adjust field value.
- // 1 is a common value for the checkbox and radio buttons.
-
- // Adjust unchecked checkbox value.
- // If we return or save settings from 2nd/3rd page
- // and the checkbox is unchecked, set the value to 0.
- if (isset($_REQUEST['step']) && !isset($_REQUEST[$key]))
- {
- $var = 0;
- }
-
- // If we switch to the checkbox type but former radio buttons value was 2,
- // which is not the case for the checkbox, set it to 0 (unchecked).
- if ($cp->vars['field_length'] == 2 && $var == 2)
- {
- $var = 0;
- }
- // If we switch to the radio buttons but the former checkbox value was 0,
- // which is not the case for the radio buttons, set it to 0.
- else if ($cp->vars['field_length'] == 1 && $var == 0)
- {
- $var = 2;
- }
- }
- else if ($field_type == FIELD_INT && $key == 'field_default_value')
- {
- // Permit an empty string
- if ($action == 'create' && request_var('field_default_value', '') === '')
- {
- $var = '';
- }
- }
+ $field_data = $cp->vars;
+ $var = $profile_field->get_excluded_options($key, $action, $var, $field_data, 2);
+ $cp->vars = $field_data;
$cp->vars[$key] = $var;
}
@@ -590,18 +511,10 @@ class acp_profile
{
$cp->vars[$key] = $$key;
}
- else if ($key == 'l_lang_options' && $field_type == FIELD_BOOL)
- {
- $cp->vars[$key] = utf8_normalize_nfc(request_var($key, array(0 => array('')), true));
- }
- else if ($key == 'l_lang_options' && is_array($cp->vars[$key]))
- {
- foreach ($cp->vars[$key] as $lang_id => $options)
- {
- $cp->vars[$key][$lang_id] = explode("\n", $options);
- }
- }
+ $field_data = $cp->vars;
+ $var = $profile_field->get_excluded_options($key, $action, $var, $field_data, 3);
+ $cp->vars = $field_data;
}
// Check for general issues in every step
@@ -628,15 +541,7 @@ class acp_profile
$error[] = $user->lang['EMPTY_USER_FIELD_NAME'];
}
- if ($field_type == FIELD_DROPDOWN && !sizeof($cp->vars['lang_options']))
- {
- $error[] = $user->lang['NO_FIELD_ENTRIES'];
- }
-
- if ($field_type == FIELD_BOOL && (empty($cp->vars['lang_options'][0]) || empty($cp->vars['lang_options'][1])))
- {
- $error[] = $user->lang['NO_FIELD_ENTRIES'];
- }
+ $error = $profile_field->validate_options_on_submit($error, $cp->vars);
// Check for already existing field ident
if ($action != 'edit')
@@ -673,54 +578,16 @@ class acp_profile
$_new_key_ary = array();
+ $field_data = $cp->vars;
foreach ($key_ary as $key)
{
- if ($field_type == FIELD_TEXT && $key == 'field_length' && isset($_REQUEST['rows']))
- {
- $cp->vars['rows'] = request_var('rows', 0);
- $cp->vars['columns'] = request_var('columns', 0);
- $_new_key_ary[$key] = $cp->vars['rows'] . '|' . $cp->vars['columns'];
- }
- else if ($field_type == FIELD_DATE && $key == 'field_default_value')
- {
- $always_now = request_var('always_now', 0);
-
- if ($always_now)
- {
- $_new_key_ary[$key] = 'now';
- }
- else if (isset($_REQUEST['field_default_value_day']))
- {
- $cp->vars['field_default_value_day'] = request_var('field_default_value_day', 0);
- $cp->vars['field_default_value_month'] = request_var('field_default_value_month', 0);
- $cp->vars['field_default_value_year'] = request_var('field_default_value_year', 0);
- $_new_key_ary[$key] = sprintf('%2d-%2d-%4d', $cp->vars['field_default_value_day'], $cp->vars['field_default_value_month'], $cp->vars['field_default_value_year']);
- }
- }
- else if ($field_type == FIELD_BOOL && $key == 'l_lang_options' && isset($_REQUEST['l_lang_options']))
- {
- $_new_key_ary[$key] = utf8_normalize_nfc(request_var($key, array(array('')), true));
- }
- else if ($field_type == FIELD_BOOL && $key == 'field_default_value')
+ $var = $profile_field->prepare_hidden_fields($step, $key, $action, $field_data);
+ if ($var !== null)
{
- $_new_key_ary[$key] = request_var($key, $cp->vars[$key]);
- }
- else
- {
- if (!isset($_REQUEST[$key]))
- {
- $var = false;
- }
- else if ($key == 'field_ident' && isset($cp->vars[$key]))
- {
- $_new_key_ary[$key]= $cp->vars[$key];
- }
- else
- {
- $_new_key_ary[$key] = (is_array($_REQUEST[$key])) ? utf8_normalize_nfc(request_var($key, array(''), true)) : utf8_normalize_nfc(request_var($key, '', true));
- }
+ $_new_key_ary[$key] = $profile_field->prepare_hidden_fields($step, $key, $action, $field_data);
}
}
+ $cp->vars = $field_data;
$s_hidden_fields .= build_hidden_fields($_new_key_ary);
}
@@ -754,66 +621,34 @@ class acp_profile
{
// Create basic options - only small differences between field types
case 1:
-
- // Build common create options
- $template->assign_vars(array(
+ $template_vars = array(
'S_STEP_ONE' => true,
'S_FIELD_REQUIRED' => ($cp->vars['field_required']) ? true : false,
'S_FIELD_SHOW_NOVALUE'=> ($cp->vars['field_show_novalue']) ? true : false,
'S_SHOW_ON_REG' => ($cp->vars['field_show_on_reg']) ? true : false,
+ 'S_SHOW_ON_PM' => ($cp->vars['field_show_on_pm']) ? true : false,
'S_SHOW_ON_VT' => ($cp->vars['field_show_on_vt']) ? true : false,
+ 'S_SHOW_ON_MEMBERLIST'=> ($cp->vars['field_show_on_ml']) ? true : false,
'S_FIELD_HIDE' => ($cp->vars['field_hide']) ? true : false,
'S_SHOW_PROFILE' => ($cp->vars['field_show_profile']) ? true : false,
'S_FIELD_NO_VIEW' => ($cp->vars['field_no_view']) ? true : false,
+ 'S_FIELD_CONTACT' => $cp->vars['field_is_contact'],
+ 'FIELD_CONTACT_DESC'=> $cp->vars['field_contact_desc'],
+ 'FIELD_CONTACT_URL' => $cp->vars['field_contact_url'],
'L_LANG_SPECIFIC' => sprintf($user->lang['LANG_SPECIFIC_OPTIONS'], $config['default_lang']),
- 'FIELD_TYPE' => $user->lang['FIELD_' . strtoupper($cp->profile_types[$field_type])],
+ 'FIELD_TYPE' => $profile_field->get_name(),
'FIELD_IDENT' => $cp->vars['field_ident'],
'LANG_NAME' => $cp->vars['lang_name'],
- 'LANG_EXPLAIN' => $cp->vars['lang_explain'])
+ 'LANG_EXPLAIN' => $cp->vars['lang_explain'],
);
- // String and Text needs to set default values here...
- if ($field_type == FIELD_STRING || $field_type == FIELD_TEXT)
- {
- $template->assign_vars(array(
- 'S_TEXT' => ($field_type == FIELD_TEXT) ? true : false,
- 'S_STRING' => ($field_type == FIELD_STRING) ? true : false,
-
- 'L_DEFAULT_VALUE_EXPLAIN' => $user->lang[strtoupper($cp->profile_types[$field_type]) . '_DEFAULT_VALUE_EXPLAIN'],
- 'LANG_DEFAULT_VALUE' => $cp->vars['lang_default_value'])
- );
- }
-
- if ($field_type == FIELD_BOOL || $field_type == FIELD_DROPDOWN)
- {
- // Initialize these array elements if we are creating a new field
- if (!sizeof($cp->vars['lang_options']))
- {
- if ($field_type == FIELD_BOOL)
- {
- // No options have been defined for a boolean field.
- $cp->vars['lang_options'][0] = '';
- $cp->vars['lang_options'][1] = '';
- }
- else
- {
- // No options have been defined for the dropdown menu
- $cp->vars['lang_options'] = array();
- }
- }
-
- $template->assign_vars(array(
- 'S_BOOL' => ($field_type == FIELD_BOOL) ? true : false,
- 'S_DROPDOWN' => ($field_type == FIELD_DROPDOWN) ? true : false,
-
- 'L_LANG_OPTIONS_EXPLAIN' => $user->lang[strtoupper($cp->profile_types[$field_type]) . '_ENTRIES_EXPLAIN'],
- 'LANG_OPTIONS' => ($field_type == FIELD_DROPDOWN) ? implode("\n", $cp->vars['lang_options']) : '',
- 'FIRST_LANG_OPTION' => ($field_type == FIELD_BOOL) ? $cp->vars['lang_options'][0] : '',
- 'SECOND_LANG_OPTION' => ($field_type == FIELD_BOOL) ? $cp->vars['lang_options'][1] : '')
- );
- }
+ $field_data = $cp->vars;
+ $profile_field->display_options($template_vars, $field_data);
+ $cp->vars = $field_data;
+ // Build common create options
+ $template->assign_vars($template_vars);
break;
case 2:
@@ -824,8 +659,7 @@ class acp_profile
);
// Build options based on profile type
- $function = 'get_' . $cp->profile_types[$field_type] . '_options';
- $options = $cp->$function();
+ $options = $profile_field->get_options($this->lang_defs['iso'][$config['default_lang']], $cp->vars);
foreach ($options as $num => $option_ary)
{
@@ -887,17 +721,18 @@ class acp_profile
$s_one_need_edit = true;
}
+ $profile_field = $this->type_collection[$row['field_type']];
$template->assign_block_vars('fields', array(
'FIELD_IDENT' => $row['field_ident'],
- 'FIELD_TYPE' => $user->lang['FIELD_' . strtoupper($cp->profile_types[$row['field_type']])],
+ 'FIELD_TYPE' => $profile_field->get_name(),
'L_ACTIVATE_DEACTIVATE' => $user->lang[$active_lang],
'U_ACTIVATE_DEACTIVATE' => $this->u_action . "&amp;action=$active_value&amp;field_id=$id",
'U_EDIT' => $this->u_action . "&amp;action=edit&amp;field_id=$id",
'U_TRANSLATE' => $this->u_action . "&amp;action=edit&amp;field_id=$id&amp;step=3",
'U_DELETE' => $this->u_action . "&amp;action=delete&amp;field_id=$id",
- 'U_MOVE_UP' => $this->u_action . "&amp;action=move_up&amp;order={$row['field_order']}",
- 'U_MOVE_DOWN' => $this->u_action . "&amp;action=move_down&amp;order={$row['field_order']}",
+ 'U_MOVE_UP' => $this->u_action . "&amp;action=move_up&amp;field_id=$id",
+ 'U_MOVE_DOWN' => $this->u_action . "&amp;action=move_down&amp;field_id=$id",
'S_NEED_EDIT' => $s_need_edit)
);
@@ -911,15 +746,15 @@ class acp_profile
}
$s_select_type = '';
- foreach ($cp->profile_types as $key => $value)
+ foreach ($this->type_collection as $key => $profile_field)
{
- $s_select_type .= '<option value="' . $key . '">' . $user->lang['FIELD_' . strtoupper($value)] . '</option>';
+ $s_select_type .= '<option value="' . $key . '">' . $profile_field->get_name() . '</option>';
}
$template->assign_vars(array(
'U_ACTION' => $this->u_action,
- 'S_TYPE_OPTIONS' => $s_select_type)
- );
+ 'S_TYPE_OPTIONS' => $s_select_type,
+ ));
}
/**
@@ -927,7 +762,7 @@ class acp_profile
*/
function build_language_options(&$cp, $field_type, $action = 'create')
{
- global $user, $config, $db;
+ global $user, $config, $db, $phpbb_container;
$default_lang_id = (!empty($this->edit_lang_id)) ? $this->edit_lang_id : $this->lang_defs['iso'][$config['default_lang']];
@@ -944,31 +779,8 @@ class acp_profile
}
$db->sql_freeresult($result);
- $options = array();
- $options['lang_name'] = 'string';
- if ($cp->vars['lang_explain'])
- {
- $options['lang_explain'] = 'text';
- }
-
- switch ($field_type)
- {
- case FIELD_BOOL:
- $options['lang_options'] = 'two_options';
- break;
-
- case FIELD_DROPDOWN:
- $options['lang_options'] = 'optionfield';
- break;
-
- case FIELD_TEXT:
- case FIELD_STRING:
- if (strlen($cp->vars['lang_default_value']))
- {
- $options['lang_default_value'] = ($field_type == FIELD_STRING) ? 'string' : 'text';
- }
- break;
- }
+ $profile_field = $this->type_collection[$field_type];
+ $options = $profile_field->get_language_options($cp->vars);
$lang_options = array();
@@ -1047,7 +859,7 @@ class acp_profile
*/
function save_profile_field(&$cp, $field_type, $action = 'create')
{
- global $db, $config, $user;
+ global $db, $config, $user, $phpbb_container;
$field_id = request_var('field_id', 0);
@@ -1078,10 +890,15 @@ class acp_profile
'field_required' => $cp->vars['field_required'],
'field_show_novalue' => $cp->vars['field_show_novalue'],
'field_show_on_reg' => $cp->vars['field_show_on_reg'],
+ 'field_show_on_pm' => $cp->vars['field_show_on_pm'],
'field_show_on_vt' => $cp->vars['field_show_on_vt'],
+ 'field_show_on_ml' => $cp->vars['field_show_on_ml'],
'field_hide' => $cp->vars['field_hide'],
'field_show_profile' => $cp->vars['field_show_profile'],
- 'field_no_view' => $cp->vars['field_no_view']
+ 'field_no_view' => $cp->vars['field_no_view'],
+ 'field_is_contact' => $cp->vars['field_is_contact'],
+ 'field_contact_desc' => $cp->vars['field_contact_desc'],
+ 'field_contact_url' => $cp->vars['field_contact_url'],
);
if ($action == 'create')
@@ -1107,10 +924,16 @@ class acp_profile
$db->sql_query($sql);
}
+ $profile_field = $this->type_collection[$field_type];
+
if ($action == 'create')
{
$field_ident = 'pf_' . $field_ident;
- $profile_sql[] = $this->add_field_ident($field_ident, $field_type);
+
+ $db_tools = $phpbb_container->get('dbal.tools');
+
+ list($sql_type, $null) = $db_tools->get_column_type($profile_field->get_database_column_type());
+ $profile_sql[] = $this->add_field_ident($field_ident, $sql_type);
}
$sql_ary = array(
@@ -1164,23 +987,7 @@ class acp_profile
}
}
- // These are always arrays because the key is the language id...
- $cp->vars['l_lang_name'] = utf8_normalize_nfc(request_var('l_lang_name', array(0 => ''), true));
- $cp->vars['l_lang_explain'] = utf8_normalize_nfc(request_var('l_lang_explain', array(0 => ''), true));
- $cp->vars['l_lang_default_value'] = utf8_normalize_nfc(request_var('l_lang_default_value', array(0 => ''), true));
-
- if ($field_type != FIELD_BOOL)
- {
- $cp->vars['l_lang_options'] = utf8_normalize_nfc(request_var('l_lang_options', array(0 => ''), true));
- }
- else
- {
- /**
- * @todo check if this line is correct...
- $cp->vars['l_lang_default_value'] = request_var('l_lang_default_value', array(0 => array('')), true);
- */
- $cp->vars['l_lang_options'] = utf8_normalize_nfc(request_var('l_lang_options', array(0 => array('')), true));
- }
+ $cp->vars = $profile_field->get_language_options_input($cp->vars);
if ($cp->vars['lang_options'])
{
@@ -1200,7 +1007,7 @@ class acp_profile
foreach ($cp->vars['lang_options'] as $option_id => $value)
{
$sql_ary = array(
- 'field_type' => (int) $field_type,
+ 'field_type' => $field_type,
'lang_value' => $value
);
@@ -1255,7 +1062,7 @@ class acp_profile
'field_id' => (int) $field_id,
'lang_id' => (int) $lang_id,
'option_id' => (int) $option_id,
- 'field_type' => (int) $field_type,
+ 'field_type' => $field_type,
'lang_value' => $value
);
}
@@ -1385,7 +1192,7 @@ class acp_profile
/**
* Return sql statement for adding a new field ident (profile field) to the profile fields data table
*/
- function add_field_ident($field_ident, $field_type)
+ function add_field_ident($field_ident, $sql_type)
{
global $db;
@@ -1394,73 +1201,11 @@ class acp_profile
case 'mysql':
case 'mysql4':
case 'mysqli':
-
- // We are defining the biggest common value, because of the possibility to edit the min/max values of each field.
- $sql = 'ALTER TABLE ' . PROFILE_FIELDS_DATA_TABLE . " ADD `$field_ident` ";
-
- switch ($field_type)
- {
- case FIELD_STRING:
- $sql .= ' VARCHAR(255) ';
- break;
-
- case FIELD_DATE:
- $sql .= 'VARCHAR(10) ';
- break;
-
- case FIELD_TEXT:
- $sql .= "TEXT";
- // ADD {$field_ident}_bbcode_uid VARCHAR(5) NOT NULL,
- // ADD {$field_ident}_bbcode_bitfield INT(11) UNSIGNED";
- break;
-
- case FIELD_BOOL:
- $sql .= 'TINYINT(2) ';
- break;
-
- case FIELD_DROPDOWN:
- $sql .= 'MEDIUMINT(8) ';
- break;
-
- case FIELD_INT:
- $sql .= 'BIGINT(20) ';
- break;
- }
+ $sql = 'ALTER TABLE ' . PROFILE_FIELDS_DATA_TABLE . " ADD `$field_ident` " . $sql_type;
break;
case 'sqlite':
-
- switch ($field_type)
- {
- case FIELD_STRING:
- $type = ' VARCHAR(255) ';
- break;
-
- case FIELD_DATE:
- $type = 'VARCHAR(10) ';
- break;
-
- case FIELD_TEXT:
- $type = "TEXT(65535)";
- // ADD {$field_ident}_bbcode_uid VARCHAR(5) NOT NULL,
- // ADD {$field_ident}_bbcode_bitfield INT(11) UNSIGNED";
- break;
-
- case FIELD_BOOL:
- $type = 'TINYINT(2) ';
- break;
-
- case FIELD_DROPDOWN:
- $type = 'MEDIUMINT(8) ';
- break;
-
- case FIELD_INT:
- $type = 'BIGINT(20) ';
- break;
- }
-
- // We are defining the biggest common value, because of the possibility to edit the min/max values of each field.
if (version_compare(sqlite_libversion(), '3.0') == -1)
{
$sql = "SELECT sql
@@ -1495,7 +1240,7 @@ class acp_profile
$columns = implode(',', $column_list);
- $new_table_cols = $field_ident . ' ' . $type . ',' . $new_table_cols;
+ $new_table_cols = $field_ident . ' ' . $sql_type . ',' . $new_table_cols;
// create a new table and fill it up. destroy the temp one
$db->sql_query('CREATE TABLE ' . PROFILE_FIELDS_DATA_TABLE . ' (' . $new_table_cols . ');');
@@ -1504,7 +1249,7 @@ class acp_profile
}
else
{
- $sql = 'ALTER TABLE ' . PROFILE_FIELDS_DATA_TABLE . " ADD $field_ident [$type]";
+ $sql = 'ALTER TABLE ' . PROFILE_FIELDS_DATA_TABLE . " ADD $field_ident [$sql_type]";
}
break;
@@ -1512,140 +1257,22 @@ class acp_profile
case 'mssql':
case 'mssql_odbc':
case 'mssqlnative':
-
- // We are defining the biggest common value, because of the possibility to edit the min/max values of each field.
- $sql = 'ALTER TABLE [' . PROFILE_FIELDS_DATA_TABLE . "] ADD [$field_ident] ";
-
- switch ($field_type)
- {
- case FIELD_STRING:
- $sql .= ' [VARCHAR] (255) ';
- break;
-
- case FIELD_DATE:
- $sql .= '[VARCHAR] (10) ';
- break;
-
- case FIELD_TEXT:
- $sql .= "[TEXT]";
- // ADD {$field_ident}_bbcode_uid [VARCHAR] (5) NOT NULL,
- // ADD {$field_ident}_bbcode_bitfield [INT] UNSIGNED";
- break;
-
- case FIELD_BOOL:
- case FIELD_DROPDOWN:
- $sql .= '[INT] ';
- break;
-
- case FIELD_INT:
- $sql .= '[FLOAT] ';
- break;
- }
+ $sql = 'ALTER TABLE [' . PROFILE_FIELDS_DATA_TABLE . "] ADD [$field_ident] " . $sql_type;
break;
case 'postgres':
-
- // We are defining the biggest common value, because of the possibility to edit the min/max values of each field.
- $sql = 'ALTER TABLE ' . PROFILE_FIELDS_DATA_TABLE . " ADD COLUMN \"$field_ident\" ";
-
- switch ($field_type)
- {
- case FIELD_STRING:
- $sql .= ' VARCHAR(255) ';
- break;
-
- case FIELD_DATE:
- $sql .= 'VARCHAR(10) ';
- break;
-
- case FIELD_TEXT:
- $sql .= "TEXT";
- // ADD {$field_ident}_bbcode_uid VARCHAR(5) NOT NULL,
- // ADD {$field_ident}_bbcode_bitfield INT4 UNSIGNED";
- break;
-
- case FIELD_BOOL:
- $sql .= 'INT2 ';
- break;
-
- case FIELD_DROPDOWN:
- $sql .= 'INT4 ';
- break;
-
- case FIELD_INT:
- $sql .= 'INT8 ';
- break;
- }
+ $sql = 'ALTER TABLE ' . PROFILE_FIELDS_DATA_TABLE . " ADD COLUMN \"$field_ident\" " . $sql_type;
break;
case 'firebird':
-
- // We are defining the biggest common value, because of the possibility to edit the min/max values of each field.
- $sql = 'ALTER TABLE ' . PROFILE_FIELDS_DATA_TABLE . ' ADD "' . strtoupper($field_ident) . '" ';
-
- switch ($field_type)
- {
- case FIELD_STRING:
- $sql .= ' VARCHAR(255) ';
- break;
-
- case FIELD_DATE:
- $sql .= 'VARCHAR(10) ';
- break;
-
- case FIELD_TEXT:
- $sql .= "BLOB SUB_TYPE TEXT";
- // ADD {$field_ident}_bbcode_uid VARCHAR(5) NOT NULL,
- // ADD {$field_ident}_bbcode_bitfield INTEGER UNSIGNED";
- break;
-
- case FIELD_BOOL:
- case FIELD_DROPDOWN:
- $sql .= 'INTEGER ';
- break;
-
- case FIELD_INT:
- $sql .= 'DOUBLE PRECISION ';
- break;
- }
+ $sql = 'ALTER TABLE ' . PROFILE_FIELDS_DATA_TABLE . ' ADD "' . strtoupper($field_ident) . '" ' . $sql_type;
break;
case 'oracle':
-
- // We are defining the biggest common value, because of the possibility to edit the min/max values of each field.
- $sql = 'ALTER TABLE ' . PROFILE_FIELDS_DATA_TABLE . " ADD $field_ident ";
-
- switch ($field_type)
- {
- case FIELD_STRING:
- $sql .= ' VARCHAR2(255) ';
- break;
-
- case FIELD_DATE:
- $sql .= 'VARCHAR2(10) ';
- break;
-
- case FIELD_TEXT:
- $sql .= "CLOB";
- // ADD {$field_ident}_bbcode_uid VARCHAR2(5) NOT NULL,
- // ADD {$field_ident}_bbcode_bitfield NUMBER(11) UNSIGNED";
- break;
-
- case FIELD_BOOL:
- $sql .= 'NUMBER(2) ';
- break;
-
- case FIELD_DROPDOWN:
- $sql .= 'NUMBER(8) ';
- break;
-
- case FIELD_INT:
- $sql .= 'NUMBER(20) ';
- break;
- }
+ $sql = 'ALTER TABLE ' . PROFILE_FIELDS_DATA_TABLE . " ADD $field_ident " . $sql_type;
break;
}
@@ -1653,5 +1280,3 @@ class acp_profile
return $sql;
}
}
-
-?>
diff --git a/phpBB/includes/acp/acp_prune.php b/phpBB/includes/acp/acp_prune.php
index ffe20f86f5..0f9ca9bab3 100644
--- a/phpBB/includes/acp/acp_prune.php
+++ b/phpBB/includes/acp/acp_prune.php
@@ -2,9 +2,8 @@
/**
*
* @package acp
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -243,8 +242,8 @@ class acp_prune
if (confirm_box(true))
{
$user_ids = $usernames = array();
- $this->get_prune_users($user_ids, $usernames);
+ $this->get_prune_users($user_ids, $usernames);
if (sizeof($user_ids))
{
if ($action == 'deactivate')
@@ -256,19 +255,13 @@ class acp_prune
{
if ($deleteposts)
{
- foreach ($user_ids as $user_id)
- {
- user_delete('remove', $user_id);
- }
+ user_delete('remove', $user_ids);
$l_log = 'LOG_PRUNE_USER_DEL_DEL';
}
else
{
- foreach ($user_ids as $user_id)
- {
- user_delete('retain', $user_id, $usernames[$user_id]);
- }
+ user_delete('retain', $user_ids, true);
$l_log = 'LOG_PRUNE_USER_DEL_ANON';
}
@@ -300,6 +293,7 @@ class acp_prune
{
$template->assign_block_vars('users', array(
'USERNAME' => $usernames[$user_id],
+ 'USER_ID' => $user_id,
'U_PROFILE' => append_sid($phpbb_root_path . 'memberlist.' . $phpEx, 'mode=viewprofile&amp;u=' . $user_id),
'U_USER_ADMIN' => ($auth->acl_get('a_user')) ? append_sid("{$phpbb_admin_path}index.$phpEx", 'i=users&amp;mode=overview&amp;u=' . $user_id, true, $user->session_id) : '',
));
@@ -315,17 +309,7 @@ class acp_prune
'mode' => $mode,
'prune' => 1,
- 'users' => utf8_normalize_nfc(request_var('users', '', true)),
- 'username' => utf8_normalize_nfc(request_var('username', '', true)),
- 'email' => request_var('email', ''),
- 'joined_select' => request_var('joined_select', ''),
- 'joined' => request_var('joined', ''),
- 'active_select' => request_var('active_select', ''),
- 'active' => request_var('active', ''),
- 'count_select' => request_var('count_select', ''),
- 'count' => request_var('count', ''),
'deleteposts' => request_var('deleteposts', 0),
-
'action' => request_var('action', ''),
)), 'confirm_body_prune.html');
}
@@ -341,22 +325,36 @@ class acp_prune
}
$find_time = array('lt' => $user->lang['BEFORE'], 'gt' => $user->lang['AFTER']);
- $s_find_join_time = '';
- foreach ($find_time as $key => $value)
- {
- $s_find_join_time .= '<option value="' . $key . '">' . $value . '</option>';
- }
-
$s_find_active_time = '';
foreach ($find_time as $key => $value)
{
$s_find_active_time .= '<option value="' . $key . '">' . $value . '</option>';
}
+ $sql = 'SELECT group_id, group_name
+ FROM ' . GROUPS_TABLE . '
+ WHERE group_type <> ' . GROUP_SPECIAL . '
+ ORDER BY group_name ASC';
+ $result = $db->sql_query($sql);
+
+ $s_group_list = '';
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $s_group_list .= '<option value="' . $row['group_id'] . '">' . $row['group_name'] . '</option>';
+ }
+ $db->sql_freeresult($result);
+
+ if ($s_group_list)
+ {
+ // Only prepend the "All groups" option if there are groups,
+ // otherwise we don't want to display this option at all.
+ $s_group_list = '<option value="0">' . $user->lang['PRUNE_USERS_GROUP_NONE'] . '</option>' . $s_group_list;
+ }
+
$template->assign_vars(array(
'U_ACTION' => $this->u_action,
- 'S_JOINED_OPTIONS' => $s_find_join_time,
'S_ACTIVE_OPTIONS' => $s_find_active_time,
+ 'S_GROUP_LIST' => $s_group_list,
'S_COUNT_OPTIONS' => $s_find_count,
'U_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&amp;form=acp_prune&amp;field=users'),
));
@@ -367,35 +365,71 @@ class acp_prune
*/
function get_prune_users(&$user_ids, &$usernames)
{
- global $user, $db;
+ global $user, $db, $request;
- $users = utf8_normalize_nfc(request_var('users', '', true));
-
- if ($users)
+ $users_by_name = request_var('users', '', true);
+ $users_by_id = request_var('user_ids', array(0));
+ $group_id = request_var('group_id', 0);
+ $posts_on_queue = (trim($request->variable('posts_on_queue', '')) === '') ? false : $request->variable('posts_on_queue', 0);
+
+ if ($users_by_name)
{
- $users = explode("\n", $users);
+ $users = explode("\n", $users_by_name);
$where_sql = ' AND ' . $db->sql_in_set('username_clean', array_map('utf8_clean_string', $users));
}
+ else if (!empty($users_by_id))
+ {
+ $user_ids = $users_by_id;
+ user_get_id_name($user_ids, $usernames);
+
+ $where_sql = ' AND ' . $db->sql_in_set('user_id', $user_ids);
+ }
else
{
- $username = utf8_normalize_nfc(request_var('username', '', true));
+ $username = request_var('username', '', true);
$email = request_var('email', '');
- $joined_select = request_var('joined_select', 'lt');
$active_select = request_var('active_select', 'lt');
$count_select = request_var('count_select', 'eq');
- $joined = request_var('joined', '');
+ $queue_select = request_var('queue_select', 'gt');
+ $joined_before = request_var('joined_before', '');
+ $joined_after = request_var('joined_after', '');
$active = request_var('active', '');
+ $count = request_var('count', 0);
+
$active = ($active) ? explode('-', $active) : array();
- $joined = ($joined) ? explode('-', $joined) : array();
+ $joined_before = ($joined_before) ? explode('-', $joined_before) : array();
+ $joined_after = ($joined_after) ? explode('-', $joined_after) : array();
- if ((sizeof($active) && sizeof($active) != 3) || (sizeof($joined) && sizeof($joined) != 3))
+ // calculate the conditions required by the join time criteria
+ $joined_sql = '';
+ if (!empty($joined_before) && !empty($joined_after))
{
- trigger_error($user->lang['WRONG_ACTIVE_JOINED_DATE'] . adm_back_link($this->u_action), E_USER_WARNING);
+ // if the two entered dates are equal, we need to adjust
+ // so that our time range is a full day instead of 1 second
+ if ($joined_after == $joined_before)
+ {
+ $joined_after[2] += 1;
+ }
+
+ $joined_sql = ' AND user_regdate BETWEEN ' . gmmktime(0, 0, 0, (int) $joined_after[1], (int) $joined_after[2], (int) $joined_after[0]) .
+ ' AND ' . gmmktime(0, 0, 0, (int) $joined_before[1], (int) $joined_before[2], (int) $joined_before[0]);
}
+ else if (empty($joined_before) && !empty($joined_after))
+ {
+ $joined_sql = ' AND user_regdate > ' . gmmktime(0, 0, 0, (int) $joined_after[1], (int) $joined_after[2], (int) $joined_after[0]);
+ }
+ else if (empty($joined_after) && !empty($joined_before))
+ {
+ $joined_sql = ' AND user_regdate < ' . gmmktime(0, 0, 0, (int) $joined_before[1], (int) $joined_before[2], (int) $joined_before[0]);
+ }
+ // implicit else when both arrays are empty do nothing
- $count = request_var('count', '');
+ if ((sizeof($active) && sizeof($active) != 3) || (sizeof($joined_before) && sizeof($joined_before) != 3) || (sizeof($joined_after) && sizeof($joined_after) != 3))
+ {
+ trigger_error($user->lang['WRONG_ACTIVE_JOINED_DATE'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
$key_match = array('lt' => '<', 'gt' => '>', 'eq' => '=');
$sort_by_types = array('username', 'user_email', 'user_posts', 'user_regdate', 'user_lastvisit');
@@ -403,8 +437,8 @@ class acp_prune
$where_sql = '';
$where_sql .= ($username) ? ' AND username_clean ' . $db->sql_like_expression(str_replace('*', $db->any_char, utf8_clean_string($username))) : '';
$where_sql .= ($email) ? ' AND user_email ' . $db->sql_like_expression(str_replace('*', $db->any_char, $email)) . ' ' : '';
- $where_sql .= (sizeof($joined)) ? " AND user_regdate " . $key_match[$joined_select] . ' ' . gmmktime(0, 0, 0, (int) $joined[1], (int) $joined[2], (int) $joined[0]) : '';
- $where_sql .= ($count !== '') ? " AND user_posts " . $key_match[$count_select] . ' ' . (int) $count . ' ' : '';
+ $where_sql .= $joined_sql;
+ $where_sql .= ($count) ? " AND user_posts " . $key_match[$count_select] . ' ' . (int) $count . ' ' : '';
// First handle pruning of users who never logged in, last active date is 0000-00-00
if (sizeof($active) && (int) $active[0] == 0 && (int) $active[1] == 0 && (int) $active[2] == 0)
@@ -421,8 +455,8 @@ class acp_prune
}
}
- // Protect the admin, do not prune if no options are given...
- if (!$where_sql)
+ // If no search criteria were provided, go no further.
+ if (!$where_sql && !$group_id && $posts_on_queue === false)
{
return;
}
@@ -439,28 +473,84 @@ class acp_prune
}
$db->sql_freeresult($result);
- // Do not prune founder members
- $sql = 'SELECT user_id, username
- FROM ' . USERS_TABLE . '
- WHERE user_id <> ' . ANONYMOUS . '
- AND user_type <> ' . USER_FOUNDER . "
- $where_sql";
- $result = $db->sql_query($sql);
+ // Protect the admin, do not prune if no options are given...
+ if ($where_sql)
+ {
+ // Do not prune founder members
+ $sql = 'SELECT user_id, username
+ FROM ' . USERS_TABLE . '
+ WHERE user_id <> ' . ANONYMOUS . '
+ AND user_type <> ' . USER_FOUNDER . "
+ $where_sql";
+ $result = $db->sql_query($sql);
- $where_sql = '';
- $user_ids = $usernames = array();
+ $user_ids = $usernames = array();
- while ($row = $db->sql_fetchrow($result))
+ while ($row = $db->sql_fetchrow($result))
+ {
+ // Do not prune bots and the user currently pruning.
+ if ($row['user_id'] != $user->data['user_id'] && !in_array($row['user_id'], $bot_ids))
+ {
+ $user_ids[] = $row['user_id'];
+ $usernames[$row['user_id']] = $row['username'];
+ }
+ }
+ $db->sql_freeresult($result);
+ }
+
+ if ($group_id)
{
- // Do not prune bots and the user currently pruning.
- if ($row['user_id'] != $user->data['user_id'] && !in_array($row['user_id'], $bot_ids))
+ $sql = 'SELECT u.user_id, u.username
+ FROM ' . USER_GROUP_TABLE . ' ug, ' . USERS_TABLE . ' u
+ WHERE ug.group_id = ' . (int) $group_id . '
+ AND ug.user_id <> ' . ANONYMOUS . '
+ AND u.user_type <> ' . USER_FOUNDER . '
+ AND ug.user_pending = 0 ' .
+ ((!empty($user_ids)) ? 'AND ' . $db->sql_in_set('ug.user_id', $user_ids) : '') . '
+ AND u.user_id = ug.user_id';
+ $result = $db->sql_query($sql);
+
+ // we're performing an intersection operation, so all the relevant users
+ // come from this most recent query (which was limited to the results of the
+ // previous query)
+ $user_ids = $usernames = array();
+ while ($row = $db->sql_fetchrow($result))
{
- $user_ids[] = $row['user_id'];
- $usernames[$row['user_id']] = $row['username'];
+ // Do not prune bots and the user currently pruning.
+ if ($row['user_id'] != $user->data['user_id'] && !in_array($row['user_id'], $bot_ids))
+ {
+ $user_ids[] = $row['user_id'];
+ $usernames[$row['user_id']] = $row['username'];
+ }
}
+ $db->sql_freeresult($result);
+ }
+
+ if ($posts_on_queue !== false)
+ {
+ $sql = 'SELECT u.user_id, u.username, COUNT(p.post_id) AS queue_posts
+ FROM ' . POSTS_TABLE . ' p, ' . USERS_TABLE . ' u
+ WHERE u.user_id <> ' . ANONYMOUS . '
+ AND u.user_type <> ' . USER_FOUNDER .
+ ((!empty($user_ids)) ? 'AND ' . $db->sql_in_set('p.poster_id', $user_ids) : '') . '
+ AND p.post_visibility = ' . ITEM_UNAPPROVED . '
+ AND u.user_id = p.poster_id
+ GROUP BY p.poster_id
+ HAVING queue_posts ' . $key_match[$queue_select] . ' ' . $posts_on_queue;
+ $result = $db->sql_query($sql);
+
+ // same intersection logic as the above group ID portion
+ $user_ids = $usernames = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ // Do not prune bots and the user currently pruning.
+ if ($row['user_id'] != $user->data['user_id'] && !in_array($row['user_id'], $bot_ids))
+ {
+ $user_ids[] = $row['user_id'];
+ $usernames[$row['user_id']] = $row['username'];
+ }
+ }
+ $db->sql_freeresult($result);
}
- $db->sql_freeresult($result);
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/acp/acp_ranks.php b/phpBB/includes/acp/acp_ranks.php
index ea057cd84c..73e1de44d9 100644
--- a/phpBB/includes/acp/acp_ranks.php
+++ b/phpBB/includes/acp/acp_ranks.php
@@ -2,9 +2,8 @@
/**
*
* @package acp
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -25,7 +24,7 @@ class acp_ranks
function main($id, $mode)
{
- global $db, $user, $auth, $template, $cache;
+ global $db, $user, $auth, $template, $cache, $request;
global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;
$user->add_lang('acp/posting');
@@ -72,7 +71,7 @@ class acp_ranks
'rank_min' => $min_posts,
'rank_image' => htmlspecialchars_decode($rank_image)
);
-
+
if ($rank_id)
{
$sql = 'UPDATE ' . RANKS_TABLE . ' SET ' . $db->sql_build_array('UPDATE', $sql_ary) . " WHERE rank_id = $rank_id";
@@ -123,6 +122,18 @@ class acp_ranks
$cache->destroy('_ranks');
add_log('admin', 'LOG_RANK_REMOVED', $rank_title);
+
+ if ($request->is_ajax())
+ {
+ $json_response = new \phpbb\json_response;
+ $json_response->send(array(
+ 'MESSAGE_TITLE' => $user->lang['INFORMATION'],
+ 'MESSAGE_TEXT' => $user->lang['RANK_REMOVED'],
+ 'REFRESH_DATA' => array(
+ 'time' => 3
+ )
+ ));
+ }
}
else
{
@@ -140,7 +151,7 @@ class acp_ranks
case 'add':
$data = $ranks = $existing_imgs = array();
-
+
$sql = 'SELECT *
FROM ' . RANKS_TABLE . '
ORDER BY rank_min ASC, rank_special ASC';
@@ -198,17 +209,17 @@ class acp_ranks
'RANK_TITLE' => (isset($ranks['rank_title'])) ? $ranks['rank_title'] : '',
'S_FILENAME_LIST' => $filename_list,
- 'RANK_IMAGE' => ($edit_img) ? $phpbb_root_path . $config['ranks_path'] . '/' . $edit_img : $phpbb_admin_path . 'images/spacer.gif',
+ 'RANK_IMAGE' => ($edit_img) ? $phpbb_root_path . $config['ranks_path'] . '/' . $edit_img : htmlspecialchars($phpbb_admin_path) . 'images/spacer.gif',
'S_SPECIAL_RANK' => (isset($ranks['rank_special']) && $ranks['rank_special']) ? true : false,
'MIN_POSTS' => (isset($ranks['rank_min']) && !$ranks['rank_special']) ? $ranks['rank_min'] : 0)
);
-
+
return;
break;
}
-
+
$template->assign_vars(array(
'U_ACTION' => $this->u_action)
);
@@ -230,11 +241,9 @@ class acp_ranks
'U_EDIT' => $this->u_action . '&amp;action=edit&amp;id=' . $row['rank_id'],
'U_DELETE' => $this->u_action . '&amp;action=delete&amp;id=' . $row['rank_id'])
- );
+ );
}
$db->sql_freeresult($result);
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/acp/acp_reasons.php b/phpBB/includes/acp/acp_reasons.php
index dbc9fcb6cc..569bb73ab0 100644
--- a/phpBB/includes/acp/acp_reasons.php
+++ b/phpBB/includes/acp/acp_reasons.php
@@ -2,9 +2,8 @@
/**
*
* @package acp
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -27,6 +26,7 @@ class acp_reasons
{
global $db, $user, $auth, $template, $cache;
global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;
+ global $request;
$user->add_lang(array('mcp', 'acp/posting'));
@@ -114,7 +114,7 @@ class acp_reasons
$result = $db->sql_query($sql);
$max_order = (int) $db->sql_fetchfield('max_reason_order');
$db->sql_freeresult($result);
-
+
$sql_ary = array(
'reason_title' => (string) $reason_row['reason_title'],
'reason_description' => (string) $reason_row['reason_description'],
@@ -172,14 +172,14 @@ class acp_reasons
'U_ACTION' => $this->u_action . "&amp;id=$reason_id&amp;action=$action",
'U_BACK' => $this->u_action,
'ERROR_MSG' => (sizeof($error)) ? implode('<br />', $error) : '',
-
+
'REASON_TITLE' => $reason_row['reason_title'],
'REASON_DESCRIPTION' => $reason_row['reason_description'],
'TRANSLATED_TITLE' => ($translated) ? $user->lang['report_reasons']['TITLE'][strtoupper($reason_row['reason_title'])] : '',
'TRANSLATED_DESCRIPTION'=> ($translated) ? $user->lang['report_reasons']['DESCRIPTION'][strtoupper($reason_row['reason_title'])] : '',
- 'S_AVAILABLE_TITLES' => implode(', ', array_map('htmlspecialchars', array_keys($user->lang['report_reasons']['TITLE']))),
+ 'S_AVAILABLE_TITLES' => implode($user->lang['COMMA_SEPARATOR'], array_map('htmlspecialchars', array_keys($user->lang['report_reasons']['TITLE']))),
'S_EDIT_REASON' => true,
'S_TRANSLATED' => $translated,
'S_ERROR' => (sizeof($error)) ? true : false,
@@ -281,7 +281,18 @@ class acp_reasons
case 'move_up':
case 'move_down':
- $order = request_var('order', 0);
+ $sql = 'SELECT reason_order
+ FROM ' . REPORTS_REASONS_TABLE . "
+ WHERE reason_id = $reason_id";
+ $result = $db->sql_query($sql);
+ $order = $db->sql_fetchfield('reason_order');
+ $db->sql_freeresult($result);
+
+ if ($order === false || ($order == 0 && $action == 'move_up'))
+ {
+ break;
+ }
+ $order = (int) $order;
$order_total = $order * 2 + (($action == 'move_up') ? -1 : 1);
$sql = 'UPDATE ' . REPORTS_REASONS_TABLE . '
@@ -289,6 +300,13 @@ class acp_reasons
WHERE reason_order IN (' . $order . ', ' . (($action == 'move_up') ? $order - 1 : $order + 1) . ')';
$db->sql_query($sql);
+ if ($request->is_ajax())
+ {
+ $json_response = new \phpbb\json_response;
+ $json_response->send(array(
+ 'success' => (bool) $db->sql_affectedrows(),
+ ));
+ }
break;
}
@@ -304,7 +322,7 @@ class acp_reasons
do
{
++$order;
-
+
if ($row['reason_order'] != $order)
{
$sql = 'UPDATE ' . REPORTS_REASONS_TABLE . "
@@ -364,12 +382,10 @@ class acp_reasons
'U_EDIT' => $this->u_action . '&amp;action=edit&amp;id=' . $row['reason_id'],
'U_DELETE' => (!$other_reason) ? $this->u_action . '&amp;action=delete&amp;id=' . $row['reason_id'] : '',
- 'U_MOVE_UP' => $this->u_action . '&amp;action=move_up&amp;order=' . $row['reason_order'],
- 'U_MOVE_DOWN' => $this->u_action . '&amp;action=move_down&amp;order=' . $row['reason_order'])
+ 'U_MOVE_UP' => $this->u_action . '&amp;action=move_up&amp;id=' . $row['reason_id'],
+ 'U_MOVE_DOWN' => $this->u_action . '&amp;action=move_down&amp;id=' . $row['reason_id'])
);
}
$db->sql_freeresult($result);
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/acp/acp_search.php b/phpBB/includes/acp/acp_search.php
index 0cd67b1c34..11a2511aee 100644
--- a/phpBB/includes/acp/acp_search.php
+++ b/phpBB/includes/acp/acp_search.php
@@ -2,9 +2,8 @@
/**
*
* @package acp
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -77,7 +76,8 @@ class acp_search
continue;
}
- $name = ucfirst(strtolower(str_replace('_', ' ', $type)));
+ $name = $search->get_name();
+
$selected = ($config['search_type'] == $type) ? ' selected="selected"' : '';
$search_options .= '<option value="' . $type . '"' . $selected . '>' . $name . '</option>';
@@ -232,15 +232,7 @@ class acp_search
global $db, $user, $auth, $template, $cache;
global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;
- if (isset($_REQUEST['action']) && is_array($_REQUEST['action']))
- {
- $action = request_var('action', array('' => false));
- $action = key($action);
- }
- else
- {
- $action = request_var('action', '');
- }
+ $action = request_var('action', '');
$this->state = explode(',', $config['search_indexing_state']);
if (isset($_POST['cancel']))
@@ -283,7 +275,7 @@ class acp_search
{
trigger_error($error . adm_back_link($this->u_action), E_USER_WARNING);
}
- $name = ucfirst(strtolower(str_replace('_', ' ', $this->state[0])));
+ $name = $this->search->get_name();
$action = &$this->state[1];
@@ -345,7 +337,7 @@ class acp_search
$totaltime = $mtime[0] + $mtime[1] - $starttime;
$rows_per_second = $row_count / $totaltime;
meta_refresh(1, append_sid($this->u_action . '&amp;action=delete&amp;skip_rows=' . $post_counter));
- trigger_error(sprintf($user->lang['SEARCH_INDEX_DELETE_REDIRECT'], $post_counter, $row_count, $rows_per_second));
+ trigger_error($user->lang('SEARCH_INDEX_DELETE_REDIRECT', (int) $row_count, $post_counter, $rows_per_second));
}
}
@@ -405,9 +397,8 @@ class acp_search
$i = 0;
while ($row = ($buffer ? $rows[$i++] : $db->sql_fetchrow($result)))
{
- // Indexing enabled for this forum or global announcement?
- // Global announcements get indexed by default.
- if (!$row['forum_id'] || (isset($forums[$row['forum_id']]) && $forums[$row['forum_id']]))
+ // Indexing enabled for this forum
+ if (isset($forums[$row['forum_id']]) && $forums[$row['forum_id']])
{
$this->search->index('post', $row['post_id'], $row['post_text'], $row['post_subject'], $row['poster_id'], $row['forum_id']);
}
@@ -436,7 +427,7 @@ class acp_search
$totaltime = $mtime[0] + $mtime[1] - $starttime;
$rows_per_second = $row_count / $totaltime;
meta_refresh(1, append_sid($this->u_action . '&amp;action=create&amp;skip_rows=' . $post_counter));
- trigger_error(sprintf($user->lang['SEARCH_INDEX_CREATE_REDIRECT'], $post_counter, $row_count, $rows_per_second));
+ trigger_error($user->lang('SEARCH_INDEX_CREATE_REDIRECT', (int) $row_count, $post_counter) . $user->lang('SEARCH_INDEX_CREATE_REDIRECT_RATE', $rows_per_second));
}
}
@@ -463,7 +454,7 @@ class acp_search
continue;
}
- $name = ucfirst(strtolower(str_replace('_', ' ', $type)));
+ $name = $search->get_name();
$data = array();
if (method_exists($search, 'index_stats'))
@@ -562,27 +553,15 @@ class acp_search
function get_search_types()
{
- global $phpbb_root_path, $phpEx;
-
- $search_types = array();
+ global $phpbb_root_path, $phpEx, $phpbb_extension_manager;
- $dp = @opendir($phpbb_root_path . 'includes/search');
+ $finder = $phpbb_extension_manager->get_finder();
- if ($dp)
- {
- while (($file = readdir($dp)) !== false)
- {
- if ((preg_match('#\.' . $phpEx . '$#', $file)) && ($file != "search.$phpEx"))
- {
- $search_types[] = preg_replace('#^(.*?)\.' . $phpEx . '$#', '\1', $file);
- }
- }
- closedir($dp);
-
- sort($search_types);
- }
-
- return $search_types;
+ return $finder
+ ->extension_suffix('_backend')
+ ->extension_directory('/search')
+ ->core_path('phpbb/search/')
+ ->get_classes();
}
function get_max_post_id()
@@ -617,27 +596,17 @@ class acp_search
*/
function init_search($type, &$search, &$error)
{
- global $phpbb_root_path, $phpEx, $user;
-
- if (!preg_match('#^\w+$#', $type) || !file_exists("{$phpbb_root_path}includes/search/$type.$phpEx"))
- {
- $error = $user->lang['NO_SUCH_SEARCH_MODULE'];
- return $error;
- }
+ global $phpbb_root_path, $phpEx, $user, $auth, $config, $db;
- include_once("{$phpbb_root_path}includes/search/$type.$phpEx");
-
- if (!class_exists($type))
+ if (!class_exists($type) || !method_exists($type, 'keyword_search'))
{
$error = $user->lang['NO_SUCH_SEARCH_MODULE'];
return $error;
}
$error = false;
- $search = new $type($error);
+ $search = new $type($error, $phpbb_root_path, $phpEx, $auth, $config, $db, $user);
return $error;
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/acp/acp_send_statistics.php b/phpBB/includes/acp/acp_send_statistics.php
index b8fc2d2c45..39140b8da4 100644
--- a/phpBB/includes/acp/acp_send_statistics.php
+++ b/phpBB/includes/acp/acp_send_statistics.php
@@ -2,9 +2,8 @@
/**
*
* @package acp
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -16,8 +15,6 @@ if (!defined('IN_PHPBB'))
exit;
}
-include($phpbb_root_path . 'includes/questionnaire/questionnaire.' . $phpEx);
-
/**
* @package acp
*/
@@ -27,7 +24,9 @@ class acp_send_statistics
function main($id, $mode)
{
- global $config, $template, $phpbb_admin_path, $phpEx;
+ global $config, $template, $phpbb_admin_path, $phpbb_root_path, $phpEx;
+
+ include($phpbb_root_path . 'includes/questionnaire/questionnaire.' . $phpEx);
$collect_url = "https://www.phpbb.com/stats/receive_stats.php";
@@ -86,5 +85,3 @@ class acp_send_statistics
}
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/acp/acp_styles.php b/phpBB/includes/acp/acp_styles.php
index 47cd02bca7..3f9d21f56c 100644
--- a/phpBB/includes/acp/acp_styles.php
+++ b/phpBB/includes/acp/acp_styles.php
@@ -2,9 +2,8 @@
/**
*
* @package acp
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -21,3956 +20,1303 @@ if (!defined('IN_PHPBB'))
*/
class acp_styles
{
- var $u_action;
-
- var $style_cfg;
- var $template_cfg;
- var $theme_cfg;
- var $imageset_cfg;
- var $imageset_keys;
-
- function main($id, $mode)
+ public $u_action;
+
+ protected $u_base_action;
+ protected $s_hidden_fields;
+ protected $mode;
+ protected $styles_path;
+ protected $styles_path_absolute = 'styles';
+ protected $default_style = 0;
+
+ protected $db;
+ protected $user;
+ protected $template;
+ protected $request;
+ protected $cache;
+ protected $auth;
+ protected $phpbb_root_path;
+ protected $php_ext;
+
+ public function main($id, $mode)
{
- global $db, $user, $auth, $template, $cache;
- global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;
-
- // Hardcoded template bitfield to add for new templates
- $bitfield = new bitfield();
- $bitfield->set(0);
- $bitfield->set(1);
- $bitfield->set(2);
- $bitfield->set(3);
- $bitfield->set(4);
- $bitfield->set(8);
- $bitfield->set(9);
- $bitfield->set(11);
- $bitfield->set(12);
- define('TEMPLATE_BITFIELD', $bitfield->get_base64());
- unset($bitfield);
+ global $db, $user, $phpbb_admin_path, $phpbb_root_path, $phpEx, $template, $request, $cache, $auth, $config;
+
+ $this->db = $db;
+ $this->user = $user;
+ $this->template = $template;
+ $this->request = $request;
+ $this->cache = $cache;
+ $this->auth = $auth;
+ $this->config = $config;
+ $this->phpbb_root_path = $phpbb_root_path;
+ $this->php_ext = $phpEx;
+
+ $this->default_style = $config['default_style'];
+ $this->styles_path = $this->phpbb_root_path . $this->styles_path_absolute . '/';
+
+ $this->u_base_action = append_sid("{$phpbb_admin_path}index.{$this->php_ext}", "i={$id}");
+ $this->s_hidden_fields = array(
+ 'mode' => $mode,
+ );
- $user->add_lang('acp/styles');
+ $this->user->add_lang('acp/styles');
$this->tpl_name = 'acp_styles';
$this->page_title = 'ACP_CAT_STYLES';
+ $this->mode = $mode;
- $action = request_var('action', '');
- $action = (isset($_POST['add'])) ? 'add' : $action;
- $style_id = request_var('id', 0);
-
- // Fill the configuration variables
- $this->style_cfg = $this->template_cfg = $this->theme_cfg = $this->imageset_cfg = '
-#
-# phpBB {MODE} configuration file
-#
-# @package phpBB3
-# @copyright (c) 2005 phpBB Group
-# @license http://opensource.org/licenses/gpl-license.php GNU Public License
-#
-#
-# At the left is the name, please do not change this
-# At the right the value is entered
-# For on/off options the valid values are on, off, 1, 0, true and false
-#
-# Values get trimmed, if you want to add a space in front or at the end of
-# the value, then enclose the value with single or double quotes.
-# Single and double quotes do not need to be escaped.
-#
-#
-
-# General Information about this {MODE}
-name = {NAME}
-copyright = {COPYRIGHT}
-version = {VERSION}
-';
-
- $this->theme_cfg .= '
-# Some configuration options
-
-#
-# You have to turn this option on if you want to use the
-# path template variables ({T_IMAGESET_PATH} for example) within
-# your css file.
-# This is mostly the case if you want to use language specific
-# images within your css file.
-#
-parse_css_file = {PARSE_CSS_FILE}
-';
-
- $this->template_cfg .= '
-# Some configuration options
-
-# Template inheritance
-# See http://blog.phpbb.com/2008/07/31/templating-just-got-easier/
-# Set value to empty or this template name to ignore template inheritance.
-inherit_from = {INHERIT_FROM}
-';
-
- $this->imageset_keys = array(
- 'logos' => array(
- 'site_logo',
- ),
- 'buttons' => array(
- 'icon_back_top', 'icon_contact_aim', 'icon_contact_email', 'icon_contact_icq', 'icon_contact_jabber', 'icon_contact_msnm', 'icon_contact_pm', 'icon_contact_yahoo', 'icon_contact_www', 'icon_post_delete', 'icon_post_edit', 'icon_post_info', 'icon_post_quote', 'icon_post_report', 'icon_user_online', 'icon_user_offline', 'icon_user_profile', 'icon_user_search', 'icon_user_warn', 'button_pm_forward', 'button_pm_new', 'button_pm_reply', 'button_topic_locked', 'button_topic_new', 'button_topic_reply',
- ),
- 'icons' => array(
- 'icon_post_target', 'icon_post_target_unread', 'icon_topic_attach', 'icon_topic_latest', 'icon_topic_newest', 'icon_topic_reported', 'icon_topic_unapproved', 'icon_friend', 'icon_foe',
- ),
- 'forums' => array(
- 'forum_link', 'forum_read', 'forum_read_locked', 'forum_read_subforum', 'forum_unread', 'forum_unread_locked', 'forum_unread_subforum', 'subforum_read', 'subforum_unread'
- ),
- 'folders' => array(
- 'topic_moved', 'topic_read', 'topic_read_mine', 'topic_read_hot', 'topic_read_hot_mine', 'topic_read_locked', 'topic_read_locked_mine', 'topic_unread', 'topic_unread_mine', 'topic_unread_hot', 'topic_unread_hot_mine', 'topic_unread_locked', 'topic_unread_locked_mine', 'sticky_read', 'sticky_read_mine', 'sticky_read_locked', 'sticky_read_locked_mine', 'sticky_unread', 'sticky_unread_mine', 'sticky_unread_locked', 'sticky_unread_locked_mine', 'announce_read', 'announce_read_mine', 'announce_read_locked', 'announce_read_locked_mine', 'announce_unread', 'announce_unread_mine', 'announce_unread_locked', 'announce_unread_locked_mine', 'global_read', 'global_read_mine', 'global_read_locked', 'global_read_locked_mine', 'global_unread', 'global_unread_mine', 'global_unread_locked', 'global_unread_locked_mine', 'pm_read', 'pm_unread',
- ),
- 'polls' => array(
- 'poll_left', 'poll_center', 'poll_right',
- ),
- 'ui' => array(
- 'upload_bar',
- ),
- 'user' => array(
- 'user_icon1', 'user_icon2', 'user_icon3', 'user_icon4', 'user_icon5', 'user_icon6', 'user_icon7', 'user_icon8', 'user_icon9', 'user_icon10',
- ),
- );
-
- // Execute overall actions
- switch ($action)
- {
- case 'delete':
- if ($style_id)
- {
- $this->remove($mode, $style_id);
- return;
- }
- break;
-
- case 'export':
- if ($style_id)
- {
- $this->export($mode, $style_id);
- return;
- }
- break;
-
- case 'install':
- $this->install($mode);
- return;
- break;
-
- case 'add':
- $this->add($mode);
- return;
- break;
-
- case 'details':
- if ($style_id)
- {
- $this->details($mode, $style_id);
- return;
- }
- break;
-
- case 'edit':
- if ($style_id)
- {
- switch ($mode)
- {
- case 'imageset':
- return $this->edit_imageset($style_id);
- case 'template':
- return $this->edit_template($style_id);
- case 'theme':
- return $this->edit_theme($style_id);
- }
- }
- break;
-
- case 'cache':
- if ($style_id)
- {
- switch ($mode)
- {
- case 'template':
- return $this->template_cache($style_id);
- }
- }
- break;
- }
-
- switch ($mode)
- {
- case 'style':
-
- switch ($action)
- {
- case 'activate':
- case 'deactivate':
-
- if ($style_id == $config['default_style'])
- {
- trigger_error($user->lang['DEACTIVATE_DEFAULT'] . adm_back_link($this->u_action), E_USER_WARNING);
- }
-
- if (($action == 'deactivate' && confirm_box(true)) || $action == 'activate')
- {
- $sql = 'UPDATE ' . STYLES_TABLE . '
- SET style_active = ' . (($action == 'activate') ? 1 : 0) . '
- WHERE style_id = ' . $style_id;
- $db->sql_query($sql);
-
- // Set style to default for any member using deactivated style
- if ($action == 'deactivate')
- {
- $sql = 'UPDATE ' . USERS_TABLE . '
- SET user_style = ' . $config['default_style'] . "
- WHERE user_style = $style_id";
- $db->sql_query($sql);
-
- $sql = 'UPDATE ' . FORUMS_TABLE . '
- SET forum_style = 0
- WHERE forum_style = ' . $style_id;
- $db->sql_query($sql);
- }
- }
- else if ($action == 'deactivate')
- {
- $s_hidden_fields = array(
- 'i' => $id,
- 'mode' => $mode,
- 'action' => $action,
- 'style_id' => $style_id,
- );
- confirm_box(false, $user->lang['CONFIRM_OPERATION'], build_hidden_fields($s_hidden_fields));
- }
- break;
- }
-
- $this->frontend('style', array('details'), array('export', 'delete'));
- break;
-
- case 'template':
-
- switch ($action)
- {
- // Refresh template data stored in db and clear cache
- case 'refresh':
-
- $sql = 'SELECT *
- FROM ' . STYLES_TEMPLATE_TABLE . "
- WHERE template_id = $style_id";
- $result = $db->sql_query($sql);
- $template_row = $db->sql_fetchrow($result);
- $db->sql_freeresult($result);
-
- if (!$template_row)
- {
- trigger_error($user->lang['NO_TEMPLATE'] . adm_back_link($this->u_action), E_USER_WARNING);
- }
-
- if (confirm_box(true))
- {
- $template_refreshed = '';
-
- // Only refresh database if the template is stored in the database
- if ($template_row['template_storedb'] && file_exists("{$phpbb_root_path}styles/{$template_row['template_path']}/template/"))
- {
- $filelist = array('' => array());
-
- $sql = 'SELECT template_filename, template_mtime
- FROM ' . STYLES_TEMPLATE_DATA_TABLE . "
- WHERE template_id = $style_id";
- $result = $db->sql_query($sql);
-
- while ($row = $db->sql_fetchrow($result))
- {
-// if (@filemtime("{$phpbb_root_path}styles/{$template_row['template_path']}/template/" . $row['template_filename']) > $row['template_mtime'])
-// {
- // get folder info from the filename
- if (($slash_pos = strrpos($row['template_filename'], '/')) === false)
- {
- $filelist[''][] = $row['template_filename'];
- }
- else
- {
- $filelist[substr($row['template_filename'], 0, $slash_pos + 1)][] = substr($row['template_filename'], $slash_pos + 1, strlen($row['template_filename']) - $slash_pos - 1);
- }
-// }
- }
- $db->sql_freeresult($result);
-
- $this->store_templates('update', $style_id, $template_row['template_path'], $filelist);
- unset($filelist);
-
- $template_refreshed = $user->lang['TEMPLATE_REFRESHED'] . '<br />';
- add_log('admin', 'LOG_TEMPLATE_REFRESHED', $template_row['template_name']);
- }
-
- $this->clear_template_cache($template_row);
-
- trigger_error($template_refreshed . $user->lang['TEMPLATE_CACHE_CLEARED'] . adm_back_link($this->u_action));
- }
- else
- {
- confirm_box(false, ($template_row['template_storedb']) ? $user->lang['CONFIRM_TEMPLATE_REFRESH'] : $user->lang['CONFIRM_TEMPLATE_CLEAR_CACHE'], build_hidden_fields(array(
- 'i' => $id,
- 'mode' => $mode,
- 'action' => $action,
- 'id' => $style_id
- )));
- }
-
- break;
- }
-
- $this->frontend('template', array('edit', 'cache', 'details'), array('refresh', 'export', 'delete'));
- break;
-
- case 'theme':
-
- switch ($action)
- {
- // Refresh theme data stored in the database
- case 'refresh':
-
- $sql = 'SELECT *
- FROM ' . STYLES_THEME_TABLE . "
- WHERE theme_id = $style_id";
- $result = $db->sql_query($sql);
- $theme_row = $db->sql_fetchrow($result);
- $db->sql_freeresult($result);
+ $action = $this->request->variable('action', '');
+ $post_actions = array('install', 'activate', 'deactivate', 'uninstall');
- if (!$theme_row)
- {
- trigger_error($user->lang['NO_THEME'] . adm_back_link($this->u_action), E_USER_WARNING);
- }
-
- if (!$theme_row['theme_storedb'])
- {
- trigger_error($user->lang['THEME_ERR_REFRESH_FS'] . adm_back_link($this->u_action), E_USER_WARNING);
- }
-
- if (confirm_box(true))
- {
- if ($theme_row['theme_storedb'] && file_exists("{$phpbb_root_path}styles/{$theme_row['theme_path']}/theme/stylesheet.css"))
- {
- // Save CSS contents
- $sql_ary = array(
- 'theme_mtime' => (int) filemtime("{$phpbb_root_path}styles/{$theme_row['theme_path']}/theme/stylesheet.css"),
- 'theme_data' => $this->db_theme_data($theme_row)
- );
-
- $sql = 'UPDATE ' . STYLES_THEME_TABLE . ' SET ' . $db->sql_build_array('UPDATE', $sql_ary) . "
- WHERE theme_id = $style_id";
- $db->sql_query($sql);
-
- $cache->destroy('sql', STYLES_THEME_TABLE);
-
- add_log('admin', 'LOG_THEME_REFRESHED', $theme_row['theme_name']);
- trigger_error($user->lang['THEME_REFRESHED'] . adm_back_link($this->u_action));
- }
- }
- else
- {
- confirm_box(false, $user->lang['CONFIRM_THEME_REFRESH'], build_hidden_fields(array(
- 'i' => $id,
- 'mode' => $mode,
- 'action' => $action,
- 'id' => $style_id
- )));
- }
- break;
- }
-
- $this->frontend('theme', array('edit', 'details'), array('refresh', 'export', 'delete'));
- break;
-
- case 'imageset':
-
- switch ($action)
- {
- case 'refresh':
-
- $sql = 'SELECT *
- FROM ' . STYLES_IMAGESET_TABLE . "
- WHERE imageset_id = $style_id";
- $result = $db->sql_query($sql);
- $imageset_row = $db->sql_fetchrow($result);
- $db->sql_freeresult($result);
-
- if (!$imageset_row)
- {
- trigger_error($user->lang['NO_IMAGESET'] . adm_back_link($this->u_action), E_USER_WARNING);
- }
-
- if (confirm_box(true))
- {
- $sql_ary = array();
-
- $imageset_definitions = array();
- foreach ($this->imageset_keys as $topic => $key_array)
- {
- $imageset_definitions = array_merge($imageset_definitions, $key_array);
- }
-
- $cfg_data_imageset = parse_cfg_file("{$phpbb_root_path}styles/{$imageset_row['imageset_path']}/imageset/imageset.cfg");
-
- $db->sql_transaction('begin');
-
- $sql = 'DELETE FROM ' . STYLES_IMAGESET_DATA_TABLE . '
- WHERE imageset_id = ' . $style_id;
- $result = $db->sql_query($sql);
-
- foreach ($cfg_data_imageset as $image_name => $value)
- {
- if (strpos($value, '*') !== false)
- {
- if (substr($value, -1, 1) === '*')
- {
- list($image_filename, $image_height) = explode('*', $value);
- $image_width = 0;
- }
- else
- {
- list($image_filename, $image_height, $image_width) = explode('*', $value);
- }
- }
- else
- {
- $image_filename = $value;
- $image_height = $image_width = 0;
- }
-
- if (strpos($image_name, 'img_') === 0 && $image_filename)
- {
- $image_name = substr($image_name, 4);
- if (in_array($image_name, $imageset_definitions))
- {
- $sql_ary[] = array(
- 'image_name' => (string) $image_name,
- 'image_filename' => (string) $image_filename,
- 'image_height' => (int) $image_height,
- 'image_width' => (int) $image_width,
- 'imageset_id' => (int) $style_id,
- 'image_lang' => '',
- );
- }
- }
- }
-
- $sql = 'SELECT lang_dir
- FROM ' . LANG_TABLE;
- $result = $db->sql_query($sql);
-
- while ($row = $db->sql_fetchrow($result))
- {
- if (@file_exists("{$phpbb_root_path}styles/{$imageset_row['imageset_path']}/imageset/{$row['lang_dir']}/imageset.cfg"))
- {
- $cfg_data_imageset_data = parse_cfg_file("{$phpbb_root_path}styles/{$imageset_row['imageset_path']}/imageset/{$row['lang_dir']}/imageset.cfg");
- foreach ($cfg_data_imageset_data as $image_name => $value)
- {
- if (strpos($value, '*') !== false)
- {
- if (substr($value, -1, 1) === '*')
- {
- list($image_filename, $image_height) = explode('*', $value);
- $image_width = 0;
- }
- else
- {
- list($image_filename, $image_height, $image_width) = explode('*', $value);
- }
- }
- else
- {
- $image_filename = $value;
- $image_height = $image_width = 0;
- }
-
- if (strpos($image_name, 'img_') === 0 && $image_filename)
- {
- $image_name = substr($image_name, 4);
- if (in_array($image_name, $imageset_definitions))
- {
- $sql_ary[] = array(
- 'image_name' => (string) $image_name,
- 'image_filename' => (string) $image_filename,
- 'image_height' => (int) $image_height,
- 'image_width' => (int) $image_width,
- 'imageset_id' => (int) $style_id,
- 'image_lang' => (string) $row['lang_dir'],
- );
- }
- }
- }
- }
- }
- $db->sql_freeresult($result);
-
- $db->sql_multi_insert(STYLES_IMAGESET_DATA_TABLE, $sql_ary);
-
- $db->sql_transaction('commit');
-
- $cache->destroy('sql', STYLES_IMAGESET_DATA_TABLE);
- $cache->destroy('imageset_site_logo_md5');
-
- add_log('admin', 'LOG_IMAGESET_REFRESHED', $imageset_row['imageset_name']);
- trigger_error($user->lang['IMAGESET_REFRESHED'] . adm_back_link($this->u_action));
- }
- else
- {
- confirm_box(false, $user->lang['CONFIRM_IMAGESET_REFRESH'], build_hidden_fields(array(
- 'i' => $id,
- 'mode' => $mode,
- 'action' => $action,
- 'id' => $style_id
- )));
- }
- break;
- }
-
- $this->frontend('imageset', array('edit', 'details'), array('refresh', 'export', 'delete'));
- break;
- }
- }
-
- /**
- * Build Frontend with supplied options
- */
- function frontend($mode, $options, $actions)
- {
- global $user, $template, $db, $config, $phpbb_root_path, $phpEx;
-
- $sql_from = '';
- $sql_sort = 'LOWER(' . $mode . '_name)';
- $style_count = array();
-
- switch ($mode)
+ if ($action && in_array($action, $post_actions) && !check_link_hash($request->variable('hash', ''), $action))
{
- case 'style':
- $sql_from = STYLES_TABLE;
- $sql_sort = 'style_active DESC, ' . $sql_sort;
-
- $sql = 'SELECT user_style, COUNT(user_style) AS style_count
- FROM ' . USERS_TABLE . '
- GROUP BY user_style';
- $result = $db->sql_query($sql);
-
- while ($row = $db->sql_fetchrow($result))
- {
- $style_count[$row['user_style']] = $row['style_count'];
- }
- $db->sql_freeresult($result);
-
- break;
-
- case 'template':
- $sql_from = STYLES_TEMPLATE_TABLE;
- break;
-
- case 'theme':
- $sql_from = STYLES_THEME_TABLE;
- break;
-
- case 'imageset':
- $sql_from = STYLES_IMAGESET_TABLE;
- break;
-
- default:
- trigger_error($user->lang['NO_MODE'] . adm_back_link($this->u_action), E_USER_WARNING);
+ trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING);
}
- $l_prefix = strtoupper($mode);
-
- $this->page_title = 'ACP_' . $l_prefix . 'S';
-
- $template->assign_vars(array(
- 'S_FRONTEND' => true,
- 'S_STYLE' => ($mode == 'style') ? true : false,
-
- 'L_TITLE' => $user->lang[$this->page_title],
- 'L_EXPLAIN' => $user->lang[$this->page_title . '_EXPLAIN'],
- 'L_NAME' => $user->lang[$l_prefix . '_NAME'],
- 'L_INSTALLED' => $user->lang['INSTALLED_' . $l_prefix],
- 'L_UNINSTALLED' => $user->lang['UNINSTALLED_' . $l_prefix],
- 'L_NO_UNINSTALLED' => $user->lang['NO_UNINSTALLED_' . $l_prefix],
- 'L_CREATE' => $user->lang['CREATE_' . $l_prefix],
-
- 'U_ACTION' => $this->u_action,
- )
- );
-
- $sql = "SELECT *
- FROM $sql_from
- ORDER BY $sql_sort ASC";
- $result = $db->sql_query($sql);
-
- $installed = array();
-
- $basis_options = '<option class="sep" value="">' . $user->lang['OPTIONAL_BASIS'] . '</option>';
- while ($row = $db->sql_fetchrow($result))
+ foreach ($post_actions as $key)
{
- $installed[] = $row[$mode . '_name'];
- $basis_options .= '<option value="' . $row[$mode . '_id'] . '">' . $row[$mode . '_name'] . '</option>';
-
- $stylevis = ($mode == 'style' && !$row['style_active']) ? 'activate' : 'deactivate';
-
- $s_options = array();
- foreach ($options as $option)
- {
- $s_options[] = '<a href="' . $this->u_action . "&amp;action=$option&amp;id=" . $row[$mode . '_id'] . '">' . $user->lang[strtoupper($option)] . '</a>';
- }
-
- $s_actions = array();
- foreach ($actions as $option)
+ if ($this->request->is_set_post($key))
{
- $s_actions[] = '<a href="' . $this->u_action . "&amp;action=$option&amp;id=" . $row[$mode . '_id'] . '">' . $user->lang[strtoupper($option)] . '</a>';
+ $action = $key;
}
-
- $template->assign_block_vars('installed', array(
- 'S_DEFAULT_STYLE' => ($mode == 'style' && $row['style_id'] == $config['default_style']) ? true : false,
- 'U_EDIT' => $this->u_action . '&amp;action=' . (($mode == 'style') ? 'details' : 'edit') . '&amp;id=' . $row[$mode . '_id'],
- 'U_STYLE_ACT_DEACT' => $this->u_action . '&amp;action=' . $stylevis . '&amp;id=' . $row[$mode . '_id'],
- 'L_STYLE_ACT_DEACT' => $user->lang['STYLE_' . strtoupper($stylevis)],
- 'S_OPTIONS' => implode(' | ', $s_options),
- 'S_ACTIONS' => implode(' | ', $s_actions),
- 'U_PREVIEW' => ($mode == 'style') ? append_sid("{$phpbb_root_path}index.$phpEx", "$mode=" . $row[$mode . '_id']) : '',
-
- 'NAME' => $row[$mode . '_name'],
- 'STYLE_COUNT' => ($mode == 'style' && isset($style_count[$row['style_id']])) ? $style_count[$row['style_id']] : 0,
-
- 'S_INACTIVE' => ($mode == 'style' && !$row['style_active']) ? true : false,
- )
- );
}
- $db->sql_freeresult($result);
- // Grab uninstalled items
- $new_ary = $cfg = array();
-
- $dp = @opendir("{$phpbb_root_path}styles");
-
- if ($dp)
+ if ($action != '')
{
- while (($file = readdir($dp)) !== false)
- {
- if ($file[0] == '.' || !is_dir($phpbb_root_path . 'styles/' . $file))
- {
- continue;
- }
-
- $subpath = ($mode != 'style') ? "$mode/" : '';
- if (file_exists("{$phpbb_root_path}styles/$file/$subpath$mode.cfg"))
- {
- if ($cfg = file("{$phpbb_root_path}styles/$file/$subpath$mode.cfg"))
- {
- $items = parse_cfg_file('', $cfg);
- $name = (isset($items['name'])) ? trim($items['name']) : false;
-
- if ($name && !in_array($name, $installed))
- {
- // The array key is used for sorting later on.
- // $file is appended because $name doesn't have to be unique.
- $new_ary[$name . $file] = array(
- 'path' => $file,
- 'name' => $name,
- 'copyright' => $items['copyright'],
- );
- }
- }
- }
- }
- closedir($dp);
+ $this->s_hidden_fields['action'] = $action;
}
- unset($installed);
+ $this->template->assign_vars(array(
+ 'U_ACTION' => $this->u_base_action,
+ 'S_HIDDEN_FIELDS' => build_hidden_fields($this->s_hidden_fields)
+ )
+ );
- if (sizeof($new_ary))
+ // Execute actions
+ switch ($action)
{
- ksort($new_ary);
-
- foreach ($new_ary as $cfg)
- {
- $template->assign_block_vars('uninstalled', array(
- 'NAME' => $cfg['name'],
- 'COPYRIGHT' => $cfg['copyright'],
- 'U_INSTALL' => $this->u_action . '&amp;action=install&amp;path=' . urlencode($cfg['path']))
- );
- }
+ case 'install':
+ $this->action_install();
+ return;
+ case 'uninstall':
+ $this->action_uninstall();
+ return;
+ case 'activate':
+ $this->action_activate();
+ return;
+ case 'deactivate':
+ $this->action_deactivate();
+ return;
+ case 'details':
+ $this->action_details();
+ return;
+ default:
+ $this->frontend();
}
- unset($new_ary);
-
- $template->assign_vars(array(
- 'S_BASIS_OPTIONS' => $basis_options)
- );
-
}
/**
- * Provides a template editor which allows saving changes to template files on the filesystem or in the database.
- *
- * @param int $template_id specifies which template set is being edited
+ * Main page
*/
- function edit_template($template_id)
+ protected function frontend()
{
- global $phpbb_root_path, $phpEx, $config, $db, $cache, $user, $template, $safe_mode;
-
- if (defined('PHPBB_DISABLE_ACP_EDITOR'))
+ // Check mode
+ switch ($this->mode)
{
- trigger_error($user->lang['EDITOR_DISABLED'] . adm_back_link($this->u_action));
+ case 'style':
+ $this->welcome_message('ACP_STYLES', 'ACP_STYLES_EXPLAIN');
+ $this->show_installed();
+ return;
+ case 'install':
+ $this->welcome_message('INSTALL_STYLES', 'INSTALL_STYLES_EXPLAIN');
+ $this->show_available();
+ return;
+ case 'cache':
+ $this->action_cache();
+ return;
}
+ trigger_error($this->user->lang['NO_MODE'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
- $this->page_title = 'EDIT_TEMPLATE';
+ /**
+ * Purge cache
+ */
+ protected function action_cache()
+ {
+ global $db, $cache, $auth;
- $filelist = $filelist_cats = array();
+ $this->cache->purge();
- $template_data = utf8_normalize_nfc(request_var('template_data', '', true));
- $template_data = htmlspecialchars_decode($template_data);
- $template_file = utf8_normalize_nfc(request_var('template_file', '', true));
- $text_rows = max(5, min(999, request_var('text_rows', 20)));
- $save_changes = (isset($_POST['save'])) ? true : false;
+ // Clear permissions
+ $this->auth->acl_clear_prefetch();
+ phpbb_cache_moderators($db, $cache, $auth);
- // make sure template_file path doesn't go upwards
- $template_file = preg_replace('#\.{2,}#', '.', $template_file);
+ add_log('admin', 'LOG_PURGE_CACHE');
- // Retrieve some information about the template
- $sql = 'SELECT template_storedb, template_path, template_name
- FROM ' . STYLES_TEMPLATE_TABLE . "
- WHERE template_id = $template_id";
- $result = $db->sql_query($sql);
- $template_info = $db->sql_fetchrow($result);
- $db->sql_freeresult($result);
+ trigger_error($this->user->lang['PURGED_CACHE'] . adm_back_link($this->u_base_action), E_USER_NOTICE);
+ }
- if (!$template_info)
- {
- trigger_error($user->lang['NO_TEMPLATE'] . adm_back_link($this->u_action), E_USER_WARNING);
- }
+ /**
+ * Install style(s)
+ */
+ protected function action_install()
+ {
+ // Get list of styles to install
+ $dirs = $this->request_vars('dir', '', true);
- if ($save_changes && !check_form_key('acp_styles'))
- {
- trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING);
- }
- else if (!$save_changes)
- {
- add_form_key('acp_styles');
- }
+ // Get list of styles that can be installed
+ $styles = $this->find_available(false);
- // save changes to the template if the user submitted any
- if ($save_changes && $template_file)
+ // Install each style
+ $messages = array();
+ $installed_names = array();
+ $installed_dirs = array();
+ $last_installed = false;
+ foreach ($dirs as $dir)
{
- // Get the filesystem location of the current file
- $file = "{$phpbb_root_path}styles/{$template_info['template_path']}/template/$template_file";
- $additional = '';
-
- // If the template is stored on the filesystem try to write the file else store it in the database
- if (!$safe_mode && !$template_info['template_storedb'] && file_exists($file) && phpbb_is_writable($file))
+ $found = false;
+ foreach ($styles as &$style)
{
- if (!($fp = @fopen($file, 'wb')))
+ // Check if:
+ // 1. Directory matches directory we are looking for
+ // 2. Style is not installed yet
+ // 3. Style with same name or directory hasn't been installed already within this function
+ if ($style['style_path'] == $dir && empty($style['_installed']) && !in_array($style['style_path'], $installed_dirs) && !in_array($style['style_name'], $installed_names))
{
- // File exists and is writeable, but still not able to be written to
- trigger_error(sprintf($user->lang['TEMPLATE_FILE_NOT_WRITABLE'], htmlspecialchars($template_file)) . adm_back_link($this->u_action), E_USER_WARNING);
+ // Install style
+ $style['style_active'] = 1;
+ $style['style_id'] = $this->install_style($style);
+ $style['_installed'] = true;
+ $found = true;
+ $last_installed = $style['style_id'];
+ $installed_names[] = $style['style_name'];
+ $installed_dirs[] = $style['style_path'];
+ $messages[] = sprintf($this->user->lang['STYLE_INSTALLED'], htmlspecialchars($style['style_name']));
}
- fwrite($fp, $template_data);
- fclose($fp);
}
- else
+ if (!$found)
{
- $db->sql_transaction('begin');
-
- // If it's not stored in the db yet, then update the template setting and store all template files in the db
- if (!$template_info['template_storedb'])
- {
- if ($super = $this->get_super('template', $template_id))
- {
- $this->store_in_db('template', $super['template_id']);
- }
- else
- {
- $this->store_in_db('template', $template_id);
- }
-
- add_log('admin', 'LOG_TEMPLATE_EDIT_DETAILS', $template_info['template_name']);
- $additional .= '<br />' . $user->lang['EDIT_TEMPLATE_STORED_DB'];
- }
-
- // Update the template_data table entry for this template file
- $sql = 'UPDATE ' . STYLES_TEMPLATE_DATA_TABLE . "
- SET template_data = '" . $db->sql_escape($template_data) . "', template_mtime = " . time() . "
- WHERE template_id = $template_id
- AND template_filename = '" . $db->sql_escape($template_file) . "'";
- $db->sql_query($sql);
-
- $db->sql_transaction('commit');
+ $messages[] = sprintf($this->user->lang['STYLE_NOT_INSTALLED'], htmlspecialchars($dir));
}
-
- // destroy the cached version of the template (filename without extension)
- $this->clear_template_cache($template_info, array(substr($template_file, 0, -5)));
-
- $cache->destroy('sql', STYLES_TABLE);
-
- add_log('admin', 'LOG_TEMPLATE_EDIT', $template_info['template_name'], $template_file);
- trigger_error($user->lang['TEMPLATE_FILE_UPDATED'] . $additional . adm_back_link($this->u_action . "&amp;action=edit&amp;id=$template_id&amp;text_rows=$text_rows&amp;template_file=$template_file"));
}
- // Generate a category array containing template filenames
- if (!$template_info['template_storedb'])
+ // Show message
+ if (!count($messages))
{
- $template_path = "{$phpbb_root_path}styles/{$template_info['template_path']}/template";
-
- $filelist = filelist($template_path, '', 'html');
- $filelist[''] = array_diff($filelist[''], array('bbcode.html'));
-
- if ($template_file)
- {
- if (!file_exists($template_path . "/$template_file") || !($template_data = file_get_contents($template_path . "/$template_file")))
- {
- trigger_error($user->lang['NO_TEMPLATE'] . adm_back_link($this->u_action), E_USER_WARNING);
- }
- }
- }
- else
- {
- $sql = 'SELECT *
- FROM ' . STYLES_TEMPLATE_DATA_TABLE . "
- WHERE template_id = $template_id";
- $result = $db->sql_query($sql);
-
- $filelist = array('' => array());
- while ($row = $db->sql_fetchrow($result))
- {
- $file_info = pathinfo($row['template_filename']);
-
- if (($file_info['basename'] != 'bbcode') && ($file_info['extension'] == 'html'))
- {
- if (($file_info['dirname'] == '.') || empty($file_info['dirname']))
- {
- $filelist[''][] = $row['template_filename'];
- }
- else
- {
- $filelist[$file_info['dirname'] . '/'][] = $file_info['basename'];
- }
- }
-
- if ($row['template_filename'] == $template_file)
- {
- $template_data = $row['template_data'];
- }
- }
- $db->sql_freeresult($result);
- unset($file_info);
+ trigger_error($this->user->lang['NO_MATCHING_STYLES_FOUND'] . adm_back_link($this->u_action), E_USER_WARNING);
}
+ $message = implode('<br />', $messages);
+ $message .= '<br /><br />' . sprintf($this->user->lang['STYLE_INSTALLED_RETURN_STYLES'], $this->u_base_action . '&amp;mode=style');
+ $message .= '<br /><br />' . sprintf($this->user->lang['STYLE_INSTALLED_RETURN_UNINSTALLED'], $this->u_base_action . '&amp;mode=install');
+ trigger_error($message, E_USER_NOTICE);
+ }
- if (empty($filelist['']))
- {
- trigger_error($user->lang['NO_TEMPLATE'] . adm_back_link($this->u_action), E_USER_WARNING);
- }
+ /**
+ * Confirm styles removal
+ */
+ protected function action_uninstall()
+ {
+ // Get list of styles to uninstall
+ $ids = $this->request_vars('id', 0, true);
- // Now create the categories
- $filelist_cats[''] = array();
- foreach ($filelist as $pathfile => $file_ary)
+ // Check if confirmation box was submitted
+ if (confirm_box(true))
{
- // Use the directory name as category name
- if (!empty($pathfile))
- {
- $filelist_cats[$pathfile] = array();
- foreach ($file_ary as $file)
- {
- $filelist_cats[$pathfile][$pathfile . $file] = $file;
- }
- }
- // or if it's in the main category use the word before the first underscore to group files
- else
- {
- $cats = array();
- foreach ($file_ary as $file)
- {
- $cats[] = substr($file, 0, strpos($file, '_'));
- $filelist_cats[substr($file, 0, strpos($file, '_'))][$file] = $file;
- }
-
- $cats = array_values(array_unique($cats));
-
- // we don't need any single element categories so put them into the misc '' category
- for ($i = 0, $n = sizeof($cats); $i < $n; $i++)
- {
- if (sizeof($filelist_cats[$cats[$i]]) == 1 && $cats[$i] !== '')
- {
- $filelist_cats[''][key($filelist_cats[$cats[$i]])] = current($filelist_cats[$cats[$i]]);
- unset($filelist_cats[$cats[$i]]);
- }
- }
- unset($cats);
- }
+ // Uninstall
+ $this->action_uninstall_confirmed($ids, $this->request->variable('confirm_delete_files', false));
+ return;
}
- unset($filelist);
-
- // Generate list of categorised template files
- $tpl_options = '';
- ksort($filelist_cats);
- foreach ($filelist_cats as $category => $tpl_ary)
- {
- ksort($tpl_ary);
-
- if (!empty($category))
- {
- $tpl_options .= '<option class="sep" value="">' . $category . '</option>';
- }
- foreach ($tpl_ary as $filename => $file)
- {
- $selected = ($template_file == $filename) ? ' selected="selected"' : '';
- $tpl_options .= '<option value="' . $filename . '"' . $selected . '>' . $file . '</option>';
- }
- }
+ // Confirm box
+ $s_hidden = build_hidden_fields(array(
+ 'action' => 'uninstall',
+ 'ids' => $ids
+ ));
+ $this->template->assign_var('S_CONFIRM_DELETE', true);
+ confirm_box(false, $this->user->lang['CONFIRM_UNINSTALL_STYLES'], $s_hidden, 'acp_styles.html');
- $template->assign_vars(array(
- 'S_EDIT_TEMPLATE' => true,
- 'S_HIDDEN_FIELDS' => build_hidden_fields(array('template_file' => $template_file)),
- 'S_TEMPLATES' => $tpl_options,
-
- 'U_ACTION' => $this->u_action . "&amp;action=edit&amp;id=$template_id&amp;text_rows=$text_rows",
- 'U_BACK' => $this->u_action,
-
- 'L_EDIT' => $user->lang['EDIT_TEMPLATE'],
- 'L_EDIT_EXPLAIN' => $user->lang['EDIT_TEMPLATE_EXPLAIN'],
- 'L_EDITOR' => $user->lang['TEMPLATE_EDITOR'],
- 'L_EDITOR_HEIGHT' => $user->lang['TEMPLATE_EDITOR_HEIGHT'],
- 'L_FILE' => $user->lang['TEMPLATE_FILE'],
- 'L_SELECT' => $user->lang['SELECT_TEMPLATE'],
- 'L_SELECTED' => $user->lang['SELECTED_TEMPLATE'],
- 'L_SELECTED_FILE' => $user->lang['SELECTED_TEMPLATE_FILE'],
-
- 'SELECTED_TEMPLATE' => $template_info['template_name'],
- 'TEMPLATE_FILE' => $template_file,
- 'TEMPLATE_DATA' => utf8_htmlspecialchars($template_data),
- 'TEXT_ROWS' => $text_rows)
- );
+ // Canceled - show styles list
+ $this->frontend();
}
/**
- * Allows the admin to view cached versions of template files and clear single template cache files
+ * Uninstall styles(s)
*
- * @param int $template_id specifies which template's cache is shown
+ * @param array $ids List of style IDs
+ * @param bool $delete_files If true, script will attempt to remove files for selected styles
*/
- function template_cache($template_id)
+ protected function action_uninstall_confirmed($ids, $delete_files)
{
- global $phpbb_root_path, $phpEx, $config, $db, $cache, $user, $template;
+ $default = $this->default_style;
+ $uninstalled = array();
+ $messages = array();
- $source = str_replace('/', '.', request_var('source', ''));
- $file_ary = array_diff(request_var('delete', array('')), array(''));
- $submit = isset($_POST['submit']) ? true : false;
-
- $sql = 'SELECT *
- FROM ' . STYLES_TEMPLATE_TABLE . "
- WHERE template_id = $template_id";
- $result = $db->sql_query($sql);
- $template_row = $db->sql_fetchrow($result);
- $db->sql_freeresult($result);
-
- if (!$template_row)
+ // Check styles list
+ foreach ($ids as $id)
{
- trigger_error($user->lang['NO_TEMPLATE'] . adm_back_link($this->u_action), E_USER_WARNING);
- }
-
- // User wants to delete one or more files ...
- if ($submit && $file_ary)
- {
- $this->clear_template_cache($template_row, $file_ary);
- trigger_error($user->lang['TEMPLATE_CACHE_CLEARED'] . adm_back_link($this->u_action . "&amp;action=cache&amp;id=$template_id"));
- }
-
- $cache_prefix = 'tpl_' . str_replace('_', '-', $template_row['template_path']);
-
- // Someone wants to see the cached source ... so we'll highlight it,
- // add line numbers and indent it appropriately. This could be nasty
- // on larger source files ...
- if ($source && file_exists("{$phpbb_root_path}cache/{$cache_prefix}_$source.html.$phpEx"))
- {
- adm_page_header($user->lang['TEMPLATE_CACHE']);
-
- $template->set_filenames(array(
- 'body' => 'viewsource.html')
- );
-
- $template->assign_vars(array(
- 'FILENAME' => str_replace('.', '/', $source) . '.html')
- );
-
- $code = str_replace(array("\r\n", "\r"), array("\n", "\n"), file_get_contents("{$phpbb_root_path}cache/{$cache_prefix}_$source.html.$phpEx"));
-
- $conf = array('highlight.bg', 'highlight.comment', 'highlight.default', 'highlight.html', 'highlight.keyword', 'highlight.string');
- foreach ($conf as $ini_var)
+ if (!$id)
{
- @ini_set($ini_var, str_replace('highlight.', 'syntax', $ini_var));
+ trigger_error($this->user->lang['INVALID_STYLE_ID'] . adm_back_link($this->u_action), E_USER_WARNING);
}
-
- $marker = 'MARKER' . time();
- $code = highlight_string(str_replace("\n", $marker, $code), true);
- $code = str_replace($marker, "\n", $code);
- $str_from = array('<span style="color: ', '<font color="syntax', '</font>', '<code>', '</code>','[', ']', '.', ':');
- $str_to = array('<span class="', '<span class="syntax', '</span>', '', '', '&#91;', '&#93;', '&#46;', '&#58;');
-
- $code = str_replace($str_from, $str_to, $code);
- $code = preg_replace('#^(<span class="[a-z_]+">)\n?(.*?)\n?(</span>)$#ism', '$1$2$3', $code);
- $code = substr($code, strlen('<span class="syntaxhtml">'));
- $code = substr($code, 0, -1 * strlen('</ span>'));
- $code = explode("\n", $code);
-
- foreach ($code as $key => $line)
+ if ($id == $default)
{
- $template->assign_block_vars('source', array(
- 'LINENUM' => $key + 1,
- 'LINE' => preg_replace('#([^ ;])&nbsp;([^ &])#', '$1 $2', $line))
- );
- unset($code[$key]);
+ trigger_error($this->user->lang['UNINSTALL_DEFAULT'] . adm_back_link($this->u_action), E_USER_WARNING);
}
-
- adm_page_footer();
+ $uninstalled[$id] = false;
}
- $filemtime = array();
- if ($template_row['template_storedb'])
- {
- $ids = array();
- if (isset($template_row['template_inherits_id']) && $template_row['template_inherits_id'])
- {
- $ids[] = $template_row['template_inherits_id'];
- }
- $ids[] = $template_row['template_id'];
-
- $filemtime = array();
- $file_template_db = array();
-
- foreach ($ids as $id)
- {
- $sql = 'SELECT template_filename, template_mtime
- FROM ' . STYLES_TEMPLATE_DATA_TABLE . "
- WHERE template_id = $id";
- $result = $db->sql_query($sql);
-
- while ($row = $db->sql_fetchrow($result))
- {
- $filemtime[$row['template_filename']] = $row['template_mtime'];
- $file_template_db[$row['template_filename']] = $id;
- }
- $db->sql_freeresult($result);
- }
- }
+ // Order by reversed style_id, so parent styles would be removed after child styles
+ // This way parent and child styles can be removed in same function call
+ $sql = 'SELECT *
+ FROM ' . STYLES_TABLE . '
+ WHERE style_id IN (' . implode(', ', $ids) . ')
+ ORDER BY style_id DESC';
+ $result = $this->db->sql_query($sql);
- // Get a list of cached template files and then retrieve additional information about them
- $file_ary = $this->template_cache_filelist($template_row['template_path']);
+ $rows = $this->db->sql_fetchrowset($result);
+ $this->db->sql_freeresult($result);
- foreach ($file_ary as $file)
+ // Uinstall each style
+ $uninstalled = array();
+ foreach ($rows as $style)
{
- $file = str_replace('/', '.', $file);
-
- // perform some dirty guessing to get the path right.
- // We assume that three dots in a row were '../'
- $tpl_file = str_replace('.', '/', $file);
- $tpl_file = str_replace('///', '../', $tpl_file);
-
- $filename = "{$cache_prefix}_$file.html.$phpEx";
+ $result = $this->uninstall_style($style, $delete_files);
- if (!file_exists("{$phpbb_root_path}cache/$filename"))
+ if (is_string($result))
{
+ $messages[] = $result;
continue;
}
+ $messages[] = sprintf($this->user->lang['STYLE_UNINSTALLED'], $style['style_name']);
+ $uninstalled[] = $style['style_name'];
- $file_tpl = "{$phpbb_root_path}styles/{$template_row['template_path']}/template/$tpl_file.html";
- $inherited = false;
-
- if (isset($template_row['template_inherits_id']) && $template_row['template_inherits_id'])
+ // Attempt to delete files
+ if ($delete_files)
{
- if (!$template_row['template_storedb'])
- {
- if (!file_exists($file_tpl))
- {
- $file_tpl = "{$phpbb_root_path}styles/{$template_row['template_inherit_path']}/template/$tpl_file.html";
- $inherited = true;
- }
- }
- else
- {
- if ($file_template_db[$file . '.html'] == $template_row['template_inherits_id'])
- {
- $file_tpl = "{$phpbb_root_path}styles/{$template_row['template_inherit_path']}/template/$tpl_file.html";
- $inherited = true;
- }
- }
- }
-
- // Correct the filename if it is stored in database and the file is in a subfolder.
- if ($template_row['template_storedb'])
- {
- $file = str_replace('.', '/', $file);
+ $messages[] = sprintf($this->user->lang[$this->delete_style_files($style['style_path']) ? 'DELETE_STYLE_FILES_SUCCESS' : 'DELETE_STYLE_FILES_FAILED'], $style['style_name']);
}
+ }
- $template->assign_block_vars('file', array(
- 'U_VIEWSOURCE' => $this->u_action . "&amp;action=cache&amp;id=$template_id&amp;source=$file",
+ if (empty($messages))
+ {
+ // Nothing to uninstall?
+ trigger_error($this->user->lang['NO_MATCHING_STYLES_FOUND'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
- 'CACHED' => $user->format_date(filemtime("{$phpbb_root_path}cache/$filename")),
- 'FILENAME' => $file,
- 'FILENAME_PATH' => $file_tpl,
- 'FILESIZE' => get_formatted_filesize(filesize("{$phpbb_root_path}cache/$filename")),
- 'MODIFIED' => $user->format_date((!$template_row['template_storedb']) ? filemtime($file_tpl) : $filemtime[$file . '.html']))
- );
+ // Log action
+ if (count($uninstalled))
+ {
+ add_log('admin', 'LOG_STYLE_DELETE', implode(', ', $uninstalled));
}
- unset($filemtime);
- $template->assign_vars(array(
- 'S_CACHE' => true,
- 'S_TEMPLATE' => true,
+ // Clear cache
+ $this->cache->purge();
- 'U_ACTION' => $this->u_action . "&amp;action=cache&amp;id=$template_id",
- 'U_BACK' => $this->u_action)
- );
+ // Show message
+ trigger_error(implode('<br />', $messages) . adm_back_link($this->u_action), E_USER_NOTICE);
}
/**
- * Provides a css editor and a basic easier to use stylesheet editing tool for less experienced (or lazy) users
- *
- * @param int $theme_id specifies which theme is being edited
+ * Activate styles
*/
- function edit_theme($theme_id)
+ protected function action_activate()
{
- global $phpbb_root_path, $phpEx, $config, $db, $cache, $user, $template, $safe_mode;
-
- $this->page_title = 'EDIT_THEME';
-
- $filelist = $filelist_cats = array();
-
- $theme_data = utf8_normalize_nfc(request_var('template_data', '', true));
- $theme_data = htmlspecialchars_decode($theme_data);
- $theme_file = utf8_normalize_nfc(request_var('template_file', '', true));
- $text_rows = max(5, min(999, request_var('text_rows', 20)));
- $save_changes = (isset($_POST['save'])) ? true : false;
-
- // make sure theme_file path doesn't go upwards
- $theme_file = str_replace('..', '.', $theme_file);
-
- // Retrieve some information about the theme
- $sql = 'SELECT theme_storedb, theme_path, theme_name, theme_data
- FROM ' . STYLES_THEME_TABLE . "
- WHERE theme_id = $theme_id";
- $result = $db->sql_query($sql);
-
- if (!($theme_info = $db->sql_fetchrow($result)))
- {
- trigger_error($user->lang['NO_THEME'] . adm_back_link($this->u_action), E_USER_WARNING);
- }
- $db->sql_freeresult($result);
-
- // save changes to the theme if the user submitted any
- if ($save_changes)
- {
- // Get the filesystem location of the current file
- $file = "{$phpbb_root_path}styles/{$theme_info['theme_path']}/theme/$theme_file";
- $additional = '';
- $message = $user->lang['THEME_UPDATED'];
-
- // If the theme is stored on the filesystem try to write the file else store it in the database
- if (!$safe_mode && !$theme_info['theme_storedb'] && file_exists($file) && phpbb_is_writable($file))
- {
- if (!($fp = @fopen($file, 'wb')))
- {
- trigger_error($user->lang['NO_THEME'] . adm_back_link($this->u_action), E_USER_WARNING);
- }
- fwrite($fp, $theme_data);
- fclose($fp);
- }
- else
- {
- // Write stylesheet to db
- $sql_ary = array(
- 'theme_mtime' => time(),
- 'theme_storedb' => 1,
- 'theme_data' => $this->db_theme_data($theme_info, $theme_data),
- );
- $sql = 'UPDATE ' . STYLES_THEME_TABLE . '
- SET ' . $db->sql_build_array('UPDATE', $sql_ary) . '
- WHERE theme_id = ' . $theme_id;
- $db->sql_query($sql);
-
- $cache->destroy('sql', STYLES_THEME_TABLE);
+ // Get list of styles to activate
+ $ids = $this->request_vars('id', 0, true);
- // notify the user if the theme was not stored in the db before his modification
- if (!$theme_info['theme_storedb'])
- {
- add_log('admin', 'LOG_THEME_EDIT_DETAILS', $theme_info['theme_name']);
- $message .= '<br />' . $user->lang['EDIT_THEME_STORED_DB'];
- }
- }
- $cache->destroy('sql', STYLES_THEME_TABLE);
- add_log('admin', (!$theme_info['theme_storedb']) ? 'LOG_THEME_EDIT_FILE' : 'LOG_THEME_EDIT', $theme_info['theme_name'], (!$theme_info['theme_storedb']) ? $theme_file : '');
-
- trigger_error($message . adm_back_link($this->u_action . "&amp;action=edit&amp;id=$theme_id&amp;template_file=$theme_file&amp;text_rows=$text_rows"));
- }
+ // Activate styles
+ $sql = 'UPDATE ' . STYLES_TABLE . '
+ SET style_active = 1
+ WHERE style_id IN (' . implode(', ', $ids) . ')';
+ $this->db->sql_query($sql);
- // Generate a category array containing theme filenames
- if (!$theme_info['theme_storedb'])
- {
- $theme_path = "{$phpbb_root_path}styles/{$theme_info['theme_path']}/theme";
+ // Purge cache
+ $this->cache->destroy('sql', STYLES_TABLE);
- $filelist = filelist($theme_path, '', 'css');
+ // Show styles list
+ $this->frontend();
+ }
- if ($theme_file)
- {
- if (!file_exists($theme_path . "/$theme_file") || !($theme_data = file_get_contents($theme_path . "/$theme_file")))
- {
- trigger_error($user->lang['NO_THEME'] . adm_back_link($this->u_action), E_USER_WARNING);
- }
- }
- }
- else
- {
- $theme_data = &$theme_info['theme_data'];
- }
+ /**
+ * Deactivate styles
+ */
+ protected function action_deactivate()
+ {
+ // Get list of styles to deactivate
+ $ids = $this->request_vars('id', 0, true);
- // Now create the categories
- $filelist_cats[''] = array();
- foreach ($filelist as $pathfile => $file_ary)
+ // Check for default style
+ foreach ($ids as $id)
{
- // Use the directory name as category name
- if (!empty($pathfile))
+ if ($id == $this->default_style)
{
- $filelist_cats[$pathfile] = array();
- foreach ($file_ary as $file)
- {
- $filelist_cats[$pathfile][$pathfile . $file] = $file;
- }
- }
- // or if it's in the main category use the word before the first underscore to group files
- else
- {
- $cats = array();
- foreach ($file_ary as $file)
- {
- $cats[] = substr($file, 0, strpos($file, '_'));
- $filelist_cats[substr($file, 0, strpos($file, '_'))][$file] = $file;
- }
-
- $cats = array_values(array_unique($cats));
-
- // we don't need any single element categories so put them into the misc '' category
- for ($i = 0, $n = sizeof($cats); $i < $n; $i++)
- {
- if (sizeof($filelist_cats[$cats[$i]]) == 1 && $cats[$i] !== '')
- {
- $filelist_cats[''][key($filelist_cats[$cats[$i]])] = current($filelist_cats[$cats[$i]]);
- unset($filelist_cats[$cats[$i]]);
- }
- }
- unset($cats);
+ trigger_error($this->user->lang['DEACTIVATE_DEFAULT'] . adm_back_link($this->u_action), E_USER_WARNING);
}
}
- unset($filelist);
- // Generate list of categorised theme files
- $tpl_options = '';
- ksort($filelist_cats);
- foreach ($filelist_cats as $category => $tpl_ary)
- {
- ksort($tpl_ary);
+ // Reset default style for users who use selected styles
+ $sql = 'UPDATE ' . USERS_TABLE . '
+ SET user_style = 0
+ WHERE user_style IN (' . implode(', ', $ids) . ')';
+ $this->db->sql_query($sql);
- if (!empty($category))
- {
- $tpl_options .= '<option class="sep" value="">' . $category . '</option>';
- }
+ // Deactivate styles
+ $sql = 'UPDATE ' . STYLES_TABLE . '
+ SET style_active = 0
+ WHERE style_id IN (' . implode(', ', $ids) . ')';
+ $this->db->sql_query($sql);
- foreach ($tpl_ary as $filename => $file)
- {
- $selected = ($theme_file == $filename) ? ' selected="selected"' : '';
- $tpl_options .= '<option value="' . $filename . '"' . $selected . '>' . $file . '</option>';
- }
- }
+ // Purge cache
+ $this->cache->destroy('sql', STYLES_TABLE);
- $template->assign_vars(array(
- 'S_EDIT_THEME' => true,
- 'S_HIDDEN_FIELDS' => build_hidden_fields(array('template_file' => $theme_file)),
- 'S_THEME_IN_DB' => $theme_info['theme_storedb'],
- 'S_TEMPLATES' => $tpl_options,
-
- 'U_ACTION' => $this->u_action . "&amp;action=edit&amp;id=$theme_id&amp;text_rows=$text_rows",
- 'U_BACK' => $this->u_action,
-
- 'L_EDIT' => $user->lang['EDIT_THEME'],
- 'L_EDIT_EXPLAIN' => $user->lang['EDIT_THEME_EXPLAIN'],
- 'L_EDITOR' => $user->lang['THEME_EDITOR'],
- 'L_EDITOR_HEIGHT' => $user->lang['THEME_EDITOR_HEIGHT'],
- 'L_FILE' => $user->lang['THEME_FILE'],
- 'L_SELECT' => $user->lang['SELECT_THEME'],
- 'L_SELECTED' => $user->lang['SELECTED_THEME'],
- 'L_SELECTED_FILE' => $user->lang['SELECTED_THEME_FILE'],
-
- 'SELECTED_TEMPLATE' => $theme_info['theme_name'],
- 'TEMPLATE_FILE' => $theme_file,
- 'TEMPLATE_DATA' => utf8_htmlspecialchars($theme_data),
- 'TEXT_ROWS' => $text_rows)
- );
+ // Show styles list
+ $this->frontend();
}
/**
- * Edit imagesets
- *
- * @param int $imageset_id specifies which imageset is being edited
+ * Show style details
*/
- function edit_imageset($imageset_id)
+ protected function action_details()
{
- global $db, $user, $phpbb_root_path, $cache, $template;
-
- $this->page_title = 'EDIT_IMAGESET';
-
- if (!$imageset_id)
+ $id = $this->request->variable('id', 0);
+ if (!$id)
{
- trigger_error($user->lang['NO_IMAGESET'] . adm_back_link($this->u_action), E_USER_WARNING);
+ trigger_error($this->user->lang['NO_MATCHING_STYLES_FOUND'] . adm_back_link($this->u_action), E_USER_WARNING);
}
- $update = (isset($_POST['update'])) ? true : false;
-
- $imgname = request_var('imgname', 'site_logo');
- $imgname = preg_replace('#[^a-z0-9\-+_]#i', '', $imgname);
- $sql_extra = $imgnamelang = '';
-
- $sql = 'SELECT imageset_path, imageset_name
- FROM ' . STYLES_IMAGESET_TABLE . "
- WHERE imageset_id = $imageset_id";
- $result = $db->sql_query($sql);
- $imageset_row = $db->sql_fetchrow($result);
- $db->sql_freeresult($result);
-
- if (!$imageset_row)
- {
- trigger_error($user->lang['NO_IMAGESET'] . adm_back_link($this->u_action), E_USER_WARNING);
- }
-
- $imageset_path = $imageset_row['imageset_path'];
- $imageset_name = $imageset_row['imageset_name'];
-
- if (strpos($imgname, '-') !== false)
- {
- list($imgname, $imgnamelang) = explode('-', $imgname);
- $sql_extra = " AND image_lang IN ('" . $db->sql_escape($imgnamelang) . "', '')";
- }
+ // Get all styles
+ $styles = $this->get_styles();
+ usort($styles, array($this, 'sort_styles'));
- $sql = 'SELECT image_filename, image_width, image_height, image_lang, image_id
- FROM ' . STYLES_IMAGESET_DATA_TABLE . "
- WHERE imageset_id = $imageset_id
- AND image_name = '" . $db->sql_escape($imgname) . "'$sql_extra";
- $result = $db->sql_query($sql);
- $imageset_data_row = $db->sql_fetchrow($result);
- $db->sql_freeresult($result);
-
- $image_filename = $imageset_data_row['image_filename'];
- $image_width = $imageset_data_row['image_width'];
- $image_height = $imageset_data_row['image_height'];
- $image_lang = $imageset_data_row['image_lang'];
- $image_id = $imageset_data_row['image_id'];
- $imgsize = ($imageset_data_row['image_width'] && $imageset_data_row['image_height']) ? 1 : 0;
-
- // Check to see whether the selected image exists in the table
- $valid_name = ($update) ? false : true;
-
- foreach ($this->imageset_keys as $category => $img_ary)
+ // Find current style
+ $style = false;
+ foreach ($styles as $row)
{
- if (in_array($imgname, $img_ary))
+ if ($row['style_id'] == $id)
{
- $valid_name = true;
+ $style = $row;
break;
}
}
- if ($update && isset($_POST['imgpath']) && $valid_name)
+ if ($style === false)
{
- // If imgwidth and imgheight are non-zero grab the actual size
- // from the image itself ... we ignore width settings for the poll center image
- $imgwidth = request_var('imgwidth', 0);
- $imgheight = request_var('imgheight', 0);
- $imgsize = request_var('imgsize', 0);
- $imgpath = request_var('imgpath', '');
- $imgpath = str_replace('..', '.', $imgpath);
-
- // If no dimensions selected, we reset width and height to 0 ;)
- if (!$imgsize)
- {
- $imgwidth = $imgheight = 0;
- }
-
- $imglang = '';
+ trigger_error($this->user->lang['NO_MATCHING_STYLES_FOUND'] . adm_back_link($this->u_action), E_USER_WARNING);
+ }
- if ($imgpath && !file_exists("{$phpbb_root_path}styles/$imageset_path/imageset/$imgpath"))
- {
- trigger_error($user->lang['NO_IMAGE_ERROR'] . adm_back_link($this->u_action), E_USER_WARNING);
- }
+ // Find all available parent styles
+ $list = $this->find_possible_parents($styles, $id);
- // Determine width/height. If dimensions included and no width/height given, we detect them automatically...
- if ($imgsize && $imgpath)
- {
- if (!$imgwidth || !$imgheight)
- {
- list($imgwidth_file, $imgheight_file) = getimagesize("{$phpbb_root_path}styles/$imageset_path/imageset/$imgpath");
- $imgwidth = ($imgwidth) ? $imgwidth : $imgwidth_file;
- $imgheight = ($imgheight) ? $imgheight : $imgheight_file;
- }
- $imgwidth = ($imgname != 'poll_center') ? (int) $imgwidth : 0;
- $imgheight = (int) $imgheight;
- }
+ // Add form key
+ $form_key = 'acp_styles';
+ add_form_key($form_key);
- if (strpos($imgpath, '/') !== false)
- {
- list($imglang, $imgfilename) = explode('/', $imgpath);
- }
- else
+ // Change data
+ if ($this->request->variable('update', false))
+ {
+ if (!check_form_key($form_key))
{
- $imgfilename = $imgpath;
+ trigger_error($this->user->lang['FORM_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING);
}
- $sql_ary = array(
- 'image_filename' => (string) $imgfilename,
- 'image_width' => (int) $imgwidth,
- 'image_height' => (int) $imgheight,
- 'image_lang' => (string) $imglang,
+ $update = array(
+ 'style_name' => trim($this->request->variable('style_name', $style['style_name'])),
+ 'style_parent_id' => $this->request->variable('style_parent', (int) $style['style_parent_id']),
+ 'style_active' => $this->request->variable('style_active', (int) $style['style_active']),
);
+ $update_action = $this->u_action . '&amp;action=details&amp;id=' . $id;
- // already exists
- if ($imageset_data_row)
- {
- $sql = 'UPDATE ' . STYLES_IMAGESET_DATA_TABLE . '
- SET ' . $db->sql_build_array('UPDATE', $sql_ary) . "
- WHERE image_id = $image_id";
- $db->sql_query($sql);
- }
- // does not exist
- else if (!$imageset_data_row)
- {
- $sql_ary['image_name'] = $imgname;
- $sql_ary['imageset_id'] = (int) $imageset_id;
- $db->sql_query('INSERT INTO ' . STYLES_IMAGESET_DATA_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary));
- }
-
- $cache->destroy('sql', STYLES_IMAGESET_DATA_TABLE);
-
- add_log('admin', 'LOG_IMAGESET_EDIT', $imageset_name);
-
- $template->assign_var('SUCCESS', true);
-
- $image_filename = $imgfilename;
- $image_width = $imgwidth;
- $image_height = $imgheight;
- $image_lang = $imglang;
- }
-
- $imglang = '';
- $imagesetlist = array('nolang' => array(), 'lang' => array());
- $langs = array();
-
- $dir = "{$phpbb_root_path}styles/$imageset_path/imageset";
- $dp = @opendir($dir);
-
- if ($dp)
- {
- while (($file = readdir($dp)) !== false)
+ // Check style name
+ if ($update['style_name'] != $style['style_name'])
{
- if ($file[0] != '.' && strtoupper($file) != 'CVS' && !is_file($dir . '/' . $file) && !is_link($dir . '/' . $file))
+ if (!strlen($update['style_name']))
{
- $langs[] = $file;
+ trigger_error($this->user->lang['STYLE_ERR_STYLE_NAME'] . adm_back_link($update_action), E_USER_WARNING);
}
- else if (preg_match('#\.(?:gif|jpg|png)$#', $file))
+ foreach ($styles as $row)
{
- $imagesetlist['nolang'][] = $file;
+ if ($row['style_name'] == $update['style_name'])
+ {
+ trigger_error($this->user->lang['STYLE_ERR_NAME_EXIST'] . adm_back_link($update_action), E_USER_WARNING);
+ }
}
}
-
- if ($sql_extra)
+ else
{
- $dp2 = @opendir("$dir/$imgnamelang");
+ unset($update['style_name']);
+ }
- if ($dp2)
+ // Check parent style id
+ if ($update['style_parent_id'] != $style['style_parent_id'])
+ {
+ if ($update['style_parent_id'] != 0)
{
- while (($file2 = readdir($dp2)) !== false)
+ $found = false;
+ foreach ($list as $row)
{
- if (preg_match('#\.(?:gif|jpg|png)$#', $file2))
+ if ($row['style_id'] == $update['style_parent_id'])
{
- $imagesetlist['lang'][] = "$imgnamelang/$file2";
+ $found = true;
+ $update['style_parent_tree'] = ($row['style_parent_tree'] != '' ? $row['style_parent_tree'] . '/' : '') . $row['style_path'];
+ break;
}
}
- closedir($dp2);
- }
- }
- closedir($dp);
- }
-
- // Generate list of image options
- $img_options = '';
- foreach ($this->imageset_keys as $category => $img_ary)
- {
- $template->assign_block_vars('category', array(
- 'NAME' => $user->lang['IMG_CAT_' . strtoupper($category)]
- ));
-
- foreach ($img_ary as $img)
- {
- if ($category == 'buttons')
- {
- foreach ($langs as $language)
+ if (!$found)
{
- $template->assign_block_vars('category.images', array(
- 'SELECTED' => ($img == $imgname && $language == $imgnamelang),
- 'VALUE' => $img . '-' . $language,
- 'TEXT' => $user->lang['IMG_' . strtoupper($img)] . ' [ ' . $language . ' ]'
- ));
+ trigger_error($this->user->lang['STYLE_ERR_INVALID_PARENT'] . adm_back_link($update_action), E_USER_WARNING);
}
}
else
{
- $template->assign_block_vars('category.images', array(
- 'SELECTED' => ($img == $imgname),
- 'VALUE' => $img,
- 'TEXT' => (($category == 'custom') ? $img : $user->lang['IMG_' . strtoupper($img)])
- ));
+ $update['style_parent_tree'] = '';
}
}
- }
-
- // Make sure the list of possible images is sorted alphabetically
- sort($imagesetlist['lang']);
- sort($imagesetlist['nolang']);
-
- $image_found = false;
- $img_val = '';
- foreach ($imagesetlist as $type => $img_ary)
- {
- if ($type !== 'lang' || $sql_extra)
+ else
{
- $template->assign_block_vars('imagesetlist', array(
- 'TYPE' => ($type == 'lang')
- ));
+ unset($update['style_parent_id']);
}
- foreach ($img_ary as $img)
+ // Check style_active
+ if ($update['style_active'] != $style['style_active'])
{
- $imgtext = preg_replace('/^([^\/]+\/)/', '', $img);
- $selected = (!empty($imgname) && strpos($image_filename, $imgtext) !== false);
- if ($selected)
+ if (!$update['style_active'] && $this->default_style == $style['style_id'])
{
- $image_found = true;
- $img_val = htmlspecialchars($img);
+ trigger_error($this->user->lang['DEACTIVATE_DEFAULT'] . adm_back_link($update_action), E_USER_WARNING);
}
- $template->assign_block_vars('imagesetlist.images', array(
- 'SELECTED' => $selected,
- 'TEXT' => $imgtext,
- 'VALUE' => htmlspecialchars($img)
- ));
}
- }
-
- $imgsize_bool = (!empty($imgname) && $image_width && $image_height) ? true : false;
- $image_request = '../styles/' . $imageset_path . '/imageset/' . ($image_lang ? $imgnamelang . '/' : '') . $image_filename;
-
- $template->assign_vars(array(
- 'S_EDIT_IMAGESET' => true,
- 'L_TITLE' => $user->lang[$this->page_title],
- 'L_EXPLAIN' => $user->lang[$this->page_title . '_EXPLAIN'],
- 'IMAGE_OPTIONS' => $img_options,
- 'IMAGE_SIZE' => $image_width,
- 'IMAGE_HEIGHT' => $image_height,
- 'IMAGE_REQUEST' => (empty($image_filename)) ? 'images/no_image.png' : $image_request,
- 'U_ACTION' => $this->u_action . "&amp;action=edit&amp;id=$imageset_id",
- 'U_BACK' => $this->u_action,
- 'NAME' => $imageset_name,
- 'A_NAME' => addslashes($imageset_name),
- 'PATH' => $imageset_path,
- 'A_PATH' => addslashes($imageset_path),
- 'ERROR' => !$valid_name,
- 'IMG_SRC' => ($image_found) ? '../styles/' . $imageset_path . '/imageset/' . $img_val : 'images/no_image.png',
- 'IMAGE_SELECT' => $image_found
- ));
- }
-
- /**
- * Remove style/template/theme/imageset
- */
- function remove($mode, $style_id)
- {
- global $db, $template, $user, $phpbb_root_path, $cache, $config;
-
- $new_id = request_var('new_id', 0);
- $update = (isset($_POST['update'])) ? true : false;
- $sql_where = '';
-
- switch ($mode)
- {
- case 'style':
- $sql_from = STYLES_TABLE;
- $sql_select = 'style_id, style_name, template_id, theme_id, imageset_id';
- $sql_where = 'AND style_active = 1';
- break;
-
- case 'template':
- $sql_from = STYLES_TEMPLATE_TABLE;
- $sql_select = 'template_id, template_name, template_path, template_storedb';
- break;
-
- case 'theme':
- $sql_from = STYLES_THEME_TABLE;
- $sql_select = 'theme_id, theme_name, theme_path, theme_storedb';
- break;
-
- case 'imageset':
- $sql_from = STYLES_IMAGESET_TABLE;
- $sql_select = 'imageset_id, imageset_name, imageset_path';
- break;
- }
-
- if ($mode === 'template' && ($conflicts = $this->check_inheritance($mode, $style_id)))
- {
- $l_type = strtoupper($mode);
- $msg = $user->lang[$l_type . '_DELETE_DEPENDENT'];
- foreach ($conflicts as $id => $values)
+ else
{
- $msg .= '<br />' . $values['template_name'];
+ unset($update['style_active']);
}
- trigger_error($msg . adm_back_link($this->u_action), E_USER_WARNING);
- }
-
- $l_prefix = strtoupper($mode);
-
- $sql = "SELECT $sql_select
- FROM $sql_from
- WHERE {$mode}_id = $style_id";
- $result = $db->sql_query($sql);
- $style_row = $db->sql_fetchrow($result);
- $db->sql_freeresult($result);
-
- if (!$style_row)
- {
- trigger_error($user->lang['NO_' . $l_prefix] . adm_back_link($this->u_action), E_USER_WARNING);
- }
-
- $s_only_component = $this->display_component_options($mode, $style_row[$mode . '_id'], $style_row);
-
- if ($s_only_component)
- {
- trigger_error($user->lang['ONLY_' . $l_prefix] . adm_back_link($this->u_action), E_USER_WARNING);
- }
-
- if ($update)
- {
- if ($mode == 'style')
+ // Update data
+ if (count($update))
{
- $sql = "DELETE FROM $sql_from
- WHERE {$mode}_id = $style_id";
- $db->sql_query($sql);
+ $sql = 'UPDATE ' . STYLES_TABLE . '
+ SET ' . $this->db->sql_build_array('UPDATE', $update) . "
+ WHERE style_id = $id";
+ $this->db->sql_query($sql);
- $sql = 'UPDATE ' . USERS_TABLE . "
- SET user_style = $new_id
- WHERE user_style = $style_id";
- $db->sql_query($sql);
+ $style = array_merge($style, $update);
- $sql = 'UPDATE ' . FORUMS_TABLE . "
- SET forum_style = $new_id
- WHERE forum_style = $style_id";
- $db->sql_query($sql);
-
- if ($style_id == $config['default_style'])
+ if (isset($update['style_parent_id']))
{
- set_config('default_style', $new_id);
+ // Update styles tree
+ $styles = $this->get_styles();
+ if ($this->update_styles_tree($styles, $style))
+ {
+ // Something was changed in styles tree, purge all cache
+ $this->cache->purge();
+ }
}
+ add_log('admin', 'LOG_STYLE_EDIT_DETAILS', $style['style_name']);
+ }
- // Remove the components
- $components = array('template', 'theme', 'imageset');
- foreach ($components as $component)
+ // Update default style
+ $default = $this->request->variable('style_default', 0);
+ if ($default)
+ {
+ if (!$style['style_active'])
{
- $new_id = request_var('new_' . $component . '_id', 0);
- $component_id = $style_row[$component . '_id'];
- $this->remove_component($component, $component_id, $new_id, $style_id);
+ trigger_error($this->user->lang['STYLE_DEFAULT_CHANGE_INACTIVE'] . adm_back_link($update_action), E_USER_WARNING);
}
- }
- else
- {
- $this->remove_component($mode, $style_id, $new_id);
+ set_config('default_style', $id);
+ $this->cache->purge();
}
- $cache->destroy('sql', STYLES_TABLE);
-
- add_log('admin', 'LOG_' . $l_prefix . '_DELETE', $style_row[$mode . '_name']);
- $message = ($mode != 'style') ? $l_prefix . '_DELETED_FS' : $l_prefix . '_DELETED';
- trigger_error($user->lang[$message] . adm_back_link($this->u_action));
+ // Show styles list
+ $this->frontend();
+ return;
}
- $this->page_title = 'DELETE_' . $l_prefix;
+ // Show page title
+ $this->welcome_message('ACP_STYLES', null);
- $template->assign_vars(array(
- 'S_DELETE' => true,
-
- 'L_TITLE' => $user->lang[$this->page_title],
- 'L_EXPLAIN' => $user->lang[$this->page_title . '_EXPLAIN'],
- 'L_NAME' => $user->lang[$l_prefix . '_NAME'],
- 'L_REPLACE' => $user->lang['REPLACE_' . $l_prefix],
- 'L_REPLACE_EXPLAIN' => $user->lang['REPLACE_' . $l_prefix . '_EXPLAIN'],
-
- 'U_ACTION' => $this->u_action . "&amp;action=delete&amp;id=$style_id",
- 'U_BACK' => $this->u_action,
+ // Show parent styles
+ foreach ($list as $row)
+ {
+ $this->template->assign_block_vars('parent_styles', array(
+ 'STYLE_ID' => $row['style_id'],
+ 'STYLE_NAME' => htmlspecialchars($row['style_name']),
+ 'LEVEL' => $row['level'],
+ 'SPACER' => str_repeat('&nbsp; ', $row['level']),
+ )
+ );
+ }
- 'NAME' => $style_row[$mode . '_name'],
+ // Show style details
+ $this->template->assign_vars(array(
+ 'S_STYLE_DETAILS' => true,
+ 'STYLE_ID' => $style['style_id'],
+ 'STYLE_NAME' => htmlspecialchars($style['style_name']),
+ 'STYLE_PATH' => htmlspecialchars($style['style_path']),
+ 'STYLE_COPYRIGHT' => strip_tags($style['style_copyright']),
+ 'STYLE_PARENT' => $style['style_parent_id'],
+ 'S_STYLE_ACTIVE' => $style['style_active'],
+ 'S_STYLE_DEFAULT' => ($style['style_id'] == $this->default_style)
)
);
-
- if ($mode == 'style')
- {
- $template->assign_vars(array(
- 'S_DELETE_STYLE' => true,
- ));
- }
}
/**
- * Remove template/theme/imageset entry from the database
+ * List installed styles
*/
- function remove_component($component, $component_id, $new_id, $style_id = false)
+ protected function show_installed()
{
- global $db;
-
- if (($new_id == 0) || ($component === 'template' && ($conflicts = $this->check_inheritance($component, $component_id))))
- {
- // We can not delete the template, as the user wants to keep the component or an other template is inheriting from this one.
- return;
- }
+ // Get all installed styles
+ $styles = $this->get_styles();
- $component_in_use = array();
- if ($component != 'style')
+ if (!count($styles))
{
- $component_in_use = $this->component_in_use($component, $component_id, $style_id);
+ trigger_error($this->user->lang['NO_MATCHING_STYLES_FOUND'] . adm_back_link($this->u_action), E_USER_WARNING);
}
- if (($new_id == -1) && !empty($component_in_use))
- {
- // We can not delete the component, as it is still in use
- return;
- }
+ usort($styles, array($this, 'sort_styles'));
- if ($component == 'imageset')
- {
- $sql = 'DELETE FROM ' . STYLES_IMAGESET_DATA_TABLE . "
- WHERE imageset_id = $component_id";
- $db->sql_query($sql);
- }
+ // Get users
+ $users = $this->get_users();
- switch ($component)
+ // Add users counter to rows
+ foreach ($styles as &$style)
{
- case 'template':
- $sql_from = STYLES_TEMPLATE_TABLE;
- break;
-
- case 'theme':
- $sql_from = STYLES_THEME_TABLE;
- break;
-
- case 'imageset':
- $sql_from = STYLES_IMAGESET_TABLE;;
- break;
+ $style['_users'] = isset($users[$style['style_id']]) ? $users[$style['style_id']] : 0;
}
- $sql = "DELETE FROM $sql_from
- WHERE {$component}_id = $component_id";
- $db->sql_query($sql);
+ // Set up styles list variables
+ // Addons should increase this number and update template variable
+ $this->styles_list_cols = 4;
+ $this->template->assign_var('STYLES_LIST_COLS', $this->styles_list_cols);
- $sql = 'UPDATE ' . STYLES_TABLE . "
- SET {$component}_id = $new_id
- WHERE {$component}_id = $component_id";
- $db->sql_query($sql);
- }
-
- /**
- * Display the options which can be used to replace a style/template/theme/imageset
- *
- * @return boolean Returns true if the component is the only component and can not be deleted.
- */
- function display_component_options($component, $component_id, $style_row = false, $style_id = false)
- {
- global $db, $template, $user;
+ // Show styles list
+ $this->show_styles_list($styles, 0, 0);
- $is_only_component = true;
- $component_in_use = array();
- if ($component != 'style')
+ // Show styles with invalid inherits_id
+ foreach ($styles as $style)
{
- $component_in_use = $this->component_in_use($component, $component_id, $style_id);
- }
-
- $sql_where = '';
- switch ($component)
- {
- case 'style':
- $sql_from = STYLES_TABLE;
- $sql_where = 'WHERE style_active = 1';
- break;
-
- case 'template':
- $sql_from = STYLES_TEMPLATE_TABLE;
- $sql_where = 'WHERE template_inherits_id <> ' . $component_id;
- break;
-
- case 'theme':
- $sql_from = STYLES_THEME_TABLE;
- break;
-
- case 'imageset':
- $sql_from = STYLES_IMAGESET_TABLE;
- break;
- }
-
- $s_options = '';
- if (($component != 'style') && empty($component_in_use))
- {
- // If it is not in use, there must be another component
- $is_only_component = false;
-
- $sql = "SELECT {$component}_id, {$component}_name
- FROM $sql_from
- WHERE {$component}_id = {$component_id}";
- $result = $db->sql_query($sql);
- $row = $db->sql_fetchrow($result);
- $db->sql_freeresult($result);
-
- $s_options .= '<option value="-1" selected="selected">' . $user->lang['DELETE_' . strtoupper($component)] . '</option>';
- $s_options .= '<option value="0">' . sprintf($user->lang['KEEP_' . strtoupper($component)], $row[$component . '_name']) . '</option>';
- }
- else
- {
- $sql = "SELECT {$component}_id, {$component}_name
- FROM $sql_from
- $sql_where
- ORDER BY {$component}_name ASC";
- $result = $db->sql_query($sql);
-
- $s_keep_option = $s_options = '';
- while ($row = $db->sql_fetchrow($result))
- {
- if ($row[$component . '_id'] != $component_id)
- {
- $is_only_component = false;
- $s_options .= '<option value="' . $row[$component . '_id'] . '">' . sprintf($user->lang['REPLACE_WITH_OPTION'], $row[$component . '_name']) . '</option>';
- }
- else if ($component != 'style')
- {
- $s_keep_option = '<option value="0" selected="selected">' . sprintf($user->lang['KEEP_' . strtoupper($component)], $row[$component . '_name']) . '</option>';
- }
- }
- $db->sql_freeresult($result);
- $s_options = $s_keep_option . $s_options;
- }
-
- if (!$style_row)
- {
- $template->assign_var('S_REPLACE_' . strtoupper($component) . '_OPTIONS', $s_options);
- }
- else
- {
- $template->assign_var('S_REPLACE_OPTIONS', $s_options);
- if ($component == 'style')
+ if (empty($style['_shown']))
{
- $components = array('template', 'theme', 'imageset');
- foreach ($components as $component)
- {
- $this->display_component_options($component, $style_row[$component . '_id'], false, $component_id, true);
- }
+ $style['_note'] = sprintf($this->user->lang['REQUIRES_STYLE'], htmlspecialchars($style['style_parent_tree']));
+ $this->list_style($style, 0);
}
}
- return $is_only_component;
- }
-
- /**
- * Check whether the component is still used by another style or component
- */
- function component_in_use($component, $component_id, $style_id = false)
- {
- global $db;
-
- $component_in_use = array();
+ // Add buttons
+ $this->template->assign_block_vars('extra_actions', array(
+ 'ACTION_NAME' => 'activate',
+ 'L_ACTION' => $this->user->lang['STYLE_ACTIVATE'],
+ )
+ );
- if ($style_id)
- {
- $sql = 'SELECT style_id, style_name
- FROM ' . STYLES_TABLE . "
- WHERE {$component}_id = {$component_id}
- AND style_id <> {$style_id}
- ORDER BY style_name ASC";
- }
- else
- {
- $sql = 'SELECT style_id, style_name
- FROM ' . STYLES_TABLE . "
- WHERE {$component}_id = {$component_id}
- ORDER BY style_name ASC";
- }
- $result = $db->sql_query($sql);
- while ($row = $db->sql_fetchrow($result))
- {
- $component_in_use[] = $row['style_name'];
- }
- $db->sql_freeresult($result);
+ $this->template->assign_block_vars('extra_actions', array(
+ 'ACTION_NAME' => 'deactivate',
+ 'L_ACTION' => $this->user->lang['STYLE_DEACTIVATE'],
+ )
+ );
- if ($component === 'template' && ($conflicts = $this->check_inheritance($component, $component_id)))
+ if (isset($this->style_counters) && $this->style_counters['total'] > 1)
{
- foreach ($conflicts as $temp_id => $conflict_data)
- {
- $component_in_use[] = $conflict_data['template_name'];
- }
+ $this->template->assign_block_vars('extra_actions', array(
+ 'ACTION_NAME' => 'uninstall',
+ 'L_ACTION' => $this->user->lang['STYLE_UNINSTALL'],
+ )
+ );
}
-
- return $component_in_use;
}
/**
- * Export style or style elements
+ * Show list of styles that can be installed
*/
- function export($mode, $style_id)
+ protected function show_available()
{
- global $db, $template, $user, $phpbb_root_path, $cache, $phpEx, $config;
-
- $update = (isset($_POST['update'])) ? true : false;
-
- $inc_template = request_var('inc_template', 0);
- $inc_theme = request_var('inc_theme', 0);
- $inc_imageset = request_var('inc_imageset', 0);
- $store = request_var('store', 0);
- $format = request_var('format', '');
-
- $error = array();
- $methods = array('tar');
-
- $available_methods = array('tar.gz' => 'zlib', 'tar.bz2' => 'bz2', 'zip' => 'zlib');
- foreach ($available_methods as $type => $module)
- {
- if (!@extension_loaded($module))
- {
- continue;
- }
-
- $methods[] = $type;
- }
+ // Get list of styles
+ $styles = $this->find_available(true);
- if (!in_array($format, $methods))
+ // Show styles
+ if (empty($styles))
{
- $format = 'tar';
+ trigger_error($this->user->lang['NO_UNINSTALLED_STYLE'] . adm_back_link($this->u_base_action), E_USER_NOTICE);
}
- switch ($mode)
- {
- case 'style':
- if ($update && ($inc_template + $inc_theme + $inc_imageset) < 1)
- {
- $error[] = $user->lang['STYLE_ERR_MORE_ELEMENTS'];
- }
-
- $name = 'style_name';
-
- $sql_select = 's.style_id, s.style_name, s.style_copyright';
- $sql_select .= ($inc_template) ? ', t.*' : ', t.template_name';
- $sql_select .= ($inc_theme) ? ', c.*' : ', c.theme_name';
- $sql_select .= ($inc_imageset) ? ', i.*' : ', i.imageset_name';
- $sql_from = STYLES_TABLE . ' s, ' . STYLES_TEMPLATE_TABLE . ' t, ' . STYLES_THEME_TABLE . ' c, ' . STYLES_IMAGESET_TABLE . ' i';
- $sql_where = "s.style_id = $style_id AND t.template_id = s.template_id AND c.theme_id = s.theme_id AND i.imageset_id = s.imageset_id";
-
- $l_prefix = 'STYLE';
- break;
+ usort($styles, array($this, 'sort_styles'));
- case 'template':
- $name = 'template_name';
-
- $sql_select = '*';
- $sql_from = STYLES_TEMPLATE_TABLE;
- $sql_where = "template_id = $style_id";
-
- $l_prefix = 'TEMPLATE';
- break;
-
- case 'theme':
- $name = 'theme_name';
-
- $sql_select = '*';
- $sql_from = STYLES_THEME_TABLE;
- $sql_where = "theme_id = $style_id";
-
- $l_prefix = 'THEME';
- break;
-
- case 'imageset':
- $name = 'imageset_name';
-
- $sql_select = '*';
- $sql_from = STYLES_IMAGESET_TABLE;
- $sql_where = "imageset_id = $style_id";
-
- $l_prefix = 'IMAGESET';
- break;
- }
+ $this->styles_list_cols = 3;
+ $this->template->assign_vars(array(
+ 'STYLES_LIST_COLS' => $this->styles_list_cols,
+ 'STYLES_LIST_HIDE_COUNT' => true
+ )
+ );
- if ($update && !sizeof($error))
+ // Show styles
+ foreach ($styles as &$style)
{
- $sql = "SELECT $sql_select
- FROM $sql_from
- WHERE $sql_where";
- $result = $db->sql_query($sql);
- $style_row = $db->sql_fetchrow($result);
- $db->sql_freeresult($result);
-
- if (!$style_row)
- {
- trigger_error($user->lang['NO_' . $l_prefix] . adm_back_link($this->u_action), E_USER_WARNING);
- }
-
- $var_ary = array('style_id', 'style_name', 'style_copyright', 'template_id', 'template_name', 'template_path', 'template_copyright', 'template_storedb', 'template_inherits_id', 'bbcode_bitfield', 'theme_id', 'theme_name', 'theme_path', 'theme_copyright', 'theme_storedb', 'theme_mtime', 'theme_data', 'imageset_id', 'imageset_name', 'imageset_path', 'imageset_copyright');
-
- foreach ($var_ary as $var)
- {
- if (!isset($style_row[$var]))
- {
- $style_row[$var] = '';
- }
- }
-
- $files = $data = array();
-
- if ($mode == 'style')
- {
- $style_cfg = str_replace(array('{MODE}', '{NAME}', '{COPYRIGHT}', '{VERSION}'), array($mode, $style_row['style_name'], $style_row['style_copyright'], $config['version']), $this->style_cfg);
-
- $style_cfg .= (!$inc_template) ? "\nrequired_template = {$style_row['template_name']}" : '';
- $style_cfg .= (!$inc_theme) ? "\nrequired_theme = {$style_row['theme_name']}" : '';
- $style_cfg .= (!$inc_imageset) ? "\nrequired_imageset = {$style_row['imageset_name']}" : '';
-
- $data[] = array(
- 'src' => $style_cfg,
- 'prefix' => 'style.cfg'
- );
-
- unset($style_cfg);
- }
-
- // Export template core code
- if ($mode == 'template' || $inc_template)
- {
- $use_template_name = $style_row['template_name'];
-
- // Add the inherit from variable, depending on it's use...
- if ($style_row['template_inherits_id'])
- {
- // Get the template name
- $sql = 'SELECT template_name
- FROM ' . STYLES_TEMPLATE_TABLE . '
- WHERE template_id = ' . (int) $style_row['template_inherits_id'];
- $result = $db->sql_query($sql);
- $use_template_name = (string) $db->sql_fetchfield('template_name');
- $db->sql_freeresult($result);
- }
-
- $template_cfg = str_replace(array('{MODE}', '{NAME}', '{COPYRIGHT}', '{VERSION}', '{INHERIT_FROM}'), array($mode, $style_row['template_name'], $style_row['template_copyright'], $config['version'], $use_template_name), $this->template_cfg);
-
- $template_cfg .= "\n\nbbcode_bitfield = {$style_row['bbcode_bitfield']}";
-
- $data[] = array(
- 'src' => $template_cfg,
- 'prefix' => 'template/template.cfg'
- );
-
- // This is potentially nasty memory-wise ...
- if (!$style_row['template_storedb'])
- {
- $files[] = array(
- 'src' => "styles/{$style_row['template_path']}/template/",
- 'prefix-' => "styles/{$style_row['template_path']}/",
- 'prefix+' => false,
- 'exclude' => 'template.cfg'
- );
- }
- else
- {
- $sql = 'SELECT template_filename, template_data
- FROM ' . STYLES_TEMPLATE_DATA_TABLE . "
- WHERE template_id = {$style_row['template_id']}";
- $result = $db->sql_query($sql);
-
- while ($row = $db->sql_fetchrow($result))
- {
- $data[] = array(
- 'src' => $row['template_data'],
- 'prefix' => 'template/' . $row['template_filename']
- );
- }
- $db->sql_freeresult($result);
- }
- unset($template_cfg);
- }
-
- // Export theme core code
- if ($mode == 'theme' || $inc_theme)
- {
- $theme_cfg = str_replace(array('{MODE}', '{NAME}', '{COPYRIGHT}', '{VERSION}'), array($mode, $style_row['theme_name'], $style_row['theme_copyright'], $config['version']), $this->theme_cfg);
-
- // Read old cfg file
- $items = $cache->obtain_cfg_items($style_row);
- $items = $items['theme'];
-
- if (!isset($items['parse_css_file']))
- {
- $items['parse_css_file'] = 'off';
- }
-
- $theme_cfg = str_replace(array('{PARSE_CSS_FILE}'), array($items['parse_css_file']), $theme_cfg);
-
- $files[] = array(
- 'src' => "styles/{$style_row['theme_path']}/theme/",
- 'prefix-' => "styles/{$style_row['theme_path']}/",
- 'prefix+' => false,
- 'exclude' => ($style_row['theme_storedb']) ? 'stylesheet.css,theme.cfg' : 'theme.cfg'
- );
-
- $data[] = array(
- 'src' => $theme_cfg,
- 'prefix' => 'theme/theme.cfg'
- );
-
- if ($style_row['theme_storedb'])
- {
- $data[] = array(
- 'src' => $style_row['theme_data'],
- 'prefix' => 'theme/stylesheet.css'
- );
- }
-
- unset($items, $theme_cfg);
- }
-
- // Export imageset core code
- if ($mode == 'imageset' || $inc_imageset)
+ // Check if style has a parent style in styles list
+ $has_parent = false;
+ if ($style['_inherit_name'] != '')
{
- $imageset_cfg = str_replace(array('{MODE}', '{NAME}', '{COPYRIGHT}', '{VERSION}'), array($mode, $style_row['imageset_name'], $style_row['imageset_copyright'], $config['version']), $this->imageset_cfg);
-
- $imageset_main = array();
-
- $sql = 'SELECT image_filename, image_name, image_height, image_width
- FROM ' . STYLES_IMAGESET_DATA_TABLE . "
- WHERE imageset_id = $style_id
- AND image_lang = ''";
- $result = $db->sql_query($sql);
- while ($row = $db->sql_fetchrow($result))
- {
- $imageset_main[$row['image_name']] = $row['image_filename'] . ($row['image_height'] ? '*' . $row['image_height']: '') . ($row['image_width'] ? '*' . $row['image_width']: '');
- }
- $db->sql_freeresult($result);
-
- foreach ($this->imageset_keys as $topic => $key_array)
- {
- foreach ($key_array as $key)
- {
- if (isset($imageset_main[$key]))
- {
- $imageset_cfg .= "\nimg_" . $key . ' = ' . str_replace("styles/{$style_row['imageset_path']}/imageset/", '{PATH}', $imageset_main[$key]);
- }
- }
- }
-
- $files[] = array(
- 'src' => "styles/{$style_row['imageset_path']}/imageset/",
- 'prefix-' => "styles/{$style_row['imageset_path']}/",
- 'prefix+' => false,
- 'exclude' => 'imageset.cfg'
- );
-
- $data[] = array(
- 'src' => trim($imageset_cfg),
- 'prefix' => 'imageset/imageset.cfg'
- );
-
- end($data);
-
- $imageset_root = "{$phpbb_root_path}styles/{$style_row['imageset_path']}/imageset/";
-
- if ($dh = @opendir($imageset_root))
- {
- while (($fname = readdir($dh)) !== false)
- {
- if ($fname[0] != '.' && $fname != 'CVS' && is_dir("$imageset_root$fname"))
- {
- $files[key($files)]['exclude'] .= ',' . $fname . '/imageset.cfg';
- }
- }
- closedir($dh);
- }
-
- $imageset_lang = array();
-
- $sql = 'SELECT image_filename, image_name, image_height, image_width, image_lang
- FROM ' . STYLES_IMAGESET_DATA_TABLE . "
- WHERE imageset_id = $style_id
- AND image_lang <> ''";
- $result = $db->sql_query($sql);
- while ($row = $db->sql_fetchrow($result))
+ foreach ($styles as $parent_style)
{
- $imageset_lang[$row['image_lang']][$row['image_name']] = $row['image_filename'] . ($row['image_height'] ? '*' . $row['image_height']: '') . ($row['image_width'] ? '*' . $row['image_width']: '');
- }
- $db->sql_freeresult($result);
-
- foreach ($imageset_lang as $lang => $imageset_localized)
- {
- $imageset_cfg = str_replace(array('{MODE}', '{NAME}', '{COPYRIGHT}', '{VERSION}'), array($mode, $style_row['imageset_name'], $style_row['imageset_copyright'], $config['version']), $this->imageset_cfg);
-
- foreach ($this->imageset_keys as $topic => $key_array)
+ if ($parent_style['style_name'] == $style['_inherit_name'] && empty($parent_style['_shown']))
{
- foreach ($key_array as $key)
- {
- if (isset($imageset_localized[$key]))
- {
- $imageset_cfg .= "\nimg_" . $key . ' = ' . str_replace("styles/{$style_row['imageset_path']}/imageset/", '{PATH}', $imageset_localized[$key]);
- }
- }
+ // Show parent style first
+ $has_parent = true;
}
-
- $data[] = array(
- 'src' => trim($imageset_cfg),
- 'prefix' => 'imageset/' . $lang . '/imageset.cfg'
- );
}
-
- unset($imageset_cfg);
}
-
- switch ($format)
+ if (!$has_parent)
{
- case 'tar':
- $ext = '.tar';
- break;
-
- case 'zip':
- $ext = '.zip';
- break;
-
- case 'tar.gz':
- $ext = '.tar.gz';
- break;
-
- case 'tar.bz2':
- $ext = '.tar.bz2';
- break;
-
- default:
- $error[] = $user->lang[$l_prefix . '_ERR_ARCHIVE'];
- }
-
- if (!sizeof($error))
- {
- include($phpbb_root_path . 'includes/functions_compress.' . $phpEx);
-
- if ($mode == 'style')
- {
- $path = preg_replace('#[^\w-]+#', '_', $style_row['style_name']);
- }
- else
- {
- $path = $style_row[$mode . '_path'];
- }
-
- if ($format == 'zip')
- {
- $compress = new compress_zip('w', $phpbb_root_path . "store/$path$ext");
- }
- else
- {
- $compress = new compress_tar('w', $phpbb_root_path . "store/$path$ext", $ext);
- }
-
- if (sizeof($files))
- {
- foreach ($files as $file_ary)
- {
- $compress->add_file($file_ary['src'], $file_ary['prefix-'], $file_ary['prefix+'], $file_ary['exclude']);
- }
- }
-
- if (sizeof($data))
- {
- foreach ($data as $data_ary)
- {
- $compress->add_data($data_ary['src'], $data_ary['prefix']);
- }
- }
-
- $compress->close();
-
- add_log('admin', 'LOG_' . $l_prefix . '_EXPORT', $style_row[$mode . '_name']);
-
- if (!$store)
- {
- $compress->download($path);
- @unlink("{$phpbb_root_path}store/$path$ext");
- exit;
- }
-
- trigger_error(sprintf($user->lang[$l_prefix . '_EXPORTED'], "store/$path$ext") . adm_back_link($this->u_action));
+ $this->list_style($style, 0);
+ $this->show_available_child_styles($styles, $style['style_name'], 1);
}
}
- $sql = "SELECT {$mode}_id, {$mode}_name
- FROM " . (($mode == 'style') ? STYLES_TABLE : $sql_from) . "
- WHERE {$mode}_id = $style_id";
- $result = $db->sql_query($sql);
- $style_row = $db->sql_fetchrow($result);
- $db->sql_freeresult($result);
-
- if (!$style_row)
+ // Show styles that do not have parent style in styles list
+ foreach ($styles as $style)
{
- trigger_error($user->lang['NO_' . $l_prefix] . adm_back_link($this->u_action), E_USER_WARNING);
+ if (empty($style['_shown']))
+ {
+ $this->list_style($style, 0);
+ }
}
- $this->page_title = $l_prefix . '_EXPORT';
-
- $format_buttons = '';
- foreach ($methods as $method)
+ // Add button
+ if (isset($this->style_counters) && $this->style_counters['caninstall'] > 0)
{
- $format_buttons .= '<label><input type="radio"' . ((!$format_buttons) ? ' id="format"' : '') . ' class="radio" value="' . $method . '" name="format"' . (($method == $format) ? ' checked="checked"' : '') . ' /> ' . $method . '</label>';
+ $this->template->assign_block_vars('extra_actions', array(
+ 'ACTION_NAME' => 'install',
+ 'L_ACTION' => $this->user->lang['INSTALL_STYLES'],
+ )
+ );
}
-
- $template->assign_vars(array(
- 'S_EXPORT' => true,
- 'S_ERROR_MSG' => (sizeof($error)) ? true : false,
- 'S_STYLE' => ($mode == 'style') ? true : false,
-
- 'L_TITLE' => $user->lang[$this->page_title],
- 'L_EXPLAIN' => $user->lang[$this->page_title . '_EXPLAIN'],
- 'L_NAME' => $user->lang[$l_prefix . '_NAME'],
-
- 'U_ACTION' => $this->u_action . '&amp;action=export&amp;id=' . $style_id,
- 'U_BACK' => $this->u_action,
-
- 'ERROR_MSG' => (sizeof($error)) ? implode('<br />', $error) : '',
- 'NAME' => $style_row[$mode . '_name'],
- 'FORMAT_BUTTONS' => $format_buttons)
- );
}
/**
- * Display details
+ * Find styles available for installation
+ *
+ * @param bool $all if true, function will return all installable styles. if false, function will return only styles that can be installed
+ * @return array List of styles
*/
- function details($mode, $style_id)
+ protected function find_available($all)
{
- global $template, $db, $config, $user, $safe_mode, $cache, $phpbb_root_path;
-
- $update = (isset($_POST['update'])) ? true : false;
- $l_type = strtoupper($mode);
-
- $error = array();
- $element_ary = array('template' => STYLES_TEMPLATE_TABLE, 'theme' => STYLES_THEME_TABLE, 'imageset' => STYLES_IMAGESET_TABLE);
-
- switch ($mode)
- {
- case 'style':
- $sql_from = STYLES_TABLE;
- break;
-
- case 'template':
- $sql_from = STYLES_TEMPLATE_TABLE;
- break;
-
- case 'theme':
- $sql_from = STYLES_THEME_TABLE;
- break;
-
- case 'imageset':
- $sql_from = STYLES_IMAGESET_TABLE;
- break;
- }
-
- $sql = "SELECT *
- FROM $sql_from
- WHERE {$mode}_id = $style_id";
- $result = $db->sql_query($sql);
- $style_row = $db->sql_fetchrow($result);
- $db->sql_freeresult($result);
-
- if (!$style_row)
- {
- trigger_error($user->lang['NO_' . $l_type] . adm_back_link($this->u_action), E_USER_WARNING);
+ // Get list of installed styles
+ $installed = $this->get_styles();
+
+ $installed_dirs = array();
+ $installed_names = array();
+ foreach ($installed as $style)
+ {
+ $installed_dirs[] = $style['style_path'];
+ $installed_names[$style['style_name']] = array(
+ 'path' => $style['style_path'],
+ 'id' => $style['style_id'],
+ 'parent' => $style['style_parent_id'],
+ 'tree' => (strlen($style['style_parent_tree']) ? $style['style_parent_tree'] . '/' : '') . $style['style_path'],
+ );
}
- $style_row['style_default'] = ($mode == 'style' && $config['default_style'] == $style_id) ? 1 : 0;
+ // Get list of directories
+ $dirs = $this->find_style_dirs();
- if ($update)
+ // Find styles that can be installed
+ $styles = array();
+ foreach ($dirs as $dir)
{
- $name = utf8_normalize_nfc(request_var('name', '', true));
- $copyright = utf8_normalize_nfc(request_var('copyright', '', true));
-
- $template_id = request_var('template_id', 0);
- $theme_id = request_var('theme_id', 0);
- $imageset_id = request_var('imageset_id', 0);
-
- $style_active = request_var('style_active', 0);
- $style_default = request_var('style_default', 0);
- $store_db = request_var('store_db', 0);
-
- // If the admin selected the style to be the default style, but forgot to activate it... we will do it for him
- if ($style_default)
- {
- $style_active = 1;
- }
-
- $sql = "SELECT {$mode}_id, {$mode}_name
- FROM $sql_from
- WHERE {$mode}_id <> $style_id
- AND LOWER({$mode}_name) = '" . $db->sql_escape(strtolower($name)) . "'";
- $result = $db->sql_query($sql);
- $conflict = $db->sql_fetchrow($result);
- $db->sql_freeresult($result);
-
- if ($mode == 'style' && (!$template_id || !$theme_id || !$imageset_id))
- {
- $error[] = $user->lang['STYLE_ERR_NO_IDS'];
- }
-
- if ($mode == 'style' && $style_row['style_active'] && !$style_active && $config['default_style'] == $style_id)
+ if (in_array($dir, $installed_dirs))
{
- $error[] = $user->lang['DEACTIVATE_DEFAULT'];
- }
-
- if (!$name || $conflict)
- {
- $error[] = $user->lang[$l_type . '_ERR_STYLE_NAME'];
- }
-
- if ($mode === 'theme' || $mode === 'template')
- {
- // a rather elaborate check we have to do here once to avoid trouble later
- $check = "{$phpbb_root_path}styles/" . $style_row["{$mode}_path"] . (($mode === 'theme') ? '/theme/stylesheet.css' : '/template');
- if (($style_row["{$mode}_storedb"] != $store_db) && !$store_db && ($safe_mode || !phpbb_is_writable($check)))
- {
- $error[] = $user->lang['EDIT_' . strtoupper($mode) . '_STORED_DB'];
- $store_db = 1;
- }
-
- // themes which have to be parsed have to go into db
- if ($mode == 'theme')
- {
- $cfg = parse_cfg_file("{$phpbb_root_path}styles/" . $style_row["{$mode}_path"] . "/theme/theme.cfg");
-
- if (isset($cfg['parse_css_file']) && $cfg['parse_css_file'] && !$store_db)
- {
- $error[] = $user->lang['EDIT_THEME_STORE_PARSED'];
- $store_db = 1;
- }
- }
+ // Style is already installed
+ continue;
}
-
- if (!sizeof($error))
+ $cfg = $this->read_style_cfg($dir);
+ if ($cfg === false)
{
- // Check length settings
- if (utf8_strlen($name) > 30)
- {
- $error[] = $user->lang[$l_type . '_ERR_NAME_LONG'];
- }
-
- if (utf8_strlen($copyright) > 60)
- {
- $error[] = $user->lang[$l_type . '_ERR_COPY_LONG'];
- }
+ // Invalid style.cfg
+ continue;
}
- }
- if ($update && sizeof($error))
- {
- $style_row = array_merge($style_row, array(
- 'template_id' => $template_id,
- 'theme_id' => $theme_id,
- 'imageset_id' => $imageset_id,
- 'style_active' => $style_active,
- $mode . '_storedb' => $store_db,
- $mode . '_name' => $name,
- $mode . '_copyright' => $copyright)
+ // Style should be available for installation
+ $parent = $cfg['parent'];
+ $style = array(
+ 'style_id' => 0,
+ 'style_name' => $cfg['name'],
+ 'style_copyright' => $cfg['copyright'],
+ 'style_active' => 0,
+ 'style_path' => $dir,
+ 'bbcode_bitfield' => $cfg['template_bitfield'],
+ 'style_parent_id' => 0,
+ 'style_parent_tree' => '',
+ // Extra values for styles list
+ // All extra variable start with _ so they won't be confused with data that can be added to styles table
+ '_inherit_name' => $parent,
+ '_available' => true,
+ '_note' => '',
);
- }
-
- // User has submitted form and no errors have occurred
- if ($update && !sizeof($error))
- {
- $sql_ary = array(
- $mode . '_name' => $name,
- $mode . '_copyright' => $copyright
- );
-
- switch ($mode)
- {
- case 'style':
-
- $sql_ary += array(
- 'template_id' => (int) $template_id,
- 'theme_id' => (int) $theme_id,
- 'imageset_id' => (int) $imageset_id,
- 'style_active' => (int) $style_active,
- );
- break;
-
- case 'imageset':
- break;
-
- case 'theme':
-
- if ($style_row['theme_storedb'] != $store_db)
- {
- $theme_data = '';
-
- if (!$style_row['theme_storedb'])
- {
- $theme_data = $this->db_theme_data($style_row);
- }
- else if (!$store_db && !$safe_mode && phpbb_is_writable("{$phpbb_root_path}styles/{$style_row['theme_path']}/theme/stylesheet.css"))
- {
- $store_db = 1;
- $theme_data = $style_row['theme_data'];
-
- if ($fp = @fopen("{$phpbb_root_path}styles/{$style_row['theme_path']}/theme/stylesheet.css", 'wb'))
- {
- $store_db = (@fwrite($fp, str_replace("styles/{$style_row['theme_path']}/theme/", './', $theme_data))) ? 0 : 1;
- }
- fclose($fp);
- }
-
- $sql_ary += array(
- 'theme_mtime' => ($store_db) ? filemtime("{$phpbb_root_path}styles/{$style_row['theme_path']}/theme/stylesheet.css") : 0,
- 'theme_storedb' => $store_db,
- 'theme_data' => ($store_db) ? $theme_data : '',
- );
- }
- break;
-
- case 'template':
-
- if ($style_row['template_storedb'] != $store_db)
- {
- if ($super = $this->get_super($mode, $style_row['template_id']))
- {
- $error[] = (sprintf($user->lang["{$l_type}_INHERITS"], $super['template_name']));
- $sql_ary = array();
- }
- else
- {
- if (!$store_db && !$safe_mode && phpbb_is_writable("{$phpbb_root_path}styles/{$style_row['template_path']}/template"))
- {
- $err = $this->store_in_fs('template', $style_row['template_id']);
- if ($err)
- {
- $error += $err;
- }
- }
- else if ($store_db)
- {
- $this->store_in_db('template', $style_row['template_id']);
- }
- else
- {
- // We no longer store within the db, but are also not able to update the file structure
- // Since the admin want to switch this, we adhere to his decision. But we also need to remove the cache
- $sql = 'DELETE FROM ' . STYLES_TEMPLATE_DATA_TABLE . "
- WHERE template_id = $style_id";
- $db->sql_query($sql);
- }
-
- $sql_ary += array(
- 'template_storedb' => $store_db,
- );
- }
- }
- break;
- }
- if (sizeof($sql_ary))
+ // Check style inheritance
+ if ($parent != '')
{
- $sql = "UPDATE $sql_from
- SET " . $db->sql_build_array('UPDATE', $sql_ary) . "
- WHERE {$mode}_id = $style_id";
- $db->sql_query($sql);
-
- // Making this the default style?
- if ($mode == 'style' && $style_default)
+ if (isset($installed_names[$parent]))
{
- set_config('default_style', $style_id);
+ // Parent style is installed
+ $row = $installed_names[$parent];
+ $style['style_parent_id'] = $row['id'];
+ $style['style_parent_tree'] = $row['tree'];
}
- }
-
- $cache->destroy('sql', STYLES_TABLE);
-
- add_log('admin', 'LOG_' . $l_type . '_EDIT_DETAILS', $name);
- if (sizeof($error))
- {
- trigger_error(implode('<br />', $error) . adm_back_link($this->u_action), E_USER_WARNING);
- }
- else
- {
- trigger_error($user->lang[$l_type . '_DETAILS_UPDATED'] . adm_back_link($this->u_action));
- }
- }
-
- if ($mode == 'style')
- {
- foreach ($element_ary as $element => $table)
- {
- $sql = "SELECT {$element}_id, {$element}_name
- FROM $table
- ORDER BY {$element}_id ASC";
- $result = $db->sql_query($sql);
-
- ${$element . '_options'} = '';
- while ($row = $db->sql_fetchrow($result))
+ else
{
- $selected = ($row[$element . '_id'] == $style_row[$element . '_id']) ? ' selected="selected"' : '';
- ${$element . '_options'} .= '<option value="' . $row[$element . '_id'] . '"' . $selected . '>' . $row[$element . '_name'] . '</option>';
+ // Parent style is not installed yet
+ $style['_available'] = false;
+ $style['_note'] = sprintf($this->user->lang['REQUIRES_STYLE'], htmlspecialchars($parent));
}
- $db->sql_freeresult($result);
}
- }
- if ($mode == 'template')
- {
- $super = array();
- if (isset($style_row[$mode . '_inherits_id']) && $style_row['template_inherits_id'])
+ if ($all || $style['_available'])
{
- $super = $this->get_super($mode, $style_row['template_id']);
+ $styles[] = $style;
}
}
- $this->page_title = 'EDIT_DETAILS_' . $l_type;
-
- $template->assign_vars(array(
- 'S_DETAILS' => true,
- 'S_ERROR_MSG' => (sizeof($error)) ? true : false,
- 'S_STYLE' => ($mode == 'style') ? true : false,
- 'S_TEMPLATE' => ($mode == 'template') ? true : false,
- 'S_THEME' => ($mode == 'theme') ? true : false,
- 'S_IMAGESET' => ($mode == 'imageset') ? true : false,
- 'S_STORE_DB' => (isset($style_row[$mode . '_storedb'])) ? $style_row[$mode . '_storedb'] : 0,
- 'S_STORE_DB_DISABLED' => (isset($style_row[$mode . '_inherits_id'])) ? $style_row[$mode . '_inherits_id'] : 0,
- 'S_STYLE_ACTIVE' => (isset($style_row['style_active'])) ? $style_row['style_active'] : 0,
- 'S_STYLE_DEFAULT' => (isset($style_row['style_default'])) ? $style_row['style_default'] : 0,
- 'S_SUPERTEMPLATE' => (isset($style_row[$mode . '_inherits_id']) && $style_row[$mode . '_inherits_id']) ? $super['template_name'] : 0,
-
- 'S_TEMPLATE_OPTIONS' => ($mode == 'style') ? $template_options : '',
- 'S_THEME_OPTIONS' => ($mode == 'style') ? $theme_options : '',
- 'S_IMAGESET_OPTIONS' => ($mode == 'style') ? $imageset_options : '',
-
- 'U_ACTION' => $this->u_action . '&amp;action=details&amp;id=' . $style_id,
- 'U_BACK' => $this->u_action,
-
- 'L_TITLE' => $user->lang[$this->page_title],
- 'L_EXPLAIN' => $user->lang[$this->page_title . '_EXPLAIN'],
- 'L_NAME' => $user->lang[$l_type . '_NAME'],
- 'L_LOCATION' => ($mode == 'template' || $mode == 'theme') ? $user->lang[$l_type . '_LOCATION'] : '',
- 'L_LOCATION_EXPLAIN' => ($mode == 'template' || $mode == 'theme') ? $user->lang[$l_type . '_LOCATION_EXPLAIN'] : '',
-
- 'ERROR_MSG' => (sizeof($error)) ? implode('<br />', $error) : '',
- 'NAME' => $style_row[$mode . '_name'],
- 'COPYRIGHT' => $style_row[$mode . '_copyright'],
- )
- );
+ return $styles;
}
/**
- * Load css file contents
+ * Show styles list
+ *
+ * @param array $styles styles list
+ * @param int $parent parent style id
+ * @param int $level style inheritance level
*/
- function load_css_file($path, $filename)
+ protected function show_styles_list(&$styles, $parent, $level)
{
- global $phpbb_root_path;
-
- $file = "{$phpbb_root_path}styles/$path/theme/$filename";
-
- if (file_exists($file) && ($content = file_get_contents($file)))
- {
- $content = trim($content);
- }
- else
- {
- $content = '';
- }
- if (defined('DEBUG'))
+ foreach ($styles as &$style)
{
- $content = "/* BEGIN @include $filename */ \n $content \n /* END @include $filename */ \n";
+ if (empty($style['_shown']) && $style['style_parent_id'] == $parent)
+ {
+ $this->list_style($style, $level);
+ $this->show_styles_list($styles, $style['style_id'], $level + 1);
+ }
}
-
- return $content;
}
/**
- * Returns a string containing the value that should be used for the theme_data column in the theme database table.
- * Includes contents of files loaded via @import
- *
- * @param array $theme_row is an associative array containing the theme's current database entry
- * @param mixed $stylesheet can either be the new content for the stylesheet or false to load from the standard file
- * @param string $root_path should only be used in case you want to use a different root path than "{$phpbb_root_path}styles/{$theme_row['theme_path']}"
+ * Show available styles tree
*
- * @return string Stylesheet data for theme_data column in the theme table
+ * @param array $styles Styles list, passed as reference
+ * @param string $name Name of parent style
+ * @param string $level Styles tree level
*/
- function db_theme_data($theme_row, $stylesheet = false, $root_path = '')
+ protected function show_available_child_styles(&$styles, $name, $level)
{
- global $phpbb_root_path;
-
- if (!$root_path)
- {
- $root_path = $phpbb_root_path . 'styles/' . $theme_row['theme_path'];
- }
-
- if (!$stylesheet)
- {
- $stylesheet = '';
- if (file_exists($root_path . '/theme/stylesheet.css'))
- {
- $stylesheet = file_get_contents($root_path . '/theme/stylesheet.css');
- }
- }
-
- // Match CSS imports
- $matches = array();
- preg_match_all('/@import url\((["\'])(.*)\1\);/i', $stylesheet, $matches);
-
- // remove commented stylesheets (very simple parser, allows only whitespace
- // around an @import statement)
- preg_match_all('#/\*\s*@import url\((["\'])(.*)\1\);\s\*/#i', $stylesheet, $commented);
- $matches[2] = array_diff($matches[2], $commented[2]);
-
- if (sizeof($matches))
+ foreach ($styles as &$style)
{
- foreach ($matches[0] as $idx => $match)
+ if (empty($style['_shown']) && $style['_inherit_name'] == $name)
{
- if (isset($matches[2][$idx]))
- {
- $stylesheet = str_replace($match, acp_styles::load_css_file($theme_row['theme_path'], $matches[2][$idx]), $stylesheet);
- }
+ $this->list_style($style, $level);
+ $this->show_available_child_styles($styles, $style['style_name'], $level + 1);
}
}
-
- // adjust paths
- return str_replace('./', 'styles/' . $theme_row['theme_path'] . '/theme/', $stylesheet);
}
/**
- * Store template files into db
+ * Update styles tree
+ *
+ * @param array $styles Styles list, passed as reference
+ * @param array $style Current style, false if root
+ * @return bool True if something was updated, false if not
*/
- function store_templates($mode, $style_id, $template_path, $filelist)
+ protected function update_styles_tree(&$styles, $style = false)
{
- global $phpbb_root_path, $phpEx, $db;
-
- $template_path = $template_path . '/template/';
- $includes = array();
- foreach ($filelist as $pathfile => $file_ary)
+ $parent_id = ($style === false) ? 0 : $style['style_id'];
+ $parent_tree = ($style === false) ? '' : ($style['style_parent_tree'] == '' ? '' : $style['style_parent_tree']) . $style['style_path'];
+ $update = false;
+ $updated = false;
+ foreach ($styles as &$row)
{
- foreach ($file_ary as $file)
+ if ($row['style_parent_id'] == $parent_id)
{
- if (!($fp = @fopen("{$phpbb_root_path}styles/$template_path$pathfile$file", 'r')))
+ if ($row['style_parent_tree'] != $parent_tree)
{
- trigger_error("Could not open {$phpbb_root_path}styles/$template_path$pathfile$file", E_USER_ERROR);
- }
-
- $filesize = filesize("{$phpbb_root_path}styles/$template_path$pathfile$file");
-
- if ($filesize)
- {
- $template_data = fread($fp, $filesize);
- }
-
- fclose($fp);
-
- if (!$filesize)
- {
- // File is empty
- continue;
- }
-
- if (preg_match_all('#<!-- INCLUDE (.*?\.html) -->#is', $template_data, $matches))
- {
- foreach ($matches[1] as $match)
- {
- $includes[trim($match)][] = $file;
- }
+ $row['style_parent_tree'] = $parent_tree;
+ $update = true;
}
+ $updated |= $this->update_styles_tree($styles, $row);
}
}
-
- foreach ($filelist as $pathfile => $file_ary)
+ if ($update)
{
- foreach ($file_ary as $file)
- {
- // Skip index.
- if (strpos($file, 'index.') === 0)
- {
- continue;
- }
-
- // We could do this using extended inserts ... but that could be one
- // heck of a lot of data ...
- $sql_ary = array(
- 'template_id' => (int) $style_id,
- 'template_filename' => "$pathfile$file",
- 'template_included' => (isset($includes[$file])) ? implode(':', $includes[$file]) . ':' : '',
- 'template_mtime' => (int) filemtime("{$phpbb_root_path}styles/$template_path$pathfile$file"),
- 'template_data' => (string) file_get_contents("{$phpbb_root_path}styles/$template_path$pathfile$file"),
- );
-
- if ($mode == 'insert')
- {
- $sql = 'INSERT INTO ' . STYLES_TEMPLATE_DATA_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary);
- }
- else
- {
- $sql = 'UPDATE ' . STYLES_TEMPLATE_DATA_TABLE . ' SET ' . $db->sql_build_array('UPDATE', $sql_ary) . "
- WHERE template_id = $style_id
- AND template_filename = '" . $db->sql_escape("$pathfile$file") . "'";
- }
- $db->sql_query($sql);
- }
+ $sql = 'UPDATE ' . STYLES_TABLE . "
+ SET style_parent_tree = '" . $this->db->sql_escape($parent_tree) . "'
+ WHERE style_parent_id = {$parent_id}";
+ $this->db->sql_query($sql);
+ $updated = true;
}
+ return $updated;
}
/**
- * Returns an array containing all template filenames for one template that are currently cached.
+ * Find all possible parent styles for style
*
- * @param string $template_path contains the name of the template's folder in /styles/
- *
- * @return array of filenames that exist in /styles/$template_path/template/ (without extension!)
+ * @param array $styles list of styles
+ * @param int $id id of style
+ * @param int $parent current parent style id
+ * @param int $level current tree level
+ * @return array Style ids, names and levels
*/
- function template_cache_filelist($template_path)
+ protected function find_possible_parents($styles, $id = -1, $parent = 0, $level = 0)
{
- global $phpbb_root_path, $phpEx, $user;
-
- $cache_prefix = 'tpl_' . str_replace('_', '-', $template_path);
-
- if (!($dp = @opendir("{$phpbb_root_path}cache")))
- {
- trigger_error($user->lang['TEMPLATE_ERR_CACHE_READ'] . adm_back_link($this->u_action), E_USER_WARNING);
- }
-
- $file_ary = array();
- while ($file = readdir($dp))
- {
- if ($file[0] == '.')
- {
- continue;
- }
-
- if (is_file($phpbb_root_path . 'cache/' . $file) && (strpos($file, $cache_prefix) === 0))
- {
- $file_ary[] = str_replace('.', '/', preg_replace('#^' . preg_quote($cache_prefix, '#') . '_(.*?)\.html\.' . $phpEx . '$#i', '\1', $file));
+ $results = array();
+ foreach ($styles as $style)
+ {
+ if ($style['style_id'] != $id && $style['style_parent_id'] == $parent)
+ {
+ $results[] = array(
+ 'style_id' => $style['style_id'],
+ 'style_name' => $style['style_name'],
+ 'style_path' => $style['style_path'],
+ 'style_parent_id' => $style['style_parent_id'],
+ 'style_parent_tree' => $style['style_parent_tree'],
+ 'level' => $level
+ );
+ $results = array_merge($results, $this->find_possible_parents($styles, $id, $style['style_id'], $level + 1));
}
}
- closedir($dp);
-
- return $file_ary;
+ return $results;
}
/**
- * Destroys cached versions of template files
+ * Show item in styles list
*
- * @param array $template_row contains the template's row in the STYLES_TEMPLATE_TABLE database table
- * @param mixed $file_ary is optional and may contain an array of template file names which should be refreshed in the cache.
- * The file names should be the original template file names and not the cache file names.
+ * @param array $style style row
+ * @param array $level style inheritance level
*/
- function clear_template_cache($template_row, $file_ary = false)
+ protected function list_style(&$style, $level)
{
- global $phpbb_root_path, $phpEx, $user;
-
- $cache_prefix = 'tpl_' . str_replace('_', '-', $template_row['template_path']);
-
- if (!$file_ary || !is_array($file_ary))
- {
- $file_ary = $this->template_cache_filelist($template_row['template_path']);
- $log_file_list = $user->lang['ALL_FILES'];
- }
- else
- {
- $log_file_list = implode(', ', $file_ary);
- }
-
- foreach ($file_ary as $file)
+ // Mark row as shown
+ if (!empty($style['_shown']))
{
- $file = str_replace('/', '.', $file);
-
- $file = "{$phpbb_root_path}cache/{$cache_prefix}_$file.html.$phpEx";
- if (file_exists($file) && is_file($file))
- {
- @unlink($file);
- }
+ return;
}
- unset($file_ary);
-
- add_log('admin', 'LOG_TEMPLATE_CACHE_CLEARED', $template_row['template_name'], $log_file_list);
- }
-
- /**
- * Install Style/Template/Theme/Imageset
- */
- function install($mode)
- {
- global $phpbb_root_path, $phpEx, $config, $db, $cache, $user, $template;
- $l_type = strtoupper($mode);
-
- $error = $installcfg = $style_row = array();
- $root_path = $cfg_file = '';
- $element_ary = array('template' => STYLES_TEMPLATE_TABLE, 'theme' => STYLES_THEME_TABLE, 'imageset' => STYLES_IMAGESET_TABLE);
-
- $install_path = request_var('path', '');
- $update = (isset($_POST['update'])) ? true : false;
+ $style['_shown'] = true;
+
+ // Generate template variables
+ $actions = array();
+ $row = array(
+ // Style data
+ 'STYLE_ID' => $style['style_id'],
+ 'STYLE_NAME' => htmlspecialchars($style['style_name']),
+ 'STYLE_PATH' => htmlspecialchars($style['style_path']),
+ 'STYLE_COPYRIGHT' => strip_tags($style['style_copyright']),
+ 'STYLE_ACTIVE' => $style['style_active'],
+
+ // Additional data
+ 'DEFAULT' => ($style['style_id'] && $style['style_id'] == $this->default_style),
+ 'USERS' => (isset($style['_users'])) ? $style['_users'] : '',
+ 'LEVEL' => $level,
+ 'PADDING' => (4 + 16 * $level),
+ 'SHOW_COPYRIGHT' => ($style['style_id']) ? false : true,
+ 'STYLE_PATH_FULL' => htmlspecialchars($this->styles_path_absolute . '/' . $style['style_path']) . '/',
+
+ // Comment to show below style
+ 'COMMENT' => (isset($style['_note'])) ? $style['_note'] : '',
+
+ // The following variables should be used by hooks to add custom HTML code
+ 'EXTRA' => '',
+ 'EXTRA_OPTIONS' => ''
+ );
- // Installing, obtain cfg file contents
- if ($install_path)
+ // Status specific data
+ if ($style['style_id'])
{
- $root_path = $phpbb_root_path . 'styles/' . $install_path . '/';
- $cfg_file = ($mode == 'style') ? "$root_path$mode.cfg" : "$root_path$mode/$mode.cfg";
-
- if (!file_exists($cfg_file))
- {
- $error[] = $user->lang[$l_type . '_ERR_NOT_' . $l_type];
- }
- else
- {
- $installcfg = parse_cfg_file($cfg_file);
- }
- }
+ // Style is installed
- // Installing
- if (sizeof($installcfg))
- {
- $name = $installcfg['name'];
- $copyright = $installcfg['copyright'];
- $version = $installcfg['version'];
-
- $style_row = array(
- $mode . '_id' => 0,
- $mode . '_name' => '',
- $mode . '_copyright' => ''
+ // Details
+ $actions[] = array(
+ 'U_ACTION' => $this->u_action . '&amp;action=details&amp;id=' . $style['style_id'],
+ 'L_ACTION' => $this->user->lang['DETAILS']
);
- switch ($mode)
- {
- case 'style':
-
- $style_row = array(
- 'style_id' => 0,
- 'style_name' => $installcfg['name'],
- 'style_copyright' => $installcfg['copyright']
- );
-
- $reqd_template = (isset($installcfg['required_template'])) ? $installcfg['required_template'] : false;
- $reqd_theme = (isset($installcfg['required_theme'])) ? $installcfg['required_theme'] : false;
- $reqd_imageset = (isset($installcfg['required_imageset'])) ? $installcfg['required_imageset'] : false;
-
- // Check to see if each element is already installed, if it is grab the id
- foreach ($element_ary as $element => $table)
- {
- $style_row = array_merge($style_row, array(
- $element . '_id' => 0,
- $element . '_name' => '',
- $element . '_copyright' => '')
- );
-
- $this->test_installed($element, $error, (${'reqd_' . $element}) ? $phpbb_root_path . 'styles/' . $reqd_template . '/' : $root_path, ${'reqd_' . $element}, $style_row[$element . '_id'], $style_row[$element . '_name'], $style_row[$element . '_copyright']);
-
- if (!$style_row[$element . '_name'])
- {
- $style_row[$element . '_name'] = $reqd_template;
- }
+ // Activate/Deactive
+ $action_name = ($style['style_active'] ? 'de' : '') . 'activate';
- // Merge other information to installcfg... if present
- $cfg_file = $phpbb_root_path . 'styles/' . $install_path . '/' . $element . '/' . $element . '.cfg';
-
- if (file_exists($cfg_file))
- {
- $cfg_contents = parse_cfg_file($cfg_file);
-
- // Merge only specific things. We may need them later.
- foreach (array('inherit_from', 'parse_css_file') as $key)
- {
- if (!empty($cfg_contents[$key]) && !isset($installcfg[$key]))
- {
- $installcfg[$key] = $cfg_contents[$key];
- }
- }
- }
- }
-
- break;
+ $actions[] = array(
+ 'U_ACTION' => $this->u_action . '&amp;action=' . $action_name . '&amp;hash=' . generate_link_hash($action_name) . '&amp;id=' . $style['style_id'],
+ 'L_ACTION' => $this->user->lang['STYLE_' . ($style['style_active'] ? 'DE' : '') . 'ACTIVATE']
+ );
- case 'template':
- $this->test_installed('template', $error, $root_path, false, $style_row['template_id'], $style_row['template_name'], $style_row['template_copyright']);
- break;
+/* // Export
+ $actions[] = array(
+ 'U_ACTION' => $this->u_action . '&amp;action=export&amp;hash=' . generate_link_hash('export') . '&amp;id=' . $style['style_id'],
+ 'L_ACTION' => $this->user->lang['EXPORT']
+ ); */
- case 'theme':
- $this->test_installed('theme', $error, $root_path, false, $style_row['theme_id'], $style_row['theme_name'], $style_row['theme_copyright']);
- break;
+ // Uninstall
+ $actions[] = array(
+ 'U_ACTION' => $this->u_action . '&amp;action=uninstall&amp;hash=' . generate_link_hash('uninstall') . '&amp;id=' . $style['style_id'],
+ 'L_ACTION' => $this->user->lang['STYLE_UNINSTALL']
+ );
- case 'imageset':
- $this->test_installed('imageset', $error, $root_path, false, $style_row['imageset_id'], $style_row['imageset_name'], $style_row['imageset_copyright']);
- break;
- }
+ // Preview
+ $actions[] = array(
+ 'U_ACTION' => append_sid($this->phpbb_root_path . 'index.' . $this->php_ext, 'style=' . $style['style_id']),
+ 'L_ACTION' => $this->user->lang['PREVIEW']
+ );
}
else
{
- trigger_error($user->lang['NO_' . $l_type] . adm_back_link($this->u_action), E_USER_WARNING);
- }
-
- $style_row['store_db'] = request_var('store_db', 0);
- $style_row['style_active'] = request_var('style_active', 1);
- $style_row['style_default'] = request_var('style_default', 0);
-
- // User has submitted form and no errors have occurred
- if ($update && !sizeof($error))
- {
- if ($mode == 'style')
+ // Style is not installed
+ if (empty($style['_available']))
{
- foreach ($element_ary as $element => $table)
- {
- ${$element . '_root_path'} = (${'reqd_' . $element}) ? $phpbb_root_path . 'styles/' . ${'reqd_' . $element} . '/' : false;
- ${$element . '_path'} = (${'reqd_' . $element}) ? ${'reqd_' . $element} : false;
- }
- $this->install_style($error, 'install', $root_path, $style_row['style_id'], $style_row['style_name'], $install_path, $style_row['style_copyright'], $style_row['style_active'], $style_row['style_default'], $style_row, $template_root_path, $template_path, $theme_root_path, $theme_path, $imageset_root_path, $imageset_path);
+ $actions[] = array(
+ 'HTML' => $this->user->lang['CANNOT_BE_INSTALLED']
+ );
}
else
{
- $style_row['store_db'] = $this->install_element($mode, $error, 'install', $root_path, $style_row[$mode . '_id'], $style_row[$mode . '_name'], $install_path, $style_row[$mode . '_copyright'], $style_row['store_db']);
+ $actions[] = array(
+ 'U_ACTION' => $this->u_action . '&amp;action=install&amp;hash=' . generate_link_hash('install') . '&amp;dir=' . urlencode($style['style_path']),
+ 'L_ACTION' => $this->user->lang['INSTALL_STYLE']
+ );
}
+ }
- if (!sizeof($error))
- {
- $cache->destroy('sql', STYLES_TABLE);
+ // todo: add hook
- $message = ($style_row['store_db']) ? '_ADDED_DB' : '_ADDED';
- trigger_error($user->lang[$l_type . $message] . adm_back_link($this->u_action));
- }
+ // Assign template variables
+ $this->template->assign_block_vars('styles_list', $row);
+ foreach($actions as $action)
+ {
+ $this->template->assign_block_vars('styles_list.actions', $action);
}
- $this->page_title = 'INSTALL_' . $l_type;
-
- $template->assign_vars(array(
- 'S_DETAILS' => true,
- 'S_INSTALL' => true,
- 'S_ERROR_MSG' => (sizeof($error)) ? true : false,
- 'S_LOCATION' => (isset($installcfg['inherit_from']) && $installcfg['inherit_from']) ? false : true,
- 'S_STYLE' => ($mode == 'style') ? true : false,
- 'S_TEMPLATE' => ($mode == 'template') ? true : false,
- 'S_SUPERTEMPLATE' => (isset($installcfg['inherit_from'])) ? $installcfg['inherit_from'] : '',
- 'S_THEME' => ($mode == 'theme') ? true : false,
-
- 'S_STORE_DB' => (isset($style_row[$mode . '_storedb'])) ? $style_row[$mode . '_storedb'] : 0,
- 'S_STYLE_ACTIVE' => (isset($style_row['style_active'])) ? $style_row['style_active'] : 0,
- 'S_STYLE_DEFAULT' => (isset($style_row['style_default'])) ? $style_row['style_default'] : 0,
-
- 'U_ACTION' => $this->u_action . "&amp;action=install&amp;path=" . urlencode($install_path),
- 'U_BACK' => $this->u_action,
-
- 'L_TITLE' => $user->lang[$this->page_title],
- 'L_EXPLAIN' => $user->lang[$this->page_title . '_EXPLAIN'],
- 'L_NAME' => $user->lang[$l_type . '_NAME'],
- 'L_LOCATION' => ($mode == 'template' || $mode == 'theme') ? $user->lang[$l_type . '_LOCATION'] : '',
- 'L_LOCATION_EXPLAIN' => ($mode == 'template' || $mode == 'theme') ? $user->lang[$l_type . '_LOCATION_EXPLAIN'] : '',
-
- 'ERROR_MSG' => (sizeof($error)) ? implode('<br />', $error) : '',
- 'NAME' => $style_row[$mode . '_name'],
- 'COPYRIGHT' => $style_row[$mode . '_copyright'],
- 'TEMPLATE_NAME' => ($mode == 'style') ? $style_row['template_name'] : '',
- 'THEME_NAME' => ($mode == 'style') ? $style_row['theme_name'] : '',
- 'IMAGESET_NAME' => ($mode == 'style') ? $style_row['imageset_name'] : '')
- );
+ // Increase counters
+ $counter = ($style['style_id']) ? ($style['style_active'] ? 'active' : 'inactive') : (empty($style['_available']) ? 'cannotinstall' : 'caninstall');
+ if (!isset($this->style_counters))
+ {
+ $this->style_counters = array(
+ 'total' => 0,
+ 'active' => 0,
+ 'inactive' => 0,
+ 'caninstall' => 0,
+ 'cannotinstall' => 0
+ );
+ }
+ $this->style_counters[$counter]++;
+ $this->style_counters['total']++;
}
/**
- * Add new style
+ * Show welcome message
+ *
+ * @param string $title main title
+ * @param string $description page description
*/
- function add($mode)
+ protected function welcome_message($title, $description)
{
- global $phpbb_root_path, $phpEx, $config, $db, $cache, $user, $template;
-
- $l_type = strtoupper($mode);
- $element_ary = array('template' => STYLES_TEMPLATE_TABLE, 'theme' => STYLES_THEME_TABLE, 'imageset' => STYLES_IMAGESET_TABLE);
- $error = array();
-
- $style_row = array(
- $mode . '_name' => utf8_normalize_nfc(request_var('name', '', true)),
- $mode . '_copyright' => utf8_normalize_nfc(request_var('copyright', '', true)),
- 'template_id' => 0,
- 'theme_id' => 0,
- 'imageset_id' => 0,
- 'store_db' => request_var('store_db', 0),
- 'style_active' => request_var('style_active', 1),
- 'style_default' => request_var('style_default', 0),
+ $this->template->assign_vars(array(
+ 'L_TITLE' => $this->user->lang[$title],
+ 'L_EXPLAIN' => (isset($this->user->lang[$description])) ? $this->user->lang[$description] : ''
+ )
);
+ }
- $basis = request_var('basis', 0);
- $update = (isset($_POST['update'])) ? true : false;
-
- if ($basis)
- {
- switch ($mode)
- {
- case 'style':
- $sql_select = 'template_id, theme_id, imageset_id';
- $sql_from = STYLES_TABLE;
- break;
-
- case 'template':
- $sql_select = 'template_id';
- $sql_from = STYLES_TEMPLATE_TABLE;
- break;
-
- case 'theme':
- $sql_select = 'theme_id';
- $sql_from = STYLES_THEME_TABLE;
- break;
-
- case 'imageset':
- $sql_select = 'imageset_id';
- $sql_from = STYLES_IMAGESET_TABLE;
- break;
- }
-
- $sql = "SELECT $sql_select
- FROM $sql_from
- WHERE {$mode}_id = $basis";
- $result = $db->sql_query($sql);
- $row = $db->sql_fetchrow($result);
- $db->sql_freeresult($result);
-
- if (!$row)
- {
- $error[] = $user->lang['NO_' . $l_type];
- }
-
- if (!sizeof($error))
- {
- $style_row['template_id'] = (isset($row['template_id'])) ? $row['template_id'] : $style_row['template_id'];
- $style_row['theme_id'] = (isset($row['theme_id'])) ? $row['theme_id'] : $style_row['theme_id'];
- $style_row['imageset_id'] = (isset($row['imageset_id'])) ? $row['imageset_id'] : $style_row['imageset_id'];
- }
- }
-
- if ($update)
- {
- $style_row['template_id'] = request_var('template_id', $style_row['template_id']);
- $style_row['theme_id'] = request_var('theme_id', $style_row['theme_id']);
- $style_row['imageset_id'] = request_var('imageset_id', $style_row['imageset_id']);
-
- if ($mode == 'style' && (!$style_row['template_id'] || !$style_row['theme_id'] || !$style_row['imageset_id']))
- {
- $error[] = $user->lang['STYLE_ERR_NO_IDS'];
- }
- }
-
- // User has submitted form and no errors have occurred
- if ($update && !sizeof($error))
- {
- if ($mode == 'style')
- {
- $style_row['style_id'] = 0;
-
- $this->install_style($error, 'add', '', $style_row['style_id'], $style_row['style_name'], '', $style_row['style_copyright'], $style_row['style_active'], $style_row['style_default'], $style_row);
- }
-
- if (!sizeof($error))
- {
- $cache->destroy('sql', STYLES_TABLE);
-
- $message = ($style_row['store_db']) ? '_ADDED_DB' : '_ADDED';
- trigger_error($user->lang[$l_type . $message] . adm_back_link($this->u_action));
- }
- }
+ /**
+ * Find all directories that have styles
+ *
+ * @return array Directory names
+ */
+ protected function find_style_dirs()
+ {
+ $styles = array();
- if ($mode == 'style')
+ $dp = @opendir($this->styles_path);
+ if ($dp)
{
- foreach ($element_ary as $element => $table)
+ while (($file = readdir($dp)) !== false)
{
- $sql = "SELECT {$element}_id, {$element}_name
- FROM $table
- ORDER BY {$element}_id ASC";
- $result = $db->sql_query($sql);
+ $dir = $this->styles_path . $file;
+ if ($file[0] == '.' || !is_dir($dir))
+ {
+ continue;
+ }
- ${$element . '_options'} = '';
- while ($row = $db->sql_fetchrow($result))
+ if (file_exists("{$dir}/style.cfg"))
{
- $selected = ($row[$element . '_id'] == $style_row[$element . '_id']) ? ' selected="selected"' : '';
- ${$element . '_options'} .= '<option value="' . $row[$element . '_id'] . '"' . $selected . '>' . $row[$element . '_name'] . '</option>';
+ $styles[] = $file;
}
- $db->sql_freeresult($result);
}
+ closedir($dp);
}
- $this->page_title = 'ADD_' . $l_type;
-
- $template->assign_vars(array(
- 'S_DETAILS' => true,
- 'S_ADD' => true,
- 'S_ERROR_MSG' => (sizeof($error)) ? true : false,
- 'S_STYLE' => ($mode == 'style') ? true : false,
- 'S_TEMPLATE' => ($mode == 'template') ? true : false,
- 'S_THEME' => ($mode == 'theme') ? true : false,
- 'S_BASIS' => ($basis) ? true : false,
-
- 'S_STORE_DB' => (isset($style_row['storedb'])) ? $style_row['storedb'] : 0,
- 'S_STYLE_ACTIVE' => (isset($style_row['style_active'])) ? $style_row['style_active'] : 0,
- 'S_STYLE_DEFAULT' => (isset($style_row['style_default'])) ? $style_row['style_default'] : 0,
- 'S_TEMPLATE_OPTIONS' => ($mode == 'style') ? $template_options : '',
- 'S_THEME_OPTIONS' => ($mode == 'style') ? $theme_options : '',
- 'S_IMAGESET_OPTIONS' => ($mode == 'style') ? $imageset_options : '',
-
- 'U_ACTION' => $this->u_action . '&amp;action=add&amp;basis=' . $basis,
- 'U_BACK' => $this->u_action,
-
- 'L_TITLE' => $user->lang[$this->page_title],
- 'L_EXPLAIN' => $user->lang[$this->page_title . '_EXPLAIN'],
- 'L_NAME' => $user->lang[$l_type . '_NAME'],
- 'L_LOCATION' => ($mode == 'template' || $mode == 'theme') ? $user->lang[$l_type . '_LOCATION'] : '',
- 'L_LOCATION_EXPLAIN' => ($mode == 'template' || $mode == 'theme') ? $user->lang[$l_type . '_LOCATION_EXPLAIN'] : '',
-
- 'ERROR_MSG' => (sizeof($error)) ? implode('<br />', $error) : '',
- 'NAME' => $style_row[$mode . '_name'],
- 'COPYRIGHT' => $style_row[$mode . '_copyright'])
- );
-
+ return $styles;
}
/**
-
- $reqd_template = (isset($installcfg['required_template'])) ? $installcfg['required_template'] : false;
- $reqd_theme = (isset($installcfg['required_theme'])) ? $installcfg['required_theme'] : false;
- $reqd_imageset = (isset($installcfg['required_imageset'])) ? $installcfg['required_imageset'] : false;
-
- // Check to see if each element is already installed, if it is grab the id
- foreach ($element_ary as $element => $table)
- {
- $style_row = array_merge($style_row, array(
- $element . '_id' => 0,
- $element . '_name' => '',
- $element . '_copyright' => '')
- );
-
- $this->test_installed($element, $error, $root_path, ${'reqd_' . $element}, $style_row[$element . '_id'], $style_row[$element . '_name'], $style_row[$element . '_copyright']);
- * Is this element installed? If not, grab its cfg details
+ * Sort styles
*/
- function test_installed($element, &$error, $root_path, $reqd_name, &$id, &$name, &$copyright)
+ public function sort_styles($style1, $style2)
{
- global $db, $user;
-
- switch ($element)
+ if ($style1['style_active'] != $style2['style_active'])
{
- case 'template':
- $sql_from = STYLES_TEMPLATE_TABLE;
- break;
-
- case 'theme':
- $sql_from = STYLES_THEME_TABLE;
- break;
-
- case 'imageset':
- $sql_from = STYLES_IMAGESET_TABLE;
- break;
+ return ($style1['style_active']) ? -1 : 1;
}
-
- $l_element = strtoupper($element);
-
- $chk_name = ($reqd_name !== false) ? $reqd_name : $name;
-
- $sql = "SELECT {$element}_id, {$element}_name
- FROM $sql_from
- WHERE {$element}_name = '" . $db->sql_escape($chk_name) . "'";
- $result = $db->sql_query($sql);
-
- if ($row = $db->sql_fetchrow($result))
+ if (isset($style1['_available']) && $style1['_available'] != $style2['_available'])
{
- $name = $row[$element . '_name'];
- $id = $row[$element . '_id'];
- }
- else
- {
- if (!($cfg = @file("$root_path$element/$element.cfg")))
- {
- $error[] = sprintf($user->lang['REQUIRES_' . $l_element], $reqd_name);
- return false;
- }
-
- $cfg = parse_cfg_file("$root_path$element/$element.cfg", $cfg);
-
- $name = $cfg['name'];
- $copyright = $cfg['copyright'];
- $id = 0;
-
- unset($cfg);
+ return ($style1['_available']) ? -1 : 1;
}
- $db->sql_freeresult($result);
+ return strcasecmp(isset($style1['style_name']) ? $style1['style_name'] : $style1['name'], isset($style2['style_name']) ? $style2['style_name'] : $style2['name']);
}
/**
- * Install/Add style
+ * Read style configuration file
+ *
+ * @param string $dir style directory
+ * @return array|bool Style data, false on error
*/
- function install_style(&$error, $action, $root_path, &$id, $name, $path, $copyright, $active, $default, &$style_row, $template_root_path = false, $template_path = false, $theme_root_path = false, $theme_path = false, $imageset_root_path = false, $imageset_path = false)
+ protected function read_style_cfg($dir)
{
- global $config, $db, $user;
-
- $element_ary = array('template', 'theme', 'imageset');
-
- if (!$name)
- {
- $error[] = $user->lang['STYLE_ERR_STYLE_NAME'];
- }
-
- // Check length settings
- if (utf8_strlen($name) > 30)
- {
- $error[] = $user->lang['STYLE_ERR_NAME_LONG'];
- }
-
- if (utf8_strlen($copyright) > 60)
- {
- $error[] = $user->lang['STYLE_ERR_COPY_LONG'];
- }
-
- // Check if the name already exist
- $sql = 'SELECT style_id
- FROM ' . STYLES_TABLE . "
- WHERE style_name = '" . $db->sql_escape($name) . "'";
- $result = $db->sql_query($sql);
- $row = $db->sql_fetchrow($result);
- $db->sql_freeresult($result);
-
- if ($row)
- {
- $error[] = $user->lang['STYLE_ERR_NAME_EXIST'];
- }
-
- if (sizeof($error))
- {
- return false;
- }
+ static $required = array('name', 'phpbb_version', 'copyright');
+ $cfg = parse_cfg_file($this->styles_path . $dir . '/style.cfg');
- foreach ($element_ary as $element)
+ // Check if it is a valid file
+ foreach ($required as $key)
{
- // Zero id value ... need to install element ... run usual checks
- // and do the install if necessary
- if (!$style_row[$element . '_id'])
+ if (!isset($cfg[$key]))
{
- $this->install_element($element, $error, $action, (${$element . '_root_path'}) ? ${$element . '_root_path'} : $root_path, $style_row[$element . '_id'], $style_row[$element . '_name'], (${$element . '_path'}) ? ${$element . '_path'} : $path, $style_row[$element . '_copyright']);
+ return false;
}
}
- if (!$style_row['template_id'] || !$style_row['theme_id'] || !$style_row['imageset_id'])
- {
- $error[] = $user->lang['STYLE_ERR_NO_IDS'];
- }
-
- if (sizeof($error))
+ // Check data
+ if (!isset($cfg['parent']) || !is_string($cfg['parent']) || $cfg['parent'] == $cfg['name'])
{
- return false;
+ $cfg['parent'] = '';
}
-
- $db->sql_transaction('begin');
-
- $sql_ary = array(
- 'style_name' => $name,
- 'style_copyright' => $copyright,
- 'style_active' => (int) $active,
- 'template_id' => (int) $style_row['template_id'],
- 'theme_id' => (int) $style_row['theme_id'],
- 'imageset_id' => (int) $style_row['imageset_id'],
- );
-
- $sql = 'INSERT INTO ' . STYLES_TABLE . '
- ' . $db->sql_build_array('INSERT', $sql_ary);
- $db->sql_query($sql);
-
- $id = $db->sql_nextid();
-
- if ($default)
+ if (!isset($cfg['template_bitfield']))
{
- $sql = 'UPDATE ' . USERS_TABLE . "
- SET user_style = $id
- WHERE user_style = " . $config['default_style'];
- $db->sql_query($sql);
-
- set_config('default_style', $id);
+ $cfg['template_bitfield'] = $this->default_bitfield();
}
- $db->sql_transaction('commit');
-
- add_log('admin', 'LOG_STYLE_ADD', $name);
+ return $cfg;
}
/**
- * Install/add an element, doing various checks as we go
+ * Install style
+ *
+ * @param $style style data
+ * @return int Style id
*/
- function install_element($mode, &$error, $action, $root_path, &$id, $name, $path, $copyright, $store_db = 0)
+ protected function install_style($style)
{
- global $phpbb_root_path, $db, $user;
-
- // we parse the cfg here (again)
- $cfg_data = parse_cfg_file("$root_path$mode/$mode.cfg");
-
- switch ($mode)
+ // Generate row
+ $sql_ary = array();
+ foreach ($style as $key => $value)
{
- case 'template':
- $sql_from = STYLES_TEMPLATE_TABLE;
- break;
-
- case 'theme':
- $sql_from = STYLES_THEME_TABLE;
- break;
-
- case 'imageset':
- $sql_from = STYLES_IMAGESET_TABLE;
- break;
- }
-
- $l_type = strtoupper($mode);
-
- if (!$name)
- {
- $error[] = $user->lang[$l_type . '_ERR_STYLE_NAME'];
- }
-
- // Check length settings
- if (utf8_strlen($name) > 30)
- {
- $error[] = $user->lang[$l_type . '_ERR_NAME_LONG'];
- }
-
- if (utf8_strlen($copyright) > 60)
- {
- $error[] = $user->lang[$l_type . '_ERR_COPY_LONG'];
- }
-
- // Check if the name already exist
- $sql = "SELECT {$mode}_id
- FROM $sql_from
- WHERE {$mode}_name = '" . $db->sql_escape($name) . "'";
- $result = $db->sql_query($sql);
- $row = $db->sql_fetchrow($result);
- $db->sql_freeresult($result);
-
- if ($row)
- {
- // If it exist, we just use the style on installation
- if ($action == 'install')
+ if ($key != 'style_id' && substr($key, 0, 1) != '_')
{
- $id = $row[$mode . '_id'];
- return false;
+ $sql_ary[$key] = $value;
}
-
- $error[] = $user->lang[$l_type . '_ERR_NAME_EXIST'];
}
- if (isset($cfg_data['inherit_from']) && $cfg_data['inherit_from'])
- {
- if ($mode === 'template')
- {
- $select_bf = ', bbcode_bitfield';
- }
- else
- {
- $select_bf = '';
- }
+ // Add to database
+ $this->db->sql_transaction('begin');
- $sql = "SELECT {$mode}_id, {$mode}_name, {$mode}_path, {$mode}_storedb $select_bf
- FROM $sql_from
- WHERE {$mode}_name = '" . $db->sql_escape($cfg_data['inherit_from']) . "'
- AND {$mode}_inherits_id = 0";
- $result = $db->sql_query($sql);
- $row = $db->sql_fetchrow($result);
- $db->sql_freeresult($result);
- if (!$row)
- {
- $error[] = sprintf($user->lang[$l_type . '_ERR_REQUIRED_OR_INCOMPLETE'], $cfg_data['inherit_from']);
- }
- else
- {
- $inherit_id = $row["{$mode}_id"];
- $inherit_path = $row["{$mode}_path"];
- $inherit_bf = ($mode === 'template') ? $row["bbcode_bitfield"] : false;
- $cfg_data['store_db'] = $row["{$mode}_storedb"];
- $store_db = $row["{$mode}_storedb"];
- }
- }
- else
- {
- $inherit_id = 0;
- $inherit_path = '';
- $inherit_bf = false;
- }
-
- if (sizeof($error))
- {
- return false;
- }
-
- $sql_ary = array(
- $mode . '_name' => $name,
- $mode . '_copyright' => $copyright,
- $mode . '_path' => $path,
- );
-
- switch ($mode)
- {
- case 'template':
- // We check if the template author defined a different bitfield
- if (!empty($cfg_data['template_bitfield']))
- {
- $sql_ary['bbcode_bitfield'] = $cfg_data['template_bitfield'];
- }
- else if ($inherit_bf)
- {
- $sql_ary['bbcode_bitfield'] = $inherit_bf;
- }
- else
- {
- $sql_ary['bbcode_bitfield'] = TEMPLATE_BITFIELD;
- }
-
- // We set a pre-defined bitfield here which we may use further in 3.2
- $sql_ary += array(
- 'template_storedb' => $store_db,
- );
- if (isset($cfg_data['inherit_from']) && $cfg_data['inherit_from'])
- {
- $sql_ary += array(
- 'template_inherits_id' => $inherit_id,
- 'template_inherit_path' => $inherit_path,
- );
- }
- break;
-
- case 'theme':
- // We are only interested in the theme configuration for now
-
- if (isset($cfg_data['parse_css_file']) && $cfg_data['parse_css_file'])
- {
- $store_db = 1;
- }
-
- $sql_ary += array(
- 'theme_storedb' => $store_db,
- 'theme_data' => ($store_db) ? $this->db_theme_data($sql_ary, false, $root_path) : '',
- 'theme_mtime' => (int) filemtime("{$phpbb_root_path}styles/$path/theme/stylesheet.css")
- );
- break;
-
- // all the heavy lifting is done later
- case 'imageset':
- break;
- }
-
- $db->sql_transaction('begin');
-
- $sql = "INSERT INTO $sql_from
- " . $db->sql_build_array('INSERT', $sql_ary);
- $db->sql_query($sql);
-
- $id = $db->sql_nextid();
-
- if ($mode == 'template' && $store_db)
- {
- $filelist = filelist("{$root_path}template", '', 'html');
- $this->store_templates('insert', $id, $path, $filelist);
- }
- else if ($mode == 'imageset')
- {
- $cfg_data = parse_cfg_file("$root_path$mode/imageset.cfg");
-
- $imageset_definitions = array();
- foreach ($this->imageset_keys as $topic => $key_array)
- {
- $imageset_definitions = array_merge($imageset_definitions, $key_array);
- }
-
- foreach ($cfg_data as $key => $value)
- {
- if (strpos($value, '*') !== false)
- {
- if (substr($value, -1, 1) === '*')
- {
- list($image_filename, $image_height) = explode('*', $value);
- $image_width = 0;
- }
- else
- {
- list($image_filename, $image_height, $image_width) = explode('*', $value);
- }
- }
- else
- {
- $image_filename = $value;
- $image_height = $image_width = 0;
- }
-
- if (strpos($key, 'img_') === 0 && $image_filename)
- {
- $key = substr($key, 4);
- if (in_array($key, $imageset_definitions))
- {
- $sql_ary = array(
- 'image_name' => $key,
- 'image_filename' => str_replace('{PATH}', "styles/$path/imageset/", trim($image_filename)),
- 'image_height' => (int) $image_height,
- 'image_width' => (int) $image_width,
- 'imageset_id' => (int) $id,
- 'image_lang' => '',
- );
- $db->sql_query('INSERT INTO ' . STYLES_IMAGESET_DATA_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary));
- }
- }
- }
- unset($cfg_data);
+ $sql = 'INSERT INTO ' . STYLES_TABLE . '
+ ' . $this->db->sql_build_array('INSERT', $sql_ary);
+ $this->db->sql_query($sql);
- $sql = 'SELECT lang_dir
- FROM ' . LANG_TABLE;
- $result = $db->sql_query($sql);
+ $id = $this->db->sql_nextid();
- while ($row = $db->sql_fetchrow($result))
- {
- if (@file_exists("$root_path$mode/{$row['lang_dir']}/imageset.cfg"))
- {
- $cfg_data_imageset_data = parse_cfg_file("$root_path$mode/{$row['lang_dir']}/imageset.cfg");
- foreach ($cfg_data_imageset_data as $image_name => $value)
- {
- if (strpos($value, '*') !== false)
- {
- if (substr($value, -1, 1) === '*')
- {
- list($image_filename, $image_height) = explode('*', $value);
- $image_width = 0;
- }
- else
- {
- list($image_filename, $image_height, $image_width) = explode('*', $value);
- }
- }
- else
- {
- $image_filename = $value;
- $image_height = $image_width = 0;
- }
+ $this->db->sql_transaction('commit');
- if (strpos($image_name, 'img_') === 0 && $image_filename)
- {
- $image_name = substr($image_name, 4);
- if (in_array($image_name, $imageset_definitions))
- {
- $sql_ary = array(
- 'image_name' => $image_name,
- 'image_filename' => $image_filename,
- 'image_height' => (int) $image_height,
- 'image_width' => (int) $image_width,
- 'imageset_id' => (int) $id,
- 'image_lang' => $row['lang_dir'],
- );
- $db->sql_query('INSERT INTO ' . STYLES_IMAGESET_DATA_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary));
- }
- }
- }
- unset($cfg_data_imageset_data);
- }
- }
- $db->sql_freeresult($result);
- }
+ add_log('admin', 'LOG_STYLE_ADD', $sql_ary['style_name']);
- $db->sql_transaction('commit');
-
- $log = ($store_db) ? 'LOG_' . $l_type . '_ADD_DB' : 'LOG_' . $l_type . '_ADD_FS';
- add_log('admin', $log, $name);
-
- // Return store_db in case it had to be altered
- return $store_db;
+ return $id;
}
/**
- * Checks downwards dependencies
+ * Lists all styles
*
- * @access public
- * @param string $mode The element type to check - only template is supported
- * @param int $id The template id
- * @returns false if no component inherits, array with name, path and id for each subtemplate otherwise
+ * @return array Rows with styles data
*/
- function check_inheritance($mode, $id)
+ protected function get_styles()
{
- global $db;
-
- $l_type = strtoupper($mode);
-
- switch ($mode)
- {
- case 'template':
- $sql_from = STYLES_TEMPLATE_TABLE;
- break;
+ $sql = 'SELECT *
+ FROM ' . STYLES_TABLE;
+ $result = $this->db->sql_query($sql);
- case 'theme':
- $sql_from = STYLES_THEME_TABLE;
- break;
+ $rows = $this->db->sql_fetchrowset($result);
+ $this->db->sql_freeresult($result);
- case 'imageset':
- $sql_from = STYLES_IMAGESET_TABLE;
- break;
- }
+ return $rows;
+ }
- $sql = "SELECT {$mode}_id, {$mode}_name, {$mode}_path
- FROM $sql_from
- WHERE {$mode}_inherits_id = " . (int) $id;
- $result = $db->sql_query($sql);
+ /**
+ * Count users for each style
+ *
+ * @return array Styles in following format: [style_id] = number of users
+ */
+ protected function get_users()
+ {
+ $sql = 'SELECT user_style, COUNT(user_style) AS style_count
+ FROM ' . USERS_TABLE . '
+ GROUP BY user_style';
+ $result = $this->db->sql_query($sql);
- $names = array();
- while ($row = $db->sql_fetchrow($result))
+ $style_count = array();
+ while ($row = $this->db->sql_fetchrow($result))
{
-
- $names[$row["{$mode}_id"]] = array(
- "{$mode}_id" => $row["{$mode}_id"],
- "{$mode}_name" => $row["{$mode}_name"],
- "{$mode}_path" => $row["{$mode}_path"],
- );
+ $style_count[$row['user_style']] = $row['style_count'];
}
- $db->sql_freeresult($result);
+ $this->db->sql_freeresult($result);
- if (sizeof($names))
- {
- return $names;
- }
- else
- {
- return false;
- }
+ return $style_count;
}
/**
- * Checks upwards dependencies
+ * Uninstall style
*
- * @access public
- * @param string $mode The element type to check - only template is supported
- * @param int $id The template id
- * @returns false if the component does not inherit, array with name, path and id otherwise
+ * @param array $style Style data
+ * @return bool|string True on success, error message on error
*/
- function get_super($mode, $id)
+ protected function uninstall_style($style)
{
- global $db;
-
- $l_type = strtoupper($mode);
-
- switch ($mode)
- {
- case 'template':
- $sql_from = STYLES_TEMPLATE_TABLE;
- break;
+ $id = $style['style_id'];
+ $path = $style['style_path'];
- case 'theme':
- $sql_from = STYLES_THEME_TABLE;
- break;
-
- case 'imageset':
- $sql_from = STYLES_IMAGESET_TABLE;
- break;
- }
+ // Check if style has child styles
+ $sql = 'SELECT style_id
+ FROM ' . STYLES_TABLE . '
+ WHERE style_parent_id = ' . (int) $id . " OR style_parent_tree = '" . $this->db->sql_escape($path) . "'";
+ $result = $this->db->sql_query($sql);
- $sql = "SELECT {$mode}_inherits_id
- FROM $sql_from
- WHERE {$mode}_id = " . (int) $id;
- $result = $db->sql_query_limit($sql, 1);
+ $conflict = $this->db->sql_fetchrow($result);
+ $this->db->sql_freeresult($result);
- if ($row = $db->sql_fetchrow($result))
- {
- $db->sql_freeresult($result);
- }
- else
+ if ($conflict !== false)
{
- return false;
+ return sprintf($this->user->lang['STYLE_UNINSTALL_DEPENDENT'], $style['style_name']);
}
- $super_id = $row["{$mode}_inherits_id"];
-
- $sql = "SELECT {$mode}_id, {$mode}_name, {$mode}_path
- FROM $sql_from
- WHERE {$mode}_id = " . (int) $super_id;
-
- $result = $db->sql_query_limit($sql, 1);
- if ($row = $db->sql_fetchrow($result))
- {
- $db->sql_freeresult($result);
- return $row;
- }
+ // Change default style for users
+ $sql = 'UPDATE ' . USERS_TABLE . '
+ SET user_style = 0
+ WHERE user_style = ' . $id;
+ $this->db->sql_query($sql);
- return false;
+ // Uninstall style
+ $sql = 'DELETE FROM ' . STYLES_TABLE . '
+ WHERE style_id = ' . $id;
+ $this->db->sql_query($sql);
+ return true;
}
/**
- * Moves a template set and its subtemplates to the database
+ * Delete all files in style directory
*
- * @access public
- * @param string $mode The component to move - only template is supported
- * @param int $id The template id
+ * @param string $path Style directory
+ * @param string $dir Directory to remove inside style's directory
+ * @return bool True on success, false on error
*/
- function store_in_db($mode, $id)
+ protected function delete_style_files($path, $dir = '')
{
- global $db, $user;
+ $dirname = $this->styles_path . $path . $dir;
+ $result = true;
- $error = array();
- $l_type = strtoupper($mode);
- if ($super = $this->get_super($mode, $id))
- {
- $error[] = (sprintf($user->lang["{$l_type}_INHERITS"], $super['template_name']));
- return $error;
- }
+ $dp = @opendir($dirname);
- $sql = "SELECT {$mode}_id, {$mode}_name, {$mode}_path
- FROM " . STYLES_TEMPLATE_TABLE . '
- WHERE template_id = ' . (int) $id;
-
- $result = $db->sql_query_limit($sql, 1);
- if ($row = $db->sql_fetchrow($result))
+ if ($dp)
{
- $db->sql_freeresult($result);
- $subs = $this->check_inheritance($mode, $id);
-
- $this->_store_in_db($mode, $id, $row["{$mode}_path"]);
- if ($subs && sizeof($subs))
+ while (($file = readdir($dp)) !== false)
{
- foreach ($subs as $sub_id => $sub)
+ if ($file == '.' || $file == '..')
+ {
+ continue;
+ }
+ $filename = $dirname . '/' . $file;
+ if (is_dir($filename))
+ {
+ if (!$this->delete_style_files($path, $dir . '/' . $file))
+ {
+ $result = false;
+ }
+ }
+ else
{
- if ($err = $this->_store_in_db($mode, $sub["{$mode}_id"], $sub["{$mode}_path"]))
+ if (!@unlink($filename))
{
- $error[] = $err;
+ $result = false;
}
}
}
+ closedir($dp);
}
- if (sizeof($error))
+ if (!@rmdir($dirname))
{
- return $error;
+ return false;
}
- return false;
- }
-
- /**
- * Moves a template set to the database
- *
- * @access private
- * @param string $mode The component to move - only template is supported
- * @param int $id The template id
- * @param string $path TThe path to the template files
- */
- function _store_in_db($mode, $id, $path)
- {
- global $phpbb_root_path, $db;
-
- $filelist = filelist("{$phpbb_root_path}styles/{$path}/template", '', 'html');
- $this->store_templates('insert', $id, $path, $filelist);
-
- // Okay, we do the query here -shouldn't be triggered often.
- $sql = 'UPDATE ' . STYLES_TEMPLATE_TABLE . '
- SET template_storedb = 1
- WHERE template_id = ' . $id;
- $db->sql_query($sql);
+ return $result;
}
/**
- * Moves a template set and its subtemplates to the filesystem
+ * Get list of items from posted data
*
- * @access public
- * @param string $mode The component to move - only template is supported
- * @param int $id The template id
+ * @param string $name Variable name
+ * @param string|int $default Default value for array
+ * @param bool $error If true, error will be triggered if list is empty
+ * @return array Items
*/
- function store_in_fs($mode, $id)
+ protected function request_vars($name, $default, $error = false)
{
- global $db, $user;
+ $item = $this->request->variable($name, $default);
+ $items = $this->request->variable($name . 's', array($default));
- $error = array();
- $l_type = strtoupper($mode);
- if ($super = $this->get_super($mode, $id))
+ if (count($items) == 1 && $items[0] == $default)
{
- $error[] = (sprintf($user->lang["{$l_type}_INHERITS"], $super['template_name']));
- return($error);
+ $items = array();
}
- $sql = "SELECT {$mode}_id, {$mode}_name, {$mode}_path
- FROM " . STYLES_TEMPLATE_TABLE . '
- WHERE template_id = ' . (int) $id;
-
- $result = $db->sql_query_limit($sql, 1);
- if ($row = $db->sql_fetchrow($result))
+ if ($item != $default && !count($items))
{
- $db->sql_freeresult($result);
- if (!sizeof($error))
- {
- $subs = $this->check_inheritance($mode, $id);
-
- $this->_store_in_fs($mode, $id, $row["{$mode}_path"]);
+ $items[] = $item;
+ }
- if ($subs && sizeof($subs))
- {
- foreach ($subs as $sub_id => $sub)
- {
- $this->_store_in_fs($mode, $sub["{$mode}_id"], $sub["{$mode}_path"]);
- }
- }
- }
- if (sizeof($error))
- {
- $this->store_in_db($id, $mode);
- return $error;
- }
+ if ($error && !count($items))
+ {
+ trigger_error($this->user->lang['NO_MATCHING_STYLES_FOUND'] . adm_back_link($this->u_action), E_USER_WARNING);
}
- return false;
+
+ return $items;
}
/**
- * Moves a template set to the filesystem
+ * Generates default bitfield
+ *
+ * This bitfield decides which bbcodes are defined in a template.
*
- * @access private
- * @param string $mode The component to move - only template is supported
- * @param int $id The template id
- * @param string $path The path to the template
+ * @return string Bitfield
*/
- function _store_in_fs($mode, $id, $path)
+ protected function default_bitfield()
{
- global $phpbb_root_path, $db, $user, $safe_mode;
-
- $store_db = 0;
- $error = array();
- if (!$safe_mode && phpbb_is_writable("{$phpbb_root_path}styles/{$path}/template"))
+ static $value;
+ if (isset($value))
{
- $sql = 'SELECT *
- FROM ' . STYLES_TEMPLATE_DATA_TABLE . "
- WHERE template_id = $id";
- $result = $db->sql_query($sql);
-
- while ($row = $db->sql_fetchrow($result))
- {
- if (!($fp = @fopen("{$phpbb_root_path}styles/{$path}/template/" . $row['template_filename'], 'wb')))
- {
- $store_db = 1;
- $error[] = $user->lang['EDIT_TEMPLATE_STORED_DB'];
- break;
- }
-
- fwrite($fp, $row['template_data']);
- fclose($fp);
- }
- $db->sql_freeresult($result);
-
- if (!$store_db)
- {
- $sql = 'DELETE FROM ' . STYLES_TEMPLATE_DATA_TABLE . "
- WHERE template_id = $id";
- $db->sql_query($sql);
- }
+ return $value;
}
- if (sizeof($error))
- {
- return $error;
- }
- $sql = 'UPDATE ' . STYLES_TEMPLATE_TABLE . '
- SET template_storedb = 0
- WHERE template_id = ' . $id;
- $db->sql_query($sql);
- return false;
+ // Hardcoded template bitfield to add for new templates
+ $bitfield = new bitfield();
+ $bitfield->set(0);
+ $bitfield->set(1);
+ $bitfield->set(2);
+ $bitfield->set(3);
+ $bitfield->set(4);
+ $bitfield->set(8);
+ $bitfield->set(9);
+ $bitfield->set(11);
+ $bitfield->set(12);
+ $value = $bitfield->get_base64();
+ return $value;
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/acp/acp_update.php b/phpBB/includes/acp/acp_update.php
index 5d3e9abcea..e50409bd37 100644
--- a/phpBB/includes/acp/acp_update.php
+++ b/phpBB/includes/acp/acp_update.php
@@ -2,9 +2,8 @@
/**
*
* @package acp
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -25,66 +24,42 @@ class acp_update
function main($id, $mode)
{
- global $config, $db, $user, $auth, $template, $cache;
- global $phpbb_root_path, $phpbb_admin_path, $phpEx;
+ global $config, $user, $template, $request;
+ global $phpbb_root_path, $phpEx, $phpbb_container;
$user->add_lang('install');
$this->tpl_name = 'acp_update';
$this->page_title = 'ACP_VERSION_CHECK';
- // Get current and latest version
- $errstr = '';
- $errno = 0;
-
- $info = obtain_latest_version_info(request_var('versioncheck_force', false));
-
- if (empty($info))
+ $version_helper = $phpbb_container->get('version_helper');
+ try
{
- trigger_error('VERSIONCHECK_FAIL', E_USER_WARNING);
+ $recheck = $request->variable('versioncheck_force', false);
+ $updates_available = $version_helper->get_suggested_updates($recheck);
}
+ catch (\RuntimeException $e)
+ {
+ $template->assign_var('S_VERSIONCHECK_FAIL', true);
- $info = explode("\n", $info);
- $latest_version = trim($info[0]);
-
- $announcement_url = trim($info[1]);
- $announcement_url = (strpos($announcement_url, '&amp;') === false) ? str_replace('&', '&amp;', $announcement_url) : $announcement_url;
- $update_link = append_sid($phpbb_root_path . 'install/index.' . $phpEx, 'mode=update');
+ $updates_available = array();
+ }
- // next feature release
- $next_feature_version = $next_feature_announcement_url = false;
- if (isset($info[2]) && trim($info[2]) !== '')
+ foreach ($updates_available as $branch => $version_data)
{
- $next_feature_version = trim($info[2]);
- $next_feature_announcement_url = trim($info[3]);
+ $template->assign_block_vars('updates_available', $version_data);
}
- // Determine automatic update...
- $sql = 'SELECT config_value
- FROM ' . CONFIG_TABLE . "
- WHERE config_name = 'version_update_from'";
- $result = $db->sql_query($sql);
- $version_update_from = (string) $db->sql_fetchfield('config_value');
- $db->sql_freeresult($result);
-
- $current_version = (!empty($version_update_from)) ? $version_update_from : $config['version'];
+ $update_link = append_sid($phpbb_root_path . 'install/index.' . $phpEx, 'mode=update');
$template->assign_vars(array(
- 'S_UP_TO_DATE' => phpbb_version_compare($latest_version, $config['version'], '<='),
- 'S_UP_TO_DATE_AUTO' => phpbb_version_compare($latest_version, $current_version, '<='),
- 'S_VERSION_CHECK' => true,
- 'U_ACTION' => $this->u_action,
- 'U_VERSIONCHECK_FORCE' => append_sid($this->u_action . '&amp;versioncheck_force=1'),
+ 'S_UP_TO_DATE' => empty($updates_available),
+ 'U_ACTION' => $this->u_action,
+ 'U_VERSIONCHECK_FORCE' => append_sid($this->u_action . '&amp;versioncheck_force=1'),
- 'LATEST_VERSION' => $latest_version,
- 'CURRENT_VERSION' => $config['version'],
- 'AUTO_VERSION' => $version_update_from,
- 'NEXT_FEATURE_VERSION' => $next_feature_version,
+ 'CURRENT_VERSION' => $config['version'],
- 'UPDATE_INSTRUCTIONS' => sprintf($user->lang['UPDATE_INSTRUCTIONS'], $announcement_url, $update_link),
- 'UPGRADE_INSTRUCTIONS' => $next_feature_version ? $user->lang('UPGRADE_INSTRUCTIONS', $next_feature_version, $next_feature_announcement_url) : false,
+ 'UPDATE_INSTRUCTIONS' => sprintf($user->lang['UPDATE_INSTRUCTIONS'], $update_link),
));
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/acp/acp_users.php b/phpBB/includes/acp/acp_users.php
index 8aaefb02c5..1f61010d62 100644
--- a/phpBB/includes/acp/acp_users.php
+++ b/phpBB/includes/acp/acp_users.php
@@ -2,9 +2,8 @@
/**
*
* @package acp
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -33,10 +32,11 @@ class acp_users
{
global $config, $db, $user, $auth, $template, $cache;
global $phpbb_root_path, $phpbb_admin_path, $phpEx, $table_prefix, $file_uploads;
+ global $phpbb_dispatcher, $request;
+ global $phpbb_container;
$user->add_lang(array('posting', 'ucp', 'acp/users'));
$this->tpl_name = 'acp_users';
- $this->page_title = 'ACP_USER_' . strtoupper($mode);
$error = array();
$username = utf8_normalize_nfc(request_var('username', '', true));
@@ -56,7 +56,7 @@ class acp_users
$this->page_title = 'WHOIS';
$this->tpl_name = 'simple_body';
- $user_ip = request_var('user_ip', '');
+ $user_ip = phpbb_ip_normalise(request_var('user_ip', ''));
$domain = gethostbyaddr($user_ip);
$ipwhois = user_ipwhois($user_ip);
@@ -120,7 +120,7 @@ class acp_users
// Build modes dropdown list
$sql = 'SELECT module_mode, module_auth
FROM ' . MODULES_TABLE . "
- WHERE module_basename = 'users'
+ WHERE module_basename = 'acp_users'
AND module_enabled = 1
AND module_class = 'acp'
ORDER BY left_id, module_mode";
@@ -129,7 +129,7 @@ class acp_users
$dropdown_modes = array();
while ($row = $db->sql_fetchrow($result))
{
- if (!$this->p_master->module_auth($row['module_auth']))
+ if (!$this->p_master->module_auth_self($row['module_auth']))
{
continue;
}
@@ -158,6 +158,8 @@ class acp_users
trigger_error($user->lang['NOT_MANAGE_FOUNDER'] . adm_back_link($this->u_action), E_USER_WARNING);
}
+ $this->page_title = $user_row['username'] . ' :: ' . $user->lang('ACP_USER_' . strtoupper($mode));
+
switch ($mode)
{
case 'overview':
@@ -351,7 +353,7 @@ class acp_users
$messenger->template($email_template, $user_row['user_lang']);
- $messenger->to($user_row['user_email'], $user_row['username']);
+ $messenger->set_addresses($user_row);
$messenger->anti_abuse_headers($config, $user);
@@ -400,13 +402,16 @@ class acp_users
{
if ($config['require_activation'] == USER_ACTIVATION_ADMIN)
{
+ $phpbb_notifications = $phpbb_container->get('notification_manager');
+ $phpbb_notifications->delete_notifications('admin_activate_user', $user_row['user_id']);
+
include_once($phpbb_root_path . 'includes/functions_messenger.' . $phpEx);
$messenger = new messenger(false);
$messenger->template('admin_welcome_activated', $user_row['user_lang']);
- $messenger->to($user_row['user_email'], $user_row['username']);
+ $messenger->set_addresses($user_row);
$messenger->anti_abuse_headers($config, $user);
@@ -461,7 +466,7 @@ class acp_users
$sql_ary = array(
'user_avatar' => '',
- 'user_avatar_type' => 0,
+ 'user_avatar_type' => '',
'user_avatar_width' => 0,
'user_avatar_height' => 0,
);
@@ -472,9 +477,11 @@ class acp_users
$db->sql_query($sql);
// Delete old avatar if present
- if ($user_row['user_avatar'] && $user_row['user_avatar_type'] != AVATAR_GALLERY)
+ $phpbb_avatar_manager = $phpbb_container->get('avatar.manager');
+ $driver = $phpbb_avatar_manager->get_driver($user_row['user_avatar_type']);
+ if ($driver)
{
- avatar_delete('user', $user_row);
+ $driver->delete($user_row);
}
add_log('admin', 'LOG_USER_DEL_AVATAR', $user_row['username']);
@@ -626,29 +633,31 @@ class acp_users
$topic_id_ary = $move_topic_ary = $move_post_ary = $new_topic_id_ary = array();
$forum_id_ary = array($new_forum_id);
- $sql = 'SELECT topic_id, COUNT(post_id) AS total_posts
+ $sql = 'SELECT topic_id, post_visibility, COUNT(post_id) AS total_posts
FROM ' . POSTS_TABLE . "
WHERE poster_id = $user_id
AND forum_id <> $new_forum_id
- GROUP BY topic_id";
+ GROUP BY topic_id, post_visibility";
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
{
- $topic_id_ary[$row['topic_id']] = $row['total_posts'];
+ $topic_id_ary[$row['topic_id']][$row['post_visibility']] = $row['total_posts'];
}
$db->sql_freeresult($result);
if (sizeof($topic_id_ary))
{
- $sql = 'SELECT topic_id, forum_id, topic_title, topic_replies, topic_replies_real, topic_attachment
+ $sql = 'SELECT topic_id, forum_id, topic_title, topic_posts_approved, topic_posts_unapproved, topic_posts_softdeleted, topic_attachment
FROM ' . TOPICS_TABLE . '
WHERE ' . $db->sql_in_set('topic_id', array_keys($topic_id_ary));
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
{
- if (max($row['topic_replies'], $row['topic_replies_real']) + 1 == $topic_id_ary[$row['topic_id']])
+ if ($topic_id_ary[$row['topic_id']][ITEM_APPROVED] == $row['topic_posts_approved']
+ && $topic_id_ary[$row['topic_id']][ITEM_UNAPPROVED] == $row['topic_posts_unapproved']
+ && $topic_id_ary[$row['topic_id']][ITEM_DELETED] == $row['topic_posts_softdeleted'])
{
$move_topic_ary[] = $row['topic_id'];
}
@@ -681,7 +690,7 @@ class acp_users
'topic_time' => time(),
'forum_id' => $new_forum_id,
'icon_id' => 0,
- 'topic_approved' => 1,
+ 'topic_visibility' => ITEM_APPROVED,
'topic_title' => $post_ary['title'],
'topic_first_poster_name' => $user_row['username'],
'topic_type' => POST_NORMAL,
@@ -755,6 +764,19 @@ class acp_users
}
break;
+
+ default:
+ /**
+ * Run custom quicktool code
+ *
+ * @event core.acp_users_overview_run_quicktool
+ * @var array user_row Current user data
+ * @var string action Quick tool that should be run
+ * @since 3.1-A1
+ */
+ $vars = array('action', 'user_row');
+ extract($phpbb_dispatcher->trigger_event('core.acp_users_overview_run_quicktool', compact($vars)));
+ break;
}
// Handle registration info updates
@@ -762,9 +784,8 @@ class acp_users
'username' => utf8_normalize_nfc(request_var('user', $user_row['username'], true)),
'user_founder' => request_var('user_founder', ($user_row['user_type'] == USER_FOUNDER) ? 1 : 0),
'email' => strtolower(request_var('user_email', $user_row['user_email'])),
- 'email_confirm' => strtolower(request_var('email_confirm', '')),
- 'new_password' => request_var('new_password', '', true),
- 'password_confirm' => request_var('password_confirm', '', true),
+ 'new_password' => $request->variable('new_password', '', true),
+ 'password_confirm' => $request->variable('password_confirm', '', true),
);
// Validation data - we do not check the password complexity setting here
@@ -794,7 +815,6 @@ class acp_users
array('string', false, 6, 60),
array('email', $user_row['user_email'])
),
- 'email_confirm' => array('string', true, 6, 60)
);
}
@@ -805,19 +825,17 @@ class acp_users
$error[] = 'NEW_PASSWORD_ERROR';
}
- if ($data['email'] != $user_row['user_email'] && $data['email_confirm'] != $data['email'])
- {
- $error[] = 'NEW_EMAIL_ERROR';
- }
-
if (!check_form_key($form_name))
{
$error[] = 'FORM_INVALID';
}
+ // Instantiate passwords manager
+ $passwords_manager = $phpbb_container->get('passwords.manager');
+
// Which updates do we need to do?
$update_username = ($user_row['username'] != $data['username']) ? $data['username'] : false;
- $update_password = ($data['new_password'] && !phpbb_check_hash($data['new_password'], $user_row['user_password'])) ? true : false;
+ $update_password = $data['new_password'] && !$passwords_manager->check($data['new_password'], $user_row['user_password']);
$update_email = ($data['email'] != $user_row['user_email']) ? $data['email'] : false;
if (!sizeof($error))
@@ -868,6 +886,18 @@ class acp_users
}
}
+ /**
+ * Modify user data before we update it
+ *
+ * @event core.acp_users_overview_modify_data
+ * @var array user_row Current user data
+ * @var array data Submitted user data
+ * @var array sql_ary User data we udpate
+ * @since 3.1-A1
+ */
+ $vars = array('user_row', 'data', 'sql_ary');
+ extract($phpbb_dispatcher->trigger_event('core.acp_users_overview_modify_data', compact($vars)));
+
if ($update_username !== false)
{
$sql_ary['username'] = $update_username;
@@ -889,7 +919,7 @@ class acp_users
if ($update_password)
{
$sql_ary += array(
- 'user_password' => phpbb_hash($data['new_password']),
+ 'user_password' => $passwords_manager->hash($data['new_password']),
'user_passchg' => time(),
'user_pass_convert' => 0,
);
@@ -920,7 +950,7 @@ class acp_users
}
// Replace "error" strings with their real, localised form
- $error = preg_replace('#^([A-Z_]+)$#e', "(!empty(\$user->lang['\\1'])) ? \$user->lang['\\1'] : '\\1'", $error);
+ $error = array_map(array($user, 'lang'), $error);
}
if ($user_id == $user->data['user_id'])
@@ -958,12 +988,6 @@ class acp_users
}
}
- $s_action_options = '<option class="sep" value="">' . $user->lang['SELECT_OPTION'] . '</option>';
- foreach ($quick_tool_ary as $value => $lang)
- {
- $s_action_options .= '<option value="' . $value . '">' . $user->lang['USER_ADMIN_' . $lang] . '</option>';
- }
-
if ($config['load_onlinetrack'])
{
$sql = 'SELECT MAX(session_time) AS session_time, MIN(session_viewonline) AS session_viewonline
@@ -978,7 +1002,24 @@ class acp_users
unset($row);
}
- $last_visit = (!empty($user_row['session_time'])) ? $user_row['session_time'] : $user_row['user_lastvisit'];
+ /**
+ * Add additional quick tool options and overwrite user data
+ *
+ * @event core.acp_users_display_overview
+ * @var array user_row Array with user data
+ * @var array quick_tool_ary Ouick tool options
+ * @since 3.1-A1
+ */
+ $vars = array('user_row', 'quick_tool_ary');
+ extract($phpbb_dispatcher->trigger_event('core.acp_users_display_overview', compact($vars)));
+
+ $s_action_options = '<option class="sep" value="">' . $user->lang['SELECT_OPTION'] . '</option>';
+ foreach ($quick_tool_ary as $value => $lang)
+ {
+ $s_action_options .= '<option value="' . $value . '">' . $user->lang['USER_ADMIN_' . $lang] . '</option>';
+ }
+
+ $last_active = (!empty($user_row['session_time'])) ? $user_row['session_time'] : $user_row['user_lastvisit'];
$inactive_reason = '';
if ($user_row['user_type'] == USER_INACTIVE)
@@ -1009,7 +1050,7 @@ class acp_users
$sql = 'SELECT COUNT(post_id) as posts_in_queue
FROM ' . POSTS_TABLE . '
WHERE poster_id = ' . $user_id . '
- AND post_approved = 0';
+ AND post_visibility = ' . ITEM_UNAPPROVED;
$result = $db->sql_query($sql);
$user_row['posts_in_queue'] = (int) $db->sql_fetchfield('posts_in_queue');
$db->sql_freeresult($result);
@@ -1022,8 +1063,8 @@ class acp_users
$db->sql_freeresult($result);
$template->assign_vars(array(
- 'L_NAME_CHARS_EXPLAIN' => sprintf($user->lang[$config['allow_name_chars'] . '_EXPLAIN'], $config['min_name_chars'], $config['max_name_chars']),
- 'L_CHANGE_PASSWORD_EXPLAIN' => sprintf($user->lang[$config['pass_complex'] . '_EXPLAIN'], $config['min_pass_chars'], $config['max_pass_chars']),
+ 'L_NAME_CHARS_EXPLAIN' => $user->lang($config['allow_name_chars'] . '_EXPLAIN', $user->lang('CHARACTERS', (int) $config['min_name_chars']), $user->lang('CHARACTERS', (int) $config['max_name_chars'])),
+ 'L_CHANGE_PASSWORD_EXPLAIN' => $user->lang($config['pass_complex'] . '_EXPLAIN', $user->lang('CHARACTERS', (int) $config['min_pass_chars']), $user->lang('CHARACTERS', (int) $config['max_pass_chars'])),
'L_POSTS_IN_QUEUE' => $user->lang('NUM_POSTS_IN_QUEUE', $user_row['posts_in_queue']),
'S_FOUNDER' => ($user->data['user_type'] == USER_FOUNDER) ? true : false,
@@ -1045,7 +1086,7 @@ class acp_users
'USER' => $user_row['username'],
'USER_REGISTERED' => $user->format_date($user_row['user_regdate']),
'REGISTERED_IP' => ($ip == 'hostname') ? gethostbyaddr($user_row['user_ip']) : $user_row['user_ip'],
- 'USER_LASTACTIVE' => ($last_visit) ? $user->format_date($last_visit) : ' - ',
+ 'USER_LASTACTIVE' => ($last_active) ? $user->format_date($last_active) : ' - ',
'USER_EMAIL' => $user_row['user_email'],
'USER_WARNINGS' => $user_row['user_warnings'],
'USER_POSTS' => $user_row['user_posts'],
@@ -1065,6 +1106,7 @@ class acp_users
$deleteall = (isset($_POST['delall'])) ? true : false;
$marked = request_var('mark', array(0));
$message = utf8_normalize_nfc(request_var('message', '', true));
+ $pagination = $phpbb_container->get('pagination');
// Sort keys
$sort_days = request_var('st', 0);
@@ -1134,10 +1176,11 @@ class acp_users
$log_count = 0;
$start = view_log('user', $log_data, $log_count, $config['topics_per_page'], $start, 0, 0, $user_id, $sql_where, $sql_sort);
+ $base_url = $this->u_action . "&amp;u=$user_id&amp;$u_sort_param";
+ $pagination->generate_template_pagination($base_url, 'pagination', 'start', $log_count, $config['topics_per_page'], $start);
+
$template->assign_vars(array(
'S_FEEDBACK' => true,
- 'S_ON_PAGE' => on_page($log_count, $config['topics_per_page'], $start),
- 'PAGINATION' => generate_pagination($this->u_action . "&amp;u=$user_id&amp;$u_sort_param", $log_count, $config['topics_per_page'], $start, true),
'S_LIMIT_DAYS' => $s_limit_days,
'S_SORT_KEY' => $s_sort_key,
@@ -1309,9 +1352,8 @@ class acp_users
case 'profile':
include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
- include($phpbb_root_path . 'includes/functions_profile_fields.' . $phpEx);
- $cp = new custom_profile();
+ $cp = $phpbb_container->get('profilefields.manager');
$cp_data = $cp_error = array();
@@ -1325,15 +1367,7 @@ class acp_users
$user_row['iso_lang_id'] = $row['lang_id'];
$data = array(
- 'icq' => request_var('icq', $user_row['user_icq']),
- 'aim' => request_var('aim', $user_row['user_aim']),
- 'msn' => request_var('msn', $user_row['user_msnm']),
- 'yim' => request_var('yim', $user_row['user_yim']),
'jabber' => utf8_normalize_nfc(request_var('jabber', $user_row['user_jabber'], true)),
- 'website' => request_var('website', $user_row['user_website']),
- 'location' => utf8_normalize_nfc(request_var('location', $user_row['user_from'], true)),
- 'occupation' => utf8_normalize_nfc(request_var('occupation', $user_row['user_occ'], true)),
- 'interests' => utf8_normalize_nfc(request_var('interests', $user_row['user_interests'], true)),
'bday_day' => 0,
'bday_month' => 0,
'bday_year' => 0,
@@ -1353,21 +1387,9 @@ class acp_users
if ($submit)
{
$error = validate_data($data, array(
- 'icq' => array(
- array('string', true, 3, 15),
- array('match', true, '#^[0-9]+$#i')),
- 'aim' => array('string', true, 3, 255),
- 'msn' => array('string', true, 5, 255),
'jabber' => array(
array('string', true, 5, 255),
array('jabber')),
- 'yim' => array('string', true, 5, 255),
- 'website' => array(
- array('string', true, 12, 255),
- array('match', true, '#^http[s]?://(.*?\.)*?[a-z0-9\-]+\.[a-z]{2,4}#i')),
- 'location' => array('string', true, 2, 100),
- 'occupation' => array('string', true, 2, 500),
- 'interests' => array('string', true, 2, 500),
'bday_day' => array('num', true, 1, 31),
'bday_month' => array('num', true, 1, 12),
'bday_year' => array('num', true, 1901, gmdate('Y', time())),
@@ -1389,15 +1411,7 @@ class acp_users
if (!sizeof($error))
{
$sql_ary = array(
- 'user_icq' => $data['icq'],
- 'user_aim' => $data['aim'],
- 'user_msnm' => $data['msn'],
- 'user_yim' => $data['yim'],
'user_jabber' => $data['jabber'],
- 'user_website' => $data['website'],
- 'user_from' => $data['location'],
- 'user_occ' => $data['occupation'],
- 'user_interests'=> $data['interests'],
'user_birthday' => $data['user_birthday'],
);
@@ -1413,7 +1427,7 @@ class acp_users
}
// Replace "error" strings with their real, localised form
- $error = preg_replace('#^([A-Z_]+)$#e', "(!empty(\$user->lang['\\1'])) ? \$user->lang['\\1'] : '\\1'", $error);
+ $error = array_map(array($user, 'lang'), $error);
}
$s_birthday_day_options = '<option value="0"' . ((!$data['bday_day']) ? ' selected="selected"' : '') . '>--</option>';
@@ -1441,16 +1455,7 @@ class acp_users
unset($now);
$template->assign_vars(array(
- 'ICQ' => $data['icq'],
- 'YIM' => $data['yim'],
- 'AIM' => $data['aim'],
- 'MSN' => $data['msn'],
'JABBER' => $data['jabber'],
- 'WEBSITE' => $data['website'],
- 'LOCATION' => $data['location'],
- 'OCCUPATION' => $data['occupation'],
- 'INTERESTS' => $data['interests'],
-
'S_BIRTHDAY_DAY_OPTIONS' => $s_birthday_day_options,
'S_BIRTHDAY_MONTH_OPTIONS' => $s_birthday_month_options,
'S_BIRTHDAY_YEAR_OPTIONS' => $s_birthday_year_options,
@@ -1472,15 +1477,13 @@ class acp_users
$data = array(
'dateformat' => utf8_normalize_nfc(request_var('dateformat', $user_row['user_dateformat'], true)),
'lang' => basename(request_var('lang', $user_row['user_lang'])),
- 'tz' => request_var('tz', (float) $user_row['user_timezone']),
+ 'tz' => request_var('tz', $user_row['user_timezone']),
'style' => request_var('style', $user_row['user_style']),
- 'dst' => request_var('dst', $user_row['user_dst']),
'viewemail' => request_var('viewemail', $user_row['user_allow_viewemail']),
'massemail' => request_var('massemail', $user_row['user_allow_massemail']),
'hideonline' => request_var('hideonline', !$user_row['user_allow_viewonline']),
'notifymethod' => request_var('notifymethod', $user_row['user_notify_type']),
'notifypm' => request_var('notifypm', $user_row['user_notify_pm']),
- 'popuppm' => request_var('popuppm', $this->optionget($user_row, 'popuppm')),
'allowpm' => request_var('allowpm', $user_row['user_allow_pm']),
'topic_sk' => request_var('topic_sk', ($user_row['user_topic_sortby_type']) ? $user_row['user_topic_sortby_type'] : 't'),
@@ -1509,7 +1512,7 @@ class acp_users
$error = validate_data($data, array(
'dateformat' => array('string', false, 1, 30),
'lang' => array('match', false, '#^[a-z_\-]{2,}$#i'),
- 'tz' => array('num', false, -14, 14),
+ 'tz' => array('timezone'),
'topic_sk' => array('string', false, 1, 1),
'topic_sd' => array('string', false, 1, 1),
@@ -1524,7 +1527,6 @@ class acp_users
if (!sizeof($error))
{
- $this->optionset($user_row, 'popuppm', $data['popuppm']);
$this->optionset($user_row, 'viewimg', $data['view_images']);
$this->optionset($user_row, 'viewflash', $data['view_flash']);
$this->optionset($user_row, 'viewsmilies', $data['view_smilies']);
@@ -1545,7 +1547,6 @@ class acp_users
'user_notify_type' => $data['notifymethod'],
'user_notify_pm' => $data['notifypm'],
- 'user_dst' => $data['dst'],
'user_dateformat' => $data['dateformat'],
'user_lang' => $data['lang'],
'user_timezone' => $data['tz'],
@@ -1576,7 +1577,7 @@ class acp_users
|| $user_row['user_allow_viewonline'] && !$sql_ary['user_allow_viewonline'])
{
// We also need to check if the user has the permission to cloak.
- $user_auth = new auth();
+ $user_auth = new \phpbb\auth\auth();
$user_auth->acl($user_row);
$session_sql_ary = array(
@@ -1596,7 +1597,7 @@ class acp_users
}
// Replace "error" strings with their real, localised form
- $error = preg_replace('#^([A-Z_]+)$#e', "(!empty(\$user->lang['\\1'])) ? \$user->lang['\\1'] : '\\1'", $error);
+ $error = array_map(array($user, 'lang'), $error);
}
$dateformat_options = '';
@@ -1655,6 +1656,7 @@ class acp_users
${'s_sort_' . $sort_option . '_dir'} .= '</select>';
}
+ $timezone_selects = phpbb_timezone_select($user, $data['tz'], true);
$template->assign_vars(array(
'S_PREFS' => true,
'S_JABBER_DISABLED' => ($config['jab_enable'] && $user_row['user_jabber'] && @extension_loaded('xml')) ? false : true,
@@ -1667,8 +1669,6 @@ class acp_users
'NOTIFY_IM' => ($data['notifymethod'] == NOTIFY_IM) ? true : false,
'NOTIFY_BOTH' => ($data['notifymethod'] == NOTIFY_BOTH) ? true : false,
'NOTIFY_PM' => $data['notifypm'],
- 'POPUP_PM' => $data['popuppm'],
- 'DST' => $data['dst'],
'BBCODE' => $data['bbcode'],
'SMILIES' => $data['smilies'],
'ATTACH_SIG' => $data['sig'],
@@ -1695,7 +1695,8 @@ class acp_users
'S_LANG_OPTIONS' => language_select($data['lang']),
'S_STYLE_OPTIONS' => style_select($data['style']),
- 'S_TZ_OPTIONS' => tz_select($data['tz'], true),
+ 'S_TZ_OPTIONS' => $timezone_selects['tz_select'],
+ 'S_TZ_DATE_OPTIONS' => $timezone_selects['tz_dates'],
)
);
@@ -1704,66 +1705,121 @@ class acp_users
case 'avatar':
include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
- include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
- $can_upload = (file_exists($phpbb_root_path . $config['avatar_path']) && phpbb_is_writable($phpbb_root_path . $config['avatar_path']) && $file_uploads) ? true : false;
+ $avatars_enabled = false;
- if ($submit)
+ if ($config['allow_avatar'])
{
+ $phpbb_avatar_manager = $phpbb_container->get('avatar.manager');
+ $avatar_drivers = $phpbb_avatar_manager->get_enabled_drivers();
- if (!check_form_key($form_name))
+ // This is normalised data, without the user_ prefix
+ $avatar_data = \phpbb\avatar\manager::clean_row($user_row, 'user');
+
+ if ($submit)
{
+ if (check_form_key($form_name))
+ {
+ $driver_name = $phpbb_avatar_manager->clean_driver_name($request->variable('avatar_driver', ''));
+
+ if (in_array($driver_name, $avatar_drivers) && !$request->is_set_post('avatar_delete'))
+ {
+ $driver = $phpbb_avatar_manager->get_driver($driver_name);
+ $result = $driver->process_form($request, $template, $user, $avatar_data, $error);
+
+ if ($result && empty($error))
+ {
+ // Success! Lets save the result in the database
+ $result = array(
+ 'user_avatar_type' => $driver_name,
+ 'user_avatar' => $result['avatar'],
+ 'user_avatar_width' => $result['avatar_width'],
+ 'user_avatar_height' => $result['avatar_height'],
+ );
+
+ $sql = 'UPDATE ' . USERS_TABLE . '
+ SET ' . $db->sql_build_array('UPDATE', $result) . '
+ WHERE user_id = ' . (int) $user_id;
+
+ $db->sql_query($sql);
+ trigger_error($user->lang['USER_AVATAR_UPDATED'] . adm_back_link($this->u_action . '&amp;u=' . $user_id));
+ }
+ }
+ else
+ {
+ $driver = $phpbb_avatar_manager->get_driver($avatar_data['avatar_type']);
+ if ($driver)
+ {
+ $driver->delete($avatar_data);
+ }
+
+ // Removing the avatar
+ $result = array(
+ 'user_avatar' => '',
+ 'user_avatar_type' => '',
+ 'user_avatar_width' => 0,
+ 'user_avatar_height' => 0,
+ );
+
+ $sql = 'UPDATE ' . USERS_TABLE . '
+ SET ' . $db->sql_build_array('UPDATE', $result) . '
+ WHERE user_id = ' . (int) $user_id;
+
+ $db->sql_query($sql);
+ trigger_error($user->lang['USER_AVATAR_UPDATED'] . adm_back_link($this->u_action . '&amp;u=' . $user_id));
+ }
+ }
+ else
+ {
trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action . '&amp;u=' . $user_id), E_USER_WARNING);
+ }
}
- if (avatar_process_user($error, $user_row, $can_upload))
+ $selected_driver = $phpbb_avatar_manager->clean_driver_name($request->variable('avatar_driver', $user_row['user_avatar_type']));
+
+ foreach ($avatar_drivers as $current_driver)
{
- trigger_error($user->lang['USER_AVATAR_UPDATED'] . adm_back_link($this->u_action . '&amp;u=' . $user_row['user_id']));
- }
+ $driver = $phpbb_avatar_manager->get_driver($current_driver);
- // Replace "error" strings with their real, localised form
- $error = preg_replace('#^([A-Z_]+)$#e', "(!empty(\$user->lang['\\1'])) ? \$user->lang['\\1'] : '\\1'", $error);
- }
+ $avatars_enabled = true;
+ $config_name = $phpbb_avatar_manager->get_driver_config_name($driver);
+ $template->set_filenames(array(
+ 'avatar' => "acp_avatar_options_{$config_name}.html",
+ ));
- if (!$config['allow_avatar'] && $user_row['user_avatar_type'])
- {
- $error[] = $user->lang['USER_AVATAR_NOT_ALLOWED'];
- }
- else if ((($user_row['user_avatar_type'] == AVATAR_UPLOAD) && !$config['allow_avatar_upload']) ||
- (($user_row['user_avatar_type'] == AVATAR_REMOTE) && !$config['allow_avatar_remote']) ||
- (($user_row['user_avatar_type'] == AVATAR_GALLERY) && !$config['allow_avatar_local']))
- {
- $error[] = $user->lang['USER_AVATAR_TYPE_NOT_ALLOWED'];
- }
-
- // Generate users avatar
- $avatar_img = ($user_row['user_avatar']) ? get_user_avatar($user_row['user_avatar'], $user_row['user_avatar_type'], $user_row['user_avatar_width'], $user_row['user_avatar_height'], 'USER_AVATAR', true) : '<img src="' . $phpbb_admin_path . 'images/no_avatar.gif" alt="" />';
+ if ($driver->prepare_form($request, $template, $user, $avatar_data, $error))
+ {
+ $driver_name = $phpbb_avatar_manager->prepare_driver_name($current_driver);
+ $driver_upper = strtoupper($driver_name);
- $display_gallery = (isset($_POST['display_gallery'])) ? true : false;
- $avatar_select = basename(request_var('avatar_select', ''));
- $category = basename(request_var('category', ''));
+ $template->assign_block_vars('avatar_drivers', array(
+ 'L_TITLE' => $user->lang($driver_upper . '_TITLE'),
+ 'L_EXPLAIN' => $user->lang($driver_upper . '_EXPLAIN'),
- if ($config['allow_avatar_local'] && $display_gallery)
- {
- avatar_gallery($category, $avatar_select, 4);
+ 'DRIVER' => $driver_name,
+ 'SELECTED' => $current_driver == $selected_driver,
+ 'OUTPUT' => $template->assign_display('avatar'),
+ ));
+ }
+ }
}
+ // Replace "error" strings with their real, localised form
+ $error = $phpbb_avatar_manager->localize_errors($user, $error);
+
+ $avatar = phpbb_get_user_avatar($user_row, 'USER_AVATAR', true);
+
$template->assign_vars(array(
- 'S_AVATAR' => true,
- 'S_CAN_UPLOAD' => $can_upload,
- 'S_UPLOAD_FILE' => ($config['allow_avatar'] && $can_upload && $config['allow_avatar_upload']) ? true : false,
- 'S_REMOTE_UPLOAD' => ($config['allow_avatar'] && $can_upload && $config['allow_avatar_remote_upload']) ? true : false,
- 'S_ALLOW_REMOTE' => ($config['allow_avatar'] && $config['allow_avatar_remote']) ? true : false,
- 'S_DISPLAY_GALLERY' => ($config['allow_avatar'] && $config['allow_avatar_local'] && !$display_gallery) ? true : false,
- 'S_IN_GALLERY' => ($config['allow_avatar'] && $config['allow_avatar_local'] && $display_gallery) ? true : false,
-
- 'AVATAR_IMAGE' => $avatar_img,
- 'AVATAR_MAX_FILESIZE' => $config['avatar_filesize'],
- 'USER_AVATAR_WIDTH' => $user_row['user_avatar_width'],
- 'USER_AVATAR_HEIGHT' => $user_row['user_avatar_height'],
-
- 'L_AVATAR_EXPLAIN' => sprintf($user->lang['AVATAR_EXPLAIN'], $config['avatar_max_width'], $config['avatar_max_height'], round($config['avatar_filesize'] / 1024)))
- );
+ 'S_AVATAR' => true,
+ 'ERROR' => (!empty($error)) ? implode('<br />', $error) : '',
+ 'AVATAR' => (empty($avatar) ? '<img src="' . $phpbb_admin_path . 'images/no_avatar.gif" alt="" />' : $avatar),
+
+ 'S_FORM_ENCTYPE' => ' enctype="multipart/form-data"',
+
+ 'L_AVATAR_EXPLAIN' => sprintf($user->lang['AVATAR_EXPLAIN'], $config['avatar_max_width'], $config['avatar_max_height'], $config['avatar_filesize'] / 1024),
+
+ 'S_AVATARS_ENABLED' => ($config['allow_avatar'] && $avatars_enabled),
+ ));
break;
@@ -1865,7 +1921,7 @@ class acp_users
}
// Replace "error" strings with their real, localised form
- $error = preg_replace('#^([A-Z_]+)$#e', "(!empty(\$user->lang['\\1'])) ? \$user->lang['\\1'] : '\\1'", $error);
+ $error = array_map(array($user, 'lang'), $error);
}
$signature_preview = '';
@@ -1895,7 +1951,7 @@ class acp_users
'FLASH_STATUS' => ($config['allow_sig_flash']) ? $user->lang['FLASH_IS_ON'] : $user->lang['FLASH_IS_OFF'],
'URL_STATUS' => ($config['allow_sig_links']) ? $user->lang['URL_IS_ON'] : $user->lang['URL_IS_OFF'],
- 'L_SIGNATURE_EXPLAIN' => sprintf($user->lang['SIGNATURE_EXPLAIN'], $config['max_sig_chars']),
+ 'L_SIGNATURE_EXPLAIN' => $user->lang('SIGNATURE_EXPLAIN', (int) $config['max_sig_chars']),
'S_BBCODE_ALLOWED' => $config['allow_sig_bbcode'],
'S_SMILIES_ALLOWED' => $config['allow_sig_smilies'],
@@ -1914,6 +1970,7 @@ class acp_users
$start = request_var('start', 0);
$deletemark = (isset($_POST['delmarked'])) ? true : false;
$marked = request_var('mark', array(0));
+ $pagination = $phpbb_container->get('pagination');
// Sort keys
$sort_key = request_var('sk', 'a');
@@ -1956,7 +2013,7 @@ class acp_users
$message = (sizeof($log_attachments) == 1) ? $user->lang['ATTACHMENT_DELETED'] : $user->lang['ATTACHMENTS_DELETED'];
- add_log('admin', 'LOG_ATTACHMENTS_DELETED', implode(', ', $log_attachments));
+ add_log('admin', 'LOG_ATTACHMENTS_DELETED', implode($user->lang['COMMA_SEPARATOR'], $log_attachments));
trigger_error($message . adm_back_link($this->u_action . '&amp;u=' . $user_id));
}
else
@@ -2049,14 +2106,14 @@ class acp_users
}
$db->sql_freeresult($result);
+ $base_url = $this->u_action . "&amp;u=$user_id&amp;sk=$sort_key&amp;sd=$sort_dir";
+ $pagination->generate_template_pagination($base_url, 'pagination', 'start', $num_attachments, $config['topics_per_page'], $start);
+
$template->assign_vars(array(
'S_ATTACHMENTS' => true,
- 'S_ON_PAGE' => on_page($num_attachments, $config['topics_per_page'], $start),
'S_SORT_KEY' => $s_sort_key,
'S_SORT_DIR' => $s_sort_dir,
-
- 'PAGINATION' => generate_pagination($this->u_action . "&amp;u=$user_id&amp;sk=$sort_key&amp;sd=$sort_dir", $num_attachments, $config['topics_per_page'], $start, true))
- );
+ ));
break;
@@ -2411,5 +2468,3 @@ class acp_users
return phpbb_optionget($user->keyoptions[$key], $var);
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/acp/acp_words.php b/phpBB/includes/acp/acp_words.php
index 88c5bbe592..d8d14ba4ad 100644
--- a/phpBB/includes/acp/acp_words.php
+++ b/phpBB/includes/acp/acp_words.php
@@ -2,9 +2,8 @@
/**
*
* @package acp
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -186,5 +185,3 @@ class acp_words
$db->sql_freeresult($result);
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/acp/auth.php b/phpBB/includes/acp/auth.php
index 10d7973da6..a023bced0a 100644
--- a/phpBB/includes/acp/auth.php
+++ b/phpBB/includes/acp/auth.php
@@ -2,9 +2,8 @@
/**
*
* @package phpBB3
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -20,7 +19,7 @@ if (!defined('IN_PHPBB'))
* ACP Permission/Auth class
* @package phpBB3
*/
-class auth_admin extends auth
+class auth_admin extends \phpbb\auth\auth
{
/**
* Init auth settings
@@ -131,7 +130,7 @@ class auth_admin extends auth
{
if ($user->data['user_id'] != $userdata['user_id'])
{
- $auth2 = new auth();
+ $auth2 = new \phpbb\auth\auth();
$auth2->acl($userdata);
}
else
@@ -262,7 +261,8 @@ class auth_admin extends auth
*/
function display_mask($mode, $permission_type, &$hold_ary, $user_mode = 'user', $local = false, $group_display = true)
{
- global $template, $user, $db, $phpbb_root_path, $phpEx;
+ global $template, $user, $db, $phpbb_root_path, $phpEx, $phpbb_container;
+ $phpbb_permissions = $phpbb_container->get('acl.permissions');
// Define names for template loops, might be able to be set
$tpl_pmask = 'p_mask';
@@ -270,7 +270,7 @@ class auth_admin extends auth
$tpl_category = 'category';
$tpl_mask = 'mask';
- $l_acl_type = (isset($user->lang['ACL_TYPE_' . (($local) ? 'LOCAL' : 'GLOBAL') . '_' . strtoupper($permission_type)])) ? $user->lang['ACL_TYPE_' . (($local) ? 'LOCAL' : 'GLOBAL') . '_' . strtoupper($permission_type)] : 'ACL_TYPE_' . (($local) ? 'LOCAL' : 'GLOBAL') . '_' . strtoupper($permission_type);
+ $l_acl_type = $phpbb_permissions->get_type_lang($permission_type, (($local) ? 'local' : 'global'));
// Allow trace for viewing permissions and in user mode
$show_trace = ($mode == 'view' && $user_mode == 'user') ? true : false;
@@ -506,7 +506,7 @@ class auth_admin extends auth
'FORUM_ID' => $forum_id)
);
- $this->assign_cat_array($ug_array, $tpl_pmask . '.' . $tpl_fmask . '.' . $tpl_category, $tpl_mask, $ug_id, $forum_id, $show_trace, ($mode == 'view'));
+ $this->assign_cat_array($ug_array, $tpl_pmask . '.' . $tpl_fmask . '.' . $tpl_category, $tpl_mask, $ug_id, $forum_id, ($mode == 'view'), $show_trace);
unset($content_array[$ug_id]);
}
@@ -530,8 +530,8 @@ class auth_admin extends auth
'NAME' => $ug_name,
'CATEGORIES' => implode('</th><th>', $categories),
- 'USER_GROUPS_DEFAULT' => ($user_mode == 'user' && isset($user_groups_default[$ug_id]) && sizeof($user_groups_default[$ug_id])) ? implode(', ', $user_groups_default[$ug_id]) : '',
- 'USER_GROUPS_CUSTOM' => ($user_mode == 'user' && isset($user_groups_custom[$ug_id]) && sizeof($user_groups_custom[$ug_id])) ? implode(', ', $user_groups_custom[$ug_id]) : '',
+ 'USER_GROUPS_DEFAULT' => ($user_mode == 'user' && isset($user_groups_default[$ug_id]) && sizeof($user_groups_default[$ug_id])) ? implode($user->lang['COMMA_SEPARATOR'], $user_groups_default[$ug_id]) : '',
+ 'USER_GROUPS_CUSTOM' => ($user_mode == 'user' && isset($user_groups_custom[$ug_id]) && sizeof($user_groups_custom[$ug_id])) ? implode($user->lang['COMMA_SEPARATOR'], $user_groups_custom[$ug_id]) : '',
'L_ACL_TYPE' => $l_acl_type,
'S_LOCAL' => ($local) ? true : false,
@@ -593,7 +593,7 @@ class auth_admin extends auth
'FORUM_ID' => $forum_id)
);
- $this->assign_cat_array($forum_array, $tpl_pmask . '.' . $tpl_fmask . '.' . $tpl_category, $tpl_mask, $ug_id, $forum_id, $show_trace, ($mode == 'view'));
+ $this->assign_cat_array($forum_array, $tpl_pmask . '.' . $tpl_fmask . '.' . $tpl_category, $tpl_mask, $ug_id, $forum_id, ($mode == 'view'), $show_trace);
}
unset($hold_ary[$ug_id], $ug_names_ary[$ug_id]);
@@ -1099,9 +1099,11 @@ class auth_admin extends auth
* Assign category to template
* used by display_mask()
*/
- function assign_cat_array(&$category_array, $tpl_cat, $tpl_mask, $ug_id, $forum_id, $show_trace = false, $s_view)
+ function assign_cat_array(&$category_array, $tpl_cat, $tpl_mask, $ug_id, $forum_id, $s_view, $show_trace = false)
{
- global $template, $user, $phpbb_admin_path, $phpEx;
+ global $template, $user, $phpbb_admin_path, $phpEx, $phpbb_container;
+
+ $phpbb_permissions = $phpbb_container->get('acl.permissions');
@reset($category_array);
while (list($cat, $cat_array) = each($category_array))
@@ -1111,8 +1113,8 @@ class auth_admin extends auth
'S_NEVER' => ($cat_array['S_NEVER'] && !$cat_array['S_YES'] && !$cat_array['S_NO']) ? true : false,
'S_NO' => ($cat_array['S_NO'] && !$cat_array['S_NEVER'] && !$cat_array['S_YES']) ? true : false,
- 'CAT_NAME' => $user->lang['permission_cat'][$cat])
- );
+ 'CAT_NAME' => $phpbb_permissions->get_category_lang($cat),
+ ));
/* Sort permissions by name (more naturaly and user friendly than sorting by a primary key)
* Commented out due to it's memory consumption and time needed
@@ -1146,8 +1148,8 @@ class auth_admin extends auth
'U_TRACE' => ($show_trace) ? append_sid("{$phpbb_admin_path}index.$phpEx", "i=permissions&amp;mode=trace&amp;u=$ug_id&amp;f=$forum_id&amp;auth=$permission") : '',
'UA_TRACE' => ($show_trace) ? append_sid("{$phpbb_admin_path}index.$phpEx", "i=permissions&mode=trace&u=$ug_id&f=$forum_id&auth=$permission", false) : '',
- 'PERMISSION' => $user->lang['acl_' . $permission]['lang'])
- );
+ 'PERMISSION' => $phpbb_permissions->get_permission_lang($permission),
+ ));
}
else
{
@@ -1164,8 +1166,8 @@ class auth_admin extends auth
'U_TRACE' => ($show_trace) ? append_sid("{$phpbb_admin_path}index.$phpEx", "i=permissions&amp;mode=trace&amp;u=$ug_id&amp;f=$forum_id&amp;auth=$permission") : '',
'UA_TRACE' => ($show_trace) ? append_sid("{$phpbb_admin_path}index.$phpEx", "i=permissions&mode=trace&u=$ug_id&f=$forum_id&auth=$permission", false) : '',
- 'PERMISSION' => $user->lang['acl_' . $permission]['lang'])
- );
+ 'PERMISSION' => $phpbb_permissions->get_permission_lang($permission),
+ ));
}
}
}
@@ -1177,7 +1179,9 @@ class auth_admin extends auth
*/
function build_permission_array(&$permission_row, &$content_array, &$categories, $key_sort_array)
{
- global $user;
+ global $user, $phpbb_container;
+
+ $phpbb_permissions = $phpbb_container->get('acl.permissions');
foreach ($key_sort_array as $forum_id)
{
@@ -1192,20 +1196,12 @@ class auth_admin extends auth
@reset($permissions);
while (list($permission, $auth_setting) = each($permissions))
{
- if (!isset($user->lang['acl_' . $permission]))
- {
- $user->lang['acl_' . $permission] = array(
- 'cat' => 'misc',
- 'lang' => '{ acl_' . $permission . ' }'
- );
- }
-
- $cat = $user->lang['acl_' . $permission]['cat'];
+ $cat = $phpbb_permissions->get_permission_category($permission);
// Build our categories array
if (!isset($categories[$cat]))
{
- $categories[$cat] = $user->lang['permission_cat'][$cat];
+ $categories[$cat] = $phpbb_permissions->get_category_lang($cat);
}
// Build our content array
@@ -1281,5 +1277,3 @@ class auth_admin extends auth
return true;
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/acp/info/acp_attachments.php b/phpBB/includes/acp/info/acp_attachments.php
index b77785801f..8fad241451 100644
--- a/phpBB/includes/acp/info/acp_attachments.php
+++ b/phpBB/includes/acp/info/acp_attachments.php
@@ -2,9 +2,8 @@
/**
*
* @package acp
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -23,7 +22,8 @@ class acp_attachments_info
'attach' => array('title' => 'ACP_ATTACHMENT_SETTINGS', 'auth' => 'acl_a_attach', 'cat' => array('ACP_BOARD_CONFIGURATION', 'ACP_ATTACHMENTS')),
'extensions' => array('title' => 'ACP_MANAGE_EXTENSIONS', 'auth' => 'acl_a_attach', 'cat' => array('ACP_ATTACHMENTS')),
'ext_groups' => array('title' => 'ACP_EXTENSION_GROUPS', 'auth' => 'acl_a_attach', 'cat' => array('ACP_ATTACHMENTS')),
- 'orphan' => array('title' => 'ACP_ORPHAN_ATTACHMENTS', 'auth' => 'acl_a_attach', 'cat' => array('ACP_ATTACHMENTS'))
+ 'orphan' => array('title' => 'ACP_ORPHAN_ATTACHMENTS', 'auth' => 'acl_a_attach', 'cat' => array('ACP_ATTACHMENTS')),
+ 'manage' => array('title' => 'ACP_MANAGE_ATTACHMENTS', 'auth' => 'acl_a_attach', 'cat' => array('ACP_ATTACHMENTS')),
),
);
}
@@ -36,5 +36,3 @@ class acp_attachments_info
{
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/acp/info/acp_ban.php b/phpBB/includes/acp/info/acp_ban.php
index df51011ec6..37f0f021a7 100644
--- a/phpBB/includes/acp/info/acp_ban.php
+++ b/phpBB/includes/acp/info/acp_ban.php
@@ -2,9 +2,8 @@
/**
*
* @package acp
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -35,5 +34,3 @@ class acp_ban_info
{
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/acp/info/acp_bbcodes.php b/phpBB/includes/acp/info/acp_bbcodes.php
index c0206432d6..5c88ca8a0f 100644
--- a/phpBB/includes/acp/info/acp_bbcodes.php
+++ b/phpBB/includes/acp/info/acp_bbcodes.php
@@ -2,9 +2,8 @@
/**
*
* @package acp
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -33,5 +32,3 @@ class acp_bbcodes_info
{
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/acp/info/acp_board.php b/phpBB/includes/acp/info/acp_board.php
index 3e18f55940..50d5a4f4e1 100644
--- a/phpBB/includes/acp/info/acp_board.php
+++ b/phpBB/includes/acp/info/acp_board.php
@@ -2,9 +2,8 @@
/**
*
* @package acp
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -48,5 +47,3 @@ class acp_board_info
{
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/acp/info/acp_bots.php b/phpBB/includes/acp/info/acp_bots.php
index 45087f9225..c30ab588ab 100644
--- a/phpBB/includes/acp/info/acp_bots.php
+++ b/phpBB/includes/acp/info/acp_bots.php
@@ -2,9 +2,8 @@
/**
*
* @package acp
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -33,6 +32,3 @@ class acp_bots_info
{
}
}
-
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/acp/info/acp_captcha.php b/phpBB/includes/acp/info/acp_captcha.php
index b2541c252c..3f31b4c102 100644
--- a/phpBB/includes/acp/info/acp_captcha.php
+++ b/phpBB/includes/acp/info/acp_captcha.php
@@ -2,9 +2,8 @@
/**
*
* @package acp
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -34,5 +33,3 @@ class acp_captcha_info
{
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/acp/info/acp_database.php b/phpBB/includes/acp/info/acp_database.php
index 85c3c8b21c..c8ad65e255 100644
--- a/phpBB/includes/acp/info/acp_database.php
+++ b/phpBB/includes/acp/info/acp_database.php
@@ -2,9 +2,8 @@
/**
*
* @package acp
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -34,5 +33,3 @@ class acp_database_info
{
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/acp/info/acp_disallow.php b/phpBB/includes/acp/info/acp_disallow.php
index 41315eb716..f9dd4c32c0 100644
--- a/phpBB/includes/acp/info/acp_disallow.php
+++ b/phpBB/includes/acp/info/acp_disallow.php
@@ -2,9 +2,8 @@
/**
*
* @package acp
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -33,6 +32,3 @@ class acp_disallow_info
{
}
}
-
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/acp/info/acp_email.php b/phpBB/includes/acp/info/acp_email.php
index 4ad7bca58b..620904c956 100644
--- a/phpBB/includes/acp/info/acp_email.php
+++ b/phpBB/includes/acp/info/acp_email.php
@@ -2,9 +2,8 @@
/**
*
* @package acp
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -33,6 +32,3 @@ class acp_email_info
{
}
}
-
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/acp/info/acp_extensions.php b/phpBB/includes/acp/info/acp_extensions.php
new file mode 100644
index 0000000000..174b365af0
--- /dev/null
+++ b/phpBB/includes/acp/info/acp_extensions.php
@@ -0,0 +1,34 @@
+<?php
+/**
+*
+* @package acp
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+/**
+* @package module_install
+*/
+class acp_extensions_info
+{
+ function module()
+ {
+ return array(
+ 'filename' => 'acp_extensions',
+ 'title' => 'ACP_EXTENSION_MANAGEMENT',
+ 'version' => '1.0.0',
+ 'modes' => array(
+ 'main' => array('title' => 'ACP_EXTENSIONS', 'auth' => 'acl_a_extensions', 'cat' => array('ACP_EXTENSION_MANAGEMENT')),
+ ),
+ );
+ }
+
+ function install()
+ {
+ }
+
+ function uninstall()
+ {
+ }
+}
diff --git a/phpBB/includes/acp/info/acp_forums.php b/phpBB/includes/acp/info/acp_forums.php
index 8d82eaf42d..e5281a4e58 100644
--- a/phpBB/includes/acp/info/acp_forums.php
+++ b/phpBB/includes/acp/info/acp_forums.php
@@ -2,9 +2,8 @@
/**
*
* @package acp
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -33,5 +32,3 @@ class acp_forums_info
{
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/acp/info/acp_groups.php b/phpBB/includes/acp/info/acp_groups.php
index 3910c24e6b..af3f4893fd 100644
--- a/phpBB/includes/acp/info/acp_groups.php
+++ b/phpBB/includes/acp/info/acp_groups.php
@@ -2,9 +2,8 @@
/**
*
* @package acp
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -21,6 +20,7 @@ class acp_groups_info
'version' => '1.0.0',
'modes' => array(
'manage' => array('title' => 'ACP_GROUPS_MANAGE', 'auth' => 'acl_a_group', 'cat' => array('ACP_GROUPS')),
+ 'position' => array('title' => 'ACP_GROUPS_POSITION', 'auth' => 'acl_a_group', 'cat' => array('ACP_GROUPS')),
),
);
}
@@ -33,5 +33,3 @@ class acp_groups_info
{
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/acp/info/acp_icons.php b/phpBB/includes/acp/info/acp_icons.php
index 16bf753940..e0cf05660c 100644
--- a/phpBB/includes/acp/info/acp_icons.php
+++ b/phpBB/includes/acp/info/acp_icons.php
@@ -2,9 +2,8 @@
/**
*
* @package acp
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -34,5 +33,3 @@ class acp_icons_info
{
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/acp/info/acp_inactive.php b/phpBB/includes/acp/info/acp_inactive.php
index e17fbda9dd..02b1fcdaa2 100644
--- a/phpBB/includes/acp/info/acp_inactive.php
+++ b/phpBB/includes/acp/info/acp_inactive.php
@@ -2,9 +2,8 @@
/**
*
* @package acp
-* @version $Id$
* @copyright (c) 2006 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -33,5 +32,3 @@ class acp_inactive_info
{
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/acp/info/acp_jabber.php b/phpBB/includes/acp/info/acp_jabber.php
index 7bcf7744e1..3ad05e1a6a 100644
--- a/phpBB/includes/acp/info/acp_jabber.php
+++ b/phpBB/includes/acp/info/acp_jabber.php
@@ -2,9 +2,8 @@
/**
*
* @package acp
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -33,4 +32,3 @@ class acp_jabber_info
{
}
}
-?> \ No newline at end of file
diff --git a/phpBB/includes/acp/info/acp_language.php b/phpBB/includes/acp/info/acp_language.php
index f7606631fe..7f33a22fa6 100644
--- a/phpBB/includes/acp/info/acp_language.php
+++ b/phpBB/includes/acp/info/acp_language.php
@@ -2,9 +2,8 @@
/**
*
* @package acp
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -20,7 +19,7 @@ class acp_language_info
'title' => 'ACP_LANGUAGE',
'version' => '1.0.0',
'modes' => array(
- 'lang_packs' => array('title' => 'ACP_LANGUAGE_PACKS', 'auth' => 'acl_a_language', 'cat' => array('ACP_GENERAL_TASKS')),
+ 'lang_packs' => array('title' => 'ACP_LANGUAGE_PACKS', 'auth' => 'acl_a_language', 'cat' => array('ACP_LANGUAGE')),
),
);
}
@@ -33,5 +32,3 @@ class acp_language_info
{
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/acp/info/acp_logs.php b/phpBB/includes/acp/info/acp_logs.php
index f119e10b83..033f9baf50 100644
--- a/phpBB/includes/acp/info/acp_logs.php
+++ b/phpBB/includes/acp/info/acp_logs.php
@@ -2,9 +2,8 @@
/**
*
* @package acp
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -36,5 +35,3 @@ class acp_logs_info
{
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/acp/info/acp_main.php b/phpBB/includes/acp/info/acp_main.php
index 5574cc40d1..4c1cb6dc0f 100644
--- a/phpBB/includes/acp/info/acp_main.php
+++ b/phpBB/includes/acp/info/acp_main.php
@@ -2,9 +2,8 @@
/**
*
* @package acp
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -33,5 +32,3 @@ class acp_main_info
{
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/acp/info/acp_modules.php b/phpBB/includes/acp/info/acp_modules.php
index 886f17d628..c9d2cffa72 100644
--- a/phpBB/includes/acp/info/acp_modules.php
+++ b/phpBB/includes/acp/info/acp_modules.php
@@ -2,9 +2,8 @@
/**
*
* @package acp
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -35,5 +34,3 @@ class acp_modules_info
{
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/acp/info/acp_permission_roles.php b/phpBB/includes/acp/info/acp_permission_roles.php
index 3ab2fecd53..ee2a3ee560 100644
--- a/phpBB/includes/acp/info/acp_permission_roles.php
+++ b/phpBB/includes/acp/info/acp_permission_roles.php
@@ -2,9 +2,8 @@
/**
*
* @package acp
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -36,5 +35,3 @@ class acp_permission_roles_info
{
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/acp/info/acp_permissions.php b/phpBB/includes/acp/info/acp_permissions.php
index 6f341742f3..7b51b67a96 100644
--- a/phpBB/includes/acp/info/acp_permissions.php
+++ b/phpBB/includes/acp/info/acp_permissions.php
@@ -2,9 +2,8 @@
/**
*
* @package acp
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -50,5 +49,3 @@ class acp_permissions_info
{
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/acp/info/acp_php_info.php b/phpBB/includes/acp/info/acp_php_info.php
index 7d716b0f83..a456e4b8b7 100644
--- a/phpBB/includes/acp/info/acp_php_info.php
+++ b/phpBB/includes/acp/info/acp_php_info.php
@@ -2,9 +2,8 @@
/**
*
* @package acp
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -33,5 +32,3 @@ class acp_php_info_info
{
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/acp/info/acp_profile.php b/phpBB/includes/acp/info/acp_profile.php
index 8590226038..6fa673b094 100644
--- a/phpBB/includes/acp/info/acp_profile.php
+++ b/phpBB/includes/acp/info/acp_profile.php
@@ -2,9 +2,8 @@
/**
*
* @package acp
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -33,5 +32,3 @@ class acp_profile_info
{
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/acp/info/acp_prune.php b/phpBB/includes/acp/info/acp_prune.php
index 46565c4f16..0f70d9d638 100644
--- a/phpBB/includes/acp/info/acp_prune.php
+++ b/phpBB/includes/acp/info/acp_prune.php
@@ -2,9 +2,8 @@
/**
*
* @package acp
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -21,7 +20,7 @@ class acp_prune_info
'version' => '1.0.0',
'modes' => array(
'forums' => array('title' => 'ACP_PRUNE_FORUMS', 'auth' => 'acl_a_prune', 'cat' => array('ACP_MANAGE_FORUMS')),
- 'users' => array('title' => 'ACP_PRUNE_USERS', 'auth' => 'acl_a_userdel', 'cat' => array('ACP_USER_SECURITY')),
+ 'users' => array('title' => 'ACP_PRUNE_USERS', 'auth' => 'acl_a_userdel', 'cat' => array('ACP_CAT_USERS')),
),
);
}
@@ -34,5 +33,3 @@ class acp_prune_info
{
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/acp/info/acp_ranks.php b/phpBB/includes/acp/info/acp_ranks.php
index 06b9c6d284..651a86471d 100644
--- a/phpBB/includes/acp/info/acp_ranks.php
+++ b/phpBB/includes/acp/info/acp_ranks.php
@@ -2,9 +2,8 @@
/**
*
* @package acp
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -33,5 +32,3 @@ class acp_ranks_info
{
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/acp/info/acp_reasons.php b/phpBB/includes/acp/info/acp_reasons.php
index 65d805ee18..9f8f2ced77 100644
--- a/phpBB/includes/acp/info/acp_reasons.php
+++ b/phpBB/includes/acp/info/acp_reasons.php
@@ -2,9 +2,8 @@
/**
*
* @package acp
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -33,5 +32,3 @@ class acp_reasons_info
{
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/acp/info/acp_search.php b/phpBB/includes/acp/info/acp_search.php
index 4afd6c6994..494d8afd67 100644
--- a/phpBB/includes/acp/info/acp_search.php
+++ b/phpBB/includes/acp/info/acp_search.php
@@ -2,9 +2,8 @@
/**
*
* @package acp
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -34,5 +33,3 @@ class acp_search_info
{
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/acp/info/acp_send_statistics.php b/phpBB/includes/acp/info/acp_send_statistics.php
index de5dcdb8ad..07e7f3ba5c 100644
--- a/phpBB/includes/acp/info/acp_send_statistics.php
+++ b/phpBB/includes/acp/info/acp_send_statistics.php
@@ -2,9 +2,8 @@
/**
*
* @package acp
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -33,5 +32,3 @@ class acp_send_statistics_info
{
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/acp/info/acp_styles.php b/phpBB/includes/acp/info/acp_styles.php
index db67167e39..3137c4781b 100644
--- a/phpBB/includes/acp/info/acp_styles.php
+++ b/phpBB/includes/acp/info/acp_styles.php
@@ -2,9 +2,8 @@
/**
*
* @package acp
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -18,12 +17,11 @@ class acp_styles_info
return array(
'filename' => 'acp_styles',
'title' => 'ACP_CAT_STYLES',
- 'version' => '1.0.0',
+ 'version' => '2.0.0',
'modes' => array(
'style' => array('title' => 'ACP_STYLES', 'auth' => 'acl_a_styles', 'cat' => array('ACP_STYLE_MANAGEMENT')),
- 'template' => array('title' => 'ACP_TEMPLATES', 'auth' => 'acl_a_styles', 'cat' => array('ACP_STYLE_COMPONENTS')),
- 'theme' => array('title' => 'ACP_THEMES', 'auth' => 'acl_a_styles', 'cat' => array('ACP_STYLE_COMPONENTS')),
- 'imageset' => array('title' => 'ACP_IMAGESETS', 'auth' => 'acl_a_styles', 'cat' => array('ACP_STYLE_COMPONENTS')),
+ 'install' => array('title' => 'ACP_STYLES_INSTALL', 'auth' => 'acl_a_styles', 'cat' => array('ACP_STYLE_MANAGEMENT')),
+ 'cache' => array('title' => 'ACP_STYLES_CACHE', 'auth' => 'acl_a_styles', 'cat' => array('ACP_STYLE_MANAGEMENT')),
),
);
}
@@ -36,5 +34,3 @@ class acp_styles_info
{
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/acp/info/acp_update.php b/phpBB/includes/acp/info/acp_update.php
index 886cdc94d5..3d491216a8 100644
--- a/phpBB/includes/acp/info/acp_update.php
+++ b/phpBB/includes/acp/info/acp_update.php
@@ -2,9 +2,8 @@
/**
*
* @package acp
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -33,5 +32,3 @@ class acp_update_info
{
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/acp/info/acp_users.php b/phpBB/includes/acp/info/acp_users.php
index 10081ac870..1848622a1c 100644
--- a/phpBB/includes/acp/info/acp_users.php
+++ b/phpBB/includes/acp/info/acp_users.php
@@ -2,9 +2,8 @@
/**
*
* @package acp
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -43,5 +42,3 @@ class acp_users_info
{
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/acp/info/acp_words.php b/phpBB/includes/acp/info/acp_words.php
index a2417f8a7f..48cb3fbdd1 100644
--- a/phpBB/includes/acp/info/acp_words.php
+++ b/phpBB/includes/acp/info/acp_words.php
@@ -2,9 +2,8 @@
/**
*
* @package acp
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -33,5 +32,3 @@ class acp_words_info
{
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/auth/auth_apache.php b/phpBB/includes/auth/auth_apache.php
deleted file mode 100644
index 391e7abb0e..0000000000
--- a/phpBB/includes/auth/auth_apache.php
+++ /dev/null
@@ -1,249 +0,0 @@
-<?php
-/**
-* Apache auth plug-in for phpBB3
-*
-* Authentication plug-ins is largely down to Sergey Kanareykin, our thanks to him.
-*
-* @package login
-* @version $Id$
-* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
-*
-*/
-
-/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
-* Checks whether the user is identified to apache
-* Only allow changing authentication to apache if the user is identified
-* Called in acp_board while setting authentication plugins
-*
-* @return boolean|string false if the user is identified and else an error message
-*/
-function init_apache()
-{
- global $user;
-
- if (!isset($_SERVER['PHP_AUTH_USER']) || $user->data['username'] !== $_SERVER['PHP_AUTH_USER'])
- {
- return $user->lang['APACHE_SETUP_BEFORE_USE'];
- }
- return false;
-}
-
-/**
-* Login function
-*/
-function login_apache(&$username, &$password)
-{
- global $db;
-
- // do not allow empty password
- if (!$password)
- {
- return array(
- 'status' => LOGIN_ERROR_PASSWORD,
- 'error_msg' => 'NO_PASSWORD_SUPPLIED',
- 'user_row' => array('user_id' => ANONYMOUS),
- );
- }
-
- if (!$username)
- {
- return array(
- 'status' => LOGIN_ERROR_USERNAME,
- 'error_msg' => 'LOGIN_ERROR_USERNAME',
- 'user_row' => array('user_id' => ANONYMOUS),
- );
- }
-
- if (!isset($_SERVER['PHP_AUTH_USER']))
- {
- return array(
- 'status' => LOGIN_ERROR_EXTERNAL_AUTH,
- 'error_msg' => 'LOGIN_ERROR_EXTERNAL_AUTH_APACHE',
- 'user_row' => array('user_id' => ANONYMOUS),
- );
- }
-
- $php_auth_user = $_SERVER['PHP_AUTH_USER'];
- $php_auth_pw = $_SERVER['PHP_AUTH_PW'];
-
- if (!empty($php_auth_user) && !empty($php_auth_pw))
- {
- if ($php_auth_user !== $username)
- {
- return array(
- 'status' => LOGIN_ERROR_USERNAME,
- 'error_msg' => 'LOGIN_ERROR_USERNAME',
- 'user_row' => array('user_id' => ANONYMOUS),
- );
- }
-
- $sql = 'SELECT user_id, username, user_password, user_passchg, user_email, user_type
- FROM ' . USERS_TABLE . "
- WHERE username = '" . $db->sql_escape($php_auth_user) . "'";
- $result = $db->sql_query($sql);
- $row = $db->sql_fetchrow($result);
- $db->sql_freeresult($result);
-
- if ($row)
- {
- // User inactive...
- if ($row['user_type'] == USER_INACTIVE || $row['user_type'] == USER_IGNORE)
- {
- return array(
- 'status' => LOGIN_ERROR_ACTIVE,
- 'error_msg' => 'ACTIVE_ERROR',
- 'user_row' => $row,
- );
- }
-
- // Successful login...
- return array(
- 'status' => LOGIN_SUCCESS,
- 'error_msg' => false,
- 'user_row' => $row,
- );
- }
-
- // this is the user's first login so create an empty profile
- return array(
- 'status' => LOGIN_SUCCESS_CREATE_PROFILE,
- 'error_msg' => false,
- 'user_row' => user_row_apache($php_auth_user, $php_auth_pw),
- );
- }
-
- // Not logged into apache
- return array(
- 'status' => LOGIN_ERROR_EXTERNAL_AUTH,
- 'error_msg' => 'LOGIN_ERROR_EXTERNAL_AUTH_APACHE',
- 'user_row' => array('user_id' => ANONYMOUS),
- );
-}
-
-/**
-* Autologin function
-*
-* @return array containing the user row or empty if no auto login should take place
-*/
-function autologin_apache()
-{
- global $db;
-
- if (!isset($_SERVER['PHP_AUTH_USER']))
- {
- return array();
- }
-
- $php_auth_user = $_SERVER['PHP_AUTH_USER'];
- $php_auth_pw = $_SERVER['PHP_AUTH_PW'];
-
- if (!empty($php_auth_user) && !empty($php_auth_pw))
- {
- set_var($php_auth_user, $php_auth_user, 'string', true);
- set_var($php_auth_pw, $php_auth_pw, 'string', true);
-
- $sql = 'SELECT *
- FROM ' . USERS_TABLE . "
- WHERE username = '" . $db->sql_escape($php_auth_user) . "'";
- $result = $db->sql_query($sql);
- $row = $db->sql_fetchrow($result);
- $db->sql_freeresult($result);
-
- if ($row)
- {
- return ($row['user_type'] == USER_INACTIVE || $row['user_type'] == USER_IGNORE) ? array() : $row;
- }
-
- if (!function_exists('user_add'))
- {
- global $phpbb_root_path, $phpEx;
-
- include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
- }
-
- // create the user if he does not exist yet
- user_add(user_row_apache($php_auth_user, $php_auth_pw));
-
- $sql = 'SELECT *
- FROM ' . USERS_TABLE . "
- WHERE username_clean = '" . $db->sql_escape(utf8_clean_string($php_auth_user)) . "'";
- $result = $db->sql_query($sql);
- $row = $db->sql_fetchrow($result);
- $db->sql_freeresult($result);
-
- if ($row)
- {
- return $row;
- }
- }
-
- return array();
-}
-
-/**
-* This function generates an array which can be passed to the user_add function in order to create a user
-*/
-function user_row_apache($username, $password)
-{
- global $db, $config, $user;
- // first retrieve default group id
- $sql = 'SELECT group_id
- FROM ' . GROUPS_TABLE . "
- WHERE group_name = '" . $db->sql_escape('REGISTERED') . "'
- AND group_type = " . GROUP_SPECIAL;
- $result = $db->sql_query($sql);
- $row = $db->sql_fetchrow($result);
- $db->sql_freeresult($result);
-
- if (!$row)
- {
- trigger_error('NO_GROUP');
- }
-
- // generate user account data
- return array(
- 'username' => $username,
- 'user_password' => phpbb_hash($password),
- 'user_email' => '',
- 'group_id' => (int) $row['group_id'],
- 'user_type' => USER_NORMAL,
- 'user_ip' => $user->ip,
- 'user_new' => ($config['new_member_post_limit']) ? 1 : 0,
- );
-}
-
-/**
-* The session validation function checks whether the user is still logged in
-*
-* @return boolean true if the given user is authenticated or false if the session should be closed
-*/
-function validate_session_apache(&$user)
-{
- // Check if PHP_AUTH_USER is set and handle this case
- if (isset($_SERVER['PHP_AUTH_USER']))
- {
- $php_auth_user = '';
- set_var($php_auth_user, $_SERVER['PHP_AUTH_USER'], 'string', true);
-
- return ($php_auth_user === $user['username']) ? true : false;
- }
-
- // PHP_AUTH_USER is not set. A valid session is now determined by the user type (anonymous/bot or not)
- if ($user['user_type'] == USER_IGNORE)
- {
- return true;
- }
-
- return false;
-}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/auth/auth_db.php b/phpBB/includes/auth/auth_db.php
deleted file mode 100644
index 1c6cdf7832..0000000000
--- a/phpBB/includes/auth/auth_db.php
+++ /dev/null
@@ -1,276 +0,0 @@
-<?php
-/**
-* Database auth plug-in for phpBB3
-*
-* Authentication plug-ins is largely down to Sergey Kanareykin, our thanks to him.
-*
-* This is for authentication via the integrated user table
-*
-* @package login
-* @version $Id$
-* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
-*
-*/
-
-/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
-* Login function
-*
-* @param string $username
-* @param string $password
-* @param string $ip IP address the login is taking place from. Used to
-* limit the number of login attempts per IP address.
-* @param string $browser The user agent used to login
-* @param string $forwarded_for X_FORWARDED_FOR header sent with login request
-* @return array A associative array of the format
-* array(
-* 'status' => status constant
-* 'error_msg' => string
-* 'user_row' => array
-* )
-*/
-function login_db($username, $password, $ip = '', $browser = '', $forwarded_for = '')
-{
- global $db, $config;
-
- // do not allow empty password
- if (!$password)
- {
- return array(
- 'status' => LOGIN_ERROR_PASSWORD,
- 'error_msg' => 'NO_PASSWORD_SUPPLIED',
- 'user_row' => array('user_id' => ANONYMOUS),
- );
- }
-
- if (!$username)
- {
- return array(
- 'status' => LOGIN_ERROR_USERNAME,
- 'error_msg' => 'LOGIN_ERROR_USERNAME',
- 'user_row' => array('user_id' => ANONYMOUS),
- );
- }
-
- $username_clean = utf8_clean_string($username);
-
- $sql = 'SELECT user_id, username, user_password, user_passchg, user_pass_convert, user_email, user_type, user_login_attempts
- FROM ' . USERS_TABLE . "
- WHERE username_clean = '" . $db->sql_escape($username_clean) . "'";
- $result = $db->sql_query($sql);
- $row = $db->sql_fetchrow($result);
- $db->sql_freeresult($result);
-
- if (($ip && !$config['ip_login_limit_use_forwarded']) ||
- ($forwarded_for && $config['ip_login_limit_use_forwarded']))
- {
- $sql = 'SELECT COUNT(*) AS attempts
- FROM ' . LOGIN_ATTEMPT_TABLE . '
- WHERE attempt_time > ' . (time() - (int) $config['ip_login_limit_time']);
- if ($config['ip_login_limit_use_forwarded'])
- {
- $sql .= " AND attempt_forwarded_for = '" . $db->sql_escape($forwarded_for) . "'";
- }
- else
- {
- $sql .= " AND attempt_ip = '" . $db->sql_escape($ip) . "' ";
- }
-
- $result = $db->sql_query($sql);
- $attempts = (int) $db->sql_fetchfield('attempts');
- $db->sql_freeresult($result);
-
- $attempt_data = array(
- 'attempt_ip' => $ip,
- 'attempt_browser' => trim(substr($browser, 0, 149)),
- 'attempt_forwarded_for' => $forwarded_for,
- 'attempt_time' => time(),
- 'user_id' => ($row) ? (int) $row['user_id'] : 0,
- 'username' => $username,
- 'username_clean' => $username_clean,
- );
- $sql = 'INSERT INTO ' . LOGIN_ATTEMPT_TABLE . $db->sql_build_array('INSERT', $attempt_data);
- $result = $db->sql_query($sql);
- }
- else
- {
- $attempts = 0;
- }
-
- if (!$row)
- {
- if ($config['ip_login_limit_max'] && $attempts >= $config['ip_login_limit_max'])
- {
- return array(
- 'status' => LOGIN_ERROR_ATTEMPTS,
- 'error_msg' => 'LOGIN_ERROR_ATTEMPTS',
- 'user_row' => array('user_id' => ANONYMOUS),
- );
- }
-
- return array(
- 'status' => LOGIN_ERROR_USERNAME,
- 'error_msg' => 'LOGIN_ERROR_USERNAME',
- 'user_row' => array('user_id' => ANONYMOUS),
- );
- }
-
- $show_captcha = ($config['max_login_attempts'] && $row['user_login_attempts'] >= $config['max_login_attempts']) ||
- ($config['ip_login_limit_max'] && $attempts >= $config['ip_login_limit_max']);
-
- // If there are too much login attempts, we need to check for an confirm image
- // Every auth module is able to define what to do by itself...
- if ($show_captcha)
- {
- // Visual Confirmation handling
- if (!class_exists('phpbb_captcha_factory'))
- {
- global $phpbb_root_path, $phpEx;
- include ($phpbb_root_path . 'includes/captcha/captcha_factory.' . $phpEx);
- }
-
- $captcha =& phpbb_captcha_factory::get_instance($config['captcha_plugin']);
- $captcha->init(CONFIRM_LOGIN);
- $vc_response = $captcha->validate($row);
- if ($vc_response)
- {
- return array(
- 'status' => LOGIN_ERROR_ATTEMPTS,
- 'error_msg' => 'LOGIN_ERROR_ATTEMPTS',
- 'user_row' => $row,
- );
- }
- else
- {
- $captcha->reset();
- }
-
- }
-
- // If the password convert flag is set we need to convert it
- if ($row['user_pass_convert'])
- {
- // in phpBB2 passwords were used exactly as they were sent, with addslashes applied
- $password_old_format = isset($_REQUEST['password']) ? (string) $_REQUEST['password'] : '';
- $password_old_format = (!STRIP) ? addslashes($password_old_format) : $password_old_format;
- $password_new_format = '';
-
- set_var($password_new_format, stripslashes($password_old_format), 'string', true);
-
- if ($password == $password_new_format)
- {
- if (!function_exists('utf8_to_cp1252'))
- {
- global $phpbb_root_path, $phpEx;
- include($phpbb_root_path . 'includes/utf/data/recode_basic.' . $phpEx);
- }
-
- // cp1252 is phpBB2's default encoding, characters outside ASCII range might work when converted into that encoding
- // plain md5 support left in for conversions from other systems.
- if ((strlen($row['user_password']) == 34 && (phpbb_check_hash(md5($password_old_format), $row['user_password']) || phpbb_check_hash(md5(utf8_to_cp1252($password_old_format)), $row['user_password'])))
- || (strlen($row['user_password']) == 32 && (md5($password_old_format) == $row['user_password'] || md5(utf8_to_cp1252($password_old_format)) == $row['user_password'])))
- {
- $hash = phpbb_hash($password_new_format);
-
- // Update the password in the users table to the new format and remove user_pass_convert flag
- $sql = 'UPDATE ' . USERS_TABLE . '
- SET user_password = \'' . $db->sql_escape($hash) . '\',
- user_pass_convert = 0
- WHERE user_id = ' . $row['user_id'];
- $db->sql_query($sql);
-
- $row['user_pass_convert'] = 0;
- $row['user_password'] = $hash;
- }
- else
- {
- // Although we weren't able to convert this password we have to
- // increase login attempt count to make sure this cannot be exploited
- $sql = 'UPDATE ' . USERS_TABLE . '
- SET user_login_attempts = user_login_attempts + 1
- WHERE user_id = ' . (int) $row['user_id'] . '
- AND user_login_attempts < ' . LOGIN_ATTEMPTS_MAX;
- $db->sql_query($sql);
-
- return array(
- 'status' => LOGIN_ERROR_PASSWORD_CONVERT,
- 'error_msg' => 'LOGIN_ERROR_PASSWORD_CONVERT',
- 'user_row' => $row,
- );
- }
- }
- }
-
- // Check password ...
- if (!$row['user_pass_convert'] && phpbb_check_hash($password, $row['user_password']))
- {
- // Check for old password hash...
- if (strlen($row['user_password']) == 32)
- {
- $hash = phpbb_hash($password);
-
- // Update the password in the users table to the new format
- $sql = 'UPDATE ' . USERS_TABLE . "
- SET user_password = '" . $db->sql_escape($hash) . "',
- user_pass_convert = 0
- WHERE user_id = {$row['user_id']}";
- $db->sql_query($sql);
-
- $row['user_password'] = $hash;
- }
-
- $sql = 'DELETE FROM ' . LOGIN_ATTEMPT_TABLE . '
- WHERE user_id = ' . $row['user_id'];
- $db->sql_query($sql);
-
- if ($row['user_login_attempts'] != 0)
- {
- // Successful, reset login attempts (the user passed all stages)
- $sql = 'UPDATE ' . USERS_TABLE . '
- SET user_login_attempts = 0
- WHERE user_id = ' . $row['user_id'];
- $db->sql_query($sql);
- }
-
- // User inactive...
- if ($row['user_type'] == USER_INACTIVE || $row['user_type'] == USER_IGNORE)
- {
- return array(
- 'status' => LOGIN_ERROR_ACTIVE,
- 'error_msg' => 'ACTIVE_ERROR',
- 'user_row' => $row,
- );
- }
-
- // Successful login... set user_login_attempts to zero...
- return array(
- 'status' => LOGIN_SUCCESS,
- 'error_msg' => false,
- 'user_row' => $row,
- );
- }
-
- // Password incorrect - increase login attempts
- $sql = 'UPDATE ' . USERS_TABLE . '
- SET user_login_attempts = user_login_attempts + 1
- WHERE user_id = ' . (int) $row['user_id'] . '
- AND user_login_attempts < ' . LOGIN_ATTEMPTS_MAX;
- $db->sql_query($sql);
-
- // Give status about wrong password...
- return array(
- 'status' => ($show_captcha) ? LOGIN_ERROR_ATTEMPTS : LOGIN_ERROR_PASSWORD,
- 'error_msg' => ($show_captcha) ? 'LOGIN_ERROR_ATTEMPTS' : 'LOGIN_ERROR_PASSWORD',
- 'user_row' => $row,
- );
-}
-
-?>
diff --git a/phpBB/includes/auth/auth_ldap.php b/phpBB/includes/auth/auth_ldap.php
deleted file mode 100644
index eebf147d48..0000000000
--- a/phpBB/includes/auth/auth_ldap.php
+++ /dev/null
@@ -1,353 +0,0 @@
-<?php
-/**
-*
-* LDAP auth plug-in for phpBB3
-*
-* Authentication plug-ins is largely down to Sergey Kanareykin, our thanks to him.
-*
-* @package login
-* @version $Id$
-* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
-*
-*/
-
-/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
-* Connect to ldap server
-* Only allow changing authentication to ldap if we can connect to the ldap server
-* Called in acp_board while setting authentication plugins
-*/
-function init_ldap()
-{
- global $config, $user;
-
- if (!@extension_loaded('ldap'))
- {
- return $user->lang['LDAP_NO_LDAP_EXTENSION'];
- }
-
- $config['ldap_port'] = (int) $config['ldap_port'];
- if ($config['ldap_port'])
- {
- $ldap = @ldap_connect($config['ldap_server'], $config['ldap_port']);
- }
- else
- {
- $ldap = @ldap_connect($config['ldap_server']);
- }
-
- if (!$ldap)
- {
- return $user->lang['LDAP_NO_SERVER_CONNECTION'];
- }
-
- @ldap_set_option($ldap, LDAP_OPT_PROTOCOL_VERSION, 3);
- @ldap_set_option($ldap, LDAP_OPT_REFERRALS, 0);
-
- if ($config['ldap_user'] || $config['ldap_password'])
- {
- if (!@ldap_bind($ldap, htmlspecialchars_decode($config['ldap_user']), htmlspecialchars_decode($config['ldap_password'])))
- {
- return $user->lang['LDAP_INCORRECT_USER_PASSWORD'];
- }
- }
-
- // ldap_connect only checks whether the specified server is valid, so the connection might still fail
- $search = @ldap_search(
- $ldap,
- htmlspecialchars_decode($config['ldap_base_dn']),
- ldap_user_filter($user->data['username']),
- (empty($config['ldap_email'])) ?
- array(htmlspecialchars_decode($config['ldap_uid'])) :
- array(htmlspecialchars_decode($config['ldap_uid']), htmlspecialchars_decode($config['ldap_email'])),
- 0,
- 1
- );
-
- if ($search === false)
- {
- return $user->lang['LDAP_SEARCH_FAILED'];
- }
-
- $result = @ldap_get_entries($ldap, $search);
-
- @ldap_close($ldap);
-
-
- if (!is_array($result) || sizeof($result) < 2)
- {
- return sprintf($user->lang['LDAP_NO_IDENTITY'], $user->data['username']);
- }
-
- if (!empty($config['ldap_email']) && !isset($result[0][htmlspecialchars_decode($config['ldap_email'])]))
- {
- return $user->lang['LDAP_NO_EMAIL'];
- }
-
- return false;
-}
-
-/**
-* Login function
-*/
-function login_ldap(&$username, &$password)
-{
- global $db, $config, $user;
-
- // do not allow empty password
- if (!$password)
- {
- return array(
- 'status' => LOGIN_ERROR_PASSWORD,
- 'error_msg' => 'NO_PASSWORD_SUPPLIED',
- 'user_row' => array('user_id' => ANONYMOUS),
- );
- }
-
- if (!$username)
- {
- return array(
- 'status' => LOGIN_ERROR_USERNAME,
- 'error_msg' => 'LOGIN_ERROR_USERNAME',
- 'user_row' => array('user_id' => ANONYMOUS),
- );
- }
-
- if (!@extension_loaded('ldap'))
- {
- return array(
- 'status' => LOGIN_ERROR_EXTERNAL_AUTH,
- 'error_msg' => 'LDAP_NO_LDAP_EXTENSION',
- 'user_row' => array('user_id' => ANONYMOUS),
- );
- }
-
- $config['ldap_port'] = (int) $config['ldap_port'];
- if ($config['ldap_port'])
- {
- $ldap = @ldap_connect($config['ldap_server'], $config['ldap_port']);
- }
- else
- {
- $ldap = @ldap_connect($config['ldap_server']);
- }
-
- if (!$ldap)
- {
- return array(
- 'status' => LOGIN_ERROR_EXTERNAL_AUTH,
- 'error_msg' => 'LDAP_NO_SERVER_CONNECTION',
- 'user_row' => array('user_id' => ANONYMOUS),
- );
- }
-
- @ldap_set_option($ldap, LDAP_OPT_PROTOCOL_VERSION, 3);
- @ldap_set_option($ldap, LDAP_OPT_REFERRALS, 0);
-
- if ($config['ldap_user'] || $config['ldap_password'])
- {
- if (!@ldap_bind($ldap, htmlspecialchars_decode($config['ldap_user']), htmlspecialchars_decode($config['ldap_password'])))
- {
- return array(
- 'status' => LOGIN_ERROR_EXTERNAL_AUTH,
- 'error_msg' => 'LDAP_NO_SERVER_CONNECTION',
- 'user_row' => array('user_id' => ANONYMOUS),
- );
- }
- }
-
- $search = @ldap_search(
- $ldap,
- htmlspecialchars_decode($config['ldap_base_dn']),
- ldap_user_filter($username),
- (empty($config['ldap_email'])) ?
- array(htmlspecialchars_decode($config['ldap_uid'])) :
- array(htmlspecialchars_decode($config['ldap_uid']), htmlspecialchars_decode($config['ldap_email'])),
- 0,
- 1
- );
-
- $ldap_result = @ldap_get_entries($ldap, $search);
-
- if (is_array($ldap_result) && sizeof($ldap_result) > 1)
- {
- if (@ldap_bind($ldap, $ldap_result[0]['dn'], htmlspecialchars_decode($password)))
- {
- @ldap_close($ldap);
-
- $sql ='SELECT user_id, username, user_password, user_passchg, user_email, user_type
- FROM ' . USERS_TABLE . "
- WHERE username_clean = '" . $db->sql_escape(utf8_clean_string($username)) . "'";
- $result = $db->sql_query($sql);
- $row = $db->sql_fetchrow($result);
- $db->sql_freeresult($result);
-
- if ($row)
- {
- unset($ldap_result);
-
- // User inactive...
- if ($row['user_type'] == USER_INACTIVE || $row['user_type'] == USER_IGNORE)
- {
- return array(
- 'status' => LOGIN_ERROR_ACTIVE,
- 'error_msg' => 'ACTIVE_ERROR',
- 'user_row' => $row,
- );
- }
-
- // Successful login... set user_login_attempts to zero...
- return array(
- 'status' => LOGIN_SUCCESS,
- 'error_msg' => false,
- 'user_row' => $row,
- );
- }
- else
- {
- // retrieve default group id
- $sql = 'SELECT group_id
- FROM ' . GROUPS_TABLE . "
- WHERE group_name = '" . $db->sql_escape('REGISTERED') . "'
- AND group_type = " . GROUP_SPECIAL;
- $result = $db->sql_query($sql);
- $row = $db->sql_fetchrow($result);
- $db->sql_freeresult($result);
-
- if (!$row)
- {
- trigger_error('NO_GROUP');
- }
-
- // generate user account data
- $ldap_user_row = array(
- 'username' => $username,
- 'user_password' => phpbb_hash($password),
- 'user_email' => (!empty($config['ldap_email'])) ? utf8_htmlspecialchars($ldap_result[0][htmlspecialchars_decode($config['ldap_email'])][0]) : '',
- 'group_id' => (int) $row['group_id'],
- 'user_type' => USER_NORMAL,
- 'user_ip' => $user->ip,
- 'user_new' => ($config['new_member_post_limit']) ? 1 : 0,
- );
-
- unset($ldap_result);
-
- // this is the user's first login so create an empty profile
- return array(
- 'status' => LOGIN_SUCCESS_CREATE_PROFILE,
- 'error_msg' => false,
- 'user_row' => $ldap_user_row,
- );
- }
- }
- else
- {
- unset($ldap_result);
- @ldap_close($ldap);
-
- // Give status about wrong password...
- return array(
- 'status' => LOGIN_ERROR_PASSWORD,
- 'error_msg' => 'LOGIN_ERROR_PASSWORD',
- 'user_row' => array('user_id' => ANONYMOUS),
- );
- }
- }
-
- @ldap_close($ldap);
-
- return array(
- 'status' => LOGIN_ERROR_USERNAME,
- 'error_msg' => 'LOGIN_ERROR_USERNAME',
- 'user_row' => array('user_id' => ANONYMOUS),
- );
-}
-
-/**
-* Generates a filter string for ldap_search to find a user
-*
-* @param $username string Username identifying the searched user
-*
-* @return string A filter string for ldap_search
-*/
-function ldap_user_filter($username)
-{
- global $config;
-
- $filter = '(' . $config['ldap_uid'] . '=' . ldap_escape(htmlspecialchars_decode($username)) . ')';
- if ($config['ldap_user_filter'])
- {
- $_filter = ($config['ldap_user_filter'][0] == '(' && substr($config['ldap_user_filter'], -1) == ')') ? $config['ldap_user_filter'] : "({$config['ldap_user_filter']})";
- $filter = "(&{$filter}{$_filter})";
- }
- return $filter;
-}
-
-/**
-* Escapes an LDAP AttributeValue
-*/
-function ldap_escape($string)
-{
- return str_replace(array('*', '\\', '(', ')'), array('\\*', '\\\\', '\\(', '\\)'), $string);
-}
-
-/**
-* This function is used to output any required fields in the authentication
-* admin panel. It also defines any required configuration table fields.
-*/
-function acp_ldap(&$new)
-{
- global $user;
-
- $tpl = '
-
- <dl>
- <dt><label for="ldap_server">' . $user->lang['LDAP_SERVER'] . ':</label><br /><span>' . $user->lang['LDAP_SERVER_EXPLAIN'] . '</span></dt>
- <dd><input type="text" id="ldap_server" size="40" name="config[ldap_server]" value="' . $new['ldap_server'] . '" /></dd>
- </dl>
- <dl>
- <dt><label for="ldap_port">' . $user->lang['LDAP_PORT'] . ':</label><br /><span>' . $user->lang['LDAP_PORT_EXPLAIN'] . '</span></dt>
- <dd><input type="text" id="ldap_port" size="40" name="config[ldap_port]" value="' . $new['ldap_port'] . '" /></dd>
- </dl>
- <dl>
- <dt><label for="ldap_dn">' . $user->lang['LDAP_DN'] . ':</label><br /><span>' . $user->lang['LDAP_DN_EXPLAIN'] . '</span></dt>
- <dd><input type="text" id="ldap_dn" size="40" name="config[ldap_base_dn]" value="' . $new['ldap_base_dn'] . '" /></dd>
- </dl>
- <dl>
- <dt><label for="ldap_uid">' . $user->lang['LDAP_UID'] . ':</label><br /><span>' . $user->lang['LDAP_UID_EXPLAIN'] . '</span></dt>
- <dd><input type="text" id="ldap_uid" size="40" name="config[ldap_uid]" value="' . $new['ldap_uid'] . '" /></dd>
- </dl>
- <dl>
- <dt><label for="ldap_user_filter">' . $user->lang['LDAP_USER_FILTER'] . ':</label><br /><span>' . $user->lang['LDAP_USER_FILTER_EXPLAIN'] . '</span></dt>
- <dd><input type="text" id="ldap_user_filter" size="40" name="config[ldap_user_filter]" value="' . $new['ldap_user_filter'] . '" /></dd>
- </dl>
- <dl>
- <dt><label for="ldap_email">' . $user->lang['LDAP_EMAIL'] . ':</label><br /><span>' . $user->lang['LDAP_EMAIL_EXPLAIN'] . '</span></dt>
- <dd><input type="text" id="ldap_email" size="40" name="config[ldap_email]" value="' . $new['ldap_email'] . '" /></dd>
- </dl>
- <dl>
- <dt><label for="ldap_user">' . $user->lang['LDAP_USER'] . ':</label><br /><span>' . $user->lang['LDAP_USER_EXPLAIN'] . '</span></dt>
- <dd><input type="text" id="ldap_user" size="40" name="config[ldap_user]" value="' . $new['ldap_user'] . '" /></dd>
- </dl>
- <dl>
- <dt><label for="ldap_password">' . $user->lang['LDAP_PASSWORD'] . ':</label><br /><span>' . $user->lang['LDAP_PASSWORD_EXPLAIN'] . '</span></dt>
- <dd><input type="password" id="ldap_password" size="40" name="config[ldap_password]" value="' . $new['ldap_password'] . '" autocomplete="off" /></dd>
- </dl>
- ';
-
- // These are fields required in the config table
- return array(
- 'tpl' => $tpl,
- 'config' => array('ldap_server', 'ldap_port', 'ldap_base_dn', 'ldap_uid', 'ldap_user_filter', 'ldap_email', 'ldap_user', 'ldap_password')
- );
-}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/bbcode.php b/phpBB/includes/bbcode.php
index f587e111f3..683fbf0fd2 100644
--- a/phpBB/includes/bbcode.php
+++ b/phpBB/includes/bbcode.php
@@ -2,9 +2,8 @@
/**
*
* @package phpBB3
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -30,7 +29,6 @@ class bbcode
var $bbcodes = array();
var $template_bitfield;
- var $template_filename = '';
/**
* Constructor
@@ -128,28 +126,16 @@ class bbcode
*/
function bbcode_cache_init()
{
- global $phpbb_root_path, $template, $user;
+ global $phpbb_root_path, $phpEx, $config, $user, $phpbb_extension_manager, $phpbb_path_helper;
if (empty($this->template_filename))
{
- $this->template_bitfield = new bitfield($user->theme['bbcode_bitfield']);
- $this->template_filename = $phpbb_root_path . 'styles/' . $user->theme['template_path'] . '/template/bbcode.html';
+ $this->template_bitfield = new bitfield($user->style['bbcode_bitfield']);
- if (!@file_exists($this->template_filename))
- {
- if (isset($user->theme['template_inherits_id']) && $user->theme['template_inherits_id'])
- {
- $this->template_filename = $phpbb_root_path . 'styles/' . $user->theme['template_inherit_path'] . '/template/bbcode.html';
- if (!@file_exists($this->template_filename))
- {
- trigger_error('The file ' . $this->template_filename . ' is missing.', E_USER_ERROR);
- }
- }
- else
- {
- trigger_error('The file ' . $this->template_filename . ' is missing.', E_USER_ERROR);
- }
- }
+ $template = new phpbb\template\twig\twig($phpbb_path_helper, $config, $user, new phpbb\template\context(), $phpbb_extension_manager);
+ $template->set_style();
+ $template->set_filenames(array('bbcode.html' => 'bbcode.html'));
+ $this->template_filename = $template->get_source_file_for_handle('bbcode.html');
}
$bbcode_ids = $rowset = $sql = array();
@@ -605,5 +591,3 @@ class bbcode
return $code;
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/captcha/captcha_factory.php b/phpBB/includes/captcha/captcha_factory.php
index 131c0b3b77..fac45087e3 100644
--- a/phpBB/includes/captcha/captcha_factory.php
+++ b/phpBB/includes/captcha/captcha_factory.php
@@ -2,9 +2,8 @@
/**
*
* @package VC
-* @version $Id$
* @copyright (c) 2008 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -26,7 +25,7 @@ class phpbb_captcha_factory
/**
* return an instance of class $name in file $name_plugin.php
*/
- function &get_instance($name)
+ static public function get_instance($name)
{
global $phpbb_root_path, $phpEx;
@@ -51,7 +50,8 @@ class phpbb_captcha_factory
{
include($phpbb_root_path . "includes/captcha/plugins/{$name}_plugin." . $phpEx);
}
- call_user_func(array($name, 'garbage_collect'), 0);
+ $captcha = self::get_instance($name);
+ $captcha->garbage_collect(0);
}
/**
@@ -59,42 +59,40 @@ class phpbb_captcha_factory
*/
function get_captcha_types()
{
- global $phpbb_root_path, $phpEx;
+ global $phpbb_root_path, $phpEx, $phpbb_extension_manager;
$captchas = array(
'available' => array(),
'unavailable' => array(),
);
- $dp = @opendir($phpbb_root_path . 'includes/captcha/plugins');
+ $finder = $phpbb_extension_manager->get_finder();
+ $captcha_plugin_classes = $finder
+ ->extension_directory('/captcha')
+ ->suffix('_plugin')
+ ->core_path('includes/captcha/plugins/')
+ ->get_classes();
- if ($dp)
+ foreach ($captcha_plugin_classes as $class)
{
- while (($file = readdir($dp)) !== false)
+ // check if this class needs to be loaded in legacy mode
+ $old_class = preg_replace('/^phpbb_captcha_plugins_/', '', $class);
+ if (file_exists($phpbb_root_path . "includes/captcha/plugins/$old_class.$phpEx") && !class_exists($old_class))
{
- if ((preg_match('#_plugin\.' . $phpEx . '$#', $file)))
- {
- $name = preg_replace('#^(.*?)_plugin\.' . $phpEx . '$#', '\1', $file);
- if (!class_exists($name))
- {
- include($phpbb_root_path . "includes/captcha/plugins/$file");
- }
+ include($phpbb_root_path . "includes/captcha/plugins/$old_class.$phpEx");
+ $class = preg_replace('/_plugin$/', '', $old_class);
+ }
- if (call_user_func(array($name, 'is_available')))
- {
- $captchas['available'][$name] = call_user_func(array($name, 'get_name'));
- }
- else
- {
- $captchas['unavailable'][$name] = call_user_func(array($name, 'get_name'));
- }
- }
+ if (call_user_func(array($class, 'is_available')))
+ {
+ $captchas['available'][$class] = call_user_func(array($class, 'get_name'));
+ }
+ else
+ {
+ $captchas['unavailable'][$class] = call_user_func(array($class, 'get_name'));
}
- closedir($dp);
}
return $captchas;
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/captcha/captcha_gd.php b/phpBB/includes/captcha/captcha_gd.php
index ecdad43978..3a82457c4a 100644
--- a/phpBB/includes/captcha/captcha_gd.php
+++ b/phpBB/includes/captcha/captcha_gd.php
@@ -2,9 +2,8 @@
/**
*
* @package VC
-* @version $Id$
* @copyright (c) 2006 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -27,7 +26,6 @@ class captcha
var $width = 360;
var $height = 96;
-
/**
* Create the image containing $code with a seed of $seed
*/
@@ -70,7 +68,6 @@ class captcha
$bounding_boxes[$i] = $box;
}
-
// Redistribute leftover x-space
$offset = array();
for ($i = 0; $i < $code_len; ++$i)
@@ -100,12 +97,12 @@ class captcha
imagedashedline($img, mt_rand($x -3, $x + 3), mt_rand(0, 4), mt_rand($x -3, $x + 3), mt_rand($this->height - 5, $this->height), $current_colour);
}
}
+
if ($config['captcha_gd_wave'] && ($config['captcha_gd_y_grid'] || $config['captcha_gd_y_grid']))
{
$this->wave($img);
}
-
-
+
if ($config['captcha_gd_3d_noise'])
{
$xoffset = mt_rand(0,9);
@@ -123,11 +120,12 @@ class captcha
$dimm = $bounding_boxes[$i];
$xoffset += ($offset[$i] - $dimm[0]);
$yoffset = mt_rand(-$dimm[1], $this->height - $dimm[3]);
-
+
$noise[$i]->drawchar($sizes[$i], $xoffset, $yoffset, $img, $colour->get_resource('background'), $scheme);
$xoffset += $dimm[2];
}
}
+
$xoffset = 5;
for ($i = 0; $i < $code_len; ++$i)
{
@@ -138,14 +136,17 @@ class captcha
$characters[$i]->drawchar($sizes[$i], $xoffset, $yoffset, $img, $colour->get_resource('background'), $scheme);
$xoffset += $dimm[2];
}
+
if ($config['captcha_gd_wave'])
{
$this->wave($img);
}
+
if ($config['captcha_gd_foreground_noise'])
{
$this->noise_line($img, 0, 0, $this->width, $this->height, $colour->get_resource('background'), $scheme, $bg_colours);
}
+
// Send image
header('Content-Type: image/png');
header('Cache-control: no-cache, no-store');
@@ -234,7 +235,6 @@ class captcha
imagesetthickness($img, 1);
}
-
function captcha_noise_bg_bitmaps()
{
return array(
@@ -293,7 +293,7 @@ class captcha
),
));
}
-
+
/**
* Return bitmaps
*/
@@ -2226,8 +2226,8 @@ class colour_manager
return $this->random_colour($colour, $mode);
}
- $rgb = colour_manager::model_convert($colour, $mode, 'rgb');
- $store = ($this->mode == 'rgb') ? $rgb : colour_manager::model_convert($colour, $mode, $this->mode);
+ $rgb = $this->model_convert($colour, $mode, 'rgb');
+ $store = ($this->mode == 'rgb') ? $rgb : $this->model_convert($colour, $mode, $this->mode);
$resource = imagecolorallocate($this->img, $rgb[0], $rgb[1], $rgb[2]);
$this->colours[$resource] = $store;
@@ -2345,7 +2345,7 @@ class colour_manager
$resource = $pre;
}
- $colour = colour_manager::model_convert($this->colours[$resource], $this->mode, $mode);
+ $colour = $this->model_convert($this->colours[$resource], $this->mode, $mode);
$results = ($include_original) ? array($resource) : array();
$colour2 = $colour3 = $colour4 = $colour;
$colour2[0] += 150;
@@ -2380,7 +2380,7 @@ class colour_manager
$resource = $pre;
}
- $colour = colour_manager::model_convert($this->colours[$resource], $this->mode, $mode);
+ $colour = $this->model_convert($this->colours[$resource], $this->mode, $mode);
$results = array();
if ($include_original)
@@ -2418,11 +2418,11 @@ class colour_manager
switch ($from_model)
{
case 'ahsv':
- return colour_manager::ah2h($colour);
+ return $this->ah2h($colour);
break;
case 'rgb':
- return colour_manager::rgb2hsv($colour);
+ return $this->rgb2hsv($colour);
break;
}
break;
@@ -2432,11 +2432,11 @@ class colour_manager
switch ($from_model)
{
case 'hsv':
- return colour_manager::h2ah($colour);
+ return $this->h2ah($colour);
break;
case 'rgb':
- return colour_manager::h2ah(colour_manager::rgb2hsv($colour));
+ return $this->h2ah($this->rgb2hsv($colour));
break;
}
break;
@@ -2445,11 +2445,11 @@ class colour_manager
switch ($from_model)
{
case 'hsv':
- return colour_manager::hsv2rgb($colour);
+ return $this->hsv2rgb($colour);
break;
case 'ahsv':
- return colour_manager::hsv2rgb(colour_manager::ah2h($colour));
+ return $this->hsv2rgb($this->ah2h($colour));
break;
}
break;
@@ -2462,7 +2462,7 @@ class colour_manager
*/
function hsv2rgb($hsv)
{
- colour_manager::normalize_hue($hsv[0]);
+ $this->normalize_hue($hsv[0]);
$h = $hsv[0];
$s = min(1, max(0, $hsv[1] / 100));
@@ -2554,7 +2554,7 @@ class colour_manager
break;
}
}
- colour_manager::normalize_hue($h);
+ $this->normalize_hue($h);
return array($h, $s * 100, $v * 100);
}
@@ -2578,10 +2578,10 @@ class colour_manager
{
if (is_array($ahue))
{
- $ahue[0] = colour_manager::ah2h($ahue[0]);
+ $ahue[0] = $this->ah2h($ahue[0]);
return $ahue;
}
- colour_manager::normalize_hue($ahue);
+ $this->normalize_hue($ahue);
// blue through red is already ok
if ($ahue >= 240)
@@ -2612,10 +2612,10 @@ class colour_manager
{
if (is_array($hue))
{
- $hue[0] = colour_manager::h2ah($hue[0]);
+ $hue[0] = $this->h2ah($hue[0]);
return $hue;
}
- colour_manager::normalize_hue($hue);
+ $this->normalize_hue($hue);
// blue through red is already ok
if ($hue >= 240)
@@ -2636,5 +2636,3 @@ class colour_manager
}
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/captcha/captcha_gd_wave.php b/phpBB/includes/captcha/captcha_gd_wave.php
index 27422513d9..185352dd4e 100644
--- a/phpBB/includes/captcha/captcha_gd_wave.php
+++ b/phpBB/includes/captcha/captcha_gd_wave.php
@@ -2,9 +2,8 @@
/**
*
* @package VC
-* @version $Id$
* @copyright (c) 2006 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -87,7 +86,7 @@ class captcha
$fontcolors[0] = imagecolorallocate($img, mt_rand(0, 120), mt_rand(0, 120), mt_rand(0, 120));
- $colors = array();
+ $colors = array();
$minr = mt_rand(20, 30);
$ming = mt_rand(20, 30);
@@ -185,7 +184,7 @@ class captcha
for ($x = 1; $x <= $full_x; ++$x)
{
- $cur_height = $this->wave_height($x, $y, $subdivision_factor) + $this->grid_height($x, $y, 1, $x_grid, $y_grid);
+ $cur_height = $this->wave_height($x, $y, $subdivision_factor) + $this->grid_height($x, $y, $x_grid, $y_grid, 1);
// height is a z-factor, not a y-factor
$offset = $cur_height - $prev_height;
@@ -265,7 +264,7 @@ class captcha
return ((sin($x / (3 * $factor)) + sin($y / (3 * $factor))) * 10 * $tweak);
}
- function grid_height($x, $y, $factor = 1, $x_grid, $y_grid)
+ function grid_height($x, $y, $x_grid, $y_grid, $factor = 1)
{
return ((!($x % ($x_grid * $factor)) || !($y % ($y_grid * $factor))) ? 3 : 0);
}
@@ -841,5 +840,3 @@ class captcha
);
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/captcha/captcha_non_gd.php b/phpBB/includes/captcha/captcha_non_gd.php
index 2adf909b96..bb5067cafa 100644
--- a/phpBB/includes/captcha/captcha_non_gd.php
+++ b/phpBB/includes/captcha/captcha_non_gd.php
@@ -2,9 +2,8 @@
/**
*
* @package VC
-* @version $Id$
* @copyright (c) 2006 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -388,5 +387,3 @@ class captcha
);
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/captcha/plugins/captcha_abstract.php b/phpBB/includes/captcha/plugins/captcha_abstract.php
index 21cacd730c..7fd88feeb5 100644
--- a/phpBB/includes/captcha/plugins/captcha_abstract.php
+++ b/phpBB/includes/captcha/plugins/captcha_abstract.php
@@ -2,9 +2,8 @@
/**
*
* @package VC
-* @version $Id$
* @copyright (c) 2006, 2008 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -22,7 +21,7 @@ if (!defined('IN_PHPBB'))
*
* @package VC
*/
-class phpbb_default_captcha
+class phpbb_captcha_plugins_captcha_abstract
{
var $confirm_id;
var $confirm_code;
@@ -207,7 +206,6 @@ class phpbb_default_captcha
{
if ($this->check_code())
{
- // $this->delete_code(); commented out to allow posting.php to repeat the question
$this->solved = true;
}
else
@@ -329,17 +327,6 @@ class phpbb_default_captcha
return (strcasecmp($this->code, $this->confirm_code) === 0);
}
- function delete_code()
- {
- global $db, $user;
-
- $sql = 'DELETE FROM ' . CONFIRM_TABLE . "
- WHERE confirm_id = '" . $db->sql_escape($confirm_id) . "'
- AND session_id = '" . $db->sql_escape($user->session_id) . "'
- AND confirm_type = " . $this->type;
- $db->sql_query($sql);
- }
-
function get_attempt_count()
{
return $this->attempts;
@@ -377,4 +364,9 @@ class phpbb_default_captcha
}
-?> \ No newline at end of file
+/**
+* Old class name for legacy use. The new class name is auto loadable.
+*/
+class phpbb_default_captcha extends phpbb_captcha_plugins_captcha_abstract
+{
+}
diff --git a/phpBB/includes/captcha/plugins/phpbb_captcha_gd_plugin.php b/phpBB/includes/captcha/plugins/phpbb_captcha_gd_plugin.php
index 6e899adc16..80f5b65967 100644
--- a/phpBB/includes/captcha/plugins/phpbb_captcha_gd_plugin.php
+++ b/phpBB/includes/captcha/plugins/phpbb_captcha_gd_plugin.php
@@ -2,9 +2,8 @@
/**
*
* @package VC
-* @version $Id$
* @copyright (c) 2006, 2008 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -19,7 +18,7 @@ if (!defined('IN_PHPBB'))
/**
* Placeholder for autoload
*/
-if (!class_exists('phpbb_default_captcha'))
+if (!class_exists('phpbb_default_captcha', false))
{
include($phpbb_root_path . 'includes/captcha/plugins/captcha_abstract.' . $phpEx);
}
@@ -50,27 +49,15 @@ class phpbb_captcha_gd extends phpbb_default_captcha
}
}
- function &get_instance()
+ static public function get_instance()
{
- $instance =& new phpbb_captcha_gd();
+ $instance = new phpbb_captcha_gd();
return $instance;
}
- function is_available()
+ static public function is_available()
{
- global $phpbb_root_path, $phpEx;
-
- if (@extension_loaded('gd'))
- {
- return true;
- }
-
- if (!function_exists('can_load_dll'))
- {
- include($phpbb_root_path . 'includes/functions_install.' . $phpEx);
- }
-
- return can_load_dll('gd');
+ return @extension_loaded('gd');
}
/**
@@ -81,7 +68,7 @@ class phpbb_captcha_gd extends phpbb_default_captcha
return true;
}
- function get_name()
+ static public function get_name()
{
return 'CAPTCHA_GD';
}
@@ -152,14 +139,19 @@ class phpbb_captcha_gd extends phpbb_default_captcha
global $config;
$config_old = $config;
+
+ $config = new \phpbb\config\config(array());
+ foreach ($config_old as $key => $value)
+ {
+ $config->set($key, $value);
+ }
+
foreach ($this->captcha_vars as $captcha_var => $template_var)
{
- $config[$captcha_var] = request_var($captcha_var, (int) $config[$captcha_var]);
+ $config->set($captcha_var, request_var($captcha_var, (int) $config[$captcha_var]));
}
parent::execute_demo();
$config = $config_old;
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/captcha/plugins/phpbb_captcha_gd_wave_plugin.php b/phpBB/includes/captcha/plugins/phpbb_captcha_gd_wave_plugin.php
index 2f55d15efd..0d4b8bd451 100644
--- a/phpBB/includes/captcha/plugins/phpbb_captcha_gd_wave_plugin.php
+++ b/phpBB/includes/captcha/plugins/phpbb_captcha_gd_wave_plugin.php
@@ -2,9 +2,8 @@
/**
*
* @package VC
-* @version $Id$
* @copyright (c) 2006, 2008 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -19,7 +18,7 @@ if (!defined('IN_PHPBB'))
/**
* Placeholder for autoload
*/
-if (!class_exists('phpbb_default_captcha'))
+if (!class_exists('phpbb_default_captcha', false))
{
include($phpbb_root_path . 'includes/captcha/plugins/captcha_abstract.' . $phpEx);
}
@@ -40,29 +39,17 @@ class phpbb_captcha_gd_wave extends phpbb_default_captcha
}
}
- function get_instance()
+ static public function get_instance()
{
return new phpbb_captcha_gd_wave();
}
- function is_available()
+ static public function is_available()
{
- global $phpbb_root_path, $phpEx;
-
- if (@extension_loaded('gd'))
- {
- return true;
- }
-
- if (!function_exists('can_load_dll'))
- {
- include($phpbb_root_path . 'includes/functions_install.' . $phpEx);
- }
-
- return can_load_dll('gd');
+ return @extension_loaded('gd');
}
- function get_name()
+ static public function get_name()
{
return 'CAPTCHA_GD_3D';
}
@@ -79,5 +66,3 @@ class phpbb_captcha_gd_wave extends phpbb_default_captcha
trigger_error($user->lang['CAPTCHA_NO_OPTIONS'] . adm_back_link($module->u_action));
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/captcha/plugins/phpbb_captcha_nogd_plugin.php b/phpBB/includes/captcha/plugins/phpbb_captcha_nogd_plugin.php
index ac30ed4297..c5ef8c78b0 100644
--- a/phpBB/includes/captcha/plugins/phpbb_captcha_nogd_plugin.php
+++ b/phpBB/includes/captcha/plugins/phpbb_captcha_nogd_plugin.php
@@ -2,9 +2,8 @@
/**
*
* @package VC
-* @version $Id$
* @copyright (c) 2006, 2008 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -19,7 +18,7 @@ if (!defined('IN_PHPBB'))
/**
* Placeholder for autoload
*/
-if (!class_exists('phpbb_default_captcha'))
+if (!class_exists('phpbb_default_captcha', false))
{
include($phpbb_root_path . 'includes/captcha/plugins/captcha_abstract.' . $phpEx);
}
@@ -40,18 +39,18 @@ class phpbb_captcha_nogd extends phpbb_default_captcha
}
}
- function &get_instance()
+ static public function get_instance()
{
- $instance =& new phpbb_captcha_nogd();
+ $instance = new phpbb_captcha_nogd();
return $instance;
}
- function is_available()
+ static public function is_available()
{
return true;
}
- function get_name()
+ static public function get_name()
{
return 'CAPTCHA_NO_GD';
}
@@ -68,5 +67,3 @@ class phpbb_captcha_nogd extends phpbb_default_captcha
trigger_error($user->lang['CAPTCHA_NO_OPTIONS'] . adm_back_link($module->u_action));
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/captcha/plugins/phpbb_captcha_qa_plugin.php b/phpBB/includes/captcha/plugins/phpbb_captcha_qa_plugin.php
index 45f76bd676..82333f739e 100644
--- a/phpBB/includes/captcha/plugins/phpbb_captcha_qa_plugin.php
+++ b/phpBB/includes/captcha/plugins/phpbb_captcha_qa_plugin.php
@@ -2,9 +2,8 @@
/**
*
* @package VC
-* @version $Id$
* @copyright (c) 2006, 2008 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -87,7 +86,7 @@ class phpbb_captcha_qa
}
$db->sql_freeresult($result);
}
-
+
// okay, if there is a confirm_id, we try to load that confirm's state. If not, we try to find one
if (!$this->load_answer() && (!$this->load_confirm_id() || !$this->load_answer()))
{
@@ -99,9 +98,9 @@ class phpbb_captcha_qa
/**
* API function
*/
- function &get_instance()
+ static public function get_instance()
{
- $instance =& new phpbb_captcha_qa();
+ $instance = new phpbb_captcha_qa();
return $instance;
}
@@ -109,15 +108,11 @@ class phpbb_captcha_qa
/**
* See if the captcha has created its tables.
*/
- function is_installed()
+ static public function is_installed()
{
- global $db, $phpbb_root_path, $phpEx;
+ global $db;
- if (!class_exists('phpbb_db_tools'))
- {
- include("$phpbb_root_path/includes/db/db_tools.$phpEx");
- }
- $db_tool = new phpbb_db_tools($db);
+ $db_tool = new \phpbb\db\tools($db);
return $db_tool->sql_table_exists(CAPTCHA_QUESTIONS_TABLE);
}
@@ -125,14 +120,14 @@ class phpbb_captcha_qa
/**
* API function - for the captcha to be available, it must have installed itself and there has to be at least one question in the board's default lang
*/
- function is_available()
+ static public function is_available()
{
global $config, $db, $phpbb_root_path, $phpEx, $user;
// load language file for pretty display in the ACP dropdown
$user->add_lang('captcha_qa');
- if (!phpbb_captcha_qa::is_installed())
+ if (!self::is_installed())
{
return false;
}
@@ -158,7 +153,7 @@ class phpbb_captcha_qa
/**
* API function
*/
- function get_name()
+ static public function get_name()
{
return 'CAPTCHA_QA';
}
@@ -298,13 +293,9 @@ class phpbb_captcha_qa
*/
function install()
{
- global $db, $phpbb_root_path, $phpEx;
+ global $db;
- if (!class_exists('phpbb_db_tools'))
- {
- include("$phpbb_root_path/includes/db/db_tools.$phpEx");
- }
- $db_tool = new phpbb_db_tools($db);
+ $db_tool = new \phpbb\db\tools($db);
$tables = array(CAPTCHA_QUESTIONS_TABLE, CAPTCHA_ANSWERS_TABLE, CAPTCHA_QA_CONFIRM_TABLE);
@@ -365,12 +356,12 @@ class phpbb_captcha_qa
global $config, $db, $user;
$error = '';
-
+
if (!sizeof($this->question_ids))
{
return false;
}
-
+
if (!$this->confirm_id)
{
$error = $user->lang['CONFIRM_QUESTION_WRONG'];
@@ -379,7 +370,6 @@ class phpbb_captcha_qa
{
if ($this->check_answer())
{
- // $this->delete_code(); commented out to allow posting.php to repeat the question
$this->solved = true;
}
else
@@ -434,7 +424,7 @@ class phpbb_captcha_qa
function reselect_question()
{
global $db, $user;
-
+
if (!sizeof($this->question_ids))
{
return false;
@@ -482,8 +472,8 @@ class phpbb_captcha_qa
global $db, $user;
$sql = 'SELECT confirm_id
- FROM ' . CAPTCHA_QA_CONFIRM_TABLE . "
- WHERE
+ FROM ' . CAPTCHA_QA_CONFIRM_TABLE . "
+ WHERE
session_id = '" . $db->sql_escape($user->session_id) . "'
AND lang_iso = '" . $db->sql_escape($this->question_lang) . "'
AND confirm_type = " . $this->type;
@@ -505,7 +495,7 @@ class phpbb_captcha_qa
function load_answer()
{
global $db, $user;
-
+
if (!strlen($this->confirm_id) || !sizeof($this->question_ids))
{
return false;
@@ -567,20 +557,6 @@ class phpbb_captcha_qa
}
/**
- * API function - clean the entry
- */
- function delete_code()
- {
- global $db, $user;
-
- $sql = 'DELETE FROM ' . CAPTCHA_QA_CONFIRM_TABLE . "
- WHERE confirm_id = '" . $db->sql_escape($confirm_id) . "'
- AND session_id = '" . $db->sql_escape($user->session_id) . "'
- AND confirm_type = " . $this->type;
- $db->sql_query($sql);
- }
-
- /**
* API function
*/
function get_attempt_count()
@@ -628,7 +604,7 @@ class phpbb_captcha_qa
$user->add_lang('acp/board');
$user->add_lang('captcha_qa');
- if (!$this->is_installed())
+ if (!self::is_installed())
{
$this->install();
}
@@ -990,9 +966,9 @@ class phpbb_captcha_qa
return $langs;
}
-
-
-
+
+
+
/**
* See if there is a question other than the one we have
*/
@@ -1018,5 +994,3 @@ class phpbb_captcha_qa
}
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/captcha/plugins/phpbb_recaptcha_plugin.php b/phpBB/includes/captcha/plugins/phpbb_recaptcha_plugin.php
index 0b0270f568..cb21b04ec5 100644
--- a/phpBB/includes/captcha/plugins/phpbb_recaptcha_plugin.php
+++ b/phpBB/includes/captcha/plugins/phpbb_recaptcha_plugin.php
@@ -2,9 +2,8 @@
/**
*
* @package VC
-* @version $Id$
* @copyright (c) 2006, 2008 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -16,7 +15,7 @@ if (!defined('IN_PHPBB'))
exit;
}
-if (!class_exists('phpbb_default_captcha'))
+if (!class_exists('phpbb_default_captcha', false))
{
// we need the classic captcha code for tracking solutions and attempts
include($phpbb_root_path . 'includes/captcha/plugins/captcha_abstract.' . $phpEx);
@@ -41,7 +40,8 @@ class phpbb_recaptcha extends phpbb_default_captcha
// PHP4 Constructor
function phpbb_recaptcha()
{
- $this->recaptcha_server = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? $this->recaptcha_server_secure : $this->recaptcha_server;
+ global $request;
+ $this->recaptcha_server = $request->is_secure() ? $this->recaptcha_server_secure : $this->recaptcha_server;
}
function init($type)
@@ -54,13 +54,13 @@ class phpbb_recaptcha extends phpbb_default_captcha
$this->response = request_var('recaptcha_response_field', '');
}
- function &get_instance()
+ static public function get_instance()
{
- $instance =& new phpbb_recaptcha();
+ $instance = new phpbb_recaptcha();
return $instance;
}
- function is_available()
+ static public function is_available()
{
global $config, $user;
$user->add_lang('captcha_recaptcha');
@@ -75,7 +75,7 @@ class phpbb_recaptcha extends phpbb_default_captcha
return true;
}
- function get_name()
+ static public function get_name()
{
return 'CAPTCHA_RECAPTCHA';
}
@@ -163,7 +163,7 @@ class phpbb_recaptcha extends phpbb_default_captcha
'RECAPTCHA_SERVER' => $this->recaptcha_server,
'RECAPTCHA_PUBKEY' => isset($config['recaptcha_pubkey']) ? $config['recaptcha_pubkey'] : '',
'RECAPTCHA_ERRORGET' => '',
- 'S_RECAPTCHA_AVAILABLE' => $this->is_available(),
+ 'S_RECAPTCHA_AVAILABLE' => self::is_available(),
'S_CONFIRM_CODE' => true,
'S_TYPE' => $this->type,
'L_CONFIRM_EXPLAIN' => $explain,
@@ -270,7 +270,7 @@ class phpbb_recaptcha extends phpbb_default_captcha
$response = '';
if (false == ($fs = @fsockopen($host, $port, $errno, $errstr, 10)))
{
- trigger_error('Could not open socket', E_USER_ERROR);
+ trigger_error('RECAPTCHA_SOCKET_ERROR', E_USER_ERROR);
}
fwrite($fs, $http_request);
@@ -341,5 +341,3 @@ class phpbb_recaptcha extends phpbb_default_captcha
return $req;
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/constants.php b/phpBB/includes/constants.php
index 8d09fe4d9b..fe23ed5a9a 100644
--- a/phpBB/includes/constants.php
+++ b/phpBB/includes/constants.php
@@ -2,9 +2,8 @@
/**
*
* @package phpBB3
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -25,7 +24,7 @@ if (!defined('IN_PHPBB'))
*/
// phpBB Version
-define('PHPBB_VERSION', '3.0.13-dev');
+define('PHPBB_VERSION', '3.1.0-b2-dev');
// QA-related
// define('PHPBB_QA', 1);
@@ -62,6 +61,7 @@ define('LOGIN_CONTINUE', 1);
define('LOGIN_BREAK', 2);
define('LOGIN_SUCCESS', 3);
define('LOGIN_SUCCESS_CREATE_PROFILE', 20);
+define('LOGIN_SUCCESS_LINK_PROFILE', 21);
define('LOGIN_ERROR_USERNAME', 10);
define('LOGIN_ERROR_PASSWORD', 11);
define('LOGIN_ERROR_ACTIVE', 12);
@@ -88,6 +88,10 @@ define('ITEM_UNLOCKED', 0);
define('ITEM_LOCKED', 1);
define('ITEM_MOVED', 2);
+define('ITEM_UNAPPROVED', 0); // => has not yet been approved
+define('ITEM_APPROVED', 1); // => has been approved, and has not been soft deleted
+define('ITEM_DELETED', 2); // => has been soft deleted
+
// Forum Flags
define('FORUM_FLAG_LINK_TRACK', 1);
define('FORUM_FLAG_PRUNE_POLL', 2);
@@ -227,6 +231,7 @@ define('CONFIG_TABLE', $table_prefix . 'config');
define('CONFIRM_TABLE', $table_prefix . 'confirm');
define('DISALLOW_TABLE', $table_prefix . 'disallow');
define('DRAFTS_TABLE', $table_prefix . 'drafts');
+define('EXT_TABLE', $table_prefix . 'ext');
define('EXTENSIONS_TABLE', $table_prefix . 'extensions');
define('EXTENSION_GROUPS_TABLE', $table_prefix . 'extension_groups');
define('FORUMS_TABLE', $table_prefix . 'forums');
@@ -238,8 +243,11 @@ define('ICONS_TABLE', $table_prefix . 'icons');
define('LANG_TABLE', $table_prefix . 'lang');
define('LOG_TABLE', $table_prefix . 'log');
define('LOGIN_ATTEMPT_TABLE', $table_prefix . 'login_attempts');
+define('MIGRATIONS_TABLE', $table_prefix . 'migrations');
define('MODERATOR_CACHE_TABLE', $table_prefix . 'moderator_cache');
define('MODULES_TABLE', $table_prefix . 'modules');
+define('NOTIFICATION_TYPES_TABLE', $table_prefix . 'notification_types');
+define('NOTIFICATIONS_TABLE', $table_prefix . 'notifications');
define('POLL_OPTIONS_TABLE', $table_prefix . 'poll_options');
define('POLL_VOTES_TABLE', $table_prefix . 'poll_votes');
define('POSTS_TABLE', $table_prefix . 'posts');
@@ -261,23 +269,23 @@ define('SESSIONS_TABLE', $table_prefix . 'sessions');
define('SESSIONS_KEYS_TABLE', $table_prefix . 'sessions_keys');
define('SITELIST_TABLE', $table_prefix . 'sitelist');
define('SMILIES_TABLE', $table_prefix . 'smilies');
+define('SPHINX_TABLE', $table_prefix . 'sphinx');
define('STYLES_TABLE', $table_prefix . 'styles');
define('STYLES_TEMPLATE_TABLE', $table_prefix . 'styles_template');
define('STYLES_TEMPLATE_DATA_TABLE',$table_prefix . 'styles_template_data');
define('STYLES_THEME_TABLE', $table_prefix . 'styles_theme');
define('STYLES_IMAGESET_TABLE', $table_prefix . 'styles_imageset');
define('STYLES_IMAGESET_DATA_TABLE',$table_prefix . 'styles_imageset_data');
+define('TEAMPAGE_TABLE', $table_prefix . 'teampage');
define('TOPICS_TABLE', $table_prefix . 'topics');
define('TOPICS_POSTED_TABLE', $table_prefix . 'topics_posted');
define('TOPICS_TRACK_TABLE', $table_prefix . 'topics_track');
define('TOPICS_WATCH_TABLE', $table_prefix . 'topics_watch');
define('USER_GROUP_TABLE', $table_prefix . 'user_group');
+define('USER_NOTIFICATIONS_TABLE', $table_prefix . 'user_notifications');
define('USERS_TABLE', $table_prefix . 'users');
define('WARNINGS_TABLE', $table_prefix . 'warnings');
define('WORDS_TABLE', $table_prefix . 'words');
define('ZEBRA_TABLE', $table_prefix . 'zebra');
// Additional tables
-
-
-?>
diff --git a/phpBB/includes/diff/diff.php b/phpBB/includes/diff/diff.php
index 60af574b78..1ffa3429b5 100644
--- a/phpBB/includes/diff/diff.php
+++ b/phpBB/includes/diff/diff.php
@@ -2,9 +2,8 @@
/**
*
* @package diff
-* @version $Id$
* @copyright (c) 2006 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -1144,5 +1143,3 @@ class diff3_block_builder
array_splice($array, sizeof($array), 0, $lines);
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/diff/engine.php b/phpBB/includes/diff/engine.php
index 982149457d..dc1ca5875f 100644
--- a/phpBB/includes/diff/engine.php
+++ b/phpBB/includes/diff/engine.php
@@ -2,9 +2,8 @@
/**
*
* @package diff
-* @version $Id$
* @copyright (c) 2006 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -550,5 +549,3 @@ class diff_engine
}
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/diff/renderer.php b/phpBB/includes/diff/renderer.php
index 5cb1b6ada9..eacd42d760 100644
--- a/phpBB/includes/diff/renderer.php
+++ b/phpBB/includes/diff/renderer.php
@@ -2,9 +2,8 @@
/**
*
* @package diff
-* @version $Id$
* @copyright (c) 2006 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -856,5 +855,3 @@ class diff_renderer_side_by_side extends diff_renderer
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index f0657b9016..aa868c5431 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -2,9 +2,8 @@
/**
*
* @package phpBB3
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -17,123 +16,82 @@ if (!defined('IN_PHPBB'))
}
// Common global functions
-
/**
-* set_var
-*
-* Set variable, used by {@link request_var the request_var function}
+* Casts a variable to the given type.
*
-* @access private
+* @deprecated
*/
function set_var(&$result, $var, $type, $multibyte = false)
{
- settype($var, $type);
- $result = $var;
-
- if ($type == 'string')
- {
- $result = trim(htmlspecialchars(str_replace(array("\r\n", "\r", "\0"), array("\n", "\n", ''), $result), ENT_COMPAT, 'UTF-8'));
-
- if (!empty($result))
- {
- // Make sure multibyte characters are wellformed
- if ($multibyte)
- {
- if (!preg_match('/^./u', $result))
- {
- $result = '';
- }
- }
- else
- {
- // no multibyte, allow only ASCII (0-127)
- $result = preg_replace('/[\x80-\xFF]/', '?', $result);
- }
- }
-
- $result = (STRIP) ? stripslashes($result) : $result;
- }
+ // no need for dependency injection here, if you have the object, call the method yourself!
+ $type_cast_helper = new \phpbb\request\type_cast_helper();
+ $type_cast_helper->set_var($result, $var, $type, $multibyte);
}
/**
-* request_var
+* 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.
*
-* Used to get passed variable
+* @deprecated
+* @param mixed $var_name The form variable's name from which data shall be retrieved.
+* If the value is an array this may be an array of indizes which will give
+* direct access to a value at any depth. E.g. if the value of "var" is array(1 => "a")
+* then specifying array("var", 1) as the name will return "a".
+* If you pass an instance of {@link \phpbb\request\request_interface phpbb_request_interface}
+* as this parameter it will overwrite the current request class instance. If you do
+* not do so, it will create its own instance (but leave superglobals enabled).
+* @param mixed $default A default value that is returned if the variable was not set.
+* This function will always return a value of the same type as the default.
+* @param bool $multibyte If $default is a string this paramater has to be true if the variable may contain any UTF-8 characters
+* Default is false, causing all bytes outside the ASCII range (0-127) to be replaced with question marks
+* @param bool $cookie This param is mapped to \phpbb\request\request_interface::COOKIE as the last param for
+* \phpbb\request\request_interface::variable for backwards compatability reasons.
+* @param \phpbb\request\request_interface|null|false If an instance of \phpbb\request\request_interface is given the instance is stored in
+* a static variable and used for all further calls where this parameters is null. Until
+* the function is called with an instance it automatically creates a new \phpbb\request\request
+* instance on every call. By passing false this per-call instantiation can be restored
+* after having passed in a \phpbb\request\request_interface instance.
+*
+* @return mixed The value of $_REQUEST[$var_name] run through {@link set_var set_var} to ensure that the type is the
+* the same as that of $default. If the variable is not set $default is returned.
*/
-function request_var($var_name, $default, $multibyte = false, $cookie = false)
+function request_var($var_name, $default, $multibyte = false, $cookie = false, $request = null)
{
- if (!$cookie && isset($_COOKIE[$var_name]))
- {
- if (!isset($_GET[$var_name]) && !isset($_POST[$var_name]))
- {
- return (is_array($default)) ? array() : $default;
- }
- $_REQUEST[$var_name] = isset($_POST[$var_name]) ? $_POST[$var_name] : $_GET[$var_name];
- }
+ // This is all just an ugly hack to add "Dependency Injection" to a function
+ // the only real code is the function call which maps this function to a method.
+ static $static_request = null;
- $super_global = ($cookie) ? '_COOKIE' : '_REQUEST';
- if (!isset($GLOBALS[$super_global][$var_name]) || is_array($GLOBALS[$super_global][$var_name]) != is_array($default))
+ if ($request instanceof \phpbb\request\request_interface)
{
- return (is_array($default)) ? array() : $default;
- }
+ $static_request = $request;
- $var = $GLOBALS[$super_global][$var_name];
- if (!is_array($default))
- {
- $type = gettype($default);
- }
- else
- {
- list($key_type, $type) = each($default);
- $type = gettype($type);
- $key_type = gettype($key_type);
- if ($type == 'array')
+ if (empty($var_name))
{
- reset($default);
- $default = current($default);
- list($sub_key_type, $sub_type) = each($default);
- $sub_type = gettype($sub_type);
- $sub_type = ($sub_type == 'array') ? 'NULL' : $sub_type;
- $sub_key_type = gettype($sub_key_type);
+ return;
}
}
-
- if (is_array($var))
+ else if ($request === false)
{
- $_var = $var;
- $var = array();
+ $static_request = null;
- foreach ($_var as $k => $v)
+ if (empty($var_name))
{
- set_var($k, $k, $key_type);
- if ($type == 'array' && is_array($v))
- {
- foreach ($v as $_k => $_v)
- {
- if (is_array($_v))
- {
- $_v = null;
- }
- set_var($_k, $_k, $sub_key_type, $multibyte);
- set_var($var[$k][$_k], $_v, $sub_type, $multibyte);
- }
- }
- else
- {
- if ($type == 'array' || is_array($v))
- {
- $v = null;
- }
- set_var($var[$k], $v, $type, $multibyte);
- }
+ return;
}
}
- else
+
+ $tmp_request = $static_request;
+
+ // no request class set, create a temporary one ourselves to keep backwards compatability
+ if ($tmp_request === null)
{
- set_var($var, $var, $type, $multibyte);
+ // false param: enable super globals, so the created request class does not
+ // make super globals inaccessible everywhere outside this function.
+ $tmp_request = new \phpbb\request\request(new \phpbb\request\type_cast_helper(), false);
}
- return $var;
+ return $tmp_request->variable($var_name, $default, $multibyte, ($cookie) ? \phpbb\request\request_interface::COOKIE : \phpbb\request\request_interface::REQUEST);
}
/**
@@ -149,31 +107,24 @@ function request_var($var_name, $default, $multibyte = false, $cookie = false)
* efficiently cached.
*
* @return null
+*
+* @deprecated
*/
-function set_config($config_name, $config_value, $is_dynamic = false)
+function set_config($config_name, $config_value, $is_dynamic = false, \phpbb\config\config $set_config = null)
{
- global $db, $cache, $config;
-
- $sql = 'UPDATE ' . CONFIG_TABLE . "
- SET config_value = '" . $db->sql_escape($config_value) . "'
- WHERE config_name = '" . $db->sql_escape($config_name) . "'";
- $db->sql_query($sql);
+ static $config = null;
- if (!$db->sql_affectedrows() && !isset($config[$config_name]))
+ if ($set_config !== null)
{
- $sql = 'INSERT INTO ' . CONFIG_TABLE . ' ' . $db->sql_build_array('INSERT', array(
- 'config_name' => $config_name,
- 'config_value' => $config_value,
- 'is_dynamic' => ($is_dynamic) ? 1 : 0));
- $db->sql_query($sql);
- }
-
- $config[$config_name] = $config_value;
+ $config = $set_config;
- if (!$is_dynamic)
- {
- $cache->destroy('config');
+ if (empty($config_name))
+ {
+ return;
+ }
}
+
+ $config->set($config_name, $config_value, !$is_dynamic);
}
/**
@@ -186,35 +137,24 @@ function set_config($config_name, $config_value, $is_dynamic = false)
* efficiently cached.
*
* @return null
+*
+* @deprecated
*/
-function set_config_count($config_name, $increment, $is_dynamic = false)
+function set_config_count($config_name, $increment, $is_dynamic = false, \phpbb\config\config $set_config = null)
{
- global $db, $cache;
+ static $config = null;
- switch ($db->sql_layer)
+ if ($set_config !== null)
{
- case 'firebird':
- // Precision must be from 1 to 18
- $sql_update = 'CAST(CAST(config_value as DECIMAL(18, 0)) + ' . (int) $increment . ' as VARCHAR(255))';
- break;
-
- case 'postgres':
- // Need to cast to text first for PostgreSQL 7.x
- $sql_update = 'CAST(CAST(config_value::text as DECIMAL(255, 0)) + ' . (int) $increment . ' as VARCHAR(255))';
- break;
+ $config = $set_config;
- // MySQL, SQlite, mssql, mssql_odbc, oracle
- default:
- $sql_update = 'config_value + ' . (int) $increment;
- break;
+ if (empty($config_name))
+ {
+ return;
+ }
}
- $db->sql_query('UPDATE ' . CONFIG_TABLE . ' SET config_value = ' . $sql_update . " WHERE config_name = '" . $db->sql_escape($config_name) . "'");
-
- if (!$is_dynamic)
- {
- $cache->destroy('config');
- }
+ $config->increment($config_name, $increment, !$is_dynamic);
}
/**
@@ -428,219 +368,6 @@ function still_on_time($extra_time = 15)
}
/**
-*
-* @version Version 0.1 / slightly modified for phpBB 3.0.x (using $H$ as hash type identifier)
-*
-* Portable PHP password hashing framework.
-*
-* Written by Solar Designer <solar at openwall.com> in 2004-2006 and placed in
-* the public domain.
-*
-* There's absolutely no warranty.
-*
-* The homepage URL for this framework is:
-*
-* http://www.openwall.com/phpass/
-*
-* Please be sure to update the Version line if you edit this file in any way.
-* It is suggested that you leave the main version number intact, but indicate
-* your project name (after the slash) and add your own revision information.
-*
-* Please do not change the "private" password hashing method implemented in
-* here, thereby making your hashes incompatible. However, if you must, please
-* change the hash type identifier (the "$P$") to something different.
-*
-* Obviously, since this code is in the public domain, the above are not
-* requirements (there can be none), but merely suggestions.
-*
-*
-* Hash the password
-*/
-function phpbb_hash($password)
-{
- $itoa64 = './0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';
-
- $random_state = unique_id();
- $random = '';
- $count = 6;
-
- if (($fh = @fopen('/dev/urandom', 'rb')))
- {
- $random = fread($fh, $count);
- fclose($fh);
- }
-
- if (strlen($random) < $count)
- {
- $random = '';
-
- for ($i = 0; $i < $count; $i += 16)
- {
- $random_state = md5(unique_id() . $random_state);
- $random .= pack('H*', md5($random_state));
- }
- $random = substr($random, 0, $count);
- }
-
- $hash = _hash_crypt_private($password, _hash_gensalt_private($random, $itoa64), $itoa64);
-
- if (strlen($hash) == 34)
- {
- return $hash;
- }
-
- return md5($password);
-}
-
-/**
-* 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.
-*/
-function phpbb_check_hash($password, $hash)
-{
- if (strlen($password) > 4096)
- {
- // If the password is too huge, we will simply reject it
- // and not let the server try to hash it.
- return false;
- }
-
- $itoa64 = './0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';
- if (strlen($hash) == 34)
- {
- return (_hash_crypt_private($password, $hash, $itoa64) === $hash) ? true : false;
- }
-
- return (md5($password) === $hash) ? true : false;
-}
-
-/**
-* Generate salt for hash generation
-*/
-function _hash_gensalt_private($input, &$itoa64, $iteration_count_log2 = 6)
-{
- if ($iteration_count_log2 < 4 || $iteration_count_log2 > 31)
- {
- $iteration_count_log2 = 8;
- }
-
- $output = '$H$';
- $output .= $itoa64[min($iteration_count_log2 + ((PHP_VERSION >= 5) ? 5 : 3), 30)];
- $output .= _hash_encode64($input, 6, $itoa64);
-
- return $output;
-}
-
-/**
-* Encode hash
-*/
-function _hash_encode64($input, $count, &$itoa64)
-{
- $output = '';
- $i = 0;
-
- do
- {
- $value = ord($input[$i++]);
- $output .= $itoa64[$value & 0x3f];
-
- if ($i < $count)
- {
- $value |= ord($input[$i]) << 8;
- }
-
- $output .= $itoa64[($value >> 6) & 0x3f];
-
- if ($i++ >= $count)
- {
- break;
- }
-
- if ($i < $count)
- {
- $value |= ord($input[$i]) << 16;
- }
-
- $output .= $itoa64[($value >> 12) & 0x3f];
-
- if ($i++ >= $count)
- {
- break;
- }
-
- $output .= $itoa64[($value >> 18) & 0x3f];
- }
- while ($i < $count);
-
- return $output;
-}
-
-/**
-* The crypt function/replacement
-*/
-function _hash_crypt_private($password, $setting, &$itoa64)
-{
- $output = '*';
-
- // Check for correct hash
- if (substr($setting, 0, 3) != '$H$' && substr($setting, 0, 3) != '$P$')
- {
- return $output;
- }
-
- $count_log2 = strpos($itoa64, $setting[3]);
-
- if ($count_log2 < 7 || $count_log2 > 30)
- {
- return $output;
- }
-
- $count = 1 << $count_log2;
- $salt = substr($setting, 4, 8);
-
- if (strlen($salt) != 8)
- {
- return $output;
- }
-
- /**
- * We're kind of forced to use MD5 here since it's the only
- * cryptographic primitive available in all versions of PHP
- * currently in use. To implement our own low-level crypto
- * in PHP would result in much worse performance and
- * consequently in lower iteration counts and hashes that are
- * quicker to crack (by non-PHP code).
- */
- if (PHP_VERSION >= 5)
- {
- $hash = md5($salt . $password, true);
- do
- {
- $hash = md5($hash . $password, true);
- }
- while (--$count);
- }
- else
- {
- $hash = pack('H*', md5($salt . $password));
- do
- {
- $hash = pack('H*', md5($hash . $password));
- }
- while (--$count);
- }
-
- $output = substr($setting, 0, 12);
- $output .= _hash_encode64($hash, 16, $itoa64);
-
- return $output;
-}
-
-/**
* Hashes an email address to a big integer
*
* @param string $email Email address
@@ -915,102 +642,13 @@ function phpbb_is_writable($file)
}
}
-// Compatibility functions
-
-if (!function_exists('array_combine'))
-{
- /**
- * A wrapper for the PHP5 function array_combine()
- * @param array $keys contains keys for the resulting array
- * @param array $values contains values for the resulting array
- *
- * @return Returns an array by using the values from the keys array as keys and the
- * values from the values array as the corresponding values. Returns false if the
- * number of elements for each array isn't equal or if the arrays are empty.
- */
- function array_combine($keys, $values)
- {
- $keys = array_values($keys);
- $values = array_values($values);
-
- $n = sizeof($keys);
- $m = sizeof($values);
- if (!$n || !$m || ($n != $m))
- {
- return false;
- }
-
- $combined = array();
- for ($i = 0; $i < $n; $i++)
- {
- $combined[$keys[$i]] = $values[$i];
- }
- return $combined;
- }
-}
-
-if (!function_exists('str_split'))
-{
- /**
- * A wrapper for the PHP5 function str_split()
- * @param array $string contains the string to be converted
- * @param array $split_length contains the length of each chunk
- *
- * @return Converts a string to an array. If the optional split_length parameter is specified,
- * the returned array will be broken down into chunks with each being split_length in length,
- * otherwise each chunk will be one character in length. FALSE is returned if split_length is
- * less than 1. If the split_length length exceeds the length of string, the entire string is
- * returned as the first (and only) array element.
- */
- function str_split($string, $split_length = 1)
- {
- if ($split_length < 1)
- {
- return false;
- }
- else if ($split_length >= strlen($string))
- {
- return array($string);
- }
- else
- {
- preg_match_all('#.{1,' . $split_length . '}#s', $string, $matches);
- return $matches[0];
- }
- }
-}
-
-if (!function_exists('stripos'))
-{
- /**
- * A wrapper for the PHP5 function stripos
- * Find position of first occurrence of a case-insensitive string
- *
- * @param string $haystack is the string to search in
- * @param string $needle is the string to search for
- *
- * @return mixed Returns the numeric position of the first occurrence of needle in the haystack string. Unlike strpos(), stripos() is case-insensitive.
- * Note that the needle may be a string of one or more characters.
- * If needle is not found, stripos() will return boolean FALSE.
- */
- function stripos($haystack, $needle)
- {
- if (preg_match('#' . preg_quote($needle, '#') . '#i', $haystack, $m))
- {
- return strpos($haystack, $m[0]);
- }
-
- return false;
- }
-}
-
/**
* Checks if a path ($path) is absolute or relative
*
* @param string $path Path to check absoluteness of
* @return boolean
*/
-function is_absolute($path)
+function phpbb_is_absolute($path)
{
return (isset($path[0]) && $path[0] == '/' || preg_match('#^[a-z]:[/\\\]#i', $path)) ? true : false;
}
@@ -1023,6 +661,8 @@ function is_absolute($path)
*/
function phpbb_own_realpath($path)
{
+ global $request;
+
// Now to perform funky shizzle
// Switch to use UNIX slashes
@@ -1030,7 +670,7 @@ function phpbb_own_realpath($path)
$path_prefix = '';
// Determine what sort of path we have
- if (is_absolute($path))
+ if (phpbb_is_absolute($path))
{
$absolute = true;
@@ -1066,11 +706,12 @@ function phpbb_own_realpath($path)
$path_prefix = '';
}
}
- else if (isset($_SERVER['SCRIPT_FILENAME']) && !empty($_SERVER['SCRIPT_FILENAME']))
+ else if ($request->server('SCRIPT_FILENAME'))
{
// Warning: If chdir() has been used this will lie!
// Warning: This has some problems sometime (CLI can create them easily)
- $path = str_replace(DIRECTORY_SEPARATOR, '/', dirname($_SERVER['SCRIPT_FILENAME'])) . '/' . $path;
+ $filename = htmlspecialchars_decode($request->server('SCRIPT_FILENAME'));
+ $path = str_replace(DIRECTORY_SEPARATOR, '/', dirname($filename)) . '/' . $path;
$absolute = true;
$path_prefix = '';
}
@@ -1209,48 +850,6 @@ else
}
}
-/**
-* Eliminates useless . and .. components from specified path.
-*
-* @param string $path Path to clean
-* @return string Cleaned path
-*/
-function phpbb_clean_path($path)
-{
- $exploded = explode('/', $path);
- $filtered = array();
- foreach ($exploded as $part)
- {
- if ($part === '.' && !empty($filtered))
- {
- continue;
- }
-
- if ($part === '..' && !empty($filtered) && $filtered[sizeof($filtered) - 1] !== '..')
- {
- array_pop($filtered);
- }
- else
- {
- $filtered[] = $part;
- }
- }
- $path = implode('/', $filtered);
- return $path;
-}
-
-if (!function_exists('htmlspecialchars_decode'))
-{
- /**
- * A wrapper for htmlspecialchars_decode
- * @ignore
- */
- function htmlspecialchars_decode($string, $quote_style = ENT_COMPAT)
- {
- return strtr($string, array_flip(get_html_translation_table(HTML_SPECIALCHARS, $quote_style)));
- }
-}
-
// functions used for building option fields
/**
@@ -1302,32 +901,203 @@ function style_select($default = '', $all = false)
}
/**
+* Format the timezone offset with hours and minutes
+*
+* @param int $tz_offset Timezone offset in seconds
+* @return string Normalized offset string: -7200 => -02:00
+* 16200 => +04:30
+*/
+function phpbb_format_timezone_offset($tz_offset)
+{
+ $sign = ($tz_offset < 0) ? '-' : '+';
+ $time_offset = abs($tz_offset);
+
+ $offset_seconds = $time_offset % 3600;
+ $offset_minutes = $offset_seconds / 60;
+ $offset_hours = ($time_offset - $offset_seconds) / 3600;
+
+ $offset_string = sprintf("%s%02d:%02d", $sign, $offset_hours, $offset_minutes);
+ return $offset_string;
+}
+
+/**
+* Compares two time zone labels.
+* Arranges them in increasing order by timezone offset.
+* Places UTC before other timezones in the same offset.
+*/
+function phpbb_tz_select_compare($a, $b)
+{
+ $a_sign = $a[3];
+ $b_sign = $b[3];
+ if ($a_sign != $b_sign)
+ {
+ return $a_sign == '-' ? -1 : 1;
+ }
+
+ $a_offset = substr($a, 4, 5);
+ $b_offset = substr($b, 4, 5);
+ if ($a_offset == $b_offset)
+ {
+ $a_name = substr($a, 12);
+ $b_name = substr($b, 12);
+ if ($a_name == $b_name)
+ {
+ return 0;
+ }
+ else if ($a_name == 'UTC')
+ {
+ return -1;
+ }
+ else if ($b_name == 'UTC')
+ {
+ return 1;
+ }
+ else
+ {
+ return $a_name < $b_name ? -1 : 1;
+ }
+ }
+ else
+ {
+ if ($a_sign == '-')
+ {
+ return $a_offset > $b_offset ? -1 : 1;
+ }
+ else
+ {
+ return $a_offset < $b_offset ? -1 : 1;
+ }
+ }
+}
+
+/**
+* Return list of timezone identifiers
+* We also add the selected timezone if we can create an object with it.
+* DateTimeZone::listIdentifiers seems to not add all identifiers to the list,
+* because some are only kept for backward compatible reasons. If the user has
+* a deprecated value, we add it here, so it can still be kept. Once the user
+* changed his value, there is no way back to deprecated values.
+*
+* @param string $selected_timezone Additional timezone that shall
+* be added to the list of identiers
+* @return array DateTimeZone::listIdentifiers and additional
+* selected_timezone if it is a valid timezone.
+*/
+function phpbb_get_timezone_identifiers($selected_timezone)
+{
+ $timezones = DateTimeZone::listIdentifiers();
+
+ if (!in_array($selected_timezone, $timezones))
+ {
+ try
+ {
+ // Add valid timezones that are currently selected but not returned
+ // by DateTimeZone::listIdentifiers
+ $validate_timezone = new DateTimeZone($selected_timezone);
+ $timezones[] = $selected_timezone;
+ }
+ catch (Exception $e)
+ {
+ }
+ }
+
+ return $timezones;
+}
+
+/**
* 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
+*
+* @deprecated
*/
function tz_select($default = '', $truncate = false)
{
global $user;
- $tz_select = '';
- foreach ($user->lang['tz_zones'] as $offset => $zone)
+ $timezone_select = phpbb_timezone_select($user, $default, $truncate);
+ return $timezone_select['tz_select'];
+}
+
+/**
+* Options to pick a timezone and date/time
+*
+* @param \phpbb\user $user Object of the current user
+* @param string $default A timezone to select
+* @param boolean $truncate Shall we truncate the options text
+*
+* @return array Returns an array, also containing the options for the time selector.
+*/
+function phpbb_timezone_select($user, $default = '', $truncate = false)
+{
+ static $timezones;
+
+ $default_offset = '';
+ if (!isset($timezones))
{
- if ($truncate)
+ $unsorted_timezones = phpbb_get_timezone_identifiers($default);
+
+ $timezones = array();
+ foreach ($unsorted_timezones as $timezone)
{
- $zone_trunc = truncate_string($zone, 50, 255, false, '...');
+ $tz = new DateTimeZone($timezone);
+ $dt = new \phpbb\datetime($user, 'now', $tz);
+ $offset = $dt->getOffset();
+ $current_time = $dt->format($user->lang['DATETIME_FORMAT'], true);
+ $offset_string = phpbb_format_timezone_offset($offset);
+ $timezones['GMT' . $offset_string . ' - ' . $timezone] = array(
+ 'tz' => $timezone,
+ 'offest' => 'GMT' . $offset_string,
+ 'current' => $current_time,
+ );
+ if ($timezone === $default)
+ {
+ $default_offset = 'GMT' . $offset_string;
+ }
}
- else
+ unset($unsorted_timezones);
+
+ uksort($timezones, 'phpbb_tz_select_compare');
+ }
+
+ $tz_select = $tz_dates = $opt_group = '';
+
+ foreach ($timezones as $timezone)
+ {
+ if ($opt_group != $timezone['offest'])
+ {
+ $tz_select .= ($opt_group) ? '</optgroup>' : '';
+ $tz_select .= '<optgroup label="' . $timezone['offest'] . ' - ' . $timezone['current'] . '">';
+ $opt_group = $timezone['offest'];
+
+ $selected = ($default_offset == $timezone['offest']) ? ' selected="selected"' : '';
+ $tz_dates .= '<option value="' . $timezone['offest'] . ' - ' . $timezone['current'] . '"' . $selected . '>' . $timezone['offest'] . ' - ' . $timezone['current'] . '</option>';
+ }
+
+ $label = $timezone['tz'];
+ if (isset($user->lang['timezones'][$label]))
{
- $zone_trunc = $zone;
+ $label = $user->lang['timezones'][$label];
}
+ $title = $timezone['offest'] . ' - ' . $label;
- if (is_numeric($offset))
+ if ($truncate)
{
- $selected = ($offset == $default) ? ' selected="selected"' : '';
- $tz_select .= '<option title="' . $zone . '" value="' . $offset . '"' . $selected . '>' . $zone_trunc . '</option>';
+ $label = truncate_string($label, 50, 255, false, '...');
}
+
+ $selected = ($timezone['tz'] === $default) ? ' selected="selected"' : '';
+ $tz_select .= '<option title="' . $title . '" value="' . $timezone['tz'] . '"' . $selected . '>' . $label . '</option>';
}
+ $tz_select .= '</optgroup>';
- return $tz_select;
+ return array(
+ 'tz_select' => $tz_select,
+ 'tz_dates' => $tz_dates,
+ );
}
// Functions handling topic/post tracking/marking
@@ -1336,41 +1106,77 @@ function tz_select($default = '', $truncate = false)
* Marks a topic/forum as read
* Marks a topic as posted to
*
+* @param string $mode (all, topics, topic, post)
+* @param int|bool $forum_id Used in all, topics, and topic mode
+* @param int|bool $topic_id Used in topic and post mode
+* @param int $post_time 0 means current time(), otherwise to set a specific mark time
* @param int $user_id can only be used with $mode == 'post'
*/
function markread($mode, $forum_id = false, $topic_id = false, $post_time = 0, $user_id = 0)
{
global $db, $user, $config;
+ global $request, $phpbb_container;
+
+ $post_time = ($post_time === 0 || $post_time > time()) ? time() : (int) $post_time;
if ($mode == 'all')
{
if ($forum_id === false || !sizeof($forum_id))
{
+ // Mark all forums read (index page)
+
+ $phpbb_notifications = $phpbb_container->get('notification_manager');
+
+ // Mark all topic notifications read for this user
+ $phpbb_notifications->mark_notifications_read(array(
+ 'topic',
+ 'quote',
+ 'bookmark',
+ 'post',
+ 'approve_topic',
+ 'approve_post',
+ ), false, $user->data['user_id'], $post_time);
+
if ($config['load_db_lastread'] && $user->data['is_registered'])
{
// Mark all forums read (index page)
- $db->sql_query('DELETE FROM ' . TOPICS_TRACK_TABLE . " WHERE user_id = {$user->data['user_id']}");
- $db->sql_query('DELETE FROM ' . FORUMS_TRACK_TABLE . " WHERE user_id = {$user->data['user_id']}");
- $db->sql_query('UPDATE ' . USERS_TABLE . ' SET user_lastmark = ' . time() . " WHERE user_id = {$user->data['user_id']}");
+ $tables = array(TOPICS_TRACK_TABLE, FORUMS_TRACK_TABLE);
+ foreach ($tables as $table)
+ {
+ $sql = 'DELETE FROM ' . $table . "
+ WHERE user_id = {$user->data['user_id']}
+ AND mark_time < $post_time";
+ $db->sql_query($sql);
+ }
+
+ $sql = 'UPDATE ' . USERS_TABLE . "
+ SET user_lastmark = $post_time
+ WHERE user_id = {$user->data['user_id']}
+ AND user_lastmark < $post_time";
+ $db->sql_query($sql);
}
else if ($config['load_anon_lastread'] || $user->data['is_registered'])
{
- $tracking_topics = (isset($_COOKIE[$config['cookie_name'] . '_track'])) ? ((STRIP) ? stripslashes($_COOKIE[$config['cookie_name'] . '_track']) : $_COOKIE[$config['cookie_name'] . '_track']) : '';
+ $tracking_topics = $request->variable($config['cookie_name'] . '_track', '', true, \phpbb\request\request_interface::COOKIE);
$tracking_topics = ($tracking_topics) ? tracking_unserialize($tracking_topics) : array();
unset($tracking_topics['tf']);
unset($tracking_topics['t']);
unset($tracking_topics['f']);
- $tracking_topics['l'] = base_convert(time() - $config['board_startdate'], 10, 36);
+ $tracking_topics['l'] = base_convert($post_time - $config['board_startdate'], 10, 36);
- $user->set_cookie('track', tracking_serialize($tracking_topics), time() + 31536000);
- $_COOKIE[$config['cookie_name'] . '_track'] = (STRIP) ? addslashes(tracking_serialize($tracking_topics)) : tracking_serialize($tracking_topics);
+ $user->set_cookie('track', tracking_serialize($tracking_topics), $post_time + 31536000);
+ $request->overwrite($config['cookie_name'] . '_track', tracking_serialize($tracking_topics), \phpbb\request\request_interface::COOKIE);
unset($tracking_topics);
if ($user->data['is_registered'])
{
- $db->sql_query('UPDATE ' . USERS_TABLE . ' SET user_lastmark = ' . time() . " WHERE user_id = {$user->data['user_id']}");
+ $sql = 'UPDATE ' . USERS_TABLE . "
+ SET user_lastmark = $post_time
+ WHERE user_id = {$user->data['user_id']}
+ AND user_lastmark < $post_time";
+ $db->sql_query($sql);
}
}
}
@@ -1385,6 +1191,32 @@ function markread($mode, $forum_id = false, $topic_id = false, $post_time = 0, $
$forum_id = array($forum_id);
}
+ $phpbb_notifications = $phpbb_container->get('notification_manager');
+
+ $phpbb_notifications->mark_notifications_read_by_parent(array(
+ 'topic',
+ 'approve_topic',
+ ), $forum_id, $user->data['user_id'], $post_time);
+
+ // Mark all post/quote notifications read for this user in this forum
+ $topic_ids = array();
+ $sql = 'SELECT topic_id
+ FROM ' . TOPICS_TABLE . '
+ WHERE ' . $db->sql_in_set('forum_id', $forum_id);
+ $result = $db->sql_query($sql);
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $topic_ids[] = $row['topic_id'];
+ }
+ $db->sql_freeresult($result);
+
+ $phpbb_notifications->mark_notifications_read_by_parent(array(
+ 'quote',
+ 'bookmark',
+ 'post',
+ 'approve_post',
+ ), $topic_ids, $user->data['user_id'], $post_time);
+
// Add 0 to forums array to mark global announcements correctly
// $forum_id[] = 0;
@@ -1392,6 +1224,7 @@ function markread($mode, $forum_id = false, $topic_id = false, $post_time = 0, $
{
$sql = 'DELETE FROM ' . TOPICS_TRACK_TABLE . "
WHERE user_id = {$user->data['user_id']}
+ AND mark_time < $post_time
AND " . $db->sql_in_set('forum_id', $forum_id);
$db->sql_query($sql);
@@ -1410,9 +1243,10 @@ function markread($mode, $forum_id = false, $topic_id = false, $post_time = 0, $
if (sizeof($sql_update))
{
- $sql = 'UPDATE ' . FORUMS_TRACK_TABLE . '
- SET mark_time = ' . time() . "
+ $sql = 'UPDATE ' . FORUMS_TRACK_TABLE . "
+ SET mark_time = $post_time
WHERE user_id = {$user->data['user_id']}
+ AND mark_time < $post_time
AND " . $db->sql_in_set('forum_id', $sql_update);
$db->sql_query($sql);
}
@@ -1425,7 +1259,7 @@ function markread($mode, $forum_id = false, $topic_id = false, $post_time = 0, $
$sql_ary[] = array(
'user_id' => (int) $user->data['user_id'],
'forum_id' => (int) $f_id,
- 'mark_time' => time()
+ 'mark_time' => $post_time,
);
}
@@ -1434,7 +1268,7 @@ function markread($mode, $forum_id = false, $topic_id = false, $post_time = 0, $
}
else if ($config['load_anon_lastread'] || $user->data['is_registered'])
{
- $tracking = (isset($_COOKIE[$config['cookie_name'] . '_track'])) ? ((STRIP) ? stripslashes($_COOKIE[$config['cookie_name'] . '_track']) : $_COOKIE[$config['cookie_name'] . '_track']) : '';
+ $tracking = $request->variable($config['cookie_name'] . '_track', '', true, \phpbb\request\request_interface::COOKIE);
$tracking = ($tracking) ? tracking_unserialize($tracking) : array();
foreach ($forum_id as $f_id)
@@ -1456,7 +1290,7 @@ function markread($mode, $forum_id = false, $topic_id = false, $post_time = 0, $
unset($tracking['f'][$f_id]);
}
- $tracking['f'][$f_id] = base_convert(time() - $config['board_startdate'], 10, 36);
+ $tracking['f'][$f_id] = base_convert($post_time - $config['board_startdate'], 10, 36);
}
if (isset($tracking['tf']) && empty($tracking['tf']))
@@ -1464,8 +1298,8 @@ function markread($mode, $forum_id = false, $topic_id = false, $post_time = 0, $
unset($tracking['tf']);
}
- $user->set_cookie('track', tracking_serialize($tracking), time() + 31536000);
- $_COOKIE[$config['cookie_name'] . '_track'] = (STRIP) ? addslashes(tracking_serialize($tracking)) : tracking_serialize($tracking);
+ $user->set_cookie('track', tracking_serialize($tracking), $post_time + 31536000);
+ $request->overwrite($config['cookie_name'] . '_track', tracking_serialize($tracking), \phpbb\request\request_interface::COOKIE);
unset($tracking);
}
@@ -1479,11 +1313,27 @@ function markread($mode, $forum_id = false, $topic_id = false, $post_time = 0, $
return;
}
+ $phpbb_notifications = $phpbb_container->get('notification_manager');
+
+ // Mark post notifications read for this user in this topic
+ $phpbb_notifications->mark_notifications_read(array(
+ 'topic',
+ 'approve_topic',
+ ), $topic_id, $user->data['user_id'], $post_time);
+
+ $phpbb_notifications->mark_notifications_read_by_parent(array(
+ 'quote',
+ 'bookmark',
+ 'post',
+ 'approve_post',
+ ), $topic_id, $user->data['user_id'], $post_time);
+
if ($config['load_db_lastread'] && $user->data['is_registered'])
{
- $sql = 'UPDATE ' . TOPICS_TRACK_TABLE . '
- SET mark_time = ' . (($post_time) ? $post_time : time()) . "
+ $sql = 'UPDATE ' . TOPICS_TRACK_TABLE . "
+ SET mark_time = $post_time
WHERE user_id = {$user->data['user_id']}
+ AND mark_time < $post_time
AND topic_id = $topic_id";
$db->sql_query($sql);
@@ -1496,7 +1346,7 @@ function markread($mode, $forum_id = false, $topic_id = false, $post_time = 0, $
'user_id' => (int) $user->data['user_id'],
'topic_id' => (int) $topic_id,
'forum_id' => (int) $forum_id,
- 'mark_time' => ($post_time) ? (int) $post_time : time(),
+ 'mark_time' => $post_time,
);
$db->sql_query('INSERT INTO ' . TOPICS_TRACK_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary));
@@ -1506,7 +1356,7 @@ function markread($mode, $forum_id = false, $topic_id = false, $post_time = 0, $
}
else if ($config['load_anon_lastread'] || $user->data['is_registered'])
{
- $tracking = (isset($_COOKIE[$config['cookie_name'] . '_track'])) ? ((STRIP) ? stripslashes($_COOKIE[$config['cookie_name'] . '_track']) : $_COOKIE[$config['cookie_name'] . '_track']) : '';
+ $tracking = $request->variable($config['cookie_name'] . '_track', '', true, \phpbb\request\request_interface::COOKIE);
$tracking = ($tracking) ? tracking_unserialize($tracking) : array();
$topic_id36 = base_convert($topic_id, 10, 36);
@@ -1516,12 +1366,11 @@ function markread($mode, $forum_id = false, $topic_id = false, $post_time = 0, $
$tracking['tf'][$forum_id][$topic_id36] = true;
}
- $post_time = ($post_time) ? $post_time : time();
$tracking['t'][$topic_id36] = base_convert($post_time - $config['board_startdate'], 10, 36);
// If the cookie grows larger than 10000 characters we will remove the smallest value
// This can result in old topics being unread - but most of the time it should be accurate...
- if (isset($_COOKIE[$config['cookie_name'] . '_track']) && strlen($_COOKIE[$config['cookie_name'] . '_track']) > 10000)
+ if (strlen($request->variable($config['cookie_name'] . '_track', '', true, \phpbb\request\request_interface::COOKIE)) > 10000)
{
//echo 'Cookie grown too large' . print_r($tracking, true);
@@ -1552,7 +1401,12 @@ function markread($mode, $forum_id = false, $topic_id = false, $post_time = 0, $
if ($user->data['is_registered'])
{
$user->data['user_lastmark'] = intval(base_convert(max($time_keys) + $config['board_startdate'], 36, 10));
- $db->sql_query('UPDATE ' . USERS_TABLE . ' SET user_lastmark = ' . $user->data['user_lastmark'] . " WHERE user_id = {$user->data['user_id']}");
+
+ $sql = 'UPDATE ' . USERS_TABLE . "
+ SET user_lastmark = $post_time
+ WHERE user_id = {$user->data['user_id']}
+ AND mark_time < $post_time";
+ $db->sql_query($sql);
}
else
{
@@ -1560,8 +1414,8 @@ function markread($mode, $forum_id = false, $topic_id = false, $post_time = 0, $
}
}
- $user->set_cookie('track', tracking_serialize($tracking), time() + 31536000);
- $_COOKIE[$config['cookie_name'] . '_track'] = (STRIP) ? addslashes(tracking_serialize($tracking)) : tracking_serialize($tracking);
+ $user->set_cookie('track', tracking_serialize($tracking), $post_time + 31536000);
+ $request->overwrite($config['cookie_name'] . '_track', tracking_serialize($tracking), \phpbb\request\request_interface::COOKIE);
}
return;
@@ -1582,7 +1436,7 @@ function markread($mode, $forum_id = false, $topic_id = false, $post_time = 0, $
$sql_ary = array(
'user_id' => (int) $use_user_id,
'topic_id' => (int) $topic_id,
- 'topic_posted' => 1
+ 'topic_posted' => 1,
);
$db->sql_query('INSERT INTO ' . TOPICS_POSTED_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary));
@@ -1622,35 +1476,6 @@ function get_topic_tracking($forum_id, $topic_ids, &$rowset, $forum_mark_time, $
{
$mark_time = array();
- // Get global announcement info
- if ($global_announce_list && sizeof($global_announce_list))
- {
- if (!isset($forum_mark_time[0]))
- {
- global $db;
-
- $sql = 'SELECT mark_time
- FROM ' . FORUMS_TRACK_TABLE . "
- WHERE user_id = {$user->data['user_id']}
- AND forum_id = 0";
- $result = $db->sql_query($sql);
- $row = $db->sql_fetchrow($result);
- $db->sql_freeresult($result);
-
- if ($row)
- {
- $mark_time[0] = $row['mark_time'];
- }
- }
- else
- {
- if ($forum_mark_time[0] !== false)
- {
- $mark_time[0] = $forum_mark_time[0];
- }
- }
- }
-
if (!empty($forum_mark_time[$forum_id]) && $forum_mark_time[$forum_id] !== false)
{
$mark_time[$forum_id] = $forum_mark_time[$forum_id];
@@ -1660,14 +1485,7 @@ function get_topic_tracking($forum_id, $topic_ids, &$rowset, $forum_mark_time, $
foreach ($topic_ids as $topic_id)
{
- if ($global_announce_list && isset($global_announce_list[$topic_id]))
- {
- $last_read[$topic_id] = (isset($mark_time[0])) ? $mark_time[0] : $user_lastmark;
- }
- else
- {
- $last_read[$topic_id] = $user_lastmark;
- }
+ $last_read[$topic_id] = $user_lastmark;
}
}
@@ -1679,7 +1497,7 @@ function get_topic_tracking($forum_id, $topic_ids, &$rowset, $forum_mark_time, $
*/
function get_complete_topic_tracking($forum_id, $topic_ids, $global_announce_list = false)
{
- global $config, $user;
+ global $config, $user, $request;
$last_read = array();
@@ -1711,8 +1529,7 @@ function get_complete_topic_tracking($forum_id, $topic_ids, $global_announce_lis
$sql = 'SELECT forum_id, mark_time
FROM ' . FORUMS_TRACK_TABLE . "
WHERE user_id = {$user->data['user_id']}
- AND forum_id " .
- (($global_announce_list && sizeof($global_announce_list)) ? "IN (0, $forum_id)" : "= $forum_id");
+ AND forum_id = $forum_id";
$result = $db->sql_query($sql);
$mark_time = array();
@@ -1726,14 +1543,7 @@ function get_complete_topic_tracking($forum_id, $topic_ids, $global_announce_lis
foreach ($topic_ids as $topic_id)
{
- if ($global_announce_list && isset($global_announce_list[$topic_id]))
- {
- $last_read[$topic_id] = (isset($mark_time[0])) ? $mark_time[0] : $user_lastmark;
- }
- else
- {
- $last_read[$topic_id] = $user_lastmark;
- }
+ $last_read[$topic_id] = $user_lastmark;
}
}
}
@@ -1743,7 +1553,7 @@ function get_complete_topic_tracking($forum_id, $topic_ids, $global_announce_lis
if (!isset($tracking_topics) || !sizeof($tracking_topics))
{
- $tracking_topics = (isset($_COOKIE[$config['cookie_name'] . '_track'])) ? ((STRIP) ? stripslashes($_COOKIE[$config['cookie_name'] . '_track']) : $_COOKIE[$config['cookie_name'] . '_track']) : '';
+ $tracking_topics = $request->variable($config['cookie_name'] . '_track', '', true, \phpbb\request\request_interface::COOKIE);
$tracking_topics = ($tracking_topics) ? tracking_unserialize($tracking_topics) : array();
}
@@ -1771,13 +1581,6 @@ function get_complete_topic_tracking($forum_id, $topic_ids, $global_announce_lis
if (sizeof($topic_ids))
{
$mark_time = array();
- if ($global_announce_list && sizeof($global_announce_list))
- {
- if (isset($tracking_topics['f'][0]))
- {
- $mark_time[0] = base_convert($tracking_topics['f'][0], 36, 10) + $config['board_startdate'];
- }
- }
if (isset($tracking_topics['f'][$forum_id]))
{
@@ -1788,14 +1591,7 @@ function get_complete_topic_tracking($forum_id, $topic_ids, $global_announce_lis
foreach ($topic_ids as $topic_id)
{
- if ($global_announce_list && isset($global_announce_list[$topic_id]))
- {
- $last_read[$topic_id] = (isset($mark_time[0])) ? $mark_time[0] : $user_lastmark;
- }
- else
- {
- $last_read[$topic_id] = $user_lastmark;
- }
+ $last_read[$topic_id] = $user_lastmark;
}
}
}
@@ -1943,7 +1739,7 @@ function get_unread_topics($user_id = false, $sql_extra = '', $sql_sort = '', $s
*/
function update_forum_tracking_info($forum_id, $forum_last_post_time, $f_mark_time = false, $mark_time_forum = false)
{
- global $db, $tracking_topics, $user, $config, $auth;
+ global $db, $tracking_topics, $user, $config, $auth, $request, $phpbb_container;
// Determine the users last forum mark time if not given.
if ($mark_time_forum === false)
@@ -1954,7 +1750,7 @@ function update_forum_tracking_info($forum_id, $forum_last_post_time, $f_mark_ti
}
else if ($config['load_anon_lastread'] || $user->data['is_registered'])
{
- $tracking_topics = (isset($_COOKIE[$config['cookie_name'] . '_track'])) ? ((STRIP) ? stripslashes($_COOKIE[$config['cookie_name'] . '_track']) : $_COOKIE[$config['cookie_name'] . '_track']) : '';
+ $tracking_topics = $request->variable($config['cookie_name'] . '_track', '', true, \phpbb\request\request_interface::COOKIE);
$tracking_topics = ($tracking_topics) ? tracking_unserialize($tracking_topics) : array();
if (!$user->data['is_registered'])
@@ -1968,7 +1764,7 @@ function update_forum_tracking_info($forum_id, $forum_last_post_time, $f_mark_ti
// Handle update of unapproved topics info.
// Only update for moderators having m_approve permission for the forum.
- $sql_update_unapproved = ($auth->acl_get('m_approve', $forum_id)) ? '': 'AND t.topic_approved = 1';
+ $phpbb_content_visibility = $phpbb_container->get('content.visibility');
// Check the forum for any left unread topics.
// If there are none, we mark the forum as read.
@@ -1988,8 +1784,8 @@ function update_forum_tracking_info($forum_id, $forum_last_post_time, $f_mark_ti
AND tt.user_id = ' . $user->data['user_id'] . ')
WHERE t.forum_id = ' . $forum_id . '
AND t.topic_last_post_time > ' . $mark_time_forum . '
- AND t.topic_moved_id = 0 ' .
- $sql_update_unapproved . '
+ AND t.topic_moved_id = 0
+ AND ' . $phpbb_content_visibility->get_visibility_sql('topic', $forum_id, 't.') . '
AND (tt.topic_id IS NULL
OR tt.mark_time < t.topic_last_post_time)';
$result = $db->sql_query_limit($sql, 1);
@@ -2013,8 +1809,8 @@ function update_forum_tracking_info($forum_id, $forum_last_post_time, $f_mark_ti
FROM ' . TOPICS_TABLE . ' t
WHERE t.forum_id = ' . $forum_id . '
AND t.topic_last_post_time > ' . $mark_time_forum . '
- AND t.topic_moved_id = 0 ' .
- $sql_update_unapproved;
+ AND t.topic_moved_id = 0
+ AND ' . $phpbb_content_visibility->get_visibility_sql('topic', $forum_id, 't.');
$result = $db->sql_query($sql);
$check_forum = $tracking_topics['tf'][$forum_id];
@@ -2168,111 +1964,6 @@ function tracking_unserialize($string, $max_depth = 3)
return $level;
}
-// Pagination functions
-
-/**
-* Pagination routine, generates page number sequence
-* tpl_prefix is for using different pagination blocks at one page
-*/
-function generate_pagination($base_url, $num_items, $per_page, $start_item, $add_prevnext_text = false, $tpl_prefix = '')
-{
- global $template, $user;
-
- // Make sure $per_page is a valid value
- $per_page = ($per_page <= 0) ? 1 : $per_page;
-
- $seperator = '<span class="page-sep">' . $user->lang['COMMA_SEPARATOR'] . '</span>';
- $total_pages = ceil($num_items / $per_page);
-
- if ($total_pages == 1 || !$num_items)
- {
- return false;
- }
-
- $on_page = floor($start_item / $per_page) + 1;
- $url_delim = (strpos($base_url, '?') === false) ? '?' : ((strpos($base_url, '?') === strlen($base_url) - 1) ? '' : '&amp;');
-
- $page_string = ($on_page == 1) ? '<strong>1</strong>' : '<a href="' . $base_url . '">1</a>';
-
- if ($total_pages > 5)
- {
- $start_cnt = min(max(1, $on_page - 4), $total_pages - 5);
- $end_cnt = max(min($total_pages, $on_page + 4), 6);
-
- $page_string .= ($start_cnt > 1) ? '<span class="page-dots"> ... </span>' : $seperator;
-
- for ($i = $start_cnt + 1; $i < $end_cnt; $i++)
- {
- $page_string .= ($i == $on_page) ? '<strong>' . $i . '</strong>' : '<a href="' . $base_url . "{$url_delim}start=" . (($i - 1) * $per_page) . '">' . $i . '</a>';
- if ($i < $end_cnt - 1)
- {
- $page_string .= $seperator;
- }
- }
-
- $page_string .= ($end_cnt < $total_pages) ? '<span class="page-dots"> ... </span>' : $seperator;
- }
- else
- {
- $page_string .= $seperator;
-
- for ($i = 2; $i < $total_pages; $i++)
- {
- $page_string .= ($i == $on_page) ? '<strong>' . $i . '</strong>' : '<a href="' . $base_url . "{$url_delim}start=" . (($i - 1) * $per_page) . '">' . $i . '</a>';
- if ($i < $total_pages)
- {
- $page_string .= $seperator;
- }
- }
- }
-
- $page_string .= ($on_page == $total_pages) ? '<strong>' . $total_pages . '</strong>' : '<a href="' . $base_url . "{$url_delim}start=" . (($total_pages - 1) * $per_page) . '">' . $total_pages . '</a>';
-
- if ($add_prevnext_text)
- {
- if ($on_page != 1)
- {
- $page_string = '<a href="' . $base_url . "{$url_delim}start=" . (($on_page - 2) * $per_page) . '">' . $user->lang['PREVIOUS'] . '</a>&nbsp;&nbsp;' . $page_string;
- }
-
- if ($on_page != $total_pages)
- {
- $page_string .= '&nbsp;&nbsp;<a href="' . $base_url . "{$url_delim}start=" . ($on_page * $per_page) . '">' . $user->lang['NEXT'] . '</a>';
- }
- }
-
- $template->assign_vars(array(
- $tpl_prefix . 'BASE_URL' => $base_url,
- 'A_' . $tpl_prefix . 'BASE_URL' => addslashes($base_url),
- $tpl_prefix . 'PER_PAGE' => $per_page,
-
- $tpl_prefix . 'PREVIOUS_PAGE' => ($on_page == 1) ? '' : $base_url . "{$url_delim}start=" . (($on_page - 2) * $per_page),
- $tpl_prefix . 'NEXT_PAGE' => ($on_page == $total_pages) ? '' : $base_url . "{$url_delim}start=" . ($on_page * $per_page),
- $tpl_prefix . 'TOTAL_PAGES' => $total_pages,
- ));
-
- return $page_string;
-}
-
-/**
-* Return current page (pagination)
-*/
-function on_page($num_items, $per_page, $start)
-{
- global $template, $user;
-
- // Make sure $per_page is a valid value
- $per_page = ($per_page <= 0) ? 1 : $per_page;
-
- $on_page = floor($start / $per_page) + 1;
-
- $template->assign_vars(array(
- 'ON_PAGE' => $on_page)
- );
-
- return sprintf($user->lang['PAGE_OF'], $on_page, max(ceil($num_items / $per_page), 1));
-}
-
// Server functions (building urls, redirecting...)
/**
@@ -2295,7 +1986,8 @@ function on_page($num_items, $per_page, $start)
*/
function append_sid($url, $params = false, $is_amp = true, $session_id = false)
{
- global $_SID, $_EXTRA_URL, $phpbb_hook;
+ global $_SID, $_EXTRA_URL, $phpbb_hook, $phpbb_path_helper;
+ global $phpbb_dispatcher;
if ($params === '' || (is_array($params) && empty($params)))
{
@@ -2303,6 +1995,45 @@ function append_sid($url, $params = false, $is_amp = true, $session_id = false)
$params = false;
}
+ // Update the root path with the correct relative web path
+ if ($phpbb_path_helper instanceof \phpbb\path_helper)
+ {
+ $url = $phpbb_path_helper->update_web_root_path($url);
+ }
+
+ $append_sid_overwrite = false;
+
+ /**
+ * This event can either supplement or override the append_sid() function
+ *
+ * To override this function, the event must set $append_sid_overwrite to
+ * the new URL value, which will be returned following the event
+ *
+ * @event core.append_sid
+ * @var string url The url the session id needs
+ * to be appended to (can have
+ * params)
+ * @var mixed params String or array of additional
+ * url parameters
+ * @var bool is_amp Is url using &amp; (true) or
+ * & (false)
+ * @var bool|string session_id Possibility to use a custom
+ * session id (string) instead of
+ * the global one (false)
+ * @var bool|string append_sid_overwrite Overwrite function (string
+ * URL) or not (false)
+ * @since 3.1-A1
+ */
+ $vars = array('url', 'params', 'is_amp', 'session_id', 'append_sid_overwrite');
+ extract($phpbb_dispatcher->trigger_event('core.append_sid', compact($vars)));
+
+ if ($append_sid_overwrite)
+ {
+ return $append_sid_overwrite;
+ }
+
+ // The following hook remains for backwards compatibility, though use of
+ // the event above is preferred.
// Developers using the hook function need to globalise the $_SID and $_EXTRA_URL on their own and also handle it appropriately.
// They could mimic most of what is within this function
if (!empty($phpbb_hook) && $phpbb_hook->call_hook(__FUNCTION__, $url, $params, $is_amp, $session_id))
@@ -2404,10 +2135,10 @@ function append_sid($url, $params = false, $is_amp = true, $session_id = false)
*/
function generate_board_url($without_script_path = false)
{
- global $config, $user;
+ global $config, $user, $request;
$server_name = $user->host;
- $server_port = (!empty($_SERVER['SERVER_PORT'])) ? (int) $_SERVER['SERVER_PORT'] : (int) getenv('SERVER_PORT');
+ $server_port = $request->server('SERVER_PORT', 0);
// Forcing server vars is the only way to specify/override the protocol
if ($config['force_server_vars'] || !$server_name)
@@ -2423,7 +2154,7 @@ function generate_board_url($without_script_path = false)
else
{
// Do not rely on cookie_secure, users seem to think that it means a secured cookie instead of an encrypted connection
- $cookie_secure = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? 1 : 0;
+ $cookie_secure = $request->is_secure() ? 1 : 0;
$url = (($cookie_secure) ? 'https://' : 'http://') . $server_name;
$script_path = $user->page['root_script_path'];
@@ -2462,7 +2193,7 @@ function generate_board_url($without_script_path = false)
*/
function redirect($url, $return = false, $disable_cd_check = false)
{
- global $db, $cache, $config, $user, $phpbb_root_path;
+ global $db, $cache, $config, $user, $phpbb_root_path, $phpbb_filesystem, $phpbb_path_helper, $phpEx;
$failover_flag = false;
@@ -2505,84 +2236,40 @@ function redirect($url, $return = false, $disable_cd_check = false)
// Relative uri
$pathinfo = pathinfo($url);
- if (!$disable_cd_check && !file_exists($pathinfo['dirname'] . '/'))
+ // Is the uri pointing to the current directory?
+ if ($pathinfo['dirname'] == '.')
{
- $url = str_replace('../', '', $url);
- $pathinfo = pathinfo($url);
+ $url = str_replace('./', '', $url);
- if (!file_exists($pathinfo['dirname'] . '/'))
+ // Strip / from the beginning
+ if ($url && substr($url, 0, 1) == '/')
{
- // fallback to "last known user page"
- // at least this way we know the user does not leave the phpBB root
- $url = generate_board_url() . '/' . $user->page['page'];
- $failover_flag = true;
+ $url = substr($url, 1);
}
}
- if (!$failover_flag)
- {
- // Is the uri pointing to the current directory?
- if ($pathinfo['dirname'] == '.')
- {
- $url = str_replace('./', '', $url);
-
- // Strip / from the beginning
- if ($url && substr($url, 0, 1) == '/')
- {
- $url = substr($url, 1);
- }
-
- if ($user->page['page_dir'])
- {
- $url = generate_board_url() . '/' . $user->page['page_dir'] . '/' . $url;
- }
- else
- {
- $url = generate_board_url() . '/' . $url;
- }
- }
- else
- {
- // Used ./ before, but $phpbb_root_path is working better with urls within another root path
- $root_dirs = explode('/', str_replace('\\', '/', phpbb_realpath($phpbb_root_path)));
- $page_dirs = explode('/', str_replace('\\', '/', phpbb_realpath($pathinfo['dirname'])));
- $intersection = array_intersect_assoc($root_dirs, $page_dirs);
-
- $root_dirs = array_diff_assoc($root_dirs, $intersection);
- $page_dirs = array_diff_assoc($page_dirs, $intersection);
+ $url = $phpbb_path_helper->remove_web_root_path($url);
- $dir = str_repeat('../', sizeof($root_dirs)) . implode('/', $page_dirs);
-
- // Strip / from the end
- if ($dir && substr($dir, -1, 1) == '/')
- {
- $dir = substr($dir, 0, -1);
- }
-
- // Strip / from the beginning
- if ($dir && substr($dir, 0, 1) == '/')
- {
- $dir = substr($dir, 1);
- }
+ if ($user->page['page_dir'])
+ {
+ $url = $user->page['page_dir'] . '/' . $url;
+ }
- $url = str_replace($pathinfo['dirname'] . '/', '', $url);
+ $url = generate_board_url() . '/' . $url;
+ }
- // Strip / from the beginning
- if (substr($url, 0, 1) == '/')
- {
- $url = substr($url, 1);
- }
+ // Clean URL and check if we go outside the forum directory
+ $url = $phpbb_path_helper->clean_url($url);
- $url = (!empty($dir) ? $dir . '/' : '') . $url;
- $url = generate_board_url() . '/' . $url;
- }
- }
+ if (!$disable_cd_check && strpos($url, generate_board_url(true)) === false)
+ {
+ trigger_error('INSECURE_REDIRECT', E_USER_ERROR);
}
// Make sure no linebreaks are there... to prevent http response splitting for PHP < 4.4.2
if (strpos(urldecode($url), "\n") !== false || strpos(urldecode($url), "\r") !== false || strpos($url, ';') !== false)
{
- trigger_error('Tried to redirect to potentially insecure url.', E_USER_ERROR);
+ trigger_error('INSECURE_REDIRECT', E_USER_ERROR);
}
// Now, also check the protocol and for a valid url the last time...
@@ -2591,7 +2278,7 @@ function redirect($url, $return = false, $disable_cd_check = false)
if ($url_parts === false || empty($url_parts['scheme']) || !in_array($url_parts['scheme'], $allowed_protocols))
{
- trigger_error('Tried to redirect to potentially insecure url.', E_USER_ERROR);
+ trigger_error('INSECURE_REDIRECT', E_USER_ERROR);
}
if ($return)
@@ -2604,10 +2291,10 @@ function redirect($url, $return = false, $disable_cd_check = false)
{
header('Refresh: 0; URL=' . $url);
- echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">';
- echo '<html xmlns="http://www.w3.org/1999/xhtml" dir="' . $user->lang['DIRECTION'] . '" lang="' . $user->lang['USER_LANG'] . '" xml:lang="' . $user->lang['USER_LANG'] . '">';
+ echo '<!DOCTYPE html>';
+ echo '<html dir="' . $user->lang['DIRECTION'] . '" lang="' . $user->lang['USER_LANG'] . '">';
echo '<head>';
- echo '<meta http-equiv="content-type" content="text/html; charset=utf-8" />';
+ echo '<meta charset="utf-8">';
echo '<meta http-equiv="refresh" content="0; url=' . str_replace('&', '&amp;', $url) . '" />';
echo '<title>' . $user->lang['REDIRECT'] . '</title>';
echo '</head>';
@@ -2657,10 +2344,30 @@ function reapply_sid($url)
*/
function build_url($strip_vars = false)
{
- global $user, $phpbb_root_path;
+ global $config, $user, $phpEx, $phpbb_root_path;
+
+ $page = $user->page['page'];
+
+ // We need to be cautious here.
+ // On some situations, the redirect path is an absolute URL, sometimes a relative path
+ // For a relative path, let's prefix it with $phpbb_root_path to point to the correct location,
+ // else we use the URL directly.
+ $url_parts = parse_url($page);
+
+ // URL
+ if ($url_parts === false || empty($url_parts['scheme']) || empty($url_parts['host']))
+ {
+ // Remove 'app.php/' from the page, when rewrite is enabled
+ if ($config['enable_mod_rewrite'] && strpos($page, 'app.' . $phpEx . '/') === 0)
+ {
+ $page = substr($page, strlen('app.' . $phpEx . '/'));
+ }
+
+ $page = $phpbb_root_path . $page;
+ }
// Append SID
- $redirect = append_sid($user->page['page'], false, false);
+ $redirect = append_sid($page, false, false);
// Add delimiter if not there...
if (strpos($redirect, '?') === false)
@@ -2715,19 +2422,7 @@ function build_url($strip_vars = false)
$redirect .= ($query) ? '?' . $query : '';
}
- // We need to be cautious here.
- // On some situations, the redirect path is an absolute URL, sometimes a relative path
- // For a relative path, let's prefix it with $phpbb_root_path to point to the correct location,
- // else we use the URL directly.
- $url_parts = @parse_url($redirect);
-
- // URL
- if ($url_parts !== false && !empty($url_parts['scheme']) && !empty($url_parts['host']))
- {
- return str_replace('&', '&amp;', $redirect);
- }
-
- return $phpbb_root_path . str_replace('&', '&amp;', $redirect);
+ return str_replace('&', '&amp;', $redirect);
}
/**
@@ -2740,15 +2435,25 @@ function build_url($strip_vars = false)
*/
function meta_refresh($time, $url, $disable_cd_check = false)
{
- global $template;
+ global $template, $refresh_data, $request;
- $url = redirect($url, true, $disable_cd_check);
- $url = str_replace('&', '&amp;', $url);
+ if ($request->is_ajax())
+ {
+ $refresh_data = array(
+ 'time' => $time,
+ 'url' => str_replace('&amp;', '&', $url)
+ );
+ }
+ else
+ {
+ $url = redirect($url, true, $disable_cd_check);
+ $url = str_replace('&', '&amp;', $url);
- // For XHTML compatibility we change back & to &amp;
- $template->assign_vars(array(
- 'META' => '<meta http-equiv="refresh" content="' . $time . '; url=' . $url . '" />')
- );
+ // For XHTML compatibility we change back & to &amp;
+ $template->assign_vars(array(
+ 'META' => '<meta http-equiv="refresh" content="' . $time . '; url=' . $url . '" />')
+ );
+ }
return $url;
}
@@ -2782,18 +2487,35 @@ function send_status_line($code, $message)
}
else
{
- if (!empty($_SERVER['SERVER_PROTOCOL']))
- {
- $version = $_SERVER['SERVER_PROTOCOL'];
- }
- else
- {
- $version = 'HTTP/1.0';
- }
+ $version = phpbb_request_http_version();
header("$version $code $message", true, $code);
}
}
+/**
+* Returns the HTTP version used in the current request.
+*
+* Handles the case of being called before $request is present,
+* in which case it falls back to the $_SERVER superglobal.
+*
+* @return string HTTP version
+*/
+function phpbb_request_http_version()
+{
+ global $request;
+
+ if ($request && $request->server('SERVER_PROTOCOL'))
+ {
+ return $request->server('SERVER_PROTOCOL');
+ }
+ else if (isset($_SERVER['SERVER_PROTOCOL']))
+ {
+ return $_SERVER['SERVER_PROTOCOL'];
+ }
+
+ return 'HTTP/1.0';
+}
+
//Form validation
@@ -2909,23 +2631,15 @@ function check_form_key($form_name, $timespan = false, $return_page = '', $trigg
*/
function confirm_box($check, $title = '', $hidden = '', $html_body = 'confirm_body.html', $u_action = '')
{
- global $user, $template, $db;
- global $phpEx, $phpbb_root_path;
+ global $user, $template, $db, $request;
+ global $phpEx, $phpbb_root_path, $request;
if (isset($_POST['cancel']))
{
return false;
}
- $confirm = false;
- if (isset($_POST['confirm']))
- {
- // language frontier
- if ($_POST['confirm'] === $user->lang['YES'])
- {
- $confirm = true;
- }
- }
+ $confirm = ($user->lang['YES'] === $request->variable('confirm', '', true, \phpbb\request\request_interface::POST));
if ($check && $confirm)
{
@@ -2965,7 +2679,7 @@ function confirm_box($check, $title = '', $hidden = '', $html_body = 'confirm_bo
}
else
{
- page_header(((!isset($user->lang[$title])) ? $user->lang['CONFIRM'] : $user->lang[$title]), false);
+ page_header((!isset($user->lang[$title])) ? $user->lang['CONFIRM'] : $user->lang[$title]);
}
$template->set_filenames(array(
@@ -2990,13 +2704,30 @@ function confirm_box($check, $title = '', $hidden = '', $html_body = 'confirm_bo
'YES_VALUE' => $user->lang['YES'],
'S_CONFIRM_ACTION' => $u_action,
- 'S_HIDDEN_FIELDS' => $hidden . $s_hidden_fields)
- );
+ 'S_HIDDEN_FIELDS' => $hidden . $s_hidden_fields,
+ 'S_AJAX_REQUEST' => $request->is_ajax(),
+ ));
$sql = 'UPDATE ' . USERS_TABLE . " SET user_last_confirm_key = '" . $db->sql_escape($confirm_key) . "'
WHERE user_id = " . $user->data['user_id'];
$db->sql_query($sql);
+
+ if ($request->is_ajax())
+ {
+ $u_action .= '&confirm_uid=' . $user->data['user_id'] . '&sess=' . $user->session_id . '&sid=' . $user->session_id;
+ $json_response = new \phpbb\json_response;
+ $json_response->send(array(
+ 'MESSAGE_BODY' => $template->assign_display('body'),
+ 'MESSAGE_TITLE' => (!isset($user->lang[$title])) ? $user->lang['CONFIRM'] : $user->lang[$title],
+ 'MESSAGE_TEXT' => (!isset($user->lang[$title . '_CONFIRM'])) ? $title : $user->lang[$title . '_CONFIRM'],
+
+ 'YES_VALUE' => $user->lang['YES'],
+ 'S_CONFIRM_ACTION' => str_replace('&amp;', '&', $u_action), //inefficient, rewrite whole function
+ 'S_HIDDEN_FIELDS' => $hidden . $s_hidden_fields
+ ));
+ }
+
if (defined('IN_ADMIN') && isset($user->data['session_admin']) && $user->data['session_admin'])
{
adm_page_footer();
@@ -3013,8 +2744,9 @@ function confirm_box($check, $title = '', $hidden = '', $html_body = 'confirm_bo
function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = false, $s_display = true)
{
global $db, $user, $template, $auth, $phpEx, $phpbb_root_path, $config;
+ global $request, $phpbb_container;
- if (!class_exists('phpbb_captcha_factory'))
+ if (!class_exists('phpbb_captcha_factory', false))
{
include($phpbb_root_path . 'includes/captcha/captcha_factory.' . $phpEx);
}
@@ -3039,7 +2771,7 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa
trigger_error('NO_AUTH_ADMIN');
}
- if (isset($_POST['login']))
+ if ($request->is_set_post('login') || ($request->is_set('login') && $request->variable('login', '') == 'external'))
{
// Get credential
if ($admin)
@@ -3055,16 +2787,16 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa
trigger_error('NO_AUTH_ADMIN');
}
- $password = request_var('password_' . $credential, '', true);
+ $password = $request->untrimmed_variable('password_' . $credential, '', true);
}
else
{
- $password = request_var('password', '', true);
+ $password = $request->untrimmed_variable('password', '', true);
}
$username = request_var('username', '', true);
- $autologin = (!empty($_POST['autologin'])) ? true : false;
- $viewonline = (!empty($_POST['viewonline'])) ? 0 : 1;
+ $autologin = $request->is_set_post('autologin');
+ $viewonline = (int) !$request->is_set_post('viewonline');
$admin = ($admin) ? 1 : 0;
$viewonline = ($admin) ? $user->data['session_viewonline'] : $viewonline;
@@ -3114,8 +2846,7 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa
return;
}
- $redirect = meta_refresh(3, $redirect);
- trigger_error($message . '<br /><br />' . sprintf($l_redirect, '<a href="' . $redirect . '">', '</a>'));
+ redirect($redirect);
}
// Something failed, determine what...
@@ -3181,6 +2912,29 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa
$s_hidden_fields['credential'] = $credential;
}
+ $auth_provider = $phpbb_container->get('auth.provider.' . $config['auth_method']);
+
+ $auth_provider_data = $auth_provider->get_login_data();
+ if ($auth_provider_data)
+ {
+ if (isset($auth_provider_data['VARS']))
+ {
+ $template->assign_vars($auth_provider_data['VARS']);
+ }
+
+ if (isset($auth_provider_data['BLOCK_VAR_NAME']))
+ {
+ foreach ($auth_provider_data['BLOCK_VARS'] as $block_vars)
+ {
+ $template->assign_block_vars($auth_provider_data['BLOCK_VAR_NAME'], $block_vars);
+ }
+ }
+
+ $template->assign_vars(array(
+ 'PROVIDER_TEMPLATE_FILE' => $auth_provider_data['TEMPLATE_FILE'],
+ ));
+ }
+
$s_hidden_fields = build_hidden_fields($s_hidden_fields);
$template->assign_vars(array(
@@ -3202,7 +2956,7 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa
'PASSWORD_CREDENTIAL' => ($admin) ? 'password_' . $credential : 'password',
));
- page_header($user->lang['LOGIN'], false);
+ page_header($user->lang['LOGIN']);
$template->set_filenames(array(
'body' => 'login_body.html')
@@ -3217,9 +2971,9 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa
*/
function login_forum_box($forum_data)
{
- global $db, $config, $user, $template, $phpEx;
+ global $db, $phpbb_container, $request, $template, $user;
- $password = request_var('password', '', true);
+ $password = $request->variable('password', '', true);
$sql = 'SELECT forum_id
FROM ' . FORUMS_ACCESS_TABLE . '
@@ -3260,7 +3014,9 @@ function login_forum_box($forum_data)
}
$db->sql_freeresult($result);
- if (phpbb_check_hash($password, $forum_data['forum_password']))
+ $passwords_manager = $phpbb_container->get('passwords.manager');
+
+ if ($passwords_manager->check($password, $forum_data['forum_password']))
{
$sql_ary = array(
'forum_id' => (int) $forum_data['forum_id'],
@@ -3276,7 +3032,7 @@ function login_forum_box($forum_data)
$template->assign_var('LOGIN_ERROR', $user->lang['WRONG_PASSWORD']);
}
- page_header($user->lang['LOGIN'], false);
+ page_header($user->lang['LOGIN']);
$template->assign_vars(array(
'FORUM_NAME' => isset($forum_data['forum_name']) ? $forum_data['forum_name'] : '',
@@ -3393,79 +3149,59 @@ function parse_cfg_file($filename, $lines = false)
$parsed_items[$key] = $value;
}
-
- if (isset($parsed_items['inherit_from']) && isset($parsed_items['name']) && $parsed_items['inherit_from'] == $parsed_items['name'])
+
+ if (isset($parsed_items['parent']) && isset($parsed_items['name']) && $parsed_items['parent'] == $parsed_items['name'])
{
- unset($parsed_items['inherit_from']);
+ unset($parsed_items['parent']);
}
return $parsed_items;
}
/**
-* Add log event
+* Add log entry
+*
+* @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
+*
+* @return int|bool Returns the log_id, if the entry was added to the database, false otherwise.
+*
+* @deprecated Use $phpbb_log->add() instead
*/
function add_log()
{
- global $db, $user;
-
- // In phpBB 3.1.x i want to have logging in a class to be able to control it
- // For now, we need a quite hakish approach to circumvent logging for some actions
- // @todo implement cleanly
- if (!empty($GLOBALS['skip_add_log']))
- {
- return false;
- }
+ global $phpbb_log, $user;
$args = func_get_args();
+ $mode = array_shift($args);
- $mode = array_shift($args);
- $reportee_id = ($mode == 'user') ? intval(array_shift($args)) : '';
- $forum_id = ($mode == 'mod') ? intval(array_shift($args)) : '';
- $topic_id = ($mode == 'mod') ? intval(array_shift($args)) : '';
- $action = array_shift($args);
- $data = (!sizeof($args)) ? '' : serialize($args);
-
- $sql_ary = array(
- 'user_id' => (empty($user->data)) ? ANONYMOUS : $user->data['user_id'],
- 'log_ip' => $user->ip,
- 'log_time' => time(),
- 'log_operation' => $action,
- 'log_data' => $data,
- );
-
+ // This looks kind of dirty, but add_log has some additional data before the log_operation
+ $additional_data = array();
switch ($mode)
{
case 'admin':
- $sql_ary['log_type'] = LOG_ADMIN;
+ case 'critical':
break;
-
case 'mod':
- $sql_ary += array(
- 'log_type' => LOG_MOD,
- 'forum_id' => $forum_id,
- 'topic_id' => $topic_id
- );
+ $additional_data['forum_id'] = array_shift($args);
+ $additional_data['topic_id'] = array_shift($args);
break;
-
case 'user':
- $sql_ary += array(
- 'log_type' => LOG_USERS,
- 'reportee_id' => $reportee_id
- );
+ $additional_data['reportee_id'] = array_shift($args);
break;
-
- case 'critical':
- $sql_ary['log_type'] = LOG_CRITICAL;
- break;
-
- default:
- return false;
}
- $db->sql_query('INSERT INTO ' . LOG_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary));
+ $log_operation = array_shift($args);
+ $additional_data = array_merge($additional_data, $args);
+
+ $user_id = (empty($user->data)) ? ANONYMOUS : $user->data['user_id'];
+ $user_ip = (empty($user->ip)) ? '' : $user->ip;
- return $db->sql_nextid();
+ return $phpbb_log->add($mode, $user_id, $user_ip, $log_operation, time(), $additional_data);
}
/**
@@ -3588,18 +3324,10 @@ function get_preg_expression($mode)
*/
function get_censor_preg_expression($word, $use_unicode = true)
{
- static $unicode_support = null;
-
- // Check whether PHP version supports unicode properties
- if (is_null($unicode_support))
- {
- $unicode_support = ((version_compare(PHP_VERSION, '5.1.0', '>=') || (version_compare(PHP_VERSION, '5.0.0-dev', '<=') && version_compare(PHP_VERSION, '4.4.0', '>='))) && @preg_match('/\p{L}/u', 'a') !== false) ? true : false;
- }
-
// Unescape the asterisk to simplify further conversions
$word = str_replace('\*', '*', preg_quote($word, '#'));
- if ($use_unicode && $unicode_support)
+ if ($use_unicode && phpbb_pcre_utf8_support())
{
// Replace asterisk(s) inside the pattern, at the start and at the end of it with regexes
$word = preg_replace(array('#(?<=[\p{Nd}\p{L}_])\*+(?=[\p{Nd}\p{L}_])#iu', '#^\*+#', '#\*+$#'), array('([\x20]*?|[\p{Nd}\p{L}_-]*?)', '[\p{Nd}\p{L}_-]*?', '[\p{Nd}\p{L}_-]*?'), $word);
@@ -3651,6 +3379,188 @@ function short_ipv6($ip, $length)
}
/**
+* Normalises an internet protocol address,
+* also checks whether the specified address is valid.
+*
+* IPv4 addresses are returned 'as is'.
+*
+* IPv6 addresses are normalised according to
+* A Recommendation for IPv6 Address Text Representation
+* http://tools.ietf.org/html/draft-ietf-6man-text-addr-representation-07
+*
+* @param string $address IP address
+*
+* @return mixed false if specified address is not valid,
+* string otherwise
+*
+* @author bantu
+*/
+function phpbb_ip_normalise($address)
+{
+ $address = trim($address);
+
+ if (empty($address) || !is_string($address))
+ {
+ return false;
+ }
+
+ if (preg_match(get_preg_expression('ipv4'), $address))
+ {
+ return $address;
+ }
+
+ return phpbb_inet_ntop(phpbb_inet_pton($address));
+}
+
+/**
+* Wrapper for inet_ntop()
+*
+* Converts a packed internet address to a human readable representation
+* inet_ntop() is supported by PHP since 5.1.0, since 5.3.0 also on Windows.
+*
+* @param string $in_addr A 32bit IPv4, or 128bit IPv6 address.
+*
+* @return mixed false on failure,
+* string otherwise
+*
+* @author APTX
+*/
+function phpbb_inet_ntop($in_addr)
+{
+ $in_addr = bin2hex($in_addr);
+
+ switch (strlen($in_addr))
+ {
+ case 8:
+ return implode('.', array_map('hexdec', str_split($in_addr, 2)));
+
+ case 32:
+ if (substr($in_addr, 0, 24) === '00000000000000000000ffff')
+ {
+ return phpbb_inet_ntop(pack('H*', substr($in_addr, 24)));
+ }
+
+ $parts = str_split($in_addr, 4);
+ $parts = preg_replace('/^0+(?!$)/', '', $parts);
+ $ret = implode(':', $parts);
+
+ $matches = array();
+ preg_match_all('/(?<=:|^)(?::?0){2,}/', $ret, $matches, PREG_OFFSET_CAPTURE);
+ $matches = $matches[0];
+
+ if (empty($matches))
+ {
+ return $ret;
+ }
+
+ $longest_match = '';
+ $longest_match_offset = 0;
+ foreach ($matches as $match)
+ {
+ if (strlen($match[0]) > strlen($longest_match))
+ {
+ $longest_match = $match[0];
+ $longest_match_offset = $match[1];
+ }
+ }
+
+ $ret = substr_replace($ret, '', $longest_match_offset, strlen($longest_match));
+
+ if ($longest_match_offset == strlen($ret))
+ {
+ $ret .= ':';
+ }
+
+ if ($longest_match_offset == 0)
+ {
+ $ret = ':' . $ret;
+ }
+
+ return $ret;
+
+ default:
+ return false;
+ }
+}
+
+/**
+* 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,
+* in_addr representation of the given address otherwise (string)
+*
+* @author APTX
+*/
+function phpbb_inet_pton($address)
+{
+ $ret = '';
+ if (preg_match(get_preg_expression('ipv4'), $address))
+ {
+ foreach (explode('.', $address) as $part)
+ {
+ $ret .= ($part <= 0xF ? '0' : '') . dechex($part);
+ }
+
+ return pack('H*', $ret);
+ }
+
+ if (preg_match(get_preg_expression('ipv6'), $address))
+ {
+ $parts = explode(':', $address);
+ $missing_parts = 8 - sizeof($parts) + 1;
+
+ if (substr($address, 0, 2) === '::')
+ {
+ ++$missing_parts;
+ }
+
+ if (substr($address, -2) === '::')
+ {
+ ++$missing_parts;
+ }
+
+ $embedded_ipv4 = false;
+ $last_part = end($parts);
+
+ if (preg_match(get_preg_expression('ipv4'), $last_part))
+ {
+ $parts[sizeof($parts) - 1] = '';
+ $last_part = phpbb_inet_pton($last_part);
+ $embedded_ipv4 = true;
+ --$missing_parts;
+ }
+
+ foreach ($parts as $i => $part)
+ {
+ if (strlen($part))
+ {
+ $ret .= str_pad($part, 4, '0', STR_PAD_LEFT);
+ }
+ else if ($i && $i < sizeof($parts) - 1)
+ {
+ $ret .= str_repeat('0000', $missing_parts);
+ }
+ }
+
+ $ret = pack('H*', $ret);
+
+ if ($embedded_ipv4)
+ {
+ $ret .= $last_part;
+ }
+
+ return $ret;
+ }
+
+ return false;
+}
+
+/**
* Wrapper for php's checkdnsrr function.
*
* @param string $host Fully-Qualified Domain Name
@@ -3847,11 +3757,11 @@ function phpbb_checkdnsrr($host, $type = 'MX')
// Handler, header and footer
/**
-* Error and message handler, call with trigger_error if reqd
+* Error and message handler, call with trigger_error if read
*/
function msg_handler($errno, $msg_text, $errfile, $errline)
{
- global $cache, $db, $auth, $template, $config, $user;
+ global $cache, $db, $auth, $template, $config, $user, $request;
global $phpEx, $phpbb_root_path, $msg_title, $msg_long_text;
// Do not display notices if we suppress them via @
@@ -3936,12 +3846,12 @@ function msg_handler($errno, $msg_text, $errfile, $errline)
$log_text .= '<br /><br />BACKTRACE<br />' . $backtrace;
}
- if (defined('IN_INSTALL') || defined('DEBUG_EXTRA') || isset($auth) && $auth->acl_get('a_'))
+ if (defined('IN_INSTALL') || defined('DEBUG') || isset($auth) && $auth->acl_get('a_'))
{
$msg_text = $log_text;
}
- if ((defined('DEBUG') || defined('IN_CRON') || defined('IMAGE_OUTPUT')) && isset($db))
+ if ((defined('IN_CRON') || defined('IMAGE_OUTPUT')) && isset($db))
{
// let's avoid loops
$db->sql_return_on_error(true);
@@ -3956,10 +3866,10 @@ function msg_handler($errno, $msg_text, $errfile, $errline)
// Try to not call the adm page data...
- echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">';
- echo '<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr">';
+ echo '<!DOCTYPE html>';
+ echo '<html dir="ltr">';
echo '<head>';
- echo '<meta http-equiv="content-type" content="text/html; charset=utf-8" />';
+ echo '<meta charset="utf-8">';
echo '<title>' . $msg_title . '</title>';
echo '<style type="text/css">' . "\n" . '/* <![CDATA[ */' . "\n";
echo '* { margin: 0; padding: 0; } html { font-size: 100%; height: 100%; margin-bottom: 1px; background-color: #E4EDF0; } body { font-family: "Lucida Grande", Verdana, Helvetica, Arial, sans-serif; color: #536482; background: #E4EDF0; font-size: 62.5%; margin: 0; } ';
@@ -4035,7 +3945,7 @@ function msg_handler($errno, $msg_text, $errfile, $errline)
}
else
{
- page_header($msg_title, false);
+ page_header($msg_title);
}
}
@@ -4050,6 +3960,20 @@ function msg_handler($errno, $msg_text, $errfile, $errline)
'S_USER_NOTICE' => ($errno == E_USER_NOTICE) ? true : false)
);
+ if ($request->is_ajax())
+ {
+ global $refresh_data;
+
+ $json_response = new \phpbb\json_response;
+ $json_response->send(array(
+ 'MESSAGE_TITLE' => $msg_title,
+ 'MESSAGE_TEXT' => $msg_text,
+ 'S_USER_WARNING' => ($errno == E_USER_WARNING) ? true : false,
+ 'S_USER_NOTICE' => ($errno == E_USER_NOTICE) ? true : false,
+ 'REFRESH_DATA' => (!empty($refresh_data)) ? $refresh_data : null
+ ));
+ }
+
// We do not want the cron script to be called on error messages
define('IN_CRON', true);
@@ -4264,59 +4188,26 @@ function obtain_users_online_string($online_users, $item_id = 0, $item = 'forum'
}
else if ($config['load_online_guests'])
{
- $l_online = ($online_users['guests_online'] === 1) ? $user->lang['BROWSING_' . $item_caps . '_GUEST'] : $user->lang['BROWSING_' . $item_caps . '_GUESTS'];
- $online_userlist = sprintf($l_online, $online_userlist, $online_users['guests_online']);
+ $online_userlist = $user->lang('BROWSING_' . $item_caps . '_GUESTS', $online_users['guests_online'], $online_userlist);
}
else
{
$online_userlist = sprintf($user->lang['BROWSING_' . $item_caps], $online_userlist);
}
// Build online listing
- $vars_online = array(
- 'ONLINE' => array('total_online', 'l_t_user_s', 0),
- 'REG' => array('visible_online', 'l_r_user_s', !$config['load_online_guests']),
- 'HIDDEN' => array('hidden_online', 'l_h_user_s', $config['load_online_guests']),
- 'GUEST' => array('guests_online', 'l_g_user_s', 0)
- );
+ $visible_online = $user->lang('REG_USERS_TOTAL', (int) $online_users['visible_online']);
+ $hidden_online = $user->lang('HIDDEN_USERS_TOTAL', (int) $online_users['hidden_online']);
- foreach ($vars_online as $l_prefix => $var_ary)
+ if ($config['load_online_guests'])
{
- if ($var_ary[2])
- {
- $l_suffix = '_AND';
- }
- else
- {
- $l_suffix = '';
- }
- switch ($online_users[$var_ary[0]])
- {
- case 0:
- ${$var_ary[1]} = $user->lang[$l_prefix . '_USERS_ZERO_TOTAL' . $l_suffix];
- break;
-
- case 1:
- ${$var_ary[1]} = $user->lang[$l_prefix . '_USER_TOTAL' . $l_suffix];
- break;
-
- default:
- ${$var_ary[1]} = $user->lang[$l_prefix . '_USERS_TOTAL' . $l_suffix];
- break;
- }
+ $guests_online = $user->lang('GUEST_USERS_TOTAL', (int) $online_users['guests_online']);
+ $l_online_users = $user->lang('ONLINE_USERS_TOTAL_GUESTS', (int) $online_users['total_online'], $visible_online, $hidden_online, $guests_online);
}
- unset($vars_online);
-
- $l_online_users = sprintf($l_t_user_s, $online_users['total_online']);
- $l_online_users .= sprintf($l_r_user_s, $online_users['visible_online']);
- $l_online_users .= sprintf($l_h_user_s, $online_users['hidden_online']);
-
- if ($config['load_online_guests'])
+ else
{
- $l_online_users .= sprintf($l_g_user_s, $online_users['guests_online']);
+ $l_online_users = $user->lang('ONLINE_USERS_TOTAL', (int) $online_users['total_online'], $visible_online, $hidden_online);
}
-
-
return array(
'online_userlist' => $online_userlist,
'l_online_users' => $l_online_users,
@@ -4359,6 +4250,178 @@ function phpbb_optionset($bit, $set, $data)
}
/**
+* Determine which plural form we should use.
+* For some languages this is not as simple as for English.
+*
+* @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.
+* @return int The plural-case we need to use for the number plural-rule combination
+*/
+function phpbb_get_plural_form($rule, $number)
+{
+ $number = (int) $number;
+
+ if ($rule > 15 || $rule < 0)
+ {
+ trigger_error('INVALID_PLURAL_RULE');
+ }
+
+ /**
+ * The following plural rules are based on a list published by the Mozilla Developer Network
+ * https://developer.mozilla.org/en/Localization_and_Plurals
+ */
+ switch ($rule)
+ {
+ case 0:
+ /**
+ * Families: Asian (Chinese, Japanese, Korean, Vietnamese), Persian, Turkic/Altaic (Turkish), Thai, Lao
+ * 1 - everything: 0, 1, 2, ...
+ */
+ return 1;
+
+ case 1:
+ /**
+ * Families: Germanic (Danish, Dutch, English, Faroese, Frisian, German, Norwegian, Swedish), Finno-Ugric (Estonian, Finnish, Hungarian), Language isolate (Basque), Latin/Greek (Greek), Semitic (Hebrew), Romanic (Italian, Portuguese, Spanish, Catalan)
+ * 1 - 1
+ * 2 - everything else: 0, 2, 3, ...
+ */
+ return ($number == 1) ? 1 : 2;
+
+ case 2:
+ /**
+ * Families: Romanic (French, Brazilian Portuguese)
+ * 1 - 0, 1
+ * 2 - everything else: 2, 3, ...
+ */
+ return (($number == 0) || ($number == 1)) ? 1 : 2;
+
+ case 3:
+ /**
+ * Families: Baltic (Latvian)
+ * 1 - 0
+ * 2 - ends in 1, not 11: 1, 21, ... 101, 121, ...
+ * 3 - everything else: 2, 3, ... 10, 11, 12, ... 20, 22, ...
+ */
+ return ($number == 0) ? 1 : ((($number % 10 == 1) && ($number % 100 != 11)) ? 2 : 3);
+
+ case 4:
+ /**
+ * Families: Celtic (Scottish Gaelic)
+ * 1 - is 1 or 11: 1, 11
+ * 2 - is 2 or 12: 2, 12
+ * 3 - others between 3 and 19: 3, 4, ... 10, 13, ... 18, 19
+ * 4 - everything else: 0, 20, 21, ...
+ */
+ return ($number == 1 || $number == 11) ? 1 : (($number == 2 || $number == 12) ? 2 : (($number >= 3 && $number <= 19) ? 3 : 4));
+
+ case 5:
+ /**
+ * Families: Romanic (Romanian)
+ * 1 - 1
+ * 2 - is 0 or ends in 01-19: 0, 2, 3, ... 19, 101, 102, ... 119, 201, ...
+ * 3 - everything else: 20, 21, ...
+ */
+ return ($number == 1) ? 1 : ((($number == 0) || (($number % 100 > 0) && ($number % 100 < 20))) ? 2 : 3);
+
+ case 6:
+ /**
+ * Families: Baltic (Lithuanian)
+ * 1 - ends in 1, not 11: 1, 21, 31, ... 101, 121, ...
+ * 2 - ends in 0 or ends in 10-20: 0, 10, 11, 12, ... 19, 20, 30, 40, ...
+ * 3 - everything else: 2, 3, ... 8, 9, 22, 23, ... 29, 32, 33, ...
+ */
+ return (($number % 10 == 1) && ($number % 100 != 11)) ? 1 : ((($number % 10 < 2) || (($number % 100 >= 10) && ($number % 100 < 20))) ? 2 : 3);
+
+ case 7:
+ /**
+ * Families: Slavic (Croatian, Serbian, Russian, Ukrainian)
+ * 1 - ends in 1, not 11: 1, 21, 31, ... 101, 121, ...
+ * 2 - ends in 2-4, not 12-14: 2, 3, 4, 22, 23, 24, 32, ...
+ * 3 - everything else: 0, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 25, 26, ...
+ */
+ return (($number % 10 == 1) && ($number % 100 != 11)) ? 1 : ((($number % 10 >= 2) && ($number % 10 <= 4) && (($number % 100 < 10) || ($number % 100 >= 20))) ? 2 : 3);
+
+ case 8:
+ /**
+ * Families: Slavic (Slovak, Czech)
+ * 1 - 1
+ * 2 - 2, 3, 4
+ * 3 - everything else: 0, 5, 6, 7, ...
+ */
+ return ($number == 1) ? 1 : ((($number >= 2) && ($number <= 4)) ? 2 : 3);
+
+ case 9:
+ /**
+ * Families: Slavic (Polish)
+ * 1 - 1
+ * 2 - ends in 2-4, not 12-14: 2, 3, 4, 22, 23, 24, 32, ... 104, 122, ...
+ * 3 - everything else: 0, 5, 6, ... 11, 12, 13, 14, 15, ... 20, 21, 25, ...
+ */
+ return ($number == 1) ? 1 : ((($number % 10 >= 2) && ($number % 10 <= 4) && (($number % 100 < 12) || ($number % 100 > 14))) ? 2 : 3);
+
+ case 10:
+ /**
+ * Families: Slavic (Slovenian, Sorbian)
+ * 1 - ends in 01: 1, 101, 201, ...
+ * 2 - ends in 02: 2, 102, 202, ...
+ * 3 - ends in 03-04: 3, 4, 103, 104, 203, 204, ...
+ * 4 - everything else: 0, 5, 6, 7, 8, 9, 10, 11, ...
+ */
+ return ($number % 100 == 1) ? 1 : (($number % 100 == 2) ? 2 : ((($number % 100 == 3) || ($number % 100 == 4)) ? 3 : 4));
+
+ case 11:
+ /**
+ * Families: Celtic (Irish Gaeilge)
+ * 1 - 1
+ * 2 - 2
+ * 3 - is 3-6: 3, 4, 5, 6
+ * 4 - is 7-10: 7, 8, 9, 10
+ * 5 - everything else: 0, 11, 12, ...
+ */
+ return ($number == 1) ? 1 : (($number == 2) ? 2 : (($number >= 3 && $number <= 6) ? 3 : (($number >= 7 && $number <= 10) ? 4 : 5)));
+
+ case 12:
+ /**
+ * Families: Semitic (Arabic)
+ * 1 - 1
+ * 2 - 2
+ * 3 - ends in 03-10: 3, 4, ... 10, 103, 104, ... 110, 203, 204, ...
+ * 4 - ends in 11-99: 11, ... 99, 111, 112, ...
+ * 5 - everything else: 100, 101, 102, 200, 201, 202, ...
+ * 6 - 0
+ */
+ return ($number == 1) ? 1 : (($number == 2) ? 2 : ((($number % 100 >= 3) && ($number % 100 <= 10)) ? 3 : ((($number % 100 >= 11) && ($number % 100 <= 99)) ? 4 : (($number != 0) ? 5 : 6))));
+
+ case 13:
+ /**
+ * Families: Semitic (Maltese)
+ * 1 - 1
+ * 2 - is 0 or ends in 01-10: 0, 2, 3, ... 9, 10, 101, 102, ...
+ * 3 - ends in 11-19: 11, 12, ... 18, 19, 111, 112, ...
+ * 4 - everything else: 20, 21, ...
+ */
+ return ($number == 1) ? 1 : ((($number == 0) || (($number % 100 > 1) && ($number % 100 < 11))) ? 2 : ((($number % 100 > 10) && ($number % 100 < 20)) ? 3 : 4));
+
+ case 14:
+ /**
+ * Families: Slavic (Macedonian)
+ * 1 - ends in 1: 1, 11, 21, ...
+ * 2 - ends in 2: 2, 12, 22, ...
+ * 3 - everything else: 0, 3, 4, ... 10, 13, 14, ... 20, 23, ...
+ */
+ return ($number % 10 == 1) ? 1 : (($number % 10 == 2) ? 2 : 3);
+
+ case 15:
+ /**
+ * Families: Icelandic
+ * 1 - ends in 1, not 11: 1, 21, 31, ... 101, 121, 131, ...
+ * 2 - everything else: 0, 2, 3, ... 10, 11, 12, ... 20, 22, ...
+ */
+ return (($number % 10 == 1) && ($number % 100 != 11)) ? 1 : 2;
+ }
+}
+
+/**
* Login using http authenticate.
*
* @param array $param Parameter array, see $param_defaults array.
@@ -4367,7 +4430,7 @@ function phpbb_optionset($bit, $set, $data)
*/
function phpbb_http_login($param)
{
- global $auth, $user;
+ global $auth, $user, $request;
global $config;
$param_defaults = array(
@@ -4407,9 +4470,9 @@ function phpbb_http_login($param)
$username = null;
foreach ($username_keys as $k)
{
- if (isset($_SERVER[$k]))
+ if ($request->is_set($k, \phpbb\request\request_interface::SERVER))
{
- $username = $_SERVER[$k];
+ $username = htmlspecialchars_decode($request->server($k));
break;
}
}
@@ -4417,9 +4480,9 @@ function phpbb_http_login($param)
$password = null;
foreach ($password_keys as $k)
{
- if (isset($_SERVER[$k]))
+ if ($request->is_set($k, \phpbb\request\request_interface::SERVER))
{
- $password = $_SERVER[$k];
+ $password = htmlspecialchars_decode($request->server($k));
break;
}
}
@@ -4462,11 +4525,107 @@ function phpbb_http_login($param)
}
/**
+* Escapes and quotes a string for use as an HTML/XML attribute value.
+*
+* This is a port of Python xml.sax.saxutils quoteattr.
+*
+* The function will attempt to choose a quote character in such a way as to
+* avoid escaping quotes in the string. If this is not possible the string will
+* be wrapped in double quotes and double quotes will be escaped.
+*
+* @param string $data The string to be escaped
+* @param array $entities Associative array of additional entities to be escaped
+* @return string Escaped and quoted string
+*/
+function phpbb_quoteattr($data, $entities = null)
+{
+ $data = str_replace('&', '&amp;', $data);
+ $data = str_replace('>', '&gt;', $data);
+ $data = str_replace('<', '&lt;', $data);
+
+ $data = str_replace("\n", '&#10;', $data);
+ $data = str_replace("\r", '&#13;', $data);
+ $data = str_replace("\t", '&#9;', $data);
+
+ if (!empty($entities))
+ {
+ $data = str_replace(array_keys($entities), array_values($entities), $data);
+ }
+
+ if (strpos($data, '"') !== false)
+ {
+ if (strpos($data, "'") !== false)
+ {
+ $data = '"' . str_replace('"', '&quot;', $data) . '"';
+ }
+ else
+ {
+ $data = "'" . $data . "'";
+ }
+ }
+ else
+ {
+ $data = '"' . $data . '"';
+ }
+
+ return $data;
+}
+
+/**
+* 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
+*/
+function phpbb_build_hidden_fields_for_query_params($request, $exclude = null)
+{
+ $names = $request->variable_names(\phpbb\request\request_interface::GET);
+ $hidden = '';
+ foreach ($names as $name)
+ {
+ // Sessions are dealt with elsewhere, omit sid always
+ if ($name == 'sid')
+ {
+ continue;
+ }
+
+ // Omit any additional parameters requested
+ if (!empty($exclude) && in_array($name, $exclude))
+ {
+ continue;
+ }
+
+ $escaped_name = phpbb_quoteattr($name);
+
+ // Note: we might retrieve the variable from POST or cookies
+ // here. To avoid exposing cookies, skip variables that are
+ // overwritten somewhere other than GET entirely.
+ $value = $request->variable($name, '', true);
+ $get_value = $request->variable($name, '', true, \phpbb\request\request_interface::GET);
+ if ($value === $get_value)
+ {
+ $escaped_value = phpbb_quoteattr($value);
+ $hidden .= "<input type='hidden' name=$escaped_name value=$escaped_value />";
+ }
+ }
+ return $hidden;
+}
+
+/**
* Generate page header
*/
-function page_header($page_title = '', $display_online_list = true, $item_id = 0, $item = 'forum')
+function page_header($page_title = '', $display_online_list = false, $item_id = 0, $item = 'forum')
{
global $db, $config, $template, $SID, $_SID, $_EXTRA_URL, $user, $auth, $phpEx, $phpbb_root_path;
+ global $phpbb_dispatcher, $request, $phpbb_container, $phpbb_admin_path;
if (defined('HEADER_INC'))
{
@@ -4475,6 +4634,31 @@ function page_header($page_title = '', $display_online_list = true, $item_id = 0
define('HEADER_INC', true);
+ // A listener can set this variable to `true` when it overrides this function
+ $page_header_override = false;
+
+ /**
+ * Execute code and/or overwrite page_header()
+ *
+ * @event core.page_header
+ * @var string page_title Page title
+ * @var bool display_online_list Do we display online users list
+ * @var string item Restrict online users to a certain
+ * session item, e.g. forum for
+ * session_forum_id
+ * @var int item_id Restrict online users to item id
+ * @var bool page_header_override Shall we return instead of running
+ * the rest of page_header()
+ * @since 3.1-A1
+ */
+ $vars = array('page_title', 'display_online_list', 'item_id', 'item', 'page_header_override');
+ extract($phpbb_dispatcher->trigger_event('core.page_header', compact($vars)));
+
+ if ($page_header_override)
+ {
+ return;
+ }
+
// gzip_compression
if ($config['gzip_compress'])
{
@@ -4537,23 +4721,18 @@ function page_header($page_title = '', $display_online_list = true, $item_id = 0
set_config('record_online_date', time(), true);
}
- $l_online_record = sprintf($user->lang['RECORD_ONLINE_USERS'], $config['record_online_users'], $user->format_date($config['record_online_date'], false, true));
+ $l_online_record = $user->lang('RECORD_ONLINE_USERS', (int) $config['record_online_users'], $user->format_date($config['record_online_date'], false, true));
- $l_online_time = ($config['load_online_time'] == 1) ? 'VIEW_ONLINE_TIME' : 'VIEW_ONLINE_TIMES';
- $l_online_time = sprintf($user->lang[$l_online_time], $config['load_online_time']);
+ $l_online_time = $user->lang('VIEW_ONLINE_TIMES', (int) $config['load_online_time']);
}
- $l_privmsgs_text = $l_privmsgs_text_unread = '';
$s_privmsg_new = false;
- // Obtain number of new private messages if user is logged in
+ // Check for new private messages if user is logged in
if (!empty($user->data['is_registered']))
{
if ($user->data['user_new_privmsg'])
{
- $l_message_new = ($user->data['user_new_privmsg'] == 1) ? $user->lang['NEW_PM'] : $user->lang['NEW_PMS'];
- $l_privmsgs_text = sprintf($l_message_new, $user->data['user_new_privmsg']);
-
if (!$user->data['user_last_privmsg'] || $user->data['user_last_privmsg'] > $user->data['session_last_visit'])
{
$sql = 'UPDATE ' . USERS_TABLE . '
@@ -4570,17 +4749,8 @@ function page_header($page_title = '', $display_online_list = true, $item_id = 0
}
else
{
- $l_privmsgs_text = $user->lang['NO_NEW_PM'];
$s_privmsg_new = false;
}
-
- $l_privmsgs_text_unread = '';
-
- if ($user->data['user_unread_privmsg'] && $user->data['user_unread_privmsg'] != $user->data['user_new_privmsg'])
- {
- $l_message_unread = ($user->data['user_unread_privmsg'] == 1) ? $user->lang['UNREAD_PM'] : $user->lang['UNREAD_PMS'];
- $l_privmsgs_text_unread = sprintf($l_message_unread, $user->data['user_unread_privmsg']);
- }
}
$forum_id = request_var('f', 0);
@@ -4601,10 +4771,12 @@ function page_header($page_title = '', $display_online_list = true, $item_id = 0
// Determine board url - we may need it later
$board_url = generate_board_url() . '/';
- $web_path = (defined('PHPBB_USE_BOARD_URL_PATH') && PHPBB_USE_BOARD_URL_PATH) ? $board_url : $phpbb_root_path;
-
- // Which timezone?
- $tz = ($user->data['user_id'] != ANONYMOUS) ? strval(doubleval($user->data['user_timezone'])) : strval(doubleval($config['board_timezone']));
+ // This path is sent with the base template paths in the assign_vars()
+ // call below. We need to correct it in case we are accessing from a
+ // controller because the web paths will be incorrect otherwise.
+ $phpbb_path_helper = $phpbb_container->get('path_helper');
+ $corrected_path = $phpbb_path_helper->get_web_root_path();
+ $web_path = (defined('PHPBB_USE_BOARD_URL_PATH') && PHPBB_USE_BOARD_URL_PATH) ? $board_url : $corrected_path;
// Send a proper content-language to the output
$user_lang = $user->lang['USER_LANG'];
@@ -4628,6 +4800,34 @@ function page_header($page_title = '', $display_online_list = true, $item_id = 0
}
}
+ $dt = new \phpbb\datetime($user, 'now', $user->timezone);
+ $timezone_offset = 'GMT' . phpbb_format_timezone_offset($dt->getOffset());
+ $timezone_name = $user->timezone->getName();
+ if (isset($user->lang['timezones'][$timezone_name]))
+ {
+ $timezone_name = $user->lang['timezones'][$timezone_name];
+ }
+
+ // Output the notifications
+ $notifications = false;
+ if ($config['load_notifications'] && $user->data['user_id'] != ANONYMOUS && $user->data['user_type'] != USER_IGNORE)
+ {
+ $phpbb_notifications = $phpbb_container->get('notification_manager');
+
+ $notifications = $phpbb_notifications->load_notifications(array(
+ 'all_unread' => true,
+ 'limit' => 5,
+ ));
+
+ foreach ($notifications['notifications'] as $notification)
+ {
+ $template->assign_block_vars('notifications', $notification->prepare_for_display());
+ }
+ }
+
+ $hidden_fields_for_jumpbox = phpbb_build_hidden_fields_for_query_params($request, array('f'));
+ $notification_mark_hash = generate_link_hash('mark_all_notifications_read');
+
// The following assigns all _common_ variables that may be used at any point in a template.
$template->assign_vars(array(
'SITENAME' => $config['sitename'],
@@ -4640,8 +4840,15 @@ function page_header($page_title = '', $display_online_list = true, $item_id = 0
'TOTAL_USERS_ONLINE' => $l_online_users,
'LOGGED_IN_USER_LIST' => $online_userlist,
'RECORD_USERS' => $l_online_record,
- 'PRIVATE_MESSAGE_INFO' => $l_privmsgs_text,
- 'PRIVATE_MESSAGE_INFO_UNREAD' => $l_privmsgs_text_unread,
+ 'PRIVATE_MESSAGE_COUNT' => (!empty($user->data['user_unread_privmsg'])) ? $user->data['user_unread_privmsg'] : 0,
+ 'HIDDEN_FIELDS_FOR_JUMPBOX' => $hidden_fields_for_jumpbox,
+
+ 'UNREAD_NOTIFICATIONS_COUNT' => ($notifications !== false) ? $notifications['unread_count'] : '',
+ 'NOTIFICATIONS_COUNT' => ($notifications !== false) ? $notifications['unread_count'] : '',
+ 'U_VIEW_ALL_NOTIFICATIONS' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=ucp_notifications'),
+ 'U_MARK_ALL_NOTIFICATIONS' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=ucp_notifications&amp;mode=notification_list&amp;mark=all&amp;token=' . $notification_mark_hash),
+ 'U_NOTIFICATION_SETTINGS' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=ucp_notifications&amp;mode=notification_options'),
+ 'S_NOTIFICATIONS_DISPLAY' => $config['load_notifications'],
'S_USER_NEW_PRIVMSG' => $user->data['user_new_privmsg'],
'S_USER_UNREAD_PRIVMSG' => $user->data['user_unread_privmsg'],
@@ -4650,22 +4857,22 @@ function page_header($page_title = '', $display_online_list = true, $item_id = 0
'SID' => $SID,
'_SID' => $_SID,
'SESSION_ID' => $user->session_id,
- 'ROOT_PATH' => $phpbb_root_path,
+ 'ROOT_PATH' => $web_path,
'BOARD_URL' => $board_url,
'L_LOGIN_LOGOUT' => $l_login_logout,
- 'L_INDEX' => $user->lang['FORUM_INDEX'],
+ 'L_INDEX' => ($config['board_index_text'] !== '') ? $config['board_index_text'] : $user->lang['FORUM_INDEX'],
+ 'L_SITE_HOME' => ($config['site_home_text'] !== '') ? $config['site_home_text'] : $user->lang['HOME'],
'L_ONLINE_EXPLAIN' => $l_online_time,
'U_PRIVATEMSGS' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&amp;folder=inbox'),
'U_RETURN_INBOX' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&amp;folder=inbox'),
- 'U_POPUP_PM' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&amp;mode=popup'),
- 'UA_POPUP_PM' => addslashes(append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&amp;mode=popup')),
'U_MEMBERLIST' => append_sid("{$phpbb_root_path}memberlist.$phpEx"),
'U_VIEWONLINE' => ($auth->acl_gets('u_viewprofile', 'a_user', 'a_useradd', 'a_userdel')) ? append_sid("{$phpbb_root_path}viewonline.$phpEx") : '',
'U_LOGIN_LOGOUT' => $u_login_logout,
'U_INDEX' => append_sid("{$phpbb_root_path}index.$phpEx"),
'U_SEARCH' => append_sid("{$phpbb_root_path}search.$phpEx"),
+ 'U_SITE_HOME' => $config['site_home_url'],
'U_REGISTER' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=register'),
'U_PROFILE' => append_sid("{$phpbb_root_path}ucp.$phpEx"),
'U_MODCP' => append_sid("{$phpbb_root_path}mcp.$phpEx", false, true, $user->session_id),
@@ -4676,7 +4883,7 @@ function page_header($page_title = '', $display_online_list = true, $item_id = 0
'U_SEARCH_UNREAD' => append_sid("{$phpbb_root_path}search.$phpEx", 'search_id=unreadposts'),
'U_SEARCH_ACTIVE_TOPICS'=> append_sid("{$phpbb_root_path}search.$phpEx", 'search_id=active_topics'),
'U_DELETE_COOKIES' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=delete_cookies'),
- 'U_TEAM' => ($user->data['user_id'] != ANONYMOUS && !$auth->acl_get('u_viewprofile')) ? '' : append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=leaders'),
+ 'U_TEAM' => ($user->data['user_id'] != ANONYMOUS && !$auth->acl_get('u_viewprofile')) ? '' : append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=team'),
'U_TERMS_USE' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=terms'),
'U_PRIVACY' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=privacy'),
'U_RESTORE_PERMISSIONS' => ($user->data['user_perm_from'] && $auth->acl_get('a_switchperm')) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=restore_perm') : '',
@@ -4687,7 +4894,6 @@ function page_header($page_title = '', $display_online_list = true, $item_id = 0
'S_BOARD_DISABLED' => ($config['board_disable']) ? true : false,
'S_REGISTERED_USER' => (!empty($user->data['is_registered'])) ? true : false,
'S_IS_BOT' => (!empty($user->data['is_bot'])) ? true : false,
- 'S_USER_PM_POPUP' => $user->optionget('popuppm'),
'S_USER_LANG' => $user_lang,
'S_USER_BROWSER' => (isset($user->data['session_browser'])) ? $user->data['session_browser'] : $user->lang['UNKNOWN_BROWSER'],
'S_USERNAME' => $user->data['username'],
@@ -4695,7 +4901,7 @@ function page_header($page_title = '', $display_online_list = true, $item_id = 0
'S_CONTENT_FLOW_BEGIN' => ($user->lang['DIRECTION'] == 'ltr') ? 'left' : 'right',
'S_CONTENT_FLOW_END' => ($user->lang['DIRECTION'] == 'ltr') ? 'right' : 'left',
'S_CONTENT_ENCODING' => 'UTF-8',
- 'S_TIMEZONE' => ($user->data['user_dst'] || ($user->data['user_id'] == ANONYMOUS && $config['board_dst'])) ? sprintf($user->lang['ALL_TIMES'], $user->lang['tz'][$tz], $user->lang['tz']['dst']) : sprintf($user->lang['ALL_TIMES'], $user->lang['tz'][$tz], ''),
+ 'S_TIMEZONE' => sprintf($user->lang['ALL_TIMES'], $timezone_offset, $timezone_name),
'S_DISPLAY_ONLINE_LIST' => ($l_online_time) ? 1 : 0,
'S_DISPLAY_SEARCH' => (!$config['load_search']) ? 0 : (isset($auth) ? ($auth->acl_get('u_search') && $auth->acl_getf_global('f_search')) : 1),
'S_DISPLAY_PM' => ($config['allow_privmsg'] && !empty($user->data['is_registered']) && ($auth->acl_get('u_readpm') || $auth->acl_get('u_sendpm'))) ? true : false,
@@ -4705,8 +4911,8 @@ function page_header($page_title = '', $display_online_list = true, $item_id = 0
'S_FORUM_ID' => $forum_id,
'S_TOPIC_ID' => $topic_id,
- 'S_LOGIN_ACTION' => ((!defined('ADMIN_START')) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=login') : append_sid("index.$phpEx", false, true, $user->session_id)),
- 'S_LOGIN_REDIRECT' => build_hidden_fields(array('redirect' => build_url())),
+ 'S_LOGIN_ACTION' => ((!defined('ADMIN_START')) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=login') : append_sid("{$phpbb_admin_path}index.$phpEx", false, true, $user->session_id)),
+ 'S_LOGIN_REDIRECT' => build_hidden_fields(array('redirect' => $phpbb_path_helper->remove_web_root_path(build_url()))),
'S_ENABLE_FEEDS' => ($config['feed_enable']) ? true : false,
'S_ENABLE_FEEDS_OVERALL' => ($config['feed_overall']) ? true : false,
@@ -4719,11 +4925,11 @@ function page_header($page_title = '', $display_online_list = true, $item_id = 0
'S_SEARCH_HIDDEN_FIELDS' => build_hidden_fields($s_search_hidden_fields),
- 'T_THEME_PATH' => "{$web_path}styles/" . rawurlencode($user->theme['theme_path']) . '/theme',
- 'T_TEMPLATE_PATH' => "{$web_path}styles/" . rawurlencode($user->theme['template_path']) . '/template',
- 'T_SUPER_TEMPLATE_PATH' => (isset($user->theme['template_inherit_path']) && $user->theme['template_inherit_path']) ? "{$web_path}styles/" . rawurlencode($user->theme['template_inherit_path']) . '/template' : "{$web_path}styles/" . rawurlencode($user->theme['template_path']) . '/template',
- 'T_IMAGESET_PATH' => "{$web_path}styles/" . rawurlencode($user->theme['imageset_path']) . '/imageset',
- 'T_IMAGESET_LANG_PATH' => "{$web_path}styles/" . rawurlencode($user->theme['imageset_path']) . '/imageset/' . $user->lang_name,
+ 'T_ASSETS_VERSION' => $config['assets_version'],
+ 'T_ASSETS_PATH' => "{$web_path}assets",
+ 'T_THEME_PATH' => "{$web_path}styles/" . rawurlencode($user->style['style_path']) . '/theme',
+ 'T_TEMPLATE_PATH' => "{$web_path}styles/" . rawurlencode($user->style['style_path']) . '/template',
+ 'T_SUPER_TEMPLATE_PATH' => "{$web_path}styles/" . rawurlencode($user->style['style_path']) . '/template',
'T_IMAGES_PATH' => "{$web_path}images/",
'T_SMILIES_PATH' => "{$web_path}{$config['smilies_path']}/",
'T_AVATAR_PATH' => "{$web_path}{$config['avatar_path']}/",
@@ -4731,14 +4937,15 @@ function page_header($page_title = '', $display_online_list = true, $item_id = 0
'T_ICONS_PATH' => "{$web_path}{$config['icons_path']}/",
'T_RANKS_PATH' => "{$web_path}{$config['ranks_path']}/",
'T_UPLOAD_PATH' => "{$web_path}{$config['upload_path']}/",
- 'T_STYLESHEET_LINK' => (!$user->theme['theme_storedb']) ? "{$web_path}styles/" . rawurlencode($user->theme['theme_path']) . '/theme/stylesheet.css' : append_sid("{$phpbb_root_path}style.$phpEx", 'id=' . $user->theme['style_id'] . '&amp;lang=' . $user->lang_name),
- 'T_STYLESHEET_NAME' => $user->theme['theme_name'],
-
- 'T_THEME_NAME' => rawurlencode($user->theme['theme_path']),
- 'T_TEMPLATE_NAME' => rawurlencode($user->theme['template_path']),
- 'T_SUPER_TEMPLATE_NAME' => rawurlencode((isset($user->theme['template_inherit_path']) && $user->theme['template_inherit_path']) ? $user->theme['template_inherit_path'] : $user->theme['template_path']),
- 'T_IMAGESET_NAME' => rawurlencode($user->theme['imageset_path']),
- 'T_IMAGESET_LANG_NAME' => $user->data['user_lang'],
+ 'T_STYLESHEET_LINK' => "{$web_path}styles/" . rawurlencode($user->style['style_path']) . '/theme/stylesheet.css?assets_version=' . $config['assets_version'],
+ 'T_STYLESHEET_LANG_LINK' => "{$web_path}styles/" . rawurlencode($user->style['style_path']) . '/theme/' . $user->lang_name . '/stylesheet.css?assets_version=' . $config['assets_version'],
+ 'T_JQUERY_LINK' => !empty($config['allow_cdn']) && !empty($config['load_jquery_url']) ? $config['load_jquery_url'] : "{$web_path}assets/javascript/jquery.js?assets_version=" . $config['assets_version'],
+ 'S_ALLOW_CDN' => !empty($config['allow_cdn']),
+
+ 'T_THEME_NAME' => rawurlencode($user->style['style_path']),
+ 'T_THEME_LANG_NAME' => $user->data['user_lang'],
+ 'T_TEMPLATE_NAME' => $user->style['style_path'],
+ 'T_SUPER_TEMPLATE_NAME' => rawurlencode((isset($user->style['style_parent_tree']) && $user->style['style_parent_tree']) ? $user->style['style_parent_tree'] : $user->style['style_path']),
'T_IMAGES' => 'images',
'T_SMILIES' => $config['smilies_path'],
'T_AVATAR' => $config['avatar_path'],
@@ -4748,8 +4955,6 @@ function page_header($page_title = '', $display_online_list = true, $item_id = 0
'T_UPLOAD' => $config['upload_path'],
'SITE_LOGO_IMG' => $user->img('site_logo'),
-
- 'A_COOKIE_SETTINGS' => addslashes('; path=' . $config['cookie_path'] . ((!$config['cookie_domain'] || $config['cookie_domain'] == 'localhost' || $config['cookie_domain'] == '127.0.0.1') ? '' : '; domain=' . $config['cookie_domain']) . ((!$config['cookie_secure']) ? '' : '; secure')),
));
// application/xhtml+xml not used because of IE
@@ -4770,10 +4975,35 @@ function page_header($page_title = '', $display_online_list = true, $item_id = 0
/**
* Generate page footer
+*
+* @param bool $run_cron Whether or not to run the cron
+* @param bool $display_template Whether or not to display the template
+* @param bool $exit_handler Whether or not to run the exit_handler()
*/
-function page_footer($run_cron = true)
+function page_footer($run_cron = true, $display_template = true, $exit_handler = true)
{
global $db, $config, $template, $user, $auth, $cache, $starttime, $phpbb_root_path, $phpEx;
+ global $request, $phpbb_dispatcher, $phpbb_admin_path;
+
+ // A listener can set this variable to `true` when it overrides this function
+ $page_footer_override = false;
+
+ /**
+ * Execute code and/or overwrite page_footer()
+ *
+ * @event core.page_footer
+ * @var bool run_cron Shall we run cron tasks
+ * @var bool page_footer_override Shall we return instead of running
+ * the rest of page_footer()
+ * @since 3.1-A1
+ */
+ $vars = array('run_cron', 'page_footer_override');
+ extract($phpbb_dispatcher->trigger_event('core.page_footer', compact($vars)));
+
+ if ($page_footer_override)
+ {
+ return;
+ }
// Output page creation time
if (defined('DEBUG'))
@@ -4781,24 +5011,22 @@ function page_footer($run_cron = true)
$mtime = explode(' ', microtime());
$totaltime = $mtime[0] + $mtime[1] - $starttime;
- if (!empty($_REQUEST['explain']) && $auth->acl_get('a_') && defined('DEBUG_EXTRA') && method_exists($db, 'sql_report'))
+ if ($request->variable('explain', false) && $auth->acl_get('a_') && defined('DEBUG') && method_exists($db, 'sql_report'))
{
$db->sql_report('display');
}
$debug_output = sprintf('Time : %.3fs | ' . $db->sql_num_queries() . ' Queries | GZIP : ' . (($config['gzip_compress'] && @extension_loaded('zlib')) ? 'On' : 'Off') . (($user->load) ? ' | Load : ' . $user->load : ''), $totaltime);
- if ($auth->acl_get('a_') && defined('DEBUG_EXTRA'))
+ if ($auth->acl_get('a_') && defined('DEBUG'))
{
- if (function_exists('memory_get_usage'))
+ if (function_exists('memory_get_peak_usage'))
{
- if ($memory_usage = memory_get_usage())
+ if ($memory_usage = memory_get_peak_usage())
{
- global $base_memory_usage;
- $memory_usage -= $base_memory_usage;
$memory_usage = get_formatted_filesize($memory_usage);
- $debug_output .= ' | Memory Usage: ' . $memory_usage;
+ $debug_output .= ' | Peak Memory Usage: ' . $memory_usage;
}
}
@@ -4811,12 +5039,12 @@ function page_footer($run_cron = true)
'TRANSLATION_INFO' => (!empty($user->lang['TRANSLATION_INFO'])) ? $user->lang['TRANSLATION_INFO'] : '',
'CREDIT_LINE' => $user->lang('POWERED_BY', '<a href="https://www.phpbb.com/">phpBB</a>&reg; Forum Software &copy; phpBB Group'),
- 'U_ACP' => ($auth->acl_get('a_') && !empty($user->data['is_registered'])) ? append_sid("{$phpbb_root_path}adm/index.$phpEx", false, true, $user->session_id) : '')
+ 'U_ACP' => ($auth->acl_get('a_') && !empty($user->data['is_registered'])) ? append_sid("{$phpbb_admin_path}index.$phpEx", false, true, $user->session_id) : '')
);
// Call cron-type script
$call_cron = false;
- if (!defined('IN_CRON') && $run_cron && !$config['board_disable'] && !$user->data['is_bot'])
+ if (!defined('IN_CRON') && !$config['use_system_cron'] && $run_cron && !$config['board_disable'] && !$user->data['is_bot'])
{
$call_cron = true;
$time_now = (!empty($user->time_now) && is_int($user->time_now)) ? $user->time_now : time();
@@ -4837,47 +5065,27 @@ function page_footer($run_cron = true)
// Call cron job?
if ($call_cron)
{
- $cron_type = '';
-
- if ($time_now - $config['queue_interval'] > $config['last_queue_run'] && !defined('IN_ADMIN') && file_exists($phpbb_root_path . 'cache/queue.' . $phpEx))
- {
- // Process email queue
- $cron_type = 'queue';
- }
- else if (method_exists($cache, 'tidy') && $time_now - $config['cache_gc'] > $config['cache_last_gc'])
- {
- // Tidy the cache
- $cron_type = 'tidy_cache';
- }
- else if ($config['warnings_expire_days'] && ($time_now - $config['warnings_gc'] > $config['warnings_last_gc']))
- {
- $cron_type = 'tidy_warnings';
- }
- else if ($time_now - $config['database_gc'] > $config['database_last_gc'])
- {
- // Tidy the database
- $cron_type = 'tidy_database';
- }
- else if ($time_now - $config['search_gc'] > $config['search_last_gc'])
- {
- // Tidy the search
- $cron_type = 'tidy_search';
- }
- else if ($time_now - $config['session_gc'] > $config['session_last_gc'])
- {
- $cron_type = 'tidy_sessions';
- }
+ global $cron;
+ $task = $cron->find_one_ready_task();
- if ($cron_type)
+ if ($task)
{
- $template->assign_var('RUN_CRON_TASK', '<img src="' . append_sid($phpbb_root_path . 'cron.' . $phpEx, 'cron_type=' . $cron_type) . '" width="1" height="1" alt="cron" />');
+ $url = $task->get_url();
+ $template->assign_var('RUN_CRON_TASK', '<img src="' . $url . '" width="1" height="1" alt="cron" />');
}
}
- $template->display('body');
+ if ($display_template)
+ {
+ $template->display('body');
+ }
garbage_collection();
- exit_handler();
+
+ if ($exit_handler)
+ {
+ exit_handler();
+ }
}
/**
@@ -4887,6 +5095,18 @@ function page_footer($run_cron = true)
function garbage_collection()
{
global $cache, $db;
+ global $phpbb_dispatcher;
+
+ if (!empty($phpbb_dispatcher))
+ {
+ /**
+ * Unload some objects, to free some memory, before we finish our task
+ *
+ * @event core.garbage_collection
+ * @since 3.1-A1
+ */
+ $phpbb_dispatcher->dispatch('core.garbage_collection');
+ }
// Unload cache, must be done before the DB connection if closed
if (!empty($cache))
@@ -4926,7 +5146,7 @@ function exit_handler()
}
/**
-* Handler for init calls in phpBB. This function is called in user::setup();
+* Handler for init calls in phpBB. This function is called in \phpbb\user::setup();
* This function supports hooks.
*/
function phpbb_user_session_handler()
@@ -4944,4 +5164,77 @@ function phpbb_user_session_handler()
return;
}
-?> \ No newline at end of file
+/**
+* Check if PCRE has UTF-8 support
+* PHP may not be linked with the bundled PCRE lib and instead with an older version
+*
+* @return bool Returns true if PCRE (the regular expressions library) supports UTF-8 encoding
+*/
+function phpbb_pcre_utf8_support()
+{
+ static $utf8_pcre_properties = null;
+ if (is_null($utf8_pcre_properties))
+ {
+ $utf8_pcre_properties = (@preg_match('/\p{L}/u', 'a') !== false);
+ }
+ return $utf8_pcre_properties;
+}
+
+/**
+* Casts a numeric string $input to an appropriate numeric type (i.e. integer or float)
+*
+* @param string $input A numeric string.
+*
+* @return int|float Integer $input if $input fits integer,
+* float $input otherwise.
+*/
+function phpbb_to_numeric($input)
+{
+ return ($input > PHP_INT_MAX) ? (float) $input : (int) $input;
+}
+
+/**
+* Convert either 3.0 dbms or 3.1 db driver class name to 3.1 db driver class name.
+*
+* If $dbms is a valid 3.1 db driver class name, returns it unchanged.
+* Otherwise prepends phpbb\db\driver\ to the dbms to convert a 3.0 dbms
+* to 3.1 db driver class name.
+*
+* @param string $dbms dbms parameter
+* @return db driver class
+*/
+function phpbb_convert_30_dbms_to_31($dbms)
+{
+ // Note: this check is done first because mysqli extension
+ // supplies a mysqli class, and class_exists($dbms) would return
+ // true for mysqli class.
+ // However, per the docblock any valid 3.1 driver name should be
+ // recognized by this function, and have priority over 3.0 dbms.
+ if (class_exists('phpbb\db\driver\\' . $dbms))
+ {
+ return 'phpbb\db\driver\\' . $dbms;
+ }
+
+ if (class_exists($dbms))
+ {
+ // Additionally we could check that $dbms extends phpbb\db\driver\driver.
+ // http://php.net/manual/en/class.reflectionclass.php
+ // Beware of possible performance issues:
+ // http://stackoverflow.com/questions/294582/php-5-reflection-api-performance
+ // We could check for interface implementation in all paths or
+ // only when we do not prepend phpbb\db\driver\.
+
+ /*
+ $reflection = new \ReflectionClass($dbms);
+
+ if ($reflection->isSubclassOf('phpbb\db\driver\driver'))
+ {
+ return $dbms;
+ }
+ */
+
+ return $dbms;
+ }
+
+ throw new \RuntimeException("You have specified an invalid dbms driver: $dbms");
+}
diff --git a/phpBB/includes/functions_acp.php b/phpBB/includes/functions_acp.php
new file mode 100644
index 0000000000..cb44ed2794
--- /dev/null
+++ b/phpBB/includes/functions_acp.php
@@ -0,0 +1,680 @@
+<?php
+/**
+*
+* @package acp
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* Header for acp pages
+*/
+function adm_page_header($page_title)
+{
+ global $config, $db, $user, $template;
+ global $phpbb_root_path, $phpbb_admin_path, $phpEx, $SID, $_SID;
+ global $phpbb_dispatcher;
+
+ if (defined('HEADER_INC'))
+ {
+ return;
+ }
+
+ define('HEADER_INC', true);
+
+ // A listener can set this variable to `true` when it overrides this function
+ $adm_page_header_override = false;
+
+ /**
+ * Execute code and/or overwrite adm_page_header()
+ *
+ * @event core.adm_page_header
+ * @var string page_title Page title
+ * @var bool adm_page_header_override Shall we return instead of
+ * running the rest of adm_page_header()
+ * @since 3.1-A1
+ */
+ $vars = array('page_title', 'adm_page_header_override');
+ extract($phpbb_dispatcher->trigger_event('core.adm_page_header', compact($vars)));
+
+ if ($adm_page_header_override)
+ {
+ return;
+ }
+
+ // gzip_compression
+ if ($config['gzip_compress'])
+ {
+ if (@extension_loaded('zlib') && !headers_sent())
+ {
+ ob_start('ob_gzhandler');
+ }
+ }
+
+ $template->assign_vars(array(
+ 'PAGE_TITLE' => $page_title,
+ 'USERNAME' => $user->data['username'],
+
+ 'SID' => $SID,
+ '_SID' => $_SID,
+ 'SESSION_ID' => $user->session_id,
+ 'ROOT_PATH' => $phpbb_root_path,
+ 'ADMIN_ROOT_PATH' => $phpbb_admin_path,
+
+ 'U_LOGOUT' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=logout'),
+ 'U_ADM_LOGOUT' => append_sid("{$phpbb_admin_path}index.$phpEx", 'action=admlogout'),
+ 'U_ADM_INDEX' => append_sid("{$phpbb_admin_path}index.$phpEx"),
+ 'U_INDEX' => append_sid("{$phpbb_root_path}index.$phpEx"),
+
+ 'T_IMAGES_PATH' => "{$phpbb_root_path}images/",
+ 'T_SMILIES_PATH' => "{$phpbb_root_path}{$config['smilies_path']}/",
+ 'T_AVATAR_PATH' => "{$phpbb_root_path}{$config['avatar_path']}/",
+ 'T_AVATAR_GALLERY_PATH' => "{$phpbb_root_path}{$config['avatar_gallery_path']}/",
+ 'T_ICONS_PATH' => "{$phpbb_root_path}{$config['icons_path']}/",
+ 'T_RANKS_PATH' => "{$phpbb_root_path}{$config['ranks_path']}/",
+ 'T_UPLOAD_PATH' => "{$phpbb_root_path}{$config['upload_path']}/",
+
+ 'T_ASSETS_VERSION' => $config['assets_version'],
+
+ 'ICON_MOVE_UP' => '<img src="' . htmlspecialchars($phpbb_admin_path) . 'images/icon_up.gif" alt="' . $user->lang['MOVE_UP'] . '" title="' . $user->lang['MOVE_UP'] . '" />',
+ 'ICON_MOVE_UP_DISABLED' => '<img src="' . htmlspecialchars($phpbb_admin_path) . 'images/icon_up_disabled.gif" alt="' . $user->lang['MOVE_UP'] . '" title="' . $user->lang['MOVE_UP'] . '" />',
+ 'ICON_MOVE_DOWN' => '<img src="' . htmlspecialchars($phpbb_admin_path) . 'images/icon_down.gif" alt="' . $user->lang['MOVE_DOWN'] . '" title="' . $user->lang['MOVE_DOWN'] . '" />',
+ 'ICON_MOVE_DOWN_DISABLED' => '<img src="' . htmlspecialchars($phpbb_admin_path) . 'images/icon_down_disabled.gif" alt="' . $user->lang['MOVE_DOWN'] . '" title="' . $user->lang['MOVE_DOWN'] . '" />',
+ 'ICON_EDIT' => '<img src="' . htmlspecialchars($phpbb_admin_path) . 'images/icon_edit.gif" alt="' . $user->lang['EDIT'] . '" title="' . $user->lang['EDIT'] . '" />',
+ 'ICON_EDIT_DISABLED' => '<img src="' . htmlspecialchars($phpbb_admin_path) . 'images/icon_edit_disabled.gif" alt="' . $user->lang['EDIT'] . '" title="' . $user->lang['EDIT'] . '" />',
+ 'ICON_DELETE' => '<img src="' . htmlspecialchars($phpbb_admin_path) . 'images/icon_delete.gif" alt="' . $user->lang['DELETE'] . '" title="' . $user->lang['DELETE'] . '" />',
+ 'ICON_DELETE_DISABLED' => '<img src="' . htmlspecialchars($phpbb_admin_path) . 'images/icon_delete_disabled.gif" alt="' . $user->lang['DELETE'] . '" title="' . $user->lang['DELETE'] . '" />',
+ 'ICON_SYNC' => '<img src="' . htmlspecialchars($phpbb_admin_path) . 'images/icon_sync.gif" alt="' . $user->lang['RESYNC'] . '" title="' . $user->lang['RESYNC'] . '" />',
+ 'ICON_SYNC_DISABLED' => '<img src="' . htmlspecialchars($phpbb_admin_path) . 'images/icon_sync_disabled.gif" alt="' . $user->lang['RESYNC'] . '" title="' . $user->lang['RESYNC'] . '" />',
+
+ 'S_USER_LANG' => $user->lang['USER_LANG'],
+ 'S_CONTENT_DIRECTION' => $user->lang['DIRECTION'],
+ 'S_CONTENT_ENCODING' => 'UTF-8',
+ 'S_CONTENT_FLOW_BEGIN' => ($user->lang['DIRECTION'] == 'ltr') ? 'left' : 'right',
+ 'S_CONTENT_FLOW_END' => ($user->lang['DIRECTION'] == 'ltr') ? 'right' : 'left',
+ ));
+
+ // application/xhtml+xml not used because of IE
+ header('Content-type: text/html; charset=UTF-8');
+
+ header('Cache-Control: private, no-cache="set-cookie"');
+ header('Expires: 0');
+ header('Pragma: no-cache');
+
+ return;
+}
+
+/**
+* Page footer for acp pages
+*/
+function adm_page_footer($copyright_html = true)
+{
+ global $db, $config, $template, $user, $auth, $cache;
+ global $starttime, $phpbb_root_path, $phpbb_admin_path, $phpEx;
+ global $request, $phpbb_dispatcher;
+
+ // A listener can set this variable to `true` when it overrides this function
+ $adm_page_footer_override = false;
+
+ /**
+ * Execute code and/or overwrite adm_page_footer()
+ *
+ * @event core.adm_page_footer
+ * @var bool copyright_html Shall we display the copyright?
+ * @var bool adm_page_footer_override Shall we return instead of
+ * running the rest of adm_page_footer()
+ * @since 3.1-A1
+ */
+ $vars = array('copyright_html', 'adm_page_footer_override');
+ extract($phpbb_dispatcher->trigger_event('core.adm_page_footer', compact($vars)));
+
+ if ($adm_page_footer_override)
+ {
+ return;
+ }
+
+ // Output page creation time
+ if (defined('DEBUG'))
+ {
+ $mtime = explode(' ', microtime());
+ $totaltime = $mtime[0] + $mtime[1] - $starttime;
+
+ if ($request->variable('explain', false) && $auth->acl_get('a_') && defined('DEBUG') && method_exists($db, 'sql_report'))
+ {
+ $db->sql_report('display');
+ }
+
+ $debug_output = sprintf('Time : %.3fs | ' . $db->sql_num_queries() . ' Queries | GZIP : ' . (($config['gzip_compress']) ? 'On' : 'Off') . (($user->load) ? ' | Load : ' . $user->load : ''), $totaltime);
+
+ if ($auth->acl_get('a_') && defined('DEBUG'))
+ {
+ if (function_exists('memory_get_peak_usage'))
+ {
+ if ($memory_usage = memory_get_peak_usage())
+ {
+ $memory_usage = get_formatted_filesize($memory_usage);
+
+ $debug_output .= ' | Peak Memory Usage: ' . $memory_usage;
+ }
+ }
+
+ $debug_output .= ' | <a href="' . build_url() . '&amp;explain=1">Explain</a>';
+ }
+ }
+
+ $template->assign_vars(array(
+ 'DEBUG_OUTPUT' => (defined('DEBUG')) ? $debug_output : '',
+ 'TRANSLATION_INFO' => (!empty($user->lang['TRANSLATION_INFO'])) ? $user->lang['TRANSLATION_INFO'] : '',
+ 'S_COPYRIGHT_HTML' => $copyright_html,
+ 'CREDIT_LINE' => $user->lang('POWERED_BY', '<a href="https://www.phpbb.com/">phpBB</a>&reg; Forum Software &copy; phpBB Group'),
+ 'T_JQUERY_LINK' => !empty($config['allow_cdn']) && !empty($config['load_jquery_url']) ? $config['load_jquery_url'] : "{$phpbb_root_path}assets/javascript/jquery.js",
+ 'S_ALLOW_CDN' => !empty($config['allow_cdn']),
+ 'VERSION' => $config['version'])
+ );
+
+ $template->display('body');
+
+ garbage_collection();
+ exit_handler();
+}
+
+/**
+* Generate back link for acp pages
+*/
+function adm_back_link($u_action)
+{
+ global $user;
+ return '<br /><br /><a href="' . $u_action . '">&laquo; ' . $user->lang['BACK_TO_PREV'] . '</a>';
+}
+
+/**
+* Build select field options in acp pages
+*/
+function build_select($option_ary, $option_default = false)
+{
+ global $user;
+
+ $html = '';
+ foreach ($option_ary as $value => $title)
+ {
+ $selected = ($option_default !== false && $value == $option_default) ? ' selected="selected"' : '';
+ $html .= '<option value="' . $value . '"' . $selected . '>' . $user->lang[$title] . '</option>';
+ }
+
+ return $html;
+}
+
+/**
+* Build radio fields in acp pages
+*/
+function h_radio($name, $input_ary, $input_default = false, $id = false, $key = false, $separator = '')
+{
+ global $user;
+
+ $html = '';
+ $id_assigned = false;
+ foreach ($input_ary as $value => $title)
+ {
+ $selected = ($input_default !== false && $value == $input_default) ? ' checked="checked"' : '';
+ $html .= '<label><input type="radio" name="' . $name . '"' . (($id && !$id_assigned) ? ' id="' . $id . '"' : '') . ' value="' . $value . '"' . $selected . (($key) ? ' accesskey="' . $key . '"' : '') . ' class="radio" /> ' . $user->lang[$title] . '</label>' . $separator;
+ $id_assigned = true;
+ }
+
+ return $html;
+}
+
+/**
+* Build configuration template for acp configuration pages
+*/
+function build_cfg_template($tpl_type, $key, &$new, $config_key, $vars)
+{
+ global $user, $module, $phpbb_dispatcher;
+
+ $tpl = '';
+ $name = 'config[' . $config_key . ']';
+
+ // Make sure there is no notice printed out for non-existent config options (we simply set them)
+ if (!isset($new[$config_key]))
+ {
+ $new[$config_key] = '';
+ }
+
+ switch ($tpl_type[0])
+ {
+ case 'text':
+ case 'password':
+ case 'url':
+ case 'email':
+ case 'color':
+ case 'date':
+ case 'time':
+ case 'datetime':
+ case 'datetime-local':
+ case 'month':
+ case 'range':
+ case 'search':
+ case 'tel':
+ case 'url':
+ case 'week':
+ $size = (int) $tpl_type[1];
+ $maxlength = (int) $tpl_type[2];
+
+ $tpl = '<input id="' . $key . '" type="' . $tpl_type[0] . '"' . (($size) ? ' size="' . $size . '"' : '') . ' maxlength="' . (($maxlength) ? $maxlength : 255) . '" name="' . $name . '" value="' . $new[$config_key] . '"' . (($tpl_type[0] === 'password') ? ' autocomplete="off"' : '') . ' />';
+ break;
+
+ case 'number':
+ $min = $max = $maxlength = '';
+ $min = ( isset($tpl_type[1]) ) ? (int) $tpl_type[1] : false;
+ if ( isset($tpl_type[2]) )
+ {
+ $max = (int) $tpl_type[2];
+ $maxlength = strlen( (string) $max );
+ }
+
+ $tpl = '<input id="' . $key . '" type="number" maxlength="' . (( $maxlength != '' ) ? $maxlength : 255) . '"' . (( $min != '' ) ? ' min="' . $min . '"' : '') . (( $max != '' ) ? ' max="' . $max . '"' : '') . ' name="' . $name . '" value="' . $new[$config_key] . '" />';
+ break;
+
+ case 'dimension':
+ $min = $max = $maxlength = $size = '';
+
+ $min = (int) $tpl_type[1];
+
+ if ( isset($tpl_type[2]) )
+ {
+ $max = (int) $tpl_type[2];
+ $size = $maxlength = strlen( (string) $max );
+ }
+
+ $tpl = '<input id="' . $key . '" type="number"' . (( $size != '' ) ? ' size="' . $size . '"' : '') . ' maxlength="' . (($maxlength != '') ? $maxlength : 255) . '"' . (( $min !== '' ) ? ' min="' . $min . '"' : '') . (( $max != '' ) ? ' max="' . $max . '"' : '') . ' name="config[' . $config_key . '_width]" value="' . $new[$config_key . '_width'] . '" /> x <input type="number"' . (( $size != '' ) ? ' size="' . $size . '"' : '') . ' maxlength="' . (($maxlength != '') ? $maxlength : 255) . '"' . (( $min !== '' ) ? ' min="' . $min . '"' : '') . (( $max != '' ) ? ' max="' . $max . '"' : '') . ' name="config[' . $config_key . '_height]" value="' . $new[$config_key . '_height'] . '" />';
+ break;
+
+ case 'textarea':
+ $rows = (int) $tpl_type[1];
+ $cols = (int) $tpl_type[2];
+
+ $tpl = '<textarea id="' . $key . '" name="' . $name . '" rows="' . $rows . '" cols="' . $cols . '">' . $new[$config_key] . '</textarea>';
+ break;
+
+ case 'radio':
+ $key_yes = ($new[$config_key]) ? ' checked="checked"' : '';
+ $key_no = (!$new[$config_key]) ? ' checked="checked"' : '';
+
+ $tpl_type_cond = explode('_', $tpl_type[1]);
+ $type_no = ($tpl_type_cond[0] == 'disabled' || $tpl_type_cond[0] == 'enabled') ? false : true;
+
+ $tpl_no = '<label><input type="radio" name="' . $name . '" value="0"' . $key_no . ' class="radio" /> ' . (($type_no) ? $user->lang['NO'] : $user->lang['DISABLED']) . '</label>';
+ $tpl_yes = '<label><input type="radio" id="' . $key . '" name="' . $name . '" value="1"' . $key_yes . ' class="radio" /> ' . (($type_no) ? $user->lang['YES'] : $user->lang['ENABLED']) . '</label>';
+
+ $tpl = ($tpl_type_cond[0] == 'yes' || $tpl_type_cond[0] == 'enabled') ? $tpl_yes . $tpl_no : $tpl_no . $tpl_yes;
+ break;
+
+ case 'select':
+ case 'custom':
+
+ $return = '';
+
+ if (isset($vars['method']))
+ {
+ $call = array($module->module, $vars['method']);
+ }
+ else if (isset($vars['function']))
+ {
+ $call = $vars['function'];
+ }
+ else
+ {
+ break;
+ }
+
+ if (isset($vars['params']))
+ {
+ $args = array();
+ foreach ($vars['params'] as $value)
+ {
+ switch ($value)
+ {
+ case '{CONFIG_VALUE}':
+ $value = $new[$config_key];
+ break;
+
+ case '{KEY}':
+ $value = $key;
+ break;
+ }
+
+ $args[] = $value;
+ }
+ }
+ else
+ {
+ $args = array($new[$config_key], $key);
+ }
+
+ $return = call_user_func_array($call, $args);
+
+ if ($tpl_type[0] == 'select')
+ {
+ $size = (isset($tpl_type[1])) ? (int) $tpl_type[1] : 1;
+
+ $tpl = '<select id="' . $key . '" name="' . $name . '"' . (($size > 1) ? ' size="' . $size . '"' : '') . '>' . $return . '</select>';
+ }
+ else
+ {
+ $tpl = $return;
+ }
+
+ break;
+
+ default:
+ break;
+ }
+
+ if (isset($vars['append']))
+ {
+ $tpl .= $vars['append'];
+ }
+
+ /**
+ * Overwrite the html code we display for the config value
+ *
+ * @event core.build_config_template
+ * @var array tpl_type Config type array:
+ * 0 => data type
+ * 1 [optional] => string: size, int: minimum
+ * 2 [optional] => string: max. length, int: maximum
+ * @var string key Should be used for the id attribute in html
+ * @var array new Array with the config values we display
+ * @var string name Should be used for the name attribute
+ * @var array vars Array with the options for the config
+ * @var string tpl The resulting html code we display
+ * @since 3.1-A1
+ */
+ $vars = array('tpl_type', 'key', 'new', 'name', 'vars', 'tpl');
+ extract($phpbb_dispatcher->trigger_event('core.build_config_template', compact($vars)));
+
+ return $tpl;
+}
+
+/**
+* Going through a config array and validate values, writing errors to $error. The validation method accepts parameters separated by ':' for string and int.
+* The first parameter defines the type to be used, the second the lower bound and the third the upper bound. Only the type is required.
+*/
+function validate_config_vars($config_vars, &$cfg_array, &$error)
+{
+ global $phpbb_root_path, $user, $phpbb_dispatcher;
+
+ $type = 0;
+ $min = 1;
+ $max = 2;
+
+ foreach ($config_vars as $config_name => $config_definition)
+ {
+ if (!isset($cfg_array[$config_name]) || strpos($config_name, 'legend') !== false)
+ {
+ continue;
+ }
+
+ if (!isset($config_definition['validate']))
+ {
+ continue;
+ }
+
+ $validator = explode(':', $config_definition['validate']);
+
+ // Validate a bit. ;) (0 = type, 1 = min, 2= max)
+ switch ($validator[$type])
+ {
+ case 'string':
+ $length = utf8_strlen($cfg_array[$config_name]);
+
+ // the column is a VARCHAR
+ $validator[$max] = (isset($validator[$max])) ? min(255, $validator[$max]) : 255;
+
+ if (isset($validator[$min]) && $length < $validator[$min])
+ {
+ $error[] = sprintf($user->lang['SETTING_TOO_SHORT'], $user->lang[$config_definition['lang']], $validator[$min]);
+ }
+ else if (isset($validator[$max]) && $length > $validator[2])
+ {
+ $error[] = sprintf($user->lang['SETTING_TOO_LONG'], $user->lang[$config_definition['lang']], $validator[$max]);
+ }
+ break;
+
+ case 'bool':
+ $cfg_array[$config_name] = ($cfg_array[$config_name]) ? 1 : 0;
+ break;
+
+ case 'int':
+ $cfg_array[$config_name] = (int) $cfg_array[$config_name];
+
+ if (isset($validator[$min]) && $cfg_array[$config_name] < $validator[$min])
+ {
+ $error[] = sprintf($user->lang['SETTING_TOO_LOW'], $user->lang[$config_definition['lang']], $validator[$min]);
+ }
+ else if (isset($validator[$max]) && $cfg_array[$config_name] > $validator[$max])
+ {
+ $error[] = sprintf($user->lang['SETTING_TOO_BIG'], $user->lang[$config_definition['lang']], $validator[$max]);
+ }
+
+ if (strpos($config_name, '_max') !== false)
+ {
+ // Min/max pairs of settings should ensure that min <= max
+ // Replace _max with _min to find the name of the minimum
+ // corresponding configuration variable
+ $min_name = str_replace('_max', '_min', $config_name);
+
+ if (isset($cfg_array[$min_name]) && is_numeric($cfg_array[$min_name]) && $cfg_array[$config_name] < $cfg_array[$min_name])
+ {
+ // A minimum value exists and the maximum value is less than it
+ $error[] = sprintf($user->lang['SETTING_TOO_LOW'], $user->lang[$config_definition['lang']], (int) $cfg_array[$min_name]);
+ }
+ }
+ break;
+
+ case 'email':
+ if (!preg_match('/^' . get_preg_expression('email') . '$/i', $cfg_array[$config_name]))
+ {
+ $error[] = $user->lang['EMAIL_INVALID_EMAIL'];
+ }
+ break;
+
+ // Absolute path
+ case 'script_path':
+ if (!$cfg_array[$config_name])
+ {
+ break;
+ }
+
+ $destination = str_replace('\\', '/', $cfg_array[$config_name]);
+
+ if ($destination !== '/')
+ {
+ // Adjust destination path (no trailing slash)
+ if (substr($destination, -1, 1) == '/')
+ {
+ $destination = substr($destination, 0, -1);
+ }
+
+ $destination = str_replace(array('../', './'), '', $destination);
+
+ if ($destination[0] != '/')
+ {
+ $destination = '/' . $destination;
+ }
+ }
+
+ $cfg_array[$config_name] = trim($destination);
+
+ break;
+
+ // Absolute path
+ case 'lang':
+ if (!$cfg_array[$config_name])
+ {
+ break;
+ }
+
+ $cfg_array[$config_name] = basename($cfg_array[$config_name]);
+
+ if (!file_exists($phpbb_root_path . 'language/' . $cfg_array[$config_name] . '/'))
+ {
+ $error[] = $user->lang['WRONG_DATA_LANG'];
+ }
+ break;
+
+ // Relative path (appended $phpbb_root_path)
+ case 'rpath':
+ case 'rwpath':
+ if (!$cfg_array[$config_name])
+ {
+ break;
+ }
+
+ $destination = $cfg_array[$config_name];
+
+ // Adjust destination path (no trailing slash)
+ if (substr($destination, -1, 1) == '/' || substr($destination, -1, 1) == '\\')
+ {
+ $destination = substr($destination, 0, -1);
+ }
+
+ $destination = str_replace(array('../', '..\\', './', '.\\'), '', $destination);
+ if ($destination && ($destination[0] == '/' || $destination[0] == "\\"))
+ {
+ $destination = '';
+ }
+
+ $cfg_array[$config_name] = trim($destination);
+
+ // Path being relative (still prefixed by phpbb_root_path), but with the ability to escape the root dir...
+ case 'path':
+ case 'wpath':
+
+ if (!$cfg_array[$config_name])
+ {
+ break;
+ }
+
+ $cfg_array[$config_name] = trim($cfg_array[$config_name]);
+
+ // Make sure no NUL byte is present...
+ if (strpos($cfg_array[$config_name], "\0") !== false || strpos($cfg_array[$config_name], '%00') !== false)
+ {
+ $cfg_array[$config_name] = '';
+ break;
+ }
+
+ if (!file_exists($phpbb_root_path . $cfg_array[$config_name]))
+ {
+ $error[] = sprintf($user->lang['DIRECTORY_DOES_NOT_EXIST'], $cfg_array[$config_name]);
+ }
+
+ if (file_exists($phpbb_root_path . $cfg_array[$config_name]) && !is_dir($phpbb_root_path . $cfg_array[$config_name]))
+ {
+ $error[] = sprintf($user->lang['DIRECTORY_NOT_DIR'], $cfg_array[$config_name]);
+ }
+
+ // Check if the path is writable
+ if ($config_definition['validate'] == 'wpath' || $config_definition['validate'] == 'rwpath')
+ {
+ if (file_exists($phpbb_root_path . $cfg_array[$config_name]) && !phpbb_is_writable($phpbb_root_path . $cfg_array[$config_name]))
+ {
+ $error[] = sprintf($user->lang['DIRECTORY_NOT_WRITABLE'], $cfg_array[$config_name]);
+ }
+ }
+
+ break;
+
+ default:
+ /**
+ * Validate a config value
+ *
+ * @event core.validate_config_variable
+ * @var array cfg_array Array with config values
+ * @var string config_name Name of the config we validate
+ * @var array config_definition Array with the options for
+ * this config
+ * @var array error Array of errors, the errors should
+ * be strings only, language keys are
+ * not replaced afterwards
+ * @since 3.1-A1
+ */
+ $vars = array('cfg_array', 'config_name', 'config_definition', 'error');
+ extract($phpbb_dispatcher->trigger_event('core.validate_config_variable', compact($vars)));
+ break;
+ }
+ }
+
+ return;
+}
+
+/**
+* Checks whatever or not a variable is OK for use in the Database
+* param mixed $value_ary An array of the form array(array('lang' => ..., 'value' => ..., 'column_type' =>))'
+* param mixed $error The error array
+*/
+function validate_range($value_ary, &$error)
+{
+ global $user;
+
+ $column_types = array(
+ 'BOOL' => array('php_type' => 'int', 'min' => 0, 'max' => 1),
+ 'USINT' => array('php_type' => 'int', 'min' => 0, 'max' => 65535),
+ 'UINT' => array('php_type' => 'int', 'min' => 0, 'max' => (int) 0x7fffffff),
+ // Do not use (int) 0x80000000 - it evaluates to different
+ // values on 32-bit and 64-bit systems.
+ // Apparently -2147483648 is a float on 32-bit systems,
+ // despite fitting in an int, thus explicit cast is needed.
+ 'INT' => array('php_type' => 'int', 'min' => (int) -2147483648, 'max' => (int) 0x7fffffff),
+ 'TINT' => array('php_type' => 'int', 'min' => -128, 'max' => 127),
+
+ 'VCHAR' => array('php_type' => 'string', 'min' => 0, 'max' => 255),
+ );
+ foreach ($value_ary as $value)
+ {
+ $column = explode(':', $value['column_type']);
+ $max = $min = 0;
+ $type = 0;
+ if (!isset($column_types[$column[0]]))
+ {
+ continue;
+ }
+ else
+ {
+ $type = $column_types[$column[0]];
+ }
+
+ switch ($type['php_type'])
+ {
+ case 'string' :
+ $max = (isset($column[1])) ? min($column[1],$type['max']) : $type['max'];
+ if (utf8_strlen($value['value']) > $max)
+ {
+ $error[] = sprintf($user->lang['SETTING_TOO_LONG'], $user->lang[$value['lang']], $max);
+ }
+ break;
+
+ case 'int':
+ $min = (isset($column[1])) ? max($column[1],$type['min']) : $type['min'];
+ $max = (isset($column[2])) ? min($column[2],$type['max']) : $type['max'];
+ if ($value['value'] < $min)
+ {
+ $error[] = sprintf($user->lang['SETTING_TOO_LOW'], $user->lang[$value['lang']], $min);
+ }
+ else if ($value['value'] > $max)
+ {
+ $error[] = sprintf($user->lang['SETTING_TOO_BIG'], $user->lang[$value['lang']], $max);
+ }
+ break;
+ }
+ }
+}
diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php
index 3e69a997a2..81a381b326 100644
--- a/phpBB/includes/functions_admin.php
+++ b/phpBB/includes/functions_admin.php
@@ -2,9 +2,8 @@
/**
*
* @package acp
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -619,7 +618,7 @@ function move_posts($post_ids, $topic_id, $auto_sync = true)
*/
function delete_topics($where_type, $where_ids, $auto_sync = true, $post_count_sync = true, $call_delete_posts = true)
{
- global $db, $config;
+ global $db, $config, $phpbb_container;
$approved_topics = 0;
$forum_ids = $topic_ids = array();
@@ -645,7 +644,7 @@ function delete_topics($where_type, $where_ids, $auto_sync = true, $post_count_s
'posts' => ($call_delete_posts) ? delete_posts($where_type, $where_ids, false, true, $post_count_sync, false) : 0,
);
- $sql = 'SELECT topic_id, forum_id, topic_approved, topic_moved_id
+ $sql = 'SELECT topic_id, forum_id, topic_visibility, topic_moved_id
FROM ' . TOPICS_TABLE . '
WHERE ' . $where_clause;
$result = $db->sql_query($sql);
@@ -655,7 +654,7 @@ function delete_topics($where_type, $where_ids, $auto_sync = true, $post_count_s
$forum_ids[] = $row['forum_id'];
$topic_ids[] = $row['topic_id'];
- if ($row['topic_approved'] && !$row['topic_moved_id'])
+ if ($row['topic_visibility'] == ITEM_APPROVED && !$row['topic_moved_id'])
{
$approved_topics++;
}
@@ -716,6 +715,14 @@ function delete_topics($where_type, $where_ids, $auto_sync = true, $post_count_s
set_config_count('num_topics', $approved_topics * (-1), true);
}
+ $phpbb_notifications = $phpbb_container->get('notification_manager');
+
+ $phpbb_notifications->delete_notifications(array(
+ 'topic',
+ 'approve_topic',
+ 'topic_in_queue',
+ ), $topic_ids);
+
return $return;
}
@@ -724,7 +731,32 @@ function delete_topics($where_type, $where_ids, $auto_sync = true, $post_count_s
*/
function delete_posts($where_type, $where_ids, $auto_sync = true, $posted_sync = true, $post_count_sync = true, $call_delete_topics = true)
{
- global $db, $config, $phpbb_root_path, $phpEx;
+ global $db, $config, $phpbb_root_path, $phpEx, $auth, $user, $phpbb_container, $phpbb_dispatcher;
+
+ // Notifications types to delete
+ $delete_notifications_types = array(
+ 'quote',
+ 'bookmark',
+ 'post',
+ 'approve_post',
+ 'post_in_queue',
+ );
+
+ /**
+ * Perform additional actions before post(s) deletion
+ *
+ * @event core.delete_posts_before
+ * @var string where_type Variable containing posts deletion mode
+ * @var mixed where_ids Array or comma separated list of posts ids to delete
+ * @var bool auto_sync Flag indicating if topics/forums should be synchronized
+ * @var bool posted_sync Flag indicating if topics_posted table should be resynchronized
+ * @var bool post_count_sync Flag indicating if posts count should be resynchronized
+ * @var bool call_delete_topics Flag indicating if topics having no posts should be deleted
+ * @var array delete_notifications_types Array with notifications types to delete
+ * @since 3.1.0-a4
+ */
+ $vars = array('where_type', 'where_ids', 'auto_sync', 'posted_sync', 'post_count_sync', 'call_delete_topics', 'delete_notifications_types');
+ extract($phpbb_dispatcher->trigger_event('core.delete_posts_before', compact($vars)));
if ($where_type === 'range')
{
@@ -768,7 +800,7 @@ function delete_posts($where_type, $where_ids, $auto_sync = true, $posted_sync =
$approved_posts = 0;
$post_ids = $topic_ids = $forum_ids = $post_counts = $remove_topics = array();
- $sql = 'SELECT post_id, poster_id, post_approved, post_postcount, topic_id, forum_id
+ $sql = 'SELECT post_id, poster_id, post_visibility, post_postcount, topic_id, forum_id
FROM ' . POSTS_TABLE . '
WHERE ' . $where_clause;
$result = $db->sql_query($sql);
@@ -780,12 +812,12 @@ function delete_posts($where_type, $where_ids, $auto_sync = true, $posted_sync =
$topic_ids[] = (int) $row['topic_id'];
$forum_ids[] = (int) $row['forum_id'];
- if ($row['post_postcount'] && $post_count_sync && $row['post_approved'])
+ if ($row['post_postcount'] && $post_count_sync && $row['post_visibility'] == ITEM_APPROVED)
{
$post_counts[$row['poster_id']] = (!empty($post_counts[$row['poster_id']])) ? $post_counts[$row['poster_id']] + 1 : 1;
}
- if ($row['post_approved'])
+ if ($row['post_visibility'] == ITEM_APPROVED)
{
$approved_posts++;
}
@@ -848,17 +880,15 @@ function delete_posts($where_type, $where_ids, $auto_sync = true, $posted_sync =
}
// Remove the message from the search index
- $search_type = basename($config['search_type']);
+ $search_type = $config['search_type'];
- if (!file_exists($phpbb_root_path . 'includes/search/' . $search_type . '.' . $phpEx))
+ if (!class_exists($search_type))
{
trigger_error('NO_SUCH_SEARCH_MODULE');
}
- include_once("{$phpbb_root_path}includes/search/$search_type.$phpEx");
-
$error = false;
- $search = new $search_type($error);
+ $search = new $search_type($error, $phpbb_root_path, $phpEx, $auth, $config, $db, $user);
if ($error)
{
@@ -869,8 +899,40 @@ function delete_posts($where_type, $where_ids, $auto_sync = true, $posted_sync =
delete_attachments('post', $post_ids, false);
+ /**
+ * Perform additional actions during post(s) deletion
+ *
+ * @event core.delete_posts_in_transaction
+ * @var array post_ids Array with deleted posts' ids
+ * @var array poster_ids Array with deleted posts' author ids
+ * @var array topic_ids Array with deleted posts' topic ids
+ * @var array forum_ids Array with deleted posts' forum ids
+ * @var string where_type Variable containing posts deletion mode
+ * @var mixed where_ids Array or comma separated list of posts ids to delete
+ * @var array delete_notifications_types Array with notifications types to delete
+ * @since 3.1.0-a4
+ */
+ $vars = array('post_ids', 'poster_ids', 'topic_ids', 'forum_ids', 'where_type', 'where_ids', 'delete_notifications_types');
+ extract($phpbb_dispatcher->trigger_event('core.delete_posts_in_transaction', compact($vars)));
+
$db->sql_transaction('commit');
+ /**
+ * Perform additional actions after post(s) deletion
+ *
+ * @event core.delete_posts_after
+ * @var array post_ids Array with deleted posts' ids
+ * @var array poster_ids Array with deleted posts' author ids
+ * @var array topic_ids Array with deleted posts' topic ids
+ * @var array forum_ids Array with deleted posts' forum ids
+ * @var string where_type Variable containing posts deletion mode
+ * @var mixed where_ids Array or comma separated list of posts ids to delete
+ * @var array delete_notifications_types Array with notifications types to delete
+ * @since 3.1.0-a4
+ */
+ $vars = array('post_ids', 'poster_ids', 'topic_ids', 'forum_ids', 'where_type', 'where_ids', 'delete_notifications_types');
+ extract($phpbb_dispatcher->trigger_event('core.delete_posts_after', compact($vars)));
+
// Resync topics_posted table
if ($posted_sync)
{
@@ -884,7 +946,7 @@ function delete_posts($where_type, $where_ids, $auto_sync = true, $posted_sync =
sync('forum', 'forum_id', $forum_ids, true, true);
}
- if ($approved_posts)
+ if ($approved_posts && $post_count_sync)
{
set_config_count('num_posts', $approved_posts * (-1), true);
}
@@ -895,6 +957,10 @@ function delete_posts($where_type, $where_ids, $auto_sync = true, $posted_sync =
delete_topics('topic_id', $remove_topics, $auto_sync, $post_count_sync, false);
}
+ $phpbb_notifications = $phpbb_container->get('notification_manager');
+
+ $phpbb_notifications->delete_notifications($delete_notifications_types, $post_ids);
+
return sizeof($post_ids);
}
@@ -1277,7 +1343,7 @@ function phpbb_unlink($filename, $mode = 'file', $entry_removed = false)
* - forum Resync complete forum
* - topic Resync topics
* - topic_moved Removes topic shadows that would be in the same forum as the topic they link to
-* - topic_approved Resyncs the topic_approved flag according to the status of the first post
+* - topic_visibility Resyncs the topic_visibility flag according to the status of the first post
* - post_reported Resyncs the post_reported flag, relying on actual reports
* - topic_reported Resyncs the topic_reported flag, relying on post_reported flags
* - post_attachement Same as post_reported, but with attachment flags
@@ -1297,7 +1363,7 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
$where_ids = ($where_ids) ? array((int) $where_ids) : array();
}
- if ($mode == 'forum' || $mode == 'topic' || $mode == 'topic_approved' || $mode == 'topic_reported' || $mode == 'post_reported')
+ if ($mode == 'forum' || $mode == 'topic' || $mode == 'topic_visibility' || $mode == 'topic_reported' || $mode == 'post_reported')
{
if (!$where_type)
{
@@ -1383,43 +1449,55 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
$db->sql_transaction('commit');
break;
- case 'topic_approved':
+ case 'topic_visibility':
$db->sql_transaction('begin');
- switch ($db->sql_layer)
+
+ $sql = 'SELECT t.topic_id, p.post_visibility
+ FROM ' . TOPICS_TABLE . ' t, ' . POSTS_TABLE . " p
+ $where_sql_and p.topic_id = t.topic_id
+ AND p.post_visibility = " . ITEM_APPROVED;
+ $result = $db->sql_query($sql);
+
+ $topics_approved = array();
+ while ($row = $db->sql_fetchrow($result))
{
- case 'mysql4':
- case 'mysqli':
- $sql = 'UPDATE ' . TOPICS_TABLE . ' t, ' . POSTS_TABLE . " p
- SET t.topic_approved = p.post_approved
- $where_sql_and t.topic_first_post_id = p.post_id";
- $db->sql_query($sql);
- break;
+ $topics_approved[] = (int) $row['topic_id'];
+ }
+ $db->sql_freeresult($result);
- default:
- $sql = 'SELECT t.topic_id, p.post_approved
- FROM ' . TOPICS_TABLE . ' t, ' . POSTS_TABLE . " p
- $where_sql_and p.post_id = t.topic_first_post_id
- AND p.post_approved <> t.topic_approved";
- $result = $db->sql_query($sql);
+ $sql = 'SELECT t.topic_id, p.post_visibility
+ FROM ' . TOPICS_TABLE . ' t, ' . POSTS_TABLE . " p
+ $where_sql_and " . $db->sql_in_set('t.topic_id', $topics_approved, true, true) . '
+ AND p.topic_id = t.topic_id
+ AND p.post_visibility = ' . ITEM_DELETED;
+ $result = $db->sql_query($sql);
- $topic_ids = array();
- while ($row = $db->sql_fetchrow($result))
- {
- $topic_ids[] = $row['topic_id'];
- }
- $db->sql_freeresult($result);
+ $topics_softdeleted = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $topics_softdeleted[] = (int) $row['topic_id'];
+ }
+ $db->sql_freeresult($result);
- if (!sizeof($topic_ids))
- {
- return;
- }
+ $topics_softdeleted = array_diff($topics_softdeleted, $topics_approved);
+ $topics_not_unapproved = array_merge($topics_softdeleted, $topics_approved);
+
+ $update_ary = array(
+ ITEM_UNAPPROVED => (!empty($topics_not_unapproved)) ? $where_sql_and . ' ' . $db->sql_in_set('topic_id', $topics_not_unapproved, true) : '',
+ ITEM_APPROVED => (!empty($topics_approved)) ? ' WHERE ' . $db->sql_in_set('topic_id', $topics_approved) : '',
+ ITEM_DELETED => (!empty($topics_softdeleted)) ? ' WHERE ' . $db->sql_in_set('topic_id', $topics_softdeleted) : '',
+ );
+ foreach ($topic_visiblities as $visibility => $sql_where)
+ {
+ if ($sql_where)
+ {
$sql = 'UPDATE ' . TOPICS_TABLE . '
- SET topic_approved = 1 - topic_approved
- WHERE ' . $db->sql_in_set('topic_id', $topic_ids);
+ SET topic_visibility = ' . $visibility . '
+ ' . $sql_where;
$db->sql_query($sql);
- break;
+ }
}
$db->sql_transaction('commit');
@@ -1660,9 +1738,12 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
$forum_data[$forum_id] = $row;
if ($sync_extra)
{
- $forum_data[$forum_id]['posts'] = 0;
- $forum_data[$forum_id]['topics'] = 0;
- $forum_data[$forum_id]['topics_real'] = 0;
+ $forum_data[$forum_id]['posts_approved'] = 0;
+ $forum_data[$forum_id]['posts_unapproved'] = 0;
+ $forum_data[$forum_id]['posts_softdeleted'] = 0;
+ $forum_data[$forum_id]['topics_approved'] = 0;
+ $forum_data[$forum_id]['topics_unapproved'] = 0;
+ $forum_data[$forum_id]['topics_softdeleted'] = 0;
}
$forum_data[$forum_id]['last_post_id'] = 0;
$forum_data[$forum_id]['last_post_subject'] = '';
@@ -1683,20 +1764,27 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
// 2: Get topic counts for each forum (optional)
if ($sync_extra)
{
- $sql = 'SELECT forum_id, topic_approved, COUNT(topic_id) AS forum_topics
+ $sql = 'SELECT forum_id, topic_visibility, COUNT(topic_id) AS total_topics
FROM ' . TOPICS_TABLE . '
WHERE ' . $db->sql_in_set('forum_id', $forum_ids) . '
- GROUP BY forum_id, topic_approved';
+ GROUP BY forum_id, topic_visibility';
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
{
$forum_id = (int) $row['forum_id'];
- $forum_data[$forum_id]['topics_real'] += $row['forum_topics'];
- if ($row['topic_approved'])
+ if ($row['topic_visibility'] == ITEM_APPROVED)
+ {
+ $forum_data[$forum_id]['topics_approved'] = $row['total_topics'];
+ }
+ else if ($row['topic_visibility'] == ITEM_UNAPPROVED)
{
- $forum_data[$forum_id]['topics'] = $row['forum_topics'];
+ $forum_data[$forum_id]['topics_unapproved'] = $row['total_topics'];
+ }
+ else if ($row['topic_visibility'] == ITEM_DELETED)
+ {
+ $forum_data[$forum_id]['topics_softdeleted'] = $row['total_topics'];
}
}
$db->sql_freeresult($result);
@@ -1707,18 +1795,16 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
{
if (sizeof($forum_ids) == 1)
{
- $sql = 'SELECT SUM(t.topic_replies + 1) AS forum_posts
+ $sql = 'SELECT SUM(t.topic_posts_approved) AS forum_posts_approved, SUM(t.topic_posts_unapproved) AS forum_posts_unapproved, SUM(t.topic_posts_softdeleted) AS forum_posts_softdeleted
FROM ' . TOPICS_TABLE . ' t
WHERE ' . $db->sql_in_set('t.forum_id', $forum_ids) . '
- AND t.topic_approved = 1
AND t.topic_status <> ' . ITEM_MOVED;
}
else
{
- $sql = 'SELECT t.forum_id, SUM(t.topic_replies + 1) AS forum_posts
+ $sql = 'SELECT t.forum_id, SUM(t.topic_posts_approved) AS forum_posts_approved, SUM(t.topic_posts_unapproved) AS forum_posts_unapproved, SUM(t.topic_posts_softdeleted) AS forum_posts_softdeleted
FROM ' . TOPICS_TABLE . ' t
WHERE ' . $db->sql_in_set('t.forum_id', $forum_ids) . '
- AND t.topic_approved = 1
AND t.topic_status <> ' . ITEM_MOVED . '
GROUP BY t.forum_id';
}
@@ -1729,7 +1815,9 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
{
$forum_id = (sizeof($forum_ids) == 1) ? (int) $forum_ids[0] : (int) $row['forum_id'];
- $forum_data[$forum_id]['posts'] = (int) $row['forum_posts'];
+ $forum_data[$forum_id]['posts_approved'] = (int) $row['forum_posts_approved'];
+ $forum_data[$forum_id]['posts_unapproved'] = (int) $row['forum_posts_unapproved'];
+ $forum_data[$forum_id]['posts_softdeleted'] = (int) $row['forum_posts_softdeleted'];
}
$db->sql_freeresult($result);
}
@@ -1740,14 +1828,14 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
$sql = 'SELECT MAX(t.topic_last_post_id) as last_post_id
FROM ' . TOPICS_TABLE . ' t
WHERE ' . $db->sql_in_set('t.forum_id', $forum_ids) . '
- AND t.topic_approved = 1';
+ AND t.topic_visibility = ' . ITEM_APPROVED;
}
else
{
$sql = 'SELECT t.forum_id, MAX(t.topic_last_post_id) as last_post_id
FROM ' . TOPICS_TABLE . ' t
WHERE ' . $db->sql_in_set('t.forum_id', $forum_ids) . '
- AND t.topic_approved = 1
+ AND t.topic_visibility = ' . ITEM_APPROVED . '
GROUP BY t.forum_id';
}
@@ -1810,7 +1898,7 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
if ($sync_extra)
{
- array_push($fieldnames, 'posts', 'topics', 'topics_real');
+ array_push($fieldnames, 'posts_approved', 'posts_unapproved', 'posts_softdeleted', 'topics_approved', 'topics_unapproved', 'topics_softdeleted');
}
foreach ($forum_data as $forum_id => $row)
@@ -1845,11 +1933,11 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
break;
case 'topic':
- $topic_data = $post_ids = $approved_unapproved_ids = $resync_forums = $delete_topics = $delete_posts = $moved_topics = array();
+ $topic_data = $post_ids = $resync_forums = $delete_topics = $delete_posts = $moved_topics = array();
$db->sql_transaction('begin');
- $sql = 'SELECT t.topic_id, t.forum_id, t.topic_moved_id, t.topic_approved, ' . (($sync_extra) ? 't.topic_attachment, t.topic_reported, ' : '') . 't.topic_poster, t.topic_time, t.topic_replies, t.topic_replies_real, t.topic_first_post_id, t.topic_first_poster_name, t.topic_first_poster_colour, t.topic_last_post_id, t.topic_last_post_subject, t.topic_last_poster_id, t.topic_last_poster_name, t.topic_last_poster_colour, t.topic_last_post_time
+ $sql = 'SELECT t.topic_id, t.forum_id, t.topic_moved_id, t.topic_visibility, ' . (($sync_extra) ? 't.topic_attachment, t.topic_reported, ' : '') . 't.topic_poster, t.topic_time, t.topic_posts_approved, t.topic_posts_unapproved, t.topic_posts_softdeleted, t.topic_first_post_id, t.topic_first_poster_name, t.topic_first_poster_colour, t.topic_last_post_id, t.topic_last_post_subject, t.topic_last_poster_id, t.topic_last_poster_name, t.topic_last_poster_colour, t.topic_last_post_time
FROM ' . TOPICS_TABLE . " t
$where_sql";
$result = $db->sql_query($sql);
@@ -1864,8 +1952,10 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
$topic_id = (int) $row['topic_id'];
$topic_data[$topic_id] = $row;
- $topic_data[$topic_id]['replies_real'] = -1;
- $topic_data[$topic_id]['replies'] = 0;
+ $topic_data[$topic_id]['visibility'] = ITEM_UNAPPROVED;
+ $topic_data[$topic_id]['posts_approved'] = 0;
+ $topic_data[$topic_id]['posts_unapproved'] = 0;
+ $topic_data[$topic_id]['posts_softdeleted'] = 0;
$topic_data[$topic_id]['first_post_id'] = 0;
$topic_data[$topic_id]['last_post_id'] = 0;
unset($topic_data[$topic_id]['topic_id']);
@@ -1882,11 +1972,11 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
$db->sql_freeresult($result);
// Use "t" as table alias because of the $where_sql clause
- // NOTE: 't.post_approved' in the GROUP BY is causing a major slowdown.
- $sql = 'SELECT t.topic_id, t.post_approved, COUNT(t.post_id) AS total_posts, MIN(t.post_id) AS first_post_id, MAX(t.post_id) AS last_post_id
+ // NOTE: 't.post_visibility' in the GROUP BY is causing a major slowdown.
+ $sql = 'SELECT t.topic_id, t.post_visibility, COUNT(t.post_id) AS total_posts, MIN(t.post_id) AS first_post_id, MAX(t.post_id) AS last_post_id
FROM ' . POSTS_TABLE . " t
$where_sql
- GROUP BY t.topic_id, t.post_approved";
+ GROUP BY t.topic_id, t.post_visibility";
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
@@ -1907,14 +1997,38 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
// When we'll be done, only topics with no posts will remain
unset($delete_topics[$topic_id]);
- $topic_data[$topic_id]['replies_real'] += $row['total_posts'];
- $topic_data[$topic_id]['first_post_id'] = (!$topic_data[$topic_id]['first_post_id']) ? $row['first_post_id'] : min($topic_data[$topic_id]['first_post_id'], $row['first_post_id']);
+ if ($row['post_visibility'] == ITEM_APPROVED)
+ {
+ $topic_data[$topic_id]['posts_approved'] = $row['total_posts'];
+ }
+ else if ($row['post_visibility'] == ITEM_UNAPPROVED)
+ {
+ $topic_data[$topic_id]['posts_unapproved'] = $row['total_posts'];
+ }
+ else if ($row['post_visibility'] == ITEM_DELETED)
+ {
+ $topic_data[$topic_id]['posts_softdeleted'] = $row['total_posts'];
+ }
- if ($row['post_approved'] || !$topic_data[$topic_id]['last_post_id'])
+ if ($row['post_visibility'] == ITEM_APPROVED)
{
- $topic_data[$topic_id]['replies'] = $row['total_posts'] - 1;
+ $topic_data[$topic_id]['visibility'] = ITEM_APPROVED;
+ $topic_data[$topic_id]['first_post_id'] = $row['first_post_id'];
$topic_data[$topic_id]['last_post_id'] = $row['last_post_id'];
}
+ else if ($topic_data[$topic_id]['visibility'] != ITEM_APPROVED)
+ {
+ // If there is no approved post, we take the min/max of the other visibilities
+ // for the last and first post info, because it is only visible to moderators anyway
+ $topic_data[$topic_id]['first_post_id'] = (!empty($topic_data[$topic_id]['first_post_id'])) ? min($topic_data[$topic_id]['first_post_id'], $row['first_post_id']) : $row['first_post_id'];
+ $topic_data[$topic_id]['last_post_id'] = max($topic_data[$topic_id]['last_post_id'], $row['last_post_id']);
+
+ if ($topic_data[$topic_id]['visibility'] == ITEM_UNAPPROVED)
+ {
+ // Soft delete status is stronger than unapproved.
+ $topic_data[$topic_id]['visibility'] = $row['post_visibility'];
+ }
+ }
}
}
$db->sql_freeresult($result);
@@ -1955,7 +2069,7 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
unset($delete_topics, $delete_topic_ids);
}
- $sql = 'SELECT p.post_id, p.topic_id, p.post_approved, p.poster_id, p.post_subject, p.post_username, p.post_time, u.username, u.user_colour
+ $sql = 'SELECT p.post_id, p.topic_id, p.post_visibility, p.poster_id, p.post_subject, p.post_username, p.post_time, u.username, u.user_colour
FROM ' . POSTS_TABLE . ' p, ' . USERS_TABLE . ' u
WHERE ' . $db->sql_in_set('p.post_id', $post_ids) . '
AND u.user_id = p.poster_id';
@@ -1968,10 +2082,6 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
if ($row['post_id'] == $topic_data[$topic_id]['first_post_id'])
{
- if ($topic_data[$topic_id]['topic_approved'] != $row['post_approved'])
- {
- $approved_unapproved_ids[] = $topic_id;
- }
$topic_data[$topic_id]['time'] = $row['post_time'];
$topic_data[$topic_id]['poster'] = $row['poster_id'];
$topic_data[$topic_id]['first_poster_name'] = ($row['poster_id'] == ANONYMOUS) ? $row['post_username'] : $row['username'];
@@ -2032,7 +2142,7 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
$sync_shadow_topics = array();
if (sizeof($post_ids))
{
- $sql = 'SELECT p.post_id, p.topic_id, p.post_approved, p.poster_id, p.post_subject, p.post_username, p.post_time, u.username, u.user_colour
+ $sql = 'SELECT p.post_id, p.topic_id, p.post_visibility, p.poster_id, p.post_subject, p.post_username, p.post_time, u.username, u.user_colour
FROM ' . POSTS_TABLE . ' p, ' . USERS_TABLE . ' u
WHERE ' . $db->sql_in_set('p.post_id', $post_ids) . '
AND u.user_id = p.poster_id';
@@ -2099,18 +2209,8 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
unset($sync_shadow_topics, $shadow_topic_data);
}
- // approved becomes unapproved, and vice-versa
- if (sizeof($approved_unapproved_ids))
- {
- $sql = 'UPDATE ' . TOPICS_TABLE . '
- SET topic_approved = 1 - topic_approved
- WHERE ' . $db->sql_in_set('topic_id', $approved_unapproved_ids);
- $db->sql_query($sql);
- }
- unset($approved_unapproved_ids);
-
// These are fields that will be synchronised
- $fieldnames = array('time', 'replies', 'replies_real', 'poster', 'first_post_id', 'first_poster_name', 'first_poster_colour', 'last_post_id', 'last_post_subject', 'last_post_time', 'last_poster_id', 'last_poster_name', 'last_poster_colour');
+ $fieldnames = array('time', 'visibility', 'posts_approved', 'posts_unapproved', 'posts_softdeleted', 'poster', 'first_post_id', 'first_poster_name', 'first_poster_colour', 'last_post_id', 'last_post_subject', 'last_post_time', 'last_poster_id', 'last_poster_name', 'last_poster_colour');
if ($sync_extra)
{
@@ -2208,6 +2308,7 @@ function prune($forum_id, $prune_mode, $prune_date, $prune_flags = 0, $auto_sync
if (!($prune_flags & FORUM_FLAG_PRUNE_ANNOUNCE))
{
$sql_and .= ' AND topic_type <> ' . POST_ANNOUNCE;
+ $sql_and .= ' AND topic_type <> ' . POST_GLOBAL;
}
if (!($prune_flags & FORUM_FLAG_PRUNE_STICKY))
@@ -2294,28 +2395,17 @@ function auto_prune($forum_id, $prune_mode, $prune_flags, $prune_days, $prune_fr
}
/**
-* remove_comments will strip the sql comment lines out of an uploaded sql file
-* specifically for mssql and postgres type files in the install....
+* Cache moderators. Called whenever permissions are changed
+* via admin_permissions. Changes of usernames and group names
+* must be carried through for the moderators table.
*
-* @deprecated Use phpbb_remove_comments() instead.
-*/
-function remove_comments(&$output)
-{
- // Remove /* */ comments (http://ostermiller.org/findcomment.html)
- $output = preg_replace('#/\*(.|[\r\n])*?\*/#', "\n", $output);
-
- // Return by reference and value.
- return $output;
-}
-
-/**
-* Cache moderators, called whenever permissions are changed via admin_permissions. Changes of username
-* and group names must be carried through for the moderators table
+* @param \phpbb\db\driver\driver $db Database connection
+* @param \phpbb\cache\driver\driver_interface Cache driver
+* @param \phpbb\auth\auth $auth Authentication object
+* @return null
*/
-function cache_moderators()
+function phpbb_cache_moderators($db, $cache, $auth)
{
- global $db, $cache, $auth, $phpbb_root_path, $phpEx;
-
// Remove cached sql results
$cache->destroy('sql', MODERATOR_CACHE_TABLE);
@@ -2345,7 +2435,7 @@ function cache_moderators()
$ug_id_ary = array_keys($hold_ary);
// Remove users who have group memberships with DENY moderator permissions
- $sql = $db->sql_build_query('SELECT', array(
+ $sql_ary_deny = array(
'SELECT' => 'a.forum_id, ug.user_id, g.group_id',
'FROM' => array(
@@ -2358,8 +2448,8 @@ function cache_moderators()
'LEFT_JOIN' => array(
array(
'FROM' => array(ACL_ROLES_DATA_TABLE => 'r'),
- 'ON' => 'a.auth_role_id = r.role_id'
- )
+ 'ON' => 'a.auth_role_id = r.role_id',
+ ),
),
'WHERE' => '(o.auth_option_id = a.auth_option_id OR o.auth_option_id = r.auth_option_id)
@@ -2371,7 +2461,8 @@ function cache_moderators()
AND ' . $db->sql_in_set('ug.user_id', $ug_id_ary) . "
AND ug.user_pending = 0
AND o.auth_option " . $db->sql_like_expression('m_' . $db->any_char),
- ));
+ );
+ $sql = $db->sql_build_query('SELECT', $sql_ary_deny);
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
@@ -2485,303 +2576,60 @@ function cache_moderators()
}
/**
+* Cache moderators. Called whenever permissions are changed
+* via admin_permissions. Changes of usernames and group names
+* must be carried through for the moderators table.
+*
+* @deprecated 3.1
+* @return null
+*/
+function cache_moderators()
+{
+ global $db, $cache, $auth;
+ return phpbb_cache_moderators($db, $cache, $auth);
+}
+
+/**
* View log
-* If $log_count is set to false, we will skip counting all entries in the database.
+*
+* @param string $mode The mode defines which log_type is used and from which log the entry is retrieved
+* @param array &$log The result array with the logs
+* @param mixed &$log_count If $log_count is set to false, we will skip counting all entries in the database.
+* Otherwise an integer with the number of total matching entries is returned.
+* @param int $limit Limit the number of entries that are returned
+* @param int $offset Offset when fetching the log entries, f.e. when paginating
+* @param mixed $forum_id Restrict the log entries to the given forum_id (can also be an array of forum_ids)
+* @param int $topic_id Restrict the log entries to the given topic_id
+* @param int $user_id Restrict the log entries to the given user_id
+* @param int $log_time Only get log entries newer than the given timestamp
+* @param string $sort_by SQL order option, e.g. 'l.log_time DESC'
+* @param string $keywords Will only return log entries that have the keywords in log_operation or log_data
+*
+* @return int Returns the offset of the last valid page, if the specified offset was invalid (too high)
*/
function view_log($mode, &$log, &$log_count, $limit = 0, $offset = 0, $forum_id = 0, $topic_id = 0, $user_id = 0, $limit_days = 0, $sort_by = 'l.log_time DESC', $keywords = '')
{
- global $db, $user, $auth, $phpEx, $phpbb_root_path, $phpbb_admin_path;
-
- $topic_id_list = $reportee_id_list = $is_auth = $is_mod = array();
-
- $profile_url = (defined('IN_ADMIN')) ? append_sid("{$phpbb_admin_path}index.$phpEx", 'i=users&amp;mode=overview') : append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile');
+ global $phpbb_log;
- switch ($mode)
- {
- case 'admin':
- $log_type = LOG_ADMIN;
- $sql_forum = '';
- break;
+ $count_logs = ($log_count !== false);
- case 'mod':
- $log_type = LOG_MOD;
- $sql_forum = '';
+ $log = $phpbb_log->get_logs($mode, $count_logs, $limit, $offset, $forum_id, $topic_id, $user_id, $limit_days, $sort_by, $keywords);
+ $log_count = $phpbb_log->get_log_count();
- if ($topic_id)
- {
- $sql_forum = 'AND l.topic_id = ' . (int) $topic_id;
- }
- else if (is_array($forum_id))
- {
- $sql_forum = 'AND ' . $db->sql_in_set('l.forum_id', array_map('intval', $forum_id));
- }
- else if ($forum_id)
- {
- $sql_forum = 'AND l.forum_id = ' . (int) $forum_id;
- }
- break;
-
- case 'user':
- $log_type = LOG_USERS;
- $sql_forum = 'AND l.reportee_id = ' . (int) $user_id;
- break;
-
- case 'users':
- $log_type = LOG_USERS;
- $sql_forum = '';
- break;
-
- case 'critical':
- $log_type = LOG_CRITICAL;
- $sql_forum = '';
- break;
-
- default:
- return;
- }
-
- // Use no preg_quote for $keywords because this would lead to sole backslashes being added
- // We also use an OR connection here for spaces and the | string. Currently, regex is not supported for searching (but may come later).
- $keywords = preg_split('#[\s|]+#u', utf8_strtolower($keywords), 0, PREG_SPLIT_NO_EMPTY);
- $sql_keywords = '';
-
- if (!empty($keywords))
- {
- $keywords_pattern = array();
-
- // Build pattern and keywords...
- for ($i = 0, $num_keywords = sizeof($keywords); $i < $num_keywords; $i++)
- {
- $keywords_pattern[] = preg_quote($keywords[$i], '#');
- $keywords[$i] = $db->sql_like_expression($db->any_char . $keywords[$i] . $db->any_char);
- }
-
- $keywords_pattern = '#' . implode('|', $keywords_pattern) . '#ui';
-
- $operations = array();
- foreach ($user->lang as $key => $value)
- {
- if (substr($key, 0, 4) == 'LOG_' && preg_match($keywords_pattern, $value))
- {
- $operations[] = $key;
- }
- }
-
- $sql_keywords = 'AND (';
- if (!empty($operations))
- {
- $sql_keywords .= $db->sql_in_set('l.log_operation', $operations) . ' OR ';
- }
- $sql_lower = $db->sql_lower_text('l.log_data');
- $sql_keywords .= "$sql_lower " . implode(" OR $sql_lower ", $keywords) . ')';
- }
-
- if ($log_count !== false)
- {
- $sql = 'SELECT COUNT(l.log_id) AS total_entries
- FROM ' . LOG_TABLE . ' l, ' . USERS_TABLE . " u
- WHERE l.log_type = $log_type
- AND l.user_id = u.user_id
- AND l.log_time >= $limit_days
- $sql_keywords
- $sql_forum";
- $result = $db->sql_query($sql);
- $log_count = (int) $db->sql_fetchfield('total_entries');
- $db->sql_freeresult($result);
- }
-
- // $log_count may be false here if false was passed in for it,
- // because in this case we did not run the COUNT() query above.
- // If we ran the COUNT() query and it returned zero rows, return;
- // otherwise query for logs below.
- if ($log_count === 0)
- {
- // Save the queries, because there are no logs to display
- return 0;
- }
-
- if ($offset >= $log_count)
- {
- $offset = ($offset - $limit < 0) ? 0 : $offset - $limit;
- }
-
- $sql = "SELECT l.*, u.username, u.username_clean, u.user_colour
- FROM " . LOG_TABLE . " l, " . USERS_TABLE . " u
- WHERE l.log_type = $log_type
- AND u.user_id = l.user_id
- " . (($limit_days) ? "AND l.log_time >= $limit_days" : '') . "
- $sql_keywords
- $sql_forum
- ORDER BY $sort_by";
- $result = $db->sql_query_limit($sql, $limit, $offset);
-
- $i = 0;
- $log = array();
- while ($row = $db->sql_fetchrow($result))
- {
- if ($row['topic_id'])
- {
- $topic_id_list[] = $row['topic_id'];
- }
-
- if ($row['reportee_id'])
- {
- $reportee_id_list[] = $row['reportee_id'];
- }
-
- $log[$i] = array(
- 'id' => $row['log_id'],
-
- 'reportee_id' => $row['reportee_id'],
- 'reportee_username' => '',
- 'reportee_username_full'=> '',
-
- 'user_id' => $row['user_id'],
- 'username' => $row['username'],
- 'username_full' => get_username_string('full', $row['user_id'], $row['username'], $row['user_colour'], false, $profile_url),
-
- 'ip' => $row['log_ip'],
- 'time' => $row['log_time'],
- 'forum_id' => $row['forum_id'],
- 'topic_id' => $row['topic_id'],
-
- 'viewforum' => ($row['forum_id'] && $auth->acl_get('f_read', $row['forum_id'])) ? append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $row['forum_id']) : false,
- 'action' => (isset($user->lang[$row['log_operation']])) ? $user->lang[$row['log_operation']] : '{' . ucfirst(str_replace('_', ' ', $row['log_operation'])) . '}',
- );
-
- if (!empty($row['log_data']))
- {
- $log_data_ary = @unserialize($row['log_data']);
- $log_data_ary = ($log_data_ary === false) ? array() : $log_data_ary;
-
- if (isset($user->lang[$row['log_operation']]))
- {
- // Check if there are more occurrences of % than arguments, if there are we fill out the arguments array
- // It doesn't matter if we add more arguments than placeholders
- if ((substr_count($log[$i]['action'], '%') - sizeof($log_data_ary)) > 0)
- {
- $log_data_ary = array_merge($log_data_ary, array_fill(0, substr_count($log[$i]['action'], '%') - sizeof($log_data_ary), ''));
- }
-
- $log[$i]['action'] = vsprintf($log[$i]['action'], $log_data_ary);
-
- // If within the admin panel we do not censor text out
- if (defined('IN_ADMIN'))
- {
- $log[$i]['action'] = bbcode_nl2br($log[$i]['action']);
- }
- else
- {
- $log[$i]['action'] = bbcode_nl2br(censor_text($log[$i]['action']));
- }
- }
- else if (!empty($log_data_ary))
- {
- $log[$i]['action'] .= '<br />' . implode('', $log_data_ary);
- }
-
- /* Apply make_clickable... has to be seen if it is for good. :/
- // Seems to be not for the moment, reconsider later...
- $log[$i]['action'] = make_clickable($log[$i]['action']);
- */
- }
-
- $i++;
- }
- $db->sql_freeresult($result);
-
- if (sizeof($topic_id_list))
- {
- $topic_id_list = array_unique($topic_id_list);
-
- // This query is not really needed if move_topics() updates the forum_id field,
- // although it's also used to determine if the topic still exists in the database
- $sql = 'SELECT topic_id, forum_id
- FROM ' . TOPICS_TABLE . '
- WHERE ' . $db->sql_in_set('topic_id', array_map('intval', $topic_id_list));
- $result = $db->sql_query($sql);
-
- $default_forum_id = 0;
-
- while ($row = $db->sql_fetchrow($result))
- {
- if (!$row['forum_id'])
- {
- if ($auth->acl_getf_global('f_read'))
- {
- if (!$default_forum_id)
- {
- $sql = 'SELECT forum_id
- FROM ' . FORUMS_TABLE . '
- WHERE forum_type = ' . FORUM_POST;
- $f_result = $db->sql_query_limit($sql, 1);
- $default_forum_id = (int) $db->sql_fetchfield('forum_id', false, $f_result);
- $db->sql_freeresult($f_result);
- }
-
- $is_auth[$row['topic_id']] = $default_forum_id;
- }
- }
- else
- {
- if ($auth->acl_get('f_read', $row['forum_id']))
- {
- $is_auth[$row['topic_id']] = $row['forum_id'];
- }
- }
-
- if ($auth->acl_gets('a_', 'm_', $row['forum_id']))
- {
- $is_mod[$row['topic_id']] = $row['forum_id'];
- }
- }
- $db->sql_freeresult($result);
-
- foreach ($log as $key => $row)
- {
- $log[$key]['viewtopic'] = (isset($is_auth[$row['topic_id']])) ? append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $is_auth[$row['topic_id']] . '&amp;t=' . $row['topic_id']) : false;
- $log[$key]['viewlogs'] = (isset($is_mod[$row['topic_id']])) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=logs&amp;mode=topic_logs&amp;t=' . $row['topic_id'], true, $user->session_id) : false;
- }
- }
-
- if (sizeof($reportee_id_list))
- {
- $reportee_id_list = array_unique($reportee_id_list);
- $reportee_names_list = array();
-
- $sql = 'SELECT user_id, username, user_colour
- FROM ' . USERS_TABLE . '
- WHERE ' . $db->sql_in_set('user_id', $reportee_id_list);
- $result = $db->sql_query($sql);
-
- while ($row = $db->sql_fetchrow($result))
- {
- $reportee_names_list[$row['user_id']] = $row;
- }
- $db->sql_freeresult($result);
-
- foreach ($log as $key => $row)
- {
- if (!isset($reportee_names_list[$row['reportee_id']]))
- {
- continue;
- }
-
- $log[$key]['reportee_username'] = $reportee_names_list[$row['reportee_id']]['username'];
- $log[$key]['reportee_username_full'] = get_username_string('full', $row['reportee_id'], $reportee_names_list[$row['reportee_id']]['username'], $reportee_names_list[$row['reportee_id']]['user_colour'], false, $profile_url);
- }
- }
-
- return $offset;
+ return $phpbb_log->get_valid_offset();
}
/**
-* Update foes - remove moderators and administrators from foe lists...
+* Removes moderators and administrators from foe lists.
+*
+* @param \phpbb\db\driver\driver $db Database connection
+* @param \phpbb\auth\auth $auth Authentication object
+* @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
*/
-function update_foes($group_id = false, $user_id = false)
+function phpbb_update_foes($db, $auth, $group_id = false, $user_id = false)
{
- global $db, $auth;
-
// update foes for some user
if (is_array($user_id) && sizeof($user_id))
{
@@ -2796,18 +2644,18 @@ function update_foes($group_id = false, $user_id = false)
if (is_array($group_id) && sizeof($group_id))
{
// Grab group settings...
- $sql = $db->sql_build_query('SELECT', array(
+ $sql_ary = array(
'SELECT' => 'a.group_id',
'FROM' => array(
ACL_OPTIONS_TABLE => 'ao',
- ACL_GROUPS_TABLE => 'a'
+ ACL_GROUPS_TABLE => 'a',
),
'LEFT_JOIN' => array(
array(
'FROM' => array(ACL_ROLES_DATA_TABLE => 'r'),
- 'ON' => 'a.auth_role_id = r.role_id'
+ 'ON' => 'a.auth_role_id = r.role_id',
),
),
@@ -2815,8 +2663,9 @@ function update_foes($group_id = false, $user_id = false)
AND ' . $db->sql_in_set('a.group_id', $group_id) . "
AND ao.auth_option IN ('a_', 'm_')",
- 'GROUP_BY' => 'a.group_id'
- ));
+ 'GROUP_BY' => 'a.group_id',
+ );
+ $sql = $db->sql_build_query('SELECT', $sql_ary);
$result = $db->sql_query($sql);
$groups = array();
@@ -2890,6 +2739,20 @@ function update_foes($group_id = false, $user_id = false)
}
/**
+* Removes moderators and administrators from foe lists.
+*
+* @deprecated 3.1
+* @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
+*/
+function update_foes($group_id = false, $user_id = false)
+{
+ global $db, $auth;
+ return phpbb_update_foes($db, $auth, $group_id, $user_id);
+}
+
+/**
* Lists inactive users
*/
function view_inactive_users(&$users, &$user_count, $limit = 0, $offset = 0, $limit_days = 0, $sort_by = 'user_inactive_time DESC')
@@ -3194,7 +3057,7 @@ function get_remote_file($host, $directory, $filename, &$errstr, &$errno, $port
return $file_info;
}
-/**
+/*
* Tidy Warnings
* Remove all warnings which have now expired from the database
* The duration of a warning can be defined by the administrator
@@ -3278,77 +3141,29 @@ function tidy_database()
*/
function add_permission_language()
{
- global $user, $phpEx;
+ global $user, $phpEx, $phpbb_extension_manager;
- // First of all, our own file. We need to include it as the first file because it presets all relevant variables.
- $user->add_lang('acp/permissions_phpbb');
+ // add permission language files from extensions
+ $finder = $phpbb_extension_manager->get_finder();
- $files_to_add = array();
+ $lang_files = $finder
+ ->prefix('permissions_')
+ ->suffix(".$phpEx")
+ ->core_path('language/' . $user->lang_name . '/')
+ ->extension_directory('/language/' . $user->lang_name)
+ ->find();
- // Now search in acp and mods folder for permissions_ files.
- foreach (array('acp/', 'mods/') as $path)
+ foreach ($lang_files as $lang_file => $ext_name)
{
- $dh = @opendir($user->lang_path . $user->lang_name . '/' . $path);
-
- if ($dh)
+ if ($ext_name === '/')
{
- while (($file = readdir($dh)) !== false)
- {
- if ($file !== 'permissions_phpbb.' . $phpEx && strpos($file, 'permissions_') === 0 && substr($file, -(strlen($phpEx) + 1)) === '.' . $phpEx)
- {
- $files_to_add[] = $path . substr($file, 0, -(strlen($phpEx) + 1));
- }
- }
- closedir($dh);
+ $user->add_lang($lang_file);
}
- }
-
- if (!sizeof($files_to_add))
- {
- return false;
- }
-
- $user->add_lang($files_to_add);
- return true;
-}
-
-/**
- * Obtains the latest version information
- *
- * @param bool $force_update Ignores cached data. Defaults to false.
- * @param bool $warn_fail Trigger a warning if obtaining the latest version information fails. Defaults to false.
- * @param int $ttl Cache version information for $ttl seconds. Defaults to 86400 (24 hours).
- *
- * @return string | false Version info on success, false on failure.
- */
-function obtain_latest_version_info($force_update = false, $warn_fail = false, $ttl = 86400)
-{
- global $cache;
-
- $info = $cache->get('versioncheck');
-
- if ($info === false || $force_update)
- {
- $errstr = '';
- $errno = 0;
-
- $info = get_remote_file('version.phpbb.com', '/phpbb',
- ((defined('PHPBB_QA')) ? '30x_qa.txt' : '30x.txt'), $errstr, $errno);
-
- if (empty($info))
+ else
{
- $cache->destroy('versioncheck');
- if ($warn_fail)
- {
- trigger_error($errstr, E_USER_WARNING);
- }
- return false;
+ $user->add_lang_ext($ext_name, $lang_file);
}
-
- $cache->put('versioncheck', $info, $ttl);
}
-
- return $info;
}
/**
@@ -3370,5 +3185,3 @@ function enable_bitfield_column_flag($table_name, $column_name, $flag, $sql_more
' . $sql_more;
$db->sql_query($sql);
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/functions_compatibility.php b/phpBB/includes/functions_compatibility.php
new file mode 100644
index 0000000000..024c656267
--- /dev/null
+++ b/phpBB/includes/functions_compatibility.php
@@ -0,0 +1,125 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* Get user avatar
+*
+* @deprecated 3.1.0-a1 (To be removed: 3.3.0)
+*
+* @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
+*
+* @return string Avatar image
+*/
+function get_user_avatar($avatar, $avatar_type, $avatar_width, $avatar_height, $alt = 'USER_AVATAR', $ignore_config = false)
+{
+ // map arguments to new function phpbb_get_avatar()
+ $row = array(
+ 'avatar' => $avatar,
+ 'avatar_type' => $avatar_type,
+ 'avatar_width' => $avatar_width,
+ 'avatar_height' => $avatar_height,
+ );
+
+ if (!function_exists('phpbb_get_avatar'))
+ {
+ global $phpbb_root_path, $phpEx;
+
+ include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
+ }
+
+ return phpbb_get_avatar($row, $alt, $ignore_config);
+}
+
+/**
+* Hash the password
+*
+* @deprecated 3.1.0-a2 (To be removed: 3.3.0)
+*
+* @param string $password Password to be hashed
+*
+* @return string|bool Password hash or false if something went wrong during hashing
+*/
+function phpbb_hash($password)
+{
+ global $phpbb_container;
+
+ $passwords_manager = $phpbb_container->get('passwords.manager');
+ return $passwords_manager->hash($password);
+}
+
+/**
+* Check for correct password
+*
+* @deprecated 3.1.0-a2 (To be removed: 3.3.0)
+*
+* @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.
+*/
+function phpbb_check_hash($password, $hash)
+{
+ global $phpbb_container;
+
+ $passwords_manager = $phpbb_container->get('passwords.manager');
+ return $passwords_manager->check($password, $hash);
+}
+
+/**
+* Eliminates useless . and .. components from specified path.
+*
+* Deprecated, use filesystem class instead
+*
+* @param string $path Path to clean
+* @return string Cleaned path
+*
+* @deprecated
+*/
+function phpbb_clean_path($path)
+{
+ global $phpbb_path_helper, $phpbb_container;
+
+ if (!$phpbb_path_helper && $phpbb_container)
+ {
+ $phpbb_path_helper = $phpbb_container->get('path_helper');
+ }
+ else if (!$phpbb_path_helper)
+ {
+ // The container is not yet loaded, use a new instance
+ if (!class_exists('\phpbb\path_helper'))
+ {
+ global $phpbb_root_path, $phpEx;
+ require($phpbb_root_path . 'phpbb/path_helper.' . $phpEx);
+ }
+
+ $phpbb_path_helper = new phpbb\path_helper(
+ new phpbb\symfony_request(
+ new phpbb\request\request()
+ ),
+ new phpbb\filesystem(),
+ $phpbb_root_path,
+ $phpEx
+ );
+ }
+
+ return $phpbb_path_helper->clean_path($path);
+}
diff --git a/phpBB/includes/functions_compress.php b/phpBB/includes/functions_compress.php
index 455debd939..39a1b2ad21 100644
--- a/phpBB/includes/functions_compress.php
+++ b/phpBB/includes/functions_compress.php
@@ -2,9 +2,8 @@
/**
*
* @package phpBB3
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -25,6 +24,11 @@ class compress
var $fp = 0;
/**
+ * @var array
+ */
+ protected $filelist = array();
+
+ /**
* Add file to archive
*/
function add_file($src, $src_rm_prefix = '', $src_add_prefix = '', $skip_files = '')
@@ -42,7 +46,7 @@ class compress
if (is_file($phpbb_root_path . $src))
{
- $this->data($src_path, file_get_contents("$phpbb_root_path$src"), false, stat("$phpbb_root_path$src"));
+ $this->data($src_path, file_get_contents("$phpbb_root_path$src"), stat("$phpbb_root_path$src"), false);
}
else if (is_dir($phpbb_root_path . $src))
{
@@ -82,7 +86,7 @@ class compress
continue;
}
- $this->data("$src_path$path$file", file_get_contents("$phpbb_root_path$src$path$file"), false, stat("$phpbb_root_path$src$path$file"));
+ $this->data("$src_path$path$file", file_get_contents("$phpbb_root_path$src$path$file"), stat("$phpbb_root_path$src$path$file"), false);
}
}
}
@@ -105,7 +109,7 @@ class compress
return false;
}
- $this->data($filename, file_get_contents($src), false, stat($src));
+ $this->data($filename, file_get_contents($src), stat($src), false);
return true;
}
@@ -119,14 +123,46 @@ class compress
$stat[4] = $stat[5] = 0;
$stat[7] = strlen($src);
$stat[9] = time();
- $this->data($name, $src, false, $stat);
+ $this->data($name, $src, $stat, false);
return true;
}
/**
+ * Checks if a file by that name as already been added and, if it has,
+ * returns a new, unique name.
+ *
+ * @param string $name The filename
+ * @return string A unique filename
+ */
+ protected function unique_filename($name)
+ {
+ if (isset($this->filelist[$name]))
+ {
+ $start = $name;
+ $ext = '';
+ $this->filelist[$name]++;
+
+ // Separate the extension off the end of the filename to preserve it
+ $pos = strrpos($name, '.');
+ if ($pos !== false)
+ {
+ $start = substr($name, 0, $pos);
+ $ext = substr($name, $pos);
+ }
+
+ return $start . '_' . $this->filelist[$name] . $ext;
+ }
+
+ $this->filelist[$name] = 0;
+ return $name;
+ }
+
+ /**
* Return available methods
+ *
+ * @return array Array of strings of available compression methods (.tar, .tar.gz, .zip, etc.)
*/
- function methods()
+ static public function methods()
{
$methods = array('.tar');
$available_methods = array('.tar.gz' => 'zlib', '.tar.bz2' => 'bz2', '.zip' => 'zlib');
@@ -359,9 +395,10 @@ class compress_zip extends compress
/**
* Create the structures ... note we assume version made by is MSDOS
*/
- function data($name, $data, $is_dir = false, $stat)
+ function data($name, $data, $stat, $is_dir = false)
{
$name = str_replace('\\', '/', $name);
+ $name = $this->unique_filename($name);
$hexdtime = pack('V', $this->unix_to_dos_time($stat[9]));
@@ -632,8 +669,9 @@ class compress_tar extends compress
/**
* Create the structures
*/
- function data($name, $data, $is_dir = false, $stat)
+ function data($name, $data, $stat, $is_dir = false)
{
+ $name = $this->unique_filename($name);
$this->wrote = true;
$fzwrite = ($this->isbz && function_exists('bzwrite')) ? 'bzwrite' : (($this->isgz && @extension_loaded('zlib')) ? 'gzwrite' : 'fwrite');
@@ -735,5 +773,3 @@ class compress_tar extends compress
}
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/functions_container.php b/phpBB/includes/functions_container.php
new file mode 100644
index 0000000000..667d27fd20
--- /dev/null
+++ b/phpBB/includes/functions_container.php
@@ -0,0 +1,287 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+use Symfony\Component\Config\FileLocator;
+use Symfony\Component\DependencyInjection\ContainerBuilder;
+use Symfony\Component\DependencyInjection\Dumper\PhpDumper;
+use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* Get DB connection from config.php.
+*
+* Used to bootstrap the container.
+*
+* @param string $config_file
+* @return \phpbb\db\driver\driver
+*/
+function phpbb_bootstrap_db_connection($config_file)
+{
+ require($config_file);
+ $dbal_driver_class = phpbb_convert_30_dbms_to_31($dbms);
+
+ $db = new $dbal_driver_class();
+ $db->sql_connect($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, defined('PHPBB_DB_NEW_LINK'));
+
+ return $db;
+}
+
+/**
+* Get table prefix from config.php.
+*
+* Used to bootstrap the container.
+*
+* @param string $config_file
+* @return string table prefix
+*/
+function phpbb_bootstrap_table_prefix($config_file)
+{
+ require($config_file);
+ return $table_prefix;
+}
+
+/**
+* Get enabled extensions.
+*
+* Used to bootstrap the container.
+*
+* @param string $config_file
+* @param string $phpbb_root_path
+* @return array enabled extensions
+*/
+function phpbb_bootstrap_enabled_exts($config_file, $phpbb_root_path)
+{
+ $db = phpbb_bootstrap_db_connection($config_file);
+ $table_prefix = phpbb_bootstrap_table_prefix($config_file);
+ $extension_table = $table_prefix.'ext';
+
+ $sql = 'SELECT *
+ FROM ' . $extension_table . '
+ WHERE ext_active = 1';
+
+ $result = $db->sql_query($sql);
+ $rows = $db->sql_fetchrowset($result);
+ $db->sql_freeresult($result);
+
+ $exts = array();
+ foreach ($rows as $row)
+ {
+ $exts[$row['ext_name']] = $phpbb_root_path . 'ext/' . $row['ext_name'] . '/';
+ }
+
+ return $exts;
+}
+
+/**
+* Create the ContainerBuilder object
+*
+* @param array $extensions Array of Container extension objects
+* @param string $phpbb_root_path Root path
+* @param string $php_ext PHP Extension
+* @return ContainerBuilder object
+*/
+function phpbb_create_container(array $extensions, $phpbb_root_path, $php_ext)
+{
+ $container = new ContainerBuilder();
+
+ foreach ($extensions as $extension)
+ {
+ $container->registerExtension($extension);
+ $container->loadFromExtension($extension->getAlias());
+ }
+
+ $container->setParameter('core.root_path', $phpbb_root_path);
+ $container->setParameter('core.php_ext', $php_ext);
+
+ return $container;
+}
+
+/**
+* Create installer container
+*
+* @param string $phpbb_root_path Root path
+* @param string $php_ext PHP Extension
+* @return ContainerBuilder object
+*/
+function phpbb_create_install_container($phpbb_root_path, $php_ext)
+{
+ $other_config_path = $phpbb_root_path . 'install/update/new/config/';
+ $config_path = file_exists($other_config_path . 'services.yml') ? $other_config_path : $phpbb_root_path . 'config/';
+
+ $core = new \phpbb\di\extension\core($config_path);
+ $container = phpbb_create_container(array($core), $phpbb_root_path, $php_ext);
+
+ $container->setParameter('core.root_path', $phpbb_root_path);
+ $container->setParameter('core.adm_relative_path', $phpbb_adm_relative_path);
+ $container->setParameter('core.php_ext', $php_ext);
+ $container->setParameter('core.table_prefix', '');
+
+ $container->register('dbal.conn')->setSynthetic(true);
+
+ $container->setAlias('cache.driver', 'cache.driver.install');
+
+ $container->compile();
+
+ return $container;
+}
+
+/**
+* Create updater container
+*
+* @param string $phpbb_root_path Root path
+* @param string $php_ext PHP Extension
+* @param array $config_path Path to config directory
+* @return ContainerBuilder object (compiled)
+*/
+function phpbb_create_update_container($phpbb_root_path, $php_ext, $config_path)
+{
+ $config_file = $phpbb_root_path . 'config.' . $php_ext;
+ return phpbb_create_compiled_container(
+ $config_file,
+ array(
+ new phpbb\di\extension\config($config_file),
+ new phpbb\di\extension\core($config_path),
+ ),
+ array(
+ new phpbb\di\pass\collection_pass(),
+ new phpbb\di\pass\kernel_pass(),
+ ),
+ $phpbb_root_path,
+ $php_ext
+ );
+}
+
+/**
+* Create a compiled ContainerBuilder object
+*
+* @param array $extensions Array of Container extension objects
+* @param array $passes Array of Compiler Pass objects
+* @param string $phpbb_root_path Root path
+* @param string $php_ext PHP Extension
+* @return ContainerBuilder object (compiled)
+*/
+function phpbb_create_compiled_container($config_file, array $extensions, array $passes, $phpbb_root_path, $php_ext)
+{
+ // Create the final container to be compiled and cached
+ $container = phpbb_create_container($extensions, $phpbb_root_path, $php_ext);
+
+ // Compile the container
+ foreach ($passes as $pass)
+ {
+ $container->addCompilerPass($pass);
+ }
+ $container->compile();
+
+ return $container;
+}
+
+/**
+* Create a compiled and dumped ContainerBuilder object
+*
+* @param array $extensions Array of Container extension objects
+* @param array $passes Array of Compiler Pass objects
+* @param string $phpbb_root_path Root path
+* @param string $php_ext PHP Extension
+* @return ContainerBuilder object (compiled)
+*/
+function phpbb_create_dumped_container($config_file, array $extensions, array $passes, $phpbb_root_path, $php_ext)
+{
+ // Check for our cached container; if it exists, use it
+ $container_filename = phpbb_container_filename($phpbb_root_path, $php_ext);
+ if (file_exists($container_filename))
+ {
+ require($container_filename);
+ return new phpbb_cache_container();
+ }
+
+ $container = phpbb_create_compiled_container($config_file, $extensions, $passes, $phpbb_root_path, $php_ext);
+
+ // Lastly, we create our cached container class
+ $dumper = new PhpDumper($container);
+ $cached_container_dump = $dumper->dump(array(
+ 'class' => 'phpbb_cache_container',
+ 'base_class' => 'Symfony\\Component\\DependencyInjection\\ContainerBuilder',
+ ));
+
+ file_put_contents($container_filename, $cached_container_dump);
+
+ return $container;
+}
+
+/**
+* Create an environment-specific ContainerBuilder object
+*
+* If debug is enabled, the container is re-compiled every time.
+* This ensures that the latest changes will always be reflected
+* during development.
+*
+* Otherwise it will get the existing dumped container and use
+* that one instead.
+*
+* @param array $extensions Array of Container extension objects
+* @param array $passes Array of Compiler Pass objects
+* @param string $phpbb_root_path Root path
+* @param string $php_ext PHP Extension
+* @return ContainerBuilder object (compiled)
+*/
+function phpbb_create_dumped_container_unless_debug($config_file, array $extensions, array $passes, $phpbb_root_path, $php_ext)
+{
+ $container_factory = defined('DEBUG') ? 'phpbb_create_compiled_container' : 'phpbb_create_dumped_container';
+ return $container_factory($config_file, $extensions, $passes, $phpbb_root_path, $php_ext);
+}
+
+/**
+* Create a default ContainerBuilder object
+*
+* Contains the default configuration of the phpBB container.
+*
+* @param array $extensions Array of Container extension objects
+* @param array $passes Array of Compiler Pass objects
+* @return ContainerBuilder object (compiled)
+*/
+function phpbb_create_default_container($phpbb_root_path, $php_ext)
+{
+ $config_file = $phpbb_root_path . 'config.' . $php_ext;
+ $installed_exts = phpbb_bootstrap_enabled_exts($config_file, $phpbb_root_path);
+
+ return phpbb_create_dumped_container_unless_debug(
+ $config_file,
+ array(
+ new \phpbb\di\extension\config($config_file),
+ new \phpbb\di\extension\core($phpbb_root_path . 'config'),
+ new \phpbb\di\extension\ext($installed_exts),
+ ),
+ array(
+ new \phpbb\di\pass\collection_pass(),
+ new \phpbb\di\pass\kernel_pass(),
+ ),
+ $phpbb_root_path,
+ $php_ext
+ );
+}
+
+/**
+* Get the filename under which the dumped container will be stored.
+*
+* @param string $phpbb_root_path Root path
+* @param string $php_ext PHP Extension
+* @return Path for dumped container
+*/
+function phpbb_container_filename($phpbb_root_path, $php_ext)
+{
+ $filename = str_replace(array('/', '.'), array('slash', 'dot'), $phpbb_root_path);
+ return $phpbb_root_path . 'cache/container_' . $filename . '.' . $php_ext;
+}
diff --git a/phpBB/includes/functions_content.php b/phpBB/includes/functions_content.php
index 6213d2fd24..dd9201165b 100644
--- a/phpBB/includes/functions_content.php
+++ b/phpBB/includes/functions_content.php
@@ -2,9 +2,8 @@
/**
*
* @package phpBB3
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -409,16 +408,34 @@ function strip_bbcode(&$text, $uid = '')
* For display of custom parsed text on user-facing pages
* Expects $text to be the value directly from the database (stored value)
*/
-function generate_text_for_display($text, $uid, $bitfield, $flags)
+function generate_text_for_display($text, $uid, $bitfield, $flags, $censor_text = true)
{
static $bbcode;
+ global $phpbb_dispatcher;
if ($text === '')
{
return '';
}
- $text = censor_text($text);
+ /**
+ * Use this event to modify the text before it is parsed
+ *
+ * @event core.modify_text_for_display_before
+ * @var string text The text to parse
+ * @var string uid The BBCode UID
+ * @var string bitfield The BBCode Bitfield
+ * @var int flags The BBCode Flags
+ * @var bool censor_text Whether or not to apply word censors
+ * @since 3.1-A1
+ */
+ $vars = array('text', 'uid', 'bitfield', 'flags', 'censor_text');
+ extract($phpbb_dispatcher->trigger_event('core.modify_text_for_display_before', compact($vars)));
+
+ if ($censor_text)
+ {
+ $text = censor_text($text);
+ }
// Parse bbcode if bbcode uid stored and bbcode enabled
if ($uid && ($flags & OPTION_FLAG_BBCODE))
@@ -444,6 +461,19 @@ function generate_text_for_display($text, $uid, $bitfield, $flags)
$text = bbcode_nl2br($text);
$text = smiley_text($text, !($flags & OPTION_FLAG_SMILIES));
+ /**
+ * Use this event to modify the text after it is parsed
+ *
+ * @event core.modify_text_for_display_after
+ * @var string text The text to parse
+ * @var string uid The BBCode UID
+ * @var string bitfield The BBCode Bitfield
+ * @var int flags The BBCode Flags
+ * @since 3.1-A1
+ */
+ $vars = array('text', 'uid', 'bitfield', 'flags');
+ extract($phpbb_dispatcher->trigger_event('core.modify_text_for_display_after', compact($vars)));
+
return $text;
}
@@ -451,10 +481,36 @@ function generate_text_for_display($text, $uid, $bitfield, $flags)
* For parsing custom parsed text to be stored within the database.
* This function additionally returns the uid and bitfield that needs to be stored.
* Expects $text to be the value directly from request_var() and in it's non-parsed form
+*
+* @param string $text The text to be replaced with the parsed one
+* @param string $uid The BBCode uid for this parse
+* @param string $bitfield The BBCode bitfield for this parse
+* @param int $flags The allow_bbcode, allow_urls and allow_smilies compiled into a single integer.
+* @param bool $allow_bbcode If BBCode is allowed (i.e. if BBCode is parsed)
+* @param bool $allow_urls If urls is allowed
+* @param bool $allow_smilies If smilies are allowed
+*
+* @return array An array of string with the errors that occurred while parsing
*/
function generate_text_for_storage(&$text, &$uid, &$bitfield, &$flags, $allow_bbcode = false, $allow_urls = false, $allow_smilies = false)
{
- global $phpbb_root_path, $phpEx;
+ global $phpbb_root_path, $phpEx, $phpbb_dispatcher;
+
+ /**
+ * Use this event to modify the text before it is prepared for storage
+ *
+ * @event core.modify_text_for_storage_before
+ * @var string text The text to parse
+ * @var string uid The BBCode UID
+ * @var string bitfield The BBCode Bitfield
+ * @var int flags The BBCode Flags
+ * @var bool allow_bbcode Whether or not to parse BBCode
+ * @var bool allow_urls Whether or not to parse URLs
+ * @var bool allow_smilies Whether or not to parse Smilies
+ * @since 3.1-A1
+ */
+ $vars = array('text', 'uid', 'bitfield', 'flags', 'allow_bbcode', 'allow_urls', 'allow_smilies');
+ extract($phpbb_dispatcher->trigger_event('core.modify_text_for_storage_before', compact($vars)));
$uid = $bitfield = '';
$flags = (($allow_bbcode) ? OPTION_FLAG_BBCODE : 0) + (($allow_smilies) ? OPTION_FLAG_SMILIES : 0) + (($allow_urls) ? OPTION_FLAG_LINKS : 0);
@@ -483,7 +539,20 @@ function generate_text_for_storage(&$text, &$uid, &$bitfield, &$flags, $allow_bb
$bitfield = $message_parser->bbcode_bitfield;
- return;
+ /**
+ * Use this event to modify the text after it is prepared for storage
+ *
+ * @event core.modify_text_for_storage_after
+ * @var string text The text to parse
+ * @var string uid The BBCode UID
+ * @var string bitfield The BBCode Bitfield
+ * @var int flags The BBCode Flags
+ * @since 3.1-A1
+ */
+ $vars = array('text', 'uid', 'bitfield', 'flags');
+ extract($phpbb_dispatcher->trigger_event('core.modify_text_for_storage_after', compact($vars)));
+
+ return $message_parser->warn_msg;
}
/**
@@ -492,10 +561,33 @@ function generate_text_for_storage(&$text, &$uid, &$bitfield, &$flags, $allow_bb
*/
function generate_text_for_edit($text, $uid, $flags)
{
- global $phpbb_root_path, $phpEx;
+ global $phpbb_root_path, $phpEx, $phpbb_dispatcher;
+
+ /**
+ * Use this event to modify the text before it is decoded for editing
+ *
+ * @event core.modify_text_for_edit_before
+ * @var string text The text to parse
+ * @var string uid The BBCode UID
+ * @var int flags The BBCode Flags
+ * @since 3.1-A1
+ */
+ $vars = array('text', 'uid', 'flags');
+ extract($phpbb_dispatcher->trigger_event('core.modify_text_for_edit_before', compact($vars)));
decode_message($text, $uid);
+ /**
+ * Use this event to modify the text after it is decoded for editing
+ *
+ * @event core.modify_text_for_edit_after
+ * @var string text The text to parse
+ * @var int flags The BBCode Flags
+ * @since 3.1-A1
+ */
+ $vars = array('text', 'flags');
+ extract($phpbb_dispatcher->trigger_event('core.modify_text_for_edit_after', compact($vars)));
+
return array(
'allow_bbcode' => ($flags & OPTION_FLAG_BBCODE) ? 1 : 0,
'allow_smilies' => ($flags & OPTION_FLAG_SMILIES) ? 1 : 0,
@@ -645,37 +737,59 @@ function make_clickable($text, $server_url = false, $class = 'postlink')
$server_url = generate_board_url();
}
- static $magic_url_match;
- static $magic_url_replace;
static $static_class;
+ static $magic_url_match_args;
- if (!is_array($magic_url_match) || $static_class != $class)
+ if (!is_array($magic_url_match_args) || $static_class != $class)
{
$static_class = $class;
$class = ($static_class) ? ' class="' . $static_class . '"' : '';
$local_class = ($static_class) ? ' class="' . $static_class . '-local"' : '';
- $magic_url_match = $magic_url_replace = array();
- // Be sure to not let the matches cross over. ;)
+ $magic_url_match_args = array();
// relative urls for this board
- $magic_url_match[] = '#(^|[\n\t (>.])(' . preg_quote($server_url, '#') . ')/(' . get_preg_expression('relative_url_inline') . ')#ie';
- $magic_url_replace[] = "make_clickable_callback(MAGIC_URL_LOCAL, '\$1', '\$2', '\$3', '$local_class')";
+ $magic_url_match_args[] = array(
+ '#(^|[\n\t (>.])(' . preg_quote($server_url, '#') . ')/(' . get_preg_expression('relative_url_inline') . ')#i',
+ MAGIC_URL_LOCAL,
+ $local_class,
+ );
// matches a xxxx://aaaaa.bbb.cccc. ...
- $magic_url_match[] = '#(^|[\n\t (>.])(' . get_preg_expression('url_inline') . ')#ie';
- $magic_url_replace[] = "make_clickable_callback(MAGIC_URL_FULL, '\$1', '\$2', '', '$class')";
+ $magic_url_match_args[] = array(
+ '#(^|[\n\t (>.])(' . get_preg_expression('url_inline') . ')#i',
+ MAGIC_URL_FULL,
+ $class,
+ );
// matches a "www.xxxx.yyyy[/zzzz]" kinda lazy URL thing
- $magic_url_match[] = '#(^|[\n\t (>])(' . get_preg_expression('www_url_inline') . ')#ie';
- $magic_url_replace[] = "make_clickable_callback(MAGIC_URL_WWW, '\$1', '\$2', '', '$class')";
+ $magic_url_match_args[] = array(
+ '#(^|[\n\t (>])(' . get_preg_expression('www_url_inline') . ')#i',
+ MAGIC_URL_WWW,
+ $class,
+ );
// matches an email@domain type address at the start of a line, or after a space or after what might be a BBCode.
- $magic_url_match[] = '/(^|[\n\t (>])(' . get_preg_expression('email') . ')/ie';
- $magic_url_replace[] = "make_clickable_callback(MAGIC_URL_EMAIL, '\$1', '\$2', '', '')";
+ $magic_url_match_args[] = array(
+ '/(^|[\n\t (>])(' . get_preg_expression('email') . ')/i',
+ MAGIC_URL_EMAIL,
+ '',
+ );
+ }
+
+ foreach ($magic_url_match_args as $magic_args)
+ {
+ if (preg_match($magic_args[0], $text, $matches))
+ {
+ $text = preg_replace_callback($magic_args[0], function($matches) use ($magic_args)
+ {
+ $relative_url = isset($matches[3]) ? $matches[3] : '';
+ return make_clickable_callback($magic_args[1], $matches[1], $matches[2], $relative_url, $magic_args[2]);
+ }, $text);
+ }
}
- return preg_replace($magic_url_match, $magic_url_replace, $text);
+ return $text;
}
/**
@@ -731,7 +845,7 @@ function bbcode_nl2br($text)
*/
function smiley_text($text, $force_option = false)
{
- global $config, $user, $phpbb_root_path;
+ global $config, $user, $phpbb_path_helper;
if ($force_option || !$config['allow_smilies'] || !$user->optionget('viewsmilies'))
{
@@ -739,8 +853,8 @@ function smiley_text($text, $force_option = false)
}
else
{
- $root_path = (defined('PHPBB_USE_BOARD_URL_PATH') && PHPBB_USE_BOARD_URL_PATH) ? generate_board_url() . '/' : $phpbb_root_path;
- return preg_replace('#<!\-\- s(.*?) \-\-><img src="\{SMILIES_PATH\}\/(.*?) \/><!\-\- s\1 \-\->#', '<img src="' . $root_path . $config['smilies_path'] . '/\2 />', $text);
+ $root_path = (defined('PHPBB_USE_BOARD_URL_PATH') && PHPBB_USE_BOARD_URL_PATH) ? generate_board_url() . '/' : $phpbb_path_helper->get_web_root_path();
+ return preg_replace('#<!\-\- s(.*?) \-\-><img src="\{SMILIES_PATH\}\/(.*?) \/><!\-\- s\1 \-\->#', '<img class="smilies" src="' . $root_path . $config['smilies_path'] . '/\2 />', $text);
}
}
@@ -938,12 +1052,12 @@ function parse_attachments($forum_id, &$message, &$attachments, &$update_count,
}
$download_link = append_sid("{$phpbb_root_path}download/file.$phpEx", 'id=' . $attachment['attach_id']);
+ $l_downloaded_viewed = 'VIEWED_COUNTS';
switch ($display_cat)
{
// Images
case ATTACHMENT_CATEGORY_IMAGE:
- $l_downloaded_viewed = 'VIEWED_COUNT';
$inline_link = append_sid("{$phpbb_root_path}download/file.$phpEx", 'id=' . $attachment['attach_id']);
$download_link .= '&amp;mode=view';
@@ -957,7 +1071,6 @@ function parse_attachments($forum_id, &$message, &$attachments, &$update_count,
// Images, but display Thumbnail
case ATTACHMENT_CATEGORY_THUMB:
- $l_downloaded_viewed = 'VIEWED_COUNT';
$thumbnail_link = append_sid("{$phpbb_root_path}download/file.$phpEx", 'id=' . $attachment['attach_id'] . '&amp;t=1');
$download_link .= '&amp;mode=view';
@@ -971,7 +1084,6 @@ function parse_attachments($forum_id, &$message, &$attachments, &$update_count,
// Windows Media Streams
case ATTACHMENT_CATEGORY_WM:
- $l_downloaded_viewed = 'VIEWED_COUNT';
// Giving the filename directly because within the wm object all variables are in local context making it impossible
// to validate against a valid session (all params can differ)
@@ -990,7 +1102,6 @@ function parse_attachments($forum_id, &$message, &$attachments, &$update_count,
// Real Media Streams
case ATTACHMENT_CATEGORY_RM:
case ATTACHMENT_CATEGORY_QUICKTIME:
- $l_downloaded_viewed = 'VIEWED_COUNT';
$block_array += array(
'S_RM_FILE' => ($display_cat == ATTACHMENT_CATEGORY_RM) ? true : false,
@@ -1007,8 +1118,6 @@ function parse_attachments($forum_id, &$message, &$attachments, &$update_count,
case ATTACHMENT_CATEGORY_FLASH:
list($width, $height) = @getimagesize($filename);
- $l_downloaded_viewed = 'VIEWED_COUNT';
-
$block_array += array(
'S_FLASH_FILE' => true,
'WIDTH' => $width,
@@ -1021,7 +1130,7 @@ function parse_attachments($forum_id, &$message, &$attachments, &$update_count,
break;
default:
- $l_downloaded_viewed = 'DOWNLOAD_COUNT';
+ $l_downloaded_viewed = 'DOWNLOAD_COUNTS';
$block_array += array(
'S_FILE' => true,
@@ -1029,11 +1138,14 @@ function parse_attachments($forum_id, &$message, &$attachments, &$update_count,
break;
}
- $l_download_count = (!isset($attachment['download_count']) || $attachment['download_count'] == 0) ? $user->lang[$l_downloaded_viewed . '_NONE'] : (($attachment['download_count'] == 1) ? sprintf($user->lang[$l_downloaded_viewed], $attachment['download_count']) : sprintf($user->lang[$l_downloaded_viewed . 'S'], $attachment['download_count']));
+ if (!isset($attachment['download_count']))
+ {
+ $attachment['download_count'] = 0;
+ }
$block_array += array(
'U_DOWNLOAD_LINK' => $download_link,
- 'L_DOWNLOAD_COUNT' => $l_download_count
+ 'L_DOWNLOAD_COUNT' => $user->lang($l_downloaded_viewed, (int) $attachment['download_count']),
);
}
@@ -1106,8 +1218,8 @@ function extension_allowed($forum_id, $extension, &$extensions)
* @param string $string The text to truncate to the given length. String is specialchared.
* @param int $max_length Maximum length of string (multibyte character count as 1 char / Html entity count as 1 char)
* @param int $max_store_length Maximum character length of string (multibyte character count as 1 char / Html entity count as entity chars).
-* @param bool $allow_reply Allow Re: in front of string
-* NOTE: This parameter can cause undesired behavior (returning strings longer than $max_store_length) and is deprecated.
+* @param bool $allow_reply Allow Re: in front of string
+* NOTE: This parameter can cause undesired behavior (returning strings longer than $max_store_length) and is deprecated.
* @param string $append String to be appended
*/
function truncate_string($string, $max_length = 60, $max_store_length = 255, $allow_reply = false, $append = '')
@@ -1178,6 +1290,7 @@ function truncate_string($string, $max_length = 60, $max_store_length = 255, $al
function get_username_string($mode, $user_id, $username, $username_colour = '', $guest_username = false, $custom_profile_url = false)
{
static $_profile_cache;
+ global $phpbb_dispatcher;
// We cache some common variables we need within this function
if (empty($_profile_cache))
@@ -1255,10 +1368,82 @@ function get_username_string($mode, $user_id, $username, $username_colour = '',
if (($mode == 'full' && !$profile_url) || $mode == 'no_profile')
{
- return str_replace(array('{USERNAME_COLOUR}', '{USERNAME}'), array($username_colour, $username), (!$username_colour) ? $_profile_cache['tpl_noprofile'] : $_profile_cache['tpl_noprofile_colour']);
+ $username_string = str_replace(array('{USERNAME_COLOUR}', '{USERNAME}'), array($username_colour, $username), (!$username_colour) ? $_profile_cache['tpl_noprofile'] : $_profile_cache['tpl_noprofile_colour']);
}
+ else
+ {
+ $username_string = str_replace(array('{PROFILE_URL}', '{USERNAME_COLOUR}', '{USERNAME}'), array($profile_url, $username_colour, $username), (!$username_colour) ? $_profile_cache['tpl_profile'] : $_profile_cache['tpl_profile_colour']);
+ }
+
+ /**
+ * Use this event to change the output of get_username_string()
+ *
+ * @event core.modify_username_string
+ * @var string mode profile|username|colour|full|no_profile
+ * @var int user_id String or array of additional url
+ * parameters
+ * @var string username The user's username
+ * @var string username_colour The user's colour
+ * @var string guest_username Optional parameter to specify the
+ * guest username.
+ * @var string custom_profile_url Optional parameter to specify a
+ * profile url.
+ * @var string username_string The string that has been generated
+ * @var array _profile_cache Array of original return templates
+ * @since 3.1-A1
+ */
+ $vars = array('mode', 'user_id', 'username', 'username_colour', 'guest_username', 'custom_profile_url', 'username_string', '_profile_cache');
+ extract($phpbb_dispatcher->trigger_event('core.modify_username_string', compact($vars)));
+
+ return $username_string;
+}
- return str_replace(array('{PROFILE_URL}', '{USERNAME_COLOUR}', '{USERNAME}'), array($profile_url, $username_colour, $username), (!$username_colour) ? $_profile_cache['tpl_profile'] : $_profile_cache['tpl_profile_colour']);
+/**
+ * Add an option to the quick-mod tools.
+ *
+ * @param string $option The language key for the value of the option.
+ * @param string $lang_string The language string to use.
+ */
+function phpbb_add_quickmod_option($option, $lang_string)
+{
+ global $template, $user;
+ $lang_string = $user->lang($lang_string);
+ $template->assign_block_vars('quickmod', array(
+ 'VALUE' => $option,
+ 'TITLE' => $lang_string,
+ ));
+}
+
+/**
+* Concatenate an array into a string list.
+*
+* @param array $items Array of items to concatenate
+* @param object $user The phpBB $user object.
+*
+* @return string String list. Examples: "A"; "A and B"; "A, B, and C"
+*/
+function phpbb_generate_string_list($items, $user)
+{
+ if (empty($items))
+ {
+ return '';
+ }
+
+ $count = sizeof($items);
+ $last_item = array_pop($items);
+ $lang_key = 'STRING_LIST_MULTI';
+
+ if ($count == 1)
+ {
+ return $last_item;
+ }
+ else if ($count == 2)
+ {
+ $lang_key = 'STRING_LIST_SIMPLE';
+ }
+ $list = implode($user->lang['COMMA_SEPARATOR'], $items);
+
+ return $user->lang($lang_key, $list, $last_item);
}
/**
@@ -1354,5 +1539,3 @@ class bitfield
$this->data = $this->data | $bitfield->get_blob();
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/functions_convert.php b/phpBB/includes/functions_convert.php
index 3b26f417e9..1646c79161 100644
--- a/phpBB/includes/functions_convert.php
+++ b/phpBB/includes/functions_convert.php
@@ -2,9 +2,8 @@
/**
*
* @package install
-* @version $Id$
* @copyright (c) 2006 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -824,7 +823,7 @@ function get_avatar_dim($src, $axis, $func = false, $arg1 = false, $arg2 = false
break;
case AVATAR_REMOTE:
- // see notes on this functions usage and (hopefully) model $func to avoid this accordingly
+ // see notes on this functions usage and (hopefully) model $func to avoid this accordingly
return get_remote_avatar_dim($src, $axis);
break;
@@ -1028,7 +1027,6 @@ function set_user_options()
'attachsig' => array('bit' => 6, 'default' => 0),
'bbcode' => array('bit' => 8, 'default' => 1),
'smilies' => array('bit' => 9, 'default' => 1),
- 'popuppm' => array('bit' => 10, 'default' => 0),
'sig_bbcode' => array('bit' => 15, 'default' => 1),
'sig_smilies' => array('bit' => 16, 'default' => 1),
'sig_links' => array('bit' => 17, 'default' => 1),
@@ -1118,7 +1116,7 @@ function words_unique(&$words)
* 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
*/
-function add_user_group($group_id, $user_id, $group_leader=false)
+function add_user_group($group_id, $user_id, $group_leader = false)
{
global $convert, $phpbb_root_path, $config, $user, $db;
@@ -1298,7 +1296,7 @@ function restore_config($schema)
$src_ary = $schema['array_name'];
$config_value = (isset($convert_config[$src_ary][$src])) ? $convert_config[$src_ary][$src] : '';
}
- }
+ }
if ($config_value !== '')
{
@@ -1720,7 +1718,7 @@ function add_default_groups()
'GUESTS' => array('', 0, 0),
'REGISTERED' => array('', 0, 0),
'REGISTERED_COPPA' => array('', 0, 0),
- 'GLOBAL_MODERATORS' => array('00AA00', 1, 0),
+ 'GLOBAL_MODERATORS' => array('00AA00', 2, 0),
'ADMINISTRATORS' => array('AA0000', 1, 1),
'BOTS' => array('9E8DA7', 0, 0),
'NEWLY_REGISTERED' => array('', 0, 0),
@@ -1749,7 +1747,7 @@ function add_default_groups()
'group_type' => GROUP_SPECIAL,
'group_colour' => (string) $data[0],
'group_legend' => (int) $data[1],
- 'group_founder_manage' => (int) $data[2]
+ 'group_founder_manage' => (int) $data[2],
);
}
@@ -1759,6 +1757,38 @@ function add_default_groups()
}
}
+function add_groups_to_teampage()
+{
+ global $db;
+
+ $teampage_groups = array(
+ 'ADMINISTRATORS' => 1,
+ 'GLOBAL_MODERATORS' => 2,
+ );
+
+ $sql = 'SELECT *
+ FROM ' . GROUPS_TABLE . '
+ WHERE ' . $db->sql_in_set('group_name', array_keys($teampage_groups));
+ $result = $db->sql_query($sql);
+
+ $teampage_ary = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $teampage_ary[] = array(
+ 'group_id' => (int) $row['group_id'],
+ 'teampage_name' => '',
+ 'teampage_position' => (int) $teampage_groups[$row['group_name']],
+ 'teampage_parent' => 0,
+ );
+ }
+ $db->sql_freeresult($result);
+
+ if (sizeof($teampage_ary))
+ {
+ $db->sql_multi_insert(TEAMPAGE_TABLE, $teampage_ary);
+ }
+}
+
/**
* Sync post count. We might need to do this in batches.
@@ -1769,7 +1799,7 @@ function sync_post_count($offset, $limit)
$sql = 'SELECT COUNT(post_id) AS num_posts, poster_id
FROM ' . POSTS_TABLE . '
WHERE post_postcount = 1
- AND post_approved = 1
+ AND post_visibility = ' . ITEM_APPROVED . '
GROUP BY poster_id
ORDER BY poster_id';
$result = $db->sql_query_limit($sql, $limit, $offset);
@@ -1885,7 +1915,7 @@ function add_bots()
'user_email' => '',
'user_lang' => $config['default_lang'],
'user_style' => 1,
- 'user_timezone' => 0,
+ 'user_timezone' => 'UTC',
'user_allow_massemail' => 0,
);
@@ -1942,7 +1972,7 @@ function update_dynamic_config()
$sql = 'SELECT COUNT(post_id) AS stat
FROM ' . POSTS_TABLE . '
- WHERE post_approved = 1';
+ WHERE post_visibility = ' . ITEM_APPROVED;
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
@@ -1951,7 +1981,7 @@ function update_dynamic_config()
$sql = 'SELECT COUNT(topic_id) AS stat
FROM ' . TOPICS_TABLE . '
- WHERE topic_approved = 1';
+ WHERE topic_visibility = ' . ITEM_APPROVED;
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
@@ -2473,7 +2503,3 @@ function fill_dateformat($user_dateformat)
return ((empty($user_dateformat)) ? $config['default_dateformat'] : $user_dateformat);
}
-
-
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/functions_database_helper.php b/phpBB/includes/functions_database_helper.php
index 664c246888..923e542690 100644
--- a/phpBB/includes/functions_database_helper.php
+++ b/phpBB/includes/functions_database_helper.php
@@ -22,14 +22,14 @@ if (!defined('IN_PHPBB'))
*
* The only supported table is bookmarks.
*
-* @param dbal $db Database object
+* @param \phpbb\db\driver\driver $db Database object
* @param string $table Table on which to perform the update
* @param string $column Column whose values to change
* @param array $from_values An array of values that should be changed
* @param int $to_value The new value
* @return null
*/
-function phpbb_update_rows_avoiding_duplicates($db, $table, $column, $from_values, $to_value)
+function phpbb_update_rows_avoiding_duplicates(\phpbb\db\driver\driver $db, $table, $column, $from_values, $to_value)
{
$sql = "SELECT $column, user_id
FROM $table
@@ -107,14 +107,14 @@ function phpbb_update_rows_avoiding_duplicates($db, $table, $column, $from_value
*
* The only supported table is topics_watch.
*
-* @param dbal $db Database object
+* @param \phpbb\db\driver\driver $db Database object
* @param string $table Table on which to perform the update
* @param string $column Column whose values to change
* @param array $from_values An array of values that should be changed
* @param int $to_value The new value
* @return null
*/
-function phpbb_update_rows_avoiding_duplicates_notify_status($db, $table, $column, $from_values, $to_value)
+function phpbb_update_rows_avoiding_duplicates_notify_status(\phpbb\db\driver\driver $db, $table, $column, $from_values, $to_value)
{
$sql = "SELECT $column, user_id, notify_status
FROM $table
diff --git a/phpBB/includes/functions_display.php b/phpBB/includes/functions_display.php
index ee7048638d..cd2c9e5ae6 100644
--- a/phpBB/includes/functions_display.php
+++ b/phpBB/includes/functions_display.php
@@ -2,9 +2,8 @@
/**
*
* @package phpBB3
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -23,6 +22,7 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
{
global $db, $auth, $user, $template;
global $phpbb_root_path, $phpEx, $config;
+ global $request, $phpbb_dispatcher, $phpbb_container;
$forum_rows = $subforums = $forum_ids = $forum_ids_moderator = $forum_moderators = $active_forum_ary = array();
$parent_id = $visible_forums = 0;
@@ -54,12 +54,26 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
// Handle marking everything read
if ($mark_read == 'all')
{
- $redirect = build_url(array('mark', 'hash'));
+ $redirect = build_url(array('mark', 'hash', 'mark_time'));
meta_refresh(3, $redirect);
if (check_link_hash(request_var('hash', ''), 'global'))
{
- markread('all');
+ markread('all', false, false, request_var('mark_time', 0));
+
+ if ($request->is_ajax())
+ {
+ // Tell the ajax script what language vars and URL need to be replaced
+ $data = array(
+ 'NO_UNREAD_POSTS' => $user->lang['NO_UNREAD_POSTS'],
+ 'UNREAD_POSTS' => $user->lang['UNREAD_POSTS'],
+ 'U_MARK_FORUMS' => ($user->data['is_registered'] || $config['load_anon_lastread']) ? append_sid("{$phpbb_root_path}index.$phpEx", 'hash=' . generate_link_hash('global') . '&mark=forums&mark_time=' . time()) : '',
+ 'MESSAGE_TITLE' => $user->lang['INFORMATION'],
+ 'MESSAGE_TEXT' => $user->lang['FORUMS_MARKED']
+ );
+ $json_response = new \phpbb\json_response();
+ $json_response->send($data);
+ }
trigger_error(
$user->lang['FORUMS_MARKED'] . '<br /><br />' .
@@ -90,7 +104,7 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
}
else if ($config['load_anon_lastread'] || $user->data['is_registered'])
{
- $tracking_topics = (isset($_COOKIE[$config['cookie_name'] . '_track'])) ? ((STRIP) ? stripslashes($_COOKIE[$config['cookie_name'] . '_track']) : $_COOKIE[$config['cookie_name'] . '_track']) : '';
+ $tracking_topics = $request->variable($config['cookie_name'] . '_track', '', true, \phpbb\request\request_interface::COOKIE);
$tracking_topics = ($tracking_topics) ? tracking_unserialize($tracking_topics) : array();
if (!$user->data['is_registered'])
@@ -109,7 +123,7 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
$sql_array['SELECT'] .= ', fa.user_id';
}
- $sql = $db->sql_build_query('SELECT', array(
+ $sql_ary = array(
'SELECT' => $sql_array['SELECT'],
'FROM' => $sql_array['FROM'],
'LEFT_JOIN' => $sql_array['LEFT_JOIN'],
@@ -117,27 +131,41 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
'WHERE' => $sql_where,
'ORDER_BY' => 'f.left_id',
- ));
+ );
+ /**
+ * Event to modify the SQL query before the forum data is queried
+ *
+ * @event core.display_forums_modify_sql
+ * @var array sql_ary The SQL array to get the data of the forums
+ * @since 3.1-A1
+ */
+ $vars = array('sql_ary');
+ extract($phpbb_dispatcher->trigger_event('core.display_forums_modify_sql', compact($vars)));
+
+ $sql = $db->sql_build_query('SELECT', $sql_ary);
$result = $db->sql_query($sql);
$forum_tracking_info = array();
$branch_root_id = $root_data['forum_id'];
- // Check for unread global announcements (index page only)
- $ga_unread = false;
- if ($root_data['forum_id'] == 0)
- {
- $unread_ga_list = get_unread_topics($user->data['user_id'], 'AND t.forum_id = 0', '', 1);
-
- if (!empty($unread_ga_list))
- {
- $ga_unread = true;
- }
- }
+ $phpbb_content_visibility = $phpbb_container->get('content.visibility');
while ($row = $db->sql_fetchrow($result))
{
+ /**
+ * Event to modify the data set of a forum
+ *
+ * This event is triggered once per forum
+ *
+ * @event core.display_forums_modify_row
+ * @var int branch_root_id Last top-level forum
+ * @var array row The data of the forum
+ * @since 3.1-A1
+ */
+ $vars = array('branch_root_id', 'row');
+ extract($phpbb_dispatcher->trigger_event('core.display_forums_modify_row', compact($vars)));
+
$forum_id = $row['forum_id'];
// Mark forums read?
@@ -187,9 +215,11 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
$forum_tracking_info[$forum_id] = (isset($tracking_topics['f'][$forum_id])) ? (int) (base_convert($tracking_topics['f'][$forum_id], 36, 10) + $config['board_startdate']) : $user->data['user_lastmark'];
}
- // Count the difference of real to public topics, so we can display an information to moderators
- $row['forum_id_unapproved_topics'] = ($auth->acl_get('m_approve', $forum_id) && ($row['forum_topics_real'] != $row['forum_topics'])) ? $forum_id : 0;
- $row['forum_topics'] = ($auth->acl_get('m_approve', $forum_id)) ? $row['forum_topics_real'] : $row['forum_topics'];
+ // Lets check whether there are unapproved topics/posts, so we can display an information to moderators
+ $row['forum_id_unapproved_topics'] = ($auth->acl_get('m_approve', $forum_id) && $row['forum_topics_unapproved']) ? $forum_id : 0;
+ $row['forum_id_unapproved_posts'] = ($auth->acl_get('m_approve', $forum_id) && $row['forum_posts_unapproved']) ? $forum_id : 0;
+ $row['forum_posts'] = $phpbb_content_visibility->get_count('forum_posts', $row, $forum_id);
+ $row['forum_topics'] = $phpbb_content_visibility->get_count('forum_topics', $row, $forum_id);
// Display active topics from this forum?
if ($show_active && $row['forum_type'] == FORUM_POST && $auth->acl_get('f_read', $forum_id) && ($row['forum_flags'] & FORUM_FLAG_ACTIVE_TOPICS))
@@ -252,6 +282,11 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
$forum_rows[$parent_id]['forum_id_unapproved_topics'] = $forum_id;
}
+ if (!$forum_rows[$parent_id]['forum_id_unapproved_posts'] && $row['forum_id_unapproved_posts'])
+ {
+ $forum_rows[$parent_id]['forum_id_unapproved_posts'] = $forum_id;
+ }
+
$forum_rows[$parent_id]['forum_topics'] += $row['forum_topics'];
// Do not list redirects in LINK Forums as Posts.
@@ -271,21 +306,50 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
$forum_rows[$parent_id]['forum_id_last_post'] = $forum_id;
}
}
+
+ /**
+ * Event to modify the forum rows data set
+ *
+ * This event is triggered once per forum
+ *
+ * @event core.display_forums_modify_forum_rows
+ * @var array forum_rows Data array of all forums we display
+ * @var array subforums Data array of all subforums we display
+ * @var int branch_root_id Current top-level forum
+ * @var int parent_id Current parent forum
+ * @var array row The data of the forum
+ * @since 3.1-A1
+ */
+ $vars = array('forum_rows', 'subforums', 'branch_root_id', 'parent_id', 'row');
+ extract($phpbb_dispatcher->trigger_event('core.display_forums_modify_forum_rows', compact($vars)));
}
$db->sql_freeresult($result);
// Handle marking posts
if ($mark_read == 'forums')
{
- $redirect = build_url(array('mark', 'hash'));
+ $redirect = build_url(array('mark', 'hash', 'mark_time'));
$token = request_var('hash', '');
if (check_link_hash($token, 'global'))
{
- // Add 0 to forums array to mark global announcements correctly
- $forum_ids[] = 0;
- markread('topics', $forum_ids);
+ markread('topics', $forum_ids, false, request_var('mark_time', 0));
$message = sprintf($user->lang['RETURN_FORUM'], '<a href="' . $redirect . '">', '</a>');
meta_refresh(3, $redirect);
+
+ if ($request->is_ajax())
+ {
+ // Tell the ajax script what language vars and URL need to be replaced
+ $data = array(
+ 'NO_UNREAD_POSTS' => $user->lang['NO_UNREAD_POSTS'],
+ 'UNREAD_POSTS' => $user->lang['UNREAD_POSTS'],
+ 'U_MARK_FORUMS' => ($user->data['is_registered'] || $config['load_anon_lastread']) ? append_sid("{$phpbb_root_path}viewforum.$phpEx", 'hash=' . generate_link_hash('global') . '&f=' . $root_data['forum_id'] . '&mark=forums&mark_time=' . time()) : '',
+ 'MESSAGE_TITLE' => $user->lang['INFORMATION'],
+ 'MESSAGE_TEXT' => $user->lang['FORUMS_MARKED']
+ );
+ $json_response = new \phpbb\json_response();
+ $json_response->send($data);
+ }
+
trigger_error($user->lang['FORUMS_MARKED'] . '<br /><br />' . $message);
}
else
@@ -334,12 +398,6 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
$forum_unread = (isset($forum_tracking_info[$forum_id]) && $row['orig_forum_last_post_time'] > $forum_tracking_info[$forum_id]) ? true : false;
- // Mark the first visible forum on index as unread if there's any unread global announcement
- if ($ga_unread && !empty($forum_ids_moderator) && $forum_id == $forum_ids_moderator[0])
- {
- $forum_unread = true;
- }
-
$folder_image = $folder_alt = $l_subforums = '';
$subforums_list = array();
@@ -383,7 +441,7 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
}
}
- $l_subforums = (sizeof($subforums[$forum_id]) == 1) ? $user->lang['SUBFORUM'] . ': ' : $user->lang['SUBFORUMS'] . ': ';
+ $l_subforums = (sizeof($subforums[$forum_id]) == 1) ? $user->lang['SUBFORUM'] : $user->lang['SUBFORUMS'];
$folder_image = ($forum_unread) ? 'forum_unread_subforum' : 'forum_read_subforum';
}
else
@@ -415,12 +473,13 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
if ($row['forum_last_post_id'])
{
$last_post_subject = $row['forum_last_post_subject'];
+ $last_post_subject_truncated = truncate_string(censor_text($last_post_subject), 30, 255, false, $user->lang['ELLIPSIS']);
$last_post_time = $user->format_date($row['forum_last_post_time']);
$last_post_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $row['forum_id_last_post'] . '&amp;p=' . $row['forum_last_post_id']) . '#p' . $row['forum_last_post_id'];
}
else
{
- $last_post_subject = $last_post_time = $last_post_url = '';
+ $last_post_subject = $last_post_time = $last_post_url = $last_post_subject_truncated = '';
}
// Output moderator listing ... if applicable
@@ -428,7 +487,7 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
if ($display_moderators && !empty($forum_moderators[$forum_id]))
{
$l_moderator = (sizeof($forum_moderators[$forum_id]) == 1) ? $user->lang['MODERATOR'] : $user->lang['MODERATORS'];
- $moderators_list = implode(', ', $forum_moderators[$forum_id]);
+ $moderators_list = implode($user->lang['COMMA_SEPARATOR'], $forum_moderators[$forum_id]);
}
$l_post_click_count = ($row['forum_type'] == FORUM_LINK) ? 'CLICKS' : 'POSTS';
@@ -439,7 +498,7 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
{
$s_subforums_list[] = '<a href="' . $subforum['link'] . '" class="subforum ' . (($subforum['unread']) ? 'unread' : 'read') . '" title="' . (($subforum['unread']) ? $user->lang['UNREAD_POSTS'] : $user->lang['NO_UNREAD_POSTS']) . '">' . $subforum['name'] . '</a>';
}
- $s_subforums_list = (string) implode(', ', $s_subforums_list);
+ $s_subforums_list = (string) implode($user->lang['COMMA_SEPARATOR'], $s_subforums_list);
$catless = ($row['parent_id'] == $root_data['forum_id']) ? true : false;
if ($row['forum_type'] != FORUM_LINK)
@@ -460,7 +519,7 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
}
}
- $template->assign_block_vars('forumrow', array(
+ $forum_row = array(
'S_IS_CAT' => false,
'S_NO_CAT' => $catless && !$last_catless,
'S_IS_LINK' => ($row['forum_type'] == FORUM_LINK) ? true : false,
@@ -469,6 +528,7 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
'S_LOCKED_FORUM' => ($row['forum_status'] == ITEM_LOCKED) ? true : false,
'S_LIST_SUBFORUMS' => ($row['display_subforum_list']) ? true : false,
'S_SUBFORUMS' => (sizeof($subforums_list)) ? true : false,
+ 'S_DISPLAY_SUBJECT' => ($last_post_subject && $config['display_last_subject'] && !$row['forum_password'] && $auth->acl_get('f_read', $row['forum_id'])) ? true : false,
'S_FEED_ENABLED' => ($config['feed_forum'] && !phpbb_optionget(FORUM_OPTION_FEED_EXCLUDE, $row['forum_options']) && $row['forum_type'] == FORUM_POST) ? true : false,
'FORUM_ID' => $row['forum_id'],
@@ -476,12 +536,13 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
'FORUM_DESC' => generate_text_for_display($row['forum_desc'], $row['forum_desc_uid'], $row['forum_desc_bitfield'], $row['forum_desc_options']),
'TOPICS' => $row['forum_topics'],
$l_post_click_count => $post_click_count,
+ 'FORUM_IMG_STYLE' => $folder_image,
'FORUM_FOLDER_IMG' => $user->img($folder_image, $folder_alt),
- 'FORUM_FOLDER_IMG_SRC' => $user->img($folder_image, $folder_alt, false, '', 'src'),
'FORUM_FOLDER_IMG_ALT' => isset($user->lang[$folder_alt]) ? $user->lang[$folder_alt] : '',
'FORUM_IMAGE' => ($row['forum_image']) ? '<img src="' . $phpbb_root_path . $row['forum_image'] . '" alt="' . $user->lang[$folder_alt] . '" />' : '',
'FORUM_IMAGE_SRC' => ($row['forum_image']) ? $phpbb_root_path . $row['forum_image'] : '',
- 'LAST_POST_SUBJECT' => censor_text($last_post_subject),
+ 'LAST_POST_SUBJECT' => (!$row['forum_password'] && $auth->acl_get('f_read', $row['forum_id'])) ? censor_text($last_post_subject) : "",
+ 'LAST_POST_SUBJECT_TRUNCATED' => (!$row['forum_password'] && $auth->acl_get('f_read', $row['forum_id'])) ? $last_post_subject_truncated : "",
'LAST_POST_TIME' => $last_post_time,
'LAST_POSTER' => get_username_string('username', $row['forum_last_poster_id'], $row['forum_last_poster_name'], $row['forum_last_poster_colour']),
'LAST_POSTER_COLOUR' => get_username_string('colour', $row['forum_last_poster_id'], $row['forum_last_poster_name'], $row['forum_last_poster_colour']),
@@ -493,11 +554,27 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
'L_MODERATOR_STR' => $l_moderator,
'U_UNAPPROVED_TOPICS' => ($row['forum_id_unapproved_topics']) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue&amp;mode=unapproved_topics&amp;f=' . $row['forum_id_unapproved_topics']) : '',
+ 'U_UNAPPROVED_POSTS' => ($row['forum_id_unapproved_posts']) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue&amp;mode=unapproved_posts&amp;f=' . $row['forum_id_unapproved_posts']) : '',
'U_VIEWFORUM' => $u_viewforum,
'U_LAST_POSTER' => get_username_string('profile', $row['forum_last_poster_id'], $row['forum_last_poster_name'], $row['forum_last_poster_colour']),
- 'U_LAST_POST' => $last_post_url)
+ 'U_LAST_POST' => $last_post_url,
);
+ /**
+ * Modify the template data block of the forum
+ *
+ * This event is triggered once per forum
+ *
+ * @event core.display_forums_modify_template_vars
+ * @var array forum_row Template data of the forum
+ * @var array row The data of the forum
+ * @since 3.1-A1
+ */
+ $vars = array('forum_row', 'row');
+ extract($phpbb_dispatcher->trigger_event('core.display_forums_modify_template_vars', compact($vars)));
+
+ $template->assign_block_vars('forumrow', $forum_row);
+
// Assign subforums loop for style authors
foreach ($subforums_list as $subforum)
{
@@ -512,11 +589,12 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
}
$template->assign_vars(array(
- 'U_MARK_FORUMS' => ($user->data['is_registered'] || $config['load_anon_lastread']) ? append_sid("{$phpbb_root_path}viewforum.$phpEx", 'hash=' . generate_link_hash('global') . '&amp;f=' . $root_data['forum_id'] . '&amp;mark=forums') : '',
+ 'U_MARK_FORUMS' => ($user->data['is_registered'] || $config['load_anon_lastread']) ? append_sid("{$phpbb_root_path}viewforum.$phpEx", 'hash=' . generate_link_hash('global') . '&amp;f=' . $root_data['forum_id'] . '&amp;mark=forums&amp;mark_time=' . time()) : '',
'S_HAS_SUBFORUM' => ($visible_forums) ? true : false,
'L_SUBFORUM' => ($visible_forums == 1) ? $user->lang['SUBFORUM'] : $user->lang['SUBFORUMS'],
'LAST_POST_IMG' => $user->img('icon_topic_latest', 'VIEW_LATEST_POST'),
'UNAPPROVED_IMG' => $user->img('icon_topic_unapproved', 'TOPICS_UNAPPROVED'),
+ 'UNAPPROVED_POST_IMG' => $user->img('icon_topic_unapproved', 'POSTS_UNAPPROVED'),
));
if ($return_moderators)
@@ -655,48 +733,6 @@ function get_forum_parents(&$forum_data)
}
/**
-* Generate topic pagination
-*/
-function topic_generate_pagination($replies, $url)
-{
- global $config, $user;
-
- // Make sure $per_page is a valid value
- $per_page = ($config['posts_per_page'] <= 0) ? 1 : $config['posts_per_page'];
-
- if (($replies + 1) > $per_page)
- {
- $total_pages = ceil(($replies + 1) / $per_page);
- $pagination = '';
-
- $times = 1;
- for ($j = 0; $j < $replies + 1; $j += $per_page)
- {
- $pagination .= '<a href="' . $url . ($j == 0 ? '' : '&amp;start=' . $j) . '">' . $times . '</a>';
- if ($times == 1 && $total_pages > 5)
- {
- $pagination .= '<span class="page-dots"> ... </span>';
-
- // Display the last three pages
- $times = $total_pages - 3;
- $j += ($total_pages - 4) * $per_page;
- }
- else if ($times < $total_pages)
- {
- $pagination .= '<span class="page-sep">' . $user->lang['COMMA_SEPARATOR'] . '</span>';
- }
- $times++;
- }
- }
- else
- {
- $pagination = '';
- }
-
- return $pagination;
-}
-
-/**
* Obtain list of moderators of each forum
*/
function get_moderators(&$forum_moderators, $forum_id = false)
@@ -790,7 +826,7 @@ function gen_forum_auth_level($mode, $forum_id, $forum_status)
($auth->acl_get('f_post', $forum_id) && !$locked) ? $user->lang['RULES_POST_CAN'] : $user->lang['RULES_POST_CANNOT'],
($auth->acl_get('f_reply', $forum_id) && !$locked) ? $user->lang['RULES_REPLY_CAN'] : $user->lang['RULES_REPLY_CANNOT'],
($user->data['is_registered'] && $auth->acl_gets('f_edit', 'm_edit', $forum_id) && !$locked) ? $user->lang['RULES_EDIT_CAN'] : $user->lang['RULES_EDIT_CANNOT'],
- ($user->data['is_registered'] && $auth->acl_gets('f_delete', 'm_delete', $forum_id) && !$locked) ? $user->lang['RULES_DELETE_CAN'] : $user->lang['RULES_DELETE_CANNOT'],
+ ($user->data['is_registered'] && ($auth->acl_gets('f_delete', 'm_delete', $forum_id) || $auth->acl_gets('f_softdelete', 'm_softdelete', $forum_id)) && !$locked) ? $user->lang['RULES_DELETE_CAN'] : $user->lang['RULES_DELETE_CANNOT'],
);
if ($config['allow_attachments'])
@@ -883,20 +919,35 @@ function topic_status(&$topic_row, $replies, $unread_topic, &$folder_img, &$fold
/**
* Assign/Build custom bbcodes for display in screens supporting using of bbcodes
-* The custom bbcodes buttons will be placed within the template block 'custom_codes'
+* The custom bbcodes buttons will be placed within the template block 'custom_tags'
*/
function display_custom_bbcodes()
{
- global $db, $template, $user;
+ global $db, $template, $user, $phpbb_dispatcher;
// Start counting from 22 for the bbcode ids (every bbcode takes two ids - opening/closing)
$num_predefined_bbcodes = 22;
- $sql = 'SELECT bbcode_id, bbcode_tag, bbcode_helpline
- FROM ' . BBCODES_TABLE . '
- WHERE display_on_posting = 1
- ORDER BY bbcode_tag';
- $result = $db->sql_query($sql);
+ $sql_ary = array(
+ 'SELECT' => 'b.bbcode_id, b.bbcode_tag, b.bbcode_helpline',
+ 'FROM' => array(BBCODES_TABLE => 'b'),
+ 'WHERE' => 'b.display_on_posting = 1',
+ 'ORDER_BY' => 'b.bbcode_tag',
+ );
+
+ /**
+ * Event to modify the SQL query before custom bbcode data is queried
+ *
+ * @event core.display_custom_bbcodes_modify_sql
+ * @var array sql_ary The SQL array to get the bbcode data
+ * @var int num_predefined_bbcodes The number of predefined core bbcodes
+ * (multiplied by factor of 2)
+ * @since 3.1.0-a3
+ */
+ $vars = array('sql_ary', 'num_predefined_bbcodes');
+ extract($phpbb_dispatcher->trigger_event('core.display_custom_bbcodes_modify_sql', compact($vars)));
+
+ $result = $db->sql_query($db->sql_build_query('SELECT', $sql_ary));
$i = 0;
while ($row = $db->sql_fetchrow($result))
@@ -907,17 +958,41 @@ function display_custom_bbcodes()
$row['bbcode_helpline'] = $user->lang[strtoupper($row['bbcode_helpline'])];
}
- $template->assign_block_vars('custom_tags', array(
+ $custom_tags = array(
'BBCODE_NAME' => "'[{$row['bbcode_tag']}]', '[/" . str_replace('=', '', $row['bbcode_tag']) . "]'",
'BBCODE_ID' => $num_predefined_bbcodes + ($i * 2),
'BBCODE_TAG' => $row['bbcode_tag'],
+ 'BBCODE_TAG_CLEAN' => str_replace('=', '-', $row['bbcode_tag']),
'BBCODE_HELPLINE' => $row['bbcode_helpline'],
'A_BBCODE_HELPLINE' => str_replace(array('&amp;', '&quot;', "'", '&lt;', '&gt;'), array('&', '"', "\'", '<', '>'), $row['bbcode_helpline']),
- ));
+ );
+
+ /**
+ * Event to modify the template data block of a custom bbcode
+ *
+ * This event is triggered once per bbcode
+ *
+ * @event core.display_custom_bbcodes_modify_row
+ * @var array custom_tags Template data of the bbcode
+ * @var array row The data of the bbcode
+ * @since 3.1-A1
+ */
+ $vars = array('custom_tags', 'row');
+ extract($phpbb_dispatcher->trigger_event('core.display_custom_bbcodes_modify_row', compact($vars)));
+
+ $template->assign_block_vars('custom_tags', $custom_tags);
$i++;
}
$db->sql_freeresult($result);
+
+ /**
+ * Display custom bbcodes
+ *
+ * @event core.display_custom_bbcodes
+ * @since 3.1-A1
+ */
+ $phpbb_dispatcher->dispatch('core.display_custom_bbcodes');
}
/**
@@ -957,7 +1032,7 @@ function display_reasons($reason_id = 0)
function display_user_activity(&$userdata)
{
global $auth, $template, $db, $user;
- global $phpbb_root_path, $phpEx;
+ global $phpbb_root_path, $phpEx, $phpbb_container;
// Do not display user activity for users having more than 5000 posts...
if ($userdata['user_posts'] > 5000)
@@ -967,73 +1042,65 @@ function display_user_activity(&$userdata)
$forum_ary = array();
- // Do not include those forums the user is not having read access to...
- $forum_read_ary = $auth->acl_getf('!f_read');
-
- foreach ($forum_read_ary as $forum_id => $not_allowed)
+ $forum_read_ary = $auth->acl_getf('f_read');
+ foreach ($forum_read_ary as $forum_id => $allowed)
{
- if ($not_allowed['f_read'])
+ if ($allowed['f_read'])
{
$forum_ary[] = (int) $forum_id;
}
}
- $forum_ary = array_unique($forum_ary);
- $forum_sql = (sizeof($forum_ary)) ? 'AND ' . $db->sql_in_set('forum_id', $forum_ary, true) : '';
-
- $fid_m_approve = $auth->acl_getf('m_approve', true);
- $sql_m_approve = (!empty($fid_m_approve)) ? 'OR ' . $db->sql_in_set('forum_id', array_keys($fid_m_approve)) : '';
-
- // Obtain active forum
- $sql = 'SELECT forum_id, COUNT(post_id) AS num_posts
- FROM ' . POSTS_TABLE . '
- WHERE poster_id = ' . $userdata['user_id'] . "
- AND post_postcount = 1
- AND (post_approved = 1
- $sql_m_approve)
- $forum_sql
- GROUP BY forum_id
- ORDER BY num_posts DESC";
- $result = $db->sql_query_limit($sql, 1);
- $active_f_row = $db->sql_fetchrow($result);
- $db->sql_freeresult($result);
+ $forum_ary = array_diff($forum_ary, $user->get_passworded_forums());
- if (!empty($active_f_row))
+ $active_f_row = $active_t_row = array();
+ if (!empty($forum_ary))
{
- $sql = 'SELECT forum_name
- FROM ' . FORUMS_TABLE . '
- WHERE forum_id = ' . $active_f_row['forum_id'];
- $result = $db->sql_query($sql, 3600);
- $active_f_row['forum_name'] = (string) $db->sql_fetchfield('forum_name');
+ $phpbb_content_visibility = $phpbb_container->get('content.visibility');
+
+ // Obtain active forum
+ $sql = 'SELECT forum_id, COUNT(post_id) AS num_posts
+ FROM ' . POSTS_TABLE . '
+ WHERE poster_id = ' . $userdata['user_id'] . '
+ AND post_postcount = 1
+ AND ' . $phpbb_content_visibility->get_forums_visibility_sql('post', $forum_ary) . '
+ GROUP BY forum_id
+ ORDER BY num_posts DESC';
+ $result = $db->sql_query_limit($sql, 1);
+ $active_f_row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
- }
- // Obtain active topic
- // We need to exclude passworded forums here so we do not leak the topic title
- $forum_ary_topic = array_unique(array_merge($forum_ary, $user->get_passworded_forums()));
- $forum_sql_topic = (!empty($forum_ary_topic)) ? 'AND ' . $db->sql_in_set('forum_id', $forum_ary_topic, true) : '';
-
- $sql = 'SELECT topic_id, COUNT(post_id) AS num_posts
- FROM ' . POSTS_TABLE . '
- WHERE poster_id = ' . $userdata['user_id'] . "
- AND post_postcount = 1
- AND (post_approved = 1
- $sql_m_approve)
- $forum_sql_topic
- GROUP BY topic_id
- ORDER BY num_posts DESC";
- $result = $db->sql_query_limit($sql, 1);
- $active_t_row = $db->sql_fetchrow($result);
- $db->sql_freeresult($result);
+ if (!empty($active_f_row))
+ {
+ $sql = 'SELECT forum_name
+ FROM ' . FORUMS_TABLE . '
+ WHERE forum_id = ' . $active_f_row['forum_id'];
+ $result = $db->sql_query($sql, 3600);
+ $active_f_row['forum_name'] = (string) $db->sql_fetchfield('forum_name');
+ $db->sql_freeresult($result);
+ }
- if (!empty($active_t_row))
- {
- $sql = 'SELECT topic_title
- FROM ' . TOPICS_TABLE . '
- WHERE topic_id = ' . $active_t_row['topic_id'];
- $result = $db->sql_query($sql);
- $active_t_row['topic_title'] = (string) $db->sql_fetchfield('topic_title');
+ // Obtain active topic
+ $sql = 'SELECT topic_id, COUNT(post_id) AS num_posts
+ FROM ' . POSTS_TABLE . '
+ WHERE poster_id = ' . $userdata['user_id'] . '
+ AND post_postcount = 1
+ AND ' . $phpbb_content_visibility->get_forums_visibility_sql('post', $forum_ary) . '
+ GROUP BY topic_id
+ ORDER BY num_posts DESC';
+ $result = $db->sql_query_limit($sql, 1);
+ $active_t_row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
+
+ if (!empty($active_t_row))
+ {
+ $sql = 'SELECT topic_title
+ FROM ' . TOPICS_TABLE . '
+ WHERE topic_id = ' . $active_t_row['topic_id'];
+ $result = $db->sql_query($sql);
+ $active_t_row['topic_title'] = (string) $db->sql_fetchfield('topic_title');
+ $db->sql_freeresult($result);
+ }
}
$userdata['active_t_row'] = $active_t_row;
@@ -1061,10 +1128,10 @@ function display_user_activity(&$userdata)
$template->assign_vars(array(
'ACTIVE_FORUM' => $active_f_name,
- 'ACTIVE_FORUM_POSTS' => ($active_f_count == 1) ? sprintf($user->lang['USER_POST'], 1) : sprintf($user->lang['USER_POSTS'], $active_f_count),
+ 'ACTIVE_FORUM_POSTS' => $user->lang('USER_POSTS', (int) $active_f_count),
'ACTIVE_FORUM_PCT' => sprintf($l_active_pct, $active_f_pct),
'ACTIVE_TOPIC' => censor_text($active_t_name),
- 'ACTIVE_TOPIC_POSTS' => ($active_t_count == 1) ? sprintf($user->lang['USER_POST'], 1) : sprintf($user->lang['USER_POSTS'], $active_t_count),
+ 'ACTIVE_TOPIC_POSTS' => $user->lang('USER_POSTS', (int) $active_t_count),
'ACTIVE_TOPIC_PCT' => sprintf($l_active_pct, $active_t_pct),
'U_ACTIVE_FORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $active_f_id),
'U_ACTIVE_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 't=' . $active_t_id),
@@ -1078,6 +1145,7 @@ function display_user_activity(&$userdata)
function watch_topic_forum($mode, &$s_watching, $user_id, $forum_id, $topic_id, $notify_status = 'unset', $start = 0, $item_title = '')
{
global $template, $db, $user, $phpEx, $start, $phpbb_root_path;
+ global $request;
$table_sql = ($mode == 'forum') ? FORUMS_WATCH_TABLE : TOPICS_WATCH_TABLE;
$where_sql = ($mode == 'forum') ? 'forum_id' : 'topic_id';
@@ -1105,7 +1173,6 @@ function watch_topic_forum($mode, &$s_watching, $user_id, $forum_id, $topic_id,
if (!is_null($notify_status) && $notify_status !== '')
{
-
if (isset($_GET['unwatch']))
{
$uid = request_var('uid', 0);
@@ -1113,10 +1180,15 @@ function watch_topic_forum($mode, &$s_watching, $user_id, $forum_id, $topic_id,
if ($token && check_link_hash($token, "{$mode}_$match_id") || confirm_box(true))
{
- if ($uid != $user_id || $_GET['unwatch'] != $mode)
+ if ($uid != $user_id || $request->variable('unwatch', '', false, \phpbb\request\request_interface::GET) != $mode)
{
$redirect_url = append_sid("{$phpbb_root_path}view$mode.$phpEx", "$u_url=$match_id&amp;start=$start");
- $message = $user->lang['ERR_UNWATCHING'] . '<br /><br />' . sprintf($user->lang['RETURN_' . strtoupper($mode)], '<a href="' . $redirect_url . '">', '</a>');
+ $message = $user->lang['ERR_UNWATCHING'];
+
+ if (!$request->is_ajax())
+ {
+ $message .= '<br /><br />' . $user->lang('RETURN_' . strtoupper($mode), '<a href="' . $redirect_url . '">', '</a>');
+ }
trigger_error($message);
}
@@ -1126,8 +1198,12 @@ function watch_topic_forum($mode, &$s_watching, $user_id, $forum_id, $topic_id,
$db->sql_query($sql);
$redirect_url = append_sid("{$phpbb_root_path}view$mode.$phpEx", "$u_url=$match_id&amp;start=$start");
- $message = $user->lang['NOT_WATCHING_' . strtoupper($mode)] . '<br /><br />';
- $message .= sprintf($user->lang['RETURN_' . strtoupper($mode)], '<a href="' . $redirect_url . '">', '</a>');
+ $message = $user->lang['NOT_WATCHING_' . strtoupper($mode)];
+
+ if (!$request->is_ajax())
+ {
+ $message .= '<br /><br />' . $user->lang('RETURN_' . strtoupper($mode), '<a href="' . $redirect_url . '">', '</a>');
+ }
meta_refresh(3, $redirect_url);
trigger_error($message);
}
@@ -1178,10 +1254,15 @@ function watch_topic_forum($mode, &$s_watching, $user_id, $forum_id, $topic_id,
if ($token && check_link_hash($token, "{$mode}_$match_id") || confirm_box(true))
{
- if ($uid != $user_id || $_GET['watch'] != $mode)
+ if ($uid != $user_id || $request->variable('watch', '', false, \phpbb\request\request_interface::GET) != $mode)
{
$redirect_url = append_sid("{$phpbb_root_path}view$mode.$phpEx", "$u_url=$match_id&amp;start=$start");
- $message = $user->lang['ERR_WATCHING'] . '<br /><br />' . sprintf($user->lang['RETURN_' . strtoupper($mode)], '<a href="' . $redirect_url . '">', '</a>');
+ $message = $user->lang['ERR_WATCHING'];
+
+ if (!$request->is_ajax())
+ {
+ $message .= '<br /><br />' . $user->lang('RETURN_' . strtoupper($mode), '<a href="' . $redirect_url . '">', '</a>');
+ }
trigger_error($message);
}
@@ -1192,7 +1273,12 @@ function watch_topic_forum($mode, &$s_watching, $user_id, $forum_id, $topic_id,
$db->sql_query($sql);
$redirect_url = append_sid("{$phpbb_root_path}view$mode.$phpEx", "$u_url=$match_id&amp;start=$start");
- $message = $user->lang['ARE_WATCHING_' . strtoupper($mode)] . '<br /><br />' . sprintf($user->lang['RETURN_' . strtoupper($mode)], '<a href="' . $redirect_url . '">', '</a>');
+ $message = $user->lang['ARE_WATCHING_' . strtoupper($mode)];
+
+ if (!$request->is_ajax())
+ {
+ $message .= '<br /><br />' . $user->lang('RETURN_' . strtoupper($mode), '<a href="' . $redirect_url . '">', '</a>');
+ }
meta_refresh(3, $redirect_url);
trigger_error($message);
}
@@ -1221,7 +1307,8 @@ function watch_topic_forum($mode, &$s_watching, $user_id, $forum_id, $topic_id,
}
else
{
- if ((isset($_GET['unwatch']) && $_GET['unwatch'] == $mode) || (isset($_GET['watch']) && $_GET['watch'] == $mode))
+ if ((isset($_GET['unwatch']) && $request->variable('unwatch', '', false, \phpbb\request\request_interface::GET) == $mode) ||
+ (isset($_GET['watch']) && $request->variable('watch', '', false, \phpbb\request\request_interface::GET) == $mode))
{
login_box();
}
@@ -1235,7 +1322,9 @@ function watch_topic_forum($mode, &$s_watching, $user_id, $forum_id, $topic_id,
if ($can_watch)
{
$s_watching['link'] = append_sid("{$phpbb_root_path}view$mode.$phpEx", "$u_url=$match_id&amp;" . (($is_watching) ? 'unwatch' : 'watch') . "=$mode&amp;start=$start&amp;hash=" . generate_link_hash("{$mode}_$match_id"));
+ $s_watching['link_toggle'] = append_sid("{$phpbb_root_path}view$mode.$phpEx", "$u_url=$match_id&amp;" . ((!$is_watching) ? 'unwatch' : 'watch') . "=$mode&amp;start=$start&amp;hash=" . generate_link_hash("{$mode}_$match_id"));
$s_watching['title'] = $user->lang[(($is_watching) ? 'STOP' : 'START') . '_WATCHING_' . strtoupper($mode)];
+ $s_watching['title_toggle'] = $user->lang[((!$is_watching) ? 'STOP' : 'START') . '_WATCHING_' . strtoupper($mode)];
$s_watching['is_watching'] = $is_watching;
}
@@ -1290,54 +1379,123 @@ function get_user_rank($user_rank, $user_posts, &$rank_title, &$rank_img, &$rank
/**
* 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 array $user_row Row from the users table
+* @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
+*
+* @return string Avatar html
+*/
+function phpbb_get_user_avatar($user_row, $alt = 'USER_AVATAR', $ignore_config = false)
+{
+ $row = \phpbb\avatar\manager::clean_row($user_row, 'user');
+ return phpbb_get_avatar($row, $alt, $ignore_config);
+}
+
+/**
+* Get group avatar
+*
+* @param array $group_row Row from the groups table
+* @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
+*
+* @return string Avatar html
+*/
+function phpbb_get_group_avatar($user_row, $alt = 'GROUP_AVATAR', $ignore_config = false)
+{
+ $row = \phpbb\avatar\manager::clean_row($user_row, 'group');
+ return phpbb_get_avatar($row, $alt, $ignore_config);
+}
+
+/**
+* Get avatar
+*
+* @param array $row Row cleaned by \phpbb\avatar\driver\driver::clean_row
* @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
*
-* @return string Avatar image
+* @return string Avatar html
*/
-function get_user_avatar($avatar, $avatar_type, $avatar_width, $avatar_height, $alt = 'USER_AVATAR', $ignore_config = false)
+function phpbb_get_avatar($row, $alt, $ignore_config = false)
{
- global $user, $config, $phpbb_root_path, $phpEx;
+ global $user, $config, $cache, $phpbb_root_path, $phpEx;
+ global $request;
+ global $phpbb_container;
- if (empty($avatar) || !$avatar_type || (!$config['allow_avatar'] && !$ignore_config))
+ if (!$config['allow_avatar'] && !$ignore_config)
{
return '';
}
- $avatar_img = '';
+ $avatar_data = array(
+ 'src' => $row['avatar'],
+ 'width' => $row['avatar_width'],
+ 'height' => $row['avatar_height'],
+ );
+
+ $phpbb_avatar_manager = $phpbb_container->get('avatar.manager');
+ $driver = $phpbb_avatar_manager->get_driver($row['avatar_type'], $ignore_config);
+ $html = '';
- switch ($avatar_type)
+ if ($driver)
{
- case AVATAR_UPLOAD:
- if (!$config['allow_avatar_upload'] && !$ignore_config)
- {
- return '';
- }
- $avatar_img = $phpbb_root_path . "download/file.$phpEx?avatar=";
- break;
+ $html = $driver->get_custom_html($user, $row, $alt);
+ if (!empty($html))
+ {
+ return $html;
+ }
- case AVATAR_GALLERY:
- if (!$config['allow_avatar_local'] && !$ignore_config)
- {
- return '';
- }
- $avatar_img = $phpbb_root_path . $config['avatar_gallery_path'] . '/';
- break;
+ $avatar_data = $driver->get_data($row, $ignore_config);
+ }
+ else
+ {
+ $avatar_data['src'] = '';
+ }
- case AVATAR_REMOTE:
- if (!$config['allow_avatar_remote'] && !$ignore_config)
- {
- return '';
- }
- break;
+ if (!empty($avatar_data['src']))
+ {
+ $html = '<img src="' . $avatar_data['src'] . '" ' .
+ ($avatar_data['width'] ? ('width="' . $avatar_data['width'] . '" ') : '') .
+ ($avatar_data['height'] ? ('height="' . $avatar_data['height'] . '" ') : '') .
+ 'alt="' . ((!empty($user->lang[$alt])) ? $user->lang[$alt] : $alt) . '" />';
}
- $avatar_img .= $avatar;
- return '<img src="' . (str_replace(' ', '%20', $avatar_img)) . '" width="' . $avatar_width . '" height="' . $avatar_height . '" alt="' . ((!empty($user->lang[$alt])) ? $user->lang[$alt] : $alt) . '" />';
+ return $html;
}
-?> \ No newline at end of file
+/**
+* Generate a list of archive types available for compressing attachments
+*
+* @param string $param_key Either topic_id or post_id
+* @param string $param_val The value of the topic or post id
+* @param string $phpbb_root_path The root path of the phpBB installation
+* @param string $phpEx The PHP extension
+*
+* @return array Array containing the link and the type of compression
+*/
+function phpbb_gen_download_links($param_key, $param_val, $phpbb_root_path, $phpEx)
+{
+ if (!class_exists('compress'))
+ {
+ require $phpbb_root_path . 'includes/functions_compress.' . $phpEx;
+ }
+
+ $methods = compress::methods();
+ // Sort by preferred type.
+ $methods = array_intersect(array('.zip', '.tar.bz2', '.tar.gz', '.tar'), $methods);
+ $links = array();
+
+ foreach ($methods as $method)
+ {
+ $exploded = explode('.', $method);
+ $type = array_pop($exploded);
+ $params = array('archive' => $method);
+ $params[$param_key] = $param_val;
+
+ $links[] = array(
+ 'LINK' => append_sid("{$phpbb_root_path}download/file.$phpEx", $params),
+ 'TYPE' => $type,
+ );
+ }
+
+ return $links;
+}
diff --git a/phpBB/includes/functions_download.php b/phpBB/includes/functions_download.php
new file mode 100644
index 0000000000..c895f7b54b
--- /dev/null
+++ b/phpBB/includes/functions_download.php
@@ -0,0 +1,756 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* A simplified function to deliver avatars
+* The argument needs to be checked before calling this function.
+*/
+function send_avatar_to_browser($file, $browser)
+{
+ global $config, $phpbb_root_path;
+
+ $prefix = $config['avatar_salt'] . '_';
+ $image_dir = $config['avatar_path'];
+
+ // Adjust image_dir path (no trailing slash)
+ if (substr($image_dir, -1, 1) == '/' || substr($image_dir, -1, 1) == '\\')
+ {
+ $image_dir = substr($image_dir, 0, -1) . '/';
+ }
+ $image_dir = str_replace(array('../', '..\\', './', '.\\'), '', $image_dir);
+
+ if ($image_dir && ($image_dir[0] == '/' || $image_dir[0] == '\\'))
+ {
+ $image_dir = '';
+ }
+ $file_path = $phpbb_root_path . $image_dir . '/' . $prefix . $file;
+
+ if ((@file_exists($file_path) && @is_readable($file_path)) && !headers_sent())
+ {
+ header('Pragma: public');
+
+ $image_data = @getimagesize($file_path);
+ header('Content-Type: ' . image_type_to_mime_type($image_data[2]));
+
+ if ((strpos(strtolower($user->browser), 'msie') !== false) && !phpbb_is_greater_ie_version($browser, 7))
+ {
+ header('Content-Disposition: attachment; ' . header_filename($file));
+
+ if (strpos(strtolower($browser), 'msie 6.0') !== false)
+ {
+ header('Expires: -1');
+ }
+ else
+ {
+ header('Expires: ' . gmdate('D, d M Y H:i:s \G\M\T', time() + 31536000));
+ }
+ }
+ else
+ {
+ header('Content-Disposition: inline; ' . header_filename($file));
+ header('Expires: ' . gmdate('D, d M Y H:i:s \G\M\T', time() + 31536000));
+ }
+
+ $size = @filesize($file_path);
+ if ($size)
+ {
+ header("Content-Length: $size");
+ }
+
+ if (@readfile($file_path) == false)
+ {
+ $fp = @fopen($file_path, 'rb');
+
+ if ($fp !== false)
+ {
+ while (!feof($fp))
+ {
+ echo fread($fp, 8192);
+ }
+ fclose($fp);
+ }
+ }
+
+ flush();
+ }
+ else
+ {
+ header('HTTP/1.0 404 Not Found');
+ }
+}
+
+/**
+* Wraps an url into a simple html page. Used to display attachments in IE.
+* this is a workaround for now; might be moved to template system later
+* direct any complaints to 1 Microsoft Way, Redmond
+*/
+function wrap_img_in_html($src, $title)
+{
+ echo '<!DOCTYPE html>';
+ echo '<html>';
+ echo '<head>';
+ echo '<meta charset="utf-8">';
+ echo '<title>' . $title . '</title>';
+ echo '</head>';
+ echo '<body>';
+ echo '<div>';
+ echo '<img src="' . $src . '" alt="' . $title . '" />';
+ echo '</div>';
+ echo '</body>';
+ echo '</html>';
+}
+
+/**
+* Send file to browser
+*/
+function send_file_to_browser($attachment, $upload_dir, $category)
+{
+ global $user, $db, $config, $phpbb_root_path;
+
+ $filename = $phpbb_root_path . $upload_dir . '/' . $attachment['physical_filename'];
+
+ if (!@file_exists($filename))
+ {
+ send_status_line(404, 'Not Found');
+ trigger_error('ERROR_NO_ATTACHMENT');
+ }
+
+ // Correct the mime type - we force application/octetstream for all files, except images
+ // Please do not change this, it is a security precaution
+ if ($category != ATTACHMENT_CATEGORY_IMAGE || strpos($attachment['mimetype'], 'image') !== 0)
+ {
+ $attachment['mimetype'] = (strpos(strtolower($user->browser), 'msie') !== false || strpos(strtolower($user->browser), 'opera') !== false) ? 'application/octetstream' : 'application/octet-stream';
+ }
+
+ if (@ob_get_length())
+ {
+ @ob_end_clean();
+ }
+
+ // Now send the File Contents to the Browser
+ $size = @filesize($filename);
+
+ // To correctly display further errors we need to make sure we are using the correct headers for both (unsetting content-length may not work)
+
+ // Check if headers already sent or not able to get the file contents.
+ if (headers_sent() || !@file_exists($filename) || !@is_readable($filename))
+ {
+ // PHP track_errors setting On?
+ if (!empty($php_errormsg))
+ {
+ send_status_line(500, 'Internal Server Error');
+ trigger_error($user->lang['UNABLE_TO_DELIVER_FILE'] . '<br />' . sprintf($user->lang['TRACKED_PHP_ERROR'], $php_errormsg));
+ }
+
+ send_status_line(500, 'Internal Server Error');
+ trigger_error('UNABLE_TO_DELIVER_FILE');
+ }
+
+ // Make sure the database record for the filesize is correct
+ if ($size > 0 && $size != $attachment['filesize'])
+ {
+ // Update database record
+ $sql = 'UPDATE ' . ATTACHMENTS_TABLE . '
+ SET filesize = ' . (int) $size . '
+ WHERE attach_id = ' . (int) $attachment['attach_id'];
+ $db->sql_query($sql);
+ }
+
+ // Now the tricky part... let's dance
+ header('Pragma: public');
+
+ // Send out the Headers. Do not set Content-Disposition to inline please, it is a security measure for users using the Internet Explorer.
+ header('Content-Type: ' . $attachment['mimetype']);
+
+ if (phpbb_is_greater_ie_version($user->browser, 7))
+ {
+ header('X-Content-Type-Options: nosniff');
+ }
+
+ if ($category == ATTACHMENT_CATEGORY_FLASH && request_var('view', 0) === 1)
+ {
+ // We use content-disposition: inline for flash files and view=1 to let it correctly play with flash player 10 - any other disposition will fail to play inline
+ header('Content-Disposition: inline');
+ }
+ else
+ {
+ if (empty($user->browser) || ((strpos(strtolower($user->browser), 'msie') !== false) && !phpbb_is_greater_ie_version($user->browser, 7)))
+ {
+ header('Content-Disposition: attachment; ' . header_filename(htmlspecialchars_decode($attachment['real_filename'])));
+ if (empty($user->browser) || (strpos(strtolower($user->browser), 'msie 6.0') !== false))
+ {
+ header('expires: -1');
+ }
+ }
+ else
+ {
+ header('Content-Disposition: ' . ((strpos($attachment['mimetype'], 'image') === 0) ? 'inline' : 'attachment') . '; ' . header_filename(htmlspecialchars_decode($attachment['real_filename'])));
+ if (phpbb_is_greater_ie_version($user->browser, 7) && (strpos($attachment['mimetype'], 'image') !== 0))
+ {
+ header('X-Download-Options: noopen');
+ }
+ }
+ }
+
+ if ($size)
+ {
+ header("Content-Length: $size");
+ }
+
+ // Close the db connection before sending the file etc.
+ file_gc(false);
+
+ if (!set_modified_headers($attachment['filetime'], $user->browser))
+ {
+ // We make sure those have to be enabled manually by defining a constant
+ // because of the potential disclosure of full attachment path
+ // in case support for features is absent in the webserver software.
+ if (defined('PHPBB_ENABLE_X_ACCEL_REDIRECT') && PHPBB_ENABLE_X_ACCEL_REDIRECT)
+ {
+ // X-Accel-Redirect - http://wiki.nginx.org/XSendfile
+ header('X-Accel-Redirect: ' . $user->page['root_script_path'] . $upload_dir . '/' . $attachment['physical_filename']);
+ exit;
+ }
+ else if (defined('PHPBB_ENABLE_X_SENDFILE') && PHPBB_ENABLE_X_SENDFILE && !phpbb_http_byte_range($size))
+ {
+ // X-Sendfile - http://blog.lighttpd.net/articles/2006/07/02/x-sendfile
+ // Lighttpd's X-Sendfile does not support range requests as of 1.4.26
+ // and always requires an absolute path.
+ header('X-Sendfile: ' . dirname(__FILE__) . "/../$upload_dir/{$attachment['physical_filename']}");
+ exit;
+ }
+
+ // Try to deliver in chunks
+ @set_time_limit(0);
+
+ $fp = @fopen($filename, 'rb');
+
+ if ($fp !== false)
+ {
+ // Deliver file partially if requested
+ if ($range = phpbb_http_byte_range($size))
+ {
+ fseek($fp, $range['byte_pos_start']);
+
+ send_status_line(206, 'Partial Content');
+ header('Content-Range: bytes ' . $range['byte_pos_start'] . '-' . $range['byte_pos_end'] . '/' . $range['bytes_total']);
+ header('Content-Length: ' . $range['bytes_requested']);
+ }
+
+ while (!feof($fp))
+ {
+ echo fread($fp, 8192);
+ }
+ fclose($fp);
+ }
+ else
+ {
+ @readfile($filename);
+ }
+
+ flush();
+ }
+
+ exit;
+}
+
+/**
+* Get a browser friendly UTF-8 encoded filename
+*/
+function header_filename($file)
+{
+ global $request;
+
+ $user_agent = $request->header('User-Agent');
+
+ // There be dragons here.
+ // Not many follows the RFC...
+ if (strpos($user_agent, 'MSIE') !== false || strpos($user_agent, 'Safari') !== false || strpos($user_agent, 'Konqueror') !== false)
+ {
+ return "filename=" . rawurlencode($file);
+ }
+
+ // follow the RFC for extended filename for the rest
+ return "filename*=UTF-8''" . rawurlencode($file);
+}
+
+/**
+* Check if downloading item is allowed
+*/
+function download_allowed()
+{
+ global $config, $user, $db, $request;
+
+ if (!$config['secure_downloads'])
+ {
+ return true;
+ }
+
+ $url = htmlspecialchars_decode($request->header('Referer'));
+
+ if (!$url)
+ {
+ return ($config['secure_allow_empty_referer']) ? true : false;
+ }
+
+ // Split URL into domain and script part
+ $url = @parse_url($url);
+
+ if ($url === false)
+ {
+ return ($config['secure_allow_empty_referer']) ? true : false;
+ }
+
+ $hostname = $url['host'];
+ unset($url);
+
+ $allowed = ($config['secure_allow_deny']) ? false : true;
+ $iplist = array();
+
+ if (($ip_ary = @gethostbynamel($hostname)) !== false)
+ {
+ foreach ($ip_ary as $ip)
+ {
+ if ($ip)
+ {
+ $iplist[] = $ip;
+ }
+ }
+ }
+
+ // Check for own server...
+ $server_name = $user->host;
+
+ // Forcing server vars is the only way to specify/override the protocol
+ if ($config['force_server_vars'] || !$server_name)
+ {
+ $server_name = $config['server_name'];
+ }
+
+ if (preg_match('#^.*?' . preg_quote($server_name, '#') . '.*?$#i', $hostname))
+ {
+ $allowed = true;
+ }
+
+ // Get IP's and Hostnames
+ if (!$allowed)
+ {
+ $sql = 'SELECT site_ip, site_hostname, ip_exclude
+ FROM ' . SITELIST_TABLE;
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $site_ip = trim($row['site_ip']);
+ $site_hostname = trim($row['site_hostname']);
+
+ if ($site_ip)
+ {
+ foreach ($iplist as $ip)
+ {
+ if (preg_match('#^' . str_replace('\*', '.*?', preg_quote($site_ip, '#')) . '$#i', $ip))
+ {
+ if ($row['ip_exclude'])
+ {
+ $allowed = ($config['secure_allow_deny']) ? false : true;
+ break 2;
+ }
+ else
+ {
+ $allowed = ($config['secure_allow_deny']) ? true : false;
+ }
+ }
+ }
+ }
+
+ if ($site_hostname)
+ {
+ if (preg_match('#^' . str_replace('\*', '.*?', preg_quote($site_hostname, '#')) . '$#i', $hostname))
+ {
+ if ($row['ip_exclude'])
+ {
+ $allowed = ($config['secure_allow_deny']) ? false : true;
+ break;
+ }
+ else
+ {
+ $allowed = ($config['secure_allow_deny']) ? true : false;
+ }
+ }
+ }
+ }
+ $db->sql_freeresult($result);
+ }
+
+ return $allowed;
+}
+
+/**
+* Check if the browser has the file already and set the appropriate headers-
+* @returns false if a resend is in order.
+*/
+function set_modified_headers($stamp, $browser)
+{
+ global $request;
+
+ // let's see if we have to send the file at all
+ $last_load = $request->header('Modified-Since') ? strtotime(trim($request->header('Modified-Since'))) : false;
+
+ if (strpos(strtolower($browser), 'msie 6.0') === false && !phpbb_is_greater_ie_version($browser, 7))
+ {
+ if ($last_load !== false && $last_load >= $stamp)
+ {
+ send_status_line(304, 'Not Modified');
+ // seems that we need those too ... browsers
+ header('Pragma: public');
+ header('Expires: ' . gmdate('D, d M Y H:i:s \G\M\T', time() + 31536000));
+ return true;
+ }
+ else
+ {
+ header('Last-Modified: ' . gmdate('D, d M Y H:i:s', $stamp) . ' GMT');
+ }
+ }
+ return false;
+}
+
+/**
+* Garbage Collection
+*
+* @param bool $exit Whether to die or not.
+*
+* @return null
+*/
+function file_gc($exit = true)
+{
+ global $cache, $db;
+
+ if (!empty($cache))
+ {
+ $cache->unload();
+ }
+
+ $db->sql_close();
+
+ if ($exit)
+ {
+ exit;
+ }
+}
+
+/**
+* HTTP range support (RFC 2616 Section 14.35)
+*
+* Allows browsers to request partial file content
+* in case a download has been interrupted.
+*
+* @param int $filesize the size of the file in bytes we are about to deliver
+*
+* @return mixed false if the whole file has to be delivered
+* associative array on success
+*/
+function phpbb_http_byte_range($filesize)
+{
+ // Only call find_range_request() once.
+ static $request_array;
+
+ if (!$filesize)
+ {
+ return false;
+ }
+
+ if (!isset($request_array))
+ {
+ $request_array = phpbb_find_range_request();
+ }
+
+ return (empty($request_array)) ? false : phpbb_parse_range_request($request_array, $filesize);
+}
+
+/**
+* Searches for HTTP range request in request headers.
+*
+* @return mixed false if no request found
+* array of strings containing the requested ranges otherwise
+* e.g. array(0 => '0-0', 1 => '123-125')
+*/
+function phpbb_find_range_request()
+{
+ global $request;
+
+ $value = $request->header('Range');
+
+ // Make sure range request starts with "bytes="
+ if (strpos($value, 'bytes=') === 0)
+ {
+ // Strip leading 'bytes='
+ // Multiple ranges can be separated by a comma
+ return explode(',', substr($value, 6));
+ }
+
+ return false;
+}
+
+/**
+* Analyses a range request array.
+*
+* A range request can contain multiple ranges,
+* we however only handle the first request and
+* only support requests from a given byte to the end of the file.
+*
+* @param array $request_array array of strings containing the requested ranges
+* @param int $filesize the full size of the file in bytes that has been requested
+*
+* @return mixed false if the whole file has to be delivered
+* associative array on success
+* byte_pos_start the first byte position, can be passed to fseek()
+* byte_pos_end the last byte position
+* bytes_requested the number of bytes requested
+* bytes_total the full size of the file
+*/
+function phpbb_parse_range_request($request_array, $filesize)
+{
+ // Go through all ranges
+ foreach ($request_array as $range_string)
+ {
+ $range = explode('-', trim($range_string));
+
+ // "-" is invalid, "0-0" however is valid and means the very first byte.
+ if (sizeof($range) != 2 || $range[0] === '' && $range[1] === '')
+ {
+ continue;
+ }
+
+ if ($range[0] === '')
+ {
+ // Return last $range[1] bytes.
+
+ if (!$range[1])
+ {
+ continue;
+ }
+
+ if ($range[1] >= $filesize)
+ {
+ return false;
+ }
+
+ $first_byte_pos = $filesize - (int) $range[1];
+ $last_byte_pos = $filesize - 1;
+ }
+ else
+ {
+ // Return bytes from $range[0] to $range[1]
+
+ $first_byte_pos = (int) $range[0];
+ $last_byte_pos = (int) $range[1];
+
+ if ($last_byte_pos && $last_byte_pos < $first_byte_pos)
+ {
+ // The requested range contains 0 bytes.
+ continue;
+ }
+
+ if ($first_byte_pos >= $filesize)
+ {
+ // Requested range not satisfiable
+ return false;
+ }
+
+ // Adjust last-byte-pos if it is absent or greater than the content.
+ if ($range[1] === '' || $last_byte_pos >= $filesize)
+ {
+ $last_byte_pos = $filesize - 1;
+ }
+ }
+
+ // We currently do not support range requests that end before the end of the file
+ if ($last_byte_pos != $filesize - 1)
+ {
+ continue;
+ }
+
+ return array(
+ 'byte_pos_start' => $first_byte_pos,
+ 'byte_pos_end' => $last_byte_pos,
+ 'bytes_requested' => $last_byte_pos - $first_byte_pos + 1,
+ 'bytes_total' => $filesize,
+ );
+ }
+}
+
+/**
+* Increments the download count of all provided attachments
+*
+* @param \phpbb\db\driver\driver $db The database object
+* @param array|int $ids The attach_id of each attachment
+*
+* @return null
+*/
+function phpbb_increment_downloads($db, $ids)
+{
+ if (!is_array($ids))
+ {
+ $ids = array($ids);
+ }
+
+ $sql = 'UPDATE ' . ATTACHMENTS_TABLE . '
+ SET download_count = download_count + 1
+ WHERE ' . $db->sql_in_set('attach_id', $ids);
+ $db->sql_query($sql);
+}
+
+/**
+* Handles authentication when downloading attachments from a post or topic
+*
+* @param \phpbb\db\driver\driver $db The database object
+* @param \phpbb\auth\auth $auth The authentication object
+* @param int $topic_id The id of the topic that we are downloading from
+*
+* @return null
+*/
+function phpbb_download_handle_forum_auth($db, $auth, $topic_id)
+{
+ $sql_array = array(
+ 'SELECT' => 't.topic_visibility, t.forum_id, f.forum_name, f.forum_password, f.parent_id',
+ 'FROM' => array(
+ TOPICS_TABLE => 't',
+ FORUMS_TABLE => 'f',
+ ),
+ 'WHERE' => 't.topic_id = ' . (int) $topic_id . '
+ AND t.forum_id = f.forum_id',
+ );
+
+ $sql = $db->sql_build_query('SELECT', $sql_array);
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if ($row && $row['topic_visibility'] != ITEM_APPROVED && !$auth->acl_get('m_approve', $row['forum_id']))
+ {
+ send_status_line(404, 'Not Found');
+ trigger_error('ERROR_NO_ATTACHMENT');
+ }
+ else if ($row && $auth->acl_get('u_download') && $auth->acl_get('f_download', $row['forum_id']))
+ {
+ if ($row['forum_password'])
+ {
+ // Do something else ... ?
+ login_forum_box($row);
+ }
+ }
+ else
+ {
+ send_status_line(403, 'Forbidden');
+ trigger_error('SORRY_AUTH_VIEW_ATTACH');
+ }
+}
+
+/**
+* Handles authentication when downloading attachments from PMs
+*
+* @param \phpbb\db\driver\driver $db The database object
+* @param \phpbb\auth\auth $auth The authentication object
+* @param int $user_id The user id
+* @param int $msg_id The id of the PM that we are downloading from
+*
+* @return null
+*/
+function phpbb_download_handle_pm_auth($db, $auth, $user_id, $msg_id)
+{
+ if (!$auth->acl_get('u_pm_download'))
+ {
+ send_status_line(403, 'Forbidden');
+ trigger_error('SORRY_AUTH_VIEW_ATTACH');
+ }
+
+ $allowed = phpbb_download_check_pm_auth($db, $user_id, $msg_id);
+
+ if (!$allowed)
+ {
+ send_status_line(403, 'Forbidden');
+ trigger_error('ERROR_NO_ATTACHMENT');
+ }
+}
+
+/**
+* Checks whether a user can download from a particular PM
+*
+* @param \phpbb\db\driver\driver $db The database object
+* @param int $user_id The user id
+* @param int $msg_id The id of the PM that we are downloading from
+*
+* @return bool Whether the user is allowed to download from that PM or not
+*/
+function phpbb_download_check_pm_auth($db, $user_id, $msg_id)
+{
+ // Check if the attachment is within the users scope...
+ $sql = 'SELECT msg_id
+ FROM ' . PRIVMSGS_TO_TABLE . '
+ WHERE msg_id = ' . (int) $msg_id . '
+ AND (
+ user_id = ' . (int) $user_id . '
+ OR author_id = ' . (int) $user_id . '
+ )';
+ $result = $db->sql_query_limit($sql, 1);
+ $allowed = (bool) $db->sql_fetchfield('msg_id');
+ $db->sql_freeresult($result);
+
+ return $allowed;
+}
+
+/**
+* Cleans a filename of any characters that could potentially cause a problem on
+* a user's filesystem.
+*
+* @param string $filename The filename to clean
+*
+* @return string The cleaned filename
+*/
+function phpbb_download_clean_filename($filename)
+{
+ $bad_chars = array("'", "\\", ' ', '/', ':', '*', '?', '"', '<', '>', '|');
+
+ // rawurlencode to convert any potentially 'bad' characters that we missed
+ $filename = rawurlencode(str_replace($bad_chars, '_', $filename));
+
+ // Turn the %xx entities created by rawurlencode to _
+ $filename = preg_replace("/%(\w{2})/", '_', $filename);
+
+ return $filename;
+}
+
+/**
+* Check if the browser is internet explorer version 7+
+*
+* @param string $user_agent User agent HTTP header
+* @param int $version IE version to check against
+*
+* @return bool true if internet explorer version is greater than $version
+*/
+function phpbb_is_greater_ie_version($user_agent, $version)
+{
+ if (preg_match('/msie (\d+)/', strtolower($user_agent), $matches))
+ {
+ $ie_version = (int) $matches[1];
+ return ($ie_version > $version);
+ }
+ else
+ {
+ return false;
+ }
+}
diff --git a/phpBB/includes/functions_install.php b/phpBB/includes/functions_install.php
index 47f4eac627..476535ae5b 100644
--- a/phpBB/includes/functions_install.php
+++ b/phpBB/includes/functions_install.php
@@ -2,9 +2,8 @@
/**
*
* @package install
-* @version $Id$
* @copyright (c) 2006 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -17,27 +16,6 @@ if (!defined('IN_PHPBB'))
}
/**
-* Determine if we are able to load a specified PHP module and do so if possible
-*/
-function can_load_dll($dll)
-{
- // SQLite2 is a tricky thing, from 5.0.0 it requires PDO; if PDO is not loaded we must state that SQLite is unavailable
- // as the installer doesn't understand that the extension has a prerequisite.
- //
- // On top of this sometimes the SQLite extension is compiled for a different version of PDO
- // by some Linux distributions which causes phpBB to bomb out with a blank page.
- //
- // Net result we'll disable automatic inclusion of SQLite support
- //
- // See: r9618 and #56105
- if ($dll == 'sqlite')
- {
- return false;
- }
- return ((@ini_get('enable_dl') || strtolower(@ini_get('enable_dl')) == 'on') && (!@ini_get('safe_mode') || strtolower(@ini_get('safe_mode')) == 'off') && function_exists('dl') && @dl($dll . '.' . PHP_SHLIB_SUFFIX)) ? true : false;
-}
-
-/**
* 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.
*/
@@ -50,8 +28,7 @@ function get_available_dbms($dbms = false, $return_unavailable = false, $only_20
'SCHEMA' => 'firebird',
'MODULE' => 'interbase',
'DELIM' => ';;',
- 'COMMENTS' => 'remove_remarks',
- 'DRIVER' => 'firebird',
+ 'DRIVER' => 'phpbb\db\driver\firebird',
'AVAILABLE' => true,
'2.0.x' => false,
),
@@ -62,8 +39,7 @@ function get_available_dbms($dbms = false, $return_unavailable = false, $only_20
'SCHEMA' => 'mysql_41',
'MODULE' => 'mysqli',
'DELIM' => ';',
- 'COMMENTS' => 'remove_remarks',
- 'DRIVER' => 'mysqli',
+ 'DRIVER' => 'phpbb\db\driver\mysqli',
'AVAILABLE' => true,
'2.0.x' => true,
),
@@ -72,8 +48,7 @@ function get_available_dbms($dbms = false, $return_unavailable = false, $only_20
'SCHEMA' => 'mysql',
'MODULE' => 'mysql',
'DELIM' => ';',
- 'COMMENTS' => 'remove_remarks',
- 'DRIVER' => 'mysql',
+ 'DRIVER' => 'phpbb\db\driver\mysql',
'AVAILABLE' => true,
'2.0.x' => true,
),
@@ -82,8 +57,7 @@ function get_available_dbms($dbms = false, $return_unavailable = false, $only_20
'SCHEMA' => 'mssql',
'MODULE' => 'mssql',
'DELIM' => 'GO',
- 'COMMENTS' => 'remove_comments',
- 'DRIVER' => 'mssql',
+ 'DRIVER' => 'phpbb\db\driver\mssql',
'AVAILABLE' => true,
'2.0.x' => true,
),
@@ -92,8 +66,7 @@ function get_available_dbms($dbms = false, $return_unavailable = false, $only_20
'SCHEMA' => 'mssql',
'MODULE' => 'odbc',
'DELIM' => 'GO',
- 'COMMENTS' => 'remove_comments',
- 'DRIVER' => 'mssql_odbc',
+ 'DRIVER' => 'phpbb\db\driver\mssql_odbc',
'AVAILABLE' => true,
'2.0.x' => true,
),
@@ -102,28 +75,25 @@ function get_available_dbms($dbms = false, $return_unavailable = false, $only_20
'SCHEMA' => 'mssql',
'MODULE' => 'sqlsrv',
'DELIM' => 'GO',
- 'COMMENTS' => 'remove_comments',
- 'DRIVER' => 'mssqlnative',
+ 'DRIVER' => 'phpbb\db\driver\mssqlnative',
'AVAILABLE' => true,
'2.0.x' => false,
- ),
+ ),
'oracle' => array(
'LABEL' => 'Oracle',
'SCHEMA' => 'oracle',
'MODULE' => 'oci8',
'DELIM' => '/',
- 'COMMENTS' => 'remove_comments',
- 'DRIVER' => 'oracle',
+ 'DRIVER' => 'phpbb\db\driver\oracle',
'AVAILABLE' => true,
'2.0.x' => false,
),
'postgres' => array(
- 'LABEL' => 'PostgreSQL 7.x/8.x',
+ 'LABEL' => 'PostgreSQL 8.3+',
'SCHEMA' => 'postgres',
'MODULE' => 'pgsql',
'DELIM' => ';',
- 'COMMENTS' => 'remove_comments',
- 'DRIVER' => 'postgres',
+ 'DRIVER' => 'phpbb\db\driver\postgres',
'AVAILABLE' => true,
'2.0.x' => true,
),
@@ -132,8 +102,7 @@ function get_available_dbms($dbms = false, $return_unavailable = false, $only_20
'SCHEMA' => 'sqlite',
'MODULE' => 'sqlite',
'DELIM' => ';',
- 'COMMENTS' => 'remove_remarks',
- 'DRIVER' => 'sqlite',
+ 'DRIVER' => 'phpbb\db\driver\sqlite',
'AVAILABLE' => true,
'2.0.x' => false,
),
@@ -171,18 +140,15 @@ function get_available_dbms($dbms = false, $return_unavailable = false, $only_20
if (!@extension_loaded($dll))
{
- if (!can_load_dll($dll))
+ if ($return_unavailable)
{
- if ($return_unavailable)
- {
- $available_dbms[$db_name]['AVAILABLE'] = false;
- }
- else
- {
- unset($available_dbms[$db_name]);
- }
- continue;
+ $available_dbms[$db_name]['AVAILABLE'] = false;
+ }
+ else
+ {
+ unset($available_dbms[$db_name]);
}
+ continue;
}
$any_db_support = true;
}
@@ -218,13 +184,7 @@ function dbms_select($default = '', $only_20x_options = false)
*/
function get_tables(&$db)
{
- if (!class_exists('phpbb_db_tools'))
- {
- global $phpbb_root_path, $phpEx;
- require($phpbb_root_path . 'includes/db/db_tools.' . $phpEx);
- }
-
- $db_tools = new phpbb_db_tools($db);
+ $db_tools = new \phpbb\db\tools($db);
return $db_tools->sql_list_tables();
}
@@ -241,26 +201,19 @@ function connect_check_db($error_connect, &$error, $dbms_details, $table_prefix,
$dbms = $dbms_details['DRIVER'];
- if ($load_dbal)
- {
- // Include the DB layer
- include($phpbb_root_path . 'includes/db/' . $dbms . '.' . $phpEx);
- }
-
// Instantiate it and set return on error true
- $sql_db = 'dbal_' . $dbms;
- $db = new $sql_db();
+ $db = new $dbms();
$db->sql_return_on_error(true);
// Check that we actually have a database name before going any further.....
- if ($dbms_details['DRIVER'] != 'sqlite' && $dbms_details['DRIVER'] != 'oracle' && $dbname === '')
+ if ($dbms_details['DRIVER'] != 'phpbb\db\driver\sqlite' && $dbms_details['DRIVER'] != 'phpbb\db\driver\oracle' && $dbname === '')
{
$error[] = $lang['INST_ERR_DB_NO_NAME'];
return false;
}
// Make sure we don't have a daft user who thinks having the SQLite database in the forum directory is a good idea
- if ($dbms_details['DRIVER'] == 'sqlite' && stripos(phpbb_realpath($dbhost), phpbb_realpath('../')) === 0)
+ if ($dbms_details['DRIVER'] == 'phpbb\db\driver\sqlite' && stripos(phpbb_realpath($dbhost), phpbb_realpath('../')) === 0)
{
$error[] = $lang['INST_ERR_DB_FORUM_PATH'];
return false;
@@ -269,8 +222,8 @@ function connect_check_db($error_connect, &$error, $dbms_details, $table_prefix,
// Check the prefix length to ensure that index names are not too long and does not contain invalid characters
switch ($dbms_details['DRIVER'])
{
- case 'mysql':
- case 'mysqli':
+ case 'phpbb\db\driver\mysql':
+ case 'phpbb\db\driver\mysqli':
if (strspn($table_prefix, '-./\\') !== 0)
{
$error[] = $lang['INST_ERR_PREFIX_INVALID'];
@@ -279,22 +232,22 @@ function connect_check_db($error_connect, &$error, $dbms_details, $table_prefix,
// no break;
- case 'postgres':
+ case 'phpbb\db\driver\postgres':
$prefix_length = 36;
break;
- case 'mssql':
- case 'mssql_odbc':
- case 'mssqlnative':
+ case 'phpbb\db\driver\mssql':
+ case 'phpbb\db\driver\mssql_odbc':
+ case 'phpbb\db\driver\mssqlnative':
$prefix_length = 90;
break;
- case 'sqlite':
+ case 'phpbb\db\driver\sqlite':
$prefix_length = 200;
break;
- case 'firebird':
- case 'oracle':
+ case 'phpbb\db\driver\firebird':
+ case 'phpbb\db\driver\oracle':
$prefix_length = 6;
break;
}
@@ -332,21 +285,21 @@ function connect_check_db($error_connect, &$error, $dbms_details, $table_prefix,
// Make sure that the user has selected a sensible DBAL for the DBMS actually installed
switch ($dbms_details['DRIVER'])
{
- case 'mysqli':
+ case 'phpbb\db\driver\mysqli':
if (version_compare(mysqli_get_server_info($db->db_connect_id), '4.1.3', '<'))
{
$error[] = $lang['INST_ERR_DB_NO_MYSQLI'];
}
break;
- case 'sqlite':
+ case 'phpbb\db\driver\sqlite':
if (version_compare(sqlite_libversion(), '2.8.2', '<'))
{
$error[] = $lang['INST_ERR_DB_NO_SQLITE'];
}
break;
- case 'firebird':
+ case 'phpbb\db\driver\firebird':
// check the version of FB, use some hackery if we can't get access to the server info
if ($db->service_handle !== false && function_exists('ibase_server_info'))
{
@@ -427,7 +380,7 @@ function connect_check_db($error_connect, &$error, $dbms_details, $table_prefix,
}
break;
- case 'oracle':
+ case 'phpbb\db\driver\oracle':
if ($unicode_check)
{
$sql = "SELECT *
@@ -449,7 +402,7 @@ function connect_check_db($error_connect, &$error, $dbms_details, $table_prefix,
}
break;
- case 'postgres':
+ case 'phpbb\db\driver\postgres':
if ($unicode_check)
{
$sql = "SHOW server_encoding;";
@@ -475,19 +428,6 @@ function connect_check_db($error_connect, &$error, $dbms_details, $table_prefix,
}
/**
-* Removes comments from schema files
-*
-* @deprecated Use phpbb_remove_comments() instead.
-*/
-function remove_remarks(&$sql)
-{
- // Remove # style comments
- $sql = preg_replace('/\n{2,}/', "\n", preg_replace('/^#.*$/m', "\n", $sql));
-
- // Return by reference
-}
-
-/**
* Removes "/* style" as well as "# style" comments from $input.
*
* @param string $input Input string
@@ -496,17 +436,11 @@ function remove_remarks(&$sql)
*/
function phpbb_remove_comments($input)
{
- if (!function_exists('remove_comments'))
- {
- global $phpbb_root_path, $phpEx;
- require($phpbb_root_path . 'includes/functions_admin.' . $phpEx);
- }
-
- // Remove /* */ comments
- remove_comments($input);
+ // Remove /* */ comments (http://ostermiller.org/findcomment.html)
+ $input = preg_replace('#/\*(.|[\r\n])*?\*/#', "\n", $input);
// Remove # style comments
- remove_remarks($input);
+ $input = preg_replace('/\n{2,}/', "\n", preg_replace('/^#.*$/m', "\n", $input));
return $input;
}
@@ -551,19 +485,16 @@ function adjust_language_keys_callback($matches)
*
* @param array $data Array containing the database connection information
* @param string $dbms The name of the DBAL class to use
-* @param array $load_extensions Array of additional extensions that should be loaded
* @param bool $debug If the debug constants should be enabled by default or not
* @param bool $debug_test If the DEBUG_TEST constant should be added
* NOTE: Only for use within the testing framework
*
* @return string The output to write to the file
*/
-function phpbb_create_config_file_data($data, $dbms, $load_extensions, $debug = false, $debug_test = false)
+function phpbb_create_config_file_data($data, $dbms, $debug = false, $debug_test = false)
{
- $load_extensions = implode(',', $load_extensions);
-
$config_data = "<?php\n";
- $config_data .= "// phpBB 3.0.x auto-generated configuration file\n// Do not change anything in this file!\n";
+ $config_data .= "// phpBB 3.1.x auto-generated configuration file\n// Do not change anything in this file!\n";
$config_data_array = array(
'dbms' => $dbms,
@@ -573,8 +504,10 @@ function phpbb_create_config_file_data($data, $dbms, $load_extensions, $debug =
'dbuser' => $data['dbuser'],
'dbpasswd' => htmlspecialchars_decode($data['dbpasswd']),
'table_prefix' => $data['table_prefix'],
- 'acm_type' => 'file',
- 'load_extensions' => $load_extensions,
+
+ 'phpbb_adm_relative_path' => 'adm/',
+
+ 'acm_type' => 'phpbb\cache\driver\file',
);
foreach ($config_data_array as $key => $value)
@@ -587,12 +520,10 @@ function phpbb_create_config_file_data($data, $dbms, $load_extensions, $debug =
if ($debug)
{
$config_data .= "@define('DEBUG', true);\n";
- $config_data .= "@define('DEBUG_EXTRA', true);\n";
}
else
{
$config_data .= "// @define('DEBUG', true);\n";
- $config_data .= "// @define('DEBUG_EXTRA', true);\n";
}
if ($debug_test)
@@ -603,4 +534,69 @@ function phpbb_create_config_file_data($data, $dbms, $load_extensions, $debug =
return $config_data;
}
-?> \ No newline at end of file
+/**
+* Check whether a file should be ignored on update
+*
+* We ignore new files in some circumstances:
+* 1. The file is a language file, but the language is not installed
+* 2. The file is a style file, but the style is not installed
+* 3. The file is a style language file, but the language is not installed
+*
+* @param string $phpbb_root_path phpBB root path
+* @param string $file File including path from phpbb root
+* @return bool Should we ignore the new file or add it to the board?
+*/
+function phpbb_ignore_new_file_on_update($phpbb_root_path, $file)
+{
+ $ignore_new_file = false;
+
+ // We ignore new files in some circumstances:
+ // 1. The file is a language file, but the language is not installed
+ if (!$ignore_new_file && strpos($file, 'language/') === 0)
+ {
+ list($language_dir, $language_iso) = explode('/', $file);
+ $ignore_new_file = !file_exists($phpbb_root_path . $language_dir . '/' . $language_iso);
+ }
+
+ // 2. The file is a style file, but the style is not installed
+ if (!$ignore_new_file && strpos($file, 'styles/') === 0)
+ {
+ list($styles_dir, $style_name) = explode('/', $file);
+ $ignore_new_file = !file_exists($phpbb_root_path . $styles_dir . '/' . $style_name);
+ }
+
+ // 3. The file is a style language file, but the language is not installed
+ if (!$ignore_new_file && strpos($file, 'styles/') === 0)
+ {
+ $dirs = explode('/', $file);
+ if (sizeof($dirs) >= 5)
+ {
+ list($styles_dir, $style_name, $template_component, $language_iso) = explode('/', $file);
+ if ($template_component == 'theme' && $language_iso !== 'images')
+ {
+ $ignore_new_file = !file_exists($phpbb_root_path . 'language/' . $language_iso);
+ }
+ }
+ }
+
+ return $ignore_new_file;
+}
+
+/**
+* Check whether phpBB is installed.
+*
+* @param string $phpbb_root_path Path to the phpBB board root.
+* @param string $php_ext PHP file extension.
+*
+* @return bool Returns true if phpBB is installed.
+*/
+function phpbb_check_installation_exists($phpbb_root_path, $php_ext)
+{
+ // Try opening config file
+ if (file_exists($phpbb_root_path . 'config.' . $php_ext))
+ {
+ include($phpbb_root_path . 'config.' . $php_ext);
+ }
+
+ return defined('PHPBB_INSTALLED');
+}
diff --git a/phpBB/includes/functions_jabber.php b/phpBB/includes/functions_jabber.php
index 2054124a4e..b260ffad6e 100644
--- a/phpBB/includes/functions_jabber.php
+++ b/phpBB/includes/functions_jabber.php
@@ -2,9 +2,8 @@
/**
*
* @package phpBB3
-* @version $Id$
* @copyright (c) 2007 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -69,7 +68,7 @@ class jabber
}
$this->password = $password;
- $this->use_ssl = ($use_ssl && $this->can_use_ssl()) ? true : false;
+ $this->use_ssl = ($use_ssl && self::can_use_ssl()) ? true : false;
// Change port if we use SSL
if ($this->port == 5222 && $this->use_ssl)
@@ -84,7 +83,7 @@ class jabber
/**
* Able to use the SSL functionality?
*/
- function can_use_ssl()
+ static public function can_use_ssl()
{
// Will not work with PHP >= 5.2.1 or < 5.2.3RC2 until timeout problem with ssl hasn't been fixed (http://bugs.php.net/41236)
return ((version_compare(PHP_VERSION, '5.2.1', '<') || version_compare(PHP_VERSION, '5.2.3RC2', '>=')) && @extension_loaded('openssl')) ? true : false;
@@ -93,7 +92,7 @@ class jabber
/**
* Able to use TLS?
*/
- function can_use_tls()
+ static public function can_use_tls()
{
if (!@extension_loaded('openssl') || !function_exists('stream_socket_enable_crypto') || !function_exists('stream_get_meta_data') || !function_exists('socket_set_blocking') || !function_exists('stream_get_wrappers'))
{
@@ -443,7 +442,7 @@ class jabber
}
// Let's use TLS if SSL is not enabled and we can actually use it
- if (!$this->session['ssl'] && $this->can_use_tls() && $this->can_use_ssl() && isset($xml['stream:features'][0]['#']['starttls']))
+ if (!$this->session['ssl'] && self::can_use_tls() && self::can_use_ssl() && isset($xml['stream:features'][0]['#']['starttls']))
{
$this->add_to_log('Switching to TLS.');
$this->send("<starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>\n");
@@ -869,5 +868,3 @@ class jabber
return $children;
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/functions_messenger.php b/phpBB/includes/functions_messenger.php
index db2dea33e8..907252f6d8 100644
--- a/phpBB/includes/functions_messenger.php
+++ b/phpBB/includes/functions_messenger.php
@@ -2,9 +2,8 @@
/**
*
* @package phpBB3
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -22,14 +21,15 @@ if (!defined('IN_PHPBB'))
*/
class messenger
{
- var $vars, $msg, $extra_headers, $replyto, $from, $subject;
+ var $msg, $extra_headers, $replyto, $from, $subject;
var $addresses = array();
var $mail_priority = MAIL_NORMAL_PRIORITY;
var $use_queue = true;
- var $tpl_obj = NULL;
- var $tpl_msg = array();
+ /** @var \phpbb\template\template */
+ protected $template;
+
var $eol = "\n";
/**
@@ -53,11 +53,29 @@ class messenger
function reset()
{
$this->addresses = $this->extra_headers = array();
- $this->vars = $this->msg = $this->replyto = $this->from = '';
+ $this->msg = $this->replyto = $this->from = '';
$this->mail_priority = MAIL_NORMAL_PRIORITY;
}
/**
+ * Set addresses for to/im as available
+ *
+ * @param array $user User row
+ */
+ function set_addresses($user)
+ {
+ if (isset($user['user_email']) && $user['user_email'])
+ {
+ $this->to($user['user_email'], (isset($user['username']) ? $user['username'] : ''));
+ }
+
+ if (isset($user['user_jabber']) && $user['user_jabber'])
+ {
+ $this->im($user['user_jabber'], (isset($user['username']) ? $user['username'] : ''));
+ }
+ }
+
+ /**
* Sets an email address to send to
*/
function to($address, $realname = '')
@@ -191,7 +209,9 @@ class messenger
*/
function template($template_file, $template_lang = '', $template_path = '')
{
- global $config, $phpbb_root_path, $user;
+ global $config, $phpbb_root_path, $phpEx, $user, $phpbb_extension_manager;
+
+ $this->setup_template();
if (!trim($template_file))
{
@@ -202,42 +222,41 @@ class messenger
{
// fall back to board default language if the user's language is
// missing $template_file. If this does not exist either,
- // $tpl->set_custom_template will do a trigger_error
+ // $this->template->set_filenames will do a trigger_error
$template_lang = basename($config['default_lang']);
}
- // tpl_msg now holds a template object we can use to parse the template file
- if (!isset($this->tpl_msg[$template_lang . $template_file]))
+ if ($template_path)
+ {
+ $template_paths = array(
+ $template_path,
+ );
+ }
+ else
{
- $this->tpl_msg[$template_lang . $template_file] = new template();
- $tpl = &$this->tpl_msg[$template_lang . $template_file];
+ $template_path = (!empty($user->lang_path)) ? $user->lang_path : $phpbb_root_path . 'language/';
+ $template_path .= $template_lang . '/email';
- $fallback_template_path = false;
+ $template_paths = array(
+ $template_path,
+ );
- if (!$template_path)
+ // we can only specify default language fallback when the path is not a custom one for which we
+ // do not know the default language alternative
+ if ($template_lang !== basename($config['default_lang']))
{
- $template_path = (!empty($user->lang_path)) ? $user->lang_path : $phpbb_root_path . 'language/';
- $template_path .= $template_lang . '/email';
+ $fallback_template_path = (!empty($user->lang_path)) ? $user->lang_path : $phpbb_root_path . 'language/';
+ $fallback_template_path .= basename($config['default_lang']) . '/email';
- // we can only specify default language fallback when the path is not a custom one for which we
- // do not know the default language alternative
- if ($template_lang !== basename($config['default_lang']))
- {
- $fallback_template_path = (!empty($user->lang_path)) ? $user->lang_path : $phpbb_root_path . 'language/';
- $fallback_template_path .= basename($config['default_lang']) . '/email';
- }
+ $template_paths[] = $fallback_template_path;
}
-
- $tpl->set_custom_template($template_path, $template_lang . '_email', $fallback_template_path);
-
- $tpl->set_filenames(array(
- 'body' => $template_file . '.txt',
- ));
}
- $this->tpl_obj = &$this->tpl_msg[$template_lang . $template_file];
- $this->vars = &$this->tpl_obj->_rootref;
- $this->tpl_msg = '';
+ $this->set_template_paths($template_lang . '_email', $template_paths);
+
+ $this->template->set_filenames(array(
+ 'body' => $template_file . '.txt',
+ ));
return true;
}
@@ -247,22 +266,16 @@ class messenger
*/
function assign_vars($vars)
{
- if (!is_object($this->tpl_obj))
- {
- return;
- }
+ $this->setup_template();
- $this->tpl_obj->assign_vars($vars);
+ $this->template->assign_vars($vars);
}
function assign_block_vars($blockname, $vars)
{
- if (!is_object($this->tpl_obj))
- {
- return;
- }
+ $this->setup_template();
- $this->tpl_obj->assign_block_vars($blockname, $vars);
+ $this->template->assign_block_vars($blockname, $vars);
}
/**
@@ -273,29 +286,14 @@ class messenger
global $config, $user;
// We add some standard variables we always use, no need to specify them always
- if (!isset($this->vars['U_BOARD']))
- {
- $this->assign_vars(array(
- 'U_BOARD' => generate_board_url(),
- ));
- }
-
- if (!isset($this->vars['EMAIL_SIG']))
- {
- $this->assign_vars(array(
- 'EMAIL_SIG' => str_replace('<br />', "\n", "-- \n" . htmlspecialchars_decode($config['board_email_sig'])),
- ));
- }
-
- if (!isset($this->vars['SITENAME']))
- {
- $this->assign_vars(array(
- 'SITENAME' => htmlspecialchars_decode($config['sitename']),
- ));
- }
+ $this->assign_vars(array(
+ 'U_BOARD' => generate_board_url(),
+ 'EMAIL_SIG' => str_replace('<br />', "\n", "-- \n" . htmlspecialchars_decode($config['board_email_sig'])),
+ 'SITENAME' => htmlspecialchars_decode($config['sitename']),
+ ));
// Parse message through template
- $this->msg = trim($this->tpl_obj->assign_display('body'));
+ $this->msg = trim($this->template->assign_display('body'));
// Because we use \n for newlines in the body message we need to fix line encoding errors for those admins who uploaded email template files in the wrong encoding
$this->msg = str_replace("\r\n", "\n", $this->msg);
@@ -349,7 +347,7 @@ class messenger
*/
function error($type, $msg)
{
- global $user, $phpEx, $phpbb_root_path, $config;
+ global $user, $phpEx, $phpbb_root_path, $config, $request;
// Session doesn't exist, create it
if (!isset($user->session_id) || $user->session_id === '')
@@ -357,7 +355,7 @@ class messenger
$user->session_begin();
}
- $calling_page = (!empty($_SERVER['PHP_SELF'])) ? $_SERVER['PHP_SELF'] : $_ENV['PHP_SELF'];
+ $calling_page = htmlspecialchars_decode($request->server('PHP_SELF'));
$message = '';
switch ($type)
@@ -622,6 +620,31 @@ class messenger
unset($addresses);
return true;
}
+
+ /**
+ * Setup template engine
+ */
+ protected function setup_template()
+ {
+ global $config, $phpbb_path_helper, $user, $phpbb_extension_manager;
+
+ if ($this->template instanceof \phpbb\template\template)
+ {
+ return;
+ }
+
+ $this->template = new \phpbb\template\twig\twig($phpbb_path_helper, $config, $user, new \phpbb\template\context(), $phpbb_extension_manager);
+ }
+
+ /**
+ * Set template paths to load
+ */
+ protected function set_template_paths($path_name, $paths)
+ {
+ $this->setup_template();
+
+ $this->template->set_custom_style($path_name, $paths);
+ }
}
/**
@@ -670,64 +693,6 @@ class queue
}
/**
- * Obtains exclusive lock on queue cache file.
- * Returns resource representing the lock
- */
- function lock()
- {
- // For systems that can't have two processes opening
- // one file for writing simultaneously
- if (file_exists($this->cache_file . '.lock'))
- {
- $mode = 'rb';
- }
- else
- {
- $mode = 'wb';
- }
-
- $lock_fp = @fopen($this->cache_file . '.lock', $mode);
-
- if ($mode == 'wb')
- {
- if (!$lock_fp)
- {
- // Two processes may attempt to create lock file at the same time.
- // Have the losing process try opening the lock file again for reading
- // on the assumption that the winning process created it
- $mode = 'rb';
- $lock_fp = @fopen($this->cache_file . '.lock', $mode);
- }
- else
- {
- // Only need to set mode when the lock file is written
- @chmod($this->cache_file . '.lock', 0666);
- }
- }
-
- if ($lock_fp)
- {
- @flock($lock_fp, LOCK_EX);
- }
-
- return $lock_fp;
- }
-
- /**
- * Releases lock on queue cache file, using resource obtained from lock()
- */
- function unlock($lock_fp)
- {
- // lock() will return null if opening lock file, and thus locking, failed.
- // Accept null values here so that client code does not need to check them
- if ($lock_fp)
- {
- @flock($lock_fp, LOCK_UN);
- fclose($lock_fp);
- }
- }
-
- /**
* Process queue
* Using lock file
*/
@@ -735,7 +700,8 @@ class queue
{
global $db, $config, $phpEx, $phpbb_root_path, $user;
- $lock_fp = $this->lock();
+ $lock = new \phpbb\lock\flock($this->cache_file);
+ $lock->acquire();
// avoid races, check file existence once
$have_cache_file = file_exists($this->cache_file);
@@ -746,7 +712,7 @@ class queue
set_config('last_queue_run', time(), true);
}
- $this->unlock($lock_fp);
+ $lock->release();
return;
}
@@ -802,20 +768,22 @@ class queue
if (!$this->jabber->connect())
{
- messenger::error('JABBER', $user->lang['ERR_JAB_CONNECT']);
+ $messenger = new messenger();
+ $messenger->error('JABBER', $user->lang['ERR_JAB_CONNECT']);
continue 2;
}
if (!$this->jabber->login())
{
- messenger::error('JABBER', $user->lang['ERR_JAB_AUTH']);
+ $messenger = new messenger();
+ $messenger->error('JABBER', $user->lang['ERR_JAB_AUTH']);
continue 2;
}
break;
default:
- $this->unlock($lock_fp);
+ $lock->release();
return;
}
@@ -841,7 +809,8 @@ class queue
if (!$result)
{
- messenger::error('EMAIL', $err_msg);
+ $messenger = new messenger();
+ $messenger->error('EMAIL', $err_msg);
continue 2;
}
break;
@@ -851,7 +820,8 @@ class queue
{
if ($this->jabber->send_message($address, $msg, $subject) === false)
{
- messenger::error('JABBER', $this->jabber->get_log());
+ $messenger = new messenger();
+ $messenger->error('JABBER', $this->jabber->get_log());
continue 3;
}
}
@@ -891,7 +861,7 @@ class queue
}
}
- $this->unlock($lock_fp);
+ $lock->release();
}
/**
@@ -904,7 +874,8 @@ class queue
return;
}
- $lock_fp = $this->lock();
+ $lock = new \phpbb\lock\flock($this->cache_file);
+ $lock->acquire();
if (file_exists($this->cache_file))
{
@@ -931,7 +902,7 @@ class queue
phpbb_chmod($this->cache_file, CHMOD_READ | CHMOD_WRITE);
}
- $this->unlock($lock_fp);
+ $lock->release();
}
}
@@ -1020,12 +991,12 @@ function smtpmail($addresses, $subject, $message, &$err_msg, $headers = false)
$smtp->add_backtrace('Connecting to ' . $config['smtp_host'] . ':' . $config['smtp_port']);
// Ok we have error checked as much as we can to this point let's get on it already.
- if (!class_exists('phpbb_error_collector'))
+ if (!class_exists('\phpbb\error_collector'))
{
global $phpbb_root_path, $phpEx;
include($phpbb_root_path . 'includes/error_collector.' . $phpEx);
}
- $collector = new phpbb_error_collector;
+ $collector = new \phpbb\error_collector;
$collector->install();
$smtp->socket = fsockopen($config['smtp_host'], $config['smtp_port'], $errno, $errstr, 20);
$collector->uninstall();
@@ -1164,6 +1135,7 @@ class smtp_class
{
var $server_response = '';
var $socket = 0;
+ protected $socket_tls = false;
var $responses = array();
var $commands = array();
var $numeric_response_code = 0;
@@ -1314,30 +1286,29 @@ class smtp_class
}
}
- // Try EHLO first
- $this->server_send("EHLO {$local_host}");
- if ($err_msg = $this->server_parse('250', __LINE__))
+ $hello_result = $this->hello($local_host);
+ if (!is_null($hello_result))
{
- // a 503 response code means that we're already authenticated
- if ($this->numeric_response_code == 503)
- {
- return false;
- }
-
- // If EHLO fails, we try HELO
- $this->server_send("HELO {$local_host}");
- if ($err_msg = $this->server_parse('250', __LINE__))
- {
- return ($this->numeric_response_code == 503) ? false : $err_msg;
- }
+ return $hello_result;
}
- foreach ($this->responses as $response)
+ // SMTP STARTTLS (RFC 3207)
+ if (!$this->socket_tls)
{
- $response = explode(' ', $response);
- $response_code = $response[0];
- unset($response[0]);
- $this->commands[$response_code] = implode(' ', $response);
+ $this->socket_tls = $this->starttls();
+
+ if ($this->socket_tls)
+ {
+ // Switched to TLS
+ // RFC 3207: "The client MUST discard any knowledge obtained from the server, [...]"
+ // So say hello again
+ $hello_result = $this->hello($local_host);
+
+ if (!is_null($hello_result))
+ {
+ return $hello_result;
+ }
+ }
}
// If we are not authenticated yet, something might be wrong if no username and passwd passed
@@ -1384,6 +1355,79 @@ class smtp_class
}
/**
+ * SMTP EHLO/HELO
+ *
+ * @return mixed Null if the authentication process is supposed to continue
+ * False if already authenticated
+ * Error message (string) otherwise
+ */
+ protected function hello($hostname)
+ {
+ // Try EHLO first
+ $this->server_send("EHLO $hostname");
+ if ($err_msg = $this->server_parse('250', __LINE__))
+ {
+ // a 503 response code means that we're already authenticated
+ if ($this->numeric_response_code == 503)
+ {
+ return false;
+ }
+
+ // If EHLO fails, we try HELO
+ $this->server_send("HELO $hostname");
+ if ($err_msg = $this->server_parse('250', __LINE__))
+ {
+ return ($this->numeric_response_code == 503) ? false : $err_msg;
+ }
+ }
+
+ foreach ($this->responses as $response)
+ {
+ $response = explode(' ', $response);
+ $response_code = $response[0];
+ unset($response[0]);
+ $this->commands[$response_code] = implode(' ', $response);
+ }
+ }
+
+ /**
+ * SMTP STARTTLS (RFC 3207)
+ *
+ * @return bool Returns true if TLS was started
+ * Otherwise false
+ */
+ protected function starttls()
+ {
+ if (!function_exists('stream_socket_enable_crypto'))
+ {
+ return false;
+ }
+
+ if (!isset($this->commands['STARTTLS']))
+ {
+ return false;
+ }
+
+ $this->server_send('STARTTLS');
+
+ if ($err_msg = $this->server_parse('220', __LINE__))
+ {
+ return false;
+ }
+
+ $result = false;
+ $stream_meta = stream_get_meta_data($this->socket);
+
+ if (socket_set_blocking($this->socket, 1))
+ {
+ $result = stream_socket_enable_crypto($this->socket, true, STREAM_CRYPTO_METHOD_TLS_CLIENT);
+ socket_set_blocking($this->socket, (int) $stream_meta['blocked']);
+ }
+
+ return $result;
+ }
+
+ /**
* Pop before smtp authentication
*/
function pop_before_smtp($hostname, $username, $password)
@@ -1666,12 +1710,12 @@ function phpbb_mail($to, $subject, $msg, $headers, $eol, &$err_msg)
// Reference: http://bugs.php.net/bug.php?id=15841
$headers = implode($eol, $headers);
- if (!class_exists('phpbb_error_collector'))
+ if (!class_exists('\phpbb\error_collector'))
{
include($phpbb_root_path . 'includes/error_collector.' . $phpEx);
}
- $collector = new phpbb_error_collector;
+ $collector = new \phpbb\error_collector;
$collector->install();
// On some PHP Versions mail() *may* fail if there are newlines within the subject.
@@ -1684,5 +1728,3 @@ function phpbb_mail($to, $subject, $msg, $headers, $eol, &$err_msg)
return $result;
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/functions_module.php b/phpBB/includes/functions_module.php
index 0cc2425b28..ef2e009a6e 100644
--- a/phpBB/includes/functions_module.php
+++ b/phpBB/includes/functions_module.php
@@ -2,9 +2,8 @@
/**
*
* @package phpBB3
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -126,10 +125,19 @@ class p_master
// Clean up module cache array to only let survive modules the user can access
$right_id = false;
+
+ $hide_categories = array();
foreach ($this->module_cache['modules'] as $key => $row)
{
+ // When the module has no mode (category) we check whether it has visible children
+ // before listing it as well.
+ if (!$row['module_mode'])
+ {
+ $hide_categories[(int) $row['module_id']] = $key;
+ }
+
// Not allowed to view module?
- if (!$this->module_auth($row['module_auth']))
+ if (!$this->module_auth_self($row['module_auth']))
{
unset($this->module_cache['modules'][$key]);
continue;
@@ -162,6 +170,22 @@ class p_master
$right_id = $row['right_id'];
continue;
}
+
+ if ($row['module_mode'])
+ {
+ // The parent category has a visible child
+ // So remove it and all its parents from the hide array
+ unset($hide_categories[(int) $row['parent_id']]);
+ foreach ($this->module_cache['parents'][$row['module_id']] as $module_id => $row_id)
+ {
+ unset($hide_categories[$module_id]);
+ }
+ }
+ }
+
+ foreach ($hide_categories as $module_id => $row_id)
+ {
+ unset($this->module_cache['modules'][$row_id]);
}
// Re-index (this is needed, else we are not able to array_slice later)
@@ -221,13 +245,15 @@ class p_master
// We need to prefix the functions to not create a naming conflict
// Function for building 'url_extra'
- $url_func = '_module_' . $row['module_basename'] . '_url';
+ $short_name = $this->get_short_name($row['module_basename']);
+
+ $url_func = '_module_' . $short_name . '_url';
// Function for building the language name
- $lang_func = '_module_' . $row['module_basename'] . '_lang';
+ $lang_func = '_module_' . $short_name . '_lang';
// Custom function for calling parameters on module init (for example assigning template variables)
- $custom_func = '_module_' . $row['module_basename'];
+ $custom_func = '_module_' . $short_name;
$names[$row['module_basename'] . '_' . $row['module_mode']][] = true;
@@ -275,6 +301,11 @@ class p_master
*/
function loaded($module_basename, $module_mode = false)
{
+ if (!$this->is_full_class($module_basename))
+ {
+ $module_basename = $this->p_class . '_' . $module_basename;
+ }
+
if (empty($this->loaded_cache))
{
$this->loaded_cache = array();
@@ -309,11 +340,26 @@ class p_master
}
/**
- * Check module authorisation
+ * Check module authorisation.
+ *
+ * This is a non-static version that uses $this->acl_forum_id
+ * for the forum id.
*/
- function module_auth($module_auth, $forum_id = false)
+ function module_auth_self($module_auth)
+ {
+ return self::module_auth($module_auth, $this->acl_forum_id);
+ }
+
+ /**
+ * Check module authorisation.
+ *
+ * This is a static version, it must be given $forum_id.
+ * See also module_auth_self.
+ */
+ static function module_auth($module_auth, $forum_id)
{
global $auth, $config;
+ global $request, $phpbb_extension_manager, $phpbb_dispatcher;
$module_auth = trim($module_auth);
@@ -330,6 +376,30 @@ class p_master
[(),] |
[^\s(),]+)/x', $module_auth, $match);
+ // Valid tokens for auth and their replacements
+ $valid_tokens = array(
+ 'acl_([a-z0-9_]+)(,\$id)?' => '(int) $auth->acl_get(\'\\1\'\\2)',
+ '\$id' => '(int) $forum_id',
+ 'aclf_([a-z0-9_]+)' => '(int) $auth->acl_getf_global(\'\\1\')',
+ 'cfg_([a-z0-9_]+)' => '(int) $config[\'\\1\']',
+ 'request_([a-zA-Z0-9_]+)' => '$request->variable(\'\\1\', false)',
+ 'ext_([a-zA-Z0-9_/]+)' => 'array_key_exists(\'\\1\', $phpbb_extension_manager->all_enabled())',
+ );
+
+ /**
+ * Alter tokens for module authorisation check
+ *
+ * @event core.module_auth
+ * @var array valid_tokens Valid tokens and their auth check
+ * replacements
+ * @var string module_auth The module_auth of the current
+ * module
+ * @var int forum_id The current forum_id
+ * @since 3.1-A3
+ */
+ $vars = array('valid_tokens', 'module_auth', 'forum_id');
+ extract($phpbb_dispatcher->trigger_event('core.module_auth', compact($vars)));
+
$tokens = $match[0];
for ($i = 0, $size = sizeof($tokens); $i < $size; $i++)
{
@@ -345,7 +415,7 @@ class p_master
break;
default:
- if (!preg_match('#(?:acl_([a-z0-9_]+)(,\$id)?)|(?:\$id)|(?:aclf_([a-z0-9_]+))|(?:cfg_([a-z0-9_]+))|(?:request_([a-zA-Z0-9_]+))#', $token))
+ if (!preg_match('#(?:' . implode(array_keys($valid_tokens), ')|(?:') . ')#', $token))
{
$token = '';
}
@@ -355,13 +425,20 @@ class p_master
$module_auth = implode(' ', $tokens);
- // Make sure $id seperation is working fine
+ // Make sure $id separation is working fine
$module_auth = str_replace(' , ', ',', $module_auth);
- $forum_id = ($forum_id === false) ? $this->acl_forum_id : $forum_id;
+ $module_auth = preg_replace(
+ // Array keys with # prepended/appended
+ array_map(function($value) {
+ return '#' . $value . '#';
+ }, array_keys($valid_tokens)),
+ array_values($valid_tokens),
+ $module_auth
+ );
$is_auth = false;
- eval('$is_auth = (int) (' . preg_replace(array('#acl_([a-z0-9_]+)(,\$id)?#', '#\$id#', '#aclf_([a-z0-9_]+)#', '#cfg_([a-z0-9_]+)#', '#request_([a-zA-Z0-9_]+)#'), array('(int) $auth->acl_get(\'\\1\'\\2)', '(int) $forum_id', '(int) $auth->acl_getf_global(\'\\1\')', '(int) $config[\'\\1\']', '!empty($_REQUEST[\'\\1\'])'), $module_auth) . ');');
+ eval('$is_auth = (int) (' . $module_auth . ');');
return $is_auth;
}
@@ -380,6 +457,11 @@ class p_master
$id = request_var('icat', '');
}
+ if ($id && !is_numeric($id) && !$this->is_full_class($id))
+ {
+ $id = $this->p_class . '_' . $id;
+ }
+
$category = false;
foreach ($this->module_ary as $row_id => $item_ary)
{
@@ -388,9 +470,9 @@ class p_master
// If this is a module and no mode selected, select first mode
// If no category or module selected, go active for first module in first category
if (
- (($item_ary['name'] === $id || $item_ary['id'] === (int) $id) && (($item_ary['mode'] == $mode && !$item_ary['cat']) || ($icat && $item_ary['cat']))) ||
+ (($item_ary['name'] === $id || $item_ary['name'] === $this->p_class . '_' . $id || $item_ary['id'] === (int) $id) && (($item_ary['mode'] == $mode && !$item_ary['cat']) || ($icat && $item_ary['cat']))) ||
($item_ary['parent'] === $category && !$item_ary['cat'] && !$icat && $item_ary['display']) ||
- (($item_ary['name'] === $id || $item_ary['id'] === (int) $id) && !$mode && !$item_ary['cat']) ||
+ (($item_ary['name'] === $id || $item_ary['name'] === $this->p_class . '_' . $id || $item_ary['id'] === (int) $id) && !$mode && !$item_ary['cat']) ||
(!$id && !$mode && !$item_ary['cat'] && $item_ary['display'])
)
{
@@ -426,10 +508,12 @@ class p_master
* Loads currently active module
*
* This method loads a given module, passing it the relevant id and mode.
+ *
+ * @param string $mode mode, as passed through to the module
*/
function load_active($mode = false, $module_url = false, $execute_module = true)
{
- global $phpbb_root_path, $phpbb_admin_path, $phpEx, $user;
+ global $phpbb_root_path, $phpbb_admin_path, $phpEx, $user, $template;
$module_path = $this->include_path . $this->p_class;
$icat = request_var('icat', '');
@@ -439,75 +523,110 @@ class p_master
trigger_error('MODULE_NOT_ACCESS', E_USER_ERROR);
}
- if (!class_exists("{$this->p_class}_$this->p_name"))
+ // new modules use the full class names, old ones are always called <type>_<name>, e.g. acp_board
+ if (!class_exists($this->p_name))
{
- if (!file_exists("$module_path/{$this->p_class}_$this->p_name.$phpEx"))
+ if (!file_exists("$module_path/{$this->p_name}.$phpEx"))
{
- trigger_error($user->lang('MODULE_NOT_FIND', "$module_path/{$this->p_class}_$this->p_name.$phpEx"), E_USER_ERROR);
+ trigger_error($user->lang('MODULE_NOT_FIND', "$module_path/{$this->p_name}.$phpEx"), E_USER_ERROR);
}
- include("$module_path/{$this->p_class}_$this->p_name.$phpEx");
+ include("$module_path/{$this->p_name}.$phpEx");
- if (!class_exists("{$this->p_class}_$this->p_name"))
+ if (!class_exists($this->p_name))
{
- trigger_error($user->lang('MODULE_FILE_INCORRECT_CLASS', "$module_path/{$this->p_class}_$this->p_name.$phpEx", "{$this->p_class}_$this->p_name"), E_USER_ERROR);
+ trigger_error($user->lang('MODULE_FILE_INCORRECT_CLASS', "$module_path/{$this->p_name}.$phpEx", $this->p_name), E_USER_ERROR);
}
+ }
- if (!empty($mode))
- {
- $this->p_mode = $mode;
- }
+ if (!empty($mode))
+ {
+ $this->p_mode = $mode;
+ }
- // Create a new instance of the desired module ... if it has a
- // constructor it will of course be executed
- $instance = "{$this->p_class}_$this->p_name";
+ // Create a new instance of the desired module ...
+ $class_name = $this->p_name;
- $this->module = new $instance($this);
+ $this->module = new $class_name($this);
- // We pre-define the action parameter we are using all over the place
- if (defined('IN_ADMIN'))
+ // We pre-define the action parameter we are using all over the place
+ if (defined('IN_ADMIN'))
+ {
+ /*
+ * If this is an extension module, we'll try to automatically set
+ * the style paths for the extension (the ext author can change them
+ * if necessary).
+ */
+ $module_dir = explode('\\', get_class($this->module));
+
+ // 0 vendor, 1 extension name, ...
+ if (isset($module_dir[1]))
{
- // Is first module automatically enabled a duplicate and the category not passed yet?
- if (!$icat && $this->module_ary[$this->active_module_row_id]['is_duplicate'])
+ $module_style_dir = $phpbb_root_path . 'ext/' . $module_dir[0] . '/' . $module_dir[1] . '/adm/style';
+
+ if (is_dir($module_style_dir))
{
- $icat = $this->module_ary[$this->active_module_row_id]['parent'];
+ $template->set_custom_style('adm', array($module_style_dir, $phpbb_admin_path . 'style'));
}
+ }
- // Not being able to overwrite ;)
- $this->module->u_action = append_sid("{$phpbb_admin_path}index.$phpEx", "i={$this->p_name}") . (($icat) ? '&amp;icat=' . $icat : '') . "&amp;mode={$this->p_mode}";
+ // Is first module automatically enabled a duplicate and the category not passed yet?
+ if (!$icat && $this->module_ary[$this->active_module_row_id]['is_duplicate'])
+ {
+ $icat = $this->module_ary[$this->active_module_row_id]['parent'];
}
- else
+
+ // Not being able to overwrite ;)
+ $this->module->u_action = append_sid("{$phpbb_admin_path}index.$phpEx", 'i=' . $this->get_module_identifier($this->p_name, $this->p_id)) . (($icat) ? '&amp;icat=' . $icat : '') . "&amp;mode={$this->p_mode}";
+ }
+ else
+ {
+ /*
+ * If this is an extension module, we'll try to automatically set
+ * the style paths for the extension (the ext author can change them
+ * if necessary).
+ */
+ $module_dir = explode('\\', get_class($this->module));
+
+ // 0 vendor, 1 extension name, ...
+ if (isset($module_dir[1]))
{
- // If user specified the module url we will use it...
- if ($module_url !== false)
- {
- $this->module->u_action = $module_url;
- }
- else
+ $module_style_dir = 'ext/' . $module_dir[0] . '/' . $module_dir[1] . '/styles';
+
+ if (is_dir($phpbb_root_path . $module_style_dir))
{
- $this->module->u_action = $phpbb_root_path . (($user->page['page_dir']) ? $user->page['page_dir'] . '/' : '') . $user->page['page_name'];
+ $template->set_style(array($module_style_dir, 'styles'));
}
-
- $this->module->u_action = append_sid($this->module->u_action, "i={$this->p_name}") . (($icat) ? '&amp;icat=' . $icat : '') . "&amp;mode={$this->p_mode}";
}
- // Add url_extra parameter to u_action url
- if (!empty($this->module_ary) && $this->active_module !== false && $this->module_ary[$this->active_module_row_id]['url_extra'])
+ // If user specified the module url we will use it...
+ if ($module_url !== false)
{
- $this->module->u_action .= $this->module_ary[$this->active_module_row_id]['url_extra'];
+ $this->module->u_action = $module_url;
}
-
- // Assign the module path for re-usage
- $this->module->module_path = $module_path . '/';
-
- // Execute the main method for the new instance, we send the module id and mode as parameters
- // Users are able to call the main method after this function to be able to assign additional parameters manually
- if ($execute_module)
+ else
{
- $this->module->main($this->p_name, $this->p_mode);
+ $this->module->u_action = $phpbb_root_path . (($user->page['page_dir']) ? $user->page['page_dir'] . '/' : '') . $user->page['page_name'];
}
- return;
+ $this->module->u_action = append_sid($this->module->u_action, 'i=' . $this->get_module_identifier($this->p_name, $this->p_id)) . (($icat) ? '&amp;icat=' . $icat : '') . "&amp;mode={$this->p_mode}";
+ }
+
+ // Add url_extra parameter to u_action url
+ if (!empty($this->module_ary) && $this->active_module !== false && $this->module_ary[$this->active_module_row_id]['url_extra'])
+ {
+ $this->module->u_action .= $this->module_ary[$this->active_module_row_id]['url_extra'];
+ }
+
+ // Assign the module path for re-usage
+ $this->module->module_path = $module_path . '/';
+
+ // Execute the main method for the new instance, we send the module id and mode as parameters
+ // Users are able to call the main method after this function to be able to assign additional parameters manually
+ if ($execute_module)
+ {
+ $short_name = preg_replace("#^{$this->p_class}_#", '', $this->p_name);
+ $this->module->main($short_name, $this->p_mode);
}
}
@@ -546,7 +665,7 @@ class p_master
// If we find a name by this id and being enabled we have our active one...
foreach ($this->module_ary as $row_id => $item_ary)
{
- if (($item_ary['name'] === $id || $item_ary['id'] === (int) $id) && $item_ary['display'])
+ if (($item_ary['name'] === $id || $item_ary['id'] === (int) $id) && $item_ary['display'] || $item_ary['name'] === $this->p_class . '_' . $id)
{
if ($mode === false || $mode === $item_ary['mode'])
{
@@ -734,7 +853,26 @@ class p_master
}
}
- $u_title = $module_url . $delim . 'i=' . (($item_ary['cat']) ? $item_ary['id'] : $item_ary['name'] . (($item_ary['is_duplicate']) ? '&amp;icat=' . $current_id : '') . '&amp;mode=' . $item_ary['mode']);
+ $u_title = $module_url . $delim . 'i=';
+ // if the item has a name use it, else use its id
+ if (empty($item_ary['name']))
+ {
+ $u_title .= $item_ary['id'];
+ }
+ else
+ {
+ // if the category has a name, then use it.
+ $u_title .= $this->get_module_identifier($item_ary['name'], $item_ary['id']);
+ }
+ // If the item is not a category append the mode
+ if (!$item_ary['cat'])
+ {
+ if ($item_ary['is_duplicate'])
+ {
+ $u_title .= '&amp;icat=' . $current_id;
+ }
+ $u_title .= '&amp;mode=' . $item_ary['mode'];
+ }
// Was not allowed in categories before - /*!$item_ary['cat'] && */
$u_title .= (isset($item_ary['url_extra'])) ? $item_ary['url_extra'] : '';
@@ -790,9 +928,22 @@ class p_master
/**
* Load module as the current active one without the need for registering it
+ *
+ * @param string $class module class (acp/mcp/ucp)
+ * @param string $name module name (class name of the module, or its basename
+ * phpbb_ext_foo_acp_bar_module, ucp_zebra or zebra)
+ * @param string $mode mode, as passed through to the module
+ *
*/
function load($class, $name, $mode = false)
{
+ // new modules use the full class names, old ones are always called <class>_<name>, e.g. acp_board
+ // in the latter case this function may be called as load('acp', 'board')
+ if (!class_exists($name) && substr($name, 0, strlen($class) + 1) !== $class . '_')
+ {
+ $name = $class . '_' . $name;
+ }
+
$this->p_class = $class;
$this->p_name = $name;
@@ -805,7 +956,7 @@ class p_master
/**
* Display module
*/
- function display($page_title, $display_online_list = true)
+ function display($page_title, $display_online_list = false)
{
global $template, $user;
@@ -840,7 +991,7 @@ class p_master
{
foreach ($this->module_ary as $row_id => $item_ary)
{
- if (($item_ary['name'] === $id || $item_ary['id'] === (int) $id) && (!$mode || $item_ary['mode'] === $mode))
+ if (($item_ary['name'] === $id || $item_ary['name'] === $this->p_class . '_' . $id || $item_ary['id'] === (int) $id) && (!$mode || $item_ary['mode'] === $mode))
{
$this->module_ary[$row_id]['display'] = (int) $display;
}
@@ -854,30 +1005,72 @@ class p_master
{
global $user, $phpEx;
- if (file_exists($user->lang_path . $user->lang_name . '/mods'))
+ global $phpbb_extension_manager;
+
+ $finder = $phpbb_extension_manager->get_finder();
+
+ $lang_files = $finder
+ ->prefix('info_' . strtolower($module_class) . '_')
+ ->suffix(".$phpEx")
+ ->extension_directory('/language/' . $user->lang_name)
+ ->core_path('language/' . $user->lang_name . '/mods/')
+ ->find();
+
+ foreach ($lang_files as $lang_file => $ext_name)
{
- $add_files = array();
+ $user->add_lang_ext($ext_name, $lang_file);
+ }
+ }
- $dir = @opendir($user->lang_path . $user->lang_name . '/mods');
+ /**
+ * Retrieve shortened module basename for legacy basenames (with xcp_ prefix)
+ *
+ * @param string $basename A module basename
+ * @return string The basename if it starts with phpbb_ or the basename with
+ * the current p_class (e.g. acp_) stripped.
+ */
+ protected function get_short_name($basename)
+ {
+ if (substr($basename, 0, 6) === 'phpbb\\' || strpos($basename, '\\') !== false)
+ {
+ return $basename;
+ }
- if ($dir)
- {
- while (($entry = readdir($dir)) !== false)
- {
- if (strpos($entry, 'info_' . strtolower($module_class) . '_') === 0 && substr(strrchr($entry, '.'), 1) == $phpEx)
- {
- $add_files[] = 'mods/' . substr(basename($entry), 0, -(strlen($phpEx) + 1));
- }
- }
- closedir($dir);
- }
+ // strip xcp_ prefix from old classes
+ return substr($basename, strlen($this->p_class) + 1);
+ }
- if (sizeof($add_files))
- {
- $user->add_lang($add_files);
- }
+ /**
+ * If the basename contains a \ we dont use that for the URL.
+ *
+ * Firefox is currently unable to correctly copy a urlencoded \
+ * so users will be unable to post links to modules.
+ * However we can still fallback to the id instead of the name,
+ * so we do that in this case.
+ *
+ * @param string $basename Basename of the module
+ * @param int $id Id of the module
+ * @return mixed Identifier that should be used for
+ * module link creation
+ */
+ protected function get_module_identifier($basename, $id)
+ {
+ if (strpos($basename, '\\') === false)
+ {
+ return $basename;
}
+
+ return $id;
}
-}
-?> \ No newline at end of file
+ /**
+ * Checks whether the given module basename is a correct class name
+ *
+ * @param string $basename A module basename
+ * @return bool True if the basename starts with phpbb_ or (x)cp_, false otherwise
+ */
+ protected function is_full_class($basename)
+ {
+ return (strpos($basename, '\\') !== false || preg_match('/^(ucp|mcp|acp)_/', $basename));
+ }
+}
diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php
index 11a5067ef9..8e9cc3a950 100644
--- a/phpBB/includes/functions_posting.php
+++ b/phpBB/includes/functions_posting.php
@@ -2,9 +2,8 @@
/**
*
* @package phpBB3
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -21,9 +20,11 @@ if (!defined('IN_PHPBB'))
*/
function generate_smilies($mode, $forum_id)
{
- global $auth, $db, $user, $config, $template;
- global $phpEx, $phpbb_root_path;
+ global $db, $user, $config, $template, $phpbb_dispatcher;
+ global $phpEx, $phpbb_root_path, $phpbb_container;
+ $base_url = append_sid("{$phpbb_root_path}posting.$phpEx", 'mode=smilies&amp;f=' . $forum_id);
+ $pagination = $phpbb_container->get('pagination');
$start = request_var('start', 0);
if ($mode == 'window')
@@ -62,10 +63,8 @@ function generate_smilies($mode, $forum_id)
'body' => 'posting_smilies.html')
);
- $template->assign_var('PAGINATION',
- generate_pagination(append_sid("{$phpbb_root_path}posting.$phpEx", 'mode=smilies&amp;f=' . $forum_id),
- $smiley_count, $config['smilies_per_page'], $start, true)
- );
+ $start = $pagination->validate_start($start, $config['smilies_per_page'], $smiley_count);
+ $pagination->generate_template_pagination($base_url, 'pagination', 'start', $smiley_count, $config['smilies_per_page'], $start);
}
$display_link = false;
@@ -127,12 +126,24 @@ function generate_smilies($mode, $forum_id)
}
}
+ /**
+ * This event is called after the smilies are populated
+ *
+ * @event core.generate_smilies_after
+ * @var string mode Mode of the smilies: window|inline
+ * @var int forum_id The forum ID we are currently in
+ * @var bool display_link Shall we display the "more smilies" link?
+ * @since 3.1-A1
+ */
+ $vars = array('mode', 'forum_id', 'display_link');
+ extract($phpbb_dispatcher->trigger_event('core.generate_smilies_after', compact($vars)));
+
if ($mode == 'inline' && $display_link)
{
$template->assign_vars(array(
'S_SHOW_SMILEY_LINK' => true,
- 'U_MORE_SMILIES' => append_sid("{$phpbb_root_path}posting.$phpEx", 'mode=smilies&amp;f=' . $forum_id))
- );
+ 'U_MORE_SMILIES' => $base_url,
+ ));
}
if ($mode == 'window')
@@ -168,7 +179,7 @@ function update_post_information($type, $ids, $return_update_sql = false)
if ($type != 'topic')
{
$topic_join = ', ' . TOPICS_TABLE . ' t';
- $topic_condition = 'AND t.topic_id = p.topic_id AND t.topic_approved = 1';
+ $topic_condition = 'AND t.topic_id = p.topic_id AND t.topic_visibility = ' . ITEM_APPROVED;
}
else
{
@@ -182,7 +193,7 @@ function update_post_information($type, $ids, $return_update_sql = false)
FROM ' . POSTS_TABLE . " p $topic_join
WHERE " . $db->sql_in_set('p.' . $type . '_id', $ids) . "
$topic_condition
- AND p.post_approved = 1";
+ AND p.post_visibility = " . ITEM_APPROVED;
}
else
{
@@ -190,7 +201,7 @@ function update_post_information($type, $ids, $return_update_sql = false)
FROM ' . POSTS_TABLE . " p $topic_join
WHERE " . $db->sql_in_set('p.' . $type . '_id', $ids) . "
$topic_condition
- AND p.post_approved = 1
+ AND p.post_visibility = " . ITEM_APPROVED . "
GROUP BY p.{$type}_id";
}
$result = $db->sql_query($sql);
@@ -340,7 +351,7 @@ function posting_gen_topic_types($forum_id, $cur_topic_type = POST_NORMAL)
$topic_type_array[] = array(
'VALUE' => $topic_value['const'],
- 'S_CHECKED' => ($cur_topic_type == $topic_value['const'] || ($forum_id == 0 && $topic_value['const'] == POST_GLOBAL)) ? ' checked="checked"' : '',
+ 'S_CHECKED' => ($cur_topic_type == $topic_value['const']) ? ' checked="checked"' : '',
'L_TOPIC_TYPE' => $user->lang[$topic_value['lang']]
);
}
@@ -377,8 +388,18 @@ function posting_gen_topic_types($forum_id, $cur_topic_type = POST_NORMAL)
/**
* 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 \filespec $local_filedata A filespec object created for the local file
+* @param \phpbb\plupload\plupload $plupload The plupload object if one is being used
+*
+* @return object filespec
*/
-function upload_attachment($form_name, $forum_id, $local = false, $local_storage = '', $is_message = false, $local_filedata = false)
+function upload_attachment($form_name, $forum_id, $local = false, $local_storage = '', $is_message = false, $local_filedata = false, \phpbb\plupload\plupload $plupload = null)
{
global $auth, $user, $config, $db, $cache;
global $phpbb_root_path, $phpEx;
@@ -395,14 +416,7 @@ function upload_attachment($form_name, $forum_id, $local = false, $local_storage
$upload->set_disallowed_content(explode('|', $config['mime_triggers']));
}
- if (!$local)
- {
- $filedata['post_attach'] = ($upload->is_valid($form_name)) ? true : false;
- }
- else
- {
- $filedata['post_attach'] = true;
- }
+ $filedata['post_attach'] = $local || $upload->is_valid($form_name);
if (!$filedata['post_attach'])
{
@@ -413,7 +427,7 @@ function upload_attachment($form_name, $forum_id, $local = false, $local_storage
$extensions = $cache->obtain_attach_extensions((($is_message) ? false : (int) $forum_id));
$upload->set_allowed_extensions(array_keys($extensions['_allowed_']));
- $file = ($local) ? $upload->local_upload($local_storage, $local_filedata) : $upload->form_upload($form_name);
+ $file = ($local) ? $upload->local_upload($local_storage, $local_filedata) : $upload->form_upload($form_name, $plupload);
if ($file->init_error)
{
@@ -421,20 +435,18 @@ function upload_attachment($form_name, $forum_id, $local = false, $local_storage
return $filedata;
}
- $cat_id = (isset($extensions[$file->get('extension')]['display_cat'])) ? $extensions[$file->get('extension')]['display_cat'] : ATTACHMENT_CATEGORY_NONE;
-
- // Do we have to create a thumbnail?
- $filedata['thumbnail'] = ($cat_id == ATTACHMENT_CATEGORY_IMAGE && $config['img_create_thumbnail']) ? 1 : 0;
-
- // Check Image Size, if it is an image
- if (!$auth->acl_get('a_') && !$auth->acl_get('m_', $forum_id) && $cat_id == ATTACHMENT_CATEGORY_IMAGE)
- {
- $file->upload->set_allowed_dimensions(0, 0, $config['img_max_width'], $config['img_max_height']);
- }
+ // Whether the uploaded file is in the image category
+ $is_image = (isset($extensions[$file->get('extension')]['display_cat'])) ? $extensions[$file->get('extension')]['display_cat'] == ATTACHMENT_CATEGORY_IMAGE : false;
- // Admins and mods are allowed to exceed the allowed filesize
if (!$auth->acl_get('a_') && !$auth->acl_get('m_', $forum_id))
{
+ // Check Image Size, if it is an image
+ if ($is_image)
+ {
+ $file->upload->set_allowed_dimensions(0, 0, $config['img_max_width'], $config['img_max_height']);
+ }
+
+ // Admins and mods are allowed to exceed the allowed filesize
if (!empty($extensions[$file->get('extension')]['max_filesize']))
{
$allowed_filesize = $extensions[$file->get('extension')]['max_filesize'];
@@ -449,10 +461,12 @@ function upload_attachment($form_name, $forum_id, $local = false, $local_storage
$file->clean_filename('unique', $user->data['user_id'] . '_');
- // Are we uploading an image *and* this image being within the image category? Only then perform additional image checks.
- $no_image = ($cat_id == ATTACHMENT_CATEGORY_IMAGE) ? false : true;
+ // Are we uploading an image *and* this image being within the image category?
+ // Only then perform additional image checks.
+ $file->move_file($config['upload_path'], false, !$is_image);
- $file->move_file($config['upload_path'], false, $no_image);
+ // Do we have to create a thumbnail?
+ $filedata['thumbnail'] = ($is_image && $config['img_create_thumbnail']) ? 1 : 0;
if (sizeof($file->error))
{
@@ -464,10 +478,15 @@ function upload_attachment($form_name, $forum_id, $local = false, $local_storage
}
// Make sure the image category only holds valid images...
- if ($cat_id == ATTACHMENT_CATEGORY_IMAGE && !$file->is_image())
+ if ($is_image && !$file->is_image())
{
$file->remove();
+ if ($plupload && $plupload->is_active())
+ {
+ $plupload->emit_error(104, 'ATTACHED_IMAGE_NOT_IMAGE');
+ }
+
// If this error occurs a user tried to exploit an IE Bug by renaming extensions
// Since the image category is displaying content inline we need to catch this.
trigger_error($user->lang['ATTACHED_IMAGE_NOT_IMAGE']);
@@ -569,30 +588,30 @@ function get_supported_image_types($type = false)
if ($type !== false)
{
// Type is one of the IMAGETYPE constants - it is fetched from getimagesize()
- // We do not use the constants here, because some were not available in PHP 4.3.x
switch ($type)
{
// GIF
- case 1:
+ case IMAGETYPE_GIF:
$new_type = ($format & IMG_GIF) ? IMG_GIF : false;
break;
// JPG, JPC, JP2
- case 2:
- case 9:
- case 10:
- case 11:
- case 12:
+ case IMAGETYPE_JPEG:
+ case IMAGETYPE_JPC:
+ case IMAGETYPE_JPEG2000:
+ case IMAGETYPE_JP2:
+ case IMAGETYPE_JPX:
+ case IMAGETYPE_JB2:
$new_type = ($format & IMG_JPG) ? IMG_JPG : false;
break;
// PNG
- case 3:
+ case IMAGETYPE_PNG:
$new_type = ($format & IMG_PNG) ? IMG_PNG : false;
break;
// WBMP
- case 15:
+ case IMAGETYPE_WBMP:
$new_type = ($format & IMG_WBMP) ? IMG_WBMP : false;
break;
}
@@ -812,7 +831,7 @@ function posting_gen_inline_attachments(&$attachment_data)
*/
function posting_gen_attachment_entry($attachment_data, &$filename_data, $show_attach_box = true)
{
- global $template, $config, $phpbb_root_path, $phpEx, $user, $auth;
+ global $template, $config, $phpbb_root_path, $phpEx, $user;
// Some default template variables
$template->assign_vars(array(
@@ -846,6 +865,7 @@ function posting_gen_attachment_entry($attachment_data, &$filename_data, $show_a
'ATTACH_ID' => $attach_row['attach_id'],
'S_IS_ORPHAN' => $attach_row['is_orphan'],
'ASSOC_INDEX' => $count,
+ 'FILESIZE' => get_formatted_filesize($attach_row['filesize']),
'U_VIEW_ATTACHMENT' => $download_link,
'S_HIDDEN' => $hidden)
@@ -981,13 +1001,15 @@ function load_drafts($topic_id = 0, $forum_id = 0, $id = 0, $pm_action = '', $ms
function topic_review($topic_id, $forum_id, $mode = 'topic_review', $cur_post_id = 0, $show_quote_button = true)
{
global $user, $auth, $db, $template, $bbcode, $cache;
- global $config, $phpbb_root_path, $phpEx;
+ global $config, $phpbb_root_path, $phpEx, $phpbb_container;
+
+ $phpbb_content_visibility = $phpbb_container->get('content.visibility');
// Go ahead and pull all data for this topic
$sql = 'SELECT p.post_id
FROM ' . POSTS_TABLE . ' p' . "
WHERE p.topic_id = $topic_id
- " . ((!$auth->acl_get('m_approve', $forum_id)) ? 'AND p.post_approved = 1' : '') . '
+ AND " . $phpbb_content_visibility->get_visibility_sql('post', $forum_id, 'p.') . '
' . (($mode == 'post_review') ? " AND p.post_id > $cur_post_id" : '') . '
' . (($mode == 'post_review_edit') ? " AND p.post_id = $cur_post_id" : '') . '
ORDER BY p.post_time ';
@@ -1014,7 +1036,7 @@ function topic_review($topic_id, $forum_id, $mode = 'topic_review', $cur_post_id
$mode = 'post_review';
}
- $sql = $db->sql_build_query('SELECT', array(
+ $sql_ary = array(
'SELECT' => 'u.username, u.user_id, u.user_colour, p.*, z.friend, z.foe',
'FROM' => array(
@@ -1025,14 +1047,15 @@ function topic_review($topic_id, $forum_id, $mode = 'topic_review', $cur_post_id
'LEFT_JOIN' => array(
array(
'FROM' => array(ZEBRA_TABLE => 'z'),
- 'ON' => 'z.user_id = ' . $user->data['user_id'] . ' AND z.zebra_id = p.poster_id'
- )
+ 'ON' => 'z.user_id = ' . $user->data['user_id'] . ' AND z.zebra_id = p.poster_id',
+ ),
),
'WHERE' => $db->sql_in_set('p.post_id', $post_list) . '
- AND u.user_id = p.poster_id'
- ));
+ AND u.user_id = p.poster_id',
+ );
+ $sql = $db->sql_build_query('SELECT', $sql_ary);
$result = $db->sql_query($sql);
$bbcode_bitfield = '';
@@ -1087,29 +1110,24 @@ function topic_review($topic_id, $forum_id, $mode = 'topic_review', $cur_post_id
continue;
}
- $row =& $rowset[$post_list[$i]];
+ $row = $rowset[$post_list[$i]];
$poster_id = $row['user_id'];
$post_subject = $row['post_subject'];
- $message = censor_text($row['post_text']);
$decoded_message = false;
if ($show_quote_button && $auth->acl_get('f_reply', $forum_id))
{
- $decoded_message = $message;
+ $decoded_message = censor_text($row['post_text']);
decode_message($decoded_message, $row['bbcode_uid']);
$decoded_message = bbcode_nl2br($decoded_message);
}
- if ($row['bbcode_bitfield'])
- {
- $bbcode->bbcode_second_pass($message, $row['bbcode_uid'], $row['bbcode_bitfield']);
- }
-
- $message = bbcode_nl2br($message);
- $message = smiley_text($message, !$row['enable_smilies']);
+ $parse_flags = ($row['bbcode_bitfield'] ? OPTION_FLAG_BBCODE : 0);
+ $parse_flags |= ($row['enable_smilies'] ? OPTION_FLAG_SMILIES : 0);
+ $message = generate_text_for_display($row['post_text'], $row['bbcode_uid'], $row['bbcode_bitfield'], $parse_flags, true);
if (!empty($attachments[$row['post_id']]))
{
@@ -1166,238 +1184,6 @@ function topic_review($topic_id, $forum_id, $mode = 'topic_review', $cur_post_id
return true;
}
-/**
-* User Notification
-*/
-function user_notification($mode, $subject, $topic_title, $forum_name, $forum_id, $topic_id, $post_id, $author_name = '')
-{
- global $db, $user, $config, $phpbb_root_path, $phpEx, $auth;
-
- $topic_notification = ($mode == 'reply' || $mode == 'quote') ? true : false;
- $forum_notification = ($mode == 'post') ? true : false;
-
- if (!$topic_notification && !$forum_notification)
- {
- trigger_error('NO_MODE');
- }
-
- if (($topic_notification && !$config['allow_topic_notify']) || ($forum_notification && !$config['allow_forum_notify']))
- {
- return;
- }
-
- $topic_title = ($topic_notification) ? $topic_title : $subject;
- $topic_title = censor_text($topic_title);
-
- // Exclude guests, current user and banned users from notifications
- if (!function_exists('phpbb_get_banned_user_ids'))
- {
- include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
- }
- $sql_ignore_users = phpbb_get_banned_user_ids();
- $sql_ignore_users[ANONYMOUS] = ANONYMOUS;
- $sql_ignore_users[$user->data['user_id']] = $user->data['user_id'];
-
- $notify_rows = array();
-
- // -- get forum_userids || topic_userids
- $sql = 'SELECT u.user_id, u.username, u.user_email, u.user_lang, u.user_notify_type, u.user_jabber
- FROM ' . (($topic_notification) ? TOPICS_WATCH_TABLE : FORUMS_WATCH_TABLE) . ' w, ' . USERS_TABLE . ' u
- WHERE w.' . (($topic_notification) ? 'topic_id' : 'forum_id') . ' = ' . (($topic_notification) ? $topic_id : $forum_id) . '
- AND ' . $db->sql_in_set('w.user_id', $sql_ignore_users, true) . '
- AND w.notify_status = ' . NOTIFY_YES . '
- AND u.user_type IN (' . USER_NORMAL . ', ' . USER_FOUNDER . ')
- AND u.user_id = w.user_id';
- $result = $db->sql_query($sql);
-
- while ($row = $db->sql_fetchrow($result))
- {
- $notify_user_id = (int) $row['user_id'];
- $notify_rows[$notify_user_id] = array(
- 'user_id' => $notify_user_id,
- 'username' => $row['username'],
- 'user_email' => $row['user_email'],
- 'user_jabber' => $row['user_jabber'],
- 'user_lang' => $row['user_lang'],
- 'notify_type' => ($topic_notification) ? 'topic' : 'forum',
- 'template' => ($topic_notification) ? 'topic_notify' : 'newtopic_notify',
- 'method' => $row['user_notify_type'],
- 'allowed' => false
- );
-
- // Add users who have been already notified to ignore list
- $sql_ignore_users[$notify_user_id] = $notify_user_id;
- }
- $db->sql_freeresult($result);
-
- // forum notification is sent to those not already receiving topic notifications
- if ($topic_notification)
- {
- $sql = 'SELECT u.user_id, u.username, u.user_email, u.user_lang, u.user_notify_type, u.user_jabber
- FROM ' . FORUMS_WATCH_TABLE . ' fw, ' . USERS_TABLE . " u
- WHERE fw.forum_id = $forum_id
- AND " . $db->sql_in_set('fw.user_id', $sql_ignore_users, true) . '
- AND fw.notify_status = ' . NOTIFY_YES . '
- AND u.user_type IN (' . USER_NORMAL . ', ' . USER_FOUNDER . ')
- AND u.user_id = fw.user_id';
- $result = $db->sql_query($sql);
-
- while ($row = $db->sql_fetchrow($result))
- {
- $notify_user_id = (int) $row['user_id'];
- $notify_rows[$notify_user_id] = array(
- 'user_id' => $notify_user_id,
- 'username' => $row['username'],
- 'user_email' => $row['user_email'],
- 'user_jabber' => $row['user_jabber'],
- 'user_lang' => $row['user_lang'],
- 'notify_type' => 'forum',
- 'template' => 'forum_notify',
- 'method' => $row['user_notify_type'],
- 'allowed' => false
- );
- }
- $db->sql_freeresult($result);
- }
-
- if (!sizeof($notify_rows))
- {
- return;
- }
-
- // Make sure users are allowed to read the forum
- foreach ($auth->acl_get_list(array_keys($notify_rows), 'f_read', $forum_id) as $forum_id => $forum_ary)
- {
- foreach ($forum_ary as $auth_option => $user_ary)
- {
- foreach ($user_ary as $user_id)
- {
- $notify_rows[$user_id]['allowed'] = true;
- }
- }
- }
-
- // Now, we have to do a little step before really sending, we need to distinguish our users a little bit. ;)
- $msg_users = $delete_ids = $update_notification = array();
- foreach ($notify_rows as $user_id => $row)
- {
- if (!$row['allowed'] || !trim($row['user_email']))
- {
- $delete_ids[$row['notify_type']][] = $row['user_id'];
- }
- else
- {
- $msg_users[] = $row;
- $update_notification[$row['notify_type']][] = $row['user_id'];
-
- /*
- * We also update the forums watch table for this user when we are
- * sending out a topic notification to prevent sending out another
- * notification in case this user is also subscribed to the forum
- * this topic was posted in.
- * Since an UPDATE query is used, this has no effect on users only
- * subscribed to the topic (i.e. no row is created) and should not
- * be a performance issue.
- */
- if ($row['notify_type'] === 'topic')
- {
- $update_notification['forum'][] = $row['user_id'];
- }
- }
- }
- unset($notify_rows);
-
- // Now, we are able to really send out notifications
- if (sizeof($msg_users))
- {
- include_once($phpbb_root_path . 'includes/functions_messenger.' . $phpEx);
- $messenger = new messenger();
-
- $msg_list_ary = array();
- foreach ($msg_users as $row)
- {
- $pos = (!isset($msg_list_ary[$row['template']])) ? 0 : sizeof($msg_list_ary[$row['template']]);
-
- $msg_list_ary[$row['template']][$pos]['method'] = $row['method'];
- $msg_list_ary[$row['template']][$pos]['email'] = $row['user_email'];
- $msg_list_ary[$row['template']][$pos]['jabber'] = $row['user_jabber'];
- $msg_list_ary[$row['template']][$pos]['name'] = $row['username'];
- $msg_list_ary[$row['template']][$pos]['lang'] = $row['user_lang'];
- $msg_list_ary[$row['template']][$pos]['user_id']= $row['user_id'];
- }
- unset($msg_users);
-
- foreach ($msg_list_ary as $email_template => $email_list)
- {
- foreach ($email_list as $addr)
- {
- $messenger->template($email_template, $addr['lang']);
-
- $messenger->to($addr['email'], $addr['name']);
- $messenger->im($addr['jabber'], $addr['name']);
-
- $messenger->assign_vars(array(
- 'USERNAME' => htmlspecialchars_decode($addr['name']),
- 'TOPIC_TITLE' => htmlspecialchars_decode($topic_title),
- 'FORUM_NAME' => htmlspecialchars_decode($forum_name),
- 'AUTHOR_NAME' => htmlspecialchars_decode($author_name),
-
- 'U_FORUM' => generate_board_url() . "/viewforum.$phpEx?f=$forum_id",
- 'U_TOPIC' => generate_board_url() . "/viewtopic.$phpEx?f=$forum_id&t=$topic_id",
- 'U_NEWEST_POST' => generate_board_url() . "/viewtopic.$phpEx?f=$forum_id&t=$topic_id&p=$post_id&e=$post_id",
- 'U_STOP_WATCHING_TOPIC' => generate_board_url() . "/viewtopic.$phpEx?uid={$addr['user_id']}&f=$forum_id&t=$topic_id&unwatch=topic",
- 'U_STOP_WATCHING_FORUM' => generate_board_url() . "/viewforum.$phpEx?uid={$addr['user_id']}&f=$forum_id&unwatch=forum",
- ));
-
- $messenger->send($addr['method']);
- }
- }
- unset($msg_list_ary);
-
- $messenger->save_queue();
- }
-
- // Handle the DB updates
- $db->sql_transaction('begin');
-
- if (!empty($update_notification['topic']))
- {
- $sql = 'UPDATE ' . TOPICS_WATCH_TABLE . '
- SET notify_status = ' . NOTIFY_NO . "
- WHERE topic_id = $topic_id
- AND " . $db->sql_in_set('user_id', $update_notification['topic']);
- $db->sql_query($sql);
- }
-
- if (!empty($update_notification['forum']))
- {
- $sql = 'UPDATE ' . FORUMS_WATCH_TABLE . '
- SET notify_status = ' . NOTIFY_NO . "
- WHERE forum_id = $forum_id
- AND " . $db->sql_in_set('user_id', $update_notification['forum']);
- $db->sql_query($sql);
- }
-
- // Now delete the user_ids not authorised to receive notifications on this topic/forum
- if (!empty($delete_ids['topic']))
- {
- $sql = 'DELETE FROM ' . TOPICS_WATCH_TABLE . "
- WHERE topic_id = $topic_id
- AND " . $db->sql_in_set('user_id', $delete_ids['topic']);
- $db->sql_query($sql);
- }
-
- if (!empty($delete_ids['forum']))
- {
- $sql = 'DELETE FROM ' . FORUMS_WATCH_TABLE . "
- WHERE forum_id = $forum_id
- AND " . $db->sql_in_set('user_id', $delete_ids['forum']);
- $db->sql_query($sql);
- }
-
- $db->sql_transaction('commit');
-}
-
//
// Post handling functions
//
@@ -1405,14 +1191,14 @@ function user_notification($mode, $subject, $topic_title, $forum_name, $forum_id
/**
* Delete Post
*/
-function delete_post($forum_id, $topic_id, $post_id, &$data)
+function delete_post($forum_id, $topic_id, $post_id, &$data, $is_soft = false, $softdelete_reason = '')
{
- global $db, $user, $auth;
+ global $db, $user, $auth, $phpbb_container;
global $config, $phpEx, $phpbb_root_path;
// Specify our post mode
$post_mode = 'delete';
- if (($data['topic_first_post_id'] === $data['topic_last_post_id']) && $data['topic_replies_real'] == 0)
+ if (($data['topic_first_post_id'] === $data['topic_last_post_id']) && ($data['topic_posts_approved'] + $data['topic_posts_unapproved'] + $data['topic_posts_softdeleted'] == 1))
{
$post_mode = 'delete_topic';
}
@@ -1454,20 +1240,30 @@ function delete_post($forum_id, $topic_id, $post_id, &$data)
$db->sql_freeresult($result);
}
- if (!delete_posts('post_id', array($post_id), false, false))
+ $phpbb_content_visibility = $phpbb_container->get('content.visibility');
+
+ // (Soft) delete the post
+ if ($is_soft && ($post_mode != 'delete_topic'))
+ {
+ $phpbb_content_visibility->set_post_visibility(ITEM_DELETED, $post_id, $topic_id, $forum_id, $user->data['user_id'], time(), $softdelete_reason, ($data['topic_first_post_id'] == $post_id), ($data['topic_last_post_id'] == $post_id));
+ }
+ else if (!$is_soft)
{
- // Try to delete topic, we may had an previous error causing inconsistency
- if ($post_mode == 'delete_topic')
+ if (!delete_posts('post_id', array($post_id), false, false, false))
{
- delete_topics('topic_id', array($topic_id), false);
+ // Try to delete topic, we may had an previous error causing inconsistency
+ if ($post_mode == 'delete_topic')
+ {
+ delete_topics('topic_id', array($topic_id), false);
+ }
+ trigger_error('ALREADY_DELETED');
}
- trigger_error('ALREADY_DELETED');
}
$db->sql_transaction('commit');
// Collect the necessary information for updating the tables
- $sql_data[FORUMS_TABLE] = '';
+ $sql_data[FORUMS_TABLE] = $sql_data[TOPICS_TABLE] = '';
switch ($post_mode)
{
case 'delete_topic':
@@ -1476,24 +1272,43 @@ function delete_post($forum_id, $topic_id, $post_id, &$data)
{
// counting is fun! we only have to do sizeof($forum_ids) number of queries,
// even if the topic is moved back to where its shadow lives (we count how many times it is in a forum)
- $db->sql_query('UPDATE ' . FORUMS_TABLE . ' SET forum_topics_real = forum_topics_real - ' . $topic_count . ', forum_topics = forum_topics - ' . $topic_count . ' WHERE forum_id = ' . $updated_forum);
+ $sql = 'UPDATE ' . FORUMS_TABLE . '
+ SET forum_topics_approved = forum_topics_approved - ' . $topic_count . '
+ WHERE forum_id = ' . $updated_forum;
+ $db->sql_query($sql);
update_post_information('forum', $updated_forum);
}
- delete_topics('topic_id', array($topic_id), false);
-
- if ($data['topic_type'] != POST_GLOBAL)
+ if ($is_soft)
{
- $sql_data[FORUMS_TABLE] .= 'forum_topics_real = forum_topics_real - 1';
- $sql_data[FORUMS_TABLE] .= ($data['topic_approved']) ? ', forum_posts = forum_posts - 1, forum_topics = forum_topics - 1' : '';
+ $topic_row = array();
+ $phpbb_content_visibility->set_topic_visibility(ITEM_DELETED, $topic_id, $forum_id, $user->data['user_id'], time(), $softdelete_reason);
}
-
- $update_sql = update_post_information('forum', $forum_id, true);
- if (sizeof($update_sql))
+ else
{
- $sql_data[FORUMS_TABLE] .= ($sql_data[FORUMS_TABLE]) ? ', ' : '';
- $sql_data[FORUMS_TABLE] .= implode(', ', $update_sql[$forum_id]);
+ delete_topics('topic_id', array($topic_id), false);
+
+ if ($data['topic_visibility'] == ITEM_APPROVED)
+ {
+ $sql_data[FORUMS_TABLE] .= 'forum_posts_approved = forum_posts_approved - 1, forum_topics_approved = forum_topics_approved - 1';
+ }
+ else if ($data['topic_visibility'] == ITEM_UNAPPROVED)
+ {
+ $sql_data[FORUMS_TABLE] .= 'forum_posts_unapproved = forum_posts_unapproved - 1, forum_topics_unapproved = forum_topics_unapproved - 1';
+ }
+ else if ($data['topic_visibility'] == ITEM_DELETED)
+ {
+ $sql_data[FORUMS_TABLE] .= 'forum_posts_softdeleted = forum_posts_softdeleted - 1, forum_topics_softdeleted = forum_topics_softdeleted - 1';
+ }
+
+ $update_sql = update_post_information('forum', $forum_id, true);
+ if (sizeof($update_sql))
+ {
+ $sql_data[FORUMS_TABLE] .= ($sql_data[FORUMS_TABLE]) ? ', ' : '';
+ $sql_data[FORUMS_TABLE] .= implode(', ', $update_sql[$forum_id]);
+ }
}
+
break;
case 'delete_first_post':
@@ -1501,82 +1316,101 @@ function delete_post($forum_id, $topic_id, $post_id, &$data)
FROM ' . POSTS_TABLE . ' p, ' . USERS_TABLE . " u
WHERE p.topic_id = $topic_id
AND p.poster_id = u.user_id
- ORDER BY p.post_time ASC";
+ AND p.post_visibility = " . ITEM_APPROVED . '
+ ORDER BY p.post_time ASC';
$result = $db->sql_query_limit($sql, 1);
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
- if ($data['topic_type'] != POST_GLOBAL)
+ if (!$row)
{
- $sql_data[FORUMS_TABLE] = ($data['post_approved']) ? 'forum_posts = forum_posts - 1' : '';
+ // No approved post, so the first is a not-approved post (unapproved or soft deleted)
+ $sql = 'SELECT p.post_id, p.poster_id, p.post_time, p.post_username, u.username, u.user_colour
+ FROM ' . POSTS_TABLE . ' p, ' . USERS_TABLE . " u
+ WHERE p.topic_id = $topic_id
+ AND p.poster_id = u.user_id
+ ORDER BY p.post_time ASC";
+ $result = $db->sql_query_limit($sql, 1);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
}
- $sql_data[TOPICS_TABLE] = 'topic_poster = ' . intval($row['poster_id']) . ', topic_first_post_id = ' . intval($row['post_id']) . ", topic_first_poster_colour = '" . $db->sql_escape($row['user_colour']) . "', topic_first_poster_name = '" . (($row['poster_id'] == ANONYMOUS) ? $db->sql_escape($row['post_username']) : $db->sql_escape($row['username'])) . "', topic_time = " . (int) $row['post_time'];
-
- // Decrementing topic_replies here is fine because this case only happens if there is more than one post within the topic - basically removing one "reply"
- $sql_data[TOPICS_TABLE] .= ', topic_replies_real = topic_replies_real - 1' . (($data['post_approved']) ? ', topic_replies = topic_replies - 1' : '');
-
$next_post_id = (int) $row['post_id'];
+
+ $sql_data[TOPICS_TABLE] = $db->sql_build_array('UPDATE', array(
+ 'topic_poster' => (int) $row['poster_id'],
+ 'topic_first_post_id' => (int) $row['post_id'],
+ 'topic_first_poster_colour' => $row['user_colour'],
+ 'topic_first_poster_name' => ($row['poster_id'] == ANONYMOUS) ? $row['post_username'] : $row['username'],
+ 'topic_time' => (int) $row['post_time'],
+ ));
break;
case 'delete_last_post':
- if ($data['topic_type'] != POST_GLOBAL)
- {
- $sql_data[FORUMS_TABLE] = ($data['post_approved']) ? 'forum_posts = forum_posts - 1' : '';
- }
-
- $update_sql = update_post_information('forum', $forum_id, true);
- if (sizeof($update_sql))
+ if (!$is_soft)
{
- $sql_data[FORUMS_TABLE] .= ($sql_data[FORUMS_TABLE]) ? ', ' : '';
- $sql_data[FORUMS_TABLE] .= implode(', ', $update_sql[$forum_id]);
- }
+ // Update last post information when hard deleting. Soft delete already did that by itself.
+ $update_sql = update_post_information('forum', $forum_id, true);
+ if (sizeof($update_sql))
+ {
+ $sql_data[FORUMS_TABLE] = (($sql_data[FORUMS_TABLE]) ? $sql_data[FORUMS_TABLE] . ', ' : '') . implode(', ', $update_sql[$forum_id]);
+ }
- $sql_data[TOPICS_TABLE] = 'topic_bumped = 0, topic_bumper = 0, topic_replies_real = topic_replies_real - 1' . (($data['post_approved']) ? ', topic_replies = topic_replies - 1' : '');
+ $sql_data[TOPICS_TABLE] = (($sql_data[TOPICS_TABLE]) ? $sql_data[TOPICS_TABLE] . ', ' : '') . 'topic_bumped = 0, topic_bumper = 0';
- $update_sql = update_post_information('topic', $topic_id, true);
- if (sizeof($update_sql))
- {
- $sql_data[TOPICS_TABLE] .= ', ' . implode(', ', $update_sql[$topic_id]);
- $next_post_id = (int) str_replace('topic_last_post_id = ', '', $update_sql[$topic_id][0]);
+ $update_sql = update_post_information('topic', $topic_id, true);
+ if (!empty($update_sql))
+ {
+ $sql_data[TOPICS_TABLE] .= ', ' . implode(', ', $update_sql[$topic_id]);
+ $next_post_id = (int) str_replace('topic_last_post_id = ', '', $update_sql[$topic_id][0]);
+ }
}
- else
+
+ if (!$next_post_id)
{
$sql = 'SELECT MAX(post_id) as last_post_id
FROM ' . POSTS_TABLE . "
- WHERE topic_id = $topic_id " .
- ((!$auth->acl_get('m_approve', $forum_id)) ? 'AND post_approved = 1' : '');
+ WHERE topic_id = $topic_id
+ AND " . $phpbb_content_visibility->get_visibility_sql('post', $forum_id);
$result = $db->sql_query($sql);
- $row = $db->sql_fetchrow($result);
+ $next_post_id = (int) $db->sql_fetchfield('last_post_id');
$db->sql_freeresult($result);
-
- $next_post_id = (int) $row['last_post_id'];
}
break;
case 'delete':
$sql = 'SELECT post_id
FROM ' . POSTS_TABLE . "
- WHERE topic_id = $topic_id " .
- ((!$auth->acl_get('m_approve', $forum_id)) ? 'AND post_approved = 1' : '') . '
+ WHERE topic_id = $topic_id
+ AND " . $phpbb_content_visibility->get_visibility_sql('post', $forum_id) . '
AND post_time > ' . $data['post_time'] . '
ORDER BY post_time ASC';
$result = $db->sql_query_limit($sql, 1);
- $row = $db->sql_fetchrow($result);
+ $next_post_id = (int) $db->sql_fetchfield('post_id');
$db->sql_freeresult($result);
-
- if ($data['topic_type'] != POST_GLOBAL)
- {
- $sql_data[FORUMS_TABLE] = ($data['post_approved']) ? 'forum_posts = forum_posts - 1' : '';
- }
-
- $sql_data[TOPICS_TABLE] = 'topic_replies_real = topic_replies_real - 1' . (($data['post_approved']) ? ', topic_replies = topic_replies - 1' : '');
- $next_post_id = (int) $row['post_id'];
break;
}
if (($post_mode == 'delete') || ($post_mode == 'delete_last_post') || ($post_mode == 'delete_first_post'))
{
+ if (!$is_soft)
+ {
+ if ($data['post_visibility'] == ITEM_APPROVED)
+ {
+ $phpbb_content_visibility->remove_post_from_statistic($data, $sql_data);
+ }
+ else if ($data['post_visibility'] == ITEM_UNAPPROVED)
+ {
+ $sql_data[FORUMS_TABLE] = (($sql_data[FORUMS_TABLE]) ? $sql_data[FORUMS_TABLE] . ', ' : '') . 'forum_posts_unapproved = forum_posts_unapproved - 1';
+ $sql_data[TOPICS_TABLE] = (($sql_data[TOPICS_TABLE]) ? $sql_data[TOPICS_TABLE] . ', ' : '') . 'topic_posts_unapproved = topic_posts_unapproved - 1';
+ }
+ else if ($data['post_visibility'] == ITEM_DELETED)
+ {
+ $sql_data[FORUMS_TABLE] = (($sql_data[FORUMS_TABLE]) ? $sql_data[FORUMS_TABLE] . ', ' : '') . 'forum_posts_softdeleted = forum_posts_softdeleted - 1';
+ $sql_data[TOPICS_TABLE] = (($sql_data[TOPICS_TABLE]) ? $sql_data[TOPICS_TABLE] . ', ' : '') . 'topic_posts_softdeleted = topic_posts_softdeleted - 1';
+ }
+ }
+
$sql = 'SELECT 1 AS has_attachments
FROM ' . ATTACHMENTS_TABLE . '
WHERE topic_id = ' . $topic_id;
@@ -1586,18 +1420,16 @@ function delete_post($forum_id, $topic_id, $post_id, &$data)
if (!$has_attachments)
{
- $sql_data[TOPICS_TABLE] .= ', topic_attachment = 0';
+ $sql_data[TOPICS_TABLE] = (($sql_data[TOPICS_TABLE]) ? $sql_data[TOPICS_TABLE] . ', ' : '') . 'topic_attachment = 0';
}
}
-// $sql_data[USERS_TABLE] = ($data['post_postcount']) ? 'user_posts = user_posts - 1' : '';
-
$db->sql_transaction('begin');
$where_sql = array(
FORUMS_TABLE => "forum_id = $forum_id",
TOPICS_TABLE => "topic_id = $topic_id",
- USERS_TABLE => 'user_id = ' . $data['poster_id']
+ USERS_TABLE => 'user_id = ' . $data['poster_id'],
);
foreach ($sql_data as $table => $update_sql)
@@ -1645,7 +1477,23 @@ function delete_post($forum_id, $topic_id, $post_id, &$data)
*/
function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $update_message = true, $update_search_index = true)
{
- global $db, $auth, $user, $config, $phpEx, $template, $phpbb_root_path;
+ global $db, $auth, $user, $config, $phpEx, $template, $phpbb_root_path, $phpbb_container, $phpbb_dispatcher;
+
+ /**
+ * Modify the data for post submitting
+ *
+ * @event core.modify_submit_post_data
+ * @var string mode Variable containing posting mode value
+ * @var string subject Variable containing post subject value
+ * @var string username Variable containing post author name
+ * @var int topic_type Variable containing topic type value
+ * @var array poll Array with the poll data for the post
+ * @var array data Array with the data for the post
+ * @var bool update_message Flag indicating if the post will be updated
+ * @var bool update_search_index Flag indicating if the search index will be updated
+ * @since 3.1.0-a4
+ */
+ extract($phpbb_dispatcher->trigger_event('core.modify_submit_post_data', compact(array('mode', 'subject', 'username', 'topic_type', 'poll', 'data', 'update_message', 'update_search_index'))));
// We do not handle erasing posts here
if ($mode == 'delete')
@@ -1667,22 +1515,22 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
}
else if ($mode == 'edit')
{
- $post_mode = ($data['topic_replies_real'] == 0) ? 'edit_topic' : (($data['topic_first_post_id'] == $data['post_id']) ? 'edit_first_post' : (($data['topic_last_post_id'] == $data['post_id']) ? 'edit_last_post' : 'edit'));
+ $post_mode = ($data['topic_posts_approved'] + $data['topic_posts_unapproved'] + $data['topic_posts_softdeleted'] == 1) ? 'edit_topic' : (($data['topic_first_post_id'] == $data['post_id']) ? 'edit_first_post' : (($data['topic_last_post_id'] == $data['post_id']) ? 'edit_last_post' : 'edit'));
}
// First of all make sure the subject and topic title are having the correct length.
// To achieve this without cutting off between special chars we convert to an array and then count the elements.
- $subject = truncate_string($subject);
- $data['topic_title'] = truncate_string($data['topic_title']);
+ $subject = truncate_string($subject, 120);
+ $data['topic_title'] = truncate_string($data['topic_title'], 120);
// Collect some basic information about which tables and which rows to update/insert
$sql_data = $topic_row = array();
$poster_id = ($mode == 'edit') ? $data['poster_id'] : (int) $user->data['user_id'];
// Retrieve some additional information if not present
- if ($mode == 'edit' && (!isset($data['post_approved']) || !isset($data['topic_approved']) || $data['post_approved'] === false || $data['topic_approved'] === false))
+ if ($mode == 'edit' && (!isset($data['post_visibility']) || !isset($data['topic_visibility']) || $data['post_visibility'] === false || $data['topic_visibility'] === false))
{
- $sql = 'SELECT p.post_approved, t.topic_type, t.topic_replies, t.topic_replies_real, t.topic_approved
+ $sql = 'SELECT p.post_visibility, t.topic_type, t.topic_posts_approved, t.topic_posts_unapproved, t.topic_posts_softdeleted, t.topic_visibility
FROM ' . TOPICS_TABLE . ' t, ' . POSTS_TABLE . ' p
WHERE t.topic_id = p.topic_id
AND p.post_id = ' . $data['post_id'];
@@ -1690,26 +1538,29 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
$topic_row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
- $data['topic_approved'] = $topic_row['topic_approved'];
- $data['post_approved'] = $topic_row['post_approved'];
+ $data['topic_visibility'] = $topic_row['topic_visibility'];
+ $data['post_visibility'] = $topic_row['post_visibility'];
}
- // This variable indicates if the user is able to post or put into the queue - it is used later for all code decisions regarding approval
- // The variable name should be $post_approved, because it indicates if the post is approved or not
- $post_approval = 1;
+ // This variable indicates if the user is able to post or put into the queue
+ $post_visibility = ITEM_APPROVED;
// Check the permissions for post approval.
// Moderators must go through post approval like ordinary users.
if (!$auth->acl_get('f_noapprove', $data['forum_id']))
{
// Post not approved, but in queue
- $post_approval = 0;
+ $post_visibility = ITEM_UNAPPROVED;
}
- // Mods are able to force approved/unapproved posts. True means the post is approved, false the post is unapproved
+ // MODs/Extensions are able to force any visibility on posts
if (isset($data['force_approved_state']))
{
- $post_approval = ($data['force_approved_state']) ? 1 : 0;
+ $post_visibility = (in_array((int) $data['force_approved_state'], array(ITEM_APPROVED, ITEM_UNAPPROVED, ITEM_DELETED))) ? (int) $data['force_approved_state'] : $post_visibility;
+ }
+ if (isset($data['force_visibility']))
+ {
+ $post_visibility = (in_array((int) $data['force_visibility'], array(ITEM_APPROVED, ITEM_UNAPPROVED, ITEM_DELETED))) ? (int) $data['force_visibility'] : $post_visibility;
}
// Start the transaction here
@@ -1721,12 +1572,12 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
case 'post':
case 'reply':
$sql_data[POSTS_TABLE]['sql'] = array(
- 'forum_id' => ($topic_type == POST_GLOBAL) ? 0 : $data['forum_id'],
+ 'forum_id' => $data['forum_id'],
'poster_id' => (int) $user->data['user_id'],
'icon_id' => $data['icon_id'],
'poster_ip' => $user->ip,
'post_time' => $current_time,
- 'post_approved' => $post_approval,
+ 'post_visibility' => $post_visibility,
'enable_bbcode' => $data['enable_bbcode'],
'enable_smilies' => $data['enable_smilies'],
'enable_magic_url' => $data['enable_urls'],
@@ -1789,10 +1640,11 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
}
$sql_data[POSTS_TABLE]['sql'] = array_merge($sql_data[POSTS_TABLE]['sql'], array(
- 'forum_id' => ($topic_type == POST_GLOBAL) ? 0 : $data['forum_id'],
+ 'forum_id' => $data['forum_id'],
'poster_id' => $data['poster_id'],
'icon_id' => $data['icon_id'],
- 'post_approved' => (!$post_approval) ? 0 : $data['post_approved'],
+ // We will change the visibility later
+ //'post_visibility' => $post_visibility,
'enable_bbcode' => $data['enable_bbcode'],
'enable_smilies' => $data['enable_smilies'],
'enable_magic_url' => $data['enable_urls'],
@@ -1813,8 +1665,6 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
break;
}
-
- $post_approved = $sql_data[POSTS_TABLE]['sql']['post_approved'];
$topic_row = array();
// And the topic ladies and gentlemen
@@ -1825,9 +1675,13 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
'topic_poster' => (int) $user->data['user_id'],
'topic_time' => $current_time,
'topic_last_view_time' => $current_time,
- 'forum_id' => ($topic_type == POST_GLOBAL) ? 0 : $data['forum_id'],
+ 'forum_id' => $data['forum_id'],
'icon_id' => $data['icon_id'],
- 'topic_approved' => $post_approval,
+ 'topic_posts_approved' => ($post_visibility == ITEM_APPROVED) ? 1 : 0,
+ 'topic_posts_softdeleted' => ($post_visibility == ITEM_DELETED) ? 1 : 0,
+ 'topic_posts_unapproved' => ($post_visibility == ITEM_UNAPPROVED) ? 1 : 0,
+ 'topic_visibility' => $post_visibility,
+ 'topic_delete_user' => ($post_visibility != ITEM_APPROVED) ? (int) $user->data['user_id'] : 0,
'topic_title' => $subject,
'topic_first_poster_name' => (!$user->data['is_registered'] && $username) ? $username : (($user->data['user_id'] != ANONYMOUS) ? $user->data['username'] : ''),
'topic_first_poster_colour' => $user->data['user_colour'],
@@ -1859,31 +1713,47 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
);
}
- $sql_data[USERS_TABLE]['stat'][] = "user_lastpost_time = $current_time" . (($auth->acl_get('f_postcount', $data['forum_id']) && $post_approval) ? ', user_posts = user_posts + 1' : '');
+ $sql_data[USERS_TABLE]['stat'][] = "user_lastpost_time = $current_time" . (($auth->acl_get('f_postcount', $data['forum_id']) && $post_visibility == ITEM_APPROVED) ? ', user_posts = user_posts + 1' : '');
- if ($topic_type != POST_GLOBAL)
+ if ($post_visibility == ITEM_APPROVED)
{
- if ($post_approval)
- {
- $sql_data[FORUMS_TABLE]['stat'][] = 'forum_posts = forum_posts + 1';
- }
- $sql_data[FORUMS_TABLE]['stat'][] = 'forum_topics_real = forum_topics_real + 1' . (($post_approval) ? ', forum_topics = forum_topics + 1' : '');
+ $sql_data[FORUMS_TABLE]['stat'][] = 'forum_topics_approved = forum_topics_approved + 1';
+ $sql_data[FORUMS_TABLE]['stat'][] = 'forum_posts_approved = forum_posts_approved + 1';
+ }
+ else if ($post_visibility == ITEM_UNAPPROVED)
+ {
+ $sql_data[FORUMS_TABLE]['stat'][] = 'forum_topics_unapproved = forum_topics_unapproved + 1';
+ $sql_data[FORUMS_TABLE]['stat'][] = 'forum_posts_unapproved = forum_posts_unapproved + 1';
+ }
+ else if ($post_visibility == ITEM_DELETED)
+ {
+ $sql_data[FORUMS_TABLE]['stat'][] = 'forum_topics_softdeleted = forum_topics_softdeleted + 1';
+ $sql_data[FORUMS_TABLE]['stat'][] = 'forum_posts_softdeleted = forum_posts_softdeleted + 1';
}
break;
case 'reply':
$sql_data[TOPICS_TABLE]['stat'][] = 'topic_last_view_time = ' . $current_time . ',
- topic_replies_real = topic_replies_real + 1,
topic_bumped = 0,
topic_bumper = 0' .
- (($post_approval) ? ', topic_replies = topic_replies + 1' : '') .
+ (($post_visibility == ITEM_APPROVED) ? ', topic_posts_approved = topic_posts_approved + 1' : '') .
+ (($post_visibility == ITEM_UNAPPROVED) ? ', topic_posts_unapproved = topic_posts_unapproved + 1' : '') .
+ (($post_visibility == ITEM_DELETED) ? ', topic_posts_softdeleted = topic_posts_softdeleted + 1' : '') .
((!empty($data['attachment_data']) || (isset($data['topic_attachment']) && $data['topic_attachment'])) ? ', topic_attachment = 1' : '');
- $sql_data[USERS_TABLE]['stat'][] = "user_lastpost_time = $current_time" . (($auth->acl_get('f_postcount', $data['forum_id']) && $post_approval) ? ', user_posts = user_posts + 1' : '');
+ $sql_data[USERS_TABLE]['stat'][] = "user_lastpost_time = $current_time" . (($auth->acl_get('f_postcount', $data['forum_id']) && $post_visibility == ITEM_APPROVED) ? ', user_posts = user_posts + 1' : '');
- if ($post_approval && $topic_type != POST_GLOBAL)
+ if ($post_visibility == ITEM_APPROVED)
+ {
+ $sql_data[FORUMS_TABLE]['stat'][] = 'forum_posts_approved = forum_posts_approved + 1';
+ }
+ else if ($post_visibility == ITEM_UNAPPROVED)
+ {
+ $sql_data[FORUMS_TABLE]['stat'][] = 'forum_posts_unapproved = forum_posts_unapproved + 1';
+ }
+ else if ($post_visibility == ITEM_DELETED)
{
- $sql_data[FORUMS_TABLE]['stat'][] = 'forum_posts = forum_posts + 1';
+ $sql_data[FORUMS_TABLE]['stat'][] = 'forum_posts_softdeleted = forum_posts_softdeleted + 1';
}
break;
@@ -1905,9 +1775,8 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
}
$sql_data[TOPICS_TABLE]['sql'] = array(
- 'forum_id' => ($topic_type == POST_GLOBAL) ? 0 : $data['forum_id'],
+ 'forum_id' => $data['forum_id'],
'icon_id' => $data['icon_id'],
- 'topic_approved' => (!$post_approval) ? 0 : $data['topic_approved'],
'topic_title' => $subject,
'topic_first_poster_name' => $username,
'topic_type' => $topic_type,
@@ -1922,56 +1791,6 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
'topic_attachment' => (!empty($data['attachment_data'])) ? 1 : (isset($data['topic_attachment']) ? $data['topic_attachment'] : 0),
);
- // Correctly set back the topic replies and forum posts... only if the topic was approved before and now gets disapproved
- if (!$post_approval && $data['topic_approved'])
- {
- // Do we need to grab some topic informations?
- if (!sizeof($topic_row))
- {
- $sql = 'SELECT topic_type, topic_replies, topic_replies_real, topic_approved
- FROM ' . TOPICS_TABLE . '
- WHERE topic_id = ' . $data['topic_id'];
- $result = $db->sql_query($sql);
- $topic_row = $db->sql_fetchrow($result);
- $db->sql_freeresult($result);
- }
-
- // If this is the only post remaining we do not need to decrement topic_replies.
- // Also do not decrement if first post - then the topic_replies will not be adjusted if approving the topic again.
-
- // If this is an edited topic or the first post the topic gets completely disapproved later on...
- $sql_data[FORUMS_TABLE]['stat'][] = 'forum_topics = forum_topics - 1';
- $sql_data[FORUMS_TABLE]['stat'][] = 'forum_posts = forum_posts - ' . ($topic_row['topic_replies'] + 1);
-
- set_config_count('num_topics', -1, true);
- set_config_count('num_posts', ($topic_row['topic_replies'] + 1) * (-1), true);
-
- // Only decrement this post, since this is the one non-approved now
- if ($auth->acl_get('f_postcount', $data['forum_id']))
- {
- $sql_data[USERS_TABLE]['stat'][] = 'user_posts = user_posts - 1';
- }
- }
-
- break;
-
- case 'edit':
- case 'edit_last_post':
-
- // Correctly set back the topic replies and forum posts... but only if the post was approved before.
- if (!$post_approval && $data['post_approved'])
- {
- $sql_data[TOPICS_TABLE]['stat'][] = 'topic_replies = topic_replies - 1, topic_last_view_time = ' . $current_time;
- $sql_data[FORUMS_TABLE]['stat'][] = 'forum_posts = forum_posts - 1';
-
- set_config_count('num_posts', -1, true);
-
- if ($auth->acl_get('f_postcount', $data['forum_id']))
- {
- $sql_data[USERS_TABLE]['stat'][] = 'user_posts = user_posts - 1';
- }
- }
-
break;
}
@@ -1996,83 +1815,49 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
if ($post_mode == 'reply')
{
$sql_data[POSTS_TABLE]['sql'] = array_merge($sql_data[POSTS_TABLE]['sql'], array(
- 'topic_id' => $data['topic_id'])
- );
+ 'topic_id' => $data['topic_id'],
+ ));
}
$sql = 'INSERT INTO ' . POSTS_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_data[POSTS_TABLE]['sql']);
$db->sql_query($sql);
$data['post_id'] = $db->sql_nextid();
- if ($post_mode == 'post')
+ if ($post_mode == 'post' || $post_visibility == ITEM_APPROVED)
{
$sql_data[TOPICS_TABLE]['sql'] = array(
- 'topic_first_post_id' => $data['post_id'],
'topic_last_post_id' => $data['post_id'],
'topic_last_post_time' => $current_time,
- 'topic_last_poster_id' => (int) $user->data['user_id'],
- 'topic_last_poster_name' => (!$user->data['is_registered'] && $username) ? $username : (($user->data['user_id'] != ANONYMOUS) ? $user->data['username'] : ''),
+ 'topic_last_poster_id' => $sql_data[POSTS_TABLE]['sql']['poster_id'],
+ 'topic_last_poster_name' => ($user->data['user_id'] == ANONYMOUS) ? $sql_data[POSTS_TABLE]['sql']['post_username'] : $user->data['username'],
'topic_last_poster_colour' => $user->data['user_colour'],
'topic_last_post_subject' => (string) $subject,
);
}
- unset($sql_data[POSTS_TABLE]['sql']);
- }
-
- $make_global = false;
-
- // Are we globalising or unglobalising?
- if ($post_mode == 'edit_first_post' || $post_mode == 'edit_topic')
- {
- if (!sizeof($topic_row))
+ if ($post_mode == 'post')
{
- $sql = 'SELECT topic_type, topic_replies, topic_replies_real, topic_approved, topic_last_post_id
- FROM ' . TOPICS_TABLE . '
- WHERE topic_id = ' . $data['topic_id'];
- $result = $db->sql_query($sql);
- $topic_row = $db->sql_fetchrow($result);
- $db->sql_freeresult($result);
+ $sql_data[TOPICS_TABLE]['sql']['topic_first_post_id'] = $data['post_id'];
}
- // globalise/unglobalise?
- if (($topic_row['topic_type'] != POST_GLOBAL && $topic_type == POST_GLOBAL) || ($topic_row['topic_type'] == POST_GLOBAL && $topic_type != POST_GLOBAL))
+ // Update total post count and forum information
+ if ($post_visibility == ITEM_APPROVED)
{
- if (!empty($sql_data[FORUMS_TABLE]['stat']) && implode('', $sql_data[FORUMS_TABLE]['stat']))
+ if ($post_mode == 'post')
{
- $db->sql_query('UPDATE ' . FORUMS_TABLE . ' SET ' . implode(', ', $sql_data[FORUMS_TABLE]['stat']) . ' WHERE forum_id = ' . $data['forum_id']);
+ set_config_count('num_topics', 1, true);
}
+ set_config_count('num_posts', 1, true);
- $make_global = true;
- $sql_data[FORUMS_TABLE]['stat'] = array();
- }
-
- // globalise
- if ($topic_row['topic_type'] != POST_GLOBAL && $topic_type == POST_GLOBAL)
- {
- // Decrement topic/post count
- $sql_data[FORUMS_TABLE]['stat'][] = 'forum_posts = forum_posts - ' . ($topic_row['topic_replies_real'] + 1);
- $sql_data[FORUMS_TABLE]['stat'][] = 'forum_topics_real = forum_topics_real - 1' . (($topic_row['topic_approved']) ? ', forum_topics = forum_topics - 1' : '');
-
- // Update forum_ids for all posts
- $sql = 'UPDATE ' . POSTS_TABLE . '
- SET forum_id = 0
- WHERE topic_id = ' . $data['topic_id'];
- $db->sql_query($sql);
+ $sql_data[FORUMS_TABLE]['stat'][] = 'forum_last_post_id = ' . $data['post_id'];
+ $sql_data[FORUMS_TABLE]['stat'][] = "forum_last_post_subject = '" . $db->sql_escape($subject) . "'";
+ $sql_data[FORUMS_TABLE]['stat'][] = 'forum_last_post_time = ' . $current_time;
+ $sql_data[FORUMS_TABLE]['stat'][] = 'forum_last_poster_id = ' . (int) $user->data['user_id'];
+ $sql_data[FORUMS_TABLE]['stat'][] = "forum_last_poster_name = '" . $db->sql_escape((!$user->data['is_registered'] && $username) ? $username : (($user->data['user_id'] != ANONYMOUS) ? $user->data['username'] : '')) . "'";
+ $sql_data[FORUMS_TABLE]['stat'][] = "forum_last_poster_colour = '" . $db->sql_escape($user->data['user_colour']) . "'";
}
- // unglobalise
- else if ($topic_row['topic_type'] == POST_GLOBAL && $topic_type != POST_GLOBAL)
- {
- // Increment topic/post count
- $sql_data[FORUMS_TABLE]['stat'][] = 'forum_posts = forum_posts + ' . ($topic_row['topic_replies_real'] + 1);
- $sql_data[FORUMS_TABLE]['stat'][] = 'forum_topics_real = forum_topics_real + 1' . (($topic_row['topic_approved']) ? ', forum_topics = forum_topics + 1' : '');
- // Update forum_ids for all posts
- $sql = 'UPDATE ' . POSTS_TABLE . '
- SET forum_id = ' . $data['forum_id'] . '
- WHERE topic_id = ' . $data['topic_id'];
- $db->sql_query($sql);
- }
+ unset($sql_data[POSTS_TABLE]['sql']);
}
// Update the topics table
@@ -2082,6 +1867,8 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
SET ' . $db->sql_build_array('UPDATE', $sql_data[TOPICS_TABLE]['sql']) . '
WHERE topic_id = ' . $data['topic_id'];
$db->sql_query($sql);
+
+ unset($sql_data[TOPICS_TABLE]['sql']);
}
// Update the posts table
@@ -2091,6 +1878,8 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
SET ' . $db->sql_build_array('UPDATE', $sql_data[POSTS_TABLE]['sql']) . '
WHERE post_id = ' . $data['post_id'];
$db->sql_query($sql);
+
+ unset($sql_data[POSTS_TABLE]['sql']);
}
// Update Poll Tables
@@ -2236,187 +2025,25 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
}
}
- // we need to update the last forum information
- // only applicable if the topic is not global and it is approved
- // we also check to make sure we are not dealing with globaling the latest topic (pretty rare but still needs to be checked)
- if ($topic_type != POST_GLOBAL && !$make_global && ($post_approved || !$data['post_approved']))
+ $first_post_has_topic_info = ($post_mode == 'edit_first_post' &&
+ (($post_visibility == ITEM_DELETED && $data['topic_posts_softdeleted'] == 1) ||
+ ($post_visibility == ITEM_UNAPPROVED && $data['topic_posts_unapproved'] == 1) ||
+ ($post_visibility == ITEM_APPROVED && $data['topic_posts_approved'] == 1)));
+ // Fix the post's and topic's visibility and first/last post information, when the post is edited
+ if (($post_mode != 'post' && $post_mode != 'reply') && $data['post_visibility'] != $post_visibility)
{
- // the last post makes us update the forum table. This can happen if...
- // We make a new topic
- // We reply to a topic
- // We edit the last post in a topic and this post is the latest in the forum (maybe)
- // We edit the only post in the topic
- // We edit the first post in the topic and all the other posts are not approved
- if (($post_mode == 'post' || $post_mode == 'reply') && $post_approved)
- {
- $sql_data[FORUMS_TABLE]['stat'][] = 'forum_last_post_id = ' . $data['post_id'];
- $sql_data[FORUMS_TABLE]['stat'][] = "forum_last_post_subject = '" . $db->sql_escape($subject) . "'";
- $sql_data[FORUMS_TABLE]['stat'][] = 'forum_last_post_time = ' . $current_time;
- $sql_data[FORUMS_TABLE]['stat'][] = 'forum_last_poster_id = ' . (int) $user->data['user_id'];
- $sql_data[FORUMS_TABLE]['stat'][] = "forum_last_poster_name = '" . $db->sql_escape((!$user->data['is_registered'] && $username) ? $username : (($user->data['user_id'] != ANONYMOUS) ? $user->data['username'] : '')) . "'";
- $sql_data[FORUMS_TABLE]['stat'][] = "forum_last_poster_colour = '" . $db->sql_escape($user->data['user_colour']) . "'";
- }
- else if ($post_mode == 'edit_last_post' || $post_mode == 'edit_topic' || ($post_mode == 'edit_first_post' && !$data['topic_replies']))
- {
- // this does not _necessarily_ mean that we must update the info again,
- // it just means that we might have to
- $sql = 'SELECT forum_last_post_id, forum_last_post_subject
- FROM ' . FORUMS_TABLE . '
- WHERE forum_id = ' . (int) $data['forum_id'];
- $result = $db->sql_query($sql);
- $row = $db->sql_fetchrow($result);
- $db->sql_freeresult($result);
-
- // this post is the latest post in the forum, better update
- if ($row['forum_last_post_id'] == $data['post_id'])
- {
- // If post approved and subject changed, or poster is anonymous, we need to update the forum_last* rows
- if ($post_approved && ($row['forum_last_post_subject'] !== $subject || $data['poster_id'] == ANONYMOUS))
- {
- // the post's subject changed
- if ($row['forum_last_post_subject'] !== $subject)
- {
- $sql_data[FORUMS_TABLE]['stat'][] = 'forum_last_post_subject = \'' . $db->sql_escape($subject) . '\'';
- }
-
- // Update the user name if poster is anonymous... just in case an admin changed it
- if ($data['poster_id'] == ANONYMOUS)
- {
- $sql_data[FORUMS_TABLE]['stat'][] = "forum_last_poster_name = '" . $db->sql_escape($username) . "'";
- }
- }
- else if ($data['post_approved'] !== $post_approved)
- {
- // we need a fresh change of socks, everything has become invalidated
- $sql = 'SELECT MAX(topic_last_post_id) as last_post_id
- FROM ' . TOPICS_TABLE . '
- WHERE forum_id = ' . (int) $data['forum_id'] . '
- AND topic_approved = 1';
- $result = $db->sql_query($sql);
- $row = $db->sql_fetchrow($result);
- $db->sql_freeresult($result);
-
- // any posts left in this forum?
- if (!empty($row['last_post_id']))
- {
- $sql = 'SELECT p.post_id, p.post_subject, p.post_time, p.poster_id, p.post_username, u.user_id, u.username, u.user_colour
- FROM ' . POSTS_TABLE . ' p, ' . USERS_TABLE . ' u
- WHERE p.poster_id = u.user_id
- AND p.post_id = ' . (int) $row['last_post_id'];
- $result = $db->sql_query($sql);
- $row = $db->sql_fetchrow($result);
- $db->sql_freeresult($result);
-
- // salvation, a post is found! jam it into the forums table
- $sql_data[FORUMS_TABLE]['stat'][] = 'forum_last_post_id = ' . (int) $row['post_id'];
- $sql_data[FORUMS_TABLE]['stat'][] = "forum_last_post_subject = '" . $db->sql_escape($row['post_subject']) . "'";
- $sql_data[FORUMS_TABLE]['stat'][] = 'forum_last_post_time = ' . (int) $row['post_time'];
- $sql_data[FORUMS_TABLE]['stat'][] = 'forum_last_poster_id = ' . (int) $row['poster_id'];
- $sql_data[FORUMS_TABLE]['stat'][] = "forum_last_poster_name = '" . $db->sql_escape(($row['poster_id'] == ANONYMOUS) ? $row['post_username'] : $row['username']) . "'";
- $sql_data[FORUMS_TABLE]['stat'][] = "forum_last_poster_colour = '" . $db->sql_escape($row['user_colour']) . "'";
- }
- else
- {
- // just our luck, the last topic in the forum has just been turned unapproved...
- $sql_data[FORUMS_TABLE]['stat'][] = 'forum_last_post_id = 0';
- $sql_data[FORUMS_TABLE]['stat'][] = "forum_last_post_subject = ''";
- $sql_data[FORUMS_TABLE]['stat'][] = 'forum_last_post_time = 0';
- $sql_data[FORUMS_TABLE]['stat'][] = 'forum_last_poster_id = 0';
- $sql_data[FORUMS_TABLE]['stat'][] = "forum_last_poster_name = ''";
- $sql_data[FORUMS_TABLE]['stat'][] = "forum_last_poster_colour = ''";
- }
- }
- }
- }
- }
- else if ($make_global)
- {
- // somebody decided to be a party pooper, we must recalculate the whole shebang (maybe)
- $sql = 'SELECT forum_last_post_id
- FROM ' . FORUMS_TABLE . '
- WHERE forum_id = ' . (int) $data['forum_id'];
- $result = $db->sql_query($sql);
- $forum_row = $db->sql_fetchrow($result);
- $db->sql_freeresult($result);
-
- // we made a topic global, go get new data
- if ($topic_row['topic_type'] != POST_GLOBAL && $topic_type == POST_GLOBAL && $forum_row['forum_last_post_id'] == $topic_row['topic_last_post_id'])
- {
- // we need a fresh change of socks, everything has become invalidated
- $sql = 'SELECT MAX(topic_last_post_id) as last_post_id
- FROM ' . TOPICS_TABLE . '
- WHERE forum_id = ' . (int) $data['forum_id'] . '
- AND topic_approved = 1';
- $result = $db->sql_query($sql);
- $row = $db->sql_fetchrow($result);
- $db->sql_freeresult($result);
-
- // any posts left in this forum?
- if (!empty($row['last_post_id']))
- {
- $sql = 'SELECT p.post_id, p.post_subject, p.post_time, p.poster_id, p.post_username, u.user_id, u.username, u.user_colour
- FROM ' . POSTS_TABLE . ' p, ' . USERS_TABLE . ' u
- WHERE p.poster_id = u.user_id
- AND p.post_id = ' . (int) $row['last_post_id'];
- $result = $db->sql_query($sql);
- $row = $db->sql_fetchrow($result);
- $db->sql_freeresult($result);
-
- // salvation, a post is found! jam it into the forums table
- $sql_data[FORUMS_TABLE]['stat'][] = 'forum_last_post_id = ' . (int) $row['post_id'];
- $sql_data[FORUMS_TABLE]['stat'][] = "forum_last_post_subject = '" . $db->sql_escape($row['post_subject']) . "'";
- $sql_data[FORUMS_TABLE]['stat'][] = 'forum_last_post_time = ' . (int) $row['post_time'];
- $sql_data[FORUMS_TABLE]['stat'][] = 'forum_last_poster_id = ' . (int) $row['poster_id'];
- $sql_data[FORUMS_TABLE]['stat'][] = "forum_last_poster_name = '" . $db->sql_escape(($row['poster_id'] == ANONYMOUS) ? $row['post_username'] : $row['username']) . "'";
- $sql_data[FORUMS_TABLE]['stat'][] = "forum_last_poster_colour = '" . $db->sql_escape($row['user_colour']) . "'";
- }
- else
- {
- // just our luck, the last topic in the forum has just been globalized...
- $sql_data[FORUMS_TABLE]['stat'][] = 'forum_last_post_id = 0';
- $sql_data[FORUMS_TABLE]['stat'][] = "forum_last_post_subject = ''";
- $sql_data[FORUMS_TABLE]['stat'][] = 'forum_last_post_time = 0';
- $sql_data[FORUMS_TABLE]['stat'][] = 'forum_last_poster_id = 0';
- $sql_data[FORUMS_TABLE]['stat'][] = "forum_last_poster_name = ''";
- $sql_data[FORUMS_TABLE]['stat'][] = "forum_last_poster_colour = ''";
- }
- }
- else if ($topic_row['topic_type'] == POST_GLOBAL && $topic_type != POST_GLOBAL && $forum_row['forum_last_post_id'] < $topic_row['topic_last_post_id'])
- {
- // this post has a higher id, it is newer
- $sql = 'SELECT p.post_id, p.post_subject, p.post_time, p.poster_id, p.post_username, u.user_id, u.username, u.user_colour
- FROM ' . POSTS_TABLE . ' p, ' . USERS_TABLE . ' u
- WHERE p.poster_id = u.user_id
- AND p.post_id = ' . (int) $topic_row['topic_last_post_id'];
- $result = $db->sql_query($sql);
- $row = $db->sql_fetchrow($result);
- $db->sql_freeresult($result);
+ // If the post was not approved, it could also be the starter,
+ // so we sync the starter after approving/restoring, to ensure that the stats are correct
+ // Same applies for the last post
+ $is_starter = ($post_mode == 'edit_first_post' || $data['post_visibility'] != ITEM_APPROVED);
+ $is_latest = ($post_mode == 'edit_last_post' || $post_mode == 'edit_topic' || $data['post_visibility'] != ITEM_APPROVED);
- // salvation, a post is found! jam it into the forums table
- $sql_data[FORUMS_TABLE]['stat'][] = 'forum_last_post_id = ' . (int) $row['post_id'];
- $sql_data[FORUMS_TABLE]['stat'][] = "forum_last_post_subject = '" . $db->sql_escape($row['post_subject']) . "'";
- $sql_data[FORUMS_TABLE]['stat'][] = 'forum_last_post_time = ' . (int) $row['post_time'];
- $sql_data[FORUMS_TABLE]['stat'][] = 'forum_last_poster_id = ' . (int) $row['poster_id'];
- $sql_data[FORUMS_TABLE]['stat'][] = "forum_last_poster_name = '" . $db->sql_escape(($row['poster_id'] == ANONYMOUS) ? $row['post_username'] : $row['username']) . "'";
- $sql_data[FORUMS_TABLE]['stat'][] = "forum_last_poster_colour = '" . $db->sql_escape($row['user_colour']) . "'";
- }
+ $phpbb_content_visibility = $phpbb_container->get('content.visibility');
+ $phpbb_content_visibility->set_post_visibility($post_visibility, $data['post_id'], $data['topic_id'], $data['forum_id'], $user->data['user_id'], time(), '', $is_starter, $is_latest);
}
-
- // topic sync time!
- // simply, we update if it is a reply or the last post is edited
- if ($post_approved)
+ else if ($post_mode == 'edit_last_post' || $post_mode == 'edit_topic' || $first_post_has_topic_info)
{
- // reply requires the whole thing
- if ($post_mode == 'reply')
- {
- $sql_data[TOPICS_TABLE]['stat'][] = 'topic_last_post_id = ' . (int) $data['post_id'];
- $sql_data[TOPICS_TABLE]['stat'][] = 'topic_last_poster_id = ' . (int) $user->data['user_id'];
- $sql_data[TOPICS_TABLE]['stat'][] = "topic_last_poster_name = '" . $db->sql_escape((!$user->data['is_registered'] && $username) ? $username : (($user->data['user_id'] != ANONYMOUS) ? $user->data['username'] : '')) . "'";
- $sql_data[TOPICS_TABLE]['stat'][] = "topic_last_poster_colour = '" . (($user->data['user_id'] != ANONYMOUS) ? $db->sql_escape($user->data['user_colour']) : '') . "'";
- $sql_data[TOPICS_TABLE]['stat'][] = "topic_last_post_subject = '" . $db->sql_escape($subject) . "'";
- $sql_data[TOPICS_TABLE]['stat'][] = 'topic_last_post_time = ' . (int) $current_time;
- }
- else if ($post_mode == 'edit_last_post' || $post_mode == 'edit_topic' || ($post_mode == 'edit_first_post' && !$data['topic_replies']))
+ if ($post_visibility == ITEM_APPROVED || $data['topic_visibility'] == $post_visibility)
{
// only the subject can be changed from edit
$sql_data[TOPICS_TABLE]['stat'][] = "topic_last_post_subject = '" . $db->sql_escape($subject) . "'";
@@ -2426,57 +2053,44 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
{
$sql_data[TOPICS_TABLE]['stat'][] = "topic_last_poster_name = '" . $db->sql_escape($username) . "'";
}
- }
- }
- else if (!$data['post_approved'] && ($post_mode == 'edit_last_post' || $post_mode == 'edit_topic' || ($post_mode == 'edit_first_post' && !$data['topic_replies'])))
- {
- // like having the rug pulled from under us
- $sql = 'SELECT MAX(post_id) as last_post_id
- FROM ' . POSTS_TABLE . '
- WHERE topic_id = ' . (int) $data['topic_id'] . '
- AND post_approved = 1';
- $result = $db->sql_query($sql);
- $row = $db->sql_fetchrow($result);
- $db->sql_freeresult($result);
-
- // any posts left in this forum?
- if (!empty($row['last_post_id']))
- {
- $sql = 'SELECT p.post_id, p.post_subject, p.post_time, p.poster_id, p.post_username, u.user_id, u.username, u.user_colour
- FROM ' . POSTS_TABLE . ' p, ' . USERS_TABLE . ' u
- WHERE p.poster_id = u.user_id
- AND p.post_id = ' . (int) $row['last_post_id'];
- $result = $db->sql_query($sql);
- $row = $db->sql_fetchrow($result);
- $db->sql_freeresult($result);
- // salvation, a post is found! jam it into the topics table
- $sql_data[TOPICS_TABLE]['stat'][] = 'topic_last_post_id = ' . (int) $row['post_id'];
- $sql_data[TOPICS_TABLE]['stat'][] = "topic_last_post_subject = '" . $db->sql_escape($row['post_subject']) . "'";
- $sql_data[TOPICS_TABLE]['stat'][] = 'topic_last_post_time = ' . (int) $row['post_time'];
- $sql_data[TOPICS_TABLE]['stat'][] = 'topic_last_poster_id = ' . (int) $row['poster_id'];
- $sql_data[TOPICS_TABLE]['stat'][] = "topic_last_poster_name = '" . $db->sql_escape(($row['poster_id'] == ANONYMOUS) ? $row['post_username'] : $row['username']) . "'";
- $sql_data[TOPICS_TABLE]['stat'][] = "topic_last_poster_colour = '" . $db->sql_escape($row['user_colour']) . "'";
- }
- }
+ if ($post_visibility == ITEM_APPROVED)
+ {
+ // this does not _necessarily_ mean that we must update the info again,
+ // it just means that we might have to
+ $sql = 'SELECT forum_last_post_id, forum_last_post_subject
+ FROM ' . FORUMS_TABLE . '
+ WHERE forum_id = ' . (int) $data['forum_id'];
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
- // Update total post count, do not consider moderated posts/topics
- if ($post_approval)
- {
- if ($post_mode == 'post')
- {
- set_config_count('num_topics', 1, true);
- set_config_count('num_posts', 1, true);
- }
+ // this post is the latest post in the forum, better update
+ if ($row['forum_last_post_id'] == $data['post_id'] && ($row['forum_last_post_subject'] !== $subject || $data['poster_id'] == ANONYMOUS))
+ {
+ // the post's subject changed
+ if ($row['forum_last_post_subject'] !== $subject)
+ {
+ $sql_data[FORUMS_TABLE]['stat'][] = "forum_last_post_subject = '" . $db->sql_escape($subject) . "'";
+ }
- if ($post_mode == 'reply')
- {
- set_config_count('num_posts', 1, true);
+ // Update the user name if poster is anonymous... just in case a moderator changed it
+ if ($data['poster_id'] == ANONYMOUS)
+ {
+ $sql_data[FORUMS_TABLE]['stat'][] = "forum_last_poster_name = '" . $db->sql_escape($username) . "'";
+ }
+ }
+ }
}
}
// Update forum stats
- $where_sql = array(POSTS_TABLE => 'post_id = ' . $data['post_id'], TOPICS_TABLE => 'topic_id = ' . $data['topic_id'], FORUMS_TABLE => 'forum_id = ' . $data['forum_id'], USERS_TABLE => 'user_id = ' . $poster_id);
+ $where_sql = array(
+ POSTS_TABLE => 'post_id = ' . $data['post_id'],
+ TOPICS_TABLE => 'topic_id = ' . $data['topic_id'],
+ FORUMS_TABLE => 'forum_id = ' . $data['forum_id'],
+ USERS_TABLE => 'user_id = ' . $poster_id
+ );
foreach ($sql_data as $table => $update_ary)
{
@@ -2488,7 +2102,7 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
}
// Delete topic shadows (if any exist). We do not need a shadow topic for an global announcement
- if ($make_global)
+ if ($topic_type == POST_GLOBAL)
{
$sql = 'DELETE FROM ' . TOPICS_TABLE . '
WHERE topic_moved_id = ' . $data['topic_id'];
@@ -2512,27 +2126,22 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
if ($update_search_index && $data['enable_indexing'])
{
// Select the search method and do some additional checks to ensure it can actually be utilised
- $search_type = basename($config['search_type']);
-
- if (!file_exists($phpbb_root_path . 'includes/search/' . $search_type . '.' . $phpEx))
- {
- trigger_error('NO_SUCH_SEARCH_MODULE');
- }
+ $search_type = $config['search_type'];
if (!class_exists($search_type))
{
- include("{$phpbb_root_path}includes/search/$search_type.$phpEx");
+ trigger_error('NO_SUCH_SEARCH_MODULE');
}
$error = false;
- $search = new $search_type($error);
+ $search = new $search_type($error, $phpbb_root_path, $phpEx, $auth, $config, $db, $user);
if ($error)
{
trigger_error($error);
}
- $search->index($mode, $data['post_id'], $data['message'], $subject, $poster_id, ($topic_type == POST_GLOBAL) ? 0 : $data['forum_id']);
+ $search->index($mode, $data['post_id'], $data['message'], $subject, $poster_id, $data['forum_id']);
}
// Topic Notification, do not change if moderator is changing other users posts...
@@ -2561,7 +2170,7 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
// Mark this topic as read
// We do not use post_time here, this is intended (post_time can have a date in the past if editing a message)
- markread('topic', (($topic_type == POST_GLOBAL) ? 0 : $data['forum_id']), $data['topic_id'], time());
+ markread('topic', $data['forum_id'], $data['topic_id'], time());
//
if ($config['load_db_lastread'] && $user->data['is_registered'])
@@ -2569,7 +2178,7 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
$sql = 'SELECT mark_time
FROM ' . FORUMS_TRACK_TABLE . '
WHERE user_id = ' . $user->data['user_id'] . '
- AND forum_id = ' . (($topic_type == POST_GLOBAL) ? 0 : $data['forum_id']);
+ AND forum_id = ' . $data['forum_id'];
$result = $db->sql_query($sql);
$f_mark_time = (int) $db->sql_fetchfield('mark_time');
$db->sql_freeresult($result);
@@ -2582,38 +2191,123 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
if (($config['load_db_lastread'] && $user->data['is_registered']) || $config['load_anon_lastread'] || $user->data['is_registered'])
{
// Update forum info
- if ($topic_type == POST_GLOBAL)
- {
- $sql = 'SELECT MAX(topic_last_post_time) as forum_last_post_time
- FROM ' . TOPICS_TABLE . '
- WHERE forum_id = 0';
- }
- else
- {
- $sql = 'SELECT forum_last_post_time
- FROM ' . FORUMS_TABLE . '
- WHERE forum_id = ' . $data['forum_id'];
- }
+ $sql = 'SELECT forum_last_post_time
+ FROM ' . FORUMS_TABLE . '
+ WHERE forum_id = ' . $data['forum_id'];
$result = $db->sql_query($sql);
$forum_last_post_time = (int) $db->sql_fetchfield('forum_last_post_time');
$db->sql_freeresult($result);
- update_forum_tracking_info((($topic_type == POST_GLOBAL) ? 0 : $data['forum_id']), $forum_last_post_time, $f_mark_time, false);
+ update_forum_tracking_info($data['forum_id'], $forum_last_post_time, $f_mark_time, false);
}
+ // If a username was supplied or the poster is a guest, we will use the supplied username.
+ // Doing it this way we can use "...post by guest-username..." in notifications when
+ // "guest-username" is supplied or ommit the username if it is not.
+ $username = ($username !== '' || !$user->data['is_registered']) ? $username : $user->data['username'];
+
// Send Notifications
- if (($mode == 'reply' || $mode == 'quote' || $mode == 'post') && $post_approval)
+ $notification_data = array_merge($data, array(
+ 'topic_title' => (isset($data['topic_title'])) ? $data['topic_title'] : $subject,
+ 'post_username' => $username,
+ 'poster_id' => $poster_id,
+ 'post_text' => $data['message'],
+ 'post_time' => $current_time,
+ 'post_subject' => $subject,
+ ));
+
+ $phpbb_notifications = $phpbb_container->get('notification_manager');
+
+ if ($post_visibility == ITEM_APPROVED)
{
- // If a username was supplied or the poster is a guest, we will use the supplied username.
- // Doing it this way we can use "...post by guest-username..." in notifications when
- // "guest-username" is supplied or ommit the username if it is not.
- $username = ($username !== '' || !$user->data['is_registered']) ? $username : $user->data['username'];
- user_notification($mode, $subject, $data['topic_title'], $data['forum_name'], $data['forum_id'], $data['topic_id'], $data['post_id'], $username);
+ switch ($mode)
+ {
+ case 'post':
+ $phpbb_notifications->add_notifications(array(
+ 'quote',
+ 'topic',
+ ), $notification_data);
+ break;
+
+ case 'reply':
+ case 'quote':
+ $phpbb_notifications->add_notifications(array(
+ 'quote',
+ 'bookmark',
+ 'post',
+ ), $notification_data);
+ break;
+
+ case 'edit_topic':
+ case 'edit_first_post':
+ case 'edit':
+ case 'edit_last_post':
+ $phpbb_notifications->update_notifications(array(
+ 'quote',
+ 'bookmark',
+ 'topic',
+ 'post',
+ ), $notification_data);
+ break;
+ }
+ }
+ else if ($post_visibility == ITEM_UNAPPROVED)
+ {
+ switch ($mode)
+ {
+ case 'post':
+ $phpbb_notifications->add_notifications('topic_in_queue', $notification_data);
+ break;
+
+ case 'reply':
+ case 'quote':
+ $phpbb_notifications->add_notifications('post_in_queue', $notification_data);
+ break;
+
+ case 'edit_topic':
+ case 'edit_first_post':
+ case 'edit':
+ case 'edit_last_post':
+ // @todo: Check whether these notification deletions are correct
+ $phpbb_notifications->delete_notifications('topic', $data['topic_id']);
+
+ $phpbb_notifications->delete_notifications(array(
+ 'quote',
+ 'bookmark',
+ 'post',
+ ), $data['post_id']);
+ break;
+ }
+ }
+ else if ($post_visibility == ITEM_DELETED)
+ {
+ switch ($mode)
+ {
+ case 'post':
+ case 'reply':
+ case 'quote':
+ // Nothing to do here
+ break;
+
+ case 'edit_topic':
+ case 'edit_first_post':
+ case 'edit':
+ case 'edit_last_post':
+ // @todo: Check whether these notification deletions are correct
+ $phpbb_notifications->delete_notifications('topic', $data['topic_id']);
+
+ $phpbb_notifications->delete_notifications(array(
+ 'quote',
+ 'bookmark',
+ 'post',
+ ), $data['post_id']);
+ break;
+ }
}
$params = $add_anchor = '';
- if ($post_approval)
+ if ($post_visibility == ITEM_APPROVED)
{
$params .= '&amp;t=' . $data['topic_id'];
@@ -2631,6 +2325,23 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
$url = (!$params) ? "{$phpbb_root_path}viewforum.$phpEx" : "{$phpbb_root_path}viewtopic.$phpEx";
$url = append_sid($url, 'f=' . $data['forum_id'] . $params) . $add_anchor;
+ /**
+ * This event is used for performing actions directly after a post or topic
+ * has been submitted. When a new topic is posted, the topic ID is
+ * available in the $data array.
+ *
+ * The only action that can be done by altering data made available to this
+ * event is to modify the return URL ($url).
+ *
+ * @event core.submit_post_end
+ * @var string url The "Return to topic" URL
+ * @var array data Array of post data about the
+ * submitted post
+ * @since 3.1-A3
+ */
+ $vars = array('url', 'data');
+ extract($phpbb_dispatcher->trigger_event('core.submit_post_end', compact($vars)));
+
return $url;
}
@@ -2735,5 +2446,3 @@ function phpbb_bump_topic($forum_id, $topic_id, $post_data, $bump_time = false)
return $url;
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/functions_privmsgs.php b/phpBB/includes/functions_privmsgs.php
index b08d6e7f5c..17d67b4a23 100644
--- a/phpBB/includes/functions_privmsgs.php
+++ b/phpBB/includes/functions_privmsgs.php
@@ -2,9 +2,8 @@
/**
*
* @package phpBB3
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -19,7 +18,8 @@ if (!defined('IN_PHPBB'))
Ability to simply add own rules by doing three things:
1) Add an appropriate constant
2) Add a new check array to the global_privmsgs_rules variable and the condition array (if one is required)
- 3) Add a new language variable to ucp.php
+ 3) Implement the rule logic in the check_rule() function
+ 4) Add a new language variable to ucp.php
The user is then able to select the new rule. It will be checked against and handled as specified.
To add new actions (yes, checks can be added here too) to the rule management, the core code has to be modified.
@@ -57,42 +57,42 @@ define('CHECK_TO', 5);
*/
$global_privmsgs_rules = array(
CHECK_SUBJECT => array(
- RULE_IS_LIKE => array('check0' => 'message_subject', 'function' => 'preg_match("/" . preg_quote({STRING}, "/") . "/i", {CHECK0})'),
- RULE_IS_NOT_LIKE => array('check0' => 'message_subject', 'function' => '!(preg_match("/" . preg_quote({STRING}, "/") . "/i", {CHECK0}))'),
- RULE_IS => array('check0' => 'message_subject', 'function' => '{CHECK0} == {STRING}'),
- RULE_IS_NOT => array('check0' => 'message_subject', 'function' => '{CHECK0} != {STRING}'),
- RULE_BEGINS_WITH => array('check0' => 'message_subject', 'function' => 'preg_match("/^" . preg_quote({STRING}, "/") . "/i", {CHECK0})'),
- RULE_ENDS_WITH => array('check0' => 'message_subject', 'function' => 'preg_match("/" . preg_quote({STRING}, "/") . "$/i", {CHECK0})'),
+ RULE_IS_LIKE => array('check0' => 'message_subject'),
+ RULE_IS_NOT_LIKE => array('check0' => 'message_subject'),
+ RULE_IS => array('check0' => 'message_subject'),
+ RULE_IS_NOT => array('check0' => 'message_subject'),
+ RULE_BEGINS_WITH => array('check0' => 'message_subject'),
+ RULE_ENDS_WITH => array('check0' => 'message_subject'),
),
CHECK_SENDER => array(
- RULE_IS_LIKE => array('check0' => 'username', 'function' => 'preg_match("/" . preg_quote({STRING}, "/") . "/i", {CHECK0})'),
- RULE_IS_NOT_LIKE => array('check0' => 'username', 'function' => '!(preg_match("/" . preg_quote({STRING}, "/") . "/i", {CHECK0}))'),
- RULE_IS => array('check0' => 'username', 'function' => '{CHECK0} == {STRING}'),
- RULE_IS_NOT => array('check0' => 'username', 'function' => '{CHECK0} != {STRING}'),
- RULE_BEGINS_WITH => array('check0' => 'username', 'function' => 'preg_match("/^" . preg_quote({STRING}, "/") . "/i", {CHECK0})'),
- RULE_ENDS_WITH => array('check0' => 'username', 'function' => 'preg_match("/" . preg_quote({STRING}, "/") . "$/i", {CHECK0})'),
- RULE_IS_FRIEND => array('check0' => 'friend', 'function' => '{CHECK0} == 1'),
- RULE_IS_FOE => array('check0' => 'foe', 'function' => '{CHECK0} == 1'),
- RULE_IS_USER => array('check0' => 'author_id', 'function' => '{CHECK0} == {USER_ID}'),
- RULE_IS_GROUP => array('check0' => 'author_in_group', 'function' => 'in_array({GROUP_ID}, {CHECK0})'),
+ RULE_IS_LIKE => array('check0' => 'username'),
+ RULE_IS_NOT_LIKE => array('check0' => 'username'),
+ RULE_IS => array('check0' => 'username'),
+ RULE_IS_NOT => array('check0' => 'username'),
+ RULE_BEGINS_WITH => array('check0' => 'username'),
+ RULE_ENDS_WITH => array('check0' => 'username'),
+ RULE_IS_FRIEND => array('check0' => 'friend'),
+ RULE_IS_FOE => array('check0' => 'foe'),
+ RULE_IS_USER => array('check0' => 'author_id'),
+ RULE_IS_GROUP => array('check0' => 'author_in_group'),
),
CHECK_MESSAGE => array(
- RULE_IS_LIKE => array('check0' => 'message_text', 'function' => 'preg_match("/" . preg_quote({STRING}, "/") . "/i", {CHECK0})'),
- RULE_IS_NOT_LIKE => array('check0' => 'message_text', 'function' => '!(preg_match("/" . preg_quote({STRING}, "/") . "/i", {CHECK0}))'),
- RULE_IS => array('check0' => 'message_text', 'function' => '{CHECK0} == {STRING}'),
- RULE_IS_NOT => array('check0' => 'message_text', 'function' => '{CHECK0} != {STRING}'),
+ RULE_IS_LIKE => array('check0' => 'message_text'),
+ RULE_IS_NOT_LIKE => array('check0' => 'message_text'),
+ RULE_IS => array('check0' => 'message_text'),
+ RULE_IS_NOT => array('check0' => 'message_text'),
),
CHECK_STATUS => array(
- RULE_ANSWERED => array('check0' => 'pm_replied', 'function' => '{CHECK0} == 1'),
- RULE_FORWARDED => array('check0' => 'pm_forwarded', 'function' => '{CHECK0} == 1'),
+ RULE_ANSWERED => array('check0' => 'pm_replied'),
+ RULE_FORWARDED => array('check0' => 'pm_forwarded'),
),
CHECK_TO => array(
- RULE_TO_GROUP => array('check0' => 'to', 'check1' => 'bcc', 'check2' => 'user_in_group', 'function' => 'in_array("g_" . {CHECK2}, {CHECK0}) || in_array("g_" . {CHECK2}, {CHECK1})'),
- RULE_TO_ME => array('check0' => 'to', 'check1' => 'bcc', 'function' => 'in_array("u_" . $user_id, {CHECK0}) || in_array("u_" . $user_id, {CHECK1})'),
+ RULE_TO_GROUP => array('check0' => 'to', 'check1' => 'bcc', 'check2' => 'user_in_group'),
+ RULE_TO_ME => array('check0' => 'to', 'check1' => 'bcc'),
)
);
@@ -260,16 +260,60 @@ function check_rule(&$rules, &$rule_row, &$message_row, $user_id)
$check_ary = $rules[$rule_row['rule_check']][$rule_row['rule_connection']];
- // Replace Check Literals
- $evaluate = $check_ary['function'];
- $evaluate = preg_replace('/{(CHECK[0-9])}/', '$message_row[$check_ary[strtolower("\1")]]', $evaluate);
+ $result = false;
- // Replace Rule Literals
- $evaluate = preg_replace('/{(STRING|USER_ID|GROUP_ID)}/', '$rule_row["rule_" . strtolower("\1")]', $evaluate);
+ $check0 = $message_row[$check_ary['check0']];
+
+ switch ($rule_row['rule_connection'])
+ {
+ case RULE_IS_LIKE:
+ $result = preg_match("/" . preg_quote($rule_row['rule_string'], '/') . '/i', $check0);
+ break;
+
+ case RULE_IS_NOT_LIKE:
+ $result = !preg_match("/" . preg_quote($rule_row['rule_string'], '/') . '/i', $check0);
+ break;
+
+ case RULE_IS:
+ $result = ($check0 == $rule_row['rule_string']);
+ break;
+
+ case RULE_IS_NOT:
+ $result = ($check0 != $rule_row['rule_string']);
+ break;
+
+ case RULE_BEGINS_WITH:
+ $result = preg_match("/^" . preg_quote($rule_row['rule_string'], '/') . '/i', $check0);
+ break;
+
+ case RULE_ENDS_WITH:
+ $result = preg_match("/" . preg_quote($rule_row['rule_string'], '/') . '$/i', $check0);
+ break;
+
+ case RULE_IS_FRIEND:
+ case RULE_IS_FOE:
+ case RULE_ANSWERED:
+ case RULE_FORWARDED:
+ $result = ($check0 == 1);
+ break;
+
+ case RULE_IS_USER:
+ $result = ($check0 == $rule_row['rule_user_id']);
+ break;
+
+ case RULE_IS_GROUP:
+ $result = in_array($rule_row['rule_group_id'], $check0);
+ break;
+
+ case RULE_TO_GROUP:
+ $result = (in_array('g_' . $message_row[$check_ary['check2']], $check0) || in_array('g_' . $message_row[$check_ary['check2']], $message_row[$check_ary['check1']]));
+ break;
+
+ case RULE_TO_ME:
+ $result = (in_array('u_' . $user_id, $check0) || in_array('u_' . $user_id, $message_row[$check_ary['check1']]));
+ break;
+ }
- // Evil Statement
- $result = false;
- eval('$result = (' . $evaluate . ') ? true : false;');
if (!$result)
{
@@ -299,7 +343,7 @@ function check_rule(&$rules, &$rule_row, &$message_row, $user_id)
$userdata = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
- $auth2 = new auth();
+ $auth2 = new \phpbb\auth\auth();
$auth2->acl($userdata);
if (!$auth2->acl_get('a_') && !$auth2->acl_get('m_') && !$auth2->acl_getf_global('m_'))
@@ -832,7 +876,11 @@ function update_unread_status($unread, $msg_id, $user_id, $folder_id)
return;
}
- global $db, $user;
+ global $db, $user, $phpbb_container;
+
+ $phpbb_notifications = $phpbb_container->get('notification_manager');
+
+ $phpbb_notifications->mark_notifications_read('pm', $msg_id, $user_id);
$sql = 'UPDATE ' . PRIVMSGS_TO_TABLE . "
SET pm_unread = 0
@@ -937,7 +985,7 @@ function handle_mark_actions($user_id, $mark_action)
*/
function delete_pm($user_id, $msg_ids, $folder_id)
{
- global $db, $user, $phpbb_root_path, $phpEx;
+ global $db, $user, $phpbb_root_path, $phpEx, $phpbb_container;
$user_id = (int) $user_id;
$folder_id = (int) $folder_id;
@@ -1049,6 +1097,10 @@ function delete_pm($user_id, $msg_ids, $folder_id)
$user->data['user_unread_privmsg'] -= $num_unread;
}
+ $phpbb_notifications = $phpbb_container->get('notification_manager');
+
+ $phpbb_notifications->delete_notifications('pm', array_keys($delete_rows));
+
// Now we have to check which messages we can delete completely
$sql = 'SELECT msg_id
FROM ' . PRIVMSGS_TO_TABLE . '
@@ -1101,6 +1153,23 @@ function phpbb_delete_user_pms($user_id)
return false;
}
+ return phpbb_delete_users_pms(array($user_id));
+}
+
+/**
+* Delete all PM(s) for given users and delete the ones without references
+*
+* @param array $user_ids IDs of the users whose private messages we want to delete
+*
+* @return boolean False if there were no pms found, true otherwise.
+*/
+function phpbb_delete_users_pms($user_ids)
+{
+ global $db, $user, $phpbb_root_path, $phpEx, $phpbb_container;
+
+ $user_id_sql = $db->sql_in_set('user_id', $user_ids);
+ $author_id_sql = $db->sql_in_set('author_id', $user_ids);
+
// Get PM Information for later deleting
// The two queries where split, so we can use our indexes
$undelivered_msg = $delete_ids = array();
@@ -1108,7 +1177,7 @@ function phpbb_delete_user_pms($user_id)
// Part 1: get PMs the user received
$sql = 'SELECT msg_id
FROM ' . PRIVMSGS_TO_TABLE . '
- WHERE user_id = ' . $user_id;
+ WHERE ' . $user_id_sql;
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
@@ -1118,12 +1187,12 @@ function phpbb_delete_user_pms($user_id)
}
$db->sql_freeresult($result);
- // Part 2: get PMs the user sent, but have yet to be received
- // We cannot simply delete them. First we have to check,
+ // Part 2: get PMs the users sent, but are yet to be received.
+ // We cannot simply delete them. First we have to check
// whether another user already received and read the message.
$sql = 'SELECT msg_id
FROM ' . PRIVMSGS_TO_TABLE . '
- WHERE author_id = ' . $user_id . '
+ WHERE ' . $author_id_sql . '
AND folder_id = ' . PRIVMSGS_NO_BOX;
$result = $db->sql_query($sql);
@@ -1141,6 +1210,8 @@ function phpbb_delete_user_pms($user_id)
$db->sql_transaction('begin');
+ $phpbb_notifications = $phpbb_container->get('notification_manager');
+
if (!empty($undelivered_msg))
{
// A pm is delivered, if for any recipient the message was moved
@@ -1149,7 +1220,7 @@ function phpbb_delete_user_pms($user_id)
// received them.
$sql = 'SELECT msg_id
FROM ' . PRIVMSGS_TO_TABLE . '
- WHERE author_id = ' . $user_id . '
+ WHERE ' . $author_id_sql . '
AND folder_id <> ' . PRIVMSGS_NO_BOX . '
AND folder_id <> ' . PRIVMSGS_OUTBOX . '
AND folder_id <> ' . PRIVMSGS_SENTBOX;
@@ -1169,7 +1240,7 @@ function phpbb_delete_user_pms($user_id)
// Count the messages we delete, so we can correct the user pm data
$sql = 'SELECT user_id, COUNT(msg_id) as num_undelivered_privmsgs
FROM ' . PRIVMSGS_TO_TABLE . '
- WHERE author_id = ' . $user_id . '
+ WHERE ' . $author_id_sql . '
AND folder_id = ' . PRIVMSGS_NO_BOX . '
AND ' . $db->sql_in_set('msg_id', array_merge($undelivered_msg, $delivered_msg)) . '
GROUP BY user_id';
@@ -1209,6 +1280,8 @@ function phpbb_delete_user_pms($user_id)
WHERE folder_id = ' . PRIVMSGS_NO_BOX . '
AND ' . $db->sql_in_set('msg_id', $delivered_msg);
$db->sql_query($sql);
+
+ $phpbb_notifications->delete_notifications('pm', $delivered_msg);
}
if (!empty($undelivered_msg))
@@ -1220,6 +1293,8 @@ function phpbb_delete_user_pms($user_id)
$sql = 'DELETE FROM ' . PRIVMSGS_TABLE . '
WHERE ' . $db->sql_in_set('msg_id', $undelivered_msg);
$db->sql_query($sql);
+
+ $phpbb_notifications->delete_notifications('pm', $undelivered_msg);
}
}
@@ -1227,12 +1302,12 @@ function phpbb_delete_user_pms($user_id)
$sql = 'UPDATE ' . USERS_TABLE . '
SET user_new_privmsg = 0,
user_unread_privmsg = 0
- WHERE user_id = ' . $user_id;
+ WHERE ' . $user_id_sql;
$db->sql_query($sql);
// Delete private message data of the user
$sql = 'DELETE FROM ' . PRIVMSGS_TO_TABLE . '
- WHERE user_id = ' . (int) $user_id;
+ WHERE ' . $user_id_sql;
$db->sql_query($sql);
if (!empty($delete_ids))
@@ -1262,6 +1337,8 @@ function phpbb_delete_user_pms($user_id)
$sql = 'DELETE FROM ' . PRIVMSGS_TABLE . '
WHERE ' . $db->sql_in_set('msg_id', $delete_ids);
$db->sql_query($sql);
+
+ $phpbb_notifications->delete_notifications('pm', $delete_ids);
}
}
@@ -1269,12 +1346,12 @@ function phpbb_delete_user_pms($user_id)
// This way users are still able to read messages from users being removed
$sql = 'UPDATE ' . PRIVMSGS_TO_TABLE . '
SET author_id = ' . ANONYMOUS . '
- WHERE author_id = ' . $user_id;
+ WHERE ' . $author_id_sql;
$db->sql_query($sql);
$sql = 'UPDATE ' . PRIVMSGS_TABLE . '
SET author_id = ' . ANONYMOUS . '
- WHERE author_id = ' . $user_id;
+ WHERE ' . $author_id_sql;
$db->sql_query($sql);
$db->sql_transaction('commit');
@@ -1484,7 +1561,7 @@ function get_folder_status($folder_id, $folder)
'percent' => ($user->data['message_limit']) ? (($user->data['message_limit'] > 0) ? round(($folder['num_messages'] / $user->data['message_limit']) * 100) : 100) : 0,
);
- $return['message'] = sprintf($user->lang['FOLDER_STATUS_MSG'], $return['percent'], $return['cur'], $return['max']);
+ $return['message'] = $user->lang('FOLDER_STATUS_MSG', $user->lang('MESSAGES_COUNT', (int) $return['max']), $return['cur'], $return['percent']);
return $return;
}
@@ -1498,7 +1575,7 @@ function get_folder_status($folder_id, $folder)
*/
function submit_pm($mode, $subject, &$data, $put_in_outbox = true)
{
- global $db, $auth, $config, $phpEx, $template, $user, $phpbb_root_path;
+ global $db, $auth, $config, $phpEx, $template, $user, $phpbb_root_path, $phpbb_container;
// We do not handle erasing pms here
if ($mode == 'delete')
@@ -1798,95 +1875,23 @@ function submit_pm($mode, $subject, &$data, $put_in_outbox = true)
$db->sql_transaction('commit');
// Send Notifications
- if ($mode != 'edit')
- {
- pm_notification($mode, $data['from_username'], $recipients, $subject, $data['message'], $data['msg_id']);
- }
-
- return $data['msg_id'];
-}
-
-/**
-* PM Notification
-*/
-function pm_notification($mode, $author, $recipients, $subject, $message, $msg_id)
-{
- global $db, $user, $config, $phpbb_root_path, $phpEx, $auth;
-
- $subject = censor_text($subject);
-
- // Exclude guests, current user and banned users from notifications
- unset($recipients[ANONYMOUS], $recipients[$user->data['user_id']]);
-
- if (!sizeof($recipients))
- {
- return;
- }
-
- if (!function_exists('phpbb_get_banned_user_ids'))
- {
- include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
- }
- $banned_users = phpbb_get_banned_user_ids(array_keys($recipients));
- $recipients = array_diff(array_keys($recipients), $banned_users);
-
- if (!sizeof($recipients))
- {
- return;
- }
-
- $sql = 'SELECT user_id, username, user_email, user_lang, user_notify_pm, user_notify_type, user_jabber
- FROM ' . USERS_TABLE . '
- WHERE ' . $db->sql_in_set('user_id', $recipients);
- $result = $db->sql_query($sql);
+ $pm_data = array_merge($data, array(
+ 'message_subject' => $subject,
+ 'recipients' => $recipients,
+ ));
- $msg_list_ary = array();
- while ($row = $db->sql_fetchrow($result))
- {
- if ($row['user_notify_pm'] == 1 && trim($row['user_email']))
- {
- $msg_list_ary[] = array(
- 'method' => $row['user_notify_type'],
- 'email' => $row['user_email'],
- 'jabber' => $row['user_jabber'],
- 'name' => $row['username'],
- 'lang' => $row['user_lang']
- );
- }
- }
- $db->sql_freeresult($result);
+ $phpbb_notifications = $phpbb_container->get('notification_manager');
- if (!sizeof($msg_list_ary))
+ if ($mode == 'edit')
{
- return;
+ $phpbb_notifications->update_notifications('pm', $pm_data);
}
-
- include_once($phpbb_root_path . 'includes/functions_messenger.' . $phpEx);
- $messenger = new messenger();
-
- foreach ($msg_list_ary as $pos => $addr)
+ else
{
- $messenger->template('privmsg_notify', $addr['lang']);
-
- $messenger->to($addr['email'], $addr['name']);
- $messenger->im($addr['jabber'], $addr['name']);
-
- $messenger->assign_vars(array(
- 'SUBJECT' => htmlspecialchars_decode($subject),
- 'AUTHOR_NAME' => htmlspecialchars_decode($author),
- 'USERNAME' => htmlspecialchars_decode($addr['name']),
-
- 'U_INBOX' => generate_board_url() . "/ucp.$phpEx?i=pm&folder=inbox",
- 'U_VIEW_MESSAGE' => generate_board_url() . "/ucp.$phpEx?i=pm&mode=view&p=$msg_id",
- ));
-
- $messenger->send($addr['method']);
+ $phpbb_notifications->add_notifications('pm', $pm_data);
}
- unset($msg_list_ary);
-
- $messenger->save_queue();
- unset($messenger);
+ return $data['msg_id'];
}
/**
@@ -2013,14 +2018,11 @@ function message_history($msg_id, $user_id, $message_row, $folder, $in_post_mode
$decoded_message = bbcode_nl2br($decoded_message);
}
-
- if ($row['bbcode_bitfield'])
- {
- $bbcode->bbcode_second_pass($message, $row['bbcode_uid'], $row['bbcode_bitfield']);
- }
-
- $message = bbcode_nl2br($message);
- $message = smiley_text($message, !$row['enable_smilies']);
+
+ $parse_flags = ($row['bbcode_bitfield'] ? OPTION_FLAG_BBCODE : 0);
+ $parse_flags |= ($row['enable_smilies'] ? OPTION_FLAG_SMILIES : 0);
+
+ $message = generate_text_for_display($message, $row['bbcode_uid'], $row['bbcode_bitfield'], $parse_flags, false);
$subject = censor_text($subject);
@@ -2040,7 +2042,7 @@ function message_history($msg_id, $user_id, $message_row, $folder, $in_post_mode
'SUBJECT' => $subject,
'SENT_DATE' => $user->format_date($row['message_time']),
'MESSAGE' => $message,
- 'FOLDER' => implode(', ', $row['folder']),
+ 'FOLDER' => implode($user->lang['COMMA_SEPARATOR'], $row['folder']),
'DECODED_MESSAGE' => $decoded_message,
'S_CURRENT_MSG' => ($row['msg_id'] == $msg_id),
@@ -2176,5 +2178,3 @@ function get_recipient_strings($pm_by_id)
return $address_list;
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/functions_profile_fields.php b/phpBB/includes/functions_profile_fields.php
deleted file mode 100644
index a2c0656ca4..0000000000
--- a/phpBB/includes/functions_profile_fields.php
+++ /dev/null
@@ -1,1185 +0,0 @@
-<?php
-/**
-*
-* @package phpBB3
-* @version $Id$
-* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
-*
-*/
-
-/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
-* Custom Profile Fields
-* @package phpBB3
-*/
-class custom_profile
-{
- var $profile_types = array(FIELD_INT => 'int', FIELD_STRING => 'string', FIELD_TEXT => 'text', FIELD_BOOL => 'bool', FIELD_DROPDOWN => 'dropdown', FIELD_DATE => 'date');
- var $profile_cache = array();
- var $options_lang = array();
-
- /**
- * Assign editable fields to template, mode can be profile (for profile change) or register (for registration)
- * Called by ucp_profile and ucp_register
- * @access public
- */
- function generate_profile_fields($mode, $lang_id)
- {
- global $db, $template, $auth;
-
- $sql_where = '';
- switch ($mode)
- {
- case 'register':
- // If the field is required we show it on the registration page
- $sql_where .= ' AND f.field_show_on_reg = 1';
- break;
-
- case 'profile':
- // Show hidden fields to moderators/admins
- if (!$auth->acl_gets('a_', 'm_') && !$auth->acl_getf_global('m_'))
- {
- $sql_where .= ' AND f.field_show_profile = 1';
- }
- break;
-
- default:
- trigger_error('Wrong profile mode specified', E_USER_ERROR);
- break;
- }
-
- $sql = 'SELECT l.*, f.*
- FROM ' . PROFILE_LANG_TABLE . ' l, ' . PROFILE_FIELDS_TABLE . " f
- WHERE f.field_active = 1
- $sql_where
- AND l.lang_id = $lang_id
- AND l.field_id = f.field_id
- ORDER BY f.field_order";
- $result = $db->sql_query($sql);
-
- while ($row = $db->sql_fetchrow($result))
- {
- // Return templated field
- $tpl_snippet = $this->process_field_row('change', $row);
-
- // Some types are multivalue, we can't give them a field_id as we would not know which to pick
- $type = (int) $row['field_type'];
-
- $template->assign_block_vars('profile_fields', array(
- 'LANG_NAME' => $row['lang_name'],
- 'LANG_EXPLAIN' => $row['lang_explain'],
- 'FIELD' => $tpl_snippet,
- 'FIELD_ID' => ($type == FIELD_DATE || ($type == FIELD_BOOL && $row['field_length'] == '1')) ? '' : 'pf_' . $row['field_ident'],
- 'S_REQUIRED' => ($row['field_required']) ? true : false)
- );
- }
- $db->sql_freeresult($result);
- }
-
- /**
- * Validate entered profile field data
- * @access public
- */
- function validate_profile_field($field_type, &$field_value, $field_data)
- {
- switch ($field_type)
- {
- case FIELD_DATE:
- $field_validate = explode('-', $field_value);
-
- $day = (isset($field_validate[0])) ? (int) $field_validate[0] : 0;
- $month = (isset($field_validate[1])) ? (int) $field_validate[1] : 0;
- $year = (isset($field_validate[2])) ? (int) $field_validate[2] : 0;
-
- if ((!$day || !$month || !$year) && !$field_data['field_required'])
- {
- return false;
- }
-
- if ((!$day || !$month || !$year) && $field_data['field_required'])
- {
- return 'FIELD_REQUIRED';
- }
-
- if ($day < 0 || $day > 31 || $month < 0 || $month > 12 || ($year < 1901 && $year > 0) || $year > gmdate('Y', time()) + 50)
- {
- return 'FIELD_INVALID_DATE';
- }
-
- if (checkdate($month, $day, $year) === false)
- {
- return 'FIELD_INVALID_DATE';
- }
- break;
-
- case FIELD_BOOL:
- $field_value = (bool) $field_value;
-
- if (!$field_value && $field_data['field_required'])
- {
- return 'FIELD_REQUIRED';
- }
- break;
-
- case FIELD_INT:
- if (trim($field_value) === '' && !$field_data['field_required'])
- {
- return false;
- }
-
- $field_value = (int) $field_value;
-
- if ($field_value < $field_data['field_minlen'])
- {
- return 'FIELD_TOO_SMALL';
- }
- else if ($field_value > $field_data['field_maxlen'])
- {
- return 'FIELD_TOO_LARGE';
- }
- break;
-
- case FIELD_DROPDOWN:
- $field_value = (int) $field_value;
-
- // retrieve option lang data if necessary
- if (!isset($this->options_lang[$field_data['field_id']]) || !isset($this->options_lang[$field_data['field_id']][$field_data['lang_id']]) || !sizeof($this->options_lang[$file_data['field_id']][$field_data['lang_id']]))
- {
- $this->get_option_lang($field_data['field_id'], $field_data['lang_id'], FIELD_DROPDOWN, false);
- }
-
- if (!isset($this->options_lang[$field_data['field_id']][$field_data['lang_id']][$field_value]))
- {
- return 'FIELD_INVALID_VALUE';
- }
-
- if ($field_value == $field_data['field_novalue'] && $field_data['field_required'])
- {
- return 'FIELD_REQUIRED';
- }
- break;
-
- case FIELD_STRING:
- case FIELD_TEXT:
- if (trim($field_value) === '' && !$field_data['field_required'])
- {
- return false;
- }
- else if (trim($field_value) === '' && $field_data['field_required'])
- {
- return 'FIELD_REQUIRED';
- }
-
- if ($field_data['field_minlen'] && utf8_strlen($field_value) < $field_data['field_minlen'])
- {
- return 'FIELD_TOO_SHORT';
- }
- else if ($field_data['field_maxlen'] && utf8_strlen($field_value) > $field_data['field_maxlen'])
- {
- return 'FIELD_TOO_LONG';
- }
-
- if (!empty($field_data['field_validation']) && $field_data['field_validation'] != '.*')
- {
- $field_validate = ($field_type == FIELD_STRING) ? $field_value : bbcode_nl2br($field_value);
- if (!preg_match('#^' . str_replace('\\\\', '\\', $field_data['field_validation']) . '$#i', $field_validate))
- {
- return 'FIELD_INVALID_CHARS';
- }
- }
- break;
- }
-
- return false;
- }
-
- /**
- * Build profile cache, used for display
- * @access private
- */
- function build_cache()
- {
- global $db, $user, $auth;
-
- $this->profile_cache = array();
-
- // Display hidden/no_view fields for admin/moderator
- $sql = 'SELECT l.*, f.*
- FROM ' . PROFILE_LANG_TABLE . ' l, ' . PROFILE_FIELDS_TABLE . ' f
- WHERE l.lang_id = ' . $user->get_iso_lang_id() . '
- AND f.field_active = 1 ' .
- ((!$auth->acl_gets('a_', 'm_') && !$auth->acl_getf_global('m_')) ? ' AND f.field_hide = 0 ' : '') . '
- AND f.field_no_view = 0
- AND l.field_id = f.field_id
- ORDER BY f.field_order';
- $result = $db->sql_query($sql);
-
- while ($row = $db->sql_fetchrow($result))
- {
- $this->profile_cache[$row['field_ident']] = $row;
- }
- $db->sql_freeresult($result);
- }
-
- /**
- * Get language entries for options and store them here for later use
- */
- function get_option_lang($field_id, $lang_id, $field_type, $preview)
- {
- global $db;
-
- if ($preview)
- {
- $lang_options = (!is_array($this->vars['lang_options'])) ? explode("\n", $this->vars['lang_options']) : $this->vars['lang_options'];
-
- foreach ($lang_options as $num => $var)
- {
- $this->options_lang[$field_id][$lang_id][($num + 1)] = $var;
- }
- }
- else
- {
- $sql = 'SELECT option_id, lang_value
- FROM ' . PROFILE_FIELDS_LANG_TABLE . "
- WHERE field_id = $field_id
- AND lang_id = $lang_id
- AND field_type = $field_type
- ORDER BY option_id";
- $result = $db->sql_query($sql);
-
- while ($row = $db->sql_fetchrow($result))
- {
- $this->options_lang[$field_id][$lang_id][($row['option_id'] + 1)] = $row['lang_value'];
- }
- $db->sql_freeresult($result);
- }
- }
-
- /**
- * Submit profile field for validation
- * @access public
- */
- function submit_cp_field($mode, $lang_id, &$cp_data, &$cp_error)
- {
- global $auth, $db, $user;
-
- $sql_where = '';
- switch ($mode)
- {
- case 'register':
- // If the field is required we show it on the registration page
- $sql_where .= ' AND f.field_show_on_reg = 1';
- break;
-
- case 'profile':
- // Show hidden fields to moderators/admins
- if (!$auth->acl_gets('a_', 'm_') && !$auth->acl_getf_global('m_'))
- {
- $sql_where .= ' AND f.field_show_profile = 1';
- }
- break;
-
- default:
- trigger_error('Wrong profile mode specified', E_USER_ERROR);
- break;
- }
-
- $sql = 'SELECT l.*, f.*
- FROM ' . PROFILE_LANG_TABLE . ' l, ' . PROFILE_FIELDS_TABLE . " f
- WHERE l.lang_id = $lang_id
- AND f.field_active = 1
- $sql_where
- AND l.field_id = f.field_id
- ORDER BY f.field_order";
- $result = $db->sql_query($sql);
-
- while ($row = $db->sql_fetchrow($result))
- {
- $cp_data['pf_' . $row['field_ident']] = $this->get_profile_field($row);
- $check_value = $cp_data['pf_' . $row['field_ident']];
-
- if (($cp_result = $this->validate_profile_field($row['field_type'], $check_value, $row)) !== false)
- {
- // If not and only showing common error messages, use this one
- $error = '';
- switch ($cp_result)
- {
- case 'FIELD_INVALID_DATE':
- case 'FIELD_INVALID_VALUE':
- case 'FIELD_REQUIRED':
- $error = sprintf($user->lang[$cp_result], $row['lang_name']);
- break;
-
- case 'FIELD_TOO_SHORT':
- case 'FIELD_TOO_SMALL':
- $error = sprintf($user->lang[$cp_result], $row['lang_name'], $row['field_minlen']);
- break;
-
- case 'FIELD_TOO_LONG':
- case 'FIELD_TOO_LARGE':
- $error = sprintf($user->lang[$cp_result], $row['lang_name'], $row['field_maxlen']);
- break;
-
- case 'FIELD_INVALID_CHARS':
- switch ($row['field_validation'])
- {
- case '[0-9]+':
- $error = sprintf($user->lang[$cp_result . '_NUMBERS_ONLY'], $row['lang_name']);
- break;
-
- case '[\w]+':
- $error = sprintf($user->lang[$cp_result . '_ALPHA_ONLY'], $row['lang_name']);
- break;
-
- case '[\w_\+\. \-\[\]]+':
- $error = sprintf($user->lang[$cp_result . '_SPACERS_ONLY'], $row['lang_name']);
- break;
- }
- break;
- }
-
- if ($error != '')
- {
- $cp_error[] = $error;
- }
- }
- }
- $db->sql_freeresult($result);
- }
-
- /**
- * Update profile field data directly
- */
- function update_profile_field_data($user_id, &$cp_data)
- {
- global $db;
-
- if (!sizeof($cp_data))
- {
- return;
- }
-
- switch ($db->sql_layer)
- {
- case 'oracle':
- case 'firebird':
- case 'postgres':
- $right_delim = $left_delim = '"';
- break;
-
- case 'sqlite':
- case 'mssql':
- case 'mssql_odbc':
- case 'mssqlnative':
- $right_delim = ']';
- $left_delim = '[';
- break;
-
- case 'mysql':
- case 'mysql4':
- case 'mysqli':
- $right_delim = $left_delim = '`';
- break;
- }
-
- // use new array for the UPDATE; changes in the key do not affect the original array
- $cp_data_sql = array();
- foreach ($cp_data as $key => $value)
- {
- // Firebird is case sensitive with delimiter
- $cp_data_sql[$left_delim . (($db->sql_layer == 'firebird' || $db->sql_layer == 'oracle') ? strtoupper($key) : $key) . $right_delim] = $value;
- }
-
- $sql = 'UPDATE ' . PROFILE_FIELDS_DATA_TABLE . '
- SET ' . $db->sql_build_array('UPDATE', $cp_data_sql) . "
- WHERE user_id = $user_id";
- $db->sql_query($sql);
-
- if (!$db->sql_affectedrows())
- {
- $cp_data_sql['user_id'] = (int) $user_id;
-
- $db->sql_return_on_error(true);
-
- $sql = 'INSERT INTO ' . PROFILE_FIELDS_DATA_TABLE . ' ' . $db->sql_build_array('INSERT', $cp_data_sql);
- $db->sql_query($sql);
-
- $db->sql_return_on_error(false);
- }
- }
-
- /**
- * Assign fields to template, used for viewprofile, viewtopic and memberlist (if load setting is enabled)
- * This is directly connected to the user -> mode == grab is to grab the user specific fields, mode == show is for assigning the row to the template
- * @access public
- */
- function generate_profile_fields_template($mode, $user_id = 0, $profile_row = false)
- {
- global $db;
-
- if ($mode == 'grab')
- {
- if (!is_array($user_id))
- {
- $user_id = array($user_id);
- }
-
- if (!sizeof($this->profile_cache))
- {
- $this->build_cache();
- }
-
- if (!sizeof($user_id))
- {
- return array();
- }
-
- $sql = 'SELECT *
- FROM ' . PROFILE_FIELDS_DATA_TABLE . '
- WHERE ' . $db->sql_in_set('user_id', array_map('intval', $user_id));
- $result = $db->sql_query($sql);
-
- $field_data = array();
- while ($row = $db->sql_fetchrow($result))
- {
- $field_data[$row['user_id']] = $row;
- }
- $db->sql_freeresult($result);
-
- $user_fields = array();
-
- $user_ids = $user_id;
-
- // Go through the fields in correct order
- foreach (array_keys($this->profile_cache) as $used_ident)
- {
- foreach ($field_data as $user_id => $row)
- {
- $user_fields[$user_id][$used_ident]['value'] = $row['pf_' . $used_ident];
- $user_fields[$user_id][$used_ident]['data'] = $this->profile_cache[$used_ident];
- }
-
- foreach ($user_ids as $user_id)
- {
- if (!isset($user_fields[$user_id][$used_ident]) && $this->profile_cache[$used_ident]['field_show_novalue'])
- {
- $user_fields[$user_id][$used_ident]['value'] = '';
- $user_fields[$user_id][$used_ident]['data'] = $this->profile_cache[$used_ident];
- }
- }
- }
-
- return $user_fields;
- }
- else if ($mode == 'show')
- {
- // $profile_row == $user_fields[$row['user_id']];
- $tpl_fields = array();
- $tpl_fields['row'] = $tpl_fields['blockrow'] = array();
-
- foreach ($profile_row as $ident => $ident_ary)
- {
- $value = $this->get_profile_value($ident_ary);
-
- if ($value === NULL)
- {
- continue;
- }
-
- $tpl_fields['row'] += array(
- 'PROFILE_' . strtoupper($ident) . '_VALUE' => $value,
- 'PROFILE_' . strtoupper($ident) . '_TYPE' => $ident_ary['data']['field_type'],
- 'PROFILE_' . strtoupper($ident) . '_NAME' => $ident_ary['data']['lang_name'],
- 'PROFILE_' . strtoupper($ident) . '_EXPLAIN'=> $ident_ary['data']['lang_explain'],
-
- 'S_PROFILE_' . strtoupper($ident) => true
- );
-
- $tpl_fields['blockrow'][] = array(
- 'PROFILE_FIELD_VALUE' => $value,
- 'PROFILE_FIELD_TYPE' => $ident_ary['data']['field_type'],
- 'PROFILE_FIELD_NAME' => $ident_ary['data']['lang_name'],
- 'PROFILE_FIELD_EXPLAIN' => $ident_ary['data']['lang_explain'],
-
- 'S_PROFILE_' . strtoupper($ident) => true
- );
- }
-
- return $tpl_fields;
- }
- else
- {
- trigger_error('Wrong mode for custom profile', E_USER_ERROR);
- }
- }
-
- /**
- * Get Profile Value for display
- */
- function get_profile_value($ident_ary)
- {
- $value = $ident_ary['value'];
- $field_type = $ident_ary['data']['field_type'];
-
- switch ($this->profile_types[$field_type])
- {
- case 'int':
- if (($value === '' || $value === null) && !$ident_ary['data']['field_show_novalue'])
- {
- return NULL;
- }
- return (int) $value;
- break;
-
- case 'string':
- case 'text':
- if (!$value && !$ident_ary['data']['field_show_novalue'])
- {
- return NULL;
- }
-
- $value = make_clickable($value);
- $value = censor_text($value);
- $value = bbcode_nl2br($value);
- return $value;
- break;
-
- // case 'datetime':
- case 'date':
- $date = explode('-', $value);
- $day = (isset($date[0])) ? (int) $date[0] : 0;
- $month = (isset($date[1])) ? (int) $date[1] : 0;
- $year = (isset($date[2])) ? (int) $date[2] : 0;
-
- if (!$day && !$month && !$year && !$ident_ary['data']['field_show_novalue'])
- {
- return NULL;
- }
- else if ($day && $month && $year)
- {
- global $user;
- // Date should display as the same date for every user regardless of timezone, so remove offset
- // to compensate for the offset added by user::format_date()
- return $user->format_date(gmmktime(0, 0, 0, $month, $day, $year) - ($user->timezone + $user->dst), $user->lang['DATE_FORMAT'], true);
- }
-
- return $value;
- break;
-
- case 'dropdown':
- $field_id = $ident_ary['data']['field_id'];
- $lang_id = $ident_ary['data']['lang_id'];
- if (!isset($this->options_lang[$field_id][$lang_id]))
- {
- $this->get_option_lang($field_id, $lang_id, FIELD_DROPDOWN, false);
- }
-
- if ($value == $ident_ary['data']['field_novalue'] && !$ident_ary['data']['field_show_novalue'])
- {
- return NULL;
- }
-
- $value = (int) $value;
-
- // User not having a value assigned
- if (!isset($this->options_lang[$field_id][$lang_id][$value]))
- {
- if ($ident_ary['data']['field_show_novalue'])
- {
- $value = $ident_ary['data']['field_novalue'];
- }
- else
- {
- return NULL;
- }
- }
-
- return $this->options_lang[$field_id][$lang_id][$value];
- break;
-
- case 'bool':
- $field_id = $ident_ary['data']['field_id'];
- $lang_id = $ident_ary['data']['lang_id'];
- if (!isset($this->options_lang[$field_id][$lang_id]))
- {
- $this->get_option_lang($field_id, $lang_id, FIELD_BOOL, false);
- }
-
- if (!$value && $ident_ary['data']['field_show_novalue'])
- {
- $value = $ident_ary['data']['field_default_value'];
- }
-
- if ($ident_ary['data']['field_length'] == 1)
- {
- return (isset($this->options_lang[$field_id][$lang_id][(int) $value])) ? $this->options_lang[$field_id][$lang_id][(int) $value] : NULL;
- }
- else if (!$value)
- {
- return NULL;
- }
- else
- {
- return $this->options_lang[$field_id][$lang_id][(int) ($value) + 1];
- }
- break;
-
- default:
- trigger_error('Unknown profile type', E_USER_ERROR);
- break;
- }
- }
-
- /**
- * Get field value for registration/profile
- * @access private
- */
- function get_var($field_validation, &$profile_row, $default_value, $preview)
- {
- global $user;
-
- $profile_row['field_ident'] = (isset($profile_row['var_name'])) ? $profile_row['var_name'] : 'pf_' . $profile_row['field_ident'];
- $user_ident = $profile_row['field_ident'];
- // checkbox - set the value to "true" if it has been set to 1
- if ($profile_row['field_type'] == FIELD_BOOL && $profile_row['field_length'] == 2)
- {
- $value = (isset($_REQUEST[$profile_row['field_ident']]) && request_var($profile_row['field_ident'], $default_value) == 1) ? true : ((!isset($user->profile_fields[$user_ident]) || $preview) ? $default_value : $user->profile_fields[$user_ident]);
- }
- else if ($profile_row['field_type'] == FIELD_INT)
- {
- if (isset($_REQUEST[$profile_row['field_ident']]))
- {
- $value = ($_REQUEST[$profile_row['field_ident']] === '') ? NULL : request_var($profile_row['field_ident'], $default_value);
- }
- else
- {
- if (!$preview && array_key_exists($user_ident, $user->profile_fields) && is_null($user->profile_fields[$user_ident]))
- {
- $value = NULL;
- }
- else if (!isset($user->profile_fields[$user_ident]) || $preview)
- {
- $value = $default_value;
- }
- else
- {
- $value = $user->profile_fields[$user_ident];
- }
- }
-
- return (is_null($value) || $value === '') ? '' : (int) $value;
- }
- else
- {
- $value = (isset($_REQUEST[$profile_row['field_ident']])) ? request_var($profile_row['field_ident'], $default_value, true) : ((!isset($user->profile_fields[$user_ident]) || $preview) ? $default_value : $user->profile_fields[$user_ident]);
-
- if (gettype($value) == 'string')
- {
- $value = utf8_normalize_nfc($value);
- }
- }
-
- switch ($field_validation)
- {
- case 'int':
- return (int) $value;
- break;
- }
-
- return $value;
- }
-
- /**
- * Process int-type
- * @access private
- */
- function generate_int($profile_row, $preview = false)
- {
- global $template;
-
- $profile_row['field_value'] = $this->get_var('int', $profile_row, $profile_row['field_default_value'], $preview);
- $template->assign_block_vars($this->profile_types[$profile_row['field_type']], array_change_key_case($profile_row, CASE_UPPER));
- }
-
- /**
- * Process date-type
- * @access private
- */
- function generate_date($profile_row, $preview = false)
- {
- global $user, $template;
-
- $profile_row['field_ident'] = (isset($profile_row['var_name'])) ? $profile_row['var_name'] : 'pf_' . $profile_row['field_ident'];
- $user_ident = $profile_row['field_ident'];
-
- $now = getdate();
-
- if (!isset($_REQUEST[$profile_row['field_ident'] . '_day']))
- {
- if ($profile_row['field_default_value'] == 'now')
- {
- $profile_row['field_default_value'] = sprintf('%2d-%2d-%4d', $now['mday'], $now['mon'], $now['year']);
- }
- list($day, $month, $year) = explode('-', ((!isset($user->profile_fields[$user_ident]) || $preview) ? $profile_row['field_default_value'] : $user->profile_fields[$user_ident]));
- }
- else
- {
- if ($preview && $profile_row['field_default_value'] == 'now')
- {
- $profile_row['field_default_value'] = sprintf('%2d-%2d-%4d', $now['mday'], $now['mon'], $now['year']);
- list($day, $month, $year) = explode('-', ((!isset($user->profile_fields[$user_ident]) || $preview) ? $profile_row['field_default_value'] : $user->profile_fields[$user_ident]));
- }
- else
- {
- $day = request_var($profile_row['field_ident'] . '_day', 0);
- $month = request_var($profile_row['field_ident'] . '_month', 0);
- $year = request_var($profile_row['field_ident'] . '_year', 0);
- }
- }
-
- $profile_row['s_day_options'] = '<option value="0"' . ((!$day) ? ' selected="selected"' : '') . '>--</option>';
- for ($i = 1; $i < 32; $i++)
- {
- $profile_row['s_day_options'] .= '<option value="' . $i . '"' . (($i == $day) ? ' selected="selected"' : '') . ">$i</option>";
- }
-
- $profile_row['s_month_options'] = '<option value="0"' . ((!$month) ? ' selected="selected"' : '') . '>--</option>';
- for ($i = 1; $i < 13; $i++)
- {
- $profile_row['s_month_options'] .= '<option value="' . $i . '"' . (($i == $month) ? ' selected="selected"' : '') . ">$i</option>";
- }
-
- $profile_row['s_year_options'] = '<option value="0"' . ((!$year) ? ' selected="selected"' : '') . '>--</option>';
- for ($i = $now['year'] - 100; $i <= $now['year'] + 100; $i++)
- {
- $profile_row['s_year_options'] .= '<option value="' . $i . '"' . (($i == $year) ? ' selected="selected"' : '') . ">$i</option>";
- }
- unset($now);
-
- $profile_row['field_value'] = 0;
- $template->assign_block_vars($this->profile_types[$profile_row['field_type']], array_change_key_case($profile_row, CASE_UPPER));
- }
-
- /**
- * Process bool-type
- * @access private
- */
- function generate_bool($profile_row, $preview = false)
- {
- global $template;
-
- $value = $this->get_var('int', $profile_row, $profile_row['field_default_value'], $preview);
-
- $profile_row['field_value'] = $value;
- $template->assign_block_vars($this->profile_types[$profile_row['field_type']], array_change_key_case($profile_row, CASE_UPPER));
-
- if ($profile_row['field_length'] == 1)
- {
- if (!isset($this->options_lang[$profile_row['field_id']][$profile_row['lang_id']]) || !sizeof($this->options_lang[$profile_row['field_id']][$profile_row['lang_id']]))
- {
- $this->get_option_lang($profile_row['field_id'], $profile_row['lang_id'], FIELD_BOOL, $preview);
- }
-
- foreach ($this->options_lang[$profile_row['field_id']][$profile_row['lang_id']] as $option_id => $option_value)
- {
- $template->assign_block_vars('bool.options', array(
- 'OPTION_ID' => $option_id,
- 'CHECKED' => ($value == $option_id) ? ' checked="checked"' : '',
- 'VALUE' => $option_value)
- );
- }
- }
- }
-
- /**
- * Process string-type
- * @access private
- */
- function generate_string($profile_row, $preview = false)
- {
- global $template;
-
- $profile_row['field_value'] = $this->get_var('string', $profile_row, $profile_row['lang_default_value'], $preview);
- $template->assign_block_vars($this->profile_types[$profile_row['field_type']], array_change_key_case($profile_row, CASE_UPPER));
- }
-
- /**
- * Process text-type
- * @access private
- */
- function generate_text($profile_row, $preview = false)
- {
- global $template;
- global $user, $phpEx, $phpbb_root_path;
-
- $field_length = explode('|', $profile_row['field_length']);
- $profile_row['field_rows'] = $field_length[0];
- $profile_row['field_cols'] = $field_length[1];
-
- $profile_row['field_value'] = $this->get_var('string', $profile_row, $profile_row['lang_default_value'], $preview);
- $template->assign_block_vars($this->profile_types[$profile_row['field_type']], array_change_key_case($profile_row, CASE_UPPER));
- }
-
- /**
- * Process dropdown-type
- * @access private
- */
- function generate_dropdown($profile_row, $preview = false)
- {
- global $user, $template;
-
- $value = $this->get_var('int', $profile_row, $profile_row['field_default_value'], $preview);
-
- if (!isset($this->options_lang[$profile_row['field_id']]) || !isset($this->options_lang[$profile_row['field_id']][$profile_row['lang_id']]) || !sizeof($this->options_lang[$profile_row['field_id']][$profile_row['lang_id']]))
- {
- $this->get_option_lang($profile_row['field_id'], $profile_row['lang_id'], FIELD_DROPDOWN, $preview);
- }
-
- $profile_row['field_value'] = $value;
- $template->assign_block_vars($this->profile_types[$profile_row['field_type']], array_change_key_case($profile_row, CASE_UPPER));
-
- foreach ($this->options_lang[$profile_row['field_id']][$profile_row['lang_id']] as $option_id => $option_value)
- {
- $template->assign_block_vars('dropdown.options', array(
- 'OPTION_ID' => $option_id,
- 'SELECTED' => ($value == $option_id) ? ' selected="selected"' : '',
- 'VALUE' => $option_value)
- );
- }
- }
-
- /**
- * Return Templated value/field. Possible values for $mode are:
- * change == user is able to set/enter profile values; preview == just show the value
- * @access private
- */
- function process_field_row($mode, $profile_row)
- {
- global $template;
-
- $preview = ($mode == 'preview') ? true : false;
-
- // set template filename
- $template->set_filenames(array(
- 'cp_body' => 'custom_profile_fields.html')
- );
-
- // empty previously filled blockvars
- foreach ($this->profile_types as $field_case => $field_type)
- {
- $template->destroy_block_vars($field_type);
- }
-
- // Assign template variables
- $type_func = 'generate_' . $this->profile_types[$profile_row['field_type']];
- $this->$type_func($profile_row, $preview);
-
- // Return templated data
- return $template->assign_display('cp_body');
- }
-
- /**
- * Build Array for user insertion into custom profile fields table
- */
- function build_insert_sql_array($cp_data)
- {
- global $db, $user, $auth;
-
- $sql_not_in = array();
- foreach ($cp_data as $key => $null)
- {
- $sql_not_in[] = (strncmp($key, 'pf_', 3) === 0) ? substr($key, 3) : $key;
- }
-
- $sql = 'SELECT f.field_type, f.field_ident, f.field_default_value, l.lang_default_value
- FROM ' . PROFILE_LANG_TABLE . ' l, ' . PROFILE_FIELDS_TABLE . ' f
- WHERE l.lang_id = ' . $user->get_iso_lang_id() . '
- ' . ((sizeof($sql_not_in)) ? ' AND ' . $db->sql_in_set('f.field_ident', $sql_not_in, true) : '') . '
- AND l.field_id = f.field_id';
- $result = $db->sql_query($sql);
-
- while ($row = $db->sql_fetchrow($result))
- {
- if ($row['field_default_value'] == 'now' && $row['field_type'] == FIELD_DATE)
- {
- $now = getdate();
- $row['field_default_value'] = sprintf('%2d-%2d-%4d', $now['mday'], $now['mon'], $now['year']);
- }
- else if ($row['field_default_value'] === '' && $row['field_type'] == FIELD_INT)
- {
- // We cannot insert an empty string into an integer column.
- $row['field_default_value'] = NULL;
- }
-
- $cp_data['pf_' . $row['field_ident']] = (in_array($row['field_type'], array(FIELD_TEXT, FIELD_STRING))) ? $row['lang_default_value'] : $row['field_default_value'];
- }
- $db->sql_freeresult($result);
-
- return $cp_data;
- }
-
- /**
- * Get profile field value on submit
- * @access private
- */
- function get_profile_field($profile_row)
- {
- global $phpbb_root_path, $phpEx;
- global $config;
-
- $var_name = 'pf_' . $profile_row['field_ident'];
-
- switch ($profile_row['field_type'])
- {
- case FIELD_DATE:
-
- if (!isset($_REQUEST[$var_name . '_day']))
- {
- if ($profile_row['field_default_value'] == 'now')
- {
- $now = getdate();
- $profile_row['field_default_value'] = sprintf('%2d-%2d-%4d', $now['mday'], $now['mon'], $now['year']);
- }
- list($day, $month, $year) = explode('-', $profile_row['field_default_value']);
- }
- else
- {
- $day = request_var($var_name . '_day', 0);
- $month = request_var($var_name . '_month', 0);
- $year = request_var($var_name . '_year', 0);
- }
-
- $var = sprintf('%2d-%2d-%4d', $day, $month, $year);
- break;
-
- case FIELD_BOOL:
- // Checkbox
- if ($profile_row['field_length'] == 2)
- {
- $var = (isset($_REQUEST[$var_name])) ? 1 : 0;
- }
- else
- {
- $var = request_var($var_name, (int) $profile_row['field_default_value']);
- }
- break;
-
- case FIELD_STRING:
- case FIELD_TEXT:
- $var = utf8_normalize_nfc(request_var($var_name, (string) $profile_row['field_default_value'], true));
- break;
-
- case FIELD_INT:
- if (isset($_REQUEST[$var_name]) && $_REQUEST[$var_name] === '')
- {
- $var = NULL;
- }
- else
- {
- $var = request_var($var_name, (int) $profile_row['field_default_value']);
- }
- break;
-
- case FIELD_DROPDOWN:
- $var = request_var($var_name, (int) $profile_row['field_default_value']);
- break;
-
- default:
- $var = request_var($var_name, $profile_row['field_default_value']);
- break;
- }
-
- return $var;
- }
-}
-
-/**
-* Custom Profile Fields ACP
-* @package phpBB3
-*/
-class custom_profile_admin extends custom_profile
-{
- var $vars = array();
-
- /**
- * Return possible validation options
- */
- function validate_options()
- {
- global $user;
-
- $validate_ary = array('CHARS_ANY' => '.*', 'NUMBERS_ONLY' => '[0-9]+', 'ALPHA_ONLY' => '[\w]+', 'ALPHA_SPACERS' => '[\w_\+\. \-\[\]]+');
-
- $validate_options = '';
- foreach ($validate_ary as $lang => $value)
- {
- $selected = ($this->vars['field_validation'] == $value) ? ' selected="selected"' : '';
- $validate_options .= '<option value="' . $value . '"' . $selected . '>' . $user->lang[$lang] . '</option>';
- }
-
- return $validate_options;
- }
-
- /**
- * Get string options for second step in ACP
- */
- function get_string_options()
- {
- global $user;
-
- $options = array(
- 0 => array('TITLE' => $user->lang['FIELD_LENGTH'], 'FIELD' => '<input type="text" name="field_length" size="5" value="' . $this->vars['field_length'] . '" />'),
- 1 => array('TITLE' => $user->lang['MIN_FIELD_CHARS'], 'FIELD' => '<input type="text" name="field_minlen" size="5" value="' . $this->vars['field_minlen'] . '" />'),
- 2 => array('TITLE' => $user->lang['MAX_FIELD_CHARS'], 'FIELD' => '<input type="text" name="field_maxlen" size="5" value="' . $this->vars['field_maxlen'] . '" />'),
- 3 => array('TITLE' => $user->lang['FIELD_VALIDATION'], 'FIELD' => '<select name="field_validation">' . $this->validate_options() . '</select>')
- );
-
- return $options;
- }
-
- /**
- * Get text options for second step in ACP
- */
- function get_text_options()
- {
- global $user;
-
- $options = array(
- 0 => array('TITLE' => $user->lang['FIELD_LENGTH'], 'FIELD' => '<input name="rows" size="5" value="' . $this->vars['rows'] . '" /> ' . $user->lang['ROWS'] . '</dd><dd><input name="columns" size="5" value="' . $this->vars['columns'] . '" /> ' . $user->lang['COLUMNS'] . ' <input type="hidden" name="field_length" value="' . $this->vars['field_length'] . '" />'),
- 1 => array('TITLE' => $user->lang['MIN_FIELD_CHARS'], 'FIELD' => '<input type="text" name="field_minlen" size="10" value="' . $this->vars['field_minlen'] . '" />'),
- 2 => array('TITLE' => $user->lang['MAX_FIELD_CHARS'], 'FIELD' => '<input type="text" name="field_maxlen" size="10" value="' . $this->vars['field_maxlen'] . '" />'),
- 3 => array('TITLE' => $user->lang['FIELD_VALIDATION'], 'FIELD' => '<select name="field_validation">' . $this->validate_options() . '</select>')
- );
-
- return $options;
- }
-
- /**
- * Get int options for second step in ACP
- */
- function get_int_options()
- {
- global $user;
-
- $options = array(
- 0 => array('TITLE' => $user->lang['FIELD_LENGTH'], 'FIELD' => '<input type="text" name="field_length" size="5" value="' . $this->vars['field_length'] . '" />'),
- 1 => array('TITLE' => $user->lang['MIN_FIELD_NUMBER'], 'FIELD' => '<input type="text" name="field_minlen" size="5" value="' . $this->vars['field_minlen'] . '" />'),
- 2 => array('TITLE' => $user->lang['MAX_FIELD_NUMBER'], 'FIELD' => '<input type="text" name="field_maxlen" size="5" value="' . $this->vars['field_maxlen'] . '" />'),
- 3 => array('TITLE' => $user->lang['DEFAULT_VALUE'], 'FIELD' => '<input type="post" name="field_default_value" value="' . $this->vars['field_default_value'] . '" />')
- );
-
- return $options;
- }
-
- /**
- * Get bool options for second step in ACP
- */
- function get_bool_options()
- {
- global $user, $config, $lang_defs;
-
- $default_lang_id = $lang_defs['iso'][$config['default_lang']];
-
- $profile_row = array(
- 'var_name' => 'field_default_value',
- 'field_id' => 1,
- 'lang_name' => $this->vars['lang_name'],
- 'lang_explain' => $this->vars['lang_explain'],
- 'lang_id' => $default_lang_id,
- 'field_default_value' => $this->vars['field_default_value'],
- 'field_ident' => 'field_default_value',
- 'field_type' => FIELD_BOOL,
- 'field_length' => $this->vars['field_length'],
- 'lang_options' => $this->vars['lang_options']
- );
-
- $options = array(
- 0 => array('TITLE' => $user->lang['FIELD_TYPE'], 'EXPLAIN' => $user->lang['BOOL_TYPE_EXPLAIN'], 'FIELD' => '<label><input type="radio" class="radio" name="field_length" value="1"' . (($this->vars['field_length'] == 1) ? ' checked="checked"' : '') . ' onchange="document.getElementById(\'add_profile_field\').submit();" /> ' . $user->lang['RADIO_BUTTONS'] . '</label><label><input type="radio" class="radio" name="field_length" value="2"' . (($this->vars['field_length'] == 2) ? ' checked="checked"' : '') . ' onchange="document.getElementById(\'add_profile_field\').submit();" /> ' . $user->lang['CHECKBOX'] . '</label>'),
- 1 => array('TITLE' => $user->lang['DEFAULT_VALUE'], 'FIELD' => $this->process_field_row('preview', $profile_row))
- );
-
- return $options;
- }
-
- /**
- * Get dropdown options for second step in ACP
- */
- function get_dropdown_options()
- {
- global $user, $config, $lang_defs;
-
- $default_lang_id = $lang_defs['iso'][$config['default_lang']];
-
- $profile_row[0] = array(
- 'var_name' => 'field_default_value',
- 'field_id' => 1,
- 'lang_name' => $this->vars['lang_name'],
- 'lang_explain' => $this->vars['lang_explain'],
- 'lang_id' => $default_lang_id,
- 'field_default_value' => $this->vars['field_default_value'],
- 'field_ident' => 'field_default_value',
- 'field_type' => FIELD_DROPDOWN,
- 'lang_options' => $this->vars['lang_options']
- );
-
- $profile_row[1] = $profile_row[0];
- $profile_row[1]['var_name'] = 'field_novalue';
- $profile_row[1]['field_ident'] = 'field_novalue';
- $profile_row[1]['field_default_value'] = $this->vars['field_novalue'];
-
- $options = array(
- 0 => array('TITLE' => $user->lang['DEFAULT_VALUE'], 'FIELD' => $this->process_field_row('preview', $profile_row[0])),
- 1 => array('TITLE' => $user->lang['NO_VALUE_OPTION'], 'EXPLAIN' => $user->lang['NO_VALUE_OPTION_EXPLAIN'], 'FIELD' => $this->process_field_row('preview', $profile_row[1]))
- );
-
- return $options;
- }
-
- /**
- * Get date options for second step in ACP
- */
- function get_date_options()
- {
- global $user, $config, $lang_defs;
-
- $default_lang_id = $lang_defs['iso'][$config['default_lang']];
-
- $profile_row = array(
- 'var_name' => 'field_default_value',
- 'lang_name' => $this->vars['lang_name'],
- 'lang_explain' => $this->vars['lang_explain'],
- 'lang_id' => $default_lang_id,
- 'field_default_value' => $this->vars['field_default_value'],
- 'field_ident' => 'field_default_value',
- 'field_type' => FIELD_DATE,
- 'field_length' => $this->vars['field_length']
- );
-
- $always_now = request_var('always_now', -1);
- if ($always_now == -1)
- {
- $s_checked = ($this->vars['field_default_value'] == 'now') ? true : false;
- }
- else
- {
- $s_checked = ($always_now) ? true : false;
- }
-
- $options = array(
- 0 => array('TITLE' => $user->lang['DEFAULT_VALUE'], 'FIELD' => $this->process_field_row('preview', $profile_row)),
- 1 => array('TITLE' => $user->lang['ALWAYS_TODAY'], 'FIELD' => '<label><input type="radio" class="radio" name="always_now" value="1"' . (($s_checked) ? ' checked="checked"' : '') . ' onchange="document.getElementById(\'add_profile_field\').submit();" /> ' . $user->lang['YES'] . '</label><label><input type="radio" class="radio" name="always_now" value="0"' . ((!$s_checked) ? ' checked="checked"' : '') . ' onchange="document.getElementById(\'add_profile_field\').submit();" /> ' . $user->lang['NO'] . '</label>'),
- );
-
- return $options;
- }
-}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/functions_template.php b/phpBB/includes/functions_template.php
deleted file mode 100644
index 8636dfe010..0000000000
--- a/phpBB/includes/functions_template.php
+++ /dev/null
@@ -1,814 +0,0 @@
-<?php
-/**
-*
-* @package phpBB3
-* @version $Id$
-* @copyright (c) 2005 phpBB Group, sections (c) 2001 ispi of Lincoln Inc
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
-*
-*/
-
-/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
-* Extension of template class - Functions needed for compiling templates only.
-*
-* psoTFX, phpBB Development Team - Completion of file caching, decompilation
-* routines and implementation of conditionals/keywords and associated changes
-*
-* The interface was inspired by PHPLib templates, and the template file (formats are
-* quite similar)
-*
-* The keyword/conditional implementation is currently based on sections of code from
-* the Smarty templating engine (c) 2001 ispi of Lincoln, Inc. which is released
-* (on its own and in whole) under the LGPL. Section 3 of the LGPL states that any code
-* derived from an LGPL application may be relicenced under the GPL, this applies
-* to this source
-*
-* DEFINE directive inspired by a request by Cyberalien
-*
-* @package phpBB3
-*/
-class template_compile
-{
- var $template;
-
- // Various storage arrays
- var $block_names = array();
- var $block_else_level = array();
-
- /**
- * constuctor
- */
- function template_compile(&$template)
- {
- $this->template = &$template;
- }
-
- /**
- * Load template source from file
- * @access private
- */
- function _tpl_load_file($handle, $store_in_db = false)
- {
- // Try and open template for read
- if (!file_exists($this->template->files[$handle]))
- {
- trigger_error("template->_tpl_load_file(): File {$this->template->files[$handle]} does not exist or is empty", E_USER_ERROR);
- }
-
- $this->template->compiled_code[$handle] = $this->compile(trim(@file_get_contents($this->template->files[$handle])));
-
- // Actually compile the code now.
- $this->compile_write($handle, $this->template->compiled_code[$handle]);
-
- // Store in database if required...
- if ($store_in_db)
- {
- global $db, $user;
-
- $sql_ary = array(
- 'template_id' => $this->template->files_template[$handle],
- 'template_filename' => $this->template->filename[$handle],
- 'template_included' => '',
- 'template_mtime' => time(),
- 'template_data' => trim(@file_get_contents($this->template->files[$handle])),
- );
-
- $sql = 'INSERT INTO ' . STYLES_TEMPLATE_DATA_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary);
- $db->sql_query($sql);
- }
- }
-
- /**
- * Remove any PHP tags that do not belong, these regular expressions are derived from
- * the ones that exist in zend_language_scanner.l
- * @access private
- */
- function remove_php_tags(&$code)
- {
- // This matches the information gathered from the internal PHP lexer
- $match = array(
- '#<([\?%])=?.*?\1>#s',
- '#<script\s+language\s*=\s*(["\']?)php\1\s*>.*?</script\s*>#s',
- '#<\?php(?:\r\n?|[ \n\t]).*?\?>#s'
- );
-
- $code = preg_replace($match, '', $code);
- }
-
- /**
- * The all seeing all doing compile method. Parts are inspired by or directly from Smarty
- * @access private
- */
- function compile($code, $no_echo = false, $echo_var = '')
- {
- global $config;
-
- if ($echo_var)
- {
- global $$echo_var;
- }
-
- // Remove any "loose" php ... we want to give admins the ability
- // to switch on/off PHP for a given template. Allowing unchecked
- // php is a no-no. There is a potential issue here in that non-php
- // content may be removed ... however designers should use entities
- // if they wish to display < and >
- $this->remove_php_tags($code);
-
- // Pull out all block/statement level elements and separate plain text
- preg_match_all('#<!-- PHP -->(.*?)<!-- ENDPHP -->#s', $code, $matches);
- $php_blocks = $matches[1];
- $code = preg_replace('#<!-- PHP -->.*?<!-- ENDPHP -->#s', '<!-- PHP -->', $code);
-
- preg_match_all('#<!-- INCLUDE (\{\$?[A-Z0-9\-_]+\}|[a-zA-Z0-9\_\-\+\./]+) -->#', $code, $matches);
- $include_blocks = $matches[1];
- $code = preg_replace('#<!-- INCLUDE (?:\{\$?[A-Z0-9\-_]+\}|[a-zA-Z0-9\_\-\+\./]+) -->#', '<!-- INCLUDE -->', $code);
-
- preg_match_all('#<!-- INCLUDEPHP ([a-zA-Z0-9\_\-\+\./]+) -->#', $code, $matches);
- $includephp_blocks = $matches[1];
- $code = preg_replace('#<!-- INCLUDEPHP [a-zA-Z0-9\_\-\+\./]+ -->#', '<!-- INCLUDEPHP -->', $code);
-
- preg_match_all('#<!-- ([^<].*?) (.*?)? ?-->#', $code, $blocks, PREG_SET_ORDER);
-
- $text_blocks = preg_split('#<!-- [^<].*? (?:.*?)? ?-->#', $code);
-
- for ($i = 0, $j = sizeof($text_blocks); $i < $j; $i++)
- {
- $this->compile_var_tags($text_blocks[$i]);
- }
- $compile_blocks = array();
-
- for ($curr_tb = 0, $tb_size = sizeof($blocks); $curr_tb < $tb_size; $curr_tb++)
- {
- $block_val = &$blocks[$curr_tb];
-
- switch ($block_val[1])
- {
- case 'BEGIN':
- $this->block_else_level[] = false;
- $compile_blocks[] = '<?php ' . $this->compile_tag_block($block_val[2]) . ' ?>';
- break;
-
- case 'BEGINELSE':
- $this->block_else_level[sizeof($this->block_else_level) - 1] = true;
- $compile_blocks[] = '<?php }} else { ?>';
- break;
-
- case 'END':
- array_pop($this->block_names);
- $compile_blocks[] = '<?php ' . ((array_pop($this->block_else_level)) ? '}' : '}}') . ' ?>';
- break;
-
- case 'IF':
- $compile_blocks[] = '<?php ' . $this->compile_tag_if($block_val[2], false) . ' ?>';
- break;
-
- case 'ELSE':
- $compile_blocks[] = '<?php } else { ?>';
- break;
-
- case 'ELSEIF':
- $compile_blocks[] = '<?php ' . $this->compile_tag_if($block_val[2], true) . ' ?>';
- break;
-
- case 'ENDIF':
- $compile_blocks[] = '<?php } ?>';
- break;
-
- case 'DEFINE':
- $compile_blocks[] = '<?php ' . $this->compile_tag_define($block_val[2], true) . ' ?>';
- break;
-
- case 'UNDEFINE':
- $compile_blocks[] = '<?php ' . $this->compile_tag_define($block_val[2], false) . ' ?>';
- break;
-
- case 'INCLUDE':
- $temp = array_shift($include_blocks);
-
- // Dynamic includes
- // Cheap match rather than a full blown regexp, we already know
- // the format of the input so just use string manipulation.
- if ($temp[0] == '{')
- {
- $file = false;
-
- if ($temp[1] == '$')
- {
- $var = substr($temp, 2, -1);
- //$file = $this->template->_tpldata['DEFINE']['.'][$var];
- $temp = "\$this->_tpldata['DEFINE']['.']['$var']";
- }
- else
- {
- $var = substr($temp, 1, -1);
- //$file = $this->template->_rootref[$var];
- $temp = "\$this->_rootref['$var']";
- }
- }
- else
- {
- $file = $temp;
- }
-
- $compile_blocks[] = '<?php ' . $this->compile_tag_include($temp) . ' ?>';
-
- // No point in checking variable includes
- if ($file)
- {
- $this->template->_tpl_include($file, false);
- }
- break;
-
- case 'INCLUDEPHP':
- $compile_blocks[] = ($config['tpl_allow_php']) ? '<?php ' . $this->compile_tag_include_php(array_shift($includephp_blocks)) . ' ?>' : '';
- break;
-
- case 'PHP':
- $compile_blocks[] = ($config['tpl_allow_php']) ? '<?php ' . array_shift($php_blocks) . ' ?>' : '';
- break;
-
- default:
- $this->compile_var_tags($block_val[0]);
- $trim_check = trim($block_val[0]);
- $compile_blocks[] = (!$no_echo) ? ((!empty($trim_check)) ? $block_val[0] : '') : ((!empty($trim_check)) ? $block_val[0] : '');
- break;
- }
- }
-
- $template_php = '';
- for ($i = 0, $size = sizeof($text_blocks); $i < $size; $i++)
- {
- $trim_check_text = trim($text_blocks[$i]);
- $template_php .= (!$no_echo) ? (($trim_check_text != '') ? $text_blocks[$i] : '') . ((isset($compile_blocks[$i])) ? $compile_blocks[$i] : '') : (($trim_check_text != '') ? $text_blocks[$i] : '') . ((isset($compile_blocks[$i])) ? $compile_blocks[$i] : '');
- }
-
- // Remove unused opening/closing tags
- $template_php = str_replace(' ?><?php ', ' ', $template_php);
-
- // Now add a newline after each php closing tag which already has a newline
- // PHP itself strips a newline if a closing tag is used (this is documented behaviour) and it is mostly not intended by style authors to remove newlines
- $template_php = preg_replace('#\?\>([\r\n])#', '?>\1\1', $template_php);
-
- // There will be a number of occasions where we switch into and out of
- // PHP mode instantaneously. Rather than "burden" the parser with this
- // we'll strip out such occurences, minimising such switching
- if ($no_echo)
- {
- return "\$$echo_var .= '" . $template_php . "'";
- }
-
- return $template_php;
- }
-
- /**
- * Compile variables
- * @access private
- */
- function compile_var_tags(&$text_blocks)
- {
- // change template varrefs into PHP varrefs
- $varrefs = array();
-
- // This one will handle varrefs WITH namespaces
- preg_match_all('#\{((?:[a-z0-9\-_]+\.)+)(\$)?([A-Z0-9\-_]+)\}#', $text_blocks, $varrefs, PREG_SET_ORDER);
-
- foreach ($varrefs as $var_val)
- {
- $namespace = $var_val[1];
- $varname = $var_val[3];
- $new = $this->generate_block_varref($namespace, $varname, true, $var_val[2]);
-
- $text_blocks = str_replace($var_val[0], $new, $text_blocks);
- }
-
- // This will handle the remaining root-level varrefs
- // transform vars prefixed by L_ into their language variable pendant if nothing is set within the tpldata array
- if (strpos($text_blocks, '{L_') !== false)
- {
- $text_blocks = preg_replace('#\{L_([A-Z0-9\-_]+)\}#', "<?php echo ((isset(\$this->_rootref['L_\\1'])) ? \$this->_rootref['L_\\1'] : ((isset(\$user->lang['\\1'])) ? \$user->lang['\\1'] : '{ \\1 }')); ?>", $text_blocks);
- }
-
- // Handle addslashed language variables prefixed with LA_
- // If a template variable already exist, it will be used in favor of it...
- if (strpos($text_blocks, '{LA_') !== false)
- {
- $text_blocks = preg_replace('#\{LA_([A-Z0-9\-_]+)\}#', "<?php echo ((isset(\$this->_rootref['LA_\\1'])) ? \$this->_rootref['LA_\\1'] : ((isset(\$this->_rootref['L_\\1'])) ? addslashes(\$this->_rootref['L_\\1']) : ((isset(\$user->lang['\\1'])) ? addslashes(\$user->lang['\\1']) : '{ \\1 }'))); ?>", $text_blocks);
- }
-
- // Handle remaining varrefs
- $text_blocks = preg_replace('#\{([A-Z0-9\-_]+)\}#', "<?php echo (isset(\$this->_rootref['\\1'])) ? \$this->_rootref['\\1'] : ''; ?>", $text_blocks);
- $text_blocks = preg_replace('#\{\$([A-Z0-9\-_]+)\}#', "<?php echo (isset(\$this->_tpldata['DEFINE']['.']['\\1'])) ? \$this->_tpldata['DEFINE']['.']['\\1'] : ''; ?>", $text_blocks);
-
- return;
- }
-
- /**
- * Compile blocks
- * @access private
- */
- function compile_tag_block($tag_args)
- {
- $no_nesting = false;
-
- // Is the designer wanting to call another loop in a loop?
- if (strpos($tag_args, '!') === 0)
- {
- // Count the number of ! occurrences (not allowed in vars)
- $no_nesting = substr_count($tag_args, '!');
- $tag_args = substr($tag_args, $no_nesting);
- }
-
- // Allow for control of looping (indexes start from zero):
- // foo(2) : Will start the loop on the 3rd entry
- // foo(-2) : Will start the loop two entries from the end
- // foo(3,4) : Will start the loop on the fourth entry and end it on the fifth
- // foo(3,-4) : Will start the loop on the fourth entry and end it four from last
- if (preg_match('#^([^()]*)\(([\-\d]+)(?:,([\-\d]+))?\)$#', $tag_args, $match))
- {
- $tag_args = $match[1];
-
- if ($match[2] < 0)
- {
- $loop_start = '($_' . $tag_args . '_count ' . $match[2] . ' < 0 ? 0 : $_' . $tag_args . '_count ' . $match[2] . ')';
- }
- else
- {
- $loop_start = '($_' . $tag_args . '_count < ' . $match[2] . ' ? $_' . $tag_args . '_count : ' . $match[2] . ')';
- }
-
- if (strlen($match[3]) < 1 || $match[3] == -1)
- {
- $loop_end = '$_' . $tag_args . '_count';
- }
- else if ($match[3] >= 0)
- {
- $loop_end = '(' . ($match[3] + 1) . ' > $_' . $tag_args . '_count ? $_' . $tag_args . '_count : ' . ($match[3] + 1) . ')';
- }
- else //if ($match[3] < -1)
- {
- $loop_end = '$_' . $tag_args . '_count' . ($match[3] + 1);
- }
- }
- else
- {
- $loop_start = 0;
- $loop_end = '$_' . $tag_args . '_count';
- }
-
- $tag_template_php = '';
- array_push($this->block_names, $tag_args);
-
- if ($no_nesting !== false)
- {
- // We need to implode $no_nesting times from the end...
- $block = array_slice($this->block_names, -$no_nesting);
- }
- else
- {
- $block = $this->block_names;
- }
-
- if (sizeof($block) < 2)
- {
- // Block is not nested.
- $tag_template_php = '$_' . $tag_args . "_count = (isset(\$this->_tpldata['$tag_args'])) ? sizeof(\$this->_tpldata['$tag_args']) : 0;";
- $varref = "\$this->_tpldata['$tag_args']";
- }
- else
- {
- // This block is nested.
- // Generate a namespace string for this block.
- $namespace = implode('.', $block);
-
- // Get a reference to the data array for this block that depends on the
- // current indices of all parent blocks.
- $varref = $this->generate_block_data_ref($namespace, false);
-
- // Create the for loop code to iterate over this block.
- $tag_template_php = '$_' . $tag_args . '_count = (isset(' . $varref . ')) ? sizeof(' . $varref . ') : 0;';
- }
-
- $tag_template_php .= 'if ($_' . $tag_args . '_count) {';
-
- /**
- * The following uses foreach for iteration instead of a for loop, foreach is faster but requires PHP to make a copy of the contents of the array which uses more memory
- * <code>
- * if (!$offset)
- * {
- * $tag_template_php .= 'foreach (' . $varref . ' as $_' . $tag_args . '_i => $_' . $tag_args . '_val){';
- * }
- * </code>
- */
-
- $tag_template_php .= 'for ($_' . $tag_args . '_i = ' . $loop_start . '; $_' . $tag_args . '_i < ' . $loop_end . '; ++$_' . $tag_args . '_i){';
- $tag_template_php .= '$_'. $tag_args . '_val = &' . $varref . '[$_'. $tag_args. '_i];';
-
- return $tag_template_php;
- }
-
- /**
- * Compile IF tags - much of this is from Smarty with
- * some adaptions for our block level methods
- * @access private
- */
- function compile_tag_if($tag_args, $elseif)
- {
- // Tokenize args for 'if' tag.
- preg_match_all('/(?:
- "[^"\\\\]*(?:\\\\.[^"\\\\]*)*" |
- \'[^\'\\\\]*(?:\\\\.[^\'\\\\]*)*\' |
- [(),] |
- [^\s(),]+)/x', $tag_args, $match);
-
- $tokens = $match[0];
- $is_arg_stack = array();
-
- for ($i = 0, $size = sizeof($tokens); $i < $size; $i++)
- {
- $token = &$tokens[$i];
-
- switch ($token)
- {
- case '!==':
- case '===':
- case '<<':
- case '>>':
- case '|':
- case '^':
- case '&':
- case '~':
- case ')':
- case ',':
- case '+':
- case '-':
- case '*':
- case '/':
- case '@':
- break;
-
- case '==':
- case 'eq':
- $token = '==';
- break;
-
- case '!=':
- case '<>':
- case 'ne':
- case 'neq':
- $token = '!=';
- break;
-
- case '<':
- case 'lt':
- $token = '<';
- break;
-
- case '<=':
- case 'le':
- case 'lte':
- $token = '<=';
- break;
-
- case '>':
- case 'gt':
- $token = '>';
- break;
-
- case '>=':
- case 'ge':
- case 'gte':
- $token = '>=';
- break;
-
- case '&&':
- case 'and':
- $token = '&&';
- break;
-
- case '||':
- case 'or':
- $token = '||';
- break;
-
- case '!':
- case 'not':
- $token = '!';
- break;
-
- case '%':
- case 'mod':
- $token = '%';
- break;
-
- case '(':
- array_push($is_arg_stack, $i);
- break;
-
- case 'is':
- $is_arg_start = ($tokens[$i-1] == ')') ? array_pop($is_arg_stack) : $i-1;
- $is_arg = implode(' ', array_slice($tokens, $is_arg_start, $i - $is_arg_start));
-
- $new_tokens = $this->_parse_is_expr($is_arg, array_slice($tokens, $i+1));
-
- array_splice($tokens, $is_arg_start, sizeof($tokens), $new_tokens);
-
- $i = $is_arg_start;
-
- // no break
-
- default:
- if (preg_match('#^((?:[a-z0-9\-_]+\.)+)?(\$)?(?=[A-Z])([A-Z0-9\-_]+)#s', $token, $varrefs))
- {
- $token = (!empty($varrefs[1])) ? $this->generate_block_data_ref(substr($varrefs[1], 0, -1), true, $varrefs[2]) . '[\'' . $varrefs[3] . '\']' : (($varrefs[2]) ? '$this->_tpldata[\'DEFINE\'][\'.\'][\'' . $varrefs[3] . '\']' : '$this->_rootref[\'' . $varrefs[3] . '\']');
- }
- else if (preg_match('#^\.((?:[a-z0-9\-_]+\.?)+)$#s', $token, $varrefs))
- {
- // Allow checking if loops are set with .loopname
- // It is also possible to check the loop count by doing <!-- IF .loopname > 1 --> for example
- $blocks = explode('.', $varrefs[1]);
-
- // If the block is nested, we have a reference that we can grab.
- // If the block is not nested, we just go and grab the block from _tpldata
- if (sizeof($blocks) > 1)
- {
- $block = array_pop($blocks);
- $namespace = implode('.', $blocks);
- $varref = $this->generate_block_data_ref($namespace, true);
-
- // Add the block reference for the last child.
- $varref .= "['" . $block . "']";
- }
- else
- {
- $varref = '$this->_tpldata';
-
- // Add the block reference for the last child.
- $varref .= "['" . $blocks[0] . "']";
- }
- $token = "sizeof($varref)";
- }
- else if (!empty($token))
- {
- $token = '(' . $token . ')';
- }
-
- break;
- }
- }
-
- // If there are no valid tokens left or only control/compare characters left, we do skip this statement
- if (!sizeof($tokens) || str_replace(array(' ', '=', '!', '<', '>', '&', '|', '%', '(', ')'), '', implode('', $tokens)) == '')
- {
- $tokens = array('false');
- }
- return (($elseif) ? '} else if (' : 'if (') . (implode(' ', $tokens) . ') { ');
- }
-
- /**
- * Compile DEFINE tags
- * @access private
- */
- function compile_tag_define($tag_args, $op)
- {
- preg_match('#^((?:[a-z0-9\-_]+\.)+)?\$(?=[A-Z])([A-Z0-9_\-]*)(?: = (\'?)([^\']*)(\'?))?$#', $tag_args, $match);
-
- if (empty($match[2]) || (!isset($match[4]) && $op))
- {
- return '';
- }
-
- if (!$op)
- {
- return 'unset(' . (($match[1]) ? $this->generate_block_data_ref(substr($match[1], 0, -1), true, true) . '[\'' . $match[2] . '\']' : '$this->_tpldata[\'DEFINE\'][\'.\'][\'' . $match[2] . '\']') . ');';
- }
-
- // Are we a string?
- if ($match[3] && $match[5])
- {
- $match[4] = str_replace(array('\\\'', '\\\\', '\''), array('\'', '\\', '\\\''), $match[4]);
-
- // Compile reference, we allow template variables in defines...
- $match[4] = $this->compile($match[4]);
-
- // Now replace the php code
- $match[4] = "'" . str_replace(array('<?php echo ', '; ?>'), array("' . ", " . '"), $match[4]) . "'";
- }
- else
- {
- preg_match('#true|false|\.#i', $match[4], $type);
-
- switch (strtolower($type[0]))
- {
- case 'true':
- case 'false':
- $match[4] = strtoupper($match[4]);
- break;
-
- case '.':
- $match[4] = doubleval($match[4]);
- break;
-
- default:
- $match[4] = intval($match[4]);
- break;
- }
- }
-
- return (($match[1]) ? $this->generate_block_data_ref(substr($match[1], 0, -1), true, true) . '[\'' . $match[2] . '\']' : '$this->_tpldata[\'DEFINE\'][\'.\'][\'' . $match[2] . '\']') . ' = ' . $match[4] . ';';
- }
-
- /**
- * Compile INCLUDE tag
- * @access private
- */
- function compile_tag_include($tag_args)
- {
- // Process dynamic includes
- if ($tag_args[0] == '$')
- {
- return "if (isset($tag_args)) { \$this->_tpl_include($tag_args); }";
- }
-
- return "\$this->_tpl_include('$tag_args');";
- }
-
- /**
- * Compile INCLUDE_PHP tag
- * @access private
- */
- function compile_tag_include_php($tag_args)
- {
- return "\$this->_php_include('$tag_args');";
- }
-
- /**
- * parse expression
- * This is from Smarty
- * @access private
- */
- function _parse_is_expr($is_arg, $tokens)
- {
- $expr_end = 0;
- $negate_expr = false;
-
- if (($first_token = array_shift($tokens)) == 'not')
- {
- $negate_expr = true;
- $expr_type = array_shift($tokens);
- }
- else
- {
- $expr_type = $first_token;
- }
-
- switch ($expr_type)
- {
- case 'even':
- if (@$tokens[$expr_end] == 'by')
- {
- $expr_end++;
- $expr_arg = $tokens[$expr_end++];
- $expr = "!(($is_arg / $expr_arg) % $expr_arg)";
- }
- else
- {
- $expr = "!($is_arg & 1)";
- }
- break;
-
- case 'odd':
- if (@$tokens[$expr_end] == 'by')
- {
- $expr_end++;
- $expr_arg = $tokens[$expr_end++];
- $expr = "(($is_arg / $expr_arg) % $expr_arg)";
- }
- else
- {
- $expr = "($is_arg & 1)";
- }
- break;
-
- case 'div':
- if (@$tokens[$expr_end] == 'by')
- {
- $expr_end++;
- $expr_arg = $tokens[$expr_end++];
- $expr = "!($is_arg % $expr_arg)";
- }
- break;
- }
-
- if ($negate_expr)
- {
- $expr = "!($expr)";
- }
-
- array_splice($tokens, 0, $expr_end, $expr);
-
- return $tokens;
- }
-
- /**
- * Generates a reference to the given variable inside the given (possibly nested)
- * block namespace. This is a string of the form:
- * ' . $this->_tpldata['parent'][$_parent_i]['$child1'][$_child1_i]['$child2'][$_child2_i]...['varname'] . '
- * It's ready to be inserted into an "echo" line in one of the templates.
- * NOTE: expects a trailing "." on the namespace.
- * @access private
- */
- function generate_block_varref($namespace, $varname, $echo = true, $defop = false)
- {
- // Strip the trailing period.
- $namespace = substr($namespace, 0, -1);
-
- // Get a reference to the data block for this namespace.
- $varref = $this->generate_block_data_ref($namespace, true, $defop);
- // Prepend the necessary code to stick this in an echo line.
-
- // Append the variable reference.
- $varref .= "['$varname']";
- $varref = ($echo) ? "<?php echo $varref; ?>" : ((isset($varref)) ? $varref : '');
-
- return $varref;
- }
-
- /**
- * Generates a reference to the array of data values for the given
- * (possibly nested) block namespace. This is a string of the form:
- * $this->_tpldata['parent'][$_parent_i]['$child1'][$_child1_i]['$child2'][$_child2_i]...['$childN']
- *
- * If $include_last_iterator is true, then [$_childN_i] will be appended to the form shown above.
- * NOTE: does not expect a trailing "." on the blockname.
- * @access private
- */
- function generate_block_data_ref($blockname, $include_last_iterator, $defop = false)
- {
- // Get an array of the blocks involved.
- $blocks = explode('.', $blockname);
- $blockcount = sizeof($blocks) - 1;
-
- // DEFINE is not an element of any referenced variable, we must use _tpldata to access it
- if ($defop)
- {
- $varref = '$this->_tpldata[\'DEFINE\']';
- // Build up the string with everything but the last child.
- for ($i = 0; $i < $blockcount; $i++)
- {
- $varref .= "['" . $blocks[$i] . "'][\$_" . $blocks[$i] . '_i]';
- }
- // Add the block reference for the last child.
- $varref .= "['" . $blocks[$blockcount] . "']";
- // Add the iterator for the last child if requried.
- if ($include_last_iterator)
- {
- $varref .= '[$_' . $blocks[$blockcount] . '_i]';
- }
- return $varref;
- }
- else if ($include_last_iterator)
- {
- return '$_'. $blocks[$blockcount] . '_val';
- }
- else
- {
- return '$_'. $blocks[$blockcount - 1] . '_val[\''. $blocks[$blockcount]. '\']';
- }
- }
-
- /**
- * Write compiled file to cache directory
- * @access private
- */
- function compile_write($handle, $data)
- {
- global $phpEx;
-
- $filename = $this->template->cachepath . str_replace('/', '.', $this->template->filename[$handle]) . '.' . $phpEx;
-
- $data = "<?php if (!defined('IN_PHPBB')) exit;" . ((strpos($data, '<?php') === 0) ? substr($data, 5) : ' ?>' . $data);
-
- if ($fp = @fopen($filename, 'wb'))
- {
- @flock($fp, LOCK_EX);
- @fwrite ($fp, $data);
- @flock($fp, LOCK_UN);
- @fclose($fp);
-
- phpbb_chmod($filename, CHMOD_READ | CHMOD_WRITE);
- }
-
- return;
- }
-}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/functions_transfer.php b/phpBB/includes/functions_transfer.php
index 5ab7a87efd..17b458d2cb 100644
--- a/phpBB/includes/functions_transfer.php
+++ b/phpBB/includes/functions_transfer.php
@@ -2,9 +2,8 @@
/**
*
* @package phpBB3
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -235,7 +234,7 @@ class transfer
/**
* Determine methods able to be used
*/
- function methods()
+ static public function methods()
{
$methods = array();
$disabled_functions = explode(',', @ini_get('disable_functions'));
@@ -280,7 +279,7 @@ class ftp extends transfer
}
// Init some needed values
- transfer::transfer();
+ $this->transfer();
return;
}
@@ -288,7 +287,7 @@ class ftp extends transfer
/**
* Requests data
*/
- function data()
+ static public function data()
{
global $user;
@@ -534,7 +533,7 @@ class ftp_fsock extends transfer
}
// Init some needed values
- transfer::transfer();
+ $this->transfer();
return;
}
@@ -542,7 +541,7 @@ class ftp_fsock extends transfer
/**
* Requests data
*/
- function data()
+ static public function data()
{
global $user;
@@ -902,5 +901,3 @@ class ftp_fsock extends transfer
return ($return) ? $response : true;
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/functions_upload.php b/phpBB/includes/functions_upload.php
index 73ac1df2d2..04d483e14c 100644
--- a/phpBB/includes/functions_upload.php
+++ b/phpBB/includes/functions_upload.php
@@ -2,9 +2,8 @@
/**
*
* @package phpBB3
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -45,10 +44,16 @@ class filespec
var $upload = '';
/**
+ * The plupload object
+ * @var \phpbb\plupload\plupload
+ */
+ protected $plupload;
+
+ /**
* File Class
* @access private
*/
- function filespec($upload_ary, $upload_namespace)
+ function filespec($upload_ary, $upload_namespace, \phpbb\plupload\plupload $plupload = null)
{
if (!isset($upload_ary))
{
@@ -71,7 +76,7 @@ class filespec
$this->mimetype = 'application/octetstream';
}
- $this->extension = strtolower($this->get_extension($this->realname));
+ $this->extension = strtolower(self::get_extension($this->realname));
// Try to get real filesize from temporary folder (not always working) ;)
$this->filesize = (@filesize($this->filename)) ? @filesize($this->filename) : $this->filesize;
@@ -81,6 +86,7 @@ class filespec
$this->local = (isset($upload_ary['local_mode'])) ? true : false;
$this->upload = $upload_namespace;
+ $this->plupload = $plupload;
}
/**
@@ -152,7 +158,7 @@ class filespec
*/
function is_image()
{
- return (strpos($this->mimetype, 'image/') !== false) ? true : false;
+ return (strpos($this->mimetype, 'image/') === 0);
}
/**
@@ -162,12 +168,14 @@ class filespec
*/
function is_uploaded()
{
- if (!$this->local && !is_uploaded_file($this->filename))
+ $is_plupload = $this->plupload && $this->plupload->is_active();
+
+ if (!$this->local && !$is_plupload && !is_uploaded_file($this->filename))
{
return false;
}
- if ($this->local && !file_exists($this->filename))
+ if (($this->local || $is_plupload) && !file_exists($this->filename))
{
return false;
}
@@ -188,8 +196,11 @@ class filespec
/**
* Get file extension
+ *
+ * @param string Filename that needs to be checked
+ * @return string Extension of the supplied filename
*/
- function get_extension($filename)
+ static public function get_extension($filename)
{
if (strpos($filename, '.') === false)
{
@@ -370,7 +381,7 @@ class filespec
}
// Check image type
- $types = $this->upload->image_types();
+ $types = fileupload::image_types();
if (!isset($types[$this->image_info[2]]) || !in_array($this->extension, $types[$this->image_info[2]]))
{
@@ -427,7 +438,13 @@ class filespec
if (!$this->upload->valid_dimensions($this))
{
- $this->error[] = sprintf($user->lang[$this->upload->error_prefix . 'WRONG_SIZE'], $this->upload->min_width, $this->upload->min_height, $this->upload->max_width, $this->upload->max_height, $this->width, $this->height);
+ $this->error[] = $user->lang($this->upload->error_prefix . 'WRONG_SIZE',
+ $user->lang('PIXELS', (int) $this->upload->min_width),
+ $user->lang('PIXELS', (int) $this->upload->min_height),
+ $user->lang('PIXELS', (int) $this->upload->max_width),
+ $user->lang('PIXELS', (int) $this->upload->max_height),
+ $user->lang('PIXELS', (int) $this->width),
+ $user->lang('PIXELS', (int) $this->height));
return false;
}
@@ -556,15 +573,28 @@ class fileupload
* Upload file from users harddisk
*
* @param string $form_name Form name assigned to the file input field (if it is an array, the key has to be specified)
+ * @param \phpbb\plupload\plupload $plupload The plupload object
+ *
* @return object $file Object "filespec" is returned, all further operations can be done with this object
* @access public
*/
- function form_upload($form_name)
+ function form_upload($form_name, \phpbb\plupload\plupload $plupload = null)
{
- global $user;
+ global $user, $request;
- unset($_FILES[$form_name]['local_mode']);
- $file = new filespec($_FILES[$form_name], $this);
+ $upload = $request->file($form_name);
+ unset($upload['local_mode']);
+
+ if ($plupload)
+ {
+ $result = $plupload->handle_upload($form_name);
+ if (is_array($result))
+ {
+ $upload = array_merge($upload, $result);
+ }
+ }
+
+ $file = new filespec($upload, $this, $plupload);
if ($file->init_error)
{
@@ -573,9 +603,9 @@ class fileupload
}
// Error array filled?
- if (isset($_FILES[$form_name]['error']))
+ if (isset($upload['error']))
{
- $error = $this->assign_internal_error($_FILES[$form_name]['error']);
+ $error = $this->assign_internal_error($upload['error']);
if ($error !== false)
{
@@ -585,7 +615,7 @@ class fileupload
}
// Check if empty file got uploaded (not catched by is_uploaded_file)
- if (isset($_FILES[$form_name]['size']) && $_FILES[$form_name]['size'] == 0)
+ if (isset($upload['size']) && $upload['size'] == 0)
{
$file->error[] = $user->lang[$this->error_prefix . 'EMPTY_FILEUPLOAD'];
return $file;
@@ -626,17 +656,17 @@ class fileupload
*/
function local_upload($source_file, $filedata = false)
{
- global $user;
+ global $user, $request;
- $form_name = 'local';
+ $upload = array();
- $_FILES[$form_name]['local_mode'] = true;
- $_FILES[$form_name]['tmp_name'] = $source_file;
+ $upload['local_mode'] = true;
+ $upload['tmp_name'] = $source_file;
if ($filedata === false)
{
- $_FILES[$form_name]['name'] = utf8_basename($source_file);
- $_FILES[$form_name]['size'] = 0;
+ $upload['name'] = utf8_basename($source_file);
+ $upload['size'] = 0;
$mimetype = '';
if (function_exists('mime_content_type'))
@@ -650,16 +680,16 @@ class fileupload
$mimetype = 'application/octetstream';
}
- $_FILES[$form_name]['type'] = $mimetype;
+ $upload['type'] = $mimetype;
}
else
{
- $_FILES[$form_name]['name'] = $filedata['realname'];
- $_FILES[$form_name]['size'] = $filedata['size'];
- $_FILES[$form_name]['type'] = $filedata['type'];
+ $upload['name'] = $filedata['realname'];
+ $upload['size'] = $filedata['size'];
+ $upload['type'] = $filedata['type'];
}
- $file = new filespec($_FILES[$form_name], $this);
+ $file = new filespec($upload, $this);
if ($file->init_error)
{
@@ -667,9 +697,9 @@ class fileupload
return $file;
}
- if (isset($_FILES[$form_name]['error']))
+ if (isset($upload['error']))
{
- $error = $this->assign_internal_error($_FILES[$form_name]['error']);
+ $error = $this->assign_internal_error($upload['error']);
if ($error !== false)
{
@@ -704,6 +734,7 @@ class fileupload
}
$this->common_checks($file);
+ $request->overwrite('local', $upload, \phpbb\request\request_interface::FILES);
return $file;
}
@@ -996,12 +1027,15 @@ class fileupload
*/
function is_valid($form_name)
{
- return (isset($_FILES[$form_name]) && $_FILES[$form_name]['name'] != 'none') ? true : false;
+ global $request;
+ $upload = $request->file($form_name);
+
+ return (!empty($upload) && $upload['name'] !== 'none');
}
/**
- * Check for allowed extension
+ * Check for bad content (IE mime-sniffing)
*/
function valid_content(&$file)
{
@@ -1009,29 +1043,29 @@ class fileupload
}
/**
- * Return image type/extension mapping
+ * Get image type/extension mapping
+ *
+ * @return array Array containing the image types and their extensions
*/
- function image_types()
+ static public function image_types()
{
return array(
- 1 => array('gif'),
- 2 => array('jpg', 'jpeg'),
- 3 => array('png'),
- 4 => array('swf'),
- 5 => array('psd'),
- 6 => array('bmp'),
- 7 => array('tif', 'tiff'),
- 8 => array('tif', 'tiff'),
- 9 => array('jpg', 'jpeg'),
- 10 => array('jpg', 'jpeg'),
- 11 => array('jpg', 'jpeg'),
- 12 => array('jpg', 'jpeg'),
- 13 => array('swc'),
- 14 => array('iff'),
- 15 => array('wbmp'),
- 16 => array('xbm'),
+ IMAGETYPE_GIF => array('gif'),
+ IMAGETYPE_JPEG => array('jpg', 'jpeg'),
+ IMAGETYPE_PNG => array('png'),
+ IMAGETYPE_SWF => array('swf'),
+ IMAGETYPE_PSD => array('psd'),
+ IMAGETYPE_BMP => array('bmp'),
+ IMAGETYPE_TIFF_II => array('tif', 'tiff'),
+ IMAGETYPE_TIFF_MM => array('tif', 'tiff'),
+ IMAGETYPE_JPC => array('jpg', 'jpeg'),
+ IMAGETYPE_JP2 => array('jpg', 'jpeg'),
+ IMAGETYPE_JPX => array('jpg', 'jpeg'),
+ IMAGETYPE_JB2 => array('jpg', 'jpeg'),
+ IMAGETYPE_SWC => array('swc'),
+ IMAGETYPE_IFF => array('iff'),
+ IMAGETYPE_WBMP => array('wbmp'),
+ IMAGETYPE_XBM => array('xbm'),
);
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/functions_url_matcher.php b/phpBB/includes/functions_url_matcher.php
new file mode 100644
index 0000000000..8e5ae20f93
--- /dev/null
+++ b/phpBB/includes/functions_url_matcher.php
@@ -0,0 +1,106 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+use Symfony\Component\Routing\Matcher\Dumper\PhpMatcherDumper;
+use Symfony\Component\Routing\Matcher\UrlMatcher;
+use Symfony\Component\Routing\RequestContext;
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* Create a new UrlMatcher class and dump it into the cache file
+*
+* @param \phpbb\extension\finder $finder Extension finder
+* @param RequestContext $context Symfony RequestContext object
+* @param string $root_path Root path
+* @param string $php_ext PHP extension
+* @return null
+*/
+function phpbb_get_url_matcher(\phpbb\extension\finder $finder, RequestContext $context, $root_path, $php_ext)
+{
+ if (defined('DEBUG'))
+ {
+ return phpbb_create_url_matcher($finder, $context, $root_path);
+ }
+
+ if (!phpbb_url_matcher_dumped($root_path, $php_ext))
+ {
+ phpbb_create_dumped_url_matcher($finder, $root_path, $php_ext);
+ }
+
+ return phpbb_load_url_matcher($context, $root_path, $php_ext);
+}
+
+/**
+* Create a new UrlMatcher class and dump it into the cache file
+*
+* @param \phpbb\extension\finder $finder Extension finder
+* @param string $root_path Root path
+* @param string $php_ext PHP extension
+* @return null
+*/
+function phpbb_create_dumped_url_matcher(\phpbb\extension\finder $finder, $root_path, $php_ext)
+{
+ $provider = new \phpbb\controller\provider($finder);
+ $routes = $provider->find($root_path)->get_routes();
+ $dumper = new PhpMatcherDumper($routes);
+ $cached_url_matcher_dump = $dumper->dump(array(
+ 'class' => 'phpbb_url_matcher',
+ ));
+
+ file_put_contents($root_path . 'cache/url_matcher.' . $php_ext, $cached_url_matcher_dump);
+}
+
+/**
+* Create a non-cached UrlMatcher
+*
+* @param \phpbb\extension\finder $finder Extension finder
+* @param RequestContext $context Symfony RequestContext object
+* @return UrlMatcher
+*/
+function phpbb_create_url_matcher(\phpbb\extension\finder $finder, RequestContext $context, $root_path)
+{
+ $provider = new \phpbb\controller\provider($finder);
+ $routes = $provider->find($root_path)->get_routes();
+ return new UrlMatcher($routes, $context);
+}
+
+/**
+* Load the cached phpbb_url_matcher class
+*
+* @param RequestContext $context Symfony RequestContext object
+* @param string $root_path Root path
+* @param string $php_ext PHP extension
+* @return phpbb_url_matcher
+*/
+function phpbb_load_url_matcher(RequestContext $context, $root_path, $php_ext)
+{
+ require($root_path . 'cache/url_matcher.' . $php_ext);
+ return new phpbb_url_matcher($context);
+}
+
+/**
+* Determine whether we have our dumped URL matcher
+*
+* The class is automatically dumped to the cache directory
+*
+* @param string $root_path Root path
+* @param string $php_ext PHP extension
+* @return bool True if it exists, false if not
+*/
+function phpbb_url_matcher_dumped($root_path, $php_ext)
+{
+ return file_exists($root_path . 'cache/url_matcher.' . $php_ext);
+}
diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php
index ea8b0a4640..6682622d94 100644
--- a/phpBB/includes/functions_user.php
+++ b/phpBB/includes/functions_user.php
@@ -2,9 +2,8 @@
/**
*
* @package phpBB3
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -113,7 +112,7 @@ function update_last_username()
*/
function user_update_name($old_name, $new_name)
{
- global $config, $db, $cache;
+ global $config, $db, $cache, $phpbb_dispatcher;
$update_ary = array(
FORUMS_TABLE => array('forum_last_poster_name'),
@@ -138,6 +137,17 @@ function user_update_name($old_name, $new_name)
set_config('newest_username', $new_name, true);
}
+ /**
+ * Update a username when it is changed
+ *
+ * @event core.update_username
+ * @var string old_name The old username that is replaced
+ * @var string new_name The new username
+ * @since 3.1-A1
+ */
+ $vars = array('old_name', 'new_name');
+ extract($phpbb_dispatcher->trigger_event('core.update_username', compact($vars)));
+
// Because some tables/caches use username-specific data we need to purge this here.
$cache->destroy('sql', MODERATOR_CACHE_TABLE);
}
@@ -152,6 +162,7 @@ function user_update_name($old_name, $new_name)
function user_add($user_row, $cp_data = false)
{
global $db, $user, $auth, $config, $phpbb_root_path, $phpEx;
+ global $phpbb_dispatcher, $phpbb_container;
if (empty($user_row['username']) || !isset($user_row['group_id']) || !isset($user_row['user_email']) || !isset($user_row['user_type']))
{
@@ -198,12 +209,9 @@ function user_add($user_row, $cp_data = false)
'user_lastpost_time' => 0,
'user_lastpage' => '',
'user_posts' => 0,
- 'user_dst' => (int) $config['board_dst'],
'user_colour' => '',
- 'user_occ' => '',
- 'user_interests' => '',
'user_avatar' => '',
- 'user_avatar_type' => 0,
+ 'user_avatar_type' => '',
'user_avatar_width' => 0,
'user_avatar_height' => 0,
'user_new_privmsg' => 0,
@@ -246,6 +254,16 @@ function user_add($user_row, $cp_data = false)
}
}
+ /**
+ * Use this event to modify the values to be inserted when a user is added
+ *
+ * @event core.user_add_modify_data
+ * @var array sql_ary Array of data to be inserted when a user is added
+ * @since 3.1-A1
+ */
+ $vars = array('sql_ary');
+ extract($phpbb_dispatcher->trigger_event('core.user_add_modify_data', compact($vars)));
+
$sql = 'INSERT INTO ' . USERS_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary);
$db->sql_query($sql);
@@ -256,13 +274,9 @@ function user_add($user_row, $cp_data = false)
{
$cp_data['user_id'] = (int) $user_id;
- if (!class_exists('custom_profile'))
- {
- include_once($phpbb_root_path . 'includes/functions_profile_fields.' . $phpEx);
- }
-
+ $cp = $phpbb_container->get('profilefields.manager');
$sql = 'INSERT INTO ' . PROFILE_FIELDS_DATA_TABLE . ' ' .
- $db->sql_build_array('INSERT', custom_profile::build_insert_sql_array($cp_data));
+ $db->sql_build_array('INSERT', $cp->build_insert_sql_array($cp_data));
$db->sql_query($sql);
}
@@ -290,8 +304,10 @@ function user_add($user_row, $cp_data = false)
if ($add_group_id)
{
- // Because these actions only fill the log unneccessarily we skip the add_log() entry with a little hack. :/
- $GLOBALS['skip_add_log'] = true;
+ global $phpbb_log;
+
+ // Because these actions only fill the log unneccessarily we skip the add_log() entry.
+ $phpbb_log->disable('admin');
// Add user to "newly registered users" group and set to default group if admin specified so.
if ($config['new_member_group_default'])
@@ -304,7 +320,7 @@ function user_add($user_row, $cp_data = false)
group_user_add($add_group_id, $user_id);
}
- unset($GLOBALS['skip_add_log']);
+ $phpbb_log->enable('admin');
}
}
@@ -330,28 +346,55 @@ function user_add($user_row, $cp_data = false)
/**
* Remove User
+* @param $mode Either 'retain' or 'remove'
*/
-function user_delete($mode, $user_id, $post_username = false)
+function user_delete($mode, $user_ids, $retain_username = true)
{
- global $cache, $config, $db, $user, $auth;
+ global $cache, $config, $db, $user, $auth, $phpbb_dispatcher;
global $phpbb_root_path, $phpEx;
+ $db->sql_transaction('begin');
+
+ $user_rows = array();
+ if (!is_array($user_ids))
+ {
+ $user_ids = array($user_ids);
+ }
+
+ $user_id_sql = $db->sql_in_set('user_id', $user_ids);
+
$sql = 'SELECT *
FROM ' . USERS_TABLE . '
- WHERE user_id = ' . $user_id;
+ WHERE ' . $user_id_sql;
$result = $db->sql_query($sql);
- $user_row = $db->sql_fetchrow($result);
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $user_rows[(int) $row['user_id']] = $row;
+ }
$db->sql_freeresult($result);
- if (!$user_row)
+ if (empty($user_rows))
{
return false;
}
+ /**
+ * Event before a user is deleted
+ *
+ * @event core.delete_user_before
+ * @var string mode Mode of deletion (retain/delete posts)
+ * @var array user_ids IDs of the deleted user
+ * @var mixed retain_username True if username should be retained
+ * or false if not
+ * @since 3.1-A1
+ */
+ $vars = array('mode', 'user_ids', 'retain_username');
+ extract($phpbb_dispatcher->trigger_event('core.delete_user_before', compact($vars)));
+
// Before we begin, we will remove the reports the user issued.
$sql = 'SELECT r.post_id, p.topic_id
FROM ' . REPORTS_TABLE . ' r, ' . POSTS_TABLE . ' p
- WHERE r.user_id = ' . $user_id . '
+ WHERE ' . $db->sql_in_set('r.user_id', $user_ids) . '
AND p.post_id = r.post_id';
$result = $db->sql_query($sql);
@@ -405,97 +448,124 @@ function user_delete($mode, $user_id, $post_username = false)
}
// Remove reports
- $db->sql_query('DELETE FROM ' . REPORTS_TABLE . ' WHERE user_id = ' . $user_id);
+ $db->sql_query('DELETE FROM ' . REPORTS_TABLE . ' WHERE ' . $user_id_sql);
- if ($user_row['user_avatar'] && $user_row['user_avatar_type'] == AVATAR_UPLOAD)
- {
- avatar_delete('user', $user_row);
- }
+ $num_users_delta = 0;
- switch ($mode)
+ // Some things need to be done in the loop (if the query changes based
+ // on which user is currently being deleted)
+ $added_guest_posts = 0;
+ foreach ($user_rows as $user_id => $user_row)
{
- case 'retain':
-
- $db->sql_transaction('begin');
-
- if ($post_username === false)
- {
- $post_username = $user->lang['GUEST'];
- }
+ if ($user_row['user_avatar'] && $user_row['user_avatar_type'] == 'avatar.driver.upload')
+ {
+ avatar_delete('user', $user_row);
+ }
- // If the user is inactive and newly registered we assume no posts from this user being there...
- if ($user_row['user_type'] == USER_INACTIVE && $user_row['user_inactive_reason'] == INACTIVE_REGISTER && !$user_row['user_posts'])
- {
- }
- else
- {
- $sql = 'UPDATE ' . FORUMS_TABLE . '
- SET forum_last_poster_id = ' . ANONYMOUS . ", forum_last_poster_name = '" . $db->sql_escape($post_username) . "', forum_last_poster_colour = ''
- WHERE forum_last_poster_id = $user_id";
- $db->sql_query($sql);
+ // Decrement number of users if this user is active
+ if ($user_row['user_type'] != USER_INACTIVE && $user_row['user_type'] != USER_IGNORE)
+ {
+ --$num_users_delta;
+ }
- $sql = 'UPDATE ' . POSTS_TABLE . '
- SET poster_id = ' . ANONYMOUS . ", post_username = '" . $db->sql_escape($post_username) . "'
- WHERE poster_id = $user_id";
- $db->sql_query($sql);
+ switch ($mode)
+ {
+ case 'retain':
+ if ($retain_username === false)
+ {
+ $post_username = $user->lang['GUEST'];
+ }
+ else
+ {
+ $post_username = $user_row['username'];
+ }
- $sql = 'UPDATE ' . POSTS_TABLE . '
- SET post_edit_user = ' . ANONYMOUS . "
- WHERE post_edit_user = $user_id";
- $db->sql_query($sql);
+ // If the user is inactive and newly registered
+ // we assume no posts from the user, and save
+ // the queries
+ if ($user_row['user_type'] != USER_INACTIVE || $user_row['user_inactive_reason'] != INACTIVE_REGISTER || $user_row['user_posts'])
+ {
+ // When we delete these users and retain the posts, we must assign all the data to the guest user
+ $sql = 'UPDATE ' . FORUMS_TABLE . '
+ SET forum_last_poster_id = ' . ANONYMOUS . ", forum_last_poster_name = '" . $db->sql_escape($post_username) . "', forum_last_poster_colour = ''
+ WHERE forum_last_poster_id = $user_id";
+ $db->sql_query($sql);
- $sql = 'UPDATE ' . TOPICS_TABLE . '
- SET topic_poster = ' . ANONYMOUS . ", topic_first_poster_name = '" . $db->sql_escape($post_username) . "', topic_first_poster_colour = ''
- WHERE topic_poster = $user_id";
- $db->sql_query($sql);
+ $sql = 'UPDATE ' . POSTS_TABLE . '
+ SET poster_id = ' . ANONYMOUS . ", post_username = '" . $db->sql_escape($post_username) . "'
+ WHERE poster_id = $user_id";
+ $db->sql_query($sql);
- $sql = 'UPDATE ' . TOPICS_TABLE . '
- SET topic_last_poster_id = ' . ANONYMOUS . ", topic_last_poster_name = '" . $db->sql_escape($post_username) . "', topic_last_poster_colour = ''
- WHERE topic_last_poster_id = $user_id";
- $db->sql_query($sql);
+ $sql = 'UPDATE ' . TOPICS_TABLE . '
+ SET topic_poster = ' . ANONYMOUS . ", topic_first_poster_name = '" . $db->sql_escape($post_username) . "', topic_first_poster_colour = ''
+ WHERE topic_poster = $user_id";
+ $db->sql_query($sql);
- $sql = 'UPDATE ' . ATTACHMENTS_TABLE . '
- SET poster_id = ' . ANONYMOUS . "
- WHERE poster_id = $user_id";
- $db->sql_query($sql);
+ $sql = 'UPDATE ' . TOPICS_TABLE . '
+ SET topic_last_poster_id = ' . ANONYMOUS . ", topic_last_poster_name = '" . $db->sql_escape($post_username) . "', topic_last_poster_colour = ''
+ WHERE topic_last_poster_id = $user_id";
+ $db->sql_query($sql);
- // Since we change every post by this author, we need to count this amount towards the anonymous user
+ // Since we change every post by this author, we need to count this amount towards the anonymous user
- // Update the post count for the anonymous user
- if ($user_row['user_posts'])
- {
- $sql = 'UPDATE ' . USERS_TABLE . '
- SET user_posts = user_posts + ' . $user_row['user_posts'] . '
- WHERE user_id = ' . ANONYMOUS;
- $db->sql_query($sql);
+ if ($user_row['user_posts'])
+ {
+ $added_guest_posts += $user_row['user_posts'];
+ }
}
- }
-
- $db->sql_transaction('commit');
+ break;
- break;
+ case 'remove':
+ // there is nothing variant specific to deleting posts
+ break;
+ }
+ }
- case 'remove':
+ if ($num_users_delta != 0)
+ {
+ set_config_count('num_users', $num_users_delta, true);
+ }
- if (!function_exists('delete_posts'))
- {
- include($phpbb_root_path . 'includes/functions_admin.' . $phpEx);
- }
+ // Now do the invariant tasks
+ // all queries performed in one call of this function are in a single transaction
+ // so this is kosher
+ if ($mode == 'retain')
+ {
+ // Assign more data to the Anonymous user
+ $sql = 'UPDATE ' . ATTACHMENTS_TABLE . '
+ SET poster_id = ' . ANONYMOUS . '
+ WHERE ' . $db->sql_in_set('poster_id', $user_ids);
+ $db->sql_query($sql);
- // Delete posts, attachments, etc.
- delete_posts('poster_id', $user_id);
+ $sql = 'UPDATE ' . POSTS_TABLE . '
+ SET post_edit_user = ' . ANONYMOUS . '
+ WHERE ' . $db->sql_in_set('post_edit_user', $user_ids);
+ $db->sql_query($sql);
- break;
+ $sql = 'UPDATE ' . USERS_TABLE . '
+ SET user_posts = user_posts + ' . $added_guest_posts . '
+ WHERE user_id = ' . ANONYMOUS;
+ $db->sql_query($sql);
}
+ else if ($mode == 'remove')
+ {
+ if (!function_exists('delete_posts'))
+ {
+ include($phpbb_root_path . 'includes/functions_admin.' . $phpEx);
+ }
- $db->sql_transaction('begin');
+ // Delete posts, attachments, etc.
+ // delete_posts can handle any number of IDs in its second argument
+ delete_posts('poster_id', $user_ids);
+ }
$table_ary = array(USERS_TABLE, USER_GROUP_TABLE, TOPICS_WATCH_TABLE, FORUMS_WATCH_TABLE, ACL_USERS_TABLE, TOPICS_TRACK_TABLE, TOPICS_POSTED_TABLE, FORUMS_TRACK_TABLE, PROFILE_FIELDS_DATA_TABLE, MODERATOR_CACHE_TABLE, DRAFTS_TABLE, BOOKMARKS_TABLE, SESSIONS_KEYS_TABLE, PRIVMSGS_FOLDER_TABLE, PRIVMSGS_RULES_TABLE);
+ // Delete the miscellaneous (non-post) data for the user
foreach ($table_ary as $table)
{
$sql = "DELETE FROM $table
- WHERE user_id = $user_id";
+ WHERE " . $user_id_sql;
$db->sql_query($sql);
}
@@ -503,29 +573,29 @@ function user_delete($mode, $user_id, $post_username = false)
// Delete user log entries about this user
$sql = 'DELETE FROM ' . LOG_TABLE . '
- WHERE reportee_id = ' . $user_id;
+ WHERE ' . $db->sql_in_set('reportee_id', $user_ids);
$db->sql_query($sql);
// Change user_id to anonymous for this users triggered events
$sql = 'UPDATE ' . LOG_TABLE . '
SET user_id = ' . ANONYMOUS . '
- WHERE user_id = ' . $user_id;
+ WHERE ' . $user_id_sql;
$db->sql_query($sql);
// Delete the user_id from the zebra table
$sql = 'DELETE FROM ' . ZEBRA_TABLE . '
- WHERE user_id = ' . $user_id . '
- OR zebra_id = ' . $user_id;
+ WHERE ' . $user_id_sql . '
+ OR ' . $db->sql_in_set('zebra_id', $user_ids);
$db->sql_query($sql);
// Delete the user_id from the banlist
$sql = 'DELETE FROM ' . BANLIST_TABLE . '
- WHERE ban_userid = ' . $user_id;
+ WHERE ' . $db->sql_in_set('ban_userid', $user_ids);
$db->sql_query($sql);
// Delete the user_id from the session table
$sql = 'DELETE FROM ' . SESSIONS_TABLE . '
- WHERE session_user_id = ' . $user_id;
+ WHERE ' . $db->sql_in_set('session_user_id', $user_ids);
$db->sql_query($sql);
// Clean the private messages tables from the user
@@ -533,22 +603,29 @@ function user_delete($mode, $user_id, $post_username = false)
{
include($phpbb_root_path . 'includes/functions_privmsgs.' . $phpEx);
}
- phpbb_delete_user_pms($user_id);
+ phpbb_delete_users_pms($user_ids);
$db->sql_transaction('commit');
+ /**
+ * Event after a user is deleted
+ *
+ * @event core.delete_user_after
+ * @var string mode Mode of deletion (retain/delete posts)
+ * @var array user_ids IDs of the deleted user
+ * @var mixed retain_username True if username should be retained
+ * or false if not
+ * @since 3.1-A1
+ */
+ $vars = array('mode', 'user_ids', 'retain_username');
+ extract($phpbb_dispatcher->trigger_event('core.delete_user_after', compact($vars)));
+
// Reset newest user info if appropriate
- if ($config['newest_user_id'] == $user_id)
+ if (in_array($config['newest_user_id'], $user_ids))
{
update_last_username();
}
- // Decrement number of users if this user is active
- if ($user_row['user_type'] != USER_INACTIVE && $user_row['user_type'] != USER_IGNORE)
- {
- set_config_count('num_users', -1, true);
- }
-
return false;
}
@@ -678,8 +755,10 @@ function user_ban($mode, $ban, $ban_len, $ban_len_other, $ban_exclude, $ban_reas
if (sizeof($ban_other) == 3 && ((int)$ban_other[0] < 9999) &&
(strlen($ban_other[0]) == 4) && (strlen($ban_other[1]) == 2) && (strlen($ban_other[2]) == 2))
{
- $time_offset = (isset($user->timezone) && isset($user->dst)) ? (int) $user->timezone + (int) $user->dst : 0;
- $ban_end = max($current_time, gmmktime(0, 0, 0, (int)$ban_other[1], (int)$ban_other[2], (int)$ban_other[0]) - $time_offset);
+ $ban_end = max($current_time, $user->create_datetime()
+ ->setDate((int) $ban_other[0], (int) $ban_other[1], (int) $ban_other[2])
+ ->setTime(0, 0, 0)
+ ->getTimestamp() + $user->timezone->getOffset(new DateTime('UTC')));
}
else
{
@@ -1398,6 +1477,22 @@ function validate_language_iso_name($lang_iso)
}
/**
+* Validate Timezone Name
+*
+* Tests whether a timezone name is valid
+*
+* @param string $timezone The timezone string to test
+*
+* @return bool|string Either false if validation succeeded or
+* a string which will be used as the error message
+* (with the variable name appended)
+*/
+function phpbb_validate_timezone($timezone)
+{
+ return (in_array($timezone, phpbb_get_timezone_identifiers($timezone))) ? false : 'TIMEZONE_INVALID';
+}
+
+/**
* Check to see if the username has been taken, or if it is disallowed.
* Also checks if it includes the " character, which we don't allow in usernames.
* Used for registering, changing names, and posting anonymously with a username
@@ -1428,7 +1523,7 @@ function validate_username($username, $allowed_username = false)
$mbstring = $pcre = false;
// generic UTF-8 character types supported?
- if ((version_compare(PHP_VERSION, '5.1.0', '>=') || (version_compare(PHP_VERSION, '5.0.0-dev', '<=') && version_compare(PHP_VERSION, '4.4.0', '>='))) && @preg_match('/\p{L}/u', 'a') !== false)
+ if (phpbb_pcre_utf8_support())
{
$pcre = true;
}
@@ -1565,7 +1660,7 @@ function validate_password($password)
$pcre = $mbstring = false;
// generic UTF-8 character types supported?
- if ((version_compare(PHP_VERSION, '5.1.0', '>=') || (version_compare(PHP_VERSION, '5.0.0-dev', '<=') && version_compare(PHP_VERSION, '4.4.0', '>='))) && @preg_match('/\p{L}/u', 'a') !== false)
+ if (phpbb_pcre_utf8_support())
{
$upp = '\p{Lu}';
$low = '\p{Ll}';
@@ -1710,15 +1805,15 @@ function validate_jabber($jid)
return false;
}
- $seperator_pos = strpos($jid, '@');
+ $separator_pos = strpos($jid, '@');
- if ($seperator_pos === false)
+ if ($separator_pos === false)
{
return 'WRONG_DATA';
}
- $username = substr($jid, 0, $seperator_pos);
- $realm = substr($jid, $seperator_pos + 1);
+ $username = substr($jid, 0, $separator_pos);
+ $realm = substr($jid, $separator_pos + 1);
if (strlen($username) == 0 || strlen($realm) < 3)
{
@@ -1965,6 +2060,7 @@ function avatar_delete($mode, $row, $clean_db = false)
avatar_remove_db($row[$mode . '_avatar']);
}
$filename = get_avatar_filename($row[$mode . '_avatar']);
+
if (file_exists($phpbb_root_path . $config['avatar_path'] . '/' . $filename))
{
@unlink($phpbb_root_path . $config['avatar_path'] . '/' . $filename);
@@ -1975,133 +2071,6 @@ function avatar_delete($mode, $row, $clean_db = false)
}
/**
-* Remote avatar linkage
-*/
-function avatar_remote($data, &$error)
-{
- global $config, $db, $user, $phpbb_root_path, $phpEx;
-
- if (!preg_match('#^(http|https|ftp)://#i', $data['remotelink']))
- {
- $data['remotelink'] = 'http://' . $data['remotelink'];
- }
- if (!preg_match('#^(http|https|ftp)://(?:(.*?\.)*?[a-z0-9\-]+?\.[a-z]{2,4}|(?:\d{1,3}\.){3,5}\d{1,3}):?([0-9]*?).*?\.(gif|jpg|jpeg|png)$#i', $data['remotelink']))
- {
- $error[] = $user->lang['AVATAR_URL_INVALID'];
- return false;
- }
-
- // Make sure getimagesize works...
- if (($image_data = @getimagesize($data['remotelink'])) === false && (empty($data['width']) || empty($data['height'])))
- {
- $error[] = $user->lang['UNABLE_GET_IMAGE_SIZE'];
- return false;
- }
-
- if (!empty($image_data) && ($image_data[0] < 2 || $image_data[1] < 2))
- {
- $error[] = $user->lang['AVATAR_NO_SIZE'];
- return false;
- }
-
- $width = ($data['width'] && $data['height']) ? $data['width'] : $image_data[0];
- $height = ($data['width'] && $data['height']) ? $data['height'] : $image_data[1];
-
- if ($width < 2 || $height < 2)
- {
- $error[] = $user->lang['AVATAR_NO_SIZE'];
- return false;
- }
-
- // Check image type
- include_once($phpbb_root_path . 'includes/functions_upload.' . $phpEx);
- $types = fileupload::image_types();
- $extension = strtolower(filespec::get_extension($data['remotelink']));
-
- if (!empty($image_data) && (!isset($types[$image_data[2]]) || !in_array($extension, $types[$image_data[2]])))
- {
- if (!isset($types[$image_data[2]]))
- {
- $error[] = $user->lang['UNABLE_GET_IMAGE_SIZE'];
- }
- else
- {
- $error[] = sprintf($user->lang['IMAGE_FILETYPE_MISMATCH'], $types[$image_data[2]][0], $extension);
- }
- return false;
- }
-
- if ($config['avatar_max_width'] || $config['avatar_max_height'])
- {
- if ($width > $config['avatar_max_width'] || $height > $config['avatar_max_height'])
- {
- $error[] = sprintf($user->lang['AVATAR_WRONG_SIZE'], $config['avatar_min_width'], $config['avatar_min_height'], $config['avatar_max_width'], $config['avatar_max_height'], $width, $height);
- return false;
- }
- }
-
- if ($config['avatar_min_width'] || $config['avatar_min_height'])
- {
- if ($width < $config['avatar_min_width'] || $height < $config['avatar_min_height'])
- {
- $error[] = sprintf($user->lang['AVATAR_WRONG_SIZE'], $config['avatar_min_width'], $config['avatar_min_height'], $config['avatar_max_width'], $config['avatar_max_height'], $width, $height);
- return false;
- }
- }
-
- return array(AVATAR_REMOTE, $data['remotelink'], $width, $height);
-}
-
-/**
-* Avatar upload using the upload class
-*/
-function avatar_upload($data, &$error)
-{
- global $phpbb_root_path, $config, $db, $user, $phpEx;
-
- // Init upload class
- include_once($phpbb_root_path . 'includes/functions_upload.' . $phpEx);
- $upload = new fileupload('AVATAR_', array('jpg', 'jpeg', 'gif', 'png'), $config['avatar_filesize'], $config['avatar_min_width'], $config['avatar_min_height'], $config['avatar_max_width'], $config['avatar_max_height'], (isset($config['mime_triggers']) ? explode('|', $config['mime_triggers']) : false));
-
- if (!empty($_FILES['uploadfile']['name']))
- {
- $file = $upload->form_upload('uploadfile');
- }
- else
- {
- $file = $upload->remote_upload($data['uploadurl']);
- }
-
- $prefix = $config['avatar_salt'] . '_';
- $file->clean_filename('avatar', $prefix, $data['user_id']);
-
- $destination = $config['avatar_path'];
-
- // Adjust destination path (no trailing slash)
- if (substr($destination, -1, 1) == '/' || substr($destination, -1, 1) == '\\')
- {
- $destination = substr($destination, 0, -1);
- }
-
- $destination = str_replace(array('../', '..\\', './', '.\\'), '', $destination);
- if ($destination && ($destination[0] == '/' || $destination[0] == "\\"))
- {
- $destination = '';
- }
-
- // Move file and overwrite any existing image
- $file->move_file($destination, true);
-
- if (sizeof($file->error))
- {
- $file->remove();
- $error = array_merge($error, $file->error);
- }
-
- return array(AVATAR_UPLOAD, $data['user_id'] . '_' . time() . '.' . $file->get('extension'), $file->get('width'), $file->get('height'));
-}
-
-/**
* Generates avatar filename from the database entry
*/
function get_avatar_filename($avatar_entry)
@@ -2124,358 +2093,111 @@ function get_avatar_filename($avatar_entry)
}
/**
-* Avatar Gallery
+* Returns an explanation string with maximum avatar settings
+*
+* @return string
*/
-function avatar_gallery($category, $avatar_select, $items_per_column, $block_var = 'avatar_row')
+function phpbb_avatar_explanation_string()
{
- global $user, $cache, $template;
- global $config, $phpbb_root_path;
-
- $avatar_list = array();
+ global $config, $user;
- $path = $phpbb_root_path . $config['avatar_gallery_path'];
-
- if (!file_exists($path) || !is_dir($path))
- {
- $avatar_list = array($user->lang['NO_AVATAR_CATEGORY'] => array());
- }
- else
- {
- // Collect images
- $dp = @opendir($path);
-
- if (!$dp)
- {
- return array($user->lang['NO_AVATAR_CATEGORY'] => array());
- }
-
- while (($file = readdir($dp)) !== false)
- {
- if ($file[0] != '.' && preg_match('#^[^&"\'<>]+$#i', $file) && is_dir("$path/$file"))
- {
- $avatar_row_count = $avatar_col_count = 0;
-
- if ($dp2 = @opendir("$path/$file"))
- {
- while (($sub_file = readdir($dp2)) !== false)
- {
- if (preg_match('#^[^&\'"<>]+\.(?:gif|png|jpe?g)$#i', $sub_file))
- {
- $avatar_list[$file][$avatar_row_count][$avatar_col_count] = array(
- 'file' => rawurlencode($file) . '/' . rawurlencode($sub_file),
- 'filename' => rawurlencode($sub_file),
- 'name' => ucfirst(str_replace('_', ' ', preg_replace('#^(.*)\..*$#', '\1', $sub_file))),
- );
- $avatar_col_count++;
- if ($avatar_col_count == $items_per_column)
- {
- $avatar_row_count++;
- $avatar_col_count = 0;
- }
- }
- }
- closedir($dp2);
- }
- }
- }
- closedir($dp);
- }
-
- if (!sizeof($avatar_list))
- {
- $avatar_list = array($user->lang['NO_AVATAR_CATEGORY'] => array());
- }
-
- @ksort($avatar_list);
-
- $category = (!$category) ? key($avatar_list) : $category;
- $avatar_categories = array_keys($avatar_list);
-
- $s_category_options = '';
- foreach ($avatar_categories as $cat)
- {
- $s_category_options .= '<option value="' . $cat . '"' . (($cat == $category) ? ' selected="selected"' : '') . '>' . $cat . '</option>';
- }
-
- $template->assign_vars(array(
- 'S_AVATARS_ENABLED' => true,
- 'S_IN_AVATAR_GALLERY' => true,
- 'S_CAT_OPTIONS' => $s_category_options)
- );
-
- $avatar_list = (isset($avatar_list[$category])) ? $avatar_list[$category] : array();
-
- foreach ($avatar_list as $avatar_row_ary)
- {
- $template->assign_block_vars($block_var, array());
-
- foreach ($avatar_row_ary as $avatar_col_ary)
- {
- $template->assign_block_vars($block_var . '.avatar_column', array(
- 'AVATAR_IMAGE' => $phpbb_root_path . $config['avatar_gallery_path'] . '/' . $avatar_col_ary['file'],
- 'AVATAR_NAME' => $avatar_col_ary['name'],
- 'AVATAR_FILE' => $avatar_col_ary['filename'])
- );
-
- $template->assign_block_vars($block_var . '.avatar_option_column', array(
- 'AVATAR_IMAGE' => $phpbb_root_path . $config['avatar_gallery_path'] . '/' . $avatar_col_ary['file'],
- 'S_OPTIONS_AVATAR' => $avatar_col_ary['filename'])
- );
- }
- }
-
- return $avatar_list;
+ return $user->lang('AVATAR_EXPLAIN',
+ $user->lang('PIXELS', (int) $config['avatar_max_width']),
+ $user->lang('PIXELS', (int) $config['avatar_max_height']),
+ round($config['avatar_filesize'] / 1024));
}
+//
+// Usergroup functions
+//
/**
-* Tries to (re-)establish avatar dimensions
-*/
-function avatar_get_dimensions($avatar, $avatar_type, &$error, $current_x = 0, $current_y = 0)
-{
- global $config, $phpbb_root_path, $user;
-
- switch ($avatar_type)
- {
- case AVATAR_REMOTE :
- break;
-
- case AVATAR_UPLOAD :
- $avatar = $phpbb_root_path . $config['avatar_path'] . '/' . get_avatar_filename($avatar);
- break;
-
- case AVATAR_GALLERY :
- $avatar = $phpbb_root_path . $config['avatar_gallery_path'] . '/' . $avatar ;
- break;
- }
-
- // Make sure getimagesize works...
- if (($image_data = @getimagesize($avatar)) === false)
- {
- $error[] = $user->lang['UNABLE_GET_IMAGE_SIZE'];
- return false;
- }
-
- if ($image_data[0] < 2 || $image_data[1] < 2)
- {
- $error[] = $user->lang['AVATAR_NO_SIZE'];
- return false;
- }
-
- // try to maintain ratio
- if (!(empty($current_x) && empty($current_y)))
- {
- if ($current_x != 0)
- {
- $image_data[1] = (int) floor(($current_x / $image_data[0]) * $image_data[1]);
- $image_data[1] = min($config['avatar_max_height'], $image_data[1]);
- $image_data[1] = max($config['avatar_min_height'], $image_data[1]);
- }
- if ($current_y != 0)
- {
- $image_data[0] = (int) floor(($current_y / $image_data[1]) * $image_data[0]);
- $image_data[0] = min($config['avatar_max_width'], $image_data[1]);
- $image_data[0] = max($config['avatar_min_width'], $image_data[1]);
- }
- }
- return array($image_data[0], $image_data[1]);
-}
-
-/**
-* Uploading/Changing user avatar
+* Add or edit a group. If we're editing a group we only update user
+* parameters such as rank, etc. if they are changed
*/
-function avatar_process_user(&$error, $custom_userdata = false, $can_upload = null)
+function group_create(&$group_id, $type, $name, $desc, $group_attributes, $allow_desc_bbcode = false, $allow_desc_urls = false, $allow_desc_smilies = false)
{
- global $config, $phpbb_root_path, $auth, $user, $db;
-
- $data = array(
- 'uploadurl' => request_var('uploadurl', ''),
- 'remotelink' => request_var('remotelink', ''),
- 'width' => request_var('width', 0),
- 'height' => request_var('height', 0),
- );
+ global $phpbb_root_path, $config, $db, $user, $file_upload, $phpbb_container;
- $error = validate_data($data, array(
- 'uploadurl' => array('string', true, 5, 255),
- 'remotelink' => array('string', true, 5, 255),
- 'width' => array('string', true, 1, 3),
- 'height' => array('string', true, 1, 3),
- ));
-
- if (sizeof($error))
- {
- return false;
- }
+ $error = array();
- $sql_ary = array();
+ // Attributes which also affect the users table
+ $user_attribute_ary = array('group_colour', 'group_rank', 'group_avatar', 'group_avatar_type', 'group_avatar_width', 'group_avatar_height');
- if ($custom_userdata === false)
- {
- $userdata = &$user->data;
- }
- else
+ // Check data. Limit group name length.
+ if (!utf8_strlen($name) || utf8_strlen($name) > 60)
{
- $userdata = &$custom_userdata;
+ $error[] = (!utf8_strlen($name)) ? $user->lang['GROUP_ERR_USERNAME'] : $user->lang['GROUP_ERR_USER_LONG'];
}
- $data['user_id'] = $userdata['user_id'];
- $change_avatar = ($custom_userdata === false) ? $auth->acl_get('u_chgavatar') : true;
- $avatar_select = basename(request_var('avatar_select', ''));
-
- // Can we upload?
- if (is_null($can_upload))
+ $err = group_validate_groupname($group_id, $name);
+ if (!empty($err))
{
- $can_upload = ($config['allow_avatar_upload'] && file_exists($phpbb_root_path . $config['avatar_path']) && phpbb_is_writable($phpbb_root_path . $config['avatar_path']) && $change_avatar && (@ini_get('file_uploads') || strtolower(@ini_get('file_uploads')) == 'on')) ? true : false;
+ $error[] = $user->lang[$err];
}
- if ((!empty($_FILES['uploadfile']['name']) || $data['uploadurl']) && $can_upload)
- {
- list($sql_ary['user_avatar_type'], $sql_ary['user_avatar'], $sql_ary['user_avatar_width'], $sql_ary['user_avatar_height']) = avatar_upload($data, $error);
- }
- else if ($data['remotelink'] && $change_avatar && $config['allow_avatar_remote'])
+ if (!in_array($type, array(GROUP_OPEN, GROUP_CLOSED, GROUP_HIDDEN, GROUP_SPECIAL, GROUP_FREE)))
{
- list($sql_ary['user_avatar_type'], $sql_ary['user_avatar'], $sql_ary['user_avatar_width'], $sql_ary['user_avatar_height']) = avatar_remote($data, $error);
+ $error[] = $user->lang['GROUP_ERR_TYPE'];
}
- else if ($avatar_select && $change_avatar && $config['allow_avatar_local'])
- {
- $category = basename(request_var('category', ''));
- $sql_ary['user_avatar_type'] = AVATAR_GALLERY;
- $sql_ary['user_avatar'] = $avatar_select;
+ $group_teampage = !empty($group_attributes['group_teampage']);
+ unset($group_attributes['group_teampage']);
- // check avatar gallery
- if (!is_dir($phpbb_root_path . $config['avatar_gallery_path'] . '/' . $category))
- {
- $sql_ary['user_avatar'] = '';
- $sql_ary['user_avatar_type'] = $sql_ary['user_avatar_width'] = $sql_ary['user_avatar_height'] = 0;
- }
- else
- {
- list($sql_ary['user_avatar_width'], $sql_ary['user_avatar_height']) = getimagesize($phpbb_root_path . $config['avatar_gallery_path'] . '/' . $category . '/' . urldecode($sql_ary['user_avatar']));
- $sql_ary['user_avatar'] = $category . '/' . $sql_ary['user_avatar'];
- }
- }
- else if (isset($_POST['delete']) && $change_avatar)
- {
- $sql_ary['user_avatar'] = '';
- $sql_ary['user_avatar_type'] = $sql_ary['user_avatar_width'] = $sql_ary['user_avatar_height'] = 0;
- }
- else if (!empty($userdata['user_avatar']))
+ if (!sizeof($error))
{
- // Only update the dimensions
+ $current_legend = \phpbb\groupposition\legend::GROUP_DISABLED;
+ $current_teampage = \phpbb\groupposition\teampage::GROUP_DISABLED;
- if (empty($data['width']) || empty($data['height']))
+ $legend = $phpbb_container->get('groupposition.legend');
+ $teampage = $phpbb_container->get('groupposition.teampage');
+ if ($group_id)
{
- if ($dims = avatar_get_dimensions($userdata['user_avatar'], $userdata['user_avatar_type'], $error, $data['width'], $data['height']))
+ try
{
- list($guessed_x, $guessed_y) = $dims;
- if (empty($data['width']))
- {
- $data['width'] = $guessed_x;
- }
- if (empty($data['height']))
- {
- $data['height'] = $guessed_y;
- }
+ $current_legend = $legend->get_group_value($group_id);
+ $current_teampage = $teampage->get_group_value($group_id);
}
- }
- if (($config['avatar_max_width'] || $config['avatar_max_height']) &&
- (($data['width'] != $userdata['user_avatar_width']) || $data['height'] != $userdata['user_avatar_height']))
- {
- if ($data['width'] > $config['avatar_max_width'] || $data['height'] > $config['avatar_max_height'])
+ catch (\phpbb\groupposition\exception $exception)
{
- $error[] = sprintf($user->lang['AVATAR_WRONG_SIZE'], $config['avatar_min_width'], $config['avatar_min_height'], $config['avatar_max_width'], $config['avatar_max_height'], $data['width'], $data['height']);
+ trigger_error($user->lang($exception->getMessage()));
}
}
- if (!sizeof($error))
+ if (!empty($group_attributes['group_legend']))
{
- if ($config['avatar_min_width'] || $config['avatar_min_height'])
+ if (($group_id && ($current_legend == \phpbb\groupposition\legend::GROUP_DISABLED)) || !$group_id)
{
- if ($data['width'] < $config['avatar_min_width'] || $data['height'] < $config['avatar_min_height'])
- {
- $error[] = sprintf($user->lang['AVATAR_WRONG_SIZE'], $config['avatar_min_width'], $config['avatar_min_height'], $config['avatar_max_width'], $config['avatar_max_height'], $data['width'], $data['height']);
- }
+ // Old group currently not in the legend or new group, add at the end.
+ $group_attributes['group_legend'] = 1 + $legend->get_group_count();
+ }
+ else
+ {
+ // Group stayes in the legend
+ $group_attributes['group_legend'] = $current_legend;
}
}
-
- if (!sizeof($error))
- {
- $sql_ary['user_avatar_width'] = $data['width'];
- $sql_ary['user_avatar_height'] = $data['height'];
- }
- }
-
- if (!sizeof($error))
- {
- // Do we actually have any data to update?
- if (sizeof($sql_ary))
+ else if ($group_id && ($current_legend != \phpbb\groupposition\legend::GROUP_DISABLED))
{
- $ext_new = $ext_old = '';
- if (isset($sql_ary['user_avatar']))
+ // Group is removed from the legend
+ try
{
- $userdata = ($custom_userdata === false) ? $user->data : $custom_userdata;
- $ext_new = (empty($sql_ary['user_avatar'])) ? '' : substr(strrchr($sql_ary['user_avatar'], '.'), 1);
- $ext_old = (empty($userdata['user_avatar'])) ? '' : substr(strrchr($userdata['user_avatar'], '.'), 1);
-
- if ($userdata['user_avatar_type'] == AVATAR_UPLOAD)
- {
- // Delete old avatar if present
- if ((!empty($userdata['user_avatar']) && empty($sql_ary['user_avatar']))
- || ( !empty($userdata['user_avatar']) && !empty($sql_ary['user_avatar']) && $ext_new !== $ext_old))
- {
- avatar_delete('user', $userdata);
- }
- }
+ $legend->delete_group($group_id, true);
}
-
- $sql = 'UPDATE ' . USERS_TABLE . '
- SET ' . $db->sql_build_array('UPDATE', $sql_ary) . '
- WHERE user_id = ' . (($custom_userdata === false) ? $user->data['user_id'] : $custom_userdata['user_id']);
- $db->sql_query($sql);
-
+ catch (\phpbb\groupposition\exception $exception)
+ {
+ trigger_error($user->lang($exception->getMessage()));
+ }
+ $group_attributes['group_legend'] = \phpbb\groupposition\legend::GROUP_DISABLED;
+ }
+ else
+ {
+ $group_attributes['group_legend'] = \phpbb\groupposition\legend::GROUP_DISABLED;
}
- }
-
- return (sizeof($error)) ? false : true;
-}
-
-//
-// Usergroup functions
-//
-
-/**
-* Add or edit a group. If we're editing a group we only update user
-* parameters such as rank, etc. if they are changed
-*/
-function group_create(&$group_id, $type, $name, $desc, $group_attributes, $allow_desc_bbcode = false, $allow_desc_urls = false, $allow_desc_smilies = false)
-{
- global $phpbb_root_path, $config, $db, $user, $file_upload;
-
- $error = array();
-
- // Attributes which also affect the users table
- $user_attribute_ary = array('group_colour', 'group_rank', 'group_avatar', 'group_avatar_type', 'group_avatar_width', 'group_avatar_height');
-
- // Check data. Limit group name length.
- if (!utf8_strlen($name) || utf8_strlen($name) > 60)
- {
- $error[] = (!utf8_strlen($name)) ? $user->lang['GROUP_ERR_USERNAME'] : $user->lang['GROUP_ERR_USER_LONG'];
- }
-
- $err = group_validate_groupname($group_id, $name);
- if (!empty($err))
- {
- $error[] = $user->lang[$err];
- }
- if (!in_array($type, array(GROUP_OPEN, GROUP_CLOSED, GROUP_HIDDEN, GROUP_SPECIAL, GROUP_FREE)))
- {
- $error[] = $user->lang['GROUP_ERR_TYPE'];
- }
+ // Unset the objects, we don't need them anymore.
+ unset($legend);
- if (!sizeof($error))
- {
$user_ary = array();
$sql_ary = array(
'group_name' => (string) $name,
@@ -2515,12 +2237,12 @@ function group_create(&$group_id, $type, $name, $desc, $group_attributes, $allow
}
$db->sql_freeresult($result);
- if (isset($sql_ary['group_avatar']) && !$sql_ary['group_avatar'])
+ if (isset($sql_ary['group_avatar']))
{
remove_default_avatar($group_id, $user_ary);
}
- if (isset($sql_ary['group_rank']) && !$sql_ary['group_rank'])
+ if (isset($sql_ary['group_rank']))
{
remove_default_rank($group_id, $user_ary);
}
@@ -2568,16 +2290,55 @@ function group_create(&$group_id, $type, $name, $desc, $group_attributes, $allow
$db->sql_query($sql);
}
+ // Remove the group from the teampage, only if unselected and we are editing a group,
+ // which is currently displayed.
+ if (!$group_teampage && $group_id && $current_teampage != \phpbb\groupposition\teampage::GROUP_DISABLED)
+ {
+ try
+ {
+ $teampage->delete_group($group_id);
+ }
+ catch (\phpbb\groupposition\exception $exception)
+ {
+ trigger_error($user->lang($exception->getMessage()));
+ }
+ }
+
if (!$group_id)
{
$group_id = $db->sql_nextid();
- if (isset($sql_ary['group_avatar_type']) && $sql_ary['group_avatar_type'] == AVATAR_UPLOAD)
+ if (isset($sql_ary['group_avatar_type']) && $sql_ary['group_avatar_type'] == 'avatar.driver.upload')
{
group_correct_avatar($group_id, $sql_ary['group_avatar']);
}
}
+ try
+ {
+ if ($group_teampage && $current_teampage == \phpbb\groupposition\teampage::GROUP_DISABLED)
+ {
+ $teampage->add_group($group_id);
+ }
+
+ if ($group_teampage)
+ {
+ if ($current_teampage == \phpbb\groupposition\teampage::GROUP_DISABLED)
+ {
+ $teampage->add_group($group_id);
+ }
+ }
+ else if ($group_id && ($current_teampage != \phpbb\groupposition\teampage::GROUP_DISABLED))
+ {
+ $teampage->delete_group($group_id);
+ }
+ }
+ catch (\phpbb\groupposition\exception $exception)
+ {
+ trigger_error($user->lang($exception->getMessage()));
+ }
+ unset($teampage);
+
// Set user attributes
$sql_ary = array();
if (sizeof($group_attributes))
@@ -2648,7 +2409,7 @@ function avatar_remove_db($avatar_name)
$sql = 'UPDATE ' . USERS_TABLE . "
SET user_avatar = '',
- user_avatar_type = 0
+ user_avatar_type = ''
WHERE user_avatar = '" . $db->sql_escape($avatar_name) . '\'';
$db->sql_query($sql);
}
@@ -2659,7 +2420,7 @@ function avatar_remove_db($avatar_name)
*/
function group_delete($group_id, $group_name = false)
{
- global $db, $phpbb_root_path, $phpEx;
+ global $db, $cache, $auth, $user, $phpbb_root_path, $phpEx, $phpbb_dispatcher, $phpbb_container;
if (!$group_name)
{
@@ -2700,6 +2461,33 @@ function group_delete($group_id, $group_name = false)
}
while ($start);
+ // Delete group from legend and teampage
+ try
+ {
+ $legend = $phpbb_container->get('groupposition.legend');
+ $legend->delete_group($group_id);
+ unset($legend);
+ }
+ catch (\phpbb\groupposition\exception $exception)
+ {
+ // The group we want to delete does not exist.
+ // No reason to worry, we just continue the deleting process.
+ //trigger_error($user->lang($exception->getMessage()));
+ }
+
+ try
+ {
+ $teampage = $phpbb_container->get('groupposition.teampage');
+ $teampage->delete_group($group_id);
+ unset($teampage);
+ }
+ catch (\phpbb\groupposition\exception $exception)
+ {
+ // The group we want to delete does not exist.
+ // No reason to worry, we just continue the deleting process.
+ //trigger_error($user->lang($exception->getMessage()));
+ }
+
// Delete group
$sql = 'DELETE FROM ' . GROUPS_TABLE . "
WHERE group_id = $group_id";
@@ -2710,13 +2498,24 @@ function group_delete($group_id, $group_name = false)
WHERE group_id = $group_id";
$db->sql_query($sql);
+ /**
+ * Event after a group is deleted
+ *
+ * @event core.delete_group_after
+ * @var int group_id ID of the deleted group
+ * @var string group_name Name of the deleted group
+ * @since 3.1-A1
+ */
+ $vars = array('group_id', 'group_name');
+ extract($phpbb_dispatcher->trigger_event('core.delete_group_after', compact($vars)));
+
// Re-cache moderators
- if (!function_exists('cache_moderators'))
+ if (!function_exists('phpbb_cache_moderators'))
{
include($phpbb_root_path . 'includes/functions_admin.' . $phpEx);
}
- cache_moderators();
+ phpbb_cache_moderators($db, $cache, $auth);
add_log('admin', 'LOG_GROUP_DELETE', $group_name);
@@ -2731,7 +2530,7 @@ function group_delete($group_id, $group_name = false)
*/
function group_user_add($group_id, $user_id_ary = false, $username_ary = false, $group_name = false, $default = false, $leader = 0, $pending = 0, $group_attributes = false)
{
- global $db, $auth;
+ global $db, $auth, $phpbb_container;
// We need both username and user_id info
$result = user_get_id_name($user_id_ary, $username_ary);
@@ -2819,6 +2618,20 @@ function group_user_add($group_id, $user_id_ary = false, $username_ary = false,
group_update_listings($group_id);
+ if ($pending)
+ {
+ $phpbb_notifications = $phpbb_container->get('notification_manager');
+
+ foreach ($add_id_ary as $user_id)
+ {
+ $phpbb_notifications->add_notifications('group_request', array(
+ 'group_id' => $group_id,
+ 'user_id' => $user_id,
+ 'group_name' => $group_name,
+ ));
+ }
+ }
+
// Return false - no error
return false;
}
@@ -2832,7 +2645,7 @@ function group_user_add($group_id, $user_id_ary = false, $username_ary = false,
*/
function group_user_del($group_id, $user_id_ary = false, $username_ary = false, $group_name = false)
{
- global $db, $auth, $config;
+ global $db, $auth, $config, $phpbb_dispatcher, $phpbb_container;
if ($config['coppa_enable'])
{
@@ -2931,6 +2744,19 @@ function group_user_del($group_id, $user_id_ary = false, $username_ary = false,
}
unset($special_group_data);
+ /**
+ * Event before users are removed from a group
+ *
+ * @event core.group_delete_user_before
+ * @var int group_id ID of the group from which users are deleted
+ * @var string group_name Name of the group
+ * @var array user_id_ary IDs of the users which are removed
+ * @var array username_ary names of the users which are removed
+ * @since 3.1-A1
+ */
+ $vars = array('group_id', 'group_name', 'user_id_ary', 'username_ary');
+ extract($phpbb_dispatcher->trigger_event('core.group_delete_user_before', compact($vars)));
+
$sql = 'DELETE FROM ' . USER_GROUP_TABLE . "
WHERE group_id = $group_id
AND " . $db->sql_in_set('user_id', $user_id_ary);
@@ -2953,6 +2779,10 @@ function group_user_del($group_id, $user_id_ary = false, $username_ary = false,
group_update_listings($group_id);
+ $phpbb_notifications = $phpbb_container->get('notification_manager');
+
+ $phpbb_notifications->delete_notifications('group_request', $user_id_ary, $group_id);
+
// Return false - no error
return false;
}
@@ -2989,12 +2819,12 @@ function remove_default_avatar($group_id, $user_ids)
$sql = 'UPDATE ' . USERS_TABLE . "
SET user_avatar = '',
- user_avatar_type = 0,
+ user_avatar_type = '',
user_avatar_width = 0,
user_avatar_height = 0
WHERE group_id = " . (int) $group_id . "
- AND user_avatar = '" . $db->sql_escape($row['group_avatar']) . "'
- AND " . $db->sql_in_set('user_id', $user_ids);
+ AND user_avatar = '" . $db->sql_escape($row['group_avatar']) . "'
+ AND " . $db->sql_in_set('user_id', $user_ids);
$db->sql_query($sql);
}
@@ -3031,9 +2861,9 @@ function remove_default_rank($group_id, $user_ids)
$sql = 'UPDATE ' . USERS_TABLE . '
SET user_rank = 0
WHERE group_id = ' . (int)$group_id . '
- AND user_rank <> 0
- AND user_rank = ' . (int)$row['group_rank'] . '
- AND ' . $db->sql_in_set('user_id', $user_ids);
+ AND user_rank <> 0
+ AND user_rank = ' . (int)$row['group_rank'] . '
+ AND ' . $db->sql_in_set('user_id', $user_ids);
$db->sql_query($sql);
}
@@ -3042,7 +2872,7 @@ function remove_default_rank($group_id, $user_ids)
*/
function group_user_attributes($action, $group_id, $user_id_ary = false, $username_ary = false, $group_name = false, $group_attributes = false)
{
- global $db, $auth, $phpbb_root_path, $phpEx, $config;
+ global $db, $auth, $phpbb_root_path, $phpEx, $config, $phpbb_container;
// We need both username and user_id info
$result = user_get_id_name($user_id_ary, $username_ary);
@@ -3062,7 +2892,8 @@ function group_user_attributes($action, $group_id, $user_id_ary = false, $userna
case 'demote':
case 'promote':
- $sql = 'SELECT user_id FROM ' . USER_GROUP_TABLE . "
+ $sql = 'SELECT user_id
+ FROM ' . USER_GROUP_TABLE . "
WHERE group_id = $group_id
AND user_pending = 1
AND " . $db->sql_in_set('user_id', $user_id_ary);
@@ -3094,11 +2925,10 @@ function group_user_attributes($action, $group_id, $user_id_ary = false, $userna
AND ' . $db->sql_in_set('ug.user_id', $user_id_ary);
$result = $db->sql_query($sql);
- $user_id_ary = $email_users = array();
+ $user_id_ary = array();
while ($row = $db->sql_fetchrow($result))
{
$user_id_ary[] = $row['user_id'];
- $email_users[] = $row;
}
$db->sql_freeresult($result);
@@ -3113,27 +2943,14 @@ function group_user_attributes($action, $group_id, $user_id_ary = false, $userna
AND " . $db->sql_in_set('user_id', $user_id_ary);
$db->sql_query($sql);
- // Send approved email to users...
- include_once($phpbb_root_path . 'includes/functions_messenger.' . $phpEx);
- $messenger = new messenger();
-
- foreach ($email_users as $row)
- {
- $messenger->template('group_approved', $row['user_lang']);
-
- $messenger->to($row['user_email'], $row['username']);
- $messenger->im($row['user_jabber'], $row['username']);
+ $phpbb_notifications = $phpbb_container->get('notification_manager');
- $messenger->assign_vars(array(
- 'USERNAME' => htmlspecialchars_decode($row['username']),
- 'GROUP_NAME' => htmlspecialchars_decode($group_name),
- 'U_GROUP' => generate_board_url() . "/ucp.$phpEx?i=groups&mode=membership")
- );
-
- $messenger->send($row['user_notify_type']);
- }
-
- $messenger->save_queue();
+ $phpbb_notifications->add_notifications('group_request_approved', array(
+ 'user_ids' => $user_id_ary,
+ 'group_id' => $group_id,
+ 'group_name' => $group_name,
+ ));
+ $phpbb_notifications->delete_notifications('group_request', $user_id_ary, $group_id);
$log = 'LOG_USERS_APPROVED';
break;
@@ -3160,7 +2977,8 @@ function group_user_attributes($action, $group_id, $user_id_ary = false, $userna
return 'NO_USERS';
}
- $sql = 'SELECT user_id, group_id FROM ' . USERS_TABLE . '
+ $sql = 'SELECT user_id, group_id
+ FROM ' . USERS_TABLE . '
WHERE ' . $db->sql_in_set('user_id', $user_id_ary, false, true);
$result = $db->sql_query($sql);
@@ -3248,7 +3066,7 @@ function group_validate_groupname($group_id, $group_name)
*/
function group_set_user_default($group_id, $user_id_ary, $group_attributes = false, $update_listing = false)
{
- global $cache, $db;
+ global $phpbb_container, $db, $phpbb_dispatcher;
if (empty($user_id_ary))
{
@@ -3259,7 +3077,7 @@ function group_set_user_default($group_id, $user_id_ary, $group_attributes = fal
'group_colour' => 'string',
'group_rank' => 'int',
'group_avatar' => 'string',
- 'group_avatar_type' => 'int',
+ 'group_avatar_type' => 'string',
'group_avatar_width' => 'int',
'group_avatar_height' => 'int',
);
@@ -3294,45 +3112,69 @@ function group_set_user_default($group_id, $user_id_ary, $group_attributes = fal
}
}
- // Before we update the user attributes, we will make a list of those having now the group avatar assigned
- if (isset($sql_ary['user_avatar']))
+ $updated_sql_ary = $sql_ary;
+
+ // Before we update the user attributes, we will update the rank for users that don't have a custom rank
+ if (isset($sql_ary['user_rank']))
{
- // Ok, get the original avatar data from users having an uploaded one (we need to remove these from the filesystem)
- $sql = 'SELECT user_id, group_id, user_avatar
- FROM ' . USERS_TABLE . '
- WHERE ' . $db->sql_in_set('user_id', $user_id_ary) . '
- AND user_avatar_type = ' . AVATAR_UPLOAD;
- $result = $db->sql_query($sql);
+ $sql = 'UPDATE ' . USERS_TABLE . '
+ SET ' . $db->sql_build_array('UPDATE', array('user_rank' => $sql_ary['user_rank'])) . '
+ WHERE user_rank = 0
+ AND ' . $db->sql_in_set('user_id', $user_id_ary);
+ $db->sql_query($sql);
+ unset($sql_ary['user_rank']);
+ }
- while ($row = $db->sql_fetchrow($result))
+ // Before we update the user attributes, we will update the avatar for users that don't have a custom avatar
+ $avatar_options = array('user_avatar', 'user_avatar_type', 'user_avatar_height', 'user_avatar_width');
+
+ if (isset($sql_ary['user_avatar']))
+ {
+ $avatar_sql_ary = array();
+ foreach ($avatar_options as $avatar_option)
{
- avatar_delete('user', $row);
- }
- $db->sql_freeresult($result);
+ if (isset($sql_ary[$avatar_option]))
+ {
+ $avatar_sql_ary[$avatar_option] = $sql_ary[$avatar_option];
+ }
+ }
+
+ $sql = 'UPDATE ' . USERS_TABLE . '
+ SET ' . $db->sql_build_array('UPDATE', $avatar_sql_ary) . "
+ WHERE user_avatar = ''
+ AND " . $db->sql_in_set('user_id', $user_id_ary);
+ $db->sql_query($sql);
}
- else
+
+ // Remove the avatar options, as we already updated them
+ foreach ($avatar_options as $avatar_option)
{
- unset($sql_ary['user_avatar_type']);
- unset($sql_ary['user_avatar_height']);
- unset($sql_ary['user_avatar_width']);
+ unset($sql_ary[$avatar_option]);
}
- $sql = 'UPDATE ' . USERS_TABLE . ' SET ' . $db->sql_build_array('UPDATE', $sql_ary) . '
- WHERE ' . $db->sql_in_set('user_id', $user_id_ary);
- $db->sql_query($sql);
+ if (!empty($sql_ary))
+ {
+ $sql = 'UPDATE ' . USERS_TABLE . '
+ SET ' . $db->sql_build_array('UPDATE', $sql_ary) . '
+ WHERE ' . $db->sql_in_set('user_id', $user_id_ary);
+ $db->sql_query($sql);
+ }
if (isset($sql_ary['user_colour']))
{
// Update any cached colour information for these users
- $sql = 'UPDATE ' . FORUMS_TABLE . " SET forum_last_poster_colour = '" . $db->sql_escape($sql_ary['user_colour']) . "'
+ $sql = 'UPDATE ' . FORUMS_TABLE . "
+ SET forum_last_poster_colour = '" . $db->sql_escape($sql_ary['user_colour']) . "'
WHERE " . $db->sql_in_set('forum_last_poster_id', $user_id_ary);
$db->sql_query($sql);
- $sql = 'UPDATE ' . TOPICS_TABLE . " SET topic_first_poster_colour = '" . $db->sql_escape($sql_ary['user_colour']) . "'
+ $sql = 'UPDATE ' . TOPICS_TABLE . "
+ SET topic_first_poster_colour = '" . $db->sql_escape($sql_ary['user_colour']) . "'
WHERE " . $db->sql_in_set('topic_poster', $user_id_ary);
$db->sql_query($sql);
- $sql = 'UPDATE ' . TOPICS_TABLE . " SET topic_last_poster_colour = '" . $db->sql_escape($sql_ary['user_colour']) . "'
+ $sql = 'UPDATE ' . TOPICS_TABLE . "
+ SET topic_last_poster_colour = '" . $db->sql_escape($sql_ary['user_colour']) . "'
WHERE " . $db->sql_in_set('topic_last_poster_id', $user_id_ary);
$db->sql_query($sql);
@@ -3344,13 +3186,30 @@ function group_set_user_default($group_id, $user_id_ary, $group_attributes = fal
}
}
+ // Make all values available for the event
+ $sql_ary = $updated_sql_ary;
+
+ /**
+ * Event when the default group is set for an array of users
+ *
+ * @event core.user_set_default_group
+ * @var int group_id ID of the group
+ * @var array user_id_ary IDs of the users
+ * @var array group_attributes Group attributes which were changed
+ * @var array update_listing Update the list of moderators and foes
+ * @var array sql_ary User attributes which were changed
+ * @since 3.1-A1
+ */
+ $vars = array('group_id', 'user_id_ary', 'group_attributes', 'update_listing', 'sql_ary');
+ extract($phpbb_dispatcher->trigger_event('core.user_set_default_group', compact($vars)));
+
if ($update_listing)
{
group_update_listings($group_id);
}
// Because some tables/caches use usercolour-specific data we need to purge this here.
- $cache->destroy('sql', MODERATOR_CACHE_TABLE);
+ $phpbb_container->get('cache.driver')->destroy('sql', MODERATOR_CACHE_TABLE);
}
/**
@@ -3449,7 +3308,7 @@ function group_memberships($group_id_ary = false, $user_id_ary = false, $return_
*/
function group_update_listings($group_id)
{
- global $auth;
+ global $db, $cache, $auth;
$hold_ary = $auth->acl_group_raw_data($group_id, array('a_', 'm_'));
@@ -3491,22 +3350,22 @@ function group_update_listings($group_id)
if ($mod_permissions)
{
- if (!function_exists('cache_moderators'))
+ if (!function_exists('phpbb_cache_moderators'))
{
global $phpbb_root_path, $phpEx;
include($phpbb_root_path . 'includes/functions_admin.' . $phpEx);
}
- cache_moderators();
+ phpbb_cache_moderators($db, $cache, $auth);
}
if ($mod_permissions || $admin_permissions)
{
- if (!function_exists('update_foes'))
+ if (!function_exists('phpbb_update_foes'))
{
global $phpbb_root_path, $phpEx;
include($phpbb_root_path . 'includes/functions_admin.' . $phpEx);
}
- update_foes(array($group_id));
+ phpbb_update_foes($db, $auth, array($group_id));
}
}
@@ -3615,5 +3474,3 @@ function phpbb_get_banned_user_ids($user_ids = array())
return $banned_ids_list;
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/hooks/index.php b/phpBB/includes/hooks/index.php
index aa85e63f32..11478aee1e 100644
--- a/phpBB/includes/hooks/index.php
+++ b/phpBB/includes/hooks/index.php
@@ -2,9 +2,8 @@
/**
*
* @package phpBB3
-* @version $Id$
* @copyright (c) 2007 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -246,5 +245,3 @@ class phpbb_hook
}
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/mcp/info/mcp_ban.php b/phpBB/includes/mcp/info/mcp_ban.php
index 383df30498..a3a1e0ef9a 100644
--- a/phpBB/includes/mcp/info/mcp_ban.php
+++ b/phpBB/includes/mcp/info/mcp_ban.php
@@ -2,9 +2,8 @@
/**
*
* @package mcp
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -35,5 +34,3 @@ class mcp_ban_info
{
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/mcp/info/mcp_logs.php b/phpBB/includes/mcp/info/mcp_logs.php
index fe2f9fa1d7..fc30a600c0 100644
--- a/phpBB/includes/mcp/info/mcp_logs.php
+++ b/phpBB/includes/mcp/info/mcp_logs.php
@@ -2,9 +2,8 @@
/**
*
* @package mcp
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -35,5 +34,3 @@ class mcp_logs_info
{
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/mcp/info/mcp_main.php b/phpBB/includes/mcp/info/mcp_main.php
index 9755cdfc07..705715cbeb 100644
--- a/phpBB/includes/mcp/info/mcp_main.php
+++ b/phpBB/includes/mcp/info/mcp_main.php
@@ -2,9 +2,8 @@
/**
*
* @package mcp
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -36,5 +35,3 @@ class mcp_main_info
{
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/mcp/info/mcp_notes.php b/phpBB/includes/mcp/info/mcp_notes.php
index afe232e5b5..a77b461bbd 100644
--- a/phpBB/includes/mcp/info/mcp_notes.php
+++ b/phpBB/includes/mcp/info/mcp_notes.php
@@ -2,9 +2,8 @@
/**
*
* @package mcp
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -34,5 +33,3 @@ class mcp_notes_info
{
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/mcp/info/mcp_pm_reports.php b/phpBB/includes/mcp/info/mcp_pm_reports.php
index 103f560597..07dc564b19 100644
--- a/phpBB/includes/mcp/info/mcp_pm_reports.php
+++ b/phpBB/includes/mcp/info/mcp_pm_reports.php
@@ -2,9 +2,8 @@
/**
*
* @package mcp
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -35,5 +34,3 @@ class mcp_pm_reports_info
{
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/mcp/info/mcp_queue.php b/phpBB/includes/mcp/info/mcp_queue.php
index 7a256642b9..68cac5abd2 100644
--- a/phpBB/includes/mcp/info/mcp_queue.php
+++ b/phpBB/includes/mcp/info/mcp_queue.php
@@ -2,9 +2,8 @@
/**
*
* @package mcp
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -22,6 +21,8 @@ class mcp_queue_info
'modes' => array(
'unapproved_topics' => array('title' => 'MCP_QUEUE_UNAPPROVED_TOPICS', 'auth' => 'aclf_m_approve', 'cat' => array('MCP_QUEUE')),
'unapproved_posts' => array('title' => 'MCP_QUEUE_UNAPPROVED_POSTS', 'auth' => 'aclf_m_approve', 'cat' => array('MCP_QUEUE')),
+ 'deleted_topics' => array('title' => 'MCP_QUEUE_DELETED_TOPICS', 'auth' => 'aclf_m_approve', 'cat' => array('MCP_QUEUE')),
+ 'deleted_posts' => array('title' => 'MCP_QUEUE_DELETED_POSTS', 'auth' => 'aclf_m_approve', 'cat' => array('MCP_QUEUE')),
'approve_details' => array('title' => 'MCP_QUEUE_APPROVE_DETAILS', 'auth' => 'acl_m_approve,$id || (!$id && aclf_m_approve)', 'cat' => array('MCP_QUEUE')),
),
);
@@ -35,5 +36,3 @@ class mcp_queue_info
{
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/mcp/info/mcp_reports.php b/phpBB/includes/mcp/info/mcp_reports.php
index 3893ba5abb..cb6962a1d5 100644
--- a/phpBB/includes/mcp/info/mcp_reports.php
+++ b/phpBB/includes/mcp/info/mcp_reports.php
@@ -2,9 +2,8 @@
/**
*
* @package mcp
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -35,5 +34,3 @@ class mcp_reports_info
{
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/mcp/info/mcp_warn.php b/phpBB/includes/mcp/info/mcp_warn.php
index 2b0b09f75a..d5ac1eedbf 100644
--- a/phpBB/includes/mcp/info/mcp_warn.php
+++ b/phpBB/includes/mcp/info/mcp_warn.php
@@ -2,9 +2,8 @@
/**
*
* @package mcp
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -36,5 +35,3 @@ class mcp_warn_info
{
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/mcp/mcp_ban.php b/phpBB/includes/mcp/mcp_ban.php
index d9f5eb8f22..d3bc336293 100644
--- a/phpBB/includes/mcp/mcp_ban.php
+++ b/phpBB/includes/mcp/mcp_ban.php
@@ -2,9 +2,8 @@
/**
*
* @package mcp
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -215,5 +214,3 @@ class mcp_ban
}
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/mcp/mcp_forum.php b/phpBB/includes/mcp/mcp_forum.php
index 04e0e70f1d..7c1c61dae7 100644
--- a/phpBB/includes/mcp/mcp_forum.php
+++ b/phpBB/includes/mcp/mcp_forum.php
@@ -2,9 +2,8 @@
/**
*
* @package mcp
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -23,6 +22,7 @@ function mcp_forum_view($id, $mode, $action, $forum_info)
{
global $template, $db, $user, $auth, $cache, $module;
global $phpEx, $phpbb_root_path, $config;
+ global $request, $phpbb_dispatcher, $phpbb_container;
$user->add_lang(array('viewtopic', 'viewforum'));
@@ -34,7 +34,10 @@ function mcp_forum_view($id, $mode, $action, $forum_info)
if ($merge_select)
{
// Fixes a "bug" that makes forum_view use the same ordering as topic_view
- unset($_POST['sk'], $_POST['sd'], $_REQUEST['sk'], $_REQUEST['sd']);
+ $request->overwrite('sk', null);
+ $request->overwrite('sd', null);
+ $request->overwrite('sk', null, \phpbb\request\request_interface::POST);
+ $request->overwrite('sd', null, \phpbb\request\request_interface::POST);
}
$forum_id = $forum_info['forum_id'];
@@ -70,6 +73,8 @@ function mcp_forum_view($id, $mode, $action, $forum_info)
break;
}
+ $pagination = $phpbb_container->get('pagination');
+
$selected_ids = '';
if (sizeof($post_id_list) && $action != 'merge_topics')
{
@@ -95,9 +100,12 @@ function mcp_forum_view($id, $mode, $action, $forum_info)
$sort_by_sql = $sort_order_sql = array();
mcp_sorting('viewforum', $sort_days, $sort_key, $sort_dir, $sort_by_sql, $sort_order_sql, $total, $forum_id);
- $forum_topics = ($total == -1) ? $forum_info['forum_topics'] : $total;
+ $forum_topics = ($total == -1) ? $forum_info['forum_topics_approved'] : $total;
$limit_time_sql = ($sort_days) ? 'AND t.topic_last_post_time >= ' . (time() - ($sort_days * 86400)) : '';
+ $base_url = $url . "&amp;i=$id&amp;action=$action&amp;mode=$mode&amp;sd=$sort_dir&amp;sk=$sort_key&amp;st=$sort_days" . (($merge_select) ? $selected_ids : '');
+ $pagination->generate_template_pagination($base_url, 'pagination', 'start', $forum_topics, $topics_per_page, $start);
+
$template->assign_vars(array(
'ACTION' => $action,
'FORUM_NAME' => $forum_info['forum_name'],
@@ -110,6 +118,7 @@ function mcp_forum_view($id, $mode, $action, $forum_info)
'S_CAN_REPORT' => $auth->acl_get('m_report', $forum_id),
'S_CAN_DELETE' => $auth->acl_get('m_delete', $forum_id),
+ 'S_CAN_RESTORE' => $auth->acl_get('m_approve', $forum_id),
'S_CAN_MERGE' => $auth->acl_get('m_merge', $forum_id),
'S_CAN_MOVE' => $auth->acl_get('m_move', $forum_id),
'S_CAN_FORK' => $auth->acl_get('m_', $forum_id),
@@ -126,9 +135,7 @@ function mcp_forum_view($id, $mode, $action, $forum_info)
'S_MCP_ACTION' => $url . "&amp;i=$id&amp;forum_action=$action&amp;mode=$mode&amp;start=$start" . (($merge_select) ? $selected_ids : ''),
- 'PAGINATION' => generate_pagination($url . "&amp;i=$id&amp;action=$action&amp;mode=$mode&amp;sd=$sort_dir&amp;sk=$sort_key&amp;st=$sort_days" . (($merge_select) ? $selected_ids : ''), $forum_topics, $topics_per_page, $start),
- 'PAGE_NUMBER' => on_page($forum_topics, $topics_per_page, $start),
- 'TOTAL_TOPICS' => ($forum_topics == 1) ? $user->lang['VIEW_FORUM_TOPIC'] : sprintf($user->lang['VIEW_FORUM_TOPICS'], $forum_topics),
+ 'TOTAL_TOPICS' => $user->lang('VIEW_FORUM_TOPICS', (int) $forum_topics),
));
// Grab icons
@@ -146,10 +153,12 @@ function mcp_forum_view($id, $mode, $action, $forum_info)
$read_tracking_join = $read_tracking_select = '';
}
- $sql = "SELECT t.topic_id
- FROM " . TOPICS_TABLE . " t
- WHERE t.forum_id IN($forum_id, 0)
- " . (($auth->acl_get('m_approve', $forum_id)) ? '' : 'AND t.topic_approved = 1') . "
+ $phpbb_content_visibility = $phpbb_container->get('content.visibility');
+
+ $sql = 'SELECT t.topic_id
+ FROM ' . TOPICS_TABLE . ' t
+ WHERE t.forum_id = ' . $forum_id . '
+ AND ' . $phpbb_content_visibility->get_visibility_sql('topic', $forum_id, 't.') . "
$limit_time_sql
ORDER BY t.topic_type DESC, $sort_order_sql";
$result = $db->sql_query_limit($sql, $topics_per_page, $start);
@@ -184,11 +193,11 @@ function mcp_forum_view($id, $mode, $action, $forum_info)
{
if ($config['load_db_lastread'])
{
- $topic_tracking_info = get_topic_tracking($forum_id, $topic_list, $topic_rows, array($forum_id => $forum_info['mark_time']), array());
+ $topic_tracking_info = get_topic_tracking($forum_id, $topic_list, $topic_rows, array($forum_id => $forum_info['mark_time']));
}
else
{
- $topic_tracking_info = get_complete_topic_tracking($forum_id, $topic_list, array());
+ $topic_tracking_info = get_complete_topic_tracking($forum_id, $topic_list);
}
}
@@ -198,7 +207,7 @@ function mcp_forum_view($id, $mode, $action, $forum_info)
$row = &$topic_rows[$topic_id];
- $replies = ($auth->acl_get('m_approve', $forum_id)) ? $row['topic_replies_real'] : $row['topic_replies'];
+ $replies = $phpbb_content_visibility->get_count('topic_posts', $row, $forum_id) - 1;
if ($row['topic_status'] == ITEM_MOVED)
{
@@ -215,18 +224,21 @@ function mcp_forum_view($id, $mode, $action, $forum_info)
$topic_title = censor_text($row['topic_title']);
- $topic_unapproved = (!$row['topic_approved'] && $auth->acl_get('m_approve', $row['forum_id'])) ? true : false;
- $posts_unapproved = ($row['topic_approved'] && $row['topic_replies'] < $row['topic_replies_real'] && $auth->acl_get('m_approve', $row['forum_id'])) ? true : false;
+ $topic_unapproved = ($row['topic_visibility'] == ITEM_UNAPPROVED && $auth->acl_get('m_approve', $row['forum_id'])) ? true : false;
+ $posts_unapproved = ($row['topic_visibility'] == ITEM_APPROVED && $row['topic_posts_unapproved'] && $auth->acl_get('m_approve', $row['forum_id'])) ? true : false;
+ $topic_deleted = $row['topic_visibility'] == ITEM_DELETED;
$u_mcp_queue = ($topic_unapproved || $posts_unapproved) ? $url . '&amp;i=queue&amp;mode=' . (($topic_unapproved) ? 'approve_details' : 'unapproved_posts') . '&amp;t=' . $row['topic_id'] : '';
+ $u_mcp_queue = (!$u_mcp_queue && $topic_deleted) ? $url . '&amp;i=queue&amp;mode=deleted_topics&amp;t=' . $topic_id : $u_mcp_queue;
$topic_row = array(
'ATTACH_ICON_IMG' => ($auth->acl_get('u_download') && $auth->acl_get('f_download', $row['forum_id']) && $row['topic_attachment']) ? $user->img('icon_topic_attach', $user->lang['TOTAL_ATTACHMENTS']) : '',
+ 'TOPIC_IMG_STYLE' => $folder_img,
'TOPIC_FOLDER_IMG' => $user->img($folder_img, $folder_alt),
- 'TOPIC_FOLDER_IMG_SRC' => $user->img($folder_img, $folder_alt, false, '', 'src'),
'TOPIC_ICON_IMG' => (!empty($icons[$row['icon_id']])) ? $icons[$row['icon_id']]['img'] : '',
'TOPIC_ICON_IMG_WIDTH' => (!empty($icons[$row['icon_id']])) ? $icons[$row['icon_id']]['width'] : '',
'TOPIC_ICON_IMG_HEIGHT' => (!empty($icons[$row['icon_id']])) ? $icons[$row['icon_id']]['height'] : '',
'UNAPPROVED_IMG' => ($topic_unapproved || $posts_unapproved) ? $user->img('icon_topic_unapproved', ($topic_unapproved) ? 'TOPIC_UNAPPROVED' : 'POSTS_UNAPPROVED') : '',
+ 'DELETED_IMG' => ($topic_deleted) ? $user->img('icon_topic_deleted', 'POSTS_DELETED') : '',
'TOPIC_AUTHOR' => get_username_string('username', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
'TOPIC_AUTHOR_COLOUR' => get_username_string('colour', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
@@ -240,7 +252,7 @@ function mcp_forum_view($id, $mode, $action, $forum_info)
'TOPIC_TYPE' => $topic_type,
'TOPIC_TITLE' => $topic_title,
- 'REPLIES' => ($auth->acl_get('m_approve', $row['forum_id'])) ? $row['topic_replies_real'] : $row['topic_replies'],
+ 'REPLIES' => $phpbb_content_visibility->get_count('topic_posts', $row, $row['forum_id']) - 1,
'LAST_POST_TIME' => $user->format_date($row['topic_last_post_time']),
'FIRST_POST_TIME' => $user->format_date($row['topic_time']),
'LAST_POST_SUBJECT' => $row['topic_last_post_subject'],
@@ -249,6 +261,7 @@ function mcp_forum_view($id, $mode, $action, $forum_info)
'S_TOPIC_REPORTED' => (!empty($row['topic_reported']) && empty($row['topic_moved_id']) && $auth->acl_get('m_report', $row['forum_id'])) ? true : false,
'S_TOPIC_UNAPPROVED' => $topic_unapproved,
'S_POSTS_UNAPPROVED' => $posts_unapproved,
+ 'S_TOPIC_DELETED' => $topic_deleted,
'S_UNREAD_TOPIC' => $unread_topic,
);
@@ -283,6 +296,17 @@ function mcp_forum_view($id, $mode, $action, $forum_info)
));
}
+ /**
+ * Modify the topic data before it is assigned to the template in MCP
+ *
+ * @event core.mcp_view_forum_modify_topicrow
+ * @var array row Array with topic data
+ * @var array topic_row Template array with topic data
+ * @since 3.1-A1
+ */
+ $vars = array('row', 'topic_row');
+ extract($phpbb_dispatcher->trigger_event('core.mcp_view_forum_modify_topicrow', compact($vars)));
+
$template->assign_block_vars('topicrow', $topic_row);
}
unset($topic_rows);
@@ -427,24 +451,14 @@ function merge_topics($forum_id, $topic_ids, $to_topic_id)
// Link to the new topic
$return_link .= (($return_link) ? '<br /><br />' : '') . sprintf($user->lang['RETURN_NEW_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $to_forum_id . '&amp;t=' . $to_topic_id) . '">', '</a>');
- }
- else
- {
- confirm_box(false, 'MERGE_TOPICS', $s_hidden_fields);
- }
-
- $redirect = request_var('redirect', "index.$phpEx");
- $redirect = reapply_sid($redirect);
+ $redirect = request_var('redirect', "{$phpbb_root_path}viewtopic.$phpEx?f=$to_forum_id&amp;t=$to_topic_id");
+ $redirect = reapply_sid($redirect);
- if (!$success_msg)
- {
- return;
+ meta_refresh(3, $redirect);
+ trigger_error($user->lang[$success_msg] . '<br /><br />' . $return_link);
}
else
{
- meta_refresh(3, append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$to_forum_id&amp;t=$to_topic_id"));
- trigger_error($user->lang[$success_msg] . '<br /><br />' . $return_link);
+ confirm_box(false, 'MERGE_TOPICS', $s_hidden_fields);
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/mcp/mcp_front.php b/phpBB/includes/mcp/mcp_front.php
index af262baa29..44cab5d910 100644
--- a/phpBB/includes/mcp/mcp_front.php
+++ b/phpBB/includes/mcp/mcp_front.php
@@ -2,9 +2,8 @@
/**
*
* @package mcp
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -39,16 +38,14 @@ function mcp_front_view($id, $mode, $action)
{
$sql = 'SELECT COUNT(post_id) AS total
FROM ' . POSTS_TABLE . '
- WHERE forum_id IN (0, ' . implode(', ', $forum_list) . ')
- AND post_approved = 0';
+ WHERE ' . $db->sql_in_set('forum_id', $forum_list) . '
+ AND post_visibility = ' . ITEM_UNAPPROVED;
$result = $db->sql_query($sql);
$total = (int) $db->sql_fetchfield('total');
$db->sql_freeresult($result);
if ($total)
{
- $global_id = $forum_list[0];
-
$sql = 'SELECT forum_id, forum_name
FROM ' . FORUMS_TABLE . '
WHERE ' . $db->sql_in_set('forum_id', $forum_list);
@@ -62,8 +59,8 @@ function mcp_front_view($id, $mode, $action)
$sql = 'SELECT post_id
FROM ' . POSTS_TABLE . '
- WHERE forum_id IN (0, ' . implode(', ', $forum_list) . ')
- AND post_approved = 0
+ WHERE ' . $db->sql_in_set('forum_id', $forum_list) . '
+ AND post_visibility = ' . ITEM_UNAPPROVED . '
ORDER BY post_time DESC';
$result = $db->sql_query_limit($sql, 5);
@@ -81,7 +78,7 @@ function mcp_front_view($id, $mode, $action)
if ($total)
{
- $sql = 'SELECT p.post_id, p.post_subject, p.post_time, p.poster_id, p.post_username, u.username, u.username_clean, u.user_colour, t.topic_id, t.topic_title, t.topic_first_post_id, p.forum_id
+ $sql = 'SELECT p.post_id, p.post_subject, p.post_time, p.post_attachment, p.poster_id, p.post_username, u.username, u.username_clean, u.user_colour, t.topic_id, t.topic_title, t.topic_first_post_id, p.forum_id
FROM ' . POSTS_TABLE . ' p, ' . TOPICS_TABLE . ' t, ' . USERS_TABLE . ' u
WHERE ' . $db->sql_in_set('p.post_id', $post_list) . '
AND t.topic_id = p.topic_id
@@ -91,17 +88,11 @@ function mcp_front_view($id, $mode, $action)
while ($row = $db->sql_fetchrow($result))
{
- $global_topic = ($row['forum_id']) ? false : true;
- if ($global_topic)
- {
- $row['forum_id'] = $global_id;
- }
-
$template->assign_block_vars('unapproved', array(
'U_POST_DETAILS' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue&amp;mode=approve_details&amp;f=' . $row['forum_id'] . '&amp;p=' . $row['post_id']),
- 'U_MCP_FORUM' => (!$global_topic) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=main&amp;mode=forum_view&amp;f=' . $row['forum_id']) : '',
+ 'U_MCP_FORUM' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=main&amp;mode=forum_view&amp;f=' . $row['forum_id']),
'U_MCP_TOPIC' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=main&amp;mode=topic_view&amp;f=' . $row['forum_id'] . '&amp;t=' . $row['topic_id']),
- 'U_FORUM' => (!$global_topic) ? append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $row['forum_id']) : '',
+ 'U_FORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $row['forum_id']),
'U_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $row['forum_id'] . '&amp;t=' . $row['topic_id']),
'AUTHOR_FULL' => get_username_string('full', $row['poster_id'], $row['username'], $row['user_colour']),
@@ -109,12 +100,13 @@ function mcp_front_view($id, $mode, $action)
'AUTHOR_COLOUR' => get_username_string('colour', $row['poster_id'], $row['username'], $row['user_colour']),
'U_AUTHOR' => get_username_string('profile', $row['poster_id'], $row['username'], $row['user_colour']),
- 'FORUM_NAME' => (!$global_topic) ? $forum_names[$row['forum_id']] : $user->lang['GLOBAL_ANNOUNCEMENT'],
+ 'FORUM_NAME' => $forum_names[$row['forum_id']],
'POST_ID' => $row['post_id'],
'TOPIC_TITLE' => $row['topic_title'],
'SUBJECT' => ($row['post_subject']) ? $row['post_subject'] : $user->lang['NO_SUBJECT'],
- 'POST_TIME' => $user->format_date($row['post_time']))
- );
+ 'POST_TIME' => $user->format_date($row['post_time']),
+ 'ATTACH_ICON_IMG' => ($auth->acl_get('u_download') && $auth->acl_get('f_download', $row['forum_id']) && $row['post_attachment']) ? $user->img('icon_topic_attach', $user->lang['TOTAL_ATTACHMENTS']) : '',
+ ));
}
$db->sql_freeresult($result);
}
@@ -126,22 +118,9 @@ function mcp_front_view($id, $mode, $action)
$template->assign_vars(array(
'S_HIDDEN_FIELDS' => $s_hidden_fields,
'S_MCP_QUEUE_ACTION' => append_sid("{$phpbb_root_path}mcp.$phpEx", "i=queue"),
+ 'L_UNAPPROVED_TOTAL' => $user->lang('UNAPPROVED_POSTS_TOTAL', (int) $total),
+ 'S_HAS_UNAPPROVED_POSTS'=> ($total != 0),
));
-
- if ($total == 0)
- {
- $template->assign_vars(array(
- 'L_UNAPPROVED_TOTAL' => $user->lang['UNAPPROVED_POSTS_ZERO_TOTAL'],
- 'S_HAS_UNAPPROVED_POSTS' => false)
- );
- }
- else
- {
- $template->assign_vars(array(
- 'L_UNAPPROVED_TOTAL' => ($total == 1) ? $user->lang['UNAPPROVED_POST_TOTAL'] : sprintf($user->lang['UNAPPROVED_POSTS_TOTAL'], $total),
- 'S_HAS_UNAPPROVED_POSTS' => true)
- );
- }
}
}
@@ -159,31 +138,29 @@ function mcp_front_view($id, $mode, $action)
WHERE r.post_id = p.post_id
AND r.pm_id = 0
AND r.report_closed = 0
- AND p.forum_id IN (0, ' . implode(', ', $forum_list) . ')';
+ AND ' . $db->sql_in_set('p.forum_id', $forum_list);
$result = $db->sql_query($sql);
$total = (int) $db->sql_fetchfield('total');
$db->sql_freeresult($result);
if ($total)
{
- $global_id = $forum_list[0];
-
- $sql = $db->sql_build_query('SELECT', array(
- 'SELECT' => 'r.report_time, p.post_id, p.post_subject, p.post_time, u.username, u.username_clean, u.user_colour, u.user_id, u2.username as author_name, u2.username_clean as author_name_clean, u2.user_colour as author_colour, u2.user_id as author_id, t.topic_id, t.topic_title, f.forum_id, f.forum_name',
+ $sql_ary = array(
+ 'SELECT' => 'r.report_time, p.post_id, p.post_subject, p.post_time, p.post_attachment, u.username, u.username_clean, u.user_colour, u.user_id, u2.username as author_name, u2.username_clean as author_name_clean, u2.user_colour as author_colour, u2.user_id as author_id, t.topic_id, t.topic_title, f.forum_id, f.forum_name',
'FROM' => array(
REPORTS_TABLE => 'r',
REPORTS_REASONS_TABLE => 'rr',
TOPICS_TABLE => 't',
USERS_TABLE => array('u', 'u2'),
- POSTS_TABLE => 'p'
+ POSTS_TABLE => 'p',
),
'LEFT_JOIN' => array(
array(
'FROM' => array(FORUMS_TABLE => 'f'),
- 'ON' => 'f.forum_id = p.forum_id'
- )
+ 'ON' => 'f.forum_id = p.forum_id',
+ ),
),
'WHERE' => 'r.post_id = p.post_id
@@ -193,25 +170,20 @@ function mcp_front_view($id, $mode, $action)
AND p.topic_id = t.topic_id
AND r.user_id = u.user_id
AND p.poster_id = u2.user_id
- AND p.forum_id IN (0, ' . implode(', ', $forum_list) . ')',
+ AND ' . $db->sql_in_set('p.forum_id', $forum_list),
- 'ORDER_BY' => 'p.post_time DESC'
- ));
+ 'ORDER_BY' => 'p.post_time DESC',
+ );
+ $sql = $db->sql_build_query('SELECT', $sql_ary);
$result = $db->sql_query_limit($sql, 5);
while ($row = $db->sql_fetchrow($result))
{
- $global_topic = ($row['forum_id']) ? false : true;
- if ($global_topic)
- {
- $row['forum_id'] = $global_id;
- }
-
$template->assign_block_vars('report', array(
'U_POST_DETAILS' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'f=' . $row['forum_id'] . '&amp;p=' . $row['post_id'] . "&amp;i=reports&amp;mode=report_details"),
- 'U_MCP_FORUM' => (!$global_topic) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'f=' . $row['forum_id'] . "&amp;i=$id&amp;mode=forum_view") : '',
+ 'U_MCP_FORUM' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'f=' . $row['forum_id'] . "&amp;i=$id&amp;mode=forum_view"),
'U_MCP_TOPIC' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'f=' . $row['forum_id'] . '&amp;t=' . $row['topic_id'] . "&amp;i=$id&amp;mode=topic_view"),
- 'U_FORUM' => (!$global_topic) ? append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $row['forum_id']) : '',
+ 'U_FORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $row['forum_id']),
'U_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $row['forum_id'] . '&amp;t=' . $row['topic_id']),
'REPORTER_FULL' => get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']),
@@ -224,29 +196,20 @@ function mcp_front_view($id, $mode, $action)
'AUTHOR_COLOUR' => get_username_string('colour', $row['author_id'], $row['author_name'], $row['author_colour']),
'U_AUTHOR' => get_username_string('profile', $row['author_id'], $row['author_name'], $row['author_colour']),
- 'FORUM_NAME' => (!$global_topic) ? $row['forum_name'] : $user->lang['GLOBAL_ANNOUNCEMENT'],
+ 'FORUM_NAME' => $row['forum_name'],
'TOPIC_TITLE' => $row['topic_title'],
'SUBJECT' => ($row['post_subject']) ? $row['post_subject'] : $user->lang['NO_SUBJECT'],
'REPORT_TIME' => $user->format_date($row['report_time']),
'POST_TIME' => $user->format_date($row['post_time']),
+ 'ATTACH_ICON_IMG' => ($auth->acl_get('u_download') && $auth->acl_get('f_download', $row['forum_id']) && $row['post_attachment']) ? $user->img('icon_topic_attach', $user->lang['TOTAL_ATTACHMENTS']) : '',
));
}
}
- if ($total == 0)
- {
- $template->assign_vars(array(
- 'L_REPORTS_TOTAL' => $user->lang['REPORTS_ZERO_TOTAL'],
- 'S_HAS_REPORTS' => false)
- );
- }
- else
- {
- $template->assign_vars(array(
- 'L_REPORTS_TOTAL' => ($total == 1) ? $user->lang['REPORT_TOTAL'] : sprintf($user->lang['REPORTS_TOTAL'], $total),
- 'S_HAS_REPORTS' => true)
- );
- }
+ $template->assign_vars(array(
+ 'L_REPORTS_TOTAL' => $user->lang('REPORTS_TOTAL', (int) $total),
+ 'S_HAS_REPORTS' => ($total != 0),
+ ));
}
}
@@ -269,14 +232,14 @@ function mcp_front_view($id, $mode, $action)
{
include($phpbb_root_path . 'includes/functions_privmsgs.' . $phpEx);
- $sql = $db->sql_build_query('SELECT', array(
- 'SELECT' => 'r.report_id, r.report_time, p.msg_id, p.message_subject, p.message_time, p.to_address, p.bcc_address, u.username, u.username_clean, u.user_colour, u.user_id, u2.username as author_name, u2.username_clean as author_name_clean, u2.user_colour as author_colour, u2.user_id as author_id',
+ $sql_ary = array(
+ 'SELECT' => 'r.report_id, r.report_time, p.msg_id, p.message_subject, p.message_time, p.to_address, p.bcc_address, p.message_attachment, u.username, u.username_clean, u.user_colour, u.user_id, u2.username as author_name, u2.username_clean as author_name_clean, u2.user_colour as author_colour, u2.user_id as author_id',
'FROM' => array(
REPORTS_TABLE => 'r',
REPORTS_REASONS_TABLE => 'rr',
USERS_TABLE => array('u', 'u2'),
- PRIVMSGS_TABLE => 'p'
+ PRIVMSGS_TABLE => 'p',
),
'WHERE' => 'r.pm_id = p.msg_id
@@ -286,8 +249,9 @@ function mcp_front_view($id, $mode, $action)
AND r.user_id = u.user_id
AND p.author_id = u2.user_id',
- 'ORDER_BY' => 'p.message_time DESC'
- ));
+ 'ORDER_BY' => 'p.message_time DESC',
+ );
+ $sql = $db->sql_build_query('SELECT', $sql_ary);
$result = $db->sql_query_limit($sql, 5);
$pm_by_id = $pm_list = array();
@@ -320,24 +284,15 @@ function mcp_front_view($id, $mode, $action)
'REPORT_TIME' => $user->format_date($row['report_time']),
'PM_TIME' => $user->format_date($row['message_time']),
'RECIPIENTS' => implode(', ', $address_list[$row['msg_id']]),
+ 'ATTACH_ICON_IMG' => ($auth->acl_get('u_download') && $row['message_attachment']) ? $user->img('icon_topic_attach', $user->lang['TOTAL_ATTACHMENTS']) : '',
));
}
}
- if ($total == 0)
- {
- $template->assign_vars(array(
- 'L_PM_REPORTS_TOTAL' => $user->lang['PM_REPORTS_ZERO_TOTAL'],
- 'S_HAS_PM_REPORTS' => false)
- );
- }
- else
- {
- $template->assign_vars(array(
- 'L_PM_REPORTS_TOTAL' => ($total == 1) ? $user->lang['PM_REPORT_TOTAL'] : sprintf($user->lang['PM_REPORTS_TOTAL'], $total),
- 'S_HAS_PM_REPORTS' => true)
- );
- }
+ $template->assign_vars(array(
+ 'L_PM_REPORTS_TOTAL' => $user->lang('PM_REPORTS_TOTAL', (int) $total),
+ 'S_HAS_PM_REPORTS' => ($total != 0),
+ ));
}
// Latest 5 logs
@@ -347,9 +302,6 @@ function mcp_front_view($id, $mode, $action)
if (!empty($forum_list))
{
- // Add forum_id 0 for global announcements
- $forum_list[] = 0;
-
$log_count = false;
$log = array();
view_log('mod', $log, $log_count, 5, 0, $forum_list);
@@ -376,5 +328,3 @@ function mcp_front_view($id, $mode, $action)
$template->assign_var('S_MCP_ACTION', append_sid("{$phpbb_root_path}mcp.$phpEx"));
make_jumpbox(append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=main&amp;mode=forum_view'), 0, false, 'm_', true);
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/mcp/mcp_logs.php b/phpBB/includes/mcp/mcp_logs.php
index 73ff72c177..7bcb0fc477 100644
--- a/phpBB/includes/mcp/mcp_logs.php
+++ b/phpBB/includes/mcp/mcp_logs.php
@@ -2,9 +2,8 @@
/**
*
* @package mcp
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -34,7 +33,7 @@ class mcp_logs
function main($id, $mode)
{
global $auth, $db, $user, $template;
- global $config, $phpbb_root_path, $phpEx;
+ global $config, $phpbb_root_path, $phpEx, $phpbb_container;
$user->add_lang('acp/common');
@@ -63,6 +62,8 @@ class mcp_logs
$this->tpl_name = 'mcp_logs';
$this->page_title = 'MCP_LOGS';
+ $pagination = $phpbb_container->get('pagination');
+
$forum_list = array_values(array_intersect(get_forum_list('f_read'), get_forum_list('m_')));
$forum_list[] = 0;
@@ -172,10 +173,11 @@ class mcp_logs
$log_count = 0;
$start = view_log('mod', $log_data, $log_count, $config['topics_per_page'], $start, $forum_list, $topic_id, 0, $sql_where, $sql_sort, $keywords);
+ $base_url = $this->u_action . "&amp;$u_sort_param$keywords_param";
+ $pagination->generate_template_pagination($base_url, 'pagination', 'start', $log_count, $config['topics_per_page'], $start);
+
$template->assign_vars(array(
- 'PAGE_NUMBER' => on_page($log_count, $config['topics_per_page'], $start),
- 'TOTAL' => ($log_count == 1) ? $user->lang['TOTAL_LOG'] : sprintf($user->lang['TOTAL_LOGS'], $log_count),
- 'PAGINATION' => generate_pagination($this->u_action . "&amp;$u_sort_param$keywords_param", $log_count, $config['topics_per_page'], $start),
+ 'TOTAL' => $user->lang('TOTAL_LOGS', (int) $log_count),
'L_TITLE' => $user->lang['MCP_LOGS'],
@@ -214,5 +216,3 @@ class mcp_logs
}
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/mcp/mcp_main.php b/phpBB/includes/mcp/mcp_main.php
index 0cef8933fc..016094c5d4 100644
--- a/phpBB/includes/mcp/mcp_main.php
+++ b/phpBB/includes/mcp/mcp_main.php
@@ -2,9 +2,8 @@
/**
*
* @package mcp
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -34,7 +33,8 @@ class mcp_main
function main($id, $mode)
{
global $auth, $db, $user, $template, $action;
- global $config, $phpbb_root_path, $phpEx;
+ global $config, $phpbb_root_path, $phpEx, $request;
+ global $phpbb_dispatcher;
$quickmod = ($mode == 'quickmod') ? true : false;
@@ -109,27 +109,58 @@ class mcp_main
case 'delete_topic':
$user->add_lang('viewtopic');
- $topic_ids = (!$quickmod) ? request_var('topic_id_list', array(0)) : array(request_var('t', 0));
+ // f parameter is not reliable for permission usage, however we just use it to decide
+ // which permission we will check later on. So if it is manipulated, we will still catch it later on.
+ $forum_id = $request->variable('f', 0);
+ $topic_ids = (!$quickmod) ? $request->variable('topic_id_list', array(0)) : array($request->variable('t', 0));
+ $soft_delete = (($request->is_set_post('confirm') && !$request->is_set_post('delete_permanent')) || !$auth->acl_get('m_delete', $forum_id)) ? true : false;
if (!sizeof($topic_ids))
{
trigger_error('NO_TOPIC_SELECTED');
}
- mcp_delete_topic($topic_ids);
+ mcp_delete_topic($topic_ids, $soft_delete, ($soft_delete) ? $request->variable('delete_reason', '', true) : '');
break;
case 'delete_post':
$user->add_lang('posting');
- $post_ids = (!$quickmod) ? request_var('post_id_list', array(0)) : array(request_var('p', 0));
+ // f parameter is not reliable for permission usage, however we just use it to decide
+ // which permission we will check later on. So if it is manipulated, we will still catch it later on.
+ $forum_id = $request->variable('f', 0);
+ $post_ids = (!$quickmod) ? $request->variable('post_id_list', array(0)) : array($request->variable('p', 0));
+ $soft_delete = (($request->is_set_post('confirm') && !$request->is_set_post('delete_permanent')) || !$auth->acl_get('m_delete', $forum_id)) ? true : false;
if (!sizeof($post_ids))
{
trigger_error('NO_POST_SELECTED');
}
- mcp_delete_post($post_ids);
+ mcp_delete_post($post_ids, $soft_delete, ($soft_delete) ? $request->variable('delete_reason', '', true) : '');
+ break;
+
+ case 'restore_topic':
+ $user->add_lang('posting');
+
+ $topic_ids = (!$quickmod) ? $request->variable('topic_id_list', array(0)) : array($request->variable('t', 0));
+
+ if (!sizeof($topic_ids))
+ {
+ trigger_error('NO_TOPIC_SELECTED');
+ }
+
+ mcp_restore_topic($topic_ids);
+ break;
+
+ default:
+ /**
+ * This event allows you to handle custom quickmod options
+ *
+ * @event core.modify_quickmod_actions
+ * @since 3.1.0-a4
+ */
+ $phpbb_dispatcher->dispatch('core.modify_quickmod_actions');
break;
}
@@ -199,7 +230,7 @@ class mcp_main
*/
function lock_unlock($action, $ids)
{
- global $auth, $user, $db, $phpEx, $phpbb_root_path;
+ global $auth, $user, $db, $phpEx, $phpbb_root_path, $request;
if ($action == 'lock' || $action == 'unlock')
{
@@ -236,6 +267,7 @@ function lock_unlock($action, $ids)
unset($orig_ids);
$redirect = request_var('redirect', build_url(array('action', 'quickmod')));
+ $redirect = reapply_sid($redirect);
$s_hidden_fields = build_hidden_fields(array(
$sql_id . '_list' => $ids,
@@ -259,24 +291,22 @@ function lock_unlock($action, $ids)
}
$success_msg = $l_prefix . ((sizeof($ids) == 1) ? '' : 'S') . '_' . (($action == 'lock' || $action == 'lock_post') ? 'LOCKED' : 'UNLOCKED') . '_SUCCESS';
- }
- else
- {
- confirm_box(false, strtoupper($action) . '_' . $l_prefix . ((sizeof($ids) == 1) ? '' : 'S'), $s_hidden_fields);
- }
- $redirect = request_var('redirect', "index.$phpEx");
- $redirect = reapply_sid($redirect);
+ meta_refresh(2, $redirect);
+ $message = $user->lang[$success_msg];
- if (!$success_msg)
- {
- redirect($redirect);
+ if (!$request->is_ajax())
+ {
+ $message .= '<br /><br />' . $user->lang('RETURN_PAGE', '<a href="' . $redirect . '">', '</a>');
+ }
+ trigger_error($message);
}
else
{
- meta_refresh(2, $redirect);
- trigger_error($user->lang[$success_msg] . '<br /><br />' . sprintf($user->lang['RETURN_PAGE'], '<a href="' . $redirect . '">', '</a>'));
+ confirm_box(false, strtoupper($action) . '_' . $l_prefix . ((sizeof($ids) == 1) ? '' : 'S'), $s_hidden_fields);
}
+
+ redirect($redirect);
}
/**
@@ -284,7 +314,7 @@ function lock_unlock($action, $ids)
*/
function change_topic_type($action, $topic_ids)
{
- global $auth, $user, $db, $phpEx, $phpbb_root_path;
+ global $auth, $user, $db, $phpEx, $phpbb_root_path, $request;
switch ($action)
{
@@ -321,6 +351,7 @@ function change_topic_type($action, $topic_ids)
}
$redirect = request_var('redirect', build_url(array('action', 'quickmod')));
+ $redirect = reapply_sid($redirect);
$s_hidden_fields = array(
'topic_id_list' => $topic_ids,
@@ -332,131 +363,22 @@ function change_topic_type($action, $topic_ids)
if (confirm_box(true))
{
- if ($new_topic_type != POST_GLOBAL)
+ $sql = 'UPDATE ' . TOPICS_TABLE . "
+ SET topic_type = $new_topic_type
+ WHERE " . $db->sql_in_set('topic_id', $topic_ids);
+ $db->sql_query($sql);
+
+ if (($new_topic_type == POST_GLOBAL) && sizeof($topic_ids))
{
+ // Delete topic shadows for global announcements
+ $sql = 'DELETE FROM ' . TOPICS_TABLE . '
+ WHERE ' . $db->sql_in_set('topic_moved_id', $topic_ids);
+ $db->sql_query($sql);
+
$sql = 'UPDATE ' . TOPICS_TABLE . "
SET topic_type = $new_topic_type
- WHERE " . $db->sql_in_set('topic_id', $topic_ids) . '
- AND forum_id <> 0';
+ WHERE " . $db->sql_in_set('topic_id', $topic_ids);
$db->sql_query($sql);
-
- // Reset forum id if a global topic is within the array
- $to_forum_id = request_var('to_forum_id', 0);
-
- if ($to_forum_id)
- {
- $sql = 'UPDATE ' . TOPICS_TABLE . "
- SET topic_type = $new_topic_type, forum_id = $to_forum_id
- WHERE " . $db->sql_in_set('topic_id', $topic_ids) . '
- AND forum_id = 0';
- $db->sql_query($sql);
-
- // Update forum_ids for all posts
- $sql = 'UPDATE ' . POSTS_TABLE . "
- SET forum_id = $to_forum_id
- WHERE " . $db->sql_in_set('topic_id', $topic_ids) . '
- AND forum_id = 0';
- $db->sql_query($sql);
-
- // Do a little forum sync stuff
- $sql = 'SELECT SUM(t.topic_replies + t.topic_approved) as topic_posts, COUNT(t.topic_approved) as topics_authed
- FROM ' . TOPICS_TABLE . ' t
- WHERE ' . $db->sql_in_set('t.topic_id', $topic_ids);
- $result = $db->sql_query($sql);
- $row_data = $db->sql_fetchrow($result);
- $db->sql_freeresult($result);
-
- $sync_sql = array();
-
- if ($row_data['topic_posts'])
- {
- $sync_sql[$to_forum_id][] = 'forum_posts = forum_posts + ' . (int) $row_data['topic_posts'];
- }
-
- if ($row_data['topics_authed'])
- {
- $sync_sql[$to_forum_id][] = 'forum_topics = forum_topics + ' . (int) $row_data['topics_authed'];
- }
-
- $sync_sql[$to_forum_id][] = 'forum_topics_real = forum_topics_real + ' . (int) sizeof($topic_ids);
-
- foreach ($sync_sql as $forum_id_key => $array)
- {
- $sql = 'UPDATE ' . FORUMS_TABLE . '
- SET ' . implode(', ', $array) . '
- WHERE forum_id = ' . $forum_id_key;
- $db->sql_query($sql);
- }
-
- sync('forum', 'forum_id', $to_forum_id);
- }
- }
- else
- {
- // Get away with those topics already being a global announcement by re-calculating $topic_ids
- $sql = 'SELECT topic_id
- FROM ' . TOPICS_TABLE . '
- WHERE ' . $db->sql_in_set('topic_id', $topic_ids) . '
- AND forum_id <> 0';
- $result = $db->sql_query($sql);
-
- $topic_ids = array();
- while ($row = $db->sql_fetchrow($result))
- {
- $topic_ids[] = $row['topic_id'];
- }
- $db->sql_freeresult($result);
-
- if (sizeof($topic_ids))
- {
- // Delete topic shadows for global announcements
- $sql = 'DELETE FROM ' . TOPICS_TABLE . '
- WHERE ' . $db->sql_in_set('topic_moved_id', $topic_ids);
- $db->sql_query($sql);
-
- $sql = 'UPDATE ' . TOPICS_TABLE . "
- SET topic_type = $new_topic_type, forum_id = 0
- WHERE " . $db->sql_in_set('topic_id', $topic_ids);
- $db->sql_query($sql);
-
- // Update forum_ids for all posts
- $sql = 'UPDATE ' . POSTS_TABLE . '
- SET forum_id = 0
- WHERE ' . $db->sql_in_set('topic_id', $topic_ids);
- $db->sql_query($sql);
-
- // Do a little forum sync stuff
- $sql = 'SELECT SUM(t.topic_replies + t.topic_approved) as topic_posts, COUNT(t.topic_approved) as topics_authed
- FROM ' . TOPICS_TABLE . ' t
- WHERE ' . $db->sql_in_set('t.topic_id', $topic_ids);
- $result = $db->sql_query($sql);
- $row_data = $db->sql_fetchrow($result);
- $db->sql_freeresult($result);
-
- $sync_sql = array();
-
- if ($row_data['topic_posts'])
- {
- $sync_sql[$forum_id][] = 'forum_posts = forum_posts - ' . (int) $row_data['topic_posts'];
- }
-
- if ($row_data['topics_authed'])
- {
- $sync_sql[$forum_id][] = 'forum_topics = forum_topics - ' . (int) $row_data['topics_authed'];
- }
-
- $sync_sql[$forum_id][] = 'forum_topics_real = forum_topics_real - ' . (int) sizeof($topic_ids);
-
- foreach ($sync_sql as $forum_id_key => $array)
- {
- $sql = 'UPDATE ' . FORUMS_TABLE . '
- SET ' . implode(', ', $array) . '
- WHERE forum_id = ' . $forum_id_key;
- $db->sql_query($sql);
- }
-
- sync('forum', 'forum_id', $forum_id);
- }
}
$success_msg = (sizeof($topic_ids) == 1) ? 'TOPIC_TYPE_CHANGED' : 'TOPICS_TYPE_CHANGED';
@@ -470,58 +392,22 @@ function change_topic_type($action, $topic_ids)
add_log('mod', $forum_id, $topic_id, 'LOG_TOPIC_TYPE_CHANGED', $row['topic_title']);
}
}
- }
- else
- {
- // Global topic involved?
- $global_involved = false;
-
- if ($new_topic_type != POST_GLOBAL)
- {
- $sql = 'SELECT forum_id
- FROM ' . TOPICS_TABLE . '
- WHERE ' . $db->sql_in_set('topic_id', $topic_ids) . '
- AND forum_id = 0';
- $result = $db->sql_query($sql);
- $row = $db->sql_fetchrow($result);
- $db->sql_freeresult($result);
-
- if ($row)
- {
- $global_involved = true;
- }
- }
-
- if ($global_involved)
- {
- global $template;
- $template->assign_vars(array(
- 'S_FORUM_SELECT' => make_forum_select(request_var('f', $forum_id), false, false, true, true),
- 'S_CAN_LEAVE_SHADOW' => false,
- 'ADDITIONAL_MSG' => (sizeof($topic_ids) == 1) ? $user->lang['SELECT_FORUM_GLOBAL_ANNOUNCEMENT'] : $user->lang['SELECT_FORUM_GLOBAL_ANNOUNCEMENTS'])
- );
+ meta_refresh(2, $redirect);
+ $message = $user->lang[$success_msg];
- confirm_box(false, $l_new_type, build_hidden_fields($s_hidden_fields), 'mcp_move.html');
- }
- else
+ if (!$request->is_ajax())
{
- confirm_box(false, $l_new_type, build_hidden_fields($s_hidden_fields));
+ $message .= '<br /><br />' . $user->lang('RETURN_PAGE', '<a href="' . $redirect . '">', '</a>');
}
- }
-
- $redirect = request_var('redirect', "index.$phpEx");
- $redirect = reapply_sid($redirect);
-
- if (!$success_msg)
- {
- redirect($redirect);
+ trigger_error($message);
}
else
{
- meta_refresh(2, $redirect);
- trigger_error($user->lang[$success_msg] . '<br /><br />' . sprintf($user->lang['RETURN_PAGE'], '<a href="' . $redirect . '">', '</a>'));
+ confirm_box(false, $l_new_type, build_hidden_fields($s_hidden_fields));
}
+
+ redirect($redirect);
}
/**
@@ -531,6 +417,7 @@ function mcp_move_topic($topic_ids)
{
global $auth, $user, $db, $template;
global $phpEx, $phpbb_root_path;
+ global $request;
// Here we limit the operation to one forum only
$forum_id = check_ids($topic_ids, TOPICS_TABLE, 'topic_id', array('m_move'), true);
@@ -584,8 +471,8 @@ function mcp_move_topic($topic_ids)
if (!$to_forum_id || $additional_msg)
{
- unset($_POST['confirm']);
- unset($_REQUEST['confirm_key']);
+ $request->overwrite('confirm', null, \phpbb\request\request_interface::POST);
+ $request->overwrite('confirm_key', null);
}
if (confirm_box(true))
@@ -598,66 +485,43 @@ function mcp_move_topic($topic_ids)
$forum_sync_data[$forum_id] = current($topic_data);
$forum_sync_data[$to_forum_id] = $forum_data;
- // Real topics added to target forum
- $topics_moved = sizeof($topic_data);
-
- // Approved topics added to target forum
- $topics_authed_moved = 0;
-
- // Posts (topic replies + topic post if approved) added to target forum
- $topic_posts_added = 0;
-
- // Posts (topic replies + topic post if approved and not global announcement) removed from source forum
- $topic_posts_removed = 0;
-
- // Real topics removed from source forum (all topics without global announcements)
- $topics_removed = 0;
-
- // Approved topics removed from source forum (except global announcements)
- $topics_authed_removed = 0;
+ $topics_moved = $topics_moved_unapproved = $topics_moved_softdeleted = 0;
+ $posts_moved = $posts_moved_unapproved = $posts_moved_softdeleted = 0;
foreach ($topic_data as $topic_id => $topic_info)
{
- if ($topic_info['topic_approved'])
+ if ($topic_info['topic_visibility'] == ITEM_APPROVED)
{
- $topics_authed_moved++;
- $topic_posts_added++;
+ $topics_moved++;
}
-
- $topic_posts_added += $topic_info['topic_replies'];
-
- if ($topic_info['topic_type'] != POST_GLOBAL)
+ elseif ($topic_info['topic_visibility'] == ITEM_UNAPPROVED)
{
- $topics_removed++;
- $topic_posts_removed += $topic_info['topic_replies'];
-
- if ($topic_info['topic_approved'])
- {
- $topics_authed_removed++;
- $topic_posts_removed++;
- }
+ $topics_moved_unapproved++;
+ }
+ elseif ($topic_info['topic_visibility'] == ITEM_DELETED)
+ {
+ $topics_moved_softdeleted++;
}
+
+ $posts_moved += $topic_info['topic_posts_approved'];
+ $posts_moved_unapproved += $topic_info['topic_posts_unapproved'];
+ $posts_moved_softdeleted += $topic_info['topic_posts_softdeleted'];
}
$db->sql_transaction('begin');
- $sync_sql = array();
-
- if ($topic_posts_added)
- {
- $sync_sql[$to_forum_id][] = 'forum_posts = forum_posts + ' . $topic_posts_added;
- }
+ // Move topics, but do not resync yet
+ move_topics($topic_ids, $to_forum_id, false);
- if ($topics_authed_moved)
+ if ($request->is_set_post('move_lock_topics') && $auth->acl_get('m_lock', $to_forum_id))
{
- $sync_sql[$to_forum_id][] = 'forum_topics = forum_topics + ' . (int) $topics_authed_moved;
+ $sql = 'UPDATE ' . TOPICS_TABLE . '
+ SET topic_status = ' . ITEM_LOCKED . '
+ WHERE ' . $db->sql_in_set('topic_id', $topic_ids);
+ $db->sql_query($sql);
}
- $sync_sql[$to_forum_id][] = 'forum_topics_real = forum_topics_real + ' . (int) $topics_moved;
-
- // Move topics, but do not resync yet
- move_topics($topic_ids, $to_forum_id, false);
-
+ $shadow_topics = 0;
$forum_ids = array($to_forum_id);
foreach ($topic_data as $topic_id => $row)
{
@@ -665,31 +529,23 @@ function mcp_move_topic($topic_ids)
$forum_ids[] = $row['forum_id'];
add_log('mod', $to_forum_id, $topic_id, 'LOG_MOVE', $row['forum_name'], $forum_data['forum_name']);
- // If we have moved a global announcement, we need to correct the topic type
- if ($row['topic_type'] == POST_GLOBAL)
- {
- $sql = 'UPDATE ' . TOPICS_TABLE . '
- SET topic_type = ' . POST_ANNOUNCE . '
- WHERE topic_id = ' . (int) $row['topic_id'];
- $db->sql_query($sql);
- }
-
// Leave a redirection if required and only if the topic is visible to users
- if ($leave_shadow && $row['topic_approved'] && $row['topic_type'] != POST_GLOBAL)
+ if ($leave_shadow && $row['topic_visibility'] == ITEM_APPROVED && $row['topic_type'] != POST_GLOBAL)
{
$shadow = array(
'forum_id' => (int) $row['forum_id'],
'icon_id' => (int) $row['icon_id'],
'topic_attachment' => (int) $row['topic_attachment'],
- 'topic_approved' => 1, // a shadow topic is always approved
+ 'topic_visibility' => ITEM_APPROVED, // a shadow topic is always approved
'topic_reported' => 0, // a shadow topic is never reported
'topic_title' => (string) $row['topic_title'],
'topic_poster' => (int) $row['topic_poster'],
'topic_time' => (int) $row['topic_time'],
'topic_time_limit' => (int) $row['topic_time_limit'],
'topic_views' => (int) $row['topic_views'],
- 'topic_replies' => (int) $row['topic_replies'],
- 'topic_replies_real' => (int) $row['topic_replies_real'],
+ 'topic_posts_approved' => (int) $row['topic_posts_approved'],
+ 'topic_posts_unapproved'=> (int) $row['topic_posts_unapproved'],
+ 'topic_posts_softdeleted'=> (int) $row['topic_posts_softdeleted'],
'topic_status' => ITEM_MOVED,
'topic_type' => POST_NORMAL,
'topic_first_post_id' => (int) $row['topic_first_post_id'],
@@ -715,25 +571,45 @@ function mcp_move_topic($topic_ids)
$db->sql_query('INSERT INTO ' . TOPICS_TABLE . $db->sql_build_array('INSERT', $shadow));
// Shadow topics only count on new "topics" and not posts... a shadow topic alone has 0 posts
- $topics_removed--;
- $topics_authed_removed--;
+ $shadow_topics++;
}
}
unset($topic_data);
- if ($topic_posts_removed)
+ $sync_sql = array();
+ if ($posts_moved)
{
- $sync_sql[$forum_id][] = 'forum_posts = forum_posts - ' . $topic_posts_removed;
+ $sync_sql[$to_forum_id][] = 'forum_posts_approved = forum_posts_approved + ' . (int) $posts_moved;
+ $sync_sql[$forum_id][] = 'forum_posts_approved = forum_posts_approved - ' . (int) $posts_moved;
}
-
- if ($topics_removed)
+ if ($posts_moved_unapproved)
+ {
+ $sync_sql[$to_forum_id][] = 'forum_posts_unapproved = forum_posts_unapproved + ' . (int) $posts_moved_unapproved;
+ $sync_sql[$forum_id][] = 'forum_posts_unapproved = forum_posts_unapproved - ' . (int) $posts_moved_unapproved;
+ }
+ if ($posts_moved_softdeleted)
{
- $sync_sql[$forum_id][] = 'forum_topics_real = forum_topics_real - ' . (int) $topics_removed;
+ $sync_sql[$to_forum_id][] = 'forum_posts_softdeleted = forum_posts_softdeleted + ' . (int) $posts_moved_softdeleted;
+ $sync_sql[$forum_id][] = 'forum_posts_softdeleted = forum_posts_softdeleted - ' . (int) $posts_moved_softdeleted;
}
- if ($topics_authed_removed)
+ if ($topics_moved)
+ {
+ $sync_sql[$to_forum_id][] = 'forum_topics_approved = forum_topics_approved + ' . (int) $topics_moved;
+ if ($topics_moved - $shadow_topics > 0)
+ {
+ $sync_sql[$forum_id][] = 'forum_topics_approved = forum_topics_approved - ' . (int) ($topics_moved - $shadow_topics);
+ }
+ }
+ if ($topics_moved_unapproved)
+ {
+ $sync_sql[$to_forum_id][] = 'forum_topics_unapproved = forum_topics_unapproved + ' . (int) $topics_moved_unapproved;
+ $sync_sql[$forum_id][] = 'forum_topics_unapproved = forum_topics_unapproved - ' . (int) $topics_moved_unapproved;
+ }
+ if ($topics_moved_softdeleted)
{
- $sync_sql[$forum_id][] = 'forum_topics = forum_topics - ' . (int) $topics_authed_removed;
+ $sync_sql[$to_forum_id][] = 'forum_topics_softdeleted = forum_topics_softdeleted + ' . (int) $topics_moved_softdeleted;
+ $sync_sql[$forum_id][] = 'forum_topics_softdeleted = forum_topics_softdeleted - ' . (int) $topics_moved_softdeleted;
}
$success_msg = (sizeof($topic_ids) == 1) ? 'TOPIC_MOVED_SUCCESS' : 'TOPICS_MOVED_SUCCESS';
@@ -755,6 +631,7 @@ function mcp_move_topic($topic_ids)
$template->assign_vars(array(
'S_FORUM_SELECT' => make_forum_select($to_forum_id, $forum_id, false, true, true, true),
'S_CAN_LEAVE_SHADOW' => true,
+ 'S_CAN_LOCK_TOPIC' => ($auth->acl_get('m_lock', $to_forum_id)) ? true : false,
'ADDITIONAL_MSG' => $additional_msg)
);
@@ -782,25 +659,98 @@ function mcp_move_topic($topic_ids)
}
/**
+* Restore Topics
+*/
+function mcp_restore_topic($topic_ids)
+{
+ global $auth, $user, $db, $phpEx, $phpbb_root_path, $request, $phpbb_container;
+
+ if (!check_ids($topic_ids, TOPICS_TABLE, 'topic_id', array('m_approve')))
+ {
+ return;
+ }
+
+ $redirect = $request->variable('redirect', build_url(array('action', 'quickmod')));
+ $forum_id = $request->variable('f', 0);
+
+ $s_hidden_fields = build_hidden_fields(array(
+ 'topic_id_list' => $topic_ids,
+ 'f' => $forum_id,
+ 'action' => 'restore_topic',
+ 'redirect' => $redirect,
+ ));
+ $success_msg = '';
+
+ if (confirm_box(true))
+ {
+ $success_msg = (sizeof($topic_ids) == 1) ? 'TOPIC_RESTORED_SUCCESS' : 'TOPICS_RESTORED_SUCCESS';
+
+ $data = get_topic_data($topic_ids);
+
+ $phpbb_content_visibility = $phpbb_container->get('content.visibility');
+ foreach ($data as $topic_id => $row)
+ {
+ $return = $phpbb_content_visibility->set_topic_visibility(ITEM_APPROVED, $topic_id, $row['forum_id'], $user->data['user_id'], time(), '');
+ if (!empty($return))
+ {
+ add_log('mod', $row['forum_id'], $topic_id, 'LOG_RESTORE_TOPIC', $row['topic_title'], $row['topic_first_poster_name']);
+ }
+ }
+ }
+ else
+ {
+ confirm_box(false, (sizeof($topic_ids) == 1) ? 'RESTORE_TOPIC' : 'RESTORE_TOPICS', $s_hidden_fields);
+ }
+
+ $topic_id = $request->variable('t', 0);
+ if (!$request->is_set('quickmod', \phpbb\request\request_interface::REQUEST))
+ {
+ $redirect = $request->variable('redirect', "index.$phpEx");
+ $redirect = reapply_sid($redirect);
+ $redirect_message = 'PAGE';
+ }
+ else if ($topic_id)
+ {
+ $redirect = append_sid("{$phpbb_root_path}viewtopic.$phpEx", 't=' . $topic_id);
+ $redirect_message = 'TOPIC';
+ }
+ else
+ {
+ $redirect = append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $forum_id);
+ $redirect_message = 'FORUM';
+ }
+
+ if (!$success_msg)
+ {
+ redirect($redirect);
+ }
+ else
+ {
+ meta_refresh(3, $redirect);
+ trigger_error($user->lang[$success_msg] . '<br /><br />' . sprintf($user->lang['RETURN_' . $redirect_message], '<a href="' . $redirect . '">', '</a>'));
+ }
+}
+
+/**
* Delete Topics
*/
-function mcp_delete_topic($topic_ids)
+function mcp_delete_topic($topic_ids, $is_soft = false, $soft_delete_reason = '', $action = 'delete_topic')
{
- global $auth, $user, $db, $phpEx, $phpbb_root_path;
+ global $auth, $user, $db, $phpEx, $phpbb_root_path, $request, $phpbb_container;
if (!check_ids($topic_ids, TOPICS_TABLE, 'topic_id', array('m_delete')))
{
return;
}
- $redirect = request_var('redirect', build_url(array('action', 'quickmod')));
- $forum_id = request_var('f', 0);
+ $redirect = $request->variable('redirect', build_url(array('action', 'quickmod')));
+ $forum_id = $request->variable('f', 0);
- $s_hidden_fields = build_hidden_fields(array(
+ $s_hidden_fields = array(
'topic_id_list' => $topic_ids,
'f' => $forum_id,
- 'action' => 'delete_topic',
- 'redirect' => $redirect)
+ 'action' => $action,
+ 'redirect' => $redirect,
);
$success_msg = '';
@@ -818,23 +768,81 @@ function mcp_delete_topic($topic_ids)
}
else
{
- add_log('mod', $row['forum_id'], $topic_id, 'LOG_DELETE_TOPIC', $row['topic_title'], $row['topic_first_poster_name']);
+ // Only soft delete non-shadow topics
+ if ($is_soft)
+ {
+ $phpbb_content_visibility = $phpbb_container->get('content.visibility');
+ $return = $phpbb_content_visibility->set_topic_visibility(ITEM_DELETED, $topic_id, $row['forum_id'], $user->data['user_id'], time(), $soft_delete_reason);
+ if (!empty($return))
+ {
+ add_log('mod', $row['forum_id'], $topic_id, 'LOG_SOFTDELETE_TOPIC', $row['topic_title'], $row['topic_first_poster_name']);
+ }
+ }
+ else
+ {
+ add_log('mod', $row['forum_id'], $topic_id, 'LOG_DELETE_TOPIC', $row['topic_title'], $row['topic_first_poster_name']);
+ }
}
}
- $return = delete_topics('topic_id', $topic_ids);
+ if (!$is_soft)
+ {
+ $return = delete_topics('topic_id', $topic_ids);
+ }
}
else
{
- confirm_box(false, (sizeof($topic_ids) == 1) ? 'DELETE_TOPIC' : 'DELETE_TOPICS', $s_hidden_fields);
+ global $template;
+
+ $user->add_lang('posting');
+
+ $only_softdeleted = false;
+ if ($auth->acl_get('m_delete', $forum_id) && $auth->acl_get('m_softdelete', $forum_id))
+ {
+ // If there are only soft deleted topics, we display a message why the option is not available
+ $sql = 'SELECT topic_id
+ FROM ' . TOPICS_TABLE . '
+ WHERE ' . $db->sql_in_set('topic_id', $topic_ids) . '
+ AND topic_visibility <> ' . ITEM_DELETED;
+ $result = $db->sql_query_limit($sql, 1);
+ $only_softdeleted = !$db->sql_fetchfield('topic_id');
+ $db->sql_freeresult($result);
+ }
+
+ $template->assign_vars(array(
+ 'S_SOFTDELETED' => $only_softdeleted,
+ 'S_TOPIC_MODE' => true,
+ 'S_ALLOWED_DELETE' => $auth->acl_get('m_delete', $forum_id),
+ 'S_ALLOWED_SOFTDELETE' => $auth->acl_get('m_softdelete', $forum_id),
+ 'S_DELETE_REASON' => $auth->acl_get('m_softdelete', $forum_id),
+ ));
+
+ $l_confirm = (sizeof($topic_ids) == 1) ? 'DELETE_TOPIC' : 'DELETE_TOPICS';
+ if ($only_softdeleted)
+ {
+ $l_confirm .= '_PERMANENTLY';
+ $s_hidden_fields['delete_permanent'] = '1';
+ }
+ else if (!$auth->acl_get('m_softdelete', $forum_id))
+ {
+ $s_hidden_fields['delete_permanent'] = '1';
+ }
+
+ confirm_box(false, $l_confirm, build_hidden_fields($s_hidden_fields), 'confirm_delete_body.html');
}
- if (!isset($_REQUEST['quickmod']))
+ $topic_id = $request->variable('t', 0);
+ if (!$request->is_set('quickmod', \phpbb\request\request_interface::REQUEST))
{
- $redirect = request_var('redirect', "index.$phpEx");
+ $redirect = $request->variable('redirect', "index.$phpEx");
$redirect = reapply_sid($redirect);
$redirect_message = 'PAGE';
}
+ else if ($is_soft && $topic_id)
+ {
+ $redirect = append_sid("{$phpbb_root_path}viewtopic.$phpEx", 't=' . $topic_id);
+ $redirect_message = 'TOPIC';
+ }
else
{
$redirect = append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $forum_id);
@@ -855,27 +863,93 @@ function mcp_delete_topic($topic_ids)
/**
* Delete Posts
*/
-function mcp_delete_post($post_ids)
+function mcp_delete_post($post_ids, $is_soft = false, $soft_delete_reason = '', $action = 'delete_post')
{
- global $auth, $user, $db, $phpEx, $phpbb_root_path;
+ global $auth, $user, $db, $phpEx, $phpbb_root_path, $request, $phpbb_container;
- if (!check_ids($post_ids, POSTS_TABLE, 'post_id', array('m_delete')))
+ if (!check_ids($post_ids, POSTS_TABLE, 'post_id', array('m_softdelete')))
{
return;
}
- $redirect = request_var('redirect', build_url(array('action', 'quickmod')));
- $forum_id = request_var('f', 0);
+ $redirect = $request->variable('redirect', build_url(array('action', 'quickmod')));
+ $forum_id = $request->variable('f', 0);
- $s_hidden_fields = build_hidden_fields(array(
+ $s_hidden_fields = array(
'post_id_list' => $post_ids,
'f' => $forum_id,
- 'action' => 'delete_post',
- 'redirect' => $redirect)
+ 'action' => $action,
+ 'redirect' => $redirect,
);
$success_msg = '';
- if (confirm_box(true))
+ if (confirm_box(true) && $is_soft)
+ {
+ $post_info = get_post_data($post_ids);
+
+ $topic_info = $approve_log = array();
+
+ // Group the posts by topic_id
+ foreach ($post_info as $post_id => $post_data)
+ {
+ if ($post_data['post_visibility'] != ITEM_APPROVED)
+ {
+ continue;
+ }
+ $topic_id = (int) $post_data['topic_id'];
+
+ $topic_info[$topic_id]['posts'][] = (int) $post_id;
+ $topic_info[$topic_id]['forum_id'] = (int) $post_data['forum_id'];
+
+ if ($post_id == $post_data['topic_first_post_id'])
+ {
+ $topic_info[$topic_id]['first_post'] = true;
+ }
+
+ if ($post_id == $post_data['topic_last_post_id'])
+ {
+ $topic_info[$topic_id]['last_post'] = true;
+ }
+
+ $approve_log[] = array(
+ 'forum_id' => $post_data['forum_id'],
+ 'topic_id' => $post_data['topic_id'],
+ 'post_subject' => $post_data['post_subject'],
+ 'poster_id' => $post_data['poster_id'],
+ 'post_username' => $post_data['post_username'],
+ 'username' => $post_data['username'],
+ );
+ }
+
+ $phpbb_content_visibility = $phpbb_container->get('content.visibility');
+ foreach ($topic_info as $topic_id => $topic_data)
+ {
+ $phpbb_content_visibility->set_post_visibility(ITEM_DELETED, $topic_data['posts'], $topic_id, $topic_data['forum_id'], $user->data['user_id'], time(), $soft_delete_reason, isset($topic_data['first_post']), isset($topic_data['last_post']));
+ }
+ $affected_topics = sizeof($topic_info);
+ // None of the topics is really deleted, so a redirect won't hurt much.
+ $deleted_topics = 0;
+
+ $success_msg = (sizeof($post_info) == 1) ? $user->lang['POST_DELETED_SUCCESS'] : $user->lang['POSTS_DELETED_SUCCESS'];
+
+ foreach ($approve_log as $row)
+ {
+ $post_username = ($row['poster_id'] == ANONYMOUS && !empty($row['post_username'])) ? $row['post_username'] : $row['username'];
+ add_log('mod', $row['forum_id'], $row['topic_id'], 'LOG_SOFTDELETE_POST', $row['post_subject'], $post_username);
+ }
+
+ $topic_id = $request->variable('t', 0);
+
+ // Return links
+ $return_link = array();
+ if ($affected_topics == 1 && $topic_id)
+ {
+ $return_link[] = sprintf($user->lang['RETURN_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&amp;t=$topic_id") . '">', '</a>');
+ }
+ $return_link[] = sprintf($user->lang['RETURN_FORUM'], '<a href="' . append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $forum_id) . '">', '</a>');
+
+ }
+ else if (confirm_box(true))
{
if (!function_exists('delete_posts'))
{
@@ -918,7 +992,7 @@ function mcp_delete_post($post_ids)
$deleted_topics = ($row = $db->sql_fetchrow($result)) ? ($affected_topics - $row['topics_left']) : $affected_topics;
$db->sql_freeresult($result);
- $topic_id = request_var('t', 0);
+ $topic_id = $request->variable('t', 0);
// Return links
$return_link = array();
@@ -956,10 +1030,45 @@ function mcp_delete_post($post_ids)
}
else
{
- confirm_box(false, (sizeof($post_ids) == 1) ? 'DELETE_POST' : 'DELETE_POSTS', $s_hidden_fields);
+ global $template;
+
+ $user->add_lang('posting');
+
+ $only_softdeleted = false;
+ if ($auth->acl_get('m_delete', $forum_id) && $auth->acl_get('m_softdelete', $forum_id))
+ {
+ // If there are only soft deleted posts, we display a message why the option is not available
+ $sql = 'SELECT post_id
+ FROM ' . POSTS_TABLE . '
+ WHERE ' . $db->sql_in_set('post_id', $post_ids) . '
+ AND post_visibility <> ' . ITEM_DELETED;
+ $result = $db->sql_query_limit($sql, 1);
+ $only_softdeleted = !$db->sql_fetchfield('post_id');
+ $db->sql_freeresult($result);
+ }
+
+ $template->assign_vars(array(
+ 'S_SOFTDELETED' => $only_softdeleted,
+ 'S_ALLOWED_DELETE' => $auth->acl_get('m_delete', $forum_id),
+ 'S_ALLOWED_SOFTDELETE' => $auth->acl_get('m_softdelete', $forum_id),
+ 'S_DELETE_REASON' => $auth->acl_get('m_softdelete', $forum_id),
+ ));
+
+ $l_confirm = (sizeof($post_ids) == 1) ? 'DELETE_POST' : 'DELETE_POSTS';
+ if ($only_softdeleted)
+ {
+ $l_confirm .= '_PERMANENTLY';
+ $s_hidden_fields['delete_permanent'] = '1';
+ }
+ else if (!$auth->acl_get('m_softdelete', $forum_id))
+ {
+ $s_hidden_fields['delete_permanent'] = '1';
+ }
+
+ confirm_box(false, $l_confirm, build_hidden_fields($s_hidden_fields), 'confirm_delete_body.html');
}
- $redirect = request_var('redirect', "index.$phpEx");
+ $redirect = $request->variable('redirect', "index.$phpEx");
$redirect = reapply_sid($redirect);
if (!$success_msg)
@@ -1036,37 +1145,32 @@ function mcp_fork_topic($topic_ids)
if ($additional_msg)
{
- unset($_POST['confirm']);
- unset($_REQUEST['confirm_key']);
+ $request->overwrite('confirm', null, \phpbb\request\request_interface::POST);
+ $request->overwrite('confirm_key', null);
}
if (confirm_box(true))
{
$topic_data = get_topic_data($topic_ids, 'f_post');
- $total_posts = 0;
+ $total_topics = $total_topics_unapproved = $total_topics_softdeleted = 0;
+ $total_posts = $total_posts_unapproved = $total_posts_softdeleted = 0;
$new_topic_id_list = array();
-
foreach ($topic_data as $topic_id => $topic_row)
{
if (!isset($search_type) && $topic_row['enable_indexing'])
{
// Select the search method and do some additional checks to ensure it can actually be utilised
- $search_type = basename($config['search_type']);
-
- if (!file_exists($phpbb_root_path . 'includes/search/' . $search_type . '.' . $phpEx))
- {
- trigger_error('NO_SUCH_SEARCH_MODULE');
- }
+ $search_type = $config['search_type'];
if (!class_exists($search_type))
{
- include("{$phpbb_root_path}includes/search/$search_type.$phpEx");
+ trigger_error('NO_SUCH_SEARCH_MODULE');
}
$error = false;
- $search = new $search_type($error);
+ $search = new $search_type($error, $phpbb_root_path, $phpEx, $auth, $config, $db, $user);
$search_mode = 'post';
if ($error)
@@ -1083,13 +1187,14 @@ function mcp_fork_topic($topic_ids)
'forum_id' => (int) $to_forum_id,
'icon_id' => (int) $topic_row['icon_id'],
'topic_attachment' => (int) $topic_row['topic_attachment'],
- 'topic_approved' => 1,
+ 'topic_visibility' => (int) $topic_row['topic_visibility'],
'topic_reported' => 0,
'topic_title' => (string) $topic_row['topic_title'],
'topic_poster' => (int) $topic_row['topic_poster'],
'topic_time' => (int) $topic_row['topic_time'],
- 'topic_replies' => (int) $topic_row['topic_replies_real'],
- 'topic_replies_real' => (int) $topic_row['topic_replies_real'],
+ 'topic_posts_approved' => (int) $topic_row['topic_posts_approved'],
+ 'topic_posts_unapproved' => (int) $topic_row['topic_posts_unapproved'],
+ 'topic_posts_softdeleted' => (int) $topic_row['topic_posts_softdeleted'],
'topic_status' => (int) $topic_row['topic_status'],
'topic_type' => (int) $topic_row['topic_type'],
'topic_first_poster_name' => (string) $topic_row['topic_first_poster_name'],
@@ -1110,6 +1215,19 @@ function mcp_fork_topic($topic_ids)
$new_topic_id = $db->sql_nextid();
$new_topic_id_list[$topic_id] = $new_topic_id;
+ switch ($topic_row['topic_visibility'])
+ {
+ case ITEM_APPROVED:
+ $total_topics++;
+ break;
+ case ITEM_UNAPPROVED:
+ $total_topics_unapproved++;
+ break;
+ case ITEM_DELETED:
+ $total_topics_softdeleted++;
+ break;
+ }
+
if ($topic_row['poll_start'])
{
$poll_rows = array();
@@ -1150,7 +1268,6 @@ function mcp_fork_topic($topic_ids)
continue;
}
- $total_posts += sizeof($post_rows);
foreach ($post_rows as $row)
{
$sql_ary = array(
@@ -1160,7 +1277,7 @@ function mcp_fork_topic($topic_ids)
'icon_id' => (int) $row['icon_id'],
'poster_ip' => (string) $row['poster_ip'],
'post_time' => (int) $row['post_time'],
- 'post_approved' => 1,
+ 'post_visibility' => (int) $row['post_visibility'],
'post_reported' => 0,
'enable_bbcode' => (int) $row['enable_bbcode'],
'enable_smilies' => (int) $row['enable_smilies'],
@@ -1184,6 +1301,19 @@ function mcp_fork_topic($topic_ids)
$db->sql_query('INSERT INTO ' . POSTS_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary));
$new_post_id = $db->sql_nextid();
+ switch ($row['post_visibility'])
+ {
+ case ITEM_APPROVED:
+ $total_posts++;
+ break;
+ case ITEM_UNAPPROVED:
+ $total_posts_unapproved++;
+ break;
+ case ITEM_DELETED:
+ $total_posts_softdeleted++;
+ break;
+ }
+
// Copy whether the topic is dotted
markread('post', $to_forum_id, $new_topic_id, 0, $row['poster_id']);
@@ -1276,23 +1406,19 @@ function mcp_fork_topic($topic_ids)
}
// Sync new topics, parent forums and board stats
- sync('topic', 'topic_id', $new_topic_id_list);
-
- $sync_sql = array();
-
- $sync_sql[$to_forum_id][] = 'forum_posts = forum_posts + ' . $total_posts;
- $sync_sql[$to_forum_id][] = 'forum_topics = forum_topics + ' . sizeof($new_topic_id_list);
- $sync_sql[$to_forum_id][] = 'forum_topics_real = forum_topics_real + ' . sizeof($new_topic_id_list);
-
- foreach ($sync_sql as $forum_id_key => $array)
- {
- $sql = 'UPDATE ' . FORUMS_TABLE . '
- SET ' . implode(', ', $array) . '
- WHERE forum_id = ' . $forum_id_key;
- $db->sql_query($sql);
- }
+ $sql = 'UPDATE ' . FORUMS_TABLE . '
+ SET forum_posts_approved = forum_posts_approved + ' . $total_posts . ',
+ forum_posts_unapproved = forum_posts_unapproved + ' . $total_posts_unapproved . ',
+ forum_posts_softdeleted = forum_posts_softdeleted + ' . $total_posts_softdeleted . ',
+ forum_topics_approved = forum_topics_approved + ' . $total_topics . ',
+ forum_topics_unapproved = forum_topics_unapproved + ' . $total_topics_unapproved . ',
+ forum_topics_softdeleted = forum_topics_softdeleted + ' . $total_topics_softdeleted . '
+ WHERE forum_id = ' . $to_forum_id;
+ $db->sql_query($sql);
+ sync('topic', 'topic_id', $new_topic_id_list);
sync('forum', 'forum_id', $to_forum_id);
+
set_config_count('num_topics', sizeof($new_topic_id_list), true);
set_config_count('num_posts', $total_posts, true);
@@ -1335,5 +1461,3 @@ function mcp_fork_topic($topic_ids)
trigger_error($user->lang[$success_msg] . '<br /><br />' . $return_link);
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/mcp/mcp_notes.php b/phpBB/includes/mcp/mcp_notes.php
index 02a89c0251..28de8724be 100644
--- a/phpBB/includes/mcp/mcp_notes.php
+++ b/phpBB/includes/mcp/mcp_notes.php
@@ -2,9 +2,8 @@
/**
*
* @package mcp
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -73,7 +72,7 @@ class mcp_notes
function mcp_notes_user_view($action)
{
global $phpEx, $phpbb_root_path, $config;
- global $template, $db, $user, $auth;
+ global $template, $db, $user, $auth, $phpbb_container;
$user_id = request_var('u', 0);
$username = request_var('username', '', true);
@@ -81,6 +80,7 @@ class mcp_notes
$st = request_var('st', 0);
$sk = request_var('sk', 'b');
$sd = request_var('sd', 'd');
+ $pagination = $phpbb_container->get('pagination');
add_form_key('mcp_notes');
@@ -174,13 +174,13 @@ class mcp_notes
}
// Generate the appropriate user information for the user we are looking at
- if (!function_exists('get_user_avatar'))
+ if (!function_exists('phpbb_get_user_avatar'))
{
include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
}
$rank_title = $rank_img = '';
- $avatar_img = get_user_avatar($userrow['user_avatar'], $userrow['user_avatar_type'], $userrow['user_avatar_width'], $userrow['user_avatar_height']);
+ $avatar_img = phpbb_get_user_avatar($userrow);
$limit_days = array(0 => $user->lang['ALL_ENTRIES'], 1 => $user->lang['1_DAY'], 7 => $user->lang['7_DAYS'], 14 => $user->lang['2_WEEKS'], 30 => $user->lang['1_MONTH'], 90 => $user->lang['3_MONTHS'], 180 => $user->lang['6_MONTHS'], 365 => $user->lang['1_YEAR']);
$sort_by_text = array('a' => $user->lang['SORT_USERNAME'], 'b' => $user->lang['SORT_DATE'], 'c' => $user->lang['SORT_IP'], 'd' => $user->lang['SORT_ACTION']);
@@ -216,6 +216,9 @@ class mcp_notes
}
}
+ $base_url = $this->u_action . "&amp;$u_sort_param$keywords_param";
+ $pagination->generate_template_pagination($base_url, 'pagination', 'start', $log_count, $config['topics_per_page'], $start);
+
$template->assign_vars(array(
'U_POST_ACTION' => $this->u_action,
'S_CLEAR_ALLOWED' => ($auth->acl_get('a_clearlogs')) ? true : false,
@@ -226,9 +229,7 @@ class mcp_notes
'L_TITLE' => $user->lang['MCP_NOTES_USER'],
- 'PAGE_NUMBER' => on_page($log_count, $config['topics_per_page'], $start),
- 'PAGINATION' => generate_pagination($this->u_action . "&amp;$u_sort_param$keywords_param", $log_count, $config['topics_per_page'], $start),
- 'TOTAL_REPORTS' => ($log_count == 1) ? $user->lang['LIST_REPORT'] : sprintf($user->lang['LIST_REPORTS'], $log_count),
+ 'TOTAL_REPORTS' => $user->lang('LIST_REPORTS', (int) $log_count),
'RANK_TITLE' => $rank_title,
'JOINED' => $user->format_date($userrow['user_regdate']),
@@ -247,5 +248,3 @@ class mcp_notes
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/mcp/mcp_pm_reports.php b/phpBB/includes/mcp/mcp_pm_reports.php
index 0a33c80a90..008984b1c3 100644
--- a/phpBB/includes/mcp/mcp_pm_reports.php
+++ b/phpBB/includes/mcp/mcp_pm_reports.php
@@ -2,9 +2,8 @@
/**
*
* @package mcp
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -34,12 +33,13 @@ class mcp_pm_reports
function main($id, $mode)
{
global $auth, $db, $user, $template, $cache;
- global $config, $phpbb_root_path, $phpEx, $action;
+ global $config, $phpbb_root_path, $phpEx, $action, $phpbb_container;
include_once($phpbb_root_path . 'includes/functions_posting.' . $phpEx);
include_once($phpbb_root_path . 'includes/functions_privmsgs.' . $phpEx);
$start = request_var('start', 0);
+ $pagination = $phpbb_container->get('pagination');
$this->page_title = 'MCP_PM_REPORTS';
@@ -90,6 +90,10 @@ class mcp_pm_reports
trigger_error('NO_REPORT');
}
+ $phpbb_notifications = $phpbb_container->get('notification_manager');
+
+ $phpbb_notifications->mark_notifications_read_by_parent('report_pm', $report_id, $user->data['user_id']);
+
$pm_id = $report['pm_id'];
$report_id = $report['report_id'];
@@ -112,17 +116,9 @@ class mcp_pm_reports
}
// Process message, leave it uncensored
- $message = $pm_info['message_text'];
+ $parse_flags = ($pm_info['bbcode_bitfield'] ? OPTION_FLAG_BBCODE : 0) | OPTION_FLAG_SMILIES;
+ $message = generate_text_for_display($pm_info['message_text'], $pm_info['bbcode_uid'], $pm_info['bbcode_bitfield'], $parse_flags, false);
- if ($pm_info['bbcode_bitfield'])
- {
- include_once($phpbb_root_path . 'includes/bbcode.' . $phpEx);
- $bbcode = new bbcode($pm_info['bbcode_bitfield']);
- $bbcode->bbcode_second_pass($message, $pm_info['bbcode_uid'], $pm_info['bbcode_bitfield']);
- }
-
- $message = bbcode_nl2br($message);
- $message = smiley_text($message);
$report['report_text'] = make_clickable(bbcode_nl2br($report['report_text']));
if ($pm_info['message_attachment'] && $auth->acl_get('u_pm_download'))
@@ -294,12 +290,16 @@ class mcp_pm_reports
'REPORT_ID' => $row['report_id'],
'REPORT_TIME' => $user->format_date($row['report_time']),
- 'RECIPIENTS' => implode(', ', $address_list[$row['msg_id']]),
+ 'RECIPIENTS' => implode($user->lang['COMMA_SEPARATOR'], $address_list[$row['msg_id']]),
+ 'ATTACH_ICON_IMG' => ($auth->acl_get('u_download') && $row['message_attachment']) ? $user->img('icon_topic_attach', $user->lang['TOTAL_ATTACHMENTS']) : '',
));
}
}
}
+ $base_url = $this->u_action . "&amp;st=$sort_days&amp;sk=$sort_key&amp;sd=$sort_dir";
+ $pagination->generate_template_pagination($base_url, 'pagination', 'start', $total, $config['topics_per_page'], $start);
+
// Now display the page
$template->assign_vars(array(
'L_EXPLAIN' => ($mode == 'pm_reports') ? $user->lang['MCP_PM_REPORTS_OPEN_EXPLAIN'] : $user->lang['MCP_PM_REPORTS_CLOSED_EXPLAIN'],
@@ -309,10 +309,8 @@ class mcp_pm_reports
'S_MCP_ACTION' => $this->u_action,
'S_CLOSED' => ($mode == 'pm_reports_closed') ? true : false,
- 'PAGINATION' => generate_pagination($this->u_action . "&amp;st=$sort_days&amp;sk=$sort_key&amp;sd=$sort_dir", $total, $config['topics_per_page'], $start),
- 'PAGE_NUMBER' => on_page($total, $config['topics_per_page'], $start),
'TOTAL' => $total,
- 'TOTAL_REPORTS' => ($total == 1) ? $user->lang['LIST_REPORT'] : sprintf($user->lang['LIST_REPORTS'], $total),
+ 'TOTAL_REPORTS' => $user->lang('LIST_REPORTS', (int) $total),
)
);
@@ -321,5 +319,3 @@ class mcp_pm_reports
}
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/mcp/mcp_post.php b/phpBB/includes/mcp/mcp_post.php
index ba45037a18..06f27655ae 100644
--- a/phpBB/includes/mcp/mcp_post.php
+++ b/phpBB/includes/mcp/mcp_post.php
@@ -2,9 +2,8 @@
/**
*
* @package mcp
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -126,17 +125,8 @@ function mcp_post_details($id, $mode, $action)
$post_unread = (isset($topic_tracking_info[$post_info['topic_id']]) && $post_info['post_time'] > $topic_tracking_info[$post_info['topic_id']]) ? true : false;
// Process message, leave it uncensored
- $message = $post_info['post_text'];
-
- if ($post_info['bbcode_bitfield'])
- {
- include_once($phpbb_root_path . 'includes/bbcode.' . $phpEx);
- $bbcode = new bbcode($post_info['bbcode_bitfield']);
- $bbcode->bbcode_second_pass($message, $post_info['bbcode_uid'], $post_info['bbcode_bitfield']);
- }
-
- $message = bbcode_nl2br($message);
- $message = smiley_text($message);
+ $parse_flags = ($post_info['bbcode_bitfield'] ? OPTION_FLAG_BBCODE : 0) | OPTION_FLAG_SMILIES;
+ $message = generate_text_for_display($post_info['post_text'], $post_info['bbcode_uid'], $post_info['bbcode_bitfield'], $parse_flags, false);
if ($post_info['post_attachment'] && $auth->acl_get('u_download') && $auth->acl_get('f_download', $post_info['forum_id']))
{
@@ -175,6 +165,33 @@ function mcp_post_details($id, $mode, $action)
}
}
+ // Deleting information
+ if ($post_info['post_visibility'] == ITEM_DELETED && $post_info['post_delete_user'])
+ {
+ // User having deleted the post also being the post author?
+ if (!$post_info['post_delete_user'] || $post_info['post_delete_user'] == $post_info['poster_id'])
+ {
+ $display_username = get_username_string('full', $post_info['poster_id'], $post_info['username'], $post_info['user_colour'], $post_info['post_username']);
+ }
+ else
+ {
+ $sql = 'SELECT user_id, username, user_colour
+ FROM ' . USERS_TABLE . '
+ WHERE user_id = ' . (int) $post_info['post_delete_user'];
+ $result = $db->sql_query($sql);
+ $user_delete_row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+ $display_username = get_username_string('full', $post_info['post_delete_user'], $user_delete_row['username'], $user_delete_row['user_colour']);
+ }
+
+ $user->add_lang('viewtopic');
+ $l_deleted_by = $user->lang('DELETED_INFORMATION', $display_username, $user->format_date($post_info['post_delete_time'], false, true));
+ }
+ else
+ {
+ $l_deleted_by = '';
+ }
+
$template->assign_vars(array(
'U_MCP_ACTION' => "$url&amp;i=main&amp;quickmod=1&amp;mode=post_details", // Use this for mode paramaters
'U_POST_ACTION' => "$url&amp;i=$id&amp;mode=post_details", // Use this for action parameters
@@ -186,10 +203,13 @@ function mcp_post_details($id, $mode, $action)
'S_CAN_DELETE_POST' => $auth->acl_get('m_delete', $post_info['forum_id']),
'S_POST_REPORTED' => ($post_info['post_reported']) ? true : false,
- 'S_POST_UNAPPROVED' => (!$post_info['post_approved']) ? true : false,
+ 'S_POST_UNAPPROVED' => ($post_info['post_visibility'] == ITEM_UNAPPROVED) ? true : false,
+ 'S_POST_DELETED' => ($post_info['post_visibility'] == ITEM_DELETED) ? true : false,
'S_POST_LOCKED' => ($post_info['post_edit_locked']) ? true : false,
'S_USER_NOTES' => true,
'S_CLEAR_ALLOWED' => ($auth->acl_get('a_clearlogs')) ? true : false,
+ 'DELETED_MESSAGE' => $l_deleted_by,
+ 'DELETE_REASON' => $post_info['post_delete_reason'],
'U_EDIT' => ($auth->acl_get('m_edit', $post_info['forum_id'])) ? append_sid("{$phpbb_root_path}posting.$phpEx", "mode=edit&amp;f={$post_info['forum_id']}&amp;p={$post_info['post_id']}") : '',
'U_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&amp;form=mcp_chgposter&amp;field=username&amp;select_single=true'),
@@ -206,6 +226,7 @@ function mcp_post_details($id, $mode, $action)
'RETURN_FORUM' => sprintf($user->lang['RETURN_FORUM'], '<a href="' . append_sid("{$phpbb_root_path}viewforum.$phpEx", "f={$post_info['forum_id']}&amp;start={$start}") . '">', '</a>'),
'REPORTED_IMG' => $user->img('icon_topic_reported', $user->lang['POST_REPORTED']),
'UNAPPROVED_IMG' => $user->img('icon_topic_unapproved', $user->lang['POST_UNAPPROVED']),
+ 'DELETED_IMG' => $user->img('icon_topic_deleted', $user->lang['POST_DELETED']),
'EDIT_IMG' => $user->img('icon_post_edit', $user->lang['EDIT_POST']),
'SEARCH_IMG' => $user->img('icon_user_search', $user->lang['SEARCH']),
@@ -394,7 +415,7 @@ function mcp_post_details($id, $mode, $action)
*/
function change_poster(&$post_info, $userdata)
{
- global $auth, $db, $config, $phpbb_root_path, $phpEx;
+ global $auth, $db, $config, $phpbb_root_path, $phpEx, $user;
if (empty($userdata) || $userdata['user_id'] == $post_info['user_id'])
{
@@ -416,7 +437,7 @@ function change_poster(&$post_info, $userdata)
}
// Adjust post counts... only if the post is approved (else, it was not added the users post count anyway)
- if ($post_info['post_postcount'] && $post_info['post_approved'])
+ if ($post_info['post_postcount'] && $post_info['post_visibility'] == ITEM_APPROVED)
{
$sql = 'UPDATE ' . USERS_TABLE . '
SET user_posts = user_posts - 1
@@ -465,15 +486,13 @@ function change_poster(&$post_info, $userdata)
}
// refresh search cache of this post
- $search_type = basename($config['search_type']);
+ $search_type = $config['search_type'];
- if (file_exists($phpbb_root_path . 'includes/search/' . $search_type . '.' . $phpEx))
+ if (class_exists($search_type))
{
- require("{$phpbb_root_path}includes/search/$search_type.$phpEx");
-
// We do some additional checks in the module to ensure it can actually be utilised
$error = false;
- $search = new $search_type($error);
+ $search = new $search_type($error, $phpbb_root_path, $phpEx, $auth, $config, $db, $user);
if (!$error && method_exists($search, 'destroy_cache'))
{
@@ -497,5 +516,3 @@ function change_poster(&$post_info, $userdata)
// Now add log entry
add_log('mod', $post_info['forum_id'], $post_info['topic_id'], 'LOG_MCP_CHANGE_POSTER', $post_info['topic_title'], $from_username, $to_username);
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/mcp/mcp_queue.php b/phpBB/includes/mcp/mcp_queue.php
index acf344fd3c..a46c4bd499 100644
--- a/phpBB/includes/mcp/mcp_queue.php
+++ b/phpBB/includes/mcp/mcp_queue.php
@@ -2,9 +2,8 @@
/**
*
* @package mcp
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -26,15 +25,15 @@ class mcp_queue
var $p_master;
var $u_action;
- function mcp_queue(&$p_master)
+ public function mcp_queue(&$p_master)
{
$this->p_master = &$p_master;
}
- function main($id, $mode)
+ public function main($id, $mode)
{
- global $auth, $db, $user, $template, $cache;
- global $config, $phpbb_root_path, $phpEx, $action;
+ global $auth, $db, $user, $template, $cache, $request;
+ global $config, $phpbb_root_path, $phpEx, $action, $phpbb_container;
include_once($phpbb_root_path . 'includes/functions_posting.' . $phpEx);
@@ -46,25 +45,99 @@ class mcp_queue
switch ($action)
{
case 'approve':
- case 'disapprove':
+ case 'restore':
include_once($phpbb_root_path . 'includes/functions_messenger.' . $phpEx);
- $post_id_list = request_var('post_id_list', array(0));
+ $post_id_list = $request->variable('post_id_list', array(0));
+ $topic_id_list = $request->variable('topic_id_list', array(0));
- if (!sizeof($post_id_list))
+ if (!empty($post_id_list))
+ {
+ self::approve_posts($action, $post_id_list, 'queue', $mode);
+ }
+ else if (!empty($topic_id_list))
+ {
+ self::approve_topics($action, $topic_id_list, 'queue', $mode);
+ }
+ else
{
trigger_error('NO_POST_SELECTED');
}
+ break;
+
+ case 'delete':
+ $post_id_list = $request->variable('post_id_list', array(0));
+ $topic_id_list = $request->variable('topic_id_list', array(0));
- if ($action == 'approve')
+ if (!empty($post_id_list))
+ {
+ if (!function_exists('mcp_delete_post'))
+ {
+ global $phpbb_root_path, $phpEx;
+ include($phpbb_root_path . 'includes/mcp/mcp_main.' . $phpEx);
+ }
+ mcp_delete_post($post_id_list, false, '', $action);
+ }
+ else if (!empty($topic_id_list))
{
- approve_post($post_id_list, 'queue', $mode);
+ if (!function_exists('mcp_delete_topic'))
+ {
+ global $phpbb_root_path, $phpEx;
+ include($phpbb_root_path . 'includes/mcp/mcp_main.' . $phpEx);
+ }
+ mcp_delete_topic($topic_id_list, false, '', $action);
}
else
{
- disapprove_post($post_id_list, 'queue', $mode);
+ trigger_error('NO_POST_SELECTED');
}
+ break;
+ case 'disapprove':
+ $post_id_list = $request->variable('post_id_list', array(0));
+ $topic_id_list = $request->variable('topic_id_list', array(0));
+
+ if (!empty($topic_id_list) && $mode == 'deleted_topics')
+ {
+ if (!function_exists('mcp_delete_topics'))
+ {
+ global $phpbb_root_path, $phpEx;
+ include($phpbb_root_path . 'includes/mcp/mcp_main.' . $phpEx);
+ }
+ mcp_delete_topic($topic_id_list, false, '', 'disapprove');
+ return;
+ }
+
+ if (!class_exists('messenger'))
+ {
+ include($phpbb_root_path . 'includes/functions_messenger.' . $phpEx);
+ }
+
+ if (!empty($topic_id_list))
+ {
+ $post_visibility = ($mode == 'deleted_topics') ? ITEM_DELETED : ITEM_UNAPPROVED;
+ $sql = 'SELECT post_id
+ FROM ' . POSTS_TABLE . '
+ WHERE post_visibility = ' . $post_visibility . '
+ AND ' . $db->sql_in_set('topic_id', $topic_id_list);
+ $result = $db->sql_query($sql);
+
+ $post_id_list = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $post_id_list[] = (int) $row['post_id'];
+ }
+ $db->sql_freeresult($result);
+ }
+
+ if (!empty($post_id_list))
+ {
+ self::disapprove_posts($post_id_list, 'queue', $mode);
+ }
+ else
+ {
+ trigger_error('NO_POST_SELECTED');
+ }
break;
}
@@ -79,12 +152,16 @@ class mcp_queue
$post_id = request_var('p', 0);
$topic_id = request_var('t', 0);
+ $phpbb_notifications = $phpbb_container->get('notification_manager');
+
if ($topic_id)
{
$topic_info = get_topic_data(array($topic_id), 'm_approve');
if (isset($topic_info[$topic_id]['topic_first_post_id']))
{
$post_id = (int) $topic_info[$topic_id]['topic_first_post_id'];
+
+ $phpbb_notifications->mark_notifications_read('topic_in_queue', $topic_id, $user->data['user_id']);
}
else
{
@@ -92,6 +169,8 @@ class mcp_queue
}
}
+ $phpbb_notifications->mark_notifications_read('post_in_queue', $post_id, $user->data['user_id']);
+
$post_info = get_post_data(array($post_id), 'm_approve', true);
if (!sizeof($post_info))
@@ -106,8 +185,8 @@ class mcp_queue
$template->assign_vars(array(
'S_TOPIC_REVIEW' => true,
'S_BBCODE_ALLOWED' => $post_info['enable_bbcode'],
- 'TOPIC_TITLE' => $post_info['topic_title'])
- );
+ 'TOPIC_TITLE' => $post_info['topic_title'],
+ ));
}
$extensions = $attachments = $topic_tracking_info = array();
@@ -127,17 +206,8 @@ class mcp_queue
$post_unread = (isset($topic_tracking_info[$post_info['topic_id']]) && $post_info['post_time'] > $topic_tracking_info[$post_info['topic_id']]) ? true : false;
// Process message, leave it uncensored
- $message = $post_info['post_text'];
-
- if ($post_info['bbcode_bitfield'])
- {
- include_once($phpbb_root_path . 'includes/bbcode.' . $phpEx);
- $bbcode = new bbcode($post_info['bbcode_bitfield']);
- $bbcode->bbcode_second_pass($message, $post_info['bbcode_uid'], $post_info['bbcode_bitfield']);
- }
-
- $message = bbcode_nl2br($message);
- $message = smiley_text($message);
+ $parse_flags = ($post_info['bbcode_bitfield'] ? OPTION_FLAG_BBCODE : 0) | OPTION_FLAG_SMILIES;
+ $message = generate_text_for_display($post_info['post_text'], $post_info['bbcode_uid'], $post_info['bbcode_bitfield'], $parse_flags, false);
if ($post_info['post_attachment'] && $auth->acl_get('u_download') && $auth->acl_get('f_download', $post_info['forum_id']))
{
@@ -170,12 +240,39 @@ class mcp_queue
foreach ($attachments as $attachment)
{
$template->assign_block_vars('attachment', array(
- 'DISPLAY_ATTACHMENT' => $attachment)
- );
+ 'DISPLAY_ATTACHMENT' => $attachment,
+ ));
}
}
}
+ // Deleting information
+ if ($post_info['post_visibility'] == ITEM_DELETED && $post_info['post_delete_user'])
+ {
+ // User having deleted the post also being the post author?
+ if (!$post_info['post_delete_user'] || $post_info['post_delete_user'] == $post_info['poster_id'])
+ {
+ $display_username = get_username_string('full', $post_info['poster_id'], $post_info['username'], $post_info['user_colour'], $post_info['post_username']);
+ }
+ else
+ {
+ $sql = 'SELECT u.user_id, u.username, u.user_colour
+ FROM ' . POSTS_TABLE . ' p, ' . USERS_TABLE . ' u
+ WHERE p.post_id = ' . $post_info['post_id'] . '
+ AND p.post_delete_user = u.user_id';
+ $result = $db->sql_query($sql);
+ $post_delete_userinfo = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+ $display_username = get_username_string('full', $post_info['post_delete_user'], $post_delete_userinfo['username'], $post_delete_userinfo['user_colour']);
+ }
+
+ $l_deleted_by = $user->lang('DELETED_INFORMATION', $display_username, $user->format_date($post_info['post_delete_time'], false, true));
+ }
+ else
+ {
+ $l_deleted_by = '';
+ }
+
$post_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $post_info['forum_id'] . '&amp;p=' . $post_info['post_id'] . '#p' . $post_info['post_id']);
$topic_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $post_info['forum_id'] . '&amp;t=' . $post_info['topic_id']);
@@ -184,9 +281,12 @@ class mcp_queue
'U_APPROVE_ACTION' => append_sid("{$phpbb_root_path}mcp.$phpEx", "i=queue&amp;p=$post_id&amp;f=$forum_id"),
'S_CAN_VIEWIP' => $auth->acl_get('m_info', $post_info['forum_id']),
'S_POST_REPORTED' => $post_info['post_reported'],
- 'S_POST_UNAPPROVED' => !$post_info['post_approved'],
+ 'S_POST_UNAPPROVED' => ($post_info['post_visibility'] == ITEM_UNAPPROVED),
'S_POST_LOCKED' => $post_info['post_edit_locked'],
'S_USER_NOTES' => true,
+ 'S_POST_DELETED' => ($post_info['post_visibility'] == ITEM_DELETED),
+ 'DELETED_MESSAGE' => $l_deleted_by,
+ 'DELETE_REASON' => $post_info['post_delete_reason'],
'U_EDIT' => ($auth->acl_get('m_edit', $post_info['forum_id'])) ? append_sid("{$phpbb_root_path}posting.$phpEx", "mode=edit&amp;f={$post_info['forum_id']}&amp;p={$post_info['post_id']}") : '',
'U_MCP_APPROVE' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue&amp;mode=approve_details&amp;f=' . $post_info['forum_id'] . '&amp;p=' . $post_id),
@@ -198,7 +298,8 @@ class mcp_queue
'MINI_POST_IMG' => ($post_unread) ? $user->img('icon_post_target_unread', 'UNREAD_POST') : $user->img('icon_post_target', 'POST'),
- 'RETURN_QUEUE' => sprintf($user->lang['RETURN_QUEUE'], '<a href="' . append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue' . (($topic_id) ? '&amp;mode=unapproved_topics' : '&amp;mode=unapproved_posts')) . "&amp;start=$start\">", '</a>'),
+
+ 'RETURN_QUEUE' => sprintf($user->lang['RETURN_QUEUE'], '<a href="' . append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue' . (($topic_id) ? '&amp;mode=unapproved_topics' : '&amp;mode=unapproved_posts')) . '&amp;start=' . $start . '">', '</a>'),
'RETURN_POST' => sprintf($user->lang['RETURN_POST'], '<a href="' . $post_url . '">', '</a>'),
'RETURN_TOPIC_SIMPLE' => sprintf($user->lang['RETURN_TOPIC_SIMPLE'], '<a href="' . $topic_url . '">', '</a>'),
'REPORTED_IMG' => $user->img('icon_topic_reported', $user->lang['POST_REPORTED']),
@@ -225,10 +326,18 @@ class mcp_queue
case 'unapproved_topics':
case 'unapproved_posts':
+ case 'deleted_topics':
+ case 'deleted_posts':
+ $m_perm = 'm_approve';
+ $is_topics = ($mode == 'unapproved_topics' || $mode == 'deleted_topics') ? true : false;
+ $is_restore = ($mode == 'deleted_posts' || $mode == 'deleted_topics') ? true : false;
+ $visibility_const = (!$is_restore) ? ITEM_UNAPPROVED : ITEM_DELETED;
+
$user->add_lang(array('viewtopic', 'viewforum'));
- $topic_id = request_var('t', 0);
+ $topic_id = $request->variable('t', 0);
$forum_info = array();
+ $pagination = $phpbb_container->get('pagination');
if ($topic_id)
{
@@ -243,7 +352,7 @@ class mcp_queue
$forum_id = $topic_info['forum_id'];
}
- $forum_list_approve = get_forum_list('m_approve', false, true);
+ $forum_list_approve = get_forum_list($m_perm, false, true);
$forum_list_read = array_flip(get_forum_list('f_read', true, true)); // Flipped so we can isset() the forum IDs
// Remove forums we cannot read
@@ -269,20 +378,16 @@ class mcp_queue
trigger_error('NOT_MODERATOR');
}
- $global_id = $forum_list[0];
-
- $forum_list = implode(', ', $forum_list);
-
- $sql = 'SELECT SUM(forum_topics) as sum_forum_topics
- FROM ' . FORUMS_TABLE . "
- WHERE forum_id IN (0, $forum_list)";
+ $sql = 'SELECT SUM(forum_topics_approved) as sum_forum_topics
+ FROM ' . FORUMS_TABLE . '
+ WHERE ' . $db->sql_in_set('forum_id', $forum_list);
$result = $db->sql_query($sql);
- $forum_info['forum_topics'] = (int) $db->sql_fetchfield('sum_forum_topics');
+ $forum_info['forum_topics_approved'] = (int) $db->sql_fetchfield('sum_forum_topics');
$db->sql_freeresult($result);
}
else
{
- $forum_info = get_forum_data(array($forum_id), 'm_approve');
+ $forum_info = get_forum_data(array($forum_id), $m_perm);
if (!sizeof($forum_info))
{
@@ -291,7 +396,6 @@ class mcp_queue
$forum_info = $forum_info[$forum_id];
$forum_list = $forum_id;
- $global_id = $forum_id;
}
$forum_options = '<option value="0"' . (($forum_id == 0) ? ' selected="selected"' : '') . '>' . $user->lang['ALL_FORUMS'] . '</option>';
@@ -305,21 +409,22 @@ class mcp_queue
$sort_by_sql = $sort_order_sql = array();
mcp_sorting($mode, $sort_days, $sort_key, $sort_dir, $sort_by_sql, $sort_order_sql, $total, $forum_id, $topic_id);
- $forum_topics = ($total == -1) ? $forum_info['forum_topics'] : $total;
+ $forum_topics = ($total == -1) ? $forum_info['forum_topics_approved'] : $total;
$limit_time_sql = ($sort_days) ? 'AND t.topic_last_post_time >= ' . (time() - ($sort_days * 86400)) : '';
$forum_names = array();
- if ($mode == 'unapproved_posts')
+ if (!$is_topics)
{
$sql = 'SELECT p.post_id
- FROM ' . POSTS_TABLE . ' p, ' . TOPICS_TABLE . ' t' . (($sort_order_sql[0] == 'u') ? ', ' . USERS_TABLE . ' u' : '') . "
- WHERE p.forum_id IN (0, $forum_list)
- AND p.post_approved = 0
- " . (($sort_order_sql[0] == 'u') ? 'AND u.user_id = p.poster_id' : '') . '
+ FROM ' . POSTS_TABLE . ' p, ' . TOPICS_TABLE . ' t' . (($sort_order_sql[0] == 'u') ? ', ' . USERS_TABLE . ' u' : '') . '
+ WHERE ' . $db->sql_in_set('p.forum_id', $forum_list) . '
+ AND p.post_visibility = ' . $visibility_const . '
+ ' . (($sort_order_sql[0] == 'u') ? 'AND u.user_id = p.poster_id' : '') . '
' . (($topic_id) ? 'AND p.topic_id = ' . $topic_id : '') . "
AND t.topic_id = p.topic_id
- AND t.topic_first_post_id <> p.post_id
+ AND (t.topic_visibility <> p.post_visibility
+ OR t.topic_delete_user = 0)
$limit_time_sql
ORDER BY $sort_order_sql";
$result = $db->sql_query_limit($sql, $config['topics_per_page'], $start);
@@ -335,7 +440,7 @@ class mcp_queue
if (sizeof($post_ids))
{
- $sql = 'SELECT t.topic_id, t.topic_title, t.forum_id, p.post_id, p.post_subject, p.post_username, p.poster_id, p.post_time, u.username, u.username_clean, u.user_colour
+ $sql = 'SELECT t.topic_id, t.topic_title, t.forum_id, p.post_id, p.post_subject, p.post_username, p.poster_id, p.post_time, p.post_attachment, u.username, u.username_clean, u.user_colour
FROM ' . POSTS_TABLE . ' p, ' . TOPICS_TABLE . ' t, ' . USERS_TABLE . ' u
WHERE ' . $db->sql_in_set('p.post_id', $post_ids) . '
AND t.topic_id = p.topic_id
@@ -346,10 +451,7 @@ class mcp_queue
$post_data = $rowset = array();
while ($row = $db->sql_fetchrow($result))
{
- if ($row['forum_id'])
- {
- $forum_names[] = $row['forum_id'];
- }
+ $forum_names[] = $row['forum_id'];
$post_data[$row['post_id']] = $row;
}
$db->sql_freeresult($result);
@@ -367,10 +469,11 @@ class mcp_queue
}
else
{
- $sql = 'SELECT t.forum_id, t.topic_id, t.topic_title, t.topic_title AS post_subject, t.topic_time AS post_time, t.topic_poster AS poster_id, t.topic_first_post_id AS post_id, t.topic_first_poster_name AS username, t.topic_first_poster_colour AS user_colour
- FROM ' . TOPICS_TABLE . " t
- WHERE forum_id IN (0, $forum_list)
- AND topic_approved = 0
+ $sql = 'SELECT t.forum_id, t.topic_id, t.topic_title, t.topic_title AS post_subject, t.topic_time AS post_time, t.topic_poster AS poster_id, t.topic_first_post_id AS post_id, t.topic_attachment AS post_attachment, t.topic_first_poster_name AS username, t.topic_first_poster_colour AS user_colour
+ FROM ' . TOPICS_TABLE . ' t
+ WHERE ' . $db->sql_in_set('forum_id', $forum_list) . '
+ AND topic_visibility = ' . $visibility_const . "
+ AND topic_delete_user <> 0
$limit_time_sql
ORDER BY $sort_order_sql";
$result = $db->sql_query_limit($sql, $config['topics_per_page'], $start);
@@ -378,10 +481,7 @@ class mcp_queue
$rowset = array();
while ($row = $db->sql_fetchrow($result))
{
- if ($row['forum_id'])
- {
- $forum_names[] = $row['forum_id'];
- }
+ $forum_names[] = $row['forum_id'];
$rowset[] = $row;
}
$db->sql_freeresult($result);
@@ -405,20 +505,14 @@ class mcp_queue
foreach ($rowset as $row)
{
- $global_topic = ($row['forum_id']) ? false : true;
- if ($global_topic)
- {
- $row['forum_id'] = $global_id;
- }
-
if (empty($row['post_username']))
{
- $row['post_username'] = $user->lang['GUEST'];
+ $row['post_username'] = $row['username'] ?: $user->lang['GUEST'];
}
$template->assign_block_vars('postrow', array(
'U_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $row['forum_id'] . '&amp;t=' . $row['topic_id']),
- 'U_VIEWFORUM' => (!$global_topic) ? append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $row['forum_id']) : '',
+ 'U_VIEWFORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $row['forum_id']),
'U_VIEWPOST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $row['forum_id'] . '&amp;p=' . $row['post_id']) . (($mode == 'unapproved_posts') ? '#p' . $row['post_id'] : ''),
'U_VIEW_DETAILS' => append_sid("{$phpbb_root_path}mcp.$phpEx", "i=queue&amp;start=$start&amp;mode=approve_details&amp;f={$row['forum_id']}&amp;p={$row['post_id']}" . (($mode == 'unapproved_topics') ? "&amp;t={$row['topic_id']}" : '')),
@@ -428,574 +522,710 @@ class mcp_queue
'U_POST_AUTHOR' => get_username_string('profile', $row['poster_id'], $row['username'], $row['user_colour'], $row['post_username']),
'POST_ID' => $row['post_id'],
- 'FORUM_NAME' => (!$global_topic) ? $forum_names[$row['forum_id']] : $user->lang['GLOBAL_ANNOUNCEMENT'],
+ 'TOPIC_ID' => $row['topic_id'],
+ 'FORUM_NAME' => $forum_names[$row['forum_id']],
'POST_SUBJECT' => ($row['post_subject'] != '') ? $row['post_subject'] : $user->lang['NO_SUBJECT'],
'TOPIC_TITLE' => $row['topic_title'],
- 'POST_TIME' => $user->format_date($row['post_time']))
- );
+ 'POST_TIME' => $user->format_date($row['post_time']),
+ 'ATTACH_ICON_IMG' => ($auth->acl_get('u_download') && $auth->acl_get('f_download', $row['forum_id']) && $row['post_attachment']) ? $user->img('icon_topic_attach', $user->lang['TOTAL_ATTACHMENTS']) : '',
+ ));
}
unset($rowset, $forum_names);
+ $base_url = $this->u_action . "&amp;f=$forum_id&amp;st=$sort_days&amp;sk=$sort_key&amp;sd=$sort_dir";
+ $pagination->generate_template_pagination($base_url, 'pagination', 'start', $total, $config['topics_per_page'], $start);
+
// Now display the page
$template->assign_vars(array(
- 'L_DISPLAY_ITEMS' => ($mode == 'unapproved_posts') ? $user->lang['DISPLAY_POSTS'] : $user->lang['DISPLAY_TOPICS'],
- 'L_EXPLAIN' => ($mode == 'unapproved_posts') ? $user->lang['MCP_QUEUE_UNAPPROVED_POSTS_EXPLAIN'] : $user->lang['MCP_QUEUE_UNAPPROVED_TOPICS_EXPLAIN'],
- 'L_TITLE' => ($mode == 'unapproved_posts') ? $user->lang['MCP_QUEUE_UNAPPROVED_POSTS'] : $user->lang['MCP_QUEUE_UNAPPROVED_TOPICS'],
+ 'L_DISPLAY_ITEMS' => (!$is_topics) ? $user->lang['DISPLAY_POSTS'] : $user->lang['DISPLAY_TOPICS'],
+ 'L_EXPLAIN' => $user->lang['MCP_QUEUE_' . strtoupper($mode) . '_EXPLAIN'],
+ 'L_TITLE' => $user->lang['MCP_QUEUE_' . strtoupper($mode)],
'L_ONLY_TOPIC' => ($topic_id) ? sprintf($user->lang['ONLY_TOPIC'], $topic_info['topic_title']) : '',
'S_FORUM_OPTIONS' => $forum_options,
'S_MCP_ACTION' => build_url(array('t', 'f', 'sd', 'st', 'sk')),
- 'S_TOPICS' => ($mode == 'unapproved_posts') ? false : true,
+ 'S_TOPICS' => $is_topics,
+ 'S_RESTORE' => $is_restore,
- 'PAGINATION' => generate_pagination($this->u_action . "&amp;f=$forum_id&amp;st=$sort_days&amp;sk=$sort_key&amp;sd=$sort_dir", $total, $config['topics_per_page'], $start),
- 'PAGE_NUMBER' => on_page($total, $config['topics_per_page'], $start),
'TOPIC_ID' => $topic_id,
- 'TOTAL' => ($total == 1) ? (($mode == 'unapproved_posts') ? $user->lang['VIEW_TOPIC_POST'] : $user->lang['VIEW_FORUM_TOPIC']) : sprintf((($mode == 'unapproved_posts') ? $user->lang['VIEW_TOPIC_POSTS'] : $user->lang['VIEW_FORUM_TOPICS']), $total),
+ 'TOTAL' => $user->lang(((!$is_topics) ? 'VIEW_TOPIC_POSTS' : 'VIEW_FORUM_TOPICS'), (int) $total),
));
$this->tpl_name = 'mcp_queue';
break;
}
}
-}
-
-/**
-* Approve Post/Topic
-*/
-function approve_post($post_id_list, $id, $mode)
-{
- global $db, $template, $user, $config;
- global $phpEx, $phpbb_root_path;
- if (!check_ids($post_id_list, POSTS_TABLE, 'post_id', array('m_approve')))
+ /**
+ * Approve/Restore posts
+ *
+ * @param $action string Action we perform on the posts ('approve' or 'restore')
+ * @param $post_id_list array IDs of the posts to approve/restore
+ * @param $id mixed Category of the current active module
+ * @param $mode string Active module
+ * @return null
+ */
+ static public function approve_posts($action, $post_id_list, $id, $mode)
{
- trigger_error('NOT_AUTHORISED');
- }
-
- $redirect = request_var('redirect', build_url(array('quickmod')));
- $success_msg = '';
-
- $s_hidden_fields = build_hidden_fields(array(
- 'i' => $id,
- 'mode' => $mode,
- 'post_id_list' => $post_id_list,
- 'action' => 'approve',
- 'redirect' => $redirect)
- );
+ global $db, $template, $user, $config, $request, $phpbb_container;
+ global $phpEx, $phpbb_root_path;
- $post_info = get_post_data($post_id_list, 'm_approve');
+ if (!check_ids($post_id_list, POSTS_TABLE, 'post_id', array('m_approve')))
+ {
+ trigger_error('NOT_AUTHORISED');
+ }
- if (confirm_box(true))
- {
- $notify_poster = (isset($_REQUEST['notify_poster'])) ? true : false;
+ $redirect = $request->variable('redirect', build_url(array('quickmod')));
+ $redirect = reapply_sid($redirect);
+ $success_msg = $post_url = '';
+ $approve_log = array();
- // If Topic -> total_topics = total_topics+1, total_posts = total_posts+1, forum_topics = forum_topics+1, forum_posts = forum_posts+1
- // If Post -> total_posts = total_posts+1, forum_posts = forum_posts+1, topic_replies = topic_replies+1
+ $s_hidden_fields = build_hidden_fields(array(
+ 'i' => $id,
+ 'mode' => $mode,
+ 'post_id_list' => $post_id_list,
+ 'action' => $action,
+ 'redirect' => $redirect,
+ ));
- $total_topics = $total_posts = 0;
- $topic_approve_sql = $post_approve_sql = $topic_id_list = $forum_id_list = $approve_log = array();
- $user_posts_sql = $post_approved_list = array();
+ $post_info = get_post_data($post_id_list, 'm_approve');
- foreach ($post_info as $post_id => $post_data)
+ if (confirm_box(true))
{
- if ($post_data['post_approved'])
- {
- $post_approved_list[] = $post_id;
- continue;
- }
+ $notify_poster = ($action == 'approve' && isset($_REQUEST['notify_poster']));
- $topic_id_list[$post_data['topic_id']] = 1;
+ $topic_info = array();
- if ($post_data['forum_id'])
+ // Group the posts by topic_id
+ foreach ($post_info as $post_id => $post_data)
{
- $forum_id_list[$post_data['forum_id']] = 1;
- }
+ if ($post_data['post_visibility'] == ITEM_APPROVED)
+ {
+ continue;
+ }
+ $topic_id = (int) $post_data['topic_id'];
- // User post update (we do not care about topic or post, since user posts are strictly connected to posts)
- // But we care about forums where post counts get not increased. ;)
- if ($post_data['post_postcount'])
- {
- $user_posts_sql[$post_data['poster_id']] = (empty($user_posts_sql[$post_data['poster_id']])) ? 1 : $user_posts_sql[$post_data['poster_id']] + 1;
- }
+ $topic_info[$topic_id]['posts'][] = (int) $post_id;
+ $topic_info[$topic_id]['forum_id'] = (int) $post_data['forum_id'];
- // Topic or Post. ;)
- if ($post_data['topic_first_post_id'] == $post_id)
- {
- if ($post_data['forum_id'])
+ // Refresh the first post, if the time or id is older then the current one
+ if ($post_id <= $post_data['topic_first_post_id'] || $post_data['post_time'] <= $post_data['topic_time'])
{
- $total_topics++;
+ $topic_info[$topic_id]['first_post'] = true;
}
- $topic_approve_sql[] = $post_data['topic_id'];
+
+ // Refresh the last post, if the time or id is newer then the current one
+ if ($post_id >= $post_data['topic_last_post_id'] || $post_data['post_time'] >= $post_data['topic_last_post_time'])
+ {
+ $topic_info[$topic_id]['last_post'] = true;
+ }
+
+ $post_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f={$post_data['forum_id']}&amp;t={$post_data['topic_id']}&amp;p={$post_data['post_id']}") . '#p' . $post_data['post_id'];
$approve_log[] = array(
- 'type' => 'topic',
- 'post_subject' => $post_data['post_subject'],
'forum_id' => $post_data['forum_id'],
'topic_id' => $post_data['topic_id'],
+ 'post_subject' => $post_data['post_subject'],
);
}
- else
+
+ $phpbb_content_visibility = $phpbb_container->get('content.visibility');
+ foreach ($topic_info as $topic_id => $topic_data)
{
- $approve_log[] = array(
- 'type' => 'post',
- 'post_subject' => $post_data['post_subject'],
- 'forum_id' => $post_data['forum_id'],
- 'topic_id' => $post_data['topic_id'],
- );
+ $phpbb_content_visibility->set_post_visibility(ITEM_APPROVED, $topic_data['posts'], $topic_id, $topic_data['forum_id'], $user->data['user_id'], time(), '', isset($topic_data['first_post']), isset($topic_data['last_post']));
}
- if ($post_data['forum_id'])
+ if (sizeof($post_info) >= 1)
{
- $total_posts++;
+ $success_msg = (sizeof($post_info) == 1) ? 'POST_' . strtoupper($action) . 'D_SUCCESS' : 'POSTS_' . strtoupper($action) . 'D_SUCCESS';
+ }
- // Increment by topic_replies if we approve a topic...
- // This works because we do not adjust the topic_replies when re-approving a topic after an edit.
- if ($post_data['topic_first_post_id'] == $post_id && $post_data['topic_replies'])
- {
- $total_posts += $post_data['topic_replies'];
- }
+ foreach ($approve_log as $log_data)
+ {
+ add_log('mod', $log_data['forum_id'], $log_data['topic_id'], 'LOG_POST_' . strtoupper($action) . 'D', $log_data['post_subject']);
}
- $post_approve_sql[] = $post_id;
- }
+ // Only send out the mails, when the posts are being approved
+ if ($action == 'approve')
+ {
+ $phpbb_notifications = $phpbb_container->get('notification_manager');
- $post_id_list = array_values(array_diff($post_id_list, $post_approved_list));
- for ($i = 0, $size = sizeof($post_approved_list); $i < $size; $i++)
- {
- unset($post_info[$post_approved_list[$i]]);
- }
+ // Handle notifications
+ foreach ($post_info as $post_id => $post_data)
+ {
+ // A single topic approval may also happen here, so handle deleting the respective notification.
+ if (!$post_data['topic_posts_approved'])
+ {
+ $phpbb_notifications->delete_notifications('topic_in_queue', $post_data['topic_id']);
+ }
+ $phpbb_notifications->delete_notifications('post_in_queue', $post_id);
+
+ $phpbb_notifications->add_notifications(array(
+ 'quote',
+ 'bookmark',
+ 'post',
+ ), $post_data);
+
+ $phpbb_notifications->mark_notifications_read(array(
+ 'quote',
+ 'bookmark',
+ 'post',
+ ), $post_data['post_id'], $user->data['user_id']);
+
+ // Notify Poster?
+ if ($notify_poster)
+ {
+ if ($post_data['poster_id'] == ANONYMOUS)
+ {
+ continue;
+ }
- if (sizeof($topic_approve_sql))
- {
- $sql = 'UPDATE ' . TOPICS_TABLE . '
- SET topic_approved = 1
- WHERE ' . $db->sql_in_set('topic_id', $topic_approve_sql);
- $db->sql_query($sql);
- }
+ $phpbb_notifications->add_notifications('approve_post', $post_data);
+ }
+ }
+ }
- if (sizeof($post_approve_sql))
- {
- $sql = 'UPDATE ' . POSTS_TABLE . '
- SET post_approved = 1
- WHERE ' . $db->sql_in_set('post_id', $post_approve_sql);
- $db->sql_query($sql);
- }
+ meta_refresh(3, $redirect);
+ $message = $user->lang[$success_msg];
- unset($topic_approve_sql, $post_approve_sql);
+ if ($request->is_ajax())
+ {
+ $json_response = new \phpbb\json_response;
+ $json_response->send(array(
+ 'MESSAGE_TITLE' => $user->lang['INFORMATION'],
+ 'MESSAGE_TEXT' => $message,
+ 'REFRESH_DATA' => null,
+ 'visible' => true,
+ ));
+ }
+ $message .= '<br /><br />' . $user->lang('RETURN_PAGE', '<a href="' . $redirect . '">', '</a>');
- foreach ($approve_log as $log_data)
- {
- add_log('mod', $log_data['forum_id'], $log_data['topic_id'], ($log_data['type'] == 'topic') ? 'LOG_TOPIC_APPROVED' : 'LOG_POST_APPROVED', $log_data['post_subject']);
+ // If approving one post, also give links back to post...
+ if (sizeof($post_info) == 1 && $post_url)
+ {
+ $message .= '<br /><br />' . $user->lang('RETURN_POST', '<a href="' . $post_url . '">', '</a>');
+ }
+ trigger_error($message);
}
-
- if (sizeof($user_posts_sql))
+ else
{
- // Try to minimize the query count by merging users with the same post count additions
- $user_posts_update = array();
+ $show_notify = false;
- foreach ($user_posts_sql as $user_id => $user_posts)
+ if ($action == 'approve')
{
- $user_posts_update[$user_posts][] = $user_id;
+ foreach ($post_info as $post_data)
+ {
+ if ($post_data['poster_id'] == ANONYMOUS)
+ {
+ continue;
+ }
+ else
+ {
+ $show_notify = true;
+ break;
+ }
+ }
}
- foreach ($user_posts_update as $user_posts => $user_id_ary)
- {
- $sql = 'UPDATE ' . USERS_TABLE . '
- SET user_posts = user_posts + ' . $user_posts . '
- WHERE ' . $db->sql_in_set('user_id', $user_id_ary);
- $db->sql_query($sql);
- }
- }
+ $template->assign_vars(array(
+ 'S_NOTIFY_POSTER' => $show_notify,
+ 'S_' . strtoupper($action) => true,
+ ));
- if ($total_topics)
- {
- set_config_count('num_topics', $total_topics, true);
+ confirm_box(false, strtoupper($action) . '_POST' . ((sizeof($post_id_list) == 1) ? '' : 'S'), $s_hidden_fields, 'mcp_approve.html');
}
- if ($total_posts)
+ redirect($redirect);
+ }
+
+ /**
+ * Approve/Restore topics
+ *
+ * @param $action string Action we perform on the posts ('approve' or 'restore')
+ * @param $topic_id_list array IDs of the topics to approve/restore
+ * @param $id mixed Category of the current active module
+ * @param $mode string Active module
+ * @return null
+ */
+ static public function approve_topics($action, $topic_id_list, $id, $mode)
+ {
+ global $db, $template, $user, $config;
+ global $phpEx, $phpbb_root_path, $request, $phpbb_container;
+
+ if (!check_ids($topic_id_list, TOPICS_TABLE, 'topic_id', array('m_approve')))
{
- set_config_count('num_posts', $total_posts, true);
+ trigger_error('NOT_AUTHORISED');
}
- sync('topic', 'topic_id', array_keys($topic_id_list), true);
- sync('forum', 'forum_id', array_keys($forum_id_list), true, true);
- unset($topic_id_list, $forum_id_list);
+ $redirect = $request->variable('redirect', build_url(array('quickmod')));
+ $redirect = reapply_sid($redirect);
+ $success_msg = $topic_url = '';
+ $approve_log = array();
- $messenger = new messenger();
+ $s_hidden_fields = build_hidden_fields(array(
+ 'i' => $id,
+ 'mode' => $mode,
+ 'topic_id_list' => $topic_id_list,
+ 'action' => $action,
+ 'redirect' => $redirect,
+ ));
- // Notify Poster?
- if ($notify_poster)
- {
- foreach ($post_info as $post_id => $post_data)
- {
- if ($post_data['poster_id'] == ANONYMOUS)
- {
- continue;
- }
+ $topic_info = get_topic_data($topic_id_list, 'm_approve');
- $email_template = ($post_data['post_id'] == $post_data['topic_first_post_id'] && $post_data['post_id'] == $post_data['topic_last_post_id']) ? 'topic_approved' : 'post_approved';
+ if (confirm_box(true))
+ {
+ $notify_poster = ($action == 'approve' && isset($_REQUEST['notify_poster'])) ? true : false;
- $messenger->template($email_template, $post_data['user_lang']);
+ $phpbb_content_visibility = $phpbb_container->get('content.visibility');
+ $first_post_ids = array();
- $messenger->to($post_data['user_email'], $post_data['username']);
- $messenger->im($post_data['user_jabber'], $post_data['username']);
+ foreach ($topic_info as $topic_id => $topic_data)
+ {
+ $phpbb_content_visibility->set_topic_visibility(ITEM_APPROVED, $topic_id, $topic_data['forum_id'], $user->data['user_id'], time(), '');
+ $first_post_ids[$topic_id] = (int) $topic_data['topic_first_post_id'];
- $messenger->assign_vars(array(
- 'USERNAME' => htmlspecialchars_decode($post_data['username']),
- 'POST_SUBJECT' => htmlspecialchars_decode(censor_text($post_data['post_subject'])),
- 'TOPIC_TITLE' => htmlspecialchars_decode(censor_text($post_data['topic_title'])),
+ $topic_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f={$topic_data['forum_id']}&amp;t={$topic_id}");
- 'U_VIEW_TOPIC' => generate_board_url() . "/viewtopic.$phpEx?f={$post_data['forum_id']}&t={$post_data['topic_id']}&e=0",
- 'U_VIEW_POST' => generate_board_url() . "/viewtopic.$phpEx?f={$post_data['forum_id']}&t={$post_data['topic_id']}&p=$post_id&e=$post_id")
+ $approve_log[] = array(
+ 'forum_id' => $topic_data['forum_id'],
+ 'topic_id' => $topic_data['topic_id'],
+ 'topic_title' => $topic_data['topic_title'],
);
+ }
- $messenger->send($post_data['user_notify_type']);
+ if (sizeof($topic_info) >= 1)
+ {
+ $success_msg = (sizeof($topic_info) == 1) ? 'TOPIC_' . strtoupper($action) . 'D_SUCCESS' : 'TOPICS_' . strtoupper($action) . 'D_SUCCESS';
}
- }
- $messenger->save_queue();
+ foreach ($approve_log as $log_data)
+ {
+ add_log('mod', $log_data['forum_id'], $log_data['topic_id'], 'LOG_TOPIC_' . strtoupper($action) . 'D', $log_data['topic_title']);
+ }
- // Send out normal user notifications
- $email_sig = str_replace('<br />', "\n", "-- \n" . $config['board_email_sig']);
+ // Only send out the mails, when the posts are being approved
+ if ($action == 'approve')
+ {
+ // Grab the first post text as it's needed for the quote notification.
+ $sql = 'SELECT topic_id, post_text
+ FROM ' . POSTS_TABLE . '
+ WHERE ' . $db->sql_in_set('post_id', $first_post_ids);
+ $result = $db->sql_query($sql);
- foreach ($post_info as $post_id => $post_data)
- {
- $username = ($post_data['post_username']) ? $post_data['post_username'] : $post_data['username'];
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $topic_info[$row['topic_id']]['post_text'] = $row['post_text'];
+ }
+ $db->sql_freeresult($result);
- if ($post_id == $post_data['topic_first_post_id'] && $post_id == $post_data['topic_last_post_id'])
- {
- // Forum Notifications
- user_notification('post', $post_data['topic_title'], $post_data['topic_title'], $post_data['forum_name'], $post_data['forum_id'], $post_data['topic_id'], $post_id, $username);
+ // Handle notifications
+ $phpbb_notifications = $phpbb_container->get('notification_manager');
+
+ foreach ($topic_info as $topic_id => $topic_data)
+ {
+ $topic_data = array_merge($topic_data, array(
+ 'post_id' => $topic_data['topic_first_post_id'],
+ 'post_subject' => $topic_data['topic_title'],
+ 'post_time' => $topic_data['topic_time'],
+ 'poster_id' => $topic_data['topic_poster'],
+ 'username' => $topic_data['topic_first_poster_name'],
+ ));
+
+ $phpbb_notifications->delete_notifications('topic_in_queue', $topic_id);
+ $phpbb_notifications->add_notifications(array(
+ 'quote',
+ 'topic',
+ ), $topic_data);
+
+ $phpbb_notifications->mark_notifications_read('quote', $topic_data['post_id'], $user->data['user_id']);
+ $phpbb_notifications->mark_notifications_read('topic', $topic_id, $user->data['user_id']);
+
+ if ($notify_poster)
+ {
+ $phpbb_notifications->add_notifications('approve_topic', $topic_data);
+ }
+ }
}
- else
+
+ meta_refresh(3, $redirect);
+ $message = $user->lang[$success_msg];
+
+ if ($request->is_ajax())
{
- // Topic Notifications
- user_notification('reply', $post_data['post_subject'], $post_data['topic_title'], $post_data['forum_name'], $post_data['forum_id'], $post_data['topic_id'], $post_id, $username);
+ $json_response = new \phpbb\json_response;
+ $json_response->send(array(
+ 'MESSAGE_TITLE' => $user->lang['INFORMATION'],
+ 'MESSAGE_TEXT' => $message,
+ 'REFRESH_DATA' => null,
+ 'visible' => true,
+ ));
}
- }
+ $message .= '<br /><br />' . $user->lang('RETURN_PAGE', '<a href="' . $redirect . '">', '</a>');
- if (sizeof($post_id_list) == 1)
- {
- $post_data = $post_info[$post_id_list[0]];
- $post_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f={$post_data['forum_id']}&amp;t={$post_data['topic_id']}&amp;p={$post_data['post_id']}") . '#p' . $post_data['post_id'];
- }
- unset($post_info);
-
- if ($total_topics)
- {
- $success_msg = ($total_topics == 1) ? 'TOPIC_APPROVED_SUCCESS' : 'TOPICS_APPROVED_SUCCESS';
+ // If approving one topic, also give links back to topic...
+ if (sizeof($topic_info) == 1 && $topic_url)
+ {
+ $message .= '<br /><br />' . $user->lang('RETURN_TOPIC', '<a href="' . $topic_url . '">', '</a>');
+ }
+ trigger_error($message);
}
else
{
- $success_msg = (sizeof($post_id_list) + sizeof($post_approved_list) == 1) ? 'POST_APPROVED_SUCCESS' : 'POSTS_APPROVED_SUCCESS';
- }
- }
- else
- {
- $show_notify = false;
+ $show_notify = false;
- if ($config['email_enable'] || $config['jab_enable'])
- {
- foreach ($post_info as $post_data)
+ if ($action == 'approve')
{
- if ($post_data['poster_id'] == ANONYMOUS)
- {
- continue;
- }
- else
+ foreach ($topic_info as $topic_data)
{
- $show_notify = true;
- break;
+ if ($topic_data['topic_poster'] == ANONYMOUS)
+ {
+ continue;
+ }
+ else
+ {
+ $show_notify = true;
+ break;
+ }
}
}
- }
- $template->assign_vars(array(
- 'S_NOTIFY_POSTER' => $show_notify,
- 'S_APPROVE' => true)
- );
+ $template->assign_vars(array(
+ 'S_NOTIFY_POSTER' => $show_notify,
+ 'S_' . strtoupper($action) => true,
+ ));
- confirm_box(false, 'APPROVE_POST' . ((sizeof($post_id_list) == 1) ? '' : 'S'), $s_hidden_fields, 'mcp_approve.html');
- }
-
- $redirect = request_var('redirect', "index.$phpEx");
- $redirect = reapply_sid($redirect);
+ confirm_box(false, strtoupper($action) . '_TOPIC' . ((sizeof($topic_id_list) == 1) ? '' : 'S'), $s_hidden_fields, 'mcp_approve.html');
+ }
- if (!$success_msg)
- {
redirect($redirect);
}
- else
+
+ /**
+ * Disapprove Post
+ *
+ * @param $post_id_list array IDs of the posts to disapprove/delete
+ * @param $id mixed Category of the current active module
+ * @param $mode string Active module
+ * @return null
+ */
+ static public function disapprove_posts($post_id_list, $id, $mode)
{
- meta_refresh(3, $redirect);
+ global $db, $template, $user, $config, $phpbb_container;
+ global $phpEx, $phpbb_root_path, $request;
- // If approving one post, also give links back to post...
- $add_message = '';
- if (sizeof($post_id_list) == 1 && !empty($post_url))
+ if (!check_ids($post_id_list, POSTS_TABLE, 'post_id', array('m_approve')))
{
- $add_message = '<br /><br />' . sprintf($user->lang['RETURN_POST'], '<a href="' . $post_url . '">', '</a>');
+ trigger_error('NOT_AUTHORISED');
}
- trigger_error($user->lang[$success_msg] . '<br /><br />' . sprintf($user->lang['RETURN_PAGE'], "<a href=\"$redirect\">", '</a>') . $add_message);
- }
-}
+ $redirect = $request->variable('redirect', build_url(array('t', 'mode', 'quickmod')) . "&amp;mode=$mode");
+ $redirect = reapply_sid($redirect);
+ $reason = $request->variable('reason', '', true);
+ $reason_id = $request->variable('reason_id', 0);
+ $success_msg = $additional_msg = '';
-/**
-* Disapprove Post/Topic
-*/
-function disapprove_post($post_id_list, $id, $mode)
-{
- global $db, $template, $user, $config;
- global $phpEx, $phpbb_root_path;
-
- if (!check_ids($post_id_list, POSTS_TABLE, 'post_id', array('m_approve')))
- {
- trigger_error('NOT_AUTHORISED');
- }
+ $s_hidden_fields = build_hidden_fields(array(
+ 'i' => $id,
+ 'mode' => $mode,
+ 'post_id_list' => $post_id_list,
+ 'action' => 'disapprove',
+ 'redirect' => $redirect,
+ ));
- $redirect = request_var('redirect', build_url(array('t', 'mode', 'quickmod')) . "&amp;mode=$mode");
- $reason = utf8_normalize_nfc(request_var('reason', '', true));
- $reason_id = request_var('reason_id', 0);
- $success_msg = $additional_msg = '';
+ $notify_poster = $request->is_set('notify_poster');
+ $disapprove_reason = '';
- $s_hidden_fields = build_hidden_fields(array(
- 'i' => $id,
- 'mode' => $mode,
- 'post_id_list' => $post_id_list,
- 'action' => 'disapprove',
- 'redirect' => $redirect)
- );
-
- $notify_poster = (isset($_REQUEST['notify_poster'])) ? true : false;
- $disapprove_reason = '';
-
- if ($reason_id)
- {
- $sql = 'SELECT reason_title, reason_description
- FROM ' . REPORTS_REASONS_TABLE . "
- WHERE reason_id = $reason_id";
- $result = $db->sql_query($sql);
- $row = $db->sql_fetchrow($result);
- $db->sql_freeresult($result);
-
- if (!$row || (!$reason && strtolower($row['reason_title']) == 'other'))
- {
- $additional_msg = $user->lang['NO_REASON_DISAPPROVAL'];
- unset($_REQUEST['confirm_key']);
- unset($_POST['confirm_key']);
- unset($_POST['confirm']);
- }
- else
+ if ($reason_id)
{
- // If the reason is defined within the language file, we will use the localized version, else just use the database entry...
- $disapprove_reason = (strtolower($row['reason_title']) != 'other') ? ((isset($user->lang['report_reasons']['DESCRIPTION'][strtoupper($row['reason_title'])])) ? $user->lang['report_reasons']['DESCRIPTION'][strtoupper($row['reason_title'])] : $row['reason_description']) : '';
- $disapprove_reason .= ($reason) ? "\n\n" . $reason : '';
-
- if (isset($user->lang['report_reasons']['DESCRIPTION'][strtoupper($row['reason_title'])]))
+ $sql = 'SELECT reason_title, reason_description
+ FROM ' . REPORTS_REASONS_TABLE . "
+ WHERE reason_id = $reason_id";
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if (!$row || (!$reason && strtolower($row['reason_title']) == 'other'))
{
- $disapprove_reason_lang = strtoupper($row['reason_title']);
+ $additional_msg = $user->lang['NO_REASON_DISAPPROVAL'];
+
+ $request->overwrite('confirm', null, \phpbb\request\request_interface::POST);
+ $request->overwrite('confirm_key', null, \phpbb\request\request_interface::POST);
+ $request->overwrite('confirm_key', null, \phpbb\request\request_interface::REQUEST);
}
+ else
+ {
+ // If the reason is defined within the language file, we will use the localized version, else just use the database entry...
+ $disapprove_reason = (strtolower($row['reason_title']) != 'other') ? ((isset($user->lang['report_reasons']['DESCRIPTION'][strtoupper($row['reason_title'])])) ? $user->lang['report_reasons']['DESCRIPTION'][strtoupper($row['reason_title'])] : $row['reason_description']) : '';
+ $disapprove_reason .= ($reason) ? "\n\n" . $reason : '';
- $email_disapprove_reason = $disapprove_reason;
+ if (isset($user->lang['report_reasons']['DESCRIPTION'][strtoupper($row['reason_title'])]))
+ {
+ $disapprove_reason_lang = strtoupper($row['reason_title']);
+ }
+ }
}
- }
- $post_info = get_post_data($post_id_list, 'm_approve');
-
- if (confirm_box(true))
- {
- $disapprove_log = $disapprove_log_topics = $disapprove_log_posts = array();
- $topic_replies_real = $post_disapprove_list = array();
+ $post_info = get_post_data($post_id_list, 'm_approve');
- // Build a list of posts to be unapproved and get the related topics real replies count
+ $is_disapproving = false;
foreach ($post_info as $post_id => $post_data)
{
- $post_disapprove_list[$post_id] = $post_data['topic_id'];
- if (!isset($topic_replies_real[$post_data['topic_id']]))
+ if ($post_data['post_visibility'] == ITEM_DELETED)
{
- $topic_replies_real[$post_data['topic_id']] = $post_data['topic_replies_real'];
+ continue;
}
+
+ $is_disapproving = true;
}
- // Now we build the log array
- foreach ($post_disapprove_list as $post_id => $topic_id)
+ if (confirm_box(true))
{
- // If the count of disapproved posts for the topic is greater
- // than topic's real replies count, the whole topic is disapproved/deleted
- if (sizeof(array_keys($post_disapprove_list, $topic_id)) > $topic_replies_real[$topic_id])
+ $disapprove_log = $disapprove_log_topics = $disapprove_log_posts = array();
+ $topic_posts_unapproved = $post_disapprove_list = $topic_information = array();
+
+ // Build a list of posts to be disapproved and get the related topics real replies count
+ foreach ($post_info as $post_id => $post_data)
{
- // Don't write the log more than once for every topic
- if (!isset($disapprove_log_topics[$topic_id]))
+ $post_disapprove_list[$post_id] = $post_data['topic_id'];
+ if (!isset($topic_posts_unapproved[$post_data['topic_id']]))
{
- // Build disapproved topics log
- $disapprove_log_topics[$topic_id] = array(
- 'type' => 'topic',
- 'post_subject' => $post_info[$post_id]['topic_title'],
- 'forum_id' => $post_info[$post_id]['forum_id'],
- 'topic_id' => 0, // useless to log a topic id, as it will be deleted
- );
+ $topic_information[$post_data['topic_id']] = $post_data;
+ $topic_posts_unapproved[$post_data['topic_id']] = 0;
}
+ $topic_posts_unapproved[$post_data['topic_id']]++;
}
- else
+
+ // Now we build the log array
+ foreach ($post_disapprove_list as $post_id => $topic_id)
{
- // Build disapproved posts log
- $disapprove_log_posts[] = array(
- 'type' => 'post',
- 'post_subject' => $post_info[$post_id]['post_subject'],
- 'forum_id' => $post_info[$post_id]['forum_id'],
- 'topic_id' => $post_info[$post_id]['topic_id'],
- );
+ // If the count of disapproved posts for the topic is equal
+ // to the number of unapproved posts in the topic, and there are no different
+ // posts, we disapprove the hole topic
+ if ($topic_information[$topic_id]['topic_posts_approved'] == 0 &&
+ $topic_information[$topic_id]['topic_posts_softdeleted'] == 0 &&
+ $topic_information[$topic_id]['topic_posts_unapproved'] == $topic_posts_unapproved[$topic_id])
+ {
+ // Don't write the log more than once for every topic
+ if (!isset($disapprove_log_topics[$topic_id]))
+ {
+ // Build disapproved topics log
+ $disapprove_log_topics[$topic_id] = array(
+ 'type' => 'topic',
+ 'post_subject' => $post_info[$post_id]['topic_title'],
+ 'forum_id' => $post_info[$post_id]['forum_id'],
+ 'topic_id' => 0, // useless to log a topic id, as it will be deleted
+ 'post_username' => ($post_info[$post_id]['poster_id'] == ANONYMOUS && !empty($post_info[$post_id]['post_username'])) ? $post_info[$post_id]['post_username'] : $post_info[$post_id]['username'],
+ );
+ }
+ }
+ else
+ {
+ // Build disapproved posts log
+ $disapprove_log_posts[] = array(
+ 'type' => 'post',
+ 'post_subject' => $post_info[$post_id]['post_subject'],
+ 'forum_id' => $post_info[$post_id]['forum_id'],
+ 'topic_id' => $post_info[$post_id]['topic_id'],
+ 'post_username' => ($post_info[$post_id]['poster_id'] == ANONYMOUS && !empty($post_info[$post_id]['post_username'])) ? $post_info[$post_id]['post_username'] : $post_info[$post_id]['username'],
+ );
+ }
}
- }
- // Get disapproved posts/topics counts separately
- $num_disapproved_topics = sizeof($disapprove_log_topics);
- $num_disapproved_posts = sizeof($disapprove_log_posts);
+ // Get disapproved posts/topics counts separately
+ $num_disapproved_topics = sizeof($disapprove_log_topics);
+ $num_disapproved_posts = sizeof($disapprove_log_posts);
- // Build the whole log
- $disapprove_log = array_merge($disapprove_log_topics, $disapprove_log_posts);
+ // Build the whole log
+ $disapprove_log = array_merge($disapprove_log_topics, $disapprove_log_posts);
- // Unset unneeded arrays
- unset($post_data, $disapprove_log_topics, $disapprove_log_posts);
+ // Unset unneeded arrays
+ unset($post_data, $disapprove_log_topics, $disapprove_log_posts);
- // Let's do the job - delete disapproved posts
- if (sizeof($post_disapprove_list))
- {
- if (!function_exists('delete_posts'))
+ // Let's do the job - delete disapproved posts
+ if (sizeof($post_disapprove_list))
{
- include_once($phpbb_root_path . 'includes/functions_admin.' . $phpEx);
- }
+ if (!function_exists('delete_posts'))
+ {
+ include($phpbb_root_path . 'includes/functions_admin.' . $phpEx);
+ }
- // We do not check for permissions here, because the moderator allowed approval/disapproval should be allowed to delete the disapproved posts
- // Note: function delete_posts triggers related forums/topics sync,
- // so we don't need to call update_post_information later and to adjust real topic replies or forum topics count manually
- delete_posts('post_id', array_keys($post_disapprove_list));
+ // We do not check for permissions here, because the moderator allowed approval/disapproval should be allowed to delete the disapproved posts
+ // Note: function delete_posts triggers related forums/topics sync,
+ // so we don't need to call update_post_information later and to adjust real topic replies or forum topics count manually
+ delete_posts('post_id', array_keys($post_disapprove_list));
- foreach ($disapprove_log as $log_data)
- {
- add_log('mod', $log_data['forum_id'], $log_data['topic_id'], ($log_data['type'] == 'topic') ? 'LOG_TOPIC_DISAPPROVED' : 'LOG_POST_DISAPPROVED', $log_data['post_subject'], $disapprove_reason);
+ foreach ($disapprove_log as $log_data)
+ {
+ if ($is_disapproving)
+ {
+ $l_log_message = ($log_data['type'] == 'topic') ? 'LOG_TOPIC_DISAPPROVED' : 'LOG_POST_DISAPPROVED';
+ add_log('mod', $log_data['forum_id'], $log_data['topic_id'], $l_log_message, $log_data['post_subject'], $disapprove_reason);
+ }
+ else
+ {
+ $l_log_message = ($log_data['type'] == 'topic') ? 'LOG_DELETE_TOPIC' : 'LOG_DELETE_POST';
+ add_log('mod', $log_data['forum_id'], $log_data['topic_id'], $l_log_message, $log_data['post_subject'], $log_data['post_username']);
+ }
+ }
}
- }
- $messenger = new messenger();
+ $phpbb_notifications = $phpbb_container->get('notification_manager');
- // Notify Poster?
- if ($notify_poster)
- {
$lang_reasons = array();
foreach ($post_info as $post_id => $post_data)
{
- if ($post_data['poster_id'] == ANONYMOUS)
+ $disapprove_all_posts_in_topic = $topic_information[$topic_id]['topic_posts_approved'] == 0 &&
+ $topic_information[$topic_id]['topic_posts_softdeleted'] == 0 &&
+ $topic_information[$topic_id]['topic_posts_unapproved'] == $topic_posts_unapproved[$topic_id];
+
+ $phpbb_notifications->delete_notifications('post_in_queue', $post_id);
+
+ // Do we disapprove the whole topic? Remove potential notifications
+ if ($disapprove_all_posts_in_topic)
{
- continue;
+ $phpbb_notifications->delete_notifications('topic_in_queue', $post_data['topic_id']);
}
- if (isset($disapprove_reason_lang))
+ // Notify Poster?
+ if ($notify_poster)
{
- // Okay we need to get the reason from the posters language
- if (!isset($lang_reasons[$post_data['user_lang']]))
+ if ($post_data['poster_id'] == ANONYMOUS)
{
- // Assign the current users translation as the default, this is not ideal but getting the board default adds another layer of complexity.
- $lang_reasons[$post_data['user_lang']] = $user->lang['report_reasons']['DESCRIPTION'][$disapprove_reason_lang];
+ continue;
+ }
- // Only load up the language pack if the language is different to the current one
- if ($post_data['user_lang'] != $user->lang_name && file_exists($phpbb_root_path . '/language/' . $post_data['user_lang'] . '/mcp.' . $phpEx))
+ $post_data['disapprove_reason'] = '';
+ if (isset($disapprove_reason_lang))
+ {
+ // Okay we need to get the reason from the posters language
+ if (!isset($lang_reasons[$post_data['user_lang']]))
{
- // Load up the language pack
- $lang = array();
- @include($phpbb_root_path . '/language/' . basename($post_data['user_lang']) . '/mcp.' . $phpEx);
+ // Assign the current users translation as the default, this is not ideal but getting the board default adds another layer of complexity.
+ $lang_reasons[$post_data['user_lang']] = $user->lang['report_reasons']['DESCRIPTION'][$disapprove_reason_lang];
- // If we find the reason in this language pack use it
- if (isset($lang['report_reasons']['DESCRIPTION'][$disapprove_reason_lang]))
+ // Only load up the language pack if the language is different to the current one
+ if ($post_data['user_lang'] != $user->lang_name && file_exists($phpbb_root_path . '/language/' . $post_data['user_lang'] . '/mcp.' . $phpEx))
{
- $lang_reasons[$post_data['user_lang']] = $lang['report_reasons']['DESCRIPTION'][$disapprove_reason_lang];
- }
+ // Load up the language pack
+ $lang = array();
+ @include($phpbb_root_path . '/language/' . basename($post_data['user_lang']) . '/mcp.' . $phpEx);
+
+ // If we find the reason in this language pack use it
+ if (isset($lang['report_reasons']['DESCRIPTION'][$disapprove_reason_lang]))
+ {
+ $lang_reasons[$post_data['user_lang']] = $lang['report_reasons']['DESCRIPTION'][$disapprove_reason_lang];
+ }
- unset($lang); // Free memory
+ unset($lang); // Free memory
+ }
}
- }
- $email_disapprove_reason = $lang_reasons[$post_data['user_lang']];
- $email_disapprove_reason .= ($reason) ? "\n\n" . $reason : '';
- }
+ $post_data['disapprove_reason'] = $lang_reasons[$post_data['user_lang']];
+ $post_data['disapprove_reason'] .= ($reason) ? "\n\n" . $reason : '';
+ }
- $email_template = ($post_data['post_id'] == $post_data['topic_first_post_id'] && $post_data['post_id'] == $post_data['topic_last_post_id']) ? 'topic_disapproved' : 'post_disapproved';
- $messenger->template($email_template, $post_data['user_lang']);
+ if ($disapprove_all_posts_in_topic && $topic_information[$topic_id]['topic_posts_unapproved'] == 1)
+ {
+ // If there is only 1 post when disapproving the topic,
+ // we send the user a "disapprove topic" notification...
+ $phpbb_notifications->add_notifications('disapprove_topic', $post_data);
+ }
+ else
+ {
+ // ... otherwise there are multiple unapproved posts and
+ // all of them are disapproved as posts.
+ $phpbb_notifications->add_notifications('disapprove_post', $post_data);
+ }
+ }
+ }
- $messenger->to($post_data['user_email'], $post_data['username']);
- $messenger->im($post_data['user_jabber'], $post_data['username']);
+ unset($lang_reasons, $post_info, $disapprove_reason, $disapprove_reason_lang);
- $messenger->assign_vars(array(
- 'USERNAME' => htmlspecialchars_decode($post_data['username']),
- 'REASON' => htmlspecialchars_decode($email_disapprove_reason),
- 'POST_SUBJECT' => htmlspecialchars_decode(censor_text($post_data['post_subject'])),
- 'TOPIC_TITLE' => htmlspecialchars_decode(censor_text($post_data['topic_title'])))
- );
- $messenger->send($post_data['user_notify_type']);
+ if ($num_disapproved_topics)
+ {
+ $success_msg = ($num_disapproved_topics == 1) ? 'TOPIC' : 'TOPICS';
+ }
+ else
+ {
+ $success_msg = ($num_disapproved_posts == 1) ? 'POST' : 'POSTS';
}
- unset($lang_reasons);
- }
- unset($post_info, $disapprove_reason, $email_disapprove_reason, $disapprove_reason_lang);
+ if ($is_disapproving)
+ {
+ $success_msg .= '_DISAPPROVED_SUCCESS';
+ }
+ else
+ {
+ $success_msg .= '_DELETED_SUCCESS';
+ }
- $messenger->save_queue();
+ meta_refresh(3, $redirect);
+ $message = $user->lang[$success_msg];
- if ($num_disapproved_topics)
- {
- $success_msg = ($num_disapproved_topics == 1) ? 'TOPIC_DISAPPROVED_SUCCESS' : 'TOPICS_DISAPPROVED_SUCCESS';
+ if ($request->is_ajax())
+ {
+ $json_response = new \phpbb\json_response;
+ $json_response->send(array(
+ 'MESSAGE_TITLE' => $user->lang['INFORMATION'],
+ 'MESSAGE_TEXT' => $message,
+ 'REFRESH_DATA' => null,
+ 'visible' => false,
+ ));
+ }
+ $message .= '<br /><br />' . $user->lang('RETURN_PAGE', '<a href="' . $redirect . '">', '</a>');
+ trigger_error($message);
}
else
{
- $success_msg = ($num_disapproved_posts == 1) ? 'POST_DISAPPROVED_SUCCESS' : 'POSTS_DISAPPROVED_SUCCESS';
- }
- }
- else
- {
- include_once($phpbb_root_path . 'includes/functions_display.' . $phpEx);
+ if (!function_exists('display_reasons'))
+ {
+ include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
+ }
- display_reasons($reason_id);
+ $show_notify = false;
- $show_notify = false;
+ foreach ($post_info as $post_data)
+ {
+ if ($post_data['poster_id'] == ANONYMOUS)
+ {
+ continue;
+ }
+ else
+ {
+ $show_notify = true;
+ break;
+ }
+ }
- foreach ($post_info as $post_data)
- {
- if ($post_data['poster_id'] == ANONYMOUS)
+ $l_confirm_msg = 'DISAPPROVE_POST';
+ $confirm_template = 'mcp_approve.html';
+ if ($is_disapproving)
{
- continue;
+ display_reasons($reason_id);
}
else
{
- $show_notify = true;
- break;
- }
- }
+ $user->add_lang('posting');
- $template->assign_vars(array(
- 'S_NOTIFY_POSTER' => $show_notify,
- 'S_APPROVE' => false,
- 'REASON' => $reason,
- 'ADDITIONAL_MSG' => $additional_msg)
- );
+ $l_confirm_msg = 'DELETE_POST_PERMANENTLY';
+ $confirm_template = 'confirm_delete_body.html';
+ }
+ $l_confirm_msg .= ((sizeof($post_id_list) == 1) ? '' : 'S');
- confirm_box(false, 'DISAPPROVE_POST' . ((sizeof($post_id_list) == 1) ? '' : 'S'), $s_hidden_fields, 'mcp_approve.html');
- }
+ $template->assign_vars(array(
+ 'S_NOTIFY_POSTER' => $show_notify,
+ 'S_APPROVE' => false,
+ 'REASON' => ($is_disapproving) ? $reason : '',
+ 'ADDITIONAL_MSG' => $additional_msg,
+ ));
- $redirect = request_var('redirect', "index.$phpEx");
- $redirect = reapply_sid($redirect);
+ confirm_box(false, $l_confirm_msg, $s_hidden_fields, $confirm_template);
+ }
- if (!$success_msg)
- {
redirect($redirect);
}
- else
- {
- meta_refresh(3, $redirect);
- trigger_error($user->lang[$success_msg] . '<br /><br />' . sprintf($user->lang['RETURN_PAGE'], "<a href=\"$redirect\">", '</a>'));
- }
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/mcp/mcp_reports.php b/phpBB/includes/mcp/mcp_reports.php
index b13c8b20c6..8026e071cd 100644
--- a/phpBB/includes/mcp/mcp_reports.php
+++ b/phpBB/includes/mcp/mcp_reports.php
@@ -2,9 +2,8 @@
/**
*
* @package mcp
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -34,7 +33,7 @@ class mcp_reports
function main($id, $mode)
{
global $auth, $db, $user, $template, $cache;
- global $config, $phpbb_root_path, $phpEx, $action;
+ global $config, $phpbb_root_path, $phpEx, $action, $phpbb_container;
include_once($phpbb_root_path . 'includes/functions_posting.' . $phpEx);
@@ -72,7 +71,7 @@ class mcp_reports
// closed reports are accessed by report id
$report_id = request_var('r', 0);
- $sql = 'SELECT r.post_id, r.user_id, r.report_id, r.report_closed, report_time, r.report_text, rr.reason_title, rr.reason_description, u.username, u.username_clean, u.user_colour
+ $sql = 'SELECT r.post_id, r.user_id, r.report_id, r.report_closed, report_time, r.report_text, r.reported_post_text, r.reported_post_uid, r.reported_post_bitfield, r.reported_post_enable_magic_url, r.reported_post_enable_smilies, r.reported_post_enable_bbcode, rr.reason_title, rr.reason_description, u.username, u.username_clean, u.user_colour
FROM ' . REPORTS_TABLE . ' r, ' . REPORTS_REASONS_TABLE . ' rr, ' . USERS_TABLE . ' u
WHERE ' . (($report_id) ? 'r.report_id = ' . $report_id : "r.post_id = $post_id") . '
AND rr.reason_id = r.reason_id
@@ -88,6 +87,10 @@ class mcp_reports
trigger_error('NO_REPORT');
}
+ $phpbb_notifications = $phpbb_container->get('notification_manager');
+
+ $phpbb_notifications->mark_notifications_read('report_post', $post_id, $user->data['user_id']);
+
if (!$report_id && $report['report_closed'])
{
trigger_error('REPORT_CLOSED');
@@ -95,6 +98,10 @@ class mcp_reports
$post_id = $report['post_id'];
$report_id = $report['report_id'];
+
+ $parse_post_flags = $report['reported_post_enable_bbcode'] ? OPTION_FLAG_BBCODE : 0;
+ $parse_post_flags += $report['reported_post_enable_smilies'] ? OPTION_FLAG_SMILIES : 0;
+ $parse_post_flags += $report['reported_post_enable_magic_url'] ? OPTION_FLAG_LINKS : 0;
$post_info = get_post_data(array($post_id), 'm_report', true);
@@ -117,8 +124,9 @@ class mcp_reports
$template->assign_vars(array(
'S_TOPIC_REVIEW' => true,
'S_BBCODE_ALLOWED' => $post_info['enable_bbcode'],
- 'TOPIC_TITLE' => $post_info['topic_title'])
- );
+ 'TOPIC_TITLE' => $post_info['topic_title'],
+ 'REPORTED_POST_ID' => $post_id,
+ ));
}
$topic_tracking_info = $extensions = $attachments = array();
@@ -136,18 +144,7 @@ class mcp_reports
$post_unread = (isset($topic_tracking_info[$post_info['topic_id']]) && $post_info['post_time'] > $topic_tracking_info[$post_info['topic_id']]) ? true : false;
- // Process message, leave it uncensored
- $message = $post_info['post_text'];
- if ($post_info['bbcode_bitfield'])
- {
- include_once($phpbb_root_path . 'includes/bbcode.' . $phpEx);
- $bbcode = new bbcode($post_info['bbcode_bitfield']);
- $bbcode->bbcode_second_pass($message, $post_info['bbcode_uid'], $post_info['bbcode_bitfield']);
- }
-
- $message = bbcode_nl2br($message);
- $message = smiley_text($message);
$report['report_text'] = make_clickable(bbcode_nl2br($report['report_text']));
if ($post_info['post_attachment'] && $auth->acl_get('u_download') && $auth->acl_get('f_download', $post_info['forum_id']))
@@ -168,7 +165,7 @@ class mcp_reports
if (sizeof($attachments))
{
$update_count = array();
- parse_attachments($post_info['forum_id'], $message, $attachments, $update_count);
+ parse_attachments($post_info['forum_id'], $report['reported_post_text'], $attachments, $update_count);
}
// Display not already displayed Attachments for this post, we already parsed them. ;)
@@ -190,7 +187,7 @@ class mcp_reports
'S_CLOSE_ACTION' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=reports&amp;mode=report_details&amp;f=' . $post_info['forum_id'] . '&amp;p=' . $post_id),
'S_CAN_VIEWIP' => $auth->acl_get('m_info', $post_info['forum_id']),
'S_POST_REPORTED' => $post_info['post_reported'],
- 'S_POST_UNAPPROVED' => !$post_info['post_approved'],
+ 'S_POST_UNAPPROVED' => ($post_info['post_visibility'] == ITEM_UNAPPROVED),
'S_POST_LOCKED' => $post_info['post_edit_locked'],
'S_REPORT_CLOSED' => $report['report_closed'],
'S_USER_NOTES' => true,
@@ -228,7 +225,7 @@ class mcp_reports
'REPORTER_NAME' => get_username_string('username', $report['user_id'], $report['username'], $report['user_colour']),
'U_VIEW_REPORTER_PROFILE' => get_username_string('profile', $report['user_id'], $report['username'], $report['user_colour']),
- 'POST_PREVIEW' => $message,
+ 'POST_PREVIEW' => generate_text_for_display($report['reported_post_text'], $report['reported_post_uid'], $report['reported_post_bitfield'], $parse_post_flags, false),
'POST_SUBJECT' => ($post_info['post_subject']) ? $post_info['post_subject'] : $user->lang['NO_SUBJECT'],
'POST_DATE' => $user->format_date($post_info['post_time']),
'POST_IP' => $post_info['poster_ip'],
@@ -296,11 +293,11 @@ class mcp_reports
$global_id = $forum_list[0];
- $sql = 'SELECT SUM(forum_topics) as sum_forum_topics
+ $sql = 'SELECT SUM(forum_topics_approved) as sum_forum_topics
FROM ' . FORUMS_TABLE . '
WHERE ' . $db->sql_in_set('forum_id', $forum_list);
$result = $db->sql_query($sql);
- $forum_info['forum_topics'] = (int) $db->sql_fetchfield('sum_forum_topics');
+ $forum_info['forum_topics_approved'] = (int) $db->sql_fetchfield('sum_forum_topics');
$db->sql_freeresult($result);
}
else
@@ -314,11 +311,11 @@ class mcp_reports
$forum_info = $forum_info[$forum_id];
$forum_list = array($forum_id);
- $global_id = $forum_id;
}
$forum_list[] = 0;
$forum_data = array();
+ $pagination = $phpbb_container->get('pagination');
$forum_options = '<option value="0"' . (($forum_id == 0) ? ' selected="selected"' : '') . '>' . $user->lang['ALL_FORUMS'] . '</option>';
foreach ($forum_list_reports as $row)
@@ -333,7 +330,7 @@ class mcp_reports
$sort_by_sql = $sort_order_sql = array();
mcp_sorting($mode, $sort_days, $sort_key, $sort_dir, $sort_by_sql, $sort_order_sql, $total, $forum_id, $topic_id);
- $forum_topics = ($total == -1) ? $forum_info['forum_topics'] : $total;
+ $forum_topics = ($total == -1) ? $forum_info['forum_topics_approved'] : $total;
$limit_time_sql = ($sort_days) ? 'AND r.report_time >= ' . (time() - ($sort_days * 86400)) : '';
if ($mode == 'reports')
@@ -370,7 +367,7 @@ class mcp_reports
if (sizeof($report_ids))
{
- $sql = 'SELECT t.forum_id, t.topic_id, t.topic_title, p.post_id, p.post_subject, p.post_username, p.poster_id, p.post_time, u.username, u.username_clean, u.user_colour, r.user_id as reporter_id, ru.username as reporter_name, ru.user_colour as reporter_colour, r.report_time, r.report_id
+ $sql = 'SELECT t.forum_id, t.topic_id, t.topic_title, p.post_id, p.post_subject, p.post_username, p.poster_id, p.post_time, p.post_attachment, u.username, u.username_clean, u.user_colour, r.user_id as reporter_id, ru.username as reporter_name, ru.user_colour as reporter_colour, r.report_time, r.report_id
FROM ' . REPORTS_TABLE . ' r, ' . POSTS_TABLE . ' p, ' . TOPICS_TABLE . ' t, ' . USERS_TABLE . ' u, ' . USERS_TABLE . ' ru
WHERE ' . $db->sql_in_set('r.report_id', $report_ids) . '
AND t.topic_id = p.topic_id
@@ -384,14 +381,8 @@ class mcp_reports
$report_data = $rowset = array();
while ($row = $db->sql_fetchrow($result))
{
- $global_topic = ($row['forum_id']) ? false : true;
- if ($global_topic)
- {
- $row['forum_id'] = $global_id;
- }
-
$template->assign_block_vars('postrow', array(
- 'U_VIEWFORUM' => (!$global_topic) ? append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $row['forum_id']) : '',
+ 'U_VIEWFORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $row['forum_id']),
'U_VIEWPOST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $row['forum_id'] . '&amp;p=' . $row['post_id']) . '#p' . $row['post_id'],
'U_VIEW_DETAILS' => append_sid("{$phpbb_root_path}mcp.$phpEx", "i=reports&amp;start=$start&amp;mode=report_details&amp;f={$row['forum_id']}&amp;r={$row['report_id']}"),
@@ -405,19 +396,23 @@ class mcp_reports
'REPORTER' => get_username_string('username', $row['reporter_id'], $row['reporter_name'], $row['reporter_colour']),
'U_REPORTER' => get_username_string('profile', $row['reporter_id'], $row['reporter_name'], $row['reporter_colour']),
- 'FORUM_NAME' => (!$global_topic) ? $forum_data[$row['forum_id']]['forum_name'] : $user->lang['GLOBAL_ANNOUNCEMENT'],
+ 'FORUM_NAME' => $forum_data[$row['forum_id']]['forum_name'],
'POST_ID' => $row['post_id'],
'POST_SUBJECT' => ($row['post_subject']) ? $row['post_subject'] : $user->lang['NO_SUBJECT'],
'POST_TIME' => $user->format_date($row['post_time']),
'REPORT_ID' => $row['report_id'],
'REPORT_TIME' => $user->format_date($row['report_time']),
- 'TOPIC_TITLE' => $row['topic_title'])
- );
+ 'TOPIC_TITLE' => $row['topic_title'],
+ 'ATTACH_ICON_IMG' => ($auth->acl_get('u_download') && $auth->acl_get('f_download', $row['forum_id']) && $row['post_attachment']) ? $user->img('icon_topic_attach', $user->lang['TOTAL_ATTACHMENTS']) : '',
+ ));
}
$db->sql_freeresult($result);
unset($report_ids, $row);
}
+ $base_url = $this->u_action . "&amp;f=$forum_id&amp;t=$topic_id&amp;st=$sort_days&amp;sk=$sort_key&amp;sd=$sort_dir";
+ $pagination->generate_template_pagination($base_url, 'pagination', 'start', $total, $config['topics_per_page'], $start);
+
// Now display the page
$template->assign_vars(array(
'L_EXPLAIN' => ($mode == 'reports') ? $user->lang['MCP_REPORTS_OPEN_EXPLAIN'] : $user->lang['MCP_REPORTS_CLOSED_EXPLAIN'],
@@ -428,11 +423,9 @@ class mcp_reports
'S_FORUM_OPTIONS' => $forum_options,
'S_CLOSED' => ($mode == 'reports_closed') ? true : false,
- 'PAGINATION' => generate_pagination($this->u_action . "&amp;f=$forum_id&amp;t=$topic_id&amp;st=$sort_days&amp;sk=$sort_key&amp;sd=$sort_dir", $total, $config['topics_per_page'], $start),
- 'PAGE_NUMBER' => on_page($total, $config['topics_per_page'], $start),
'TOPIC_ID' => $topic_id,
'TOTAL' => $total,
- 'TOTAL_REPORTS' => ($total == 1) ? $user->lang['LIST_REPORT'] : sprintf($user->lang['LIST_REPORTS'], $total),
+ 'TOTAL_REPORTS' => $user->lang('LIST_REPORTS', (int) $total),
)
);
@@ -448,7 +441,7 @@ class mcp_reports
function close_report($report_id_list, $mode, $action, $pm = false)
{
global $db, $template, $user, $config, $auth;
- global $phpEx, $phpbb_root_path;
+ global $phpEx, $phpbb_root_path, $phpbb_container;
$pm_where = ($pm) ? ' AND r.post_id = 0 ' : ' AND r.pm_id = 0 ';
$id_column = ($pm) ? 'pm_id' : 'post_id';
@@ -622,20 +615,22 @@ function close_report($report_id_list, $mode, $action, $pm = false)
}
unset($close_report_posts, $close_report_topics);
+ $phpbb_notifications = $phpbb_container->get('notification_manager');
+
foreach ($reports as $report)
{
if ($pm)
{
add_log('mod', 0, 0, 'LOG_PM_REPORT_' . strtoupper($action) . 'D', $post_info[$report['pm_id']]['message_subject']);
+ $phpbb_notifications->delete_notifications('report_pm', $report['pm_id']);
}
else
{
add_log('mod', $post_info[$report['post_id']]['forum_id'], $post_info[$report['post_id']]['topic_id'], 'LOG_REPORT_' . strtoupper($action) . 'D', $post_info[$report['post_id']]['post_subject']);
+ $phpbb_notifications->delete_notifications('report_post', $report['post_id']);
}
}
- $messenger = new messenger();
-
// Notify reporters
if (sizeof($notify_reporters))
{
@@ -648,30 +643,21 @@ function close_report($report_id_list, $mode, $action, $pm = false)
$post_id = $reporter[$id_column];
- $messenger->template((($pm) ? 'pm_report_' : 'report_') . $action . 'd', $reporter['user_lang']);
-
- $messenger->to($reporter['user_email'], $reporter['username']);
- $messenger->im($reporter['user_jabber'], $reporter['username']);
-
if ($pm)
{
- $messenger->assign_vars(array(
- 'USERNAME' => htmlspecialchars_decode($reporter['username']),
- 'CLOSER_NAME' => htmlspecialchars_decode($user->data['username']),
- 'PM_SUBJECT' => htmlspecialchars_decode(censor_text($post_info[$post_id]['message_subject'])),
- ));
+ $phpbb_notifications->add_notifications('report_pm_closed', array_merge($post_info[$post_id], array(
+ 'reporter' => $reporter['user_id'],
+ 'closer_id' => $user->data['user_id'],
+ 'from_user_id' => $post_info[$post_id]['author_id'],
+ )));
}
else
{
- $messenger->assign_vars(array(
- 'USERNAME' => htmlspecialchars_decode($reporter['username']),
- 'CLOSER_NAME' => htmlspecialchars_decode($user->data['username']),
- 'POST_SUBJECT' => htmlspecialchars_decode(censor_text($post_info[$post_id]['post_subject'])),
- 'TOPIC_TITLE' => htmlspecialchars_decode(censor_text($post_info[$post_id]['topic_title'])))
- );
+ $phpbb_notifications->add_notifications('report_post_closed', array_merge($post_info[$post_id], array(
+ 'reporter' => $reporter['user_id'],
+ 'closer_id' => $user->data['user_id'],
+ )));
}
-
- $messenger->send($reporter['user_notify_type']);
}
}
@@ -686,8 +672,6 @@ function close_report($report_id_list, $mode, $action, $pm = false)
unset($notify_reporters, $post_info, $reports);
- $messenger->save_queue();
-
$success_msg = (sizeof($report_id_list) == 1) ? "{$pm_prefix}REPORT_" . strtoupper($action) . 'D_SUCCESS' : "{$pm_prefix}REPORTS_" . strtoupper($action) . 'D_SUCCESS';
}
else
@@ -725,5 +709,3 @@ function close_report($report_id_list, $mode, $action, $pm = false)
trigger_error($user->lang[$success_msg] . '<br /><br />' . $return_forum . $return_topic . sprintf($user->lang['RETURN_PAGE'], "<a href=\"$redirect\">", '</a>'));
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/mcp/mcp_topic.php b/phpBB/includes/mcp/mcp_topic.php
index 8e0e89e3da..cdb88bf2bf 100644
--- a/phpBB/includes/mcp/mcp_topic.php
+++ b/phpBB/includes/mcp/mcp_topic.php
@@ -2,9 +2,8 @@
/**
*
* @package mcp
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -22,11 +21,12 @@ if (!defined('IN_PHPBB'))
function mcp_topic_view($id, $mode, $action)
{
global $phpEx, $phpbb_root_path, $config;
- global $template, $db, $user, $auth, $cache;
+ global $template, $db, $user, $auth, $cache, $phpbb_container;
$url = append_sid("{$phpbb_root_path}mcp.$phpEx?" . extra_url());
$user->add_lang('viewtopic');
+ $pagination = $phpbb_container->get('pagination');
$topic_id = request_var('t', 0);
$topic_info = get_topic_data(array($topic_id), false, true);
@@ -85,8 +85,8 @@ function mcp_topic_view($id, $mode, $action)
$subject = $topic_info['topic_title'];
}
- // Approve posts?
- if ($action == 'approve' && $auth->acl_get('m_approve', $topic_info['forum_id']))
+ // Restore or pprove posts?
+ if (($action == 'restore' || $action == 'approve') && $auth->acl_get('m_approve', $topic_info['forum_id']))
{
include($phpbb_root_path . 'includes/mcp/mcp_queue.' . $phpEx);
include_once($phpbb_root_path . 'includes/functions_posting.' . $phpEx);
@@ -99,7 +99,7 @@ function mcp_topic_view($id, $mode, $action)
if (!$sort)
{
- approve_post($post_id_list, $id, $mode);
+ mcp_queue::approve_posts($action, $post_id_list, $id, $mode);
}
}
@@ -113,17 +113,11 @@ function mcp_topic_view($id, $mode, $action)
mcp_sorting('viewtopic', $sort_days, $sort_key, $sort_dir, $sort_by_sql, $sort_order_sql, $total, $topic_info['forum_id'], $topic_id, $where_sql);
$limit_time_sql = ($sort_days) ? 'AND p.post_time >= ' . (time() - ($sort_days * 86400)) : '';
+ $phpbb_content_visibility = $phpbb_container->get('content.visibility');
if ($total == -1)
{
- if ($auth->acl_get('m_approve', $topic_info['forum_id']))
- {
- $total = $topic_info['topic_replies_real'] + 1;
- }
- else
- {
- $total = $topic_info['topic_replies'] + 1;
- }
+ $total = $phpbb_content_visibility->get_count('topic_posts', $topic_info, $topic_info['forum_id']);
}
$posts_per_page = max(0, request_var('posts_per_page', intval($config['posts_per_page'])));
@@ -136,18 +130,13 @@ function mcp_topic_view($id, $mode, $action)
{
$start = 0;
}
-
- // Make sure $start is set to the last page if it exceeds the amount
- if ($start < 0 || $start >= $total)
- {
- $start = ($start < 0) ? 0 : floor(($total - 1) / $posts_per_page) * $posts_per_page;
- }
+ $start = $pagination->validate_start($start, $posts_per_page, $total);
$sql = 'SELECT u.username, u.username_clean, u.user_colour, p.*
FROM ' . POSTS_TABLE . ' p, ' . USERS_TABLE . ' u
WHERE ' . (($action == 'reports') ? 'p.post_reported = 1 AND ' : '') . '
- p.topic_id = ' . $topic_id . ' ' .
- ((!$auth->acl_get('m_approve', $topic_info['forum_id'])) ? ' AND p.post_approved = 1 ' : '') . '
+ p.topic_id = ' . $topic_id . '
+ AND ' . $phpbb_content_visibility->get_visibility_sql('post', $topic_info['forum_id'], 'p.') . '
AND p.poster_id = u.user_id ' .
$limit_time_sql . '
ORDER BY ' . $sort_order_sql;
@@ -183,7 +172,7 @@ function mcp_topic_view($id, $mode, $action)
$topic_tracking_info = get_complete_topic_tracking($topic_info['forum_id'], $topic_id);
}
- $has_unapproved_posts = false;
+ $has_unapproved_posts = $has_deleted_posts = false;
// Grab extensions
$extensions = $attachments = array();
@@ -214,13 +203,8 @@ function mcp_topic_view($id, $mode, $action)
$message = $row['post_text'];
$post_subject = ($row['post_subject'] != '') ? $row['post_subject'] : $topic_info['topic_title'];
- if ($row['bbcode_bitfield'])
- {
- $bbcode->bbcode_second_pass($message, $row['bbcode_uid'], $row['bbcode_bitfield']);
- }
-
- $message = bbcode_nl2br($message);
- $message = smiley_text($message);
+ $parse_flags = ($row['bbcode_bitfield'] ? OPTION_FLAG_BBCODE : 0) | OPTION_FLAG_SMILIES;
+ $message = generate_text_for_display($message, $row['bbcode_uid'], $row['bbcode_bitfield'], $parse_flags, false);
if (!empty($attachments[$row['post_id']]))
{
@@ -228,11 +212,16 @@ function mcp_topic_view($id, $mode, $action)
parse_attachments($topic_info['forum_id'], $message, $attachments[$row['post_id']], $update_count);
}
- if (!$row['post_approved'])
+ if ($row['post_visibility'] == ITEM_UNAPPROVED)
{
$has_unapproved_posts = true;
}
+ if ($row['post_visibility'] == ITEM_DELETED)
+ {
+ $has_deleted_posts = true;
+ }
+
$post_unread = (isset($topic_tracking_info[$topic_id]) && $row['post_time'] > $topic_tracking_info[$topic_id]) ? true : false;
$template->assign_block_vars('postrow', array(
@@ -250,7 +239,8 @@ function mcp_topic_view($id, $mode, $action)
'MINI_POST_IMG' => ($post_unread) ? $user->img('icon_post_target_unread', 'UNREAD_POST') : $user->img('icon_post_target', 'POST'),
'S_POST_REPORTED' => ($row['post_reported'] && $auth->acl_get('m_report', $topic_info['forum_id'])),
- 'S_POST_UNAPPROVED' => (!$row['post_approved'] && $auth->acl_get('m_approve', $topic_info['forum_id'])),
+ 'S_POST_UNAPPROVED' => ($row['post_visibility'] == ITEM_UNAPPROVED && $auth->acl_get('m_approve', $topic_info['forum_id'])),
+ 'S_POST_DELETED' => ($row['post_visibility'] == ITEM_DELETED && $auth->acl_get('m_approve', $topic_info['forum_id'])),
'S_CHECKED' => (($submitted_id_list && !in_array(intval($row['post_id']), $submitted_id_list)) || in_array(intval($row['post_id']), $checked_ids)) ? true : false,
'S_HAS_ATTACHMENTS' => (!empty($attachments[$row['post_id']])) ? true : false,
@@ -307,6 +297,12 @@ function mcp_topic_view($id, $mode, $action)
'post_ids' => $post_id_list,
));
+ $base_url = append_sid("{$phpbb_root_path}mcp.$phpEx", "i=$id&amp;t={$topic_info['topic_id']}&amp;mode=$mode&amp;action=$action&amp;to_topic_id=$to_topic_id&amp;posts_per_page=$posts_per_page&amp;st=$sort_days&amp;sk=$sort_key&amp;sd=$sort_dir");
+ if ($posts_per_page)
+ {
+ $pagination->generate_template_pagination($base_url, 'pagination', 'start', $total, $posts_per_page, $start);
+ }
+
$template->assign_vars(array(
'TOPIC_TITLE' => $topic_info['topic_title'],
'U_VIEW_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $topic_info['forum_id'] . '&amp;t=' . $topic_info['topic_id']),
@@ -320,6 +316,7 @@ function mcp_topic_view($id, $mode, $action)
'REPORTED_IMG' => $user->img('icon_topic_reported', 'POST_REPORTED'),
'UNAPPROVED_IMG' => $user->img('icon_topic_unapproved', 'POST_UNAPPROVED'),
+ 'DELETED_IMG' => $user->img('icon_topic_deleted', 'POST_DELETED_RESTORE'),
'INFO_IMG' => $user->img('icon_post_info', 'VIEW_INFO'),
'S_MCP_ACTION' => "$url&amp;i=$id&amp;mode=$mode&amp;action=$action&amp;start=$start",
@@ -328,6 +325,7 @@ function mcp_topic_view($id, $mode, $action)
'S_CAN_MERGE' => ($auth->acl_get('m_merge', $topic_info['forum_id'])) ? true : false,
'S_CAN_DELETE' => ($auth->acl_get('m_delete', $topic_info['forum_id'])) ? true : false,
'S_CAN_APPROVE' => ($has_unapproved_posts && $auth->acl_get('m_approve', $topic_info['forum_id'])) ? true : false,
+ 'S_CAN_RESTORE' => ($has_deleted_posts && $auth->acl_get('m_approve', $topic_info['forum_id'])) ? true : false,
'S_CAN_LOCK' => ($auth->acl_get('m_lock', $topic_info['forum_id'])) ? true : false,
'S_CAN_REPORT' => ($auth->acl_get('m_report', $topic_info['forum_id'])) ? true : false,
'S_CAN_SYNC' => $auth->acl_get('m_', $topic_info['forum_id']),
@@ -345,9 +343,7 @@ function mcp_topic_view($id, $mode, $action)
'RETURN_TOPIC' => sprintf($user->lang['RETURN_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f={$topic_info['forum_id']}&amp;t={$topic_info['topic_id']}&amp;start=$start") . '">', '</a>'),
'RETURN_FORUM' => sprintf($user->lang['RETURN_FORUM'], '<a href="' . append_sid("{$phpbb_root_path}viewforum.$phpEx", "f={$topic_info['forum_id']}&amp;start=$start") . '">', '</a>'),
- 'PAGE_NUMBER' => on_page($total, $posts_per_page, $start),
- 'PAGINATION' => (!$posts_per_page) ? '' : generate_pagination(append_sid("{$phpbb_root_path}mcp.$phpEx", "i=$id&amp;t={$topic_info['topic_id']}&amp;mode=$mode&amp;action=$action&amp;to_topic_id=$to_topic_id&amp;posts_per_page=$posts_per_page&amp;st=$sort_days&amp;sk=$sort_key&amp;sd=$sort_dir"), $total, $posts_per_page, $start),
- 'TOTAL_POSTS' => ($total == 1) ? $user->lang['VIEW_TOPIC_POST'] : sprintf($user->lang['VIEW_TOPIC_POSTS'], $total),
+ 'TOTAL_POSTS' => $user->lang('VIEW_TOPIC_POSTS', (int) $total),
));
}
@@ -444,7 +440,7 @@ function split_topic($action, $topic_id, $to_forum_id, $subject)
if ($sort_order_sql[0] == 'u')
{
- $sql = 'SELECT p.post_id, p.forum_id, p.post_approved
+ $sql = 'SELECT p.post_id, p.forum_id, p.post_visibility
FROM ' . POSTS_TABLE . ' p, ' . USERS_TABLE . " u
WHERE p.topic_id = $topic_id
AND p.poster_id = u.user_id
@@ -453,7 +449,7 @@ function split_topic($action, $topic_id, $to_forum_id, $subject)
}
else
{
- $sql = 'SELECT p.post_id, p.forum_id, p.post_approved
+ $sql = 'SELECT p.post_id, p.forum_id, p.post_visibility
FROM ' . POSTS_TABLE . " p
WHERE p.topic_id = $topic_id
$limit_time_sql
@@ -466,7 +462,7 @@ function split_topic($action, $topic_id, $to_forum_id, $subject)
while ($row = $db->sql_fetchrow($result))
{
// If split from selected post (split_beyond), we split the unapproved items too.
- if (!$row['post_approved'] && !$auth->acl_get('m_approve', $row['forum_id']))
+ if ($row['post_visibility'] == ITEM_UNAPPROVED && !$auth->acl_get('m_approve', $row['forum_id']))
{
// continue;
}
@@ -493,10 +489,10 @@ function split_topic($action, $topic_id, $to_forum_id, $subject)
$icon_id = request_var('icon', 0);
$sql_ary = array(
- 'forum_id' => $to_forum_id,
- 'topic_title' => $subject,
- 'icon_id' => $icon_id,
- 'topic_approved'=> 1
+ 'forum_id' => $to_forum_id,
+ 'topic_title' => $subject,
+ 'icon_id' => $icon_id,
+ 'topic_visibility' => 1
);
$sql = 'INSERT INTO ' . TOPICS_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary);
@@ -567,23 +563,15 @@ function split_topic($action, $topic_id, $to_forum_id, $subject)
// Link back to both topics
$return_link = sprintf($user->lang['RETURN_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $post_info['forum_id'] . '&amp;t=' . $post_info['topic_id']) . '">', '</a>') . '<br /><br />' . sprintf($user->lang['RETURN_NEW_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $to_forum_id . '&amp;t=' . $to_topic_id) . '">', '</a>');
- }
- else
- {
- confirm_box(false, ($action == 'split_all') ? 'SPLIT_TOPIC_ALL' : 'SPLIT_TOPIC_BEYOND', $s_hidden_fields);
- }
-
- $redirect = request_var('redirect', "index.$phpEx");
- $redirect = reapply_sid($redirect);
+ $redirect = request_var('redirect', "{$phpbb_root_path}viewtopic.$phpEx?f=$to_forum_id&amp;t=$to_topic_id");
+ $redirect = reapply_sid($redirect);
- if (!$success_msg)
- {
- return;
+ meta_refresh(3, $redirect);
+ trigger_error($user->lang[$success_msg] . '<br /><br />' . $return_link);
}
else
{
- meta_refresh(3, append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$to_forum_id&amp;t=$to_topic_id"));
- trigger_error($user->lang[$success_msg] . '<br /><br />' . $return_link);
+ confirm_box(false, ($action == 'split_all') ? 'SPLIT_TOPIC_ALL' : 'SPLIT_TOPIC_BEYOND', $s_hidden_fields);
}
}
@@ -676,24 +664,14 @@ function merge_posts($topic_id, $to_topic_id)
// Link to the new topic
$return_link .= (($return_link) ? '<br /><br />' : '') . sprintf($user->lang['RETURN_NEW_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $to_forum_id . '&amp;t=' . $to_topic_id) . '">', '</a>');
- }
- else
- {
- confirm_box(false, 'MERGE_POSTS', $s_hidden_fields);
- }
+ $redirect = request_var('redirect', "{$phpbb_root_path}viewtopic.$phpEx?f=$to_forum_id&amp;t=$to_topic_id");
+ $redirect = reapply_sid($redirect);
- $redirect = request_var('redirect', "index.$phpEx");
- $redirect = reapply_sid($redirect);
-
- if (!$success_msg)
- {
- return;
+ meta_refresh(3, $redirect);
+ trigger_error($user->lang[$success_msg] . '<br /><br />' . $return_link);
}
else
{
- meta_refresh(3, append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$to_forum_id&amp;t=$to_topic_id"));
- trigger_error($user->lang[$success_msg] . '<br /><br />' . $return_link);
+ confirm_box(false, 'MERGE_POSTS', $s_hidden_fields);
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/mcp/mcp_warn.php b/phpBB/includes/mcp/mcp_warn.php
index 1016204ff8..d396d004dc 100644
--- a/phpBB/includes/mcp/mcp_warn.php
+++ b/phpBB/includes/mcp/mcp_warn.php
@@ -2,9 +2,8 @@
/**
*
* @package mcp
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -135,10 +134,11 @@ class mcp_warn
*/
function mcp_warn_list_view($action)
{
- global $phpEx, $phpbb_root_path, $config;
+ global $phpEx, $phpbb_root_path, $config, $phpbb_container;
global $template, $db, $user, $auth;
$user->add_lang('memberlist');
+ $pagination = $phpbb_container->get('pagination');
$start = request_var('start', 0);
$st = request_var('st', 0);
@@ -176,6 +176,9 @@ class mcp_warn
));
}
+ $base_url = append_sid("{$phpbb_root_path}mcp.$phpEx", "i=warn&amp;mode=list&amp;st=$st&amp;sk=$sk&amp;sd=$sd");
+ $pagination->generate_template_pagination($base_url, 'pagination', 'start', $user_count, $config['topics_per_page'], $start);
+
$template->assign_vars(array(
'U_POST_ACTION' => $this->u_action,
'S_CLEAR_ALLOWED' => ($auth->acl_get('a_clearlogs')) ? true : false,
@@ -183,9 +186,7 @@ class mcp_warn
'S_SELECT_SORT_KEY' => $s_sort_key,
'S_SELECT_SORT_DAYS' => $s_limit_days,
- 'PAGE_NUMBER' => on_page($user_count, $config['topics_per_page'], $start),
- 'PAGINATION' => generate_pagination(append_sid("{$phpbb_root_path}mcp.$phpEx", "i=warn&amp;mode=list&amp;st=$st&amp;sk=$sk&amp;sd=$sd"), $user_count, $config['topics_per_page'], $start),
- 'TOTAL_USERS' => ($user_count == 1) ? $user->lang['LIST_USER'] : sprintf($user->lang['LIST_USERS'], $user_count),
+ 'TOTAL_USERS' => $user->lang('LIST_USERS', (int) $user_count),
));
}
@@ -252,7 +253,7 @@ class mcp_warn
// Check if can send a notification
if ($config['allow_privmsg'])
{
- $auth2 = new auth();
+ $auth2 = new \phpbb\auth\auth();
$auth2->acl($user_row);
$s_can_notify = ($auth2->acl_get('u_readpm')) ? true : false;
unset($auth2);
@@ -288,28 +289,17 @@ class mcp_warn
// We want to make the message available here as a reminder
// Parse the message and subject
- $message = censor_text($user_row['post_text']);
-
- // Second parse bbcode here
- if ($user_row['bbcode_bitfield'])
- {
- include_once($phpbb_root_path . 'includes/bbcode.' . $phpEx);
-
- $bbcode = new bbcode($user_row['bbcode_bitfield']);
- $bbcode->bbcode_second_pass($message, $user_row['bbcode_uid'], $user_row['bbcode_bitfield']);
- }
-
- $message = bbcode_nl2br($message);
- $message = smiley_text($message);
+ $parse_flags = OPTION_FLAG_SMILIES | ($row['bbcode_bitfield'] ? OPTION_FLAG_BBCODE : 0);
+ $message = generate_text_for_display($user_row['post_text'], $user_row['bbcode_uid'], $user_row['bbcode_bitfield'], $parse_flags, true);
// Generate the appropriate user information for the user we are looking at
- if (!function_exists('get_user_avatar'))
+ if (!function_exists('phpbb_get_user_avatar'))
{
include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
}
get_user_rank($user_row['user_rank'], $user_row['user_posts'], $rank_title, $rank_img, $rank_img_src);
- $avatar_img = get_user_avatar($user_row['user_avatar'], $user_row['user_avatar_type'], $user_row['user_avatar_width'], $user_row['user_avatar_height']);
+ $avatar_img = phpbb_get_user_avatar($user_row);
$template->assign_vars(array(
'U_POST_ACTION' => $this->u_action,
@@ -375,7 +365,7 @@ class mcp_warn
// Check if can send a notification
if ($config['allow_privmsg'])
{
- $auth2 = new auth();
+ $auth2 = new \phpbb\auth\auth();
$auth2->acl($user_row);
$s_can_notify = ($auth2->acl_get('u_readpm')) ? true : false;
unset($auth2);
@@ -408,13 +398,13 @@ class mcp_warn
}
// Generate the appropriate user information for the user we are looking at
- if (!function_exists('get_user_avatar'))
+ if (!function_exists('phpbb_get_user_avatar'))
{
include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
}
get_user_rank($user_row['user_rank'], $user_row['user_posts'], $rank_title, $rank_img, $rank_img_src);
- $avatar_img = get_user_avatar($user_row['user_avatar'], $user_row['user_avatar_type'], $user_row['user_avatar_width'], $user_row['user_avatar_height']);
+ $avatar_img = phpbb_get_user_avatar($user_row);
// OK, they didn't submit a warning so lets build the page for them to do so
$template->assign_vars(array(
@@ -507,5 +497,3 @@ function add_warning($user_row, $warning, $send_pm = true, $post_id = 0)
add_log('mod', $row['forum_id'], $row['topic_id'], 'LOG_USER_WARNING', $user_row['username']);
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/message_parser.php b/phpBB/includes/message_parser.php
index a134fab5d3..ad6743b3a3 100644
--- a/phpBB/includes/message_parser.php
+++ b/phpBB/includes/message_parser.php
@@ -2,9 +2,8 @@
/**
*
* @package phpBB3
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -104,6 +103,8 @@ class bbcode_firstpass extends bbcode
*/
function bbcode_init($allow_custom_bbcode = true)
{
+ global $phpbb_dispatcher;
+
static $rowset;
// This array holds all bbcode data. BBCodes will be processed in this
@@ -163,6 +164,21 @@ class bbcode_firstpass extends bbcode
'regexp' => array($row['first_pass_match'] => str_replace('$uid', $this->bbcode_uid, $row['first_pass_replace']))
);
}
+
+ $bbcodes = $this->bbcodes;
+
+ /**
+ * Event to modify the bbcode data for later parsing
+ *
+ * @event core.modify_bbcode_init
+ * @var array bbcodes Array of bbcode data for use in parsing
+ * @var array rowset Array of bbcode data from the database
+ * @since 3.1.0-a3
+ */
+ $vars = array('bbcodes', 'rowset');
+ extract($phpbb_dispatcher->trigger_event('core.modify_bbcode_init', compact($vars)));
+
+ $this->bbcodes = $bbcodes;
}
/**
@@ -210,7 +226,7 @@ class bbcode_firstpass extends bbcode
if ($config['max_' . $this->mode . '_font_size'] && $config['max_' . $this->mode . '_font_size'] < $stx)
{
- $this->warn_msg[] = sprintf($user->lang['MAX_FONT_SIZE_EXCEEDED'], $config['max_' . $this->mode . '_font_size']);
+ $this->warn_msg[] = $user->lang('MAX_FONT_SIZE_EXCEEDED', (int) $config['max_' . $this->mode . '_font_size']);
return '[size=' . $stx . ']' . $in . '[/size]';
}
@@ -319,13 +335,13 @@ class bbcode_firstpass extends bbcode
if ($config['max_' . $this->mode . '_img_height'] && $config['max_' . $this->mode . '_img_height'] < $stats[1])
{
$error = true;
- $this->warn_msg[] = sprintf($user->lang['MAX_IMG_HEIGHT_EXCEEDED'], $config['max_' . $this->mode . '_img_height']);
+ $this->warn_msg[] = $user->lang('MAX_IMG_HEIGHT_EXCEEDED', (int) $config['max_' . $this->mode . '_img_height']);
}
if ($config['max_' . $this->mode . '_img_width'] && $config['max_' . $this->mode . '_img_width'] < $stats[0])
{
$error = true;
- $this->warn_msg[] = sprintf($user->lang['MAX_IMG_WIDTH_EXCEEDED'], $config['max_' . $this->mode . '_img_width']);
+ $this->warn_msg[] = $user->lang('MAX_IMG_WIDTH_EXCEEDED', (int) $config['max_' . $this->mode . '_img_width']);
}
}
}
@@ -374,13 +390,13 @@ class bbcode_firstpass extends bbcode
if ($config['max_' . $this->mode . '_img_height'] && $config['max_' . $this->mode . '_img_height'] < $height)
{
$error = true;
- $this->warn_msg[] = sprintf($user->lang['MAX_FLASH_HEIGHT_EXCEEDED'], $config['max_' . $this->mode . '_img_height']);
+ $this->warn_msg[] = $user->lang('MAX_FLASH_HEIGHT_EXCEEDED', (int) $config['max_' . $this->mode . '_img_height']);
}
if ($config['max_' . $this->mode . '_img_width'] && $config['max_' . $this->mode . '_img_width'] < $width)
{
$error = true;
- $this->warn_msg[] = sprintf($user->lang['MAX_FLASH_WIDTH_EXCEEDED'], $config['max_' . $this->mode . '_img_width']);
+ $this->warn_msg[] = $user->lang('MAX_FLASH_WIDTH_EXCEEDED', (int) $config['max_' . $this->mode . '_img_width']);
}
}
@@ -703,17 +719,6 @@ class bbcode_firstpass extends bbcode
{
global $config, $user;
- /**
- * If you change this code, make sure the cases described within the following reports are still working:
- * #3572 - [quote="[test]test"]test [ test[/quote] - (correct: parsed)
- * #14667 - [quote]test[/quote] test ] and [ test [quote]test[/quote] (correct: parsed)
- * #14770 - [quote="["]test[/quote] (correct: parsed)
- * [quote="[i]test[/i]"]test[/quote] (correct: parsed)
- * [quote="[quote]test[/quote]"]test[/quote] (correct: parsed - Username displayed as [quote]test[/quote])
- * #20735 - [quote]test[/[/b]quote] test [/quote][/quote] test - (correct: quoted: "test[/[/b]quote] test" / non-quoted: "[/quote] test" - also failed if layout distorted)
- * #40565 - [quote="a"]a[/quote][quote="a]a[/quote] (correct: first quote tag parsed, second quote tag unparsed)
- */
-
$in = str_replace("\r\n", "\n", str_replace('\"', '"', trim($in)));
if (!$in)
@@ -772,7 +777,7 @@ class bbcode_firstpass extends bbcode
if ($config['max_quote_depth'] && sizeof($close_tags) >= $config['max_quote_depth'])
{
// there are too many nested quotes
- $error_ary['quote_depth'] = sprintf($user->lang['QUOTE_DEPTH_EXCEEDED'], $config['max_quote_depth']);
+ $error_ary['quote_depth'] = $user->lang('QUOTE_DEPTH_EXCEEDED', (int) $config['max_quote_depth']);
$out .= $buffer . $tok;
$tok = '[]';
@@ -1062,6 +1067,12 @@ class parse_message extends bbcode_firstpass
var $mode;
/**
+ * The plupload object used for dealing with attachments
+ * @var \phpbb\plupload\plupload
+ */
+ protected $plupload;
+
+ /**
* Init - give message here or manually
*/
function parse_message($message = '')
@@ -1117,7 +1128,7 @@ class parse_message extends bbcode_firstpass
// Maximum message length check. 0 disables this check completely.
if ((int) $config['max_' . $mode . '_chars'] > 0 && $message_length > (int) $config['max_' . $mode . '_chars'])
{
- $this->warn_msg[] = sprintf($user->lang['TOO_MANY_CHARS_' . strtoupper($mode)], $message_length, (int) $config['max_' . $mode . '_chars']);
+ $this->warn_msg[] = $user->lang('TOO_MANY_CHARS_' . strtoupper($mode), $message_length, (int) $config['max_' . $mode . '_chars']);
return (!$update_this_message) ? $return_message : $this->warn_msg;
}
@@ -1126,7 +1137,7 @@ class parse_message extends bbcode_firstpass
{
if (!$message_length || $message_length < (int) $config['min_post_chars'])
{
- $this->warn_msg[] = (!$message_length) ? $user->lang['TOO_FEW_CHARS'] : sprintf($user->lang['TOO_FEW_CHARS_LIMIT'], $message_length, (int) $config['min_post_chars']);
+ $this->warn_msg[] = (!$message_length) ? $user->lang['TOO_FEW_CHARS'] : $user->lang('TOO_FEW_CHARS_LIMIT', $message_length, (int) $config['min_post_chars']);
return (!$update_this_message) ? $return_message : $this->warn_msg;
}
}
@@ -1204,6 +1215,8 @@ class parse_message extends bbcode_firstpass
*/
function format_display($allow_bbcode, $allow_magic_url, $allow_smilies, $update_this_message = true)
{
+ global $phpbb_dispatcher;
+
// If false, then the parsed message get returned but internal message not processed.
if (!$update_this_message)
{
@@ -1232,6 +1245,28 @@ class parse_message extends bbcode_firstpass
$this->message = bbcode_nl2br($this->message);
$this->message = smiley_text($this->message, !$allow_smilies);
+ $text = $this->message;
+ $uid = $this->bbcode_uid;
+
+ /**
+ * Event to modify the text after it is parsed
+ *
+ * @event core.modify_format_display_text_after
+ * @var string text The message text to parse
+ * @var string uid The bbcode uid
+ * @var bool allow_bbcode Do we allow bbcodes
+ * @var bool allow_magic_url Do we allow magic urls
+ * @var bool allow_smilies Do we allow smilies
+ * @var bool update_this_message Do we update the internal message
+ * with the parsed result
+ * @since 3.1.0-a3
+ */
+ $vars = array('text', 'uid', 'allow_bbcode', 'allow_magic_url', 'allow_smilies', 'update_this_message');
+ extract($phpbb_dispatcher->trigger_event('core.modify_format_display_text_after', compact($vars)));
+
+ $this->message = $text;
+ $this->bbcode_uid = $uid;
+
if (!$update_this_message)
{
unset($this->message);
@@ -1364,13 +1399,14 @@ class parse_message extends bbcode_firstpass
*/
function parse_attachments($form_name, $mode, $forum_id, $submit, $preview, $refresh, $is_message = false)
{
- global $config, $auth, $user, $phpbb_root_path, $phpEx, $db;
+ global $config, $auth, $user, $phpbb_root_path, $phpEx, $db, $request;
$error = array();
$num_attachments = sizeof($this->attachment_data);
$this->filename_data['filecomment'] = utf8_normalize_nfc(request_var('filecomment', '', true));
- $upload_file = (isset($_FILES[$form_name]) && $_FILES[$form_name]['name'] != 'none' && trim($_FILES[$form_name]['name'])) ? true : false;
+ $upload = $request->file($form_name);
+ $upload_file = (!empty($upload) && $upload['name'] !== 'none' && trim($upload['name']));
$add_file = (isset($_POST['add_file'])) ? true : false;
$delete_file = (isset($_POST['delete_file'])) ? true : false;
@@ -1425,6 +1461,7 @@ class parse_message extends bbcode_firstpass
'is_orphan' => 1,
'real_filename' => $filedata['real_filename'],
'attach_comment'=> $this->filename_data['filecomment'],
+ 'filesize' => $filedata['filesize'],
);
$this->attachment_data = array_merge(array(0 => $new_entry), $this->attachment_data);
@@ -1445,12 +1482,17 @@ class parse_message extends bbcode_firstpass
}
else
{
- $error[] = sprintf($user->lang['TOO_MANY_ATTACHMENTS'], $cfg['max_attachments']);
+ $error[] = $user->lang('TOO_MANY_ATTACHMENTS', (int) $cfg['max_attachments']);
}
}
if ($preview || $refresh || sizeof($error))
{
+ if (isset($this->plupload) && $this->plupload->is_active())
+ {
+ $json_response = new \phpbb\json_response();
+ }
+
// Perform actions on temporary attachments
if ($delete_file)
{
@@ -1495,13 +1537,17 @@ class parse_message extends bbcode_firstpass
// Reindex Array
$this->attachment_data = array_values($this->attachment_data);
+ if (isset($this->plupload) && $this->plupload->is_active())
+ {
+ $json_response->send($this->attachment_data);
+ }
}
}
else if (($add_file || $preview) && $upload_file)
{
if ($num_attachments < $cfg['max_attachments'] || $auth->acl_gets('m_', 'a_', $forum_id))
{
- $filedata = upload_attachment($form_name, $forum_id, false, '', $is_message);
+ $filedata = upload_attachment($form_name, $forum_id, false, '', $is_message, false, $this->plupload);
$error = array_merge($error, $filedata['error']);
if (!sizeof($error))
@@ -1527,16 +1573,39 @@ class parse_message extends bbcode_firstpass
'is_orphan' => 1,
'real_filename' => $filedata['real_filename'],
'attach_comment'=> $this->filename_data['filecomment'],
+ 'filesize' => $filedata['filesize'],
);
$this->attachment_data = array_merge(array(0 => $new_entry), $this->attachment_data);
$this->message = preg_replace('#\[attachment=([0-9]+)\](.*?)\[\/attachment\]#e', "'[attachment='.(\\1 + 1).']\\2[/attachment]'", $this->message);
$this->filename_data['filecomment'] = '';
+
+ if (isset($this->plupload) && $this->plupload->is_active())
+ {
+ $download_url = append_sid("{$phpbb_root_path}download/file.{$phpEx}", 'mode=view&amp;id=' . $new_entry['attach_id']);
+
+ // Send the client the attachment data to maintain state
+ $json_response->send(array('data' => $this->attachment_data, 'download_url' => $download_url));
+ }
}
}
else
{
- $error[] = sprintf($user->lang['TOO_MANY_ATTACHMENTS'], $cfg['max_attachments']);
+ $error[] = $user->lang('TOO_MANY_ATTACHMENTS', (int) $cfg['max_attachments']);
+ }
+
+ if (!empty($error) && isset($this->plupload) && $this->plupload->is_active())
+ {
+ // If this is a plupload (and thus ajax) request, give the
+ // client the first error we have
+ $json_response->send(array(
+ 'jsonrpc' => '2.0',
+ 'id' => 'id',
+ 'error' => array(
+ 'code' => 105,
+ 'message' => current($error),
+ ),
+ ));
}
}
}
@@ -1553,9 +1622,10 @@ class parse_message extends bbcode_firstpass
function get_submitted_attachment_data($check_user_id = false)
{
global $user, $db, $phpbb_root_path, $phpEx, $config;
+ global $request;
$this->filename_data['filecomment'] = utf8_normalize_nfc(request_var('filecomment', '', true));
- $attachment_data = (isset($_POST['attachment_data'])) ? $_POST['attachment_data'] : array();
+ $attachment_data = $request->variable('attachment_data', array(0 => array('' => '')), true, \phpbb\request\request_interface::POST);
$this->attachment_data = array();
$check_user_id = ($check_user_id === false) ? $user->data['user_id'] : $check_user_id;
@@ -1583,7 +1653,7 @@ class parse_message extends bbcode_firstpass
if (sizeof($not_orphan))
{
// Get the attachment data, based on the poster id...
- $sql = 'SELECT attach_id, is_orphan, real_filename, attach_comment
+ $sql = 'SELECT attach_id, is_orphan, real_filename, attach_comment, filesize
FROM ' . ATTACHMENTS_TABLE . '
WHERE ' . $db->sql_in_set('attach_id', array_keys($not_orphan)) . '
AND poster_id = ' . $check_user_id;
@@ -1593,7 +1663,7 @@ class parse_message extends bbcode_firstpass
{
$pos = $not_orphan[$row['attach_id']];
$this->attachment_data[$pos] = $row;
- set_var($this->attachment_data[$pos]['attach_comment'], $_POST['attachment_data'][$pos]['attach_comment'], 'string', true);
+ $this->attachment_data[$pos]['attach_comment'] = $attachment_data[$pos]['attach_comment'];
unset($not_orphan[$row['attach_id']]);
}
@@ -1608,7 +1678,7 @@ class parse_message extends bbcode_firstpass
// Regenerate newly uploaded attachments
if (sizeof($orphan))
{
- $sql = 'SELECT attach_id, is_orphan, real_filename, attach_comment
+ $sql = 'SELECT attach_id, is_orphan, real_filename, attach_comment, filesize
FROM ' . ATTACHMENTS_TABLE . '
WHERE ' . $db->sql_in_set('attach_id', array_keys($orphan)) . '
AND poster_id = ' . $user->data['user_id'] . '
@@ -1619,7 +1689,7 @@ class parse_message extends bbcode_firstpass
{
$pos = $orphan[$row['attach_id']];
$this->attachment_data[$pos] = $row;
- set_var($this->attachment_data[$pos]['attach_comment'], $_POST['attachment_data'][$pos]['attach_comment'], 'string', true);
+ $this->attachment_data[$pos]['attach_comment'] = $attachment_data[$pos]['attach_comment'];
unset($orphan[$row['attach_id']]);
}
@@ -1697,6 +1767,16 @@ class parse_message extends bbcode_firstpass
$poll['poll_max_options'] = ($poll['poll_max_options'] < 1) ? 1 : (($poll['poll_max_options'] > $config['max_poll_options']) ? $config['max_poll_options'] : $poll['poll_max_options']);
}
-}
-?> \ No newline at end of file
+ /**
+ * Setter function for passing the plupload object
+ *
+ * @param \phpbb\plupload\plupload $plupload The plupload object
+ *
+ * @return null
+ */
+ public function set_plupload(\phpbb\plupload\plupload $plupload)
+ {
+ $this->plupload = $plupload;
+ }
+}
diff --git a/phpBB/includes/questionnaire/questionnaire.php b/phpBB/includes/questionnaire/questionnaire.php
index 3268775cb6..6f2727a38c 100644
--- a/phpBB/includes/questionnaire/questionnaire.php
+++ b/phpBB/includes/questionnaire/questionnaire.php
@@ -2,9 +2,8 @@
/**
*
* @package phpBB3
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -148,23 +147,15 @@ class phpbb_questionnaire_system_data_provider
*/
function get_data()
{
- // Start discovering the IPV4 server address, if available
- $server_address = '0.0.0.0';
+ global $request;
- if (!empty($_SERVER['SERVER_ADDR']))
- {
- $server_address = $_SERVER['SERVER_ADDR'];
- }
-
- // Running on IIS?
- if (!empty($_SERVER['LOCAL_ADDR']))
- {
- $server_address = $_SERVER['LOCAL_ADDR'];
- }
+ // Start discovering the IPV4 server address, if available
+ // Try apache, IIS, fall back to 0.0.0.0
+ $server_address = htmlspecialchars_decode($request->server('SERVER_ADDR', $request->server('LOCAL_ADDR', '0.0.0.0')));
return array(
'os' => PHP_OS,
- 'httpd' => $_SERVER['SERVER_SOFTWARE'],
+ 'httpd' => htmlspecialchars_decode($request->server('SERVER_SOFTWARE')),
// we don't want the real IP address (for privacy policy reasons) but only
// a network address to see whether your installation is running on a private or public network.
'private_ip' => $this->is_private_ip($server_address),
@@ -269,6 +260,8 @@ class phpbb_questionnaire_phpbb_data_provider
include("{$phpbb_root_path}config.$phpEx");
unset($dbhost, $dbport, $dbname, $dbuser, $dbpasswd); // Just a precaution
+ $dbms = phpbb_convert_30_dbms_to_31($dbms);
+
// Only send certain config vars
$config_vars = array(
'active_sessions' => true,
@@ -313,7 +306,6 @@ class phpbb_questionnaire_phpbb_data_provider
'avatar_max_width' => true,
'avatar_min_height' => true,
'avatar_min_width' => true,
- 'board_dst' => true,
'board_email_form' => true,
'board_hide_emails' => true,
'board_timezone' => true,
@@ -482,17 +474,16 @@ class phpbb_questionnaire_phpbb_data_provider
}
}
- global $db;
+ global $db, $request;
$result['dbms'] = $dbms;
$result['acm_type'] = $acm_type;
- $result['load_extensions'] = $load_extensions;
$result['user_agent'] = 'Unknown';
$result['dbms_version'] = $db->sql_server_info(true);
// Try to get user agent vendor and version
$match = array();
- $user_agent = (!empty($_SERVER['HTTP_USER_AGENT'])) ? (string) $_SERVER['HTTP_USER_AGENT'] : '';
+ $user_agent = $request->header('User-Agent');
$agents = array('firefox', 'msie', 'opera', 'chrome', 'safari', 'mozilla', 'seamonkey', 'konqueror', 'netscape', 'gecko', 'navigator', 'mosaic', 'lynx', 'amaya', 'omniweb', 'avant', 'camino', 'flock', 'aol');
// We check here 1 by 1 because some strings occur after others (for example Mozilla [...] Firefox/)
@@ -508,5 +499,3 @@ class phpbb_questionnaire_phpbb_data_provider
return $result;
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/sphinxapi.php b/phpBB/includes/sphinxapi.php
new file mode 100644
index 0000000000..6c3b66710c
--- /dev/null
+++ b/phpBB/includes/sphinxapi.php
@@ -0,0 +1,1712 @@
+<?php
+
+//
+// $Id: sphinxapi.php 3087 2012-01-30 23:07:35Z shodan $
+//
+
+//
+// Copyright (c) 2001-2012, Andrew Aksyonoff
+// Copyright (c) 2008-2012, Sphinx Technologies Inc
+// All rights reserved
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License. You should have
+// received a copy of the GPL license along with this program; if you
+// did not, you can find it at http://www.gnu.org/
+//
+
+/////////////////////////////////////////////////////////////////////////////
+// PHP version of Sphinx searchd client (PHP API)
+/////////////////////////////////////////////////////////////////////////////
+
+/// known searchd commands
+define ( "SEARCHD_COMMAND_SEARCH", 0 );
+define ( "SEARCHD_COMMAND_EXCERPT", 1 );
+define ( "SEARCHD_COMMAND_UPDATE", 2 );
+define ( "SEARCHD_COMMAND_KEYWORDS", 3 );
+define ( "SEARCHD_COMMAND_PERSIST", 4 );
+define ( "SEARCHD_COMMAND_STATUS", 5 );
+define ( "SEARCHD_COMMAND_FLUSHATTRS", 7 );
+
+/// current client-side command implementation versions
+define ( "VER_COMMAND_SEARCH", 0x119 );
+define ( "VER_COMMAND_EXCERPT", 0x104 );
+define ( "VER_COMMAND_UPDATE", 0x102 );
+define ( "VER_COMMAND_KEYWORDS", 0x100 );
+define ( "VER_COMMAND_STATUS", 0x100 );
+define ( "VER_COMMAND_QUERY", 0x100 );
+define ( "VER_COMMAND_FLUSHATTRS", 0x100 );
+
+/// known searchd status codes
+define ( "SEARCHD_OK", 0 );
+define ( "SEARCHD_ERROR", 1 );
+define ( "SEARCHD_RETRY", 2 );
+define ( "SEARCHD_WARNING", 3 );
+
+/// known match modes
+define ( "SPH_MATCH_ALL", 0 );
+define ( "SPH_MATCH_ANY", 1 );
+define ( "SPH_MATCH_PHRASE", 2 );
+define ( "SPH_MATCH_BOOLEAN", 3 );
+define ( "SPH_MATCH_EXTENDED", 4 );
+define ( "SPH_MATCH_FULLSCAN", 5 );
+define ( "SPH_MATCH_EXTENDED2", 6 ); // extended engine V2 (TEMPORARY, WILL BE REMOVED)
+
+/// known ranking modes (ext2 only)
+define ( "SPH_RANK_PROXIMITY_BM25", 0 ); ///< default mode, phrase proximity major factor and BM25 minor one
+define ( "SPH_RANK_BM25", 1 ); ///< statistical mode, BM25 ranking only (faster but worse quality)
+define ( "SPH_RANK_NONE", 2 ); ///< no ranking, all matches get a weight of 1
+define ( "SPH_RANK_WORDCOUNT", 3 ); ///< simple word-count weighting, rank is a weighted sum of per-field keyword occurence counts
+define ( "SPH_RANK_PROXIMITY", 4 );
+define ( "SPH_RANK_MATCHANY", 5 );
+define ( "SPH_RANK_FIELDMASK", 6 );
+define ( "SPH_RANK_SPH04", 7 );
+define ( "SPH_RANK_EXPR", 8 );
+define ( "SPH_RANK_TOTAL", 9 );
+
+/// known sort modes
+define ( "SPH_SORT_RELEVANCE", 0 );
+define ( "SPH_SORT_ATTR_DESC", 1 );
+define ( "SPH_SORT_ATTR_ASC", 2 );
+define ( "SPH_SORT_TIME_SEGMENTS", 3 );
+define ( "SPH_SORT_EXTENDED", 4 );
+define ( "SPH_SORT_EXPR", 5 );
+
+/// known filter types
+define ( "SPH_FILTER_VALUES", 0 );
+define ( "SPH_FILTER_RANGE", 1 );
+define ( "SPH_FILTER_FLOATRANGE", 2 );
+
+/// known attribute types
+define ( "SPH_ATTR_INTEGER", 1 );
+define ( "SPH_ATTR_TIMESTAMP", 2 );
+define ( "SPH_ATTR_ORDINAL", 3 );
+define ( "SPH_ATTR_BOOL", 4 );
+define ( "SPH_ATTR_FLOAT", 5 );
+define ( "SPH_ATTR_BIGINT", 6 );
+define ( "SPH_ATTR_STRING", 7 );
+define ( "SPH_ATTR_MULTI", 0x40000001 );
+define ( "SPH_ATTR_MULTI64", 0x40000002 );
+
+/// known grouping functions
+define ( "SPH_GROUPBY_DAY", 0 );
+define ( "SPH_GROUPBY_WEEK", 1 );
+define ( "SPH_GROUPBY_MONTH", 2 );
+define ( "SPH_GROUPBY_YEAR", 3 );
+define ( "SPH_GROUPBY_ATTR", 4 );
+define ( "SPH_GROUPBY_ATTRPAIR", 5 );
+
+// important properties of PHP's integers:
+// - always signed (one bit short of PHP_INT_SIZE)
+// - conversion from string to int is saturated
+// - float is double
+// - div converts arguments to floats
+// - mod converts arguments to ints
+
+// the packing code below works as follows:
+// - when we got an int, just pack it
+// if performance is a problem, this is the branch users should aim for
+//
+// - otherwise, we got a number in string form
+// this might be due to different reasons, but we assume that this is
+// because it didn't fit into PHP int
+//
+// - factor the string into high and low ints for packing
+// - if we have bcmath, then it is used
+// - if we don't, we have to do it manually (this is the fun part)
+//
+// - x64 branch does factoring using ints
+// - x32 (ab)uses floats, since we can't fit unsigned 32-bit number into an int
+//
+// unpacking routines are pretty much the same.
+// - return ints if we can
+// - otherwise format number into a string
+
+/// pack 64-bit signed
+function sphPackI64 ( $v )
+{
+ assert ( is_numeric($v) );
+
+ // x64
+ if ( PHP_INT_SIZE>=8 )
+ {
+ $v = (int)$v;
+ return pack ( "NN", $v>>32, $v&0xFFFFFFFF );
+ }
+
+ // x32, int
+ if ( is_int($v) )
+ return pack ( "NN", $v < 0 ? -1 : 0, $v );
+
+ // x32, bcmath
+ if ( function_exists("bcmul") )
+ {
+ if ( bccomp ( $v, 0 ) == -1 )
+ $v = bcadd ( "18446744073709551616", $v );
+ $h = bcdiv ( $v, "4294967296", 0 );
+ $l = bcmod ( $v, "4294967296" );
+ return pack ( "NN", (float)$h, (float)$l ); // conversion to float is intentional; int would lose 31st bit
+ }
+
+ // x32, no-bcmath
+ $p = max(0, strlen($v) - 13);
+ $lo = abs((float)substr($v, $p));
+ $hi = abs((float)substr($v, 0, $p));
+
+ $m = $lo + $hi*1316134912.0; // (10 ^ 13) % (1 << 32) = 1316134912
+ $q = floor($m/4294967296.0);
+ $l = $m - ($q*4294967296.0);
+ $h = $hi*2328.0 + $q; // (10 ^ 13) / (1 << 32) = 2328
+
+ if ( $v<0 )
+ {
+ if ( $l==0 )
+ $h = 4294967296.0 - $h;
+ else
+ {
+ $h = 4294967295.0 - $h;
+ $l = 4294967296.0 - $l;
+ }
+ }
+ return pack ( "NN", $h, $l );
+}
+
+/// pack 64-bit unsigned
+function sphPackU64 ( $v )
+{
+ assert ( is_numeric($v) );
+
+ // x64
+ if ( PHP_INT_SIZE>=8 )
+ {
+ assert ( $v>=0 );
+
+ // x64, int
+ if ( is_int($v) )
+ return pack ( "NN", $v>>32, $v&0xFFFFFFFF );
+
+ // x64, bcmath
+ if ( function_exists("bcmul") )
+ {
+ $h = bcdiv ( $v, 4294967296, 0 );
+ $l = bcmod ( $v, 4294967296 );
+ return pack ( "NN", $h, $l );
+ }
+
+ // x64, no-bcmath
+ $p = max ( 0, strlen($v) - 13 );
+ $lo = (int)substr ( $v, $p );
+ $hi = (int)substr ( $v, 0, $p );
+
+ $m = $lo + $hi*1316134912;
+ $l = $m % 4294967296;
+ $h = $hi*2328 + (int)($m/4294967296);
+
+ return pack ( "NN", $h, $l );
+ }
+
+ // x32, int
+ if ( is_int($v) )
+ return pack ( "NN", 0, $v );
+
+ // x32, bcmath
+ if ( function_exists("bcmul") )
+ {
+ $h = bcdiv ( $v, "4294967296", 0 );
+ $l = bcmod ( $v, "4294967296" );
+ return pack ( "NN", (float)$h, (float)$l ); // conversion to float is intentional; int would lose 31st bit
+ }
+
+ // x32, no-bcmath
+ $p = max(0, strlen($v) - 13);
+ $lo = (float)substr($v, $p);
+ $hi = (float)substr($v, 0, $p);
+
+ $m = $lo + $hi*1316134912.0;
+ $q = floor($m / 4294967296.0);
+ $l = $m - ($q * 4294967296.0);
+ $h = $hi*2328.0 + $q;
+
+ return pack ( "NN", $h, $l );
+}
+
+// unpack 64-bit unsigned
+function sphUnpackU64 ( $v )
+{
+ list ( $hi, $lo ) = array_values ( unpack ( "N*N*", $v ) );
+
+ if ( PHP_INT_SIZE>=8 )
+ {
+ if ( $hi<0 ) $hi += (1<<32); // because php 5.2.2 to 5.2.5 is totally fucked up again
+ if ( $lo<0 ) $lo += (1<<32);
+
+ // x64, int
+ if ( $hi<=2147483647 )
+ return ($hi<<32) + $lo;
+
+ // x64, bcmath
+ if ( function_exists("bcmul") )
+ return bcadd ( $lo, bcmul ( $hi, "4294967296" ) );
+
+ // x64, no-bcmath
+ $C = 100000;
+ $h = ((int)($hi / $C) << 32) + (int)($lo / $C);
+ $l = (($hi % $C) << 32) + ($lo % $C);
+ if ( $l>$C )
+ {
+ $h += (int)($l / $C);
+ $l = $l % $C;
+ }
+
+ if ( $h==0 )
+ return $l;
+ return sprintf ( "%d%05d", $h, $l );
+ }
+
+ // x32, int
+ if ( $hi==0 )
+ {
+ if ( $lo>0 )
+ return $lo;
+ return sprintf ( "%u", $lo );
+ }
+
+ $hi = sprintf ( "%u", $hi );
+ $lo = sprintf ( "%u", $lo );
+
+ // x32, bcmath
+ if ( function_exists("bcmul") )
+ return bcadd ( $lo, bcmul ( $hi, "4294967296" ) );
+
+ // x32, no-bcmath
+ $hi = (float)$hi;
+ $lo = (float)$lo;
+
+ $q = floor($hi/10000000.0);
+ $r = $hi - $q*10000000.0;
+ $m = $lo + $r*4967296.0;
+ $mq = floor($m/10000000.0);
+ $l = $m - $mq*10000000.0;
+ $h = $q*4294967296.0 + $r*429.0 + $mq;
+
+ $h = sprintf ( "%.0f", $h );
+ $l = sprintf ( "%07.0f", $l );
+ if ( $h=="0" )
+ return sprintf( "%.0f", (float)$l );
+ return $h . $l;
+}
+
+// unpack 64-bit signed
+function sphUnpackI64 ( $v )
+{
+ list ( $hi, $lo ) = array_values ( unpack ( "N*N*", $v ) );
+
+ // x64
+ if ( PHP_INT_SIZE>=8 )
+ {
+ if ( $hi<0 ) $hi += (1<<32); // because php 5.2.2 to 5.2.5 is totally fucked up again
+ if ( $lo<0 ) $lo += (1<<32);
+
+ return ($hi<<32) + $lo;
+ }
+
+ // x32, int
+ if ( $hi==0 )
+ {
+ if ( $lo>0 )
+ return $lo;
+ return sprintf ( "%u", $lo );
+ }
+ // x32, int
+ elseif ( $hi==-1 )
+ {
+ if ( $lo<0 )
+ return $lo;
+ return sprintf ( "%.0f", $lo - 4294967296.0 );
+ }
+
+ $neg = "";
+ $c = 0;
+ if ( $hi<0 )
+ {
+ $hi = ~$hi;
+ $lo = ~$lo;
+ $c = 1;
+ $neg = "-";
+ }
+
+ $hi = sprintf ( "%u", $hi );
+ $lo = sprintf ( "%u", $lo );
+
+ // x32, bcmath
+ if ( function_exists("bcmul") )
+ return $neg . bcadd ( bcadd ( $lo, bcmul ( $hi, "4294967296" ) ), $c );
+
+ // x32, no-bcmath
+ $hi = (float)$hi;
+ $lo = (float)$lo;
+
+ $q = floor($hi/10000000.0);
+ $r = $hi - $q*10000000.0;
+ $m = $lo + $r*4967296.0;
+ $mq = floor($m/10000000.0);
+ $l = $m - $mq*10000000.0 + $c;
+ $h = $q*4294967296.0 + $r*429.0 + $mq;
+ if ( $l==10000000 )
+ {
+ $l = 0;
+ $h += 1;
+ }
+
+ $h = sprintf ( "%.0f", $h );
+ $l = sprintf ( "%07.0f", $l );
+ if ( $h=="0" )
+ return $neg . sprintf( "%.0f", (float)$l );
+ return $neg . $h . $l;
+}
+
+
+function sphFixUint ( $value )
+{
+ if ( PHP_INT_SIZE>=8 )
+ {
+ // x64 route, workaround broken unpack() in 5.2.2+
+ if ( $value<0 ) $value += (1<<32);
+ return $value;
+ }
+ else
+ {
+ // x32 route, workaround php signed/unsigned braindamage
+ return sprintf ( "%u", $value );
+ }
+}
+
+
+/// sphinx searchd client class
+class SphinxClient
+{
+ var $_host; ///< searchd host (default is "localhost")
+ var $_port; ///< searchd port (default is 9312)
+ var $_offset; ///< how many records to seek from result-set start (default is 0)
+ var $_limit; ///< how many records to return from result-set starting at offset (default is 20)
+ var $_mode; ///< query matching mode (default is SPH_MATCH_ALL)
+ var $_weights; ///< per-field weights (default is 1 for all fields)
+ var $_sort; ///< match sorting mode (default is SPH_SORT_RELEVANCE)
+ var $_sortby; ///< attribute to sort by (defualt is "")
+ var $_min_id; ///< min ID to match (default is 0, which means no limit)
+ var $_max_id; ///< max ID to match (default is 0, which means no limit)
+ var $_filters; ///< search filters
+ var $_groupby; ///< group-by attribute name
+ var $_groupfunc; ///< group-by function (to pre-process group-by attribute value with)
+ var $_groupsort; ///< group-by sorting clause (to sort groups in result set with)
+ var $_groupdistinct;///< group-by count-distinct attribute
+ var $_maxmatches; ///< max matches to retrieve
+ var $_cutoff; ///< cutoff to stop searching at (default is 0)
+ var $_retrycount; ///< distributed retries count
+ var $_retrydelay; ///< distributed retries delay
+ var $_anchor; ///< geographical anchor point
+ var $_indexweights; ///< per-index weights
+ var $_ranker; ///< ranking mode (default is SPH_RANK_PROXIMITY_BM25)
+ var $_rankexpr; ///< ranking mode expression (for SPH_RANK_EXPR)
+ var $_maxquerytime; ///< max query time, milliseconds (default is 0, do not limit)
+ var $_fieldweights; ///< per-field-name weights
+ var $_overrides; ///< per-query attribute values overrides
+ var $_select; ///< select-list (attributes or expressions, with optional aliases)
+
+ var $_error; ///< last error message
+ var $_warning; ///< last warning message
+ var $_connerror; ///< connection error vs remote error flag
+
+ var $_reqs; ///< requests array for multi-query
+ var $_mbenc; ///< stored mbstring encoding
+ var $_arrayresult; ///< whether $result["matches"] should be a hash or an array
+ var $_timeout; ///< connect timeout
+
+ /////////////////////////////////////////////////////////////////////////////
+ // common stuff
+ /////////////////////////////////////////////////////////////////////////////
+
+ /// create a new client object and fill defaults
+ function SphinxClient ()
+ {
+ // per-client-object settings
+ $this->_host = "localhost";
+ $this->_port = 9312;
+ $this->_path = false;
+ $this->_socket = false;
+
+ // per-query settings
+ $this->_offset = 0;
+ $this->_limit = 20;
+ $this->_mode = SPH_MATCH_ALL;
+ $this->_weights = array ();
+ $this->_sort = SPH_SORT_RELEVANCE;
+ $this->_sortby = "";
+ $this->_min_id = 0;
+ $this->_max_id = 0;
+ $this->_filters = array ();
+ $this->_groupby = "";
+ $this->_groupfunc = SPH_GROUPBY_DAY;
+ $this->_groupsort = "@group desc";
+ $this->_groupdistinct= "";
+ $this->_maxmatches = 1000;
+ $this->_cutoff = 0;
+ $this->_retrycount = 0;
+ $this->_retrydelay = 0;
+ $this->_anchor = array ();
+ $this->_indexweights= array ();
+ $this->_ranker = SPH_RANK_PROXIMITY_BM25;
+ $this->_rankexpr = "";
+ $this->_maxquerytime= 0;
+ $this->_fieldweights= array();
+ $this->_overrides = array();
+ $this->_select = "*";
+
+ $this->_error = ""; // per-reply fields (for single-query case)
+ $this->_warning = "";
+ $this->_connerror = false;
+
+ $this->_reqs = array (); // requests storage (for multi-query case)
+ $this->_mbenc = "";
+ $this->_arrayresult = false;
+ $this->_timeout = 0;
+ }
+
+ function __destruct()
+ {
+ if ( $this->_socket !== false )
+ fclose ( $this->_socket );
+ }
+
+ /// get last error message (string)
+ function GetLastError ()
+ {
+ return $this->_error;
+ }
+
+ /// get last warning message (string)
+ function GetLastWarning ()
+ {
+ return $this->_warning;
+ }
+
+ /// get last error flag (to tell network connection errors from searchd errors or broken responses)
+ function IsConnectError()
+ {
+ return $this->_connerror;
+ }
+
+ /// set searchd host name (string) and port (integer)
+ function SetServer ( $host, $port = 0 )
+ {
+ assert ( is_string($host) );
+ if ( $host[0] == '/')
+ {
+ $this->_path = 'unix://' . $host;
+ return;
+ }
+ if ( substr ( $host, 0, 7 )=="unix://" )
+ {
+ $this->_path = $host;
+ return;
+ }
+
+ assert ( is_int($port) );
+ $this->_host = $host;
+ $this->_port = $port;
+ $this->_path = '';
+
+ }
+
+ /// set server connection timeout (0 to remove)
+ function SetConnectTimeout ( $timeout )
+ {
+ assert ( is_numeric($timeout) );
+ $this->_timeout = $timeout;
+ }
+
+
+ function _Send ( $handle, $data, $length )
+ {
+ if ( feof($handle) || fwrite ( $handle, $data, $length ) !== $length )
+ {
+ $this->_error = 'connection unexpectedly closed (timed out?)';
+ $this->_connerror = true;
+ return false;
+ }
+ return true;
+ }
+
+ /////////////////////////////////////////////////////////////////////////////
+
+ /// enter mbstring workaround mode
+ function _MBPush ()
+ {
+ $this->_mbenc = "";
+ if ( ini_get ( "mbstring.func_overload" ) & 2 )
+ {
+ $this->_mbenc = mb_internal_encoding();
+ mb_internal_encoding ( "latin1" );
+ }
+ }
+
+ /// leave mbstring workaround mode
+ function _MBPop ()
+ {
+ if ( $this->_mbenc )
+ mb_internal_encoding ( $this->_mbenc );
+ }
+
+ /// connect to searchd server
+ function _Connect ()
+ {
+ if ( $this->_socket!==false )
+ {
+ // we are in persistent connection mode, so we have a socket
+ // however, need to check whether it's still alive
+ if ( !@feof ( $this->_socket ) )
+ return $this->_socket;
+
+ // force reopen
+ $this->_socket = false;
+ }
+
+ $errno = 0;
+ $errstr = "";
+ $this->_connerror = false;
+
+ if ( $this->_path )
+ {
+ $host = $this->_path;
+ $port = 0;
+ }
+ else
+ {
+ $host = $this->_host;
+ $port = $this->_port;
+ }
+
+ if ( $this->_timeout<=0 )
+ $fp = @fsockopen ( $host, $port, $errno, $errstr );
+ else
+ $fp = @fsockopen ( $host, $port, $errno, $errstr, $this->_timeout );
+
+ if ( !$fp )
+ {
+ if ( $this->_path )
+ $location = $this->_path;
+ else
+ $location = "{$this->_host}:{$this->_port}";
+
+ $errstr = trim ( $errstr );
+ $this->_error = "connection to $location failed (errno=$errno, msg=$errstr)";
+ $this->_connerror = true;
+ return false;
+ }
+
+ // send my version
+ // this is a subtle part. we must do it before (!) reading back from searchd.
+ // because otherwise under some conditions (reported on FreeBSD for instance)
+ // TCP stack could throttle write-write-read pattern because of Nagle.
+ if ( !$this->_Send ( $fp, pack ( "N", 1 ), 4 ) )
+ {
+ fclose ( $fp );
+ $this->_error = "failed to send client protocol version";
+ return false;
+ }
+
+ // check version
+ list(,$v) = unpack ( "N*", fread ( $fp, 4 ) );
+ $v = (int)$v;
+ if ( $v<1 )
+ {
+ fclose ( $fp );
+ $this->_error = "expected searchd protocol version 1+, got version '$v'";
+ return false;
+ }
+
+ return $fp;
+ }
+
+ /// get and check response packet from searchd server
+ function _GetResponse ( $fp, $client_ver )
+ {
+ $response = "";
+ $len = 0;
+
+ $header = fread ( $fp, 8 );
+ if ( strlen($header)==8 )
+ {
+ list ( $status, $ver, $len ) = array_values ( unpack ( "n2a/Nb", $header ) );
+ $left = $len;
+ while ( $left>0 && !feof($fp) )
+ {
+ $chunk = fread ( $fp, min ( 8192, $left ) );
+ if ( $chunk )
+ {
+ $response .= $chunk;
+ $left -= strlen($chunk);
+ }
+ }
+ }
+ if ( $this->_socket === false )
+ fclose ( $fp );
+
+ // check response
+ $read = strlen ( $response );
+ if ( !$response || $read!=$len )
+ {
+ $this->_error = $len
+ ? "failed to read searchd response (status=$status, ver=$ver, len=$len, read=$read)"
+ : "received zero-sized searchd response";
+ return false;
+ }
+
+ // check status
+ if ( $status==SEARCHD_WARNING )
+ {
+ list(,$wlen) = unpack ( "N*", substr ( $response, 0, 4 ) );
+ $this->_warning = substr ( $response, 4, $wlen );
+ return substr ( $response, 4+$wlen );
+ }
+ if ( $status==SEARCHD_ERROR )
+ {
+ $this->_error = "searchd error: " . substr ( $response, 4 );
+ return false;
+ }
+ if ( $status==SEARCHD_RETRY )
+ {
+ $this->_error = "temporary searchd error: " . substr ( $response, 4 );
+ return false;
+ }
+ if ( $status!=SEARCHD_OK )
+ {
+ $this->_error = "unknown status code '$status'";
+ return false;
+ }
+
+ // check version
+ if ( $ver<$client_ver )
+ {
+ $this->_warning = sprintf ( "searchd command v.%d.%d older than client's v.%d.%d, some options might not work",
+ $ver>>8, $ver&0xff, $client_ver>>8, $client_ver&0xff );
+ }
+
+ return $response;
+ }
+
+ /////////////////////////////////////////////////////////////////////////////
+ // searching
+ /////////////////////////////////////////////////////////////////////////////
+
+ /// set offset and count into result set,
+ /// and optionally set max-matches and cutoff limits
+ function SetLimits ( $offset, $limit, $max=0, $cutoff=0 )
+ {
+ assert ( is_int($offset) );
+ assert ( is_int($limit) );
+ assert ( $offset>=0 );
+ assert ( $limit>0 );
+ assert ( $max>=0 );
+ $this->_offset = $offset;
+ $this->_limit = $limit;
+ if ( $max>0 )
+ $this->_maxmatches = $max;
+ if ( $cutoff>0 )
+ $this->_cutoff = $cutoff;
+ }
+
+ /// set maximum query time, in milliseconds, per-index
+ /// integer, 0 means "do not limit"
+ function SetMaxQueryTime ( $max )
+ {
+ assert ( is_int($max) );
+ assert ( $max>=0 );
+ $this->_maxquerytime = $max;
+ }
+
+ /// set matching mode
+ function SetMatchMode ( $mode )
+ {
+ assert ( $mode==SPH_MATCH_ALL
+ || $mode==SPH_MATCH_ANY
+ || $mode==SPH_MATCH_PHRASE
+ || $mode==SPH_MATCH_BOOLEAN
+ || $mode==SPH_MATCH_EXTENDED
+ || $mode==SPH_MATCH_FULLSCAN
+ || $mode==SPH_MATCH_EXTENDED2 );
+ $this->_mode = $mode;
+ }
+
+ /// set ranking mode
+ function SetRankingMode ( $ranker, $rankexpr="" )
+ {
+ assert ( $ranker>=0 && $ranker<SPH_RANK_TOTAL );
+ assert ( is_string($rankexpr) );
+ $this->_ranker = $ranker;
+ $this->_rankexpr = $rankexpr;
+ }
+
+ /// set matches sorting mode
+ function SetSortMode ( $mode, $sortby="" )
+ {
+ assert (
+ $mode==SPH_SORT_RELEVANCE ||
+ $mode==SPH_SORT_ATTR_DESC ||
+ $mode==SPH_SORT_ATTR_ASC ||
+ $mode==SPH_SORT_TIME_SEGMENTS ||
+ $mode==SPH_SORT_EXTENDED ||
+ $mode==SPH_SORT_EXPR );
+ assert ( is_string($sortby) );
+ assert ( $mode==SPH_SORT_RELEVANCE || strlen($sortby)>0 );
+
+ $this->_sort = $mode;
+ $this->_sortby = $sortby;
+ }
+
+ /// bind per-field weights by order
+ /// DEPRECATED; use SetFieldWeights() instead
+ function SetWeights ( $weights )
+ {
+ assert ( is_array($weights) );
+ foreach ( $weights as $weight )
+ assert ( is_int($weight) );
+
+ $this->_weights = $weights;
+ }
+
+ /// bind per-field weights by name
+ function SetFieldWeights ( $weights )
+ {
+ assert ( is_array($weights) );
+ foreach ( $weights as $name=>$weight )
+ {
+ assert ( is_string($name) );
+ assert ( is_int($weight) );
+ }
+ $this->_fieldweights = $weights;
+ }
+
+ /// bind per-index weights by name
+ function SetIndexWeights ( $weights )
+ {
+ assert ( is_array($weights) );
+ foreach ( $weights as $index=>$weight )
+ {
+ assert ( is_string($index) );
+ assert ( is_int($weight) );
+ }
+ $this->_indexweights = $weights;
+ }
+
+ /// set IDs range to match
+ /// only match records if document ID is beetwen $min and $max (inclusive)
+ function SetIDRange ( $min, $max )
+ {
+ assert ( is_numeric($min) );
+ assert ( is_numeric($max) );
+ assert ( $min<=$max );
+ $this->_min_id = $min;
+ $this->_max_id = $max;
+ }
+
+ /// set values set filter
+ /// only match records where $attribute value is in given set
+ function SetFilter ( $attribute, $values, $exclude=false )
+ {
+ assert ( is_string($attribute) );
+ assert ( is_array($values) );
+ assert ( count($values) );
+
+ if ( is_array($values) && count($values) )
+ {
+ foreach ( $values as $value )
+ assert ( is_numeric($value) );
+
+ $this->_filters[] = array ( "type"=>SPH_FILTER_VALUES, "attr"=>$attribute, "exclude"=>$exclude, "values"=>$values );
+ }
+ }
+
+ /// set range filter
+ /// only match records if $attribute value is beetwen $min and $max (inclusive)
+ function SetFilterRange ( $attribute, $min, $max, $exclude=false )
+ {
+ assert ( is_string($attribute) );
+ assert ( is_numeric($min) );
+ assert ( is_numeric($max) );
+ assert ( $min<=$max );
+
+ $this->_filters[] = array ( "type"=>SPH_FILTER_RANGE, "attr"=>$attribute, "exclude"=>$exclude, "min"=>$min, "max"=>$max );
+ }
+
+ /// set float range filter
+ /// only match records if $attribute value is beetwen $min and $max (inclusive)
+ function SetFilterFloatRange ( $attribute, $min, $max, $exclude=false )
+ {
+ assert ( is_string($attribute) );
+ assert ( is_float($min) );
+ assert ( is_float($max) );
+ assert ( $min<=$max );
+
+ $this->_filters[] = array ( "type"=>SPH_FILTER_FLOATRANGE, "attr"=>$attribute, "exclude"=>$exclude, "min"=>$min, "max"=>$max );
+ }
+
+ /// setup anchor point for geosphere distance calculations
+ /// required to use @geodist in filters and sorting
+ /// latitude and longitude must be in radians
+ function SetGeoAnchor ( $attrlat, $attrlong, $lat, $long )
+ {
+ assert ( is_string($attrlat) );
+ assert ( is_string($attrlong) );
+ assert ( is_float($lat) );
+ assert ( is_float($long) );
+
+ $this->_anchor = array ( "attrlat"=>$attrlat, "attrlong"=>$attrlong, "lat"=>$lat, "long"=>$long );
+ }
+
+ /// set grouping attribute and function
+ function SetGroupBy ( $attribute, $func, $groupsort="@group desc" )
+ {
+ assert ( is_string($attribute) );
+ assert ( is_string($groupsort) );
+ assert ( $func==SPH_GROUPBY_DAY
+ || $func==SPH_GROUPBY_WEEK
+ || $func==SPH_GROUPBY_MONTH
+ || $func==SPH_GROUPBY_YEAR
+ || $func==SPH_GROUPBY_ATTR
+ || $func==SPH_GROUPBY_ATTRPAIR );
+
+ $this->_groupby = $attribute;
+ $this->_groupfunc = $func;
+ $this->_groupsort = $groupsort;
+ }
+
+ /// set count-distinct attribute for group-by queries
+ function SetGroupDistinct ( $attribute )
+ {
+ assert ( is_string($attribute) );
+ $this->_groupdistinct = $attribute;
+ }
+
+ /// set distributed retries count and delay
+ function SetRetries ( $count, $delay=0 )
+ {
+ assert ( is_int($count) && $count>=0 );
+ assert ( is_int($delay) && $delay>=0 );
+ $this->_retrycount = $count;
+ $this->_retrydelay = $delay;
+ }
+
+ /// set result set format (hash or array; hash by default)
+ /// PHP specific; needed for group-by-MVA result sets that may contain duplicate IDs
+ function SetArrayResult ( $arrayresult )
+ {
+ assert ( is_bool($arrayresult) );
+ $this->_arrayresult = $arrayresult;
+ }
+
+ /// set attribute values override
+ /// there can be only one override per attribute
+ /// $values must be a hash that maps document IDs to attribute values
+ function SetOverride ( $attrname, $attrtype, $values )
+ {
+ assert ( is_string ( $attrname ) );
+ assert ( in_array ( $attrtype, array ( SPH_ATTR_INTEGER, SPH_ATTR_TIMESTAMP, SPH_ATTR_BOOL, SPH_ATTR_FLOAT, SPH_ATTR_BIGINT ) ) );
+ assert ( is_array ( $values ) );
+
+ $this->_overrides[$attrname] = array ( "attr"=>$attrname, "type"=>$attrtype, "values"=>$values );
+ }
+
+ /// set select-list (attributes or expressions), SQL-like syntax
+ function SetSelect ( $select )
+ {
+ assert ( is_string ( $select ) );
+ $this->_select = $select;
+ }
+
+ //////////////////////////////////////////////////////////////////////////////
+
+ /// clear all filters (for multi-queries)
+ function ResetFilters ()
+ {
+ $this->_filters = array();
+ $this->_anchor = array();
+ }
+
+ /// clear groupby settings (for multi-queries)
+ function ResetGroupBy ()
+ {
+ $this->_groupby = "";
+ $this->_groupfunc = SPH_GROUPBY_DAY;
+ $this->_groupsort = "@group desc";
+ $this->_groupdistinct= "";
+ }
+
+ /// clear all attribute value overrides (for multi-queries)
+ function ResetOverrides ()
+ {
+ $this->_overrides = array ();
+ }
+
+ //////////////////////////////////////////////////////////////////////////////
+
+ /// connect to searchd server, run given search query through given indexes,
+ /// and return the search results
+ function Query ( $query, $index="*", $comment="" )
+ {
+ assert ( empty($this->_reqs) );
+
+ $this->AddQuery ( $query, $index, $comment );
+ $results = $this->RunQueries ();
+ $this->_reqs = array (); // just in case it failed too early
+
+ if ( !is_array($results) )
+ return false; // probably network error; error message should be already filled
+
+ $this->_error = $results[0]["error"];
+ $this->_warning = $results[0]["warning"];
+ if ( $results[0]["status"]==SEARCHD_ERROR )
+ return false;
+ else
+ return $results[0];
+ }
+
+ /// helper to pack floats in network byte order
+ function _PackFloat ( $f )
+ {
+ $t1 = pack ( "f", $f ); // machine order
+ list(,$t2) = unpack ( "L*", $t1 ); // int in machine order
+ return pack ( "N", $t2 );
+ }
+
+ /// add query to multi-query batch
+ /// returns index into results array from RunQueries() call
+ function AddQuery ( $query, $index="*", $comment="" )
+ {
+ // mbstring workaround
+ $this->_MBPush ();
+
+ // build request
+ $req = pack ( "NNNN", $this->_offset, $this->_limit, $this->_mode, $this->_ranker );
+ if ( $this->_ranker==SPH_RANK_EXPR )
+ $req .= pack ( "N", strlen($this->_rankexpr) ) . $this->_rankexpr;
+ $req .= pack ( "N", $this->_sort ); // (deprecated) sort mode
+ $req .= pack ( "N", strlen($this->_sortby) ) . $this->_sortby;
+ $req .= pack ( "N", strlen($query) ) . $query; // query itself
+ $req .= pack ( "N", count($this->_weights) ); // weights
+ foreach ( $this->_weights as $weight )
+ $req .= pack ( "N", (int)$weight );
+ $req .= pack ( "N", strlen($index) ) . $index; // indexes
+ $req .= pack ( "N", 1 ); // id64 range marker
+ $req .= sphPackU64 ( $this->_min_id ) . sphPackU64 ( $this->_max_id ); // id64 range
+
+ // filters
+ $req .= pack ( "N", count($this->_filters) );
+ foreach ( $this->_filters as $filter )
+ {
+ $req .= pack ( "N", strlen($filter["attr"]) ) . $filter["attr"];
+ $req .= pack ( "N", $filter["type"] );
+ switch ( $filter["type"] )
+ {
+ case SPH_FILTER_VALUES:
+ $req .= pack ( "N", count($filter["values"]) );
+ foreach ( $filter["values"] as $value )
+ $req .= sphPackI64 ( $value );
+ break;
+
+ case SPH_FILTER_RANGE:
+ $req .= sphPackI64 ( $filter["min"] ) . sphPackI64 ( $filter["max"] );
+ break;
+
+ case SPH_FILTER_FLOATRANGE:
+ $req .= $this->_PackFloat ( $filter["min"] ) . $this->_PackFloat ( $filter["max"] );
+ break;
+
+ default:
+ assert ( 0 && "internal error: unhandled filter type" );
+ }
+ $req .= pack ( "N", $filter["exclude"] );
+ }
+
+ // group-by clause, max-matches count, group-sort clause, cutoff count
+ $req .= pack ( "NN", $this->_groupfunc, strlen($this->_groupby) ) . $this->_groupby;
+ $req .= pack ( "N", $this->_maxmatches );
+ $req .= pack ( "N", strlen($this->_groupsort) ) . $this->_groupsort;
+ $req .= pack ( "NNN", $this->_cutoff, $this->_retrycount, $this->_retrydelay );
+ $req .= pack ( "N", strlen($this->_groupdistinct) ) . $this->_groupdistinct;
+
+ // anchor point
+ if ( empty($this->_anchor) )
+ {
+ $req .= pack ( "N", 0 );
+ } else
+ {
+ $a =& $this->_anchor;
+ $req .= pack ( "N", 1 );
+ $req .= pack ( "N", strlen($a["attrlat"]) ) . $a["attrlat"];
+ $req .= pack ( "N", strlen($a["attrlong"]) ) . $a["attrlong"];
+ $req .= $this->_PackFloat ( $a["lat"] ) . $this->_PackFloat ( $a["long"] );
+ }
+
+ // per-index weights
+ $req .= pack ( "N", count($this->_indexweights) );
+ foreach ( $this->_indexweights as $idx=>$weight )
+ $req .= pack ( "N", strlen($idx) ) . $idx . pack ( "N", $weight );
+
+ // max query time
+ $req .= pack ( "N", $this->_maxquerytime );
+
+ // per-field weights
+ $req .= pack ( "N", count($this->_fieldweights) );
+ foreach ( $this->_fieldweights as $field=>$weight )
+ $req .= pack ( "N", strlen($field) ) . $field . pack ( "N", $weight );
+
+ // comment
+ $req .= pack ( "N", strlen($comment) ) . $comment;
+
+ // attribute overrides
+ $req .= pack ( "N", count($this->_overrides) );
+ foreach ( $this->_overrides as $key => $entry )
+ {
+ $req .= pack ( "N", strlen($entry["attr"]) ) . $entry["attr"];
+ $req .= pack ( "NN", $entry["type"], count($entry["values"]) );
+ foreach ( $entry["values"] as $id=>$val )
+ {
+ assert ( is_numeric($id) );
+ assert ( is_numeric($val) );
+
+ $req .= sphPackU64 ( $id );
+ switch ( $entry["type"] )
+ {
+ case SPH_ATTR_FLOAT: $req .= $this->_PackFloat ( $val ); break;
+ case SPH_ATTR_BIGINT: $req .= sphPackI64 ( $val ); break;
+ default: $req .= pack ( "N", $val ); break;
+ }
+ }
+ }
+
+ // select-list
+ $req .= pack ( "N", strlen($this->_select) ) . $this->_select;
+
+ // mbstring workaround
+ $this->_MBPop ();
+
+ // store request to requests array
+ $this->_reqs[] = $req;
+ return count($this->_reqs)-1;
+ }
+
+ /// connect to searchd, run queries batch, and return an array of result sets
+ function RunQueries ()
+ {
+ if ( empty($this->_reqs) )
+ {
+ $this->_error = "no queries defined, issue AddQuery() first";
+ return false;
+ }
+
+ // mbstring workaround
+ $this->_MBPush ();
+
+ if (!( $fp = $this->_Connect() ))
+ {
+ $this->_MBPop ();
+ return false;
+ }
+
+ // send query, get response
+ $nreqs = count($this->_reqs);
+ $req = join ( "", $this->_reqs );
+ $len = 8+strlen($req);
+ $req = pack ( "nnNNN", SEARCHD_COMMAND_SEARCH, VER_COMMAND_SEARCH, $len, 0, $nreqs ) . $req; // add header
+
+ if ( !( $this->_Send ( $fp, $req, $len+8 ) ) ||
+ !( $response = $this->_GetResponse ( $fp, VER_COMMAND_SEARCH ) ) )
+ {
+ $this->_MBPop ();
+ return false;
+ }
+
+ // query sent ok; we can reset reqs now
+ $this->_reqs = array ();
+
+ // parse and return response
+ return $this->_ParseSearchResponse ( $response, $nreqs );
+ }
+
+ /// parse and return search query (or queries) response
+ function _ParseSearchResponse ( $response, $nreqs )
+ {
+ $p = 0; // current position
+ $max = strlen($response); // max position for checks, to protect against broken responses
+
+ $results = array ();
+ for ( $ires=0; $ires<$nreqs && $p<$max; $ires++ )
+ {
+ $results[] = array();
+ $result =& $results[$ires];
+
+ $result["error"] = "";
+ $result["warning"] = "";
+
+ // extract status
+ list(,$status) = unpack ( "N*", substr ( $response, $p, 4 ) ); $p += 4;
+ $result["status"] = $status;
+ if ( $status!=SEARCHD_OK )
+ {
+ list(,$len) = unpack ( "N*", substr ( $response, $p, 4 ) ); $p += 4;
+ $message = substr ( $response, $p, $len ); $p += $len;
+
+ if ( $status==SEARCHD_WARNING )
+ {
+ $result["warning"] = $message;
+ } else
+ {
+ $result["error"] = $message;
+ continue;
+ }
+ }
+
+ // read schema
+ $fields = array ();
+ $attrs = array ();
+
+ list(,$nfields) = unpack ( "N*", substr ( $response, $p, 4 ) ); $p += 4;
+ while ( $nfields-->0 && $p<$max )
+ {
+ list(,$len) = unpack ( "N*", substr ( $response, $p, 4 ) ); $p += 4;
+ $fields[] = substr ( $response, $p, $len ); $p += $len;
+ }
+ $result["fields"] = $fields;
+
+ list(,$nattrs) = unpack ( "N*", substr ( $response, $p, 4 ) ); $p += 4;
+ while ( $nattrs-->0 && $p<$max )
+ {
+ list(,$len) = unpack ( "N*", substr ( $response, $p, 4 ) ); $p += 4;
+ $attr = substr ( $response, $p, $len ); $p += $len;
+ list(,$type) = unpack ( "N*", substr ( $response, $p, 4 ) ); $p += 4;
+ $attrs[$attr] = $type;
+ }
+ $result["attrs"] = $attrs;
+
+ // read match count
+ list(,$count) = unpack ( "N*", substr ( $response, $p, 4 ) ); $p += 4;
+ list(,$id64) = unpack ( "N*", substr ( $response, $p, 4 ) ); $p += 4;
+
+ // read matches
+ $idx = -1;
+ while ( $count-->0 && $p<$max )
+ {
+ // index into result array
+ $idx++;
+
+ // parse document id and weight
+ if ( $id64 )
+ {
+ $doc = sphUnpackU64 ( substr ( $response, $p, 8 ) ); $p += 8;
+ list(,$weight) = unpack ( "N*", substr ( $response, $p, 4 ) ); $p += 4;
+ }
+ else
+ {
+ list ( $doc, $weight ) = array_values ( unpack ( "N*N*",
+ substr ( $response, $p, 8 ) ) );
+ $p += 8;
+ $doc = sphFixUint($doc);
+ }
+ $weight = sprintf ( "%u", $weight );
+
+ // create match entry
+ if ( $this->_arrayresult )
+ $result["matches"][$idx] = array ( "id"=>$doc, "weight"=>$weight );
+ else
+ $result["matches"][$doc]["weight"] = $weight;
+
+ // parse and create attributes
+ $attrvals = array ();
+ foreach ( $attrs as $attr=>$type )
+ {
+ // handle 64bit ints
+ if ( $type==SPH_ATTR_BIGINT )
+ {
+ $attrvals[$attr] = sphUnpackI64 ( substr ( $response, $p, 8 ) ); $p += 8;
+ continue;
+ }
+
+ // handle floats
+ if ( $type==SPH_ATTR_FLOAT )
+ {
+ list(,$uval) = unpack ( "N*", substr ( $response, $p, 4 ) ); $p += 4;
+ list(,$fval) = unpack ( "f*", pack ( "L", $uval ) );
+ $attrvals[$attr] = $fval;
+ continue;
+ }
+
+ // handle everything else as unsigned ints
+ list(,$val) = unpack ( "N*", substr ( $response, $p, 4 ) ); $p += 4;
+ if ( $type==SPH_ATTR_MULTI )
+ {
+ $attrvals[$attr] = array ();
+ $nvalues = $val;
+ while ( $nvalues-->0 && $p<$max )
+ {
+ list(,$val) = unpack ( "N*", substr ( $response, $p, 4 ) ); $p += 4;
+ $attrvals[$attr][] = sphFixUint($val);
+ }
+ } else if ( $type==SPH_ATTR_MULTI64 )
+ {
+ $attrvals[$attr] = array ();
+ $nvalues = $val;
+ while ( $nvalues>0 && $p<$max )
+ {
+ $attrvals[$attr][] = sphUnpackU64 ( substr ( $response, $p, 8 ) ); $p += 8;
+ $nvalues -= 2;
+ }
+ } else if ( $type==SPH_ATTR_STRING )
+ {
+ $attrvals[$attr] = substr ( $response, $p, $val );
+ $p += $val;
+ } else
+ {
+ $attrvals[$attr] = sphFixUint($val);
+ }
+ }
+
+ if ( $this->_arrayresult )
+ $result["matches"][$idx]["attrs"] = $attrvals;
+ else
+ $result["matches"][$doc]["attrs"] = $attrvals;
+ }
+
+ list ( $total, $total_found, $msecs, $words ) =
+ array_values ( unpack ( "N*N*N*N*", substr ( $response, $p, 16 ) ) );
+ $result["total"] = sprintf ( "%u", $total );
+ $result["total_found"] = sprintf ( "%u", $total_found );
+ $result["time"] = sprintf ( "%.3f", $msecs/1000 );
+ $p += 16;
+
+ while ( $words-->0 && $p<$max )
+ {
+ list(,$len) = unpack ( "N*", substr ( $response, $p, 4 ) ); $p += 4;
+ $word = substr ( $response, $p, $len ); $p += $len;
+ list ( $docs, $hits ) = array_values ( unpack ( "N*N*", substr ( $response, $p, 8 ) ) ); $p += 8;
+ $result["words"][$word] = array (
+ "docs"=>sprintf ( "%u", $docs ),
+ "hits"=>sprintf ( "%u", $hits ) );
+ }
+ }
+
+ $this->_MBPop ();
+ return $results;
+ }
+
+ /////////////////////////////////////////////////////////////////////////////
+ // excerpts generation
+ /////////////////////////////////////////////////////////////////////////////
+
+ /// connect to searchd server, and generate exceprts (snippets)
+ /// of given documents for given query. returns false on failure,
+ /// an array of snippets on success
+ function BuildExcerpts ( $docs, $index, $words, $opts=array() )
+ {
+ assert ( is_array($docs) );
+ assert ( is_string($index) );
+ assert ( is_string($words) );
+ assert ( is_array($opts) );
+
+ $this->_MBPush ();
+
+ if (!( $fp = $this->_Connect() ))
+ {
+ $this->_MBPop();
+ return false;
+ }
+
+ /////////////////
+ // fixup options
+ /////////////////
+
+ if ( !isset($opts["before_match"]) ) $opts["before_match"] = "<b>";
+ if ( !isset($opts["after_match"]) ) $opts["after_match"] = "</b>";
+ if ( !isset($opts["chunk_separator"]) ) $opts["chunk_separator"] = " ... ";
+ if ( !isset($opts["limit"]) ) $opts["limit"] = 256;
+ if ( !isset($opts["limit_passages"]) ) $opts["limit_passages"] = 0;
+ if ( !isset($opts["limit_words"]) ) $opts["limit_words"] = 0;
+ if ( !isset($opts["around"]) ) $opts["around"] = 5;
+ if ( !isset($opts["exact_phrase"]) ) $opts["exact_phrase"] = false;
+ if ( !isset($opts["single_passage"]) ) $opts["single_passage"] = false;
+ if ( !isset($opts["use_boundaries"]) ) $opts["use_boundaries"] = false;
+ if ( !isset($opts["weight_order"]) ) $opts["weight_order"] = false;
+ if ( !isset($opts["query_mode"]) ) $opts["query_mode"] = false;
+ if ( !isset($opts["force_all_words"]) ) $opts["force_all_words"] = false;
+ if ( !isset($opts["start_passage_id"]) ) $opts["start_passage_id"] = 1;
+ if ( !isset($opts["load_files"]) ) $opts["load_files"] = false;
+ if ( !isset($opts["html_strip_mode"]) ) $opts["html_strip_mode"] = "index";
+ if ( !isset($opts["allow_empty"]) ) $opts["allow_empty"] = false;
+ if ( !isset($opts["passage_boundary"]) ) $opts["passage_boundary"] = "none";
+ if ( !isset($opts["emit_zones"]) ) $opts["emit_zones"] = false;
+ if ( !isset($opts["load_files_scattered"]) ) $opts["load_files_scattered"] = false;
+
+
+ /////////////////
+ // build request
+ /////////////////
+
+ // v.1.2 req
+ $flags = 1; // remove spaces
+ if ( $opts["exact_phrase"] ) $flags |= 2;
+ if ( $opts["single_passage"] ) $flags |= 4;
+ if ( $opts["use_boundaries"] ) $flags |= 8;
+ if ( $opts["weight_order"] ) $flags |= 16;
+ if ( $opts["query_mode"] ) $flags |= 32;
+ if ( $opts["force_all_words"] ) $flags |= 64;
+ if ( $opts["load_files"] ) $flags |= 128;
+ if ( $opts["allow_empty"] ) $flags |= 256;
+ if ( $opts["emit_zones"] ) $flags |= 512;
+ if ( $opts["load_files_scattered"] ) $flags |= 1024;
+ $req = pack ( "NN", 0, $flags ); // mode=0, flags=$flags
+ $req .= pack ( "N", strlen($index) ) . $index; // req index
+ $req .= pack ( "N", strlen($words) ) . $words; // req words
+
+ // options
+ $req .= pack ( "N", strlen($opts["before_match"]) ) . $opts["before_match"];
+ $req .= pack ( "N", strlen($opts["after_match"]) ) . $opts["after_match"];
+ $req .= pack ( "N", strlen($opts["chunk_separator"]) ) . $opts["chunk_separator"];
+ $req .= pack ( "NN", (int)$opts["limit"], (int)$opts["around"] );
+ $req .= pack ( "NNN", (int)$opts["limit_passages"], (int)$opts["limit_words"], (int)$opts["start_passage_id"] ); // v.1.2
+ $req .= pack ( "N", strlen($opts["html_strip_mode"]) ) . $opts["html_strip_mode"];
+ $req .= pack ( "N", strlen($opts["passage_boundary"]) ) . $opts["passage_boundary"];
+
+ // documents
+ $req .= pack ( "N", count($docs) );
+ foreach ( $docs as $doc )
+ {
+ assert ( is_string($doc) );
+ $req .= pack ( "N", strlen($doc) ) . $doc;
+ }
+
+ ////////////////////////////
+ // send query, get response
+ ////////////////////////////
+
+ $len = strlen($req);
+ $req = pack ( "nnN", SEARCHD_COMMAND_EXCERPT, VER_COMMAND_EXCERPT, $len ) . $req; // add header
+ if ( !( $this->_Send ( $fp, $req, $len+8 ) ) ||
+ !( $response = $this->_GetResponse ( $fp, VER_COMMAND_EXCERPT ) ) )
+ {
+ $this->_MBPop ();
+ return false;
+ }
+
+ //////////////////
+ // parse response
+ //////////////////
+
+ $pos = 0;
+ $res = array ();
+ $rlen = strlen($response);
+ for ( $i=0; $i<count($docs); $i++ )
+ {
+ list(,$len) = unpack ( "N*", substr ( $response, $pos, 4 ) );
+ $pos += 4;
+
+ if ( $pos+$len > $rlen )
+ {
+ $this->_error = "incomplete reply";
+ $this->_MBPop ();
+ return false;
+ }
+ $res[] = $len ? substr ( $response, $pos, $len ) : "";
+ $pos += $len;
+ }
+
+ $this->_MBPop ();
+ return $res;
+ }
+
+
+ /////////////////////////////////////////////////////////////////////////////
+ // keyword generation
+ /////////////////////////////////////////////////////////////////////////////
+
+ /// connect to searchd server, and generate keyword list for a given query
+ /// returns false on failure,
+ /// an array of words on success
+ function BuildKeywords ( $query, $index, $hits )
+ {
+ assert ( is_string($query) );
+ assert ( is_string($index) );
+ assert ( is_bool($hits) );
+
+ $this->_MBPush ();
+
+ if (!( $fp = $this->_Connect() ))
+ {
+ $this->_MBPop();
+ return false;
+ }
+
+ /////////////////
+ // build request
+ /////////////////
+
+ // v.1.0 req
+ $req = pack ( "N", strlen($query) ) . $query; // req query
+ $req .= pack ( "N", strlen($index) ) . $index; // req index
+ $req .= pack ( "N", (int)$hits );
+
+ ////////////////////////////
+ // send query, get response
+ ////////////////////////////
+
+ $len = strlen($req);
+ $req = pack ( "nnN", SEARCHD_COMMAND_KEYWORDS, VER_COMMAND_KEYWORDS, $len ) . $req; // add header
+ if ( !( $this->_Send ( $fp, $req, $len+8 ) ) ||
+ !( $response = $this->_GetResponse ( $fp, VER_COMMAND_KEYWORDS ) ) )
+ {
+ $this->_MBPop ();
+ return false;
+ }
+
+ //////////////////
+ // parse response
+ //////////////////
+
+ $pos = 0;
+ $res = array ();
+ $rlen = strlen($response);
+ list(,$nwords) = unpack ( "N*", substr ( $response, $pos, 4 ) );
+ $pos += 4;
+ for ( $i=0; $i<$nwords; $i++ )
+ {
+ list(,$len) = unpack ( "N*", substr ( $response, $pos, 4 ) ); $pos += 4;
+ $tokenized = $len ? substr ( $response, $pos, $len ) : "";
+ $pos += $len;
+
+ list(,$len) = unpack ( "N*", substr ( $response, $pos, 4 ) ); $pos += 4;
+ $normalized = $len ? substr ( $response, $pos, $len ) : "";
+ $pos += $len;
+
+ $res[] = array ( "tokenized"=>$tokenized, "normalized"=>$normalized );
+
+ if ( $hits )
+ {
+ list($ndocs,$nhits) = array_values ( unpack ( "N*N*", substr ( $response, $pos, 8 ) ) );
+ $pos += 8;
+ $res [$i]["docs"] = $ndocs;
+ $res [$i]["hits"] = $nhits;
+ }
+
+ if ( $pos > $rlen )
+ {
+ $this->_error = "incomplete reply";
+ $this->_MBPop ();
+ return false;
+ }
+ }
+
+ $this->_MBPop ();
+ return $res;
+ }
+
+ function EscapeString ( $string )
+ {
+ $from = array ( '\\', '(',')','|','-','!','@','~','"','&', '/', '^', '$', '=' );
+ $to = array ( '\\\\', '\(','\)','\|','\-','\!','\@','\~','\"', '\&', '\/', '\^', '\$', '\=' );
+
+ return str_replace ( $from, $to, $string );
+ }
+
+ /////////////////////////////////////////////////////////////////////////////
+ // attribute updates
+ /////////////////////////////////////////////////////////////////////////////
+
+ /// batch update given attributes in given rows in given indexes
+ /// returns amount of updated documents (0 or more) on success, or -1 on failure
+ function UpdateAttributes ( $index, $attrs, $values, $mva=false )
+ {
+ // verify everything
+ assert ( is_string($index) );
+ assert ( is_bool($mva) );
+
+ assert ( is_array($attrs) );
+ foreach ( $attrs as $attr )
+ assert ( is_string($attr) );
+
+ assert ( is_array($values) );
+ foreach ( $values as $id=>$entry )
+ {
+ assert ( is_numeric($id) );
+ assert ( is_array($entry) );
+ assert ( count($entry)==count($attrs) );
+ foreach ( $entry as $v )
+ {
+ if ( $mva )
+ {
+ assert ( is_array($v) );
+ foreach ( $v as $vv )
+ assert ( is_int($vv) );
+ } else
+ assert ( is_int($v) );
+ }
+ }
+
+ // build request
+ $this->_MBPush ();
+ $req = pack ( "N", strlen($index) ) . $index;
+
+ $req .= pack ( "N", count($attrs) );
+ foreach ( $attrs as $attr )
+ {
+ $req .= pack ( "N", strlen($attr) ) . $attr;
+ $req .= pack ( "N", $mva ? 1 : 0 );
+ }
+
+ $req .= pack ( "N", count($values) );
+ foreach ( $values as $id=>$entry )
+ {
+ $req .= sphPackU64 ( $id );
+ foreach ( $entry as $v )
+ {
+ $req .= pack ( "N", $mva ? count($v) : $v );
+ if ( $mva )
+ foreach ( $v as $vv )
+ $req .= pack ( "N", $vv );
+ }
+ }
+
+ // connect, send query, get response
+ if (!( $fp = $this->_Connect() ))
+ {
+ $this->_MBPop ();
+ return -1;
+ }
+
+ $len = strlen($req);
+ $req = pack ( "nnN", SEARCHD_COMMAND_UPDATE, VER_COMMAND_UPDATE, $len ) . $req; // add header
+ if ( !$this->_Send ( $fp, $req, $len+8 ) )
+ {
+ $this->_MBPop ();
+ return -1;
+ }
+
+ if (!( $response = $this->_GetResponse ( $fp, VER_COMMAND_UPDATE ) ))
+ {
+ $this->_MBPop ();
+ return -1;
+ }
+
+ // parse response
+ list(,$updated) = unpack ( "N*", substr ( $response, 0, 4 ) );
+ $this->_MBPop ();
+ return $updated;
+ }
+
+ /////////////////////////////////////////////////////////////////////////////
+ // persistent connections
+ /////////////////////////////////////////////////////////////////////////////
+
+ function Open()
+ {
+ if ( $this->_socket !== false )
+ {
+ $this->_error = 'already connected';
+ return false;
+ }
+ if ( !$fp = $this->_Connect() )
+ return false;
+
+ // command, command version = 0, body length = 4, body = 1
+ $req = pack ( "nnNN", SEARCHD_COMMAND_PERSIST, 0, 4, 1 );
+ if ( !$this->_Send ( $fp, $req, 12 ) )
+ return false;
+
+ $this->_socket = $fp;
+ return true;
+ }
+
+ function Close()
+ {
+ if ( $this->_socket === false )
+ {
+ $this->_error = 'not connected';
+ return false;
+ }
+
+ fclose ( $this->_socket );
+ $this->_socket = false;
+
+ return true;
+ }
+
+ //////////////////////////////////////////////////////////////////////////
+ // status
+ //////////////////////////////////////////////////////////////////////////
+
+ function Status ()
+ {
+ $this->_MBPush ();
+ if (!( $fp = $this->_Connect() ))
+ {
+ $this->_MBPop();
+ return false;
+ }
+
+ $req = pack ( "nnNN", SEARCHD_COMMAND_STATUS, VER_COMMAND_STATUS, 4, 1 ); // len=4, body=1
+ if ( !( $this->_Send ( $fp, $req, 12 ) ) ||
+ !( $response = $this->_GetResponse ( $fp, VER_COMMAND_STATUS ) ) )
+ {
+ $this->_MBPop ();
+ return false;
+ }
+
+ $res = substr ( $response, 4 ); // just ignore length, error handling, etc
+ $p = 0;
+ list ( $rows, $cols ) = array_values ( unpack ( "N*N*", substr ( $response, $p, 8 ) ) ); $p += 8;
+
+ $res = array();
+ for ( $i=0; $i<$rows; $i++ )
+ for ( $j=0; $j<$cols; $j++ )
+ {
+ list(,$len) = unpack ( "N*", substr ( $response, $p, 4 ) ); $p += 4;
+ $res[$i][] = substr ( $response, $p, $len ); $p += $len;
+ }
+
+ $this->_MBPop ();
+ return $res;
+ }
+
+ //////////////////////////////////////////////////////////////////////////
+ // flush
+ //////////////////////////////////////////////////////////////////////////
+
+ function FlushAttributes ()
+ {
+ $this->_MBPush ();
+ if (!( $fp = $this->_Connect() ))
+ {
+ $this->_MBPop();
+ return -1;
+ }
+
+ $req = pack ( "nnN", SEARCHD_COMMAND_FLUSHATTRS, VER_COMMAND_FLUSHATTRS, 0 ); // len=0
+ if ( !( $this->_Send ( $fp, $req, 8 ) ) ||
+ !( $response = $this->_GetResponse ( $fp, VER_COMMAND_FLUSHATTRS ) ) )
+ {
+ $this->_MBPop ();
+ return -1;
+ }
+
+ $tag = -1;
+ if ( strlen($response)==4 )
+ list(,$tag) = unpack ( "N*", $response );
+ else
+ $this->_error = "unexpected response length";
+
+ $this->_MBPop ();
+ return $tag;
+ }
+}
+
+//
+// $Id: sphinxapi.php 3087 2012-01-30 23:07:35Z shodan $
+//
diff --git a/phpBB/includes/startup.php b/phpBB/includes/startup.php
index cf216a65db..441eaec6b1 100644
--- a/phpBB/includes/startup.php
+++ b/phpBB/includes/startup.php
@@ -3,7 +3,7 @@
*
* @package phpBB3
* @copyright (c) 2011 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -20,21 +20,6 @@ if (!defined('E_DEPRECATED'))
define('E_DEPRECATED', 8192);
}
$level = E_ALL & ~E_NOTICE & ~E_DEPRECATED;
-if (version_compare(PHP_VERSION, '5.4.0-dev', '>='))
-{
- // PHP 5.4 adds E_STRICT to E_ALL.
- // Our utf8 normalizer triggers E_STRICT output on PHP 5.4.
- // Unfortunately it cannot be made E_STRICT-clean while
- // continuing to work on PHP 4.
- // Therefore, in phpBB 3.0.x we disable E_STRICT on PHP 5.4+,
- // while phpBB 3.1 will fix utf8 normalizer.
- // E_STRICT is defined starting with PHP 5
- if (!defined('E_STRICT'))
- {
- define('E_STRICT', 2048);
- }
- $level &= ~E_STRICT;
-}
error_reporting($level);
/*
@@ -162,5 +147,36 @@ if (function_exists('date_default_timezone_set') && function_exists('date_defaul
date_default_timezone_set(@date_default_timezone_get());
}
+// Autoloading of dependencies.
+// Three options are supported:
+// 1. If dependencies are installed with Composer, Composer will create a
+// vendor/autoload.php. If this file exists it will be
+// automatically used by phpBB. This is the default mode that phpBB
+// will use when shipped.
+// 2. To disable composer autoloading, PHPBB_NO_COMPOSER_AUTOLOAD can be specified.
+// Additionally specify PHPBB_AUTOLOAD=/path/to/autoload.php in the
+// environment. This is useful for running CLI scripts and tests.
+// /path/to/autoload.php should define and register class loaders
+// for all of phpBB's dependencies.
+// 3. You can also set PHPBB_NO_COMPOSER_AUTOLOAD without setting PHPBB_AUTOLOAD.
+// In this case autoloading needs to be defined before running any phpBB
+// script. This might be useful in cases when phpBB is integrated into a
+// larger program.
+if (getenv('PHPBB_NO_COMPOSER_AUTOLOAD'))
+{
+ if (getenv('PHPBB_AUTOLOAD'))
+ {
+ require(getenv('PHPBB_AUTOLOAD'));
+ }
+}
+else
+{
+ if (!file_exists($phpbb_root_path . 'vendor/autoload.php'))
+ {
+ trigger_error('You have not set up composer dependencies. See http://getcomposer.org/.', E_USER_ERROR);
+ }
+ require($phpbb_root_path . 'vendor/autoload.php');
+}
+
$starttime = explode(' ', microtime());
$starttime = $starttime[1] + $starttime[0];
diff --git a/phpBB/includes/template.php b/phpBB/includes/template.php
deleted file mode 100644
index 9ac395344f..0000000000
--- a/phpBB/includes/template.php
+++ /dev/null
@@ -1,692 +0,0 @@
-<?php
-/**
-*
-* @package phpBB3
-* @version $Id$
-* @copyright (c) 2005 phpBB Group, sections (c) 2001 ispi of Lincoln Inc
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
-*
-*/
-
-/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
-* Base Template class.
-* @package phpBB3
-*/
-class template
-{
- /** variable that holds all the data we'll be substituting into
- * the compiled templates. Takes form:
- * --> $this->_tpldata[block][iteration#][child][iteration#][child2][iteration#][variablename] == value
- * if it's a root-level variable, it'll be like this:
- * --> $this->_tpldata[.][0][varname] == value
- */
- var $_tpldata = array('.' => array(0 => array()));
- var $_rootref;
-
- // Root dir and hash of filenames for each template handle.
- var $root = '';
- var $cachepath = '';
- var $files = array();
- var $filename = array();
- var $files_inherit = array();
- var $files_template = array();
- var $inherit_root = '';
- var $orig_tpl_storedb;
- var $orig_tpl_inherits_id;
-
- // this will hash handle names to the compiled/uncompiled code for that handle.
- var $compiled_code = array();
-
- /**
- * Set template location
- * @access public
- */
- function set_template()
- {
- global $phpbb_root_path, $user;
-
- if (file_exists($phpbb_root_path . 'styles/' . $user->theme['template_path'] . '/template'))
- {
- $this->root = $phpbb_root_path . 'styles/' . $user->theme['template_path'] . '/template';
- $this->cachepath = $phpbb_root_path . 'cache/tpl_' . str_replace('_', '-', $user->theme['template_path']) . '_';
-
- if ($this->orig_tpl_storedb === null)
- {
- $this->orig_tpl_storedb = $user->theme['template_storedb'];
- }
-
- if ($this->orig_tpl_inherits_id === null)
- {
- $this->orig_tpl_inherits_id = $user->theme['template_inherits_id'];
- }
-
- $user->theme['template_storedb'] = $this->orig_tpl_storedb;
- $user->theme['template_inherits_id'] = $this->orig_tpl_inherits_id;
-
- if ($user->theme['template_inherits_id'])
- {
- $this->inherit_root = $phpbb_root_path . 'styles/' . $user->theme['template_inherit_path'] . '/template';
- }
- }
- else
- {
- trigger_error('Template path could not be found: styles/' . $user->theme['template_path'] . '/template', E_USER_ERROR);
- }
-
- $this->_rootref = &$this->_tpldata['.'][0];
-
- return true;
- }
-
- /**
- * Set custom template location (able to use directory outside of phpBB)
- * @access public
- */
- function set_custom_template($template_path, $template_name, $fallback_template_path = false)
- {
- global $phpbb_root_path, $user;
-
- // Make sure $template_path has no ending slash
- if (substr($template_path, -1) == '/')
- {
- $template_path = substr($template_path, 0, -1);
- }
-
- $this->root = $template_path;
- $this->cachepath = $phpbb_root_path . 'cache/ctpl_' . str_replace('_', '-', $template_name) . '_';
-
- if ($fallback_template_path !== false)
- {
- if (substr($fallback_template_path, -1) == '/')
- {
- $fallback_template_path = substr($fallback_template_path, 0, -1);
- }
-
- $this->inherit_root = $fallback_template_path;
- $this->orig_tpl_inherits_id = true;
- }
- else
- {
- $this->orig_tpl_inherits_id = false;
- }
-
- // the database does not store the path or name of a custom template
- // so there is no way we can properly store custom templates there
- $this->orig_tpl_storedb = false;
-
- $this->_rootref = &$this->_tpldata['.'][0];
-
- return true;
- }
-
- /**
- * Sets the template filenames for handles. $filename_array
- * should be a hash of handle => filename pairs.
- * @access public
- */
- function set_filenames($filename_array)
- {
- if (!is_array($filename_array))
- {
- return false;
- }
- foreach ($filename_array as $handle => $filename)
- {
- if (empty($filename))
- {
- trigger_error("template->set_filenames: Empty filename specified for $handle", E_USER_ERROR);
- }
-
- $this->filename[$handle] = $filename;
- $this->files[$handle] = $this->root . '/' . $filename;
-
- if ($this->inherit_root)
- {
- $this->files_inherit[$handle] = $this->inherit_root . '/' . $filename;
- }
- }
-
- return true;
- }
-
- /**
- * Destroy template data set
- * @access public
- */
- function destroy()
- {
- $this->_tpldata = array('.' => array(0 => array()));
- $this->_rootref = &$this->_tpldata['.'][0];
- }
-
- /**
- * Reset/empty complete block
- * @access public
- */
- function destroy_block_vars($blockname)
- {
- if (strpos($blockname, '.') !== false)
- {
- // Nested block.
- $blocks = explode('.', $blockname);
- $blockcount = sizeof($blocks) - 1;
-
- $str = &$this->_tpldata;
- for ($i = 0; $i < $blockcount; $i++)
- {
- $str = &$str[$blocks[$i]];
- $str = &$str[sizeof($str) - 1];
- }
-
- unset($str[$blocks[$blockcount]]);
- }
- else
- {
- // Top-level block.
- unset($this->_tpldata[$blockname]);
- }
-
- return true;
- }
-
- /**
- * Display handle
- * @access public
- */
- function display($handle, $include_once = true)
- {
- global $user, $phpbb_hook;
-
- if (!empty($phpbb_hook) && $phpbb_hook->call_hook(array(__CLASS__, __FUNCTION__), $handle, $include_once, $this))
- {
- if ($phpbb_hook->hook_return(array(__CLASS__, __FUNCTION__)))
- {
- return $phpbb_hook->hook_return_result(array(__CLASS__, __FUNCTION__));
- }
- }
-
- if (defined('IN_ERROR_HANDLER'))
- {
- if ((E_NOTICE & error_reporting()) == E_NOTICE)
- {
- error_reporting(error_reporting() ^ E_NOTICE);
- }
- }
-
- if ($filename = $this->_tpl_load($handle))
- {
- ($include_once) ? include_once($filename) : include($filename);
- }
- else
- {
- eval(' ?>' . $this->compiled_code[$handle] . '<?php ');
- }
-
- return true;
- }
-
- /**
- * Display the handle and assign the output to a template variable or return the compiled result.
- * @access public
- */
- function assign_display($handle, $template_var = '', $return_content = true, $include_once = false)
- {
- ob_start();
- $this->display($handle, $include_once);
- $contents = ob_get_clean();
-
- if ($return_content)
- {
- return $contents;
- }
-
- $this->assign_var($template_var, $contents);
-
- return true;
- }
-
- /**
- * Load a compiled template if possible, if not, recompile it
- * @access private
- */
- function _tpl_load(&$handle)
- {
- global $user, $phpEx, $config;
-
- if (!isset($this->filename[$handle]))
- {
- trigger_error("template->_tpl_load(): No file specified for handle $handle", E_USER_ERROR);
- }
-
- // reload these settings to have the values they had when this object was initialised
- // using set_template or set_custom_template, they might otherwise have been overwritten
- // by other template class instances in between.
- $user->theme['template_storedb'] = $this->orig_tpl_storedb;
- $user->theme['template_inherits_id'] = $this->orig_tpl_inherits_id;
-
- $filename = $this->cachepath . str_replace('/', '.', $this->filename[$handle]) . '.' . $phpEx;
- $this->files_template[$handle] = (isset($user->theme['template_id'])) ? $user->theme['template_id'] : 0;
-
- $recompile = false;
- if (!file_exists($filename) || @filesize($filename) === 0 || defined('DEBUG_EXTRA'))
- {
- $recompile = true;
- }
- else if ($config['load_tplcompile'])
- {
- // No way around it: we need to check inheritance here
- if ($user->theme['template_inherits_id'] && !file_exists($this->files[$handle]))
- {
- $this->files[$handle] = $this->files_inherit[$handle];
- $this->files_template[$handle] = $user->theme['template_inherits_id'];
- }
- $recompile = (@filemtime($filename) < filemtime($this->files[$handle])) ? true : false;
- }
-
- // Recompile page if the original template is newer, otherwise load the compiled version
- if (!$recompile)
- {
- return $filename;
- }
-
- global $db, $phpbb_root_path;
-
- if (!class_exists('template_compile'))
- {
- include($phpbb_root_path . 'includes/functions_template.' . $phpEx);
- }
-
- // Inheritance - we point to another template file for this one. Equality is also used for store_db
- if (isset($user->theme['template_inherits_id']) && $user->theme['template_inherits_id'] && !file_exists($this->files[$handle]))
- {
- $this->files[$handle] = $this->files_inherit[$handle];
- $this->files_template[$handle] = $user->theme['template_inherits_id'];
- }
-
- $compile = new template_compile($this);
-
- // If we don't have a file assigned to this handle, die.
- if (!isset($this->files[$handle]))
- {
- trigger_error("template->_tpl_load(): No file specified for handle $handle", E_USER_ERROR);
- }
-
- // Just compile if no user object is present (happens within the installer)
- if (!$user)
- {
- $compile->_tpl_load_file($handle);
- return false;
- }
-
- if (isset($user->theme['template_storedb']) && $user->theme['template_storedb'])
- {
- $rows = array();
- $ids = array();
- // Inheritance
- if (isset($user->theme['template_inherits_id']) && $user->theme['template_inherits_id'])
- {
- $ids[] = $user->theme['template_inherits_id'];
- }
- $ids[] = $user->theme['template_id'];
-
- foreach ($ids as $id)
- {
- $sql = 'SELECT *
- FROM ' . STYLES_TEMPLATE_DATA_TABLE . '
- WHERE template_id = ' . $id . "
- AND (template_filename = '" . $db->sql_escape($this->filename[$handle]) . "'
- OR template_included " . $db->sql_like_expression($db->any_char . $this->filename[$handle] . ':' . $db->any_char) . ')';
-
- $result = $db->sql_query($sql);
- while ($row = $db->sql_fetchrow($result))
- {
- $rows[$row['template_filename']] = $row;
- }
- $db->sql_freeresult($result);
- }
-
- if (sizeof($rows))
- {
- foreach ($rows as $row)
- {
- $file = $this->root . '/' . $row['template_filename'];
- $force_reload = false;
- if ($row['template_id'] != $user->theme['template_id'])
- {
- // make sure that we are not overlooking a file not in the db yet
- if (isset($user->theme['template_inherits_id']) && $user->theme['template_inherits_id'] && !file_exists($file))
- {
- $file = $this->inherit_root . '/' . $row['template_filename'];
- $this->files[$row['template_filename']] = $file;
- $this->files_inherit[$row['template_filename']] = $file;
- $this->files_template[$row['template_filename']] = $user->theme['template_inherits_id'];
- }
- else if (isset($user->theme['template_inherits_id']) && $user->theme['template_inherits_id'])
- {
- // Ok, we have a situation. There is a file in the subtemplate, but nothing in the DB. We have to fix that.
- $force_reload = true;
- $this->files_template[$row['template_filename']] = $user->theme['template_inherits_id'];
- }
- }
- else
- {
- $this->files_template[$row['template_filename']] = $user->theme['template_id'];
- }
-
- if ($force_reload || $row['template_mtime'] < filemtime($file))
- {
- if ($row['template_filename'] == $this->filename[$handle])
- {
- $compile->_tpl_load_file($handle, true);
- }
- else
- {
- $this->files[$row['template_filename']] = $file;
- $this->filename[$row['template_filename']] = $row['template_filename'];
- $compile->_tpl_load_file($row['template_filename'], true);
- unset($this->compiled_code[$row['template_filename']]);
- unset($this->files[$row['template_filename']]);
- unset($this->filename[$row['template_filename']]);
- }
- }
-
- if ($row['template_filename'] == $this->filename[$handle])
- {
- $this->compiled_code[$handle] = $compile->compile(trim($row['template_data']));
- $compile->compile_write($handle, $this->compiled_code[$handle]);
- }
- else
- {
- // Only bother compiling if it doesn't already exist
- if (!file_exists($this->cachepath . str_replace('/', '.', $row['template_filename']) . '.' . $phpEx))
- {
- $this->filename[$row['template_filename']] = $row['template_filename'];
- $compile->compile_write($row['template_filename'], $compile->compile(trim($row['template_data'])));
- unset($this->filename[$row['template_filename']]);
- }
- }
- }
- }
- else
- {
- $file = $this->root . '/' . $row['template_filename'];
-
- if (isset($user->theme['template_inherits_id']) && $user->theme['template_inherits_id'] && !file_exists($file))
- {
- $file = $this->inherit_root . '/' . $row['template_filename'];
- $this->files[$row['template_filename']] = $file;
- $this->files_inherit[$row['template_filename']] = $file;
- $this->files_template[$row['template_filename']] = $user->theme['template_inherits_id'];
- }
- // Try to load from filesystem and instruct to insert into the styles table...
- $compile->_tpl_load_file($handle, true);
- return false;
- }
-
- return false;
- }
-
- $compile->_tpl_load_file($handle);
- return false;
- }
-
- /**
- * Assign key variable pairs from an array
- * @access public
- */
- function assign_vars($vararray)
- {
- foreach ($vararray as $key => $val)
- {
- $this->_rootref[$key] = $val;
- }
-
- return true;
- }
-
- /**
- * Assign a single variable to a single key
- * @access public
- */
- function assign_var($varname, $varval)
- {
- $this->_rootref[$varname] = $varval;
-
- return true;
- }
-
- /**
- * Assign key variable pairs from an array to a specified block
- * @access public
- */
- function assign_block_vars($blockname, $vararray)
- {
- if (strpos($blockname, '.') !== false)
- {
- // Nested block.
- $blocks = explode('.', $blockname);
- $blockcount = sizeof($blocks) - 1;
-
- $str = &$this->_tpldata;
- for ($i = 0; $i < $blockcount; $i++)
- {
- $str = &$str[$blocks[$i]];
- $str = &$str[sizeof($str) - 1];
- }
-
- $s_row_count = isset($str[$blocks[$blockcount]]) ? sizeof($str[$blocks[$blockcount]]) : 0;
- $vararray['S_ROW_COUNT'] = $s_row_count;
-
- // Assign S_FIRST_ROW
- if (!$s_row_count)
- {
- $vararray['S_FIRST_ROW'] = true;
- }
-
- // Now the tricky part, we always assign S_LAST_ROW and remove the entry before
- // This is much more clever than going through the complete template data on display (phew)
- $vararray['S_LAST_ROW'] = true;
- if ($s_row_count > 0)
- {
- unset($str[$blocks[$blockcount]][($s_row_count - 1)]['S_LAST_ROW']);
- }
-
- // Now we add the block that we're actually assigning to.
- // We're adding a new iteration to this block with the given
- // variable assignments.
- $str[$blocks[$blockcount]][] = $vararray;
- }
- else
- {
- // Top-level block.
- $s_row_count = (isset($this->_tpldata[$blockname])) ? sizeof($this->_tpldata[$blockname]) : 0;
- $vararray['S_ROW_COUNT'] = $s_row_count;
-
- // Assign S_FIRST_ROW
- if (!$s_row_count)
- {
- $vararray['S_FIRST_ROW'] = true;
- }
-
- // We always assign S_LAST_ROW and remove the entry before
- $vararray['S_LAST_ROW'] = true;
- if ($s_row_count > 0)
- {
- unset($this->_tpldata[$blockname][($s_row_count - 1)]['S_LAST_ROW']);
- }
-
- // Add a new iteration to this block with the variable assignments we were given.
- $this->_tpldata[$blockname][] = $vararray;
- }
-
- return true;
- }
-
- /**
- * Change already assigned key variable pair (one-dimensional - single loop entry)
- *
- * An example of how to use this function:
- * {@example alter_block_array.php}
- *
- * @param string $blockname the blockname, for example 'loop'
- * @param array $vararray the var array to insert/add or merge
- * @param mixed $key Key to search for
- *
- * array: KEY => VALUE [the key/value pair to search for within the loop to determine the correct position]
- *
- * int: Position [the position to change or insert at directly given]
- *
- * If key is false the position is set to 0
- * If key is true the position is set to the last entry
- *
- * @param string $mode Mode to execute (valid modes are 'insert' and 'change')
- *
- * If insert, the vararray is inserted at the given position (position counting from zero).
- * If change, the current block gets merged with the vararray (resulting in new key/value pairs be added and existing keys be replaced by the new value).
- *
- * Since counting begins by zero, inserting at the last position will result in this array: array(vararray, last positioned array)
- * and inserting at position 1 will result in this array: array(first positioned array, vararray, following vars)
- *
- * @return bool false on error, true on success
- * @access public
- */
- function alter_block_array($blockname, $vararray, $key = false, $mode = 'insert')
- {
- if (strpos($blockname, '.') !== false)
- {
- // Nested blocks are not supported
- return false;
- }
-
- // Change key to zero (change first position) if false and to last position if true
- if ($key === false || $key === true)
- {
- $key = ($key === false) ? 0 : sizeof($this->_tpldata[$blockname]);
- }
-
- // Get correct position if array given
- if (is_array($key))
- {
- // Search array to get correct position
- list($search_key, $search_value) = @each($key);
-
- $key = NULL;
- foreach ($this->_tpldata[$blockname] as $i => $val_ary)
- {
- if ($val_ary[$search_key] === $search_value)
- {
- $key = $i;
- break;
- }
- }
-
- // key/value pair not found
- if ($key === NULL)
- {
- return false;
- }
- }
-
- // Insert Block
- if ($mode == 'insert')
- {
- // Make sure we are not exceeding the last iteration
- if ($key >= sizeof($this->_tpldata[$blockname]))
- {
- $key = sizeof($this->_tpldata[$blockname]);
- unset($this->_tpldata[$blockname][($key - 1)]['S_LAST_ROW']);
- $vararray['S_LAST_ROW'] = true;
- }
- else if ($key === 0)
- {
- unset($this->_tpldata[$blockname][0]['S_FIRST_ROW']);
- $vararray['S_FIRST_ROW'] = true;
- }
-
- // Re-position template blocks
- for ($i = sizeof($this->_tpldata[$blockname]); $i > $key; $i--)
- {
- $this->_tpldata[$blockname][$i] = $this->_tpldata[$blockname][$i-1];
- $this->_tpldata[$blockname][$i]['S_ROW_COUNT'] = $i;
- }
-
- // Insert vararray at given position
- $vararray['S_ROW_COUNT'] = $key;
- $this->_tpldata[$blockname][$key] = $vararray;
-
- return true;
- }
-
- // Which block to change?
- if ($mode == 'change')
- {
- if ($key == sizeof($this->_tpldata[$blockname]))
- {
- $key--;
- }
-
- $this->_tpldata[$blockname][$key] = array_merge($this->_tpldata[$blockname][$key], $vararray);
- return true;
- }
-
- return false;
- }
-
- /**
- * Include a separate template
- * @access private
- */
- function _tpl_include($filename, $include = true)
- {
- $handle = $filename;
- $this->filename[$handle] = $filename;
- $this->files[$handle] = $this->root . '/' . $filename;
- if ($this->inherit_root)
- {
- $this->files_inherit[$handle] = $this->inherit_root . '/' . $filename;
- }
-
- $filename = $this->_tpl_load($handle);
-
- if ($include)
- {
- global $user;
-
- if ($filename)
- {
- include($filename);
- return;
- }
- eval(' ?>' . $this->compiled_code[$handle] . '<?php ');
- }
- }
-
- /**
- * Include a php-file
- * @access private
- */
- function _php_include($filename)
- {
- global $phpbb_root_path;
-
- $file = $phpbb_root_path . $filename;
-
- if (!file_exists($file))
- {
- // trigger_error cannot be used here, as the output already started
- echo 'template->_php_include(): File ' . htmlspecialchars($file) . ' does not exist or is empty';
- return;
- }
- include($file);
- }
-}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/ucp/info/ucp_attachments.php b/phpBB/includes/ucp/info/ucp_attachments.php
index 84edce446c..adc7b92920 100644
--- a/phpBB/includes/ucp/info/ucp_attachments.php
+++ b/phpBB/includes/ucp/info/ucp_attachments.php
@@ -2,9 +2,8 @@
/**
*
* @package ucp
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -33,5 +32,3 @@ class ucp_attachments_info
{
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/ucp/info/ucp_auth_link.php b/phpBB/includes/ucp/info/ucp_auth_link.php
new file mode 100644
index 0000000000..ee88b15ea8
--- /dev/null
+++ b/phpBB/includes/ucp/info/ucp_auth_link.php
@@ -0,0 +1,34 @@
+<?php
+/**
+*
+* @package ucp
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+/**
+* @package module_install
+*/
+class ucp_auth_link_info
+{
+ function module()
+ {
+ return array(
+ 'filename' => 'ucp_auth_link',
+ 'title' => 'UCP_AUTH_LINK',
+ 'version' => '1.0.0',
+ 'modes' => array(
+ 'auth_link' => array('title' => 'UCP_AUTH_LINK_MANAGE', 'auth' => '', 'cat' => array('UCP_PROFILE')),
+ ),
+ );
+ }
+
+ function install()
+ {
+ }
+
+ function uninstall()
+ {
+ }
+}
diff --git a/phpBB/includes/ucp/info/ucp_groups.php b/phpBB/includes/ucp/info/ucp_groups.php
index 2002123c50..b7ffcd0971 100644
--- a/phpBB/includes/ucp/info/ucp_groups.php
+++ b/phpBB/includes/ucp/info/ucp_groups.php
@@ -2,9 +2,8 @@
/**
*
* @package ucp
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -34,5 +33,3 @@ class ucp_groups_info
{
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/ucp/info/ucp_main.php b/phpBB/includes/ucp/info/ucp_main.php
index 722b7865e6..e40a0cc1c5 100644
--- a/phpBB/includes/ucp/info/ucp_main.php
+++ b/phpBB/includes/ucp/info/ucp_main.php
@@ -2,9 +2,8 @@
/**
*
* @package ucp
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -36,5 +35,3 @@ class ucp_main_info
{
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/ucp/info/ucp_notifications.php b/phpBB/includes/ucp/info/ucp_notifications.php
new file mode 100644
index 0000000000..98d8b9db61
--- /dev/null
+++ b/phpBB/includes/ucp/info/ucp_notifications.php
@@ -0,0 +1,35 @@
+<?php
+/**
+*
+* @package notifications
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+/**
+* @package module_install
+*/
+class ucp_notifications_info
+{
+ function module()
+ {
+ return array(
+ 'filename' => 'ucp_notifications',
+ 'title' => 'UCP_NOTIFICATION_OPTIONS',
+ 'version' => '1.0.0',
+ 'modes' => array(
+ 'notification_options' => array('title' => 'UCP_NOTIFICATION_OPTIONS', 'auth' => '', 'cat' => array('UCP_PREFS')),
+ 'notification_list' => array('title' => 'UCP_NOTIFICATION_LIST', 'auth' => '', 'cat' => array('UCP_MAIN')),
+ ),
+ );
+ }
+
+ function install()
+ {
+ }
+
+ function uninstall()
+ {
+ }
+}
diff --git a/phpBB/includes/ucp/info/ucp_pm.php b/phpBB/includes/ucp/info/ucp_pm.php
index ade12005c0..a80de21999 100644
--- a/phpBB/includes/ucp/info/ucp_pm.php
+++ b/phpBB/includes/ucp/info/ucp_pm.php
@@ -1,9 +1,8 @@
<?php
/**
* @package ucp
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -23,7 +22,6 @@ class ucp_pm_info
'compose' => array('title' => 'UCP_PM_COMPOSE', 'auth' => 'cfg_allow_privmsg', 'cat' => array('UCP_PM')),
'drafts' => array('title' => 'UCP_PM_DRAFTS', 'auth' => 'cfg_allow_privmsg', 'cat' => array('UCP_PM')),
'options' => array('title' => 'UCP_PM_OPTIONS', 'auth' => 'cfg_allow_privmsg', 'cat' => array('UCP_PM')),
- 'popup' => array('title' => 'UCP_PM_POPUP_TITLE', 'auth' => 'cfg_allow_privmsg', 'display' => false, 'cat' => array('UCP_PM')),
),
);
}
@@ -36,5 +34,3 @@ class ucp_pm_info
{
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/ucp/info/ucp_prefs.php b/phpBB/includes/ucp/info/ucp_prefs.php
index 58359e8a19..91fbd7a14c 100644
--- a/phpBB/includes/ucp/info/ucp_prefs.php
+++ b/phpBB/includes/ucp/info/ucp_prefs.php
@@ -2,9 +2,8 @@
/**
*
* @package ucp
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -35,5 +34,3 @@ class ucp_prefs_info
{
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/ucp/info/ucp_profile.php b/phpBB/includes/ucp/info/ucp_profile.php
index 4591776768..e974cea713 100644
--- a/phpBB/includes/ucp/info/ucp_profile.php
+++ b/phpBB/includes/ucp/info/ucp_profile.php
@@ -2,9 +2,8 @@
/**
*
* @package ucp
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -20,10 +19,11 @@ class ucp_profile_info
'title' => 'UCP_PROFILE',
'version' => '1.0.0',
'modes' => array(
- 'profile_info' => array('title' => 'UCP_PROFILE_PROFILE_INFO', 'auth' => '', 'cat' => array('UCP_PROFILE')),
+ 'profile_info' => array('title' => 'UCP_PROFILE_PROFILE_INFO', 'auth' => 'acl_u_chgprofileinfo', 'cat' => array('UCP_PROFILE')),
'signature' => array('title' => 'UCP_PROFILE_SIGNATURE', 'auth' => 'acl_u_sig', 'cat' => array('UCP_PROFILE')),
- 'avatar' => array('title' => 'UCP_PROFILE_AVATAR', 'auth' => 'cfg_allow_avatar && (cfg_allow_avatar_local || cfg_allow_avatar_remote || cfg_allow_avatar_upload || cfg_allow_avatar_remote_upload)', 'cat' => array('UCP_PROFILE')),
+ 'avatar' => array('title' => 'UCP_PROFILE_AVATAR', 'auth' => 'cfg_allow_avatar', 'cat' => array('UCP_PROFILE')),
'reg_details' => array('title' => 'UCP_PROFILE_REG_DETAILS', 'auth' => '', 'cat' => array('UCP_PROFILE')),
+ 'autologin_keys'=> array('title' => 'UCP_PROFILE_AUTOLOGIN_KEYS', 'auth' => '', 'cat' => array('UCP_PROFILE')),
),
);
}
@@ -36,5 +36,3 @@ class ucp_profile_info
{
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/ucp/info/ucp_zebra.php b/phpBB/includes/ucp/info/ucp_zebra.php
index 5fc1f8bee7..db57102aae 100644
--- a/phpBB/includes/ucp/info/ucp_zebra.php
+++ b/phpBB/includes/ucp/info/ucp_zebra.php
@@ -2,9 +2,8 @@
/**
*
* @package ucp
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -34,5 +33,3 @@ class ucp_zebra_info
{
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/ucp/ucp_activate.php b/phpBB/includes/ucp/ucp_activate.php
index b262dc5c1c..2a94acbe02 100644
--- a/phpBB/includes/ucp/ucp_activate.php
+++ b/phpBB/includes/ucp/ucp_activate.php
@@ -2,9 +2,8 @@
/**
*
* @package ucp
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -28,7 +27,7 @@ class ucp_activate
function main($id, $mode)
{
global $config, $phpbb_root_path, $phpEx;
- global $db, $user, $auth, $template;
+ global $db, $user, $auth, $template, $phpbb_container;
$user_id = request_var('u', 0);
$key = request_var('k', '');
@@ -109,13 +108,16 @@ class ucp_activate
if ($config['require_activation'] == USER_ACTIVATION_ADMIN && !$update_password)
{
+ $phpbb_notifications = $phpbb_container->get('notification_manager');
+ $phpbb_notifications->delete_notifications('admin_activate_user', $user_row['user_id']);
+
include_once($phpbb_root_path . 'includes/functions_messenger.' . $phpEx);
$messenger = new messenger(false);
$messenger->template('admin_welcome_activated', $user_row['user_lang']);
- $messenger->to($user_row['user_email'], $user_row['username']);
+ $messenger->set_addresses($user_row);
$messenger->anti_abuse_headers($config, $user);
@@ -143,5 +145,3 @@ class ucp_activate
trigger_error($user->lang[$message]);
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/ucp/ucp_attachments.php b/phpBB/includes/ucp/ucp_attachments.php
index b011b4f75d..6a5b48a181 100644
--- a/phpBB/includes/ucp/ucp_attachments.php
+++ b/phpBB/includes/ucp/ucp_attachments.php
@@ -2,9 +2,8 @@
/**
*
* @package ucp
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -27,7 +26,7 @@ class ucp_attachments
function main($id, $mode)
{
- global $template, $user, $db, $config, $phpEx, $phpbb_root_path;
+ global $template, $user, $db, $config, $phpEx, $phpbb_root_path, $phpbb_container;
$start = request_var('start', 0);
$sort_key = request_var('sk', 'a');
@@ -120,6 +119,10 @@ class ucp_attachments
$num_attachments = $db->sql_fetchfield('num_attachments');
$db->sql_freeresult($result);
+ // Ensure start is a valid value
+ $pagination = $phpbb_container->get('pagination');
+ $start = $pagination->validate_start($start, $config['topics_per_page'], $num_attachments);
+
$sql = 'SELECT a.*, t.topic_title, p.message_subject as message_title
FROM ' . ATTACHMENTS_TABLE . ' a
LEFT JOIN ' . TOPICS_TABLE . ' t ON (a.topic_id = t.topic_id AND a.in_message = 0)
@@ -171,9 +174,10 @@ class ucp_attachments
}
$db->sql_freeresult($result);
+ $base_url = $this->u_action . "&amp;sk=$sort_key&amp;sd=$sort_dir";
+ $pagination->generate_template_pagination($base_url, 'pagination', 'start', $num_attachments, $config['topics_per_page'], $start);
+
$template->assign_vars(array(
- 'PAGE_NUMBER' => on_page($num_attachments, $config['topics_per_page'], $start),
- 'PAGINATION' => generate_pagination($this->u_action . "&amp;sk=$sort_key&amp;sd=$sort_dir", $num_attachments, $config['topics_per_page'], $start),
'TOTAL_ATTACHMENTS' => $num_attachments,
'L_TITLE' => $user->lang['UCP_ATTACHMENTS'],
@@ -197,5 +201,3 @@ class ucp_attachments
$this->page_title = 'UCP_ATTACHMENTS';
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/ucp/ucp_auth_link.php b/phpBB/includes/ucp/ucp_auth_link.php
new file mode 100644
index 0000000000..b86c4c8d52
--- /dev/null
+++ b/phpBB/includes/ucp/ucp_auth_link.php
@@ -0,0 +1,142 @@
+<?php
+/**
+*
+* @package ucp
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+class ucp_auth_link
+{
+ /**
+ * @var string
+ */
+ public $u_action;
+
+ /**
+ * Generates the ucp_auth_link page and handles the auth link process
+ *
+ * @param int $id
+ * @param string $mode
+ */
+ public function main($id, $mode)
+ {
+ global $config, $request, $template, $phpbb_container, $user;
+
+ $error = array();
+
+ $auth_provider = $phpbb_container->get('auth.provider.' . $config['auth_method']);
+
+ // confirm that the auth provider supports this page
+ $provider_data = $auth_provider->get_auth_link_data();
+ if ($provider_data === null)
+ {
+ $error[] = 'UCP_AUTH_LINK_NOT_SUPPORTED';
+ }
+
+ $s_hidden_fields = array();
+ add_form_key('ucp_auth_link');
+
+ $submit = $request->variable('submit', false, false, \phpbb\request\request_interface::POST);
+
+ // This path is only for primary actions
+ if (!sizeof($error) && $submit)
+ {
+ if (!check_form_key('ucp_auth_link'))
+ {
+ $error[] = 'FORM_INVALID';
+ }
+
+ if (!sizeof($error))
+ {
+ // Any post data could be necessary for auth (un)linking
+ $link_data = $request->get_super_global(\phpbb\request\request_interface::POST);
+
+ // The current user_id is also necessary
+ $link_data['user_id'] = $user->data['user_id'];
+
+ // Tell the provider that the method is auth_link not login_link
+ $link_data['link_method'] = 'auth_link';
+
+ if ($request->variable('link', 0, false, \phpbb\request\request_interface::POST))
+ {
+ $error[] = $auth_provider->link_account($link_data);
+ }
+ else
+ {
+ $error[] = $auth_provider->unlink_account($link_data);
+ }
+
+ // Template data may have changed, get new data
+ $provider_data = $auth_provider->get_auth_link_data();
+ }
+ }
+
+ // In some cases, a request to an external server may be required. In
+ // these cases, the GET parameter 'link' should exist and should be true
+ if ($request->variable('link', false))
+ {
+ // In this case the link data should only be populated with the
+ // link_method as the provider dictates how data is returned to it.
+ $link_data = array('link_method' => 'auth_link');
+
+ $error[] = $auth_provider->link_account($link_data);
+
+ // Template data may have changed, get new data
+ $provider_data = $auth_provider->get_auth_link_data();
+ }
+
+ if (isset($provider_data['VARS']))
+ {
+ // Handle hidden fields separately
+ if (isset($provider_data['VARS']['HIDDEN_FIELDS']))
+ {
+ $s_hidden_fields = array_merge($s_hidden_fields, $provider_data['VARS']['HIDDEN_FIELDS']);
+ unset($provider_data['VARS']['HIDDEN_FIELDS']);
+ }
+
+ $template->assign_vars($provider_data['VARS']);
+ }
+
+ if (isset($provider_data['BLOCK_VAR_NAME']))
+ {
+ foreach ($provider_data['BLOCK_VARS'] as $block_vars)
+ {
+ // See if there are additional hidden fields. This should be an associative array
+ if (isset($block_vars['HIDDEN_FIELDS']))
+ {
+ $block_vars['HIDDEN_FIELDS'] = build_hidden_fields($block_vars['HIDDEN_FIELDS']);
+ }
+
+ $template->assign_block_vars($provider_data['BLOCK_VAR_NAME'], $block_vars);
+ }
+ }
+
+ $s_hidden_fields = build_hidden_fields($s_hidden_fields);
+
+ // Replace "error" strings with their real, localised form
+ $error = array_map(array($user, 'lang'), $error);
+ $error = implode('<br />', $error);
+
+ $template->assign_vars(array(
+ 'ERROR' => $error,
+
+ 'PROVIDER_TEMPLATE_FILE' => $provider_data['TEMPLATE_FILE'],
+
+ 'S_HIDDEN_FIELDS' => $s_hidden_fields,
+ 'S_UCP_ACTION' => $this->u_action,
+ ));
+
+ $this->tpl_name = 'ucp_auth_link';
+ $this->page_title = 'UCP_AUTH_LINK';
+ }
+}
diff --git a/phpBB/includes/ucp/ucp_confirm.php b/phpBB/includes/ucp/ucp_confirm.php
index 445f7c7d2a..aafb92d8e4 100644
--- a/phpBB/includes/ucp/ucp_confirm.php
+++ b/phpBB/includes/ucp/ucp_confirm.php
@@ -2,9 +2,8 @@
/**
*
* @package VC
-* @version $Id$
* @copyright (c) 2005 2008 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -46,5 +45,3 @@ class ucp_confirm
exit_handler();
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/ucp/ucp_groups.php b/phpBB/includes/ucp/ucp_groups.php
index 663b5bc931..373d9433b2 100644
--- a/phpBB/includes/ucp/ucp_groups.php
+++ b/phpBB/includes/ucp/ucp_groups.php
@@ -2,9 +2,8 @@
/**
*
* @package ucp
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -26,16 +25,17 @@ class ucp_groups
function main($id, $mode)
{
- global $config, $phpbb_root_path, $phpEx;
+ global $config, $phpbb_root_path, $phpEx, $phpbb_admin_path;
global $db, $user, $auth, $cache, $template;
+ global $request, $phpbb_container;
$user->add_lang('groups');
$return_page = '<br /><br />' . sprintf($user->lang['RETURN_PAGE'], '<a href="' . $this->u_action . '">', '</a>');
$mark_ary = request_var('mark', array(0));
- $submit = (!empty($_POST['submit'])) ? true : false;
- $delete = (!empty($_POST['delete'])) ? true : false;
+ $submit = $request->variable('submit', false, false, \phpbb\request\request_interface::POST);
+ $delete = $request->variable('delete', false, false, \phpbb\request\request_interface::POST);
$error = $data = array();
switch ($mode)
@@ -197,38 +197,6 @@ class ucp_groups
else
{
group_user_add($group_id, $user->data['user_id'], false, false, false, 0, 1);
-
- include_once($phpbb_root_path . 'includes/functions_messenger.' . $phpEx);
- $messenger = new messenger();
-
- $sql = 'SELECT u.username, u.username_clean, u.user_email, u.user_notify_type, u.user_jabber, u.user_lang
- FROM ' . USER_GROUP_TABLE . ' ug, ' . USERS_TABLE . " u
- WHERE ug.user_id = u.user_id
- AND ug.group_leader = 1
- AND ug.group_id = $group_id";
- $result = $db->sql_query($sql);
-
- while ($row = $db->sql_fetchrow($result))
- {
- $messenger->template('group_request', $row['user_lang']);
-
- $messenger->to($row['user_email'], $row['username']);
- $messenger->im($row['user_jabber'], $row['username']);
-
- $messenger->assign_vars(array(
- 'USERNAME' => htmlspecialchars_decode($row['username']),
- 'GROUP_NAME' => htmlspecialchars_decode($group_row[$group_id]['group_name']),
- 'REQUEST_USERNAME' => $user->data['username'],
-
- 'U_PENDING' => generate_board_url() . "/ucp.$phpEx?i=groups&mode=manage&action=list&g=$group_id",
- 'U_GROUP' => generate_board_url() . "/memberlist.$phpEx?mode=group&g=$group_id")
- );
-
- $messenger->send($row['user_notify_type']);
- }
- $db->sql_freeresult($result);
-
- $messenger->save_queue();
}
add_log('user', $user->data['user_id'], 'LOG_USER_GROUP_JOIN' . (($group_row[$group_id]['group_type'] == GROUP_FREE) ? '' : '_PENDING'), $group_row[$group_id]['group_name']);
@@ -417,9 +385,11 @@ class ucp_groups
if ($group_id)
{
- $sql = 'SELECT *
- FROM ' . GROUPS_TABLE . "
- WHERE group_id = $group_id";
+ $sql = 'SELECT g.*, t.teampage_position AS group_teampage
+ FROM ' . GROUPS_TABLE . ' g
+ LEFT JOIN ' . TEAMPAGE_TABLE . ' t
+ ON (t.group_id = g.group_id)
+ WHERE g.group_id = ' . $group_id;
$result = $db->sql_query($sql);
$group_row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
@@ -438,7 +408,7 @@ class ucp_groups
$group_name = $group_row['group_name'];
$group_type = $group_row['group_type'];
- $avatar_img = (!empty($group_row['group_avatar'])) ? get_user_avatar($group_row['group_avatar'], $group_row['group_avatar_type'], $group_row['group_avatar_width'], $group_row['group_avatar_height'], 'GROUP_AVATAR') : '<img src="' . $phpbb_root_path . 'adm/images/no_avatar.gif" alt="" />';
+ $avatar = phpbb_get_group_avatar($group_row, 'GROUP_AVATAR', true);
$template->assign_vars(array(
'GROUP_NAME' => ($group_type == GROUP_SPECIAL) ? $user->lang['G_' . $group_name] : $group_name,
@@ -447,8 +417,8 @@ class ucp_groups
'GROUP_DESC_DISP' => generate_text_for_display($group_row['group_desc'], $group_row['group_desc_uid'], $group_row['group_desc_bitfield'], $group_row['group_desc_options']),
'GROUP_TYPE' => $group_row['group_type'],
- 'AVATAR' => $avatar_img,
- 'AVATAR_IMAGE' => $avatar_img,
+ 'AVATAR' => (empty($avatar) ? '<img src="' . $phpbb_admin_path . 'images/no_avatar.gif" alt="" />' : $avatar),
+ 'AVATAR_IMAGE' => (empty($avatar) ? '<img src="' . $phpbb_admin_path . 'images/no_avatar.gif" alt="" />' : $avatar),
'AVATAR_WIDTH' => (isset($group_row['group_avatar_width'])) ? $group_row['group_avatar_width'] : '',
'AVATAR_HEIGHT' => (isset($group_row['group_avatar_height'])) ? $group_row['group_avatar_height'] : '',
));
@@ -483,10 +453,20 @@ class ucp_groups
$error = array();
- $avatar_select = basename(request_var('avatar_select', ''));
- $category = basename(request_var('category', ''));
+ // Setup avatar data for later
+ $avatars_enabled = false;
+ $avatar_drivers = null;
+ $avatar_data = null;
+ $avatar_error = array();
+
+ if ($config['allow_avatar'])
+ {
+ $phpbb_avatar_manager = $phpbb_container->get('avatar.manager');
+ $avatar_drivers = $phpbb_avatar_manager->get_enabled_drivers();
- $can_upload = (file_exists($phpbb_root_path . $config['avatar_path']) && phpbb_is_writable($phpbb_root_path . $config['avatar_path']) && $file_uploads) ? true : false;
+ // This is normalised data, without the group_ prefix
+ $avatar_data = \phpbb\avatar\manager::clean_row($group_row, 'group');
+ }
// Did we submit?
if ($update)
@@ -505,89 +485,44 @@ class ucp_groups
'receive_pm' => isset($_REQUEST['group_receive_pm']) ? 1 : 0,
'message_limit' => request_var('group_message_limit', 0),
'max_recipients'=> request_var('group_max_recipients', 0),
+ 'legend' => $group_row['group_legend'],
+ 'teampage' => $group_row['group_teampage'],
);
- $data['uploadurl'] = request_var('uploadurl', '');
- $data['remotelink'] = request_var('remotelink', '');
- $data['width'] = request_var('width', '');
- $data['height'] = request_var('height', '');
- $delete = request_var('delete', '');
-
- if (!empty($_FILES['uploadfile']['tmp_name']) || $data['uploadurl'] || $data['remotelink'])
+ if ($config['allow_avatar'])
{
- // Avatar stuff
- $var_ary = array(
- 'uploadurl' => array('string', true, 5, 255),
- 'remotelink' => array('string', true, 5, 255),
- 'width' => array('string', true, 1, 3),
- 'height' => array('string', true, 1, 3),
- );
+ // Handle avatar
+ $driver_name = $phpbb_avatar_manager->clean_driver_name($request->variable('avatar_driver', ''));
+ $config_name = preg_replace('#^avatar\.driver.#', '', $driver_name);
- if (!($error = validate_data($data, $var_ary)))
+ if (in_array($driver_name, $avatar_drivers) && !$request->is_set_post('avatar_delete'))
{
- $data['user_id'] = "g$group_id";
+ $driver = $phpbb_avatar_manager->get_driver($driver_name);
+ $result = $driver->process_form($request, $template, $user, $avatar_data, $avatar_error);
- if ((!empty($_FILES['uploadfile']['tmp_name']) || $data['uploadurl']) && $can_upload)
+ if ($result && empty($avatar_error))
{
- list($submit_ary['avatar_type'], $submit_ary['avatar'], $submit_ary['avatar_width'], $submit_ary['avatar_height']) = avatar_upload($data, $error);
- }
- else if ($data['remotelink'])
- {
- list($submit_ary['avatar_type'], $submit_ary['avatar'], $submit_ary['avatar_width'], $submit_ary['avatar_height']) = avatar_remote($data, $error);
- }
- }
- }
- else if ($avatar_select && $config['allow_avatar_local'])
- {
- // check avatar gallery
- if (is_dir($phpbb_root_path . $config['avatar_gallery_path'] . '/' . $category))
- {
- $submit_ary['avatar_type'] = AVATAR_GALLERY;
+ $result['avatar_type'] = $driver_name;
- list($submit_ary['avatar_width'], $submit_ary['avatar_height']) = getimagesize($phpbb_root_path . $config['avatar_gallery_path'] . '/' . $category . '/' . $avatar_select);
- $submit_ary['avatar'] = $category . '/' . $avatar_select;
- }
- }
- else if ($delete)
- {
- $submit_ary['avatar'] = '';
- $submit_ary['avatar_type'] = $submit_ary['avatar_width'] = $submit_ary['avatar_height'] = 0;
- }
- else if ($data['width'] && $data['height'])
- {
- // Only update the dimensions?
- if ($config['avatar_max_width'] || $config['avatar_max_height'])
- {
- if ($data['width'] > $config['avatar_max_width'] || $data['height'] > $config['avatar_max_height'])
- {
- $error[] = sprintf($user->lang['AVATAR_WRONG_SIZE'], $config['avatar_min_width'], $config['avatar_min_height'], $config['avatar_max_width'], $config['avatar_max_height'], $data['width'], $data['height']);
+ $submit_ary = array_merge($submit_ary, $result);
}
}
-
- if (!sizeof($error))
+ else
{
- if ($config['avatar_min_width'] || $config['avatar_min_height'])
+ if ($driver = $phpbb_avatar_manager->get_driver($avatar_data['avatar_type']))
{
- if ($data['width'] < $config['avatar_min_width'] || $data['height'] < $config['avatar_min_height'])
- {
- $error[] = sprintf($user->lang['AVATAR_WRONG_SIZE'], $config['avatar_min_width'], $config['avatar_min_height'], $config['avatar_max_width'], $config['avatar_max_height'], $data['width'], $data['height']);
- }
+ $driver->delete($avatar_data);
}
- }
- if (!sizeof($error))
- {
- $submit_ary['avatar_width'] = $data['width'];
- $submit_ary['avatar_height'] = $data['height'];
+ // Removing the avatar
+ $submit_ary['avatar_type'] = '';
+ $submit_ary['avatar'] = '';
+ $submit_ary['avatar_width'] = 0;
+ $submit_ary['avatar_height'] = 0;
}
- }
- if ((isset($submit_ary['avatar']) && $submit_ary['avatar'] && (!isset($group_row['group_avatar']))) || $delete)
- {
- if (isset($group_row['group_avatar']) && $group_row['group_avatar'])
- {
- avatar_delete('group', $group_row, true);
- }
+ // Merge any avatars errors into the primary error array
+ $error = array_merge($error, $phpbb_avatar_manager->localize_errors($user, $avatar_error));
}
if (!check_form_key('ucp_groups'))
@@ -607,24 +542,28 @@ class ucp_groups
// Only set the rank, colour, etc. if it's changed or if we're adding a new
// group. This prevents existing group members being updated if no changes
// were made.
+ // However there are some attributes that need to be set everytime,
+ // otherwise the group gets removed from the feature.
+ $set_attributes = array('legend', 'teampage');
$group_attributes = array();
$test_variables = array(
'rank' => 'int',
'colour' => 'string',
'avatar' => 'string',
- 'avatar_type' => 'int',
+ 'avatar_type' => 'string',
'avatar_width' => 'int',
'avatar_height' => 'int',
'receive_pm' => 'int',
'legend' => 'int',
+ 'teampage' => 'int',
'message_limit' => 'int',
'max_recipients'=> 'int',
);
foreach ($test_variables as $test => $type)
{
- if (isset($submit_ary[$test]) && ($action == 'add' || $group_row['group_' . $test] != $submit_ary[$test]))
+ if (isset($submit_ary[$test]) && ($action == 'add' || $group_row['group_' . $test] != $submit_ary[$test] || isset($group_attributes['group_avatar']) && strpos($test, 'avatar') === 0 || in_array($test, $set_attributes)))
{
settype($submit_ary[$test], $type);
$group_attributes['group_' . $test] = $group_row['group_' . $test] = $submit_ary[$test];
@@ -634,6 +573,7 @@ class ucp_groups
if (!($error = group_create($group_id, $group_type, $group_name, $group_desc, $group_attributes, $allow_desc_bbcode, $allow_desc_urls, $allow_desc_smilies)))
{
$cache->destroy('sql', GROUPS_TABLE);
+ $cache->destroy('sql', TEAMPAGE_TABLE);
$message = ($action == 'edit') ? 'GROUP_UPDATED' : 'GROUP_CREATED';
trigger_error($user->lang[$message] . $return_page);
@@ -690,28 +630,51 @@ class ucp_groups
$type_closed = ($group_type == GROUP_CLOSED) ? ' checked="checked"' : '';
$type_hidden = ($group_type == GROUP_HIDDEN) ? ' checked="checked"' : '';
- $display_gallery = (isset($_POST['display_gallery'])) ? true : false;
-
- if ($config['allow_avatar'] && $config['allow_avatar_local'] && $display_gallery)
+ // Load up stuff for avatars
+ if ($config['allow_avatar'])
{
- avatar_gallery($category, $avatar_select, 4);
+ $avatars_enabled = false;
+ $selected_driver = $phpbb_avatar_manager->clean_driver_name($request->variable('avatar_driver', $avatar_data['avatar_type']));
+
+ foreach ($avatar_drivers as $current_driver)
+ {
+ $driver = $phpbb_avatar_manager->get_driver($current_driver);
+
+ $avatars_enabled = true;
+ $template->set_filenames(array(
+ 'avatar' => $driver->get_template_name(),
+ ));
+
+ if ($driver->prepare_form($request, $template, $user, $avatar_data, $avatar_error))
+ {
+ $driver_name = $phpbb_avatar_manager->prepare_driver_name($current_driver);
+ $driver_upper = strtoupper($driver_name);
+ $template->assign_block_vars('avatar_drivers', array(
+ 'L_TITLE' => $user->lang($driver_upper . '_TITLE'),
+ 'L_EXPLAIN' => $user->lang($driver_upper . '_EXPLAIN'),
+
+ 'DRIVER' => $driver_name,
+ 'SELECTED' => $current_driver == $selected_driver,
+ 'OUTPUT' => $template->assign_display('avatar'),
+ ));
+ }
+ }
}
- $avatars_enabled = ($config['allow_avatar'] && (($can_upload && ($config['allow_avatar_upload'] || $config['allow_avatar_remote_upload'])) || ($config['allow_avatar_local'] || $config['allow_avatar_remote']))) ? true : false;
+ if (isset($phpbb_avatar_manager) && !$update)
+ {
+ // Merge any avatars errors into the primary error array
+ $error = array_merge($error, $phpbb_avatar_manager->localize_errors($user, $avatar_error));
+ }
$template->assign_vars(array(
'S_EDIT' => true,
'S_INCLUDE_SWATCH' => true,
- 'S_FORM_ENCTYPE' => ($config['allow_avatar'] && $can_upload && ($config['allow_avatar_upload'] || $config['allow_avatar_remote_upload'])) ? ' enctype="multipart/form-data"' : '',
+ 'S_FORM_ENCTYPE' => ' enctype="multipart/form-data"',
'S_ERROR' => (sizeof($error)) ? true : false,
'S_SPECIAL_GROUP' => ($group_type == GROUP_SPECIAL) ? true : false,
- 'S_AVATARS_ENABLED' => $avatars_enabled,
- 'S_DISPLAY_GALLERY' => ($config['allow_avatar'] && $config['allow_avatar_local'] && !$display_gallery) ? true : false,
- 'S_IN_GALLERY' => ($config['allow_avatar_local'] && $display_gallery) ? true : false,
-
- 'S_UPLOAD_AVATAR_FILE' => ($config['allow_avatar'] && $config['allow_avatar_upload'] && $can_upload) ? true : false,
- 'S_UPLOAD_AVATAR_URL' => ($config['allow_avatar'] && $config['allow_avatar_remote_upload'] && $can_upload) ? true : false,
- 'S_LINK_AVATAR' => ($config['allow_avatar'] && $config['allow_avatar_remote']) ? true : false,
+ 'S_AVATARS_ENABLED' => ($config['allow_avatar'] && $avatars_enabled),
+ 'S_GROUP_MANAGE' => true,
'ERROR_MSG' => (sizeof($error)) ? implode('<br />', $error) : '',
'GROUP_RECEIVE_PM' => (isset($group_row['group_receive_pm']) && $group_row['group_receive_pm']) ? ' checked="checked"' : '',
@@ -724,7 +687,6 @@ class ucp_groups
'S_DESC_SMILIES_CHECKED'=> $group_desc_data['allow_smilies'],
'S_RANK_OPTIONS' => $rank_options,
- 'AVATAR_MAX_FILESIZE' => $config['avatar_filesize'],
'GROUP_TYPE_FREE' => GROUP_FREE,
'GROUP_TYPE_OPEN' => GROUP_OPEN,
@@ -737,9 +699,8 @@ class ucp_groups
'GROUP_CLOSED' => $type_closed,
'GROUP_HIDDEN' => $type_hidden,
- 'U_SWATCH' => append_sid("{$phpbb_root_path}adm/swatch.$phpEx", 'form=ucp&amp;name=group_colour'),
'S_UCP_ACTION' => $this->u_action . "&amp;action=$action&amp;g=$group_id",
- 'L_AVATAR_EXPLAIN' => sprintf($user->lang['AVATAR_EXPLAIN'], $config['avatar_max_width'], $config['avatar_max_height'], $config['avatar_filesize'] / 1024),
+ 'L_AVATAR_EXPLAIN' => phpbb_avatar_explanation_string(),
));
break;
@@ -852,11 +813,14 @@ class ucp_groups
$s_action_options .= '<option value="' . $option . '">' . $user->lang['GROUP_' . $lang] . '</option>';
}
+ $pagination = $phpbb_container->get('pagination');
+ $base_url = $this->u_action . "&amp;action=$action&amp;g=$group_id";
+ $start = $pagination->validate_start($start, $config['topics_per_page'], $total_members);
+ $pagination->generate_template_pagination($base_url, 'pagination', 'start', $total_members, $config['topics_per_page'], $start);
+
$template->assign_vars(array(
'S_LIST' => true,
'S_ACTION_OPTIONS' => $s_action_options,
- 'S_ON_PAGE' => on_page($total_members, $config['topics_per_page'], $start),
- 'PAGINATION' => generate_pagination($this->u_action . "&amp;action=$action&amp;g=$group_id", $total_members, $config['topics_per_page'], $start),
'U_ACTION' => $this->u_action . "&amp;g=$group_id",
'S_UCP_ACTION' => $this->u_action . "&amp;g=$group_id",
@@ -1075,7 +1039,8 @@ class ucp_groups
'mode' => $mode,
'action' => $action
);
- confirm_box(false, sprintf($user->lang['GROUP_CONFIRM_ADD_USER' . ((sizeof($name_ary) == 1) ? '' : 'S')], implode(', ', $name_ary)), build_hidden_fields($s_hidden_fields));
+
+ confirm_box(false, $user->lang('GROUP_CONFIRM_ADD_USERS', sizeof($name_ary), implode($user->lang['COMMA_SEPARATOR'], $name_ary)), build_hidden_fields($s_hidden_fields));
}
trigger_error($user->lang['NO_USERS_ADDED'] . '<br /><br />' . sprintf($user->lang['RETURN_PAGE'], '<a href="' . $this->u_action . '&amp;action=list&amp;g=' . $group_id . '">', '</a>'));
@@ -1117,5 +1082,3 @@ class ucp_groups
$this->tpl_name = 'ucp_groups_' . $mode;
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/ucp/ucp_login_link.php b/phpBB/includes/ucp/ucp_login_link.php
new file mode 100644
index 0000000000..80a553953d
--- /dev/null
+++ b/phpBB/includes/ucp/ucp_login_link.php
@@ -0,0 +1,243 @@
+<?php
+/**
+*
+* @package ucp
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* ucp_login_link
+* Allows users of external accounts link those accounts to their phpBB accounts
+* during an attempted login.
+* @package ucp
+*/
+class ucp_login_link
+{
+ /**
+ * @var string
+ */
+ public $u_action;
+
+ /**
+ * Generates the ucp_login_link page and handles login link process
+ *
+ * @param int $id
+ * @param string $mode
+ */
+ function main($id, $mode)
+ {
+ global $config, $phpbb_container, $request, $template, $user;
+ global $phpbb_root_path, $phpEx;
+
+ // Initialize necessary variables
+ $login_error = null;
+ $login_link_error = null;
+ $login_username = null;
+
+ // Build the data array
+ $data = $this->get_login_link_data_array();
+
+ // Ensure the person was sent here with login_link data
+ if (empty($data))
+ {
+ $login_link_error = $user->lang['LOGIN_LINK_NO_DATA_PROVIDED'];
+ }
+
+ // Use the auth_provider requested even if different from configured
+ $auth_provider = 'auth.provider.' . $request->variable('auth_provider', $config['auth_method']);
+ $auth_provider = $phpbb_container->get($auth_provider);
+
+ // Set the link_method to login_link
+ $data['link_method'] = 'login_link';
+
+ // Have the authentication provider check that all necessary data is available
+ $result = $auth_provider->login_link_has_necessary_data($data);
+ if ($result !== null)
+ {
+ $login_link_error = $user->lang[$result];
+ }
+
+ // Perform link action if there is no error
+ if (!$login_link_error)
+ {
+ if ($request->is_set_post('login'))
+ {
+ $login_username = $request->variable('login_username', '', false, \phpbb\request\request_interface::POST);
+ $login_password = $request->untrimmed_variable('login_password', '', true, \phpbb\request\request_interface::POST);
+
+ $login_result = $auth_provider->login($login_username, $login_password);
+
+ // We only care if there is or is not an error
+ $login_error = $this->process_login_result($login_result);
+
+ if (!$login_error)
+ {
+ // Give the user_id to the data
+ $data['user_id'] = $login_result['user_row']['user_id'];
+
+ // The user is now logged in, attempt to link the user to the external account
+ $result = $auth_provider->link_account($data);
+
+ if ($result)
+ {
+ $login_link_error = $user->lang[$result];
+ }
+ else
+ {
+ // Finish login
+ $result = $user->session_create($login_result['user_row']['user_id'], false, false, true);
+
+ // Perform a redirect as the account has been linked
+ $this->perform_redirect();
+ }
+ }
+ }
+ }
+
+ $template->assign_vars(array(
+ // Common template elements
+ 'LOGIN_LINK_ERROR' => $login_link_error,
+ 'PASSWORD_CREDENTIAL' => 'login_password',
+ 'USERNAME_CREDENTIAL' => 'login_username',
+ 'S_HIDDEN_FIELDS' => $this->get_hidden_fields($data),
+
+ // Registration elements
+ 'REGISTER_ACTION' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=register'),
+
+ // Login elements
+ 'LOGIN_ERROR' => $login_error,
+ 'LOGIN_USERNAME' => $login_username,
+ ));
+
+ $this->tpl_name = 'ucp_login_link';
+ $this->page_title = 'UCP_LOGIN_LINK';
+ }
+
+ /**
+ * Builds the hidden fields string from the data array.
+ *
+ * @param array $data This function only includes data in the array
+ * that has a key that begins with 'login_link_'
+ * @return string A string of hidden fields that can be included in the
+ * template
+ */
+ protected function get_hidden_fields($data)
+ {
+ $fields = array();
+
+ foreach ($data as $key => $value)
+ {
+ $fields['login_link_' . $key] = $value;
+ }
+
+ return build_hidden_fields($fields);
+ }
+
+ /**
+ * Builds the login_link data array
+ *
+ * @return array All login_link data. This is all GET data whose names
+ * begin with 'login_link_'
+ */
+ protected function get_login_link_data_array()
+ {
+ global $request;
+
+ $var_names = $request->variable_names(\phpbb\request\request_interface::GET);
+ $login_link_data = array();
+ $string_start_length = strlen('login_link_');
+
+ foreach ($var_names as $var_name)
+ {
+ if (strpos($var_name, 'login_link_') === 0)
+ {
+ $key_name = substr($var_name, $string_start_length);
+ $login_link_data[$key_name] = $request->variable($var_name, '', false, \phpbb\request\request_interface::GET);
+ }
+ }
+
+ return $login_link_data;
+ }
+
+ /**
+ * Processes the result array from the login process
+ * @param array $result The login result array
+ * @return string|null If there was an error in the process, a string is
+ * returned. If the login was successful, then null is
+ * returned.
+ */
+ protected function process_login_result($result)
+ {
+ global $config, $request, $template, $user;
+
+ $login_error = null;
+
+ if ($result['status'] != LOGIN_SUCCESS)
+ {
+ // Handle all errors first
+ if ($result['status'] == LOGIN_BREAK)
+ {
+ trigger_error($result['error_msg']);
+ }
+
+ switch ($result['status'])
+ {
+ case LOGIN_ERROR_ATTEMPTS:
+
+ $captcha = phpbb_captcha_factory::get_instance($config['captcha_plugin']);
+ $captcha->init(CONFIRM_LOGIN);
+
+ $template->assign_vars(array(
+ 'CAPTCHA_TEMPLATE' => $captcha->get_template(),
+ ));
+
+ $login_error = $user->lang[$result['error_msg']];
+ break;
+
+ case LOGIN_ERROR_PASSWORD_CONVERT:
+ $login_error = sprintf(
+ $user->lang[$result['error_msg']],
+ ($config['email_enable']) ? '<a href="' . append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=sendpassword') . '">' : '',
+ ($config['email_enable']) ? '</a>' : '',
+ ($config['board_contact']) ? '<a href="mailto:' . htmlspecialchars($config['board_contact']) . '">' : '',
+ ($config['board_contact']) ? '</a>' : ''
+ );
+ break;
+
+ // Username, password, etc...
+ default:
+ $login_error = $user->lang[$result['error_msg']];
+
+ // Assign admin contact to some error messages
+ if ($result['error_msg'] == 'LOGIN_ERROR_USERNAME' || $result['error_msg'] == 'LOGIN_ERROR_PASSWORD')
+ {
+ $login_error = (!$config['board_contact']) ? sprintf($user->lang[$result['error_msg']], '', '') : sprintf($user->lang[$result['error_msg']], '<a href="mailto:' . htmlspecialchars($config['board_contact']) . '">', '</a>');
+ }
+
+ break;
+ }
+ }
+
+ return $login_error;
+ }
+
+ /**
+ * Performs a post login redirect
+ */
+ protected function perform_redirect()
+ {
+ global $phpbb_root_path, $phpEx;
+ $url = append_sid($phpbb_root_path . 'index.' . $phpEx);
+ redirect($url);
+ }
+}
diff --git a/phpBB/includes/ucp/ucp_main.php b/phpBB/includes/ucp/ucp_main.php
index a6f71669ce..b4b14b11d7 100644
--- a/phpBB/includes/ucp/ucp_main.php
+++ b/phpBB/includes/ucp/ucp_main.php
@@ -2,9 +2,8 @@
/**
*
* @package ucp
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -34,6 +33,7 @@ class ucp_main
function main($id, $mode)
{
global $config, $db, $user, $auth, $template, $phpbb_root_path, $phpEx;
+ global $request;
switch ($mode)
{
@@ -56,39 +56,29 @@ class ucp_main
$sql_from .= ' LEFT JOIN ' . TOPICS_TRACK_TABLE . ' tt ON (tt.topic_id = t.topic_id
AND tt.user_id = ' . $user->data['user_id'] . ')';
$sql_select .= ', tt.mark_time';
+
+ $sql_from .= ' LEFT JOIN ' . FORUMS_TRACK_TABLE . ' ft ON (ft.forum_id = t.forum_id
+ AND ft.user_id = ' . $user->data['user_id'] . ')';
+ $sql_select .= ', ft.mark_time AS forum_mark_time';
}
$topic_type = $user->lang['VIEW_TOPIC_GLOBAL'];
$folder = 'global_read';
$folder_new = 'global_unread';
- // Get cleaned up list... return only those forums not having the f_read permission
- $forum_ary = $auth->acl_getf('!f_read', true);
+ // Get cleaned up list... return only those forums having the f_read permission
+ $forum_ary = $auth->acl_getf('f_read', true);
$forum_ary = array_unique(array_keys($forum_ary));
-
- // Determine first forum the user is able to read into - for global announcement link
- $sql = 'SELECT forum_id
- FROM ' . FORUMS_TABLE . '
- WHERE forum_type = ' . FORUM_POST;
-
- if (sizeof($forum_ary))
- {
- $sql .= ' AND ' . $db->sql_in_set('forum_id', $forum_ary, true);
- }
- $result = $db->sql_query_limit($sql, 1);
- $g_forum_id = (int) $db->sql_fetchfield('forum_id');
- $db->sql_freeresult($result);
-
- $sql = "SELECT t.* $sql_select
- FROM $sql_from
- WHERE t.forum_id = 0
- AND t.topic_type = " . POST_GLOBAL . '
- ORDER BY t.topic_last_post_time DESC';
-
$topic_list = $rowset = array();
+
// If the user can't see any forums, he can't read any posts because fid of 0 is invalid
- if ($g_forum_id)
+ if (!empty($forum_ary))
{
+ $sql = "SELECT t.* $sql_select
+ FROM $sql_from
+ WHERE t.topic_type = " . POST_GLOBAL . '
+ AND ' . $db->sql_in_set('t.forum_id', $forum_ary) . '
+ ORDER BY t.topic_last_post_time DESC';
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
@@ -99,15 +89,34 @@ class ucp_main
$db->sql_freeresult($result);
}
- $topic_tracking_info = array();
+ $topic_forum_list = array();
+ foreach ($rowset as $t_id => $row)
+ {
+ if (isset($forum_tracking_info[$row['forum_id']]))
+ {
+ $row['forum_mark_time'] = $forum_tracking_info[$row['forum_id']];
+ }
+
+ $topic_forum_list[$row['forum_id']]['forum_mark_time'] = ($config['load_db_lastread'] && $user->data['is_registered'] && isset($row['forum_mark_time'])) ? $row['forum_mark_time'] : 0;
+ $topic_forum_list[$row['forum_id']]['topics'][] = (int) $t_id;
+ }
+
+ $topic_tracking_info = $tracking_topics = array();
if ($config['load_db_lastread'])
{
- $topic_tracking_info = get_topic_tracking(0, $topic_list, $rowset, false, $topic_list);
+ foreach ($topic_forum_list as $f_id => $topic_row)
+ {
+ $topic_tracking_info += get_topic_tracking($f_id, $topic_row['topics'], $rowset, array($f_id => $topic_row['forum_mark_time']));
+ }
}
else
{
- $topic_tracking_info = get_complete_topic_tracking(0, $topic_list, $topic_list);
+ foreach ($topic_forum_list as $f_id => $topic_row)
+ {
+ $topic_tracking_info += get_complete_topic_tracking($f_id, $topic_row['topics']);
+ }
}
+ unset($topic_forum_list);
foreach ($topic_list as $topic_id)
{
@@ -148,18 +157,18 @@ class ucp_main
'TOPIC_TITLE' => censor_text($row['topic_title']),
'TOPIC_TYPE' => $topic_type,
+ 'TOPIC_IMG_STYLE' => $folder_img,
'TOPIC_FOLDER_IMG' => $user->img($folder_img, $folder_alt),
- 'TOPIC_FOLDER_IMG_SRC' => $user->img($folder_img, $folder_alt, false, '', 'src'),
'ATTACH_ICON_IMG' => ($auth->acl_get('u_download') && $auth->acl_get('f_download', $forum_id) && $row['topic_attachment']) ? $user->img('icon_topic_attach', '') : '',
'S_USER_POSTED' => (!empty($row['topic_posted']) && $row['topic_posted']) ? true : false,
'S_UNREAD' => $unread_topic,
'U_TOPIC_AUTHOR' => get_username_string('profile', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
- 'U_LAST_POST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$g_forum_id&amp;t=$topic_id&amp;p=" . $row['topic_last_post_id']) . '#p' . $row['topic_last_post_id'],
+ 'U_LAST_POST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&amp;t=$topic_id&amp;p=" . $row['topic_last_post_id']) . '#p' . $row['topic_last_post_id'],
'U_LAST_POST_AUTHOR' => get_username_string('profile', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']),
- 'U_NEWEST_POST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$g_forum_id&amp;t=$topic_id&amp;view=unread") . '#unread',
- 'U_VIEW_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$g_forum_id&amp;t=$topic_id"))
+ 'U_NEWEST_POST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&amp;t=$topic_id&amp;view=unread") . '#unread',
+ 'U_VIEW_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&amp;t=$topic_id"))
);
}
@@ -180,14 +189,11 @@ class ucp_main
$template->assign_vars(array(
'USER_COLOR' => (!empty($user->data['user_colour'])) ? $user->data['user_colour'] : '',
'JOINED' => $user->format_date($user->data['user_regdate']),
- 'VISITED' => (empty($last_visit)) ? ' - ' : $user->format_date($last_visit),
+ 'LAST_ACTIVE' => (empty($last_active)) ? ' - ' : $user->format_date($last_active),
'WARNINGS' => ($user->data['user_warnings']) ? $user->data['user_warnings'] : 0,
'POSTS' => ($user->data['user_posts']) ? $user->data['user_posts'] : 0,
- 'POSTS_DAY' => sprintf($user->lang['POST_DAY'], $posts_per_day),
- 'POSTS_PCT' => sprintf($user->lang['POST_PCT'], $percentage),
-
- 'OCCUPATION' => (!empty($row['user_occ'])) ? $row['user_occ'] : '',
- 'INTERESTS' => (!empty($row['user_interests'])) ? $row['user_interests'] : '',
+ 'POSTS_DAY' => $user->lang('POST_DAY', $posts_per_day),
+ 'POSTS_PCT' => $user->lang('POST_PCT', $percentage),
// 'S_GROUP_OPTIONS' => $group_options,
@@ -287,7 +293,7 @@ class ucp_main
}
else
{
- $tracking_topics = (isset($_COOKIE[$config['cookie_name'] . '_track'])) ? ((STRIP) ? stripslashes($_COOKIE[$config['cookie_name'] . '_track']) : $_COOKIE[$config['cookie_name'] . '_track']) : '';
+ $tracking_topics = $request->variable($config['cookie_name'] . '_track', '', true, \phpbb\request\request_interface::COOKIE);
$tracking_topics = ($tracking_topics) ? tracking_unserialize($tracking_topics) : array();
}
@@ -334,8 +340,8 @@ class ucp_main
$template->assign_block_vars('forumrow', array(
'FORUM_ID' => $forum_id,
+ 'FORUM_IMG_STYLE' => $folder_image,
'FORUM_FOLDER_IMG' => $user->img($folder_image, $folder_alt),
- 'FORUM_FOLDER_IMG_SRC' => $user->img($folder_image, $folder_alt, false, '', 'src'),
'FORUM_IMAGE' => ($row['forum_image']) ? '<img src="' . $phpbb_root_path . $row['forum_image'] . '" alt="' . $user->lang[$folder_alt] . '" />' : '',
'FORUM_IMAGE_SRC' => ($row['forum_image']) ? $phpbb_root_path . $row['forum_image'] : '',
'FORUM_NAME' => $row['forum_name'],
@@ -348,6 +354,8 @@ class ucp_main
'LAST_POST_AUTHOR_FULL' => get_username_string('full', $row['forum_last_poster_id'], $row['forum_last_poster_name'], $row['forum_last_poster_colour']),
'U_LAST_POST_AUTHOR' => get_username_string('profile', $row['forum_last_poster_id'], $row['forum_last_poster_name'], $row['forum_last_poster_colour']),
+ 'S_UNREAD_FORUM' => $unread_forum,
+
'U_LAST_POST' => $last_post_url,
'U_VIEWFORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $row['forum_id']))
);
@@ -435,7 +443,7 @@ class ucp_main
$edit = (isset($_REQUEST['edit'])) ? true : false;
$submit = (isset($_POST['submit'])) ? true : false;
- $draft_id = ($edit) ? intval($_REQUEST['edit']) : 0;
+ $draft_id = $request->variable('edit', 0);
$delete = (isset($_POST['delete'])) ? true : false;
$s_hidden_fields = ($edit) ? '<input type="hidden" name="edit" value="' . $draft_id . '" />' : '';
@@ -633,10 +641,11 @@ class ucp_main
*/
function assign_topiclist($mode = 'subscribed', $forbidden_forum_ary = array())
{
- global $user, $db, $template, $config, $cache, $auth, $phpbb_root_path, $phpEx;
+ global $user, $db, $template, $config, $cache, $auth, $phpbb_root_path, $phpEx, $phpbb_container;
$table = ($mode == 'subscribed') ? TOPICS_WATCH_TABLE : BOOKMARKS_TABLE;
$start = request_var('start', 0);
+ $pagination = $phpbb_container->get('pagination');
// Grab icons
$icons = $cache->obtain_icons();
@@ -660,11 +669,12 @@ class ucp_main
if ($topics_count)
{
+ $start = $pagination->validate_start($start, $config['topics_per_page'], $topics_count);
+ $pagination->generate_template_pagination($this->u_action, 'pagination', 'start', $topics_count, $config['topics_per_page'], $start);
+
$template->assign_vars(array(
- 'PAGINATION' => generate_pagination($this->u_action, $topics_count, $config['topics_per_page'], $start),
- 'PAGE_NUMBER' => on_page($topics_count, $config['topics_per_page'], $start),
- 'TOTAL_TOPICS' => ($topics_count == 1) ? $user->lang['VIEW_FORUM_TOPIC'] : sprintf($user->lang['VIEW_FORUM_TOPICS'], $topics_count))
- );
+ 'TOTAL_TOPICS' => $user->lang('VIEW_FORUM_TOPICS', (int) $topics_count),
+ ));
}
if ($mode == 'subscribed')
@@ -747,17 +757,19 @@ class ucp_main
{
foreach ($topic_forum_list as $f_id => $topic_row)
{
- $topic_tracking_info += get_topic_tracking($f_id, $topic_row['topics'], $rowset, array($f_id => $topic_row['forum_mark_time']), ($f_id == 0) ? $global_announce_list : false);
+ $topic_tracking_info += get_topic_tracking($f_id, $topic_row['topics'], $rowset, array($f_id => $topic_row['forum_mark_time']));
}
}
else
{
foreach ($topic_forum_list as $f_id => $topic_row)
{
- $topic_tracking_info += get_complete_topic_tracking($f_id, $topic_row['topics'], $global_announce_list);
+ $topic_tracking_info += get_complete_topic_tracking($f_id, $topic_row['topics']);
}
}
+ $phpbb_content_visibility = $phpbb_container->get('content.visibility');
+
foreach ($topic_list as $topic_id)
{
$row = &$rowset[$topic_id];
@@ -768,7 +780,7 @@ class ucp_main
$unread_topic = (isset($topic_tracking_info[$topic_id]) && $row['topic_last_post_time'] > $topic_tracking_info[$topic_id]) ? true : false;
// Replies
- $replies = ($auth->acl_get('m_approve', $forum_id)) ? $row['topic_replies_real'] : $row['topic_replies'];
+ $replies = $phpbb_content_visibility->get_count('topic_posts', $row, $forum_id) - 1;
if ($row['topic_status'] == ITEM_MOVED && !empty($row['topic_moved_id']))
{
@@ -802,17 +814,15 @@ class ucp_main
'U_LAST_POST_AUTHOR' => get_username_string('profile', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']),
'S_DELETED_TOPIC' => (!$row['topic_id']) ? true : false,
- 'S_GLOBAL_TOPIC' => (!$forum_id) ? true : false,
- 'PAGINATION' => topic_generate_pagination($replies, append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . (($row['forum_id']) ? $row['forum_id'] : $forum_id) . "&amp;t=$topic_id")),
'REPLIES' => $replies,
'VIEWS' => $row['topic_views'],
'TOPIC_TITLE' => censor_text($row['topic_title']),
'TOPIC_TYPE' => $topic_type,
'FORUM_NAME' => $row['forum_name'],
+ 'TOPIC_IMG_STYLE' => $folder_img,
'TOPIC_FOLDER_IMG' => $user->img($folder_img, $folder_alt),
- 'TOPIC_FOLDER_IMG_SRC' => $user->img($folder_img, $folder_alt, false, '', 'src'),
'TOPIC_FOLDER_IMG_ALT' => $user->lang[$folder_alt],
'TOPIC_ICON_IMG' => (!empty($icons[$row['icon_id']])) ? $icons[$row['icon_id']]['img'] : '',
'TOPIC_ICON_IMG_WIDTH' => (!empty($icons[$row['icon_id']])) ? $icons[$row['icon_id']]['width'] : '',
@@ -828,8 +838,8 @@ class ucp_main
'U_VIEW_TOPIC' => $view_topic_url,
'U_VIEW_FORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $forum_id),
));
+
+ $pagination->generate_template_pagination(append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $row['forum_id'] . "&amp;t=$topic_id"), 'topicrow.pagination', 'start', $replies + 1, $config['posts_per_page'], 1, true, true);
}
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/ucp/ucp_notifications.php b/phpBB/includes/ucp/ucp_notifications.php
new file mode 100644
index 0000000000..7c487b9073
--- /dev/null
+++ b/phpBB/includes/ucp/ucp_notifications.php
@@ -0,0 +1,245 @@
+<?php
+/**
+*
+* @package notifications
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+class ucp_notifications
+{
+ public $u_action;
+
+ public function main($id, $mode)
+ {
+ global $config, $template, $user, $request, $phpbb_container;
+ global $phpbb_root_path, $phpEx;
+
+ add_form_key('ucp_notification');
+
+ $start = $request->variable('start', 0);
+ $form_time = $request->variable('form_time', 0);
+ $form_time = ($form_time <= 0 || $form_time > time()) ? time() : $form_time;
+
+ $phpbb_notifications = $phpbb_container->get('notification_manager');
+ $pagination = $phpbb_container->get('pagination');
+
+ switch ($mode)
+ {
+ case 'notification_options':
+ $subscriptions = $phpbb_notifications->get_global_subscriptions(false);
+
+ // Add/remove subscriptions
+ if ($request->is_set_post('submit'))
+ {
+ if (!check_form_key('ucp_notification'))
+ {
+ trigger_error('FORM_INVALID');
+ }
+
+ $notification_methods = $phpbb_notifications->get_subscription_methods();
+
+ foreach($phpbb_notifications->get_subscription_types() as $group => $subscription_types)
+ {
+ foreach($subscription_types as $type => $data)
+ {
+ foreach($notification_methods as $method => $method_data)
+ {
+ if ($request->is_set_post($type . '_' . $method_data['id']) && (!isset($subscriptions[$type]) || !in_array($method_data['id'], $subscriptions[$type])))
+ {
+ $phpbb_notifications->add_subscription($type, 0, $method_data['id']);
+ }
+ else if (!$request->is_set_post($type . '_' . $method_data['id']) && isset($subscriptions[$type]) && in_array($method_data['id'], $subscriptions[$type]))
+ {
+ $phpbb_notifications->delete_subscription($type, 0, $method_data['id']);
+ }
+ }
+
+ if ($request->is_set_post($type . '_notification') && !isset($subscriptions[$type]))
+ {
+ $phpbb_notifications->add_subscription($type);
+ }
+ else if (!$request->is_set_post($type . '_notification') && isset($subscriptions[$type]))
+ {
+ $phpbb_notifications->delete_subscription($type);
+ }
+ }
+ }
+
+ meta_refresh(3, $this->u_action);
+ $message = $user->lang['PREFERENCES_UPDATED'] . '<br /><br />' . sprintf($user->lang['RETURN_UCP'], '<a href="' . $this->u_action . '">', '</a>');
+ trigger_error($message);
+ }
+
+ $this->output_notification_methods($phpbb_notifications, $template, $user, 'notification_methods');
+
+ $this->output_notification_types($subscriptions, $phpbb_notifications, $template, $user, 'notification_types');
+
+ $this->tpl_name = 'ucp_notifications';
+ $this->page_title = 'UCP_NOTIFICATION_OPTIONS';
+ break;
+
+ case 'notification_list':
+ default:
+ // Mark all items read
+ if ($request->variable('mark', '') == 'all' && (confirm_box(true) || check_link_hash($request->variable('token', ''), 'mark_all_notifications_read')))
+ {
+ if (confirm_box(true))
+ {
+ $phpbb_notifications->mark_notifications_read(false, false, $user->data['user_id'], $form_time);
+
+ meta_refresh(3, $this->u_action);
+ $message = $user->lang['NOTIFICATIONS_MARK_ALL_READ_SUCCESS'];
+
+ if ($request->is_ajax())
+ {
+ $json_response = new \phpbb\json_response();
+ $json_response->send(array(
+ 'MESSAGE_TITLE' => $user->lang['INFORMATION'],
+ 'MESSAGE_TEXT' => $message,
+ 'success' => true,
+ ));
+ }
+ $message .= '<br /><br />' . $user->lang('RETURN_UCP', '<a href="' . $this->u_action . '">', '</a>');
+
+ trigger_error($message);
+ }
+ else
+ {
+ confirm_box(false, 'NOTIFICATIONS_MARK_ALL_READ', build_hidden_fields(array(
+ 'mark' => 'all',
+ 'form_time' => $form_time,
+ )));
+ }
+ }
+
+ // Mark specific notifications read
+ if ($request->is_set_post('submit'))
+ {
+ if (!check_form_key('ucp_notification'))
+ {
+ trigger_error('FORM_INVALID');
+ }
+
+ $mark_read = $request->variable('mark', array(0));
+
+ if (!empty($mark_read))
+ {
+ $phpbb_notifications->mark_notifications_read_by_id($mark_read, $form_time);
+ }
+ }
+
+ $notifications = $phpbb_notifications->load_notifications(array(
+ 'start' => $start,
+ 'limit' => $config['topics_per_page'],
+ 'count_total' => true,
+ ));
+
+ foreach ($notifications['notifications'] as $notification)
+ {
+ $template->assign_block_vars('notification_list', $notification->prepare_for_display());
+ }
+
+ $base_url = append_sid("{$phpbb_root_path}ucp.$phpEx", "i=ucp_notifications&amp;mode=notification_list");
+ $start = $pagination->validate_start($start, $config['topics_per_page'], $notifications['total_count']);
+ $pagination->generate_template_pagination($base_url, 'pagination', 'start', $notifications['total_count'], $config['topics_per_page'], $start);
+
+ $template->assign_vars(array(
+ 'TOTAL_COUNT' => $notifications['total_count'],
+ 'U_MARK_ALL' => $base_url . '&amp;mark=all&amp;token=' . generate_link_hash('mark_all_notifications_read'),
+ ));
+
+ $this->tpl_name = 'ucp_notifications';
+ $this->page_title = 'UCP_NOTIFICATION_LIST';
+ break;
+ }
+
+ $template->assign_vars(array(
+ 'TITLE' => $user->lang($this->page_title),
+ 'TITLE_EXPLAIN' => $user->lang($this->page_title . '_EXPLAIN'),
+
+ 'MODE' => $mode,
+
+ 'FORM_TIME' => time(),
+ ));
+ }
+
+ /**
+ * Output all the notification types to the template
+ *
+ * @param array $subscriptions Array containing global subscriptions
+ * @param \phpbb\notification\manager $phpbb_notifications
+ * @param \phpbb\template\template $template
+ * @param \phpbb\user $user
+ * @param string $block
+ */
+ public function output_notification_types($subscriptions, \phpbb\notification\manager $phpbb_notifications, \phpbb\template\template $template, \phpbb\user $user, $block = 'notification_types')
+ {
+ $notification_methods = $phpbb_notifications->get_subscription_methods();
+
+ foreach($phpbb_notifications->get_subscription_types() as $group => $subscription_types)
+ {
+ $template->assign_block_vars($block, array(
+ 'GROUP_NAME' => $user->lang($group),
+ ));
+
+ foreach($subscription_types as $type => $data)
+ {
+ $template->assign_block_vars($block, array(
+ 'TYPE' => $type,
+
+ 'NAME' => $user->lang($data['lang']),
+ 'EXPLAIN' => (isset($user->lang[$data['lang'] . '_EXPLAIN'])) ? $user->lang($data['lang'] . '_EXPLAIN') : '',
+
+ 'SUBSCRIBED' => (isset($subscriptions[$type])) ? true : false,
+ ));
+
+ foreach($notification_methods as $method => $method_data)
+ {
+ $template->assign_block_vars($block . '.notification_methods', array(
+ 'METHOD' => $method_data['id'],
+
+ 'NAME' => $user->lang($method_data['lang']),
+
+ 'SUBSCRIBED' => (isset($subscriptions[$type]) && in_array($method_data['id'], $subscriptions[$type])) ? true : false,
+ ));
+ }
+ }
+ }
+
+ $template->assign_vars(array(
+ strtoupper($block) . '_COLS' => sizeof($notification_methods) + 2,
+ ));
+ }
+
+ /**
+ * Output all the notification methods to the template
+ *
+ * @param \phpbb\notification\manager $phpbb_notifications
+ * @param \phpbb\template\template $template
+ * @param \phpbb\user $user
+ * @param string $block
+ */
+ public function output_notification_methods(\phpbb\notification\manager $phpbb_notifications, \phpbb\template\template $template, \phpbb\user $user, $block = 'notification_methods')
+ {
+ $notification_methods = $phpbb_notifications->get_subscription_methods();
+
+ foreach($notification_methods as $method => $method_data)
+ {
+ $template->assign_block_vars($block, array(
+ 'METHOD' => $method_data['id'],
+
+ 'NAME' => $user->lang($method_data['lang']),
+ ));
+ }
+ }
+}
diff --git a/phpBB/includes/ucp/ucp_pm.php b/phpBB/includes/ucp/ucp_pm.php
index 447b6ebe87..7e13b5b9c6 100644
--- a/phpBB/includes/ucp/ucp_pm.php
+++ b/phpBB/includes/ucp/ucp_pm.php
@@ -1,9 +1,8 @@
<?php
/**
* @package ucp
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -84,33 +83,6 @@ class ucp_pm
switch ($mode)
{
- // New private messages popup
- case 'popup':
-
- $l_new_message = '';
- if ($user->data['is_registered'])
- {
- if ($user->data['user_new_privmsg'])
- {
- $l_new_message = ($user->data['user_new_privmsg'] == 1) ? $user->lang['YOU_NEW_PM'] : $user->lang['YOU_NEW_PMS'];
- }
- else
- {
- $l_new_message = $user->lang['YOU_NO_NEW_PM'];
- }
- }
-
- $template->assign_vars(array(
- 'MESSAGE' => $l_new_message,
- 'S_NOT_LOGGED_IN' => ($user->data['user_id'] == ANONYMOUS) ? true : false,
- 'CLICK_TO_VIEW' => sprintf($user->lang['CLICK_VIEW_PRIVMSG'], '<a href="' . append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&amp;folder=inbox') . '" onclick="jump_to_inbox(this.href); return false;">', '</a>'),
- 'U_INBOX' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&amp;folder=inbox'),
- 'UA_INBOX' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&folder=inbox', false))
- );
-
- $tpl_file = 'ucp_pm_popup';
- break;
-
// Compose message
case 'compose':
$action = request_var('action', 'post');
@@ -345,8 +317,8 @@ class ucp_pm
'NUM_NOT_MOVED' => $num_not_moved,
'NUM_REMOVED' => $num_removed,
'RELEASE_MESSAGE_INFO' => sprintf($user->lang['RELEASE_MESSAGES'], '<a href="' . $this->u_action . '&amp;folder=' . $folder_id . '&amp;release=1">', '</a>'),
- 'NOT_MOVED_MESSAGES' => ($num_not_moved == 1) ? $user->lang['NOT_MOVED_MESSAGE'] : sprintf($user->lang['NOT_MOVED_MESSAGES'], $num_not_moved),
- 'RULE_REMOVED_MESSAGES' => ($num_removed == 1) ? $user->lang['RULE_REMOVED_MESSAGE'] : sprintf($user->lang['RULE_REMOVED_MESSAGES'], $num_removed),
+ 'NOT_MOVED_MESSAGES' => $user->lang('NOT_MOVED_MESSAGES', (int) $num_not_moved),
+ 'RULE_REMOVED_MESSAGES' => $user->lang('RULE_REMOVED_MESSAGES', (int) $num_removed),
'S_FOLDER_OPTIONS' => $s_folder_options,
'S_TO_FOLDER_OPTIONS' => $s_to_folder_options,
@@ -380,9 +352,10 @@ class ucp_pm
else if ($action == 'view_message')
{
$template->assign_vars(array(
- 'S_VIEW_MESSAGE' => true,
- 'MSG_ID' => $msg_id)
- );
+ 'S_VIEW_MESSAGE' => true,
+ 'L_RETURN_TO_FOLDER' => $user->lang('RETURN_TO', $folder_status['folder_name']),
+ 'MSG_ID' => $msg_id,
+ ));
if (!$msg_id)
{
@@ -412,5 +385,3 @@ class ucp_pm
$this->page_title = 'UCP_PM_' . strtoupper($mode);
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/ucp/ucp_pm_compose.php b/phpBB/includes/ucp/ucp_pm_compose.php
index d7509a1072..87dfdf902b 100644
--- a/phpBB/includes/ucp/ucp_pm_compose.php
+++ b/phpBB/includes/ucp/ucp_pm_compose.php
@@ -2,9 +2,8 @@
/**
*
* @package ucp
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -22,8 +21,10 @@ if (!defined('IN_PHPBB'))
*/
function compose_pm($id, $mode, $action, $user_folders = array())
{
- global $template, $db, $auth, $user;
+ global $template, $db, $auth, $user, $cache;
global $phpbb_root_path, $phpEx, $config;
+ global $request;
+ global $phpbb_container;
// Damn php and globals - i know, this is horrible
// Needed for handle_message_list_actions()
@@ -49,13 +50,7 @@ function compose_pm($id, $mode, $action, $user_folders = array())
// Reply to all triggered (quote/reply)
$reply_to_all = request_var('reply_to_all', 0);
- // Do NOT use request_var or specialchars here
- $address_list = isset($_REQUEST['address_list']) ? $_REQUEST['address_list'] : array();
-
- if (!is_array($address_list))
- {
- $address_list = array();
- }
+ $address_list = $request->variable('address_list', array('' => array(0 => '')));
$submit = (isset($_POST['post'])) ? true : false;
$preview = (isset($_POST['preview'])) ? true : false;
@@ -391,6 +386,8 @@ function compose_pm($id, $mode, $action, $user_folders = array())
}
$message_parser = new parse_message();
+ $plupload = $phpbb_container->get('plupload');
+ $message_parser->set_plupload($plupload);
$message_parser->message = ($action == 'reply') ? '' : $message_text;
unset($message_text);
@@ -841,11 +838,11 @@ function compose_pm($id, $mode, $action, $user_folders = array())
$post_id = request_var('p', 0);
if ($config['allow_post_links'])
{
- $message_link = "[url=" . generate_board_url() . "/viewtopic.$phpEx?p={$post_id}#p{$post_id}]{$user->lang['SUBJECT']}: {$message_subject}[/url]\n\n";
+ $message_link = "[url=" . generate_board_url() . "/viewtopic.$phpEx?p={$post_id}#p{$post_id}]{$user->lang['SUBJECT']}{$user->lang['COLON']} {$message_subject}[/url]\n\n";
}
else
{
- $message_link = $user->lang['SUBJECT'] . ': ' . $message_subject . " (" . generate_board_url() . "/viewtopic.$phpEx?p={$post_id}#p{$post_id})\n\n";
+ $message_link = $user->lang['SUBJECT'] . $user->lang['COLON'] . ' ' . $message_subject . " (" . generate_board_url() . "/viewtopic.$phpEx?p={$post_id}#p{$post_id})\n\n";
}
}
else
@@ -878,7 +875,7 @@ function compose_pm($id, $mode, $action, $user_folders = array())
$forward_text[] = sprintf($user->lang['FWD_SUBJECT'], censor_text($message_subject));
$forward_text[] = sprintf($user->lang['FWD_DATE'], $user->format_date($message_time, false, true));
$forward_text[] = sprintf($user->lang['FWD_FROM'], $quote_username_text);
- $forward_text[] = sprintf($user->lang['FWD_TO'], implode(', ', $fwd_to_field['to']));
+ $forward_text[] = sprintf($user->lang['FWD_TO'], implode($user->lang['COMMA_SEPARATOR'], $fwd_to_field['to']));
$message_parser->message = implode("\n", $forward_text) . "\n\n[quote=&quot;{$quote_username}&quot;]\n" . censor_text(trim($message_parser->message)) . "\n[/quote]";
$message_subject = ((!preg_match('/^Fwd:/', $message_subject)) ? 'Fwd: ' : '') . censor_text($message_subject);
@@ -1048,7 +1045,7 @@ function compose_pm($id, $mode, $action, $user_folders = array())
$s_hidden_fields = '<input type="hidden" name="lastclick" value="' . $current_time . '" />';
$s_hidden_fields .= (isset($check_value)) ? '<input type="hidden" name="status_switch" value="' . $check_value . '" />' : '';
- $s_hidden_fields .= ($draft_id || isset($_REQUEST['draft_loaded'])) ? '<input type="hidden" name="draft_loaded" value="' . ((isset($_REQUEST['draft_loaded'])) ? intval($_REQUEST['draft_loaded']) : $draft_id) . '" />' : '';
+ $s_hidden_fields .= ($draft_id || isset($_REQUEST['draft_loaded'])) ? '<input type="hidden" name="draft_loaded" value="' . ((isset($_REQUEST['draft_loaded'])) ? $request->variable('draft_loaded', 0) : $draft_id) . '" />' : '';
$form_enctype = (@ini_get('file_uploads') == '0' || strtolower(@ini_get('file_uploads')) == 'off' || !$config['allow_pm_attach'] || !$auth->acl_get('u_pm_attach')) ? '' : ' enctype="multipart/form-data"';
@@ -1056,7 +1053,7 @@ function compose_pm($id, $mode, $action, $user_folders = array())
$template->assign_vars(array(
'L_POST_A' => $page_title,
'L_ICON' => $user->lang['PM_ICON'],
- 'L_MESSAGE_BODY_EXPLAIN' => (intval($config['max_post_chars'])) ? sprintf($user->lang['MESSAGE_BODY_EXPLAIN'], intval($config['max_post_chars'])) : '',
+ 'L_MESSAGE_BODY_EXPLAIN' => $user->lang('MESSAGE_BODY_EXPLAIN', (int) $config['max_post_chars']),
'SUBJECT' => (isset($message_subject)) ? $message_subject : '',
'MESSAGE' => $message_text,
@@ -1105,6 +1102,11 @@ function compose_pm($id, $mode, $action, $user_folders = array())
// Show attachment box for adding attachments if true
$allowed = ($auth->acl_get('u_pm_attach') && $config['allow_pm_attach'] && $form_enctype);
+ if ($allowed)
+ {
+ $plupload->configure($cache, $template, $s_action, false);
+ }
+
// Attachment entry
posting_gen_attachment_entry($attachment_data, $filename_data, $allowed);
@@ -1124,11 +1126,12 @@ function compose_pm($id, $mode, $action, $user_folders = array())
function handle_message_list_actions(&$address_list, &$error, $remove_u, $remove_g, $add_to, $add_bcc)
{
global $auth, $db, $user;
+ global $request;
// Delete User [TO/BCC]
- if ($remove_u && !empty($_REQUEST['remove_u']) && is_array($_REQUEST['remove_u']))
+ if ($remove_u && $request->variable('remove_u', array(0 => '')))
{
- $remove_user_id = array_keys($_REQUEST['remove_u']);
+ $remove_user_id = array_keys($request->variable('remove_u', array(0 => '')));
if (isset($remove_user_id[0]))
{
@@ -1137,9 +1140,9 @@ function handle_message_list_actions(&$address_list, &$error, $remove_u, $remove
}
// Delete Group [TO/BCC]
- if ($remove_g && !empty($_REQUEST['remove_g']) && is_array($_REQUEST['remove_g']))
+ if ($remove_g && $request->variable('remove_g', array(0 => '')))
{
- $remove_group_id = array_keys($_REQUEST['remove_g']);
+ $remove_group_id = array_keys($request->variable('remove_g', array(0 => '')));
if (isset($remove_group_id[0]))
{
@@ -1207,7 +1210,7 @@ function handle_message_list_actions(&$address_list, &$error, $remove_u, $remove
}
// Add Friends if specified
- $friend_list = (isset($_REQUEST['add_' . $type]) && is_array($_REQUEST['add_' . $type])) ? array_map('intval', array_keys($_REQUEST['add_' . $type])) : array();
+ $friend_list = array_keys($request->variable('add_' . $type, array(0)));
$user_id_ary = array_merge($user_id_ary, $friend_list);
foreach ($user_id_ary as $user_id)
@@ -1305,5 +1308,3 @@ function get_recipients($address_list, $num_recipients = 1)
return $recipient;
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/ucp/ucp_pm_options.php b/phpBB/includes/ucp/ucp_pm_options.php
index efa390ed87..26ce6ed28f 100644
--- a/phpBB/includes/ucp/ucp_pm_options.php
+++ b/phpBB/includes/ucp/ucp_pm_options.php
@@ -2,9 +2,8 @@
/**
*
* @package ucp
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -231,7 +230,7 @@ function message_options($id, $mode, $global_privmsgs_rules, $global_rule_condit
// Something went wrong, only partially moved?
if ($num_moved != $folder_row['pm_count'])
{
- trigger_error(sprintf($user->lang['MOVE_PM_ERROR'], $num_moved, $folder_row['pm_count']));
+ trigger_error($user->lang('MOVE_PM_ERROR', $user->lang('MESSAGES_COUNT', (int) $folder_row['pm_count']), $num_moved));
}
break;
@@ -422,7 +421,7 @@ function message_options($id, $mode, $global_privmsgs_rules, $global_rule_condit
$folder[PRIVMSGS_INBOX] = array(
'folder_name' => $user->lang['PM_INBOX'],
- 'message_status' => sprintf($user->lang['FOLDER_MESSAGE_STATUS'], $num_messages, $user->data['message_limit'])
+ 'message_status' => $user->lang('FOLDER_MESSAGE_STATUS', $user->lang('MESSAGES_COUNT', (int) $user->data['message_limit']), $num_messages),
);
$sql = 'SELECT folder_id, folder_name, pm_count
@@ -436,7 +435,7 @@ function message_options($id, $mode, $global_privmsgs_rules, $global_rule_condit
$num_user_folder++;
$folder[$row['folder_id']] = array(
'folder_name' => $row['folder_name'],
- 'message_status' => sprintf($user->lang['FOLDER_MESSAGE_STATUS'], $row['pm_count'], $user->data['message_limit'])
+ 'message_status' => $user->lang('FOLDER_MESSAGE_STATUS', $user->lang('MESSAGES_COUNT', (int) $user->data['message_limit']), (int) $row['pm_count']),
);
}
$db->sql_freeresult($result);
@@ -862,5 +861,3 @@ function show_defined_rules($user_id, $check_lang, $rule_lang, $action_lang, $fo
}
$db->sql_freeresult($result);
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/ucp/ucp_pm_viewfolder.php b/phpBB/includes/ucp/ucp_pm_viewfolder.php
index bd7bf89854..a567283543 100644
--- a/phpBB/includes/ucp/ucp_pm_viewfolder.php
+++ b/phpBB/includes/ucp/ucp_pm_viewfolder.php
@@ -2,9 +2,8 @@
/**
*
* @package ucp
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -165,7 +164,7 @@ function view_folder($id, $mode, $folder_id, $folder)
'PM_ICON_IMG' => (!empty($icons[$row['icon_id']])) ? '<img src="' . $config['icons_path'] . '/' . $icons[$row['icon_id']]['img'] . '" width="' . $icons[$row['icon_id']]['width'] . '" height="' . $icons[$row['icon_id']]['height'] . '" alt="" title="" />' : '',
'PM_ICON_URL' => (!empty($icons[$row['icon_id']])) ? $config['icons_path'] . '/' . $icons[$row['icon_id']]['img'] : '',
'FOLDER_IMG' => $user->img($folder_img, $folder_alt),
- 'FOLDER_IMG_SRC' => $user->img($folder_img, $folder_alt, false, '', 'src'),
+ 'FOLDER_IMG_STYLE' => $folder_img,
'PM_IMG' => ($row_indicator) ? $user->img('pm_' . $row_indicator, '') : '',
'ATTACH_ICON_IMG' => ($auth->acl_get('u_pm_download') && $row['message_attachment'] && $config['allow_pm_attach']) ? $user->img('icon_topic_attach', $user->lang['TOTAL_ATTACHMENTS']) : '',
@@ -177,7 +176,7 @@ function view_folder($id, $mode, $folder_id, $folder)
'U_VIEW_PM' => ($row['pm_deleted']) ? '' : $view_message_url,
'U_REMOVE_PM' => ($row['pm_deleted']) ? $remove_message_url : '',
'U_MCP_REPORT' => (isset($row['report_id'])) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=pm_reports&amp;mode=pm_report_details&amp;r=' . $row['report_id']) : '',
- 'RECIPIENTS' => ($folder_id == PRIVMSGS_OUTBOX || $folder_id == PRIVMSGS_SENTBOX) ? implode(', ', $address_list[$message_id]) : '')
+ 'RECIPIENTS' => ($folder_id == PRIVMSGS_OUTBOX || $folder_id == PRIVMSGS_SENTBOX) ? implode($user->lang['COMMA_SEPARATOR'], $address_list[$message_id]) : '')
);
}
unset($folder_info['rowset']);
@@ -267,10 +266,10 @@ function view_folder($id, $mode, $folder_id, $folder)
}
}
- // There is the chance that all recipients of the message got deleted. To avoid creating
+ // There is the chance that all recipients of the message got deleted. To avoid creating
// exports without recipients, we add a bogus "undisclosed recipient".
- if (!(isset($address[$message_id]['g']) && sizeof($address[$message_id]['g'])) &&
- !(isset($address[$message_id]['u']) && sizeof($address[$message_id]['u'])))
+ if (!(isset($address[$message_id]['g']) && sizeof($address[$message_id]['g'])) &&
+ !(isset($address[$message_id]['u']) && sizeof($address[$message_id]['u'])))
{
$address[$message_id]['u'] = array();
$address[$message_id]['u']['to'] = array();
@@ -278,12 +277,12 @@ function view_folder($id, $mode, $folder_id, $folder)
}
decode_message($message_row['message_text'], $message_row['bbcode_uid']);
-
+
$data[] = array(
'subject' => censor_text($row['message_subject']),
'sender' => $row['username'],
// ISO 8601 date. For PHP4 we are able to hardcode the timezone because $user->format_date() does not set it.
- 'date' => $user->format_date($row['message_time'], (PHP_VERSION >= 5) ? 'c' : "Y-m-d\TH:i:s+00:00", true),
+ 'date' => $user->format_date($row['message_time'], 'c', true),
'to' => ($folder_id == PRIVMSGS_OUTBOX || $folder_id == PRIVMSGS_SENTBOX) ? $address[$message_id] : '',
'message' => $message_row['message_text']
);
@@ -394,7 +393,7 @@ function view_folder($id, $mode, $folder_id, $folder)
*/
function get_pm_from($folder_id, $folder, $user_id)
{
- global $user, $db, $template, $config, $auth, $phpbb_root_path, $phpEx;
+ global $user, $db, $template, $config, $auth, $phpbb_container, $phpbb_root_path, $phpEx;
$start = request_var('start', 0);
@@ -403,6 +402,8 @@ function get_pm_from($folder_id, $folder, $user_id)
$sort_key = request_var('sk', 't');
$sort_dir = request_var('sd', 'd');
+ $pagination = $phpbb_container->get('pagination');
+
// PM ordering options
$limit_days = array(0 => $user->lang['ALL_MESSAGES'], 1 => $user->lang['1_DAY'], 7 => $user->lang['7_DAYS'], 14 => $user->lang['2_WEEKS'], 30 => $user->lang['1_MONTH'], 90 => $user->lang['3_MONTHS'], 180 => $user->lang['6_MONTHS'], 365 => $user->lang['1_YEAR']);
@@ -452,10 +453,12 @@ function get_pm_from($folder_id, $folder, $user_id)
$sql_limit_time = '';
}
+ $base_url = append_sid("{$phpbb_root_path}ucp.$phpEx", "i=pm&amp;mode=view&amp;action=view_folder&amp;f=$folder_id&amp;$u_sort_param");
+ $start = $pagination->validate_start($start, $config['topics_per_page'], $pm_count);
+ $pagination->generate_template_pagination($base_url, 'pagination', 'start', $pm_count, $config['topics_per_page'], $start);
+
$template->assign_vars(array(
- 'PAGINATION' => generate_pagination(append_sid("{$phpbb_root_path}ucp.$phpEx", "i=pm&amp;mode=view&amp;action=view_folder&amp;f=$folder_id&amp;$u_sort_param"), $pm_count, $config['topics_per_page'], $start),
- 'PAGE_NUMBER' => on_page($pm_count, $config['topics_per_page'], $start),
- 'TOTAL_MESSAGES' => (($pm_count == 1) ? $user->lang['VIEW_PM_MESSAGE'] : sprintf($user->lang['VIEW_PM_MESSAGES'], $pm_count)),
+ 'TOTAL_MESSAGES' => $user->lang('VIEW_PM_MESSAGES', (int) $pm_count),
'POST_IMG' => (!$auth->acl_get('u_sendpm')) ? $user->img('button_topic_locked', 'POST_PM_LOCKED') : $user->img('button_pm_new', 'POST_NEW_PM'),
@@ -480,14 +483,10 @@ function get_pm_from($folder_id, $folder, $user_id)
{
$store_reverse = true;
- if ($start + $config['topics_per_page'] > $pm_count)
- {
- $sql_limit = min($config['topics_per_page'], max(1, $pm_count - $start));
- }
-
// Select the sort order
$direction = ($sort_dir == 'd') ? 'ASC' : 'DESC';
- $sql_start = max(0, $pm_count - $sql_limit - $start);
+ $sql_limit = $pagination->reverse_limit($start, $sql_limit, $pm_count);
+ $sql_start = $pagination->reverse_start($start, $sql_limit, $pm_count);
}
else
{
@@ -552,5 +551,3 @@ function get_pm_from($folder_id, $folder, $user_id)
'rowset' => $rowset
);
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/ucp/ucp_pm_viewmessage.php b/phpBB/includes/ucp/ucp_pm_viewmessage.php
index 82a095dd9c..b68389cba7 100644
--- a/phpBB/includes/ucp/ucp_pm_viewmessage.php
+++ b/phpBB/includes/ucp/ucp_pm_viewmessage.php
@@ -2,9 +2,8 @@
/**
*
* @package ucp
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -21,8 +20,8 @@ if (!defined('IN_PHPBB'))
*/
function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row)
{
- global $user, $template, $auth, $db, $cache;
- global $phpbb_root_path, $phpEx, $config;
+ global $user, $template, $auth, $db, $cache, $phpbb_container;
+ global $phpbb_root_path, $request, $phpEx, $config, $phpbb_dispatcher;
$user->add_lang(array('viewtopic', 'memberlist'));
@@ -59,23 +58,22 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row)
$bbcode = new bbcode($message_row['bbcode_bitfield']);
}
+ // Load the custom profile fields
+ if ($config['load_cpf_pm'])
+ {
+ $cp = $phpbb_container->get('profilefields.manager');
+
+ $profile_fields = $cp->grab_profile_fields_data($author_id);
+ }
+
// Assign TO/BCC Addresses to template
write_pm_addresses(array('to' => $message_row['to_address'], 'bcc' => $message_row['bcc_address']), $author_id);
$user_info = get_user_information($author_id, $message_row);
// Parse the message and subject
- $message = censor_text($message_row['message_text']);
-
- // Second parse bbcode here
- if ($message_row['bbcode_bitfield'])
- {
- $bbcode->bbcode_second_pass($message, $message_row['bbcode_uid'], $message_row['bbcode_bitfield']);
- }
-
- // Always process smilies after parsing bbcodes
- $message = bbcode_nl2br($message);
- $message = smiley_text($message);
+ $parse_flags = ($message_row['bbcode_bitfield'] ? OPTION_FLAG_BBCODE : 0) | OPTION_FLAG_SMILIES;
+ $message = generate_text_for_display($message_row['message_text'], $message_row['bbcode_uid'], $message_row['bbcode_bitfield'], $parse_flags, true);
// Replace naughty words such as farty pants
$message_row['message_subject'] = censor_text($message_row['message_subject']);
@@ -83,8 +81,7 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row)
// Editing information
if ($message_row['message_edit_count'] && $config['display_last_edited'])
{
- $l_edit_time_total = ($message_row['message_edit_count'] == 1) ? $user->lang['EDITED_TIME_TOTAL'] : $user->lang['EDITED_TIMES_TOTAL'];
- $l_edited_by = '<br /><br />' . sprintf($l_edit_time_total, (!$message_row['message_edit_user']) ? $message_row['username'] : $message_row['message_edit_user'], $user->format_date($message_row['message_edit_time'], false, true), $message_row['message_edit_count']);
+ $l_edited_by = '<br /><br />' . $user->lang('EDITED_TIMES_TOTAL', (int) $message_row['message_edit_count'], (!$message_row['message_edit_user']) ? $message_row['username'] : $message_row['message_edit_user'], $user->format_date($message_row['message_edit_time'], false, true));
}
else
{
@@ -150,21 +147,8 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row)
// End signature parsing, only if needed
if ($signature)
{
- $signature = censor_text($signature);
-
- if ($user_info['user_sig_bbcode_bitfield'])
- {
- if ($bbcode === false)
- {
- include($phpbb_root_path . 'includes/bbcode.' . $phpEx);
- $bbcode = new bbcode($user_info['user_sig_bbcode_bitfield']);
- }
-
- $bbcode->bbcode_second_pass($signature, $user_info['user_sig_bbcode_uid'], $user_info['user_sig_bbcode_bitfield']);
- }
-
- $signature = bbcode_nl2br($signature);
- $signature = smiley_text($signature);
+ $parse_flags = ($user_info['user_sig_bbcode_bitfield'] ? OPTION_FLAG_BBCODE : 0) | OPTION_FLAG_SMILIES;
+ $signature = generate_text_for_display($signature, $user_info['user_sig_bbcode_uid'], $user_info['user_sig_bbcode_bitfield'], $parse_flags, true);
}
$url = append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm');
@@ -174,7 +158,26 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row)
$bbcode_status = ($config['allow_bbcode'] && $config['auth_bbcode_pm'] && $auth->acl_get('u_pm_bbcode')) ? true : false;
- $template->assign_vars(array(
+ // Get the profile fields template data
+ $cp_row = array();
+ if ($config['load_cpf_pm'] && isset($profile_fields[$author_id]))
+ {
+ // Filter the fields we don't want to show
+ foreach ($profile_fields[$author_id] as $used_ident => $profile_field)
+ {
+ if (!$profile_field['data']['field_show_on_pm'])
+ {
+ unset($profile_fields[$author_id][$used_ident]);
+ }
+ }
+
+ if (isset($profile_fields[$author_id]))
+ {
+ $cp_row = $cp->generate_profile_fields_template_data($profile_fields[$author_id]);
+ }
+ }
+
+ $msg_data = array(
'MESSAGE_AUTHOR_FULL' => get_username_string('full', $author_id, $user_info['username'], $user_info['user_colour'], $user_info['username']),
'MESSAGE_AUTHOR_COLOUR' => get_username_string('colour', $author_id, $user_info['username'], $user_info['user_colour'], $user_info['username']),
'MESSAGE_AUTHOR' => get_username_string('username', $author_id, $user_info['username'], $user_info['user_colour'], $user_info['username']),
@@ -185,7 +188,6 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row)
'AUTHOR_AVATAR' => (isset($user_info['avatar'])) ? $user_info['avatar'] : '',
'AUTHOR_JOINED' => $user->format_date($user_info['user_regdate']),
'AUTHOR_POSTS' => (int) $user_info['user_posts'],
- 'AUTHOR_FROM' => (!empty($user_info['user_from'])) ? $user_info['user_from'] : '',
'ONLINE_IMG' => (!$config['load_onlinetrack']) ? '' : ((isset($user_info['online']) && $user_info['online']) ? $user->img('icon_user_online', $user->lang['ONLINE']) : $user->img('icon_user_offline', $user->lang['OFFLINE'])),
'S_ONLINE' => (!$config['load_onlinetrack']) ? false : ((isset($user_info['online']) && $user_info['online']) ? true : false),
@@ -207,11 +209,6 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row)
'MESSAGE_ID' => $message_row['msg_id'],
'U_PM' => ($config['allow_privmsg'] && $auth->acl_get('u_sendpm') && ($user_info['user_allow_pm'] || $auth->acl_gets('a_', 'm_') || $auth->acl_getf_global('m_'))) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&amp;mode=compose&amp;u=' . $author_id) : '',
- 'U_WWW' => (!empty($user_info['user_website'])) ? $user_info['user_website'] : '',
- 'U_ICQ' => ($user_info['user_icq']) ? 'http://www.icq.com/people/' . urlencode($user_info['user_icq']) . '/' : '',
- 'U_AIM' => ($user_info['user_aim'] && $auth->acl_get('u_sendim')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=contact&amp;action=aim&amp;u=' . $author_id) : '',
- 'U_YIM' => ($user_info['user_yim']) ? 'http://edit.yahoo.com/config/send_webmesg?.target=' . urlencode($user_info['user_yim']) . '&amp;.src=pg' : '',
- 'U_MSN' => ($user_info['user_msnm'] && $auth->acl_get('u_sendim')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=contact&amp;action=msnm&amp;u=' . $author_id) : '',
'U_JABBER' => ($user_info['user_jabber'] && $auth->acl_get('u_sendim')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=contact&amp;action=jabber&amp;u=' . $author_id) : '',
'U_DELETE' => ($auth->acl_get('u_pm_delete')) ? "$url&amp;mode=compose&amp;action=delete&amp;f=$folder_id&amp;p=" . $message_row['msg_id'] : '',
@@ -227,19 +224,57 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row)
'U_PM_ACTION' => $url . '&amp;mode=compose&amp;f=' . $folder_id . '&amp;p=' . $message_row['msg_id'],
'S_HAS_ATTACHMENTS' => (sizeof($attachments)) ? true : false,
+ 'S_HAS_MULTIPLE_ATTACHMENTS' => (sizeof($attachments) > 1),
'S_DISPLAY_NOTICE' => $display_notice && $message_row['message_attachment'],
'S_AUTHOR_DELETED' => ($author_id == ANONYMOUS) ? true : false,
'S_SPECIAL_FOLDER' => in_array($folder_id, array(PRIVMSGS_NO_BOX, PRIVMSGS_OUTBOX)),
'S_PM_RECIPIENTS' => $num_recipients,
'S_BBCODE_ALLOWED' => ($bbcode_status) ? 1 : 0,
+ 'S_CUSTOM_FIELDS' => (!empty($cp_row['row'])) ? true : false,
'U_PRINT_PM' => ($config['print_pm'] && $auth->acl_get('u_pm_printpm')) ? "$url&amp;f=$folder_id&amp;p=" . $message_row['msg_id'] . "&amp;view=print" : '',
- 'U_FORWARD_PM' => ($config['forward_pm'] && $auth->acl_get('u_sendpm') && $auth->acl_get('u_pm_forward')) ? "$url&amp;mode=compose&amp;action=forward&amp;f=$folder_id&amp;p=" . $message_row['msg_id'] : '')
+ 'U_FORWARD_PM' => ($config['forward_pm'] && $auth->acl_get('u_sendpm') && $auth->acl_get('u_pm_forward')) ? "$url&amp;mode=compose&amp;action=forward&amp;f=$folder_id&amp;p=" . $message_row['msg_id'] : '',
);
+ /**
+ * Modify pm and sender data before it is assigned to the template
+ *
+ * @event core.ucp_pm_view_messsage
+ * @var mixed id Active module category (can be int or string)
+ * @var string mode Active module
+ * @var int folder_id ID of the folder the message is in
+ * @var int msg_id ID of the private message
+ * @var array folder Array with data of user's message folders
+ * @var array message_row Array with message data
+ * @var array cp_row Array with senders custom profile field data
+ * @var array msg_data Template array with message data
+ * @since 3.1-A1
+ */
+ $vars = array('id', 'mode', 'folder_id', 'msg_id', 'folder', 'message_row', 'cp_row', 'msg_data');
+ extract($phpbb_dispatcher->trigger_event('core.ucp_pm_view_messsage', compact($vars)));
+
+ $template->assign_vars($msg_data);
+
+ // Display the custom profile fields
+ if (!empty($cp_row['row']))
+ {
+ $template->assign_vars($cp_row['row']);
+
+ foreach ($cp_row['blockrow'] as $cp_block_row)
+ {
+ $template->assign_block_vars('custom_fields', $cp_block_row);
+ }
+ }
+
// Display not already displayed Attachments for this post, we already parsed them. ;)
if (isset($attachments) && sizeof($attachments))
{
+ $methods = phpbb_gen_download_links('msg_id', $msg_id, $phpbb_root_path, $phpEx);
+ foreach ($methods as $method)
+ {
+ $template->assign_block_vars('dl_method', $method);
+ }
+
foreach ($attachments as $attachment)
{
$template->assign_block_vars('attachment', array(
@@ -248,7 +283,7 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row)
}
}
- if (!isset($_REQUEST['view']) || $_REQUEST['view'] != 'print')
+ if (!isset($_REQUEST['view']) || $request->variable('view', '') != 'print')
{
// Message History
if (message_history($msg_id, $user->data['user_id'], $message_row, $folder))
@@ -303,12 +338,12 @@ function get_user_information($user_id, $user_row)
}
}
- if (!function_exists('get_user_avatar'))
+ if (!function_exists('phpbb_get_user_avatar'))
{
include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
}
- $user_row['avatar'] = ($user->optionget('viewavatars')) ? get_user_avatar($user_row['user_avatar'], $user_row['user_avatar_type'], $user_row['user_avatar_width'], $user_row['user_avatar_height']) : '';
+ $user_row['avatar'] = ($user->optionget('viewavatars')) ? phpbb_get_user_avatar($user_row) : '';
get_user_rank($user_row['user_rank'], $user_row['user_posts'], $user_row['rank_title'], $user_row['rank_image'], $user_row['rank_image_src']);
@@ -319,5 +354,3 @@ function get_user_information($user_id, $user_row)
return $user_row;
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/ucp/ucp_prefs.php b/phpBB/includes/ucp/ucp_prefs.php
index c6e43b831c..e80cc2dce3 100644
--- a/phpBB/includes/ucp/ucp_prefs.php
+++ b/phpBB/includes/ucp/ucp_prefs.php
@@ -2,9 +2,8 @@
/**
*
* @package ucp
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -27,7 +26,7 @@ class ucp_prefs
function main($id, $mode)
{
- global $config, $db, $user, $auth, $template, $phpbb_root_path, $phpEx;
+ global $config, $db, $user, $auth, $template, $phpbb_dispatcher, $phpbb_root_path, $phpEx;
$submit = (isset($_POST['submit'])) ? true : false;
$error = $data = array();
@@ -42,14 +41,11 @@ class ucp_prefs
'dateformat' => request_var('dateformat', $user->data['user_dateformat'], true),
'lang' => basename(request_var('lang', $user->data['user_lang'])),
'style' => request_var('style', (int) $user->data['user_style']),
- 'tz' => request_var('tz', (float) $user->data['user_timezone']),
+ 'tz' => request_var('tz', $user->data['user_timezone']),
- 'dst' => request_var('dst', (bool) $user->data['user_dst']),
'viewemail' => request_var('viewemail', (bool) $user->data['user_allow_viewemail']),
'massemail' => request_var('massemail', (bool) $user->data['user_allow_massemail']),
'hideonline' => request_var('hideonline', (bool) !$user->data['user_allow_viewonline']),
- 'notifypm' => request_var('notifypm', (bool) $user->data['user_notify_pm']),
- 'popuppm' => request_var('popuppm', (bool) $user->optionget('popuppm')),
'allowpm' => request_var('allowpm', (bool) $user->data['user_allow_pm']),
);
@@ -59,6 +55,20 @@ class ucp_prefs
$data['notifymethod'] = NOTIFY_BOTH;
}
+ /**
+ * Add UCP edit global settings data before they are assigned to the template or submitted
+ *
+ * To assign data to the template, use $template->assign_vars()
+ *
+ * @event core.ucp_prefs_personal_data
+ * @var bool submit Do we display the form only
+ * or did the user press submit
+ * @var array data Array with current ucp options data
+ * @since 3.1-A1
+ */
+ $vars = array('submit', 'data');
+ extract($phpbb_dispatcher->trigger_event('core.ucp_prefs_personal_data', compact($vars)));
+
if ($submit)
{
if ($config['override_user_style'])
@@ -73,7 +83,7 @@ class ucp_prefs
$error = validate_data($data, array(
'dateformat' => array('string', false, 1, 30),
'lang' => array('language_iso_name'),
- 'tz' => array('num', false, -14, 14),
+ 'tz' => array('timezone'),
));
if (!check_form_key('ucp_prefs_personal'))
@@ -83,24 +93,31 @@ class ucp_prefs
if (!sizeof($error))
{
- $user->optionset('popuppm', $data['popuppm']);
-
$sql_ary = array(
'user_allow_pm' => $data['allowpm'],
'user_allow_viewemail' => $data['viewemail'],
'user_allow_massemail' => $data['massemail'],
'user_allow_viewonline' => ($auth->acl_get('u_hideonline')) ? !$data['hideonline'] : $user->data['user_allow_viewonline'],
'user_notify_type' => $data['notifymethod'],
- 'user_notify_pm' => $data['notifypm'],
'user_options' => $user->data['user_options'],
- 'user_dst' => $data['dst'],
'user_dateformat' => $data['dateformat'],
'user_lang' => $data['lang'],
'user_timezone' => $data['tz'],
'user_style' => $data['style'],
);
+ /**
+ * Update UCP edit global settings data on form submit
+ *
+ * @event core.ucp_prefs_personal_update_data
+ * @var array data Submitted display options data
+ * @var array sql_ary Display options data we udpate
+ * @since 3.1-A1
+ */
+ $vars = array('data', 'sql_ary');
+ extract($phpbb_dispatcher->trigger_event('core.ucp_prefs_personal_update_data', compact($vars)));
+
$sql = 'UPDATE ' . USERS_TABLE . '
SET ' . $db->sql_build_array('UPDATE', $sql_ary) . '
WHERE user_id = ' . $user->data['user_id'];
@@ -112,7 +129,7 @@ class ucp_prefs
}
// Replace "error" strings with their real, localised form
- $error = preg_replace('#^([A-Z_]+)$#e', "(!empty(\$user->lang['\\1'])) ? \$user->lang['\\1'] : '\\1'", $error);
+ $error = array_map(array($user, 'lang'), $error);
}
$dateformat_options = '';
@@ -134,6 +151,8 @@ class ucp_prefs
}
$dateformat_options .= '>' . $user->lang['CUSTOM_DATEFORMAT'] . '</option>';
+ $timezone_selects = phpbb_timezone_select($user, $data['tz'], true);
+
// check if there are any user-selectable languages
$sql = 'SELECT COUNT(lang_id) as languages_count
FROM ' . LANG_TABLE;
@@ -173,9 +192,6 @@ class ucp_prefs
'S_MASS_EMAIL' => $data['massemail'],
'S_ALLOW_PM' => $data['allowpm'],
'S_HIDE_ONLINE' => $data['hideonline'],
- 'S_NOTIFY_PM' => $data['notifypm'],
- 'S_POPUP_PM' => $data['popuppm'],
- 'S_DST' => $data['dst'],
'DATE_FORMAT' => $data['dateformat'],
'A_DATE_FORMAT' => addslashes($data['dateformat']),
@@ -189,7 +205,8 @@ class ucp_prefs
'S_LANG_OPTIONS' => language_select($data['lang']),
'S_STYLE_OPTIONS' => ($config['override_user_style']) ? '' : style_select($data['style']),
- 'S_TZ_OPTIONS' => tz_select($data['tz'], true),
+ 'S_TZ_OPTIONS' => $timezone_selects['tz_select'],
+ 'S_TZ_DATE_OPTIONS' => $timezone_selects['tz_dates'],
'S_CAN_HIDE_ONLINE' => ($auth->acl_get('u_hideonline')) ? true : false,
'S_SELECT_NOTIFY' => ($config['jab_enable'] && $user->data['user_jabber'] && @extension_loaded('xml')) ? true : false)
);
@@ -217,6 +234,20 @@ class ucp_prefs
'wordcensor' => request_var('wordcensor', (bool) $user->optionget('viewcensors')),
);
+ /**
+ * Add UCP edit display options data before they are assigned to the template or submitted
+ *
+ * To assign data to the template, use $template->assign_vars()
+ *
+ * @event core.ucp_prefs_view_data
+ * @var bool submit Do we display the form only
+ * or did the user press submit
+ * @var array data Array with current ucp options data
+ * @since 3.1-A1
+ */
+ $vars = array('submit', 'data');
+ extract($phpbb_dispatcher->trigger_event('core.ucp_prefs_view_data', compact($vars)));
+
if ($submit)
{
$error = validate_data($data, array(
@@ -255,6 +286,17 @@ class ucp_prefs
'user_post_show_days' => $data['post_st'],
);
+ /**
+ * Update UCP edit display options data on form submit
+ *
+ * @event core.ucp_prefs_view_update_data
+ * @var array data Submitted display options data
+ * @var array sql_ary Display options data we udpate
+ * @since 3.1-A1
+ */
+ $vars = array('data', 'sql_ary');
+ extract($phpbb_dispatcher->trigger_event('core.ucp_prefs_view_update_data', compact($vars)));
+
$sql = 'UPDATE ' . USERS_TABLE . '
SET ' . $db->sql_build_array('UPDATE', $sql_ary) . '
WHERE user_id = ' . $user->data['user_id'];
@@ -266,7 +308,7 @@ class ucp_prefs
}
// Replace "error" strings with their real, localised form
- $error = preg_replace('#^([A-Z_]+)$#e', "(!empty(\$user->lang['\\1'])) ? \$user->lang['\\1'] : '\\1'", $error);
+ $error = array_map(array($user, 'lang'), $error);
}
$sort_dir_text = array('a' => $user->lang['ASCENDING'], 'd' => $user->lang['DESCENDING']);
@@ -275,7 +317,7 @@ class ucp_prefs
$limit_topic_days = array(0 => $user->lang['ALL_TOPICS'], 1 => $user->lang['1_DAY'], 7 => $user->lang['7_DAYS'], 14 => $user->lang['2_WEEKS'], 30 => $user->lang['1_MONTH'], 90 => $user->lang['3_MONTHS'], 180 => $user->lang['6_MONTHS'], 365 => $user->lang['1_YEAR']);
$sort_by_topic_text = array('a' => $user->lang['AUTHOR'], 't' => $user->lang['POST_TIME'], 'r' => $user->lang['REPLIES'], 's' => $user->lang['SUBJECT'], 'v' => $user->lang['VIEWS']);
- $sort_by_topic_sql = array('a' => 't.topic_first_poster_name', 't' => 't.topic_last_post_time', 'r' => 't.topic_replies', 's' => 't.topic_title', 'v' => 't.topic_views');
+ $sort_by_topic_sql = array('a' => 't.topic_first_poster_name', 't' => 't.topic_last_post_time', 'r' => 't.topic_posts_approved', 's' => 't.topic_title', 'v' => 't.topic_views');
// Post ordering options
$limit_post_days = array(0 => $user->lang['ALL_POSTS'], 1 => $user->lang['1_DAY'], 7 => $user->lang['7_DAYS'], 14 => $user->lang['2_WEEKS'], 30 => $user->lang['1_MONTH'], 90 => $user->lang['3_MONTHS'], 180 => $user->lang['6_MONTHS'], 365 => $user->lang['1_YEAR']);
@@ -343,6 +385,20 @@ class ucp_prefs
);
add_form_key('ucp_prefs_post');
+ /**
+ * Add UCP edit posting defaults data before they are assigned to the template or submitted
+ *
+ * To assign data to the template, use $template->assign_vars()
+ *
+ * @event core.ucp_prefs_post_data
+ * @var bool submit Do we display the form only
+ * or did the user press submit
+ * @var array data Array with current ucp options data
+ * @since 3.1-A1
+ */
+ $vars = array('submit', 'data');
+ extract($phpbb_dispatcher->trigger_event('core.ucp_prefs_post_data', compact($vars)));
+
if ($submit)
{
if (check_form_key('ucp_prefs_post'))
@@ -356,6 +412,17 @@ class ucp_prefs
'user_notify' => $data['notify'],
);
+ /**
+ * Update UCP edit posting defaults data on form submit
+ *
+ * @event core.ucp_prefs_post_update_data
+ * @var array data Submitted display options data
+ * @var array sql_ary Display options data we udpate
+ * @since 3.1-A1
+ */
+ $vars = array('data', 'sql_ary');
+ extract($phpbb_dispatcher->trigger_event('core.ucp_prefs_post_update_data', compact($vars)));
+
$sql = 'UPDATE ' . USERS_TABLE . '
SET ' . $db->sql_build_array('UPDATE', $sql_ary) . '
WHERE user_id = ' . $user->data['user_id'];
@@ -392,5 +459,3 @@ class ucp_prefs
$this->page_title = 'UCP_PREFS_' . strtoupper($mode);
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/ucp/ucp_profile.php b/phpBB/includes/ucp/ucp_profile.php
index 847311058b..3772d56e28 100644
--- a/phpBB/includes/ucp/ucp_profile.php
+++ b/phpBB/includes/ucp/ucp_profile.php
@@ -2,9 +2,8 @@
/**
*
* @package ucp
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -29,13 +28,14 @@ class ucp_profile
function main($id, $mode)
{
- global $config, $db, $user, $auth, $template, $phpbb_root_path, $phpEx;
+ global $cache, $config, $db, $user, $auth, $template, $phpbb_root_path, $phpEx;
+ global $request, $phpbb_container;
$user->add_lang('posting');
- $preview = (!empty($_POST['preview'])) ? true : false;
- $submit = (!empty($_POST['submit'])) ? true : false;
- $delete = (!empty($_POST['delete'])) ? true : false;
+ $preview = $request->variable('preview', false, false, \phpbb\request\request_interface::POST);
+ $submit = $request->variable('submit', false, false, \phpbb\request\request_interface::POST);
+ $delete = $request->variable('delete', false, false, \phpbb\request\request_interface::POST);
$error = $data = array();
$s_hidden_fields = '';
@@ -46,10 +46,9 @@ class ucp_profile
$data = array(
'username' => utf8_normalize_nfc(request_var('username', $user->data['username'], true)),
'email' => strtolower(request_var('email', $user->data['user_email'])),
- 'email_confirm' => strtolower(request_var('email_confirm', '')),
- 'new_password' => request_var('new_password', '', true),
- 'cur_password' => request_var('cur_password', '', true),
- 'password_confirm' => request_var('password_confirm', '', true),
+ 'new_password' => $request->variable('new_password', '', true),
+ 'cur_password' => $request->variable('cur_password', '', true),
+ 'password_confirm' => $request->variable('password_confirm', '', true),
);
add_form_key('ucp_reg_details');
@@ -65,7 +64,6 @@ class ucp_profile
'email' => array(
array('string', false, 6, 60),
array('email')),
- 'email_confirm' => array('string', true, 6, 60),
);
if ($auth->acl_get('u_chgname') && $config['allow_namechange'])
@@ -78,23 +76,21 @@ class ucp_profile
$error = validate_data($data, $check_ary);
- if ($auth->acl_get('u_chgemail') && $data['email'] != $user->data['user_email'] && $data['email_confirm'] != $data['email'])
- {
- $error[] = ($data['email_confirm']) ? 'NEW_EMAIL_ERROR' : 'NEW_EMAIL_CONFIRM_EMPTY';
- }
-
if ($auth->acl_get('u_chgpasswd') && $data['new_password'] && $data['password_confirm'] != $data['new_password'])
{
$error[] = ($data['password_confirm']) ? 'NEW_PASSWORD_ERROR' : 'NEW_PASSWORD_CONFIRM_EMPTY';
}
+ // Instantiate passwords manager
+ $passwords_manager = $phpbb_container->get('passwords.manager');
+
// Only check the new password against the previous password if there have been no errors
- if (!sizeof($error) && $auth->acl_get('u_chgpasswd') && $data['new_password'] && phpbb_check_hash($data['new_password'], $user->data['user_password']))
+ if (!sizeof($error) && $auth->acl_get('u_chgpasswd') && $data['new_password'] && $passwords_manager->check($data['new_password'], $user->data['user_password']))
{
$error[] = 'SAME_PASSWORD_ERROR';
}
- if (!phpbb_check_hash($data['cur_password'], $user->data['user_password']))
+ if (!$passwords_manager->check($data['cur_password'], $user->data['user_password']))
{
$error[] = ($data['cur_password']) ? 'CUR_PASSWORD_ERROR' : 'CUR_PASSWORD_EMPTY';
}
@@ -111,7 +107,7 @@ class ucp_profile
'username_clean' => ($auth->acl_get('u_chgname') && $config['allow_namechange']) ? utf8_clean_string($data['username']) : $user->data['username_clean'],
'user_email' => ($auth->acl_get('u_chgemail')) ? $data['email'] : $user->data['user_email'],
'user_email_hash' => ($auth->acl_get('u_chgemail')) ? phpbb_email_hash($data['email']) : $user->data['user_email_hash'],
- 'user_password' => ($auth->acl_get('u_chgpasswd') && $data['new_password']) ? phpbb_hash($data['new_password']) : $user->data['user_password'],
+ 'user_password' => ($auth->acl_get('u_chgpasswd') && $data['new_password']) ? $passwords_manager->hash($data['new_password']) : $user->data['user_password'],
'user_passchg' => ($auth->acl_get('u_chgpasswd') && $data['new_password']) ? time() : 0,
);
@@ -120,7 +116,7 @@ class ucp_profile
add_log('user', $user->data['user_id'], 'LOG_USER_UPDATE_NAME', $user->data['username'], $data['username']);
}
- if ($auth->acl_get('u_chgpasswd') && $data['new_password'] && !phpbb_check_hash($data['new_password'], $user->data['user_password']))
+ if ($auth->acl_get('u_chgpasswd') && $data['new_password'] && !$passwords_manager->check($data['new_password'], $user->data['user_password']))
{
$user->reset_login_keys();
add_log('user', $user->data['user_id'], 'LOG_USER_NEW_PASSWORD', $data['username']);
@@ -181,8 +177,7 @@ class ucp_profile
while ($row = $db->sql_fetchrow($result))
{
$messenger->template('admin_activate', $row['user_lang']);
- $messenger->to($row['user_email'], $row['username']);
- $messenger->im($row['user_jabber'], $row['username']);
+ $messenger->set_addresses($row);
$messenger->assign_vars(array(
'USERNAME' => htmlspecialchars_decode($data['username']),
@@ -235,7 +230,7 @@ class ucp_profile
}
// Replace "error" strings with their real, localised form
- $error = preg_replace('#^([A-Z_]+)$#e', "(!empty(\$user->lang['\\1'])) ? \$user->lang['\\1'] : '\\1'", $error);
+ $error = array_map(array($user, 'lang'), $error);
}
$template->assign_vars(array(
@@ -247,8 +242,8 @@ class ucp_profile
'NEW_PASSWORD' => $data['new_password'],
'CUR_PASSWORD' => '',
- 'L_USERNAME_EXPLAIN' => sprintf($user->lang[$config['allow_name_chars'] . '_EXPLAIN'], $config['min_name_chars'], $config['max_name_chars']),
- 'L_CHANGE_PASSWORD_EXPLAIN' => sprintf($user->lang[$config['pass_complex'] . '_EXPLAIN'], $config['min_pass_chars'], $config['max_pass_chars']),
+ 'L_USERNAME_EXPLAIN' => $user->lang($config['allow_name_chars'] . '_EXPLAIN', $user->lang('CHARACTERS', (int) $config['min_name_chars']), $user->lang('CHARACTERS', (int) $config['max_name_chars'])),
+ 'L_CHANGE_PASSWORD_EXPLAIN' => $user->lang($config['pass_complex'] . '_EXPLAIN', $user->lang('CHARACTERS', (int) $config['min_pass_chars']), $user->lang('CHARACTERS', (int) $config['max_pass_chars'])),
'S_FORCE_PASSWORD' => ($auth->acl_get('u_chgpasswd') && $config['chg_passforce'] && $user->data['user_passchg'] < time() - ($config['chg_passforce'] * 86400)) ? true : false,
'S_CHANGE_USERNAME' => ($config['allow_namechange'] && $auth->acl_get('u_chgname')) ? true : false,
@@ -258,23 +253,18 @@ class ucp_profile
break;
case 'profile_info':
+ // Do not display profile information panel if not authed to do so
+ if (!$auth->acl_get('u_chgprofileinfo'))
+ {
+ trigger_error('NO_AUTH_PROFILEINFO');
+ }
- include($phpbb_root_path . 'includes/functions_profile_fields.' . $phpEx);
-
- $cp = new custom_profile();
+ $cp = $phpbb_container->get('profilefields.manager');
$cp_data = $cp_error = array();
$data = array(
- 'icq' => request_var('icq', $user->data['user_icq']),
- 'aim' => request_var('aim', $user->data['user_aim']),
- 'msn' => request_var('msn', $user->data['user_msnm']),
- 'yim' => request_var('yim', $user->data['user_yim']),
'jabber' => utf8_normalize_nfc(request_var('jabber', $user->data['user_jabber'], true)),
- 'website' => request_var('website', $user->data['user_website']),
- 'location' => utf8_normalize_nfc(request_var('location', $user->data['user_from'], true)),
- 'occupation' => utf8_normalize_nfc(request_var('occupation', $user->data['user_occ'], true)),
- 'interests' => utf8_normalize_nfc(request_var('interests', $user->data['user_interests'], true)),
);
if ($config['allow_birthdays'])
@@ -297,21 +287,9 @@ class ucp_profile
if ($submit)
{
$validate_array = array(
- 'icq' => array(
- array('string', true, 3, 15),
- array('match', true, '#^[0-9]+$#i')),
- 'aim' => array('string', true, 3, 255),
- 'msn' => array('string', true, 5, 255),
'jabber' => array(
array('string', true, 5, 255),
array('jabber')),
- 'yim' => array('string', true, 5, 255),
- 'website' => array(
- array('string', true, 12, 255),
- array('match', true, '#^http[s]?://(.*?\.)*?[a-z0-9\-]+\.[a-z]{2,4}#i')),
- 'location' => array('string', true, 2, 100),
- 'occupation' => array('string', true, 2, 500),
- 'interests' => array('string', true, 2, 500),
);
if ($config['allow_birthdays'])
@@ -351,15 +329,7 @@ class ucp_profile
}
$sql_ary = array(
- 'user_icq' => $data['icq'],
- 'user_aim' => $data['aim'],
- 'user_msnm' => $data['msn'],
- 'user_yim' => $data['yim'],
'user_jabber' => $data['jabber'],
- 'user_website' => $data['website'],
- 'user_from' => $data['location'],
- 'user_occ' => $data['occupation'],
- 'user_interests'=> $data['interests'],
'user_notify_type' => $data['notify'],
);
@@ -382,7 +352,7 @@ class ucp_profile
}
// Replace "error" strings with their real, localised form
- $error = preg_replace('#^([A-Z_]+)$#e', "(!empty(\$user->lang['\\1'])) ? \$user->lang['\\1'] : '\\1'", $error);
+ $error = array_map(array($user, 'lang'), $error);
}
if ($config['allow_birthdays'])
@@ -421,16 +391,7 @@ class ucp_profile
$template->assign_vars(array(
'ERROR' => (sizeof($error)) ? implode('<br />', $error) : '',
-
- 'ICQ' => $data['icq'],
- 'YIM' => $data['yim'],
- 'AIM' => $data['aim'],
- 'MSN' => $data['msn'],
'JABBER' => $data['jabber'],
- 'WEBSITE' => $data['website'],
- 'LOCATION' => $data['location'],
- 'OCCUPATION'=> $data['occupation'],
- 'INTERESTS' => $data['interests'],
));
// Get additional profile fields and assign them to the template block var 'profile_fields'
@@ -507,7 +468,7 @@ class ucp_profile
}
// Replace "error" strings with their real, localised form
- $error = preg_replace('#^([A-Z_]+)$#e', "(!empty(\$user->lang['\\1'])) ? \$user->lang['\\1'] : '\\1'", $error);
+ $error = array_map(array($user, 'lang'), $error);
}
$signature_preview = '';
@@ -536,7 +497,7 @@ class ucp_profile
'URL_STATUS' => ($config['allow_sig_links']) ? $user->lang['URL_IS_ON'] : $user->lang['URL_IS_OFF'],
'MAX_FONT_SIZE' => (int) $config['max_sig_font_size'],
- 'L_SIGNATURE_EXPLAIN' => sprintf($user->lang['SIGNATURE_EXPLAIN'], $config['max_sig_chars']),
+ 'L_SIGNATURE_EXPLAIN' => $user->lang('SIGNATURE_EXPLAIN', (int) $config['max_sig_chars']),
'S_BBCODE_ALLOWED' => $config['allow_sig_bbcode'],
'S_SMILIES_ALLOWED' => $config['allow_sig_smilies'],
@@ -554,79 +515,184 @@ class ucp_profile
break;
case 'avatar':
+ if (!function_exists('phpbb_get_user_avatar'))
+ {
+ include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
+ }
- include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
+ add_form_key('ucp_avatar');
- $display_gallery = request_var('display_gallery', '0');
- $avatar_select = basename(request_var('avatar_select', ''));
- $category = basename(request_var('category', ''));
+ $avatars_enabled = false;
- $can_upload = (file_exists($phpbb_root_path . $config['avatar_path']) && phpbb_is_writable($phpbb_root_path . $config['avatar_path']) && $auth->acl_get('u_chgavatar') && (@ini_get('file_uploads') || strtolower(@ini_get('file_uploads')) == 'on')) ? true : false;
+ if ($config['allow_avatar'] && $auth->acl_get('u_chgavatar'))
+ {
+ $phpbb_avatar_manager = $phpbb_container->get('avatar.manager');
+ $avatar_drivers = $phpbb_avatar_manager->get_enabled_drivers();
- add_form_key('ucp_avatar');
+ // This is normalised data, without the user_ prefix
+ $avatar_data = \phpbb\avatar\manager::clean_row($user->data, 'user');
- if ($submit)
- {
- if (check_form_key('ucp_avatar'))
+ if ($submit)
{
- if (avatar_process_user($error, false, $can_upload))
+ if (check_form_key('ucp_avatar'))
{
- meta_refresh(3, $this->u_action);
- $message = $user->lang['PROFILE_UPDATED'] . '<br /><br />' . sprintf($user->lang['RETURN_UCP'], '<a href="' . $this->u_action . '">', '</a>');
- trigger_error($message);
+ $driver_name = $phpbb_avatar_manager->clean_driver_name($request->variable('avatar_driver', ''));
+
+ if (in_array($driver_name, $avatar_drivers) && !$request->is_set_post('avatar_delete'))
+ {
+ $driver = $phpbb_avatar_manager->get_driver($driver_name);
+ $result = $driver->process_form($request, $template, $user, $avatar_data, $error);
+
+ if ($result && empty($error))
+ {
+ // Success! Lets save the result in the database
+ $result = array(
+ 'user_avatar_type' => $driver_name,
+ 'user_avatar' => $result['avatar'],
+ 'user_avatar_width' => $result['avatar_width'],
+ 'user_avatar_height' => $result['avatar_height'],
+ );
+
+ $sql = 'UPDATE ' . USERS_TABLE . '
+ SET ' . $db->sql_build_array('UPDATE', $result) . '
+ WHERE user_id = ' . (int) $user->data['user_id'];
+
+ $db->sql_query($sql);
+
+ meta_refresh(3, $this->u_action);
+ $message = $user->lang['PROFILE_UPDATED'] . '<br /><br />' . sprintf($user->lang['RETURN_UCP'], '<a href="' . $this->u_action . '">', '</a>');
+ trigger_error($message);
+ }
+ }
+ else
+ {
+ if ($driver = $phpbb_avatar_manager->get_driver($avatar_data['avatar_type']))
+ {
+ $driver->delete($avatar_data);
+ }
+
+ $result = array(
+ 'user_avatar' => '',
+ 'user_avatar_type' => '',
+ 'user_avatar_width' => 0,
+ 'user_avatar_height' => 0,
+ );
+
+ $sql = 'UPDATE ' . USERS_TABLE . '
+ SET ' . $db->sql_build_array('UPDATE', $result) . '
+ WHERE user_id = ' . (int) $user->data['user_id'];
+
+ $db->sql_query($sql);
+
+ meta_refresh(3, $this->u_action);
+ $message = $user->lang['PROFILE_UPDATED'] . '<br /><br />' . sprintf($user->lang['RETURN_UCP'], '<a href="' . $this->u_action . '">', '</a>');
+ trigger_error($message);
+ }
+ }
+ else
+ {
+ $error[] = 'FORM_INVALID';
}
}
- else
+
+ $selected_driver = $phpbb_avatar_manager->clean_driver_name($request->variable('avatar_driver', $user->data['user_avatar_type']));
+
+ foreach ($avatar_drivers as $current_driver)
{
- $error[] = 'FORM_INVALID';
+ $driver = $phpbb_avatar_manager->get_driver($current_driver);
+
+ $avatars_enabled = true;
+ $template->set_filenames(array(
+ 'avatar' => $driver->get_template_name(),
+ ));
+
+ if ($driver->prepare_form($request, $template, $user, $avatar_data, $error))
+ {
+ $driver_name = $phpbb_avatar_manager->prepare_driver_name($current_driver);
+ $driver_upper = strtoupper($driver_name);
+
+ $template->assign_block_vars('avatar_drivers', array(
+ 'L_TITLE' => $user->lang($driver_upper . '_TITLE'),
+ 'L_EXPLAIN' => $user->lang($driver_upper . '_EXPLAIN'),
+
+ 'DRIVER' => $driver_name,
+ 'SELECTED' => $current_driver == $selected_driver,
+ 'OUTPUT' => $template->assign_display('avatar'),
+ ));
+ }
}
+
// Replace "error" strings with their real, localised form
- $error = preg_replace('#^([A-Z_]+)$#e', "(!empty(\$user->lang['\\1'])) ? \$user->lang['\\1'] : '\\1'", $error);
+ $error = $phpbb_avatar_manager->localize_errors($user, $error);
}
- if (!$config['allow_avatar'] && $user->data['user_avatar_type'])
- {
- $error[] = $user->lang['AVATAR_NOT_ALLOWED'];
- }
- else if ((($user->data['user_avatar_type'] == AVATAR_UPLOAD) && !$config['allow_avatar_upload']) ||
- (($user->data['user_avatar_type'] == AVATAR_REMOTE) && !$config['allow_avatar_remote']) ||
- (($user->data['user_avatar_type'] == AVATAR_GALLERY) && !$config['allow_avatar_local']))
- {
- $error[] = $user->lang['AVATAR_TYPE_NOT_ALLOWED'];
- }
+ $avatar = phpbb_get_user_avatar($user->data, 'USER_AVATAR', true);
$template->assign_vars(array(
'ERROR' => (sizeof($error)) ? implode('<br />', $error) : '',
- 'AVATAR' => get_user_avatar($user->data['user_avatar'], $user->data['user_avatar_type'], $user->data['user_avatar_width'], $user->data['user_avatar_height'], 'USER_AVATAR', true),
- 'AVATAR_SIZE' => $config['avatar_filesize'],
+ 'AVATAR' => $avatar,
- 'U_GALLERY' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=profile&amp;mode=avatar&amp;display_gallery=1'),
+ 'S_FORM_ENCTYPE' => ' enctype="multipart/form-data"',
- 'S_FORM_ENCTYPE' => ($can_upload && ($config['allow_avatar_upload'] || $config['allow_avatar_remote_upload'])) ? ' enctype="multipart/form-data"' : '',
+ 'L_AVATAR_EXPLAIN' => phpbb_avatar_explanation_string(),
- 'L_AVATAR_EXPLAIN' => sprintf($user->lang['AVATAR_EXPLAIN'], $config['avatar_max_width'], $config['avatar_max_height'], $config['avatar_filesize'] / 1024),
+ 'S_AVATARS_ENABLED' => ($config['allow_avatar'] && $avatars_enabled),
));
- if ($config['allow_avatar'] && $display_gallery && $auth->acl_get('u_chgavatar') && $config['allow_avatar_local'])
+ break;
+
+ case 'autologin_keys':
+
+ add_form_key('ucp_autologin_keys');
+
+ if ($submit)
{
- avatar_gallery($category, $avatar_select, 4);
+ $keys = request_var('keys', array(''));
+
+ if (!check_form_key('ucp_autologin_keys'))
+ {
+ $error[] = 'FORM_INVALID';
+ }
+
+ if (!sizeof($error))
+ {
+ if (!empty($keys))
+ {
+ $sql = 'DELETE FROM ' . SESSIONS_KEYS_TABLE . '
+ WHERE user_id = ' . (int) $user->data['user_id'] . '
+ AND ' . $db->sql_in_set('key_id', $keys) ;
+
+ $db->sql_query($sql);
+
+ meta_refresh(3, $this->u_action);
+ $message = $user->lang['AUTOLOGIN_SESSION_KEYS_DELETED'] . '<br /><br />' . sprintf($user->lang['RETURN_UCP'], '<a href="' . $this->u_action . '">', '</a>');
+ trigger_error($message);
+ }
+ }
+
+ // Replace "error" strings with their real, localised form
+ $error = array_map(array($user, 'lang'), $error);
}
- else if ($config['allow_avatar'])
+
+ $sql = 'SELECT key_id, last_ip, last_login
+ FROM ' . SESSIONS_KEYS_TABLE . '
+ WHERE user_id = ' . (int) $user->data['user_id'];
+
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
{
- $avatars_enabled = (($can_upload && ($config['allow_avatar_upload'] || $config['allow_avatar_remote_upload'])) || ($auth->acl_get('u_chgavatar') && ($config['allow_avatar_local'] || $config['allow_avatar_remote']))) ? true : false;
+ $template->assign_block_vars('sessions', array(
+ 'errors' => $error,
- $template->assign_vars(array(
- 'AVATAR_WIDTH' => request_var('width', $user->data['user_avatar_width']),
- 'AVATAR_HEIGHT' => request_var('height', $user->data['user_avatar_height']),
-
- 'S_AVATARS_ENABLED' => $avatars_enabled,
- 'S_UPLOAD_AVATAR_FILE' => ($can_upload && $config['allow_avatar_upload']) ? true : false,
- 'S_UPLOAD_AVATAR_URL' => ($can_upload && $config['allow_avatar_remote_upload']) ? true : false,
- 'S_LINK_AVATAR' => ($auth->acl_get('u_chgavatar') && $config['allow_avatar_remote']) ? true : false,
- 'S_DISPLAY_GALLERY' => ($auth->acl_get('u_chgavatar') && $config['allow_avatar_local']) ? true : false)
- );
+ 'KEY' => $row['key_id'],
+ 'IP' => $row['last_ip'],
+ 'LOGIN_TIME' => $user->format_date($row['last_login']),
+ ));
}
+ $db->sql_freeresult($result);
+
break;
}
@@ -642,5 +708,3 @@ class ucp_profile
$this->page_title = 'UCP_PROFILE_' . strtoupper($mode);
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/ucp/ucp_register.php b/phpBB/includes/ucp/ucp_register.php
index 6ad3a55589..ff51ca7b3c 100644
--- a/phpBB/includes/ucp/ucp_register.php
+++ b/phpBB/includes/ucp/ucp_register.php
@@ -2,9 +2,8 @@
/**
*
* @package ucp
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -28,6 +27,7 @@ class ucp_register
function main($id, $mode)
{
global $config, $db, $user, $auth, $template, $phpbb_root_path, $phpEx;
+ global $request, $phpbb_container;
//
if ($config['require_activation'] == USER_ACTIVATION_DISABLE)
@@ -35,11 +35,9 @@ class ucp_register
trigger_error('UCP_REGISTER_DISABLE');
}
- include($phpbb_root_path . 'includes/functions_profile_fields.' . $phpEx);
-
- $coppa = (isset($_REQUEST['coppa'])) ? ((!empty($_REQUEST['coppa'])) ? 1 : 0) : false;
- $agreed = (!empty($_POST['agreed'])) ? 1 : 0;
- $submit = (isset($_POST['submit'])) ? true : false;
+ $coppa = $request->is_set('coppa') ? (int) $request->variable('coppa', false) : false;
+ $agreed = $request->variable('agreed', false);
+ $submit = $request->is_set_post('submit');
$change_lang = request_var('change_lang', '');
$user_lang = request_var('lang', $user->lang_name);
@@ -63,7 +61,7 @@ class ucp_register
$submit = false;
// Setting back agreed to let the user view the agreement in his/her language
- $agreed = (empty($_GET['change_lang'])) ? 0 : $agreed;
+ $agreed = false;
}
$user->lang_name = $user_lang = $use_lang;
@@ -78,19 +76,37 @@ class ucp_register
}
}
-
- $cp = new custom_profile();
+ $cp = $phpbb_container->get('profilefields.manager');
$error = $cp_data = $cp_error = array();
+ $s_hidden_fields = array();
+
+ // Handle login_link data added to $_hidden_fields
+ $login_link_data = $this->get_login_link_data_array();
+
+ if (!empty($login_link_data))
+ {
+ // Confirm that we have all necessary data
+ $auth_provider = 'auth.provider.' . $request->variable('auth_provider', $config['auth_method']);
+ $auth_provider = $phpbb_container->get($auth_provider);
+
+ $result = $auth_provider->login_link_has_necessary_data($login_link_data);
+ if ($result !== null)
+ {
+ $error[] = $user->lang[$result];
+ }
+
+ $s_hidden_fields = array_merge($s_hidden_fields, $this->get_login_link_data_for_hidden_fields($login_link_data));
+ }
if (!$agreed || ($coppa === false && $config['coppa_enable']) || ($coppa && !$config['coppa_enable']))
{
$add_lang = ($change_lang) ? '&amp;change_lang=' . urlencode($change_lang) : '';
$add_coppa = ($coppa !== false) ? '&amp;coppa=' . $coppa : '';
- $s_hidden_fields = array(
- 'change_lang' => $change_lang,
- );
+ $s_hidden_fields = array_merge($s_hidden_fields, array(
+ 'change_lang' => '',
+ ));
// If we change the language, we want to pass on some more possible parameter.
if ($change_lang)
@@ -99,9 +115,8 @@ class ucp_register
$s_hidden_fields = array_merge($s_hidden_fields, array(
'username' => utf8_normalize_nfc(request_var('username', '', true)),
'email' => strtolower(request_var('email', '')),
- 'email_confirm' => strtolower(request_var('email_confirm', '')),
'lang' => $user->lang_name,
- 'tz' => request_var('tz', (float) $config['board_timezone']),
+ 'tz' => request_var('tz', $config['board_timezone']),
));
}
@@ -121,7 +136,10 @@ class ucp_register
if ($coppa === false && $config['coppa_enable'])
{
$now = getdate();
- $coppa_birthday = $user->format_date(mktime($now['hours'] + $user->data['user_dst'], $now['minutes'], $now['seconds'], $now['mon'], $now['mday'] - 1, $now['year'] - 13), $user->lang['DATE_FORMAT']);
+ $coppa_birthday = $user->create_datetime()
+ ->setDate($now['year'] - 13, $now['mon'], $now['mday'] - 1)
+ ->setTime(0, 0, 0)
+ ->format($user->lang['DATE_FORMAT'], true);
unset($now);
$template->assign_vars(array(
@@ -156,26 +174,23 @@ class ucp_register
return;
}
-
- // The CAPTCHA kicks in here. We can't help that the information gets lost on language change.
+ // The CAPTCHA kicks in here. We can't help that the information gets lost on language change.
if ($config['enable_confirm'])
{
include($phpbb_root_path . 'includes/captcha/captcha_factory.' . $phpEx);
- $captcha =& phpbb_captcha_factory::get_instance($config['captcha_plugin']);
+ $captcha = phpbb_captcha_factory::get_instance($config['captcha_plugin']);
$captcha->init(CONFIRM_REG);
}
- $is_dst = $config['board_dst'];
$timezone = $config['board_timezone'];
$data = array(
'username' => utf8_normalize_nfc(request_var('username', '', true)),
- 'new_password' => request_var('new_password', '', true),
- 'password_confirm' => request_var('password_confirm', '', true),
+ 'new_password' => $request->variable('new_password', '', true),
+ 'password_confirm' => $request->variable('password_confirm', '', true),
'email' => strtolower(request_var('email', '')),
- 'email_confirm' => strtolower(request_var('email_confirm', '')),
'lang' => basename(request_var('lang', $user->lang_name)),
- 'tz' => request_var('tz', (float) $timezone),
+ 'tz' => request_var('tz', $timezone),
);
// Check and initialize some variables if needed
@@ -192,8 +207,7 @@ class ucp_register
'email' => array(
array('string', false, 6, 60),
array('email')),
- 'email_confirm' => array('string', false, 6, 60),
- 'tz' => array('num', false, -14, 14),
+ 'tz' => array('timezone'),
'lang' => array('language_iso_name'),
));
@@ -203,7 +217,7 @@ class ucp_register
}
// Replace "error" strings with their real, localised form
- $error = preg_replace('#^([A-Z_]+)$#e', "(!empty(\$user->lang['\\1'])) ? \$user->lang['\\1'] : '\\1'", $error);
+ $error = array_map(array($user, 'lang'), $error);
if ($config['enable_confirm'])
{
@@ -237,11 +251,6 @@ class ucp_register
{
$error[] = $user->lang['NEW_PASSWORD_ERROR'];
}
-
- if ($data['email'] != $data['email_confirm'])
- {
- $error[] = $user->lang['NEW_EMAIL_ERROR'];
- }
}
if (!sizeof($error))
@@ -283,13 +292,15 @@ class ucp_register
$user_inactive_time = 0;
}
+ // Instantiate passwords manager
+ $passwords_manager = $phpbb_container->get('passwords.manager');
+
$user_row = array(
'username' => $data['username'],
- 'user_password' => phpbb_hash($data['new_password']),
+ 'user_password' => $passwords_manager->hash($data['new_password']),
'user_email' => $data['email'],
'group_id' => (int) $group_id,
- 'user_timezone' => (float) $data['tz'],
- 'user_dst' => $is_dst,
+ 'user_timezone' => $data['tz'],
'user_lang' => $data['lang'],
'user_type' => $user_type,
'user_actkey' => $user_actkey,
@@ -369,41 +380,28 @@ class ucp_register
}
$messenger->send(NOTIFY_EMAIL);
+ }
+
+ if ($config['require_activation'] == USER_ACTIVATION_ADMIN)
+ {
+ $phpbb_notifications = $phpbb_container->get('notification_manager');
+ $phpbb_notifications->add_notifications('admin_activate_user', array(
+ 'user_id' => $user_id,
+ 'user_actkey' => $user_row['user_actkey'],
+ 'user_regdate' => $user_row['user_regdate'],
+ ));
+ }
+
+ // Perform account linking if necessary
+ if (!empty($login_link_data))
+ {
+ $login_link_data['user_id'] = $user_id;
- if ($config['require_activation'] == USER_ACTIVATION_ADMIN)
+ $result = $auth_provider->link_account($login_link_data);
+
+ if ($result)
{
- // Grab an array of user_id's with a_user permissions ... these users can activate a user
- $admin_ary = $auth->acl_get_list(false, 'a_user', false);
- $admin_ary = (!empty($admin_ary[0]['a_user'])) ? $admin_ary[0]['a_user'] : array();
-
- // Also include founders
- $where_sql = ' WHERE user_type = ' . USER_FOUNDER;
-
- if (sizeof($admin_ary))
- {
- $where_sql .= ' OR ' . $db->sql_in_set('user_id', $admin_ary);
- }
-
- $sql = 'SELECT user_id, username, user_email, user_lang, user_jabber, user_notify_type
- FROM ' . USERS_TABLE . ' ' .
- $where_sql;
- $result = $db->sql_query($sql);
-
- while ($row = $db->sql_fetchrow($result))
- {
- $messenger->template('admin_activate', $row['user_lang']);
- $messenger->to($row['user_email'], $row['username']);
- $messenger->im($row['user_jabber'], $row['username']);
-
- $messenger->assign_vars(array(
- 'USERNAME' => htmlspecialchars_decode($data['username']),
- 'U_USER_DETAILS' => "$server_url/memberlist.$phpEx?mode=viewprofile&u=$user_id",
- 'U_ACTIVATE' => "$server_url/ucp.$phpEx?mode=activate&u=$user_id&k=$user_actkey")
- );
-
- $messenger->send($row['user_notify_type']);
- }
- $db->sql_freeresult($result);
+ $message = $message . '<br /><br />' . $user->lang[$result];
}
}
@@ -412,10 +410,10 @@ class ucp_register
}
}
- $s_hidden_fields = array(
+ $s_hidden_fields = array_merge($s_hidden_fields, array(
'agreed' => 'true',
'change_lang' => 0,
- );
+ ));
if ($config['coppa_enable'])
{
@@ -450,20 +448,22 @@ class ucp_register
break;
}
+ $timezone_selects = phpbb_timezone_select($user, $data['tz'], true);
$template->assign_vars(array(
'ERROR' => (sizeof($error)) ? implode('<br />', $error) : '',
'USERNAME' => $data['username'],
'PASSWORD' => $data['new_password'],
'PASSWORD_CONFIRM' => $data['password_confirm'],
'EMAIL' => $data['email'],
- 'EMAIL_CONFIRM' => $data['email_confirm'],
'L_REG_COND' => $l_reg_cond,
- 'L_USERNAME_EXPLAIN' => sprintf($user->lang[$config['allow_name_chars'] . '_EXPLAIN'], $config['min_name_chars'], $config['max_name_chars']),
- 'L_PASSWORD_EXPLAIN' => sprintf($user->lang[$config['pass_complex'] . '_EXPLAIN'], $config['min_pass_chars'], $config['max_pass_chars']),
+ 'L_USERNAME_EXPLAIN' => $user->lang($config['allow_name_chars'] . '_EXPLAIN', $user->lang('CHARACTERS', (int) $config['min_name_chars']), $user->lang('CHARACTERS', (int) $config['max_name_chars'])),
+ 'L_PASSWORD_EXPLAIN' => $user->lang($config['pass_complex'] . '_EXPLAIN', $user->lang('CHARACTERS', (int) $config['min_pass_chars']), $user->lang('CHARACTERS', (int) $config['max_pass_chars'])),
'S_LANG_OPTIONS' => language_select($data['lang']),
- 'S_TZ_OPTIONS' => tz_select($data['tz']),
+ 'S_TZ_OPTIONS' => $timezone_selects['tz_select'],
+ 'S_TZ_DATE_OPTIONS' => $timezone_selects['tz_dates'],
+ 'S_TZ_PRESELECT' => !$submit,
'S_CONFIRM_REFRESH' => ($config['enable_confirm'] && $config['confirm_refresh']) ? true : false,
'S_REGISTRATION' => true,
'S_COPPA' => $coppa,
@@ -481,6 +481,49 @@ class ucp_register
$this->tpl_name = 'ucp_register';
$this->page_title = 'UCP_REGISTRATION';
}
-}
-?> \ No newline at end of file
+ /**
+ * Creates the login_link data array
+ *
+ * @return array Returns an array of all POST paramaters whose names
+ * begin with 'login_link_'
+ */
+ protected function get_login_link_data_array()
+ {
+ global $request;
+
+ $var_names = $request->variable_names(\phpbb\request\request_interface::POST);
+ $login_link_data = array();
+ $string_start_length = strlen('login_link_');
+
+ foreach ($var_names as $var_name)
+ {
+ if (strpos($var_name, 'login_link_') === 0)
+ {
+ $key_name = substr($var_name, $string_start_length);
+ $login_link_data[$key_name] = $request->variable($var_name, '', false, \phpbb\request\request_interface::POST);
+ }
+ }
+
+ return $login_link_data;
+ }
+
+ /**
+ * Prepends they key names of an associative array with 'login_link_' for
+ * inclusion on the page as hidden fields.
+ *
+ * @param array $data The array to be modified
+ * @return array The modified array
+ */
+ protected function get_login_link_data_for_hidden_fields($data)
+ {
+ $new_data = array();
+
+ foreach ($data as $key => $value)
+ {
+ $new_data['login_link_' . $key] = $value;
+ }
+
+ return $new_data;
+ }
+}
diff --git a/phpBB/includes/ucp/ucp_remind.php b/phpBB/includes/ucp/ucp_remind.php
index bcb21cbedc..99e945eeae 100644
--- a/phpBB/includes/ucp/ucp_remind.php
+++ b/phpBB/includes/ucp/ucp_remind.php
@@ -2,9 +2,8 @@
/**
*
* @package ucp
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -28,7 +27,12 @@ class ucp_remind
function main($id, $mode)
{
global $config, $phpbb_root_path, $phpEx;
- global $db, $user, $auth, $template;
+ global $db, $user, $auth, $template, $phpbb_container;
+
+ if (!$config['allow_password_reset'])
+ {
+ trigger_error($user->lang('UCP_PASSWORD_RESET_DISABLED', '<a href="mailto:' . htmlspecialchars($config['board_contact']) . '">', '</a>'));
+ }
$username = request_var('username', '', true);
$email = strtolower(request_var('email', ''));
@@ -67,7 +71,7 @@ class ucp_remind
}
// Check users permissions
- $auth2 = new auth();
+ $auth2 = new \phpbb\auth\auth();
$auth2->acl($user_row);
if (!$auth2->acl_get('u_chgpasswd'))
@@ -84,8 +88,11 @@ class ucp_remind
// For the activation key a random length between 6 and 10 will do.
$user_actkey = gen_rand_string(mt_rand(6, 10));
+ // Instantiate passwords manager
+ $passwords_manager = $phpbb_container->get('passwords.manager');
+
$sql = 'UPDATE ' . USERS_TABLE . "
- SET user_newpasswd = '" . $db->sql_escape(phpbb_hash($user_password)) . "', user_actkey = '" . $db->sql_escape($user_actkey) . "'
+ SET user_newpasswd = '" . $db->sql_escape($passwords_manager->hash($user_password)) . "', user_actkey = '" . $db->sql_escape($user_actkey) . "'
WHERE user_id = " . $user_row['user_id'];
$db->sql_query($sql);
@@ -95,8 +102,7 @@ class ucp_remind
$messenger->template('user_activate_passwd', $user_row['user_lang']);
- $messenger->to($user_row['user_email'], $user_row['username']);
- $messenger->im($user_row['user_jabber'], $user_row['username']);
+ $messenger->set_addresses($user_row);
$messenger->anti_abuse_headers($config, $user);
@@ -124,5 +130,3 @@ class ucp_remind
$this->page_title = 'UCP_REMIND';
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/ucp/ucp_resend.php b/phpBB/includes/ucp/ucp_resend.php
index 4d181dba49..ab396cdec9 100644
--- a/phpBB/includes/ucp/ucp_resend.php
+++ b/phpBB/includes/ucp/ucp_resend.php
@@ -2,9 +2,8 @@
/**
*
* @package ucp
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -92,7 +91,7 @@ class ucp_resend
if ($config['require_activation'] == USER_ACTIVATION_SELF || $coppa)
{
$messenger->template(($coppa) ? 'coppa_resend_inactive' : 'user_resend_inactive', $user_row['user_lang']);
- $messenger->to($user_row['user_email'], $user_row['username']);
+ $messenger->set_addresses($user_row);
$messenger->anti_abuse_headers($config, $user);
@@ -127,8 +126,7 @@ class ucp_resend
while ($row = $db->sql_fetchrow($result))
{
$messenger->template('admin_activate', $row['user_lang']);
- $messenger->to($row['user_email'], $row['username']);
- $messenger->im($row['user_jabber'], $row['username']);
+ $messenger->set_addresses($row);
$messenger->anti_abuse_headers($config, $user);
@@ -160,5 +158,3 @@ class ucp_resend
$this->page_title = 'UCP_RESEND';
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/ucp/ucp_zebra.php b/phpBB/includes/ucp/ucp_zebra.php
index 5ed4db7520..090f9bf34c 100644
--- a/phpBB/includes/ucp/ucp_zebra.php
+++ b/phpBB/includes/ucp/ucp_zebra.php
@@ -2,9 +2,8 @@
/**
*
* @package ucp
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -26,7 +25,7 @@ class ucp_zebra
function main($id, $mode)
{
- global $config, $db, $user, $auth, $template, $phpbb_root_path, $phpEx;
+ global $config, $db, $user, $auth, $template, $phpbb_root_path, $phpEx, $request, $phpbb_dispatcher;
$submit = (isset($_POST['submit']) || isset($_GET['add']) || isset($_GET['remove'])) ? true : false;
$s_hidden_fields = '';
@@ -55,9 +54,22 @@ class ucp_zebra
// Remove users
if (!empty($data['usernames']))
{
+ $user_ids = $data['usernames'];
+
+ /**
+ * Remove users from friends/foes
+ *
+ * @event core.ucp_remove_zebra
+ * @var string mode Zebra type: friends|foes
+ * @var array user_ids User ids we remove
+ * @since 3.1-A1
+ */
+ $vars = array('mode', 'user_ids');
+ extract($phpbb_dispatcher->trigger_event('core.ucp_remove_zebra', compact($vars)));
+
$sql = 'DELETE FROM ' . ZEBRA_TABLE . '
WHERE user_id = ' . $user->data['user_id'] . '
- AND ' . $db->sql_in_set('zebra_id', $data['usernames']);
+ AND ' . $db->sql_in_set('zebra_id', $user_ids);
$db->sql_query($sql);
$updated = true;
@@ -187,6 +199,19 @@ class ucp_zebra
);
}
+ /**
+ * Add users to friends/foes
+ *
+ * @event core.ucp_add_zebra
+ * @var string mode Zebra type:
+ * friends|foes
+ * @var array sql_ary Array of
+ * entries we add
+ * @since 3.1-A1
+ */
+ $vars = array('mode', 'sql_ary');
+ extract($phpbb_dispatcher->trigger_event('core.ucp_add_zebra', compact($vars)));
+
$db->sql_multi_insert(ZEBRA_TABLE, $sql_ary);
$updated = true;
@@ -199,8 +224,24 @@ class ucp_zebra
}
}
}
-
- if ($updated)
+
+ if ($request->is_ajax())
+ {
+ $message = ($updated) ? $user->lang[$l_mode . '_UPDATED'] : implode('<br />', $error);
+
+ $json_response = new \phpbb\json_response;
+ $json_response->send(array(
+ 'success' => $updated,
+
+ 'MESSAGE_TITLE' => $user->lang['INFORMATION'],
+ 'MESSAGE_TEXT' => $message,
+ 'REFRESH_DATA' => array(
+ 'time' => 3,
+ 'url' => $this->u_action
+ )
+ ));
+ }
+ else if ($updated)
{
meta_refresh(3, $this->u_action);
$message = $user->lang[$l_mode . '_UPDATED'] . '<br />' . implode('<br />', $error) . ((sizeof($error)) ? '<br />' : '') . '<br />' . sprintf($user->lang['RETURN_UCP'], '<a href="' . $this->u_action . '">', '</a>');
@@ -253,5 +294,3 @@ class ucp_zebra
$this->page_title = 'UCP_ZEBRA_' . $l_mode;
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/utf/data/case_fold_c.php b/phpBB/includes/utf/data/case_fold_c.php
index 00de1ba349..a5e3fc7990 100644
--- a/phpBB/includes/utf/data/case_fold_c.php
+++ b/phpBB/includes/utf/data/case_fold_c.php
@@ -1 +1 @@
-<?php return array('A'=>'a','B'=>'b','C'=>'c','D'=>'d','E'=>'e','F'=>'f','G'=>'g','H'=>'h','I'=>'i','J'=>'j','K'=>'k','L'=>'l','M'=>'m','N'=>'n','O'=>'o','P'=>'p','Q'=>'q','R'=>'r','S'=>'s','T'=>'t','U'=>'u','V'=>'v','W'=>'w','X'=>'x','Y'=>'y','Z'=>'z','µ'=>'μ','À'=>'à','Á'=>'á','Â'=>'â','Ã'=>'ã','Ä'=>'ä','Å'=>'å','Æ'=>'æ','Ç'=>'ç','È'=>'è','É'=>'é','Ê'=>'ê','Ë'=>'ë','Ì'=>'ì','Í'=>'í','Î'=>'î','Ï'=>'ï','Ð'=>'ð','Ñ'=>'ñ','Ò'=>'ò','Ó'=>'ó','Ô'=>'ô','Õ'=>'õ','Ö'=>'ö','Ø'=>'ø','Ù'=>'ù','Ú'=>'ú','Û'=>'û','Ü'=>'ü','Ý'=>'ý','Þ'=>'þ','Ā'=>'ā','Ă'=>'ă','Ą'=>'ą','Ć'=>'ć','Ĉ'=>'ĉ','Ċ'=>'ċ','Č'=>'č','Ď'=>'ď','Đ'=>'đ','Ē'=>'ē','Ĕ'=>'ĕ','Ė'=>'ė','Ę'=>'ę','Ě'=>'ě','Ĝ'=>'ĝ','Ğ'=>'ğ','Ġ'=>'ġ','Ģ'=>'ģ','Ĥ'=>'ĥ','Ħ'=>'ħ','Ĩ'=>'ĩ','Ī'=>'ī','Ĭ'=>'ĭ','Į'=>'į','IJ'=>'ij','Ĵ'=>'ĵ','Ķ'=>'ķ','Ĺ'=>'ĺ','Ļ'=>'ļ','Ľ'=>'ľ','Ŀ'=>'ŀ','Ł'=>'ł','Ń'=>'ń','Ņ'=>'ņ','Ň'=>'ň','Ŋ'=>'ŋ','Ō'=>'ō','Ŏ'=>'ŏ','Ő'=>'ő','Œ'=>'œ','Ŕ'=>'ŕ','Ŗ'=>'ŗ','Ř'=>'ř','Ś'=>'ś','Ŝ'=>'ŝ','Ş'=>'ş','Š'=>'š','Ţ'=>'ţ','Ť'=>'ť','Ŧ'=>'ŧ','Ũ'=>'ũ','Ū'=>'ū','Ŭ'=>'ŭ','Ů'=>'ů','Ű'=>'ű','Ų'=>'ų','Ŵ'=>'ŵ','Ŷ'=>'ŷ','Ÿ'=>'ÿ','Ź'=>'ź','Ż'=>'ż','Ž'=>'ž','ſ'=>'s','Ɓ'=>'ɓ','Ƃ'=>'ƃ','Ƅ'=>'ƅ','Ɔ'=>'ɔ','Ƈ'=>'ƈ','Ɖ'=>'ɖ','Ɗ'=>'ɗ','Ƌ'=>'ƌ','Ǝ'=>'ǝ','Ə'=>'ə','Ɛ'=>'ɛ','Ƒ'=>'ƒ','Ɠ'=>'ɠ','Ɣ'=>'ɣ','Ɩ'=>'ɩ','Ɨ'=>'ɨ','Ƙ'=>'ƙ','Ɯ'=>'ɯ','Ɲ'=>'ɲ','Ɵ'=>'ɵ','Ơ'=>'ơ','Ƣ'=>'ƣ','Ƥ'=>'ƥ','Ʀ'=>'ʀ','Ƨ'=>'ƨ','Ʃ'=>'ʃ','Ƭ'=>'ƭ','Ʈ'=>'ʈ','Ư'=>'ư','Ʊ'=>'ʊ','Ʋ'=>'ʋ','Ƴ'=>'ƴ','Ƶ'=>'ƶ','Ʒ'=>'ʒ','Ƹ'=>'ƹ','Ƽ'=>'ƽ','DŽ'=>'dž','Dž'=>'dž','LJ'=>'lj','Lj'=>'lj','NJ'=>'nj','Nj'=>'nj','Ǎ'=>'ǎ','Ǐ'=>'ǐ','Ǒ'=>'ǒ','Ǔ'=>'ǔ','Ǖ'=>'ǖ','Ǘ'=>'ǘ','Ǚ'=>'ǚ','Ǜ'=>'ǜ','Ǟ'=>'ǟ','Ǡ'=>'ǡ','Ǣ'=>'ǣ','Ǥ'=>'ǥ','Ǧ'=>'ǧ','Ǩ'=>'ǩ','Ǫ'=>'ǫ','Ǭ'=>'ǭ','Ǯ'=>'ǯ','DZ'=>'dz','Dz'=>'dz','Ǵ'=>'ǵ','Ƕ'=>'ƕ','Ƿ'=>'ƿ','Ǹ'=>'ǹ','Ǻ'=>'ǻ','Ǽ'=>'ǽ','Ǿ'=>'ǿ','Ȁ'=>'ȁ','Ȃ'=>'ȃ','Ȅ'=>'ȅ','Ȇ'=>'ȇ','Ȉ'=>'ȉ','Ȋ'=>'ȋ','Ȍ'=>'ȍ','Ȏ'=>'ȏ','Ȑ'=>'ȑ','Ȓ'=>'ȓ','Ȕ'=>'ȕ','Ȗ'=>'ȗ','Ș'=>'ș','Ț'=>'ț','Ȝ'=>'ȝ','Ȟ'=>'ȟ','Ƞ'=>'ƞ','Ȣ'=>'ȣ','Ȥ'=>'ȥ','Ȧ'=>'ȧ','Ȩ'=>'ȩ','Ȫ'=>'ȫ','Ȭ'=>'ȭ','Ȯ'=>'ȯ','Ȱ'=>'ȱ','Ȳ'=>'ȳ','Ⱥ'=>'ⱥ','Ȼ'=>'ȼ','Ƚ'=>'ƚ','Ⱦ'=>'ⱦ','Ɂ'=>'ɂ','Ƀ'=>'ƀ','Ʉ'=>'ʉ','Ʌ'=>'ʌ','Ɇ'=>'ɇ','Ɉ'=>'ɉ','Ɋ'=>'ɋ','Ɍ'=>'ɍ','Ɏ'=>'ɏ','ͅ'=>'ι','Ά'=>'ά','Έ'=>'έ','Ή'=>'ή','Ί'=>'ί','Ό'=>'ό','Ύ'=>'ύ','Ώ'=>'ώ','Α'=>'α','Β'=>'β','Γ'=>'γ','Δ'=>'δ','Ε'=>'ε','Ζ'=>'ζ','Η'=>'η','Θ'=>'θ','Ι'=>'ι','Κ'=>'κ','Λ'=>'λ','Μ'=>'μ','Ν'=>'ν','Ξ'=>'ξ','Ο'=>'ο','Π'=>'π','Ρ'=>'ρ','Σ'=>'σ','Τ'=>'τ','Υ'=>'υ','Φ'=>'φ','Χ'=>'χ','Ψ'=>'ψ','Ω'=>'ω','Ϊ'=>'ϊ','Ϋ'=>'ϋ','ς'=>'σ','ϐ'=>'β','ϑ'=>'θ','ϕ'=>'φ','ϖ'=>'π','Ϙ'=>'ϙ','Ϛ'=>'ϛ','Ϝ'=>'ϝ','Ϟ'=>'ϟ','Ϡ'=>'ϡ','Ϣ'=>'ϣ','Ϥ'=>'ϥ','Ϧ'=>'ϧ','Ϩ'=>'ϩ','Ϫ'=>'ϫ','Ϭ'=>'ϭ','Ϯ'=>'ϯ','ϰ'=>'κ','ϱ'=>'ρ','ϴ'=>'θ','ϵ'=>'ε','Ϸ'=>'ϸ','Ϲ'=>'ϲ','Ϻ'=>'ϻ','Ͻ'=>'ͻ','Ͼ'=>'ͼ','Ͽ'=>'ͽ','Ѐ'=>'ѐ','Ё'=>'ё','Ђ'=>'ђ','Ѓ'=>'ѓ','Є'=>'є','Ѕ'=>'ѕ','І'=>'і','Ї'=>'ї','Ј'=>'ј','Љ'=>'љ','Њ'=>'њ','Ћ'=>'ћ','Ќ'=>'ќ','Ѝ'=>'ѝ','Ў'=>'ў','Џ'=>'џ','А'=>'а','Б'=>'б','В'=>'в','Г'=>'г','Д'=>'д','Е'=>'е','Ж'=>'ж','З'=>'з','И'=>'и','Й'=>'й','К'=>'к','Л'=>'л','М'=>'м','Н'=>'н','О'=>'о','П'=>'п','Р'=>'р','С'=>'с','Т'=>'т','У'=>'у','Ф'=>'ф','Х'=>'х','Ц'=>'ц','Ч'=>'ч','Ш'=>'ш','Щ'=>'щ','Ъ'=>'ъ','Ы'=>'ы','Ь'=>'ь','Э'=>'э','Ю'=>'ю','Я'=>'я','Ѡ'=>'ѡ','Ѣ'=>'ѣ','Ѥ'=>'ѥ','Ѧ'=>'ѧ','Ѩ'=>'ѩ','Ѫ'=>'ѫ','Ѭ'=>'ѭ','Ѯ'=>'ѯ','Ѱ'=>'ѱ','Ѳ'=>'ѳ','Ѵ'=>'ѵ','Ѷ'=>'ѷ','Ѹ'=>'ѹ','Ѻ'=>'ѻ','Ѽ'=>'ѽ','Ѿ'=>'ѿ','Ҁ'=>'ҁ','Ҋ'=>'ҋ','Ҍ'=>'ҍ','Ҏ'=>'ҏ','Ґ'=>'ґ','Ғ'=>'ғ','Ҕ'=>'ҕ','Җ'=>'җ','Ҙ'=>'ҙ','Қ'=>'қ','Ҝ'=>'ҝ','Ҟ'=>'ҟ','Ҡ'=>'ҡ','Ң'=>'ң','Ҥ'=>'ҥ','Ҧ'=>'ҧ','Ҩ'=>'ҩ','Ҫ'=>'ҫ','Ҭ'=>'ҭ','Ү'=>'ү','Ұ'=>'ұ','Ҳ'=>'ҳ','Ҵ'=>'ҵ','Ҷ'=>'ҷ','Ҹ'=>'ҹ','Һ'=>'һ','Ҽ'=>'ҽ','Ҿ'=>'ҿ','Ӏ'=>'ӏ','Ӂ'=>'ӂ','Ӄ'=>'ӄ','Ӆ'=>'ӆ','Ӈ'=>'ӈ','Ӊ'=>'ӊ','Ӌ'=>'ӌ','Ӎ'=>'ӎ','Ӑ'=>'ӑ','Ӓ'=>'ӓ','Ӕ'=>'ӕ','Ӗ'=>'ӗ','Ә'=>'ә','Ӛ'=>'ӛ','Ӝ'=>'ӝ','Ӟ'=>'ӟ','Ӡ'=>'ӡ','Ӣ'=>'ӣ','Ӥ'=>'ӥ','Ӧ'=>'ӧ','Ө'=>'ө','Ӫ'=>'ӫ','Ӭ'=>'ӭ','Ӯ'=>'ӯ','Ӱ'=>'ӱ','Ӳ'=>'ӳ','Ӵ'=>'ӵ','Ӷ'=>'ӷ','Ӹ'=>'ӹ','Ӻ'=>'ӻ','Ӽ'=>'ӽ','Ӿ'=>'ӿ','Ԁ'=>'ԁ','Ԃ'=>'ԃ','Ԅ'=>'ԅ','Ԇ'=>'ԇ','Ԉ'=>'ԉ','Ԋ'=>'ԋ','Ԍ'=>'ԍ','Ԏ'=>'ԏ','Ԑ'=>'ԑ','Ԓ'=>'ԓ','Ա'=>'ա','Բ'=>'բ','Գ'=>'գ','Դ'=>'դ','Ե'=>'ե','Զ'=>'զ','Է'=>'է','Ը'=>'ը','Թ'=>'թ','Ժ'=>'ժ','Ի'=>'ի','Լ'=>'լ','Խ'=>'խ','Ծ'=>'ծ','Կ'=>'կ','Հ'=>'հ','Ձ'=>'ձ','Ղ'=>'ղ','Ճ'=>'ճ','Մ'=>'մ','Յ'=>'յ','Ն'=>'ն','Շ'=>'շ','Ո'=>'ո','Չ'=>'չ','Պ'=>'պ','Ջ'=>'ջ','Ռ'=>'ռ','Ս'=>'ս','Վ'=>'վ','Տ'=>'տ','Ր'=>'ր','Ց'=>'ց','Ւ'=>'ւ','Փ'=>'փ','Ք'=>'ք','Օ'=>'օ','Ֆ'=>'ֆ','Ⴀ'=>'ⴀ','Ⴁ'=>'ⴁ','Ⴂ'=>'ⴂ','Ⴃ'=>'ⴃ','Ⴄ'=>'ⴄ','Ⴅ'=>'ⴅ','Ⴆ'=>'ⴆ','Ⴇ'=>'ⴇ','Ⴈ'=>'ⴈ','Ⴉ'=>'ⴉ','Ⴊ'=>'ⴊ','Ⴋ'=>'ⴋ','Ⴌ'=>'ⴌ','Ⴍ'=>'ⴍ','Ⴎ'=>'ⴎ','Ⴏ'=>'ⴏ','Ⴐ'=>'ⴐ','Ⴑ'=>'ⴑ','Ⴒ'=>'ⴒ','Ⴓ'=>'ⴓ','Ⴔ'=>'ⴔ','Ⴕ'=>'ⴕ','Ⴖ'=>'ⴖ','Ⴗ'=>'ⴗ','Ⴘ'=>'ⴘ','Ⴙ'=>'ⴙ','Ⴚ'=>'ⴚ','Ⴛ'=>'ⴛ','Ⴜ'=>'ⴜ','Ⴝ'=>'ⴝ','Ⴞ'=>'ⴞ','Ⴟ'=>'ⴟ','Ⴠ'=>'ⴠ','Ⴡ'=>'ⴡ','Ⴢ'=>'ⴢ','Ⴣ'=>'ⴣ','Ⴤ'=>'ⴤ','Ⴥ'=>'ⴥ','Ḁ'=>'ḁ','Ḃ'=>'ḃ','Ḅ'=>'ḅ','Ḇ'=>'ḇ','Ḉ'=>'ḉ','Ḋ'=>'ḋ','Ḍ'=>'ḍ','Ḏ'=>'ḏ','Ḑ'=>'ḑ','Ḓ'=>'ḓ','Ḕ'=>'ḕ','Ḗ'=>'ḗ','Ḙ'=>'ḙ','Ḛ'=>'ḛ','Ḝ'=>'ḝ','Ḟ'=>'ḟ','Ḡ'=>'ḡ','Ḣ'=>'ḣ','Ḥ'=>'ḥ','Ḧ'=>'ḧ','Ḩ'=>'ḩ','Ḫ'=>'ḫ','Ḭ'=>'ḭ','Ḯ'=>'ḯ','Ḱ'=>'ḱ','Ḳ'=>'ḳ','Ḵ'=>'ḵ','Ḷ'=>'ḷ','Ḹ'=>'ḹ','Ḻ'=>'ḻ','Ḽ'=>'ḽ','Ḿ'=>'ḿ','Ṁ'=>'ṁ','Ṃ'=>'ṃ','Ṅ'=>'ṅ','Ṇ'=>'ṇ','Ṉ'=>'ṉ','Ṋ'=>'ṋ','Ṍ'=>'ṍ','Ṏ'=>'ṏ','Ṑ'=>'ṑ','Ṓ'=>'ṓ','Ṕ'=>'ṕ','Ṗ'=>'ṗ','Ṙ'=>'ṙ','Ṛ'=>'ṛ','Ṝ'=>'ṝ','Ṟ'=>'ṟ','Ṡ'=>'ṡ','Ṣ'=>'ṣ','Ṥ'=>'ṥ','Ṧ'=>'ṧ','Ṩ'=>'ṩ','Ṫ'=>'ṫ','Ṭ'=>'ṭ','Ṯ'=>'ṯ','Ṱ'=>'ṱ','Ṳ'=>'ṳ','Ṵ'=>'ṵ','Ṷ'=>'ṷ','Ṹ'=>'ṹ','Ṻ'=>'ṻ','Ṽ'=>'ṽ','Ṿ'=>'ṿ','Ẁ'=>'ẁ','Ẃ'=>'ẃ','Ẅ'=>'ẅ','Ẇ'=>'ẇ','Ẉ'=>'ẉ','Ẋ'=>'ẋ','Ẍ'=>'ẍ','Ẏ'=>'ẏ','Ẑ'=>'ẑ','Ẓ'=>'ẓ','Ẕ'=>'ẕ','ẛ'=>'ṡ','Ạ'=>'ạ','Ả'=>'ả','Ấ'=>'ấ','Ầ'=>'ầ','Ẩ'=>'ẩ','Ẫ'=>'ẫ','Ậ'=>'ậ','Ắ'=>'ắ','Ằ'=>'ằ','Ẳ'=>'ẳ','Ẵ'=>'ẵ','Ặ'=>'ặ','Ẹ'=>'ẹ','Ẻ'=>'ẻ','Ẽ'=>'ẽ','Ế'=>'ế','Ề'=>'ề','Ể'=>'ể','Ễ'=>'ễ','Ệ'=>'ệ','Ỉ'=>'ỉ','Ị'=>'ị','Ọ'=>'ọ','Ỏ'=>'ỏ','Ố'=>'ố','Ồ'=>'ồ','Ổ'=>'ổ','Ỗ'=>'ỗ','Ộ'=>'ộ','Ớ'=>'ớ','Ờ'=>'ờ','Ở'=>'ở','Ỡ'=>'ỡ','Ợ'=>'ợ','Ụ'=>'ụ','Ủ'=>'ủ','Ứ'=>'ứ','Ừ'=>'ừ','Ử'=>'ử','Ữ'=>'ữ','Ự'=>'ự','Ỳ'=>'ỳ','Ỵ'=>'ỵ','Ỷ'=>'ỷ','Ỹ'=>'ỹ','Ἀ'=>'ἀ','Ἁ'=>'ἁ','Ἂ'=>'ἂ','Ἃ'=>'ἃ','Ἄ'=>'ἄ','Ἅ'=>'ἅ','Ἆ'=>'ἆ','Ἇ'=>'ἇ','Ἐ'=>'ἐ','Ἑ'=>'ἑ','Ἒ'=>'ἒ','Ἓ'=>'ἓ','Ἔ'=>'ἔ','Ἕ'=>'ἕ','Ἠ'=>'ἠ','Ἡ'=>'ἡ','Ἢ'=>'ἢ','Ἣ'=>'ἣ','Ἤ'=>'ἤ','Ἥ'=>'ἥ','Ἦ'=>'ἦ','Ἧ'=>'ἧ','Ἰ'=>'ἰ','Ἱ'=>'ἱ','Ἲ'=>'ἲ','Ἳ'=>'ἳ','Ἴ'=>'ἴ','Ἵ'=>'ἵ','Ἶ'=>'ἶ','Ἷ'=>'ἷ','Ὀ'=>'ὀ','Ὁ'=>'ὁ','Ὂ'=>'ὂ','Ὃ'=>'ὃ','Ὄ'=>'ὄ','Ὅ'=>'ὅ','Ὑ'=>'ὑ','Ὓ'=>'ὓ','Ὕ'=>'ὕ','Ὗ'=>'ὗ','Ὠ'=>'ὠ','Ὡ'=>'ὡ','Ὢ'=>'ὢ','Ὣ'=>'ὣ','Ὤ'=>'ὤ','Ὥ'=>'ὥ','Ὦ'=>'ὦ','Ὧ'=>'ὧ','Ᾰ'=>'ᾰ','Ᾱ'=>'ᾱ','Ὰ'=>'ὰ','Ά'=>'ά','ι'=>'ι','Ὲ'=>'ὲ','Έ'=>'έ','Ὴ'=>'ὴ','Ή'=>'ή','Ῐ'=>'ῐ','Ῑ'=>'ῑ','Ὶ'=>'ὶ','Ί'=>'ί','Ῠ'=>'ῠ','Ῡ'=>'ῡ','Ὺ'=>'ὺ','Ύ'=>'ύ','Ῥ'=>'ῥ','Ὸ'=>'ὸ','Ό'=>'ό','Ὼ'=>'ὼ','Ώ'=>'ώ','Ω'=>'ω','K'=>'k','Å'=>'å','Ⅎ'=>'ⅎ','Ⅰ'=>'ⅰ','Ⅱ'=>'ⅱ','Ⅲ'=>'ⅲ','Ⅳ'=>'ⅳ','Ⅴ'=>'ⅴ','Ⅵ'=>'ⅵ','Ⅶ'=>'ⅶ','Ⅷ'=>'ⅷ','Ⅸ'=>'ⅸ','Ⅹ'=>'ⅹ','Ⅺ'=>'ⅺ','Ⅻ'=>'ⅻ','Ⅼ'=>'ⅼ','Ⅽ'=>'ⅽ','Ⅾ'=>'ⅾ','Ⅿ'=>'ⅿ','Ↄ'=>'ↄ','Ⓐ'=>'ⓐ','Ⓑ'=>'ⓑ','Ⓒ'=>'ⓒ','Ⓓ'=>'ⓓ','Ⓔ'=>'ⓔ','Ⓕ'=>'ⓕ','Ⓖ'=>'ⓖ','Ⓗ'=>'ⓗ','Ⓘ'=>'ⓘ','Ⓙ'=>'ⓙ','Ⓚ'=>'ⓚ','Ⓛ'=>'ⓛ','Ⓜ'=>'ⓜ','Ⓝ'=>'ⓝ','Ⓞ'=>'ⓞ','Ⓟ'=>'ⓟ','Ⓠ'=>'ⓠ','Ⓡ'=>'ⓡ','Ⓢ'=>'ⓢ','Ⓣ'=>'ⓣ','Ⓤ'=>'ⓤ','Ⓥ'=>'ⓥ','Ⓦ'=>'ⓦ','Ⓧ'=>'ⓧ','Ⓨ'=>'ⓨ','Ⓩ'=>'ⓩ','Ⰰ'=>'ⰰ','Ⰱ'=>'ⰱ','Ⰲ'=>'ⰲ','Ⰳ'=>'ⰳ','Ⰴ'=>'ⰴ','Ⰵ'=>'ⰵ','Ⰶ'=>'ⰶ','Ⰷ'=>'ⰷ','Ⰸ'=>'ⰸ','Ⰹ'=>'ⰹ','Ⰺ'=>'ⰺ','Ⰻ'=>'ⰻ','Ⰼ'=>'ⰼ','Ⰽ'=>'ⰽ','Ⰾ'=>'ⰾ','Ⰿ'=>'ⰿ','Ⱀ'=>'ⱀ','Ⱁ'=>'ⱁ','Ⱂ'=>'ⱂ','Ⱃ'=>'ⱃ','Ⱄ'=>'ⱄ','Ⱅ'=>'ⱅ','Ⱆ'=>'ⱆ','Ⱇ'=>'ⱇ','Ⱈ'=>'ⱈ','Ⱉ'=>'ⱉ','Ⱊ'=>'ⱊ','Ⱋ'=>'ⱋ','Ⱌ'=>'ⱌ','Ⱍ'=>'ⱍ','Ⱎ'=>'ⱎ','Ⱏ'=>'ⱏ','Ⱐ'=>'ⱐ','Ⱑ'=>'ⱑ','Ⱒ'=>'ⱒ','Ⱓ'=>'ⱓ','Ⱔ'=>'ⱔ','Ⱕ'=>'ⱕ','Ⱖ'=>'ⱖ','Ⱗ'=>'ⱗ','Ⱘ'=>'ⱘ','Ⱙ'=>'ⱙ','Ⱚ'=>'ⱚ','Ⱛ'=>'ⱛ','Ⱜ'=>'ⱜ','Ⱝ'=>'ⱝ','Ⱞ'=>'ⱞ','Ⱡ'=>'ⱡ','Ɫ'=>'ɫ','Ᵽ'=>'ᵽ','Ɽ'=>'ɽ','Ⱨ'=>'ⱨ','Ⱪ'=>'ⱪ','Ⱬ'=>'ⱬ','Ⱶ'=>'ⱶ','Ⲁ'=>'ⲁ','Ⲃ'=>'ⲃ','Ⲅ'=>'ⲅ','Ⲇ'=>'ⲇ','Ⲉ'=>'ⲉ','Ⲋ'=>'ⲋ','Ⲍ'=>'ⲍ','Ⲏ'=>'ⲏ','Ⲑ'=>'ⲑ','Ⲓ'=>'ⲓ','Ⲕ'=>'ⲕ','Ⲗ'=>'ⲗ','Ⲙ'=>'ⲙ','Ⲛ'=>'ⲛ','Ⲝ'=>'ⲝ','Ⲟ'=>'ⲟ','Ⲡ'=>'ⲡ','Ⲣ'=>'ⲣ','Ⲥ'=>'ⲥ','Ⲧ'=>'ⲧ','Ⲩ'=>'ⲩ','Ⲫ'=>'ⲫ','Ⲭ'=>'ⲭ','Ⲯ'=>'ⲯ','Ⲱ'=>'ⲱ','Ⲳ'=>'ⲳ','Ⲵ'=>'ⲵ','Ⲷ'=>'ⲷ','Ⲹ'=>'ⲹ','Ⲻ'=>'ⲻ','Ⲽ'=>'ⲽ','Ⲿ'=>'ⲿ','Ⳁ'=>'ⳁ','Ⳃ'=>'ⳃ','Ⳅ'=>'ⳅ','Ⳇ'=>'ⳇ','Ⳉ'=>'ⳉ','Ⳋ'=>'ⳋ','Ⳍ'=>'ⳍ','Ⳏ'=>'ⳏ','Ⳑ'=>'ⳑ','Ⳓ'=>'ⳓ','Ⳕ'=>'ⳕ','Ⳗ'=>'ⳗ','Ⳙ'=>'ⳙ','Ⳛ'=>'ⳛ','Ⳝ'=>'ⳝ','Ⳟ'=>'ⳟ','Ⳡ'=>'ⳡ','Ⳣ'=>'ⳣ','A'=>'a','B'=>'b','C'=>'c','D'=>'d','E'=>'e','F'=>'f','G'=>'g','H'=>'h','I'=>'i','J'=>'j','K'=>'k','L'=>'l','M'=>'m','N'=>'n','O'=>'o','P'=>'p','Q'=>'q','R'=>'r','S'=>'s','T'=>'t','U'=>'u','V'=>'v','W'=>'w','X'=>'x','Y'=>'y','Z'=>'z','𐐀'=>'𐐨','𐐁'=>'𐐩','𐐂'=>'𐐪','𐐃'=>'𐐫','𐐄'=>'𐐬','𐐅'=>'𐐭','𐐆'=>'𐐮','𐐇'=>'𐐯','𐐈'=>'𐐰','𐐉'=>'𐐱','𐐊'=>'𐐲','𐐋'=>'𐐳','𐐌'=>'𐐴','𐐍'=>'𐐵','𐐎'=>'𐐶','𐐏'=>'𐐷','𐐐'=>'𐐸','𐐑'=>'𐐹','𐐒'=>'𐐺','𐐓'=>'𐐻','𐐔'=>'𐐼','𐐕'=>'𐐽','𐐖'=>'𐐾','𐐗'=>'𐐿','𐐘'=>'𐑀','𐐙'=>'𐑁','𐐚'=>'𐑂','𐐛'=>'𐑃','𐐜'=>'𐑄','𐐝'=>'𐑅','𐐞'=>'𐑆','𐐟'=>'𐑇','𐐠'=>'𐑈','𐐡'=>'𐑉','𐐢'=>'𐑊','𐐣'=>'𐑋','𐐤'=>'𐑌','𐐥'=>'𐑍','𐐦'=>'𐑎','𐐧'=>'𐑏'); \ No newline at end of file
+<?php return array('A'=>'a','B'=>'b','C'=>'c','D'=>'d','E'=>'e','F'=>'f','G'=>'g','H'=>'h','I'=>'i','J'=>'j','K'=>'k','L'=>'l','M'=>'m','N'=>'n','O'=>'o','P'=>'p','Q'=>'q','R'=>'r','S'=>'s','T'=>'t','U'=>'u','V'=>'v','W'=>'w','X'=>'x','Y'=>'y','Z'=>'z','µ'=>'μ','À'=>'à','Á'=>'á','Â'=>'â','Ã'=>'ã','Ä'=>'ä','Å'=>'å','Æ'=>'æ','Ç'=>'ç','È'=>'è','É'=>'é','Ê'=>'ê','Ë'=>'ë','Ì'=>'ì','Í'=>'í','Î'=>'î','Ï'=>'ï','Ð'=>'ð','Ñ'=>'ñ','Ò'=>'ò','Ó'=>'ó','Ô'=>'ô','Õ'=>'õ','Ö'=>'ö','Ø'=>'ø','Ù'=>'ù','Ú'=>'ú','Û'=>'û','Ü'=>'ü','Ý'=>'ý','Þ'=>'þ','Ā'=>'ā','Ă'=>'ă','Ą'=>'ą','Ć'=>'ć','Ĉ'=>'ĉ','Ċ'=>'ċ','Č'=>'č','Ď'=>'ď','Đ'=>'đ','Ē'=>'ē','Ĕ'=>'ĕ','Ė'=>'ė','Ę'=>'ę','Ě'=>'ě','Ĝ'=>'ĝ','Ğ'=>'ğ','Ġ'=>'ġ','Ģ'=>'ģ','Ĥ'=>'ĥ','Ħ'=>'ħ','Ĩ'=>'ĩ','Ī'=>'ī','Ĭ'=>'ĭ','Į'=>'į','IJ'=>'ij','Ĵ'=>'ĵ','Ķ'=>'ķ','Ĺ'=>'ĺ','Ļ'=>'ļ','Ľ'=>'ľ','Ŀ'=>'ŀ','Ł'=>'ł','Ń'=>'ń','Ņ'=>'ņ','Ň'=>'ň','Ŋ'=>'ŋ','Ō'=>'ō','Ŏ'=>'ŏ','Ő'=>'ő','Œ'=>'œ','Ŕ'=>'ŕ','Ŗ'=>'ŗ','Ř'=>'ř','Ś'=>'ś','Ŝ'=>'ŝ','Ş'=>'ş','Š'=>'š','Ţ'=>'ţ','Ť'=>'ť','Ŧ'=>'ŧ','Ũ'=>'ũ','Ū'=>'ū','Ŭ'=>'ŭ','Ů'=>'ů','Ű'=>'ű','Ų'=>'ų','Ŵ'=>'ŵ','Ŷ'=>'ŷ','Ÿ'=>'ÿ','Ź'=>'ź','Ż'=>'ż','Ž'=>'ž','ſ'=>'s','Ɓ'=>'ɓ','Ƃ'=>'ƃ','Ƅ'=>'ƅ','Ɔ'=>'ɔ','Ƈ'=>'ƈ','Ɖ'=>'ɖ','Ɗ'=>'ɗ','Ƌ'=>'ƌ','Ǝ'=>'ǝ','Ə'=>'ə','Ɛ'=>'ɛ','Ƒ'=>'ƒ','Ɠ'=>'ɠ','Ɣ'=>'ɣ','Ɩ'=>'ɩ','Ɨ'=>'ɨ','Ƙ'=>'ƙ','Ɯ'=>'ɯ','Ɲ'=>'ɲ','Ɵ'=>'ɵ','Ơ'=>'ơ','Ƣ'=>'ƣ','Ƥ'=>'ƥ','Ʀ'=>'ʀ','Ƨ'=>'ƨ','Ʃ'=>'ʃ','Ƭ'=>'ƭ','Ʈ'=>'ʈ','Ư'=>'ư','Ʊ'=>'ʊ','Ʋ'=>'ʋ','Ƴ'=>'ƴ','Ƶ'=>'ƶ','Ʒ'=>'ʒ','Ƹ'=>'ƹ','Ƽ'=>'ƽ','DŽ'=>'dž','Dž'=>'dž','LJ'=>'lj','Lj'=>'lj','NJ'=>'nj','Nj'=>'nj','Ǎ'=>'ǎ','Ǐ'=>'ǐ','Ǒ'=>'ǒ','Ǔ'=>'ǔ','Ǖ'=>'ǖ','Ǘ'=>'ǘ','Ǚ'=>'ǚ','Ǜ'=>'ǜ','Ǟ'=>'ǟ','Ǡ'=>'ǡ','Ǣ'=>'ǣ','Ǥ'=>'ǥ','Ǧ'=>'ǧ','Ǩ'=>'ǩ','Ǫ'=>'ǫ','Ǭ'=>'ǭ','Ǯ'=>'ǯ','DZ'=>'dz','Dz'=>'dz','Ǵ'=>'ǵ','Ƕ'=>'ƕ','Ƿ'=>'ƿ','Ǹ'=>'ǹ','Ǻ'=>'ǻ','Ǽ'=>'ǽ','Ǿ'=>'ǿ','Ȁ'=>'ȁ','Ȃ'=>'ȃ','Ȅ'=>'ȅ','Ȇ'=>'ȇ','Ȉ'=>'ȉ','Ȋ'=>'ȋ','Ȍ'=>'ȍ','Ȏ'=>'ȏ','Ȑ'=>'ȑ','Ȓ'=>'ȓ','Ȕ'=>'ȕ','Ȗ'=>'ȗ','Ș'=>'ș','Ț'=>'ț','Ȝ'=>'ȝ','Ȟ'=>'ȟ','Ƞ'=>'ƞ','Ȣ'=>'ȣ','Ȥ'=>'ȥ','Ȧ'=>'ȧ','Ȩ'=>'ȩ','Ȫ'=>'ȫ','Ȭ'=>'ȭ','Ȯ'=>'ȯ','Ȱ'=>'ȱ','Ȳ'=>'ȳ','Ⱥ'=>'ⱥ','Ȼ'=>'ȼ','Ƚ'=>'ƚ','Ⱦ'=>'ⱦ','Ɂ'=>'ɂ','Ƀ'=>'ƀ','Ʉ'=>'ʉ','Ʌ'=>'ʌ','Ɇ'=>'ɇ','Ɉ'=>'ɉ','Ɋ'=>'ɋ','Ɍ'=>'ɍ','Ɏ'=>'ɏ','ͅ'=>'ι','Ά'=>'ά','Έ'=>'έ','Ή'=>'ή','Ί'=>'ί','Ό'=>'ό','Ύ'=>'ύ','Ώ'=>'ώ','Α'=>'α','Β'=>'β','Γ'=>'γ','Δ'=>'δ','Ε'=>'ε','Ζ'=>'ζ','Η'=>'η','Θ'=>'θ','Ι'=>'ι','Κ'=>'κ','Λ'=>'λ','Μ'=>'μ','Ν'=>'ν','Ξ'=>'ξ','Ο'=>'ο','Π'=>'π','Ρ'=>'ρ','Σ'=>'σ','Τ'=>'τ','Υ'=>'υ','Φ'=>'φ','Χ'=>'χ','Ψ'=>'ψ','Ω'=>'ω','Ϊ'=>'ϊ','Ϋ'=>'ϋ','ς'=>'σ','ϐ'=>'β','ϑ'=>'θ','ϕ'=>'φ','ϖ'=>'π','Ϙ'=>'ϙ','Ϛ'=>'ϛ','Ϝ'=>'ϝ','Ϟ'=>'ϟ','Ϡ'=>'ϡ','Ϣ'=>'ϣ','Ϥ'=>'ϥ','Ϧ'=>'ϧ','Ϩ'=>'ϩ','Ϫ'=>'ϫ','Ϭ'=>'ϭ','Ϯ'=>'ϯ','ϰ'=>'κ','ϱ'=>'ρ','ϴ'=>'θ','ϵ'=>'ε','Ϸ'=>'ϸ','Ϲ'=>'ϲ','Ϻ'=>'ϻ','Ͻ'=>'ͻ','Ͼ'=>'ͼ','Ͽ'=>'ͽ','Ѐ'=>'ѐ','Ё'=>'ё','Ђ'=>'ђ','Ѓ'=>'ѓ','Є'=>'є','Ѕ'=>'ѕ','І'=>'і','Ї'=>'ї','Ј'=>'ј','Љ'=>'љ','Њ'=>'њ','Ћ'=>'ћ','Ќ'=>'ќ','Ѝ'=>'ѝ','Ў'=>'ў','Џ'=>'џ','А'=>'а','Б'=>'б','В'=>'в','Г'=>'г','Д'=>'д','Е'=>'е','Ж'=>'ж','З'=>'з','И'=>'и','Й'=>'й','К'=>'к','Л'=>'л','М'=>'м','Н'=>'н','О'=>'о','П'=>'п','Р'=>'р','С'=>'с','Т'=>'т','У'=>'у','Ф'=>'ф','Х'=>'х','Ц'=>'ц','Ч'=>'ч','Ш'=>'ш','Щ'=>'щ','Ъ'=>'ъ','Ы'=>'ы','Ь'=>'ь','Э'=>'э','Ю'=>'ю','Я'=>'я','Ѡ'=>'ѡ','Ѣ'=>'ѣ','Ѥ'=>'ѥ','Ѧ'=>'ѧ','Ѩ'=>'ѩ','Ѫ'=>'ѫ','Ѭ'=>'ѭ','Ѯ'=>'ѯ','Ѱ'=>'ѱ','Ѳ'=>'ѳ','Ѵ'=>'ѵ','Ѷ'=>'ѷ','Ѹ'=>'ѹ','Ѻ'=>'ѻ','Ѽ'=>'ѽ','Ѿ'=>'ѿ','Ҁ'=>'ҁ','Ҋ'=>'ҋ','Ҍ'=>'ҍ','Ҏ'=>'ҏ','Ґ'=>'ґ','Ғ'=>'ғ','Ҕ'=>'ҕ','Җ'=>'җ','Ҙ'=>'ҙ','Қ'=>'қ','Ҝ'=>'ҝ','Ҟ'=>'ҟ','Ҡ'=>'ҡ','Ң'=>'ң','Ҥ'=>'ҥ','Ҧ'=>'ҧ','Ҩ'=>'ҩ','Ҫ'=>'ҫ','Ҭ'=>'ҭ','Ү'=>'ү','Ұ'=>'ұ','Ҳ'=>'ҳ','Ҵ'=>'ҵ','Ҷ'=>'ҷ','Ҹ'=>'ҹ','Һ'=>'һ','Ҽ'=>'ҽ','Ҿ'=>'ҿ','Ӏ'=>'ӏ','Ӂ'=>'ӂ','Ӄ'=>'ӄ','Ӆ'=>'ӆ','Ӈ'=>'ӈ','Ӊ'=>'ӊ','Ӌ'=>'ӌ','Ӎ'=>'ӎ','Ӑ'=>'ӑ','Ӓ'=>'ӓ','Ӕ'=>'ӕ','Ӗ'=>'ӗ','Ә'=>'ә','Ӛ'=>'ӛ','Ӝ'=>'ӝ','Ӟ'=>'ӟ','Ӡ'=>'ӡ','Ӣ'=>'ӣ','Ӥ'=>'ӥ','Ӧ'=>'ӧ','Ө'=>'ө','Ӫ'=>'ӫ','Ӭ'=>'ӭ','Ӯ'=>'ӯ','Ӱ'=>'ӱ','Ӳ'=>'ӳ','Ӵ'=>'ӵ','Ӷ'=>'ӷ','Ӹ'=>'ӹ','Ӻ'=>'ӻ','Ӽ'=>'ӽ','Ӿ'=>'ӿ','Ԁ'=>'ԁ','Ԃ'=>'ԃ','Ԅ'=>'ԅ','Ԇ'=>'ԇ','Ԉ'=>'ԉ','Ԋ'=>'ԋ','Ԍ'=>'ԍ','Ԏ'=>'ԏ','Ԑ'=>'ԑ','Ԓ'=>'ԓ','Ա'=>'ա','Բ'=>'բ','Գ'=>'գ','Դ'=>'դ','Ե'=>'ե','Զ'=>'զ','Է'=>'է','Ը'=>'ը','Թ'=>'թ','Ժ'=>'ժ','Ի'=>'ի','Լ'=>'լ','Խ'=>'խ','Ծ'=>'ծ','Կ'=>'կ','Հ'=>'հ','Ձ'=>'ձ','Ղ'=>'ղ','Ճ'=>'ճ','Մ'=>'մ','Յ'=>'յ','Ն'=>'ն','Շ'=>'շ','Ո'=>'ո','Չ'=>'չ','Պ'=>'պ','Ջ'=>'ջ','Ռ'=>'ռ','Ս'=>'ս','Վ'=>'վ','Տ'=>'տ','Ր'=>'ր','Ց'=>'ց','Ւ'=>'ւ','Փ'=>'փ','Ք'=>'ք','Օ'=>'օ','Ֆ'=>'ֆ','Ⴀ'=>'ⴀ','Ⴁ'=>'ⴁ','Ⴂ'=>'ⴂ','Ⴃ'=>'ⴃ','Ⴄ'=>'ⴄ','Ⴅ'=>'ⴅ','Ⴆ'=>'ⴆ','Ⴇ'=>'ⴇ','Ⴈ'=>'ⴈ','Ⴉ'=>'ⴉ','Ⴊ'=>'ⴊ','Ⴋ'=>'ⴋ','Ⴌ'=>'ⴌ','Ⴍ'=>'ⴍ','Ⴎ'=>'ⴎ','Ⴏ'=>'ⴏ','Ⴐ'=>'ⴐ','Ⴑ'=>'ⴑ','Ⴒ'=>'ⴒ','Ⴓ'=>'ⴓ','Ⴔ'=>'ⴔ','Ⴕ'=>'ⴕ','Ⴖ'=>'ⴖ','Ⴗ'=>'ⴗ','Ⴘ'=>'ⴘ','Ⴙ'=>'ⴙ','Ⴚ'=>'ⴚ','Ⴛ'=>'ⴛ','Ⴜ'=>'ⴜ','Ⴝ'=>'ⴝ','Ⴞ'=>'ⴞ','Ⴟ'=>'ⴟ','Ⴠ'=>'ⴠ','Ⴡ'=>'ⴡ','Ⴢ'=>'ⴢ','Ⴣ'=>'ⴣ','Ⴤ'=>'ⴤ','Ⴥ'=>'ⴥ','Ḁ'=>'ḁ','Ḃ'=>'ḃ','Ḅ'=>'ḅ','Ḇ'=>'ḇ','Ḉ'=>'ḉ','Ḋ'=>'ḋ','Ḍ'=>'ḍ','Ḏ'=>'ḏ','Ḑ'=>'ḑ','Ḓ'=>'ḓ','Ḕ'=>'ḕ','Ḗ'=>'ḗ','Ḙ'=>'ḙ','Ḛ'=>'ḛ','Ḝ'=>'ḝ','Ḟ'=>'ḟ','Ḡ'=>'ḡ','Ḣ'=>'ḣ','Ḥ'=>'ḥ','Ḧ'=>'ḧ','Ḩ'=>'ḩ','Ḫ'=>'ḫ','Ḭ'=>'ḭ','Ḯ'=>'ḯ','Ḱ'=>'ḱ','Ḳ'=>'ḳ','Ḵ'=>'ḵ','Ḷ'=>'ḷ','Ḹ'=>'ḹ','Ḻ'=>'ḻ','Ḽ'=>'ḽ','Ḿ'=>'ḿ','Ṁ'=>'ṁ','Ṃ'=>'ṃ','Ṅ'=>'ṅ','Ṇ'=>'ṇ','Ṉ'=>'ṉ','Ṋ'=>'ṋ','Ṍ'=>'ṍ','Ṏ'=>'ṏ','Ṑ'=>'ṑ','Ṓ'=>'ṓ','Ṕ'=>'ṕ','Ṗ'=>'ṗ','Ṙ'=>'ṙ','Ṛ'=>'ṛ','Ṝ'=>'ṝ','Ṟ'=>'ṟ','Ṡ'=>'ṡ','Ṣ'=>'ṣ','Ṥ'=>'ṥ','Ṧ'=>'ṧ','Ṩ'=>'ṩ','Ṫ'=>'ṫ','Ṭ'=>'ṭ','Ṯ'=>'ṯ','Ṱ'=>'ṱ','Ṳ'=>'ṳ','Ṵ'=>'ṵ','Ṷ'=>'ṷ','Ṹ'=>'ṹ','Ṻ'=>'ṻ','Ṽ'=>'ṽ','Ṿ'=>'ṿ','Ẁ'=>'ẁ','Ẃ'=>'ẃ','Ẅ'=>'ẅ','Ẇ'=>'ẇ','Ẉ'=>'ẉ','Ẋ'=>'ẋ','Ẍ'=>'ẍ','Ẏ'=>'ẏ','Ẑ'=>'ẑ','Ẓ'=>'ẓ','Ẕ'=>'ẕ','ẛ'=>'ṡ','Ạ'=>'ạ','Ả'=>'ả','Ấ'=>'ấ','Ầ'=>'ầ','Ẩ'=>'ẩ','Ẫ'=>'ẫ','Ậ'=>'ậ','Ắ'=>'ắ','Ằ'=>'ằ','Ẳ'=>'ẳ','Ẵ'=>'ẵ','Ặ'=>'ặ','Ẹ'=>'ẹ','Ẻ'=>'ẻ','Ẽ'=>'ẽ','Ế'=>'ế','Ề'=>'ề','Ể'=>'ể','Ễ'=>'ễ','Ệ'=>'ệ','Ỉ'=>'ỉ','Ị'=>'ị','Ọ'=>'ọ','Ỏ'=>'ỏ','Ố'=>'ố','Ồ'=>'ồ','Ổ'=>'ổ','Ỗ'=>'ỗ','Ộ'=>'ộ','Ớ'=>'ớ','Ờ'=>'ờ','Ở'=>'ở','Ỡ'=>'ỡ','Ợ'=>'ợ','Ụ'=>'ụ','Ủ'=>'ủ','Ứ'=>'ứ','Ừ'=>'ừ','Ử'=>'ử','Ữ'=>'ữ','Ự'=>'ự','Ỳ'=>'ỳ','Ỵ'=>'ỵ','Ỷ'=>'ỷ','Ỹ'=>'ỹ','Ἀ'=>'ἀ','Ἁ'=>'ἁ','Ἂ'=>'ἂ','Ἃ'=>'ἃ','Ἄ'=>'ἄ','Ἅ'=>'ἅ','Ἆ'=>'ἆ','Ἇ'=>'ἇ','Ἐ'=>'ἐ','Ἑ'=>'ἑ','Ἒ'=>'ἒ','Ἓ'=>'ἓ','Ἔ'=>'ἔ','Ἕ'=>'ἕ','Ἠ'=>'ἠ','Ἡ'=>'ἡ','Ἢ'=>'ἢ','Ἣ'=>'ἣ','Ἤ'=>'ἤ','Ἥ'=>'ἥ','Ἦ'=>'ἦ','Ἧ'=>'ἧ','Ἰ'=>'ἰ','Ἱ'=>'ἱ','Ἲ'=>'ἲ','Ἳ'=>'ἳ','Ἴ'=>'ἴ','Ἵ'=>'ἵ','Ἶ'=>'ἶ','Ἷ'=>'ἷ','Ὀ'=>'ὀ','Ὁ'=>'ὁ','Ὂ'=>'ὂ','Ὃ'=>'ὃ','Ὄ'=>'ὄ','Ὅ'=>'ὅ','Ὑ'=>'ὑ','Ὓ'=>'ὓ','Ὕ'=>'ὕ','Ὗ'=>'ὗ','Ὠ'=>'ὠ','Ὡ'=>'ὡ','Ὢ'=>'ὢ','Ὣ'=>'ὣ','Ὤ'=>'ὤ','Ὥ'=>'ὥ','Ὦ'=>'ὦ','Ὧ'=>'ὧ','Ᾰ'=>'ᾰ','Ᾱ'=>'ᾱ','Ὰ'=>'ὰ','Ά'=>'ά','ι'=>'ι','Ὲ'=>'ὲ','Έ'=>'έ','Ὴ'=>'ὴ','Ή'=>'ή','Ῐ'=>'ῐ','Ῑ'=>'ῑ','Ὶ'=>'ὶ','Ί'=>'ί','Ῠ'=>'ῠ','Ῡ'=>'ῡ','Ὺ'=>'ὺ','Ύ'=>'ύ','Ῥ'=>'ῥ','Ὸ'=>'ὸ','Ό'=>'ό','Ὼ'=>'ὼ','Ώ'=>'ώ','Ω'=>'ω','K'=>'k','Å'=>'å','Ⅎ'=>'ⅎ','Ⅰ'=>'ⅰ','Ⅱ'=>'ⅱ','Ⅲ'=>'ⅲ','Ⅳ'=>'ⅳ','Ⅴ'=>'ⅴ','Ⅵ'=>'ⅵ','Ⅶ'=>'ⅶ','Ⅷ'=>'ⅷ','Ⅸ'=>'ⅸ','Ⅹ'=>'ⅹ','Ⅺ'=>'ⅺ','Ⅻ'=>'ⅻ','Ⅼ'=>'ⅼ','Ⅽ'=>'ⅽ','Ⅾ'=>'ⅾ','Ⅿ'=>'ⅿ','Ↄ'=>'ↄ','Ⓐ'=>'ⓐ','Ⓑ'=>'ⓑ','Ⓒ'=>'ⓒ','Ⓓ'=>'ⓓ','Ⓔ'=>'ⓔ','Ⓕ'=>'ⓕ','Ⓖ'=>'ⓖ','Ⓗ'=>'ⓗ','Ⓘ'=>'ⓘ','Ⓙ'=>'ⓙ','Ⓚ'=>'ⓚ','Ⓛ'=>'ⓛ','Ⓜ'=>'ⓜ','Ⓝ'=>'ⓝ','Ⓞ'=>'ⓞ','Ⓟ'=>'ⓟ','Ⓠ'=>'ⓠ','Ⓡ'=>'ⓡ','Ⓢ'=>'ⓢ','Ⓣ'=>'ⓣ','Ⓤ'=>'ⓤ','Ⓥ'=>'ⓥ','Ⓦ'=>'ⓦ','Ⓧ'=>'ⓧ','Ⓨ'=>'ⓨ','Ⓩ'=>'ⓩ','Ⰰ'=>'ⰰ','Ⰱ'=>'ⰱ','Ⰲ'=>'ⰲ','Ⰳ'=>'ⰳ','Ⰴ'=>'ⰴ','Ⰵ'=>'ⰵ','Ⰶ'=>'ⰶ','Ⰷ'=>'ⰷ','Ⰸ'=>'ⰸ','Ⰹ'=>'ⰹ','Ⰺ'=>'ⰺ','Ⰻ'=>'ⰻ','Ⰼ'=>'ⰼ','Ⰽ'=>'ⰽ','Ⰾ'=>'ⰾ','Ⰿ'=>'ⰿ','Ⱀ'=>'ⱀ','Ⱁ'=>'ⱁ','Ⱂ'=>'ⱂ','Ⱃ'=>'ⱃ','Ⱄ'=>'ⱄ','Ⱅ'=>'ⱅ','Ⱆ'=>'ⱆ','Ⱇ'=>'ⱇ','Ⱈ'=>'ⱈ','Ⱉ'=>'ⱉ','Ⱊ'=>'ⱊ','Ⱋ'=>'ⱋ','Ⱌ'=>'ⱌ','Ⱍ'=>'ⱍ','Ⱎ'=>'ⱎ','Ⱏ'=>'ⱏ','Ⱐ'=>'ⱐ','Ⱑ'=>'ⱑ','Ⱒ'=>'ⱒ','Ⱓ'=>'ⱓ','Ⱔ'=>'ⱔ','Ⱕ'=>'ⱕ','Ⱖ'=>'ⱖ','Ⱗ'=>'ⱗ','Ⱘ'=>'ⱘ','Ⱙ'=>'ⱙ','Ⱚ'=>'ⱚ','Ⱛ'=>'ⱛ','Ⱜ'=>'ⱜ','Ⱝ'=>'ⱝ','Ⱞ'=>'ⱞ','Ⱡ'=>'ⱡ','Ɫ'=>'ɫ','Ᵽ'=>'ᵽ','Ɽ'=>'ɽ','Ⱨ'=>'ⱨ','Ⱪ'=>'ⱪ','Ⱬ'=>'ⱬ','Ⱶ'=>'ⱶ','Ⲁ'=>'ⲁ','Ⲃ'=>'ⲃ','Ⲅ'=>'ⲅ','Ⲇ'=>'ⲇ','Ⲉ'=>'ⲉ','Ⲋ'=>'ⲋ','Ⲍ'=>'ⲍ','Ⲏ'=>'ⲏ','Ⲑ'=>'ⲑ','Ⲓ'=>'ⲓ','Ⲕ'=>'ⲕ','Ⲗ'=>'ⲗ','Ⲙ'=>'ⲙ','Ⲛ'=>'ⲛ','Ⲝ'=>'ⲝ','Ⲟ'=>'ⲟ','Ⲡ'=>'ⲡ','Ⲣ'=>'ⲣ','Ⲥ'=>'ⲥ','Ⲧ'=>'ⲧ','Ⲩ'=>'ⲩ','Ⲫ'=>'ⲫ','Ⲭ'=>'ⲭ','Ⲯ'=>'ⲯ','Ⲱ'=>'ⲱ','Ⲳ'=>'ⲳ','Ⲵ'=>'ⲵ','Ⲷ'=>'ⲷ','Ⲹ'=>'ⲹ','Ⲻ'=>'ⲻ','Ⲽ'=>'ⲽ','Ⲿ'=>'ⲿ','Ⳁ'=>'ⳁ','Ⳃ'=>'ⳃ','Ⳅ'=>'ⳅ','Ⳇ'=>'ⳇ','Ⳉ'=>'ⳉ','Ⳋ'=>'ⳋ','Ⳍ'=>'ⳍ','Ⳏ'=>'ⳏ','Ⳑ'=>'ⳑ','Ⳓ'=>'ⳓ','Ⳕ'=>'ⳕ','Ⳗ'=>'ⳗ','Ⳙ'=>'ⳙ','Ⳛ'=>'ⳛ','Ⳝ'=>'ⳝ','Ⳟ'=>'ⳟ','Ⳡ'=>'ⳡ','Ⳣ'=>'ⳣ','A'=>'a','B'=>'b','C'=>'c','D'=>'d','E'=>'e','F'=>'f','G'=>'g','H'=>'h','I'=>'i','J'=>'j','K'=>'k','L'=>'l','M'=>'m','N'=>'n','O'=>'o','P'=>'p','Q'=>'q','R'=>'r','S'=>'s','T'=>'t','U'=>'u','V'=>'v','W'=>'w','X'=>'x','Y'=>'y','Z'=>'z','𐐀'=>'𐐨','𐐁'=>'𐐩','𐐂'=>'𐐪','𐐃'=>'𐐫','𐐄'=>'𐐬','𐐅'=>'𐐭','𐐆'=>'𐐮','𐐇'=>'𐐯','𐐈'=>'𐐰','𐐉'=>'𐐱','𐐊'=>'𐐲','𐐋'=>'𐐳','𐐌'=>'𐐴','𐐍'=>'𐐵','𐐎'=>'𐐶','𐐏'=>'𐐷','𐐐'=>'𐐸','𐐑'=>'𐐹','𐐒'=>'𐐺','𐐓'=>'𐐻','𐐔'=>'𐐼','𐐕'=>'𐐽','𐐖'=>'𐐾','𐐗'=>'𐐿','𐐘'=>'𐑀','𐐙'=>'𐑁','𐐚'=>'𐑂','𐐛'=>'𐑃','𐐜'=>'𐑄','𐐝'=>'𐑅','𐐞'=>'𐑆','𐐟'=>'𐑇','𐐠'=>'𐑈','𐐡'=>'𐑉','𐐢'=>'𐑊','𐐣'=>'𐑋','𐐤'=>'𐑌','𐐥'=>'𐑍','𐐦'=>'𐑎','𐐧'=>'𐑏');
diff --git a/phpBB/includes/utf/data/case_fold_f.php b/phpBB/includes/utf/data/case_fold_f.php
index 7e2ffb25ec..5f2d88ec92 100644
--- a/phpBB/includes/utf/data/case_fold_f.php
+++ b/phpBB/includes/utf/data/case_fold_f.php
@@ -1 +1 @@
-<?php return array('ß'=>'ss','İ'=>'i̇','ʼn'=>'ʼn','ǰ'=>'ǰ','ΐ'=>'ΐ','ΰ'=>'ΰ','և'=>'եւ','ẖ'=>'ẖ','ẗ'=>'ẗ','ẘ'=>'ẘ','ẙ'=>'ẙ','ẚ'=>'aʾ','ὐ'=>'ὐ','ὒ'=>'ὒ','ὔ'=>'ὔ','ὖ'=>'ὖ','ᾀ'=>'ἀι','ᾁ'=>'ἁι','ᾂ'=>'ἂι','ᾃ'=>'ἃι','ᾄ'=>'ἄι','ᾅ'=>'ἅι','ᾆ'=>'ἆι','ᾇ'=>'ἇι','ᾈ'=>'ἀι','ᾉ'=>'ἁι','ᾊ'=>'ἂι','ᾋ'=>'ἃι','ᾌ'=>'ἄι','ᾍ'=>'ἅι','ᾎ'=>'ἆι','ᾏ'=>'ἇι','ᾐ'=>'ἠι','ᾑ'=>'ἡι','ᾒ'=>'ἢι','ᾓ'=>'ἣι','ᾔ'=>'ἤι','ᾕ'=>'ἥι','ᾖ'=>'ἦι','ᾗ'=>'ἧι','ᾘ'=>'ἠι','ᾙ'=>'ἡι','ᾚ'=>'ἢι','ᾛ'=>'ἣι','ᾜ'=>'ἤι','ᾝ'=>'ἥι','ᾞ'=>'ἦι','ᾟ'=>'ἧι','ᾠ'=>'ὠι','ᾡ'=>'ὡι','ᾢ'=>'ὢι','ᾣ'=>'ὣι','ᾤ'=>'ὤι','ᾥ'=>'ὥι','ᾦ'=>'ὦι','ᾧ'=>'ὧι','ᾨ'=>'ὠι','ᾩ'=>'ὡι','ᾪ'=>'ὢι','ᾫ'=>'ὣι','ᾬ'=>'ὤι','ᾭ'=>'ὥι','ᾮ'=>'ὦι','ᾯ'=>'ὧι','ᾲ'=>'ὰι','ᾳ'=>'αι','ᾴ'=>'άι','ᾶ'=>'ᾶ','ᾷ'=>'ᾶι','ᾼ'=>'αι','ῂ'=>'ὴι','ῃ'=>'ηι','ῄ'=>'ήι','ῆ'=>'ῆ','ῇ'=>'ῆι','ῌ'=>'ηι','ῒ'=>'ῒ','ΐ'=>'ΐ','ῖ'=>'ῖ','ῗ'=>'ῗ','ῢ'=>'ῢ','ΰ'=>'ΰ','ῤ'=>'ῤ','ῦ'=>'ῦ','ῧ'=>'ῧ','ῲ'=>'ὼι','ῳ'=>'ωι','ῴ'=>'ώι','ῶ'=>'ῶ','ῷ'=>'ῶι','ῼ'=>'ωι','ff'=>'ff','fi'=>'fi','fl'=>'fl','ffi'=>'ffi','ffl'=>'ffl','ſt'=>'st','st'=>'st','ﬓ'=>'մն','ﬔ'=>'մե','ﬕ'=>'մի','ﬖ'=>'վն','ﬗ'=>'մխ'); \ No newline at end of file
+<?php return array('ß'=>'ss','İ'=>'i̇','ʼn'=>'ʼn','ǰ'=>'ǰ','ΐ'=>'ΐ','ΰ'=>'ΰ','և'=>'եւ','ẖ'=>'ẖ','ẗ'=>'ẗ','ẘ'=>'ẘ','ẙ'=>'ẙ','ẚ'=>'aʾ','ὐ'=>'ὐ','ὒ'=>'ὒ','ὔ'=>'ὔ','ὖ'=>'ὖ','ᾀ'=>'ἀι','ᾁ'=>'ἁι','ᾂ'=>'ἂι','ᾃ'=>'ἃι','ᾄ'=>'ἄι','ᾅ'=>'ἅι','ᾆ'=>'ἆι','ᾇ'=>'ἇι','ᾈ'=>'ἀι','ᾉ'=>'ἁι','ᾊ'=>'ἂι','ᾋ'=>'ἃι','ᾌ'=>'ἄι','ᾍ'=>'ἅι','ᾎ'=>'ἆι','ᾏ'=>'ἇι','ᾐ'=>'ἠι','ᾑ'=>'ἡι','ᾒ'=>'ἢι','ᾓ'=>'ἣι','ᾔ'=>'ἤι','ᾕ'=>'ἥι','ᾖ'=>'ἦι','ᾗ'=>'ἧι','ᾘ'=>'ἠι','ᾙ'=>'ἡι','ᾚ'=>'ἢι','ᾛ'=>'ἣι','ᾜ'=>'ἤι','ᾝ'=>'ἥι','ᾞ'=>'ἦι','ᾟ'=>'ἧι','ᾠ'=>'ὠι','ᾡ'=>'ὡι','ᾢ'=>'ὢι','ᾣ'=>'ὣι','ᾤ'=>'ὤι','ᾥ'=>'ὥι','ᾦ'=>'ὦι','ᾧ'=>'ὧι','ᾨ'=>'ὠι','ᾩ'=>'ὡι','ᾪ'=>'ὢι','ᾫ'=>'ὣι','ᾬ'=>'ὤι','ᾭ'=>'ὥι','ᾮ'=>'ὦι','ᾯ'=>'ὧι','ᾲ'=>'ὰι','ᾳ'=>'αι','ᾴ'=>'άι','ᾶ'=>'ᾶ','ᾷ'=>'ᾶι','ᾼ'=>'αι','ῂ'=>'ὴι','ῃ'=>'ηι','ῄ'=>'ήι','ῆ'=>'ῆ','ῇ'=>'ῆι','ῌ'=>'ηι','ῒ'=>'ῒ','ΐ'=>'ΐ','ῖ'=>'ῖ','ῗ'=>'ῗ','ῢ'=>'ῢ','ΰ'=>'ΰ','ῤ'=>'ῤ','ῦ'=>'ῦ','ῧ'=>'ῧ','ῲ'=>'ὼι','ῳ'=>'ωι','ῴ'=>'ώι','ῶ'=>'ῶ','ῷ'=>'ῶι','ῼ'=>'ωι','ff'=>'ff','fi'=>'fi','fl'=>'fl','ffi'=>'ffi','ffl'=>'ffl','ſt'=>'st','st'=>'st','ﬓ'=>'մն','ﬔ'=>'մե','ﬕ'=>'մի','ﬖ'=>'վն','ﬗ'=>'մխ');
diff --git a/phpBB/includes/utf/data/case_fold_s.php b/phpBB/includes/utf/data/case_fold_s.php
index 5f09ffa1dd..4ee5d8dc69 100644
--- a/phpBB/includes/utf/data/case_fold_s.php
+++ b/phpBB/includes/utf/data/case_fold_s.php
@@ -1 +1 @@
-<?php return array('ᾈ'=>'ᾀ','ᾉ'=>'ᾁ','ᾊ'=>'ᾂ','ᾋ'=>'ᾃ','ᾌ'=>'ᾄ','ᾍ'=>'ᾅ','ᾎ'=>'ᾆ','ᾏ'=>'ᾇ','ᾘ'=>'ᾐ','ᾙ'=>'ᾑ','ᾚ'=>'ᾒ','ᾛ'=>'ᾓ','ᾜ'=>'ᾔ','ᾝ'=>'ᾕ','ᾞ'=>'ᾖ','ᾟ'=>'ᾗ','ᾨ'=>'ᾠ','ᾩ'=>'ᾡ','ᾪ'=>'ᾢ','ᾫ'=>'ᾣ','ᾬ'=>'ᾤ','ᾭ'=>'ᾥ','ᾮ'=>'ᾦ','ᾯ'=>'ᾧ','ᾼ'=>'ᾳ','ῌ'=>'ῃ','ῼ'=>'ῳ'); \ No newline at end of file
+<?php return array('ᾈ'=>'ᾀ','ᾉ'=>'ᾁ','ᾊ'=>'ᾂ','ᾋ'=>'ᾃ','ᾌ'=>'ᾄ','ᾍ'=>'ᾅ','ᾎ'=>'ᾆ','ᾏ'=>'ᾇ','ᾘ'=>'ᾐ','ᾙ'=>'ᾑ','ᾚ'=>'ᾒ','ᾛ'=>'ᾓ','ᾜ'=>'ᾔ','ᾝ'=>'ᾕ','ᾞ'=>'ᾖ','ᾟ'=>'ᾗ','ᾨ'=>'ᾠ','ᾩ'=>'ᾡ','ᾪ'=>'ᾢ','ᾫ'=>'ᾣ','ᾬ'=>'ᾤ','ᾭ'=>'ᾥ','ᾮ'=>'ᾦ','ᾯ'=>'ᾧ','ᾼ'=>'ᾳ','ῌ'=>'ῃ','ῼ'=>'ῳ');
diff --git a/phpBB/includes/utf/data/confusables.php b/phpBB/includes/utf/data/confusables.php
index 7564978a26..767d242948 100644
--- a/phpBB/includes/utf/data/confusables.php
+++ b/phpBB/includes/utf/data/confusables.php
@@ -1 +1 @@
-<?php return array('¡'=>'i','ǃ'=>'!','α'=>'a',' '=>' ','­'=>'','۝'=>'','܏'=>'','᠆'=>'','᠎'=>'','​'=>'','‌'=>'','‍'=>'','
'=>'','
'=>'','⁠'=>'','⁡'=>'','⁢'=>'','⁣'=>'',''=>'',''=>'',''=>'',''=>'',''=>'',''=>'',''=>'',''=>'',''=>'',''=>'',''=>'','𝅳'=>'','𝅴'=>'','𝅵'=>'','𝅶'=>'','𝅷'=>'','𝅸'=>'','𝅹'=>'','𝅺'=>'','۬'=>'۟','̓'=>'̓','ُ'=>'̓','֜'=>'́','́'=>'́','݇'=>'́','॔'=>'́','̀'=>'̀','॓'=>'̀','̌'=>'̆','̑'=>'̂','֯'=>'̊','ஂ'=>'̊','ํ'=>'̊','ໍ'=>'̊','ံ'=>'̊','ំ'=>'̊','៓'=>'̊','゚'=>'̊','゚'=>'̊','ͦ'=>'̊','͂'=>'̃','ׄ'=>'̇','ֹ'=>'̇','ׂ'=>'̇','ׁ'=>'̇','݁'=>'̇','ं'=>'̇','ਂ'=>'̇','ં'=>'̇','்'=>'̇','̅'=>'̄','〬'=>'̉','̱'=>'̠','॒'=>'̠','̧'=>'̡','̦'=>'̡','̨'=>'̢','़'=>'̣','়'=>'̣','਼'=>'̣','઼'=>'̣','଼'=>'̣','͇'=>'̳','̶'=>'̵','ﱞ'=>'ﹲّ','ﱟ'=>'ﹴّ','ﳲ'=>'ﹷّ','ﱠ'=>'ﹶّ','ﳳ'=>'ﹹّ','ﱡ'=>'ﹸّ','ﳴ'=>'ﹻّ','ﱢ'=>'ﹺّ','ﱣ'=>'ﹼٰ','ٴ'=>'ٔ','݂'=>'ܼ','౦'=>'o','೦'=>'o','゙'=>'゙',' '=>' ',' '=>' ',' '=>' ',' '=>' ',' '=>' ',' '=>' ',' '=>' ',' '=>' ',' '=>' ',' '=>' ',' '=>' ',' '=>' ',' '=>' ',' '=>' ',' '=>' ','`'=>'`','`'=>'`','῀'=>'˜','^'=>'^','︿'=>'^','_'=>'_','﹍'=>'_','﹎'=>'_','﹏'=>'_','⌇'=>'︴','-'=>'-','‐'=>'-','‑'=>'-','‒'=>'-','–'=>'-','﹘'=>'-','∼'=>'⁓','・'=>'・','•'=>'・',','=>',','‚'=>',','٬'=>'،','、'=>'、',';'=>';',';'=>';',':'=>':','։'=>':','︰'=>':','׃'=>':','⩴'=>'::=','.'=>'.','․'=>'.','܂'=>'.','‥'=>'..','…'=>'...','。'=>'。','·'=>'·','‧'=>'·','∙'=>'·','⋅'=>'·','ᐧ'=>'·','ᔯ'=>'·4','ᐌ'=>'·ᐁ','ᐎ'=>'·ᐃ','ᐐ'=>'·ᐄ','ᐒ'=>'·ᐅ','ᐔ'=>'·ᐆ','ᐗ'=>'·ᐊ','ᐙ'=>'·ᐋ','ᐷ'=>'·ᐳ','ᑀ'=>'·ᐳ','ᑂ'=>'·ᐴ','ᑄ'=>'·ᐸ','ᑆ'=>'·ᐹ','ᑗ'=>'·ᑌ','ᑙ'=>'·ᑎ','ᑛ'=>'·ᑏ','ᑔ'=>'·ᑐ','ᑝ'=>'·ᑐ','ᑟ'=>'·ᑑ','ᑡ'=>'·ᑕ','ᑣ'=>'·ᑖ','ᑴ'=>'·ᑫ','ᑸ'=>'·ᑮ','ᑼ'=>'·ᑰ','ᑾ'=>'·ᑲ','ᒀ'=>'·ᑳ','ᒒ'=>'·ᒉ','ᒔ'=>'·ᒋ','ᒖ'=>'·ᒌ','ᒚ'=>'·ᒎ','ᒜ'=>'·ᒐ','ᒞ'=>'·ᒑ','ᒬ'=>'·ᒣ','ᒮ'=>'·ᒥ','ᒰ'=>'·ᒦ','ᒲ'=>'·ᒧ','ᒴ'=>'·ᒨ','ᒶ'=>'·L','ᒸ'=>'·ᒫ','ᓉ'=>'·ᓀ','ᓋ'=>'·ᓇ','ᓍ'=>'·ᓈ','ᓜ'=>'·ᓓ','ᓞ'=>'·ᓕ','ᓠ'=>'·ᓖ','ᓢ'=>'·ᓗ','ᓤ'=>'·ᓘ','ᓦ'=>'·ᓚ','ᓨ'=>'·ᓛ','ᓶ'=>'·ᓭ','ᓸ'=>'·ᓯ','ᓺ'=>'·ᓰ','ᓼ'=>'·ᓱ','ᓾ'=>'·ᓲ','ᔀ'=>'·ᓴ','ᔂ'=>'·ᓵ','ᔗ'=>'·ᔐ','ᔙ'=>'·ᔑ','ᔛ'=>'·ᔒ','ᔝ'=>'·ᔓ','ᔟ'=>'·ᔔ','ᔡ'=>'·ᔕ','ᔣ'=>'·ᔖ','ᔱ'=>'·ᔨ','ᔳ'=>'·ᔩ','ᔵ'=>'·ᔪ','ᔷ'=>'·ᔫ','ᔹ'=>'·ᔭ','ᔻ'=>'·ᔮ','ᕎ'=>'·ᕌ','ᕛ'=>'·ᕚ','ᕨ'=>'·ᕧ','('=>'(','⑴'=>'(1)','⒧'=>'(l)','⑽'=>'(10)','⑾'=>'(11)','⑿'=>'(12)','⒀'=>'(13)','⒁'=>'(14)','⒂'=>'(15)','⒃'=>'(16)','⒄'=>'(17)','⒅'=>'(18)','⒆'=>'(19)','⑵'=>'(2)','⒇'=>'(20)','⑶'=>'(3)','⑷'=>'(4)','⑸'=>'(5)','⑹'=>'(6)','⑺'=>'(7)','⑻'=>'(8)','⑼'=>'(9)','⒜'=>'(a)','⒝'=>'(b)','⒞'=>'(c)','⒟'=>'(d)','⒠'=>'(e)','⒡'=>'(f)','⒢'=>'(g)','⒣'=>'(h)','⒤'=>'(i)','⒥'=>'(j)','⒦'=>'(k)','⒨'=>'(m)','⒩'=>'(n)','⒪'=>'(o)','⒫'=>'(p)','⒬'=>'(q)','⒭'=>'(r)','⒮'=>'(s)','⒯'=>'(t)','⒰'=>'(u)','⒱'=>'(v)','⒲'=>'(w)','⒳'=>'(x)','⒴'=>'(y)','⒵'=>'(z)','㈀'=>'(ᄀ)','㈎'=>'(가)','㈁'=>'(ᄂ)','㈏'=>'(나)','㈂'=>'(ᄃ)','㈐'=>'(다)','㈃'=>'(ᄅ)','㈑'=>'(라)','㈄'=>'(ᄆ)','㈒'=>'(마)','㈅'=>'(ᄇ)','㈓'=>'(바)','㈆'=>'(ᄉ)','㈔'=>'(사)','㈇'=>'(ᄋ)','㈕'=>'(아)','㈝'=>'(오전)','㈞'=>'(오후)','㈈'=>'(ᄌ)','㈖'=>'(자)','㈜'=>'(주)','㈉'=>'(ᄎ)','㈗'=>'(차)','㈊'=>'(ᄏ)','㈘'=>'(카)','㈋'=>'(ᄐ)','㈙'=>'(타)','㈌'=>'(ᄑ)','㈚'=>'(파)','㈍'=>'(ᄒ)','㈛'=>'(하)','㈠'=>'(一)','㈦'=>'(七)','㈢'=>'(三)','㈨'=>'(九)','㈡'=>'(二)','㈤'=>'(五)','㈹'=>'(代)','㈽'=>'(企)','㉁'=>'(休)','㈧'=>'(八)','㈥'=>'(六)','㈸'=>'(労)','㈩'=>'(十)','㈿'=>'(協)','㈴'=>'(名)','㈺'=>'(呼)','㈣'=>'(四)','㈯'=>'(土)','㈻'=>'(学)','㈰'=>'(日)','㈪'=>'(月)','㈲'=>'(有)','㈭'=>'(木)','㈱'=>'(株)','㈬'=>'(水)','㈫'=>'(火)','㈵'=>'(特)','㈼'=>'(監)','㈳'=>'(社)','㈷'=>'(祝)','㉀'=>'(祭)','㉂'=>'(自)','㉃'=>'(至)','㈶'=>'(財)','㈾'=>'(資)','㈮'=>'(金)',')'=>')','['=>'[','〔'=>'[',']'=>']','〕'=>']','{'=>'{','}'=>'}','⦅'=>'⦅','⦆'=>'⦆','「'=>'「','」'=>'」','@'=>'@','*'=>'*','/'=>'/','⁄'=>'/','∕'=>'/','\'=>'\\','&'=>'&','#'=>'#','%'=>'%','‶'=>'‵‵','‷'=>'‵‵‵','༌'=>'་','´'=>'ʹ','΄'=>'ʹ','´'=>'ʹ','\''=>'ʹ','''=>'ʹ','′'=>'ʹ','׳'=>'ʹ','ʹ'=>'ʹ','ˊ'=>'ʹ','"'=>'ʹʹ','"'=>'ʹʹ','″'=>'ʹʹ','〃'=>'ʹʹ','״'=>'ʹʹ','ʺ'=>'ʹʹ','‴'=>'ʹʹʹ','⁗'=>'ʹʹʹʹ','¯'=>'ˉ',' ̄'=>'ˉ','‾'=>'ˉ','﹉'=>'ˉ','﹊'=>'ˉ','﹋'=>'ˉ','﹌'=>'ˉ','˚'=>'°','௵'=>'௳','←'=>'←','→'=>'→','↑'=>'↑','↓'=>'↓','↵'=>'↲','⨡'=>'↾','𝛛'=>'∂','𝜕'=>'∂','𝝏'=>'∂','𝞉'=>'∂','𝟃'=>'∂','𝛁'=>'∇','𝛻'=>'∇','𝜵'=>'∇','𝝯'=>'∇','𝞩'=>'∇','+'=>'+','﬩'=>'+','‹'=>'<','<'=>'<','='=>'=','⩵'=>'==','⩶'=>'===','›'=>'>','>'=>'>','¬'=>'¬','¦'=>'¦','〜'=>'~','~'=>'~','﹨'=>'∖','⋀'=>'∧','⋁'=>'∨','⋂'=>'∩','⋃'=>'∪','∯'=>'∮∮','∰'=>'∮∮∮','≣'=>'≡','♁'=>'⊕','☉'=>'⊙','⟂'=>'⊥','▷'=>'⊲','⨝'=>'⋈','⨽'=>'⌙','☸'=>'⎈','⎮'=>'⎥','│'=>'│','▐'=>'▌','■'=>'■','☐'=>'□','○'=>'○','⦾'=>'◎','〛'=>'⟧','〈'=>'⟨','〈'=>'⟨','〉'=>'⟩','〉'=>'⟩','⧙'=>'⦚','〶'=>'〒','ー'=>'ー','¢'=>'¢','$'=>'$','£'=>'£','¥'=>'Y̵','₩'=>'W̵','0'=>'0','𝟎'=>'0','𝟘'=>'0','𝟢'=>'0','𝟬'=>'0','𝟶'=>'0','০'=>'0','୦'=>'0','௦'=>'0','᠐'=>'0','〇'=>'0','𝐎'=>'0','𝑂'=>'0','𝑶'=>'0','𝒪'=>'0','𝓞'=>'0','𝔒'=>'0','𝕆'=>'0','𝕺'=>'0','𝖮'=>'0','𝗢'=>'0','𝘖'=>'0','𝙊'=>'0','𝙾'=>'0','𝚶'=>'0','𝛰'=>'0','𝜪'=>'0','𝝤'=>'0','𝞞'=>'0','ⵔ'=>'0','ഠ'=>'0','⊖'=>'0̵','𝚯'=>'0̵','𝚹'=>'0̵','𝛩'=>'0̵','𝛳'=>'0̵','𝜣'=>'0̵','𝜭'=>'0̵','𝝝'=>'0̵','𝝧'=>'0̵','𝞗'=>'0̵','𝞡'=>'0̵','ⴱ'=>'0̵','Ꮎ'=>'0̵','۰'=>'٠','᭜'=>'᭐','㍘'=>'0点','1'=>'1','𝟏'=>'1','𝟙'=>'1','𝟣'=>'1','𝟭'=>'1','𝟷'=>'1','ℐ'=>'1','ℑ'=>'1','𝐈'=>'1','𝐼'=>'1','𝑰'=>'1','𝓘'=>'1','𝕀'=>'1','𝕴'=>'1','𝖨'=>'1','𝗜'=>'1','𝘐'=>'1','𝙄'=>'1','𝙸'=>'1','l'=>'l','l'=>'l','ⅼ'=>'1','ℓ'=>'l','𝐥'=>'l','𝑙'=>'l','𝒍'=>'l','𝓁'=>'l','𝓵'=>'l','𝔩'=>'l','𝕝'=>'l','𝖑'=>'l','𝗅'=>'l','𝗹'=>'l','𝘭'=>'l','𝙡'=>'l','𝚕'=>'l','𝚰'=>'l','𝛪'=>'l','𝜤'=>'l','𝝞'=>'l','𝞘'=>'l','①'=>'➀','ɭ'=>'l̢','ɫ'=>'l̴','ƚ'=>'l̵','ł'=>'l̷','۱'=>'١','⒈'=>'1.','ŀ'=>'l·','ᒷ'=>'1·','⑩'=>'➉','⒑'=>'10.','㏩'=>'10日','㋉'=>'10月','㍢'=>'10点','⒒'=>'11.','㏪'=>'11日','㋊'=>'11月','㍣'=>'11点','⒓'=>'12.','㏫'=>'12日','㋋'=>'12月','㍤'=>'12点','⒔'=>'13.','㏬'=>'13日','㍥'=>'13点','⒕'=>'14.','㏭'=>'14日','㍦'=>'14点','⒖'=>'15.','㏮'=>'15日','㍧'=>'15点','⒗'=>'16.','㏯'=>'16日','㍨'=>'16点','⒘'=>'17.','㏰'=>'17日','㍩'=>'17点','⒙'=>'18.','㏱'=>'18日','㍪'=>'18点','⒚'=>'19.','㏲'=>'19日','㍫'=>'19点','lj'=>'lj','㏠'=>'1日','㋀'=>'1月','㍙'=>'1点','2'=>'2','𝟐'=>'2','𝟚'=>'2','𝟤'=>'2','𝟮'=>'2','𝟸'=>'2','ᒿ'=>'2','②'=>'➁','۲'=>'٢','⒉'=>'2.','⒛'=>'20.','㏳'=>'20日','㍬'=>'20点','㏴'=>'21日','㍭'=>'21点','㏵'=>'22日','㍮'=>'22点','㏶'=>'23日','㍯'=>'23点','㏷'=>'24日','㍰'=>'24点','㏸'=>'25日','㏹'=>'26日','㏺'=>'27日','㏻'=>'28日','㏼'=>'29日','㏡'=>'2日','㋁'=>'2月','㍚'=>'2点','3'=>'3','𝟑'=>'3','𝟛'=>'3','𝟥'=>'3','𝟯'=>'3','𝟹'=>'3','③'=>'➂','۳'=>'٣','⒊'=>'3.','㏽'=>'30日','㏾'=>'31日','㏢'=>'3日','㋂'=>'3月','㍛'=>'3点','4'=>'4','𝟒'=>'4','𝟜'=>'4','𝟦'=>'4','𝟰'=>'4','𝟺'=>'4','Ꮞ'=>'4','④'=>'➃','⒋'=>'4.','ᔰ'=>'4·','㏣'=>'4日','㋃'=>'4月','㍜'=>'4点','5'=>'5','𝟓'=>'5','𝟝'=>'5','𝟧'=>'5','𝟱'=>'5','𝟻'=>'5','⑤'=>'➄','⒌'=>'5.','㏤'=>'5日','㋄'=>'5月','㍝'=>'5点','6'=>'6','𝟔'=>'6','𝟞'=>'6','𝟨'=>'6','𝟲'=>'6','𝟼'=>'6','б'=>'6','⑥'=>'➅','⒍'=>'6.','㏥'=>'6日','㋅'=>'6月','㍞'=>'6点','7'=>'7','𝟕'=>'7','𝟟'=>'7','𝟩'=>'7','𝟳'=>'7','𝟽'=>'7','⑦'=>'➆','۷'=>'٧','⒎'=>'7.','㏦'=>'7日','㋆'=>'7月','㍟'=>'7点','ଃ'=>'8','৪'=>'8','੪'=>'8','8'=>'8','𝟖'=>'8','𝟠'=>'8','𝟪'=>'8','𝟴'=>'8','𝟾'=>'8','ȣ'=>'8','⑧'=>'➇','۸'=>'٨','⒏'=>'8.','㏧'=>'8日','㋇'=>'8月','㍠'=>'8点','੧'=>'9','୨'=>'9','৭'=>'9','9'=>'9','𝟗'=>'9','𝟡'=>'9','𝟫'=>'9','𝟵'=>'9','𝟿'=>'9','⑨'=>'➈','۹'=>'٩','⒐'=>'9.','㏨'=>'9日','㋈'=>'9月','㍡'=>'9点','a'=>'a','𝐚'=>'a','𝑎'=>'a','𝒂'=>'a','𝒶'=>'a','𝓪'=>'a','𝔞'=>'a','𝕒'=>'a','𝖆'=>'a','𝖺'=>'a','𝗮'=>'a','𝘢'=>'a','𝙖'=>'a','𝚊'=>'a','℀'=>'a/c','℁'=>'a/s','æ'=>'ae','b'=>'b','𝐛'=>'b','𝑏'=>'b','𝒃'=>'b','𝒷'=>'b','𝓫'=>'b','𝔟'=>'b','𝕓'=>'b','𝖇'=>'b','𝖻'=>'b','𝗯'=>'b','𝘣'=>'b','𝙗'=>'b','𝚋'=>'b','ɓ'=>'b̔','ƃ'=>'b̄','ƀ'=>'b̵','c'=>'c','ⅽ'=>'c','𝐜'=>'c','𝑐'=>'c','𝒄'=>'c','𝒸'=>'c','𝓬'=>'c','𝔠'=>'c','𝕔'=>'c','𝖈'=>'c','𝖼'=>'c','𝗰'=>'c','𝘤'=>'c','𝙘'=>'c','𝚌'=>'c','𝛓'=>'c','𝜍'=>'c','𝝇'=>'c','𝞁'=>'c','𝞻'=>'c','℅'=>'c/o','℆'=>'c/u','d'=>'d','ⅾ'=>'d','ⅆ'=>'d','𝐝'=>'d','𝑑'=>'d','𝒅'=>'d','𝒹'=>'d','𝓭'=>'d','𝔡'=>'d','𝕕'=>'d','𝖉'=>'d','𝖽'=>'d','𝗱'=>'d','𝘥'=>'d','𝙙'=>'d','𝚍'=>'d','ɗ'=>'d̔','ƌ'=>'d̄','ɖ'=>'d̢','đ'=>'d̵','dz'=>'dz','dž'=>'dž','e'=>'e','ℯ'=>'e','ⅇ'=>'e','𝐞'=>'e','𝑒'=>'e','𝒆'=>'e','𝓮'=>'e','𝔢'=>'e','𝕖'=>'e','𝖊'=>'e','𝖾'=>'e','𝗲'=>'e','𝘦'=>'e','𝙚'=>'e','𝚎'=>'e','ⴹ'=>'E','ə'=>'ǝ','ɚ'=>'ǝ˞','⋴'=>'ɛ','𝛆'=>'ɛ','𝛜'=>'ɛ','𝜀'=>'ɛ','𝜖'=>'ɛ','𝜺'=>'ɛ','𝝐'=>'ɛ','𝝴'=>'ɛ','𝞊'=>'ɛ','𝞮'=>'ɛ','𝟄'=>'ɛ','f'=>'f','𝐟'=>'f','𝑓'=>'f','𝒇'=>'f','𝒻'=>'f','𝓯'=>'f','𝔣'=>'f','𝕗'=>'f','𝖋'=>'f','𝖿'=>'f','𝗳'=>'f','𝘧'=>'f','𝙛'=>'f','𝚏'=>'f','ƒ'=>'f̡','g'=>'g','ℊ'=>'g','𝐠'=>'g','𝑔'=>'g','𝒈'=>'g','𝓰'=>'g','𝔤'=>'g','𝕘'=>'g','𝖌'=>'g','𝗀'=>'g','𝗴'=>'g','𝘨'=>'g','𝙜'=>'g','𝚐'=>'g','ɡ'=>'g','ɠ'=>'g̔','ǥ'=>'g̵','h'=>'h','ℎ'=>'h','𝐡'=>'h','𝒉'=>'h','𝒽'=>'h','𝓱'=>'h','𝔥'=>'h','𝕙'=>'h','𝖍'=>'h','𝗁'=>'h','𝗵'=>'h','𝘩'=>'h','𝙝'=>'h','𝚑'=>'h','ɦ'=>'h̔','ħ'=>'h̵','ℏ'=>'h̵','῾'=>'ʻ','‘'=>'ʻ','‛'=>'ʻ','ʽ'=>'ʻ','⍳'=>'i','i'=>'i','ⅰ'=>'i','ℹ'=>'i','ⅈ'=>'i','𝐢'=>'i','𝑖'=>'i','𝒊'=>'i','𝒾'=>'i','𝓲'=>'i','𝔦'=>'i','𝕚'=>'i','𝖎'=>'i','𝗂'=>'i','𝗶'=>'i','𝘪'=>'i','𝙞'=>'i','𝚒'=>'i','ı'=>'i','𝚤'=>'i','ɪ'=>'i','ɩ'=>'i','𝛊'=>'i','𝜄'=>'i','𝜾'=>'i','𝝸'=>'i','𝞲'=>'i','ɨ'=>'i̵','ⅱ'=>'ii','ⅲ'=>'iii','ij'=>'ij','ⅳ'=>'iv','ⅸ'=>'ix','j'=>'j','ⅉ'=>'j','𝐣'=>'j','𝑗'=>'j','𝒋'=>'j','𝒿'=>'j','𝓳'=>'j','𝔧'=>'j','𝕛'=>'j','𝖏'=>'j','𝗃'=>'j','𝗷'=>'j','𝘫'=>'j','𝙟'=>'j','𝚓'=>'j','ϳ'=>'j','𝚥'=>'ȷ','k'=>'k','𝐤'=>'k','𝑘'=>'k','𝒌'=>'k','𝓀'=>'k','𝓴'=>'k','𝔨'=>'k','𝕜'=>'k','𝖐'=>'k','𝗄'=>'k','𝗸'=>'k','𝘬'=>'k','𝙠'=>'k','𝚔'=>'k','ƙ'=>'k̔','m'=>'m','ⅿ'=>'m','𝐦'=>'m','𝑚'=>'m','𝒎'=>'m','𝓂'=>'m','𝓶'=>'m','𝔪'=>'m','𝕞'=>'m','𝖒'=>'m','𝗆'=>'m','𝗺'=>'m','𝘮'=>'m','𝙢'=>'m','𝚖'=>'m','ɱ'=>'m̡','n'=>'n','𝐧'=>'n','𝑛'=>'n','𝒏'=>'n','𝓃'=>'n','𝓷'=>'n','𝔫'=>'n','𝕟'=>'n','𝖓'=>'n','𝗇'=>'n','𝗻'=>'n','𝘯'=>'n','𝙣'=>'n','𝚗'=>'n','𝐍'=>'N','𝑁'=>'N','𝑵'=>'N','𝒩'=>'N','𝓝'=>'N','𝔑'=>'N','𝕹'=>'N','𝖭'=>'N','𝗡'=>'N','𝘕'=>'N','𝙉'=>'N','𝙽'=>'N','𝚴'=>'N','𝛮'=>'N','𝜨'=>'N','𝝢'=>'N','𝞜'=>'N','ɲ'=>'ņ','ɳ'=>'n̢','ƞ'=>'n̩','𝛈'=>'n̩','𝜂'=>'n̩','𝜼'=>'n̩','𝝶'=>'n̩','𝞰'=>'n̩','nj'=>'nj','o'=>'o','ℴ'=>'o','𝐨'=>'o','𝑜'=>'o','𝒐'=>'o','𝓸'=>'o','𝔬'=>'o','𝕠'=>'o','𝖔'=>'o','𝗈'=>'o','𝗼'=>'o','𝘰'=>'o','𝙤'=>'o','𝚘'=>'o','ᴏ'=>'o','𝛐'=>'o','𝜊'=>'o','𝝄'=>'o','𝝾'=>'o','𝞸'=>'o','ɵ'=>'o̵','ǿ'=>'ó̵','ø'=>'o̷','œ'=>'oe','ơ'=>'oʼ','⍴'=>'p','p'=>'p','𝐩'=>'p','𝑝'=>'p','𝒑'=>'p','𝓅'=>'p','𝓹'=>'p','𝔭'=>'p','𝕡'=>'p','𝖕'=>'p','𝗉'=>'p','𝗽'=>'p','𝘱'=>'p','𝙥'=>'p','𝚙'=>'p','𝛒'=>'p','𝛠'=>'p','𝜌'=>'p','𝜚'=>'p','𝝆'=>'p','𝝔'=>'p','𝞀'=>'p','𝞎'=>'p','𝞺'=>'p','𝟈'=>'p','ƥ'=>'p̔','q'=>'q','𝐪'=>'q','𝑞'=>'q','𝒒'=>'q','𝓆'=>'q','𝓺'=>'q','𝔮'=>'q','𝕢'=>'q','𝖖'=>'q','𝗊'=>'q','𝗾'=>'q','𝘲'=>'q','𝙦'=>'q','𝚚'=>'q','𝐐'=>'Q','𝑄'=>'Q','𝑸'=>'Q','𝒬'=>'Q','𝓠'=>'Q','𝔔'=>'Q','𝕼'=>'Q','𝖰'=>'Q','𝗤'=>'Q','𝘘'=>'Q','𝙌'=>'Q','𝚀'=>'Q','ʠ'=>'q̔','𝛋'=>'ĸ','𝛞'=>'ĸ','𝜅'=>'ĸ','𝜘'=>'ĸ','𝜿'=>'ĸ','𝝒'=>'ĸ','𝝹'=>'ĸ','𝞌'=>'ĸ','𝞳'=>'ĸ','𝟆'=>'ĸ','r'=>'r','𝐫'=>'r','𝑟'=>'r','𝒓'=>'r','𝓇'=>'r','𝓻'=>'r','𝔯'=>'r','𝕣'=>'r','𝖗'=>'r','𝗋'=>'r','𝗿'=>'r','𝘳'=>'r','𝙧'=>'r','𝚛'=>'r','ɽ'=>'r̢','ɼ'=>'r̩','s'=>'s','𝐬'=>'s','𝑠'=>'s','𝒔'=>'s','𝓈'=>'s','𝓼'=>'s','𝔰'=>'s','𝕤'=>'s','𝖘'=>'s','𝗌'=>'s','𝘀'=>'s','𝘴'=>'s','𝙨'=>'s','𝚜'=>'s','ƽ'=>'s','ʂ'=>'s̢','∫'=>'ʃ','∬'=>'ʃʃ','∭'=>'ʃʃʃ','⨌'=>'ʃʃʃʃ','t'=>'t','𝐭'=>'t','𝑡'=>'t','𝒕'=>'t','𝓉'=>'t','𝓽'=>'t','𝔱'=>'t','𝕥'=>'t','𝖙'=>'t','𝗍'=>'t','𝘁'=>'t','𝘵'=>'t','𝙩'=>'t','𝚝'=>'t','𝑇'=>'T','𝑻'=>'T','𝒯'=>'T','𝓣'=>'T','𝔗'=>'T','𝕋'=>'T','𝕿'=>'T','𝖳'=>'T','𝗧'=>'T','𝘛'=>'T','𝙏'=>'T','𝚃'=>'T','𝚻'=>'T','𝛵'=>'T','𝜯'=>'T','𝝩'=>'T','𝞣'=>'T','ƭ'=>'t̔','ț'=>'ţ','ƫ'=>'ţ','ŧ'=>'t̵','u'=>'u','𝐮'=>'u','𝑢'=>'u','𝒖'=>'u','𝓊'=>'u','𝓾'=>'u','𝔲'=>'u','𝕦'=>'u','𝖚'=>'u','𝗎'=>'u','𝘂'=>'u','𝘶'=>'u','𝙪'=>'u','𝚞'=>'u','ʊ'=>'u','ʋ'=>'u','𝛖'=>'u','𝜐'=>'u','𝝊'=>'u','𝞄'=>'u','𝞾'=>'u','𝑈'=>'U','𝑼'=>'U','𝒰'=>'U','𝓤'=>'U','𝔘'=>'U','𝕌'=>'U','𝖀'=>'U','𝖴'=>'U','𝗨'=>'U','𝘜'=>'U','𝙐'=>'U','𝚄'=>'U','v'=>'v','ⅴ'=>'v','𝐯'=>'v','𝑣'=>'v','𝒗'=>'v','𝓋'=>'v','𝓿'=>'v','𝔳'=>'v','𝕧'=>'v','𝖛'=>'v','𝗏'=>'v','𝘃'=>'v','𝘷'=>'v','𝙫'=>'v','𝚟'=>'v','𝛎'=>'v','𝜈'=>'v','𝝂'=>'v','𝝼'=>'v','𝞶'=>'v','ⅵ'=>'vi','ⅶ'=>'vii','ⅷ'=>'viii','ɯ'=>'w','w'=>'w','𝐰'=>'w','𝑤'=>'w','𝒘'=>'w','𝓌'=>'w','𝔀'=>'w','𝔴'=>'w','𝕨'=>'w','𝖜'=>'w','𝗐'=>'w','𝘄'=>'w','𝘸'=>'w','𝙬'=>'w','𝚠'=>'w','𝑊'=>'W','𝑾'=>'W','𝒲'=>'W','𝓦'=>'W','𝔚'=>'W','𝕎'=>'W','𝖂'=>'W','𝖶'=>'W','𝗪'=>'W','𝘞'=>'W','𝙒'=>'W','𝚆'=>'W','×'=>'x','x'=>'x','ⅹ'=>'x','𝐱'=>'x','𝑥'=>'x','𝒙'=>'x','𝓍'=>'x','𝔁'=>'x','𝔵'=>'x','𝕩'=>'x','𝖝'=>'x','𝗑'=>'x','𝘅'=>'x','𝘹'=>'x','𝙭'=>'x','𝚡'=>'x','᙭'=>'X','𝑋'=>'X','𝑿'=>'X','𝒳'=>'X','𝓧'=>'X','𝔛'=>'X','𝕏'=>'X','𝖃'=>'X','𝖷'=>'X','𝗫'=>'X','𝘟'=>'X','𝙓'=>'X','𝚇'=>'X','𝚾'=>'X','𝛸'=>'X','𝜲'=>'X','𝝬'=>'X','𝞦'=>'X','ⅺ'=>'xi','ⅻ'=>'xii','y'=>'y','𝐲'=>'y','𝑦'=>'y','𝒚'=>'y','𝓎'=>'y','𝔂'=>'y','𝔶'=>'y','𝕪'=>'y','𝖞'=>'y','𝗒'=>'y','𝘆'=>'y','𝘺'=>'y','𝙮'=>'y','𝚢'=>'y','ƴ'=>'y̔','z'=>'z','𝐳'=>'z','𝑧'=>'z','𝒛'=>'z','𝓏'=>'z','𝔃'=>'z','𝔷'=>'z','𝕫'=>'z','𝖟'=>'z','𝗓'=>'z','𝘇'=>'z','𝘻'=>'z','𝙯'=>'z','𝚣'=>'z','ȥ'=>'z̡','ʐ'=>'z̢','ƶ'=>'z̵','ȝ'=>'ʒ','?'=>'ʔ','?'=>'ʔ','⁇'=>'ʔʔ','⁈'=>'ʔǃ','᾽'=>'ʼ','᾿'=>'ʼ','’'=>'ʼ','ʾ'=>'ʼ','!'=>'ǃ','!'=>'ǃ','⁉'=>'ǃʔ','‼'=>'ǃǃ','⍺'=>'α','𝛂'=>'α','𝛼'=>'α','𝜶'=>'α','𝝰'=>'α','𝞪'=>'α','𝛃'=>'β','𝛽'=>'β','𝜷'=>'β','𝝱'=>'β','𝞫'=>'β','ℽ'=>'γ','𝛄'=>'γ','𝛾'=>'γ','𝜸'=>'γ','𝝲'=>'γ','𝞬'=>'γ','𝛅'=>'δ','𝛿'=>'δ','𝜹'=>'δ','𝝳'=>'δ','𝞭'=>'δ','𝟋'=>'ϝ','𝛇'=>'ζ','𝜁'=>'ζ','𝜻'=>'ζ','𝝵'=>'ζ','𝞯'=>'ζ','⍬'=>'θ','𝛉'=>'θ','𝛝'=>'θ','𝜃'=>'θ','𝜗'=>'θ','𝜽'=>'θ','𝝑'=>'θ','𝝷'=>'θ','𝞋'=>'θ','𝞱'=>'θ','𝟅'=>'θ','𝛌'=>'λ','𝜆'=>'λ','𝝀'=>'λ','𝝺'=>'λ','𝞴'=>'λ','𝛬'=>'Λ','𝜦'=>'Λ','𝝠'=>'Λ','𝞚'=>'Λ','𝛍'=>'μ','𝜇'=>'μ','𝝁'=>'μ','𝝻'=>'μ','𝞵'=>'μ','𝛏'=>'ξ','𝜉'=>'ξ','𝝃'=>'ξ','𝝽'=>'ξ','𝞷'=>'ξ','𝛯'=>'Ξ','𝜩'=>'Ξ','𝝣'=>'Ξ','𝞝'=>'Ξ','ℼ'=>'π','𝛑'=>'π','𝛡'=>'π','𝜋'=>'π','𝜛'=>'π','𝝅'=>'π','𝝕'=>'π','𝝿'=>'π','𝞏'=>'π','𝞹'=>'π','𝟉'=>'π','ᴨ'=>'π','∏'=>'Π','𝚷'=>'Π','𝛱'=>'Π','𝜫'=>'Π','𝝥'=>'Π','𝞟'=>'Π','𝛔'=>'σ','𝜎'=>'σ','𝝈'=>'σ','𝞂'=>'σ','𝞼'=>'σ','𝛕'=>'τ','𝜏'=>'τ','𝝉'=>'τ','𝞃'=>'τ','𝞽'=>'τ','𝐘'=>'Y','𝑌'=>'Y','𝒀'=>'Y','𝒴'=>'Y','𝓨'=>'Y','𝔜'=>'Y','𝕐'=>'Y','𝖄'=>'Y','𝖸'=>'Y','𝗬'=>'Y','𝘠'=>'Y','𝙔'=>'Y','𝚈'=>'Y','𝚼'=>'Y','𝛶'=>'Y','𝜰'=>'Y','𝝪'=>'Y','𝞤'=>'Y','𝛗'=>'φ','𝛟'=>'φ','𝜑'=>'φ','𝜙'=>'φ','𝝋'=>'φ','𝝓'=>'φ','𝞅'=>'φ','𝞍'=>'φ','𝞿'=>'φ','𝟇'=>'φ','𝛷'=>'Φ','𝜱'=>'Φ','𝝫'=>'Φ','𝞥'=>'Φ','𝛘'=>'χ','𝜒'=>'χ','𝝌'=>'χ','𝞆'=>'χ','𝟀'=>'χ','𝛙'=>'ψ','𝜓'=>'ψ','𝝍'=>'ψ','𝞇'=>'ψ','𝟁'=>'ψ','𝛹'=>'Ψ','𝜳'=>'Ψ','𝝭'=>'Ψ','𝞧'=>'Ψ','⍵'=>'ω','𝛚'=>'ω','𝜔'=>'ω','𝝎'=>'ω','𝞈'=>'ω','𝟂'=>'ω','ӕ'=>'ae','ғ'=>'r̵','ґ'=>'rᑊ','җ'=>'ж̩','ҙ'=>'з̡','ӏ'=>'i','ҋ'=>'й̡','қ'=>'ĸ̩','ҟ'=>'ĸ̵','ᴫ'=>'л','ӆ'=>'л̡','ӎ'=>'м̡','ӊ'=>'н̡','ӈ'=>'н̡','ң'=>'н̩','ө'=>'o̵','ѳ'=>'o̵','ҫ'=>'c̡','ҭ'=>'т̩','ү'=>'y','ұ'=>'y̵','ћ'=>'h̵','ѽ'=>'ѡ҃','ӌ'=>'ҷ','ҿ'=>'ҽ̢','ҍ'=>'Ь̵','զ'=>'q','ռ'=>'n','ℵ'=>'א','ﬡ'=>'א','אָ'=>'אַ','אּ'=>'אַ','ﭏ'=>'אל','ℶ'=>'ב','ℷ'=>'ג','ℸ'=>'ד','ﬢ'=>'ד','ﬣ'=>'ה','ﬤ'=>'כ','ﬥ'=>'ל','ﬦ'=>'ם','ﬠ'=>'ע','ﬧ'=>'ר','ﬨ'=>'ת','ﺀ'=>'ء','ﺂ'=>'آ','ﺁ'=>'آ','ﺄ'=>'أ','ﺃ'=>'أ','ٵ'=>'أ','ﭑ'=>'ٱ','ﭐ'=>'ٱ','ﺆ'=>'ؤ','ﺅ'=>'ؤ','ٶ'=>'ؤ','ﺈ'=>'إ','ﺇ'=>'إ','ﺋ'=>'ئ','ﺌ'=>'ئ','ﺊ'=>'ئ','ﺉ'=>'ئ','ﯫ'=>'ئا','ﯪ'=>'ئا','ﯸ'=>'ئٻ','ﯷ'=>'ئٻ','ﯶ'=>'ئٻ','ﲗ'=>'ئج','ﰀ'=>'ئج','ﲘ'=>'ئح','ﰁ'=>'ئح','ﲙ'=>'ئخ','ﱤ'=>'ئر','ﱥ'=>'ئز','ﲚ'=>'ئم','ﳟ'=>'ئم','ﱦ'=>'ئم','ﰂ'=>'ئم','ﱧ'=>'ئن','ﲛ'=>'ئه','ﳠ'=>'ئه','ﯭ'=>'ئه','ﯬ'=>'ئه','ﯯ'=>'ئو','ﯮ'=>'ئو','ﯳ'=>'ئۆ','ﯲ'=>'ئۆ','ﯱ'=>'ئۇ','ﯰ'=>'ئۇ','ﯵ'=>'ئۈ','ﯴ'=>'ئۈ','ﯻ'=>'ئى','ﯺ'=>'ئى','ﱨ'=>'ئى','ﯹ'=>'ئى','ﰃ'=>'ئى','ﱩ'=>'ئى','ﰄ'=>'ئى','ﺎ'=>'ا','ﺍ'=>'ا','ﴼ'=>'اً','ﴽ'=>'اً','ﷳ'=>'اكبر','ﷲ'=>'الله','ﺑ'=>'ب','ﺒ'=>'ب','ﺐ'=>'ب','ﺏ'=>'ب','ﲜ'=>'بج','ﰅ'=>'بج','ﲝ'=>'بح','ﰆ'=>'بح','ﷂ'=>'بحى','ﲞ'=>'بخ','ﰇ'=>'بخ','ﶞ'=>'بخى','ﱪ'=>'بر','ﱫ'=>'بز','ﲟ'=>'بم','ﳡ'=>'بم','ﱬ'=>'بم','ﰈ'=>'بم','ﱭ'=>'بن','ﲠ'=>'به','ﳢ'=>'به','ﱮ'=>'بى','ﰉ'=>'بى','ﱯ'=>'بى','ﰊ'=>'بى','ﭔ'=>'ٻ','ﭕ'=>'ٻ','ﭓ'=>'ٻ','ﭒ'=>'ٻ','ې'=>'ٻ','ﯦ'=>'ٻ','ﯧ'=>'ٻ','ﯥ'=>'ٻ','ﯤ'=>'ٻ','ﭘ'=>'پ','ﭙ'=>'پ','ﭗ'=>'پ','ﭖ'=>'پ','ﭜ'=>'ڀ','ﭝ'=>'ڀ','ﭛ'=>'ڀ','ﭚ'=>'ڀ','ﺔ'=>'ة','ﺓ'=>'ة','ﺗ'=>'ت','ﺘ'=>'ت','ﺖ'=>'ت','ﺕ'=>'ت','ﲡ'=>'تج','ﰋ'=>'تج','ﵐ'=>'تجم','ﶠ'=>'تجى','ﶟ'=>'تجى','ﲢ'=>'تح','ﰌ'=>'تح','ﵒ'=>'تحج','ﵑ'=>'تحج','ﵓ'=>'تحم','ﲣ'=>'تخ','ﰍ'=>'تخ','ﵔ'=>'تخم','ﶢ'=>'تخى','ﶡ'=>'تخى','ﱰ'=>'تر','ﱱ'=>'تز','ﲤ'=>'تم','ﳣ'=>'تم','ﱲ'=>'تم','ﰎ'=>'تم','ﵕ'=>'تمج','ﵖ'=>'تمح','ﵗ'=>'تمخ','ﶤ'=>'تمى','ﶣ'=>'تمى','ﱳ'=>'تن','ﲥ'=>'ته','ﳤ'=>'ته','ﱴ'=>'تى','ﰏ'=>'تى','ﱵ'=>'تى','ﰐ'=>'تى','ﺛ'=>'ث','ﺜ'=>'ث','ﺚ'=>'ث','ﺙ'=>'ث','ﰑ'=>'ثج','ﱶ'=>'ثر','ﱷ'=>'ثز','ﲦ'=>'ثم','ﳥ'=>'ثم','ﱸ'=>'ثم','ﰒ'=>'ثم','ﱹ'=>'ثن','ﳦ'=>'ثه','ﱺ'=>'ثى','ﰓ'=>'ثى','ﱻ'=>'ثى','ﰔ'=>'ثى','ﭨ'=>'ٹ','ﭩ'=>'ٹ','ﭧ'=>'ٹ','ﭦ'=>'ٹ','ڻ'=>'ٹ','ﮢ'=>'ٹ','ﮣ'=>'ٹ','ﮡ'=>'ٹ','ﮠ'=>'ٹ','ﭠ'=>'ٺ','ﭡ'=>'ٺ','ﭟ'=>'ٺ','ﭞ'=>'ٺ','ﭤ'=>'ٿ','ﭥ'=>'ٿ','ﭣ'=>'ٿ','ﭢ'=>'ٿ','ﺟ'=>'ج','ﺠ'=>'ج','ﺞ'=>'ج','ﺝ'=>'ج','ﲧ'=>'جح','ﰕ'=>'جح','ﶦ'=>'جحى','ﶾ'=>'جحى','ﷻ'=>'جل جلاله','ﲨ'=>'جم','ﰖ'=>'جم','ﵙ'=>'جمح','ﵘ'=>'جمح','ﶧ'=>'جمى','ﶥ'=>'جمى','ﴝ'=>'جى','ﴁ'=>'جى','ﴞ'=>'جى','ﴂ'=>'جى','ﭸ'=>'ڃ','ﭹ'=>'ڃ','ﭷ'=>'ڃ','ﭶ'=>'ڃ','ﭴ'=>'ڄ','ﭵ'=>'ڄ','ﭳ'=>'ڄ','ﭲ'=>'ڄ','ﭼ'=>'چ','ﭽ'=>'چ','ﭻ'=>'چ','ﭺ'=>'چ','ﮀ'=>'ڇ','ﮁ'=>'ڇ','ﭿ'=>'ڇ','ﭾ'=>'ڇ','ﺣ'=>'ح','ﺤ'=>'ح','ﺢ'=>'ح','ﺡ'=>'ح','ﲩ'=>'حج','ﰗ'=>'حج','ﶿ'=>'حجى','ﲪ'=>'حم','ﰘ'=>'حم','ﵛ'=>'حمى','ﵚ'=>'حمى','ﴛ'=>'حى','ﳿ'=>'حى','ﴜ'=>'حى','ﴀ'=>'حى','ﺧ'=>'خ','ﺨ'=>'خ','ﺦ'=>'خ','ﺥ'=>'خ','ﲫ'=>'خج','ﰙ'=>'خج','ﰚ'=>'خح','ﲬ'=>'خم','ﰛ'=>'خم','ﴟ'=>'خى','ﴃ'=>'خى','ﴠ'=>'خى','ﴄ'=>'خى','ﺪ'=>'د','ﺩ'=>'د','ﺬ'=>'ذ','ﺫ'=>'ذ','ﱛ'=>'ذٰ','ﮉ'=>'ڈ','ﮈ'=>'ڈ','ﮅ'=>'ڌ','ﮄ'=>'ڌ','ﮃ'=>'ڍ','ﮂ'=>'ڍ','ﮇ'=>'ڎ','ﮆ'=>'ڎ','ﺮ'=>'ر','ﺭ'=>'ر','ﱜ'=>'رٰ','ﷶ'=>'رسول','﷼'=>'رىال','ﺰ'=>'ز','ﺯ'=>'ز','ﮍ'=>'ڑ','ﮌ'=>'ڑ','ﮋ'=>'ژ','ﮊ'=>'ژ','ﺳ'=>'س','ﺴ'=>'س','ﺲ'=>'س','ﺱ'=>'س','ﲭ'=>'سج','ﴴ'=>'سج','ﰜ'=>'سج','ﵝ'=>'سجح','ﵞ'=>'سجى','ﲮ'=>'سح','ﴵ'=>'سح','ﰝ'=>'سح','ﵜ'=>'سحج','ﲯ'=>'سخ','ﴶ'=>'سخ','ﰞ'=>'سخ','ﶨ'=>'سخى','ﷆ'=>'سخى','ﴪ'=>'سر','ﴎ'=>'سر','ﲰ'=>'سم','ﳧ'=>'سم','ﰟ'=>'سم','ﵡ'=>'سمج','ﵠ'=>'سمح','ﵟ'=>'سمح','ﵣ'=>'سمم','ﵢ'=>'سمم','ﴱ'=>'سه','ﳨ'=>'سه','ﴗ'=>'سى','ﳻ'=>'سى','ﴘ'=>'سى','ﳼ'=>'سى','ﺷ'=>'ش','ﺸ'=>'ش','ﺶ'=>'ش','ﺵ'=>'ش','ﴭ'=>'شج','ﴷ'=>'شج','ﴥ'=>'شج','ﴉ'=>'شج','ﵩ'=>'شجى','ﴮ'=>'شح','ﴸ'=>'شح','ﴦ'=>'شح','ﴊ'=>'شح','ﵨ'=>'شحم','ﵧ'=>'شحم','ﶪ'=>'شحى','ﴯ'=>'شخ','ﴹ'=>'شخ','ﴧ'=>'شخ','ﴋ'=>'شخ','ﴩ'=>'شر','ﴍ'=>'شر','ﴰ'=>'شم','ﳩ'=>'شم','ﴨ'=>'شم','ﴌ'=>'شم','ﵫ'=>'شمخ','ﵪ'=>'شمخ','ﵭ'=>'شمم','ﵬ'=>'شمم','ﴲ'=>'شه','ﳪ'=>'شه','ﴙ'=>'شى','ﳽ'=>'شى','ﴚ'=>'شى','ﳾ'=>'شى','ﺻ'=>'ص','ﺼ'=>'ص','ﺺ'=>'ص','ﺹ'=>'ص','ﲱ'=>'صح','ﰠ'=>'صح','ﵥ'=>'صحح','ﵤ'=>'صحح','ﶩ'=>'صحى','ﲲ'=>'صخ','ﴫ'=>'صر','ﴏ'=>'صر','ﷵ'=>'صلعم','ﷹ'=>'صلى','ﷺ'=>'صلى الله علىه وسلم','ﷰ'=>'صلے','ﲳ'=>'صم','ﰡ'=>'صم','ﷅ'=>'صمم','ﵦ'=>'صمم','ﴡ'=>'صى','ﴅ'=>'صى','ﴢ'=>'صى','ﴆ'=>'صى','ﺿ'=>'ض','ﻀ'=>'ض','ﺾ'=>'ض','ﺽ'=>'ض','ﲴ'=>'ضج','ﰢ'=>'ضج','ﲵ'=>'ضح','ﰣ'=>'ضح','ﵮ'=>'ضحى','ﶫ'=>'ضحى','ﲶ'=>'ضخ','ﰤ'=>'ضخ','ﵰ'=>'ضخم','ﵯ'=>'ضخم','ﴬ'=>'ضر','ﴐ'=>'ضر','ﲷ'=>'ضم','ﰥ'=>'ضم','ﴣ'=>'ضى','ﴇ'=>'ضى','ﴤ'=>'ضى','ﴈ'=>'ضى','ﻃ'=>'ط','ﻄ'=>'ط','ﻂ'=>'ط','ﻁ'=>'ط','ﲸ'=>'طح','ﰦ'=>'طح','ﴳ'=>'طم','ﴺ'=>'طم','ﰧ'=>'طم','ﵲ'=>'طمح','ﵱ'=>'طمح','ﵳ'=>'طمم','ﵴ'=>'طمى','ﴑ'=>'طى','ﳵ'=>'طى','ﴒ'=>'طى','ﳶ'=>'طى','ﻇ'=>'ظ','ﻈ'=>'ظ','ﻆ'=>'ظ','ﻅ'=>'ظ','ﲹ'=>'ظم','ﴻ'=>'ظم','ﰨ'=>'ظم','ﻋ'=>'ع','ﻌ'=>'ع','ﻊ'=>'ع','ﻉ'=>'ع','ﲺ'=>'عج','ﰩ'=>'عج','ﷄ'=>'عجم','ﵵ'=>'عجم','ﷷ'=>'علىه','ﲻ'=>'عم','ﰪ'=>'عم','ﵷ'=>'عمم','ﵶ'=>'عمم','ﵸ'=>'عمى','ﶶ'=>'عمى','ﴓ'=>'عى','ﳷ'=>'عى','ﴔ'=>'عى','ﳸ'=>'عى','ﻏ'=>'غ','ﻐ'=>'غ','ﻎ'=>'غ','ﻍ'=>'غ','ﲼ'=>'غج','ﰫ'=>'غج','ﲽ'=>'غم','ﰬ'=>'غم','ﵹ'=>'غمم','ﵻ'=>'غمى','ﵺ'=>'غمى','ﴕ'=>'غى','ﳹ'=>'غى','ﴖ'=>'غى','ﳺ'=>'غى','ﻓ'=>'ف','ﻔ'=>'ف','ﻒ'=>'ف','ﻑ'=>'ف','ﲾ'=>'فج','ﰭ'=>'فج','ﲿ'=>'فح','ﰮ'=>'فح','ﳀ'=>'فخ','ﰯ'=>'فخ','ﵽ'=>'فخم','ﵼ'=>'فخم','ﳁ'=>'فم','ﰰ'=>'فم','ﷁ'=>'فمى','ﱼ'=>'فى','ﰱ'=>'فى','ﱽ'=>'فى','ﰲ'=>'فى','ﭬ'=>'ڤ','ﭭ'=>'ڤ','ﭫ'=>'ڤ','ﭪ'=>'ڤ','ﭰ'=>'ڦ','ﭱ'=>'ڦ','ﭯ'=>'ڦ','ﭮ'=>'ڦ','ﻗ'=>'ق','ﻘ'=>'ق','ﻖ'=>'ق','ﻕ'=>'ق','ﳂ'=>'قح','ﰳ'=>'قح','ﷱ'=>'قلے','ﳃ'=>'قم','ﰴ'=>'قم','ﶴ'=>'قمح','ﵾ'=>'قمح','ﵿ'=>'قمم','ﶲ'=>'قمى','ﱾ'=>'قى','ﰵ'=>'قى','ﱿ'=>'قى','ﰶ'=>'قى','ﻛ'=>'ك','ﻜ'=>'ك','ﻚ'=>'ك','ﻙ'=>'ك','ک'=>'ك','ﮐ'=>'ك','ﮑ'=>'ك','ﮏ'=>'ك','ﮎ'=>'ك','ﲀ'=>'كا','ﰷ'=>'كا','ﳄ'=>'كج','ﰸ'=>'كج','ﳅ'=>'كح','ﰹ'=>'كح','ﳆ'=>'كخ','ﰺ'=>'كخ','ﳇ'=>'كل','ﳫ'=>'كل','ﲁ'=>'كل','ﰻ'=>'كل','ﳈ'=>'كم','ﳬ'=>'كم','ﲂ'=>'كم','ﰼ'=>'كم','ﷃ'=>'كمم','ﶻ'=>'كمم','ﶷ'=>'كمى','ﲃ'=>'كى','ﰽ'=>'كى','ﲄ'=>'كى','ﰾ'=>'كى','ﯕ'=>'ڭ','ﯖ'=>'ڭ','ﯔ'=>'ڭ','ﯓ'=>'ڭ','ﮔ'=>'گ','ﮕ'=>'گ','ﮓ'=>'گ','ﮒ'=>'گ','ﮜ'=>'ڱ','ﮝ'=>'ڱ','ﮛ'=>'ڱ','ﮚ'=>'ڱ','ﮘ'=>'ڳ','ﮙ'=>'ڳ','ﮗ'=>'ڳ','ﮖ'=>'ڳ','ﻟ'=>'ل','ﻠ'=>'ل','ﻞ'=>'ل','ﻝ'=>'ل','ﻶ'=>'لآ','ﻵ'=>'لآ','ﻸ'=>'لأ','ﻷ'=>'لأ','ﻺ'=>'لإ','ﻹ'=>'لإ','ﻼ'=>'لا','ﻻ'=>'لا','ﳉ'=>'لج','ﰿ'=>'لج','ﶃ'=>'لجج','ﶄ'=>'لجج','ﶺ'=>'لجم','ﶼ'=>'لجم','ﶬ'=>'لجى','ﳊ'=>'لح','ﱀ'=>'لح','ﶵ'=>'لحم','ﶀ'=>'لحم','ﶂ'=>'لحى','ﶁ'=>'لحى','ﳋ'=>'لخ','ﱁ'=>'لخ','ﶆ'=>'لخم','ﶅ'=>'لخم','ﳌ'=>'لم','ﳭ'=>'لم','ﲅ'=>'لم','ﱂ'=>'لم','ﶈ'=>'لمح','ﶇ'=>'لمح','ﶭ'=>'لمى','ﳍ'=>'له','ﲆ'=>'لى','ﱃ'=>'لى','ﲇ'=>'لى','ﱄ'=>'لى','ﻣ'=>'م','ﻤ'=>'م','ﻢ'=>'م','ﻡ'=>'م','ﲈ'=>'ما','ﳎ'=>'مج','ﱅ'=>'مج','ﶌ'=>'مجح','ﶒ'=>'مجخ','ﶍ'=>'مجم','ﷀ'=>'مجى','ﳏ'=>'مح','ﱆ'=>'مح','ﶉ'=>'محج','ﶊ'=>'محم','ﷴ'=>'محمد','ﶋ'=>'محى','ﳐ'=>'مخ','ﱇ'=>'مخ','ﶎ'=>'مخج','ﶏ'=>'مخم','ﶹ'=>'مخى','ﳑ'=>'مم','ﲉ'=>'مم','ﱈ'=>'مم','ﶱ'=>'ممى','ﱉ'=>'مى','ﱊ'=>'مى','ﻧ'=>'ن','ﻨ'=>'ن','ﻦ'=>'ن','ﻥ'=>'ن','ﳒ'=>'نج','ﱋ'=>'نج','ﶸ'=>'نجح','ﶽ'=>'نجح','ﶘ'=>'نجم','ﶗ'=>'نجم','ﶙ'=>'نجى','ﷇ'=>'نجى','ﳓ'=>'نح','ﱌ'=>'نح','ﶕ'=>'نحم','ﶖ'=>'نحى','ﶳ'=>'نحى','ﳔ'=>'نخ','ﱍ'=>'نخ','ﲊ'=>'نر','ﲋ'=>'نز','ﳕ'=>'نم','ﳮ'=>'نم','ﲌ'=>'نم','ﱎ'=>'نم','ﶛ'=>'نمى','ﶚ'=>'نمى','ﲍ'=>'نن','ﳖ'=>'نه','ﳯ'=>'نه','ﲎ'=>'نى','ﱏ'=>'نى','ﲏ'=>'نى','ﱐ'=>'نى','ﮟ'=>'ں','ﮞ'=>'ں','ﻫ'=>'ه','ﻬ'=>'ه','ﻪ'=>'ه','ﻩ'=>'ه','ھ'=>'ه','ﮬ'=>'ه','ﮭ'=>'ه','ﮫ'=>'ه','ﮪ'=>'ه','ہ'=>'ه','ﮨ'=>'ه','ﮩ'=>'ه','ﮧ'=>'ه','ﮦ'=>'ه','ە'=>'ه','ﳙ'=>'هٰ','ﳗ'=>'هج','ﱑ'=>'هج','ﳘ'=>'هم','ﱒ'=>'هم','ﶓ'=>'همج','ﶔ'=>'همم','ﱓ'=>'هى','ﱔ'=>'هى','ﮥ'=>'ۀ','ﮤ'=>'ۀ','ﻮ'=>'و','ﻭ'=>'و','ﷸ'=>'وسلم','ﯡ'=>'ۅ','ﯠ'=>'ۅ','ﯚ'=>'ۆ','ﯙ'=>'ۆ','ﯘ'=>'ۇ','ﯗ'=>'ۇ','ٷ'=>'ۇٔ','ﯝ'=>'ۇٔ','ﯜ'=>'ۈ','ﯛ'=>'ۈ','ﯣ'=>'ۉ','ﯢ'=>'ۉ','ﯟ'=>'ۋ','ﯞ'=>'ۋ','ﯨ'=>'ى','ﯩ'=>'ى','ﻰ'=>'ى','ﻯ'=>'ى','ي'=>'ى','ﻳ'=>'ى','ﻴ'=>'ى','ﻲ'=>'ى','ﻱ'=>'ى','ی'=>'ى','ﯾ'=>'ى','ﯿ'=>'ى','ﯽ'=>'ى','ﯼ'=>'ى','ٸ'=>'ىٔ','ﲐ'=>'ىٰ','ﱝ'=>'ىٰ','ﳚ'=>'ىج','ﱕ'=>'ىج','ﶯ'=>'ىجى','ﳛ'=>'ىح','ﱖ'=>'ىح','ﶮ'=>'ىحى','ﳜ'=>'ىخ','ﱗ'=>'ىخ','ﲑ'=>'ىر','ﲒ'=>'ىز','ﳝ'=>'ىم','ﳰ'=>'ىم','ﲓ'=>'ىم','ﱘ'=>'ىم','ﶝ'=>'ىمم','ﶜ'=>'ىمم','ﶰ'=>'ىمى','ﲔ'=>'ىن','ﳞ'=>'ىه','ﳱ'=>'ىه','ﲕ'=>'ىى','ﱙ'=>'ىى','ﲖ'=>'ىى','ﱚ'=>'ىى','ۧ'=>'ۦ','ﮯ'=>'ے','ﮮ'=>'ے','ﮱ'=>'ۓ','ﮰ'=>'ۓ','∃'=>'ⴺ','आ'=>'अा','ऒ'=>'अाॆ','ओ'=>'अाे','औ'=>'अाै','ऄ'=>'अॆ','ऑ'=>'अॉ','ऍ'=>'एॅ','ऎ'=>'एॆ','ऐ'=>'एे','ई'=>'र्इ','আ'=>'অা','ৠ'=>'ঋৃ','ৡ'=>'ঌৢ','ਉ'=>'ੳੁ','ਊ'=>'ੳੂ','ਆ'=>'ਅਾ','ਐ'=>'ਅੈ','ਔ'=>'ਅੌ','ਇ'=>'ੲਿ','ਈ'=>'ੲੀ','ਏ'=>'ੲੇ','આ'=>'અા','ઑ'=>'અાૅ','ઓ'=>'અાે','ઔ'=>'અાૈ','ઍ'=>'અૅ','એ'=>'અે','ઐ'=>'અૈ','ଆ'=>'ଅା','௮'=>'அ','ர'=>'ஈ','ா'=>'ஈ','௫'=>'ஈு','௨'=>'உ','ஊ'=>'உள','௭'=>'எ','௷'=>'எவ','ஜ'=>'ஐ','௧'=>'க','௪'=>'ச','௬'=>'சு','௲'=>'சூ','௺'=>'நீ','ை'=>'ன','௴'=>'மீ','௰'=>'ய','ௗ'=>'ள','௸'=>'ஷ','ொ'=>'ெஈ','ௌ'=>'ெள','ோ'=>'ேஈ','ౠ'=>'ఋా','ౡ'=>'ఌా','ఔ'=>'ఒౌ','ఓ'=>'ఒౕ','ఢ'=>'డ̣','భ'=>'బ̣','ష'=>'వ̣','హ'=>'వా','మ'=>'వు','ూ'=>'ుా','ౄ'=>'ృా','ೡ'=>'ಌಾ','ಔ'=>'ఒౌ','ഈ'=>'ഇൗ','ഊ'=>'உൗ','ഐ'=>'എെ','ഓ'=>'ഒാ','ഔ'=>'ഒൗ','ൡ'=>'ഞ','൫'=>'ദ്ര','ഌ'=>'നூ','ങ'=>'നூ','൯'=>'ന്','റ'=>'ര','൪'=>'ര്','൮'=>'വ്','ീ'=>'ி','ൂ'=>'ூ','ൃ'=>'ூ','ൈ'=>'െെ','ฃ'=>'ข','ด'=>'ค','ต'=>'ค','ม'=>'ฆ','ซ'=>'ช','ฏ'=>'ฎ','ท'=>'ฑ','ๅ'=>'า','ำ'=>'̊า','แ'=>'เเ','ໜ'=>'ຫນ','ໝ'=>'ຫມ','ຳ'=>'̊າ','ཷ'=>'ྲཱྀ','ཹ'=>'ླཱྀ','၀'=>'o','ឣ'=>'អ','᧐'=>'ᦞ','᭒'=>'ᬍ','᭓'=>'ᬑ','᭘'=>'ᬨ','ᢖ'=>'ᡜ','ᡕ'=>'ᠵ','Ꮢ'=>'Ꭱ','Ꮍ'=>'y','𝐀'=>'A','𝐴'=>'A','𝑨'=>'A','𝒜'=>'A','𝓐'=>'A','𝔄'=>'A','𝔸'=>'A','𝕬'=>'A','𝖠'=>'A','𝗔'=>'A','𝘈'=>'A','𝘼'=>'A','𝙰'=>'A','𝚨'=>'A','𝛢'=>'A','𝜜'=>'A','𝝖'=>'A','𝞐'=>'A','𝐉'=>'J','𝐽'=>'J','𝑱'=>'J','𝒥'=>'J','𝓙'=>'J','𝔍'=>'J','𝕁'=>'J','𝕵'=>'J','𝖩'=>'J','𝗝'=>'J','𝘑'=>'J','𝙅'=>'J','𝙹'=>'J','Ꮷ'=>'J','⋿'=>'E','ℰ'=>'E','𝐄'=>'E','𝐸'=>'E','𝑬'=>'E','𝓔'=>'E','𝔈'=>'E','𝔼'=>'E','𝕰'=>'E','𝖤'=>'E','𝗘'=>'E','𝘌'=>'E','𝙀'=>'E','𝙴'=>'E','𝚬'=>'E','𝛦'=>'E','𝜠'=>'E','𝝚'=>'E','𝞔'=>'E','ℾ'=>'Ꮁ','𝚪'=>'Ꮁ','𝛤'=>'Ꮁ','𝜞'=>'Ꮁ','𝝘'=>'Ꮁ','𝞒'=>'Ꮁ','Ꮤ'=>'w','ℳ'=>'M','𝐌'=>'M','𝑀'=>'M','𝑴'=>'M','𝓜'=>'M','𝔐'=>'M','𝕄'=>'M','𝕸'=>'M','𝖬'=>'M','𝗠'=>'M','𝘔'=>'M','𝙈'=>'M','𝙼'=>'M','𝚳'=>'M','𝛭'=>'M','𝜧'=>'M','𝝡'=>'M','𝞛'=>'M','ℋ'=>'H','ℌ'=>'H','ℍ'=>'H','𝐇'=>'H','𝐻'=>'H','𝑯'=>'H','𝓗'=>'H','𝕳'=>'H','𝖧'=>'H','𝗛'=>'H','𝘏'=>'H','𝙃'=>'H','𝙷'=>'H','𝚮'=>'H','𝛨'=>'H','𝜢'=>'H','𝝜'=>'H','𝞖'=>'H','𝐆'=>'G','𝐺'=>'G','𝑮'=>'G','𝒢'=>'G','𝓖'=>'G','𝔊'=>'G','𝔾'=>'G','𝕲'=>'G','𝖦'=>'G','𝗚'=>'G','𝘎'=>'G','𝙂'=>'G','𝙶'=>'G','Ᏻ'=>'G','ℤ'=>'Z','ℨ'=>'Z','𝐙'=>'Z','𝑍'=>'Z','𝒁'=>'Z','𝒵'=>'Z','𝓩'=>'Z','𝖅'=>'Z','𝖹'=>'Z','𝗭'=>'Z','𝘡'=>'Z','𝙕'=>'Z','𝚉'=>'Z','𝚭'=>'Z','𝛧'=>'Z','𝜡'=>'Z','𝝛'=>'Z','𝞕'=>'Z','𝐒'=>'S','𝑆'=>'S','𝑺'=>'S','𝒮'=>'S','𝓢'=>'S','𝔖'=>'S','𝕊'=>'S','𝕾'=>'S','𝖲'=>'S','𝗦'=>'S','𝘚'=>'S','𝙎'=>'S','𝚂'=>'S','Ꮪ'=>'S','𝐕'=>'V','𝑉'=>'V','𝑽'=>'V','𝒱'=>'V','𝓥'=>'V','𝔙'=>'V','𝕍'=>'V','𝖁'=>'V','𝖵'=>'V','𝗩'=>'V','𝘝'=>'V','𝙑'=>'V','𝚅'=>'V','ℒ'=>'L','𝐋'=>'L','𝐿'=>'L','𝑳'=>'L','𝓛'=>'L','𝔏'=>'L','𝕃'=>'L','𝕷'=>'L','𝖫'=>'L','𝗟'=>'L','𝘓'=>'L','𝙇'=>'L','𝙻'=>'L','∑'=>'C','⅀'=>'C','ℂ'=>'C','ℭ'=>'C','𝐂'=>'C','𝐶'=>'C','𝑪'=>'C','𝒞'=>'C','𝓒'=>'C','𝕮'=>'C','𝖢'=>'C','𝗖'=>'C','𝘊'=>'C','𝘾'=>'C','𝙲'=>'C','𝚺'=>'C','𝛴'=>'C','𝜮'=>'C','𝝨'=>'C','𝞢'=>'C','ℙ'=>'P','𝐏'=>'P','𝑃'=>'P','𝑷'=>'P','𝒫'=>'P','𝓟'=>'P','𝔓'=>'P','𝕻'=>'P','𝖯'=>'P','𝗣'=>'P','𝘗'=>'P','𝙋'=>'P','𝙿'=>'P','𝚸'=>'P','𝛲'=>'P','𝜬'=>'P','𝝦'=>'P','𝞠'=>'P','𝐊'=>'K','𝐾'=>'K','𝑲'=>'K','𝒦'=>'K','𝓚'=>'K','𝔎'=>'K','𝕂'=>'K','𝕶'=>'K','𝖪'=>'K','𝗞'=>'K','𝘒'=>'K','𝙆'=>'K','𝙺'=>'K','𝚱'=>'K','𝛫'=>'K','𝜥'=>'K','𝝟'=>'K','𝞙'=>'K','ℬ'=>'B','𝐁'=>'B','𝐵'=>'B','𝑩'=>'B','𝓑'=>'B','𝔅'=>'B','𝔹'=>'B','𝕭'=>'B','𝖡'=>'B','𝗕'=>'B','𝘉'=>'B','𝘽'=>'B','𝙱'=>'B','𝚩'=>'B','𝛣'=>'B','𝜝'=>'B','𝝗'=>'B','𝞑'=>'B','ᐍ'=>'ᐁ·','∆'=>'ᐃ','𝚫'=>'ᐃ','𝛥'=>'ᐃ','𝜟'=>'ᐃ','𝝙'=>'ᐃ','𝞓'=>'ᐃ','ᐏ'=>'ᐃ·','ᐑ'=>'ᐄ·','ᐓ'=>'ᐅ·','ᐕ'=>'ᐆ·','ᐘ'=>'ᐊ·','ᐚ'=>'ᐋ·','ᓑ'=>'ᐡ','ᑶ'=>'·P','ᑺ'=>'·d','ᒘ'=>'·J','ᑁ'=>'ᐳ·','ᑃ'=>'ᐴ·','ᑅ'=>'ᐸ·','ᑇ'=>'ᐹ·','ˈ'=>'ᑊ','ᑘ'=>'ᑌ·','ᑧ'=>'ᑌᑊ','ᑚ'=>'ᑎ·','ᑨ'=>'ᑎᑊ','ᑜ'=>'ᑏ·','ᑞ'=>'ᑐ·','ᑩ'=>'ᑐᑊ','ᑠ'=>'ᑑ·','ᑢ'=>'ᑕ·','ᑪ'=>'ᑕᑊ','ᑤ'=>'ᑖ·','ᑵ'=>'ᑫ·','ᒅ'=>'ᑫᑊ','ᑷ'=>'P·','ᒆ'=>'Pᑊ','ᑹ'=>'ᑮ·','ᑻ'=>'d·','ᒇ'=>'dᑊ','ᑽ'=>'ᑰ·','ᑿ'=>'ᑲ·','ᒈ'=>'ᑲᑊ','ᒁ'=>'ᑳ·','ᘃ'=>'ᒉ','ᒓ'=>'ᒉ·','ᒕ'=>'ᒋ·','ᒗ'=>'ᒌ·','ᒙ'=>'J·','ᒛ'=>'ᒎ·','ᘂ'=>'ᒐ','ᒝ'=>'ᒐ·','ᒟ'=>'ᒑ·','ᒭ'=>'ᒣ·','ᒯ'=>'ᒥ·','ᒱ'=>'ᒦ·','ᒳ'=>'ᒧ·','ᒵ'=>'ᒨ·','ᒹ'=>'ᒫ·','ᓊ'=>'ᓀ·','ᓌ'=>'ᓇ·','ᓎ'=>'ᓈᒫ','ᘄ'=>'ᓓ','ᓝ'=>'ᓓ·','ᓟ'=>'ᓕ·','ᓡ'=>'ᓖ·','ᓣ'=>'ᓗ·','ᓥ'=>'ᓘ·','ᘇ'=>'ᓚ','ᓧ'=>'ᓚ·','ᓩ'=>'ᓛ·','ᓷ'=>'ᓭ·','ᓹ'=>'ᓯ·','ᓻ'=>'ᓰ·','ᓽ'=>'ᓱ·','ᓿ'=>'ᓲ·','ᔁ'=>'ᓴ·','ᔃ'=>'ᓵ·','ᔌ'=>'ᔋᐸ','ᔍ'=>'ᔋᑕ','ᔎ'=>'ᔋᑲ','ᔏ'=>'ᔋᒐ','ᔘ'=>'ᔐ·','ᔚ'=>'ᔑ·','ᔜ'=>'ᔒ·','ᔞ'=>'ᔓ·','ᔠ'=>'ᔔ·','ᔢ'=>'ᔕ·','ᔤ'=>'ᔖ·','ᔲ'=>'ᔨ·','ᔴ'=>'ᔩ·','ᔶ'=>'ᔪ·','ᔸ'=>'ᔫ·','ᔺ'=>'ᔭ·','ᔼ'=>'ᔮ·','᙮'=>'x','ᕽ'=>'x','ᘢ'=>'ᕃ','ᘣ'=>'ᕆ','ᘤ'=>'ᕊ','ᕏ'=>'ᕌ·','ᙯ'=>'ᕐᑫ','ᕾ'=>'ᕐᑬ','ᕿ'=>'ᕐP','ᖀ'=>'ᕐᑮ','ᖁ'=>'ᕐd','ᖂ'=>'ᕐᑰ','ᖃ'=>'ᕐᑲ','ᖄ'=>'ᕐᑳ','ᖅ'=>'ᕐᒃ','ᕜ'=>'ᕚ·','ᕩ'=>'ᕧ·','ℛ'=>'R','ℜ'=>'R','ℝ'=>'R','𝐑'=>'R','𝑅'=>'R','𝑹'=>'R','𝓡'=>'R','𝕽'=>'R','𝖱'=>'R','𝗥'=>'R','𝘙'=>'R','𝙍'=>'R','𝚁'=>'R','ᙰ'=>'ᖕᒉ','ᖎ'=>'ᖕᒊ','ᖏ'=>'ᖕᒋ','ᖐ'=>'ᖕᒌ','ᖑ'=>'ᖕJ','ᖒ'=>'ᖕᒎ','ᖓ'=>'ᖕᒐ','ᖔ'=>'ᖕᒑ','ᙱ'=>'ᖖᒋ','ᙲ'=>'ᖖᒌ','ᙳ'=>'ᖖJ','ᙴ'=>'ᖖᒎ','ᙵ'=>'ᖖᒐ','ᙶ'=>'ᖖᒑ','ℱ'=>'F','𝐅'=>'F','𝐹'=>'F','𝑭'=>'F','𝓕'=>'F','𝔉'=>'F','𝔽'=>'F','𝕱'=>'F','𝖥'=>'F','𝗙'=>'F','𝘍'=>'F','𝙁'=>'F','𝙵'=>'F','𝟊'=>'F','ⅅ'=>'D','𝐃'=>'D','𝐷'=>'D','𝑫'=>'D','𝒟'=>'D','𝓓'=>'D','𝔇'=>'D','𝔻'=>'D','𝕯'=>'D','𝖣'=>'D','𝗗'=>'D','𝘋'=>'D','𝘿'=>'D','𝙳'=>'D','ᗪ'=>'D','℧'=>'ᘮ','ᘴ'=>'ᘮ','𝛀'=>'ᘯ','𝛺'=>'ᘯ','𝜴'=>'ᘯ','𝝮'=>'ᘯ','𝞨'=>'ᘯ','ᘵ'=>'ᘯ','ㄱ'=>'ᄀ','ᄀ'=>'ᄀ','ᆨ'=>'ᄀ','ㄲ'=>'ᄁ','ᄁ'=>'ᄁ','ᆩ'=>'ᄁ','ㄴ'=>'ᄂ','ᄂ'=>'ᄂ','ᆫ'=>'ᄂ','ㄷ'=>'ᄃ','ᄃ'=>'ᄃ','ᆮ'=>'ᄃ','ㄸ'=>'ᄄ','ᄄ'=>'ᄄ','ㄹ'=>'ᄅ','ᄅ'=>'ᄅ','ᆯ'=>'ᄅ','ㅁ'=>'ᄆ','ᄆ'=>'ᄆ','ᆷ'=>'ᄆ','ㅂ'=>'ᄇ','ᄇ'=>'ᄇ','ᆸ'=>'ᄇ','ㅃ'=>'ᄈ','ᄈ'=>'ᄈ','ㅅ'=>'ᄉ','ᄉ'=>'ᄉ','ᆺ'=>'ᄉ','ㅆ'=>'ᄊ','ᄊ'=>'ᄊ','ᆻ'=>'ᄊ','ㅇ'=>'ᄋ','ᄋ'=>'ᄋ','ᆼ'=>'ᄋ','ㅈ'=>'ᄌ','ᄌ'=>'ᄌ','ᆽ'=>'ᄌ','ㅉ'=>'ᄍ','ᄍ'=>'ᄍ','ㅊ'=>'ᄎ','ᄎ'=>'ᄎ','ᆾ'=>'ᄎ','ㅋ'=>'ᄏ','ᄏ'=>'ᄏ','ᆿ'=>'ᄏ','ㅌ'=>'ᄐ','ᄐ'=>'ᄐ','ᇀ'=>'ᄐ','ㅍ'=>'ᄑ','ᄑ'=>'ᄑ','ᇁ'=>'ᄑ','ㅎ'=>'ᄒ','ᄒ'=>'ᄒ','ᇂ'=>'ᄒ','ᇅ'=>'ᄓ','ㅥ'=>'ᄔ','ㅦ'=>'ᄕ','ᇆ'=>'ᄕ','ᇊ'=>'ᄗ','ᇍ'=>'ᄘ','ᇐ'=>'ᄙ','ㅀ'=>'ᄚ','ᄚ'=>'ᄚ','ᄻ'=>'ᄚ','ᆶ'=>'ᄚ','ㅮ'=>'ᄜ','ᇜ'=>'ᄜ','ㅱ'=>'ᄝ','ᇢ'=>'ᄝ','ㅲ'=>'ᄞ','ㅳ'=>'ᄠ','ㅄ'=>'ᄡ','ᄡ'=>'ᄡ','ᆹ'=>'ᄡ','ㅴ'=>'ᄢ','ㅵ'=>'ᄣ','ㅶ'=>'ᄧ','ㅷ'=>'ᄩ','ㅸ'=>'ᄫ','ᇦ'=>'ᄫ','ㅹ'=>'ᄬ','ㅺ'=>'ᄭ','ᇧ'=>'ᄭ','ㅻ'=>'ᄮ','ㅼ'=>'ᄯ','ᇨ'=>'ᄯ','ᇩ'=>'ᄰ','ㅽ'=>'ᄲ','ᇪ'=>'ᄲ','ㅾ'=>'ᄶ','ㅿ'=>'ᅀ','ᇫ'=>'ᅀ','ᇬ'=>'ᅁ','ᇱ'=>'ᅅ','ㆂ'=>'ᅅ','ᇲ'=>'ᅆ','ㆃ'=>'ᅆ','ㆀ'=>'ᅇ','ᇮ'=>'ᅇ','ㆁ'=>'ᅌ','ᇰ'=>'ᅌ','ᇳ'=>'ᅖ','ㆄ'=>'ᅗ','ᇴ'=>'ᅗ','ㆅ'=>'ᅘ','ㆆ'=>'ᅙ','ᇹ'=>'ᅙ','ㅤ'=>'ᅠ','ᅠ'=>'ᅠ','ㅏ'=>'ᅡ','ᅡ'=>'ᅡ','ㅐ'=>'ᅢ','ᅢ'=>'ᅢ','ㅑ'=>'ᅣ','ᅣ'=>'ᅣ','ㅒ'=>'ᅤ','ᅤ'=>'ᅤ','ㅓ'=>'ᅥ','ᅥ'=>'ᅥ','ㅔ'=>'ᅦ','ᅦ'=>'ᅦ','ㅕ'=>'ᅧ','ᅧ'=>'ᅧ','ㅖ'=>'ᅨ','ᅨ'=>'ᅨ','ㅗ'=>'ᅩ','ᅩ'=>'ᅩ','ㅘ'=>'ᅪ','ᅪ'=>'ᅪ','ㅙ'=>'ᅫ','ᅫ'=>'ᅫ','ㅚ'=>'ᅬ','ᅬ'=>'ᅬ','ㅛ'=>'ᅭ','ᅭ'=>'ᅭ','ㅜ'=>'ᅮ','ᅮ'=>'ᅮ','ㅝ'=>'ᅯ','ᅯ'=>'ᅯ','ㅞ'=>'ᅰ','ᅰ'=>'ᅰ','ㅟ'=>'ᅱ','ᅱ'=>'ᅱ','ㅠ'=>'ᅲ','ᅲ'=>'ᅲ','ㅡ'=>'一','ᅳ'=>'一','ㅢ'=>'ᅴ','ᅴ'=>'ᅴ','ㅣ'=>'丨','ᅵ'=>'丨','ㆇ'=>'ᆄ','ᆆ'=>'ᆄ','ㆈ'=>'ᆅ','ㆉ'=>'ᆈ','ㆊ'=>'ᆑ','ㆋ'=>'ᆒ','ㆌ'=>'ᆔ','ㆍ'=>'ᆞ','ㆎ'=>'ᆡ','ㄳ'=>'ᆪ','ᆪ'=>'ᆪ','ㄵ'=>'ᆬ','ᆬ'=>'ᆬ','ㄶ'=>'ᆭ','ᆭ'=>'ᆭ','ㄺ'=>'ᆰ','ᆰ'=>'ᆰ','ㄻ'=>'ᆱ','ᆱ'=>'ᆱ','ㄼ'=>'ᆲ','ᆲ'=>'ᆲ','ㄽ'=>'ᆳ','ᆳ'=>'ᆳ','ㄾ'=>'ᆴ','ᆴ'=>'ᆴ','ㄿ'=>'ᆵ','ᆵ'=>'ᆵ','ㅧ'=>'ᇇ','ㅨ'=>'ᇈ','ㅩ'=>'ᇌ','ㅪ'=>'ᇎ','ㅫ'=>'ᇓ','ㅬ'=>'ᇗ','ㅭ'=>'ᇙ','ㅯ'=>'ᇝ','ㅰ'=>'ᇟ','ァ'=>'ァ','ア'=>'ア','ィ'=>'ィ','イ'=>'イ','ゥ'=>'ゥ','ウ'=>'ウ','ェ'=>'ェ','エ'=>'エ','ォ'=>'ォ','オ'=>'オ','カ'=>'カ','キ'=>'キ','ク'=>'ク','ケ'=>'ケ','コ'=>'コ','サ'=>'サ','シ'=>'シ','ス'=>'ス','セ'=>'セ','ソ'=>'ソ','タ'=>'タ','チ'=>'チ','ッ'=>'ッ','ツ'=>'ツ','テ'=>'テ','ト'=>'ト','ナ'=>'ナ','ニ'=>'ニ','ヌ'=>'ヌ','ネ'=>'ネ','ノ'=>'ノ','ハ'=>'ハ','ヒ'=>'ヒ','フ'=>'フ','ヘ'=>'へ','ホ'=>'ホ','マ'=>'マ','⧄'=>'〼','ミ'=>'ミ','ム'=>'ム','メ'=>'メ','モ'=>'モ','ャ'=>'ャ','ヤ'=>'ヤ','ュ'=>'ュ','ユ'=>'ユ','ョ'=>'ョ','ヨ'=>'ヨ','ラ'=>'ラ','リ'=>'リ','ル'=>'ル','レ'=>'レ','ロ'=>'ロ','ワ'=>'ワ','ヲ'=>'ヲ','ン'=>'ン','꒞'=>'ꁊ','꒬'=>'ꁐ','꒜'=>'ꃀ','꒿'=>'ꉙ','꒾'=>'ꊱ','꓀'=>'ꎫ','꓂'=>'ꎵ','꒺'=>'ꎿ','꒰'=>'ꏂ','𐒠'=>'𐒆','—'=>'一','―'=>'一','−'=>'一','─'=>'一','⼀'=>'一','不'=>'不','並'=>'並','|'=>'丨','|'=>'丨','∣'=>'丨','⼁'=>'丨','‖'=>'丨丨','∥'=>'丨丨','串'=>'串','⼂'=>'丶','丸'=>'丸','丹'=>'丹','丽'=>'丽','⼃'=>'丿','乁'=>'乁','⼄'=>'乙','亂'=>'亂','⼅'=>'亅','了'=>'了','⼆'=>'二','⼇'=>'亠','亮'=>'亮','⼈'=>'人','什'=>'什','仌'=>'仌','令'=>'令','你'=>'你','倂'=>'併','倂'=>'併','侀'=>'侀','來'=>'來','例'=>'例','侮'=>'侮','侮'=>'侮','侻'=>'侻','便'=>'便','值'=>'値','倫'=>'倫','偺'=>'偺','備'=>'備','像'=>'像','僚'=>'僚','僧'=>'僧','僧'=>'僧','⼉'=>'儿','兀'=>'兀','充'=>'充','免'=>'免','免'=>'免','兔'=>'兔','兤'=>'兤','⼊'=>'入','內'=>'內','全'=>'全','兩'=>'兩','⼋'=>'八','六'=>'六','具'=>'具','冀'=>'冀','⼌'=>'冂','再'=>'再','冒'=>'冒','冕'=>'冕','⼍'=>'冖','冗'=>'冗','冤'=>'冤','⼎'=>'冫','冬'=>'冬','况'=>'况','况'=>'况','冷'=>'冷','凉'=>'凉','凌'=>'凌','凜'=>'凜','凞'=>'凞','⼏'=>'几','凵'=>'凵','⼐'=>'凵','⼑'=>'刀','刃'=>'刃','切'=>'切','切'=>'切','列'=>'列','利'=>'利','刺'=>'刺','刻'=>'刻','剆'=>'剆','割'=>'割','剷'=>'剷','劉'=>'劉','力'=>'力','⼒'=>'力','劣'=>'劣','劳'=>'劳','勇'=>'勇','勇'=>'勇','勉'=>'勉','勉'=>'勉','勒'=>'勒','勞'=>'勞','勤'=>'勤','勤'=>'勤','勵'=>'勵','⼓'=>'勹','勺'=>'勺','勺'=>'勺','包'=>'包','匆'=>'匆','⼔'=>'匕','北'=>'北','北'=>'北','⼕'=>'匚','⼖'=>'匸','匿'=>'匿','⼗'=>'十','〸'=>'十','〹'=>'卄','〺'=>'卅','卉'=>'卉','卑'=>'卑','卑'=>'卑','博'=>'博','⼘'=>'卜','⼙'=>'卩','即'=>'即','卵'=>'卵','卽'=>'卽','卿'=>'卿','卿'=>'卿','卿'=>'卿','⼚'=>'厂','⼛'=>'厶','參'=>'參','⼜'=>'又','及'=>'及','叟'=>'叟','⼝'=>'口','句'=>'句','叫'=>'叫','叱'=>'叱','吆'=>'吆','吏'=>'吏','吝'=>'吝','吸'=>'吸','呂'=>'呂','呈'=>'呈','周'=>'周','咞'=>'咞','咢'=>'咢','咽'=>'咽','哶'=>'哶','唐'=>'唐','啓'=>'啓','啟'=>'啓','啕'=>'啕','啣'=>'啣','善'=>'善','善'=>'善','喇'=>'喇','喙'=>'喙','喙'=>'喙','喝'=>'喝','喝'=>'喝','喫'=>'喫','喳'=>'喳','嗀'=>'嗀','嗂'=>'嗂','嗢'=>'嗢','嘆'=>'嘆','嘆'=>'嘆','噑'=>'噑','器'=>'器','噴'=>'噴','⼞'=>'囗','囹'=>'囹','圖'=>'圖','圗'=>'圗','⼟'=>'土','型'=>'型','城'=>'城','埴'=>'埴','堍'=>'堍','報'=>'報','堲'=>'堲','塀'=>'塀','塚'=>'塚','塚'=>'塚','塞'=>'塞','填'=>'塡','墨'=>'墨','壿'=>'墫','墬'=>'墬','墳'=>'墳','壘'=>'壘','壟'=>'壟','⼠'=>'士','壮'=>'壮','売'=>'売','壷'=>'壷','⼡'=>'夂','夆'=>'夆','⼢'=>'夊','⼣'=>'夕','多'=>'多','夢'=>'夢','⼤'=>'大','奄'=>'奄','奈'=>'奈','契'=>'契','奔'=>'奔','奢'=>'奢','女'=>'女','⼥'=>'女','姘'=>'姘','姬'=>'姬','娛'=>'娛','娧'=>'娧','婢'=>'婢','婦'=>'婦','嬀'=>'媯','媵'=>'媵','嬈'=>'嬈','嬨'=>'嬨','嬾'=>'嬾','嬾'=>'嬾','⼦'=>'子','⼧'=>'宀','宅'=>'宅','寃'=>'寃','寘'=>'寘','寧'=>'寧','寧'=>'寧','寧'=>'寧','寮'=>'寮','寳'=>'寳','⼨'=>'寸','寿'=>'寿','将'=>'将','⼩'=>'小','尢'=>'尢','⼪'=>'尢','⼫'=>'尸','尿'=>'尿','屠'=>'屠','屢'=>'屢','層'=>'層','履'=>'履','屮'=>'屮','屮'=>'屮','⼬'=>'屮','⼭'=>'山','岍'=>'岍','峀'=>'峀','崙'=>'崙','嵃'=>'嵃','嵐'=>'嵐','嵫'=>'嵫','嵮'=>'嵮','嵼'=>'嵼','嶲'=>'嶲','嶺'=>'嶺','⼮'=>'巛','巡'=>'巡','巢'=>'巢','⼯'=>'工','⼰'=>'己','巽'=>'巽','⼱'=>'巾','帲'=>'帡','帨'=>'帨','帽'=>'帽','幩'=>'幩','⼲'=>'干','年'=>'年','⼳'=>'幺','⼴'=>'广','度'=>'度','庰'=>'庰','庳'=>'庳','庶'=>'庶','廉'=>'廉','廊'=>'廊','廊'=>'廊','廒'=>'廒','廓'=>'廓','廙'=>'廙','廬'=>'廬','⼵'=>'廴','廾'=>'廾','⼶'=>'廾','弄'=>'弄','⼷'=>'弋','⼸'=>'弓','弢'=>'弢','弢'=>'弢','⼹'=>'彐','当'=>'当','⼺'=>'彡','形'=>'形','彩'=>'彩','彫'=>'彫','⼻'=>'彳','律'=>'律','徚'=>'徚','復'=>'復','徭'=>'徭','⼼'=>'心','忍'=>'忍','志'=>'志','念'=>'念','忹'=>'忹','怒'=>'怒','怜'=>'怜','悁'=>'悁','悔'=>'悔','悔'=>'悔','惇'=>'惇','惘'=>'惘','惡'=>'惡','愈'=>'愈','慄'=>'慄','慈'=>'慈','慌'=>'慌','慌'=>'慌','慎'=>'慎','慎'=>'慎','慠'=>'慠','慨'=>'慨','慺'=>'慺','憎'=>'憎','憎'=>'憎','憎'=>'憎','憐'=>'憐','憤'=>'憤','憯'=>'憯','憲'=>'憲','懞'=>'懞','懲'=>'懲','懲'=>'懲','懲'=>'懲','懶'=>'懶','懶'=>'懶','戀'=>'戀','⼽'=>'戈','成'=>'成','戛'=>'戛','戮'=>'戮','戴'=>'戴','⼾'=>'戶','⼿'=>'手','扝'=>'扝','抱'=>'抱','拉'=>'拉','拏'=>'拏','拓'=>'拓','拔'=>'拔','拼'=>'拼','拾'=>'拾','挽'=>'挽','捐'=>'捐','捨'=>'捨','捻'=>'捻','掃'=>'掃','掠'=>'掠','掩'=>'掩','揄'=>'揄','揅'=>'揅','揤'=>'揤','㩁'=>'搉','搜'=>'搜','搢'=>'搢','摒'=>'摒','摩'=>'摩','摷'=>'摷','摾'=>'摾','撚'=>'撚','撝'=>'撝','擄'=>'擄','⽀'=>'支','⽁'=>'攴','敏'=>'敏','敏'=>'敏','敖'=>'敖','敬'=>'敬','數'=>'數','⽂'=>'文','⽃'=>'斗','料'=>'料','⽄'=>'斤','⽅'=>'方','旅'=>'旅','⽆'=>'无','既'=>'既','旣'=>'旣','⽇'=>'日','易'=>'易','晉'=>'晉','晩'=>'晚','䀿'=>'晣','晴'=>'晴','晴'=>'晴','暈'=>'暈','暑'=>'暑','暑'=>'暑','暜'=>'暜','暴'=>'暴','曆'=>'曆','⽈'=>'曰','更'=>'更','㫚'=>'曶','書'=>'書','最'=>'最','⽉'=>'月','肦'=>'朌','胐'=>'朏','胊'=>'朐','脁'=>'朓','朗'=>'朗','朗'=>'朗','朗'=>'朗','脧'=>'朘','望'=>'望','望'=>'望','朡'=>'朡','膧'=>'朣','⽊'=>'木','李'=>'李','杓'=>'杓','杖'=>'杖','杞'=>'杞','柿'=>'杮','杻'=>'杻','枅'=>'枅','林'=>'林','柳'=>'柳','柺'=>'柺','栗'=>'栗','栟'=>'栟','桒'=>'桒','梁'=>'梁','梅'=>'梅','梅'=>'梅','梎'=>'梎','梨'=>'梨','椔'=>'椔','楂'=>'楂','樧'=>'榝','榣'=>'榣','槪'=>'槪','樂'=>'樂','樂'=>'樂','樂'=>'樂','樓'=>'樓','檨'=>'檨','櫓'=>'櫓','櫛'=>'櫛','欄'=>'欄','⽋'=>'欠','次'=>'次','歔'=>'歔','⽌'=>'止','歲'=>'歲','歷'=>'歷','歹'=>'歹','⽍'=>'歹','殟'=>'殟','殮'=>'殮','⽎'=>'殳','殺'=>'殺','殺'=>'殺','殺'=>'殺','殻'=>'殻','⽏'=>'毋','⺟'=>'母','⽐'=>'比','⽑'=>'毛','⽒'=>'氏','⽓'=>'气','⽔'=>'水','汎'=>'汎','汧'=>'汧','沈'=>'沈','沿'=>'沿','泌'=>'泌','泍'=>'泍','泥'=>'泥','洖'=>'洖','洛'=>'洛','洞'=>'洞','洴'=>'洴','派'=>'派','流'=>'流','流'=>'流','流'=>'流','浩'=>'浩','浪'=>'浪','海'=>'海','海'=>'海','浸'=>'浸','涅'=>'涅','淋'=>'淋','淚'=>'淚','淪'=>'淪','淹'=>'淹','渚'=>'渚','港'=>'港','湮'=>'湮','潙'=>'溈','溜'=>'溜','溺'=>'溺','滇'=>'滇','滋'=>'滋','滋'=>'滋','滑'=>'滑','滛'=>'滛','漏'=>'漏','漢'=>'漢','漢'=>'漢','漣'=>'漣','潮'=>'潮','濆'=>'濆','濫'=>'濫','濾'=>'濾','瀛'=>'瀛','瀞'=>'瀞','瀞'=>'瀞','瀹'=>'瀹','灊'=>'灊','⽕'=>'火','灰'=>'灰','灷'=>'灷','災'=>'災','炙'=>'炙','炭'=>'炭','烈'=>'烈','烙'=>'烙','煅'=>'煅','煉'=>'煉','煮'=>'煮','煮'=>'煮','熜'=>'熜','燎'=>'燎','燐'=>'燐','爐'=>'爐','爛'=>'爛','爨'=>'爨','⽖'=>'爪','爫'=>'爫','⺤'=>'爫','爵'=>'爵','爵'=>'爵','⽗'=>'父','⽘'=>'爻','⽙'=>'爿','⽚'=>'片','牐'=>'牐','⽛'=>'牙','⽜'=>'牛','牢'=>'牢','犀'=>'犀','犕'=>'犕','⽝'=>'犬','犯'=>'犯','狀'=>'狀','狼'=>'狼','猪'=>'猪','猪'=>'猪','獵'=>'獵','獺'=>'獺','⽞'=>'玄','率'=>'率','率'=>'率','⽟'=>'玉','王'=>'王','玥'=>'玥','玲'=>'玲','珞'=>'珞','理'=>'理','琉'=>'琉','琢'=>'琢','瑇'=>'瑇','瑜'=>'瑜','瑩'=>'瑩','瑱'=>'瑱','瑱'=>'瑱','璅'=>'璅','璉'=>'璉','璘'=>'璘','瓊'=>'瓊','⽠'=>'瓜','⽡'=>'瓦','甆'=>'甆','⽢'=>'甘','⽣'=>'生','甤'=>'甤','⽤'=>'用','⽥'=>'田','画'=>'画','甾'=>'甾','留'=>'留','略'=>'略','異'=>'異','異'=>'異','⽦'=>'疋','⽧'=>'疒','痢'=>'痢','瘐'=>'瘐','瘝'=>'瘝','瘟'=>'瘟','療'=>'療','癩'=>'癩','⽨'=>'癶','⽩'=>'白','⽪'=>'皮','⽫'=>'皿','益'=>'益','益'=>'益','盛'=>'盛','盧'=>'盧','⽬'=>'目','直'=>'直','直'=>'直','省'=>'省','眞'=>'眞','真'=>'真','真'=>'真','着'=>'着','睊'=>'睊','睊'=>'睊','瞋'=>'瞋','瞧'=>'瞧','⽭'=>'矛','⽮'=>'矢','⽯'=>'石','硏'=>'研','硎'=>'硎','硫'=>'硫','碌'=>'碌','碌'=>'碌','碑'=>'碑','磊'=>'磊','磌'=>'磌','磌'=>'磌','磻'=>'磻','礪'=>'礪','⽰'=>'示','礼'=>'礼','社'=>'社','祈'=>'祈','祉'=>'祉','祐'=>'祐','祖'=>'祖','祖'=>'祖','祝'=>'祝','神'=>'神','祥'=>'祥','祿'=>'祿','禍'=>'禍','禎'=>'禎','福'=>'福','福'=>'福','禮'=>'禮','⽱'=>'禸','⽲'=>'禾','秊'=>'秊','秫'=>'秫','稜'=>'稜','穀'=>'穀','穀'=>'穀','穊'=>'穊','穏'=>'穏','⽳'=>'穴','突'=>'突','窱'=>'窱','立'=>'立','⽴'=>'立','竮'=>'竮','⽵'=>'竹','笠'=>'笠','節'=>'節','節'=>'節','篆'=>'篆','築'=>'築','簾'=>'簾','籠'=>'籠','⽶'=>'米','类'=>'类','粒'=>'粒','精'=>'精','糒'=>'糒','糖'=>'糖','糣'=>'糣','糧'=>'糧','糨'=>'糨','⽷'=>'糸','紀'=>'紀','紐'=>'紐','索'=>'索','累'=>'累','絶'=>'絕','絛'=>'絛','絣'=>'絣','綠'=>'綠','綾'=>'綾','緇'=>'緇','練'=>'練','練'=>'練','練'=>'練','縂'=>'縂','縉'=>'縉','縷'=>'縷','繁'=>'繁','繅'=>'繅','⽸'=>'缶','缾'=>'缾','⽹'=>'网','⺫'=>'罒','署'=>'署','罹'=>'罹','罺'=>'罺','羅'=>'羅','⽺'=>'羊','羕'=>'羕','羚'=>'羚','羽'=>'羽','⽻'=>'羽','翺'=>'翺','老'=>'老','⽼'=>'老','者'=>'者','者'=>'者','者'=>'者','⽽'=>'而','⽾'=>'耒','⽿'=>'耳','聆'=>'聆','聠'=>'聠','聯'=>'聯','聰'=>'聰','聾'=>'聾','⾀'=>'聿','⾁'=>'肉','肋'=>'肋','肭'=>'肭','育'=>'育','㬵'=>'胶','腁'=>'胼','脃'=>'脃','脾'=>'脾','臘'=>'臘','⾂'=>'臣','臨'=>'臨','⾃'=>'自','臭'=>'臭','⾄'=>'至','⾅'=>'臼','舁'=>'舁','舁'=>'舁','舄'=>'舄','⾆'=>'舌','⾇'=>'舛','⾈'=>'舟','⾉'=>'艮','良'=>'良','⾊'=>'色','⾋'=>'艸','艹'=>'艹','艹'=>'艹','芋'=>'芋','芑'=>'芑','芝'=>'芝','花'=>'花','芳'=>'芳','芽'=>'芽','若'=>'若','若'=>'若','苦'=>'苦','茝'=>'茝','茣'=>'茣','茶'=>'茶','荒'=>'荒','荓'=>'荓','荣'=>'荣','莭'=>'莭','莽'=>'莽','菉'=>'菉','菊'=>'菊','菌'=>'菌','菜'=>'菜','菧'=>'菧','華'=>'華','菱'=>'菱','落'=>'落','葉'=>'葉','著'=>'著','著'=>'著','蔿'=>'蒍','蓮'=>'蓮','蓱'=>'蓱','蓳'=>'蓳','蓼'=>'蓼','蔖'=>'蔖','蕤'=>'蕤','藍'=>'藍','藺'=>'藺','蘆'=>'蘆','蘒'=>'蘒','蘭'=>'蘭','虁'=>'蘷','蘿'=>'蘿','⾌'=>'虍','虐'=>'虐','虜'=>'虜','虜'=>'虜','虧'=>'虧','虩'=>'虩','⾍'=>'虫','蚈'=>'蚈','蚩'=>'蚩','蛢'=>'蛢','蜎'=>'蜎','蜨'=>'蜨','蝫'=>'蝫','蝹'=>'蝹','蝹'=>'蝹','螆'=>'螆','螺'=>'螺','蟡'=>'蟡','蠁'=>'蠁','蠟'=>'蠟','⾎'=>'血','行'=>'行','⾏'=>'行','衠'=>'衠','衣'=>'衣','⾐'=>'衣','裂'=>'裂','裏'=>'裏','裗'=>'裗','裞'=>'裞','裡'=>'裡','裸'=>'裸','裺'=>'裺','褐'=>'褐','襁'=>'襁','襤'=>'襤','⾑'=>'襾','覆'=>'覆','見'=>'見','⾒'=>'見','視'=>'視','視'=>'視','⾓'=>'角','⾔'=>'言','䚶'=>'訞','詽'=>'訮','誠'=>'誠','說'=>'說','說'=>'說','調'=>'調','請'=>'請','諒'=>'諒','論'=>'論','諭'=>'諭','諭'=>'諭','諸'=>'諸','諸'=>'諸','諾'=>'諾','諾'=>'諾','謁'=>'謁','謁'=>'謁','謹'=>'謹','謹'=>'謹','識'=>'識','讀'=>'讀','讏'=>'讆','變'=>'變','變'=>'變','⾕'=>'谷','⾖'=>'豆','豈'=>'豈','豕'=>'豕','⾗'=>'豕','⾘'=>'豸','⾙'=>'貝','貫'=>'貫','賁'=>'賁','賂'=>'賂','賈'=>'賈','賓'=>'賓','贈'=>'贈','贈'=>'贈','贛'=>'贛','⾚'=>'赤','⾛'=>'走','起'=>'起','趆'=>'赿','⾜'=>'足','趼'=>'趼','跋'=>'跋','跺'=>'跥','路'=>'路','跰'=>'跰','躛'=>'躗','⾝'=>'身','車'=>'車','⾞'=>'車','軔'=>'軔','輧'=>'軿','輦'=>'輦','輪'=>'輪','輸'=>'輸','輸'=>'輸','輻'=>'輻','轢'=>'轢','⾟'=>'辛','辞'=>'辞','辰'=>'辰','⾠'=>'辰','⾡'=>'辵','辶'=>'辶','⻌'=>'辶','連'=>'連','逸'=>'逸','逸'=>'逸','遲'=>'遲','遼'=>'遼','邏'=>'邏','⾢'=>'邑','邔'=>'邔','郎'=>'郎','郱'=>'郱','都'=>'都','鄑'=>'鄑','鄛'=>'鄛','⾣'=>'酉','酪'=>'酪','醙'=>'醙','醴'=>'醴','⾤'=>'釆','里'=>'里','⾥'=>'里','量'=>'量','金'=>'金','⾦'=>'金','鈴'=>'鈴','鈸'=>'鈸','鉶'=>'鉶','鉼'=>'鉼','鋗'=>'鋗','鋘'=>'鋘','錄'=>'錄','鍊'=>'鍊','鎮'=>'鎭','鏹'=>'鏹','鐕'=>'鐕','⾧'=>'長','⾨'=>'門','開'=>'開','閭'=>'閭','閷'=>'閷','⾩'=>'阜','阮'=>'阮','陋'=>'陋','降'=>'降','陵'=>'陵','陸'=>'陸','陼'=>'陼','隆'=>'隆','隣'=>'隣','⾪'=>'隶','隸'=>'隸','⾫'=>'隹','雃'=>'雃','離'=>'離','難'=>'難','難'=>'難','⾬'=>'雨','零'=>'零','雷'=>'雷','霣'=>'霣','露'=>'露','靈'=>'靈','⾭'=>'靑','靖'=>'靖','靖'=>'靖','⾮'=>'非','⾯'=>'面','⾰'=>'革','⾱'=>'韋','韛'=>'韛','韠'=>'韠','⾲'=>'韭','⾳'=>'音','響'=>'響','響'=>'響','⾴'=>'頁','頋'=>'頋','頋'=>'頋','頋'=>'頋','領'=>'領','頩'=>'頩','頻'=>'頻','頻'=>'頻','類'=>'類','⾵'=>'風','⾶'=>'飛','⻝'=>'食','⾷'=>'食','飢'=>'飢','飯'=>'飯','飼'=>'飼','館'=>'館','餩'=>'餩','⾸'=>'首','⾹'=>'香','馧'=>'馧','⾺'=>'馬','駂'=>'駂','駱'=>'駱','駾'=>'駾','驪'=>'驪','⾻'=>'骨','⾼'=>'高','⾽'=>'髟','鬒'=>'鬒','鬒'=>'鬒','⾾'=>'鬥','⾿'=>'鬯','⿀'=>'鬲','⿁'=>'鬼','⿂'=>'魚','魯'=>'魯','鱀'=>'鱀','鱗'=>'鱗','⿃'=>'鳥','鳽'=>'鳽','鵧'=>'鵧','鶴'=>'鶴','鷺'=>'鷺','鸞'=>'鸞','鹃'=>'鹂','⿄'=>'鹵','鹿'=>'鹿','⿅'=>'鹿','麗'=>'麗','麟'=>'麟','⿆'=>'麥','麻'=>'麻','⿇'=>'麻','⿈'=>'黃','⿉'=>'黍','黎'=>'黎','⿊'=>'黑','黹'=>'黹','⿋'=>'黹','⿌'=>'黽','黾'=>'黾','鼅'=>'鼅','⿍'=>'鼎','鼏'=>'鼏','⿎'=>'鼓','鼖'=>'鼖','⿏'=>'鼠','鼻'=>'鼻','⿐'=>'鼻','齃'=>'齃','⿑'=>'齊','⿒'=>'齒','龍'=>'龍','⿓'=>'龍','龎'=>'龎','龜'=>'龜','龜'=>'龜','龜'=>'龜','⿔'=>'龜','⻳'=>'龟','⿕'=>'龠','㒞'=>'㒞','㒹'=>'㒹','㒻'=>'㒻','㓟'=>'㓟','㔕'=>'㔕','䎛'=>'㖈','㛮'=>'㛮','㛼'=>'㛼','㞁'=>'㞁','㠯'=>'㠯','㡢'=>'㡢','㡼'=>'㡼','㣇'=>'㣇','㣣'=>'㣣','㤜'=>'㤜','㤺'=>'㤺','㨮'=>'㨮','㩬'=>'㩬','㫤'=>'㫤','㬈'=>'㬈','㬙'=>'㬙','䐠'=>'㬻','㭉'=>'㭉','㮝'=>'㮝','㮝'=>'㮝','㰘'=>'㰘','㱎'=>'㱎','㴳'=>'㴳','㶖'=>'㶖','㺬'=>'㺬','㺸'=>'㺸','㺸'=>'㺸','㼛'=>'㼛','㿼'=>'㿼','䀈'=>'䀈','䀘'=>'䀘','䀹'=>'䀹','䀹'=>'䀹','䁆'=>'䁆','䂖'=>'䂖','䃣'=>'䃣','䄯'=>'䄯','䈂'=>'䈂','䈧'=>'䈧','䊠'=>'䊠','䌁'=>'䌁','䌴'=>'䌴','䍙'=>'䍙','䏕'=>'䏕','䏙'=>'䏙','䐋'=>'䐋','䑫'=>'䑫','䔫'=>'䔫','䕝'=>'䕝','䕡'=>'䕡','䕫'=>'䕫','䗗'=>'䗗','䗹'=>'䗹','䘵'=>'䘵','䚾'=>'䚾','䛇'=>'䛇','䦕'=>'䦕','䧦'=>'䧦','䩮'=>'䩮','䩶'=>'䩶','䪲'=>'䪲','䬳'=>'䬳','䯎'=>'䯎','䳎'=>'䳎','䳭'=>'䳭','䳸'=>'䳸','䵖'=>'䵖','𠄢'=>'𠄢','𠔜'=>'𠔜','𠔥'=>'𠔥','𠕋'=>'𠕋','𠘺'=>'𠘺','𠠄'=>'𠠄','𠣞'=>'𠣞','𠨬'=>'𠨬','𠭣'=>'𠭣','𡓤'=>'𡓤','𡚨'=>'𡚨','𡛪'=>'𡛪','𡧈'=>'𡧈','𡬘'=>'𡬘','𡴋'=>'𡴋','𡷤'=>'𡷤','𡷦'=>'𡷦','𢆃'=>'𢆃','𢆟'=>'𢆟','𢌱'=>'𢌱','𢌱'=>'𢌱','𢛔'=>'𢛔','𢡄'=>'𢡄','𢡊'=>'𢡊','𢬌'=>'𢬌','𢯱'=>'𢯱','𣀊'=>'𣀊','𣊸'=>'𣊸','𣍟'=>'𣍟','𣎓'=>'𣎓','𣎜'=>'𣎜','𣏃'=>'𣏃','𣏕'=>'𣏕','𣑭'=>'𣑭','𣚣'=>'𣚣','𣢧'=>'𣢧','𣪍'=>'𣪍','𣫺'=>'𣫺','𣲼'=>'𣲼','𣴞'=>'𣴞','𣻑'=>'𣻑','𣽞'=>'𣽞','𣾎'=>'𣾎','𤉣'=>'𤉣','𤎫'=>'𤎫','𤘈'=>'𤘈','𤜵'=>'𤜵','𤠔'=>'𤠔','𤰶'=>'𤰶','𤲒'=>'𤲒','𤾡'=>'𤾡','𤾸'=>'𤾸','𥁄'=>'𥁄','𥃲'=>'𥃲','𥃳'=>'𥃳','𥄙'=>'𥄙','𥄳'=>'𥄳','𥉉'=>'𥉉','𥐝'=>'𥐝','𥘦'=>'𥘦','𥚚'=>'𥚚','𥛅'=>'𥛅','𥥼'=>'𥥼','𥪧'=>'𥪧','𥪧'=>'𥪧','𥮫'=>'𥮫','𥲀'=>'𥲀','𥳐'=>'𥳐','𥾆'=>'𥾆','𦇚'=>'𦇚','𦈨'=>'𦈨','𦉇'=>'𦉇','𦋙'=>'𦋙','𦌾'=>'𦌾','𦓚'=>'𦓚','𦔣'=>'𦔣','𦖨'=>'𦖨','𦞧'=>'𦞧','𦞵'=>'𦞵','𦬼'=>'𦬼','𦰶'=>'𦰶','𦳕'=>'𦳕','𦵫'=>'𦵫','𦼬'=>'𦼬','𦾱'=>'𦾱','𧃒'=>'𧃒','𧏊'=>'𧏊','𧙧'=>'𧙧','𧢮'=>'𧢮','𧥦'=>'𧥦','𧲨'=>'𧲨','𧻓'=>'𧻓','𧼯'=>'𧼯','𨗒'=>'𨗒','𨗭'=>'𨗭','𨜮'=>'𨜮','𨯺'=>'𨯺','𨵷'=>'𨵷','𩅅'=>'𩅅','𩇟'=>'𩇟','𩈚'=>'𩈚','𩐊'=>'𩐊','𩒖'=>'𩒖','𩖶'=>'𩖶','𩬰'=>'𩬰','𪃎'=>'𪃎','𪄅'=>'𪄅','𪈎'=>'𪈎','𪊑'=>'𪊑','𪎒'=>'𪎒','𪘀'=>'𪘀','℃'=>'°C','℉'=>'°F','ℇ'=>'Ɛ','℻'=>'FAX','ℕ'=>'N','№'=>'No','ℚ'=>'Q','₨'=>'Rs','𝐓'=>'T','℡'=>'TEL','𝐔'=>'U','𝐖'=>'W','₩'=>'W̵','𝐗'=>'X','¥'=>'Y̵','𝚲'=>'Λ','𝚵'=>'Ξ','ℿ'=>'Π','ϲ'=>'c','ϒ'=>'Y','𝚽'=>'Φ','𝚿'=>'Ψ','ѣ'=>'Ь̵','ਃ'=>'ঃ','ಃ'=>'ః','່'=>'่','់'=>'่','້'=>'้','໊'=>'๊','໋'=>'๋','៕'=>'๚','៚'=>'๛','ъ'=>'ˉb','៙'=>'๏','೧'=>'౧','૨'=>'२','೨'=>'౨','૩'=>'३','૪'=>'४','૮'=>'८','೯'=>'౯','а'=>'a','Ꮟ'=>'b','ᖯ'=>'b','с'=>'c','ԁ'=>'d','ᑯ'=>'d','е'=>'e','ә'=>'ǝ','ε'=>'ɛ','є'=>'ɛ','ք'=>'f','ց'=>'g','һ'=>'h','հ'=>'h','Ꮒ'=>'h','Ᏺ'=>'h̔','ι'=>'i','і'=>'i','Ꭵ'=>'i','ј'=>'j','յ'=>'j','ᗰ'=>'m','ո'=>'n','η'=>'n̩','ం'=>'o','ಂ'=>'o','ം'=>'o','०'=>'o','੦'=>'o','૦'=>'o','๐'=>'o','໐'=>'o','ο'=>'o','о'=>'o','օ'=>'o','ဝ'=>'o','ρ'=>'p','р'=>'p','ᴩ'=>'ᴘ','գ'=>'q','κ'=>'ĸ','к'=>'ĸ','ᴦ'=>'r','г'=>'r','ѕ'=>'s','υ'=>'u','ս'=>'u','ν'=>'v','ѵ'=>'v','Ꮃ'=>'w','ᗯ'=>'w','х'=>'x','ᕁ'=>'x','у'=>'y','Ꭹ'=>'y','ӡ'=>'ʒ','ჳ'=>'ʒ','ϩ'=>'ƨ','ь'=>'ƅ','ы'=>'ƅi','ɑ'=>'α','ծ'=>'δ','ᕷ'=>'δ','п'=>'π','ɸ'=>'φ','ф'=>'φ','ʙ'=>'в','ɜ'=>'з','ᴍ'=>'м','ʜ'=>'н','ɢ'=>'ԍ','ᴛ'=>'т','ᴙ'=>'я','ઽ'=>'ऽ','ુ'=>'ु','ૂ'=>'ू','ੋ'=>'ॆ','੍'=>'्','્'=>'्','ഉ'=>'உ','ജ'=>'ஐ','ണ'=>'ண','ഴ'=>'ழ','ി'=>'ி','ു'=>'ூ','ಅ'=>'అ','ಆ'=>'ఆ','ಇ'=>'ఇ','ಒ'=>'ఒ','ಓ'=>'ఒౕ','ಜ'=>'జ','ಞ'=>'ఞ','ಣ'=>'ణ','థ'=>'ధּ','ಯ'=>'య','ఠ'=>'రּ','ಱ'=>'ఱ','ಲ'=>'ల','ඌ'=>'ന്ന','ஶ'=>'ശ','ຈ'=>'จ','ບ'=>'บ','ປ'=>'ป','ຝ'=>'ฝ','ພ'=>'พ','ຟ'=>'ฟ','ຍ'=>'ย','។'=>'ฯ','ិ'=>'ิ','ី'=>'ี','ឹ'=>'ึ','ឺ'=>'ื','ຸ'=>'ุ','ູ'=>'ู','ᗅ'=>'A','ᒍ'=>'J','ᕼ'=>'H','ᐯ'=>'V','ᑭ'=>'P','ᗷ'=>'B','ヘ'=>'へ','𐏑'=>'𐎂','𐏓'=>'𐎓','𒀸'=>'𐎚','ᅳ'=>'一','ǀ'=>'丨','ᅵ'=>'丨','Ꭺ'=>'A','Ᏼ'=>'B','Ꮯ'=>'C','ᗞ'=>'D','Ꭼ'=>'E','ᖴ'=>'F','Ꮐ'=>'G','Ꮋ'=>'H','Ꭻ'=>'J','Ꮶ'=>'K','Ꮮ'=>'L','Ꮇ'=>'M','Ꮲ'=>'P','ᖇ'=>'R','Ꮥ'=>'S','Ꮩ'=>'V','Ꮓ'=>'Z'); \ No newline at end of file
+<?php return array('¡'=>'i','ǃ'=>'!','α'=>'a',' '=>' ','­'=>'','۝'=>'','܏'=>'','᠆'=>'','᠎'=>'','​'=>'','‌'=>'','‍'=>'','
'=>'','
'=>'','⁠'=>'','⁡'=>'','⁢'=>'','⁣'=>'',''=>'',''=>'',''=>'',''=>'',''=>'',''=>'',''=>'',''=>'',''=>'',''=>'',''=>'','𝅳'=>'','𝅴'=>'','𝅵'=>'','𝅶'=>'','𝅷'=>'','𝅸'=>'','𝅹'=>'','𝅺'=>'','۬'=>'۟','̓'=>'̓','ُ'=>'̓','֜'=>'́','́'=>'́','݇'=>'́','॔'=>'́','̀'=>'̀','॓'=>'̀','̌'=>'̆','̑'=>'̂','֯'=>'̊','ஂ'=>'̊','ํ'=>'̊','ໍ'=>'̊','ံ'=>'̊','ំ'=>'̊','៓'=>'̊','゚'=>'̊','゚'=>'̊','ͦ'=>'̊','͂'=>'̃','ׄ'=>'̇','ֹ'=>'̇','ׂ'=>'̇','ׁ'=>'̇','݁'=>'̇','ं'=>'̇','ਂ'=>'̇','ં'=>'̇','்'=>'̇','̅'=>'̄','〬'=>'̉','̱'=>'̠','॒'=>'̠','̧'=>'̡','̦'=>'̡','̨'=>'̢','़'=>'̣','়'=>'̣','਼'=>'̣','઼'=>'̣','଼'=>'̣','͇'=>'̳','̶'=>'̵','ﱞ'=>'ﹲّ','ﱟ'=>'ﹴّ','ﳲ'=>'ﹷّ','ﱠ'=>'ﹶّ','ﳳ'=>'ﹹّ','ﱡ'=>'ﹸّ','ﳴ'=>'ﹻّ','ﱢ'=>'ﹺّ','ﱣ'=>'ﹼٰ','ٴ'=>'ٔ','݂'=>'ܼ','౦'=>'o','೦'=>'o','゙'=>'゙',' '=>' ',' '=>' ',' '=>' ',' '=>' ',' '=>' ',' '=>' ',' '=>' ',' '=>' ',' '=>' ',' '=>' ',' '=>' ',' '=>' ',' '=>' ',' '=>' ',' '=>' ','`'=>'`','`'=>'`','῀'=>'˜','^'=>'^','︿'=>'^','_'=>'_','﹍'=>'_','﹎'=>'_','﹏'=>'_','⌇'=>'︴','-'=>'-','‐'=>'-','‑'=>'-','‒'=>'-','–'=>'-','﹘'=>'-','∼'=>'⁓','・'=>'・','•'=>'・',','=>',','‚'=>',','٬'=>'،','、'=>'、',';'=>';',';'=>';',':'=>':','։'=>':','︰'=>':','׃'=>':','⩴'=>'::=','.'=>'.','․'=>'.','܂'=>'.','‥'=>'..','…'=>'...','。'=>'。','·'=>'·','‧'=>'·','∙'=>'·','⋅'=>'·','ᐧ'=>'·','ᔯ'=>'·4','ᐌ'=>'·ᐁ','ᐎ'=>'·ᐃ','ᐐ'=>'·ᐄ','ᐒ'=>'·ᐅ','ᐔ'=>'·ᐆ','ᐗ'=>'·ᐊ','ᐙ'=>'·ᐋ','ᐷ'=>'·ᐳ','ᑀ'=>'·ᐳ','ᑂ'=>'·ᐴ','ᑄ'=>'·ᐸ','ᑆ'=>'·ᐹ','ᑗ'=>'·ᑌ','ᑙ'=>'·ᑎ','ᑛ'=>'·ᑏ','ᑔ'=>'·ᑐ','ᑝ'=>'·ᑐ','ᑟ'=>'·ᑑ','ᑡ'=>'·ᑕ','ᑣ'=>'·ᑖ','ᑴ'=>'·ᑫ','ᑸ'=>'·ᑮ','ᑼ'=>'·ᑰ','ᑾ'=>'·ᑲ','ᒀ'=>'·ᑳ','ᒒ'=>'·ᒉ','ᒔ'=>'·ᒋ','ᒖ'=>'·ᒌ','ᒚ'=>'·ᒎ','ᒜ'=>'·ᒐ','ᒞ'=>'·ᒑ','ᒬ'=>'·ᒣ','ᒮ'=>'·ᒥ','ᒰ'=>'·ᒦ','ᒲ'=>'·ᒧ','ᒴ'=>'·ᒨ','ᒶ'=>'·L','ᒸ'=>'·ᒫ','ᓉ'=>'·ᓀ','ᓋ'=>'·ᓇ','ᓍ'=>'·ᓈ','ᓜ'=>'·ᓓ','ᓞ'=>'·ᓕ','ᓠ'=>'·ᓖ','ᓢ'=>'·ᓗ','ᓤ'=>'·ᓘ','ᓦ'=>'·ᓚ','ᓨ'=>'·ᓛ','ᓶ'=>'·ᓭ','ᓸ'=>'·ᓯ','ᓺ'=>'·ᓰ','ᓼ'=>'·ᓱ','ᓾ'=>'·ᓲ','ᔀ'=>'·ᓴ','ᔂ'=>'·ᓵ','ᔗ'=>'·ᔐ','ᔙ'=>'·ᔑ','ᔛ'=>'·ᔒ','ᔝ'=>'·ᔓ','ᔟ'=>'·ᔔ','ᔡ'=>'·ᔕ','ᔣ'=>'·ᔖ','ᔱ'=>'·ᔨ','ᔳ'=>'·ᔩ','ᔵ'=>'·ᔪ','ᔷ'=>'·ᔫ','ᔹ'=>'·ᔭ','ᔻ'=>'·ᔮ','ᕎ'=>'·ᕌ','ᕛ'=>'·ᕚ','ᕨ'=>'·ᕧ','('=>'(','⑴'=>'(1)','⒧'=>'(l)','⑽'=>'(10)','⑾'=>'(11)','⑿'=>'(12)','⒀'=>'(13)','⒁'=>'(14)','⒂'=>'(15)','⒃'=>'(16)','⒄'=>'(17)','⒅'=>'(18)','⒆'=>'(19)','⑵'=>'(2)','⒇'=>'(20)','⑶'=>'(3)','⑷'=>'(4)','⑸'=>'(5)','⑹'=>'(6)','⑺'=>'(7)','⑻'=>'(8)','⑼'=>'(9)','⒜'=>'(a)','⒝'=>'(b)','⒞'=>'(c)','⒟'=>'(d)','⒠'=>'(e)','⒡'=>'(f)','⒢'=>'(g)','⒣'=>'(h)','⒤'=>'(i)','⒥'=>'(j)','⒦'=>'(k)','⒨'=>'(m)','⒩'=>'(n)','⒪'=>'(o)','⒫'=>'(p)','⒬'=>'(q)','⒭'=>'(r)','⒮'=>'(s)','⒯'=>'(t)','⒰'=>'(u)','⒱'=>'(v)','⒲'=>'(w)','⒳'=>'(x)','⒴'=>'(y)','⒵'=>'(z)','㈀'=>'(ᄀ)','㈎'=>'(가)','㈁'=>'(ᄂ)','㈏'=>'(나)','㈂'=>'(ᄃ)','㈐'=>'(다)','㈃'=>'(ᄅ)','㈑'=>'(라)','㈄'=>'(ᄆ)','㈒'=>'(마)','㈅'=>'(ᄇ)','㈓'=>'(바)','㈆'=>'(ᄉ)','㈔'=>'(사)','㈇'=>'(ᄋ)','㈕'=>'(아)','㈝'=>'(오전)','㈞'=>'(오후)','㈈'=>'(ᄌ)','㈖'=>'(자)','㈜'=>'(주)','㈉'=>'(ᄎ)','㈗'=>'(차)','㈊'=>'(ᄏ)','㈘'=>'(카)','㈋'=>'(ᄐ)','㈙'=>'(타)','㈌'=>'(ᄑ)','㈚'=>'(파)','㈍'=>'(ᄒ)','㈛'=>'(하)','㈠'=>'(一)','㈦'=>'(七)','㈢'=>'(三)','㈨'=>'(九)','㈡'=>'(二)','㈤'=>'(五)','㈹'=>'(代)','㈽'=>'(企)','㉁'=>'(休)','㈧'=>'(八)','㈥'=>'(六)','㈸'=>'(労)','㈩'=>'(十)','㈿'=>'(協)','㈴'=>'(名)','㈺'=>'(呼)','㈣'=>'(四)','㈯'=>'(土)','㈻'=>'(学)','㈰'=>'(日)','㈪'=>'(月)','㈲'=>'(有)','㈭'=>'(木)','㈱'=>'(株)','㈬'=>'(水)','㈫'=>'(火)','㈵'=>'(特)','㈼'=>'(監)','㈳'=>'(社)','㈷'=>'(祝)','㉀'=>'(祭)','㉂'=>'(自)','㉃'=>'(至)','㈶'=>'(財)','㈾'=>'(資)','㈮'=>'(金)',')'=>')','['=>'[','〔'=>'[',']'=>']','〕'=>']','{'=>'{','}'=>'}','⦅'=>'⦅','⦆'=>'⦆','「'=>'「','」'=>'」','@'=>'@','*'=>'*','/'=>'/','⁄'=>'/','∕'=>'/','\'=>'\\','&'=>'&','#'=>'#','%'=>'%','‶'=>'‵‵','‷'=>'‵‵‵','༌'=>'་','´'=>'ʹ','΄'=>'ʹ','´'=>'ʹ','\''=>'ʹ','''=>'ʹ','′'=>'ʹ','׳'=>'ʹ','ʹ'=>'ʹ','ˊ'=>'ʹ','"'=>'ʹʹ','"'=>'ʹʹ','″'=>'ʹʹ','〃'=>'ʹʹ','״'=>'ʹʹ','ʺ'=>'ʹʹ','‴'=>'ʹʹʹ','⁗'=>'ʹʹʹʹ','¯'=>'ˉ',' ̄'=>'ˉ','‾'=>'ˉ','﹉'=>'ˉ','﹊'=>'ˉ','﹋'=>'ˉ','﹌'=>'ˉ','˚'=>'°','௵'=>'௳','←'=>'←','→'=>'→','↑'=>'↑','↓'=>'↓','↵'=>'↲','⨡'=>'↾','𝛛'=>'∂','𝜕'=>'∂','𝝏'=>'∂','𝞉'=>'∂','𝟃'=>'∂','𝛁'=>'∇','𝛻'=>'∇','𝜵'=>'∇','𝝯'=>'∇','𝞩'=>'∇','+'=>'+','﬩'=>'+','‹'=>'<','<'=>'<','='=>'=','⩵'=>'==','⩶'=>'===','›'=>'>','>'=>'>','¬'=>'¬','¦'=>'¦','〜'=>'~','~'=>'~','﹨'=>'∖','⋀'=>'∧','⋁'=>'∨','⋂'=>'∩','⋃'=>'∪','∯'=>'∮∮','∰'=>'∮∮∮','≣'=>'≡','♁'=>'⊕','☉'=>'⊙','⟂'=>'⊥','▷'=>'⊲','⨝'=>'⋈','⨽'=>'⌙','☸'=>'⎈','⎮'=>'⎥','│'=>'│','▐'=>'▌','■'=>'■','☐'=>'□','○'=>'○','⦾'=>'◎','〛'=>'⟧','〈'=>'⟨','〈'=>'⟨','〉'=>'⟩','〉'=>'⟩','⧙'=>'⦚','〶'=>'〒','ー'=>'ー','¢'=>'¢','$'=>'$','£'=>'£','¥'=>'Y̵','₩'=>'W̵','0'=>'0','𝟎'=>'0','𝟘'=>'0','𝟢'=>'0','𝟬'=>'0','𝟶'=>'0','০'=>'0','୦'=>'0','௦'=>'0','᠐'=>'0','〇'=>'0','𝐎'=>'0','𝑂'=>'0','𝑶'=>'0','𝒪'=>'0','𝓞'=>'0','𝔒'=>'0','𝕆'=>'0','𝕺'=>'0','𝖮'=>'0','𝗢'=>'0','𝘖'=>'0','𝙊'=>'0','𝙾'=>'0','𝚶'=>'0','𝛰'=>'0','𝜪'=>'0','𝝤'=>'0','𝞞'=>'0','ⵔ'=>'0','ഠ'=>'0','⊖'=>'0̵','𝚯'=>'0̵','𝚹'=>'0̵','𝛩'=>'0̵','𝛳'=>'0̵','𝜣'=>'0̵','𝜭'=>'0̵','𝝝'=>'0̵','𝝧'=>'0̵','𝞗'=>'0̵','𝞡'=>'0̵','ⴱ'=>'0̵','Ꮎ'=>'0̵','۰'=>'٠','᭜'=>'᭐','㍘'=>'0点','1'=>'1','𝟏'=>'1','𝟙'=>'1','𝟣'=>'1','𝟭'=>'1','𝟷'=>'1','ℐ'=>'1','ℑ'=>'1','𝐈'=>'1','𝐼'=>'1','𝑰'=>'1','𝓘'=>'1','𝕀'=>'1','𝕴'=>'1','𝖨'=>'1','𝗜'=>'1','𝘐'=>'1','𝙄'=>'1','𝙸'=>'1','l'=>'l','l'=>'l','ⅼ'=>'1','ℓ'=>'l','𝐥'=>'l','𝑙'=>'l','𝒍'=>'l','𝓁'=>'l','𝓵'=>'l','𝔩'=>'l','𝕝'=>'l','𝖑'=>'l','𝗅'=>'l','𝗹'=>'l','𝘭'=>'l','𝙡'=>'l','𝚕'=>'l','𝚰'=>'l','𝛪'=>'l','𝜤'=>'l','𝝞'=>'l','𝞘'=>'l','①'=>'➀','ɭ'=>'l̢','ɫ'=>'l̴','ƚ'=>'l̵','ł'=>'l̷','۱'=>'١','⒈'=>'1.','ŀ'=>'l·','ᒷ'=>'1·','⑩'=>'➉','⒑'=>'10.','㏩'=>'10日','㋉'=>'10月','㍢'=>'10点','⒒'=>'11.','㏪'=>'11日','㋊'=>'11月','㍣'=>'11点','⒓'=>'12.','㏫'=>'12日','㋋'=>'12月','㍤'=>'12点','⒔'=>'13.','㏬'=>'13日','㍥'=>'13点','⒕'=>'14.','㏭'=>'14日','㍦'=>'14点','⒖'=>'15.','㏮'=>'15日','㍧'=>'15点','⒗'=>'16.','㏯'=>'16日','㍨'=>'16点','⒘'=>'17.','㏰'=>'17日','㍩'=>'17点','⒙'=>'18.','㏱'=>'18日','㍪'=>'18点','⒚'=>'19.','㏲'=>'19日','㍫'=>'19点','lj'=>'lj','㏠'=>'1日','㋀'=>'1月','㍙'=>'1点','2'=>'2','𝟐'=>'2','𝟚'=>'2','𝟤'=>'2','𝟮'=>'2','𝟸'=>'2','ᒿ'=>'2','②'=>'➁','۲'=>'٢','⒉'=>'2.','⒛'=>'20.','㏳'=>'20日','㍬'=>'20点','㏴'=>'21日','㍭'=>'21点','㏵'=>'22日','㍮'=>'22点','㏶'=>'23日','㍯'=>'23点','㏷'=>'24日','㍰'=>'24点','㏸'=>'25日','㏹'=>'26日','㏺'=>'27日','㏻'=>'28日','㏼'=>'29日','㏡'=>'2日','㋁'=>'2月','㍚'=>'2点','3'=>'3','𝟑'=>'3','𝟛'=>'3','𝟥'=>'3','𝟯'=>'3','𝟹'=>'3','③'=>'➂','۳'=>'٣','⒊'=>'3.','㏽'=>'30日','㏾'=>'31日','㏢'=>'3日','㋂'=>'3月','㍛'=>'3点','4'=>'4','𝟒'=>'4','𝟜'=>'4','𝟦'=>'4','𝟰'=>'4','𝟺'=>'4','Ꮞ'=>'4','④'=>'➃','⒋'=>'4.','ᔰ'=>'4·','㏣'=>'4日','㋃'=>'4月','㍜'=>'4点','5'=>'5','𝟓'=>'5','𝟝'=>'5','𝟧'=>'5','𝟱'=>'5','𝟻'=>'5','⑤'=>'➄','⒌'=>'5.','㏤'=>'5日','㋄'=>'5月','㍝'=>'5点','6'=>'6','𝟔'=>'6','𝟞'=>'6','𝟨'=>'6','𝟲'=>'6','𝟼'=>'6','б'=>'6','⑥'=>'➅','⒍'=>'6.','㏥'=>'6日','㋅'=>'6月','㍞'=>'6点','7'=>'7','𝟕'=>'7','𝟟'=>'7','𝟩'=>'7','𝟳'=>'7','𝟽'=>'7','⑦'=>'➆','۷'=>'٧','⒎'=>'7.','㏦'=>'7日','㋆'=>'7月','㍟'=>'7点','ଃ'=>'8','৪'=>'8','੪'=>'8','8'=>'8','𝟖'=>'8','𝟠'=>'8','𝟪'=>'8','𝟴'=>'8','𝟾'=>'8','ȣ'=>'8','⑧'=>'➇','۸'=>'٨','⒏'=>'8.','㏧'=>'8日','㋇'=>'8月','㍠'=>'8点','੧'=>'9','୨'=>'9','৭'=>'9','9'=>'9','𝟗'=>'9','𝟡'=>'9','𝟫'=>'9','𝟵'=>'9','𝟿'=>'9','⑨'=>'➈','۹'=>'٩','⒐'=>'9.','㏨'=>'9日','㋈'=>'9月','㍡'=>'9点','a'=>'a','𝐚'=>'a','𝑎'=>'a','𝒂'=>'a','𝒶'=>'a','𝓪'=>'a','𝔞'=>'a','𝕒'=>'a','𝖆'=>'a','𝖺'=>'a','𝗮'=>'a','𝘢'=>'a','𝙖'=>'a','𝚊'=>'a','℀'=>'a/c','℁'=>'a/s','æ'=>'ae','b'=>'b','𝐛'=>'b','𝑏'=>'b','𝒃'=>'b','𝒷'=>'b','𝓫'=>'b','𝔟'=>'b','𝕓'=>'b','𝖇'=>'b','𝖻'=>'b','𝗯'=>'b','𝘣'=>'b','𝙗'=>'b','𝚋'=>'b','ɓ'=>'b̔','ƃ'=>'b̄','ƀ'=>'b̵','c'=>'c','ⅽ'=>'c','𝐜'=>'c','𝑐'=>'c','𝒄'=>'c','𝒸'=>'c','𝓬'=>'c','𝔠'=>'c','𝕔'=>'c','𝖈'=>'c','𝖼'=>'c','𝗰'=>'c','𝘤'=>'c','𝙘'=>'c','𝚌'=>'c','𝛓'=>'c','𝜍'=>'c','𝝇'=>'c','𝞁'=>'c','𝞻'=>'c','℅'=>'c/o','℆'=>'c/u','d'=>'d','ⅾ'=>'d','ⅆ'=>'d','𝐝'=>'d','𝑑'=>'d','𝒅'=>'d','𝒹'=>'d','𝓭'=>'d','𝔡'=>'d','𝕕'=>'d','𝖉'=>'d','𝖽'=>'d','𝗱'=>'d','𝘥'=>'d','𝙙'=>'d','𝚍'=>'d','ɗ'=>'d̔','ƌ'=>'d̄','ɖ'=>'d̢','đ'=>'d̵','dz'=>'dz','dž'=>'dž','e'=>'e','ℯ'=>'e','ⅇ'=>'e','𝐞'=>'e','𝑒'=>'e','𝒆'=>'e','𝓮'=>'e','𝔢'=>'e','𝕖'=>'e','𝖊'=>'e','𝖾'=>'e','𝗲'=>'e','𝘦'=>'e','𝙚'=>'e','𝚎'=>'e','ⴹ'=>'E','ə'=>'ǝ','ɚ'=>'ǝ˞','⋴'=>'ɛ','𝛆'=>'ɛ','𝛜'=>'ɛ','𝜀'=>'ɛ','𝜖'=>'ɛ','𝜺'=>'ɛ','𝝐'=>'ɛ','𝝴'=>'ɛ','𝞊'=>'ɛ','𝞮'=>'ɛ','𝟄'=>'ɛ','f'=>'f','𝐟'=>'f','𝑓'=>'f','𝒇'=>'f','𝒻'=>'f','𝓯'=>'f','𝔣'=>'f','𝕗'=>'f','𝖋'=>'f','𝖿'=>'f','𝗳'=>'f','𝘧'=>'f','𝙛'=>'f','𝚏'=>'f','ƒ'=>'f̡','g'=>'g','ℊ'=>'g','𝐠'=>'g','𝑔'=>'g','𝒈'=>'g','𝓰'=>'g','𝔤'=>'g','𝕘'=>'g','𝖌'=>'g','𝗀'=>'g','𝗴'=>'g','𝘨'=>'g','𝙜'=>'g','𝚐'=>'g','ɡ'=>'g','ɠ'=>'g̔','ǥ'=>'g̵','h'=>'h','ℎ'=>'h','𝐡'=>'h','𝒉'=>'h','𝒽'=>'h','𝓱'=>'h','𝔥'=>'h','𝕙'=>'h','𝖍'=>'h','𝗁'=>'h','𝗵'=>'h','𝘩'=>'h','𝙝'=>'h','𝚑'=>'h','ɦ'=>'h̔','ħ'=>'h̵','ℏ'=>'h̵','῾'=>'ʻ','‘'=>'ʻ','‛'=>'ʻ','ʽ'=>'ʻ','⍳'=>'i','i'=>'i','ⅰ'=>'i','ℹ'=>'i','ⅈ'=>'i','𝐢'=>'i','𝑖'=>'i','𝒊'=>'i','𝒾'=>'i','𝓲'=>'i','𝔦'=>'i','𝕚'=>'i','𝖎'=>'i','𝗂'=>'i','𝗶'=>'i','𝘪'=>'i','𝙞'=>'i','𝚒'=>'i','ı'=>'i','𝚤'=>'i','ɪ'=>'i','ɩ'=>'i','𝛊'=>'i','𝜄'=>'i','𝜾'=>'i','𝝸'=>'i','𝞲'=>'i','ɨ'=>'i̵','ⅱ'=>'ii','ⅲ'=>'iii','ij'=>'ij','ⅳ'=>'iv','ⅸ'=>'ix','j'=>'j','ⅉ'=>'j','𝐣'=>'j','𝑗'=>'j','𝒋'=>'j','𝒿'=>'j','𝓳'=>'j','𝔧'=>'j','𝕛'=>'j','𝖏'=>'j','𝗃'=>'j','𝗷'=>'j','𝘫'=>'j','𝙟'=>'j','𝚓'=>'j','ϳ'=>'j','𝚥'=>'ȷ','k'=>'k','𝐤'=>'k','𝑘'=>'k','𝒌'=>'k','𝓀'=>'k','𝓴'=>'k','𝔨'=>'k','𝕜'=>'k','𝖐'=>'k','𝗄'=>'k','𝗸'=>'k','𝘬'=>'k','𝙠'=>'k','𝚔'=>'k','ƙ'=>'k̔','m'=>'m','ⅿ'=>'m','𝐦'=>'m','𝑚'=>'m','𝒎'=>'m','𝓂'=>'m','𝓶'=>'m','𝔪'=>'m','𝕞'=>'m','𝖒'=>'m','𝗆'=>'m','𝗺'=>'m','𝘮'=>'m','𝙢'=>'m','𝚖'=>'m','ɱ'=>'m̡','n'=>'n','𝐧'=>'n','𝑛'=>'n','𝒏'=>'n','𝓃'=>'n','𝓷'=>'n','𝔫'=>'n','𝕟'=>'n','𝖓'=>'n','𝗇'=>'n','𝗻'=>'n','𝘯'=>'n','𝙣'=>'n','𝚗'=>'n','𝐍'=>'N','𝑁'=>'N','𝑵'=>'N','𝒩'=>'N','𝓝'=>'N','𝔑'=>'N','𝕹'=>'N','𝖭'=>'N','𝗡'=>'N','𝘕'=>'N','𝙉'=>'N','𝙽'=>'N','𝚴'=>'N','𝛮'=>'N','𝜨'=>'N','𝝢'=>'N','𝞜'=>'N','ɲ'=>'ņ','ɳ'=>'n̢','ƞ'=>'n̩','𝛈'=>'n̩','𝜂'=>'n̩','𝜼'=>'n̩','𝝶'=>'n̩','𝞰'=>'n̩','nj'=>'nj','o'=>'o','ℴ'=>'o','𝐨'=>'o','𝑜'=>'o','𝒐'=>'o','𝓸'=>'o','𝔬'=>'o','𝕠'=>'o','𝖔'=>'o','𝗈'=>'o','𝗼'=>'o','𝘰'=>'o','𝙤'=>'o','𝚘'=>'o','ᴏ'=>'o','𝛐'=>'o','𝜊'=>'o','𝝄'=>'o','𝝾'=>'o','𝞸'=>'o','ɵ'=>'o̵','ǿ'=>'ó̵','ø'=>'o̷','œ'=>'oe','ơ'=>'oʼ','⍴'=>'p','p'=>'p','𝐩'=>'p','𝑝'=>'p','𝒑'=>'p','𝓅'=>'p','𝓹'=>'p','𝔭'=>'p','𝕡'=>'p','𝖕'=>'p','𝗉'=>'p','𝗽'=>'p','𝘱'=>'p','𝙥'=>'p','𝚙'=>'p','𝛒'=>'p','𝛠'=>'p','𝜌'=>'p','𝜚'=>'p','𝝆'=>'p','𝝔'=>'p','𝞀'=>'p','𝞎'=>'p','𝞺'=>'p','𝟈'=>'p','ƥ'=>'p̔','q'=>'q','𝐪'=>'q','𝑞'=>'q','𝒒'=>'q','𝓆'=>'q','𝓺'=>'q','𝔮'=>'q','𝕢'=>'q','𝖖'=>'q','𝗊'=>'q','𝗾'=>'q','𝘲'=>'q','𝙦'=>'q','𝚚'=>'q','𝐐'=>'Q','𝑄'=>'Q','𝑸'=>'Q','𝒬'=>'Q','𝓠'=>'Q','𝔔'=>'Q','𝕼'=>'Q','𝖰'=>'Q','𝗤'=>'Q','𝘘'=>'Q','𝙌'=>'Q','𝚀'=>'Q','ʠ'=>'q̔','𝛋'=>'ĸ','𝛞'=>'ĸ','𝜅'=>'ĸ','𝜘'=>'ĸ','𝜿'=>'ĸ','𝝒'=>'ĸ','𝝹'=>'ĸ','𝞌'=>'ĸ','𝞳'=>'ĸ','𝟆'=>'ĸ','r'=>'r','𝐫'=>'r','𝑟'=>'r','𝒓'=>'r','𝓇'=>'r','𝓻'=>'r','𝔯'=>'r','𝕣'=>'r','𝖗'=>'r','𝗋'=>'r','𝗿'=>'r','𝘳'=>'r','𝙧'=>'r','𝚛'=>'r','ɽ'=>'r̢','ɼ'=>'r̩','s'=>'s','𝐬'=>'s','𝑠'=>'s','𝒔'=>'s','𝓈'=>'s','𝓼'=>'s','𝔰'=>'s','𝕤'=>'s','𝖘'=>'s','𝗌'=>'s','𝘀'=>'s','𝘴'=>'s','𝙨'=>'s','𝚜'=>'s','ƽ'=>'s','ʂ'=>'s̢','∫'=>'ʃ','∬'=>'ʃʃ','∭'=>'ʃʃʃ','⨌'=>'ʃʃʃʃ','t'=>'t','𝐭'=>'t','𝑡'=>'t','𝒕'=>'t','𝓉'=>'t','𝓽'=>'t','𝔱'=>'t','𝕥'=>'t','𝖙'=>'t','𝗍'=>'t','𝘁'=>'t','𝘵'=>'t','𝙩'=>'t','𝚝'=>'t','𝑇'=>'T','𝑻'=>'T','𝒯'=>'T','𝓣'=>'T','𝔗'=>'T','𝕋'=>'T','𝕿'=>'T','𝖳'=>'T','𝗧'=>'T','𝘛'=>'T','𝙏'=>'T','𝚃'=>'T','𝚻'=>'T','𝛵'=>'T','𝜯'=>'T','𝝩'=>'T','𝞣'=>'T','ƭ'=>'t̔','ț'=>'ţ','ƫ'=>'ţ','ŧ'=>'t̵','u'=>'u','𝐮'=>'u','𝑢'=>'u','𝒖'=>'u','𝓊'=>'u','𝓾'=>'u','𝔲'=>'u','𝕦'=>'u','𝖚'=>'u','𝗎'=>'u','𝘂'=>'u','𝘶'=>'u','𝙪'=>'u','𝚞'=>'u','ʊ'=>'u','ʋ'=>'u','𝛖'=>'u','𝜐'=>'u','𝝊'=>'u','𝞄'=>'u','𝞾'=>'u','𝑈'=>'U','𝑼'=>'U','𝒰'=>'U','𝓤'=>'U','𝔘'=>'U','𝕌'=>'U','𝖀'=>'U','𝖴'=>'U','𝗨'=>'U','𝘜'=>'U','𝙐'=>'U','𝚄'=>'U','v'=>'v','ⅴ'=>'v','𝐯'=>'v','𝑣'=>'v','𝒗'=>'v','𝓋'=>'v','𝓿'=>'v','𝔳'=>'v','𝕧'=>'v','𝖛'=>'v','𝗏'=>'v','𝘃'=>'v','𝘷'=>'v','𝙫'=>'v','𝚟'=>'v','𝛎'=>'v','𝜈'=>'v','𝝂'=>'v','𝝼'=>'v','𝞶'=>'v','ⅵ'=>'vi','ⅶ'=>'vii','ⅷ'=>'viii','ɯ'=>'w','w'=>'w','𝐰'=>'w','𝑤'=>'w','𝒘'=>'w','𝓌'=>'w','𝔀'=>'w','𝔴'=>'w','𝕨'=>'w','𝖜'=>'w','𝗐'=>'w','𝘄'=>'w','𝘸'=>'w','𝙬'=>'w','𝚠'=>'w','𝑊'=>'W','𝑾'=>'W','𝒲'=>'W','𝓦'=>'W','𝔚'=>'W','𝕎'=>'W','𝖂'=>'W','𝖶'=>'W','𝗪'=>'W','𝘞'=>'W','𝙒'=>'W','𝚆'=>'W','×'=>'x','x'=>'x','ⅹ'=>'x','𝐱'=>'x','𝑥'=>'x','𝒙'=>'x','𝓍'=>'x','𝔁'=>'x','𝔵'=>'x','𝕩'=>'x','𝖝'=>'x','𝗑'=>'x','𝘅'=>'x','𝘹'=>'x','𝙭'=>'x','𝚡'=>'x','᙭'=>'X','𝑋'=>'X','𝑿'=>'X','𝒳'=>'X','𝓧'=>'X','𝔛'=>'X','𝕏'=>'X','𝖃'=>'X','𝖷'=>'X','𝗫'=>'X','𝘟'=>'X','𝙓'=>'X','𝚇'=>'X','𝚾'=>'X','𝛸'=>'X','𝜲'=>'X','𝝬'=>'X','𝞦'=>'X','ⅺ'=>'xi','ⅻ'=>'xii','y'=>'y','𝐲'=>'y','𝑦'=>'y','𝒚'=>'y','𝓎'=>'y','𝔂'=>'y','𝔶'=>'y','𝕪'=>'y','𝖞'=>'y','𝗒'=>'y','𝘆'=>'y','𝘺'=>'y','𝙮'=>'y','𝚢'=>'y','ƴ'=>'y̔','z'=>'z','𝐳'=>'z','𝑧'=>'z','𝒛'=>'z','𝓏'=>'z','𝔃'=>'z','𝔷'=>'z','𝕫'=>'z','𝖟'=>'z','𝗓'=>'z','𝘇'=>'z','𝘻'=>'z','𝙯'=>'z','𝚣'=>'z','ȥ'=>'z̡','ʐ'=>'z̢','ƶ'=>'z̵','ȝ'=>'ʒ','?'=>'ʔ','?'=>'ʔ','⁇'=>'ʔʔ','⁈'=>'ʔǃ','᾽'=>'ʼ','᾿'=>'ʼ','’'=>'ʼ','ʾ'=>'ʼ','!'=>'ǃ','!'=>'ǃ','⁉'=>'ǃʔ','‼'=>'ǃǃ','⍺'=>'α','𝛂'=>'α','𝛼'=>'α','𝜶'=>'α','𝝰'=>'α','𝞪'=>'α','𝛃'=>'β','𝛽'=>'β','𝜷'=>'β','𝝱'=>'β','𝞫'=>'β','ℽ'=>'γ','𝛄'=>'γ','𝛾'=>'γ','𝜸'=>'γ','𝝲'=>'γ','𝞬'=>'γ','𝛅'=>'δ','𝛿'=>'δ','𝜹'=>'δ','𝝳'=>'δ','𝞭'=>'δ','𝟋'=>'ϝ','𝛇'=>'ζ','𝜁'=>'ζ','𝜻'=>'ζ','𝝵'=>'ζ','𝞯'=>'ζ','⍬'=>'θ','𝛉'=>'θ','𝛝'=>'θ','𝜃'=>'θ','𝜗'=>'θ','𝜽'=>'θ','𝝑'=>'θ','𝝷'=>'θ','𝞋'=>'θ','𝞱'=>'θ','𝟅'=>'θ','𝛌'=>'λ','𝜆'=>'λ','𝝀'=>'λ','𝝺'=>'λ','𝞴'=>'λ','𝛬'=>'Λ','𝜦'=>'Λ','𝝠'=>'Λ','𝞚'=>'Λ','𝛍'=>'μ','𝜇'=>'μ','𝝁'=>'μ','𝝻'=>'μ','𝞵'=>'μ','𝛏'=>'ξ','𝜉'=>'ξ','𝝃'=>'ξ','𝝽'=>'ξ','𝞷'=>'ξ','𝛯'=>'Ξ','𝜩'=>'Ξ','𝝣'=>'Ξ','𝞝'=>'Ξ','ℼ'=>'π','𝛑'=>'π','𝛡'=>'π','𝜋'=>'π','𝜛'=>'π','𝝅'=>'π','𝝕'=>'π','𝝿'=>'π','𝞏'=>'π','𝞹'=>'π','𝟉'=>'π','ᴨ'=>'π','∏'=>'Π','𝚷'=>'Π','𝛱'=>'Π','𝜫'=>'Π','𝝥'=>'Π','𝞟'=>'Π','𝛔'=>'σ','𝜎'=>'σ','𝝈'=>'σ','𝞂'=>'σ','𝞼'=>'σ','𝛕'=>'τ','𝜏'=>'τ','𝝉'=>'τ','𝞃'=>'τ','𝞽'=>'τ','𝐘'=>'Y','𝑌'=>'Y','𝒀'=>'Y','𝒴'=>'Y','𝓨'=>'Y','𝔜'=>'Y','𝕐'=>'Y','𝖄'=>'Y','𝖸'=>'Y','𝗬'=>'Y','𝘠'=>'Y','𝙔'=>'Y','𝚈'=>'Y','𝚼'=>'Y','𝛶'=>'Y','𝜰'=>'Y','𝝪'=>'Y','𝞤'=>'Y','𝛗'=>'φ','𝛟'=>'φ','𝜑'=>'φ','𝜙'=>'φ','𝝋'=>'φ','𝝓'=>'φ','𝞅'=>'φ','𝞍'=>'φ','𝞿'=>'φ','𝟇'=>'φ','𝛷'=>'Φ','𝜱'=>'Φ','𝝫'=>'Φ','𝞥'=>'Φ','𝛘'=>'χ','𝜒'=>'χ','𝝌'=>'χ','𝞆'=>'χ','𝟀'=>'χ','𝛙'=>'ψ','𝜓'=>'ψ','𝝍'=>'ψ','𝞇'=>'ψ','𝟁'=>'ψ','𝛹'=>'Ψ','𝜳'=>'Ψ','𝝭'=>'Ψ','𝞧'=>'Ψ','⍵'=>'ω','𝛚'=>'ω','𝜔'=>'ω','𝝎'=>'ω','𝞈'=>'ω','𝟂'=>'ω','ӕ'=>'ae','ғ'=>'r̵','ґ'=>'rᑊ','җ'=>'ж̩','ҙ'=>'з̡','ӏ'=>'i','ҋ'=>'й̡','қ'=>'ĸ̩','ҟ'=>'ĸ̵','ᴫ'=>'л','ӆ'=>'л̡','ӎ'=>'м̡','ӊ'=>'н̡','ӈ'=>'н̡','ң'=>'н̩','ө'=>'o̵','ѳ'=>'o̵','ҫ'=>'c̡','ҭ'=>'т̩','ү'=>'y','ұ'=>'y̵','ћ'=>'h̵','ѽ'=>'ѡ҃','ӌ'=>'ҷ','ҿ'=>'ҽ̢','ҍ'=>'Ь̵','զ'=>'q','ռ'=>'n','ℵ'=>'א','ﬡ'=>'א','אָ'=>'אַ','אּ'=>'אַ','ﭏ'=>'אל','ℶ'=>'ב','ℷ'=>'ג','ℸ'=>'ד','ﬢ'=>'ד','ﬣ'=>'ה','ﬤ'=>'כ','ﬥ'=>'ל','ﬦ'=>'ם','ﬠ'=>'ע','ﬧ'=>'ר','ﬨ'=>'ת','ﺀ'=>'ء','ﺂ'=>'آ','ﺁ'=>'آ','ﺄ'=>'أ','ﺃ'=>'أ','ٵ'=>'أ','ﭑ'=>'ٱ','ﭐ'=>'ٱ','ﺆ'=>'ؤ','ﺅ'=>'ؤ','ٶ'=>'ؤ','ﺈ'=>'إ','ﺇ'=>'إ','ﺋ'=>'ئ','ﺌ'=>'ئ','ﺊ'=>'ئ','ﺉ'=>'ئ','ﯫ'=>'ئا','ﯪ'=>'ئا','ﯸ'=>'ئٻ','ﯷ'=>'ئٻ','ﯶ'=>'ئٻ','ﲗ'=>'ئج','ﰀ'=>'ئج','ﲘ'=>'ئح','ﰁ'=>'ئح','ﲙ'=>'ئخ','ﱤ'=>'ئر','ﱥ'=>'ئز','ﲚ'=>'ئم','ﳟ'=>'ئم','ﱦ'=>'ئم','ﰂ'=>'ئم','ﱧ'=>'ئن','ﲛ'=>'ئه','ﳠ'=>'ئه','ﯭ'=>'ئه','ﯬ'=>'ئه','ﯯ'=>'ئو','ﯮ'=>'ئو','ﯳ'=>'ئۆ','ﯲ'=>'ئۆ','ﯱ'=>'ئۇ','ﯰ'=>'ئۇ','ﯵ'=>'ئۈ','ﯴ'=>'ئۈ','ﯻ'=>'ئى','ﯺ'=>'ئى','ﱨ'=>'ئى','ﯹ'=>'ئى','ﰃ'=>'ئى','ﱩ'=>'ئى','ﰄ'=>'ئى','ﺎ'=>'ا','ﺍ'=>'ا','ﴼ'=>'اً','ﴽ'=>'اً','ﷳ'=>'اكبر','ﷲ'=>'الله','ﺑ'=>'ب','ﺒ'=>'ب','ﺐ'=>'ب','ﺏ'=>'ب','ﲜ'=>'بج','ﰅ'=>'بج','ﲝ'=>'بح','ﰆ'=>'بح','ﷂ'=>'بحى','ﲞ'=>'بخ','ﰇ'=>'بخ','ﶞ'=>'بخى','ﱪ'=>'بر','ﱫ'=>'بز','ﲟ'=>'بم','ﳡ'=>'بم','ﱬ'=>'بم','ﰈ'=>'بم','ﱭ'=>'بن','ﲠ'=>'به','ﳢ'=>'به','ﱮ'=>'بى','ﰉ'=>'بى','ﱯ'=>'بى','ﰊ'=>'بى','ﭔ'=>'ٻ','ﭕ'=>'ٻ','ﭓ'=>'ٻ','ﭒ'=>'ٻ','ې'=>'ٻ','ﯦ'=>'ٻ','ﯧ'=>'ٻ','ﯥ'=>'ٻ','ﯤ'=>'ٻ','ﭘ'=>'پ','ﭙ'=>'پ','ﭗ'=>'پ','ﭖ'=>'پ','ﭜ'=>'ڀ','ﭝ'=>'ڀ','ﭛ'=>'ڀ','ﭚ'=>'ڀ','ﺔ'=>'ة','ﺓ'=>'ة','ﺗ'=>'ت','ﺘ'=>'ت','ﺖ'=>'ت','ﺕ'=>'ت','ﲡ'=>'تج','ﰋ'=>'تج','ﵐ'=>'تجم','ﶠ'=>'تجى','ﶟ'=>'تجى','ﲢ'=>'تح','ﰌ'=>'تح','ﵒ'=>'تحج','ﵑ'=>'تحج','ﵓ'=>'تحم','ﲣ'=>'تخ','ﰍ'=>'تخ','ﵔ'=>'تخم','ﶢ'=>'تخى','ﶡ'=>'تخى','ﱰ'=>'تر','ﱱ'=>'تز','ﲤ'=>'تم','ﳣ'=>'تم','ﱲ'=>'تم','ﰎ'=>'تم','ﵕ'=>'تمج','ﵖ'=>'تمح','ﵗ'=>'تمخ','ﶤ'=>'تمى','ﶣ'=>'تمى','ﱳ'=>'تن','ﲥ'=>'ته','ﳤ'=>'ته','ﱴ'=>'تى','ﰏ'=>'تى','ﱵ'=>'تى','ﰐ'=>'تى','ﺛ'=>'ث','ﺜ'=>'ث','ﺚ'=>'ث','ﺙ'=>'ث','ﰑ'=>'ثج','ﱶ'=>'ثر','ﱷ'=>'ثز','ﲦ'=>'ثم','ﳥ'=>'ثم','ﱸ'=>'ثم','ﰒ'=>'ثم','ﱹ'=>'ثن','ﳦ'=>'ثه','ﱺ'=>'ثى','ﰓ'=>'ثى','ﱻ'=>'ثى','ﰔ'=>'ثى','ﭨ'=>'ٹ','ﭩ'=>'ٹ','ﭧ'=>'ٹ','ﭦ'=>'ٹ','ڻ'=>'ٹ','ﮢ'=>'ٹ','ﮣ'=>'ٹ','ﮡ'=>'ٹ','ﮠ'=>'ٹ','ﭠ'=>'ٺ','ﭡ'=>'ٺ','ﭟ'=>'ٺ','ﭞ'=>'ٺ','ﭤ'=>'ٿ','ﭥ'=>'ٿ','ﭣ'=>'ٿ','ﭢ'=>'ٿ','ﺟ'=>'ج','ﺠ'=>'ج','ﺞ'=>'ج','ﺝ'=>'ج','ﲧ'=>'جح','ﰕ'=>'جح','ﶦ'=>'جحى','ﶾ'=>'جحى','ﷻ'=>'جل جلاله','ﲨ'=>'جم','ﰖ'=>'جم','ﵙ'=>'جمح','ﵘ'=>'جمح','ﶧ'=>'جمى','ﶥ'=>'جمى','ﴝ'=>'جى','ﴁ'=>'جى','ﴞ'=>'جى','ﴂ'=>'جى','ﭸ'=>'ڃ','ﭹ'=>'ڃ','ﭷ'=>'ڃ','ﭶ'=>'ڃ','ﭴ'=>'ڄ','ﭵ'=>'ڄ','ﭳ'=>'ڄ','ﭲ'=>'ڄ','ﭼ'=>'چ','ﭽ'=>'چ','ﭻ'=>'چ','ﭺ'=>'چ','ﮀ'=>'ڇ','ﮁ'=>'ڇ','ﭿ'=>'ڇ','ﭾ'=>'ڇ','ﺣ'=>'ح','ﺤ'=>'ح','ﺢ'=>'ح','ﺡ'=>'ح','ﲩ'=>'حج','ﰗ'=>'حج','ﶿ'=>'حجى','ﲪ'=>'حم','ﰘ'=>'حم','ﵛ'=>'حمى','ﵚ'=>'حمى','ﴛ'=>'حى','ﳿ'=>'حى','ﴜ'=>'حى','ﴀ'=>'حى','ﺧ'=>'خ','ﺨ'=>'خ','ﺦ'=>'خ','ﺥ'=>'خ','ﲫ'=>'خج','ﰙ'=>'خج','ﰚ'=>'خح','ﲬ'=>'خم','ﰛ'=>'خم','ﴟ'=>'خى','ﴃ'=>'خى','ﴠ'=>'خى','ﴄ'=>'خى','ﺪ'=>'د','ﺩ'=>'د','ﺬ'=>'ذ','ﺫ'=>'ذ','ﱛ'=>'ذٰ','ﮉ'=>'ڈ','ﮈ'=>'ڈ','ﮅ'=>'ڌ','ﮄ'=>'ڌ','ﮃ'=>'ڍ','ﮂ'=>'ڍ','ﮇ'=>'ڎ','ﮆ'=>'ڎ','ﺮ'=>'ر','ﺭ'=>'ر','ﱜ'=>'رٰ','ﷶ'=>'رسول','﷼'=>'رىال','ﺰ'=>'ز','ﺯ'=>'ز','ﮍ'=>'ڑ','ﮌ'=>'ڑ','ﮋ'=>'ژ','ﮊ'=>'ژ','ﺳ'=>'س','ﺴ'=>'س','ﺲ'=>'س','ﺱ'=>'س','ﲭ'=>'سج','ﴴ'=>'سج','ﰜ'=>'سج','ﵝ'=>'سجح','ﵞ'=>'سجى','ﲮ'=>'سح','ﴵ'=>'سح','ﰝ'=>'سح','ﵜ'=>'سحج','ﲯ'=>'سخ','ﴶ'=>'سخ','ﰞ'=>'سخ','ﶨ'=>'سخى','ﷆ'=>'سخى','ﴪ'=>'سر','ﴎ'=>'سر','ﲰ'=>'سم','ﳧ'=>'سم','ﰟ'=>'سم','ﵡ'=>'سمج','ﵠ'=>'سمح','ﵟ'=>'سمح','ﵣ'=>'سمم','ﵢ'=>'سمم','ﴱ'=>'سه','ﳨ'=>'سه','ﴗ'=>'سى','ﳻ'=>'سى','ﴘ'=>'سى','ﳼ'=>'سى','ﺷ'=>'ش','ﺸ'=>'ش','ﺶ'=>'ش','ﺵ'=>'ش','ﴭ'=>'شج','ﴷ'=>'شج','ﴥ'=>'شج','ﴉ'=>'شج','ﵩ'=>'شجى','ﴮ'=>'شح','ﴸ'=>'شح','ﴦ'=>'شح','ﴊ'=>'شح','ﵨ'=>'شحم','ﵧ'=>'شحم','ﶪ'=>'شحى','ﴯ'=>'شخ','ﴹ'=>'شخ','ﴧ'=>'شخ','ﴋ'=>'شخ','ﴩ'=>'شر','ﴍ'=>'شر','ﴰ'=>'شم','ﳩ'=>'شم','ﴨ'=>'شم','ﴌ'=>'شم','ﵫ'=>'شمخ','ﵪ'=>'شمخ','ﵭ'=>'شمم','ﵬ'=>'شمم','ﴲ'=>'شه','ﳪ'=>'شه','ﴙ'=>'شى','ﳽ'=>'شى','ﴚ'=>'شى','ﳾ'=>'شى','ﺻ'=>'ص','ﺼ'=>'ص','ﺺ'=>'ص','ﺹ'=>'ص','ﲱ'=>'صح','ﰠ'=>'صح','ﵥ'=>'صحح','ﵤ'=>'صحح','ﶩ'=>'صحى','ﲲ'=>'صخ','ﴫ'=>'صر','ﴏ'=>'صر','ﷵ'=>'صلعم','ﷹ'=>'صلى','ﷺ'=>'صلى الله علىه وسلم','ﷰ'=>'صلے','ﲳ'=>'صم','ﰡ'=>'صم','ﷅ'=>'صمم','ﵦ'=>'صمم','ﴡ'=>'صى','ﴅ'=>'صى','ﴢ'=>'صى','ﴆ'=>'صى','ﺿ'=>'ض','ﻀ'=>'ض','ﺾ'=>'ض','ﺽ'=>'ض','ﲴ'=>'ضج','ﰢ'=>'ضج','ﲵ'=>'ضح','ﰣ'=>'ضح','ﵮ'=>'ضحى','ﶫ'=>'ضحى','ﲶ'=>'ضخ','ﰤ'=>'ضخ','ﵰ'=>'ضخم','ﵯ'=>'ضخم','ﴬ'=>'ضر','ﴐ'=>'ضر','ﲷ'=>'ضم','ﰥ'=>'ضم','ﴣ'=>'ضى','ﴇ'=>'ضى','ﴤ'=>'ضى','ﴈ'=>'ضى','ﻃ'=>'ط','ﻄ'=>'ط','ﻂ'=>'ط','ﻁ'=>'ط','ﲸ'=>'طح','ﰦ'=>'طح','ﴳ'=>'طم','ﴺ'=>'طم','ﰧ'=>'طم','ﵲ'=>'طمح','ﵱ'=>'طمح','ﵳ'=>'طمم','ﵴ'=>'طمى','ﴑ'=>'طى','ﳵ'=>'طى','ﴒ'=>'طى','ﳶ'=>'طى','ﻇ'=>'ظ','ﻈ'=>'ظ','ﻆ'=>'ظ','ﻅ'=>'ظ','ﲹ'=>'ظم','ﴻ'=>'ظم','ﰨ'=>'ظم','ﻋ'=>'ع','ﻌ'=>'ع','ﻊ'=>'ع','ﻉ'=>'ع','ﲺ'=>'عج','ﰩ'=>'عج','ﷄ'=>'عجم','ﵵ'=>'عجم','ﷷ'=>'علىه','ﲻ'=>'عم','ﰪ'=>'عم','ﵷ'=>'عمم','ﵶ'=>'عمم','ﵸ'=>'عمى','ﶶ'=>'عمى','ﴓ'=>'عى','ﳷ'=>'عى','ﴔ'=>'عى','ﳸ'=>'عى','ﻏ'=>'غ','ﻐ'=>'غ','ﻎ'=>'غ','ﻍ'=>'غ','ﲼ'=>'غج','ﰫ'=>'غج','ﲽ'=>'غم','ﰬ'=>'غم','ﵹ'=>'غمم','ﵻ'=>'غمى','ﵺ'=>'غمى','ﴕ'=>'غى','ﳹ'=>'غى','ﴖ'=>'غى','ﳺ'=>'غى','ﻓ'=>'ف','ﻔ'=>'ف','ﻒ'=>'ف','ﻑ'=>'ف','ﲾ'=>'فج','ﰭ'=>'فج','ﲿ'=>'فح','ﰮ'=>'فح','ﳀ'=>'فخ','ﰯ'=>'فخ','ﵽ'=>'فخم','ﵼ'=>'فخم','ﳁ'=>'فم','ﰰ'=>'فم','ﷁ'=>'فمى','ﱼ'=>'فى','ﰱ'=>'فى','ﱽ'=>'فى','ﰲ'=>'فى','ﭬ'=>'ڤ','ﭭ'=>'ڤ','ﭫ'=>'ڤ','ﭪ'=>'ڤ','ﭰ'=>'ڦ','ﭱ'=>'ڦ','ﭯ'=>'ڦ','ﭮ'=>'ڦ','ﻗ'=>'ق','ﻘ'=>'ق','ﻖ'=>'ق','ﻕ'=>'ق','ﳂ'=>'قح','ﰳ'=>'قح','ﷱ'=>'قلے','ﳃ'=>'قم','ﰴ'=>'قم','ﶴ'=>'قمح','ﵾ'=>'قمح','ﵿ'=>'قمم','ﶲ'=>'قمى','ﱾ'=>'قى','ﰵ'=>'قى','ﱿ'=>'قى','ﰶ'=>'قى','ﻛ'=>'ك','ﻜ'=>'ك','ﻚ'=>'ك','ﻙ'=>'ك','ک'=>'ك','ﮐ'=>'ك','ﮑ'=>'ك','ﮏ'=>'ك','ﮎ'=>'ك','ﲀ'=>'كا','ﰷ'=>'كا','ﳄ'=>'كج','ﰸ'=>'كج','ﳅ'=>'كح','ﰹ'=>'كح','ﳆ'=>'كخ','ﰺ'=>'كخ','ﳇ'=>'كل','ﳫ'=>'كل','ﲁ'=>'كل','ﰻ'=>'كل','ﳈ'=>'كم','ﳬ'=>'كم','ﲂ'=>'كم','ﰼ'=>'كم','ﷃ'=>'كمم','ﶻ'=>'كمم','ﶷ'=>'كمى','ﲃ'=>'كى','ﰽ'=>'كى','ﲄ'=>'كى','ﰾ'=>'كى','ﯕ'=>'ڭ','ﯖ'=>'ڭ','ﯔ'=>'ڭ','ﯓ'=>'ڭ','ﮔ'=>'گ','ﮕ'=>'گ','ﮓ'=>'گ','ﮒ'=>'گ','ﮜ'=>'ڱ','ﮝ'=>'ڱ','ﮛ'=>'ڱ','ﮚ'=>'ڱ','ﮘ'=>'ڳ','ﮙ'=>'ڳ','ﮗ'=>'ڳ','ﮖ'=>'ڳ','ﻟ'=>'ل','ﻠ'=>'ل','ﻞ'=>'ل','ﻝ'=>'ل','ﻶ'=>'لآ','ﻵ'=>'لآ','ﻸ'=>'لأ','ﻷ'=>'لأ','ﻺ'=>'لإ','ﻹ'=>'لإ','ﻼ'=>'لا','ﻻ'=>'لا','ﳉ'=>'لج','ﰿ'=>'لج','ﶃ'=>'لجج','ﶄ'=>'لجج','ﶺ'=>'لجم','ﶼ'=>'لجم','ﶬ'=>'لجى','ﳊ'=>'لح','ﱀ'=>'لح','ﶵ'=>'لحم','ﶀ'=>'لحم','ﶂ'=>'لحى','ﶁ'=>'لحى','ﳋ'=>'لخ','ﱁ'=>'لخ','ﶆ'=>'لخم','ﶅ'=>'لخم','ﳌ'=>'لم','ﳭ'=>'لم','ﲅ'=>'لم','ﱂ'=>'لم','ﶈ'=>'لمح','ﶇ'=>'لمح','ﶭ'=>'لمى','ﳍ'=>'له','ﲆ'=>'لى','ﱃ'=>'لى','ﲇ'=>'لى','ﱄ'=>'لى','ﻣ'=>'م','ﻤ'=>'م','ﻢ'=>'م','ﻡ'=>'م','ﲈ'=>'ما','ﳎ'=>'مج','ﱅ'=>'مج','ﶌ'=>'مجح','ﶒ'=>'مجخ','ﶍ'=>'مجم','ﷀ'=>'مجى','ﳏ'=>'مح','ﱆ'=>'مح','ﶉ'=>'محج','ﶊ'=>'محم','ﷴ'=>'محمد','ﶋ'=>'محى','ﳐ'=>'مخ','ﱇ'=>'مخ','ﶎ'=>'مخج','ﶏ'=>'مخم','ﶹ'=>'مخى','ﳑ'=>'مم','ﲉ'=>'مم','ﱈ'=>'مم','ﶱ'=>'ممى','ﱉ'=>'مى','ﱊ'=>'مى','ﻧ'=>'ن','ﻨ'=>'ن','ﻦ'=>'ن','ﻥ'=>'ن','ﳒ'=>'نج','ﱋ'=>'نج','ﶸ'=>'نجح','ﶽ'=>'نجح','ﶘ'=>'نجم','ﶗ'=>'نجم','ﶙ'=>'نجى','ﷇ'=>'نجى','ﳓ'=>'نح','ﱌ'=>'نح','ﶕ'=>'نحم','ﶖ'=>'نحى','ﶳ'=>'نحى','ﳔ'=>'نخ','ﱍ'=>'نخ','ﲊ'=>'نر','ﲋ'=>'نز','ﳕ'=>'نم','ﳮ'=>'نم','ﲌ'=>'نم','ﱎ'=>'نم','ﶛ'=>'نمى','ﶚ'=>'نمى','ﲍ'=>'نن','ﳖ'=>'نه','ﳯ'=>'نه','ﲎ'=>'نى','ﱏ'=>'نى','ﲏ'=>'نى','ﱐ'=>'نى','ﮟ'=>'ں','ﮞ'=>'ں','ﻫ'=>'ه','ﻬ'=>'ه','ﻪ'=>'ه','ﻩ'=>'ه','ھ'=>'ه','ﮬ'=>'ه','ﮭ'=>'ه','ﮫ'=>'ه','ﮪ'=>'ه','ہ'=>'ه','ﮨ'=>'ه','ﮩ'=>'ه','ﮧ'=>'ه','ﮦ'=>'ه','ە'=>'ه','ﳙ'=>'هٰ','ﳗ'=>'هج','ﱑ'=>'هج','ﳘ'=>'هم','ﱒ'=>'هم','ﶓ'=>'همج','ﶔ'=>'همم','ﱓ'=>'هى','ﱔ'=>'هى','ﮥ'=>'ۀ','ﮤ'=>'ۀ','ﻮ'=>'و','ﻭ'=>'و','ﷸ'=>'وسلم','ﯡ'=>'ۅ','ﯠ'=>'ۅ','ﯚ'=>'ۆ','ﯙ'=>'ۆ','ﯘ'=>'ۇ','ﯗ'=>'ۇ','ٷ'=>'ۇٔ','ﯝ'=>'ۇٔ','ﯜ'=>'ۈ','ﯛ'=>'ۈ','ﯣ'=>'ۉ','ﯢ'=>'ۉ','ﯟ'=>'ۋ','ﯞ'=>'ۋ','ﯨ'=>'ى','ﯩ'=>'ى','ﻰ'=>'ى','ﻯ'=>'ى','ي'=>'ى','ﻳ'=>'ى','ﻴ'=>'ى','ﻲ'=>'ى','ﻱ'=>'ى','ی'=>'ى','ﯾ'=>'ى','ﯿ'=>'ى','ﯽ'=>'ى','ﯼ'=>'ى','ٸ'=>'ىٔ','ﲐ'=>'ىٰ','ﱝ'=>'ىٰ','ﳚ'=>'ىج','ﱕ'=>'ىج','ﶯ'=>'ىجى','ﳛ'=>'ىح','ﱖ'=>'ىح','ﶮ'=>'ىحى','ﳜ'=>'ىخ','ﱗ'=>'ىخ','ﲑ'=>'ىر','ﲒ'=>'ىز','ﳝ'=>'ىم','ﳰ'=>'ىم','ﲓ'=>'ىم','ﱘ'=>'ىم','ﶝ'=>'ىمم','ﶜ'=>'ىمم','ﶰ'=>'ىمى','ﲔ'=>'ىن','ﳞ'=>'ىه','ﳱ'=>'ىه','ﲕ'=>'ىى','ﱙ'=>'ىى','ﲖ'=>'ىى','ﱚ'=>'ىى','ۧ'=>'ۦ','ﮯ'=>'ے','ﮮ'=>'ے','ﮱ'=>'ۓ','ﮰ'=>'ۓ','∃'=>'ⴺ','आ'=>'अा','ऒ'=>'अाॆ','ओ'=>'अाे','औ'=>'अाै','ऄ'=>'अॆ','ऑ'=>'अॉ','ऍ'=>'एॅ','ऎ'=>'एॆ','ऐ'=>'एे','ई'=>'र्इ','আ'=>'অা','ৠ'=>'ঋৃ','ৡ'=>'ঌৢ','ਉ'=>'ੳੁ','ਊ'=>'ੳੂ','ਆ'=>'ਅਾ','ਐ'=>'ਅੈ','ਔ'=>'ਅੌ','ਇ'=>'ੲਿ','ਈ'=>'ੲੀ','ਏ'=>'ੲੇ','આ'=>'અા','ઑ'=>'અાૅ','ઓ'=>'અાે','ઔ'=>'અાૈ','ઍ'=>'અૅ','એ'=>'અે','ઐ'=>'અૈ','ଆ'=>'ଅା','௮'=>'அ','ர'=>'ஈ','ா'=>'ஈ','௫'=>'ஈு','௨'=>'உ','ஊ'=>'உள','௭'=>'எ','௷'=>'எவ','ஜ'=>'ஐ','௧'=>'க','௪'=>'ச','௬'=>'சு','௲'=>'சூ','௺'=>'நீ','ை'=>'ன','௴'=>'மீ','௰'=>'ய','ௗ'=>'ள','௸'=>'ஷ','ொ'=>'ெஈ','ௌ'=>'ெள','ோ'=>'ேஈ','ౠ'=>'ఋా','ౡ'=>'ఌా','ఔ'=>'ఒౌ','ఓ'=>'ఒౕ','ఢ'=>'డ̣','భ'=>'బ̣','ష'=>'వ̣','హ'=>'వా','మ'=>'వు','ూ'=>'ుా','ౄ'=>'ృా','ೡ'=>'ಌಾ','ಔ'=>'ఒౌ','ഈ'=>'ഇൗ','ഊ'=>'உൗ','ഐ'=>'എെ','ഓ'=>'ഒാ','ഔ'=>'ഒൗ','ൡ'=>'ഞ','൫'=>'ദ്ര','ഌ'=>'നூ','ങ'=>'നூ','൯'=>'ന്','റ'=>'ര','൪'=>'ര്','൮'=>'വ്','ീ'=>'ி','ൂ'=>'ூ','ൃ'=>'ூ','ൈ'=>'െെ','ฃ'=>'ข','ด'=>'ค','ต'=>'ค','ม'=>'ฆ','ซ'=>'ช','ฏ'=>'ฎ','ท'=>'ฑ','ๅ'=>'า','ำ'=>'̊า','แ'=>'เเ','ໜ'=>'ຫນ','ໝ'=>'ຫມ','ຳ'=>'̊າ','ཷ'=>'ྲཱྀ','ཹ'=>'ླཱྀ','၀'=>'o','ឣ'=>'អ','᧐'=>'ᦞ','᭒'=>'ᬍ','᭓'=>'ᬑ','᭘'=>'ᬨ','ᢖ'=>'ᡜ','ᡕ'=>'ᠵ','Ꮢ'=>'Ꭱ','Ꮍ'=>'y','𝐀'=>'A','𝐴'=>'A','𝑨'=>'A','𝒜'=>'A','𝓐'=>'A','𝔄'=>'A','𝔸'=>'A','𝕬'=>'A','𝖠'=>'A','𝗔'=>'A','𝘈'=>'A','𝘼'=>'A','𝙰'=>'A','𝚨'=>'A','𝛢'=>'A','𝜜'=>'A','𝝖'=>'A','𝞐'=>'A','𝐉'=>'J','𝐽'=>'J','𝑱'=>'J','𝒥'=>'J','𝓙'=>'J','𝔍'=>'J','𝕁'=>'J','𝕵'=>'J','𝖩'=>'J','𝗝'=>'J','𝘑'=>'J','𝙅'=>'J','𝙹'=>'J','Ꮷ'=>'J','⋿'=>'E','ℰ'=>'E','𝐄'=>'E','𝐸'=>'E','𝑬'=>'E','𝓔'=>'E','𝔈'=>'E','𝔼'=>'E','𝕰'=>'E','𝖤'=>'E','𝗘'=>'E','𝘌'=>'E','𝙀'=>'E','𝙴'=>'E','𝚬'=>'E','𝛦'=>'E','𝜠'=>'E','𝝚'=>'E','𝞔'=>'E','ℾ'=>'Ꮁ','𝚪'=>'Ꮁ','𝛤'=>'Ꮁ','𝜞'=>'Ꮁ','𝝘'=>'Ꮁ','𝞒'=>'Ꮁ','Ꮤ'=>'w','ℳ'=>'M','𝐌'=>'M','𝑀'=>'M','𝑴'=>'M','𝓜'=>'M','𝔐'=>'M','𝕄'=>'M','𝕸'=>'M','𝖬'=>'M','𝗠'=>'M','𝘔'=>'M','𝙈'=>'M','𝙼'=>'M','𝚳'=>'M','𝛭'=>'M','𝜧'=>'M','𝝡'=>'M','𝞛'=>'M','ℋ'=>'H','ℌ'=>'H','ℍ'=>'H','𝐇'=>'H','𝐻'=>'H','𝑯'=>'H','𝓗'=>'H','𝕳'=>'H','𝖧'=>'H','𝗛'=>'H','𝘏'=>'H','𝙃'=>'H','𝙷'=>'H','𝚮'=>'H','𝛨'=>'H','𝜢'=>'H','𝝜'=>'H','𝞖'=>'H','𝐆'=>'G','𝐺'=>'G','𝑮'=>'G','𝒢'=>'G','𝓖'=>'G','𝔊'=>'G','𝔾'=>'G','𝕲'=>'G','𝖦'=>'G','𝗚'=>'G','𝘎'=>'G','𝙂'=>'G','𝙶'=>'G','Ᏻ'=>'G','ℤ'=>'Z','ℨ'=>'Z','𝐙'=>'Z','𝑍'=>'Z','𝒁'=>'Z','𝒵'=>'Z','𝓩'=>'Z','𝖅'=>'Z','𝖹'=>'Z','𝗭'=>'Z','𝘡'=>'Z','𝙕'=>'Z','𝚉'=>'Z','𝚭'=>'Z','𝛧'=>'Z','𝜡'=>'Z','𝝛'=>'Z','𝞕'=>'Z','𝐒'=>'S','𝑆'=>'S','𝑺'=>'S','𝒮'=>'S','𝓢'=>'S','𝔖'=>'S','𝕊'=>'S','𝕾'=>'S','𝖲'=>'S','𝗦'=>'S','𝘚'=>'S','𝙎'=>'S','𝚂'=>'S','Ꮪ'=>'S','𝐕'=>'V','𝑉'=>'V','𝑽'=>'V','𝒱'=>'V','𝓥'=>'V','𝔙'=>'V','𝕍'=>'V','𝖁'=>'V','𝖵'=>'V','𝗩'=>'V','𝘝'=>'V','𝙑'=>'V','𝚅'=>'V','ℒ'=>'L','𝐋'=>'L','𝐿'=>'L','𝑳'=>'L','𝓛'=>'L','𝔏'=>'L','𝕃'=>'L','𝕷'=>'L','𝖫'=>'L','𝗟'=>'L','𝘓'=>'L','𝙇'=>'L','𝙻'=>'L','∑'=>'C','⅀'=>'C','ℂ'=>'C','ℭ'=>'C','𝐂'=>'C','𝐶'=>'C','𝑪'=>'C','𝒞'=>'C','𝓒'=>'C','𝕮'=>'C','𝖢'=>'C','𝗖'=>'C','𝘊'=>'C','𝘾'=>'C','𝙲'=>'C','𝚺'=>'C','𝛴'=>'C','𝜮'=>'C','𝝨'=>'C','𝞢'=>'C','ℙ'=>'P','𝐏'=>'P','𝑃'=>'P','𝑷'=>'P','𝒫'=>'P','𝓟'=>'P','𝔓'=>'P','𝕻'=>'P','𝖯'=>'P','𝗣'=>'P','𝘗'=>'P','𝙋'=>'P','𝙿'=>'P','𝚸'=>'P','𝛲'=>'P','𝜬'=>'P','𝝦'=>'P','𝞠'=>'P','𝐊'=>'K','𝐾'=>'K','𝑲'=>'K','𝒦'=>'K','𝓚'=>'K','𝔎'=>'K','𝕂'=>'K','𝕶'=>'K','𝖪'=>'K','𝗞'=>'K','𝘒'=>'K','𝙆'=>'K','𝙺'=>'K','𝚱'=>'K','𝛫'=>'K','𝜥'=>'K','𝝟'=>'K','𝞙'=>'K','ℬ'=>'B','𝐁'=>'B','𝐵'=>'B','𝑩'=>'B','𝓑'=>'B','𝔅'=>'B','𝔹'=>'B','𝕭'=>'B','𝖡'=>'B','𝗕'=>'B','𝘉'=>'B','𝘽'=>'B','𝙱'=>'B','𝚩'=>'B','𝛣'=>'B','𝜝'=>'B','𝝗'=>'B','𝞑'=>'B','ᐍ'=>'ᐁ·','∆'=>'ᐃ','𝚫'=>'ᐃ','𝛥'=>'ᐃ','𝜟'=>'ᐃ','𝝙'=>'ᐃ','𝞓'=>'ᐃ','ᐏ'=>'ᐃ·','ᐑ'=>'ᐄ·','ᐓ'=>'ᐅ·','ᐕ'=>'ᐆ·','ᐘ'=>'ᐊ·','ᐚ'=>'ᐋ·','ᓑ'=>'ᐡ','ᑶ'=>'·P','ᑺ'=>'·d','ᒘ'=>'·J','ᑁ'=>'ᐳ·','ᑃ'=>'ᐴ·','ᑅ'=>'ᐸ·','ᑇ'=>'ᐹ·','ˈ'=>'ᑊ','ᑘ'=>'ᑌ·','ᑧ'=>'ᑌᑊ','ᑚ'=>'ᑎ·','ᑨ'=>'ᑎᑊ','ᑜ'=>'ᑏ·','ᑞ'=>'ᑐ·','ᑩ'=>'ᑐᑊ','ᑠ'=>'ᑑ·','ᑢ'=>'ᑕ·','ᑪ'=>'ᑕᑊ','ᑤ'=>'ᑖ·','ᑵ'=>'ᑫ·','ᒅ'=>'ᑫᑊ','ᑷ'=>'P·','ᒆ'=>'Pᑊ','ᑹ'=>'ᑮ·','ᑻ'=>'d·','ᒇ'=>'dᑊ','ᑽ'=>'ᑰ·','ᑿ'=>'ᑲ·','ᒈ'=>'ᑲᑊ','ᒁ'=>'ᑳ·','ᘃ'=>'ᒉ','ᒓ'=>'ᒉ·','ᒕ'=>'ᒋ·','ᒗ'=>'ᒌ·','ᒙ'=>'J·','ᒛ'=>'ᒎ·','ᘂ'=>'ᒐ','ᒝ'=>'ᒐ·','ᒟ'=>'ᒑ·','ᒭ'=>'ᒣ·','ᒯ'=>'ᒥ·','ᒱ'=>'ᒦ·','ᒳ'=>'ᒧ·','ᒵ'=>'ᒨ·','ᒹ'=>'ᒫ·','ᓊ'=>'ᓀ·','ᓌ'=>'ᓇ·','ᓎ'=>'ᓈᒫ','ᘄ'=>'ᓓ','ᓝ'=>'ᓓ·','ᓟ'=>'ᓕ·','ᓡ'=>'ᓖ·','ᓣ'=>'ᓗ·','ᓥ'=>'ᓘ·','ᘇ'=>'ᓚ','ᓧ'=>'ᓚ·','ᓩ'=>'ᓛ·','ᓷ'=>'ᓭ·','ᓹ'=>'ᓯ·','ᓻ'=>'ᓰ·','ᓽ'=>'ᓱ·','ᓿ'=>'ᓲ·','ᔁ'=>'ᓴ·','ᔃ'=>'ᓵ·','ᔌ'=>'ᔋᐸ','ᔍ'=>'ᔋᑕ','ᔎ'=>'ᔋᑲ','ᔏ'=>'ᔋᒐ','ᔘ'=>'ᔐ·','ᔚ'=>'ᔑ·','ᔜ'=>'ᔒ·','ᔞ'=>'ᔓ·','ᔠ'=>'ᔔ·','ᔢ'=>'ᔕ·','ᔤ'=>'ᔖ·','ᔲ'=>'ᔨ·','ᔴ'=>'ᔩ·','ᔶ'=>'ᔪ·','ᔸ'=>'ᔫ·','ᔺ'=>'ᔭ·','ᔼ'=>'ᔮ·','᙮'=>'x','ᕽ'=>'x','ᘢ'=>'ᕃ','ᘣ'=>'ᕆ','ᘤ'=>'ᕊ','ᕏ'=>'ᕌ·','ᙯ'=>'ᕐᑫ','ᕾ'=>'ᕐᑬ','ᕿ'=>'ᕐP','ᖀ'=>'ᕐᑮ','ᖁ'=>'ᕐd','ᖂ'=>'ᕐᑰ','ᖃ'=>'ᕐᑲ','ᖄ'=>'ᕐᑳ','ᖅ'=>'ᕐᒃ','ᕜ'=>'ᕚ·','ᕩ'=>'ᕧ·','ℛ'=>'R','ℜ'=>'R','ℝ'=>'R','𝐑'=>'R','𝑅'=>'R','𝑹'=>'R','𝓡'=>'R','𝕽'=>'R','𝖱'=>'R','𝗥'=>'R','𝘙'=>'R','𝙍'=>'R','𝚁'=>'R','ᙰ'=>'ᖕᒉ','ᖎ'=>'ᖕᒊ','ᖏ'=>'ᖕᒋ','ᖐ'=>'ᖕᒌ','ᖑ'=>'ᖕJ','ᖒ'=>'ᖕᒎ','ᖓ'=>'ᖕᒐ','ᖔ'=>'ᖕᒑ','ᙱ'=>'ᖖᒋ','ᙲ'=>'ᖖᒌ','ᙳ'=>'ᖖJ','ᙴ'=>'ᖖᒎ','ᙵ'=>'ᖖᒐ','ᙶ'=>'ᖖᒑ','ℱ'=>'F','𝐅'=>'F','𝐹'=>'F','𝑭'=>'F','𝓕'=>'F','𝔉'=>'F','𝔽'=>'F','𝕱'=>'F','𝖥'=>'F','𝗙'=>'F','𝘍'=>'F','𝙁'=>'F','𝙵'=>'F','𝟊'=>'F','ⅅ'=>'D','𝐃'=>'D','𝐷'=>'D','𝑫'=>'D','𝒟'=>'D','𝓓'=>'D','𝔇'=>'D','𝔻'=>'D','𝕯'=>'D','𝖣'=>'D','𝗗'=>'D','𝘋'=>'D','𝘿'=>'D','𝙳'=>'D','ᗪ'=>'D','℧'=>'ᘮ','ᘴ'=>'ᘮ','𝛀'=>'ᘯ','𝛺'=>'ᘯ','𝜴'=>'ᘯ','𝝮'=>'ᘯ','𝞨'=>'ᘯ','ᘵ'=>'ᘯ','ㄱ'=>'ᄀ','ᄀ'=>'ᄀ','ᆨ'=>'ᄀ','ㄲ'=>'ᄁ','ᄁ'=>'ᄁ','ᆩ'=>'ᄁ','ㄴ'=>'ᄂ','ᄂ'=>'ᄂ','ᆫ'=>'ᄂ','ㄷ'=>'ᄃ','ᄃ'=>'ᄃ','ᆮ'=>'ᄃ','ㄸ'=>'ᄄ','ᄄ'=>'ᄄ','ㄹ'=>'ᄅ','ᄅ'=>'ᄅ','ᆯ'=>'ᄅ','ㅁ'=>'ᄆ','ᄆ'=>'ᄆ','ᆷ'=>'ᄆ','ㅂ'=>'ᄇ','ᄇ'=>'ᄇ','ᆸ'=>'ᄇ','ㅃ'=>'ᄈ','ᄈ'=>'ᄈ','ㅅ'=>'ᄉ','ᄉ'=>'ᄉ','ᆺ'=>'ᄉ','ㅆ'=>'ᄊ','ᄊ'=>'ᄊ','ᆻ'=>'ᄊ','ㅇ'=>'ᄋ','ᄋ'=>'ᄋ','ᆼ'=>'ᄋ','ㅈ'=>'ᄌ','ᄌ'=>'ᄌ','ᆽ'=>'ᄌ','ㅉ'=>'ᄍ','ᄍ'=>'ᄍ','ㅊ'=>'ᄎ','ᄎ'=>'ᄎ','ᆾ'=>'ᄎ','ㅋ'=>'ᄏ','ᄏ'=>'ᄏ','ᆿ'=>'ᄏ','ㅌ'=>'ᄐ','ᄐ'=>'ᄐ','ᇀ'=>'ᄐ','ㅍ'=>'ᄑ','ᄑ'=>'ᄑ','ᇁ'=>'ᄑ','ㅎ'=>'ᄒ','ᄒ'=>'ᄒ','ᇂ'=>'ᄒ','ᇅ'=>'ᄓ','ㅥ'=>'ᄔ','ㅦ'=>'ᄕ','ᇆ'=>'ᄕ','ᇊ'=>'ᄗ','ᇍ'=>'ᄘ','ᇐ'=>'ᄙ','ㅀ'=>'ᄚ','ᄚ'=>'ᄚ','ᄻ'=>'ᄚ','ᆶ'=>'ᄚ','ㅮ'=>'ᄜ','ᇜ'=>'ᄜ','ㅱ'=>'ᄝ','ᇢ'=>'ᄝ','ㅲ'=>'ᄞ','ㅳ'=>'ᄠ','ㅄ'=>'ᄡ','ᄡ'=>'ᄡ','ᆹ'=>'ᄡ','ㅴ'=>'ᄢ','ㅵ'=>'ᄣ','ㅶ'=>'ᄧ','ㅷ'=>'ᄩ','ㅸ'=>'ᄫ','ᇦ'=>'ᄫ','ㅹ'=>'ᄬ','ㅺ'=>'ᄭ','ᇧ'=>'ᄭ','ㅻ'=>'ᄮ','ㅼ'=>'ᄯ','ᇨ'=>'ᄯ','ᇩ'=>'ᄰ','ㅽ'=>'ᄲ','ᇪ'=>'ᄲ','ㅾ'=>'ᄶ','ㅿ'=>'ᅀ','ᇫ'=>'ᅀ','ᇬ'=>'ᅁ','ᇱ'=>'ᅅ','ㆂ'=>'ᅅ','ᇲ'=>'ᅆ','ㆃ'=>'ᅆ','ㆀ'=>'ᅇ','ᇮ'=>'ᅇ','ㆁ'=>'ᅌ','ᇰ'=>'ᅌ','ᇳ'=>'ᅖ','ㆄ'=>'ᅗ','ᇴ'=>'ᅗ','ㆅ'=>'ᅘ','ㆆ'=>'ᅙ','ᇹ'=>'ᅙ','ㅤ'=>'ᅠ','ᅠ'=>'ᅠ','ㅏ'=>'ᅡ','ᅡ'=>'ᅡ','ㅐ'=>'ᅢ','ᅢ'=>'ᅢ','ㅑ'=>'ᅣ','ᅣ'=>'ᅣ','ㅒ'=>'ᅤ','ᅤ'=>'ᅤ','ㅓ'=>'ᅥ','ᅥ'=>'ᅥ','ㅔ'=>'ᅦ','ᅦ'=>'ᅦ','ㅕ'=>'ᅧ','ᅧ'=>'ᅧ','ㅖ'=>'ᅨ','ᅨ'=>'ᅨ','ㅗ'=>'ᅩ','ᅩ'=>'ᅩ','ㅘ'=>'ᅪ','ᅪ'=>'ᅪ','ㅙ'=>'ᅫ','ᅫ'=>'ᅫ','ㅚ'=>'ᅬ','ᅬ'=>'ᅬ','ㅛ'=>'ᅭ','ᅭ'=>'ᅭ','ㅜ'=>'ᅮ','ᅮ'=>'ᅮ','ㅝ'=>'ᅯ','ᅯ'=>'ᅯ','ㅞ'=>'ᅰ','ᅰ'=>'ᅰ','ㅟ'=>'ᅱ','ᅱ'=>'ᅱ','ㅠ'=>'ᅲ','ᅲ'=>'ᅲ','ㅡ'=>'一','ᅳ'=>'一','ㅢ'=>'ᅴ','ᅴ'=>'ᅴ','ㅣ'=>'丨','ᅵ'=>'丨','ㆇ'=>'ᆄ','ᆆ'=>'ᆄ','ㆈ'=>'ᆅ','ㆉ'=>'ᆈ','ㆊ'=>'ᆑ','ㆋ'=>'ᆒ','ㆌ'=>'ᆔ','ㆍ'=>'ᆞ','ㆎ'=>'ᆡ','ㄳ'=>'ᆪ','ᆪ'=>'ᆪ','ㄵ'=>'ᆬ','ᆬ'=>'ᆬ','ㄶ'=>'ᆭ','ᆭ'=>'ᆭ','ㄺ'=>'ᆰ','ᆰ'=>'ᆰ','ㄻ'=>'ᆱ','ᆱ'=>'ᆱ','ㄼ'=>'ᆲ','ᆲ'=>'ᆲ','ㄽ'=>'ᆳ','ᆳ'=>'ᆳ','ㄾ'=>'ᆴ','ᆴ'=>'ᆴ','ㄿ'=>'ᆵ','ᆵ'=>'ᆵ','ㅧ'=>'ᇇ','ㅨ'=>'ᇈ','ㅩ'=>'ᇌ','ㅪ'=>'ᇎ','ㅫ'=>'ᇓ','ㅬ'=>'ᇗ','ㅭ'=>'ᇙ','ㅯ'=>'ᇝ','ㅰ'=>'ᇟ','ァ'=>'ァ','ア'=>'ア','ィ'=>'ィ','イ'=>'イ','ゥ'=>'ゥ','ウ'=>'ウ','ェ'=>'ェ','エ'=>'エ','ォ'=>'ォ','オ'=>'オ','カ'=>'カ','キ'=>'キ','ク'=>'ク','ケ'=>'ケ','コ'=>'コ','サ'=>'サ','シ'=>'シ','ス'=>'ス','セ'=>'セ','ソ'=>'ソ','タ'=>'タ','チ'=>'チ','ッ'=>'ッ','ツ'=>'ツ','テ'=>'テ','ト'=>'ト','ナ'=>'ナ','ニ'=>'ニ','ヌ'=>'ヌ','ネ'=>'ネ','ノ'=>'ノ','ハ'=>'ハ','ヒ'=>'ヒ','フ'=>'フ','ヘ'=>'へ','ホ'=>'ホ','マ'=>'マ','⧄'=>'〼','ミ'=>'ミ','ム'=>'ム','メ'=>'メ','モ'=>'モ','ャ'=>'ャ','ヤ'=>'ヤ','ュ'=>'ュ','ユ'=>'ユ','ョ'=>'ョ','ヨ'=>'ヨ','ラ'=>'ラ','リ'=>'リ','ル'=>'ル','レ'=>'レ','ロ'=>'ロ','ワ'=>'ワ','ヲ'=>'ヲ','ン'=>'ン','꒞'=>'ꁊ','꒬'=>'ꁐ','꒜'=>'ꃀ','꒿'=>'ꉙ','꒾'=>'ꊱ','꓀'=>'ꎫ','꓂'=>'ꎵ','꒺'=>'ꎿ','꒰'=>'ꏂ','𐒠'=>'𐒆','—'=>'一','―'=>'一','−'=>'一','─'=>'一','⼀'=>'一','不'=>'不','並'=>'並','|'=>'丨','|'=>'丨','∣'=>'丨','⼁'=>'丨','‖'=>'丨丨','∥'=>'丨丨','串'=>'串','⼂'=>'丶','丸'=>'丸','丹'=>'丹','丽'=>'丽','⼃'=>'丿','乁'=>'乁','⼄'=>'乙','亂'=>'亂','⼅'=>'亅','了'=>'了','⼆'=>'二','⼇'=>'亠','亮'=>'亮','⼈'=>'人','什'=>'什','仌'=>'仌','令'=>'令','你'=>'你','倂'=>'併','倂'=>'併','侀'=>'侀','來'=>'來','例'=>'例','侮'=>'侮','侮'=>'侮','侻'=>'侻','便'=>'便','值'=>'値','倫'=>'倫','偺'=>'偺','備'=>'備','像'=>'像','僚'=>'僚','僧'=>'僧','僧'=>'僧','⼉'=>'儿','兀'=>'兀','充'=>'充','免'=>'免','免'=>'免','兔'=>'兔','兤'=>'兤','⼊'=>'入','內'=>'內','全'=>'全','兩'=>'兩','⼋'=>'八','六'=>'六','具'=>'具','冀'=>'冀','⼌'=>'冂','再'=>'再','冒'=>'冒','冕'=>'冕','⼍'=>'冖','冗'=>'冗','冤'=>'冤','⼎'=>'冫','冬'=>'冬','况'=>'况','况'=>'况','冷'=>'冷','凉'=>'凉','凌'=>'凌','凜'=>'凜','凞'=>'凞','⼏'=>'几','凵'=>'凵','⼐'=>'凵','⼑'=>'刀','刃'=>'刃','切'=>'切','切'=>'切','列'=>'列','利'=>'利','刺'=>'刺','刻'=>'刻','剆'=>'剆','割'=>'割','剷'=>'剷','劉'=>'劉','力'=>'力','⼒'=>'力','劣'=>'劣','劳'=>'劳','勇'=>'勇','勇'=>'勇','勉'=>'勉','勉'=>'勉','勒'=>'勒','勞'=>'勞','勤'=>'勤','勤'=>'勤','勵'=>'勵','⼓'=>'勹','勺'=>'勺','勺'=>'勺','包'=>'包','匆'=>'匆','⼔'=>'匕','北'=>'北','北'=>'北','⼕'=>'匚','⼖'=>'匸','匿'=>'匿','⼗'=>'十','〸'=>'十','〹'=>'卄','〺'=>'卅','卉'=>'卉','卑'=>'卑','卑'=>'卑','博'=>'博','⼘'=>'卜','⼙'=>'卩','即'=>'即','卵'=>'卵','卽'=>'卽','卿'=>'卿','卿'=>'卿','卿'=>'卿','⼚'=>'厂','⼛'=>'厶','參'=>'參','⼜'=>'又','及'=>'及','叟'=>'叟','⼝'=>'口','句'=>'句','叫'=>'叫','叱'=>'叱','吆'=>'吆','吏'=>'吏','吝'=>'吝','吸'=>'吸','呂'=>'呂','呈'=>'呈','周'=>'周','咞'=>'咞','咢'=>'咢','咽'=>'咽','哶'=>'哶','唐'=>'唐','啓'=>'啓','啟'=>'啓','啕'=>'啕','啣'=>'啣','善'=>'善','善'=>'善','喇'=>'喇','喙'=>'喙','喙'=>'喙','喝'=>'喝','喝'=>'喝','喫'=>'喫','喳'=>'喳','嗀'=>'嗀','嗂'=>'嗂','嗢'=>'嗢','嘆'=>'嘆','嘆'=>'嘆','噑'=>'噑','器'=>'器','噴'=>'噴','⼞'=>'囗','囹'=>'囹','圖'=>'圖','圗'=>'圗','⼟'=>'土','型'=>'型','城'=>'城','埴'=>'埴','堍'=>'堍','報'=>'報','堲'=>'堲','塀'=>'塀','塚'=>'塚','塚'=>'塚','塞'=>'塞','填'=>'塡','墨'=>'墨','壿'=>'墫','墬'=>'墬','墳'=>'墳','壘'=>'壘','壟'=>'壟','⼠'=>'士','壮'=>'壮','売'=>'売','壷'=>'壷','⼡'=>'夂','夆'=>'夆','⼢'=>'夊','⼣'=>'夕','多'=>'多','夢'=>'夢','⼤'=>'大','奄'=>'奄','奈'=>'奈','契'=>'契','奔'=>'奔','奢'=>'奢','女'=>'女','⼥'=>'女','姘'=>'姘','姬'=>'姬','娛'=>'娛','娧'=>'娧','婢'=>'婢','婦'=>'婦','嬀'=>'媯','媵'=>'媵','嬈'=>'嬈','嬨'=>'嬨','嬾'=>'嬾','嬾'=>'嬾','⼦'=>'子','⼧'=>'宀','宅'=>'宅','寃'=>'寃','寘'=>'寘','寧'=>'寧','寧'=>'寧','寧'=>'寧','寮'=>'寮','寳'=>'寳','⼨'=>'寸','寿'=>'寿','将'=>'将','⼩'=>'小','尢'=>'尢','⼪'=>'尢','⼫'=>'尸','尿'=>'尿','屠'=>'屠','屢'=>'屢','層'=>'層','履'=>'履','屮'=>'屮','屮'=>'屮','⼬'=>'屮','⼭'=>'山','岍'=>'岍','峀'=>'峀','崙'=>'崙','嵃'=>'嵃','嵐'=>'嵐','嵫'=>'嵫','嵮'=>'嵮','嵼'=>'嵼','嶲'=>'嶲','嶺'=>'嶺','⼮'=>'巛','巡'=>'巡','巢'=>'巢','⼯'=>'工','⼰'=>'己','巽'=>'巽','⼱'=>'巾','帲'=>'帡','帨'=>'帨','帽'=>'帽','幩'=>'幩','⼲'=>'干','年'=>'年','⼳'=>'幺','⼴'=>'广','度'=>'度','庰'=>'庰','庳'=>'庳','庶'=>'庶','廉'=>'廉','廊'=>'廊','廊'=>'廊','廒'=>'廒','廓'=>'廓','廙'=>'廙','廬'=>'廬','⼵'=>'廴','廾'=>'廾','⼶'=>'廾','弄'=>'弄','⼷'=>'弋','⼸'=>'弓','弢'=>'弢','弢'=>'弢','⼹'=>'彐','当'=>'当','⼺'=>'彡','形'=>'形','彩'=>'彩','彫'=>'彫','⼻'=>'彳','律'=>'律','徚'=>'徚','復'=>'復','徭'=>'徭','⼼'=>'心','忍'=>'忍','志'=>'志','念'=>'念','忹'=>'忹','怒'=>'怒','怜'=>'怜','悁'=>'悁','悔'=>'悔','悔'=>'悔','惇'=>'惇','惘'=>'惘','惡'=>'惡','愈'=>'愈','慄'=>'慄','慈'=>'慈','慌'=>'慌','慌'=>'慌','慎'=>'慎','慎'=>'慎','慠'=>'慠','慨'=>'慨','慺'=>'慺','憎'=>'憎','憎'=>'憎','憎'=>'憎','憐'=>'憐','憤'=>'憤','憯'=>'憯','憲'=>'憲','懞'=>'懞','懲'=>'懲','懲'=>'懲','懲'=>'懲','懶'=>'懶','懶'=>'懶','戀'=>'戀','⼽'=>'戈','成'=>'成','戛'=>'戛','戮'=>'戮','戴'=>'戴','⼾'=>'戶','⼿'=>'手','扝'=>'扝','抱'=>'抱','拉'=>'拉','拏'=>'拏','拓'=>'拓','拔'=>'拔','拼'=>'拼','拾'=>'拾','挽'=>'挽','捐'=>'捐','捨'=>'捨','捻'=>'捻','掃'=>'掃','掠'=>'掠','掩'=>'掩','揄'=>'揄','揅'=>'揅','揤'=>'揤','㩁'=>'搉','搜'=>'搜','搢'=>'搢','摒'=>'摒','摩'=>'摩','摷'=>'摷','摾'=>'摾','撚'=>'撚','撝'=>'撝','擄'=>'擄','⽀'=>'支','⽁'=>'攴','敏'=>'敏','敏'=>'敏','敖'=>'敖','敬'=>'敬','數'=>'數','⽂'=>'文','⽃'=>'斗','料'=>'料','⽄'=>'斤','⽅'=>'方','旅'=>'旅','⽆'=>'无','既'=>'既','旣'=>'旣','⽇'=>'日','易'=>'易','晉'=>'晉','晩'=>'晚','䀿'=>'晣','晴'=>'晴','晴'=>'晴','暈'=>'暈','暑'=>'暑','暑'=>'暑','暜'=>'暜','暴'=>'暴','曆'=>'曆','⽈'=>'曰','更'=>'更','㫚'=>'曶','書'=>'書','最'=>'最','⽉'=>'月','肦'=>'朌','胐'=>'朏','胊'=>'朐','脁'=>'朓','朗'=>'朗','朗'=>'朗','朗'=>'朗','脧'=>'朘','望'=>'望','望'=>'望','朡'=>'朡','膧'=>'朣','⽊'=>'木','李'=>'李','杓'=>'杓','杖'=>'杖','杞'=>'杞','柿'=>'杮','杻'=>'杻','枅'=>'枅','林'=>'林','柳'=>'柳','柺'=>'柺','栗'=>'栗','栟'=>'栟','桒'=>'桒','梁'=>'梁','梅'=>'梅','梅'=>'梅','梎'=>'梎','梨'=>'梨','椔'=>'椔','楂'=>'楂','樧'=>'榝','榣'=>'榣','槪'=>'槪','樂'=>'樂','樂'=>'樂','樂'=>'樂','樓'=>'樓','檨'=>'檨','櫓'=>'櫓','櫛'=>'櫛','欄'=>'欄','⽋'=>'欠','次'=>'次','歔'=>'歔','⽌'=>'止','歲'=>'歲','歷'=>'歷','歹'=>'歹','⽍'=>'歹','殟'=>'殟','殮'=>'殮','⽎'=>'殳','殺'=>'殺','殺'=>'殺','殺'=>'殺','殻'=>'殻','⽏'=>'毋','⺟'=>'母','⽐'=>'比','⽑'=>'毛','⽒'=>'氏','⽓'=>'气','⽔'=>'水','汎'=>'汎','汧'=>'汧','沈'=>'沈','沿'=>'沿','泌'=>'泌','泍'=>'泍','泥'=>'泥','洖'=>'洖','洛'=>'洛','洞'=>'洞','洴'=>'洴','派'=>'派','流'=>'流','流'=>'流','流'=>'流','浩'=>'浩','浪'=>'浪','海'=>'海','海'=>'海','浸'=>'浸','涅'=>'涅','淋'=>'淋','淚'=>'淚','淪'=>'淪','淹'=>'淹','渚'=>'渚','港'=>'港','湮'=>'湮','潙'=>'溈','溜'=>'溜','溺'=>'溺','滇'=>'滇','滋'=>'滋','滋'=>'滋','滑'=>'滑','滛'=>'滛','漏'=>'漏','漢'=>'漢','漢'=>'漢','漣'=>'漣','潮'=>'潮','濆'=>'濆','濫'=>'濫','濾'=>'濾','瀛'=>'瀛','瀞'=>'瀞','瀞'=>'瀞','瀹'=>'瀹','灊'=>'灊','⽕'=>'火','灰'=>'灰','灷'=>'灷','災'=>'災','炙'=>'炙','炭'=>'炭','烈'=>'烈','烙'=>'烙','煅'=>'煅','煉'=>'煉','煮'=>'煮','煮'=>'煮','熜'=>'熜','燎'=>'燎','燐'=>'燐','爐'=>'爐','爛'=>'爛','爨'=>'爨','⽖'=>'爪','爫'=>'爫','⺤'=>'爫','爵'=>'爵','爵'=>'爵','⽗'=>'父','⽘'=>'爻','⽙'=>'爿','⽚'=>'片','牐'=>'牐','⽛'=>'牙','⽜'=>'牛','牢'=>'牢','犀'=>'犀','犕'=>'犕','⽝'=>'犬','犯'=>'犯','狀'=>'狀','狼'=>'狼','猪'=>'猪','猪'=>'猪','獵'=>'獵','獺'=>'獺','⽞'=>'玄','率'=>'率','率'=>'率','⽟'=>'玉','王'=>'王','玥'=>'玥','玲'=>'玲','珞'=>'珞','理'=>'理','琉'=>'琉','琢'=>'琢','瑇'=>'瑇','瑜'=>'瑜','瑩'=>'瑩','瑱'=>'瑱','瑱'=>'瑱','璅'=>'璅','璉'=>'璉','璘'=>'璘','瓊'=>'瓊','⽠'=>'瓜','⽡'=>'瓦','甆'=>'甆','⽢'=>'甘','⽣'=>'生','甤'=>'甤','⽤'=>'用','⽥'=>'田','画'=>'画','甾'=>'甾','留'=>'留','略'=>'略','異'=>'異','異'=>'異','⽦'=>'疋','⽧'=>'疒','痢'=>'痢','瘐'=>'瘐','瘝'=>'瘝','瘟'=>'瘟','療'=>'療','癩'=>'癩','⽨'=>'癶','⽩'=>'白','⽪'=>'皮','⽫'=>'皿','益'=>'益','益'=>'益','盛'=>'盛','盧'=>'盧','⽬'=>'目','直'=>'直','直'=>'直','省'=>'省','眞'=>'眞','真'=>'真','真'=>'真','着'=>'着','睊'=>'睊','睊'=>'睊','瞋'=>'瞋','瞧'=>'瞧','⽭'=>'矛','⽮'=>'矢','⽯'=>'石','硏'=>'研','硎'=>'硎','硫'=>'硫','碌'=>'碌','碌'=>'碌','碑'=>'碑','磊'=>'磊','磌'=>'磌','磌'=>'磌','磻'=>'磻','礪'=>'礪','⽰'=>'示','礼'=>'礼','社'=>'社','祈'=>'祈','祉'=>'祉','祐'=>'祐','祖'=>'祖','祖'=>'祖','祝'=>'祝','神'=>'神','祥'=>'祥','祿'=>'祿','禍'=>'禍','禎'=>'禎','福'=>'福','福'=>'福','禮'=>'禮','⽱'=>'禸','⽲'=>'禾','秊'=>'秊','秫'=>'秫','稜'=>'稜','穀'=>'穀','穀'=>'穀','穊'=>'穊','穏'=>'穏','⽳'=>'穴','突'=>'突','窱'=>'窱','立'=>'立','⽴'=>'立','竮'=>'竮','⽵'=>'竹','笠'=>'笠','節'=>'節','節'=>'節','篆'=>'篆','築'=>'築','簾'=>'簾','籠'=>'籠','⽶'=>'米','类'=>'类','粒'=>'粒','精'=>'精','糒'=>'糒','糖'=>'糖','糣'=>'糣','糧'=>'糧','糨'=>'糨','⽷'=>'糸','紀'=>'紀','紐'=>'紐','索'=>'索','累'=>'累','絶'=>'絕','絛'=>'絛','絣'=>'絣','綠'=>'綠','綾'=>'綾','緇'=>'緇','練'=>'練','練'=>'練','練'=>'練','縂'=>'縂','縉'=>'縉','縷'=>'縷','繁'=>'繁','繅'=>'繅','⽸'=>'缶','缾'=>'缾','⽹'=>'网','⺫'=>'罒','署'=>'署','罹'=>'罹','罺'=>'罺','羅'=>'羅','⽺'=>'羊','羕'=>'羕','羚'=>'羚','羽'=>'羽','⽻'=>'羽','翺'=>'翺','老'=>'老','⽼'=>'老','者'=>'者','者'=>'者','者'=>'者','⽽'=>'而','⽾'=>'耒','⽿'=>'耳','聆'=>'聆','聠'=>'聠','聯'=>'聯','聰'=>'聰','聾'=>'聾','⾀'=>'聿','⾁'=>'肉','肋'=>'肋','肭'=>'肭','育'=>'育','㬵'=>'胶','腁'=>'胼','脃'=>'脃','脾'=>'脾','臘'=>'臘','⾂'=>'臣','臨'=>'臨','⾃'=>'自','臭'=>'臭','⾄'=>'至','⾅'=>'臼','舁'=>'舁','舁'=>'舁','舄'=>'舄','⾆'=>'舌','⾇'=>'舛','⾈'=>'舟','⾉'=>'艮','良'=>'良','⾊'=>'色','⾋'=>'艸','艹'=>'艹','艹'=>'艹','芋'=>'芋','芑'=>'芑','芝'=>'芝','花'=>'花','芳'=>'芳','芽'=>'芽','若'=>'若','若'=>'若','苦'=>'苦','茝'=>'茝','茣'=>'茣','茶'=>'茶','荒'=>'荒','荓'=>'荓','荣'=>'荣','莭'=>'莭','莽'=>'莽','菉'=>'菉','菊'=>'菊','菌'=>'菌','菜'=>'菜','菧'=>'菧','華'=>'華','菱'=>'菱','落'=>'落','葉'=>'葉','著'=>'著','著'=>'著','蔿'=>'蒍','蓮'=>'蓮','蓱'=>'蓱','蓳'=>'蓳','蓼'=>'蓼','蔖'=>'蔖','蕤'=>'蕤','藍'=>'藍','藺'=>'藺','蘆'=>'蘆','蘒'=>'蘒','蘭'=>'蘭','虁'=>'蘷','蘿'=>'蘿','⾌'=>'虍','虐'=>'虐','虜'=>'虜','虜'=>'虜','虧'=>'虧','虩'=>'虩','⾍'=>'虫','蚈'=>'蚈','蚩'=>'蚩','蛢'=>'蛢','蜎'=>'蜎','蜨'=>'蜨','蝫'=>'蝫','蝹'=>'蝹','蝹'=>'蝹','螆'=>'螆','螺'=>'螺','蟡'=>'蟡','蠁'=>'蠁','蠟'=>'蠟','⾎'=>'血','行'=>'行','⾏'=>'行','衠'=>'衠','衣'=>'衣','⾐'=>'衣','裂'=>'裂','裏'=>'裏','裗'=>'裗','裞'=>'裞','裡'=>'裡','裸'=>'裸','裺'=>'裺','褐'=>'褐','襁'=>'襁','襤'=>'襤','⾑'=>'襾','覆'=>'覆','見'=>'見','⾒'=>'見','視'=>'視','視'=>'視','⾓'=>'角','⾔'=>'言','䚶'=>'訞','詽'=>'訮','誠'=>'誠','說'=>'說','說'=>'說','調'=>'調','請'=>'請','諒'=>'諒','論'=>'論','諭'=>'諭','諭'=>'諭','諸'=>'諸','諸'=>'諸','諾'=>'諾','諾'=>'諾','謁'=>'謁','謁'=>'謁','謹'=>'謹','謹'=>'謹','識'=>'識','讀'=>'讀','讏'=>'讆','變'=>'變','變'=>'變','⾕'=>'谷','⾖'=>'豆','豈'=>'豈','豕'=>'豕','⾗'=>'豕','⾘'=>'豸','⾙'=>'貝','貫'=>'貫','賁'=>'賁','賂'=>'賂','賈'=>'賈','賓'=>'賓','贈'=>'贈','贈'=>'贈','贛'=>'贛','⾚'=>'赤','⾛'=>'走','起'=>'起','趆'=>'赿','⾜'=>'足','趼'=>'趼','跋'=>'跋','跺'=>'跥','路'=>'路','跰'=>'跰','躛'=>'躗','⾝'=>'身','車'=>'車','⾞'=>'車','軔'=>'軔','輧'=>'軿','輦'=>'輦','輪'=>'輪','輸'=>'輸','輸'=>'輸','輻'=>'輻','轢'=>'轢','⾟'=>'辛','辞'=>'辞','辰'=>'辰','⾠'=>'辰','⾡'=>'辵','辶'=>'辶','⻌'=>'辶','連'=>'連','逸'=>'逸','逸'=>'逸','遲'=>'遲','遼'=>'遼','邏'=>'邏','⾢'=>'邑','邔'=>'邔','郎'=>'郎','郱'=>'郱','都'=>'都','鄑'=>'鄑','鄛'=>'鄛','⾣'=>'酉','酪'=>'酪','醙'=>'醙','醴'=>'醴','⾤'=>'釆','里'=>'里','⾥'=>'里','量'=>'量','金'=>'金','⾦'=>'金','鈴'=>'鈴','鈸'=>'鈸','鉶'=>'鉶','鉼'=>'鉼','鋗'=>'鋗','鋘'=>'鋘','錄'=>'錄','鍊'=>'鍊','鎮'=>'鎭','鏹'=>'鏹','鐕'=>'鐕','⾧'=>'長','⾨'=>'門','開'=>'開','閭'=>'閭','閷'=>'閷','⾩'=>'阜','阮'=>'阮','陋'=>'陋','降'=>'降','陵'=>'陵','陸'=>'陸','陼'=>'陼','隆'=>'隆','隣'=>'隣','⾪'=>'隶','隸'=>'隸','⾫'=>'隹','雃'=>'雃','離'=>'離','難'=>'難','難'=>'難','⾬'=>'雨','零'=>'零','雷'=>'雷','霣'=>'霣','露'=>'露','靈'=>'靈','⾭'=>'靑','靖'=>'靖','靖'=>'靖','⾮'=>'非','⾯'=>'面','⾰'=>'革','⾱'=>'韋','韛'=>'韛','韠'=>'韠','⾲'=>'韭','⾳'=>'音','響'=>'響','響'=>'響','⾴'=>'頁','頋'=>'頋','頋'=>'頋','頋'=>'頋','領'=>'領','頩'=>'頩','頻'=>'頻','頻'=>'頻','類'=>'類','⾵'=>'風','⾶'=>'飛','⻝'=>'食','⾷'=>'食','飢'=>'飢','飯'=>'飯','飼'=>'飼','館'=>'館','餩'=>'餩','⾸'=>'首','⾹'=>'香','馧'=>'馧','⾺'=>'馬','駂'=>'駂','駱'=>'駱','駾'=>'駾','驪'=>'驪','⾻'=>'骨','⾼'=>'高','⾽'=>'髟','鬒'=>'鬒','鬒'=>'鬒','⾾'=>'鬥','⾿'=>'鬯','⿀'=>'鬲','⿁'=>'鬼','⿂'=>'魚','魯'=>'魯','鱀'=>'鱀','鱗'=>'鱗','⿃'=>'鳥','鳽'=>'鳽','鵧'=>'鵧','鶴'=>'鶴','鷺'=>'鷺','鸞'=>'鸞','鹃'=>'鹂','⿄'=>'鹵','鹿'=>'鹿','⿅'=>'鹿','麗'=>'麗','麟'=>'麟','⿆'=>'麥','麻'=>'麻','⿇'=>'麻','⿈'=>'黃','⿉'=>'黍','黎'=>'黎','⿊'=>'黑','黹'=>'黹','⿋'=>'黹','⿌'=>'黽','黾'=>'黾','鼅'=>'鼅','⿍'=>'鼎','鼏'=>'鼏','⿎'=>'鼓','鼖'=>'鼖','⿏'=>'鼠','鼻'=>'鼻','⿐'=>'鼻','齃'=>'齃','⿑'=>'齊','⿒'=>'齒','龍'=>'龍','⿓'=>'龍','龎'=>'龎','龜'=>'龜','龜'=>'龜','龜'=>'龜','⿔'=>'龜','⻳'=>'龟','⿕'=>'龠','㒞'=>'㒞','㒹'=>'㒹','㒻'=>'㒻','㓟'=>'㓟','㔕'=>'㔕','䎛'=>'㖈','㛮'=>'㛮','㛼'=>'㛼','㞁'=>'㞁','㠯'=>'㠯','㡢'=>'㡢','㡼'=>'㡼','㣇'=>'㣇','㣣'=>'㣣','㤜'=>'㤜','㤺'=>'㤺','㨮'=>'㨮','㩬'=>'㩬','㫤'=>'㫤','㬈'=>'㬈','㬙'=>'㬙','䐠'=>'㬻','㭉'=>'㭉','㮝'=>'㮝','㮝'=>'㮝','㰘'=>'㰘','㱎'=>'㱎','㴳'=>'㴳','㶖'=>'㶖','㺬'=>'㺬','㺸'=>'㺸','㺸'=>'㺸','㼛'=>'㼛','㿼'=>'㿼','䀈'=>'䀈','䀘'=>'䀘','䀹'=>'䀹','䀹'=>'䀹','䁆'=>'䁆','䂖'=>'䂖','䃣'=>'䃣','䄯'=>'䄯','䈂'=>'䈂','䈧'=>'䈧','䊠'=>'䊠','䌁'=>'䌁','䌴'=>'䌴','䍙'=>'䍙','䏕'=>'䏕','䏙'=>'䏙','䐋'=>'䐋','䑫'=>'䑫','䔫'=>'䔫','䕝'=>'䕝','䕡'=>'䕡','䕫'=>'䕫','䗗'=>'䗗','䗹'=>'䗹','䘵'=>'䘵','䚾'=>'䚾','䛇'=>'䛇','䦕'=>'䦕','䧦'=>'䧦','䩮'=>'䩮','䩶'=>'䩶','䪲'=>'䪲','䬳'=>'䬳','䯎'=>'䯎','䳎'=>'䳎','䳭'=>'䳭','䳸'=>'䳸','䵖'=>'䵖','𠄢'=>'𠄢','𠔜'=>'𠔜','𠔥'=>'𠔥','𠕋'=>'𠕋','𠘺'=>'𠘺','𠠄'=>'𠠄','𠣞'=>'𠣞','𠨬'=>'𠨬','𠭣'=>'𠭣','𡓤'=>'𡓤','𡚨'=>'𡚨','𡛪'=>'𡛪','𡧈'=>'𡧈','𡬘'=>'𡬘','𡴋'=>'𡴋','𡷤'=>'𡷤','𡷦'=>'𡷦','𢆃'=>'𢆃','𢆟'=>'𢆟','𢌱'=>'𢌱','𢌱'=>'𢌱','𢛔'=>'𢛔','𢡄'=>'𢡄','𢡊'=>'𢡊','𢬌'=>'𢬌','𢯱'=>'𢯱','𣀊'=>'𣀊','𣊸'=>'𣊸','𣍟'=>'𣍟','𣎓'=>'𣎓','𣎜'=>'𣎜','𣏃'=>'𣏃','𣏕'=>'𣏕','𣑭'=>'𣑭','𣚣'=>'𣚣','𣢧'=>'𣢧','𣪍'=>'𣪍','𣫺'=>'𣫺','𣲼'=>'𣲼','𣴞'=>'𣴞','𣻑'=>'𣻑','𣽞'=>'𣽞','𣾎'=>'𣾎','𤉣'=>'𤉣','𤎫'=>'𤎫','𤘈'=>'𤘈','𤜵'=>'𤜵','𤠔'=>'𤠔','𤰶'=>'𤰶','𤲒'=>'𤲒','𤾡'=>'𤾡','𤾸'=>'𤾸','𥁄'=>'𥁄','𥃲'=>'𥃲','𥃳'=>'𥃳','𥄙'=>'𥄙','𥄳'=>'𥄳','𥉉'=>'𥉉','𥐝'=>'𥐝','𥘦'=>'𥘦','𥚚'=>'𥚚','𥛅'=>'𥛅','𥥼'=>'𥥼','𥪧'=>'𥪧','𥪧'=>'𥪧','𥮫'=>'𥮫','𥲀'=>'𥲀','𥳐'=>'𥳐','𥾆'=>'𥾆','𦇚'=>'𦇚','𦈨'=>'𦈨','𦉇'=>'𦉇','𦋙'=>'𦋙','𦌾'=>'𦌾','𦓚'=>'𦓚','𦔣'=>'𦔣','𦖨'=>'𦖨','𦞧'=>'𦞧','𦞵'=>'𦞵','𦬼'=>'𦬼','𦰶'=>'𦰶','𦳕'=>'𦳕','𦵫'=>'𦵫','𦼬'=>'𦼬','𦾱'=>'𦾱','𧃒'=>'𧃒','𧏊'=>'𧏊','𧙧'=>'𧙧','𧢮'=>'𧢮','𧥦'=>'𧥦','𧲨'=>'𧲨','𧻓'=>'𧻓','𧼯'=>'𧼯','𨗒'=>'𨗒','𨗭'=>'𨗭','𨜮'=>'𨜮','𨯺'=>'𨯺','𨵷'=>'𨵷','𩅅'=>'𩅅','𩇟'=>'𩇟','𩈚'=>'𩈚','𩐊'=>'𩐊','𩒖'=>'𩒖','𩖶'=>'𩖶','𩬰'=>'𩬰','𪃎'=>'𪃎','𪄅'=>'𪄅','𪈎'=>'𪈎','𪊑'=>'𪊑','𪎒'=>'𪎒','𪘀'=>'𪘀','℃'=>'°C','℉'=>'°F','ℇ'=>'Ɛ','℻'=>'FAX','ℕ'=>'N','№'=>'No','ℚ'=>'Q','₨'=>'Rs','𝐓'=>'T','℡'=>'TEL','𝐔'=>'U','𝐖'=>'W','₩'=>'W̵','𝐗'=>'X','¥'=>'Y̵','𝚲'=>'Λ','𝚵'=>'Ξ','ℿ'=>'Π','ϲ'=>'c','ϒ'=>'Y','𝚽'=>'Φ','𝚿'=>'Ψ','ѣ'=>'Ь̵','ਃ'=>'ঃ','ಃ'=>'ః','່'=>'่','់'=>'่','້'=>'้','໊'=>'๊','໋'=>'๋','៕'=>'๚','៚'=>'๛','ъ'=>'ˉb','៙'=>'๏','೧'=>'౧','૨'=>'२','೨'=>'౨','૩'=>'३','૪'=>'४','૮'=>'८','೯'=>'౯','а'=>'a','Ꮟ'=>'b','ᖯ'=>'b','с'=>'c','ԁ'=>'d','ᑯ'=>'d','е'=>'e','ә'=>'ǝ','ε'=>'ɛ','є'=>'ɛ','ք'=>'f','ց'=>'g','һ'=>'h','հ'=>'h','Ꮒ'=>'h','Ᏺ'=>'h̔','ι'=>'i','і'=>'i','Ꭵ'=>'i','ј'=>'j','յ'=>'j','ᗰ'=>'m','ո'=>'n','η'=>'n̩','ం'=>'o','ಂ'=>'o','ം'=>'o','०'=>'o','੦'=>'o','૦'=>'o','๐'=>'o','໐'=>'o','ο'=>'o','о'=>'o','օ'=>'o','ဝ'=>'o','ρ'=>'p','р'=>'p','ᴩ'=>'ᴘ','գ'=>'q','κ'=>'ĸ','к'=>'ĸ','ᴦ'=>'r','г'=>'r','ѕ'=>'s','υ'=>'u','ս'=>'u','ν'=>'v','ѵ'=>'v','Ꮃ'=>'w','ᗯ'=>'w','х'=>'x','ᕁ'=>'x','у'=>'y','Ꭹ'=>'y','ӡ'=>'ʒ','ჳ'=>'ʒ','ϩ'=>'ƨ','ь'=>'ƅ','ы'=>'ƅi','ɑ'=>'α','ծ'=>'δ','ᕷ'=>'δ','п'=>'π','ɸ'=>'φ','ф'=>'φ','ʙ'=>'в','ɜ'=>'з','ᴍ'=>'м','ʜ'=>'н','ɢ'=>'ԍ','ᴛ'=>'т','ᴙ'=>'я','ઽ'=>'ऽ','ુ'=>'ु','ૂ'=>'ू','ੋ'=>'ॆ','੍'=>'्','્'=>'्','ഉ'=>'உ','ജ'=>'ஐ','ണ'=>'ண','ഴ'=>'ழ','ി'=>'ி','ു'=>'ூ','ಅ'=>'అ','ಆ'=>'ఆ','ಇ'=>'ఇ','ಒ'=>'ఒ','ಓ'=>'ఒౕ','ಜ'=>'జ','ಞ'=>'ఞ','ಣ'=>'ణ','థ'=>'ధּ','ಯ'=>'య','ఠ'=>'రּ','ಱ'=>'ఱ','ಲ'=>'ల','ඌ'=>'ന്ന','ஶ'=>'ശ','ຈ'=>'จ','ບ'=>'บ','ປ'=>'ป','ຝ'=>'ฝ','ພ'=>'พ','ຟ'=>'ฟ','ຍ'=>'ย','។'=>'ฯ','ិ'=>'ิ','ី'=>'ี','ឹ'=>'ึ','ឺ'=>'ื','ຸ'=>'ุ','ູ'=>'ู','ᗅ'=>'A','ᒍ'=>'J','ᕼ'=>'H','ᐯ'=>'V','ᑭ'=>'P','ᗷ'=>'B','ヘ'=>'へ','𐏑'=>'𐎂','𐏓'=>'𐎓','𒀸'=>'𐎚','ᅳ'=>'一','ǀ'=>'丨','ᅵ'=>'丨','Ꭺ'=>'A','Ᏼ'=>'B','Ꮯ'=>'C','ᗞ'=>'D','Ꭼ'=>'E','ᖴ'=>'F','Ꮐ'=>'G','Ꮋ'=>'H','Ꭻ'=>'J','Ꮶ'=>'K','Ꮮ'=>'L','Ꮇ'=>'M','Ꮲ'=>'P','ᖇ'=>'R','Ꮥ'=>'S','Ꮩ'=>'V','Ꮓ'=>'Z');
diff --git a/phpBB/includes/utf/data/recode_basic.php b/phpBB/includes/utf/data/recode_basic.php
index 02e44d3e0d..8a9dc544e6 100644
--- a/phpBB/includes/utf/data/recode_basic.php
+++ b/phpBB/includes/utf/data/recode_basic.php
@@ -1539,5 +1539,3 @@ function utf8_to_cp1252($string)
);
return strtr($string, $transform);
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/utf/data/recode_cjk.php b/phpBB/includes/utf/data/recode_cjk.php
index f3f9a256d7..8c65274af0 100644
--- a/phpBB/includes/utf/data/recode_cjk.php
+++ b/phpBB/includes/utf/data/recode_cjk.php
@@ -45175,5 +45175,3 @@ function big5($string)
);
return strtr($string, $transform);
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/utf/data/search_indexer_0.php b/phpBB/includes/utf/data/search_indexer_0.php
index 3304b18cdd..e8a087c0bc 100644
--- a/phpBB/includes/utf/data/search_indexer_0.php
+++ b/phpBB/includes/utf/data/search_indexer_0.php
@@ -1 +1 @@
-<?php return array(0=>'0',1=>'1',2=>'2',3=>'3',4=>'4',5=>'5',6=>'6',7=>'7',8=>'8',9=>'9','A'=>'a','B'=>'b','C'=>'c','D'=>'d','E'=>'e','F'=>'f','G'=>'g','H'=>'h','I'=>'i','J'=>'j','K'=>'k','L'=>'l','M'=>'m','N'=>'n','O'=>'o','P'=>'p','Q'=>'q','R'=>'r','S'=>'s','T'=>'t','U'=>'u','V'=>'v','W'=>'w','X'=>'x','Y'=>'y','Z'=>'z','a'=>'a','b'=>'b','c'=>'c','d'=>'d','e'=>'e','f'=>'f','g'=>'g','h'=>'h','i'=>'i','j'=>'j','k'=>'k','l'=>'l','m'=>'m','n'=>'n','o'=>'o','p'=>'p','q'=>'q','r'=>'r','s'=>'s','t'=>'t','u'=>'u','v'=>'v','w'=>'w','x'=>'x','y'=>'y','z'=>'z','ª'=>'ª','²'=>'2','³'=>'3','µ'=>'µ','¹'=>'1','º'=>'º','¼'=>'1/4','½'=>'1/2','¾'=>'3/4','À'=>'à','Á'=>'á','Â'=>'â','Ã'=>'ã','Ä'=>'ae','Å'=>'å','Æ'=>'ae','Ç'=>'ç','È'=>'è','É'=>'é','Ê'=>'ê','Ë'=>'ë','Ì'=>'ì','Í'=>'í','Î'=>'î','Ï'=>'ï','Ð'=>'ð','Ñ'=>'ñ','Ò'=>'ò','Ó'=>'ó','Ô'=>'ô','Õ'=>'õ','Ö'=>'oe','Ø'=>'ø','Ù'=>'ù','Ú'=>'ú','Û'=>'û','Ü'=>'ü','Ý'=>'ý','Þ'=>'þ','ß'=>'ss','à'=>'à','á'=>'á','â'=>'â','ã'=>'ã','ä'=>'ae','å'=>'å','æ'=>'ae','ç'=>'ç','è'=>'è','é'=>'é','ê'=>'ê','ë'=>'ë','ì'=>'ì','í'=>'í','î'=>'î','ï'=>'ï','ð'=>'ð','ñ'=>'ñ','ò'=>'ò','ó'=>'ó','ô'=>'ô','õ'=>'õ','ö'=>'oe','ø'=>'ø','ù'=>'ù','ú'=>'ú','û'=>'û','ü'=>'ue','ý'=>'ý','þ'=>'þ','ÿ'=>'ÿ','Ā'=>'ā','ā'=>'ā','Ă'=>'ă','ă'=>'ă','Ą'=>'ą','ą'=>'ą','Ć'=>'ć','ć'=>'ć','Ĉ'=>'ĉ','ĉ'=>'ĉ','Ċ'=>'ċ','ċ'=>'ċ','Č'=>'č','č'=>'č','Ď'=>'ď','ď'=>'ď','Đ'=>'đ','đ'=>'đ','Ē'=>'ē','ē'=>'ē','Ĕ'=>'ĕ','ĕ'=>'ĕ','Ė'=>'ė','ė'=>'ė','Ę'=>'ę','ę'=>'ę','Ě'=>'ě','ě'=>'ě','Ĝ'=>'ĝ','ĝ'=>'ĝ','Ğ'=>'ğ','ğ'=>'ğ','Ġ'=>'ġ','ġ'=>'ġ','Ģ'=>'ģ','ģ'=>'ģ','Ĥ'=>'ĥ','ĥ'=>'ĥ','Ħ'=>'ħ','ħ'=>'ħ','Ĩ'=>'ĩ','ĩ'=>'ĩ','Ī'=>'ī','ī'=>'ī','Ĭ'=>'ĭ','ĭ'=>'ĭ','Į'=>'į','į'=>'į','İ'=>'i','ı'=>'ı','IJ'=>'ij','ij'=>'ij','Ĵ'=>'ĵ','ĵ'=>'ĵ','Ķ'=>'ķ','ķ'=>'ķ','ĸ'=>'ĸ','Ĺ'=>'ĺ','ĺ'=>'ĺ','Ļ'=>'ļ','ļ'=>'ļ','Ľ'=>'ľ','ľ'=>'ľ','Ŀ'=>'ŀ','ŀ'=>'ŀ','Ł'=>'ł','ł'=>'ł','Ń'=>'ń','ń'=>'ń','Ņ'=>'ņ','ņ'=>'ņ','Ň'=>'ň','ň'=>'ň','ʼn'=>'ʼn','Ŋ'=>'ŋ','ŋ'=>'ŋ','Ō'=>'ō','ō'=>'ō','Ŏ'=>'ŏ','ŏ'=>'ŏ','Ő'=>'ő','ő'=>'ő','Œ'=>'oe','œ'=>'oe','Ŕ'=>'ŕ','ŕ'=>'ŕ','Ŗ'=>'ŗ','ŗ'=>'ŗ','Ř'=>'ř','ř'=>'ř','Ś'=>'ś','ś'=>'ś','Ŝ'=>'ŝ','ŝ'=>'ŝ','Ş'=>'ş','ş'=>'ş','Š'=>'š','š'=>'š','Ţ'=>'ţ','ţ'=>'ţ','Ť'=>'ť','ť'=>'ť','Ŧ'=>'ŧ','ŧ'=>'ŧ','Ũ'=>'ũ','ũ'=>'ũ','Ū'=>'ū','ū'=>'ū','Ŭ'=>'ŭ','ŭ'=>'ŭ','Ů'=>'ů','ů'=>'ů','Ű'=>'ű','ű'=>'ű','Ų'=>'ų','ų'=>'ų','Ŵ'=>'ŵ','ŵ'=>'ŵ','Ŷ'=>'ŷ','ŷ'=>'ŷ','Ÿ'=>'ÿ','Ź'=>'ź','ź'=>'ź','Ż'=>'ż','ż'=>'ż','Ž'=>'ž','ž'=>'ž','ſ'=>'ſ','ƀ'=>'ƀ','Ɓ'=>'ɓ','Ƃ'=>'ƃ','ƃ'=>'ƃ','Ƅ'=>'ƅ','ƅ'=>'ƅ','Ɔ'=>'ɔ','Ƈ'=>'ƈ','ƈ'=>'ƈ','Ɖ'=>'ɖ','Ɗ'=>'ɗ','Ƌ'=>'ƌ','ƌ'=>'ƌ','ƍ'=>'ƍ','Ǝ'=>'ǝ','Ə'=>'ə','Ɛ'=>'ɛ','Ƒ'=>'ƒ','ƒ'=>'ƒ','Ɠ'=>'ɠ','Ɣ'=>'ɣ','ƕ'=>'hv','Ɩ'=>'ɩ','Ɨ'=>'ɨ','Ƙ'=>'ƙ','ƙ'=>'ƙ','ƚ'=>'ƚ','ƛ'=>'ƛ','Ɯ'=>'ɯ','Ɲ'=>'ɲ','ƞ'=>'ƞ','Ɵ'=>'ɵ','Ơ'=>'ơ','ơ'=>'ơ','Ƣ'=>'oi','ƣ'=>'oi','Ƥ'=>'ƥ','ƥ'=>'ƥ','Ʀ'=>'yr','Ƨ'=>'ƨ','ƨ'=>'ƨ','Ʃ'=>'ʃ','ƪ'=>'ƪ','ƫ'=>'ƫ','Ƭ'=>'ƭ','ƭ'=>'ƭ','Ʈ'=>'ʈ','Ư'=>'ư','ư'=>'ư','Ʊ'=>'ʊ','Ʋ'=>'ʋ','Ƴ'=>'ƴ','ƴ'=>'ƴ','Ƶ'=>'ƶ','ƶ'=>'ƶ','Ʒ'=>'ʒ','Ƹ'=>'ƹ','ƹ'=>'ƹ','ƺ'=>'ƺ','ƻ'=>'ƻ','Ƽ'=>'ƽ','ƽ'=>'ƽ','ƾ'=>'ƾ','ƿ'=>'ƿ','ǀ'=>'ǀ','ǁ'=>'ǁ','ǂ'=>'ǂ','ǃ'=>'ǃ','DŽ'=>'dž','Dž'=>'dž','dž'=>'dž','LJ'=>'lj','Lj'=>'lj','lj'=>'lj','NJ'=>'nj','Nj'=>'nj','nj'=>'nj','Ǎ'=>'ǎ','ǎ'=>'ǎ','Ǐ'=>'ǐ','ǐ'=>'ǐ','Ǒ'=>'ǒ','ǒ'=>'ǒ','Ǔ'=>'ǔ','ǔ'=>'ǔ','Ǖ'=>'ǖ','ǖ'=>'ǖ','Ǘ'=>'ǘ','ǘ'=>'ǘ','Ǚ'=>'ǚ','ǚ'=>'ǚ','Ǜ'=>'ǜ','ǜ'=>'ǜ','ǝ'=>'ǝ','Ǟ'=>'ǟ','ǟ'=>'ǟ','Ǡ'=>'ǡ','ǡ'=>'ǡ','Ǣ'=>'ǣ','ǣ'=>'ǣ','Ǥ'=>'ǥ','ǥ'=>'ǥ','Ǧ'=>'ǧ','ǧ'=>'ǧ','Ǩ'=>'ǩ','ǩ'=>'ǩ','Ǫ'=>'ǫ','ǫ'=>'ǫ','Ǭ'=>'ǭ','ǭ'=>'ǭ','Ǯ'=>'ǯ','ǯ'=>'ǯ','ǰ'=>'ǰ','DZ'=>'dz','Dz'=>'dz','dz'=>'dz','Ǵ'=>'ǵ','ǵ'=>'ǵ','Ƕ'=>'ƕ','Ƿ'=>'ƿ','Ǹ'=>'ǹ','ǹ'=>'ǹ','Ǻ'=>'ǻ','ǻ'=>'ǻ','Ǽ'=>'ǽ','ǽ'=>'ǽ','Ǿ'=>'ǿ','ǿ'=>'ǿ','Ȁ'=>'ȁ','ȁ'=>'ȁ','Ȃ'=>'ȃ','ȃ'=>'ȃ','Ȅ'=>'ȅ','ȅ'=>'ȅ','Ȇ'=>'ȇ','ȇ'=>'ȇ','Ȉ'=>'ȉ','ȉ'=>'ȉ','Ȋ'=>'ȋ','ȋ'=>'ȋ','Ȍ'=>'ȍ','ȍ'=>'ȍ','Ȏ'=>'ȏ','ȏ'=>'ȏ','Ȑ'=>'ȑ','ȑ'=>'ȑ','Ȓ'=>'ȓ','ȓ'=>'ȓ','Ȕ'=>'ȕ','ȕ'=>'ȕ','Ȗ'=>'ȗ','ȗ'=>'ȗ','Ș'=>'ș','ș'=>'ș','Ț'=>'ț','ț'=>'ț','Ȝ'=>'ȝ','ȝ'=>'ȝ','Ȟ'=>'ȟ','ȟ'=>'ȟ','Ƞ'=>'ƞ','ȡ'=>'ȡ','Ȣ'=>'ou','ȣ'=>'ou','Ȥ'=>'ȥ','ȥ'=>'ȥ','Ȧ'=>'ȧ','ȧ'=>'ȧ','Ȩ'=>'ȩ','ȩ'=>'ȩ','Ȫ'=>'ȫ','ȫ'=>'ȫ','Ȭ'=>'ȭ','ȭ'=>'ȭ','Ȯ'=>'ȯ','ȯ'=>'ȯ','Ȱ'=>'ȱ','ȱ'=>'ȱ','Ȳ'=>'ȳ','ȳ'=>'ȳ','ȴ'=>'ȴ','ȵ'=>'ȵ','ȶ'=>'ȶ','ȷ'=>'ȷ','ȸ'=>'ȸ','ȹ'=>'ȹ','Ⱥ'=>'ⱥ','Ȼ'=>'ȼ','ȼ'=>'ȼ','Ƚ'=>'ƚ','Ⱦ'=>'ⱦ','ȿ'=>'ȿ','ɀ'=>'ɀ','Ɂ'=>'ɂ','ɂ'=>'ɂ','Ƀ'=>'ƀ','Ʉ'=>'ʉ','Ʌ'=>'ʌ','Ɇ'=>'ɇ','ɇ'=>'ɇ','Ɉ'=>'ɉ','ɉ'=>'ɉ','Ɋ'=>'ɋ','ɋ'=>'ɋ','Ɍ'=>'ɍ','ɍ'=>'ɍ','Ɏ'=>'ɏ','ɏ'=>'ɏ','ɐ'=>'ɐ','ɑ'=>'ɑ','ɒ'=>'ɒ','ɓ'=>'ɓ','ɔ'=>'ɔ','ɕ'=>'ɕ','ɖ'=>'ɖ','ɗ'=>'ɗ','ɘ'=>'ɘ','ə'=>'ə','ɚ'=>'ɚ','ɛ'=>'ɛ','ɜ'=>'ɜ','ɝ'=>'ɝ','ɞ'=>'ɞ','ɟ'=>'ɟ','ɠ'=>'ɠ','ɡ'=>'ɡ','ɢ'=>'ɢ','ɣ'=>'ɣ','ɤ'=>'ɤ','ɥ'=>'ɥ','ɦ'=>'ɦ','ɧ'=>'ɧ','ɨ'=>'ɨ','ɩ'=>'ɩ','ɪ'=>'ɪ','ɫ'=>'ɫ','ɬ'=>'ɬ','ɭ'=>'ɭ','ɮ'=>'ɮ','ɯ'=>'ɯ','ɰ'=>'ɰ','ɱ'=>'ɱ','ɲ'=>'ɲ','ɳ'=>'ɳ','ɴ'=>'ɴ','ɵ'=>'ɵ','ɶ'=>'ɶ','ɷ'=>'ɷ','ɸ'=>'ɸ','ɹ'=>'ɹ','ɺ'=>'ɺ','ɻ'=>'ɻ','ɼ'=>'ɼ','ɽ'=>'ɽ','ɾ'=>'ɾ','ɿ'=>'ɿ','ʀ'=>'ʀ','ʁ'=>'ʁ','ʂ'=>'ʂ','ʃ'=>'ʃ','ʄ'=>'ʄ','ʅ'=>'ʅ','ʆ'=>'ʆ','ʇ'=>'ʇ','ʈ'=>'ʈ','ʉ'=>'ʉ','ʊ'=>'ʊ','ʋ'=>'ʋ','ʌ'=>'ʌ','ʍ'=>'ʍ','ʎ'=>'ʎ','ʏ'=>'ʏ','ʐ'=>'ʐ','ʑ'=>'ʑ','ʒ'=>'ʒ','ʓ'=>'ʓ','ʔ'=>'ʔ','ʕ'=>'ʕ','ʖ'=>'ʖ','ʗ'=>'ʗ','ʘ'=>'ʘ','ʙ'=>'ʙ','ʚ'=>'ʚ','ʛ'=>'ʛ','ʜ'=>'ʜ','ʝ'=>'ʝ','ʞ'=>'ʞ','ʟ'=>'ʟ','ʠ'=>'ʠ','ʡ'=>'ʡ','ʢ'=>'ʢ','ʣ'=>'ʣ','ʤ'=>'ʤ','ʥ'=>'ʥ','ʦ'=>'ʦ','ʧ'=>'ʧ','ʨ'=>'ʨ','ʩ'=>'ʩ','ʪ'=>'ʪ','ʫ'=>'ʫ','ʬ'=>'ʬ','ʭ'=>'ʭ','ʮ'=>'ʮ','ʯ'=>'ʯ','ʰ'=>'ʰ','ʱ'=>'ʱ','ʲ'=>'ʲ','ʳ'=>'ʳ','ʴ'=>'ʴ','ʵ'=>'ʵ','ʶ'=>'ʶ','ʷ'=>'ʷ','ʸ'=>'ʸ','ʹ'=>'ʹ','ʺ'=>'ʺ','ʻ'=>'ʻ','ʼ'=>'ʼ','ʽ'=>'ʽ','ʾ'=>'ʾ','ʿ'=>'ʿ','ˀ'=>'ˀ','ˁ'=>'ˁ','ˆ'=>'ˆ','ˇ'=>'ˇ','ˈ'=>'ˈ','ˉ'=>'ˉ','ˊ'=>'ˊ','ˋ'=>'ˋ','ˌ'=>'ˌ','ˍ'=>'ˍ','ˎ'=>'ˎ','ˏ'=>'ˏ','ː'=>'ː','ˑ'=>'ˑ','ˠ'=>'ˠ','ˡ'=>'ˡ','ˢ'=>'ˢ','ˣ'=>'ˣ','ˤ'=>'ˤ','ˮ'=>'ˮ','̀'=>'̀','́'=>'́','̂'=>'̂','̃'=>'̃','̄'=>'̄','̅'=>'̅','̆'=>'̆','̇'=>'̇','̈'=>'̈','̉'=>'̉','̊'=>'̊','̋'=>'̋','̌'=>'̌','̍'=>'̍','̎'=>'̎','̏'=>'̏','̐'=>'̐','̑'=>'̑','̒'=>'̒','̓'=>'̓','̔'=>'̔','̕'=>'̕','̖'=>'̖','̗'=>'̗','̘'=>'̘','̙'=>'̙','̚'=>'̚','̛'=>'̛','̜'=>'̜','̝'=>'̝','̞'=>'̞','̟'=>'̟','̠'=>'̠','̡'=>'̡','̢'=>'̢','̣'=>'̣','̤'=>'̤','̥'=>'̥','̦'=>'̦','̧'=>'̧','̨'=>'̨','̩'=>'̩','̪'=>'̪','̫'=>'̫','̬'=>'̬','̭'=>'̭','̮'=>'̮','̯'=>'̯','̰'=>'̰','̱'=>'̱','̲'=>'̲','̳'=>'̳','̴'=>'̴','̵'=>'̵','̶'=>'̶','̷'=>'̷','̸'=>'̸','̹'=>'̹','̺'=>'̺','̻'=>'̻','̼'=>'̼','̽'=>'̽','̾'=>'̾','̿'=>'̿','̀'=>'̀','́'=>'́','͂'=>'͂','̓'=>'̓','̈́'=>'̈́','ͅ'=>'ͅ','͆'=>'͆','͇'=>'͇','͈'=>'͈','͉'=>'͉','͊'=>'͊','͋'=>'͋','͌'=>'͌','͍'=>'͍','͎'=>'͎','͏'=>'͏','͐'=>'͐','͑'=>'͑','͒'=>'͒','͓'=>'͓','͔'=>'͔','͕'=>'͕','͖'=>'͖','͗'=>'͗','͘'=>'͘','͙'=>'͙','͚'=>'͚','͛'=>'͛','͜'=>'͜','͝'=>'͝','͞'=>'͞','͟'=>'͟','͠'=>'͠','͡'=>'͡','͢'=>'͢','ͣ'=>'ͣ','ͤ'=>'ͤ','ͥ'=>'ͥ','ͦ'=>'ͦ','ͧ'=>'ͧ','ͨ'=>'ͨ','ͩ'=>'ͩ','ͪ'=>'ͪ','ͫ'=>'ͫ','ͬ'=>'ͬ','ͭ'=>'ͭ','ͮ'=>'ͮ','ͯ'=>'ͯ','ͺ'=>'ͺ','ͻ'=>'ͻ','ͼ'=>'ͼ','ͽ'=>'ͽ','Ά'=>'ά','Έ'=>'έ','Ή'=>'ή','Ί'=>'ί','Ό'=>'ό','Ύ'=>'ύ','Ώ'=>'ώ','ΐ'=>'ΐ','Α'=>'α','Β'=>'β','Γ'=>'γ','Δ'=>'δ','Ε'=>'ε','Ζ'=>'ζ','Η'=>'η','Θ'=>'θ','Ι'=>'ι','Κ'=>'κ','Λ'=>'λ','Μ'=>'μ','Ν'=>'ν','Ξ'=>'ξ','Ο'=>'ο','Π'=>'π','Ρ'=>'ρ','Σ'=>'σ','Τ'=>'τ','Υ'=>'υ','Φ'=>'φ','Χ'=>'χ','Ψ'=>'ψ','Ω'=>'ω','Ϊ'=>'ϊ','Ϋ'=>'ϋ','ά'=>'ά','έ'=>'έ','ή'=>'ή','ί'=>'ί','ΰ'=>'ΰ','α'=>'α','β'=>'β','γ'=>'γ','δ'=>'δ','ε'=>'ε','ζ'=>'ζ','η'=>'η','θ'=>'θ','ι'=>'ι','κ'=>'κ','λ'=>'λ','μ'=>'μ','ν'=>'ν','ξ'=>'ξ','ο'=>'ο','π'=>'π','ρ'=>'ρ','ς'=>'ς','σ'=>'σ','τ'=>'τ','υ'=>'υ','φ'=>'φ','χ'=>'χ','ψ'=>'ψ','ω'=>'ω','ϊ'=>'ϊ','ϋ'=>'ϋ','ό'=>'ό','ύ'=>'ύ','ώ'=>'ώ','ϐ'=>'ϐ','ϑ'=>'ϑ','ϒ'=>'ϒ','ϓ'=>'ϓ','ϔ'=>'ϔ','ϕ'=>'ϕ','ϖ'=>'ϖ','ϗ'=>'ϗ','Ϙ'=>'ϙ','ϙ'=>'ϙ','Ϛ'=>'ϛ','ϛ'=>'ϛ','Ϝ'=>'ϝ','ϝ'=>'ϝ','Ϟ'=>'ϟ','ϟ'=>'ϟ','Ϡ'=>'ϡ','ϡ'=>'ϡ','Ϣ'=>'ϣ','ϣ'=>'ϣ','Ϥ'=>'ϥ','ϥ'=>'ϥ','Ϧ'=>'ϧ','ϧ'=>'ϧ','Ϩ'=>'ϩ','ϩ'=>'ϩ','Ϫ'=>'ϫ','ϫ'=>'ϫ','Ϭ'=>'ϭ','ϭ'=>'ϭ','Ϯ'=>'ϯ','ϯ'=>'ϯ','ϰ'=>'ϰ','ϱ'=>'ϱ','ϲ'=>'ϲ','ϳ'=>'ϳ','ϴ'=>'θ','ϵ'=>'ϵ','Ϸ'=>'ϸ','ϸ'=>'ϸ','Ϲ'=>'ϲ','Ϻ'=>'ϻ','ϻ'=>'ϻ','ϼ'=>'ϼ','Ͻ'=>'ͻ','Ͼ'=>'ͼ','Ͽ'=>'ͽ','Ѐ'=>'ѐ','Ё'=>'ё','Ђ'=>'ђ','Ѓ'=>'ѓ','Є'=>'є','Ѕ'=>'ѕ','І'=>'і','Ї'=>'ї','Ј'=>'ј','Љ'=>'љ','Њ'=>'њ','Ћ'=>'ћ','Ќ'=>'ќ','Ѝ'=>'ѝ','Ў'=>'ў','Џ'=>'џ','А'=>'а','Б'=>'б','В'=>'в','Г'=>'г','Д'=>'д','Е'=>'е','Ж'=>'ж','З'=>'з','И'=>'и','Й'=>'й','К'=>'к','Л'=>'л','М'=>'м','Н'=>'н','О'=>'о','П'=>'п','Р'=>'р','С'=>'с','Т'=>'т','У'=>'у','Ф'=>'ф','Х'=>'х','Ц'=>'ц','Ч'=>'ч','Ш'=>'ш','Щ'=>'щ','Ъ'=>'ъ','Ы'=>'ы','Ь'=>'ь','Э'=>'э','Ю'=>'ю','Я'=>'я','а'=>'а','б'=>'б','в'=>'в','г'=>'г','д'=>'д','е'=>'е','ж'=>'ж','з'=>'з','и'=>'и','й'=>'й','к'=>'к','л'=>'л','м'=>'м','н'=>'н','о'=>'о','п'=>'п','р'=>'р','с'=>'с','т'=>'т','у'=>'у','ф'=>'ф','х'=>'х','ц'=>'ц','ч'=>'ч','ш'=>'ш','щ'=>'щ','ъ'=>'ъ','ы'=>'ы','ь'=>'ь','э'=>'э','ю'=>'ю','я'=>'я','ѐ'=>'ѐ','ё'=>'ё','ђ'=>'ђ','ѓ'=>'ѓ','є'=>'є','ѕ'=>'ѕ','і'=>'і','ї'=>'ї','ј'=>'ј','љ'=>'љ','њ'=>'њ','ћ'=>'ћ','ќ'=>'ќ','ѝ'=>'ѝ','ў'=>'ў','џ'=>'џ','Ѡ'=>'ѡ','ѡ'=>'ѡ','Ѣ'=>'ѣ','ѣ'=>'ѣ','Ѥ'=>'ѥ','ѥ'=>'ѥ','Ѧ'=>'ѧ','ѧ'=>'ѧ','Ѩ'=>'ѩ','ѩ'=>'ѩ','Ѫ'=>'ѫ','ѫ'=>'ѫ','Ѭ'=>'ѭ','ѭ'=>'ѭ','Ѯ'=>'ѯ','ѯ'=>'ѯ','Ѱ'=>'ѱ','ѱ'=>'ѱ','Ѳ'=>'ѳ','ѳ'=>'ѳ','Ѵ'=>'ѵ','ѵ'=>'ѵ','Ѷ'=>'ѷ','ѷ'=>'ѷ','Ѹ'=>'ѹ','ѹ'=>'ѹ','Ѻ'=>'ѻ','ѻ'=>'ѻ','Ѽ'=>'ѽ','ѽ'=>'ѽ','Ѿ'=>'ѿ','ѿ'=>'ѿ','Ҁ'=>'ҁ','ҁ'=>'ҁ','҃'=>'҃','҄'=>'҄','҅'=>'҅','҆'=>'҆','҈'=>'҈','҉'=>'҉','Ҋ'=>'ҋ','ҋ'=>'ҋ','Ҍ'=>'ҍ','ҍ'=>'ҍ','Ҏ'=>'ҏ','ҏ'=>'ҏ','Ґ'=>'ґ','ґ'=>'ґ','Ғ'=>'ғ','ғ'=>'ғ','Ҕ'=>'ҕ','ҕ'=>'ҕ','Җ'=>'җ','җ'=>'җ','Ҙ'=>'ҙ','ҙ'=>'ҙ','Қ'=>'қ','қ'=>'қ','Ҝ'=>'ҝ','ҝ'=>'ҝ','Ҟ'=>'ҟ','ҟ'=>'ҟ','Ҡ'=>'ҡ','ҡ'=>'ҡ','Ң'=>'ң','ң'=>'ң','Ҥ'=>'ҥ','ҥ'=>'ҥ','Ҧ'=>'ҧ','ҧ'=>'ҧ','Ҩ'=>'ҩ','ҩ'=>'ҩ','Ҫ'=>'ҫ','ҫ'=>'ҫ','Ҭ'=>'ҭ','ҭ'=>'ҭ','Ү'=>'ү','ү'=>'ү','Ұ'=>'ұ','ұ'=>'ұ','Ҳ'=>'ҳ','ҳ'=>'ҳ','Ҵ'=>'ҵ','ҵ'=>'ҵ','Ҷ'=>'ҷ','ҷ'=>'ҷ','Ҹ'=>'ҹ','ҹ'=>'ҹ','Һ'=>'һ','һ'=>'һ','Ҽ'=>'ҽ','ҽ'=>'ҽ','Ҿ'=>'ҿ','ҿ'=>'ҿ','Ӏ'=>'ӏ','Ӂ'=>'ӂ','ӂ'=>'ӂ','Ӄ'=>'ӄ','ӄ'=>'ӄ','Ӆ'=>'ӆ','ӆ'=>'ӆ','Ӈ'=>'ӈ','ӈ'=>'ӈ','Ӊ'=>'ӊ','ӊ'=>'ӊ','Ӌ'=>'ӌ','ӌ'=>'ӌ','Ӎ'=>'ӎ','ӎ'=>'ӎ','ӏ'=>'ӏ','Ӑ'=>'ӑ','ӑ'=>'ӑ','Ӓ'=>'ӓ','ӓ'=>'ӓ','Ӕ'=>'ӕ','ӕ'=>'ӕ','Ӗ'=>'ӗ','ӗ'=>'ӗ','Ә'=>'ә','ә'=>'ә','Ӛ'=>'ӛ','ӛ'=>'ӛ','Ӝ'=>'ӝ','ӝ'=>'ӝ','Ӟ'=>'ӟ','ӟ'=>'ӟ','Ӡ'=>'ӡ','ӡ'=>'ӡ','Ӣ'=>'ӣ','ӣ'=>'ӣ','Ӥ'=>'ӥ','ӥ'=>'ӥ','Ӧ'=>'ӧ','ӧ'=>'ӧ','Ө'=>'ө','ө'=>'ө','Ӫ'=>'ӫ','ӫ'=>'ӫ','Ӭ'=>'ӭ','ӭ'=>'ӭ','Ӯ'=>'ӯ','ӯ'=>'ӯ','Ӱ'=>'ӱ','ӱ'=>'ӱ','Ӳ'=>'ӳ','ӳ'=>'ӳ','Ӵ'=>'ӵ','ӵ'=>'ӵ','Ӷ'=>'ӷ','ӷ'=>'ӷ','Ӹ'=>'ӹ','ӹ'=>'ӹ','Ӻ'=>'ӻ','ӻ'=>'ӻ','Ӽ'=>'ӽ','ӽ'=>'ӽ','Ӿ'=>'ӿ','ӿ'=>'ӿ','Ԁ'=>'ԁ','ԁ'=>'ԁ','Ԃ'=>'ԃ','ԃ'=>'ԃ','Ԅ'=>'ԅ','ԅ'=>'ԅ','Ԇ'=>'ԇ','ԇ'=>'ԇ','Ԉ'=>'ԉ','ԉ'=>'ԉ','Ԋ'=>'ԋ','ԋ'=>'ԋ','Ԍ'=>'ԍ','ԍ'=>'ԍ','Ԏ'=>'ԏ','ԏ'=>'ԏ','Ԑ'=>'ԑ','ԑ'=>'ԑ','Ԓ'=>'ԓ','ԓ'=>'ԓ','Ա'=>'ա','Բ'=>'բ','Գ'=>'գ','Դ'=>'դ','Ե'=>'ե','Զ'=>'զ','Է'=>'է','Ը'=>'ը','Թ'=>'թ','Ժ'=>'ժ','Ի'=>'ի','Լ'=>'լ','Խ'=>'խ','Ծ'=>'ծ','Կ'=>'կ','Հ'=>'հ','Ձ'=>'ձ','Ղ'=>'ղ','Ճ'=>'ճ','Մ'=>'մ','Յ'=>'յ','Ն'=>'ն','Շ'=>'շ','Ո'=>'ո','Չ'=>'չ','Պ'=>'պ','Ջ'=>'ջ','Ռ'=>'ռ','Ս'=>'ս','Վ'=>'վ','Տ'=>'տ','Ր'=>'ր','Ց'=>'ց','Ւ'=>'ւ','Փ'=>'փ','Ք'=>'ք','Օ'=>'օ','Ֆ'=>'ֆ','ՙ'=>'ՙ','ա'=>'ա','բ'=>'բ','գ'=>'գ','դ'=>'դ','ե'=>'ե','զ'=>'զ','է'=>'է','ը'=>'ը','թ'=>'թ','ժ'=>'ժ','ի'=>'ի','լ'=>'լ','խ'=>'խ','ծ'=>'ծ','կ'=>'կ','հ'=>'հ','ձ'=>'ձ','ղ'=>'ղ','ճ'=>'ճ','մ'=>'մ','յ'=>'յ','ն'=>'ն','շ'=>'շ','ո'=>'ո','չ'=>'չ','պ'=>'պ','ջ'=>'ջ','ռ'=>'ռ','ս'=>'ս','վ'=>'վ','տ'=>'տ','ր'=>'ր','ց'=>'ց','ւ'=>'ւ','փ'=>'փ','ք'=>'ք','օ'=>'օ','ֆ'=>'ֆ','և'=>'և','֑'=>'֑','֒'=>'֒','֓'=>'֓','֔'=>'֔','֕'=>'֕','֖'=>'֖','֗'=>'֗','֘'=>'֘','֙'=>'֙','֚'=>'֚','֛'=>'֛','֜'=>'֜','֝'=>'֝','֞'=>'֞','֟'=>'֟','֠'=>'֠','֡'=>'֡','֢'=>'֢','֣'=>'֣','֤'=>'֤','֥'=>'֥','֦'=>'֦','֧'=>'֧','֨'=>'֨','֩'=>'֩','֪'=>'֪','֫'=>'֫','֬'=>'֬','֭'=>'֭','֮'=>'֮','֯'=>'֯','ְ'=>'ְ','ֱ'=>'ֱ','ֲ'=>'ֲ','ֳ'=>'ֳ','ִ'=>'ִ','ֵ'=>'ֵ','ֶ'=>'ֶ','ַ'=>'ַ','ָ'=>'ָ','ֹ'=>'ֹ','ֺ'=>'ֺ','ֻ'=>'ֻ','ּ'=>'ּ','ֽ'=>'ֽ','ֿ'=>'ֿ','ׁ'=>'ׁ','ׂ'=>'ׂ','ׄ'=>'ׄ','ׅ'=>'ׅ','ׇ'=>'ׇ','א'=>'א','ב'=>'ב','ג'=>'ג','ד'=>'ד','ה'=>'ה','ו'=>'ו','ז'=>'ז','ח'=>'ח','ט'=>'ט','י'=>'י','ך'=>'ך','כ'=>'כ','ל'=>'ל','ם'=>'ם','מ'=>'מ','ן'=>'ן','נ'=>'נ','ס'=>'ס','ע'=>'ע','ף'=>'ף','פ'=>'פ','ץ'=>'ץ','צ'=>'צ','ק'=>'ק','ר'=>'ר','ש'=>'ש','ת'=>'ת','װ'=>'װ','ױ'=>'ױ','ײ'=>'ײ','ؐ'=>'ؐ','ؑ'=>'ؑ','ؒ'=>'ؒ','ؓ'=>'ؓ','ؔ'=>'ؔ','ؕ'=>'ؕ','ء'=>'ء','آ'=>'آ','أ'=>'أ','ؤ'=>'ؤ','إ'=>'إ','ئ'=>'ئ','ا'=>'ا','ب'=>'ب','ة'=>'ة','ت'=>'ت','ث'=>'ث','ج'=>'ج','ح'=>'ح','خ'=>'خ','د'=>'د','ذ'=>'ذ','ر'=>'ر','ز'=>'ز','س'=>'س','ش'=>'ش','ص'=>'ص','ض'=>'ض','ط'=>'ط','ظ'=>'ظ','ع'=>'ع','غ'=>'غ','ـ'=>'ـ','ف'=>'ف','ق'=>'ق','ك'=>'ك','ل'=>'ل','م'=>'م','ن'=>'ن','ه'=>'ه','و'=>'و','ى'=>'ى','ي'=>'ي','ً'=>'ً','ٌ'=>'ٌ','ٍ'=>'ٍ','َ'=>'َ','ُ'=>'ُ','ِ'=>'ِ','ّ'=>'ّ','ْ'=>'ْ','ٓ'=>'ٓ','ٔ'=>'ٔ','ٕ'=>'ٕ','ٖ'=>'ٖ','ٗ'=>'ٗ','٘'=>'٘','ٙ'=>'ٙ','ٚ'=>'ٚ','ٛ'=>'ٛ','ٜ'=>'ٜ','ٝ'=>'ٝ','ٞ'=>'ٞ','٠'=>'0','١'=>'1','٢'=>'2','٣'=>'3','٤'=>'4','٥'=>'5','٦'=>'6','٧'=>'7','٨'=>'8','٩'=>'9','ٮ'=>'ٮ','ٯ'=>'ٯ','ٰ'=>'ٰ','ٱ'=>'ٱ','ٲ'=>'ٲ','ٳ'=>'ٳ','ٴ'=>'ٴ','ٵ'=>'ٵ','ٶ'=>'ٶ','ٷ'=>'ٷ','ٸ'=>'ٸ','ٹ'=>'ٹ','ٺ'=>'ٺ','ٻ'=>'ٻ','ټ'=>'ټ','ٽ'=>'ٽ','پ'=>'پ','ٿ'=>'ٿ','ڀ'=>'ڀ','ځ'=>'ځ','ڂ'=>'ڂ','ڃ'=>'ڃ','ڄ'=>'ڄ','څ'=>'څ','چ'=>'چ','ڇ'=>'ڇ','ڈ'=>'ڈ','ډ'=>'ډ','ڊ'=>'ڊ','ڋ'=>'ڋ','ڌ'=>'ڌ','ڍ'=>'ڍ','ڎ'=>'ڎ','ڏ'=>'ڏ','ڐ'=>'ڐ','ڑ'=>'ڑ','ڒ'=>'ڒ','ړ'=>'ړ','ڔ'=>'ڔ','ڕ'=>'ڕ','ږ'=>'ږ','ڗ'=>'ڗ','ژ'=>'ژ','ڙ'=>'ڙ','ښ'=>'ښ','ڛ'=>'ڛ','ڜ'=>'ڜ','ڝ'=>'ڝ','ڞ'=>'ڞ','ڟ'=>'ڟ','ڠ'=>'ڠ','ڡ'=>'ڡ','ڢ'=>'ڢ','ڣ'=>'ڣ','ڤ'=>'ڤ','ڥ'=>'ڥ','ڦ'=>'ڦ','ڧ'=>'ڧ','ڨ'=>'ڨ','ک'=>'ک','ڪ'=>'ڪ','ګ'=>'ګ','ڬ'=>'ڬ','ڭ'=>'ڭ','ڮ'=>'ڮ','گ'=>'گ','ڰ'=>'ڰ','ڱ'=>'ڱ','ڲ'=>'ڲ','ڳ'=>'ڳ','ڴ'=>'ڴ','ڵ'=>'ڵ','ڶ'=>'ڶ','ڷ'=>'ڷ','ڸ'=>'ڸ','ڹ'=>'ڹ','ں'=>'ں','ڻ'=>'ڻ','ڼ'=>'ڼ','ڽ'=>'ڽ','ھ'=>'ھ','ڿ'=>'ڿ','ۀ'=>'ۀ','ہ'=>'ہ','ۂ'=>'ۂ','ۃ'=>'ۃ','ۄ'=>'ۄ','ۅ'=>'ۅ','ۆ'=>'ۆ','ۇ'=>'ۇ','ۈ'=>'ۈ','ۉ'=>'ۉ','ۊ'=>'ۊ','ۋ'=>'ۋ','ی'=>'ی','ۍ'=>'ۍ','ێ'=>'ێ','ۏ'=>'ۏ','ې'=>'ې','ۑ'=>'ۑ','ے'=>'ے','ۓ'=>'ۓ','ە'=>'ە','ۖ'=>'ۖ','ۗ'=>'ۗ','ۘ'=>'ۘ','ۙ'=>'ۙ','ۚ'=>'ۚ','ۛ'=>'ۛ','ۜ'=>'ۜ','۞'=>'۞','۟'=>'۟','۠'=>'۠','ۡ'=>'ۡ','ۢ'=>'ۢ','ۣ'=>'ۣ','ۤ'=>'ۤ','ۥ'=>'ۥ','ۦ'=>'ۦ','ۧ'=>'ۧ','ۨ'=>'ۨ','۪'=>'۪','۫'=>'۫','۬'=>'۬','ۭ'=>'ۭ','ۮ'=>'ۮ','ۯ'=>'ۯ','۰'=>'0','۱'=>'1','۲'=>'2','۳'=>'3','۴'=>'4','۵'=>'5','۶'=>'6','۷'=>'7','۸'=>'8','۹'=>'9','ۺ'=>'ۺ','ۻ'=>'ۻ','ۼ'=>'ۼ','ۿ'=>'ۿ','ܐ'=>'ܐ','ܑ'=>'ܑ','ܒ'=>'ܒ','ܓ'=>'ܓ','ܔ'=>'ܔ','ܕ'=>'ܕ','ܖ'=>'ܖ','ܗ'=>'ܗ','ܘ'=>'ܘ','ܙ'=>'ܙ','ܚ'=>'ܚ','ܛ'=>'ܛ','ܜ'=>'ܜ','ܝ'=>'ܝ','ܞ'=>'ܞ','ܟ'=>'ܟ','ܠ'=>'ܠ','ܡ'=>'ܡ','ܢ'=>'ܢ','ܣ'=>'ܣ','ܤ'=>'ܤ','ܥ'=>'ܥ','ܦ'=>'ܦ','ܧ'=>'ܧ','ܨ'=>'ܨ','ܩ'=>'ܩ','ܪ'=>'ܪ','ܫ'=>'ܫ','ܬ'=>'ܬ','ܭ'=>'ܭ','ܮ'=>'ܮ','ܯ'=>'ܯ','ܰ'=>'ܰ','ܱ'=>'ܱ','ܲ'=>'ܲ','ܳ'=>'ܳ','ܴ'=>'ܴ','ܵ'=>'ܵ','ܶ'=>'ܶ','ܷ'=>'ܷ','ܸ'=>'ܸ','ܹ'=>'ܹ','ܺ'=>'ܺ','ܻ'=>'ܻ','ܼ'=>'ܼ','ܽ'=>'ܽ','ܾ'=>'ܾ','ܿ'=>'ܿ','݀'=>'݀','݁'=>'݁','݂'=>'݂','݃'=>'݃','݄'=>'݄','݅'=>'݅','݆'=>'݆','݇'=>'݇','݈'=>'݈','݉'=>'݉','݊'=>'݊','ݍ'=>'ݍ','ݎ'=>'ݎ','ݏ'=>'ݏ','ݐ'=>'ݐ','ݑ'=>'ݑ','ݒ'=>'ݒ','ݓ'=>'ݓ','ݔ'=>'ݔ','ݕ'=>'ݕ','ݖ'=>'ݖ','ݗ'=>'ݗ','ݘ'=>'ݘ','ݙ'=>'ݙ','ݚ'=>'ݚ','ݛ'=>'ݛ','ݜ'=>'ݜ','ݝ'=>'ݝ','ݞ'=>'ݞ','ݟ'=>'ݟ','ݠ'=>'ݠ','ݡ'=>'ݡ','ݢ'=>'ݢ','ݣ'=>'ݣ','ݤ'=>'ݤ','ݥ'=>'ݥ','ݦ'=>'ݦ','ݧ'=>'ݧ','ݨ'=>'ݨ','ݩ'=>'ݩ','ݪ'=>'ݪ','ݫ'=>'ݫ','ݬ'=>'ݬ','ݭ'=>'ݭ','ހ'=>'ހ','ށ'=>'ށ','ނ'=>'ނ','ރ'=>'ރ','ބ'=>'ބ','ޅ'=>'ޅ','ކ'=>'ކ','އ'=>'އ','ވ'=>'ވ','މ'=>'މ','ފ'=>'ފ','ދ'=>'ދ','ތ'=>'ތ','ލ'=>'ލ','ގ'=>'ގ','ޏ'=>'ޏ','ސ'=>'ސ','ޑ'=>'ޑ','ޒ'=>'ޒ','ޓ'=>'ޓ','ޔ'=>'ޔ','ޕ'=>'ޕ','ޖ'=>'ޖ','ޗ'=>'ޗ','ޘ'=>'ޘ','ޙ'=>'ޙ','ޚ'=>'ޚ','ޛ'=>'ޛ','ޜ'=>'ޜ','ޝ'=>'ޝ','ޞ'=>'ޞ','ޟ'=>'ޟ','ޠ'=>'ޠ','ޡ'=>'ޡ','ޢ'=>'ޢ','ޣ'=>'ޣ','ޤ'=>'ޤ','ޥ'=>'ޥ','ަ'=>'ަ','ާ'=>'ާ','ި'=>'ި','ީ'=>'ީ','ު'=>'ު','ޫ'=>'ޫ','ެ'=>'ެ','ޭ'=>'ޭ','ޮ'=>'ޮ','ޯ'=>'ޯ','ް'=>'ް','ޱ'=>'ޱ','߀'=>'0','߁'=>'1','߂'=>'2','߃'=>'3','߄'=>'4','߅'=>'5','߆'=>'6','߇'=>'7','߈'=>'8','߉'=>'9','ߊ'=>'ߊ','ߋ'=>'ߋ','ߌ'=>'ߌ','ߍ'=>'ߍ','ߎ'=>'ߎ','ߏ'=>'ߏ','ߐ'=>'ߐ','ߑ'=>'ߑ','ߒ'=>'ߒ','ߓ'=>'ߓ','ߔ'=>'ߔ','ߕ'=>'ߕ','ߖ'=>'ߖ','ߗ'=>'ߗ','ߘ'=>'ߘ','ߙ'=>'ߙ','ߚ'=>'ߚ','ߛ'=>'ߛ','ߜ'=>'ߜ','ߝ'=>'ߝ','ߞ'=>'ߞ','ߟ'=>'ߟ','ߠ'=>'ߠ','ߡ'=>'ߡ','ߢ'=>'ߢ','ߣ'=>'ߣ','ߤ'=>'ߤ','ߥ'=>'ߥ','ߦ'=>'ߦ','ߧ'=>'ߧ','ߨ'=>'ߨ','ߩ'=>'ߩ','ߪ'=>'ߪ','߫'=>'߫','߬'=>'߬','߭'=>'߭','߮'=>'߮','߯'=>'߯','߰'=>'߰','߱'=>'߱','߲'=>'߲','߳'=>'߳','ߴ'=>'ߴ','ߵ'=>'ߵ','ߺ'=>'ߺ'); \ No newline at end of file
+<?php return array(0=>'0',1=>'1',2=>'2',3=>'3',4=>'4',5=>'5',6=>'6',7=>'7',8=>'8',9=>'9','A'=>'a','B'=>'b','C'=>'c','D'=>'d','E'=>'e','F'=>'f','G'=>'g','H'=>'h','I'=>'i','J'=>'j','K'=>'k','L'=>'l','M'=>'m','N'=>'n','O'=>'o','P'=>'p','Q'=>'q','R'=>'r','S'=>'s','T'=>'t','U'=>'u','V'=>'v','W'=>'w','X'=>'x','Y'=>'y','Z'=>'z','a'=>'a','b'=>'b','c'=>'c','d'=>'d','e'=>'e','f'=>'f','g'=>'g','h'=>'h','i'=>'i','j'=>'j','k'=>'k','l'=>'l','m'=>'m','n'=>'n','o'=>'o','p'=>'p','q'=>'q','r'=>'r','s'=>'s','t'=>'t','u'=>'u','v'=>'v','w'=>'w','x'=>'x','y'=>'y','z'=>'z','ª'=>'ª','²'=>'2','³'=>'3','µ'=>'µ','¹'=>'1','º'=>'º','¼'=>'1/4','½'=>'1/2','¾'=>'3/4','À'=>'à','Á'=>'á','Â'=>'â','Ã'=>'ã','Ä'=>'ae','Å'=>'å','Æ'=>'ae','Ç'=>'ç','È'=>'è','É'=>'é','Ê'=>'ê','Ë'=>'ë','Ì'=>'ì','Í'=>'í','Î'=>'î','Ï'=>'ï','Ð'=>'ð','Ñ'=>'ñ','Ò'=>'ò','Ó'=>'ó','Ô'=>'ô','Õ'=>'õ','Ö'=>'oe','Ø'=>'ø','Ù'=>'ù','Ú'=>'ú','Û'=>'û','Ü'=>'ü','Ý'=>'ý','Þ'=>'þ','ß'=>'ss','à'=>'à','á'=>'á','â'=>'â','ã'=>'ã','ä'=>'ae','å'=>'å','æ'=>'ae','ç'=>'ç','è'=>'è','é'=>'é','ê'=>'ê','ë'=>'ë','ì'=>'ì','í'=>'í','î'=>'î','ï'=>'ï','ð'=>'ð','ñ'=>'ñ','ò'=>'ò','ó'=>'ó','ô'=>'ô','õ'=>'õ','ö'=>'oe','ø'=>'ø','ù'=>'ù','ú'=>'ú','û'=>'û','ü'=>'ue','ý'=>'ý','þ'=>'þ','ÿ'=>'ÿ','Ā'=>'ā','ā'=>'ā','Ă'=>'ă','ă'=>'ă','Ą'=>'ą','ą'=>'ą','Ć'=>'ć','ć'=>'ć','Ĉ'=>'ĉ','ĉ'=>'ĉ','Ċ'=>'ċ','ċ'=>'ċ','Č'=>'č','č'=>'č','Ď'=>'ď','ď'=>'ď','Đ'=>'đ','đ'=>'đ','Ē'=>'ē','ē'=>'ē','Ĕ'=>'ĕ','ĕ'=>'ĕ','Ė'=>'ė','ė'=>'ė','Ę'=>'ę','ę'=>'ę','Ě'=>'ě','ě'=>'ě','Ĝ'=>'ĝ','ĝ'=>'ĝ','Ğ'=>'ğ','ğ'=>'ğ','Ġ'=>'ġ','ġ'=>'ġ','Ģ'=>'ģ','ģ'=>'ģ','Ĥ'=>'ĥ','ĥ'=>'ĥ','Ħ'=>'ħ','ħ'=>'ħ','Ĩ'=>'ĩ','ĩ'=>'ĩ','Ī'=>'ī','ī'=>'ī','Ĭ'=>'ĭ','ĭ'=>'ĭ','Į'=>'į','į'=>'į','İ'=>'i','ı'=>'ı','IJ'=>'ij','ij'=>'ij','Ĵ'=>'ĵ','ĵ'=>'ĵ','Ķ'=>'ķ','ķ'=>'ķ','ĸ'=>'ĸ','Ĺ'=>'ĺ','ĺ'=>'ĺ','Ļ'=>'ļ','ļ'=>'ļ','Ľ'=>'ľ','ľ'=>'ľ','Ŀ'=>'ŀ','ŀ'=>'ŀ','Ł'=>'ł','ł'=>'ł','Ń'=>'ń','ń'=>'ń','Ņ'=>'ņ','ņ'=>'ņ','Ň'=>'ň','ň'=>'ň','ʼn'=>'ʼn','Ŋ'=>'ŋ','ŋ'=>'ŋ','Ō'=>'ō','ō'=>'ō','Ŏ'=>'ŏ','ŏ'=>'ŏ','Ő'=>'ő','ő'=>'ő','Œ'=>'oe','œ'=>'oe','Ŕ'=>'ŕ','ŕ'=>'ŕ','Ŗ'=>'ŗ','ŗ'=>'ŗ','Ř'=>'ř','ř'=>'ř','Ś'=>'ś','ś'=>'ś','Ŝ'=>'ŝ','ŝ'=>'ŝ','Ş'=>'ş','ş'=>'ş','Š'=>'š','š'=>'š','Ţ'=>'ţ','ţ'=>'ţ','Ť'=>'ť','ť'=>'ť','Ŧ'=>'ŧ','ŧ'=>'ŧ','Ũ'=>'ũ','ũ'=>'ũ','Ū'=>'ū','ū'=>'ū','Ŭ'=>'ŭ','ŭ'=>'ŭ','Ů'=>'ů','ů'=>'ů','Ű'=>'ű','ű'=>'ű','Ų'=>'ų','ų'=>'ų','Ŵ'=>'ŵ','ŵ'=>'ŵ','Ŷ'=>'ŷ','ŷ'=>'ŷ','Ÿ'=>'ÿ','Ź'=>'ź','ź'=>'ź','Ż'=>'ż','ż'=>'ż','Ž'=>'ž','ž'=>'ž','ſ'=>'ſ','ƀ'=>'ƀ','Ɓ'=>'ɓ','Ƃ'=>'ƃ','ƃ'=>'ƃ','Ƅ'=>'ƅ','ƅ'=>'ƅ','Ɔ'=>'ɔ','Ƈ'=>'ƈ','ƈ'=>'ƈ','Ɖ'=>'ɖ','Ɗ'=>'ɗ','Ƌ'=>'ƌ','ƌ'=>'ƌ','ƍ'=>'ƍ','Ǝ'=>'ǝ','Ə'=>'ə','Ɛ'=>'ɛ','Ƒ'=>'ƒ','ƒ'=>'ƒ','Ɠ'=>'ɠ','Ɣ'=>'ɣ','ƕ'=>'hv','Ɩ'=>'ɩ','Ɨ'=>'ɨ','Ƙ'=>'ƙ','ƙ'=>'ƙ','ƚ'=>'ƚ','ƛ'=>'ƛ','Ɯ'=>'ɯ','Ɲ'=>'ɲ','ƞ'=>'ƞ','Ɵ'=>'ɵ','Ơ'=>'ơ','ơ'=>'ơ','Ƣ'=>'oi','ƣ'=>'oi','Ƥ'=>'ƥ','ƥ'=>'ƥ','Ʀ'=>'yr','Ƨ'=>'ƨ','ƨ'=>'ƨ','Ʃ'=>'ʃ','ƪ'=>'ƪ','ƫ'=>'ƫ','Ƭ'=>'ƭ','ƭ'=>'ƭ','Ʈ'=>'ʈ','Ư'=>'ư','ư'=>'ư','Ʊ'=>'ʊ','Ʋ'=>'ʋ','Ƴ'=>'ƴ','ƴ'=>'ƴ','Ƶ'=>'ƶ','ƶ'=>'ƶ','Ʒ'=>'ʒ','Ƹ'=>'ƹ','ƹ'=>'ƹ','ƺ'=>'ƺ','ƻ'=>'ƻ','Ƽ'=>'ƽ','ƽ'=>'ƽ','ƾ'=>'ƾ','ƿ'=>'ƿ','ǀ'=>'ǀ','ǁ'=>'ǁ','ǂ'=>'ǂ','ǃ'=>'ǃ','DŽ'=>'dž','Dž'=>'dž','dž'=>'dž','LJ'=>'lj','Lj'=>'lj','lj'=>'lj','NJ'=>'nj','Nj'=>'nj','nj'=>'nj','Ǎ'=>'ǎ','ǎ'=>'ǎ','Ǐ'=>'ǐ','ǐ'=>'ǐ','Ǒ'=>'ǒ','ǒ'=>'ǒ','Ǔ'=>'ǔ','ǔ'=>'ǔ','Ǖ'=>'ǖ','ǖ'=>'ǖ','Ǘ'=>'ǘ','ǘ'=>'ǘ','Ǚ'=>'ǚ','ǚ'=>'ǚ','Ǜ'=>'ǜ','ǜ'=>'ǜ','ǝ'=>'ǝ','Ǟ'=>'ǟ','ǟ'=>'ǟ','Ǡ'=>'ǡ','ǡ'=>'ǡ','Ǣ'=>'ǣ','ǣ'=>'ǣ','Ǥ'=>'ǥ','ǥ'=>'ǥ','Ǧ'=>'ǧ','ǧ'=>'ǧ','Ǩ'=>'ǩ','ǩ'=>'ǩ','Ǫ'=>'ǫ','ǫ'=>'ǫ','Ǭ'=>'ǭ','ǭ'=>'ǭ','Ǯ'=>'ǯ','ǯ'=>'ǯ','ǰ'=>'ǰ','DZ'=>'dz','Dz'=>'dz','dz'=>'dz','Ǵ'=>'ǵ','ǵ'=>'ǵ','Ƕ'=>'ƕ','Ƿ'=>'ƿ','Ǹ'=>'ǹ','ǹ'=>'ǹ','Ǻ'=>'ǻ','ǻ'=>'ǻ','Ǽ'=>'ǽ','ǽ'=>'ǽ','Ǿ'=>'ǿ','ǿ'=>'ǿ','Ȁ'=>'ȁ','ȁ'=>'ȁ','Ȃ'=>'ȃ','ȃ'=>'ȃ','Ȅ'=>'ȅ','ȅ'=>'ȅ','Ȇ'=>'ȇ','ȇ'=>'ȇ','Ȉ'=>'ȉ','ȉ'=>'ȉ','Ȋ'=>'ȋ','ȋ'=>'ȋ','Ȍ'=>'ȍ','ȍ'=>'ȍ','Ȏ'=>'ȏ','ȏ'=>'ȏ','Ȑ'=>'ȑ','ȑ'=>'ȑ','Ȓ'=>'ȓ','ȓ'=>'ȓ','Ȕ'=>'ȕ','ȕ'=>'ȕ','Ȗ'=>'ȗ','ȗ'=>'ȗ','Ș'=>'ș','ș'=>'ș','Ț'=>'ț','ț'=>'ț','Ȝ'=>'ȝ','ȝ'=>'ȝ','Ȟ'=>'ȟ','ȟ'=>'ȟ','Ƞ'=>'ƞ','ȡ'=>'ȡ','Ȣ'=>'ou','ȣ'=>'ou','Ȥ'=>'ȥ','ȥ'=>'ȥ','Ȧ'=>'ȧ','ȧ'=>'ȧ','Ȩ'=>'ȩ','ȩ'=>'ȩ','Ȫ'=>'ȫ','ȫ'=>'ȫ','Ȭ'=>'ȭ','ȭ'=>'ȭ','Ȯ'=>'ȯ','ȯ'=>'ȯ','Ȱ'=>'ȱ','ȱ'=>'ȱ','Ȳ'=>'ȳ','ȳ'=>'ȳ','ȴ'=>'ȴ','ȵ'=>'ȵ','ȶ'=>'ȶ','ȷ'=>'ȷ','ȸ'=>'ȸ','ȹ'=>'ȹ','Ⱥ'=>'ⱥ','Ȼ'=>'ȼ','ȼ'=>'ȼ','Ƚ'=>'ƚ','Ⱦ'=>'ⱦ','ȿ'=>'ȿ','ɀ'=>'ɀ','Ɂ'=>'ɂ','ɂ'=>'ɂ','Ƀ'=>'ƀ','Ʉ'=>'ʉ','Ʌ'=>'ʌ','Ɇ'=>'ɇ','ɇ'=>'ɇ','Ɉ'=>'ɉ','ɉ'=>'ɉ','Ɋ'=>'ɋ','ɋ'=>'ɋ','Ɍ'=>'ɍ','ɍ'=>'ɍ','Ɏ'=>'ɏ','ɏ'=>'ɏ','ɐ'=>'ɐ','ɑ'=>'ɑ','ɒ'=>'ɒ','ɓ'=>'ɓ','ɔ'=>'ɔ','ɕ'=>'ɕ','ɖ'=>'ɖ','ɗ'=>'ɗ','ɘ'=>'ɘ','ə'=>'ə','ɚ'=>'ɚ','ɛ'=>'ɛ','ɜ'=>'ɜ','ɝ'=>'ɝ','ɞ'=>'ɞ','ɟ'=>'ɟ','ɠ'=>'ɠ','ɡ'=>'ɡ','ɢ'=>'ɢ','ɣ'=>'ɣ','ɤ'=>'ɤ','ɥ'=>'ɥ','ɦ'=>'ɦ','ɧ'=>'ɧ','ɨ'=>'ɨ','ɩ'=>'ɩ','ɪ'=>'ɪ','ɫ'=>'ɫ','ɬ'=>'ɬ','ɭ'=>'ɭ','ɮ'=>'ɮ','ɯ'=>'ɯ','ɰ'=>'ɰ','ɱ'=>'ɱ','ɲ'=>'ɲ','ɳ'=>'ɳ','ɴ'=>'ɴ','ɵ'=>'ɵ','ɶ'=>'ɶ','ɷ'=>'ɷ','ɸ'=>'ɸ','ɹ'=>'ɹ','ɺ'=>'ɺ','ɻ'=>'ɻ','ɼ'=>'ɼ','ɽ'=>'ɽ','ɾ'=>'ɾ','ɿ'=>'ɿ','ʀ'=>'ʀ','ʁ'=>'ʁ','ʂ'=>'ʂ','ʃ'=>'ʃ','ʄ'=>'ʄ','ʅ'=>'ʅ','ʆ'=>'ʆ','ʇ'=>'ʇ','ʈ'=>'ʈ','ʉ'=>'ʉ','ʊ'=>'ʊ','ʋ'=>'ʋ','ʌ'=>'ʌ','ʍ'=>'ʍ','ʎ'=>'ʎ','ʏ'=>'ʏ','ʐ'=>'ʐ','ʑ'=>'ʑ','ʒ'=>'ʒ','ʓ'=>'ʓ','ʔ'=>'ʔ','ʕ'=>'ʕ','ʖ'=>'ʖ','ʗ'=>'ʗ','ʘ'=>'ʘ','ʙ'=>'ʙ','ʚ'=>'ʚ','ʛ'=>'ʛ','ʜ'=>'ʜ','ʝ'=>'ʝ','ʞ'=>'ʞ','ʟ'=>'ʟ','ʠ'=>'ʠ','ʡ'=>'ʡ','ʢ'=>'ʢ','ʣ'=>'ʣ','ʤ'=>'ʤ','ʥ'=>'ʥ','ʦ'=>'ʦ','ʧ'=>'ʧ','ʨ'=>'ʨ','ʩ'=>'ʩ','ʪ'=>'ʪ','ʫ'=>'ʫ','ʬ'=>'ʬ','ʭ'=>'ʭ','ʮ'=>'ʮ','ʯ'=>'ʯ','ʰ'=>'ʰ','ʱ'=>'ʱ','ʲ'=>'ʲ','ʳ'=>'ʳ','ʴ'=>'ʴ','ʵ'=>'ʵ','ʶ'=>'ʶ','ʷ'=>'ʷ','ʸ'=>'ʸ','ʹ'=>'ʹ','ʺ'=>'ʺ','ʻ'=>'ʻ','ʼ'=>'ʼ','ʽ'=>'ʽ','ʾ'=>'ʾ','ʿ'=>'ʿ','ˀ'=>'ˀ','ˁ'=>'ˁ','ˆ'=>'ˆ','ˇ'=>'ˇ','ˈ'=>'ˈ','ˉ'=>'ˉ','ˊ'=>'ˊ','ˋ'=>'ˋ','ˌ'=>'ˌ','ˍ'=>'ˍ','ˎ'=>'ˎ','ˏ'=>'ˏ','ː'=>'ː','ˑ'=>'ˑ','ˠ'=>'ˠ','ˡ'=>'ˡ','ˢ'=>'ˢ','ˣ'=>'ˣ','ˤ'=>'ˤ','ˮ'=>'ˮ','̀'=>'̀','́'=>'́','̂'=>'̂','̃'=>'̃','̄'=>'̄','̅'=>'̅','̆'=>'̆','̇'=>'̇','̈'=>'̈','̉'=>'̉','̊'=>'̊','̋'=>'̋','̌'=>'̌','̍'=>'̍','̎'=>'̎','̏'=>'̏','̐'=>'̐','̑'=>'̑','̒'=>'̒','̓'=>'̓','̔'=>'̔','̕'=>'̕','̖'=>'̖','̗'=>'̗','̘'=>'̘','̙'=>'̙','̚'=>'̚','̛'=>'̛','̜'=>'̜','̝'=>'̝','̞'=>'̞','̟'=>'̟','̠'=>'̠','̡'=>'̡','̢'=>'̢','̣'=>'̣','̤'=>'̤','̥'=>'̥','̦'=>'̦','̧'=>'̧','̨'=>'̨','̩'=>'̩','̪'=>'̪','̫'=>'̫','̬'=>'̬','̭'=>'̭','̮'=>'̮','̯'=>'̯','̰'=>'̰','̱'=>'̱','̲'=>'̲','̳'=>'̳','̴'=>'̴','̵'=>'̵','̶'=>'̶','̷'=>'̷','̸'=>'̸','̹'=>'̹','̺'=>'̺','̻'=>'̻','̼'=>'̼','̽'=>'̽','̾'=>'̾','̿'=>'̿','̀'=>'̀','́'=>'́','͂'=>'͂','̓'=>'̓','̈́'=>'̈́','ͅ'=>'ͅ','͆'=>'͆','͇'=>'͇','͈'=>'͈','͉'=>'͉','͊'=>'͊','͋'=>'͋','͌'=>'͌','͍'=>'͍','͎'=>'͎','͏'=>'͏','͐'=>'͐','͑'=>'͑','͒'=>'͒','͓'=>'͓','͔'=>'͔','͕'=>'͕','͖'=>'͖','͗'=>'͗','͘'=>'͘','͙'=>'͙','͚'=>'͚','͛'=>'͛','͜'=>'͜','͝'=>'͝','͞'=>'͞','͟'=>'͟','͠'=>'͠','͡'=>'͡','͢'=>'͢','ͣ'=>'ͣ','ͤ'=>'ͤ','ͥ'=>'ͥ','ͦ'=>'ͦ','ͧ'=>'ͧ','ͨ'=>'ͨ','ͩ'=>'ͩ','ͪ'=>'ͪ','ͫ'=>'ͫ','ͬ'=>'ͬ','ͭ'=>'ͭ','ͮ'=>'ͮ','ͯ'=>'ͯ','ͺ'=>'ͺ','ͻ'=>'ͻ','ͼ'=>'ͼ','ͽ'=>'ͽ','Ά'=>'ά','Έ'=>'έ','Ή'=>'ή','Ί'=>'ί','Ό'=>'ό','Ύ'=>'ύ','Ώ'=>'ώ','ΐ'=>'ΐ','Α'=>'α','Β'=>'β','Γ'=>'γ','Δ'=>'δ','Ε'=>'ε','Ζ'=>'ζ','Η'=>'η','Θ'=>'θ','Ι'=>'ι','Κ'=>'κ','Λ'=>'λ','Μ'=>'μ','Ν'=>'ν','Ξ'=>'ξ','Ο'=>'ο','Π'=>'π','Ρ'=>'ρ','Σ'=>'σ','Τ'=>'τ','Υ'=>'υ','Φ'=>'φ','Χ'=>'χ','Ψ'=>'ψ','Ω'=>'ω','Ϊ'=>'ϊ','Ϋ'=>'ϋ','ά'=>'ά','έ'=>'έ','ή'=>'ή','ί'=>'ί','ΰ'=>'ΰ','α'=>'α','β'=>'β','γ'=>'γ','δ'=>'δ','ε'=>'ε','ζ'=>'ζ','η'=>'η','θ'=>'θ','ι'=>'ι','κ'=>'κ','λ'=>'λ','μ'=>'μ','ν'=>'ν','ξ'=>'ξ','ο'=>'ο','π'=>'π','ρ'=>'ρ','ς'=>'ς','σ'=>'σ','τ'=>'τ','υ'=>'υ','φ'=>'φ','χ'=>'χ','ψ'=>'ψ','ω'=>'ω','ϊ'=>'ϊ','ϋ'=>'ϋ','ό'=>'ό','ύ'=>'ύ','ώ'=>'ώ','ϐ'=>'ϐ','ϑ'=>'ϑ','ϒ'=>'ϒ','ϓ'=>'ϓ','ϔ'=>'ϔ','ϕ'=>'ϕ','ϖ'=>'ϖ','ϗ'=>'ϗ','Ϙ'=>'ϙ','ϙ'=>'ϙ','Ϛ'=>'ϛ','ϛ'=>'ϛ','Ϝ'=>'ϝ','ϝ'=>'ϝ','Ϟ'=>'ϟ','ϟ'=>'ϟ','Ϡ'=>'ϡ','ϡ'=>'ϡ','Ϣ'=>'ϣ','ϣ'=>'ϣ','Ϥ'=>'ϥ','ϥ'=>'ϥ','Ϧ'=>'ϧ','ϧ'=>'ϧ','Ϩ'=>'ϩ','ϩ'=>'ϩ','Ϫ'=>'ϫ','ϫ'=>'ϫ','Ϭ'=>'ϭ','ϭ'=>'ϭ','Ϯ'=>'ϯ','ϯ'=>'ϯ','ϰ'=>'ϰ','ϱ'=>'ϱ','ϲ'=>'ϲ','ϳ'=>'ϳ','ϴ'=>'θ','ϵ'=>'ϵ','Ϸ'=>'ϸ','ϸ'=>'ϸ','Ϲ'=>'ϲ','Ϻ'=>'ϻ','ϻ'=>'ϻ','ϼ'=>'ϼ','Ͻ'=>'ͻ','Ͼ'=>'ͼ','Ͽ'=>'ͽ','Ѐ'=>'ѐ','Ё'=>'ё','Ђ'=>'ђ','Ѓ'=>'ѓ','Є'=>'є','Ѕ'=>'ѕ','І'=>'і','Ї'=>'ї','Ј'=>'ј','Љ'=>'љ','Њ'=>'њ','Ћ'=>'ћ','Ќ'=>'ќ','Ѝ'=>'ѝ','Ў'=>'ў','Џ'=>'џ','А'=>'а','Б'=>'б','В'=>'в','Г'=>'г','Д'=>'д','Е'=>'е','Ж'=>'ж','З'=>'з','И'=>'и','Й'=>'й','К'=>'к','Л'=>'л','М'=>'м','Н'=>'н','О'=>'о','П'=>'п','Р'=>'р','С'=>'с','Т'=>'т','У'=>'у','Ф'=>'ф','Х'=>'х','Ц'=>'ц','Ч'=>'ч','Ш'=>'ш','Щ'=>'щ','Ъ'=>'ъ','Ы'=>'ы','Ь'=>'ь','Э'=>'э','Ю'=>'ю','Я'=>'я','а'=>'а','б'=>'б','в'=>'в','г'=>'г','д'=>'д','е'=>'е','ж'=>'ж','з'=>'з','и'=>'и','й'=>'й','к'=>'к','л'=>'л','м'=>'м','н'=>'н','о'=>'о','п'=>'п','р'=>'р','с'=>'с','т'=>'т','у'=>'у','ф'=>'ф','х'=>'х','ц'=>'ц','ч'=>'ч','ш'=>'ш','щ'=>'щ','ъ'=>'ъ','ы'=>'ы','ь'=>'ь','э'=>'э','ю'=>'ю','я'=>'я','ѐ'=>'ѐ','ё'=>'ё','ђ'=>'ђ','ѓ'=>'ѓ','є'=>'є','ѕ'=>'ѕ','і'=>'і','ї'=>'ї','ј'=>'ј','љ'=>'љ','њ'=>'њ','ћ'=>'ћ','ќ'=>'ќ','ѝ'=>'ѝ','ў'=>'ў','џ'=>'џ','Ѡ'=>'ѡ','ѡ'=>'ѡ','Ѣ'=>'ѣ','ѣ'=>'ѣ','Ѥ'=>'ѥ','ѥ'=>'ѥ','Ѧ'=>'ѧ','ѧ'=>'ѧ','Ѩ'=>'ѩ','ѩ'=>'ѩ','Ѫ'=>'ѫ','ѫ'=>'ѫ','Ѭ'=>'ѭ','ѭ'=>'ѭ','Ѯ'=>'ѯ','ѯ'=>'ѯ','Ѱ'=>'ѱ','ѱ'=>'ѱ','Ѳ'=>'ѳ','ѳ'=>'ѳ','Ѵ'=>'ѵ','ѵ'=>'ѵ','Ѷ'=>'ѷ','ѷ'=>'ѷ','Ѹ'=>'ѹ','ѹ'=>'ѹ','Ѻ'=>'ѻ','ѻ'=>'ѻ','Ѽ'=>'ѽ','ѽ'=>'ѽ','Ѿ'=>'ѿ','ѿ'=>'ѿ','Ҁ'=>'ҁ','ҁ'=>'ҁ','҃'=>'҃','҄'=>'҄','҅'=>'҅','҆'=>'҆','҈'=>'҈','҉'=>'҉','Ҋ'=>'ҋ','ҋ'=>'ҋ','Ҍ'=>'ҍ','ҍ'=>'ҍ','Ҏ'=>'ҏ','ҏ'=>'ҏ','Ґ'=>'ґ','ґ'=>'ґ','Ғ'=>'ғ','ғ'=>'ғ','Ҕ'=>'ҕ','ҕ'=>'ҕ','Җ'=>'җ','җ'=>'җ','Ҙ'=>'ҙ','ҙ'=>'ҙ','Қ'=>'қ','қ'=>'қ','Ҝ'=>'ҝ','ҝ'=>'ҝ','Ҟ'=>'ҟ','ҟ'=>'ҟ','Ҡ'=>'ҡ','ҡ'=>'ҡ','Ң'=>'ң','ң'=>'ң','Ҥ'=>'ҥ','ҥ'=>'ҥ','Ҧ'=>'ҧ','ҧ'=>'ҧ','Ҩ'=>'ҩ','ҩ'=>'ҩ','Ҫ'=>'ҫ','ҫ'=>'ҫ','Ҭ'=>'ҭ','ҭ'=>'ҭ','Ү'=>'ү','ү'=>'ү','Ұ'=>'ұ','ұ'=>'ұ','Ҳ'=>'ҳ','ҳ'=>'ҳ','Ҵ'=>'ҵ','ҵ'=>'ҵ','Ҷ'=>'ҷ','ҷ'=>'ҷ','Ҹ'=>'ҹ','ҹ'=>'ҹ','Һ'=>'һ','һ'=>'һ','Ҽ'=>'ҽ','ҽ'=>'ҽ','Ҿ'=>'ҿ','ҿ'=>'ҿ','Ӏ'=>'ӏ','Ӂ'=>'ӂ','ӂ'=>'ӂ','Ӄ'=>'ӄ','ӄ'=>'ӄ','Ӆ'=>'ӆ','ӆ'=>'ӆ','Ӈ'=>'ӈ','ӈ'=>'ӈ','Ӊ'=>'ӊ','ӊ'=>'ӊ','Ӌ'=>'ӌ','ӌ'=>'ӌ','Ӎ'=>'ӎ','ӎ'=>'ӎ','ӏ'=>'ӏ','Ӑ'=>'ӑ','ӑ'=>'ӑ','Ӓ'=>'ӓ','ӓ'=>'ӓ','Ӕ'=>'ӕ','ӕ'=>'ӕ','Ӗ'=>'ӗ','ӗ'=>'ӗ','Ә'=>'ә','ә'=>'ә','Ӛ'=>'ӛ','ӛ'=>'ӛ','Ӝ'=>'ӝ','ӝ'=>'ӝ','Ӟ'=>'ӟ','ӟ'=>'ӟ','Ӡ'=>'ӡ','ӡ'=>'ӡ','Ӣ'=>'ӣ','ӣ'=>'ӣ','Ӥ'=>'ӥ','ӥ'=>'ӥ','Ӧ'=>'ӧ','ӧ'=>'ӧ','Ө'=>'ө','ө'=>'ө','Ӫ'=>'ӫ','ӫ'=>'ӫ','Ӭ'=>'ӭ','ӭ'=>'ӭ','Ӯ'=>'ӯ','ӯ'=>'ӯ','Ӱ'=>'ӱ','ӱ'=>'ӱ','Ӳ'=>'ӳ','ӳ'=>'ӳ','Ӵ'=>'ӵ','ӵ'=>'ӵ','Ӷ'=>'ӷ','ӷ'=>'ӷ','Ӹ'=>'ӹ','ӹ'=>'ӹ','Ӻ'=>'ӻ','ӻ'=>'ӻ','Ӽ'=>'ӽ','ӽ'=>'ӽ','Ӿ'=>'ӿ','ӿ'=>'ӿ','Ԁ'=>'ԁ','ԁ'=>'ԁ','Ԃ'=>'ԃ','ԃ'=>'ԃ','Ԅ'=>'ԅ','ԅ'=>'ԅ','Ԇ'=>'ԇ','ԇ'=>'ԇ','Ԉ'=>'ԉ','ԉ'=>'ԉ','Ԋ'=>'ԋ','ԋ'=>'ԋ','Ԍ'=>'ԍ','ԍ'=>'ԍ','Ԏ'=>'ԏ','ԏ'=>'ԏ','Ԑ'=>'ԑ','ԑ'=>'ԑ','Ԓ'=>'ԓ','ԓ'=>'ԓ','Ա'=>'ա','Բ'=>'բ','Գ'=>'գ','Դ'=>'դ','Ե'=>'ե','Զ'=>'զ','Է'=>'է','Ը'=>'ը','Թ'=>'թ','Ժ'=>'ժ','Ի'=>'ի','Լ'=>'լ','Խ'=>'խ','Ծ'=>'ծ','Կ'=>'կ','Հ'=>'հ','Ձ'=>'ձ','Ղ'=>'ղ','Ճ'=>'ճ','Մ'=>'մ','Յ'=>'յ','Ն'=>'ն','Շ'=>'շ','Ո'=>'ո','Չ'=>'չ','Պ'=>'պ','Ջ'=>'ջ','Ռ'=>'ռ','Ս'=>'ս','Վ'=>'վ','Տ'=>'տ','Ր'=>'ր','Ց'=>'ց','Ւ'=>'ւ','Փ'=>'փ','Ք'=>'ք','Օ'=>'օ','Ֆ'=>'ֆ','ՙ'=>'ՙ','ա'=>'ա','բ'=>'բ','գ'=>'գ','դ'=>'դ','ե'=>'ե','զ'=>'զ','է'=>'է','ը'=>'ը','թ'=>'թ','ժ'=>'ժ','ի'=>'ի','լ'=>'լ','խ'=>'խ','ծ'=>'ծ','կ'=>'կ','հ'=>'հ','ձ'=>'ձ','ղ'=>'ղ','ճ'=>'ճ','մ'=>'մ','յ'=>'յ','ն'=>'ն','շ'=>'շ','ո'=>'ո','չ'=>'չ','պ'=>'պ','ջ'=>'ջ','ռ'=>'ռ','ս'=>'ս','վ'=>'վ','տ'=>'տ','ր'=>'ր','ց'=>'ց','ւ'=>'ւ','փ'=>'փ','ք'=>'ք','օ'=>'օ','ֆ'=>'ֆ','և'=>'և','֑'=>'֑','֒'=>'֒','֓'=>'֓','֔'=>'֔','֕'=>'֕','֖'=>'֖','֗'=>'֗','֘'=>'֘','֙'=>'֙','֚'=>'֚','֛'=>'֛','֜'=>'֜','֝'=>'֝','֞'=>'֞','֟'=>'֟','֠'=>'֠','֡'=>'֡','֢'=>'֢','֣'=>'֣','֤'=>'֤','֥'=>'֥','֦'=>'֦','֧'=>'֧','֨'=>'֨','֩'=>'֩','֪'=>'֪','֫'=>'֫','֬'=>'֬','֭'=>'֭','֮'=>'֮','֯'=>'֯','ְ'=>'ְ','ֱ'=>'ֱ','ֲ'=>'ֲ','ֳ'=>'ֳ','ִ'=>'ִ','ֵ'=>'ֵ','ֶ'=>'ֶ','ַ'=>'ַ','ָ'=>'ָ','ֹ'=>'ֹ','ֺ'=>'ֺ','ֻ'=>'ֻ','ּ'=>'ּ','ֽ'=>'ֽ','ֿ'=>'ֿ','ׁ'=>'ׁ','ׂ'=>'ׂ','ׄ'=>'ׄ','ׅ'=>'ׅ','ׇ'=>'ׇ','א'=>'א','ב'=>'ב','ג'=>'ג','ד'=>'ד','ה'=>'ה','ו'=>'ו','ז'=>'ז','ח'=>'ח','ט'=>'ט','י'=>'י','ך'=>'ך','כ'=>'כ','ל'=>'ל','ם'=>'ם','מ'=>'מ','ן'=>'ן','נ'=>'נ','ס'=>'ס','ע'=>'ע','ף'=>'ף','פ'=>'פ','ץ'=>'ץ','צ'=>'צ','ק'=>'ק','ר'=>'ר','ש'=>'ש','ת'=>'ת','װ'=>'װ','ױ'=>'ױ','ײ'=>'ײ','ؐ'=>'ؐ','ؑ'=>'ؑ','ؒ'=>'ؒ','ؓ'=>'ؓ','ؔ'=>'ؔ','ؕ'=>'ؕ','ء'=>'ء','آ'=>'آ','أ'=>'أ','ؤ'=>'ؤ','إ'=>'إ','ئ'=>'ئ','ا'=>'ا','ب'=>'ب','ة'=>'ة','ت'=>'ت','ث'=>'ث','ج'=>'ج','ح'=>'ح','خ'=>'خ','د'=>'د','ذ'=>'ذ','ر'=>'ر','ز'=>'ز','س'=>'س','ش'=>'ش','ص'=>'ص','ض'=>'ض','ط'=>'ط','ظ'=>'ظ','ع'=>'ع','غ'=>'غ','ـ'=>'ـ','ف'=>'ف','ق'=>'ق','ك'=>'ك','ل'=>'ل','م'=>'م','ن'=>'ن','ه'=>'ه','و'=>'و','ى'=>'ى','ي'=>'ي','ً'=>'ً','ٌ'=>'ٌ','ٍ'=>'ٍ','َ'=>'َ','ُ'=>'ُ','ِ'=>'ِ','ّ'=>'ّ','ْ'=>'ْ','ٓ'=>'ٓ','ٔ'=>'ٔ','ٕ'=>'ٕ','ٖ'=>'ٖ','ٗ'=>'ٗ','٘'=>'٘','ٙ'=>'ٙ','ٚ'=>'ٚ','ٛ'=>'ٛ','ٜ'=>'ٜ','ٝ'=>'ٝ','ٞ'=>'ٞ','٠'=>'0','١'=>'1','٢'=>'2','٣'=>'3','٤'=>'4','٥'=>'5','٦'=>'6','٧'=>'7','٨'=>'8','٩'=>'9','ٮ'=>'ٮ','ٯ'=>'ٯ','ٰ'=>'ٰ','ٱ'=>'ٱ','ٲ'=>'ٲ','ٳ'=>'ٳ','ٴ'=>'ٴ','ٵ'=>'ٵ','ٶ'=>'ٶ','ٷ'=>'ٷ','ٸ'=>'ٸ','ٹ'=>'ٹ','ٺ'=>'ٺ','ٻ'=>'ٻ','ټ'=>'ټ','ٽ'=>'ٽ','پ'=>'پ','ٿ'=>'ٿ','ڀ'=>'ڀ','ځ'=>'ځ','ڂ'=>'ڂ','ڃ'=>'ڃ','ڄ'=>'ڄ','څ'=>'څ','چ'=>'چ','ڇ'=>'ڇ','ڈ'=>'ڈ','ډ'=>'ډ','ڊ'=>'ڊ','ڋ'=>'ڋ','ڌ'=>'ڌ','ڍ'=>'ڍ','ڎ'=>'ڎ','ڏ'=>'ڏ','ڐ'=>'ڐ','ڑ'=>'ڑ','ڒ'=>'ڒ','ړ'=>'ړ','ڔ'=>'ڔ','ڕ'=>'ڕ','ږ'=>'ږ','ڗ'=>'ڗ','ژ'=>'ژ','ڙ'=>'ڙ','ښ'=>'ښ','ڛ'=>'ڛ','ڜ'=>'ڜ','ڝ'=>'ڝ','ڞ'=>'ڞ','ڟ'=>'ڟ','ڠ'=>'ڠ','ڡ'=>'ڡ','ڢ'=>'ڢ','ڣ'=>'ڣ','ڤ'=>'ڤ','ڥ'=>'ڥ','ڦ'=>'ڦ','ڧ'=>'ڧ','ڨ'=>'ڨ','ک'=>'ک','ڪ'=>'ڪ','ګ'=>'ګ','ڬ'=>'ڬ','ڭ'=>'ڭ','ڮ'=>'ڮ','گ'=>'گ','ڰ'=>'ڰ','ڱ'=>'ڱ','ڲ'=>'ڲ','ڳ'=>'ڳ','ڴ'=>'ڴ','ڵ'=>'ڵ','ڶ'=>'ڶ','ڷ'=>'ڷ','ڸ'=>'ڸ','ڹ'=>'ڹ','ں'=>'ں','ڻ'=>'ڻ','ڼ'=>'ڼ','ڽ'=>'ڽ','ھ'=>'ھ','ڿ'=>'ڿ','ۀ'=>'ۀ','ہ'=>'ہ','ۂ'=>'ۂ','ۃ'=>'ۃ','ۄ'=>'ۄ','ۅ'=>'ۅ','ۆ'=>'ۆ','ۇ'=>'ۇ','ۈ'=>'ۈ','ۉ'=>'ۉ','ۊ'=>'ۊ','ۋ'=>'ۋ','ی'=>'ی','ۍ'=>'ۍ','ێ'=>'ێ','ۏ'=>'ۏ','ې'=>'ې','ۑ'=>'ۑ','ے'=>'ے','ۓ'=>'ۓ','ە'=>'ە','ۖ'=>'ۖ','ۗ'=>'ۗ','ۘ'=>'ۘ','ۙ'=>'ۙ','ۚ'=>'ۚ','ۛ'=>'ۛ','ۜ'=>'ۜ','۞'=>'۞','۟'=>'۟','۠'=>'۠','ۡ'=>'ۡ','ۢ'=>'ۢ','ۣ'=>'ۣ','ۤ'=>'ۤ','ۥ'=>'ۥ','ۦ'=>'ۦ','ۧ'=>'ۧ','ۨ'=>'ۨ','۪'=>'۪','۫'=>'۫','۬'=>'۬','ۭ'=>'ۭ','ۮ'=>'ۮ','ۯ'=>'ۯ','۰'=>'0','۱'=>'1','۲'=>'2','۳'=>'3','۴'=>'4','۵'=>'5','۶'=>'6','۷'=>'7','۸'=>'8','۹'=>'9','ۺ'=>'ۺ','ۻ'=>'ۻ','ۼ'=>'ۼ','ۿ'=>'ۿ','ܐ'=>'ܐ','ܑ'=>'ܑ','ܒ'=>'ܒ','ܓ'=>'ܓ','ܔ'=>'ܔ','ܕ'=>'ܕ','ܖ'=>'ܖ','ܗ'=>'ܗ','ܘ'=>'ܘ','ܙ'=>'ܙ','ܚ'=>'ܚ','ܛ'=>'ܛ','ܜ'=>'ܜ','ܝ'=>'ܝ','ܞ'=>'ܞ','ܟ'=>'ܟ','ܠ'=>'ܠ','ܡ'=>'ܡ','ܢ'=>'ܢ','ܣ'=>'ܣ','ܤ'=>'ܤ','ܥ'=>'ܥ','ܦ'=>'ܦ','ܧ'=>'ܧ','ܨ'=>'ܨ','ܩ'=>'ܩ','ܪ'=>'ܪ','ܫ'=>'ܫ','ܬ'=>'ܬ','ܭ'=>'ܭ','ܮ'=>'ܮ','ܯ'=>'ܯ','ܰ'=>'ܰ','ܱ'=>'ܱ','ܲ'=>'ܲ','ܳ'=>'ܳ','ܴ'=>'ܴ','ܵ'=>'ܵ','ܶ'=>'ܶ','ܷ'=>'ܷ','ܸ'=>'ܸ','ܹ'=>'ܹ','ܺ'=>'ܺ','ܻ'=>'ܻ','ܼ'=>'ܼ','ܽ'=>'ܽ','ܾ'=>'ܾ','ܿ'=>'ܿ','݀'=>'݀','݁'=>'݁','݂'=>'݂','݃'=>'݃','݄'=>'݄','݅'=>'݅','݆'=>'݆','݇'=>'݇','݈'=>'݈','݉'=>'݉','݊'=>'݊','ݍ'=>'ݍ','ݎ'=>'ݎ','ݏ'=>'ݏ','ݐ'=>'ݐ','ݑ'=>'ݑ','ݒ'=>'ݒ','ݓ'=>'ݓ','ݔ'=>'ݔ','ݕ'=>'ݕ','ݖ'=>'ݖ','ݗ'=>'ݗ','ݘ'=>'ݘ','ݙ'=>'ݙ','ݚ'=>'ݚ','ݛ'=>'ݛ','ݜ'=>'ݜ','ݝ'=>'ݝ','ݞ'=>'ݞ','ݟ'=>'ݟ','ݠ'=>'ݠ','ݡ'=>'ݡ','ݢ'=>'ݢ','ݣ'=>'ݣ','ݤ'=>'ݤ','ݥ'=>'ݥ','ݦ'=>'ݦ','ݧ'=>'ݧ','ݨ'=>'ݨ','ݩ'=>'ݩ','ݪ'=>'ݪ','ݫ'=>'ݫ','ݬ'=>'ݬ','ݭ'=>'ݭ','ހ'=>'ހ','ށ'=>'ށ','ނ'=>'ނ','ރ'=>'ރ','ބ'=>'ބ','ޅ'=>'ޅ','ކ'=>'ކ','އ'=>'އ','ވ'=>'ވ','މ'=>'މ','ފ'=>'ފ','ދ'=>'ދ','ތ'=>'ތ','ލ'=>'ލ','ގ'=>'ގ','ޏ'=>'ޏ','ސ'=>'ސ','ޑ'=>'ޑ','ޒ'=>'ޒ','ޓ'=>'ޓ','ޔ'=>'ޔ','ޕ'=>'ޕ','ޖ'=>'ޖ','ޗ'=>'ޗ','ޘ'=>'ޘ','ޙ'=>'ޙ','ޚ'=>'ޚ','ޛ'=>'ޛ','ޜ'=>'ޜ','ޝ'=>'ޝ','ޞ'=>'ޞ','ޟ'=>'ޟ','ޠ'=>'ޠ','ޡ'=>'ޡ','ޢ'=>'ޢ','ޣ'=>'ޣ','ޤ'=>'ޤ','ޥ'=>'ޥ','ަ'=>'ަ','ާ'=>'ާ','ި'=>'ި','ީ'=>'ީ','ު'=>'ު','ޫ'=>'ޫ','ެ'=>'ެ','ޭ'=>'ޭ','ޮ'=>'ޮ','ޯ'=>'ޯ','ް'=>'ް','ޱ'=>'ޱ','߀'=>'0','߁'=>'1','߂'=>'2','߃'=>'3','߄'=>'4','߅'=>'5','߆'=>'6','߇'=>'7','߈'=>'8','߉'=>'9','ߊ'=>'ߊ','ߋ'=>'ߋ','ߌ'=>'ߌ','ߍ'=>'ߍ','ߎ'=>'ߎ','ߏ'=>'ߏ','ߐ'=>'ߐ','ߑ'=>'ߑ','ߒ'=>'ߒ','ߓ'=>'ߓ','ߔ'=>'ߔ','ߕ'=>'ߕ','ߖ'=>'ߖ','ߗ'=>'ߗ','ߘ'=>'ߘ','ߙ'=>'ߙ','ߚ'=>'ߚ','ߛ'=>'ߛ','ߜ'=>'ߜ','ߝ'=>'ߝ','ߞ'=>'ߞ','ߟ'=>'ߟ','ߠ'=>'ߠ','ߡ'=>'ߡ','ߢ'=>'ߢ','ߣ'=>'ߣ','ߤ'=>'ߤ','ߥ'=>'ߥ','ߦ'=>'ߦ','ߧ'=>'ߧ','ߨ'=>'ߨ','ߩ'=>'ߩ','ߪ'=>'ߪ','߫'=>'߫','߬'=>'߬','߭'=>'߭','߮'=>'߮','߯'=>'߯','߰'=>'߰','߱'=>'߱','߲'=>'߲','߳'=>'߳','ߴ'=>'ߴ','ߵ'=>'ߵ','ߺ'=>'ߺ');
diff --git a/phpBB/includes/utf/data/search_indexer_1.php b/phpBB/includes/utf/data/search_indexer_1.php
index 6173117ffc..4dd142bb43 100644
--- a/phpBB/includes/utf/data/search_indexer_1.php
+++ b/phpBB/includes/utf/data/search_indexer_1.php
@@ -1 +1 @@
-<?php return array('ँ'=>'ँ','ं'=>'ं','ः'=>'ः','ऄ'=>'ऄ','अ'=>'अ','आ'=>'आ','इ'=>'इ','ई'=>'ई','उ'=>'उ','ऊ'=>'ऊ','ऋ'=>'ऋ','ऌ'=>'ऌ','ऍ'=>'ऍ','ऎ'=>'ऎ','ए'=>'ए','ऐ'=>'ऐ','ऑ'=>'ऑ','ऒ'=>'ऒ','ओ'=>'ओ','औ'=>'औ','क'=>'क','ख'=>'ख','ग'=>'ग','घ'=>'घ','ङ'=>'ङ','च'=>'च','छ'=>'छ','ज'=>'ज','झ'=>'झ','ञ'=>'ञ','ट'=>'ट','ठ'=>'ठ','ड'=>'ड','ढ'=>'ढ','ण'=>'ण','त'=>'त','थ'=>'थ','द'=>'द','ध'=>'ध','न'=>'न','ऩ'=>'ऩ','प'=>'प','फ'=>'फ','ब'=>'ब','भ'=>'भ','म'=>'म','य'=>'य','र'=>'र','ऱ'=>'ऱ','ल'=>'ल','ळ'=>'ळ','ऴ'=>'ऴ','व'=>'व','श'=>'श','ष'=>'ष','स'=>'स','ह'=>'ह','़'=>'़','ऽ'=>'ऽ','ा'=>'ा','ि'=>'ि','ी'=>'ी','ु'=>'ु','ू'=>'ू','ृ'=>'ृ','ॄ'=>'ॄ','ॅ'=>'ॅ','ॆ'=>'ॆ','े'=>'े','ै'=>'ै','ॉ'=>'ॉ','ॊ'=>'ॊ','ो'=>'ो','ौ'=>'ौ','्'=>'्','ॐ'=>'ॐ','॑'=>'॑','॒'=>'॒','॓'=>'॓','॔'=>'॔','क़'=>'क़','ख़'=>'ख़','ग़'=>'ग़','ज़'=>'ज़','ड़'=>'ड़','ढ़'=>'ढ़','फ़'=>'फ़','य़'=>'य़','ॠ'=>'ॠ','ॡ'=>'ॡ','ॢ'=>'ॢ','ॣ'=>'ॣ','०'=>'0','१'=>'1','२'=>'2','३'=>'3','४'=>'4','५'=>'5','६'=>'6','७'=>'7','८'=>'8','९'=>'9','ॻ'=>'ॻ','ॼ'=>'ॼ','ॽ'=>'ॽ','ॾ'=>'ॾ','ॿ'=>'ॿ','ঁ'=>'ঁ','ং'=>'ং','ঃ'=>'ঃ','অ'=>'অ','আ'=>'আ','ই'=>'ই','ঈ'=>'ঈ','উ'=>'উ','ঊ'=>'ঊ','ঋ'=>'ঋ','ঌ'=>'ঌ','এ'=>'এ','ঐ'=>'ঐ','ও'=>'ও','ঔ'=>'ঔ','ক'=>'ক','খ'=>'খ','গ'=>'গ','ঘ'=>'ঘ','ঙ'=>'ঙ','চ'=>'চ','ছ'=>'ছ','জ'=>'জ','ঝ'=>'ঝ','ঞ'=>'ঞ','ট'=>'ট','ঠ'=>'ঠ','ড'=>'ড','ঢ'=>'ঢ','ণ'=>'ণ','ত'=>'ত','থ'=>'থ','দ'=>'দ','ধ'=>'ধ','ন'=>'ন','প'=>'প','ফ'=>'ফ','ব'=>'ব','ভ'=>'ভ','ম'=>'ম','য'=>'য','র'=>'র','ল'=>'ল','শ'=>'শ','ষ'=>'ষ','স'=>'স','হ'=>'হ','়'=>'়','ঽ'=>'ঽ','া'=>'া','ি'=>'ি','ী'=>'ী','ু'=>'ু','ূ'=>'ূ','ৃ'=>'ৃ','ৄ'=>'ৄ','ে'=>'ে','ৈ'=>'ৈ','ো'=>'ো','ৌ'=>'ৌ','্'=>'্','ৎ'=>'ৎ','ৗ'=>'ৗ','ড়'=>'ড়','ঢ়'=>'ঢ়','য়'=>'য়','ৠ'=>'ৠ','ৡ'=>'ৡ','ৢ'=>'ৢ','ৣ'=>'ৣ','০'=>'0','১'=>'1','২'=>'2','৩'=>'3','৪'=>'4','৫'=>'5','৬'=>'6','৭'=>'7','৮'=>'8','৯'=>'9','ৰ'=>'ৰ','ৱ'=>'ৱ','৴'=>'1','৵'=>'2','৶'=>'3','৷'=>'4','৸'=>'৸','৹'=>'16','ਁ'=>'ਁ','ਂ'=>'ਂ','ਃ'=>'ਃ','ਅ'=>'ਅ','ਆ'=>'ਆ','ਇ'=>'ਇ','ਈ'=>'ਈ','ਉ'=>'ਉ','ਊ'=>'ਊ','ਏ'=>'ਏ','ਐ'=>'ਐ','ਓ'=>'ਓ','ਔ'=>'ਔ','ਕ'=>'ਕ','ਖ'=>'ਖ','ਗ'=>'ਗ','ਘ'=>'ਘ','ਙ'=>'ਙ','ਚ'=>'ਚ','ਛ'=>'ਛ','ਜ'=>'ਜ','ਝ'=>'ਝ','ਞ'=>'ਞ','ਟ'=>'ਟ','ਠ'=>'ਠ','ਡ'=>'ਡ','ਢ'=>'ਢ','ਣ'=>'ਣ','ਤ'=>'ਤ','ਥ'=>'ਥ','ਦ'=>'ਦ','ਧ'=>'ਧ','ਨ'=>'ਨ','ਪ'=>'ਪ','ਫ'=>'ਫ','ਬ'=>'ਬ','ਭ'=>'ਭ','ਮ'=>'ਮ','ਯ'=>'ਯ','ਰ'=>'ਰ','ਲ'=>'ਲ','ਲ਼'=>'ਲ਼','ਵ'=>'ਵ','ਸ਼'=>'ਸ਼','ਸ'=>'ਸ','ਹ'=>'ਹ','਼'=>'਼','ਾ'=>'ਾ','ਿ'=>'ਿ','ੀ'=>'ੀ','ੁ'=>'ੁ','ੂ'=>'ੂ','ੇ'=>'ੇ','ੈ'=>'ੈ','ੋ'=>'ੋ','ੌ'=>'ੌ','੍'=>'੍','ਖ਼'=>'ਖ਼','ਗ਼'=>'ਗ਼','ਜ਼'=>'ਜ਼','ੜ'=>'ੜ','ਫ਼'=>'ਫ਼','੦'=>'0','੧'=>'1','੨'=>'2','੩'=>'3','੪'=>'4','੫'=>'5','੬'=>'6','੭'=>'7','੮'=>'8','੯'=>'9','ੰ'=>'ੰ','ੱ'=>'ੱ','ੲ'=>'ੲ','ੳ'=>'ੳ','ੴ'=>'ੴ','ઁ'=>'ઁ','ં'=>'ં','ઃ'=>'ઃ','અ'=>'અ','આ'=>'આ','ઇ'=>'ઇ','ઈ'=>'ઈ','ઉ'=>'ઉ','ઊ'=>'ઊ','ઋ'=>'ઋ','ઌ'=>'ઌ','ઍ'=>'ઍ','એ'=>'એ','ઐ'=>'ઐ','ઑ'=>'ઑ','ઓ'=>'ઓ','ઔ'=>'ઔ','ક'=>'ક','ખ'=>'ખ','ગ'=>'ગ','ઘ'=>'ઘ','ઙ'=>'ઙ','ચ'=>'ચ','છ'=>'છ','જ'=>'જ','ઝ'=>'ઝ','ઞ'=>'ઞ','ટ'=>'ટ','ઠ'=>'ઠ','ડ'=>'ડ','ઢ'=>'ઢ','ણ'=>'ણ','ત'=>'ત','થ'=>'થ','દ'=>'દ','ધ'=>'ધ','ન'=>'ન','પ'=>'પ','ફ'=>'ફ','બ'=>'બ','ભ'=>'ભ','મ'=>'મ','ય'=>'ય','ર'=>'ર','લ'=>'લ','ળ'=>'ળ','વ'=>'વ','શ'=>'શ','ષ'=>'ષ','સ'=>'સ','હ'=>'હ','઼'=>'઼','ઽ'=>'ઽ','ા'=>'ા','િ'=>'િ','ી'=>'ી','ુ'=>'ુ','ૂ'=>'ૂ','ૃ'=>'ૃ','ૄ'=>'ૄ','ૅ'=>'ૅ','ે'=>'ે','ૈ'=>'ૈ','ૉ'=>'ૉ','ો'=>'ો','ૌ'=>'ૌ','્'=>'્','ૐ'=>'ૐ','ૠ'=>'ૠ','ૡ'=>'ૡ','ૢ'=>'ૢ','ૣ'=>'ૣ','૦'=>'0','૧'=>'1','૨'=>'2','૩'=>'3','૪'=>'4','૫'=>'5','૬'=>'6','૭'=>'7','૮'=>'8','૯'=>'9','ଁ'=>'ଁ','ଂ'=>'ଂ','ଃ'=>'ଃ','ଅ'=>'ଅ','ଆ'=>'ଆ','ଇ'=>'ଇ','ଈ'=>'ଈ','ଉ'=>'ଉ','ଊ'=>'ଊ','ଋ'=>'ଋ','ଌ'=>'ଌ','ଏ'=>'ଏ','ଐ'=>'ଐ','ଓ'=>'ଓ','ଔ'=>'ଔ','କ'=>'କ','ଖ'=>'ଖ','ଗ'=>'ଗ','ଘ'=>'ଘ','ଙ'=>'ଙ','ଚ'=>'ଚ','ଛ'=>'ଛ','ଜ'=>'ଜ','ଝ'=>'ଝ','ଞ'=>'ଞ','ଟ'=>'ଟ','ଠ'=>'ଠ','ଡ'=>'ଡ','ଢ'=>'ଢ','ଣ'=>'ଣ','ତ'=>'ତ','ଥ'=>'ଥ','ଦ'=>'ଦ','ଧ'=>'ଧ','ନ'=>'ନ','ପ'=>'ପ','ଫ'=>'ଫ','ବ'=>'ବ','ଭ'=>'ଭ','ମ'=>'ମ','ଯ'=>'ଯ','ର'=>'ର','ଲ'=>'ଲ','ଳ'=>'ଳ','ଵ'=>'ଵ','ଶ'=>'ଶ','ଷ'=>'ଷ','ସ'=>'ସ','ହ'=>'ହ','଼'=>'଼','ଽ'=>'ଽ','ା'=>'ା','ି'=>'ି','ୀ'=>'ୀ','ୁ'=>'ୁ','ୂ'=>'ୂ','ୃ'=>'ୃ','େ'=>'େ','ୈ'=>'ୈ','ୋ'=>'ୋ','ୌ'=>'ୌ','୍'=>'୍','ୖ'=>'ୖ','ୗ'=>'ୗ','ଡ଼'=>'ଡ଼','ଢ଼'=>'ଢ଼','ୟ'=>'ୟ','ୠ'=>'ୠ','ୡ'=>'ୡ','୦'=>'0','୧'=>'1','୨'=>'2','୩'=>'3','୪'=>'4','୫'=>'5','୬'=>'6','୭'=>'7','୮'=>'8','୯'=>'9','ୱ'=>'ୱ','ஂ'=>'ஂ','ஃ'=>'ஃ','அ'=>'அ','ஆ'=>'ஆ','இ'=>'இ','ஈ'=>'ஈ','உ'=>'உ','ஊ'=>'ஊ','எ'=>'எ','ஏ'=>'ஏ','ஐ'=>'ஐ','ஒ'=>'ஒ','ஓ'=>'ஓ','ஔ'=>'ஔ','க'=>'க','ங'=>'ங','ச'=>'ச','ஜ'=>'ஜ','ஞ'=>'ஞ','ட'=>'ட','ண'=>'ண','த'=>'த','ந'=>'ந','ன'=>'ன','ப'=>'ப','ம'=>'ம','ய'=>'ய','ர'=>'ர','ற'=>'ற','ல'=>'ல','ள'=>'ள','ழ'=>'ழ','வ'=>'வ','ஶ'=>'ஶ','ஷ'=>'ஷ','ஸ'=>'ஸ','ஹ'=>'ஹ','ா'=>'ா','ி'=>'ி','ீ'=>'ீ','ு'=>'ு','ூ'=>'ூ','ெ'=>'ெ','ே'=>'ே','ை'=>'ை','ொ'=>'ொ','ோ'=>'ோ','ௌ'=>'ௌ','்'=>'்','ௗ'=>'ௗ','௦'=>'0','௧'=>'1','௨'=>'2','௩'=>'3','௪'=>'4','௫'=>'5','௬'=>'6','௭'=>'7','௮'=>'8','௯'=>'9','௰'=>'10','௱'=>'100','௲'=>'1000','ఁ'=>'ఁ','ం'=>'ం','ః'=>'ః','అ'=>'అ','ఆ'=>'ఆ','ఇ'=>'ఇ','ఈ'=>'ఈ','ఉ'=>'ఉ','ఊ'=>'ఊ','ఋ'=>'ఋ','ఌ'=>'ఌ','ఎ'=>'ఎ','ఏ'=>'ఏ','ఐ'=>'ఐ','ఒ'=>'ఒ','ఓ'=>'ఓ','ఔ'=>'ఔ','క'=>'క','ఖ'=>'ఖ','గ'=>'గ','ఘ'=>'ఘ','ఙ'=>'ఙ','చ'=>'చ','ఛ'=>'ఛ','జ'=>'జ','ఝ'=>'ఝ','ఞ'=>'ఞ','ట'=>'ట','ఠ'=>'ఠ','డ'=>'డ','ఢ'=>'ఢ','ణ'=>'ణ','త'=>'త','థ'=>'థ','ద'=>'ద','ధ'=>'ధ','న'=>'న','ప'=>'ప','ఫ'=>'ఫ','బ'=>'బ','భ'=>'భ','మ'=>'మ','య'=>'య','ర'=>'ర','ఱ'=>'ఱ','ల'=>'ల','ళ'=>'ళ','వ'=>'వ','శ'=>'శ','ష'=>'ష','స'=>'స','హ'=>'హ','ా'=>'ా','ి'=>'ి','ీ'=>'ీ','ు'=>'ు','ూ'=>'ూ','ృ'=>'ృ','ౄ'=>'ౄ','ె'=>'ె','ే'=>'ే','ై'=>'ై','ొ'=>'ొ','ో'=>'ో','ౌ'=>'ౌ','్'=>'్','ౕ'=>'ౕ','ౖ'=>'ౖ','ౠ'=>'ౠ','ౡ'=>'ౡ','౦'=>'0','౧'=>'1','౨'=>'2','౩'=>'3','౪'=>'4','౫'=>'5','౬'=>'6','౭'=>'7','౮'=>'8','౯'=>'9','ಂ'=>'ಂ','ಃ'=>'ಃ','ಅ'=>'ಅ','ಆ'=>'ಆ','ಇ'=>'ಇ','ಈ'=>'ಈ','ಉ'=>'ಉ','ಊ'=>'ಊ','ಋ'=>'ಋ','ಌ'=>'ಌ','ಎ'=>'ಎ','ಏ'=>'ಏ','ಐ'=>'ಐ','ಒ'=>'ಒ','ಓ'=>'ಓ','ಔ'=>'ಔ','ಕ'=>'ಕ','ಖ'=>'ಖ','ಗ'=>'ಗ','ಘ'=>'ಘ','ಙ'=>'ಙ','ಚ'=>'ಚ','ಛ'=>'ಛ','ಜ'=>'ಜ','ಝ'=>'ಝ','ಞ'=>'ಞ','ಟ'=>'ಟ','ಠ'=>'ಠ','ಡ'=>'ಡ','ಢ'=>'ಢ','ಣ'=>'ಣ','ತ'=>'ತ','ಥ'=>'ಥ','ದ'=>'ದ','ಧ'=>'ಧ','ನ'=>'ನ','ಪ'=>'ಪ','ಫ'=>'ಫ','ಬ'=>'ಬ','ಭ'=>'ಭ','ಮ'=>'ಮ','ಯ'=>'ಯ','ರ'=>'ರ','ಱ'=>'ಱ','ಲ'=>'ಲ','ಳ'=>'ಳ','ವ'=>'ವ','ಶ'=>'ಶ','ಷ'=>'ಷ','ಸ'=>'ಸ','ಹ'=>'ಹ','಼'=>'಼','ಽ'=>'ಽ','ಾ'=>'ಾ','ಿ'=>'ಿ','ೀ'=>'ೀ','ು'=>'ು','ೂ'=>'ೂ','ೃ'=>'ೃ','ೄ'=>'ೄ','ೆ'=>'ೆ','ೇ'=>'ೇ','ೈ'=>'ೈ','ೊ'=>'ೊ','ೋ'=>'ೋ','ೌ'=>'ೌ','್'=>'್','ೕ'=>'ೕ','ೖ'=>'ೖ','ೞ'=>'ೞ','ೠ'=>'ೠ','ೡ'=>'ೡ','ೢ'=>'ೢ','ೣ'=>'ೣ','೦'=>'0','೧'=>'1','೨'=>'2','೩'=>'3','೪'=>'4','೫'=>'5','೬'=>'6','೭'=>'7','೮'=>'8','೯'=>'9','ം'=>'ം','ഃ'=>'ഃ','അ'=>'അ','ആ'=>'ആ','ഇ'=>'ഇ','ഈ'=>'ഈ','ഉ'=>'ഉ','ഊ'=>'ഊ','ഋ'=>'ഋ','ഌ'=>'ഌ','എ'=>'എ','ഏ'=>'ഏ','ഐ'=>'ഐ','ഒ'=>'ഒ','ഓ'=>'ഓ','ഔ'=>'ഔ','ക'=>'ക','ഖ'=>'ഖ','ഗ'=>'ഗ','ഘ'=>'ഘ','ങ'=>'ങ','ച'=>'ച','ഛ'=>'ഛ','ജ'=>'ജ','ഝ'=>'ഝ','ഞ'=>'ഞ','ട'=>'ട','ഠ'=>'ഠ','ഡ'=>'ഡ','ഢ'=>'ഢ','ണ'=>'ണ','ത'=>'ത','ഥ'=>'ഥ','ദ'=>'ദ','ധ'=>'ധ','ന'=>'ന','പ'=>'പ','ഫ'=>'ഫ','ബ'=>'ബ','ഭ'=>'ഭ','മ'=>'മ','യ'=>'യ','ര'=>'ര','റ'=>'റ','ല'=>'ല','ള'=>'ള','ഴ'=>'ഴ','വ'=>'വ','ശ'=>'ശ','ഷ'=>'ഷ','സ'=>'സ','ഹ'=>'ഹ','ാ'=>'ാ','ി'=>'ി','ീ'=>'ീ','ു'=>'ു','ൂ'=>'ൂ','ൃ'=>'ൃ','െ'=>'െ','േ'=>'േ','ൈ'=>'ൈ','ൊ'=>'ൊ','ോ'=>'ോ','ൌ'=>'ൌ','്'=>'്','ൗ'=>'ൗ','ൠ'=>'ൠ','ൡ'=>'ൡ','൦'=>'0','൧'=>'1','൨'=>'2','൩'=>'3','൪'=>'4','൫'=>'5','൬'=>'6','൭'=>'7','൮'=>'8','൯'=>'9','ං'=>'ං','ඃ'=>'ඃ','අ'=>'අ','ආ'=>'ආ','ඇ'=>'ඇ','ඈ'=>'ඈ','ඉ'=>'ඉ','ඊ'=>'ඊ','උ'=>'උ','ඌ'=>'ඌ','ඍ'=>'ඍ','ඎ'=>'ඎ','ඏ'=>'ඏ','ඐ'=>'ඐ','එ'=>'එ','ඒ'=>'ඒ','ඓ'=>'ඓ','ඔ'=>'ඔ','ඕ'=>'ඕ','ඖ'=>'ඖ','ක'=>'ක','ඛ'=>'ඛ','ග'=>'ග','ඝ'=>'ඝ','ඞ'=>'ඞ','ඟ'=>'ඟ','ච'=>'ච','ඡ'=>'ඡ','ජ'=>'ජ','ඣ'=>'ඣ','ඤ'=>'ඤ','ඥ'=>'ඥ','ඦ'=>'ඦ','ට'=>'ට','ඨ'=>'ඨ','ඩ'=>'ඩ','ඪ'=>'ඪ','ණ'=>'ණ','ඬ'=>'ඬ','ත'=>'ත','ථ'=>'ථ','ද'=>'ද','ධ'=>'ධ','න'=>'න','ඳ'=>'ඳ','ප'=>'ප','ඵ'=>'ඵ','බ'=>'බ','භ'=>'භ','ම'=>'ම','ඹ'=>'ඹ','ය'=>'ය','ර'=>'ර','ල'=>'ල','ව'=>'ව','ශ'=>'ශ','ෂ'=>'ෂ','ස'=>'ස','හ'=>'හ','ළ'=>'ළ','ෆ'=>'ෆ','්'=>'්','ා'=>'ා','ැ'=>'ැ','ෑ'=>'ෑ','ි'=>'ි','ී'=>'ී','ු'=>'ු','ූ'=>'ූ','ෘ'=>'ෘ','ෙ'=>'ෙ','ේ'=>'ේ','ෛ'=>'ෛ','ො'=>'ො','ෝ'=>'ෝ','ෞ'=>'ෞ','ෟ'=>'ෟ','ෲ'=>'ෲ','ෳ'=>'ෳ','ก'=>'ก','ข'=>'ข','ฃ'=>'ฃ','ค'=>'ค','ฅ'=>'ฅ','ฆ'=>'ฆ','ง'=>'ง','จ'=>'จ','ฉ'=>'ฉ','ช'=>'ช','ซ'=>'ซ','ฌ'=>'ฌ','ญ'=>'ญ','ฎ'=>'ฎ','ฏ'=>'ฏ','ฐ'=>'ฐ','ฑ'=>'ฑ','ฒ'=>'ฒ','ณ'=>'ณ','ด'=>'ด','ต'=>'ต','ถ'=>'ถ','ท'=>'ท','ธ'=>'ธ','น'=>'น','บ'=>'บ','ป'=>'ป','ผ'=>'ผ','ฝ'=>'ฝ','พ'=>'พ','ฟ'=>'ฟ','ภ'=>'ภ','ม'=>'ม','ย'=>'ย','ร'=>'ร','ฤ'=>'ฤ','ล'=>'ล','ฦ'=>'ฦ','ว'=>'ว','ศ'=>'ศ','ษ'=>'ษ','ส'=>'ส','ห'=>'ห','ฬ'=>'ฬ','อ'=>'อ','ฮ'=>'ฮ','ฯ'=>'ฯ','ะ'=>'ะ','ั'=>'ั','า'=>'า','ำ'=>'ำ','ิ'=>'ิ','ี'=>'ี','ึ'=>'ึ','ื'=>'ื','ุ'=>'ุ','ู'=>'ู','ฺ'=>'ฺ','เ'=>'เ','แ'=>'แ','โ'=>'โ','ใ'=>'ใ','ไ'=>'ไ','ๅ'=>'ๅ','ๆ'=>'ๆ','็'=>'็','่'=>'่','้'=>'้','๊'=>'๊','๋'=>'๋','์'=>'์','ํ'=>'ํ','๎'=>'๎','๐'=>'0','๑'=>'1','๒'=>'2','๓'=>'3','๔'=>'4','๕'=>'5','๖'=>'6','๗'=>'7','๘'=>'8','๙'=>'9','ກ'=>'ກ','ຂ'=>'ຂ','ຄ'=>'ຄ','ງ'=>'ງ','ຈ'=>'ຈ','ຊ'=>'ຊ','ຍ'=>'ຍ','ດ'=>'ດ','ຕ'=>'ຕ','ຖ'=>'ຖ','ທ'=>'ທ','ນ'=>'ນ','ບ'=>'ບ','ປ'=>'ປ','ຜ'=>'ຜ','ຝ'=>'ຝ','ພ'=>'ພ','ຟ'=>'ຟ','ມ'=>'ມ','ຢ'=>'ຢ','ຣ'=>'ຣ','ລ'=>'ລ','ວ'=>'ວ','ສ'=>'ສ','ຫ'=>'ຫ','ອ'=>'ອ','ຮ'=>'ຮ','ຯ'=>'ຯ','ະ'=>'ະ','ັ'=>'ັ','າ'=>'າ','ຳ'=>'ຳ','ິ'=>'ິ','ີ'=>'ີ','ຶ'=>'ຶ','ື'=>'ື','ຸ'=>'ຸ','ູ'=>'ູ','ົ'=>'ົ','ຼ'=>'ຼ','ຽ'=>'ຽ','ເ'=>'ເ','ແ'=>'ແ','ໂ'=>'ໂ','ໃ'=>'ໃ','ໄ'=>'ໄ','ໆ'=>'ໆ','່'=>'່','້'=>'້','໊'=>'໊','໋'=>'໋','໌'=>'໌','ໍ'=>'ໍ','໐'=>'0','໑'=>'1','໒'=>'2','໓'=>'3','໔'=>'4','໕'=>'5','໖'=>'6','໗'=>'7','໘'=>'8','໙'=>'9','ໜ'=>'ໜ','ໝ'=>'ໝ','ༀ'=>'ༀ','༘'=>'༘','༙'=>'༙','༠'=>'0','༡'=>'1','༢'=>'2','༣'=>'3','༤'=>'4','༥'=>'5','༦'=>'6','༧'=>'7','༨'=>'8','༩'=>'9','༪'=>'1/2','༫'=>'3/2','༬'=>'5/2','༭'=>'7/2','༮'=>'9/2','༯'=>'11/2','༰'=>'13/2','༱'=>'15/2','༲'=>'17/2','༳'=>'-1/2','༵'=>'༵','༷'=>'༷','༹'=>'༹','༾'=>'༾','༿'=>'༿','ཀ'=>'ཀ','ཁ'=>'ཁ','ག'=>'ག','གྷ'=>'གྷ','ང'=>'ང','ཅ'=>'ཅ','ཆ'=>'ཆ','ཇ'=>'ཇ','ཉ'=>'ཉ','ཊ'=>'ཊ','ཋ'=>'ཋ','ཌ'=>'ཌ','ཌྷ'=>'ཌྷ','ཎ'=>'ཎ','ཏ'=>'ཏ','ཐ'=>'ཐ','ད'=>'ད','དྷ'=>'དྷ','ན'=>'ན','པ'=>'པ','ཕ'=>'ཕ','བ'=>'བ','བྷ'=>'བྷ','མ'=>'མ','ཙ'=>'ཙ','ཚ'=>'ཚ','ཛ'=>'ཛ','ཛྷ'=>'ཛྷ','ཝ'=>'ཝ','ཞ'=>'ཞ','ཟ'=>'ཟ','འ'=>'འ','ཡ'=>'ཡ','ར'=>'ར','ལ'=>'ལ','ཤ'=>'ཤ','ཥ'=>'ཥ','ས'=>'ས','ཧ'=>'ཧ','ཨ'=>'ཨ','ཀྵ'=>'ཀྵ','ཪ'=>'ཪ','ཱ'=>'ཱ','ི'=>'ི','ཱི'=>'ཱི','ུ'=>'ུ','ཱུ'=>'ཱུ','ྲྀ'=>'ྲྀ','ཷ'=>'ཷ','ླྀ'=>'ླྀ','ཹ'=>'ཹ','ེ'=>'ེ','ཻ'=>'ཻ','ོ'=>'ོ','ཽ'=>'ཽ','ཾ'=>'ཾ','ཿ'=>'ཿ','ྀ'=>'ྀ','ཱྀ'=>'ཱྀ','ྂ'=>'ྂ','ྃ'=>'ྃ','྄'=>'྄','྆'=>'྆','྇'=>'྇','ྈ'=>'ྈ','ྉ'=>'ྉ','ྊ'=>'ྊ','ྋ'=>'ྋ','ྐ'=>'ྐ','ྑ'=>'ྑ','ྒ'=>'ྒ','ྒྷ'=>'ྒྷ','ྔ'=>'ྔ','ྕ'=>'ྕ','ྖ'=>'ྖ','ྗ'=>'ྗ','ྙ'=>'ྙ','ྚ'=>'ྚ','ྛ'=>'ྛ','ྜ'=>'ྜ','ྜྷ'=>'ྜྷ','ྞ'=>'ྞ','ྟ'=>'ྟ','ྠ'=>'ྠ','ྡ'=>'ྡ','ྡྷ'=>'ྡྷ','ྣ'=>'ྣ','ྤ'=>'ྤ','ྥ'=>'ྥ','ྦ'=>'ྦ','ྦྷ'=>'ྦྷ','ྨ'=>'ྨ','ྩ'=>'ྩ','ྪ'=>'ྪ','ྫ'=>'ྫ','ྫྷ'=>'ྫྷ','ྭ'=>'ྭ','ྮ'=>'ྮ','ྯ'=>'ྯ','ྰ'=>'ྰ','ྱ'=>'ྱ','ྲ'=>'ྲ','ླ'=>'ླ','ྴ'=>'ྴ','ྵ'=>'ྵ','ྶ'=>'ྶ','ྷ'=>'ྷ','ྸ'=>'ྸ','ྐྵ'=>'ྐྵ','ྺ'=>'ྺ','ྻ'=>'ྻ','ྼ'=>'ྼ','࿆'=>'࿆'); \ No newline at end of file
+<?php return array('ँ'=>'ँ','ं'=>'ं','ः'=>'ः','ऄ'=>'ऄ','अ'=>'अ','आ'=>'आ','इ'=>'इ','ई'=>'ई','उ'=>'उ','ऊ'=>'ऊ','ऋ'=>'ऋ','ऌ'=>'ऌ','ऍ'=>'ऍ','ऎ'=>'ऎ','ए'=>'ए','ऐ'=>'ऐ','ऑ'=>'ऑ','ऒ'=>'ऒ','ओ'=>'ओ','औ'=>'औ','क'=>'क','ख'=>'ख','ग'=>'ग','घ'=>'घ','ङ'=>'ङ','च'=>'च','छ'=>'छ','ज'=>'ज','झ'=>'झ','ञ'=>'ञ','ट'=>'ट','ठ'=>'ठ','ड'=>'ड','ढ'=>'ढ','ण'=>'ण','त'=>'त','थ'=>'थ','द'=>'द','ध'=>'ध','न'=>'न','ऩ'=>'ऩ','प'=>'प','फ'=>'फ','ब'=>'ब','भ'=>'भ','म'=>'म','य'=>'य','र'=>'र','ऱ'=>'ऱ','ल'=>'ल','ळ'=>'ळ','ऴ'=>'ऴ','व'=>'व','श'=>'श','ष'=>'ष','स'=>'स','ह'=>'ह','़'=>'़','ऽ'=>'ऽ','ा'=>'ा','ि'=>'ि','ी'=>'ी','ु'=>'ु','ू'=>'ू','ृ'=>'ृ','ॄ'=>'ॄ','ॅ'=>'ॅ','ॆ'=>'ॆ','े'=>'े','ै'=>'ै','ॉ'=>'ॉ','ॊ'=>'ॊ','ो'=>'ो','ौ'=>'ौ','्'=>'्','ॐ'=>'ॐ','॑'=>'॑','॒'=>'॒','॓'=>'॓','॔'=>'॔','क़'=>'क़','ख़'=>'ख़','ग़'=>'ग़','ज़'=>'ज़','ड़'=>'ड़','ढ़'=>'ढ़','फ़'=>'फ़','य़'=>'य़','ॠ'=>'ॠ','ॡ'=>'ॡ','ॢ'=>'ॢ','ॣ'=>'ॣ','०'=>'0','१'=>'1','२'=>'2','३'=>'3','४'=>'4','५'=>'5','६'=>'6','७'=>'7','८'=>'8','९'=>'9','ॻ'=>'ॻ','ॼ'=>'ॼ','ॽ'=>'ॽ','ॾ'=>'ॾ','ॿ'=>'ॿ','ঁ'=>'ঁ','ং'=>'ং','ঃ'=>'ঃ','অ'=>'অ','আ'=>'আ','ই'=>'ই','ঈ'=>'ঈ','উ'=>'উ','ঊ'=>'ঊ','ঋ'=>'ঋ','ঌ'=>'ঌ','এ'=>'এ','ঐ'=>'ঐ','ও'=>'ও','ঔ'=>'ঔ','ক'=>'ক','খ'=>'খ','গ'=>'গ','ঘ'=>'ঘ','ঙ'=>'ঙ','চ'=>'চ','ছ'=>'ছ','জ'=>'জ','ঝ'=>'ঝ','ঞ'=>'ঞ','ট'=>'ট','ঠ'=>'ঠ','ড'=>'ড','ঢ'=>'ঢ','ণ'=>'ণ','ত'=>'ত','থ'=>'থ','দ'=>'দ','ধ'=>'ধ','ন'=>'ন','প'=>'প','ফ'=>'ফ','ব'=>'ব','ভ'=>'ভ','ম'=>'ম','য'=>'য','র'=>'র','ল'=>'ল','শ'=>'শ','ষ'=>'ষ','স'=>'স','হ'=>'হ','়'=>'়','ঽ'=>'ঽ','া'=>'া','ি'=>'ি','ী'=>'ী','ু'=>'ু','ূ'=>'ূ','ৃ'=>'ৃ','ৄ'=>'ৄ','ে'=>'ে','ৈ'=>'ৈ','ো'=>'ো','ৌ'=>'ৌ','্'=>'্','ৎ'=>'ৎ','ৗ'=>'ৗ','ড়'=>'ড়','ঢ়'=>'ঢ়','য়'=>'য়','ৠ'=>'ৠ','ৡ'=>'ৡ','ৢ'=>'ৢ','ৣ'=>'ৣ','০'=>'0','১'=>'1','২'=>'2','৩'=>'3','৪'=>'4','৫'=>'5','৬'=>'6','৭'=>'7','৮'=>'8','৯'=>'9','ৰ'=>'ৰ','ৱ'=>'ৱ','৴'=>'1','৵'=>'2','৶'=>'3','৷'=>'4','৸'=>'৸','৹'=>'16','ਁ'=>'ਁ','ਂ'=>'ਂ','ਃ'=>'ਃ','ਅ'=>'ਅ','ਆ'=>'ਆ','ਇ'=>'ਇ','ਈ'=>'ਈ','ਉ'=>'ਉ','ਊ'=>'ਊ','ਏ'=>'ਏ','ਐ'=>'ਐ','ਓ'=>'ਓ','ਔ'=>'ਔ','ਕ'=>'ਕ','ਖ'=>'ਖ','ਗ'=>'ਗ','ਘ'=>'ਘ','ਙ'=>'ਙ','ਚ'=>'ਚ','ਛ'=>'ਛ','ਜ'=>'ਜ','ਝ'=>'ਝ','ਞ'=>'ਞ','ਟ'=>'ਟ','ਠ'=>'ਠ','ਡ'=>'ਡ','ਢ'=>'ਢ','ਣ'=>'ਣ','ਤ'=>'ਤ','ਥ'=>'ਥ','ਦ'=>'ਦ','ਧ'=>'ਧ','ਨ'=>'ਨ','ਪ'=>'ਪ','ਫ'=>'ਫ','ਬ'=>'ਬ','ਭ'=>'ਭ','ਮ'=>'ਮ','ਯ'=>'ਯ','ਰ'=>'ਰ','ਲ'=>'ਲ','ਲ਼'=>'ਲ਼','ਵ'=>'ਵ','ਸ਼'=>'ਸ਼','ਸ'=>'ਸ','ਹ'=>'ਹ','਼'=>'਼','ਾ'=>'ਾ','ਿ'=>'ਿ','ੀ'=>'ੀ','ੁ'=>'ੁ','ੂ'=>'ੂ','ੇ'=>'ੇ','ੈ'=>'ੈ','ੋ'=>'ੋ','ੌ'=>'ੌ','੍'=>'੍','ਖ਼'=>'ਖ਼','ਗ਼'=>'ਗ਼','ਜ਼'=>'ਜ਼','ੜ'=>'ੜ','ਫ਼'=>'ਫ਼','੦'=>'0','੧'=>'1','੨'=>'2','੩'=>'3','੪'=>'4','੫'=>'5','੬'=>'6','੭'=>'7','੮'=>'8','੯'=>'9','ੰ'=>'ੰ','ੱ'=>'ੱ','ੲ'=>'ੲ','ੳ'=>'ੳ','ੴ'=>'ੴ','ઁ'=>'ઁ','ં'=>'ં','ઃ'=>'ઃ','અ'=>'અ','આ'=>'આ','ઇ'=>'ઇ','ઈ'=>'ઈ','ઉ'=>'ઉ','ઊ'=>'ઊ','ઋ'=>'ઋ','ઌ'=>'ઌ','ઍ'=>'ઍ','એ'=>'એ','ઐ'=>'ઐ','ઑ'=>'ઑ','ઓ'=>'ઓ','ઔ'=>'ઔ','ક'=>'ક','ખ'=>'ખ','ગ'=>'ગ','ઘ'=>'ઘ','ઙ'=>'ઙ','ચ'=>'ચ','છ'=>'છ','જ'=>'જ','ઝ'=>'ઝ','ઞ'=>'ઞ','ટ'=>'ટ','ઠ'=>'ઠ','ડ'=>'ડ','ઢ'=>'ઢ','ણ'=>'ણ','ત'=>'ત','થ'=>'થ','દ'=>'દ','ધ'=>'ધ','ન'=>'ન','પ'=>'પ','ફ'=>'ફ','બ'=>'બ','ભ'=>'ભ','મ'=>'મ','ય'=>'ય','ર'=>'ર','લ'=>'લ','ળ'=>'ળ','વ'=>'વ','શ'=>'શ','ષ'=>'ષ','સ'=>'સ','હ'=>'હ','઼'=>'઼','ઽ'=>'ઽ','ા'=>'ા','િ'=>'િ','ી'=>'ી','ુ'=>'ુ','ૂ'=>'ૂ','ૃ'=>'ૃ','ૄ'=>'ૄ','ૅ'=>'ૅ','ે'=>'ે','ૈ'=>'ૈ','ૉ'=>'ૉ','ો'=>'ો','ૌ'=>'ૌ','્'=>'્','ૐ'=>'ૐ','ૠ'=>'ૠ','ૡ'=>'ૡ','ૢ'=>'ૢ','ૣ'=>'ૣ','૦'=>'0','૧'=>'1','૨'=>'2','૩'=>'3','૪'=>'4','૫'=>'5','૬'=>'6','૭'=>'7','૮'=>'8','૯'=>'9','ଁ'=>'ଁ','ଂ'=>'ଂ','ଃ'=>'ଃ','ଅ'=>'ଅ','ଆ'=>'ଆ','ଇ'=>'ଇ','ଈ'=>'ଈ','ଉ'=>'ଉ','ଊ'=>'ଊ','ଋ'=>'ଋ','ଌ'=>'ଌ','ଏ'=>'ଏ','ଐ'=>'ଐ','ଓ'=>'ଓ','ଔ'=>'ଔ','କ'=>'କ','ଖ'=>'ଖ','ଗ'=>'ଗ','ଘ'=>'ଘ','ଙ'=>'ଙ','ଚ'=>'ଚ','ଛ'=>'ଛ','ଜ'=>'ଜ','ଝ'=>'ଝ','ଞ'=>'ଞ','ଟ'=>'ଟ','ଠ'=>'ଠ','ଡ'=>'ଡ','ଢ'=>'ଢ','ଣ'=>'ଣ','ତ'=>'ତ','ଥ'=>'ଥ','ଦ'=>'ଦ','ଧ'=>'ଧ','ନ'=>'ନ','ପ'=>'ପ','ଫ'=>'ଫ','ବ'=>'ବ','ଭ'=>'ଭ','ମ'=>'ମ','ଯ'=>'ଯ','ର'=>'ର','ଲ'=>'ଲ','ଳ'=>'ଳ','ଵ'=>'ଵ','ଶ'=>'ଶ','ଷ'=>'ଷ','ସ'=>'ସ','ହ'=>'ହ','଼'=>'଼','ଽ'=>'ଽ','ା'=>'ା','ି'=>'ି','ୀ'=>'ୀ','ୁ'=>'ୁ','ୂ'=>'ୂ','ୃ'=>'ୃ','େ'=>'େ','ୈ'=>'ୈ','ୋ'=>'ୋ','ୌ'=>'ୌ','୍'=>'୍','ୖ'=>'ୖ','ୗ'=>'ୗ','ଡ଼'=>'ଡ଼','ଢ଼'=>'ଢ଼','ୟ'=>'ୟ','ୠ'=>'ୠ','ୡ'=>'ୡ','୦'=>'0','୧'=>'1','୨'=>'2','୩'=>'3','୪'=>'4','୫'=>'5','୬'=>'6','୭'=>'7','୮'=>'8','୯'=>'9','ୱ'=>'ୱ','ஂ'=>'ஂ','ஃ'=>'ஃ','அ'=>'அ','ஆ'=>'ஆ','இ'=>'இ','ஈ'=>'ஈ','உ'=>'உ','ஊ'=>'ஊ','எ'=>'எ','ஏ'=>'ஏ','ஐ'=>'ஐ','ஒ'=>'ஒ','ஓ'=>'ஓ','ஔ'=>'ஔ','க'=>'க','ங'=>'ங','ச'=>'ச','ஜ'=>'ஜ','ஞ'=>'ஞ','ட'=>'ட','ண'=>'ண','த'=>'த','ந'=>'ந','ன'=>'ன','ப'=>'ப','ம'=>'ம','ய'=>'ய','ர'=>'ர','ற'=>'ற','ல'=>'ல','ள'=>'ள','ழ'=>'ழ','வ'=>'வ','ஶ'=>'ஶ','ஷ'=>'ஷ','ஸ'=>'ஸ','ஹ'=>'ஹ','ா'=>'ா','ி'=>'ி','ீ'=>'ீ','ு'=>'ு','ூ'=>'ூ','ெ'=>'ெ','ே'=>'ே','ை'=>'ை','ொ'=>'ொ','ோ'=>'ோ','ௌ'=>'ௌ','்'=>'்','ௗ'=>'ௗ','௦'=>'0','௧'=>'1','௨'=>'2','௩'=>'3','௪'=>'4','௫'=>'5','௬'=>'6','௭'=>'7','௮'=>'8','௯'=>'9','௰'=>'10','௱'=>'100','௲'=>'1000','ఁ'=>'ఁ','ం'=>'ం','ః'=>'ః','అ'=>'అ','ఆ'=>'ఆ','ఇ'=>'ఇ','ఈ'=>'ఈ','ఉ'=>'ఉ','ఊ'=>'ఊ','ఋ'=>'ఋ','ఌ'=>'ఌ','ఎ'=>'ఎ','ఏ'=>'ఏ','ఐ'=>'ఐ','ఒ'=>'ఒ','ఓ'=>'ఓ','ఔ'=>'ఔ','క'=>'క','ఖ'=>'ఖ','గ'=>'గ','ఘ'=>'ఘ','ఙ'=>'ఙ','చ'=>'చ','ఛ'=>'ఛ','జ'=>'జ','ఝ'=>'ఝ','ఞ'=>'ఞ','ట'=>'ట','ఠ'=>'ఠ','డ'=>'డ','ఢ'=>'ఢ','ణ'=>'ణ','త'=>'త','థ'=>'థ','ద'=>'ద','ధ'=>'ధ','న'=>'న','ప'=>'ప','ఫ'=>'ఫ','బ'=>'బ','భ'=>'భ','మ'=>'మ','య'=>'య','ర'=>'ర','ఱ'=>'ఱ','ల'=>'ల','ళ'=>'ళ','వ'=>'వ','శ'=>'శ','ష'=>'ష','స'=>'స','హ'=>'హ','ా'=>'ా','ి'=>'ి','ీ'=>'ీ','ు'=>'ు','ూ'=>'ూ','ృ'=>'ృ','ౄ'=>'ౄ','ె'=>'ె','ే'=>'ే','ై'=>'ై','ొ'=>'ొ','ో'=>'ో','ౌ'=>'ౌ','్'=>'్','ౕ'=>'ౕ','ౖ'=>'ౖ','ౠ'=>'ౠ','ౡ'=>'ౡ','౦'=>'0','౧'=>'1','౨'=>'2','౩'=>'3','౪'=>'4','౫'=>'5','౬'=>'6','౭'=>'7','౮'=>'8','౯'=>'9','ಂ'=>'ಂ','ಃ'=>'ಃ','ಅ'=>'ಅ','ಆ'=>'ಆ','ಇ'=>'ಇ','ಈ'=>'ಈ','ಉ'=>'ಉ','ಊ'=>'ಊ','ಋ'=>'ಋ','ಌ'=>'ಌ','ಎ'=>'ಎ','ಏ'=>'ಏ','ಐ'=>'ಐ','ಒ'=>'ಒ','ಓ'=>'ಓ','ಔ'=>'ಔ','ಕ'=>'ಕ','ಖ'=>'ಖ','ಗ'=>'ಗ','ಘ'=>'ಘ','ಙ'=>'ಙ','ಚ'=>'ಚ','ಛ'=>'ಛ','ಜ'=>'ಜ','ಝ'=>'ಝ','ಞ'=>'ಞ','ಟ'=>'ಟ','ಠ'=>'ಠ','ಡ'=>'ಡ','ಢ'=>'ಢ','ಣ'=>'ಣ','ತ'=>'ತ','ಥ'=>'ಥ','ದ'=>'ದ','ಧ'=>'ಧ','ನ'=>'ನ','ಪ'=>'ಪ','ಫ'=>'ಫ','ಬ'=>'ಬ','ಭ'=>'ಭ','ಮ'=>'ಮ','ಯ'=>'ಯ','ರ'=>'ರ','ಱ'=>'ಱ','ಲ'=>'ಲ','ಳ'=>'ಳ','ವ'=>'ವ','ಶ'=>'ಶ','ಷ'=>'ಷ','ಸ'=>'ಸ','ಹ'=>'ಹ','಼'=>'಼','ಽ'=>'ಽ','ಾ'=>'ಾ','ಿ'=>'ಿ','ೀ'=>'ೀ','ು'=>'ು','ೂ'=>'ೂ','ೃ'=>'ೃ','ೄ'=>'ೄ','ೆ'=>'ೆ','ೇ'=>'ೇ','ೈ'=>'ೈ','ೊ'=>'ೊ','ೋ'=>'ೋ','ೌ'=>'ೌ','್'=>'್','ೕ'=>'ೕ','ೖ'=>'ೖ','ೞ'=>'ೞ','ೠ'=>'ೠ','ೡ'=>'ೡ','ೢ'=>'ೢ','ೣ'=>'ೣ','೦'=>'0','೧'=>'1','೨'=>'2','೩'=>'3','೪'=>'4','೫'=>'5','೬'=>'6','೭'=>'7','೮'=>'8','೯'=>'9','ം'=>'ം','ഃ'=>'ഃ','അ'=>'അ','ആ'=>'ആ','ഇ'=>'ഇ','ഈ'=>'ഈ','ഉ'=>'ഉ','ഊ'=>'ഊ','ഋ'=>'ഋ','ഌ'=>'ഌ','എ'=>'എ','ഏ'=>'ഏ','ഐ'=>'ഐ','ഒ'=>'ഒ','ഓ'=>'ഓ','ഔ'=>'ഔ','ക'=>'ക','ഖ'=>'ഖ','ഗ'=>'ഗ','ഘ'=>'ഘ','ങ'=>'ങ','ച'=>'ച','ഛ'=>'ഛ','ജ'=>'ജ','ഝ'=>'ഝ','ഞ'=>'ഞ','ട'=>'ട','ഠ'=>'ഠ','ഡ'=>'ഡ','ഢ'=>'ഢ','ണ'=>'ണ','ത'=>'ത','ഥ'=>'ഥ','ദ'=>'ദ','ധ'=>'ധ','ന'=>'ന','പ'=>'പ','ഫ'=>'ഫ','ബ'=>'ബ','ഭ'=>'ഭ','മ'=>'മ','യ'=>'യ','ര'=>'ര','റ'=>'റ','ല'=>'ല','ള'=>'ള','ഴ'=>'ഴ','വ'=>'വ','ശ'=>'ശ','ഷ'=>'ഷ','സ'=>'സ','ഹ'=>'ഹ','ാ'=>'ാ','ി'=>'ി','ീ'=>'ീ','ു'=>'ു','ൂ'=>'ൂ','ൃ'=>'ൃ','െ'=>'െ','േ'=>'േ','ൈ'=>'ൈ','ൊ'=>'ൊ','ോ'=>'ോ','ൌ'=>'ൌ','്'=>'്','ൗ'=>'ൗ','ൠ'=>'ൠ','ൡ'=>'ൡ','൦'=>'0','൧'=>'1','൨'=>'2','൩'=>'3','൪'=>'4','൫'=>'5','൬'=>'6','൭'=>'7','൮'=>'8','൯'=>'9','ං'=>'ං','ඃ'=>'ඃ','අ'=>'අ','ආ'=>'ආ','ඇ'=>'ඇ','ඈ'=>'ඈ','ඉ'=>'ඉ','ඊ'=>'ඊ','උ'=>'උ','ඌ'=>'ඌ','ඍ'=>'ඍ','ඎ'=>'ඎ','ඏ'=>'ඏ','ඐ'=>'ඐ','එ'=>'එ','ඒ'=>'ඒ','ඓ'=>'ඓ','ඔ'=>'ඔ','ඕ'=>'ඕ','ඖ'=>'ඖ','ක'=>'ක','ඛ'=>'ඛ','ග'=>'ග','ඝ'=>'ඝ','ඞ'=>'ඞ','ඟ'=>'ඟ','ච'=>'ච','ඡ'=>'ඡ','ජ'=>'ජ','ඣ'=>'ඣ','ඤ'=>'ඤ','ඥ'=>'ඥ','ඦ'=>'ඦ','ට'=>'ට','ඨ'=>'ඨ','ඩ'=>'ඩ','ඪ'=>'ඪ','ණ'=>'ණ','ඬ'=>'ඬ','ත'=>'ත','ථ'=>'ථ','ද'=>'ද','ධ'=>'ධ','න'=>'න','ඳ'=>'ඳ','ප'=>'ප','ඵ'=>'ඵ','බ'=>'බ','භ'=>'භ','ම'=>'ම','ඹ'=>'ඹ','ය'=>'ය','ර'=>'ර','ල'=>'ල','ව'=>'ව','ශ'=>'ශ','ෂ'=>'ෂ','ස'=>'ස','හ'=>'හ','ළ'=>'ළ','ෆ'=>'ෆ','්'=>'්','ා'=>'ා','ැ'=>'ැ','ෑ'=>'ෑ','ි'=>'ි','ී'=>'ී','ු'=>'ු','ූ'=>'ූ','ෘ'=>'ෘ','ෙ'=>'ෙ','ේ'=>'ේ','ෛ'=>'ෛ','ො'=>'ො','ෝ'=>'ෝ','ෞ'=>'ෞ','ෟ'=>'ෟ','ෲ'=>'ෲ','ෳ'=>'ෳ','ก'=>'ก','ข'=>'ข','ฃ'=>'ฃ','ค'=>'ค','ฅ'=>'ฅ','ฆ'=>'ฆ','ง'=>'ง','จ'=>'จ','ฉ'=>'ฉ','ช'=>'ช','ซ'=>'ซ','ฌ'=>'ฌ','ญ'=>'ญ','ฎ'=>'ฎ','ฏ'=>'ฏ','ฐ'=>'ฐ','ฑ'=>'ฑ','ฒ'=>'ฒ','ณ'=>'ณ','ด'=>'ด','ต'=>'ต','ถ'=>'ถ','ท'=>'ท','ธ'=>'ธ','น'=>'น','บ'=>'บ','ป'=>'ป','ผ'=>'ผ','ฝ'=>'ฝ','พ'=>'พ','ฟ'=>'ฟ','ภ'=>'ภ','ม'=>'ม','ย'=>'ย','ร'=>'ร','ฤ'=>'ฤ','ล'=>'ล','ฦ'=>'ฦ','ว'=>'ว','ศ'=>'ศ','ษ'=>'ษ','ส'=>'ส','ห'=>'ห','ฬ'=>'ฬ','อ'=>'อ','ฮ'=>'ฮ','ฯ'=>'ฯ','ะ'=>'ะ','ั'=>'ั','า'=>'า','ำ'=>'ำ','ิ'=>'ิ','ี'=>'ี','ึ'=>'ึ','ื'=>'ื','ุ'=>'ุ','ู'=>'ู','ฺ'=>'ฺ','เ'=>'เ','แ'=>'แ','โ'=>'โ','ใ'=>'ใ','ไ'=>'ไ','ๅ'=>'ๅ','ๆ'=>'ๆ','็'=>'็','่'=>'่','้'=>'้','๊'=>'๊','๋'=>'๋','์'=>'์','ํ'=>'ํ','๎'=>'๎','๐'=>'0','๑'=>'1','๒'=>'2','๓'=>'3','๔'=>'4','๕'=>'5','๖'=>'6','๗'=>'7','๘'=>'8','๙'=>'9','ກ'=>'ກ','ຂ'=>'ຂ','ຄ'=>'ຄ','ງ'=>'ງ','ຈ'=>'ຈ','ຊ'=>'ຊ','ຍ'=>'ຍ','ດ'=>'ດ','ຕ'=>'ຕ','ຖ'=>'ຖ','ທ'=>'ທ','ນ'=>'ນ','ບ'=>'ບ','ປ'=>'ປ','ຜ'=>'ຜ','ຝ'=>'ຝ','ພ'=>'ພ','ຟ'=>'ຟ','ມ'=>'ມ','ຢ'=>'ຢ','ຣ'=>'ຣ','ລ'=>'ລ','ວ'=>'ວ','ສ'=>'ສ','ຫ'=>'ຫ','ອ'=>'ອ','ຮ'=>'ຮ','ຯ'=>'ຯ','ະ'=>'ະ','ັ'=>'ັ','າ'=>'າ','ຳ'=>'ຳ','ິ'=>'ິ','ີ'=>'ີ','ຶ'=>'ຶ','ື'=>'ື','ຸ'=>'ຸ','ູ'=>'ູ','ົ'=>'ົ','ຼ'=>'ຼ','ຽ'=>'ຽ','ເ'=>'ເ','ແ'=>'ແ','ໂ'=>'ໂ','ໃ'=>'ໃ','ໄ'=>'ໄ','ໆ'=>'ໆ','່'=>'່','້'=>'້','໊'=>'໊','໋'=>'໋','໌'=>'໌','ໍ'=>'ໍ','໐'=>'0','໑'=>'1','໒'=>'2','໓'=>'3','໔'=>'4','໕'=>'5','໖'=>'6','໗'=>'7','໘'=>'8','໙'=>'9','ໜ'=>'ໜ','ໝ'=>'ໝ','ༀ'=>'ༀ','༘'=>'༘','༙'=>'༙','༠'=>'0','༡'=>'1','༢'=>'2','༣'=>'3','༤'=>'4','༥'=>'5','༦'=>'6','༧'=>'7','༨'=>'8','༩'=>'9','༪'=>'1/2','༫'=>'3/2','༬'=>'5/2','༭'=>'7/2','༮'=>'9/2','༯'=>'11/2','༰'=>'13/2','༱'=>'15/2','༲'=>'17/2','༳'=>'-1/2','༵'=>'༵','༷'=>'༷','༹'=>'༹','༾'=>'༾','༿'=>'༿','ཀ'=>'ཀ','ཁ'=>'ཁ','ག'=>'ག','གྷ'=>'གྷ','ང'=>'ང','ཅ'=>'ཅ','ཆ'=>'ཆ','ཇ'=>'ཇ','ཉ'=>'ཉ','ཊ'=>'ཊ','ཋ'=>'ཋ','ཌ'=>'ཌ','ཌྷ'=>'ཌྷ','ཎ'=>'ཎ','ཏ'=>'ཏ','ཐ'=>'ཐ','ད'=>'ད','དྷ'=>'དྷ','ན'=>'ན','པ'=>'པ','ཕ'=>'ཕ','བ'=>'བ','བྷ'=>'བྷ','མ'=>'མ','ཙ'=>'ཙ','ཚ'=>'ཚ','ཛ'=>'ཛ','ཛྷ'=>'ཛྷ','ཝ'=>'ཝ','ཞ'=>'ཞ','ཟ'=>'ཟ','འ'=>'འ','ཡ'=>'ཡ','ར'=>'ར','ལ'=>'ལ','ཤ'=>'ཤ','ཥ'=>'ཥ','ས'=>'ས','ཧ'=>'ཧ','ཨ'=>'ཨ','ཀྵ'=>'ཀྵ','ཪ'=>'ཪ','ཱ'=>'ཱ','ི'=>'ི','ཱི'=>'ཱི','ུ'=>'ུ','ཱུ'=>'ཱུ','ྲྀ'=>'ྲྀ','ཷ'=>'ཷ','ླྀ'=>'ླྀ','ཹ'=>'ཹ','ེ'=>'ེ','ཻ'=>'ཻ','ོ'=>'ོ','ཽ'=>'ཽ','ཾ'=>'ཾ','ཿ'=>'ཿ','ྀ'=>'ྀ','ཱྀ'=>'ཱྀ','ྂ'=>'ྂ','ྃ'=>'ྃ','྄'=>'྄','྆'=>'྆','྇'=>'྇','ྈ'=>'ྈ','ྉ'=>'ྉ','ྊ'=>'ྊ','ྋ'=>'ྋ','ྐ'=>'ྐ','ྑ'=>'ྑ','ྒ'=>'ྒ','ྒྷ'=>'ྒྷ','ྔ'=>'ྔ','ྕ'=>'ྕ','ྖ'=>'ྖ','ྗ'=>'ྗ','ྙ'=>'ྙ','ྚ'=>'ྚ','ྛ'=>'ྛ','ྜ'=>'ྜ','ྜྷ'=>'ྜྷ','ྞ'=>'ྞ','ྟ'=>'ྟ','ྠ'=>'ྠ','ྡ'=>'ྡ','ྡྷ'=>'ྡྷ','ྣ'=>'ྣ','ྤ'=>'ྤ','ྥ'=>'ྥ','ྦ'=>'ྦ','ྦྷ'=>'ྦྷ','ྨ'=>'ྨ','ྩ'=>'ྩ','ྪ'=>'ྪ','ྫ'=>'ྫ','ྫྷ'=>'ྫྷ','ྭ'=>'ྭ','ྮ'=>'ྮ','ྯ'=>'ྯ','ྰ'=>'ྰ','ྱ'=>'ྱ','ྲ'=>'ྲ','ླ'=>'ླ','ྴ'=>'ྴ','ྵ'=>'ྵ','ྶ'=>'ྶ','ྷ'=>'ྷ','ྸ'=>'ྸ','ྐྵ'=>'ྐྵ','ྺ'=>'ྺ','ྻ'=>'ྻ','ྼ'=>'ྼ','࿆'=>'࿆');
diff --git a/phpBB/includes/utf/data/search_indexer_19.php b/phpBB/includes/utf/data/search_indexer_19.php
index e26f7d81a0..d10d09f061 100644
--- a/phpBB/includes/utf/data/search_indexer_19.php
+++ b/phpBB/includes/utf/data/search_indexer_19.php
@@ -1 +1 @@
-<?php return array('龻'=>'龻'); \ No newline at end of file
+<?php return array('龻'=>'龻');
diff --git a/phpBB/includes/utf/data/search_indexer_2.php b/phpBB/includes/utf/data/search_indexer_2.php
index 751226ed22..5b5f03448f 100644
--- a/phpBB/includes/utf/data/search_indexer_2.php
+++ b/phpBB/includes/utf/data/search_indexer_2.php
@@ -1 +1 @@
-<?php return array('က'=>'က','ခ'=>'ခ','ဂ'=>'ဂ','ဃ'=>'ဃ','င'=>'င','စ'=>'စ','ဆ'=>'ဆ','ဇ'=>'ဇ','ဈ'=>'ဈ','ဉ'=>'ဉ','ည'=>'ည','ဋ'=>'ဋ','ဌ'=>'ဌ','ဍ'=>'ဍ','ဎ'=>'ဎ','ဏ'=>'ဏ','တ'=>'တ','ထ'=>'ထ','ဒ'=>'ဒ','ဓ'=>'ဓ','န'=>'န','ပ'=>'ပ','ဖ'=>'ဖ','ဗ'=>'ဗ','ဘ'=>'ဘ','မ'=>'မ','ယ'=>'ယ','ရ'=>'ရ','လ'=>'လ','ဝ'=>'ဝ','သ'=>'သ','ဟ'=>'ဟ','ဠ'=>'ဠ','အ'=>'အ','ဣ'=>'ဣ','ဤ'=>'ဤ','ဥ'=>'ဥ','ဦ'=>'ဦ','ဧ'=>'ဧ','ဩ'=>'ဩ','ဪ'=>'ဪ','ာ'=>'ာ','ိ'=>'ိ','ီ'=>'ီ','ု'=>'ု','ူ'=>'ူ','ေ'=>'ေ','ဲ'=>'ဲ','ံ'=>'ံ','့'=>'့','း'=>'း','္'=>'္','၀'=>'0','၁'=>'1','၂'=>'2','၃'=>'3','၄'=>'4','၅'=>'5','၆'=>'6','၇'=>'7','၈'=>'8','၉'=>'9','ၐ'=>'ၐ','ၑ'=>'ၑ','ၒ'=>'ၒ','ၓ'=>'ၓ','ၔ'=>'ၔ','ၕ'=>'ၕ','ၖ'=>'ၖ','ၗ'=>'ၗ','ၘ'=>'ၘ','ၙ'=>'ၙ','Ⴀ'=>'ⴀ','Ⴁ'=>'ⴁ','Ⴂ'=>'ⴂ','Ⴃ'=>'ⴃ','Ⴄ'=>'ⴄ','Ⴅ'=>'ⴅ','Ⴆ'=>'ⴆ','Ⴇ'=>'ⴇ','Ⴈ'=>'ⴈ','Ⴉ'=>'ⴉ','Ⴊ'=>'ⴊ','Ⴋ'=>'ⴋ','Ⴌ'=>'ⴌ','Ⴍ'=>'ⴍ','Ⴎ'=>'ⴎ','Ⴏ'=>'ⴏ','Ⴐ'=>'ⴐ','Ⴑ'=>'ⴑ','Ⴒ'=>'ⴒ','Ⴓ'=>'ⴓ','Ⴔ'=>'ⴔ','Ⴕ'=>'ⴕ','Ⴖ'=>'ⴖ','Ⴗ'=>'ⴗ','Ⴘ'=>'ⴘ','Ⴙ'=>'ⴙ','Ⴚ'=>'ⴚ','Ⴛ'=>'ⴛ','Ⴜ'=>'ⴜ','Ⴝ'=>'ⴝ','Ⴞ'=>'ⴞ','Ⴟ'=>'ⴟ','Ⴠ'=>'ⴠ','Ⴡ'=>'ⴡ','Ⴢ'=>'ⴢ','Ⴣ'=>'ⴣ','Ⴤ'=>'ⴤ','Ⴥ'=>'ⴥ','ა'=>'ა','ბ'=>'ბ','გ'=>'გ','დ'=>'დ','ე'=>'ე','ვ'=>'ვ','ზ'=>'ზ','თ'=>'თ','ი'=>'ი','კ'=>'კ','ლ'=>'ლ','მ'=>'მ','ნ'=>'ნ','ო'=>'ო','პ'=>'პ','ჟ'=>'ჟ','რ'=>'რ','ს'=>'ს','ტ'=>'ტ','უ'=>'უ','ფ'=>'ფ','ქ'=>'ქ','ღ'=>'ღ','ყ'=>'ყ','შ'=>'შ','ჩ'=>'ჩ','ც'=>'ც','ძ'=>'ძ','წ'=>'წ','ჭ'=>'ჭ','ხ'=>'ხ','ჯ'=>'ჯ','ჰ'=>'ჰ','ჱ'=>'ჱ','ჲ'=>'ჲ','ჳ'=>'ჳ','ჴ'=>'ჴ','ჵ'=>'ჵ','ჶ'=>'ჶ','ჷ'=>'ჷ','ჸ'=>'ჸ','ჹ'=>'ჹ','ჺ'=>'ჺ','ჼ'=>'ჼ','ᄀ'=>'ᄀ','ᄁ'=>'ᄁ','ᄂ'=>'ᄂ','ᄃ'=>'ᄃ','ᄄ'=>'ᄄ','ᄅ'=>'ᄅ','ᄆ'=>'ᄆ','ᄇ'=>'ᄇ','ᄈ'=>'ᄈ','ᄉ'=>'ᄉ','ᄊ'=>'ᄊ','ᄋ'=>'ᄋ','ᄌ'=>'ᄌ','ᄍ'=>'ᄍ','ᄎ'=>'ᄎ','ᄏ'=>'ᄏ','ᄐ'=>'ᄐ','ᄑ'=>'ᄑ','ᄒ'=>'ᄒ','ᄓ'=>'ᄓ','ᄔ'=>'ᄔ','ᄕ'=>'ᄕ','ᄖ'=>'ᄖ','ᄗ'=>'ᄗ','ᄘ'=>'ᄘ','ᄙ'=>'ᄙ','ᄚ'=>'ᄚ','ᄛ'=>'ᄛ','ᄜ'=>'ᄜ','ᄝ'=>'ᄝ','ᄞ'=>'ᄞ','ᄟ'=>'ᄟ','ᄠ'=>'ᄠ','ᄡ'=>'ᄡ','ᄢ'=>'ᄢ','ᄣ'=>'ᄣ','ᄤ'=>'ᄤ','ᄥ'=>'ᄥ','ᄦ'=>'ᄦ','ᄧ'=>'ᄧ','ᄨ'=>'ᄨ','ᄩ'=>'ᄩ','ᄪ'=>'ᄪ','ᄫ'=>'ᄫ','ᄬ'=>'ᄬ','ᄭ'=>'ᄭ','ᄮ'=>'ᄮ','ᄯ'=>'ᄯ','ᄰ'=>'ᄰ','ᄱ'=>'ᄱ','ᄲ'=>'ᄲ','ᄳ'=>'ᄳ','ᄴ'=>'ᄴ','ᄵ'=>'ᄵ','ᄶ'=>'ᄶ','ᄷ'=>'ᄷ','ᄸ'=>'ᄸ','ᄹ'=>'ᄹ','ᄺ'=>'ᄺ','ᄻ'=>'ᄻ','ᄼ'=>'ᄼ','ᄽ'=>'ᄽ','ᄾ'=>'ᄾ','ᄿ'=>'ᄿ','ᅀ'=>'ᅀ','ᅁ'=>'ᅁ','ᅂ'=>'ᅂ','ᅃ'=>'ᅃ','ᅄ'=>'ᅄ','ᅅ'=>'ᅅ','ᅆ'=>'ᅆ','ᅇ'=>'ᅇ','ᅈ'=>'ᅈ','ᅉ'=>'ᅉ','ᅊ'=>'ᅊ','ᅋ'=>'ᅋ','ᅌ'=>'ᅌ','ᅍ'=>'ᅍ','ᅎ'=>'ᅎ','ᅏ'=>'ᅏ','ᅐ'=>'ᅐ','ᅑ'=>'ᅑ','ᅒ'=>'ᅒ','ᅓ'=>'ᅓ','ᅔ'=>'ᅔ','ᅕ'=>'ᅕ','ᅖ'=>'ᅖ','ᅗ'=>'ᅗ','ᅘ'=>'ᅘ','ᅙ'=>'ᅙ','ᅟ'=>'ᅟ','ᅠ'=>'ᅠ','ᅡ'=>'ᅡ','ᅢ'=>'ᅢ','ᅣ'=>'ᅣ','ᅤ'=>'ᅤ','ᅥ'=>'ᅥ','ᅦ'=>'ᅦ','ᅧ'=>'ᅧ','ᅨ'=>'ᅨ','ᅩ'=>'ᅩ','ᅪ'=>'ᅪ','ᅫ'=>'ᅫ','ᅬ'=>'ᅬ','ᅭ'=>'ᅭ','ᅮ'=>'ᅮ','ᅯ'=>'ᅯ','ᅰ'=>'ᅰ','ᅱ'=>'ᅱ','ᅲ'=>'ᅲ','ᅳ'=>'ᅳ','ᅴ'=>'ᅴ','ᅵ'=>'ᅵ','ᅶ'=>'ᅶ','ᅷ'=>'ᅷ','ᅸ'=>'ᅸ','ᅹ'=>'ᅹ','ᅺ'=>'ᅺ','ᅻ'=>'ᅻ','ᅼ'=>'ᅼ','ᅽ'=>'ᅽ','ᅾ'=>'ᅾ','ᅿ'=>'ᅿ','ᆀ'=>'ᆀ','ᆁ'=>'ᆁ','ᆂ'=>'ᆂ','ᆃ'=>'ᆃ','ᆄ'=>'ᆄ','ᆅ'=>'ᆅ','ᆆ'=>'ᆆ','ᆇ'=>'ᆇ','ᆈ'=>'ᆈ','ᆉ'=>'ᆉ','ᆊ'=>'ᆊ','ᆋ'=>'ᆋ','ᆌ'=>'ᆌ','ᆍ'=>'ᆍ','ᆎ'=>'ᆎ','ᆏ'=>'ᆏ','ᆐ'=>'ᆐ','ᆑ'=>'ᆑ','ᆒ'=>'ᆒ','ᆓ'=>'ᆓ','ᆔ'=>'ᆔ','ᆕ'=>'ᆕ','ᆖ'=>'ᆖ','ᆗ'=>'ᆗ','ᆘ'=>'ᆘ','ᆙ'=>'ᆙ','ᆚ'=>'ᆚ','ᆛ'=>'ᆛ','ᆜ'=>'ᆜ','ᆝ'=>'ᆝ','ᆞ'=>'ᆞ','ᆟ'=>'ᆟ','ᆠ'=>'ᆠ','ᆡ'=>'ᆡ','ᆢ'=>'ᆢ','ᆨ'=>'ᆨ','ᆩ'=>'ᆩ','ᆪ'=>'ᆪ','ᆫ'=>'ᆫ','ᆬ'=>'ᆬ','ᆭ'=>'ᆭ','ᆮ'=>'ᆮ','ᆯ'=>'ᆯ','ᆰ'=>'ᆰ','ᆱ'=>'ᆱ','ᆲ'=>'ᆲ','ᆳ'=>'ᆳ','ᆴ'=>'ᆴ','ᆵ'=>'ᆵ','ᆶ'=>'ᆶ','ᆷ'=>'ᆷ','ᆸ'=>'ᆸ','ᆹ'=>'ᆹ','ᆺ'=>'ᆺ','ᆻ'=>'ᆻ','ᆼ'=>'ᆼ','ᆽ'=>'ᆽ','ᆾ'=>'ᆾ','ᆿ'=>'ᆿ','ᇀ'=>'ᇀ','ᇁ'=>'ᇁ','ᇂ'=>'ᇂ','ᇃ'=>'ᇃ','ᇄ'=>'ᇄ','ᇅ'=>'ᇅ','ᇆ'=>'ᇆ','ᇇ'=>'ᇇ','ᇈ'=>'ᇈ','ᇉ'=>'ᇉ','ᇊ'=>'ᇊ','ᇋ'=>'ᇋ','ᇌ'=>'ᇌ','ᇍ'=>'ᇍ','ᇎ'=>'ᇎ','ᇏ'=>'ᇏ','ᇐ'=>'ᇐ','ᇑ'=>'ᇑ','ᇒ'=>'ᇒ','ᇓ'=>'ᇓ','ᇔ'=>'ᇔ','ᇕ'=>'ᇕ','ᇖ'=>'ᇖ','ᇗ'=>'ᇗ','ᇘ'=>'ᇘ','ᇙ'=>'ᇙ','ᇚ'=>'ᇚ','ᇛ'=>'ᇛ','ᇜ'=>'ᇜ','ᇝ'=>'ᇝ','ᇞ'=>'ᇞ','ᇟ'=>'ᇟ','ᇠ'=>'ᇠ','ᇡ'=>'ᇡ','ᇢ'=>'ᇢ','ᇣ'=>'ᇣ','ᇤ'=>'ᇤ','ᇥ'=>'ᇥ','ᇦ'=>'ᇦ','ᇧ'=>'ᇧ','ᇨ'=>'ᇨ','ᇩ'=>'ᇩ','ᇪ'=>'ᇪ','ᇫ'=>'ᇫ','ᇬ'=>'ᇬ','ᇭ'=>'ᇭ','ᇮ'=>'ᇮ','ᇯ'=>'ᇯ','ᇰ'=>'ᇰ','ᇱ'=>'ᇱ','ᇲ'=>'ᇲ','ᇳ'=>'ᇳ','ᇴ'=>'ᇴ','ᇵ'=>'ᇵ','ᇶ'=>'ᇶ','ᇷ'=>'ᇷ','ᇸ'=>'ᇸ','ᇹ'=>'ᇹ','ሀ'=>'ሀ','ሁ'=>'ሁ','ሂ'=>'ሂ','ሃ'=>'ሃ','ሄ'=>'ሄ','ህ'=>'ህ','ሆ'=>'ሆ','ሇ'=>'ሇ','ለ'=>'ለ','ሉ'=>'ሉ','ሊ'=>'ሊ','ላ'=>'ላ','ሌ'=>'ሌ','ል'=>'ል','ሎ'=>'ሎ','ሏ'=>'ሏ','ሐ'=>'ሐ','ሑ'=>'ሑ','ሒ'=>'ሒ','ሓ'=>'ሓ','ሔ'=>'ሔ','ሕ'=>'ሕ','ሖ'=>'ሖ','ሗ'=>'ሗ','መ'=>'መ','ሙ'=>'ሙ','ሚ'=>'ሚ','ማ'=>'ማ','ሜ'=>'ሜ','ም'=>'ም','ሞ'=>'ሞ','ሟ'=>'ሟ','ሠ'=>'ሠ','ሡ'=>'ሡ','ሢ'=>'ሢ','ሣ'=>'ሣ','ሤ'=>'ሤ','ሥ'=>'ሥ','ሦ'=>'ሦ','ሧ'=>'ሧ','ረ'=>'ረ','ሩ'=>'ሩ','ሪ'=>'ሪ','ራ'=>'ራ','ሬ'=>'ሬ','ር'=>'ር','ሮ'=>'ሮ','ሯ'=>'ሯ','ሰ'=>'ሰ','ሱ'=>'ሱ','ሲ'=>'ሲ','ሳ'=>'ሳ','ሴ'=>'ሴ','ስ'=>'ስ','ሶ'=>'ሶ','ሷ'=>'ሷ','ሸ'=>'ሸ','ሹ'=>'ሹ','ሺ'=>'ሺ','ሻ'=>'ሻ','ሼ'=>'ሼ','ሽ'=>'ሽ','ሾ'=>'ሾ','ሿ'=>'ሿ','ቀ'=>'ቀ','ቁ'=>'ቁ','ቂ'=>'ቂ','ቃ'=>'ቃ','ቄ'=>'ቄ','ቅ'=>'ቅ','ቆ'=>'ቆ','ቇ'=>'ቇ','ቈ'=>'ቈ','ቊ'=>'ቊ','ቋ'=>'ቋ','ቌ'=>'ቌ','ቍ'=>'ቍ','ቐ'=>'ቐ','ቑ'=>'ቑ','ቒ'=>'ቒ','ቓ'=>'ቓ','ቔ'=>'ቔ','ቕ'=>'ቕ','ቖ'=>'ቖ','ቘ'=>'ቘ','ቚ'=>'ቚ','ቛ'=>'ቛ','ቜ'=>'ቜ','ቝ'=>'ቝ','በ'=>'በ','ቡ'=>'ቡ','ቢ'=>'ቢ','ባ'=>'ባ','ቤ'=>'ቤ','ብ'=>'ብ','ቦ'=>'ቦ','ቧ'=>'ቧ','ቨ'=>'ቨ','ቩ'=>'ቩ','ቪ'=>'ቪ','ቫ'=>'ቫ','ቬ'=>'ቬ','ቭ'=>'ቭ','ቮ'=>'ቮ','ቯ'=>'ቯ','ተ'=>'ተ','ቱ'=>'ቱ','ቲ'=>'ቲ','ታ'=>'ታ','ቴ'=>'ቴ','ት'=>'ት','ቶ'=>'ቶ','ቷ'=>'ቷ','ቸ'=>'ቸ','ቹ'=>'ቹ','ቺ'=>'ቺ','ቻ'=>'ቻ','ቼ'=>'ቼ','ች'=>'ች','ቾ'=>'ቾ','ቿ'=>'ቿ','ኀ'=>'ኀ','ኁ'=>'ኁ','ኂ'=>'ኂ','ኃ'=>'ኃ','ኄ'=>'ኄ','ኅ'=>'ኅ','ኆ'=>'ኆ','ኇ'=>'ኇ','ኈ'=>'ኈ','ኊ'=>'ኊ','ኋ'=>'ኋ','ኌ'=>'ኌ','ኍ'=>'ኍ','ነ'=>'ነ','ኑ'=>'ኑ','ኒ'=>'ኒ','ና'=>'ና','ኔ'=>'ኔ','ን'=>'ን','ኖ'=>'ኖ','ኗ'=>'ኗ','ኘ'=>'ኘ','ኙ'=>'ኙ','ኚ'=>'ኚ','ኛ'=>'ኛ','ኜ'=>'ኜ','ኝ'=>'ኝ','ኞ'=>'ኞ','ኟ'=>'ኟ','አ'=>'አ','ኡ'=>'ኡ','ኢ'=>'ኢ','ኣ'=>'ኣ','ኤ'=>'ኤ','እ'=>'እ','ኦ'=>'ኦ','ኧ'=>'ኧ','ከ'=>'ከ','ኩ'=>'ኩ','ኪ'=>'ኪ','ካ'=>'ካ','ኬ'=>'ኬ','ክ'=>'ክ','ኮ'=>'ኮ','ኯ'=>'ኯ','ኰ'=>'ኰ','ኲ'=>'ኲ','ኳ'=>'ኳ','ኴ'=>'ኴ','ኵ'=>'ኵ','ኸ'=>'ኸ','ኹ'=>'ኹ','ኺ'=>'ኺ','ኻ'=>'ኻ','ኼ'=>'ኼ','ኽ'=>'ኽ','ኾ'=>'ኾ','ዀ'=>'ዀ','ዂ'=>'ዂ','ዃ'=>'ዃ','ዄ'=>'ዄ','ዅ'=>'ዅ','ወ'=>'ወ','ዉ'=>'ዉ','ዊ'=>'ዊ','ዋ'=>'ዋ','ዌ'=>'ዌ','ው'=>'ው','ዎ'=>'ዎ','ዏ'=>'ዏ','ዐ'=>'ዐ','ዑ'=>'ዑ','ዒ'=>'ዒ','ዓ'=>'ዓ','ዔ'=>'ዔ','ዕ'=>'ዕ','ዖ'=>'ዖ','ዘ'=>'ዘ','ዙ'=>'ዙ','ዚ'=>'ዚ','ዛ'=>'ዛ','ዜ'=>'ዜ','ዝ'=>'ዝ','ዞ'=>'ዞ','ዟ'=>'ዟ','ዠ'=>'ዠ','ዡ'=>'ዡ','ዢ'=>'ዢ','ዣ'=>'ዣ','ዤ'=>'ዤ','ዥ'=>'ዥ','ዦ'=>'ዦ','ዧ'=>'ዧ','የ'=>'የ','ዩ'=>'ዩ','ዪ'=>'ዪ','ያ'=>'ያ','ዬ'=>'ዬ','ይ'=>'ይ','ዮ'=>'ዮ','ዯ'=>'ዯ','ደ'=>'ደ','ዱ'=>'ዱ','ዲ'=>'ዲ','ዳ'=>'ዳ','ዴ'=>'ዴ','ድ'=>'ድ','ዶ'=>'ዶ','ዷ'=>'ዷ','ዸ'=>'ዸ','ዹ'=>'ዹ','ዺ'=>'ዺ','ዻ'=>'ዻ','ዼ'=>'ዼ','ዽ'=>'ዽ','ዾ'=>'ዾ','ዿ'=>'ዿ','ጀ'=>'ጀ','ጁ'=>'ጁ','ጂ'=>'ጂ','ጃ'=>'ጃ','ጄ'=>'ጄ','ጅ'=>'ጅ','ጆ'=>'ጆ','ጇ'=>'ጇ','ገ'=>'ገ','ጉ'=>'ጉ','ጊ'=>'ጊ','ጋ'=>'ጋ','ጌ'=>'ጌ','ግ'=>'ግ','ጎ'=>'ጎ','ጏ'=>'ጏ','ጐ'=>'ጐ','ጒ'=>'ጒ','ጓ'=>'ጓ','ጔ'=>'ጔ','ጕ'=>'ጕ','ጘ'=>'ጘ','ጙ'=>'ጙ','ጚ'=>'ጚ','ጛ'=>'ጛ','ጜ'=>'ጜ','ጝ'=>'ጝ','ጞ'=>'ጞ','ጟ'=>'ጟ','ጠ'=>'ጠ','ጡ'=>'ጡ','ጢ'=>'ጢ','ጣ'=>'ጣ','ጤ'=>'ጤ','ጥ'=>'ጥ','ጦ'=>'ጦ','ጧ'=>'ጧ','ጨ'=>'ጨ','ጩ'=>'ጩ','ጪ'=>'ጪ','ጫ'=>'ጫ','ጬ'=>'ጬ','ጭ'=>'ጭ','ጮ'=>'ጮ','ጯ'=>'ጯ','ጰ'=>'ጰ','ጱ'=>'ጱ','ጲ'=>'ጲ','ጳ'=>'ጳ','ጴ'=>'ጴ','ጵ'=>'ጵ','ጶ'=>'ጶ','ጷ'=>'ጷ','ጸ'=>'ጸ','ጹ'=>'ጹ','ጺ'=>'ጺ','ጻ'=>'ጻ','ጼ'=>'ጼ','ጽ'=>'ጽ','ጾ'=>'ጾ','ጿ'=>'ጿ','ፀ'=>'ፀ','ፁ'=>'ፁ','ፂ'=>'ፂ','ፃ'=>'ፃ','ፄ'=>'ፄ','ፅ'=>'ፅ','ፆ'=>'ፆ','ፇ'=>'ፇ','ፈ'=>'ፈ','ፉ'=>'ፉ','ፊ'=>'ፊ','ፋ'=>'ፋ','ፌ'=>'ፌ','ፍ'=>'ፍ','ፎ'=>'ፎ','ፏ'=>'ፏ','ፐ'=>'ፐ','ፑ'=>'ፑ','ፒ'=>'ፒ','ፓ'=>'ፓ','ፔ'=>'ፔ','ፕ'=>'ፕ','ፖ'=>'ፖ','ፗ'=>'ፗ','ፘ'=>'ፘ','ፙ'=>'ፙ','ፚ'=>'ፚ','፟'=>'፟','፩'=>'1','፪'=>'2','፫'=>'3','፬'=>'4','፭'=>'5','፮'=>'6','፯'=>'7','፰'=>'8','፱'=>'9','፲'=>'10','፳'=>'20','፴'=>'30','፵'=>'40','፶'=>'50','፷'=>'60','፸'=>'70','፹'=>'80','፺'=>'90','፻'=>'100','፼'=>'10000','ᎀ'=>'ᎀ','ᎁ'=>'ᎁ','ᎂ'=>'ᎂ','ᎃ'=>'ᎃ','ᎄ'=>'ᎄ','ᎅ'=>'ᎅ','ᎆ'=>'ᎆ','ᎇ'=>'ᎇ','ᎈ'=>'ᎈ','ᎉ'=>'ᎉ','ᎊ'=>'ᎊ','ᎋ'=>'ᎋ','ᎌ'=>'ᎌ','ᎍ'=>'ᎍ','ᎎ'=>'ᎎ','ᎏ'=>'ᎏ','Ꭰ'=>'Ꭰ','Ꭱ'=>'Ꭱ','Ꭲ'=>'Ꭲ','Ꭳ'=>'Ꭳ','Ꭴ'=>'Ꭴ','Ꭵ'=>'Ꭵ','Ꭶ'=>'Ꭶ','Ꭷ'=>'Ꭷ','Ꭸ'=>'Ꭸ','Ꭹ'=>'Ꭹ','Ꭺ'=>'Ꭺ','Ꭻ'=>'Ꭻ','Ꭼ'=>'Ꭼ','Ꭽ'=>'Ꭽ','Ꭾ'=>'Ꭾ','Ꭿ'=>'Ꭿ','Ꮀ'=>'Ꮀ','Ꮁ'=>'Ꮁ','Ꮂ'=>'Ꮂ','Ꮃ'=>'Ꮃ','Ꮄ'=>'Ꮄ','Ꮅ'=>'Ꮅ','Ꮆ'=>'Ꮆ','Ꮇ'=>'Ꮇ','Ꮈ'=>'Ꮈ','Ꮉ'=>'Ꮉ','Ꮊ'=>'Ꮊ','Ꮋ'=>'Ꮋ','Ꮌ'=>'Ꮌ','Ꮍ'=>'Ꮍ','Ꮎ'=>'Ꮎ','Ꮏ'=>'Ꮏ','Ꮐ'=>'Ꮐ','Ꮑ'=>'Ꮑ','Ꮒ'=>'Ꮒ','Ꮓ'=>'Ꮓ','Ꮔ'=>'Ꮔ','Ꮕ'=>'Ꮕ','Ꮖ'=>'Ꮖ','Ꮗ'=>'Ꮗ','Ꮘ'=>'Ꮘ','Ꮙ'=>'Ꮙ','Ꮚ'=>'Ꮚ','Ꮛ'=>'Ꮛ','Ꮜ'=>'Ꮜ','Ꮝ'=>'Ꮝ','Ꮞ'=>'Ꮞ','Ꮟ'=>'Ꮟ','Ꮠ'=>'Ꮠ','Ꮡ'=>'Ꮡ','Ꮢ'=>'Ꮢ','Ꮣ'=>'Ꮣ','Ꮤ'=>'Ꮤ','Ꮥ'=>'Ꮥ','Ꮦ'=>'Ꮦ','Ꮧ'=>'Ꮧ','Ꮨ'=>'Ꮨ','Ꮩ'=>'Ꮩ','Ꮪ'=>'Ꮪ','Ꮫ'=>'Ꮫ','Ꮬ'=>'Ꮬ','Ꮭ'=>'Ꮭ','Ꮮ'=>'Ꮮ','Ꮯ'=>'Ꮯ','Ꮰ'=>'Ꮰ','Ꮱ'=>'Ꮱ','Ꮲ'=>'Ꮲ','Ꮳ'=>'Ꮳ','Ꮴ'=>'Ꮴ','Ꮵ'=>'Ꮵ','Ꮶ'=>'Ꮶ','Ꮷ'=>'Ꮷ','Ꮸ'=>'Ꮸ','Ꮹ'=>'Ꮹ','Ꮺ'=>'Ꮺ','Ꮻ'=>'Ꮻ','Ꮼ'=>'Ꮼ','Ꮽ'=>'Ꮽ','Ꮾ'=>'Ꮾ','Ꮿ'=>'Ꮿ','Ᏸ'=>'Ᏸ','Ᏹ'=>'Ᏹ','Ᏺ'=>'Ᏺ','Ᏻ'=>'Ᏻ','Ᏼ'=>'Ᏼ','ᐁ'=>'ᐁ','ᐂ'=>'ᐂ','ᐃ'=>'ᐃ','ᐄ'=>'ᐄ','ᐅ'=>'ᐅ','ᐆ'=>'ᐆ','ᐇ'=>'ᐇ','ᐈ'=>'ᐈ','ᐉ'=>'ᐉ','ᐊ'=>'ᐊ','ᐋ'=>'ᐋ','ᐌ'=>'ᐌ','ᐍ'=>'ᐍ','ᐎ'=>'ᐎ','ᐏ'=>'ᐏ','ᐐ'=>'ᐐ','ᐑ'=>'ᐑ','ᐒ'=>'ᐒ','ᐓ'=>'ᐓ','ᐔ'=>'ᐔ','ᐕ'=>'ᐕ','ᐖ'=>'ᐖ','ᐗ'=>'ᐗ','ᐘ'=>'ᐘ','ᐙ'=>'ᐙ','ᐚ'=>'ᐚ','ᐛ'=>'ᐛ','ᐜ'=>'ᐜ','ᐝ'=>'ᐝ','ᐞ'=>'ᐞ','ᐟ'=>'ᐟ','ᐠ'=>'ᐠ','ᐡ'=>'ᐡ','ᐢ'=>'ᐢ','ᐣ'=>'ᐣ','ᐤ'=>'ᐤ','ᐥ'=>'ᐥ','ᐦ'=>'ᐦ','ᐧ'=>'ᐧ','ᐨ'=>'ᐨ','ᐩ'=>'ᐩ','ᐪ'=>'ᐪ','ᐫ'=>'ᐫ','ᐬ'=>'ᐬ','ᐭ'=>'ᐭ','ᐮ'=>'ᐮ','ᐯ'=>'ᐯ','ᐰ'=>'ᐰ','ᐱ'=>'ᐱ','ᐲ'=>'ᐲ','ᐳ'=>'ᐳ','ᐴ'=>'ᐴ','ᐵ'=>'ᐵ','ᐶ'=>'ᐶ','ᐷ'=>'ᐷ','ᐸ'=>'ᐸ','ᐹ'=>'ᐹ','ᐺ'=>'ᐺ','ᐻ'=>'ᐻ','ᐼ'=>'ᐼ','ᐽ'=>'ᐽ','ᐾ'=>'ᐾ','ᐿ'=>'ᐿ','ᑀ'=>'ᑀ','ᑁ'=>'ᑁ','ᑂ'=>'ᑂ','ᑃ'=>'ᑃ','ᑄ'=>'ᑄ','ᑅ'=>'ᑅ','ᑆ'=>'ᑆ','ᑇ'=>'ᑇ','ᑈ'=>'ᑈ','ᑉ'=>'ᑉ','ᑊ'=>'ᑊ','ᑋ'=>'ᑋ','ᑌ'=>'ᑌ','ᑍ'=>'ᑍ','ᑎ'=>'ᑎ','ᑏ'=>'ᑏ','ᑐ'=>'ᑐ','ᑑ'=>'ᑑ','ᑒ'=>'ᑒ','ᑓ'=>'ᑓ','ᑔ'=>'ᑔ','ᑕ'=>'ᑕ','ᑖ'=>'ᑖ','ᑗ'=>'ᑗ','ᑘ'=>'ᑘ','ᑙ'=>'ᑙ','ᑚ'=>'ᑚ','ᑛ'=>'ᑛ','ᑜ'=>'ᑜ','ᑝ'=>'ᑝ','ᑞ'=>'ᑞ','ᑟ'=>'ᑟ','ᑠ'=>'ᑠ','ᑡ'=>'ᑡ','ᑢ'=>'ᑢ','ᑣ'=>'ᑣ','ᑤ'=>'ᑤ','ᑥ'=>'ᑥ','ᑦ'=>'ᑦ','ᑧ'=>'ᑧ','ᑨ'=>'ᑨ','ᑩ'=>'ᑩ','ᑪ'=>'ᑪ','ᑫ'=>'ᑫ','ᑬ'=>'ᑬ','ᑭ'=>'ᑭ','ᑮ'=>'ᑮ','ᑯ'=>'ᑯ','ᑰ'=>'ᑰ','ᑱ'=>'ᑱ','ᑲ'=>'ᑲ','ᑳ'=>'ᑳ','ᑴ'=>'ᑴ','ᑵ'=>'ᑵ','ᑶ'=>'ᑶ','ᑷ'=>'ᑷ','ᑸ'=>'ᑸ','ᑹ'=>'ᑹ','ᑺ'=>'ᑺ','ᑻ'=>'ᑻ','ᑼ'=>'ᑼ','ᑽ'=>'ᑽ','ᑾ'=>'ᑾ','ᑿ'=>'ᑿ','ᒀ'=>'ᒀ','ᒁ'=>'ᒁ','ᒂ'=>'ᒂ','ᒃ'=>'ᒃ','ᒄ'=>'ᒄ','ᒅ'=>'ᒅ','ᒆ'=>'ᒆ','ᒇ'=>'ᒇ','ᒈ'=>'ᒈ','ᒉ'=>'ᒉ','ᒊ'=>'ᒊ','ᒋ'=>'ᒋ','ᒌ'=>'ᒌ','ᒍ'=>'ᒍ','ᒎ'=>'ᒎ','ᒏ'=>'ᒏ','ᒐ'=>'ᒐ','ᒑ'=>'ᒑ','ᒒ'=>'ᒒ','ᒓ'=>'ᒓ','ᒔ'=>'ᒔ','ᒕ'=>'ᒕ','ᒖ'=>'ᒖ','ᒗ'=>'ᒗ','ᒘ'=>'ᒘ','ᒙ'=>'ᒙ','ᒚ'=>'ᒚ','ᒛ'=>'ᒛ','ᒜ'=>'ᒜ','ᒝ'=>'ᒝ','ᒞ'=>'ᒞ','ᒟ'=>'ᒟ','ᒠ'=>'ᒠ','ᒡ'=>'ᒡ','ᒢ'=>'ᒢ','ᒣ'=>'ᒣ','ᒤ'=>'ᒤ','ᒥ'=>'ᒥ','ᒦ'=>'ᒦ','ᒧ'=>'ᒧ','ᒨ'=>'ᒨ','ᒩ'=>'ᒩ','ᒪ'=>'ᒪ','ᒫ'=>'ᒫ','ᒬ'=>'ᒬ','ᒭ'=>'ᒭ','ᒮ'=>'ᒮ','ᒯ'=>'ᒯ','ᒰ'=>'ᒰ','ᒱ'=>'ᒱ','ᒲ'=>'ᒲ','ᒳ'=>'ᒳ','ᒴ'=>'ᒴ','ᒵ'=>'ᒵ','ᒶ'=>'ᒶ','ᒷ'=>'ᒷ','ᒸ'=>'ᒸ','ᒹ'=>'ᒹ','ᒺ'=>'ᒺ','ᒻ'=>'ᒻ','ᒼ'=>'ᒼ','ᒽ'=>'ᒽ','ᒾ'=>'ᒾ','ᒿ'=>'ᒿ','ᓀ'=>'ᓀ','ᓁ'=>'ᓁ','ᓂ'=>'ᓂ','ᓃ'=>'ᓃ','ᓄ'=>'ᓄ','ᓅ'=>'ᓅ','ᓆ'=>'ᓆ','ᓇ'=>'ᓇ','ᓈ'=>'ᓈ','ᓉ'=>'ᓉ','ᓊ'=>'ᓊ','ᓋ'=>'ᓋ','ᓌ'=>'ᓌ','ᓍ'=>'ᓍ','ᓎ'=>'ᓎ','ᓏ'=>'ᓏ','ᓐ'=>'ᓐ','ᓑ'=>'ᓑ','ᓒ'=>'ᓒ','ᓓ'=>'ᓓ','ᓔ'=>'ᓔ','ᓕ'=>'ᓕ','ᓖ'=>'ᓖ','ᓗ'=>'ᓗ','ᓘ'=>'ᓘ','ᓙ'=>'ᓙ','ᓚ'=>'ᓚ','ᓛ'=>'ᓛ','ᓜ'=>'ᓜ','ᓝ'=>'ᓝ','ᓞ'=>'ᓞ','ᓟ'=>'ᓟ','ᓠ'=>'ᓠ','ᓡ'=>'ᓡ','ᓢ'=>'ᓢ','ᓣ'=>'ᓣ','ᓤ'=>'ᓤ','ᓥ'=>'ᓥ','ᓦ'=>'ᓦ','ᓧ'=>'ᓧ','ᓨ'=>'ᓨ','ᓩ'=>'ᓩ','ᓪ'=>'ᓪ','ᓫ'=>'ᓫ','ᓬ'=>'ᓬ','ᓭ'=>'ᓭ','ᓮ'=>'ᓮ','ᓯ'=>'ᓯ','ᓰ'=>'ᓰ','ᓱ'=>'ᓱ','ᓲ'=>'ᓲ','ᓳ'=>'ᓳ','ᓴ'=>'ᓴ','ᓵ'=>'ᓵ','ᓶ'=>'ᓶ','ᓷ'=>'ᓷ','ᓸ'=>'ᓸ','ᓹ'=>'ᓹ','ᓺ'=>'ᓺ','ᓻ'=>'ᓻ','ᓼ'=>'ᓼ','ᓽ'=>'ᓽ','ᓾ'=>'ᓾ','ᓿ'=>'ᓿ','ᔀ'=>'ᔀ','ᔁ'=>'ᔁ','ᔂ'=>'ᔂ','ᔃ'=>'ᔃ','ᔄ'=>'ᔄ','ᔅ'=>'ᔅ','ᔆ'=>'ᔆ','ᔇ'=>'ᔇ','ᔈ'=>'ᔈ','ᔉ'=>'ᔉ','ᔊ'=>'ᔊ','ᔋ'=>'ᔋ','ᔌ'=>'ᔌ','ᔍ'=>'ᔍ','ᔎ'=>'ᔎ','ᔏ'=>'ᔏ','ᔐ'=>'ᔐ','ᔑ'=>'ᔑ','ᔒ'=>'ᔒ','ᔓ'=>'ᔓ','ᔔ'=>'ᔔ','ᔕ'=>'ᔕ','ᔖ'=>'ᔖ','ᔗ'=>'ᔗ','ᔘ'=>'ᔘ','ᔙ'=>'ᔙ','ᔚ'=>'ᔚ','ᔛ'=>'ᔛ','ᔜ'=>'ᔜ','ᔝ'=>'ᔝ','ᔞ'=>'ᔞ','ᔟ'=>'ᔟ','ᔠ'=>'ᔠ','ᔡ'=>'ᔡ','ᔢ'=>'ᔢ','ᔣ'=>'ᔣ','ᔤ'=>'ᔤ','ᔥ'=>'ᔥ','ᔦ'=>'ᔦ','ᔧ'=>'ᔧ','ᔨ'=>'ᔨ','ᔩ'=>'ᔩ','ᔪ'=>'ᔪ','ᔫ'=>'ᔫ','ᔬ'=>'ᔬ','ᔭ'=>'ᔭ','ᔮ'=>'ᔮ','ᔯ'=>'ᔯ','ᔰ'=>'ᔰ','ᔱ'=>'ᔱ','ᔲ'=>'ᔲ','ᔳ'=>'ᔳ','ᔴ'=>'ᔴ','ᔵ'=>'ᔵ','ᔶ'=>'ᔶ','ᔷ'=>'ᔷ','ᔸ'=>'ᔸ','ᔹ'=>'ᔹ','ᔺ'=>'ᔺ','ᔻ'=>'ᔻ','ᔼ'=>'ᔼ','ᔽ'=>'ᔽ','ᔾ'=>'ᔾ','ᔿ'=>'ᔿ','ᕀ'=>'ᕀ','ᕁ'=>'ᕁ','ᕂ'=>'ᕂ','ᕃ'=>'ᕃ','ᕄ'=>'ᕄ','ᕅ'=>'ᕅ','ᕆ'=>'ᕆ','ᕇ'=>'ᕇ','ᕈ'=>'ᕈ','ᕉ'=>'ᕉ','ᕊ'=>'ᕊ','ᕋ'=>'ᕋ','ᕌ'=>'ᕌ','ᕍ'=>'ᕍ','ᕎ'=>'ᕎ','ᕏ'=>'ᕏ','ᕐ'=>'ᕐ','ᕑ'=>'ᕑ','ᕒ'=>'ᕒ','ᕓ'=>'ᕓ','ᕔ'=>'ᕔ','ᕕ'=>'ᕕ','ᕖ'=>'ᕖ','ᕗ'=>'ᕗ','ᕘ'=>'ᕘ','ᕙ'=>'ᕙ','ᕚ'=>'ᕚ','ᕛ'=>'ᕛ','ᕜ'=>'ᕜ','ᕝ'=>'ᕝ','ᕞ'=>'ᕞ','ᕟ'=>'ᕟ','ᕠ'=>'ᕠ','ᕡ'=>'ᕡ','ᕢ'=>'ᕢ','ᕣ'=>'ᕣ','ᕤ'=>'ᕤ','ᕥ'=>'ᕥ','ᕦ'=>'ᕦ','ᕧ'=>'ᕧ','ᕨ'=>'ᕨ','ᕩ'=>'ᕩ','ᕪ'=>'ᕪ','ᕫ'=>'ᕫ','ᕬ'=>'ᕬ','ᕭ'=>'ᕭ','ᕮ'=>'ᕮ','ᕯ'=>'ᕯ','ᕰ'=>'ᕰ','ᕱ'=>'ᕱ','ᕲ'=>'ᕲ','ᕳ'=>'ᕳ','ᕴ'=>'ᕴ','ᕵ'=>'ᕵ','ᕶ'=>'ᕶ','ᕷ'=>'ᕷ','ᕸ'=>'ᕸ','ᕹ'=>'ᕹ','ᕺ'=>'ᕺ','ᕻ'=>'ᕻ','ᕼ'=>'ᕼ','ᕽ'=>'ᕽ','ᕾ'=>'ᕾ','ᕿ'=>'ᕿ','ᖀ'=>'ᖀ','ᖁ'=>'ᖁ','ᖂ'=>'ᖂ','ᖃ'=>'ᖃ','ᖄ'=>'ᖄ','ᖅ'=>'ᖅ','ᖆ'=>'ᖆ','ᖇ'=>'ᖇ','ᖈ'=>'ᖈ','ᖉ'=>'ᖉ','ᖊ'=>'ᖊ','ᖋ'=>'ᖋ','ᖌ'=>'ᖌ','ᖍ'=>'ᖍ','ᖎ'=>'ᖎ','ᖏ'=>'ᖏ','ᖐ'=>'ᖐ','ᖑ'=>'ᖑ','ᖒ'=>'ᖒ','ᖓ'=>'ᖓ','ᖔ'=>'ᖔ','ᖕ'=>'ᖕ','ᖖ'=>'ᖖ','ᖗ'=>'ᖗ','ᖘ'=>'ᖘ','ᖙ'=>'ᖙ','ᖚ'=>'ᖚ','ᖛ'=>'ᖛ','ᖜ'=>'ᖜ','ᖝ'=>'ᖝ','ᖞ'=>'ᖞ','ᖟ'=>'ᖟ','ᖠ'=>'ᖠ','ᖡ'=>'ᖡ','ᖢ'=>'ᖢ','ᖣ'=>'ᖣ','ᖤ'=>'ᖤ','ᖥ'=>'ᖥ','ᖦ'=>'ᖦ','ᖧ'=>'ᖧ','ᖨ'=>'ᖨ','ᖩ'=>'ᖩ','ᖪ'=>'ᖪ','ᖫ'=>'ᖫ','ᖬ'=>'ᖬ','ᖭ'=>'ᖭ','ᖮ'=>'ᖮ','ᖯ'=>'ᖯ','ᖰ'=>'ᖰ','ᖱ'=>'ᖱ','ᖲ'=>'ᖲ','ᖳ'=>'ᖳ','ᖴ'=>'ᖴ','ᖵ'=>'ᖵ','ᖶ'=>'ᖶ','ᖷ'=>'ᖷ','ᖸ'=>'ᖸ','ᖹ'=>'ᖹ','ᖺ'=>'ᖺ','ᖻ'=>'ᖻ','ᖼ'=>'ᖼ','ᖽ'=>'ᖽ','ᖾ'=>'ᖾ','ᖿ'=>'ᖿ','ᗀ'=>'ᗀ','ᗁ'=>'ᗁ','ᗂ'=>'ᗂ','ᗃ'=>'ᗃ','ᗄ'=>'ᗄ','ᗅ'=>'ᗅ','ᗆ'=>'ᗆ','ᗇ'=>'ᗇ','ᗈ'=>'ᗈ','ᗉ'=>'ᗉ','ᗊ'=>'ᗊ','ᗋ'=>'ᗋ','ᗌ'=>'ᗌ','ᗍ'=>'ᗍ','ᗎ'=>'ᗎ','ᗏ'=>'ᗏ','ᗐ'=>'ᗐ','ᗑ'=>'ᗑ','ᗒ'=>'ᗒ','ᗓ'=>'ᗓ','ᗔ'=>'ᗔ','ᗕ'=>'ᗕ','ᗖ'=>'ᗖ','ᗗ'=>'ᗗ','ᗘ'=>'ᗘ','ᗙ'=>'ᗙ','ᗚ'=>'ᗚ','ᗛ'=>'ᗛ','ᗜ'=>'ᗜ','ᗝ'=>'ᗝ','ᗞ'=>'ᗞ','ᗟ'=>'ᗟ','ᗠ'=>'ᗠ','ᗡ'=>'ᗡ','ᗢ'=>'ᗢ','ᗣ'=>'ᗣ','ᗤ'=>'ᗤ','ᗥ'=>'ᗥ','ᗦ'=>'ᗦ','ᗧ'=>'ᗧ','ᗨ'=>'ᗨ','ᗩ'=>'ᗩ','ᗪ'=>'ᗪ','ᗫ'=>'ᗫ','ᗬ'=>'ᗬ','ᗭ'=>'ᗭ','ᗮ'=>'ᗮ','ᗯ'=>'ᗯ','ᗰ'=>'ᗰ','ᗱ'=>'ᗱ','ᗲ'=>'ᗲ','ᗳ'=>'ᗳ','ᗴ'=>'ᗴ','ᗵ'=>'ᗵ','ᗶ'=>'ᗶ','ᗷ'=>'ᗷ','ᗸ'=>'ᗸ','ᗹ'=>'ᗹ','ᗺ'=>'ᗺ','ᗻ'=>'ᗻ','ᗼ'=>'ᗼ','ᗽ'=>'ᗽ','ᗾ'=>'ᗾ','ᗿ'=>'ᗿ','ᘀ'=>'ᘀ','ᘁ'=>'ᘁ','ᘂ'=>'ᘂ','ᘃ'=>'ᘃ','ᘄ'=>'ᘄ','ᘅ'=>'ᘅ','ᘆ'=>'ᘆ','ᘇ'=>'ᘇ','ᘈ'=>'ᘈ','ᘉ'=>'ᘉ','ᘊ'=>'ᘊ','ᘋ'=>'ᘋ','ᘌ'=>'ᘌ','ᘍ'=>'ᘍ','ᘎ'=>'ᘎ','ᘏ'=>'ᘏ','ᘐ'=>'ᘐ','ᘑ'=>'ᘑ','ᘒ'=>'ᘒ','ᘓ'=>'ᘓ','ᘔ'=>'ᘔ','ᘕ'=>'ᘕ','ᘖ'=>'ᘖ','ᘗ'=>'ᘗ','ᘘ'=>'ᘘ','ᘙ'=>'ᘙ','ᘚ'=>'ᘚ','ᘛ'=>'ᘛ','ᘜ'=>'ᘜ','ᘝ'=>'ᘝ','ᘞ'=>'ᘞ','ᘟ'=>'ᘟ','ᘠ'=>'ᘠ','ᘡ'=>'ᘡ','ᘢ'=>'ᘢ','ᘣ'=>'ᘣ','ᘤ'=>'ᘤ','ᘥ'=>'ᘥ','ᘦ'=>'ᘦ','ᘧ'=>'ᘧ','ᘨ'=>'ᘨ','ᘩ'=>'ᘩ','ᘪ'=>'ᘪ','ᘫ'=>'ᘫ','ᘬ'=>'ᘬ','ᘭ'=>'ᘭ','ᘮ'=>'ᘮ','ᘯ'=>'ᘯ','ᘰ'=>'ᘰ','ᘱ'=>'ᘱ','ᘲ'=>'ᘲ','ᘳ'=>'ᘳ','ᘴ'=>'ᘴ','ᘵ'=>'ᘵ','ᘶ'=>'ᘶ','ᘷ'=>'ᘷ','ᘸ'=>'ᘸ','ᘹ'=>'ᘹ','ᘺ'=>'ᘺ','ᘻ'=>'ᘻ','ᘼ'=>'ᘼ','ᘽ'=>'ᘽ','ᘾ'=>'ᘾ','ᘿ'=>'ᘿ','ᙀ'=>'ᙀ','ᙁ'=>'ᙁ','ᙂ'=>'ᙂ','ᙃ'=>'ᙃ','ᙄ'=>'ᙄ','ᙅ'=>'ᙅ','ᙆ'=>'ᙆ','ᙇ'=>'ᙇ','ᙈ'=>'ᙈ','ᙉ'=>'ᙉ','ᙊ'=>'ᙊ','ᙋ'=>'ᙋ','ᙌ'=>'ᙌ','ᙍ'=>'ᙍ','ᙎ'=>'ᙎ','ᙏ'=>'ᙏ','ᙐ'=>'ᙐ','ᙑ'=>'ᙑ','ᙒ'=>'ᙒ','ᙓ'=>'ᙓ','ᙔ'=>'ᙔ','ᙕ'=>'ᙕ','ᙖ'=>'ᙖ','ᙗ'=>'ᙗ','ᙘ'=>'ᙘ','ᙙ'=>'ᙙ','ᙚ'=>'ᙚ','ᙛ'=>'ᙛ','ᙜ'=>'ᙜ','ᙝ'=>'ᙝ','ᙞ'=>'ᙞ','ᙟ'=>'ᙟ','ᙠ'=>'ᙠ','ᙡ'=>'ᙡ','ᙢ'=>'ᙢ','ᙣ'=>'ᙣ','ᙤ'=>'ᙤ','ᙥ'=>'ᙥ','ᙦ'=>'ᙦ','ᙧ'=>'ᙧ','ᙨ'=>'ᙨ','ᙩ'=>'ᙩ','ᙪ'=>'ᙪ','ᙫ'=>'ᙫ','ᙬ'=>'ᙬ','ᙯ'=>'ᙯ','ᙰ'=>'ᙰ','ᙱ'=>'ᙱ','ᙲ'=>'ᙲ','ᙳ'=>'ᙳ','ᙴ'=>'ᙴ','ᙵ'=>'ᙵ','ᙶ'=>'ᙶ','ᚁ'=>'ᚁ','ᚂ'=>'ᚂ','ᚃ'=>'ᚃ','ᚄ'=>'ᚄ','ᚅ'=>'ᚅ','ᚆ'=>'ᚆ','ᚇ'=>'ᚇ','ᚈ'=>'ᚈ','ᚉ'=>'ᚉ','ᚊ'=>'ᚊ','ᚋ'=>'ᚋ','ᚌ'=>'ᚌ','ᚍ'=>'ᚍ','ᚎ'=>'ᚎ','ᚏ'=>'ᚏ','ᚐ'=>'ᚐ','ᚑ'=>'ᚑ','ᚒ'=>'ᚒ','ᚓ'=>'ᚓ','ᚔ'=>'ᚔ','ᚕ'=>'ᚕ','ᚖ'=>'ᚖ','ᚗ'=>'ᚗ','ᚘ'=>'ᚘ','ᚙ'=>'ᚙ','ᚚ'=>'ᚚ','ᚠ'=>'ᚠ','ᚡ'=>'ᚡ','ᚢ'=>'ᚢ','ᚣ'=>'ᚣ','ᚤ'=>'ᚤ','ᚥ'=>'ᚥ','ᚦ'=>'ᚦ','ᚧ'=>'ᚧ','ᚨ'=>'ᚨ','ᚩ'=>'ᚩ','ᚪ'=>'ᚪ','ᚫ'=>'ᚫ','ᚬ'=>'ᚬ','ᚭ'=>'ᚭ','ᚮ'=>'ᚮ','ᚯ'=>'ᚯ','ᚰ'=>'ᚰ','ᚱ'=>'ᚱ','ᚲ'=>'ᚲ','ᚳ'=>'ᚳ','ᚴ'=>'ᚴ','ᚵ'=>'ᚵ','ᚶ'=>'ᚶ','ᚷ'=>'ᚷ','ᚸ'=>'ᚸ','ᚹ'=>'ᚹ','ᚺ'=>'ᚺ','ᚻ'=>'ᚻ','ᚼ'=>'ᚼ','ᚽ'=>'ᚽ','ᚾ'=>'ᚾ','ᚿ'=>'ᚿ','ᛀ'=>'ᛀ','ᛁ'=>'ᛁ','ᛂ'=>'ᛂ','ᛃ'=>'ᛃ','ᛄ'=>'ᛄ','ᛅ'=>'ᛅ','ᛆ'=>'ᛆ','ᛇ'=>'ᛇ','ᛈ'=>'ᛈ','ᛉ'=>'ᛉ','ᛊ'=>'ᛊ','ᛋ'=>'ᛋ','ᛌ'=>'ᛌ','ᛍ'=>'ᛍ','ᛎ'=>'ᛎ','ᛏ'=>'ᛏ','ᛐ'=>'ᛐ','ᛑ'=>'ᛑ','ᛒ'=>'ᛒ','ᛓ'=>'ᛓ','ᛔ'=>'ᛔ','ᛕ'=>'ᛕ','ᛖ'=>'ᛖ','ᛗ'=>'ᛗ','ᛘ'=>'ᛘ','ᛙ'=>'ᛙ','ᛚ'=>'ᛚ','ᛛ'=>'ᛛ','ᛜ'=>'ᛜ','ᛝ'=>'ᛝ','ᛞ'=>'ᛞ','ᛟ'=>'ᛟ','ᛠ'=>'ᛠ','ᛡ'=>'ᛡ','ᛢ'=>'ᛢ','ᛣ'=>'ᛣ','ᛤ'=>'ᛤ','ᛥ'=>'ᛥ','ᛦ'=>'ᛦ','ᛧ'=>'ᛧ','ᛨ'=>'ᛨ','ᛩ'=>'ᛩ','ᛪ'=>'ᛪ','ᛮ'=>'17','ᛯ'=>'18','ᛰ'=>'19','ᜀ'=>'ᜀ','ᜁ'=>'ᜁ','ᜂ'=>'ᜂ','ᜃ'=>'ᜃ','ᜄ'=>'ᜄ','ᜅ'=>'ᜅ','ᜆ'=>'ᜆ','ᜇ'=>'ᜇ','ᜈ'=>'ᜈ','ᜉ'=>'ᜉ','ᜊ'=>'ᜊ','ᜋ'=>'ᜋ','ᜌ'=>'ᜌ','ᜎ'=>'ᜎ','ᜏ'=>'ᜏ','ᜐ'=>'ᜐ','ᜑ'=>'ᜑ','ᜒ'=>'ᜒ','ᜓ'=>'ᜓ','᜔'=>'᜔','ᜠ'=>'ᜠ','ᜡ'=>'ᜡ','ᜢ'=>'ᜢ','ᜣ'=>'ᜣ','ᜤ'=>'ᜤ','ᜥ'=>'ᜥ','ᜦ'=>'ᜦ','ᜧ'=>'ᜧ','ᜨ'=>'ᜨ','ᜩ'=>'ᜩ','ᜪ'=>'ᜪ','ᜫ'=>'ᜫ','ᜬ'=>'ᜬ','ᜭ'=>'ᜭ','ᜮ'=>'ᜮ','ᜯ'=>'ᜯ','ᜰ'=>'ᜰ','ᜱ'=>'ᜱ','ᜲ'=>'ᜲ','ᜳ'=>'ᜳ','᜴'=>'᜴','ᝀ'=>'ᝀ','ᝁ'=>'ᝁ','ᝂ'=>'ᝂ','ᝃ'=>'ᝃ','ᝄ'=>'ᝄ','ᝅ'=>'ᝅ','ᝆ'=>'ᝆ','ᝇ'=>'ᝇ','ᝈ'=>'ᝈ','ᝉ'=>'ᝉ','ᝊ'=>'ᝊ','ᝋ'=>'ᝋ','ᝌ'=>'ᝌ','ᝍ'=>'ᝍ','ᝎ'=>'ᝎ','ᝏ'=>'ᝏ','ᝐ'=>'ᝐ','ᝑ'=>'ᝑ','ᝒ'=>'ᝒ','ᝓ'=>'ᝓ','ᝠ'=>'ᝠ','ᝡ'=>'ᝡ','ᝢ'=>'ᝢ','ᝣ'=>'ᝣ','ᝤ'=>'ᝤ','ᝥ'=>'ᝥ','ᝦ'=>'ᝦ','ᝧ'=>'ᝧ','ᝨ'=>'ᝨ','ᝩ'=>'ᝩ','ᝪ'=>'ᝪ','ᝫ'=>'ᝫ','ᝬ'=>'ᝬ','ᝮ'=>'ᝮ','ᝯ'=>'ᝯ','ᝰ'=>'ᝰ','ᝲ'=>'ᝲ','ᝳ'=>'ᝳ','ក'=>'ក','ខ'=>'ខ','គ'=>'គ','ឃ'=>'ឃ','ង'=>'ង','ច'=>'ច','ឆ'=>'ឆ','ជ'=>'ជ','ឈ'=>'ឈ','ញ'=>'ញ','ដ'=>'ដ','ឋ'=>'ឋ','ឌ'=>'ឌ','ឍ'=>'ឍ','ណ'=>'ណ','ត'=>'ត','ថ'=>'ថ','ទ'=>'ទ','ធ'=>'ធ','ន'=>'ន','ប'=>'ប','ផ'=>'ផ','ព'=>'ព','ភ'=>'ភ','ម'=>'ម','យ'=>'យ','រ'=>'រ','ល'=>'ល','វ'=>'វ','ឝ'=>'ឝ','ឞ'=>'ឞ','ស'=>'ស','ហ'=>'ហ','ឡ'=>'ឡ','អ'=>'អ','ឣ'=>'ឣ','ឤ'=>'ឤ','ឥ'=>'ឥ','ឦ'=>'ឦ','ឧ'=>'ឧ','ឨ'=>'ឨ','ឩ'=>'ឩ','ឪ'=>'ឪ','ឫ'=>'ឫ','ឬ'=>'ឬ','ឭ'=>'ឭ','ឮ'=>'ឮ','ឯ'=>'ឯ','ឰ'=>'ឰ','ឱ'=>'ឱ','ឲ'=>'ឲ','ឳ'=>'ឳ','ា'=>'ា','ិ'=>'ិ','ី'=>'ី','ឹ'=>'ឹ','ឺ'=>'ឺ','ុ'=>'ុ','ូ'=>'ូ','ួ'=>'ួ','ើ'=>'ើ','ឿ'=>'ឿ','ៀ'=>'ៀ','េ'=>'េ','ែ'=>'ែ','ៃ'=>'ៃ','ោ'=>'ោ','ៅ'=>'ៅ','ំ'=>'ំ','ះ'=>'ះ','ៈ'=>'ៈ','៉'=>'៉','៊'=>'៊','់'=>'់','៌'=>'៌','៍'=>'៍','៎'=>'៎','៏'=>'៏','័'=>'័','៑'=>'៑','្'=>'្','៓'=>'៓','ៗ'=>'ៗ','ៜ'=>'ៜ','៝'=>'៝','០'=>'0','១'=>'1','២'=>'2','៣'=>'3','៤'=>'4','៥'=>'5','៦'=>'6','៧'=>'7','៨'=>'8','៩'=>'9','៰'=>'0','៱'=>'1','៲'=>'2','៳'=>'3','៴'=>'4','៵'=>'5','៶'=>'6','៷'=>'7','៸'=>'8','៹'=>'9'); \ No newline at end of file
+<?php return array('က'=>'က','ခ'=>'ခ','ဂ'=>'ဂ','ဃ'=>'ဃ','င'=>'င','စ'=>'စ','ဆ'=>'ဆ','ဇ'=>'ဇ','ဈ'=>'ဈ','ဉ'=>'ဉ','ည'=>'ည','ဋ'=>'ဋ','ဌ'=>'ဌ','ဍ'=>'ဍ','ဎ'=>'ဎ','ဏ'=>'ဏ','တ'=>'တ','ထ'=>'ထ','ဒ'=>'ဒ','ဓ'=>'ဓ','န'=>'န','ပ'=>'ပ','ဖ'=>'ဖ','ဗ'=>'ဗ','ဘ'=>'ဘ','မ'=>'မ','ယ'=>'ယ','ရ'=>'ရ','လ'=>'လ','ဝ'=>'ဝ','သ'=>'သ','ဟ'=>'ဟ','ဠ'=>'ဠ','အ'=>'အ','ဣ'=>'ဣ','ဤ'=>'ဤ','ဥ'=>'ဥ','ဦ'=>'ဦ','ဧ'=>'ဧ','ဩ'=>'ဩ','ဪ'=>'ဪ','ာ'=>'ာ','ိ'=>'ိ','ီ'=>'ီ','ု'=>'ု','ူ'=>'ူ','ေ'=>'ေ','ဲ'=>'ဲ','ံ'=>'ံ','့'=>'့','း'=>'း','္'=>'္','၀'=>'0','၁'=>'1','၂'=>'2','၃'=>'3','၄'=>'4','၅'=>'5','၆'=>'6','၇'=>'7','၈'=>'8','၉'=>'9','ၐ'=>'ၐ','ၑ'=>'ၑ','ၒ'=>'ၒ','ၓ'=>'ၓ','ၔ'=>'ၔ','ၕ'=>'ၕ','ၖ'=>'ၖ','ၗ'=>'ၗ','ၘ'=>'ၘ','ၙ'=>'ၙ','Ⴀ'=>'ⴀ','Ⴁ'=>'ⴁ','Ⴂ'=>'ⴂ','Ⴃ'=>'ⴃ','Ⴄ'=>'ⴄ','Ⴅ'=>'ⴅ','Ⴆ'=>'ⴆ','Ⴇ'=>'ⴇ','Ⴈ'=>'ⴈ','Ⴉ'=>'ⴉ','Ⴊ'=>'ⴊ','Ⴋ'=>'ⴋ','Ⴌ'=>'ⴌ','Ⴍ'=>'ⴍ','Ⴎ'=>'ⴎ','Ⴏ'=>'ⴏ','Ⴐ'=>'ⴐ','Ⴑ'=>'ⴑ','Ⴒ'=>'ⴒ','Ⴓ'=>'ⴓ','Ⴔ'=>'ⴔ','Ⴕ'=>'ⴕ','Ⴖ'=>'ⴖ','Ⴗ'=>'ⴗ','Ⴘ'=>'ⴘ','Ⴙ'=>'ⴙ','Ⴚ'=>'ⴚ','Ⴛ'=>'ⴛ','Ⴜ'=>'ⴜ','Ⴝ'=>'ⴝ','Ⴞ'=>'ⴞ','Ⴟ'=>'ⴟ','Ⴠ'=>'ⴠ','Ⴡ'=>'ⴡ','Ⴢ'=>'ⴢ','Ⴣ'=>'ⴣ','Ⴤ'=>'ⴤ','Ⴥ'=>'ⴥ','ა'=>'ა','ბ'=>'ბ','გ'=>'გ','დ'=>'დ','ე'=>'ე','ვ'=>'ვ','ზ'=>'ზ','თ'=>'თ','ი'=>'ი','კ'=>'კ','ლ'=>'ლ','მ'=>'მ','ნ'=>'ნ','ო'=>'ო','პ'=>'პ','ჟ'=>'ჟ','რ'=>'რ','ს'=>'ს','ტ'=>'ტ','უ'=>'უ','ფ'=>'ფ','ქ'=>'ქ','ღ'=>'ღ','ყ'=>'ყ','შ'=>'შ','ჩ'=>'ჩ','ც'=>'ც','ძ'=>'ძ','წ'=>'წ','ჭ'=>'ჭ','ხ'=>'ხ','ჯ'=>'ჯ','ჰ'=>'ჰ','ჱ'=>'ჱ','ჲ'=>'ჲ','ჳ'=>'ჳ','ჴ'=>'ჴ','ჵ'=>'ჵ','ჶ'=>'ჶ','ჷ'=>'ჷ','ჸ'=>'ჸ','ჹ'=>'ჹ','ჺ'=>'ჺ','ჼ'=>'ჼ','ᄀ'=>'ᄀ','ᄁ'=>'ᄁ','ᄂ'=>'ᄂ','ᄃ'=>'ᄃ','ᄄ'=>'ᄄ','ᄅ'=>'ᄅ','ᄆ'=>'ᄆ','ᄇ'=>'ᄇ','ᄈ'=>'ᄈ','ᄉ'=>'ᄉ','ᄊ'=>'ᄊ','ᄋ'=>'ᄋ','ᄌ'=>'ᄌ','ᄍ'=>'ᄍ','ᄎ'=>'ᄎ','ᄏ'=>'ᄏ','ᄐ'=>'ᄐ','ᄑ'=>'ᄑ','ᄒ'=>'ᄒ','ᄓ'=>'ᄓ','ᄔ'=>'ᄔ','ᄕ'=>'ᄕ','ᄖ'=>'ᄖ','ᄗ'=>'ᄗ','ᄘ'=>'ᄘ','ᄙ'=>'ᄙ','ᄚ'=>'ᄚ','ᄛ'=>'ᄛ','ᄜ'=>'ᄜ','ᄝ'=>'ᄝ','ᄞ'=>'ᄞ','ᄟ'=>'ᄟ','ᄠ'=>'ᄠ','ᄡ'=>'ᄡ','ᄢ'=>'ᄢ','ᄣ'=>'ᄣ','ᄤ'=>'ᄤ','ᄥ'=>'ᄥ','ᄦ'=>'ᄦ','ᄧ'=>'ᄧ','ᄨ'=>'ᄨ','ᄩ'=>'ᄩ','ᄪ'=>'ᄪ','ᄫ'=>'ᄫ','ᄬ'=>'ᄬ','ᄭ'=>'ᄭ','ᄮ'=>'ᄮ','ᄯ'=>'ᄯ','ᄰ'=>'ᄰ','ᄱ'=>'ᄱ','ᄲ'=>'ᄲ','ᄳ'=>'ᄳ','ᄴ'=>'ᄴ','ᄵ'=>'ᄵ','ᄶ'=>'ᄶ','ᄷ'=>'ᄷ','ᄸ'=>'ᄸ','ᄹ'=>'ᄹ','ᄺ'=>'ᄺ','ᄻ'=>'ᄻ','ᄼ'=>'ᄼ','ᄽ'=>'ᄽ','ᄾ'=>'ᄾ','ᄿ'=>'ᄿ','ᅀ'=>'ᅀ','ᅁ'=>'ᅁ','ᅂ'=>'ᅂ','ᅃ'=>'ᅃ','ᅄ'=>'ᅄ','ᅅ'=>'ᅅ','ᅆ'=>'ᅆ','ᅇ'=>'ᅇ','ᅈ'=>'ᅈ','ᅉ'=>'ᅉ','ᅊ'=>'ᅊ','ᅋ'=>'ᅋ','ᅌ'=>'ᅌ','ᅍ'=>'ᅍ','ᅎ'=>'ᅎ','ᅏ'=>'ᅏ','ᅐ'=>'ᅐ','ᅑ'=>'ᅑ','ᅒ'=>'ᅒ','ᅓ'=>'ᅓ','ᅔ'=>'ᅔ','ᅕ'=>'ᅕ','ᅖ'=>'ᅖ','ᅗ'=>'ᅗ','ᅘ'=>'ᅘ','ᅙ'=>'ᅙ','ᅟ'=>'ᅟ','ᅠ'=>'ᅠ','ᅡ'=>'ᅡ','ᅢ'=>'ᅢ','ᅣ'=>'ᅣ','ᅤ'=>'ᅤ','ᅥ'=>'ᅥ','ᅦ'=>'ᅦ','ᅧ'=>'ᅧ','ᅨ'=>'ᅨ','ᅩ'=>'ᅩ','ᅪ'=>'ᅪ','ᅫ'=>'ᅫ','ᅬ'=>'ᅬ','ᅭ'=>'ᅭ','ᅮ'=>'ᅮ','ᅯ'=>'ᅯ','ᅰ'=>'ᅰ','ᅱ'=>'ᅱ','ᅲ'=>'ᅲ','ᅳ'=>'ᅳ','ᅴ'=>'ᅴ','ᅵ'=>'ᅵ','ᅶ'=>'ᅶ','ᅷ'=>'ᅷ','ᅸ'=>'ᅸ','ᅹ'=>'ᅹ','ᅺ'=>'ᅺ','ᅻ'=>'ᅻ','ᅼ'=>'ᅼ','ᅽ'=>'ᅽ','ᅾ'=>'ᅾ','ᅿ'=>'ᅿ','ᆀ'=>'ᆀ','ᆁ'=>'ᆁ','ᆂ'=>'ᆂ','ᆃ'=>'ᆃ','ᆄ'=>'ᆄ','ᆅ'=>'ᆅ','ᆆ'=>'ᆆ','ᆇ'=>'ᆇ','ᆈ'=>'ᆈ','ᆉ'=>'ᆉ','ᆊ'=>'ᆊ','ᆋ'=>'ᆋ','ᆌ'=>'ᆌ','ᆍ'=>'ᆍ','ᆎ'=>'ᆎ','ᆏ'=>'ᆏ','ᆐ'=>'ᆐ','ᆑ'=>'ᆑ','ᆒ'=>'ᆒ','ᆓ'=>'ᆓ','ᆔ'=>'ᆔ','ᆕ'=>'ᆕ','ᆖ'=>'ᆖ','ᆗ'=>'ᆗ','ᆘ'=>'ᆘ','ᆙ'=>'ᆙ','ᆚ'=>'ᆚ','ᆛ'=>'ᆛ','ᆜ'=>'ᆜ','ᆝ'=>'ᆝ','ᆞ'=>'ᆞ','ᆟ'=>'ᆟ','ᆠ'=>'ᆠ','ᆡ'=>'ᆡ','ᆢ'=>'ᆢ','ᆨ'=>'ᆨ','ᆩ'=>'ᆩ','ᆪ'=>'ᆪ','ᆫ'=>'ᆫ','ᆬ'=>'ᆬ','ᆭ'=>'ᆭ','ᆮ'=>'ᆮ','ᆯ'=>'ᆯ','ᆰ'=>'ᆰ','ᆱ'=>'ᆱ','ᆲ'=>'ᆲ','ᆳ'=>'ᆳ','ᆴ'=>'ᆴ','ᆵ'=>'ᆵ','ᆶ'=>'ᆶ','ᆷ'=>'ᆷ','ᆸ'=>'ᆸ','ᆹ'=>'ᆹ','ᆺ'=>'ᆺ','ᆻ'=>'ᆻ','ᆼ'=>'ᆼ','ᆽ'=>'ᆽ','ᆾ'=>'ᆾ','ᆿ'=>'ᆿ','ᇀ'=>'ᇀ','ᇁ'=>'ᇁ','ᇂ'=>'ᇂ','ᇃ'=>'ᇃ','ᇄ'=>'ᇄ','ᇅ'=>'ᇅ','ᇆ'=>'ᇆ','ᇇ'=>'ᇇ','ᇈ'=>'ᇈ','ᇉ'=>'ᇉ','ᇊ'=>'ᇊ','ᇋ'=>'ᇋ','ᇌ'=>'ᇌ','ᇍ'=>'ᇍ','ᇎ'=>'ᇎ','ᇏ'=>'ᇏ','ᇐ'=>'ᇐ','ᇑ'=>'ᇑ','ᇒ'=>'ᇒ','ᇓ'=>'ᇓ','ᇔ'=>'ᇔ','ᇕ'=>'ᇕ','ᇖ'=>'ᇖ','ᇗ'=>'ᇗ','ᇘ'=>'ᇘ','ᇙ'=>'ᇙ','ᇚ'=>'ᇚ','ᇛ'=>'ᇛ','ᇜ'=>'ᇜ','ᇝ'=>'ᇝ','ᇞ'=>'ᇞ','ᇟ'=>'ᇟ','ᇠ'=>'ᇠ','ᇡ'=>'ᇡ','ᇢ'=>'ᇢ','ᇣ'=>'ᇣ','ᇤ'=>'ᇤ','ᇥ'=>'ᇥ','ᇦ'=>'ᇦ','ᇧ'=>'ᇧ','ᇨ'=>'ᇨ','ᇩ'=>'ᇩ','ᇪ'=>'ᇪ','ᇫ'=>'ᇫ','ᇬ'=>'ᇬ','ᇭ'=>'ᇭ','ᇮ'=>'ᇮ','ᇯ'=>'ᇯ','ᇰ'=>'ᇰ','ᇱ'=>'ᇱ','ᇲ'=>'ᇲ','ᇳ'=>'ᇳ','ᇴ'=>'ᇴ','ᇵ'=>'ᇵ','ᇶ'=>'ᇶ','ᇷ'=>'ᇷ','ᇸ'=>'ᇸ','ᇹ'=>'ᇹ','ሀ'=>'ሀ','ሁ'=>'ሁ','ሂ'=>'ሂ','ሃ'=>'ሃ','ሄ'=>'ሄ','ህ'=>'ህ','ሆ'=>'ሆ','ሇ'=>'ሇ','ለ'=>'ለ','ሉ'=>'ሉ','ሊ'=>'ሊ','ላ'=>'ላ','ሌ'=>'ሌ','ል'=>'ል','ሎ'=>'ሎ','ሏ'=>'ሏ','ሐ'=>'ሐ','ሑ'=>'ሑ','ሒ'=>'ሒ','ሓ'=>'ሓ','ሔ'=>'ሔ','ሕ'=>'ሕ','ሖ'=>'ሖ','ሗ'=>'ሗ','መ'=>'መ','ሙ'=>'ሙ','ሚ'=>'ሚ','ማ'=>'ማ','ሜ'=>'ሜ','ም'=>'ም','ሞ'=>'ሞ','ሟ'=>'ሟ','ሠ'=>'ሠ','ሡ'=>'ሡ','ሢ'=>'ሢ','ሣ'=>'ሣ','ሤ'=>'ሤ','ሥ'=>'ሥ','ሦ'=>'ሦ','ሧ'=>'ሧ','ረ'=>'ረ','ሩ'=>'ሩ','ሪ'=>'ሪ','ራ'=>'ራ','ሬ'=>'ሬ','ር'=>'ር','ሮ'=>'ሮ','ሯ'=>'ሯ','ሰ'=>'ሰ','ሱ'=>'ሱ','ሲ'=>'ሲ','ሳ'=>'ሳ','ሴ'=>'ሴ','ስ'=>'ስ','ሶ'=>'ሶ','ሷ'=>'ሷ','ሸ'=>'ሸ','ሹ'=>'ሹ','ሺ'=>'ሺ','ሻ'=>'ሻ','ሼ'=>'ሼ','ሽ'=>'ሽ','ሾ'=>'ሾ','ሿ'=>'ሿ','ቀ'=>'ቀ','ቁ'=>'ቁ','ቂ'=>'ቂ','ቃ'=>'ቃ','ቄ'=>'ቄ','ቅ'=>'ቅ','ቆ'=>'ቆ','ቇ'=>'ቇ','ቈ'=>'ቈ','ቊ'=>'ቊ','ቋ'=>'ቋ','ቌ'=>'ቌ','ቍ'=>'ቍ','ቐ'=>'ቐ','ቑ'=>'ቑ','ቒ'=>'ቒ','ቓ'=>'ቓ','ቔ'=>'ቔ','ቕ'=>'ቕ','ቖ'=>'ቖ','ቘ'=>'ቘ','ቚ'=>'ቚ','ቛ'=>'ቛ','ቜ'=>'ቜ','ቝ'=>'ቝ','በ'=>'በ','ቡ'=>'ቡ','ቢ'=>'ቢ','ባ'=>'ባ','ቤ'=>'ቤ','ብ'=>'ብ','ቦ'=>'ቦ','ቧ'=>'ቧ','ቨ'=>'ቨ','ቩ'=>'ቩ','ቪ'=>'ቪ','ቫ'=>'ቫ','ቬ'=>'ቬ','ቭ'=>'ቭ','ቮ'=>'ቮ','ቯ'=>'ቯ','ተ'=>'ተ','ቱ'=>'ቱ','ቲ'=>'ቲ','ታ'=>'ታ','ቴ'=>'ቴ','ት'=>'ት','ቶ'=>'ቶ','ቷ'=>'ቷ','ቸ'=>'ቸ','ቹ'=>'ቹ','ቺ'=>'ቺ','ቻ'=>'ቻ','ቼ'=>'ቼ','ች'=>'ች','ቾ'=>'ቾ','ቿ'=>'ቿ','ኀ'=>'ኀ','ኁ'=>'ኁ','ኂ'=>'ኂ','ኃ'=>'ኃ','ኄ'=>'ኄ','ኅ'=>'ኅ','ኆ'=>'ኆ','ኇ'=>'ኇ','ኈ'=>'ኈ','ኊ'=>'ኊ','ኋ'=>'ኋ','ኌ'=>'ኌ','ኍ'=>'ኍ','ነ'=>'ነ','ኑ'=>'ኑ','ኒ'=>'ኒ','ና'=>'ና','ኔ'=>'ኔ','ን'=>'ን','ኖ'=>'ኖ','ኗ'=>'ኗ','ኘ'=>'ኘ','ኙ'=>'ኙ','ኚ'=>'ኚ','ኛ'=>'ኛ','ኜ'=>'ኜ','ኝ'=>'ኝ','ኞ'=>'ኞ','ኟ'=>'ኟ','አ'=>'አ','ኡ'=>'ኡ','ኢ'=>'ኢ','ኣ'=>'ኣ','ኤ'=>'ኤ','እ'=>'እ','ኦ'=>'ኦ','ኧ'=>'ኧ','ከ'=>'ከ','ኩ'=>'ኩ','ኪ'=>'ኪ','ካ'=>'ካ','ኬ'=>'ኬ','ክ'=>'ክ','ኮ'=>'ኮ','ኯ'=>'ኯ','ኰ'=>'ኰ','ኲ'=>'ኲ','ኳ'=>'ኳ','ኴ'=>'ኴ','ኵ'=>'ኵ','ኸ'=>'ኸ','ኹ'=>'ኹ','ኺ'=>'ኺ','ኻ'=>'ኻ','ኼ'=>'ኼ','ኽ'=>'ኽ','ኾ'=>'ኾ','ዀ'=>'ዀ','ዂ'=>'ዂ','ዃ'=>'ዃ','ዄ'=>'ዄ','ዅ'=>'ዅ','ወ'=>'ወ','ዉ'=>'ዉ','ዊ'=>'ዊ','ዋ'=>'ዋ','ዌ'=>'ዌ','ው'=>'ው','ዎ'=>'ዎ','ዏ'=>'ዏ','ዐ'=>'ዐ','ዑ'=>'ዑ','ዒ'=>'ዒ','ዓ'=>'ዓ','ዔ'=>'ዔ','ዕ'=>'ዕ','ዖ'=>'ዖ','ዘ'=>'ዘ','ዙ'=>'ዙ','ዚ'=>'ዚ','ዛ'=>'ዛ','ዜ'=>'ዜ','ዝ'=>'ዝ','ዞ'=>'ዞ','ዟ'=>'ዟ','ዠ'=>'ዠ','ዡ'=>'ዡ','ዢ'=>'ዢ','ዣ'=>'ዣ','ዤ'=>'ዤ','ዥ'=>'ዥ','ዦ'=>'ዦ','ዧ'=>'ዧ','የ'=>'የ','ዩ'=>'ዩ','ዪ'=>'ዪ','ያ'=>'ያ','ዬ'=>'ዬ','ይ'=>'ይ','ዮ'=>'ዮ','ዯ'=>'ዯ','ደ'=>'ደ','ዱ'=>'ዱ','ዲ'=>'ዲ','ዳ'=>'ዳ','ዴ'=>'ዴ','ድ'=>'ድ','ዶ'=>'ዶ','ዷ'=>'ዷ','ዸ'=>'ዸ','ዹ'=>'ዹ','ዺ'=>'ዺ','ዻ'=>'ዻ','ዼ'=>'ዼ','ዽ'=>'ዽ','ዾ'=>'ዾ','ዿ'=>'ዿ','ጀ'=>'ጀ','ጁ'=>'ጁ','ጂ'=>'ጂ','ጃ'=>'ጃ','ጄ'=>'ጄ','ጅ'=>'ጅ','ጆ'=>'ጆ','ጇ'=>'ጇ','ገ'=>'ገ','ጉ'=>'ጉ','ጊ'=>'ጊ','ጋ'=>'ጋ','ጌ'=>'ጌ','ግ'=>'ግ','ጎ'=>'ጎ','ጏ'=>'ጏ','ጐ'=>'ጐ','ጒ'=>'ጒ','ጓ'=>'ጓ','ጔ'=>'ጔ','ጕ'=>'ጕ','ጘ'=>'ጘ','ጙ'=>'ጙ','ጚ'=>'ጚ','ጛ'=>'ጛ','ጜ'=>'ጜ','ጝ'=>'ጝ','ጞ'=>'ጞ','ጟ'=>'ጟ','ጠ'=>'ጠ','ጡ'=>'ጡ','ጢ'=>'ጢ','ጣ'=>'ጣ','ጤ'=>'ጤ','ጥ'=>'ጥ','ጦ'=>'ጦ','ጧ'=>'ጧ','ጨ'=>'ጨ','ጩ'=>'ጩ','ጪ'=>'ጪ','ጫ'=>'ጫ','ጬ'=>'ጬ','ጭ'=>'ጭ','ጮ'=>'ጮ','ጯ'=>'ጯ','ጰ'=>'ጰ','ጱ'=>'ጱ','ጲ'=>'ጲ','ጳ'=>'ጳ','ጴ'=>'ጴ','ጵ'=>'ጵ','ጶ'=>'ጶ','ጷ'=>'ጷ','ጸ'=>'ጸ','ጹ'=>'ጹ','ጺ'=>'ጺ','ጻ'=>'ጻ','ጼ'=>'ጼ','ጽ'=>'ጽ','ጾ'=>'ጾ','ጿ'=>'ጿ','ፀ'=>'ፀ','ፁ'=>'ፁ','ፂ'=>'ፂ','ፃ'=>'ፃ','ፄ'=>'ፄ','ፅ'=>'ፅ','ፆ'=>'ፆ','ፇ'=>'ፇ','ፈ'=>'ፈ','ፉ'=>'ፉ','ፊ'=>'ፊ','ፋ'=>'ፋ','ፌ'=>'ፌ','ፍ'=>'ፍ','ፎ'=>'ፎ','ፏ'=>'ፏ','ፐ'=>'ፐ','ፑ'=>'ፑ','ፒ'=>'ፒ','ፓ'=>'ፓ','ፔ'=>'ፔ','ፕ'=>'ፕ','ፖ'=>'ፖ','ፗ'=>'ፗ','ፘ'=>'ፘ','ፙ'=>'ፙ','ፚ'=>'ፚ','፟'=>'፟','፩'=>'1','፪'=>'2','፫'=>'3','፬'=>'4','፭'=>'5','፮'=>'6','፯'=>'7','፰'=>'8','፱'=>'9','፲'=>'10','፳'=>'20','፴'=>'30','፵'=>'40','፶'=>'50','፷'=>'60','፸'=>'70','፹'=>'80','፺'=>'90','፻'=>'100','፼'=>'10000','ᎀ'=>'ᎀ','ᎁ'=>'ᎁ','ᎂ'=>'ᎂ','ᎃ'=>'ᎃ','ᎄ'=>'ᎄ','ᎅ'=>'ᎅ','ᎆ'=>'ᎆ','ᎇ'=>'ᎇ','ᎈ'=>'ᎈ','ᎉ'=>'ᎉ','ᎊ'=>'ᎊ','ᎋ'=>'ᎋ','ᎌ'=>'ᎌ','ᎍ'=>'ᎍ','ᎎ'=>'ᎎ','ᎏ'=>'ᎏ','Ꭰ'=>'Ꭰ','Ꭱ'=>'Ꭱ','Ꭲ'=>'Ꭲ','Ꭳ'=>'Ꭳ','Ꭴ'=>'Ꭴ','Ꭵ'=>'Ꭵ','Ꭶ'=>'Ꭶ','Ꭷ'=>'Ꭷ','Ꭸ'=>'Ꭸ','Ꭹ'=>'Ꭹ','Ꭺ'=>'Ꭺ','Ꭻ'=>'Ꭻ','Ꭼ'=>'Ꭼ','Ꭽ'=>'Ꭽ','Ꭾ'=>'Ꭾ','Ꭿ'=>'Ꭿ','Ꮀ'=>'Ꮀ','Ꮁ'=>'Ꮁ','Ꮂ'=>'Ꮂ','Ꮃ'=>'Ꮃ','Ꮄ'=>'Ꮄ','Ꮅ'=>'Ꮅ','Ꮆ'=>'Ꮆ','Ꮇ'=>'Ꮇ','Ꮈ'=>'Ꮈ','Ꮉ'=>'Ꮉ','Ꮊ'=>'Ꮊ','Ꮋ'=>'Ꮋ','Ꮌ'=>'Ꮌ','Ꮍ'=>'Ꮍ','Ꮎ'=>'Ꮎ','Ꮏ'=>'Ꮏ','Ꮐ'=>'Ꮐ','Ꮑ'=>'Ꮑ','Ꮒ'=>'Ꮒ','Ꮓ'=>'Ꮓ','Ꮔ'=>'Ꮔ','Ꮕ'=>'Ꮕ','Ꮖ'=>'Ꮖ','Ꮗ'=>'Ꮗ','Ꮘ'=>'Ꮘ','Ꮙ'=>'Ꮙ','Ꮚ'=>'Ꮚ','Ꮛ'=>'Ꮛ','Ꮜ'=>'Ꮜ','Ꮝ'=>'Ꮝ','Ꮞ'=>'Ꮞ','Ꮟ'=>'Ꮟ','Ꮠ'=>'Ꮠ','Ꮡ'=>'Ꮡ','Ꮢ'=>'Ꮢ','Ꮣ'=>'Ꮣ','Ꮤ'=>'Ꮤ','Ꮥ'=>'Ꮥ','Ꮦ'=>'Ꮦ','Ꮧ'=>'Ꮧ','Ꮨ'=>'Ꮨ','Ꮩ'=>'Ꮩ','Ꮪ'=>'Ꮪ','Ꮫ'=>'Ꮫ','Ꮬ'=>'Ꮬ','Ꮭ'=>'Ꮭ','Ꮮ'=>'Ꮮ','Ꮯ'=>'Ꮯ','Ꮰ'=>'Ꮰ','Ꮱ'=>'Ꮱ','Ꮲ'=>'Ꮲ','Ꮳ'=>'Ꮳ','Ꮴ'=>'Ꮴ','Ꮵ'=>'Ꮵ','Ꮶ'=>'Ꮶ','Ꮷ'=>'Ꮷ','Ꮸ'=>'Ꮸ','Ꮹ'=>'Ꮹ','Ꮺ'=>'Ꮺ','Ꮻ'=>'Ꮻ','Ꮼ'=>'Ꮼ','Ꮽ'=>'Ꮽ','Ꮾ'=>'Ꮾ','Ꮿ'=>'Ꮿ','Ᏸ'=>'Ᏸ','Ᏹ'=>'Ᏹ','Ᏺ'=>'Ᏺ','Ᏻ'=>'Ᏻ','Ᏼ'=>'Ᏼ','ᐁ'=>'ᐁ','ᐂ'=>'ᐂ','ᐃ'=>'ᐃ','ᐄ'=>'ᐄ','ᐅ'=>'ᐅ','ᐆ'=>'ᐆ','ᐇ'=>'ᐇ','ᐈ'=>'ᐈ','ᐉ'=>'ᐉ','ᐊ'=>'ᐊ','ᐋ'=>'ᐋ','ᐌ'=>'ᐌ','ᐍ'=>'ᐍ','ᐎ'=>'ᐎ','ᐏ'=>'ᐏ','ᐐ'=>'ᐐ','ᐑ'=>'ᐑ','ᐒ'=>'ᐒ','ᐓ'=>'ᐓ','ᐔ'=>'ᐔ','ᐕ'=>'ᐕ','ᐖ'=>'ᐖ','ᐗ'=>'ᐗ','ᐘ'=>'ᐘ','ᐙ'=>'ᐙ','ᐚ'=>'ᐚ','ᐛ'=>'ᐛ','ᐜ'=>'ᐜ','ᐝ'=>'ᐝ','ᐞ'=>'ᐞ','ᐟ'=>'ᐟ','ᐠ'=>'ᐠ','ᐡ'=>'ᐡ','ᐢ'=>'ᐢ','ᐣ'=>'ᐣ','ᐤ'=>'ᐤ','ᐥ'=>'ᐥ','ᐦ'=>'ᐦ','ᐧ'=>'ᐧ','ᐨ'=>'ᐨ','ᐩ'=>'ᐩ','ᐪ'=>'ᐪ','ᐫ'=>'ᐫ','ᐬ'=>'ᐬ','ᐭ'=>'ᐭ','ᐮ'=>'ᐮ','ᐯ'=>'ᐯ','ᐰ'=>'ᐰ','ᐱ'=>'ᐱ','ᐲ'=>'ᐲ','ᐳ'=>'ᐳ','ᐴ'=>'ᐴ','ᐵ'=>'ᐵ','ᐶ'=>'ᐶ','ᐷ'=>'ᐷ','ᐸ'=>'ᐸ','ᐹ'=>'ᐹ','ᐺ'=>'ᐺ','ᐻ'=>'ᐻ','ᐼ'=>'ᐼ','ᐽ'=>'ᐽ','ᐾ'=>'ᐾ','ᐿ'=>'ᐿ','ᑀ'=>'ᑀ','ᑁ'=>'ᑁ','ᑂ'=>'ᑂ','ᑃ'=>'ᑃ','ᑄ'=>'ᑄ','ᑅ'=>'ᑅ','ᑆ'=>'ᑆ','ᑇ'=>'ᑇ','ᑈ'=>'ᑈ','ᑉ'=>'ᑉ','ᑊ'=>'ᑊ','ᑋ'=>'ᑋ','ᑌ'=>'ᑌ','ᑍ'=>'ᑍ','ᑎ'=>'ᑎ','ᑏ'=>'ᑏ','ᑐ'=>'ᑐ','ᑑ'=>'ᑑ','ᑒ'=>'ᑒ','ᑓ'=>'ᑓ','ᑔ'=>'ᑔ','ᑕ'=>'ᑕ','ᑖ'=>'ᑖ','ᑗ'=>'ᑗ','ᑘ'=>'ᑘ','ᑙ'=>'ᑙ','ᑚ'=>'ᑚ','ᑛ'=>'ᑛ','ᑜ'=>'ᑜ','ᑝ'=>'ᑝ','ᑞ'=>'ᑞ','ᑟ'=>'ᑟ','ᑠ'=>'ᑠ','ᑡ'=>'ᑡ','ᑢ'=>'ᑢ','ᑣ'=>'ᑣ','ᑤ'=>'ᑤ','ᑥ'=>'ᑥ','ᑦ'=>'ᑦ','ᑧ'=>'ᑧ','ᑨ'=>'ᑨ','ᑩ'=>'ᑩ','ᑪ'=>'ᑪ','ᑫ'=>'ᑫ','ᑬ'=>'ᑬ','ᑭ'=>'ᑭ','ᑮ'=>'ᑮ','ᑯ'=>'ᑯ','ᑰ'=>'ᑰ','ᑱ'=>'ᑱ','ᑲ'=>'ᑲ','ᑳ'=>'ᑳ','ᑴ'=>'ᑴ','ᑵ'=>'ᑵ','ᑶ'=>'ᑶ','ᑷ'=>'ᑷ','ᑸ'=>'ᑸ','ᑹ'=>'ᑹ','ᑺ'=>'ᑺ','ᑻ'=>'ᑻ','ᑼ'=>'ᑼ','ᑽ'=>'ᑽ','ᑾ'=>'ᑾ','ᑿ'=>'ᑿ','ᒀ'=>'ᒀ','ᒁ'=>'ᒁ','ᒂ'=>'ᒂ','ᒃ'=>'ᒃ','ᒄ'=>'ᒄ','ᒅ'=>'ᒅ','ᒆ'=>'ᒆ','ᒇ'=>'ᒇ','ᒈ'=>'ᒈ','ᒉ'=>'ᒉ','ᒊ'=>'ᒊ','ᒋ'=>'ᒋ','ᒌ'=>'ᒌ','ᒍ'=>'ᒍ','ᒎ'=>'ᒎ','ᒏ'=>'ᒏ','ᒐ'=>'ᒐ','ᒑ'=>'ᒑ','ᒒ'=>'ᒒ','ᒓ'=>'ᒓ','ᒔ'=>'ᒔ','ᒕ'=>'ᒕ','ᒖ'=>'ᒖ','ᒗ'=>'ᒗ','ᒘ'=>'ᒘ','ᒙ'=>'ᒙ','ᒚ'=>'ᒚ','ᒛ'=>'ᒛ','ᒜ'=>'ᒜ','ᒝ'=>'ᒝ','ᒞ'=>'ᒞ','ᒟ'=>'ᒟ','ᒠ'=>'ᒠ','ᒡ'=>'ᒡ','ᒢ'=>'ᒢ','ᒣ'=>'ᒣ','ᒤ'=>'ᒤ','ᒥ'=>'ᒥ','ᒦ'=>'ᒦ','ᒧ'=>'ᒧ','ᒨ'=>'ᒨ','ᒩ'=>'ᒩ','ᒪ'=>'ᒪ','ᒫ'=>'ᒫ','ᒬ'=>'ᒬ','ᒭ'=>'ᒭ','ᒮ'=>'ᒮ','ᒯ'=>'ᒯ','ᒰ'=>'ᒰ','ᒱ'=>'ᒱ','ᒲ'=>'ᒲ','ᒳ'=>'ᒳ','ᒴ'=>'ᒴ','ᒵ'=>'ᒵ','ᒶ'=>'ᒶ','ᒷ'=>'ᒷ','ᒸ'=>'ᒸ','ᒹ'=>'ᒹ','ᒺ'=>'ᒺ','ᒻ'=>'ᒻ','ᒼ'=>'ᒼ','ᒽ'=>'ᒽ','ᒾ'=>'ᒾ','ᒿ'=>'ᒿ','ᓀ'=>'ᓀ','ᓁ'=>'ᓁ','ᓂ'=>'ᓂ','ᓃ'=>'ᓃ','ᓄ'=>'ᓄ','ᓅ'=>'ᓅ','ᓆ'=>'ᓆ','ᓇ'=>'ᓇ','ᓈ'=>'ᓈ','ᓉ'=>'ᓉ','ᓊ'=>'ᓊ','ᓋ'=>'ᓋ','ᓌ'=>'ᓌ','ᓍ'=>'ᓍ','ᓎ'=>'ᓎ','ᓏ'=>'ᓏ','ᓐ'=>'ᓐ','ᓑ'=>'ᓑ','ᓒ'=>'ᓒ','ᓓ'=>'ᓓ','ᓔ'=>'ᓔ','ᓕ'=>'ᓕ','ᓖ'=>'ᓖ','ᓗ'=>'ᓗ','ᓘ'=>'ᓘ','ᓙ'=>'ᓙ','ᓚ'=>'ᓚ','ᓛ'=>'ᓛ','ᓜ'=>'ᓜ','ᓝ'=>'ᓝ','ᓞ'=>'ᓞ','ᓟ'=>'ᓟ','ᓠ'=>'ᓠ','ᓡ'=>'ᓡ','ᓢ'=>'ᓢ','ᓣ'=>'ᓣ','ᓤ'=>'ᓤ','ᓥ'=>'ᓥ','ᓦ'=>'ᓦ','ᓧ'=>'ᓧ','ᓨ'=>'ᓨ','ᓩ'=>'ᓩ','ᓪ'=>'ᓪ','ᓫ'=>'ᓫ','ᓬ'=>'ᓬ','ᓭ'=>'ᓭ','ᓮ'=>'ᓮ','ᓯ'=>'ᓯ','ᓰ'=>'ᓰ','ᓱ'=>'ᓱ','ᓲ'=>'ᓲ','ᓳ'=>'ᓳ','ᓴ'=>'ᓴ','ᓵ'=>'ᓵ','ᓶ'=>'ᓶ','ᓷ'=>'ᓷ','ᓸ'=>'ᓸ','ᓹ'=>'ᓹ','ᓺ'=>'ᓺ','ᓻ'=>'ᓻ','ᓼ'=>'ᓼ','ᓽ'=>'ᓽ','ᓾ'=>'ᓾ','ᓿ'=>'ᓿ','ᔀ'=>'ᔀ','ᔁ'=>'ᔁ','ᔂ'=>'ᔂ','ᔃ'=>'ᔃ','ᔄ'=>'ᔄ','ᔅ'=>'ᔅ','ᔆ'=>'ᔆ','ᔇ'=>'ᔇ','ᔈ'=>'ᔈ','ᔉ'=>'ᔉ','ᔊ'=>'ᔊ','ᔋ'=>'ᔋ','ᔌ'=>'ᔌ','ᔍ'=>'ᔍ','ᔎ'=>'ᔎ','ᔏ'=>'ᔏ','ᔐ'=>'ᔐ','ᔑ'=>'ᔑ','ᔒ'=>'ᔒ','ᔓ'=>'ᔓ','ᔔ'=>'ᔔ','ᔕ'=>'ᔕ','ᔖ'=>'ᔖ','ᔗ'=>'ᔗ','ᔘ'=>'ᔘ','ᔙ'=>'ᔙ','ᔚ'=>'ᔚ','ᔛ'=>'ᔛ','ᔜ'=>'ᔜ','ᔝ'=>'ᔝ','ᔞ'=>'ᔞ','ᔟ'=>'ᔟ','ᔠ'=>'ᔠ','ᔡ'=>'ᔡ','ᔢ'=>'ᔢ','ᔣ'=>'ᔣ','ᔤ'=>'ᔤ','ᔥ'=>'ᔥ','ᔦ'=>'ᔦ','ᔧ'=>'ᔧ','ᔨ'=>'ᔨ','ᔩ'=>'ᔩ','ᔪ'=>'ᔪ','ᔫ'=>'ᔫ','ᔬ'=>'ᔬ','ᔭ'=>'ᔭ','ᔮ'=>'ᔮ','ᔯ'=>'ᔯ','ᔰ'=>'ᔰ','ᔱ'=>'ᔱ','ᔲ'=>'ᔲ','ᔳ'=>'ᔳ','ᔴ'=>'ᔴ','ᔵ'=>'ᔵ','ᔶ'=>'ᔶ','ᔷ'=>'ᔷ','ᔸ'=>'ᔸ','ᔹ'=>'ᔹ','ᔺ'=>'ᔺ','ᔻ'=>'ᔻ','ᔼ'=>'ᔼ','ᔽ'=>'ᔽ','ᔾ'=>'ᔾ','ᔿ'=>'ᔿ','ᕀ'=>'ᕀ','ᕁ'=>'ᕁ','ᕂ'=>'ᕂ','ᕃ'=>'ᕃ','ᕄ'=>'ᕄ','ᕅ'=>'ᕅ','ᕆ'=>'ᕆ','ᕇ'=>'ᕇ','ᕈ'=>'ᕈ','ᕉ'=>'ᕉ','ᕊ'=>'ᕊ','ᕋ'=>'ᕋ','ᕌ'=>'ᕌ','ᕍ'=>'ᕍ','ᕎ'=>'ᕎ','ᕏ'=>'ᕏ','ᕐ'=>'ᕐ','ᕑ'=>'ᕑ','ᕒ'=>'ᕒ','ᕓ'=>'ᕓ','ᕔ'=>'ᕔ','ᕕ'=>'ᕕ','ᕖ'=>'ᕖ','ᕗ'=>'ᕗ','ᕘ'=>'ᕘ','ᕙ'=>'ᕙ','ᕚ'=>'ᕚ','ᕛ'=>'ᕛ','ᕜ'=>'ᕜ','ᕝ'=>'ᕝ','ᕞ'=>'ᕞ','ᕟ'=>'ᕟ','ᕠ'=>'ᕠ','ᕡ'=>'ᕡ','ᕢ'=>'ᕢ','ᕣ'=>'ᕣ','ᕤ'=>'ᕤ','ᕥ'=>'ᕥ','ᕦ'=>'ᕦ','ᕧ'=>'ᕧ','ᕨ'=>'ᕨ','ᕩ'=>'ᕩ','ᕪ'=>'ᕪ','ᕫ'=>'ᕫ','ᕬ'=>'ᕬ','ᕭ'=>'ᕭ','ᕮ'=>'ᕮ','ᕯ'=>'ᕯ','ᕰ'=>'ᕰ','ᕱ'=>'ᕱ','ᕲ'=>'ᕲ','ᕳ'=>'ᕳ','ᕴ'=>'ᕴ','ᕵ'=>'ᕵ','ᕶ'=>'ᕶ','ᕷ'=>'ᕷ','ᕸ'=>'ᕸ','ᕹ'=>'ᕹ','ᕺ'=>'ᕺ','ᕻ'=>'ᕻ','ᕼ'=>'ᕼ','ᕽ'=>'ᕽ','ᕾ'=>'ᕾ','ᕿ'=>'ᕿ','ᖀ'=>'ᖀ','ᖁ'=>'ᖁ','ᖂ'=>'ᖂ','ᖃ'=>'ᖃ','ᖄ'=>'ᖄ','ᖅ'=>'ᖅ','ᖆ'=>'ᖆ','ᖇ'=>'ᖇ','ᖈ'=>'ᖈ','ᖉ'=>'ᖉ','ᖊ'=>'ᖊ','ᖋ'=>'ᖋ','ᖌ'=>'ᖌ','ᖍ'=>'ᖍ','ᖎ'=>'ᖎ','ᖏ'=>'ᖏ','ᖐ'=>'ᖐ','ᖑ'=>'ᖑ','ᖒ'=>'ᖒ','ᖓ'=>'ᖓ','ᖔ'=>'ᖔ','ᖕ'=>'ᖕ','ᖖ'=>'ᖖ','ᖗ'=>'ᖗ','ᖘ'=>'ᖘ','ᖙ'=>'ᖙ','ᖚ'=>'ᖚ','ᖛ'=>'ᖛ','ᖜ'=>'ᖜ','ᖝ'=>'ᖝ','ᖞ'=>'ᖞ','ᖟ'=>'ᖟ','ᖠ'=>'ᖠ','ᖡ'=>'ᖡ','ᖢ'=>'ᖢ','ᖣ'=>'ᖣ','ᖤ'=>'ᖤ','ᖥ'=>'ᖥ','ᖦ'=>'ᖦ','ᖧ'=>'ᖧ','ᖨ'=>'ᖨ','ᖩ'=>'ᖩ','ᖪ'=>'ᖪ','ᖫ'=>'ᖫ','ᖬ'=>'ᖬ','ᖭ'=>'ᖭ','ᖮ'=>'ᖮ','ᖯ'=>'ᖯ','ᖰ'=>'ᖰ','ᖱ'=>'ᖱ','ᖲ'=>'ᖲ','ᖳ'=>'ᖳ','ᖴ'=>'ᖴ','ᖵ'=>'ᖵ','ᖶ'=>'ᖶ','ᖷ'=>'ᖷ','ᖸ'=>'ᖸ','ᖹ'=>'ᖹ','ᖺ'=>'ᖺ','ᖻ'=>'ᖻ','ᖼ'=>'ᖼ','ᖽ'=>'ᖽ','ᖾ'=>'ᖾ','ᖿ'=>'ᖿ','ᗀ'=>'ᗀ','ᗁ'=>'ᗁ','ᗂ'=>'ᗂ','ᗃ'=>'ᗃ','ᗄ'=>'ᗄ','ᗅ'=>'ᗅ','ᗆ'=>'ᗆ','ᗇ'=>'ᗇ','ᗈ'=>'ᗈ','ᗉ'=>'ᗉ','ᗊ'=>'ᗊ','ᗋ'=>'ᗋ','ᗌ'=>'ᗌ','ᗍ'=>'ᗍ','ᗎ'=>'ᗎ','ᗏ'=>'ᗏ','ᗐ'=>'ᗐ','ᗑ'=>'ᗑ','ᗒ'=>'ᗒ','ᗓ'=>'ᗓ','ᗔ'=>'ᗔ','ᗕ'=>'ᗕ','ᗖ'=>'ᗖ','ᗗ'=>'ᗗ','ᗘ'=>'ᗘ','ᗙ'=>'ᗙ','ᗚ'=>'ᗚ','ᗛ'=>'ᗛ','ᗜ'=>'ᗜ','ᗝ'=>'ᗝ','ᗞ'=>'ᗞ','ᗟ'=>'ᗟ','ᗠ'=>'ᗠ','ᗡ'=>'ᗡ','ᗢ'=>'ᗢ','ᗣ'=>'ᗣ','ᗤ'=>'ᗤ','ᗥ'=>'ᗥ','ᗦ'=>'ᗦ','ᗧ'=>'ᗧ','ᗨ'=>'ᗨ','ᗩ'=>'ᗩ','ᗪ'=>'ᗪ','ᗫ'=>'ᗫ','ᗬ'=>'ᗬ','ᗭ'=>'ᗭ','ᗮ'=>'ᗮ','ᗯ'=>'ᗯ','ᗰ'=>'ᗰ','ᗱ'=>'ᗱ','ᗲ'=>'ᗲ','ᗳ'=>'ᗳ','ᗴ'=>'ᗴ','ᗵ'=>'ᗵ','ᗶ'=>'ᗶ','ᗷ'=>'ᗷ','ᗸ'=>'ᗸ','ᗹ'=>'ᗹ','ᗺ'=>'ᗺ','ᗻ'=>'ᗻ','ᗼ'=>'ᗼ','ᗽ'=>'ᗽ','ᗾ'=>'ᗾ','ᗿ'=>'ᗿ','ᘀ'=>'ᘀ','ᘁ'=>'ᘁ','ᘂ'=>'ᘂ','ᘃ'=>'ᘃ','ᘄ'=>'ᘄ','ᘅ'=>'ᘅ','ᘆ'=>'ᘆ','ᘇ'=>'ᘇ','ᘈ'=>'ᘈ','ᘉ'=>'ᘉ','ᘊ'=>'ᘊ','ᘋ'=>'ᘋ','ᘌ'=>'ᘌ','ᘍ'=>'ᘍ','ᘎ'=>'ᘎ','ᘏ'=>'ᘏ','ᘐ'=>'ᘐ','ᘑ'=>'ᘑ','ᘒ'=>'ᘒ','ᘓ'=>'ᘓ','ᘔ'=>'ᘔ','ᘕ'=>'ᘕ','ᘖ'=>'ᘖ','ᘗ'=>'ᘗ','ᘘ'=>'ᘘ','ᘙ'=>'ᘙ','ᘚ'=>'ᘚ','ᘛ'=>'ᘛ','ᘜ'=>'ᘜ','ᘝ'=>'ᘝ','ᘞ'=>'ᘞ','ᘟ'=>'ᘟ','ᘠ'=>'ᘠ','ᘡ'=>'ᘡ','ᘢ'=>'ᘢ','ᘣ'=>'ᘣ','ᘤ'=>'ᘤ','ᘥ'=>'ᘥ','ᘦ'=>'ᘦ','ᘧ'=>'ᘧ','ᘨ'=>'ᘨ','ᘩ'=>'ᘩ','ᘪ'=>'ᘪ','ᘫ'=>'ᘫ','ᘬ'=>'ᘬ','ᘭ'=>'ᘭ','ᘮ'=>'ᘮ','ᘯ'=>'ᘯ','ᘰ'=>'ᘰ','ᘱ'=>'ᘱ','ᘲ'=>'ᘲ','ᘳ'=>'ᘳ','ᘴ'=>'ᘴ','ᘵ'=>'ᘵ','ᘶ'=>'ᘶ','ᘷ'=>'ᘷ','ᘸ'=>'ᘸ','ᘹ'=>'ᘹ','ᘺ'=>'ᘺ','ᘻ'=>'ᘻ','ᘼ'=>'ᘼ','ᘽ'=>'ᘽ','ᘾ'=>'ᘾ','ᘿ'=>'ᘿ','ᙀ'=>'ᙀ','ᙁ'=>'ᙁ','ᙂ'=>'ᙂ','ᙃ'=>'ᙃ','ᙄ'=>'ᙄ','ᙅ'=>'ᙅ','ᙆ'=>'ᙆ','ᙇ'=>'ᙇ','ᙈ'=>'ᙈ','ᙉ'=>'ᙉ','ᙊ'=>'ᙊ','ᙋ'=>'ᙋ','ᙌ'=>'ᙌ','ᙍ'=>'ᙍ','ᙎ'=>'ᙎ','ᙏ'=>'ᙏ','ᙐ'=>'ᙐ','ᙑ'=>'ᙑ','ᙒ'=>'ᙒ','ᙓ'=>'ᙓ','ᙔ'=>'ᙔ','ᙕ'=>'ᙕ','ᙖ'=>'ᙖ','ᙗ'=>'ᙗ','ᙘ'=>'ᙘ','ᙙ'=>'ᙙ','ᙚ'=>'ᙚ','ᙛ'=>'ᙛ','ᙜ'=>'ᙜ','ᙝ'=>'ᙝ','ᙞ'=>'ᙞ','ᙟ'=>'ᙟ','ᙠ'=>'ᙠ','ᙡ'=>'ᙡ','ᙢ'=>'ᙢ','ᙣ'=>'ᙣ','ᙤ'=>'ᙤ','ᙥ'=>'ᙥ','ᙦ'=>'ᙦ','ᙧ'=>'ᙧ','ᙨ'=>'ᙨ','ᙩ'=>'ᙩ','ᙪ'=>'ᙪ','ᙫ'=>'ᙫ','ᙬ'=>'ᙬ','ᙯ'=>'ᙯ','ᙰ'=>'ᙰ','ᙱ'=>'ᙱ','ᙲ'=>'ᙲ','ᙳ'=>'ᙳ','ᙴ'=>'ᙴ','ᙵ'=>'ᙵ','ᙶ'=>'ᙶ','ᚁ'=>'ᚁ','ᚂ'=>'ᚂ','ᚃ'=>'ᚃ','ᚄ'=>'ᚄ','ᚅ'=>'ᚅ','ᚆ'=>'ᚆ','ᚇ'=>'ᚇ','ᚈ'=>'ᚈ','ᚉ'=>'ᚉ','ᚊ'=>'ᚊ','ᚋ'=>'ᚋ','ᚌ'=>'ᚌ','ᚍ'=>'ᚍ','ᚎ'=>'ᚎ','ᚏ'=>'ᚏ','ᚐ'=>'ᚐ','ᚑ'=>'ᚑ','ᚒ'=>'ᚒ','ᚓ'=>'ᚓ','ᚔ'=>'ᚔ','ᚕ'=>'ᚕ','ᚖ'=>'ᚖ','ᚗ'=>'ᚗ','ᚘ'=>'ᚘ','ᚙ'=>'ᚙ','ᚚ'=>'ᚚ','ᚠ'=>'ᚠ','ᚡ'=>'ᚡ','ᚢ'=>'ᚢ','ᚣ'=>'ᚣ','ᚤ'=>'ᚤ','ᚥ'=>'ᚥ','ᚦ'=>'ᚦ','ᚧ'=>'ᚧ','ᚨ'=>'ᚨ','ᚩ'=>'ᚩ','ᚪ'=>'ᚪ','ᚫ'=>'ᚫ','ᚬ'=>'ᚬ','ᚭ'=>'ᚭ','ᚮ'=>'ᚮ','ᚯ'=>'ᚯ','ᚰ'=>'ᚰ','ᚱ'=>'ᚱ','ᚲ'=>'ᚲ','ᚳ'=>'ᚳ','ᚴ'=>'ᚴ','ᚵ'=>'ᚵ','ᚶ'=>'ᚶ','ᚷ'=>'ᚷ','ᚸ'=>'ᚸ','ᚹ'=>'ᚹ','ᚺ'=>'ᚺ','ᚻ'=>'ᚻ','ᚼ'=>'ᚼ','ᚽ'=>'ᚽ','ᚾ'=>'ᚾ','ᚿ'=>'ᚿ','ᛀ'=>'ᛀ','ᛁ'=>'ᛁ','ᛂ'=>'ᛂ','ᛃ'=>'ᛃ','ᛄ'=>'ᛄ','ᛅ'=>'ᛅ','ᛆ'=>'ᛆ','ᛇ'=>'ᛇ','ᛈ'=>'ᛈ','ᛉ'=>'ᛉ','ᛊ'=>'ᛊ','ᛋ'=>'ᛋ','ᛌ'=>'ᛌ','ᛍ'=>'ᛍ','ᛎ'=>'ᛎ','ᛏ'=>'ᛏ','ᛐ'=>'ᛐ','ᛑ'=>'ᛑ','ᛒ'=>'ᛒ','ᛓ'=>'ᛓ','ᛔ'=>'ᛔ','ᛕ'=>'ᛕ','ᛖ'=>'ᛖ','ᛗ'=>'ᛗ','ᛘ'=>'ᛘ','ᛙ'=>'ᛙ','ᛚ'=>'ᛚ','ᛛ'=>'ᛛ','ᛜ'=>'ᛜ','ᛝ'=>'ᛝ','ᛞ'=>'ᛞ','ᛟ'=>'ᛟ','ᛠ'=>'ᛠ','ᛡ'=>'ᛡ','ᛢ'=>'ᛢ','ᛣ'=>'ᛣ','ᛤ'=>'ᛤ','ᛥ'=>'ᛥ','ᛦ'=>'ᛦ','ᛧ'=>'ᛧ','ᛨ'=>'ᛨ','ᛩ'=>'ᛩ','ᛪ'=>'ᛪ','ᛮ'=>'17','ᛯ'=>'18','ᛰ'=>'19','ᜀ'=>'ᜀ','ᜁ'=>'ᜁ','ᜂ'=>'ᜂ','ᜃ'=>'ᜃ','ᜄ'=>'ᜄ','ᜅ'=>'ᜅ','ᜆ'=>'ᜆ','ᜇ'=>'ᜇ','ᜈ'=>'ᜈ','ᜉ'=>'ᜉ','ᜊ'=>'ᜊ','ᜋ'=>'ᜋ','ᜌ'=>'ᜌ','ᜎ'=>'ᜎ','ᜏ'=>'ᜏ','ᜐ'=>'ᜐ','ᜑ'=>'ᜑ','ᜒ'=>'ᜒ','ᜓ'=>'ᜓ','᜔'=>'᜔','ᜠ'=>'ᜠ','ᜡ'=>'ᜡ','ᜢ'=>'ᜢ','ᜣ'=>'ᜣ','ᜤ'=>'ᜤ','ᜥ'=>'ᜥ','ᜦ'=>'ᜦ','ᜧ'=>'ᜧ','ᜨ'=>'ᜨ','ᜩ'=>'ᜩ','ᜪ'=>'ᜪ','ᜫ'=>'ᜫ','ᜬ'=>'ᜬ','ᜭ'=>'ᜭ','ᜮ'=>'ᜮ','ᜯ'=>'ᜯ','ᜰ'=>'ᜰ','ᜱ'=>'ᜱ','ᜲ'=>'ᜲ','ᜳ'=>'ᜳ','᜴'=>'᜴','ᝀ'=>'ᝀ','ᝁ'=>'ᝁ','ᝂ'=>'ᝂ','ᝃ'=>'ᝃ','ᝄ'=>'ᝄ','ᝅ'=>'ᝅ','ᝆ'=>'ᝆ','ᝇ'=>'ᝇ','ᝈ'=>'ᝈ','ᝉ'=>'ᝉ','ᝊ'=>'ᝊ','ᝋ'=>'ᝋ','ᝌ'=>'ᝌ','ᝍ'=>'ᝍ','ᝎ'=>'ᝎ','ᝏ'=>'ᝏ','ᝐ'=>'ᝐ','ᝑ'=>'ᝑ','ᝒ'=>'ᝒ','ᝓ'=>'ᝓ','ᝠ'=>'ᝠ','ᝡ'=>'ᝡ','ᝢ'=>'ᝢ','ᝣ'=>'ᝣ','ᝤ'=>'ᝤ','ᝥ'=>'ᝥ','ᝦ'=>'ᝦ','ᝧ'=>'ᝧ','ᝨ'=>'ᝨ','ᝩ'=>'ᝩ','ᝪ'=>'ᝪ','ᝫ'=>'ᝫ','ᝬ'=>'ᝬ','ᝮ'=>'ᝮ','ᝯ'=>'ᝯ','ᝰ'=>'ᝰ','ᝲ'=>'ᝲ','ᝳ'=>'ᝳ','ក'=>'ក','ខ'=>'ខ','គ'=>'គ','ឃ'=>'ឃ','ង'=>'ង','ច'=>'ច','ឆ'=>'ឆ','ជ'=>'ជ','ឈ'=>'ឈ','ញ'=>'ញ','ដ'=>'ដ','ឋ'=>'ឋ','ឌ'=>'ឌ','ឍ'=>'ឍ','ណ'=>'ណ','ត'=>'ត','ថ'=>'ថ','ទ'=>'ទ','ធ'=>'ធ','ន'=>'ន','ប'=>'ប','ផ'=>'ផ','ព'=>'ព','ភ'=>'ភ','ម'=>'ម','យ'=>'យ','រ'=>'រ','ល'=>'ល','វ'=>'វ','ឝ'=>'ឝ','ឞ'=>'ឞ','ស'=>'ស','ហ'=>'ហ','ឡ'=>'ឡ','អ'=>'អ','ឣ'=>'ឣ','ឤ'=>'ឤ','ឥ'=>'ឥ','ឦ'=>'ឦ','ឧ'=>'ឧ','ឨ'=>'ឨ','ឩ'=>'ឩ','ឪ'=>'ឪ','ឫ'=>'ឫ','ឬ'=>'ឬ','ឭ'=>'ឭ','ឮ'=>'ឮ','ឯ'=>'ឯ','ឰ'=>'ឰ','ឱ'=>'ឱ','ឲ'=>'ឲ','ឳ'=>'ឳ','ា'=>'ា','ិ'=>'ិ','ី'=>'ី','ឹ'=>'ឹ','ឺ'=>'ឺ','ុ'=>'ុ','ូ'=>'ូ','ួ'=>'ួ','ើ'=>'ើ','ឿ'=>'ឿ','ៀ'=>'ៀ','េ'=>'េ','ែ'=>'ែ','ៃ'=>'ៃ','ោ'=>'ោ','ៅ'=>'ៅ','ំ'=>'ំ','ះ'=>'ះ','ៈ'=>'ៈ','៉'=>'៉','៊'=>'៊','់'=>'់','៌'=>'៌','៍'=>'៍','៎'=>'៎','៏'=>'៏','័'=>'័','៑'=>'៑','្'=>'្','៓'=>'៓','ៗ'=>'ៗ','ៜ'=>'ៜ','៝'=>'៝','០'=>'0','១'=>'1','២'=>'2','៣'=>'3','៤'=>'4','៥'=>'5','៦'=>'6','៧'=>'7','៨'=>'8','៩'=>'9','៰'=>'0','៱'=>'1','៲'=>'2','៳'=>'3','៴'=>'4','៵'=>'5','៶'=>'6','៷'=>'7','៸'=>'8','៹'=>'9');
diff --git a/phpBB/includes/utf/data/search_indexer_20.php b/phpBB/includes/utf/data/search_indexer_20.php
index caab3c540b..0d2dfa6340 100644
--- a/phpBB/includes/utf/data/search_indexer_20.php
+++ b/phpBB/includes/utf/data/search_indexer_20.php
@@ -1 +1 @@
-<?php return array('ꀀ'=>'ꀀ','ꀁ'=>'ꀁ','ꀂ'=>'ꀂ','ꀃ'=>'ꀃ','ꀄ'=>'ꀄ','ꀅ'=>'ꀅ','ꀆ'=>'ꀆ','ꀇ'=>'ꀇ','ꀈ'=>'ꀈ','ꀉ'=>'ꀉ','ꀊ'=>'ꀊ','ꀋ'=>'ꀋ','ꀌ'=>'ꀌ','ꀍ'=>'ꀍ','ꀎ'=>'ꀎ','ꀏ'=>'ꀏ','ꀐ'=>'ꀐ','ꀑ'=>'ꀑ','ꀒ'=>'ꀒ','ꀓ'=>'ꀓ','ꀔ'=>'ꀔ','ꀕ'=>'ꀕ','ꀖ'=>'ꀖ','ꀗ'=>'ꀗ','ꀘ'=>'ꀘ','ꀙ'=>'ꀙ','ꀚ'=>'ꀚ','ꀛ'=>'ꀛ','ꀜ'=>'ꀜ','ꀝ'=>'ꀝ','ꀞ'=>'ꀞ','ꀟ'=>'ꀟ','ꀠ'=>'ꀠ','ꀡ'=>'ꀡ','ꀢ'=>'ꀢ','ꀣ'=>'ꀣ','ꀤ'=>'ꀤ','ꀥ'=>'ꀥ','ꀦ'=>'ꀦ','ꀧ'=>'ꀧ','ꀨ'=>'ꀨ','ꀩ'=>'ꀩ','ꀪ'=>'ꀪ','ꀫ'=>'ꀫ','ꀬ'=>'ꀬ','ꀭ'=>'ꀭ','ꀮ'=>'ꀮ','ꀯ'=>'ꀯ','ꀰ'=>'ꀰ','ꀱ'=>'ꀱ','ꀲ'=>'ꀲ','ꀳ'=>'ꀳ','ꀴ'=>'ꀴ','ꀵ'=>'ꀵ','ꀶ'=>'ꀶ','ꀷ'=>'ꀷ','ꀸ'=>'ꀸ','ꀹ'=>'ꀹ','ꀺ'=>'ꀺ','ꀻ'=>'ꀻ','ꀼ'=>'ꀼ','ꀽ'=>'ꀽ','ꀾ'=>'ꀾ','ꀿ'=>'ꀿ','ꁀ'=>'ꁀ','ꁁ'=>'ꁁ','ꁂ'=>'ꁂ','ꁃ'=>'ꁃ','ꁄ'=>'ꁄ','ꁅ'=>'ꁅ','ꁆ'=>'ꁆ','ꁇ'=>'ꁇ','ꁈ'=>'ꁈ','ꁉ'=>'ꁉ','ꁊ'=>'ꁊ','ꁋ'=>'ꁋ','ꁌ'=>'ꁌ','ꁍ'=>'ꁍ','ꁎ'=>'ꁎ','ꁏ'=>'ꁏ','ꁐ'=>'ꁐ','ꁑ'=>'ꁑ','ꁒ'=>'ꁒ','ꁓ'=>'ꁓ','ꁔ'=>'ꁔ','ꁕ'=>'ꁕ','ꁖ'=>'ꁖ','ꁗ'=>'ꁗ','ꁘ'=>'ꁘ','ꁙ'=>'ꁙ','ꁚ'=>'ꁚ','ꁛ'=>'ꁛ','ꁜ'=>'ꁜ','ꁝ'=>'ꁝ','ꁞ'=>'ꁞ','ꁟ'=>'ꁟ','ꁠ'=>'ꁠ','ꁡ'=>'ꁡ','ꁢ'=>'ꁢ','ꁣ'=>'ꁣ','ꁤ'=>'ꁤ','ꁥ'=>'ꁥ','ꁦ'=>'ꁦ','ꁧ'=>'ꁧ','ꁨ'=>'ꁨ','ꁩ'=>'ꁩ','ꁪ'=>'ꁪ','ꁫ'=>'ꁫ','ꁬ'=>'ꁬ','ꁭ'=>'ꁭ','ꁮ'=>'ꁮ','ꁯ'=>'ꁯ','ꁰ'=>'ꁰ','ꁱ'=>'ꁱ','ꁲ'=>'ꁲ','ꁳ'=>'ꁳ','ꁴ'=>'ꁴ','ꁵ'=>'ꁵ','ꁶ'=>'ꁶ','ꁷ'=>'ꁷ','ꁸ'=>'ꁸ','ꁹ'=>'ꁹ','ꁺ'=>'ꁺ','ꁻ'=>'ꁻ','ꁼ'=>'ꁼ','ꁽ'=>'ꁽ','ꁾ'=>'ꁾ','ꁿ'=>'ꁿ','ꂀ'=>'ꂀ','ꂁ'=>'ꂁ','ꂂ'=>'ꂂ','ꂃ'=>'ꂃ','ꂄ'=>'ꂄ','ꂅ'=>'ꂅ','ꂆ'=>'ꂆ','ꂇ'=>'ꂇ','ꂈ'=>'ꂈ','ꂉ'=>'ꂉ','ꂊ'=>'ꂊ','ꂋ'=>'ꂋ','ꂌ'=>'ꂌ','ꂍ'=>'ꂍ','ꂎ'=>'ꂎ','ꂏ'=>'ꂏ','ꂐ'=>'ꂐ','ꂑ'=>'ꂑ','ꂒ'=>'ꂒ','ꂓ'=>'ꂓ','ꂔ'=>'ꂔ','ꂕ'=>'ꂕ','ꂖ'=>'ꂖ','ꂗ'=>'ꂗ','ꂘ'=>'ꂘ','ꂙ'=>'ꂙ','ꂚ'=>'ꂚ','ꂛ'=>'ꂛ','ꂜ'=>'ꂜ','ꂝ'=>'ꂝ','ꂞ'=>'ꂞ','ꂟ'=>'ꂟ','ꂠ'=>'ꂠ','ꂡ'=>'ꂡ','ꂢ'=>'ꂢ','ꂣ'=>'ꂣ','ꂤ'=>'ꂤ','ꂥ'=>'ꂥ','ꂦ'=>'ꂦ','ꂧ'=>'ꂧ','ꂨ'=>'ꂨ','ꂩ'=>'ꂩ','ꂪ'=>'ꂪ','ꂫ'=>'ꂫ','ꂬ'=>'ꂬ','ꂭ'=>'ꂭ','ꂮ'=>'ꂮ','ꂯ'=>'ꂯ','ꂰ'=>'ꂰ','ꂱ'=>'ꂱ','ꂲ'=>'ꂲ','ꂳ'=>'ꂳ','ꂴ'=>'ꂴ','ꂵ'=>'ꂵ','ꂶ'=>'ꂶ','ꂷ'=>'ꂷ','ꂸ'=>'ꂸ','ꂹ'=>'ꂹ','ꂺ'=>'ꂺ','ꂻ'=>'ꂻ','ꂼ'=>'ꂼ','ꂽ'=>'ꂽ','ꂾ'=>'ꂾ','ꂿ'=>'ꂿ','ꃀ'=>'ꃀ','ꃁ'=>'ꃁ','ꃂ'=>'ꃂ','ꃃ'=>'ꃃ','ꃄ'=>'ꃄ','ꃅ'=>'ꃅ','ꃆ'=>'ꃆ','ꃇ'=>'ꃇ','ꃈ'=>'ꃈ','ꃉ'=>'ꃉ','ꃊ'=>'ꃊ','ꃋ'=>'ꃋ','ꃌ'=>'ꃌ','ꃍ'=>'ꃍ','ꃎ'=>'ꃎ','ꃏ'=>'ꃏ','ꃐ'=>'ꃐ','ꃑ'=>'ꃑ','ꃒ'=>'ꃒ','ꃓ'=>'ꃓ','ꃔ'=>'ꃔ','ꃕ'=>'ꃕ','ꃖ'=>'ꃖ','ꃗ'=>'ꃗ','ꃘ'=>'ꃘ','ꃙ'=>'ꃙ','ꃚ'=>'ꃚ','ꃛ'=>'ꃛ','ꃜ'=>'ꃜ','ꃝ'=>'ꃝ','ꃞ'=>'ꃞ','ꃟ'=>'ꃟ','ꃠ'=>'ꃠ','ꃡ'=>'ꃡ','ꃢ'=>'ꃢ','ꃣ'=>'ꃣ','ꃤ'=>'ꃤ','ꃥ'=>'ꃥ','ꃦ'=>'ꃦ','ꃧ'=>'ꃧ','ꃨ'=>'ꃨ','ꃩ'=>'ꃩ','ꃪ'=>'ꃪ','ꃫ'=>'ꃫ','ꃬ'=>'ꃬ','ꃭ'=>'ꃭ','ꃮ'=>'ꃮ','ꃯ'=>'ꃯ','ꃰ'=>'ꃰ','ꃱ'=>'ꃱ','ꃲ'=>'ꃲ','ꃳ'=>'ꃳ','ꃴ'=>'ꃴ','ꃵ'=>'ꃵ','ꃶ'=>'ꃶ','ꃷ'=>'ꃷ','ꃸ'=>'ꃸ','ꃹ'=>'ꃹ','ꃺ'=>'ꃺ','ꃻ'=>'ꃻ','ꃼ'=>'ꃼ','ꃽ'=>'ꃽ','ꃾ'=>'ꃾ','ꃿ'=>'ꃿ','ꄀ'=>'ꄀ','ꄁ'=>'ꄁ','ꄂ'=>'ꄂ','ꄃ'=>'ꄃ','ꄄ'=>'ꄄ','ꄅ'=>'ꄅ','ꄆ'=>'ꄆ','ꄇ'=>'ꄇ','ꄈ'=>'ꄈ','ꄉ'=>'ꄉ','ꄊ'=>'ꄊ','ꄋ'=>'ꄋ','ꄌ'=>'ꄌ','ꄍ'=>'ꄍ','ꄎ'=>'ꄎ','ꄏ'=>'ꄏ','ꄐ'=>'ꄐ','ꄑ'=>'ꄑ','ꄒ'=>'ꄒ','ꄓ'=>'ꄓ','ꄔ'=>'ꄔ','ꄕ'=>'ꄕ','ꄖ'=>'ꄖ','ꄗ'=>'ꄗ','ꄘ'=>'ꄘ','ꄙ'=>'ꄙ','ꄚ'=>'ꄚ','ꄛ'=>'ꄛ','ꄜ'=>'ꄜ','ꄝ'=>'ꄝ','ꄞ'=>'ꄞ','ꄟ'=>'ꄟ','ꄠ'=>'ꄠ','ꄡ'=>'ꄡ','ꄢ'=>'ꄢ','ꄣ'=>'ꄣ','ꄤ'=>'ꄤ','ꄥ'=>'ꄥ','ꄦ'=>'ꄦ','ꄧ'=>'ꄧ','ꄨ'=>'ꄨ','ꄩ'=>'ꄩ','ꄪ'=>'ꄪ','ꄫ'=>'ꄫ','ꄬ'=>'ꄬ','ꄭ'=>'ꄭ','ꄮ'=>'ꄮ','ꄯ'=>'ꄯ','ꄰ'=>'ꄰ','ꄱ'=>'ꄱ','ꄲ'=>'ꄲ','ꄳ'=>'ꄳ','ꄴ'=>'ꄴ','ꄵ'=>'ꄵ','ꄶ'=>'ꄶ','ꄷ'=>'ꄷ','ꄸ'=>'ꄸ','ꄹ'=>'ꄹ','ꄺ'=>'ꄺ','ꄻ'=>'ꄻ','ꄼ'=>'ꄼ','ꄽ'=>'ꄽ','ꄾ'=>'ꄾ','ꄿ'=>'ꄿ','ꅀ'=>'ꅀ','ꅁ'=>'ꅁ','ꅂ'=>'ꅂ','ꅃ'=>'ꅃ','ꅄ'=>'ꅄ','ꅅ'=>'ꅅ','ꅆ'=>'ꅆ','ꅇ'=>'ꅇ','ꅈ'=>'ꅈ','ꅉ'=>'ꅉ','ꅊ'=>'ꅊ','ꅋ'=>'ꅋ','ꅌ'=>'ꅌ','ꅍ'=>'ꅍ','ꅎ'=>'ꅎ','ꅏ'=>'ꅏ','ꅐ'=>'ꅐ','ꅑ'=>'ꅑ','ꅒ'=>'ꅒ','ꅓ'=>'ꅓ','ꅔ'=>'ꅔ','ꅕ'=>'ꅕ','ꅖ'=>'ꅖ','ꅗ'=>'ꅗ','ꅘ'=>'ꅘ','ꅙ'=>'ꅙ','ꅚ'=>'ꅚ','ꅛ'=>'ꅛ','ꅜ'=>'ꅜ','ꅝ'=>'ꅝ','ꅞ'=>'ꅞ','ꅟ'=>'ꅟ','ꅠ'=>'ꅠ','ꅡ'=>'ꅡ','ꅢ'=>'ꅢ','ꅣ'=>'ꅣ','ꅤ'=>'ꅤ','ꅥ'=>'ꅥ','ꅦ'=>'ꅦ','ꅧ'=>'ꅧ','ꅨ'=>'ꅨ','ꅩ'=>'ꅩ','ꅪ'=>'ꅪ','ꅫ'=>'ꅫ','ꅬ'=>'ꅬ','ꅭ'=>'ꅭ','ꅮ'=>'ꅮ','ꅯ'=>'ꅯ','ꅰ'=>'ꅰ','ꅱ'=>'ꅱ','ꅲ'=>'ꅲ','ꅳ'=>'ꅳ','ꅴ'=>'ꅴ','ꅵ'=>'ꅵ','ꅶ'=>'ꅶ','ꅷ'=>'ꅷ','ꅸ'=>'ꅸ','ꅹ'=>'ꅹ','ꅺ'=>'ꅺ','ꅻ'=>'ꅻ','ꅼ'=>'ꅼ','ꅽ'=>'ꅽ','ꅾ'=>'ꅾ','ꅿ'=>'ꅿ','ꆀ'=>'ꆀ','ꆁ'=>'ꆁ','ꆂ'=>'ꆂ','ꆃ'=>'ꆃ','ꆄ'=>'ꆄ','ꆅ'=>'ꆅ','ꆆ'=>'ꆆ','ꆇ'=>'ꆇ','ꆈ'=>'ꆈ','ꆉ'=>'ꆉ','ꆊ'=>'ꆊ','ꆋ'=>'ꆋ','ꆌ'=>'ꆌ','ꆍ'=>'ꆍ','ꆎ'=>'ꆎ','ꆏ'=>'ꆏ','ꆐ'=>'ꆐ','ꆑ'=>'ꆑ','ꆒ'=>'ꆒ','ꆓ'=>'ꆓ','ꆔ'=>'ꆔ','ꆕ'=>'ꆕ','ꆖ'=>'ꆖ','ꆗ'=>'ꆗ','ꆘ'=>'ꆘ','ꆙ'=>'ꆙ','ꆚ'=>'ꆚ','ꆛ'=>'ꆛ','ꆜ'=>'ꆜ','ꆝ'=>'ꆝ','ꆞ'=>'ꆞ','ꆟ'=>'ꆟ','ꆠ'=>'ꆠ','ꆡ'=>'ꆡ','ꆢ'=>'ꆢ','ꆣ'=>'ꆣ','ꆤ'=>'ꆤ','ꆥ'=>'ꆥ','ꆦ'=>'ꆦ','ꆧ'=>'ꆧ','ꆨ'=>'ꆨ','ꆩ'=>'ꆩ','ꆪ'=>'ꆪ','ꆫ'=>'ꆫ','ꆬ'=>'ꆬ','ꆭ'=>'ꆭ','ꆮ'=>'ꆮ','ꆯ'=>'ꆯ','ꆰ'=>'ꆰ','ꆱ'=>'ꆱ','ꆲ'=>'ꆲ','ꆳ'=>'ꆳ','ꆴ'=>'ꆴ','ꆵ'=>'ꆵ','ꆶ'=>'ꆶ','ꆷ'=>'ꆷ','ꆸ'=>'ꆸ','ꆹ'=>'ꆹ','ꆺ'=>'ꆺ','ꆻ'=>'ꆻ','ꆼ'=>'ꆼ','ꆽ'=>'ꆽ','ꆾ'=>'ꆾ','ꆿ'=>'ꆿ','ꇀ'=>'ꇀ','ꇁ'=>'ꇁ','ꇂ'=>'ꇂ','ꇃ'=>'ꇃ','ꇄ'=>'ꇄ','ꇅ'=>'ꇅ','ꇆ'=>'ꇆ','ꇇ'=>'ꇇ','ꇈ'=>'ꇈ','ꇉ'=>'ꇉ','ꇊ'=>'ꇊ','ꇋ'=>'ꇋ','ꇌ'=>'ꇌ','ꇍ'=>'ꇍ','ꇎ'=>'ꇎ','ꇏ'=>'ꇏ','ꇐ'=>'ꇐ','ꇑ'=>'ꇑ','ꇒ'=>'ꇒ','ꇓ'=>'ꇓ','ꇔ'=>'ꇔ','ꇕ'=>'ꇕ','ꇖ'=>'ꇖ','ꇗ'=>'ꇗ','ꇘ'=>'ꇘ','ꇙ'=>'ꇙ','ꇚ'=>'ꇚ','ꇛ'=>'ꇛ','ꇜ'=>'ꇜ','ꇝ'=>'ꇝ','ꇞ'=>'ꇞ','ꇟ'=>'ꇟ','ꇠ'=>'ꇠ','ꇡ'=>'ꇡ','ꇢ'=>'ꇢ','ꇣ'=>'ꇣ','ꇤ'=>'ꇤ','ꇥ'=>'ꇥ','ꇦ'=>'ꇦ','ꇧ'=>'ꇧ','ꇨ'=>'ꇨ','ꇩ'=>'ꇩ','ꇪ'=>'ꇪ','ꇫ'=>'ꇫ','ꇬ'=>'ꇬ','ꇭ'=>'ꇭ','ꇮ'=>'ꇮ','ꇯ'=>'ꇯ','ꇰ'=>'ꇰ','ꇱ'=>'ꇱ','ꇲ'=>'ꇲ','ꇳ'=>'ꇳ','ꇴ'=>'ꇴ','ꇵ'=>'ꇵ','ꇶ'=>'ꇶ','ꇷ'=>'ꇷ','ꇸ'=>'ꇸ','ꇹ'=>'ꇹ','ꇺ'=>'ꇺ','ꇻ'=>'ꇻ','ꇼ'=>'ꇼ','ꇽ'=>'ꇽ','ꇾ'=>'ꇾ','ꇿ'=>'ꇿ','ꈀ'=>'ꈀ','ꈁ'=>'ꈁ','ꈂ'=>'ꈂ','ꈃ'=>'ꈃ','ꈄ'=>'ꈄ','ꈅ'=>'ꈅ','ꈆ'=>'ꈆ','ꈇ'=>'ꈇ','ꈈ'=>'ꈈ','ꈉ'=>'ꈉ','ꈊ'=>'ꈊ','ꈋ'=>'ꈋ','ꈌ'=>'ꈌ','ꈍ'=>'ꈍ','ꈎ'=>'ꈎ','ꈏ'=>'ꈏ','ꈐ'=>'ꈐ','ꈑ'=>'ꈑ','ꈒ'=>'ꈒ','ꈓ'=>'ꈓ','ꈔ'=>'ꈔ','ꈕ'=>'ꈕ','ꈖ'=>'ꈖ','ꈗ'=>'ꈗ','ꈘ'=>'ꈘ','ꈙ'=>'ꈙ','ꈚ'=>'ꈚ','ꈛ'=>'ꈛ','ꈜ'=>'ꈜ','ꈝ'=>'ꈝ','ꈞ'=>'ꈞ','ꈟ'=>'ꈟ','ꈠ'=>'ꈠ','ꈡ'=>'ꈡ','ꈢ'=>'ꈢ','ꈣ'=>'ꈣ','ꈤ'=>'ꈤ','ꈥ'=>'ꈥ','ꈦ'=>'ꈦ','ꈧ'=>'ꈧ','ꈨ'=>'ꈨ','ꈩ'=>'ꈩ','ꈪ'=>'ꈪ','ꈫ'=>'ꈫ','ꈬ'=>'ꈬ','ꈭ'=>'ꈭ','ꈮ'=>'ꈮ','ꈯ'=>'ꈯ','ꈰ'=>'ꈰ','ꈱ'=>'ꈱ','ꈲ'=>'ꈲ','ꈳ'=>'ꈳ','ꈴ'=>'ꈴ','ꈵ'=>'ꈵ','ꈶ'=>'ꈶ','ꈷ'=>'ꈷ','ꈸ'=>'ꈸ','ꈹ'=>'ꈹ','ꈺ'=>'ꈺ','ꈻ'=>'ꈻ','ꈼ'=>'ꈼ','ꈽ'=>'ꈽ','ꈾ'=>'ꈾ','ꈿ'=>'ꈿ','ꉀ'=>'ꉀ','ꉁ'=>'ꉁ','ꉂ'=>'ꉂ','ꉃ'=>'ꉃ','ꉄ'=>'ꉄ','ꉅ'=>'ꉅ','ꉆ'=>'ꉆ','ꉇ'=>'ꉇ','ꉈ'=>'ꉈ','ꉉ'=>'ꉉ','ꉊ'=>'ꉊ','ꉋ'=>'ꉋ','ꉌ'=>'ꉌ','ꉍ'=>'ꉍ','ꉎ'=>'ꉎ','ꉏ'=>'ꉏ','ꉐ'=>'ꉐ','ꉑ'=>'ꉑ','ꉒ'=>'ꉒ','ꉓ'=>'ꉓ','ꉔ'=>'ꉔ','ꉕ'=>'ꉕ','ꉖ'=>'ꉖ','ꉗ'=>'ꉗ','ꉘ'=>'ꉘ','ꉙ'=>'ꉙ','ꉚ'=>'ꉚ','ꉛ'=>'ꉛ','ꉜ'=>'ꉜ','ꉝ'=>'ꉝ','ꉞ'=>'ꉞ','ꉟ'=>'ꉟ','ꉠ'=>'ꉠ','ꉡ'=>'ꉡ','ꉢ'=>'ꉢ','ꉣ'=>'ꉣ','ꉤ'=>'ꉤ','ꉥ'=>'ꉥ','ꉦ'=>'ꉦ','ꉧ'=>'ꉧ','ꉨ'=>'ꉨ','ꉩ'=>'ꉩ','ꉪ'=>'ꉪ','ꉫ'=>'ꉫ','ꉬ'=>'ꉬ','ꉭ'=>'ꉭ','ꉮ'=>'ꉮ','ꉯ'=>'ꉯ','ꉰ'=>'ꉰ','ꉱ'=>'ꉱ','ꉲ'=>'ꉲ','ꉳ'=>'ꉳ','ꉴ'=>'ꉴ','ꉵ'=>'ꉵ','ꉶ'=>'ꉶ','ꉷ'=>'ꉷ','ꉸ'=>'ꉸ','ꉹ'=>'ꉹ','ꉺ'=>'ꉺ','ꉻ'=>'ꉻ','ꉼ'=>'ꉼ','ꉽ'=>'ꉽ','ꉾ'=>'ꉾ','ꉿ'=>'ꉿ','ꊀ'=>'ꊀ','ꊁ'=>'ꊁ','ꊂ'=>'ꊂ','ꊃ'=>'ꊃ','ꊄ'=>'ꊄ','ꊅ'=>'ꊅ','ꊆ'=>'ꊆ','ꊇ'=>'ꊇ','ꊈ'=>'ꊈ','ꊉ'=>'ꊉ','ꊊ'=>'ꊊ','ꊋ'=>'ꊋ','ꊌ'=>'ꊌ','ꊍ'=>'ꊍ','ꊎ'=>'ꊎ','ꊏ'=>'ꊏ','ꊐ'=>'ꊐ','ꊑ'=>'ꊑ','ꊒ'=>'ꊒ','ꊓ'=>'ꊓ','ꊔ'=>'ꊔ','ꊕ'=>'ꊕ','ꊖ'=>'ꊖ','ꊗ'=>'ꊗ','ꊘ'=>'ꊘ','ꊙ'=>'ꊙ','ꊚ'=>'ꊚ','ꊛ'=>'ꊛ','ꊜ'=>'ꊜ','ꊝ'=>'ꊝ','ꊞ'=>'ꊞ','ꊟ'=>'ꊟ','ꊠ'=>'ꊠ','ꊡ'=>'ꊡ','ꊢ'=>'ꊢ','ꊣ'=>'ꊣ','ꊤ'=>'ꊤ','ꊥ'=>'ꊥ','ꊦ'=>'ꊦ','ꊧ'=>'ꊧ','ꊨ'=>'ꊨ','ꊩ'=>'ꊩ','ꊪ'=>'ꊪ','ꊫ'=>'ꊫ','ꊬ'=>'ꊬ','ꊭ'=>'ꊭ','ꊮ'=>'ꊮ','ꊯ'=>'ꊯ','ꊰ'=>'ꊰ','ꊱ'=>'ꊱ','ꊲ'=>'ꊲ','ꊳ'=>'ꊳ','ꊴ'=>'ꊴ','ꊵ'=>'ꊵ','ꊶ'=>'ꊶ','ꊷ'=>'ꊷ','ꊸ'=>'ꊸ','ꊹ'=>'ꊹ','ꊺ'=>'ꊺ','ꊻ'=>'ꊻ','ꊼ'=>'ꊼ','ꊽ'=>'ꊽ','ꊾ'=>'ꊾ','ꊿ'=>'ꊿ','ꋀ'=>'ꋀ','ꋁ'=>'ꋁ','ꋂ'=>'ꋂ','ꋃ'=>'ꋃ','ꋄ'=>'ꋄ','ꋅ'=>'ꋅ','ꋆ'=>'ꋆ','ꋇ'=>'ꋇ','ꋈ'=>'ꋈ','ꋉ'=>'ꋉ','ꋊ'=>'ꋊ','ꋋ'=>'ꋋ','ꋌ'=>'ꋌ','ꋍ'=>'ꋍ','ꋎ'=>'ꋎ','ꋏ'=>'ꋏ','ꋐ'=>'ꋐ','ꋑ'=>'ꋑ','ꋒ'=>'ꋒ','ꋓ'=>'ꋓ','ꋔ'=>'ꋔ','ꋕ'=>'ꋕ','ꋖ'=>'ꋖ','ꋗ'=>'ꋗ','ꋘ'=>'ꋘ','ꋙ'=>'ꋙ','ꋚ'=>'ꋚ','ꋛ'=>'ꋛ','ꋜ'=>'ꋜ','ꋝ'=>'ꋝ','ꋞ'=>'ꋞ','ꋟ'=>'ꋟ','ꋠ'=>'ꋠ','ꋡ'=>'ꋡ','ꋢ'=>'ꋢ','ꋣ'=>'ꋣ','ꋤ'=>'ꋤ','ꋥ'=>'ꋥ','ꋦ'=>'ꋦ','ꋧ'=>'ꋧ','ꋨ'=>'ꋨ','ꋩ'=>'ꋩ','ꋪ'=>'ꋪ','ꋫ'=>'ꋫ','ꋬ'=>'ꋬ','ꋭ'=>'ꋭ','ꋮ'=>'ꋮ','ꋯ'=>'ꋯ','ꋰ'=>'ꋰ','ꋱ'=>'ꋱ','ꋲ'=>'ꋲ','ꋳ'=>'ꋳ','ꋴ'=>'ꋴ','ꋵ'=>'ꋵ','ꋶ'=>'ꋶ','ꋷ'=>'ꋷ','ꋸ'=>'ꋸ','ꋹ'=>'ꋹ','ꋺ'=>'ꋺ','ꋻ'=>'ꋻ','ꋼ'=>'ꋼ','ꋽ'=>'ꋽ','ꋾ'=>'ꋾ','ꋿ'=>'ꋿ','ꌀ'=>'ꌀ','ꌁ'=>'ꌁ','ꌂ'=>'ꌂ','ꌃ'=>'ꌃ','ꌄ'=>'ꌄ','ꌅ'=>'ꌅ','ꌆ'=>'ꌆ','ꌇ'=>'ꌇ','ꌈ'=>'ꌈ','ꌉ'=>'ꌉ','ꌊ'=>'ꌊ','ꌋ'=>'ꌋ','ꌌ'=>'ꌌ','ꌍ'=>'ꌍ','ꌎ'=>'ꌎ','ꌏ'=>'ꌏ','ꌐ'=>'ꌐ','ꌑ'=>'ꌑ','ꌒ'=>'ꌒ','ꌓ'=>'ꌓ','ꌔ'=>'ꌔ','ꌕ'=>'ꌕ','ꌖ'=>'ꌖ','ꌗ'=>'ꌗ','ꌘ'=>'ꌘ','ꌙ'=>'ꌙ','ꌚ'=>'ꌚ','ꌛ'=>'ꌛ','ꌜ'=>'ꌜ','ꌝ'=>'ꌝ','ꌞ'=>'ꌞ','ꌟ'=>'ꌟ','ꌠ'=>'ꌠ','ꌡ'=>'ꌡ','ꌢ'=>'ꌢ','ꌣ'=>'ꌣ','ꌤ'=>'ꌤ','ꌥ'=>'ꌥ','ꌦ'=>'ꌦ','ꌧ'=>'ꌧ','ꌨ'=>'ꌨ','ꌩ'=>'ꌩ','ꌪ'=>'ꌪ','ꌫ'=>'ꌫ','ꌬ'=>'ꌬ','ꌭ'=>'ꌭ','ꌮ'=>'ꌮ','ꌯ'=>'ꌯ','ꌰ'=>'ꌰ','ꌱ'=>'ꌱ','ꌲ'=>'ꌲ','ꌳ'=>'ꌳ','ꌴ'=>'ꌴ','ꌵ'=>'ꌵ','ꌶ'=>'ꌶ','ꌷ'=>'ꌷ','ꌸ'=>'ꌸ','ꌹ'=>'ꌹ','ꌺ'=>'ꌺ','ꌻ'=>'ꌻ','ꌼ'=>'ꌼ','ꌽ'=>'ꌽ','ꌾ'=>'ꌾ','ꌿ'=>'ꌿ','ꍀ'=>'ꍀ','ꍁ'=>'ꍁ','ꍂ'=>'ꍂ','ꍃ'=>'ꍃ','ꍄ'=>'ꍄ','ꍅ'=>'ꍅ','ꍆ'=>'ꍆ','ꍇ'=>'ꍇ','ꍈ'=>'ꍈ','ꍉ'=>'ꍉ','ꍊ'=>'ꍊ','ꍋ'=>'ꍋ','ꍌ'=>'ꍌ','ꍍ'=>'ꍍ','ꍎ'=>'ꍎ','ꍏ'=>'ꍏ','ꍐ'=>'ꍐ','ꍑ'=>'ꍑ','ꍒ'=>'ꍒ','ꍓ'=>'ꍓ','ꍔ'=>'ꍔ','ꍕ'=>'ꍕ','ꍖ'=>'ꍖ','ꍗ'=>'ꍗ','ꍘ'=>'ꍘ','ꍙ'=>'ꍙ','ꍚ'=>'ꍚ','ꍛ'=>'ꍛ','ꍜ'=>'ꍜ','ꍝ'=>'ꍝ','ꍞ'=>'ꍞ','ꍟ'=>'ꍟ','ꍠ'=>'ꍠ','ꍡ'=>'ꍡ','ꍢ'=>'ꍢ','ꍣ'=>'ꍣ','ꍤ'=>'ꍤ','ꍥ'=>'ꍥ','ꍦ'=>'ꍦ','ꍧ'=>'ꍧ','ꍨ'=>'ꍨ','ꍩ'=>'ꍩ','ꍪ'=>'ꍪ','ꍫ'=>'ꍫ','ꍬ'=>'ꍬ','ꍭ'=>'ꍭ','ꍮ'=>'ꍮ','ꍯ'=>'ꍯ','ꍰ'=>'ꍰ','ꍱ'=>'ꍱ','ꍲ'=>'ꍲ','ꍳ'=>'ꍳ','ꍴ'=>'ꍴ','ꍵ'=>'ꍵ','ꍶ'=>'ꍶ','ꍷ'=>'ꍷ','ꍸ'=>'ꍸ','ꍹ'=>'ꍹ','ꍺ'=>'ꍺ','ꍻ'=>'ꍻ','ꍼ'=>'ꍼ','ꍽ'=>'ꍽ','ꍾ'=>'ꍾ','ꍿ'=>'ꍿ','ꎀ'=>'ꎀ','ꎁ'=>'ꎁ','ꎂ'=>'ꎂ','ꎃ'=>'ꎃ','ꎄ'=>'ꎄ','ꎅ'=>'ꎅ','ꎆ'=>'ꎆ','ꎇ'=>'ꎇ','ꎈ'=>'ꎈ','ꎉ'=>'ꎉ','ꎊ'=>'ꎊ','ꎋ'=>'ꎋ','ꎌ'=>'ꎌ','ꎍ'=>'ꎍ','ꎎ'=>'ꎎ','ꎏ'=>'ꎏ','ꎐ'=>'ꎐ','ꎑ'=>'ꎑ','ꎒ'=>'ꎒ','ꎓ'=>'ꎓ','ꎔ'=>'ꎔ','ꎕ'=>'ꎕ','ꎖ'=>'ꎖ','ꎗ'=>'ꎗ','ꎘ'=>'ꎘ','ꎙ'=>'ꎙ','ꎚ'=>'ꎚ','ꎛ'=>'ꎛ','ꎜ'=>'ꎜ','ꎝ'=>'ꎝ','ꎞ'=>'ꎞ','ꎟ'=>'ꎟ','ꎠ'=>'ꎠ','ꎡ'=>'ꎡ','ꎢ'=>'ꎢ','ꎣ'=>'ꎣ','ꎤ'=>'ꎤ','ꎥ'=>'ꎥ','ꎦ'=>'ꎦ','ꎧ'=>'ꎧ','ꎨ'=>'ꎨ','ꎩ'=>'ꎩ','ꎪ'=>'ꎪ','ꎫ'=>'ꎫ','ꎬ'=>'ꎬ','ꎭ'=>'ꎭ','ꎮ'=>'ꎮ','ꎯ'=>'ꎯ','ꎰ'=>'ꎰ','ꎱ'=>'ꎱ','ꎲ'=>'ꎲ','ꎳ'=>'ꎳ','ꎴ'=>'ꎴ','ꎵ'=>'ꎵ','ꎶ'=>'ꎶ','ꎷ'=>'ꎷ','ꎸ'=>'ꎸ','ꎹ'=>'ꎹ','ꎺ'=>'ꎺ','ꎻ'=>'ꎻ','ꎼ'=>'ꎼ','ꎽ'=>'ꎽ','ꎾ'=>'ꎾ','ꎿ'=>'ꎿ','ꏀ'=>'ꏀ','ꏁ'=>'ꏁ','ꏂ'=>'ꏂ','ꏃ'=>'ꏃ','ꏄ'=>'ꏄ','ꏅ'=>'ꏅ','ꏆ'=>'ꏆ','ꏇ'=>'ꏇ','ꏈ'=>'ꏈ','ꏉ'=>'ꏉ','ꏊ'=>'ꏊ','ꏋ'=>'ꏋ','ꏌ'=>'ꏌ','ꏍ'=>'ꏍ','ꏎ'=>'ꏎ','ꏏ'=>'ꏏ','ꏐ'=>'ꏐ','ꏑ'=>'ꏑ','ꏒ'=>'ꏒ','ꏓ'=>'ꏓ','ꏔ'=>'ꏔ','ꏕ'=>'ꏕ','ꏖ'=>'ꏖ','ꏗ'=>'ꏗ','ꏘ'=>'ꏘ','ꏙ'=>'ꏙ','ꏚ'=>'ꏚ','ꏛ'=>'ꏛ','ꏜ'=>'ꏜ','ꏝ'=>'ꏝ','ꏞ'=>'ꏞ','ꏟ'=>'ꏟ','ꏠ'=>'ꏠ','ꏡ'=>'ꏡ','ꏢ'=>'ꏢ','ꏣ'=>'ꏣ','ꏤ'=>'ꏤ','ꏥ'=>'ꏥ','ꏦ'=>'ꏦ','ꏧ'=>'ꏧ','ꏨ'=>'ꏨ','ꏩ'=>'ꏩ','ꏪ'=>'ꏪ','ꏫ'=>'ꏫ','ꏬ'=>'ꏬ','ꏭ'=>'ꏭ','ꏮ'=>'ꏮ','ꏯ'=>'ꏯ','ꏰ'=>'ꏰ','ꏱ'=>'ꏱ','ꏲ'=>'ꏲ','ꏳ'=>'ꏳ','ꏴ'=>'ꏴ','ꏵ'=>'ꏵ','ꏶ'=>'ꏶ','ꏷ'=>'ꏷ','ꏸ'=>'ꏸ','ꏹ'=>'ꏹ','ꏺ'=>'ꏺ','ꏻ'=>'ꏻ','ꏼ'=>'ꏼ','ꏽ'=>'ꏽ','ꏾ'=>'ꏾ','ꏿ'=>'ꏿ','ꐀ'=>'ꐀ','ꐁ'=>'ꐁ','ꐂ'=>'ꐂ','ꐃ'=>'ꐃ','ꐄ'=>'ꐄ','ꐅ'=>'ꐅ','ꐆ'=>'ꐆ','ꐇ'=>'ꐇ','ꐈ'=>'ꐈ','ꐉ'=>'ꐉ','ꐊ'=>'ꐊ','ꐋ'=>'ꐋ','ꐌ'=>'ꐌ','ꐍ'=>'ꐍ','ꐎ'=>'ꐎ','ꐏ'=>'ꐏ','ꐐ'=>'ꐐ','ꐑ'=>'ꐑ','ꐒ'=>'ꐒ','ꐓ'=>'ꐓ','ꐔ'=>'ꐔ','ꐕ'=>'ꐕ','ꐖ'=>'ꐖ','ꐗ'=>'ꐗ','ꐘ'=>'ꐘ','ꐙ'=>'ꐙ','ꐚ'=>'ꐚ','ꐛ'=>'ꐛ','ꐜ'=>'ꐜ','ꐝ'=>'ꐝ','ꐞ'=>'ꐞ','ꐟ'=>'ꐟ','ꐠ'=>'ꐠ','ꐡ'=>'ꐡ','ꐢ'=>'ꐢ','ꐣ'=>'ꐣ','ꐤ'=>'ꐤ','ꐥ'=>'ꐥ','ꐦ'=>'ꐦ','ꐧ'=>'ꐧ','ꐨ'=>'ꐨ','ꐩ'=>'ꐩ','ꐪ'=>'ꐪ','ꐫ'=>'ꐫ','ꐬ'=>'ꐬ','ꐭ'=>'ꐭ','ꐮ'=>'ꐮ','ꐯ'=>'ꐯ','ꐰ'=>'ꐰ','ꐱ'=>'ꐱ','ꐲ'=>'ꐲ','ꐳ'=>'ꐳ','ꐴ'=>'ꐴ','ꐵ'=>'ꐵ','ꐶ'=>'ꐶ','ꐷ'=>'ꐷ','ꐸ'=>'ꐸ','ꐹ'=>'ꐹ','ꐺ'=>'ꐺ','ꐻ'=>'ꐻ','ꐼ'=>'ꐼ','ꐽ'=>'ꐽ','ꐾ'=>'ꐾ','ꐿ'=>'ꐿ','ꑀ'=>'ꑀ','ꑁ'=>'ꑁ','ꑂ'=>'ꑂ','ꑃ'=>'ꑃ','ꑄ'=>'ꑄ','ꑅ'=>'ꑅ','ꑆ'=>'ꑆ','ꑇ'=>'ꑇ','ꑈ'=>'ꑈ','ꑉ'=>'ꑉ','ꑊ'=>'ꑊ','ꑋ'=>'ꑋ','ꑌ'=>'ꑌ','ꑍ'=>'ꑍ','ꑎ'=>'ꑎ','ꑏ'=>'ꑏ','ꑐ'=>'ꑐ','ꑑ'=>'ꑑ','ꑒ'=>'ꑒ','ꑓ'=>'ꑓ','ꑔ'=>'ꑔ','ꑕ'=>'ꑕ','ꑖ'=>'ꑖ','ꑗ'=>'ꑗ','ꑘ'=>'ꑘ','ꑙ'=>'ꑙ','ꑚ'=>'ꑚ','ꑛ'=>'ꑛ','ꑜ'=>'ꑜ','ꑝ'=>'ꑝ','ꑞ'=>'ꑞ','ꑟ'=>'ꑟ','ꑠ'=>'ꑠ','ꑡ'=>'ꑡ','ꑢ'=>'ꑢ','ꑣ'=>'ꑣ','ꑤ'=>'ꑤ','ꑥ'=>'ꑥ','ꑦ'=>'ꑦ','ꑧ'=>'ꑧ','ꑨ'=>'ꑨ','ꑩ'=>'ꑩ','ꑪ'=>'ꑪ','ꑫ'=>'ꑫ','ꑬ'=>'ꑬ','ꑭ'=>'ꑭ','ꑮ'=>'ꑮ','ꑯ'=>'ꑯ','ꑰ'=>'ꑰ','ꑱ'=>'ꑱ','ꑲ'=>'ꑲ','ꑳ'=>'ꑳ','ꑴ'=>'ꑴ','ꑵ'=>'ꑵ','ꑶ'=>'ꑶ','ꑷ'=>'ꑷ','ꑸ'=>'ꑸ','ꑹ'=>'ꑹ','ꑺ'=>'ꑺ','ꑻ'=>'ꑻ','ꑼ'=>'ꑼ','ꑽ'=>'ꑽ','ꑾ'=>'ꑾ','ꑿ'=>'ꑿ','ꒀ'=>'ꒀ','ꒁ'=>'ꒁ','ꒂ'=>'ꒂ','ꒃ'=>'ꒃ','ꒄ'=>'ꒄ','ꒅ'=>'ꒅ','ꒆ'=>'ꒆ','ꒇ'=>'ꒇ','ꒈ'=>'ꒈ','ꒉ'=>'ꒉ','ꒊ'=>'ꒊ','ꒋ'=>'ꒋ','ꒌ'=>'ꒌ','ꜗ'=>'ꜗ','ꜘ'=>'ꜘ','ꜙ'=>'ꜙ','ꜚ'=>'ꜚ'); \ No newline at end of file
+<?php return array('ꀀ'=>'ꀀ','ꀁ'=>'ꀁ','ꀂ'=>'ꀂ','ꀃ'=>'ꀃ','ꀄ'=>'ꀄ','ꀅ'=>'ꀅ','ꀆ'=>'ꀆ','ꀇ'=>'ꀇ','ꀈ'=>'ꀈ','ꀉ'=>'ꀉ','ꀊ'=>'ꀊ','ꀋ'=>'ꀋ','ꀌ'=>'ꀌ','ꀍ'=>'ꀍ','ꀎ'=>'ꀎ','ꀏ'=>'ꀏ','ꀐ'=>'ꀐ','ꀑ'=>'ꀑ','ꀒ'=>'ꀒ','ꀓ'=>'ꀓ','ꀔ'=>'ꀔ','ꀕ'=>'ꀕ','ꀖ'=>'ꀖ','ꀗ'=>'ꀗ','ꀘ'=>'ꀘ','ꀙ'=>'ꀙ','ꀚ'=>'ꀚ','ꀛ'=>'ꀛ','ꀜ'=>'ꀜ','ꀝ'=>'ꀝ','ꀞ'=>'ꀞ','ꀟ'=>'ꀟ','ꀠ'=>'ꀠ','ꀡ'=>'ꀡ','ꀢ'=>'ꀢ','ꀣ'=>'ꀣ','ꀤ'=>'ꀤ','ꀥ'=>'ꀥ','ꀦ'=>'ꀦ','ꀧ'=>'ꀧ','ꀨ'=>'ꀨ','ꀩ'=>'ꀩ','ꀪ'=>'ꀪ','ꀫ'=>'ꀫ','ꀬ'=>'ꀬ','ꀭ'=>'ꀭ','ꀮ'=>'ꀮ','ꀯ'=>'ꀯ','ꀰ'=>'ꀰ','ꀱ'=>'ꀱ','ꀲ'=>'ꀲ','ꀳ'=>'ꀳ','ꀴ'=>'ꀴ','ꀵ'=>'ꀵ','ꀶ'=>'ꀶ','ꀷ'=>'ꀷ','ꀸ'=>'ꀸ','ꀹ'=>'ꀹ','ꀺ'=>'ꀺ','ꀻ'=>'ꀻ','ꀼ'=>'ꀼ','ꀽ'=>'ꀽ','ꀾ'=>'ꀾ','ꀿ'=>'ꀿ','ꁀ'=>'ꁀ','ꁁ'=>'ꁁ','ꁂ'=>'ꁂ','ꁃ'=>'ꁃ','ꁄ'=>'ꁄ','ꁅ'=>'ꁅ','ꁆ'=>'ꁆ','ꁇ'=>'ꁇ','ꁈ'=>'ꁈ','ꁉ'=>'ꁉ','ꁊ'=>'ꁊ','ꁋ'=>'ꁋ','ꁌ'=>'ꁌ','ꁍ'=>'ꁍ','ꁎ'=>'ꁎ','ꁏ'=>'ꁏ','ꁐ'=>'ꁐ','ꁑ'=>'ꁑ','ꁒ'=>'ꁒ','ꁓ'=>'ꁓ','ꁔ'=>'ꁔ','ꁕ'=>'ꁕ','ꁖ'=>'ꁖ','ꁗ'=>'ꁗ','ꁘ'=>'ꁘ','ꁙ'=>'ꁙ','ꁚ'=>'ꁚ','ꁛ'=>'ꁛ','ꁜ'=>'ꁜ','ꁝ'=>'ꁝ','ꁞ'=>'ꁞ','ꁟ'=>'ꁟ','ꁠ'=>'ꁠ','ꁡ'=>'ꁡ','ꁢ'=>'ꁢ','ꁣ'=>'ꁣ','ꁤ'=>'ꁤ','ꁥ'=>'ꁥ','ꁦ'=>'ꁦ','ꁧ'=>'ꁧ','ꁨ'=>'ꁨ','ꁩ'=>'ꁩ','ꁪ'=>'ꁪ','ꁫ'=>'ꁫ','ꁬ'=>'ꁬ','ꁭ'=>'ꁭ','ꁮ'=>'ꁮ','ꁯ'=>'ꁯ','ꁰ'=>'ꁰ','ꁱ'=>'ꁱ','ꁲ'=>'ꁲ','ꁳ'=>'ꁳ','ꁴ'=>'ꁴ','ꁵ'=>'ꁵ','ꁶ'=>'ꁶ','ꁷ'=>'ꁷ','ꁸ'=>'ꁸ','ꁹ'=>'ꁹ','ꁺ'=>'ꁺ','ꁻ'=>'ꁻ','ꁼ'=>'ꁼ','ꁽ'=>'ꁽ','ꁾ'=>'ꁾ','ꁿ'=>'ꁿ','ꂀ'=>'ꂀ','ꂁ'=>'ꂁ','ꂂ'=>'ꂂ','ꂃ'=>'ꂃ','ꂄ'=>'ꂄ','ꂅ'=>'ꂅ','ꂆ'=>'ꂆ','ꂇ'=>'ꂇ','ꂈ'=>'ꂈ','ꂉ'=>'ꂉ','ꂊ'=>'ꂊ','ꂋ'=>'ꂋ','ꂌ'=>'ꂌ','ꂍ'=>'ꂍ','ꂎ'=>'ꂎ','ꂏ'=>'ꂏ','ꂐ'=>'ꂐ','ꂑ'=>'ꂑ','ꂒ'=>'ꂒ','ꂓ'=>'ꂓ','ꂔ'=>'ꂔ','ꂕ'=>'ꂕ','ꂖ'=>'ꂖ','ꂗ'=>'ꂗ','ꂘ'=>'ꂘ','ꂙ'=>'ꂙ','ꂚ'=>'ꂚ','ꂛ'=>'ꂛ','ꂜ'=>'ꂜ','ꂝ'=>'ꂝ','ꂞ'=>'ꂞ','ꂟ'=>'ꂟ','ꂠ'=>'ꂠ','ꂡ'=>'ꂡ','ꂢ'=>'ꂢ','ꂣ'=>'ꂣ','ꂤ'=>'ꂤ','ꂥ'=>'ꂥ','ꂦ'=>'ꂦ','ꂧ'=>'ꂧ','ꂨ'=>'ꂨ','ꂩ'=>'ꂩ','ꂪ'=>'ꂪ','ꂫ'=>'ꂫ','ꂬ'=>'ꂬ','ꂭ'=>'ꂭ','ꂮ'=>'ꂮ','ꂯ'=>'ꂯ','ꂰ'=>'ꂰ','ꂱ'=>'ꂱ','ꂲ'=>'ꂲ','ꂳ'=>'ꂳ','ꂴ'=>'ꂴ','ꂵ'=>'ꂵ','ꂶ'=>'ꂶ','ꂷ'=>'ꂷ','ꂸ'=>'ꂸ','ꂹ'=>'ꂹ','ꂺ'=>'ꂺ','ꂻ'=>'ꂻ','ꂼ'=>'ꂼ','ꂽ'=>'ꂽ','ꂾ'=>'ꂾ','ꂿ'=>'ꂿ','ꃀ'=>'ꃀ','ꃁ'=>'ꃁ','ꃂ'=>'ꃂ','ꃃ'=>'ꃃ','ꃄ'=>'ꃄ','ꃅ'=>'ꃅ','ꃆ'=>'ꃆ','ꃇ'=>'ꃇ','ꃈ'=>'ꃈ','ꃉ'=>'ꃉ','ꃊ'=>'ꃊ','ꃋ'=>'ꃋ','ꃌ'=>'ꃌ','ꃍ'=>'ꃍ','ꃎ'=>'ꃎ','ꃏ'=>'ꃏ','ꃐ'=>'ꃐ','ꃑ'=>'ꃑ','ꃒ'=>'ꃒ','ꃓ'=>'ꃓ','ꃔ'=>'ꃔ','ꃕ'=>'ꃕ','ꃖ'=>'ꃖ','ꃗ'=>'ꃗ','ꃘ'=>'ꃘ','ꃙ'=>'ꃙ','ꃚ'=>'ꃚ','ꃛ'=>'ꃛ','ꃜ'=>'ꃜ','ꃝ'=>'ꃝ','ꃞ'=>'ꃞ','ꃟ'=>'ꃟ','ꃠ'=>'ꃠ','ꃡ'=>'ꃡ','ꃢ'=>'ꃢ','ꃣ'=>'ꃣ','ꃤ'=>'ꃤ','ꃥ'=>'ꃥ','ꃦ'=>'ꃦ','ꃧ'=>'ꃧ','ꃨ'=>'ꃨ','ꃩ'=>'ꃩ','ꃪ'=>'ꃪ','ꃫ'=>'ꃫ','ꃬ'=>'ꃬ','ꃭ'=>'ꃭ','ꃮ'=>'ꃮ','ꃯ'=>'ꃯ','ꃰ'=>'ꃰ','ꃱ'=>'ꃱ','ꃲ'=>'ꃲ','ꃳ'=>'ꃳ','ꃴ'=>'ꃴ','ꃵ'=>'ꃵ','ꃶ'=>'ꃶ','ꃷ'=>'ꃷ','ꃸ'=>'ꃸ','ꃹ'=>'ꃹ','ꃺ'=>'ꃺ','ꃻ'=>'ꃻ','ꃼ'=>'ꃼ','ꃽ'=>'ꃽ','ꃾ'=>'ꃾ','ꃿ'=>'ꃿ','ꄀ'=>'ꄀ','ꄁ'=>'ꄁ','ꄂ'=>'ꄂ','ꄃ'=>'ꄃ','ꄄ'=>'ꄄ','ꄅ'=>'ꄅ','ꄆ'=>'ꄆ','ꄇ'=>'ꄇ','ꄈ'=>'ꄈ','ꄉ'=>'ꄉ','ꄊ'=>'ꄊ','ꄋ'=>'ꄋ','ꄌ'=>'ꄌ','ꄍ'=>'ꄍ','ꄎ'=>'ꄎ','ꄏ'=>'ꄏ','ꄐ'=>'ꄐ','ꄑ'=>'ꄑ','ꄒ'=>'ꄒ','ꄓ'=>'ꄓ','ꄔ'=>'ꄔ','ꄕ'=>'ꄕ','ꄖ'=>'ꄖ','ꄗ'=>'ꄗ','ꄘ'=>'ꄘ','ꄙ'=>'ꄙ','ꄚ'=>'ꄚ','ꄛ'=>'ꄛ','ꄜ'=>'ꄜ','ꄝ'=>'ꄝ','ꄞ'=>'ꄞ','ꄟ'=>'ꄟ','ꄠ'=>'ꄠ','ꄡ'=>'ꄡ','ꄢ'=>'ꄢ','ꄣ'=>'ꄣ','ꄤ'=>'ꄤ','ꄥ'=>'ꄥ','ꄦ'=>'ꄦ','ꄧ'=>'ꄧ','ꄨ'=>'ꄨ','ꄩ'=>'ꄩ','ꄪ'=>'ꄪ','ꄫ'=>'ꄫ','ꄬ'=>'ꄬ','ꄭ'=>'ꄭ','ꄮ'=>'ꄮ','ꄯ'=>'ꄯ','ꄰ'=>'ꄰ','ꄱ'=>'ꄱ','ꄲ'=>'ꄲ','ꄳ'=>'ꄳ','ꄴ'=>'ꄴ','ꄵ'=>'ꄵ','ꄶ'=>'ꄶ','ꄷ'=>'ꄷ','ꄸ'=>'ꄸ','ꄹ'=>'ꄹ','ꄺ'=>'ꄺ','ꄻ'=>'ꄻ','ꄼ'=>'ꄼ','ꄽ'=>'ꄽ','ꄾ'=>'ꄾ','ꄿ'=>'ꄿ','ꅀ'=>'ꅀ','ꅁ'=>'ꅁ','ꅂ'=>'ꅂ','ꅃ'=>'ꅃ','ꅄ'=>'ꅄ','ꅅ'=>'ꅅ','ꅆ'=>'ꅆ','ꅇ'=>'ꅇ','ꅈ'=>'ꅈ','ꅉ'=>'ꅉ','ꅊ'=>'ꅊ','ꅋ'=>'ꅋ','ꅌ'=>'ꅌ','ꅍ'=>'ꅍ','ꅎ'=>'ꅎ','ꅏ'=>'ꅏ','ꅐ'=>'ꅐ','ꅑ'=>'ꅑ','ꅒ'=>'ꅒ','ꅓ'=>'ꅓ','ꅔ'=>'ꅔ','ꅕ'=>'ꅕ','ꅖ'=>'ꅖ','ꅗ'=>'ꅗ','ꅘ'=>'ꅘ','ꅙ'=>'ꅙ','ꅚ'=>'ꅚ','ꅛ'=>'ꅛ','ꅜ'=>'ꅜ','ꅝ'=>'ꅝ','ꅞ'=>'ꅞ','ꅟ'=>'ꅟ','ꅠ'=>'ꅠ','ꅡ'=>'ꅡ','ꅢ'=>'ꅢ','ꅣ'=>'ꅣ','ꅤ'=>'ꅤ','ꅥ'=>'ꅥ','ꅦ'=>'ꅦ','ꅧ'=>'ꅧ','ꅨ'=>'ꅨ','ꅩ'=>'ꅩ','ꅪ'=>'ꅪ','ꅫ'=>'ꅫ','ꅬ'=>'ꅬ','ꅭ'=>'ꅭ','ꅮ'=>'ꅮ','ꅯ'=>'ꅯ','ꅰ'=>'ꅰ','ꅱ'=>'ꅱ','ꅲ'=>'ꅲ','ꅳ'=>'ꅳ','ꅴ'=>'ꅴ','ꅵ'=>'ꅵ','ꅶ'=>'ꅶ','ꅷ'=>'ꅷ','ꅸ'=>'ꅸ','ꅹ'=>'ꅹ','ꅺ'=>'ꅺ','ꅻ'=>'ꅻ','ꅼ'=>'ꅼ','ꅽ'=>'ꅽ','ꅾ'=>'ꅾ','ꅿ'=>'ꅿ','ꆀ'=>'ꆀ','ꆁ'=>'ꆁ','ꆂ'=>'ꆂ','ꆃ'=>'ꆃ','ꆄ'=>'ꆄ','ꆅ'=>'ꆅ','ꆆ'=>'ꆆ','ꆇ'=>'ꆇ','ꆈ'=>'ꆈ','ꆉ'=>'ꆉ','ꆊ'=>'ꆊ','ꆋ'=>'ꆋ','ꆌ'=>'ꆌ','ꆍ'=>'ꆍ','ꆎ'=>'ꆎ','ꆏ'=>'ꆏ','ꆐ'=>'ꆐ','ꆑ'=>'ꆑ','ꆒ'=>'ꆒ','ꆓ'=>'ꆓ','ꆔ'=>'ꆔ','ꆕ'=>'ꆕ','ꆖ'=>'ꆖ','ꆗ'=>'ꆗ','ꆘ'=>'ꆘ','ꆙ'=>'ꆙ','ꆚ'=>'ꆚ','ꆛ'=>'ꆛ','ꆜ'=>'ꆜ','ꆝ'=>'ꆝ','ꆞ'=>'ꆞ','ꆟ'=>'ꆟ','ꆠ'=>'ꆠ','ꆡ'=>'ꆡ','ꆢ'=>'ꆢ','ꆣ'=>'ꆣ','ꆤ'=>'ꆤ','ꆥ'=>'ꆥ','ꆦ'=>'ꆦ','ꆧ'=>'ꆧ','ꆨ'=>'ꆨ','ꆩ'=>'ꆩ','ꆪ'=>'ꆪ','ꆫ'=>'ꆫ','ꆬ'=>'ꆬ','ꆭ'=>'ꆭ','ꆮ'=>'ꆮ','ꆯ'=>'ꆯ','ꆰ'=>'ꆰ','ꆱ'=>'ꆱ','ꆲ'=>'ꆲ','ꆳ'=>'ꆳ','ꆴ'=>'ꆴ','ꆵ'=>'ꆵ','ꆶ'=>'ꆶ','ꆷ'=>'ꆷ','ꆸ'=>'ꆸ','ꆹ'=>'ꆹ','ꆺ'=>'ꆺ','ꆻ'=>'ꆻ','ꆼ'=>'ꆼ','ꆽ'=>'ꆽ','ꆾ'=>'ꆾ','ꆿ'=>'ꆿ','ꇀ'=>'ꇀ','ꇁ'=>'ꇁ','ꇂ'=>'ꇂ','ꇃ'=>'ꇃ','ꇄ'=>'ꇄ','ꇅ'=>'ꇅ','ꇆ'=>'ꇆ','ꇇ'=>'ꇇ','ꇈ'=>'ꇈ','ꇉ'=>'ꇉ','ꇊ'=>'ꇊ','ꇋ'=>'ꇋ','ꇌ'=>'ꇌ','ꇍ'=>'ꇍ','ꇎ'=>'ꇎ','ꇏ'=>'ꇏ','ꇐ'=>'ꇐ','ꇑ'=>'ꇑ','ꇒ'=>'ꇒ','ꇓ'=>'ꇓ','ꇔ'=>'ꇔ','ꇕ'=>'ꇕ','ꇖ'=>'ꇖ','ꇗ'=>'ꇗ','ꇘ'=>'ꇘ','ꇙ'=>'ꇙ','ꇚ'=>'ꇚ','ꇛ'=>'ꇛ','ꇜ'=>'ꇜ','ꇝ'=>'ꇝ','ꇞ'=>'ꇞ','ꇟ'=>'ꇟ','ꇠ'=>'ꇠ','ꇡ'=>'ꇡ','ꇢ'=>'ꇢ','ꇣ'=>'ꇣ','ꇤ'=>'ꇤ','ꇥ'=>'ꇥ','ꇦ'=>'ꇦ','ꇧ'=>'ꇧ','ꇨ'=>'ꇨ','ꇩ'=>'ꇩ','ꇪ'=>'ꇪ','ꇫ'=>'ꇫ','ꇬ'=>'ꇬ','ꇭ'=>'ꇭ','ꇮ'=>'ꇮ','ꇯ'=>'ꇯ','ꇰ'=>'ꇰ','ꇱ'=>'ꇱ','ꇲ'=>'ꇲ','ꇳ'=>'ꇳ','ꇴ'=>'ꇴ','ꇵ'=>'ꇵ','ꇶ'=>'ꇶ','ꇷ'=>'ꇷ','ꇸ'=>'ꇸ','ꇹ'=>'ꇹ','ꇺ'=>'ꇺ','ꇻ'=>'ꇻ','ꇼ'=>'ꇼ','ꇽ'=>'ꇽ','ꇾ'=>'ꇾ','ꇿ'=>'ꇿ','ꈀ'=>'ꈀ','ꈁ'=>'ꈁ','ꈂ'=>'ꈂ','ꈃ'=>'ꈃ','ꈄ'=>'ꈄ','ꈅ'=>'ꈅ','ꈆ'=>'ꈆ','ꈇ'=>'ꈇ','ꈈ'=>'ꈈ','ꈉ'=>'ꈉ','ꈊ'=>'ꈊ','ꈋ'=>'ꈋ','ꈌ'=>'ꈌ','ꈍ'=>'ꈍ','ꈎ'=>'ꈎ','ꈏ'=>'ꈏ','ꈐ'=>'ꈐ','ꈑ'=>'ꈑ','ꈒ'=>'ꈒ','ꈓ'=>'ꈓ','ꈔ'=>'ꈔ','ꈕ'=>'ꈕ','ꈖ'=>'ꈖ','ꈗ'=>'ꈗ','ꈘ'=>'ꈘ','ꈙ'=>'ꈙ','ꈚ'=>'ꈚ','ꈛ'=>'ꈛ','ꈜ'=>'ꈜ','ꈝ'=>'ꈝ','ꈞ'=>'ꈞ','ꈟ'=>'ꈟ','ꈠ'=>'ꈠ','ꈡ'=>'ꈡ','ꈢ'=>'ꈢ','ꈣ'=>'ꈣ','ꈤ'=>'ꈤ','ꈥ'=>'ꈥ','ꈦ'=>'ꈦ','ꈧ'=>'ꈧ','ꈨ'=>'ꈨ','ꈩ'=>'ꈩ','ꈪ'=>'ꈪ','ꈫ'=>'ꈫ','ꈬ'=>'ꈬ','ꈭ'=>'ꈭ','ꈮ'=>'ꈮ','ꈯ'=>'ꈯ','ꈰ'=>'ꈰ','ꈱ'=>'ꈱ','ꈲ'=>'ꈲ','ꈳ'=>'ꈳ','ꈴ'=>'ꈴ','ꈵ'=>'ꈵ','ꈶ'=>'ꈶ','ꈷ'=>'ꈷ','ꈸ'=>'ꈸ','ꈹ'=>'ꈹ','ꈺ'=>'ꈺ','ꈻ'=>'ꈻ','ꈼ'=>'ꈼ','ꈽ'=>'ꈽ','ꈾ'=>'ꈾ','ꈿ'=>'ꈿ','ꉀ'=>'ꉀ','ꉁ'=>'ꉁ','ꉂ'=>'ꉂ','ꉃ'=>'ꉃ','ꉄ'=>'ꉄ','ꉅ'=>'ꉅ','ꉆ'=>'ꉆ','ꉇ'=>'ꉇ','ꉈ'=>'ꉈ','ꉉ'=>'ꉉ','ꉊ'=>'ꉊ','ꉋ'=>'ꉋ','ꉌ'=>'ꉌ','ꉍ'=>'ꉍ','ꉎ'=>'ꉎ','ꉏ'=>'ꉏ','ꉐ'=>'ꉐ','ꉑ'=>'ꉑ','ꉒ'=>'ꉒ','ꉓ'=>'ꉓ','ꉔ'=>'ꉔ','ꉕ'=>'ꉕ','ꉖ'=>'ꉖ','ꉗ'=>'ꉗ','ꉘ'=>'ꉘ','ꉙ'=>'ꉙ','ꉚ'=>'ꉚ','ꉛ'=>'ꉛ','ꉜ'=>'ꉜ','ꉝ'=>'ꉝ','ꉞ'=>'ꉞ','ꉟ'=>'ꉟ','ꉠ'=>'ꉠ','ꉡ'=>'ꉡ','ꉢ'=>'ꉢ','ꉣ'=>'ꉣ','ꉤ'=>'ꉤ','ꉥ'=>'ꉥ','ꉦ'=>'ꉦ','ꉧ'=>'ꉧ','ꉨ'=>'ꉨ','ꉩ'=>'ꉩ','ꉪ'=>'ꉪ','ꉫ'=>'ꉫ','ꉬ'=>'ꉬ','ꉭ'=>'ꉭ','ꉮ'=>'ꉮ','ꉯ'=>'ꉯ','ꉰ'=>'ꉰ','ꉱ'=>'ꉱ','ꉲ'=>'ꉲ','ꉳ'=>'ꉳ','ꉴ'=>'ꉴ','ꉵ'=>'ꉵ','ꉶ'=>'ꉶ','ꉷ'=>'ꉷ','ꉸ'=>'ꉸ','ꉹ'=>'ꉹ','ꉺ'=>'ꉺ','ꉻ'=>'ꉻ','ꉼ'=>'ꉼ','ꉽ'=>'ꉽ','ꉾ'=>'ꉾ','ꉿ'=>'ꉿ','ꊀ'=>'ꊀ','ꊁ'=>'ꊁ','ꊂ'=>'ꊂ','ꊃ'=>'ꊃ','ꊄ'=>'ꊄ','ꊅ'=>'ꊅ','ꊆ'=>'ꊆ','ꊇ'=>'ꊇ','ꊈ'=>'ꊈ','ꊉ'=>'ꊉ','ꊊ'=>'ꊊ','ꊋ'=>'ꊋ','ꊌ'=>'ꊌ','ꊍ'=>'ꊍ','ꊎ'=>'ꊎ','ꊏ'=>'ꊏ','ꊐ'=>'ꊐ','ꊑ'=>'ꊑ','ꊒ'=>'ꊒ','ꊓ'=>'ꊓ','ꊔ'=>'ꊔ','ꊕ'=>'ꊕ','ꊖ'=>'ꊖ','ꊗ'=>'ꊗ','ꊘ'=>'ꊘ','ꊙ'=>'ꊙ','ꊚ'=>'ꊚ','ꊛ'=>'ꊛ','ꊜ'=>'ꊜ','ꊝ'=>'ꊝ','ꊞ'=>'ꊞ','ꊟ'=>'ꊟ','ꊠ'=>'ꊠ','ꊡ'=>'ꊡ','ꊢ'=>'ꊢ','ꊣ'=>'ꊣ','ꊤ'=>'ꊤ','ꊥ'=>'ꊥ','ꊦ'=>'ꊦ','ꊧ'=>'ꊧ','ꊨ'=>'ꊨ','ꊩ'=>'ꊩ','ꊪ'=>'ꊪ','ꊫ'=>'ꊫ','ꊬ'=>'ꊬ','ꊭ'=>'ꊭ','ꊮ'=>'ꊮ','ꊯ'=>'ꊯ','ꊰ'=>'ꊰ','ꊱ'=>'ꊱ','ꊲ'=>'ꊲ','ꊳ'=>'ꊳ','ꊴ'=>'ꊴ','ꊵ'=>'ꊵ','ꊶ'=>'ꊶ','ꊷ'=>'ꊷ','ꊸ'=>'ꊸ','ꊹ'=>'ꊹ','ꊺ'=>'ꊺ','ꊻ'=>'ꊻ','ꊼ'=>'ꊼ','ꊽ'=>'ꊽ','ꊾ'=>'ꊾ','ꊿ'=>'ꊿ','ꋀ'=>'ꋀ','ꋁ'=>'ꋁ','ꋂ'=>'ꋂ','ꋃ'=>'ꋃ','ꋄ'=>'ꋄ','ꋅ'=>'ꋅ','ꋆ'=>'ꋆ','ꋇ'=>'ꋇ','ꋈ'=>'ꋈ','ꋉ'=>'ꋉ','ꋊ'=>'ꋊ','ꋋ'=>'ꋋ','ꋌ'=>'ꋌ','ꋍ'=>'ꋍ','ꋎ'=>'ꋎ','ꋏ'=>'ꋏ','ꋐ'=>'ꋐ','ꋑ'=>'ꋑ','ꋒ'=>'ꋒ','ꋓ'=>'ꋓ','ꋔ'=>'ꋔ','ꋕ'=>'ꋕ','ꋖ'=>'ꋖ','ꋗ'=>'ꋗ','ꋘ'=>'ꋘ','ꋙ'=>'ꋙ','ꋚ'=>'ꋚ','ꋛ'=>'ꋛ','ꋜ'=>'ꋜ','ꋝ'=>'ꋝ','ꋞ'=>'ꋞ','ꋟ'=>'ꋟ','ꋠ'=>'ꋠ','ꋡ'=>'ꋡ','ꋢ'=>'ꋢ','ꋣ'=>'ꋣ','ꋤ'=>'ꋤ','ꋥ'=>'ꋥ','ꋦ'=>'ꋦ','ꋧ'=>'ꋧ','ꋨ'=>'ꋨ','ꋩ'=>'ꋩ','ꋪ'=>'ꋪ','ꋫ'=>'ꋫ','ꋬ'=>'ꋬ','ꋭ'=>'ꋭ','ꋮ'=>'ꋮ','ꋯ'=>'ꋯ','ꋰ'=>'ꋰ','ꋱ'=>'ꋱ','ꋲ'=>'ꋲ','ꋳ'=>'ꋳ','ꋴ'=>'ꋴ','ꋵ'=>'ꋵ','ꋶ'=>'ꋶ','ꋷ'=>'ꋷ','ꋸ'=>'ꋸ','ꋹ'=>'ꋹ','ꋺ'=>'ꋺ','ꋻ'=>'ꋻ','ꋼ'=>'ꋼ','ꋽ'=>'ꋽ','ꋾ'=>'ꋾ','ꋿ'=>'ꋿ','ꌀ'=>'ꌀ','ꌁ'=>'ꌁ','ꌂ'=>'ꌂ','ꌃ'=>'ꌃ','ꌄ'=>'ꌄ','ꌅ'=>'ꌅ','ꌆ'=>'ꌆ','ꌇ'=>'ꌇ','ꌈ'=>'ꌈ','ꌉ'=>'ꌉ','ꌊ'=>'ꌊ','ꌋ'=>'ꌋ','ꌌ'=>'ꌌ','ꌍ'=>'ꌍ','ꌎ'=>'ꌎ','ꌏ'=>'ꌏ','ꌐ'=>'ꌐ','ꌑ'=>'ꌑ','ꌒ'=>'ꌒ','ꌓ'=>'ꌓ','ꌔ'=>'ꌔ','ꌕ'=>'ꌕ','ꌖ'=>'ꌖ','ꌗ'=>'ꌗ','ꌘ'=>'ꌘ','ꌙ'=>'ꌙ','ꌚ'=>'ꌚ','ꌛ'=>'ꌛ','ꌜ'=>'ꌜ','ꌝ'=>'ꌝ','ꌞ'=>'ꌞ','ꌟ'=>'ꌟ','ꌠ'=>'ꌠ','ꌡ'=>'ꌡ','ꌢ'=>'ꌢ','ꌣ'=>'ꌣ','ꌤ'=>'ꌤ','ꌥ'=>'ꌥ','ꌦ'=>'ꌦ','ꌧ'=>'ꌧ','ꌨ'=>'ꌨ','ꌩ'=>'ꌩ','ꌪ'=>'ꌪ','ꌫ'=>'ꌫ','ꌬ'=>'ꌬ','ꌭ'=>'ꌭ','ꌮ'=>'ꌮ','ꌯ'=>'ꌯ','ꌰ'=>'ꌰ','ꌱ'=>'ꌱ','ꌲ'=>'ꌲ','ꌳ'=>'ꌳ','ꌴ'=>'ꌴ','ꌵ'=>'ꌵ','ꌶ'=>'ꌶ','ꌷ'=>'ꌷ','ꌸ'=>'ꌸ','ꌹ'=>'ꌹ','ꌺ'=>'ꌺ','ꌻ'=>'ꌻ','ꌼ'=>'ꌼ','ꌽ'=>'ꌽ','ꌾ'=>'ꌾ','ꌿ'=>'ꌿ','ꍀ'=>'ꍀ','ꍁ'=>'ꍁ','ꍂ'=>'ꍂ','ꍃ'=>'ꍃ','ꍄ'=>'ꍄ','ꍅ'=>'ꍅ','ꍆ'=>'ꍆ','ꍇ'=>'ꍇ','ꍈ'=>'ꍈ','ꍉ'=>'ꍉ','ꍊ'=>'ꍊ','ꍋ'=>'ꍋ','ꍌ'=>'ꍌ','ꍍ'=>'ꍍ','ꍎ'=>'ꍎ','ꍏ'=>'ꍏ','ꍐ'=>'ꍐ','ꍑ'=>'ꍑ','ꍒ'=>'ꍒ','ꍓ'=>'ꍓ','ꍔ'=>'ꍔ','ꍕ'=>'ꍕ','ꍖ'=>'ꍖ','ꍗ'=>'ꍗ','ꍘ'=>'ꍘ','ꍙ'=>'ꍙ','ꍚ'=>'ꍚ','ꍛ'=>'ꍛ','ꍜ'=>'ꍜ','ꍝ'=>'ꍝ','ꍞ'=>'ꍞ','ꍟ'=>'ꍟ','ꍠ'=>'ꍠ','ꍡ'=>'ꍡ','ꍢ'=>'ꍢ','ꍣ'=>'ꍣ','ꍤ'=>'ꍤ','ꍥ'=>'ꍥ','ꍦ'=>'ꍦ','ꍧ'=>'ꍧ','ꍨ'=>'ꍨ','ꍩ'=>'ꍩ','ꍪ'=>'ꍪ','ꍫ'=>'ꍫ','ꍬ'=>'ꍬ','ꍭ'=>'ꍭ','ꍮ'=>'ꍮ','ꍯ'=>'ꍯ','ꍰ'=>'ꍰ','ꍱ'=>'ꍱ','ꍲ'=>'ꍲ','ꍳ'=>'ꍳ','ꍴ'=>'ꍴ','ꍵ'=>'ꍵ','ꍶ'=>'ꍶ','ꍷ'=>'ꍷ','ꍸ'=>'ꍸ','ꍹ'=>'ꍹ','ꍺ'=>'ꍺ','ꍻ'=>'ꍻ','ꍼ'=>'ꍼ','ꍽ'=>'ꍽ','ꍾ'=>'ꍾ','ꍿ'=>'ꍿ','ꎀ'=>'ꎀ','ꎁ'=>'ꎁ','ꎂ'=>'ꎂ','ꎃ'=>'ꎃ','ꎄ'=>'ꎄ','ꎅ'=>'ꎅ','ꎆ'=>'ꎆ','ꎇ'=>'ꎇ','ꎈ'=>'ꎈ','ꎉ'=>'ꎉ','ꎊ'=>'ꎊ','ꎋ'=>'ꎋ','ꎌ'=>'ꎌ','ꎍ'=>'ꎍ','ꎎ'=>'ꎎ','ꎏ'=>'ꎏ','ꎐ'=>'ꎐ','ꎑ'=>'ꎑ','ꎒ'=>'ꎒ','ꎓ'=>'ꎓ','ꎔ'=>'ꎔ','ꎕ'=>'ꎕ','ꎖ'=>'ꎖ','ꎗ'=>'ꎗ','ꎘ'=>'ꎘ','ꎙ'=>'ꎙ','ꎚ'=>'ꎚ','ꎛ'=>'ꎛ','ꎜ'=>'ꎜ','ꎝ'=>'ꎝ','ꎞ'=>'ꎞ','ꎟ'=>'ꎟ','ꎠ'=>'ꎠ','ꎡ'=>'ꎡ','ꎢ'=>'ꎢ','ꎣ'=>'ꎣ','ꎤ'=>'ꎤ','ꎥ'=>'ꎥ','ꎦ'=>'ꎦ','ꎧ'=>'ꎧ','ꎨ'=>'ꎨ','ꎩ'=>'ꎩ','ꎪ'=>'ꎪ','ꎫ'=>'ꎫ','ꎬ'=>'ꎬ','ꎭ'=>'ꎭ','ꎮ'=>'ꎮ','ꎯ'=>'ꎯ','ꎰ'=>'ꎰ','ꎱ'=>'ꎱ','ꎲ'=>'ꎲ','ꎳ'=>'ꎳ','ꎴ'=>'ꎴ','ꎵ'=>'ꎵ','ꎶ'=>'ꎶ','ꎷ'=>'ꎷ','ꎸ'=>'ꎸ','ꎹ'=>'ꎹ','ꎺ'=>'ꎺ','ꎻ'=>'ꎻ','ꎼ'=>'ꎼ','ꎽ'=>'ꎽ','ꎾ'=>'ꎾ','ꎿ'=>'ꎿ','ꏀ'=>'ꏀ','ꏁ'=>'ꏁ','ꏂ'=>'ꏂ','ꏃ'=>'ꏃ','ꏄ'=>'ꏄ','ꏅ'=>'ꏅ','ꏆ'=>'ꏆ','ꏇ'=>'ꏇ','ꏈ'=>'ꏈ','ꏉ'=>'ꏉ','ꏊ'=>'ꏊ','ꏋ'=>'ꏋ','ꏌ'=>'ꏌ','ꏍ'=>'ꏍ','ꏎ'=>'ꏎ','ꏏ'=>'ꏏ','ꏐ'=>'ꏐ','ꏑ'=>'ꏑ','ꏒ'=>'ꏒ','ꏓ'=>'ꏓ','ꏔ'=>'ꏔ','ꏕ'=>'ꏕ','ꏖ'=>'ꏖ','ꏗ'=>'ꏗ','ꏘ'=>'ꏘ','ꏙ'=>'ꏙ','ꏚ'=>'ꏚ','ꏛ'=>'ꏛ','ꏜ'=>'ꏜ','ꏝ'=>'ꏝ','ꏞ'=>'ꏞ','ꏟ'=>'ꏟ','ꏠ'=>'ꏠ','ꏡ'=>'ꏡ','ꏢ'=>'ꏢ','ꏣ'=>'ꏣ','ꏤ'=>'ꏤ','ꏥ'=>'ꏥ','ꏦ'=>'ꏦ','ꏧ'=>'ꏧ','ꏨ'=>'ꏨ','ꏩ'=>'ꏩ','ꏪ'=>'ꏪ','ꏫ'=>'ꏫ','ꏬ'=>'ꏬ','ꏭ'=>'ꏭ','ꏮ'=>'ꏮ','ꏯ'=>'ꏯ','ꏰ'=>'ꏰ','ꏱ'=>'ꏱ','ꏲ'=>'ꏲ','ꏳ'=>'ꏳ','ꏴ'=>'ꏴ','ꏵ'=>'ꏵ','ꏶ'=>'ꏶ','ꏷ'=>'ꏷ','ꏸ'=>'ꏸ','ꏹ'=>'ꏹ','ꏺ'=>'ꏺ','ꏻ'=>'ꏻ','ꏼ'=>'ꏼ','ꏽ'=>'ꏽ','ꏾ'=>'ꏾ','ꏿ'=>'ꏿ','ꐀ'=>'ꐀ','ꐁ'=>'ꐁ','ꐂ'=>'ꐂ','ꐃ'=>'ꐃ','ꐄ'=>'ꐄ','ꐅ'=>'ꐅ','ꐆ'=>'ꐆ','ꐇ'=>'ꐇ','ꐈ'=>'ꐈ','ꐉ'=>'ꐉ','ꐊ'=>'ꐊ','ꐋ'=>'ꐋ','ꐌ'=>'ꐌ','ꐍ'=>'ꐍ','ꐎ'=>'ꐎ','ꐏ'=>'ꐏ','ꐐ'=>'ꐐ','ꐑ'=>'ꐑ','ꐒ'=>'ꐒ','ꐓ'=>'ꐓ','ꐔ'=>'ꐔ','ꐕ'=>'ꐕ','ꐖ'=>'ꐖ','ꐗ'=>'ꐗ','ꐘ'=>'ꐘ','ꐙ'=>'ꐙ','ꐚ'=>'ꐚ','ꐛ'=>'ꐛ','ꐜ'=>'ꐜ','ꐝ'=>'ꐝ','ꐞ'=>'ꐞ','ꐟ'=>'ꐟ','ꐠ'=>'ꐠ','ꐡ'=>'ꐡ','ꐢ'=>'ꐢ','ꐣ'=>'ꐣ','ꐤ'=>'ꐤ','ꐥ'=>'ꐥ','ꐦ'=>'ꐦ','ꐧ'=>'ꐧ','ꐨ'=>'ꐨ','ꐩ'=>'ꐩ','ꐪ'=>'ꐪ','ꐫ'=>'ꐫ','ꐬ'=>'ꐬ','ꐭ'=>'ꐭ','ꐮ'=>'ꐮ','ꐯ'=>'ꐯ','ꐰ'=>'ꐰ','ꐱ'=>'ꐱ','ꐲ'=>'ꐲ','ꐳ'=>'ꐳ','ꐴ'=>'ꐴ','ꐵ'=>'ꐵ','ꐶ'=>'ꐶ','ꐷ'=>'ꐷ','ꐸ'=>'ꐸ','ꐹ'=>'ꐹ','ꐺ'=>'ꐺ','ꐻ'=>'ꐻ','ꐼ'=>'ꐼ','ꐽ'=>'ꐽ','ꐾ'=>'ꐾ','ꐿ'=>'ꐿ','ꑀ'=>'ꑀ','ꑁ'=>'ꑁ','ꑂ'=>'ꑂ','ꑃ'=>'ꑃ','ꑄ'=>'ꑄ','ꑅ'=>'ꑅ','ꑆ'=>'ꑆ','ꑇ'=>'ꑇ','ꑈ'=>'ꑈ','ꑉ'=>'ꑉ','ꑊ'=>'ꑊ','ꑋ'=>'ꑋ','ꑌ'=>'ꑌ','ꑍ'=>'ꑍ','ꑎ'=>'ꑎ','ꑏ'=>'ꑏ','ꑐ'=>'ꑐ','ꑑ'=>'ꑑ','ꑒ'=>'ꑒ','ꑓ'=>'ꑓ','ꑔ'=>'ꑔ','ꑕ'=>'ꑕ','ꑖ'=>'ꑖ','ꑗ'=>'ꑗ','ꑘ'=>'ꑘ','ꑙ'=>'ꑙ','ꑚ'=>'ꑚ','ꑛ'=>'ꑛ','ꑜ'=>'ꑜ','ꑝ'=>'ꑝ','ꑞ'=>'ꑞ','ꑟ'=>'ꑟ','ꑠ'=>'ꑠ','ꑡ'=>'ꑡ','ꑢ'=>'ꑢ','ꑣ'=>'ꑣ','ꑤ'=>'ꑤ','ꑥ'=>'ꑥ','ꑦ'=>'ꑦ','ꑧ'=>'ꑧ','ꑨ'=>'ꑨ','ꑩ'=>'ꑩ','ꑪ'=>'ꑪ','ꑫ'=>'ꑫ','ꑬ'=>'ꑬ','ꑭ'=>'ꑭ','ꑮ'=>'ꑮ','ꑯ'=>'ꑯ','ꑰ'=>'ꑰ','ꑱ'=>'ꑱ','ꑲ'=>'ꑲ','ꑳ'=>'ꑳ','ꑴ'=>'ꑴ','ꑵ'=>'ꑵ','ꑶ'=>'ꑶ','ꑷ'=>'ꑷ','ꑸ'=>'ꑸ','ꑹ'=>'ꑹ','ꑺ'=>'ꑺ','ꑻ'=>'ꑻ','ꑼ'=>'ꑼ','ꑽ'=>'ꑽ','ꑾ'=>'ꑾ','ꑿ'=>'ꑿ','ꒀ'=>'ꒀ','ꒁ'=>'ꒁ','ꒂ'=>'ꒂ','ꒃ'=>'ꒃ','ꒄ'=>'ꒄ','ꒅ'=>'ꒅ','ꒆ'=>'ꒆ','ꒇ'=>'ꒇ','ꒈ'=>'ꒈ','ꒉ'=>'ꒉ','ꒊ'=>'ꒊ','ꒋ'=>'ꒋ','ꒌ'=>'ꒌ','ꜗ'=>'ꜗ','ꜘ'=>'ꜘ','ꜙ'=>'ꜙ','ꜚ'=>'ꜚ');
diff --git a/phpBB/includes/utf/data/search_indexer_21.php b/phpBB/includes/utf/data/search_indexer_21.php
index 7fc3e4dc09..34994b47d7 100644
--- a/phpBB/includes/utf/data/search_indexer_21.php
+++ b/phpBB/includes/utf/data/search_indexer_21.php
@@ -1 +1 @@
-<?php return array('ꠀ'=>'ꠀ','ꠁ'=>'ꠁ','ꠂ'=>'ꠂ','ꠃ'=>'ꠃ','ꠄ'=>'ꠄ','ꠅ'=>'ꠅ','꠆'=>'꠆','ꠇ'=>'ꠇ','ꠈ'=>'ꠈ','ꠉ'=>'ꠉ','ꠊ'=>'ꠊ','ꠋ'=>'ꠋ','ꠌ'=>'ꠌ','ꠍ'=>'ꠍ','ꠎ'=>'ꠎ','ꠏ'=>'ꠏ','ꠐ'=>'ꠐ','ꠑ'=>'ꠑ','ꠒ'=>'ꠒ','ꠓ'=>'ꠓ','ꠔ'=>'ꠔ','ꠕ'=>'ꠕ','ꠖ'=>'ꠖ','ꠗ'=>'ꠗ','ꠘ'=>'ꠘ','ꠙ'=>'ꠙ','ꠚ'=>'ꠚ','ꠛ'=>'ꠛ','ꠜ'=>'ꠜ','ꠝ'=>'ꠝ','ꠞ'=>'ꠞ','ꠟ'=>'ꠟ','ꠠ'=>'ꠠ','ꠡ'=>'ꠡ','ꠢ'=>'ꠢ','ꠣ'=>'ꠣ','ꠤ'=>'ꠤ','ꠥ'=>'ꠥ','ꠦ'=>'ꠦ','ꠧ'=>'ꠧ','ꡀ'=>'ꡀ','ꡁ'=>'ꡁ','ꡂ'=>'ꡂ','ꡃ'=>'ꡃ','ꡄ'=>'ꡄ','ꡅ'=>'ꡅ','ꡆ'=>'ꡆ','ꡇ'=>'ꡇ','ꡈ'=>'ꡈ','ꡉ'=>'ꡉ','ꡊ'=>'ꡊ','ꡋ'=>'ꡋ','ꡌ'=>'ꡌ','ꡍ'=>'ꡍ','ꡎ'=>'ꡎ','ꡏ'=>'ꡏ','ꡐ'=>'ꡐ','ꡑ'=>'ꡑ','ꡒ'=>'ꡒ','ꡓ'=>'ꡓ','ꡔ'=>'ꡔ','ꡕ'=>'ꡕ','ꡖ'=>'ꡖ','ꡗ'=>'ꡗ','ꡘ'=>'ꡘ','ꡙ'=>'ꡙ','ꡚ'=>'ꡚ','ꡛ'=>'ꡛ','ꡜ'=>'ꡜ','ꡝ'=>'ꡝ','ꡞ'=>'ꡞ','ꡟ'=>'ꡟ','ꡠ'=>'ꡠ','ꡡ'=>'ꡡ','ꡢ'=>'ꡢ','ꡣ'=>'ꡣ','ꡤ'=>'ꡤ','ꡥ'=>'ꡥ','ꡦ'=>'ꡦ','ꡧ'=>'ꡧ','ꡨ'=>'ꡨ','ꡩ'=>'ꡩ','ꡪ'=>'ꡪ','ꡫ'=>'ꡫ','ꡬ'=>'ꡬ','ꡭ'=>'ꡭ','ꡮ'=>'ꡮ','ꡯ'=>'ꡯ','ꡰ'=>'ꡰ','ꡱ'=>'ꡱ','ꡲ'=>'ꡲ','ꡳ'=>'ꡳ','가'=>'가'); \ No newline at end of file
+<?php return array('ꠀ'=>'ꠀ','ꠁ'=>'ꠁ','ꠂ'=>'ꠂ','ꠃ'=>'ꠃ','ꠄ'=>'ꠄ','ꠅ'=>'ꠅ','꠆'=>'꠆','ꠇ'=>'ꠇ','ꠈ'=>'ꠈ','ꠉ'=>'ꠉ','ꠊ'=>'ꠊ','ꠋ'=>'ꠋ','ꠌ'=>'ꠌ','ꠍ'=>'ꠍ','ꠎ'=>'ꠎ','ꠏ'=>'ꠏ','ꠐ'=>'ꠐ','ꠑ'=>'ꠑ','ꠒ'=>'ꠒ','ꠓ'=>'ꠓ','ꠔ'=>'ꠔ','ꠕ'=>'ꠕ','ꠖ'=>'ꠖ','ꠗ'=>'ꠗ','ꠘ'=>'ꠘ','ꠙ'=>'ꠙ','ꠚ'=>'ꠚ','ꠛ'=>'ꠛ','ꠜ'=>'ꠜ','ꠝ'=>'ꠝ','ꠞ'=>'ꠞ','ꠟ'=>'ꠟ','ꠠ'=>'ꠠ','ꠡ'=>'ꠡ','ꠢ'=>'ꠢ','ꠣ'=>'ꠣ','ꠤ'=>'ꠤ','ꠥ'=>'ꠥ','ꠦ'=>'ꠦ','ꠧ'=>'ꠧ','ꡀ'=>'ꡀ','ꡁ'=>'ꡁ','ꡂ'=>'ꡂ','ꡃ'=>'ꡃ','ꡄ'=>'ꡄ','ꡅ'=>'ꡅ','ꡆ'=>'ꡆ','ꡇ'=>'ꡇ','ꡈ'=>'ꡈ','ꡉ'=>'ꡉ','ꡊ'=>'ꡊ','ꡋ'=>'ꡋ','ꡌ'=>'ꡌ','ꡍ'=>'ꡍ','ꡎ'=>'ꡎ','ꡏ'=>'ꡏ','ꡐ'=>'ꡐ','ꡑ'=>'ꡑ','ꡒ'=>'ꡒ','ꡓ'=>'ꡓ','ꡔ'=>'ꡔ','ꡕ'=>'ꡕ','ꡖ'=>'ꡖ','ꡗ'=>'ꡗ','ꡘ'=>'ꡘ','ꡙ'=>'ꡙ','ꡚ'=>'ꡚ','ꡛ'=>'ꡛ','ꡜ'=>'ꡜ','ꡝ'=>'ꡝ','ꡞ'=>'ꡞ','ꡟ'=>'ꡟ','ꡠ'=>'ꡠ','ꡡ'=>'ꡡ','ꡢ'=>'ꡢ','ꡣ'=>'ꡣ','ꡤ'=>'ꡤ','ꡥ'=>'ꡥ','ꡦ'=>'ꡦ','ꡧ'=>'ꡧ','ꡨ'=>'ꡨ','ꡩ'=>'ꡩ','ꡪ'=>'ꡪ','ꡫ'=>'ꡫ','ꡬ'=>'ꡬ','ꡭ'=>'ꡭ','ꡮ'=>'ꡮ','ꡯ'=>'ꡯ','ꡰ'=>'ꡰ','ꡱ'=>'ꡱ','ꡲ'=>'ꡲ','ꡳ'=>'ꡳ','가'=>'가');
diff --git a/phpBB/includes/utf/data/search_indexer_26.php b/phpBB/includes/utf/data/search_indexer_26.php
index b8718bd608..444ab96ba8 100644
--- a/phpBB/includes/utf/data/search_indexer_26.php
+++ b/phpBB/includes/utf/data/search_indexer_26.php
@@ -1 +1 @@
-<?php return array('힣'=>'힣'); \ No newline at end of file
+<?php return array('힣'=>'힣');
diff --git a/phpBB/includes/utf/data/search_indexer_3.php b/phpBB/includes/utf/data/search_indexer_3.php
index 41798c9e86..ceab762ca9 100644
--- a/phpBB/includes/utf/data/search_indexer_3.php
+++ b/phpBB/includes/utf/data/search_indexer_3.php
@@ -1 +1 @@
-<?php return array('᠋'=>'᠋','᠌'=>'᠌','᠍'=>'᠍','᠐'=>'0','᠑'=>'1','᠒'=>'2','᠓'=>'3','᠔'=>'4','᠕'=>'5','᠖'=>'6','᠗'=>'7','᠘'=>'8','᠙'=>'9','ᠠ'=>'ᠠ','ᠡ'=>'ᠡ','ᠢ'=>'ᠢ','ᠣ'=>'ᠣ','ᠤ'=>'ᠤ','ᠥ'=>'ᠥ','ᠦ'=>'ᠦ','ᠧ'=>'ᠧ','ᠨ'=>'ᠨ','ᠩ'=>'ᠩ','ᠪ'=>'ᠪ','ᠫ'=>'ᠫ','ᠬ'=>'ᠬ','ᠭ'=>'ᠭ','ᠮ'=>'ᠮ','ᠯ'=>'ᠯ','ᠰ'=>'ᠰ','ᠱ'=>'ᠱ','ᠲ'=>'ᠲ','ᠳ'=>'ᠳ','ᠴ'=>'ᠴ','ᠵ'=>'ᠵ','ᠶ'=>'ᠶ','ᠷ'=>'ᠷ','ᠸ'=>'ᠸ','ᠹ'=>'ᠹ','ᠺ'=>'ᠺ','ᠻ'=>'ᠻ','ᠼ'=>'ᠼ','ᠽ'=>'ᠽ','ᠾ'=>'ᠾ','ᠿ'=>'ᠿ','ᡀ'=>'ᡀ','ᡁ'=>'ᡁ','ᡂ'=>'ᡂ','ᡃ'=>'ᡃ','ᡄ'=>'ᡄ','ᡅ'=>'ᡅ','ᡆ'=>'ᡆ','ᡇ'=>'ᡇ','ᡈ'=>'ᡈ','ᡉ'=>'ᡉ','ᡊ'=>'ᡊ','ᡋ'=>'ᡋ','ᡌ'=>'ᡌ','ᡍ'=>'ᡍ','ᡎ'=>'ᡎ','ᡏ'=>'ᡏ','ᡐ'=>'ᡐ','ᡑ'=>'ᡑ','ᡒ'=>'ᡒ','ᡓ'=>'ᡓ','ᡔ'=>'ᡔ','ᡕ'=>'ᡕ','ᡖ'=>'ᡖ','ᡗ'=>'ᡗ','ᡘ'=>'ᡘ','ᡙ'=>'ᡙ','ᡚ'=>'ᡚ','ᡛ'=>'ᡛ','ᡜ'=>'ᡜ','ᡝ'=>'ᡝ','ᡞ'=>'ᡞ','ᡟ'=>'ᡟ','ᡠ'=>'ᡠ','ᡡ'=>'ᡡ','ᡢ'=>'ᡢ','ᡣ'=>'ᡣ','ᡤ'=>'ᡤ','ᡥ'=>'ᡥ','ᡦ'=>'ᡦ','ᡧ'=>'ᡧ','ᡨ'=>'ᡨ','ᡩ'=>'ᡩ','ᡪ'=>'ᡪ','ᡫ'=>'ᡫ','ᡬ'=>'ᡬ','ᡭ'=>'ᡭ','ᡮ'=>'ᡮ','ᡯ'=>'ᡯ','ᡰ'=>'ᡰ','ᡱ'=>'ᡱ','ᡲ'=>'ᡲ','ᡳ'=>'ᡳ','ᡴ'=>'ᡴ','ᡵ'=>'ᡵ','ᡶ'=>'ᡶ','ᡷ'=>'ᡷ','ᢀ'=>'ᢀ','ᢁ'=>'ᢁ','ᢂ'=>'ᢂ','ᢃ'=>'ᢃ','ᢄ'=>'ᢄ','ᢅ'=>'ᢅ','ᢆ'=>'ᢆ','ᢇ'=>'ᢇ','ᢈ'=>'ᢈ','ᢉ'=>'ᢉ','ᢊ'=>'ᢊ','ᢋ'=>'ᢋ','ᢌ'=>'ᢌ','ᢍ'=>'ᢍ','ᢎ'=>'ᢎ','ᢏ'=>'ᢏ','ᢐ'=>'ᢐ','ᢑ'=>'ᢑ','ᢒ'=>'ᢒ','ᢓ'=>'ᢓ','ᢔ'=>'ᢔ','ᢕ'=>'ᢕ','ᢖ'=>'ᢖ','ᢗ'=>'ᢗ','ᢘ'=>'ᢘ','ᢙ'=>'ᢙ','ᢚ'=>'ᢚ','ᢛ'=>'ᢛ','ᢜ'=>'ᢜ','ᢝ'=>'ᢝ','ᢞ'=>'ᢞ','ᢟ'=>'ᢟ','ᢠ'=>'ᢠ','ᢡ'=>'ᢡ','ᢢ'=>'ᢢ','ᢣ'=>'ᢣ','ᢤ'=>'ᢤ','ᢥ'=>'ᢥ','ᢦ'=>'ᢦ','ᢧ'=>'ᢧ','ᢨ'=>'ᢨ','ᢩ'=>'ᢩ','ᤀ'=>'ᤀ','ᤁ'=>'ᤁ','ᤂ'=>'ᤂ','ᤃ'=>'ᤃ','ᤄ'=>'ᤄ','ᤅ'=>'ᤅ','ᤆ'=>'ᤆ','ᤇ'=>'ᤇ','ᤈ'=>'ᤈ','ᤉ'=>'ᤉ','ᤊ'=>'ᤊ','ᤋ'=>'ᤋ','ᤌ'=>'ᤌ','ᤍ'=>'ᤍ','ᤎ'=>'ᤎ','ᤏ'=>'ᤏ','ᤐ'=>'ᤐ','ᤑ'=>'ᤑ','ᤒ'=>'ᤒ','ᤓ'=>'ᤓ','ᤔ'=>'ᤔ','ᤕ'=>'ᤕ','ᤖ'=>'ᤖ','ᤗ'=>'ᤗ','ᤘ'=>'ᤘ','ᤙ'=>'ᤙ','ᤚ'=>'ᤚ','ᤛ'=>'ᤛ','ᤜ'=>'ᤜ','ᤠ'=>'ᤠ','ᤡ'=>'ᤡ','ᤢ'=>'ᤢ','ᤣ'=>'ᤣ','ᤤ'=>'ᤤ','ᤥ'=>'ᤥ','ᤦ'=>'ᤦ','ᤧ'=>'ᤧ','ᤨ'=>'ᤨ','ᤩ'=>'ᤩ','ᤪ'=>'ᤪ','ᤫ'=>'ᤫ','ᤰ'=>'ᤰ','ᤱ'=>'ᤱ','ᤲ'=>'ᤲ','ᤳ'=>'ᤳ','ᤴ'=>'ᤴ','ᤵ'=>'ᤵ','ᤶ'=>'ᤶ','ᤷ'=>'ᤷ','ᤸ'=>'ᤸ','᤹'=>'᤹','᤺'=>'᤺','᤻'=>'᤻','᥆'=>'0','᥇'=>'1','᥈'=>'2','᥉'=>'3','᥊'=>'4','᥋'=>'5','᥌'=>'6','᥍'=>'7','᥎'=>'8','᥏'=>'9','ᥐ'=>'ᥐ','ᥑ'=>'ᥑ','ᥒ'=>'ᥒ','ᥓ'=>'ᥓ','ᥔ'=>'ᥔ','ᥕ'=>'ᥕ','ᥖ'=>'ᥖ','ᥗ'=>'ᥗ','ᥘ'=>'ᥘ','ᥙ'=>'ᥙ','ᥚ'=>'ᥚ','ᥛ'=>'ᥛ','ᥜ'=>'ᥜ','ᥝ'=>'ᥝ','ᥞ'=>'ᥞ','ᥟ'=>'ᥟ','ᥠ'=>'ᥠ','ᥡ'=>'ᥡ','ᥢ'=>'ᥢ','ᥣ'=>'ᥣ','ᥤ'=>'ᥤ','ᥥ'=>'ᥥ','ᥦ'=>'ᥦ','ᥧ'=>'ᥧ','ᥨ'=>'ᥨ','ᥩ'=>'ᥩ','ᥪ'=>'ᥪ','ᥫ'=>'ᥫ','ᥬ'=>'ᥬ','ᥭ'=>'ᥭ','ᥰ'=>'ᥰ','ᥱ'=>'ᥱ','ᥲ'=>'ᥲ','ᥳ'=>'ᥳ','ᥴ'=>'ᥴ','ᦀ'=>'ᦀ','ᦁ'=>'ᦁ','ᦂ'=>'ᦂ','ᦃ'=>'ᦃ','ᦄ'=>'ᦄ','ᦅ'=>'ᦅ','ᦆ'=>'ᦆ','ᦇ'=>'ᦇ','ᦈ'=>'ᦈ','ᦉ'=>'ᦉ','ᦊ'=>'ᦊ','ᦋ'=>'ᦋ','ᦌ'=>'ᦌ','ᦍ'=>'ᦍ','ᦎ'=>'ᦎ','ᦏ'=>'ᦏ','ᦐ'=>'ᦐ','ᦑ'=>'ᦑ','ᦒ'=>'ᦒ','ᦓ'=>'ᦓ','ᦔ'=>'ᦔ','ᦕ'=>'ᦕ','ᦖ'=>'ᦖ','ᦗ'=>'ᦗ','ᦘ'=>'ᦘ','ᦙ'=>'ᦙ','ᦚ'=>'ᦚ','ᦛ'=>'ᦛ','ᦜ'=>'ᦜ','ᦝ'=>'ᦝ','ᦞ'=>'ᦞ','ᦟ'=>'ᦟ','ᦠ'=>'ᦠ','ᦡ'=>'ᦡ','ᦢ'=>'ᦢ','ᦣ'=>'ᦣ','ᦤ'=>'ᦤ','ᦥ'=>'ᦥ','ᦦ'=>'ᦦ','ᦧ'=>'ᦧ','ᦨ'=>'ᦨ','ᦩ'=>'ᦩ','ᦰ'=>'ᦰ','ᦱ'=>'ᦱ','ᦲ'=>'ᦲ','ᦳ'=>'ᦳ','ᦴ'=>'ᦴ','ᦵ'=>'ᦵ','ᦶ'=>'ᦶ','ᦷ'=>'ᦷ','ᦸ'=>'ᦸ','ᦹ'=>'ᦹ','ᦺ'=>'ᦺ','ᦻ'=>'ᦻ','ᦼ'=>'ᦼ','ᦽ'=>'ᦽ','ᦾ'=>'ᦾ','ᦿ'=>'ᦿ','ᧀ'=>'ᧀ','ᧁ'=>'ᧁ','ᧂ'=>'ᧂ','ᧃ'=>'ᧃ','ᧄ'=>'ᧄ','ᧅ'=>'ᧅ','ᧆ'=>'ᧆ','ᧇ'=>'ᧇ','ᧈ'=>'ᧈ','ᧉ'=>'ᧉ','᧐'=>'0','᧑'=>'1','᧒'=>'2','᧓'=>'3','᧔'=>'4','᧕'=>'5','᧖'=>'6','᧗'=>'7','᧘'=>'8','᧙'=>'9','ᨀ'=>'ᨀ','ᨁ'=>'ᨁ','ᨂ'=>'ᨂ','ᨃ'=>'ᨃ','ᨄ'=>'ᨄ','ᨅ'=>'ᨅ','ᨆ'=>'ᨆ','ᨇ'=>'ᨇ','ᨈ'=>'ᨈ','ᨉ'=>'ᨉ','ᨊ'=>'ᨊ','ᨋ'=>'ᨋ','ᨌ'=>'ᨌ','ᨍ'=>'ᨍ','ᨎ'=>'ᨎ','ᨏ'=>'ᨏ','ᨐ'=>'ᨐ','ᨑ'=>'ᨑ','ᨒ'=>'ᨒ','ᨓ'=>'ᨓ','ᨔ'=>'ᨔ','ᨕ'=>'ᨕ','ᨖ'=>'ᨖ','ᨗ'=>'ᨗ','ᨘ'=>'ᨘ','ᨙ'=>'ᨙ','ᨚ'=>'ᨚ','ᨛ'=>'ᨛ','ᬀ'=>'ᬀ','ᬁ'=>'ᬁ','ᬂ'=>'ᬂ','ᬃ'=>'ᬃ','ᬄ'=>'ᬄ','ᬅ'=>'ᬅ','ᬆ'=>'ᬆ','ᬇ'=>'ᬇ','ᬈ'=>'ᬈ','ᬉ'=>'ᬉ','ᬊ'=>'ᬊ','ᬋ'=>'ᬋ','ᬌ'=>'ᬌ','ᬍ'=>'ᬍ','ᬎ'=>'ᬎ','ᬏ'=>'ᬏ','ᬐ'=>'ᬐ','ᬑ'=>'ᬑ','ᬒ'=>'ᬒ','ᬓ'=>'ᬓ','ᬔ'=>'ᬔ','ᬕ'=>'ᬕ','ᬖ'=>'ᬖ','ᬗ'=>'ᬗ','ᬘ'=>'ᬘ','ᬙ'=>'ᬙ','ᬚ'=>'ᬚ','ᬛ'=>'ᬛ','ᬜ'=>'ᬜ','ᬝ'=>'ᬝ','ᬞ'=>'ᬞ','ᬟ'=>'ᬟ','ᬠ'=>'ᬠ','ᬡ'=>'ᬡ','ᬢ'=>'ᬢ','ᬣ'=>'ᬣ','ᬤ'=>'ᬤ','ᬥ'=>'ᬥ','ᬦ'=>'ᬦ','ᬧ'=>'ᬧ','ᬨ'=>'ᬨ','ᬩ'=>'ᬩ','ᬪ'=>'ᬪ','ᬫ'=>'ᬫ','ᬬ'=>'ᬬ','ᬭ'=>'ᬭ','ᬮ'=>'ᬮ','ᬯ'=>'ᬯ','ᬰ'=>'ᬰ','ᬱ'=>'ᬱ','ᬲ'=>'ᬲ','ᬳ'=>'ᬳ','᬴'=>'᬴','ᬵ'=>'ᬵ','ᬶ'=>'ᬶ','ᬷ'=>'ᬷ','ᬸ'=>'ᬸ','ᬹ'=>'ᬹ','ᬺ'=>'ᬺ','ᬻ'=>'ᬻ','ᬼ'=>'ᬼ','ᬽ'=>'ᬽ','ᬾ'=>'ᬾ','ᬿ'=>'ᬿ','ᭀ'=>'ᭀ','ᭁ'=>'ᭁ','ᭂ'=>'ᭂ','ᭃ'=>'ᭃ','᭄'=>'᭄','ᭅ'=>'ᭅ','ᭆ'=>'ᭆ','ᭇ'=>'ᭇ','ᭈ'=>'ᭈ','ᭉ'=>'ᭉ','ᭊ'=>'ᭊ','ᭋ'=>'ᭋ','᭐'=>'0','᭑'=>'1','᭒'=>'2','᭓'=>'3','᭔'=>'4','᭕'=>'5','᭖'=>'6','᭗'=>'7','᭘'=>'8','᭙'=>'9','᭫'=>'᭫','᭬'=>'᭬','᭭'=>'᭭','᭮'=>'᭮','᭯'=>'᭯','᭰'=>'᭰','᭱'=>'᭱','᭲'=>'᭲','᭳'=>'᭳','ᴀ'=>'ᴀ','ᴁ'=>'ᴁ','ᴂ'=>'ᴂ','ᴃ'=>'ᴃ','ᴄ'=>'ᴄ','ᴅ'=>'ᴅ','ᴆ'=>'ᴆ','ᴇ'=>'ᴇ','ᴈ'=>'ᴈ','ᴉ'=>'ᴉ','ᴊ'=>'ᴊ','ᴋ'=>'ᴋ','ᴌ'=>'ᴌ','ᴍ'=>'ᴍ','ᴎ'=>'ᴎ','ᴏ'=>'ᴏ','ᴐ'=>'ᴐ','ᴑ'=>'ᴑ','ᴒ'=>'ᴒ','ᴓ'=>'ᴓ','ᴔ'=>'ᴔ','ᴕ'=>'ᴕ','ᴖ'=>'ᴖ','ᴗ'=>'ᴗ','ᴘ'=>'ᴘ','ᴙ'=>'ᴙ','ᴚ'=>'ᴚ','ᴛ'=>'ᴛ','ᴜ'=>'ᴜ','ᴝ'=>'ᴝ','ᴞ'=>'ᴞ','ᴟ'=>'ᴟ','ᴠ'=>'ᴠ','ᴡ'=>'ᴡ','ᴢ'=>'ᴢ','ᴣ'=>'ᴣ','ᴤ'=>'ᴤ','ᴥ'=>'ᴥ','ᴦ'=>'ᴦ','ᴧ'=>'ᴧ','ᴨ'=>'ᴨ','ᴩ'=>'ᴩ','ᴪ'=>'ᴪ','ᴫ'=>'ᴫ','ᴬ'=>'ᴬ','ᴭ'=>'ᴭ','ᴮ'=>'ᴮ','ᴯ'=>'ᴯ','ᴰ'=>'ᴰ','ᴱ'=>'ᴱ','ᴲ'=>'ᴲ','ᴳ'=>'ᴳ','ᴴ'=>'ᴴ','ᴵ'=>'ᴵ','ᴶ'=>'ᴶ','ᴷ'=>'ᴷ','ᴸ'=>'ᴸ','ᴹ'=>'ᴹ','ᴺ'=>'ᴺ','ᴻ'=>'ᴻ','ᴼ'=>'ᴼ','ᴽ'=>'ᴽ','ᴾ'=>'ᴾ','ᴿ'=>'ᴿ','ᵀ'=>'ᵀ','ᵁ'=>'ᵁ','ᵂ'=>'ᵂ','ᵃ'=>'ᵃ','ᵄ'=>'ᵄ','ᵅ'=>'ᵅ','ᵆ'=>'ᵆ','ᵇ'=>'ᵇ','ᵈ'=>'ᵈ','ᵉ'=>'ᵉ','ᵊ'=>'ᵊ','ᵋ'=>'ᵋ','ᵌ'=>'ᵌ','ᵍ'=>'ᵍ','ᵎ'=>'ᵎ','ᵏ'=>'ᵏ','ᵐ'=>'ᵐ','ᵑ'=>'ᵑ','ᵒ'=>'ᵒ','ᵓ'=>'ᵓ','ᵔ'=>'ᵔ','ᵕ'=>'ᵕ','ᵖ'=>'ᵖ','ᵗ'=>'ᵗ','ᵘ'=>'ᵘ','ᵙ'=>'ᵙ','ᵚ'=>'ᵚ','ᵛ'=>'ᵛ','ᵜ'=>'ᵜ','ᵝ'=>'ᵝ','ᵞ'=>'ᵞ','ᵟ'=>'ᵟ','ᵠ'=>'ᵠ','ᵡ'=>'ᵡ','ᵢ'=>'ᵢ','ᵣ'=>'ᵣ','ᵤ'=>'ᵤ','ᵥ'=>'ᵥ','ᵦ'=>'ᵦ','ᵧ'=>'ᵧ','ᵨ'=>'ᵨ','ᵩ'=>'ᵩ','ᵪ'=>'ᵪ','ᵫ'=>'ue','ᵬ'=>'ᵬ','ᵭ'=>'ᵭ','ᵮ'=>'ᵮ','ᵯ'=>'ᵯ','ᵰ'=>'ᵰ','ᵱ'=>'ᵱ','ᵲ'=>'ᵲ','ᵳ'=>'ᵳ','ᵴ'=>'ᵴ','ᵵ'=>'ᵵ','ᵶ'=>'ᵶ','ᵷ'=>'ᵷ','ᵸ'=>'ᵸ','ᵹ'=>'ᵹ','ᵺ'=>'ᵺ','ᵻ'=>'ᵻ','ᵼ'=>'ᵼ','ᵽ'=>'ᵽ','ᵾ'=>'ᵾ','ᵿ'=>'ᵿ','ᶀ'=>'ᶀ','ᶁ'=>'ᶁ','ᶂ'=>'ᶂ','ᶃ'=>'ᶃ','ᶄ'=>'ᶄ','ᶅ'=>'ᶅ','ᶆ'=>'ᶆ','ᶇ'=>'ᶇ','ᶈ'=>'ᶈ','ᶉ'=>'ᶉ','ᶊ'=>'ᶊ','ᶋ'=>'ᶋ','ᶌ'=>'ᶌ','ᶍ'=>'ᶍ','ᶎ'=>'ᶎ','ᶏ'=>'ᶏ','ᶐ'=>'ᶐ','ᶑ'=>'ᶑ','ᶒ'=>'ᶒ','ᶓ'=>'ᶓ','ᶔ'=>'ᶔ','ᶕ'=>'ᶕ','ᶖ'=>'ᶖ','ᶗ'=>'ᶗ','ᶘ'=>'ᶘ','ᶙ'=>'ᶙ','ᶚ'=>'ᶚ','ᶛ'=>'ᶛ','ᶜ'=>'ᶜ','ᶝ'=>'ᶝ','ᶞ'=>'ᶞ','ᶟ'=>'ᶟ','ᶠ'=>'ᶠ','ᶡ'=>'ᶡ','ᶢ'=>'ᶢ','ᶣ'=>'ᶣ','ᶤ'=>'ᶤ','ᶥ'=>'ᶥ','ᶦ'=>'ᶦ','ᶧ'=>'ᶧ','ᶨ'=>'ᶨ','ᶩ'=>'ᶩ','ᶪ'=>'ᶪ','ᶫ'=>'ᶫ','ᶬ'=>'ᶬ','ᶭ'=>'ᶭ','ᶮ'=>'ᶮ','ᶯ'=>'ᶯ','ᶰ'=>'ᶰ','ᶱ'=>'ᶱ','ᶲ'=>'ᶲ','ᶳ'=>'ᶳ','ᶴ'=>'ᶴ','ᶵ'=>'ᶵ','ᶶ'=>'ᶶ','ᶷ'=>'ᶷ','ᶸ'=>'ᶸ','ᶹ'=>'ᶹ','ᶺ'=>'ᶺ','ᶻ'=>'ᶻ','ᶼ'=>'ᶼ','ᶽ'=>'ᶽ','ᶾ'=>'ᶾ','ᶿ'=>'ᶿ','᷀'=>'᷀','᷁'=>'᷁','᷂'=>'᷂','᷃'=>'᷃','᷄'=>'᷄','᷅'=>'᷅','᷆'=>'᷆','᷇'=>'᷇','᷈'=>'᷈','᷉'=>'᷉','᷊'=>'᷊','᷾'=>'᷾','᷿'=>'᷿','Ḁ'=>'ḁ','ḁ'=>'ḁ','Ḃ'=>'ḃ','ḃ'=>'ḃ','Ḅ'=>'ḅ','ḅ'=>'ḅ','Ḇ'=>'ḇ','ḇ'=>'ḇ','Ḉ'=>'ḉ','ḉ'=>'ḉ','Ḋ'=>'ḋ','ḋ'=>'ḋ','Ḍ'=>'ḍ','ḍ'=>'ḍ','Ḏ'=>'ḏ','ḏ'=>'ḏ','Ḑ'=>'ḑ','ḑ'=>'ḑ','Ḓ'=>'ḓ','ḓ'=>'ḓ','Ḕ'=>'ḕ','ḕ'=>'ḕ','Ḗ'=>'ḗ','ḗ'=>'ḗ','Ḙ'=>'ḙ','ḙ'=>'ḙ','Ḛ'=>'ḛ','ḛ'=>'ḛ','Ḝ'=>'ḝ','ḝ'=>'ḝ','Ḟ'=>'ḟ','ḟ'=>'ḟ','Ḡ'=>'ḡ','ḡ'=>'ḡ','Ḣ'=>'ḣ','ḣ'=>'ḣ','Ḥ'=>'ḥ','ḥ'=>'ḥ','Ḧ'=>'ḧ','ḧ'=>'ḧ','Ḩ'=>'ḩ','ḩ'=>'ḩ','Ḫ'=>'ḫ','ḫ'=>'ḫ','Ḭ'=>'ḭ','ḭ'=>'ḭ','Ḯ'=>'ḯ','ḯ'=>'ḯ','Ḱ'=>'ḱ','ḱ'=>'ḱ','Ḳ'=>'ḳ','ḳ'=>'ḳ','Ḵ'=>'ḵ','ḵ'=>'ḵ','Ḷ'=>'ḷ','ḷ'=>'ḷ','Ḹ'=>'ḹ','ḹ'=>'ḹ','Ḻ'=>'ḻ','ḻ'=>'ḻ','Ḽ'=>'ḽ','ḽ'=>'ḽ','Ḿ'=>'ḿ','ḿ'=>'ḿ','Ṁ'=>'ṁ','ṁ'=>'ṁ','Ṃ'=>'ṃ','ṃ'=>'ṃ','Ṅ'=>'ṅ','ṅ'=>'ṅ','Ṇ'=>'ṇ','ṇ'=>'ṇ','Ṉ'=>'ṉ','ṉ'=>'ṉ','Ṋ'=>'ṋ','ṋ'=>'ṋ','Ṍ'=>'ṍ','ṍ'=>'ṍ','Ṏ'=>'ṏ','ṏ'=>'ṏ','Ṑ'=>'ṑ','ṑ'=>'ṑ','Ṓ'=>'ṓ','ṓ'=>'ṓ','Ṕ'=>'ṕ','ṕ'=>'ṕ','Ṗ'=>'ṗ','ṗ'=>'ṗ','Ṙ'=>'ṙ','ṙ'=>'ṙ','Ṛ'=>'ṛ','ṛ'=>'ṛ','Ṝ'=>'ṝ','ṝ'=>'ṝ','Ṟ'=>'ṟ','ṟ'=>'ṟ','Ṡ'=>'ṡ','ṡ'=>'ṡ','Ṣ'=>'ṣ','ṣ'=>'ṣ','Ṥ'=>'ṥ','ṥ'=>'ṥ','Ṧ'=>'ṧ','ṧ'=>'ṧ','Ṩ'=>'ṩ','ṩ'=>'ṩ','Ṫ'=>'ṫ','ṫ'=>'ṫ','Ṭ'=>'ṭ','ṭ'=>'ṭ','Ṯ'=>'ṯ','ṯ'=>'ṯ','Ṱ'=>'ṱ','ṱ'=>'ṱ','Ṳ'=>'ṳ','ṳ'=>'ṳ','Ṵ'=>'ṵ','ṵ'=>'ṵ','Ṷ'=>'ṷ','ṷ'=>'ṷ','Ṹ'=>'ṹ','ṹ'=>'ṹ','Ṻ'=>'ṻ','ṻ'=>'ṻ','Ṽ'=>'ṽ','ṽ'=>'ṽ','Ṿ'=>'ṿ','ṿ'=>'ṿ','Ẁ'=>'ẁ','ẁ'=>'ẁ','Ẃ'=>'ẃ','ẃ'=>'ẃ','Ẅ'=>'ẅ','ẅ'=>'ẅ','Ẇ'=>'ẇ','ẇ'=>'ẇ','Ẉ'=>'ẉ','ẉ'=>'ẉ','Ẋ'=>'ẋ','ẋ'=>'ẋ','Ẍ'=>'ẍ','ẍ'=>'ẍ','Ẏ'=>'ẏ','ẏ'=>'ẏ','Ẑ'=>'ẑ','ẑ'=>'ẑ','Ẓ'=>'ẓ','ẓ'=>'ẓ','Ẕ'=>'ẕ','ẕ'=>'ẕ','ẖ'=>'ẖ','ẗ'=>'ẗ','ẘ'=>'ẘ','ẙ'=>'ẙ','ẚ'=>'ẚ','ẛ'=>'ẛ','Ạ'=>'ạ','ạ'=>'ạ','Ả'=>'ả','ả'=>'ả','Ấ'=>'ấ','ấ'=>'ấ','Ầ'=>'ầ','ầ'=>'ầ','Ẩ'=>'ẩ','ẩ'=>'ẩ','Ẫ'=>'ẫ','ẫ'=>'ẫ','Ậ'=>'ậ','ậ'=>'ậ','Ắ'=>'ắ','ắ'=>'ắ','Ằ'=>'ằ','ằ'=>'ằ','Ẳ'=>'ẳ','ẳ'=>'ẳ','Ẵ'=>'ẵ','ẵ'=>'ẵ','Ặ'=>'ặ','ặ'=>'ặ','Ẹ'=>'ẹ','ẹ'=>'ẹ','Ẻ'=>'ẻ','ẻ'=>'ẻ','Ẽ'=>'ẽ','ẽ'=>'ẽ','Ế'=>'ế','ế'=>'ế','Ề'=>'ề','ề'=>'ề','Ể'=>'ể','ể'=>'ể','Ễ'=>'ễ','ễ'=>'ễ','Ệ'=>'ệ','ệ'=>'ệ','Ỉ'=>'ỉ','ỉ'=>'ỉ','Ị'=>'ị','ị'=>'ị','Ọ'=>'ọ','ọ'=>'ọ','Ỏ'=>'ỏ','ỏ'=>'ỏ','Ố'=>'ố','ố'=>'ố','Ồ'=>'ồ','ồ'=>'ồ','Ổ'=>'ổ','ổ'=>'ổ','Ỗ'=>'ỗ','ỗ'=>'ỗ','Ộ'=>'ộ','ộ'=>'ộ','Ớ'=>'ớ','ớ'=>'ớ','Ờ'=>'ờ','ờ'=>'ờ','Ở'=>'ở','ở'=>'ở','Ỡ'=>'ỡ','ỡ'=>'ỡ','Ợ'=>'ợ','ợ'=>'ợ','Ụ'=>'ụ','ụ'=>'ụ','Ủ'=>'ủ','ủ'=>'ủ','Ứ'=>'ứ','ứ'=>'ứ','Ừ'=>'ừ','ừ'=>'ừ','Ử'=>'ử','ử'=>'ử','Ữ'=>'ữ','ữ'=>'ữ','Ự'=>'ự','ự'=>'ự','Ỳ'=>'ỳ','ỳ'=>'ỳ','Ỵ'=>'ỵ','ỵ'=>'ỵ','Ỷ'=>'ỷ','ỷ'=>'ỷ','Ỹ'=>'ỹ','ỹ'=>'ỹ','ἀ'=>'ἀ','ἁ'=>'ἁ','ἂ'=>'ἂ','ἃ'=>'ἃ','ἄ'=>'ἄ','ἅ'=>'ἅ','ἆ'=>'ἆ','ἇ'=>'ἇ','Ἀ'=>'ἀ','Ἁ'=>'ἁ','Ἂ'=>'ἂ','Ἃ'=>'ἃ','Ἄ'=>'ἄ','Ἅ'=>'ἅ','Ἆ'=>'ἆ','Ἇ'=>'ἇ','ἐ'=>'ἐ','ἑ'=>'ἑ','ἒ'=>'ἒ','ἓ'=>'ἓ','ἔ'=>'ἔ','ἕ'=>'ἕ','Ἐ'=>'ἐ','Ἑ'=>'ἑ','Ἒ'=>'ἒ','Ἓ'=>'ἓ','Ἔ'=>'ἔ','Ἕ'=>'ἕ','ἠ'=>'ἠ','ἡ'=>'ἡ','ἢ'=>'ἢ','ἣ'=>'ἣ','ἤ'=>'ἤ','ἥ'=>'ἥ','ἦ'=>'ἦ','ἧ'=>'ἧ','Ἠ'=>'ἠ','Ἡ'=>'ἡ','Ἢ'=>'ἢ','Ἣ'=>'ἣ','Ἤ'=>'ἤ','Ἥ'=>'ἥ','Ἦ'=>'ἦ','Ἧ'=>'ἧ','ἰ'=>'ἰ','ἱ'=>'ἱ','ἲ'=>'ἲ','ἳ'=>'ἳ','ἴ'=>'ἴ','ἵ'=>'ἵ','ἶ'=>'ἶ','ἷ'=>'ἷ','Ἰ'=>'ἰ','Ἱ'=>'ἱ','Ἲ'=>'ἲ','Ἳ'=>'ἳ','Ἴ'=>'ἴ','Ἵ'=>'ἵ','Ἶ'=>'ἶ','Ἷ'=>'ἷ','ὀ'=>'ὀ','ὁ'=>'ὁ','ὂ'=>'ὂ','ὃ'=>'ὃ','ὄ'=>'ὄ','ὅ'=>'ὅ','Ὀ'=>'ὀ','Ὁ'=>'ὁ','Ὂ'=>'ὂ','Ὃ'=>'ὃ','Ὄ'=>'ὄ','Ὅ'=>'ὅ','ὐ'=>'ὐ','ὑ'=>'ὑ','ὒ'=>'ὒ','ὓ'=>'ὓ','ὔ'=>'ὔ','ὕ'=>'ὕ','ὖ'=>'ὖ','ὗ'=>'ὗ','Ὑ'=>'ὑ','Ὓ'=>'ὓ','Ὕ'=>'ὕ','Ὗ'=>'ὗ','ὠ'=>'ὠ','ὡ'=>'ὡ','ὢ'=>'ὢ','ὣ'=>'ὣ','ὤ'=>'ὤ','ὥ'=>'ὥ','ὦ'=>'ὦ','ὧ'=>'ὧ','Ὠ'=>'ὠ','Ὡ'=>'ὡ','Ὢ'=>'ὢ','Ὣ'=>'ὣ','Ὤ'=>'ὤ','Ὥ'=>'ὥ','Ὦ'=>'ὦ','Ὧ'=>'ὧ','ὰ'=>'ὰ','ά'=>'ά','ὲ'=>'ὲ','έ'=>'έ','ὴ'=>'ὴ','ή'=>'ή','ὶ'=>'ὶ','ί'=>'ί','ὸ'=>'ὸ','ό'=>'ό','ὺ'=>'ὺ','ύ'=>'ύ','ὼ'=>'ὼ','ώ'=>'ώ','ᾀ'=>'ᾀ','ᾁ'=>'ᾁ','ᾂ'=>'ᾂ','ᾃ'=>'ᾃ','ᾄ'=>'ᾄ','ᾅ'=>'ᾅ','ᾆ'=>'ᾆ','ᾇ'=>'ᾇ','ᾈ'=>'ᾀ','ᾉ'=>'ᾁ','ᾊ'=>'ᾂ','ᾋ'=>'ᾃ','ᾌ'=>'ᾄ','ᾍ'=>'ᾅ','ᾎ'=>'ᾆ','ᾏ'=>'ᾇ','ᾐ'=>'ᾐ','ᾑ'=>'ᾑ','ᾒ'=>'ᾒ','ᾓ'=>'ᾓ','ᾔ'=>'ᾔ','ᾕ'=>'ᾕ','ᾖ'=>'ᾖ','ᾗ'=>'ᾗ','ᾘ'=>'ᾐ','ᾙ'=>'ᾑ','ᾚ'=>'ᾒ','ᾛ'=>'ᾓ','ᾜ'=>'ᾔ','ᾝ'=>'ᾕ','ᾞ'=>'ᾖ','ᾟ'=>'ᾗ','ᾠ'=>'ᾠ','ᾡ'=>'ᾡ','ᾢ'=>'ᾢ','ᾣ'=>'ᾣ','ᾤ'=>'ᾤ','ᾥ'=>'ᾥ','ᾦ'=>'ᾦ','ᾧ'=>'ᾧ','ᾨ'=>'ᾠ','ᾩ'=>'ᾡ','ᾪ'=>'ᾢ','ᾫ'=>'ᾣ','ᾬ'=>'ᾤ','ᾭ'=>'ᾥ','ᾮ'=>'ᾦ','ᾯ'=>'ᾧ','ᾰ'=>'ᾰ','ᾱ'=>'ᾱ','ᾲ'=>'ᾲ','ᾳ'=>'ᾳ','ᾴ'=>'ᾴ','ᾶ'=>'ᾶ','ᾷ'=>'ᾷ','Ᾰ'=>'ᾰ','Ᾱ'=>'ᾱ','Ὰ'=>'ὰ','Ά'=>'ά','ᾼ'=>'ᾳ','ι'=>'ι','ῂ'=>'ῂ','ῃ'=>'ῃ','ῄ'=>'ῄ','ῆ'=>'ῆ','ῇ'=>'ῇ','Ὲ'=>'ὲ','Έ'=>'έ','Ὴ'=>'ὴ','Ή'=>'ή','ῌ'=>'ῃ','ῐ'=>'ῐ','ῑ'=>'ῑ','ῒ'=>'ῒ','ΐ'=>'ΐ','ῖ'=>'ῖ','ῗ'=>'ῗ','Ῐ'=>'ῐ','Ῑ'=>'ῑ','Ὶ'=>'ὶ','Ί'=>'ί','ῠ'=>'ῠ','ῡ'=>'ῡ','ῢ'=>'ῢ','ΰ'=>'ΰ','ῤ'=>'ῤ','ῥ'=>'ῥ','ῦ'=>'ῦ','ῧ'=>'ῧ','Ῠ'=>'ῠ','Ῡ'=>'ῡ','Ὺ'=>'ὺ','Ύ'=>'ύ','Ῥ'=>'ῥ','ῲ'=>'ῲ','ῳ'=>'ῳ','ῴ'=>'ῴ','ῶ'=>'ῶ','ῷ'=>'ῷ','Ὸ'=>'ὸ','Ό'=>'ό','Ὼ'=>'ὼ','Ώ'=>'ώ','ῼ'=>'ῳ'); \ No newline at end of file
+<?php return array('᠋'=>'᠋','᠌'=>'᠌','᠍'=>'᠍','᠐'=>'0','᠑'=>'1','᠒'=>'2','᠓'=>'3','᠔'=>'4','᠕'=>'5','᠖'=>'6','᠗'=>'7','᠘'=>'8','᠙'=>'9','ᠠ'=>'ᠠ','ᠡ'=>'ᠡ','ᠢ'=>'ᠢ','ᠣ'=>'ᠣ','ᠤ'=>'ᠤ','ᠥ'=>'ᠥ','ᠦ'=>'ᠦ','ᠧ'=>'ᠧ','ᠨ'=>'ᠨ','ᠩ'=>'ᠩ','ᠪ'=>'ᠪ','ᠫ'=>'ᠫ','ᠬ'=>'ᠬ','ᠭ'=>'ᠭ','ᠮ'=>'ᠮ','ᠯ'=>'ᠯ','ᠰ'=>'ᠰ','ᠱ'=>'ᠱ','ᠲ'=>'ᠲ','ᠳ'=>'ᠳ','ᠴ'=>'ᠴ','ᠵ'=>'ᠵ','ᠶ'=>'ᠶ','ᠷ'=>'ᠷ','ᠸ'=>'ᠸ','ᠹ'=>'ᠹ','ᠺ'=>'ᠺ','ᠻ'=>'ᠻ','ᠼ'=>'ᠼ','ᠽ'=>'ᠽ','ᠾ'=>'ᠾ','ᠿ'=>'ᠿ','ᡀ'=>'ᡀ','ᡁ'=>'ᡁ','ᡂ'=>'ᡂ','ᡃ'=>'ᡃ','ᡄ'=>'ᡄ','ᡅ'=>'ᡅ','ᡆ'=>'ᡆ','ᡇ'=>'ᡇ','ᡈ'=>'ᡈ','ᡉ'=>'ᡉ','ᡊ'=>'ᡊ','ᡋ'=>'ᡋ','ᡌ'=>'ᡌ','ᡍ'=>'ᡍ','ᡎ'=>'ᡎ','ᡏ'=>'ᡏ','ᡐ'=>'ᡐ','ᡑ'=>'ᡑ','ᡒ'=>'ᡒ','ᡓ'=>'ᡓ','ᡔ'=>'ᡔ','ᡕ'=>'ᡕ','ᡖ'=>'ᡖ','ᡗ'=>'ᡗ','ᡘ'=>'ᡘ','ᡙ'=>'ᡙ','ᡚ'=>'ᡚ','ᡛ'=>'ᡛ','ᡜ'=>'ᡜ','ᡝ'=>'ᡝ','ᡞ'=>'ᡞ','ᡟ'=>'ᡟ','ᡠ'=>'ᡠ','ᡡ'=>'ᡡ','ᡢ'=>'ᡢ','ᡣ'=>'ᡣ','ᡤ'=>'ᡤ','ᡥ'=>'ᡥ','ᡦ'=>'ᡦ','ᡧ'=>'ᡧ','ᡨ'=>'ᡨ','ᡩ'=>'ᡩ','ᡪ'=>'ᡪ','ᡫ'=>'ᡫ','ᡬ'=>'ᡬ','ᡭ'=>'ᡭ','ᡮ'=>'ᡮ','ᡯ'=>'ᡯ','ᡰ'=>'ᡰ','ᡱ'=>'ᡱ','ᡲ'=>'ᡲ','ᡳ'=>'ᡳ','ᡴ'=>'ᡴ','ᡵ'=>'ᡵ','ᡶ'=>'ᡶ','ᡷ'=>'ᡷ','ᢀ'=>'ᢀ','ᢁ'=>'ᢁ','ᢂ'=>'ᢂ','ᢃ'=>'ᢃ','ᢄ'=>'ᢄ','ᢅ'=>'ᢅ','ᢆ'=>'ᢆ','ᢇ'=>'ᢇ','ᢈ'=>'ᢈ','ᢉ'=>'ᢉ','ᢊ'=>'ᢊ','ᢋ'=>'ᢋ','ᢌ'=>'ᢌ','ᢍ'=>'ᢍ','ᢎ'=>'ᢎ','ᢏ'=>'ᢏ','ᢐ'=>'ᢐ','ᢑ'=>'ᢑ','ᢒ'=>'ᢒ','ᢓ'=>'ᢓ','ᢔ'=>'ᢔ','ᢕ'=>'ᢕ','ᢖ'=>'ᢖ','ᢗ'=>'ᢗ','ᢘ'=>'ᢘ','ᢙ'=>'ᢙ','ᢚ'=>'ᢚ','ᢛ'=>'ᢛ','ᢜ'=>'ᢜ','ᢝ'=>'ᢝ','ᢞ'=>'ᢞ','ᢟ'=>'ᢟ','ᢠ'=>'ᢠ','ᢡ'=>'ᢡ','ᢢ'=>'ᢢ','ᢣ'=>'ᢣ','ᢤ'=>'ᢤ','ᢥ'=>'ᢥ','ᢦ'=>'ᢦ','ᢧ'=>'ᢧ','ᢨ'=>'ᢨ','ᢩ'=>'ᢩ','ᤀ'=>'ᤀ','ᤁ'=>'ᤁ','ᤂ'=>'ᤂ','ᤃ'=>'ᤃ','ᤄ'=>'ᤄ','ᤅ'=>'ᤅ','ᤆ'=>'ᤆ','ᤇ'=>'ᤇ','ᤈ'=>'ᤈ','ᤉ'=>'ᤉ','ᤊ'=>'ᤊ','ᤋ'=>'ᤋ','ᤌ'=>'ᤌ','ᤍ'=>'ᤍ','ᤎ'=>'ᤎ','ᤏ'=>'ᤏ','ᤐ'=>'ᤐ','ᤑ'=>'ᤑ','ᤒ'=>'ᤒ','ᤓ'=>'ᤓ','ᤔ'=>'ᤔ','ᤕ'=>'ᤕ','ᤖ'=>'ᤖ','ᤗ'=>'ᤗ','ᤘ'=>'ᤘ','ᤙ'=>'ᤙ','ᤚ'=>'ᤚ','ᤛ'=>'ᤛ','ᤜ'=>'ᤜ','ᤠ'=>'ᤠ','ᤡ'=>'ᤡ','ᤢ'=>'ᤢ','ᤣ'=>'ᤣ','ᤤ'=>'ᤤ','ᤥ'=>'ᤥ','ᤦ'=>'ᤦ','ᤧ'=>'ᤧ','ᤨ'=>'ᤨ','ᤩ'=>'ᤩ','ᤪ'=>'ᤪ','ᤫ'=>'ᤫ','ᤰ'=>'ᤰ','ᤱ'=>'ᤱ','ᤲ'=>'ᤲ','ᤳ'=>'ᤳ','ᤴ'=>'ᤴ','ᤵ'=>'ᤵ','ᤶ'=>'ᤶ','ᤷ'=>'ᤷ','ᤸ'=>'ᤸ','᤹'=>'᤹','᤺'=>'᤺','᤻'=>'᤻','᥆'=>'0','᥇'=>'1','᥈'=>'2','᥉'=>'3','᥊'=>'4','᥋'=>'5','᥌'=>'6','᥍'=>'7','᥎'=>'8','᥏'=>'9','ᥐ'=>'ᥐ','ᥑ'=>'ᥑ','ᥒ'=>'ᥒ','ᥓ'=>'ᥓ','ᥔ'=>'ᥔ','ᥕ'=>'ᥕ','ᥖ'=>'ᥖ','ᥗ'=>'ᥗ','ᥘ'=>'ᥘ','ᥙ'=>'ᥙ','ᥚ'=>'ᥚ','ᥛ'=>'ᥛ','ᥜ'=>'ᥜ','ᥝ'=>'ᥝ','ᥞ'=>'ᥞ','ᥟ'=>'ᥟ','ᥠ'=>'ᥠ','ᥡ'=>'ᥡ','ᥢ'=>'ᥢ','ᥣ'=>'ᥣ','ᥤ'=>'ᥤ','ᥥ'=>'ᥥ','ᥦ'=>'ᥦ','ᥧ'=>'ᥧ','ᥨ'=>'ᥨ','ᥩ'=>'ᥩ','ᥪ'=>'ᥪ','ᥫ'=>'ᥫ','ᥬ'=>'ᥬ','ᥭ'=>'ᥭ','ᥰ'=>'ᥰ','ᥱ'=>'ᥱ','ᥲ'=>'ᥲ','ᥳ'=>'ᥳ','ᥴ'=>'ᥴ','ᦀ'=>'ᦀ','ᦁ'=>'ᦁ','ᦂ'=>'ᦂ','ᦃ'=>'ᦃ','ᦄ'=>'ᦄ','ᦅ'=>'ᦅ','ᦆ'=>'ᦆ','ᦇ'=>'ᦇ','ᦈ'=>'ᦈ','ᦉ'=>'ᦉ','ᦊ'=>'ᦊ','ᦋ'=>'ᦋ','ᦌ'=>'ᦌ','ᦍ'=>'ᦍ','ᦎ'=>'ᦎ','ᦏ'=>'ᦏ','ᦐ'=>'ᦐ','ᦑ'=>'ᦑ','ᦒ'=>'ᦒ','ᦓ'=>'ᦓ','ᦔ'=>'ᦔ','ᦕ'=>'ᦕ','ᦖ'=>'ᦖ','ᦗ'=>'ᦗ','ᦘ'=>'ᦘ','ᦙ'=>'ᦙ','ᦚ'=>'ᦚ','ᦛ'=>'ᦛ','ᦜ'=>'ᦜ','ᦝ'=>'ᦝ','ᦞ'=>'ᦞ','ᦟ'=>'ᦟ','ᦠ'=>'ᦠ','ᦡ'=>'ᦡ','ᦢ'=>'ᦢ','ᦣ'=>'ᦣ','ᦤ'=>'ᦤ','ᦥ'=>'ᦥ','ᦦ'=>'ᦦ','ᦧ'=>'ᦧ','ᦨ'=>'ᦨ','ᦩ'=>'ᦩ','ᦰ'=>'ᦰ','ᦱ'=>'ᦱ','ᦲ'=>'ᦲ','ᦳ'=>'ᦳ','ᦴ'=>'ᦴ','ᦵ'=>'ᦵ','ᦶ'=>'ᦶ','ᦷ'=>'ᦷ','ᦸ'=>'ᦸ','ᦹ'=>'ᦹ','ᦺ'=>'ᦺ','ᦻ'=>'ᦻ','ᦼ'=>'ᦼ','ᦽ'=>'ᦽ','ᦾ'=>'ᦾ','ᦿ'=>'ᦿ','ᧀ'=>'ᧀ','ᧁ'=>'ᧁ','ᧂ'=>'ᧂ','ᧃ'=>'ᧃ','ᧄ'=>'ᧄ','ᧅ'=>'ᧅ','ᧆ'=>'ᧆ','ᧇ'=>'ᧇ','ᧈ'=>'ᧈ','ᧉ'=>'ᧉ','᧐'=>'0','᧑'=>'1','᧒'=>'2','᧓'=>'3','᧔'=>'4','᧕'=>'5','᧖'=>'6','᧗'=>'7','᧘'=>'8','᧙'=>'9','ᨀ'=>'ᨀ','ᨁ'=>'ᨁ','ᨂ'=>'ᨂ','ᨃ'=>'ᨃ','ᨄ'=>'ᨄ','ᨅ'=>'ᨅ','ᨆ'=>'ᨆ','ᨇ'=>'ᨇ','ᨈ'=>'ᨈ','ᨉ'=>'ᨉ','ᨊ'=>'ᨊ','ᨋ'=>'ᨋ','ᨌ'=>'ᨌ','ᨍ'=>'ᨍ','ᨎ'=>'ᨎ','ᨏ'=>'ᨏ','ᨐ'=>'ᨐ','ᨑ'=>'ᨑ','ᨒ'=>'ᨒ','ᨓ'=>'ᨓ','ᨔ'=>'ᨔ','ᨕ'=>'ᨕ','ᨖ'=>'ᨖ','ᨗ'=>'ᨗ','ᨘ'=>'ᨘ','ᨙ'=>'ᨙ','ᨚ'=>'ᨚ','ᨛ'=>'ᨛ','ᬀ'=>'ᬀ','ᬁ'=>'ᬁ','ᬂ'=>'ᬂ','ᬃ'=>'ᬃ','ᬄ'=>'ᬄ','ᬅ'=>'ᬅ','ᬆ'=>'ᬆ','ᬇ'=>'ᬇ','ᬈ'=>'ᬈ','ᬉ'=>'ᬉ','ᬊ'=>'ᬊ','ᬋ'=>'ᬋ','ᬌ'=>'ᬌ','ᬍ'=>'ᬍ','ᬎ'=>'ᬎ','ᬏ'=>'ᬏ','ᬐ'=>'ᬐ','ᬑ'=>'ᬑ','ᬒ'=>'ᬒ','ᬓ'=>'ᬓ','ᬔ'=>'ᬔ','ᬕ'=>'ᬕ','ᬖ'=>'ᬖ','ᬗ'=>'ᬗ','ᬘ'=>'ᬘ','ᬙ'=>'ᬙ','ᬚ'=>'ᬚ','ᬛ'=>'ᬛ','ᬜ'=>'ᬜ','ᬝ'=>'ᬝ','ᬞ'=>'ᬞ','ᬟ'=>'ᬟ','ᬠ'=>'ᬠ','ᬡ'=>'ᬡ','ᬢ'=>'ᬢ','ᬣ'=>'ᬣ','ᬤ'=>'ᬤ','ᬥ'=>'ᬥ','ᬦ'=>'ᬦ','ᬧ'=>'ᬧ','ᬨ'=>'ᬨ','ᬩ'=>'ᬩ','ᬪ'=>'ᬪ','ᬫ'=>'ᬫ','ᬬ'=>'ᬬ','ᬭ'=>'ᬭ','ᬮ'=>'ᬮ','ᬯ'=>'ᬯ','ᬰ'=>'ᬰ','ᬱ'=>'ᬱ','ᬲ'=>'ᬲ','ᬳ'=>'ᬳ','᬴'=>'᬴','ᬵ'=>'ᬵ','ᬶ'=>'ᬶ','ᬷ'=>'ᬷ','ᬸ'=>'ᬸ','ᬹ'=>'ᬹ','ᬺ'=>'ᬺ','ᬻ'=>'ᬻ','ᬼ'=>'ᬼ','ᬽ'=>'ᬽ','ᬾ'=>'ᬾ','ᬿ'=>'ᬿ','ᭀ'=>'ᭀ','ᭁ'=>'ᭁ','ᭂ'=>'ᭂ','ᭃ'=>'ᭃ','᭄'=>'᭄','ᭅ'=>'ᭅ','ᭆ'=>'ᭆ','ᭇ'=>'ᭇ','ᭈ'=>'ᭈ','ᭉ'=>'ᭉ','ᭊ'=>'ᭊ','ᭋ'=>'ᭋ','᭐'=>'0','᭑'=>'1','᭒'=>'2','᭓'=>'3','᭔'=>'4','᭕'=>'5','᭖'=>'6','᭗'=>'7','᭘'=>'8','᭙'=>'9','᭫'=>'᭫','᭬'=>'᭬','᭭'=>'᭭','᭮'=>'᭮','᭯'=>'᭯','᭰'=>'᭰','᭱'=>'᭱','᭲'=>'᭲','᭳'=>'᭳','ᴀ'=>'ᴀ','ᴁ'=>'ᴁ','ᴂ'=>'ᴂ','ᴃ'=>'ᴃ','ᴄ'=>'ᴄ','ᴅ'=>'ᴅ','ᴆ'=>'ᴆ','ᴇ'=>'ᴇ','ᴈ'=>'ᴈ','ᴉ'=>'ᴉ','ᴊ'=>'ᴊ','ᴋ'=>'ᴋ','ᴌ'=>'ᴌ','ᴍ'=>'ᴍ','ᴎ'=>'ᴎ','ᴏ'=>'ᴏ','ᴐ'=>'ᴐ','ᴑ'=>'ᴑ','ᴒ'=>'ᴒ','ᴓ'=>'ᴓ','ᴔ'=>'ᴔ','ᴕ'=>'ᴕ','ᴖ'=>'ᴖ','ᴗ'=>'ᴗ','ᴘ'=>'ᴘ','ᴙ'=>'ᴙ','ᴚ'=>'ᴚ','ᴛ'=>'ᴛ','ᴜ'=>'ᴜ','ᴝ'=>'ᴝ','ᴞ'=>'ᴞ','ᴟ'=>'ᴟ','ᴠ'=>'ᴠ','ᴡ'=>'ᴡ','ᴢ'=>'ᴢ','ᴣ'=>'ᴣ','ᴤ'=>'ᴤ','ᴥ'=>'ᴥ','ᴦ'=>'ᴦ','ᴧ'=>'ᴧ','ᴨ'=>'ᴨ','ᴩ'=>'ᴩ','ᴪ'=>'ᴪ','ᴫ'=>'ᴫ','ᴬ'=>'ᴬ','ᴭ'=>'ᴭ','ᴮ'=>'ᴮ','ᴯ'=>'ᴯ','ᴰ'=>'ᴰ','ᴱ'=>'ᴱ','ᴲ'=>'ᴲ','ᴳ'=>'ᴳ','ᴴ'=>'ᴴ','ᴵ'=>'ᴵ','ᴶ'=>'ᴶ','ᴷ'=>'ᴷ','ᴸ'=>'ᴸ','ᴹ'=>'ᴹ','ᴺ'=>'ᴺ','ᴻ'=>'ᴻ','ᴼ'=>'ᴼ','ᴽ'=>'ᴽ','ᴾ'=>'ᴾ','ᴿ'=>'ᴿ','ᵀ'=>'ᵀ','ᵁ'=>'ᵁ','ᵂ'=>'ᵂ','ᵃ'=>'ᵃ','ᵄ'=>'ᵄ','ᵅ'=>'ᵅ','ᵆ'=>'ᵆ','ᵇ'=>'ᵇ','ᵈ'=>'ᵈ','ᵉ'=>'ᵉ','ᵊ'=>'ᵊ','ᵋ'=>'ᵋ','ᵌ'=>'ᵌ','ᵍ'=>'ᵍ','ᵎ'=>'ᵎ','ᵏ'=>'ᵏ','ᵐ'=>'ᵐ','ᵑ'=>'ᵑ','ᵒ'=>'ᵒ','ᵓ'=>'ᵓ','ᵔ'=>'ᵔ','ᵕ'=>'ᵕ','ᵖ'=>'ᵖ','ᵗ'=>'ᵗ','ᵘ'=>'ᵘ','ᵙ'=>'ᵙ','ᵚ'=>'ᵚ','ᵛ'=>'ᵛ','ᵜ'=>'ᵜ','ᵝ'=>'ᵝ','ᵞ'=>'ᵞ','ᵟ'=>'ᵟ','ᵠ'=>'ᵠ','ᵡ'=>'ᵡ','ᵢ'=>'ᵢ','ᵣ'=>'ᵣ','ᵤ'=>'ᵤ','ᵥ'=>'ᵥ','ᵦ'=>'ᵦ','ᵧ'=>'ᵧ','ᵨ'=>'ᵨ','ᵩ'=>'ᵩ','ᵪ'=>'ᵪ','ᵫ'=>'ue','ᵬ'=>'ᵬ','ᵭ'=>'ᵭ','ᵮ'=>'ᵮ','ᵯ'=>'ᵯ','ᵰ'=>'ᵰ','ᵱ'=>'ᵱ','ᵲ'=>'ᵲ','ᵳ'=>'ᵳ','ᵴ'=>'ᵴ','ᵵ'=>'ᵵ','ᵶ'=>'ᵶ','ᵷ'=>'ᵷ','ᵸ'=>'ᵸ','ᵹ'=>'ᵹ','ᵺ'=>'ᵺ','ᵻ'=>'ᵻ','ᵼ'=>'ᵼ','ᵽ'=>'ᵽ','ᵾ'=>'ᵾ','ᵿ'=>'ᵿ','ᶀ'=>'ᶀ','ᶁ'=>'ᶁ','ᶂ'=>'ᶂ','ᶃ'=>'ᶃ','ᶄ'=>'ᶄ','ᶅ'=>'ᶅ','ᶆ'=>'ᶆ','ᶇ'=>'ᶇ','ᶈ'=>'ᶈ','ᶉ'=>'ᶉ','ᶊ'=>'ᶊ','ᶋ'=>'ᶋ','ᶌ'=>'ᶌ','ᶍ'=>'ᶍ','ᶎ'=>'ᶎ','ᶏ'=>'ᶏ','ᶐ'=>'ᶐ','ᶑ'=>'ᶑ','ᶒ'=>'ᶒ','ᶓ'=>'ᶓ','ᶔ'=>'ᶔ','ᶕ'=>'ᶕ','ᶖ'=>'ᶖ','ᶗ'=>'ᶗ','ᶘ'=>'ᶘ','ᶙ'=>'ᶙ','ᶚ'=>'ᶚ','ᶛ'=>'ᶛ','ᶜ'=>'ᶜ','ᶝ'=>'ᶝ','ᶞ'=>'ᶞ','ᶟ'=>'ᶟ','ᶠ'=>'ᶠ','ᶡ'=>'ᶡ','ᶢ'=>'ᶢ','ᶣ'=>'ᶣ','ᶤ'=>'ᶤ','ᶥ'=>'ᶥ','ᶦ'=>'ᶦ','ᶧ'=>'ᶧ','ᶨ'=>'ᶨ','ᶩ'=>'ᶩ','ᶪ'=>'ᶪ','ᶫ'=>'ᶫ','ᶬ'=>'ᶬ','ᶭ'=>'ᶭ','ᶮ'=>'ᶮ','ᶯ'=>'ᶯ','ᶰ'=>'ᶰ','ᶱ'=>'ᶱ','ᶲ'=>'ᶲ','ᶳ'=>'ᶳ','ᶴ'=>'ᶴ','ᶵ'=>'ᶵ','ᶶ'=>'ᶶ','ᶷ'=>'ᶷ','ᶸ'=>'ᶸ','ᶹ'=>'ᶹ','ᶺ'=>'ᶺ','ᶻ'=>'ᶻ','ᶼ'=>'ᶼ','ᶽ'=>'ᶽ','ᶾ'=>'ᶾ','ᶿ'=>'ᶿ','᷀'=>'᷀','᷁'=>'᷁','᷂'=>'᷂','᷃'=>'᷃','᷄'=>'᷄','᷅'=>'᷅','᷆'=>'᷆','᷇'=>'᷇','᷈'=>'᷈','᷉'=>'᷉','᷊'=>'᷊','᷾'=>'᷾','᷿'=>'᷿','Ḁ'=>'ḁ','ḁ'=>'ḁ','Ḃ'=>'ḃ','ḃ'=>'ḃ','Ḅ'=>'ḅ','ḅ'=>'ḅ','Ḇ'=>'ḇ','ḇ'=>'ḇ','Ḉ'=>'ḉ','ḉ'=>'ḉ','Ḋ'=>'ḋ','ḋ'=>'ḋ','Ḍ'=>'ḍ','ḍ'=>'ḍ','Ḏ'=>'ḏ','ḏ'=>'ḏ','Ḑ'=>'ḑ','ḑ'=>'ḑ','Ḓ'=>'ḓ','ḓ'=>'ḓ','Ḕ'=>'ḕ','ḕ'=>'ḕ','Ḗ'=>'ḗ','ḗ'=>'ḗ','Ḙ'=>'ḙ','ḙ'=>'ḙ','Ḛ'=>'ḛ','ḛ'=>'ḛ','Ḝ'=>'ḝ','ḝ'=>'ḝ','Ḟ'=>'ḟ','ḟ'=>'ḟ','Ḡ'=>'ḡ','ḡ'=>'ḡ','Ḣ'=>'ḣ','ḣ'=>'ḣ','Ḥ'=>'ḥ','ḥ'=>'ḥ','Ḧ'=>'ḧ','ḧ'=>'ḧ','Ḩ'=>'ḩ','ḩ'=>'ḩ','Ḫ'=>'ḫ','ḫ'=>'ḫ','Ḭ'=>'ḭ','ḭ'=>'ḭ','Ḯ'=>'ḯ','ḯ'=>'ḯ','Ḱ'=>'ḱ','ḱ'=>'ḱ','Ḳ'=>'ḳ','ḳ'=>'ḳ','Ḵ'=>'ḵ','ḵ'=>'ḵ','Ḷ'=>'ḷ','ḷ'=>'ḷ','Ḹ'=>'ḹ','ḹ'=>'ḹ','Ḻ'=>'ḻ','ḻ'=>'ḻ','Ḽ'=>'ḽ','ḽ'=>'ḽ','Ḿ'=>'ḿ','ḿ'=>'ḿ','Ṁ'=>'ṁ','ṁ'=>'ṁ','Ṃ'=>'ṃ','ṃ'=>'ṃ','Ṅ'=>'ṅ','ṅ'=>'ṅ','Ṇ'=>'ṇ','ṇ'=>'ṇ','Ṉ'=>'ṉ','ṉ'=>'ṉ','Ṋ'=>'ṋ','ṋ'=>'ṋ','Ṍ'=>'ṍ','ṍ'=>'ṍ','Ṏ'=>'ṏ','ṏ'=>'ṏ','Ṑ'=>'ṑ','ṑ'=>'ṑ','Ṓ'=>'ṓ','ṓ'=>'ṓ','Ṕ'=>'ṕ','ṕ'=>'ṕ','Ṗ'=>'ṗ','ṗ'=>'ṗ','Ṙ'=>'ṙ','ṙ'=>'ṙ','Ṛ'=>'ṛ','ṛ'=>'ṛ','Ṝ'=>'ṝ','ṝ'=>'ṝ','Ṟ'=>'ṟ','ṟ'=>'ṟ','Ṡ'=>'ṡ','ṡ'=>'ṡ','Ṣ'=>'ṣ','ṣ'=>'ṣ','Ṥ'=>'ṥ','ṥ'=>'ṥ','Ṧ'=>'ṧ','ṧ'=>'ṧ','Ṩ'=>'ṩ','ṩ'=>'ṩ','Ṫ'=>'ṫ','ṫ'=>'ṫ','Ṭ'=>'ṭ','ṭ'=>'ṭ','Ṯ'=>'ṯ','ṯ'=>'ṯ','Ṱ'=>'ṱ','ṱ'=>'ṱ','Ṳ'=>'ṳ','ṳ'=>'ṳ','Ṵ'=>'ṵ','ṵ'=>'ṵ','Ṷ'=>'ṷ','ṷ'=>'ṷ','Ṹ'=>'ṹ','ṹ'=>'ṹ','Ṻ'=>'ṻ','ṻ'=>'ṻ','Ṽ'=>'ṽ','ṽ'=>'ṽ','Ṿ'=>'ṿ','ṿ'=>'ṿ','Ẁ'=>'ẁ','ẁ'=>'ẁ','Ẃ'=>'ẃ','ẃ'=>'ẃ','Ẅ'=>'ẅ','ẅ'=>'ẅ','Ẇ'=>'ẇ','ẇ'=>'ẇ','Ẉ'=>'ẉ','ẉ'=>'ẉ','Ẋ'=>'ẋ','ẋ'=>'ẋ','Ẍ'=>'ẍ','ẍ'=>'ẍ','Ẏ'=>'ẏ','ẏ'=>'ẏ','Ẑ'=>'ẑ','ẑ'=>'ẑ','Ẓ'=>'ẓ','ẓ'=>'ẓ','Ẕ'=>'ẕ','ẕ'=>'ẕ','ẖ'=>'ẖ','ẗ'=>'ẗ','ẘ'=>'ẘ','ẙ'=>'ẙ','ẚ'=>'ẚ','ẛ'=>'ẛ','Ạ'=>'ạ','ạ'=>'ạ','Ả'=>'ả','ả'=>'ả','Ấ'=>'ấ','ấ'=>'ấ','Ầ'=>'ầ','ầ'=>'ầ','Ẩ'=>'ẩ','ẩ'=>'ẩ','Ẫ'=>'ẫ','ẫ'=>'ẫ','Ậ'=>'ậ','ậ'=>'ậ','Ắ'=>'ắ','ắ'=>'ắ','Ằ'=>'ằ','ằ'=>'ằ','Ẳ'=>'ẳ','ẳ'=>'ẳ','Ẵ'=>'ẵ','ẵ'=>'ẵ','Ặ'=>'ặ','ặ'=>'ặ','Ẹ'=>'ẹ','ẹ'=>'ẹ','Ẻ'=>'ẻ','ẻ'=>'ẻ','Ẽ'=>'ẽ','ẽ'=>'ẽ','Ế'=>'ế','ế'=>'ế','Ề'=>'ề','ề'=>'ề','Ể'=>'ể','ể'=>'ể','Ễ'=>'ễ','ễ'=>'ễ','Ệ'=>'ệ','ệ'=>'ệ','Ỉ'=>'ỉ','ỉ'=>'ỉ','Ị'=>'ị','ị'=>'ị','Ọ'=>'ọ','ọ'=>'ọ','Ỏ'=>'ỏ','ỏ'=>'ỏ','Ố'=>'ố','ố'=>'ố','Ồ'=>'ồ','ồ'=>'ồ','Ổ'=>'ổ','ổ'=>'ổ','Ỗ'=>'ỗ','ỗ'=>'ỗ','Ộ'=>'ộ','ộ'=>'ộ','Ớ'=>'ớ','ớ'=>'ớ','Ờ'=>'ờ','ờ'=>'ờ','Ở'=>'ở','ở'=>'ở','Ỡ'=>'ỡ','ỡ'=>'ỡ','Ợ'=>'ợ','ợ'=>'ợ','Ụ'=>'ụ','ụ'=>'ụ','Ủ'=>'ủ','ủ'=>'ủ','Ứ'=>'ứ','ứ'=>'ứ','Ừ'=>'ừ','ừ'=>'ừ','Ử'=>'ử','ử'=>'ử','Ữ'=>'ữ','ữ'=>'ữ','Ự'=>'ự','ự'=>'ự','Ỳ'=>'ỳ','ỳ'=>'ỳ','Ỵ'=>'ỵ','ỵ'=>'ỵ','Ỷ'=>'ỷ','ỷ'=>'ỷ','Ỹ'=>'ỹ','ỹ'=>'ỹ','ἀ'=>'ἀ','ἁ'=>'ἁ','ἂ'=>'ἂ','ἃ'=>'ἃ','ἄ'=>'ἄ','ἅ'=>'ἅ','ἆ'=>'ἆ','ἇ'=>'ἇ','Ἀ'=>'ἀ','Ἁ'=>'ἁ','Ἂ'=>'ἂ','Ἃ'=>'ἃ','Ἄ'=>'ἄ','Ἅ'=>'ἅ','Ἆ'=>'ἆ','Ἇ'=>'ἇ','ἐ'=>'ἐ','ἑ'=>'ἑ','ἒ'=>'ἒ','ἓ'=>'ἓ','ἔ'=>'ἔ','ἕ'=>'ἕ','Ἐ'=>'ἐ','Ἑ'=>'ἑ','Ἒ'=>'ἒ','Ἓ'=>'ἓ','Ἔ'=>'ἔ','Ἕ'=>'ἕ','ἠ'=>'ἠ','ἡ'=>'ἡ','ἢ'=>'ἢ','ἣ'=>'ἣ','ἤ'=>'ἤ','ἥ'=>'ἥ','ἦ'=>'ἦ','ἧ'=>'ἧ','Ἠ'=>'ἠ','Ἡ'=>'ἡ','Ἢ'=>'ἢ','Ἣ'=>'ἣ','Ἤ'=>'ἤ','Ἥ'=>'ἥ','Ἦ'=>'ἦ','Ἧ'=>'ἧ','ἰ'=>'ἰ','ἱ'=>'ἱ','ἲ'=>'ἲ','ἳ'=>'ἳ','ἴ'=>'ἴ','ἵ'=>'ἵ','ἶ'=>'ἶ','ἷ'=>'ἷ','Ἰ'=>'ἰ','Ἱ'=>'ἱ','Ἲ'=>'ἲ','Ἳ'=>'ἳ','Ἴ'=>'ἴ','Ἵ'=>'ἵ','Ἶ'=>'ἶ','Ἷ'=>'ἷ','ὀ'=>'ὀ','ὁ'=>'ὁ','ὂ'=>'ὂ','ὃ'=>'ὃ','ὄ'=>'ὄ','ὅ'=>'ὅ','Ὀ'=>'ὀ','Ὁ'=>'ὁ','Ὂ'=>'ὂ','Ὃ'=>'ὃ','Ὄ'=>'ὄ','Ὅ'=>'ὅ','ὐ'=>'ὐ','ὑ'=>'ὑ','ὒ'=>'ὒ','ὓ'=>'ὓ','ὔ'=>'ὔ','ὕ'=>'ὕ','ὖ'=>'ὖ','ὗ'=>'ὗ','Ὑ'=>'ὑ','Ὓ'=>'ὓ','Ὕ'=>'ὕ','Ὗ'=>'ὗ','ὠ'=>'ὠ','ὡ'=>'ὡ','ὢ'=>'ὢ','ὣ'=>'ὣ','ὤ'=>'ὤ','ὥ'=>'ὥ','ὦ'=>'ὦ','ὧ'=>'ὧ','Ὠ'=>'ὠ','Ὡ'=>'ὡ','Ὢ'=>'ὢ','Ὣ'=>'ὣ','Ὤ'=>'ὤ','Ὥ'=>'ὥ','Ὦ'=>'ὦ','Ὧ'=>'ὧ','ὰ'=>'ὰ','ά'=>'ά','ὲ'=>'ὲ','έ'=>'έ','ὴ'=>'ὴ','ή'=>'ή','ὶ'=>'ὶ','ί'=>'ί','ὸ'=>'ὸ','ό'=>'ό','ὺ'=>'ὺ','ύ'=>'ύ','ὼ'=>'ὼ','ώ'=>'ώ','ᾀ'=>'ᾀ','ᾁ'=>'ᾁ','ᾂ'=>'ᾂ','ᾃ'=>'ᾃ','ᾄ'=>'ᾄ','ᾅ'=>'ᾅ','ᾆ'=>'ᾆ','ᾇ'=>'ᾇ','ᾈ'=>'ᾀ','ᾉ'=>'ᾁ','ᾊ'=>'ᾂ','ᾋ'=>'ᾃ','ᾌ'=>'ᾄ','ᾍ'=>'ᾅ','ᾎ'=>'ᾆ','ᾏ'=>'ᾇ','ᾐ'=>'ᾐ','ᾑ'=>'ᾑ','ᾒ'=>'ᾒ','ᾓ'=>'ᾓ','ᾔ'=>'ᾔ','ᾕ'=>'ᾕ','ᾖ'=>'ᾖ','ᾗ'=>'ᾗ','ᾘ'=>'ᾐ','ᾙ'=>'ᾑ','ᾚ'=>'ᾒ','ᾛ'=>'ᾓ','ᾜ'=>'ᾔ','ᾝ'=>'ᾕ','ᾞ'=>'ᾖ','ᾟ'=>'ᾗ','ᾠ'=>'ᾠ','ᾡ'=>'ᾡ','ᾢ'=>'ᾢ','ᾣ'=>'ᾣ','ᾤ'=>'ᾤ','ᾥ'=>'ᾥ','ᾦ'=>'ᾦ','ᾧ'=>'ᾧ','ᾨ'=>'ᾠ','ᾩ'=>'ᾡ','ᾪ'=>'ᾢ','ᾫ'=>'ᾣ','ᾬ'=>'ᾤ','ᾭ'=>'ᾥ','ᾮ'=>'ᾦ','ᾯ'=>'ᾧ','ᾰ'=>'ᾰ','ᾱ'=>'ᾱ','ᾲ'=>'ᾲ','ᾳ'=>'ᾳ','ᾴ'=>'ᾴ','ᾶ'=>'ᾶ','ᾷ'=>'ᾷ','Ᾰ'=>'ᾰ','Ᾱ'=>'ᾱ','Ὰ'=>'ὰ','Ά'=>'ά','ᾼ'=>'ᾳ','ι'=>'ι','ῂ'=>'ῂ','ῃ'=>'ῃ','ῄ'=>'ῄ','ῆ'=>'ῆ','ῇ'=>'ῇ','Ὲ'=>'ὲ','Έ'=>'έ','Ὴ'=>'ὴ','Ή'=>'ή','ῌ'=>'ῃ','ῐ'=>'ῐ','ῑ'=>'ῑ','ῒ'=>'ῒ','ΐ'=>'ΐ','ῖ'=>'ῖ','ῗ'=>'ῗ','Ῐ'=>'ῐ','Ῑ'=>'ῑ','Ὶ'=>'ὶ','Ί'=>'ί','ῠ'=>'ῠ','ῡ'=>'ῡ','ῢ'=>'ῢ','ΰ'=>'ΰ','ῤ'=>'ῤ','ῥ'=>'ῥ','ῦ'=>'ῦ','ῧ'=>'ῧ','Ῠ'=>'ῠ','Ῡ'=>'ῡ','Ὺ'=>'ὺ','Ύ'=>'ύ','Ῥ'=>'ῥ','ῲ'=>'ῲ','ῳ'=>'ῳ','ῴ'=>'ῴ','ῶ'=>'ῶ','ῷ'=>'ῷ','Ὸ'=>'ὸ','Ό'=>'ό','Ὼ'=>'ὼ','Ώ'=>'ώ','ῼ'=>'ῳ');
diff --git a/phpBB/includes/utf/data/search_indexer_31.php b/phpBB/includes/utf/data/search_indexer_31.php
index 191365a313..85961d36fc 100644
--- a/phpBB/includes/utf/data/search_indexer_31.php
+++ b/phpBB/includes/utf/data/search_indexer_31.php
@@ -1 +1 @@
-<?php return array('豈'=>'豈','更'=>'更','車'=>'車','賈'=>'賈','滑'=>'滑','串'=>'串','句'=>'句','龜'=>'龜','龜'=>'龜','契'=>'契','金'=>'金','喇'=>'喇','奈'=>'奈','懶'=>'懶','癩'=>'癩','羅'=>'羅','蘿'=>'蘿','螺'=>'螺','裸'=>'裸','邏'=>'邏','樂'=>'樂','洛'=>'洛','烙'=>'烙','珞'=>'珞','落'=>'落','酪'=>'酪','駱'=>'駱','亂'=>'亂','卵'=>'卵','欄'=>'欄','爛'=>'爛','蘭'=>'蘭','鸞'=>'鸞','嵐'=>'嵐','濫'=>'濫','藍'=>'藍','襤'=>'襤','拉'=>'拉','臘'=>'臘','蠟'=>'蠟','廊'=>'廊','朗'=>'朗','浪'=>'浪','狼'=>'狼','郎'=>'郎','來'=>'來','冷'=>'冷','勞'=>'勞','擄'=>'擄','櫓'=>'櫓','爐'=>'爐','盧'=>'盧','老'=>'老','蘆'=>'蘆','虜'=>'虜','路'=>'路','露'=>'露','魯'=>'魯','鷺'=>'鷺','碌'=>'碌','祿'=>'祿','綠'=>'綠','菉'=>'菉','錄'=>'錄','鹿'=>'鹿','論'=>'論','壟'=>'壟','弄'=>'弄','籠'=>'籠','聾'=>'聾','牢'=>'牢','磊'=>'磊','賂'=>'賂','雷'=>'雷','壘'=>'壘','屢'=>'屢','樓'=>'樓','淚'=>'淚','漏'=>'漏','累'=>'累','縷'=>'縷','陋'=>'陋','勒'=>'勒','肋'=>'肋','凜'=>'凜','凌'=>'凌','稜'=>'稜','綾'=>'綾','菱'=>'菱','陵'=>'陵','讀'=>'讀','拏'=>'拏','樂'=>'樂','諾'=>'諾','丹'=>'丹','寧'=>'寧','怒'=>'怒','率'=>'率','異'=>'異','北'=>'北','磻'=>'磻','便'=>'便','復'=>'復','不'=>'不','泌'=>'泌','數'=>'數','索'=>'索','參'=>'參','塞'=>'塞','省'=>'省','葉'=>'葉','說'=>'說','殺'=>'殺','辰'=>'辰','沈'=>'沈','拾'=>'拾','若'=>'若','掠'=>'掠','略'=>'略','亮'=>'亮','兩'=>'兩','凉'=>'凉','梁'=>'梁','糧'=>'糧','良'=>'良','諒'=>'諒','量'=>'量','勵'=>'勵','呂'=>'呂','女'=>'女','廬'=>'廬','旅'=>'旅','濾'=>'濾','礪'=>'礪','閭'=>'閭','驪'=>'驪','麗'=>'麗','黎'=>'黎','力'=>'力','曆'=>'曆','歷'=>'歷','轢'=>'轢','年'=>'年','憐'=>'憐','戀'=>'戀','撚'=>'撚','漣'=>'漣','煉'=>'煉','璉'=>'璉','秊'=>'秊','練'=>'練','聯'=>'聯','輦'=>'輦','蓮'=>'蓮','連'=>'連','鍊'=>'鍊','列'=>'列','劣'=>'劣','咽'=>'咽','烈'=>'烈','裂'=>'裂','說'=>'說','廉'=>'廉','念'=>'念','捻'=>'捻','殮'=>'殮','簾'=>'簾','獵'=>'獵','令'=>'令','囹'=>'囹','寧'=>'寧','嶺'=>'嶺','怜'=>'怜','玲'=>'玲','瑩'=>'瑩','羚'=>'羚','聆'=>'聆','鈴'=>'鈴','零'=>'零','靈'=>'靈','領'=>'領','例'=>'例','禮'=>'禮','醴'=>'醴','隸'=>'隸','惡'=>'惡','了'=>'了','僚'=>'僚','寮'=>'寮','尿'=>'尿','料'=>'料','樂'=>'樂','燎'=>'燎','療'=>'療','蓼'=>'蓼','遼'=>'遼','龍'=>'龍','暈'=>'暈','阮'=>'阮','劉'=>'劉','杻'=>'杻','柳'=>'柳','流'=>'流','溜'=>'溜','琉'=>'琉','留'=>'留','硫'=>'硫','紐'=>'紐','類'=>'類','六'=>'六','戮'=>'戮','陸'=>'陸','倫'=>'倫','崙'=>'崙','淪'=>'淪','輪'=>'輪','律'=>'律','慄'=>'慄','栗'=>'栗','率'=>'率','隆'=>'隆','利'=>'利','吏'=>'吏','履'=>'履','易'=>'易','李'=>'李','梨'=>'梨','泥'=>'泥','理'=>'理','痢'=>'痢','罹'=>'罹','裏'=>'裏','裡'=>'裡','里'=>'里','離'=>'離','匿'=>'匿','溺'=>'溺','吝'=>'吝','燐'=>'燐','璘'=>'璘','藺'=>'藺','隣'=>'隣','鱗'=>'鱗','麟'=>'麟','林'=>'林','淋'=>'淋','臨'=>'臨','立'=>'立','笠'=>'笠','粒'=>'粒','狀'=>'狀','炙'=>'炙','識'=>'識','什'=>'什','茶'=>'茶','刺'=>'刺','切'=>'切','度'=>'度','拓'=>'拓','糖'=>'糖','宅'=>'宅','洞'=>'洞','暴'=>'暴','輻'=>'輻','行'=>'行','降'=>'降','見'=>'見','廓'=>'廓','兀'=>'兀','嗀'=>'嗀','﨎'=>'﨎','﨏'=>'﨏','塚'=>'塚','﨑'=>'﨑','晴'=>'晴','﨓'=>'﨓','﨔'=>'﨔','凞'=>'凞','猪'=>'猪','益'=>'益','礼'=>'礼','神'=>'神','祥'=>'祥','福'=>'福','靖'=>'靖','精'=>'精','羽'=>'羽','﨟'=>'﨟','蘒'=>'蘒','﨡'=>'﨡','諸'=>'諸','﨣'=>'﨣','﨤'=>'﨤','逸'=>'逸','都'=>'都','﨧'=>'﨧','﨨'=>'﨨','﨩'=>'﨩','飯'=>'飯','飼'=>'飼','館'=>'館','鶴'=>'鶴','侮'=>'侮','僧'=>'僧','免'=>'免','勉'=>'勉','勤'=>'勤','卑'=>'卑','喝'=>'喝','嘆'=>'嘆','器'=>'器','塀'=>'塀','墨'=>'墨','層'=>'層','屮'=>'屮','悔'=>'悔','慨'=>'慨','憎'=>'憎','懲'=>'懲','敏'=>'敏','既'=>'既','暑'=>'暑','梅'=>'梅','海'=>'海','渚'=>'渚','漢'=>'漢','煮'=>'煮','爫'=>'爫','琢'=>'琢','碑'=>'碑','社'=>'社','祉'=>'祉','祈'=>'祈','祐'=>'祐','祖'=>'祖','祝'=>'祝','禍'=>'禍','禎'=>'禎','穀'=>'穀','突'=>'突','節'=>'節','練'=>'練','縉'=>'縉','繁'=>'繁','署'=>'署','者'=>'者','臭'=>'臭','艹'=>'艹','艹'=>'艹','著'=>'著','褐'=>'褐','視'=>'視','謁'=>'謁','謹'=>'謹','賓'=>'賓','贈'=>'贈','辶'=>'辶','逸'=>'逸','難'=>'難','響'=>'響','頻'=>'頻','並'=>'並','况'=>'况','全'=>'全','侀'=>'侀','充'=>'充','冀'=>'冀','勇'=>'勇','勺'=>'勺','喝'=>'喝','啕'=>'啕','喙'=>'喙','嗢'=>'嗢','塚'=>'塚','墳'=>'墳','奄'=>'奄','奔'=>'奔','婢'=>'婢','嬨'=>'嬨','廒'=>'廒','廙'=>'廙','彩'=>'彩','徭'=>'徭','惘'=>'惘','慎'=>'慎','愈'=>'愈','憎'=>'憎','慠'=>'慠','懲'=>'懲','戴'=>'戴','揄'=>'揄','搜'=>'搜','摒'=>'摒','敖'=>'敖','晴'=>'晴','朗'=>'朗','望'=>'望','杖'=>'杖','歹'=>'歹','殺'=>'殺','流'=>'流','滛'=>'滛','滋'=>'滋','漢'=>'漢','瀞'=>'瀞','煮'=>'煮','瞧'=>'瞧','爵'=>'爵','犯'=>'犯','猪'=>'猪','瑱'=>'瑱','甆'=>'甆','画'=>'画','瘝'=>'瘝','瘟'=>'瘟','益'=>'益','盛'=>'盛','直'=>'直','睊'=>'睊','着'=>'着','磌'=>'磌','窱'=>'窱','節'=>'節','类'=>'类','絛'=>'絛','練'=>'練','缾'=>'缾','者'=>'者','荒'=>'荒','華'=>'華','蝹'=>'蝹','襁'=>'襁','覆'=>'覆','視'=>'視','調'=>'調','諸'=>'諸','請'=>'請','謁'=>'謁','諾'=>'諾','諭'=>'諭','謹'=>'謹','變'=>'變','贈'=>'贈','輸'=>'輸','遲'=>'遲','醙'=>'醙','鉶'=>'鉶','陼'=>'陼','難'=>'難','靖'=>'靖','韛'=>'韛','響'=>'響','頋'=>'頋','頻'=>'頻','鬒'=>'鬒','龜'=>'龜','𢡊'=>'𢡊','𢡄'=>'𢡄','𣏕'=>'𣏕','㮝'=>'㮝','䀘'=>'䀘','䀹'=>'䀹','𥉉'=>'𥉉','𥳐'=>'𥳐','𧻓'=>'𧻓','齃'=>'齃','龎'=>'龎','ff'=>'ff','fi'=>'fi','fl'=>'fl','ffi'=>'ffi','ffl'=>'ffl','ſt'=>'ſt','st'=>'st','ﬓ'=>'ﬓ','ﬔ'=>'ﬔ','ﬕ'=>'ﬕ','ﬖ'=>'ﬖ','ﬗ'=>'ﬗ','יִ'=>'יִ','ﬞ'=>'ﬞ','ײַ'=>'ײַ','ﬠ'=>'ﬠ','ﬡ'=>'ﬡ','ﬢ'=>'ﬢ','ﬣ'=>'ﬣ','ﬤ'=>'ﬤ','ﬥ'=>'ﬥ','ﬦ'=>'ﬦ','ﬧ'=>'ﬧ','ﬨ'=>'ﬨ','שׁ'=>'שׁ','שׂ'=>'שׂ','שּׁ'=>'שּׁ','שּׂ'=>'שּׂ','אַ'=>'אַ','אָ'=>'אָ','אּ'=>'אּ','בּ'=>'בּ','גּ'=>'גּ','דּ'=>'דּ','הּ'=>'הּ','וּ'=>'וּ','זּ'=>'זּ','טּ'=>'טּ','יּ'=>'יּ','ךּ'=>'ךּ','כּ'=>'כּ','לּ'=>'לּ','מּ'=>'מּ','נּ'=>'נּ','סּ'=>'סּ','ףּ'=>'ףּ','פּ'=>'פּ','צּ'=>'צּ','קּ'=>'קּ','רּ'=>'רּ','שּ'=>'שּ','תּ'=>'תּ','וֹ'=>'וֹ','בֿ'=>'בֿ','כֿ'=>'כֿ','פֿ'=>'פֿ','ﭏ'=>'ﭏ','ﭐ'=>'ﭐ','ﭑ'=>'ﭑ','ﭒ'=>'ﭒ','ﭓ'=>'ﭓ','ﭔ'=>'ﭔ','ﭕ'=>'ﭕ','ﭖ'=>'ﭖ','ﭗ'=>'ﭗ','ﭘ'=>'ﭘ','ﭙ'=>'ﭙ','ﭚ'=>'ﭚ','ﭛ'=>'ﭛ','ﭜ'=>'ﭜ','ﭝ'=>'ﭝ','ﭞ'=>'ﭞ','ﭟ'=>'ﭟ','ﭠ'=>'ﭠ','ﭡ'=>'ﭡ','ﭢ'=>'ﭢ','ﭣ'=>'ﭣ','ﭤ'=>'ﭤ','ﭥ'=>'ﭥ','ﭦ'=>'ﭦ','ﭧ'=>'ﭧ','ﭨ'=>'ﭨ','ﭩ'=>'ﭩ','ﭪ'=>'ﭪ','ﭫ'=>'ﭫ','ﭬ'=>'ﭬ','ﭭ'=>'ﭭ','ﭮ'=>'ﭮ','ﭯ'=>'ﭯ','ﭰ'=>'ﭰ','ﭱ'=>'ﭱ','ﭲ'=>'ﭲ','ﭳ'=>'ﭳ','ﭴ'=>'ﭴ','ﭵ'=>'ﭵ','ﭶ'=>'ﭶ','ﭷ'=>'ﭷ','ﭸ'=>'ﭸ','ﭹ'=>'ﭹ','ﭺ'=>'ﭺ','ﭻ'=>'ﭻ','ﭼ'=>'ﭼ','ﭽ'=>'ﭽ','ﭾ'=>'ﭾ','ﭿ'=>'ﭿ','ﮀ'=>'ﮀ','ﮁ'=>'ﮁ','ﮂ'=>'ﮂ','ﮃ'=>'ﮃ','ﮄ'=>'ﮄ','ﮅ'=>'ﮅ','ﮆ'=>'ﮆ','ﮇ'=>'ﮇ','ﮈ'=>'ﮈ','ﮉ'=>'ﮉ','ﮊ'=>'ﮊ','ﮋ'=>'ﮋ','ﮌ'=>'ﮌ','ﮍ'=>'ﮍ','ﮎ'=>'ﮎ','ﮏ'=>'ﮏ','ﮐ'=>'ﮐ','ﮑ'=>'ﮑ','ﮒ'=>'ﮒ','ﮓ'=>'ﮓ','ﮔ'=>'ﮔ','ﮕ'=>'ﮕ','ﮖ'=>'ﮖ','ﮗ'=>'ﮗ','ﮘ'=>'ﮘ','ﮙ'=>'ﮙ','ﮚ'=>'ﮚ','ﮛ'=>'ﮛ','ﮜ'=>'ﮜ','ﮝ'=>'ﮝ','ﮞ'=>'ﮞ','ﮟ'=>'ﮟ','ﮠ'=>'ﮠ','ﮡ'=>'ﮡ','ﮢ'=>'ﮢ','ﮣ'=>'ﮣ','ﮤ'=>'ﮤ','ﮥ'=>'ﮥ','ﮦ'=>'ﮦ','ﮧ'=>'ﮧ','ﮨ'=>'ﮨ','ﮩ'=>'ﮩ','ﮪ'=>'ﮪ','ﮫ'=>'ﮫ','ﮬ'=>'ﮬ','ﮭ'=>'ﮭ','ﮮ'=>'ﮮ','ﮯ'=>'ﮯ','ﮰ'=>'ﮰ','ﮱ'=>'ﮱ','ﯓ'=>'ﯓ','ﯔ'=>'ﯔ','ﯕ'=>'ﯕ','ﯖ'=>'ﯖ','ﯗ'=>'ﯗ','ﯘ'=>'ﯘ','ﯙ'=>'ﯙ','ﯚ'=>'ﯚ','ﯛ'=>'ﯛ','ﯜ'=>'ﯜ','ﯝ'=>'ﯝ','ﯞ'=>'ﯞ','ﯟ'=>'ﯟ','ﯠ'=>'ﯠ','ﯡ'=>'ﯡ','ﯢ'=>'ﯢ','ﯣ'=>'ﯣ','ﯤ'=>'ﯤ','ﯥ'=>'ﯥ','ﯦ'=>'ﯦ','ﯧ'=>'ﯧ','ﯨ'=>'ﯨ','ﯩ'=>'ﯩ','ﯪ'=>'ﯪ','ﯫ'=>'ﯫ','ﯬ'=>'ﯬ','ﯭ'=>'ﯭ','ﯮ'=>'ﯮ','ﯯ'=>'ﯯ','ﯰ'=>'ﯰ','ﯱ'=>'ﯱ','ﯲ'=>'ﯲ','ﯳ'=>'ﯳ','ﯴ'=>'ﯴ','ﯵ'=>'ﯵ','ﯶ'=>'ﯶ','ﯷ'=>'ﯷ','ﯸ'=>'ﯸ','ﯹ'=>'ﯹ','ﯺ'=>'ﯺ','ﯻ'=>'ﯻ','ﯼ'=>'ﯼ','ﯽ'=>'ﯽ','ﯾ'=>'ﯾ','ﯿ'=>'ﯿ','ﰀ'=>'ﰀ','ﰁ'=>'ﰁ','ﰂ'=>'ﰂ','ﰃ'=>'ﰃ','ﰄ'=>'ﰄ','ﰅ'=>'ﰅ','ﰆ'=>'ﰆ','ﰇ'=>'ﰇ','ﰈ'=>'ﰈ','ﰉ'=>'ﰉ','ﰊ'=>'ﰊ','ﰋ'=>'ﰋ','ﰌ'=>'ﰌ','ﰍ'=>'ﰍ','ﰎ'=>'ﰎ','ﰏ'=>'ﰏ','ﰐ'=>'ﰐ','ﰑ'=>'ﰑ','ﰒ'=>'ﰒ','ﰓ'=>'ﰓ','ﰔ'=>'ﰔ','ﰕ'=>'ﰕ','ﰖ'=>'ﰖ','ﰗ'=>'ﰗ','ﰘ'=>'ﰘ','ﰙ'=>'ﰙ','ﰚ'=>'ﰚ','ﰛ'=>'ﰛ','ﰜ'=>'ﰜ','ﰝ'=>'ﰝ','ﰞ'=>'ﰞ','ﰟ'=>'ﰟ','ﰠ'=>'ﰠ','ﰡ'=>'ﰡ','ﰢ'=>'ﰢ','ﰣ'=>'ﰣ','ﰤ'=>'ﰤ','ﰥ'=>'ﰥ','ﰦ'=>'ﰦ','ﰧ'=>'ﰧ','ﰨ'=>'ﰨ','ﰩ'=>'ﰩ','ﰪ'=>'ﰪ','ﰫ'=>'ﰫ','ﰬ'=>'ﰬ','ﰭ'=>'ﰭ','ﰮ'=>'ﰮ','ﰯ'=>'ﰯ','ﰰ'=>'ﰰ','ﰱ'=>'ﰱ','ﰲ'=>'ﰲ','ﰳ'=>'ﰳ','ﰴ'=>'ﰴ','ﰵ'=>'ﰵ','ﰶ'=>'ﰶ','ﰷ'=>'ﰷ','ﰸ'=>'ﰸ','ﰹ'=>'ﰹ','ﰺ'=>'ﰺ','ﰻ'=>'ﰻ','ﰼ'=>'ﰼ','ﰽ'=>'ﰽ','ﰾ'=>'ﰾ','ﰿ'=>'ﰿ','ﱀ'=>'ﱀ','ﱁ'=>'ﱁ','ﱂ'=>'ﱂ','ﱃ'=>'ﱃ','ﱄ'=>'ﱄ','ﱅ'=>'ﱅ','ﱆ'=>'ﱆ','ﱇ'=>'ﱇ','ﱈ'=>'ﱈ','ﱉ'=>'ﱉ','ﱊ'=>'ﱊ','ﱋ'=>'ﱋ','ﱌ'=>'ﱌ','ﱍ'=>'ﱍ','ﱎ'=>'ﱎ','ﱏ'=>'ﱏ','ﱐ'=>'ﱐ','ﱑ'=>'ﱑ','ﱒ'=>'ﱒ','ﱓ'=>'ﱓ','ﱔ'=>'ﱔ','ﱕ'=>'ﱕ','ﱖ'=>'ﱖ','ﱗ'=>'ﱗ','ﱘ'=>'ﱘ','ﱙ'=>'ﱙ','ﱚ'=>'ﱚ','ﱛ'=>'ﱛ','ﱜ'=>'ﱜ','ﱝ'=>'ﱝ','ﱞ'=>'ﱞ','ﱟ'=>'ﱟ','ﱠ'=>'ﱠ','ﱡ'=>'ﱡ','ﱢ'=>'ﱢ','ﱣ'=>'ﱣ','ﱤ'=>'ﱤ','ﱥ'=>'ﱥ','ﱦ'=>'ﱦ','ﱧ'=>'ﱧ','ﱨ'=>'ﱨ','ﱩ'=>'ﱩ','ﱪ'=>'ﱪ','ﱫ'=>'ﱫ','ﱬ'=>'ﱬ','ﱭ'=>'ﱭ','ﱮ'=>'ﱮ','ﱯ'=>'ﱯ','ﱰ'=>'ﱰ','ﱱ'=>'ﱱ','ﱲ'=>'ﱲ','ﱳ'=>'ﱳ','ﱴ'=>'ﱴ','ﱵ'=>'ﱵ','ﱶ'=>'ﱶ','ﱷ'=>'ﱷ','ﱸ'=>'ﱸ','ﱹ'=>'ﱹ','ﱺ'=>'ﱺ','ﱻ'=>'ﱻ','ﱼ'=>'ﱼ','ﱽ'=>'ﱽ','ﱾ'=>'ﱾ','ﱿ'=>'ﱿ','ﲀ'=>'ﲀ','ﲁ'=>'ﲁ','ﲂ'=>'ﲂ','ﲃ'=>'ﲃ','ﲄ'=>'ﲄ','ﲅ'=>'ﲅ','ﲆ'=>'ﲆ','ﲇ'=>'ﲇ','ﲈ'=>'ﲈ','ﲉ'=>'ﲉ','ﲊ'=>'ﲊ','ﲋ'=>'ﲋ','ﲌ'=>'ﲌ','ﲍ'=>'ﲍ','ﲎ'=>'ﲎ','ﲏ'=>'ﲏ','ﲐ'=>'ﲐ','ﲑ'=>'ﲑ','ﲒ'=>'ﲒ','ﲓ'=>'ﲓ','ﲔ'=>'ﲔ','ﲕ'=>'ﲕ','ﲖ'=>'ﲖ','ﲗ'=>'ﲗ','ﲘ'=>'ﲘ','ﲙ'=>'ﲙ','ﲚ'=>'ﲚ','ﲛ'=>'ﲛ','ﲜ'=>'ﲜ','ﲝ'=>'ﲝ','ﲞ'=>'ﲞ','ﲟ'=>'ﲟ','ﲠ'=>'ﲠ','ﲡ'=>'ﲡ','ﲢ'=>'ﲢ','ﲣ'=>'ﲣ','ﲤ'=>'ﲤ','ﲥ'=>'ﲥ','ﲦ'=>'ﲦ','ﲧ'=>'ﲧ','ﲨ'=>'ﲨ','ﲩ'=>'ﲩ','ﲪ'=>'ﲪ','ﲫ'=>'ﲫ','ﲬ'=>'ﲬ','ﲭ'=>'ﲭ','ﲮ'=>'ﲮ','ﲯ'=>'ﲯ','ﲰ'=>'ﲰ','ﲱ'=>'ﲱ','ﲲ'=>'ﲲ','ﲳ'=>'ﲳ','ﲴ'=>'ﲴ','ﲵ'=>'ﲵ','ﲶ'=>'ﲶ','ﲷ'=>'ﲷ','ﲸ'=>'ﲸ','ﲹ'=>'ﲹ','ﲺ'=>'ﲺ','ﲻ'=>'ﲻ','ﲼ'=>'ﲼ','ﲽ'=>'ﲽ','ﲾ'=>'ﲾ','ﲿ'=>'ﲿ','ﳀ'=>'ﳀ','ﳁ'=>'ﳁ','ﳂ'=>'ﳂ','ﳃ'=>'ﳃ','ﳄ'=>'ﳄ','ﳅ'=>'ﳅ','ﳆ'=>'ﳆ','ﳇ'=>'ﳇ','ﳈ'=>'ﳈ','ﳉ'=>'ﳉ','ﳊ'=>'ﳊ','ﳋ'=>'ﳋ','ﳌ'=>'ﳌ','ﳍ'=>'ﳍ','ﳎ'=>'ﳎ','ﳏ'=>'ﳏ','ﳐ'=>'ﳐ','ﳑ'=>'ﳑ','ﳒ'=>'ﳒ','ﳓ'=>'ﳓ','ﳔ'=>'ﳔ','ﳕ'=>'ﳕ','ﳖ'=>'ﳖ','ﳗ'=>'ﳗ','ﳘ'=>'ﳘ','ﳙ'=>'ﳙ','ﳚ'=>'ﳚ','ﳛ'=>'ﳛ','ﳜ'=>'ﳜ','ﳝ'=>'ﳝ','ﳞ'=>'ﳞ','ﳟ'=>'ﳟ','ﳠ'=>'ﳠ','ﳡ'=>'ﳡ','ﳢ'=>'ﳢ','ﳣ'=>'ﳣ','ﳤ'=>'ﳤ','ﳥ'=>'ﳥ','ﳦ'=>'ﳦ','ﳧ'=>'ﳧ','ﳨ'=>'ﳨ','ﳩ'=>'ﳩ','ﳪ'=>'ﳪ','ﳫ'=>'ﳫ','ﳬ'=>'ﳬ','ﳭ'=>'ﳭ','ﳮ'=>'ﳮ','ﳯ'=>'ﳯ','ﳰ'=>'ﳰ','ﳱ'=>'ﳱ','ﳲ'=>'ﳲ','ﳳ'=>'ﳳ','ﳴ'=>'ﳴ','ﳵ'=>'ﳵ','ﳶ'=>'ﳶ','ﳷ'=>'ﳷ','ﳸ'=>'ﳸ','ﳹ'=>'ﳹ','ﳺ'=>'ﳺ','ﳻ'=>'ﳻ','ﳼ'=>'ﳼ','ﳽ'=>'ﳽ','ﳾ'=>'ﳾ','ﳿ'=>'ﳿ','ﴀ'=>'ﴀ','ﴁ'=>'ﴁ','ﴂ'=>'ﴂ','ﴃ'=>'ﴃ','ﴄ'=>'ﴄ','ﴅ'=>'ﴅ','ﴆ'=>'ﴆ','ﴇ'=>'ﴇ','ﴈ'=>'ﴈ','ﴉ'=>'ﴉ','ﴊ'=>'ﴊ','ﴋ'=>'ﴋ','ﴌ'=>'ﴌ','ﴍ'=>'ﴍ','ﴎ'=>'ﴎ','ﴏ'=>'ﴏ','ﴐ'=>'ﴐ','ﴑ'=>'ﴑ','ﴒ'=>'ﴒ','ﴓ'=>'ﴓ','ﴔ'=>'ﴔ','ﴕ'=>'ﴕ','ﴖ'=>'ﴖ','ﴗ'=>'ﴗ','ﴘ'=>'ﴘ','ﴙ'=>'ﴙ','ﴚ'=>'ﴚ','ﴛ'=>'ﴛ','ﴜ'=>'ﴜ','ﴝ'=>'ﴝ','ﴞ'=>'ﴞ','ﴟ'=>'ﴟ','ﴠ'=>'ﴠ','ﴡ'=>'ﴡ','ﴢ'=>'ﴢ','ﴣ'=>'ﴣ','ﴤ'=>'ﴤ','ﴥ'=>'ﴥ','ﴦ'=>'ﴦ','ﴧ'=>'ﴧ','ﴨ'=>'ﴨ','ﴩ'=>'ﴩ','ﴪ'=>'ﴪ','ﴫ'=>'ﴫ','ﴬ'=>'ﴬ','ﴭ'=>'ﴭ','ﴮ'=>'ﴮ','ﴯ'=>'ﴯ','ﴰ'=>'ﴰ','ﴱ'=>'ﴱ','ﴲ'=>'ﴲ','ﴳ'=>'ﴳ','ﴴ'=>'ﴴ','ﴵ'=>'ﴵ','ﴶ'=>'ﴶ','ﴷ'=>'ﴷ','ﴸ'=>'ﴸ','ﴹ'=>'ﴹ','ﴺ'=>'ﴺ','ﴻ'=>'ﴻ','ﴼ'=>'ﴼ','ﴽ'=>'ﴽ','ﵐ'=>'ﵐ','ﵑ'=>'ﵑ','ﵒ'=>'ﵒ','ﵓ'=>'ﵓ','ﵔ'=>'ﵔ','ﵕ'=>'ﵕ','ﵖ'=>'ﵖ','ﵗ'=>'ﵗ','ﵘ'=>'ﵘ','ﵙ'=>'ﵙ','ﵚ'=>'ﵚ','ﵛ'=>'ﵛ','ﵜ'=>'ﵜ','ﵝ'=>'ﵝ','ﵞ'=>'ﵞ','ﵟ'=>'ﵟ','ﵠ'=>'ﵠ','ﵡ'=>'ﵡ','ﵢ'=>'ﵢ','ﵣ'=>'ﵣ','ﵤ'=>'ﵤ','ﵥ'=>'ﵥ','ﵦ'=>'ﵦ','ﵧ'=>'ﵧ','ﵨ'=>'ﵨ','ﵩ'=>'ﵩ','ﵪ'=>'ﵪ','ﵫ'=>'ﵫ','ﵬ'=>'ﵬ','ﵭ'=>'ﵭ','ﵮ'=>'ﵮ','ﵯ'=>'ﵯ','ﵰ'=>'ﵰ','ﵱ'=>'ﵱ','ﵲ'=>'ﵲ','ﵳ'=>'ﵳ','ﵴ'=>'ﵴ','ﵵ'=>'ﵵ','ﵶ'=>'ﵶ','ﵷ'=>'ﵷ','ﵸ'=>'ﵸ','ﵹ'=>'ﵹ','ﵺ'=>'ﵺ','ﵻ'=>'ﵻ','ﵼ'=>'ﵼ','ﵽ'=>'ﵽ','ﵾ'=>'ﵾ','ﵿ'=>'ﵿ','ﶀ'=>'ﶀ','ﶁ'=>'ﶁ','ﶂ'=>'ﶂ','ﶃ'=>'ﶃ','ﶄ'=>'ﶄ','ﶅ'=>'ﶅ','ﶆ'=>'ﶆ','ﶇ'=>'ﶇ','ﶈ'=>'ﶈ','ﶉ'=>'ﶉ','ﶊ'=>'ﶊ','ﶋ'=>'ﶋ','ﶌ'=>'ﶌ','ﶍ'=>'ﶍ','ﶎ'=>'ﶎ','ﶏ'=>'ﶏ','ﶒ'=>'ﶒ','ﶓ'=>'ﶓ','ﶔ'=>'ﶔ','ﶕ'=>'ﶕ','ﶖ'=>'ﶖ','ﶗ'=>'ﶗ','ﶘ'=>'ﶘ','ﶙ'=>'ﶙ','ﶚ'=>'ﶚ','ﶛ'=>'ﶛ','ﶜ'=>'ﶜ','ﶝ'=>'ﶝ','ﶞ'=>'ﶞ','ﶟ'=>'ﶟ','ﶠ'=>'ﶠ','ﶡ'=>'ﶡ','ﶢ'=>'ﶢ','ﶣ'=>'ﶣ','ﶤ'=>'ﶤ','ﶥ'=>'ﶥ','ﶦ'=>'ﶦ','ﶧ'=>'ﶧ','ﶨ'=>'ﶨ','ﶩ'=>'ﶩ','ﶪ'=>'ﶪ','ﶫ'=>'ﶫ','ﶬ'=>'ﶬ','ﶭ'=>'ﶭ','ﶮ'=>'ﶮ','ﶯ'=>'ﶯ','ﶰ'=>'ﶰ','ﶱ'=>'ﶱ','ﶲ'=>'ﶲ','ﶳ'=>'ﶳ','ﶴ'=>'ﶴ','ﶵ'=>'ﶵ','ﶶ'=>'ﶶ','ﶷ'=>'ﶷ','ﶸ'=>'ﶸ','ﶹ'=>'ﶹ','ﶺ'=>'ﶺ','ﶻ'=>'ﶻ','ﶼ'=>'ﶼ','ﶽ'=>'ﶽ','ﶾ'=>'ﶾ','ﶿ'=>'ﶿ','ﷀ'=>'ﷀ','ﷁ'=>'ﷁ','ﷂ'=>'ﷂ','ﷃ'=>'ﷃ','ﷄ'=>'ﷄ','ﷅ'=>'ﷅ','ﷆ'=>'ﷆ','ﷇ'=>'ﷇ','ﷰ'=>'ﷰ','ﷱ'=>'ﷱ','ﷲ'=>'ﷲ','ﷳ'=>'ﷳ','ﷴ'=>'ﷴ','ﷵ'=>'ﷵ','ﷶ'=>'ﷶ','ﷷ'=>'ﷷ','ﷸ'=>'ﷸ','ﷹ'=>'ﷹ','ﷺ'=>'ﷺ','ﷻ'=>'ﷻ','︀'=>'︀','︁'=>'︁','︂'=>'︂','︃'=>'︃','︄'=>'︄','︅'=>'︅','︆'=>'︆','︇'=>'︇','︈'=>'︈','︉'=>'︉','︊'=>'︊','︋'=>'︋','︌'=>'︌','︍'=>'︍','︎'=>'︎','️'=>'️','︠'=>'︠','︡'=>'︡','︢'=>'︢','︣'=>'︣','ﹰ'=>'ﹰ','ﹱ'=>'ﹱ','ﹲ'=>'ﹲ','ﹳ'=>'ﹳ','ﹴ'=>'ﹴ','ﹶ'=>'ﹶ','ﹷ'=>'ﹷ','ﹸ'=>'ﹸ','ﹹ'=>'ﹹ','ﹺ'=>'ﹺ','ﹻ'=>'ﹻ','ﹼ'=>'ﹼ','ﹽ'=>'ﹽ','ﹾ'=>'ﹾ','ﹿ'=>'ﹿ','ﺀ'=>'ﺀ','ﺁ'=>'ﺁ','ﺂ'=>'ﺂ','ﺃ'=>'ﺃ','ﺄ'=>'ﺄ','ﺅ'=>'ﺅ','ﺆ'=>'ﺆ','ﺇ'=>'ﺇ','ﺈ'=>'ﺈ','ﺉ'=>'ﺉ','ﺊ'=>'ﺊ','ﺋ'=>'ﺋ','ﺌ'=>'ﺌ','ﺍ'=>'ﺍ','ﺎ'=>'ﺎ','ﺏ'=>'ﺏ','ﺐ'=>'ﺐ','ﺑ'=>'ﺑ','ﺒ'=>'ﺒ','ﺓ'=>'ﺓ','ﺔ'=>'ﺔ','ﺕ'=>'ﺕ','ﺖ'=>'ﺖ','ﺗ'=>'ﺗ','ﺘ'=>'ﺘ','ﺙ'=>'ﺙ','ﺚ'=>'ﺚ','ﺛ'=>'ﺛ','ﺜ'=>'ﺜ','ﺝ'=>'ﺝ','ﺞ'=>'ﺞ','ﺟ'=>'ﺟ','ﺠ'=>'ﺠ','ﺡ'=>'ﺡ','ﺢ'=>'ﺢ','ﺣ'=>'ﺣ','ﺤ'=>'ﺤ','ﺥ'=>'ﺥ','ﺦ'=>'ﺦ','ﺧ'=>'ﺧ','ﺨ'=>'ﺨ','ﺩ'=>'ﺩ','ﺪ'=>'ﺪ','ﺫ'=>'ﺫ','ﺬ'=>'ﺬ','ﺭ'=>'ﺭ','ﺮ'=>'ﺮ','ﺯ'=>'ﺯ','ﺰ'=>'ﺰ','ﺱ'=>'ﺱ','ﺲ'=>'ﺲ','ﺳ'=>'ﺳ','ﺴ'=>'ﺴ','ﺵ'=>'ﺵ','ﺶ'=>'ﺶ','ﺷ'=>'ﺷ','ﺸ'=>'ﺸ','ﺹ'=>'ﺹ','ﺺ'=>'ﺺ','ﺻ'=>'ﺻ','ﺼ'=>'ﺼ','ﺽ'=>'ﺽ','ﺾ'=>'ﺾ','ﺿ'=>'ﺿ','ﻀ'=>'ﻀ','ﻁ'=>'ﻁ','ﻂ'=>'ﻂ','ﻃ'=>'ﻃ','ﻄ'=>'ﻄ','ﻅ'=>'ﻅ','ﻆ'=>'ﻆ','ﻇ'=>'ﻇ','ﻈ'=>'ﻈ','ﻉ'=>'ﻉ','ﻊ'=>'ﻊ','ﻋ'=>'ﻋ','ﻌ'=>'ﻌ','ﻍ'=>'ﻍ','ﻎ'=>'ﻎ','ﻏ'=>'ﻏ','ﻐ'=>'ﻐ','ﻑ'=>'ﻑ','ﻒ'=>'ﻒ','ﻓ'=>'ﻓ','ﻔ'=>'ﻔ','ﻕ'=>'ﻕ','ﻖ'=>'ﻖ','ﻗ'=>'ﻗ','ﻘ'=>'ﻘ','ﻙ'=>'ﻙ','ﻚ'=>'ﻚ','ﻛ'=>'ﻛ','ﻜ'=>'ﻜ','ﻝ'=>'ﻝ','ﻞ'=>'ﻞ','ﻟ'=>'ﻟ','ﻠ'=>'ﻠ','ﻡ'=>'ﻡ','ﻢ'=>'ﻢ','ﻣ'=>'ﻣ','ﻤ'=>'ﻤ','ﻥ'=>'ﻥ','ﻦ'=>'ﻦ','ﻧ'=>'ﻧ','ﻨ'=>'ﻨ','ﻩ'=>'ﻩ','ﻪ'=>'ﻪ','ﻫ'=>'ﻫ','ﻬ'=>'ﻬ','ﻭ'=>'ﻭ','ﻮ'=>'ﻮ','ﻯ'=>'ﻯ','ﻰ'=>'ﻰ','ﻱ'=>'ﻱ','ﻲ'=>'ﻲ','ﻳ'=>'ﻳ','ﻴ'=>'ﻴ','ﻵ'=>'ﻵ','ﻶ'=>'ﻶ','ﻷ'=>'ﻷ','ﻸ'=>'ﻸ','ﻹ'=>'ﻹ','ﻺ'=>'ﻺ','ﻻ'=>'ﻻ','ﻼ'=>'ﻼ','0'=>'0','1'=>'1','2'=>'2','3'=>'3','4'=>'4','5'=>'5','6'=>'6','7'=>'7','8'=>'8','9'=>'9','A'=>'a','B'=>'b','C'=>'c','D'=>'d','E'=>'e','F'=>'f','G'=>'g','H'=>'h','I'=>'i','J'=>'j','K'=>'k','L'=>'l','M'=>'m','N'=>'n','O'=>'o','P'=>'p','Q'=>'q','R'=>'r','S'=>'s','T'=>'t','U'=>'u','V'=>'v','W'=>'w','X'=>'x','Y'=>'y','Z'=>'z','a'=>'a','b'=>'b','c'=>'c','d'=>'d','e'=>'e','f'=>'f','g'=>'g','h'=>'h','i'=>'i','j'=>'j','k'=>'k','l'=>'l','m'=>'m','n'=>'n','o'=>'o','p'=>'p','q'=>'q','r'=>'r','s'=>'s','t'=>'t','u'=>'u','v'=>'v','w'=>'w','x'=>'x','y'=>'y','z'=>'z','ヲ'=>'ヲ','ァ'=>'ァ','ィ'=>'ィ','ゥ'=>'ゥ','ェ'=>'ェ','ォ'=>'ォ','ャ'=>'ャ','ュ'=>'ュ','ョ'=>'ョ','ッ'=>'ッ','ー'=>'ー','ア'=>'ア','イ'=>'イ','ウ'=>'ウ','エ'=>'エ','オ'=>'オ','カ'=>'カ','キ'=>'キ','ク'=>'ク','ケ'=>'ケ','コ'=>'コ','サ'=>'サ','シ'=>'シ','ス'=>'ス','セ'=>'セ','ソ'=>'ソ','タ'=>'タ','チ'=>'チ','ツ'=>'ツ','テ'=>'テ','ト'=>'ト','ナ'=>'ナ','ニ'=>'ニ','ヌ'=>'ヌ','ネ'=>'ネ','ノ'=>'ノ','ハ'=>'ハ','ヒ'=>'ヒ','フ'=>'フ','ヘ'=>'ヘ','ホ'=>'ホ','マ'=>'マ','ミ'=>'ミ','ム'=>'ム','メ'=>'メ','モ'=>'モ','ヤ'=>'ヤ','ユ'=>'ユ','ヨ'=>'ヨ','ラ'=>'ラ','リ'=>'リ','ル'=>'ル','レ'=>'レ','ロ'=>'ロ','ワ'=>'ワ','ン'=>'ン','゙'=>'゙','゚'=>'゚','ᅠ'=>'ᅠ','ᄀ'=>'ᄀ','ᄁ'=>'ᄁ','ᆪ'=>'ᆪ','ᄂ'=>'ᄂ','ᆬ'=>'ᆬ','ᆭ'=>'ᆭ','ᄃ'=>'ᄃ','ᄄ'=>'ᄄ','ᄅ'=>'ᄅ','ᆰ'=>'ᆰ','ᆱ'=>'ᆱ','ᆲ'=>'ᆲ','ᆳ'=>'ᆳ','ᆴ'=>'ᆴ','ᆵ'=>'ᆵ','ᄚ'=>'ᄚ','ᄆ'=>'ᄆ','ᄇ'=>'ᄇ','ᄈ'=>'ᄈ','ᄡ'=>'ᄡ','ᄉ'=>'ᄉ','ᄊ'=>'ᄊ','ᄋ'=>'ᄋ','ᄌ'=>'ᄌ','ᄍ'=>'ᄍ','ᄎ'=>'ᄎ','ᄏ'=>'ᄏ','ᄐ'=>'ᄐ','ᄑ'=>'ᄑ','ᄒ'=>'ᄒ','ᅡ'=>'ᅡ','ᅢ'=>'ᅢ','ᅣ'=>'ᅣ','ᅤ'=>'ᅤ','ᅥ'=>'ᅥ','ᅦ'=>'ᅦ','ᅧ'=>'ᅧ','ᅨ'=>'ᅨ','ᅩ'=>'ᅩ','ᅪ'=>'ᅪ','ᅫ'=>'ᅫ','ᅬ'=>'ᅬ','ᅭ'=>'ᅭ','ᅮ'=>'ᅮ','ᅯ'=>'ᅯ','ᅰ'=>'ᅰ','ᅱ'=>'ᅱ','ᅲ'=>'ᅲ','ᅳ'=>'ᅳ','ᅴ'=>'ᅴ','ᅵ'=>'ᅵ'); \ No newline at end of file
+<?php return array('豈'=>'豈','更'=>'更','車'=>'車','賈'=>'賈','滑'=>'滑','串'=>'串','句'=>'句','龜'=>'龜','龜'=>'龜','契'=>'契','金'=>'金','喇'=>'喇','奈'=>'奈','懶'=>'懶','癩'=>'癩','羅'=>'羅','蘿'=>'蘿','螺'=>'螺','裸'=>'裸','邏'=>'邏','樂'=>'樂','洛'=>'洛','烙'=>'烙','珞'=>'珞','落'=>'落','酪'=>'酪','駱'=>'駱','亂'=>'亂','卵'=>'卵','欄'=>'欄','爛'=>'爛','蘭'=>'蘭','鸞'=>'鸞','嵐'=>'嵐','濫'=>'濫','藍'=>'藍','襤'=>'襤','拉'=>'拉','臘'=>'臘','蠟'=>'蠟','廊'=>'廊','朗'=>'朗','浪'=>'浪','狼'=>'狼','郎'=>'郎','來'=>'來','冷'=>'冷','勞'=>'勞','擄'=>'擄','櫓'=>'櫓','爐'=>'爐','盧'=>'盧','老'=>'老','蘆'=>'蘆','虜'=>'虜','路'=>'路','露'=>'露','魯'=>'魯','鷺'=>'鷺','碌'=>'碌','祿'=>'祿','綠'=>'綠','菉'=>'菉','錄'=>'錄','鹿'=>'鹿','論'=>'論','壟'=>'壟','弄'=>'弄','籠'=>'籠','聾'=>'聾','牢'=>'牢','磊'=>'磊','賂'=>'賂','雷'=>'雷','壘'=>'壘','屢'=>'屢','樓'=>'樓','淚'=>'淚','漏'=>'漏','累'=>'累','縷'=>'縷','陋'=>'陋','勒'=>'勒','肋'=>'肋','凜'=>'凜','凌'=>'凌','稜'=>'稜','綾'=>'綾','菱'=>'菱','陵'=>'陵','讀'=>'讀','拏'=>'拏','樂'=>'樂','諾'=>'諾','丹'=>'丹','寧'=>'寧','怒'=>'怒','率'=>'率','異'=>'異','北'=>'北','磻'=>'磻','便'=>'便','復'=>'復','不'=>'不','泌'=>'泌','數'=>'數','索'=>'索','參'=>'參','塞'=>'塞','省'=>'省','葉'=>'葉','說'=>'說','殺'=>'殺','辰'=>'辰','沈'=>'沈','拾'=>'拾','若'=>'若','掠'=>'掠','略'=>'略','亮'=>'亮','兩'=>'兩','凉'=>'凉','梁'=>'梁','糧'=>'糧','良'=>'良','諒'=>'諒','量'=>'量','勵'=>'勵','呂'=>'呂','女'=>'女','廬'=>'廬','旅'=>'旅','濾'=>'濾','礪'=>'礪','閭'=>'閭','驪'=>'驪','麗'=>'麗','黎'=>'黎','力'=>'力','曆'=>'曆','歷'=>'歷','轢'=>'轢','年'=>'年','憐'=>'憐','戀'=>'戀','撚'=>'撚','漣'=>'漣','煉'=>'煉','璉'=>'璉','秊'=>'秊','練'=>'練','聯'=>'聯','輦'=>'輦','蓮'=>'蓮','連'=>'連','鍊'=>'鍊','列'=>'列','劣'=>'劣','咽'=>'咽','烈'=>'烈','裂'=>'裂','說'=>'說','廉'=>'廉','念'=>'念','捻'=>'捻','殮'=>'殮','簾'=>'簾','獵'=>'獵','令'=>'令','囹'=>'囹','寧'=>'寧','嶺'=>'嶺','怜'=>'怜','玲'=>'玲','瑩'=>'瑩','羚'=>'羚','聆'=>'聆','鈴'=>'鈴','零'=>'零','靈'=>'靈','領'=>'領','例'=>'例','禮'=>'禮','醴'=>'醴','隸'=>'隸','惡'=>'惡','了'=>'了','僚'=>'僚','寮'=>'寮','尿'=>'尿','料'=>'料','樂'=>'樂','燎'=>'燎','療'=>'療','蓼'=>'蓼','遼'=>'遼','龍'=>'龍','暈'=>'暈','阮'=>'阮','劉'=>'劉','杻'=>'杻','柳'=>'柳','流'=>'流','溜'=>'溜','琉'=>'琉','留'=>'留','硫'=>'硫','紐'=>'紐','類'=>'類','六'=>'六','戮'=>'戮','陸'=>'陸','倫'=>'倫','崙'=>'崙','淪'=>'淪','輪'=>'輪','律'=>'律','慄'=>'慄','栗'=>'栗','率'=>'率','隆'=>'隆','利'=>'利','吏'=>'吏','履'=>'履','易'=>'易','李'=>'李','梨'=>'梨','泥'=>'泥','理'=>'理','痢'=>'痢','罹'=>'罹','裏'=>'裏','裡'=>'裡','里'=>'里','離'=>'離','匿'=>'匿','溺'=>'溺','吝'=>'吝','燐'=>'燐','璘'=>'璘','藺'=>'藺','隣'=>'隣','鱗'=>'鱗','麟'=>'麟','林'=>'林','淋'=>'淋','臨'=>'臨','立'=>'立','笠'=>'笠','粒'=>'粒','狀'=>'狀','炙'=>'炙','識'=>'識','什'=>'什','茶'=>'茶','刺'=>'刺','切'=>'切','度'=>'度','拓'=>'拓','糖'=>'糖','宅'=>'宅','洞'=>'洞','暴'=>'暴','輻'=>'輻','行'=>'行','降'=>'降','見'=>'見','廓'=>'廓','兀'=>'兀','嗀'=>'嗀','﨎'=>'﨎','﨏'=>'﨏','塚'=>'塚','﨑'=>'﨑','晴'=>'晴','﨓'=>'﨓','﨔'=>'﨔','凞'=>'凞','猪'=>'猪','益'=>'益','礼'=>'礼','神'=>'神','祥'=>'祥','福'=>'福','靖'=>'靖','精'=>'精','羽'=>'羽','﨟'=>'﨟','蘒'=>'蘒','﨡'=>'﨡','諸'=>'諸','﨣'=>'﨣','﨤'=>'﨤','逸'=>'逸','都'=>'都','﨧'=>'﨧','﨨'=>'﨨','﨩'=>'﨩','飯'=>'飯','飼'=>'飼','館'=>'館','鶴'=>'鶴','侮'=>'侮','僧'=>'僧','免'=>'免','勉'=>'勉','勤'=>'勤','卑'=>'卑','喝'=>'喝','嘆'=>'嘆','器'=>'器','塀'=>'塀','墨'=>'墨','層'=>'層','屮'=>'屮','悔'=>'悔','慨'=>'慨','憎'=>'憎','懲'=>'懲','敏'=>'敏','既'=>'既','暑'=>'暑','梅'=>'梅','海'=>'海','渚'=>'渚','漢'=>'漢','煮'=>'煮','爫'=>'爫','琢'=>'琢','碑'=>'碑','社'=>'社','祉'=>'祉','祈'=>'祈','祐'=>'祐','祖'=>'祖','祝'=>'祝','禍'=>'禍','禎'=>'禎','穀'=>'穀','突'=>'突','節'=>'節','練'=>'練','縉'=>'縉','繁'=>'繁','署'=>'署','者'=>'者','臭'=>'臭','艹'=>'艹','艹'=>'艹','著'=>'著','褐'=>'褐','視'=>'視','謁'=>'謁','謹'=>'謹','賓'=>'賓','贈'=>'贈','辶'=>'辶','逸'=>'逸','難'=>'難','響'=>'響','頻'=>'頻','並'=>'並','况'=>'况','全'=>'全','侀'=>'侀','充'=>'充','冀'=>'冀','勇'=>'勇','勺'=>'勺','喝'=>'喝','啕'=>'啕','喙'=>'喙','嗢'=>'嗢','塚'=>'塚','墳'=>'墳','奄'=>'奄','奔'=>'奔','婢'=>'婢','嬨'=>'嬨','廒'=>'廒','廙'=>'廙','彩'=>'彩','徭'=>'徭','惘'=>'惘','慎'=>'慎','愈'=>'愈','憎'=>'憎','慠'=>'慠','懲'=>'懲','戴'=>'戴','揄'=>'揄','搜'=>'搜','摒'=>'摒','敖'=>'敖','晴'=>'晴','朗'=>'朗','望'=>'望','杖'=>'杖','歹'=>'歹','殺'=>'殺','流'=>'流','滛'=>'滛','滋'=>'滋','漢'=>'漢','瀞'=>'瀞','煮'=>'煮','瞧'=>'瞧','爵'=>'爵','犯'=>'犯','猪'=>'猪','瑱'=>'瑱','甆'=>'甆','画'=>'画','瘝'=>'瘝','瘟'=>'瘟','益'=>'益','盛'=>'盛','直'=>'直','睊'=>'睊','着'=>'着','磌'=>'磌','窱'=>'窱','節'=>'節','类'=>'类','絛'=>'絛','練'=>'練','缾'=>'缾','者'=>'者','荒'=>'荒','華'=>'華','蝹'=>'蝹','襁'=>'襁','覆'=>'覆','視'=>'視','調'=>'調','諸'=>'諸','請'=>'請','謁'=>'謁','諾'=>'諾','諭'=>'諭','謹'=>'謹','變'=>'變','贈'=>'贈','輸'=>'輸','遲'=>'遲','醙'=>'醙','鉶'=>'鉶','陼'=>'陼','難'=>'難','靖'=>'靖','韛'=>'韛','響'=>'響','頋'=>'頋','頻'=>'頻','鬒'=>'鬒','龜'=>'龜','𢡊'=>'𢡊','𢡄'=>'𢡄','𣏕'=>'𣏕','㮝'=>'㮝','䀘'=>'䀘','䀹'=>'䀹','𥉉'=>'𥉉','𥳐'=>'𥳐','𧻓'=>'𧻓','齃'=>'齃','龎'=>'龎','ff'=>'ff','fi'=>'fi','fl'=>'fl','ffi'=>'ffi','ffl'=>'ffl','ſt'=>'ſt','st'=>'st','ﬓ'=>'ﬓ','ﬔ'=>'ﬔ','ﬕ'=>'ﬕ','ﬖ'=>'ﬖ','ﬗ'=>'ﬗ','יִ'=>'יִ','ﬞ'=>'ﬞ','ײַ'=>'ײַ','ﬠ'=>'ﬠ','ﬡ'=>'ﬡ','ﬢ'=>'ﬢ','ﬣ'=>'ﬣ','ﬤ'=>'ﬤ','ﬥ'=>'ﬥ','ﬦ'=>'ﬦ','ﬧ'=>'ﬧ','ﬨ'=>'ﬨ','שׁ'=>'שׁ','שׂ'=>'שׂ','שּׁ'=>'שּׁ','שּׂ'=>'שּׂ','אַ'=>'אַ','אָ'=>'אָ','אּ'=>'אּ','בּ'=>'בּ','גּ'=>'גּ','דּ'=>'דּ','הּ'=>'הּ','וּ'=>'וּ','זּ'=>'זּ','טּ'=>'טּ','יּ'=>'יּ','ךּ'=>'ךּ','כּ'=>'כּ','לּ'=>'לּ','מּ'=>'מּ','נּ'=>'נּ','סּ'=>'סּ','ףּ'=>'ףּ','פּ'=>'פּ','צּ'=>'צּ','קּ'=>'קּ','רּ'=>'רּ','שּ'=>'שּ','תּ'=>'תּ','וֹ'=>'וֹ','בֿ'=>'בֿ','כֿ'=>'כֿ','פֿ'=>'פֿ','ﭏ'=>'ﭏ','ﭐ'=>'ﭐ','ﭑ'=>'ﭑ','ﭒ'=>'ﭒ','ﭓ'=>'ﭓ','ﭔ'=>'ﭔ','ﭕ'=>'ﭕ','ﭖ'=>'ﭖ','ﭗ'=>'ﭗ','ﭘ'=>'ﭘ','ﭙ'=>'ﭙ','ﭚ'=>'ﭚ','ﭛ'=>'ﭛ','ﭜ'=>'ﭜ','ﭝ'=>'ﭝ','ﭞ'=>'ﭞ','ﭟ'=>'ﭟ','ﭠ'=>'ﭠ','ﭡ'=>'ﭡ','ﭢ'=>'ﭢ','ﭣ'=>'ﭣ','ﭤ'=>'ﭤ','ﭥ'=>'ﭥ','ﭦ'=>'ﭦ','ﭧ'=>'ﭧ','ﭨ'=>'ﭨ','ﭩ'=>'ﭩ','ﭪ'=>'ﭪ','ﭫ'=>'ﭫ','ﭬ'=>'ﭬ','ﭭ'=>'ﭭ','ﭮ'=>'ﭮ','ﭯ'=>'ﭯ','ﭰ'=>'ﭰ','ﭱ'=>'ﭱ','ﭲ'=>'ﭲ','ﭳ'=>'ﭳ','ﭴ'=>'ﭴ','ﭵ'=>'ﭵ','ﭶ'=>'ﭶ','ﭷ'=>'ﭷ','ﭸ'=>'ﭸ','ﭹ'=>'ﭹ','ﭺ'=>'ﭺ','ﭻ'=>'ﭻ','ﭼ'=>'ﭼ','ﭽ'=>'ﭽ','ﭾ'=>'ﭾ','ﭿ'=>'ﭿ','ﮀ'=>'ﮀ','ﮁ'=>'ﮁ','ﮂ'=>'ﮂ','ﮃ'=>'ﮃ','ﮄ'=>'ﮄ','ﮅ'=>'ﮅ','ﮆ'=>'ﮆ','ﮇ'=>'ﮇ','ﮈ'=>'ﮈ','ﮉ'=>'ﮉ','ﮊ'=>'ﮊ','ﮋ'=>'ﮋ','ﮌ'=>'ﮌ','ﮍ'=>'ﮍ','ﮎ'=>'ﮎ','ﮏ'=>'ﮏ','ﮐ'=>'ﮐ','ﮑ'=>'ﮑ','ﮒ'=>'ﮒ','ﮓ'=>'ﮓ','ﮔ'=>'ﮔ','ﮕ'=>'ﮕ','ﮖ'=>'ﮖ','ﮗ'=>'ﮗ','ﮘ'=>'ﮘ','ﮙ'=>'ﮙ','ﮚ'=>'ﮚ','ﮛ'=>'ﮛ','ﮜ'=>'ﮜ','ﮝ'=>'ﮝ','ﮞ'=>'ﮞ','ﮟ'=>'ﮟ','ﮠ'=>'ﮠ','ﮡ'=>'ﮡ','ﮢ'=>'ﮢ','ﮣ'=>'ﮣ','ﮤ'=>'ﮤ','ﮥ'=>'ﮥ','ﮦ'=>'ﮦ','ﮧ'=>'ﮧ','ﮨ'=>'ﮨ','ﮩ'=>'ﮩ','ﮪ'=>'ﮪ','ﮫ'=>'ﮫ','ﮬ'=>'ﮬ','ﮭ'=>'ﮭ','ﮮ'=>'ﮮ','ﮯ'=>'ﮯ','ﮰ'=>'ﮰ','ﮱ'=>'ﮱ','ﯓ'=>'ﯓ','ﯔ'=>'ﯔ','ﯕ'=>'ﯕ','ﯖ'=>'ﯖ','ﯗ'=>'ﯗ','ﯘ'=>'ﯘ','ﯙ'=>'ﯙ','ﯚ'=>'ﯚ','ﯛ'=>'ﯛ','ﯜ'=>'ﯜ','ﯝ'=>'ﯝ','ﯞ'=>'ﯞ','ﯟ'=>'ﯟ','ﯠ'=>'ﯠ','ﯡ'=>'ﯡ','ﯢ'=>'ﯢ','ﯣ'=>'ﯣ','ﯤ'=>'ﯤ','ﯥ'=>'ﯥ','ﯦ'=>'ﯦ','ﯧ'=>'ﯧ','ﯨ'=>'ﯨ','ﯩ'=>'ﯩ','ﯪ'=>'ﯪ','ﯫ'=>'ﯫ','ﯬ'=>'ﯬ','ﯭ'=>'ﯭ','ﯮ'=>'ﯮ','ﯯ'=>'ﯯ','ﯰ'=>'ﯰ','ﯱ'=>'ﯱ','ﯲ'=>'ﯲ','ﯳ'=>'ﯳ','ﯴ'=>'ﯴ','ﯵ'=>'ﯵ','ﯶ'=>'ﯶ','ﯷ'=>'ﯷ','ﯸ'=>'ﯸ','ﯹ'=>'ﯹ','ﯺ'=>'ﯺ','ﯻ'=>'ﯻ','ﯼ'=>'ﯼ','ﯽ'=>'ﯽ','ﯾ'=>'ﯾ','ﯿ'=>'ﯿ','ﰀ'=>'ﰀ','ﰁ'=>'ﰁ','ﰂ'=>'ﰂ','ﰃ'=>'ﰃ','ﰄ'=>'ﰄ','ﰅ'=>'ﰅ','ﰆ'=>'ﰆ','ﰇ'=>'ﰇ','ﰈ'=>'ﰈ','ﰉ'=>'ﰉ','ﰊ'=>'ﰊ','ﰋ'=>'ﰋ','ﰌ'=>'ﰌ','ﰍ'=>'ﰍ','ﰎ'=>'ﰎ','ﰏ'=>'ﰏ','ﰐ'=>'ﰐ','ﰑ'=>'ﰑ','ﰒ'=>'ﰒ','ﰓ'=>'ﰓ','ﰔ'=>'ﰔ','ﰕ'=>'ﰕ','ﰖ'=>'ﰖ','ﰗ'=>'ﰗ','ﰘ'=>'ﰘ','ﰙ'=>'ﰙ','ﰚ'=>'ﰚ','ﰛ'=>'ﰛ','ﰜ'=>'ﰜ','ﰝ'=>'ﰝ','ﰞ'=>'ﰞ','ﰟ'=>'ﰟ','ﰠ'=>'ﰠ','ﰡ'=>'ﰡ','ﰢ'=>'ﰢ','ﰣ'=>'ﰣ','ﰤ'=>'ﰤ','ﰥ'=>'ﰥ','ﰦ'=>'ﰦ','ﰧ'=>'ﰧ','ﰨ'=>'ﰨ','ﰩ'=>'ﰩ','ﰪ'=>'ﰪ','ﰫ'=>'ﰫ','ﰬ'=>'ﰬ','ﰭ'=>'ﰭ','ﰮ'=>'ﰮ','ﰯ'=>'ﰯ','ﰰ'=>'ﰰ','ﰱ'=>'ﰱ','ﰲ'=>'ﰲ','ﰳ'=>'ﰳ','ﰴ'=>'ﰴ','ﰵ'=>'ﰵ','ﰶ'=>'ﰶ','ﰷ'=>'ﰷ','ﰸ'=>'ﰸ','ﰹ'=>'ﰹ','ﰺ'=>'ﰺ','ﰻ'=>'ﰻ','ﰼ'=>'ﰼ','ﰽ'=>'ﰽ','ﰾ'=>'ﰾ','ﰿ'=>'ﰿ','ﱀ'=>'ﱀ','ﱁ'=>'ﱁ','ﱂ'=>'ﱂ','ﱃ'=>'ﱃ','ﱄ'=>'ﱄ','ﱅ'=>'ﱅ','ﱆ'=>'ﱆ','ﱇ'=>'ﱇ','ﱈ'=>'ﱈ','ﱉ'=>'ﱉ','ﱊ'=>'ﱊ','ﱋ'=>'ﱋ','ﱌ'=>'ﱌ','ﱍ'=>'ﱍ','ﱎ'=>'ﱎ','ﱏ'=>'ﱏ','ﱐ'=>'ﱐ','ﱑ'=>'ﱑ','ﱒ'=>'ﱒ','ﱓ'=>'ﱓ','ﱔ'=>'ﱔ','ﱕ'=>'ﱕ','ﱖ'=>'ﱖ','ﱗ'=>'ﱗ','ﱘ'=>'ﱘ','ﱙ'=>'ﱙ','ﱚ'=>'ﱚ','ﱛ'=>'ﱛ','ﱜ'=>'ﱜ','ﱝ'=>'ﱝ','ﱞ'=>'ﱞ','ﱟ'=>'ﱟ','ﱠ'=>'ﱠ','ﱡ'=>'ﱡ','ﱢ'=>'ﱢ','ﱣ'=>'ﱣ','ﱤ'=>'ﱤ','ﱥ'=>'ﱥ','ﱦ'=>'ﱦ','ﱧ'=>'ﱧ','ﱨ'=>'ﱨ','ﱩ'=>'ﱩ','ﱪ'=>'ﱪ','ﱫ'=>'ﱫ','ﱬ'=>'ﱬ','ﱭ'=>'ﱭ','ﱮ'=>'ﱮ','ﱯ'=>'ﱯ','ﱰ'=>'ﱰ','ﱱ'=>'ﱱ','ﱲ'=>'ﱲ','ﱳ'=>'ﱳ','ﱴ'=>'ﱴ','ﱵ'=>'ﱵ','ﱶ'=>'ﱶ','ﱷ'=>'ﱷ','ﱸ'=>'ﱸ','ﱹ'=>'ﱹ','ﱺ'=>'ﱺ','ﱻ'=>'ﱻ','ﱼ'=>'ﱼ','ﱽ'=>'ﱽ','ﱾ'=>'ﱾ','ﱿ'=>'ﱿ','ﲀ'=>'ﲀ','ﲁ'=>'ﲁ','ﲂ'=>'ﲂ','ﲃ'=>'ﲃ','ﲄ'=>'ﲄ','ﲅ'=>'ﲅ','ﲆ'=>'ﲆ','ﲇ'=>'ﲇ','ﲈ'=>'ﲈ','ﲉ'=>'ﲉ','ﲊ'=>'ﲊ','ﲋ'=>'ﲋ','ﲌ'=>'ﲌ','ﲍ'=>'ﲍ','ﲎ'=>'ﲎ','ﲏ'=>'ﲏ','ﲐ'=>'ﲐ','ﲑ'=>'ﲑ','ﲒ'=>'ﲒ','ﲓ'=>'ﲓ','ﲔ'=>'ﲔ','ﲕ'=>'ﲕ','ﲖ'=>'ﲖ','ﲗ'=>'ﲗ','ﲘ'=>'ﲘ','ﲙ'=>'ﲙ','ﲚ'=>'ﲚ','ﲛ'=>'ﲛ','ﲜ'=>'ﲜ','ﲝ'=>'ﲝ','ﲞ'=>'ﲞ','ﲟ'=>'ﲟ','ﲠ'=>'ﲠ','ﲡ'=>'ﲡ','ﲢ'=>'ﲢ','ﲣ'=>'ﲣ','ﲤ'=>'ﲤ','ﲥ'=>'ﲥ','ﲦ'=>'ﲦ','ﲧ'=>'ﲧ','ﲨ'=>'ﲨ','ﲩ'=>'ﲩ','ﲪ'=>'ﲪ','ﲫ'=>'ﲫ','ﲬ'=>'ﲬ','ﲭ'=>'ﲭ','ﲮ'=>'ﲮ','ﲯ'=>'ﲯ','ﲰ'=>'ﲰ','ﲱ'=>'ﲱ','ﲲ'=>'ﲲ','ﲳ'=>'ﲳ','ﲴ'=>'ﲴ','ﲵ'=>'ﲵ','ﲶ'=>'ﲶ','ﲷ'=>'ﲷ','ﲸ'=>'ﲸ','ﲹ'=>'ﲹ','ﲺ'=>'ﲺ','ﲻ'=>'ﲻ','ﲼ'=>'ﲼ','ﲽ'=>'ﲽ','ﲾ'=>'ﲾ','ﲿ'=>'ﲿ','ﳀ'=>'ﳀ','ﳁ'=>'ﳁ','ﳂ'=>'ﳂ','ﳃ'=>'ﳃ','ﳄ'=>'ﳄ','ﳅ'=>'ﳅ','ﳆ'=>'ﳆ','ﳇ'=>'ﳇ','ﳈ'=>'ﳈ','ﳉ'=>'ﳉ','ﳊ'=>'ﳊ','ﳋ'=>'ﳋ','ﳌ'=>'ﳌ','ﳍ'=>'ﳍ','ﳎ'=>'ﳎ','ﳏ'=>'ﳏ','ﳐ'=>'ﳐ','ﳑ'=>'ﳑ','ﳒ'=>'ﳒ','ﳓ'=>'ﳓ','ﳔ'=>'ﳔ','ﳕ'=>'ﳕ','ﳖ'=>'ﳖ','ﳗ'=>'ﳗ','ﳘ'=>'ﳘ','ﳙ'=>'ﳙ','ﳚ'=>'ﳚ','ﳛ'=>'ﳛ','ﳜ'=>'ﳜ','ﳝ'=>'ﳝ','ﳞ'=>'ﳞ','ﳟ'=>'ﳟ','ﳠ'=>'ﳠ','ﳡ'=>'ﳡ','ﳢ'=>'ﳢ','ﳣ'=>'ﳣ','ﳤ'=>'ﳤ','ﳥ'=>'ﳥ','ﳦ'=>'ﳦ','ﳧ'=>'ﳧ','ﳨ'=>'ﳨ','ﳩ'=>'ﳩ','ﳪ'=>'ﳪ','ﳫ'=>'ﳫ','ﳬ'=>'ﳬ','ﳭ'=>'ﳭ','ﳮ'=>'ﳮ','ﳯ'=>'ﳯ','ﳰ'=>'ﳰ','ﳱ'=>'ﳱ','ﳲ'=>'ﳲ','ﳳ'=>'ﳳ','ﳴ'=>'ﳴ','ﳵ'=>'ﳵ','ﳶ'=>'ﳶ','ﳷ'=>'ﳷ','ﳸ'=>'ﳸ','ﳹ'=>'ﳹ','ﳺ'=>'ﳺ','ﳻ'=>'ﳻ','ﳼ'=>'ﳼ','ﳽ'=>'ﳽ','ﳾ'=>'ﳾ','ﳿ'=>'ﳿ','ﴀ'=>'ﴀ','ﴁ'=>'ﴁ','ﴂ'=>'ﴂ','ﴃ'=>'ﴃ','ﴄ'=>'ﴄ','ﴅ'=>'ﴅ','ﴆ'=>'ﴆ','ﴇ'=>'ﴇ','ﴈ'=>'ﴈ','ﴉ'=>'ﴉ','ﴊ'=>'ﴊ','ﴋ'=>'ﴋ','ﴌ'=>'ﴌ','ﴍ'=>'ﴍ','ﴎ'=>'ﴎ','ﴏ'=>'ﴏ','ﴐ'=>'ﴐ','ﴑ'=>'ﴑ','ﴒ'=>'ﴒ','ﴓ'=>'ﴓ','ﴔ'=>'ﴔ','ﴕ'=>'ﴕ','ﴖ'=>'ﴖ','ﴗ'=>'ﴗ','ﴘ'=>'ﴘ','ﴙ'=>'ﴙ','ﴚ'=>'ﴚ','ﴛ'=>'ﴛ','ﴜ'=>'ﴜ','ﴝ'=>'ﴝ','ﴞ'=>'ﴞ','ﴟ'=>'ﴟ','ﴠ'=>'ﴠ','ﴡ'=>'ﴡ','ﴢ'=>'ﴢ','ﴣ'=>'ﴣ','ﴤ'=>'ﴤ','ﴥ'=>'ﴥ','ﴦ'=>'ﴦ','ﴧ'=>'ﴧ','ﴨ'=>'ﴨ','ﴩ'=>'ﴩ','ﴪ'=>'ﴪ','ﴫ'=>'ﴫ','ﴬ'=>'ﴬ','ﴭ'=>'ﴭ','ﴮ'=>'ﴮ','ﴯ'=>'ﴯ','ﴰ'=>'ﴰ','ﴱ'=>'ﴱ','ﴲ'=>'ﴲ','ﴳ'=>'ﴳ','ﴴ'=>'ﴴ','ﴵ'=>'ﴵ','ﴶ'=>'ﴶ','ﴷ'=>'ﴷ','ﴸ'=>'ﴸ','ﴹ'=>'ﴹ','ﴺ'=>'ﴺ','ﴻ'=>'ﴻ','ﴼ'=>'ﴼ','ﴽ'=>'ﴽ','ﵐ'=>'ﵐ','ﵑ'=>'ﵑ','ﵒ'=>'ﵒ','ﵓ'=>'ﵓ','ﵔ'=>'ﵔ','ﵕ'=>'ﵕ','ﵖ'=>'ﵖ','ﵗ'=>'ﵗ','ﵘ'=>'ﵘ','ﵙ'=>'ﵙ','ﵚ'=>'ﵚ','ﵛ'=>'ﵛ','ﵜ'=>'ﵜ','ﵝ'=>'ﵝ','ﵞ'=>'ﵞ','ﵟ'=>'ﵟ','ﵠ'=>'ﵠ','ﵡ'=>'ﵡ','ﵢ'=>'ﵢ','ﵣ'=>'ﵣ','ﵤ'=>'ﵤ','ﵥ'=>'ﵥ','ﵦ'=>'ﵦ','ﵧ'=>'ﵧ','ﵨ'=>'ﵨ','ﵩ'=>'ﵩ','ﵪ'=>'ﵪ','ﵫ'=>'ﵫ','ﵬ'=>'ﵬ','ﵭ'=>'ﵭ','ﵮ'=>'ﵮ','ﵯ'=>'ﵯ','ﵰ'=>'ﵰ','ﵱ'=>'ﵱ','ﵲ'=>'ﵲ','ﵳ'=>'ﵳ','ﵴ'=>'ﵴ','ﵵ'=>'ﵵ','ﵶ'=>'ﵶ','ﵷ'=>'ﵷ','ﵸ'=>'ﵸ','ﵹ'=>'ﵹ','ﵺ'=>'ﵺ','ﵻ'=>'ﵻ','ﵼ'=>'ﵼ','ﵽ'=>'ﵽ','ﵾ'=>'ﵾ','ﵿ'=>'ﵿ','ﶀ'=>'ﶀ','ﶁ'=>'ﶁ','ﶂ'=>'ﶂ','ﶃ'=>'ﶃ','ﶄ'=>'ﶄ','ﶅ'=>'ﶅ','ﶆ'=>'ﶆ','ﶇ'=>'ﶇ','ﶈ'=>'ﶈ','ﶉ'=>'ﶉ','ﶊ'=>'ﶊ','ﶋ'=>'ﶋ','ﶌ'=>'ﶌ','ﶍ'=>'ﶍ','ﶎ'=>'ﶎ','ﶏ'=>'ﶏ','ﶒ'=>'ﶒ','ﶓ'=>'ﶓ','ﶔ'=>'ﶔ','ﶕ'=>'ﶕ','ﶖ'=>'ﶖ','ﶗ'=>'ﶗ','ﶘ'=>'ﶘ','ﶙ'=>'ﶙ','ﶚ'=>'ﶚ','ﶛ'=>'ﶛ','ﶜ'=>'ﶜ','ﶝ'=>'ﶝ','ﶞ'=>'ﶞ','ﶟ'=>'ﶟ','ﶠ'=>'ﶠ','ﶡ'=>'ﶡ','ﶢ'=>'ﶢ','ﶣ'=>'ﶣ','ﶤ'=>'ﶤ','ﶥ'=>'ﶥ','ﶦ'=>'ﶦ','ﶧ'=>'ﶧ','ﶨ'=>'ﶨ','ﶩ'=>'ﶩ','ﶪ'=>'ﶪ','ﶫ'=>'ﶫ','ﶬ'=>'ﶬ','ﶭ'=>'ﶭ','ﶮ'=>'ﶮ','ﶯ'=>'ﶯ','ﶰ'=>'ﶰ','ﶱ'=>'ﶱ','ﶲ'=>'ﶲ','ﶳ'=>'ﶳ','ﶴ'=>'ﶴ','ﶵ'=>'ﶵ','ﶶ'=>'ﶶ','ﶷ'=>'ﶷ','ﶸ'=>'ﶸ','ﶹ'=>'ﶹ','ﶺ'=>'ﶺ','ﶻ'=>'ﶻ','ﶼ'=>'ﶼ','ﶽ'=>'ﶽ','ﶾ'=>'ﶾ','ﶿ'=>'ﶿ','ﷀ'=>'ﷀ','ﷁ'=>'ﷁ','ﷂ'=>'ﷂ','ﷃ'=>'ﷃ','ﷄ'=>'ﷄ','ﷅ'=>'ﷅ','ﷆ'=>'ﷆ','ﷇ'=>'ﷇ','ﷰ'=>'ﷰ','ﷱ'=>'ﷱ','ﷲ'=>'ﷲ','ﷳ'=>'ﷳ','ﷴ'=>'ﷴ','ﷵ'=>'ﷵ','ﷶ'=>'ﷶ','ﷷ'=>'ﷷ','ﷸ'=>'ﷸ','ﷹ'=>'ﷹ','ﷺ'=>'ﷺ','ﷻ'=>'ﷻ','︀'=>'︀','︁'=>'︁','︂'=>'︂','︃'=>'︃','︄'=>'︄','︅'=>'︅','︆'=>'︆','︇'=>'︇','︈'=>'︈','︉'=>'︉','︊'=>'︊','︋'=>'︋','︌'=>'︌','︍'=>'︍','︎'=>'︎','️'=>'️','︠'=>'︠','︡'=>'︡','︢'=>'︢','︣'=>'︣','ﹰ'=>'ﹰ','ﹱ'=>'ﹱ','ﹲ'=>'ﹲ','ﹳ'=>'ﹳ','ﹴ'=>'ﹴ','ﹶ'=>'ﹶ','ﹷ'=>'ﹷ','ﹸ'=>'ﹸ','ﹹ'=>'ﹹ','ﹺ'=>'ﹺ','ﹻ'=>'ﹻ','ﹼ'=>'ﹼ','ﹽ'=>'ﹽ','ﹾ'=>'ﹾ','ﹿ'=>'ﹿ','ﺀ'=>'ﺀ','ﺁ'=>'ﺁ','ﺂ'=>'ﺂ','ﺃ'=>'ﺃ','ﺄ'=>'ﺄ','ﺅ'=>'ﺅ','ﺆ'=>'ﺆ','ﺇ'=>'ﺇ','ﺈ'=>'ﺈ','ﺉ'=>'ﺉ','ﺊ'=>'ﺊ','ﺋ'=>'ﺋ','ﺌ'=>'ﺌ','ﺍ'=>'ﺍ','ﺎ'=>'ﺎ','ﺏ'=>'ﺏ','ﺐ'=>'ﺐ','ﺑ'=>'ﺑ','ﺒ'=>'ﺒ','ﺓ'=>'ﺓ','ﺔ'=>'ﺔ','ﺕ'=>'ﺕ','ﺖ'=>'ﺖ','ﺗ'=>'ﺗ','ﺘ'=>'ﺘ','ﺙ'=>'ﺙ','ﺚ'=>'ﺚ','ﺛ'=>'ﺛ','ﺜ'=>'ﺜ','ﺝ'=>'ﺝ','ﺞ'=>'ﺞ','ﺟ'=>'ﺟ','ﺠ'=>'ﺠ','ﺡ'=>'ﺡ','ﺢ'=>'ﺢ','ﺣ'=>'ﺣ','ﺤ'=>'ﺤ','ﺥ'=>'ﺥ','ﺦ'=>'ﺦ','ﺧ'=>'ﺧ','ﺨ'=>'ﺨ','ﺩ'=>'ﺩ','ﺪ'=>'ﺪ','ﺫ'=>'ﺫ','ﺬ'=>'ﺬ','ﺭ'=>'ﺭ','ﺮ'=>'ﺮ','ﺯ'=>'ﺯ','ﺰ'=>'ﺰ','ﺱ'=>'ﺱ','ﺲ'=>'ﺲ','ﺳ'=>'ﺳ','ﺴ'=>'ﺴ','ﺵ'=>'ﺵ','ﺶ'=>'ﺶ','ﺷ'=>'ﺷ','ﺸ'=>'ﺸ','ﺹ'=>'ﺹ','ﺺ'=>'ﺺ','ﺻ'=>'ﺻ','ﺼ'=>'ﺼ','ﺽ'=>'ﺽ','ﺾ'=>'ﺾ','ﺿ'=>'ﺿ','ﻀ'=>'ﻀ','ﻁ'=>'ﻁ','ﻂ'=>'ﻂ','ﻃ'=>'ﻃ','ﻄ'=>'ﻄ','ﻅ'=>'ﻅ','ﻆ'=>'ﻆ','ﻇ'=>'ﻇ','ﻈ'=>'ﻈ','ﻉ'=>'ﻉ','ﻊ'=>'ﻊ','ﻋ'=>'ﻋ','ﻌ'=>'ﻌ','ﻍ'=>'ﻍ','ﻎ'=>'ﻎ','ﻏ'=>'ﻏ','ﻐ'=>'ﻐ','ﻑ'=>'ﻑ','ﻒ'=>'ﻒ','ﻓ'=>'ﻓ','ﻔ'=>'ﻔ','ﻕ'=>'ﻕ','ﻖ'=>'ﻖ','ﻗ'=>'ﻗ','ﻘ'=>'ﻘ','ﻙ'=>'ﻙ','ﻚ'=>'ﻚ','ﻛ'=>'ﻛ','ﻜ'=>'ﻜ','ﻝ'=>'ﻝ','ﻞ'=>'ﻞ','ﻟ'=>'ﻟ','ﻠ'=>'ﻠ','ﻡ'=>'ﻡ','ﻢ'=>'ﻢ','ﻣ'=>'ﻣ','ﻤ'=>'ﻤ','ﻥ'=>'ﻥ','ﻦ'=>'ﻦ','ﻧ'=>'ﻧ','ﻨ'=>'ﻨ','ﻩ'=>'ﻩ','ﻪ'=>'ﻪ','ﻫ'=>'ﻫ','ﻬ'=>'ﻬ','ﻭ'=>'ﻭ','ﻮ'=>'ﻮ','ﻯ'=>'ﻯ','ﻰ'=>'ﻰ','ﻱ'=>'ﻱ','ﻲ'=>'ﻲ','ﻳ'=>'ﻳ','ﻴ'=>'ﻴ','ﻵ'=>'ﻵ','ﻶ'=>'ﻶ','ﻷ'=>'ﻷ','ﻸ'=>'ﻸ','ﻹ'=>'ﻹ','ﻺ'=>'ﻺ','ﻻ'=>'ﻻ','ﻼ'=>'ﻼ','0'=>'0','1'=>'1','2'=>'2','3'=>'3','4'=>'4','5'=>'5','6'=>'6','7'=>'7','8'=>'8','9'=>'9','A'=>'a','B'=>'b','C'=>'c','D'=>'d','E'=>'e','F'=>'f','G'=>'g','H'=>'h','I'=>'i','J'=>'j','K'=>'k','L'=>'l','M'=>'m','N'=>'n','O'=>'o','P'=>'p','Q'=>'q','R'=>'r','S'=>'s','T'=>'t','U'=>'u','V'=>'v','W'=>'w','X'=>'x','Y'=>'y','Z'=>'z','a'=>'a','b'=>'b','c'=>'c','d'=>'d','e'=>'e','f'=>'f','g'=>'g','h'=>'h','i'=>'i','j'=>'j','k'=>'k','l'=>'l','m'=>'m','n'=>'n','o'=>'o','p'=>'p','q'=>'q','r'=>'r','s'=>'s','t'=>'t','u'=>'u','v'=>'v','w'=>'w','x'=>'x','y'=>'y','z'=>'z','ヲ'=>'ヲ','ァ'=>'ァ','ィ'=>'ィ','ゥ'=>'ゥ','ェ'=>'ェ','ォ'=>'ォ','ャ'=>'ャ','ュ'=>'ュ','ョ'=>'ョ','ッ'=>'ッ','ー'=>'ー','ア'=>'ア','イ'=>'イ','ウ'=>'ウ','エ'=>'エ','オ'=>'オ','カ'=>'カ','キ'=>'キ','ク'=>'ク','ケ'=>'ケ','コ'=>'コ','サ'=>'サ','シ'=>'シ','ス'=>'ス','セ'=>'セ','ソ'=>'ソ','タ'=>'タ','チ'=>'チ','ツ'=>'ツ','テ'=>'テ','ト'=>'ト','ナ'=>'ナ','ニ'=>'ニ','ヌ'=>'ヌ','ネ'=>'ネ','ノ'=>'ノ','ハ'=>'ハ','ヒ'=>'ヒ','フ'=>'フ','ヘ'=>'ヘ','ホ'=>'ホ','マ'=>'マ','ミ'=>'ミ','ム'=>'ム','メ'=>'メ','モ'=>'モ','ヤ'=>'ヤ','ユ'=>'ユ','ヨ'=>'ヨ','ラ'=>'ラ','リ'=>'リ','ル'=>'ル','レ'=>'レ','ロ'=>'ロ','ワ'=>'ワ','ン'=>'ン','゙'=>'゙','゚'=>'゚','ᅠ'=>'ᅠ','ᄀ'=>'ᄀ','ᄁ'=>'ᄁ','ᆪ'=>'ᆪ','ᄂ'=>'ᄂ','ᆬ'=>'ᆬ','ᆭ'=>'ᆭ','ᄃ'=>'ᄃ','ᄄ'=>'ᄄ','ᄅ'=>'ᄅ','ᆰ'=>'ᆰ','ᆱ'=>'ᆱ','ᆲ'=>'ᆲ','ᆳ'=>'ᆳ','ᆴ'=>'ᆴ','ᆵ'=>'ᆵ','ᄚ'=>'ᄚ','ᄆ'=>'ᄆ','ᄇ'=>'ᄇ','ᄈ'=>'ᄈ','ᄡ'=>'ᄡ','ᄉ'=>'ᄉ','ᄊ'=>'ᄊ','ᄋ'=>'ᄋ','ᄌ'=>'ᄌ','ᄍ'=>'ᄍ','ᄎ'=>'ᄎ','ᄏ'=>'ᄏ','ᄐ'=>'ᄐ','ᄑ'=>'ᄑ','ᄒ'=>'ᄒ','ᅡ'=>'ᅡ','ᅢ'=>'ᅢ','ᅣ'=>'ᅣ','ᅤ'=>'ᅤ','ᅥ'=>'ᅥ','ᅦ'=>'ᅦ','ᅧ'=>'ᅧ','ᅨ'=>'ᅨ','ᅩ'=>'ᅩ','ᅪ'=>'ᅪ','ᅫ'=>'ᅫ','ᅬ'=>'ᅬ','ᅭ'=>'ᅭ','ᅮ'=>'ᅮ','ᅯ'=>'ᅯ','ᅰ'=>'ᅰ','ᅱ'=>'ᅱ','ᅲ'=>'ᅲ','ᅳ'=>'ᅳ','ᅴ'=>'ᅴ','ᅵ'=>'ᅵ');
diff --git a/phpBB/includes/utf/data/search_indexer_32.php b/phpBB/includes/utf/data/search_indexer_32.php
index 73ed2924ab..cea5ebad6a 100644
--- a/phpBB/includes/utf/data/search_indexer_32.php
+++ b/phpBB/includes/utf/data/search_indexer_32.php
@@ -1 +1 @@
-<?php return array('𐀀'=>'𐀀','𐀁'=>'𐀁','𐀂'=>'𐀂','𐀃'=>'𐀃','𐀄'=>'𐀄','𐀅'=>'𐀅','𐀆'=>'𐀆','𐀇'=>'𐀇','𐀈'=>'𐀈','𐀉'=>'𐀉','𐀊'=>'𐀊','𐀋'=>'𐀋','𐀍'=>'𐀍','𐀎'=>'𐀎','𐀏'=>'𐀏','𐀐'=>'𐀐','𐀑'=>'𐀑','𐀒'=>'𐀒','𐀓'=>'𐀓','𐀔'=>'𐀔','𐀕'=>'𐀕','𐀖'=>'𐀖','𐀗'=>'𐀗','𐀘'=>'𐀘','𐀙'=>'𐀙','𐀚'=>'𐀚','𐀛'=>'𐀛','𐀜'=>'𐀜','𐀝'=>'𐀝','𐀞'=>'𐀞','𐀟'=>'𐀟','𐀠'=>'𐀠','𐀡'=>'𐀡','𐀢'=>'𐀢','𐀣'=>'𐀣','𐀤'=>'𐀤','𐀥'=>'𐀥','𐀦'=>'𐀦','𐀨'=>'𐀨','𐀩'=>'𐀩','𐀪'=>'𐀪','𐀫'=>'𐀫','𐀬'=>'𐀬','𐀭'=>'𐀭','𐀮'=>'𐀮','𐀯'=>'𐀯','𐀰'=>'𐀰','𐀱'=>'𐀱','𐀲'=>'𐀲','𐀳'=>'𐀳','𐀴'=>'𐀴','𐀵'=>'𐀵','𐀶'=>'𐀶','𐀷'=>'𐀷','𐀸'=>'𐀸','𐀹'=>'𐀹','𐀺'=>'𐀺','𐀼'=>'𐀼','𐀽'=>'𐀽','𐀿'=>'𐀿','𐁀'=>'𐁀','𐁁'=>'𐁁','𐁂'=>'𐁂','𐁃'=>'𐁃','𐁄'=>'𐁄','𐁅'=>'𐁅','𐁆'=>'𐁆','𐁇'=>'𐁇','𐁈'=>'𐁈','𐁉'=>'𐁉','𐁊'=>'𐁊','𐁋'=>'𐁋','𐁌'=>'𐁌','𐁍'=>'𐁍','𐁐'=>'𐁐','𐁑'=>'𐁑','𐁒'=>'𐁒','𐁓'=>'𐁓','𐁔'=>'𐁔','𐁕'=>'𐁕','𐁖'=>'𐁖','𐁗'=>'𐁗','𐁘'=>'𐁘','𐁙'=>'𐁙','𐁚'=>'𐁚','𐁛'=>'𐁛','𐁜'=>'𐁜','𐁝'=>'𐁝','𐂀'=>'𐂀','𐂁'=>'𐂁','𐂂'=>'𐂂','𐂃'=>'𐂃','𐂄'=>'𐂄','𐂅'=>'𐂅','𐂆'=>'𐂆','𐂇'=>'𐂇','𐂈'=>'𐂈','𐂉'=>'𐂉','𐂊'=>'𐂊','𐂋'=>'𐂋','𐂌'=>'𐂌','𐂍'=>'𐂍','𐂎'=>'𐂎','𐂏'=>'𐂏','𐂐'=>'𐂐','𐂑'=>'𐂑','𐂒'=>'𐂒','𐂓'=>'𐂓','𐂔'=>'𐂔','𐂕'=>'𐂕','𐂖'=>'𐂖','𐂗'=>'𐂗','𐂘'=>'𐂘','𐂙'=>'𐂙','𐂚'=>'𐂚','𐂛'=>'𐂛','𐂜'=>'𐂜','𐂝'=>'𐂝','𐂞'=>'𐂞','𐂟'=>'𐂟','𐂠'=>'𐂠','𐂡'=>'𐂡','𐂢'=>'𐂢','𐂣'=>'𐂣','𐂤'=>'𐂤','𐂥'=>'𐂥','𐂦'=>'𐂦','𐂧'=>'𐂧','𐂨'=>'𐂨','𐂩'=>'𐂩','𐂪'=>'𐂪','𐂫'=>'𐂫','𐂬'=>'𐂬','𐂭'=>'𐂭','𐂮'=>'𐂮','𐂯'=>'𐂯','𐂰'=>'𐂰','𐂱'=>'𐂱','𐂲'=>'𐂲','𐂳'=>'𐂳','𐂴'=>'𐂴','𐂵'=>'𐂵','𐂶'=>'𐂶','𐂷'=>'𐂷','𐂸'=>'𐂸','𐂹'=>'𐂹','𐂺'=>'𐂺','𐂻'=>'𐂻','𐂼'=>'𐂼','𐂽'=>'𐂽','𐂾'=>'𐂾','𐂿'=>'𐂿','𐃀'=>'𐃀','𐃁'=>'𐃁','𐃂'=>'𐃂','𐃃'=>'𐃃','𐃄'=>'𐃄','𐃅'=>'𐃅','𐃆'=>'𐃆','𐃇'=>'𐃇','𐃈'=>'𐃈','𐃉'=>'𐃉','𐃊'=>'𐃊','𐃋'=>'𐃋','𐃌'=>'𐃌','𐃍'=>'𐃍','𐃎'=>'𐃎','𐃏'=>'𐃏','𐃐'=>'𐃐','𐃑'=>'𐃑','𐃒'=>'𐃒','𐃓'=>'𐃓','𐃔'=>'𐃔','𐃕'=>'𐃕','𐃖'=>'𐃖','𐃗'=>'𐃗','𐃘'=>'𐃘','𐃙'=>'𐃙','𐃚'=>'𐃚','𐃛'=>'𐃛','𐃜'=>'𐃜','𐃝'=>'𐃝','𐃞'=>'𐃞','𐃟'=>'𐃟','𐃠'=>'𐃠','𐃡'=>'𐃡','𐃢'=>'𐃢','𐃣'=>'𐃣','𐃤'=>'𐃤','𐃥'=>'𐃥','𐃦'=>'𐃦','𐃧'=>'𐃧','𐃨'=>'𐃨','𐃩'=>'𐃩','𐃪'=>'𐃪','𐃫'=>'𐃫','𐃬'=>'𐃬','𐃭'=>'𐃭','𐃮'=>'𐃮','𐃯'=>'𐃯','𐃰'=>'𐃰','𐃱'=>'𐃱','𐃲'=>'𐃲','𐃳'=>'𐃳','𐃴'=>'𐃴','𐃵'=>'𐃵','𐃶'=>'𐃶','𐃷'=>'𐃷','𐃸'=>'𐃸','𐃹'=>'𐃹','𐃺'=>'𐃺','𐄇'=>'1','𐄈'=>'2','𐄉'=>'3','𐄊'=>'4','𐄋'=>'5','𐄌'=>'6','𐄍'=>'7','𐄎'=>'8','𐄏'=>'9','𐄐'=>'10','𐄑'=>'20','𐄒'=>'30','𐄓'=>'40','𐄔'=>'50','𐄕'=>'60','𐄖'=>'70','𐄗'=>'80','𐄘'=>'90','𐄙'=>'100','𐄚'=>'200','𐄛'=>'300','𐄜'=>'400','𐄝'=>'500','𐄞'=>'600','𐄟'=>'700','𐄠'=>'800','𐄡'=>'900','𐄢'=>'1000','𐄣'=>'2000','𐄤'=>'3000','𐄥'=>'4000','𐄦'=>'5000','𐄧'=>'6000','𐄨'=>'7000','𐄩'=>'8000','𐄪'=>'9000','𐄫'=>'10000','𐄬'=>'20000','𐄭'=>'30000','𐄮'=>'40000','𐄯'=>'50000','𐄰'=>'60000','𐄱'=>'70000','𐄲'=>'80000','𐄳'=>'90000','𐅀'=>'1/4','𐅁'=>'1/2','𐅂'=>'1','𐅃'=>'5','𐅄'=>'50','𐅅'=>'500','𐅆'=>'5000','𐅇'=>'50000','𐅈'=>'5','𐅉'=>'10','𐅊'=>'50','𐅋'=>'100','𐅌'=>'500','𐅍'=>'1000','𐅎'=>'5000','𐅏'=>'5','𐅐'=>'10','𐅑'=>'50','𐅒'=>'100','𐅓'=>'500','𐅔'=>'1000','𐅕'=>'10000','𐅖'=>'50000','𐅗'=>'10','𐅘'=>'1','𐅙'=>'1','𐅚'=>'1','𐅛'=>'2','𐅜'=>'2','𐅝'=>'2','𐅞'=>'2','𐅟'=>'5','𐅠'=>'10','𐅡'=>'10','𐅢'=>'10','𐅣'=>'10','𐅤'=>'10','𐅥'=>'30','𐅦'=>'50','𐅧'=>'50','𐅨'=>'50','𐅩'=>'50','𐅪'=>'100','𐅫'=>'300','𐅬'=>'500','𐅭'=>'500','𐅮'=>'500','𐅯'=>'500','𐅰'=>'500','𐅱'=>'1000','𐅲'=>'5000','𐅳'=>'5','𐅴'=>'50','𐅵'=>'1/2','𐅶'=>'1/2','𐅷'=>'2/3','𐅸'=>'3/4','𐆊'=>'0','𐌀'=>'𐌀','𐌁'=>'𐌁','𐌂'=>'𐌂','𐌃'=>'𐌃','𐌄'=>'𐌄','𐌅'=>'𐌅','𐌆'=>'𐌆','𐌇'=>'𐌇','𐌈'=>'𐌈','𐌉'=>'𐌉','𐌊'=>'𐌊','𐌋'=>'𐌋','𐌌'=>'𐌌','𐌍'=>'𐌍','𐌎'=>'𐌎','𐌏'=>'𐌏','𐌐'=>'𐌐','𐌑'=>'𐌑','𐌒'=>'𐌒','𐌓'=>'𐌓','𐌔'=>'𐌔','𐌕'=>'𐌕','𐌖'=>'𐌖','𐌗'=>'𐌗','𐌘'=>'𐌘','𐌙'=>'𐌙','𐌚'=>'𐌚','𐌛'=>'𐌛','𐌜'=>'𐌜','𐌝'=>'𐌝','𐌞'=>'𐌞','𐌠'=>'1','𐌡'=>'5','𐌢'=>'10','𐌣'=>'50','𐌰'=>'𐌰','𐌱'=>'𐌱','𐌲'=>'𐌲','𐌳'=>'𐌳','𐌴'=>'𐌴','𐌵'=>'𐌵','𐌶'=>'𐌶','𐌷'=>'𐌷','𐌸'=>'𐌸','𐌹'=>'𐌹','𐌺'=>'𐌺','𐌻'=>'𐌻','𐌼'=>'𐌼','𐌽'=>'𐌽','𐌾'=>'𐌾','𐌿'=>'𐌿','𐍀'=>'𐍀','𐍁'=>'90','𐍂'=>'𐍂','𐍃'=>'𐍃','𐍄'=>'𐍄','𐍅'=>'𐍅','𐍆'=>'𐍆','𐍇'=>'𐍇','𐍈'=>'𐍈','𐍉'=>'𐍉','𐍊'=>'900','𐎀'=>'𐎀','𐎁'=>'𐎁','𐎂'=>'𐎂','𐎃'=>'𐎃','𐎄'=>'𐎄','𐎅'=>'𐎅','𐎆'=>'𐎆','𐎇'=>'𐎇','𐎈'=>'𐎈','𐎉'=>'𐎉','𐎊'=>'𐎊','𐎋'=>'𐎋','𐎌'=>'𐎌','𐎍'=>'𐎍','𐎎'=>'𐎎','𐎏'=>'𐎏','𐎐'=>'𐎐','𐎑'=>'𐎑','𐎒'=>'𐎒','𐎓'=>'𐎓','𐎔'=>'𐎔','𐎕'=>'𐎕','𐎖'=>'𐎖','𐎗'=>'𐎗','𐎘'=>'𐎘','𐎙'=>'𐎙','𐎚'=>'𐎚','𐎛'=>'𐎛','𐎜'=>'𐎜','𐎝'=>'𐎝','𐎠'=>'𐎠','𐎡'=>'𐎡','𐎢'=>'𐎢','𐎣'=>'𐎣','𐎤'=>'𐎤','𐎥'=>'𐎥','𐎦'=>'𐎦','𐎧'=>'𐎧','𐎨'=>'𐎨','𐎩'=>'𐎩','𐎪'=>'𐎪','𐎫'=>'𐎫','𐎬'=>'𐎬','𐎭'=>'𐎭','𐎮'=>'𐎮','𐎯'=>'𐎯','𐎰'=>'𐎰','𐎱'=>'𐎱','𐎲'=>'𐎲','𐎳'=>'𐎳','𐎴'=>'𐎴','𐎵'=>'𐎵','𐎶'=>'𐎶','𐎷'=>'𐎷','𐎸'=>'𐎸','𐎹'=>'𐎹','𐎺'=>'𐎺','𐎻'=>'𐎻','𐎼'=>'𐎼','𐎽'=>'𐎽','𐎾'=>'𐎾','𐎿'=>'𐎿','𐏀'=>'𐏀','𐏁'=>'𐏁','𐏂'=>'𐏂','𐏃'=>'𐏃','𐏈'=>'𐏈','𐏉'=>'𐏉','𐏊'=>'𐏊','𐏋'=>'𐏋','𐏌'=>'𐏌','𐏍'=>'𐏍','𐏎'=>'𐏎','𐏏'=>'𐏏','𐏑'=>'1','𐏒'=>'2','𐏓'=>'10','𐏔'=>'20','𐏕'=>'100','𐐀'=>'𐐨','𐐁'=>'𐐩','𐐂'=>'𐐪','𐐃'=>'𐐫','𐐄'=>'𐐬','𐐅'=>'𐐭','𐐆'=>'𐐮','𐐇'=>'𐐯','𐐈'=>'𐐰','𐐉'=>'𐐱','𐐊'=>'𐐲','𐐋'=>'𐐳','𐐌'=>'𐐴','𐐍'=>'𐐵','𐐎'=>'𐐶','𐐏'=>'𐐷','𐐐'=>'𐐸','𐐑'=>'𐐹','𐐒'=>'𐐺','𐐓'=>'𐐻','𐐔'=>'𐐼','𐐕'=>'𐐽','𐐖'=>'𐐾','𐐗'=>'𐐿','𐐘'=>'𐑀','𐐙'=>'𐑁','𐐚'=>'𐑂','𐐛'=>'𐑃','𐐜'=>'𐑄','𐐝'=>'𐑅','𐐞'=>'𐑆','𐐟'=>'𐑇','𐐠'=>'𐑈','𐐡'=>'𐑉','𐐢'=>'𐑊','𐐣'=>'𐑋','𐐤'=>'𐑌','𐐥'=>'𐑍','𐐦'=>'𐑎','𐐧'=>'𐑏','𐐨'=>'𐐨','𐐩'=>'𐐩','𐐪'=>'𐐪','𐐫'=>'𐐫','𐐬'=>'𐐬','𐐭'=>'𐐭','𐐮'=>'𐐮','𐐯'=>'𐐯','𐐰'=>'𐐰','𐐱'=>'𐐱','𐐲'=>'𐐲','𐐳'=>'𐐳','𐐴'=>'𐐴','𐐵'=>'𐐵','𐐶'=>'𐐶','𐐷'=>'𐐷','𐐸'=>'𐐸','𐐹'=>'𐐹','𐐺'=>'𐐺','𐐻'=>'𐐻','𐐼'=>'𐐼','𐐽'=>'𐐽','𐐾'=>'𐐾','𐐿'=>'𐐿','𐑀'=>'𐑀','𐑁'=>'𐑁','𐑂'=>'𐑂','𐑃'=>'𐑃','𐑄'=>'𐑄','𐑅'=>'𐑅','𐑆'=>'𐑆','𐑇'=>'𐑇','𐑈'=>'𐑈','𐑉'=>'𐑉','𐑊'=>'𐑊','𐑋'=>'𐑋','𐑌'=>'𐑌','𐑍'=>'𐑍','𐑎'=>'𐑎','𐑏'=>'𐑏','𐑐'=>'𐑐','𐑑'=>'𐑑','𐑒'=>'𐑒','𐑓'=>'𐑓','𐑔'=>'𐑔','𐑕'=>'𐑕','𐑖'=>'𐑖','𐑗'=>'𐑗','𐑘'=>'𐑘','𐑙'=>'𐑙','𐑚'=>'𐑚','𐑛'=>'𐑛','𐑜'=>'𐑜','𐑝'=>'𐑝','𐑞'=>'𐑞','𐑟'=>'𐑟','𐑠'=>'𐑠','𐑡'=>'𐑡','𐑢'=>'𐑢','𐑣'=>'𐑣','𐑤'=>'𐑤','𐑥'=>'𐑥','𐑦'=>'𐑦','𐑧'=>'𐑧','𐑨'=>'𐑨','𐑩'=>'𐑩','𐑪'=>'𐑪','𐑫'=>'𐑫','𐑬'=>'𐑬','𐑭'=>'𐑭','𐑮'=>'𐑮','𐑯'=>'𐑯','𐑰'=>'𐑰','𐑱'=>'𐑱','𐑲'=>'𐑲','𐑳'=>'𐑳','𐑴'=>'𐑴','𐑵'=>'𐑵','𐑶'=>'𐑶','𐑷'=>'𐑷','𐑸'=>'𐑸','𐑹'=>'𐑹','𐑺'=>'𐑺','𐑻'=>'𐑻','𐑼'=>'𐑼','𐑽'=>'𐑽','𐑾'=>'𐑾','𐑿'=>'𐑿','𐒀'=>'𐒀','𐒁'=>'𐒁','𐒂'=>'𐒂','𐒃'=>'𐒃','𐒄'=>'𐒄','𐒅'=>'𐒅','𐒆'=>'𐒆','𐒇'=>'𐒇','𐒈'=>'𐒈','𐒉'=>'𐒉','𐒊'=>'𐒊','𐒋'=>'𐒋','𐒌'=>'𐒌','𐒍'=>'𐒍','𐒎'=>'𐒎','𐒏'=>'𐒏','𐒐'=>'𐒐','𐒑'=>'𐒑','𐒒'=>'𐒒','𐒓'=>'𐒓','𐒔'=>'𐒔','𐒕'=>'𐒕','𐒖'=>'𐒖','𐒗'=>'𐒗','𐒘'=>'𐒘','𐒙'=>'𐒙','𐒚'=>'𐒚','𐒛'=>'𐒛','𐒜'=>'𐒜','𐒝'=>'𐒝','𐒠'=>'0','𐒡'=>'1','𐒢'=>'2','𐒣'=>'3','𐒤'=>'4','𐒥'=>'5','𐒦'=>'6','𐒧'=>'7','𐒨'=>'8','𐒩'=>'9'); \ No newline at end of file
+<?php return array('𐀀'=>'𐀀','𐀁'=>'𐀁','𐀂'=>'𐀂','𐀃'=>'𐀃','𐀄'=>'𐀄','𐀅'=>'𐀅','𐀆'=>'𐀆','𐀇'=>'𐀇','𐀈'=>'𐀈','𐀉'=>'𐀉','𐀊'=>'𐀊','𐀋'=>'𐀋','𐀍'=>'𐀍','𐀎'=>'𐀎','𐀏'=>'𐀏','𐀐'=>'𐀐','𐀑'=>'𐀑','𐀒'=>'𐀒','𐀓'=>'𐀓','𐀔'=>'𐀔','𐀕'=>'𐀕','𐀖'=>'𐀖','𐀗'=>'𐀗','𐀘'=>'𐀘','𐀙'=>'𐀙','𐀚'=>'𐀚','𐀛'=>'𐀛','𐀜'=>'𐀜','𐀝'=>'𐀝','𐀞'=>'𐀞','𐀟'=>'𐀟','𐀠'=>'𐀠','𐀡'=>'𐀡','𐀢'=>'𐀢','𐀣'=>'𐀣','𐀤'=>'𐀤','𐀥'=>'𐀥','𐀦'=>'𐀦','𐀨'=>'𐀨','𐀩'=>'𐀩','𐀪'=>'𐀪','𐀫'=>'𐀫','𐀬'=>'𐀬','𐀭'=>'𐀭','𐀮'=>'𐀮','𐀯'=>'𐀯','𐀰'=>'𐀰','𐀱'=>'𐀱','𐀲'=>'𐀲','𐀳'=>'𐀳','𐀴'=>'𐀴','𐀵'=>'𐀵','𐀶'=>'𐀶','𐀷'=>'𐀷','𐀸'=>'𐀸','𐀹'=>'𐀹','𐀺'=>'𐀺','𐀼'=>'𐀼','𐀽'=>'𐀽','𐀿'=>'𐀿','𐁀'=>'𐁀','𐁁'=>'𐁁','𐁂'=>'𐁂','𐁃'=>'𐁃','𐁄'=>'𐁄','𐁅'=>'𐁅','𐁆'=>'𐁆','𐁇'=>'𐁇','𐁈'=>'𐁈','𐁉'=>'𐁉','𐁊'=>'𐁊','𐁋'=>'𐁋','𐁌'=>'𐁌','𐁍'=>'𐁍','𐁐'=>'𐁐','𐁑'=>'𐁑','𐁒'=>'𐁒','𐁓'=>'𐁓','𐁔'=>'𐁔','𐁕'=>'𐁕','𐁖'=>'𐁖','𐁗'=>'𐁗','𐁘'=>'𐁘','𐁙'=>'𐁙','𐁚'=>'𐁚','𐁛'=>'𐁛','𐁜'=>'𐁜','𐁝'=>'𐁝','𐂀'=>'𐂀','𐂁'=>'𐂁','𐂂'=>'𐂂','𐂃'=>'𐂃','𐂄'=>'𐂄','𐂅'=>'𐂅','𐂆'=>'𐂆','𐂇'=>'𐂇','𐂈'=>'𐂈','𐂉'=>'𐂉','𐂊'=>'𐂊','𐂋'=>'𐂋','𐂌'=>'𐂌','𐂍'=>'𐂍','𐂎'=>'𐂎','𐂏'=>'𐂏','𐂐'=>'𐂐','𐂑'=>'𐂑','𐂒'=>'𐂒','𐂓'=>'𐂓','𐂔'=>'𐂔','𐂕'=>'𐂕','𐂖'=>'𐂖','𐂗'=>'𐂗','𐂘'=>'𐂘','𐂙'=>'𐂙','𐂚'=>'𐂚','𐂛'=>'𐂛','𐂜'=>'𐂜','𐂝'=>'𐂝','𐂞'=>'𐂞','𐂟'=>'𐂟','𐂠'=>'𐂠','𐂡'=>'𐂡','𐂢'=>'𐂢','𐂣'=>'𐂣','𐂤'=>'𐂤','𐂥'=>'𐂥','𐂦'=>'𐂦','𐂧'=>'𐂧','𐂨'=>'𐂨','𐂩'=>'𐂩','𐂪'=>'𐂪','𐂫'=>'𐂫','𐂬'=>'𐂬','𐂭'=>'𐂭','𐂮'=>'𐂮','𐂯'=>'𐂯','𐂰'=>'𐂰','𐂱'=>'𐂱','𐂲'=>'𐂲','𐂳'=>'𐂳','𐂴'=>'𐂴','𐂵'=>'𐂵','𐂶'=>'𐂶','𐂷'=>'𐂷','𐂸'=>'𐂸','𐂹'=>'𐂹','𐂺'=>'𐂺','𐂻'=>'𐂻','𐂼'=>'𐂼','𐂽'=>'𐂽','𐂾'=>'𐂾','𐂿'=>'𐂿','𐃀'=>'𐃀','𐃁'=>'𐃁','𐃂'=>'𐃂','𐃃'=>'𐃃','𐃄'=>'𐃄','𐃅'=>'𐃅','𐃆'=>'𐃆','𐃇'=>'𐃇','𐃈'=>'𐃈','𐃉'=>'𐃉','𐃊'=>'𐃊','𐃋'=>'𐃋','𐃌'=>'𐃌','𐃍'=>'𐃍','𐃎'=>'𐃎','𐃏'=>'𐃏','𐃐'=>'𐃐','𐃑'=>'𐃑','𐃒'=>'𐃒','𐃓'=>'𐃓','𐃔'=>'𐃔','𐃕'=>'𐃕','𐃖'=>'𐃖','𐃗'=>'𐃗','𐃘'=>'𐃘','𐃙'=>'𐃙','𐃚'=>'𐃚','𐃛'=>'𐃛','𐃜'=>'𐃜','𐃝'=>'𐃝','𐃞'=>'𐃞','𐃟'=>'𐃟','𐃠'=>'𐃠','𐃡'=>'𐃡','𐃢'=>'𐃢','𐃣'=>'𐃣','𐃤'=>'𐃤','𐃥'=>'𐃥','𐃦'=>'𐃦','𐃧'=>'𐃧','𐃨'=>'𐃨','𐃩'=>'𐃩','𐃪'=>'𐃪','𐃫'=>'𐃫','𐃬'=>'𐃬','𐃭'=>'𐃭','𐃮'=>'𐃮','𐃯'=>'𐃯','𐃰'=>'𐃰','𐃱'=>'𐃱','𐃲'=>'𐃲','𐃳'=>'𐃳','𐃴'=>'𐃴','𐃵'=>'𐃵','𐃶'=>'𐃶','𐃷'=>'𐃷','𐃸'=>'𐃸','𐃹'=>'𐃹','𐃺'=>'𐃺','𐄇'=>'1','𐄈'=>'2','𐄉'=>'3','𐄊'=>'4','𐄋'=>'5','𐄌'=>'6','𐄍'=>'7','𐄎'=>'8','𐄏'=>'9','𐄐'=>'10','𐄑'=>'20','𐄒'=>'30','𐄓'=>'40','𐄔'=>'50','𐄕'=>'60','𐄖'=>'70','𐄗'=>'80','𐄘'=>'90','𐄙'=>'100','𐄚'=>'200','𐄛'=>'300','𐄜'=>'400','𐄝'=>'500','𐄞'=>'600','𐄟'=>'700','𐄠'=>'800','𐄡'=>'900','𐄢'=>'1000','𐄣'=>'2000','𐄤'=>'3000','𐄥'=>'4000','𐄦'=>'5000','𐄧'=>'6000','𐄨'=>'7000','𐄩'=>'8000','𐄪'=>'9000','𐄫'=>'10000','𐄬'=>'20000','𐄭'=>'30000','𐄮'=>'40000','𐄯'=>'50000','𐄰'=>'60000','𐄱'=>'70000','𐄲'=>'80000','𐄳'=>'90000','𐅀'=>'1/4','𐅁'=>'1/2','𐅂'=>'1','𐅃'=>'5','𐅄'=>'50','𐅅'=>'500','𐅆'=>'5000','𐅇'=>'50000','𐅈'=>'5','𐅉'=>'10','𐅊'=>'50','𐅋'=>'100','𐅌'=>'500','𐅍'=>'1000','𐅎'=>'5000','𐅏'=>'5','𐅐'=>'10','𐅑'=>'50','𐅒'=>'100','𐅓'=>'500','𐅔'=>'1000','𐅕'=>'10000','𐅖'=>'50000','𐅗'=>'10','𐅘'=>'1','𐅙'=>'1','𐅚'=>'1','𐅛'=>'2','𐅜'=>'2','𐅝'=>'2','𐅞'=>'2','𐅟'=>'5','𐅠'=>'10','𐅡'=>'10','𐅢'=>'10','𐅣'=>'10','𐅤'=>'10','𐅥'=>'30','𐅦'=>'50','𐅧'=>'50','𐅨'=>'50','𐅩'=>'50','𐅪'=>'100','𐅫'=>'300','𐅬'=>'500','𐅭'=>'500','𐅮'=>'500','𐅯'=>'500','𐅰'=>'500','𐅱'=>'1000','𐅲'=>'5000','𐅳'=>'5','𐅴'=>'50','𐅵'=>'1/2','𐅶'=>'1/2','𐅷'=>'2/3','𐅸'=>'3/4','𐆊'=>'0','𐌀'=>'𐌀','𐌁'=>'𐌁','𐌂'=>'𐌂','𐌃'=>'𐌃','𐌄'=>'𐌄','𐌅'=>'𐌅','𐌆'=>'𐌆','𐌇'=>'𐌇','𐌈'=>'𐌈','𐌉'=>'𐌉','𐌊'=>'𐌊','𐌋'=>'𐌋','𐌌'=>'𐌌','𐌍'=>'𐌍','𐌎'=>'𐌎','𐌏'=>'𐌏','𐌐'=>'𐌐','𐌑'=>'𐌑','𐌒'=>'𐌒','𐌓'=>'𐌓','𐌔'=>'𐌔','𐌕'=>'𐌕','𐌖'=>'𐌖','𐌗'=>'𐌗','𐌘'=>'𐌘','𐌙'=>'𐌙','𐌚'=>'𐌚','𐌛'=>'𐌛','𐌜'=>'𐌜','𐌝'=>'𐌝','𐌞'=>'𐌞','𐌠'=>'1','𐌡'=>'5','𐌢'=>'10','𐌣'=>'50','𐌰'=>'𐌰','𐌱'=>'𐌱','𐌲'=>'𐌲','𐌳'=>'𐌳','𐌴'=>'𐌴','𐌵'=>'𐌵','𐌶'=>'𐌶','𐌷'=>'𐌷','𐌸'=>'𐌸','𐌹'=>'𐌹','𐌺'=>'𐌺','𐌻'=>'𐌻','𐌼'=>'𐌼','𐌽'=>'𐌽','𐌾'=>'𐌾','𐌿'=>'𐌿','𐍀'=>'𐍀','𐍁'=>'90','𐍂'=>'𐍂','𐍃'=>'𐍃','𐍄'=>'𐍄','𐍅'=>'𐍅','𐍆'=>'𐍆','𐍇'=>'𐍇','𐍈'=>'𐍈','𐍉'=>'𐍉','𐍊'=>'900','𐎀'=>'𐎀','𐎁'=>'𐎁','𐎂'=>'𐎂','𐎃'=>'𐎃','𐎄'=>'𐎄','𐎅'=>'𐎅','𐎆'=>'𐎆','𐎇'=>'𐎇','𐎈'=>'𐎈','𐎉'=>'𐎉','𐎊'=>'𐎊','𐎋'=>'𐎋','𐎌'=>'𐎌','𐎍'=>'𐎍','𐎎'=>'𐎎','𐎏'=>'𐎏','𐎐'=>'𐎐','𐎑'=>'𐎑','𐎒'=>'𐎒','𐎓'=>'𐎓','𐎔'=>'𐎔','𐎕'=>'𐎕','𐎖'=>'𐎖','𐎗'=>'𐎗','𐎘'=>'𐎘','𐎙'=>'𐎙','𐎚'=>'𐎚','𐎛'=>'𐎛','𐎜'=>'𐎜','𐎝'=>'𐎝','𐎠'=>'𐎠','𐎡'=>'𐎡','𐎢'=>'𐎢','𐎣'=>'𐎣','𐎤'=>'𐎤','𐎥'=>'𐎥','𐎦'=>'𐎦','𐎧'=>'𐎧','𐎨'=>'𐎨','𐎩'=>'𐎩','𐎪'=>'𐎪','𐎫'=>'𐎫','𐎬'=>'𐎬','𐎭'=>'𐎭','𐎮'=>'𐎮','𐎯'=>'𐎯','𐎰'=>'𐎰','𐎱'=>'𐎱','𐎲'=>'𐎲','𐎳'=>'𐎳','𐎴'=>'𐎴','𐎵'=>'𐎵','𐎶'=>'𐎶','𐎷'=>'𐎷','𐎸'=>'𐎸','𐎹'=>'𐎹','𐎺'=>'𐎺','𐎻'=>'𐎻','𐎼'=>'𐎼','𐎽'=>'𐎽','𐎾'=>'𐎾','𐎿'=>'𐎿','𐏀'=>'𐏀','𐏁'=>'𐏁','𐏂'=>'𐏂','𐏃'=>'𐏃','𐏈'=>'𐏈','𐏉'=>'𐏉','𐏊'=>'𐏊','𐏋'=>'𐏋','𐏌'=>'𐏌','𐏍'=>'𐏍','𐏎'=>'𐏎','𐏏'=>'𐏏','𐏑'=>'1','𐏒'=>'2','𐏓'=>'10','𐏔'=>'20','𐏕'=>'100','𐐀'=>'𐐨','𐐁'=>'𐐩','𐐂'=>'𐐪','𐐃'=>'𐐫','𐐄'=>'𐐬','𐐅'=>'𐐭','𐐆'=>'𐐮','𐐇'=>'𐐯','𐐈'=>'𐐰','𐐉'=>'𐐱','𐐊'=>'𐐲','𐐋'=>'𐐳','𐐌'=>'𐐴','𐐍'=>'𐐵','𐐎'=>'𐐶','𐐏'=>'𐐷','𐐐'=>'𐐸','𐐑'=>'𐐹','𐐒'=>'𐐺','𐐓'=>'𐐻','𐐔'=>'𐐼','𐐕'=>'𐐽','𐐖'=>'𐐾','𐐗'=>'𐐿','𐐘'=>'𐑀','𐐙'=>'𐑁','𐐚'=>'𐑂','𐐛'=>'𐑃','𐐜'=>'𐑄','𐐝'=>'𐑅','𐐞'=>'𐑆','𐐟'=>'𐑇','𐐠'=>'𐑈','𐐡'=>'𐑉','𐐢'=>'𐑊','𐐣'=>'𐑋','𐐤'=>'𐑌','𐐥'=>'𐑍','𐐦'=>'𐑎','𐐧'=>'𐑏','𐐨'=>'𐐨','𐐩'=>'𐐩','𐐪'=>'𐐪','𐐫'=>'𐐫','𐐬'=>'𐐬','𐐭'=>'𐐭','𐐮'=>'𐐮','𐐯'=>'𐐯','𐐰'=>'𐐰','𐐱'=>'𐐱','𐐲'=>'𐐲','𐐳'=>'𐐳','𐐴'=>'𐐴','𐐵'=>'𐐵','𐐶'=>'𐐶','𐐷'=>'𐐷','𐐸'=>'𐐸','𐐹'=>'𐐹','𐐺'=>'𐐺','𐐻'=>'𐐻','𐐼'=>'𐐼','𐐽'=>'𐐽','𐐾'=>'𐐾','𐐿'=>'𐐿','𐑀'=>'𐑀','𐑁'=>'𐑁','𐑂'=>'𐑂','𐑃'=>'𐑃','𐑄'=>'𐑄','𐑅'=>'𐑅','𐑆'=>'𐑆','𐑇'=>'𐑇','𐑈'=>'𐑈','𐑉'=>'𐑉','𐑊'=>'𐑊','𐑋'=>'𐑋','𐑌'=>'𐑌','𐑍'=>'𐑍','𐑎'=>'𐑎','𐑏'=>'𐑏','𐑐'=>'𐑐','𐑑'=>'𐑑','𐑒'=>'𐑒','𐑓'=>'𐑓','𐑔'=>'𐑔','𐑕'=>'𐑕','𐑖'=>'𐑖','𐑗'=>'𐑗','𐑘'=>'𐑘','𐑙'=>'𐑙','𐑚'=>'𐑚','𐑛'=>'𐑛','𐑜'=>'𐑜','𐑝'=>'𐑝','𐑞'=>'𐑞','𐑟'=>'𐑟','𐑠'=>'𐑠','𐑡'=>'𐑡','𐑢'=>'𐑢','𐑣'=>'𐑣','𐑤'=>'𐑤','𐑥'=>'𐑥','𐑦'=>'𐑦','𐑧'=>'𐑧','𐑨'=>'𐑨','𐑩'=>'𐑩','𐑪'=>'𐑪','𐑫'=>'𐑫','𐑬'=>'𐑬','𐑭'=>'𐑭','𐑮'=>'𐑮','𐑯'=>'𐑯','𐑰'=>'𐑰','𐑱'=>'𐑱','𐑲'=>'𐑲','𐑳'=>'𐑳','𐑴'=>'𐑴','𐑵'=>'𐑵','𐑶'=>'𐑶','𐑷'=>'𐑷','𐑸'=>'𐑸','𐑹'=>'𐑹','𐑺'=>'𐑺','𐑻'=>'𐑻','𐑼'=>'𐑼','𐑽'=>'𐑽','𐑾'=>'𐑾','𐑿'=>'𐑿','𐒀'=>'𐒀','𐒁'=>'𐒁','𐒂'=>'𐒂','𐒃'=>'𐒃','𐒄'=>'𐒄','𐒅'=>'𐒅','𐒆'=>'𐒆','𐒇'=>'𐒇','𐒈'=>'𐒈','𐒉'=>'𐒉','𐒊'=>'𐒊','𐒋'=>'𐒋','𐒌'=>'𐒌','𐒍'=>'𐒍','𐒎'=>'𐒎','𐒏'=>'𐒏','𐒐'=>'𐒐','𐒑'=>'𐒑','𐒒'=>'𐒒','𐒓'=>'𐒓','𐒔'=>'𐒔','𐒕'=>'𐒕','𐒖'=>'𐒖','𐒗'=>'𐒗','𐒘'=>'𐒘','𐒙'=>'𐒙','𐒚'=>'𐒚','𐒛'=>'𐒛','𐒜'=>'𐒜','𐒝'=>'𐒝','𐒠'=>'0','𐒡'=>'1','𐒢'=>'2','𐒣'=>'3','𐒤'=>'4','𐒥'=>'5','𐒦'=>'6','𐒧'=>'7','𐒨'=>'8','𐒩'=>'9');
diff --git a/phpBB/includes/utf/data/search_indexer_33.php b/phpBB/includes/utf/data/search_indexer_33.php
index 4e8762a646..3b77ca26f7 100644
--- a/phpBB/includes/utf/data/search_indexer_33.php
+++ b/phpBB/includes/utf/data/search_indexer_33.php
@@ -1 +1 @@
-<?php return array('𐠀'=>'𐠀','𐠁'=>'𐠁','𐠂'=>'𐠂','𐠃'=>'𐠃','𐠄'=>'𐠄','𐠅'=>'𐠅','𐠈'=>'𐠈','𐠊'=>'𐠊','𐠋'=>'𐠋','𐠌'=>'𐠌','𐠍'=>'𐠍','𐠎'=>'𐠎','𐠏'=>'𐠏','𐠐'=>'𐠐','𐠑'=>'𐠑','𐠒'=>'𐠒','𐠓'=>'𐠓','𐠔'=>'𐠔','𐠕'=>'𐠕','𐠖'=>'𐠖','𐠗'=>'𐠗','𐠘'=>'𐠘','𐠙'=>'𐠙','𐠚'=>'𐠚','𐠛'=>'𐠛','𐠜'=>'𐠜','𐠝'=>'𐠝','𐠞'=>'𐠞','𐠟'=>'𐠟','𐠠'=>'𐠠','𐠡'=>'𐠡','𐠢'=>'𐠢','𐠣'=>'𐠣','𐠤'=>'𐠤','𐠥'=>'𐠥','𐠦'=>'𐠦','𐠧'=>'𐠧','𐠨'=>'𐠨','𐠩'=>'𐠩','𐠪'=>'𐠪','𐠫'=>'𐠫','𐠬'=>'𐠬','𐠭'=>'𐠭','𐠮'=>'𐠮','𐠯'=>'𐠯','𐠰'=>'𐠰','𐠱'=>'𐠱','𐠲'=>'𐠲','𐠳'=>'𐠳','𐠴'=>'𐠴','𐠵'=>'𐠵','𐠷'=>'𐠷','𐠸'=>'𐠸','𐠼'=>'𐠼','𐠿'=>'𐠿','𐤀'=>'𐤀','𐤁'=>'𐤁','𐤂'=>'𐤂','𐤃'=>'𐤃','𐤄'=>'𐤄','𐤅'=>'𐤅','𐤆'=>'𐤆','𐤇'=>'𐤇','𐤈'=>'𐤈','𐤉'=>'𐤉','𐤊'=>'𐤊','𐤋'=>'𐤋','𐤌'=>'𐤌','𐤍'=>'𐤍','𐤎'=>'𐤎','𐤏'=>'𐤏','𐤐'=>'𐤐','𐤑'=>'𐤑','𐤒'=>'𐤒','𐤓'=>'𐤓','𐤔'=>'𐤔','𐤕'=>'𐤕','𐤖'=>'1','𐤗'=>'10','𐤘'=>'20','𐤙'=>'100','𐨀'=>'𐨀','𐨁'=>'𐨁','𐨂'=>'𐨂','𐨃'=>'𐨃','𐨅'=>'𐨅','𐨆'=>'𐨆','𐨌'=>'𐨌','𐨍'=>'𐨍','𐨎'=>'𐨎','𐨏'=>'𐨏','𐨐'=>'𐨐','𐨑'=>'𐨑','𐨒'=>'𐨒','𐨓'=>'𐨓','𐨕'=>'𐨕','𐨖'=>'𐨖','𐨗'=>'𐨗','𐨙'=>'𐨙','𐨚'=>'𐨚','𐨛'=>'𐨛','𐨜'=>'𐨜','𐨝'=>'𐨝','𐨞'=>'𐨞','𐨟'=>'𐨟','𐨠'=>'𐨠','𐨡'=>'𐨡','𐨢'=>'𐨢','𐨣'=>'𐨣','𐨤'=>'𐨤','𐨥'=>'𐨥','𐨦'=>'𐨦','𐨧'=>'𐨧','𐨨'=>'𐨨','𐨩'=>'𐨩','𐨪'=>'𐨪','𐨫'=>'𐨫','𐨬'=>'𐨬','𐨭'=>'𐨭','𐨮'=>'𐨮','𐨯'=>'𐨯','𐨰'=>'𐨰','𐨱'=>'𐨱','𐨲'=>'𐨲','𐨳'=>'𐨳','𐨸'=>'𐨸','𐨹'=>'𐨹','𐨺'=>'𐨺','𐨿'=>'𐨿','𐩀'=>'1','𐩁'=>'2','𐩂'=>'3','𐩃'=>'4','𐩄'=>'10','𐩅'=>'20','𐩆'=>'100','𐩇'=>'1000'); \ No newline at end of file
+<?php return array('𐠀'=>'𐠀','𐠁'=>'𐠁','𐠂'=>'𐠂','𐠃'=>'𐠃','𐠄'=>'𐠄','𐠅'=>'𐠅','𐠈'=>'𐠈','𐠊'=>'𐠊','𐠋'=>'𐠋','𐠌'=>'𐠌','𐠍'=>'𐠍','𐠎'=>'𐠎','𐠏'=>'𐠏','𐠐'=>'𐠐','𐠑'=>'𐠑','𐠒'=>'𐠒','𐠓'=>'𐠓','𐠔'=>'𐠔','𐠕'=>'𐠕','𐠖'=>'𐠖','𐠗'=>'𐠗','𐠘'=>'𐠘','𐠙'=>'𐠙','𐠚'=>'𐠚','𐠛'=>'𐠛','𐠜'=>'𐠜','𐠝'=>'𐠝','𐠞'=>'𐠞','𐠟'=>'𐠟','𐠠'=>'𐠠','𐠡'=>'𐠡','𐠢'=>'𐠢','𐠣'=>'𐠣','𐠤'=>'𐠤','𐠥'=>'𐠥','𐠦'=>'𐠦','𐠧'=>'𐠧','𐠨'=>'𐠨','𐠩'=>'𐠩','𐠪'=>'𐠪','𐠫'=>'𐠫','𐠬'=>'𐠬','𐠭'=>'𐠭','𐠮'=>'𐠮','𐠯'=>'𐠯','𐠰'=>'𐠰','𐠱'=>'𐠱','𐠲'=>'𐠲','𐠳'=>'𐠳','𐠴'=>'𐠴','𐠵'=>'𐠵','𐠷'=>'𐠷','𐠸'=>'𐠸','𐠼'=>'𐠼','𐠿'=>'𐠿','𐤀'=>'𐤀','𐤁'=>'𐤁','𐤂'=>'𐤂','𐤃'=>'𐤃','𐤄'=>'𐤄','𐤅'=>'𐤅','𐤆'=>'𐤆','𐤇'=>'𐤇','𐤈'=>'𐤈','𐤉'=>'𐤉','𐤊'=>'𐤊','𐤋'=>'𐤋','𐤌'=>'𐤌','𐤍'=>'𐤍','𐤎'=>'𐤎','𐤏'=>'𐤏','𐤐'=>'𐤐','𐤑'=>'𐤑','𐤒'=>'𐤒','𐤓'=>'𐤓','𐤔'=>'𐤔','𐤕'=>'𐤕','𐤖'=>'1','𐤗'=>'10','𐤘'=>'20','𐤙'=>'100','𐨀'=>'𐨀','𐨁'=>'𐨁','𐨂'=>'𐨂','𐨃'=>'𐨃','𐨅'=>'𐨅','𐨆'=>'𐨆','𐨌'=>'𐨌','𐨍'=>'𐨍','𐨎'=>'𐨎','𐨏'=>'𐨏','𐨐'=>'𐨐','𐨑'=>'𐨑','𐨒'=>'𐨒','𐨓'=>'𐨓','𐨕'=>'𐨕','𐨖'=>'𐨖','𐨗'=>'𐨗','𐨙'=>'𐨙','𐨚'=>'𐨚','𐨛'=>'𐨛','𐨜'=>'𐨜','𐨝'=>'𐨝','𐨞'=>'𐨞','𐨟'=>'𐨟','𐨠'=>'𐨠','𐨡'=>'𐨡','𐨢'=>'𐨢','𐨣'=>'𐨣','𐨤'=>'𐨤','𐨥'=>'𐨥','𐨦'=>'𐨦','𐨧'=>'𐨧','𐨨'=>'𐨨','𐨩'=>'𐨩','𐨪'=>'𐨪','𐨫'=>'𐨫','𐨬'=>'𐨬','𐨭'=>'𐨭','𐨮'=>'𐨮','𐨯'=>'𐨯','𐨰'=>'𐨰','𐨱'=>'𐨱','𐨲'=>'𐨲','𐨳'=>'𐨳','𐨸'=>'𐨸','𐨹'=>'𐨹','𐨺'=>'𐨺','𐨿'=>'𐨿','𐩀'=>'1','𐩁'=>'2','𐩂'=>'3','𐩃'=>'4','𐩄'=>'10','𐩅'=>'20','𐩆'=>'100','𐩇'=>'1000');
diff --git a/phpBB/includes/utf/data/search_indexer_36.php b/phpBB/includes/utf/data/search_indexer_36.php
index 8bf908e514..a970fa295b 100644
--- a/phpBB/includes/utf/data/search_indexer_36.php
+++ b/phpBB/includes/utf/data/search_indexer_36.php
@@ -1 +1 @@
-<?php return array('𒀀'=>'𒀀','𒀁'=>'𒀁','𒀂'=>'𒀂','𒀃'=>'𒀃','𒀄'=>'𒀄','𒀅'=>'𒀅','𒀆'=>'𒀆','𒀇'=>'𒀇','𒀈'=>'𒀈','𒀉'=>'𒀉','𒀊'=>'𒀊','𒀋'=>'𒀋','𒀌'=>'𒀌','𒀍'=>'𒀍','𒀎'=>'𒀎','𒀏'=>'𒀏','𒀐'=>'𒀐','𒀑'=>'𒀑','𒀒'=>'𒀒','𒀓'=>'𒀓','𒀔'=>'𒀔','𒀕'=>'𒀕','𒀖'=>'𒀖','𒀗'=>'𒀗','𒀘'=>'𒀘','𒀙'=>'𒀙','𒀚'=>'𒀚','𒀛'=>'𒀛','𒀜'=>'𒀜','𒀝'=>'𒀝','𒀞'=>'𒀞','𒀟'=>'𒀟','𒀠'=>'𒀠','𒀡'=>'𒀡','𒀢'=>'𒀢','𒀣'=>'𒀣','𒀤'=>'𒀤','𒀥'=>'𒀥','𒀦'=>'𒀦','𒀧'=>'𒀧','𒀨'=>'𒀨','𒀩'=>'𒀩','𒀪'=>'𒀪','𒀫'=>'𒀫','𒀬'=>'𒀬','𒀭'=>'𒀭','𒀮'=>'𒀮','𒀯'=>'𒀯','𒀰'=>'𒀰','𒀱'=>'𒀱','𒀲'=>'𒀲','𒀳'=>'𒀳','𒀴'=>'𒀴','𒀵'=>'𒀵','𒀶'=>'𒀶','𒀷'=>'𒀷','𒀸'=>'𒀸','𒀹'=>'𒀹','𒀺'=>'𒀺','𒀻'=>'𒀻','𒀼'=>'𒀼','𒀽'=>'𒀽','𒀾'=>'𒀾','𒀿'=>'𒀿','𒁀'=>'𒁀','𒁁'=>'𒁁','𒁂'=>'𒁂','𒁃'=>'𒁃','𒁄'=>'𒁄','𒁅'=>'𒁅','𒁆'=>'𒁆','𒁇'=>'𒁇','𒁈'=>'𒁈','𒁉'=>'𒁉','𒁊'=>'𒁊','𒁋'=>'𒁋','𒁌'=>'𒁌','𒁍'=>'𒁍','𒁎'=>'𒁎','𒁏'=>'𒁏','𒁐'=>'𒁐','𒁑'=>'𒁑','𒁒'=>'𒁒','𒁓'=>'𒁓','𒁔'=>'𒁔','𒁕'=>'𒁕','𒁖'=>'𒁖','𒁗'=>'𒁗','𒁘'=>'𒁘','𒁙'=>'𒁙','𒁚'=>'𒁚','𒁛'=>'𒁛','𒁜'=>'𒁜','𒁝'=>'𒁝','𒁞'=>'𒁞','𒁟'=>'𒁟','𒁠'=>'𒁠','𒁡'=>'𒁡','𒁢'=>'𒁢','𒁣'=>'𒁣','𒁤'=>'𒁤','𒁥'=>'𒁥','𒁦'=>'𒁦','𒁧'=>'𒁧','𒁨'=>'𒁨','𒁩'=>'𒁩','𒁪'=>'𒁪','𒁫'=>'𒁫','𒁬'=>'𒁬','𒁭'=>'𒁭','𒁮'=>'𒁮','𒁯'=>'𒁯','𒁰'=>'𒁰','𒁱'=>'𒁱','𒁲'=>'𒁲','𒁳'=>'𒁳','𒁴'=>'𒁴','𒁵'=>'𒁵','𒁶'=>'𒁶','𒁷'=>'𒁷','𒁸'=>'𒁸','𒁹'=>'𒁹','𒁺'=>'𒁺','𒁻'=>'𒁻','𒁼'=>'𒁼','𒁽'=>'𒁽','𒁾'=>'𒁾','𒁿'=>'𒁿','𒂀'=>'𒂀','𒂁'=>'𒂁','𒂂'=>'𒂂','𒂃'=>'𒂃','𒂄'=>'𒂄','𒂅'=>'𒂅','𒂆'=>'𒂆','𒂇'=>'𒂇','𒂈'=>'𒂈','𒂉'=>'𒂉','𒂊'=>'𒂊','𒂋'=>'𒂋','𒂌'=>'𒂌','𒂍'=>'𒂍','𒂎'=>'𒂎','𒂏'=>'𒂏','𒂐'=>'𒂐','𒂑'=>'𒂑','𒂒'=>'𒂒','𒂓'=>'𒂓','𒂔'=>'𒂔','𒂕'=>'𒂕','𒂖'=>'𒂖','𒂗'=>'𒂗','𒂘'=>'𒂘','𒂙'=>'𒂙','𒂚'=>'𒂚','𒂛'=>'𒂛','𒂜'=>'𒂜','𒂝'=>'𒂝','𒂞'=>'𒂞','𒂟'=>'𒂟','𒂠'=>'𒂠','𒂡'=>'𒂡','𒂢'=>'𒂢','𒂣'=>'𒂣','𒂤'=>'𒂤','𒂥'=>'𒂥','𒂦'=>'𒂦','𒂧'=>'𒂧','𒂨'=>'𒂨','𒂩'=>'𒂩','𒂪'=>'𒂪','𒂫'=>'𒂫','𒂬'=>'𒂬','𒂭'=>'𒂭','𒂮'=>'𒂮','𒂯'=>'𒂯','𒂰'=>'𒂰','𒂱'=>'𒂱','𒂲'=>'𒂲','𒂳'=>'𒂳','𒂴'=>'𒂴','𒂵'=>'𒂵','𒂶'=>'𒂶','𒂷'=>'𒂷','𒂸'=>'𒂸','𒂹'=>'𒂹','𒂺'=>'𒂺','𒂻'=>'𒂻','𒂼'=>'𒂼','𒂽'=>'𒂽','𒂾'=>'𒂾','𒂿'=>'𒂿','𒃀'=>'𒃀','𒃁'=>'𒃁','𒃂'=>'𒃂','𒃃'=>'𒃃','𒃄'=>'𒃄','𒃅'=>'𒃅','𒃆'=>'𒃆','𒃇'=>'𒃇','𒃈'=>'𒃈','𒃉'=>'𒃉','𒃊'=>'𒃊','𒃋'=>'𒃋','𒃌'=>'𒃌','𒃍'=>'𒃍','𒃎'=>'𒃎','𒃏'=>'𒃏','𒃐'=>'𒃐','𒃑'=>'𒃑','𒃒'=>'𒃒','𒃓'=>'𒃓','𒃔'=>'𒃔','𒃕'=>'𒃕','𒃖'=>'𒃖','𒃗'=>'𒃗','𒃘'=>'𒃘','𒃙'=>'𒃙','𒃚'=>'𒃚','𒃛'=>'𒃛','𒃜'=>'𒃜','𒃝'=>'𒃝','𒃞'=>'𒃞','𒃟'=>'𒃟','𒃠'=>'𒃠','𒃡'=>'𒃡','𒃢'=>'𒃢','𒃣'=>'𒃣','𒃤'=>'𒃤','𒃥'=>'𒃥','𒃦'=>'𒃦','𒃧'=>'𒃧','𒃨'=>'𒃨','𒃩'=>'𒃩','𒃪'=>'𒃪','𒃫'=>'𒃫','𒃬'=>'𒃬','𒃭'=>'𒃭','𒃮'=>'𒃮','𒃯'=>'𒃯','𒃰'=>'𒃰','𒃱'=>'𒃱','𒃲'=>'𒃲','𒃳'=>'𒃳','𒃴'=>'𒃴','𒃵'=>'𒃵','𒃶'=>'𒃶','𒃷'=>'𒃷','𒃸'=>'𒃸','𒃹'=>'𒃹','𒃺'=>'𒃺','𒃻'=>'𒃻','𒃼'=>'𒃼','𒃽'=>'𒃽','𒃾'=>'𒃾','𒃿'=>'𒃿','𒄀'=>'𒄀','𒄁'=>'𒄁','𒄂'=>'𒄂','𒄃'=>'𒄃','𒄄'=>'𒄄','𒄅'=>'𒄅','𒄆'=>'𒄆','𒄇'=>'𒄇','𒄈'=>'𒄈','𒄉'=>'𒄉','𒄊'=>'𒄊','𒄋'=>'𒄋','𒄌'=>'𒄌','𒄍'=>'𒄍','𒄎'=>'𒄎','𒄏'=>'𒄏','𒄐'=>'𒄐','𒄑'=>'𒄑','𒄒'=>'𒄒','𒄓'=>'𒄓','𒄔'=>'𒄔','𒄕'=>'𒄕','𒄖'=>'𒄖','𒄗'=>'𒄗','𒄘'=>'𒄘','𒄙'=>'𒄙','𒄚'=>'𒄚','𒄛'=>'𒄛','𒄜'=>'𒄜','𒄝'=>'𒄝','𒄞'=>'𒄞','𒄟'=>'𒄟','𒄠'=>'𒄠','𒄡'=>'𒄡','𒄢'=>'𒄢','𒄣'=>'𒄣','𒄤'=>'𒄤','𒄥'=>'𒄥','𒄦'=>'𒄦','𒄧'=>'𒄧','𒄨'=>'𒄨','𒄩'=>'𒄩','𒄪'=>'𒄪','𒄫'=>'𒄫','𒄬'=>'𒄬','𒄭'=>'𒄭','𒄮'=>'𒄮','𒄯'=>'𒄯','𒄰'=>'𒄰','𒄱'=>'𒄱','𒄲'=>'𒄲','𒄳'=>'𒄳','𒄴'=>'𒄴','𒄵'=>'𒄵','𒄶'=>'𒄶','𒄷'=>'𒄷','𒄸'=>'𒄸','𒄹'=>'𒄹','𒄺'=>'𒄺','𒄻'=>'𒄻','𒄼'=>'𒄼','𒄽'=>'𒄽','𒄾'=>'𒄾','𒄿'=>'𒄿','𒅀'=>'𒅀','𒅁'=>'𒅁','𒅂'=>'𒅂','𒅃'=>'𒅃','𒅄'=>'𒅄','𒅅'=>'𒅅','𒅆'=>'𒅆','𒅇'=>'𒅇','𒅈'=>'𒅈','𒅉'=>'𒅉','𒅊'=>'𒅊','𒅋'=>'𒅋','𒅌'=>'𒅌','𒅍'=>'𒅍','𒅎'=>'𒅎','𒅏'=>'𒅏','𒅐'=>'𒅐','𒅑'=>'𒅑','𒅒'=>'𒅒','𒅓'=>'𒅓','𒅔'=>'𒅔','𒅕'=>'𒅕','𒅖'=>'𒅖','𒅗'=>'𒅗','𒅘'=>'𒅘','𒅙'=>'𒅙','𒅚'=>'𒅚','𒅛'=>'𒅛','𒅜'=>'𒅜','𒅝'=>'𒅝','𒅞'=>'𒅞','𒅟'=>'𒅟','𒅠'=>'𒅠','𒅡'=>'𒅡','𒅢'=>'𒅢','𒅣'=>'𒅣','𒅤'=>'𒅤','𒅥'=>'𒅥','𒅦'=>'𒅦','𒅧'=>'𒅧','𒅨'=>'𒅨','𒅩'=>'𒅩','𒅪'=>'𒅪','𒅫'=>'𒅫','𒅬'=>'𒅬','𒅭'=>'𒅭','𒅮'=>'𒅮','𒅯'=>'𒅯','𒅰'=>'𒅰','𒅱'=>'𒅱','𒅲'=>'𒅲','𒅳'=>'𒅳','𒅴'=>'𒅴','𒅵'=>'𒅵','𒅶'=>'𒅶','𒅷'=>'𒅷','𒅸'=>'𒅸','𒅹'=>'𒅹','𒅺'=>'𒅺','𒅻'=>'𒅻','𒅼'=>'𒅼','𒅽'=>'𒅽','𒅾'=>'𒅾','𒅿'=>'𒅿','𒆀'=>'𒆀','𒆁'=>'𒆁','𒆂'=>'𒆂','𒆃'=>'𒆃','𒆄'=>'𒆄','𒆅'=>'𒆅','𒆆'=>'𒆆','𒆇'=>'𒆇','𒆈'=>'𒆈','𒆉'=>'𒆉','𒆊'=>'𒆊','𒆋'=>'𒆋','𒆌'=>'𒆌','𒆍'=>'𒆍','𒆎'=>'𒆎','𒆏'=>'𒆏','𒆐'=>'𒆐','𒆑'=>'𒆑','𒆒'=>'𒆒','𒆓'=>'𒆓','𒆔'=>'𒆔','𒆕'=>'𒆕','𒆖'=>'𒆖','𒆗'=>'𒆗','𒆘'=>'𒆘','𒆙'=>'𒆙','𒆚'=>'𒆚','𒆛'=>'𒆛','𒆜'=>'𒆜','𒆝'=>'𒆝','𒆞'=>'𒆞','𒆟'=>'𒆟','𒆠'=>'𒆠','𒆡'=>'𒆡','𒆢'=>'𒆢','𒆣'=>'𒆣','𒆤'=>'𒆤','𒆥'=>'𒆥','𒆦'=>'𒆦','𒆧'=>'𒆧','𒆨'=>'𒆨','𒆩'=>'𒆩','𒆪'=>'𒆪','𒆫'=>'𒆫','𒆬'=>'𒆬','𒆭'=>'𒆭','𒆮'=>'𒆮','𒆯'=>'𒆯','𒆰'=>'𒆰','𒆱'=>'𒆱','𒆲'=>'𒆲','𒆳'=>'𒆳','𒆴'=>'𒆴','𒆵'=>'𒆵','𒆶'=>'𒆶','𒆷'=>'𒆷','𒆸'=>'𒆸','𒆹'=>'𒆹','𒆺'=>'𒆺','𒆻'=>'𒆻','𒆼'=>'𒆼','𒆽'=>'𒆽','𒆾'=>'𒆾','𒆿'=>'𒆿','𒇀'=>'𒇀','𒇁'=>'𒇁','𒇂'=>'𒇂','𒇃'=>'𒇃','𒇄'=>'𒇄','𒇅'=>'𒇅','𒇆'=>'𒇆','𒇇'=>'𒇇','𒇈'=>'𒇈','𒇉'=>'𒇉','𒇊'=>'𒇊','𒇋'=>'𒇋','𒇌'=>'𒇌','𒇍'=>'𒇍','𒇎'=>'𒇎','𒇏'=>'𒇏','𒇐'=>'𒇐','𒇑'=>'𒇑','𒇒'=>'𒇒','𒇓'=>'𒇓','𒇔'=>'𒇔','𒇕'=>'𒇕','𒇖'=>'𒇖','𒇗'=>'𒇗','𒇘'=>'𒇘','𒇙'=>'𒇙','𒇚'=>'𒇚','𒇛'=>'𒇛','𒇜'=>'𒇜','𒇝'=>'𒇝','𒇞'=>'𒇞','𒇟'=>'𒇟','𒇠'=>'𒇠','𒇡'=>'𒇡','𒇢'=>'𒇢','𒇣'=>'𒇣','𒇤'=>'𒇤','𒇥'=>'𒇥','𒇦'=>'𒇦','𒇧'=>'𒇧','𒇨'=>'𒇨','𒇩'=>'𒇩','𒇪'=>'𒇪','𒇫'=>'𒇫','𒇬'=>'𒇬','𒇭'=>'𒇭','𒇮'=>'𒇮','𒇯'=>'𒇯','𒇰'=>'𒇰','𒇱'=>'𒇱','𒇲'=>'𒇲','𒇳'=>'𒇳','𒇴'=>'𒇴','𒇵'=>'𒇵','𒇶'=>'𒇶','𒇷'=>'𒇷','𒇸'=>'𒇸','𒇹'=>'𒇹','𒇺'=>'𒇺','𒇻'=>'𒇻','𒇼'=>'𒇼','𒇽'=>'𒇽','𒇾'=>'𒇾','𒇿'=>'𒇿','𒈀'=>'𒈀','𒈁'=>'𒈁','𒈂'=>'𒈂','𒈃'=>'𒈃','𒈄'=>'𒈄','𒈅'=>'𒈅','𒈆'=>'𒈆','𒈇'=>'𒈇','𒈈'=>'𒈈','𒈉'=>'𒈉','𒈊'=>'𒈊','𒈋'=>'𒈋','𒈌'=>'𒈌','𒈍'=>'𒈍','𒈎'=>'𒈎','𒈏'=>'𒈏','𒈐'=>'𒈐','𒈑'=>'𒈑','𒈒'=>'𒈒','𒈓'=>'𒈓','𒈔'=>'𒈔','𒈕'=>'𒈕','𒈖'=>'𒈖','𒈗'=>'𒈗','𒈘'=>'𒈘','𒈙'=>'𒈙','𒈚'=>'𒈚','𒈛'=>'𒈛','𒈜'=>'𒈜','𒈝'=>'𒈝','𒈞'=>'𒈞','𒈟'=>'𒈟','𒈠'=>'𒈠','𒈡'=>'𒈡','𒈢'=>'𒈢','𒈣'=>'𒈣','𒈤'=>'𒈤','𒈥'=>'𒈥','𒈦'=>'𒈦','𒈧'=>'𒈧','𒈨'=>'𒈨','𒈩'=>'𒈩','𒈪'=>'𒈪','𒈫'=>'𒈫','𒈬'=>'𒈬','𒈭'=>'𒈭','𒈮'=>'𒈮','𒈯'=>'𒈯','𒈰'=>'𒈰','𒈱'=>'𒈱','𒈲'=>'𒈲','𒈳'=>'𒈳','𒈴'=>'𒈴','𒈵'=>'𒈵','𒈶'=>'𒈶','𒈷'=>'𒈷','𒈸'=>'𒈸','𒈹'=>'𒈹','𒈺'=>'𒈺','𒈻'=>'𒈻','𒈼'=>'𒈼','𒈽'=>'𒈽','𒈾'=>'𒈾','𒈿'=>'𒈿','𒉀'=>'𒉀','𒉁'=>'𒉁','𒉂'=>'𒉂','𒉃'=>'𒉃','𒉄'=>'𒉄','𒉅'=>'𒉅','𒉆'=>'𒉆','𒉇'=>'𒉇','𒉈'=>'𒉈','𒉉'=>'𒉉','𒉊'=>'𒉊','𒉋'=>'𒉋','𒉌'=>'𒉌','𒉍'=>'𒉍','𒉎'=>'𒉎','𒉏'=>'𒉏','𒉐'=>'𒉐','𒉑'=>'𒉑','𒉒'=>'𒉒','𒉓'=>'𒉓','𒉔'=>'𒉔','𒉕'=>'𒉕','𒉖'=>'𒉖','𒉗'=>'𒉗','𒉘'=>'𒉘','𒉙'=>'𒉙','𒉚'=>'𒉚','𒉛'=>'𒉛','𒉜'=>'𒉜','𒉝'=>'𒉝','𒉞'=>'𒉞','𒉟'=>'𒉟','𒉠'=>'𒉠','𒉡'=>'𒉡','𒉢'=>'𒉢','𒉣'=>'𒉣','𒉤'=>'𒉤','𒉥'=>'𒉥','𒉦'=>'𒉦','𒉧'=>'𒉧','𒉨'=>'𒉨','𒉩'=>'𒉩','𒉪'=>'𒉪','𒉫'=>'𒉫','𒉬'=>'𒉬','𒉭'=>'𒉭','𒉮'=>'𒉮','𒉯'=>'𒉯','𒉰'=>'𒉰','𒉱'=>'𒉱','𒉲'=>'𒉲','𒉳'=>'𒉳','𒉴'=>'𒉴','𒉵'=>'𒉵','𒉶'=>'𒉶','𒉷'=>'𒉷','𒉸'=>'𒉸','𒉹'=>'𒉹','𒉺'=>'𒉺','𒉻'=>'𒉻','𒉼'=>'𒉼','𒉽'=>'𒉽','𒉾'=>'𒉾','𒉿'=>'𒉿','𒊀'=>'𒊀','𒊁'=>'𒊁','𒊂'=>'𒊂','𒊃'=>'𒊃','𒊄'=>'𒊄','𒊅'=>'𒊅','𒊆'=>'𒊆','𒊇'=>'𒊇','𒊈'=>'𒊈','𒊉'=>'𒊉','𒊊'=>'𒊊','𒊋'=>'𒊋','𒊌'=>'𒊌','𒊍'=>'𒊍','𒊎'=>'𒊎','𒊏'=>'𒊏','𒊐'=>'𒊐','𒊑'=>'𒊑','𒊒'=>'𒊒','𒊓'=>'𒊓','𒊔'=>'𒊔','𒊕'=>'𒊕','𒊖'=>'𒊖','𒊗'=>'𒊗','𒊘'=>'𒊘','𒊙'=>'𒊙','𒊚'=>'𒊚','𒊛'=>'𒊛','𒊜'=>'𒊜','𒊝'=>'𒊝','𒊞'=>'𒊞','𒊟'=>'𒊟','𒊠'=>'𒊠','𒊡'=>'𒊡','𒊢'=>'𒊢','𒊣'=>'𒊣','𒊤'=>'𒊤','𒊥'=>'𒊥','𒊦'=>'𒊦','𒊧'=>'𒊧','𒊨'=>'𒊨','𒊩'=>'𒊩','𒊪'=>'𒊪','𒊫'=>'𒊫','𒊬'=>'𒊬','𒊭'=>'𒊭','𒊮'=>'𒊮','𒊯'=>'𒊯','𒊰'=>'𒊰','𒊱'=>'𒊱','𒊲'=>'𒊲','𒊳'=>'𒊳','𒊴'=>'𒊴','𒊵'=>'𒊵','𒊶'=>'𒊶','𒊷'=>'𒊷','𒊸'=>'𒊸','𒊹'=>'𒊹','𒊺'=>'𒊺','𒊻'=>'𒊻','𒊼'=>'𒊼','𒊽'=>'𒊽','𒊾'=>'𒊾','𒊿'=>'𒊿','𒋀'=>'𒋀','𒋁'=>'𒋁','𒋂'=>'𒋂','𒋃'=>'𒋃','𒋄'=>'𒋄','𒋅'=>'𒋅','𒋆'=>'𒋆','𒋇'=>'𒋇','𒋈'=>'𒋈','𒋉'=>'𒋉','𒋊'=>'𒋊','𒋋'=>'𒋋','𒋌'=>'𒋌','𒋍'=>'𒋍','𒋎'=>'𒋎','𒋏'=>'𒋏','𒋐'=>'𒋐','𒋑'=>'𒋑','𒋒'=>'𒋒','𒋓'=>'𒋓','𒋔'=>'𒋔','𒋕'=>'𒋕','𒋖'=>'𒋖','𒋗'=>'𒋗','𒋘'=>'𒋘','𒋙'=>'𒋙','𒋚'=>'𒋚','𒋛'=>'𒋛','𒋜'=>'𒋜','𒋝'=>'𒋝','𒋞'=>'𒋞','𒋟'=>'𒋟','𒋠'=>'𒋠','𒋡'=>'𒋡','𒋢'=>'𒋢','𒋣'=>'𒋣','𒋤'=>'𒋤','𒋥'=>'𒋥','𒋦'=>'𒋦','𒋧'=>'𒋧','𒋨'=>'𒋨','𒋩'=>'𒋩','𒋪'=>'𒋪','𒋫'=>'𒋫','𒋬'=>'𒋬','𒋭'=>'𒋭','𒋮'=>'𒋮','𒋯'=>'𒋯','𒋰'=>'𒋰','𒋱'=>'𒋱','𒋲'=>'𒋲','𒋳'=>'𒋳','𒋴'=>'𒋴','𒋵'=>'𒋵','𒋶'=>'𒋶','𒋷'=>'𒋷','𒋸'=>'𒋸','𒋹'=>'𒋹','𒋺'=>'𒋺','𒋻'=>'𒋻','𒋼'=>'𒋼','𒋽'=>'𒋽','𒋾'=>'𒋾','𒋿'=>'𒋿','𒌀'=>'𒌀','𒌁'=>'𒌁','𒌂'=>'𒌂','𒌃'=>'𒌃','𒌄'=>'𒌄','𒌅'=>'𒌅','𒌆'=>'𒌆','𒌇'=>'𒌇','𒌈'=>'𒌈','𒌉'=>'𒌉','𒌊'=>'𒌊','𒌋'=>'𒌋','𒌌'=>'𒌌','𒌍'=>'𒌍','𒌎'=>'𒌎','𒌏'=>'𒌏','𒌐'=>'𒌐','𒌑'=>'𒌑','𒌒'=>'𒌒','𒌓'=>'𒌓','𒌔'=>'𒌔','𒌕'=>'𒌕','𒌖'=>'𒌖','𒌗'=>'𒌗','𒌘'=>'𒌘','𒌙'=>'𒌙','𒌚'=>'𒌚','𒌛'=>'𒌛','𒌜'=>'𒌜','𒌝'=>'𒌝','𒌞'=>'𒌞','𒌟'=>'𒌟','𒌠'=>'𒌠','𒌡'=>'𒌡','𒌢'=>'𒌢','𒌣'=>'𒌣','𒌤'=>'𒌤','𒌥'=>'𒌥','𒌦'=>'𒌦','𒌧'=>'𒌧','𒌨'=>'𒌨','𒌩'=>'𒌩','𒌪'=>'𒌪','𒌫'=>'𒌫','𒌬'=>'𒌬','𒌭'=>'𒌭','𒌮'=>'𒌮','𒌯'=>'𒌯','𒌰'=>'𒌰','𒌱'=>'𒌱','𒌲'=>'𒌲','𒌳'=>'𒌳','𒌴'=>'𒌴','𒌵'=>'𒌵','𒌶'=>'𒌶','𒌷'=>'𒌷','𒌸'=>'𒌸','𒌹'=>'𒌹','𒌺'=>'𒌺','𒌻'=>'𒌻','𒌼'=>'𒌼','𒌽'=>'𒌽','𒌾'=>'𒌾','𒌿'=>'𒌿','𒍀'=>'𒍀','𒍁'=>'𒍁','𒍂'=>'𒍂','𒍃'=>'𒍃','𒍄'=>'𒍄','𒍅'=>'𒍅','𒍆'=>'𒍆','𒍇'=>'𒍇','𒍈'=>'𒍈','𒍉'=>'𒍉','𒍊'=>'𒍊','𒍋'=>'𒍋','𒍌'=>'𒍌','𒍍'=>'𒍍','𒍎'=>'𒍎','𒍏'=>'𒍏','𒍐'=>'𒍐','𒍑'=>'𒍑','𒍒'=>'𒍒','𒍓'=>'𒍓','𒍔'=>'𒍔','𒍕'=>'𒍕','𒍖'=>'𒍖','𒍗'=>'𒍗','𒍘'=>'𒍘','𒍙'=>'𒍙','𒍚'=>'𒍚','𒍛'=>'𒍛','𒍜'=>'𒍜','𒍝'=>'𒍝','𒍞'=>'𒍞','𒍟'=>'𒍟','𒍠'=>'𒍠','𒍡'=>'𒍡','𒍢'=>'𒍢','𒍣'=>'𒍣','𒍤'=>'𒍤','𒍥'=>'𒍥','𒍦'=>'𒍦','𒍧'=>'𒍧','𒍨'=>'𒍨','𒍩'=>'𒍩','𒍪'=>'𒍪','𒍫'=>'𒍫','𒍬'=>'𒍬','𒍭'=>'𒍭','𒍮'=>'𒍮','𒐀'=>'2','𒐁'=>'3','𒐂'=>'4','𒐃'=>'5','𒐄'=>'6','𒐅'=>'7','𒐆'=>'8','𒐇'=>'9','𒐈'=>'3','𒐉'=>'4','𒐊'=>'5','𒐋'=>'6','𒐌'=>'7','𒐍'=>'8','𒐎'=>'9','𒐏'=>'4','𒐐'=>'5','𒐑'=>'6','𒐒'=>'7','𒐓'=>'8','𒐔'=>'9','𒐕'=>'1','𒐖'=>'2','𒐗'=>'3','𒐘'=>'4','𒐙'=>'5','𒐚'=>'6','𒐛'=>'7','𒐜'=>'8','𒐝'=>'9','𒐞'=>'1','𒐟'=>'2','𒐠'=>'3','𒐡'=>'4','𒐢'=>'5','𒐣'=>'2','𒐤'=>'3','𒐥'=>'3','𒐦'=>'4','𒐧'=>'5','𒐨'=>'6','𒐩'=>'7','𒐪'=>'8','𒐫'=>'9','𒐬'=>'1','𒐭'=>'2','𒐮'=>'3','𒐯'=>'3','𒐰'=>'4','𒐱'=>'5','𒐲'=>'𒐲','𒐳'=>'𒐳','𒐴'=>'1','𒐵'=>'2','𒐶'=>'3','𒐷'=>'3','𒐸'=>'4','𒐹'=>'5','𒐺'=>'3','𒐻'=>'3','𒐼'=>'4','𒐽'=>'4','𒐾'=>'4','𒐿'=>'4','𒑀'=>'6','𒑁'=>'7','𒑂'=>'7','𒑃'=>'7','𒑄'=>'8','𒑅'=>'8','𒑆'=>'9','𒑇'=>'9','𒑈'=>'9','𒑉'=>'9','𒑊'=>'2','𒑋'=>'3','𒑌'=>'4','𒑍'=>'5','𒑎'=>'6','𒑏'=>'1','𒑐'=>'2','𒑑'=>'3','𒑒'=>'4','𒑓'=>'4','𒑔'=>'5','𒑕'=>'5','𒑖'=>'𒑖','𒑗'=>'𒑗','𒑘'=>'1','𒑙'=>'2','𒑚'=>'1/3','𒑛'=>'2/3','𒑜'=>'5/6','𒑝'=>'1/3','𒑞'=>'2/3','𒑟'=>'1/8','𒑠'=>'1/4','𒑡'=>'1/6','𒑢'=>'1/4'); \ No newline at end of file
+<?php return array('𒀀'=>'𒀀','𒀁'=>'𒀁','𒀂'=>'𒀂','𒀃'=>'𒀃','𒀄'=>'𒀄','𒀅'=>'𒀅','𒀆'=>'𒀆','𒀇'=>'𒀇','𒀈'=>'𒀈','𒀉'=>'𒀉','𒀊'=>'𒀊','𒀋'=>'𒀋','𒀌'=>'𒀌','𒀍'=>'𒀍','𒀎'=>'𒀎','𒀏'=>'𒀏','𒀐'=>'𒀐','𒀑'=>'𒀑','𒀒'=>'𒀒','𒀓'=>'𒀓','𒀔'=>'𒀔','𒀕'=>'𒀕','𒀖'=>'𒀖','𒀗'=>'𒀗','𒀘'=>'𒀘','𒀙'=>'𒀙','𒀚'=>'𒀚','𒀛'=>'𒀛','𒀜'=>'𒀜','𒀝'=>'𒀝','𒀞'=>'𒀞','𒀟'=>'𒀟','𒀠'=>'𒀠','𒀡'=>'𒀡','𒀢'=>'𒀢','𒀣'=>'𒀣','𒀤'=>'𒀤','𒀥'=>'𒀥','𒀦'=>'𒀦','𒀧'=>'𒀧','𒀨'=>'𒀨','𒀩'=>'𒀩','𒀪'=>'𒀪','𒀫'=>'𒀫','𒀬'=>'𒀬','𒀭'=>'𒀭','𒀮'=>'𒀮','𒀯'=>'𒀯','𒀰'=>'𒀰','𒀱'=>'𒀱','𒀲'=>'𒀲','𒀳'=>'𒀳','𒀴'=>'𒀴','𒀵'=>'𒀵','𒀶'=>'𒀶','𒀷'=>'𒀷','𒀸'=>'𒀸','𒀹'=>'𒀹','𒀺'=>'𒀺','𒀻'=>'𒀻','𒀼'=>'𒀼','𒀽'=>'𒀽','𒀾'=>'𒀾','𒀿'=>'𒀿','𒁀'=>'𒁀','𒁁'=>'𒁁','𒁂'=>'𒁂','𒁃'=>'𒁃','𒁄'=>'𒁄','𒁅'=>'𒁅','𒁆'=>'𒁆','𒁇'=>'𒁇','𒁈'=>'𒁈','𒁉'=>'𒁉','𒁊'=>'𒁊','𒁋'=>'𒁋','𒁌'=>'𒁌','𒁍'=>'𒁍','𒁎'=>'𒁎','𒁏'=>'𒁏','𒁐'=>'𒁐','𒁑'=>'𒁑','𒁒'=>'𒁒','𒁓'=>'𒁓','𒁔'=>'𒁔','𒁕'=>'𒁕','𒁖'=>'𒁖','𒁗'=>'𒁗','𒁘'=>'𒁘','𒁙'=>'𒁙','𒁚'=>'𒁚','𒁛'=>'𒁛','𒁜'=>'𒁜','𒁝'=>'𒁝','𒁞'=>'𒁞','𒁟'=>'𒁟','𒁠'=>'𒁠','𒁡'=>'𒁡','𒁢'=>'𒁢','𒁣'=>'𒁣','𒁤'=>'𒁤','𒁥'=>'𒁥','𒁦'=>'𒁦','𒁧'=>'𒁧','𒁨'=>'𒁨','𒁩'=>'𒁩','𒁪'=>'𒁪','𒁫'=>'𒁫','𒁬'=>'𒁬','𒁭'=>'𒁭','𒁮'=>'𒁮','𒁯'=>'𒁯','𒁰'=>'𒁰','𒁱'=>'𒁱','𒁲'=>'𒁲','𒁳'=>'𒁳','𒁴'=>'𒁴','𒁵'=>'𒁵','𒁶'=>'𒁶','𒁷'=>'𒁷','𒁸'=>'𒁸','𒁹'=>'𒁹','𒁺'=>'𒁺','𒁻'=>'𒁻','𒁼'=>'𒁼','𒁽'=>'𒁽','𒁾'=>'𒁾','𒁿'=>'𒁿','𒂀'=>'𒂀','𒂁'=>'𒂁','𒂂'=>'𒂂','𒂃'=>'𒂃','𒂄'=>'𒂄','𒂅'=>'𒂅','𒂆'=>'𒂆','𒂇'=>'𒂇','𒂈'=>'𒂈','𒂉'=>'𒂉','𒂊'=>'𒂊','𒂋'=>'𒂋','𒂌'=>'𒂌','𒂍'=>'𒂍','𒂎'=>'𒂎','𒂏'=>'𒂏','𒂐'=>'𒂐','𒂑'=>'𒂑','𒂒'=>'𒂒','𒂓'=>'𒂓','𒂔'=>'𒂔','𒂕'=>'𒂕','𒂖'=>'𒂖','𒂗'=>'𒂗','𒂘'=>'𒂘','𒂙'=>'𒂙','𒂚'=>'𒂚','𒂛'=>'𒂛','𒂜'=>'𒂜','𒂝'=>'𒂝','𒂞'=>'𒂞','𒂟'=>'𒂟','𒂠'=>'𒂠','𒂡'=>'𒂡','𒂢'=>'𒂢','𒂣'=>'𒂣','𒂤'=>'𒂤','𒂥'=>'𒂥','𒂦'=>'𒂦','𒂧'=>'𒂧','𒂨'=>'𒂨','𒂩'=>'𒂩','𒂪'=>'𒂪','𒂫'=>'𒂫','𒂬'=>'𒂬','𒂭'=>'𒂭','𒂮'=>'𒂮','𒂯'=>'𒂯','𒂰'=>'𒂰','𒂱'=>'𒂱','𒂲'=>'𒂲','𒂳'=>'𒂳','𒂴'=>'𒂴','𒂵'=>'𒂵','𒂶'=>'𒂶','𒂷'=>'𒂷','𒂸'=>'𒂸','𒂹'=>'𒂹','𒂺'=>'𒂺','𒂻'=>'𒂻','𒂼'=>'𒂼','𒂽'=>'𒂽','𒂾'=>'𒂾','𒂿'=>'𒂿','𒃀'=>'𒃀','𒃁'=>'𒃁','𒃂'=>'𒃂','𒃃'=>'𒃃','𒃄'=>'𒃄','𒃅'=>'𒃅','𒃆'=>'𒃆','𒃇'=>'𒃇','𒃈'=>'𒃈','𒃉'=>'𒃉','𒃊'=>'𒃊','𒃋'=>'𒃋','𒃌'=>'𒃌','𒃍'=>'𒃍','𒃎'=>'𒃎','𒃏'=>'𒃏','𒃐'=>'𒃐','𒃑'=>'𒃑','𒃒'=>'𒃒','𒃓'=>'𒃓','𒃔'=>'𒃔','𒃕'=>'𒃕','𒃖'=>'𒃖','𒃗'=>'𒃗','𒃘'=>'𒃘','𒃙'=>'𒃙','𒃚'=>'𒃚','𒃛'=>'𒃛','𒃜'=>'𒃜','𒃝'=>'𒃝','𒃞'=>'𒃞','𒃟'=>'𒃟','𒃠'=>'𒃠','𒃡'=>'𒃡','𒃢'=>'𒃢','𒃣'=>'𒃣','𒃤'=>'𒃤','𒃥'=>'𒃥','𒃦'=>'𒃦','𒃧'=>'𒃧','𒃨'=>'𒃨','𒃩'=>'𒃩','𒃪'=>'𒃪','𒃫'=>'𒃫','𒃬'=>'𒃬','𒃭'=>'𒃭','𒃮'=>'𒃮','𒃯'=>'𒃯','𒃰'=>'𒃰','𒃱'=>'𒃱','𒃲'=>'𒃲','𒃳'=>'𒃳','𒃴'=>'𒃴','𒃵'=>'𒃵','𒃶'=>'𒃶','𒃷'=>'𒃷','𒃸'=>'𒃸','𒃹'=>'𒃹','𒃺'=>'𒃺','𒃻'=>'𒃻','𒃼'=>'𒃼','𒃽'=>'𒃽','𒃾'=>'𒃾','𒃿'=>'𒃿','𒄀'=>'𒄀','𒄁'=>'𒄁','𒄂'=>'𒄂','𒄃'=>'𒄃','𒄄'=>'𒄄','𒄅'=>'𒄅','𒄆'=>'𒄆','𒄇'=>'𒄇','𒄈'=>'𒄈','𒄉'=>'𒄉','𒄊'=>'𒄊','𒄋'=>'𒄋','𒄌'=>'𒄌','𒄍'=>'𒄍','𒄎'=>'𒄎','𒄏'=>'𒄏','𒄐'=>'𒄐','𒄑'=>'𒄑','𒄒'=>'𒄒','𒄓'=>'𒄓','𒄔'=>'𒄔','𒄕'=>'𒄕','𒄖'=>'𒄖','𒄗'=>'𒄗','𒄘'=>'𒄘','𒄙'=>'𒄙','𒄚'=>'𒄚','𒄛'=>'𒄛','𒄜'=>'𒄜','𒄝'=>'𒄝','𒄞'=>'𒄞','𒄟'=>'𒄟','𒄠'=>'𒄠','𒄡'=>'𒄡','𒄢'=>'𒄢','𒄣'=>'𒄣','𒄤'=>'𒄤','𒄥'=>'𒄥','𒄦'=>'𒄦','𒄧'=>'𒄧','𒄨'=>'𒄨','𒄩'=>'𒄩','𒄪'=>'𒄪','𒄫'=>'𒄫','𒄬'=>'𒄬','𒄭'=>'𒄭','𒄮'=>'𒄮','𒄯'=>'𒄯','𒄰'=>'𒄰','𒄱'=>'𒄱','𒄲'=>'𒄲','𒄳'=>'𒄳','𒄴'=>'𒄴','𒄵'=>'𒄵','𒄶'=>'𒄶','𒄷'=>'𒄷','𒄸'=>'𒄸','𒄹'=>'𒄹','𒄺'=>'𒄺','𒄻'=>'𒄻','𒄼'=>'𒄼','𒄽'=>'𒄽','𒄾'=>'𒄾','𒄿'=>'𒄿','𒅀'=>'𒅀','𒅁'=>'𒅁','𒅂'=>'𒅂','𒅃'=>'𒅃','𒅄'=>'𒅄','𒅅'=>'𒅅','𒅆'=>'𒅆','𒅇'=>'𒅇','𒅈'=>'𒅈','𒅉'=>'𒅉','𒅊'=>'𒅊','𒅋'=>'𒅋','𒅌'=>'𒅌','𒅍'=>'𒅍','𒅎'=>'𒅎','𒅏'=>'𒅏','𒅐'=>'𒅐','𒅑'=>'𒅑','𒅒'=>'𒅒','𒅓'=>'𒅓','𒅔'=>'𒅔','𒅕'=>'𒅕','𒅖'=>'𒅖','𒅗'=>'𒅗','𒅘'=>'𒅘','𒅙'=>'𒅙','𒅚'=>'𒅚','𒅛'=>'𒅛','𒅜'=>'𒅜','𒅝'=>'𒅝','𒅞'=>'𒅞','𒅟'=>'𒅟','𒅠'=>'𒅠','𒅡'=>'𒅡','𒅢'=>'𒅢','𒅣'=>'𒅣','𒅤'=>'𒅤','𒅥'=>'𒅥','𒅦'=>'𒅦','𒅧'=>'𒅧','𒅨'=>'𒅨','𒅩'=>'𒅩','𒅪'=>'𒅪','𒅫'=>'𒅫','𒅬'=>'𒅬','𒅭'=>'𒅭','𒅮'=>'𒅮','𒅯'=>'𒅯','𒅰'=>'𒅰','𒅱'=>'𒅱','𒅲'=>'𒅲','𒅳'=>'𒅳','𒅴'=>'𒅴','𒅵'=>'𒅵','𒅶'=>'𒅶','𒅷'=>'𒅷','𒅸'=>'𒅸','𒅹'=>'𒅹','𒅺'=>'𒅺','𒅻'=>'𒅻','𒅼'=>'𒅼','𒅽'=>'𒅽','𒅾'=>'𒅾','𒅿'=>'𒅿','𒆀'=>'𒆀','𒆁'=>'𒆁','𒆂'=>'𒆂','𒆃'=>'𒆃','𒆄'=>'𒆄','𒆅'=>'𒆅','𒆆'=>'𒆆','𒆇'=>'𒆇','𒆈'=>'𒆈','𒆉'=>'𒆉','𒆊'=>'𒆊','𒆋'=>'𒆋','𒆌'=>'𒆌','𒆍'=>'𒆍','𒆎'=>'𒆎','𒆏'=>'𒆏','𒆐'=>'𒆐','𒆑'=>'𒆑','𒆒'=>'𒆒','𒆓'=>'𒆓','𒆔'=>'𒆔','𒆕'=>'𒆕','𒆖'=>'𒆖','𒆗'=>'𒆗','𒆘'=>'𒆘','𒆙'=>'𒆙','𒆚'=>'𒆚','𒆛'=>'𒆛','𒆜'=>'𒆜','𒆝'=>'𒆝','𒆞'=>'𒆞','𒆟'=>'𒆟','𒆠'=>'𒆠','𒆡'=>'𒆡','𒆢'=>'𒆢','𒆣'=>'𒆣','𒆤'=>'𒆤','𒆥'=>'𒆥','𒆦'=>'𒆦','𒆧'=>'𒆧','𒆨'=>'𒆨','𒆩'=>'𒆩','𒆪'=>'𒆪','𒆫'=>'𒆫','𒆬'=>'𒆬','𒆭'=>'𒆭','𒆮'=>'𒆮','𒆯'=>'𒆯','𒆰'=>'𒆰','𒆱'=>'𒆱','𒆲'=>'𒆲','𒆳'=>'𒆳','𒆴'=>'𒆴','𒆵'=>'𒆵','𒆶'=>'𒆶','𒆷'=>'𒆷','𒆸'=>'𒆸','𒆹'=>'𒆹','𒆺'=>'𒆺','𒆻'=>'𒆻','𒆼'=>'𒆼','𒆽'=>'𒆽','𒆾'=>'𒆾','𒆿'=>'𒆿','𒇀'=>'𒇀','𒇁'=>'𒇁','𒇂'=>'𒇂','𒇃'=>'𒇃','𒇄'=>'𒇄','𒇅'=>'𒇅','𒇆'=>'𒇆','𒇇'=>'𒇇','𒇈'=>'𒇈','𒇉'=>'𒇉','𒇊'=>'𒇊','𒇋'=>'𒇋','𒇌'=>'𒇌','𒇍'=>'𒇍','𒇎'=>'𒇎','𒇏'=>'𒇏','𒇐'=>'𒇐','𒇑'=>'𒇑','𒇒'=>'𒇒','𒇓'=>'𒇓','𒇔'=>'𒇔','𒇕'=>'𒇕','𒇖'=>'𒇖','𒇗'=>'𒇗','𒇘'=>'𒇘','𒇙'=>'𒇙','𒇚'=>'𒇚','𒇛'=>'𒇛','𒇜'=>'𒇜','𒇝'=>'𒇝','𒇞'=>'𒇞','𒇟'=>'𒇟','𒇠'=>'𒇠','𒇡'=>'𒇡','𒇢'=>'𒇢','𒇣'=>'𒇣','𒇤'=>'𒇤','𒇥'=>'𒇥','𒇦'=>'𒇦','𒇧'=>'𒇧','𒇨'=>'𒇨','𒇩'=>'𒇩','𒇪'=>'𒇪','𒇫'=>'𒇫','𒇬'=>'𒇬','𒇭'=>'𒇭','𒇮'=>'𒇮','𒇯'=>'𒇯','𒇰'=>'𒇰','𒇱'=>'𒇱','𒇲'=>'𒇲','𒇳'=>'𒇳','𒇴'=>'𒇴','𒇵'=>'𒇵','𒇶'=>'𒇶','𒇷'=>'𒇷','𒇸'=>'𒇸','𒇹'=>'𒇹','𒇺'=>'𒇺','𒇻'=>'𒇻','𒇼'=>'𒇼','𒇽'=>'𒇽','𒇾'=>'𒇾','𒇿'=>'𒇿','𒈀'=>'𒈀','𒈁'=>'𒈁','𒈂'=>'𒈂','𒈃'=>'𒈃','𒈄'=>'𒈄','𒈅'=>'𒈅','𒈆'=>'𒈆','𒈇'=>'𒈇','𒈈'=>'𒈈','𒈉'=>'𒈉','𒈊'=>'𒈊','𒈋'=>'𒈋','𒈌'=>'𒈌','𒈍'=>'𒈍','𒈎'=>'𒈎','𒈏'=>'𒈏','𒈐'=>'𒈐','𒈑'=>'𒈑','𒈒'=>'𒈒','𒈓'=>'𒈓','𒈔'=>'𒈔','𒈕'=>'𒈕','𒈖'=>'𒈖','𒈗'=>'𒈗','𒈘'=>'𒈘','𒈙'=>'𒈙','𒈚'=>'𒈚','𒈛'=>'𒈛','𒈜'=>'𒈜','𒈝'=>'𒈝','𒈞'=>'𒈞','𒈟'=>'𒈟','𒈠'=>'𒈠','𒈡'=>'𒈡','𒈢'=>'𒈢','𒈣'=>'𒈣','𒈤'=>'𒈤','𒈥'=>'𒈥','𒈦'=>'𒈦','𒈧'=>'𒈧','𒈨'=>'𒈨','𒈩'=>'𒈩','𒈪'=>'𒈪','𒈫'=>'𒈫','𒈬'=>'𒈬','𒈭'=>'𒈭','𒈮'=>'𒈮','𒈯'=>'𒈯','𒈰'=>'𒈰','𒈱'=>'𒈱','𒈲'=>'𒈲','𒈳'=>'𒈳','𒈴'=>'𒈴','𒈵'=>'𒈵','𒈶'=>'𒈶','𒈷'=>'𒈷','𒈸'=>'𒈸','𒈹'=>'𒈹','𒈺'=>'𒈺','𒈻'=>'𒈻','𒈼'=>'𒈼','𒈽'=>'𒈽','𒈾'=>'𒈾','𒈿'=>'𒈿','𒉀'=>'𒉀','𒉁'=>'𒉁','𒉂'=>'𒉂','𒉃'=>'𒉃','𒉄'=>'𒉄','𒉅'=>'𒉅','𒉆'=>'𒉆','𒉇'=>'𒉇','𒉈'=>'𒉈','𒉉'=>'𒉉','𒉊'=>'𒉊','𒉋'=>'𒉋','𒉌'=>'𒉌','𒉍'=>'𒉍','𒉎'=>'𒉎','𒉏'=>'𒉏','𒉐'=>'𒉐','𒉑'=>'𒉑','𒉒'=>'𒉒','𒉓'=>'𒉓','𒉔'=>'𒉔','𒉕'=>'𒉕','𒉖'=>'𒉖','𒉗'=>'𒉗','𒉘'=>'𒉘','𒉙'=>'𒉙','𒉚'=>'𒉚','𒉛'=>'𒉛','𒉜'=>'𒉜','𒉝'=>'𒉝','𒉞'=>'𒉞','𒉟'=>'𒉟','𒉠'=>'𒉠','𒉡'=>'𒉡','𒉢'=>'𒉢','𒉣'=>'𒉣','𒉤'=>'𒉤','𒉥'=>'𒉥','𒉦'=>'𒉦','𒉧'=>'𒉧','𒉨'=>'𒉨','𒉩'=>'𒉩','𒉪'=>'𒉪','𒉫'=>'𒉫','𒉬'=>'𒉬','𒉭'=>'𒉭','𒉮'=>'𒉮','𒉯'=>'𒉯','𒉰'=>'𒉰','𒉱'=>'𒉱','𒉲'=>'𒉲','𒉳'=>'𒉳','𒉴'=>'𒉴','𒉵'=>'𒉵','𒉶'=>'𒉶','𒉷'=>'𒉷','𒉸'=>'𒉸','𒉹'=>'𒉹','𒉺'=>'𒉺','𒉻'=>'𒉻','𒉼'=>'𒉼','𒉽'=>'𒉽','𒉾'=>'𒉾','𒉿'=>'𒉿','𒊀'=>'𒊀','𒊁'=>'𒊁','𒊂'=>'𒊂','𒊃'=>'𒊃','𒊄'=>'𒊄','𒊅'=>'𒊅','𒊆'=>'𒊆','𒊇'=>'𒊇','𒊈'=>'𒊈','𒊉'=>'𒊉','𒊊'=>'𒊊','𒊋'=>'𒊋','𒊌'=>'𒊌','𒊍'=>'𒊍','𒊎'=>'𒊎','𒊏'=>'𒊏','𒊐'=>'𒊐','𒊑'=>'𒊑','𒊒'=>'𒊒','𒊓'=>'𒊓','𒊔'=>'𒊔','𒊕'=>'𒊕','𒊖'=>'𒊖','𒊗'=>'𒊗','𒊘'=>'𒊘','𒊙'=>'𒊙','𒊚'=>'𒊚','𒊛'=>'𒊛','𒊜'=>'𒊜','𒊝'=>'𒊝','𒊞'=>'𒊞','𒊟'=>'𒊟','𒊠'=>'𒊠','𒊡'=>'𒊡','𒊢'=>'𒊢','𒊣'=>'𒊣','𒊤'=>'𒊤','𒊥'=>'𒊥','𒊦'=>'𒊦','𒊧'=>'𒊧','𒊨'=>'𒊨','𒊩'=>'𒊩','𒊪'=>'𒊪','𒊫'=>'𒊫','𒊬'=>'𒊬','𒊭'=>'𒊭','𒊮'=>'𒊮','𒊯'=>'𒊯','𒊰'=>'𒊰','𒊱'=>'𒊱','𒊲'=>'𒊲','𒊳'=>'𒊳','𒊴'=>'𒊴','𒊵'=>'𒊵','𒊶'=>'𒊶','𒊷'=>'𒊷','𒊸'=>'𒊸','𒊹'=>'𒊹','𒊺'=>'𒊺','𒊻'=>'𒊻','𒊼'=>'𒊼','𒊽'=>'𒊽','𒊾'=>'𒊾','𒊿'=>'𒊿','𒋀'=>'𒋀','𒋁'=>'𒋁','𒋂'=>'𒋂','𒋃'=>'𒋃','𒋄'=>'𒋄','𒋅'=>'𒋅','𒋆'=>'𒋆','𒋇'=>'𒋇','𒋈'=>'𒋈','𒋉'=>'𒋉','𒋊'=>'𒋊','𒋋'=>'𒋋','𒋌'=>'𒋌','𒋍'=>'𒋍','𒋎'=>'𒋎','𒋏'=>'𒋏','𒋐'=>'𒋐','𒋑'=>'𒋑','𒋒'=>'𒋒','𒋓'=>'𒋓','𒋔'=>'𒋔','𒋕'=>'𒋕','𒋖'=>'𒋖','𒋗'=>'𒋗','𒋘'=>'𒋘','𒋙'=>'𒋙','𒋚'=>'𒋚','𒋛'=>'𒋛','𒋜'=>'𒋜','𒋝'=>'𒋝','𒋞'=>'𒋞','𒋟'=>'𒋟','𒋠'=>'𒋠','𒋡'=>'𒋡','𒋢'=>'𒋢','𒋣'=>'𒋣','𒋤'=>'𒋤','𒋥'=>'𒋥','𒋦'=>'𒋦','𒋧'=>'𒋧','𒋨'=>'𒋨','𒋩'=>'𒋩','𒋪'=>'𒋪','𒋫'=>'𒋫','𒋬'=>'𒋬','𒋭'=>'𒋭','𒋮'=>'𒋮','𒋯'=>'𒋯','𒋰'=>'𒋰','𒋱'=>'𒋱','𒋲'=>'𒋲','𒋳'=>'𒋳','𒋴'=>'𒋴','𒋵'=>'𒋵','𒋶'=>'𒋶','𒋷'=>'𒋷','𒋸'=>'𒋸','𒋹'=>'𒋹','𒋺'=>'𒋺','𒋻'=>'𒋻','𒋼'=>'𒋼','𒋽'=>'𒋽','𒋾'=>'𒋾','𒋿'=>'𒋿','𒌀'=>'𒌀','𒌁'=>'𒌁','𒌂'=>'𒌂','𒌃'=>'𒌃','𒌄'=>'𒌄','𒌅'=>'𒌅','𒌆'=>'𒌆','𒌇'=>'𒌇','𒌈'=>'𒌈','𒌉'=>'𒌉','𒌊'=>'𒌊','𒌋'=>'𒌋','𒌌'=>'𒌌','𒌍'=>'𒌍','𒌎'=>'𒌎','𒌏'=>'𒌏','𒌐'=>'𒌐','𒌑'=>'𒌑','𒌒'=>'𒌒','𒌓'=>'𒌓','𒌔'=>'𒌔','𒌕'=>'𒌕','𒌖'=>'𒌖','𒌗'=>'𒌗','𒌘'=>'𒌘','𒌙'=>'𒌙','𒌚'=>'𒌚','𒌛'=>'𒌛','𒌜'=>'𒌜','𒌝'=>'𒌝','𒌞'=>'𒌞','𒌟'=>'𒌟','𒌠'=>'𒌠','𒌡'=>'𒌡','𒌢'=>'𒌢','𒌣'=>'𒌣','𒌤'=>'𒌤','𒌥'=>'𒌥','𒌦'=>'𒌦','𒌧'=>'𒌧','𒌨'=>'𒌨','𒌩'=>'𒌩','𒌪'=>'𒌪','𒌫'=>'𒌫','𒌬'=>'𒌬','𒌭'=>'𒌭','𒌮'=>'𒌮','𒌯'=>'𒌯','𒌰'=>'𒌰','𒌱'=>'𒌱','𒌲'=>'𒌲','𒌳'=>'𒌳','𒌴'=>'𒌴','𒌵'=>'𒌵','𒌶'=>'𒌶','𒌷'=>'𒌷','𒌸'=>'𒌸','𒌹'=>'𒌹','𒌺'=>'𒌺','𒌻'=>'𒌻','𒌼'=>'𒌼','𒌽'=>'𒌽','𒌾'=>'𒌾','𒌿'=>'𒌿','𒍀'=>'𒍀','𒍁'=>'𒍁','𒍂'=>'𒍂','𒍃'=>'𒍃','𒍄'=>'𒍄','𒍅'=>'𒍅','𒍆'=>'𒍆','𒍇'=>'𒍇','𒍈'=>'𒍈','𒍉'=>'𒍉','𒍊'=>'𒍊','𒍋'=>'𒍋','𒍌'=>'𒍌','𒍍'=>'𒍍','𒍎'=>'𒍎','𒍏'=>'𒍏','𒍐'=>'𒍐','𒍑'=>'𒍑','𒍒'=>'𒍒','𒍓'=>'𒍓','𒍔'=>'𒍔','𒍕'=>'𒍕','𒍖'=>'𒍖','𒍗'=>'𒍗','𒍘'=>'𒍘','𒍙'=>'𒍙','𒍚'=>'𒍚','𒍛'=>'𒍛','𒍜'=>'𒍜','𒍝'=>'𒍝','𒍞'=>'𒍞','𒍟'=>'𒍟','𒍠'=>'𒍠','𒍡'=>'𒍡','𒍢'=>'𒍢','𒍣'=>'𒍣','𒍤'=>'𒍤','𒍥'=>'𒍥','𒍦'=>'𒍦','𒍧'=>'𒍧','𒍨'=>'𒍨','𒍩'=>'𒍩','𒍪'=>'𒍪','𒍫'=>'𒍫','𒍬'=>'𒍬','𒍭'=>'𒍭','𒍮'=>'𒍮','𒐀'=>'2','𒐁'=>'3','𒐂'=>'4','𒐃'=>'5','𒐄'=>'6','𒐅'=>'7','𒐆'=>'8','𒐇'=>'9','𒐈'=>'3','𒐉'=>'4','𒐊'=>'5','𒐋'=>'6','𒐌'=>'7','𒐍'=>'8','𒐎'=>'9','𒐏'=>'4','𒐐'=>'5','𒐑'=>'6','𒐒'=>'7','𒐓'=>'8','𒐔'=>'9','𒐕'=>'1','𒐖'=>'2','𒐗'=>'3','𒐘'=>'4','𒐙'=>'5','𒐚'=>'6','𒐛'=>'7','𒐜'=>'8','𒐝'=>'9','𒐞'=>'1','𒐟'=>'2','𒐠'=>'3','𒐡'=>'4','𒐢'=>'5','𒐣'=>'2','𒐤'=>'3','𒐥'=>'3','𒐦'=>'4','𒐧'=>'5','𒐨'=>'6','𒐩'=>'7','𒐪'=>'8','𒐫'=>'9','𒐬'=>'1','𒐭'=>'2','𒐮'=>'3','𒐯'=>'3','𒐰'=>'4','𒐱'=>'5','𒐲'=>'𒐲','𒐳'=>'𒐳','𒐴'=>'1','𒐵'=>'2','𒐶'=>'3','𒐷'=>'3','𒐸'=>'4','𒐹'=>'5','𒐺'=>'3','𒐻'=>'3','𒐼'=>'4','𒐽'=>'4','𒐾'=>'4','𒐿'=>'4','𒑀'=>'6','𒑁'=>'7','𒑂'=>'7','𒑃'=>'7','𒑄'=>'8','𒑅'=>'8','𒑆'=>'9','𒑇'=>'9','𒑈'=>'9','𒑉'=>'9','𒑊'=>'2','𒑋'=>'3','𒑌'=>'4','𒑍'=>'5','𒑎'=>'6','𒑏'=>'1','𒑐'=>'2','𒑑'=>'3','𒑒'=>'4','𒑓'=>'4','𒑔'=>'5','𒑕'=>'5','𒑖'=>'𒑖','𒑗'=>'𒑗','𒑘'=>'1','𒑙'=>'2','𒑚'=>'1/3','𒑛'=>'2/3','𒑜'=>'5/6','𒑝'=>'1/3','𒑞'=>'2/3','𒑟'=>'1/8','𒑠'=>'1/4','𒑡'=>'1/6','𒑢'=>'1/4');
diff --git a/phpBB/includes/utf/data/search_indexer_4.php b/phpBB/includes/utf/data/search_indexer_4.php
index 51acbff1c2..6697501a89 100644
--- a/phpBB/includes/utf/data/search_indexer_4.php
+++ b/phpBB/includes/utf/data/search_indexer_4.php
@@ -1 +1 @@
-<?php return array('⁰'=>'0','ⁱ'=>'ⁱ','⁴'=>'4','⁵'=>'5','⁶'=>'6','⁷'=>'7','⁸'=>'8','⁹'=>'9','ⁿ'=>'ⁿ','₀'=>'0','₁'=>'1','₂'=>'2','₃'=>'3','₄'=>'4','₅'=>'5','₆'=>'6','₇'=>'7','₈'=>'8','₉'=>'9','ₐ'=>'ₐ','ₑ'=>'ₑ','ₒ'=>'ₒ','ₓ'=>'ₓ','ₔ'=>'ₔ','⃐'=>'⃐','⃑'=>'⃑','⃒'=>'⃒','⃓'=>'⃓','⃔'=>'⃔','⃕'=>'⃕','⃖'=>'⃖','⃗'=>'⃗','⃘'=>'⃘','⃙'=>'⃙','⃚'=>'⃚','⃛'=>'⃛','⃜'=>'⃜','⃝'=>'⃝','⃞'=>'⃞','⃟'=>'⃟','⃠'=>'⃠','⃡'=>'⃡','⃢'=>'⃢','⃣'=>'⃣','⃤'=>'⃤','⃥'=>'⃥','⃦'=>'⃦','⃧'=>'⃧','⃨'=>'⃨','⃩'=>'⃩','⃪'=>'⃪','⃫'=>'⃫','⃬'=>'⃬','⃭'=>'⃭','⃮'=>'⃮','⃯'=>'⃯','ℂ'=>'ℂ','ℇ'=>'ℇ','ℊ'=>'ℊ','ℋ'=>'ℋ','ℌ'=>'ℌ','ℍ'=>'ℍ','ℎ'=>'ℎ','ℏ'=>'ℏ','ℐ'=>'ℐ','ℑ'=>'ℑ','ℒ'=>'ℒ','ℓ'=>'ℓ','ℕ'=>'ℕ','ℙ'=>'ℙ','ℚ'=>'ℚ','ℛ'=>'ℛ','ℜ'=>'ℜ','ℝ'=>'ℝ','ℤ'=>'ℤ','Ω'=>'ω','ℨ'=>'ℨ','K'=>'k','Å'=>'å','ℬ'=>'ℬ','ℭ'=>'ℭ','ℯ'=>'ℯ','ℰ'=>'ℰ','ℱ'=>'ℱ','Ⅎ'=>'ⅎ','ℳ'=>'ℳ','ℴ'=>'ℴ','ℵ'=>'ℵ','ℶ'=>'ℶ','ℷ'=>'ℷ','ℸ'=>'ℸ','ℹ'=>'ℹ','ℼ'=>'ℼ','ℽ'=>'ℽ','ℾ'=>'ℾ','ℿ'=>'ℿ','ⅅ'=>'ⅅ','ⅆ'=>'ⅆ','ⅇ'=>'ⅇ','ⅈ'=>'ⅈ','ⅉ'=>'ⅉ','ⅎ'=>'ⅎ','⅓'=>'1/3','⅔'=>'2/3','⅕'=>'1/5','⅖'=>'2/5','⅗'=>'3/5','⅘'=>'4/5','⅙'=>'1/6','⅚'=>'5/6','⅛'=>'1/8','⅜'=>'3/8','⅝'=>'5/8','⅞'=>'7/8','⅟'=>'1','Ⅰ'=>'1','Ⅱ'=>'2','Ⅲ'=>'3','Ⅳ'=>'4','Ⅴ'=>'5','Ⅵ'=>'6','Ⅶ'=>'7','Ⅷ'=>'8','Ⅸ'=>'9','Ⅹ'=>'10','Ⅺ'=>'11','Ⅻ'=>'12','Ⅼ'=>'50','Ⅽ'=>'100','Ⅾ'=>'500','Ⅿ'=>'1000','ⅰ'=>'1','ⅱ'=>'2','ⅲ'=>'3','ⅳ'=>'4','ⅴ'=>'5','ⅵ'=>'6','ⅶ'=>'7','ⅷ'=>'8','ⅸ'=>'9','ⅹ'=>'10','ⅺ'=>'11','ⅻ'=>'12','ⅼ'=>'50','ⅽ'=>'100','ⅾ'=>'500','ⅿ'=>'1000','ↀ'=>'1000','ↁ'=>'5000','ↂ'=>'10000','Ↄ'=>'ↄ','ↄ'=>'ↄ','①'=>'1','②'=>'2','③'=>'3','④'=>'4','⑤'=>'5','⑥'=>'6','⑦'=>'7','⑧'=>'8','⑨'=>'9','⑩'=>'10','⑪'=>'11','⑫'=>'12','⑬'=>'13','⑭'=>'14','⑮'=>'15','⑯'=>'16','⑰'=>'17','⑱'=>'18','⑲'=>'19','⑳'=>'20','⑴'=>'1','⑵'=>'2','⑶'=>'3','⑷'=>'4','⑸'=>'5','⑹'=>'6','⑺'=>'7','⑻'=>'8','⑼'=>'9','⑽'=>'10','⑾'=>'11','⑿'=>'12','⒀'=>'13','⒁'=>'14','⒂'=>'15','⒃'=>'16','⒄'=>'17','⒅'=>'18','⒆'=>'19','⒇'=>'20','⒈'=>'1','⒉'=>'2','⒊'=>'3','⒋'=>'4','⒌'=>'5','⒍'=>'6','⒎'=>'7','⒏'=>'8','⒐'=>'9','⒑'=>'10','⒒'=>'11','⒓'=>'12','⒔'=>'13','⒕'=>'14','⒖'=>'15','⒗'=>'16','⒘'=>'17','⒙'=>'18','⒚'=>'19','⒛'=>'20','⓪'=>'0','⓫'=>'11','⓬'=>'12','⓭'=>'13','⓮'=>'14','⓯'=>'15','⓰'=>'16','⓱'=>'17','⓲'=>'18','⓳'=>'19','⓴'=>'20','⓵'=>'1','⓶'=>'2','⓷'=>'3','⓸'=>'4','⓹'=>'5','⓺'=>'6','⓻'=>'7','⓼'=>'8','⓽'=>'9','⓾'=>'10','⓿'=>'0','❶'=>'1','❷'=>'2','❸'=>'3','❹'=>'4','❺'=>'5','❻'=>'6','❼'=>'7','❽'=>'8','❾'=>'9','❿'=>'10','➀'=>'1','➁'=>'2','➂'=>'3','➃'=>'4','➄'=>'5','➅'=>'6','➆'=>'7','➇'=>'8','➈'=>'9','➉'=>'10','➊'=>'1','➋'=>'2','➌'=>'3','➍'=>'4','➎'=>'5','➏'=>'6','➐'=>'7','➑'=>'8','➒'=>'9','➓'=>'10'); \ No newline at end of file
+<?php return array('⁰'=>'0','ⁱ'=>'ⁱ','⁴'=>'4','⁵'=>'5','⁶'=>'6','⁷'=>'7','⁸'=>'8','⁹'=>'9','ⁿ'=>'ⁿ','₀'=>'0','₁'=>'1','₂'=>'2','₃'=>'3','₄'=>'4','₅'=>'5','₆'=>'6','₇'=>'7','₈'=>'8','₉'=>'9','ₐ'=>'ₐ','ₑ'=>'ₑ','ₒ'=>'ₒ','ₓ'=>'ₓ','ₔ'=>'ₔ','⃐'=>'⃐','⃑'=>'⃑','⃒'=>'⃒','⃓'=>'⃓','⃔'=>'⃔','⃕'=>'⃕','⃖'=>'⃖','⃗'=>'⃗','⃘'=>'⃘','⃙'=>'⃙','⃚'=>'⃚','⃛'=>'⃛','⃜'=>'⃜','⃝'=>'⃝','⃞'=>'⃞','⃟'=>'⃟','⃠'=>'⃠','⃡'=>'⃡','⃢'=>'⃢','⃣'=>'⃣','⃤'=>'⃤','⃥'=>'⃥','⃦'=>'⃦','⃧'=>'⃧','⃨'=>'⃨','⃩'=>'⃩','⃪'=>'⃪','⃫'=>'⃫','⃬'=>'⃬','⃭'=>'⃭','⃮'=>'⃮','⃯'=>'⃯','ℂ'=>'ℂ','ℇ'=>'ℇ','ℊ'=>'ℊ','ℋ'=>'ℋ','ℌ'=>'ℌ','ℍ'=>'ℍ','ℎ'=>'ℎ','ℏ'=>'ℏ','ℐ'=>'ℐ','ℑ'=>'ℑ','ℒ'=>'ℒ','ℓ'=>'ℓ','ℕ'=>'ℕ','ℙ'=>'ℙ','ℚ'=>'ℚ','ℛ'=>'ℛ','ℜ'=>'ℜ','ℝ'=>'ℝ','ℤ'=>'ℤ','Ω'=>'ω','ℨ'=>'ℨ','K'=>'k','Å'=>'å','ℬ'=>'ℬ','ℭ'=>'ℭ','ℯ'=>'ℯ','ℰ'=>'ℰ','ℱ'=>'ℱ','Ⅎ'=>'ⅎ','ℳ'=>'ℳ','ℴ'=>'ℴ','ℵ'=>'ℵ','ℶ'=>'ℶ','ℷ'=>'ℷ','ℸ'=>'ℸ','ℹ'=>'ℹ','ℼ'=>'ℼ','ℽ'=>'ℽ','ℾ'=>'ℾ','ℿ'=>'ℿ','ⅅ'=>'ⅅ','ⅆ'=>'ⅆ','ⅇ'=>'ⅇ','ⅈ'=>'ⅈ','ⅉ'=>'ⅉ','ⅎ'=>'ⅎ','⅓'=>'1/3','⅔'=>'2/3','⅕'=>'1/5','⅖'=>'2/5','⅗'=>'3/5','⅘'=>'4/5','⅙'=>'1/6','⅚'=>'5/6','⅛'=>'1/8','⅜'=>'3/8','⅝'=>'5/8','⅞'=>'7/8','⅟'=>'1','Ⅰ'=>'1','Ⅱ'=>'2','Ⅲ'=>'3','Ⅳ'=>'4','Ⅴ'=>'5','Ⅵ'=>'6','Ⅶ'=>'7','Ⅷ'=>'8','Ⅸ'=>'9','Ⅹ'=>'10','Ⅺ'=>'11','Ⅻ'=>'12','Ⅼ'=>'50','Ⅽ'=>'100','Ⅾ'=>'500','Ⅿ'=>'1000','ⅰ'=>'1','ⅱ'=>'2','ⅲ'=>'3','ⅳ'=>'4','ⅴ'=>'5','ⅵ'=>'6','ⅶ'=>'7','ⅷ'=>'8','ⅸ'=>'9','ⅹ'=>'10','ⅺ'=>'11','ⅻ'=>'12','ⅼ'=>'50','ⅽ'=>'100','ⅾ'=>'500','ⅿ'=>'1000','ↀ'=>'1000','ↁ'=>'5000','ↂ'=>'10000','Ↄ'=>'ↄ','ↄ'=>'ↄ','①'=>'1','②'=>'2','③'=>'3','④'=>'4','⑤'=>'5','⑥'=>'6','⑦'=>'7','⑧'=>'8','⑨'=>'9','⑩'=>'10','⑪'=>'11','⑫'=>'12','⑬'=>'13','⑭'=>'14','⑮'=>'15','⑯'=>'16','⑰'=>'17','⑱'=>'18','⑲'=>'19','⑳'=>'20','⑴'=>'1','⑵'=>'2','⑶'=>'3','⑷'=>'4','⑸'=>'5','⑹'=>'6','⑺'=>'7','⑻'=>'8','⑼'=>'9','⑽'=>'10','⑾'=>'11','⑿'=>'12','⒀'=>'13','⒁'=>'14','⒂'=>'15','⒃'=>'16','⒄'=>'17','⒅'=>'18','⒆'=>'19','⒇'=>'20','⒈'=>'1','⒉'=>'2','⒊'=>'3','⒋'=>'4','⒌'=>'5','⒍'=>'6','⒎'=>'7','⒏'=>'8','⒐'=>'9','⒑'=>'10','⒒'=>'11','⒓'=>'12','⒔'=>'13','⒕'=>'14','⒖'=>'15','⒗'=>'16','⒘'=>'17','⒙'=>'18','⒚'=>'19','⒛'=>'20','⓪'=>'0','⓫'=>'11','⓬'=>'12','⓭'=>'13','⓮'=>'14','⓯'=>'15','⓰'=>'16','⓱'=>'17','⓲'=>'18','⓳'=>'19','⓴'=>'20','⓵'=>'1','⓶'=>'2','⓷'=>'3','⓸'=>'4','⓹'=>'5','⓺'=>'6','⓻'=>'7','⓼'=>'8','⓽'=>'9','⓾'=>'10','⓿'=>'0','❶'=>'1','❷'=>'2','❸'=>'3','❹'=>'4','❺'=>'5','❻'=>'6','❼'=>'7','❽'=>'8','❾'=>'9','❿'=>'10','➀'=>'1','➁'=>'2','➂'=>'3','➃'=>'4','➄'=>'5','➅'=>'6','➆'=>'7','➇'=>'8','➈'=>'9','➉'=>'10','➊'=>'1','➋'=>'2','➌'=>'3','➍'=>'4','➎'=>'5','➏'=>'6','➐'=>'7','➑'=>'8','➒'=>'9','➓'=>'10');
diff --git a/phpBB/includes/utf/data/search_indexer_448.php b/phpBB/includes/utf/data/search_indexer_448.php
index 32ac28a549..6cbf6643e1 100644
--- a/phpBB/includes/utf/data/search_indexer_448.php
+++ b/phpBB/includes/utf/data/search_indexer_448.php
@@ -1 +1 @@
-<?php return array('󠄀'=>'󠄀','󠄁'=>'󠄁','󠄂'=>'󠄂','󠄃'=>'󠄃','󠄄'=>'󠄄','󠄅'=>'󠄅','󠄆'=>'󠄆','󠄇'=>'󠄇','󠄈'=>'󠄈','󠄉'=>'󠄉','󠄊'=>'󠄊','󠄋'=>'󠄋','󠄌'=>'󠄌','󠄍'=>'󠄍','󠄎'=>'󠄎','󠄏'=>'󠄏','󠄐'=>'󠄐','󠄑'=>'󠄑','󠄒'=>'󠄒','󠄓'=>'󠄓','󠄔'=>'󠄔','󠄕'=>'󠄕','󠄖'=>'󠄖','󠄗'=>'󠄗','󠄘'=>'󠄘','󠄙'=>'󠄙','󠄚'=>'󠄚','󠄛'=>'󠄛','󠄜'=>'󠄜','󠄝'=>'󠄝','󠄞'=>'󠄞','󠄟'=>'󠄟','󠄠'=>'󠄠','󠄡'=>'󠄡','󠄢'=>'󠄢','󠄣'=>'󠄣','󠄤'=>'󠄤','󠄥'=>'󠄥','󠄦'=>'󠄦','󠄧'=>'󠄧','󠄨'=>'󠄨','󠄩'=>'󠄩','󠄪'=>'󠄪','󠄫'=>'󠄫','󠄬'=>'󠄬','󠄭'=>'󠄭','󠄮'=>'󠄮','󠄯'=>'󠄯','󠄰'=>'󠄰','󠄱'=>'󠄱','󠄲'=>'󠄲','󠄳'=>'󠄳','󠄴'=>'󠄴','󠄵'=>'󠄵','󠄶'=>'󠄶','󠄷'=>'󠄷','󠄸'=>'󠄸','󠄹'=>'󠄹','󠄺'=>'󠄺','󠄻'=>'󠄻','󠄼'=>'󠄼','󠄽'=>'󠄽','󠄾'=>'󠄾','󠄿'=>'󠄿','󠅀'=>'󠅀','󠅁'=>'󠅁','󠅂'=>'󠅂','󠅃'=>'󠅃','󠅄'=>'󠅄','󠅅'=>'󠅅','󠅆'=>'󠅆','󠅇'=>'󠅇','󠅈'=>'󠅈','󠅉'=>'󠅉','󠅊'=>'󠅊','󠅋'=>'󠅋','󠅌'=>'󠅌','󠅍'=>'󠅍','󠅎'=>'󠅎','󠅏'=>'󠅏','󠅐'=>'󠅐','󠅑'=>'󠅑','󠅒'=>'󠅒','󠅓'=>'󠅓','󠅔'=>'󠅔','󠅕'=>'󠅕','󠅖'=>'󠅖','󠅗'=>'󠅗','󠅘'=>'󠅘','󠅙'=>'󠅙','󠅚'=>'󠅚','󠅛'=>'󠅛','󠅜'=>'󠅜','󠅝'=>'󠅝','󠅞'=>'󠅞','󠅟'=>'󠅟','󠅠'=>'󠅠','󠅡'=>'󠅡','󠅢'=>'󠅢','󠅣'=>'󠅣','󠅤'=>'󠅤','󠅥'=>'󠅥','󠅦'=>'󠅦','󠅧'=>'󠅧','󠅨'=>'󠅨','󠅩'=>'󠅩','󠅪'=>'󠅪','󠅫'=>'󠅫','󠅬'=>'󠅬','󠅭'=>'󠅭','󠅮'=>'󠅮','󠅯'=>'󠅯','󠅰'=>'󠅰','󠅱'=>'󠅱','󠅲'=>'󠅲','󠅳'=>'󠅳','󠅴'=>'󠅴','󠅵'=>'󠅵','󠅶'=>'󠅶','󠅷'=>'󠅷','󠅸'=>'󠅸','󠅹'=>'󠅹','󠅺'=>'󠅺','󠅻'=>'󠅻','󠅼'=>'󠅼','󠅽'=>'󠅽','󠅾'=>'󠅾','󠅿'=>'󠅿','󠆀'=>'󠆀','󠆁'=>'󠆁','󠆂'=>'󠆂','󠆃'=>'󠆃','󠆄'=>'󠆄','󠆅'=>'󠆅','󠆆'=>'󠆆','󠆇'=>'󠆇','󠆈'=>'󠆈','󠆉'=>'󠆉','󠆊'=>'󠆊','󠆋'=>'󠆋','󠆌'=>'󠆌','󠆍'=>'󠆍','󠆎'=>'󠆎','󠆏'=>'󠆏','󠆐'=>'󠆐','󠆑'=>'󠆑','󠆒'=>'󠆒','󠆓'=>'󠆓','󠆔'=>'󠆔','󠆕'=>'󠆕','󠆖'=>'󠆖','󠆗'=>'󠆗','󠆘'=>'󠆘','󠆙'=>'󠆙','󠆚'=>'󠆚','󠆛'=>'󠆛','󠆜'=>'󠆜','󠆝'=>'󠆝','󠆞'=>'󠆞','󠆟'=>'󠆟','󠆠'=>'󠆠','󠆡'=>'󠆡','󠆢'=>'󠆢','󠆣'=>'󠆣','󠆤'=>'󠆤','󠆥'=>'󠆥','󠆦'=>'󠆦','󠆧'=>'󠆧','󠆨'=>'󠆨','󠆩'=>'󠆩','󠆪'=>'󠆪','󠆫'=>'󠆫','󠆬'=>'󠆬','󠆭'=>'󠆭','󠆮'=>'󠆮','󠆯'=>'󠆯','󠆰'=>'󠆰','󠆱'=>'󠆱','󠆲'=>'󠆲','󠆳'=>'󠆳','󠆴'=>'󠆴','󠆵'=>'󠆵','󠆶'=>'󠆶','󠆷'=>'󠆷','󠆸'=>'󠆸','󠆹'=>'󠆹','󠆺'=>'󠆺','󠆻'=>'󠆻','󠆼'=>'󠆼','󠆽'=>'󠆽','󠆾'=>'󠆾','󠆿'=>'󠆿','󠇀'=>'󠇀','󠇁'=>'󠇁','󠇂'=>'󠇂','󠇃'=>'󠇃','󠇄'=>'󠇄','󠇅'=>'󠇅','󠇆'=>'󠇆','󠇇'=>'󠇇','󠇈'=>'󠇈','󠇉'=>'󠇉','󠇊'=>'󠇊','󠇋'=>'󠇋','󠇌'=>'󠇌','󠇍'=>'󠇍','󠇎'=>'󠇎','󠇏'=>'󠇏','󠇐'=>'󠇐','󠇑'=>'󠇑','󠇒'=>'󠇒','󠇓'=>'󠇓','󠇔'=>'󠇔','󠇕'=>'󠇕','󠇖'=>'󠇖','󠇗'=>'󠇗','󠇘'=>'󠇘','󠇙'=>'󠇙','󠇚'=>'󠇚','󠇛'=>'󠇛','󠇜'=>'󠇜','󠇝'=>'󠇝','󠇞'=>'󠇞','󠇟'=>'󠇟','󠇠'=>'󠇠','󠇡'=>'󠇡','󠇢'=>'󠇢','󠇣'=>'󠇣','󠇤'=>'󠇤','󠇥'=>'󠇥','󠇦'=>'󠇦','󠇧'=>'󠇧','󠇨'=>'󠇨','󠇩'=>'󠇩','󠇪'=>'󠇪','󠇫'=>'󠇫','󠇬'=>'󠇬','󠇭'=>'󠇭','󠇮'=>'󠇮','󠇯'=>'󠇯'); \ No newline at end of file
+<?php return array('󠄀'=>'󠄀','󠄁'=>'󠄁','󠄂'=>'󠄂','󠄃'=>'󠄃','󠄄'=>'󠄄','󠄅'=>'󠄅','󠄆'=>'󠄆','󠄇'=>'󠄇','󠄈'=>'󠄈','󠄉'=>'󠄉','󠄊'=>'󠄊','󠄋'=>'󠄋','󠄌'=>'󠄌','󠄍'=>'󠄍','󠄎'=>'󠄎','󠄏'=>'󠄏','󠄐'=>'󠄐','󠄑'=>'󠄑','󠄒'=>'󠄒','󠄓'=>'󠄓','󠄔'=>'󠄔','󠄕'=>'󠄕','󠄖'=>'󠄖','󠄗'=>'󠄗','󠄘'=>'󠄘','󠄙'=>'󠄙','󠄚'=>'󠄚','󠄛'=>'󠄛','󠄜'=>'󠄜','󠄝'=>'󠄝','󠄞'=>'󠄞','󠄟'=>'󠄟','󠄠'=>'󠄠','󠄡'=>'󠄡','󠄢'=>'󠄢','󠄣'=>'󠄣','󠄤'=>'󠄤','󠄥'=>'󠄥','󠄦'=>'󠄦','󠄧'=>'󠄧','󠄨'=>'󠄨','󠄩'=>'󠄩','󠄪'=>'󠄪','󠄫'=>'󠄫','󠄬'=>'󠄬','󠄭'=>'󠄭','󠄮'=>'󠄮','󠄯'=>'󠄯','󠄰'=>'󠄰','󠄱'=>'󠄱','󠄲'=>'󠄲','󠄳'=>'󠄳','󠄴'=>'󠄴','󠄵'=>'󠄵','󠄶'=>'󠄶','󠄷'=>'󠄷','󠄸'=>'󠄸','󠄹'=>'󠄹','󠄺'=>'󠄺','󠄻'=>'󠄻','󠄼'=>'󠄼','󠄽'=>'󠄽','󠄾'=>'󠄾','󠄿'=>'󠄿','󠅀'=>'󠅀','󠅁'=>'󠅁','󠅂'=>'󠅂','󠅃'=>'󠅃','󠅄'=>'󠅄','󠅅'=>'󠅅','󠅆'=>'󠅆','󠅇'=>'󠅇','󠅈'=>'󠅈','󠅉'=>'󠅉','󠅊'=>'󠅊','󠅋'=>'󠅋','󠅌'=>'󠅌','󠅍'=>'󠅍','󠅎'=>'󠅎','󠅏'=>'󠅏','󠅐'=>'󠅐','󠅑'=>'󠅑','󠅒'=>'󠅒','󠅓'=>'󠅓','󠅔'=>'󠅔','󠅕'=>'󠅕','󠅖'=>'󠅖','󠅗'=>'󠅗','󠅘'=>'󠅘','󠅙'=>'󠅙','󠅚'=>'󠅚','󠅛'=>'󠅛','󠅜'=>'󠅜','󠅝'=>'󠅝','󠅞'=>'󠅞','󠅟'=>'󠅟','󠅠'=>'󠅠','󠅡'=>'󠅡','󠅢'=>'󠅢','󠅣'=>'󠅣','󠅤'=>'󠅤','󠅥'=>'󠅥','󠅦'=>'󠅦','󠅧'=>'󠅧','󠅨'=>'󠅨','󠅩'=>'󠅩','󠅪'=>'󠅪','󠅫'=>'󠅫','󠅬'=>'󠅬','󠅭'=>'󠅭','󠅮'=>'󠅮','󠅯'=>'󠅯','󠅰'=>'󠅰','󠅱'=>'󠅱','󠅲'=>'󠅲','󠅳'=>'󠅳','󠅴'=>'󠅴','󠅵'=>'󠅵','󠅶'=>'󠅶','󠅷'=>'󠅷','󠅸'=>'󠅸','󠅹'=>'󠅹','󠅺'=>'󠅺','󠅻'=>'󠅻','󠅼'=>'󠅼','󠅽'=>'󠅽','󠅾'=>'󠅾','󠅿'=>'󠅿','󠆀'=>'󠆀','󠆁'=>'󠆁','󠆂'=>'󠆂','󠆃'=>'󠆃','󠆄'=>'󠆄','󠆅'=>'󠆅','󠆆'=>'󠆆','󠆇'=>'󠆇','󠆈'=>'󠆈','󠆉'=>'󠆉','󠆊'=>'󠆊','󠆋'=>'󠆋','󠆌'=>'󠆌','󠆍'=>'󠆍','󠆎'=>'󠆎','󠆏'=>'󠆏','󠆐'=>'󠆐','󠆑'=>'󠆑','󠆒'=>'󠆒','󠆓'=>'󠆓','󠆔'=>'󠆔','󠆕'=>'󠆕','󠆖'=>'󠆖','󠆗'=>'󠆗','󠆘'=>'󠆘','󠆙'=>'󠆙','󠆚'=>'󠆚','󠆛'=>'󠆛','󠆜'=>'󠆜','󠆝'=>'󠆝','󠆞'=>'󠆞','󠆟'=>'󠆟','󠆠'=>'󠆠','󠆡'=>'󠆡','󠆢'=>'󠆢','󠆣'=>'󠆣','󠆤'=>'󠆤','󠆥'=>'󠆥','󠆦'=>'󠆦','󠆧'=>'󠆧','󠆨'=>'󠆨','󠆩'=>'󠆩','󠆪'=>'󠆪','󠆫'=>'󠆫','󠆬'=>'󠆬','󠆭'=>'󠆭','󠆮'=>'󠆮','󠆯'=>'󠆯','󠆰'=>'󠆰','󠆱'=>'󠆱','󠆲'=>'󠆲','󠆳'=>'󠆳','󠆴'=>'󠆴','󠆵'=>'󠆵','󠆶'=>'󠆶','󠆷'=>'󠆷','󠆸'=>'󠆸','󠆹'=>'󠆹','󠆺'=>'󠆺','󠆻'=>'󠆻','󠆼'=>'󠆼','󠆽'=>'󠆽','󠆾'=>'󠆾','󠆿'=>'󠆿','󠇀'=>'󠇀','󠇁'=>'󠇁','󠇂'=>'󠇂','󠇃'=>'󠇃','󠇄'=>'󠇄','󠇅'=>'󠇅','󠇆'=>'󠇆','󠇇'=>'󠇇','󠇈'=>'󠇈','󠇉'=>'󠇉','󠇊'=>'󠇊','󠇋'=>'󠇋','󠇌'=>'󠇌','󠇍'=>'󠇍','󠇎'=>'󠇎','󠇏'=>'󠇏','󠇐'=>'󠇐','󠇑'=>'󠇑','󠇒'=>'󠇒','󠇓'=>'󠇓','󠇔'=>'󠇔','󠇕'=>'󠇕','󠇖'=>'󠇖','󠇗'=>'󠇗','󠇘'=>'󠇘','󠇙'=>'󠇙','󠇚'=>'󠇚','󠇛'=>'󠇛','󠇜'=>'󠇜','󠇝'=>'󠇝','󠇞'=>'󠇞','󠇟'=>'󠇟','󠇠'=>'󠇠','󠇡'=>'󠇡','󠇢'=>'󠇢','󠇣'=>'󠇣','󠇤'=>'󠇤','󠇥'=>'󠇥','󠇦'=>'󠇦','󠇧'=>'󠇧','󠇨'=>'󠇨','󠇩'=>'󠇩','󠇪'=>'󠇪','󠇫'=>'󠇫','󠇬'=>'󠇬','󠇭'=>'󠇭','󠇮'=>'󠇮','󠇯'=>'󠇯');
diff --git a/phpBB/includes/utf/data/search_indexer_5.php b/phpBB/includes/utf/data/search_indexer_5.php
index 0f1228a394..cef8fe91fc 100644
--- a/phpBB/includes/utf/data/search_indexer_5.php
+++ b/phpBB/includes/utf/data/search_indexer_5.php
@@ -1 +1 @@
-<?php return array('Ⰰ'=>'ⰰ','Ⰱ'=>'ⰱ','Ⰲ'=>'ⰲ','Ⰳ'=>'ⰳ','Ⰴ'=>'ⰴ','Ⰵ'=>'ⰵ','Ⰶ'=>'ⰶ','Ⰷ'=>'ⰷ','Ⰸ'=>'ⰸ','Ⰹ'=>'ⰹ','Ⰺ'=>'ⰺ','Ⰻ'=>'ⰻ','Ⰼ'=>'ⰼ','Ⰽ'=>'ⰽ','Ⰾ'=>'ⰾ','Ⰿ'=>'ⰿ','Ⱀ'=>'ⱀ','Ⱁ'=>'ⱁ','Ⱂ'=>'ⱂ','Ⱃ'=>'ⱃ','Ⱄ'=>'ⱄ','Ⱅ'=>'ⱅ','Ⱆ'=>'ⱆ','Ⱇ'=>'ⱇ','Ⱈ'=>'ⱈ','Ⱉ'=>'ⱉ','Ⱊ'=>'ⱊ','Ⱋ'=>'ⱋ','Ⱌ'=>'ⱌ','Ⱍ'=>'ⱍ','Ⱎ'=>'ⱎ','Ⱏ'=>'ⱏ','Ⱐ'=>'ⱐ','Ⱑ'=>'ⱑ','Ⱒ'=>'ⱒ','Ⱓ'=>'ⱓ','Ⱔ'=>'ⱔ','Ⱕ'=>'ⱕ','Ⱖ'=>'ⱖ','Ⱗ'=>'ⱗ','Ⱘ'=>'ⱘ','Ⱙ'=>'ⱙ','Ⱚ'=>'ⱚ','Ⱛ'=>'ⱛ','Ⱜ'=>'ⱜ','Ⱝ'=>'ⱝ','Ⱞ'=>'ⱞ','ⰰ'=>'ⰰ','ⰱ'=>'ⰱ','ⰲ'=>'ⰲ','ⰳ'=>'ⰳ','ⰴ'=>'ⰴ','ⰵ'=>'ⰵ','ⰶ'=>'ⰶ','ⰷ'=>'ⰷ','ⰸ'=>'ⰸ','ⰹ'=>'ⰹ','ⰺ'=>'ⰺ','ⰻ'=>'ⰻ','ⰼ'=>'ⰼ','ⰽ'=>'ⰽ','ⰾ'=>'ⰾ','ⰿ'=>'ⰿ','ⱀ'=>'ⱀ','ⱁ'=>'ⱁ','ⱂ'=>'ⱂ','ⱃ'=>'ⱃ','ⱄ'=>'ⱄ','ⱅ'=>'ⱅ','ⱆ'=>'ⱆ','ⱇ'=>'ⱇ','ⱈ'=>'ⱈ','ⱉ'=>'ⱉ','ⱊ'=>'ⱊ','ⱋ'=>'ⱋ','ⱌ'=>'ⱌ','ⱍ'=>'ⱍ','ⱎ'=>'ⱎ','ⱏ'=>'ⱏ','ⱐ'=>'ⱐ','ⱑ'=>'ⱑ','ⱒ'=>'ⱒ','ⱓ'=>'ⱓ','ⱔ'=>'ⱔ','ⱕ'=>'ⱕ','ⱖ'=>'ⱖ','ⱗ'=>'ⱗ','ⱘ'=>'ⱘ','ⱙ'=>'ⱙ','ⱚ'=>'ⱚ','ⱛ'=>'ⱛ','ⱜ'=>'ⱜ','ⱝ'=>'ⱝ','ⱞ'=>'ⱞ','Ⱡ'=>'ⱡ','ⱡ'=>'ⱡ','Ɫ'=>'ɫ','Ᵽ'=>'ᵽ','Ɽ'=>'ɽ','ⱥ'=>'ⱥ','ⱦ'=>'ⱦ','Ⱨ'=>'ⱨ','ⱨ'=>'ⱨ','Ⱪ'=>'ⱪ','ⱪ'=>'ⱪ','Ⱬ'=>'ⱬ','ⱬ'=>'ⱬ','ⱴ'=>'ⱴ','Ⱶ'=>'ⱶ','ⱶ'=>'ⱶ','ⱷ'=>'ⱷ','Ⲁ'=>'ⲁ','ⲁ'=>'ⲁ','Ⲃ'=>'ⲃ','ⲃ'=>'ⲃ','Ⲅ'=>'ⲅ','ⲅ'=>'ⲅ','Ⲇ'=>'ⲇ','ⲇ'=>'ⲇ','Ⲉ'=>'ⲉ','ⲉ'=>'ⲉ','Ⲋ'=>'ⲋ','ⲋ'=>'ⲋ','Ⲍ'=>'ⲍ','ⲍ'=>'ⲍ','Ⲏ'=>'ⲏ','ⲏ'=>'ⲏ','Ⲑ'=>'ⲑ','ⲑ'=>'ⲑ','Ⲓ'=>'ⲓ','ⲓ'=>'ⲓ','Ⲕ'=>'ⲕ','ⲕ'=>'ⲕ','Ⲗ'=>'ⲗ','ⲗ'=>'ⲗ','Ⲙ'=>'ⲙ','ⲙ'=>'ⲙ','Ⲛ'=>'ⲛ','ⲛ'=>'ⲛ','Ⲝ'=>'ⲝ','ⲝ'=>'ⲝ','Ⲟ'=>'ⲟ','ⲟ'=>'ⲟ','Ⲡ'=>'ⲡ','ⲡ'=>'ⲡ','Ⲣ'=>'ⲣ','ⲣ'=>'ⲣ','Ⲥ'=>'ⲥ','ⲥ'=>'ⲥ','Ⲧ'=>'ⲧ','ⲧ'=>'ⲧ','Ⲩ'=>'ⲩ','ⲩ'=>'ⲩ','Ⲫ'=>'ⲫ','ⲫ'=>'ⲫ','Ⲭ'=>'ⲭ','ⲭ'=>'ⲭ','Ⲯ'=>'ⲯ','ⲯ'=>'ⲯ','Ⲱ'=>'ⲱ','ⲱ'=>'ⲱ','Ⲳ'=>'ⲳ','ⲳ'=>'ⲳ','Ⲵ'=>'ⲵ','ⲵ'=>'ⲵ','Ⲷ'=>'ⲷ','ⲷ'=>'ⲷ','Ⲹ'=>'ⲹ','ⲹ'=>'ⲹ','Ⲻ'=>'ⲻ','ⲻ'=>'ⲻ','Ⲽ'=>'ⲽ','ⲽ'=>'ⲽ','Ⲿ'=>'ⲿ','ⲿ'=>'ⲿ','Ⳁ'=>'ⳁ','ⳁ'=>'ⳁ','Ⳃ'=>'ⳃ','ⳃ'=>'ⳃ','Ⳅ'=>'ⳅ','ⳅ'=>'ⳅ','Ⳇ'=>'ⳇ','ⳇ'=>'ⳇ','Ⳉ'=>'ⳉ','ⳉ'=>'ⳉ','Ⳋ'=>'ⳋ','ⳋ'=>'ⳋ','Ⳍ'=>'ⳍ','ⳍ'=>'ⳍ','Ⳏ'=>'ⳏ','ⳏ'=>'ⳏ','Ⳑ'=>'ⳑ','ⳑ'=>'ⳑ','Ⳓ'=>'ⳓ','ⳓ'=>'ⳓ','Ⳕ'=>'ⳕ','ⳕ'=>'ⳕ','Ⳗ'=>'ⳗ','ⳗ'=>'ⳗ','Ⳙ'=>'ⳙ','ⳙ'=>'ⳙ','Ⳛ'=>'ⳛ','ⳛ'=>'ⳛ','Ⳝ'=>'ⳝ','ⳝ'=>'ⳝ','Ⳟ'=>'ⳟ','ⳟ'=>'ⳟ','Ⳡ'=>'ⳡ','ⳡ'=>'ⳡ','Ⳣ'=>'ⳣ','ⳣ'=>'ⳣ','ⳤ'=>'ⳤ','⳽'=>'1/2','ⴀ'=>'ⴀ','ⴁ'=>'ⴁ','ⴂ'=>'ⴂ','ⴃ'=>'ⴃ','ⴄ'=>'ⴄ','ⴅ'=>'ⴅ','ⴆ'=>'ⴆ','ⴇ'=>'ⴇ','ⴈ'=>'ⴈ','ⴉ'=>'ⴉ','ⴊ'=>'ⴊ','ⴋ'=>'ⴋ','ⴌ'=>'ⴌ','ⴍ'=>'ⴍ','ⴎ'=>'ⴎ','ⴏ'=>'ⴏ','ⴐ'=>'ⴐ','ⴑ'=>'ⴑ','ⴒ'=>'ⴒ','ⴓ'=>'ⴓ','ⴔ'=>'ⴔ','ⴕ'=>'ⴕ','ⴖ'=>'ⴖ','ⴗ'=>'ⴗ','ⴘ'=>'ⴘ','ⴙ'=>'ⴙ','ⴚ'=>'ⴚ','ⴛ'=>'ⴛ','ⴜ'=>'ⴜ','ⴝ'=>'ⴝ','ⴞ'=>'ⴞ','ⴟ'=>'ⴟ','ⴠ'=>'ⴠ','ⴡ'=>'ⴡ','ⴢ'=>'ⴢ','ⴣ'=>'ⴣ','ⴤ'=>'ⴤ','ⴥ'=>'ⴥ','ⴰ'=>'ⴰ','ⴱ'=>'ⴱ','ⴲ'=>'ⴲ','ⴳ'=>'ⴳ','ⴴ'=>'ⴴ','ⴵ'=>'ⴵ','ⴶ'=>'ⴶ','ⴷ'=>'ⴷ','ⴸ'=>'ⴸ','ⴹ'=>'ⴹ','ⴺ'=>'ⴺ','ⴻ'=>'ⴻ','ⴼ'=>'ⴼ','ⴽ'=>'ⴽ','ⴾ'=>'ⴾ','ⴿ'=>'ⴿ','ⵀ'=>'ⵀ','ⵁ'=>'ⵁ','ⵂ'=>'ⵂ','ⵃ'=>'ⵃ','ⵄ'=>'ⵄ','ⵅ'=>'ⵅ','ⵆ'=>'ⵆ','ⵇ'=>'ⵇ','ⵈ'=>'ⵈ','ⵉ'=>'ⵉ','ⵊ'=>'ⵊ','ⵋ'=>'ⵋ','ⵌ'=>'ⵌ','ⵍ'=>'ⵍ','ⵎ'=>'ⵎ','ⵏ'=>'ⵏ','ⵐ'=>'ⵐ','ⵑ'=>'ⵑ','ⵒ'=>'ⵒ','ⵓ'=>'ⵓ','ⵔ'=>'ⵔ','ⵕ'=>'ⵕ','ⵖ'=>'ⵖ','ⵗ'=>'ⵗ','ⵘ'=>'ⵘ','ⵙ'=>'ⵙ','ⵚ'=>'ⵚ','ⵛ'=>'ⵛ','ⵜ'=>'ⵜ','ⵝ'=>'ⵝ','ⵞ'=>'ⵞ','ⵟ'=>'ⵟ','ⵠ'=>'ⵠ','ⵡ'=>'ⵡ','ⵢ'=>'ⵢ','ⵣ'=>'ⵣ','ⵤ'=>'ⵤ','ⵥ'=>'ⵥ','ⵯ'=>'ⵯ','ⶀ'=>'ⶀ','ⶁ'=>'ⶁ','ⶂ'=>'ⶂ','ⶃ'=>'ⶃ','ⶄ'=>'ⶄ','ⶅ'=>'ⶅ','ⶆ'=>'ⶆ','ⶇ'=>'ⶇ','ⶈ'=>'ⶈ','ⶉ'=>'ⶉ','ⶊ'=>'ⶊ','ⶋ'=>'ⶋ','ⶌ'=>'ⶌ','ⶍ'=>'ⶍ','ⶎ'=>'ⶎ','ⶏ'=>'ⶏ','ⶐ'=>'ⶐ','ⶑ'=>'ⶑ','ⶒ'=>'ⶒ','ⶓ'=>'ⶓ','ⶔ'=>'ⶔ','ⶕ'=>'ⶕ','ⶖ'=>'ⶖ','ⶠ'=>'ⶠ','ⶡ'=>'ⶡ','ⶢ'=>'ⶢ','ⶣ'=>'ⶣ','ⶤ'=>'ⶤ','ⶥ'=>'ⶥ','ⶦ'=>'ⶦ','ⶨ'=>'ⶨ','ⶩ'=>'ⶩ','ⶪ'=>'ⶪ','ⶫ'=>'ⶫ','ⶬ'=>'ⶬ','ⶭ'=>'ⶭ','ⶮ'=>'ⶮ','ⶰ'=>'ⶰ','ⶱ'=>'ⶱ','ⶲ'=>'ⶲ','ⶳ'=>'ⶳ','ⶴ'=>'ⶴ','ⶵ'=>'ⶵ','ⶶ'=>'ⶶ','ⶸ'=>'ⶸ','ⶹ'=>'ⶹ','ⶺ'=>'ⶺ','ⶻ'=>'ⶻ','ⶼ'=>'ⶼ','ⶽ'=>'ⶽ','ⶾ'=>'ⶾ','ⷀ'=>'ⷀ','ⷁ'=>'ⷁ','ⷂ'=>'ⷂ','ⷃ'=>'ⷃ','ⷄ'=>'ⷄ','ⷅ'=>'ⷅ','ⷆ'=>'ⷆ','ⷈ'=>'ⷈ','ⷉ'=>'ⷉ','ⷊ'=>'ⷊ','ⷋ'=>'ⷋ','ⷌ'=>'ⷌ','ⷍ'=>'ⷍ','ⷎ'=>'ⷎ','ⷐ'=>'ⷐ','ⷑ'=>'ⷑ','ⷒ'=>'ⷒ','ⷓ'=>'ⷓ','ⷔ'=>'ⷔ','ⷕ'=>'ⷕ','ⷖ'=>'ⷖ','ⷘ'=>'ⷘ','ⷙ'=>'ⷙ','ⷚ'=>'ⷚ','ⷛ'=>'ⷛ','ⷜ'=>'ⷜ','ⷝ'=>'ⷝ','ⷞ'=>'ⷞ'); \ No newline at end of file
+<?php return array('Ⰰ'=>'ⰰ','Ⰱ'=>'ⰱ','Ⰲ'=>'ⰲ','Ⰳ'=>'ⰳ','Ⰴ'=>'ⰴ','Ⰵ'=>'ⰵ','Ⰶ'=>'ⰶ','Ⰷ'=>'ⰷ','Ⰸ'=>'ⰸ','Ⰹ'=>'ⰹ','Ⰺ'=>'ⰺ','Ⰻ'=>'ⰻ','Ⰼ'=>'ⰼ','Ⰽ'=>'ⰽ','Ⰾ'=>'ⰾ','Ⰿ'=>'ⰿ','Ⱀ'=>'ⱀ','Ⱁ'=>'ⱁ','Ⱂ'=>'ⱂ','Ⱃ'=>'ⱃ','Ⱄ'=>'ⱄ','Ⱅ'=>'ⱅ','Ⱆ'=>'ⱆ','Ⱇ'=>'ⱇ','Ⱈ'=>'ⱈ','Ⱉ'=>'ⱉ','Ⱊ'=>'ⱊ','Ⱋ'=>'ⱋ','Ⱌ'=>'ⱌ','Ⱍ'=>'ⱍ','Ⱎ'=>'ⱎ','Ⱏ'=>'ⱏ','Ⱐ'=>'ⱐ','Ⱑ'=>'ⱑ','Ⱒ'=>'ⱒ','Ⱓ'=>'ⱓ','Ⱔ'=>'ⱔ','Ⱕ'=>'ⱕ','Ⱖ'=>'ⱖ','Ⱗ'=>'ⱗ','Ⱘ'=>'ⱘ','Ⱙ'=>'ⱙ','Ⱚ'=>'ⱚ','Ⱛ'=>'ⱛ','Ⱜ'=>'ⱜ','Ⱝ'=>'ⱝ','Ⱞ'=>'ⱞ','ⰰ'=>'ⰰ','ⰱ'=>'ⰱ','ⰲ'=>'ⰲ','ⰳ'=>'ⰳ','ⰴ'=>'ⰴ','ⰵ'=>'ⰵ','ⰶ'=>'ⰶ','ⰷ'=>'ⰷ','ⰸ'=>'ⰸ','ⰹ'=>'ⰹ','ⰺ'=>'ⰺ','ⰻ'=>'ⰻ','ⰼ'=>'ⰼ','ⰽ'=>'ⰽ','ⰾ'=>'ⰾ','ⰿ'=>'ⰿ','ⱀ'=>'ⱀ','ⱁ'=>'ⱁ','ⱂ'=>'ⱂ','ⱃ'=>'ⱃ','ⱄ'=>'ⱄ','ⱅ'=>'ⱅ','ⱆ'=>'ⱆ','ⱇ'=>'ⱇ','ⱈ'=>'ⱈ','ⱉ'=>'ⱉ','ⱊ'=>'ⱊ','ⱋ'=>'ⱋ','ⱌ'=>'ⱌ','ⱍ'=>'ⱍ','ⱎ'=>'ⱎ','ⱏ'=>'ⱏ','ⱐ'=>'ⱐ','ⱑ'=>'ⱑ','ⱒ'=>'ⱒ','ⱓ'=>'ⱓ','ⱔ'=>'ⱔ','ⱕ'=>'ⱕ','ⱖ'=>'ⱖ','ⱗ'=>'ⱗ','ⱘ'=>'ⱘ','ⱙ'=>'ⱙ','ⱚ'=>'ⱚ','ⱛ'=>'ⱛ','ⱜ'=>'ⱜ','ⱝ'=>'ⱝ','ⱞ'=>'ⱞ','Ⱡ'=>'ⱡ','ⱡ'=>'ⱡ','Ɫ'=>'ɫ','Ᵽ'=>'ᵽ','Ɽ'=>'ɽ','ⱥ'=>'ⱥ','ⱦ'=>'ⱦ','Ⱨ'=>'ⱨ','ⱨ'=>'ⱨ','Ⱪ'=>'ⱪ','ⱪ'=>'ⱪ','Ⱬ'=>'ⱬ','ⱬ'=>'ⱬ','ⱴ'=>'ⱴ','Ⱶ'=>'ⱶ','ⱶ'=>'ⱶ','ⱷ'=>'ⱷ','Ⲁ'=>'ⲁ','ⲁ'=>'ⲁ','Ⲃ'=>'ⲃ','ⲃ'=>'ⲃ','Ⲅ'=>'ⲅ','ⲅ'=>'ⲅ','Ⲇ'=>'ⲇ','ⲇ'=>'ⲇ','Ⲉ'=>'ⲉ','ⲉ'=>'ⲉ','Ⲋ'=>'ⲋ','ⲋ'=>'ⲋ','Ⲍ'=>'ⲍ','ⲍ'=>'ⲍ','Ⲏ'=>'ⲏ','ⲏ'=>'ⲏ','Ⲑ'=>'ⲑ','ⲑ'=>'ⲑ','Ⲓ'=>'ⲓ','ⲓ'=>'ⲓ','Ⲕ'=>'ⲕ','ⲕ'=>'ⲕ','Ⲗ'=>'ⲗ','ⲗ'=>'ⲗ','Ⲙ'=>'ⲙ','ⲙ'=>'ⲙ','Ⲛ'=>'ⲛ','ⲛ'=>'ⲛ','Ⲝ'=>'ⲝ','ⲝ'=>'ⲝ','Ⲟ'=>'ⲟ','ⲟ'=>'ⲟ','Ⲡ'=>'ⲡ','ⲡ'=>'ⲡ','Ⲣ'=>'ⲣ','ⲣ'=>'ⲣ','Ⲥ'=>'ⲥ','ⲥ'=>'ⲥ','Ⲧ'=>'ⲧ','ⲧ'=>'ⲧ','Ⲩ'=>'ⲩ','ⲩ'=>'ⲩ','Ⲫ'=>'ⲫ','ⲫ'=>'ⲫ','Ⲭ'=>'ⲭ','ⲭ'=>'ⲭ','Ⲯ'=>'ⲯ','ⲯ'=>'ⲯ','Ⲱ'=>'ⲱ','ⲱ'=>'ⲱ','Ⲳ'=>'ⲳ','ⲳ'=>'ⲳ','Ⲵ'=>'ⲵ','ⲵ'=>'ⲵ','Ⲷ'=>'ⲷ','ⲷ'=>'ⲷ','Ⲹ'=>'ⲹ','ⲹ'=>'ⲹ','Ⲻ'=>'ⲻ','ⲻ'=>'ⲻ','Ⲽ'=>'ⲽ','ⲽ'=>'ⲽ','Ⲿ'=>'ⲿ','ⲿ'=>'ⲿ','Ⳁ'=>'ⳁ','ⳁ'=>'ⳁ','Ⳃ'=>'ⳃ','ⳃ'=>'ⳃ','Ⳅ'=>'ⳅ','ⳅ'=>'ⳅ','Ⳇ'=>'ⳇ','ⳇ'=>'ⳇ','Ⳉ'=>'ⳉ','ⳉ'=>'ⳉ','Ⳋ'=>'ⳋ','ⳋ'=>'ⳋ','Ⳍ'=>'ⳍ','ⳍ'=>'ⳍ','Ⳏ'=>'ⳏ','ⳏ'=>'ⳏ','Ⳑ'=>'ⳑ','ⳑ'=>'ⳑ','Ⳓ'=>'ⳓ','ⳓ'=>'ⳓ','Ⳕ'=>'ⳕ','ⳕ'=>'ⳕ','Ⳗ'=>'ⳗ','ⳗ'=>'ⳗ','Ⳙ'=>'ⳙ','ⳙ'=>'ⳙ','Ⳛ'=>'ⳛ','ⳛ'=>'ⳛ','Ⳝ'=>'ⳝ','ⳝ'=>'ⳝ','Ⳟ'=>'ⳟ','ⳟ'=>'ⳟ','Ⳡ'=>'ⳡ','ⳡ'=>'ⳡ','Ⳣ'=>'ⳣ','ⳣ'=>'ⳣ','ⳤ'=>'ⳤ','⳽'=>'1/2','ⴀ'=>'ⴀ','ⴁ'=>'ⴁ','ⴂ'=>'ⴂ','ⴃ'=>'ⴃ','ⴄ'=>'ⴄ','ⴅ'=>'ⴅ','ⴆ'=>'ⴆ','ⴇ'=>'ⴇ','ⴈ'=>'ⴈ','ⴉ'=>'ⴉ','ⴊ'=>'ⴊ','ⴋ'=>'ⴋ','ⴌ'=>'ⴌ','ⴍ'=>'ⴍ','ⴎ'=>'ⴎ','ⴏ'=>'ⴏ','ⴐ'=>'ⴐ','ⴑ'=>'ⴑ','ⴒ'=>'ⴒ','ⴓ'=>'ⴓ','ⴔ'=>'ⴔ','ⴕ'=>'ⴕ','ⴖ'=>'ⴖ','ⴗ'=>'ⴗ','ⴘ'=>'ⴘ','ⴙ'=>'ⴙ','ⴚ'=>'ⴚ','ⴛ'=>'ⴛ','ⴜ'=>'ⴜ','ⴝ'=>'ⴝ','ⴞ'=>'ⴞ','ⴟ'=>'ⴟ','ⴠ'=>'ⴠ','ⴡ'=>'ⴡ','ⴢ'=>'ⴢ','ⴣ'=>'ⴣ','ⴤ'=>'ⴤ','ⴥ'=>'ⴥ','ⴰ'=>'ⴰ','ⴱ'=>'ⴱ','ⴲ'=>'ⴲ','ⴳ'=>'ⴳ','ⴴ'=>'ⴴ','ⴵ'=>'ⴵ','ⴶ'=>'ⴶ','ⴷ'=>'ⴷ','ⴸ'=>'ⴸ','ⴹ'=>'ⴹ','ⴺ'=>'ⴺ','ⴻ'=>'ⴻ','ⴼ'=>'ⴼ','ⴽ'=>'ⴽ','ⴾ'=>'ⴾ','ⴿ'=>'ⴿ','ⵀ'=>'ⵀ','ⵁ'=>'ⵁ','ⵂ'=>'ⵂ','ⵃ'=>'ⵃ','ⵄ'=>'ⵄ','ⵅ'=>'ⵅ','ⵆ'=>'ⵆ','ⵇ'=>'ⵇ','ⵈ'=>'ⵈ','ⵉ'=>'ⵉ','ⵊ'=>'ⵊ','ⵋ'=>'ⵋ','ⵌ'=>'ⵌ','ⵍ'=>'ⵍ','ⵎ'=>'ⵎ','ⵏ'=>'ⵏ','ⵐ'=>'ⵐ','ⵑ'=>'ⵑ','ⵒ'=>'ⵒ','ⵓ'=>'ⵓ','ⵔ'=>'ⵔ','ⵕ'=>'ⵕ','ⵖ'=>'ⵖ','ⵗ'=>'ⵗ','ⵘ'=>'ⵘ','ⵙ'=>'ⵙ','ⵚ'=>'ⵚ','ⵛ'=>'ⵛ','ⵜ'=>'ⵜ','ⵝ'=>'ⵝ','ⵞ'=>'ⵞ','ⵟ'=>'ⵟ','ⵠ'=>'ⵠ','ⵡ'=>'ⵡ','ⵢ'=>'ⵢ','ⵣ'=>'ⵣ','ⵤ'=>'ⵤ','ⵥ'=>'ⵥ','ⵯ'=>'ⵯ','ⶀ'=>'ⶀ','ⶁ'=>'ⶁ','ⶂ'=>'ⶂ','ⶃ'=>'ⶃ','ⶄ'=>'ⶄ','ⶅ'=>'ⶅ','ⶆ'=>'ⶆ','ⶇ'=>'ⶇ','ⶈ'=>'ⶈ','ⶉ'=>'ⶉ','ⶊ'=>'ⶊ','ⶋ'=>'ⶋ','ⶌ'=>'ⶌ','ⶍ'=>'ⶍ','ⶎ'=>'ⶎ','ⶏ'=>'ⶏ','ⶐ'=>'ⶐ','ⶑ'=>'ⶑ','ⶒ'=>'ⶒ','ⶓ'=>'ⶓ','ⶔ'=>'ⶔ','ⶕ'=>'ⶕ','ⶖ'=>'ⶖ','ⶠ'=>'ⶠ','ⶡ'=>'ⶡ','ⶢ'=>'ⶢ','ⶣ'=>'ⶣ','ⶤ'=>'ⶤ','ⶥ'=>'ⶥ','ⶦ'=>'ⶦ','ⶨ'=>'ⶨ','ⶩ'=>'ⶩ','ⶪ'=>'ⶪ','ⶫ'=>'ⶫ','ⶬ'=>'ⶬ','ⶭ'=>'ⶭ','ⶮ'=>'ⶮ','ⶰ'=>'ⶰ','ⶱ'=>'ⶱ','ⶲ'=>'ⶲ','ⶳ'=>'ⶳ','ⶴ'=>'ⶴ','ⶵ'=>'ⶵ','ⶶ'=>'ⶶ','ⶸ'=>'ⶸ','ⶹ'=>'ⶹ','ⶺ'=>'ⶺ','ⶻ'=>'ⶻ','ⶼ'=>'ⶼ','ⶽ'=>'ⶽ','ⶾ'=>'ⶾ','ⷀ'=>'ⷀ','ⷁ'=>'ⷁ','ⷂ'=>'ⷂ','ⷃ'=>'ⷃ','ⷄ'=>'ⷄ','ⷅ'=>'ⷅ','ⷆ'=>'ⷆ','ⷈ'=>'ⷈ','ⷉ'=>'ⷉ','ⷊ'=>'ⷊ','ⷋ'=>'ⷋ','ⷌ'=>'ⷌ','ⷍ'=>'ⷍ','ⷎ'=>'ⷎ','ⷐ'=>'ⷐ','ⷑ'=>'ⷑ','ⷒ'=>'ⷒ','ⷓ'=>'ⷓ','ⷔ'=>'ⷔ','ⷕ'=>'ⷕ','ⷖ'=>'ⷖ','ⷘ'=>'ⷘ','ⷙ'=>'ⷙ','ⷚ'=>'ⷚ','ⷛ'=>'ⷛ','ⷜ'=>'ⷜ','ⷝ'=>'ⷝ','ⷞ'=>'ⷞ');
diff --git a/phpBB/includes/utf/data/search_indexer_58.php b/phpBB/includes/utf/data/search_indexer_58.php
index 8902bc7995..ec86a4bd62 100644
--- a/phpBB/includes/utf/data/search_indexer_58.php
+++ b/phpBB/includes/utf/data/search_indexer_58.php
@@ -1 +1 @@
-<?php return array('𝅥'=>'𝅥','𝅦'=>'𝅦','𝅧'=>'𝅧','𝅨'=>'𝅨','𝅩'=>'𝅩','𝅭'=>'𝅭','𝅮'=>'𝅮','𝅯'=>'𝅯','𝅰'=>'𝅰','𝅱'=>'𝅱','𝅲'=>'𝅲','𝅻'=>'𝅻','𝅼'=>'𝅼','𝅽'=>'𝅽','𝅾'=>'𝅾','𝅿'=>'𝅿','𝆀'=>'𝆀','𝆁'=>'𝆁','𝆂'=>'𝆂','𝆅'=>'𝆅','𝆆'=>'𝆆','𝆇'=>'𝆇','𝆈'=>'𝆈','𝆉'=>'𝆉','𝆊'=>'𝆊','𝆋'=>'𝆋','𝆪'=>'𝆪','𝆫'=>'𝆫','𝆬'=>'𝆬','𝆭'=>'𝆭','𝉂'=>'𝉂','𝉃'=>'𝉃','𝉄'=>'𝉄','𝍠'=>'1','𝍡'=>'2','𝍢'=>'3','𝍣'=>'4','𝍤'=>'5','𝍥'=>'6','𝍦'=>'7','𝍧'=>'8','𝍨'=>'9','𝍩'=>'10','𝍪'=>'20','𝍫'=>'30','𝍬'=>'40','𝍭'=>'50','𝍮'=>'60','𝍯'=>'70','𝍰'=>'80','𝍱'=>'90','𝐀'=>'𝐀','𝐁'=>'𝐁','𝐂'=>'𝐂','𝐃'=>'𝐃','𝐄'=>'𝐄','𝐅'=>'𝐅','𝐆'=>'𝐆','𝐇'=>'𝐇','𝐈'=>'𝐈','𝐉'=>'𝐉','𝐊'=>'𝐊','𝐋'=>'𝐋','𝐌'=>'𝐌','𝐍'=>'𝐍','𝐎'=>'𝐎','𝐏'=>'𝐏','𝐐'=>'𝐐','𝐑'=>'𝐑','𝐒'=>'𝐒','𝐓'=>'𝐓','𝐔'=>'𝐔','𝐕'=>'𝐕','𝐖'=>'𝐖','𝐗'=>'𝐗','𝐘'=>'𝐘','𝐙'=>'𝐙','𝐚'=>'𝐚','𝐛'=>'𝐛','𝐜'=>'𝐜','𝐝'=>'𝐝','𝐞'=>'𝐞','𝐟'=>'𝐟','𝐠'=>'𝐠','𝐡'=>'𝐡','𝐢'=>'𝐢','𝐣'=>'𝐣','𝐤'=>'𝐤','𝐥'=>'𝐥','𝐦'=>'𝐦','𝐧'=>'𝐧','𝐨'=>'𝐨','𝐩'=>'𝐩','𝐪'=>'𝐪','𝐫'=>'𝐫','𝐬'=>'𝐬','𝐭'=>'𝐭','𝐮'=>'𝐮','𝐯'=>'𝐯','𝐰'=>'𝐰','𝐱'=>'𝐱','𝐲'=>'𝐲','𝐳'=>'𝐳','𝐴'=>'𝐴','𝐵'=>'𝐵','𝐶'=>'𝐶','𝐷'=>'𝐷','𝐸'=>'𝐸','𝐹'=>'𝐹','𝐺'=>'𝐺','𝐻'=>'𝐻','𝐼'=>'𝐼','𝐽'=>'𝐽','𝐾'=>'𝐾','𝐿'=>'𝐿','𝑀'=>'𝑀','𝑁'=>'𝑁','𝑂'=>'𝑂','𝑃'=>'𝑃','𝑄'=>'𝑄','𝑅'=>'𝑅','𝑆'=>'𝑆','𝑇'=>'𝑇','𝑈'=>'𝑈','𝑉'=>'𝑉','𝑊'=>'𝑊','𝑋'=>'𝑋','𝑌'=>'𝑌','𝑍'=>'𝑍','𝑎'=>'𝑎','𝑏'=>'𝑏','𝑐'=>'𝑐','𝑑'=>'𝑑','𝑒'=>'𝑒','𝑓'=>'𝑓','𝑔'=>'𝑔','𝑖'=>'𝑖','𝑗'=>'𝑗','𝑘'=>'𝑘','𝑙'=>'𝑙','𝑚'=>'𝑚','𝑛'=>'𝑛','𝑜'=>'𝑜','𝑝'=>'𝑝','𝑞'=>'𝑞','𝑟'=>'𝑟','𝑠'=>'𝑠','𝑡'=>'𝑡','𝑢'=>'𝑢','𝑣'=>'𝑣','𝑤'=>'𝑤','𝑥'=>'𝑥','𝑦'=>'𝑦','𝑧'=>'𝑧','𝑨'=>'𝑨','𝑩'=>'𝑩','𝑪'=>'𝑪','𝑫'=>'𝑫','𝑬'=>'𝑬','𝑭'=>'𝑭','𝑮'=>'𝑮','𝑯'=>'𝑯','𝑰'=>'𝑰','𝑱'=>'𝑱','𝑲'=>'𝑲','𝑳'=>'𝑳','𝑴'=>'𝑴','𝑵'=>'𝑵','𝑶'=>'𝑶','𝑷'=>'𝑷','𝑸'=>'𝑸','𝑹'=>'𝑹','𝑺'=>'𝑺','𝑻'=>'𝑻','𝑼'=>'𝑼','𝑽'=>'𝑽','𝑾'=>'𝑾','𝑿'=>'𝑿','𝒀'=>'𝒀','𝒁'=>'𝒁','𝒂'=>'𝒂','𝒃'=>'𝒃','𝒄'=>'𝒄','𝒅'=>'𝒅','𝒆'=>'𝒆','𝒇'=>'𝒇','𝒈'=>'𝒈','𝒉'=>'𝒉','𝒊'=>'𝒊','𝒋'=>'𝒋','𝒌'=>'𝒌','𝒍'=>'𝒍','𝒎'=>'𝒎','𝒏'=>'𝒏','𝒐'=>'𝒐','𝒑'=>'𝒑','𝒒'=>'𝒒','𝒓'=>'𝒓','𝒔'=>'𝒔','𝒕'=>'𝒕','𝒖'=>'𝒖','𝒗'=>'𝒗','𝒘'=>'𝒘','𝒙'=>'𝒙','𝒚'=>'𝒚','𝒛'=>'𝒛','𝒜'=>'𝒜','𝒞'=>'𝒞','𝒟'=>'𝒟','𝒢'=>'𝒢','𝒥'=>'𝒥','𝒦'=>'𝒦','𝒩'=>'𝒩','𝒪'=>'𝒪','𝒫'=>'𝒫','𝒬'=>'𝒬','𝒮'=>'𝒮','𝒯'=>'𝒯','𝒰'=>'𝒰','𝒱'=>'𝒱','𝒲'=>'𝒲','𝒳'=>'𝒳','𝒴'=>'𝒴','𝒵'=>'𝒵','𝒶'=>'𝒶','𝒷'=>'𝒷','𝒸'=>'𝒸','𝒹'=>'𝒹','𝒻'=>'𝒻','𝒽'=>'𝒽','𝒾'=>'𝒾','𝒿'=>'𝒿','𝓀'=>'𝓀','𝓁'=>'𝓁','𝓂'=>'𝓂','𝓃'=>'𝓃','𝓅'=>'𝓅','𝓆'=>'𝓆','𝓇'=>'𝓇','𝓈'=>'𝓈','𝓉'=>'𝓉','𝓊'=>'𝓊','𝓋'=>'𝓋','𝓌'=>'𝓌','𝓍'=>'𝓍','𝓎'=>'𝓎','𝓏'=>'𝓏','𝓐'=>'𝓐','𝓑'=>'𝓑','𝓒'=>'𝓒','𝓓'=>'𝓓','𝓔'=>'𝓔','𝓕'=>'𝓕','𝓖'=>'𝓖','𝓗'=>'𝓗','𝓘'=>'𝓘','𝓙'=>'𝓙','𝓚'=>'𝓚','𝓛'=>'𝓛','𝓜'=>'𝓜','𝓝'=>'𝓝','𝓞'=>'𝓞','𝓟'=>'𝓟','𝓠'=>'𝓠','𝓡'=>'𝓡','𝓢'=>'𝓢','𝓣'=>'𝓣','𝓤'=>'𝓤','𝓥'=>'𝓥','𝓦'=>'𝓦','𝓧'=>'𝓧','𝓨'=>'𝓨','𝓩'=>'𝓩','𝓪'=>'𝓪','𝓫'=>'𝓫','𝓬'=>'𝓬','𝓭'=>'𝓭','𝓮'=>'𝓮','𝓯'=>'𝓯','𝓰'=>'𝓰','𝓱'=>'𝓱','𝓲'=>'𝓲','𝓳'=>'𝓳','𝓴'=>'𝓴','𝓵'=>'𝓵','𝓶'=>'𝓶','𝓷'=>'𝓷','𝓸'=>'𝓸','𝓹'=>'𝓹','𝓺'=>'𝓺','𝓻'=>'𝓻','𝓼'=>'𝓼','𝓽'=>'𝓽','𝓾'=>'𝓾','𝓿'=>'𝓿','𝔀'=>'𝔀','𝔁'=>'𝔁','𝔂'=>'𝔂','𝔃'=>'𝔃','𝔄'=>'𝔄','𝔅'=>'𝔅','𝔇'=>'𝔇','𝔈'=>'𝔈','𝔉'=>'𝔉','𝔊'=>'𝔊','𝔍'=>'𝔍','𝔎'=>'𝔎','𝔏'=>'𝔏','𝔐'=>'𝔐','𝔑'=>'𝔑','𝔒'=>'𝔒','𝔓'=>'𝔓','𝔔'=>'𝔔','𝔖'=>'𝔖','𝔗'=>'𝔗','𝔘'=>'𝔘','𝔙'=>'𝔙','𝔚'=>'𝔚','𝔛'=>'𝔛','𝔜'=>'𝔜','𝔞'=>'𝔞','𝔟'=>'𝔟','𝔠'=>'𝔠','𝔡'=>'𝔡','𝔢'=>'𝔢','𝔣'=>'𝔣','𝔤'=>'𝔤','𝔥'=>'𝔥','𝔦'=>'𝔦','𝔧'=>'𝔧','𝔨'=>'𝔨','𝔩'=>'𝔩','𝔪'=>'𝔪','𝔫'=>'𝔫','𝔬'=>'𝔬','𝔭'=>'𝔭','𝔮'=>'𝔮','𝔯'=>'𝔯','𝔰'=>'𝔰','𝔱'=>'𝔱','𝔲'=>'𝔲','𝔳'=>'𝔳','𝔴'=>'𝔴','𝔵'=>'𝔵','𝔶'=>'𝔶','𝔷'=>'𝔷','𝔸'=>'𝔸','𝔹'=>'𝔹','𝔻'=>'𝔻','𝔼'=>'𝔼','𝔽'=>'𝔽','𝔾'=>'𝔾','𝕀'=>'𝕀','𝕁'=>'𝕁','𝕂'=>'𝕂','𝕃'=>'𝕃','𝕄'=>'𝕄','𝕆'=>'𝕆','𝕊'=>'𝕊','𝕋'=>'𝕋','𝕌'=>'𝕌','𝕍'=>'𝕍','𝕎'=>'𝕎','𝕏'=>'𝕏','𝕐'=>'𝕐','𝕒'=>'𝕒','𝕓'=>'𝕓','𝕔'=>'𝕔','𝕕'=>'𝕕','𝕖'=>'𝕖','𝕗'=>'𝕗','𝕘'=>'𝕘','𝕙'=>'𝕙','𝕚'=>'𝕚','𝕛'=>'𝕛','𝕜'=>'𝕜','𝕝'=>'𝕝','𝕞'=>'𝕞','𝕟'=>'𝕟','𝕠'=>'𝕠','𝕡'=>'𝕡','𝕢'=>'𝕢','𝕣'=>'𝕣','𝕤'=>'𝕤','𝕥'=>'𝕥','𝕦'=>'𝕦','𝕧'=>'𝕧','𝕨'=>'𝕨','𝕩'=>'𝕩','𝕪'=>'𝕪','𝕫'=>'𝕫','𝕬'=>'𝕬','𝕭'=>'𝕭','𝕮'=>'𝕮','𝕯'=>'𝕯','𝕰'=>'𝕰','𝕱'=>'𝕱','𝕲'=>'𝕲','𝕳'=>'𝕳','𝕴'=>'𝕴','𝕵'=>'𝕵','𝕶'=>'𝕶','𝕷'=>'𝕷','𝕸'=>'𝕸','𝕹'=>'𝕹','𝕺'=>'𝕺','𝕻'=>'𝕻','𝕼'=>'𝕼','𝕽'=>'𝕽','𝕾'=>'𝕾','𝕿'=>'𝕿','𝖀'=>'𝖀','𝖁'=>'𝖁','𝖂'=>'𝖂','𝖃'=>'𝖃','𝖄'=>'𝖄','𝖅'=>'𝖅','𝖆'=>'𝖆','𝖇'=>'𝖇','𝖈'=>'𝖈','𝖉'=>'𝖉','𝖊'=>'𝖊','𝖋'=>'𝖋','𝖌'=>'𝖌','𝖍'=>'𝖍','𝖎'=>'𝖎','𝖏'=>'𝖏','𝖐'=>'𝖐','𝖑'=>'𝖑','𝖒'=>'𝖒','𝖓'=>'𝖓','𝖔'=>'𝖔','𝖕'=>'𝖕','𝖖'=>'𝖖','𝖗'=>'𝖗','𝖘'=>'𝖘','𝖙'=>'𝖙','𝖚'=>'𝖚','𝖛'=>'𝖛','𝖜'=>'𝖜','𝖝'=>'𝖝','𝖞'=>'𝖞','𝖟'=>'𝖟','𝖠'=>'𝖠','𝖡'=>'𝖡','𝖢'=>'𝖢','𝖣'=>'𝖣','𝖤'=>'𝖤','𝖥'=>'𝖥','𝖦'=>'𝖦','𝖧'=>'𝖧','𝖨'=>'𝖨','𝖩'=>'𝖩','𝖪'=>'𝖪','𝖫'=>'𝖫','𝖬'=>'𝖬','𝖭'=>'𝖭','𝖮'=>'𝖮','𝖯'=>'𝖯','𝖰'=>'𝖰','𝖱'=>'𝖱','𝖲'=>'𝖲','𝖳'=>'𝖳','𝖴'=>'𝖴','𝖵'=>'𝖵','𝖶'=>'𝖶','𝖷'=>'𝖷','𝖸'=>'𝖸','𝖹'=>'𝖹','𝖺'=>'𝖺','𝖻'=>'𝖻','𝖼'=>'𝖼','𝖽'=>'𝖽','𝖾'=>'𝖾','𝖿'=>'𝖿','𝗀'=>'𝗀','𝗁'=>'𝗁','𝗂'=>'𝗂','𝗃'=>'𝗃','𝗄'=>'𝗄','𝗅'=>'𝗅','𝗆'=>'𝗆','𝗇'=>'𝗇','𝗈'=>'𝗈','𝗉'=>'𝗉','𝗊'=>'𝗊','𝗋'=>'𝗋','𝗌'=>'𝗌','𝗍'=>'𝗍','𝗎'=>'𝗎','𝗏'=>'𝗏','𝗐'=>'𝗐','𝗑'=>'𝗑','𝗒'=>'𝗒','𝗓'=>'𝗓','𝗔'=>'𝗔','𝗕'=>'𝗕','𝗖'=>'𝗖','𝗗'=>'𝗗','𝗘'=>'𝗘','𝗙'=>'𝗙','𝗚'=>'𝗚','𝗛'=>'𝗛','𝗜'=>'𝗜','𝗝'=>'𝗝','𝗞'=>'𝗞','𝗟'=>'𝗟','𝗠'=>'𝗠','𝗡'=>'𝗡','𝗢'=>'𝗢','𝗣'=>'𝗣','𝗤'=>'𝗤','𝗥'=>'𝗥','𝗦'=>'𝗦','𝗧'=>'𝗧','𝗨'=>'𝗨','𝗩'=>'𝗩','𝗪'=>'𝗪','𝗫'=>'𝗫','𝗬'=>'𝗬','𝗭'=>'𝗭','𝗮'=>'𝗮','𝗯'=>'𝗯','𝗰'=>'𝗰','𝗱'=>'𝗱','𝗲'=>'𝗲','𝗳'=>'𝗳','𝗴'=>'𝗴','𝗵'=>'𝗵','𝗶'=>'𝗶','𝗷'=>'𝗷','𝗸'=>'𝗸','𝗹'=>'𝗹','𝗺'=>'𝗺','𝗻'=>'𝗻','𝗼'=>'𝗼','𝗽'=>'𝗽','𝗾'=>'𝗾','𝗿'=>'𝗿','𝘀'=>'𝘀','𝘁'=>'𝘁','𝘂'=>'𝘂','𝘃'=>'𝘃','𝘄'=>'𝘄','𝘅'=>'𝘅','𝘆'=>'𝘆','𝘇'=>'𝘇','𝘈'=>'𝘈','𝘉'=>'𝘉','𝘊'=>'𝘊','𝘋'=>'𝘋','𝘌'=>'𝘌','𝘍'=>'𝘍','𝘎'=>'𝘎','𝘏'=>'𝘏','𝘐'=>'𝘐','𝘑'=>'𝘑','𝘒'=>'𝘒','𝘓'=>'𝘓','𝘔'=>'𝘔','𝘕'=>'𝘕','𝘖'=>'𝘖','𝘗'=>'𝘗','𝘘'=>'𝘘','𝘙'=>'𝘙','𝘚'=>'𝘚','𝘛'=>'𝘛','𝘜'=>'𝘜','𝘝'=>'𝘝','𝘞'=>'𝘞','𝘟'=>'𝘟','𝘠'=>'𝘠','𝘡'=>'𝘡','𝘢'=>'𝘢','𝘣'=>'𝘣','𝘤'=>'𝘤','𝘥'=>'𝘥','𝘦'=>'𝘦','𝘧'=>'𝘧','𝘨'=>'𝘨','𝘩'=>'𝘩','𝘪'=>'𝘪','𝘫'=>'𝘫','𝘬'=>'𝘬','𝘭'=>'𝘭','𝘮'=>'𝘮','𝘯'=>'𝘯','𝘰'=>'𝘰','𝘱'=>'𝘱','𝘲'=>'𝘲','𝘳'=>'𝘳','𝘴'=>'𝘴','𝘵'=>'𝘵','𝘶'=>'𝘶','𝘷'=>'𝘷','𝘸'=>'𝘸','𝘹'=>'𝘹','𝘺'=>'𝘺','𝘻'=>'𝘻','𝘼'=>'𝘼','𝘽'=>'𝘽','𝘾'=>'𝘾','𝘿'=>'𝘿','𝙀'=>'𝙀','𝙁'=>'𝙁','𝙂'=>'𝙂','𝙃'=>'𝙃','𝙄'=>'𝙄','𝙅'=>'𝙅','𝙆'=>'𝙆','𝙇'=>'𝙇','𝙈'=>'𝙈','𝙉'=>'𝙉','𝙊'=>'𝙊','𝙋'=>'𝙋','𝙌'=>'𝙌','𝙍'=>'𝙍','𝙎'=>'𝙎','𝙏'=>'𝙏','𝙐'=>'𝙐','𝙑'=>'𝙑','𝙒'=>'𝙒','𝙓'=>'𝙓','𝙔'=>'𝙔','𝙕'=>'𝙕','𝙖'=>'𝙖','𝙗'=>'𝙗','𝙘'=>'𝙘','𝙙'=>'𝙙','𝙚'=>'𝙚','𝙛'=>'𝙛','𝙜'=>'𝙜','𝙝'=>'𝙝','𝙞'=>'𝙞','𝙟'=>'𝙟','𝙠'=>'𝙠','𝙡'=>'𝙡','𝙢'=>'𝙢','𝙣'=>'𝙣','𝙤'=>'𝙤','𝙥'=>'𝙥','𝙦'=>'𝙦','𝙧'=>'𝙧','𝙨'=>'𝙨','𝙩'=>'𝙩','𝙪'=>'𝙪','𝙫'=>'𝙫','𝙬'=>'𝙬','𝙭'=>'𝙭','𝙮'=>'𝙮','𝙯'=>'𝙯','𝙰'=>'𝙰','𝙱'=>'𝙱','𝙲'=>'𝙲','𝙳'=>'𝙳','𝙴'=>'𝙴','𝙵'=>'𝙵','𝙶'=>'𝙶','𝙷'=>'𝙷','𝙸'=>'𝙸','𝙹'=>'𝙹','𝙺'=>'𝙺','𝙻'=>'𝙻','𝙼'=>'𝙼','𝙽'=>'𝙽','𝙾'=>'𝙾','𝙿'=>'𝙿','𝚀'=>'𝚀','𝚁'=>'𝚁','𝚂'=>'𝚂','𝚃'=>'𝚃','𝚄'=>'𝚄','𝚅'=>'𝚅','𝚆'=>'𝚆','𝚇'=>'𝚇','𝚈'=>'𝚈','𝚉'=>'𝚉','𝚊'=>'𝚊','𝚋'=>'𝚋','𝚌'=>'𝚌','𝚍'=>'𝚍','𝚎'=>'𝚎','𝚏'=>'𝚏','𝚐'=>'𝚐','𝚑'=>'𝚑','𝚒'=>'𝚒','𝚓'=>'𝚓','𝚔'=>'𝚔','𝚕'=>'𝚕','𝚖'=>'𝚖','𝚗'=>'𝚗','𝚘'=>'𝚘','𝚙'=>'𝚙','𝚚'=>'𝚚','𝚛'=>'𝚛','𝚜'=>'𝚜','𝚝'=>'𝚝','𝚞'=>'𝚞','𝚟'=>'𝚟','𝚠'=>'𝚠','𝚡'=>'𝚡','𝚢'=>'𝚢','𝚣'=>'𝚣','𝚤'=>'𝚤','𝚥'=>'𝚥','𝚨'=>'𝚨','𝚩'=>'𝚩','𝚪'=>'𝚪','𝚫'=>'𝚫','𝚬'=>'𝚬','𝚭'=>'𝚭','𝚮'=>'𝚮','𝚯'=>'𝚯','𝚰'=>'𝚰','𝚱'=>'𝚱','𝚲'=>'𝚲','𝚳'=>'𝚳','𝚴'=>'𝚴','𝚵'=>'𝚵','𝚶'=>'𝚶','𝚷'=>'𝚷','𝚸'=>'𝚸','𝚹'=>'𝚹','𝚺'=>'𝚺','𝚻'=>'𝚻','𝚼'=>'𝚼','𝚽'=>'𝚽','𝚾'=>'𝚾','𝚿'=>'𝚿','𝛀'=>'𝛀','𝛂'=>'𝛂','𝛃'=>'𝛃','𝛄'=>'𝛄','𝛅'=>'𝛅','𝛆'=>'𝛆','𝛇'=>'𝛇','𝛈'=>'𝛈','𝛉'=>'𝛉','𝛊'=>'𝛊','𝛋'=>'𝛋','𝛌'=>'𝛌','𝛍'=>'𝛍','𝛎'=>'𝛎','𝛏'=>'𝛏','𝛐'=>'𝛐','𝛑'=>'𝛑','𝛒'=>'𝛒','𝛓'=>'𝛓','𝛔'=>'𝛔','𝛕'=>'𝛕','𝛖'=>'𝛖','𝛗'=>'𝛗','𝛘'=>'𝛘','𝛙'=>'𝛙','𝛚'=>'𝛚','𝛜'=>'𝛜','𝛝'=>'𝛝','𝛞'=>'𝛞','𝛟'=>'𝛟','𝛠'=>'𝛠','𝛡'=>'𝛡','𝛢'=>'𝛢','𝛣'=>'𝛣','𝛤'=>'𝛤','𝛥'=>'𝛥','𝛦'=>'𝛦','𝛧'=>'𝛧','𝛨'=>'𝛨','𝛩'=>'𝛩','𝛪'=>'𝛪','𝛫'=>'𝛫','𝛬'=>'𝛬','𝛭'=>'𝛭','𝛮'=>'𝛮','𝛯'=>'𝛯','𝛰'=>'𝛰','𝛱'=>'𝛱','𝛲'=>'𝛲','𝛳'=>'𝛳','𝛴'=>'𝛴','𝛵'=>'𝛵','𝛶'=>'𝛶','𝛷'=>'𝛷','𝛸'=>'𝛸','𝛹'=>'𝛹','𝛺'=>'𝛺','𝛼'=>'𝛼','𝛽'=>'𝛽','𝛾'=>'𝛾','𝛿'=>'𝛿','𝜀'=>'𝜀','𝜁'=>'𝜁','𝜂'=>'𝜂','𝜃'=>'𝜃','𝜄'=>'𝜄','𝜅'=>'𝜅','𝜆'=>'𝜆','𝜇'=>'𝜇','𝜈'=>'𝜈','𝜉'=>'𝜉','𝜊'=>'𝜊','𝜋'=>'𝜋','𝜌'=>'𝜌','𝜍'=>'𝜍','𝜎'=>'𝜎','𝜏'=>'𝜏','𝜐'=>'𝜐','𝜑'=>'𝜑','𝜒'=>'𝜒','𝜓'=>'𝜓','𝜔'=>'𝜔','𝜖'=>'𝜖','𝜗'=>'𝜗','𝜘'=>'𝜘','𝜙'=>'𝜙','𝜚'=>'𝜚','𝜛'=>'𝜛','𝜜'=>'𝜜','𝜝'=>'𝜝','𝜞'=>'𝜞','𝜟'=>'𝜟','𝜠'=>'𝜠','𝜡'=>'𝜡','𝜢'=>'𝜢','𝜣'=>'𝜣','𝜤'=>'𝜤','𝜥'=>'𝜥','𝜦'=>'𝜦','𝜧'=>'𝜧','𝜨'=>'𝜨','𝜩'=>'𝜩','𝜪'=>'𝜪','𝜫'=>'𝜫','𝜬'=>'𝜬','𝜭'=>'𝜭','𝜮'=>'𝜮','𝜯'=>'𝜯','𝜰'=>'𝜰','𝜱'=>'𝜱','𝜲'=>'𝜲','𝜳'=>'𝜳','𝜴'=>'𝜴','𝜶'=>'𝜶','𝜷'=>'𝜷','𝜸'=>'𝜸','𝜹'=>'𝜹','𝜺'=>'𝜺','𝜻'=>'𝜻','𝜼'=>'𝜼','𝜽'=>'𝜽','𝜾'=>'𝜾','𝜿'=>'𝜿','𝝀'=>'𝝀','𝝁'=>'𝝁','𝝂'=>'𝝂','𝝃'=>'𝝃','𝝄'=>'𝝄','𝝅'=>'𝝅','𝝆'=>'𝝆','𝝇'=>'𝝇','𝝈'=>'𝝈','𝝉'=>'𝝉','𝝊'=>'𝝊','𝝋'=>'𝝋','𝝌'=>'𝝌','𝝍'=>'𝝍','𝝎'=>'𝝎','𝝐'=>'𝝐','𝝑'=>'𝝑','𝝒'=>'𝝒','𝝓'=>'𝝓','𝝔'=>'𝝔','𝝕'=>'𝝕','𝝖'=>'𝝖','𝝗'=>'𝝗','𝝘'=>'𝝘','𝝙'=>'𝝙','𝝚'=>'𝝚','𝝛'=>'𝝛','𝝜'=>'𝝜','𝝝'=>'𝝝','𝝞'=>'𝝞','𝝟'=>'𝝟','𝝠'=>'𝝠','𝝡'=>'𝝡','𝝢'=>'𝝢','𝝣'=>'𝝣','𝝤'=>'𝝤','𝝥'=>'𝝥','𝝦'=>'𝝦','𝝧'=>'𝝧','𝝨'=>'𝝨','𝝩'=>'𝝩','𝝪'=>'𝝪','𝝫'=>'𝝫','𝝬'=>'𝝬','𝝭'=>'𝝭','𝝮'=>'𝝮','𝝰'=>'𝝰','𝝱'=>'𝝱','𝝲'=>'𝝲','𝝳'=>'𝝳','𝝴'=>'𝝴','𝝵'=>'𝝵','𝝶'=>'𝝶','𝝷'=>'𝝷','𝝸'=>'𝝸','𝝹'=>'𝝹','𝝺'=>'𝝺','𝝻'=>'𝝻','𝝼'=>'𝝼','𝝽'=>'𝝽','𝝾'=>'𝝾','𝝿'=>'𝝿','𝞀'=>'𝞀','𝞁'=>'𝞁','𝞂'=>'𝞂','𝞃'=>'𝞃','𝞄'=>'𝞄','𝞅'=>'𝞅','𝞆'=>'𝞆','𝞇'=>'𝞇','𝞈'=>'𝞈','𝞊'=>'𝞊','𝞋'=>'𝞋','𝞌'=>'𝞌','𝞍'=>'𝞍','𝞎'=>'𝞎','𝞏'=>'𝞏','𝞐'=>'𝞐','𝞑'=>'𝞑','𝞒'=>'𝞒','𝞓'=>'𝞓','𝞔'=>'𝞔','𝞕'=>'𝞕','𝞖'=>'𝞖','𝞗'=>'𝞗','𝞘'=>'𝞘','𝞙'=>'𝞙','𝞚'=>'𝞚','𝞛'=>'𝞛','𝞜'=>'𝞜','𝞝'=>'𝞝','𝞞'=>'𝞞','𝞟'=>'𝞟','𝞠'=>'𝞠','𝞡'=>'𝞡','𝞢'=>'𝞢','𝞣'=>'𝞣','𝞤'=>'𝞤','𝞥'=>'𝞥','𝞦'=>'𝞦','𝞧'=>'𝞧','𝞨'=>'𝞨','𝞪'=>'𝞪','𝞫'=>'𝞫','𝞬'=>'𝞬','𝞭'=>'𝞭','𝞮'=>'𝞮','𝞯'=>'𝞯','𝞰'=>'𝞰','𝞱'=>'𝞱','𝞲'=>'𝞲','𝞳'=>'𝞳','𝞴'=>'𝞴','𝞵'=>'𝞵','𝞶'=>'𝞶','𝞷'=>'𝞷','𝞸'=>'𝞸','𝞹'=>'𝞹','𝞺'=>'𝞺','𝞻'=>'𝞻','𝞼'=>'𝞼','𝞽'=>'𝞽','𝞾'=>'𝞾','𝞿'=>'𝞿','𝟀'=>'𝟀','𝟁'=>'𝟁','𝟂'=>'𝟂','𝟄'=>'𝟄','𝟅'=>'𝟅','𝟆'=>'𝟆','𝟇'=>'𝟇','𝟈'=>'𝟈','𝟉'=>'𝟉','𝟊'=>'𝟊','𝟋'=>'𝟋','𝟎'=>'0','𝟏'=>'1','𝟐'=>'2','𝟑'=>'3','𝟒'=>'4','𝟓'=>'5','𝟔'=>'6','𝟕'=>'7','𝟖'=>'8','𝟗'=>'9','𝟘'=>'0','𝟙'=>'1','𝟚'=>'2','𝟛'=>'3','𝟜'=>'4','𝟝'=>'5','𝟞'=>'6','𝟟'=>'7','𝟠'=>'8','𝟡'=>'9','𝟢'=>'0','𝟣'=>'1','𝟤'=>'2','𝟥'=>'3','𝟦'=>'4','𝟧'=>'5','𝟨'=>'6','𝟩'=>'7','𝟪'=>'8','𝟫'=>'9','𝟬'=>'0','𝟭'=>'1','𝟮'=>'2','𝟯'=>'3','𝟰'=>'4','𝟱'=>'5','𝟲'=>'6','𝟳'=>'7','𝟴'=>'8','𝟵'=>'9','𝟶'=>'0','𝟷'=>'1','𝟸'=>'2','𝟹'=>'3','𝟺'=>'4','𝟻'=>'5','𝟼'=>'6','𝟽'=>'7','𝟾'=>'8','𝟿'=>'9'); \ No newline at end of file
+<?php return array('𝅥'=>'𝅥','𝅦'=>'𝅦','𝅧'=>'𝅧','𝅨'=>'𝅨','𝅩'=>'𝅩','𝅭'=>'𝅭','𝅮'=>'𝅮','𝅯'=>'𝅯','𝅰'=>'𝅰','𝅱'=>'𝅱','𝅲'=>'𝅲','𝅻'=>'𝅻','𝅼'=>'𝅼','𝅽'=>'𝅽','𝅾'=>'𝅾','𝅿'=>'𝅿','𝆀'=>'𝆀','𝆁'=>'𝆁','𝆂'=>'𝆂','𝆅'=>'𝆅','𝆆'=>'𝆆','𝆇'=>'𝆇','𝆈'=>'𝆈','𝆉'=>'𝆉','𝆊'=>'𝆊','𝆋'=>'𝆋','𝆪'=>'𝆪','𝆫'=>'𝆫','𝆬'=>'𝆬','𝆭'=>'𝆭','𝉂'=>'𝉂','𝉃'=>'𝉃','𝉄'=>'𝉄','𝍠'=>'1','𝍡'=>'2','𝍢'=>'3','𝍣'=>'4','𝍤'=>'5','𝍥'=>'6','𝍦'=>'7','𝍧'=>'8','𝍨'=>'9','𝍩'=>'10','𝍪'=>'20','𝍫'=>'30','𝍬'=>'40','𝍭'=>'50','𝍮'=>'60','𝍯'=>'70','𝍰'=>'80','𝍱'=>'90','𝐀'=>'𝐀','𝐁'=>'𝐁','𝐂'=>'𝐂','𝐃'=>'𝐃','𝐄'=>'𝐄','𝐅'=>'𝐅','𝐆'=>'𝐆','𝐇'=>'𝐇','𝐈'=>'𝐈','𝐉'=>'𝐉','𝐊'=>'𝐊','𝐋'=>'𝐋','𝐌'=>'𝐌','𝐍'=>'𝐍','𝐎'=>'𝐎','𝐏'=>'𝐏','𝐐'=>'𝐐','𝐑'=>'𝐑','𝐒'=>'𝐒','𝐓'=>'𝐓','𝐔'=>'𝐔','𝐕'=>'𝐕','𝐖'=>'𝐖','𝐗'=>'𝐗','𝐘'=>'𝐘','𝐙'=>'𝐙','𝐚'=>'𝐚','𝐛'=>'𝐛','𝐜'=>'𝐜','𝐝'=>'𝐝','𝐞'=>'𝐞','𝐟'=>'𝐟','𝐠'=>'𝐠','𝐡'=>'𝐡','𝐢'=>'𝐢','𝐣'=>'𝐣','𝐤'=>'𝐤','𝐥'=>'𝐥','𝐦'=>'𝐦','𝐧'=>'𝐧','𝐨'=>'𝐨','𝐩'=>'𝐩','𝐪'=>'𝐪','𝐫'=>'𝐫','𝐬'=>'𝐬','𝐭'=>'𝐭','𝐮'=>'𝐮','𝐯'=>'𝐯','𝐰'=>'𝐰','𝐱'=>'𝐱','𝐲'=>'𝐲','𝐳'=>'𝐳','𝐴'=>'𝐴','𝐵'=>'𝐵','𝐶'=>'𝐶','𝐷'=>'𝐷','𝐸'=>'𝐸','𝐹'=>'𝐹','𝐺'=>'𝐺','𝐻'=>'𝐻','𝐼'=>'𝐼','𝐽'=>'𝐽','𝐾'=>'𝐾','𝐿'=>'𝐿','𝑀'=>'𝑀','𝑁'=>'𝑁','𝑂'=>'𝑂','𝑃'=>'𝑃','𝑄'=>'𝑄','𝑅'=>'𝑅','𝑆'=>'𝑆','𝑇'=>'𝑇','𝑈'=>'𝑈','𝑉'=>'𝑉','𝑊'=>'𝑊','𝑋'=>'𝑋','𝑌'=>'𝑌','𝑍'=>'𝑍','𝑎'=>'𝑎','𝑏'=>'𝑏','𝑐'=>'𝑐','𝑑'=>'𝑑','𝑒'=>'𝑒','𝑓'=>'𝑓','𝑔'=>'𝑔','𝑖'=>'𝑖','𝑗'=>'𝑗','𝑘'=>'𝑘','𝑙'=>'𝑙','𝑚'=>'𝑚','𝑛'=>'𝑛','𝑜'=>'𝑜','𝑝'=>'𝑝','𝑞'=>'𝑞','𝑟'=>'𝑟','𝑠'=>'𝑠','𝑡'=>'𝑡','𝑢'=>'𝑢','𝑣'=>'𝑣','𝑤'=>'𝑤','𝑥'=>'𝑥','𝑦'=>'𝑦','𝑧'=>'𝑧','𝑨'=>'𝑨','𝑩'=>'𝑩','𝑪'=>'𝑪','𝑫'=>'𝑫','𝑬'=>'𝑬','𝑭'=>'𝑭','𝑮'=>'𝑮','𝑯'=>'𝑯','𝑰'=>'𝑰','𝑱'=>'𝑱','𝑲'=>'𝑲','𝑳'=>'𝑳','𝑴'=>'𝑴','𝑵'=>'𝑵','𝑶'=>'𝑶','𝑷'=>'𝑷','𝑸'=>'𝑸','𝑹'=>'𝑹','𝑺'=>'𝑺','𝑻'=>'𝑻','𝑼'=>'𝑼','𝑽'=>'𝑽','𝑾'=>'𝑾','𝑿'=>'𝑿','𝒀'=>'𝒀','𝒁'=>'𝒁','𝒂'=>'𝒂','𝒃'=>'𝒃','𝒄'=>'𝒄','𝒅'=>'𝒅','𝒆'=>'𝒆','𝒇'=>'𝒇','𝒈'=>'𝒈','𝒉'=>'𝒉','𝒊'=>'𝒊','𝒋'=>'𝒋','𝒌'=>'𝒌','𝒍'=>'𝒍','𝒎'=>'𝒎','𝒏'=>'𝒏','𝒐'=>'𝒐','𝒑'=>'𝒑','𝒒'=>'𝒒','𝒓'=>'𝒓','𝒔'=>'𝒔','𝒕'=>'𝒕','𝒖'=>'𝒖','𝒗'=>'𝒗','𝒘'=>'𝒘','𝒙'=>'𝒙','𝒚'=>'𝒚','𝒛'=>'𝒛','𝒜'=>'𝒜','𝒞'=>'𝒞','𝒟'=>'𝒟','𝒢'=>'𝒢','𝒥'=>'𝒥','𝒦'=>'𝒦','𝒩'=>'𝒩','𝒪'=>'𝒪','𝒫'=>'𝒫','𝒬'=>'𝒬','𝒮'=>'𝒮','𝒯'=>'𝒯','𝒰'=>'𝒰','𝒱'=>'𝒱','𝒲'=>'𝒲','𝒳'=>'𝒳','𝒴'=>'𝒴','𝒵'=>'𝒵','𝒶'=>'𝒶','𝒷'=>'𝒷','𝒸'=>'𝒸','𝒹'=>'𝒹','𝒻'=>'𝒻','𝒽'=>'𝒽','𝒾'=>'𝒾','𝒿'=>'𝒿','𝓀'=>'𝓀','𝓁'=>'𝓁','𝓂'=>'𝓂','𝓃'=>'𝓃','𝓅'=>'𝓅','𝓆'=>'𝓆','𝓇'=>'𝓇','𝓈'=>'𝓈','𝓉'=>'𝓉','𝓊'=>'𝓊','𝓋'=>'𝓋','𝓌'=>'𝓌','𝓍'=>'𝓍','𝓎'=>'𝓎','𝓏'=>'𝓏','𝓐'=>'𝓐','𝓑'=>'𝓑','𝓒'=>'𝓒','𝓓'=>'𝓓','𝓔'=>'𝓔','𝓕'=>'𝓕','𝓖'=>'𝓖','𝓗'=>'𝓗','𝓘'=>'𝓘','𝓙'=>'𝓙','𝓚'=>'𝓚','𝓛'=>'𝓛','𝓜'=>'𝓜','𝓝'=>'𝓝','𝓞'=>'𝓞','𝓟'=>'𝓟','𝓠'=>'𝓠','𝓡'=>'𝓡','𝓢'=>'𝓢','𝓣'=>'𝓣','𝓤'=>'𝓤','𝓥'=>'𝓥','𝓦'=>'𝓦','𝓧'=>'𝓧','𝓨'=>'𝓨','𝓩'=>'𝓩','𝓪'=>'𝓪','𝓫'=>'𝓫','𝓬'=>'𝓬','𝓭'=>'𝓭','𝓮'=>'𝓮','𝓯'=>'𝓯','𝓰'=>'𝓰','𝓱'=>'𝓱','𝓲'=>'𝓲','𝓳'=>'𝓳','𝓴'=>'𝓴','𝓵'=>'𝓵','𝓶'=>'𝓶','𝓷'=>'𝓷','𝓸'=>'𝓸','𝓹'=>'𝓹','𝓺'=>'𝓺','𝓻'=>'𝓻','𝓼'=>'𝓼','𝓽'=>'𝓽','𝓾'=>'𝓾','𝓿'=>'𝓿','𝔀'=>'𝔀','𝔁'=>'𝔁','𝔂'=>'𝔂','𝔃'=>'𝔃','𝔄'=>'𝔄','𝔅'=>'𝔅','𝔇'=>'𝔇','𝔈'=>'𝔈','𝔉'=>'𝔉','𝔊'=>'𝔊','𝔍'=>'𝔍','𝔎'=>'𝔎','𝔏'=>'𝔏','𝔐'=>'𝔐','𝔑'=>'𝔑','𝔒'=>'𝔒','𝔓'=>'𝔓','𝔔'=>'𝔔','𝔖'=>'𝔖','𝔗'=>'𝔗','𝔘'=>'𝔘','𝔙'=>'𝔙','𝔚'=>'𝔚','𝔛'=>'𝔛','𝔜'=>'𝔜','𝔞'=>'𝔞','𝔟'=>'𝔟','𝔠'=>'𝔠','𝔡'=>'𝔡','𝔢'=>'𝔢','𝔣'=>'𝔣','𝔤'=>'𝔤','𝔥'=>'𝔥','𝔦'=>'𝔦','𝔧'=>'𝔧','𝔨'=>'𝔨','𝔩'=>'𝔩','𝔪'=>'𝔪','𝔫'=>'𝔫','𝔬'=>'𝔬','𝔭'=>'𝔭','𝔮'=>'𝔮','𝔯'=>'𝔯','𝔰'=>'𝔰','𝔱'=>'𝔱','𝔲'=>'𝔲','𝔳'=>'𝔳','𝔴'=>'𝔴','𝔵'=>'𝔵','𝔶'=>'𝔶','𝔷'=>'𝔷','𝔸'=>'𝔸','𝔹'=>'𝔹','𝔻'=>'𝔻','𝔼'=>'𝔼','𝔽'=>'𝔽','𝔾'=>'𝔾','𝕀'=>'𝕀','𝕁'=>'𝕁','𝕂'=>'𝕂','𝕃'=>'𝕃','𝕄'=>'𝕄','𝕆'=>'𝕆','𝕊'=>'𝕊','𝕋'=>'𝕋','𝕌'=>'𝕌','𝕍'=>'𝕍','𝕎'=>'𝕎','𝕏'=>'𝕏','𝕐'=>'𝕐','𝕒'=>'𝕒','𝕓'=>'𝕓','𝕔'=>'𝕔','𝕕'=>'𝕕','𝕖'=>'𝕖','𝕗'=>'𝕗','𝕘'=>'𝕘','𝕙'=>'𝕙','𝕚'=>'𝕚','𝕛'=>'𝕛','𝕜'=>'𝕜','𝕝'=>'𝕝','𝕞'=>'𝕞','𝕟'=>'𝕟','𝕠'=>'𝕠','𝕡'=>'𝕡','𝕢'=>'𝕢','𝕣'=>'𝕣','𝕤'=>'𝕤','𝕥'=>'𝕥','𝕦'=>'𝕦','𝕧'=>'𝕧','𝕨'=>'𝕨','𝕩'=>'𝕩','𝕪'=>'𝕪','𝕫'=>'𝕫','𝕬'=>'𝕬','𝕭'=>'𝕭','𝕮'=>'𝕮','𝕯'=>'𝕯','𝕰'=>'𝕰','𝕱'=>'𝕱','𝕲'=>'𝕲','𝕳'=>'𝕳','𝕴'=>'𝕴','𝕵'=>'𝕵','𝕶'=>'𝕶','𝕷'=>'𝕷','𝕸'=>'𝕸','𝕹'=>'𝕹','𝕺'=>'𝕺','𝕻'=>'𝕻','𝕼'=>'𝕼','𝕽'=>'𝕽','𝕾'=>'𝕾','𝕿'=>'𝕿','𝖀'=>'𝖀','𝖁'=>'𝖁','𝖂'=>'𝖂','𝖃'=>'𝖃','𝖄'=>'𝖄','𝖅'=>'𝖅','𝖆'=>'𝖆','𝖇'=>'𝖇','𝖈'=>'𝖈','𝖉'=>'𝖉','𝖊'=>'𝖊','𝖋'=>'𝖋','𝖌'=>'𝖌','𝖍'=>'𝖍','𝖎'=>'𝖎','𝖏'=>'𝖏','𝖐'=>'𝖐','𝖑'=>'𝖑','𝖒'=>'𝖒','𝖓'=>'𝖓','𝖔'=>'𝖔','𝖕'=>'𝖕','𝖖'=>'𝖖','𝖗'=>'𝖗','𝖘'=>'𝖘','𝖙'=>'𝖙','𝖚'=>'𝖚','𝖛'=>'𝖛','𝖜'=>'𝖜','𝖝'=>'𝖝','𝖞'=>'𝖞','𝖟'=>'𝖟','𝖠'=>'𝖠','𝖡'=>'𝖡','𝖢'=>'𝖢','𝖣'=>'𝖣','𝖤'=>'𝖤','𝖥'=>'𝖥','𝖦'=>'𝖦','𝖧'=>'𝖧','𝖨'=>'𝖨','𝖩'=>'𝖩','𝖪'=>'𝖪','𝖫'=>'𝖫','𝖬'=>'𝖬','𝖭'=>'𝖭','𝖮'=>'𝖮','𝖯'=>'𝖯','𝖰'=>'𝖰','𝖱'=>'𝖱','𝖲'=>'𝖲','𝖳'=>'𝖳','𝖴'=>'𝖴','𝖵'=>'𝖵','𝖶'=>'𝖶','𝖷'=>'𝖷','𝖸'=>'𝖸','𝖹'=>'𝖹','𝖺'=>'𝖺','𝖻'=>'𝖻','𝖼'=>'𝖼','𝖽'=>'𝖽','𝖾'=>'𝖾','𝖿'=>'𝖿','𝗀'=>'𝗀','𝗁'=>'𝗁','𝗂'=>'𝗂','𝗃'=>'𝗃','𝗄'=>'𝗄','𝗅'=>'𝗅','𝗆'=>'𝗆','𝗇'=>'𝗇','𝗈'=>'𝗈','𝗉'=>'𝗉','𝗊'=>'𝗊','𝗋'=>'𝗋','𝗌'=>'𝗌','𝗍'=>'𝗍','𝗎'=>'𝗎','𝗏'=>'𝗏','𝗐'=>'𝗐','𝗑'=>'𝗑','𝗒'=>'𝗒','𝗓'=>'𝗓','𝗔'=>'𝗔','𝗕'=>'𝗕','𝗖'=>'𝗖','𝗗'=>'𝗗','𝗘'=>'𝗘','𝗙'=>'𝗙','𝗚'=>'𝗚','𝗛'=>'𝗛','𝗜'=>'𝗜','𝗝'=>'𝗝','𝗞'=>'𝗞','𝗟'=>'𝗟','𝗠'=>'𝗠','𝗡'=>'𝗡','𝗢'=>'𝗢','𝗣'=>'𝗣','𝗤'=>'𝗤','𝗥'=>'𝗥','𝗦'=>'𝗦','𝗧'=>'𝗧','𝗨'=>'𝗨','𝗩'=>'𝗩','𝗪'=>'𝗪','𝗫'=>'𝗫','𝗬'=>'𝗬','𝗭'=>'𝗭','𝗮'=>'𝗮','𝗯'=>'𝗯','𝗰'=>'𝗰','𝗱'=>'𝗱','𝗲'=>'𝗲','𝗳'=>'𝗳','𝗴'=>'𝗴','𝗵'=>'𝗵','𝗶'=>'𝗶','𝗷'=>'𝗷','𝗸'=>'𝗸','𝗹'=>'𝗹','𝗺'=>'𝗺','𝗻'=>'𝗻','𝗼'=>'𝗼','𝗽'=>'𝗽','𝗾'=>'𝗾','𝗿'=>'𝗿','𝘀'=>'𝘀','𝘁'=>'𝘁','𝘂'=>'𝘂','𝘃'=>'𝘃','𝘄'=>'𝘄','𝘅'=>'𝘅','𝘆'=>'𝘆','𝘇'=>'𝘇','𝘈'=>'𝘈','𝘉'=>'𝘉','𝘊'=>'𝘊','𝘋'=>'𝘋','𝘌'=>'𝘌','𝘍'=>'𝘍','𝘎'=>'𝘎','𝘏'=>'𝘏','𝘐'=>'𝘐','𝘑'=>'𝘑','𝘒'=>'𝘒','𝘓'=>'𝘓','𝘔'=>'𝘔','𝘕'=>'𝘕','𝘖'=>'𝘖','𝘗'=>'𝘗','𝘘'=>'𝘘','𝘙'=>'𝘙','𝘚'=>'𝘚','𝘛'=>'𝘛','𝘜'=>'𝘜','𝘝'=>'𝘝','𝘞'=>'𝘞','𝘟'=>'𝘟','𝘠'=>'𝘠','𝘡'=>'𝘡','𝘢'=>'𝘢','𝘣'=>'𝘣','𝘤'=>'𝘤','𝘥'=>'𝘥','𝘦'=>'𝘦','𝘧'=>'𝘧','𝘨'=>'𝘨','𝘩'=>'𝘩','𝘪'=>'𝘪','𝘫'=>'𝘫','𝘬'=>'𝘬','𝘭'=>'𝘭','𝘮'=>'𝘮','𝘯'=>'𝘯','𝘰'=>'𝘰','𝘱'=>'𝘱','𝘲'=>'𝘲','𝘳'=>'𝘳','𝘴'=>'𝘴','𝘵'=>'𝘵','𝘶'=>'𝘶','𝘷'=>'𝘷','𝘸'=>'𝘸','𝘹'=>'𝘹','𝘺'=>'𝘺','𝘻'=>'𝘻','𝘼'=>'𝘼','𝘽'=>'𝘽','𝘾'=>'𝘾','𝘿'=>'𝘿','𝙀'=>'𝙀','𝙁'=>'𝙁','𝙂'=>'𝙂','𝙃'=>'𝙃','𝙄'=>'𝙄','𝙅'=>'𝙅','𝙆'=>'𝙆','𝙇'=>'𝙇','𝙈'=>'𝙈','𝙉'=>'𝙉','𝙊'=>'𝙊','𝙋'=>'𝙋','𝙌'=>'𝙌','𝙍'=>'𝙍','𝙎'=>'𝙎','𝙏'=>'𝙏','𝙐'=>'𝙐','𝙑'=>'𝙑','𝙒'=>'𝙒','𝙓'=>'𝙓','𝙔'=>'𝙔','𝙕'=>'𝙕','𝙖'=>'𝙖','𝙗'=>'𝙗','𝙘'=>'𝙘','𝙙'=>'𝙙','𝙚'=>'𝙚','𝙛'=>'𝙛','𝙜'=>'𝙜','𝙝'=>'𝙝','𝙞'=>'𝙞','𝙟'=>'𝙟','𝙠'=>'𝙠','𝙡'=>'𝙡','𝙢'=>'𝙢','𝙣'=>'𝙣','𝙤'=>'𝙤','𝙥'=>'𝙥','𝙦'=>'𝙦','𝙧'=>'𝙧','𝙨'=>'𝙨','𝙩'=>'𝙩','𝙪'=>'𝙪','𝙫'=>'𝙫','𝙬'=>'𝙬','𝙭'=>'𝙭','𝙮'=>'𝙮','𝙯'=>'𝙯','𝙰'=>'𝙰','𝙱'=>'𝙱','𝙲'=>'𝙲','𝙳'=>'𝙳','𝙴'=>'𝙴','𝙵'=>'𝙵','𝙶'=>'𝙶','𝙷'=>'𝙷','𝙸'=>'𝙸','𝙹'=>'𝙹','𝙺'=>'𝙺','𝙻'=>'𝙻','𝙼'=>'𝙼','𝙽'=>'𝙽','𝙾'=>'𝙾','𝙿'=>'𝙿','𝚀'=>'𝚀','𝚁'=>'𝚁','𝚂'=>'𝚂','𝚃'=>'𝚃','𝚄'=>'𝚄','𝚅'=>'𝚅','𝚆'=>'𝚆','𝚇'=>'𝚇','𝚈'=>'𝚈','𝚉'=>'𝚉','𝚊'=>'𝚊','𝚋'=>'𝚋','𝚌'=>'𝚌','𝚍'=>'𝚍','𝚎'=>'𝚎','𝚏'=>'𝚏','𝚐'=>'𝚐','𝚑'=>'𝚑','𝚒'=>'𝚒','𝚓'=>'𝚓','𝚔'=>'𝚔','𝚕'=>'𝚕','𝚖'=>'𝚖','𝚗'=>'𝚗','𝚘'=>'𝚘','𝚙'=>'𝚙','𝚚'=>'𝚚','𝚛'=>'𝚛','𝚜'=>'𝚜','𝚝'=>'𝚝','𝚞'=>'𝚞','𝚟'=>'𝚟','𝚠'=>'𝚠','𝚡'=>'𝚡','𝚢'=>'𝚢','𝚣'=>'𝚣','𝚤'=>'𝚤','𝚥'=>'𝚥','𝚨'=>'𝚨','𝚩'=>'𝚩','𝚪'=>'𝚪','𝚫'=>'𝚫','𝚬'=>'𝚬','𝚭'=>'𝚭','𝚮'=>'𝚮','𝚯'=>'𝚯','𝚰'=>'𝚰','𝚱'=>'𝚱','𝚲'=>'𝚲','𝚳'=>'𝚳','𝚴'=>'𝚴','𝚵'=>'𝚵','𝚶'=>'𝚶','𝚷'=>'𝚷','𝚸'=>'𝚸','𝚹'=>'𝚹','𝚺'=>'𝚺','𝚻'=>'𝚻','𝚼'=>'𝚼','𝚽'=>'𝚽','𝚾'=>'𝚾','𝚿'=>'𝚿','𝛀'=>'𝛀','𝛂'=>'𝛂','𝛃'=>'𝛃','𝛄'=>'𝛄','𝛅'=>'𝛅','𝛆'=>'𝛆','𝛇'=>'𝛇','𝛈'=>'𝛈','𝛉'=>'𝛉','𝛊'=>'𝛊','𝛋'=>'𝛋','𝛌'=>'𝛌','𝛍'=>'𝛍','𝛎'=>'𝛎','𝛏'=>'𝛏','𝛐'=>'𝛐','𝛑'=>'𝛑','𝛒'=>'𝛒','𝛓'=>'𝛓','𝛔'=>'𝛔','𝛕'=>'𝛕','𝛖'=>'𝛖','𝛗'=>'𝛗','𝛘'=>'𝛘','𝛙'=>'𝛙','𝛚'=>'𝛚','𝛜'=>'𝛜','𝛝'=>'𝛝','𝛞'=>'𝛞','𝛟'=>'𝛟','𝛠'=>'𝛠','𝛡'=>'𝛡','𝛢'=>'𝛢','𝛣'=>'𝛣','𝛤'=>'𝛤','𝛥'=>'𝛥','𝛦'=>'𝛦','𝛧'=>'𝛧','𝛨'=>'𝛨','𝛩'=>'𝛩','𝛪'=>'𝛪','𝛫'=>'𝛫','𝛬'=>'𝛬','𝛭'=>'𝛭','𝛮'=>'𝛮','𝛯'=>'𝛯','𝛰'=>'𝛰','𝛱'=>'𝛱','𝛲'=>'𝛲','𝛳'=>'𝛳','𝛴'=>'𝛴','𝛵'=>'𝛵','𝛶'=>'𝛶','𝛷'=>'𝛷','𝛸'=>'𝛸','𝛹'=>'𝛹','𝛺'=>'𝛺','𝛼'=>'𝛼','𝛽'=>'𝛽','𝛾'=>'𝛾','𝛿'=>'𝛿','𝜀'=>'𝜀','𝜁'=>'𝜁','𝜂'=>'𝜂','𝜃'=>'𝜃','𝜄'=>'𝜄','𝜅'=>'𝜅','𝜆'=>'𝜆','𝜇'=>'𝜇','𝜈'=>'𝜈','𝜉'=>'𝜉','𝜊'=>'𝜊','𝜋'=>'𝜋','𝜌'=>'𝜌','𝜍'=>'𝜍','𝜎'=>'𝜎','𝜏'=>'𝜏','𝜐'=>'𝜐','𝜑'=>'𝜑','𝜒'=>'𝜒','𝜓'=>'𝜓','𝜔'=>'𝜔','𝜖'=>'𝜖','𝜗'=>'𝜗','𝜘'=>'𝜘','𝜙'=>'𝜙','𝜚'=>'𝜚','𝜛'=>'𝜛','𝜜'=>'𝜜','𝜝'=>'𝜝','𝜞'=>'𝜞','𝜟'=>'𝜟','𝜠'=>'𝜠','𝜡'=>'𝜡','𝜢'=>'𝜢','𝜣'=>'𝜣','𝜤'=>'𝜤','𝜥'=>'𝜥','𝜦'=>'𝜦','𝜧'=>'𝜧','𝜨'=>'𝜨','𝜩'=>'𝜩','𝜪'=>'𝜪','𝜫'=>'𝜫','𝜬'=>'𝜬','𝜭'=>'𝜭','𝜮'=>'𝜮','𝜯'=>'𝜯','𝜰'=>'𝜰','𝜱'=>'𝜱','𝜲'=>'𝜲','𝜳'=>'𝜳','𝜴'=>'𝜴','𝜶'=>'𝜶','𝜷'=>'𝜷','𝜸'=>'𝜸','𝜹'=>'𝜹','𝜺'=>'𝜺','𝜻'=>'𝜻','𝜼'=>'𝜼','𝜽'=>'𝜽','𝜾'=>'𝜾','𝜿'=>'𝜿','𝝀'=>'𝝀','𝝁'=>'𝝁','𝝂'=>'𝝂','𝝃'=>'𝝃','𝝄'=>'𝝄','𝝅'=>'𝝅','𝝆'=>'𝝆','𝝇'=>'𝝇','𝝈'=>'𝝈','𝝉'=>'𝝉','𝝊'=>'𝝊','𝝋'=>'𝝋','𝝌'=>'𝝌','𝝍'=>'𝝍','𝝎'=>'𝝎','𝝐'=>'𝝐','𝝑'=>'𝝑','𝝒'=>'𝝒','𝝓'=>'𝝓','𝝔'=>'𝝔','𝝕'=>'𝝕','𝝖'=>'𝝖','𝝗'=>'𝝗','𝝘'=>'𝝘','𝝙'=>'𝝙','𝝚'=>'𝝚','𝝛'=>'𝝛','𝝜'=>'𝝜','𝝝'=>'𝝝','𝝞'=>'𝝞','𝝟'=>'𝝟','𝝠'=>'𝝠','𝝡'=>'𝝡','𝝢'=>'𝝢','𝝣'=>'𝝣','𝝤'=>'𝝤','𝝥'=>'𝝥','𝝦'=>'𝝦','𝝧'=>'𝝧','𝝨'=>'𝝨','𝝩'=>'𝝩','𝝪'=>'𝝪','𝝫'=>'𝝫','𝝬'=>'𝝬','𝝭'=>'𝝭','𝝮'=>'𝝮','𝝰'=>'𝝰','𝝱'=>'𝝱','𝝲'=>'𝝲','𝝳'=>'𝝳','𝝴'=>'𝝴','𝝵'=>'𝝵','𝝶'=>'𝝶','𝝷'=>'𝝷','𝝸'=>'𝝸','𝝹'=>'𝝹','𝝺'=>'𝝺','𝝻'=>'𝝻','𝝼'=>'𝝼','𝝽'=>'𝝽','𝝾'=>'𝝾','𝝿'=>'𝝿','𝞀'=>'𝞀','𝞁'=>'𝞁','𝞂'=>'𝞂','𝞃'=>'𝞃','𝞄'=>'𝞄','𝞅'=>'𝞅','𝞆'=>'𝞆','𝞇'=>'𝞇','𝞈'=>'𝞈','𝞊'=>'𝞊','𝞋'=>'𝞋','𝞌'=>'𝞌','𝞍'=>'𝞍','𝞎'=>'𝞎','𝞏'=>'𝞏','𝞐'=>'𝞐','𝞑'=>'𝞑','𝞒'=>'𝞒','𝞓'=>'𝞓','𝞔'=>'𝞔','𝞕'=>'𝞕','𝞖'=>'𝞖','𝞗'=>'𝞗','𝞘'=>'𝞘','𝞙'=>'𝞙','𝞚'=>'𝞚','𝞛'=>'𝞛','𝞜'=>'𝞜','𝞝'=>'𝞝','𝞞'=>'𝞞','𝞟'=>'𝞟','𝞠'=>'𝞠','𝞡'=>'𝞡','𝞢'=>'𝞢','𝞣'=>'𝞣','𝞤'=>'𝞤','𝞥'=>'𝞥','𝞦'=>'𝞦','𝞧'=>'𝞧','𝞨'=>'𝞨','𝞪'=>'𝞪','𝞫'=>'𝞫','𝞬'=>'𝞬','𝞭'=>'𝞭','𝞮'=>'𝞮','𝞯'=>'𝞯','𝞰'=>'𝞰','𝞱'=>'𝞱','𝞲'=>'𝞲','𝞳'=>'𝞳','𝞴'=>'𝞴','𝞵'=>'𝞵','𝞶'=>'𝞶','𝞷'=>'𝞷','𝞸'=>'𝞸','𝞹'=>'𝞹','𝞺'=>'𝞺','𝞻'=>'𝞻','𝞼'=>'𝞼','𝞽'=>'𝞽','𝞾'=>'𝞾','𝞿'=>'𝞿','𝟀'=>'𝟀','𝟁'=>'𝟁','𝟂'=>'𝟂','𝟄'=>'𝟄','𝟅'=>'𝟅','𝟆'=>'𝟆','𝟇'=>'𝟇','𝟈'=>'𝟈','𝟉'=>'𝟉','𝟊'=>'𝟊','𝟋'=>'𝟋','𝟎'=>'0','𝟏'=>'1','𝟐'=>'2','𝟑'=>'3','𝟒'=>'4','𝟓'=>'5','𝟔'=>'6','𝟕'=>'7','𝟖'=>'8','𝟗'=>'9','𝟘'=>'0','𝟙'=>'1','𝟚'=>'2','𝟛'=>'3','𝟜'=>'4','𝟝'=>'5','𝟞'=>'6','𝟟'=>'7','𝟠'=>'8','𝟡'=>'9','𝟢'=>'0','𝟣'=>'1','𝟤'=>'2','𝟥'=>'3','𝟦'=>'4','𝟧'=>'5','𝟨'=>'6','𝟩'=>'7','𝟪'=>'8','𝟫'=>'9','𝟬'=>'0','𝟭'=>'1','𝟮'=>'2','𝟯'=>'3','𝟰'=>'4','𝟱'=>'5','𝟲'=>'6','𝟳'=>'7','𝟴'=>'8','𝟵'=>'9','𝟶'=>'0','𝟷'=>'1','𝟸'=>'2','𝟹'=>'3','𝟺'=>'4','𝟻'=>'5','𝟼'=>'6','𝟽'=>'7','𝟾'=>'8','𝟿'=>'9');
diff --git a/phpBB/includes/utf/data/search_indexer_6.php b/phpBB/includes/utf/data/search_indexer_6.php
index f6d2ac0665..1ccce03a51 100644
--- a/phpBB/includes/utf/data/search_indexer_6.php
+++ b/phpBB/includes/utf/data/search_indexer_6.php
@@ -1 +1 @@
-<?php return array('々'=>'々','〆'=>'〆','〇'=>'0','〡'=>'1','〢'=>'2','〣'=>'3','〤'=>'4','〥'=>'5','〦'=>'6','〧'=>'7','〨'=>'8','〩'=>'9','〪'=>'〪','〫'=>'〫','〬'=>'〬','〭'=>'〭','〮'=>'〮','〯'=>'〯','〱'=>'〱','〲'=>'〲','〳'=>'〳','〴'=>'〴','〵'=>'〵','〸'=>'10','〹'=>'20','〺'=>'30','〻'=>'〻','〼'=>'〼','ぁ'=>'ぁ','あ'=>'あ','ぃ'=>'ぃ','い'=>'い','ぅ'=>'ぅ','う'=>'う','ぇ'=>'ぇ','え'=>'え','ぉ'=>'ぉ','お'=>'お','か'=>'か','が'=>'が','き'=>'き','ぎ'=>'ぎ','く'=>'く','ぐ'=>'ぐ','け'=>'け','げ'=>'げ','こ'=>'こ','ご'=>'ご','さ'=>'さ','ざ'=>'ざ','し'=>'し','じ'=>'じ','す'=>'す','ず'=>'ず','せ'=>'せ','ぜ'=>'ぜ','そ'=>'そ','ぞ'=>'ぞ','た'=>'た','だ'=>'だ','ち'=>'ち','ぢ'=>'ぢ','っ'=>'っ','つ'=>'つ','づ'=>'づ','て'=>'て','で'=>'で','と'=>'と','ど'=>'ど','な'=>'な','に'=>'に','ぬ'=>'ぬ','ね'=>'ね','の'=>'の','は'=>'は','ば'=>'ば','ぱ'=>'ぱ','ひ'=>'ひ','び'=>'び','ぴ'=>'ぴ','ふ'=>'ふ','ぶ'=>'ぶ','ぷ'=>'ぷ','へ'=>'へ','べ'=>'べ','ぺ'=>'ぺ','ほ'=>'ほ','ぼ'=>'ぼ','ぽ'=>'ぽ','ま'=>'ま','み'=>'み','む'=>'む','め'=>'め','も'=>'も','ゃ'=>'ゃ','や'=>'や','ゅ'=>'ゅ','ゆ'=>'ゆ','ょ'=>'ょ','よ'=>'よ','ら'=>'ら','り'=>'り','る'=>'る','れ'=>'れ','ろ'=>'ろ','ゎ'=>'ゎ','わ'=>'わ','ゐ'=>'ゐ','ゑ'=>'ゑ','を'=>'を','ん'=>'ん','ゔ'=>'ゔ','ゕ'=>'ゕ','ゖ'=>'ゖ','゙'=>'゙','゚'=>'゚','ゝ'=>'ゝ','ゞ'=>'ゞ','ゟ'=>'ゟ','ァ'=>'ァ','ア'=>'ア','ィ'=>'ィ','イ'=>'イ','ゥ'=>'ゥ','ウ'=>'ウ','ェ'=>'ェ','エ'=>'エ','ォ'=>'ォ','オ'=>'オ','カ'=>'カ','ガ'=>'ガ','キ'=>'キ','ギ'=>'ギ','ク'=>'ク','グ'=>'グ','ケ'=>'ケ','ゲ'=>'ゲ','コ'=>'コ','ゴ'=>'ゴ','サ'=>'サ','ザ'=>'ザ','シ'=>'シ','ジ'=>'ジ','ス'=>'ス','ズ'=>'ズ','セ'=>'セ','ゼ'=>'ゼ','ソ'=>'ソ','ゾ'=>'ゾ','タ'=>'タ','ダ'=>'ダ','チ'=>'チ','ヂ'=>'ヂ','ッ'=>'ッ','ツ'=>'ツ','ヅ'=>'ヅ','テ'=>'テ','デ'=>'デ','ト'=>'ト','ド'=>'ド','ナ'=>'ナ','ニ'=>'ニ','ヌ'=>'ヌ','ネ'=>'ネ','ノ'=>'ノ','ハ'=>'ハ','バ'=>'バ','パ'=>'パ','ヒ'=>'ヒ','ビ'=>'ビ','ピ'=>'ピ','フ'=>'フ','ブ'=>'ブ','プ'=>'プ','ヘ'=>'ヘ','ベ'=>'ベ','ペ'=>'ペ','ホ'=>'ホ','ボ'=>'ボ','ポ'=>'ポ','マ'=>'マ','ミ'=>'ミ','ム'=>'ム','メ'=>'メ','モ'=>'モ','ャ'=>'ャ','ヤ'=>'ヤ','ュ'=>'ュ','ユ'=>'ユ','ョ'=>'ョ','ヨ'=>'ヨ','ラ'=>'ラ','リ'=>'リ','ル'=>'ル','レ'=>'レ','ロ'=>'ロ','ヮ'=>'ヮ','ワ'=>'ワ','ヰ'=>'ヰ','ヱ'=>'ヱ','ヲ'=>'ヲ','ン'=>'ン','ヴ'=>'ヴ','ヵ'=>'ヵ','ヶ'=>'ヶ','ヷ'=>'ヷ','ヸ'=>'ヸ','ヹ'=>'ヹ','ヺ'=>'ヺ','ー'=>'ー','ヽ'=>'ヽ','ヾ'=>'ヾ','ヿ'=>'ヿ','ㄅ'=>'ㄅ','ㄆ'=>'ㄆ','ㄇ'=>'ㄇ','ㄈ'=>'ㄈ','ㄉ'=>'ㄉ','ㄊ'=>'ㄊ','ㄋ'=>'ㄋ','ㄌ'=>'ㄌ','ㄍ'=>'ㄍ','ㄎ'=>'ㄎ','ㄏ'=>'ㄏ','ㄐ'=>'ㄐ','ㄑ'=>'ㄑ','ㄒ'=>'ㄒ','ㄓ'=>'ㄓ','ㄔ'=>'ㄔ','ㄕ'=>'ㄕ','ㄖ'=>'ㄖ','ㄗ'=>'ㄗ','ㄘ'=>'ㄘ','ㄙ'=>'ㄙ','ㄚ'=>'ㄚ','ㄛ'=>'ㄛ','ㄜ'=>'ㄜ','ㄝ'=>'ㄝ','ㄞ'=>'ㄞ','ㄟ'=>'ㄟ','ㄠ'=>'ㄠ','ㄡ'=>'ㄡ','ㄢ'=>'ㄢ','ㄣ'=>'ㄣ','ㄤ'=>'ㄤ','ㄥ'=>'ㄥ','ㄦ'=>'ㄦ','ㄧ'=>'ㄧ','ㄨ'=>'ㄨ','ㄩ'=>'ㄩ','ㄪ'=>'ㄪ','ㄫ'=>'ㄫ','ㄬ'=>'ㄬ','ㄱ'=>'ㄱ','ㄲ'=>'ㄲ','ㄳ'=>'ㄳ','ㄴ'=>'ㄴ','ㄵ'=>'ㄵ','ㄶ'=>'ㄶ','ㄷ'=>'ㄷ','ㄸ'=>'ㄸ','ㄹ'=>'ㄹ','ㄺ'=>'ㄺ','ㄻ'=>'ㄻ','ㄼ'=>'ㄼ','ㄽ'=>'ㄽ','ㄾ'=>'ㄾ','ㄿ'=>'ㄿ','ㅀ'=>'ㅀ','ㅁ'=>'ㅁ','ㅂ'=>'ㅂ','ㅃ'=>'ㅃ','ㅄ'=>'ㅄ','ㅅ'=>'ㅅ','ㅆ'=>'ㅆ','ㅇ'=>'ㅇ','ㅈ'=>'ㅈ','ㅉ'=>'ㅉ','ㅊ'=>'ㅊ','ㅋ'=>'ㅋ','ㅌ'=>'ㅌ','ㅍ'=>'ㅍ','ㅎ'=>'ㅎ','ㅏ'=>'ㅏ','ㅐ'=>'ㅐ','ㅑ'=>'ㅑ','ㅒ'=>'ㅒ','ㅓ'=>'ㅓ','ㅔ'=>'ㅔ','ㅕ'=>'ㅕ','ㅖ'=>'ㅖ','ㅗ'=>'ㅗ','ㅘ'=>'ㅘ','ㅙ'=>'ㅙ','ㅚ'=>'ㅚ','ㅛ'=>'ㅛ','ㅜ'=>'ㅜ','ㅝ'=>'ㅝ','ㅞ'=>'ㅞ','ㅟ'=>'ㅟ','ㅠ'=>'ㅠ','ㅡ'=>'ㅡ','ㅢ'=>'ㅢ','ㅣ'=>'ㅣ','ㅤ'=>'ㅤ','ㅥ'=>'ㅥ','ㅦ'=>'ㅦ','ㅧ'=>'ㅧ','ㅨ'=>'ㅨ','ㅩ'=>'ㅩ','ㅪ'=>'ㅪ','ㅫ'=>'ㅫ','ㅬ'=>'ㅬ','ㅭ'=>'ㅭ','ㅮ'=>'ㅮ','ㅯ'=>'ㅯ','ㅰ'=>'ㅰ','ㅱ'=>'ㅱ','ㅲ'=>'ㅲ','ㅳ'=>'ㅳ','ㅴ'=>'ㅴ','ㅵ'=>'ㅵ','ㅶ'=>'ㅶ','ㅷ'=>'ㅷ','ㅸ'=>'ㅸ','ㅹ'=>'ㅹ','ㅺ'=>'ㅺ','ㅻ'=>'ㅻ','ㅼ'=>'ㅼ','ㅽ'=>'ㅽ','ㅾ'=>'ㅾ','ㅿ'=>'ㅿ','ㆀ'=>'ㆀ','ㆁ'=>'ㆁ','ㆂ'=>'ㆂ','ㆃ'=>'ㆃ','ㆄ'=>'ㆄ','ㆅ'=>'ㆅ','ㆆ'=>'ㆆ','ㆇ'=>'ㆇ','ㆈ'=>'ㆈ','ㆉ'=>'ㆉ','ㆊ'=>'ㆊ','ㆋ'=>'ㆋ','ㆌ'=>'ㆌ','ㆍ'=>'ㆍ','ㆎ'=>'ㆎ','㆒'=>'1','㆓'=>'2','㆔'=>'3','㆕'=>'4','ㆠ'=>'ㆠ','ㆡ'=>'ㆡ','ㆢ'=>'ㆢ','ㆣ'=>'ㆣ','ㆤ'=>'ㆤ','ㆥ'=>'ㆥ','ㆦ'=>'ㆦ','ㆧ'=>'ㆧ','ㆨ'=>'ㆨ','ㆩ'=>'ㆩ','ㆪ'=>'ㆪ','ㆫ'=>'ㆫ','ㆬ'=>'ㆬ','ㆭ'=>'ㆭ','ㆮ'=>'ㆮ','ㆯ'=>'ㆯ','ㆰ'=>'ㆰ','ㆱ'=>'ㆱ','ㆲ'=>'ㆲ','ㆳ'=>'ㆳ','ㆴ'=>'ㆴ','ㆵ'=>'ㆵ','ㆶ'=>'ㆶ','ㆷ'=>'ㆷ','ㇰ'=>'ㇰ','ㇱ'=>'ㇱ','ㇲ'=>'ㇲ','ㇳ'=>'ㇳ','ㇴ'=>'ㇴ','ㇵ'=>'ㇵ','ㇶ'=>'ㇶ','ㇷ'=>'ㇷ','ㇸ'=>'ㇸ','ㇹ'=>'ㇹ','ㇺ'=>'ㇺ','ㇻ'=>'ㇻ','ㇼ'=>'ㇼ','ㇽ'=>'ㇽ','ㇾ'=>'ㇾ','ㇿ'=>'ㇿ','㈠'=>'1','㈡'=>'2','㈢'=>'3','㈣'=>'4','㈤'=>'5','㈥'=>'6','㈦'=>'7','㈧'=>'8','㈨'=>'9','㈩'=>'10','㉑'=>'21','㉒'=>'22','㉓'=>'23','㉔'=>'24','㉕'=>'25','㉖'=>'26','㉗'=>'27','㉘'=>'28','㉙'=>'29','㉚'=>'30','㉛'=>'31','㉜'=>'32','㉝'=>'33','㉞'=>'34','㉟'=>'35','㊀'=>'1','㊁'=>'2','㊂'=>'3','㊃'=>'4','㊄'=>'5','㊅'=>'6','㊆'=>'7','㊇'=>'8','㊈'=>'9','㊉'=>'10','㊱'=>'36','㊲'=>'37','㊳'=>'38','㊴'=>'39','㊵'=>'40','㊶'=>'41','㊷'=>'42','㊸'=>'43','㊹'=>'44','㊺'=>'45','㊻'=>'46','㊼'=>'47','㊽'=>'48','㊾'=>'49','㊿'=>'50','㐀'=>'㐀'); \ No newline at end of file
+<?php return array('々'=>'々','〆'=>'〆','〇'=>'0','〡'=>'1','〢'=>'2','〣'=>'3','〤'=>'4','〥'=>'5','〦'=>'6','〧'=>'7','〨'=>'8','〩'=>'9','〪'=>'〪','〫'=>'〫','〬'=>'〬','〭'=>'〭','〮'=>'〮','〯'=>'〯','〱'=>'〱','〲'=>'〲','〳'=>'〳','〴'=>'〴','〵'=>'〵','〸'=>'10','〹'=>'20','〺'=>'30','〻'=>'〻','〼'=>'〼','ぁ'=>'ぁ','あ'=>'あ','ぃ'=>'ぃ','い'=>'い','ぅ'=>'ぅ','う'=>'う','ぇ'=>'ぇ','え'=>'え','ぉ'=>'ぉ','お'=>'お','か'=>'か','が'=>'が','き'=>'き','ぎ'=>'ぎ','く'=>'く','ぐ'=>'ぐ','け'=>'け','げ'=>'げ','こ'=>'こ','ご'=>'ご','さ'=>'さ','ざ'=>'ざ','し'=>'し','じ'=>'じ','す'=>'す','ず'=>'ず','せ'=>'せ','ぜ'=>'ぜ','そ'=>'そ','ぞ'=>'ぞ','た'=>'た','だ'=>'だ','ち'=>'ち','ぢ'=>'ぢ','っ'=>'っ','つ'=>'つ','づ'=>'づ','て'=>'て','で'=>'で','と'=>'と','ど'=>'ど','な'=>'な','に'=>'に','ぬ'=>'ぬ','ね'=>'ね','の'=>'の','は'=>'は','ば'=>'ば','ぱ'=>'ぱ','ひ'=>'ひ','び'=>'び','ぴ'=>'ぴ','ふ'=>'ふ','ぶ'=>'ぶ','ぷ'=>'ぷ','へ'=>'へ','べ'=>'べ','ぺ'=>'ぺ','ほ'=>'ほ','ぼ'=>'ぼ','ぽ'=>'ぽ','ま'=>'ま','み'=>'み','む'=>'む','め'=>'め','も'=>'も','ゃ'=>'ゃ','や'=>'や','ゅ'=>'ゅ','ゆ'=>'ゆ','ょ'=>'ょ','よ'=>'よ','ら'=>'ら','り'=>'り','る'=>'る','れ'=>'れ','ろ'=>'ろ','ゎ'=>'ゎ','わ'=>'わ','ゐ'=>'ゐ','ゑ'=>'ゑ','を'=>'を','ん'=>'ん','ゔ'=>'ゔ','ゕ'=>'ゕ','ゖ'=>'ゖ','゙'=>'゙','゚'=>'゚','ゝ'=>'ゝ','ゞ'=>'ゞ','ゟ'=>'ゟ','ァ'=>'ァ','ア'=>'ア','ィ'=>'ィ','イ'=>'イ','ゥ'=>'ゥ','ウ'=>'ウ','ェ'=>'ェ','エ'=>'エ','ォ'=>'ォ','オ'=>'オ','カ'=>'カ','ガ'=>'ガ','キ'=>'キ','ギ'=>'ギ','ク'=>'ク','グ'=>'グ','ケ'=>'ケ','ゲ'=>'ゲ','コ'=>'コ','ゴ'=>'ゴ','サ'=>'サ','ザ'=>'ザ','シ'=>'シ','ジ'=>'ジ','ス'=>'ス','ズ'=>'ズ','セ'=>'セ','ゼ'=>'ゼ','ソ'=>'ソ','ゾ'=>'ゾ','タ'=>'タ','ダ'=>'ダ','チ'=>'チ','ヂ'=>'ヂ','ッ'=>'ッ','ツ'=>'ツ','ヅ'=>'ヅ','テ'=>'テ','デ'=>'デ','ト'=>'ト','ド'=>'ド','ナ'=>'ナ','ニ'=>'ニ','ヌ'=>'ヌ','ネ'=>'ネ','ノ'=>'ノ','ハ'=>'ハ','バ'=>'バ','パ'=>'パ','ヒ'=>'ヒ','ビ'=>'ビ','ピ'=>'ピ','フ'=>'フ','ブ'=>'ブ','プ'=>'プ','ヘ'=>'ヘ','ベ'=>'ベ','ペ'=>'ペ','ホ'=>'ホ','ボ'=>'ボ','ポ'=>'ポ','マ'=>'マ','ミ'=>'ミ','ム'=>'ム','メ'=>'メ','モ'=>'モ','ャ'=>'ャ','ヤ'=>'ヤ','ュ'=>'ュ','ユ'=>'ユ','ョ'=>'ョ','ヨ'=>'ヨ','ラ'=>'ラ','リ'=>'リ','ル'=>'ル','レ'=>'レ','ロ'=>'ロ','ヮ'=>'ヮ','ワ'=>'ワ','ヰ'=>'ヰ','ヱ'=>'ヱ','ヲ'=>'ヲ','ン'=>'ン','ヴ'=>'ヴ','ヵ'=>'ヵ','ヶ'=>'ヶ','ヷ'=>'ヷ','ヸ'=>'ヸ','ヹ'=>'ヹ','ヺ'=>'ヺ','ー'=>'ー','ヽ'=>'ヽ','ヾ'=>'ヾ','ヿ'=>'ヿ','ㄅ'=>'ㄅ','ㄆ'=>'ㄆ','ㄇ'=>'ㄇ','ㄈ'=>'ㄈ','ㄉ'=>'ㄉ','ㄊ'=>'ㄊ','ㄋ'=>'ㄋ','ㄌ'=>'ㄌ','ㄍ'=>'ㄍ','ㄎ'=>'ㄎ','ㄏ'=>'ㄏ','ㄐ'=>'ㄐ','ㄑ'=>'ㄑ','ㄒ'=>'ㄒ','ㄓ'=>'ㄓ','ㄔ'=>'ㄔ','ㄕ'=>'ㄕ','ㄖ'=>'ㄖ','ㄗ'=>'ㄗ','ㄘ'=>'ㄘ','ㄙ'=>'ㄙ','ㄚ'=>'ㄚ','ㄛ'=>'ㄛ','ㄜ'=>'ㄜ','ㄝ'=>'ㄝ','ㄞ'=>'ㄞ','ㄟ'=>'ㄟ','ㄠ'=>'ㄠ','ㄡ'=>'ㄡ','ㄢ'=>'ㄢ','ㄣ'=>'ㄣ','ㄤ'=>'ㄤ','ㄥ'=>'ㄥ','ㄦ'=>'ㄦ','ㄧ'=>'ㄧ','ㄨ'=>'ㄨ','ㄩ'=>'ㄩ','ㄪ'=>'ㄪ','ㄫ'=>'ㄫ','ㄬ'=>'ㄬ','ㄱ'=>'ㄱ','ㄲ'=>'ㄲ','ㄳ'=>'ㄳ','ㄴ'=>'ㄴ','ㄵ'=>'ㄵ','ㄶ'=>'ㄶ','ㄷ'=>'ㄷ','ㄸ'=>'ㄸ','ㄹ'=>'ㄹ','ㄺ'=>'ㄺ','ㄻ'=>'ㄻ','ㄼ'=>'ㄼ','ㄽ'=>'ㄽ','ㄾ'=>'ㄾ','ㄿ'=>'ㄿ','ㅀ'=>'ㅀ','ㅁ'=>'ㅁ','ㅂ'=>'ㅂ','ㅃ'=>'ㅃ','ㅄ'=>'ㅄ','ㅅ'=>'ㅅ','ㅆ'=>'ㅆ','ㅇ'=>'ㅇ','ㅈ'=>'ㅈ','ㅉ'=>'ㅉ','ㅊ'=>'ㅊ','ㅋ'=>'ㅋ','ㅌ'=>'ㅌ','ㅍ'=>'ㅍ','ㅎ'=>'ㅎ','ㅏ'=>'ㅏ','ㅐ'=>'ㅐ','ㅑ'=>'ㅑ','ㅒ'=>'ㅒ','ㅓ'=>'ㅓ','ㅔ'=>'ㅔ','ㅕ'=>'ㅕ','ㅖ'=>'ㅖ','ㅗ'=>'ㅗ','ㅘ'=>'ㅘ','ㅙ'=>'ㅙ','ㅚ'=>'ㅚ','ㅛ'=>'ㅛ','ㅜ'=>'ㅜ','ㅝ'=>'ㅝ','ㅞ'=>'ㅞ','ㅟ'=>'ㅟ','ㅠ'=>'ㅠ','ㅡ'=>'ㅡ','ㅢ'=>'ㅢ','ㅣ'=>'ㅣ','ㅤ'=>'ㅤ','ㅥ'=>'ㅥ','ㅦ'=>'ㅦ','ㅧ'=>'ㅧ','ㅨ'=>'ㅨ','ㅩ'=>'ㅩ','ㅪ'=>'ㅪ','ㅫ'=>'ㅫ','ㅬ'=>'ㅬ','ㅭ'=>'ㅭ','ㅮ'=>'ㅮ','ㅯ'=>'ㅯ','ㅰ'=>'ㅰ','ㅱ'=>'ㅱ','ㅲ'=>'ㅲ','ㅳ'=>'ㅳ','ㅴ'=>'ㅴ','ㅵ'=>'ㅵ','ㅶ'=>'ㅶ','ㅷ'=>'ㅷ','ㅸ'=>'ㅸ','ㅹ'=>'ㅹ','ㅺ'=>'ㅺ','ㅻ'=>'ㅻ','ㅼ'=>'ㅼ','ㅽ'=>'ㅽ','ㅾ'=>'ㅾ','ㅿ'=>'ㅿ','ㆀ'=>'ㆀ','ㆁ'=>'ㆁ','ㆂ'=>'ㆂ','ㆃ'=>'ㆃ','ㆄ'=>'ㆄ','ㆅ'=>'ㆅ','ㆆ'=>'ㆆ','ㆇ'=>'ㆇ','ㆈ'=>'ㆈ','ㆉ'=>'ㆉ','ㆊ'=>'ㆊ','ㆋ'=>'ㆋ','ㆌ'=>'ㆌ','ㆍ'=>'ㆍ','ㆎ'=>'ㆎ','㆒'=>'1','㆓'=>'2','㆔'=>'3','㆕'=>'4','ㆠ'=>'ㆠ','ㆡ'=>'ㆡ','ㆢ'=>'ㆢ','ㆣ'=>'ㆣ','ㆤ'=>'ㆤ','ㆥ'=>'ㆥ','ㆦ'=>'ㆦ','ㆧ'=>'ㆧ','ㆨ'=>'ㆨ','ㆩ'=>'ㆩ','ㆪ'=>'ㆪ','ㆫ'=>'ㆫ','ㆬ'=>'ㆬ','ㆭ'=>'ㆭ','ㆮ'=>'ㆮ','ㆯ'=>'ㆯ','ㆰ'=>'ㆰ','ㆱ'=>'ㆱ','ㆲ'=>'ㆲ','ㆳ'=>'ㆳ','ㆴ'=>'ㆴ','ㆵ'=>'ㆵ','ㆶ'=>'ㆶ','ㆷ'=>'ㆷ','ㇰ'=>'ㇰ','ㇱ'=>'ㇱ','ㇲ'=>'ㇲ','ㇳ'=>'ㇳ','ㇴ'=>'ㇴ','ㇵ'=>'ㇵ','ㇶ'=>'ㇶ','ㇷ'=>'ㇷ','ㇸ'=>'ㇸ','ㇹ'=>'ㇹ','ㇺ'=>'ㇺ','ㇻ'=>'ㇻ','ㇼ'=>'ㇼ','ㇽ'=>'ㇽ','ㇾ'=>'ㇾ','ㇿ'=>'ㇿ','㈠'=>'1','㈡'=>'2','㈢'=>'3','㈣'=>'4','㈤'=>'5','㈥'=>'6','㈦'=>'7','㈧'=>'8','㈨'=>'9','㈩'=>'10','㉑'=>'21','㉒'=>'22','㉓'=>'23','㉔'=>'24','㉕'=>'25','㉖'=>'26','㉗'=>'27','㉘'=>'28','㉙'=>'29','㉚'=>'30','㉛'=>'31','㉜'=>'32','㉝'=>'33','㉞'=>'34','㉟'=>'35','㊀'=>'1','㊁'=>'2','㊂'=>'3','㊃'=>'4','㊄'=>'5','㊅'=>'6','㊆'=>'7','㊇'=>'8','㊈'=>'9','㊉'=>'10','㊱'=>'36','㊲'=>'37','㊳'=>'38','㊴'=>'39','㊵'=>'40','㊶'=>'41','㊷'=>'42','㊸'=>'43','㊹'=>'44','㊺'=>'45','㊻'=>'46','㊼'=>'47','㊽'=>'48','㊾'=>'49','㊿'=>'50','㐀'=>'㐀');
diff --git a/phpBB/includes/utf/data/search_indexer_64.php b/phpBB/includes/utf/data/search_indexer_64.php
index 44d0beb624..b5002d4c42 100644
--- a/phpBB/includes/utf/data/search_indexer_64.php
+++ b/phpBB/includes/utf/data/search_indexer_64.php
@@ -1 +1 @@
-<?php return array('𠀀'=>'𠀀'); \ No newline at end of file
+<?php return array('𠀀'=>'𠀀');
diff --git a/phpBB/includes/utf/data/search_indexer_84.php b/phpBB/includes/utf/data/search_indexer_84.php
index 5c3f1d54b8..c038215e58 100644
--- a/phpBB/includes/utf/data/search_indexer_84.php
+++ b/phpBB/includes/utf/data/search_indexer_84.php
@@ -1 +1 @@
-<?php return array('𪛖'=>'𪛖'); \ No newline at end of file
+<?php return array('𪛖'=>'𪛖');
diff --git a/phpBB/includes/utf/data/search_indexer_9.php b/phpBB/includes/utf/data/search_indexer_9.php
index bdf188291f..a358f784b9 100644
--- a/phpBB/includes/utf/data/search_indexer_9.php
+++ b/phpBB/includes/utf/data/search_indexer_9.php
@@ -1 +1 @@
-<?php return array('䶵'=>'䶵','一'=>'一'); \ No newline at end of file
+<?php return array('䶵'=>'䶵','一'=>'一');
diff --git a/phpBB/includes/utf/data/search_indexer_95.php b/phpBB/includes/utf/data/search_indexer_95.php
index b0f8eed3aa..63d27fbcd6 100644
--- a/phpBB/includes/utf/data/search_indexer_95.php
+++ b/phpBB/includes/utf/data/search_indexer_95.php
@@ -1 +1 @@
-<?php return array('丽'=>'丽','丸'=>'丸','乁'=>'乁','𠄢'=>'𠄢','你'=>'你','侮'=>'侮','侻'=>'侻','倂'=>'倂','偺'=>'偺','備'=>'備','僧'=>'僧','像'=>'像','㒞'=>'㒞','𠘺'=>'𠘺','免'=>'免','兔'=>'兔','兤'=>'兤','具'=>'具','𠔜'=>'𠔜','㒹'=>'㒹','內'=>'內','再'=>'再','𠕋'=>'𠕋','冗'=>'冗','冤'=>'冤','仌'=>'仌','冬'=>'冬','况'=>'况','𩇟'=>'𩇟','凵'=>'凵','刃'=>'刃','㓟'=>'㓟','刻'=>'刻','剆'=>'剆','割'=>'割','剷'=>'剷','㔕'=>'㔕','勇'=>'勇','勉'=>'勉','勤'=>'勤','勺'=>'勺','包'=>'包','匆'=>'匆','北'=>'北','卉'=>'卉','卑'=>'卑','博'=>'博','即'=>'即','卽'=>'卽','卿'=>'卿','卿'=>'卿','卿'=>'卿','𠨬'=>'𠨬','灰'=>'灰','及'=>'及','叟'=>'叟','𠭣'=>'𠭣','叫'=>'叫','叱'=>'叱','吆'=>'吆','咞'=>'咞','吸'=>'吸','呈'=>'呈','周'=>'周','咢'=>'咢','哶'=>'哶','唐'=>'唐','啓'=>'啓','啣'=>'啣','善'=>'善','善'=>'善','喙'=>'喙','喫'=>'喫','喳'=>'喳','嗂'=>'嗂','圖'=>'圖','嘆'=>'嘆','圗'=>'圗','噑'=>'噑','噴'=>'噴','切'=>'切','壮'=>'壮','城'=>'城','埴'=>'埴','堍'=>'堍','型'=>'型','堲'=>'堲','報'=>'報','墬'=>'墬','𡓤'=>'𡓤','売'=>'売','壷'=>'壷','夆'=>'夆','多'=>'多','夢'=>'夢','奢'=>'奢','𡚨'=>'𡚨','𡛪'=>'𡛪','姬'=>'姬','娛'=>'娛','娧'=>'娧','姘'=>'姘','婦'=>'婦','㛮'=>'㛮','㛼'=>'㛼','嬈'=>'嬈','嬾'=>'嬾','嬾'=>'嬾','𡧈'=>'𡧈','寃'=>'寃','寘'=>'寘','寧'=>'寧','寳'=>'寳','𡬘'=>'𡬘','寿'=>'寿','将'=>'将','当'=>'当','尢'=>'尢','㞁'=>'㞁','屠'=>'屠','屮'=>'屮','峀'=>'峀','岍'=>'岍','𡷤'=>'𡷤','嵃'=>'嵃','𡷦'=>'𡷦','嵮'=>'嵮','嵫'=>'嵫','嵼'=>'嵼','巡'=>'巡','巢'=>'巢','㠯'=>'㠯','巽'=>'巽','帨'=>'帨','帽'=>'帽','幩'=>'幩','㡢'=>'㡢','𢆃'=>'𢆃','㡼'=>'㡼','庰'=>'庰','庳'=>'庳','庶'=>'庶','廊'=>'廊','𪎒'=>'𪎒','廾'=>'廾','𢌱'=>'𢌱','𢌱'=>'𢌱','舁'=>'舁','弢'=>'弢','弢'=>'弢','㣇'=>'㣇','𣊸'=>'𣊸','𦇚'=>'𦇚','形'=>'形','彫'=>'彫','㣣'=>'㣣','徚'=>'徚','忍'=>'忍','志'=>'志','忹'=>'忹','悁'=>'悁','㤺'=>'㤺','㤜'=>'㤜','悔'=>'悔','𢛔'=>'𢛔','惇'=>'惇','慈'=>'慈','慌'=>'慌','慎'=>'慎','慌'=>'慌','慺'=>'慺','憎'=>'憎','憲'=>'憲','憤'=>'憤','憯'=>'憯','懞'=>'懞','懲'=>'懲','懶'=>'懶','成'=>'成','戛'=>'戛','扝'=>'扝','抱'=>'抱','拔'=>'拔','捐'=>'捐','𢬌'=>'𢬌','挽'=>'挽','拼'=>'拼','捨'=>'捨','掃'=>'掃','揤'=>'揤','𢯱'=>'𢯱','搢'=>'搢','揅'=>'揅','掩'=>'掩','㨮'=>'㨮','摩'=>'摩','摾'=>'摾','撝'=>'撝','摷'=>'摷','㩬'=>'㩬','敏'=>'敏','敬'=>'敬','𣀊'=>'𣀊','旣'=>'旣','書'=>'書','晉'=>'晉','㬙'=>'㬙','暑'=>'暑','㬈'=>'㬈','㫤'=>'㫤','冒'=>'冒','冕'=>'冕','最'=>'最','暜'=>'暜','肭'=>'肭','䏙'=>'䏙','朗'=>'朗','望'=>'望','朡'=>'朡','杞'=>'杞','杓'=>'杓','𣏃'=>'𣏃','㭉'=>'㭉','柺'=>'柺','枅'=>'枅','桒'=>'桒','梅'=>'梅','𣑭'=>'𣑭','梎'=>'梎','栟'=>'栟','椔'=>'椔','㮝'=>'㮝','楂'=>'楂','榣'=>'榣','槪'=>'槪','檨'=>'檨','𣚣'=>'𣚣','櫛'=>'櫛','㰘'=>'㰘','次'=>'次','𣢧'=>'𣢧','歔'=>'歔','㱎'=>'㱎','歲'=>'歲','殟'=>'殟','殺'=>'殺','殻'=>'殻','𣪍'=>'𣪍','𡴋'=>'𡴋','𣫺'=>'𣫺','汎'=>'汎','𣲼'=>'𣲼','沿'=>'沿','泍'=>'泍','汧'=>'汧','洖'=>'洖','派'=>'派','海'=>'海','流'=>'流','浩'=>'浩','浸'=>'浸','涅'=>'涅','𣴞'=>'𣴞','洴'=>'洴','港'=>'港','湮'=>'湮','㴳'=>'㴳','滋'=>'滋','滇'=>'滇','𣻑'=>'𣻑','淹'=>'淹','潮'=>'潮','𣽞'=>'𣽞','𣾎'=>'𣾎','濆'=>'濆','瀹'=>'瀹','瀞'=>'瀞','瀛'=>'瀛','㶖'=>'㶖','灊'=>'灊','災'=>'災','灷'=>'灷','炭'=>'炭','𠔥'=>'𠔥','煅'=>'煅','𤉣'=>'𤉣','熜'=>'熜','𤎫'=>'𤎫','爨'=>'爨','爵'=>'爵','牐'=>'牐','𤘈'=>'𤘈','犀'=>'犀','犕'=>'犕','𤜵'=>'𤜵','𤠔'=>'𤠔','獺'=>'獺','王'=>'王','㺬'=>'㺬','玥'=>'玥','㺸'=>'㺸','㺸'=>'㺸','瑇'=>'瑇','瑜'=>'瑜','瑱'=>'瑱','璅'=>'璅','瓊'=>'瓊','㼛'=>'㼛','甤'=>'甤','𤰶'=>'𤰶','甾'=>'甾','𤲒'=>'𤲒','異'=>'異','𢆟'=>'𢆟','瘐'=>'瘐','𤾡'=>'𤾡','𤾸'=>'𤾸','𥁄'=>'𥁄','㿼'=>'㿼','䀈'=>'䀈','直'=>'直','𥃳'=>'𥃳','𥃲'=>'𥃲','𥄙'=>'𥄙','𥄳'=>'𥄳','眞'=>'眞','真'=>'真','真'=>'真','睊'=>'睊','䀹'=>'䀹','瞋'=>'瞋','䁆'=>'䁆','䂖'=>'䂖','𥐝'=>'𥐝','硎'=>'硎','碌'=>'碌','磌'=>'磌','䃣'=>'䃣','𥘦'=>'𥘦','祖'=>'祖','𥚚'=>'𥚚','𥛅'=>'𥛅','福'=>'福','秫'=>'秫','䄯'=>'䄯','穀'=>'穀','穊'=>'穊','穏'=>'穏','𥥼'=>'𥥼','𥪧'=>'𥪧','𥪧'=>'𥪧','竮'=>'竮','䈂'=>'䈂','𥮫'=>'𥮫','篆'=>'篆','築'=>'築','䈧'=>'䈧','𥲀'=>'𥲀','糒'=>'糒','䊠'=>'䊠','糨'=>'糨','糣'=>'糣','紀'=>'紀','𥾆'=>'𥾆','絣'=>'絣','䌁'=>'䌁','緇'=>'緇','縂'=>'縂','繅'=>'繅','䌴'=>'䌴','𦈨'=>'𦈨','𦉇'=>'𦉇','䍙'=>'䍙','𦋙'=>'𦋙','罺'=>'罺','𦌾'=>'𦌾','羕'=>'羕','翺'=>'翺','者'=>'者','𦓚'=>'𦓚','𦔣'=>'𦔣','聠'=>'聠','𦖨'=>'𦖨','聰'=>'聰','𣍟'=>'𣍟','䏕'=>'䏕','育'=>'育','脃'=>'脃','䐋'=>'䐋','脾'=>'脾','媵'=>'媵','𦞧'=>'𦞧','𦞵'=>'𦞵','𣎓'=>'𣎓','𣎜'=>'𣎜','舁'=>'舁','舄'=>'舄','辞'=>'辞','䑫'=>'䑫','芑'=>'芑','芋'=>'芋','芝'=>'芝','劳'=>'劳','花'=>'花','芳'=>'芳','芽'=>'芽','苦'=>'苦','𦬼'=>'𦬼','若'=>'若','茝'=>'茝','荣'=>'荣','莭'=>'莭','茣'=>'茣','莽'=>'莽','菧'=>'菧','著'=>'著','荓'=>'荓','菊'=>'菊','菌'=>'菌','菜'=>'菜','𦰶'=>'𦰶','𦵫'=>'𦵫','𦳕'=>'𦳕','䔫'=>'䔫','蓱'=>'蓱','蓳'=>'蓳','蔖'=>'蔖','𧏊'=>'𧏊','蕤'=>'蕤','𦼬'=>'𦼬','䕝'=>'䕝','䕡'=>'䕡','𦾱'=>'𦾱','𧃒'=>'𧃒','䕫'=>'䕫','虐'=>'虐','虜'=>'虜','虧'=>'虧','虩'=>'虩','蚩'=>'蚩','蚈'=>'蚈','蜎'=>'蜎','蛢'=>'蛢','蝹'=>'蝹','蜨'=>'蜨','蝫'=>'蝫','螆'=>'螆','䗗'=>'䗗','蟡'=>'蟡','蠁'=>'蠁','䗹'=>'䗹','衠'=>'衠','衣'=>'衣','𧙧'=>'𧙧','裗'=>'裗','裞'=>'裞','䘵'=>'䘵','裺'=>'裺','㒻'=>'㒻','𧢮'=>'𧢮','𧥦'=>'𧥦','䚾'=>'䚾','䛇'=>'䛇','誠'=>'誠','諭'=>'諭','變'=>'變','豕'=>'豕','𧲨'=>'𧲨','貫'=>'貫','賁'=>'賁','贛'=>'贛','起'=>'起','𧼯'=>'𧼯','𠠄'=>'𠠄','跋'=>'跋','趼'=>'趼','跰'=>'跰','𠣞'=>'𠣞','軔'=>'軔','輸'=>'輸','𨗒'=>'𨗒','𨗭'=>'𨗭','邔'=>'邔','郱'=>'郱','鄑'=>'鄑','𨜮'=>'𨜮','鄛'=>'鄛','鈸'=>'鈸','鋗'=>'鋗','鋘'=>'鋘','鉼'=>'鉼','鏹'=>'鏹','鐕'=>'鐕','𨯺'=>'𨯺','開'=>'開','䦕'=>'䦕','閷'=>'閷','𨵷'=>'𨵷','䧦'=>'䧦','雃'=>'雃','嶲'=>'嶲','霣'=>'霣','𩅅'=>'𩅅','𩈚'=>'𩈚','䩮'=>'䩮','䩶'=>'䩶','韠'=>'韠','𩐊'=>'𩐊','䪲'=>'䪲','𩒖'=>'𩒖','頋'=>'頋','頋'=>'頋','頩'=>'頩','𩖶'=>'𩖶','飢'=>'飢','䬳'=>'䬳','餩'=>'餩','馧'=>'馧','駂'=>'駂','駾'=>'駾','䯎'=>'䯎','𩬰'=>'𩬰','鬒'=>'鬒','鱀'=>'鱀','鳽'=>'鳽','䳎'=>'䳎','䳭'=>'䳭','鵧'=>'鵧','𪃎'=>'𪃎','䳸'=>'䳸','𪄅'=>'𪄅','𪈎'=>'𪈎','𪊑'=>'𪊑','麻'=>'麻','䵖'=>'䵖','黹'=>'黹','黾'=>'黾','鼅'=>'鼅','鼏'=>'鼏','鼖'=>'鼖','鼻'=>'鼻','𪘀'=>'𪘀'); \ No newline at end of file
+<?php return array('丽'=>'丽','丸'=>'丸','乁'=>'乁','𠄢'=>'𠄢','你'=>'你','侮'=>'侮','侻'=>'侻','倂'=>'倂','偺'=>'偺','備'=>'備','僧'=>'僧','像'=>'像','㒞'=>'㒞','𠘺'=>'𠘺','免'=>'免','兔'=>'兔','兤'=>'兤','具'=>'具','𠔜'=>'𠔜','㒹'=>'㒹','內'=>'內','再'=>'再','𠕋'=>'𠕋','冗'=>'冗','冤'=>'冤','仌'=>'仌','冬'=>'冬','况'=>'况','𩇟'=>'𩇟','凵'=>'凵','刃'=>'刃','㓟'=>'㓟','刻'=>'刻','剆'=>'剆','割'=>'割','剷'=>'剷','㔕'=>'㔕','勇'=>'勇','勉'=>'勉','勤'=>'勤','勺'=>'勺','包'=>'包','匆'=>'匆','北'=>'北','卉'=>'卉','卑'=>'卑','博'=>'博','即'=>'即','卽'=>'卽','卿'=>'卿','卿'=>'卿','卿'=>'卿','𠨬'=>'𠨬','灰'=>'灰','及'=>'及','叟'=>'叟','𠭣'=>'𠭣','叫'=>'叫','叱'=>'叱','吆'=>'吆','咞'=>'咞','吸'=>'吸','呈'=>'呈','周'=>'周','咢'=>'咢','哶'=>'哶','唐'=>'唐','啓'=>'啓','啣'=>'啣','善'=>'善','善'=>'善','喙'=>'喙','喫'=>'喫','喳'=>'喳','嗂'=>'嗂','圖'=>'圖','嘆'=>'嘆','圗'=>'圗','噑'=>'噑','噴'=>'噴','切'=>'切','壮'=>'壮','城'=>'城','埴'=>'埴','堍'=>'堍','型'=>'型','堲'=>'堲','報'=>'報','墬'=>'墬','𡓤'=>'𡓤','売'=>'売','壷'=>'壷','夆'=>'夆','多'=>'多','夢'=>'夢','奢'=>'奢','𡚨'=>'𡚨','𡛪'=>'𡛪','姬'=>'姬','娛'=>'娛','娧'=>'娧','姘'=>'姘','婦'=>'婦','㛮'=>'㛮','㛼'=>'㛼','嬈'=>'嬈','嬾'=>'嬾','嬾'=>'嬾','𡧈'=>'𡧈','寃'=>'寃','寘'=>'寘','寧'=>'寧','寳'=>'寳','𡬘'=>'𡬘','寿'=>'寿','将'=>'将','当'=>'当','尢'=>'尢','㞁'=>'㞁','屠'=>'屠','屮'=>'屮','峀'=>'峀','岍'=>'岍','𡷤'=>'𡷤','嵃'=>'嵃','𡷦'=>'𡷦','嵮'=>'嵮','嵫'=>'嵫','嵼'=>'嵼','巡'=>'巡','巢'=>'巢','㠯'=>'㠯','巽'=>'巽','帨'=>'帨','帽'=>'帽','幩'=>'幩','㡢'=>'㡢','𢆃'=>'𢆃','㡼'=>'㡼','庰'=>'庰','庳'=>'庳','庶'=>'庶','廊'=>'廊','𪎒'=>'𪎒','廾'=>'廾','𢌱'=>'𢌱','𢌱'=>'𢌱','舁'=>'舁','弢'=>'弢','弢'=>'弢','㣇'=>'㣇','𣊸'=>'𣊸','𦇚'=>'𦇚','形'=>'形','彫'=>'彫','㣣'=>'㣣','徚'=>'徚','忍'=>'忍','志'=>'志','忹'=>'忹','悁'=>'悁','㤺'=>'㤺','㤜'=>'㤜','悔'=>'悔','𢛔'=>'𢛔','惇'=>'惇','慈'=>'慈','慌'=>'慌','慎'=>'慎','慌'=>'慌','慺'=>'慺','憎'=>'憎','憲'=>'憲','憤'=>'憤','憯'=>'憯','懞'=>'懞','懲'=>'懲','懶'=>'懶','成'=>'成','戛'=>'戛','扝'=>'扝','抱'=>'抱','拔'=>'拔','捐'=>'捐','𢬌'=>'𢬌','挽'=>'挽','拼'=>'拼','捨'=>'捨','掃'=>'掃','揤'=>'揤','𢯱'=>'𢯱','搢'=>'搢','揅'=>'揅','掩'=>'掩','㨮'=>'㨮','摩'=>'摩','摾'=>'摾','撝'=>'撝','摷'=>'摷','㩬'=>'㩬','敏'=>'敏','敬'=>'敬','𣀊'=>'𣀊','旣'=>'旣','書'=>'書','晉'=>'晉','㬙'=>'㬙','暑'=>'暑','㬈'=>'㬈','㫤'=>'㫤','冒'=>'冒','冕'=>'冕','最'=>'最','暜'=>'暜','肭'=>'肭','䏙'=>'䏙','朗'=>'朗','望'=>'望','朡'=>'朡','杞'=>'杞','杓'=>'杓','𣏃'=>'𣏃','㭉'=>'㭉','柺'=>'柺','枅'=>'枅','桒'=>'桒','梅'=>'梅','𣑭'=>'𣑭','梎'=>'梎','栟'=>'栟','椔'=>'椔','㮝'=>'㮝','楂'=>'楂','榣'=>'榣','槪'=>'槪','檨'=>'檨','𣚣'=>'𣚣','櫛'=>'櫛','㰘'=>'㰘','次'=>'次','𣢧'=>'𣢧','歔'=>'歔','㱎'=>'㱎','歲'=>'歲','殟'=>'殟','殺'=>'殺','殻'=>'殻','𣪍'=>'𣪍','𡴋'=>'𡴋','𣫺'=>'𣫺','汎'=>'汎','𣲼'=>'𣲼','沿'=>'沿','泍'=>'泍','汧'=>'汧','洖'=>'洖','派'=>'派','海'=>'海','流'=>'流','浩'=>'浩','浸'=>'浸','涅'=>'涅','𣴞'=>'𣴞','洴'=>'洴','港'=>'港','湮'=>'湮','㴳'=>'㴳','滋'=>'滋','滇'=>'滇','𣻑'=>'𣻑','淹'=>'淹','潮'=>'潮','𣽞'=>'𣽞','𣾎'=>'𣾎','濆'=>'濆','瀹'=>'瀹','瀞'=>'瀞','瀛'=>'瀛','㶖'=>'㶖','灊'=>'灊','災'=>'災','灷'=>'灷','炭'=>'炭','𠔥'=>'𠔥','煅'=>'煅','𤉣'=>'𤉣','熜'=>'熜','𤎫'=>'𤎫','爨'=>'爨','爵'=>'爵','牐'=>'牐','𤘈'=>'𤘈','犀'=>'犀','犕'=>'犕','𤜵'=>'𤜵','𤠔'=>'𤠔','獺'=>'獺','王'=>'王','㺬'=>'㺬','玥'=>'玥','㺸'=>'㺸','㺸'=>'㺸','瑇'=>'瑇','瑜'=>'瑜','瑱'=>'瑱','璅'=>'璅','瓊'=>'瓊','㼛'=>'㼛','甤'=>'甤','𤰶'=>'𤰶','甾'=>'甾','𤲒'=>'𤲒','異'=>'異','𢆟'=>'𢆟','瘐'=>'瘐','𤾡'=>'𤾡','𤾸'=>'𤾸','𥁄'=>'𥁄','㿼'=>'㿼','䀈'=>'䀈','直'=>'直','𥃳'=>'𥃳','𥃲'=>'𥃲','𥄙'=>'𥄙','𥄳'=>'𥄳','眞'=>'眞','真'=>'真','真'=>'真','睊'=>'睊','䀹'=>'䀹','瞋'=>'瞋','䁆'=>'䁆','䂖'=>'䂖','𥐝'=>'𥐝','硎'=>'硎','碌'=>'碌','磌'=>'磌','䃣'=>'䃣','𥘦'=>'𥘦','祖'=>'祖','𥚚'=>'𥚚','𥛅'=>'𥛅','福'=>'福','秫'=>'秫','䄯'=>'䄯','穀'=>'穀','穊'=>'穊','穏'=>'穏','𥥼'=>'𥥼','𥪧'=>'𥪧','𥪧'=>'𥪧','竮'=>'竮','䈂'=>'䈂','𥮫'=>'𥮫','篆'=>'篆','築'=>'築','䈧'=>'䈧','𥲀'=>'𥲀','糒'=>'糒','䊠'=>'䊠','糨'=>'糨','糣'=>'糣','紀'=>'紀','𥾆'=>'𥾆','絣'=>'絣','䌁'=>'䌁','緇'=>'緇','縂'=>'縂','繅'=>'繅','䌴'=>'䌴','𦈨'=>'𦈨','𦉇'=>'𦉇','䍙'=>'䍙','𦋙'=>'𦋙','罺'=>'罺','𦌾'=>'𦌾','羕'=>'羕','翺'=>'翺','者'=>'者','𦓚'=>'𦓚','𦔣'=>'𦔣','聠'=>'聠','𦖨'=>'𦖨','聰'=>'聰','𣍟'=>'𣍟','䏕'=>'䏕','育'=>'育','脃'=>'脃','䐋'=>'䐋','脾'=>'脾','媵'=>'媵','𦞧'=>'𦞧','𦞵'=>'𦞵','𣎓'=>'𣎓','𣎜'=>'𣎜','舁'=>'舁','舄'=>'舄','辞'=>'辞','䑫'=>'䑫','芑'=>'芑','芋'=>'芋','芝'=>'芝','劳'=>'劳','花'=>'花','芳'=>'芳','芽'=>'芽','苦'=>'苦','𦬼'=>'𦬼','若'=>'若','茝'=>'茝','荣'=>'荣','莭'=>'莭','茣'=>'茣','莽'=>'莽','菧'=>'菧','著'=>'著','荓'=>'荓','菊'=>'菊','菌'=>'菌','菜'=>'菜','𦰶'=>'𦰶','𦵫'=>'𦵫','𦳕'=>'𦳕','䔫'=>'䔫','蓱'=>'蓱','蓳'=>'蓳','蔖'=>'蔖','𧏊'=>'𧏊','蕤'=>'蕤','𦼬'=>'𦼬','䕝'=>'䕝','䕡'=>'䕡','𦾱'=>'𦾱','𧃒'=>'𧃒','䕫'=>'䕫','虐'=>'虐','虜'=>'虜','虧'=>'虧','虩'=>'虩','蚩'=>'蚩','蚈'=>'蚈','蜎'=>'蜎','蛢'=>'蛢','蝹'=>'蝹','蜨'=>'蜨','蝫'=>'蝫','螆'=>'螆','䗗'=>'䗗','蟡'=>'蟡','蠁'=>'蠁','䗹'=>'䗹','衠'=>'衠','衣'=>'衣','𧙧'=>'𧙧','裗'=>'裗','裞'=>'裞','䘵'=>'䘵','裺'=>'裺','㒻'=>'㒻','𧢮'=>'𧢮','𧥦'=>'𧥦','䚾'=>'䚾','䛇'=>'䛇','誠'=>'誠','諭'=>'諭','變'=>'變','豕'=>'豕','𧲨'=>'𧲨','貫'=>'貫','賁'=>'賁','贛'=>'贛','起'=>'起','𧼯'=>'𧼯','𠠄'=>'𠠄','跋'=>'跋','趼'=>'趼','跰'=>'跰','𠣞'=>'𠣞','軔'=>'軔','輸'=>'輸','𨗒'=>'𨗒','𨗭'=>'𨗭','邔'=>'邔','郱'=>'郱','鄑'=>'鄑','𨜮'=>'𨜮','鄛'=>'鄛','鈸'=>'鈸','鋗'=>'鋗','鋘'=>'鋘','鉼'=>'鉼','鏹'=>'鏹','鐕'=>'鐕','𨯺'=>'𨯺','開'=>'開','䦕'=>'䦕','閷'=>'閷','𨵷'=>'𨵷','䧦'=>'䧦','雃'=>'雃','嶲'=>'嶲','霣'=>'霣','𩅅'=>'𩅅','𩈚'=>'𩈚','䩮'=>'䩮','䩶'=>'䩶','韠'=>'韠','𩐊'=>'𩐊','䪲'=>'䪲','𩒖'=>'𩒖','頋'=>'頋','頋'=>'頋','頩'=>'頩','𩖶'=>'𩖶','飢'=>'飢','䬳'=>'䬳','餩'=>'餩','馧'=>'馧','駂'=>'駂','駾'=>'駾','䯎'=>'䯎','𩬰'=>'𩬰','鬒'=>'鬒','鱀'=>'鱀','鳽'=>'鳽','䳎'=>'䳎','䳭'=>'䳭','鵧'=>'鵧','𪃎'=>'𪃎','䳸'=>'䳸','𪄅'=>'𪄅','𪈎'=>'𪈎','𪊑'=>'𪊑','麻'=>'麻','䵖'=>'䵖','黹'=>'黹','黾'=>'黾','鼅'=>'鼅','鼏'=>'鼏','鼖'=>'鼖','鼻'=>'鼻','𪘀'=>'𪘀');
diff --git a/phpBB/includes/utf/data/utf_canonical_comp.php b/phpBB/includes/utf/data/utf_canonical_comp.php
index a3ed3ee602..2de3149ee8 100644
--- a/phpBB/includes/utf/data/utf_canonical_comp.php
+++ b/phpBB/includes/utf/data/utf_canonical_comp.php
@@ -1,2 +1,2 @@
<?php
-$GLOBALS['utf_canonical_comp']=array('À'=>'À','Á'=>'Á','Â'=>'Â','Ã'=>'Ã','Ä'=>'Ä','Å'=>'Å','Ç'=>'Ç','È'=>'È','É'=>'É','Ê'=>'Ê','Ë'=>'Ë','Ì'=>'Ì','Í'=>'Í','Î'=>'Î','Ï'=>'Ï','Ñ'=>'Ñ','Ò'=>'Ò','Ó'=>'Ó','Ô'=>'Ô','Õ'=>'Õ','Ö'=>'Ö','Ù'=>'Ù','Ú'=>'Ú','Û'=>'Û','Ü'=>'Ü','Ý'=>'Ý','à'=>'à','á'=>'á','â'=>'â','ã'=>'ã','ä'=>'ä','å'=>'å','ç'=>'ç','è'=>'è','é'=>'é','ê'=>'ê','ë'=>'ë','ì'=>'ì','í'=>'í','î'=>'î','ï'=>'ï','ñ'=>'ñ','ò'=>'ò','ó'=>'ó','ô'=>'ô','õ'=>'õ','ö'=>'ö','ù'=>'ù','ú'=>'ú','û'=>'û','ü'=>'ü','ý'=>'ý','ÿ'=>'ÿ','Ā'=>'Ā','ā'=>'ā','Ă'=>'Ă','ă'=>'ă','Ą'=>'Ą','ą'=>'ą','Ć'=>'Ć','ć'=>'ć','Ĉ'=>'Ĉ','ĉ'=>'ĉ','Ċ'=>'Ċ','ċ'=>'ċ','Č'=>'Č','č'=>'č','Ď'=>'Ď','ď'=>'ď','Ē'=>'Ē','ē'=>'ē','Ĕ'=>'Ĕ','ĕ'=>'ĕ','Ė'=>'Ė','ė'=>'ė','Ę'=>'Ę','ę'=>'ę','Ě'=>'Ě','ě'=>'ě','Ĝ'=>'Ĝ','ĝ'=>'ĝ','Ğ'=>'Ğ','ğ'=>'ğ','Ġ'=>'Ġ','ġ'=>'ġ','Ģ'=>'Ģ','ģ'=>'ģ','Ĥ'=>'Ĥ','ĥ'=>'ĥ','Ĩ'=>'Ĩ','ĩ'=>'ĩ','Ī'=>'Ī','ī'=>'ī','Ĭ'=>'Ĭ','ĭ'=>'ĭ','Į'=>'Į','į'=>'į','İ'=>'İ','Ĵ'=>'Ĵ','ĵ'=>'ĵ','Ķ'=>'Ķ','ķ'=>'ķ','Ĺ'=>'Ĺ','ĺ'=>'ĺ','Ļ'=>'Ļ','ļ'=>'ļ','Ľ'=>'Ľ','ľ'=>'ľ','Ń'=>'Ń','ń'=>'ń','Ņ'=>'Ņ','ņ'=>'ņ','Ň'=>'Ň','ň'=>'ň','Ō'=>'Ō','ō'=>'ō','Ŏ'=>'Ŏ','ŏ'=>'ŏ','Ő'=>'Ő','ő'=>'ő','Ŕ'=>'Ŕ','ŕ'=>'ŕ','Ŗ'=>'Ŗ','ŗ'=>'ŗ','Ř'=>'Ř','ř'=>'ř','Ś'=>'Ś','ś'=>'ś','Ŝ'=>'Ŝ','ŝ'=>'ŝ','Ş'=>'Ş','ş'=>'ş','Š'=>'Š','š'=>'š','Ţ'=>'Ţ','ţ'=>'ţ','Ť'=>'Ť','ť'=>'ť','Ũ'=>'Ũ','ũ'=>'ũ','Ū'=>'Ū','ū'=>'ū','Ŭ'=>'Ŭ','ŭ'=>'ŭ','Ů'=>'Ů','ů'=>'ů','Ű'=>'Ű','ű'=>'ű','Ų'=>'Ų','ų'=>'ų','Ŵ'=>'Ŵ','ŵ'=>'ŵ','Ŷ'=>'Ŷ','ŷ'=>'ŷ','Ÿ'=>'Ÿ','Ź'=>'Ź','ź'=>'ź','Ż'=>'Ż','ż'=>'ż','Ž'=>'Ž','ž'=>'ž','Ơ'=>'Ơ','ơ'=>'ơ','Ư'=>'Ư','ư'=>'ư','Ǎ'=>'Ǎ','ǎ'=>'ǎ','Ǐ'=>'Ǐ','ǐ'=>'ǐ','Ǒ'=>'Ǒ','ǒ'=>'ǒ','Ǔ'=>'Ǔ','ǔ'=>'ǔ','Ǖ'=>'Ǖ','ǖ'=>'ǖ','Ǘ'=>'Ǘ','ǘ'=>'ǘ','Ǚ'=>'Ǚ','ǚ'=>'ǚ','Ǜ'=>'Ǜ','ǜ'=>'ǜ','Ǟ'=>'Ǟ','ǟ'=>'ǟ','Ǡ'=>'Ǡ','ǡ'=>'ǡ','Ǣ'=>'Ǣ','ǣ'=>'ǣ','Ǧ'=>'Ǧ','ǧ'=>'ǧ','Ǩ'=>'Ǩ','ǩ'=>'ǩ','Ǫ'=>'Ǫ','ǫ'=>'ǫ','Ǭ'=>'Ǭ','ǭ'=>'ǭ','Ǯ'=>'Ǯ','ǯ'=>'ǯ','ǰ'=>'ǰ','Ǵ'=>'Ǵ','ǵ'=>'ǵ','Ǹ'=>'Ǹ','ǹ'=>'ǹ','Ǻ'=>'Ǻ','ǻ'=>'ǻ','Ǽ'=>'Ǽ','ǽ'=>'ǽ','Ǿ'=>'Ǿ','ǿ'=>'ǿ','Ȁ'=>'Ȁ','ȁ'=>'ȁ','Ȃ'=>'Ȃ','ȃ'=>'ȃ','Ȅ'=>'Ȅ','ȅ'=>'ȅ','Ȇ'=>'Ȇ','ȇ'=>'ȇ','Ȉ'=>'Ȉ','ȉ'=>'ȉ','Ȋ'=>'Ȋ','ȋ'=>'ȋ','Ȍ'=>'Ȍ','ȍ'=>'ȍ','Ȏ'=>'Ȏ','ȏ'=>'ȏ','Ȑ'=>'Ȑ','ȑ'=>'ȑ','Ȓ'=>'Ȓ','ȓ'=>'ȓ','Ȕ'=>'Ȕ','ȕ'=>'ȕ','Ȗ'=>'Ȗ','ȗ'=>'ȗ','Ș'=>'Ș','ș'=>'ș','Ț'=>'Ț','ț'=>'ț','Ȟ'=>'Ȟ','ȟ'=>'ȟ','Ȧ'=>'Ȧ','ȧ'=>'ȧ','Ȩ'=>'Ȩ','ȩ'=>'ȩ','Ȫ'=>'Ȫ','ȫ'=>'ȫ','Ȭ'=>'Ȭ','ȭ'=>'ȭ','Ȯ'=>'Ȯ','ȯ'=>'ȯ','Ȱ'=>'Ȱ','ȱ'=>'ȱ','Ȳ'=>'Ȳ','ȳ'=>'ȳ','̈́'=>'̈́','΅'=>'΅','Ά'=>'Ά','Έ'=>'Έ','Ή'=>'Ή','Ί'=>'Ί','Ό'=>'Ό','Ύ'=>'Ύ','Ώ'=>'Ώ','ΐ'=>'ΐ','Ϊ'=>'Ϊ','Ϋ'=>'Ϋ','ά'=>'ά','έ'=>'έ','ή'=>'ή','ί'=>'ί','ΰ'=>'ΰ','ϊ'=>'ϊ','ϋ'=>'ϋ','ό'=>'ό','ύ'=>'ύ','ώ'=>'ώ','ϓ'=>'ϓ','ϔ'=>'ϔ','Ѐ'=>'Ѐ','Ё'=>'Ё','Ѓ'=>'Ѓ','Ї'=>'Ї','Ќ'=>'Ќ','Ѝ'=>'Ѝ','Ў'=>'Ў','Й'=>'Й','й'=>'й','ѐ'=>'ѐ','ё'=>'ё','ѓ'=>'ѓ','ї'=>'ї','ќ'=>'ќ','ѝ'=>'ѝ','ў'=>'ў','Ѷ'=>'Ѷ','ѷ'=>'ѷ','Ӂ'=>'Ӂ','ӂ'=>'ӂ','Ӑ'=>'Ӑ','ӑ'=>'ӑ','Ӓ'=>'Ӓ','ӓ'=>'ӓ','Ӗ'=>'Ӗ','ӗ'=>'ӗ','Ӛ'=>'Ӛ','ӛ'=>'ӛ','Ӝ'=>'Ӝ','ӝ'=>'ӝ','Ӟ'=>'Ӟ','ӟ'=>'ӟ','Ӣ'=>'Ӣ','ӣ'=>'ӣ','Ӥ'=>'Ӥ','ӥ'=>'ӥ','Ӧ'=>'Ӧ','ӧ'=>'ӧ','Ӫ'=>'Ӫ','ӫ'=>'ӫ','Ӭ'=>'Ӭ','ӭ'=>'ӭ','Ӯ'=>'Ӯ','ӯ'=>'ӯ','Ӱ'=>'Ӱ','ӱ'=>'ӱ','Ӳ'=>'Ӳ','ӳ'=>'ӳ','Ӵ'=>'Ӵ','ӵ'=>'ӵ','Ӹ'=>'Ӹ','ӹ'=>'ӹ','آ'=>'آ','أ'=>'أ','ؤ'=>'ؤ','إ'=>'إ','ئ'=>'ئ','ۀ'=>'ۀ','ۂ'=>'ۂ','ۓ'=>'ۓ','ऩ'=>'ऩ','ऱ'=>'ऱ','ऴ'=>'ऴ','ো'=>'ো','ৌ'=>'ৌ','ୈ'=>'ୈ','ୋ'=>'ୋ','ୌ'=>'ୌ','ஔ'=>'ஔ','ொ'=>'ொ','ோ'=>'ோ','ௌ'=>'ௌ','ై'=>'ై','ೀ'=>'ೀ','ೇ'=>'ೇ','ೈ'=>'ೈ','ೊ'=>'ೊ','ೋ'=>'ೋ','ൊ'=>'ൊ','ോ'=>'ോ','ൌ'=>'ൌ','ේ'=>'ේ','ො'=>'ො','ෝ'=>'ෝ','ෞ'=>'ෞ','ཱི'=>'ཱི','ཱུ'=>'ཱུ','ཱྀ'=>'ཱྀ','ဦ'=>'ဦ','ᬆ'=>'ᬆ','ᬈ'=>'ᬈ','ᬊ'=>'ᬊ','ᬌ'=>'ᬌ','ᬎ'=>'ᬎ','ᬒ'=>'ᬒ','ᬻ'=>'ᬻ','ᬽ'=>'ᬽ','ᭀ'=>'ᭀ','ᭁ'=>'ᭁ','ᭃ'=>'ᭃ','Ḁ'=>'Ḁ','ḁ'=>'ḁ','Ḃ'=>'Ḃ','ḃ'=>'ḃ','Ḅ'=>'Ḅ','ḅ'=>'ḅ','Ḇ'=>'Ḇ','ḇ'=>'ḇ','Ḉ'=>'Ḉ','ḉ'=>'ḉ','Ḋ'=>'Ḋ','ḋ'=>'ḋ','Ḍ'=>'Ḍ','ḍ'=>'ḍ','Ḏ'=>'Ḏ','ḏ'=>'ḏ','Ḑ'=>'Ḑ','ḑ'=>'ḑ','Ḓ'=>'Ḓ','ḓ'=>'ḓ','Ḕ'=>'Ḕ','ḕ'=>'ḕ','Ḗ'=>'Ḗ','ḗ'=>'ḗ','Ḙ'=>'Ḙ','ḙ'=>'ḙ','Ḛ'=>'Ḛ','ḛ'=>'ḛ','Ḝ'=>'Ḝ','ḝ'=>'ḝ','Ḟ'=>'Ḟ','ḟ'=>'ḟ','Ḡ'=>'Ḡ','ḡ'=>'ḡ','Ḣ'=>'Ḣ','ḣ'=>'ḣ','Ḥ'=>'Ḥ','ḥ'=>'ḥ','Ḧ'=>'Ḧ','ḧ'=>'ḧ','Ḩ'=>'Ḩ','ḩ'=>'ḩ','Ḫ'=>'Ḫ','ḫ'=>'ḫ','Ḭ'=>'Ḭ','ḭ'=>'ḭ','Ḯ'=>'Ḯ','ḯ'=>'ḯ','Ḱ'=>'Ḱ','ḱ'=>'ḱ','Ḳ'=>'Ḳ','ḳ'=>'ḳ','Ḵ'=>'Ḵ','ḵ'=>'ḵ','Ḷ'=>'Ḷ','ḷ'=>'ḷ','Ḹ'=>'Ḹ','ḹ'=>'ḹ','Ḻ'=>'Ḻ','ḻ'=>'ḻ','Ḽ'=>'Ḽ','ḽ'=>'ḽ','Ḿ'=>'Ḿ','ḿ'=>'ḿ','Ṁ'=>'Ṁ','ṁ'=>'ṁ','Ṃ'=>'Ṃ','ṃ'=>'ṃ','Ṅ'=>'Ṅ','ṅ'=>'ṅ','Ṇ'=>'Ṇ','ṇ'=>'ṇ','Ṉ'=>'Ṉ','ṉ'=>'ṉ','Ṋ'=>'Ṋ','ṋ'=>'ṋ','Ṍ'=>'Ṍ','ṍ'=>'ṍ','Ṏ'=>'Ṏ','ṏ'=>'ṏ','Ṑ'=>'Ṑ','ṑ'=>'ṑ','Ṓ'=>'Ṓ','ṓ'=>'ṓ','Ṕ'=>'Ṕ','ṕ'=>'ṕ','Ṗ'=>'Ṗ','ṗ'=>'ṗ','Ṙ'=>'Ṙ','ṙ'=>'ṙ','Ṛ'=>'Ṛ','ṛ'=>'ṛ','Ṝ'=>'Ṝ','ṝ'=>'ṝ','Ṟ'=>'Ṟ','ṟ'=>'ṟ','Ṡ'=>'Ṡ','ṡ'=>'ṡ','Ṣ'=>'Ṣ','ṣ'=>'ṣ','Ṥ'=>'Ṥ','ṥ'=>'ṥ','Ṧ'=>'Ṧ','ṧ'=>'ṧ','Ṩ'=>'Ṩ','ṩ'=>'ṩ','Ṫ'=>'Ṫ','ṫ'=>'ṫ','Ṭ'=>'Ṭ','ṭ'=>'ṭ','Ṯ'=>'Ṯ','ṯ'=>'ṯ','Ṱ'=>'Ṱ','ṱ'=>'ṱ','Ṳ'=>'Ṳ','ṳ'=>'ṳ','Ṵ'=>'Ṵ','ṵ'=>'ṵ','Ṷ'=>'Ṷ','ṷ'=>'ṷ','Ṹ'=>'Ṹ','ṹ'=>'ṹ','Ṻ'=>'Ṻ','ṻ'=>'ṻ','Ṽ'=>'Ṽ','ṽ'=>'ṽ','Ṿ'=>'Ṿ','ṿ'=>'ṿ','Ẁ'=>'Ẁ','ẁ'=>'ẁ','Ẃ'=>'Ẃ','ẃ'=>'ẃ','Ẅ'=>'Ẅ','ẅ'=>'ẅ','Ẇ'=>'Ẇ','ẇ'=>'ẇ','Ẉ'=>'Ẉ','ẉ'=>'ẉ','Ẋ'=>'Ẋ','ẋ'=>'ẋ','Ẍ'=>'Ẍ','ẍ'=>'ẍ','Ẏ'=>'Ẏ','ẏ'=>'ẏ','Ẑ'=>'Ẑ','ẑ'=>'ẑ','Ẓ'=>'Ẓ','ẓ'=>'ẓ','Ẕ'=>'Ẕ','ẕ'=>'ẕ','ẖ'=>'ẖ','ẗ'=>'ẗ','ẘ'=>'ẘ','ẙ'=>'ẙ','ẛ'=>'ẛ','Ạ'=>'Ạ','ạ'=>'ạ','Ả'=>'Ả','ả'=>'ả','Ấ'=>'Ấ','ấ'=>'ấ','Ầ'=>'Ầ','ầ'=>'ầ','Ẩ'=>'Ẩ','ẩ'=>'ẩ','Ẫ'=>'Ẫ','ẫ'=>'ẫ','Ậ'=>'Ậ','ậ'=>'ậ','Ắ'=>'Ắ','ắ'=>'ắ','Ằ'=>'Ằ','ằ'=>'ằ','Ẳ'=>'Ẳ','ẳ'=>'ẳ','Ẵ'=>'Ẵ','ẵ'=>'ẵ','Ặ'=>'Ặ','ặ'=>'ặ','Ẹ'=>'Ẹ','ẹ'=>'ẹ','Ẻ'=>'Ẻ','ẻ'=>'ẻ','Ẽ'=>'Ẽ','ẽ'=>'ẽ','Ế'=>'Ế','ế'=>'ế','Ề'=>'Ề','ề'=>'ề','Ể'=>'Ể','ể'=>'ể','Ễ'=>'Ễ','ễ'=>'ễ','Ệ'=>'Ệ','ệ'=>'ệ','Ỉ'=>'Ỉ','ỉ'=>'ỉ','Ị'=>'Ị','ị'=>'ị','Ọ'=>'Ọ','ọ'=>'ọ','Ỏ'=>'Ỏ','ỏ'=>'ỏ','Ố'=>'Ố','ố'=>'ố','Ồ'=>'Ồ','ồ'=>'ồ','Ổ'=>'Ổ','ổ'=>'ổ','Ỗ'=>'Ỗ','ỗ'=>'ỗ','Ộ'=>'Ộ','ộ'=>'ộ','Ớ'=>'Ớ','ớ'=>'ớ','Ờ'=>'Ờ','ờ'=>'ờ','Ở'=>'Ở','ở'=>'ở','Ỡ'=>'Ỡ','ỡ'=>'ỡ','Ợ'=>'Ợ','ợ'=>'ợ','Ụ'=>'Ụ','ụ'=>'ụ','Ủ'=>'Ủ','ủ'=>'ủ','Ứ'=>'Ứ','ứ'=>'ứ','Ừ'=>'Ừ','ừ'=>'ừ','Ử'=>'Ử','ử'=>'ử','Ữ'=>'Ữ','ữ'=>'ữ','Ự'=>'Ự','ự'=>'ự','Ỳ'=>'Ỳ','ỳ'=>'ỳ','Ỵ'=>'Ỵ','ỵ'=>'ỵ','Ỷ'=>'Ỷ','ỷ'=>'ỷ','Ỹ'=>'Ỹ','ỹ'=>'ỹ','ἀ'=>'ἀ','ἁ'=>'ἁ','ἂ'=>'ἂ','ἃ'=>'ἃ','ἄ'=>'ἄ','ἅ'=>'ἅ','ἆ'=>'ἆ','ἇ'=>'ἇ','Ἀ'=>'Ἀ','Ἁ'=>'Ἁ','Ἂ'=>'Ἂ','Ἃ'=>'Ἃ','Ἄ'=>'Ἄ','Ἅ'=>'Ἅ','Ἆ'=>'Ἆ','Ἇ'=>'Ἇ','ἐ'=>'ἐ','ἑ'=>'ἑ','ἒ'=>'ἒ','ἓ'=>'ἓ','ἔ'=>'ἔ','ἕ'=>'ἕ','Ἐ'=>'Ἐ','Ἑ'=>'Ἑ','Ἒ'=>'Ἒ','Ἓ'=>'Ἓ','Ἔ'=>'Ἔ','Ἕ'=>'Ἕ','ἠ'=>'ἠ','ἡ'=>'ἡ','ἢ'=>'ἢ','ἣ'=>'ἣ','ἤ'=>'ἤ','ἥ'=>'ἥ','ἦ'=>'ἦ','ἧ'=>'ἧ','Ἠ'=>'Ἠ','Ἡ'=>'Ἡ','Ἢ'=>'Ἢ','Ἣ'=>'Ἣ','Ἤ'=>'Ἤ','Ἥ'=>'Ἥ','Ἦ'=>'Ἦ','Ἧ'=>'Ἧ','ἰ'=>'ἰ','ἱ'=>'ἱ','ἲ'=>'ἲ','ἳ'=>'ἳ','ἴ'=>'ἴ','ἵ'=>'ἵ','ἶ'=>'ἶ','ἷ'=>'ἷ','Ἰ'=>'Ἰ','Ἱ'=>'Ἱ','Ἲ'=>'Ἲ','Ἳ'=>'Ἳ','Ἴ'=>'Ἴ','Ἵ'=>'Ἵ','Ἶ'=>'Ἶ','Ἷ'=>'Ἷ','ὀ'=>'ὀ','ὁ'=>'ὁ','ὂ'=>'ὂ','ὃ'=>'ὃ','ὄ'=>'ὄ','ὅ'=>'ὅ','Ὀ'=>'Ὀ','Ὁ'=>'Ὁ','Ὂ'=>'Ὂ','Ὃ'=>'Ὃ','Ὄ'=>'Ὄ','Ὅ'=>'Ὅ','ὐ'=>'ὐ','ὑ'=>'ὑ','ὒ'=>'ὒ','ὓ'=>'ὓ','ὔ'=>'ὔ','ὕ'=>'ὕ','ὖ'=>'ὖ','ὗ'=>'ὗ','Ὑ'=>'Ὑ','Ὓ'=>'Ὓ','Ὕ'=>'Ὕ','Ὗ'=>'Ὗ','ὠ'=>'ὠ','ὡ'=>'ὡ','ὢ'=>'ὢ','ὣ'=>'ὣ','ὤ'=>'ὤ','ὥ'=>'ὥ','ὦ'=>'ὦ','ὧ'=>'ὧ','Ὠ'=>'Ὠ','Ὡ'=>'Ὡ','Ὢ'=>'Ὢ','Ὣ'=>'Ὣ','Ὤ'=>'Ὤ','Ὥ'=>'Ὥ','Ὦ'=>'Ὦ','Ὧ'=>'Ὧ','ὰ'=>'ὰ','ὲ'=>'ὲ','ὴ'=>'ὴ','ὶ'=>'ὶ','ὸ'=>'ὸ','ὺ'=>'ὺ','ὼ'=>'ὼ','ᾀ'=>'ᾀ','ᾁ'=>'ᾁ','ᾂ'=>'ᾂ','ᾃ'=>'ᾃ','ᾄ'=>'ᾄ','ᾅ'=>'ᾅ','ᾆ'=>'ᾆ','ᾇ'=>'ᾇ','ᾈ'=>'ᾈ','ᾉ'=>'ᾉ','ᾊ'=>'ᾊ','ᾋ'=>'ᾋ','ᾌ'=>'ᾌ','ᾍ'=>'ᾍ','ᾎ'=>'ᾎ','ᾏ'=>'ᾏ','ᾐ'=>'ᾐ','ᾑ'=>'ᾑ','ᾒ'=>'ᾒ','ᾓ'=>'ᾓ','ᾔ'=>'ᾔ','ᾕ'=>'ᾕ','ᾖ'=>'ᾖ','ᾗ'=>'ᾗ','ᾘ'=>'ᾘ','ᾙ'=>'ᾙ','ᾚ'=>'ᾚ','ᾛ'=>'ᾛ','ᾜ'=>'ᾜ','ᾝ'=>'ᾝ','ᾞ'=>'ᾞ','ᾟ'=>'ᾟ','ᾠ'=>'ᾠ','ᾡ'=>'ᾡ','ᾢ'=>'ᾢ','ᾣ'=>'ᾣ','ᾤ'=>'ᾤ','ᾥ'=>'ᾥ','ᾦ'=>'ᾦ','ᾧ'=>'ᾧ','ᾨ'=>'ᾨ','ᾩ'=>'ᾩ','ᾪ'=>'ᾪ','ᾫ'=>'ᾫ','ᾬ'=>'ᾬ','ᾭ'=>'ᾭ','ᾮ'=>'ᾮ','ᾯ'=>'ᾯ','ᾰ'=>'ᾰ','ᾱ'=>'ᾱ','ᾲ'=>'ᾲ','ᾳ'=>'ᾳ','ᾴ'=>'ᾴ','ᾶ'=>'ᾶ','ᾷ'=>'ᾷ','Ᾰ'=>'Ᾰ','Ᾱ'=>'Ᾱ','Ὰ'=>'Ὰ','ᾼ'=>'ᾼ','῁'=>'῁','ῂ'=>'ῂ','ῃ'=>'ῃ','ῄ'=>'ῄ','ῆ'=>'ῆ','ῇ'=>'ῇ','Ὲ'=>'Ὲ','Ὴ'=>'Ὴ','ῌ'=>'ῌ','῍'=>'῍','῎'=>'῎','῏'=>'῏','ῐ'=>'ῐ','ῑ'=>'ῑ','ῒ'=>'ῒ','ῖ'=>'ῖ','ῗ'=>'ῗ','Ῐ'=>'Ῐ','Ῑ'=>'Ῑ','Ὶ'=>'Ὶ','῝'=>'῝','῞'=>'῞','῟'=>'῟','ῠ'=>'ῠ','ῡ'=>'ῡ','ῢ'=>'ῢ','ῤ'=>'ῤ','ῥ'=>'ῥ','ῦ'=>'ῦ','ῧ'=>'ῧ','Ῠ'=>'Ῠ','Ῡ'=>'Ῡ','Ὺ'=>'Ὺ','Ῥ'=>'Ῥ','῭'=>'῭','ῲ'=>'ῲ','ῳ'=>'ῳ','ῴ'=>'ῴ','ῶ'=>'ῶ','ῷ'=>'ῷ','Ὸ'=>'Ὸ','Ὼ'=>'Ὼ','ῼ'=>'ῼ','↚'=>'↚','↛'=>'↛','↮'=>'↮','⇍'=>'⇍','⇎'=>'⇎','⇏'=>'⇏','∄'=>'∄','∉'=>'∉','∌'=>'∌','∤'=>'∤','∦'=>'∦','≁'=>'≁','≄'=>'≄','≇'=>'≇','≉'=>'≉','≠'=>'≠','≢'=>'≢','≭'=>'≭','≮'=>'≮','≯'=>'≯','≰'=>'≰','≱'=>'≱','≴'=>'≴','≵'=>'≵','≸'=>'≸','≹'=>'≹','⊀'=>'⊀','⊁'=>'⊁','⊄'=>'⊄','⊅'=>'⊅','⊈'=>'⊈','⊉'=>'⊉','⊬'=>'⊬','⊭'=>'⊭','⊮'=>'⊮','⊯'=>'⊯','⋠'=>'⋠','⋡'=>'⋡','⋢'=>'⋢','⋣'=>'⋣','⋪'=>'⋪','⋫'=>'⋫','⋬'=>'⋬','⋭'=>'⋭','が'=>'が','ぎ'=>'ぎ','ぐ'=>'ぐ','げ'=>'げ','ご'=>'ご','ざ'=>'ざ','じ'=>'じ','ず'=>'ず','ぜ'=>'ぜ','ぞ'=>'ぞ','だ'=>'だ','ぢ'=>'ぢ','づ'=>'づ','で'=>'で','ど'=>'ど','ば'=>'ば','ぱ'=>'ぱ','び'=>'び','ぴ'=>'ぴ','ぶ'=>'ぶ','ぷ'=>'ぷ','べ'=>'べ','ぺ'=>'ぺ','ぼ'=>'ぼ','ぽ'=>'ぽ','ゔ'=>'ゔ','ゞ'=>'ゞ','ガ'=>'ガ','ギ'=>'ギ','グ'=>'グ','ゲ'=>'ゲ','ゴ'=>'ゴ','ザ'=>'ザ','ジ'=>'ジ','ズ'=>'ズ','ゼ'=>'ゼ','ゾ'=>'ゾ','ダ'=>'ダ','ヂ'=>'ヂ','ヅ'=>'ヅ','デ'=>'デ','ド'=>'ド','バ'=>'バ','パ'=>'パ','ビ'=>'ビ','ピ'=>'ピ','ブ'=>'ブ','プ'=>'プ','ベ'=>'ベ','ペ'=>'ペ','ボ'=>'ボ','ポ'=>'ポ','ヴ'=>'ヴ','ヷ'=>'ヷ','ヸ'=>'ヸ','ヹ'=>'ヹ','ヺ'=>'ヺ','ヾ'=>'ヾ'); \ No newline at end of file
+$GLOBALS['utf_canonical_comp']=array('À'=>'À','Á'=>'Á','Â'=>'Â','Ã'=>'Ã','Ä'=>'Ä','Å'=>'Å','Ç'=>'Ç','È'=>'È','É'=>'É','Ê'=>'Ê','Ë'=>'Ë','Ì'=>'Ì','Í'=>'Í','Î'=>'Î','Ï'=>'Ï','Ñ'=>'Ñ','Ò'=>'Ò','Ó'=>'Ó','Ô'=>'Ô','Õ'=>'Õ','Ö'=>'Ö','Ù'=>'Ù','Ú'=>'Ú','Û'=>'Û','Ü'=>'Ü','Ý'=>'Ý','à'=>'à','á'=>'á','â'=>'â','ã'=>'ã','ä'=>'ä','å'=>'å','ç'=>'ç','è'=>'è','é'=>'é','ê'=>'ê','ë'=>'ë','ì'=>'ì','í'=>'í','î'=>'î','ï'=>'ï','ñ'=>'ñ','ò'=>'ò','ó'=>'ó','ô'=>'ô','õ'=>'õ','ö'=>'ö','ù'=>'ù','ú'=>'ú','û'=>'û','ü'=>'ü','ý'=>'ý','ÿ'=>'ÿ','Ā'=>'Ā','ā'=>'ā','Ă'=>'Ă','ă'=>'ă','Ą'=>'Ą','ą'=>'ą','Ć'=>'Ć','ć'=>'ć','Ĉ'=>'Ĉ','ĉ'=>'ĉ','Ċ'=>'Ċ','ċ'=>'ċ','Č'=>'Č','č'=>'č','Ď'=>'Ď','ď'=>'ď','Ē'=>'Ē','ē'=>'ē','Ĕ'=>'Ĕ','ĕ'=>'ĕ','Ė'=>'Ė','ė'=>'ė','Ę'=>'Ę','ę'=>'ę','Ě'=>'Ě','ě'=>'ě','Ĝ'=>'Ĝ','ĝ'=>'ĝ','Ğ'=>'Ğ','ğ'=>'ğ','Ġ'=>'Ġ','ġ'=>'ġ','Ģ'=>'Ģ','ģ'=>'ģ','Ĥ'=>'Ĥ','ĥ'=>'ĥ','Ĩ'=>'Ĩ','ĩ'=>'ĩ','Ī'=>'Ī','ī'=>'ī','Ĭ'=>'Ĭ','ĭ'=>'ĭ','Į'=>'Į','į'=>'į','İ'=>'İ','Ĵ'=>'Ĵ','ĵ'=>'ĵ','Ķ'=>'Ķ','ķ'=>'ķ','Ĺ'=>'Ĺ','ĺ'=>'ĺ','Ļ'=>'Ļ','ļ'=>'ļ','Ľ'=>'Ľ','ľ'=>'ľ','Ń'=>'Ń','ń'=>'ń','Ņ'=>'Ņ','ņ'=>'ņ','Ň'=>'Ň','ň'=>'ň','Ō'=>'Ō','ō'=>'ō','Ŏ'=>'Ŏ','ŏ'=>'ŏ','Ő'=>'Ő','ő'=>'ő','Ŕ'=>'Ŕ','ŕ'=>'ŕ','Ŗ'=>'Ŗ','ŗ'=>'ŗ','Ř'=>'Ř','ř'=>'ř','Ś'=>'Ś','ś'=>'ś','Ŝ'=>'Ŝ','ŝ'=>'ŝ','Ş'=>'Ş','ş'=>'ş','Š'=>'Š','š'=>'š','Ţ'=>'Ţ','ţ'=>'ţ','Ť'=>'Ť','ť'=>'ť','Ũ'=>'Ũ','ũ'=>'ũ','Ū'=>'Ū','ū'=>'ū','Ŭ'=>'Ŭ','ŭ'=>'ŭ','Ů'=>'Ů','ů'=>'ů','Ű'=>'Ű','ű'=>'ű','Ų'=>'Ų','ų'=>'ų','Ŵ'=>'Ŵ','ŵ'=>'ŵ','Ŷ'=>'Ŷ','ŷ'=>'ŷ','Ÿ'=>'Ÿ','Ź'=>'Ź','ź'=>'ź','Ż'=>'Ż','ż'=>'ż','Ž'=>'Ž','ž'=>'ž','Ơ'=>'Ơ','ơ'=>'ơ','Ư'=>'Ư','ư'=>'ư','Ǎ'=>'Ǎ','ǎ'=>'ǎ','Ǐ'=>'Ǐ','ǐ'=>'ǐ','Ǒ'=>'Ǒ','ǒ'=>'ǒ','Ǔ'=>'Ǔ','ǔ'=>'ǔ','Ǖ'=>'Ǖ','ǖ'=>'ǖ','Ǘ'=>'Ǘ','ǘ'=>'ǘ','Ǚ'=>'Ǚ','ǚ'=>'ǚ','Ǜ'=>'Ǜ','ǜ'=>'ǜ','Ǟ'=>'Ǟ','ǟ'=>'ǟ','Ǡ'=>'Ǡ','ǡ'=>'ǡ','Ǣ'=>'Ǣ','ǣ'=>'ǣ','Ǧ'=>'Ǧ','ǧ'=>'ǧ','Ǩ'=>'Ǩ','ǩ'=>'ǩ','Ǫ'=>'Ǫ','ǫ'=>'ǫ','Ǭ'=>'Ǭ','ǭ'=>'ǭ','Ǯ'=>'Ǯ','ǯ'=>'ǯ','ǰ'=>'ǰ','Ǵ'=>'Ǵ','ǵ'=>'ǵ','Ǹ'=>'Ǹ','ǹ'=>'ǹ','Ǻ'=>'Ǻ','ǻ'=>'ǻ','Ǽ'=>'Ǽ','ǽ'=>'ǽ','Ǿ'=>'Ǿ','ǿ'=>'ǿ','Ȁ'=>'Ȁ','ȁ'=>'ȁ','Ȃ'=>'Ȃ','ȃ'=>'ȃ','Ȅ'=>'Ȅ','ȅ'=>'ȅ','Ȇ'=>'Ȇ','ȇ'=>'ȇ','Ȉ'=>'Ȉ','ȉ'=>'ȉ','Ȋ'=>'Ȋ','ȋ'=>'ȋ','Ȍ'=>'Ȍ','ȍ'=>'ȍ','Ȏ'=>'Ȏ','ȏ'=>'ȏ','Ȑ'=>'Ȑ','ȑ'=>'ȑ','Ȓ'=>'Ȓ','ȓ'=>'ȓ','Ȕ'=>'Ȕ','ȕ'=>'ȕ','Ȗ'=>'Ȗ','ȗ'=>'ȗ','Ș'=>'Ș','ș'=>'ș','Ț'=>'Ț','ț'=>'ț','Ȟ'=>'Ȟ','ȟ'=>'ȟ','Ȧ'=>'Ȧ','ȧ'=>'ȧ','Ȩ'=>'Ȩ','ȩ'=>'ȩ','Ȫ'=>'Ȫ','ȫ'=>'ȫ','Ȭ'=>'Ȭ','ȭ'=>'ȭ','Ȯ'=>'Ȯ','ȯ'=>'ȯ','Ȱ'=>'Ȱ','ȱ'=>'ȱ','Ȳ'=>'Ȳ','ȳ'=>'ȳ','̈́'=>'̈́','΅'=>'΅','Ά'=>'Ά','Έ'=>'Έ','Ή'=>'Ή','Ί'=>'Ί','Ό'=>'Ό','Ύ'=>'Ύ','Ώ'=>'Ώ','ΐ'=>'ΐ','Ϊ'=>'Ϊ','Ϋ'=>'Ϋ','ά'=>'ά','έ'=>'έ','ή'=>'ή','ί'=>'ί','ΰ'=>'ΰ','ϊ'=>'ϊ','ϋ'=>'ϋ','ό'=>'ό','ύ'=>'ύ','ώ'=>'ώ','ϓ'=>'ϓ','ϔ'=>'ϔ','Ѐ'=>'Ѐ','Ё'=>'Ё','Ѓ'=>'Ѓ','Ї'=>'Ї','Ќ'=>'Ќ','Ѝ'=>'Ѝ','Ў'=>'Ў','Й'=>'Й','й'=>'й','ѐ'=>'ѐ','ё'=>'ё','ѓ'=>'ѓ','ї'=>'ї','ќ'=>'ќ','ѝ'=>'ѝ','ў'=>'ў','Ѷ'=>'Ѷ','ѷ'=>'ѷ','Ӂ'=>'Ӂ','ӂ'=>'ӂ','Ӑ'=>'Ӑ','ӑ'=>'ӑ','Ӓ'=>'Ӓ','ӓ'=>'ӓ','Ӗ'=>'Ӗ','ӗ'=>'ӗ','Ӛ'=>'Ӛ','ӛ'=>'ӛ','Ӝ'=>'Ӝ','ӝ'=>'ӝ','Ӟ'=>'Ӟ','ӟ'=>'ӟ','Ӣ'=>'Ӣ','ӣ'=>'ӣ','Ӥ'=>'Ӥ','ӥ'=>'ӥ','Ӧ'=>'Ӧ','ӧ'=>'ӧ','Ӫ'=>'Ӫ','ӫ'=>'ӫ','Ӭ'=>'Ӭ','ӭ'=>'ӭ','Ӯ'=>'Ӯ','ӯ'=>'ӯ','Ӱ'=>'Ӱ','ӱ'=>'ӱ','Ӳ'=>'Ӳ','ӳ'=>'ӳ','Ӵ'=>'Ӵ','ӵ'=>'ӵ','Ӹ'=>'Ӹ','ӹ'=>'ӹ','آ'=>'آ','أ'=>'أ','ؤ'=>'ؤ','إ'=>'إ','ئ'=>'ئ','ۀ'=>'ۀ','ۂ'=>'ۂ','ۓ'=>'ۓ','ऩ'=>'ऩ','ऱ'=>'ऱ','ऴ'=>'ऴ','ো'=>'ো','ৌ'=>'ৌ','ୈ'=>'ୈ','ୋ'=>'ୋ','ୌ'=>'ୌ','ஔ'=>'ஔ','ொ'=>'ொ','ோ'=>'ோ','ௌ'=>'ௌ','ై'=>'ై','ೀ'=>'ೀ','ೇ'=>'ೇ','ೈ'=>'ೈ','ೊ'=>'ೊ','ೋ'=>'ೋ','ൊ'=>'ൊ','ോ'=>'ോ','ൌ'=>'ൌ','ේ'=>'ේ','ො'=>'ො','ෝ'=>'ෝ','ෞ'=>'ෞ','ཱི'=>'ཱི','ཱུ'=>'ཱུ','ཱྀ'=>'ཱྀ','ဦ'=>'ဦ','ᬆ'=>'ᬆ','ᬈ'=>'ᬈ','ᬊ'=>'ᬊ','ᬌ'=>'ᬌ','ᬎ'=>'ᬎ','ᬒ'=>'ᬒ','ᬻ'=>'ᬻ','ᬽ'=>'ᬽ','ᭀ'=>'ᭀ','ᭁ'=>'ᭁ','ᭃ'=>'ᭃ','Ḁ'=>'Ḁ','ḁ'=>'ḁ','Ḃ'=>'Ḃ','ḃ'=>'ḃ','Ḅ'=>'Ḅ','ḅ'=>'ḅ','Ḇ'=>'Ḇ','ḇ'=>'ḇ','Ḉ'=>'Ḉ','ḉ'=>'ḉ','Ḋ'=>'Ḋ','ḋ'=>'ḋ','Ḍ'=>'Ḍ','ḍ'=>'ḍ','Ḏ'=>'Ḏ','ḏ'=>'ḏ','Ḑ'=>'Ḑ','ḑ'=>'ḑ','Ḓ'=>'Ḓ','ḓ'=>'ḓ','Ḕ'=>'Ḕ','ḕ'=>'ḕ','Ḗ'=>'Ḗ','ḗ'=>'ḗ','Ḙ'=>'Ḙ','ḙ'=>'ḙ','Ḛ'=>'Ḛ','ḛ'=>'ḛ','Ḝ'=>'Ḝ','ḝ'=>'ḝ','Ḟ'=>'Ḟ','ḟ'=>'ḟ','Ḡ'=>'Ḡ','ḡ'=>'ḡ','Ḣ'=>'Ḣ','ḣ'=>'ḣ','Ḥ'=>'Ḥ','ḥ'=>'ḥ','Ḧ'=>'Ḧ','ḧ'=>'ḧ','Ḩ'=>'Ḩ','ḩ'=>'ḩ','Ḫ'=>'Ḫ','ḫ'=>'ḫ','Ḭ'=>'Ḭ','ḭ'=>'ḭ','Ḯ'=>'Ḯ','ḯ'=>'ḯ','Ḱ'=>'Ḱ','ḱ'=>'ḱ','Ḳ'=>'Ḳ','ḳ'=>'ḳ','Ḵ'=>'Ḵ','ḵ'=>'ḵ','Ḷ'=>'Ḷ','ḷ'=>'ḷ','Ḹ'=>'Ḹ','ḹ'=>'ḹ','Ḻ'=>'Ḻ','ḻ'=>'ḻ','Ḽ'=>'Ḽ','ḽ'=>'ḽ','Ḿ'=>'Ḿ','ḿ'=>'ḿ','Ṁ'=>'Ṁ','ṁ'=>'ṁ','Ṃ'=>'Ṃ','ṃ'=>'ṃ','Ṅ'=>'Ṅ','ṅ'=>'ṅ','Ṇ'=>'Ṇ','ṇ'=>'ṇ','Ṉ'=>'Ṉ','ṉ'=>'ṉ','Ṋ'=>'Ṋ','ṋ'=>'ṋ','Ṍ'=>'Ṍ','ṍ'=>'ṍ','Ṏ'=>'Ṏ','ṏ'=>'ṏ','Ṑ'=>'Ṑ','ṑ'=>'ṑ','Ṓ'=>'Ṓ','ṓ'=>'ṓ','Ṕ'=>'Ṕ','ṕ'=>'ṕ','Ṗ'=>'Ṗ','ṗ'=>'ṗ','Ṙ'=>'Ṙ','ṙ'=>'ṙ','Ṛ'=>'Ṛ','ṛ'=>'ṛ','Ṝ'=>'Ṝ','ṝ'=>'ṝ','Ṟ'=>'Ṟ','ṟ'=>'ṟ','Ṡ'=>'Ṡ','ṡ'=>'ṡ','Ṣ'=>'Ṣ','ṣ'=>'ṣ','Ṥ'=>'Ṥ','ṥ'=>'ṥ','Ṧ'=>'Ṧ','ṧ'=>'ṧ','Ṩ'=>'Ṩ','ṩ'=>'ṩ','Ṫ'=>'Ṫ','ṫ'=>'ṫ','Ṭ'=>'Ṭ','ṭ'=>'ṭ','Ṯ'=>'Ṯ','ṯ'=>'ṯ','Ṱ'=>'Ṱ','ṱ'=>'ṱ','Ṳ'=>'Ṳ','ṳ'=>'ṳ','Ṵ'=>'Ṵ','ṵ'=>'ṵ','Ṷ'=>'Ṷ','ṷ'=>'ṷ','Ṹ'=>'Ṹ','ṹ'=>'ṹ','Ṻ'=>'Ṻ','ṻ'=>'ṻ','Ṽ'=>'Ṽ','ṽ'=>'ṽ','Ṿ'=>'Ṿ','ṿ'=>'ṿ','Ẁ'=>'Ẁ','ẁ'=>'ẁ','Ẃ'=>'Ẃ','ẃ'=>'ẃ','Ẅ'=>'Ẅ','ẅ'=>'ẅ','Ẇ'=>'Ẇ','ẇ'=>'ẇ','Ẉ'=>'Ẉ','ẉ'=>'ẉ','Ẋ'=>'Ẋ','ẋ'=>'ẋ','Ẍ'=>'Ẍ','ẍ'=>'ẍ','Ẏ'=>'Ẏ','ẏ'=>'ẏ','Ẑ'=>'Ẑ','ẑ'=>'ẑ','Ẓ'=>'Ẓ','ẓ'=>'ẓ','Ẕ'=>'Ẕ','ẕ'=>'ẕ','ẖ'=>'ẖ','ẗ'=>'ẗ','ẘ'=>'ẘ','ẙ'=>'ẙ','ẛ'=>'ẛ','Ạ'=>'Ạ','ạ'=>'ạ','Ả'=>'Ả','ả'=>'ả','Ấ'=>'Ấ','ấ'=>'ấ','Ầ'=>'Ầ','ầ'=>'ầ','Ẩ'=>'Ẩ','ẩ'=>'ẩ','Ẫ'=>'Ẫ','ẫ'=>'ẫ','Ậ'=>'Ậ','ậ'=>'ậ','Ắ'=>'Ắ','ắ'=>'ắ','Ằ'=>'Ằ','ằ'=>'ằ','Ẳ'=>'Ẳ','ẳ'=>'ẳ','Ẵ'=>'Ẵ','ẵ'=>'ẵ','Ặ'=>'Ặ','ặ'=>'ặ','Ẹ'=>'Ẹ','ẹ'=>'ẹ','Ẻ'=>'Ẻ','ẻ'=>'ẻ','Ẽ'=>'Ẽ','ẽ'=>'ẽ','Ế'=>'Ế','ế'=>'ế','Ề'=>'Ề','ề'=>'ề','Ể'=>'Ể','ể'=>'ể','Ễ'=>'Ễ','ễ'=>'ễ','Ệ'=>'Ệ','ệ'=>'ệ','Ỉ'=>'Ỉ','ỉ'=>'ỉ','Ị'=>'Ị','ị'=>'ị','Ọ'=>'Ọ','ọ'=>'ọ','Ỏ'=>'Ỏ','ỏ'=>'ỏ','Ố'=>'Ố','ố'=>'ố','Ồ'=>'Ồ','ồ'=>'ồ','Ổ'=>'Ổ','ổ'=>'ổ','Ỗ'=>'Ỗ','ỗ'=>'ỗ','Ộ'=>'Ộ','ộ'=>'ộ','Ớ'=>'Ớ','ớ'=>'ớ','Ờ'=>'Ờ','ờ'=>'ờ','Ở'=>'Ở','ở'=>'ở','Ỡ'=>'Ỡ','ỡ'=>'ỡ','Ợ'=>'Ợ','ợ'=>'ợ','Ụ'=>'Ụ','ụ'=>'ụ','Ủ'=>'Ủ','ủ'=>'ủ','Ứ'=>'Ứ','ứ'=>'ứ','Ừ'=>'Ừ','ừ'=>'ừ','Ử'=>'Ử','ử'=>'ử','Ữ'=>'Ữ','ữ'=>'ữ','Ự'=>'Ự','ự'=>'ự','Ỳ'=>'Ỳ','ỳ'=>'ỳ','Ỵ'=>'Ỵ','ỵ'=>'ỵ','Ỷ'=>'Ỷ','ỷ'=>'ỷ','Ỹ'=>'Ỹ','ỹ'=>'ỹ','ἀ'=>'ἀ','ἁ'=>'ἁ','ἂ'=>'ἂ','ἃ'=>'ἃ','ἄ'=>'ἄ','ἅ'=>'ἅ','ἆ'=>'ἆ','ἇ'=>'ἇ','Ἀ'=>'Ἀ','Ἁ'=>'Ἁ','Ἂ'=>'Ἂ','Ἃ'=>'Ἃ','Ἄ'=>'Ἄ','Ἅ'=>'Ἅ','Ἆ'=>'Ἆ','Ἇ'=>'Ἇ','ἐ'=>'ἐ','ἑ'=>'ἑ','ἒ'=>'ἒ','ἓ'=>'ἓ','ἔ'=>'ἔ','ἕ'=>'ἕ','Ἐ'=>'Ἐ','Ἑ'=>'Ἑ','Ἒ'=>'Ἒ','Ἓ'=>'Ἓ','Ἔ'=>'Ἔ','Ἕ'=>'Ἕ','ἠ'=>'ἠ','ἡ'=>'ἡ','ἢ'=>'ἢ','ἣ'=>'ἣ','ἤ'=>'ἤ','ἥ'=>'ἥ','ἦ'=>'ἦ','ἧ'=>'ἧ','Ἠ'=>'Ἠ','Ἡ'=>'Ἡ','Ἢ'=>'Ἢ','Ἣ'=>'Ἣ','Ἤ'=>'Ἤ','Ἥ'=>'Ἥ','Ἦ'=>'Ἦ','Ἧ'=>'Ἧ','ἰ'=>'ἰ','ἱ'=>'ἱ','ἲ'=>'ἲ','ἳ'=>'ἳ','ἴ'=>'ἴ','ἵ'=>'ἵ','ἶ'=>'ἶ','ἷ'=>'ἷ','Ἰ'=>'Ἰ','Ἱ'=>'Ἱ','Ἲ'=>'Ἲ','Ἳ'=>'Ἳ','Ἴ'=>'Ἴ','Ἵ'=>'Ἵ','Ἶ'=>'Ἶ','Ἷ'=>'Ἷ','ὀ'=>'ὀ','ὁ'=>'ὁ','ὂ'=>'ὂ','ὃ'=>'ὃ','ὄ'=>'ὄ','ὅ'=>'ὅ','Ὀ'=>'Ὀ','Ὁ'=>'Ὁ','Ὂ'=>'Ὂ','Ὃ'=>'Ὃ','Ὄ'=>'Ὄ','Ὅ'=>'Ὅ','ὐ'=>'ὐ','ὑ'=>'ὑ','ὒ'=>'ὒ','ὓ'=>'ὓ','ὔ'=>'ὔ','ὕ'=>'ὕ','ὖ'=>'ὖ','ὗ'=>'ὗ','Ὑ'=>'Ὑ','Ὓ'=>'Ὓ','Ὕ'=>'Ὕ','Ὗ'=>'Ὗ','ὠ'=>'ὠ','ὡ'=>'ὡ','ὢ'=>'ὢ','ὣ'=>'ὣ','ὤ'=>'ὤ','ὥ'=>'ὥ','ὦ'=>'ὦ','ὧ'=>'ὧ','Ὠ'=>'Ὠ','Ὡ'=>'Ὡ','Ὢ'=>'Ὢ','Ὣ'=>'Ὣ','Ὤ'=>'Ὤ','Ὥ'=>'Ὥ','Ὦ'=>'Ὦ','Ὧ'=>'Ὧ','ὰ'=>'ὰ','ὲ'=>'ὲ','ὴ'=>'ὴ','ὶ'=>'ὶ','ὸ'=>'ὸ','ὺ'=>'ὺ','ὼ'=>'ὼ','ᾀ'=>'ᾀ','ᾁ'=>'ᾁ','ᾂ'=>'ᾂ','ᾃ'=>'ᾃ','ᾄ'=>'ᾄ','ᾅ'=>'ᾅ','ᾆ'=>'ᾆ','ᾇ'=>'ᾇ','ᾈ'=>'ᾈ','ᾉ'=>'ᾉ','ᾊ'=>'ᾊ','ᾋ'=>'ᾋ','ᾌ'=>'ᾌ','ᾍ'=>'ᾍ','ᾎ'=>'ᾎ','ᾏ'=>'ᾏ','ᾐ'=>'ᾐ','ᾑ'=>'ᾑ','ᾒ'=>'ᾒ','ᾓ'=>'ᾓ','ᾔ'=>'ᾔ','ᾕ'=>'ᾕ','ᾖ'=>'ᾖ','ᾗ'=>'ᾗ','ᾘ'=>'ᾘ','ᾙ'=>'ᾙ','ᾚ'=>'ᾚ','ᾛ'=>'ᾛ','ᾜ'=>'ᾜ','ᾝ'=>'ᾝ','ᾞ'=>'ᾞ','ᾟ'=>'ᾟ','ᾠ'=>'ᾠ','ᾡ'=>'ᾡ','ᾢ'=>'ᾢ','ᾣ'=>'ᾣ','ᾤ'=>'ᾤ','ᾥ'=>'ᾥ','ᾦ'=>'ᾦ','ᾧ'=>'ᾧ','ᾨ'=>'ᾨ','ᾩ'=>'ᾩ','ᾪ'=>'ᾪ','ᾫ'=>'ᾫ','ᾬ'=>'ᾬ','ᾭ'=>'ᾭ','ᾮ'=>'ᾮ','ᾯ'=>'ᾯ','ᾰ'=>'ᾰ','ᾱ'=>'ᾱ','ᾲ'=>'ᾲ','ᾳ'=>'ᾳ','ᾴ'=>'ᾴ','ᾶ'=>'ᾶ','ᾷ'=>'ᾷ','Ᾰ'=>'Ᾰ','Ᾱ'=>'Ᾱ','Ὰ'=>'Ὰ','ᾼ'=>'ᾼ','῁'=>'῁','ῂ'=>'ῂ','ῃ'=>'ῃ','ῄ'=>'ῄ','ῆ'=>'ῆ','ῇ'=>'ῇ','Ὲ'=>'Ὲ','Ὴ'=>'Ὴ','ῌ'=>'ῌ','῍'=>'῍','῎'=>'῎','῏'=>'῏','ῐ'=>'ῐ','ῑ'=>'ῑ','ῒ'=>'ῒ','ῖ'=>'ῖ','ῗ'=>'ῗ','Ῐ'=>'Ῐ','Ῑ'=>'Ῑ','Ὶ'=>'Ὶ','῝'=>'῝','῞'=>'῞','῟'=>'῟','ῠ'=>'ῠ','ῡ'=>'ῡ','ῢ'=>'ῢ','ῤ'=>'ῤ','ῥ'=>'ῥ','ῦ'=>'ῦ','ῧ'=>'ῧ','Ῠ'=>'Ῠ','Ῡ'=>'Ῡ','Ὺ'=>'Ὺ','Ῥ'=>'Ῥ','῭'=>'῭','ῲ'=>'ῲ','ῳ'=>'ῳ','ῴ'=>'ῴ','ῶ'=>'ῶ','ῷ'=>'ῷ','Ὸ'=>'Ὸ','Ὼ'=>'Ὼ','ῼ'=>'ῼ','↚'=>'↚','↛'=>'↛','↮'=>'↮','⇍'=>'⇍','⇎'=>'⇎','⇏'=>'⇏','∄'=>'∄','∉'=>'∉','∌'=>'∌','∤'=>'∤','∦'=>'∦','≁'=>'≁','≄'=>'≄','≇'=>'≇','≉'=>'≉','≠'=>'≠','≢'=>'≢','≭'=>'≭','≮'=>'≮','≯'=>'≯','≰'=>'≰','≱'=>'≱','≴'=>'≴','≵'=>'≵','≸'=>'≸','≹'=>'≹','⊀'=>'⊀','⊁'=>'⊁','⊄'=>'⊄','⊅'=>'⊅','⊈'=>'⊈','⊉'=>'⊉','⊬'=>'⊬','⊭'=>'⊭','⊮'=>'⊮','⊯'=>'⊯','⋠'=>'⋠','⋡'=>'⋡','⋢'=>'⋢','⋣'=>'⋣','⋪'=>'⋪','⋫'=>'⋫','⋬'=>'⋬','⋭'=>'⋭','が'=>'が','ぎ'=>'ぎ','ぐ'=>'ぐ','げ'=>'げ','ご'=>'ご','ざ'=>'ざ','じ'=>'じ','ず'=>'ず','ぜ'=>'ぜ','ぞ'=>'ぞ','だ'=>'だ','ぢ'=>'ぢ','づ'=>'づ','で'=>'で','ど'=>'ど','ば'=>'ば','ぱ'=>'ぱ','び'=>'び','ぴ'=>'ぴ','ぶ'=>'ぶ','ぷ'=>'ぷ','べ'=>'べ','ぺ'=>'ぺ','ぼ'=>'ぼ','ぽ'=>'ぽ','ゔ'=>'ゔ','ゞ'=>'ゞ','ガ'=>'ガ','ギ'=>'ギ','グ'=>'グ','ゲ'=>'ゲ','ゴ'=>'ゴ','ザ'=>'ザ','ジ'=>'ジ','ズ'=>'ズ','ゼ'=>'ゼ','ゾ'=>'ゾ','ダ'=>'ダ','ヂ'=>'ヂ','ヅ'=>'ヅ','デ'=>'デ','ド'=>'ド','バ'=>'バ','パ'=>'パ','ビ'=>'ビ','ピ'=>'ピ','ブ'=>'ブ','プ'=>'プ','ベ'=>'ベ','ペ'=>'ペ','ボ'=>'ボ','ポ'=>'ポ','ヴ'=>'ヴ','ヷ'=>'ヷ','ヸ'=>'ヸ','ヹ'=>'ヹ','ヺ'=>'ヺ','ヾ'=>'ヾ');
diff --git a/phpBB/includes/utf/data/utf_canonical_decomp.php b/phpBB/includes/utf/data/utf_canonical_decomp.php
index 460a0cf323..9fb90803e2 100644
--- a/phpBB/includes/utf/data/utf_canonical_decomp.php
+++ b/phpBB/includes/utf/data/utf_canonical_decomp.php
@@ -1,2 +1,2 @@
<?php
-$GLOBALS['utf_canonical_decomp']=array('À'=>'À','Á'=>'Á','Â'=>'Â','Ã'=>'Ã','Ä'=>'Ä','Å'=>'Å','Ç'=>'Ç','È'=>'È','É'=>'É','Ê'=>'Ê','Ë'=>'Ë','Ì'=>'Ì','Í'=>'Í','Î'=>'Î','Ï'=>'Ï','Ñ'=>'Ñ','Ò'=>'Ò','Ó'=>'Ó','Ô'=>'Ô','Õ'=>'Õ','Ö'=>'Ö','Ù'=>'Ù','Ú'=>'Ú','Û'=>'Û','Ü'=>'Ü','Ý'=>'Ý','à'=>'à','á'=>'á','â'=>'â','ã'=>'ã','ä'=>'ä','å'=>'å','ç'=>'ç','è'=>'è','é'=>'é','ê'=>'ê','ë'=>'ë','ì'=>'ì','í'=>'í','î'=>'î','ï'=>'ï','ñ'=>'ñ','ò'=>'ò','ó'=>'ó','ô'=>'ô','õ'=>'õ','ö'=>'ö','ù'=>'ù','ú'=>'ú','û'=>'û','ü'=>'ü','ý'=>'ý','ÿ'=>'ÿ','Ā'=>'Ā','ā'=>'ā','Ă'=>'Ă','ă'=>'ă','Ą'=>'Ą','ą'=>'ą','Ć'=>'Ć','ć'=>'ć','Ĉ'=>'Ĉ','ĉ'=>'ĉ','Ċ'=>'Ċ','ċ'=>'ċ','Č'=>'Č','č'=>'č','Ď'=>'Ď','ď'=>'ď','Ē'=>'Ē','ē'=>'ē','Ĕ'=>'Ĕ','ĕ'=>'ĕ','Ė'=>'Ė','ė'=>'ė','Ę'=>'Ę','ę'=>'ę','Ě'=>'Ě','ě'=>'ě','Ĝ'=>'Ĝ','ĝ'=>'ĝ','Ğ'=>'Ğ','ğ'=>'ğ','Ġ'=>'Ġ','ġ'=>'ġ','Ģ'=>'Ģ','ģ'=>'ģ','Ĥ'=>'Ĥ','ĥ'=>'ĥ','Ĩ'=>'Ĩ','ĩ'=>'ĩ','Ī'=>'Ī','ī'=>'ī','Ĭ'=>'Ĭ','ĭ'=>'ĭ','Į'=>'Į','į'=>'į','İ'=>'İ','Ĵ'=>'Ĵ','ĵ'=>'ĵ','Ķ'=>'Ķ','ķ'=>'ķ','Ĺ'=>'Ĺ','ĺ'=>'ĺ','Ļ'=>'Ļ','ļ'=>'ļ','Ľ'=>'Ľ','ľ'=>'ľ','Ń'=>'Ń','ń'=>'ń','Ņ'=>'Ņ','ņ'=>'ņ','Ň'=>'Ň','ň'=>'ň','Ō'=>'Ō','ō'=>'ō','Ŏ'=>'Ŏ','ŏ'=>'ŏ','Ő'=>'Ő','ő'=>'ő','Ŕ'=>'Ŕ','ŕ'=>'ŕ','Ŗ'=>'Ŗ','ŗ'=>'ŗ','Ř'=>'Ř','ř'=>'ř','Ś'=>'Ś','ś'=>'ś','Ŝ'=>'Ŝ','ŝ'=>'ŝ','Ş'=>'Ş','ş'=>'ş','Š'=>'Š','š'=>'š','Ţ'=>'Ţ','ţ'=>'ţ','Ť'=>'Ť','ť'=>'ť','Ũ'=>'Ũ','ũ'=>'ũ','Ū'=>'Ū','ū'=>'ū','Ŭ'=>'Ŭ','ŭ'=>'ŭ','Ů'=>'Ů','ů'=>'ů','Ű'=>'Ű','ű'=>'ű','Ų'=>'Ų','ų'=>'ų','Ŵ'=>'Ŵ','ŵ'=>'ŵ','Ŷ'=>'Ŷ','ŷ'=>'ŷ','Ÿ'=>'Ÿ','Ź'=>'Ź','ź'=>'ź','Ż'=>'Ż','ż'=>'ż','Ž'=>'Ž','ž'=>'ž','Ơ'=>'Ơ','ơ'=>'ơ','Ư'=>'Ư','ư'=>'ư','Ǎ'=>'Ǎ','ǎ'=>'ǎ','Ǐ'=>'Ǐ','ǐ'=>'ǐ','Ǒ'=>'Ǒ','ǒ'=>'ǒ','Ǔ'=>'Ǔ','ǔ'=>'ǔ','Ǖ'=>'Ǖ','ǖ'=>'ǖ','Ǘ'=>'Ǘ','ǘ'=>'ǘ','Ǚ'=>'Ǚ','ǚ'=>'ǚ','Ǜ'=>'Ǜ','ǜ'=>'ǜ','Ǟ'=>'Ǟ','ǟ'=>'ǟ','Ǡ'=>'Ǡ','ǡ'=>'ǡ','Ǣ'=>'Ǣ','ǣ'=>'ǣ','Ǧ'=>'Ǧ','ǧ'=>'ǧ','Ǩ'=>'Ǩ','ǩ'=>'ǩ','Ǫ'=>'Ǫ','ǫ'=>'ǫ','Ǭ'=>'Ǭ','ǭ'=>'ǭ','Ǯ'=>'Ǯ','ǯ'=>'ǯ','ǰ'=>'ǰ','Ǵ'=>'Ǵ','ǵ'=>'ǵ','Ǹ'=>'Ǹ','ǹ'=>'ǹ','Ǻ'=>'Ǻ','ǻ'=>'ǻ','Ǽ'=>'Ǽ','ǽ'=>'ǽ','Ǿ'=>'Ǿ','ǿ'=>'ǿ','Ȁ'=>'Ȁ','ȁ'=>'ȁ','Ȃ'=>'Ȃ','ȃ'=>'ȃ','Ȅ'=>'Ȅ','ȅ'=>'ȅ','Ȇ'=>'Ȇ','ȇ'=>'ȇ','Ȉ'=>'Ȉ','ȉ'=>'ȉ','Ȋ'=>'Ȋ','ȋ'=>'ȋ','Ȍ'=>'Ȍ','ȍ'=>'ȍ','Ȏ'=>'Ȏ','ȏ'=>'ȏ','Ȑ'=>'Ȑ','ȑ'=>'ȑ','Ȓ'=>'Ȓ','ȓ'=>'ȓ','Ȕ'=>'Ȕ','ȕ'=>'ȕ','Ȗ'=>'Ȗ','ȗ'=>'ȗ','Ș'=>'Ș','ș'=>'ș','Ț'=>'Ț','ț'=>'ț','Ȟ'=>'Ȟ','ȟ'=>'ȟ','Ȧ'=>'Ȧ','ȧ'=>'ȧ','Ȩ'=>'Ȩ','ȩ'=>'ȩ','Ȫ'=>'Ȫ','ȫ'=>'ȫ','Ȭ'=>'Ȭ','ȭ'=>'ȭ','Ȯ'=>'Ȯ','ȯ'=>'ȯ','Ȱ'=>'Ȱ','ȱ'=>'ȱ','Ȳ'=>'Ȳ','ȳ'=>'ȳ','̀'=>'̀','́'=>'́','̓'=>'̓','̈́'=>'̈́','ʹ'=>'ʹ',';'=>';','΅'=>'΅','Ά'=>'Ά','·'=>'·','Έ'=>'Έ','Ή'=>'Ή','Ί'=>'Ί','Ό'=>'Ό','Ύ'=>'Ύ','Ώ'=>'Ώ','ΐ'=>'ΐ','Ϊ'=>'Ϊ','Ϋ'=>'Ϋ','ά'=>'ά','έ'=>'έ','ή'=>'ή','ί'=>'ί','ΰ'=>'ΰ','ϊ'=>'ϊ','ϋ'=>'ϋ','ό'=>'ό','ύ'=>'ύ','ώ'=>'ώ','ϓ'=>'ϓ','ϔ'=>'ϔ','Ѐ'=>'Ѐ','Ё'=>'Ё','Ѓ'=>'Ѓ','Ї'=>'Ї','Ќ'=>'Ќ','Ѝ'=>'Ѝ','Ў'=>'Ў','Й'=>'Й','й'=>'й','ѐ'=>'ѐ','ё'=>'ё','ѓ'=>'ѓ','ї'=>'ї','ќ'=>'ќ','ѝ'=>'ѝ','ў'=>'ў','Ѷ'=>'Ѷ','ѷ'=>'ѷ','Ӂ'=>'Ӂ','ӂ'=>'ӂ','Ӑ'=>'Ӑ','ӑ'=>'ӑ','Ӓ'=>'Ӓ','ӓ'=>'ӓ','Ӗ'=>'Ӗ','ӗ'=>'ӗ','Ӛ'=>'Ӛ','ӛ'=>'ӛ','Ӝ'=>'Ӝ','ӝ'=>'ӝ','Ӟ'=>'Ӟ','ӟ'=>'ӟ','Ӣ'=>'Ӣ','ӣ'=>'ӣ','Ӥ'=>'Ӥ','ӥ'=>'ӥ','Ӧ'=>'Ӧ','ӧ'=>'ӧ','Ӫ'=>'Ӫ','ӫ'=>'ӫ','Ӭ'=>'Ӭ','ӭ'=>'ӭ','Ӯ'=>'Ӯ','ӯ'=>'ӯ','Ӱ'=>'Ӱ','ӱ'=>'ӱ','Ӳ'=>'Ӳ','ӳ'=>'ӳ','Ӵ'=>'Ӵ','ӵ'=>'ӵ','Ӹ'=>'Ӹ','ӹ'=>'ӹ','آ'=>'آ','أ'=>'أ','ؤ'=>'ؤ','إ'=>'إ','ئ'=>'ئ','ۀ'=>'ۀ','ۂ'=>'ۂ','ۓ'=>'ۓ','ऩ'=>'ऩ','ऱ'=>'ऱ','ऴ'=>'ऴ','क़'=>'क़','ख़'=>'ख़','ग़'=>'ग़','ज़'=>'ज़','ड़'=>'ड़','ढ़'=>'ढ़','फ़'=>'फ़','य़'=>'य़','ো'=>'ো','ৌ'=>'ৌ','ড়'=>'ড়','ঢ়'=>'ঢ়','য়'=>'য়','ਲ਼'=>'ਲ਼','ਸ਼'=>'ਸ਼','ਖ਼'=>'ਖ਼','ਗ਼'=>'ਗ਼','ਜ਼'=>'ਜ਼','ਫ਼'=>'ਫ਼','ୈ'=>'ୈ','ୋ'=>'ୋ','ୌ'=>'ୌ','ଡ଼'=>'ଡ଼','ଢ଼'=>'ଢ଼','ஔ'=>'ஔ','ொ'=>'ொ','ோ'=>'ோ','ௌ'=>'ௌ','ై'=>'ై','ೀ'=>'ೀ','ೇ'=>'ೇ','ೈ'=>'ೈ','ೊ'=>'ೊ','ೋ'=>'ೋ','ൊ'=>'ൊ','ോ'=>'ോ','ൌ'=>'ൌ','ේ'=>'ේ','ො'=>'ො','ෝ'=>'ෝ','ෞ'=>'ෞ','གྷ'=>'གྷ','ཌྷ'=>'ཌྷ','དྷ'=>'དྷ','བྷ'=>'བྷ','ཛྷ'=>'ཛྷ','ཀྵ'=>'ཀྵ','ཱི'=>'ཱི','ཱུ'=>'ཱུ','ྲྀ'=>'ྲྀ','ླྀ'=>'ླྀ','ཱྀ'=>'ཱྀ','ྒྷ'=>'ྒྷ','ྜྷ'=>'ྜྷ','ྡྷ'=>'ྡྷ','ྦྷ'=>'ྦྷ','ྫྷ'=>'ྫྷ','ྐྵ'=>'ྐྵ','ဦ'=>'ဦ','ᬆ'=>'ᬆ','ᬈ'=>'ᬈ','ᬊ'=>'ᬊ','ᬌ'=>'ᬌ','ᬎ'=>'ᬎ','ᬒ'=>'ᬒ','ᬻ'=>'ᬻ','ᬽ'=>'ᬽ','ᭀ'=>'ᭀ','ᭁ'=>'ᭁ','ᭃ'=>'ᭃ','Ḁ'=>'Ḁ','ḁ'=>'ḁ','Ḃ'=>'Ḃ','ḃ'=>'ḃ','Ḅ'=>'Ḅ','ḅ'=>'ḅ','Ḇ'=>'Ḇ','ḇ'=>'ḇ','Ḉ'=>'Ḉ','ḉ'=>'ḉ','Ḋ'=>'Ḋ','ḋ'=>'ḋ','Ḍ'=>'Ḍ','ḍ'=>'ḍ','Ḏ'=>'Ḏ','ḏ'=>'ḏ','Ḑ'=>'Ḑ','ḑ'=>'ḑ','Ḓ'=>'Ḓ','ḓ'=>'ḓ','Ḕ'=>'Ḕ','ḕ'=>'ḕ','Ḗ'=>'Ḗ','ḗ'=>'ḗ','Ḙ'=>'Ḙ','ḙ'=>'ḙ','Ḛ'=>'Ḛ','ḛ'=>'ḛ','Ḝ'=>'Ḝ','ḝ'=>'ḝ','Ḟ'=>'Ḟ','ḟ'=>'ḟ','Ḡ'=>'Ḡ','ḡ'=>'ḡ','Ḣ'=>'Ḣ','ḣ'=>'ḣ','Ḥ'=>'Ḥ','ḥ'=>'ḥ','Ḧ'=>'Ḧ','ḧ'=>'ḧ','Ḩ'=>'Ḩ','ḩ'=>'ḩ','Ḫ'=>'Ḫ','ḫ'=>'ḫ','Ḭ'=>'Ḭ','ḭ'=>'ḭ','Ḯ'=>'Ḯ','ḯ'=>'ḯ','Ḱ'=>'Ḱ','ḱ'=>'ḱ','Ḳ'=>'Ḳ','ḳ'=>'ḳ','Ḵ'=>'Ḵ','ḵ'=>'ḵ','Ḷ'=>'Ḷ','ḷ'=>'ḷ','Ḹ'=>'Ḹ','ḹ'=>'ḹ','Ḻ'=>'Ḻ','ḻ'=>'ḻ','Ḽ'=>'Ḽ','ḽ'=>'ḽ','Ḿ'=>'Ḿ','ḿ'=>'ḿ','Ṁ'=>'Ṁ','ṁ'=>'ṁ','Ṃ'=>'Ṃ','ṃ'=>'ṃ','Ṅ'=>'Ṅ','ṅ'=>'ṅ','Ṇ'=>'Ṇ','ṇ'=>'ṇ','Ṉ'=>'Ṉ','ṉ'=>'ṉ','Ṋ'=>'Ṋ','ṋ'=>'ṋ','Ṍ'=>'Ṍ','ṍ'=>'ṍ','Ṏ'=>'Ṏ','ṏ'=>'ṏ','Ṑ'=>'Ṑ','ṑ'=>'ṑ','Ṓ'=>'Ṓ','ṓ'=>'ṓ','Ṕ'=>'Ṕ','ṕ'=>'ṕ','Ṗ'=>'Ṗ','ṗ'=>'ṗ','Ṙ'=>'Ṙ','ṙ'=>'ṙ','Ṛ'=>'Ṛ','ṛ'=>'ṛ','Ṝ'=>'Ṝ','ṝ'=>'ṝ','Ṟ'=>'Ṟ','ṟ'=>'ṟ','Ṡ'=>'Ṡ','ṡ'=>'ṡ','Ṣ'=>'Ṣ','ṣ'=>'ṣ','Ṥ'=>'Ṥ','ṥ'=>'ṥ','Ṧ'=>'Ṧ','ṧ'=>'ṧ','Ṩ'=>'Ṩ','ṩ'=>'ṩ','Ṫ'=>'Ṫ','ṫ'=>'ṫ','Ṭ'=>'Ṭ','ṭ'=>'ṭ','Ṯ'=>'Ṯ','ṯ'=>'ṯ','Ṱ'=>'Ṱ','ṱ'=>'ṱ','Ṳ'=>'Ṳ','ṳ'=>'ṳ','Ṵ'=>'Ṵ','ṵ'=>'ṵ','Ṷ'=>'Ṷ','ṷ'=>'ṷ','Ṹ'=>'Ṹ','ṹ'=>'ṹ','Ṻ'=>'Ṻ','ṻ'=>'ṻ','Ṽ'=>'Ṽ','ṽ'=>'ṽ','Ṿ'=>'Ṿ','ṿ'=>'ṿ','Ẁ'=>'Ẁ','ẁ'=>'ẁ','Ẃ'=>'Ẃ','ẃ'=>'ẃ','Ẅ'=>'Ẅ','ẅ'=>'ẅ','Ẇ'=>'Ẇ','ẇ'=>'ẇ','Ẉ'=>'Ẉ','ẉ'=>'ẉ','Ẋ'=>'Ẋ','ẋ'=>'ẋ','Ẍ'=>'Ẍ','ẍ'=>'ẍ','Ẏ'=>'Ẏ','ẏ'=>'ẏ','Ẑ'=>'Ẑ','ẑ'=>'ẑ','Ẓ'=>'Ẓ','ẓ'=>'ẓ','Ẕ'=>'Ẕ','ẕ'=>'ẕ','ẖ'=>'ẖ','ẗ'=>'ẗ','ẘ'=>'ẘ','ẙ'=>'ẙ','ẛ'=>'ẛ','Ạ'=>'Ạ','ạ'=>'ạ','Ả'=>'Ả','ả'=>'ả','Ấ'=>'Ấ','ấ'=>'ấ','Ầ'=>'Ầ','ầ'=>'ầ','Ẩ'=>'Ẩ','ẩ'=>'ẩ','Ẫ'=>'Ẫ','ẫ'=>'ẫ','Ậ'=>'Ậ','ậ'=>'ậ','Ắ'=>'Ắ','ắ'=>'ắ','Ằ'=>'Ằ','ằ'=>'ằ','Ẳ'=>'Ẳ','ẳ'=>'ẳ','Ẵ'=>'Ẵ','ẵ'=>'ẵ','Ặ'=>'Ặ','ặ'=>'ặ','Ẹ'=>'Ẹ','ẹ'=>'ẹ','Ẻ'=>'Ẻ','ẻ'=>'ẻ','Ẽ'=>'Ẽ','ẽ'=>'ẽ','Ế'=>'Ế','ế'=>'ế','Ề'=>'Ề','ề'=>'ề','Ể'=>'Ể','ể'=>'ể','Ễ'=>'Ễ','ễ'=>'ễ','Ệ'=>'Ệ','ệ'=>'ệ','Ỉ'=>'Ỉ','ỉ'=>'ỉ','Ị'=>'Ị','ị'=>'ị','Ọ'=>'Ọ','ọ'=>'ọ','Ỏ'=>'Ỏ','ỏ'=>'ỏ','Ố'=>'Ố','ố'=>'ố','Ồ'=>'Ồ','ồ'=>'ồ','Ổ'=>'Ổ','ổ'=>'ổ','Ỗ'=>'Ỗ','ỗ'=>'ỗ','Ộ'=>'Ộ','ộ'=>'ộ','Ớ'=>'Ớ','ớ'=>'ớ','Ờ'=>'Ờ','ờ'=>'ờ','Ở'=>'Ở','ở'=>'ở','Ỡ'=>'Ỡ','ỡ'=>'ỡ','Ợ'=>'Ợ','ợ'=>'ợ','Ụ'=>'Ụ','ụ'=>'ụ','Ủ'=>'Ủ','ủ'=>'ủ','Ứ'=>'Ứ','ứ'=>'ứ','Ừ'=>'Ừ','ừ'=>'ừ','Ử'=>'Ử','ử'=>'ử','Ữ'=>'Ữ','ữ'=>'ữ','Ự'=>'Ự','ự'=>'ự','Ỳ'=>'Ỳ','ỳ'=>'ỳ','Ỵ'=>'Ỵ','ỵ'=>'ỵ','Ỷ'=>'Ỷ','ỷ'=>'ỷ','Ỹ'=>'Ỹ','ỹ'=>'ỹ','ἀ'=>'ἀ','ἁ'=>'ἁ','ἂ'=>'ἂ','ἃ'=>'ἃ','ἄ'=>'ἄ','ἅ'=>'ἅ','ἆ'=>'ἆ','ἇ'=>'ἇ','Ἀ'=>'Ἀ','Ἁ'=>'Ἁ','Ἂ'=>'Ἂ','Ἃ'=>'Ἃ','Ἄ'=>'Ἄ','Ἅ'=>'Ἅ','Ἆ'=>'Ἆ','Ἇ'=>'Ἇ','ἐ'=>'ἐ','ἑ'=>'ἑ','ἒ'=>'ἒ','ἓ'=>'ἓ','ἔ'=>'ἔ','ἕ'=>'ἕ','Ἐ'=>'Ἐ','Ἑ'=>'Ἑ','Ἒ'=>'Ἒ','Ἓ'=>'Ἓ','Ἔ'=>'Ἔ','Ἕ'=>'Ἕ','ἠ'=>'ἠ','ἡ'=>'ἡ','ἢ'=>'ἢ','ἣ'=>'ἣ','ἤ'=>'ἤ','ἥ'=>'ἥ','ἦ'=>'ἦ','ἧ'=>'ἧ','Ἠ'=>'Ἠ','Ἡ'=>'Ἡ','Ἢ'=>'Ἢ','Ἣ'=>'Ἣ','Ἤ'=>'Ἤ','Ἥ'=>'Ἥ','Ἦ'=>'Ἦ','Ἧ'=>'Ἧ','ἰ'=>'ἰ','ἱ'=>'ἱ','ἲ'=>'ἲ','ἳ'=>'ἳ','ἴ'=>'ἴ','ἵ'=>'ἵ','ἶ'=>'ἶ','ἷ'=>'ἷ','Ἰ'=>'Ἰ','Ἱ'=>'Ἱ','Ἲ'=>'Ἲ','Ἳ'=>'Ἳ','Ἴ'=>'Ἴ','Ἵ'=>'Ἵ','Ἶ'=>'Ἶ','Ἷ'=>'Ἷ','ὀ'=>'ὀ','ὁ'=>'ὁ','ὂ'=>'ὂ','ὃ'=>'ὃ','ὄ'=>'ὄ','ὅ'=>'ὅ','Ὀ'=>'Ὀ','Ὁ'=>'Ὁ','Ὂ'=>'Ὂ','Ὃ'=>'Ὃ','Ὄ'=>'Ὄ','Ὅ'=>'Ὅ','ὐ'=>'ὐ','ὑ'=>'ὑ','ὒ'=>'ὒ','ὓ'=>'ὓ','ὔ'=>'ὔ','ὕ'=>'ὕ','ὖ'=>'ὖ','ὗ'=>'ὗ','Ὑ'=>'Ὑ','Ὓ'=>'Ὓ','Ὕ'=>'Ὕ','Ὗ'=>'Ὗ','ὠ'=>'ὠ','ὡ'=>'ὡ','ὢ'=>'ὢ','ὣ'=>'ὣ','ὤ'=>'ὤ','ὥ'=>'ὥ','ὦ'=>'ὦ','ὧ'=>'ὧ','Ὠ'=>'Ὠ','Ὡ'=>'Ὡ','Ὢ'=>'Ὢ','Ὣ'=>'Ὣ','Ὤ'=>'Ὤ','Ὥ'=>'Ὥ','Ὦ'=>'Ὦ','Ὧ'=>'Ὧ','ὰ'=>'ὰ','ά'=>'ά','ὲ'=>'ὲ','έ'=>'έ','ὴ'=>'ὴ','ή'=>'ή','ὶ'=>'ὶ','ί'=>'ί','ὸ'=>'ὸ','ό'=>'ό','ὺ'=>'ὺ','ύ'=>'ύ','ὼ'=>'ὼ','ώ'=>'ώ','ᾀ'=>'ᾀ','ᾁ'=>'ᾁ','ᾂ'=>'ᾂ','ᾃ'=>'ᾃ','ᾄ'=>'ᾄ','ᾅ'=>'ᾅ','ᾆ'=>'ᾆ','ᾇ'=>'ᾇ','ᾈ'=>'ᾈ','ᾉ'=>'ᾉ','ᾊ'=>'ᾊ','ᾋ'=>'ᾋ','ᾌ'=>'ᾌ','ᾍ'=>'ᾍ','ᾎ'=>'ᾎ','ᾏ'=>'ᾏ','ᾐ'=>'ᾐ','ᾑ'=>'ᾑ','ᾒ'=>'ᾒ','ᾓ'=>'ᾓ','ᾔ'=>'ᾔ','ᾕ'=>'ᾕ','ᾖ'=>'ᾖ','ᾗ'=>'ᾗ','ᾘ'=>'ᾘ','ᾙ'=>'ᾙ','ᾚ'=>'ᾚ','ᾛ'=>'ᾛ','ᾜ'=>'ᾜ','ᾝ'=>'ᾝ','ᾞ'=>'ᾞ','ᾟ'=>'ᾟ','ᾠ'=>'ᾠ','ᾡ'=>'ᾡ','ᾢ'=>'ᾢ','ᾣ'=>'ᾣ','ᾤ'=>'ᾤ','ᾥ'=>'ᾥ','ᾦ'=>'ᾦ','ᾧ'=>'ᾧ','ᾨ'=>'ᾨ','ᾩ'=>'ᾩ','ᾪ'=>'ᾪ','ᾫ'=>'ᾫ','ᾬ'=>'ᾬ','ᾭ'=>'ᾭ','ᾮ'=>'ᾮ','ᾯ'=>'ᾯ','ᾰ'=>'ᾰ','ᾱ'=>'ᾱ','ᾲ'=>'ᾲ','ᾳ'=>'ᾳ','ᾴ'=>'ᾴ','ᾶ'=>'ᾶ','ᾷ'=>'ᾷ','Ᾰ'=>'Ᾰ','Ᾱ'=>'Ᾱ','Ὰ'=>'Ὰ','Ά'=>'Ά','ᾼ'=>'ᾼ','ι'=>'ι','῁'=>'῁','ῂ'=>'ῂ','ῃ'=>'ῃ','ῄ'=>'ῄ','ῆ'=>'ῆ','ῇ'=>'ῇ','Ὲ'=>'Ὲ','Έ'=>'Έ','Ὴ'=>'Ὴ','Ή'=>'Ή','ῌ'=>'ῌ','῍'=>'῍','῎'=>'῎','῏'=>'῏','ῐ'=>'ῐ','ῑ'=>'ῑ','ῒ'=>'ῒ','ΐ'=>'ΐ','ῖ'=>'ῖ','ῗ'=>'ῗ','Ῐ'=>'Ῐ','Ῑ'=>'Ῑ','Ὶ'=>'Ὶ','Ί'=>'Ί','῝'=>'῝','῞'=>'῞','῟'=>'῟','ῠ'=>'ῠ','ῡ'=>'ῡ','ῢ'=>'ῢ','ΰ'=>'ΰ','ῤ'=>'ῤ','ῥ'=>'ῥ','ῦ'=>'ῦ','ῧ'=>'ῧ','Ῠ'=>'Ῠ','Ῡ'=>'Ῡ','Ὺ'=>'Ὺ','Ύ'=>'Ύ','Ῥ'=>'Ῥ','῭'=>'῭','΅'=>'΅','`'=>'`','ῲ'=>'ῲ','ῳ'=>'ῳ','ῴ'=>'ῴ','ῶ'=>'ῶ','ῷ'=>'ῷ','Ὸ'=>'Ὸ','Ό'=>'Ό','Ὼ'=>'Ὼ','Ώ'=>'Ώ','ῼ'=>'ῼ','´'=>'´',' '=>' ',' '=>' ','Ω'=>'Ω','K'=>'K','Å'=>'Å','↚'=>'↚','↛'=>'↛','↮'=>'↮','⇍'=>'⇍','⇎'=>'⇎','⇏'=>'⇏','∄'=>'∄','∉'=>'∉','∌'=>'∌','∤'=>'∤','∦'=>'∦','≁'=>'≁','≄'=>'≄','≇'=>'≇','≉'=>'≉','≠'=>'≠','≢'=>'≢','≭'=>'≭','≮'=>'≮','≯'=>'≯','≰'=>'≰','≱'=>'≱','≴'=>'≴','≵'=>'≵','≸'=>'≸','≹'=>'≹','⊀'=>'⊀','⊁'=>'⊁','⊄'=>'⊄','⊅'=>'⊅','⊈'=>'⊈','⊉'=>'⊉','⊬'=>'⊬','⊭'=>'⊭','⊮'=>'⊮','⊯'=>'⊯','⋠'=>'⋠','⋡'=>'⋡','⋢'=>'⋢','⋣'=>'⋣','⋪'=>'⋪','⋫'=>'⋫','⋬'=>'⋬','⋭'=>'⋭','〈'=>'〈','〉'=>'〉','⫝̸'=>'⫝̸','が'=>'が','ぎ'=>'ぎ','ぐ'=>'ぐ','げ'=>'げ','ご'=>'ご','ざ'=>'ざ','じ'=>'じ','ず'=>'ず','ぜ'=>'ぜ','ぞ'=>'ぞ','だ'=>'だ','ぢ'=>'ぢ','づ'=>'づ','で'=>'で','ど'=>'ど','ば'=>'ば','ぱ'=>'ぱ','び'=>'び','ぴ'=>'ぴ','ぶ'=>'ぶ','ぷ'=>'ぷ','べ'=>'べ','ぺ'=>'ぺ','ぼ'=>'ぼ','ぽ'=>'ぽ','ゔ'=>'ゔ','ゞ'=>'ゞ','ガ'=>'ガ','ギ'=>'ギ','グ'=>'グ','ゲ'=>'ゲ','ゴ'=>'ゴ','ザ'=>'ザ','ジ'=>'ジ','ズ'=>'ズ','ゼ'=>'ゼ','ゾ'=>'ゾ','ダ'=>'ダ','ヂ'=>'ヂ','ヅ'=>'ヅ','デ'=>'デ','ド'=>'ド','バ'=>'バ','パ'=>'パ','ビ'=>'ビ','ピ'=>'ピ','ブ'=>'ブ','プ'=>'プ','ベ'=>'ベ','ペ'=>'ペ','ボ'=>'ボ','ポ'=>'ポ','ヴ'=>'ヴ','ヷ'=>'ヷ','ヸ'=>'ヸ','ヹ'=>'ヹ','ヺ'=>'ヺ','ヾ'=>'ヾ','豈'=>'豈','更'=>'更','車'=>'車','賈'=>'賈','滑'=>'滑','串'=>'串','句'=>'句','龜'=>'龜','龜'=>'龜','契'=>'契','金'=>'金','喇'=>'喇','奈'=>'奈','懶'=>'懶','癩'=>'癩','羅'=>'羅','蘿'=>'蘿','螺'=>'螺','裸'=>'裸','邏'=>'邏','樂'=>'樂','洛'=>'洛','烙'=>'烙','珞'=>'珞','落'=>'落','酪'=>'酪','駱'=>'駱','亂'=>'亂','卵'=>'卵','欄'=>'欄','爛'=>'爛','蘭'=>'蘭','鸞'=>'鸞','嵐'=>'嵐','濫'=>'濫','藍'=>'藍','襤'=>'襤','拉'=>'拉','臘'=>'臘','蠟'=>'蠟','廊'=>'廊','朗'=>'朗','浪'=>'浪','狼'=>'狼','郎'=>'郎','來'=>'來','冷'=>'冷','勞'=>'勞','擄'=>'擄','櫓'=>'櫓','爐'=>'爐','盧'=>'盧','老'=>'老','蘆'=>'蘆','虜'=>'虜','路'=>'路','露'=>'露','魯'=>'魯','鷺'=>'鷺','碌'=>'碌','祿'=>'祿','綠'=>'綠','菉'=>'菉','錄'=>'錄','鹿'=>'鹿','論'=>'論','壟'=>'壟','弄'=>'弄','籠'=>'籠','聾'=>'聾','牢'=>'牢','磊'=>'磊','賂'=>'賂','雷'=>'雷','壘'=>'壘','屢'=>'屢','樓'=>'樓','淚'=>'淚','漏'=>'漏','累'=>'累','縷'=>'縷','陋'=>'陋','勒'=>'勒','肋'=>'肋','凜'=>'凜','凌'=>'凌','稜'=>'稜','綾'=>'綾','菱'=>'菱','陵'=>'陵','讀'=>'讀','拏'=>'拏','樂'=>'樂','諾'=>'諾','丹'=>'丹','寧'=>'寧','怒'=>'怒','率'=>'率','異'=>'異','北'=>'北','磻'=>'磻','便'=>'便','復'=>'復','不'=>'不','泌'=>'泌','數'=>'數','索'=>'索','參'=>'參','塞'=>'塞','省'=>'省','葉'=>'葉','說'=>'說','殺'=>'殺','辰'=>'辰','沈'=>'沈','拾'=>'拾','若'=>'若','掠'=>'掠','略'=>'略','亮'=>'亮','兩'=>'兩','凉'=>'凉','梁'=>'梁','糧'=>'糧','良'=>'良','諒'=>'諒','量'=>'量','勵'=>'勵','呂'=>'呂','女'=>'女','廬'=>'廬','旅'=>'旅','濾'=>'濾','礪'=>'礪','閭'=>'閭','驪'=>'驪','麗'=>'麗','黎'=>'黎','力'=>'力','曆'=>'曆','歷'=>'歷','轢'=>'轢','年'=>'年','憐'=>'憐','戀'=>'戀','撚'=>'撚','漣'=>'漣','煉'=>'煉','璉'=>'璉','秊'=>'秊','練'=>'練','聯'=>'聯','輦'=>'輦','蓮'=>'蓮','連'=>'連','鍊'=>'鍊','列'=>'列','劣'=>'劣','咽'=>'咽','烈'=>'烈','裂'=>'裂','說'=>'說','廉'=>'廉','念'=>'念','捻'=>'捻','殮'=>'殮','簾'=>'簾','獵'=>'獵','令'=>'令','囹'=>'囹','寧'=>'寧','嶺'=>'嶺','怜'=>'怜','玲'=>'玲','瑩'=>'瑩','羚'=>'羚','聆'=>'聆','鈴'=>'鈴','零'=>'零','靈'=>'靈','領'=>'領','例'=>'例','禮'=>'禮','醴'=>'醴','隸'=>'隸','惡'=>'惡','了'=>'了','僚'=>'僚','寮'=>'寮','尿'=>'尿','料'=>'料','樂'=>'樂','燎'=>'燎','療'=>'療','蓼'=>'蓼','遼'=>'遼','龍'=>'龍','暈'=>'暈','阮'=>'阮','劉'=>'劉','杻'=>'杻','柳'=>'柳','流'=>'流','溜'=>'溜','琉'=>'琉','留'=>'留','硫'=>'硫','紐'=>'紐','類'=>'類','六'=>'六','戮'=>'戮','陸'=>'陸','倫'=>'倫','崙'=>'崙','淪'=>'淪','輪'=>'輪','律'=>'律','慄'=>'慄','栗'=>'栗','率'=>'率','隆'=>'隆','利'=>'利','吏'=>'吏','履'=>'履','易'=>'易','李'=>'李','梨'=>'梨','泥'=>'泥','理'=>'理','痢'=>'痢','罹'=>'罹','裏'=>'裏','裡'=>'裡','里'=>'里','離'=>'離','匿'=>'匿','溺'=>'溺','吝'=>'吝','燐'=>'燐','璘'=>'璘','藺'=>'藺','隣'=>'隣','鱗'=>'鱗','麟'=>'麟','林'=>'林','淋'=>'淋','臨'=>'臨','立'=>'立','笠'=>'笠','粒'=>'粒','狀'=>'狀','炙'=>'炙','識'=>'識','什'=>'什','茶'=>'茶','刺'=>'刺','切'=>'切','度'=>'度','拓'=>'拓','糖'=>'糖','宅'=>'宅','洞'=>'洞','暴'=>'暴','輻'=>'輻','行'=>'行','降'=>'降','見'=>'見','廓'=>'廓','兀'=>'兀','嗀'=>'嗀','塚'=>'塚','晴'=>'晴','凞'=>'凞','猪'=>'猪','益'=>'益','礼'=>'礼','神'=>'神','祥'=>'祥','福'=>'福','靖'=>'靖','精'=>'精','羽'=>'羽','蘒'=>'蘒','諸'=>'諸','逸'=>'逸','都'=>'都','飯'=>'飯','飼'=>'飼','館'=>'館','鶴'=>'鶴','侮'=>'侮','僧'=>'僧','免'=>'免','勉'=>'勉','勤'=>'勤','卑'=>'卑','喝'=>'喝','嘆'=>'嘆','器'=>'器','塀'=>'塀','墨'=>'墨','層'=>'層','屮'=>'屮','悔'=>'悔','慨'=>'慨','憎'=>'憎','懲'=>'懲','敏'=>'敏','既'=>'既','暑'=>'暑','梅'=>'梅','海'=>'海','渚'=>'渚','漢'=>'漢','煮'=>'煮','爫'=>'爫','琢'=>'琢','碑'=>'碑','社'=>'社','祉'=>'祉','祈'=>'祈','祐'=>'祐','祖'=>'祖','祝'=>'祝','禍'=>'禍','禎'=>'禎','穀'=>'穀','突'=>'突','節'=>'節','練'=>'練','縉'=>'縉','繁'=>'繁','署'=>'署','者'=>'者','臭'=>'臭','艹'=>'艹','艹'=>'艹','著'=>'著','褐'=>'褐','視'=>'視','謁'=>'謁','謹'=>'謹','賓'=>'賓','贈'=>'贈','辶'=>'辶','逸'=>'逸','難'=>'難','響'=>'響','頻'=>'頻','並'=>'並','况'=>'况','全'=>'全','侀'=>'侀','充'=>'充','冀'=>'冀','勇'=>'勇','勺'=>'勺','喝'=>'喝','啕'=>'啕','喙'=>'喙','嗢'=>'嗢','塚'=>'塚','墳'=>'墳','奄'=>'奄','奔'=>'奔','婢'=>'婢','嬨'=>'嬨','廒'=>'廒','廙'=>'廙','彩'=>'彩','徭'=>'徭','惘'=>'惘','慎'=>'慎','愈'=>'愈','憎'=>'憎','慠'=>'慠','懲'=>'懲','戴'=>'戴','揄'=>'揄','搜'=>'搜','摒'=>'摒','敖'=>'敖','晴'=>'晴','朗'=>'朗','望'=>'望','杖'=>'杖','歹'=>'歹','殺'=>'殺','流'=>'流','滛'=>'滛','滋'=>'滋','漢'=>'漢','瀞'=>'瀞','煮'=>'煮','瞧'=>'瞧','爵'=>'爵','犯'=>'犯','猪'=>'猪','瑱'=>'瑱','甆'=>'甆','画'=>'画','瘝'=>'瘝','瘟'=>'瘟','益'=>'益','盛'=>'盛','直'=>'直','睊'=>'睊','着'=>'着','磌'=>'磌','窱'=>'窱','節'=>'節','类'=>'类','絛'=>'絛','練'=>'練','缾'=>'缾','者'=>'者','荒'=>'荒','華'=>'華','蝹'=>'蝹','襁'=>'襁','覆'=>'覆','視'=>'視','調'=>'調','諸'=>'諸','請'=>'請','謁'=>'謁','諾'=>'諾','諭'=>'諭','謹'=>'謹','變'=>'變','贈'=>'贈','輸'=>'輸','遲'=>'遲','醙'=>'醙','鉶'=>'鉶','陼'=>'陼','難'=>'難','靖'=>'靖','韛'=>'韛','響'=>'響','頋'=>'頋','頻'=>'頻','鬒'=>'鬒','龜'=>'龜','𢡊'=>'𢡊','𢡄'=>'𢡄','𣏕'=>'𣏕','㮝'=>'㮝','䀘'=>'䀘','䀹'=>'䀹','𥉉'=>'𥉉','𥳐'=>'𥳐','𧻓'=>'𧻓','齃'=>'齃','龎'=>'龎','יִ'=>'יִ','ײַ'=>'ײַ','שׁ'=>'שׁ','שׂ'=>'שׂ','שּׁ'=>'שּׁ','שּׂ'=>'שּׂ','אַ'=>'אַ','אָ'=>'אָ','אּ'=>'אּ','בּ'=>'בּ','גּ'=>'גּ','דּ'=>'דּ','הּ'=>'הּ','וּ'=>'וּ','זּ'=>'זּ','טּ'=>'טּ','יּ'=>'יּ','ךּ'=>'ךּ','כּ'=>'כּ','לּ'=>'לּ','מּ'=>'מּ','נּ'=>'נּ','סּ'=>'סּ','ףּ'=>'ףּ','פּ'=>'פּ','צּ'=>'צּ','קּ'=>'קּ','רּ'=>'רּ','שּ'=>'שּ','תּ'=>'תּ','וֹ'=>'וֹ','בֿ'=>'בֿ','כֿ'=>'כֿ','פֿ'=>'פֿ','𝅗𝅥'=>'𝅗𝅥','𝅘𝅥'=>'𝅘𝅥','𝅘𝅥𝅮'=>'𝅘𝅥𝅮','𝅘𝅥𝅯'=>'𝅘𝅥𝅯','𝅘𝅥𝅰'=>'𝅘𝅥𝅰','𝅘𝅥𝅱'=>'𝅘𝅥𝅱','𝅘𝅥𝅲'=>'𝅘𝅥𝅲','𝆹𝅥'=>'𝆹𝅥','𝆺𝅥'=>'𝆺𝅥','𝆹𝅥𝅮'=>'𝆹𝅥𝅮','𝆺𝅥𝅮'=>'𝆺𝅥𝅮','𝆹𝅥𝅯'=>'𝆹𝅥𝅯','𝆺𝅥𝅯'=>'𝆺𝅥𝅯','丽'=>'丽','丸'=>'丸','乁'=>'乁','𠄢'=>'𠄢','你'=>'你','侮'=>'侮','侻'=>'侻','倂'=>'倂','偺'=>'偺','備'=>'備','僧'=>'僧','像'=>'像','㒞'=>'㒞','𠘺'=>'𠘺','免'=>'免','兔'=>'兔','兤'=>'兤','具'=>'具','𠔜'=>'𠔜','㒹'=>'㒹','內'=>'內','再'=>'再','𠕋'=>'𠕋','冗'=>'冗','冤'=>'冤','仌'=>'仌','冬'=>'冬','况'=>'况','𩇟'=>'𩇟','凵'=>'凵','刃'=>'刃','㓟'=>'㓟','刻'=>'刻','剆'=>'剆','割'=>'割','剷'=>'剷','㔕'=>'㔕','勇'=>'勇','勉'=>'勉','勤'=>'勤','勺'=>'勺','包'=>'包','匆'=>'匆','北'=>'北','卉'=>'卉','卑'=>'卑','博'=>'博','即'=>'即','卽'=>'卽','卿'=>'卿','卿'=>'卿','卿'=>'卿','𠨬'=>'𠨬','灰'=>'灰','及'=>'及','叟'=>'叟','𠭣'=>'𠭣','叫'=>'叫','叱'=>'叱','吆'=>'吆','咞'=>'咞','吸'=>'吸','呈'=>'呈','周'=>'周','咢'=>'咢','哶'=>'哶','唐'=>'唐','啓'=>'啓','啣'=>'啣','善'=>'善','善'=>'善','喙'=>'喙','喫'=>'喫','喳'=>'喳','嗂'=>'嗂','圖'=>'圖','嘆'=>'嘆','圗'=>'圗','噑'=>'噑','噴'=>'噴','切'=>'切','壮'=>'壮','城'=>'城','埴'=>'埴','堍'=>'堍','型'=>'型','堲'=>'堲','報'=>'報','墬'=>'墬','𡓤'=>'𡓤','売'=>'売','壷'=>'壷','夆'=>'夆','多'=>'多','夢'=>'夢','奢'=>'奢','𡚨'=>'𡚨','𡛪'=>'𡛪','姬'=>'姬','娛'=>'娛','娧'=>'娧','姘'=>'姘','婦'=>'婦','㛮'=>'㛮','㛼'=>'㛼','嬈'=>'嬈','嬾'=>'嬾','嬾'=>'嬾','𡧈'=>'𡧈','寃'=>'寃','寘'=>'寘','寧'=>'寧','寳'=>'寳','𡬘'=>'𡬘','寿'=>'寿','将'=>'将','当'=>'当','尢'=>'尢','㞁'=>'㞁','屠'=>'屠','屮'=>'屮','峀'=>'峀','岍'=>'岍','𡷤'=>'𡷤','嵃'=>'嵃','𡷦'=>'𡷦','嵮'=>'嵮','嵫'=>'嵫','嵼'=>'嵼','巡'=>'巡','巢'=>'巢','㠯'=>'㠯','巽'=>'巽','帨'=>'帨','帽'=>'帽','幩'=>'幩','㡢'=>'㡢','𢆃'=>'𢆃','㡼'=>'㡼','庰'=>'庰','庳'=>'庳','庶'=>'庶','廊'=>'廊','𪎒'=>'𪎒','廾'=>'廾','𢌱'=>'𢌱','𢌱'=>'𢌱','舁'=>'舁','弢'=>'弢','弢'=>'弢','㣇'=>'㣇','𣊸'=>'𣊸','𦇚'=>'𦇚','形'=>'形','彫'=>'彫','㣣'=>'㣣','徚'=>'徚','忍'=>'忍','志'=>'志','忹'=>'忹','悁'=>'悁','㤺'=>'㤺','㤜'=>'㤜','悔'=>'悔','𢛔'=>'𢛔','惇'=>'惇','慈'=>'慈','慌'=>'慌','慎'=>'慎','慌'=>'慌','慺'=>'慺','憎'=>'憎','憲'=>'憲','憤'=>'憤','憯'=>'憯','懞'=>'懞','懲'=>'懲','懶'=>'懶','成'=>'成','戛'=>'戛','扝'=>'扝','抱'=>'抱','拔'=>'拔','捐'=>'捐','𢬌'=>'𢬌','挽'=>'挽','拼'=>'拼','捨'=>'捨','掃'=>'掃','揤'=>'揤','𢯱'=>'𢯱','搢'=>'搢','揅'=>'揅','掩'=>'掩','㨮'=>'㨮','摩'=>'摩','摾'=>'摾','撝'=>'撝','摷'=>'摷','㩬'=>'㩬','敏'=>'敏','敬'=>'敬','𣀊'=>'𣀊','旣'=>'旣','書'=>'書','晉'=>'晉','㬙'=>'㬙','暑'=>'暑','㬈'=>'㬈','㫤'=>'㫤','冒'=>'冒','冕'=>'冕','最'=>'最','暜'=>'暜','肭'=>'肭','䏙'=>'䏙','朗'=>'朗','望'=>'望','朡'=>'朡','杞'=>'杞','杓'=>'杓','𣏃'=>'𣏃','㭉'=>'㭉','柺'=>'柺','枅'=>'枅','桒'=>'桒','梅'=>'梅','𣑭'=>'𣑭','梎'=>'梎','栟'=>'栟','椔'=>'椔','㮝'=>'㮝','楂'=>'楂','榣'=>'榣','槪'=>'槪','檨'=>'檨','𣚣'=>'𣚣','櫛'=>'櫛','㰘'=>'㰘','次'=>'次','𣢧'=>'𣢧','歔'=>'歔','㱎'=>'㱎','歲'=>'歲','殟'=>'殟','殺'=>'殺','殻'=>'殻','𣪍'=>'𣪍','𡴋'=>'𡴋','𣫺'=>'𣫺','汎'=>'汎','𣲼'=>'𣲼','沿'=>'沿','泍'=>'泍','汧'=>'汧','洖'=>'洖','派'=>'派','海'=>'海','流'=>'流','浩'=>'浩','浸'=>'浸','涅'=>'涅','𣴞'=>'𣴞','洴'=>'洴','港'=>'港','湮'=>'湮','㴳'=>'㴳','滋'=>'滋','滇'=>'滇','𣻑'=>'𣻑','淹'=>'淹','潮'=>'潮','𣽞'=>'𣽞','𣾎'=>'𣾎','濆'=>'濆','瀹'=>'瀹','瀞'=>'瀞','瀛'=>'瀛','㶖'=>'㶖','灊'=>'灊','災'=>'災','灷'=>'灷','炭'=>'炭','𠔥'=>'𠔥','煅'=>'煅','𤉣'=>'𤉣','熜'=>'熜','𤎫'=>'𤎫','爨'=>'爨','爵'=>'爵','牐'=>'牐','𤘈'=>'𤘈','犀'=>'犀','犕'=>'犕','𤜵'=>'𤜵','𤠔'=>'𤠔','獺'=>'獺','王'=>'王','㺬'=>'㺬','玥'=>'玥','㺸'=>'㺸','㺸'=>'㺸','瑇'=>'瑇','瑜'=>'瑜','瑱'=>'瑱','璅'=>'璅','瓊'=>'瓊','㼛'=>'㼛','甤'=>'甤','𤰶'=>'𤰶','甾'=>'甾','𤲒'=>'𤲒','異'=>'異','𢆟'=>'𢆟','瘐'=>'瘐','𤾡'=>'𤾡','𤾸'=>'𤾸','𥁄'=>'𥁄','㿼'=>'㿼','䀈'=>'䀈','直'=>'直','𥃳'=>'𥃳','𥃲'=>'𥃲','𥄙'=>'𥄙','𥄳'=>'𥄳','眞'=>'眞','真'=>'真','真'=>'真','睊'=>'睊','䀹'=>'䀹','瞋'=>'瞋','䁆'=>'䁆','䂖'=>'䂖','𥐝'=>'𥐝','硎'=>'硎','碌'=>'碌','磌'=>'磌','䃣'=>'䃣','𥘦'=>'𥘦','祖'=>'祖','𥚚'=>'𥚚','𥛅'=>'𥛅','福'=>'福','秫'=>'秫','䄯'=>'䄯','穀'=>'穀','穊'=>'穊','穏'=>'穏','𥥼'=>'𥥼','𥪧'=>'𥪧','𥪧'=>'𥪧','竮'=>'竮','䈂'=>'䈂','𥮫'=>'𥮫','篆'=>'篆','築'=>'築','䈧'=>'䈧','𥲀'=>'𥲀','糒'=>'糒','䊠'=>'䊠','糨'=>'糨','糣'=>'糣','紀'=>'紀','𥾆'=>'𥾆','絣'=>'絣','䌁'=>'䌁','緇'=>'緇','縂'=>'縂','繅'=>'繅','䌴'=>'䌴','𦈨'=>'𦈨','𦉇'=>'𦉇','䍙'=>'䍙','𦋙'=>'𦋙','罺'=>'罺','𦌾'=>'𦌾','羕'=>'羕','翺'=>'翺','者'=>'者','𦓚'=>'𦓚','𦔣'=>'𦔣','聠'=>'聠','𦖨'=>'𦖨','聰'=>'聰','𣍟'=>'𣍟','䏕'=>'䏕','育'=>'育','脃'=>'脃','䐋'=>'䐋','脾'=>'脾','媵'=>'媵','𦞧'=>'𦞧','𦞵'=>'𦞵','𣎓'=>'𣎓','𣎜'=>'𣎜','舁'=>'舁','舄'=>'舄','辞'=>'辞','䑫'=>'䑫','芑'=>'芑','芋'=>'芋','芝'=>'芝','劳'=>'劳','花'=>'花','芳'=>'芳','芽'=>'芽','苦'=>'苦','𦬼'=>'𦬼','若'=>'若','茝'=>'茝','荣'=>'荣','莭'=>'莭','茣'=>'茣','莽'=>'莽','菧'=>'菧','著'=>'著','荓'=>'荓','菊'=>'菊','菌'=>'菌','菜'=>'菜','𦰶'=>'𦰶','𦵫'=>'𦵫','𦳕'=>'𦳕','䔫'=>'䔫','蓱'=>'蓱','蓳'=>'蓳','蔖'=>'蔖','𧏊'=>'𧏊','蕤'=>'蕤','𦼬'=>'𦼬','䕝'=>'䕝','䕡'=>'䕡','𦾱'=>'𦾱','𧃒'=>'𧃒','䕫'=>'䕫','虐'=>'虐','虜'=>'虜','虧'=>'虧','虩'=>'虩','蚩'=>'蚩','蚈'=>'蚈','蜎'=>'蜎','蛢'=>'蛢','蝹'=>'蝹','蜨'=>'蜨','蝫'=>'蝫','螆'=>'螆','䗗'=>'䗗','蟡'=>'蟡','蠁'=>'蠁','䗹'=>'䗹','衠'=>'衠','衣'=>'衣','𧙧'=>'𧙧','裗'=>'裗','裞'=>'裞','䘵'=>'䘵','裺'=>'裺','㒻'=>'㒻','𧢮'=>'𧢮','𧥦'=>'𧥦','䚾'=>'䚾','䛇'=>'䛇','誠'=>'誠','諭'=>'諭','變'=>'變','豕'=>'豕','𧲨'=>'𧲨','貫'=>'貫','賁'=>'賁','贛'=>'贛','起'=>'起','𧼯'=>'𧼯','𠠄'=>'𠠄','跋'=>'跋','趼'=>'趼','跰'=>'跰','𠣞'=>'𠣞','軔'=>'軔','輸'=>'輸','𨗒'=>'𨗒','𨗭'=>'𨗭','邔'=>'邔','郱'=>'郱','鄑'=>'鄑','𨜮'=>'𨜮','鄛'=>'鄛','鈸'=>'鈸','鋗'=>'鋗','鋘'=>'鋘','鉼'=>'鉼','鏹'=>'鏹','鐕'=>'鐕','𨯺'=>'𨯺','開'=>'開','䦕'=>'䦕','閷'=>'閷','𨵷'=>'𨵷','䧦'=>'䧦','雃'=>'雃','嶲'=>'嶲','霣'=>'霣','𩅅'=>'𩅅','𩈚'=>'𩈚','䩮'=>'䩮','䩶'=>'䩶','韠'=>'韠','𩐊'=>'𩐊','䪲'=>'䪲','𩒖'=>'𩒖','頋'=>'頋','頋'=>'頋','頩'=>'頩','𩖶'=>'𩖶','飢'=>'飢','䬳'=>'䬳','餩'=>'餩','馧'=>'馧','駂'=>'駂','駾'=>'駾','䯎'=>'䯎','𩬰'=>'𩬰','鬒'=>'鬒','鱀'=>'鱀','鳽'=>'鳽','䳎'=>'䳎','䳭'=>'䳭','鵧'=>'鵧','𪃎'=>'𪃎','䳸'=>'䳸','𪄅'=>'𪄅','𪈎'=>'𪈎','𪊑'=>'𪊑','麻'=>'麻','䵖'=>'䵖','黹'=>'黹','黾'=>'黾','鼅'=>'鼅','鼏'=>'鼏','鼖'=>'鼖','鼻'=>'鼻','𪘀'=>'𪘀'); \ No newline at end of file
+$GLOBALS['utf_canonical_decomp']=array('À'=>'À','Á'=>'Á','Â'=>'Â','Ã'=>'Ã','Ä'=>'Ä','Å'=>'Å','Ç'=>'Ç','È'=>'È','É'=>'É','Ê'=>'Ê','Ë'=>'Ë','Ì'=>'Ì','Í'=>'Í','Î'=>'Î','Ï'=>'Ï','Ñ'=>'Ñ','Ò'=>'Ò','Ó'=>'Ó','Ô'=>'Ô','Õ'=>'Õ','Ö'=>'Ö','Ù'=>'Ù','Ú'=>'Ú','Û'=>'Û','Ü'=>'Ü','Ý'=>'Ý','à'=>'à','á'=>'á','â'=>'â','ã'=>'ã','ä'=>'ä','å'=>'å','ç'=>'ç','è'=>'è','é'=>'é','ê'=>'ê','ë'=>'ë','ì'=>'ì','í'=>'í','î'=>'î','ï'=>'ï','ñ'=>'ñ','ò'=>'ò','ó'=>'ó','ô'=>'ô','õ'=>'õ','ö'=>'ö','ù'=>'ù','ú'=>'ú','û'=>'û','ü'=>'ü','ý'=>'ý','ÿ'=>'ÿ','Ā'=>'Ā','ā'=>'ā','Ă'=>'Ă','ă'=>'ă','Ą'=>'Ą','ą'=>'ą','Ć'=>'Ć','ć'=>'ć','Ĉ'=>'Ĉ','ĉ'=>'ĉ','Ċ'=>'Ċ','ċ'=>'ċ','Č'=>'Č','č'=>'č','Ď'=>'Ď','ď'=>'ď','Ē'=>'Ē','ē'=>'ē','Ĕ'=>'Ĕ','ĕ'=>'ĕ','Ė'=>'Ė','ė'=>'ė','Ę'=>'Ę','ę'=>'ę','Ě'=>'Ě','ě'=>'ě','Ĝ'=>'Ĝ','ĝ'=>'ĝ','Ğ'=>'Ğ','ğ'=>'ğ','Ġ'=>'Ġ','ġ'=>'ġ','Ģ'=>'Ģ','ģ'=>'ģ','Ĥ'=>'Ĥ','ĥ'=>'ĥ','Ĩ'=>'Ĩ','ĩ'=>'ĩ','Ī'=>'Ī','ī'=>'ī','Ĭ'=>'Ĭ','ĭ'=>'ĭ','Į'=>'Į','į'=>'į','İ'=>'İ','Ĵ'=>'Ĵ','ĵ'=>'ĵ','Ķ'=>'Ķ','ķ'=>'ķ','Ĺ'=>'Ĺ','ĺ'=>'ĺ','Ļ'=>'Ļ','ļ'=>'ļ','Ľ'=>'Ľ','ľ'=>'ľ','Ń'=>'Ń','ń'=>'ń','Ņ'=>'Ņ','ņ'=>'ņ','Ň'=>'Ň','ň'=>'ň','Ō'=>'Ō','ō'=>'ō','Ŏ'=>'Ŏ','ŏ'=>'ŏ','Ő'=>'Ő','ő'=>'ő','Ŕ'=>'Ŕ','ŕ'=>'ŕ','Ŗ'=>'Ŗ','ŗ'=>'ŗ','Ř'=>'Ř','ř'=>'ř','Ś'=>'Ś','ś'=>'ś','Ŝ'=>'Ŝ','ŝ'=>'ŝ','Ş'=>'Ş','ş'=>'ş','Š'=>'Š','š'=>'š','Ţ'=>'Ţ','ţ'=>'ţ','Ť'=>'Ť','ť'=>'ť','Ũ'=>'Ũ','ũ'=>'ũ','Ū'=>'Ū','ū'=>'ū','Ŭ'=>'Ŭ','ŭ'=>'ŭ','Ů'=>'Ů','ů'=>'ů','Ű'=>'Ű','ű'=>'ű','Ų'=>'Ų','ų'=>'ų','Ŵ'=>'Ŵ','ŵ'=>'ŵ','Ŷ'=>'Ŷ','ŷ'=>'ŷ','Ÿ'=>'Ÿ','Ź'=>'Ź','ź'=>'ź','Ż'=>'Ż','ż'=>'ż','Ž'=>'Ž','ž'=>'ž','Ơ'=>'Ơ','ơ'=>'ơ','Ư'=>'Ư','ư'=>'ư','Ǎ'=>'Ǎ','ǎ'=>'ǎ','Ǐ'=>'Ǐ','ǐ'=>'ǐ','Ǒ'=>'Ǒ','ǒ'=>'ǒ','Ǔ'=>'Ǔ','ǔ'=>'ǔ','Ǖ'=>'Ǖ','ǖ'=>'ǖ','Ǘ'=>'Ǘ','ǘ'=>'ǘ','Ǚ'=>'Ǚ','ǚ'=>'ǚ','Ǜ'=>'Ǜ','ǜ'=>'ǜ','Ǟ'=>'Ǟ','ǟ'=>'ǟ','Ǡ'=>'Ǡ','ǡ'=>'ǡ','Ǣ'=>'Ǣ','ǣ'=>'ǣ','Ǧ'=>'Ǧ','ǧ'=>'ǧ','Ǩ'=>'Ǩ','ǩ'=>'ǩ','Ǫ'=>'Ǫ','ǫ'=>'ǫ','Ǭ'=>'Ǭ','ǭ'=>'ǭ','Ǯ'=>'Ǯ','ǯ'=>'ǯ','ǰ'=>'ǰ','Ǵ'=>'Ǵ','ǵ'=>'ǵ','Ǹ'=>'Ǹ','ǹ'=>'ǹ','Ǻ'=>'Ǻ','ǻ'=>'ǻ','Ǽ'=>'Ǽ','ǽ'=>'ǽ','Ǿ'=>'Ǿ','ǿ'=>'ǿ','Ȁ'=>'Ȁ','ȁ'=>'ȁ','Ȃ'=>'Ȃ','ȃ'=>'ȃ','Ȅ'=>'Ȅ','ȅ'=>'ȅ','Ȇ'=>'Ȇ','ȇ'=>'ȇ','Ȉ'=>'Ȉ','ȉ'=>'ȉ','Ȋ'=>'Ȋ','ȋ'=>'ȋ','Ȍ'=>'Ȍ','ȍ'=>'ȍ','Ȏ'=>'Ȏ','ȏ'=>'ȏ','Ȑ'=>'Ȑ','ȑ'=>'ȑ','Ȓ'=>'Ȓ','ȓ'=>'ȓ','Ȕ'=>'Ȕ','ȕ'=>'ȕ','Ȗ'=>'Ȗ','ȗ'=>'ȗ','Ș'=>'Ș','ș'=>'ș','Ț'=>'Ț','ț'=>'ț','Ȟ'=>'Ȟ','ȟ'=>'ȟ','Ȧ'=>'Ȧ','ȧ'=>'ȧ','Ȩ'=>'Ȩ','ȩ'=>'ȩ','Ȫ'=>'Ȫ','ȫ'=>'ȫ','Ȭ'=>'Ȭ','ȭ'=>'ȭ','Ȯ'=>'Ȯ','ȯ'=>'ȯ','Ȱ'=>'Ȱ','ȱ'=>'ȱ','Ȳ'=>'Ȳ','ȳ'=>'ȳ','̀'=>'̀','́'=>'́','̓'=>'̓','̈́'=>'̈́','ʹ'=>'ʹ',';'=>';','΅'=>'΅','Ά'=>'Ά','·'=>'·','Έ'=>'Έ','Ή'=>'Ή','Ί'=>'Ί','Ό'=>'Ό','Ύ'=>'Ύ','Ώ'=>'Ώ','ΐ'=>'ΐ','Ϊ'=>'Ϊ','Ϋ'=>'Ϋ','ά'=>'ά','έ'=>'έ','ή'=>'ή','ί'=>'ί','ΰ'=>'ΰ','ϊ'=>'ϊ','ϋ'=>'ϋ','ό'=>'ό','ύ'=>'ύ','ώ'=>'ώ','ϓ'=>'ϓ','ϔ'=>'ϔ','Ѐ'=>'Ѐ','Ё'=>'Ё','Ѓ'=>'Ѓ','Ї'=>'Ї','Ќ'=>'Ќ','Ѝ'=>'Ѝ','Ў'=>'Ў','Й'=>'Й','й'=>'й','ѐ'=>'ѐ','ё'=>'ё','ѓ'=>'ѓ','ї'=>'ї','ќ'=>'ќ','ѝ'=>'ѝ','ў'=>'ў','Ѷ'=>'Ѷ','ѷ'=>'ѷ','Ӂ'=>'Ӂ','ӂ'=>'ӂ','Ӑ'=>'Ӑ','ӑ'=>'ӑ','Ӓ'=>'Ӓ','ӓ'=>'ӓ','Ӗ'=>'Ӗ','ӗ'=>'ӗ','Ӛ'=>'Ӛ','ӛ'=>'ӛ','Ӝ'=>'Ӝ','ӝ'=>'ӝ','Ӟ'=>'Ӟ','ӟ'=>'ӟ','Ӣ'=>'Ӣ','ӣ'=>'ӣ','Ӥ'=>'Ӥ','ӥ'=>'ӥ','Ӧ'=>'Ӧ','ӧ'=>'ӧ','Ӫ'=>'Ӫ','ӫ'=>'ӫ','Ӭ'=>'Ӭ','ӭ'=>'ӭ','Ӯ'=>'Ӯ','ӯ'=>'ӯ','Ӱ'=>'Ӱ','ӱ'=>'ӱ','Ӳ'=>'Ӳ','ӳ'=>'ӳ','Ӵ'=>'Ӵ','ӵ'=>'ӵ','Ӹ'=>'Ӹ','ӹ'=>'ӹ','آ'=>'آ','أ'=>'أ','ؤ'=>'ؤ','إ'=>'إ','ئ'=>'ئ','ۀ'=>'ۀ','ۂ'=>'ۂ','ۓ'=>'ۓ','ऩ'=>'ऩ','ऱ'=>'ऱ','ऴ'=>'ऴ','क़'=>'क़','ख़'=>'ख़','ग़'=>'ग़','ज़'=>'ज़','ड़'=>'ड़','ढ़'=>'ढ़','फ़'=>'फ़','य़'=>'य़','ো'=>'ো','ৌ'=>'ৌ','ড়'=>'ড়','ঢ়'=>'ঢ়','য়'=>'য়','ਲ਼'=>'ਲ਼','ਸ਼'=>'ਸ਼','ਖ਼'=>'ਖ਼','ਗ਼'=>'ਗ਼','ਜ਼'=>'ਜ਼','ਫ਼'=>'ਫ਼','ୈ'=>'ୈ','ୋ'=>'ୋ','ୌ'=>'ୌ','ଡ଼'=>'ଡ଼','ଢ଼'=>'ଢ଼','ஔ'=>'ஔ','ொ'=>'ொ','ோ'=>'ோ','ௌ'=>'ௌ','ై'=>'ై','ೀ'=>'ೀ','ೇ'=>'ೇ','ೈ'=>'ೈ','ೊ'=>'ೊ','ೋ'=>'ೋ','ൊ'=>'ൊ','ോ'=>'ോ','ൌ'=>'ൌ','ේ'=>'ේ','ො'=>'ො','ෝ'=>'ෝ','ෞ'=>'ෞ','གྷ'=>'གྷ','ཌྷ'=>'ཌྷ','དྷ'=>'དྷ','བྷ'=>'བྷ','ཛྷ'=>'ཛྷ','ཀྵ'=>'ཀྵ','ཱི'=>'ཱི','ཱུ'=>'ཱུ','ྲྀ'=>'ྲྀ','ླྀ'=>'ླྀ','ཱྀ'=>'ཱྀ','ྒྷ'=>'ྒྷ','ྜྷ'=>'ྜྷ','ྡྷ'=>'ྡྷ','ྦྷ'=>'ྦྷ','ྫྷ'=>'ྫྷ','ྐྵ'=>'ྐྵ','ဦ'=>'ဦ','ᬆ'=>'ᬆ','ᬈ'=>'ᬈ','ᬊ'=>'ᬊ','ᬌ'=>'ᬌ','ᬎ'=>'ᬎ','ᬒ'=>'ᬒ','ᬻ'=>'ᬻ','ᬽ'=>'ᬽ','ᭀ'=>'ᭀ','ᭁ'=>'ᭁ','ᭃ'=>'ᭃ','Ḁ'=>'Ḁ','ḁ'=>'ḁ','Ḃ'=>'Ḃ','ḃ'=>'ḃ','Ḅ'=>'Ḅ','ḅ'=>'ḅ','Ḇ'=>'Ḇ','ḇ'=>'ḇ','Ḉ'=>'Ḉ','ḉ'=>'ḉ','Ḋ'=>'Ḋ','ḋ'=>'ḋ','Ḍ'=>'Ḍ','ḍ'=>'ḍ','Ḏ'=>'Ḏ','ḏ'=>'ḏ','Ḑ'=>'Ḑ','ḑ'=>'ḑ','Ḓ'=>'Ḓ','ḓ'=>'ḓ','Ḕ'=>'Ḕ','ḕ'=>'ḕ','Ḗ'=>'Ḗ','ḗ'=>'ḗ','Ḙ'=>'Ḙ','ḙ'=>'ḙ','Ḛ'=>'Ḛ','ḛ'=>'ḛ','Ḝ'=>'Ḝ','ḝ'=>'ḝ','Ḟ'=>'Ḟ','ḟ'=>'ḟ','Ḡ'=>'Ḡ','ḡ'=>'ḡ','Ḣ'=>'Ḣ','ḣ'=>'ḣ','Ḥ'=>'Ḥ','ḥ'=>'ḥ','Ḧ'=>'Ḧ','ḧ'=>'ḧ','Ḩ'=>'Ḩ','ḩ'=>'ḩ','Ḫ'=>'Ḫ','ḫ'=>'ḫ','Ḭ'=>'Ḭ','ḭ'=>'ḭ','Ḯ'=>'Ḯ','ḯ'=>'ḯ','Ḱ'=>'Ḱ','ḱ'=>'ḱ','Ḳ'=>'Ḳ','ḳ'=>'ḳ','Ḵ'=>'Ḵ','ḵ'=>'ḵ','Ḷ'=>'Ḷ','ḷ'=>'ḷ','Ḹ'=>'Ḹ','ḹ'=>'ḹ','Ḻ'=>'Ḻ','ḻ'=>'ḻ','Ḽ'=>'Ḽ','ḽ'=>'ḽ','Ḿ'=>'Ḿ','ḿ'=>'ḿ','Ṁ'=>'Ṁ','ṁ'=>'ṁ','Ṃ'=>'Ṃ','ṃ'=>'ṃ','Ṅ'=>'Ṅ','ṅ'=>'ṅ','Ṇ'=>'Ṇ','ṇ'=>'ṇ','Ṉ'=>'Ṉ','ṉ'=>'ṉ','Ṋ'=>'Ṋ','ṋ'=>'ṋ','Ṍ'=>'Ṍ','ṍ'=>'ṍ','Ṏ'=>'Ṏ','ṏ'=>'ṏ','Ṑ'=>'Ṑ','ṑ'=>'ṑ','Ṓ'=>'Ṓ','ṓ'=>'ṓ','Ṕ'=>'Ṕ','ṕ'=>'ṕ','Ṗ'=>'Ṗ','ṗ'=>'ṗ','Ṙ'=>'Ṙ','ṙ'=>'ṙ','Ṛ'=>'Ṛ','ṛ'=>'ṛ','Ṝ'=>'Ṝ','ṝ'=>'ṝ','Ṟ'=>'Ṟ','ṟ'=>'ṟ','Ṡ'=>'Ṡ','ṡ'=>'ṡ','Ṣ'=>'Ṣ','ṣ'=>'ṣ','Ṥ'=>'Ṥ','ṥ'=>'ṥ','Ṧ'=>'Ṧ','ṧ'=>'ṧ','Ṩ'=>'Ṩ','ṩ'=>'ṩ','Ṫ'=>'Ṫ','ṫ'=>'ṫ','Ṭ'=>'Ṭ','ṭ'=>'ṭ','Ṯ'=>'Ṯ','ṯ'=>'ṯ','Ṱ'=>'Ṱ','ṱ'=>'ṱ','Ṳ'=>'Ṳ','ṳ'=>'ṳ','Ṵ'=>'Ṵ','ṵ'=>'ṵ','Ṷ'=>'Ṷ','ṷ'=>'ṷ','Ṹ'=>'Ṹ','ṹ'=>'ṹ','Ṻ'=>'Ṻ','ṻ'=>'ṻ','Ṽ'=>'Ṽ','ṽ'=>'ṽ','Ṿ'=>'Ṿ','ṿ'=>'ṿ','Ẁ'=>'Ẁ','ẁ'=>'ẁ','Ẃ'=>'Ẃ','ẃ'=>'ẃ','Ẅ'=>'Ẅ','ẅ'=>'ẅ','Ẇ'=>'Ẇ','ẇ'=>'ẇ','Ẉ'=>'Ẉ','ẉ'=>'ẉ','Ẋ'=>'Ẋ','ẋ'=>'ẋ','Ẍ'=>'Ẍ','ẍ'=>'ẍ','Ẏ'=>'Ẏ','ẏ'=>'ẏ','Ẑ'=>'Ẑ','ẑ'=>'ẑ','Ẓ'=>'Ẓ','ẓ'=>'ẓ','Ẕ'=>'Ẕ','ẕ'=>'ẕ','ẖ'=>'ẖ','ẗ'=>'ẗ','ẘ'=>'ẘ','ẙ'=>'ẙ','ẛ'=>'ẛ','Ạ'=>'Ạ','ạ'=>'ạ','Ả'=>'Ả','ả'=>'ả','Ấ'=>'Ấ','ấ'=>'ấ','Ầ'=>'Ầ','ầ'=>'ầ','Ẩ'=>'Ẩ','ẩ'=>'ẩ','Ẫ'=>'Ẫ','ẫ'=>'ẫ','Ậ'=>'Ậ','ậ'=>'ậ','Ắ'=>'Ắ','ắ'=>'ắ','Ằ'=>'Ằ','ằ'=>'ằ','Ẳ'=>'Ẳ','ẳ'=>'ẳ','Ẵ'=>'Ẵ','ẵ'=>'ẵ','Ặ'=>'Ặ','ặ'=>'ặ','Ẹ'=>'Ẹ','ẹ'=>'ẹ','Ẻ'=>'Ẻ','ẻ'=>'ẻ','Ẽ'=>'Ẽ','ẽ'=>'ẽ','Ế'=>'Ế','ế'=>'ế','Ề'=>'Ề','ề'=>'ề','Ể'=>'Ể','ể'=>'ể','Ễ'=>'Ễ','ễ'=>'ễ','Ệ'=>'Ệ','ệ'=>'ệ','Ỉ'=>'Ỉ','ỉ'=>'ỉ','Ị'=>'Ị','ị'=>'ị','Ọ'=>'Ọ','ọ'=>'ọ','Ỏ'=>'Ỏ','ỏ'=>'ỏ','Ố'=>'Ố','ố'=>'ố','Ồ'=>'Ồ','ồ'=>'ồ','Ổ'=>'Ổ','ổ'=>'ổ','Ỗ'=>'Ỗ','ỗ'=>'ỗ','Ộ'=>'Ộ','ộ'=>'ộ','Ớ'=>'Ớ','ớ'=>'ớ','Ờ'=>'Ờ','ờ'=>'ờ','Ở'=>'Ở','ở'=>'ở','Ỡ'=>'Ỡ','ỡ'=>'ỡ','Ợ'=>'Ợ','ợ'=>'ợ','Ụ'=>'Ụ','ụ'=>'ụ','Ủ'=>'Ủ','ủ'=>'ủ','Ứ'=>'Ứ','ứ'=>'ứ','Ừ'=>'Ừ','ừ'=>'ừ','Ử'=>'Ử','ử'=>'ử','Ữ'=>'Ữ','ữ'=>'ữ','Ự'=>'Ự','ự'=>'ự','Ỳ'=>'Ỳ','ỳ'=>'ỳ','Ỵ'=>'Ỵ','ỵ'=>'ỵ','Ỷ'=>'Ỷ','ỷ'=>'ỷ','Ỹ'=>'Ỹ','ỹ'=>'ỹ','ἀ'=>'ἀ','ἁ'=>'ἁ','ἂ'=>'ἂ','ἃ'=>'ἃ','ἄ'=>'ἄ','ἅ'=>'ἅ','ἆ'=>'ἆ','ἇ'=>'ἇ','Ἀ'=>'Ἀ','Ἁ'=>'Ἁ','Ἂ'=>'Ἂ','Ἃ'=>'Ἃ','Ἄ'=>'Ἄ','Ἅ'=>'Ἅ','Ἆ'=>'Ἆ','Ἇ'=>'Ἇ','ἐ'=>'ἐ','ἑ'=>'ἑ','ἒ'=>'ἒ','ἓ'=>'ἓ','ἔ'=>'ἔ','ἕ'=>'ἕ','Ἐ'=>'Ἐ','Ἑ'=>'Ἑ','Ἒ'=>'Ἒ','Ἓ'=>'Ἓ','Ἔ'=>'Ἔ','Ἕ'=>'Ἕ','ἠ'=>'ἠ','ἡ'=>'ἡ','ἢ'=>'ἢ','ἣ'=>'ἣ','ἤ'=>'ἤ','ἥ'=>'ἥ','ἦ'=>'ἦ','ἧ'=>'ἧ','Ἠ'=>'Ἠ','Ἡ'=>'Ἡ','Ἢ'=>'Ἢ','Ἣ'=>'Ἣ','Ἤ'=>'Ἤ','Ἥ'=>'Ἥ','Ἦ'=>'Ἦ','Ἧ'=>'Ἧ','ἰ'=>'ἰ','ἱ'=>'ἱ','ἲ'=>'ἲ','ἳ'=>'ἳ','ἴ'=>'ἴ','ἵ'=>'ἵ','ἶ'=>'ἶ','ἷ'=>'ἷ','Ἰ'=>'Ἰ','Ἱ'=>'Ἱ','Ἲ'=>'Ἲ','Ἳ'=>'Ἳ','Ἴ'=>'Ἴ','Ἵ'=>'Ἵ','Ἶ'=>'Ἶ','Ἷ'=>'Ἷ','ὀ'=>'ὀ','ὁ'=>'ὁ','ὂ'=>'ὂ','ὃ'=>'ὃ','ὄ'=>'ὄ','ὅ'=>'ὅ','Ὀ'=>'Ὀ','Ὁ'=>'Ὁ','Ὂ'=>'Ὂ','Ὃ'=>'Ὃ','Ὄ'=>'Ὄ','Ὅ'=>'Ὅ','ὐ'=>'ὐ','ὑ'=>'ὑ','ὒ'=>'ὒ','ὓ'=>'ὓ','ὔ'=>'ὔ','ὕ'=>'ὕ','ὖ'=>'ὖ','ὗ'=>'ὗ','Ὑ'=>'Ὑ','Ὓ'=>'Ὓ','Ὕ'=>'Ὕ','Ὗ'=>'Ὗ','ὠ'=>'ὠ','ὡ'=>'ὡ','ὢ'=>'ὢ','ὣ'=>'ὣ','ὤ'=>'ὤ','ὥ'=>'ὥ','ὦ'=>'ὦ','ὧ'=>'ὧ','Ὠ'=>'Ὠ','Ὡ'=>'Ὡ','Ὢ'=>'Ὢ','Ὣ'=>'Ὣ','Ὤ'=>'Ὤ','Ὥ'=>'Ὥ','Ὦ'=>'Ὦ','Ὧ'=>'Ὧ','ὰ'=>'ὰ','ά'=>'ά','ὲ'=>'ὲ','έ'=>'έ','ὴ'=>'ὴ','ή'=>'ή','ὶ'=>'ὶ','ί'=>'ί','ὸ'=>'ὸ','ό'=>'ό','ὺ'=>'ὺ','ύ'=>'ύ','ὼ'=>'ὼ','ώ'=>'ώ','ᾀ'=>'ᾀ','ᾁ'=>'ᾁ','ᾂ'=>'ᾂ','ᾃ'=>'ᾃ','ᾄ'=>'ᾄ','ᾅ'=>'ᾅ','ᾆ'=>'ᾆ','ᾇ'=>'ᾇ','ᾈ'=>'ᾈ','ᾉ'=>'ᾉ','ᾊ'=>'ᾊ','ᾋ'=>'ᾋ','ᾌ'=>'ᾌ','ᾍ'=>'ᾍ','ᾎ'=>'ᾎ','ᾏ'=>'ᾏ','ᾐ'=>'ᾐ','ᾑ'=>'ᾑ','ᾒ'=>'ᾒ','ᾓ'=>'ᾓ','ᾔ'=>'ᾔ','ᾕ'=>'ᾕ','ᾖ'=>'ᾖ','ᾗ'=>'ᾗ','ᾘ'=>'ᾘ','ᾙ'=>'ᾙ','ᾚ'=>'ᾚ','ᾛ'=>'ᾛ','ᾜ'=>'ᾜ','ᾝ'=>'ᾝ','ᾞ'=>'ᾞ','ᾟ'=>'ᾟ','ᾠ'=>'ᾠ','ᾡ'=>'ᾡ','ᾢ'=>'ᾢ','ᾣ'=>'ᾣ','ᾤ'=>'ᾤ','ᾥ'=>'ᾥ','ᾦ'=>'ᾦ','ᾧ'=>'ᾧ','ᾨ'=>'ᾨ','ᾩ'=>'ᾩ','ᾪ'=>'ᾪ','ᾫ'=>'ᾫ','ᾬ'=>'ᾬ','ᾭ'=>'ᾭ','ᾮ'=>'ᾮ','ᾯ'=>'ᾯ','ᾰ'=>'ᾰ','ᾱ'=>'ᾱ','ᾲ'=>'ᾲ','ᾳ'=>'ᾳ','ᾴ'=>'ᾴ','ᾶ'=>'ᾶ','ᾷ'=>'ᾷ','Ᾰ'=>'Ᾰ','Ᾱ'=>'Ᾱ','Ὰ'=>'Ὰ','Ά'=>'Ά','ᾼ'=>'ᾼ','ι'=>'ι','῁'=>'῁','ῂ'=>'ῂ','ῃ'=>'ῃ','ῄ'=>'ῄ','ῆ'=>'ῆ','ῇ'=>'ῇ','Ὲ'=>'Ὲ','Έ'=>'Έ','Ὴ'=>'Ὴ','Ή'=>'Ή','ῌ'=>'ῌ','῍'=>'῍','῎'=>'῎','῏'=>'῏','ῐ'=>'ῐ','ῑ'=>'ῑ','ῒ'=>'ῒ','ΐ'=>'ΐ','ῖ'=>'ῖ','ῗ'=>'ῗ','Ῐ'=>'Ῐ','Ῑ'=>'Ῑ','Ὶ'=>'Ὶ','Ί'=>'Ί','῝'=>'῝','῞'=>'῞','῟'=>'῟','ῠ'=>'ῠ','ῡ'=>'ῡ','ῢ'=>'ῢ','ΰ'=>'ΰ','ῤ'=>'ῤ','ῥ'=>'ῥ','ῦ'=>'ῦ','ῧ'=>'ῧ','Ῠ'=>'Ῠ','Ῡ'=>'Ῡ','Ὺ'=>'Ὺ','Ύ'=>'Ύ','Ῥ'=>'Ῥ','῭'=>'῭','΅'=>'΅','`'=>'`','ῲ'=>'ῲ','ῳ'=>'ῳ','ῴ'=>'ῴ','ῶ'=>'ῶ','ῷ'=>'ῷ','Ὸ'=>'Ὸ','Ό'=>'Ό','Ὼ'=>'Ὼ','Ώ'=>'Ώ','ῼ'=>'ῼ','´'=>'´',' '=>' ',' '=>' ','Ω'=>'Ω','K'=>'K','Å'=>'Å','↚'=>'↚','↛'=>'↛','↮'=>'↮','⇍'=>'⇍','⇎'=>'⇎','⇏'=>'⇏','∄'=>'∄','∉'=>'∉','∌'=>'∌','∤'=>'∤','∦'=>'∦','≁'=>'≁','≄'=>'≄','≇'=>'≇','≉'=>'≉','≠'=>'≠','≢'=>'≢','≭'=>'≭','≮'=>'≮','≯'=>'≯','≰'=>'≰','≱'=>'≱','≴'=>'≴','≵'=>'≵','≸'=>'≸','≹'=>'≹','⊀'=>'⊀','⊁'=>'⊁','⊄'=>'⊄','⊅'=>'⊅','⊈'=>'⊈','⊉'=>'⊉','⊬'=>'⊬','⊭'=>'⊭','⊮'=>'⊮','⊯'=>'⊯','⋠'=>'⋠','⋡'=>'⋡','⋢'=>'⋢','⋣'=>'⋣','⋪'=>'⋪','⋫'=>'⋫','⋬'=>'⋬','⋭'=>'⋭','〈'=>'〈','〉'=>'〉','⫝̸'=>'⫝̸','が'=>'が','ぎ'=>'ぎ','ぐ'=>'ぐ','げ'=>'げ','ご'=>'ご','ざ'=>'ざ','じ'=>'じ','ず'=>'ず','ぜ'=>'ぜ','ぞ'=>'ぞ','だ'=>'だ','ぢ'=>'ぢ','づ'=>'づ','で'=>'で','ど'=>'ど','ば'=>'ば','ぱ'=>'ぱ','び'=>'び','ぴ'=>'ぴ','ぶ'=>'ぶ','ぷ'=>'ぷ','べ'=>'べ','ぺ'=>'ぺ','ぼ'=>'ぼ','ぽ'=>'ぽ','ゔ'=>'ゔ','ゞ'=>'ゞ','ガ'=>'ガ','ギ'=>'ギ','グ'=>'グ','ゲ'=>'ゲ','ゴ'=>'ゴ','ザ'=>'ザ','ジ'=>'ジ','ズ'=>'ズ','ゼ'=>'ゼ','ゾ'=>'ゾ','ダ'=>'ダ','ヂ'=>'ヂ','ヅ'=>'ヅ','デ'=>'デ','ド'=>'ド','バ'=>'バ','パ'=>'パ','ビ'=>'ビ','ピ'=>'ピ','ブ'=>'ブ','プ'=>'プ','ベ'=>'ベ','ペ'=>'ペ','ボ'=>'ボ','ポ'=>'ポ','ヴ'=>'ヴ','ヷ'=>'ヷ','ヸ'=>'ヸ','ヹ'=>'ヹ','ヺ'=>'ヺ','ヾ'=>'ヾ','豈'=>'豈','更'=>'更','車'=>'車','賈'=>'賈','滑'=>'滑','串'=>'串','句'=>'句','龜'=>'龜','龜'=>'龜','契'=>'契','金'=>'金','喇'=>'喇','奈'=>'奈','懶'=>'懶','癩'=>'癩','羅'=>'羅','蘿'=>'蘿','螺'=>'螺','裸'=>'裸','邏'=>'邏','樂'=>'樂','洛'=>'洛','烙'=>'烙','珞'=>'珞','落'=>'落','酪'=>'酪','駱'=>'駱','亂'=>'亂','卵'=>'卵','欄'=>'欄','爛'=>'爛','蘭'=>'蘭','鸞'=>'鸞','嵐'=>'嵐','濫'=>'濫','藍'=>'藍','襤'=>'襤','拉'=>'拉','臘'=>'臘','蠟'=>'蠟','廊'=>'廊','朗'=>'朗','浪'=>'浪','狼'=>'狼','郎'=>'郎','來'=>'來','冷'=>'冷','勞'=>'勞','擄'=>'擄','櫓'=>'櫓','爐'=>'爐','盧'=>'盧','老'=>'老','蘆'=>'蘆','虜'=>'虜','路'=>'路','露'=>'露','魯'=>'魯','鷺'=>'鷺','碌'=>'碌','祿'=>'祿','綠'=>'綠','菉'=>'菉','錄'=>'錄','鹿'=>'鹿','論'=>'論','壟'=>'壟','弄'=>'弄','籠'=>'籠','聾'=>'聾','牢'=>'牢','磊'=>'磊','賂'=>'賂','雷'=>'雷','壘'=>'壘','屢'=>'屢','樓'=>'樓','淚'=>'淚','漏'=>'漏','累'=>'累','縷'=>'縷','陋'=>'陋','勒'=>'勒','肋'=>'肋','凜'=>'凜','凌'=>'凌','稜'=>'稜','綾'=>'綾','菱'=>'菱','陵'=>'陵','讀'=>'讀','拏'=>'拏','樂'=>'樂','諾'=>'諾','丹'=>'丹','寧'=>'寧','怒'=>'怒','率'=>'率','異'=>'異','北'=>'北','磻'=>'磻','便'=>'便','復'=>'復','不'=>'不','泌'=>'泌','數'=>'數','索'=>'索','參'=>'參','塞'=>'塞','省'=>'省','葉'=>'葉','說'=>'說','殺'=>'殺','辰'=>'辰','沈'=>'沈','拾'=>'拾','若'=>'若','掠'=>'掠','略'=>'略','亮'=>'亮','兩'=>'兩','凉'=>'凉','梁'=>'梁','糧'=>'糧','良'=>'良','諒'=>'諒','量'=>'量','勵'=>'勵','呂'=>'呂','女'=>'女','廬'=>'廬','旅'=>'旅','濾'=>'濾','礪'=>'礪','閭'=>'閭','驪'=>'驪','麗'=>'麗','黎'=>'黎','力'=>'力','曆'=>'曆','歷'=>'歷','轢'=>'轢','年'=>'年','憐'=>'憐','戀'=>'戀','撚'=>'撚','漣'=>'漣','煉'=>'煉','璉'=>'璉','秊'=>'秊','練'=>'練','聯'=>'聯','輦'=>'輦','蓮'=>'蓮','連'=>'連','鍊'=>'鍊','列'=>'列','劣'=>'劣','咽'=>'咽','烈'=>'烈','裂'=>'裂','說'=>'說','廉'=>'廉','念'=>'念','捻'=>'捻','殮'=>'殮','簾'=>'簾','獵'=>'獵','令'=>'令','囹'=>'囹','寧'=>'寧','嶺'=>'嶺','怜'=>'怜','玲'=>'玲','瑩'=>'瑩','羚'=>'羚','聆'=>'聆','鈴'=>'鈴','零'=>'零','靈'=>'靈','領'=>'領','例'=>'例','禮'=>'禮','醴'=>'醴','隸'=>'隸','惡'=>'惡','了'=>'了','僚'=>'僚','寮'=>'寮','尿'=>'尿','料'=>'料','樂'=>'樂','燎'=>'燎','療'=>'療','蓼'=>'蓼','遼'=>'遼','龍'=>'龍','暈'=>'暈','阮'=>'阮','劉'=>'劉','杻'=>'杻','柳'=>'柳','流'=>'流','溜'=>'溜','琉'=>'琉','留'=>'留','硫'=>'硫','紐'=>'紐','類'=>'類','六'=>'六','戮'=>'戮','陸'=>'陸','倫'=>'倫','崙'=>'崙','淪'=>'淪','輪'=>'輪','律'=>'律','慄'=>'慄','栗'=>'栗','率'=>'率','隆'=>'隆','利'=>'利','吏'=>'吏','履'=>'履','易'=>'易','李'=>'李','梨'=>'梨','泥'=>'泥','理'=>'理','痢'=>'痢','罹'=>'罹','裏'=>'裏','裡'=>'裡','里'=>'里','離'=>'離','匿'=>'匿','溺'=>'溺','吝'=>'吝','燐'=>'燐','璘'=>'璘','藺'=>'藺','隣'=>'隣','鱗'=>'鱗','麟'=>'麟','林'=>'林','淋'=>'淋','臨'=>'臨','立'=>'立','笠'=>'笠','粒'=>'粒','狀'=>'狀','炙'=>'炙','識'=>'識','什'=>'什','茶'=>'茶','刺'=>'刺','切'=>'切','度'=>'度','拓'=>'拓','糖'=>'糖','宅'=>'宅','洞'=>'洞','暴'=>'暴','輻'=>'輻','行'=>'行','降'=>'降','見'=>'見','廓'=>'廓','兀'=>'兀','嗀'=>'嗀','塚'=>'塚','晴'=>'晴','凞'=>'凞','猪'=>'猪','益'=>'益','礼'=>'礼','神'=>'神','祥'=>'祥','福'=>'福','靖'=>'靖','精'=>'精','羽'=>'羽','蘒'=>'蘒','諸'=>'諸','逸'=>'逸','都'=>'都','飯'=>'飯','飼'=>'飼','館'=>'館','鶴'=>'鶴','侮'=>'侮','僧'=>'僧','免'=>'免','勉'=>'勉','勤'=>'勤','卑'=>'卑','喝'=>'喝','嘆'=>'嘆','器'=>'器','塀'=>'塀','墨'=>'墨','層'=>'層','屮'=>'屮','悔'=>'悔','慨'=>'慨','憎'=>'憎','懲'=>'懲','敏'=>'敏','既'=>'既','暑'=>'暑','梅'=>'梅','海'=>'海','渚'=>'渚','漢'=>'漢','煮'=>'煮','爫'=>'爫','琢'=>'琢','碑'=>'碑','社'=>'社','祉'=>'祉','祈'=>'祈','祐'=>'祐','祖'=>'祖','祝'=>'祝','禍'=>'禍','禎'=>'禎','穀'=>'穀','突'=>'突','節'=>'節','練'=>'練','縉'=>'縉','繁'=>'繁','署'=>'署','者'=>'者','臭'=>'臭','艹'=>'艹','艹'=>'艹','著'=>'著','褐'=>'褐','視'=>'視','謁'=>'謁','謹'=>'謹','賓'=>'賓','贈'=>'贈','辶'=>'辶','逸'=>'逸','難'=>'難','響'=>'響','頻'=>'頻','並'=>'並','况'=>'况','全'=>'全','侀'=>'侀','充'=>'充','冀'=>'冀','勇'=>'勇','勺'=>'勺','喝'=>'喝','啕'=>'啕','喙'=>'喙','嗢'=>'嗢','塚'=>'塚','墳'=>'墳','奄'=>'奄','奔'=>'奔','婢'=>'婢','嬨'=>'嬨','廒'=>'廒','廙'=>'廙','彩'=>'彩','徭'=>'徭','惘'=>'惘','慎'=>'慎','愈'=>'愈','憎'=>'憎','慠'=>'慠','懲'=>'懲','戴'=>'戴','揄'=>'揄','搜'=>'搜','摒'=>'摒','敖'=>'敖','晴'=>'晴','朗'=>'朗','望'=>'望','杖'=>'杖','歹'=>'歹','殺'=>'殺','流'=>'流','滛'=>'滛','滋'=>'滋','漢'=>'漢','瀞'=>'瀞','煮'=>'煮','瞧'=>'瞧','爵'=>'爵','犯'=>'犯','猪'=>'猪','瑱'=>'瑱','甆'=>'甆','画'=>'画','瘝'=>'瘝','瘟'=>'瘟','益'=>'益','盛'=>'盛','直'=>'直','睊'=>'睊','着'=>'着','磌'=>'磌','窱'=>'窱','節'=>'節','类'=>'类','絛'=>'絛','練'=>'練','缾'=>'缾','者'=>'者','荒'=>'荒','華'=>'華','蝹'=>'蝹','襁'=>'襁','覆'=>'覆','視'=>'視','調'=>'調','諸'=>'諸','請'=>'請','謁'=>'謁','諾'=>'諾','諭'=>'諭','謹'=>'謹','變'=>'變','贈'=>'贈','輸'=>'輸','遲'=>'遲','醙'=>'醙','鉶'=>'鉶','陼'=>'陼','難'=>'難','靖'=>'靖','韛'=>'韛','響'=>'響','頋'=>'頋','頻'=>'頻','鬒'=>'鬒','龜'=>'龜','𢡊'=>'𢡊','𢡄'=>'𢡄','𣏕'=>'𣏕','㮝'=>'㮝','䀘'=>'䀘','䀹'=>'䀹','𥉉'=>'𥉉','𥳐'=>'𥳐','𧻓'=>'𧻓','齃'=>'齃','龎'=>'龎','יִ'=>'יִ','ײַ'=>'ײַ','שׁ'=>'שׁ','שׂ'=>'שׂ','שּׁ'=>'שּׁ','שּׂ'=>'שּׂ','אַ'=>'אַ','אָ'=>'אָ','אּ'=>'אּ','בּ'=>'בּ','גּ'=>'גּ','דּ'=>'דּ','הּ'=>'הּ','וּ'=>'וּ','זּ'=>'זּ','טּ'=>'טּ','יּ'=>'יּ','ךּ'=>'ךּ','כּ'=>'כּ','לּ'=>'לּ','מּ'=>'מּ','נּ'=>'נּ','סּ'=>'סּ','ףּ'=>'ףּ','פּ'=>'פּ','צּ'=>'צּ','קּ'=>'קּ','רּ'=>'רּ','שּ'=>'שּ','תּ'=>'תּ','וֹ'=>'וֹ','בֿ'=>'בֿ','כֿ'=>'כֿ','פֿ'=>'פֿ','𝅗𝅥'=>'𝅗𝅥','𝅘𝅥'=>'𝅘𝅥','𝅘𝅥𝅮'=>'𝅘𝅥𝅮','𝅘𝅥𝅯'=>'𝅘𝅥𝅯','𝅘𝅥𝅰'=>'𝅘𝅥𝅰','𝅘𝅥𝅱'=>'𝅘𝅥𝅱','𝅘𝅥𝅲'=>'𝅘𝅥𝅲','𝆹𝅥'=>'𝆹𝅥','𝆺𝅥'=>'𝆺𝅥','𝆹𝅥𝅮'=>'𝆹𝅥𝅮','𝆺𝅥𝅮'=>'𝆺𝅥𝅮','𝆹𝅥𝅯'=>'𝆹𝅥𝅯','𝆺𝅥𝅯'=>'𝆺𝅥𝅯','丽'=>'丽','丸'=>'丸','乁'=>'乁','𠄢'=>'𠄢','你'=>'你','侮'=>'侮','侻'=>'侻','倂'=>'倂','偺'=>'偺','備'=>'備','僧'=>'僧','像'=>'像','㒞'=>'㒞','𠘺'=>'𠘺','免'=>'免','兔'=>'兔','兤'=>'兤','具'=>'具','𠔜'=>'𠔜','㒹'=>'㒹','內'=>'內','再'=>'再','𠕋'=>'𠕋','冗'=>'冗','冤'=>'冤','仌'=>'仌','冬'=>'冬','况'=>'况','𩇟'=>'𩇟','凵'=>'凵','刃'=>'刃','㓟'=>'㓟','刻'=>'刻','剆'=>'剆','割'=>'割','剷'=>'剷','㔕'=>'㔕','勇'=>'勇','勉'=>'勉','勤'=>'勤','勺'=>'勺','包'=>'包','匆'=>'匆','北'=>'北','卉'=>'卉','卑'=>'卑','博'=>'博','即'=>'即','卽'=>'卽','卿'=>'卿','卿'=>'卿','卿'=>'卿','𠨬'=>'𠨬','灰'=>'灰','及'=>'及','叟'=>'叟','𠭣'=>'𠭣','叫'=>'叫','叱'=>'叱','吆'=>'吆','咞'=>'咞','吸'=>'吸','呈'=>'呈','周'=>'周','咢'=>'咢','哶'=>'哶','唐'=>'唐','啓'=>'啓','啣'=>'啣','善'=>'善','善'=>'善','喙'=>'喙','喫'=>'喫','喳'=>'喳','嗂'=>'嗂','圖'=>'圖','嘆'=>'嘆','圗'=>'圗','噑'=>'噑','噴'=>'噴','切'=>'切','壮'=>'壮','城'=>'城','埴'=>'埴','堍'=>'堍','型'=>'型','堲'=>'堲','報'=>'報','墬'=>'墬','𡓤'=>'𡓤','売'=>'売','壷'=>'壷','夆'=>'夆','多'=>'多','夢'=>'夢','奢'=>'奢','𡚨'=>'𡚨','𡛪'=>'𡛪','姬'=>'姬','娛'=>'娛','娧'=>'娧','姘'=>'姘','婦'=>'婦','㛮'=>'㛮','㛼'=>'㛼','嬈'=>'嬈','嬾'=>'嬾','嬾'=>'嬾','𡧈'=>'𡧈','寃'=>'寃','寘'=>'寘','寧'=>'寧','寳'=>'寳','𡬘'=>'𡬘','寿'=>'寿','将'=>'将','当'=>'当','尢'=>'尢','㞁'=>'㞁','屠'=>'屠','屮'=>'屮','峀'=>'峀','岍'=>'岍','𡷤'=>'𡷤','嵃'=>'嵃','𡷦'=>'𡷦','嵮'=>'嵮','嵫'=>'嵫','嵼'=>'嵼','巡'=>'巡','巢'=>'巢','㠯'=>'㠯','巽'=>'巽','帨'=>'帨','帽'=>'帽','幩'=>'幩','㡢'=>'㡢','𢆃'=>'𢆃','㡼'=>'㡼','庰'=>'庰','庳'=>'庳','庶'=>'庶','廊'=>'廊','𪎒'=>'𪎒','廾'=>'廾','𢌱'=>'𢌱','𢌱'=>'𢌱','舁'=>'舁','弢'=>'弢','弢'=>'弢','㣇'=>'㣇','𣊸'=>'𣊸','𦇚'=>'𦇚','形'=>'形','彫'=>'彫','㣣'=>'㣣','徚'=>'徚','忍'=>'忍','志'=>'志','忹'=>'忹','悁'=>'悁','㤺'=>'㤺','㤜'=>'㤜','悔'=>'悔','𢛔'=>'𢛔','惇'=>'惇','慈'=>'慈','慌'=>'慌','慎'=>'慎','慌'=>'慌','慺'=>'慺','憎'=>'憎','憲'=>'憲','憤'=>'憤','憯'=>'憯','懞'=>'懞','懲'=>'懲','懶'=>'懶','成'=>'成','戛'=>'戛','扝'=>'扝','抱'=>'抱','拔'=>'拔','捐'=>'捐','𢬌'=>'𢬌','挽'=>'挽','拼'=>'拼','捨'=>'捨','掃'=>'掃','揤'=>'揤','𢯱'=>'𢯱','搢'=>'搢','揅'=>'揅','掩'=>'掩','㨮'=>'㨮','摩'=>'摩','摾'=>'摾','撝'=>'撝','摷'=>'摷','㩬'=>'㩬','敏'=>'敏','敬'=>'敬','𣀊'=>'𣀊','旣'=>'旣','書'=>'書','晉'=>'晉','㬙'=>'㬙','暑'=>'暑','㬈'=>'㬈','㫤'=>'㫤','冒'=>'冒','冕'=>'冕','最'=>'最','暜'=>'暜','肭'=>'肭','䏙'=>'䏙','朗'=>'朗','望'=>'望','朡'=>'朡','杞'=>'杞','杓'=>'杓','𣏃'=>'𣏃','㭉'=>'㭉','柺'=>'柺','枅'=>'枅','桒'=>'桒','梅'=>'梅','𣑭'=>'𣑭','梎'=>'梎','栟'=>'栟','椔'=>'椔','㮝'=>'㮝','楂'=>'楂','榣'=>'榣','槪'=>'槪','檨'=>'檨','𣚣'=>'𣚣','櫛'=>'櫛','㰘'=>'㰘','次'=>'次','𣢧'=>'𣢧','歔'=>'歔','㱎'=>'㱎','歲'=>'歲','殟'=>'殟','殺'=>'殺','殻'=>'殻','𣪍'=>'𣪍','𡴋'=>'𡴋','𣫺'=>'𣫺','汎'=>'汎','𣲼'=>'𣲼','沿'=>'沿','泍'=>'泍','汧'=>'汧','洖'=>'洖','派'=>'派','海'=>'海','流'=>'流','浩'=>'浩','浸'=>'浸','涅'=>'涅','𣴞'=>'𣴞','洴'=>'洴','港'=>'港','湮'=>'湮','㴳'=>'㴳','滋'=>'滋','滇'=>'滇','𣻑'=>'𣻑','淹'=>'淹','潮'=>'潮','𣽞'=>'𣽞','𣾎'=>'𣾎','濆'=>'濆','瀹'=>'瀹','瀞'=>'瀞','瀛'=>'瀛','㶖'=>'㶖','灊'=>'灊','災'=>'災','灷'=>'灷','炭'=>'炭','𠔥'=>'𠔥','煅'=>'煅','𤉣'=>'𤉣','熜'=>'熜','𤎫'=>'𤎫','爨'=>'爨','爵'=>'爵','牐'=>'牐','𤘈'=>'𤘈','犀'=>'犀','犕'=>'犕','𤜵'=>'𤜵','𤠔'=>'𤠔','獺'=>'獺','王'=>'王','㺬'=>'㺬','玥'=>'玥','㺸'=>'㺸','㺸'=>'㺸','瑇'=>'瑇','瑜'=>'瑜','瑱'=>'瑱','璅'=>'璅','瓊'=>'瓊','㼛'=>'㼛','甤'=>'甤','𤰶'=>'𤰶','甾'=>'甾','𤲒'=>'𤲒','異'=>'異','𢆟'=>'𢆟','瘐'=>'瘐','𤾡'=>'𤾡','𤾸'=>'𤾸','𥁄'=>'𥁄','㿼'=>'㿼','䀈'=>'䀈','直'=>'直','𥃳'=>'𥃳','𥃲'=>'𥃲','𥄙'=>'𥄙','𥄳'=>'𥄳','眞'=>'眞','真'=>'真','真'=>'真','睊'=>'睊','䀹'=>'䀹','瞋'=>'瞋','䁆'=>'䁆','䂖'=>'䂖','𥐝'=>'𥐝','硎'=>'硎','碌'=>'碌','磌'=>'磌','䃣'=>'䃣','𥘦'=>'𥘦','祖'=>'祖','𥚚'=>'𥚚','𥛅'=>'𥛅','福'=>'福','秫'=>'秫','䄯'=>'䄯','穀'=>'穀','穊'=>'穊','穏'=>'穏','𥥼'=>'𥥼','𥪧'=>'𥪧','𥪧'=>'𥪧','竮'=>'竮','䈂'=>'䈂','𥮫'=>'𥮫','篆'=>'篆','築'=>'築','䈧'=>'䈧','𥲀'=>'𥲀','糒'=>'糒','䊠'=>'䊠','糨'=>'糨','糣'=>'糣','紀'=>'紀','𥾆'=>'𥾆','絣'=>'絣','䌁'=>'䌁','緇'=>'緇','縂'=>'縂','繅'=>'繅','䌴'=>'䌴','𦈨'=>'𦈨','𦉇'=>'𦉇','䍙'=>'䍙','𦋙'=>'𦋙','罺'=>'罺','𦌾'=>'𦌾','羕'=>'羕','翺'=>'翺','者'=>'者','𦓚'=>'𦓚','𦔣'=>'𦔣','聠'=>'聠','𦖨'=>'𦖨','聰'=>'聰','𣍟'=>'𣍟','䏕'=>'䏕','育'=>'育','脃'=>'脃','䐋'=>'䐋','脾'=>'脾','媵'=>'媵','𦞧'=>'𦞧','𦞵'=>'𦞵','𣎓'=>'𣎓','𣎜'=>'𣎜','舁'=>'舁','舄'=>'舄','辞'=>'辞','䑫'=>'䑫','芑'=>'芑','芋'=>'芋','芝'=>'芝','劳'=>'劳','花'=>'花','芳'=>'芳','芽'=>'芽','苦'=>'苦','𦬼'=>'𦬼','若'=>'若','茝'=>'茝','荣'=>'荣','莭'=>'莭','茣'=>'茣','莽'=>'莽','菧'=>'菧','著'=>'著','荓'=>'荓','菊'=>'菊','菌'=>'菌','菜'=>'菜','𦰶'=>'𦰶','𦵫'=>'𦵫','𦳕'=>'𦳕','䔫'=>'䔫','蓱'=>'蓱','蓳'=>'蓳','蔖'=>'蔖','𧏊'=>'𧏊','蕤'=>'蕤','𦼬'=>'𦼬','䕝'=>'䕝','䕡'=>'䕡','𦾱'=>'𦾱','𧃒'=>'𧃒','䕫'=>'䕫','虐'=>'虐','虜'=>'虜','虧'=>'虧','虩'=>'虩','蚩'=>'蚩','蚈'=>'蚈','蜎'=>'蜎','蛢'=>'蛢','蝹'=>'蝹','蜨'=>'蜨','蝫'=>'蝫','螆'=>'螆','䗗'=>'䗗','蟡'=>'蟡','蠁'=>'蠁','䗹'=>'䗹','衠'=>'衠','衣'=>'衣','𧙧'=>'𧙧','裗'=>'裗','裞'=>'裞','䘵'=>'䘵','裺'=>'裺','㒻'=>'㒻','𧢮'=>'𧢮','𧥦'=>'𧥦','䚾'=>'䚾','䛇'=>'䛇','誠'=>'誠','諭'=>'諭','變'=>'變','豕'=>'豕','𧲨'=>'𧲨','貫'=>'貫','賁'=>'賁','贛'=>'贛','起'=>'起','𧼯'=>'𧼯','𠠄'=>'𠠄','跋'=>'跋','趼'=>'趼','跰'=>'跰','𠣞'=>'𠣞','軔'=>'軔','輸'=>'輸','𨗒'=>'𨗒','𨗭'=>'𨗭','邔'=>'邔','郱'=>'郱','鄑'=>'鄑','𨜮'=>'𨜮','鄛'=>'鄛','鈸'=>'鈸','鋗'=>'鋗','鋘'=>'鋘','鉼'=>'鉼','鏹'=>'鏹','鐕'=>'鐕','𨯺'=>'𨯺','開'=>'開','䦕'=>'䦕','閷'=>'閷','𨵷'=>'𨵷','䧦'=>'䧦','雃'=>'雃','嶲'=>'嶲','霣'=>'霣','𩅅'=>'𩅅','𩈚'=>'𩈚','䩮'=>'䩮','䩶'=>'䩶','韠'=>'韠','𩐊'=>'𩐊','䪲'=>'䪲','𩒖'=>'𩒖','頋'=>'頋','頋'=>'頋','頩'=>'頩','𩖶'=>'𩖶','飢'=>'飢','䬳'=>'䬳','餩'=>'餩','馧'=>'馧','駂'=>'駂','駾'=>'駾','䯎'=>'䯎','𩬰'=>'𩬰','鬒'=>'鬒','鱀'=>'鱀','鳽'=>'鳽','䳎'=>'䳎','䳭'=>'䳭','鵧'=>'鵧','𪃎'=>'𪃎','䳸'=>'䳸','𪄅'=>'𪄅','𪈎'=>'𪈎','𪊑'=>'𪊑','麻'=>'麻','䵖'=>'䵖','黹'=>'黹','黾'=>'黾','鼅'=>'鼅','鼏'=>'鼏','鼖'=>'鼖','鼻'=>'鼻','𪘀'=>'𪘀');
diff --git a/phpBB/includes/utf/data/utf_compatibility_decomp.php b/phpBB/includes/utf/data/utf_compatibility_decomp.php
index 08a7a047a4..c62948e81a 100644
--- a/phpBB/includes/utf/data/utf_compatibility_decomp.php
+++ b/phpBB/includes/utf/data/utf_compatibility_decomp.php
@@ -1,2 +1,2 @@
<?php
-$GLOBALS['utf_compatibility_decomp']=array(' '=>' ','¨'=>' ̈','ª'=>'a','¯'=>' ̄','²'=>'2','³'=>'3','´'=>' ́','µ'=>'μ','¸'=>' ̧','¹'=>'1','º'=>'o','¼'=>'1⁄4','½'=>'1⁄2','¾'=>'3⁄4','À'=>'À','Á'=>'Á','Â'=>'Â','Ã'=>'Ã','Ä'=>'Ä','Å'=>'Å','Ç'=>'Ç','È'=>'È','É'=>'É','Ê'=>'Ê','Ë'=>'Ë','Ì'=>'Ì','Í'=>'Í','Î'=>'Î','Ï'=>'Ï','Ñ'=>'Ñ','Ò'=>'Ò','Ó'=>'Ó','Ô'=>'Ô','Õ'=>'Õ','Ö'=>'Ö','Ù'=>'Ù','Ú'=>'Ú','Û'=>'Û','Ü'=>'Ü','Ý'=>'Ý','à'=>'à','á'=>'á','â'=>'â','ã'=>'ã','ä'=>'ä','å'=>'å','ç'=>'ç','è'=>'è','é'=>'é','ê'=>'ê','ë'=>'ë','ì'=>'ì','í'=>'í','î'=>'î','ï'=>'ï','ñ'=>'ñ','ò'=>'ò','ó'=>'ó','ô'=>'ô','õ'=>'õ','ö'=>'ö','ù'=>'ù','ú'=>'ú','û'=>'û','ü'=>'ü','ý'=>'ý','ÿ'=>'ÿ','Ā'=>'Ā','ā'=>'ā','Ă'=>'Ă','ă'=>'ă','Ą'=>'Ą','ą'=>'ą','Ć'=>'Ć','ć'=>'ć','Ĉ'=>'Ĉ','ĉ'=>'ĉ','Ċ'=>'Ċ','ċ'=>'ċ','Č'=>'Č','č'=>'č','Ď'=>'Ď','ď'=>'ď','Ē'=>'Ē','ē'=>'ē','Ĕ'=>'Ĕ','ĕ'=>'ĕ','Ė'=>'Ė','ė'=>'ė','Ę'=>'Ę','ę'=>'ę','Ě'=>'Ě','ě'=>'ě','Ĝ'=>'Ĝ','ĝ'=>'ĝ','Ğ'=>'Ğ','ğ'=>'ğ','Ġ'=>'Ġ','ġ'=>'ġ','Ģ'=>'Ģ','ģ'=>'ģ','Ĥ'=>'Ĥ','ĥ'=>'ĥ','Ĩ'=>'Ĩ','ĩ'=>'ĩ','Ī'=>'Ī','ī'=>'ī','Ĭ'=>'Ĭ','ĭ'=>'ĭ','Į'=>'Į','į'=>'į','İ'=>'İ','IJ'=>'IJ','ij'=>'ij','Ĵ'=>'Ĵ','ĵ'=>'ĵ','Ķ'=>'Ķ','ķ'=>'ķ','Ĺ'=>'Ĺ','ĺ'=>'ĺ','Ļ'=>'Ļ','ļ'=>'ļ','Ľ'=>'Ľ','ľ'=>'ľ','Ŀ'=>'L·','ŀ'=>'l·','Ń'=>'Ń','ń'=>'ń','Ņ'=>'Ņ','ņ'=>'ņ','Ň'=>'Ň','ň'=>'ň','ʼn'=>'ʼn','Ō'=>'Ō','ō'=>'ō','Ŏ'=>'Ŏ','ŏ'=>'ŏ','Ő'=>'Ő','ő'=>'ő','Ŕ'=>'Ŕ','ŕ'=>'ŕ','Ŗ'=>'Ŗ','ŗ'=>'ŗ','Ř'=>'Ř','ř'=>'ř','Ś'=>'Ś','ś'=>'ś','Ŝ'=>'Ŝ','ŝ'=>'ŝ','Ş'=>'Ş','ş'=>'ş','Š'=>'Š','š'=>'š','Ţ'=>'Ţ','ţ'=>'ţ','Ť'=>'Ť','ť'=>'ť','Ũ'=>'Ũ','ũ'=>'ũ','Ū'=>'Ū','ū'=>'ū','Ŭ'=>'Ŭ','ŭ'=>'ŭ','Ů'=>'Ů','ů'=>'ů','Ű'=>'Ű','ű'=>'ű','Ų'=>'Ų','ų'=>'ų','Ŵ'=>'Ŵ','ŵ'=>'ŵ','Ŷ'=>'Ŷ','ŷ'=>'ŷ','Ÿ'=>'Ÿ','Ź'=>'Ź','ź'=>'ź','Ż'=>'Ż','ż'=>'ż','Ž'=>'Ž','ž'=>'ž','ſ'=>'s','Ơ'=>'Ơ','ơ'=>'ơ','Ư'=>'Ư','ư'=>'ư','DŽ'=>'DŽ','Dž'=>'Dž','dž'=>'dž','LJ'=>'LJ','Lj'=>'Lj','lj'=>'lj','NJ'=>'NJ','Nj'=>'Nj','nj'=>'nj','Ǎ'=>'Ǎ','ǎ'=>'ǎ','Ǐ'=>'Ǐ','ǐ'=>'ǐ','Ǒ'=>'Ǒ','ǒ'=>'ǒ','Ǔ'=>'Ǔ','ǔ'=>'ǔ','Ǖ'=>'Ǖ','ǖ'=>'ǖ','Ǘ'=>'Ǘ','ǘ'=>'ǘ','Ǚ'=>'Ǚ','ǚ'=>'ǚ','Ǜ'=>'Ǜ','ǜ'=>'ǜ','Ǟ'=>'Ǟ','ǟ'=>'ǟ','Ǡ'=>'Ǡ','ǡ'=>'ǡ','Ǣ'=>'Ǣ','ǣ'=>'ǣ','Ǧ'=>'Ǧ','ǧ'=>'ǧ','Ǩ'=>'Ǩ','ǩ'=>'ǩ','Ǫ'=>'Ǫ','ǫ'=>'ǫ','Ǭ'=>'Ǭ','ǭ'=>'ǭ','Ǯ'=>'Ǯ','ǯ'=>'ǯ','ǰ'=>'ǰ','DZ'=>'DZ','Dz'=>'Dz','dz'=>'dz','Ǵ'=>'Ǵ','ǵ'=>'ǵ','Ǹ'=>'Ǹ','ǹ'=>'ǹ','Ǻ'=>'Ǻ','ǻ'=>'ǻ','Ǽ'=>'Ǽ','ǽ'=>'ǽ','Ǿ'=>'Ǿ','ǿ'=>'ǿ','Ȁ'=>'Ȁ','ȁ'=>'ȁ','Ȃ'=>'Ȃ','ȃ'=>'ȃ','Ȅ'=>'Ȅ','ȅ'=>'ȅ','Ȇ'=>'Ȇ','ȇ'=>'ȇ','Ȉ'=>'Ȉ','ȉ'=>'ȉ','Ȋ'=>'Ȋ','ȋ'=>'ȋ','Ȍ'=>'Ȍ','ȍ'=>'ȍ','Ȏ'=>'Ȏ','ȏ'=>'ȏ','Ȑ'=>'Ȑ','ȑ'=>'ȑ','Ȓ'=>'Ȓ','ȓ'=>'ȓ','Ȕ'=>'Ȕ','ȕ'=>'ȕ','Ȗ'=>'Ȗ','ȗ'=>'ȗ','Ș'=>'Ș','ș'=>'ș','Ț'=>'Ț','ț'=>'ț','Ȟ'=>'Ȟ','ȟ'=>'ȟ','Ȧ'=>'Ȧ','ȧ'=>'ȧ','Ȩ'=>'Ȩ','ȩ'=>'ȩ','Ȫ'=>'Ȫ','ȫ'=>'ȫ','Ȭ'=>'Ȭ','ȭ'=>'ȭ','Ȯ'=>'Ȯ','ȯ'=>'ȯ','Ȱ'=>'Ȱ','ȱ'=>'ȱ','Ȳ'=>'Ȳ','ȳ'=>'ȳ','ʰ'=>'h','ʱ'=>'ɦ','ʲ'=>'j','ʳ'=>'r','ʴ'=>'ɹ','ʵ'=>'ɻ','ʶ'=>'ʁ','ʷ'=>'w','ʸ'=>'y','˘'=>' ̆','˙'=>' ̇','˚'=>' ̊','˛'=>' ̨','˜'=>' ̃','˝'=>' ̋','ˠ'=>'ɣ','ˡ'=>'l','ˢ'=>'s','ˣ'=>'x','ˤ'=>'ʕ','̀'=>'̀','́'=>'́','̓'=>'̓','̈́'=>'̈́','ʹ'=>'ʹ','ͺ'=>' ͅ',';'=>';','΄'=>' ́','΅'=>' ̈́','Ά'=>'Ά','·'=>'·','Έ'=>'Έ','Ή'=>'Ή','Ί'=>'Ί','Ό'=>'Ό','Ύ'=>'Ύ','Ώ'=>'Ώ','ΐ'=>'ΐ','Ϊ'=>'Ϊ','Ϋ'=>'Ϋ','ά'=>'ά','έ'=>'έ','ή'=>'ή','ί'=>'ί','ΰ'=>'ΰ','ϊ'=>'ϊ','ϋ'=>'ϋ','ό'=>'ό','ύ'=>'ύ','ώ'=>'ώ','ϐ'=>'β','ϑ'=>'θ','ϒ'=>'Υ','ϓ'=>'Ύ','ϔ'=>'Ϋ','ϕ'=>'φ','ϖ'=>'π','ϰ'=>'κ','ϱ'=>'ρ','ϲ'=>'ς','ϴ'=>'Θ','ϵ'=>'ε','Ϲ'=>'Σ','Ѐ'=>'Ѐ','Ё'=>'Ё','Ѓ'=>'Ѓ','Ї'=>'Ї','Ќ'=>'Ќ','Ѝ'=>'Ѝ','Ў'=>'Ў','Й'=>'Й','й'=>'й','ѐ'=>'ѐ','ё'=>'ё','ѓ'=>'ѓ','ї'=>'ї','ќ'=>'ќ','ѝ'=>'ѝ','ў'=>'ў','Ѷ'=>'Ѷ','ѷ'=>'ѷ','Ӂ'=>'Ӂ','ӂ'=>'ӂ','Ӑ'=>'Ӑ','ӑ'=>'ӑ','Ӓ'=>'Ӓ','ӓ'=>'ӓ','Ӗ'=>'Ӗ','ӗ'=>'ӗ','Ӛ'=>'Ӛ','ӛ'=>'ӛ','Ӝ'=>'Ӝ','ӝ'=>'ӝ','Ӟ'=>'Ӟ','ӟ'=>'ӟ','Ӣ'=>'Ӣ','ӣ'=>'ӣ','Ӥ'=>'Ӥ','ӥ'=>'ӥ','Ӧ'=>'Ӧ','ӧ'=>'ӧ','Ӫ'=>'Ӫ','ӫ'=>'ӫ','Ӭ'=>'Ӭ','ӭ'=>'ӭ','Ӯ'=>'Ӯ','ӯ'=>'ӯ','Ӱ'=>'Ӱ','ӱ'=>'ӱ','Ӳ'=>'Ӳ','ӳ'=>'ӳ','Ӵ'=>'Ӵ','ӵ'=>'ӵ','Ӹ'=>'Ӹ','ӹ'=>'ӹ','և'=>'եւ','آ'=>'آ','أ'=>'أ','ؤ'=>'ؤ','إ'=>'إ','ئ'=>'ئ','ٵ'=>'اٴ','ٶ'=>'وٴ','ٷ'=>'ۇٴ','ٸ'=>'يٴ','ۀ'=>'ۀ','ۂ'=>'ۂ','ۓ'=>'ۓ','ऩ'=>'ऩ','ऱ'=>'ऱ','ऴ'=>'ऴ','क़'=>'क़','ख़'=>'ख़','ग़'=>'ग़','ज़'=>'ज़','ड़'=>'ड़','ढ़'=>'ढ़','फ़'=>'फ़','य़'=>'य़','ো'=>'ো','ৌ'=>'ৌ','ড়'=>'ড়','ঢ়'=>'ঢ়','য়'=>'য়','ਲ਼'=>'ਲ਼','ਸ਼'=>'ਸ਼','ਖ਼'=>'ਖ਼','ਗ਼'=>'ਗ਼','ਜ਼'=>'ਜ਼','ਫ਼'=>'ਫ਼','ୈ'=>'ୈ','ୋ'=>'ୋ','ୌ'=>'ୌ','ଡ଼'=>'ଡ଼','ଢ଼'=>'ଢ଼','ஔ'=>'ஔ','ொ'=>'ொ','ோ'=>'ோ','ௌ'=>'ௌ','ై'=>'ై','ೀ'=>'ೀ','ೇ'=>'ೇ','ೈ'=>'ೈ','ೊ'=>'ೊ','ೋ'=>'ೋ','ൊ'=>'ൊ','ോ'=>'ോ','ൌ'=>'ൌ','ේ'=>'ේ','ො'=>'ො','ෝ'=>'ෝ','ෞ'=>'ෞ','ำ'=>'ํา','ຳ'=>'ໍາ','ໜ'=>'ຫນ','ໝ'=>'ຫມ','༌'=>'་','གྷ'=>'གྷ','ཌྷ'=>'ཌྷ','དྷ'=>'དྷ','བྷ'=>'བྷ','ཛྷ'=>'ཛྷ','ཀྵ'=>'ཀྵ','ཱི'=>'ཱི','ཱུ'=>'ཱུ','ྲྀ'=>'ྲྀ','ཷ'=>'ྲཱྀ','ླྀ'=>'ླྀ','ཹ'=>'ླཱྀ','ཱྀ'=>'ཱྀ','ྒྷ'=>'ྒྷ','ྜྷ'=>'ྜྷ','ྡྷ'=>'ྡྷ','ྦྷ'=>'ྦྷ','ྫྷ'=>'ྫྷ','ྐྵ'=>'ྐྵ','ဦ'=>'ဦ','ჼ'=>'ნ','ᬆ'=>'ᬆ','ᬈ'=>'ᬈ','ᬊ'=>'ᬊ','ᬌ'=>'ᬌ','ᬎ'=>'ᬎ','ᬒ'=>'ᬒ','ᬻ'=>'ᬻ','ᬽ'=>'ᬽ','ᭀ'=>'ᭀ','ᭁ'=>'ᭁ','ᭃ'=>'ᭃ','ᴬ'=>'A','ᴭ'=>'Æ','ᴮ'=>'B','ᴰ'=>'D','ᴱ'=>'E','ᴲ'=>'Ǝ','ᴳ'=>'G','ᴴ'=>'H','ᴵ'=>'I','ᴶ'=>'J','ᴷ'=>'K','ᴸ'=>'L','ᴹ'=>'M','ᴺ'=>'N','ᴼ'=>'O','ᴽ'=>'Ȣ','ᴾ'=>'P','ᴿ'=>'R','ᵀ'=>'T','ᵁ'=>'U','ᵂ'=>'W','ᵃ'=>'a','ᵄ'=>'ɐ','ᵅ'=>'ɑ','ᵆ'=>'ᴂ','ᵇ'=>'b','ᵈ'=>'d','ᵉ'=>'e','ᵊ'=>'ə','ᵋ'=>'ɛ','ᵌ'=>'ɜ','ᵍ'=>'g','ᵏ'=>'k','ᵐ'=>'m','ᵑ'=>'ŋ','ᵒ'=>'o','ᵓ'=>'ɔ','ᵔ'=>'ᴖ','ᵕ'=>'ᴗ','ᵖ'=>'p','ᵗ'=>'t','ᵘ'=>'u','ᵙ'=>'ᴝ','ᵚ'=>'ɯ','ᵛ'=>'v','ᵜ'=>'ᴥ','ᵝ'=>'β','ᵞ'=>'γ','ᵟ'=>'δ','ᵠ'=>'φ','ᵡ'=>'χ','ᵢ'=>'i','ᵣ'=>'r','ᵤ'=>'u','ᵥ'=>'v','ᵦ'=>'β','ᵧ'=>'γ','ᵨ'=>'ρ','ᵩ'=>'φ','ᵪ'=>'χ','ᵸ'=>'н','ᶛ'=>'ɒ','ᶜ'=>'c','ᶝ'=>'ɕ','ᶞ'=>'ð','ᶟ'=>'ɜ','ᶠ'=>'f','ᶡ'=>'ɟ','ᶢ'=>'ɡ','ᶣ'=>'ɥ','ᶤ'=>'ɨ','ᶥ'=>'ɩ','ᶦ'=>'ɪ','ᶧ'=>'ᵻ','ᶨ'=>'ʝ','ᶩ'=>'ɭ','ᶪ'=>'ᶅ','ᶫ'=>'ʟ','ᶬ'=>'ɱ','ᶭ'=>'ɰ','ᶮ'=>'ɲ','ᶯ'=>'ɳ','ᶰ'=>'ɴ','ᶱ'=>'ɵ','ᶲ'=>'ɸ','ᶳ'=>'ʂ','ᶴ'=>'ʃ','ᶵ'=>'ƫ','ᶶ'=>'ʉ','ᶷ'=>'ʊ','ᶸ'=>'ᴜ','ᶹ'=>'ʋ','ᶺ'=>'ʌ','ᶻ'=>'z','ᶼ'=>'ʐ','ᶽ'=>'ʑ','ᶾ'=>'ʒ','ᶿ'=>'θ','Ḁ'=>'Ḁ','ḁ'=>'ḁ','Ḃ'=>'Ḃ','ḃ'=>'ḃ','Ḅ'=>'Ḅ','ḅ'=>'ḅ','Ḇ'=>'Ḇ','ḇ'=>'ḇ','Ḉ'=>'Ḉ','ḉ'=>'ḉ','Ḋ'=>'Ḋ','ḋ'=>'ḋ','Ḍ'=>'Ḍ','ḍ'=>'ḍ','Ḏ'=>'Ḏ','ḏ'=>'ḏ','Ḑ'=>'Ḑ','ḑ'=>'ḑ','Ḓ'=>'Ḓ','ḓ'=>'ḓ','Ḕ'=>'Ḕ','ḕ'=>'ḕ','Ḗ'=>'Ḗ','ḗ'=>'ḗ','Ḙ'=>'Ḙ','ḙ'=>'ḙ','Ḛ'=>'Ḛ','ḛ'=>'ḛ','Ḝ'=>'Ḝ','ḝ'=>'ḝ','Ḟ'=>'Ḟ','ḟ'=>'ḟ','Ḡ'=>'Ḡ','ḡ'=>'ḡ','Ḣ'=>'Ḣ','ḣ'=>'ḣ','Ḥ'=>'Ḥ','ḥ'=>'ḥ','Ḧ'=>'Ḧ','ḧ'=>'ḧ','Ḩ'=>'Ḩ','ḩ'=>'ḩ','Ḫ'=>'Ḫ','ḫ'=>'ḫ','Ḭ'=>'Ḭ','ḭ'=>'ḭ','Ḯ'=>'Ḯ','ḯ'=>'ḯ','Ḱ'=>'Ḱ','ḱ'=>'ḱ','Ḳ'=>'Ḳ','ḳ'=>'ḳ','Ḵ'=>'Ḵ','ḵ'=>'ḵ','Ḷ'=>'Ḷ','ḷ'=>'ḷ','Ḹ'=>'Ḹ','ḹ'=>'ḹ','Ḻ'=>'Ḻ','ḻ'=>'ḻ','Ḽ'=>'Ḽ','ḽ'=>'ḽ','Ḿ'=>'Ḿ','ḿ'=>'ḿ','Ṁ'=>'Ṁ','ṁ'=>'ṁ','Ṃ'=>'Ṃ','ṃ'=>'ṃ','Ṅ'=>'Ṅ','ṅ'=>'ṅ','Ṇ'=>'Ṇ','ṇ'=>'ṇ','Ṉ'=>'Ṉ','ṉ'=>'ṉ','Ṋ'=>'Ṋ','ṋ'=>'ṋ','Ṍ'=>'Ṍ','ṍ'=>'ṍ','Ṏ'=>'Ṏ','ṏ'=>'ṏ','Ṑ'=>'Ṑ','ṑ'=>'ṑ','Ṓ'=>'Ṓ','ṓ'=>'ṓ','Ṕ'=>'Ṕ','ṕ'=>'ṕ','Ṗ'=>'Ṗ','ṗ'=>'ṗ','Ṙ'=>'Ṙ','ṙ'=>'ṙ','Ṛ'=>'Ṛ','ṛ'=>'ṛ','Ṝ'=>'Ṝ','ṝ'=>'ṝ','Ṟ'=>'Ṟ','ṟ'=>'ṟ','Ṡ'=>'Ṡ','ṡ'=>'ṡ','Ṣ'=>'Ṣ','ṣ'=>'ṣ','Ṥ'=>'Ṥ','ṥ'=>'ṥ','Ṧ'=>'Ṧ','ṧ'=>'ṧ','Ṩ'=>'Ṩ','ṩ'=>'ṩ','Ṫ'=>'Ṫ','ṫ'=>'ṫ','Ṭ'=>'Ṭ','ṭ'=>'ṭ','Ṯ'=>'Ṯ','ṯ'=>'ṯ','Ṱ'=>'Ṱ','ṱ'=>'ṱ','Ṳ'=>'Ṳ','ṳ'=>'ṳ','Ṵ'=>'Ṵ','ṵ'=>'ṵ','Ṷ'=>'Ṷ','ṷ'=>'ṷ','Ṹ'=>'Ṹ','ṹ'=>'ṹ','Ṻ'=>'Ṻ','ṻ'=>'ṻ','Ṽ'=>'Ṽ','ṽ'=>'ṽ','Ṿ'=>'Ṿ','ṿ'=>'ṿ','Ẁ'=>'Ẁ','ẁ'=>'ẁ','Ẃ'=>'Ẃ','ẃ'=>'ẃ','Ẅ'=>'Ẅ','ẅ'=>'ẅ','Ẇ'=>'Ẇ','ẇ'=>'ẇ','Ẉ'=>'Ẉ','ẉ'=>'ẉ','Ẋ'=>'Ẋ','ẋ'=>'ẋ','Ẍ'=>'Ẍ','ẍ'=>'ẍ','Ẏ'=>'Ẏ','ẏ'=>'ẏ','Ẑ'=>'Ẑ','ẑ'=>'ẑ','Ẓ'=>'Ẓ','ẓ'=>'ẓ','Ẕ'=>'Ẕ','ẕ'=>'ẕ','ẖ'=>'ẖ','ẗ'=>'ẗ','ẘ'=>'ẘ','ẙ'=>'ẙ','ẚ'=>'aʾ','ẛ'=>'ṡ','Ạ'=>'Ạ','ạ'=>'ạ','Ả'=>'Ả','ả'=>'ả','Ấ'=>'Ấ','ấ'=>'ấ','Ầ'=>'Ầ','ầ'=>'ầ','Ẩ'=>'Ẩ','ẩ'=>'ẩ','Ẫ'=>'Ẫ','ẫ'=>'ẫ','Ậ'=>'Ậ','ậ'=>'ậ','Ắ'=>'Ắ','ắ'=>'ắ','Ằ'=>'Ằ','ằ'=>'ằ','Ẳ'=>'Ẳ','ẳ'=>'ẳ','Ẵ'=>'Ẵ','ẵ'=>'ẵ','Ặ'=>'Ặ','ặ'=>'ặ','Ẹ'=>'Ẹ','ẹ'=>'ẹ','Ẻ'=>'Ẻ','ẻ'=>'ẻ','Ẽ'=>'Ẽ','ẽ'=>'ẽ','Ế'=>'Ế','ế'=>'ế','Ề'=>'Ề','ề'=>'ề','Ể'=>'Ể','ể'=>'ể','Ễ'=>'Ễ','ễ'=>'ễ','Ệ'=>'Ệ','ệ'=>'ệ','Ỉ'=>'Ỉ','ỉ'=>'ỉ','Ị'=>'Ị','ị'=>'ị','Ọ'=>'Ọ','ọ'=>'ọ','Ỏ'=>'Ỏ','ỏ'=>'ỏ','Ố'=>'Ố','ố'=>'ố','Ồ'=>'Ồ','ồ'=>'ồ','Ổ'=>'Ổ','ổ'=>'ổ','Ỗ'=>'Ỗ','ỗ'=>'ỗ','Ộ'=>'Ộ','ộ'=>'ộ','Ớ'=>'Ớ','ớ'=>'ớ','Ờ'=>'Ờ','ờ'=>'ờ','Ở'=>'Ở','ở'=>'ở','Ỡ'=>'Ỡ','ỡ'=>'ỡ','Ợ'=>'Ợ','ợ'=>'ợ','Ụ'=>'Ụ','ụ'=>'ụ','Ủ'=>'Ủ','ủ'=>'ủ','Ứ'=>'Ứ','ứ'=>'ứ','Ừ'=>'Ừ','ừ'=>'ừ','Ử'=>'Ử','ử'=>'ử','Ữ'=>'Ữ','ữ'=>'ữ','Ự'=>'Ự','ự'=>'ự','Ỳ'=>'Ỳ','ỳ'=>'ỳ','Ỵ'=>'Ỵ','ỵ'=>'ỵ','Ỷ'=>'Ỷ','ỷ'=>'ỷ','Ỹ'=>'Ỹ','ỹ'=>'ỹ','ἀ'=>'ἀ','ἁ'=>'ἁ','ἂ'=>'ἂ','ἃ'=>'ἃ','ἄ'=>'ἄ','ἅ'=>'ἅ','ἆ'=>'ἆ','ἇ'=>'ἇ','Ἀ'=>'Ἀ','Ἁ'=>'Ἁ','Ἂ'=>'Ἂ','Ἃ'=>'Ἃ','Ἄ'=>'Ἄ','Ἅ'=>'Ἅ','Ἆ'=>'Ἆ','Ἇ'=>'Ἇ','ἐ'=>'ἐ','ἑ'=>'ἑ','ἒ'=>'ἒ','ἓ'=>'ἓ','ἔ'=>'ἔ','ἕ'=>'ἕ','Ἐ'=>'Ἐ','Ἑ'=>'Ἑ','Ἒ'=>'Ἒ','Ἓ'=>'Ἓ','Ἔ'=>'Ἔ','Ἕ'=>'Ἕ','ἠ'=>'ἠ','ἡ'=>'ἡ','ἢ'=>'ἢ','ἣ'=>'ἣ','ἤ'=>'ἤ','ἥ'=>'ἥ','ἦ'=>'ἦ','ἧ'=>'ἧ','Ἠ'=>'Ἠ','Ἡ'=>'Ἡ','Ἢ'=>'Ἢ','Ἣ'=>'Ἣ','Ἤ'=>'Ἤ','Ἥ'=>'Ἥ','Ἦ'=>'Ἦ','Ἧ'=>'Ἧ','ἰ'=>'ἰ','ἱ'=>'ἱ','ἲ'=>'ἲ','ἳ'=>'ἳ','ἴ'=>'ἴ','ἵ'=>'ἵ','ἶ'=>'ἶ','ἷ'=>'ἷ','Ἰ'=>'Ἰ','Ἱ'=>'Ἱ','Ἲ'=>'Ἲ','Ἳ'=>'Ἳ','Ἴ'=>'Ἴ','Ἵ'=>'Ἵ','Ἶ'=>'Ἶ','Ἷ'=>'Ἷ','ὀ'=>'ὀ','ὁ'=>'ὁ','ὂ'=>'ὂ','ὃ'=>'ὃ','ὄ'=>'ὄ','ὅ'=>'ὅ','Ὀ'=>'Ὀ','Ὁ'=>'Ὁ','Ὂ'=>'Ὂ','Ὃ'=>'Ὃ','Ὄ'=>'Ὄ','Ὅ'=>'Ὅ','ὐ'=>'ὐ','ὑ'=>'ὑ','ὒ'=>'ὒ','ὓ'=>'ὓ','ὔ'=>'ὔ','ὕ'=>'ὕ','ὖ'=>'ὖ','ὗ'=>'ὗ','Ὑ'=>'Ὑ','Ὓ'=>'Ὓ','Ὕ'=>'Ὕ','Ὗ'=>'Ὗ','ὠ'=>'ὠ','ὡ'=>'ὡ','ὢ'=>'ὢ','ὣ'=>'ὣ','ὤ'=>'ὤ','ὥ'=>'ὥ','ὦ'=>'ὦ','ὧ'=>'ὧ','Ὠ'=>'Ὠ','Ὡ'=>'Ὡ','Ὢ'=>'Ὢ','Ὣ'=>'Ὣ','Ὤ'=>'Ὤ','Ὥ'=>'Ὥ','Ὦ'=>'Ὦ','Ὧ'=>'Ὧ','ὰ'=>'ὰ','ά'=>'ά','ὲ'=>'ὲ','έ'=>'έ','ὴ'=>'ὴ','ή'=>'ή','ὶ'=>'ὶ','ί'=>'ί','ὸ'=>'ὸ','ό'=>'ό','ὺ'=>'ὺ','ύ'=>'ύ','ὼ'=>'ὼ','ώ'=>'ώ','ᾀ'=>'ᾀ','ᾁ'=>'ᾁ','ᾂ'=>'ᾂ','ᾃ'=>'ᾃ','ᾄ'=>'ᾄ','ᾅ'=>'ᾅ','ᾆ'=>'ᾆ','ᾇ'=>'ᾇ','ᾈ'=>'ᾈ','ᾉ'=>'ᾉ','ᾊ'=>'ᾊ','ᾋ'=>'ᾋ','ᾌ'=>'ᾌ','ᾍ'=>'ᾍ','ᾎ'=>'ᾎ','ᾏ'=>'ᾏ','ᾐ'=>'ᾐ','ᾑ'=>'ᾑ','ᾒ'=>'ᾒ','ᾓ'=>'ᾓ','ᾔ'=>'ᾔ','ᾕ'=>'ᾕ','ᾖ'=>'ᾖ','ᾗ'=>'ᾗ','ᾘ'=>'ᾘ','ᾙ'=>'ᾙ','ᾚ'=>'ᾚ','ᾛ'=>'ᾛ','ᾜ'=>'ᾜ','ᾝ'=>'ᾝ','ᾞ'=>'ᾞ','ᾟ'=>'ᾟ','ᾠ'=>'ᾠ','ᾡ'=>'ᾡ','ᾢ'=>'ᾢ','ᾣ'=>'ᾣ','ᾤ'=>'ᾤ','ᾥ'=>'ᾥ','ᾦ'=>'ᾦ','ᾧ'=>'ᾧ','ᾨ'=>'ᾨ','ᾩ'=>'ᾩ','ᾪ'=>'ᾪ','ᾫ'=>'ᾫ','ᾬ'=>'ᾬ','ᾭ'=>'ᾭ','ᾮ'=>'ᾮ','ᾯ'=>'ᾯ','ᾰ'=>'ᾰ','ᾱ'=>'ᾱ','ᾲ'=>'ᾲ','ᾳ'=>'ᾳ','ᾴ'=>'ᾴ','ᾶ'=>'ᾶ','ᾷ'=>'ᾷ','Ᾰ'=>'Ᾰ','Ᾱ'=>'Ᾱ','Ὰ'=>'Ὰ','Ά'=>'Ά','ᾼ'=>'ᾼ','᾽'=>' ̓','ι'=>'ι','᾿'=>' ̓','῀'=>' ͂','῁'=>' ̈͂','ῂ'=>'ῂ','ῃ'=>'ῃ','ῄ'=>'ῄ','ῆ'=>'ῆ','ῇ'=>'ῇ','Ὲ'=>'Ὲ','Έ'=>'Έ','Ὴ'=>'Ὴ','Ή'=>'Ή','ῌ'=>'ῌ','῍'=>' ̓̀','῎'=>' ̓́','῏'=>' ̓͂','ῐ'=>'ῐ','ῑ'=>'ῑ','ῒ'=>'ῒ','ΐ'=>'ΐ','ῖ'=>'ῖ','ῗ'=>'ῗ','Ῐ'=>'Ῐ','Ῑ'=>'Ῑ','Ὶ'=>'Ὶ','Ί'=>'Ί','῝'=>' ̔̀','῞'=>' ̔́','῟'=>' ̔͂','ῠ'=>'ῠ','ῡ'=>'ῡ','ῢ'=>'ῢ','ΰ'=>'ΰ','ῤ'=>'ῤ','ῥ'=>'ῥ','ῦ'=>'ῦ','ῧ'=>'ῧ','Ῠ'=>'Ῠ','Ῡ'=>'Ῡ','Ὺ'=>'Ὺ','Ύ'=>'Ύ','Ῥ'=>'Ῥ','῭'=>' ̈̀','΅'=>' ̈́','`'=>'`','ῲ'=>'ῲ','ῳ'=>'ῳ','ῴ'=>'ῴ','ῶ'=>'ῶ','ῷ'=>'ῷ','Ὸ'=>'Ὸ','Ό'=>'Ό','Ὼ'=>'Ὼ','Ώ'=>'Ώ','ῼ'=>'ῼ','´'=>' ́','῾'=>' ̔',' '=>' ',' '=>' ',' '=>' ',' '=>' ',' '=>' ',' '=>' ',' '=>' ',' '=>' ',' '=>' ',' '=>' ',' '=>' ','‑'=>'‐','‗'=>' ̳','․'=>'.','‥'=>'..','…'=>'...',' '=>' ','″'=>'′′','‴'=>'′′′','‶'=>'‵‵','‷'=>'‵‵‵','‼'=>'!!','‾'=>' ̅','⁇'=>'??','⁈'=>'?!','⁉'=>'!?','⁗'=>'′′′′',' '=>' ','⁰'=>'0','ⁱ'=>'i','⁴'=>'4','⁵'=>'5','⁶'=>'6','⁷'=>'7','⁸'=>'8','⁹'=>'9','⁺'=>'+','⁻'=>'−','⁼'=>'=','⁽'=>'(','⁾'=>')','ⁿ'=>'n','₀'=>'0','₁'=>'1','₂'=>'2','₃'=>'3','₄'=>'4','₅'=>'5','₆'=>'6','₇'=>'7','₈'=>'8','₉'=>'9','₊'=>'+','₋'=>'−','₌'=>'=','₍'=>'(','₎'=>')','ₐ'=>'a','ₑ'=>'e','ₒ'=>'o','ₓ'=>'x','ₔ'=>'ə','₨'=>'Rs','℀'=>'a/c','℁'=>'a/s','ℂ'=>'C','℃'=>'°C','℅'=>'c/o','℆'=>'c/u','ℇ'=>'Ɛ','℉'=>'°F','ℊ'=>'g','ℋ'=>'H','ℌ'=>'H','ℍ'=>'H','ℎ'=>'h','ℏ'=>'ħ','ℐ'=>'I','ℑ'=>'I','ℒ'=>'L','ℓ'=>'l','ℕ'=>'N','№'=>'No','ℙ'=>'P','ℚ'=>'Q','ℛ'=>'R','ℜ'=>'R','ℝ'=>'R','℠'=>'SM','℡'=>'TEL','™'=>'TM','ℤ'=>'Z','Ω'=>'Ω','ℨ'=>'Z','K'=>'K','Å'=>'Å','ℬ'=>'B','ℭ'=>'C','ℯ'=>'e','ℰ'=>'E','ℱ'=>'F','ℳ'=>'M','ℴ'=>'o','ℵ'=>'א','ℶ'=>'ב','ℷ'=>'ג','ℸ'=>'ד','ℹ'=>'i','℻'=>'FAX','ℼ'=>'π','ℽ'=>'γ','ℾ'=>'Γ','ℿ'=>'Π','⅀'=>'∑','ⅅ'=>'D','ⅆ'=>'d','ⅇ'=>'e','ⅈ'=>'i','ⅉ'=>'j','⅓'=>'1⁄3','⅔'=>'2⁄3','⅕'=>'1⁄5','⅖'=>'2⁄5','⅗'=>'3⁄5','⅘'=>'4⁄5','⅙'=>'1⁄6','⅚'=>'5⁄6','⅛'=>'1⁄8','⅜'=>'3⁄8','⅝'=>'5⁄8','⅞'=>'7⁄8','⅟'=>'1⁄','Ⅰ'=>'I','Ⅱ'=>'II','Ⅲ'=>'III','Ⅳ'=>'IV','Ⅴ'=>'V','Ⅵ'=>'VI','Ⅶ'=>'VII','Ⅷ'=>'VIII','Ⅸ'=>'IX','Ⅹ'=>'X','Ⅺ'=>'XI','Ⅻ'=>'XII','Ⅼ'=>'L','Ⅽ'=>'C','Ⅾ'=>'D','Ⅿ'=>'M','ⅰ'=>'i','ⅱ'=>'ii','ⅲ'=>'iii','ⅳ'=>'iv','ⅴ'=>'v','ⅵ'=>'vi','ⅶ'=>'vii','ⅷ'=>'viii','ⅸ'=>'ix','ⅹ'=>'x','ⅺ'=>'xi','ⅻ'=>'xii','ⅼ'=>'l','ⅽ'=>'c','ⅾ'=>'d','ⅿ'=>'m','↚'=>'↚','↛'=>'↛','↮'=>'↮','⇍'=>'⇍','⇎'=>'⇎','⇏'=>'⇏','∄'=>'∄','∉'=>'∉','∌'=>'∌','∤'=>'∤','∦'=>'∦','∬'=>'∫∫','∭'=>'∫∫∫','∯'=>'∮∮','∰'=>'∮∮∮','≁'=>'≁','≄'=>'≄','≇'=>'≇','≉'=>'≉','≠'=>'≠','≢'=>'≢','≭'=>'≭','≮'=>'≮','≯'=>'≯','≰'=>'≰','≱'=>'≱','≴'=>'≴','≵'=>'≵','≸'=>'≸','≹'=>'≹','⊀'=>'⊀','⊁'=>'⊁','⊄'=>'⊄','⊅'=>'⊅','⊈'=>'⊈','⊉'=>'⊉','⊬'=>'⊬','⊭'=>'⊭','⊮'=>'⊮','⊯'=>'⊯','⋠'=>'⋠','⋡'=>'⋡','⋢'=>'⋢','⋣'=>'⋣','⋪'=>'⋪','⋫'=>'⋫','⋬'=>'⋬','⋭'=>'⋭','〈'=>'〈','〉'=>'〉','①'=>'1','②'=>'2','③'=>'3','④'=>'4','⑤'=>'5','⑥'=>'6','⑦'=>'7','⑧'=>'8','⑨'=>'9','⑩'=>'10','⑪'=>'11','⑫'=>'12','⑬'=>'13','⑭'=>'14','⑮'=>'15','⑯'=>'16','⑰'=>'17','⑱'=>'18','⑲'=>'19','⑳'=>'20','⑴'=>'(1)','⑵'=>'(2)','⑶'=>'(3)','⑷'=>'(4)','⑸'=>'(5)','⑹'=>'(6)','⑺'=>'(7)','⑻'=>'(8)','⑼'=>'(9)','⑽'=>'(10)','⑾'=>'(11)','⑿'=>'(12)','⒀'=>'(13)','⒁'=>'(14)','⒂'=>'(15)','⒃'=>'(16)','⒄'=>'(17)','⒅'=>'(18)','⒆'=>'(19)','⒇'=>'(20)','⒈'=>'1.','⒉'=>'2.','⒊'=>'3.','⒋'=>'4.','⒌'=>'5.','⒍'=>'6.','⒎'=>'7.','⒏'=>'8.','⒐'=>'9.','⒑'=>'10.','⒒'=>'11.','⒓'=>'12.','⒔'=>'13.','⒕'=>'14.','⒖'=>'15.','⒗'=>'16.','⒘'=>'17.','⒙'=>'18.','⒚'=>'19.','⒛'=>'20.','⒜'=>'(a)','⒝'=>'(b)','⒞'=>'(c)','⒟'=>'(d)','⒠'=>'(e)','⒡'=>'(f)','⒢'=>'(g)','⒣'=>'(h)','⒤'=>'(i)','⒥'=>'(j)','⒦'=>'(k)','⒧'=>'(l)','⒨'=>'(m)','⒩'=>'(n)','⒪'=>'(o)','⒫'=>'(p)','⒬'=>'(q)','⒭'=>'(r)','⒮'=>'(s)','⒯'=>'(t)','⒰'=>'(u)','⒱'=>'(v)','⒲'=>'(w)','⒳'=>'(x)','⒴'=>'(y)','⒵'=>'(z)','Ⓐ'=>'A','Ⓑ'=>'B','Ⓒ'=>'C','Ⓓ'=>'D','Ⓔ'=>'E','Ⓕ'=>'F','Ⓖ'=>'G','Ⓗ'=>'H','Ⓘ'=>'I','Ⓙ'=>'J','Ⓚ'=>'K','Ⓛ'=>'L','Ⓜ'=>'M','Ⓝ'=>'N','Ⓞ'=>'O','Ⓟ'=>'P','Ⓠ'=>'Q','Ⓡ'=>'R','Ⓢ'=>'S','Ⓣ'=>'T','Ⓤ'=>'U','Ⓥ'=>'V','Ⓦ'=>'W','Ⓧ'=>'X','Ⓨ'=>'Y','Ⓩ'=>'Z','ⓐ'=>'a','ⓑ'=>'b','ⓒ'=>'c','ⓓ'=>'d','ⓔ'=>'e','ⓕ'=>'f','ⓖ'=>'g','ⓗ'=>'h','ⓘ'=>'i','ⓙ'=>'j','ⓚ'=>'k','ⓛ'=>'l','ⓜ'=>'m','ⓝ'=>'n','ⓞ'=>'o','ⓟ'=>'p','ⓠ'=>'q','ⓡ'=>'r','ⓢ'=>'s','ⓣ'=>'t','ⓤ'=>'u','ⓥ'=>'v','ⓦ'=>'w','ⓧ'=>'x','ⓨ'=>'y','ⓩ'=>'z','⓪'=>'0','⨌'=>'∫∫∫∫','⩴'=>'::=','⩵'=>'==','⩶'=>'===','⫝̸'=>'⫝̸','ⵯ'=>'ⵡ','⺟'=>'母','⻳'=>'龟','⼀'=>'一','⼁'=>'丨','⼂'=>'丶','⼃'=>'丿','⼄'=>'乙','⼅'=>'亅','⼆'=>'二','⼇'=>'亠','⼈'=>'人','⼉'=>'儿','⼊'=>'入','⼋'=>'八','⼌'=>'冂','⼍'=>'冖','⼎'=>'冫','⼏'=>'几','⼐'=>'凵','⼑'=>'刀','⼒'=>'力','⼓'=>'勹','⼔'=>'匕','⼕'=>'匚','⼖'=>'匸','⼗'=>'十','⼘'=>'卜','⼙'=>'卩','⼚'=>'厂','⼛'=>'厶','⼜'=>'又','⼝'=>'口','⼞'=>'囗','⼟'=>'土','⼠'=>'士','⼡'=>'夂','⼢'=>'夊','⼣'=>'夕','⼤'=>'大','⼥'=>'女','⼦'=>'子','⼧'=>'宀','⼨'=>'寸','⼩'=>'小','⼪'=>'尢','⼫'=>'尸','⼬'=>'屮','⼭'=>'山','⼮'=>'巛','⼯'=>'工','⼰'=>'己','⼱'=>'巾','⼲'=>'干','⼳'=>'幺','⼴'=>'广','⼵'=>'廴','⼶'=>'廾','⼷'=>'弋','⼸'=>'弓','⼹'=>'彐','⼺'=>'彡','⼻'=>'彳','⼼'=>'心','⼽'=>'戈','⼾'=>'戶','⼿'=>'手','⽀'=>'支','⽁'=>'攴','⽂'=>'文','⽃'=>'斗','⽄'=>'斤','⽅'=>'方','⽆'=>'无','⽇'=>'日','⽈'=>'曰','⽉'=>'月','⽊'=>'木','⽋'=>'欠','⽌'=>'止','⽍'=>'歹','⽎'=>'殳','⽏'=>'毋','⽐'=>'比','⽑'=>'毛','⽒'=>'氏','⽓'=>'气','⽔'=>'水','⽕'=>'火','⽖'=>'爪','⽗'=>'父','⽘'=>'爻','⽙'=>'爿','⽚'=>'片','⽛'=>'牙','⽜'=>'牛','⽝'=>'犬','⽞'=>'玄','⽟'=>'玉','⽠'=>'瓜','⽡'=>'瓦','⽢'=>'甘','⽣'=>'生','⽤'=>'用','⽥'=>'田','⽦'=>'疋','⽧'=>'疒','⽨'=>'癶','⽩'=>'白','⽪'=>'皮','⽫'=>'皿','⽬'=>'目','⽭'=>'矛','⽮'=>'矢','⽯'=>'石','⽰'=>'示','⽱'=>'禸','⽲'=>'禾','⽳'=>'穴','⽴'=>'立','⽵'=>'竹','⽶'=>'米','⽷'=>'糸','⽸'=>'缶','⽹'=>'网','⽺'=>'羊','⽻'=>'羽','⽼'=>'老','⽽'=>'而','⽾'=>'耒','⽿'=>'耳','⾀'=>'聿','⾁'=>'肉','⾂'=>'臣','⾃'=>'自','⾄'=>'至','⾅'=>'臼','⾆'=>'舌','⾇'=>'舛','⾈'=>'舟','⾉'=>'艮','⾊'=>'色','⾋'=>'艸','⾌'=>'虍','⾍'=>'虫','⾎'=>'血','⾏'=>'行','⾐'=>'衣','⾑'=>'襾','⾒'=>'見','⾓'=>'角','⾔'=>'言','⾕'=>'谷','⾖'=>'豆','⾗'=>'豕','⾘'=>'豸','⾙'=>'貝','⾚'=>'赤','⾛'=>'走','⾜'=>'足','⾝'=>'身','⾞'=>'車','⾟'=>'辛','⾠'=>'辰','⾡'=>'辵','⾢'=>'邑','⾣'=>'酉','⾤'=>'釆','⾥'=>'里','⾦'=>'金','⾧'=>'長','⾨'=>'門','⾩'=>'阜','⾪'=>'隶','⾫'=>'隹','⾬'=>'雨','⾭'=>'靑','⾮'=>'非','⾯'=>'面','⾰'=>'革','⾱'=>'韋','⾲'=>'韭','⾳'=>'音','⾴'=>'頁','⾵'=>'風','⾶'=>'飛','⾷'=>'食','⾸'=>'首','⾹'=>'香','⾺'=>'馬','⾻'=>'骨','⾼'=>'高','⾽'=>'髟','⾾'=>'鬥','⾿'=>'鬯','⿀'=>'鬲','⿁'=>'鬼','⿂'=>'魚','⿃'=>'鳥','⿄'=>'鹵','⿅'=>'鹿','⿆'=>'麥','⿇'=>'麻','⿈'=>'黃','⿉'=>'黍','⿊'=>'黑','⿋'=>'黹','⿌'=>'黽','⿍'=>'鼎','⿎'=>'鼓','⿏'=>'鼠','⿐'=>'鼻','⿑'=>'齊','⿒'=>'齒','⿓'=>'龍','⿔'=>'龜','⿕'=>'龠',' '=>' ','〶'=>'〒','〸'=>'十','〹'=>'卄','〺'=>'卅','が'=>'が','ぎ'=>'ぎ','ぐ'=>'ぐ','げ'=>'げ','ご'=>'ご','ざ'=>'ざ','じ'=>'じ','ず'=>'ず','ぜ'=>'ぜ','ぞ'=>'ぞ','だ'=>'だ','ぢ'=>'ぢ','づ'=>'づ','で'=>'で','ど'=>'ど','ば'=>'ば','ぱ'=>'ぱ','び'=>'び','ぴ'=>'ぴ','ぶ'=>'ぶ','ぷ'=>'ぷ','べ'=>'べ','ぺ'=>'ぺ','ぼ'=>'ぼ','ぽ'=>'ぽ','ゔ'=>'ゔ','゛'=>' ゙','゜'=>' ゚','ゞ'=>'ゞ','ゟ'=>'より','ガ'=>'ガ','ギ'=>'ギ','グ'=>'グ','ゲ'=>'ゲ','ゴ'=>'ゴ','ザ'=>'ザ','ジ'=>'ジ','ズ'=>'ズ','ゼ'=>'ゼ','ゾ'=>'ゾ','ダ'=>'ダ','ヂ'=>'ヂ','ヅ'=>'ヅ','デ'=>'デ','ド'=>'ド','バ'=>'バ','パ'=>'パ','ビ'=>'ビ','ピ'=>'ピ','ブ'=>'ブ','プ'=>'プ','ベ'=>'ベ','ペ'=>'ペ','ボ'=>'ボ','ポ'=>'ポ','ヴ'=>'ヴ','ヷ'=>'ヷ','ヸ'=>'ヸ','ヹ'=>'ヹ','ヺ'=>'ヺ','ヾ'=>'ヾ','ヿ'=>'コト','ㄱ'=>'ᄀ','ㄲ'=>'ᄁ','ㄳ'=>'ᆪ','ㄴ'=>'ᄂ','ㄵ'=>'ᆬ','ㄶ'=>'ᆭ','ㄷ'=>'ᄃ','ㄸ'=>'ᄄ','ㄹ'=>'ᄅ','ㄺ'=>'ᆰ','ㄻ'=>'ᆱ','ㄼ'=>'ᆲ','ㄽ'=>'ᆳ','ㄾ'=>'ᆴ','ㄿ'=>'ᆵ','ㅀ'=>'ᄚ','ㅁ'=>'ᄆ','ㅂ'=>'ᄇ','ㅃ'=>'ᄈ','ㅄ'=>'ᄡ','ㅅ'=>'ᄉ','ㅆ'=>'ᄊ','ㅇ'=>'ᄋ','ㅈ'=>'ᄌ','ㅉ'=>'ᄍ','ㅊ'=>'ᄎ','ㅋ'=>'ᄏ','ㅌ'=>'ᄐ','ㅍ'=>'ᄑ','ㅎ'=>'ᄒ','ㅏ'=>'ᅡ','ㅐ'=>'ᅢ','ㅑ'=>'ᅣ','ㅒ'=>'ᅤ','ㅓ'=>'ᅥ','ㅔ'=>'ᅦ','ㅕ'=>'ᅧ','ㅖ'=>'ᅨ','ㅗ'=>'ᅩ','ㅘ'=>'ᅪ','ㅙ'=>'ᅫ','ㅚ'=>'ᅬ','ㅛ'=>'ᅭ','ㅜ'=>'ᅮ','ㅝ'=>'ᅯ','ㅞ'=>'ᅰ','ㅟ'=>'ᅱ','ㅠ'=>'ᅲ','ㅡ'=>'ᅳ','ㅢ'=>'ᅴ','ㅣ'=>'ᅵ','ㅤ'=>'ᅠ','ㅥ'=>'ᄔ','ㅦ'=>'ᄕ','ㅧ'=>'ᇇ','ㅨ'=>'ᇈ','ㅩ'=>'ᇌ','ㅪ'=>'ᇎ','ㅫ'=>'ᇓ','ㅬ'=>'ᇗ','ㅭ'=>'ᇙ','ㅮ'=>'ᄜ','ㅯ'=>'ᇝ','ㅰ'=>'ᇟ','ㅱ'=>'ᄝ','ㅲ'=>'ᄞ','ㅳ'=>'ᄠ','ㅴ'=>'ᄢ','ㅵ'=>'ᄣ','ㅶ'=>'ᄧ','ㅷ'=>'ᄩ','ㅸ'=>'ᄫ','ㅹ'=>'ᄬ','ㅺ'=>'ᄭ','ㅻ'=>'ᄮ','ㅼ'=>'ᄯ','ㅽ'=>'ᄲ','ㅾ'=>'ᄶ','ㅿ'=>'ᅀ','ㆀ'=>'ᅇ','ㆁ'=>'ᅌ','ㆂ'=>'ᇱ','ㆃ'=>'ᇲ','ㆄ'=>'ᅗ','ㆅ'=>'ᅘ','ㆆ'=>'ᅙ','ㆇ'=>'ᆄ','ㆈ'=>'ᆅ','ㆉ'=>'ᆈ','ㆊ'=>'ᆑ','ㆋ'=>'ᆒ','ㆌ'=>'ᆔ','ㆍ'=>'ᆞ','ㆎ'=>'ᆡ','㆒'=>'一','㆓'=>'二','㆔'=>'三','㆕'=>'四','㆖'=>'上','㆗'=>'中','㆘'=>'下','㆙'=>'甲','㆚'=>'乙','㆛'=>'丙','㆜'=>'丁','㆝'=>'天','㆞'=>'地','㆟'=>'人','㈀'=>'(ᄀ)','㈁'=>'(ᄂ)','㈂'=>'(ᄃ)','㈃'=>'(ᄅ)','㈄'=>'(ᄆ)','㈅'=>'(ᄇ)','㈆'=>'(ᄉ)','㈇'=>'(ᄋ)','㈈'=>'(ᄌ)','㈉'=>'(ᄎ)','㈊'=>'(ᄏ)','㈋'=>'(ᄐ)','㈌'=>'(ᄑ)','㈍'=>'(ᄒ)','㈎'=>'(가)','㈏'=>'(나)','㈐'=>'(다)','㈑'=>'(라)','㈒'=>'(마)','㈓'=>'(바)','㈔'=>'(사)','㈕'=>'(아)','㈖'=>'(자)','㈗'=>'(차)','㈘'=>'(카)','㈙'=>'(타)','㈚'=>'(파)','㈛'=>'(하)','㈜'=>'(주)','㈝'=>'(오전)','㈞'=>'(오후)','㈠'=>'(一)','㈡'=>'(二)','㈢'=>'(三)','㈣'=>'(四)','㈤'=>'(五)','㈥'=>'(六)','㈦'=>'(七)','㈧'=>'(八)','㈨'=>'(九)','㈩'=>'(十)','㈪'=>'(月)','㈫'=>'(火)','㈬'=>'(水)','㈭'=>'(木)','㈮'=>'(金)','㈯'=>'(土)','㈰'=>'(日)','㈱'=>'(株)','㈲'=>'(有)','㈳'=>'(社)','㈴'=>'(名)','㈵'=>'(特)','㈶'=>'(財)','㈷'=>'(祝)','㈸'=>'(労)','㈹'=>'(代)','㈺'=>'(呼)','㈻'=>'(学)','㈼'=>'(監)','㈽'=>'(企)','㈾'=>'(資)','㈿'=>'(協)','㉀'=>'(祭)','㉁'=>'(休)','㉂'=>'(自)','㉃'=>'(至)','㉐'=>'PTE','㉑'=>'21','㉒'=>'22','㉓'=>'23','㉔'=>'24','㉕'=>'25','㉖'=>'26','㉗'=>'27','㉘'=>'28','㉙'=>'29','㉚'=>'30','㉛'=>'31','㉜'=>'32','㉝'=>'33','㉞'=>'34','㉟'=>'35','㉠'=>'ᄀ','㉡'=>'ᄂ','㉢'=>'ᄃ','㉣'=>'ᄅ','㉤'=>'ᄆ','㉥'=>'ᄇ','㉦'=>'ᄉ','㉧'=>'ᄋ','㉨'=>'ᄌ','㉩'=>'ᄎ','㉪'=>'ᄏ','㉫'=>'ᄐ','㉬'=>'ᄑ','㉭'=>'ᄒ','㉮'=>'가','㉯'=>'나','㉰'=>'다','㉱'=>'라','㉲'=>'마','㉳'=>'바','㉴'=>'사','㉵'=>'아','㉶'=>'자','㉷'=>'차','㉸'=>'카','㉹'=>'타','㉺'=>'파','㉻'=>'하','㉼'=>'참고','㉽'=>'주의','㉾'=>'우','㊀'=>'一','㊁'=>'二','㊂'=>'三','㊃'=>'四','㊄'=>'五','㊅'=>'六','㊆'=>'七','㊇'=>'八','㊈'=>'九','㊉'=>'十','㊊'=>'月','㊋'=>'火','㊌'=>'水','㊍'=>'木','㊎'=>'金','㊏'=>'土','㊐'=>'日','㊑'=>'株','㊒'=>'有','㊓'=>'社','㊔'=>'名','㊕'=>'特','㊖'=>'財','㊗'=>'祝','㊘'=>'労','㊙'=>'秘','㊚'=>'男','㊛'=>'女','㊜'=>'適','㊝'=>'優','㊞'=>'印','㊟'=>'注','㊠'=>'項','㊡'=>'休','㊢'=>'写','㊣'=>'正','㊤'=>'上','㊥'=>'中','㊦'=>'下','㊧'=>'左','㊨'=>'右','㊩'=>'医','㊪'=>'宗','㊫'=>'学','㊬'=>'監','㊭'=>'企','㊮'=>'資','㊯'=>'協','㊰'=>'夜','㊱'=>'36','㊲'=>'37','㊳'=>'38','㊴'=>'39','㊵'=>'40','㊶'=>'41','㊷'=>'42','㊸'=>'43','㊹'=>'44','㊺'=>'45','㊻'=>'46','㊼'=>'47','㊽'=>'48','㊾'=>'49','㊿'=>'50','㋀'=>'1月','㋁'=>'2月','㋂'=>'3月','㋃'=>'4月','㋄'=>'5月','㋅'=>'6月','㋆'=>'7月','㋇'=>'8月','㋈'=>'9月','㋉'=>'10月','㋊'=>'11月','㋋'=>'12月','㋌'=>'Hg','㋍'=>'erg','㋎'=>'eV','㋏'=>'LTD','㋐'=>'ア','㋑'=>'イ','㋒'=>'ウ','㋓'=>'エ','㋔'=>'オ','㋕'=>'カ','㋖'=>'キ','㋗'=>'ク','㋘'=>'ケ','㋙'=>'コ','㋚'=>'サ','㋛'=>'シ','㋜'=>'ス','㋝'=>'セ','㋞'=>'ソ','㋟'=>'タ','㋠'=>'チ','㋡'=>'ツ','㋢'=>'テ','㋣'=>'ト','㋤'=>'ナ','㋥'=>'ニ','㋦'=>'ヌ','㋧'=>'ネ','㋨'=>'ノ','㋩'=>'ハ','㋪'=>'ヒ','㋫'=>'フ','㋬'=>'ヘ','㋭'=>'ホ','㋮'=>'マ','㋯'=>'ミ','㋰'=>'ム','㋱'=>'メ','㋲'=>'モ','㋳'=>'ヤ','㋴'=>'ユ','㋵'=>'ヨ','㋶'=>'ラ','㋷'=>'リ','㋸'=>'ル','㋹'=>'レ','㋺'=>'ロ','㋻'=>'ワ','㋼'=>'ヰ','㋽'=>'ヱ','㋾'=>'ヲ','㌀'=>'アパート','㌁'=>'アルファ','㌂'=>'アンペア','㌃'=>'アール','㌄'=>'イニング','㌅'=>'インチ','㌆'=>'ウォン','㌇'=>'エスクード','㌈'=>'エーカー','㌉'=>'オンス','㌊'=>'オーム','㌋'=>'カイリ','㌌'=>'カラット','㌍'=>'カロリー','㌎'=>'ガロン','㌏'=>'ガンマ','㌐'=>'ギガ','㌑'=>'ギニー','㌒'=>'キュリー','㌓'=>'ギルダー','㌔'=>'キロ','㌕'=>'キログラム','㌖'=>'キロメートル','㌗'=>'キロワット','㌘'=>'グラム','㌙'=>'グラムトン','㌚'=>'クルゼイロ','㌛'=>'クローネ','㌜'=>'ケース','㌝'=>'コルナ','㌞'=>'コーポ','㌟'=>'サイクル','㌠'=>'サンチーム','㌡'=>'シリング','㌢'=>'センチ','㌣'=>'セント','㌤'=>'ダース','㌥'=>'デシ','㌦'=>'ドル','㌧'=>'トン','㌨'=>'ナノ','㌩'=>'ノット','㌪'=>'ハイツ','㌫'=>'パーセント','㌬'=>'パーツ','㌭'=>'バーレル','㌮'=>'ピアストル','㌯'=>'ピクル','㌰'=>'ピコ','㌱'=>'ビル','㌲'=>'ファラッド','㌳'=>'フィート','㌴'=>'ブッシェル','㌵'=>'フラン','㌶'=>'ヘクタール','㌷'=>'ペソ','㌸'=>'ペニヒ','㌹'=>'ヘルツ','㌺'=>'ペンス','㌻'=>'ページ','㌼'=>'ベータ','㌽'=>'ポイント','㌾'=>'ボルト','㌿'=>'ホン','㍀'=>'ポンド','㍁'=>'ホール','㍂'=>'ホーン','㍃'=>'マイクロ','㍄'=>'マイル','㍅'=>'マッハ','㍆'=>'マルク','㍇'=>'マンション','㍈'=>'ミクロン','㍉'=>'ミリ','㍊'=>'ミリバール','㍋'=>'メガ','㍌'=>'メガトン','㍍'=>'メートル','㍎'=>'ヤード','㍏'=>'ヤール','㍐'=>'ユアン','㍑'=>'リットル','㍒'=>'リラ','㍓'=>'ルピー','㍔'=>'ルーブル','㍕'=>'レム','㍖'=>'レントゲン','㍗'=>'ワット','㍘'=>'0点','㍙'=>'1点','㍚'=>'2点','㍛'=>'3点','㍜'=>'4点','㍝'=>'5点','㍞'=>'6点','㍟'=>'7点','㍠'=>'8点','㍡'=>'9点','㍢'=>'10点','㍣'=>'11点','㍤'=>'12点','㍥'=>'13点','㍦'=>'14点','㍧'=>'15点','㍨'=>'16点','㍩'=>'17点','㍪'=>'18点','㍫'=>'19点','㍬'=>'20点','㍭'=>'21点','㍮'=>'22点','㍯'=>'23点','㍰'=>'24点','㍱'=>'hPa','㍲'=>'da','㍳'=>'AU','㍴'=>'bar','㍵'=>'oV','㍶'=>'pc','㍷'=>'dm','㍸'=>'dm2','㍹'=>'dm3','㍺'=>'IU','㍻'=>'平成','㍼'=>'昭和','㍽'=>'大正','㍾'=>'明治','㍿'=>'株式会社','㎀'=>'pA','㎁'=>'nA','㎂'=>'μA','㎃'=>'mA','㎄'=>'kA','㎅'=>'KB','㎆'=>'MB','㎇'=>'GB','㎈'=>'cal','㎉'=>'kcal','㎊'=>'pF','㎋'=>'nF','㎌'=>'μF','㎍'=>'μg','㎎'=>'mg','㎏'=>'kg','㎐'=>'Hz','㎑'=>'kHz','㎒'=>'MHz','㎓'=>'GHz','㎔'=>'THz','㎕'=>'μl','㎖'=>'ml','㎗'=>'dl','㎘'=>'kl','㎙'=>'fm','㎚'=>'nm','㎛'=>'μm','㎜'=>'mm','㎝'=>'cm','㎞'=>'km','㎟'=>'mm2','㎠'=>'cm2','㎡'=>'m2','㎢'=>'km2','㎣'=>'mm3','㎤'=>'cm3','㎥'=>'m3','㎦'=>'km3','㎧'=>'m∕s','㎨'=>'m∕s2','㎩'=>'Pa','㎪'=>'kPa','㎫'=>'MPa','㎬'=>'GPa','㎭'=>'rad','㎮'=>'rad∕s','㎯'=>'rad∕s2','㎰'=>'ps','㎱'=>'ns','㎲'=>'μs','㎳'=>'ms','㎴'=>'pV','㎵'=>'nV','㎶'=>'μV','㎷'=>'mV','㎸'=>'kV','㎹'=>'MV','㎺'=>'pW','㎻'=>'nW','㎼'=>'μW','㎽'=>'mW','㎾'=>'kW','㎿'=>'MW','㏀'=>'kΩ','㏁'=>'MΩ','㏂'=>'a.m.','㏃'=>'Bq','㏄'=>'cc','㏅'=>'cd','㏆'=>'C∕kg','㏇'=>'Co.','㏈'=>'dB','㏉'=>'Gy','㏊'=>'ha','㏋'=>'HP','㏌'=>'in','㏍'=>'KK','㏎'=>'KM','㏏'=>'kt','㏐'=>'lm','㏑'=>'ln','㏒'=>'log','㏓'=>'lx','㏔'=>'mb','㏕'=>'mil','㏖'=>'mol','㏗'=>'PH','㏘'=>'p.m.','㏙'=>'PPM','㏚'=>'PR','㏛'=>'sr','㏜'=>'Sv','㏝'=>'Wb','㏞'=>'V∕m','㏟'=>'A∕m','㏠'=>'1日','㏡'=>'2日','㏢'=>'3日','㏣'=>'4日','㏤'=>'5日','㏥'=>'6日','㏦'=>'7日','㏧'=>'8日','㏨'=>'9日','㏩'=>'10日','㏪'=>'11日','㏫'=>'12日','㏬'=>'13日','㏭'=>'14日','㏮'=>'15日','㏯'=>'16日','㏰'=>'17日','㏱'=>'18日','㏲'=>'19日','㏳'=>'20日','㏴'=>'21日','㏵'=>'22日','㏶'=>'23日','㏷'=>'24日','㏸'=>'25日','㏹'=>'26日','㏺'=>'27日','㏻'=>'28日','㏼'=>'29日','㏽'=>'30日','㏾'=>'31日','㏿'=>'gal','豈'=>'豈','更'=>'更','車'=>'車','賈'=>'賈','滑'=>'滑','串'=>'串','句'=>'句','龜'=>'龜','龜'=>'龜','契'=>'契','金'=>'金','喇'=>'喇','奈'=>'奈','懶'=>'懶','癩'=>'癩','羅'=>'羅','蘿'=>'蘿','螺'=>'螺','裸'=>'裸','邏'=>'邏','樂'=>'樂','洛'=>'洛','烙'=>'烙','珞'=>'珞','落'=>'落','酪'=>'酪','駱'=>'駱','亂'=>'亂','卵'=>'卵','欄'=>'欄','爛'=>'爛','蘭'=>'蘭','鸞'=>'鸞','嵐'=>'嵐','濫'=>'濫','藍'=>'藍','襤'=>'襤','拉'=>'拉','臘'=>'臘','蠟'=>'蠟','廊'=>'廊','朗'=>'朗','浪'=>'浪','狼'=>'狼','郎'=>'郎','來'=>'來','冷'=>'冷','勞'=>'勞','擄'=>'擄','櫓'=>'櫓','爐'=>'爐','盧'=>'盧','老'=>'老','蘆'=>'蘆','虜'=>'虜','路'=>'路','露'=>'露','魯'=>'魯','鷺'=>'鷺','碌'=>'碌','祿'=>'祿','綠'=>'綠','菉'=>'菉','錄'=>'錄','鹿'=>'鹿','論'=>'論','壟'=>'壟','弄'=>'弄','籠'=>'籠','聾'=>'聾','牢'=>'牢','磊'=>'磊','賂'=>'賂','雷'=>'雷','壘'=>'壘','屢'=>'屢','樓'=>'樓','淚'=>'淚','漏'=>'漏','累'=>'累','縷'=>'縷','陋'=>'陋','勒'=>'勒','肋'=>'肋','凜'=>'凜','凌'=>'凌','稜'=>'稜','綾'=>'綾','菱'=>'菱','陵'=>'陵','讀'=>'讀','拏'=>'拏','樂'=>'樂','諾'=>'諾','丹'=>'丹','寧'=>'寧','怒'=>'怒','率'=>'率','異'=>'異','北'=>'北','磻'=>'磻','便'=>'便','復'=>'復','不'=>'不','泌'=>'泌','數'=>'數','索'=>'索','參'=>'參','塞'=>'塞','省'=>'省','葉'=>'葉','說'=>'說','殺'=>'殺','辰'=>'辰','沈'=>'沈','拾'=>'拾','若'=>'若','掠'=>'掠','略'=>'略','亮'=>'亮','兩'=>'兩','凉'=>'凉','梁'=>'梁','糧'=>'糧','良'=>'良','諒'=>'諒','量'=>'量','勵'=>'勵','呂'=>'呂','女'=>'女','廬'=>'廬','旅'=>'旅','濾'=>'濾','礪'=>'礪','閭'=>'閭','驪'=>'驪','麗'=>'麗','黎'=>'黎','力'=>'力','曆'=>'曆','歷'=>'歷','轢'=>'轢','年'=>'年','憐'=>'憐','戀'=>'戀','撚'=>'撚','漣'=>'漣','煉'=>'煉','璉'=>'璉','秊'=>'秊','練'=>'練','聯'=>'聯','輦'=>'輦','蓮'=>'蓮','連'=>'連','鍊'=>'鍊','列'=>'列','劣'=>'劣','咽'=>'咽','烈'=>'烈','裂'=>'裂','說'=>'說','廉'=>'廉','念'=>'念','捻'=>'捻','殮'=>'殮','簾'=>'簾','獵'=>'獵','令'=>'令','囹'=>'囹','寧'=>'寧','嶺'=>'嶺','怜'=>'怜','玲'=>'玲','瑩'=>'瑩','羚'=>'羚','聆'=>'聆','鈴'=>'鈴','零'=>'零','靈'=>'靈','領'=>'領','例'=>'例','禮'=>'禮','醴'=>'醴','隸'=>'隸','惡'=>'惡','了'=>'了','僚'=>'僚','寮'=>'寮','尿'=>'尿','料'=>'料','樂'=>'樂','燎'=>'燎','療'=>'療','蓼'=>'蓼','遼'=>'遼','龍'=>'龍','暈'=>'暈','阮'=>'阮','劉'=>'劉','杻'=>'杻','柳'=>'柳','流'=>'流','溜'=>'溜','琉'=>'琉','留'=>'留','硫'=>'硫','紐'=>'紐','類'=>'類','六'=>'六','戮'=>'戮','陸'=>'陸','倫'=>'倫','崙'=>'崙','淪'=>'淪','輪'=>'輪','律'=>'律','慄'=>'慄','栗'=>'栗','率'=>'率','隆'=>'隆','利'=>'利','吏'=>'吏','履'=>'履','易'=>'易','李'=>'李','梨'=>'梨','泥'=>'泥','理'=>'理','痢'=>'痢','罹'=>'罹','裏'=>'裏','裡'=>'裡','里'=>'里','離'=>'離','匿'=>'匿','溺'=>'溺','吝'=>'吝','燐'=>'燐','璘'=>'璘','藺'=>'藺','隣'=>'隣','鱗'=>'鱗','麟'=>'麟','林'=>'林','淋'=>'淋','臨'=>'臨','立'=>'立','笠'=>'笠','粒'=>'粒','狀'=>'狀','炙'=>'炙','識'=>'識','什'=>'什','茶'=>'茶','刺'=>'刺','切'=>'切','度'=>'度','拓'=>'拓','糖'=>'糖','宅'=>'宅','洞'=>'洞','暴'=>'暴','輻'=>'輻','行'=>'行','降'=>'降','見'=>'見','廓'=>'廓','兀'=>'兀','嗀'=>'嗀','塚'=>'塚','晴'=>'晴','凞'=>'凞','猪'=>'猪','益'=>'益','礼'=>'礼','神'=>'神','祥'=>'祥','福'=>'福','靖'=>'靖','精'=>'精','羽'=>'羽','蘒'=>'蘒','諸'=>'諸','逸'=>'逸','都'=>'都','飯'=>'飯','飼'=>'飼','館'=>'館','鶴'=>'鶴','侮'=>'侮','僧'=>'僧','免'=>'免','勉'=>'勉','勤'=>'勤','卑'=>'卑','喝'=>'喝','嘆'=>'嘆','器'=>'器','塀'=>'塀','墨'=>'墨','層'=>'層','屮'=>'屮','悔'=>'悔','慨'=>'慨','憎'=>'憎','懲'=>'懲','敏'=>'敏','既'=>'既','暑'=>'暑','梅'=>'梅','海'=>'海','渚'=>'渚','漢'=>'漢','煮'=>'煮','爫'=>'爫','琢'=>'琢','碑'=>'碑','社'=>'社','祉'=>'祉','祈'=>'祈','祐'=>'祐','祖'=>'祖','祝'=>'祝','禍'=>'禍','禎'=>'禎','穀'=>'穀','突'=>'突','節'=>'節','練'=>'練','縉'=>'縉','繁'=>'繁','署'=>'署','者'=>'者','臭'=>'臭','艹'=>'艹','艹'=>'艹','著'=>'著','褐'=>'褐','視'=>'視','謁'=>'謁','謹'=>'謹','賓'=>'賓','贈'=>'贈','辶'=>'辶','逸'=>'逸','難'=>'難','響'=>'響','頻'=>'頻','並'=>'並','况'=>'况','全'=>'全','侀'=>'侀','充'=>'充','冀'=>'冀','勇'=>'勇','勺'=>'勺','喝'=>'喝','啕'=>'啕','喙'=>'喙','嗢'=>'嗢','塚'=>'塚','墳'=>'墳','奄'=>'奄','奔'=>'奔','婢'=>'婢','嬨'=>'嬨','廒'=>'廒','廙'=>'廙','彩'=>'彩','徭'=>'徭','惘'=>'惘','慎'=>'慎','愈'=>'愈','憎'=>'憎','慠'=>'慠','懲'=>'懲','戴'=>'戴','揄'=>'揄','搜'=>'搜','摒'=>'摒','敖'=>'敖','晴'=>'晴','朗'=>'朗','望'=>'望','杖'=>'杖','歹'=>'歹','殺'=>'殺','流'=>'流','滛'=>'滛','滋'=>'滋','漢'=>'漢','瀞'=>'瀞','煮'=>'煮','瞧'=>'瞧','爵'=>'爵','犯'=>'犯','猪'=>'猪','瑱'=>'瑱','甆'=>'甆','画'=>'画','瘝'=>'瘝','瘟'=>'瘟','益'=>'益','盛'=>'盛','直'=>'直','睊'=>'睊','着'=>'着','磌'=>'磌','窱'=>'窱','節'=>'節','类'=>'类','絛'=>'絛','練'=>'練','缾'=>'缾','者'=>'者','荒'=>'荒','華'=>'華','蝹'=>'蝹','襁'=>'襁','覆'=>'覆','視'=>'視','調'=>'調','諸'=>'諸','請'=>'請','謁'=>'謁','諾'=>'諾','諭'=>'諭','謹'=>'謹','變'=>'變','贈'=>'贈','輸'=>'輸','遲'=>'遲','醙'=>'醙','鉶'=>'鉶','陼'=>'陼','難'=>'難','靖'=>'靖','韛'=>'韛','響'=>'響','頋'=>'頋','頻'=>'頻','鬒'=>'鬒','龜'=>'龜','𢡊'=>'𢡊','𢡄'=>'𢡄','𣏕'=>'𣏕','㮝'=>'㮝','䀘'=>'䀘','䀹'=>'䀹','𥉉'=>'𥉉','𥳐'=>'𥳐','𧻓'=>'𧻓','齃'=>'齃','龎'=>'龎','ff'=>'ff','fi'=>'fi','fl'=>'fl','ffi'=>'ffi','ffl'=>'ffl','ſt'=>'st','st'=>'st','ﬓ'=>'մն','ﬔ'=>'մե','ﬕ'=>'մի','ﬖ'=>'վն','ﬗ'=>'մխ','יִ'=>'יִ','ײַ'=>'ײַ','ﬠ'=>'ע','ﬡ'=>'א','ﬢ'=>'ד','ﬣ'=>'ה','ﬤ'=>'כ','ﬥ'=>'ל','ﬦ'=>'ם','ﬧ'=>'ר','ﬨ'=>'ת','﬩'=>'+','שׁ'=>'שׁ','שׂ'=>'שׂ','שּׁ'=>'שּׁ','שּׂ'=>'שּׂ','אַ'=>'אַ','אָ'=>'אָ','אּ'=>'אּ','בּ'=>'בּ','גּ'=>'גּ','דּ'=>'דּ','הּ'=>'הּ','וּ'=>'וּ','זּ'=>'זּ','טּ'=>'טּ','יּ'=>'יּ','ךּ'=>'ךּ','כּ'=>'כּ','לּ'=>'לּ','מּ'=>'מּ','נּ'=>'נּ','סּ'=>'סּ','ףּ'=>'ףּ','פּ'=>'פּ','צּ'=>'צּ','קּ'=>'קּ','רּ'=>'רּ','שּ'=>'שּ','תּ'=>'תּ','וֹ'=>'וֹ','בֿ'=>'בֿ','כֿ'=>'כֿ','פֿ'=>'פֿ','ﭏ'=>'אל','ﭐ'=>'ٱ','ﭑ'=>'ٱ','ﭒ'=>'ٻ','ﭓ'=>'ٻ','ﭔ'=>'ٻ','ﭕ'=>'ٻ','ﭖ'=>'پ','ﭗ'=>'پ','ﭘ'=>'پ','ﭙ'=>'پ','ﭚ'=>'ڀ','ﭛ'=>'ڀ','ﭜ'=>'ڀ','ﭝ'=>'ڀ','ﭞ'=>'ٺ','ﭟ'=>'ٺ','ﭠ'=>'ٺ','ﭡ'=>'ٺ','ﭢ'=>'ٿ','ﭣ'=>'ٿ','ﭤ'=>'ٿ','ﭥ'=>'ٿ','ﭦ'=>'ٹ','ﭧ'=>'ٹ','ﭨ'=>'ٹ','ﭩ'=>'ٹ','ﭪ'=>'ڤ','ﭫ'=>'ڤ','ﭬ'=>'ڤ','ﭭ'=>'ڤ','ﭮ'=>'ڦ','ﭯ'=>'ڦ','ﭰ'=>'ڦ','ﭱ'=>'ڦ','ﭲ'=>'ڄ','ﭳ'=>'ڄ','ﭴ'=>'ڄ','ﭵ'=>'ڄ','ﭶ'=>'ڃ','ﭷ'=>'ڃ','ﭸ'=>'ڃ','ﭹ'=>'ڃ','ﭺ'=>'چ','ﭻ'=>'چ','ﭼ'=>'چ','ﭽ'=>'چ','ﭾ'=>'ڇ','ﭿ'=>'ڇ','ﮀ'=>'ڇ','ﮁ'=>'ڇ','ﮂ'=>'ڍ','ﮃ'=>'ڍ','ﮄ'=>'ڌ','ﮅ'=>'ڌ','ﮆ'=>'ڎ','ﮇ'=>'ڎ','ﮈ'=>'ڈ','ﮉ'=>'ڈ','ﮊ'=>'ژ','ﮋ'=>'ژ','ﮌ'=>'ڑ','ﮍ'=>'ڑ','ﮎ'=>'ک','ﮏ'=>'ک','ﮐ'=>'ک','ﮑ'=>'ک','ﮒ'=>'گ','ﮓ'=>'گ','ﮔ'=>'گ','ﮕ'=>'گ','ﮖ'=>'ڳ','ﮗ'=>'ڳ','ﮘ'=>'ڳ','ﮙ'=>'ڳ','ﮚ'=>'ڱ','ﮛ'=>'ڱ','ﮜ'=>'ڱ','ﮝ'=>'ڱ','ﮞ'=>'ں','ﮟ'=>'ں','ﮠ'=>'ڻ','ﮡ'=>'ڻ','ﮢ'=>'ڻ','ﮣ'=>'ڻ','ﮤ'=>'ۀ','ﮥ'=>'ۀ','ﮦ'=>'ہ','ﮧ'=>'ہ','ﮨ'=>'ہ','ﮩ'=>'ہ','ﮪ'=>'ھ','ﮫ'=>'ھ','ﮬ'=>'ھ','ﮭ'=>'ھ','ﮮ'=>'ے','ﮯ'=>'ے','ﮰ'=>'ۓ','ﮱ'=>'ۓ','ﯓ'=>'ڭ','ﯔ'=>'ڭ','ﯕ'=>'ڭ','ﯖ'=>'ڭ','ﯗ'=>'ۇ','ﯘ'=>'ۇ','ﯙ'=>'ۆ','ﯚ'=>'ۆ','ﯛ'=>'ۈ','ﯜ'=>'ۈ','ﯝ'=>'ۇٴ','ﯞ'=>'ۋ','ﯟ'=>'ۋ','ﯠ'=>'ۅ','ﯡ'=>'ۅ','ﯢ'=>'ۉ','ﯣ'=>'ۉ','ﯤ'=>'ې','ﯥ'=>'ې','ﯦ'=>'ې','ﯧ'=>'ې','ﯨ'=>'ى','ﯩ'=>'ى','ﯪ'=>'ئا','ﯫ'=>'ئا','ﯬ'=>'ئە','ﯭ'=>'ئە','ﯮ'=>'ئو','ﯯ'=>'ئو','ﯰ'=>'ئۇ','ﯱ'=>'ئۇ','ﯲ'=>'ئۆ','ﯳ'=>'ئۆ','ﯴ'=>'ئۈ','ﯵ'=>'ئۈ','ﯶ'=>'ئې','ﯷ'=>'ئې','ﯸ'=>'ئې','ﯹ'=>'ئى','ﯺ'=>'ئى','ﯻ'=>'ئى','ﯼ'=>'ی','ﯽ'=>'ی','ﯾ'=>'ی','ﯿ'=>'ی','ﰀ'=>'ئج','ﰁ'=>'ئح','ﰂ'=>'ئم','ﰃ'=>'ئى','ﰄ'=>'ئي','ﰅ'=>'بج','ﰆ'=>'بح','ﰇ'=>'بخ','ﰈ'=>'بم','ﰉ'=>'بى','ﰊ'=>'بي','ﰋ'=>'تج','ﰌ'=>'تح','ﰍ'=>'تخ','ﰎ'=>'تم','ﰏ'=>'تى','ﰐ'=>'تي','ﰑ'=>'ثج','ﰒ'=>'ثم','ﰓ'=>'ثى','ﰔ'=>'ثي','ﰕ'=>'جح','ﰖ'=>'جم','ﰗ'=>'حج','ﰘ'=>'حم','ﰙ'=>'خج','ﰚ'=>'خح','ﰛ'=>'خم','ﰜ'=>'سج','ﰝ'=>'سح','ﰞ'=>'سخ','ﰟ'=>'سم','ﰠ'=>'صح','ﰡ'=>'صم','ﰢ'=>'ضج','ﰣ'=>'ضح','ﰤ'=>'ضخ','ﰥ'=>'ضم','ﰦ'=>'طح','ﰧ'=>'طم','ﰨ'=>'ظم','ﰩ'=>'عج','ﰪ'=>'عم','ﰫ'=>'غج','ﰬ'=>'غم','ﰭ'=>'فج','ﰮ'=>'فح','ﰯ'=>'فخ','ﰰ'=>'فم','ﰱ'=>'فى','ﰲ'=>'في','ﰳ'=>'قح','ﰴ'=>'قم','ﰵ'=>'قى','ﰶ'=>'قي','ﰷ'=>'كا','ﰸ'=>'كج','ﰹ'=>'كح','ﰺ'=>'كخ','ﰻ'=>'كل','ﰼ'=>'كم','ﰽ'=>'كى','ﰾ'=>'كي','ﰿ'=>'لج','ﱀ'=>'لح','ﱁ'=>'لخ','ﱂ'=>'لم','ﱃ'=>'لى','ﱄ'=>'لي','ﱅ'=>'مج','ﱆ'=>'مح','ﱇ'=>'مخ','ﱈ'=>'مم','ﱉ'=>'مى','ﱊ'=>'مي','ﱋ'=>'نج','ﱌ'=>'نح','ﱍ'=>'نخ','ﱎ'=>'نم','ﱏ'=>'نى','ﱐ'=>'ني','ﱑ'=>'هج','ﱒ'=>'هم','ﱓ'=>'هى','ﱔ'=>'هي','ﱕ'=>'يج','ﱖ'=>'يح','ﱗ'=>'يخ','ﱘ'=>'يم','ﱙ'=>'يى','ﱚ'=>'يي','ﱛ'=>'ذٰ','ﱜ'=>'رٰ','ﱝ'=>'ىٰ','ﱞ'=>' ٌّ','ﱟ'=>' ٍّ','ﱠ'=>' َّ','ﱡ'=>' ُّ','ﱢ'=>' ِّ','ﱣ'=>' ّٰ','ﱤ'=>'ئر','ﱥ'=>'ئز','ﱦ'=>'ئم','ﱧ'=>'ئن','ﱨ'=>'ئى','ﱩ'=>'ئي','ﱪ'=>'بر','ﱫ'=>'بز','ﱬ'=>'بم','ﱭ'=>'بن','ﱮ'=>'بى','ﱯ'=>'بي','ﱰ'=>'تر','ﱱ'=>'تز','ﱲ'=>'تم','ﱳ'=>'تن','ﱴ'=>'تى','ﱵ'=>'تي','ﱶ'=>'ثر','ﱷ'=>'ثز','ﱸ'=>'ثم','ﱹ'=>'ثن','ﱺ'=>'ثى','ﱻ'=>'ثي','ﱼ'=>'فى','ﱽ'=>'في','ﱾ'=>'قى','ﱿ'=>'قي','ﲀ'=>'كا','ﲁ'=>'كل','ﲂ'=>'كم','ﲃ'=>'كى','ﲄ'=>'كي','ﲅ'=>'لم','ﲆ'=>'لى','ﲇ'=>'لي','ﲈ'=>'ما','ﲉ'=>'مم','ﲊ'=>'نر','ﲋ'=>'نز','ﲌ'=>'نم','ﲍ'=>'نن','ﲎ'=>'نى','ﲏ'=>'ني','ﲐ'=>'ىٰ','ﲑ'=>'ير','ﲒ'=>'يز','ﲓ'=>'يم','ﲔ'=>'ين','ﲕ'=>'يى','ﲖ'=>'يي','ﲗ'=>'ئج','ﲘ'=>'ئح','ﲙ'=>'ئخ','ﲚ'=>'ئم','ﲛ'=>'ئه','ﲜ'=>'بج','ﲝ'=>'بح','ﲞ'=>'بخ','ﲟ'=>'بم','ﲠ'=>'به','ﲡ'=>'تج','ﲢ'=>'تح','ﲣ'=>'تخ','ﲤ'=>'تم','ﲥ'=>'ته','ﲦ'=>'ثم','ﲧ'=>'جح','ﲨ'=>'جم','ﲩ'=>'حج','ﲪ'=>'حم','ﲫ'=>'خج','ﲬ'=>'خم','ﲭ'=>'سج','ﲮ'=>'سح','ﲯ'=>'سخ','ﲰ'=>'سم','ﲱ'=>'صح','ﲲ'=>'صخ','ﲳ'=>'صم','ﲴ'=>'ضج','ﲵ'=>'ضح','ﲶ'=>'ضخ','ﲷ'=>'ضم','ﲸ'=>'طح','ﲹ'=>'ظم','ﲺ'=>'عج','ﲻ'=>'عم','ﲼ'=>'غج','ﲽ'=>'غم','ﲾ'=>'فج','ﲿ'=>'فح','ﳀ'=>'فخ','ﳁ'=>'فم','ﳂ'=>'قح','ﳃ'=>'قم','ﳄ'=>'كج','ﳅ'=>'كح','ﳆ'=>'كخ','ﳇ'=>'كل','ﳈ'=>'كم','ﳉ'=>'لج','ﳊ'=>'لح','ﳋ'=>'لخ','ﳌ'=>'لم','ﳍ'=>'له','ﳎ'=>'مج','ﳏ'=>'مح','ﳐ'=>'مخ','ﳑ'=>'مم','ﳒ'=>'نج','ﳓ'=>'نح','ﳔ'=>'نخ','ﳕ'=>'نم','ﳖ'=>'نه','ﳗ'=>'هج','ﳘ'=>'هم','ﳙ'=>'هٰ','ﳚ'=>'يج','ﳛ'=>'يح','ﳜ'=>'يخ','ﳝ'=>'يم','ﳞ'=>'يه','ﳟ'=>'ئم','ﳠ'=>'ئه','ﳡ'=>'بم','ﳢ'=>'به','ﳣ'=>'تم','ﳤ'=>'ته','ﳥ'=>'ثم','ﳦ'=>'ثه','ﳧ'=>'سم','ﳨ'=>'سه','ﳩ'=>'شم','ﳪ'=>'شه','ﳫ'=>'كل','ﳬ'=>'كم','ﳭ'=>'لم','ﳮ'=>'نم','ﳯ'=>'نه','ﳰ'=>'يم','ﳱ'=>'يه','ﳲ'=>'ـَّ','ﳳ'=>'ـُّ','ﳴ'=>'ـِّ','ﳵ'=>'طى','ﳶ'=>'طي','ﳷ'=>'عى','ﳸ'=>'عي','ﳹ'=>'غى','ﳺ'=>'غي','ﳻ'=>'سى','ﳼ'=>'سي','ﳽ'=>'شى','ﳾ'=>'شي','ﳿ'=>'حى','ﴀ'=>'حي','ﴁ'=>'جى','ﴂ'=>'جي','ﴃ'=>'خى','ﴄ'=>'خي','ﴅ'=>'صى','ﴆ'=>'صي','ﴇ'=>'ضى','ﴈ'=>'ضي','ﴉ'=>'شج','ﴊ'=>'شح','ﴋ'=>'شخ','ﴌ'=>'شم','ﴍ'=>'شر','ﴎ'=>'سر','ﴏ'=>'صر','ﴐ'=>'ضر','ﴑ'=>'طى','ﴒ'=>'طي','ﴓ'=>'عى','ﴔ'=>'عي','ﴕ'=>'غى','ﴖ'=>'غي','ﴗ'=>'سى','ﴘ'=>'سي','ﴙ'=>'شى','ﴚ'=>'شي','ﴛ'=>'حى','ﴜ'=>'حي','ﴝ'=>'جى','ﴞ'=>'جي','ﴟ'=>'خى','ﴠ'=>'خي','ﴡ'=>'صى','ﴢ'=>'صي','ﴣ'=>'ضى','ﴤ'=>'ضي','ﴥ'=>'شج','ﴦ'=>'شح','ﴧ'=>'شخ','ﴨ'=>'شم','ﴩ'=>'شر','ﴪ'=>'سر','ﴫ'=>'صر','ﴬ'=>'ضر','ﴭ'=>'شج','ﴮ'=>'شح','ﴯ'=>'شخ','ﴰ'=>'شم','ﴱ'=>'سه','ﴲ'=>'شه','ﴳ'=>'طم','ﴴ'=>'سج','ﴵ'=>'سح','ﴶ'=>'سخ','ﴷ'=>'شج','ﴸ'=>'شح','ﴹ'=>'شخ','ﴺ'=>'طم','ﴻ'=>'ظم','ﴼ'=>'اً','ﴽ'=>'اً','ﵐ'=>'تجم','ﵑ'=>'تحج','ﵒ'=>'تحج','ﵓ'=>'تحم','ﵔ'=>'تخم','ﵕ'=>'تمج','ﵖ'=>'تمح','ﵗ'=>'تمخ','ﵘ'=>'جمح','ﵙ'=>'جمح','ﵚ'=>'حمي','ﵛ'=>'حمى','ﵜ'=>'سحج','ﵝ'=>'سجح','ﵞ'=>'سجى','ﵟ'=>'سمح','ﵠ'=>'سمح','ﵡ'=>'سمج','ﵢ'=>'سمم','ﵣ'=>'سمم','ﵤ'=>'صحح','ﵥ'=>'صحح','ﵦ'=>'صمم','ﵧ'=>'شحم','ﵨ'=>'شحم','ﵩ'=>'شجي','ﵪ'=>'شمخ','ﵫ'=>'شمخ','ﵬ'=>'شمم','ﵭ'=>'شمم','ﵮ'=>'ضحى','ﵯ'=>'ضخم','ﵰ'=>'ضخم','ﵱ'=>'طمح','ﵲ'=>'طمح','ﵳ'=>'طمم','ﵴ'=>'طمي','ﵵ'=>'عجم','ﵶ'=>'عمم','ﵷ'=>'عمم','ﵸ'=>'عمى','ﵹ'=>'غمم','ﵺ'=>'غمي','ﵻ'=>'غمى','ﵼ'=>'فخم','ﵽ'=>'فخم','ﵾ'=>'قمح','ﵿ'=>'قمم','ﶀ'=>'لحم','ﶁ'=>'لحي','ﶂ'=>'لحى','ﶃ'=>'لجج','ﶄ'=>'لجج','ﶅ'=>'لخم','ﶆ'=>'لخم','ﶇ'=>'لمح','ﶈ'=>'لمح','ﶉ'=>'محج','ﶊ'=>'محم','ﶋ'=>'محي','ﶌ'=>'مجح','ﶍ'=>'مجم','ﶎ'=>'مخج','ﶏ'=>'مخم','ﶒ'=>'مجخ','ﶓ'=>'همج','ﶔ'=>'همم','ﶕ'=>'نحم','ﶖ'=>'نحى','ﶗ'=>'نجم','ﶘ'=>'نجم','ﶙ'=>'نجى','ﶚ'=>'نمي','ﶛ'=>'نمى','ﶜ'=>'يمم','ﶝ'=>'يمم','ﶞ'=>'بخي','ﶟ'=>'تجي','ﶠ'=>'تجى','ﶡ'=>'تخي','ﶢ'=>'تخى','ﶣ'=>'تمي','ﶤ'=>'تمى','ﶥ'=>'جمي','ﶦ'=>'جحى','ﶧ'=>'جمى','ﶨ'=>'سخى','ﶩ'=>'صحي','ﶪ'=>'شحي','ﶫ'=>'ضحي','ﶬ'=>'لجي','ﶭ'=>'لمي','ﶮ'=>'يحي','ﶯ'=>'يجي','ﶰ'=>'يمي','ﶱ'=>'ممي','ﶲ'=>'قمي','ﶳ'=>'نحي','ﶴ'=>'قمح','ﶵ'=>'لحم','ﶶ'=>'عمي','ﶷ'=>'كمي','ﶸ'=>'نجح','ﶹ'=>'مخي','ﶺ'=>'لجم','ﶻ'=>'كمم','ﶼ'=>'لجم','ﶽ'=>'نجح','ﶾ'=>'جحي','ﶿ'=>'حجي','ﷀ'=>'مجي','ﷁ'=>'فمي','ﷂ'=>'بحي','ﷃ'=>'كمم','ﷄ'=>'عجم','ﷅ'=>'صمم','ﷆ'=>'سخي','ﷇ'=>'نجي','ﷰ'=>'صلے','ﷱ'=>'قلے','ﷲ'=>'الله','ﷳ'=>'اكبر','ﷴ'=>'محمد','ﷵ'=>'صلعم','ﷶ'=>'رسول','ﷷ'=>'عليه','ﷸ'=>'وسلم','ﷹ'=>'صلى','ﷺ'=>'صلى الله عليه وسلم','ﷻ'=>'جل جلاله','﷼'=>'ریال','︐'=>',','︑'=>'、','︒'=>'。','︓'=>':','︔'=>';','︕'=>'!','︖'=>'?','︗'=>'〖','︘'=>'〗','︙'=>'...','︰'=>'..','︱'=>'—','︲'=>'–','︳'=>'_','︴'=>'_','︵'=>'(','︶'=>')','︷'=>'{','︸'=>'}','︹'=>'〔','︺'=>'〕','︻'=>'【','︼'=>'】','︽'=>'《','︾'=>'》','︿'=>'〈','﹀'=>'〉','﹁'=>'「','﹂'=>'」','﹃'=>'『','﹄'=>'』','﹇'=>'[','﹈'=>']','﹉'=>' ̅','﹊'=>' ̅','﹋'=>' ̅','﹌'=>' ̅','﹍'=>'_','﹎'=>'_','﹏'=>'_','﹐'=>',','﹑'=>'、','﹒'=>'.','﹔'=>';','﹕'=>':','﹖'=>'?','﹗'=>'!','﹘'=>'—','﹙'=>'(','﹚'=>')','﹛'=>'{','﹜'=>'}','﹝'=>'〔','﹞'=>'〕','﹟'=>'#','﹠'=>'&','﹡'=>'*','﹢'=>'+','﹣'=>'-','﹤'=>'<','﹥'=>'>','﹦'=>'=','﹨'=>'\\','﹩'=>'$','﹪'=>'%','﹫'=>'@','ﹰ'=>' ً','ﹱ'=>'ـً','ﹲ'=>' ٌ','ﹴ'=>' ٍ','ﹶ'=>' َ','ﹷ'=>'ـَ','ﹸ'=>' ُ','ﹹ'=>'ـُ','ﹺ'=>' ِ','ﹻ'=>'ـِ','ﹼ'=>' ّ','ﹽ'=>'ـّ','ﹾ'=>' ْ','ﹿ'=>'ـْ','ﺀ'=>'ء','ﺁ'=>'آ','ﺂ'=>'آ','ﺃ'=>'أ','ﺄ'=>'أ','ﺅ'=>'ؤ','ﺆ'=>'ؤ','ﺇ'=>'إ','ﺈ'=>'إ','ﺉ'=>'ئ','ﺊ'=>'ئ','ﺋ'=>'ئ','ﺌ'=>'ئ','ﺍ'=>'ا','ﺎ'=>'ا','ﺏ'=>'ب','ﺐ'=>'ب','ﺑ'=>'ب','ﺒ'=>'ب','ﺓ'=>'ة','ﺔ'=>'ة','ﺕ'=>'ت','ﺖ'=>'ت','ﺗ'=>'ت','ﺘ'=>'ت','ﺙ'=>'ث','ﺚ'=>'ث','ﺛ'=>'ث','ﺜ'=>'ث','ﺝ'=>'ج','ﺞ'=>'ج','ﺟ'=>'ج','ﺠ'=>'ج','ﺡ'=>'ح','ﺢ'=>'ح','ﺣ'=>'ح','ﺤ'=>'ح','ﺥ'=>'خ','ﺦ'=>'خ','ﺧ'=>'خ','ﺨ'=>'خ','ﺩ'=>'د','ﺪ'=>'د','ﺫ'=>'ذ','ﺬ'=>'ذ','ﺭ'=>'ر','ﺮ'=>'ر','ﺯ'=>'ز','ﺰ'=>'ز','ﺱ'=>'س','ﺲ'=>'س','ﺳ'=>'س','ﺴ'=>'س','ﺵ'=>'ش','ﺶ'=>'ش','ﺷ'=>'ش','ﺸ'=>'ش','ﺹ'=>'ص','ﺺ'=>'ص','ﺻ'=>'ص','ﺼ'=>'ص','ﺽ'=>'ض','ﺾ'=>'ض','ﺿ'=>'ض','ﻀ'=>'ض','ﻁ'=>'ط','ﻂ'=>'ط','ﻃ'=>'ط','ﻄ'=>'ط','ﻅ'=>'ظ','ﻆ'=>'ظ','ﻇ'=>'ظ','ﻈ'=>'ظ','ﻉ'=>'ع','ﻊ'=>'ع','ﻋ'=>'ع','ﻌ'=>'ع','ﻍ'=>'غ','ﻎ'=>'غ','ﻏ'=>'غ','ﻐ'=>'غ','ﻑ'=>'ف','ﻒ'=>'ف','ﻓ'=>'ف','ﻔ'=>'ف','ﻕ'=>'ق','ﻖ'=>'ق','ﻗ'=>'ق','ﻘ'=>'ق','ﻙ'=>'ك','ﻚ'=>'ك','ﻛ'=>'ك','ﻜ'=>'ك','ﻝ'=>'ل','ﻞ'=>'ل','ﻟ'=>'ل','ﻠ'=>'ل','ﻡ'=>'م','ﻢ'=>'م','ﻣ'=>'م','ﻤ'=>'م','ﻥ'=>'ن','ﻦ'=>'ن','ﻧ'=>'ن','ﻨ'=>'ن','ﻩ'=>'ه','ﻪ'=>'ه','ﻫ'=>'ه','ﻬ'=>'ه','ﻭ'=>'و','ﻮ'=>'و','ﻯ'=>'ى','ﻰ'=>'ى','ﻱ'=>'ي','ﻲ'=>'ي','ﻳ'=>'ي','ﻴ'=>'ي','ﻵ'=>'لآ','ﻶ'=>'لآ','ﻷ'=>'لأ','ﻸ'=>'لأ','ﻹ'=>'لإ','ﻺ'=>'لإ','ﻻ'=>'لا','ﻼ'=>'لا','!'=>'!','"'=>'"','#'=>'#','$'=>'$','%'=>'%','&'=>'&','''=>'\'','('=>'(',')'=>')','*'=>'*','+'=>'+',','=>',','-'=>'-','.'=>'.','/'=>'/','0'=>'0','1'=>'1','2'=>'2','3'=>'3','4'=>'4','5'=>'5','6'=>'6','7'=>'7','8'=>'8','9'=>'9',':'=>':',';'=>';','<'=>'<','='=>'=','>'=>'>','?'=>'?','@'=>'@','A'=>'A','B'=>'B','C'=>'C','D'=>'D','E'=>'E','F'=>'F','G'=>'G','H'=>'H','I'=>'I','J'=>'J','K'=>'K','L'=>'L','M'=>'M','N'=>'N','O'=>'O','P'=>'P','Q'=>'Q','R'=>'R','S'=>'S','T'=>'T','U'=>'U','V'=>'V','W'=>'W','X'=>'X','Y'=>'Y','Z'=>'Z','['=>'[','\'=>'\\',']'=>']','^'=>'^','_'=>'_','`'=>'`','a'=>'a','b'=>'b','c'=>'c','d'=>'d','e'=>'e','f'=>'f','g'=>'g','h'=>'h','i'=>'i','j'=>'j','k'=>'k','l'=>'l','m'=>'m','n'=>'n','o'=>'o','p'=>'p','q'=>'q','r'=>'r','s'=>'s','t'=>'t','u'=>'u','v'=>'v','w'=>'w','x'=>'x','y'=>'y','z'=>'z','{'=>'{','|'=>'|','}'=>'}','~'=>'~','⦅'=>'⦅','⦆'=>'⦆','。'=>'。','「'=>'「','」'=>'」','、'=>'、','・'=>'・','ヲ'=>'ヲ','ァ'=>'ァ','ィ'=>'ィ','ゥ'=>'ゥ','ェ'=>'ェ','ォ'=>'ォ','ャ'=>'ャ','ュ'=>'ュ','ョ'=>'ョ','ッ'=>'ッ','ー'=>'ー','ア'=>'ア','イ'=>'イ','ウ'=>'ウ','エ'=>'エ','オ'=>'オ','カ'=>'カ','キ'=>'キ','ク'=>'ク','ケ'=>'ケ','コ'=>'コ','サ'=>'サ','シ'=>'シ','ス'=>'ス','セ'=>'セ','ソ'=>'ソ','タ'=>'タ','チ'=>'チ','ツ'=>'ツ','テ'=>'テ','ト'=>'ト','ナ'=>'ナ','ニ'=>'ニ','ヌ'=>'ヌ','ネ'=>'ネ','ノ'=>'ノ','ハ'=>'ハ','ヒ'=>'ヒ','フ'=>'フ','ヘ'=>'ヘ','ホ'=>'ホ','マ'=>'マ','ミ'=>'ミ','ム'=>'ム','メ'=>'メ','モ'=>'モ','ヤ'=>'ヤ','ユ'=>'ユ','ヨ'=>'ヨ','ラ'=>'ラ','リ'=>'リ','ル'=>'ル','レ'=>'レ','ロ'=>'ロ','ワ'=>'ワ','ン'=>'ン','゙'=>'゙','゚'=>'゚','ᅠ'=>'ᅠ','ᄀ'=>'ᄀ','ᄁ'=>'ᄁ','ᆪ'=>'ᆪ','ᄂ'=>'ᄂ','ᆬ'=>'ᆬ','ᆭ'=>'ᆭ','ᄃ'=>'ᄃ','ᄄ'=>'ᄄ','ᄅ'=>'ᄅ','ᆰ'=>'ᆰ','ᆱ'=>'ᆱ','ᆲ'=>'ᆲ','ᆳ'=>'ᆳ','ᆴ'=>'ᆴ','ᆵ'=>'ᆵ','ᄚ'=>'ᄚ','ᄆ'=>'ᄆ','ᄇ'=>'ᄇ','ᄈ'=>'ᄈ','ᄡ'=>'ᄡ','ᄉ'=>'ᄉ','ᄊ'=>'ᄊ','ᄋ'=>'ᄋ','ᄌ'=>'ᄌ','ᄍ'=>'ᄍ','ᄎ'=>'ᄎ','ᄏ'=>'ᄏ','ᄐ'=>'ᄐ','ᄑ'=>'ᄑ','ᄒ'=>'ᄒ','ᅡ'=>'ᅡ','ᅢ'=>'ᅢ','ᅣ'=>'ᅣ','ᅤ'=>'ᅤ','ᅥ'=>'ᅥ','ᅦ'=>'ᅦ','ᅧ'=>'ᅧ','ᅨ'=>'ᅨ','ᅩ'=>'ᅩ','ᅪ'=>'ᅪ','ᅫ'=>'ᅫ','ᅬ'=>'ᅬ','ᅭ'=>'ᅭ','ᅮ'=>'ᅮ','ᅯ'=>'ᅯ','ᅰ'=>'ᅰ','ᅱ'=>'ᅱ','ᅲ'=>'ᅲ','ᅳ'=>'ᅳ','ᅴ'=>'ᅴ','ᅵ'=>'ᅵ','¢'=>'¢','£'=>'£','¬'=>'¬',' ̄'=>' ̄','¦'=>'¦','¥'=>'¥','₩'=>'₩','│'=>'│','←'=>'←','↑'=>'↑','→'=>'→','↓'=>'↓','■'=>'■','○'=>'○','𝅗𝅥'=>'𝅗𝅥','𝅘𝅥'=>'𝅘𝅥','𝅘𝅥𝅮'=>'𝅘𝅥𝅮','𝅘𝅥𝅯'=>'𝅘𝅥𝅯','𝅘𝅥𝅰'=>'𝅘𝅥𝅰','𝅘𝅥𝅱'=>'𝅘𝅥𝅱','𝅘𝅥𝅲'=>'𝅘𝅥𝅲','𝆹𝅥'=>'𝆹𝅥','𝆺𝅥'=>'𝆺𝅥','𝆹𝅥𝅮'=>'𝆹𝅥𝅮','𝆺𝅥𝅮'=>'𝆺𝅥𝅮','𝆹𝅥𝅯'=>'𝆹𝅥𝅯','𝆺𝅥𝅯'=>'𝆺𝅥𝅯','𝐀'=>'A','𝐁'=>'B','𝐂'=>'C','𝐃'=>'D','𝐄'=>'E','𝐅'=>'F','𝐆'=>'G','𝐇'=>'H','𝐈'=>'I','𝐉'=>'J','𝐊'=>'K','𝐋'=>'L','𝐌'=>'M','𝐍'=>'N','𝐎'=>'O','𝐏'=>'P','𝐐'=>'Q','𝐑'=>'R','𝐒'=>'S','𝐓'=>'T','𝐔'=>'U','𝐕'=>'V','𝐖'=>'W','𝐗'=>'X','𝐘'=>'Y','𝐙'=>'Z','𝐚'=>'a','𝐛'=>'b','𝐜'=>'c','𝐝'=>'d','𝐞'=>'e','𝐟'=>'f','𝐠'=>'g','𝐡'=>'h','𝐢'=>'i','𝐣'=>'j','𝐤'=>'k','𝐥'=>'l','𝐦'=>'m','𝐧'=>'n','𝐨'=>'o','𝐩'=>'p','𝐪'=>'q','𝐫'=>'r','𝐬'=>'s','𝐭'=>'t','𝐮'=>'u','𝐯'=>'v','𝐰'=>'w','𝐱'=>'x','𝐲'=>'y','𝐳'=>'z','𝐴'=>'A','𝐵'=>'B','𝐶'=>'C','𝐷'=>'D','𝐸'=>'E','𝐹'=>'F','𝐺'=>'G','𝐻'=>'H','𝐼'=>'I','𝐽'=>'J','𝐾'=>'K','𝐿'=>'L','𝑀'=>'M','𝑁'=>'N','𝑂'=>'O','𝑃'=>'P','𝑄'=>'Q','𝑅'=>'R','𝑆'=>'S','𝑇'=>'T','𝑈'=>'U','𝑉'=>'V','𝑊'=>'W','𝑋'=>'X','𝑌'=>'Y','𝑍'=>'Z','𝑎'=>'a','𝑏'=>'b','𝑐'=>'c','𝑑'=>'d','𝑒'=>'e','𝑓'=>'f','𝑔'=>'g','𝑖'=>'i','𝑗'=>'j','𝑘'=>'k','𝑙'=>'l','𝑚'=>'m','𝑛'=>'n','𝑜'=>'o','𝑝'=>'p','𝑞'=>'q','𝑟'=>'r','𝑠'=>'s','𝑡'=>'t','𝑢'=>'u','𝑣'=>'v','𝑤'=>'w','𝑥'=>'x','𝑦'=>'y','𝑧'=>'z','𝑨'=>'A','𝑩'=>'B','𝑪'=>'C','𝑫'=>'D','𝑬'=>'E','𝑭'=>'F','𝑮'=>'G','𝑯'=>'H','𝑰'=>'I','𝑱'=>'J','𝑲'=>'K','𝑳'=>'L','𝑴'=>'M','𝑵'=>'N','𝑶'=>'O','𝑷'=>'P','𝑸'=>'Q','𝑹'=>'R','𝑺'=>'S','𝑻'=>'T','𝑼'=>'U','𝑽'=>'V','𝑾'=>'W','𝑿'=>'X','𝒀'=>'Y','𝒁'=>'Z','𝒂'=>'a','𝒃'=>'b','𝒄'=>'c','𝒅'=>'d','𝒆'=>'e','𝒇'=>'f','𝒈'=>'g','𝒉'=>'h','𝒊'=>'i','𝒋'=>'j','𝒌'=>'k','𝒍'=>'l','𝒎'=>'m','𝒏'=>'n','𝒐'=>'o','𝒑'=>'p','𝒒'=>'q','𝒓'=>'r','𝒔'=>'s','𝒕'=>'t','𝒖'=>'u','𝒗'=>'v','𝒘'=>'w','𝒙'=>'x','𝒚'=>'y','𝒛'=>'z','𝒜'=>'A','𝒞'=>'C','𝒟'=>'D','𝒢'=>'G','𝒥'=>'J','𝒦'=>'K','𝒩'=>'N','𝒪'=>'O','𝒫'=>'P','𝒬'=>'Q','𝒮'=>'S','𝒯'=>'T','𝒰'=>'U','𝒱'=>'V','𝒲'=>'W','𝒳'=>'X','𝒴'=>'Y','𝒵'=>'Z','𝒶'=>'a','𝒷'=>'b','𝒸'=>'c','𝒹'=>'d','𝒻'=>'f','𝒽'=>'h','𝒾'=>'i','𝒿'=>'j','𝓀'=>'k','𝓁'=>'l','𝓂'=>'m','𝓃'=>'n','𝓅'=>'p','𝓆'=>'q','𝓇'=>'r','𝓈'=>'s','𝓉'=>'t','𝓊'=>'u','𝓋'=>'v','𝓌'=>'w','𝓍'=>'x','𝓎'=>'y','𝓏'=>'z','𝓐'=>'A','𝓑'=>'B','𝓒'=>'C','𝓓'=>'D','𝓔'=>'E','𝓕'=>'F','𝓖'=>'G','𝓗'=>'H','𝓘'=>'I','𝓙'=>'J','𝓚'=>'K','𝓛'=>'L','𝓜'=>'M','𝓝'=>'N','𝓞'=>'O','𝓟'=>'P','𝓠'=>'Q','𝓡'=>'R','𝓢'=>'S','𝓣'=>'T','𝓤'=>'U','𝓥'=>'V','𝓦'=>'W','𝓧'=>'X','𝓨'=>'Y','𝓩'=>'Z','𝓪'=>'a','𝓫'=>'b','𝓬'=>'c','𝓭'=>'d','𝓮'=>'e','𝓯'=>'f','𝓰'=>'g','𝓱'=>'h','𝓲'=>'i','𝓳'=>'j','𝓴'=>'k','𝓵'=>'l','𝓶'=>'m','𝓷'=>'n','𝓸'=>'o','𝓹'=>'p','𝓺'=>'q','𝓻'=>'r','𝓼'=>'s','𝓽'=>'t','𝓾'=>'u','𝓿'=>'v','𝔀'=>'w','𝔁'=>'x','𝔂'=>'y','𝔃'=>'z','𝔄'=>'A','𝔅'=>'B','𝔇'=>'D','𝔈'=>'E','𝔉'=>'F','𝔊'=>'G','𝔍'=>'J','𝔎'=>'K','𝔏'=>'L','𝔐'=>'M','𝔑'=>'N','𝔒'=>'O','𝔓'=>'P','𝔔'=>'Q','𝔖'=>'S','𝔗'=>'T','𝔘'=>'U','𝔙'=>'V','𝔚'=>'W','𝔛'=>'X','𝔜'=>'Y','𝔞'=>'a','𝔟'=>'b','𝔠'=>'c','𝔡'=>'d','𝔢'=>'e','𝔣'=>'f','𝔤'=>'g','𝔥'=>'h','𝔦'=>'i','𝔧'=>'j','𝔨'=>'k','𝔩'=>'l','𝔪'=>'m','𝔫'=>'n','𝔬'=>'o','𝔭'=>'p','𝔮'=>'q','𝔯'=>'r','𝔰'=>'s','𝔱'=>'t','𝔲'=>'u','𝔳'=>'v','𝔴'=>'w','𝔵'=>'x','𝔶'=>'y','𝔷'=>'z','𝔸'=>'A','𝔹'=>'B','𝔻'=>'D','𝔼'=>'E','𝔽'=>'F','𝔾'=>'G','𝕀'=>'I','𝕁'=>'J','𝕂'=>'K','𝕃'=>'L','𝕄'=>'M','𝕆'=>'O','𝕊'=>'S','𝕋'=>'T','𝕌'=>'U','𝕍'=>'V','𝕎'=>'W','𝕏'=>'X','𝕐'=>'Y','𝕒'=>'a','𝕓'=>'b','𝕔'=>'c','𝕕'=>'d','𝕖'=>'e','𝕗'=>'f','𝕘'=>'g','𝕙'=>'h','𝕚'=>'i','𝕛'=>'j','𝕜'=>'k','𝕝'=>'l','𝕞'=>'m','𝕟'=>'n','𝕠'=>'o','𝕡'=>'p','𝕢'=>'q','𝕣'=>'r','𝕤'=>'s','𝕥'=>'t','𝕦'=>'u','𝕧'=>'v','𝕨'=>'w','𝕩'=>'x','𝕪'=>'y','𝕫'=>'z','𝕬'=>'A','𝕭'=>'B','𝕮'=>'C','𝕯'=>'D','𝕰'=>'E','𝕱'=>'F','𝕲'=>'G','𝕳'=>'H','𝕴'=>'I','𝕵'=>'J','𝕶'=>'K','𝕷'=>'L','𝕸'=>'M','𝕹'=>'N','𝕺'=>'O','𝕻'=>'P','𝕼'=>'Q','𝕽'=>'R','𝕾'=>'S','𝕿'=>'T','𝖀'=>'U','𝖁'=>'V','𝖂'=>'W','𝖃'=>'X','𝖄'=>'Y','𝖅'=>'Z','𝖆'=>'a','𝖇'=>'b','𝖈'=>'c','𝖉'=>'d','𝖊'=>'e','𝖋'=>'f','𝖌'=>'g','𝖍'=>'h','𝖎'=>'i','𝖏'=>'j','𝖐'=>'k','𝖑'=>'l','𝖒'=>'m','𝖓'=>'n','𝖔'=>'o','𝖕'=>'p','𝖖'=>'q','𝖗'=>'r','𝖘'=>'s','𝖙'=>'t','𝖚'=>'u','𝖛'=>'v','𝖜'=>'w','𝖝'=>'x','𝖞'=>'y','𝖟'=>'z','𝖠'=>'A','𝖡'=>'B','𝖢'=>'C','𝖣'=>'D','𝖤'=>'E','𝖥'=>'F','𝖦'=>'G','𝖧'=>'H','𝖨'=>'I','𝖩'=>'J','𝖪'=>'K','𝖫'=>'L','𝖬'=>'M','𝖭'=>'N','𝖮'=>'O','𝖯'=>'P','𝖰'=>'Q','𝖱'=>'R','𝖲'=>'S','𝖳'=>'T','𝖴'=>'U','𝖵'=>'V','𝖶'=>'W','𝖷'=>'X','𝖸'=>'Y','𝖹'=>'Z','𝖺'=>'a','𝖻'=>'b','𝖼'=>'c','𝖽'=>'d','𝖾'=>'e','𝖿'=>'f','𝗀'=>'g','𝗁'=>'h','𝗂'=>'i','𝗃'=>'j','𝗄'=>'k','𝗅'=>'l','𝗆'=>'m','𝗇'=>'n','𝗈'=>'o','𝗉'=>'p','𝗊'=>'q','𝗋'=>'r','𝗌'=>'s','𝗍'=>'t','𝗎'=>'u','𝗏'=>'v','𝗐'=>'w','𝗑'=>'x','𝗒'=>'y','𝗓'=>'z','𝗔'=>'A','𝗕'=>'B','𝗖'=>'C','𝗗'=>'D','𝗘'=>'E','𝗙'=>'F','𝗚'=>'G','𝗛'=>'H','𝗜'=>'I','𝗝'=>'J','𝗞'=>'K','𝗟'=>'L','𝗠'=>'M','𝗡'=>'N','𝗢'=>'O','𝗣'=>'P','𝗤'=>'Q','𝗥'=>'R','𝗦'=>'S','𝗧'=>'T','𝗨'=>'U','𝗩'=>'V','𝗪'=>'W','𝗫'=>'X','𝗬'=>'Y','𝗭'=>'Z','𝗮'=>'a','𝗯'=>'b','𝗰'=>'c','𝗱'=>'d','𝗲'=>'e','𝗳'=>'f','𝗴'=>'g','𝗵'=>'h','𝗶'=>'i','𝗷'=>'j','𝗸'=>'k','𝗹'=>'l','𝗺'=>'m','𝗻'=>'n','𝗼'=>'o','𝗽'=>'p','𝗾'=>'q','𝗿'=>'r','𝘀'=>'s','𝘁'=>'t','𝘂'=>'u','𝘃'=>'v','𝘄'=>'w','𝘅'=>'x','𝘆'=>'y','𝘇'=>'z','𝘈'=>'A','𝘉'=>'B','𝘊'=>'C','𝘋'=>'D','𝘌'=>'E','𝘍'=>'F','𝘎'=>'G','𝘏'=>'H','𝘐'=>'I','𝘑'=>'J','𝘒'=>'K','𝘓'=>'L','𝘔'=>'M','𝘕'=>'N','𝘖'=>'O','𝘗'=>'P','𝘘'=>'Q','𝘙'=>'R','𝘚'=>'S','𝘛'=>'T','𝘜'=>'U','𝘝'=>'V','𝘞'=>'W','𝘟'=>'X','𝘠'=>'Y','𝘡'=>'Z','𝘢'=>'a','𝘣'=>'b','𝘤'=>'c','𝘥'=>'d','𝘦'=>'e','𝘧'=>'f','𝘨'=>'g','𝘩'=>'h','𝘪'=>'i','𝘫'=>'j','𝘬'=>'k','𝘭'=>'l','𝘮'=>'m','𝘯'=>'n','𝘰'=>'o','𝘱'=>'p','𝘲'=>'q','𝘳'=>'r','𝘴'=>'s','𝘵'=>'t','𝘶'=>'u','𝘷'=>'v','𝘸'=>'w','𝘹'=>'x','𝘺'=>'y','𝘻'=>'z','𝘼'=>'A','𝘽'=>'B','𝘾'=>'C','𝘿'=>'D','𝙀'=>'E','𝙁'=>'F','𝙂'=>'G','𝙃'=>'H','𝙄'=>'I','𝙅'=>'J','𝙆'=>'K','𝙇'=>'L','𝙈'=>'M','𝙉'=>'N','𝙊'=>'O','𝙋'=>'P','𝙌'=>'Q','𝙍'=>'R','𝙎'=>'S','𝙏'=>'T','𝙐'=>'U','𝙑'=>'V','𝙒'=>'W','𝙓'=>'X','𝙔'=>'Y','𝙕'=>'Z','𝙖'=>'a','𝙗'=>'b','𝙘'=>'c','𝙙'=>'d','𝙚'=>'e','𝙛'=>'f','𝙜'=>'g','𝙝'=>'h','𝙞'=>'i','𝙟'=>'j','𝙠'=>'k','𝙡'=>'l','𝙢'=>'m','𝙣'=>'n','𝙤'=>'o','𝙥'=>'p','𝙦'=>'q','𝙧'=>'r','𝙨'=>'s','𝙩'=>'t','𝙪'=>'u','𝙫'=>'v','𝙬'=>'w','𝙭'=>'x','𝙮'=>'y','𝙯'=>'z','𝙰'=>'A','𝙱'=>'B','𝙲'=>'C','𝙳'=>'D','𝙴'=>'E','𝙵'=>'F','𝙶'=>'G','𝙷'=>'H','𝙸'=>'I','𝙹'=>'J','𝙺'=>'K','𝙻'=>'L','𝙼'=>'M','𝙽'=>'N','𝙾'=>'O','𝙿'=>'P','𝚀'=>'Q','𝚁'=>'R','𝚂'=>'S','𝚃'=>'T','𝚄'=>'U','𝚅'=>'V','𝚆'=>'W','𝚇'=>'X','𝚈'=>'Y','𝚉'=>'Z','𝚊'=>'a','𝚋'=>'b','𝚌'=>'c','𝚍'=>'d','𝚎'=>'e','𝚏'=>'f','𝚐'=>'g','𝚑'=>'h','𝚒'=>'i','𝚓'=>'j','𝚔'=>'k','𝚕'=>'l','𝚖'=>'m','𝚗'=>'n','𝚘'=>'o','𝚙'=>'p','𝚚'=>'q','𝚛'=>'r','𝚜'=>'s','𝚝'=>'t','𝚞'=>'u','𝚟'=>'v','𝚠'=>'w','𝚡'=>'x','𝚢'=>'y','𝚣'=>'z','𝚤'=>'ı','𝚥'=>'ȷ','𝚨'=>'Α','𝚩'=>'Β','𝚪'=>'Γ','𝚫'=>'Δ','𝚬'=>'Ε','𝚭'=>'Ζ','𝚮'=>'Η','𝚯'=>'Θ','𝚰'=>'Ι','𝚱'=>'Κ','𝚲'=>'Λ','𝚳'=>'Μ','𝚴'=>'Ν','𝚵'=>'Ξ','𝚶'=>'Ο','𝚷'=>'Π','𝚸'=>'Ρ','𝚹'=>'Θ','𝚺'=>'Σ','𝚻'=>'Τ','𝚼'=>'Υ','𝚽'=>'Φ','𝚾'=>'Χ','𝚿'=>'Ψ','𝛀'=>'Ω','𝛁'=>'∇','𝛂'=>'α','𝛃'=>'β','𝛄'=>'γ','𝛅'=>'δ','𝛆'=>'ε','𝛇'=>'ζ','𝛈'=>'η','𝛉'=>'θ','𝛊'=>'ι','𝛋'=>'κ','𝛌'=>'λ','𝛍'=>'μ','𝛎'=>'ν','𝛏'=>'ξ','𝛐'=>'ο','𝛑'=>'π','𝛒'=>'ρ','𝛓'=>'ς','𝛔'=>'σ','𝛕'=>'τ','𝛖'=>'υ','𝛗'=>'φ','𝛘'=>'χ','𝛙'=>'ψ','𝛚'=>'ω','𝛛'=>'∂','𝛜'=>'ε','𝛝'=>'θ','𝛞'=>'κ','𝛟'=>'φ','𝛠'=>'ρ','𝛡'=>'π','𝛢'=>'Α','𝛣'=>'Β','𝛤'=>'Γ','𝛥'=>'Δ','𝛦'=>'Ε','𝛧'=>'Ζ','𝛨'=>'Η','𝛩'=>'Θ','𝛪'=>'Ι','𝛫'=>'Κ','𝛬'=>'Λ','𝛭'=>'Μ','𝛮'=>'Ν','𝛯'=>'Ξ','𝛰'=>'Ο','𝛱'=>'Π','𝛲'=>'Ρ','𝛳'=>'Θ','𝛴'=>'Σ','𝛵'=>'Τ','𝛶'=>'Υ','𝛷'=>'Φ','𝛸'=>'Χ','𝛹'=>'Ψ','𝛺'=>'Ω','𝛻'=>'∇','𝛼'=>'α','𝛽'=>'β','𝛾'=>'γ','𝛿'=>'δ','𝜀'=>'ε','𝜁'=>'ζ','𝜂'=>'η','𝜃'=>'θ','𝜄'=>'ι','𝜅'=>'κ','𝜆'=>'λ','𝜇'=>'μ','𝜈'=>'ν','𝜉'=>'ξ','𝜊'=>'ο','𝜋'=>'π','𝜌'=>'ρ','𝜍'=>'ς','𝜎'=>'σ','𝜏'=>'τ','𝜐'=>'υ','𝜑'=>'φ','𝜒'=>'χ','𝜓'=>'ψ','𝜔'=>'ω','𝜕'=>'∂','𝜖'=>'ε','𝜗'=>'θ','𝜘'=>'κ','𝜙'=>'φ','𝜚'=>'ρ','𝜛'=>'π','𝜜'=>'Α','𝜝'=>'Β','𝜞'=>'Γ','𝜟'=>'Δ','𝜠'=>'Ε','𝜡'=>'Ζ','𝜢'=>'Η','𝜣'=>'Θ','𝜤'=>'Ι','𝜥'=>'Κ','𝜦'=>'Λ','𝜧'=>'Μ','𝜨'=>'Ν','𝜩'=>'Ξ','𝜪'=>'Ο','𝜫'=>'Π','𝜬'=>'Ρ','𝜭'=>'Θ','𝜮'=>'Σ','𝜯'=>'Τ','𝜰'=>'Υ','𝜱'=>'Φ','𝜲'=>'Χ','𝜳'=>'Ψ','𝜴'=>'Ω','𝜵'=>'∇','𝜶'=>'α','𝜷'=>'β','𝜸'=>'γ','𝜹'=>'δ','𝜺'=>'ε','𝜻'=>'ζ','𝜼'=>'η','𝜽'=>'θ','𝜾'=>'ι','𝜿'=>'κ','𝝀'=>'λ','𝝁'=>'μ','𝝂'=>'ν','𝝃'=>'ξ','𝝄'=>'ο','𝝅'=>'π','𝝆'=>'ρ','𝝇'=>'ς','𝝈'=>'σ','𝝉'=>'τ','𝝊'=>'υ','𝝋'=>'φ','𝝌'=>'χ','𝝍'=>'ψ','𝝎'=>'ω','𝝏'=>'∂','𝝐'=>'ε','𝝑'=>'θ','𝝒'=>'κ','𝝓'=>'φ','𝝔'=>'ρ','𝝕'=>'π','𝝖'=>'Α','𝝗'=>'Β','𝝘'=>'Γ','𝝙'=>'Δ','𝝚'=>'Ε','𝝛'=>'Ζ','𝝜'=>'Η','𝝝'=>'Θ','𝝞'=>'Ι','𝝟'=>'Κ','𝝠'=>'Λ','𝝡'=>'Μ','𝝢'=>'Ν','𝝣'=>'Ξ','𝝤'=>'Ο','𝝥'=>'Π','𝝦'=>'Ρ','𝝧'=>'Θ','𝝨'=>'Σ','𝝩'=>'Τ','𝝪'=>'Υ','𝝫'=>'Φ','𝝬'=>'Χ','𝝭'=>'Ψ','𝝮'=>'Ω','𝝯'=>'∇','𝝰'=>'α','𝝱'=>'β','𝝲'=>'γ','𝝳'=>'δ','𝝴'=>'ε','𝝵'=>'ζ','𝝶'=>'η','𝝷'=>'θ','𝝸'=>'ι','𝝹'=>'κ','𝝺'=>'λ','𝝻'=>'μ','𝝼'=>'ν','𝝽'=>'ξ','𝝾'=>'ο','𝝿'=>'π','𝞀'=>'ρ','𝞁'=>'ς','𝞂'=>'σ','𝞃'=>'τ','𝞄'=>'υ','𝞅'=>'φ','𝞆'=>'χ','𝞇'=>'ψ','𝞈'=>'ω','𝞉'=>'∂','𝞊'=>'ε','𝞋'=>'θ','𝞌'=>'κ','𝞍'=>'φ','𝞎'=>'ρ','𝞏'=>'π','𝞐'=>'Α','𝞑'=>'Β','𝞒'=>'Γ','𝞓'=>'Δ','𝞔'=>'Ε','𝞕'=>'Ζ','𝞖'=>'Η','𝞗'=>'Θ','𝞘'=>'Ι','𝞙'=>'Κ','𝞚'=>'Λ','𝞛'=>'Μ','𝞜'=>'Ν','𝞝'=>'Ξ','𝞞'=>'Ο','𝞟'=>'Π','𝞠'=>'Ρ','𝞡'=>'Θ','𝞢'=>'Σ','𝞣'=>'Τ','𝞤'=>'Υ','𝞥'=>'Φ','𝞦'=>'Χ','𝞧'=>'Ψ','𝞨'=>'Ω','𝞩'=>'∇','𝞪'=>'α','𝞫'=>'β','𝞬'=>'γ','𝞭'=>'δ','𝞮'=>'ε','𝞯'=>'ζ','𝞰'=>'η','𝞱'=>'θ','𝞲'=>'ι','𝞳'=>'κ','𝞴'=>'λ','𝞵'=>'μ','𝞶'=>'ν','𝞷'=>'ξ','𝞸'=>'ο','𝞹'=>'π','𝞺'=>'ρ','𝞻'=>'ς','𝞼'=>'σ','𝞽'=>'τ','𝞾'=>'υ','𝞿'=>'φ','𝟀'=>'χ','𝟁'=>'ψ','𝟂'=>'ω','𝟃'=>'∂','𝟄'=>'ε','𝟅'=>'θ','𝟆'=>'κ','𝟇'=>'φ','𝟈'=>'ρ','𝟉'=>'π','𝟊'=>'Ϝ','𝟋'=>'ϝ','𝟎'=>'0','𝟏'=>'1','𝟐'=>'2','𝟑'=>'3','𝟒'=>'4','𝟓'=>'5','𝟔'=>'6','𝟕'=>'7','𝟖'=>'8','𝟗'=>'9','𝟘'=>'0','𝟙'=>'1','𝟚'=>'2','𝟛'=>'3','𝟜'=>'4','𝟝'=>'5','𝟞'=>'6','𝟟'=>'7','𝟠'=>'8','𝟡'=>'9','𝟢'=>'0','𝟣'=>'1','𝟤'=>'2','𝟥'=>'3','𝟦'=>'4','𝟧'=>'5','𝟨'=>'6','𝟩'=>'7','𝟪'=>'8','𝟫'=>'9','𝟬'=>'0','𝟭'=>'1','𝟮'=>'2','𝟯'=>'3','𝟰'=>'4','𝟱'=>'5','𝟲'=>'6','𝟳'=>'7','𝟴'=>'8','𝟵'=>'9','𝟶'=>'0','𝟷'=>'1','𝟸'=>'2','𝟹'=>'3','𝟺'=>'4','𝟻'=>'5','𝟼'=>'6','𝟽'=>'7','𝟾'=>'8','𝟿'=>'9','丽'=>'丽','丸'=>'丸','乁'=>'乁','𠄢'=>'𠄢','你'=>'你','侮'=>'侮','侻'=>'侻','倂'=>'倂','偺'=>'偺','備'=>'備','僧'=>'僧','像'=>'像','㒞'=>'㒞','𠘺'=>'𠘺','免'=>'免','兔'=>'兔','兤'=>'兤','具'=>'具','𠔜'=>'𠔜','㒹'=>'㒹','內'=>'內','再'=>'再','𠕋'=>'𠕋','冗'=>'冗','冤'=>'冤','仌'=>'仌','冬'=>'冬','况'=>'况','𩇟'=>'𩇟','凵'=>'凵','刃'=>'刃','㓟'=>'㓟','刻'=>'刻','剆'=>'剆','割'=>'割','剷'=>'剷','㔕'=>'㔕','勇'=>'勇','勉'=>'勉','勤'=>'勤','勺'=>'勺','包'=>'包','匆'=>'匆','北'=>'北','卉'=>'卉','卑'=>'卑','博'=>'博','即'=>'即','卽'=>'卽','卿'=>'卿','卿'=>'卿','卿'=>'卿','𠨬'=>'𠨬','灰'=>'灰','及'=>'及','叟'=>'叟','𠭣'=>'𠭣','叫'=>'叫','叱'=>'叱','吆'=>'吆','咞'=>'咞','吸'=>'吸','呈'=>'呈','周'=>'周','咢'=>'咢','哶'=>'哶','唐'=>'唐','啓'=>'啓','啣'=>'啣','善'=>'善','善'=>'善','喙'=>'喙','喫'=>'喫','喳'=>'喳','嗂'=>'嗂','圖'=>'圖','嘆'=>'嘆','圗'=>'圗','噑'=>'噑','噴'=>'噴','切'=>'切','壮'=>'壮','城'=>'城','埴'=>'埴','堍'=>'堍','型'=>'型','堲'=>'堲','報'=>'報','墬'=>'墬','𡓤'=>'𡓤','売'=>'売','壷'=>'壷','夆'=>'夆','多'=>'多','夢'=>'夢','奢'=>'奢','𡚨'=>'𡚨','𡛪'=>'𡛪','姬'=>'姬','娛'=>'娛','娧'=>'娧','姘'=>'姘','婦'=>'婦','㛮'=>'㛮','㛼'=>'㛼','嬈'=>'嬈','嬾'=>'嬾','嬾'=>'嬾','𡧈'=>'𡧈','寃'=>'寃','寘'=>'寘','寧'=>'寧','寳'=>'寳','𡬘'=>'𡬘','寿'=>'寿','将'=>'将','当'=>'当','尢'=>'尢','㞁'=>'㞁','屠'=>'屠','屮'=>'屮','峀'=>'峀','岍'=>'岍','𡷤'=>'𡷤','嵃'=>'嵃','𡷦'=>'𡷦','嵮'=>'嵮','嵫'=>'嵫','嵼'=>'嵼','巡'=>'巡','巢'=>'巢','㠯'=>'㠯','巽'=>'巽','帨'=>'帨','帽'=>'帽','幩'=>'幩','㡢'=>'㡢','𢆃'=>'𢆃','㡼'=>'㡼','庰'=>'庰','庳'=>'庳','庶'=>'庶','廊'=>'廊','𪎒'=>'𪎒','廾'=>'廾','𢌱'=>'𢌱','𢌱'=>'𢌱','舁'=>'舁','弢'=>'弢','弢'=>'弢','㣇'=>'㣇','𣊸'=>'𣊸','𦇚'=>'𦇚','形'=>'形','彫'=>'彫','㣣'=>'㣣','徚'=>'徚','忍'=>'忍','志'=>'志','忹'=>'忹','悁'=>'悁','㤺'=>'㤺','㤜'=>'㤜','悔'=>'悔','𢛔'=>'𢛔','惇'=>'惇','慈'=>'慈','慌'=>'慌','慎'=>'慎','慌'=>'慌','慺'=>'慺','憎'=>'憎','憲'=>'憲','憤'=>'憤','憯'=>'憯','懞'=>'懞','懲'=>'懲','懶'=>'懶','成'=>'成','戛'=>'戛','扝'=>'扝','抱'=>'抱','拔'=>'拔','捐'=>'捐','𢬌'=>'𢬌','挽'=>'挽','拼'=>'拼','捨'=>'捨','掃'=>'掃','揤'=>'揤','𢯱'=>'𢯱','搢'=>'搢','揅'=>'揅','掩'=>'掩','㨮'=>'㨮','摩'=>'摩','摾'=>'摾','撝'=>'撝','摷'=>'摷','㩬'=>'㩬','敏'=>'敏','敬'=>'敬','𣀊'=>'𣀊','旣'=>'旣','書'=>'書','晉'=>'晉','㬙'=>'㬙','暑'=>'暑','㬈'=>'㬈','㫤'=>'㫤','冒'=>'冒','冕'=>'冕','最'=>'最','暜'=>'暜','肭'=>'肭','䏙'=>'䏙','朗'=>'朗','望'=>'望','朡'=>'朡','杞'=>'杞','杓'=>'杓','𣏃'=>'𣏃','㭉'=>'㭉','柺'=>'柺','枅'=>'枅','桒'=>'桒','梅'=>'梅','𣑭'=>'𣑭','梎'=>'梎','栟'=>'栟','椔'=>'椔','㮝'=>'㮝','楂'=>'楂','榣'=>'榣','槪'=>'槪','檨'=>'檨','𣚣'=>'𣚣','櫛'=>'櫛','㰘'=>'㰘','次'=>'次','𣢧'=>'𣢧','歔'=>'歔','㱎'=>'㱎','歲'=>'歲','殟'=>'殟','殺'=>'殺','殻'=>'殻','𣪍'=>'𣪍','𡴋'=>'𡴋','𣫺'=>'𣫺','汎'=>'汎','𣲼'=>'𣲼','沿'=>'沿','泍'=>'泍','汧'=>'汧','洖'=>'洖','派'=>'派','海'=>'海','流'=>'流','浩'=>'浩','浸'=>'浸','涅'=>'涅','𣴞'=>'𣴞','洴'=>'洴','港'=>'港','湮'=>'湮','㴳'=>'㴳','滋'=>'滋','滇'=>'滇','𣻑'=>'𣻑','淹'=>'淹','潮'=>'潮','𣽞'=>'𣽞','𣾎'=>'𣾎','濆'=>'濆','瀹'=>'瀹','瀞'=>'瀞','瀛'=>'瀛','㶖'=>'㶖','灊'=>'灊','災'=>'災','灷'=>'灷','炭'=>'炭','𠔥'=>'𠔥','煅'=>'煅','𤉣'=>'𤉣','熜'=>'熜','𤎫'=>'𤎫','爨'=>'爨','爵'=>'爵','牐'=>'牐','𤘈'=>'𤘈','犀'=>'犀','犕'=>'犕','𤜵'=>'𤜵','𤠔'=>'𤠔','獺'=>'獺','王'=>'王','㺬'=>'㺬','玥'=>'玥','㺸'=>'㺸','㺸'=>'㺸','瑇'=>'瑇','瑜'=>'瑜','瑱'=>'瑱','璅'=>'璅','瓊'=>'瓊','㼛'=>'㼛','甤'=>'甤','𤰶'=>'𤰶','甾'=>'甾','𤲒'=>'𤲒','異'=>'異','𢆟'=>'𢆟','瘐'=>'瘐','𤾡'=>'𤾡','𤾸'=>'𤾸','𥁄'=>'𥁄','㿼'=>'㿼','䀈'=>'䀈','直'=>'直','𥃳'=>'𥃳','𥃲'=>'𥃲','𥄙'=>'𥄙','𥄳'=>'𥄳','眞'=>'眞','真'=>'真','真'=>'真','睊'=>'睊','䀹'=>'䀹','瞋'=>'瞋','䁆'=>'䁆','䂖'=>'䂖','𥐝'=>'𥐝','硎'=>'硎','碌'=>'碌','磌'=>'磌','䃣'=>'䃣','𥘦'=>'𥘦','祖'=>'祖','𥚚'=>'𥚚','𥛅'=>'𥛅','福'=>'福','秫'=>'秫','䄯'=>'䄯','穀'=>'穀','穊'=>'穊','穏'=>'穏','𥥼'=>'𥥼','𥪧'=>'𥪧','𥪧'=>'𥪧','竮'=>'竮','䈂'=>'䈂','𥮫'=>'𥮫','篆'=>'篆','築'=>'築','䈧'=>'䈧','𥲀'=>'𥲀','糒'=>'糒','䊠'=>'䊠','糨'=>'糨','糣'=>'糣','紀'=>'紀','𥾆'=>'𥾆','絣'=>'絣','䌁'=>'䌁','緇'=>'緇','縂'=>'縂','繅'=>'繅','䌴'=>'䌴','𦈨'=>'𦈨','𦉇'=>'𦉇','䍙'=>'䍙','𦋙'=>'𦋙','罺'=>'罺','𦌾'=>'𦌾','羕'=>'羕','翺'=>'翺','者'=>'者','𦓚'=>'𦓚','𦔣'=>'𦔣','聠'=>'聠','𦖨'=>'𦖨','聰'=>'聰','𣍟'=>'𣍟','䏕'=>'䏕','育'=>'育','脃'=>'脃','䐋'=>'䐋','脾'=>'脾','媵'=>'媵','𦞧'=>'𦞧','𦞵'=>'𦞵','𣎓'=>'𣎓','𣎜'=>'𣎜','舁'=>'舁','舄'=>'舄','辞'=>'辞','䑫'=>'䑫','芑'=>'芑','芋'=>'芋','芝'=>'芝','劳'=>'劳','花'=>'花','芳'=>'芳','芽'=>'芽','苦'=>'苦','𦬼'=>'𦬼','若'=>'若','茝'=>'茝','荣'=>'荣','莭'=>'莭','茣'=>'茣','莽'=>'莽','菧'=>'菧','著'=>'著','荓'=>'荓','菊'=>'菊','菌'=>'菌','菜'=>'菜','𦰶'=>'𦰶','𦵫'=>'𦵫','𦳕'=>'𦳕','䔫'=>'䔫','蓱'=>'蓱','蓳'=>'蓳','蔖'=>'蔖','𧏊'=>'𧏊','蕤'=>'蕤','𦼬'=>'𦼬','䕝'=>'䕝','䕡'=>'䕡','𦾱'=>'𦾱','𧃒'=>'𧃒','䕫'=>'䕫','虐'=>'虐','虜'=>'虜','虧'=>'虧','虩'=>'虩','蚩'=>'蚩','蚈'=>'蚈','蜎'=>'蜎','蛢'=>'蛢','蝹'=>'蝹','蜨'=>'蜨','蝫'=>'蝫','螆'=>'螆','䗗'=>'䗗','蟡'=>'蟡','蠁'=>'蠁','䗹'=>'䗹','衠'=>'衠','衣'=>'衣','𧙧'=>'𧙧','裗'=>'裗','裞'=>'裞','䘵'=>'䘵','裺'=>'裺','㒻'=>'㒻','𧢮'=>'𧢮','𧥦'=>'𧥦','䚾'=>'䚾','䛇'=>'䛇','誠'=>'誠','諭'=>'諭','變'=>'變','豕'=>'豕','𧲨'=>'𧲨','貫'=>'貫','賁'=>'賁','贛'=>'贛','起'=>'起','𧼯'=>'𧼯','𠠄'=>'𠠄','跋'=>'跋','趼'=>'趼','跰'=>'跰','𠣞'=>'𠣞','軔'=>'軔','輸'=>'輸','𨗒'=>'𨗒','𨗭'=>'𨗭','邔'=>'邔','郱'=>'郱','鄑'=>'鄑','𨜮'=>'𨜮','鄛'=>'鄛','鈸'=>'鈸','鋗'=>'鋗','鋘'=>'鋘','鉼'=>'鉼','鏹'=>'鏹','鐕'=>'鐕','𨯺'=>'𨯺','開'=>'開','䦕'=>'䦕','閷'=>'閷','𨵷'=>'𨵷','䧦'=>'䧦','雃'=>'雃','嶲'=>'嶲','霣'=>'霣','𩅅'=>'𩅅','𩈚'=>'𩈚','䩮'=>'䩮','䩶'=>'䩶','韠'=>'韠','𩐊'=>'𩐊','䪲'=>'䪲','𩒖'=>'𩒖','頋'=>'頋','頋'=>'頋','頩'=>'頩','𩖶'=>'𩖶','飢'=>'飢','䬳'=>'䬳','餩'=>'餩','馧'=>'馧','駂'=>'駂','駾'=>'駾','䯎'=>'䯎','𩬰'=>'𩬰','鬒'=>'鬒','鱀'=>'鱀','鳽'=>'鳽','䳎'=>'䳎','䳭'=>'䳭','鵧'=>'鵧','𪃎'=>'𪃎','䳸'=>'䳸','𪄅'=>'𪄅','𪈎'=>'𪈎','𪊑'=>'𪊑','麻'=>'麻','䵖'=>'䵖','黹'=>'黹','黾'=>'黾','鼅'=>'鼅','鼏'=>'鼏','鼖'=>'鼖','鼻'=>'鼻','𪘀'=>'𪘀'); \ No newline at end of file
+$GLOBALS['utf_compatibility_decomp']=array(' '=>' ','¨'=>' ̈','ª'=>'a','¯'=>' ̄','²'=>'2','³'=>'3','´'=>' ́','µ'=>'μ','¸'=>' ̧','¹'=>'1','º'=>'o','¼'=>'1⁄4','½'=>'1⁄2','¾'=>'3⁄4','À'=>'À','Á'=>'Á','Â'=>'Â','Ã'=>'Ã','Ä'=>'Ä','Å'=>'Å','Ç'=>'Ç','È'=>'È','É'=>'É','Ê'=>'Ê','Ë'=>'Ë','Ì'=>'Ì','Í'=>'Í','Î'=>'Î','Ï'=>'Ï','Ñ'=>'Ñ','Ò'=>'Ò','Ó'=>'Ó','Ô'=>'Ô','Õ'=>'Õ','Ö'=>'Ö','Ù'=>'Ù','Ú'=>'Ú','Û'=>'Û','Ü'=>'Ü','Ý'=>'Ý','à'=>'à','á'=>'á','â'=>'â','ã'=>'ã','ä'=>'ä','å'=>'å','ç'=>'ç','è'=>'è','é'=>'é','ê'=>'ê','ë'=>'ë','ì'=>'ì','í'=>'í','î'=>'î','ï'=>'ï','ñ'=>'ñ','ò'=>'ò','ó'=>'ó','ô'=>'ô','õ'=>'õ','ö'=>'ö','ù'=>'ù','ú'=>'ú','û'=>'û','ü'=>'ü','ý'=>'ý','ÿ'=>'ÿ','Ā'=>'Ā','ā'=>'ā','Ă'=>'Ă','ă'=>'ă','Ą'=>'Ą','ą'=>'ą','Ć'=>'Ć','ć'=>'ć','Ĉ'=>'Ĉ','ĉ'=>'ĉ','Ċ'=>'Ċ','ċ'=>'ċ','Č'=>'Č','č'=>'č','Ď'=>'Ď','ď'=>'ď','Ē'=>'Ē','ē'=>'ē','Ĕ'=>'Ĕ','ĕ'=>'ĕ','Ė'=>'Ė','ė'=>'ė','Ę'=>'Ę','ę'=>'ę','Ě'=>'Ě','ě'=>'ě','Ĝ'=>'Ĝ','ĝ'=>'ĝ','Ğ'=>'Ğ','ğ'=>'ğ','Ġ'=>'Ġ','ġ'=>'ġ','Ģ'=>'Ģ','ģ'=>'ģ','Ĥ'=>'Ĥ','ĥ'=>'ĥ','Ĩ'=>'Ĩ','ĩ'=>'ĩ','Ī'=>'Ī','ī'=>'ī','Ĭ'=>'Ĭ','ĭ'=>'ĭ','Į'=>'Į','į'=>'į','İ'=>'İ','IJ'=>'IJ','ij'=>'ij','Ĵ'=>'Ĵ','ĵ'=>'ĵ','Ķ'=>'Ķ','ķ'=>'ķ','Ĺ'=>'Ĺ','ĺ'=>'ĺ','Ļ'=>'Ļ','ļ'=>'ļ','Ľ'=>'Ľ','ľ'=>'ľ','Ŀ'=>'L·','ŀ'=>'l·','Ń'=>'Ń','ń'=>'ń','Ņ'=>'Ņ','ņ'=>'ņ','Ň'=>'Ň','ň'=>'ň','ʼn'=>'ʼn','Ō'=>'Ō','ō'=>'ō','Ŏ'=>'Ŏ','ŏ'=>'ŏ','Ő'=>'Ő','ő'=>'ő','Ŕ'=>'Ŕ','ŕ'=>'ŕ','Ŗ'=>'Ŗ','ŗ'=>'ŗ','Ř'=>'Ř','ř'=>'ř','Ś'=>'Ś','ś'=>'ś','Ŝ'=>'Ŝ','ŝ'=>'ŝ','Ş'=>'Ş','ş'=>'ş','Š'=>'Š','š'=>'š','Ţ'=>'Ţ','ţ'=>'ţ','Ť'=>'Ť','ť'=>'ť','Ũ'=>'Ũ','ũ'=>'ũ','Ū'=>'Ū','ū'=>'ū','Ŭ'=>'Ŭ','ŭ'=>'ŭ','Ů'=>'Ů','ů'=>'ů','Ű'=>'Ű','ű'=>'ű','Ų'=>'Ų','ų'=>'ų','Ŵ'=>'Ŵ','ŵ'=>'ŵ','Ŷ'=>'Ŷ','ŷ'=>'ŷ','Ÿ'=>'Ÿ','Ź'=>'Ź','ź'=>'ź','Ż'=>'Ż','ż'=>'ż','Ž'=>'Ž','ž'=>'ž','ſ'=>'s','Ơ'=>'Ơ','ơ'=>'ơ','Ư'=>'Ư','ư'=>'ư','DŽ'=>'DŽ','Dž'=>'Dž','dž'=>'dž','LJ'=>'LJ','Lj'=>'Lj','lj'=>'lj','NJ'=>'NJ','Nj'=>'Nj','nj'=>'nj','Ǎ'=>'Ǎ','ǎ'=>'ǎ','Ǐ'=>'Ǐ','ǐ'=>'ǐ','Ǒ'=>'Ǒ','ǒ'=>'ǒ','Ǔ'=>'Ǔ','ǔ'=>'ǔ','Ǖ'=>'Ǖ','ǖ'=>'ǖ','Ǘ'=>'Ǘ','ǘ'=>'ǘ','Ǚ'=>'Ǚ','ǚ'=>'ǚ','Ǜ'=>'Ǜ','ǜ'=>'ǜ','Ǟ'=>'Ǟ','ǟ'=>'ǟ','Ǡ'=>'Ǡ','ǡ'=>'ǡ','Ǣ'=>'Ǣ','ǣ'=>'ǣ','Ǧ'=>'Ǧ','ǧ'=>'ǧ','Ǩ'=>'Ǩ','ǩ'=>'ǩ','Ǫ'=>'Ǫ','ǫ'=>'ǫ','Ǭ'=>'Ǭ','ǭ'=>'ǭ','Ǯ'=>'Ǯ','ǯ'=>'ǯ','ǰ'=>'ǰ','DZ'=>'DZ','Dz'=>'Dz','dz'=>'dz','Ǵ'=>'Ǵ','ǵ'=>'ǵ','Ǹ'=>'Ǹ','ǹ'=>'ǹ','Ǻ'=>'Ǻ','ǻ'=>'ǻ','Ǽ'=>'Ǽ','ǽ'=>'ǽ','Ǿ'=>'Ǿ','ǿ'=>'ǿ','Ȁ'=>'Ȁ','ȁ'=>'ȁ','Ȃ'=>'Ȃ','ȃ'=>'ȃ','Ȅ'=>'Ȅ','ȅ'=>'ȅ','Ȇ'=>'Ȇ','ȇ'=>'ȇ','Ȉ'=>'Ȉ','ȉ'=>'ȉ','Ȋ'=>'Ȋ','ȋ'=>'ȋ','Ȍ'=>'Ȍ','ȍ'=>'ȍ','Ȏ'=>'Ȏ','ȏ'=>'ȏ','Ȑ'=>'Ȑ','ȑ'=>'ȑ','Ȓ'=>'Ȓ','ȓ'=>'ȓ','Ȕ'=>'Ȕ','ȕ'=>'ȕ','Ȗ'=>'Ȗ','ȗ'=>'ȗ','Ș'=>'Ș','ș'=>'ș','Ț'=>'Ț','ț'=>'ț','Ȟ'=>'Ȟ','ȟ'=>'ȟ','Ȧ'=>'Ȧ','ȧ'=>'ȧ','Ȩ'=>'Ȩ','ȩ'=>'ȩ','Ȫ'=>'Ȫ','ȫ'=>'ȫ','Ȭ'=>'Ȭ','ȭ'=>'ȭ','Ȯ'=>'Ȯ','ȯ'=>'ȯ','Ȱ'=>'Ȱ','ȱ'=>'ȱ','Ȳ'=>'Ȳ','ȳ'=>'ȳ','ʰ'=>'h','ʱ'=>'ɦ','ʲ'=>'j','ʳ'=>'r','ʴ'=>'ɹ','ʵ'=>'ɻ','ʶ'=>'ʁ','ʷ'=>'w','ʸ'=>'y','˘'=>' ̆','˙'=>' ̇','˚'=>' ̊','˛'=>' ̨','˜'=>' ̃','˝'=>' ̋','ˠ'=>'ɣ','ˡ'=>'l','ˢ'=>'s','ˣ'=>'x','ˤ'=>'ʕ','̀'=>'̀','́'=>'́','̓'=>'̓','̈́'=>'̈́','ʹ'=>'ʹ','ͺ'=>' ͅ',';'=>';','΄'=>' ́','΅'=>' ̈́','Ά'=>'Ά','·'=>'·','Έ'=>'Έ','Ή'=>'Ή','Ί'=>'Ί','Ό'=>'Ό','Ύ'=>'Ύ','Ώ'=>'Ώ','ΐ'=>'ΐ','Ϊ'=>'Ϊ','Ϋ'=>'Ϋ','ά'=>'ά','έ'=>'έ','ή'=>'ή','ί'=>'ί','ΰ'=>'ΰ','ϊ'=>'ϊ','ϋ'=>'ϋ','ό'=>'ό','ύ'=>'ύ','ώ'=>'ώ','ϐ'=>'β','ϑ'=>'θ','ϒ'=>'Υ','ϓ'=>'Ύ','ϔ'=>'Ϋ','ϕ'=>'φ','ϖ'=>'π','ϰ'=>'κ','ϱ'=>'ρ','ϲ'=>'ς','ϴ'=>'Θ','ϵ'=>'ε','Ϲ'=>'Σ','Ѐ'=>'Ѐ','Ё'=>'Ё','Ѓ'=>'Ѓ','Ї'=>'Ї','Ќ'=>'Ќ','Ѝ'=>'Ѝ','Ў'=>'Ў','Й'=>'Й','й'=>'й','ѐ'=>'ѐ','ё'=>'ё','ѓ'=>'ѓ','ї'=>'ї','ќ'=>'ќ','ѝ'=>'ѝ','ў'=>'ў','Ѷ'=>'Ѷ','ѷ'=>'ѷ','Ӂ'=>'Ӂ','ӂ'=>'ӂ','Ӑ'=>'Ӑ','ӑ'=>'ӑ','Ӓ'=>'Ӓ','ӓ'=>'ӓ','Ӗ'=>'Ӗ','ӗ'=>'ӗ','Ӛ'=>'Ӛ','ӛ'=>'ӛ','Ӝ'=>'Ӝ','ӝ'=>'ӝ','Ӟ'=>'Ӟ','ӟ'=>'ӟ','Ӣ'=>'Ӣ','ӣ'=>'ӣ','Ӥ'=>'Ӥ','ӥ'=>'ӥ','Ӧ'=>'Ӧ','ӧ'=>'ӧ','Ӫ'=>'Ӫ','ӫ'=>'ӫ','Ӭ'=>'Ӭ','ӭ'=>'ӭ','Ӯ'=>'Ӯ','ӯ'=>'ӯ','Ӱ'=>'Ӱ','ӱ'=>'ӱ','Ӳ'=>'Ӳ','ӳ'=>'ӳ','Ӵ'=>'Ӵ','ӵ'=>'ӵ','Ӹ'=>'Ӹ','ӹ'=>'ӹ','և'=>'եւ','آ'=>'آ','أ'=>'أ','ؤ'=>'ؤ','إ'=>'إ','ئ'=>'ئ','ٵ'=>'اٴ','ٶ'=>'وٴ','ٷ'=>'ۇٴ','ٸ'=>'يٴ','ۀ'=>'ۀ','ۂ'=>'ۂ','ۓ'=>'ۓ','ऩ'=>'ऩ','ऱ'=>'ऱ','ऴ'=>'ऴ','क़'=>'क़','ख़'=>'ख़','ग़'=>'ग़','ज़'=>'ज़','ड़'=>'ड़','ढ़'=>'ढ़','फ़'=>'फ़','य़'=>'य़','ো'=>'ো','ৌ'=>'ৌ','ড়'=>'ড়','ঢ়'=>'ঢ়','য়'=>'য়','ਲ਼'=>'ਲ਼','ਸ਼'=>'ਸ਼','ਖ਼'=>'ਖ਼','ਗ਼'=>'ਗ਼','ਜ਼'=>'ਜ਼','ਫ਼'=>'ਫ਼','ୈ'=>'ୈ','ୋ'=>'ୋ','ୌ'=>'ୌ','ଡ଼'=>'ଡ଼','ଢ଼'=>'ଢ଼','ஔ'=>'ஔ','ொ'=>'ொ','ோ'=>'ோ','ௌ'=>'ௌ','ై'=>'ై','ೀ'=>'ೀ','ೇ'=>'ೇ','ೈ'=>'ೈ','ೊ'=>'ೊ','ೋ'=>'ೋ','ൊ'=>'ൊ','ോ'=>'ോ','ൌ'=>'ൌ','ේ'=>'ේ','ො'=>'ො','ෝ'=>'ෝ','ෞ'=>'ෞ','ำ'=>'ํา','ຳ'=>'ໍາ','ໜ'=>'ຫນ','ໝ'=>'ຫມ','༌'=>'་','གྷ'=>'གྷ','ཌྷ'=>'ཌྷ','དྷ'=>'དྷ','བྷ'=>'བྷ','ཛྷ'=>'ཛྷ','ཀྵ'=>'ཀྵ','ཱི'=>'ཱི','ཱུ'=>'ཱུ','ྲྀ'=>'ྲྀ','ཷ'=>'ྲཱྀ','ླྀ'=>'ླྀ','ཹ'=>'ླཱྀ','ཱྀ'=>'ཱྀ','ྒྷ'=>'ྒྷ','ྜྷ'=>'ྜྷ','ྡྷ'=>'ྡྷ','ྦྷ'=>'ྦྷ','ྫྷ'=>'ྫྷ','ྐྵ'=>'ྐྵ','ဦ'=>'ဦ','ჼ'=>'ნ','ᬆ'=>'ᬆ','ᬈ'=>'ᬈ','ᬊ'=>'ᬊ','ᬌ'=>'ᬌ','ᬎ'=>'ᬎ','ᬒ'=>'ᬒ','ᬻ'=>'ᬻ','ᬽ'=>'ᬽ','ᭀ'=>'ᭀ','ᭁ'=>'ᭁ','ᭃ'=>'ᭃ','ᴬ'=>'A','ᴭ'=>'Æ','ᴮ'=>'B','ᴰ'=>'D','ᴱ'=>'E','ᴲ'=>'Ǝ','ᴳ'=>'G','ᴴ'=>'H','ᴵ'=>'I','ᴶ'=>'J','ᴷ'=>'K','ᴸ'=>'L','ᴹ'=>'M','ᴺ'=>'N','ᴼ'=>'O','ᴽ'=>'Ȣ','ᴾ'=>'P','ᴿ'=>'R','ᵀ'=>'T','ᵁ'=>'U','ᵂ'=>'W','ᵃ'=>'a','ᵄ'=>'ɐ','ᵅ'=>'ɑ','ᵆ'=>'ᴂ','ᵇ'=>'b','ᵈ'=>'d','ᵉ'=>'e','ᵊ'=>'ə','ᵋ'=>'ɛ','ᵌ'=>'ɜ','ᵍ'=>'g','ᵏ'=>'k','ᵐ'=>'m','ᵑ'=>'ŋ','ᵒ'=>'o','ᵓ'=>'ɔ','ᵔ'=>'ᴖ','ᵕ'=>'ᴗ','ᵖ'=>'p','ᵗ'=>'t','ᵘ'=>'u','ᵙ'=>'ᴝ','ᵚ'=>'ɯ','ᵛ'=>'v','ᵜ'=>'ᴥ','ᵝ'=>'β','ᵞ'=>'γ','ᵟ'=>'δ','ᵠ'=>'φ','ᵡ'=>'χ','ᵢ'=>'i','ᵣ'=>'r','ᵤ'=>'u','ᵥ'=>'v','ᵦ'=>'β','ᵧ'=>'γ','ᵨ'=>'ρ','ᵩ'=>'φ','ᵪ'=>'χ','ᵸ'=>'н','ᶛ'=>'ɒ','ᶜ'=>'c','ᶝ'=>'ɕ','ᶞ'=>'ð','ᶟ'=>'ɜ','ᶠ'=>'f','ᶡ'=>'ɟ','ᶢ'=>'ɡ','ᶣ'=>'ɥ','ᶤ'=>'ɨ','ᶥ'=>'ɩ','ᶦ'=>'ɪ','ᶧ'=>'ᵻ','ᶨ'=>'ʝ','ᶩ'=>'ɭ','ᶪ'=>'ᶅ','ᶫ'=>'ʟ','ᶬ'=>'ɱ','ᶭ'=>'ɰ','ᶮ'=>'ɲ','ᶯ'=>'ɳ','ᶰ'=>'ɴ','ᶱ'=>'ɵ','ᶲ'=>'ɸ','ᶳ'=>'ʂ','ᶴ'=>'ʃ','ᶵ'=>'ƫ','ᶶ'=>'ʉ','ᶷ'=>'ʊ','ᶸ'=>'ᴜ','ᶹ'=>'ʋ','ᶺ'=>'ʌ','ᶻ'=>'z','ᶼ'=>'ʐ','ᶽ'=>'ʑ','ᶾ'=>'ʒ','ᶿ'=>'θ','Ḁ'=>'Ḁ','ḁ'=>'ḁ','Ḃ'=>'Ḃ','ḃ'=>'ḃ','Ḅ'=>'Ḅ','ḅ'=>'ḅ','Ḇ'=>'Ḇ','ḇ'=>'ḇ','Ḉ'=>'Ḉ','ḉ'=>'ḉ','Ḋ'=>'Ḋ','ḋ'=>'ḋ','Ḍ'=>'Ḍ','ḍ'=>'ḍ','Ḏ'=>'Ḏ','ḏ'=>'ḏ','Ḑ'=>'Ḑ','ḑ'=>'ḑ','Ḓ'=>'Ḓ','ḓ'=>'ḓ','Ḕ'=>'Ḕ','ḕ'=>'ḕ','Ḗ'=>'Ḗ','ḗ'=>'ḗ','Ḙ'=>'Ḙ','ḙ'=>'ḙ','Ḛ'=>'Ḛ','ḛ'=>'ḛ','Ḝ'=>'Ḝ','ḝ'=>'ḝ','Ḟ'=>'Ḟ','ḟ'=>'ḟ','Ḡ'=>'Ḡ','ḡ'=>'ḡ','Ḣ'=>'Ḣ','ḣ'=>'ḣ','Ḥ'=>'Ḥ','ḥ'=>'ḥ','Ḧ'=>'Ḧ','ḧ'=>'ḧ','Ḩ'=>'Ḩ','ḩ'=>'ḩ','Ḫ'=>'Ḫ','ḫ'=>'ḫ','Ḭ'=>'Ḭ','ḭ'=>'ḭ','Ḯ'=>'Ḯ','ḯ'=>'ḯ','Ḱ'=>'Ḱ','ḱ'=>'ḱ','Ḳ'=>'Ḳ','ḳ'=>'ḳ','Ḵ'=>'Ḵ','ḵ'=>'ḵ','Ḷ'=>'Ḷ','ḷ'=>'ḷ','Ḹ'=>'Ḹ','ḹ'=>'ḹ','Ḻ'=>'Ḻ','ḻ'=>'ḻ','Ḽ'=>'Ḽ','ḽ'=>'ḽ','Ḿ'=>'Ḿ','ḿ'=>'ḿ','Ṁ'=>'Ṁ','ṁ'=>'ṁ','Ṃ'=>'Ṃ','ṃ'=>'ṃ','Ṅ'=>'Ṅ','ṅ'=>'ṅ','Ṇ'=>'Ṇ','ṇ'=>'ṇ','Ṉ'=>'Ṉ','ṉ'=>'ṉ','Ṋ'=>'Ṋ','ṋ'=>'ṋ','Ṍ'=>'Ṍ','ṍ'=>'ṍ','Ṏ'=>'Ṏ','ṏ'=>'ṏ','Ṑ'=>'Ṑ','ṑ'=>'ṑ','Ṓ'=>'Ṓ','ṓ'=>'ṓ','Ṕ'=>'Ṕ','ṕ'=>'ṕ','Ṗ'=>'Ṗ','ṗ'=>'ṗ','Ṙ'=>'Ṙ','ṙ'=>'ṙ','Ṛ'=>'Ṛ','ṛ'=>'ṛ','Ṝ'=>'Ṝ','ṝ'=>'ṝ','Ṟ'=>'Ṟ','ṟ'=>'ṟ','Ṡ'=>'Ṡ','ṡ'=>'ṡ','Ṣ'=>'Ṣ','ṣ'=>'ṣ','Ṥ'=>'Ṥ','ṥ'=>'ṥ','Ṧ'=>'Ṧ','ṧ'=>'ṧ','Ṩ'=>'Ṩ','ṩ'=>'ṩ','Ṫ'=>'Ṫ','ṫ'=>'ṫ','Ṭ'=>'Ṭ','ṭ'=>'ṭ','Ṯ'=>'Ṯ','ṯ'=>'ṯ','Ṱ'=>'Ṱ','ṱ'=>'ṱ','Ṳ'=>'Ṳ','ṳ'=>'ṳ','Ṵ'=>'Ṵ','ṵ'=>'ṵ','Ṷ'=>'Ṷ','ṷ'=>'ṷ','Ṹ'=>'Ṹ','ṹ'=>'ṹ','Ṻ'=>'Ṻ','ṻ'=>'ṻ','Ṽ'=>'Ṽ','ṽ'=>'ṽ','Ṿ'=>'Ṿ','ṿ'=>'ṿ','Ẁ'=>'Ẁ','ẁ'=>'ẁ','Ẃ'=>'Ẃ','ẃ'=>'ẃ','Ẅ'=>'Ẅ','ẅ'=>'ẅ','Ẇ'=>'Ẇ','ẇ'=>'ẇ','Ẉ'=>'Ẉ','ẉ'=>'ẉ','Ẋ'=>'Ẋ','ẋ'=>'ẋ','Ẍ'=>'Ẍ','ẍ'=>'ẍ','Ẏ'=>'Ẏ','ẏ'=>'ẏ','Ẑ'=>'Ẑ','ẑ'=>'ẑ','Ẓ'=>'Ẓ','ẓ'=>'ẓ','Ẕ'=>'Ẕ','ẕ'=>'ẕ','ẖ'=>'ẖ','ẗ'=>'ẗ','ẘ'=>'ẘ','ẙ'=>'ẙ','ẚ'=>'aʾ','ẛ'=>'ṡ','Ạ'=>'Ạ','ạ'=>'ạ','Ả'=>'Ả','ả'=>'ả','Ấ'=>'Ấ','ấ'=>'ấ','Ầ'=>'Ầ','ầ'=>'ầ','Ẩ'=>'Ẩ','ẩ'=>'ẩ','Ẫ'=>'Ẫ','ẫ'=>'ẫ','Ậ'=>'Ậ','ậ'=>'ậ','Ắ'=>'Ắ','ắ'=>'ắ','Ằ'=>'Ằ','ằ'=>'ằ','Ẳ'=>'Ẳ','ẳ'=>'ẳ','Ẵ'=>'Ẵ','ẵ'=>'ẵ','Ặ'=>'Ặ','ặ'=>'ặ','Ẹ'=>'Ẹ','ẹ'=>'ẹ','Ẻ'=>'Ẻ','ẻ'=>'ẻ','Ẽ'=>'Ẽ','ẽ'=>'ẽ','Ế'=>'Ế','ế'=>'ế','Ề'=>'Ề','ề'=>'ề','Ể'=>'Ể','ể'=>'ể','Ễ'=>'Ễ','ễ'=>'ễ','Ệ'=>'Ệ','ệ'=>'ệ','Ỉ'=>'Ỉ','ỉ'=>'ỉ','Ị'=>'Ị','ị'=>'ị','Ọ'=>'Ọ','ọ'=>'ọ','Ỏ'=>'Ỏ','ỏ'=>'ỏ','Ố'=>'Ố','ố'=>'ố','Ồ'=>'Ồ','ồ'=>'ồ','Ổ'=>'Ổ','ổ'=>'ổ','Ỗ'=>'Ỗ','ỗ'=>'ỗ','Ộ'=>'Ộ','ộ'=>'ộ','Ớ'=>'Ớ','ớ'=>'ớ','Ờ'=>'Ờ','ờ'=>'ờ','Ở'=>'Ở','ở'=>'ở','Ỡ'=>'Ỡ','ỡ'=>'ỡ','Ợ'=>'Ợ','ợ'=>'ợ','Ụ'=>'Ụ','ụ'=>'ụ','Ủ'=>'Ủ','ủ'=>'ủ','Ứ'=>'Ứ','ứ'=>'ứ','Ừ'=>'Ừ','ừ'=>'ừ','Ử'=>'Ử','ử'=>'ử','Ữ'=>'Ữ','ữ'=>'ữ','Ự'=>'Ự','ự'=>'ự','Ỳ'=>'Ỳ','ỳ'=>'ỳ','Ỵ'=>'Ỵ','ỵ'=>'ỵ','Ỷ'=>'Ỷ','ỷ'=>'ỷ','Ỹ'=>'Ỹ','ỹ'=>'ỹ','ἀ'=>'ἀ','ἁ'=>'ἁ','ἂ'=>'ἂ','ἃ'=>'ἃ','ἄ'=>'ἄ','ἅ'=>'ἅ','ἆ'=>'ἆ','ἇ'=>'ἇ','Ἀ'=>'Ἀ','Ἁ'=>'Ἁ','Ἂ'=>'Ἂ','Ἃ'=>'Ἃ','Ἄ'=>'Ἄ','Ἅ'=>'Ἅ','Ἆ'=>'Ἆ','Ἇ'=>'Ἇ','ἐ'=>'ἐ','ἑ'=>'ἑ','ἒ'=>'ἒ','ἓ'=>'ἓ','ἔ'=>'ἔ','ἕ'=>'ἕ','Ἐ'=>'Ἐ','Ἑ'=>'Ἑ','Ἒ'=>'Ἒ','Ἓ'=>'Ἓ','Ἔ'=>'Ἔ','Ἕ'=>'Ἕ','ἠ'=>'ἠ','ἡ'=>'ἡ','ἢ'=>'ἢ','ἣ'=>'ἣ','ἤ'=>'ἤ','ἥ'=>'ἥ','ἦ'=>'ἦ','ἧ'=>'ἧ','Ἠ'=>'Ἠ','Ἡ'=>'Ἡ','Ἢ'=>'Ἢ','Ἣ'=>'Ἣ','Ἤ'=>'Ἤ','Ἥ'=>'Ἥ','Ἦ'=>'Ἦ','Ἧ'=>'Ἧ','ἰ'=>'ἰ','ἱ'=>'ἱ','ἲ'=>'ἲ','ἳ'=>'ἳ','ἴ'=>'ἴ','ἵ'=>'ἵ','ἶ'=>'ἶ','ἷ'=>'ἷ','Ἰ'=>'Ἰ','Ἱ'=>'Ἱ','Ἲ'=>'Ἲ','Ἳ'=>'Ἳ','Ἴ'=>'Ἴ','Ἵ'=>'Ἵ','Ἶ'=>'Ἶ','Ἷ'=>'Ἷ','ὀ'=>'ὀ','ὁ'=>'ὁ','ὂ'=>'ὂ','ὃ'=>'ὃ','ὄ'=>'ὄ','ὅ'=>'ὅ','Ὀ'=>'Ὀ','Ὁ'=>'Ὁ','Ὂ'=>'Ὂ','Ὃ'=>'Ὃ','Ὄ'=>'Ὄ','Ὅ'=>'Ὅ','ὐ'=>'ὐ','ὑ'=>'ὑ','ὒ'=>'ὒ','ὓ'=>'ὓ','ὔ'=>'ὔ','ὕ'=>'ὕ','ὖ'=>'ὖ','ὗ'=>'ὗ','Ὑ'=>'Ὑ','Ὓ'=>'Ὓ','Ὕ'=>'Ὕ','Ὗ'=>'Ὗ','ὠ'=>'ὠ','ὡ'=>'ὡ','ὢ'=>'ὢ','ὣ'=>'ὣ','ὤ'=>'ὤ','ὥ'=>'ὥ','ὦ'=>'ὦ','ὧ'=>'ὧ','Ὠ'=>'Ὠ','Ὡ'=>'Ὡ','Ὢ'=>'Ὢ','Ὣ'=>'Ὣ','Ὤ'=>'Ὤ','Ὥ'=>'Ὥ','Ὦ'=>'Ὦ','Ὧ'=>'Ὧ','ὰ'=>'ὰ','ά'=>'ά','ὲ'=>'ὲ','έ'=>'έ','ὴ'=>'ὴ','ή'=>'ή','ὶ'=>'ὶ','ί'=>'ί','ὸ'=>'ὸ','ό'=>'ό','ὺ'=>'ὺ','ύ'=>'ύ','ὼ'=>'ὼ','ώ'=>'ώ','ᾀ'=>'ᾀ','ᾁ'=>'ᾁ','ᾂ'=>'ᾂ','ᾃ'=>'ᾃ','ᾄ'=>'ᾄ','ᾅ'=>'ᾅ','ᾆ'=>'ᾆ','ᾇ'=>'ᾇ','ᾈ'=>'ᾈ','ᾉ'=>'ᾉ','ᾊ'=>'ᾊ','ᾋ'=>'ᾋ','ᾌ'=>'ᾌ','ᾍ'=>'ᾍ','ᾎ'=>'ᾎ','ᾏ'=>'ᾏ','ᾐ'=>'ᾐ','ᾑ'=>'ᾑ','ᾒ'=>'ᾒ','ᾓ'=>'ᾓ','ᾔ'=>'ᾔ','ᾕ'=>'ᾕ','ᾖ'=>'ᾖ','ᾗ'=>'ᾗ','ᾘ'=>'ᾘ','ᾙ'=>'ᾙ','ᾚ'=>'ᾚ','ᾛ'=>'ᾛ','ᾜ'=>'ᾜ','ᾝ'=>'ᾝ','ᾞ'=>'ᾞ','ᾟ'=>'ᾟ','ᾠ'=>'ᾠ','ᾡ'=>'ᾡ','ᾢ'=>'ᾢ','ᾣ'=>'ᾣ','ᾤ'=>'ᾤ','ᾥ'=>'ᾥ','ᾦ'=>'ᾦ','ᾧ'=>'ᾧ','ᾨ'=>'ᾨ','ᾩ'=>'ᾩ','ᾪ'=>'ᾪ','ᾫ'=>'ᾫ','ᾬ'=>'ᾬ','ᾭ'=>'ᾭ','ᾮ'=>'ᾮ','ᾯ'=>'ᾯ','ᾰ'=>'ᾰ','ᾱ'=>'ᾱ','ᾲ'=>'ᾲ','ᾳ'=>'ᾳ','ᾴ'=>'ᾴ','ᾶ'=>'ᾶ','ᾷ'=>'ᾷ','Ᾰ'=>'Ᾰ','Ᾱ'=>'Ᾱ','Ὰ'=>'Ὰ','Ά'=>'Ά','ᾼ'=>'ᾼ','᾽'=>' ̓','ι'=>'ι','᾿'=>' ̓','῀'=>' ͂','῁'=>' ̈͂','ῂ'=>'ῂ','ῃ'=>'ῃ','ῄ'=>'ῄ','ῆ'=>'ῆ','ῇ'=>'ῇ','Ὲ'=>'Ὲ','Έ'=>'Έ','Ὴ'=>'Ὴ','Ή'=>'Ή','ῌ'=>'ῌ','῍'=>' ̓̀','῎'=>' ̓́','῏'=>' ̓͂','ῐ'=>'ῐ','ῑ'=>'ῑ','ῒ'=>'ῒ','ΐ'=>'ΐ','ῖ'=>'ῖ','ῗ'=>'ῗ','Ῐ'=>'Ῐ','Ῑ'=>'Ῑ','Ὶ'=>'Ὶ','Ί'=>'Ί','῝'=>' ̔̀','῞'=>' ̔́','῟'=>' ̔͂','ῠ'=>'ῠ','ῡ'=>'ῡ','ῢ'=>'ῢ','ΰ'=>'ΰ','ῤ'=>'ῤ','ῥ'=>'ῥ','ῦ'=>'ῦ','ῧ'=>'ῧ','Ῠ'=>'Ῠ','Ῡ'=>'Ῡ','Ὺ'=>'Ὺ','Ύ'=>'Ύ','Ῥ'=>'Ῥ','῭'=>' ̈̀','΅'=>' ̈́','`'=>'`','ῲ'=>'ῲ','ῳ'=>'ῳ','ῴ'=>'ῴ','ῶ'=>'ῶ','ῷ'=>'ῷ','Ὸ'=>'Ὸ','Ό'=>'Ό','Ὼ'=>'Ὼ','Ώ'=>'Ώ','ῼ'=>'ῼ','´'=>' ́','῾'=>' ̔',' '=>' ',' '=>' ',' '=>' ',' '=>' ',' '=>' ',' '=>' ',' '=>' ',' '=>' ',' '=>' ',' '=>' ',' '=>' ','‑'=>'‐','‗'=>' ̳','․'=>'.','‥'=>'..','…'=>'...',' '=>' ','″'=>'′′','‴'=>'′′′','‶'=>'‵‵','‷'=>'‵‵‵','‼'=>'!!','‾'=>' ̅','⁇'=>'??','⁈'=>'?!','⁉'=>'!?','⁗'=>'′′′′',' '=>' ','⁰'=>'0','ⁱ'=>'i','⁴'=>'4','⁵'=>'5','⁶'=>'6','⁷'=>'7','⁸'=>'8','⁹'=>'9','⁺'=>'+','⁻'=>'−','⁼'=>'=','⁽'=>'(','⁾'=>')','ⁿ'=>'n','₀'=>'0','₁'=>'1','₂'=>'2','₃'=>'3','₄'=>'4','₅'=>'5','₆'=>'6','₇'=>'7','₈'=>'8','₉'=>'9','₊'=>'+','₋'=>'−','₌'=>'=','₍'=>'(','₎'=>')','ₐ'=>'a','ₑ'=>'e','ₒ'=>'o','ₓ'=>'x','ₔ'=>'ə','₨'=>'Rs','℀'=>'a/c','℁'=>'a/s','ℂ'=>'C','℃'=>'°C','℅'=>'c/o','℆'=>'c/u','ℇ'=>'Ɛ','℉'=>'°F','ℊ'=>'g','ℋ'=>'H','ℌ'=>'H','ℍ'=>'H','ℎ'=>'h','ℏ'=>'ħ','ℐ'=>'I','ℑ'=>'I','ℒ'=>'L','ℓ'=>'l','ℕ'=>'N','№'=>'No','ℙ'=>'P','ℚ'=>'Q','ℛ'=>'R','ℜ'=>'R','ℝ'=>'R','℠'=>'SM','℡'=>'TEL','™'=>'TM','ℤ'=>'Z','Ω'=>'Ω','ℨ'=>'Z','K'=>'K','Å'=>'Å','ℬ'=>'B','ℭ'=>'C','ℯ'=>'e','ℰ'=>'E','ℱ'=>'F','ℳ'=>'M','ℴ'=>'o','ℵ'=>'א','ℶ'=>'ב','ℷ'=>'ג','ℸ'=>'ד','ℹ'=>'i','℻'=>'FAX','ℼ'=>'π','ℽ'=>'γ','ℾ'=>'Γ','ℿ'=>'Π','⅀'=>'∑','ⅅ'=>'D','ⅆ'=>'d','ⅇ'=>'e','ⅈ'=>'i','ⅉ'=>'j','⅓'=>'1⁄3','⅔'=>'2⁄3','⅕'=>'1⁄5','⅖'=>'2⁄5','⅗'=>'3⁄5','⅘'=>'4⁄5','⅙'=>'1⁄6','⅚'=>'5⁄6','⅛'=>'1⁄8','⅜'=>'3⁄8','⅝'=>'5⁄8','⅞'=>'7⁄8','⅟'=>'1⁄','Ⅰ'=>'I','Ⅱ'=>'II','Ⅲ'=>'III','Ⅳ'=>'IV','Ⅴ'=>'V','Ⅵ'=>'VI','Ⅶ'=>'VII','Ⅷ'=>'VIII','Ⅸ'=>'IX','Ⅹ'=>'X','Ⅺ'=>'XI','Ⅻ'=>'XII','Ⅼ'=>'L','Ⅽ'=>'C','Ⅾ'=>'D','Ⅿ'=>'M','ⅰ'=>'i','ⅱ'=>'ii','ⅲ'=>'iii','ⅳ'=>'iv','ⅴ'=>'v','ⅵ'=>'vi','ⅶ'=>'vii','ⅷ'=>'viii','ⅸ'=>'ix','ⅹ'=>'x','ⅺ'=>'xi','ⅻ'=>'xii','ⅼ'=>'l','ⅽ'=>'c','ⅾ'=>'d','ⅿ'=>'m','↚'=>'↚','↛'=>'↛','↮'=>'↮','⇍'=>'⇍','⇎'=>'⇎','⇏'=>'⇏','∄'=>'∄','∉'=>'∉','∌'=>'∌','∤'=>'∤','∦'=>'∦','∬'=>'∫∫','∭'=>'∫∫∫','∯'=>'∮∮','∰'=>'∮∮∮','≁'=>'≁','≄'=>'≄','≇'=>'≇','≉'=>'≉','≠'=>'≠','≢'=>'≢','≭'=>'≭','≮'=>'≮','≯'=>'≯','≰'=>'≰','≱'=>'≱','≴'=>'≴','≵'=>'≵','≸'=>'≸','≹'=>'≹','⊀'=>'⊀','⊁'=>'⊁','⊄'=>'⊄','⊅'=>'⊅','⊈'=>'⊈','⊉'=>'⊉','⊬'=>'⊬','⊭'=>'⊭','⊮'=>'⊮','⊯'=>'⊯','⋠'=>'⋠','⋡'=>'⋡','⋢'=>'⋢','⋣'=>'⋣','⋪'=>'⋪','⋫'=>'⋫','⋬'=>'⋬','⋭'=>'⋭','〈'=>'〈','〉'=>'〉','①'=>'1','②'=>'2','③'=>'3','④'=>'4','⑤'=>'5','⑥'=>'6','⑦'=>'7','⑧'=>'8','⑨'=>'9','⑩'=>'10','⑪'=>'11','⑫'=>'12','⑬'=>'13','⑭'=>'14','⑮'=>'15','⑯'=>'16','⑰'=>'17','⑱'=>'18','⑲'=>'19','⑳'=>'20','⑴'=>'(1)','⑵'=>'(2)','⑶'=>'(3)','⑷'=>'(4)','⑸'=>'(5)','⑹'=>'(6)','⑺'=>'(7)','⑻'=>'(8)','⑼'=>'(9)','⑽'=>'(10)','⑾'=>'(11)','⑿'=>'(12)','⒀'=>'(13)','⒁'=>'(14)','⒂'=>'(15)','⒃'=>'(16)','⒄'=>'(17)','⒅'=>'(18)','⒆'=>'(19)','⒇'=>'(20)','⒈'=>'1.','⒉'=>'2.','⒊'=>'3.','⒋'=>'4.','⒌'=>'5.','⒍'=>'6.','⒎'=>'7.','⒏'=>'8.','⒐'=>'9.','⒑'=>'10.','⒒'=>'11.','⒓'=>'12.','⒔'=>'13.','⒕'=>'14.','⒖'=>'15.','⒗'=>'16.','⒘'=>'17.','⒙'=>'18.','⒚'=>'19.','⒛'=>'20.','⒜'=>'(a)','⒝'=>'(b)','⒞'=>'(c)','⒟'=>'(d)','⒠'=>'(e)','⒡'=>'(f)','⒢'=>'(g)','⒣'=>'(h)','⒤'=>'(i)','⒥'=>'(j)','⒦'=>'(k)','⒧'=>'(l)','⒨'=>'(m)','⒩'=>'(n)','⒪'=>'(o)','⒫'=>'(p)','⒬'=>'(q)','⒭'=>'(r)','⒮'=>'(s)','⒯'=>'(t)','⒰'=>'(u)','⒱'=>'(v)','⒲'=>'(w)','⒳'=>'(x)','⒴'=>'(y)','⒵'=>'(z)','Ⓐ'=>'A','Ⓑ'=>'B','Ⓒ'=>'C','Ⓓ'=>'D','Ⓔ'=>'E','Ⓕ'=>'F','Ⓖ'=>'G','Ⓗ'=>'H','Ⓘ'=>'I','Ⓙ'=>'J','Ⓚ'=>'K','Ⓛ'=>'L','Ⓜ'=>'M','Ⓝ'=>'N','Ⓞ'=>'O','Ⓟ'=>'P','Ⓠ'=>'Q','Ⓡ'=>'R','Ⓢ'=>'S','Ⓣ'=>'T','Ⓤ'=>'U','Ⓥ'=>'V','Ⓦ'=>'W','Ⓧ'=>'X','Ⓨ'=>'Y','Ⓩ'=>'Z','ⓐ'=>'a','ⓑ'=>'b','ⓒ'=>'c','ⓓ'=>'d','ⓔ'=>'e','ⓕ'=>'f','ⓖ'=>'g','ⓗ'=>'h','ⓘ'=>'i','ⓙ'=>'j','ⓚ'=>'k','ⓛ'=>'l','ⓜ'=>'m','ⓝ'=>'n','ⓞ'=>'o','ⓟ'=>'p','ⓠ'=>'q','ⓡ'=>'r','ⓢ'=>'s','ⓣ'=>'t','ⓤ'=>'u','ⓥ'=>'v','ⓦ'=>'w','ⓧ'=>'x','ⓨ'=>'y','ⓩ'=>'z','⓪'=>'0','⨌'=>'∫∫∫∫','⩴'=>'::=','⩵'=>'==','⩶'=>'===','⫝̸'=>'⫝̸','ⵯ'=>'ⵡ','⺟'=>'母','⻳'=>'龟','⼀'=>'一','⼁'=>'丨','⼂'=>'丶','⼃'=>'丿','⼄'=>'乙','⼅'=>'亅','⼆'=>'二','⼇'=>'亠','⼈'=>'人','⼉'=>'儿','⼊'=>'入','⼋'=>'八','⼌'=>'冂','⼍'=>'冖','⼎'=>'冫','⼏'=>'几','⼐'=>'凵','⼑'=>'刀','⼒'=>'力','⼓'=>'勹','⼔'=>'匕','⼕'=>'匚','⼖'=>'匸','⼗'=>'十','⼘'=>'卜','⼙'=>'卩','⼚'=>'厂','⼛'=>'厶','⼜'=>'又','⼝'=>'口','⼞'=>'囗','⼟'=>'土','⼠'=>'士','⼡'=>'夂','⼢'=>'夊','⼣'=>'夕','⼤'=>'大','⼥'=>'女','⼦'=>'子','⼧'=>'宀','⼨'=>'寸','⼩'=>'小','⼪'=>'尢','⼫'=>'尸','⼬'=>'屮','⼭'=>'山','⼮'=>'巛','⼯'=>'工','⼰'=>'己','⼱'=>'巾','⼲'=>'干','⼳'=>'幺','⼴'=>'广','⼵'=>'廴','⼶'=>'廾','⼷'=>'弋','⼸'=>'弓','⼹'=>'彐','⼺'=>'彡','⼻'=>'彳','⼼'=>'心','⼽'=>'戈','⼾'=>'戶','⼿'=>'手','⽀'=>'支','⽁'=>'攴','⽂'=>'文','⽃'=>'斗','⽄'=>'斤','⽅'=>'方','⽆'=>'无','⽇'=>'日','⽈'=>'曰','⽉'=>'月','⽊'=>'木','⽋'=>'欠','⽌'=>'止','⽍'=>'歹','⽎'=>'殳','⽏'=>'毋','⽐'=>'比','⽑'=>'毛','⽒'=>'氏','⽓'=>'气','⽔'=>'水','⽕'=>'火','⽖'=>'爪','⽗'=>'父','⽘'=>'爻','⽙'=>'爿','⽚'=>'片','⽛'=>'牙','⽜'=>'牛','⽝'=>'犬','⽞'=>'玄','⽟'=>'玉','⽠'=>'瓜','⽡'=>'瓦','⽢'=>'甘','⽣'=>'生','⽤'=>'用','⽥'=>'田','⽦'=>'疋','⽧'=>'疒','⽨'=>'癶','⽩'=>'白','⽪'=>'皮','⽫'=>'皿','⽬'=>'目','⽭'=>'矛','⽮'=>'矢','⽯'=>'石','⽰'=>'示','⽱'=>'禸','⽲'=>'禾','⽳'=>'穴','⽴'=>'立','⽵'=>'竹','⽶'=>'米','⽷'=>'糸','⽸'=>'缶','⽹'=>'网','⽺'=>'羊','⽻'=>'羽','⽼'=>'老','⽽'=>'而','⽾'=>'耒','⽿'=>'耳','⾀'=>'聿','⾁'=>'肉','⾂'=>'臣','⾃'=>'自','⾄'=>'至','⾅'=>'臼','⾆'=>'舌','⾇'=>'舛','⾈'=>'舟','⾉'=>'艮','⾊'=>'色','⾋'=>'艸','⾌'=>'虍','⾍'=>'虫','⾎'=>'血','⾏'=>'行','⾐'=>'衣','⾑'=>'襾','⾒'=>'見','⾓'=>'角','⾔'=>'言','⾕'=>'谷','⾖'=>'豆','⾗'=>'豕','⾘'=>'豸','⾙'=>'貝','⾚'=>'赤','⾛'=>'走','⾜'=>'足','⾝'=>'身','⾞'=>'車','⾟'=>'辛','⾠'=>'辰','⾡'=>'辵','⾢'=>'邑','⾣'=>'酉','⾤'=>'釆','⾥'=>'里','⾦'=>'金','⾧'=>'長','⾨'=>'門','⾩'=>'阜','⾪'=>'隶','⾫'=>'隹','⾬'=>'雨','⾭'=>'靑','⾮'=>'非','⾯'=>'面','⾰'=>'革','⾱'=>'韋','⾲'=>'韭','⾳'=>'音','⾴'=>'頁','⾵'=>'風','⾶'=>'飛','⾷'=>'食','⾸'=>'首','⾹'=>'香','⾺'=>'馬','⾻'=>'骨','⾼'=>'高','⾽'=>'髟','⾾'=>'鬥','⾿'=>'鬯','⿀'=>'鬲','⿁'=>'鬼','⿂'=>'魚','⿃'=>'鳥','⿄'=>'鹵','⿅'=>'鹿','⿆'=>'麥','⿇'=>'麻','⿈'=>'黃','⿉'=>'黍','⿊'=>'黑','⿋'=>'黹','⿌'=>'黽','⿍'=>'鼎','⿎'=>'鼓','⿏'=>'鼠','⿐'=>'鼻','⿑'=>'齊','⿒'=>'齒','⿓'=>'龍','⿔'=>'龜','⿕'=>'龠',' '=>' ','〶'=>'〒','〸'=>'十','〹'=>'卄','〺'=>'卅','が'=>'が','ぎ'=>'ぎ','ぐ'=>'ぐ','げ'=>'げ','ご'=>'ご','ざ'=>'ざ','じ'=>'じ','ず'=>'ず','ぜ'=>'ぜ','ぞ'=>'ぞ','だ'=>'だ','ぢ'=>'ぢ','づ'=>'づ','で'=>'で','ど'=>'ど','ば'=>'ば','ぱ'=>'ぱ','び'=>'び','ぴ'=>'ぴ','ぶ'=>'ぶ','ぷ'=>'ぷ','べ'=>'べ','ぺ'=>'ぺ','ぼ'=>'ぼ','ぽ'=>'ぽ','ゔ'=>'ゔ','゛'=>' ゙','゜'=>' ゚','ゞ'=>'ゞ','ゟ'=>'より','ガ'=>'ガ','ギ'=>'ギ','グ'=>'グ','ゲ'=>'ゲ','ゴ'=>'ゴ','ザ'=>'ザ','ジ'=>'ジ','ズ'=>'ズ','ゼ'=>'ゼ','ゾ'=>'ゾ','ダ'=>'ダ','ヂ'=>'ヂ','ヅ'=>'ヅ','デ'=>'デ','ド'=>'ド','バ'=>'バ','パ'=>'パ','ビ'=>'ビ','ピ'=>'ピ','ブ'=>'ブ','プ'=>'プ','ベ'=>'ベ','ペ'=>'ペ','ボ'=>'ボ','ポ'=>'ポ','ヴ'=>'ヴ','ヷ'=>'ヷ','ヸ'=>'ヸ','ヹ'=>'ヹ','ヺ'=>'ヺ','ヾ'=>'ヾ','ヿ'=>'コト','ㄱ'=>'ᄀ','ㄲ'=>'ᄁ','ㄳ'=>'ᆪ','ㄴ'=>'ᄂ','ㄵ'=>'ᆬ','ㄶ'=>'ᆭ','ㄷ'=>'ᄃ','ㄸ'=>'ᄄ','ㄹ'=>'ᄅ','ㄺ'=>'ᆰ','ㄻ'=>'ᆱ','ㄼ'=>'ᆲ','ㄽ'=>'ᆳ','ㄾ'=>'ᆴ','ㄿ'=>'ᆵ','ㅀ'=>'ᄚ','ㅁ'=>'ᄆ','ㅂ'=>'ᄇ','ㅃ'=>'ᄈ','ㅄ'=>'ᄡ','ㅅ'=>'ᄉ','ㅆ'=>'ᄊ','ㅇ'=>'ᄋ','ㅈ'=>'ᄌ','ㅉ'=>'ᄍ','ㅊ'=>'ᄎ','ㅋ'=>'ᄏ','ㅌ'=>'ᄐ','ㅍ'=>'ᄑ','ㅎ'=>'ᄒ','ㅏ'=>'ᅡ','ㅐ'=>'ᅢ','ㅑ'=>'ᅣ','ㅒ'=>'ᅤ','ㅓ'=>'ᅥ','ㅔ'=>'ᅦ','ㅕ'=>'ᅧ','ㅖ'=>'ᅨ','ㅗ'=>'ᅩ','ㅘ'=>'ᅪ','ㅙ'=>'ᅫ','ㅚ'=>'ᅬ','ㅛ'=>'ᅭ','ㅜ'=>'ᅮ','ㅝ'=>'ᅯ','ㅞ'=>'ᅰ','ㅟ'=>'ᅱ','ㅠ'=>'ᅲ','ㅡ'=>'ᅳ','ㅢ'=>'ᅴ','ㅣ'=>'ᅵ','ㅤ'=>'ᅠ','ㅥ'=>'ᄔ','ㅦ'=>'ᄕ','ㅧ'=>'ᇇ','ㅨ'=>'ᇈ','ㅩ'=>'ᇌ','ㅪ'=>'ᇎ','ㅫ'=>'ᇓ','ㅬ'=>'ᇗ','ㅭ'=>'ᇙ','ㅮ'=>'ᄜ','ㅯ'=>'ᇝ','ㅰ'=>'ᇟ','ㅱ'=>'ᄝ','ㅲ'=>'ᄞ','ㅳ'=>'ᄠ','ㅴ'=>'ᄢ','ㅵ'=>'ᄣ','ㅶ'=>'ᄧ','ㅷ'=>'ᄩ','ㅸ'=>'ᄫ','ㅹ'=>'ᄬ','ㅺ'=>'ᄭ','ㅻ'=>'ᄮ','ㅼ'=>'ᄯ','ㅽ'=>'ᄲ','ㅾ'=>'ᄶ','ㅿ'=>'ᅀ','ㆀ'=>'ᅇ','ㆁ'=>'ᅌ','ㆂ'=>'ᇱ','ㆃ'=>'ᇲ','ㆄ'=>'ᅗ','ㆅ'=>'ᅘ','ㆆ'=>'ᅙ','ㆇ'=>'ᆄ','ㆈ'=>'ᆅ','ㆉ'=>'ᆈ','ㆊ'=>'ᆑ','ㆋ'=>'ᆒ','ㆌ'=>'ᆔ','ㆍ'=>'ᆞ','ㆎ'=>'ᆡ','㆒'=>'一','㆓'=>'二','㆔'=>'三','㆕'=>'四','㆖'=>'上','㆗'=>'中','㆘'=>'下','㆙'=>'甲','㆚'=>'乙','㆛'=>'丙','㆜'=>'丁','㆝'=>'天','㆞'=>'地','㆟'=>'人','㈀'=>'(ᄀ)','㈁'=>'(ᄂ)','㈂'=>'(ᄃ)','㈃'=>'(ᄅ)','㈄'=>'(ᄆ)','㈅'=>'(ᄇ)','㈆'=>'(ᄉ)','㈇'=>'(ᄋ)','㈈'=>'(ᄌ)','㈉'=>'(ᄎ)','㈊'=>'(ᄏ)','㈋'=>'(ᄐ)','㈌'=>'(ᄑ)','㈍'=>'(ᄒ)','㈎'=>'(가)','㈏'=>'(나)','㈐'=>'(다)','㈑'=>'(라)','㈒'=>'(마)','㈓'=>'(바)','㈔'=>'(사)','㈕'=>'(아)','㈖'=>'(자)','㈗'=>'(차)','㈘'=>'(카)','㈙'=>'(타)','㈚'=>'(파)','㈛'=>'(하)','㈜'=>'(주)','㈝'=>'(오전)','㈞'=>'(오후)','㈠'=>'(一)','㈡'=>'(二)','㈢'=>'(三)','㈣'=>'(四)','㈤'=>'(五)','㈥'=>'(六)','㈦'=>'(七)','㈧'=>'(八)','㈨'=>'(九)','㈩'=>'(十)','㈪'=>'(月)','㈫'=>'(火)','㈬'=>'(水)','㈭'=>'(木)','㈮'=>'(金)','㈯'=>'(土)','㈰'=>'(日)','㈱'=>'(株)','㈲'=>'(有)','㈳'=>'(社)','㈴'=>'(名)','㈵'=>'(特)','㈶'=>'(財)','㈷'=>'(祝)','㈸'=>'(労)','㈹'=>'(代)','㈺'=>'(呼)','㈻'=>'(学)','㈼'=>'(監)','㈽'=>'(企)','㈾'=>'(資)','㈿'=>'(協)','㉀'=>'(祭)','㉁'=>'(休)','㉂'=>'(自)','㉃'=>'(至)','㉐'=>'PTE','㉑'=>'21','㉒'=>'22','㉓'=>'23','㉔'=>'24','㉕'=>'25','㉖'=>'26','㉗'=>'27','㉘'=>'28','㉙'=>'29','㉚'=>'30','㉛'=>'31','㉜'=>'32','㉝'=>'33','㉞'=>'34','㉟'=>'35','㉠'=>'ᄀ','㉡'=>'ᄂ','㉢'=>'ᄃ','㉣'=>'ᄅ','㉤'=>'ᄆ','㉥'=>'ᄇ','㉦'=>'ᄉ','㉧'=>'ᄋ','㉨'=>'ᄌ','㉩'=>'ᄎ','㉪'=>'ᄏ','㉫'=>'ᄐ','㉬'=>'ᄑ','㉭'=>'ᄒ','㉮'=>'가','㉯'=>'나','㉰'=>'다','㉱'=>'라','㉲'=>'마','㉳'=>'바','㉴'=>'사','㉵'=>'아','㉶'=>'자','㉷'=>'차','㉸'=>'카','㉹'=>'타','㉺'=>'파','㉻'=>'하','㉼'=>'참고','㉽'=>'주의','㉾'=>'우','㊀'=>'一','㊁'=>'二','㊂'=>'三','㊃'=>'四','㊄'=>'五','㊅'=>'六','㊆'=>'七','㊇'=>'八','㊈'=>'九','㊉'=>'十','㊊'=>'月','㊋'=>'火','㊌'=>'水','㊍'=>'木','㊎'=>'金','㊏'=>'土','㊐'=>'日','㊑'=>'株','㊒'=>'有','㊓'=>'社','㊔'=>'名','㊕'=>'特','㊖'=>'財','㊗'=>'祝','㊘'=>'労','㊙'=>'秘','㊚'=>'男','㊛'=>'女','㊜'=>'適','㊝'=>'優','㊞'=>'印','㊟'=>'注','㊠'=>'項','㊡'=>'休','㊢'=>'写','㊣'=>'正','㊤'=>'上','㊥'=>'中','㊦'=>'下','㊧'=>'左','㊨'=>'右','㊩'=>'医','㊪'=>'宗','㊫'=>'学','㊬'=>'監','㊭'=>'企','㊮'=>'資','㊯'=>'協','㊰'=>'夜','㊱'=>'36','㊲'=>'37','㊳'=>'38','㊴'=>'39','㊵'=>'40','㊶'=>'41','㊷'=>'42','㊸'=>'43','㊹'=>'44','㊺'=>'45','㊻'=>'46','㊼'=>'47','㊽'=>'48','㊾'=>'49','㊿'=>'50','㋀'=>'1月','㋁'=>'2月','㋂'=>'3月','㋃'=>'4月','㋄'=>'5月','㋅'=>'6月','㋆'=>'7月','㋇'=>'8月','㋈'=>'9月','㋉'=>'10月','㋊'=>'11月','㋋'=>'12月','㋌'=>'Hg','㋍'=>'erg','㋎'=>'eV','㋏'=>'LTD','㋐'=>'ア','㋑'=>'イ','㋒'=>'ウ','㋓'=>'エ','㋔'=>'オ','㋕'=>'カ','㋖'=>'キ','㋗'=>'ク','㋘'=>'ケ','㋙'=>'コ','㋚'=>'サ','㋛'=>'シ','㋜'=>'ス','㋝'=>'セ','㋞'=>'ソ','㋟'=>'タ','㋠'=>'チ','㋡'=>'ツ','㋢'=>'テ','㋣'=>'ト','㋤'=>'ナ','㋥'=>'ニ','㋦'=>'ヌ','㋧'=>'ネ','㋨'=>'ノ','㋩'=>'ハ','㋪'=>'ヒ','㋫'=>'フ','㋬'=>'ヘ','㋭'=>'ホ','㋮'=>'マ','㋯'=>'ミ','㋰'=>'ム','㋱'=>'メ','㋲'=>'モ','㋳'=>'ヤ','㋴'=>'ユ','㋵'=>'ヨ','㋶'=>'ラ','㋷'=>'リ','㋸'=>'ル','㋹'=>'レ','㋺'=>'ロ','㋻'=>'ワ','㋼'=>'ヰ','㋽'=>'ヱ','㋾'=>'ヲ','㌀'=>'アパート','㌁'=>'アルファ','㌂'=>'アンペア','㌃'=>'アール','㌄'=>'イニング','㌅'=>'インチ','㌆'=>'ウォン','㌇'=>'エスクード','㌈'=>'エーカー','㌉'=>'オンス','㌊'=>'オーム','㌋'=>'カイリ','㌌'=>'カラット','㌍'=>'カロリー','㌎'=>'ガロン','㌏'=>'ガンマ','㌐'=>'ギガ','㌑'=>'ギニー','㌒'=>'キュリー','㌓'=>'ギルダー','㌔'=>'キロ','㌕'=>'キログラム','㌖'=>'キロメートル','㌗'=>'キロワット','㌘'=>'グラム','㌙'=>'グラムトン','㌚'=>'クルゼイロ','㌛'=>'クローネ','㌜'=>'ケース','㌝'=>'コルナ','㌞'=>'コーポ','㌟'=>'サイクル','㌠'=>'サンチーム','㌡'=>'シリング','㌢'=>'センチ','㌣'=>'セント','㌤'=>'ダース','㌥'=>'デシ','㌦'=>'ドル','㌧'=>'トン','㌨'=>'ナノ','㌩'=>'ノット','㌪'=>'ハイツ','㌫'=>'パーセント','㌬'=>'パーツ','㌭'=>'バーレル','㌮'=>'ピアストル','㌯'=>'ピクル','㌰'=>'ピコ','㌱'=>'ビル','㌲'=>'ファラッド','㌳'=>'フィート','㌴'=>'ブッシェル','㌵'=>'フラン','㌶'=>'ヘクタール','㌷'=>'ペソ','㌸'=>'ペニヒ','㌹'=>'ヘルツ','㌺'=>'ペンス','㌻'=>'ページ','㌼'=>'ベータ','㌽'=>'ポイント','㌾'=>'ボルト','㌿'=>'ホン','㍀'=>'ポンド','㍁'=>'ホール','㍂'=>'ホーン','㍃'=>'マイクロ','㍄'=>'マイル','㍅'=>'マッハ','㍆'=>'マルク','㍇'=>'マンション','㍈'=>'ミクロン','㍉'=>'ミリ','㍊'=>'ミリバール','㍋'=>'メガ','㍌'=>'メガトン','㍍'=>'メートル','㍎'=>'ヤード','㍏'=>'ヤール','㍐'=>'ユアン','㍑'=>'リットル','㍒'=>'リラ','㍓'=>'ルピー','㍔'=>'ルーブル','㍕'=>'レム','㍖'=>'レントゲン','㍗'=>'ワット','㍘'=>'0点','㍙'=>'1点','㍚'=>'2点','㍛'=>'3点','㍜'=>'4点','㍝'=>'5点','㍞'=>'6点','㍟'=>'7点','㍠'=>'8点','㍡'=>'9点','㍢'=>'10点','㍣'=>'11点','㍤'=>'12点','㍥'=>'13点','㍦'=>'14点','㍧'=>'15点','㍨'=>'16点','㍩'=>'17点','㍪'=>'18点','㍫'=>'19点','㍬'=>'20点','㍭'=>'21点','㍮'=>'22点','㍯'=>'23点','㍰'=>'24点','㍱'=>'hPa','㍲'=>'da','㍳'=>'AU','㍴'=>'bar','㍵'=>'oV','㍶'=>'pc','㍷'=>'dm','㍸'=>'dm2','㍹'=>'dm3','㍺'=>'IU','㍻'=>'平成','㍼'=>'昭和','㍽'=>'大正','㍾'=>'明治','㍿'=>'株式会社','㎀'=>'pA','㎁'=>'nA','㎂'=>'μA','㎃'=>'mA','㎄'=>'kA','㎅'=>'KB','㎆'=>'MB','㎇'=>'GB','㎈'=>'cal','㎉'=>'kcal','㎊'=>'pF','㎋'=>'nF','㎌'=>'μF','㎍'=>'μg','㎎'=>'mg','㎏'=>'kg','㎐'=>'Hz','㎑'=>'kHz','㎒'=>'MHz','㎓'=>'GHz','㎔'=>'THz','㎕'=>'μl','㎖'=>'ml','㎗'=>'dl','㎘'=>'kl','㎙'=>'fm','㎚'=>'nm','㎛'=>'μm','㎜'=>'mm','㎝'=>'cm','㎞'=>'km','㎟'=>'mm2','㎠'=>'cm2','㎡'=>'m2','㎢'=>'km2','㎣'=>'mm3','㎤'=>'cm3','㎥'=>'m3','㎦'=>'km3','㎧'=>'m∕s','㎨'=>'m∕s2','㎩'=>'Pa','㎪'=>'kPa','㎫'=>'MPa','㎬'=>'GPa','㎭'=>'rad','㎮'=>'rad∕s','㎯'=>'rad∕s2','㎰'=>'ps','㎱'=>'ns','㎲'=>'μs','㎳'=>'ms','㎴'=>'pV','㎵'=>'nV','㎶'=>'μV','㎷'=>'mV','㎸'=>'kV','㎹'=>'MV','㎺'=>'pW','㎻'=>'nW','㎼'=>'μW','㎽'=>'mW','㎾'=>'kW','㎿'=>'MW','㏀'=>'kΩ','㏁'=>'MΩ','㏂'=>'a.m.','㏃'=>'Bq','㏄'=>'cc','㏅'=>'cd','㏆'=>'C∕kg','㏇'=>'Co.','㏈'=>'dB','㏉'=>'Gy','㏊'=>'ha','㏋'=>'HP','㏌'=>'in','㏍'=>'KK','㏎'=>'KM','㏏'=>'kt','㏐'=>'lm','㏑'=>'ln','㏒'=>'log','㏓'=>'lx','㏔'=>'mb','㏕'=>'mil','㏖'=>'mol','㏗'=>'PH','㏘'=>'p.m.','㏙'=>'PPM','㏚'=>'PR','㏛'=>'sr','㏜'=>'Sv','㏝'=>'Wb','㏞'=>'V∕m','㏟'=>'A∕m','㏠'=>'1日','㏡'=>'2日','㏢'=>'3日','㏣'=>'4日','㏤'=>'5日','㏥'=>'6日','㏦'=>'7日','㏧'=>'8日','㏨'=>'9日','㏩'=>'10日','㏪'=>'11日','㏫'=>'12日','㏬'=>'13日','㏭'=>'14日','㏮'=>'15日','㏯'=>'16日','㏰'=>'17日','㏱'=>'18日','㏲'=>'19日','㏳'=>'20日','㏴'=>'21日','㏵'=>'22日','㏶'=>'23日','㏷'=>'24日','㏸'=>'25日','㏹'=>'26日','㏺'=>'27日','㏻'=>'28日','㏼'=>'29日','㏽'=>'30日','㏾'=>'31日','㏿'=>'gal','豈'=>'豈','更'=>'更','車'=>'車','賈'=>'賈','滑'=>'滑','串'=>'串','句'=>'句','龜'=>'龜','龜'=>'龜','契'=>'契','金'=>'金','喇'=>'喇','奈'=>'奈','懶'=>'懶','癩'=>'癩','羅'=>'羅','蘿'=>'蘿','螺'=>'螺','裸'=>'裸','邏'=>'邏','樂'=>'樂','洛'=>'洛','烙'=>'烙','珞'=>'珞','落'=>'落','酪'=>'酪','駱'=>'駱','亂'=>'亂','卵'=>'卵','欄'=>'欄','爛'=>'爛','蘭'=>'蘭','鸞'=>'鸞','嵐'=>'嵐','濫'=>'濫','藍'=>'藍','襤'=>'襤','拉'=>'拉','臘'=>'臘','蠟'=>'蠟','廊'=>'廊','朗'=>'朗','浪'=>'浪','狼'=>'狼','郎'=>'郎','來'=>'來','冷'=>'冷','勞'=>'勞','擄'=>'擄','櫓'=>'櫓','爐'=>'爐','盧'=>'盧','老'=>'老','蘆'=>'蘆','虜'=>'虜','路'=>'路','露'=>'露','魯'=>'魯','鷺'=>'鷺','碌'=>'碌','祿'=>'祿','綠'=>'綠','菉'=>'菉','錄'=>'錄','鹿'=>'鹿','論'=>'論','壟'=>'壟','弄'=>'弄','籠'=>'籠','聾'=>'聾','牢'=>'牢','磊'=>'磊','賂'=>'賂','雷'=>'雷','壘'=>'壘','屢'=>'屢','樓'=>'樓','淚'=>'淚','漏'=>'漏','累'=>'累','縷'=>'縷','陋'=>'陋','勒'=>'勒','肋'=>'肋','凜'=>'凜','凌'=>'凌','稜'=>'稜','綾'=>'綾','菱'=>'菱','陵'=>'陵','讀'=>'讀','拏'=>'拏','樂'=>'樂','諾'=>'諾','丹'=>'丹','寧'=>'寧','怒'=>'怒','率'=>'率','異'=>'異','北'=>'北','磻'=>'磻','便'=>'便','復'=>'復','不'=>'不','泌'=>'泌','數'=>'數','索'=>'索','參'=>'參','塞'=>'塞','省'=>'省','葉'=>'葉','說'=>'說','殺'=>'殺','辰'=>'辰','沈'=>'沈','拾'=>'拾','若'=>'若','掠'=>'掠','略'=>'略','亮'=>'亮','兩'=>'兩','凉'=>'凉','梁'=>'梁','糧'=>'糧','良'=>'良','諒'=>'諒','量'=>'量','勵'=>'勵','呂'=>'呂','女'=>'女','廬'=>'廬','旅'=>'旅','濾'=>'濾','礪'=>'礪','閭'=>'閭','驪'=>'驪','麗'=>'麗','黎'=>'黎','力'=>'力','曆'=>'曆','歷'=>'歷','轢'=>'轢','年'=>'年','憐'=>'憐','戀'=>'戀','撚'=>'撚','漣'=>'漣','煉'=>'煉','璉'=>'璉','秊'=>'秊','練'=>'練','聯'=>'聯','輦'=>'輦','蓮'=>'蓮','連'=>'連','鍊'=>'鍊','列'=>'列','劣'=>'劣','咽'=>'咽','烈'=>'烈','裂'=>'裂','說'=>'說','廉'=>'廉','念'=>'念','捻'=>'捻','殮'=>'殮','簾'=>'簾','獵'=>'獵','令'=>'令','囹'=>'囹','寧'=>'寧','嶺'=>'嶺','怜'=>'怜','玲'=>'玲','瑩'=>'瑩','羚'=>'羚','聆'=>'聆','鈴'=>'鈴','零'=>'零','靈'=>'靈','領'=>'領','例'=>'例','禮'=>'禮','醴'=>'醴','隸'=>'隸','惡'=>'惡','了'=>'了','僚'=>'僚','寮'=>'寮','尿'=>'尿','料'=>'料','樂'=>'樂','燎'=>'燎','療'=>'療','蓼'=>'蓼','遼'=>'遼','龍'=>'龍','暈'=>'暈','阮'=>'阮','劉'=>'劉','杻'=>'杻','柳'=>'柳','流'=>'流','溜'=>'溜','琉'=>'琉','留'=>'留','硫'=>'硫','紐'=>'紐','類'=>'類','六'=>'六','戮'=>'戮','陸'=>'陸','倫'=>'倫','崙'=>'崙','淪'=>'淪','輪'=>'輪','律'=>'律','慄'=>'慄','栗'=>'栗','率'=>'率','隆'=>'隆','利'=>'利','吏'=>'吏','履'=>'履','易'=>'易','李'=>'李','梨'=>'梨','泥'=>'泥','理'=>'理','痢'=>'痢','罹'=>'罹','裏'=>'裏','裡'=>'裡','里'=>'里','離'=>'離','匿'=>'匿','溺'=>'溺','吝'=>'吝','燐'=>'燐','璘'=>'璘','藺'=>'藺','隣'=>'隣','鱗'=>'鱗','麟'=>'麟','林'=>'林','淋'=>'淋','臨'=>'臨','立'=>'立','笠'=>'笠','粒'=>'粒','狀'=>'狀','炙'=>'炙','識'=>'識','什'=>'什','茶'=>'茶','刺'=>'刺','切'=>'切','度'=>'度','拓'=>'拓','糖'=>'糖','宅'=>'宅','洞'=>'洞','暴'=>'暴','輻'=>'輻','行'=>'行','降'=>'降','見'=>'見','廓'=>'廓','兀'=>'兀','嗀'=>'嗀','塚'=>'塚','晴'=>'晴','凞'=>'凞','猪'=>'猪','益'=>'益','礼'=>'礼','神'=>'神','祥'=>'祥','福'=>'福','靖'=>'靖','精'=>'精','羽'=>'羽','蘒'=>'蘒','諸'=>'諸','逸'=>'逸','都'=>'都','飯'=>'飯','飼'=>'飼','館'=>'館','鶴'=>'鶴','侮'=>'侮','僧'=>'僧','免'=>'免','勉'=>'勉','勤'=>'勤','卑'=>'卑','喝'=>'喝','嘆'=>'嘆','器'=>'器','塀'=>'塀','墨'=>'墨','層'=>'層','屮'=>'屮','悔'=>'悔','慨'=>'慨','憎'=>'憎','懲'=>'懲','敏'=>'敏','既'=>'既','暑'=>'暑','梅'=>'梅','海'=>'海','渚'=>'渚','漢'=>'漢','煮'=>'煮','爫'=>'爫','琢'=>'琢','碑'=>'碑','社'=>'社','祉'=>'祉','祈'=>'祈','祐'=>'祐','祖'=>'祖','祝'=>'祝','禍'=>'禍','禎'=>'禎','穀'=>'穀','突'=>'突','節'=>'節','練'=>'練','縉'=>'縉','繁'=>'繁','署'=>'署','者'=>'者','臭'=>'臭','艹'=>'艹','艹'=>'艹','著'=>'著','褐'=>'褐','視'=>'視','謁'=>'謁','謹'=>'謹','賓'=>'賓','贈'=>'贈','辶'=>'辶','逸'=>'逸','難'=>'難','響'=>'響','頻'=>'頻','並'=>'並','况'=>'况','全'=>'全','侀'=>'侀','充'=>'充','冀'=>'冀','勇'=>'勇','勺'=>'勺','喝'=>'喝','啕'=>'啕','喙'=>'喙','嗢'=>'嗢','塚'=>'塚','墳'=>'墳','奄'=>'奄','奔'=>'奔','婢'=>'婢','嬨'=>'嬨','廒'=>'廒','廙'=>'廙','彩'=>'彩','徭'=>'徭','惘'=>'惘','慎'=>'慎','愈'=>'愈','憎'=>'憎','慠'=>'慠','懲'=>'懲','戴'=>'戴','揄'=>'揄','搜'=>'搜','摒'=>'摒','敖'=>'敖','晴'=>'晴','朗'=>'朗','望'=>'望','杖'=>'杖','歹'=>'歹','殺'=>'殺','流'=>'流','滛'=>'滛','滋'=>'滋','漢'=>'漢','瀞'=>'瀞','煮'=>'煮','瞧'=>'瞧','爵'=>'爵','犯'=>'犯','猪'=>'猪','瑱'=>'瑱','甆'=>'甆','画'=>'画','瘝'=>'瘝','瘟'=>'瘟','益'=>'益','盛'=>'盛','直'=>'直','睊'=>'睊','着'=>'着','磌'=>'磌','窱'=>'窱','節'=>'節','类'=>'类','絛'=>'絛','練'=>'練','缾'=>'缾','者'=>'者','荒'=>'荒','華'=>'華','蝹'=>'蝹','襁'=>'襁','覆'=>'覆','視'=>'視','調'=>'調','諸'=>'諸','請'=>'請','謁'=>'謁','諾'=>'諾','諭'=>'諭','謹'=>'謹','變'=>'變','贈'=>'贈','輸'=>'輸','遲'=>'遲','醙'=>'醙','鉶'=>'鉶','陼'=>'陼','難'=>'難','靖'=>'靖','韛'=>'韛','響'=>'響','頋'=>'頋','頻'=>'頻','鬒'=>'鬒','龜'=>'龜','𢡊'=>'𢡊','𢡄'=>'𢡄','𣏕'=>'𣏕','㮝'=>'㮝','䀘'=>'䀘','䀹'=>'䀹','𥉉'=>'𥉉','𥳐'=>'𥳐','𧻓'=>'𧻓','齃'=>'齃','龎'=>'龎','ff'=>'ff','fi'=>'fi','fl'=>'fl','ffi'=>'ffi','ffl'=>'ffl','ſt'=>'st','st'=>'st','ﬓ'=>'մն','ﬔ'=>'մե','ﬕ'=>'մի','ﬖ'=>'վն','ﬗ'=>'մխ','יִ'=>'יִ','ײַ'=>'ײַ','ﬠ'=>'ע','ﬡ'=>'א','ﬢ'=>'ד','ﬣ'=>'ה','ﬤ'=>'כ','ﬥ'=>'ל','ﬦ'=>'ם','ﬧ'=>'ר','ﬨ'=>'ת','﬩'=>'+','שׁ'=>'שׁ','שׂ'=>'שׂ','שּׁ'=>'שּׁ','שּׂ'=>'שּׂ','אַ'=>'אַ','אָ'=>'אָ','אּ'=>'אּ','בּ'=>'בּ','גּ'=>'גּ','דּ'=>'דּ','הּ'=>'הּ','וּ'=>'וּ','זּ'=>'זּ','טּ'=>'טּ','יּ'=>'יּ','ךּ'=>'ךּ','כּ'=>'כּ','לּ'=>'לּ','מּ'=>'מּ','נּ'=>'נּ','סּ'=>'סּ','ףּ'=>'ףּ','פּ'=>'פּ','צּ'=>'צּ','קּ'=>'קּ','רּ'=>'רּ','שּ'=>'שּ','תּ'=>'תּ','וֹ'=>'וֹ','בֿ'=>'בֿ','כֿ'=>'כֿ','פֿ'=>'פֿ','ﭏ'=>'אל','ﭐ'=>'ٱ','ﭑ'=>'ٱ','ﭒ'=>'ٻ','ﭓ'=>'ٻ','ﭔ'=>'ٻ','ﭕ'=>'ٻ','ﭖ'=>'پ','ﭗ'=>'پ','ﭘ'=>'پ','ﭙ'=>'پ','ﭚ'=>'ڀ','ﭛ'=>'ڀ','ﭜ'=>'ڀ','ﭝ'=>'ڀ','ﭞ'=>'ٺ','ﭟ'=>'ٺ','ﭠ'=>'ٺ','ﭡ'=>'ٺ','ﭢ'=>'ٿ','ﭣ'=>'ٿ','ﭤ'=>'ٿ','ﭥ'=>'ٿ','ﭦ'=>'ٹ','ﭧ'=>'ٹ','ﭨ'=>'ٹ','ﭩ'=>'ٹ','ﭪ'=>'ڤ','ﭫ'=>'ڤ','ﭬ'=>'ڤ','ﭭ'=>'ڤ','ﭮ'=>'ڦ','ﭯ'=>'ڦ','ﭰ'=>'ڦ','ﭱ'=>'ڦ','ﭲ'=>'ڄ','ﭳ'=>'ڄ','ﭴ'=>'ڄ','ﭵ'=>'ڄ','ﭶ'=>'ڃ','ﭷ'=>'ڃ','ﭸ'=>'ڃ','ﭹ'=>'ڃ','ﭺ'=>'چ','ﭻ'=>'چ','ﭼ'=>'چ','ﭽ'=>'چ','ﭾ'=>'ڇ','ﭿ'=>'ڇ','ﮀ'=>'ڇ','ﮁ'=>'ڇ','ﮂ'=>'ڍ','ﮃ'=>'ڍ','ﮄ'=>'ڌ','ﮅ'=>'ڌ','ﮆ'=>'ڎ','ﮇ'=>'ڎ','ﮈ'=>'ڈ','ﮉ'=>'ڈ','ﮊ'=>'ژ','ﮋ'=>'ژ','ﮌ'=>'ڑ','ﮍ'=>'ڑ','ﮎ'=>'ک','ﮏ'=>'ک','ﮐ'=>'ک','ﮑ'=>'ک','ﮒ'=>'گ','ﮓ'=>'گ','ﮔ'=>'گ','ﮕ'=>'گ','ﮖ'=>'ڳ','ﮗ'=>'ڳ','ﮘ'=>'ڳ','ﮙ'=>'ڳ','ﮚ'=>'ڱ','ﮛ'=>'ڱ','ﮜ'=>'ڱ','ﮝ'=>'ڱ','ﮞ'=>'ں','ﮟ'=>'ں','ﮠ'=>'ڻ','ﮡ'=>'ڻ','ﮢ'=>'ڻ','ﮣ'=>'ڻ','ﮤ'=>'ۀ','ﮥ'=>'ۀ','ﮦ'=>'ہ','ﮧ'=>'ہ','ﮨ'=>'ہ','ﮩ'=>'ہ','ﮪ'=>'ھ','ﮫ'=>'ھ','ﮬ'=>'ھ','ﮭ'=>'ھ','ﮮ'=>'ے','ﮯ'=>'ے','ﮰ'=>'ۓ','ﮱ'=>'ۓ','ﯓ'=>'ڭ','ﯔ'=>'ڭ','ﯕ'=>'ڭ','ﯖ'=>'ڭ','ﯗ'=>'ۇ','ﯘ'=>'ۇ','ﯙ'=>'ۆ','ﯚ'=>'ۆ','ﯛ'=>'ۈ','ﯜ'=>'ۈ','ﯝ'=>'ۇٴ','ﯞ'=>'ۋ','ﯟ'=>'ۋ','ﯠ'=>'ۅ','ﯡ'=>'ۅ','ﯢ'=>'ۉ','ﯣ'=>'ۉ','ﯤ'=>'ې','ﯥ'=>'ې','ﯦ'=>'ې','ﯧ'=>'ې','ﯨ'=>'ى','ﯩ'=>'ى','ﯪ'=>'ئا','ﯫ'=>'ئا','ﯬ'=>'ئە','ﯭ'=>'ئە','ﯮ'=>'ئو','ﯯ'=>'ئو','ﯰ'=>'ئۇ','ﯱ'=>'ئۇ','ﯲ'=>'ئۆ','ﯳ'=>'ئۆ','ﯴ'=>'ئۈ','ﯵ'=>'ئۈ','ﯶ'=>'ئې','ﯷ'=>'ئې','ﯸ'=>'ئې','ﯹ'=>'ئى','ﯺ'=>'ئى','ﯻ'=>'ئى','ﯼ'=>'ی','ﯽ'=>'ی','ﯾ'=>'ی','ﯿ'=>'ی','ﰀ'=>'ئج','ﰁ'=>'ئح','ﰂ'=>'ئم','ﰃ'=>'ئى','ﰄ'=>'ئي','ﰅ'=>'بج','ﰆ'=>'بح','ﰇ'=>'بخ','ﰈ'=>'بم','ﰉ'=>'بى','ﰊ'=>'بي','ﰋ'=>'تج','ﰌ'=>'تح','ﰍ'=>'تخ','ﰎ'=>'تم','ﰏ'=>'تى','ﰐ'=>'تي','ﰑ'=>'ثج','ﰒ'=>'ثم','ﰓ'=>'ثى','ﰔ'=>'ثي','ﰕ'=>'جح','ﰖ'=>'جم','ﰗ'=>'حج','ﰘ'=>'حم','ﰙ'=>'خج','ﰚ'=>'خح','ﰛ'=>'خم','ﰜ'=>'سج','ﰝ'=>'سح','ﰞ'=>'سخ','ﰟ'=>'سم','ﰠ'=>'صح','ﰡ'=>'صم','ﰢ'=>'ضج','ﰣ'=>'ضح','ﰤ'=>'ضخ','ﰥ'=>'ضم','ﰦ'=>'طح','ﰧ'=>'طم','ﰨ'=>'ظم','ﰩ'=>'عج','ﰪ'=>'عم','ﰫ'=>'غج','ﰬ'=>'غم','ﰭ'=>'فج','ﰮ'=>'فح','ﰯ'=>'فخ','ﰰ'=>'فم','ﰱ'=>'فى','ﰲ'=>'في','ﰳ'=>'قح','ﰴ'=>'قم','ﰵ'=>'قى','ﰶ'=>'قي','ﰷ'=>'كا','ﰸ'=>'كج','ﰹ'=>'كح','ﰺ'=>'كخ','ﰻ'=>'كل','ﰼ'=>'كم','ﰽ'=>'كى','ﰾ'=>'كي','ﰿ'=>'لج','ﱀ'=>'لح','ﱁ'=>'لخ','ﱂ'=>'لم','ﱃ'=>'لى','ﱄ'=>'لي','ﱅ'=>'مج','ﱆ'=>'مح','ﱇ'=>'مخ','ﱈ'=>'مم','ﱉ'=>'مى','ﱊ'=>'مي','ﱋ'=>'نج','ﱌ'=>'نح','ﱍ'=>'نخ','ﱎ'=>'نم','ﱏ'=>'نى','ﱐ'=>'ني','ﱑ'=>'هج','ﱒ'=>'هم','ﱓ'=>'هى','ﱔ'=>'هي','ﱕ'=>'يج','ﱖ'=>'يح','ﱗ'=>'يخ','ﱘ'=>'يم','ﱙ'=>'يى','ﱚ'=>'يي','ﱛ'=>'ذٰ','ﱜ'=>'رٰ','ﱝ'=>'ىٰ','ﱞ'=>' ٌّ','ﱟ'=>' ٍّ','ﱠ'=>' َّ','ﱡ'=>' ُّ','ﱢ'=>' ِّ','ﱣ'=>' ّٰ','ﱤ'=>'ئر','ﱥ'=>'ئز','ﱦ'=>'ئم','ﱧ'=>'ئن','ﱨ'=>'ئى','ﱩ'=>'ئي','ﱪ'=>'بر','ﱫ'=>'بز','ﱬ'=>'بم','ﱭ'=>'بن','ﱮ'=>'بى','ﱯ'=>'بي','ﱰ'=>'تر','ﱱ'=>'تز','ﱲ'=>'تم','ﱳ'=>'تن','ﱴ'=>'تى','ﱵ'=>'تي','ﱶ'=>'ثر','ﱷ'=>'ثز','ﱸ'=>'ثم','ﱹ'=>'ثن','ﱺ'=>'ثى','ﱻ'=>'ثي','ﱼ'=>'فى','ﱽ'=>'في','ﱾ'=>'قى','ﱿ'=>'قي','ﲀ'=>'كا','ﲁ'=>'كل','ﲂ'=>'كم','ﲃ'=>'كى','ﲄ'=>'كي','ﲅ'=>'لم','ﲆ'=>'لى','ﲇ'=>'لي','ﲈ'=>'ما','ﲉ'=>'مم','ﲊ'=>'نر','ﲋ'=>'نز','ﲌ'=>'نم','ﲍ'=>'نن','ﲎ'=>'نى','ﲏ'=>'ني','ﲐ'=>'ىٰ','ﲑ'=>'ير','ﲒ'=>'يز','ﲓ'=>'يم','ﲔ'=>'ين','ﲕ'=>'يى','ﲖ'=>'يي','ﲗ'=>'ئج','ﲘ'=>'ئح','ﲙ'=>'ئخ','ﲚ'=>'ئم','ﲛ'=>'ئه','ﲜ'=>'بج','ﲝ'=>'بح','ﲞ'=>'بخ','ﲟ'=>'بم','ﲠ'=>'به','ﲡ'=>'تج','ﲢ'=>'تح','ﲣ'=>'تخ','ﲤ'=>'تم','ﲥ'=>'ته','ﲦ'=>'ثم','ﲧ'=>'جح','ﲨ'=>'جم','ﲩ'=>'حج','ﲪ'=>'حم','ﲫ'=>'خج','ﲬ'=>'خم','ﲭ'=>'سج','ﲮ'=>'سح','ﲯ'=>'سخ','ﲰ'=>'سم','ﲱ'=>'صح','ﲲ'=>'صخ','ﲳ'=>'صم','ﲴ'=>'ضج','ﲵ'=>'ضح','ﲶ'=>'ضخ','ﲷ'=>'ضم','ﲸ'=>'طح','ﲹ'=>'ظم','ﲺ'=>'عج','ﲻ'=>'عم','ﲼ'=>'غج','ﲽ'=>'غم','ﲾ'=>'فج','ﲿ'=>'فح','ﳀ'=>'فخ','ﳁ'=>'فم','ﳂ'=>'قح','ﳃ'=>'قم','ﳄ'=>'كج','ﳅ'=>'كح','ﳆ'=>'كخ','ﳇ'=>'كل','ﳈ'=>'كم','ﳉ'=>'لج','ﳊ'=>'لح','ﳋ'=>'لخ','ﳌ'=>'لم','ﳍ'=>'له','ﳎ'=>'مج','ﳏ'=>'مح','ﳐ'=>'مخ','ﳑ'=>'مم','ﳒ'=>'نج','ﳓ'=>'نح','ﳔ'=>'نخ','ﳕ'=>'نم','ﳖ'=>'نه','ﳗ'=>'هج','ﳘ'=>'هم','ﳙ'=>'هٰ','ﳚ'=>'يج','ﳛ'=>'يح','ﳜ'=>'يخ','ﳝ'=>'يم','ﳞ'=>'يه','ﳟ'=>'ئم','ﳠ'=>'ئه','ﳡ'=>'بم','ﳢ'=>'به','ﳣ'=>'تم','ﳤ'=>'ته','ﳥ'=>'ثم','ﳦ'=>'ثه','ﳧ'=>'سم','ﳨ'=>'سه','ﳩ'=>'شم','ﳪ'=>'شه','ﳫ'=>'كل','ﳬ'=>'كم','ﳭ'=>'لم','ﳮ'=>'نم','ﳯ'=>'نه','ﳰ'=>'يم','ﳱ'=>'يه','ﳲ'=>'ـَّ','ﳳ'=>'ـُّ','ﳴ'=>'ـِّ','ﳵ'=>'طى','ﳶ'=>'طي','ﳷ'=>'عى','ﳸ'=>'عي','ﳹ'=>'غى','ﳺ'=>'غي','ﳻ'=>'سى','ﳼ'=>'سي','ﳽ'=>'شى','ﳾ'=>'شي','ﳿ'=>'حى','ﴀ'=>'حي','ﴁ'=>'جى','ﴂ'=>'جي','ﴃ'=>'خى','ﴄ'=>'خي','ﴅ'=>'صى','ﴆ'=>'صي','ﴇ'=>'ضى','ﴈ'=>'ضي','ﴉ'=>'شج','ﴊ'=>'شح','ﴋ'=>'شخ','ﴌ'=>'شم','ﴍ'=>'شر','ﴎ'=>'سر','ﴏ'=>'صر','ﴐ'=>'ضر','ﴑ'=>'طى','ﴒ'=>'طي','ﴓ'=>'عى','ﴔ'=>'عي','ﴕ'=>'غى','ﴖ'=>'غي','ﴗ'=>'سى','ﴘ'=>'سي','ﴙ'=>'شى','ﴚ'=>'شي','ﴛ'=>'حى','ﴜ'=>'حي','ﴝ'=>'جى','ﴞ'=>'جي','ﴟ'=>'خى','ﴠ'=>'خي','ﴡ'=>'صى','ﴢ'=>'صي','ﴣ'=>'ضى','ﴤ'=>'ضي','ﴥ'=>'شج','ﴦ'=>'شح','ﴧ'=>'شخ','ﴨ'=>'شم','ﴩ'=>'شر','ﴪ'=>'سر','ﴫ'=>'صر','ﴬ'=>'ضر','ﴭ'=>'شج','ﴮ'=>'شح','ﴯ'=>'شخ','ﴰ'=>'شم','ﴱ'=>'سه','ﴲ'=>'شه','ﴳ'=>'طم','ﴴ'=>'سج','ﴵ'=>'سح','ﴶ'=>'سخ','ﴷ'=>'شج','ﴸ'=>'شح','ﴹ'=>'شخ','ﴺ'=>'طم','ﴻ'=>'ظم','ﴼ'=>'اً','ﴽ'=>'اً','ﵐ'=>'تجم','ﵑ'=>'تحج','ﵒ'=>'تحج','ﵓ'=>'تحم','ﵔ'=>'تخم','ﵕ'=>'تمج','ﵖ'=>'تمح','ﵗ'=>'تمخ','ﵘ'=>'جمح','ﵙ'=>'جمح','ﵚ'=>'حمي','ﵛ'=>'حمى','ﵜ'=>'سحج','ﵝ'=>'سجح','ﵞ'=>'سجى','ﵟ'=>'سمح','ﵠ'=>'سمح','ﵡ'=>'سمج','ﵢ'=>'سمم','ﵣ'=>'سمم','ﵤ'=>'صحح','ﵥ'=>'صحح','ﵦ'=>'صمم','ﵧ'=>'شحم','ﵨ'=>'شحم','ﵩ'=>'شجي','ﵪ'=>'شمخ','ﵫ'=>'شمخ','ﵬ'=>'شمم','ﵭ'=>'شمم','ﵮ'=>'ضحى','ﵯ'=>'ضخم','ﵰ'=>'ضخم','ﵱ'=>'طمح','ﵲ'=>'طمح','ﵳ'=>'طمم','ﵴ'=>'طمي','ﵵ'=>'عجم','ﵶ'=>'عمم','ﵷ'=>'عمم','ﵸ'=>'عمى','ﵹ'=>'غمم','ﵺ'=>'غمي','ﵻ'=>'غمى','ﵼ'=>'فخم','ﵽ'=>'فخم','ﵾ'=>'قمح','ﵿ'=>'قمم','ﶀ'=>'لحم','ﶁ'=>'لحي','ﶂ'=>'لحى','ﶃ'=>'لجج','ﶄ'=>'لجج','ﶅ'=>'لخم','ﶆ'=>'لخم','ﶇ'=>'لمح','ﶈ'=>'لمح','ﶉ'=>'محج','ﶊ'=>'محم','ﶋ'=>'محي','ﶌ'=>'مجح','ﶍ'=>'مجم','ﶎ'=>'مخج','ﶏ'=>'مخم','ﶒ'=>'مجخ','ﶓ'=>'همج','ﶔ'=>'همم','ﶕ'=>'نحم','ﶖ'=>'نحى','ﶗ'=>'نجم','ﶘ'=>'نجم','ﶙ'=>'نجى','ﶚ'=>'نمي','ﶛ'=>'نمى','ﶜ'=>'يمم','ﶝ'=>'يمم','ﶞ'=>'بخي','ﶟ'=>'تجي','ﶠ'=>'تجى','ﶡ'=>'تخي','ﶢ'=>'تخى','ﶣ'=>'تمي','ﶤ'=>'تمى','ﶥ'=>'جمي','ﶦ'=>'جحى','ﶧ'=>'جمى','ﶨ'=>'سخى','ﶩ'=>'صحي','ﶪ'=>'شحي','ﶫ'=>'ضحي','ﶬ'=>'لجي','ﶭ'=>'لمي','ﶮ'=>'يحي','ﶯ'=>'يجي','ﶰ'=>'يمي','ﶱ'=>'ممي','ﶲ'=>'قمي','ﶳ'=>'نحي','ﶴ'=>'قمح','ﶵ'=>'لحم','ﶶ'=>'عمي','ﶷ'=>'كمي','ﶸ'=>'نجح','ﶹ'=>'مخي','ﶺ'=>'لجم','ﶻ'=>'كمم','ﶼ'=>'لجم','ﶽ'=>'نجح','ﶾ'=>'جحي','ﶿ'=>'حجي','ﷀ'=>'مجي','ﷁ'=>'فمي','ﷂ'=>'بحي','ﷃ'=>'كمم','ﷄ'=>'عجم','ﷅ'=>'صمم','ﷆ'=>'سخي','ﷇ'=>'نجي','ﷰ'=>'صلے','ﷱ'=>'قلے','ﷲ'=>'الله','ﷳ'=>'اكبر','ﷴ'=>'محمد','ﷵ'=>'صلعم','ﷶ'=>'رسول','ﷷ'=>'عليه','ﷸ'=>'وسلم','ﷹ'=>'صلى','ﷺ'=>'صلى الله عليه وسلم','ﷻ'=>'جل جلاله','﷼'=>'ریال','︐'=>',','︑'=>'、','︒'=>'。','︓'=>':','︔'=>';','︕'=>'!','︖'=>'?','︗'=>'〖','︘'=>'〗','︙'=>'...','︰'=>'..','︱'=>'—','︲'=>'–','︳'=>'_','︴'=>'_','︵'=>'(','︶'=>')','︷'=>'{','︸'=>'}','︹'=>'〔','︺'=>'〕','︻'=>'【','︼'=>'】','︽'=>'《','︾'=>'》','︿'=>'〈','﹀'=>'〉','﹁'=>'「','﹂'=>'」','﹃'=>'『','﹄'=>'』','﹇'=>'[','﹈'=>']','﹉'=>' ̅','﹊'=>' ̅','﹋'=>' ̅','﹌'=>' ̅','﹍'=>'_','﹎'=>'_','﹏'=>'_','﹐'=>',','﹑'=>'、','﹒'=>'.','﹔'=>';','﹕'=>':','﹖'=>'?','﹗'=>'!','﹘'=>'—','﹙'=>'(','﹚'=>')','﹛'=>'{','﹜'=>'}','﹝'=>'〔','﹞'=>'〕','﹟'=>'#','﹠'=>'&','﹡'=>'*','﹢'=>'+','﹣'=>'-','﹤'=>'<','﹥'=>'>','﹦'=>'=','﹨'=>'\\','﹩'=>'$','﹪'=>'%','﹫'=>'@','ﹰ'=>' ً','ﹱ'=>'ـً','ﹲ'=>' ٌ','ﹴ'=>' ٍ','ﹶ'=>' َ','ﹷ'=>'ـَ','ﹸ'=>' ُ','ﹹ'=>'ـُ','ﹺ'=>' ِ','ﹻ'=>'ـِ','ﹼ'=>' ّ','ﹽ'=>'ـّ','ﹾ'=>' ْ','ﹿ'=>'ـْ','ﺀ'=>'ء','ﺁ'=>'آ','ﺂ'=>'آ','ﺃ'=>'أ','ﺄ'=>'أ','ﺅ'=>'ؤ','ﺆ'=>'ؤ','ﺇ'=>'إ','ﺈ'=>'إ','ﺉ'=>'ئ','ﺊ'=>'ئ','ﺋ'=>'ئ','ﺌ'=>'ئ','ﺍ'=>'ا','ﺎ'=>'ا','ﺏ'=>'ب','ﺐ'=>'ب','ﺑ'=>'ب','ﺒ'=>'ب','ﺓ'=>'ة','ﺔ'=>'ة','ﺕ'=>'ت','ﺖ'=>'ت','ﺗ'=>'ت','ﺘ'=>'ت','ﺙ'=>'ث','ﺚ'=>'ث','ﺛ'=>'ث','ﺜ'=>'ث','ﺝ'=>'ج','ﺞ'=>'ج','ﺟ'=>'ج','ﺠ'=>'ج','ﺡ'=>'ح','ﺢ'=>'ح','ﺣ'=>'ح','ﺤ'=>'ح','ﺥ'=>'خ','ﺦ'=>'خ','ﺧ'=>'خ','ﺨ'=>'خ','ﺩ'=>'د','ﺪ'=>'د','ﺫ'=>'ذ','ﺬ'=>'ذ','ﺭ'=>'ر','ﺮ'=>'ر','ﺯ'=>'ز','ﺰ'=>'ز','ﺱ'=>'س','ﺲ'=>'س','ﺳ'=>'س','ﺴ'=>'س','ﺵ'=>'ش','ﺶ'=>'ش','ﺷ'=>'ش','ﺸ'=>'ش','ﺹ'=>'ص','ﺺ'=>'ص','ﺻ'=>'ص','ﺼ'=>'ص','ﺽ'=>'ض','ﺾ'=>'ض','ﺿ'=>'ض','ﻀ'=>'ض','ﻁ'=>'ط','ﻂ'=>'ط','ﻃ'=>'ط','ﻄ'=>'ط','ﻅ'=>'ظ','ﻆ'=>'ظ','ﻇ'=>'ظ','ﻈ'=>'ظ','ﻉ'=>'ع','ﻊ'=>'ع','ﻋ'=>'ع','ﻌ'=>'ع','ﻍ'=>'غ','ﻎ'=>'غ','ﻏ'=>'غ','ﻐ'=>'غ','ﻑ'=>'ف','ﻒ'=>'ف','ﻓ'=>'ف','ﻔ'=>'ف','ﻕ'=>'ق','ﻖ'=>'ق','ﻗ'=>'ق','ﻘ'=>'ق','ﻙ'=>'ك','ﻚ'=>'ك','ﻛ'=>'ك','ﻜ'=>'ك','ﻝ'=>'ل','ﻞ'=>'ل','ﻟ'=>'ل','ﻠ'=>'ل','ﻡ'=>'م','ﻢ'=>'م','ﻣ'=>'م','ﻤ'=>'م','ﻥ'=>'ن','ﻦ'=>'ن','ﻧ'=>'ن','ﻨ'=>'ن','ﻩ'=>'ه','ﻪ'=>'ه','ﻫ'=>'ه','ﻬ'=>'ه','ﻭ'=>'و','ﻮ'=>'و','ﻯ'=>'ى','ﻰ'=>'ى','ﻱ'=>'ي','ﻲ'=>'ي','ﻳ'=>'ي','ﻴ'=>'ي','ﻵ'=>'لآ','ﻶ'=>'لآ','ﻷ'=>'لأ','ﻸ'=>'لأ','ﻹ'=>'لإ','ﻺ'=>'لإ','ﻻ'=>'لا','ﻼ'=>'لا','!'=>'!','"'=>'"','#'=>'#','$'=>'$','%'=>'%','&'=>'&','''=>'\'','('=>'(',')'=>')','*'=>'*','+'=>'+',','=>',','-'=>'-','.'=>'.','/'=>'/','0'=>'0','1'=>'1','2'=>'2','3'=>'3','4'=>'4','5'=>'5','6'=>'6','7'=>'7','8'=>'8','9'=>'9',':'=>':',';'=>';','<'=>'<','='=>'=','>'=>'>','?'=>'?','@'=>'@','A'=>'A','B'=>'B','C'=>'C','D'=>'D','E'=>'E','F'=>'F','G'=>'G','H'=>'H','I'=>'I','J'=>'J','K'=>'K','L'=>'L','M'=>'M','N'=>'N','O'=>'O','P'=>'P','Q'=>'Q','R'=>'R','S'=>'S','T'=>'T','U'=>'U','V'=>'V','W'=>'W','X'=>'X','Y'=>'Y','Z'=>'Z','['=>'[','\'=>'\\',']'=>']','^'=>'^','_'=>'_','`'=>'`','a'=>'a','b'=>'b','c'=>'c','d'=>'d','e'=>'e','f'=>'f','g'=>'g','h'=>'h','i'=>'i','j'=>'j','k'=>'k','l'=>'l','m'=>'m','n'=>'n','o'=>'o','p'=>'p','q'=>'q','r'=>'r','s'=>'s','t'=>'t','u'=>'u','v'=>'v','w'=>'w','x'=>'x','y'=>'y','z'=>'z','{'=>'{','|'=>'|','}'=>'}','~'=>'~','⦅'=>'⦅','⦆'=>'⦆','。'=>'。','「'=>'「','」'=>'」','、'=>'、','・'=>'・','ヲ'=>'ヲ','ァ'=>'ァ','ィ'=>'ィ','ゥ'=>'ゥ','ェ'=>'ェ','ォ'=>'ォ','ャ'=>'ャ','ュ'=>'ュ','ョ'=>'ョ','ッ'=>'ッ','ー'=>'ー','ア'=>'ア','イ'=>'イ','ウ'=>'ウ','エ'=>'エ','オ'=>'オ','カ'=>'カ','キ'=>'キ','ク'=>'ク','ケ'=>'ケ','コ'=>'コ','サ'=>'サ','シ'=>'シ','ス'=>'ス','セ'=>'セ','ソ'=>'ソ','タ'=>'タ','チ'=>'チ','ツ'=>'ツ','テ'=>'テ','ト'=>'ト','ナ'=>'ナ','ニ'=>'ニ','ヌ'=>'ヌ','ネ'=>'ネ','ノ'=>'ノ','ハ'=>'ハ','ヒ'=>'ヒ','フ'=>'フ','ヘ'=>'ヘ','ホ'=>'ホ','マ'=>'マ','ミ'=>'ミ','ム'=>'ム','メ'=>'メ','モ'=>'モ','ヤ'=>'ヤ','ユ'=>'ユ','ヨ'=>'ヨ','ラ'=>'ラ','リ'=>'リ','ル'=>'ル','レ'=>'レ','ロ'=>'ロ','ワ'=>'ワ','ン'=>'ン','゙'=>'゙','゚'=>'゚','ᅠ'=>'ᅠ','ᄀ'=>'ᄀ','ᄁ'=>'ᄁ','ᆪ'=>'ᆪ','ᄂ'=>'ᄂ','ᆬ'=>'ᆬ','ᆭ'=>'ᆭ','ᄃ'=>'ᄃ','ᄄ'=>'ᄄ','ᄅ'=>'ᄅ','ᆰ'=>'ᆰ','ᆱ'=>'ᆱ','ᆲ'=>'ᆲ','ᆳ'=>'ᆳ','ᆴ'=>'ᆴ','ᆵ'=>'ᆵ','ᄚ'=>'ᄚ','ᄆ'=>'ᄆ','ᄇ'=>'ᄇ','ᄈ'=>'ᄈ','ᄡ'=>'ᄡ','ᄉ'=>'ᄉ','ᄊ'=>'ᄊ','ᄋ'=>'ᄋ','ᄌ'=>'ᄌ','ᄍ'=>'ᄍ','ᄎ'=>'ᄎ','ᄏ'=>'ᄏ','ᄐ'=>'ᄐ','ᄑ'=>'ᄑ','ᄒ'=>'ᄒ','ᅡ'=>'ᅡ','ᅢ'=>'ᅢ','ᅣ'=>'ᅣ','ᅤ'=>'ᅤ','ᅥ'=>'ᅥ','ᅦ'=>'ᅦ','ᅧ'=>'ᅧ','ᅨ'=>'ᅨ','ᅩ'=>'ᅩ','ᅪ'=>'ᅪ','ᅫ'=>'ᅫ','ᅬ'=>'ᅬ','ᅭ'=>'ᅭ','ᅮ'=>'ᅮ','ᅯ'=>'ᅯ','ᅰ'=>'ᅰ','ᅱ'=>'ᅱ','ᅲ'=>'ᅲ','ᅳ'=>'ᅳ','ᅴ'=>'ᅴ','ᅵ'=>'ᅵ','¢'=>'¢','£'=>'£','¬'=>'¬',' ̄'=>' ̄','¦'=>'¦','¥'=>'¥','₩'=>'₩','│'=>'│','←'=>'←','↑'=>'↑','→'=>'→','↓'=>'↓','■'=>'■','○'=>'○','𝅗𝅥'=>'𝅗𝅥','𝅘𝅥'=>'𝅘𝅥','𝅘𝅥𝅮'=>'𝅘𝅥𝅮','𝅘𝅥𝅯'=>'𝅘𝅥𝅯','𝅘𝅥𝅰'=>'𝅘𝅥𝅰','𝅘𝅥𝅱'=>'𝅘𝅥𝅱','𝅘𝅥𝅲'=>'𝅘𝅥𝅲','𝆹𝅥'=>'𝆹𝅥','𝆺𝅥'=>'𝆺𝅥','𝆹𝅥𝅮'=>'𝆹𝅥𝅮','𝆺𝅥𝅮'=>'𝆺𝅥𝅮','𝆹𝅥𝅯'=>'𝆹𝅥𝅯','𝆺𝅥𝅯'=>'𝆺𝅥𝅯','𝐀'=>'A','𝐁'=>'B','𝐂'=>'C','𝐃'=>'D','𝐄'=>'E','𝐅'=>'F','𝐆'=>'G','𝐇'=>'H','𝐈'=>'I','𝐉'=>'J','𝐊'=>'K','𝐋'=>'L','𝐌'=>'M','𝐍'=>'N','𝐎'=>'O','𝐏'=>'P','𝐐'=>'Q','𝐑'=>'R','𝐒'=>'S','𝐓'=>'T','𝐔'=>'U','𝐕'=>'V','𝐖'=>'W','𝐗'=>'X','𝐘'=>'Y','𝐙'=>'Z','𝐚'=>'a','𝐛'=>'b','𝐜'=>'c','𝐝'=>'d','𝐞'=>'e','𝐟'=>'f','𝐠'=>'g','𝐡'=>'h','𝐢'=>'i','𝐣'=>'j','𝐤'=>'k','𝐥'=>'l','𝐦'=>'m','𝐧'=>'n','𝐨'=>'o','𝐩'=>'p','𝐪'=>'q','𝐫'=>'r','𝐬'=>'s','𝐭'=>'t','𝐮'=>'u','𝐯'=>'v','𝐰'=>'w','𝐱'=>'x','𝐲'=>'y','𝐳'=>'z','𝐴'=>'A','𝐵'=>'B','𝐶'=>'C','𝐷'=>'D','𝐸'=>'E','𝐹'=>'F','𝐺'=>'G','𝐻'=>'H','𝐼'=>'I','𝐽'=>'J','𝐾'=>'K','𝐿'=>'L','𝑀'=>'M','𝑁'=>'N','𝑂'=>'O','𝑃'=>'P','𝑄'=>'Q','𝑅'=>'R','𝑆'=>'S','𝑇'=>'T','𝑈'=>'U','𝑉'=>'V','𝑊'=>'W','𝑋'=>'X','𝑌'=>'Y','𝑍'=>'Z','𝑎'=>'a','𝑏'=>'b','𝑐'=>'c','𝑑'=>'d','𝑒'=>'e','𝑓'=>'f','𝑔'=>'g','𝑖'=>'i','𝑗'=>'j','𝑘'=>'k','𝑙'=>'l','𝑚'=>'m','𝑛'=>'n','𝑜'=>'o','𝑝'=>'p','𝑞'=>'q','𝑟'=>'r','𝑠'=>'s','𝑡'=>'t','𝑢'=>'u','𝑣'=>'v','𝑤'=>'w','𝑥'=>'x','𝑦'=>'y','𝑧'=>'z','𝑨'=>'A','𝑩'=>'B','𝑪'=>'C','𝑫'=>'D','𝑬'=>'E','𝑭'=>'F','𝑮'=>'G','𝑯'=>'H','𝑰'=>'I','𝑱'=>'J','𝑲'=>'K','𝑳'=>'L','𝑴'=>'M','𝑵'=>'N','𝑶'=>'O','𝑷'=>'P','𝑸'=>'Q','𝑹'=>'R','𝑺'=>'S','𝑻'=>'T','𝑼'=>'U','𝑽'=>'V','𝑾'=>'W','𝑿'=>'X','𝒀'=>'Y','𝒁'=>'Z','𝒂'=>'a','𝒃'=>'b','𝒄'=>'c','𝒅'=>'d','𝒆'=>'e','𝒇'=>'f','𝒈'=>'g','𝒉'=>'h','𝒊'=>'i','𝒋'=>'j','𝒌'=>'k','𝒍'=>'l','𝒎'=>'m','𝒏'=>'n','𝒐'=>'o','𝒑'=>'p','𝒒'=>'q','𝒓'=>'r','𝒔'=>'s','𝒕'=>'t','𝒖'=>'u','𝒗'=>'v','𝒘'=>'w','𝒙'=>'x','𝒚'=>'y','𝒛'=>'z','𝒜'=>'A','𝒞'=>'C','𝒟'=>'D','𝒢'=>'G','𝒥'=>'J','𝒦'=>'K','𝒩'=>'N','𝒪'=>'O','𝒫'=>'P','𝒬'=>'Q','𝒮'=>'S','𝒯'=>'T','𝒰'=>'U','𝒱'=>'V','𝒲'=>'W','𝒳'=>'X','𝒴'=>'Y','𝒵'=>'Z','𝒶'=>'a','𝒷'=>'b','𝒸'=>'c','𝒹'=>'d','𝒻'=>'f','𝒽'=>'h','𝒾'=>'i','𝒿'=>'j','𝓀'=>'k','𝓁'=>'l','𝓂'=>'m','𝓃'=>'n','𝓅'=>'p','𝓆'=>'q','𝓇'=>'r','𝓈'=>'s','𝓉'=>'t','𝓊'=>'u','𝓋'=>'v','𝓌'=>'w','𝓍'=>'x','𝓎'=>'y','𝓏'=>'z','𝓐'=>'A','𝓑'=>'B','𝓒'=>'C','𝓓'=>'D','𝓔'=>'E','𝓕'=>'F','𝓖'=>'G','𝓗'=>'H','𝓘'=>'I','𝓙'=>'J','𝓚'=>'K','𝓛'=>'L','𝓜'=>'M','𝓝'=>'N','𝓞'=>'O','𝓟'=>'P','𝓠'=>'Q','𝓡'=>'R','𝓢'=>'S','𝓣'=>'T','𝓤'=>'U','𝓥'=>'V','𝓦'=>'W','𝓧'=>'X','𝓨'=>'Y','𝓩'=>'Z','𝓪'=>'a','𝓫'=>'b','𝓬'=>'c','𝓭'=>'d','𝓮'=>'e','𝓯'=>'f','𝓰'=>'g','𝓱'=>'h','𝓲'=>'i','𝓳'=>'j','𝓴'=>'k','𝓵'=>'l','𝓶'=>'m','𝓷'=>'n','𝓸'=>'o','𝓹'=>'p','𝓺'=>'q','𝓻'=>'r','𝓼'=>'s','𝓽'=>'t','𝓾'=>'u','𝓿'=>'v','𝔀'=>'w','𝔁'=>'x','𝔂'=>'y','𝔃'=>'z','𝔄'=>'A','𝔅'=>'B','𝔇'=>'D','𝔈'=>'E','𝔉'=>'F','𝔊'=>'G','𝔍'=>'J','𝔎'=>'K','𝔏'=>'L','𝔐'=>'M','𝔑'=>'N','𝔒'=>'O','𝔓'=>'P','𝔔'=>'Q','𝔖'=>'S','𝔗'=>'T','𝔘'=>'U','𝔙'=>'V','𝔚'=>'W','𝔛'=>'X','𝔜'=>'Y','𝔞'=>'a','𝔟'=>'b','𝔠'=>'c','𝔡'=>'d','𝔢'=>'e','𝔣'=>'f','𝔤'=>'g','𝔥'=>'h','𝔦'=>'i','𝔧'=>'j','𝔨'=>'k','𝔩'=>'l','𝔪'=>'m','𝔫'=>'n','𝔬'=>'o','𝔭'=>'p','𝔮'=>'q','𝔯'=>'r','𝔰'=>'s','𝔱'=>'t','𝔲'=>'u','𝔳'=>'v','𝔴'=>'w','𝔵'=>'x','𝔶'=>'y','𝔷'=>'z','𝔸'=>'A','𝔹'=>'B','𝔻'=>'D','𝔼'=>'E','𝔽'=>'F','𝔾'=>'G','𝕀'=>'I','𝕁'=>'J','𝕂'=>'K','𝕃'=>'L','𝕄'=>'M','𝕆'=>'O','𝕊'=>'S','𝕋'=>'T','𝕌'=>'U','𝕍'=>'V','𝕎'=>'W','𝕏'=>'X','𝕐'=>'Y','𝕒'=>'a','𝕓'=>'b','𝕔'=>'c','𝕕'=>'d','𝕖'=>'e','𝕗'=>'f','𝕘'=>'g','𝕙'=>'h','𝕚'=>'i','𝕛'=>'j','𝕜'=>'k','𝕝'=>'l','𝕞'=>'m','𝕟'=>'n','𝕠'=>'o','𝕡'=>'p','𝕢'=>'q','𝕣'=>'r','𝕤'=>'s','𝕥'=>'t','𝕦'=>'u','𝕧'=>'v','𝕨'=>'w','𝕩'=>'x','𝕪'=>'y','𝕫'=>'z','𝕬'=>'A','𝕭'=>'B','𝕮'=>'C','𝕯'=>'D','𝕰'=>'E','𝕱'=>'F','𝕲'=>'G','𝕳'=>'H','𝕴'=>'I','𝕵'=>'J','𝕶'=>'K','𝕷'=>'L','𝕸'=>'M','𝕹'=>'N','𝕺'=>'O','𝕻'=>'P','𝕼'=>'Q','𝕽'=>'R','𝕾'=>'S','𝕿'=>'T','𝖀'=>'U','𝖁'=>'V','𝖂'=>'W','𝖃'=>'X','𝖄'=>'Y','𝖅'=>'Z','𝖆'=>'a','𝖇'=>'b','𝖈'=>'c','𝖉'=>'d','𝖊'=>'e','𝖋'=>'f','𝖌'=>'g','𝖍'=>'h','𝖎'=>'i','𝖏'=>'j','𝖐'=>'k','𝖑'=>'l','𝖒'=>'m','𝖓'=>'n','𝖔'=>'o','𝖕'=>'p','𝖖'=>'q','𝖗'=>'r','𝖘'=>'s','𝖙'=>'t','𝖚'=>'u','𝖛'=>'v','𝖜'=>'w','𝖝'=>'x','𝖞'=>'y','𝖟'=>'z','𝖠'=>'A','𝖡'=>'B','𝖢'=>'C','𝖣'=>'D','𝖤'=>'E','𝖥'=>'F','𝖦'=>'G','𝖧'=>'H','𝖨'=>'I','𝖩'=>'J','𝖪'=>'K','𝖫'=>'L','𝖬'=>'M','𝖭'=>'N','𝖮'=>'O','𝖯'=>'P','𝖰'=>'Q','𝖱'=>'R','𝖲'=>'S','𝖳'=>'T','𝖴'=>'U','𝖵'=>'V','𝖶'=>'W','𝖷'=>'X','𝖸'=>'Y','𝖹'=>'Z','𝖺'=>'a','𝖻'=>'b','𝖼'=>'c','𝖽'=>'d','𝖾'=>'e','𝖿'=>'f','𝗀'=>'g','𝗁'=>'h','𝗂'=>'i','𝗃'=>'j','𝗄'=>'k','𝗅'=>'l','𝗆'=>'m','𝗇'=>'n','𝗈'=>'o','𝗉'=>'p','𝗊'=>'q','𝗋'=>'r','𝗌'=>'s','𝗍'=>'t','𝗎'=>'u','𝗏'=>'v','𝗐'=>'w','𝗑'=>'x','𝗒'=>'y','𝗓'=>'z','𝗔'=>'A','𝗕'=>'B','𝗖'=>'C','𝗗'=>'D','𝗘'=>'E','𝗙'=>'F','𝗚'=>'G','𝗛'=>'H','𝗜'=>'I','𝗝'=>'J','𝗞'=>'K','𝗟'=>'L','𝗠'=>'M','𝗡'=>'N','𝗢'=>'O','𝗣'=>'P','𝗤'=>'Q','𝗥'=>'R','𝗦'=>'S','𝗧'=>'T','𝗨'=>'U','𝗩'=>'V','𝗪'=>'W','𝗫'=>'X','𝗬'=>'Y','𝗭'=>'Z','𝗮'=>'a','𝗯'=>'b','𝗰'=>'c','𝗱'=>'d','𝗲'=>'e','𝗳'=>'f','𝗴'=>'g','𝗵'=>'h','𝗶'=>'i','𝗷'=>'j','𝗸'=>'k','𝗹'=>'l','𝗺'=>'m','𝗻'=>'n','𝗼'=>'o','𝗽'=>'p','𝗾'=>'q','𝗿'=>'r','𝘀'=>'s','𝘁'=>'t','𝘂'=>'u','𝘃'=>'v','𝘄'=>'w','𝘅'=>'x','𝘆'=>'y','𝘇'=>'z','𝘈'=>'A','𝘉'=>'B','𝘊'=>'C','𝘋'=>'D','𝘌'=>'E','𝘍'=>'F','𝘎'=>'G','𝘏'=>'H','𝘐'=>'I','𝘑'=>'J','𝘒'=>'K','𝘓'=>'L','𝘔'=>'M','𝘕'=>'N','𝘖'=>'O','𝘗'=>'P','𝘘'=>'Q','𝘙'=>'R','𝘚'=>'S','𝘛'=>'T','𝘜'=>'U','𝘝'=>'V','𝘞'=>'W','𝘟'=>'X','𝘠'=>'Y','𝘡'=>'Z','𝘢'=>'a','𝘣'=>'b','𝘤'=>'c','𝘥'=>'d','𝘦'=>'e','𝘧'=>'f','𝘨'=>'g','𝘩'=>'h','𝘪'=>'i','𝘫'=>'j','𝘬'=>'k','𝘭'=>'l','𝘮'=>'m','𝘯'=>'n','𝘰'=>'o','𝘱'=>'p','𝘲'=>'q','𝘳'=>'r','𝘴'=>'s','𝘵'=>'t','𝘶'=>'u','𝘷'=>'v','𝘸'=>'w','𝘹'=>'x','𝘺'=>'y','𝘻'=>'z','𝘼'=>'A','𝘽'=>'B','𝘾'=>'C','𝘿'=>'D','𝙀'=>'E','𝙁'=>'F','𝙂'=>'G','𝙃'=>'H','𝙄'=>'I','𝙅'=>'J','𝙆'=>'K','𝙇'=>'L','𝙈'=>'M','𝙉'=>'N','𝙊'=>'O','𝙋'=>'P','𝙌'=>'Q','𝙍'=>'R','𝙎'=>'S','𝙏'=>'T','𝙐'=>'U','𝙑'=>'V','𝙒'=>'W','𝙓'=>'X','𝙔'=>'Y','𝙕'=>'Z','𝙖'=>'a','𝙗'=>'b','𝙘'=>'c','𝙙'=>'d','𝙚'=>'e','𝙛'=>'f','𝙜'=>'g','𝙝'=>'h','𝙞'=>'i','𝙟'=>'j','𝙠'=>'k','𝙡'=>'l','𝙢'=>'m','𝙣'=>'n','𝙤'=>'o','𝙥'=>'p','𝙦'=>'q','𝙧'=>'r','𝙨'=>'s','𝙩'=>'t','𝙪'=>'u','𝙫'=>'v','𝙬'=>'w','𝙭'=>'x','𝙮'=>'y','𝙯'=>'z','𝙰'=>'A','𝙱'=>'B','𝙲'=>'C','𝙳'=>'D','𝙴'=>'E','𝙵'=>'F','𝙶'=>'G','𝙷'=>'H','𝙸'=>'I','𝙹'=>'J','𝙺'=>'K','𝙻'=>'L','𝙼'=>'M','𝙽'=>'N','𝙾'=>'O','𝙿'=>'P','𝚀'=>'Q','𝚁'=>'R','𝚂'=>'S','𝚃'=>'T','𝚄'=>'U','𝚅'=>'V','𝚆'=>'W','𝚇'=>'X','𝚈'=>'Y','𝚉'=>'Z','𝚊'=>'a','𝚋'=>'b','𝚌'=>'c','𝚍'=>'d','𝚎'=>'e','𝚏'=>'f','𝚐'=>'g','𝚑'=>'h','𝚒'=>'i','𝚓'=>'j','𝚔'=>'k','𝚕'=>'l','𝚖'=>'m','𝚗'=>'n','𝚘'=>'o','𝚙'=>'p','𝚚'=>'q','𝚛'=>'r','𝚜'=>'s','𝚝'=>'t','𝚞'=>'u','𝚟'=>'v','𝚠'=>'w','𝚡'=>'x','𝚢'=>'y','𝚣'=>'z','𝚤'=>'ı','𝚥'=>'ȷ','𝚨'=>'Α','𝚩'=>'Β','𝚪'=>'Γ','𝚫'=>'Δ','𝚬'=>'Ε','𝚭'=>'Ζ','𝚮'=>'Η','𝚯'=>'Θ','𝚰'=>'Ι','𝚱'=>'Κ','𝚲'=>'Λ','𝚳'=>'Μ','𝚴'=>'Ν','𝚵'=>'Ξ','𝚶'=>'Ο','𝚷'=>'Π','𝚸'=>'Ρ','𝚹'=>'Θ','𝚺'=>'Σ','𝚻'=>'Τ','𝚼'=>'Υ','𝚽'=>'Φ','𝚾'=>'Χ','𝚿'=>'Ψ','𝛀'=>'Ω','𝛁'=>'∇','𝛂'=>'α','𝛃'=>'β','𝛄'=>'γ','𝛅'=>'δ','𝛆'=>'ε','𝛇'=>'ζ','𝛈'=>'η','𝛉'=>'θ','𝛊'=>'ι','𝛋'=>'κ','𝛌'=>'λ','𝛍'=>'μ','𝛎'=>'ν','𝛏'=>'ξ','𝛐'=>'ο','𝛑'=>'π','𝛒'=>'ρ','𝛓'=>'ς','𝛔'=>'σ','𝛕'=>'τ','𝛖'=>'υ','𝛗'=>'φ','𝛘'=>'χ','𝛙'=>'ψ','𝛚'=>'ω','𝛛'=>'∂','𝛜'=>'ε','𝛝'=>'θ','𝛞'=>'κ','𝛟'=>'φ','𝛠'=>'ρ','𝛡'=>'π','𝛢'=>'Α','𝛣'=>'Β','𝛤'=>'Γ','𝛥'=>'Δ','𝛦'=>'Ε','𝛧'=>'Ζ','𝛨'=>'Η','𝛩'=>'Θ','𝛪'=>'Ι','𝛫'=>'Κ','𝛬'=>'Λ','𝛭'=>'Μ','𝛮'=>'Ν','𝛯'=>'Ξ','𝛰'=>'Ο','𝛱'=>'Π','𝛲'=>'Ρ','𝛳'=>'Θ','𝛴'=>'Σ','𝛵'=>'Τ','𝛶'=>'Υ','𝛷'=>'Φ','𝛸'=>'Χ','𝛹'=>'Ψ','𝛺'=>'Ω','𝛻'=>'∇','𝛼'=>'α','𝛽'=>'β','𝛾'=>'γ','𝛿'=>'δ','𝜀'=>'ε','𝜁'=>'ζ','𝜂'=>'η','𝜃'=>'θ','𝜄'=>'ι','𝜅'=>'κ','𝜆'=>'λ','𝜇'=>'μ','𝜈'=>'ν','𝜉'=>'ξ','𝜊'=>'ο','𝜋'=>'π','𝜌'=>'ρ','𝜍'=>'ς','𝜎'=>'σ','𝜏'=>'τ','𝜐'=>'υ','𝜑'=>'φ','𝜒'=>'χ','𝜓'=>'ψ','𝜔'=>'ω','𝜕'=>'∂','𝜖'=>'ε','𝜗'=>'θ','𝜘'=>'κ','𝜙'=>'φ','𝜚'=>'ρ','𝜛'=>'π','𝜜'=>'Α','𝜝'=>'Β','𝜞'=>'Γ','𝜟'=>'Δ','𝜠'=>'Ε','𝜡'=>'Ζ','𝜢'=>'Η','𝜣'=>'Θ','𝜤'=>'Ι','𝜥'=>'Κ','𝜦'=>'Λ','𝜧'=>'Μ','𝜨'=>'Ν','𝜩'=>'Ξ','𝜪'=>'Ο','𝜫'=>'Π','𝜬'=>'Ρ','𝜭'=>'Θ','𝜮'=>'Σ','𝜯'=>'Τ','𝜰'=>'Υ','𝜱'=>'Φ','𝜲'=>'Χ','𝜳'=>'Ψ','𝜴'=>'Ω','𝜵'=>'∇','𝜶'=>'α','𝜷'=>'β','𝜸'=>'γ','𝜹'=>'δ','𝜺'=>'ε','𝜻'=>'ζ','𝜼'=>'η','𝜽'=>'θ','𝜾'=>'ι','𝜿'=>'κ','𝝀'=>'λ','𝝁'=>'μ','𝝂'=>'ν','𝝃'=>'ξ','𝝄'=>'ο','𝝅'=>'π','𝝆'=>'ρ','𝝇'=>'ς','𝝈'=>'σ','𝝉'=>'τ','𝝊'=>'υ','𝝋'=>'φ','𝝌'=>'χ','𝝍'=>'ψ','𝝎'=>'ω','𝝏'=>'∂','𝝐'=>'ε','𝝑'=>'θ','𝝒'=>'κ','𝝓'=>'φ','𝝔'=>'ρ','𝝕'=>'π','𝝖'=>'Α','𝝗'=>'Β','𝝘'=>'Γ','𝝙'=>'Δ','𝝚'=>'Ε','𝝛'=>'Ζ','𝝜'=>'Η','𝝝'=>'Θ','𝝞'=>'Ι','𝝟'=>'Κ','𝝠'=>'Λ','𝝡'=>'Μ','𝝢'=>'Ν','𝝣'=>'Ξ','𝝤'=>'Ο','𝝥'=>'Π','𝝦'=>'Ρ','𝝧'=>'Θ','𝝨'=>'Σ','𝝩'=>'Τ','𝝪'=>'Υ','𝝫'=>'Φ','𝝬'=>'Χ','𝝭'=>'Ψ','𝝮'=>'Ω','𝝯'=>'∇','𝝰'=>'α','𝝱'=>'β','𝝲'=>'γ','𝝳'=>'δ','𝝴'=>'ε','𝝵'=>'ζ','𝝶'=>'η','𝝷'=>'θ','𝝸'=>'ι','𝝹'=>'κ','𝝺'=>'λ','𝝻'=>'μ','𝝼'=>'ν','𝝽'=>'ξ','𝝾'=>'ο','𝝿'=>'π','𝞀'=>'ρ','𝞁'=>'ς','𝞂'=>'σ','𝞃'=>'τ','𝞄'=>'υ','𝞅'=>'φ','𝞆'=>'χ','𝞇'=>'ψ','𝞈'=>'ω','𝞉'=>'∂','𝞊'=>'ε','𝞋'=>'θ','𝞌'=>'κ','𝞍'=>'φ','𝞎'=>'ρ','𝞏'=>'π','𝞐'=>'Α','𝞑'=>'Β','𝞒'=>'Γ','𝞓'=>'Δ','𝞔'=>'Ε','𝞕'=>'Ζ','𝞖'=>'Η','𝞗'=>'Θ','𝞘'=>'Ι','𝞙'=>'Κ','𝞚'=>'Λ','𝞛'=>'Μ','𝞜'=>'Ν','𝞝'=>'Ξ','𝞞'=>'Ο','𝞟'=>'Π','𝞠'=>'Ρ','𝞡'=>'Θ','𝞢'=>'Σ','𝞣'=>'Τ','𝞤'=>'Υ','𝞥'=>'Φ','𝞦'=>'Χ','𝞧'=>'Ψ','𝞨'=>'Ω','𝞩'=>'∇','𝞪'=>'α','𝞫'=>'β','𝞬'=>'γ','𝞭'=>'δ','𝞮'=>'ε','𝞯'=>'ζ','𝞰'=>'η','𝞱'=>'θ','𝞲'=>'ι','𝞳'=>'κ','𝞴'=>'λ','𝞵'=>'μ','𝞶'=>'ν','𝞷'=>'ξ','𝞸'=>'ο','𝞹'=>'π','𝞺'=>'ρ','𝞻'=>'ς','𝞼'=>'σ','𝞽'=>'τ','𝞾'=>'υ','𝞿'=>'φ','𝟀'=>'χ','𝟁'=>'ψ','𝟂'=>'ω','𝟃'=>'∂','𝟄'=>'ε','𝟅'=>'θ','𝟆'=>'κ','𝟇'=>'φ','𝟈'=>'ρ','𝟉'=>'π','𝟊'=>'Ϝ','𝟋'=>'ϝ','𝟎'=>'0','𝟏'=>'1','𝟐'=>'2','𝟑'=>'3','𝟒'=>'4','𝟓'=>'5','𝟔'=>'6','𝟕'=>'7','𝟖'=>'8','𝟗'=>'9','𝟘'=>'0','𝟙'=>'1','𝟚'=>'2','𝟛'=>'3','𝟜'=>'4','𝟝'=>'5','𝟞'=>'6','𝟟'=>'7','𝟠'=>'8','𝟡'=>'9','𝟢'=>'0','𝟣'=>'1','𝟤'=>'2','𝟥'=>'3','𝟦'=>'4','𝟧'=>'5','𝟨'=>'6','𝟩'=>'7','𝟪'=>'8','𝟫'=>'9','𝟬'=>'0','𝟭'=>'1','𝟮'=>'2','𝟯'=>'3','𝟰'=>'4','𝟱'=>'5','𝟲'=>'6','𝟳'=>'7','𝟴'=>'8','𝟵'=>'9','𝟶'=>'0','𝟷'=>'1','𝟸'=>'2','𝟹'=>'3','𝟺'=>'4','𝟻'=>'5','𝟼'=>'6','𝟽'=>'7','𝟾'=>'8','𝟿'=>'9','丽'=>'丽','丸'=>'丸','乁'=>'乁','𠄢'=>'𠄢','你'=>'你','侮'=>'侮','侻'=>'侻','倂'=>'倂','偺'=>'偺','備'=>'備','僧'=>'僧','像'=>'像','㒞'=>'㒞','𠘺'=>'𠘺','免'=>'免','兔'=>'兔','兤'=>'兤','具'=>'具','𠔜'=>'𠔜','㒹'=>'㒹','內'=>'內','再'=>'再','𠕋'=>'𠕋','冗'=>'冗','冤'=>'冤','仌'=>'仌','冬'=>'冬','况'=>'况','𩇟'=>'𩇟','凵'=>'凵','刃'=>'刃','㓟'=>'㓟','刻'=>'刻','剆'=>'剆','割'=>'割','剷'=>'剷','㔕'=>'㔕','勇'=>'勇','勉'=>'勉','勤'=>'勤','勺'=>'勺','包'=>'包','匆'=>'匆','北'=>'北','卉'=>'卉','卑'=>'卑','博'=>'博','即'=>'即','卽'=>'卽','卿'=>'卿','卿'=>'卿','卿'=>'卿','𠨬'=>'𠨬','灰'=>'灰','及'=>'及','叟'=>'叟','𠭣'=>'𠭣','叫'=>'叫','叱'=>'叱','吆'=>'吆','咞'=>'咞','吸'=>'吸','呈'=>'呈','周'=>'周','咢'=>'咢','哶'=>'哶','唐'=>'唐','啓'=>'啓','啣'=>'啣','善'=>'善','善'=>'善','喙'=>'喙','喫'=>'喫','喳'=>'喳','嗂'=>'嗂','圖'=>'圖','嘆'=>'嘆','圗'=>'圗','噑'=>'噑','噴'=>'噴','切'=>'切','壮'=>'壮','城'=>'城','埴'=>'埴','堍'=>'堍','型'=>'型','堲'=>'堲','報'=>'報','墬'=>'墬','𡓤'=>'𡓤','売'=>'売','壷'=>'壷','夆'=>'夆','多'=>'多','夢'=>'夢','奢'=>'奢','𡚨'=>'𡚨','𡛪'=>'𡛪','姬'=>'姬','娛'=>'娛','娧'=>'娧','姘'=>'姘','婦'=>'婦','㛮'=>'㛮','㛼'=>'㛼','嬈'=>'嬈','嬾'=>'嬾','嬾'=>'嬾','𡧈'=>'𡧈','寃'=>'寃','寘'=>'寘','寧'=>'寧','寳'=>'寳','𡬘'=>'𡬘','寿'=>'寿','将'=>'将','当'=>'当','尢'=>'尢','㞁'=>'㞁','屠'=>'屠','屮'=>'屮','峀'=>'峀','岍'=>'岍','𡷤'=>'𡷤','嵃'=>'嵃','𡷦'=>'𡷦','嵮'=>'嵮','嵫'=>'嵫','嵼'=>'嵼','巡'=>'巡','巢'=>'巢','㠯'=>'㠯','巽'=>'巽','帨'=>'帨','帽'=>'帽','幩'=>'幩','㡢'=>'㡢','𢆃'=>'𢆃','㡼'=>'㡼','庰'=>'庰','庳'=>'庳','庶'=>'庶','廊'=>'廊','𪎒'=>'𪎒','廾'=>'廾','𢌱'=>'𢌱','𢌱'=>'𢌱','舁'=>'舁','弢'=>'弢','弢'=>'弢','㣇'=>'㣇','𣊸'=>'𣊸','𦇚'=>'𦇚','形'=>'形','彫'=>'彫','㣣'=>'㣣','徚'=>'徚','忍'=>'忍','志'=>'志','忹'=>'忹','悁'=>'悁','㤺'=>'㤺','㤜'=>'㤜','悔'=>'悔','𢛔'=>'𢛔','惇'=>'惇','慈'=>'慈','慌'=>'慌','慎'=>'慎','慌'=>'慌','慺'=>'慺','憎'=>'憎','憲'=>'憲','憤'=>'憤','憯'=>'憯','懞'=>'懞','懲'=>'懲','懶'=>'懶','成'=>'成','戛'=>'戛','扝'=>'扝','抱'=>'抱','拔'=>'拔','捐'=>'捐','𢬌'=>'𢬌','挽'=>'挽','拼'=>'拼','捨'=>'捨','掃'=>'掃','揤'=>'揤','𢯱'=>'𢯱','搢'=>'搢','揅'=>'揅','掩'=>'掩','㨮'=>'㨮','摩'=>'摩','摾'=>'摾','撝'=>'撝','摷'=>'摷','㩬'=>'㩬','敏'=>'敏','敬'=>'敬','𣀊'=>'𣀊','旣'=>'旣','書'=>'書','晉'=>'晉','㬙'=>'㬙','暑'=>'暑','㬈'=>'㬈','㫤'=>'㫤','冒'=>'冒','冕'=>'冕','最'=>'最','暜'=>'暜','肭'=>'肭','䏙'=>'䏙','朗'=>'朗','望'=>'望','朡'=>'朡','杞'=>'杞','杓'=>'杓','𣏃'=>'𣏃','㭉'=>'㭉','柺'=>'柺','枅'=>'枅','桒'=>'桒','梅'=>'梅','𣑭'=>'𣑭','梎'=>'梎','栟'=>'栟','椔'=>'椔','㮝'=>'㮝','楂'=>'楂','榣'=>'榣','槪'=>'槪','檨'=>'檨','𣚣'=>'𣚣','櫛'=>'櫛','㰘'=>'㰘','次'=>'次','𣢧'=>'𣢧','歔'=>'歔','㱎'=>'㱎','歲'=>'歲','殟'=>'殟','殺'=>'殺','殻'=>'殻','𣪍'=>'𣪍','𡴋'=>'𡴋','𣫺'=>'𣫺','汎'=>'汎','𣲼'=>'𣲼','沿'=>'沿','泍'=>'泍','汧'=>'汧','洖'=>'洖','派'=>'派','海'=>'海','流'=>'流','浩'=>'浩','浸'=>'浸','涅'=>'涅','𣴞'=>'𣴞','洴'=>'洴','港'=>'港','湮'=>'湮','㴳'=>'㴳','滋'=>'滋','滇'=>'滇','𣻑'=>'𣻑','淹'=>'淹','潮'=>'潮','𣽞'=>'𣽞','𣾎'=>'𣾎','濆'=>'濆','瀹'=>'瀹','瀞'=>'瀞','瀛'=>'瀛','㶖'=>'㶖','灊'=>'灊','災'=>'災','灷'=>'灷','炭'=>'炭','𠔥'=>'𠔥','煅'=>'煅','𤉣'=>'𤉣','熜'=>'熜','𤎫'=>'𤎫','爨'=>'爨','爵'=>'爵','牐'=>'牐','𤘈'=>'𤘈','犀'=>'犀','犕'=>'犕','𤜵'=>'𤜵','𤠔'=>'𤠔','獺'=>'獺','王'=>'王','㺬'=>'㺬','玥'=>'玥','㺸'=>'㺸','㺸'=>'㺸','瑇'=>'瑇','瑜'=>'瑜','瑱'=>'瑱','璅'=>'璅','瓊'=>'瓊','㼛'=>'㼛','甤'=>'甤','𤰶'=>'𤰶','甾'=>'甾','𤲒'=>'𤲒','異'=>'異','𢆟'=>'𢆟','瘐'=>'瘐','𤾡'=>'𤾡','𤾸'=>'𤾸','𥁄'=>'𥁄','㿼'=>'㿼','䀈'=>'䀈','直'=>'直','𥃳'=>'𥃳','𥃲'=>'𥃲','𥄙'=>'𥄙','𥄳'=>'𥄳','眞'=>'眞','真'=>'真','真'=>'真','睊'=>'睊','䀹'=>'䀹','瞋'=>'瞋','䁆'=>'䁆','䂖'=>'䂖','𥐝'=>'𥐝','硎'=>'硎','碌'=>'碌','磌'=>'磌','䃣'=>'䃣','𥘦'=>'𥘦','祖'=>'祖','𥚚'=>'𥚚','𥛅'=>'𥛅','福'=>'福','秫'=>'秫','䄯'=>'䄯','穀'=>'穀','穊'=>'穊','穏'=>'穏','𥥼'=>'𥥼','𥪧'=>'𥪧','𥪧'=>'𥪧','竮'=>'竮','䈂'=>'䈂','𥮫'=>'𥮫','篆'=>'篆','築'=>'築','䈧'=>'䈧','𥲀'=>'𥲀','糒'=>'糒','䊠'=>'䊠','糨'=>'糨','糣'=>'糣','紀'=>'紀','𥾆'=>'𥾆','絣'=>'絣','䌁'=>'䌁','緇'=>'緇','縂'=>'縂','繅'=>'繅','䌴'=>'䌴','𦈨'=>'𦈨','𦉇'=>'𦉇','䍙'=>'䍙','𦋙'=>'𦋙','罺'=>'罺','𦌾'=>'𦌾','羕'=>'羕','翺'=>'翺','者'=>'者','𦓚'=>'𦓚','𦔣'=>'𦔣','聠'=>'聠','𦖨'=>'𦖨','聰'=>'聰','𣍟'=>'𣍟','䏕'=>'䏕','育'=>'育','脃'=>'脃','䐋'=>'䐋','脾'=>'脾','媵'=>'媵','𦞧'=>'𦞧','𦞵'=>'𦞵','𣎓'=>'𣎓','𣎜'=>'𣎜','舁'=>'舁','舄'=>'舄','辞'=>'辞','䑫'=>'䑫','芑'=>'芑','芋'=>'芋','芝'=>'芝','劳'=>'劳','花'=>'花','芳'=>'芳','芽'=>'芽','苦'=>'苦','𦬼'=>'𦬼','若'=>'若','茝'=>'茝','荣'=>'荣','莭'=>'莭','茣'=>'茣','莽'=>'莽','菧'=>'菧','著'=>'著','荓'=>'荓','菊'=>'菊','菌'=>'菌','菜'=>'菜','𦰶'=>'𦰶','𦵫'=>'𦵫','𦳕'=>'𦳕','䔫'=>'䔫','蓱'=>'蓱','蓳'=>'蓳','蔖'=>'蔖','𧏊'=>'𧏊','蕤'=>'蕤','𦼬'=>'𦼬','䕝'=>'䕝','䕡'=>'䕡','𦾱'=>'𦾱','𧃒'=>'𧃒','䕫'=>'䕫','虐'=>'虐','虜'=>'虜','虧'=>'虧','虩'=>'虩','蚩'=>'蚩','蚈'=>'蚈','蜎'=>'蜎','蛢'=>'蛢','蝹'=>'蝹','蜨'=>'蜨','蝫'=>'蝫','螆'=>'螆','䗗'=>'䗗','蟡'=>'蟡','蠁'=>'蠁','䗹'=>'䗹','衠'=>'衠','衣'=>'衣','𧙧'=>'𧙧','裗'=>'裗','裞'=>'裞','䘵'=>'䘵','裺'=>'裺','㒻'=>'㒻','𧢮'=>'𧢮','𧥦'=>'𧥦','䚾'=>'䚾','䛇'=>'䛇','誠'=>'誠','諭'=>'諭','變'=>'變','豕'=>'豕','𧲨'=>'𧲨','貫'=>'貫','賁'=>'賁','贛'=>'贛','起'=>'起','𧼯'=>'𧼯','𠠄'=>'𠠄','跋'=>'跋','趼'=>'趼','跰'=>'跰','𠣞'=>'𠣞','軔'=>'軔','輸'=>'輸','𨗒'=>'𨗒','𨗭'=>'𨗭','邔'=>'邔','郱'=>'郱','鄑'=>'鄑','𨜮'=>'𨜮','鄛'=>'鄛','鈸'=>'鈸','鋗'=>'鋗','鋘'=>'鋘','鉼'=>'鉼','鏹'=>'鏹','鐕'=>'鐕','𨯺'=>'𨯺','開'=>'開','䦕'=>'䦕','閷'=>'閷','𨵷'=>'𨵷','䧦'=>'䧦','雃'=>'雃','嶲'=>'嶲','霣'=>'霣','𩅅'=>'𩅅','𩈚'=>'𩈚','䩮'=>'䩮','䩶'=>'䩶','韠'=>'韠','𩐊'=>'𩐊','䪲'=>'䪲','𩒖'=>'𩒖','頋'=>'頋','頋'=>'頋','頩'=>'頩','𩖶'=>'𩖶','飢'=>'飢','䬳'=>'䬳','餩'=>'餩','馧'=>'馧','駂'=>'駂','駾'=>'駾','䯎'=>'䯎','𩬰'=>'𩬰','鬒'=>'鬒','鱀'=>'鱀','鳽'=>'鳽','䳎'=>'䳎','䳭'=>'䳭','鵧'=>'鵧','𪃎'=>'𪃎','䳸'=>'䳸','𪄅'=>'𪄅','𪈎'=>'𪈎','𪊑'=>'𪊑','麻'=>'麻','䵖'=>'䵖','黹'=>'黹','黾'=>'黾','鼅'=>'鼅','鼏'=>'鼏','鼖'=>'鼖','鼻'=>'鼻','𪘀'=>'𪘀');
diff --git a/phpBB/includes/utf/data/utf_nfc_qc.php b/phpBB/includes/utf/data/utf_nfc_qc.php
index 03031f8b6d..ff56357ea6 100644
--- a/phpBB/includes/utf/data/utf_nfc_qc.php
+++ b/phpBB/includes/utf/data/utf_nfc_qc.php
@@ -1,2 +1,2 @@
<?php
-$GLOBALS['utf_nfc_qc']=array('̀'=>1,'́'=>1,'̓'=>1,'̈́'=>1,'ʹ'=>1,';'=>1,'·'=>1,'क़'=>1,'ख़'=>1,'ग़'=>1,'ज़'=>1,'ड़'=>1,'ढ़'=>1,'फ़'=>1,'य़'=>1,'ড়'=>1,'ঢ়'=>1,'য়'=>1,'ਲ਼'=>1,'ਸ਼'=>1,'ਖ਼'=>1,'ਗ਼'=>1,'ਜ਼'=>1,'ਫ਼'=>1,'ଡ଼'=>1,'ଢ଼'=>1,'གྷ'=>1,'ཌྷ'=>1,'དྷ'=>1,'བྷ'=>1,'ཛྷ'=>1,'ཀྵ'=>1,'ཱི'=>1,'ཱུ'=>1,'ྲྀ'=>1,'ླྀ'=>1,'ཱྀ'=>1,'ྒྷ'=>1,'ྜྷ'=>1,'ྡྷ'=>1,'ྦྷ'=>1,'ྫྷ'=>1,'ྐྵ'=>1,'ά'=>1,'έ'=>1,'ή'=>1,'ί'=>1,'ό'=>1,'ύ'=>1,'ώ'=>1,'Ά'=>1,'ι'=>1,'Έ'=>1,'Ή'=>1,'ΐ'=>1,'Ί'=>1,'ΰ'=>1,'Ύ'=>1,'΅'=>1,'`'=>1,'Ό'=>1,'Ώ'=>1,'´'=>1,' '=>1,' '=>1,'Ω'=>1,'K'=>1,'Å'=>1,'〈'=>1,'〉'=>1,'⫝̸'=>1,'豈'=>1,'更'=>1,'車'=>1,'賈'=>1,'滑'=>1,'串'=>1,'句'=>1,'龜'=>1,'龜'=>1,'契'=>1,'金'=>1,'喇'=>1,'奈'=>1,'懶'=>1,'癩'=>1,'羅'=>1,'蘿'=>1,'螺'=>1,'裸'=>1,'邏'=>1,'樂'=>1,'洛'=>1,'烙'=>1,'珞'=>1,'落'=>1,'酪'=>1,'駱'=>1,'亂'=>1,'卵'=>1,'欄'=>1,'爛'=>1,'蘭'=>1,'鸞'=>1,'嵐'=>1,'濫'=>1,'藍'=>1,'襤'=>1,'拉'=>1,'臘'=>1,'蠟'=>1,'廊'=>1,'朗'=>1,'浪'=>1,'狼'=>1,'郎'=>1,'來'=>1,'冷'=>1,'勞'=>1,'擄'=>1,'櫓'=>1,'爐'=>1,'盧'=>1,'老'=>1,'蘆'=>1,'虜'=>1,'路'=>1,'露'=>1,'魯'=>1,'鷺'=>1,'碌'=>1,'祿'=>1,'綠'=>1,'菉'=>1,'錄'=>1,'鹿'=>1,'論'=>1,'壟'=>1,'弄'=>1,'籠'=>1,'聾'=>1,'牢'=>1,'磊'=>1,'賂'=>1,'雷'=>1,'壘'=>1,'屢'=>1,'樓'=>1,'淚'=>1,'漏'=>1,'累'=>1,'縷'=>1,'陋'=>1,'勒'=>1,'肋'=>1,'凜'=>1,'凌'=>1,'稜'=>1,'綾'=>1,'菱'=>1,'陵'=>1,'讀'=>1,'拏'=>1,'樂'=>1,'諾'=>1,'丹'=>1,'寧'=>1,'怒'=>1,'率'=>1,'異'=>1,'北'=>1,'磻'=>1,'便'=>1,'復'=>1,'不'=>1,'泌'=>1,'數'=>1,'索'=>1,'參'=>1,'塞'=>1,'省'=>1,'葉'=>1,'說'=>1,'殺'=>1,'辰'=>1,'沈'=>1,'拾'=>1,'若'=>1,'掠'=>1,'略'=>1,'亮'=>1,'兩'=>1,'凉'=>1,'梁'=>1,'糧'=>1,'良'=>1,'諒'=>1,'量'=>1,'勵'=>1,'呂'=>1,'女'=>1,'廬'=>1,'旅'=>1,'濾'=>1,'礪'=>1,'閭'=>1,'驪'=>1,'麗'=>1,'黎'=>1,'力'=>1,'曆'=>1,'歷'=>1,'轢'=>1,'年'=>1,'憐'=>1,'戀'=>1,'撚'=>1,'漣'=>1,'煉'=>1,'璉'=>1,'秊'=>1,'練'=>1,'聯'=>1,'輦'=>1,'蓮'=>1,'連'=>1,'鍊'=>1,'列'=>1,'劣'=>1,'咽'=>1,'烈'=>1,'裂'=>1,'說'=>1,'廉'=>1,'念'=>1,'捻'=>1,'殮'=>1,'簾'=>1,'獵'=>1,'令'=>1,'囹'=>1,'寧'=>1,'嶺'=>1,'怜'=>1,'玲'=>1,'瑩'=>1,'羚'=>1,'聆'=>1,'鈴'=>1,'零'=>1,'靈'=>1,'領'=>1,'例'=>1,'禮'=>1,'醴'=>1,'隸'=>1,'惡'=>1,'了'=>1,'僚'=>1,'寮'=>1,'尿'=>1,'料'=>1,'樂'=>1,'燎'=>1,'療'=>1,'蓼'=>1,'遼'=>1,'龍'=>1,'暈'=>1,'阮'=>1,'劉'=>1,'杻'=>1,'柳'=>1,'流'=>1,'溜'=>1,'琉'=>1,'留'=>1,'硫'=>1,'紐'=>1,'類'=>1,'六'=>1,'戮'=>1,'陸'=>1,'倫'=>1,'崙'=>1,'淪'=>1,'輪'=>1,'律'=>1,'慄'=>1,'栗'=>1,'率'=>1,'隆'=>1,'利'=>1,'吏'=>1,'履'=>1,'易'=>1,'李'=>1,'梨'=>1,'泥'=>1,'理'=>1,'痢'=>1,'罹'=>1,'裏'=>1,'裡'=>1,'里'=>1,'離'=>1,'匿'=>1,'溺'=>1,'吝'=>1,'燐'=>1,'璘'=>1,'藺'=>1,'隣'=>1,'鱗'=>1,'麟'=>1,'林'=>1,'淋'=>1,'臨'=>1,'立'=>1,'笠'=>1,'粒'=>1,'狀'=>1,'炙'=>1,'識'=>1,'什'=>1,'茶'=>1,'刺'=>1,'切'=>1,'度'=>1,'拓'=>1,'糖'=>1,'宅'=>1,'洞'=>1,'暴'=>1,'輻'=>1,'行'=>1,'降'=>1,'見'=>1,'廓'=>1,'兀'=>1,'嗀'=>1,'塚'=>1,'晴'=>1,'凞'=>1,'猪'=>1,'益'=>1,'礼'=>1,'神'=>1,'祥'=>1,'福'=>1,'靖'=>1,'精'=>1,'羽'=>1,'蘒'=>1,'諸'=>1,'逸'=>1,'都'=>1,'飯'=>1,'飼'=>1,'館'=>1,'鶴'=>1,'侮'=>1,'僧'=>1,'免'=>1,'勉'=>1,'勤'=>1,'卑'=>1,'喝'=>1,'嘆'=>1,'器'=>1,'塀'=>1,'墨'=>1,'層'=>1,'屮'=>1,'悔'=>1,'慨'=>1,'憎'=>1,'懲'=>1,'敏'=>1,'既'=>1,'暑'=>1,'梅'=>1,'海'=>1,'渚'=>1,'漢'=>1,'煮'=>1,'爫'=>1,'琢'=>1,'碑'=>1,'社'=>1,'祉'=>1,'祈'=>1,'祐'=>1,'祖'=>1,'祝'=>1,'禍'=>1,'禎'=>1,'穀'=>1,'突'=>1,'節'=>1,'練'=>1,'縉'=>1,'繁'=>1,'署'=>1,'者'=>1,'臭'=>1,'艹'=>1,'艹'=>1,'著'=>1,'褐'=>1,'視'=>1,'謁'=>1,'謹'=>1,'賓'=>1,'贈'=>1,'辶'=>1,'逸'=>1,'難'=>1,'響'=>1,'頻'=>1,'並'=>1,'况'=>1,'全'=>1,'侀'=>1,'充'=>1,'冀'=>1,'勇'=>1,'勺'=>1,'喝'=>1,'啕'=>1,'喙'=>1,'嗢'=>1,'塚'=>1,'墳'=>1,'奄'=>1,'奔'=>1,'婢'=>1,'嬨'=>1,'廒'=>1,'廙'=>1,'彩'=>1,'徭'=>1,'惘'=>1,'慎'=>1,'愈'=>1,'憎'=>1,'慠'=>1,'懲'=>1,'戴'=>1,'揄'=>1,'搜'=>1,'摒'=>1,'敖'=>1,'晴'=>1,'朗'=>1,'望'=>1,'杖'=>1,'歹'=>1,'殺'=>1,'流'=>1,'滛'=>1,'滋'=>1,'漢'=>1,'瀞'=>1,'煮'=>1,'瞧'=>1,'爵'=>1,'犯'=>1,'猪'=>1,'瑱'=>1,'甆'=>1,'画'=>1,'瘝'=>1,'瘟'=>1,'益'=>1,'盛'=>1,'直'=>1,'睊'=>1,'着'=>1,'磌'=>1,'窱'=>1,'節'=>1,'类'=>1,'絛'=>1,'練'=>1,'缾'=>1,'者'=>1,'荒'=>1,'華'=>1,'蝹'=>1,'襁'=>1,'覆'=>1,'視'=>1,'調'=>1,'諸'=>1,'請'=>1,'謁'=>1,'諾'=>1,'諭'=>1,'謹'=>1,'變'=>1,'贈'=>1,'輸'=>1,'遲'=>1,'醙'=>1,'鉶'=>1,'陼'=>1,'難'=>1,'靖'=>1,'韛'=>1,'響'=>1,'頋'=>1,'頻'=>1,'鬒'=>1,'龜'=>1,'𢡊'=>1,'𢡄'=>1,'𣏕'=>1,'㮝'=>1,'䀘'=>1,'䀹'=>1,'𥉉'=>1,'𥳐'=>1,'𧻓'=>1,'齃'=>1,'龎'=>1,'יִ'=>1,'ײַ'=>1,'שׁ'=>1,'שׂ'=>1,'שּׁ'=>1,'שּׂ'=>1,'אַ'=>1,'אָ'=>1,'אּ'=>1,'בּ'=>1,'גּ'=>1,'דּ'=>1,'הּ'=>1,'וּ'=>1,'זּ'=>1,'טּ'=>1,'יּ'=>1,'ךּ'=>1,'כּ'=>1,'לּ'=>1,'מּ'=>1,'נּ'=>1,'סּ'=>1,'ףּ'=>1,'פּ'=>1,'צּ'=>1,'קּ'=>1,'רּ'=>1,'שּ'=>1,'תּ'=>1,'וֹ'=>1,'בֿ'=>1,'כֿ'=>1,'פֿ'=>1,'𝅗𝅥'=>1,'𝅘𝅥'=>1,'𝅘𝅥𝅮'=>1,'𝅘𝅥𝅯'=>1,'𝅘𝅥𝅰'=>1,'𝅘𝅥𝅱'=>1,'𝅘𝅥𝅲'=>1,'𝆹𝅥'=>1,'𝆺𝅥'=>1,'𝆹𝅥𝅮'=>1,'𝆺𝅥𝅮'=>1,'𝆹𝅥𝅯'=>1,'𝆺𝅥𝅯'=>1,'丽'=>1,'丸'=>1,'乁'=>1,'𠄢'=>1,'你'=>1,'侮'=>1,'侻'=>1,'倂'=>1,'偺'=>1,'備'=>1,'僧'=>1,'像'=>1,'㒞'=>1,'𠘺'=>1,'免'=>1,'兔'=>1,'兤'=>1,'具'=>1,'𠔜'=>1,'㒹'=>1,'內'=>1,'再'=>1,'𠕋'=>1,'冗'=>1,'冤'=>1,'仌'=>1,'冬'=>1,'况'=>1,'𩇟'=>1,'凵'=>1,'刃'=>1,'㓟'=>1,'刻'=>1,'剆'=>1,'割'=>1,'剷'=>1,'㔕'=>1,'勇'=>1,'勉'=>1,'勤'=>1,'勺'=>1,'包'=>1,'匆'=>1,'北'=>1,'卉'=>1,'卑'=>1,'博'=>1,'即'=>1,'卽'=>1,'卿'=>1,'卿'=>1,'卿'=>1,'𠨬'=>1,'灰'=>1,'及'=>1,'叟'=>1,'𠭣'=>1,'叫'=>1,'叱'=>1,'吆'=>1,'咞'=>1,'吸'=>1,'呈'=>1,'周'=>1,'咢'=>1,'哶'=>1,'唐'=>1,'啓'=>1,'啣'=>1,'善'=>1,'善'=>1,'喙'=>1,'喫'=>1,'喳'=>1,'嗂'=>1,'圖'=>1,'嘆'=>1,'圗'=>1,'噑'=>1,'噴'=>1,'切'=>1,'壮'=>1,'城'=>1,'埴'=>1,'堍'=>1,'型'=>1,'堲'=>1,'報'=>1,'墬'=>1,'𡓤'=>1,'売'=>1,'壷'=>1,'夆'=>1,'多'=>1,'夢'=>1,'奢'=>1,'𡚨'=>1,'𡛪'=>1,'姬'=>1,'娛'=>1,'娧'=>1,'姘'=>1,'婦'=>1,'㛮'=>1,'㛼'=>1,'嬈'=>1,'嬾'=>1,'嬾'=>1,'𡧈'=>1,'寃'=>1,'寘'=>1,'寧'=>1,'寳'=>1,'𡬘'=>1,'寿'=>1,'将'=>1,'当'=>1,'尢'=>1,'㞁'=>1,'屠'=>1,'屮'=>1,'峀'=>1,'岍'=>1,'𡷤'=>1,'嵃'=>1,'𡷦'=>1,'嵮'=>1,'嵫'=>1,'嵼'=>1,'巡'=>1,'巢'=>1,'㠯'=>1,'巽'=>1,'帨'=>1,'帽'=>1,'幩'=>1,'㡢'=>1,'𢆃'=>1,'㡼'=>1,'庰'=>1,'庳'=>1,'庶'=>1,'廊'=>1,'𪎒'=>1,'廾'=>1,'𢌱'=>1,'𢌱'=>1,'舁'=>1,'弢'=>1,'弢'=>1,'㣇'=>1,'𣊸'=>1,'𦇚'=>1,'形'=>1,'彫'=>1,'㣣'=>1,'徚'=>1,'忍'=>1,'志'=>1,'忹'=>1,'悁'=>1,'㤺'=>1,'㤜'=>1,'悔'=>1,'𢛔'=>1,'惇'=>1,'慈'=>1,'慌'=>1,'慎'=>1,'慌'=>1,'慺'=>1,'憎'=>1,'憲'=>1,'憤'=>1,'憯'=>1,'懞'=>1,'懲'=>1,'懶'=>1,'成'=>1,'戛'=>1,'扝'=>1,'抱'=>1,'拔'=>1,'捐'=>1,'𢬌'=>1,'挽'=>1,'拼'=>1,'捨'=>1,'掃'=>1,'揤'=>1,'𢯱'=>1,'搢'=>1,'揅'=>1,'掩'=>1,'㨮'=>1,'摩'=>1,'摾'=>1,'撝'=>1,'摷'=>1,'㩬'=>1,'敏'=>1,'敬'=>1,'𣀊'=>1,'旣'=>1,'書'=>1,'晉'=>1,'㬙'=>1,'暑'=>1,'㬈'=>1,'㫤'=>1,'冒'=>1,'冕'=>1,'最'=>1,'暜'=>1,'肭'=>1,'䏙'=>1,'朗'=>1,'望'=>1,'朡'=>1,'杞'=>1,'杓'=>1,'𣏃'=>1,'㭉'=>1,'柺'=>1,'枅'=>1,'桒'=>1,'梅'=>1,'𣑭'=>1,'梎'=>1,'栟'=>1,'椔'=>1,'㮝'=>1,'楂'=>1,'榣'=>1,'槪'=>1,'檨'=>1,'𣚣'=>1,'櫛'=>1,'㰘'=>1,'次'=>1,'𣢧'=>1,'歔'=>1,'㱎'=>1,'歲'=>1,'殟'=>1,'殺'=>1,'殻'=>1,'𣪍'=>1,'𡴋'=>1,'𣫺'=>1,'汎'=>1,'𣲼'=>1,'沿'=>1,'泍'=>1,'汧'=>1,'洖'=>1,'派'=>1,'海'=>1,'流'=>1,'浩'=>1,'浸'=>1,'涅'=>1,'𣴞'=>1,'洴'=>1,'港'=>1,'湮'=>1,'㴳'=>1,'滋'=>1,'滇'=>1,'𣻑'=>1,'淹'=>1,'潮'=>1,'𣽞'=>1,'𣾎'=>1,'濆'=>1,'瀹'=>1,'瀞'=>1,'瀛'=>1,'㶖'=>1,'灊'=>1,'災'=>1,'灷'=>1,'炭'=>1,'𠔥'=>1,'煅'=>1,'𤉣'=>1,'熜'=>1,'𤎫'=>1,'爨'=>1,'爵'=>1,'牐'=>1,'𤘈'=>1,'犀'=>1,'犕'=>1,'𤜵'=>1,'𤠔'=>1,'獺'=>1,'王'=>1,'㺬'=>1,'玥'=>1,'㺸'=>1,'㺸'=>1,'瑇'=>1,'瑜'=>1,'瑱'=>1,'璅'=>1,'瓊'=>1,'㼛'=>1,'甤'=>1,'𤰶'=>1,'甾'=>1,'𤲒'=>1,'異'=>1,'𢆟'=>1,'瘐'=>1,'𤾡'=>1,'𤾸'=>1,'𥁄'=>1,'㿼'=>1,'䀈'=>1,'直'=>1,'𥃳'=>1,'𥃲'=>1,'𥄙'=>1,'𥄳'=>1,'眞'=>1,'真'=>1,'真'=>1,'睊'=>1,'䀹'=>1,'瞋'=>1,'䁆'=>1,'䂖'=>1,'𥐝'=>1,'硎'=>1,'碌'=>1,'磌'=>1,'䃣'=>1,'𥘦'=>1,'祖'=>1,'𥚚'=>1,'𥛅'=>1,'福'=>1,'秫'=>1,'䄯'=>1,'穀'=>1,'穊'=>1,'穏'=>1,'𥥼'=>1,'𥪧'=>1,'𥪧'=>1,'竮'=>1,'䈂'=>1,'𥮫'=>1,'篆'=>1,'築'=>1,'䈧'=>1,'𥲀'=>1,'糒'=>1,'䊠'=>1,'糨'=>1,'糣'=>1,'紀'=>1,'𥾆'=>1,'絣'=>1,'䌁'=>1,'緇'=>1,'縂'=>1,'繅'=>1,'䌴'=>1,'𦈨'=>1,'𦉇'=>1,'䍙'=>1,'𦋙'=>1,'罺'=>1,'𦌾'=>1,'羕'=>1,'翺'=>1,'者'=>1,'𦓚'=>1,'𦔣'=>1,'聠'=>1,'𦖨'=>1,'聰'=>1,'𣍟'=>1,'䏕'=>1,'育'=>1,'脃'=>1,'䐋'=>1,'脾'=>1,'媵'=>1,'𦞧'=>1,'𦞵'=>1,'𣎓'=>1,'𣎜'=>1,'舁'=>1,'舄'=>1,'辞'=>1,'䑫'=>1,'芑'=>1,'芋'=>1,'芝'=>1,'劳'=>1,'花'=>1,'芳'=>1,'芽'=>1,'苦'=>1,'𦬼'=>1,'若'=>1,'茝'=>1,'荣'=>1,'莭'=>1,'茣'=>1,'莽'=>1,'菧'=>1,'著'=>1,'荓'=>1,'菊'=>1,'菌'=>1,'菜'=>1,'𦰶'=>1,'𦵫'=>1,'𦳕'=>1,'䔫'=>1,'蓱'=>1,'蓳'=>1,'蔖'=>1,'𧏊'=>1,'蕤'=>1,'𦼬'=>1,'䕝'=>1,'䕡'=>1,'𦾱'=>1,'𧃒'=>1,'䕫'=>1,'虐'=>1,'虜'=>1,'虧'=>1,'虩'=>1,'蚩'=>1,'蚈'=>1,'蜎'=>1,'蛢'=>1,'蝹'=>1,'蜨'=>1,'蝫'=>1,'螆'=>1,'䗗'=>1,'蟡'=>1,'蠁'=>1,'䗹'=>1,'衠'=>1,'衣'=>1,'𧙧'=>1,'裗'=>1,'裞'=>1,'䘵'=>1,'裺'=>1,'㒻'=>1,'𧢮'=>1,'𧥦'=>1,'䚾'=>1,'䛇'=>1,'誠'=>1,'諭'=>1,'變'=>1,'豕'=>1,'𧲨'=>1,'貫'=>1,'賁'=>1,'贛'=>1,'起'=>1,'𧼯'=>1,'𠠄'=>1,'跋'=>1,'趼'=>1,'跰'=>1,'𠣞'=>1,'軔'=>1,'輸'=>1,'𨗒'=>1,'𨗭'=>1,'邔'=>1,'郱'=>1,'鄑'=>1,'𨜮'=>1,'鄛'=>1,'鈸'=>1,'鋗'=>1,'鋘'=>1,'鉼'=>1,'鏹'=>1,'鐕'=>1,'𨯺'=>1,'開'=>1,'䦕'=>1,'閷'=>1,'𨵷'=>1,'䧦'=>1,'雃'=>1,'嶲'=>1,'霣'=>1,'𩅅'=>1,'𩈚'=>1,'䩮'=>1,'䩶'=>1,'韠'=>1,'𩐊'=>1,'䪲'=>1,'𩒖'=>1,'頋'=>1,'頋'=>1,'頩'=>1,'𩖶'=>1,'飢'=>1,'䬳'=>1,'餩'=>1,'馧'=>1,'駂'=>1,'駾'=>1,'䯎'=>1,'𩬰'=>1,'鬒'=>1,'鱀'=>1,'鳽'=>1,'䳎'=>1,'䳭'=>1,'鵧'=>1,'𪃎'=>1,'䳸'=>1,'𪄅'=>1,'𪈎'=>1,'𪊑'=>1,'麻'=>1,'䵖'=>1,'黹'=>1,'黾'=>1,'鼅'=>1,'鼏'=>1,'鼖'=>1,'鼻'=>1,'𪘀'=>1,'̀'=>0,'́'=>0,'̂'=>0,'̃'=>0,'̄'=>0,'̆'=>0,'̇'=>0,'̈'=>0,'̉'=>0,'̊'=>0,'̋'=>0,'̌'=>0,'̏'=>0,'̑'=>0,'̓'=>0,'̔'=>0,'̛'=>0,'̣'=>0,'̤'=>0,'̥'=>0,'̦'=>0,'̧'=>0,'̨'=>0,'̭'=>0,'̮'=>0,'̰'=>0,'̱'=>0,'̸'=>0,'͂'=>0,'ͅ'=>0,'ٓ'=>0,'ٔ'=>0,'ٕ'=>0,'़'=>0,'া'=>0,'ৗ'=>0,'ା'=>0,'ୖ'=>0,'ୗ'=>0,'ா'=>0,'ௗ'=>0,'ౖ'=>0,'ೂ'=>0,'ೕ'=>0,'ೖ'=>0,'ാ'=>0,'ൗ'=>0,'්'=>0,'ා'=>0,'ෟ'=>0,'ီ'=>0,'ᅡ'=>0,'ᅢ'=>0,'ᅣ'=>0,'ᅤ'=>0,'ᅥ'=>0,'ᅦ'=>0,'ᅧ'=>0,'ᅨ'=>0,'ᅩ'=>0,'ᅪ'=>0,'ᅫ'=>0,'ᅬ'=>0,'ᅭ'=>0,'ᅮ'=>0,'ᅯ'=>0,'ᅰ'=>0,'ᅱ'=>0,'ᅲ'=>0,'ᅳ'=>0,'ᅴ'=>0,'ᅵ'=>0,'ᆨ'=>0,'ᆩ'=>0,'ᆪ'=>0,'ᆫ'=>0,'ᆬ'=>0,'ᆭ'=>0,'ᆮ'=>0,'ᆯ'=>0,'ᆰ'=>0,'ᆱ'=>0,'ᆲ'=>0,'ᆳ'=>0,'ᆴ'=>0,'ᆵ'=>0,'ᆶ'=>0,'ᆷ'=>0,'ᆸ'=>0,'ᆹ'=>0,'ᆺ'=>0,'ᆻ'=>0,'ᆼ'=>0,'ᆽ'=>0,'ᆾ'=>0,'ᆿ'=>0,'ᇀ'=>0,'ᇁ'=>0,'ᇂ'=>0,'ᬵ'=>0,'゙'=>0,'゚'=>0); \ No newline at end of file
+$GLOBALS['utf_nfc_qc']=array('̀'=>1,'́'=>1,'̓'=>1,'̈́'=>1,'ʹ'=>1,';'=>1,'·'=>1,'क़'=>1,'ख़'=>1,'ग़'=>1,'ज़'=>1,'ड़'=>1,'ढ़'=>1,'फ़'=>1,'य़'=>1,'ড়'=>1,'ঢ়'=>1,'য়'=>1,'ਲ਼'=>1,'ਸ਼'=>1,'ਖ਼'=>1,'ਗ਼'=>1,'ਜ਼'=>1,'ਫ਼'=>1,'ଡ଼'=>1,'ଢ଼'=>1,'གྷ'=>1,'ཌྷ'=>1,'དྷ'=>1,'བྷ'=>1,'ཛྷ'=>1,'ཀྵ'=>1,'ཱི'=>1,'ཱུ'=>1,'ྲྀ'=>1,'ླྀ'=>1,'ཱྀ'=>1,'ྒྷ'=>1,'ྜྷ'=>1,'ྡྷ'=>1,'ྦྷ'=>1,'ྫྷ'=>1,'ྐྵ'=>1,'ά'=>1,'έ'=>1,'ή'=>1,'ί'=>1,'ό'=>1,'ύ'=>1,'ώ'=>1,'Ά'=>1,'ι'=>1,'Έ'=>1,'Ή'=>1,'ΐ'=>1,'Ί'=>1,'ΰ'=>1,'Ύ'=>1,'΅'=>1,'`'=>1,'Ό'=>1,'Ώ'=>1,'´'=>1,' '=>1,' '=>1,'Ω'=>1,'K'=>1,'Å'=>1,'〈'=>1,'〉'=>1,'⫝̸'=>1,'豈'=>1,'更'=>1,'車'=>1,'賈'=>1,'滑'=>1,'串'=>1,'句'=>1,'龜'=>1,'龜'=>1,'契'=>1,'金'=>1,'喇'=>1,'奈'=>1,'懶'=>1,'癩'=>1,'羅'=>1,'蘿'=>1,'螺'=>1,'裸'=>1,'邏'=>1,'樂'=>1,'洛'=>1,'烙'=>1,'珞'=>1,'落'=>1,'酪'=>1,'駱'=>1,'亂'=>1,'卵'=>1,'欄'=>1,'爛'=>1,'蘭'=>1,'鸞'=>1,'嵐'=>1,'濫'=>1,'藍'=>1,'襤'=>1,'拉'=>1,'臘'=>1,'蠟'=>1,'廊'=>1,'朗'=>1,'浪'=>1,'狼'=>1,'郎'=>1,'來'=>1,'冷'=>1,'勞'=>1,'擄'=>1,'櫓'=>1,'爐'=>1,'盧'=>1,'老'=>1,'蘆'=>1,'虜'=>1,'路'=>1,'露'=>1,'魯'=>1,'鷺'=>1,'碌'=>1,'祿'=>1,'綠'=>1,'菉'=>1,'錄'=>1,'鹿'=>1,'論'=>1,'壟'=>1,'弄'=>1,'籠'=>1,'聾'=>1,'牢'=>1,'磊'=>1,'賂'=>1,'雷'=>1,'壘'=>1,'屢'=>1,'樓'=>1,'淚'=>1,'漏'=>1,'累'=>1,'縷'=>1,'陋'=>1,'勒'=>1,'肋'=>1,'凜'=>1,'凌'=>1,'稜'=>1,'綾'=>1,'菱'=>1,'陵'=>1,'讀'=>1,'拏'=>1,'樂'=>1,'諾'=>1,'丹'=>1,'寧'=>1,'怒'=>1,'率'=>1,'異'=>1,'北'=>1,'磻'=>1,'便'=>1,'復'=>1,'不'=>1,'泌'=>1,'數'=>1,'索'=>1,'參'=>1,'塞'=>1,'省'=>1,'葉'=>1,'說'=>1,'殺'=>1,'辰'=>1,'沈'=>1,'拾'=>1,'若'=>1,'掠'=>1,'略'=>1,'亮'=>1,'兩'=>1,'凉'=>1,'梁'=>1,'糧'=>1,'良'=>1,'諒'=>1,'量'=>1,'勵'=>1,'呂'=>1,'女'=>1,'廬'=>1,'旅'=>1,'濾'=>1,'礪'=>1,'閭'=>1,'驪'=>1,'麗'=>1,'黎'=>1,'力'=>1,'曆'=>1,'歷'=>1,'轢'=>1,'年'=>1,'憐'=>1,'戀'=>1,'撚'=>1,'漣'=>1,'煉'=>1,'璉'=>1,'秊'=>1,'練'=>1,'聯'=>1,'輦'=>1,'蓮'=>1,'連'=>1,'鍊'=>1,'列'=>1,'劣'=>1,'咽'=>1,'烈'=>1,'裂'=>1,'說'=>1,'廉'=>1,'念'=>1,'捻'=>1,'殮'=>1,'簾'=>1,'獵'=>1,'令'=>1,'囹'=>1,'寧'=>1,'嶺'=>1,'怜'=>1,'玲'=>1,'瑩'=>1,'羚'=>1,'聆'=>1,'鈴'=>1,'零'=>1,'靈'=>1,'領'=>1,'例'=>1,'禮'=>1,'醴'=>1,'隸'=>1,'惡'=>1,'了'=>1,'僚'=>1,'寮'=>1,'尿'=>1,'料'=>1,'樂'=>1,'燎'=>1,'療'=>1,'蓼'=>1,'遼'=>1,'龍'=>1,'暈'=>1,'阮'=>1,'劉'=>1,'杻'=>1,'柳'=>1,'流'=>1,'溜'=>1,'琉'=>1,'留'=>1,'硫'=>1,'紐'=>1,'類'=>1,'六'=>1,'戮'=>1,'陸'=>1,'倫'=>1,'崙'=>1,'淪'=>1,'輪'=>1,'律'=>1,'慄'=>1,'栗'=>1,'率'=>1,'隆'=>1,'利'=>1,'吏'=>1,'履'=>1,'易'=>1,'李'=>1,'梨'=>1,'泥'=>1,'理'=>1,'痢'=>1,'罹'=>1,'裏'=>1,'裡'=>1,'里'=>1,'離'=>1,'匿'=>1,'溺'=>1,'吝'=>1,'燐'=>1,'璘'=>1,'藺'=>1,'隣'=>1,'鱗'=>1,'麟'=>1,'林'=>1,'淋'=>1,'臨'=>1,'立'=>1,'笠'=>1,'粒'=>1,'狀'=>1,'炙'=>1,'識'=>1,'什'=>1,'茶'=>1,'刺'=>1,'切'=>1,'度'=>1,'拓'=>1,'糖'=>1,'宅'=>1,'洞'=>1,'暴'=>1,'輻'=>1,'行'=>1,'降'=>1,'見'=>1,'廓'=>1,'兀'=>1,'嗀'=>1,'塚'=>1,'晴'=>1,'凞'=>1,'猪'=>1,'益'=>1,'礼'=>1,'神'=>1,'祥'=>1,'福'=>1,'靖'=>1,'精'=>1,'羽'=>1,'蘒'=>1,'諸'=>1,'逸'=>1,'都'=>1,'飯'=>1,'飼'=>1,'館'=>1,'鶴'=>1,'侮'=>1,'僧'=>1,'免'=>1,'勉'=>1,'勤'=>1,'卑'=>1,'喝'=>1,'嘆'=>1,'器'=>1,'塀'=>1,'墨'=>1,'層'=>1,'屮'=>1,'悔'=>1,'慨'=>1,'憎'=>1,'懲'=>1,'敏'=>1,'既'=>1,'暑'=>1,'梅'=>1,'海'=>1,'渚'=>1,'漢'=>1,'煮'=>1,'爫'=>1,'琢'=>1,'碑'=>1,'社'=>1,'祉'=>1,'祈'=>1,'祐'=>1,'祖'=>1,'祝'=>1,'禍'=>1,'禎'=>1,'穀'=>1,'突'=>1,'節'=>1,'練'=>1,'縉'=>1,'繁'=>1,'署'=>1,'者'=>1,'臭'=>1,'艹'=>1,'艹'=>1,'著'=>1,'褐'=>1,'視'=>1,'謁'=>1,'謹'=>1,'賓'=>1,'贈'=>1,'辶'=>1,'逸'=>1,'難'=>1,'響'=>1,'頻'=>1,'並'=>1,'况'=>1,'全'=>1,'侀'=>1,'充'=>1,'冀'=>1,'勇'=>1,'勺'=>1,'喝'=>1,'啕'=>1,'喙'=>1,'嗢'=>1,'塚'=>1,'墳'=>1,'奄'=>1,'奔'=>1,'婢'=>1,'嬨'=>1,'廒'=>1,'廙'=>1,'彩'=>1,'徭'=>1,'惘'=>1,'慎'=>1,'愈'=>1,'憎'=>1,'慠'=>1,'懲'=>1,'戴'=>1,'揄'=>1,'搜'=>1,'摒'=>1,'敖'=>1,'晴'=>1,'朗'=>1,'望'=>1,'杖'=>1,'歹'=>1,'殺'=>1,'流'=>1,'滛'=>1,'滋'=>1,'漢'=>1,'瀞'=>1,'煮'=>1,'瞧'=>1,'爵'=>1,'犯'=>1,'猪'=>1,'瑱'=>1,'甆'=>1,'画'=>1,'瘝'=>1,'瘟'=>1,'益'=>1,'盛'=>1,'直'=>1,'睊'=>1,'着'=>1,'磌'=>1,'窱'=>1,'節'=>1,'类'=>1,'絛'=>1,'練'=>1,'缾'=>1,'者'=>1,'荒'=>1,'華'=>1,'蝹'=>1,'襁'=>1,'覆'=>1,'視'=>1,'調'=>1,'諸'=>1,'請'=>1,'謁'=>1,'諾'=>1,'諭'=>1,'謹'=>1,'變'=>1,'贈'=>1,'輸'=>1,'遲'=>1,'醙'=>1,'鉶'=>1,'陼'=>1,'難'=>1,'靖'=>1,'韛'=>1,'響'=>1,'頋'=>1,'頻'=>1,'鬒'=>1,'龜'=>1,'𢡊'=>1,'𢡄'=>1,'𣏕'=>1,'㮝'=>1,'䀘'=>1,'䀹'=>1,'𥉉'=>1,'𥳐'=>1,'𧻓'=>1,'齃'=>1,'龎'=>1,'יִ'=>1,'ײַ'=>1,'שׁ'=>1,'שׂ'=>1,'שּׁ'=>1,'שּׂ'=>1,'אַ'=>1,'אָ'=>1,'אּ'=>1,'בּ'=>1,'גּ'=>1,'דּ'=>1,'הּ'=>1,'וּ'=>1,'זּ'=>1,'טּ'=>1,'יּ'=>1,'ךּ'=>1,'כּ'=>1,'לּ'=>1,'מּ'=>1,'נּ'=>1,'סּ'=>1,'ףּ'=>1,'פּ'=>1,'צּ'=>1,'קּ'=>1,'רּ'=>1,'שּ'=>1,'תּ'=>1,'וֹ'=>1,'בֿ'=>1,'כֿ'=>1,'פֿ'=>1,'𝅗𝅥'=>1,'𝅘𝅥'=>1,'𝅘𝅥𝅮'=>1,'𝅘𝅥𝅯'=>1,'𝅘𝅥𝅰'=>1,'𝅘𝅥𝅱'=>1,'𝅘𝅥𝅲'=>1,'𝆹𝅥'=>1,'𝆺𝅥'=>1,'𝆹𝅥𝅮'=>1,'𝆺𝅥𝅮'=>1,'𝆹𝅥𝅯'=>1,'𝆺𝅥𝅯'=>1,'丽'=>1,'丸'=>1,'乁'=>1,'𠄢'=>1,'你'=>1,'侮'=>1,'侻'=>1,'倂'=>1,'偺'=>1,'備'=>1,'僧'=>1,'像'=>1,'㒞'=>1,'𠘺'=>1,'免'=>1,'兔'=>1,'兤'=>1,'具'=>1,'𠔜'=>1,'㒹'=>1,'內'=>1,'再'=>1,'𠕋'=>1,'冗'=>1,'冤'=>1,'仌'=>1,'冬'=>1,'况'=>1,'𩇟'=>1,'凵'=>1,'刃'=>1,'㓟'=>1,'刻'=>1,'剆'=>1,'割'=>1,'剷'=>1,'㔕'=>1,'勇'=>1,'勉'=>1,'勤'=>1,'勺'=>1,'包'=>1,'匆'=>1,'北'=>1,'卉'=>1,'卑'=>1,'博'=>1,'即'=>1,'卽'=>1,'卿'=>1,'卿'=>1,'卿'=>1,'𠨬'=>1,'灰'=>1,'及'=>1,'叟'=>1,'𠭣'=>1,'叫'=>1,'叱'=>1,'吆'=>1,'咞'=>1,'吸'=>1,'呈'=>1,'周'=>1,'咢'=>1,'哶'=>1,'唐'=>1,'啓'=>1,'啣'=>1,'善'=>1,'善'=>1,'喙'=>1,'喫'=>1,'喳'=>1,'嗂'=>1,'圖'=>1,'嘆'=>1,'圗'=>1,'噑'=>1,'噴'=>1,'切'=>1,'壮'=>1,'城'=>1,'埴'=>1,'堍'=>1,'型'=>1,'堲'=>1,'報'=>1,'墬'=>1,'𡓤'=>1,'売'=>1,'壷'=>1,'夆'=>1,'多'=>1,'夢'=>1,'奢'=>1,'𡚨'=>1,'𡛪'=>1,'姬'=>1,'娛'=>1,'娧'=>1,'姘'=>1,'婦'=>1,'㛮'=>1,'㛼'=>1,'嬈'=>1,'嬾'=>1,'嬾'=>1,'𡧈'=>1,'寃'=>1,'寘'=>1,'寧'=>1,'寳'=>1,'𡬘'=>1,'寿'=>1,'将'=>1,'当'=>1,'尢'=>1,'㞁'=>1,'屠'=>1,'屮'=>1,'峀'=>1,'岍'=>1,'𡷤'=>1,'嵃'=>1,'𡷦'=>1,'嵮'=>1,'嵫'=>1,'嵼'=>1,'巡'=>1,'巢'=>1,'㠯'=>1,'巽'=>1,'帨'=>1,'帽'=>1,'幩'=>1,'㡢'=>1,'𢆃'=>1,'㡼'=>1,'庰'=>1,'庳'=>1,'庶'=>1,'廊'=>1,'𪎒'=>1,'廾'=>1,'𢌱'=>1,'𢌱'=>1,'舁'=>1,'弢'=>1,'弢'=>1,'㣇'=>1,'𣊸'=>1,'𦇚'=>1,'形'=>1,'彫'=>1,'㣣'=>1,'徚'=>1,'忍'=>1,'志'=>1,'忹'=>1,'悁'=>1,'㤺'=>1,'㤜'=>1,'悔'=>1,'𢛔'=>1,'惇'=>1,'慈'=>1,'慌'=>1,'慎'=>1,'慌'=>1,'慺'=>1,'憎'=>1,'憲'=>1,'憤'=>1,'憯'=>1,'懞'=>1,'懲'=>1,'懶'=>1,'成'=>1,'戛'=>1,'扝'=>1,'抱'=>1,'拔'=>1,'捐'=>1,'𢬌'=>1,'挽'=>1,'拼'=>1,'捨'=>1,'掃'=>1,'揤'=>1,'𢯱'=>1,'搢'=>1,'揅'=>1,'掩'=>1,'㨮'=>1,'摩'=>1,'摾'=>1,'撝'=>1,'摷'=>1,'㩬'=>1,'敏'=>1,'敬'=>1,'𣀊'=>1,'旣'=>1,'書'=>1,'晉'=>1,'㬙'=>1,'暑'=>1,'㬈'=>1,'㫤'=>1,'冒'=>1,'冕'=>1,'最'=>1,'暜'=>1,'肭'=>1,'䏙'=>1,'朗'=>1,'望'=>1,'朡'=>1,'杞'=>1,'杓'=>1,'𣏃'=>1,'㭉'=>1,'柺'=>1,'枅'=>1,'桒'=>1,'梅'=>1,'𣑭'=>1,'梎'=>1,'栟'=>1,'椔'=>1,'㮝'=>1,'楂'=>1,'榣'=>1,'槪'=>1,'檨'=>1,'𣚣'=>1,'櫛'=>1,'㰘'=>1,'次'=>1,'𣢧'=>1,'歔'=>1,'㱎'=>1,'歲'=>1,'殟'=>1,'殺'=>1,'殻'=>1,'𣪍'=>1,'𡴋'=>1,'𣫺'=>1,'汎'=>1,'𣲼'=>1,'沿'=>1,'泍'=>1,'汧'=>1,'洖'=>1,'派'=>1,'海'=>1,'流'=>1,'浩'=>1,'浸'=>1,'涅'=>1,'𣴞'=>1,'洴'=>1,'港'=>1,'湮'=>1,'㴳'=>1,'滋'=>1,'滇'=>1,'𣻑'=>1,'淹'=>1,'潮'=>1,'𣽞'=>1,'𣾎'=>1,'濆'=>1,'瀹'=>1,'瀞'=>1,'瀛'=>1,'㶖'=>1,'灊'=>1,'災'=>1,'灷'=>1,'炭'=>1,'𠔥'=>1,'煅'=>1,'𤉣'=>1,'熜'=>1,'𤎫'=>1,'爨'=>1,'爵'=>1,'牐'=>1,'𤘈'=>1,'犀'=>1,'犕'=>1,'𤜵'=>1,'𤠔'=>1,'獺'=>1,'王'=>1,'㺬'=>1,'玥'=>1,'㺸'=>1,'㺸'=>1,'瑇'=>1,'瑜'=>1,'瑱'=>1,'璅'=>1,'瓊'=>1,'㼛'=>1,'甤'=>1,'𤰶'=>1,'甾'=>1,'𤲒'=>1,'異'=>1,'𢆟'=>1,'瘐'=>1,'𤾡'=>1,'𤾸'=>1,'𥁄'=>1,'㿼'=>1,'䀈'=>1,'直'=>1,'𥃳'=>1,'𥃲'=>1,'𥄙'=>1,'𥄳'=>1,'眞'=>1,'真'=>1,'真'=>1,'睊'=>1,'䀹'=>1,'瞋'=>1,'䁆'=>1,'䂖'=>1,'𥐝'=>1,'硎'=>1,'碌'=>1,'磌'=>1,'䃣'=>1,'𥘦'=>1,'祖'=>1,'𥚚'=>1,'𥛅'=>1,'福'=>1,'秫'=>1,'䄯'=>1,'穀'=>1,'穊'=>1,'穏'=>1,'𥥼'=>1,'𥪧'=>1,'𥪧'=>1,'竮'=>1,'䈂'=>1,'𥮫'=>1,'篆'=>1,'築'=>1,'䈧'=>1,'𥲀'=>1,'糒'=>1,'䊠'=>1,'糨'=>1,'糣'=>1,'紀'=>1,'𥾆'=>1,'絣'=>1,'䌁'=>1,'緇'=>1,'縂'=>1,'繅'=>1,'䌴'=>1,'𦈨'=>1,'𦉇'=>1,'䍙'=>1,'𦋙'=>1,'罺'=>1,'𦌾'=>1,'羕'=>1,'翺'=>1,'者'=>1,'𦓚'=>1,'𦔣'=>1,'聠'=>1,'𦖨'=>1,'聰'=>1,'𣍟'=>1,'䏕'=>1,'育'=>1,'脃'=>1,'䐋'=>1,'脾'=>1,'媵'=>1,'𦞧'=>1,'𦞵'=>1,'𣎓'=>1,'𣎜'=>1,'舁'=>1,'舄'=>1,'辞'=>1,'䑫'=>1,'芑'=>1,'芋'=>1,'芝'=>1,'劳'=>1,'花'=>1,'芳'=>1,'芽'=>1,'苦'=>1,'𦬼'=>1,'若'=>1,'茝'=>1,'荣'=>1,'莭'=>1,'茣'=>1,'莽'=>1,'菧'=>1,'著'=>1,'荓'=>1,'菊'=>1,'菌'=>1,'菜'=>1,'𦰶'=>1,'𦵫'=>1,'𦳕'=>1,'䔫'=>1,'蓱'=>1,'蓳'=>1,'蔖'=>1,'𧏊'=>1,'蕤'=>1,'𦼬'=>1,'䕝'=>1,'䕡'=>1,'𦾱'=>1,'𧃒'=>1,'䕫'=>1,'虐'=>1,'虜'=>1,'虧'=>1,'虩'=>1,'蚩'=>1,'蚈'=>1,'蜎'=>1,'蛢'=>1,'蝹'=>1,'蜨'=>1,'蝫'=>1,'螆'=>1,'䗗'=>1,'蟡'=>1,'蠁'=>1,'䗹'=>1,'衠'=>1,'衣'=>1,'𧙧'=>1,'裗'=>1,'裞'=>1,'䘵'=>1,'裺'=>1,'㒻'=>1,'𧢮'=>1,'𧥦'=>1,'䚾'=>1,'䛇'=>1,'誠'=>1,'諭'=>1,'變'=>1,'豕'=>1,'𧲨'=>1,'貫'=>1,'賁'=>1,'贛'=>1,'起'=>1,'𧼯'=>1,'𠠄'=>1,'跋'=>1,'趼'=>1,'跰'=>1,'𠣞'=>1,'軔'=>1,'輸'=>1,'𨗒'=>1,'𨗭'=>1,'邔'=>1,'郱'=>1,'鄑'=>1,'𨜮'=>1,'鄛'=>1,'鈸'=>1,'鋗'=>1,'鋘'=>1,'鉼'=>1,'鏹'=>1,'鐕'=>1,'𨯺'=>1,'開'=>1,'䦕'=>1,'閷'=>1,'𨵷'=>1,'䧦'=>1,'雃'=>1,'嶲'=>1,'霣'=>1,'𩅅'=>1,'𩈚'=>1,'䩮'=>1,'䩶'=>1,'韠'=>1,'𩐊'=>1,'䪲'=>1,'𩒖'=>1,'頋'=>1,'頋'=>1,'頩'=>1,'𩖶'=>1,'飢'=>1,'䬳'=>1,'餩'=>1,'馧'=>1,'駂'=>1,'駾'=>1,'䯎'=>1,'𩬰'=>1,'鬒'=>1,'鱀'=>1,'鳽'=>1,'䳎'=>1,'䳭'=>1,'鵧'=>1,'𪃎'=>1,'䳸'=>1,'𪄅'=>1,'𪈎'=>1,'𪊑'=>1,'麻'=>1,'䵖'=>1,'黹'=>1,'黾'=>1,'鼅'=>1,'鼏'=>1,'鼖'=>1,'鼻'=>1,'𪘀'=>1,'̀'=>0,'́'=>0,'̂'=>0,'̃'=>0,'̄'=>0,'̆'=>0,'̇'=>0,'̈'=>0,'̉'=>0,'̊'=>0,'̋'=>0,'̌'=>0,'̏'=>0,'̑'=>0,'̓'=>0,'̔'=>0,'̛'=>0,'̣'=>0,'̤'=>0,'̥'=>0,'̦'=>0,'̧'=>0,'̨'=>0,'̭'=>0,'̮'=>0,'̰'=>0,'̱'=>0,'̸'=>0,'͂'=>0,'ͅ'=>0,'ٓ'=>0,'ٔ'=>0,'ٕ'=>0,'़'=>0,'া'=>0,'ৗ'=>0,'ା'=>0,'ୖ'=>0,'ୗ'=>0,'ா'=>0,'ௗ'=>0,'ౖ'=>0,'ೂ'=>0,'ೕ'=>0,'ೖ'=>0,'ാ'=>0,'ൗ'=>0,'්'=>0,'ා'=>0,'ෟ'=>0,'ီ'=>0,'ᅡ'=>0,'ᅢ'=>0,'ᅣ'=>0,'ᅤ'=>0,'ᅥ'=>0,'ᅦ'=>0,'ᅧ'=>0,'ᅨ'=>0,'ᅩ'=>0,'ᅪ'=>0,'ᅫ'=>0,'ᅬ'=>0,'ᅭ'=>0,'ᅮ'=>0,'ᅯ'=>0,'ᅰ'=>0,'ᅱ'=>0,'ᅲ'=>0,'ᅳ'=>0,'ᅴ'=>0,'ᅵ'=>0,'ᆨ'=>0,'ᆩ'=>0,'ᆪ'=>0,'ᆫ'=>0,'ᆬ'=>0,'ᆭ'=>0,'ᆮ'=>0,'ᆯ'=>0,'ᆰ'=>0,'ᆱ'=>0,'ᆲ'=>0,'ᆳ'=>0,'ᆴ'=>0,'ᆵ'=>0,'ᆶ'=>0,'ᆷ'=>0,'ᆸ'=>0,'ᆹ'=>0,'ᆺ'=>0,'ᆻ'=>0,'ᆼ'=>0,'ᆽ'=>0,'ᆾ'=>0,'ᆿ'=>0,'ᇀ'=>0,'ᇁ'=>0,'ᇂ'=>0,'ᬵ'=>0,'゙'=>0,'゚'=>0);
diff --git a/phpBB/includes/utf/data/utf_nfkc_qc.php b/phpBB/includes/utf/data/utf_nfkc_qc.php
index da9a8a0e89..181a07b351 100644
--- a/phpBB/includes/utf/data/utf_nfkc_qc.php
+++ b/phpBB/includes/utf/data/utf_nfkc_qc.php
@@ -1,2 +1,2 @@
<?php
-$GLOBALS['utf_nfkc_qc']=array(' '=>1,'¨'=>1,'ª'=>1,'¯'=>1,'²'=>1,'³'=>1,'´'=>1,'µ'=>1,'¸'=>1,'¹'=>1,'º'=>1,'¼'=>1,'½'=>1,'¾'=>1,'IJ'=>1,'ij'=>1,'Ŀ'=>1,'ŀ'=>1,'ʼn'=>1,'ſ'=>1,'DŽ'=>1,'Dž'=>1,'dž'=>1,'LJ'=>1,'Lj'=>1,'lj'=>1,'NJ'=>1,'Nj'=>1,'nj'=>1,'DZ'=>1,'Dz'=>1,'dz'=>1,'ʰ'=>1,'ʱ'=>1,'ʲ'=>1,'ʳ'=>1,'ʴ'=>1,'ʵ'=>1,'ʶ'=>1,'ʷ'=>1,'ʸ'=>1,'˘'=>1,'˙'=>1,'˚'=>1,'˛'=>1,'˜'=>1,'˝'=>1,'ˠ'=>1,'ˡ'=>1,'ˢ'=>1,'ˣ'=>1,'ˤ'=>1,'̀'=>1,'́'=>1,'̓'=>1,'̈́'=>1,'ʹ'=>1,'ͺ'=>1,';'=>1,'΄'=>1,'΅'=>1,'·'=>1,'ϐ'=>1,'ϑ'=>1,'ϒ'=>1,'ϓ'=>1,'ϔ'=>1,'ϕ'=>1,'ϖ'=>1,'ϰ'=>1,'ϱ'=>1,'ϲ'=>1,'ϴ'=>1,'ϵ'=>1,'Ϲ'=>1,'և'=>1,'ٵ'=>1,'ٶ'=>1,'ٷ'=>1,'ٸ'=>1,'क़'=>1,'ख़'=>1,'ग़'=>1,'ज़'=>1,'ड़'=>1,'ढ़'=>1,'फ़'=>1,'य़'=>1,'ড়'=>1,'ঢ়'=>1,'য়'=>1,'ਲ਼'=>1,'ਸ਼'=>1,'ਖ਼'=>1,'ਗ਼'=>1,'ਜ਼'=>1,'ਫ਼'=>1,'ଡ଼'=>1,'ଢ଼'=>1,'ำ'=>1,'ຳ'=>1,'ໜ'=>1,'ໝ'=>1,'༌'=>1,'གྷ'=>1,'ཌྷ'=>1,'དྷ'=>1,'བྷ'=>1,'ཛྷ'=>1,'ཀྵ'=>1,'ཱི'=>1,'ཱུ'=>1,'ྲྀ'=>1,'ཷ'=>1,'ླྀ'=>1,'ཹ'=>1,'ཱྀ'=>1,'ྒྷ'=>1,'ྜྷ'=>1,'ྡྷ'=>1,'ྦྷ'=>1,'ྫྷ'=>1,'ྐྵ'=>1,'ჼ'=>1,'ᴬ'=>1,'ᴭ'=>1,'ᴮ'=>1,'ᴰ'=>1,'ᴱ'=>1,'ᴲ'=>1,'ᴳ'=>1,'ᴴ'=>1,'ᴵ'=>1,'ᴶ'=>1,'ᴷ'=>1,'ᴸ'=>1,'ᴹ'=>1,'ᴺ'=>1,'ᴼ'=>1,'ᴽ'=>1,'ᴾ'=>1,'ᴿ'=>1,'ᵀ'=>1,'ᵁ'=>1,'ᵂ'=>1,'ᵃ'=>1,'ᵄ'=>1,'ᵅ'=>1,'ᵆ'=>1,'ᵇ'=>1,'ᵈ'=>1,'ᵉ'=>1,'ᵊ'=>1,'ᵋ'=>1,'ᵌ'=>1,'ᵍ'=>1,'ᵏ'=>1,'ᵐ'=>1,'ᵑ'=>1,'ᵒ'=>1,'ᵓ'=>1,'ᵔ'=>1,'ᵕ'=>1,'ᵖ'=>1,'ᵗ'=>1,'ᵘ'=>1,'ᵙ'=>1,'ᵚ'=>1,'ᵛ'=>1,'ᵜ'=>1,'ᵝ'=>1,'ᵞ'=>1,'ᵟ'=>1,'ᵠ'=>1,'ᵡ'=>1,'ᵢ'=>1,'ᵣ'=>1,'ᵤ'=>1,'ᵥ'=>1,'ᵦ'=>1,'ᵧ'=>1,'ᵨ'=>1,'ᵩ'=>1,'ᵪ'=>1,'ᵸ'=>1,'ᶛ'=>1,'ᶜ'=>1,'ᶝ'=>1,'ᶞ'=>1,'ᶟ'=>1,'ᶠ'=>1,'ᶡ'=>1,'ᶢ'=>1,'ᶣ'=>1,'ᶤ'=>1,'ᶥ'=>1,'ᶦ'=>1,'ᶧ'=>1,'ᶨ'=>1,'ᶩ'=>1,'ᶪ'=>1,'ᶫ'=>1,'ᶬ'=>1,'ᶭ'=>1,'ᶮ'=>1,'ᶯ'=>1,'ᶰ'=>1,'ᶱ'=>1,'ᶲ'=>1,'ᶳ'=>1,'ᶴ'=>1,'ᶵ'=>1,'ᶶ'=>1,'ᶷ'=>1,'ᶸ'=>1,'ᶹ'=>1,'ᶺ'=>1,'ᶻ'=>1,'ᶼ'=>1,'ᶽ'=>1,'ᶾ'=>1,'ᶿ'=>1,'ẚ'=>1,'ẛ'=>1,'ά'=>1,'έ'=>1,'ή'=>1,'ί'=>1,'ό'=>1,'ύ'=>1,'ώ'=>1,'Ά'=>1,'᾽'=>1,'ι'=>1,'᾿'=>1,'῀'=>1,'῁'=>1,'Έ'=>1,'Ή'=>1,'῍'=>1,'῎'=>1,'῏'=>1,'ΐ'=>1,'Ί'=>1,'῝'=>1,'῞'=>1,'῟'=>1,'ΰ'=>1,'Ύ'=>1,'῭'=>1,'΅'=>1,'`'=>1,'Ό'=>1,'Ώ'=>1,'´'=>1,'῾'=>1,' '=>1,' '=>1,' '=>1,' '=>1,' '=>1,' '=>1,' '=>1,' '=>1,' '=>1,' '=>1,' '=>1,'‑'=>1,'‗'=>1,'․'=>1,'‥'=>1,'…'=>1,' '=>1,'″'=>1,'‴'=>1,'‶'=>1,'‷'=>1,'‼'=>1,'‾'=>1,'⁇'=>1,'⁈'=>1,'⁉'=>1,'⁗'=>1,' '=>1,'⁰'=>1,'ⁱ'=>1,'⁴'=>1,'⁵'=>1,'⁶'=>1,'⁷'=>1,'⁸'=>1,'⁹'=>1,'⁺'=>1,'⁻'=>1,'⁼'=>1,'⁽'=>1,'⁾'=>1,'ⁿ'=>1,'₀'=>1,'₁'=>1,'₂'=>1,'₃'=>1,'₄'=>1,'₅'=>1,'₆'=>1,'₇'=>1,'₈'=>1,'₉'=>1,'₊'=>1,'₋'=>1,'₌'=>1,'₍'=>1,'₎'=>1,'ₐ'=>1,'ₑ'=>1,'ₒ'=>1,'ₓ'=>1,'ₔ'=>1,'₨'=>1,'℀'=>1,'℁'=>1,'ℂ'=>1,'℃'=>1,'℅'=>1,'℆'=>1,'ℇ'=>1,'℉'=>1,'ℊ'=>1,'ℋ'=>1,'ℌ'=>1,'ℍ'=>1,'ℎ'=>1,'ℏ'=>1,'ℐ'=>1,'ℑ'=>1,'ℒ'=>1,'ℓ'=>1,'ℕ'=>1,'№'=>1,'ℙ'=>1,'ℚ'=>1,'ℛ'=>1,'ℜ'=>1,'ℝ'=>1,'℠'=>1,'℡'=>1,'™'=>1,'ℤ'=>1,'Ω'=>1,'ℨ'=>1,'K'=>1,'Å'=>1,'ℬ'=>1,'ℭ'=>1,'ℯ'=>1,'ℰ'=>1,'ℱ'=>1,'ℳ'=>1,'ℴ'=>1,'ℵ'=>1,'ℶ'=>1,'ℷ'=>1,'ℸ'=>1,'ℹ'=>1,'℻'=>1,'ℼ'=>1,'ℽ'=>1,'ℾ'=>1,'ℿ'=>1,'⅀'=>1,'ⅅ'=>1,'ⅆ'=>1,'ⅇ'=>1,'ⅈ'=>1,'ⅉ'=>1,'⅓'=>1,'⅔'=>1,'⅕'=>1,'⅖'=>1,'⅗'=>1,'⅘'=>1,'⅙'=>1,'⅚'=>1,'⅛'=>1,'⅜'=>1,'⅝'=>1,'⅞'=>1,'⅟'=>1,'Ⅰ'=>1,'Ⅱ'=>1,'Ⅲ'=>1,'Ⅳ'=>1,'Ⅴ'=>1,'Ⅵ'=>1,'Ⅶ'=>1,'Ⅷ'=>1,'Ⅸ'=>1,'Ⅹ'=>1,'Ⅺ'=>1,'Ⅻ'=>1,'Ⅼ'=>1,'Ⅽ'=>1,'Ⅾ'=>1,'Ⅿ'=>1,'ⅰ'=>1,'ⅱ'=>1,'ⅲ'=>1,'ⅳ'=>1,'ⅴ'=>1,'ⅵ'=>1,'ⅶ'=>1,'ⅷ'=>1,'ⅸ'=>1,'ⅹ'=>1,'ⅺ'=>1,'ⅻ'=>1,'ⅼ'=>1,'ⅽ'=>1,'ⅾ'=>1,'ⅿ'=>1,'∬'=>1,'∭'=>1,'∯'=>1,'∰'=>1,'〈'=>1,'〉'=>1,'①'=>1,'②'=>1,'③'=>1,'④'=>1,'⑤'=>1,'⑥'=>1,'⑦'=>1,'⑧'=>1,'⑨'=>1,'⑩'=>1,'⑪'=>1,'⑫'=>1,'⑬'=>1,'⑭'=>1,'⑮'=>1,'⑯'=>1,'⑰'=>1,'⑱'=>1,'⑲'=>1,'⑳'=>1,'⑴'=>1,'⑵'=>1,'⑶'=>1,'⑷'=>1,'⑸'=>1,'⑹'=>1,'⑺'=>1,'⑻'=>1,'⑼'=>1,'⑽'=>1,'⑾'=>1,'⑿'=>1,'⒀'=>1,'⒁'=>1,'⒂'=>1,'⒃'=>1,'⒄'=>1,'⒅'=>1,'⒆'=>1,'⒇'=>1,'⒈'=>1,'⒉'=>1,'⒊'=>1,'⒋'=>1,'⒌'=>1,'⒍'=>1,'⒎'=>1,'⒏'=>1,'⒐'=>1,'⒑'=>1,'⒒'=>1,'⒓'=>1,'⒔'=>1,'⒕'=>1,'⒖'=>1,'⒗'=>1,'⒘'=>1,'⒙'=>1,'⒚'=>1,'⒛'=>1,'⒜'=>1,'⒝'=>1,'⒞'=>1,'⒟'=>1,'⒠'=>1,'⒡'=>1,'⒢'=>1,'⒣'=>1,'⒤'=>1,'⒥'=>1,'⒦'=>1,'⒧'=>1,'⒨'=>1,'⒩'=>1,'⒪'=>1,'⒫'=>1,'⒬'=>1,'⒭'=>1,'⒮'=>1,'⒯'=>1,'⒰'=>1,'⒱'=>1,'⒲'=>1,'⒳'=>1,'⒴'=>1,'⒵'=>1,'Ⓐ'=>1,'Ⓑ'=>1,'Ⓒ'=>1,'Ⓓ'=>1,'Ⓔ'=>1,'Ⓕ'=>1,'Ⓖ'=>1,'Ⓗ'=>1,'Ⓘ'=>1,'Ⓙ'=>1,'Ⓚ'=>1,'Ⓛ'=>1,'Ⓜ'=>1,'Ⓝ'=>1,'Ⓞ'=>1,'Ⓟ'=>1,'Ⓠ'=>1,'Ⓡ'=>1,'Ⓢ'=>1,'Ⓣ'=>1,'Ⓤ'=>1,'Ⓥ'=>1,'Ⓦ'=>1,'Ⓧ'=>1,'Ⓨ'=>1,'Ⓩ'=>1,'ⓐ'=>1,'ⓑ'=>1,'ⓒ'=>1,'ⓓ'=>1,'ⓔ'=>1,'ⓕ'=>1,'ⓖ'=>1,'ⓗ'=>1,'ⓘ'=>1,'ⓙ'=>1,'ⓚ'=>1,'ⓛ'=>1,'ⓜ'=>1,'ⓝ'=>1,'ⓞ'=>1,'ⓟ'=>1,'ⓠ'=>1,'ⓡ'=>1,'ⓢ'=>1,'ⓣ'=>1,'ⓤ'=>1,'ⓥ'=>1,'ⓦ'=>1,'ⓧ'=>1,'ⓨ'=>1,'ⓩ'=>1,'⓪'=>1,'⨌'=>1,'⩴'=>1,'⩵'=>1,'⩶'=>1,'⫝̸'=>1,'ⵯ'=>1,'⺟'=>1,'⻳'=>1,'⼀'=>1,'⼁'=>1,'⼂'=>1,'⼃'=>1,'⼄'=>1,'⼅'=>1,'⼆'=>1,'⼇'=>1,'⼈'=>1,'⼉'=>1,'⼊'=>1,'⼋'=>1,'⼌'=>1,'⼍'=>1,'⼎'=>1,'⼏'=>1,'⼐'=>1,'⼑'=>1,'⼒'=>1,'⼓'=>1,'⼔'=>1,'⼕'=>1,'⼖'=>1,'⼗'=>1,'⼘'=>1,'⼙'=>1,'⼚'=>1,'⼛'=>1,'⼜'=>1,'⼝'=>1,'⼞'=>1,'⼟'=>1,'⼠'=>1,'⼡'=>1,'⼢'=>1,'⼣'=>1,'⼤'=>1,'⼥'=>1,'⼦'=>1,'⼧'=>1,'⼨'=>1,'⼩'=>1,'⼪'=>1,'⼫'=>1,'⼬'=>1,'⼭'=>1,'⼮'=>1,'⼯'=>1,'⼰'=>1,'⼱'=>1,'⼲'=>1,'⼳'=>1,'⼴'=>1,'⼵'=>1,'⼶'=>1,'⼷'=>1,'⼸'=>1,'⼹'=>1,'⼺'=>1,'⼻'=>1,'⼼'=>1,'⼽'=>1,'⼾'=>1,'⼿'=>1,'⽀'=>1,'⽁'=>1,'⽂'=>1,'⽃'=>1,'⽄'=>1,'⽅'=>1,'⽆'=>1,'⽇'=>1,'⽈'=>1,'⽉'=>1,'⽊'=>1,'⽋'=>1,'⽌'=>1,'⽍'=>1,'⽎'=>1,'⽏'=>1,'⽐'=>1,'⽑'=>1,'⽒'=>1,'⽓'=>1,'⽔'=>1,'⽕'=>1,'⽖'=>1,'⽗'=>1,'⽘'=>1,'⽙'=>1,'⽚'=>1,'⽛'=>1,'⽜'=>1,'⽝'=>1,'⽞'=>1,'⽟'=>1,'⽠'=>1,'⽡'=>1,'⽢'=>1,'⽣'=>1,'⽤'=>1,'⽥'=>1,'⽦'=>1,'⽧'=>1,'⽨'=>1,'⽩'=>1,'⽪'=>1,'⽫'=>1,'⽬'=>1,'⽭'=>1,'⽮'=>1,'⽯'=>1,'⽰'=>1,'⽱'=>1,'⽲'=>1,'⽳'=>1,'⽴'=>1,'⽵'=>1,'⽶'=>1,'⽷'=>1,'⽸'=>1,'⽹'=>1,'⽺'=>1,'⽻'=>1,'⽼'=>1,'⽽'=>1,'⽾'=>1,'⽿'=>1,'⾀'=>1,'⾁'=>1,'⾂'=>1,'⾃'=>1,'⾄'=>1,'⾅'=>1,'⾆'=>1,'⾇'=>1,'⾈'=>1,'⾉'=>1,'⾊'=>1,'⾋'=>1,'⾌'=>1,'⾍'=>1,'⾎'=>1,'⾏'=>1,'⾐'=>1,'⾑'=>1,'⾒'=>1,'⾓'=>1,'⾔'=>1,'⾕'=>1,'⾖'=>1,'⾗'=>1,'⾘'=>1,'⾙'=>1,'⾚'=>1,'⾛'=>1,'⾜'=>1,'⾝'=>1,'⾞'=>1,'⾟'=>1,'⾠'=>1,'⾡'=>1,'⾢'=>1,'⾣'=>1,'⾤'=>1,'⾥'=>1,'⾦'=>1,'⾧'=>1,'⾨'=>1,'⾩'=>1,'⾪'=>1,'⾫'=>1,'⾬'=>1,'⾭'=>1,'⾮'=>1,'⾯'=>1,'⾰'=>1,'⾱'=>1,'⾲'=>1,'⾳'=>1,'⾴'=>1,'⾵'=>1,'⾶'=>1,'⾷'=>1,'⾸'=>1,'⾹'=>1,'⾺'=>1,'⾻'=>1,'⾼'=>1,'⾽'=>1,'⾾'=>1,'⾿'=>1,'⿀'=>1,'⿁'=>1,'⿂'=>1,'⿃'=>1,'⿄'=>1,'⿅'=>1,'⿆'=>1,'⿇'=>1,'⿈'=>1,'⿉'=>1,'⿊'=>1,'⿋'=>1,'⿌'=>1,'⿍'=>1,'⿎'=>1,'⿏'=>1,'⿐'=>1,'⿑'=>1,'⿒'=>1,'⿓'=>1,'⿔'=>1,'⿕'=>1,' '=>1,'〶'=>1,'〸'=>1,'〹'=>1,'〺'=>1,'゛'=>1,'゜'=>1,'ゟ'=>1,'ヿ'=>1,'ㄱ'=>1,'ㄲ'=>1,'ㄳ'=>1,'ㄴ'=>1,'ㄵ'=>1,'ㄶ'=>1,'ㄷ'=>1,'ㄸ'=>1,'ㄹ'=>1,'ㄺ'=>1,'ㄻ'=>1,'ㄼ'=>1,'ㄽ'=>1,'ㄾ'=>1,'ㄿ'=>1,'ㅀ'=>1,'ㅁ'=>1,'ㅂ'=>1,'ㅃ'=>1,'ㅄ'=>1,'ㅅ'=>1,'ㅆ'=>1,'ㅇ'=>1,'ㅈ'=>1,'ㅉ'=>1,'ㅊ'=>1,'ㅋ'=>1,'ㅌ'=>1,'ㅍ'=>1,'ㅎ'=>1,'ㅏ'=>1,'ㅐ'=>1,'ㅑ'=>1,'ㅒ'=>1,'ㅓ'=>1,'ㅔ'=>1,'ㅕ'=>1,'ㅖ'=>1,'ㅗ'=>1,'ㅘ'=>1,'ㅙ'=>1,'ㅚ'=>1,'ㅛ'=>1,'ㅜ'=>1,'ㅝ'=>1,'ㅞ'=>1,'ㅟ'=>1,'ㅠ'=>1,'ㅡ'=>1,'ㅢ'=>1,'ㅣ'=>1,'ㅤ'=>1,'ㅥ'=>1,'ㅦ'=>1,'ㅧ'=>1,'ㅨ'=>1,'ㅩ'=>1,'ㅪ'=>1,'ㅫ'=>1,'ㅬ'=>1,'ㅭ'=>1,'ㅮ'=>1,'ㅯ'=>1,'ㅰ'=>1,'ㅱ'=>1,'ㅲ'=>1,'ㅳ'=>1,'ㅴ'=>1,'ㅵ'=>1,'ㅶ'=>1,'ㅷ'=>1,'ㅸ'=>1,'ㅹ'=>1,'ㅺ'=>1,'ㅻ'=>1,'ㅼ'=>1,'ㅽ'=>1,'ㅾ'=>1,'ㅿ'=>1,'ㆀ'=>1,'ㆁ'=>1,'ㆂ'=>1,'ㆃ'=>1,'ㆄ'=>1,'ㆅ'=>1,'ㆆ'=>1,'ㆇ'=>1,'ㆈ'=>1,'ㆉ'=>1,'ㆊ'=>1,'ㆋ'=>1,'ㆌ'=>1,'ㆍ'=>1,'ㆎ'=>1,'㆒'=>1,'㆓'=>1,'㆔'=>1,'㆕'=>1,'㆖'=>1,'㆗'=>1,'㆘'=>1,'㆙'=>1,'㆚'=>1,'㆛'=>1,'㆜'=>1,'㆝'=>1,'㆞'=>1,'㆟'=>1,'㈀'=>1,'㈁'=>1,'㈂'=>1,'㈃'=>1,'㈄'=>1,'㈅'=>1,'㈆'=>1,'㈇'=>1,'㈈'=>1,'㈉'=>1,'㈊'=>1,'㈋'=>1,'㈌'=>1,'㈍'=>1,'㈎'=>1,'㈏'=>1,'㈐'=>1,'㈑'=>1,'㈒'=>1,'㈓'=>1,'㈔'=>1,'㈕'=>1,'㈖'=>1,'㈗'=>1,'㈘'=>1,'㈙'=>1,'㈚'=>1,'㈛'=>1,'㈜'=>1,'㈝'=>1,'㈞'=>1,'㈠'=>1,'㈡'=>1,'㈢'=>1,'㈣'=>1,'㈤'=>1,'㈥'=>1,'㈦'=>1,'㈧'=>1,'㈨'=>1,'㈩'=>1,'㈪'=>1,'㈫'=>1,'㈬'=>1,'㈭'=>1,'㈮'=>1,'㈯'=>1,'㈰'=>1,'㈱'=>1,'㈲'=>1,'㈳'=>1,'㈴'=>1,'㈵'=>1,'㈶'=>1,'㈷'=>1,'㈸'=>1,'㈹'=>1,'㈺'=>1,'㈻'=>1,'㈼'=>1,'㈽'=>1,'㈾'=>1,'㈿'=>1,'㉀'=>1,'㉁'=>1,'㉂'=>1,'㉃'=>1,'㉐'=>1,'㉑'=>1,'㉒'=>1,'㉓'=>1,'㉔'=>1,'㉕'=>1,'㉖'=>1,'㉗'=>1,'㉘'=>1,'㉙'=>1,'㉚'=>1,'㉛'=>1,'㉜'=>1,'㉝'=>1,'㉞'=>1,'㉟'=>1,'㉠'=>1,'㉡'=>1,'㉢'=>1,'㉣'=>1,'㉤'=>1,'㉥'=>1,'㉦'=>1,'㉧'=>1,'㉨'=>1,'㉩'=>1,'㉪'=>1,'㉫'=>1,'㉬'=>1,'㉭'=>1,'㉮'=>1,'㉯'=>1,'㉰'=>1,'㉱'=>1,'㉲'=>1,'㉳'=>1,'㉴'=>1,'㉵'=>1,'㉶'=>1,'㉷'=>1,'㉸'=>1,'㉹'=>1,'㉺'=>1,'㉻'=>1,'㉼'=>1,'㉽'=>1,'㉾'=>1,'㊀'=>1,'㊁'=>1,'㊂'=>1,'㊃'=>1,'㊄'=>1,'㊅'=>1,'㊆'=>1,'㊇'=>1,'㊈'=>1,'㊉'=>1,'㊊'=>1,'㊋'=>1,'㊌'=>1,'㊍'=>1,'㊎'=>1,'㊏'=>1,'㊐'=>1,'㊑'=>1,'㊒'=>1,'㊓'=>1,'㊔'=>1,'㊕'=>1,'㊖'=>1,'㊗'=>1,'㊘'=>1,'㊙'=>1,'㊚'=>1,'㊛'=>1,'㊜'=>1,'㊝'=>1,'㊞'=>1,'㊟'=>1,'㊠'=>1,'㊡'=>1,'㊢'=>1,'㊣'=>1,'㊤'=>1,'㊥'=>1,'㊦'=>1,'㊧'=>1,'㊨'=>1,'㊩'=>1,'㊪'=>1,'㊫'=>1,'㊬'=>1,'㊭'=>1,'㊮'=>1,'㊯'=>1,'㊰'=>1,'㊱'=>1,'㊲'=>1,'㊳'=>1,'㊴'=>1,'㊵'=>1,'㊶'=>1,'㊷'=>1,'㊸'=>1,'㊹'=>1,'㊺'=>1,'㊻'=>1,'㊼'=>1,'㊽'=>1,'㊾'=>1,'㊿'=>1,'㋀'=>1,'㋁'=>1,'㋂'=>1,'㋃'=>1,'㋄'=>1,'㋅'=>1,'㋆'=>1,'㋇'=>1,'㋈'=>1,'㋉'=>1,'㋊'=>1,'㋋'=>1,'㋌'=>1,'㋍'=>1,'㋎'=>1,'㋏'=>1,'㋐'=>1,'㋑'=>1,'㋒'=>1,'㋓'=>1,'㋔'=>1,'㋕'=>1,'㋖'=>1,'㋗'=>1,'㋘'=>1,'㋙'=>1,'㋚'=>1,'㋛'=>1,'㋜'=>1,'㋝'=>1,'㋞'=>1,'㋟'=>1,'㋠'=>1,'㋡'=>1,'㋢'=>1,'㋣'=>1,'㋤'=>1,'㋥'=>1,'㋦'=>1,'㋧'=>1,'㋨'=>1,'㋩'=>1,'㋪'=>1,'㋫'=>1,'㋬'=>1,'㋭'=>1,'㋮'=>1,'㋯'=>1,'㋰'=>1,'㋱'=>1,'㋲'=>1,'㋳'=>1,'㋴'=>1,'㋵'=>1,'㋶'=>1,'㋷'=>1,'㋸'=>1,'㋹'=>1,'㋺'=>1,'㋻'=>1,'㋼'=>1,'㋽'=>1,'㋾'=>1,'㌀'=>1,'㌁'=>1,'㌂'=>1,'㌃'=>1,'㌄'=>1,'㌅'=>1,'㌆'=>1,'㌇'=>1,'㌈'=>1,'㌉'=>1,'㌊'=>1,'㌋'=>1,'㌌'=>1,'㌍'=>1,'㌎'=>1,'㌏'=>1,'㌐'=>1,'㌑'=>1,'㌒'=>1,'㌓'=>1,'㌔'=>1,'㌕'=>1,'㌖'=>1,'㌗'=>1,'㌘'=>1,'㌙'=>1,'㌚'=>1,'㌛'=>1,'㌜'=>1,'㌝'=>1,'㌞'=>1,'㌟'=>1,'㌠'=>1,'㌡'=>1,'㌢'=>1,'㌣'=>1,'㌤'=>1,'㌥'=>1,'㌦'=>1,'㌧'=>1,'㌨'=>1,'㌩'=>1,'㌪'=>1,'㌫'=>1,'㌬'=>1,'㌭'=>1,'㌮'=>1,'㌯'=>1,'㌰'=>1,'㌱'=>1,'㌲'=>1,'㌳'=>1,'㌴'=>1,'㌵'=>1,'㌶'=>1,'㌷'=>1,'㌸'=>1,'㌹'=>1,'㌺'=>1,'㌻'=>1,'㌼'=>1,'㌽'=>1,'㌾'=>1,'㌿'=>1,'㍀'=>1,'㍁'=>1,'㍂'=>1,'㍃'=>1,'㍄'=>1,'㍅'=>1,'㍆'=>1,'㍇'=>1,'㍈'=>1,'㍉'=>1,'㍊'=>1,'㍋'=>1,'㍌'=>1,'㍍'=>1,'㍎'=>1,'㍏'=>1,'㍐'=>1,'㍑'=>1,'㍒'=>1,'㍓'=>1,'㍔'=>1,'㍕'=>1,'㍖'=>1,'㍗'=>1,'㍘'=>1,'㍙'=>1,'㍚'=>1,'㍛'=>1,'㍜'=>1,'㍝'=>1,'㍞'=>1,'㍟'=>1,'㍠'=>1,'㍡'=>1,'㍢'=>1,'㍣'=>1,'㍤'=>1,'㍥'=>1,'㍦'=>1,'㍧'=>1,'㍨'=>1,'㍩'=>1,'㍪'=>1,'㍫'=>1,'㍬'=>1,'㍭'=>1,'㍮'=>1,'㍯'=>1,'㍰'=>1,'㍱'=>1,'㍲'=>1,'㍳'=>1,'㍴'=>1,'㍵'=>1,'㍶'=>1,'㍷'=>1,'㍸'=>1,'㍹'=>1,'㍺'=>1,'㍻'=>1,'㍼'=>1,'㍽'=>1,'㍾'=>1,'㍿'=>1,'㎀'=>1,'㎁'=>1,'㎂'=>1,'㎃'=>1,'㎄'=>1,'㎅'=>1,'㎆'=>1,'㎇'=>1,'㎈'=>1,'㎉'=>1,'㎊'=>1,'㎋'=>1,'㎌'=>1,'㎍'=>1,'㎎'=>1,'㎏'=>1,'㎐'=>1,'㎑'=>1,'㎒'=>1,'㎓'=>1,'㎔'=>1,'㎕'=>1,'㎖'=>1,'㎗'=>1,'㎘'=>1,'㎙'=>1,'㎚'=>1,'㎛'=>1,'㎜'=>1,'㎝'=>1,'㎞'=>1,'㎟'=>1,'㎠'=>1,'㎡'=>1,'㎢'=>1,'㎣'=>1,'㎤'=>1,'㎥'=>1,'㎦'=>1,'㎧'=>1,'㎨'=>1,'㎩'=>1,'㎪'=>1,'㎫'=>1,'㎬'=>1,'㎭'=>1,'㎮'=>1,'㎯'=>1,'㎰'=>1,'㎱'=>1,'㎲'=>1,'㎳'=>1,'㎴'=>1,'㎵'=>1,'㎶'=>1,'㎷'=>1,'㎸'=>1,'㎹'=>1,'㎺'=>1,'㎻'=>1,'㎼'=>1,'㎽'=>1,'㎾'=>1,'㎿'=>1,'㏀'=>1,'㏁'=>1,'㏂'=>1,'㏃'=>1,'㏄'=>1,'㏅'=>1,'㏆'=>1,'㏇'=>1,'㏈'=>1,'㏉'=>1,'㏊'=>1,'㏋'=>1,'㏌'=>1,'㏍'=>1,'㏎'=>1,'㏏'=>1,'㏐'=>1,'㏑'=>1,'㏒'=>1,'㏓'=>1,'㏔'=>1,'㏕'=>1,'㏖'=>1,'㏗'=>1,'㏘'=>1,'㏙'=>1,'㏚'=>1,'㏛'=>1,'㏜'=>1,'㏝'=>1,'㏞'=>1,'㏟'=>1,'㏠'=>1,'㏡'=>1,'㏢'=>1,'㏣'=>1,'㏤'=>1,'㏥'=>1,'㏦'=>1,'㏧'=>1,'㏨'=>1,'㏩'=>1,'㏪'=>1,'㏫'=>1,'㏬'=>1,'㏭'=>1,'㏮'=>1,'㏯'=>1,'㏰'=>1,'㏱'=>1,'㏲'=>1,'㏳'=>1,'㏴'=>1,'㏵'=>1,'㏶'=>1,'㏷'=>1,'㏸'=>1,'㏹'=>1,'㏺'=>1,'㏻'=>1,'㏼'=>1,'㏽'=>1,'㏾'=>1,'㏿'=>1,'豈'=>1,'更'=>1,'車'=>1,'賈'=>1,'滑'=>1,'串'=>1,'句'=>1,'龜'=>1,'龜'=>1,'契'=>1,'金'=>1,'喇'=>1,'奈'=>1,'懶'=>1,'癩'=>1,'羅'=>1,'蘿'=>1,'螺'=>1,'裸'=>1,'邏'=>1,'樂'=>1,'洛'=>1,'烙'=>1,'珞'=>1,'落'=>1,'酪'=>1,'駱'=>1,'亂'=>1,'卵'=>1,'欄'=>1,'爛'=>1,'蘭'=>1,'鸞'=>1,'嵐'=>1,'濫'=>1,'藍'=>1,'襤'=>1,'拉'=>1,'臘'=>1,'蠟'=>1,'廊'=>1,'朗'=>1,'浪'=>1,'狼'=>1,'郎'=>1,'來'=>1,'冷'=>1,'勞'=>1,'擄'=>1,'櫓'=>1,'爐'=>1,'盧'=>1,'老'=>1,'蘆'=>1,'虜'=>1,'路'=>1,'露'=>1,'魯'=>1,'鷺'=>1,'碌'=>1,'祿'=>1,'綠'=>1,'菉'=>1,'錄'=>1,'鹿'=>1,'論'=>1,'壟'=>1,'弄'=>1,'籠'=>1,'聾'=>1,'牢'=>1,'磊'=>1,'賂'=>1,'雷'=>1,'壘'=>1,'屢'=>1,'樓'=>1,'淚'=>1,'漏'=>1,'累'=>1,'縷'=>1,'陋'=>1,'勒'=>1,'肋'=>1,'凜'=>1,'凌'=>1,'稜'=>1,'綾'=>1,'菱'=>1,'陵'=>1,'讀'=>1,'拏'=>1,'樂'=>1,'諾'=>1,'丹'=>1,'寧'=>1,'怒'=>1,'率'=>1,'異'=>1,'北'=>1,'磻'=>1,'便'=>1,'復'=>1,'不'=>1,'泌'=>1,'數'=>1,'索'=>1,'參'=>1,'塞'=>1,'省'=>1,'葉'=>1,'說'=>1,'殺'=>1,'辰'=>1,'沈'=>1,'拾'=>1,'若'=>1,'掠'=>1,'略'=>1,'亮'=>1,'兩'=>1,'凉'=>1,'梁'=>1,'糧'=>1,'良'=>1,'諒'=>1,'量'=>1,'勵'=>1,'呂'=>1,'女'=>1,'廬'=>1,'旅'=>1,'濾'=>1,'礪'=>1,'閭'=>1,'驪'=>1,'麗'=>1,'黎'=>1,'力'=>1,'曆'=>1,'歷'=>1,'轢'=>1,'年'=>1,'憐'=>1,'戀'=>1,'撚'=>1,'漣'=>1,'煉'=>1,'璉'=>1,'秊'=>1,'練'=>1,'聯'=>1,'輦'=>1,'蓮'=>1,'連'=>1,'鍊'=>1,'列'=>1,'劣'=>1,'咽'=>1,'烈'=>1,'裂'=>1,'說'=>1,'廉'=>1,'念'=>1,'捻'=>1,'殮'=>1,'簾'=>1,'獵'=>1,'令'=>1,'囹'=>1,'寧'=>1,'嶺'=>1,'怜'=>1,'玲'=>1,'瑩'=>1,'羚'=>1,'聆'=>1,'鈴'=>1,'零'=>1,'靈'=>1,'領'=>1,'例'=>1,'禮'=>1,'醴'=>1,'隸'=>1,'惡'=>1,'了'=>1,'僚'=>1,'寮'=>1,'尿'=>1,'料'=>1,'樂'=>1,'燎'=>1,'療'=>1,'蓼'=>1,'遼'=>1,'龍'=>1,'暈'=>1,'阮'=>1,'劉'=>1,'杻'=>1,'柳'=>1,'流'=>1,'溜'=>1,'琉'=>1,'留'=>1,'硫'=>1,'紐'=>1,'類'=>1,'六'=>1,'戮'=>1,'陸'=>1,'倫'=>1,'崙'=>1,'淪'=>1,'輪'=>1,'律'=>1,'慄'=>1,'栗'=>1,'率'=>1,'隆'=>1,'利'=>1,'吏'=>1,'履'=>1,'易'=>1,'李'=>1,'梨'=>1,'泥'=>1,'理'=>1,'痢'=>1,'罹'=>1,'裏'=>1,'裡'=>1,'里'=>1,'離'=>1,'匿'=>1,'溺'=>1,'吝'=>1,'燐'=>1,'璘'=>1,'藺'=>1,'隣'=>1,'鱗'=>1,'麟'=>1,'林'=>1,'淋'=>1,'臨'=>1,'立'=>1,'笠'=>1,'粒'=>1,'狀'=>1,'炙'=>1,'識'=>1,'什'=>1,'茶'=>1,'刺'=>1,'切'=>1,'度'=>1,'拓'=>1,'糖'=>1,'宅'=>1,'洞'=>1,'暴'=>1,'輻'=>1,'行'=>1,'降'=>1,'見'=>1,'廓'=>1,'兀'=>1,'嗀'=>1,'塚'=>1,'晴'=>1,'凞'=>1,'猪'=>1,'益'=>1,'礼'=>1,'神'=>1,'祥'=>1,'福'=>1,'靖'=>1,'精'=>1,'羽'=>1,'蘒'=>1,'諸'=>1,'逸'=>1,'都'=>1,'飯'=>1,'飼'=>1,'館'=>1,'鶴'=>1,'侮'=>1,'僧'=>1,'免'=>1,'勉'=>1,'勤'=>1,'卑'=>1,'喝'=>1,'嘆'=>1,'器'=>1,'塀'=>1,'墨'=>1,'層'=>1,'屮'=>1,'悔'=>1,'慨'=>1,'憎'=>1,'懲'=>1,'敏'=>1,'既'=>1,'暑'=>1,'梅'=>1,'海'=>1,'渚'=>1,'漢'=>1,'煮'=>1,'爫'=>1,'琢'=>1,'碑'=>1,'社'=>1,'祉'=>1,'祈'=>1,'祐'=>1,'祖'=>1,'祝'=>1,'禍'=>1,'禎'=>1,'穀'=>1,'突'=>1,'節'=>1,'練'=>1,'縉'=>1,'繁'=>1,'署'=>1,'者'=>1,'臭'=>1,'艹'=>1,'艹'=>1,'著'=>1,'褐'=>1,'視'=>1,'謁'=>1,'謹'=>1,'賓'=>1,'贈'=>1,'辶'=>1,'逸'=>1,'難'=>1,'響'=>1,'頻'=>1,'並'=>1,'况'=>1,'全'=>1,'侀'=>1,'充'=>1,'冀'=>1,'勇'=>1,'勺'=>1,'喝'=>1,'啕'=>1,'喙'=>1,'嗢'=>1,'塚'=>1,'墳'=>1,'奄'=>1,'奔'=>1,'婢'=>1,'嬨'=>1,'廒'=>1,'廙'=>1,'彩'=>1,'徭'=>1,'惘'=>1,'慎'=>1,'愈'=>1,'憎'=>1,'慠'=>1,'懲'=>1,'戴'=>1,'揄'=>1,'搜'=>1,'摒'=>1,'敖'=>1,'晴'=>1,'朗'=>1,'望'=>1,'杖'=>1,'歹'=>1,'殺'=>1,'流'=>1,'滛'=>1,'滋'=>1,'漢'=>1,'瀞'=>1,'煮'=>1,'瞧'=>1,'爵'=>1,'犯'=>1,'猪'=>1,'瑱'=>1,'甆'=>1,'画'=>1,'瘝'=>1,'瘟'=>1,'益'=>1,'盛'=>1,'直'=>1,'睊'=>1,'着'=>1,'磌'=>1,'窱'=>1,'節'=>1,'类'=>1,'絛'=>1,'練'=>1,'缾'=>1,'者'=>1,'荒'=>1,'華'=>1,'蝹'=>1,'襁'=>1,'覆'=>1,'視'=>1,'調'=>1,'諸'=>1,'請'=>1,'謁'=>1,'諾'=>1,'諭'=>1,'謹'=>1,'變'=>1,'贈'=>1,'輸'=>1,'遲'=>1,'醙'=>1,'鉶'=>1,'陼'=>1,'難'=>1,'靖'=>1,'韛'=>1,'響'=>1,'頋'=>1,'頻'=>1,'鬒'=>1,'龜'=>1,'𢡊'=>1,'𢡄'=>1,'𣏕'=>1,'㮝'=>1,'䀘'=>1,'䀹'=>1,'𥉉'=>1,'𥳐'=>1,'𧻓'=>1,'齃'=>1,'龎'=>1,'ff'=>1,'fi'=>1,'fl'=>1,'ffi'=>1,'ffl'=>1,'ſt'=>1,'st'=>1,'ﬓ'=>1,'ﬔ'=>1,'ﬕ'=>1,'ﬖ'=>1,'ﬗ'=>1,'יִ'=>1,'ײַ'=>1,'ﬠ'=>1,'ﬡ'=>1,'ﬢ'=>1,'ﬣ'=>1,'ﬤ'=>1,'ﬥ'=>1,'ﬦ'=>1,'ﬧ'=>1,'ﬨ'=>1,'﬩'=>1,'שׁ'=>1,'שׂ'=>1,'שּׁ'=>1,'שּׂ'=>1,'אַ'=>1,'אָ'=>1,'אּ'=>1,'בּ'=>1,'גּ'=>1,'דּ'=>1,'הּ'=>1,'וּ'=>1,'זּ'=>1,'טּ'=>1,'יּ'=>1,'ךּ'=>1,'כּ'=>1,'לּ'=>1,'מּ'=>1,'נּ'=>1,'סּ'=>1,'ףּ'=>1,'פּ'=>1,'צּ'=>1,'קּ'=>1,'רּ'=>1,'שּ'=>1,'תּ'=>1,'וֹ'=>1,'בֿ'=>1,'כֿ'=>1,'פֿ'=>1,'ﭏ'=>1,'ﭐ'=>1,'ﭑ'=>1,'ﭒ'=>1,'ﭓ'=>1,'ﭔ'=>1,'ﭕ'=>1,'ﭖ'=>1,'ﭗ'=>1,'ﭘ'=>1,'ﭙ'=>1,'ﭚ'=>1,'ﭛ'=>1,'ﭜ'=>1,'ﭝ'=>1,'ﭞ'=>1,'ﭟ'=>1,'ﭠ'=>1,'ﭡ'=>1,'ﭢ'=>1,'ﭣ'=>1,'ﭤ'=>1,'ﭥ'=>1,'ﭦ'=>1,'ﭧ'=>1,'ﭨ'=>1,'ﭩ'=>1,'ﭪ'=>1,'ﭫ'=>1,'ﭬ'=>1,'ﭭ'=>1,'ﭮ'=>1,'ﭯ'=>1,'ﭰ'=>1,'ﭱ'=>1,'ﭲ'=>1,'ﭳ'=>1,'ﭴ'=>1,'ﭵ'=>1,'ﭶ'=>1,'ﭷ'=>1,'ﭸ'=>1,'ﭹ'=>1,'ﭺ'=>1,'ﭻ'=>1,'ﭼ'=>1,'ﭽ'=>1,'ﭾ'=>1,'ﭿ'=>1,'ﮀ'=>1,'ﮁ'=>1,'ﮂ'=>1,'ﮃ'=>1,'ﮄ'=>1,'ﮅ'=>1,'ﮆ'=>1,'ﮇ'=>1,'ﮈ'=>1,'ﮉ'=>1,'ﮊ'=>1,'ﮋ'=>1,'ﮌ'=>1,'ﮍ'=>1,'ﮎ'=>1,'ﮏ'=>1,'ﮐ'=>1,'ﮑ'=>1,'ﮒ'=>1,'ﮓ'=>1,'ﮔ'=>1,'ﮕ'=>1,'ﮖ'=>1,'ﮗ'=>1,'ﮘ'=>1,'ﮙ'=>1,'ﮚ'=>1,'ﮛ'=>1,'ﮜ'=>1,'ﮝ'=>1,'ﮞ'=>1,'ﮟ'=>1,'ﮠ'=>1,'ﮡ'=>1,'ﮢ'=>1,'ﮣ'=>1,'ﮤ'=>1,'ﮥ'=>1,'ﮦ'=>1,'ﮧ'=>1,'ﮨ'=>1,'ﮩ'=>1,'ﮪ'=>1,'ﮫ'=>1,'ﮬ'=>1,'ﮭ'=>1,'ﮮ'=>1,'ﮯ'=>1,'ﮰ'=>1,'ﮱ'=>1,'ﯓ'=>1,'ﯔ'=>1,'ﯕ'=>1,'ﯖ'=>1,'ﯗ'=>1,'ﯘ'=>1,'ﯙ'=>1,'ﯚ'=>1,'ﯛ'=>1,'ﯜ'=>1,'ﯝ'=>1,'ﯞ'=>1,'ﯟ'=>1,'ﯠ'=>1,'ﯡ'=>1,'ﯢ'=>1,'ﯣ'=>1,'ﯤ'=>1,'ﯥ'=>1,'ﯦ'=>1,'ﯧ'=>1,'ﯨ'=>1,'ﯩ'=>1,'ﯪ'=>1,'ﯫ'=>1,'ﯬ'=>1,'ﯭ'=>1,'ﯮ'=>1,'ﯯ'=>1,'ﯰ'=>1,'ﯱ'=>1,'ﯲ'=>1,'ﯳ'=>1,'ﯴ'=>1,'ﯵ'=>1,'ﯶ'=>1,'ﯷ'=>1,'ﯸ'=>1,'ﯹ'=>1,'ﯺ'=>1,'ﯻ'=>1,'ﯼ'=>1,'ﯽ'=>1,'ﯾ'=>1,'ﯿ'=>1,'ﰀ'=>1,'ﰁ'=>1,'ﰂ'=>1,'ﰃ'=>1,'ﰄ'=>1,'ﰅ'=>1,'ﰆ'=>1,'ﰇ'=>1,'ﰈ'=>1,'ﰉ'=>1,'ﰊ'=>1,'ﰋ'=>1,'ﰌ'=>1,'ﰍ'=>1,'ﰎ'=>1,'ﰏ'=>1,'ﰐ'=>1,'ﰑ'=>1,'ﰒ'=>1,'ﰓ'=>1,'ﰔ'=>1,'ﰕ'=>1,'ﰖ'=>1,'ﰗ'=>1,'ﰘ'=>1,'ﰙ'=>1,'ﰚ'=>1,'ﰛ'=>1,'ﰜ'=>1,'ﰝ'=>1,'ﰞ'=>1,'ﰟ'=>1,'ﰠ'=>1,'ﰡ'=>1,'ﰢ'=>1,'ﰣ'=>1,'ﰤ'=>1,'ﰥ'=>1,'ﰦ'=>1,'ﰧ'=>1,'ﰨ'=>1,'ﰩ'=>1,'ﰪ'=>1,'ﰫ'=>1,'ﰬ'=>1,'ﰭ'=>1,'ﰮ'=>1,'ﰯ'=>1,'ﰰ'=>1,'ﰱ'=>1,'ﰲ'=>1,'ﰳ'=>1,'ﰴ'=>1,'ﰵ'=>1,'ﰶ'=>1,'ﰷ'=>1,'ﰸ'=>1,'ﰹ'=>1,'ﰺ'=>1,'ﰻ'=>1,'ﰼ'=>1,'ﰽ'=>1,'ﰾ'=>1,'ﰿ'=>1,'ﱀ'=>1,'ﱁ'=>1,'ﱂ'=>1,'ﱃ'=>1,'ﱄ'=>1,'ﱅ'=>1,'ﱆ'=>1,'ﱇ'=>1,'ﱈ'=>1,'ﱉ'=>1,'ﱊ'=>1,'ﱋ'=>1,'ﱌ'=>1,'ﱍ'=>1,'ﱎ'=>1,'ﱏ'=>1,'ﱐ'=>1,'ﱑ'=>1,'ﱒ'=>1,'ﱓ'=>1,'ﱔ'=>1,'ﱕ'=>1,'ﱖ'=>1,'ﱗ'=>1,'ﱘ'=>1,'ﱙ'=>1,'ﱚ'=>1,'ﱛ'=>1,'ﱜ'=>1,'ﱝ'=>1,'ﱞ'=>1,'ﱟ'=>1,'ﱠ'=>1,'ﱡ'=>1,'ﱢ'=>1,'ﱣ'=>1,'ﱤ'=>1,'ﱥ'=>1,'ﱦ'=>1,'ﱧ'=>1,'ﱨ'=>1,'ﱩ'=>1,'ﱪ'=>1,'ﱫ'=>1,'ﱬ'=>1,'ﱭ'=>1,'ﱮ'=>1,'ﱯ'=>1,'ﱰ'=>1,'ﱱ'=>1,'ﱲ'=>1,'ﱳ'=>1,'ﱴ'=>1,'ﱵ'=>1,'ﱶ'=>1,'ﱷ'=>1,'ﱸ'=>1,'ﱹ'=>1,'ﱺ'=>1,'ﱻ'=>1,'ﱼ'=>1,'ﱽ'=>1,'ﱾ'=>1,'ﱿ'=>1,'ﲀ'=>1,'ﲁ'=>1,'ﲂ'=>1,'ﲃ'=>1,'ﲄ'=>1,'ﲅ'=>1,'ﲆ'=>1,'ﲇ'=>1,'ﲈ'=>1,'ﲉ'=>1,'ﲊ'=>1,'ﲋ'=>1,'ﲌ'=>1,'ﲍ'=>1,'ﲎ'=>1,'ﲏ'=>1,'ﲐ'=>1,'ﲑ'=>1,'ﲒ'=>1,'ﲓ'=>1,'ﲔ'=>1,'ﲕ'=>1,'ﲖ'=>1,'ﲗ'=>1,'ﲘ'=>1,'ﲙ'=>1,'ﲚ'=>1,'ﲛ'=>1,'ﲜ'=>1,'ﲝ'=>1,'ﲞ'=>1,'ﲟ'=>1,'ﲠ'=>1,'ﲡ'=>1,'ﲢ'=>1,'ﲣ'=>1,'ﲤ'=>1,'ﲥ'=>1,'ﲦ'=>1,'ﲧ'=>1,'ﲨ'=>1,'ﲩ'=>1,'ﲪ'=>1,'ﲫ'=>1,'ﲬ'=>1,'ﲭ'=>1,'ﲮ'=>1,'ﲯ'=>1,'ﲰ'=>1,'ﲱ'=>1,'ﲲ'=>1,'ﲳ'=>1,'ﲴ'=>1,'ﲵ'=>1,'ﲶ'=>1,'ﲷ'=>1,'ﲸ'=>1,'ﲹ'=>1,'ﲺ'=>1,'ﲻ'=>1,'ﲼ'=>1,'ﲽ'=>1,'ﲾ'=>1,'ﲿ'=>1,'ﳀ'=>1,'ﳁ'=>1,'ﳂ'=>1,'ﳃ'=>1,'ﳄ'=>1,'ﳅ'=>1,'ﳆ'=>1,'ﳇ'=>1,'ﳈ'=>1,'ﳉ'=>1,'ﳊ'=>1,'ﳋ'=>1,'ﳌ'=>1,'ﳍ'=>1,'ﳎ'=>1,'ﳏ'=>1,'ﳐ'=>1,'ﳑ'=>1,'ﳒ'=>1,'ﳓ'=>1,'ﳔ'=>1,'ﳕ'=>1,'ﳖ'=>1,'ﳗ'=>1,'ﳘ'=>1,'ﳙ'=>1,'ﳚ'=>1,'ﳛ'=>1,'ﳜ'=>1,'ﳝ'=>1,'ﳞ'=>1,'ﳟ'=>1,'ﳠ'=>1,'ﳡ'=>1,'ﳢ'=>1,'ﳣ'=>1,'ﳤ'=>1,'ﳥ'=>1,'ﳦ'=>1,'ﳧ'=>1,'ﳨ'=>1,'ﳩ'=>1,'ﳪ'=>1,'ﳫ'=>1,'ﳬ'=>1,'ﳭ'=>1,'ﳮ'=>1,'ﳯ'=>1,'ﳰ'=>1,'ﳱ'=>1,'ﳲ'=>1,'ﳳ'=>1,'ﳴ'=>1,'ﳵ'=>1,'ﳶ'=>1,'ﳷ'=>1,'ﳸ'=>1,'ﳹ'=>1,'ﳺ'=>1,'ﳻ'=>1,'ﳼ'=>1,'ﳽ'=>1,'ﳾ'=>1,'ﳿ'=>1,'ﴀ'=>1,'ﴁ'=>1,'ﴂ'=>1,'ﴃ'=>1,'ﴄ'=>1,'ﴅ'=>1,'ﴆ'=>1,'ﴇ'=>1,'ﴈ'=>1,'ﴉ'=>1,'ﴊ'=>1,'ﴋ'=>1,'ﴌ'=>1,'ﴍ'=>1,'ﴎ'=>1,'ﴏ'=>1,'ﴐ'=>1,'ﴑ'=>1,'ﴒ'=>1,'ﴓ'=>1,'ﴔ'=>1,'ﴕ'=>1,'ﴖ'=>1,'ﴗ'=>1,'ﴘ'=>1,'ﴙ'=>1,'ﴚ'=>1,'ﴛ'=>1,'ﴜ'=>1,'ﴝ'=>1,'ﴞ'=>1,'ﴟ'=>1,'ﴠ'=>1,'ﴡ'=>1,'ﴢ'=>1,'ﴣ'=>1,'ﴤ'=>1,'ﴥ'=>1,'ﴦ'=>1,'ﴧ'=>1,'ﴨ'=>1,'ﴩ'=>1,'ﴪ'=>1,'ﴫ'=>1,'ﴬ'=>1,'ﴭ'=>1,'ﴮ'=>1,'ﴯ'=>1,'ﴰ'=>1,'ﴱ'=>1,'ﴲ'=>1,'ﴳ'=>1,'ﴴ'=>1,'ﴵ'=>1,'ﴶ'=>1,'ﴷ'=>1,'ﴸ'=>1,'ﴹ'=>1,'ﴺ'=>1,'ﴻ'=>1,'ﴼ'=>1,'ﴽ'=>1,'ﵐ'=>1,'ﵑ'=>1,'ﵒ'=>1,'ﵓ'=>1,'ﵔ'=>1,'ﵕ'=>1,'ﵖ'=>1,'ﵗ'=>1,'ﵘ'=>1,'ﵙ'=>1,'ﵚ'=>1,'ﵛ'=>1,'ﵜ'=>1,'ﵝ'=>1,'ﵞ'=>1,'ﵟ'=>1,'ﵠ'=>1,'ﵡ'=>1,'ﵢ'=>1,'ﵣ'=>1,'ﵤ'=>1,'ﵥ'=>1,'ﵦ'=>1,'ﵧ'=>1,'ﵨ'=>1,'ﵩ'=>1,'ﵪ'=>1,'ﵫ'=>1,'ﵬ'=>1,'ﵭ'=>1,'ﵮ'=>1,'ﵯ'=>1,'ﵰ'=>1,'ﵱ'=>1,'ﵲ'=>1,'ﵳ'=>1,'ﵴ'=>1,'ﵵ'=>1,'ﵶ'=>1,'ﵷ'=>1,'ﵸ'=>1,'ﵹ'=>1,'ﵺ'=>1,'ﵻ'=>1,'ﵼ'=>1,'ﵽ'=>1,'ﵾ'=>1,'ﵿ'=>1,'ﶀ'=>1,'ﶁ'=>1,'ﶂ'=>1,'ﶃ'=>1,'ﶄ'=>1,'ﶅ'=>1,'ﶆ'=>1,'ﶇ'=>1,'ﶈ'=>1,'ﶉ'=>1,'ﶊ'=>1,'ﶋ'=>1,'ﶌ'=>1,'ﶍ'=>1,'ﶎ'=>1,'ﶏ'=>1,'ﶒ'=>1,'ﶓ'=>1,'ﶔ'=>1,'ﶕ'=>1,'ﶖ'=>1,'ﶗ'=>1,'ﶘ'=>1,'ﶙ'=>1,'ﶚ'=>1,'ﶛ'=>1,'ﶜ'=>1,'ﶝ'=>1,'ﶞ'=>1,'ﶟ'=>1,'ﶠ'=>1,'ﶡ'=>1,'ﶢ'=>1,'ﶣ'=>1,'ﶤ'=>1,'ﶥ'=>1,'ﶦ'=>1,'ﶧ'=>1,'ﶨ'=>1,'ﶩ'=>1,'ﶪ'=>1,'ﶫ'=>1,'ﶬ'=>1,'ﶭ'=>1,'ﶮ'=>1,'ﶯ'=>1,'ﶰ'=>1,'ﶱ'=>1,'ﶲ'=>1,'ﶳ'=>1,'ﶴ'=>1,'ﶵ'=>1,'ﶶ'=>1,'ﶷ'=>1,'ﶸ'=>1,'ﶹ'=>1,'ﶺ'=>1,'ﶻ'=>1,'ﶼ'=>1,'ﶽ'=>1,'ﶾ'=>1,'ﶿ'=>1,'ﷀ'=>1,'ﷁ'=>1,'ﷂ'=>1,'ﷃ'=>1,'ﷄ'=>1,'ﷅ'=>1,'ﷆ'=>1,'ﷇ'=>1,'ﷰ'=>1,'ﷱ'=>1,'ﷲ'=>1,'ﷳ'=>1,'ﷴ'=>1,'ﷵ'=>1,'ﷶ'=>1,'ﷷ'=>1,'ﷸ'=>1,'ﷹ'=>1,'ﷺ'=>1,'ﷻ'=>1,'﷼'=>1,'︐'=>1,'︑'=>1,'︒'=>1,'︓'=>1,'︔'=>1,'︕'=>1,'︖'=>1,'︗'=>1,'︘'=>1,'︙'=>1,'︰'=>1,'︱'=>1,'︲'=>1,'︳'=>1,'︴'=>1,'︵'=>1,'︶'=>1,'︷'=>1,'︸'=>1,'︹'=>1,'︺'=>1,'︻'=>1,'︼'=>1,'︽'=>1,'︾'=>1,'︿'=>1,'﹀'=>1,'﹁'=>1,'﹂'=>1,'﹃'=>1,'﹄'=>1,'﹇'=>1,'﹈'=>1,'﹉'=>1,'﹊'=>1,'﹋'=>1,'﹌'=>1,'﹍'=>1,'﹎'=>1,'﹏'=>1,'﹐'=>1,'﹑'=>1,'﹒'=>1,'﹔'=>1,'﹕'=>1,'﹖'=>1,'﹗'=>1,'﹘'=>1,'﹙'=>1,'﹚'=>1,'﹛'=>1,'﹜'=>1,'﹝'=>1,'﹞'=>1,'﹟'=>1,'﹠'=>1,'﹡'=>1,'﹢'=>1,'﹣'=>1,'﹤'=>1,'﹥'=>1,'﹦'=>1,'﹨'=>1,'﹩'=>1,'﹪'=>1,'﹫'=>1,'ﹰ'=>1,'ﹱ'=>1,'ﹲ'=>1,'ﹴ'=>1,'ﹶ'=>1,'ﹷ'=>1,'ﹸ'=>1,'ﹹ'=>1,'ﹺ'=>1,'ﹻ'=>1,'ﹼ'=>1,'ﹽ'=>1,'ﹾ'=>1,'ﹿ'=>1,'ﺀ'=>1,'ﺁ'=>1,'ﺂ'=>1,'ﺃ'=>1,'ﺄ'=>1,'ﺅ'=>1,'ﺆ'=>1,'ﺇ'=>1,'ﺈ'=>1,'ﺉ'=>1,'ﺊ'=>1,'ﺋ'=>1,'ﺌ'=>1,'ﺍ'=>1,'ﺎ'=>1,'ﺏ'=>1,'ﺐ'=>1,'ﺑ'=>1,'ﺒ'=>1,'ﺓ'=>1,'ﺔ'=>1,'ﺕ'=>1,'ﺖ'=>1,'ﺗ'=>1,'ﺘ'=>1,'ﺙ'=>1,'ﺚ'=>1,'ﺛ'=>1,'ﺜ'=>1,'ﺝ'=>1,'ﺞ'=>1,'ﺟ'=>1,'ﺠ'=>1,'ﺡ'=>1,'ﺢ'=>1,'ﺣ'=>1,'ﺤ'=>1,'ﺥ'=>1,'ﺦ'=>1,'ﺧ'=>1,'ﺨ'=>1,'ﺩ'=>1,'ﺪ'=>1,'ﺫ'=>1,'ﺬ'=>1,'ﺭ'=>1,'ﺮ'=>1,'ﺯ'=>1,'ﺰ'=>1,'ﺱ'=>1,'ﺲ'=>1,'ﺳ'=>1,'ﺴ'=>1,'ﺵ'=>1,'ﺶ'=>1,'ﺷ'=>1,'ﺸ'=>1,'ﺹ'=>1,'ﺺ'=>1,'ﺻ'=>1,'ﺼ'=>1,'ﺽ'=>1,'ﺾ'=>1,'ﺿ'=>1,'ﻀ'=>1,'ﻁ'=>1,'ﻂ'=>1,'ﻃ'=>1,'ﻄ'=>1,'ﻅ'=>1,'ﻆ'=>1,'ﻇ'=>1,'ﻈ'=>1,'ﻉ'=>1,'ﻊ'=>1,'ﻋ'=>1,'ﻌ'=>1,'ﻍ'=>1,'ﻎ'=>1,'ﻏ'=>1,'ﻐ'=>1,'ﻑ'=>1,'ﻒ'=>1,'ﻓ'=>1,'ﻔ'=>1,'ﻕ'=>1,'ﻖ'=>1,'ﻗ'=>1,'ﻘ'=>1,'ﻙ'=>1,'ﻚ'=>1,'ﻛ'=>1,'ﻜ'=>1,'ﻝ'=>1,'ﻞ'=>1,'ﻟ'=>1,'ﻠ'=>1,'ﻡ'=>1,'ﻢ'=>1,'ﻣ'=>1,'ﻤ'=>1,'ﻥ'=>1,'ﻦ'=>1,'ﻧ'=>1,'ﻨ'=>1,'ﻩ'=>1,'ﻪ'=>1,'ﻫ'=>1,'ﻬ'=>1,'ﻭ'=>1,'ﻮ'=>1,'ﻯ'=>1,'ﻰ'=>1,'ﻱ'=>1,'ﻲ'=>1,'ﻳ'=>1,'ﻴ'=>1,'ﻵ'=>1,'ﻶ'=>1,'ﻷ'=>1,'ﻸ'=>1,'ﻹ'=>1,'ﻺ'=>1,'ﻻ'=>1,'ﻼ'=>1,'!'=>1,'"'=>1,'#'=>1,'$'=>1,'%'=>1,'&'=>1,'''=>1,'('=>1,')'=>1,'*'=>1,'+'=>1,','=>1,'-'=>1,'.'=>1,'/'=>1,'0'=>1,'1'=>1,'2'=>1,'3'=>1,'4'=>1,'5'=>1,'6'=>1,'7'=>1,'8'=>1,'9'=>1,':'=>1,';'=>1,'<'=>1,'='=>1,'>'=>1,'?'=>1,'@'=>1,'A'=>1,'B'=>1,'C'=>1,'D'=>1,'E'=>1,'F'=>1,'G'=>1,'H'=>1,'I'=>1,'J'=>1,'K'=>1,'L'=>1,'M'=>1,'N'=>1,'O'=>1,'P'=>1,'Q'=>1,'R'=>1,'S'=>1,'T'=>1,'U'=>1,'V'=>1,'W'=>1,'X'=>1,'Y'=>1,'Z'=>1,'['=>1,'\'=>1,']'=>1,'^'=>1,'_'=>1,'`'=>1,'a'=>1,'b'=>1,'c'=>1,'d'=>1,'e'=>1,'f'=>1,'g'=>1,'h'=>1,'i'=>1,'j'=>1,'k'=>1,'l'=>1,'m'=>1,'n'=>1,'o'=>1,'p'=>1,'q'=>1,'r'=>1,'s'=>1,'t'=>1,'u'=>1,'v'=>1,'w'=>1,'x'=>1,'y'=>1,'z'=>1,'{'=>1,'|'=>1,'}'=>1,'~'=>1,'⦅'=>1,'⦆'=>1,'。'=>1,'「'=>1,'」'=>1,'、'=>1,'・'=>1,'ヲ'=>1,'ァ'=>1,'ィ'=>1,'ゥ'=>1,'ェ'=>1,'ォ'=>1,'ャ'=>1,'ュ'=>1,'ョ'=>1,'ッ'=>1,'ー'=>1,'ア'=>1,'イ'=>1,'ウ'=>1,'エ'=>1,'オ'=>1,'カ'=>1,'キ'=>1,'ク'=>1,'ケ'=>1,'コ'=>1,'サ'=>1,'シ'=>1,'ス'=>1,'セ'=>1,'ソ'=>1,'タ'=>1,'チ'=>1,'ツ'=>1,'テ'=>1,'ト'=>1,'ナ'=>1,'ニ'=>1,'ヌ'=>1,'ネ'=>1,'ノ'=>1,'ハ'=>1,'ヒ'=>1,'フ'=>1,'ヘ'=>1,'ホ'=>1,'マ'=>1,'ミ'=>1,'ム'=>1,'メ'=>1,'モ'=>1,'ヤ'=>1,'ユ'=>1,'ヨ'=>1,'ラ'=>1,'リ'=>1,'ル'=>1,'レ'=>1,'ロ'=>1,'ワ'=>1,'ン'=>1,'゙'=>1,'゚'=>1,'ᅠ'=>1,'ᄀ'=>1,'ᄁ'=>1,'ᆪ'=>1,'ᄂ'=>1,'ᆬ'=>1,'ᆭ'=>1,'ᄃ'=>1,'ᄄ'=>1,'ᄅ'=>1,'ᆰ'=>1,'ᆱ'=>1,'ᆲ'=>1,'ᆳ'=>1,'ᆴ'=>1,'ᆵ'=>1,'ᄚ'=>1,'ᄆ'=>1,'ᄇ'=>1,'ᄈ'=>1,'ᄡ'=>1,'ᄉ'=>1,'ᄊ'=>1,'ᄋ'=>1,'ᄌ'=>1,'ᄍ'=>1,'ᄎ'=>1,'ᄏ'=>1,'ᄐ'=>1,'ᄑ'=>1,'ᄒ'=>1,'ᅡ'=>1,'ᅢ'=>1,'ᅣ'=>1,'ᅤ'=>1,'ᅥ'=>1,'ᅦ'=>1,'ᅧ'=>1,'ᅨ'=>1,'ᅩ'=>1,'ᅪ'=>1,'ᅫ'=>1,'ᅬ'=>1,'ᅭ'=>1,'ᅮ'=>1,'ᅯ'=>1,'ᅰ'=>1,'ᅱ'=>1,'ᅲ'=>1,'ᅳ'=>1,'ᅴ'=>1,'ᅵ'=>1,'¢'=>1,'£'=>1,'¬'=>1,' ̄'=>1,'¦'=>1,'¥'=>1,'₩'=>1,'│'=>1,'←'=>1,'↑'=>1,'→'=>1,'↓'=>1,'■'=>1,'○'=>1,'𝅗𝅥'=>1,'𝅘𝅥'=>1,'𝅘𝅥𝅮'=>1,'𝅘𝅥𝅯'=>1,'𝅘𝅥𝅰'=>1,'𝅘𝅥𝅱'=>1,'𝅘𝅥𝅲'=>1,'𝆹𝅥'=>1,'𝆺𝅥'=>1,'𝆹𝅥𝅮'=>1,'𝆺𝅥𝅮'=>1,'𝆹𝅥𝅯'=>1,'𝆺𝅥𝅯'=>1,'𝐀'=>1,'𝐁'=>1,'𝐂'=>1,'𝐃'=>1,'𝐄'=>1,'𝐅'=>1,'𝐆'=>1,'𝐇'=>1,'𝐈'=>1,'𝐉'=>1,'𝐊'=>1,'𝐋'=>1,'𝐌'=>1,'𝐍'=>1,'𝐎'=>1,'𝐏'=>1,'𝐐'=>1,'𝐑'=>1,'𝐒'=>1,'𝐓'=>1,'𝐔'=>1,'𝐕'=>1,'𝐖'=>1,'𝐗'=>1,'𝐘'=>1,'𝐙'=>1,'𝐚'=>1,'𝐛'=>1,'𝐜'=>1,'𝐝'=>1,'𝐞'=>1,'𝐟'=>1,'𝐠'=>1,'𝐡'=>1,'𝐢'=>1,'𝐣'=>1,'𝐤'=>1,'𝐥'=>1,'𝐦'=>1,'𝐧'=>1,'𝐨'=>1,'𝐩'=>1,'𝐪'=>1,'𝐫'=>1,'𝐬'=>1,'𝐭'=>1,'𝐮'=>1,'𝐯'=>1,'𝐰'=>1,'𝐱'=>1,'𝐲'=>1,'𝐳'=>1,'𝐴'=>1,'𝐵'=>1,'𝐶'=>1,'𝐷'=>1,'𝐸'=>1,'𝐹'=>1,'𝐺'=>1,'𝐻'=>1,'𝐼'=>1,'𝐽'=>1,'𝐾'=>1,'𝐿'=>1,'𝑀'=>1,'𝑁'=>1,'𝑂'=>1,'𝑃'=>1,'𝑄'=>1,'𝑅'=>1,'𝑆'=>1,'𝑇'=>1,'𝑈'=>1,'𝑉'=>1,'𝑊'=>1,'𝑋'=>1,'𝑌'=>1,'𝑍'=>1,'𝑎'=>1,'𝑏'=>1,'𝑐'=>1,'𝑑'=>1,'𝑒'=>1,'𝑓'=>1,'𝑔'=>1,'𝑖'=>1,'𝑗'=>1,'𝑘'=>1,'𝑙'=>1,'𝑚'=>1,'𝑛'=>1,'𝑜'=>1,'𝑝'=>1,'𝑞'=>1,'𝑟'=>1,'𝑠'=>1,'𝑡'=>1,'𝑢'=>1,'𝑣'=>1,'𝑤'=>1,'𝑥'=>1,'𝑦'=>1,'𝑧'=>1,'𝑨'=>1,'𝑩'=>1,'𝑪'=>1,'𝑫'=>1,'𝑬'=>1,'𝑭'=>1,'𝑮'=>1,'𝑯'=>1,'𝑰'=>1,'𝑱'=>1,'𝑲'=>1,'𝑳'=>1,'𝑴'=>1,'𝑵'=>1,'𝑶'=>1,'𝑷'=>1,'𝑸'=>1,'𝑹'=>1,'𝑺'=>1,'𝑻'=>1,'𝑼'=>1,'𝑽'=>1,'𝑾'=>1,'𝑿'=>1,'𝒀'=>1,'𝒁'=>1,'𝒂'=>1,'𝒃'=>1,'𝒄'=>1,'𝒅'=>1,'𝒆'=>1,'𝒇'=>1,'𝒈'=>1,'𝒉'=>1,'𝒊'=>1,'𝒋'=>1,'𝒌'=>1,'𝒍'=>1,'𝒎'=>1,'𝒏'=>1,'𝒐'=>1,'𝒑'=>1,'𝒒'=>1,'𝒓'=>1,'𝒔'=>1,'𝒕'=>1,'𝒖'=>1,'𝒗'=>1,'𝒘'=>1,'𝒙'=>1,'𝒚'=>1,'𝒛'=>1,'𝒜'=>1,'𝒞'=>1,'𝒟'=>1,'𝒢'=>1,'𝒥'=>1,'𝒦'=>1,'𝒩'=>1,'𝒪'=>1,'𝒫'=>1,'𝒬'=>1,'𝒮'=>1,'𝒯'=>1,'𝒰'=>1,'𝒱'=>1,'𝒲'=>1,'𝒳'=>1,'𝒴'=>1,'𝒵'=>1,'𝒶'=>1,'𝒷'=>1,'𝒸'=>1,'𝒹'=>1,'𝒻'=>1,'𝒽'=>1,'𝒾'=>1,'𝒿'=>1,'𝓀'=>1,'𝓁'=>1,'𝓂'=>1,'𝓃'=>1,'𝓅'=>1,'𝓆'=>1,'𝓇'=>1,'𝓈'=>1,'𝓉'=>1,'𝓊'=>1,'𝓋'=>1,'𝓌'=>1,'𝓍'=>1,'𝓎'=>1,'𝓏'=>1,'𝓐'=>1,'𝓑'=>1,'𝓒'=>1,'𝓓'=>1,'𝓔'=>1,'𝓕'=>1,'𝓖'=>1,'𝓗'=>1,'𝓘'=>1,'𝓙'=>1,'𝓚'=>1,'𝓛'=>1,'𝓜'=>1,'𝓝'=>1,'𝓞'=>1,'𝓟'=>1,'𝓠'=>1,'𝓡'=>1,'𝓢'=>1,'𝓣'=>1,'𝓤'=>1,'𝓥'=>1,'𝓦'=>1,'𝓧'=>1,'𝓨'=>1,'𝓩'=>1,'𝓪'=>1,'𝓫'=>1,'𝓬'=>1,'𝓭'=>1,'𝓮'=>1,'𝓯'=>1,'𝓰'=>1,'𝓱'=>1,'𝓲'=>1,'𝓳'=>1,'𝓴'=>1,'𝓵'=>1,'𝓶'=>1,'𝓷'=>1,'𝓸'=>1,'𝓹'=>1,'𝓺'=>1,'𝓻'=>1,'𝓼'=>1,'𝓽'=>1,'𝓾'=>1,'𝓿'=>1,'𝔀'=>1,'𝔁'=>1,'𝔂'=>1,'𝔃'=>1,'𝔄'=>1,'𝔅'=>1,'𝔇'=>1,'𝔈'=>1,'𝔉'=>1,'𝔊'=>1,'𝔍'=>1,'𝔎'=>1,'𝔏'=>1,'𝔐'=>1,'𝔑'=>1,'𝔒'=>1,'𝔓'=>1,'𝔔'=>1,'𝔖'=>1,'𝔗'=>1,'𝔘'=>1,'𝔙'=>1,'𝔚'=>1,'𝔛'=>1,'𝔜'=>1,'𝔞'=>1,'𝔟'=>1,'𝔠'=>1,'𝔡'=>1,'𝔢'=>1,'𝔣'=>1,'𝔤'=>1,'𝔥'=>1,'𝔦'=>1,'𝔧'=>1,'𝔨'=>1,'𝔩'=>1,'𝔪'=>1,'𝔫'=>1,'𝔬'=>1,'𝔭'=>1,'𝔮'=>1,'𝔯'=>1,'𝔰'=>1,'𝔱'=>1,'𝔲'=>1,'𝔳'=>1,'𝔴'=>1,'𝔵'=>1,'𝔶'=>1,'𝔷'=>1,'𝔸'=>1,'𝔹'=>1,'𝔻'=>1,'𝔼'=>1,'𝔽'=>1,'𝔾'=>1,'𝕀'=>1,'𝕁'=>1,'𝕂'=>1,'𝕃'=>1,'𝕄'=>1,'𝕆'=>1,'𝕊'=>1,'𝕋'=>1,'𝕌'=>1,'𝕍'=>1,'𝕎'=>1,'𝕏'=>1,'𝕐'=>1,'𝕒'=>1,'𝕓'=>1,'𝕔'=>1,'𝕕'=>1,'𝕖'=>1,'𝕗'=>1,'𝕘'=>1,'𝕙'=>1,'𝕚'=>1,'𝕛'=>1,'𝕜'=>1,'𝕝'=>1,'𝕞'=>1,'𝕟'=>1,'𝕠'=>1,'𝕡'=>1,'𝕢'=>1,'𝕣'=>1,'𝕤'=>1,'𝕥'=>1,'𝕦'=>1,'𝕧'=>1,'𝕨'=>1,'𝕩'=>1,'𝕪'=>1,'𝕫'=>1,'𝕬'=>1,'𝕭'=>1,'𝕮'=>1,'𝕯'=>1,'𝕰'=>1,'𝕱'=>1,'𝕲'=>1,'𝕳'=>1,'𝕴'=>1,'𝕵'=>1,'𝕶'=>1,'𝕷'=>1,'𝕸'=>1,'𝕹'=>1,'𝕺'=>1,'𝕻'=>1,'𝕼'=>1,'𝕽'=>1,'𝕾'=>1,'𝕿'=>1,'𝖀'=>1,'𝖁'=>1,'𝖂'=>1,'𝖃'=>1,'𝖄'=>1,'𝖅'=>1,'𝖆'=>1,'𝖇'=>1,'𝖈'=>1,'𝖉'=>1,'𝖊'=>1,'𝖋'=>1,'𝖌'=>1,'𝖍'=>1,'𝖎'=>1,'𝖏'=>1,'𝖐'=>1,'𝖑'=>1,'𝖒'=>1,'𝖓'=>1,'𝖔'=>1,'𝖕'=>1,'𝖖'=>1,'𝖗'=>1,'𝖘'=>1,'𝖙'=>1,'𝖚'=>1,'𝖛'=>1,'𝖜'=>1,'𝖝'=>1,'𝖞'=>1,'𝖟'=>1,'𝖠'=>1,'𝖡'=>1,'𝖢'=>1,'𝖣'=>1,'𝖤'=>1,'𝖥'=>1,'𝖦'=>1,'𝖧'=>1,'𝖨'=>1,'𝖩'=>1,'𝖪'=>1,'𝖫'=>1,'𝖬'=>1,'𝖭'=>1,'𝖮'=>1,'𝖯'=>1,'𝖰'=>1,'𝖱'=>1,'𝖲'=>1,'𝖳'=>1,'𝖴'=>1,'𝖵'=>1,'𝖶'=>1,'𝖷'=>1,'𝖸'=>1,'𝖹'=>1,'𝖺'=>1,'𝖻'=>1,'𝖼'=>1,'𝖽'=>1,'𝖾'=>1,'𝖿'=>1,'𝗀'=>1,'𝗁'=>1,'𝗂'=>1,'𝗃'=>1,'𝗄'=>1,'𝗅'=>1,'𝗆'=>1,'𝗇'=>1,'𝗈'=>1,'𝗉'=>1,'𝗊'=>1,'𝗋'=>1,'𝗌'=>1,'𝗍'=>1,'𝗎'=>1,'𝗏'=>1,'𝗐'=>1,'𝗑'=>1,'𝗒'=>1,'𝗓'=>1,'𝗔'=>1,'𝗕'=>1,'𝗖'=>1,'𝗗'=>1,'𝗘'=>1,'𝗙'=>1,'𝗚'=>1,'𝗛'=>1,'𝗜'=>1,'𝗝'=>1,'𝗞'=>1,'𝗟'=>1,'𝗠'=>1,'𝗡'=>1,'𝗢'=>1,'𝗣'=>1,'𝗤'=>1,'𝗥'=>1,'𝗦'=>1,'𝗧'=>1,'𝗨'=>1,'𝗩'=>1,'𝗪'=>1,'𝗫'=>1,'𝗬'=>1,'𝗭'=>1,'𝗮'=>1,'𝗯'=>1,'𝗰'=>1,'𝗱'=>1,'𝗲'=>1,'𝗳'=>1,'𝗴'=>1,'𝗵'=>1,'𝗶'=>1,'𝗷'=>1,'𝗸'=>1,'𝗹'=>1,'𝗺'=>1,'𝗻'=>1,'𝗼'=>1,'𝗽'=>1,'𝗾'=>1,'𝗿'=>1,'𝘀'=>1,'𝘁'=>1,'𝘂'=>1,'𝘃'=>1,'𝘄'=>1,'𝘅'=>1,'𝘆'=>1,'𝘇'=>1,'𝘈'=>1,'𝘉'=>1,'𝘊'=>1,'𝘋'=>1,'𝘌'=>1,'𝘍'=>1,'𝘎'=>1,'𝘏'=>1,'𝘐'=>1,'𝘑'=>1,'𝘒'=>1,'𝘓'=>1,'𝘔'=>1,'𝘕'=>1,'𝘖'=>1,'𝘗'=>1,'𝘘'=>1,'𝘙'=>1,'𝘚'=>1,'𝘛'=>1,'𝘜'=>1,'𝘝'=>1,'𝘞'=>1,'𝘟'=>1,'𝘠'=>1,'𝘡'=>1,'𝘢'=>1,'𝘣'=>1,'𝘤'=>1,'𝘥'=>1,'𝘦'=>1,'𝘧'=>1,'𝘨'=>1,'𝘩'=>1,'𝘪'=>1,'𝘫'=>1,'𝘬'=>1,'𝘭'=>1,'𝘮'=>1,'𝘯'=>1,'𝘰'=>1,'𝘱'=>1,'𝘲'=>1,'𝘳'=>1,'𝘴'=>1,'𝘵'=>1,'𝘶'=>1,'𝘷'=>1,'𝘸'=>1,'𝘹'=>1,'𝘺'=>1,'𝘻'=>1,'𝘼'=>1,'𝘽'=>1,'𝘾'=>1,'𝘿'=>1,'𝙀'=>1,'𝙁'=>1,'𝙂'=>1,'𝙃'=>1,'𝙄'=>1,'𝙅'=>1,'𝙆'=>1,'𝙇'=>1,'𝙈'=>1,'𝙉'=>1,'𝙊'=>1,'𝙋'=>1,'𝙌'=>1,'𝙍'=>1,'𝙎'=>1,'𝙏'=>1,'𝙐'=>1,'𝙑'=>1,'𝙒'=>1,'𝙓'=>1,'𝙔'=>1,'𝙕'=>1,'𝙖'=>1,'𝙗'=>1,'𝙘'=>1,'𝙙'=>1,'𝙚'=>1,'𝙛'=>1,'𝙜'=>1,'𝙝'=>1,'𝙞'=>1,'𝙟'=>1,'𝙠'=>1,'𝙡'=>1,'𝙢'=>1,'𝙣'=>1,'𝙤'=>1,'𝙥'=>1,'𝙦'=>1,'𝙧'=>1,'𝙨'=>1,'𝙩'=>1,'𝙪'=>1,'𝙫'=>1,'𝙬'=>1,'𝙭'=>1,'𝙮'=>1,'𝙯'=>1,'𝙰'=>1,'𝙱'=>1,'𝙲'=>1,'𝙳'=>1,'𝙴'=>1,'𝙵'=>1,'𝙶'=>1,'𝙷'=>1,'𝙸'=>1,'𝙹'=>1,'𝙺'=>1,'𝙻'=>1,'𝙼'=>1,'𝙽'=>1,'𝙾'=>1,'𝙿'=>1,'𝚀'=>1,'𝚁'=>1,'𝚂'=>1,'𝚃'=>1,'𝚄'=>1,'𝚅'=>1,'𝚆'=>1,'𝚇'=>1,'𝚈'=>1,'𝚉'=>1,'𝚊'=>1,'𝚋'=>1,'𝚌'=>1,'𝚍'=>1,'𝚎'=>1,'𝚏'=>1,'𝚐'=>1,'𝚑'=>1,'𝚒'=>1,'𝚓'=>1,'𝚔'=>1,'𝚕'=>1,'𝚖'=>1,'𝚗'=>1,'𝚘'=>1,'𝚙'=>1,'𝚚'=>1,'𝚛'=>1,'𝚜'=>1,'𝚝'=>1,'𝚞'=>1,'𝚟'=>1,'𝚠'=>1,'𝚡'=>1,'𝚢'=>1,'𝚣'=>1,'𝚤'=>1,'𝚥'=>1,'𝚨'=>1,'𝚩'=>1,'𝚪'=>1,'𝚫'=>1,'𝚬'=>1,'𝚭'=>1,'𝚮'=>1,'𝚯'=>1,'𝚰'=>1,'𝚱'=>1,'𝚲'=>1,'𝚳'=>1,'𝚴'=>1,'𝚵'=>1,'𝚶'=>1,'𝚷'=>1,'𝚸'=>1,'𝚹'=>1,'𝚺'=>1,'𝚻'=>1,'𝚼'=>1,'𝚽'=>1,'𝚾'=>1,'𝚿'=>1,'𝛀'=>1,'𝛁'=>1,'𝛂'=>1,'𝛃'=>1,'𝛄'=>1,'𝛅'=>1,'𝛆'=>1,'𝛇'=>1,'𝛈'=>1,'𝛉'=>1,'𝛊'=>1,'𝛋'=>1,'𝛌'=>1,'𝛍'=>1,'𝛎'=>1,'𝛏'=>1,'𝛐'=>1,'𝛑'=>1,'𝛒'=>1,'𝛓'=>1,'𝛔'=>1,'𝛕'=>1,'𝛖'=>1,'𝛗'=>1,'𝛘'=>1,'𝛙'=>1,'𝛚'=>1,'𝛛'=>1,'𝛜'=>1,'𝛝'=>1,'𝛞'=>1,'𝛟'=>1,'𝛠'=>1,'𝛡'=>1,'𝛢'=>1,'𝛣'=>1,'𝛤'=>1,'𝛥'=>1,'𝛦'=>1,'𝛧'=>1,'𝛨'=>1,'𝛩'=>1,'𝛪'=>1,'𝛫'=>1,'𝛬'=>1,'𝛭'=>1,'𝛮'=>1,'𝛯'=>1,'𝛰'=>1,'𝛱'=>1,'𝛲'=>1,'𝛳'=>1,'𝛴'=>1,'𝛵'=>1,'𝛶'=>1,'𝛷'=>1,'𝛸'=>1,'𝛹'=>1,'𝛺'=>1,'𝛻'=>1,'𝛼'=>1,'𝛽'=>1,'𝛾'=>1,'𝛿'=>1,'𝜀'=>1,'𝜁'=>1,'𝜂'=>1,'𝜃'=>1,'𝜄'=>1,'𝜅'=>1,'𝜆'=>1,'𝜇'=>1,'𝜈'=>1,'𝜉'=>1,'𝜊'=>1,'𝜋'=>1,'𝜌'=>1,'𝜍'=>1,'𝜎'=>1,'𝜏'=>1,'𝜐'=>1,'𝜑'=>1,'𝜒'=>1,'𝜓'=>1,'𝜔'=>1,'𝜕'=>1,'𝜖'=>1,'𝜗'=>1,'𝜘'=>1,'𝜙'=>1,'𝜚'=>1,'𝜛'=>1,'𝜜'=>1,'𝜝'=>1,'𝜞'=>1,'𝜟'=>1,'𝜠'=>1,'𝜡'=>1,'𝜢'=>1,'𝜣'=>1,'𝜤'=>1,'𝜥'=>1,'𝜦'=>1,'𝜧'=>1,'𝜨'=>1,'𝜩'=>1,'𝜪'=>1,'𝜫'=>1,'𝜬'=>1,'𝜭'=>1,'𝜮'=>1,'𝜯'=>1,'𝜰'=>1,'𝜱'=>1,'𝜲'=>1,'𝜳'=>1,'𝜴'=>1,'𝜵'=>1,'𝜶'=>1,'𝜷'=>1,'𝜸'=>1,'𝜹'=>1,'𝜺'=>1,'𝜻'=>1,'𝜼'=>1,'𝜽'=>1,'𝜾'=>1,'𝜿'=>1,'𝝀'=>1,'𝝁'=>1,'𝝂'=>1,'𝝃'=>1,'𝝄'=>1,'𝝅'=>1,'𝝆'=>1,'𝝇'=>1,'𝝈'=>1,'𝝉'=>1,'𝝊'=>1,'𝝋'=>1,'𝝌'=>1,'𝝍'=>1,'𝝎'=>1,'𝝏'=>1,'𝝐'=>1,'𝝑'=>1,'𝝒'=>1,'𝝓'=>1,'𝝔'=>1,'𝝕'=>1,'𝝖'=>1,'𝝗'=>1,'𝝘'=>1,'𝝙'=>1,'𝝚'=>1,'𝝛'=>1,'𝝜'=>1,'𝝝'=>1,'𝝞'=>1,'𝝟'=>1,'𝝠'=>1,'𝝡'=>1,'𝝢'=>1,'𝝣'=>1,'𝝤'=>1,'𝝥'=>1,'𝝦'=>1,'𝝧'=>1,'𝝨'=>1,'𝝩'=>1,'𝝪'=>1,'𝝫'=>1,'𝝬'=>1,'𝝭'=>1,'𝝮'=>1,'𝝯'=>1,'𝝰'=>1,'𝝱'=>1,'𝝲'=>1,'𝝳'=>1,'𝝴'=>1,'𝝵'=>1,'𝝶'=>1,'𝝷'=>1,'𝝸'=>1,'𝝹'=>1,'𝝺'=>1,'𝝻'=>1,'𝝼'=>1,'𝝽'=>1,'𝝾'=>1,'𝝿'=>1,'𝞀'=>1,'𝞁'=>1,'𝞂'=>1,'𝞃'=>1,'𝞄'=>1,'𝞅'=>1,'𝞆'=>1,'𝞇'=>1,'𝞈'=>1,'𝞉'=>1,'𝞊'=>1,'𝞋'=>1,'𝞌'=>1,'𝞍'=>1,'𝞎'=>1,'𝞏'=>1,'𝞐'=>1,'𝞑'=>1,'𝞒'=>1,'𝞓'=>1,'𝞔'=>1,'𝞕'=>1,'𝞖'=>1,'𝞗'=>1,'𝞘'=>1,'𝞙'=>1,'𝞚'=>1,'𝞛'=>1,'𝞜'=>1,'𝞝'=>1,'𝞞'=>1,'𝞟'=>1,'𝞠'=>1,'𝞡'=>1,'𝞢'=>1,'𝞣'=>1,'𝞤'=>1,'𝞥'=>1,'𝞦'=>1,'𝞧'=>1,'𝞨'=>1,'𝞩'=>1,'𝞪'=>1,'𝞫'=>1,'𝞬'=>1,'𝞭'=>1,'𝞮'=>1,'𝞯'=>1,'𝞰'=>1,'𝞱'=>1,'𝞲'=>1,'𝞳'=>1,'𝞴'=>1,'𝞵'=>1,'𝞶'=>1,'𝞷'=>1,'𝞸'=>1,'𝞹'=>1,'𝞺'=>1,'𝞻'=>1,'𝞼'=>1,'𝞽'=>1,'𝞾'=>1,'𝞿'=>1,'𝟀'=>1,'𝟁'=>1,'𝟂'=>1,'𝟃'=>1,'𝟄'=>1,'𝟅'=>1,'𝟆'=>1,'𝟇'=>1,'𝟈'=>1,'𝟉'=>1,'𝟊'=>1,'𝟋'=>1,'𝟎'=>1,'𝟏'=>1,'𝟐'=>1,'𝟑'=>1,'𝟒'=>1,'𝟓'=>1,'𝟔'=>1,'𝟕'=>1,'𝟖'=>1,'𝟗'=>1,'𝟘'=>1,'𝟙'=>1,'𝟚'=>1,'𝟛'=>1,'𝟜'=>1,'𝟝'=>1,'𝟞'=>1,'𝟟'=>1,'𝟠'=>1,'𝟡'=>1,'𝟢'=>1,'𝟣'=>1,'𝟤'=>1,'𝟥'=>1,'𝟦'=>1,'𝟧'=>1,'𝟨'=>1,'𝟩'=>1,'𝟪'=>1,'𝟫'=>1,'𝟬'=>1,'𝟭'=>1,'𝟮'=>1,'𝟯'=>1,'𝟰'=>1,'𝟱'=>1,'𝟲'=>1,'𝟳'=>1,'𝟴'=>1,'𝟵'=>1,'𝟶'=>1,'𝟷'=>1,'𝟸'=>1,'𝟹'=>1,'𝟺'=>1,'𝟻'=>1,'𝟼'=>1,'𝟽'=>1,'𝟾'=>1,'𝟿'=>1,'丽'=>1,'丸'=>1,'乁'=>1,'𠄢'=>1,'你'=>1,'侮'=>1,'侻'=>1,'倂'=>1,'偺'=>1,'備'=>1,'僧'=>1,'像'=>1,'㒞'=>1,'𠘺'=>1,'免'=>1,'兔'=>1,'兤'=>1,'具'=>1,'𠔜'=>1,'㒹'=>1,'內'=>1,'再'=>1,'𠕋'=>1,'冗'=>1,'冤'=>1,'仌'=>1,'冬'=>1,'况'=>1,'𩇟'=>1,'凵'=>1,'刃'=>1,'㓟'=>1,'刻'=>1,'剆'=>1,'割'=>1,'剷'=>1,'㔕'=>1,'勇'=>1,'勉'=>1,'勤'=>1,'勺'=>1,'包'=>1,'匆'=>1,'北'=>1,'卉'=>1,'卑'=>1,'博'=>1,'即'=>1,'卽'=>1,'卿'=>1,'卿'=>1,'卿'=>1,'𠨬'=>1,'灰'=>1,'及'=>1,'叟'=>1,'𠭣'=>1,'叫'=>1,'叱'=>1,'吆'=>1,'咞'=>1,'吸'=>1,'呈'=>1,'周'=>1,'咢'=>1,'哶'=>1,'唐'=>1,'啓'=>1,'啣'=>1,'善'=>1,'善'=>1,'喙'=>1,'喫'=>1,'喳'=>1,'嗂'=>1,'圖'=>1,'嘆'=>1,'圗'=>1,'噑'=>1,'噴'=>1,'切'=>1,'壮'=>1,'城'=>1,'埴'=>1,'堍'=>1,'型'=>1,'堲'=>1,'報'=>1,'墬'=>1,'𡓤'=>1,'売'=>1,'壷'=>1,'夆'=>1,'多'=>1,'夢'=>1,'奢'=>1,'𡚨'=>1,'𡛪'=>1,'姬'=>1,'娛'=>1,'娧'=>1,'姘'=>1,'婦'=>1,'㛮'=>1,'㛼'=>1,'嬈'=>1,'嬾'=>1,'嬾'=>1,'𡧈'=>1,'寃'=>1,'寘'=>1,'寧'=>1,'寳'=>1,'𡬘'=>1,'寿'=>1,'将'=>1,'当'=>1,'尢'=>1,'㞁'=>1,'屠'=>1,'屮'=>1,'峀'=>1,'岍'=>1,'𡷤'=>1,'嵃'=>1,'𡷦'=>1,'嵮'=>1,'嵫'=>1,'嵼'=>1,'巡'=>1,'巢'=>1,'㠯'=>1,'巽'=>1,'帨'=>1,'帽'=>1,'幩'=>1,'㡢'=>1,'𢆃'=>1,'㡼'=>1,'庰'=>1,'庳'=>1,'庶'=>1,'廊'=>1,'𪎒'=>1,'廾'=>1,'𢌱'=>1,'𢌱'=>1,'舁'=>1,'弢'=>1,'弢'=>1,'㣇'=>1,'𣊸'=>1,'𦇚'=>1,'形'=>1,'彫'=>1,'㣣'=>1,'徚'=>1,'忍'=>1,'志'=>1,'忹'=>1,'悁'=>1,'㤺'=>1,'㤜'=>1,'悔'=>1,'𢛔'=>1,'惇'=>1,'慈'=>1,'慌'=>1,'慎'=>1,'慌'=>1,'慺'=>1,'憎'=>1,'憲'=>1,'憤'=>1,'憯'=>1,'懞'=>1,'懲'=>1,'懶'=>1,'成'=>1,'戛'=>1,'扝'=>1,'抱'=>1,'拔'=>1,'捐'=>1,'𢬌'=>1,'挽'=>1,'拼'=>1,'捨'=>1,'掃'=>1,'揤'=>1,'𢯱'=>1,'搢'=>1,'揅'=>1,'掩'=>1,'㨮'=>1,'摩'=>1,'摾'=>1,'撝'=>1,'摷'=>1,'㩬'=>1,'敏'=>1,'敬'=>1,'𣀊'=>1,'旣'=>1,'書'=>1,'晉'=>1,'㬙'=>1,'暑'=>1,'㬈'=>1,'㫤'=>1,'冒'=>1,'冕'=>1,'最'=>1,'暜'=>1,'肭'=>1,'䏙'=>1,'朗'=>1,'望'=>1,'朡'=>1,'杞'=>1,'杓'=>1,'𣏃'=>1,'㭉'=>1,'柺'=>1,'枅'=>1,'桒'=>1,'梅'=>1,'𣑭'=>1,'梎'=>1,'栟'=>1,'椔'=>1,'㮝'=>1,'楂'=>1,'榣'=>1,'槪'=>1,'檨'=>1,'𣚣'=>1,'櫛'=>1,'㰘'=>1,'次'=>1,'𣢧'=>1,'歔'=>1,'㱎'=>1,'歲'=>1,'殟'=>1,'殺'=>1,'殻'=>1,'𣪍'=>1,'𡴋'=>1,'𣫺'=>1,'汎'=>1,'𣲼'=>1,'沿'=>1,'泍'=>1,'汧'=>1,'洖'=>1,'派'=>1,'海'=>1,'流'=>1,'浩'=>1,'浸'=>1,'涅'=>1,'𣴞'=>1,'洴'=>1,'港'=>1,'湮'=>1,'㴳'=>1,'滋'=>1,'滇'=>1,'𣻑'=>1,'淹'=>1,'潮'=>1,'𣽞'=>1,'𣾎'=>1,'濆'=>1,'瀹'=>1,'瀞'=>1,'瀛'=>1,'㶖'=>1,'灊'=>1,'災'=>1,'灷'=>1,'炭'=>1,'𠔥'=>1,'煅'=>1,'𤉣'=>1,'熜'=>1,'𤎫'=>1,'爨'=>1,'爵'=>1,'牐'=>1,'𤘈'=>1,'犀'=>1,'犕'=>1,'𤜵'=>1,'𤠔'=>1,'獺'=>1,'王'=>1,'㺬'=>1,'玥'=>1,'㺸'=>1,'㺸'=>1,'瑇'=>1,'瑜'=>1,'瑱'=>1,'璅'=>1,'瓊'=>1,'㼛'=>1,'甤'=>1,'𤰶'=>1,'甾'=>1,'𤲒'=>1,'異'=>1,'𢆟'=>1,'瘐'=>1,'𤾡'=>1,'𤾸'=>1,'𥁄'=>1,'㿼'=>1,'䀈'=>1,'直'=>1,'𥃳'=>1,'𥃲'=>1,'𥄙'=>1,'𥄳'=>1,'眞'=>1,'真'=>1,'真'=>1,'睊'=>1,'䀹'=>1,'瞋'=>1,'䁆'=>1,'䂖'=>1,'𥐝'=>1,'硎'=>1,'碌'=>1,'磌'=>1,'䃣'=>1,'𥘦'=>1,'祖'=>1,'𥚚'=>1,'𥛅'=>1,'福'=>1,'秫'=>1,'䄯'=>1,'穀'=>1,'穊'=>1,'穏'=>1,'𥥼'=>1,'𥪧'=>1,'𥪧'=>1,'竮'=>1,'䈂'=>1,'𥮫'=>1,'篆'=>1,'築'=>1,'䈧'=>1,'𥲀'=>1,'糒'=>1,'䊠'=>1,'糨'=>1,'糣'=>1,'紀'=>1,'𥾆'=>1,'絣'=>1,'䌁'=>1,'緇'=>1,'縂'=>1,'繅'=>1,'䌴'=>1,'𦈨'=>1,'𦉇'=>1,'䍙'=>1,'𦋙'=>1,'罺'=>1,'𦌾'=>1,'羕'=>1,'翺'=>1,'者'=>1,'𦓚'=>1,'𦔣'=>1,'聠'=>1,'𦖨'=>1,'聰'=>1,'𣍟'=>1,'䏕'=>1,'育'=>1,'脃'=>1,'䐋'=>1,'脾'=>1,'媵'=>1,'𦞧'=>1,'𦞵'=>1,'𣎓'=>1,'𣎜'=>1,'舁'=>1,'舄'=>1,'辞'=>1,'䑫'=>1,'芑'=>1,'芋'=>1,'芝'=>1,'劳'=>1,'花'=>1,'芳'=>1,'芽'=>1,'苦'=>1,'𦬼'=>1,'若'=>1,'茝'=>1,'荣'=>1,'莭'=>1,'茣'=>1,'莽'=>1,'菧'=>1,'著'=>1,'荓'=>1,'菊'=>1,'菌'=>1,'菜'=>1,'𦰶'=>1,'𦵫'=>1,'𦳕'=>1,'䔫'=>1,'蓱'=>1,'蓳'=>1,'蔖'=>1,'𧏊'=>1,'蕤'=>1,'𦼬'=>1,'䕝'=>1,'䕡'=>1,'𦾱'=>1,'𧃒'=>1,'䕫'=>1,'虐'=>1,'虜'=>1,'虧'=>1,'虩'=>1,'蚩'=>1,'蚈'=>1,'蜎'=>1,'蛢'=>1,'蝹'=>1,'蜨'=>1,'蝫'=>1,'螆'=>1,'䗗'=>1,'蟡'=>1,'蠁'=>1,'䗹'=>1,'衠'=>1,'衣'=>1,'𧙧'=>1,'裗'=>1,'裞'=>1,'䘵'=>1,'裺'=>1,'㒻'=>1,'𧢮'=>1,'𧥦'=>1,'䚾'=>1,'䛇'=>1,'誠'=>1,'諭'=>1,'變'=>1,'豕'=>1,'𧲨'=>1,'貫'=>1,'賁'=>1,'贛'=>1,'起'=>1,'𧼯'=>1,'𠠄'=>1,'跋'=>1,'趼'=>1,'跰'=>1,'𠣞'=>1,'軔'=>1,'輸'=>1,'𨗒'=>1,'𨗭'=>1,'邔'=>1,'郱'=>1,'鄑'=>1,'𨜮'=>1,'鄛'=>1,'鈸'=>1,'鋗'=>1,'鋘'=>1,'鉼'=>1,'鏹'=>1,'鐕'=>1,'𨯺'=>1,'開'=>1,'䦕'=>1,'閷'=>1,'𨵷'=>1,'䧦'=>1,'雃'=>1,'嶲'=>1,'霣'=>1,'𩅅'=>1,'𩈚'=>1,'䩮'=>1,'䩶'=>1,'韠'=>1,'𩐊'=>1,'䪲'=>1,'𩒖'=>1,'頋'=>1,'頋'=>1,'頩'=>1,'𩖶'=>1,'飢'=>1,'䬳'=>1,'餩'=>1,'馧'=>1,'駂'=>1,'駾'=>1,'䯎'=>1,'𩬰'=>1,'鬒'=>1,'鱀'=>1,'鳽'=>1,'䳎'=>1,'䳭'=>1,'鵧'=>1,'𪃎'=>1,'䳸'=>1,'𪄅'=>1,'𪈎'=>1,'𪊑'=>1,'麻'=>1,'䵖'=>1,'黹'=>1,'黾'=>1,'鼅'=>1,'鼏'=>1,'鼖'=>1,'鼻'=>1,'𪘀'=>1,'̀'=>0,'́'=>0,'̂'=>0,'̃'=>0,'̄'=>0,'̆'=>0,'̇'=>0,'̈'=>0,'̉'=>0,'̊'=>0,'̋'=>0,'̌'=>0,'̏'=>0,'̑'=>0,'̓'=>0,'̔'=>0,'̛'=>0,'̣'=>0,'̤'=>0,'̥'=>0,'̦'=>0,'̧'=>0,'̨'=>0,'̭'=>0,'̮'=>0,'̰'=>0,'̱'=>0,'̸'=>0,'͂'=>0,'ͅ'=>0,'ٓ'=>0,'ٔ'=>0,'ٕ'=>0,'़'=>0,'া'=>0,'ৗ'=>0,'ା'=>0,'ୖ'=>0,'ୗ'=>0,'ா'=>0,'ௗ'=>0,'ౖ'=>0,'ೂ'=>0,'ೕ'=>0,'ೖ'=>0,'ാ'=>0,'ൗ'=>0,'්'=>0,'ා'=>0,'ෟ'=>0,'ီ'=>0,'ᅡ'=>0,'ᅢ'=>0,'ᅣ'=>0,'ᅤ'=>0,'ᅥ'=>0,'ᅦ'=>0,'ᅧ'=>0,'ᅨ'=>0,'ᅩ'=>0,'ᅪ'=>0,'ᅫ'=>0,'ᅬ'=>0,'ᅭ'=>0,'ᅮ'=>0,'ᅯ'=>0,'ᅰ'=>0,'ᅱ'=>0,'ᅲ'=>0,'ᅳ'=>0,'ᅴ'=>0,'ᅵ'=>0,'ᆨ'=>0,'ᆩ'=>0,'ᆪ'=>0,'ᆫ'=>0,'ᆬ'=>0,'ᆭ'=>0,'ᆮ'=>0,'ᆯ'=>0,'ᆰ'=>0,'ᆱ'=>0,'ᆲ'=>0,'ᆳ'=>0,'ᆴ'=>0,'ᆵ'=>0,'ᆶ'=>0,'ᆷ'=>0,'ᆸ'=>0,'ᆹ'=>0,'ᆺ'=>0,'ᆻ'=>0,'ᆼ'=>0,'ᆽ'=>0,'ᆾ'=>0,'ᆿ'=>0,'ᇀ'=>0,'ᇁ'=>0,'ᇂ'=>0,'ᬵ'=>0,'゙'=>0,'゚'=>0); \ No newline at end of file
+$GLOBALS['utf_nfkc_qc']=array(' '=>1,'¨'=>1,'ª'=>1,'¯'=>1,'²'=>1,'³'=>1,'´'=>1,'µ'=>1,'¸'=>1,'¹'=>1,'º'=>1,'¼'=>1,'½'=>1,'¾'=>1,'IJ'=>1,'ij'=>1,'Ŀ'=>1,'ŀ'=>1,'ʼn'=>1,'ſ'=>1,'DŽ'=>1,'Dž'=>1,'dž'=>1,'LJ'=>1,'Lj'=>1,'lj'=>1,'NJ'=>1,'Nj'=>1,'nj'=>1,'DZ'=>1,'Dz'=>1,'dz'=>1,'ʰ'=>1,'ʱ'=>1,'ʲ'=>1,'ʳ'=>1,'ʴ'=>1,'ʵ'=>1,'ʶ'=>1,'ʷ'=>1,'ʸ'=>1,'˘'=>1,'˙'=>1,'˚'=>1,'˛'=>1,'˜'=>1,'˝'=>1,'ˠ'=>1,'ˡ'=>1,'ˢ'=>1,'ˣ'=>1,'ˤ'=>1,'̀'=>1,'́'=>1,'̓'=>1,'̈́'=>1,'ʹ'=>1,'ͺ'=>1,';'=>1,'΄'=>1,'΅'=>1,'·'=>1,'ϐ'=>1,'ϑ'=>1,'ϒ'=>1,'ϓ'=>1,'ϔ'=>1,'ϕ'=>1,'ϖ'=>1,'ϰ'=>1,'ϱ'=>1,'ϲ'=>1,'ϴ'=>1,'ϵ'=>1,'Ϲ'=>1,'և'=>1,'ٵ'=>1,'ٶ'=>1,'ٷ'=>1,'ٸ'=>1,'क़'=>1,'ख़'=>1,'ग़'=>1,'ज़'=>1,'ड़'=>1,'ढ़'=>1,'फ़'=>1,'य़'=>1,'ড়'=>1,'ঢ়'=>1,'য়'=>1,'ਲ਼'=>1,'ਸ਼'=>1,'ਖ਼'=>1,'ਗ਼'=>1,'ਜ਼'=>1,'ਫ਼'=>1,'ଡ଼'=>1,'ଢ଼'=>1,'ำ'=>1,'ຳ'=>1,'ໜ'=>1,'ໝ'=>1,'༌'=>1,'གྷ'=>1,'ཌྷ'=>1,'དྷ'=>1,'བྷ'=>1,'ཛྷ'=>1,'ཀྵ'=>1,'ཱི'=>1,'ཱུ'=>1,'ྲྀ'=>1,'ཷ'=>1,'ླྀ'=>1,'ཹ'=>1,'ཱྀ'=>1,'ྒྷ'=>1,'ྜྷ'=>1,'ྡྷ'=>1,'ྦྷ'=>1,'ྫྷ'=>1,'ྐྵ'=>1,'ჼ'=>1,'ᴬ'=>1,'ᴭ'=>1,'ᴮ'=>1,'ᴰ'=>1,'ᴱ'=>1,'ᴲ'=>1,'ᴳ'=>1,'ᴴ'=>1,'ᴵ'=>1,'ᴶ'=>1,'ᴷ'=>1,'ᴸ'=>1,'ᴹ'=>1,'ᴺ'=>1,'ᴼ'=>1,'ᴽ'=>1,'ᴾ'=>1,'ᴿ'=>1,'ᵀ'=>1,'ᵁ'=>1,'ᵂ'=>1,'ᵃ'=>1,'ᵄ'=>1,'ᵅ'=>1,'ᵆ'=>1,'ᵇ'=>1,'ᵈ'=>1,'ᵉ'=>1,'ᵊ'=>1,'ᵋ'=>1,'ᵌ'=>1,'ᵍ'=>1,'ᵏ'=>1,'ᵐ'=>1,'ᵑ'=>1,'ᵒ'=>1,'ᵓ'=>1,'ᵔ'=>1,'ᵕ'=>1,'ᵖ'=>1,'ᵗ'=>1,'ᵘ'=>1,'ᵙ'=>1,'ᵚ'=>1,'ᵛ'=>1,'ᵜ'=>1,'ᵝ'=>1,'ᵞ'=>1,'ᵟ'=>1,'ᵠ'=>1,'ᵡ'=>1,'ᵢ'=>1,'ᵣ'=>1,'ᵤ'=>1,'ᵥ'=>1,'ᵦ'=>1,'ᵧ'=>1,'ᵨ'=>1,'ᵩ'=>1,'ᵪ'=>1,'ᵸ'=>1,'ᶛ'=>1,'ᶜ'=>1,'ᶝ'=>1,'ᶞ'=>1,'ᶟ'=>1,'ᶠ'=>1,'ᶡ'=>1,'ᶢ'=>1,'ᶣ'=>1,'ᶤ'=>1,'ᶥ'=>1,'ᶦ'=>1,'ᶧ'=>1,'ᶨ'=>1,'ᶩ'=>1,'ᶪ'=>1,'ᶫ'=>1,'ᶬ'=>1,'ᶭ'=>1,'ᶮ'=>1,'ᶯ'=>1,'ᶰ'=>1,'ᶱ'=>1,'ᶲ'=>1,'ᶳ'=>1,'ᶴ'=>1,'ᶵ'=>1,'ᶶ'=>1,'ᶷ'=>1,'ᶸ'=>1,'ᶹ'=>1,'ᶺ'=>1,'ᶻ'=>1,'ᶼ'=>1,'ᶽ'=>1,'ᶾ'=>1,'ᶿ'=>1,'ẚ'=>1,'ẛ'=>1,'ά'=>1,'έ'=>1,'ή'=>1,'ί'=>1,'ό'=>1,'ύ'=>1,'ώ'=>1,'Ά'=>1,'᾽'=>1,'ι'=>1,'᾿'=>1,'῀'=>1,'῁'=>1,'Έ'=>1,'Ή'=>1,'῍'=>1,'῎'=>1,'῏'=>1,'ΐ'=>1,'Ί'=>1,'῝'=>1,'῞'=>1,'῟'=>1,'ΰ'=>1,'Ύ'=>1,'῭'=>1,'΅'=>1,'`'=>1,'Ό'=>1,'Ώ'=>1,'´'=>1,'῾'=>1,' '=>1,' '=>1,' '=>1,' '=>1,' '=>1,' '=>1,' '=>1,' '=>1,' '=>1,' '=>1,' '=>1,'‑'=>1,'‗'=>1,'․'=>1,'‥'=>1,'…'=>1,' '=>1,'″'=>1,'‴'=>1,'‶'=>1,'‷'=>1,'‼'=>1,'‾'=>1,'⁇'=>1,'⁈'=>1,'⁉'=>1,'⁗'=>1,' '=>1,'⁰'=>1,'ⁱ'=>1,'⁴'=>1,'⁵'=>1,'⁶'=>1,'⁷'=>1,'⁸'=>1,'⁹'=>1,'⁺'=>1,'⁻'=>1,'⁼'=>1,'⁽'=>1,'⁾'=>1,'ⁿ'=>1,'₀'=>1,'₁'=>1,'₂'=>1,'₃'=>1,'₄'=>1,'₅'=>1,'₆'=>1,'₇'=>1,'₈'=>1,'₉'=>1,'₊'=>1,'₋'=>1,'₌'=>1,'₍'=>1,'₎'=>1,'ₐ'=>1,'ₑ'=>1,'ₒ'=>1,'ₓ'=>1,'ₔ'=>1,'₨'=>1,'℀'=>1,'℁'=>1,'ℂ'=>1,'℃'=>1,'℅'=>1,'℆'=>1,'ℇ'=>1,'℉'=>1,'ℊ'=>1,'ℋ'=>1,'ℌ'=>1,'ℍ'=>1,'ℎ'=>1,'ℏ'=>1,'ℐ'=>1,'ℑ'=>1,'ℒ'=>1,'ℓ'=>1,'ℕ'=>1,'№'=>1,'ℙ'=>1,'ℚ'=>1,'ℛ'=>1,'ℜ'=>1,'ℝ'=>1,'℠'=>1,'℡'=>1,'™'=>1,'ℤ'=>1,'Ω'=>1,'ℨ'=>1,'K'=>1,'Å'=>1,'ℬ'=>1,'ℭ'=>1,'ℯ'=>1,'ℰ'=>1,'ℱ'=>1,'ℳ'=>1,'ℴ'=>1,'ℵ'=>1,'ℶ'=>1,'ℷ'=>1,'ℸ'=>1,'ℹ'=>1,'℻'=>1,'ℼ'=>1,'ℽ'=>1,'ℾ'=>1,'ℿ'=>1,'⅀'=>1,'ⅅ'=>1,'ⅆ'=>1,'ⅇ'=>1,'ⅈ'=>1,'ⅉ'=>1,'⅓'=>1,'⅔'=>1,'⅕'=>1,'⅖'=>1,'⅗'=>1,'⅘'=>1,'⅙'=>1,'⅚'=>1,'⅛'=>1,'⅜'=>1,'⅝'=>1,'⅞'=>1,'⅟'=>1,'Ⅰ'=>1,'Ⅱ'=>1,'Ⅲ'=>1,'Ⅳ'=>1,'Ⅴ'=>1,'Ⅵ'=>1,'Ⅶ'=>1,'Ⅷ'=>1,'Ⅸ'=>1,'Ⅹ'=>1,'Ⅺ'=>1,'Ⅻ'=>1,'Ⅼ'=>1,'Ⅽ'=>1,'Ⅾ'=>1,'Ⅿ'=>1,'ⅰ'=>1,'ⅱ'=>1,'ⅲ'=>1,'ⅳ'=>1,'ⅴ'=>1,'ⅵ'=>1,'ⅶ'=>1,'ⅷ'=>1,'ⅸ'=>1,'ⅹ'=>1,'ⅺ'=>1,'ⅻ'=>1,'ⅼ'=>1,'ⅽ'=>1,'ⅾ'=>1,'ⅿ'=>1,'∬'=>1,'∭'=>1,'∯'=>1,'∰'=>1,'〈'=>1,'〉'=>1,'①'=>1,'②'=>1,'③'=>1,'④'=>1,'⑤'=>1,'⑥'=>1,'⑦'=>1,'⑧'=>1,'⑨'=>1,'⑩'=>1,'⑪'=>1,'⑫'=>1,'⑬'=>1,'⑭'=>1,'⑮'=>1,'⑯'=>1,'⑰'=>1,'⑱'=>1,'⑲'=>1,'⑳'=>1,'⑴'=>1,'⑵'=>1,'⑶'=>1,'⑷'=>1,'⑸'=>1,'⑹'=>1,'⑺'=>1,'⑻'=>1,'⑼'=>1,'⑽'=>1,'⑾'=>1,'⑿'=>1,'⒀'=>1,'⒁'=>1,'⒂'=>1,'⒃'=>1,'⒄'=>1,'⒅'=>1,'⒆'=>1,'⒇'=>1,'⒈'=>1,'⒉'=>1,'⒊'=>1,'⒋'=>1,'⒌'=>1,'⒍'=>1,'⒎'=>1,'⒏'=>1,'⒐'=>1,'⒑'=>1,'⒒'=>1,'⒓'=>1,'⒔'=>1,'⒕'=>1,'⒖'=>1,'⒗'=>1,'⒘'=>1,'⒙'=>1,'⒚'=>1,'⒛'=>1,'⒜'=>1,'⒝'=>1,'⒞'=>1,'⒟'=>1,'⒠'=>1,'⒡'=>1,'⒢'=>1,'⒣'=>1,'⒤'=>1,'⒥'=>1,'⒦'=>1,'⒧'=>1,'⒨'=>1,'⒩'=>1,'⒪'=>1,'⒫'=>1,'⒬'=>1,'⒭'=>1,'⒮'=>1,'⒯'=>1,'⒰'=>1,'⒱'=>1,'⒲'=>1,'⒳'=>1,'⒴'=>1,'⒵'=>1,'Ⓐ'=>1,'Ⓑ'=>1,'Ⓒ'=>1,'Ⓓ'=>1,'Ⓔ'=>1,'Ⓕ'=>1,'Ⓖ'=>1,'Ⓗ'=>1,'Ⓘ'=>1,'Ⓙ'=>1,'Ⓚ'=>1,'Ⓛ'=>1,'Ⓜ'=>1,'Ⓝ'=>1,'Ⓞ'=>1,'Ⓟ'=>1,'Ⓠ'=>1,'Ⓡ'=>1,'Ⓢ'=>1,'Ⓣ'=>1,'Ⓤ'=>1,'Ⓥ'=>1,'Ⓦ'=>1,'Ⓧ'=>1,'Ⓨ'=>1,'Ⓩ'=>1,'ⓐ'=>1,'ⓑ'=>1,'ⓒ'=>1,'ⓓ'=>1,'ⓔ'=>1,'ⓕ'=>1,'ⓖ'=>1,'ⓗ'=>1,'ⓘ'=>1,'ⓙ'=>1,'ⓚ'=>1,'ⓛ'=>1,'ⓜ'=>1,'ⓝ'=>1,'ⓞ'=>1,'ⓟ'=>1,'ⓠ'=>1,'ⓡ'=>1,'ⓢ'=>1,'ⓣ'=>1,'ⓤ'=>1,'ⓥ'=>1,'ⓦ'=>1,'ⓧ'=>1,'ⓨ'=>1,'ⓩ'=>1,'⓪'=>1,'⨌'=>1,'⩴'=>1,'⩵'=>1,'⩶'=>1,'⫝̸'=>1,'ⵯ'=>1,'⺟'=>1,'⻳'=>1,'⼀'=>1,'⼁'=>1,'⼂'=>1,'⼃'=>1,'⼄'=>1,'⼅'=>1,'⼆'=>1,'⼇'=>1,'⼈'=>1,'⼉'=>1,'⼊'=>1,'⼋'=>1,'⼌'=>1,'⼍'=>1,'⼎'=>1,'⼏'=>1,'⼐'=>1,'⼑'=>1,'⼒'=>1,'⼓'=>1,'⼔'=>1,'⼕'=>1,'⼖'=>1,'⼗'=>1,'⼘'=>1,'⼙'=>1,'⼚'=>1,'⼛'=>1,'⼜'=>1,'⼝'=>1,'⼞'=>1,'⼟'=>1,'⼠'=>1,'⼡'=>1,'⼢'=>1,'⼣'=>1,'⼤'=>1,'⼥'=>1,'⼦'=>1,'⼧'=>1,'⼨'=>1,'⼩'=>1,'⼪'=>1,'⼫'=>1,'⼬'=>1,'⼭'=>1,'⼮'=>1,'⼯'=>1,'⼰'=>1,'⼱'=>1,'⼲'=>1,'⼳'=>1,'⼴'=>1,'⼵'=>1,'⼶'=>1,'⼷'=>1,'⼸'=>1,'⼹'=>1,'⼺'=>1,'⼻'=>1,'⼼'=>1,'⼽'=>1,'⼾'=>1,'⼿'=>1,'⽀'=>1,'⽁'=>1,'⽂'=>1,'⽃'=>1,'⽄'=>1,'⽅'=>1,'⽆'=>1,'⽇'=>1,'⽈'=>1,'⽉'=>1,'⽊'=>1,'⽋'=>1,'⽌'=>1,'⽍'=>1,'⽎'=>1,'⽏'=>1,'⽐'=>1,'⽑'=>1,'⽒'=>1,'⽓'=>1,'⽔'=>1,'⽕'=>1,'⽖'=>1,'⽗'=>1,'⽘'=>1,'⽙'=>1,'⽚'=>1,'⽛'=>1,'⽜'=>1,'⽝'=>1,'⽞'=>1,'⽟'=>1,'⽠'=>1,'⽡'=>1,'⽢'=>1,'⽣'=>1,'⽤'=>1,'⽥'=>1,'⽦'=>1,'⽧'=>1,'⽨'=>1,'⽩'=>1,'⽪'=>1,'⽫'=>1,'⽬'=>1,'⽭'=>1,'⽮'=>1,'⽯'=>1,'⽰'=>1,'⽱'=>1,'⽲'=>1,'⽳'=>1,'⽴'=>1,'⽵'=>1,'⽶'=>1,'⽷'=>1,'⽸'=>1,'⽹'=>1,'⽺'=>1,'⽻'=>1,'⽼'=>1,'⽽'=>1,'⽾'=>1,'⽿'=>1,'⾀'=>1,'⾁'=>1,'⾂'=>1,'⾃'=>1,'⾄'=>1,'⾅'=>1,'⾆'=>1,'⾇'=>1,'⾈'=>1,'⾉'=>1,'⾊'=>1,'⾋'=>1,'⾌'=>1,'⾍'=>1,'⾎'=>1,'⾏'=>1,'⾐'=>1,'⾑'=>1,'⾒'=>1,'⾓'=>1,'⾔'=>1,'⾕'=>1,'⾖'=>1,'⾗'=>1,'⾘'=>1,'⾙'=>1,'⾚'=>1,'⾛'=>1,'⾜'=>1,'⾝'=>1,'⾞'=>1,'⾟'=>1,'⾠'=>1,'⾡'=>1,'⾢'=>1,'⾣'=>1,'⾤'=>1,'⾥'=>1,'⾦'=>1,'⾧'=>1,'⾨'=>1,'⾩'=>1,'⾪'=>1,'⾫'=>1,'⾬'=>1,'⾭'=>1,'⾮'=>1,'⾯'=>1,'⾰'=>1,'⾱'=>1,'⾲'=>1,'⾳'=>1,'⾴'=>1,'⾵'=>1,'⾶'=>1,'⾷'=>1,'⾸'=>1,'⾹'=>1,'⾺'=>1,'⾻'=>1,'⾼'=>1,'⾽'=>1,'⾾'=>1,'⾿'=>1,'⿀'=>1,'⿁'=>1,'⿂'=>1,'⿃'=>1,'⿄'=>1,'⿅'=>1,'⿆'=>1,'⿇'=>1,'⿈'=>1,'⿉'=>1,'⿊'=>1,'⿋'=>1,'⿌'=>1,'⿍'=>1,'⿎'=>1,'⿏'=>1,'⿐'=>1,'⿑'=>1,'⿒'=>1,'⿓'=>1,'⿔'=>1,'⿕'=>1,' '=>1,'〶'=>1,'〸'=>1,'〹'=>1,'〺'=>1,'゛'=>1,'゜'=>1,'ゟ'=>1,'ヿ'=>1,'ㄱ'=>1,'ㄲ'=>1,'ㄳ'=>1,'ㄴ'=>1,'ㄵ'=>1,'ㄶ'=>1,'ㄷ'=>1,'ㄸ'=>1,'ㄹ'=>1,'ㄺ'=>1,'ㄻ'=>1,'ㄼ'=>1,'ㄽ'=>1,'ㄾ'=>1,'ㄿ'=>1,'ㅀ'=>1,'ㅁ'=>1,'ㅂ'=>1,'ㅃ'=>1,'ㅄ'=>1,'ㅅ'=>1,'ㅆ'=>1,'ㅇ'=>1,'ㅈ'=>1,'ㅉ'=>1,'ㅊ'=>1,'ㅋ'=>1,'ㅌ'=>1,'ㅍ'=>1,'ㅎ'=>1,'ㅏ'=>1,'ㅐ'=>1,'ㅑ'=>1,'ㅒ'=>1,'ㅓ'=>1,'ㅔ'=>1,'ㅕ'=>1,'ㅖ'=>1,'ㅗ'=>1,'ㅘ'=>1,'ㅙ'=>1,'ㅚ'=>1,'ㅛ'=>1,'ㅜ'=>1,'ㅝ'=>1,'ㅞ'=>1,'ㅟ'=>1,'ㅠ'=>1,'ㅡ'=>1,'ㅢ'=>1,'ㅣ'=>1,'ㅤ'=>1,'ㅥ'=>1,'ㅦ'=>1,'ㅧ'=>1,'ㅨ'=>1,'ㅩ'=>1,'ㅪ'=>1,'ㅫ'=>1,'ㅬ'=>1,'ㅭ'=>1,'ㅮ'=>1,'ㅯ'=>1,'ㅰ'=>1,'ㅱ'=>1,'ㅲ'=>1,'ㅳ'=>1,'ㅴ'=>1,'ㅵ'=>1,'ㅶ'=>1,'ㅷ'=>1,'ㅸ'=>1,'ㅹ'=>1,'ㅺ'=>1,'ㅻ'=>1,'ㅼ'=>1,'ㅽ'=>1,'ㅾ'=>1,'ㅿ'=>1,'ㆀ'=>1,'ㆁ'=>1,'ㆂ'=>1,'ㆃ'=>1,'ㆄ'=>1,'ㆅ'=>1,'ㆆ'=>1,'ㆇ'=>1,'ㆈ'=>1,'ㆉ'=>1,'ㆊ'=>1,'ㆋ'=>1,'ㆌ'=>1,'ㆍ'=>1,'ㆎ'=>1,'㆒'=>1,'㆓'=>1,'㆔'=>1,'㆕'=>1,'㆖'=>1,'㆗'=>1,'㆘'=>1,'㆙'=>1,'㆚'=>1,'㆛'=>1,'㆜'=>1,'㆝'=>1,'㆞'=>1,'㆟'=>1,'㈀'=>1,'㈁'=>1,'㈂'=>1,'㈃'=>1,'㈄'=>1,'㈅'=>1,'㈆'=>1,'㈇'=>1,'㈈'=>1,'㈉'=>1,'㈊'=>1,'㈋'=>1,'㈌'=>1,'㈍'=>1,'㈎'=>1,'㈏'=>1,'㈐'=>1,'㈑'=>1,'㈒'=>1,'㈓'=>1,'㈔'=>1,'㈕'=>1,'㈖'=>1,'㈗'=>1,'㈘'=>1,'㈙'=>1,'㈚'=>1,'㈛'=>1,'㈜'=>1,'㈝'=>1,'㈞'=>1,'㈠'=>1,'㈡'=>1,'㈢'=>1,'㈣'=>1,'㈤'=>1,'㈥'=>1,'㈦'=>1,'㈧'=>1,'㈨'=>1,'㈩'=>1,'㈪'=>1,'㈫'=>1,'㈬'=>1,'㈭'=>1,'㈮'=>1,'㈯'=>1,'㈰'=>1,'㈱'=>1,'㈲'=>1,'㈳'=>1,'㈴'=>1,'㈵'=>1,'㈶'=>1,'㈷'=>1,'㈸'=>1,'㈹'=>1,'㈺'=>1,'㈻'=>1,'㈼'=>1,'㈽'=>1,'㈾'=>1,'㈿'=>1,'㉀'=>1,'㉁'=>1,'㉂'=>1,'㉃'=>1,'㉐'=>1,'㉑'=>1,'㉒'=>1,'㉓'=>1,'㉔'=>1,'㉕'=>1,'㉖'=>1,'㉗'=>1,'㉘'=>1,'㉙'=>1,'㉚'=>1,'㉛'=>1,'㉜'=>1,'㉝'=>1,'㉞'=>1,'㉟'=>1,'㉠'=>1,'㉡'=>1,'㉢'=>1,'㉣'=>1,'㉤'=>1,'㉥'=>1,'㉦'=>1,'㉧'=>1,'㉨'=>1,'㉩'=>1,'㉪'=>1,'㉫'=>1,'㉬'=>1,'㉭'=>1,'㉮'=>1,'㉯'=>1,'㉰'=>1,'㉱'=>1,'㉲'=>1,'㉳'=>1,'㉴'=>1,'㉵'=>1,'㉶'=>1,'㉷'=>1,'㉸'=>1,'㉹'=>1,'㉺'=>1,'㉻'=>1,'㉼'=>1,'㉽'=>1,'㉾'=>1,'㊀'=>1,'㊁'=>1,'㊂'=>1,'㊃'=>1,'㊄'=>1,'㊅'=>1,'㊆'=>1,'㊇'=>1,'㊈'=>1,'㊉'=>1,'㊊'=>1,'㊋'=>1,'㊌'=>1,'㊍'=>1,'㊎'=>1,'㊏'=>1,'㊐'=>1,'㊑'=>1,'㊒'=>1,'㊓'=>1,'㊔'=>1,'㊕'=>1,'㊖'=>1,'㊗'=>1,'㊘'=>1,'㊙'=>1,'㊚'=>1,'㊛'=>1,'㊜'=>1,'㊝'=>1,'㊞'=>1,'㊟'=>1,'㊠'=>1,'㊡'=>1,'㊢'=>1,'㊣'=>1,'㊤'=>1,'㊥'=>1,'㊦'=>1,'㊧'=>1,'㊨'=>1,'㊩'=>1,'㊪'=>1,'㊫'=>1,'㊬'=>1,'㊭'=>1,'㊮'=>1,'㊯'=>1,'㊰'=>1,'㊱'=>1,'㊲'=>1,'㊳'=>1,'㊴'=>1,'㊵'=>1,'㊶'=>1,'㊷'=>1,'㊸'=>1,'㊹'=>1,'㊺'=>1,'㊻'=>1,'㊼'=>1,'㊽'=>1,'㊾'=>1,'㊿'=>1,'㋀'=>1,'㋁'=>1,'㋂'=>1,'㋃'=>1,'㋄'=>1,'㋅'=>1,'㋆'=>1,'㋇'=>1,'㋈'=>1,'㋉'=>1,'㋊'=>1,'㋋'=>1,'㋌'=>1,'㋍'=>1,'㋎'=>1,'㋏'=>1,'㋐'=>1,'㋑'=>1,'㋒'=>1,'㋓'=>1,'㋔'=>1,'㋕'=>1,'㋖'=>1,'㋗'=>1,'㋘'=>1,'㋙'=>1,'㋚'=>1,'㋛'=>1,'㋜'=>1,'㋝'=>1,'㋞'=>1,'㋟'=>1,'㋠'=>1,'㋡'=>1,'㋢'=>1,'㋣'=>1,'㋤'=>1,'㋥'=>1,'㋦'=>1,'㋧'=>1,'㋨'=>1,'㋩'=>1,'㋪'=>1,'㋫'=>1,'㋬'=>1,'㋭'=>1,'㋮'=>1,'㋯'=>1,'㋰'=>1,'㋱'=>1,'㋲'=>1,'㋳'=>1,'㋴'=>1,'㋵'=>1,'㋶'=>1,'㋷'=>1,'㋸'=>1,'㋹'=>1,'㋺'=>1,'㋻'=>1,'㋼'=>1,'㋽'=>1,'㋾'=>1,'㌀'=>1,'㌁'=>1,'㌂'=>1,'㌃'=>1,'㌄'=>1,'㌅'=>1,'㌆'=>1,'㌇'=>1,'㌈'=>1,'㌉'=>1,'㌊'=>1,'㌋'=>1,'㌌'=>1,'㌍'=>1,'㌎'=>1,'㌏'=>1,'㌐'=>1,'㌑'=>1,'㌒'=>1,'㌓'=>1,'㌔'=>1,'㌕'=>1,'㌖'=>1,'㌗'=>1,'㌘'=>1,'㌙'=>1,'㌚'=>1,'㌛'=>1,'㌜'=>1,'㌝'=>1,'㌞'=>1,'㌟'=>1,'㌠'=>1,'㌡'=>1,'㌢'=>1,'㌣'=>1,'㌤'=>1,'㌥'=>1,'㌦'=>1,'㌧'=>1,'㌨'=>1,'㌩'=>1,'㌪'=>1,'㌫'=>1,'㌬'=>1,'㌭'=>1,'㌮'=>1,'㌯'=>1,'㌰'=>1,'㌱'=>1,'㌲'=>1,'㌳'=>1,'㌴'=>1,'㌵'=>1,'㌶'=>1,'㌷'=>1,'㌸'=>1,'㌹'=>1,'㌺'=>1,'㌻'=>1,'㌼'=>1,'㌽'=>1,'㌾'=>1,'㌿'=>1,'㍀'=>1,'㍁'=>1,'㍂'=>1,'㍃'=>1,'㍄'=>1,'㍅'=>1,'㍆'=>1,'㍇'=>1,'㍈'=>1,'㍉'=>1,'㍊'=>1,'㍋'=>1,'㍌'=>1,'㍍'=>1,'㍎'=>1,'㍏'=>1,'㍐'=>1,'㍑'=>1,'㍒'=>1,'㍓'=>1,'㍔'=>1,'㍕'=>1,'㍖'=>1,'㍗'=>1,'㍘'=>1,'㍙'=>1,'㍚'=>1,'㍛'=>1,'㍜'=>1,'㍝'=>1,'㍞'=>1,'㍟'=>1,'㍠'=>1,'㍡'=>1,'㍢'=>1,'㍣'=>1,'㍤'=>1,'㍥'=>1,'㍦'=>1,'㍧'=>1,'㍨'=>1,'㍩'=>1,'㍪'=>1,'㍫'=>1,'㍬'=>1,'㍭'=>1,'㍮'=>1,'㍯'=>1,'㍰'=>1,'㍱'=>1,'㍲'=>1,'㍳'=>1,'㍴'=>1,'㍵'=>1,'㍶'=>1,'㍷'=>1,'㍸'=>1,'㍹'=>1,'㍺'=>1,'㍻'=>1,'㍼'=>1,'㍽'=>1,'㍾'=>1,'㍿'=>1,'㎀'=>1,'㎁'=>1,'㎂'=>1,'㎃'=>1,'㎄'=>1,'㎅'=>1,'㎆'=>1,'㎇'=>1,'㎈'=>1,'㎉'=>1,'㎊'=>1,'㎋'=>1,'㎌'=>1,'㎍'=>1,'㎎'=>1,'㎏'=>1,'㎐'=>1,'㎑'=>1,'㎒'=>1,'㎓'=>1,'㎔'=>1,'㎕'=>1,'㎖'=>1,'㎗'=>1,'㎘'=>1,'㎙'=>1,'㎚'=>1,'㎛'=>1,'㎜'=>1,'㎝'=>1,'㎞'=>1,'㎟'=>1,'㎠'=>1,'㎡'=>1,'㎢'=>1,'㎣'=>1,'㎤'=>1,'㎥'=>1,'㎦'=>1,'㎧'=>1,'㎨'=>1,'㎩'=>1,'㎪'=>1,'㎫'=>1,'㎬'=>1,'㎭'=>1,'㎮'=>1,'㎯'=>1,'㎰'=>1,'㎱'=>1,'㎲'=>1,'㎳'=>1,'㎴'=>1,'㎵'=>1,'㎶'=>1,'㎷'=>1,'㎸'=>1,'㎹'=>1,'㎺'=>1,'㎻'=>1,'㎼'=>1,'㎽'=>1,'㎾'=>1,'㎿'=>1,'㏀'=>1,'㏁'=>1,'㏂'=>1,'㏃'=>1,'㏄'=>1,'㏅'=>1,'㏆'=>1,'㏇'=>1,'㏈'=>1,'㏉'=>1,'㏊'=>1,'㏋'=>1,'㏌'=>1,'㏍'=>1,'㏎'=>1,'㏏'=>1,'㏐'=>1,'㏑'=>1,'㏒'=>1,'㏓'=>1,'㏔'=>1,'㏕'=>1,'㏖'=>1,'㏗'=>1,'㏘'=>1,'㏙'=>1,'㏚'=>1,'㏛'=>1,'㏜'=>1,'㏝'=>1,'㏞'=>1,'㏟'=>1,'㏠'=>1,'㏡'=>1,'㏢'=>1,'㏣'=>1,'㏤'=>1,'㏥'=>1,'㏦'=>1,'㏧'=>1,'㏨'=>1,'㏩'=>1,'㏪'=>1,'㏫'=>1,'㏬'=>1,'㏭'=>1,'㏮'=>1,'㏯'=>1,'㏰'=>1,'㏱'=>1,'㏲'=>1,'㏳'=>1,'㏴'=>1,'㏵'=>1,'㏶'=>1,'㏷'=>1,'㏸'=>1,'㏹'=>1,'㏺'=>1,'㏻'=>1,'㏼'=>1,'㏽'=>1,'㏾'=>1,'㏿'=>1,'豈'=>1,'更'=>1,'車'=>1,'賈'=>1,'滑'=>1,'串'=>1,'句'=>1,'龜'=>1,'龜'=>1,'契'=>1,'金'=>1,'喇'=>1,'奈'=>1,'懶'=>1,'癩'=>1,'羅'=>1,'蘿'=>1,'螺'=>1,'裸'=>1,'邏'=>1,'樂'=>1,'洛'=>1,'烙'=>1,'珞'=>1,'落'=>1,'酪'=>1,'駱'=>1,'亂'=>1,'卵'=>1,'欄'=>1,'爛'=>1,'蘭'=>1,'鸞'=>1,'嵐'=>1,'濫'=>1,'藍'=>1,'襤'=>1,'拉'=>1,'臘'=>1,'蠟'=>1,'廊'=>1,'朗'=>1,'浪'=>1,'狼'=>1,'郎'=>1,'來'=>1,'冷'=>1,'勞'=>1,'擄'=>1,'櫓'=>1,'爐'=>1,'盧'=>1,'老'=>1,'蘆'=>1,'虜'=>1,'路'=>1,'露'=>1,'魯'=>1,'鷺'=>1,'碌'=>1,'祿'=>1,'綠'=>1,'菉'=>1,'錄'=>1,'鹿'=>1,'論'=>1,'壟'=>1,'弄'=>1,'籠'=>1,'聾'=>1,'牢'=>1,'磊'=>1,'賂'=>1,'雷'=>1,'壘'=>1,'屢'=>1,'樓'=>1,'淚'=>1,'漏'=>1,'累'=>1,'縷'=>1,'陋'=>1,'勒'=>1,'肋'=>1,'凜'=>1,'凌'=>1,'稜'=>1,'綾'=>1,'菱'=>1,'陵'=>1,'讀'=>1,'拏'=>1,'樂'=>1,'諾'=>1,'丹'=>1,'寧'=>1,'怒'=>1,'率'=>1,'異'=>1,'北'=>1,'磻'=>1,'便'=>1,'復'=>1,'不'=>1,'泌'=>1,'數'=>1,'索'=>1,'參'=>1,'塞'=>1,'省'=>1,'葉'=>1,'說'=>1,'殺'=>1,'辰'=>1,'沈'=>1,'拾'=>1,'若'=>1,'掠'=>1,'略'=>1,'亮'=>1,'兩'=>1,'凉'=>1,'梁'=>1,'糧'=>1,'良'=>1,'諒'=>1,'量'=>1,'勵'=>1,'呂'=>1,'女'=>1,'廬'=>1,'旅'=>1,'濾'=>1,'礪'=>1,'閭'=>1,'驪'=>1,'麗'=>1,'黎'=>1,'力'=>1,'曆'=>1,'歷'=>1,'轢'=>1,'年'=>1,'憐'=>1,'戀'=>1,'撚'=>1,'漣'=>1,'煉'=>1,'璉'=>1,'秊'=>1,'練'=>1,'聯'=>1,'輦'=>1,'蓮'=>1,'連'=>1,'鍊'=>1,'列'=>1,'劣'=>1,'咽'=>1,'烈'=>1,'裂'=>1,'說'=>1,'廉'=>1,'念'=>1,'捻'=>1,'殮'=>1,'簾'=>1,'獵'=>1,'令'=>1,'囹'=>1,'寧'=>1,'嶺'=>1,'怜'=>1,'玲'=>1,'瑩'=>1,'羚'=>1,'聆'=>1,'鈴'=>1,'零'=>1,'靈'=>1,'領'=>1,'例'=>1,'禮'=>1,'醴'=>1,'隸'=>1,'惡'=>1,'了'=>1,'僚'=>1,'寮'=>1,'尿'=>1,'料'=>1,'樂'=>1,'燎'=>1,'療'=>1,'蓼'=>1,'遼'=>1,'龍'=>1,'暈'=>1,'阮'=>1,'劉'=>1,'杻'=>1,'柳'=>1,'流'=>1,'溜'=>1,'琉'=>1,'留'=>1,'硫'=>1,'紐'=>1,'類'=>1,'六'=>1,'戮'=>1,'陸'=>1,'倫'=>1,'崙'=>1,'淪'=>1,'輪'=>1,'律'=>1,'慄'=>1,'栗'=>1,'率'=>1,'隆'=>1,'利'=>1,'吏'=>1,'履'=>1,'易'=>1,'李'=>1,'梨'=>1,'泥'=>1,'理'=>1,'痢'=>1,'罹'=>1,'裏'=>1,'裡'=>1,'里'=>1,'離'=>1,'匿'=>1,'溺'=>1,'吝'=>1,'燐'=>1,'璘'=>1,'藺'=>1,'隣'=>1,'鱗'=>1,'麟'=>1,'林'=>1,'淋'=>1,'臨'=>1,'立'=>1,'笠'=>1,'粒'=>1,'狀'=>1,'炙'=>1,'識'=>1,'什'=>1,'茶'=>1,'刺'=>1,'切'=>1,'度'=>1,'拓'=>1,'糖'=>1,'宅'=>1,'洞'=>1,'暴'=>1,'輻'=>1,'行'=>1,'降'=>1,'見'=>1,'廓'=>1,'兀'=>1,'嗀'=>1,'塚'=>1,'晴'=>1,'凞'=>1,'猪'=>1,'益'=>1,'礼'=>1,'神'=>1,'祥'=>1,'福'=>1,'靖'=>1,'精'=>1,'羽'=>1,'蘒'=>1,'諸'=>1,'逸'=>1,'都'=>1,'飯'=>1,'飼'=>1,'館'=>1,'鶴'=>1,'侮'=>1,'僧'=>1,'免'=>1,'勉'=>1,'勤'=>1,'卑'=>1,'喝'=>1,'嘆'=>1,'器'=>1,'塀'=>1,'墨'=>1,'層'=>1,'屮'=>1,'悔'=>1,'慨'=>1,'憎'=>1,'懲'=>1,'敏'=>1,'既'=>1,'暑'=>1,'梅'=>1,'海'=>1,'渚'=>1,'漢'=>1,'煮'=>1,'爫'=>1,'琢'=>1,'碑'=>1,'社'=>1,'祉'=>1,'祈'=>1,'祐'=>1,'祖'=>1,'祝'=>1,'禍'=>1,'禎'=>1,'穀'=>1,'突'=>1,'節'=>1,'練'=>1,'縉'=>1,'繁'=>1,'署'=>1,'者'=>1,'臭'=>1,'艹'=>1,'艹'=>1,'著'=>1,'褐'=>1,'視'=>1,'謁'=>1,'謹'=>1,'賓'=>1,'贈'=>1,'辶'=>1,'逸'=>1,'難'=>1,'響'=>1,'頻'=>1,'並'=>1,'况'=>1,'全'=>1,'侀'=>1,'充'=>1,'冀'=>1,'勇'=>1,'勺'=>1,'喝'=>1,'啕'=>1,'喙'=>1,'嗢'=>1,'塚'=>1,'墳'=>1,'奄'=>1,'奔'=>1,'婢'=>1,'嬨'=>1,'廒'=>1,'廙'=>1,'彩'=>1,'徭'=>1,'惘'=>1,'慎'=>1,'愈'=>1,'憎'=>1,'慠'=>1,'懲'=>1,'戴'=>1,'揄'=>1,'搜'=>1,'摒'=>1,'敖'=>1,'晴'=>1,'朗'=>1,'望'=>1,'杖'=>1,'歹'=>1,'殺'=>1,'流'=>1,'滛'=>1,'滋'=>1,'漢'=>1,'瀞'=>1,'煮'=>1,'瞧'=>1,'爵'=>1,'犯'=>1,'猪'=>1,'瑱'=>1,'甆'=>1,'画'=>1,'瘝'=>1,'瘟'=>1,'益'=>1,'盛'=>1,'直'=>1,'睊'=>1,'着'=>1,'磌'=>1,'窱'=>1,'節'=>1,'类'=>1,'絛'=>1,'練'=>1,'缾'=>1,'者'=>1,'荒'=>1,'華'=>1,'蝹'=>1,'襁'=>1,'覆'=>1,'視'=>1,'調'=>1,'諸'=>1,'請'=>1,'謁'=>1,'諾'=>1,'諭'=>1,'謹'=>1,'變'=>1,'贈'=>1,'輸'=>1,'遲'=>1,'醙'=>1,'鉶'=>1,'陼'=>1,'難'=>1,'靖'=>1,'韛'=>1,'響'=>1,'頋'=>1,'頻'=>1,'鬒'=>1,'龜'=>1,'𢡊'=>1,'𢡄'=>1,'𣏕'=>1,'㮝'=>1,'䀘'=>1,'䀹'=>1,'𥉉'=>1,'𥳐'=>1,'𧻓'=>1,'齃'=>1,'龎'=>1,'ff'=>1,'fi'=>1,'fl'=>1,'ffi'=>1,'ffl'=>1,'ſt'=>1,'st'=>1,'ﬓ'=>1,'ﬔ'=>1,'ﬕ'=>1,'ﬖ'=>1,'ﬗ'=>1,'יִ'=>1,'ײַ'=>1,'ﬠ'=>1,'ﬡ'=>1,'ﬢ'=>1,'ﬣ'=>1,'ﬤ'=>1,'ﬥ'=>1,'ﬦ'=>1,'ﬧ'=>1,'ﬨ'=>1,'﬩'=>1,'שׁ'=>1,'שׂ'=>1,'שּׁ'=>1,'שּׂ'=>1,'אַ'=>1,'אָ'=>1,'אּ'=>1,'בּ'=>1,'גּ'=>1,'דּ'=>1,'הּ'=>1,'וּ'=>1,'זּ'=>1,'טּ'=>1,'יּ'=>1,'ךּ'=>1,'כּ'=>1,'לּ'=>1,'מּ'=>1,'נּ'=>1,'סּ'=>1,'ףּ'=>1,'פּ'=>1,'צּ'=>1,'קּ'=>1,'רּ'=>1,'שּ'=>1,'תּ'=>1,'וֹ'=>1,'בֿ'=>1,'כֿ'=>1,'פֿ'=>1,'ﭏ'=>1,'ﭐ'=>1,'ﭑ'=>1,'ﭒ'=>1,'ﭓ'=>1,'ﭔ'=>1,'ﭕ'=>1,'ﭖ'=>1,'ﭗ'=>1,'ﭘ'=>1,'ﭙ'=>1,'ﭚ'=>1,'ﭛ'=>1,'ﭜ'=>1,'ﭝ'=>1,'ﭞ'=>1,'ﭟ'=>1,'ﭠ'=>1,'ﭡ'=>1,'ﭢ'=>1,'ﭣ'=>1,'ﭤ'=>1,'ﭥ'=>1,'ﭦ'=>1,'ﭧ'=>1,'ﭨ'=>1,'ﭩ'=>1,'ﭪ'=>1,'ﭫ'=>1,'ﭬ'=>1,'ﭭ'=>1,'ﭮ'=>1,'ﭯ'=>1,'ﭰ'=>1,'ﭱ'=>1,'ﭲ'=>1,'ﭳ'=>1,'ﭴ'=>1,'ﭵ'=>1,'ﭶ'=>1,'ﭷ'=>1,'ﭸ'=>1,'ﭹ'=>1,'ﭺ'=>1,'ﭻ'=>1,'ﭼ'=>1,'ﭽ'=>1,'ﭾ'=>1,'ﭿ'=>1,'ﮀ'=>1,'ﮁ'=>1,'ﮂ'=>1,'ﮃ'=>1,'ﮄ'=>1,'ﮅ'=>1,'ﮆ'=>1,'ﮇ'=>1,'ﮈ'=>1,'ﮉ'=>1,'ﮊ'=>1,'ﮋ'=>1,'ﮌ'=>1,'ﮍ'=>1,'ﮎ'=>1,'ﮏ'=>1,'ﮐ'=>1,'ﮑ'=>1,'ﮒ'=>1,'ﮓ'=>1,'ﮔ'=>1,'ﮕ'=>1,'ﮖ'=>1,'ﮗ'=>1,'ﮘ'=>1,'ﮙ'=>1,'ﮚ'=>1,'ﮛ'=>1,'ﮜ'=>1,'ﮝ'=>1,'ﮞ'=>1,'ﮟ'=>1,'ﮠ'=>1,'ﮡ'=>1,'ﮢ'=>1,'ﮣ'=>1,'ﮤ'=>1,'ﮥ'=>1,'ﮦ'=>1,'ﮧ'=>1,'ﮨ'=>1,'ﮩ'=>1,'ﮪ'=>1,'ﮫ'=>1,'ﮬ'=>1,'ﮭ'=>1,'ﮮ'=>1,'ﮯ'=>1,'ﮰ'=>1,'ﮱ'=>1,'ﯓ'=>1,'ﯔ'=>1,'ﯕ'=>1,'ﯖ'=>1,'ﯗ'=>1,'ﯘ'=>1,'ﯙ'=>1,'ﯚ'=>1,'ﯛ'=>1,'ﯜ'=>1,'ﯝ'=>1,'ﯞ'=>1,'ﯟ'=>1,'ﯠ'=>1,'ﯡ'=>1,'ﯢ'=>1,'ﯣ'=>1,'ﯤ'=>1,'ﯥ'=>1,'ﯦ'=>1,'ﯧ'=>1,'ﯨ'=>1,'ﯩ'=>1,'ﯪ'=>1,'ﯫ'=>1,'ﯬ'=>1,'ﯭ'=>1,'ﯮ'=>1,'ﯯ'=>1,'ﯰ'=>1,'ﯱ'=>1,'ﯲ'=>1,'ﯳ'=>1,'ﯴ'=>1,'ﯵ'=>1,'ﯶ'=>1,'ﯷ'=>1,'ﯸ'=>1,'ﯹ'=>1,'ﯺ'=>1,'ﯻ'=>1,'ﯼ'=>1,'ﯽ'=>1,'ﯾ'=>1,'ﯿ'=>1,'ﰀ'=>1,'ﰁ'=>1,'ﰂ'=>1,'ﰃ'=>1,'ﰄ'=>1,'ﰅ'=>1,'ﰆ'=>1,'ﰇ'=>1,'ﰈ'=>1,'ﰉ'=>1,'ﰊ'=>1,'ﰋ'=>1,'ﰌ'=>1,'ﰍ'=>1,'ﰎ'=>1,'ﰏ'=>1,'ﰐ'=>1,'ﰑ'=>1,'ﰒ'=>1,'ﰓ'=>1,'ﰔ'=>1,'ﰕ'=>1,'ﰖ'=>1,'ﰗ'=>1,'ﰘ'=>1,'ﰙ'=>1,'ﰚ'=>1,'ﰛ'=>1,'ﰜ'=>1,'ﰝ'=>1,'ﰞ'=>1,'ﰟ'=>1,'ﰠ'=>1,'ﰡ'=>1,'ﰢ'=>1,'ﰣ'=>1,'ﰤ'=>1,'ﰥ'=>1,'ﰦ'=>1,'ﰧ'=>1,'ﰨ'=>1,'ﰩ'=>1,'ﰪ'=>1,'ﰫ'=>1,'ﰬ'=>1,'ﰭ'=>1,'ﰮ'=>1,'ﰯ'=>1,'ﰰ'=>1,'ﰱ'=>1,'ﰲ'=>1,'ﰳ'=>1,'ﰴ'=>1,'ﰵ'=>1,'ﰶ'=>1,'ﰷ'=>1,'ﰸ'=>1,'ﰹ'=>1,'ﰺ'=>1,'ﰻ'=>1,'ﰼ'=>1,'ﰽ'=>1,'ﰾ'=>1,'ﰿ'=>1,'ﱀ'=>1,'ﱁ'=>1,'ﱂ'=>1,'ﱃ'=>1,'ﱄ'=>1,'ﱅ'=>1,'ﱆ'=>1,'ﱇ'=>1,'ﱈ'=>1,'ﱉ'=>1,'ﱊ'=>1,'ﱋ'=>1,'ﱌ'=>1,'ﱍ'=>1,'ﱎ'=>1,'ﱏ'=>1,'ﱐ'=>1,'ﱑ'=>1,'ﱒ'=>1,'ﱓ'=>1,'ﱔ'=>1,'ﱕ'=>1,'ﱖ'=>1,'ﱗ'=>1,'ﱘ'=>1,'ﱙ'=>1,'ﱚ'=>1,'ﱛ'=>1,'ﱜ'=>1,'ﱝ'=>1,'ﱞ'=>1,'ﱟ'=>1,'ﱠ'=>1,'ﱡ'=>1,'ﱢ'=>1,'ﱣ'=>1,'ﱤ'=>1,'ﱥ'=>1,'ﱦ'=>1,'ﱧ'=>1,'ﱨ'=>1,'ﱩ'=>1,'ﱪ'=>1,'ﱫ'=>1,'ﱬ'=>1,'ﱭ'=>1,'ﱮ'=>1,'ﱯ'=>1,'ﱰ'=>1,'ﱱ'=>1,'ﱲ'=>1,'ﱳ'=>1,'ﱴ'=>1,'ﱵ'=>1,'ﱶ'=>1,'ﱷ'=>1,'ﱸ'=>1,'ﱹ'=>1,'ﱺ'=>1,'ﱻ'=>1,'ﱼ'=>1,'ﱽ'=>1,'ﱾ'=>1,'ﱿ'=>1,'ﲀ'=>1,'ﲁ'=>1,'ﲂ'=>1,'ﲃ'=>1,'ﲄ'=>1,'ﲅ'=>1,'ﲆ'=>1,'ﲇ'=>1,'ﲈ'=>1,'ﲉ'=>1,'ﲊ'=>1,'ﲋ'=>1,'ﲌ'=>1,'ﲍ'=>1,'ﲎ'=>1,'ﲏ'=>1,'ﲐ'=>1,'ﲑ'=>1,'ﲒ'=>1,'ﲓ'=>1,'ﲔ'=>1,'ﲕ'=>1,'ﲖ'=>1,'ﲗ'=>1,'ﲘ'=>1,'ﲙ'=>1,'ﲚ'=>1,'ﲛ'=>1,'ﲜ'=>1,'ﲝ'=>1,'ﲞ'=>1,'ﲟ'=>1,'ﲠ'=>1,'ﲡ'=>1,'ﲢ'=>1,'ﲣ'=>1,'ﲤ'=>1,'ﲥ'=>1,'ﲦ'=>1,'ﲧ'=>1,'ﲨ'=>1,'ﲩ'=>1,'ﲪ'=>1,'ﲫ'=>1,'ﲬ'=>1,'ﲭ'=>1,'ﲮ'=>1,'ﲯ'=>1,'ﲰ'=>1,'ﲱ'=>1,'ﲲ'=>1,'ﲳ'=>1,'ﲴ'=>1,'ﲵ'=>1,'ﲶ'=>1,'ﲷ'=>1,'ﲸ'=>1,'ﲹ'=>1,'ﲺ'=>1,'ﲻ'=>1,'ﲼ'=>1,'ﲽ'=>1,'ﲾ'=>1,'ﲿ'=>1,'ﳀ'=>1,'ﳁ'=>1,'ﳂ'=>1,'ﳃ'=>1,'ﳄ'=>1,'ﳅ'=>1,'ﳆ'=>1,'ﳇ'=>1,'ﳈ'=>1,'ﳉ'=>1,'ﳊ'=>1,'ﳋ'=>1,'ﳌ'=>1,'ﳍ'=>1,'ﳎ'=>1,'ﳏ'=>1,'ﳐ'=>1,'ﳑ'=>1,'ﳒ'=>1,'ﳓ'=>1,'ﳔ'=>1,'ﳕ'=>1,'ﳖ'=>1,'ﳗ'=>1,'ﳘ'=>1,'ﳙ'=>1,'ﳚ'=>1,'ﳛ'=>1,'ﳜ'=>1,'ﳝ'=>1,'ﳞ'=>1,'ﳟ'=>1,'ﳠ'=>1,'ﳡ'=>1,'ﳢ'=>1,'ﳣ'=>1,'ﳤ'=>1,'ﳥ'=>1,'ﳦ'=>1,'ﳧ'=>1,'ﳨ'=>1,'ﳩ'=>1,'ﳪ'=>1,'ﳫ'=>1,'ﳬ'=>1,'ﳭ'=>1,'ﳮ'=>1,'ﳯ'=>1,'ﳰ'=>1,'ﳱ'=>1,'ﳲ'=>1,'ﳳ'=>1,'ﳴ'=>1,'ﳵ'=>1,'ﳶ'=>1,'ﳷ'=>1,'ﳸ'=>1,'ﳹ'=>1,'ﳺ'=>1,'ﳻ'=>1,'ﳼ'=>1,'ﳽ'=>1,'ﳾ'=>1,'ﳿ'=>1,'ﴀ'=>1,'ﴁ'=>1,'ﴂ'=>1,'ﴃ'=>1,'ﴄ'=>1,'ﴅ'=>1,'ﴆ'=>1,'ﴇ'=>1,'ﴈ'=>1,'ﴉ'=>1,'ﴊ'=>1,'ﴋ'=>1,'ﴌ'=>1,'ﴍ'=>1,'ﴎ'=>1,'ﴏ'=>1,'ﴐ'=>1,'ﴑ'=>1,'ﴒ'=>1,'ﴓ'=>1,'ﴔ'=>1,'ﴕ'=>1,'ﴖ'=>1,'ﴗ'=>1,'ﴘ'=>1,'ﴙ'=>1,'ﴚ'=>1,'ﴛ'=>1,'ﴜ'=>1,'ﴝ'=>1,'ﴞ'=>1,'ﴟ'=>1,'ﴠ'=>1,'ﴡ'=>1,'ﴢ'=>1,'ﴣ'=>1,'ﴤ'=>1,'ﴥ'=>1,'ﴦ'=>1,'ﴧ'=>1,'ﴨ'=>1,'ﴩ'=>1,'ﴪ'=>1,'ﴫ'=>1,'ﴬ'=>1,'ﴭ'=>1,'ﴮ'=>1,'ﴯ'=>1,'ﴰ'=>1,'ﴱ'=>1,'ﴲ'=>1,'ﴳ'=>1,'ﴴ'=>1,'ﴵ'=>1,'ﴶ'=>1,'ﴷ'=>1,'ﴸ'=>1,'ﴹ'=>1,'ﴺ'=>1,'ﴻ'=>1,'ﴼ'=>1,'ﴽ'=>1,'ﵐ'=>1,'ﵑ'=>1,'ﵒ'=>1,'ﵓ'=>1,'ﵔ'=>1,'ﵕ'=>1,'ﵖ'=>1,'ﵗ'=>1,'ﵘ'=>1,'ﵙ'=>1,'ﵚ'=>1,'ﵛ'=>1,'ﵜ'=>1,'ﵝ'=>1,'ﵞ'=>1,'ﵟ'=>1,'ﵠ'=>1,'ﵡ'=>1,'ﵢ'=>1,'ﵣ'=>1,'ﵤ'=>1,'ﵥ'=>1,'ﵦ'=>1,'ﵧ'=>1,'ﵨ'=>1,'ﵩ'=>1,'ﵪ'=>1,'ﵫ'=>1,'ﵬ'=>1,'ﵭ'=>1,'ﵮ'=>1,'ﵯ'=>1,'ﵰ'=>1,'ﵱ'=>1,'ﵲ'=>1,'ﵳ'=>1,'ﵴ'=>1,'ﵵ'=>1,'ﵶ'=>1,'ﵷ'=>1,'ﵸ'=>1,'ﵹ'=>1,'ﵺ'=>1,'ﵻ'=>1,'ﵼ'=>1,'ﵽ'=>1,'ﵾ'=>1,'ﵿ'=>1,'ﶀ'=>1,'ﶁ'=>1,'ﶂ'=>1,'ﶃ'=>1,'ﶄ'=>1,'ﶅ'=>1,'ﶆ'=>1,'ﶇ'=>1,'ﶈ'=>1,'ﶉ'=>1,'ﶊ'=>1,'ﶋ'=>1,'ﶌ'=>1,'ﶍ'=>1,'ﶎ'=>1,'ﶏ'=>1,'ﶒ'=>1,'ﶓ'=>1,'ﶔ'=>1,'ﶕ'=>1,'ﶖ'=>1,'ﶗ'=>1,'ﶘ'=>1,'ﶙ'=>1,'ﶚ'=>1,'ﶛ'=>1,'ﶜ'=>1,'ﶝ'=>1,'ﶞ'=>1,'ﶟ'=>1,'ﶠ'=>1,'ﶡ'=>1,'ﶢ'=>1,'ﶣ'=>1,'ﶤ'=>1,'ﶥ'=>1,'ﶦ'=>1,'ﶧ'=>1,'ﶨ'=>1,'ﶩ'=>1,'ﶪ'=>1,'ﶫ'=>1,'ﶬ'=>1,'ﶭ'=>1,'ﶮ'=>1,'ﶯ'=>1,'ﶰ'=>1,'ﶱ'=>1,'ﶲ'=>1,'ﶳ'=>1,'ﶴ'=>1,'ﶵ'=>1,'ﶶ'=>1,'ﶷ'=>1,'ﶸ'=>1,'ﶹ'=>1,'ﶺ'=>1,'ﶻ'=>1,'ﶼ'=>1,'ﶽ'=>1,'ﶾ'=>1,'ﶿ'=>1,'ﷀ'=>1,'ﷁ'=>1,'ﷂ'=>1,'ﷃ'=>1,'ﷄ'=>1,'ﷅ'=>1,'ﷆ'=>1,'ﷇ'=>1,'ﷰ'=>1,'ﷱ'=>1,'ﷲ'=>1,'ﷳ'=>1,'ﷴ'=>1,'ﷵ'=>1,'ﷶ'=>1,'ﷷ'=>1,'ﷸ'=>1,'ﷹ'=>1,'ﷺ'=>1,'ﷻ'=>1,'﷼'=>1,'︐'=>1,'︑'=>1,'︒'=>1,'︓'=>1,'︔'=>1,'︕'=>1,'︖'=>1,'︗'=>1,'︘'=>1,'︙'=>1,'︰'=>1,'︱'=>1,'︲'=>1,'︳'=>1,'︴'=>1,'︵'=>1,'︶'=>1,'︷'=>1,'︸'=>1,'︹'=>1,'︺'=>1,'︻'=>1,'︼'=>1,'︽'=>1,'︾'=>1,'︿'=>1,'﹀'=>1,'﹁'=>1,'﹂'=>1,'﹃'=>1,'﹄'=>1,'﹇'=>1,'﹈'=>1,'﹉'=>1,'﹊'=>1,'﹋'=>1,'﹌'=>1,'﹍'=>1,'﹎'=>1,'﹏'=>1,'﹐'=>1,'﹑'=>1,'﹒'=>1,'﹔'=>1,'﹕'=>1,'﹖'=>1,'﹗'=>1,'﹘'=>1,'﹙'=>1,'﹚'=>1,'﹛'=>1,'﹜'=>1,'﹝'=>1,'﹞'=>1,'﹟'=>1,'﹠'=>1,'﹡'=>1,'﹢'=>1,'﹣'=>1,'﹤'=>1,'﹥'=>1,'﹦'=>1,'﹨'=>1,'﹩'=>1,'﹪'=>1,'﹫'=>1,'ﹰ'=>1,'ﹱ'=>1,'ﹲ'=>1,'ﹴ'=>1,'ﹶ'=>1,'ﹷ'=>1,'ﹸ'=>1,'ﹹ'=>1,'ﹺ'=>1,'ﹻ'=>1,'ﹼ'=>1,'ﹽ'=>1,'ﹾ'=>1,'ﹿ'=>1,'ﺀ'=>1,'ﺁ'=>1,'ﺂ'=>1,'ﺃ'=>1,'ﺄ'=>1,'ﺅ'=>1,'ﺆ'=>1,'ﺇ'=>1,'ﺈ'=>1,'ﺉ'=>1,'ﺊ'=>1,'ﺋ'=>1,'ﺌ'=>1,'ﺍ'=>1,'ﺎ'=>1,'ﺏ'=>1,'ﺐ'=>1,'ﺑ'=>1,'ﺒ'=>1,'ﺓ'=>1,'ﺔ'=>1,'ﺕ'=>1,'ﺖ'=>1,'ﺗ'=>1,'ﺘ'=>1,'ﺙ'=>1,'ﺚ'=>1,'ﺛ'=>1,'ﺜ'=>1,'ﺝ'=>1,'ﺞ'=>1,'ﺟ'=>1,'ﺠ'=>1,'ﺡ'=>1,'ﺢ'=>1,'ﺣ'=>1,'ﺤ'=>1,'ﺥ'=>1,'ﺦ'=>1,'ﺧ'=>1,'ﺨ'=>1,'ﺩ'=>1,'ﺪ'=>1,'ﺫ'=>1,'ﺬ'=>1,'ﺭ'=>1,'ﺮ'=>1,'ﺯ'=>1,'ﺰ'=>1,'ﺱ'=>1,'ﺲ'=>1,'ﺳ'=>1,'ﺴ'=>1,'ﺵ'=>1,'ﺶ'=>1,'ﺷ'=>1,'ﺸ'=>1,'ﺹ'=>1,'ﺺ'=>1,'ﺻ'=>1,'ﺼ'=>1,'ﺽ'=>1,'ﺾ'=>1,'ﺿ'=>1,'ﻀ'=>1,'ﻁ'=>1,'ﻂ'=>1,'ﻃ'=>1,'ﻄ'=>1,'ﻅ'=>1,'ﻆ'=>1,'ﻇ'=>1,'ﻈ'=>1,'ﻉ'=>1,'ﻊ'=>1,'ﻋ'=>1,'ﻌ'=>1,'ﻍ'=>1,'ﻎ'=>1,'ﻏ'=>1,'ﻐ'=>1,'ﻑ'=>1,'ﻒ'=>1,'ﻓ'=>1,'ﻔ'=>1,'ﻕ'=>1,'ﻖ'=>1,'ﻗ'=>1,'ﻘ'=>1,'ﻙ'=>1,'ﻚ'=>1,'ﻛ'=>1,'ﻜ'=>1,'ﻝ'=>1,'ﻞ'=>1,'ﻟ'=>1,'ﻠ'=>1,'ﻡ'=>1,'ﻢ'=>1,'ﻣ'=>1,'ﻤ'=>1,'ﻥ'=>1,'ﻦ'=>1,'ﻧ'=>1,'ﻨ'=>1,'ﻩ'=>1,'ﻪ'=>1,'ﻫ'=>1,'ﻬ'=>1,'ﻭ'=>1,'ﻮ'=>1,'ﻯ'=>1,'ﻰ'=>1,'ﻱ'=>1,'ﻲ'=>1,'ﻳ'=>1,'ﻴ'=>1,'ﻵ'=>1,'ﻶ'=>1,'ﻷ'=>1,'ﻸ'=>1,'ﻹ'=>1,'ﻺ'=>1,'ﻻ'=>1,'ﻼ'=>1,'!'=>1,'"'=>1,'#'=>1,'$'=>1,'%'=>1,'&'=>1,'''=>1,'('=>1,')'=>1,'*'=>1,'+'=>1,','=>1,'-'=>1,'.'=>1,'/'=>1,'0'=>1,'1'=>1,'2'=>1,'3'=>1,'4'=>1,'5'=>1,'6'=>1,'7'=>1,'8'=>1,'9'=>1,':'=>1,';'=>1,'<'=>1,'='=>1,'>'=>1,'?'=>1,'@'=>1,'A'=>1,'B'=>1,'C'=>1,'D'=>1,'E'=>1,'F'=>1,'G'=>1,'H'=>1,'I'=>1,'J'=>1,'K'=>1,'L'=>1,'M'=>1,'N'=>1,'O'=>1,'P'=>1,'Q'=>1,'R'=>1,'S'=>1,'T'=>1,'U'=>1,'V'=>1,'W'=>1,'X'=>1,'Y'=>1,'Z'=>1,'['=>1,'\'=>1,']'=>1,'^'=>1,'_'=>1,'`'=>1,'a'=>1,'b'=>1,'c'=>1,'d'=>1,'e'=>1,'f'=>1,'g'=>1,'h'=>1,'i'=>1,'j'=>1,'k'=>1,'l'=>1,'m'=>1,'n'=>1,'o'=>1,'p'=>1,'q'=>1,'r'=>1,'s'=>1,'t'=>1,'u'=>1,'v'=>1,'w'=>1,'x'=>1,'y'=>1,'z'=>1,'{'=>1,'|'=>1,'}'=>1,'~'=>1,'⦅'=>1,'⦆'=>1,'。'=>1,'「'=>1,'」'=>1,'、'=>1,'・'=>1,'ヲ'=>1,'ァ'=>1,'ィ'=>1,'ゥ'=>1,'ェ'=>1,'ォ'=>1,'ャ'=>1,'ュ'=>1,'ョ'=>1,'ッ'=>1,'ー'=>1,'ア'=>1,'イ'=>1,'ウ'=>1,'エ'=>1,'オ'=>1,'カ'=>1,'キ'=>1,'ク'=>1,'ケ'=>1,'コ'=>1,'サ'=>1,'シ'=>1,'ス'=>1,'セ'=>1,'ソ'=>1,'タ'=>1,'チ'=>1,'ツ'=>1,'テ'=>1,'ト'=>1,'ナ'=>1,'ニ'=>1,'ヌ'=>1,'ネ'=>1,'ノ'=>1,'ハ'=>1,'ヒ'=>1,'フ'=>1,'ヘ'=>1,'ホ'=>1,'マ'=>1,'ミ'=>1,'ム'=>1,'メ'=>1,'モ'=>1,'ヤ'=>1,'ユ'=>1,'ヨ'=>1,'ラ'=>1,'リ'=>1,'ル'=>1,'レ'=>1,'ロ'=>1,'ワ'=>1,'ン'=>1,'゙'=>1,'゚'=>1,'ᅠ'=>1,'ᄀ'=>1,'ᄁ'=>1,'ᆪ'=>1,'ᄂ'=>1,'ᆬ'=>1,'ᆭ'=>1,'ᄃ'=>1,'ᄄ'=>1,'ᄅ'=>1,'ᆰ'=>1,'ᆱ'=>1,'ᆲ'=>1,'ᆳ'=>1,'ᆴ'=>1,'ᆵ'=>1,'ᄚ'=>1,'ᄆ'=>1,'ᄇ'=>1,'ᄈ'=>1,'ᄡ'=>1,'ᄉ'=>1,'ᄊ'=>1,'ᄋ'=>1,'ᄌ'=>1,'ᄍ'=>1,'ᄎ'=>1,'ᄏ'=>1,'ᄐ'=>1,'ᄑ'=>1,'ᄒ'=>1,'ᅡ'=>1,'ᅢ'=>1,'ᅣ'=>1,'ᅤ'=>1,'ᅥ'=>1,'ᅦ'=>1,'ᅧ'=>1,'ᅨ'=>1,'ᅩ'=>1,'ᅪ'=>1,'ᅫ'=>1,'ᅬ'=>1,'ᅭ'=>1,'ᅮ'=>1,'ᅯ'=>1,'ᅰ'=>1,'ᅱ'=>1,'ᅲ'=>1,'ᅳ'=>1,'ᅴ'=>1,'ᅵ'=>1,'¢'=>1,'£'=>1,'¬'=>1,' ̄'=>1,'¦'=>1,'¥'=>1,'₩'=>1,'│'=>1,'←'=>1,'↑'=>1,'→'=>1,'↓'=>1,'■'=>1,'○'=>1,'𝅗𝅥'=>1,'𝅘𝅥'=>1,'𝅘𝅥𝅮'=>1,'𝅘𝅥𝅯'=>1,'𝅘𝅥𝅰'=>1,'𝅘𝅥𝅱'=>1,'𝅘𝅥𝅲'=>1,'𝆹𝅥'=>1,'𝆺𝅥'=>1,'𝆹𝅥𝅮'=>1,'𝆺𝅥𝅮'=>1,'𝆹𝅥𝅯'=>1,'𝆺𝅥𝅯'=>1,'𝐀'=>1,'𝐁'=>1,'𝐂'=>1,'𝐃'=>1,'𝐄'=>1,'𝐅'=>1,'𝐆'=>1,'𝐇'=>1,'𝐈'=>1,'𝐉'=>1,'𝐊'=>1,'𝐋'=>1,'𝐌'=>1,'𝐍'=>1,'𝐎'=>1,'𝐏'=>1,'𝐐'=>1,'𝐑'=>1,'𝐒'=>1,'𝐓'=>1,'𝐔'=>1,'𝐕'=>1,'𝐖'=>1,'𝐗'=>1,'𝐘'=>1,'𝐙'=>1,'𝐚'=>1,'𝐛'=>1,'𝐜'=>1,'𝐝'=>1,'𝐞'=>1,'𝐟'=>1,'𝐠'=>1,'𝐡'=>1,'𝐢'=>1,'𝐣'=>1,'𝐤'=>1,'𝐥'=>1,'𝐦'=>1,'𝐧'=>1,'𝐨'=>1,'𝐩'=>1,'𝐪'=>1,'𝐫'=>1,'𝐬'=>1,'𝐭'=>1,'𝐮'=>1,'𝐯'=>1,'𝐰'=>1,'𝐱'=>1,'𝐲'=>1,'𝐳'=>1,'𝐴'=>1,'𝐵'=>1,'𝐶'=>1,'𝐷'=>1,'𝐸'=>1,'𝐹'=>1,'𝐺'=>1,'𝐻'=>1,'𝐼'=>1,'𝐽'=>1,'𝐾'=>1,'𝐿'=>1,'𝑀'=>1,'𝑁'=>1,'𝑂'=>1,'𝑃'=>1,'𝑄'=>1,'𝑅'=>1,'𝑆'=>1,'𝑇'=>1,'𝑈'=>1,'𝑉'=>1,'𝑊'=>1,'𝑋'=>1,'𝑌'=>1,'𝑍'=>1,'𝑎'=>1,'𝑏'=>1,'𝑐'=>1,'𝑑'=>1,'𝑒'=>1,'𝑓'=>1,'𝑔'=>1,'𝑖'=>1,'𝑗'=>1,'𝑘'=>1,'𝑙'=>1,'𝑚'=>1,'𝑛'=>1,'𝑜'=>1,'𝑝'=>1,'𝑞'=>1,'𝑟'=>1,'𝑠'=>1,'𝑡'=>1,'𝑢'=>1,'𝑣'=>1,'𝑤'=>1,'𝑥'=>1,'𝑦'=>1,'𝑧'=>1,'𝑨'=>1,'𝑩'=>1,'𝑪'=>1,'𝑫'=>1,'𝑬'=>1,'𝑭'=>1,'𝑮'=>1,'𝑯'=>1,'𝑰'=>1,'𝑱'=>1,'𝑲'=>1,'𝑳'=>1,'𝑴'=>1,'𝑵'=>1,'𝑶'=>1,'𝑷'=>1,'𝑸'=>1,'𝑹'=>1,'𝑺'=>1,'𝑻'=>1,'𝑼'=>1,'𝑽'=>1,'𝑾'=>1,'𝑿'=>1,'𝒀'=>1,'𝒁'=>1,'𝒂'=>1,'𝒃'=>1,'𝒄'=>1,'𝒅'=>1,'𝒆'=>1,'𝒇'=>1,'𝒈'=>1,'𝒉'=>1,'𝒊'=>1,'𝒋'=>1,'𝒌'=>1,'𝒍'=>1,'𝒎'=>1,'𝒏'=>1,'𝒐'=>1,'𝒑'=>1,'𝒒'=>1,'𝒓'=>1,'𝒔'=>1,'𝒕'=>1,'𝒖'=>1,'𝒗'=>1,'𝒘'=>1,'𝒙'=>1,'𝒚'=>1,'𝒛'=>1,'𝒜'=>1,'𝒞'=>1,'𝒟'=>1,'𝒢'=>1,'𝒥'=>1,'𝒦'=>1,'𝒩'=>1,'𝒪'=>1,'𝒫'=>1,'𝒬'=>1,'𝒮'=>1,'𝒯'=>1,'𝒰'=>1,'𝒱'=>1,'𝒲'=>1,'𝒳'=>1,'𝒴'=>1,'𝒵'=>1,'𝒶'=>1,'𝒷'=>1,'𝒸'=>1,'𝒹'=>1,'𝒻'=>1,'𝒽'=>1,'𝒾'=>1,'𝒿'=>1,'𝓀'=>1,'𝓁'=>1,'𝓂'=>1,'𝓃'=>1,'𝓅'=>1,'𝓆'=>1,'𝓇'=>1,'𝓈'=>1,'𝓉'=>1,'𝓊'=>1,'𝓋'=>1,'𝓌'=>1,'𝓍'=>1,'𝓎'=>1,'𝓏'=>1,'𝓐'=>1,'𝓑'=>1,'𝓒'=>1,'𝓓'=>1,'𝓔'=>1,'𝓕'=>1,'𝓖'=>1,'𝓗'=>1,'𝓘'=>1,'𝓙'=>1,'𝓚'=>1,'𝓛'=>1,'𝓜'=>1,'𝓝'=>1,'𝓞'=>1,'𝓟'=>1,'𝓠'=>1,'𝓡'=>1,'𝓢'=>1,'𝓣'=>1,'𝓤'=>1,'𝓥'=>1,'𝓦'=>1,'𝓧'=>1,'𝓨'=>1,'𝓩'=>1,'𝓪'=>1,'𝓫'=>1,'𝓬'=>1,'𝓭'=>1,'𝓮'=>1,'𝓯'=>1,'𝓰'=>1,'𝓱'=>1,'𝓲'=>1,'𝓳'=>1,'𝓴'=>1,'𝓵'=>1,'𝓶'=>1,'𝓷'=>1,'𝓸'=>1,'𝓹'=>1,'𝓺'=>1,'𝓻'=>1,'𝓼'=>1,'𝓽'=>1,'𝓾'=>1,'𝓿'=>1,'𝔀'=>1,'𝔁'=>1,'𝔂'=>1,'𝔃'=>1,'𝔄'=>1,'𝔅'=>1,'𝔇'=>1,'𝔈'=>1,'𝔉'=>1,'𝔊'=>1,'𝔍'=>1,'𝔎'=>1,'𝔏'=>1,'𝔐'=>1,'𝔑'=>1,'𝔒'=>1,'𝔓'=>1,'𝔔'=>1,'𝔖'=>1,'𝔗'=>1,'𝔘'=>1,'𝔙'=>1,'𝔚'=>1,'𝔛'=>1,'𝔜'=>1,'𝔞'=>1,'𝔟'=>1,'𝔠'=>1,'𝔡'=>1,'𝔢'=>1,'𝔣'=>1,'𝔤'=>1,'𝔥'=>1,'𝔦'=>1,'𝔧'=>1,'𝔨'=>1,'𝔩'=>1,'𝔪'=>1,'𝔫'=>1,'𝔬'=>1,'𝔭'=>1,'𝔮'=>1,'𝔯'=>1,'𝔰'=>1,'𝔱'=>1,'𝔲'=>1,'𝔳'=>1,'𝔴'=>1,'𝔵'=>1,'𝔶'=>1,'𝔷'=>1,'𝔸'=>1,'𝔹'=>1,'𝔻'=>1,'𝔼'=>1,'𝔽'=>1,'𝔾'=>1,'𝕀'=>1,'𝕁'=>1,'𝕂'=>1,'𝕃'=>1,'𝕄'=>1,'𝕆'=>1,'𝕊'=>1,'𝕋'=>1,'𝕌'=>1,'𝕍'=>1,'𝕎'=>1,'𝕏'=>1,'𝕐'=>1,'𝕒'=>1,'𝕓'=>1,'𝕔'=>1,'𝕕'=>1,'𝕖'=>1,'𝕗'=>1,'𝕘'=>1,'𝕙'=>1,'𝕚'=>1,'𝕛'=>1,'𝕜'=>1,'𝕝'=>1,'𝕞'=>1,'𝕟'=>1,'𝕠'=>1,'𝕡'=>1,'𝕢'=>1,'𝕣'=>1,'𝕤'=>1,'𝕥'=>1,'𝕦'=>1,'𝕧'=>1,'𝕨'=>1,'𝕩'=>1,'𝕪'=>1,'𝕫'=>1,'𝕬'=>1,'𝕭'=>1,'𝕮'=>1,'𝕯'=>1,'𝕰'=>1,'𝕱'=>1,'𝕲'=>1,'𝕳'=>1,'𝕴'=>1,'𝕵'=>1,'𝕶'=>1,'𝕷'=>1,'𝕸'=>1,'𝕹'=>1,'𝕺'=>1,'𝕻'=>1,'𝕼'=>1,'𝕽'=>1,'𝕾'=>1,'𝕿'=>1,'𝖀'=>1,'𝖁'=>1,'𝖂'=>1,'𝖃'=>1,'𝖄'=>1,'𝖅'=>1,'𝖆'=>1,'𝖇'=>1,'𝖈'=>1,'𝖉'=>1,'𝖊'=>1,'𝖋'=>1,'𝖌'=>1,'𝖍'=>1,'𝖎'=>1,'𝖏'=>1,'𝖐'=>1,'𝖑'=>1,'𝖒'=>1,'𝖓'=>1,'𝖔'=>1,'𝖕'=>1,'𝖖'=>1,'𝖗'=>1,'𝖘'=>1,'𝖙'=>1,'𝖚'=>1,'𝖛'=>1,'𝖜'=>1,'𝖝'=>1,'𝖞'=>1,'𝖟'=>1,'𝖠'=>1,'𝖡'=>1,'𝖢'=>1,'𝖣'=>1,'𝖤'=>1,'𝖥'=>1,'𝖦'=>1,'𝖧'=>1,'𝖨'=>1,'𝖩'=>1,'𝖪'=>1,'𝖫'=>1,'𝖬'=>1,'𝖭'=>1,'𝖮'=>1,'𝖯'=>1,'𝖰'=>1,'𝖱'=>1,'𝖲'=>1,'𝖳'=>1,'𝖴'=>1,'𝖵'=>1,'𝖶'=>1,'𝖷'=>1,'𝖸'=>1,'𝖹'=>1,'𝖺'=>1,'𝖻'=>1,'𝖼'=>1,'𝖽'=>1,'𝖾'=>1,'𝖿'=>1,'𝗀'=>1,'𝗁'=>1,'𝗂'=>1,'𝗃'=>1,'𝗄'=>1,'𝗅'=>1,'𝗆'=>1,'𝗇'=>1,'𝗈'=>1,'𝗉'=>1,'𝗊'=>1,'𝗋'=>1,'𝗌'=>1,'𝗍'=>1,'𝗎'=>1,'𝗏'=>1,'𝗐'=>1,'𝗑'=>1,'𝗒'=>1,'𝗓'=>1,'𝗔'=>1,'𝗕'=>1,'𝗖'=>1,'𝗗'=>1,'𝗘'=>1,'𝗙'=>1,'𝗚'=>1,'𝗛'=>1,'𝗜'=>1,'𝗝'=>1,'𝗞'=>1,'𝗟'=>1,'𝗠'=>1,'𝗡'=>1,'𝗢'=>1,'𝗣'=>1,'𝗤'=>1,'𝗥'=>1,'𝗦'=>1,'𝗧'=>1,'𝗨'=>1,'𝗩'=>1,'𝗪'=>1,'𝗫'=>1,'𝗬'=>1,'𝗭'=>1,'𝗮'=>1,'𝗯'=>1,'𝗰'=>1,'𝗱'=>1,'𝗲'=>1,'𝗳'=>1,'𝗴'=>1,'𝗵'=>1,'𝗶'=>1,'𝗷'=>1,'𝗸'=>1,'𝗹'=>1,'𝗺'=>1,'𝗻'=>1,'𝗼'=>1,'𝗽'=>1,'𝗾'=>1,'𝗿'=>1,'𝘀'=>1,'𝘁'=>1,'𝘂'=>1,'𝘃'=>1,'𝘄'=>1,'𝘅'=>1,'𝘆'=>1,'𝘇'=>1,'𝘈'=>1,'𝘉'=>1,'𝘊'=>1,'𝘋'=>1,'𝘌'=>1,'𝘍'=>1,'𝘎'=>1,'𝘏'=>1,'𝘐'=>1,'𝘑'=>1,'𝘒'=>1,'𝘓'=>1,'𝘔'=>1,'𝘕'=>1,'𝘖'=>1,'𝘗'=>1,'𝘘'=>1,'𝘙'=>1,'𝘚'=>1,'𝘛'=>1,'𝘜'=>1,'𝘝'=>1,'𝘞'=>1,'𝘟'=>1,'𝘠'=>1,'𝘡'=>1,'𝘢'=>1,'𝘣'=>1,'𝘤'=>1,'𝘥'=>1,'𝘦'=>1,'𝘧'=>1,'𝘨'=>1,'𝘩'=>1,'𝘪'=>1,'𝘫'=>1,'𝘬'=>1,'𝘭'=>1,'𝘮'=>1,'𝘯'=>1,'𝘰'=>1,'𝘱'=>1,'𝘲'=>1,'𝘳'=>1,'𝘴'=>1,'𝘵'=>1,'𝘶'=>1,'𝘷'=>1,'𝘸'=>1,'𝘹'=>1,'𝘺'=>1,'𝘻'=>1,'𝘼'=>1,'𝘽'=>1,'𝘾'=>1,'𝘿'=>1,'𝙀'=>1,'𝙁'=>1,'𝙂'=>1,'𝙃'=>1,'𝙄'=>1,'𝙅'=>1,'𝙆'=>1,'𝙇'=>1,'𝙈'=>1,'𝙉'=>1,'𝙊'=>1,'𝙋'=>1,'𝙌'=>1,'𝙍'=>1,'𝙎'=>1,'𝙏'=>1,'𝙐'=>1,'𝙑'=>1,'𝙒'=>1,'𝙓'=>1,'𝙔'=>1,'𝙕'=>1,'𝙖'=>1,'𝙗'=>1,'𝙘'=>1,'𝙙'=>1,'𝙚'=>1,'𝙛'=>1,'𝙜'=>1,'𝙝'=>1,'𝙞'=>1,'𝙟'=>1,'𝙠'=>1,'𝙡'=>1,'𝙢'=>1,'𝙣'=>1,'𝙤'=>1,'𝙥'=>1,'𝙦'=>1,'𝙧'=>1,'𝙨'=>1,'𝙩'=>1,'𝙪'=>1,'𝙫'=>1,'𝙬'=>1,'𝙭'=>1,'𝙮'=>1,'𝙯'=>1,'𝙰'=>1,'𝙱'=>1,'𝙲'=>1,'𝙳'=>1,'𝙴'=>1,'𝙵'=>1,'𝙶'=>1,'𝙷'=>1,'𝙸'=>1,'𝙹'=>1,'𝙺'=>1,'𝙻'=>1,'𝙼'=>1,'𝙽'=>1,'𝙾'=>1,'𝙿'=>1,'𝚀'=>1,'𝚁'=>1,'𝚂'=>1,'𝚃'=>1,'𝚄'=>1,'𝚅'=>1,'𝚆'=>1,'𝚇'=>1,'𝚈'=>1,'𝚉'=>1,'𝚊'=>1,'𝚋'=>1,'𝚌'=>1,'𝚍'=>1,'𝚎'=>1,'𝚏'=>1,'𝚐'=>1,'𝚑'=>1,'𝚒'=>1,'𝚓'=>1,'𝚔'=>1,'𝚕'=>1,'𝚖'=>1,'𝚗'=>1,'𝚘'=>1,'𝚙'=>1,'𝚚'=>1,'𝚛'=>1,'𝚜'=>1,'𝚝'=>1,'𝚞'=>1,'𝚟'=>1,'𝚠'=>1,'𝚡'=>1,'𝚢'=>1,'𝚣'=>1,'𝚤'=>1,'𝚥'=>1,'𝚨'=>1,'𝚩'=>1,'𝚪'=>1,'𝚫'=>1,'𝚬'=>1,'𝚭'=>1,'𝚮'=>1,'𝚯'=>1,'𝚰'=>1,'𝚱'=>1,'𝚲'=>1,'𝚳'=>1,'𝚴'=>1,'𝚵'=>1,'𝚶'=>1,'𝚷'=>1,'𝚸'=>1,'𝚹'=>1,'𝚺'=>1,'𝚻'=>1,'𝚼'=>1,'𝚽'=>1,'𝚾'=>1,'𝚿'=>1,'𝛀'=>1,'𝛁'=>1,'𝛂'=>1,'𝛃'=>1,'𝛄'=>1,'𝛅'=>1,'𝛆'=>1,'𝛇'=>1,'𝛈'=>1,'𝛉'=>1,'𝛊'=>1,'𝛋'=>1,'𝛌'=>1,'𝛍'=>1,'𝛎'=>1,'𝛏'=>1,'𝛐'=>1,'𝛑'=>1,'𝛒'=>1,'𝛓'=>1,'𝛔'=>1,'𝛕'=>1,'𝛖'=>1,'𝛗'=>1,'𝛘'=>1,'𝛙'=>1,'𝛚'=>1,'𝛛'=>1,'𝛜'=>1,'𝛝'=>1,'𝛞'=>1,'𝛟'=>1,'𝛠'=>1,'𝛡'=>1,'𝛢'=>1,'𝛣'=>1,'𝛤'=>1,'𝛥'=>1,'𝛦'=>1,'𝛧'=>1,'𝛨'=>1,'𝛩'=>1,'𝛪'=>1,'𝛫'=>1,'𝛬'=>1,'𝛭'=>1,'𝛮'=>1,'𝛯'=>1,'𝛰'=>1,'𝛱'=>1,'𝛲'=>1,'𝛳'=>1,'𝛴'=>1,'𝛵'=>1,'𝛶'=>1,'𝛷'=>1,'𝛸'=>1,'𝛹'=>1,'𝛺'=>1,'𝛻'=>1,'𝛼'=>1,'𝛽'=>1,'𝛾'=>1,'𝛿'=>1,'𝜀'=>1,'𝜁'=>1,'𝜂'=>1,'𝜃'=>1,'𝜄'=>1,'𝜅'=>1,'𝜆'=>1,'𝜇'=>1,'𝜈'=>1,'𝜉'=>1,'𝜊'=>1,'𝜋'=>1,'𝜌'=>1,'𝜍'=>1,'𝜎'=>1,'𝜏'=>1,'𝜐'=>1,'𝜑'=>1,'𝜒'=>1,'𝜓'=>1,'𝜔'=>1,'𝜕'=>1,'𝜖'=>1,'𝜗'=>1,'𝜘'=>1,'𝜙'=>1,'𝜚'=>1,'𝜛'=>1,'𝜜'=>1,'𝜝'=>1,'𝜞'=>1,'𝜟'=>1,'𝜠'=>1,'𝜡'=>1,'𝜢'=>1,'𝜣'=>1,'𝜤'=>1,'𝜥'=>1,'𝜦'=>1,'𝜧'=>1,'𝜨'=>1,'𝜩'=>1,'𝜪'=>1,'𝜫'=>1,'𝜬'=>1,'𝜭'=>1,'𝜮'=>1,'𝜯'=>1,'𝜰'=>1,'𝜱'=>1,'𝜲'=>1,'𝜳'=>1,'𝜴'=>1,'𝜵'=>1,'𝜶'=>1,'𝜷'=>1,'𝜸'=>1,'𝜹'=>1,'𝜺'=>1,'𝜻'=>1,'𝜼'=>1,'𝜽'=>1,'𝜾'=>1,'𝜿'=>1,'𝝀'=>1,'𝝁'=>1,'𝝂'=>1,'𝝃'=>1,'𝝄'=>1,'𝝅'=>1,'𝝆'=>1,'𝝇'=>1,'𝝈'=>1,'𝝉'=>1,'𝝊'=>1,'𝝋'=>1,'𝝌'=>1,'𝝍'=>1,'𝝎'=>1,'𝝏'=>1,'𝝐'=>1,'𝝑'=>1,'𝝒'=>1,'𝝓'=>1,'𝝔'=>1,'𝝕'=>1,'𝝖'=>1,'𝝗'=>1,'𝝘'=>1,'𝝙'=>1,'𝝚'=>1,'𝝛'=>1,'𝝜'=>1,'𝝝'=>1,'𝝞'=>1,'𝝟'=>1,'𝝠'=>1,'𝝡'=>1,'𝝢'=>1,'𝝣'=>1,'𝝤'=>1,'𝝥'=>1,'𝝦'=>1,'𝝧'=>1,'𝝨'=>1,'𝝩'=>1,'𝝪'=>1,'𝝫'=>1,'𝝬'=>1,'𝝭'=>1,'𝝮'=>1,'𝝯'=>1,'𝝰'=>1,'𝝱'=>1,'𝝲'=>1,'𝝳'=>1,'𝝴'=>1,'𝝵'=>1,'𝝶'=>1,'𝝷'=>1,'𝝸'=>1,'𝝹'=>1,'𝝺'=>1,'𝝻'=>1,'𝝼'=>1,'𝝽'=>1,'𝝾'=>1,'𝝿'=>1,'𝞀'=>1,'𝞁'=>1,'𝞂'=>1,'𝞃'=>1,'𝞄'=>1,'𝞅'=>1,'𝞆'=>1,'𝞇'=>1,'𝞈'=>1,'𝞉'=>1,'𝞊'=>1,'𝞋'=>1,'𝞌'=>1,'𝞍'=>1,'𝞎'=>1,'𝞏'=>1,'𝞐'=>1,'𝞑'=>1,'𝞒'=>1,'𝞓'=>1,'𝞔'=>1,'𝞕'=>1,'𝞖'=>1,'𝞗'=>1,'𝞘'=>1,'𝞙'=>1,'𝞚'=>1,'𝞛'=>1,'𝞜'=>1,'𝞝'=>1,'𝞞'=>1,'𝞟'=>1,'𝞠'=>1,'𝞡'=>1,'𝞢'=>1,'𝞣'=>1,'𝞤'=>1,'𝞥'=>1,'𝞦'=>1,'𝞧'=>1,'𝞨'=>1,'𝞩'=>1,'𝞪'=>1,'𝞫'=>1,'𝞬'=>1,'𝞭'=>1,'𝞮'=>1,'𝞯'=>1,'𝞰'=>1,'𝞱'=>1,'𝞲'=>1,'𝞳'=>1,'𝞴'=>1,'𝞵'=>1,'𝞶'=>1,'𝞷'=>1,'𝞸'=>1,'𝞹'=>1,'𝞺'=>1,'𝞻'=>1,'𝞼'=>1,'𝞽'=>1,'𝞾'=>1,'𝞿'=>1,'𝟀'=>1,'𝟁'=>1,'𝟂'=>1,'𝟃'=>1,'𝟄'=>1,'𝟅'=>1,'𝟆'=>1,'𝟇'=>1,'𝟈'=>1,'𝟉'=>1,'𝟊'=>1,'𝟋'=>1,'𝟎'=>1,'𝟏'=>1,'𝟐'=>1,'𝟑'=>1,'𝟒'=>1,'𝟓'=>1,'𝟔'=>1,'𝟕'=>1,'𝟖'=>1,'𝟗'=>1,'𝟘'=>1,'𝟙'=>1,'𝟚'=>1,'𝟛'=>1,'𝟜'=>1,'𝟝'=>1,'𝟞'=>1,'𝟟'=>1,'𝟠'=>1,'𝟡'=>1,'𝟢'=>1,'𝟣'=>1,'𝟤'=>1,'𝟥'=>1,'𝟦'=>1,'𝟧'=>1,'𝟨'=>1,'𝟩'=>1,'𝟪'=>1,'𝟫'=>1,'𝟬'=>1,'𝟭'=>1,'𝟮'=>1,'𝟯'=>1,'𝟰'=>1,'𝟱'=>1,'𝟲'=>1,'𝟳'=>1,'𝟴'=>1,'𝟵'=>1,'𝟶'=>1,'𝟷'=>1,'𝟸'=>1,'𝟹'=>1,'𝟺'=>1,'𝟻'=>1,'𝟼'=>1,'𝟽'=>1,'𝟾'=>1,'𝟿'=>1,'丽'=>1,'丸'=>1,'乁'=>1,'𠄢'=>1,'你'=>1,'侮'=>1,'侻'=>1,'倂'=>1,'偺'=>1,'備'=>1,'僧'=>1,'像'=>1,'㒞'=>1,'𠘺'=>1,'免'=>1,'兔'=>1,'兤'=>1,'具'=>1,'𠔜'=>1,'㒹'=>1,'內'=>1,'再'=>1,'𠕋'=>1,'冗'=>1,'冤'=>1,'仌'=>1,'冬'=>1,'况'=>1,'𩇟'=>1,'凵'=>1,'刃'=>1,'㓟'=>1,'刻'=>1,'剆'=>1,'割'=>1,'剷'=>1,'㔕'=>1,'勇'=>1,'勉'=>1,'勤'=>1,'勺'=>1,'包'=>1,'匆'=>1,'北'=>1,'卉'=>1,'卑'=>1,'博'=>1,'即'=>1,'卽'=>1,'卿'=>1,'卿'=>1,'卿'=>1,'𠨬'=>1,'灰'=>1,'及'=>1,'叟'=>1,'𠭣'=>1,'叫'=>1,'叱'=>1,'吆'=>1,'咞'=>1,'吸'=>1,'呈'=>1,'周'=>1,'咢'=>1,'哶'=>1,'唐'=>1,'啓'=>1,'啣'=>1,'善'=>1,'善'=>1,'喙'=>1,'喫'=>1,'喳'=>1,'嗂'=>1,'圖'=>1,'嘆'=>1,'圗'=>1,'噑'=>1,'噴'=>1,'切'=>1,'壮'=>1,'城'=>1,'埴'=>1,'堍'=>1,'型'=>1,'堲'=>1,'報'=>1,'墬'=>1,'𡓤'=>1,'売'=>1,'壷'=>1,'夆'=>1,'多'=>1,'夢'=>1,'奢'=>1,'𡚨'=>1,'𡛪'=>1,'姬'=>1,'娛'=>1,'娧'=>1,'姘'=>1,'婦'=>1,'㛮'=>1,'㛼'=>1,'嬈'=>1,'嬾'=>1,'嬾'=>1,'𡧈'=>1,'寃'=>1,'寘'=>1,'寧'=>1,'寳'=>1,'𡬘'=>1,'寿'=>1,'将'=>1,'当'=>1,'尢'=>1,'㞁'=>1,'屠'=>1,'屮'=>1,'峀'=>1,'岍'=>1,'𡷤'=>1,'嵃'=>1,'𡷦'=>1,'嵮'=>1,'嵫'=>1,'嵼'=>1,'巡'=>1,'巢'=>1,'㠯'=>1,'巽'=>1,'帨'=>1,'帽'=>1,'幩'=>1,'㡢'=>1,'𢆃'=>1,'㡼'=>1,'庰'=>1,'庳'=>1,'庶'=>1,'廊'=>1,'𪎒'=>1,'廾'=>1,'𢌱'=>1,'𢌱'=>1,'舁'=>1,'弢'=>1,'弢'=>1,'㣇'=>1,'𣊸'=>1,'𦇚'=>1,'形'=>1,'彫'=>1,'㣣'=>1,'徚'=>1,'忍'=>1,'志'=>1,'忹'=>1,'悁'=>1,'㤺'=>1,'㤜'=>1,'悔'=>1,'𢛔'=>1,'惇'=>1,'慈'=>1,'慌'=>1,'慎'=>1,'慌'=>1,'慺'=>1,'憎'=>1,'憲'=>1,'憤'=>1,'憯'=>1,'懞'=>1,'懲'=>1,'懶'=>1,'成'=>1,'戛'=>1,'扝'=>1,'抱'=>1,'拔'=>1,'捐'=>1,'𢬌'=>1,'挽'=>1,'拼'=>1,'捨'=>1,'掃'=>1,'揤'=>1,'𢯱'=>1,'搢'=>1,'揅'=>1,'掩'=>1,'㨮'=>1,'摩'=>1,'摾'=>1,'撝'=>1,'摷'=>1,'㩬'=>1,'敏'=>1,'敬'=>1,'𣀊'=>1,'旣'=>1,'書'=>1,'晉'=>1,'㬙'=>1,'暑'=>1,'㬈'=>1,'㫤'=>1,'冒'=>1,'冕'=>1,'最'=>1,'暜'=>1,'肭'=>1,'䏙'=>1,'朗'=>1,'望'=>1,'朡'=>1,'杞'=>1,'杓'=>1,'𣏃'=>1,'㭉'=>1,'柺'=>1,'枅'=>1,'桒'=>1,'梅'=>1,'𣑭'=>1,'梎'=>1,'栟'=>1,'椔'=>1,'㮝'=>1,'楂'=>1,'榣'=>1,'槪'=>1,'檨'=>1,'𣚣'=>1,'櫛'=>1,'㰘'=>1,'次'=>1,'𣢧'=>1,'歔'=>1,'㱎'=>1,'歲'=>1,'殟'=>1,'殺'=>1,'殻'=>1,'𣪍'=>1,'𡴋'=>1,'𣫺'=>1,'汎'=>1,'𣲼'=>1,'沿'=>1,'泍'=>1,'汧'=>1,'洖'=>1,'派'=>1,'海'=>1,'流'=>1,'浩'=>1,'浸'=>1,'涅'=>1,'𣴞'=>1,'洴'=>1,'港'=>1,'湮'=>1,'㴳'=>1,'滋'=>1,'滇'=>1,'𣻑'=>1,'淹'=>1,'潮'=>1,'𣽞'=>1,'𣾎'=>1,'濆'=>1,'瀹'=>1,'瀞'=>1,'瀛'=>1,'㶖'=>1,'灊'=>1,'災'=>1,'灷'=>1,'炭'=>1,'𠔥'=>1,'煅'=>1,'𤉣'=>1,'熜'=>1,'𤎫'=>1,'爨'=>1,'爵'=>1,'牐'=>1,'𤘈'=>1,'犀'=>1,'犕'=>1,'𤜵'=>1,'𤠔'=>1,'獺'=>1,'王'=>1,'㺬'=>1,'玥'=>1,'㺸'=>1,'㺸'=>1,'瑇'=>1,'瑜'=>1,'瑱'=>1,'璅'=>1,'瓊'=>1,'㼛'=>1,'甤'=>1,'𤰶'=>1,'甾'=>1,'𤲒'=>1,'異'=>1,'𢆟'=>1,'瘐'=>1,'𤾡'=>1,'𤾸'=>1,'𥁄'=>1,'㿼'=>1,'䀈'=>1,'直'=>1,'𥃳'=>1,'𥃲'=>1,'𥄙'=>1,'𥄳'=>1,'眞'=>1,'真'=>1,'真'=>1,'睊'=>1,'䀹'=>1,'瞋'=>1,'䁆'=>1,'䂖'=>1,'𥐝'=>1,'硎'=>1,'碌'=>1,'磌'=>1,'䃣'=>1,'𥘦'=>1,'祖'=>1,'𥚚'=>1,'𥛅'=>1,'福'=>1,'秫'=>1,'䄯'=>1,'穀'=>1,'穊'=>1,'穏'=>1,'𥥼'=>1,'𥪧'=>1,'𥪧'=>1,'竮'=>1,'䈂'=>1,'𥮫'=>1,'篆'=>1,'築'=>1,'䈧'=>1,'𥲀'=>1,'糒'=>1,'䊠'=>1,'糨'=>1,'糣'=>1,'紀'=>1,'𥾆'=>1,'絣'=>1,'䌁'=>1,'緇'=>1,'縂'=>1,'繅'=>1,'䌴'=>1,'𦈨'=>1,'𦉇'=>1,'䍙'=>1,'𦋙'=>1,'罺'=>1,'𦌾'=>1,'羕'=>1,'翺'=>1,'者'=>1,'𦓚'=>1,'𦔣'=>1,'聠'=>1,'𦖨'=>1,'聰'=>1,'𣍟'=>1,'䏕'=>1,'育'=>1,'脃'=>1,'䐋'=>1,'脾'=>1,'媵'=>1,'𦞧'=>1,'𦞵'=>1,'𣎓'=>1,'𣎜'=>1,'舁'=>1,'舄'=>1,'辞'=>1,'䑫'=>1,'芑'=>1,'芋'=>1,'芝'=>1,'劳'=>1,'花'=>1,'芳'=>1,'芽'=>1,'苦'=>1,'𦬼'=>1,'若'=>1,'茝'=>1,'荣'=>1,'莭'=>1,'茣'=>1,'莽'=>1,'菧'=>1,'著'=>1,'荓'=>1,'菊'=>1,'菌'=>1,'菜'=>1,'𦰶'=>1,'𦵫'=>1,'𦳕'=>1,'䔫'=>1,'蓱'=>1,'蓳'=>1,'蔖'=>1,'𧏊'=>1,'蕤'=>1,'𦼬'=>1,'䕝'=>1,'䕡'=>1,'𦾱'=>1,'𧃒'=>1,'䕫'=>1,'虐'=>1,'虜'=>1,'虧'=>1,'虩'=>1,'蚩'=>1,'蚈'=>1,'蜎'=>1,'蛢'=>1,'蝹'=>1,'蜨'=>1,'蝫'=>1,'螆'=>1,'䗗'=>1,'蟡'=>1,'蠁'=>1,'䗹'=>1,'衠'=>1,'衣'=>1,'𧙧'=>1,'裗'=>1,'裞'=>1,'䘵'=>1,'裺'=>1,'㒻'=>1,'𧢮'=>1,'𧥦'=>1,'䚾'=>1,'䛇'=>1,'誠'=>1,'諭'=>1,'變'=>1,'豕'=>1,'𧲨'=>1,'貫'=>1,'賁'=>1,'贛'=>1,'起'=>1,'𧼯'=>1,'𠠄'=>1,'跋'=>1,'趼'=>1,'跰'=>1,'𠣞'=>1,'軔'=>1,'輸'=>1,'𨗒'=>1,'𨗭'=>1,'邔'=>1,'郱'=>1,'鄑'=>1,'𨜮'=>1,'鄛'=>1,'鈸'=>1,'鋗'=>1,'鋘'=>1,'鉼'=>1,'鏹'=>1,'鐕'=>1,'𨯺'=>1,'開'=>1,'䦕'=>1,'閷'=>1,'𨵷'=>1,'䧦'=>1,'雃'=>1,'嶲'=>1,'霣'=>1,'𩅅'=>1,'𩈚'=>1,'䩮'=>1,'䩶'=>1,'韠'=>1,'𩐊'=>1,'䪲'=>1,'𩒖'=>1,'頋'=>1,'頋'=>1,'頩'=>1,'𩖶'=>1,'飢'=>1,'䬳'=>1,'餩'=>1,'馧'=>1,'駂'=>1,'駾'=>1,'䯎'=>1,'𩬰'=>1,'鬒'=>1,'鱀'=>1,'鳽'=>1,'䳎'=>1,'䳭'=>1,'鵧'=>1,'𪃎'=>1,'䳸'=>1,'𪄅'=>1,'𪈎'=>1,'𪊑'=>1,'麻'=>1,'䵖'=>1,'黹'=>1,'黾'=>1,'鼅'=>1,'鼏'=>1,'鼖'=>1,'鼻'=>1,'𪘀'=>1,'̀'=>0,'́'=>0,'̂'=>0,'̃'=>0,'̄'=>0,'̆'=>0,'̇'=>0,'̈'=>0,'̉'=>0,'̊'=>0,'̋'=>0,'̌'=>0,'̏'=>0,'̑'=>0,'̓'=>0,'̔'=>0,'̛'=>0,'̣'=>0,'̤'=>0,'̥'=>0,'̦'=>0,'̧'=>0,'̨'=>0,'̭'=>0,'̮'=>0,'̰'=>0,'̱'=>0,'̸'=>0,'͂'=>0,'ͅ'=>0,'ٓ'=>0,'ٔ'=>0,'ٕ'=>0,'़'=>0,'া'=>0,'ৗ'=>0,'ା'=>0,'ୖ'=>0,'ୗ'=>0,'ா'=>0,'ௗ'=>0,'ౖ'=>0,'ೂ'=>0,'ೕ'=>0,'ೖ'=>0,'ാ'=>0,'ൗ'=>0,'්'=>0,'ා'=>0,'ෟ'=>0,'ီ'=>0,'ᅡ'=>0,'ᅢ'=>0,'ᅣ'=>0,'ᅤ'=>0,'ᅥ'=>0,'ᅦ'=>0,'ᅧ'=>0,'ᅨ'=>0,'ᅩ'=>0,'ᅪ'=>0,'ᅫ'=>0,'ᅬ'=>0,'ᅭ'=>0,'ᅮ'=>0,'ᅯ'=>0,'ᅰ'=>0,'ᅱ'=>0,'ᅲ'=>0,'ᅳ'=>0,'ᅴ'=>0,'ᅵ'=>0,'ᆨ'=>0,'ᆩ'=>0,'ᆪ'=>0,'ᆫ'=>0,'ᆬ'=>0,'ᆭ'=>0,'ᆮ'=>0,'ᆯ'=>0,'ᆰ'=>0,'ᆱ'=>0,'ᆲ'=>0,'ᆳ'=>0,'ᆴ'=>0,'ᆵ'=>0,'ᆶ'=>0,'ᆷ'=>0,'ᆸ'=>0,'ᆹ'=>0,'ᆺ'=>0,'ᆻ'=>0,'ᆼ'=>0,'ᆽ'=>0,'ᆾ'=>0,'ᆿ'=>0,'ᇀ'=>0,'ᇁ'=>0,'ᇂ'=>0,'ᬵ'=>0,'゙'=>0,'゚'=>0);
diff --git a/phpBB/includes/utf/data/utf_normalizer_common.php b/phpBB/includes/utf/data/utf_normalizer_common.php
index befc17d410..2eb7feac69 100644
--- a/phpBB/includes/utf/data/utf_normalizer_common.php
+++ b/phpBB/includes/utf/data/utf_normalizer_common.php
@@ -1,4 +1,4 @@
<?php
$GLOBALS['utf_jamo_index']=array('ᄀ'=>44032,'ᄁ'=>44620,'ᄂ'=>45208,'ᄃ'=>45796,'ᄄ'=>46384,'ᄅ'=>46972,'ᄆ'=>47560,'ᄇ'=>48148,'ᄈ'=>48736,'ᄉ'=>49324,'ᄊ'=>49912,'ᄋ'=>50500,'ᄌ'=>51088,'ᄍ'=>51676,'ᄎ'=>52264,'ᄏ'=>52852,'ᄐ'=>53440,'ᄑ'=>54028,'ᄒ'=>54616,'ᅡ'=>0,'ᅢ'=>28,'ᅣ'=>56,'ᅤ'=>84,'ᅥ'=>112,'ᅦ'=>140,'ᅧ'=>168,'ᅨ'=>196,'ᅩ'=>224,'ᅪ'=>252,'ᅫ'=>280,'ᅬ'=>308,'ᅭ'=>336,'ᅮ'=>364,'ᅯ'=>392,'ᅰ'=>420,'ᅱ'=>448,'ᅲ'=>476,'ᅳ'=>504,'ᅴ'=>532,'ᅵ'=>560,'ᆧ'=>0,'ᆨ'=>1,'ᆩ'=>2,'ᆪ'=>3,'ᆫ'=>4,'ᆬ'=>5,'ᆭ'=>6,'ᆮ'=>7,'ᆯ'=>8,'ᆰ'=>9,'ᆱ'=>10,'ᆲ'=>11,'ᆳ'=>12,'ᆴ'=>13,'ᆵ'=>14,'ᆶ'=>15,'ᆷ'=>16,'ᆸ'=>17,'ᆹ'=>18,'ᆺ'=>19,'ᆻ'=>20,'ᆼ'=>21,'ᆽ'=>22,'ᆾ'=>23,'ᆿ'=>24,'ᇀ'=>25,'ᇁ'=>26,'ᇂ'=>27);
$GLOBALS['utf_jamo_type']=array('ᄀ'=>0,'ᄁ'=>0,'ᄂ'=>0,'ᄃ'=>0,'ᄄ'=>0,'ᄅ'=>0,'ᄆ'=>0,'ᄇ'=>0,'ᄈ'=>0,'ᄉ'=>0,'ᄊ'=>0,'ᄋ'=>0,'ᄌ'=>0,'ᄍ'=>0,'ᄎ'=>0,'ᄏ'=>0,'ᄐ'=>0,'ᄑ'=>0,'ᄒ'=>0,'ᅡ'=>1,'ᅢ'=>1,'ᅣ'=>1,'ᅤ'=>1,'ᅥ'=>1,'ᅦ'=>1,'ᅧ'=>1,'ᅨ'=>1,'ᅩ'=>1,'ᅪ'=>1,'ᅫ'=>1,'ᅬ'=>1,'ᅭ'=>1,'ᅮ'=>1,'ᅯ'=>1,'ᅰ'=>1,'ᅱ'=>1,'ᅲ'=>1,'ᅳ'=>1,'ᅴ'=>1,'ᅵ'=>1,'ᆧ'=>2,'ᆨ'=>2,'ᆩ'=>2,'ᆪ'=>2,'ᆫ'=>2,'ᆬ'=>2,'ᆭ'=>2,'ᆮ'=>2,'ᆯ'=>2,'ᆰ'=>2,'ᆱ'=>2,'ᆲ'=>2,'ᆳ'=>2,'ᆴ'=>2,'ᆵ'=>2,'ᆶ'=>2,'ᆷ'=>2,'ᆸ'=>2,'ᆹ'=>2,'ᆺ'=>2,'ᆻ'=>2,'ᆼ'=>2,'ᆽ'=>2,'ᆾ'=>2,'ᆿ'=>2,'ᇀ'=>2,'ᇁ'=>2,'ᇂ'=>2);
-$GLOBALS['utf_combining_class']=array('̀'=>230,'́'=>230,'̂'=>230,'̃'=>230,'̄'=>230,'̅'=>230,'̆'=>230,'̇'=>230,'̈'=>230,'̉'=>230,'̊'=>230,'̋'=>230,'̌'=>230,'̍'=>230,'̎'=>230,'̏'=>230,'̐'=>230,'̑'=>230,'̒'=>230,'̓'=>230,'̔'=>230,'̕'=>232,'̖'=>220,'̗'=>220,'̘'=>220,'̙'=>220,'̚'=>232,'̛'=>216,'̜'=>220,'̝'=>220,'̞'=>220,'̟'=>220,'̠'=>220,'̡'=>202,'̢'=>202,'̣'=>220,'̤'=>220,'̥'=>220,'̦'=>220,'̧'=>202,'̨'=>202,'̩'=>220,'̪'=>220,'̫'=>220,'̬'=>220,'̭'=>220,'̮'=>220,'̯'=>220,'̰'=>220,'̱'=>220,'̲'=>220,'̳'=>220,'̴'=>1,'̵'=>1,'̶'=>1,'̷'=>1,'̸'=>1,'̹'=>220,'̺'=>220,'̻'=>220,'̼'=>220,'̽'=>230,'̾'=>230,'̿'=>230,'̀'=>230,'́'=>230,'͂'=>230,'̓'=>230,'̈́'=>230,'ͅ'=>240,'͆'=>230,'͇'=>220,'͈'=>220,'͉'=>220,'͊'=>230,'͋'=>230,'͌'=>230,'͍'=>220,'͎'=>220,'͐'=>230,'͑'=>230,'͒'=>230,'͓'=>220,'͔'=>220,'͕'=>220,'͖'=>220,'͗'=>230,'͘'=>232,'͙'=>220,'͚'=>220,'͛'=>230,'͜'=>233,'͝'=>234,'͞'=>234,'͟'=>233,'͠'=>234,'͡'=>234,'͢'=>233,'ͣ'=>230,'ͤ'=>230,'ͥ'=>230,'ͦ'=>230,'ͧ'=>230,'ͨ'=>230,'ͩ'=>230,'ͪ'=>230,'ͫ'=>230,'ͬ'=>230,'ͭ'=>230,'ͮ'=>230,'ͯ'=>230,'҃'=>230,'҄'=>230,'҅'=>230,'҆'=>230,'֑'=>220,'֒'=>230,'֓'=>230,'֔'=>230,'֕'=>230,'֖'=>220,'֗'=>230,'֘'=>230,'֙'=>230,'֚'=>222,'֛'=>220,'֜'=>230,'֝'=>230,'֞'=>230,'֟'=>230,'֠'=>230,'֡'=>230,'֢'=>220,'֣'=>220,'֤'=>220,'֥'=>220,'֦'=>220,'֧'=>220,'֨'=>230,'֩'=>230,'֪'=>220,'֫'=>230,'֬'=>230,'֭'=>222,'֮'=>228,'֯'=>230,'ְ'=>10,'ֱ'=>11,'ֲ'=>12,'ֳ'=>13,'ִ'=>14,'ֵ'=>15,'ֶ'=>16,'ַ'=>17,'ָ'=>18,'ֹ'=>19,'ֺ'=>19,'ֻ'=>20,'ּ'=>21,'ֽ'=>22,'ֿ'=>23,'ׁ'=>24,'ׂ'=>25,'ׄ'=>230,'ׅ'=>220,'ׇ'=>18,'ؐ'=>230,'ؑ'=>230,'ؒ'=>230,'ؓ'=>230,'ؔ'=>230,'ؕ'=>230,'ً'=>27,'ٌ'=>28,'ٍ'=>29,'َ'=>30,'ُ'=>31,'ِ'=>32,'ّ'=>33,'ْ'=>34,'ٓ'=>230,'ٔ'=>230,'ٕ'=>220,'ٖ'=>220,'ٗ'=>230,'٘'=>230,'ٙ'=>230,'ٚ'=>230,'ٛ'=>230,'ٜ'=>220,'ٝ'=>230,'ٞ'=>230,'ٰ'=>35,'ۖ'=>230,'ۗ'=>230,'ۘ'=>230,'ۙ'=>230,'ۚ'=>230,'ۛ'=>230,'ۜ'=>230,'۟'=>230,'۠'=>230,'ۡ'=>230,'ۢ'=>230,'ۣ'=>220,'ۤ'=>230,'ۧ'=>230,'ۨ'=>230,'۪'=>220,'۫'=>230,'۬'=>230,'ۭ'=>220,'ܑ'=>36,'ܰ'=>230,'ܱ'=>220,'ܲ'=>230,'ܳ'=>230,'ܴ'=>220,'ܵ'=>230,'ܶ'=>230,'ܷ'=>220,'ܸ'=>220,'ܹ'=>220,'ܺ'=>230,'ܻ'=>220,'ܼ'=>220,'ܽ'=>230,'ܾ'=>220,'ܿ'=>230,'݀'=>230,'݁'=>230,'݂'=>220,'݃'=>230,'݄'=>220,'݅'=>230,'݆'=>220,'݇'=>230,'݈'=>220,'݉'=>230,'݊'=>230,'߫'=>230,'߬'=>230,'߭'=>230,'߮'=>230,'߯'=>230,'߰'=>230,'߱'=>230,'߲'=>220,'߳'=>230,'़'=>7,'्'=>9,'॑'=>230,'॒'=>220,'॓'=>230,'॔'=>230,'়'=>7,'্'=>9,'਼'=>7,'੍'=>9,'઼'=>7,'્'=>9,'଼'=>7,'୍'=>9,'்'=>9,'్'=>9,'ౕ'=>84,'ౖ'=>91,'಼'=>7,'್'=>9,'്'=>9,'්'=>9,'ุ'=>103,'ู'=>103,'ฺ'=>9,'่'=>107,'้'=>107,'๊'=>107,'๋'=>107,'ຸ'=>118,'ູ'=>118,'່'=>122,'້'=>122,'໊'=>122,'໋'=>122,'༘'=>220,'༙'=>220,'༵'=>220,'༷'=>220,'༹'=>216,'ཱ'=>129,'ི'=>130,'ུ'=>132,'ེ'=>130,'ཻ'=>130,'ོ'=>130,'ཽ'=>130,'ྀ'=>130,'ྂ'=>230,'ྃ'=>230,'྄'=>9,'྆'=>230,'྇'=>230,'࿆'=>220,'့'=>7,'္'=>9,'፟'=>230,'᜔'=>9,'᜴'=>9,'្'=>9,'៝'=>230,'ᢩ'=>228,'᤹'=>222,'᤺'=>230,'᤻'=>220,'ᨗ'=>230,'ᨘ'=>220,'᬴'=>7,'᭄'=>9,'᭫'=>230,'᭬'=>220,'᭭'=>230,'᭮'=>230,'᭯'=>230,'᭰'=>230,'᭱'=>230,'᭲'=>230,'᭳'=>230,'᷀'=>230,'᷁'=>230,'᷂'=>220,'᷃'=>230,'᷄'=>230,'᷅'=>230,'᷆'=>230,'᷇'=>230,'᷈'=>230,'᷉'=>230,'᷊'=>220,'᷾'=>230,'᷿'=>220,'⃐'=>230,'⃑'=>230,'⃒'=>1,'⃓'=>1,'⃔'=>230,'⃕'=>230,'⃖'=>230,'⃗'=>230,'⃘'=>1,'⃙'=>1,'⃚'=>1,'⃛'=>230,'⃜'=>230,'⃡'=>230,'⃥'=>1,'⃦'=>1,'⃧'=>230,'⃨'=>220,'⃩'=>230,'⃪'=>1,'⃫'=>1,'⃬'=>220,'⃭'=>220,'⃮'=>220,'⃯'=>220,'〪'=>218,'〫'=>228,'〬'=>232,'〭'=>222,'〮'=>224,'〯'=>224,'゙'=>8,'゚'=>8,'꠆'=>9,'ﬞ'=>26,'︠'=>230,'︡'=>230,'︢'=>230,'︣'=>230,'𐨍'=>220,'𐨏'=>230,'𐨸'=>230,'𐨹'=>1,'𐨺'=>220,'𐨿'=>9,'𝅥'=>216,'𝅦'=>216,'𝅧'=>1,'𝅨'=>1,'𝅩'=>1,'𝅭'=>226,'𝅮'=>216,'𝅯'=>216,'𝅰'=>216,'𝅱'=>216,'𝅲'=>216,'𝅻'=>220,'𝅼'=>220,'𝅽'=>220,'𝅾'=>220,'𝅿'=>220,'𝆀'=>220,'𝆁'=>220,'𝆂'=>220,'𝆅'=>230,'𝆆'=>230,'𝆇'=>230,'𝆈'=>230,'𝆉'=>230,'𝆊'=>220,'𝆋'=>220,'𝆪'=>230,'𝆫'=>230,'𝆬'=>230,'𝆭'=>230,'𝉂'=>230,'𝉃'=>230,'𝉄'=>230); \ No newline at end of file
+$GLOBALS['utf_combining_class']=array('̀'=>230,'́'=>230,'̂'=>230,'̃'=>230,'̄'=>230,'̅'=>230,'̆'=>230,'̇'=>230,'̈'=>230,'̉'=>230,'̊'=>230,'̋'=>230,'̌'=>230,'̍'=>230,'̎'=>230,'̏'=>230,'̐'=>230,'̑'=>230,'̒'=>230,'̓'=>230,'̔'=>230,'̕'=>232,'̖'=>220,'̗'=>220,'̘'=>220,'̙'=>220,'̚'=>232,'̛'=>216,'̜'=>220,'̝'=>220,'̞'=>220,'̟'=>220,'̠'=>220,'̡'=>202,'̢'=>202,'̣'=>220,'̤'=>220,'̥'=>220,'̦'=>220,'̧'=>202,'̨'=>202,'̩'=>220,'̪'=>220,'̫'=>220,'̬'=>220,'̭'=>220,'̮'=>220,'̯'=>220,'̰'=>220,'̱'=>220,'̲'=>220,'̳'=>220,'̴'=>1,'̵'=>1,'̶'=>1,'̷'=>1,'̸'=>1,'̹'=>220,'̺'=>220,'̻'=>220,'̼'=>220,'̽'=>230,'̾'=>230,'̿'=>230,'̀'=>230,'́'=>230,'͂'=>230,'̓'=>230,'̈́'=>230,'ͅ'=>240,'͆'=>230,'͇'=>220,'͈'=>220,'͉'=>220,'͊'=>230,'͋'=>230,'͌'=>230,'͍'=>220,'͎'=>220,'͐'=>230,'͑'=>230,'͒'=>230,'͓'=>220,'͔'=>220,'͕'=>220,'͖'=>220,'͗'=>230,'͘'=>232,'͙'=>220,'͚'=>220,'͛'=>230,'͜'=>233,'͝'=>234,'͞'=>234,'͟'=>233,'͠'=>234,'͡'=>234,'͢'=>233,'ͣ'=>230,'ͤ'=>230,'ͥ'=>230,'ͦ'=>230,'ͧ'=>230,'ͨ'=>230,'ͩ'=>230,'ͪ'=>230,'ͫ'=>230,'ͬ'=>230,'ͭ'=>230,'ͮ'=>230,'ͯ'=>230,'҃'=>230,'҄'=>230,'҅'=>230,'҆'=>230,'֑'=>220,'֒'=>230,'֓'=>230,'֔'=>230,'֕'=>230,'֖'=>220,'֗'=>230,'֘'=>230,'֙'=>230,'֚'=>222,'֛'=>220,'֜'=>230,'֝'=>230,'֞'=>230,'֟'=>230,'֠'=>230,'֡'=>230,'֢'=>220,'֣'=>220,'֤'=>220,'֥'=>220,'֦'=>220,'֧'=>220,'֨'=>230,'֩'=>230,'֪'=>220,'֫'=>230,'֬'=>230,'֭'=>222,'֮'=>228,'֯'=>230,'ְ'=>10,'ֱ'=>11,'ֲ'=>12,'ֳ'=>13,'ִ'=>14,'ֵ'=>15,'ֶ'=>16,'ַ'=>17,'ָ'=>18,'ֹ'=>19,'ֺ'=>19,'ֻ'=>20,'ּ'=>21,'ֽ'=>22,'ֿ'=>23,'ׁ'=>24,'ׂ'=>25,'ׄ'=>230,'ׅ'=>220,'ׇ'=>18,'ؐ'=>230,'ؑ'=>230,'ؒ'=>230,'ؓ'=>230,'ؔ'=>230,'ؕ'=>230,'ً'=>27,'ٌ'=>28,'ٍ'=>29,'َ'=>30,'ُ'=>31,'ِ'=>32,'ّ'=>33,'ْ'=>34,'ٓ'=>230,'ٔ'=>230,'ٕ'=>220,'ٖ'=>220,'ٗ'=>230,'٘'=>230,'ٙ'=>230,'ٚ'=>230,'ٛ'=>230,'ٜ'=>220,'ٝ'=>230,'ٞ'=>230,'ٰ'=>35,'ۖ'=>230,'ۗ'=>230,'ۘ'=>230,'ۙ'=>230,'ۚ'=>230,'ۛ'=>230,'ۜ'=>230,'۟'=>230,'۠'=>230,'ۡ'=>230,'ۢ'=>230,'ۣ'=>220,'ۤ'=>230,'ۧ'=>230,'ۨ'=>230,'۪'=>220,'۫'=>230,'۬'=>230,'ۭ'=>220,'ܑ'=>36,'ܰ'=>230,'ܱ'=>220,'ܲ'=>230,'ܳ'=>230,'ܴ'=>220,'ܵ'=>230,'ܶ'=>230,'ܷ'=>220,'ܸ'=>220,'ܹ'=>220,'ܺ'=>230,'ܻ'=>220,'ܼ'=>220,'ܽ'=>230,'ܾ'=>220,'ܿ'=>230,'݀'=>230,'݁'=>230,'݂'=>220,'݃'=>230,'݄'=>220,'݅'=>230,'݆'=>220,'݇'=>230,'݈'=>220,'݉'=>230,'݊'=>230,'߫'=>230,'߬'=>230,'߭'=>230,'߮'=>230,'߯'=>230,'߰'=>230,'߱'=>230,'߲'=>220,'߳'=>230,'़'=>7,'्'=>9,'॑'=>230,'॒'=>220,'॓'=>230,'॔'=>230,'়'=>7,'্'=>9,'਼'=>7,'੍'=>9,'઼'=>7,'્'=>9,'଼'=>7,'୍'=>9,'்'=>9,'్'=>9,'ౕ'=>84,'ౖ'=>91,'಼'=>7,'್'=>9,'്'=>9,'්'=>9,'ุ'=>103,'ู'=>103,'ฺ'=>9,'่'=>107,'้'=>107,'๊'=>107,'๋'=>107,'ຸ'=>118,'ູ'=>118,'່'=>122,'້'=>122,'໊'=>122,'໋'=>122,'༘'=>220,'༙'=>220,'༵'=>220,'༷'=>220,'༹'=>216,'ཱ'=>129,'ི'=>130,'ུ'=>132,'ེ'=>130,'ཻ'=>130,'ོ'=>130,'ཽ'=>130,'ྀ'=>130,'ྂ'=>230,'ྃ'=>230,'྄'=>9,'྆'=>230,'྇'=>230,'࿆'=>220,'့'=>7,'္'=>9,'፟'=>230,'᜔'=>9,'᜴'=>9,'្'=>9,'៝'=>230,'ᢩ'=>228,'᤹'=>222,'᤺'=>230,'᤻'=>220,'ᨗ'=>230,'ᨘ'=>220,'᬴'=>7,'᭄'=>9,'᭫'=>230,'᭬'=>220,'᭭'=>230,'᭮'=>230,'᭯'=>230,'᭰'=>230,'᭱'=>230,'᭲'=>230,'᭳'=>230,'᷀'=>230,'᷁'=>230,'᷂'=>220,'᷃'=>230,'᷄'=>230,'᷅'=>230,'᷆'=>230,'᷇'=>230,'᷈'=>230,'᷉'=>230,'᷊'=>220,'᷾'=>230,'᷿'=>220,'⃐'=>230,'⃑'=>230,'⃒'=>1,'⃓'=>1,'⃔'=>230,'⃕'=>230,'⃖'=>230,'⃗'=>230,'⃘'=>1,'⃙'=>1,'⃚'=>1,'⃛'=>230,'⃜'=>230,'⃡'=>230,'⃥'=>1,'⃦'=>1,'⃧'=>230,'⃨'=>220,'⃩'=>230,'⃪'=>1,'⃫'=>1,'⃬'=>220,'⃭'=>220,'⃮'=>220,'⃯'=>220,'〪'=>218,'〫'=>228,'〬'=>232,'〭'=>222,'〮'=>224,'〯'=>224,'゙'=>8,'゚'=>8,'꠆'=>9,'ﬞ'=>26,'︠'=>230,'︡'=>230,'︢'=>230,'︣'=>230,'𐨍'=>220,'𐨏'=>230,'𐨸'=>230,'𐨹'=>1,'𐨺'=>220,'𐨿'=>9,'𝅥'=>216,'𝅦'=>216,'𝅧'=>1,'𝅨'=>1,'𝅩'=>1,'𝅭'=>226,'𝅮'=>216,'𝅯'=>216,'𝅰'=>216,'𝅱'=>216,'𝅲'=>216,'𝅻'=>220,'𝅼'=>220,'𝅽'=>220,'𝅾'=>220,'𝅿'=>220,'𝆀'=>220,'𝆁'=>220,'𝆂'=>220,'𝆅'=>230,'𝆆'=>230,'𝆇'=>230,'𝆈'=>230,'𝆉'=>230,'𝆊'=>220,'𝆋'=>220,'𝆪'=>230,'𝆫'=>230,'𝆬'=>230,'𝆭'=>230,'𝉂'=>230,'𝉃'=>230,'𝉄'=>230);
diff --git a/phpBB/includes/utf/utf_normalizer.php b/phpBB/includes/utf/utf_normalizer.php
index a77952499a..a208552d53 100644
--- a/phpBB/includes/utf/utf_normalizer.php
+++ b/phpBB/includes/utf/utf_normalizer.php
@@ -2,9 +2,8 @@
/**
*
* @package utf
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -77,7 +76,7 @@ class utf_normalizer
* @param string &$str The dirty string
* @return string The same string, all shiny and cleaned-up
*/
- function cleanup(&$str)
+ static function cleanup(&$str)
{
// The string below is the list of all autorized characters, sorted by frequency in latin text
$pos = strspn($str, "\x20\x65\x69\x61\x73\x6E\x74\x72\x6F\x6C\x75\x64\x5D\x5B\x63\x6D\x70\x27\x0A\x67\x7C\x68\x76\x2E\x66\x62\x2C\x3A\x3D\x2D\x71\x31\x30\x43\x32\x2A\x79\x78\x29\x28\x4C\x39\x41\x53\x2F\x50\x22\x45\x6A\x4D\x49\x6B\x33\x3E\x35\x54\x3C\x44\x34\x7D\x42\x7B\x38\x46\x77\x52\x36\x37\x55\x47\x4E\x3B\x4A\x7A\x56\x23\x48\x4F\x57\x5F\x26\x21\x4B\x3F\x58\x51\x25\x59\x5C\x09\x5A\x2B\x7E\x5E\x24\x40\x60\x7F\x0D");
@@ -119,7 +118,7 @@ class utf_normalizer
* @param string &$str Unchecked UTF string
* @return string The string, validated and in normal form
*/
- function nfc(&$str)
+ static function nfc(&$str)
{
$pos = strspn($str, UTF8_ASCII_RANGE);
$len = strlen($str);
@@ -151,7 +150,7 @@ class utf_normalizer
* @param string &$str Unchecked UTF string
* @return string The string, validated and in normal form
*/
- function nfkc(&$str)
+ static function nfkc(&$str)
{
$pos = strspn($str, UTF8_ASCII_RANGE);
$len = strlen($str);
@@ -183,7 +182,7 @@ class utf_normalizer
* @param string &$str Unchecked UTF string
* @return string The string, validated and in normal form
*/
- function nfd(&$str)
+ static function nfd(&$str)
{
$pos = strspn($str, UTF8_ASCII_RANGE);
$len = strlen($str);
@@ -209,7 +208,7 @@ class utf_normalizer
* @param string &$str Unchecked UTF string
* @return string The string, validated and in normal form
*/
- function nfkd(&$str)
+ static function nfkd(&$str)
{
$pos = strspn($str, UTF8_ASCII_RANGE);
$len = strlen($str);
@@ -242,7 +241,7 @@ class utf_normalizer
*
* @access private
*/
- function recompose($str, $pos, $len, &$qc, &$decomp_map)
+ static function recompose($str, $pos, $len, &$qc, &$decomp_map)
{
global $utf_combining_class, $utf_canonical_comp, $utf_jamo_type, $utf_jamo_index;
@@ -944,7 +943,7 @@ class utf_normalizer
*
* @access private
*/
- function decompose($str, $pos, $len, &$decomp_map)
+ static function decompose($str, $pos, $len, &$decomp_map)
{
global $utf_combining_class;
@@ -1512,5 +1511,3 @@ class utf_normalizer
return $str;
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/utf/utf_tools.php b/phpBB/includes/utf/utf_tools.php
index 6f3ac93305..c402e15032 100644
--- a/phpBB/includes/utf/utf_tools.php
+++ b/phpBB/includes/utf/utf_tools.php
@@ -2,9 +2,8 @@
/**
*
* @package utf
-* @version $Id$
* @copyright (c) 2006 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -109,70 +108,26 @@ if (extension_loaded('mbstring'))
/**
* UTF-8 aware alternative to strrpos
* Find position of last occurrence of a char in a string
- *
- * Notes:
- * - offset for mb_strrpos was added in 5.2.0, we emulate if it is lower
*/
- if (version_compare(PHP_VERSION, '5.2.0', '>='))
+ /**
+ * UTF-8 aware alternative to strrpos
+ * @ignore
+ */
+ function utf8_strrpos($str, $needle, $offset = null)
{
- /**
- * UTF-8 aware alternative to strrpos
- * @ignore
- */
- function utf8_strrpos($str, $needle, $offset = null)
+ // Emulate behaviour of strrpos rather than raising warning
+ if (empty($str))
{
- // Emulate behaviour of strrpos rather than raising warning
- if (empty($str))
- {
- return false;
- }
+ return false;
+ }
- if (is_null($offset))
- {
- return mb_strrpos($str, $needle);
- }
- else
- {
- return mb_strrpos($str, $needle, $offset);
- }
+ if (is_null($offset))
+ {
+ return mb_strrpos($str, $needle);
}
- }
- else
- {
- /**
- * UTF-8 aware alternative to strrpos
- * @ignore
- */
- function utf8_strrpos($str, $needle, $offset = null)
+ else
{
- // offset for mb_strrpos was added in 5.2.0
- if (is_null($offset))
- {
- // Emulate behaviour of strrpos rather than raising warning
- if (empty($str))
- {
- return false;
- }
-
- return mb_strrpos($str, $needle);
- }
- else
- {
- if (!is_int($offset))
- {
- trigger_error('utf8_strrpos expects parameter 3 to be long', E_USER_ERROR);
- return false;
- }
-
- $str = mb_substr($str, $offset);
-
- if (false !== ($pos = mb_strrpos($str, $needle)))
- {
- return $pos + $offset;
- }
-
- return false;
- }
+ return mb_strrpos($str, $needle, $offset);
}
}
@@ -1756,49 +1711,106 @@ function utf8_case_fold_nfc($text, $option = 'full')
return $text;
}
-/**
-* 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).
-*
-* @param mixed $strings a string or an array of strings to normalize
-* @return mixed the normalized content, preserving array keys if array given.
-*/
-function utf8_normalize_nfc($strings)
+if (extension_loaded('intl'))
{
- if (empty($strings))
+ /**
+ * wrapper around PHP's native normalizer from intl
+ * previously a PECL extension, included in the core since PHP 5.3.0
+ * http://php.net/manual/en/normalizer.normalize.php
+ *
+ * @param mixed $strings a string or an array of strings to normalize
+ * @return mixed the normalized content, preserving array keys if array given.
+ */
+ function utf8_normalize_nfc($strings)
{
- return $strings;
- }
+ if (empty($strings))
+ {
+ return $strings;
+ }
- if (!class_exists('utf_normalizer'))
- {
- global $phpbb_root_path, $phpEx;
- include($phpbb_root_path . 'includes/utf/utf_normalizer.' . $phpEx);
- }
+ if (!is_array($strings))
+ {
+ if (Normalizer::isNormalized($strings))
+ {
+ return $strings;
+ }
+ return (string) Normalizer::normalize($strings);
+ }
+ else
+ {
+ foreach ($strings as $key => $string)
+ {
+ if (is_array($string))
+ {
+ foreach ($string as $_key => $_string)
+ {
+ if (Normalizer::isNormalized($strings[$key][$_key]))
+ {
+ continue;
+ }
+ $strings[$key][$_key] = (string) Normalizer::normalize($strings[$key][$_key]);
+ }
+ }
+ else
+ {
+ if (Normalizer::isNormalized($strings[$key]))
+ {
+ continue;
+ }
+ $strings[$key] = (string) Normalizer::normalize($strings[$key]);
+ }
+ }
+ }
- if (!is_array($strings))
- {
- utf_normalizer::nfc($strings);
+ return $strings;
}
- else if (is_array($strings))
+}
+else
+{
+ /**
+ * 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).
+ *
+ * @param mixed $strings a string or an array of strings to normalize
+ * @return mixed the normalized content, preserving array keys if array given.
+ */
+ function utf8_normalize_nfc($strings)
{
- foreach ($strings as $key => $string)
+ if (empty($strings))
+ {
+ return $strings;
+ }
+
+ if (!class_exists('utf_normalizer'))
+ {
+ global $phpbb_root_path, $phpEx;
+ include($phpbb_root_path . 'includes/utf/utf_normalizer.' . $phpEx);
+ }
+
+ if (!is_array($strings))
+ {
+ utf_normalizer::nfc($strings);
+ }
+ else if (is_array($strings))
{
- if (is_array($string))
+ foreach ($strings as $key => $string)
{
- foreach ($string as $_key => $_string)
+ if (is_array($string))
{
- utf_normalizer::nfc($strings[$key][$_key]);
+ foreach ($string as $_key => $_string)
+ {
+ utf_normalizer::nfc($strings[$key][$_key]);
+ }
+ }
+ else
+ {
+ utf_normalizer::nfc($strings[$key]);
}
- }
- else
- {
- utf_normalizer::nfc($strings[$key]);
}
}
- }
- return $strings;
+ return $strings;
+ }
}
/**
@@ -1921,7 +1933,7 @@ function utf8_wordwrap($string, $width = 75, $break = "\n", $cut = false)
* UTF8-safe basename() function
*
* basename() has some limitations and is dependent on the locale setting
-* according to the PHP manual. Therefore we provide our own locale independant
+* according to the PHP manual. Therefore we provide our own locale independent
* basename function.
*
* @param string $filename The filename basename() should be applied to
@@ -1991,5 +2003,3 @@ function utf8_str_replace($search, $replace, $subject)
return $subject;
}
-
-?> \ No newline at end of file
diff --git a/phpBB/index.php b/phpBB/index.php
index 46694a6ec2..49baf33392 100644
--- a/phpBB/index.php
+++ b/phpBB/index.php
@@ -2,9 +2,8 @@
/**
*
* @package phpBB3
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -25,28 +24,64 @@ $user->session_begin();
$auth->acl($user->data);
$user->setup('viewforum');
-display_forums('', $config['load_moderators']);
+// Mark notifications read
+if (($mark_notification = $request->variable('mark_notification', 0)))
+{
+ if ($user->data['user_id'] == ANONYMOUS)
+ {
+ if ($request->is_ajax())
+ {
+ trigger_error('LOGIN_REQUIRED');
+ }
+ login_box('', $user->lang['LOGIN_REQUIRED']);
+ }
-// Set some stats, get posts count from forums data if we... hum... retrieve all forums data
-$total_posts = $config['num_posts'];
-$total_topics = $config['num_topics'];
-$total_users = $config['num_users'];
+ if (check_link_hash($request->variable('hash', ''), 'mark_notification_read'))
+ {
+ $phpbb_notifications = $phpbb_container->get('notification_manager');
-$l_total_user_s = ($total_users == 0) ? 'TOTAL_USERS_ZERO' : 'TOTAL_USERS_OTHER';
-$l_total_post_s = ($total_posts == 0) ? 'TOTAL_POSTS_ZERO' : 'TOTAL_POSTS_OTHER';
-$l_total_topic_s = ($total_topics == 0) ? 'TOTAL_TOPICS_ZERO' : 'TOTAL_TOPICS_OTHER';
+ $notification = $phpbb_notifications->load_notifications(array(
+ 'notification_id' => $mark_notification,
+ ));
+ if (isset($notification['notifications'][$mark_notification]))
+ {
+ $notification = $notification['notifications'][$mark_notification];
+
+ $notification->mark_read();
+
+ if ($request->is_ajax())
+ {
+ $json_response = new \phpbb\json_response();
+ $json_response->send(array(
+ 'success' => true,
+ ));
+ }
+
+ if (($redirect = $request->variable('redirect', '')))
+ {
+ redirect(append_sid($phpbb_root_path . $redirect));
+ }
+
+ redirect($notification->get_url());
+ }
+ }
+}
+
+display_forums('', $config['load_moderators']);
+
+$order_legend = ($config['legend_sort_groupname']) ? 'group_name' : 'group_legend';
// Grab group details for legend display
if ($auth->acl_gets('a_group', 'a_groupadd', 'a_groupdel'))
{
- $sql = 'SELECT group_id, group_name, group_colour, group_type
+ $sql = 'SELECT group_id, group_name, group_colour, group_type, group_legend
FROM ' . GROUPS_TABLE . '
- WHERE group_legend = 1
- ORDER BY group_name ASC';
+ WHERE group_legend > 0
+ ORDER BY ' . $order_legend . ' ASC';
}
else
{
- $sql = 'SELECT g.group_id, g.group_name, g.group_colour, g.group_type
+ $sql = 'SELECT g.group_id, g.group_name, g.group_colour, g.group_type, g.group_legend
FROM ' . GROUPS_TABLE . ' g
LEFT JOIN ' . USER_GROUP_TABLE . ' ug
ON (
@@ -54,9 +89,9 @@ else
AND ug.user_id = ' . $user->data['user_id'] . '
AND ug.user_pending = 0
)
- WHERE g.group_legend = 1
+ WHERE g.group_legend > 0
AND (g.group_type <> ' . GROUP_HIDDEN . ' OR ug.user_id = ' . $user->data['user_id'] . ')
- ORDER BY g.group_name ASC';
+ ORDER BY g.' . $order_legend . ' ASC';
}
$result = $db->sql_query($sql);
@@ -77,17 +112,18 @@ while ($row = $db->sql_fetchrow($result))
}
$db->sql_freeresult($result);
-$legend = implode(', ', $legend);
+$legend = implode($user->lang['COMMA_SEPARATOR'], $legend);
// Generate birthday list if required ...
-$birthday_list = '';
+$birthday_list = array();
if ($config['load_birthdays'] && $config['allow_birthdays'] && $auth->acl_gets('u_viewprofile', 'a_user', 'a_useradd', 'a_userdel'))
{
- $now = phpbb_gmgetdate(time() + $user->timezone + $user->dst);
+ $time = $user->create_datetime();
+ $now = phpbb_gmgetdate($time->getTimestamp() + $time->getOffset());
// Display birthdays of 29th february on 28th february in non-leap-years
$leap_year_birthdays = '';
- if ($now['mday'] == 28 && $now['mon'] == 2 && !$user->format_date(time(), 'L'))
+ if ($now['mday'] == 28 && $now['mon'] == 2 && !$time->format('L'))
{
$leap_year_birthdays = " OR u.user_birthday LIKE '" . $db->sql_escape(sprintf('%2d-%2d-', 29, 2)) . "%'";
}
@@ -103,11 +139,19 @@ if ($config['load_birthdays'] && $config['allow_birthdays'] && $auth->acl_gets('
while ($row = $db->sql_fetchrow($result))
{
- $birthday_list .= (($birthday_list != '') ? ', ' : '') . get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']);
+ $birthday_username = get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']);
+ $birthday_year = (int) substr($row['user_birthday'], -4);
+ $birthday_age = ($birthday_year) ? max(0, $now['year'] - $birthday_year) : '';
+
+ $template->assign_block_vars('birthdays', array(
+ 'USERNAME' => $birthday_username,
+ 'AGE' => $birthday_age,
+ ));
+ // For 3.0 compatibility
if ($age = (int) substr($row['user_birthday'], -4))
{
- $birthday_list .= ' (' . max(0, $now['year'] - $age) . ')';
+ $birthday_list[] = $birthday_username . (($birthday_year) ? ' (' . $birthday_age . ')' : '');
}
}
$db->sql_freeresult($result);
@@ -115,13 +159,13 @@ if ($config['load_birthdays'] && $config['allow_birthdays'] && $auth->acl_gets('
// Assign index specific vars
$template->assign_vars(array(
- 'TOTAL_POSTS' => sprintf($user->lang[$l_total_post_s], $total_posts),
- 'TOTAL_TOPICS' => sprintf($user->lang[$l_total_topic_s], $total_topics),
- 'TOTAL_USERS' => sprintf($user->lang[$l_total_user_s], $total_users),
- 'NEWEST_USER' => sprintf($user->lang['NEWEST_USER'], get_username_string('full', $config['newest_user_id'], $config['newest_username'], $config['newest_user_colour'])),
+ 'TOTAL_POSTS' => $user->lang('TOTAL_POSTS_COUNT', (int) $config['num_posts']),
+ 'TOTAL_TOPICS' => $user->lang('TOTAL_TOPICS', (int) $config['num_topics']),
+ 'TOTAL_USERS' => $user->lang('TOTAL_USERS', (int) $config['num_users']),
+ 'NEWEST_USER' => $user->lang('NEWEST_USER', get_username_string('full', $config['newest_user_id'], $config['newest_username'], $config['newest_user_colour'])),
'LEGEND' => $legend,
- 'BIRTHDAY_LIST' => $birthday_list,
+ 'BIRTHDAY_LIST' => (empty($birthday_list)) ? '' : implode($user->lang['COMMA_SEPARATOR'], $birthday_list),
'FORUM_IMG' => $user->img('forum_read', 'NO_UNREAD_POSTS'),
'FORUM_UNREAD_IMG' => $user->img('forum_unread', 'UNREAD_POSTS'),
@@ -129,19 +173,30 @@ $template->assign_vars(array(
'FORUM_UNREAD_LOCKED_IMG' => $user->img('forum_unread_locked', 'UNREAD_POSTS_LOCKED'),
'S_LOGIN_ACTION' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=login'),
+ 'U_SEND_PASSWORD' => ($config['email_enable']) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=sendpassword') : '',
'S_DISPLAY_BIRTHDAY_LIST' => ($config['load_birthdays']) ? true : false,
- 'U_MARK_FORUMS' => ($user->data['is_registered'] || $config['load_anon_lastread']) ? append_sid("{$phpbb_root_path}index.$phpEx", 'hash=' . generate_link_hash('global') . '&amp;mark=forums') : '',
+ 'U_MARK_FORUMS' => ($user->data['is_registered'] || $config['load_anon_lastread']) ? append_sid("{$phpbb_root_path}index.$phpEx", 'hash=' . generate_link_hash('global') . '&amp;mark=forums&amp;mark_time=' . time()) : '',
'U_MCP' => ($auth->acl_get('m_') || $auth->acl_getf_global('m_')) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=main&amp;mode=front', true, $user->session_id) : '')
);
+$page_title = $user->lang['INDEX'];
+
+/**
+* You can use this event to modify the page title and load data for the index
+*
+* @event core.index_modify_page_title
+* @var string page_title Title of the index page
+* @since 3.1-A1
+*/
+$vars = array('page_title');
+extract($phpbb_dispatcher->trigger_event('core.index_modify_page_title', compact($vars)));
+
// Output page
-page_header($user->lang['INDEX']);
+page_header($page_title, true);
$template->set_filenames(array(
'body' => 'index_body.html')
);
page_footer();
-
-?> \ No newline at end of file
diff --git a/phpBB/install/convertors/convert_phpbb20.php b/phpBB/install/convertors/convert_phpbb20.php
index f1127da8aa..e8c8a7431d 100644
--- a/phpBB/install/convertors/convert_phpbb20.php
+++ b/phpBB/install/convertors/convert_phpbb20.php
@@ -2,9 +2,8 @@
/**
*
* @package install
-* @version $Id$
* @copyright (c) 2006 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -25,6 +24,8 @@ if (!defined('IN_PHPBB'))
include($phpbb_root_path . 'config.' . $phpEx);
unset($dbpasswd);
+$dbms = phpbb_convert_30_dbms_to_31($dbms);
+
/**
* $convertor_data provides some basic information about this convertor which is
* used on the initial list of convertors and to populate the default settings
@@ -32,7 +33,7 @@ unset($dbpasswd);
$convertor_data = array(
'forum_name' => 'phpBB 2.0.x',
'version' => '1.0.3',
- 'phpbb_version' => '3.0.12',
+ 'phpbb_version' => '3.1.0-b1',
'author' => '<a href="https://www.phpbb.com/">phpBB Group</a>',
'dbms' => $dbms,
'dbhost' => $dbhost,
@@ -135,7 +136,7 @@ $config_schema = array(
'avatar_max_width' => 'avatar_max_width',
'avatar_max_height' => 'avatar_max_height',
'default_dateformat' => 'phpbb_set_encoding(default_dateformat)',
- 'board_timezone' => 'board_timezone',
+ 'board_timezone' => 'phpbb_convert_timezone(board_timezone)',
'allow_privmsg' => 'not(privmsg_disable)',
'gzip_compress' => 'gzip_compress',
'coppa_enable' => '!is_empty(coppa_mail)',
@@ -340,6 +341,9 @@ if (!$get_info)
update_folder_pm_count();
', '
update_unread_count();
+ ', (defined('MOD_ATTACHMENT')) ? '
+ phpbb_attachment_extension_group_name();
+ ' : '
', '
phpbb_convert_authentication(\'start\');
', '
@@ -398,7 +402,7 @@ if (!$get_info)
array('is_orphan', 0, ''),
array('poster_id', 'attachments.user_id_1 AS poster_id', 'phpbb_user_id'),
array('physical_filename', 'attachments_desc.physical_filename', 'import_attachment'),
- array('real_filename', 'attachments_desc.real_filename', ''),
+ array('real_filename', 'attachments_desc.real_filename', 'phpbb_set_encoding'),
array('download_count', 'attachments_desc.download_count', ''),
array('attach_comment', 'attachments_desc.comment', array('function1' => 'phpbb_set_encoding', 'function2' => 'utf8_htmlspecialchars')),
array('extension', 'attachments_desc.extension', ''),
@@ -496,14 +500,17 @@ if (!$get_info)
array('topic_title', 'topics.topic_title', 'phpbb_set_encoding'),
array('topic_time', 'topics.topic_time', ''),
array('topic_views', 'topics.topic_views', ''),
- array('topic_replies', 'topics.topic_replies', ''),
- array('topic_replies_real', 'topics.topic_replies', ''),
+ array('topic_posts_approved', 'topics.topic_replies', 'phpbb_topic_replies_to_posts'),
+ array('topic_posts_unapproved', 0, ''),
+ array('topic_posts_softdeleted',0, ''),
array('topic_last_post_id', 'topics.topic_last_post_id', ''),
array('topic_status', 'topics.topic_status', 'is_topic_locked'),
array('topic_moved_id', 0, ''),
array('topic_type', 'topics.topic_type', 'phpbb_convert_topic_type'),
array('topic_first_post_id', 'topics.topic_first_post_id', ''),
array('topic_last_view_time', 'posts.post_time', 'intval'),
+ array('topic_visibility', ITEM_APPROVED, ''),
+
array('poll_title', 'vote_desc.vote_text', array('function1' => 'null_to_str', 'function2' => 'phpbb_set_encoding', 'function3' => 'htmlspecialchars_decode', 'function4' => 'utf8_htmlspecialchars')),
array('poll_start', 'vote_desc.vote_start', 'null_to_zero'),
array('poll_length', 'vote_desc.vote_length', 'null_to_zero'),
@@ -529,13 +536,15 @@ if (!$get_info)
array('topic_title', 'topics.topic_title', 'phpbb_set_encoding'),
array('topic_time', 'topics.topic_time', ''),
array('topic_views', 'topics.topic_views', ''),
- array('topic_replies', 'topics.topic_replies', ''),
- array('topic_replies_real', 'topics.topic_replies', ''),
+ array('topic_posts_approved', 'topics.topic_replies', 'phpbb_topic_replies_to_posts'),
+ array('topic_posts_unapproved', 0, ''),
+ array('topic_posts_softdeleted',0, ''),
array('topic_last_post_id', 'topics.topic_last_post_id', ''),
array('topic_status', ITEM_MOVED, ''),
array('topic_moved_id', 'topics.topic_moved_id', ''),
array('topic_type', 'topics.topic_type', 'phpbb_convert_topic_type'),
array('topic_first_post_id', 'topics.topic_first_post_id', ''),
+ array('topic_visibility', ITEM_APPROVED, ''),
array('poll_title', 'vote_desc.vote_text', array('function1' => 'null_to_str', 'function2' => 'phpbb_set_encoding', 'function3' => 'htmlspecialchars_decode', 'function4' => 'utf8_htmlspecialchars')),
array('poll_start', 'vote_desc.vote_start', 'null_to_zero'),
@@ -643,6 +652,7 @@ if (!$get_info)
array('post_edit_count', 'posts.post_edit_count', ''),
array('post_edit_reason', '', ''),
array('post_edit_user', '', 'phpbb_post_edit_user'),
+ array('post_visibility', ITEM_APPROVED, ''),
array('bbcode_uid', 'posts.post_time', 'make_uid'),
array('post_text', 'posts_text.post_text', 'phpbb_prepare_message'),
@@ -818,7 +828,10 @@ if (!$get_info)
array(
'target' => GROUPS_TABLE,
'autoincrement' => 'group_id',
- 'query_first' => array('target', $convert->truncate_statement . GROUPS_TABLE),
+ 'query_first' => array(
+ array('target', $convert->truncate_statement . GROUPS_TABLE),
+ array('target', $convert->truncate_statement . TEAMPAGE_TABLE),
+ ),
array('group_id', 'groups.group_id', ''),
array('group_type', 'groups.group_type', 'phpbb_convert_group_type'),
@@ -835,6 +848,7 @@ if (!$get_info)
'query_first' => array('target', $convert->truncate_statement . USER_GROUP_TABLE),
'execute_first' => '
add_default_groups();
+ add_groups_to_teampage();
',
array('group_id', 'groups.group_id', ''),
@@ -862,7 +876,8 @@ if (!$get_info)
'autoincrement' => 'user_id',
'query_first' => array(
array('target', 'DELETE FROM ' . USERS_TABLE . ' WHERE user_id <> ' . ANONYMOUS),
- array('target', $convert->truncate_statement . BOTS_TABLE)
+ array('target', $convert->truncate_statement . BOTS_TABLE),
+ array('target', $convert->truncate_statement . USER_NOTIFICATIONS_TABLE),
),
'execute_last' => '
@@ -886,20 +901,12 @@ if (!$get_info)
array('user_lastmark', 'users.user_lastvisit', 'intval'),
array('user_lang', $config['default_lang'], ''),
array('', 'users.user_lang', ''),
- array('user_timezone', 'users.user_timezone', 'floatval'),
+ array('user_timezone', 'users.user_timezone', 'phpbb_convert_timezone'),
array('user_dateformat', 'users.user_dateformat', array('function1' => 'phpbb_set_encoding', 'function2' => 'fill_dateformat')),
array('user_inactive_reason', '', 'phpbb_inactive_reason'),
array('user_inactive_time', '', 'phpbb_inactive_time'),
- array('user_interests', 'users.user_interests', array('function1' => 'phpbb_set_encoding')),
- array('user_occ', 'users.user_occ', array('function1' => 'phpbb_set_encoding')),
- array('user_website', 'users.user_website', 'validate_website'),
array('user_jabber', '', ''),
- array('user_msnm', 'users.user_msnm', array('function1' => 'phpbb_set_encoding')),
- array('user_yim', 'users.user_yim', array('function1' => 'phpbb_set_encoding')),
- array('user_aim', 'users.user_aim', array('function1' => 'phpbb_set_encoding')),
- array('user_icq', 'users.user_icq', array('function1' => 'phpbb_set_encoding')),
- array('user_from', 'users.user_from', array('function1' => 'phpbb_set_encoding')),
array('user_rank', 'users.user_rank', 'intval'),
array('user_permissions', '', ''),
@@ -935,10 +942,30 @@ if (!$get_info)
array('user_sig_bbcode_bitfield', '', 'get_bbcode_bitfield'),
array('', 'users.user_regdate AS post_time', ''),
+ array('', 'users.user_notify_pm', 'phpbb_add_notification_options'),
+
+ 'where' => 'users.user_id <> -1',
+ ),
+
+ array(
+ 'target' => PROFILE_FIELDS_DATA_TABLE,
+ 'primary' => 'users.user_id',
+ 'query_first' => array(
+ array('target', $convert->truncate_statement . PROFILE_FIELDS_DATA_TABLE),
+ ),
+
+ array('user_id', 'users.user_id', 'phpbb_user_id'),
+ array('pf_phpbb_occupation', 'users.user_occ', array('function1' => 'phpbb_set_encoding')),
+ array('pf_phpbb_interests', 'users.user_interests', array('function1' => 'phpbb_set_encoding')),
+ array('pf_phpbb_location', 'users.user_from', array('function1' => 'phpbb_set_encoding')),
+ array('pf_phpbb_icq', 'users.user_icq', array('function1' => 'phpbb_set_encoding')),
+ array('pf_phpbb_wlm', 'users.user_msnm', array('function1' => 'phpbb_set_encoding')),
+ array('pf_phpbb_yahoo', 'users.user_yim', array('function1' => 'phpbb_set_encoding')),
+ array('pf_phpbb_aol', 'users.user_aim', array('function1' => 'phpbb_set_encoding')),
+ array('pf_phpbb_website', 'users.user_website', 'validate_website'),
+
'where' => 'users.user_id <> -1',
),
),
);
}
-
-?> \ No newline at end of file
diff --git a/phpBB/install/convertors/functions_phpbb20.php b/phpBB/install/convertors/functions_phpbb20.php
index 466f57a572..29e5f7ab09 100644
--- a/phpBB/install/convertors/functions_phpbb20.php
+++ b/phpBB/install/convertors/functions_phpbb20.php
@@ -2,9 +2,8 @@
/**
*
* @package install
-* @version $Id$
* @copyright (c) 2006 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -14,7 +13,7 @@ if (!defined('IN_PHPBB'))
}
/**
-* Helper functions for phpBB 2.0.x to phpBB 3.0.x conversion
+* Helper functions for phpBB 2.0.x to phpBB 3.1.x conversion
*/
/**
@@ -244,9 +243,12 @@ function phpbb_insert_forums()
'forum_rules_options' => 7,
'forum_rules_uid' => '',
'forum_topics_per_page' => 0,
- 'forum_posts' => 0,
- 'forum_topics' => 0,
- 'forum_topics_real' => 0,
+ 'forum_posts_approved' => 0,
+ 'forum_posts_unapproved' => 0,
+ 'forum_posts_softdeleted' => 0,
+ 'forum_topics_approved' => 0,
+ 'forum_topics_unapproved' => 0,
+ 'forum_topics_softdeleted' => 0,
'forum_last_post_id' => 0,
'forum_last_poster_id' => 0,
'forum_last_post_subject' => '',
@@ -458,7 +460,7 @@ function phpbb_get_birthday($birthday = '')
{
$birthday = (int) $birthday;
- if (!$birthday || $birthday == 999999 || ((version_compare(PHP_VERSION, '5.1.0') < 0) && $birthday < 0))
+ if (!$birthday || $birthday == 999999)
{
return ' 0- 0- 0';
}
@@ -538,6 +540,15 @@ function phpbb_user_id($user_id)
return (int) $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
+*/
+function phpbb_topic_replies_to_posts($num_replies)
+{
+ return (int) $num_replies + 1;
+}
+
/* Copy additional table fields from old forum to new forum if user wants this (for Mod compatibility for example)
function phpbb_copy_table_fields()
{
@@ -1404,6 +1415,55 @@ function phpbb_attachment_category($cat_id)
}
/**
+* Convert the attachment extension names
+* This is only used if the Attachment MOD was installed
+*/
+function phpbb_attachment_extension_group_name()
+{
+ global $db, $phpbb_root_path, $phpEx;
+
+ // Update file extension group names to use language strings.
+ $sql = 'SELECT lang_dir
+ FROM ' . LANG_TABLE;
+ $result = $db->sql_query($sql);
+
+ $extension_groups_updated = array();
+ while ($lang_dir = $db->sql_fetchfield('lang_dir'))
+ {
+ $lang_dir = basename($lang_dir);
+ $lang_file = $phpbb_root_path . 'language/' . $lang_dir . '/acp/attachments.' . $phpEx;
+
+ if (!file_exists($lang_file))
+ {
+ continue;
+ }
+
+ $lang = array();
+ include($lang_file);
+
+ foreach ($lang as $lang_key => $lang_val)
+ {
+ if (isset($extension_groups_updated[$lang_key]) || strpos($lang_key, 'EXT_GROUP_') !== 0)
+ {
+ continue;
+ }
+
+ $sql_ary = array(
+ 'group_name' => substr($lang_key, 10), // Strip off 'EXT_GROUP_'
+ );
+
+ $sql = 'UPDATE ' . EXTENSION_GROUPS_TABLE . '
+ SET ' . $db->sql_build_array('UPDATE', $sql_ary) . "
+ WHERE group_name = '" . $db->sql_escape($lang_val) . "'";
+ $db->sql_query($sql);
+
+ $extension_groups_updated[$lang_key] = true;
+ }
+ }
+ $db->sql_freeresult($result);
+}
+
+/**
* Obtain list of forums in which different attachment categories can be used
*/
function phpbb_attachment_forum_perms($forum_permissions)
@@ -1867,4 +1927,49 @@ function phpbb_check_username_collisions()
$db->sql_query($drop_sql);
}
-?> \ No newline at end of file
+function phpbb_convert_timezone($timezone)
+{
+ global $config, $db, $phpbb_root_path, $phpEx, $table_prefix;
+ $timezone_migration = new \phpbb\db\migration\data\v310\timezone($config, $db, new \phpbb\db\tools($db), $phpbb_root_path, $phpEx, $table_prefix);
+ return $timezone_migration->convert_phpbb30_timezone($timezone, 0);
+}
+
+function phpbb_add_notification_options($user_notify_pm)
+{
+ global $convert_row, $db;
+
+ $user_id = phpbb_user_id($convert_row['user_id']);
+ if ($user_id == ANONYMOUS)
+ {
+ return;
+ }
+
+ $rows = array();
+
+ $rows[] = array(
+ 'item_type' => 'post',
+ 'item_id' => 0,
+ 'user_id' => (int) $user_id,
+ 'notify' => 1,
+ 'method' => 'email',
+ );
+ $rows[] = array(
+ 'item_type' => 'topic',
+ 'item_id' => 0,
+ 'user_id' => (int) $user_id,
+ 'notify' => 1,
+ 'method' => 'email',
+ );
+ if ($user_notify_pm)
+ {
+ $rows[] = array(
+ 'item_type' => 'pm',
+ 'item_id' => 0,
+ 'user_id' => (int) $user_id,
+ 'notify' => 1,
+ 'method' => 'email',
+ );
+ }
+
+ $sql = $db->sql_multi_insert(USER_NOTIFICATIONS_TABLE, $rows);
+}
diff --git a/phpBB/install/data/confusables.php b/phpBB/install/data/confusables.php
index c543ddfc81..f5d3b11731 100644
--- a/phpBB/install/data/confusables.php
+++ b/phpBB/install/data/confusables.php
@@ -2,9 +2,8 @@
/**
*
* @package install
-* @version $Id$
* @copyright (c) 2007 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -646,5 +645,3 @@ function utf8_new_case_fold_nfkc($text, $option = 'full')
}
return array('¡'=>'i','ǃ'=>'!','α'=>'a',' '=>' ','­'=>'','۝'=>'','܏'=>'','᠆'=>'','᠎'=>'','​'=>'','‌'=>'','‍'=>'','
'=>'','
'=>'','⁠'=>'','⁡'=>'','⁢'=>'','⁣'=>'',''=>'',''=>'',''=>'',''=>'',''=>'',''=>'',''=>'',''=>'',''=>'',''=>'',''=>'','𝅳'=>'','𝅴'=>'','𝅵'=>'','𝅶'=>'','𝅷'=>'','𝅸'=>'','𝅹'=>'','𝅺'=>'','۬'=>'۟','̓'=>'̓','ُ'=>'̓','֜'=>'́','́'=>'́','݇'=>'́','॔'=>'́','̀'=>'̀','॓'=>'̀','̌'=>'̆','̑'=>'̂','֯'=>'̊','ஂ'=>'̊','ํ'=>'̊','ໍ'=>'̊','ံ'=>'̊','ំ'=>'̊','៓'=>'̊','゚'=>'̊','゚'=>'̊','ͦ'=>'̊','͂'=>'̃','ׄ'=>'̇','ֹ'=>'̇','ׂ'=>'̇','ׁ'=>'̇','݁'=>'̇','ं'=>'̇','ਂ'=>'̇','ં'=>'̇','்'=>'̇','̅'=>'̄','〬'=>'̉','̱'=>'̠','॒'=>'̠','̧'=>'̡','̦'=>'̡','̨'=>'̢','़'=>'̣','়'=>'̣','਼'=>'̣','઼'=>'̣','଼'=>'̣','͇'=>'̳','̶'=>'̵','ﱞ'=>'ﹲّ','ﱟ'=>'ﹴّ','ﳲ'=>'ﹷّ','ﱠ'=>'ﹶّ','ﳳ'=>'ﹹّ','ﱡ'=>'ﹸّ','ﳴ'=>'ﹻّ','ﱢ'=>'ﹺّ','ﱣ'=>'ﹼٰ','ٴ'=>'ٔ','݂'=>'ܼ','౦'=>'o','೦'=>'o','゙'=>'゙',' '=>' ',' '=>' ',' '=>' ',' '=>' ',' '=>' ',' '=>' ',' '=>' ',' '=>' ',' '=>' ',' '=>' ',' '=>' ',' '=>' ',' '=>' ',' '=>' ',' '=>' ','`'=>'`','`'=>'`','῀'=>'˜','^'=>'^','︿'=>'^','_'=>'_','﹍'=>'_','﹎'=>'_','﹏'=>'_','⌇'=>'︴','-'=>'-','‐'=>'-','‑'=>'-','‒'=>'-','–'=>'-','﹘'=>'-','∼'=>'⁓','・'=>'・','•'=>'・',','=>',','‚'=>',','٬'=>'،','、'=>'、',';'=>';',';'=>';',':'=>':','։'=>':','︰'=>':','׃'=>':','⩴'=>'::=','.'=>'.','․'=>'.','܂'=>'.','‥'=>'..','…'=>'...','。'=>'。','·'=>'·','‧'=>'·','∙'=>'·','⋅'=>'·','ᐧ'=>'·','ᔯ'=>'·4','ᐌ'=>'·ᐁ','ᐎ'=>'·ᐃ','ᐐ'=>'·ᐄ','ᐒ'=>'·ᐅ','ᐔ'=>'·ᐆ','ᐗ'=>'·ᐊ','ᐙ'=>'·ᐋ','ᐷ'=>'·ᐳ','ᑀ'=>'·ᐳ','ᑂ'=>'·ᐴ','ᑄ'=>'·ᐸ','ᑆ'=>'·ᐹ','ᑗ'=>'·ᑌ','ᑙ'=>'·ᑎ','ᑛ'=>'·ᑏ','ᑔ'=>'·ᑐ','ᑝ'=>'·ᑐ','ᑟ'=>'·ᑑ','ᑡ'=>'·ᑕ','ᑣ'=>'·ᑖ','ᑴ'=>'·ᑫ','ᑸ'=>'·ᑮ','ᑼ'=>'·ᑰ','ᑾ'=>'·ᑲ','ᒀ'=>'·ᑳ','ᒒ'=>'·ᒉ','ᒔ'=>'·ᒋ','ᒖ'=>'·ᒌ','ᒚ'=>'·ᒎ','ᒜ'=>'·ᒐ','ᒞ'=>'·ᒑ','ᒬ'=>'·ᒣ','ᒮ'=>'·ᒥ','ᒰ'=>'·ᒦ','ᒲ'=>'·ᒧ','ᒴ'=>'·ᒨ','ᒶ'=>'·L','ᒸ'=>'·ᒫ','ᓉ'=>'·ᓀ','ᓋ'=>'·ᓇ','ᓍ'=>'·ᓈ','ᓜ'=>'·ᓓ','ᓞ'=>'·ᓕ','ᓠ'=>'·ᓖ','ᓢ'=>'·ᓗ','ᓤ'=>'·ᓘ','ᓦ'=>'·ᓚ','ᓨ'=>'·ᓛ','ᓶ'=>'·ᓭ','ᓸ'=>'·ᓯ','ᓺ'=>'·ᓰ','ᓼ'=>'·ᓱ','ᓾ'=>'·ᓲ','ᔀ'=>'·ᓴ','ᔂ'=>'·ᓵ','ᔗ'=>'·ᔐ','ᔙ'=>'·ᔑ','ᔛ'=>'·ᔒ','ᔝ'=>'·ᔓ','ᔟ'=>'·ᔔ','ᔡ'=>'·ᔕ','ᔣ'=>'·ᔖ','ᔱ'=>'·ᔨ','ᔳ'=>'·ᔩ','ᔵ'=>'·ᔪ','ᔷ'=>'·ᔫ','ᔹ'=>'·ᔭ','ᔻ'=>'·ᔮ','ᕎ'=>'·ᕌ','ᕛ'=>'·ᕚ','ᕨ'=>'·ᕧ','('=>'(','⑴'=>'(1)','⒧'=>'(l)','⑽'=>'(10)','⑾'=>'(11)','⑿'=>'(12)','⒀'=>'(13)','⒁'=>'(14)','⒂'=>'(15)','⒃'=>'(16)','⒄'=>'(17)','⒅'=>'(18)','⒆'=>'(19)','⑵'=>'(2)','⒇'=>'(20)','⑶'=>'(3)','⑷'=>'(4)','⑸'=>'(5)','⑹'=>'(6)','⑺'=>'(7)','⑻'=>'(8)','⑼'=>'(9)','⒜'=>'(a)','⒝'=>'(b)','⒞'=>'(c)','⒟'=>'(d)','⒠'=>'(e)','⒡'=>'(f)','⒢'=>'(g)','⒣'=>'(h)','⒤'=>'(i)','⒥'=>'(j)','⒦'=>'(k)','⒨'=>'(m)','⒩'=>'(n)','⒪'=>'(o)','⒫'=>'(p)','⒬'=>'(q)','⒭'=>'(r)','⒮'=>'(s)','⒯'=>'(t)','⒰'=>'(u)','⒱'=>'(v)','⒲'=>'(w)','⒳'=>'(x)','⒴'=>'(y)','⒵'=>'(z)','㈀'=>'(ᄀ)','㈎'=>'(가)','㈁'=>'(ᄂ)','㈏'=>'(나)','㈂'=>'(ᄃ)','㈐'=>'(다)','㈃'=>'(ᄅ)','㈑'=>'(라)','㈄'=>'(ᄆ)','㈒'=>'(마)','㈅'=>'(ᄇ)','㈓'=>'(바)','㈆'=>'(ᄉ)','㈔'=>'(사)','㈇'=>'(ᄋ)','㈕'=>'(아)','㈝'=>'(오전)','㈞'=>'(오후)','㈈'=>'(ᄌ)','㈖'=>'(자)','㈜'=>'(주)','㈉'=>'(ᄎ)','㈗'=>'(차)','㈊'=>'(ᄏ)','㈘'=>'(카)','㈋'=>'(ᄐ)','㈙'=>'(타)','㈌'=>'(ᄑ)','㈚'=>'(파)','㈍'=>'(ᄒ)','㈛'=>'(하)','㈠'=>'(一)','㈦'=>'(七)','㈢'=>'(三)','㈨'=>'(九)','㈡'=>'(二)','㈤'=>'(五)','㈹'=>'(代)','㈽'=>'(企)','㉁'=>'(休)','㈧'=>'(八)','㈥'=>'(六)','㈸'=>'(労)','㈩'=>'(十)','㈿'=>'(協)','㈴'=>'(名)','㈺'=>'(呼)','㈣'=>'(四)','㈯'=>'(土)','㈻'=>'(学)','㈰'=>'(日)','㈪'=>'(月)','㈲'=>'(有)','㈭'=>'(木)','㈱'=>'(株)','㈬'=>'(水)','㈫'=>'(火)','㈵'=>'(特)','㈼'=>'(監)','㈳'=>'(社)','㈷'=>'(祝)','㉀'=>'(祭)','㉂'=>'(自)','㉃'=>'(至)','㈶'=>'(財)','㈾'=>'(資)','㈮'=>'(金)',')'=>')','['=>'[','〔'=>'[',']'=>']','〕'=>']','{'=>'{','}'=>'}','⦅'=>'⦅','⦆'=>'⦆','「'=>'「','」'=>'」','@'=>'@','*'=>'*','/'=>'/','⁄'=>'/','∕'=>'/','\'=>'\\','&'=>'&','#'=>'#','%'=>'%','‶'=>'‵‵','‷'=>'‵‵‵','༌'=>'་','´'=>'ʹ','΄'=>'ʹ','´'=>'ʹ','\''=>'ʹ','''=>'ʹ','′'=>'ʹ','׳'=>'ʹ','ʹ'=>'ʹ','ˊ'=>'ʹ','"'=>'ʹʹ','"'=>'ʹʹ','″'=>'ʹʹ','〃'=>'ʹʹ','״'=>'ʹʹ','ʺ'=>'ʹʹ','‴'=>'ʹʹʹ','⁗'=>'ʹʹʹʹ','¯'=>'ˉ',' ̄'=>'ˉ','‾'=>'ˉ','﹉'=>'ˉ','﹊'=>'ˉ','﹋'=>'ˉ','﹌'=>'ˉ','˚'=>'°','௵'=>'௳','←'=>'←','→'=>'→','↑'=>'↑','↓'=>'↓','↵'=>'↲','⨡'=>'↾','𝛛'=>'∂','𝜕'=>'∂','𝝏'=>'∂','𝞉'=>'∂','𝟃'=>'∂','𝛁'=>'∇','𝛻'=>'∇','𝜵'=>'∇','𝝯'=>'∇','𝞩'=>'∇','+'=>'+','﬩'=>'+','‹'=>'<','<'=>'<','='=>'=','⩵'=>'==','⩶'=>'===','›'=>'>','>'=>'>','¬'=>'¬','¦'=>'¦','〜'=>'~','~'=>'~','﹨'=>'∖','⋀'=>'∧','⋁'=>'∨','⋂'=>'∩','⋃'=>'∪','∯'=>'∮∮','∰'=>'∮∮∮','≣'=>'≡','♁'=>'⊕','☉'=>'⊙','⟂'=>'⊥','▷'=>'⊲','⨝'=>'⋈','⨽'=>'⌙','☸'=>'⎈','⎮'=>'⎥','│'=>'│','▐'=>'▌','■'=>'■','☐'=>'□','○'=>'○','⦾'=>'◎','〛'=>'⟧','〈'=>'⟨','〈'=>'⟨','〉'=>'⟩','〉'=>'⟩','⧙'=>'⦚','〶'=>'〒','ー'=>'ー','¢'=>'¢','$'=>'$','£'=>'£','¥'=>'Y̵','₩'=>'W̵','0'=>'0','𝟎'=>'0','𝟘'=>'0','𝟢'=>'0','𝟬'=>'0','𝟶'=>'0','০'=>'0','୦'=>'0','௦'=>'0','᠐'=>'0','〇'=>'0','𝐎'=>'0','𝑂'=>'0','𝑶'=>'0','𝒪'=>'0','𝓞'=>'0','𝔒'=>'0','𝕆'=>'0','𝕺'=>'0','𝖮'=>'0','𝗢'=>'0','𝘖'=>'0','𝙊'=>'0','𝙾'=>'0','𝚶'=>'0','𝛰'=>'0','𝜪'=>'0','𝝤'=>'0','𝞞'=>'0','ⵔ'=>'0','ഠ'=>'0','⊖'=>'0̵','𝚯'=>'0̵','𝚹'=>'0̵','𝛩'=>'0̵','𝛳'=>'0̵','𝜣'=>'0̵','𝜭'=>'0̵','𝝝'=>'0̵','𝝧'=>'0̵','𝞗'=>'0̵','𝞡'=>'0̵','ⴱ'=>'0̵','Ꮎ'=>'0̵','۰'=>'٠','᭜'=>'᭐','㍘'=>'0点','1'=>'1','𝟏'=>'1','𝟙'=>'1','𝟣'=>'1','𝟭'=>'1','𝟷'=>'1','ℐ'=>'1','ℑ'=>'1','𝐈'=>'1','𝐼'=>'1','𝑰'=>'1','𝓘'=>'1','𝕀'=>'1','𝕴'=>'1','𝖨'=>'1','𝗜'=>'1','𝘐'=>'1','𝙄'=>'1','𝙸'=>'1','l'=>'l','l'=>'l','ⅼ'=>'1','ℓ'=>'l','𝐥'=>'l','𝑙'=>'l','𝒍'=>'l','𝓁'=>'l','𝓵'=>'l','𝔩'=>'l','𝕝'=>'l','𝖑'=>'l','𝗅'=>'l','𝗹'=>'l','𝘭'=>'l','𝙡'=>'l','𝚕'=>'l','𝚰'=>'l','𝛪'=>'l','𝜤'=>'l','𝝞'=>'l','𝞘'=>'l','①'=>'➀','ɭ'=>'l̢','ɫ'=>'l̴','ƚ'=>'l̵','ł'=>'l̷','۱'=>'١','⒈'=>'1.','ŀ'=>'l·','ᒷ'=>'1·','⑩'=>'➉','⒑'=>'10.','㏩'=>'10日','㋉'=>'10月','㍢'=>'10点','⒒'=>'11.','㏪'=>'11日','㋊'=>'11月','㍣'=>'11点','⒓'=>'12.','㏫'=>'12日','㋋'=>'12月','㍤'=>'12点','⒔'=>'13.','㏬'=>'13日','㍥'=>'13点','⒕'=>'14.','㏭'=>'14日','㍦'=>'14点','⒖'=>'15.','㏮'=>'15日','㍧'=>'15点','⒗'=>'16.','㏯'=>'16日','㍨'=>'16点','⒘'=>'17.','㏰'=>'17日','㍩'=>'17点','⒙'=>'18.','㏱'=>'18日','㍪'=>'18点','⒚'=>'19.','㏲'=>'19日','㍫'=>'19点','lj'=>'lj','㏠'=>'1日','㋀'=>'1月','㍙'=>'1点','2'=>'2','𝟐'=>'2','𝟚'=>'2','𝟤'=>'2','𝟮'=>'2','𝟸'=>'2','ᒿ'=>'2','②'=>'➁','۲'=>'٢','⒉'=>'2.','⒛'=>'20.','㏳'=>'20日','㍬'=>'20点','㏴'=>'21日','㍭'=>'21点','㏵'=>'22日','㍮'=>'22点','㏶'=>'23日','㍯'=>'23点','㏷'=>'24日','㍰'=>'24点','㏸'=>'25日','㏹'=>'26日','㏺'=>'27日','㏻'=>'28日','㏼'=>'29日','㏡'=>'2日','㋁'=>'2月','㍚'=>'2点','3'=>'3','𝟑'=>'3','𝟛'=>'3','𝟥'=>'3','𝟯'=>'3','𝟹'=>'3','③'=>'➂','۳'=>'٣','⒊'=>'3.','㏽'=>'30日','㏾'=>'31日','㏢'=>'3日','㋂'=>'3月','㍛'=>'3点','4'=>'4','𝟒'=>'4','𝟜'=>'4','𝟦'=>'4','𝟰'=>'4','𝟺'=>'4','Ꮞ'=>'4','④'=>'➃','⒋'=>'4.','ᔰ'=>'4·','㏣'=>'4日','㋃'=>'4月','㍜'=>'4点','5'=>'5','𝟓'=>'5','𝟝'=>'5','𝟧'=>'5','𝟱'=>'5','𝟻'=>'5','⑤'=>'➄','⒌'=>'5.','㏤'=>'5日','㋄'=>'5月','㍝'=>'5点','6'=>'6','𝟔'=>'6','𝟞'=>'6','𝟨'=>'6','𝟲'=>'6','𝟼'=>'6','б'=>'6','⑥'=>'➅','⒍'=>'6.','㏥'=>'6日','㋅'=>'6月','㍞'=>'6点','7'=>'7','𝟕'=>'7','𝟟'=>'7','𝟩'=>'7','𝟳'=>'7','𝟽'=>'7','⑦'=>'➆','۷'=>'٧','⒎'=>'7.','㏦'=>'7日','㋆'=>'7月','㍟'=>'7点','ଃ'=>'8','৪'=>'8','੪'=>'8','8'=>'8','𝟖'=>'8','𝟠'=>'8','𝟪'=>'8','𝟴'=>'8','𝟾'=>'8','ȣ'=>'8','⑧'=>'➇','۸'=>'٨','⒏'=>'8.','㏧'=>'8日','㋇'=>'8月','㍠'=>'8点','੧'=>'9','୨'=>'9','৭'=>'9','9'=>'9','𝟗'=>'9','𝟡'=>'9','𝟫'=>'9','𝟵'=>'9','𝟿'=>'9','⑨'=>'➈','۹'=>'٩','⒐'=>'9.','㏨'=>'9日','㋈'=>'9月','㍡'=>'9点','a'=>'a','𝐚'=>'a','𝑎'=>'a','𝒂'=>'a','𝒶'=>'a','𝓪'=>'a','𝔞'=>'a','𝕒'=>'a','𝖆'=>'a','𝖺'=>'a','𝗮'=>'a','𝘢'=>'a','𝙖'=>'a','𝚊'=>'a','℀'=>'a/c','℁'=>'a/s','æ'=>'ae','b'=>'b','𝐛'=>'b','𝑏'=>'b','𝒃'=>'b','𝒷'=>'b','𝓫'=>'b','𝔟'=>'b','𝕓'=>'b','𝖇'=>'b','𝖻'=>'b','𝗯'=>'b','𝘣'=>'b','𝙗'=>'b','𝚋'=>'b','ɓ'=>'b̔','ƃ'=>'b̄','ƀ'=>'b̵','c'=>'c','ⅽ'=>'c','𝐜'=>'c','𝑐'=>'c','𝒄'=>'c','𝒸'=>'c','𝓬'=>'c','𝔠'=>'c','𝕔'=>'c','𝖈'=>'c','𝖼'=>'c','𝗰'=>'c','𝘤'=>'c','𝙘'=>'c','𝚌'=>'c','𝛓'=>'c','𝜍'=>'c','𝝇'=>'c','𝞁'=>'c','𝞻'=>'c','℅'=>'c/o','℆'=>'c/u','d'=>'d','ⅾ'=>'d','ⅆ'=>'d','𝐝'=>'d','𝑑'=>'d','𝒅'=>'d','𝒹'=>'d','𝓭'=>'d','𝔡'=>'d','𝕕'=>'d','𝖉'=>'d','𝖽'=>'d','𝗱'=>'d','𝘥'=>'d','𝙙'=>'d','𝚍'=>'d','ɗ'=>'d̔','ƌ'=>'d̄','ɖ'=>'d̢','đ'=>'d̵','dz'=>'dz','dž'=>'dž','e'=>'e','ℯ'=>'e','ⅇ'=>'e','𝐞'=>'e','𝑒'=>'e','𝒆'=>'e','𝓮'=>'e','𝔢'=>'e','𝕖'=>'e','𝖊'=>'e','𝖾'=>'e','𝗲'=>'e','𝘦'=>'e','𝙚'=>'e','𝚎'=>'e','ⴹ'=>'E','ə'=>'ǝ','ɚ'=>'ǝ˞','⋴'=>'ɛ','𝛆'=>'ɛ','𝛜'=>'ɛ','𝜀'=>'ɛ','𝜖'=>'ɛ','𝜺'=>'ɛ','𝝐'=>'ɛ','𝝴'=>'ɛ','𝞊'=>'ɛ','𝞮'=>'ɛ','𝟄'=>'ɛ','f'=>'f','𝐟'=>'f','𝑓'=>'f','𝒇'=>'f','𝒻'=>'f','𝓯'=>'f','𝔣'=>'f','𝕗'=>'f','𝖋'=>'f','𝖿'=>'f','𝗳'=>'f','𝘧'=>'f','𝙛'=>'f','𝚏'=>'f','ƒ'=>'f̡','g'=>'g','ℊ'=>'g','𝐠'=>'g','𝑔'=>'g','𝒈'=>'g','𝓰'=>'g','𝔤'=>'g','𝕘'=>'g','𝖌'=>'g','𝗀'=>'g','𝗴'=>'g','𝘨'=>'g','𝙜'=>'g','𝚐'=>'g','ɡ'=>'g','ɠ'=>'g̔','ǥ'=>'g̵','h'=>'h','ℎ'=>'h','𝐡'=>'h','𝒉'=>'h','𝒽'=>'h','𝓱'=>'h','𝔥'=>'h','𝕙'=>'h','𝖍'=>'h','𝗁'=>'h','𝗵'=>'h','𝘩'=>'h','𝙝'=>'h','𝚑'=>'h','ɦ'=>'h̔','ħ'=>'h̵','ℏ'=>'h̵','῾'=>'ʻ','‘'=>'ʻ','‛'=>'ʻ','ʽ'=>'ʻ','⍳'=>'i','i'=>'i','ⅰ'=>'i','ℹ'=>'i','ⅈ'=>'i','𝐢'=>'i','𝑖'=>'i','𝒊'=>'i','𝒾'=>'i','𝓲'=>'i','𝔦'=>'i','𝕚'=>'i','𝖎'=>'i','𝗂'=>'i','𝗶'=>'i','𝘪'=>'i','𝙞'=>'i','𝚒'=>'i','ı'=>'i','𝚤'=>'i','ɪ'=>'i','ɩ'=>'i','𝛊'=>'i','𝜄'=>'i','𝜾'=>'i','𝝸'=>'i','𝞲'=>'i','ɨ'=>'i̵','ⅱ'=>'ii','ⅲ'=>'iii','ij'=>'ij','ⅳ'=>'iv','ⅸ'=>'ix','j'=>'j','ⅉ'=>'j','𝐣'=>'j','𝑗'=>'j','𝒋'=>'j','𝒿'=>'j','𝓳'=>'j','𝔧'=>'j','𝕛'=>'j','𝖏'=>'j','𝗃'=>'j','𝗷'=>'j','𝘫'=>'j','𝙟'=>'j','𝚓'=>'j','ϳ'=>'j','𝚥'=>'ȷ','k'=>'k','𝐤'=>'k','𝑘'=>'k','𝒌'=>'k','𝓀'=>'k','𝓴'=>'k','𝔨'=>'k','𝕜'=>'k','𝖐'=>'k','𝗄'=>'k','𝗸'=>'k','𝘬'=>'k','𝙠'=>'k','𝚔'=>'k','ƙ'=>'k̔','m'=>'m','ⅿ'=>'m','𝐦'=>'m','𝑚'=>'m','𝒎'=>'m','𝓂'=>'m','𝓶'=>'m','𝔪'=>'m','𝕞'=>'m','𝖒'=>'m','𝗆'=>'m','𝗺'=>'m','𝘮'=>'m','𝙢'=>'m','𝚖'=>'m','ɱ'=>'m̡','n'=>'n','𝐧'=>'n','𝑛'=>'n','𝒏'=>'n','𝓃'=>'n','𝓷'=>'n','𝔫'=>'n','𝕟'=>'n','𝖓'=>'n','𝗇'=>'n','𝗻'=>'n','𝘯'=>'n','𝙣'=>'n','𝚗'=>'n','𝐍'=>'N','𝑁'=>'N','𝑵'=>'N','𝒩'=>'N','𝓝'=>'N','𝔑'=>'N','𝕹'=>'N','𝖭'=>'N','𝗡'=>'N','𝘕'=>'N','𝙉'=>'N','𝙽'=>'N','𝚴'=>'N','𝛮'=>'N','𝜨'=>'N','𝝢'=>'N','𝞜'=>'N','ɲ'=>'ņ','ɳ'=>'n̢','ƞ'=>'n̩','𝛈'=>'n̩','𝜂'=>'n̩','𝜼'=>'n̩','𝝶'=>'n̩','𝞰'=>'n̩','nj'=>'nj','o'=>'o','ℴ'=>'o','𝐨'=>'o','𝑜'=>'o','𝒐'=>'o','𝓸'=>'o','𝔬'=>'o','𝕠'=>'o','𝖔'=>'o','𝗈'=>'o','𝗼'=>'o','𝘰'=>'o','𝙤'=>'o','𝚘'=>'o','ᴏ'=>'o','𝛐'=>'o','𝜊'=>'o','𝝄'=>'o','𝝾'=>'o','𝞸'=>'o','ɵ'=>'o̵','ǿ'=>'ó̵','ø'=>'o̷','œ'=>'oe','ơ'=>'oʼ','⍴'=>'p','p'=>'p','𝐩'=>'p','𝑝'=>'p','𝒑'=>'p','𝓅'=>'p','𝓹'=>'p','𝔭'=>'p','𝕡'=>'p','𝖕'=>'p','𝗉'=>'p','𝗽'=>'p','𝘱'=>'p','𝙥'=>'p','𝚙'=>'p','𝛒'=>'p','𝛠'=>'p','𝜌'=>'p','𝜚'=>'p','𝝆'=>'p','𝝔'=>'p','𝞀'=>'p','𝞎'=>'p','𝞺'=>'p','𝟈'=>'p','ƥ'=>'p̔','q'=>'q','𝐪'=>'q','𝑞'=>'q','𝒒'=>'q','𝓆'=>'q','𝓺'=>'q','𝔮'=>'q','𝕢'=>'q','𝖖'=>'q','𝗊'=>'q','𝗾'=>'q','𝘲'=>'q','𝙦'=>'q','𝚚'=>'q','𝐐'=>'Q','𝑄'=>'Q','𝑸'=>'Q','𝒬'=>'Q','𝓠'=>'Q','𝔔'=>'Q','𝕼'=>'Q','𝖰'=>'Q','𝗤'=>'Q','𝘘'=>'Q','𝙌'=>'Q','𝚀'=>'Q','ʠ'=>'q̔','𝛋'=>'ĸ','𝛞'=>'ĸ','𝜅'=>'ĸ','𝜘'=>'ĸ','𝜿'=>'ĸ','𝝒'=>'ĸ','𝝹'=>'ĸ','𝞌'=>'ĸ','𝞳'=>'ĸ','𝟆'=>'ĸ','r'=>'r','𝐫'=>'r','𝑟'=>'r','𝒓'=>'r','𝓇'=>'r','𝓻'=>'r','𝔯'=>'r','𝕣'=>'r','𝖗'=>'r','𝗋'=>'r','𝗿'=>'r','𝘳'=>'r','𝙧'=>'r','𝚛'=>'r','ɽ'=>'r̢','ɼ'=>'r̩','s'=>'s','𝐬'=>'s','𝑠'=>'s','𝒔'=>'s','𝓈'=>'s','𝓼'=>'s','𝔰'=>'s','𝕤'=>'s','𝖘'=>'s','𝗌'=>'s','𝘀'=>'s','𝘴'=>'s','𝙨'=>'s','𝚜'=>'s','ƽ'=>'s','ʂ'=>'s̢','∫'=>'ʃ','∬'=>'ʃʃ','∭'=>'ʃʃʃ','⨌'=>'ʃʃʃʃ','t'=>'t','𝐭'=>'t','𝑡'=>'t','𝒕'=>'t','𝓉'=>'t','𝓽'=>'t','𝔱'=>'t','𝕥'=>'t','𝖙'=>'t','𝗍'=>'t','𝘁'=>'t','𝘵'=>'t','𝙩'=>'t','𝚝'=>'t','𝑇'=>'T','𝑻'=>'T','𝒯'=>'T','𝓣'=>'T','𝔗'=>'T','𝕋'=>'T','𝕿'=>'T','𝖳'=>'T','𝗧'=>'T','𝘛'=>'T','𝙏'=>'T','𝚃'=>'T','𝚻'=>'T','𝛵'=>'T','𝜯'=>'T','𝝩'=>'T','𝞣'=>'T','ƭ'=>'t̔','ț'=>'ţ','ƫ'=>'ţ','ŧ'=>'t̵','u'=>'u','𝐮'=>'u','𝑢'=>'u','𝒖'=>'u','𝓊'=>'u','𝓾'=>'u','𝔲'=>'u','𝕦'=>'u','𝖚'=>'u','𝗎'=>'u','𝘂'=>'u','𝘶'=>'u','𝙪'=>'u','𝚞'=>'u','ʊ'=>'u','ʋ'=>'u','𝛖'=>'u','𝜐'=>'u','𝝊'=>'u','𝞄'=>'u','𝞾'=>'u','𝑈'=>'U','𝑼'=>'U','𝒰'=>'U','𝓤'=>'U','𝔘'=>'U','𝕌'=>'U','𝖀'=>'U','𝖴'=>'U','𝗨'=>'U','𝘜'=>'U','𝙐'=>'U','𝚄'=>'U','v'=>'v','ⅴ'=>'v','𝐯'=>'v','𝑣'=>'v','𝒗'=>'v','𝓋'=>'v','𝓿'=>'v','𝔳'=>'v','𝕧'=>'v','𝖛'=>'v','𝗏'=>'v','𝘃'=>'v','𝘷'=>'v','𝙫'=>'v','𝚟'=>'v','𝛎'=>'v','𝜈'=>'v','𝝂'=>'v','𝝼'=>'v','𝞶'=>'v','ⅵ'=>'vi','ⅶ'=>'vii','ⅷ'=>'viii','ɯ'=>'w','w'=>'w','𝐰'=>'w','𝑤'=>'w','𝒘'=>'w','𝓌'=>'w','𝔀'=>'w','𝔴'=>'w','𝕨'=>'w','𝖜'=>'w','𝗐'=>'w','𝘄'=>'w','𝘸'=>'w','𝙬'=>'w','𝚠'=>'w','𝑊'=>'W','𝑾'=>'W','𝒲'=>'W','𝓦'=>'W','𝔚'=>'W','𝕎'=>'W','𝖂'=>'W','𝖶'=>'W','𝗪'=>'W','𝘞'=>'W','𝙒'=>'W','𝚆'=>'W','×'=>'x','x'=>'x','ⅹ'=>'x','𝐱'=>'x','𝑥'=>'x','𝒙'=>'x','𝓍'=>'x','𝔁'=>'x','𝔵'=>'x','𝕩'=>'x','𝖝'=>'x','𝗑'=>'x','𝘅'=>'x','𝘹'=>'x','𝙭'=>'x','𝚡'=>'x','᙭'=>'X','𝑋'=>'X','𝑿'=>'X','𝒳'=>'X','𝓧'=>'X','𝔛'=>'X','𝕏'=>'X','𝖃'=>'X','𝖷'=>'X','𝗫'=>'X','𝘟'=>'X','𝙓'=>'X','𝚇'=>'X','𝚾'=>'X','𝛸'=>'X','𝜲'=>'X','𝝬'=>'X','𝞦'=>'X','ⅺ'=>'xi','ⅻ'=>'xii','y'=>'y','𝐲'=>'y','𝑦'=>'y','𝒚'=>'y','𝓎'=>'y','𝔂'=>'y','𝔶'=>'y','𝕪'=>'y','𝖞'=>'y','𝗒'=>'y','𝘆'=>'y','𝘺'=>'y','𝙮'=>'y','𝚢'=>'y','ƴ'=>'y̔','z'=>'z','𝐳'=>'z','𝑧'=>'z','𝒛'=>'z','𝓏'=>'z','𝔃'=>'z','𝔷'=>'z','𝕫'=>'z','𝖟'=>'z','𝗓'=>'z','𝘇'=>'z','𝘻'=>'z','𝙯'=>'z','𝚣'=>'z','ȥ'=>'z̡','ʐ'=>'z̢','ƶ'=>'z̵','ȝ'=>'ʒ','?'=>'ʔ','?'=>'ʔ','⁇'=>'ʔʔ','⁈'=>'ʔǃ','᾽'=>'ʼ','᾿'=>'ʼ','’'=>'ʼ','ʾ'=>'ʼ','!'=>'ǃ','!'=>'ǃ','⁉'=>'ǃʔ','‼'=>'ǃǃ','⍺'=>'α','𝛂'=>'α','𝛼'=>'α','𝜶'=>'α','𝝰'=>'α','𝞪'=>'α','𝛃'=>'β','𝛽'=>'β','𝜷'=>'β','𝝱'=>'β','𝞫'=>'β','ℽ'=>'γ','𝛄'=>'γ','𝛾'=>'γ','𝜸'=>'γ','𝝲'=>'γ','𝞬'=>'γ','𝛅'=>'δ','𝛿'=>'δ','𝜹'=>'δ','𝝳'=>'δ','𝞭'=>'δ','𝟋'=>'ϝ','𝛇'=>'ζ','𝜁'=>'ζ','𝜻'=>'ζ','𝝵'=>'ζ','𝞯'=>'ζ','⍬'=>'θ','𝛉'=>'θ','𝛝'=>'θ','𝜃'=>'θ','𝜗'=>'θ','𝜽'=>'θ','𝝑'=>'θ','𝝷'=>'θ','𝞋'=>'θ','𝞱'=>'θ','𝟅'=>'θ','𝛌'=>'λ','𝜆'=>'λ','𝝀'=>'λ','𝝺'=>'λ','𝞴'=>'λ','𝛬'=>'Λ','𝜦'=>'Λ','𝝠'=>'Λ','𝞚'=>'Λ','𝛍'=>'μ','𝜇'=>'μ','𝝁'=>'μ','𝝻'=>'μ','𝞵'=>'μ','𝛏'=>'ξ','𝜉'=>'ξ','𝝃'=>'ξ','𝝽'=>'ξ','𝞷'=>'ξ','𝛯'=>'Ξ','𝜩'=>'Ξ','𝝣'=>'Ξ','𝞝'=>'Ξ','ℼ'=>'π','𝛑'=>'π','𝛡'=>'π','𝜋'=>'π','𝜛'=>'π','𝝅'=>'π','𝝕'=>'π','𝝿'=>'π','𝞏'=>'π','𝞹'=>'π','𝟉'=>'π','ᴨ'=>'π','∏'=>'Π','𝚷'=>'Π','𝛱'=>'Π','𝜫'=>'Π','𝝥'=>'Π','𝞟'=>'Π','𝛔'=>'σ','𝜎'=>'σ','𝝈'=>'σ','𝞂'=>'σ','𝞼'=>'σ','𝛕'=>'τ','𝜏'=>'τ','𝝉'=>'τ','𝞃'=>'τ','𝞽'=>'τ','𝐘'=>'Y','𝑌'=>'Y','𝒀'=>'Y','𝒴'=>'Y','𝓨'=>'Y','𝔜'=>'Y','𝕐'=>'Y','𝖄'=>'Y','𝖸'=>'Y','𝗬'=>'Y','𝘠'=>'Y','𝙔'=>'Y','𝚈'=>'Y','𝚼'=>'Y','𝛶'=>'Y','𝜰'=>'Y','𝝪'=>'Y','𝞤'=>'Y','𝛗'=>'φ','𝛟'=>'φ','𝜑'=>'φ','𝜙'=>'φ','𝝋'=>'φ','𝝓'=>'φ','𝞅'=>'φ','𝞍'=>'φ','𝞿'=>'φ','𝟇'=>'φ','𝛷'=>'Φ','𝜱'=>'Φ','𝝫'=>'Φ','𝞥'=>'Φ','𝛘'=>'χ','𝜒'=>'χ','𝝌'=>'χ','𝞆'=>'χ','𝟀'=>'χ','𝛙'=>'ψ','𝜓'=>'ψ','𝝍'=>'ψ','𝞇'=>'ψ','𝟁'=>'ψ','𝛹'=>'Ψ','𝜳'=>'Ψ','𝝭'=>'Ψ','𝞧'=>'Ψ','⍵'=>'ω','𝛚'=>'ω','𝜔'=>'ω','𝝎'=>'ω','𝞈'=>'ω','𝟂'=>'ω','ӕ'=>'ae','ғ'=>'r̵','ґ'=>'rᑊ','җ'=>'ж̩','ҙ'=>'з̡','ӏ'=>'i','ҋ'=>'й̡','қ'=>'ĸ̩','ҟ'=>'ĸ̵','ᴫ'=>'л','ӆ'=>'л̡','ӎ'=>'м̡','ӊ'=>'н̡','ӈ'=>'н̡','ң'=>'н̩','ө'=>'o̵','ѳ'=>'o̵','ҫ'=>'c̡','ҭ'=>'т̩','ү'=>'y','ұ'=>'y̵','ћ'=>'h̵','ѽ'=>'ѡ҃','ӌ'=>'ҷ','ҿ'=>'ҽ̢','ҍ'=>'Ь̵','զ'=>'q','ռ'=>'n','ℵ'=>'א','ﬡ'=>'א','אָ'=>'אַ','אּ'=>'אַ','ﭏ'=>'אל','ℶ'=>'ב','ℷ'=>'ג','ℸ'=>'ד','ﬢ'=>'ד','ﬣ'=>'ה','ﬤ'=>'כ','ﬥ'=>'ל','ﬦ'=>'ם','ﬠ'=>'ע','ﬧ'=>'ר','ﬨ'=>'ת','ﺀ'=>'ء','ﺂ'=>'آ','ﺁ'=>'آ','ﺄ'=>'أ','ﺃ'=>'أ','ٵ'=>'أ','ﭑ'=>'ٱ','ﭐ'=>'ٱ','ﺆ'=>'ؤ','ﺅ'=>'ؤ','ٶ'=>'ؤ','ﺈ'=>'إ','ﺇ'=>'إ','ﺋ'=>'ئ','ﺌ'=>'ئ','ﺊ'=>'ئ','ﺉ'=>'ئ','ﯫ'=>'ئا','ﯪ'=>'ئا','ﯸ'=>'ئٻ','ﯷ'=>'ئٻ','ﯶ'=>'ئٻ','ﲗ'=>'ئج','ﰀ'=>'ئج','ﲘ'=>'ئح','ﰁ'=>'ئح','ﲙ'=>'ئخ','ﱤ'=>'ئر','ﱥ'=>'ئز','ﲚ'=>'ئم','ﳟ'=>'ئم','ﱦ'=>'ئم','ﰂ'=>'ئم','ﱧ'=>'ئن','ﲛ'=>'ئه','ﳠ'=>'ئه','ﯭ'=>'ئه','ﯬ'=>'ئه','ﯯ'=>'ئو','ﯮ'=>'ئو','ﯳ'=>'ئۆ','ﯲ'=>'ئۆ','ﯱ'=>'ئۇ','ﯰ'=>'ئۇ','ﯵ'=>'ئۈ','ﯴ'=>'ئۈ','ﯻ'=>'ئى','ﯺ'=>'ئى','ﱨ'=>'ئى','ﯹ'=>'ئى','ﰃ'=>'ئى','ﱩ'=>'ئى','ﰄ'=>'ئى','ﺎ'=>'ا','ﺍ'=>'ا','ﴼ'=>'اً','ﴽ'=>'اً','ﷳ'=>'اكبر','ﷲ'=>'الله','ﺑ'=>'ب','ﺒ'=>'ب','ﺐ'=>'ب','ﺏ'=>'ب','ﲜ'=>'بج','ﰅ'=>'بج','ﲝ'=>'بح','ﰆ'=>'بح','ﷂ'=>'بحى','ﲞ'=>'بخ','ﰇ'=>'بخ','ﶞ'=>'بخى','ﱪ'=>'بر','ﱫ'=>'بز','ﲟ'=>'بم','ﳡ'=>'بم','ﱬ'=>'بم','ﰈ'=>'بم','ﱭ'=>'بن','ﲠ'=>'به','ﳢ'=>'به','ﱮ'=>'بى','ﰉ'=>'بى','ﱯ'=>'بى','ﰊ'=>'بى','ﭔ'=>'ٻ','ﭕ'=>'ٻ','ﭓ'=>'ٻ','ﭒ'=>'ٻ','ې'=>'ٻ','ﯦ'=>'ٻ','ﯧ'=>'ٻ','ﯥ'=>'ٻ','ﯤ'=>'ٻ','ﭘ'=>'پ','ﭙ'=>'پ','ﭗ'=>'پ','ﭖ'=>'پ','ﭜ'=>'ڀ','ﭝ'=>'ڀ','ﭛ'=>'ڀ','ﭚ'=>'ڀ','ﺔ'=>'ة','ﺓ'=>'ة','ﺗ'=>'ت','ﺘ'=>'ت','ﺖ'=>'ت','ﺕ'=>'ت','ﲡ'=>'تج','ﰋ'=>'تج','ﵐ'=>'تجم','ﶠ'=>'تجى','ﶟ'=>'تجى','ﲢ'=>'تح','ﰌ'=>'تح','ﵒ'=>'تحج','ﵑ'=>'تحج','ﵓ'=>'تحم','ﲣ'=>'تخ','ﰍ'=>'تخ','ﵔ'=>'تخم','ﶢ'=>'تخى','ﶡ'=>'تخى','ﱰ'=>'تر','ﱱ'=>'تز','ﲤ'=>'تم','ﳣ'=>'تم','ﱲ'=>'تم','ﰎ'=>'تم','ﵕ'=>'تمج','ﵖ'=>'تمح','ﵗ'=>'تمخ','ﶤ'=>'تمى','ﶣ'=>'تمى','ﱳ'=>'تن','ﲥ'=>'ته','ﳤ'=>'ته','ﱴ'=>'تى','ﰏ'=>'تى','ﱵ'=>'تى','ﰐ'=>'تى','ﺛ'=>'ث','ﺜ'=>'ث','ﺚ'=>'ث','ﺙ'=>'ث','ﰑ'=>'ثج','ﱶ'=>'ثر','ﱷ'=>'ثز','ﲦ'=>'ثم','ﳥ'=>'ثم','ﱸ'=>'ثم','ﰒ'=>'ثم','ﱹ'=>'ثن','ﳦ'=>'ثه','ﱺ'=>'ثى','ﰓ'=>'ثى','ﱻ'=>'ثى','ﰔ'=>'ثى','ﭨ'=>'ٹ','ﭩ'=>'ٹ','ﭧ'=>'ٹ','ﭦ'=>'ٹ','ڻ'=>'ٹ','ﮢ'=>'ٹ','ﮣ'=>'ٹ','ﮡ'=>'ٹ','ﮠ'=>'ٹ','ﭠ'=>'ٺ','ﭡ'=>'ٺ','ﭟ'=>'ٺ','ﭞ'=>'ٺ','ﭤ'=>'ٿ','ﭥ'=>'ٿ','ﭣ'=>'ٿ','ﭢ'=>'ٿ','ﺟ'=>'ج','ﺠ'=>'ج','ﺞ'=>'ج','ﺝ'=>'ج','ﲧ'=>'جح','ﰕ'=>'جح','ﶦ'=>'جحى','ﶾ'=>'جحى','ﷻ'=>'جل جلاله','ﲨ'=>'جم','ﰖ'=>'جم','ﵙ'=>'جمح','ﵘ'=>'جمح','ﶧ'=>'جمى','ﶥ'=>'جمى','ﴝ'=>'جى','ﴁ'=>'جى','ﴞ'=>'جى','ﴂ'=>'جى','ﭸ'=>'ڃ','ﭹ'=>'ڃ','ﭷ'=>'ڃ','ﭶ'=>'ڃ','ﭴ'=>'ڄ','ﭵ'=>'ڄ','ﭳ'=>'ڄ','ﭲ'=>'ڄ','ﭼ'=>'چ','ﭽ'=>'چ','ﭻ'=>'چ','ﭺ'=>'چ','ﮀ'=>'ڇ','ﮁ'=>'ڇ','ﭿ'=>'ڇ','ﭾ'=>'ڇ','ﺣ'=>'ح','ﺤ'=>'ح','ﺢ'=>'ح','ﺡ'=>'ح','ﲩ'=>'حج','ﰗ'=>'حج','ﶿ'=>'حجى','ﲪ'=>'حم','ﰘ'=>'حم','ﵛ'=>'حمى','ﵚ'=>'حمى','ﴛ'=>'حى','ﳿ'=>'حى','ﴜ'=>'حى','ﴀ'=>'حى','ﺧ'=>'خ','ﺨ'=>'خ','ﺦ'=>'خ','ﺥ'=>'خ','ﲫ'=>'خج','ﰙ'=>'خج','ﰚ'=>'خح','ﲬ'=>'خم','ﰛ'=>'خم','ﴟ'=>'خى','ﴃ'=>'خى','ﴠ'=>'خى','ﴄ'=>'خى','ﺪ'=>'د','ﺩ'=>'د','ﺬ'=>'ذ','ﺫ'=>'ذ','ﱛ'=>'ذٰ','ﮉ'=>'ڈ','ﮈ'=>'ڈ','ﮅ'=>'ڌ','ﮄ'=>'ڌ','ﮃ'=>'ڍ','ﮂ'=>'ڍ','ﮇ'=>'ڎ','ﮆ'=>'ڎ','ﺮ'=>'ر','ﺭ'=>'ر','ﱜ'=>'رٰ','ﷶ'=>'رسول','﷼'=>'رىال','ﺰ'=>'ز','ﺯ'=>'ز','ﮍ'=>'ڑ','ﮌ'=>'ڑ','ﮋ'=>'ژ','ﮊ'=>'ژ','ﺳ'=>'س','ﺴ'=>'س','ﺲ'=>'س','ﺱ'=>'س','ﲭ'=>'سج','ﴴ'=>'سج','ﰜ'=>'سج','ﵝ'=>'سجح','ﵞ'=>'سجى','ﲮ'=>'سح','ﴵ'=>'سح','ﰝ'=>'سح','ﵜ'=>'سحج','ﲯ'=>'سخ','ﴶ'=>'سخ','ﰞ'=>'سخ','ﶨ'=>'سخى','ﷆ'=>'سخى','ﴪ'=>'سر','ﴎ'=>'سر','ﲰ'=>'سم','ﳧ'=>'سم','ﰟ'=>'سم','ﵡ'=>'سمج','ﵠ'=>'سمح','ﵟ'=>'سمح','ﵣ'=>'سمم','ﵢ'=>'سمم','ﴱ'=>'سه','ﳨ'=>'سه','ﴗ'=>'سى','ﳻ'=>'سى','ﴘ'=>'سى','ﳼ'=>'سى','ﺷ'=>'ش','ﺸ'=>'ش','ﺶ'=>'ش','ﺵ'=>'ش','ﴭ'=>'شج','ﴷ'=>'شج','ﴥ'=>'شج','ﴉ'=>'شج','ﵩ'=>'شجى','ﴮ'=>'شح','ﴸ'=>'شح','ﴦ'=>'شح','ﴊ'=>'شح','ﵨ'=>'شحم','ﵧ'=>'شحم','ﶪ'=>'شحى','ﴯ'=>'شخ','ﴹ'=>'شخ','ﴧ'=>'شخ','ﴋ'=>'شخ','ﴩ'=>'شر','ﴍ'=>'شر','ﴰ'=>'شم','ﳩ'=>'شم','ﴨ'=>'شم','ﴌ'=>'شم','ﵫ'=>'شمخ','ﵪ'=>'شمخ','ﵭ'=>'شمم','ﵬ'=>'شمم','ﴲ'=>'شه','ﳪ'=>'شه','ﴙ'=>'شى','ﳽ'=>'شى','ﴚ'=>'شى','ﳾ'=>'شى','ﺻ'=>'ص','ﺼ'=>'ص','ﺺ'=>'ص','ﺹ'=>'ص','ﲱ'=>'صح','ﰠ'=>'صح','ﵥ'=>'صحح','ﵤ'=>'صحح','ﶩ'=>'صحى','ﲲ'=>'صخ','ﴫ'=>'صر','ﴏ'=>'صر','ﷵ'=>'صلعم','ﷹ'=>'صلى','ﷺ'=>'صلى الله علىه وسلم','ﷰ'=>'صلے','ﲳ'=>'صم','ﰡ'=>'صم','ﷅ'=>'صمم','ﵦ'=>'صمم','ﴡ'=>'صى','ﴅ'=>'صى','ﴢ'=>'صى','ﴆ'=>'صى','ﺿ'=>'ض','ﻀ'=>'ض','ﺾ'=>'ض','ﺽ'=>'ض','ﲴ'=>'ضج','ﰢ'=>'ضج','ﲵ'=>'ضح','ﰣ'=>'ضح','ﵮ'=>'ضحى','ﶫ'=>'ضحى','ﲶ'=>'ضخ','ﰤ'=>'ضخ','ﵰ'=>'ضخم','ﵯ'=>'ضخم','ﴬ'=>'ضر','ﴐ'=>'ضر','ﲷ'=>'ضم','ﰥ'=>'ضم','ﴣ'=>'ضى','ﴇ'=>'ضى','ﴤ'=>'ضى','ﴈ'=>'ضى','ﻃ'=>'ط','ﻄ'=>'ط','ﻂ'=>'ط','ﻁ'=>'ط','ﲸ'=>'طح','ﰦ'=>'طح','ﴳ'=>'طم','ﴺ'=>'طم','ﰧ'=>'طم','ﵲ'=>'طمح','ﵱ'=>'طمح','ﵳ'=>'طمم','ﵴ'=>'طمى','ﴑ'=>'طى','ﳵ'=>'طى','ﴒ'=>'طى','ﳶ'=>'طى','ﻇ'=>'ظ','ﻈ'=>'ظ','ﻆ'=>'ظ','ﻅ'=>'ظ','ﲹ'=>'ظم','ﴻ'=>'ظم','ﰨ'=>'ظم','ﻋ'=>'ع','ﻌ'=>'ع','ﻊ'=>'ع','ﻉ'=>'ع','ﲺ'=>'عج','ﰩ'=>'عج','ﷄ'=>'عجم','ﵵ'=>'عجم','ﷷ'=>'علىه','ﲻ'=>'عم','ﰪ'=>'عم','ﵷ'=>'عمم','ﵶ'=>'عمم','ﵸ'=>'عمى','ﶶ'=>'عمى','ﴓ'=>'عى','ﳷ'=>'عى','ﴔ'=>'عى','ﳸ'=>'عى','ﻏ'=>'غ','ﻐ'=>'غ','ﻎ'=>'غ','ﻍ'=>'غ','ﲼ'=>'غج','ﰫ'=>'غج','ﲽ'=>'غم','ﰬ'=>'غم','ﵹ'=>'غمم','ﵻ'=>'غمى','ﵺ'=>'غمى','ﴕ'=>'غى','ﳹ'=>'غى','ﴖ'=>'غى','ﳺ'=>'غى','ﻓ'=>'ف','ﻔ'=>'ف','ﻒ'=>'ف','ﻑ'=>'ف','ﲾ'=>'فج','ﰭ'=>'فج','ﲿ'=>'فح','ﰮ'=>'فح','ﳀ'=>'فخ','ﰯ'=>'فخ','ﵽ'=>'فخم','ﵼ'=>'فخم','ﳁ'=>'فم','ﰰ'=>'فم','ﷁ'=>'فمى','ﱼ'=>'فى','ﰱ'=>'فى','ﱽ'=>'فى','ﰲ'=>'فى','ﭬ'=>'ڤ','ﭭ'=>'ڤ','ﭫ'=>'ڤ','ﭪ'=>'ڤ','ﭰ'=>'ڦ','ﭱ'=>'ڦ','ﭯ'=>'ڦ','ﭮ'=>'ڦ','ﻗ'=>'ق','ﻘ'=>'ق','ﻖ'=>'ق','ﻕ'=>'ق','ﳂ'=>'قح','ﰳ'=>'قح','ﷱ'=>'قلے','ﳃ'=>'قم','ﰴ'=>'قم','ﶴ'=>'قمح','ﵾ'=>'قمح','ﵿ'=>'قمم','ﶲ'=>'قمى','ﱾ'=>'قى','ﰵ'=>'قى','ﱿ'=>'قى','ﰶ'=>'قى','ﻛ'=>'ك','ﻜ'=>'ك','ﻚ'=>'ك','ﻙ'=>'ك','ک'=>'ك','ﮐ'=>'ك','ﮑ'=>'ك','ﮏ'=>'ك','ﮎ'=>'ك','ﲀ'=>'كا','ﰷ'=>'كا','ﳄ'=>'كج','ﰸ'=>'كج','ﳅ'=>'كح','ﰹ'=>'كح','ﳆ'=>'كخ','ﰺ'=>'كخ','ﳇ'=>'كل','ﳫ'=>'كل','ﲁ'=>'كل','ﰻ'=>'كل','ﳈ'=>'كم','ﳬ'=>'كم','ﲂ'=>'كم','ﰼ'=>'كم','ﷃ'=>'كمم','ﶻ'=>'كمم','ﶷ'=>'كمى','ﲃ'=>'كى','ﰽ'=>'كى','ﲄ'=>'كى','ﰾ'=>'كى','ﯕ'=>'ڭ','ﯖ'=>'ڭ','ﯔ'=>'ڭ','ﯓ'=>'ڭ','ﮔ'=>'گ','ﮕ'=>'گ','ﮓ'=>'گ','ﮒ'=>'گ','ﮜ'=>'ڱ','ﮝ'=>'ڱ','ﮛ'=>'ڱ','ﮚ'=>'ڱ','ﮘ'=>'ڳ','ﮙ'=>'ڳ','ﮗ'=>'ڳ','ﮖ'=>'ڳ','ﻟ'=>'ل','ﻠ'=>'ل','ﻞ'=>'ل','ﻝ'=>'ل','ﻶ'=>'لآ','ﻵ'=>'لآ','ﻸ'=>'لأ','ﻷ'=>'لأ','ﻺ'=>'لإ','ﻹ'=>'لإ','ﻼ'=>'لا','ﻻ'=>'لا','ﳉ'=>'لج','ﰿ'=>'لج','ﶃ'=>'لجج','ﶄ'=>'لجج','ﶺ'=>'لجم','ﶼ'=>'لجم','ﶬ'=>'لجى','ﳊ'=>'لح','ﱀ'=>'لح','ﶵ'=>'لحم','ﶀ'=>'لحم','ﶂ'=>'لحى','ﶁ'=>'لحى','ﳋ'=>'لخ','ﱁ'=>'لخ','ﶆ'=>'لخم','ﶅ'=>'لخم','ﳌ'=>'لم','ﳭ'=>'لم','ﲅ'=>'لم','ﱂ'=>'لم','ﶈ'=>'لمح','ﶇ'=>'لمح','ﶭ'=>'لمى','ﳍ'=>'له','ﲆ'=>'لى','ﱃ'=>'لى','ﲇ'=>'لى','ﱄ'=>'لى','ﻣ'=>'م','ﻤ'=>'م','ﻢ'=>'م','ﻡ'=>'م','ﲈ'=>'ما','ﳎ'=>'مج','ﱅ'=>'مج','ﶌ'=>'مجح','ﶒ'=>'مجخ','ﶍ'=>'مجم','ﷀ'=>'مجى','ﳏ'=>'مح','ﱆ'=>'مح','ﶉ'=>'محج','ﶊ'=>'محم','ﷴ'=>'محمد','ﶋ'=>'محى','ﳐ'=>'مخ','ﱇ'=>'مخ','ﶎ'=>'مخج','ﶏ'=>'مخم','ﶹ'=>'مخى','ﳑ'=>'مم','ﲉ'=>'مم','ﱈ'=>'مم','ﶱ'=>'ممى','ﱉ'=>'مى','ﱊ'=>'مى','ﻧ'=>'ن','ﻨ'=>'ن','ﻦ'=>'ن','ﻥ'=>'ن','ﳒ'=>'نج','ﱋ'=>'نج','ﶸ'=>'نجح','ﶽ'=>'نجح','ﶘ'=>'نجم','ﶗ'=>'نجم','ﶙ'=>'نجى','ﷇ'=>'نجى','ﳓ'=>'نح','ﱌ'=>'نح','ﶕ'=>'نحم','ﶖ'=>'نحى','ﶳ'=>'نحى','ﳔ'=>'نخ','ﱍ'=>'نخ','ﲊ'=>'نر','ﲋ'=>'نز','ﳕ'=>'نم','ﳮ'=>'نم','ﲌ'=>'نم','ﱎ'=>'نم','ﶛ'=>'نمى','ﶚ'=>'نمى','ﲍ'=>'نن','ﳖ'=>'نه','ﳯ'=>'نه','ﲎ'=>'نى','ﱏ'=>'نى','ﲏ'=>'نى','ﱐ'=>'نى','ﮟ'=>'ں','ﮞ'=>'ں','ﻫ'=>'ه','ﻬ'=>'ه','ﻪ'=>'ه','ﻩ'=>'ه','ھ'=>'ه','ﮬ'=>'ه','ﮭ'=>'ه','ﮫ'=>'ه','ﮪ'=>'ه','ہ'=>'ه','ﮨ'=>'ه','ﮩ'=>'ه','ﮧ'=>'ه','ﮦ'=>'ه','ە'=>'ه','ﳙ'=>'هٰ','ﳗ'=>'هج','ﱑ'=>'هج','ﳘ'=>'هم','ﱒ'=>'هم','ﶓ'=>'همج','ﶔ'=>'همم','ﱓ'=>'هى','ﱔ'=>'هى','ﮥ'=>'ۀ','ﮤ'=>'ۀ','ﻮ'=>'و','ﻭ'=>'و','ﷸ'=>'وسلم','ﯡ'=>'ۅ','ﯠ'=>'ۅ','ﯚ'=>'ۆ','ﯙ'=>'ۆ','ﯘ'=>'ۇ','ﯗ'=>'ۇ','ٷ'=>'ۇٔ','ﯝ'=>'ۇٔ','ﯜ'=>'ۈ','ﯛ'=>'ۈ','ﯣ'=>'ۉ','ﯢ'=>'ۉ','ﯟ'=>'ۋ','ﯞ'=>'ۋ','ﯨ'=>'ى','ﯩ'=>'ى','ﻰ'=>'ى','ﻯ'=>'ى','ي'=>'ى','ﻳ'=>'ى','ﻴ'=>'ى','ﻲ'=>'ى','ﻱ'=>'ى','ی'=>'ى','ﯾ'=>'ى','ﯿ'=>'ى','ﯽ'=>'ى','ﯼ'=>'ى','ٸ'=>'ىٔ','ﲐ'=>'ىٰ','ﱝ'=>'ىٰ','ﳚ'=>'ىج','ﱕ'=>'ىج','ﶯ'=>'ىجى','ﳛ'=>'ىح','ﱖ'=>'ىح','ﶮ'=>'ىحى','ﳜ'=>'ىخ','ﱗ'=>'ىخ','ﲑ'=>'ىر','ﲒ'=>'ىز','ﳝ'=>'ىم','ﳰ'=>'ىم','ﲓ'=>'ىم','ﱘ'=>'ىم','ﶝ'=>'ىمم','ﶜ'=>'ىمم','ﶰ'=>'ىمى','ﲔ'=>'ىن','ﳞ'=>'ىه','ﳱ'=>'ىه','ﲕ'=>'ىى','ﱙ'=>'ىى','ﲖ'=>'ىى','ﱚ'=>'ىى','ۧ'=>'ۦ','ﮯ'=>'ے','ﮮ'=>'ے','ﮱ'=>'ۓ','ﮰ'=>'ۓ','∃'=>'ⴺ','आ'=>'अा','ऒ'=>'अाॆ','ओ'=>'अाे','औ'=>'अाै','ऄ'=>'अॆ','ऑ'=>'अॉ','ऍ'=>'एॅ','ऎ'=>'एॆ','ऐ'=>'एे','ई'=>'र्इ','আ'=>'অা','ৠ'=>'ঋৃ','ৡ'=>'ঌৢ','ਉ'=>'ੳੁ','ਊ'=>'ੳੂ','ਆ'=>'ਅਾ','ਐ'=>'ਅੈ','ਔ'=>'ਅੌ','ਇ'=>'ੲਿ','ਈ'=>'ੲੀ','ਏ'=>'ੲੇ','આ'=>'અા','ઑ'=>'અાૅ','ઓ'=>'અાે','ઔ'=>'અાૈ','ઍ'=>'અૅ','એ'=>'અે','ઐ'=>'અૈ','ଆ'=>'ଅା','௮'=>'அ','ர'=>'ஈ','ா'=>'ஈ','௫'=>'ஈு','௨'=>'உ','ஊ'=>'உள','௭'=>'எ','௷'=>'எவ','ஜ'=>'ஐ','௧'=>'க','௪'=>'ச','௬'=>'சு','௲'=>'சூ','௺'=>'நீ','ை'=>'ன','௴'=>'மீ','௰'=>'ய','ௗ'=>'ள','௸'=>'ஷ','ொ'=>'ெஈ','ௌ'=>'ெள','ோ'=>'ேஈ','ౠ'=>'ఋా','ౡ'=>'ఌా','ఔ'=>'ఒౌ','ఓ'=>'ఒౕ','ఢ'=>'డ̣','భ'=>'బ̣','ష'=>'వ̣','హ'=>'వా','మ'=>'వు','ూ'=>'ుా','ౄ'=>'ృా','ೡ'=>'ಌಾ','ಔ'=>'ఒౌ','ഈ'=>'ഇൗ','ഊ'=>'உൗ','ഐ'=>'എെ','ഓ'=>'ഒാ','ഔ'=>'ഒൗ','ൡ'=>'ഞ','൫'=>'ദ്ര','ഌ'=>'നூ','ങ'=>'നூ','൯'=>'ന്','റ'=>'ര','൪'=>'ര്','൮'=>'വ്','ീ'=>'ி','ൂ'=>'ூ','ൃ'=>'ூ','ൈ'=>'െെ','ฃ'=>'ข','ด'=>'ค','ต'=>'ค','ม'=>'ฆ','ซ'=>'ช','ฏ'=>'ฎ','ท'=>'ฑ','ๅ'=>'า','ำ'=>'̊า','แ'=>'เเ','ໜ'=>'ຫນ','ໝ'=>'ຫມ','ຳ'=>'̊າ','ཷ'=>'ྲཱྀ','ཹ'=>'ླཱྀ','၀'=>'o','ឣ'=>'អ','᧐'=>'ᦞ','᭒'=>'ᬍ','᭓'=>'ᬑ','᭘'=>'ᬨ','ᢖ'=>'ᡜ','ᡕ'=>'ᠵ','Ꮢ'=>'Ꭱ','Ꮍ'=>'y','𝐀'=>'A','𝐴'=>'A','𝑨'=>'A','𝒜'=>'A','𝓐'=>'A','𝔄'=>'A','𝔸'=>'A','𝕬'=>'A','𝖠'=>'A','𝗔'=>'A','𝘈'=>'A','𝘼'=>'A','𝙰'=>'A','𝚨'=>'A','𝛢'=>'A','𝜜'=>'A','𝝖'=>'A','𝞐'=>'A','𝐉'=>'J','𝐽'=>'J','𝑱'=>'J','𝒥'=>'J','𝓙'=>'J','𝔍'=>'J','𝕁'=>'J','𝕵'=>'J','𝖩'=>'J','𝗝'=>'J','𝘑'=>'J','𝙅'=>'J','𝙹'=>'J','Ꮷ'=>'J','⋿'=>'E','ℰ'=>'E','𝐄'=>'E','𝐸'=>'E','𝑬'=>'E','𝓔'=>'E','𝔈'=>'E','𝔼'=>'E','𝕰'=>'E','𝖤'=>'E','𝗘'=>'E','𝘌'=>'E','𝙀'=>'E','𝙴'=>'E','𝚬'=>'E','𝛦'=>'E','𝜠'=>'E','𝝚'=>'E','𝞔'=>'E','ℾ'=>'Ꮁ','𝚪'=>'Ꮁ','𝛤'=>'Ꮁ','𝜞'=>'Ꮁ','𝝘'=>'Ꮁ','𝞒'=>'Ꮁ','Ꮤ'=>'w','ℳ'=>'M','𝐌'=>'M','𝑀'=>'M','𝑴'=>'M','𝓜'=>'M','𝔐'=>'M','𝕄'=>'M','𝕸'=>'M','𝖬'=>'M','𝗠'=>'M','𝘔'=>'M','𝙈'=>'M','𝙼'=>'M','𝚳'=>'M','𝛭'=>'M','𝜧'=>'M','𝝡'=>'M','𝞛'=>'M','ℋ'=>'H','ℌ'=>'H','ℍ'=>'H','𝐇'=>'H','𝐻'=>'H','𝑯'=>'H','𝓗'=>'H','𝕳'=>'H','𝖧'=>'H','𝗛'=>'H','𝘏'=>'H','𝙃'=>'H','𝙷'=>'H','𝚮'=>'H','𝛨'=>'H','𝜢'=>'H','𝝜'=>'H','𝞖'=>'H','𝐆'=>'G','𝐺'=>'G','𝑮'=>'G','𝒢'=>'G','𝓖'=>'G','𝔊'=>'G','𝔾'=>'G','𝕲'=>'G','𝖦'=>'G','𝗚'=>'G','𝘎'=>'G','𝙂'=>'G','𝙶'=>'G','Ᏻ'=>'G','ℤ'=>'Z','ℨ'=>'Z','𝐙'=>'Z','𝑍'=>'Z','𝒁'=>'Z','𝒵'=>'Z','𝓩'=>'Z','𝖅'=>'Z','𝖹'=>'Z','𝗭'=>'Z','𝘡'=>'Z','𝙕'=>'Z','𝚉'=>'Z','𝚭'=>'Z','𝛧'=>'Z','𝜡'=>'Z','𝝛'=>'Z','𝞕'=>'Z','𝐒'=>'S','𝑆'=>'S','𝑺'=>'S','𝒮'=>'S','𝓢'=>'S','𝔖'=>'S','𝕊'=>'S','𝕾'=>'S','𝖲'=>'S','𝗦'=>'S','𝘚'=>'S','𝙎'=>'S','𝚂'=>'S','Ꮪ'=>'S','𝐕'=>'V','𝑉'=>'V','𝑽'=>'V','𝒱'=>'V','𝓥'=>'V','𝔙'=>'V','𝕍'=>'V','𝖁'=>'V','𝖵'=>'V','𝗩'=>'V','𝘝'=>'V','𝙑'=>'V','𝚅'=>'V','ℒ'=>'L','𝐋'=>'L','𝐿'=>'L','𝑳'=>'L','𝓛'=>'L','𝔏'=>'L','𝕃'=>'L','𝕷'=>'L','𝖫'=>'L','𝗟'=>'L','𝘓'=>'L','𝙇'=>'L','𝙻'=>'L','∑'=>'C','⅀'=>'C','ℂ'=>'C','ℭ'=>'C','𝐂'=>'C','𝐶'=>'C','𝑪'=>'C','𝒞'=>'C','𝓒'=>'C','𝕮'=>'C','𝖢'=>'C','𝗖'=>'C','𝘊'=>'C','𝘾'=>'C','𝙲'=>'C','𝚺'=>'C','𝛴'=>'C','𝜮'=>'C','𝝨'=>'C','𝞢'=>'C','ℙ'=>'P','𝐏'=>'P','𝑃'=>'P','𝑷'=>'P','𝒫'=>'P','𝓟'=>'P','𝔓'=>'P','𝕻'=>'P','𝖯'=>'P','𝗣'=>'P','𝘗'=>'P','𝙋'=>'P','𝙿'=>'P','𝚸'=>'P','𝛲'=>'P','𝜬'=>'P','𝝦'=>'P','𝞠'=>'P','𝐊'=>'K','𝐾'=>'K','𝑲'=>'K','𝒦'=>'K','𝓚'=>'K','𝔎'=>'K','𝕂'=>'K','𝕶'=>'K','𝖪'=>'K','𝗞'=>'K','𝘒'=>'K','𝙆'=>'K','𝙺'=>'K','𝚱'=>'K','𝛫'=>'K','𝜥'=>'K','𝝟'=>'K','𝞙'=>'K','ℬ'=>'B','𝐁'=>'B','𝐵'=>'B','𝑩'=>'B','𝓑'=>'B','𝔅'=>'B','𝔹'=>'B','𝕭'=>'B','𝖡'=>'B','𝗕'=>'B','𝘉'=>'B','𝘽'=>'B','𝙱'=>'B','𝚩'=>'B','𝛣'=>'B','𝜝'=>'B','𝝗'=>'B','𝞑'=>'B','ᐍ'=>'ᐁ·','∆'=>'ᐃ','𝚫'=>'ᐃ','𝛥'=>'ᐃ','𝜟'=>'ᐃ','𝝙'=>'ᐃ','𝞓'=>'ᐃ','ᐏ'=>'ᐃ·','ᐑ'=>'ᐄ·','ᐓ'=>'ᐅ·','ᐕ'=>'ᐆ·','ᐘ'=>'ᐊ·','ᐚ'=>'ᐋ·','ᓑ'=>'ᐡ','ᑶ'=>'·P','ᑺ'=>'·d','ᒘ'=>'·J','ᑁ'=>'ᐳ·','ᑃ'=>'ᐴ·','ᑅ'=>'ᐸ·','ᑇ'=>'ᐹ·','ˈ'=>'ᑊ','ᑘ'=>'ᑌ·','ᑧ'=>'ᑌᑊ','ᑚ'=>'ᑎ·','ᑨ'=>'ᑎᑊ','ᑜ'=>'ᑏ·','ᑞ'=>'ᑐ·','ᑩ'=>'ᑐᑊ','ᑠ'=>'ᑑ·','ᑢ'=>'ᑕ·','ᑪ'=>'ᑕᑊ','ᑤ'=>'ᑖ·','ᑵ'=>'ᑫ·','ᒅ'=>'ᑫᑊ','ᑷ'=>'P·','ᒆ'=>'Pᑊ','ᑹ'=>'ᑮ·','ᑻ'=>'d·','ᒇ'=>'dᑊ','ᑽ'=>'ᑰ·','ᑿ'=>'ᑲ·','ᒈ'=>'ᑲᑊ','ᒁ'=>'ᑳ·','ᘃ'=>'ᒉ','ᒓ'=>'ᒉ·','ᒕ'=>'ᒋ·','ᒗ'=>'ᒌ·','ᒙ'=>'J·','ᒛ'=>'ᒎ·','ᘂ'=>'ᒐ','ᒝ'=>'ᒐ·','ᒟ'=>'ᒑ·','ᒭ'=>'ᒣ·','ᒯ'=>'ᒥ·','ᒱ'=>'ᒦ·','ᒳ'=>'ᒧ·','ᒵ'=>'ᒨ·','ᒹ'=>'ᒫ·','ᓊ'=>'ᓀ·','ᓌ'=>'ᓇ·','ᓎ'=>'ᓈᒫ','ᘄ'=>'ᓓ','ᓝ'=>'ᓓ·','ᓟ'=>'ᓕ·','ᓡ'=>'ᓖ·','ᓣ'=>'ᓗ·','ᓥ'=>'ᓘ·','ᘇ'=>'ᓚ','ᓧ'=>'ᓚ·','ᓩ'=>'ᓛ·','ᓷ'=>'ᓭ·','ᓹ'=>'ᓯ·','ᓻ'=>'ᓰ·','ᓽ'=>'ᓱ·','ᓿ'=>'ᓲ·','ᔁ'=>'ᓴ·','ᔃ'=>'ᓵ·','ᔌ'=>'ᔋᐸ','ᔍ'=>'ᔋᑕ','ᔎ'=>'ᔋᑲ','ᔏ'=>'ᔋᒐ','ᔘ'=>'ᔐ·','ᔚ'=>'ᔑ·','ᔜ'=>'ᔒ·','ᔞ'=>'ᔓ·','ᔠ'=>'ᔔ·','ᔢ'=>'ᔕ·','ᔤ'=>'ᔖ·','ᔲ'=>'ᔨ·','ᔴ'=>'ᔩ·','ᔶ'=>'ᔪ·','ᔸ'=>'ᔫ·','ᔺ'=>'ᔭ·','ᔼ'=>'ᔮ·','᙮'=>'x','ᕽ'=>'x','ᘢ'=>'ᕃ','ᘣ'=>'ᕆ','ᘤ'=>'ᕊ','ᕏ'=>'ᕌ·','ᙯ'=>'ᕐᑫ','ᕾ'=>'ᕐᑬ','ᕿ'=>'ᕐP','ᖀ'=>'ᕐᑮ','ᖁ'=>'ᕐd','ᖂ'=>'ᕐᑰ','ᖃ'=>'ᕐᑲ','ᖄ'=>'ᕐᑳ','ᖅ'=>'ᕐᒃ','ᕜ'=>'ᕚ·','ᕩ'=>'ᕧ·','ℛ'=>'R','ℜ'=>'R','ℝ'=>'R','𝐑'=>'R','𝑅'=>'R','𝑹'=>'R','𝓡'=>'R','𝕽'=>'R','𝖱'=>'R','𝗥'=>'R','𝘙'=>'R','𝙍'=>'R','𝚁'=>'R','ᙰ'=>'ᖕᒉ','ᖎ'=>'ᖕᒊ','ᖏ'=>'ᖕᒋ','ᖐ'=>'ᖕᒌ','ᖑ'=>'ᖕJ','ᖒ'=>'ᖕᒎ','ᖓ'=>'ᖕᒐ','ᖔ'=>'ᖕᒑ','ᙱ'=>'ᖖᒋ','ᙲ'=>'ᖖᒌ','ᙳ'=>'ᖖJ','ᙴ'=>'ᖖᒎ','ᙵ'=>'ᖖᒐ','ᙶ'=>'ᖖᒑ','ℱ'=>'F','𝐅'=>'F','𝐹'=>'F','𝑭'=>'F','𝓕'=>'F','𝔉'=>'F','𝔽'=>'F','𝕱'=>'F','𝖥'=>'F','𝗙'=>'F','𝘍'=>'F','𝙁'=>'F','𝙵'=>'F','𝟊'=>'F','ⅅ'=>'D','𝐃'=>'D','𝐷'=>'D','𝑫'=>'D','𝒟'=>'D','𝓓'=>'D','𝔇'=>'D','𝔻'=>'D','𝕯'=>'D','𝖣'=>'D','𝗗'=>'D','𝘋'=>'D','𝘿'=>'D','𝙳'=>'D','ᗪ'=>'D','℧'=>'ᘮ','ᘴ'=>'ᘮ','𝛀'=>'ᘯ','𝛺'=>'ᘯ','𝜴'=>'ᘯ','𝝮'=>'ᘯ','𝞨'=>'ᘯ','ᘵ'=>'ᘯ','ㄱ'=>'ᄀ','ᄀ'=>'ᄀ','ᆨ'=>'ᄀ','ㄲ'=>'ᄁ','ᄁ'=>'ᄁ','ᆩ'=>'ᄁ','ㄴ'=>'ᄂ','ᄂ'=>'ᄂ','ᆫ'=>'ᄂ','ㄷ'=>'ᄃ','ᄃ'=>'ᄃ','ᆮ'=>'ᄃ','ㄸ'=>'ᄄ','ᄄ'=>'ᄄ','ㄹ'=>'ᄅ','ᄅ'=>'ᄅ','ᆯ'=>'ᄅ','ㅁ'=>'ᄆ','ᄆ'=>'ᄆ','ᆷ'=>'ᄆ','ㅂ'=>'ᄇ','ᄇ'=>'ᄇ','ᆸ'=>'ᄇ','ㅃ'=>'ᄈ','ᄈ'=>'ᄈ','ㅅ'=>'ᄉ','ᄉ'=>'ᄉ','ᆺ'=>'ᄉ','ㅆ'=>'ᄊ','ᄊ'=>'ᄊ','ᆻ'=>'ᄊ','ㅇ'=>'ᄋ','ᄋ'=>'ᄋ','ᆼ'=>'ᄋ','ㅈ'=>'ᄌ','ᄌ'=>'ᄌ','ᆽ'=>'ᄌ','ㅉ'=>'ᄍ','ᄍ'=>'ᄍ','ㅊ'=>'ᄎ','ᄎ'=>'ᄎ','ᆾ'=>'ᄎ','ㅋ'=>'ᄏ','ᄏ'=>'ᄏ','ᆿ'=>'ᄏ','ㅌ'=>'ᄐ','ᄐ'=>'ᄐ','ᇀ'=>'ᄐ','ㅍ'=>'ᄑ','ᄑ'=>'ᄑ','ᇁ'=>'ᄑ','ㅎ'=>'ᄒ','ᄒ'=>'ᄒ','ᇂ'=>'ᄒ','ᇅ'=>'ᄓ','ㅥ'=>'ᄔ','ㅦ'=>'ᄕ','ᇆ'=>'ᄕ','ᇊ'=>'ᄗ','ᇍ'=>'ᄘ','ᇐ'=>'ᄙ','ㅀ'=>'ᄚ','ᄚ'=>'ᄚ','ᄻ'=>'ᄚ','ᆶ'=>'ᄚ','ㅮ'=>'ᄜ','ᇜ'=>'ᄜ','ㅱ'=>'ᄝ','ᇢ'=>'ᄝ','ㅲ'=>'ᄞ','ㅳ'=>'ᄠ','ㅄ'=>'ᄡ','ᄡ'=>'ᄡ','ᆹ'=>'ᄡ','ㅴ'=>'ᄢ','ㅵ'=>'ᄣ','ㅶ'=>'ᄧ','ㅷ'=>'ᄩ','ㅸ'=>'ᄫ','ᇦ'=>'ᄫ','ㅹ'=>'ᄬ','ㅺ'=>'ᄭ','ᇧ'=>'ᄭ','ㅻ'=>'ᄮ','ㅼ'=>'ᄯ','ᇨ'=>'ᄯ','ᇩ'=>'ᄰ','ㅽ'=>'ᄲ','ᇪ'=>'ᄲ','ㅾ'=>'ᄶ','ㅿ'=>'ᅀ','ᇫ'=>'ᅀ','ᇬ'=>'ᅁ','ᇱ'=>'ᅅ','ㆂ'=>'ᅅ','ᇲ'=>'ᅆ','ㆃ'=>'ᅆ','ㆀ'=>'ᅇ','ᇮ'=>'ᅇ','ㆁ'=>'ᅌ','ᇰ'=>'ᅌ','ᇳ'=>'ᅖ','ㆄ'=>'ᅗ','ᇴ'=>'ᅗ','ㆅ'=>'ᅘ','ㆆ'=>'ᅙ','ᇹ'=>'ᅙ','ㅤ'=>'ᅠ','ᅠ'=>'ᅠ','ㅏ'=>'ᅡ','ᅡ'=>'ᅡ','ㅐ'=>'ᅢ','ᅢ'=>'ᅢ','ㅑ'=>'ᅣ','ᅣ'=>'ᅣ','ㅒ'=>'ᅤ','ᅤ'=>'ᅤ','ㅓ'=>'ᅥ','ᅥ'=>'ᅥ','ㅔ'=>'ᅦ','ᅦ'=>'ᅦ','ㅕ'=>'ᅧ','ᅧ'=>'ᅧ','ㅖ'=>'ᅨ','ᅨ'=>'ᅨ','ㅗ'=>'ᅩ','ᅩ'=>'ᅩ','ㅘ'=>'ᅪ','ᅪ'=>'ᅪ','ㅙ'=>'ᅫ','ᅫ'=>'ᅫ','ㅚ'=>'ᅬ','ᅬ'=>'ᅬ','ㅛ'=>'ᅭ','ᅭ'=>'ᅭ','ㅜ'=>'ᅮ','ᅮ'=>'ᅮ','ㅝ'=>'ᅯ','ᅯ'=>'ᅯ','ㅞ'=>'ᅰ','ᅰ'=>'ᅰ','ㅟ'=>'ᅱ','ᅱ'=>'ᅱ','ㅠ'=>'ᅲ','ᅲ'=>'ᅲ','ㅡ'=>'一','ᅳ'=>'一','ㅢ'=>'ᅴ','ᅴ'=>'ᅴ','ㅣ'=>'丨','ᅵ'=>'丨','ㆇ'=>'ᆄ','ᆆ'=>'ᆄ','ㆈ'=>'ᆅ','ㆉ'=>'ᆈ','ㆊ'=>'ᆑ','ㆋ'=>'ᆒ','ㆌ'=>'ᆔ','ㆍ'=>'ᆞ','ㆎ'=>'ᆡ','ㄳ'=>'ᆪ','ᆪ'=>'ᆪ','ㄵ'=>'ᆬ','ᆬ'=>'ᆬ','ㄶ'=>'ᆭ','ᆭ'=>'ᆭ','ㄺ'=>'ᆰ','ᆰ'=>'ᆰ','ㄻ'=>'ᆱ','ᆱ'=>'ᆱ','ㄼ'=>'ᆲ','ᆲ'=>'ᆲ','ㄽ'=>'ᆳ','ᆳ'=>'ᆳ','ㄾ'=>'ᆴ','ᆴ'=>'ᆴ','ㄿ'=>'ᆵ','ᆵ'=>'ᆵ','ㅧ'=>'ᇇ','ㅨ'=>'ᇈ','ㅩ'=>'ᇌ','ㅪ'=>'ᇎ','ㅫ'=>'ᇓ','ㅬ'=>'ᇗ','ㅭ'=>'ᇙ','ㅯ'=>'ᇝ','ㅰ'=>'ᇟ','ァ'=>'ァ','ア'=>'ア','ィ'=>'ィ','イ'=>'イ','ゥ'=>'ゥ','ウ'=>'ウ','ェ'=>'ェ','エ'=>'エ','ォ'=>'ォ','オ'=>'オ','カ'=>'カ','キ'=>'キ','ク'=>'ク','ケ'=>'ケ','コ'=>'コ','サ'=>'サ','シ'=>'シ','ス'=>'ス','セ'=>'セ','ソ'=>'ソ','タ'=>'タ','チ'=>'チ','ッ'=>'ッ','ツ'=>'ツ','テ'=>'テ','ト'=>'ト','ナ'=>'ナ','ニ'=>'ニ','ヌ'=>'ヌ','ネ'=>'ネ','ノ'=>'ノ','ハ'=>'ハ','ヒ'=>'ヒ','フ'=>'フ','ヘ'=>'へ','ホ'=>'ホ','マ'=>'マ','⧄'=>'〼','ミ'=>'ミ','ム'=>'ム','メ'=>'メ','モ'=>'モ','ャ'=>'ャ','ヤ'=>'ヤ','ュ'=>'ュ','ユ'=>'ユ','ョ'=>'ョ','ヨ'=>'ヨ','ラ'=>'ラ','リ'=>'リ','ル'=>'ル','レ'=>'レ','ロ'=>'ロ','ワ'=>'ワ','ヲ'=>'ヲ','ン'=>'ン','꒞'=>'ꁊ','꒬'=>'ꁐ','꒜'=>'ꃀ','꒿'=>'ꉙ','꒾'=>'ꊱ','꓀'=>'ꎫ','꓂'=>'ꎵ','꒺'=>'ꎿ','꒰'=>'ꏂ','𐒠'=>'𐒆','—'=>'一','―'=>'一','−'=>'一','─'=>'一','⼀'=>'一','不'=>'不','並'=>'並','|'=>'丨','|'=>'丨','∣'=>'丨','⼁'=>'丨','‖'=>'丨丨','∥'=>'丨丨','串'=>'串','⼂'=>'丶','丸'=>'丸','丹'=>'丹','丽'=>'丽','⼃'=>'丿','乁'=>'乁','⼄'=>'乙','亂'=>'亂','⼅'=>'亅','了'=>'了','⼆'=>'二','⼇'=>'亠','亮'=>'亮','⼈'=>'人','什'=>'什','仌'=>'仌','令'=>'令','你'=>'你','倂'=>'併','倂'=>'併','侀'=>'侀','來'=>'來','例'=>'例','侮'=>'侮','侮'=>'侮','侻'=>'侻','便'=>'便','值'=>'値','倫'=>'倫','偺'=>'偺','備'=>'備','像'=>'像','僚'=>'僚','僧'=>'僧','僧'=>'僧','⼉'=>'儿','兀'=>'兀','充'=>'充','免'=>'免','免'=>'免','兔'=>'兔','兤'=>'兤','⼊'=>'入','內'=>'內','全'=>'全','兩'=>'兩','⼋'=>'八','六'=>'六','具'=>'具','冀'=>'冀','⼌'=>'冂','再'=>'再','冒'=>'冒','冕'=>'冕','⼍'=>'冖','冗'=>'冗','冤'=>'冤','⼎'=>'冫','冬'=>'冬','况'=>'况','况'=>'况','冷'=>'冷','凉'=>'凉','凌'=>'凌','凜'=>'凜','凞'=>'凞','⼏'=>'几','凵'=>'凵','⼐'=>'凵','⼑'=>'刀','刃'=>'刃','切'=>'切','切'=>'切','列'=>'列','利'=>'利','刺'=>'刺','刻'=>'刻','剆'=>'剆','割'=>'割','剷'=>'剷','劉'=>'劉','力'=>'力','⼒'=>'力','劣'=>'劣','劳'=>'劳','勇'=>'勇','勇'=>'勇','勉'=>'勉','勉'=>'勉','勒'=>'勒','勞'=>'勞','勤'=>'勤','勤'=>'勤','勵'=>'勵','⼓'=>'勹','勺'=>'勺','勺'=>'勺','包'=>'包','匆'=>'匆','⼔'=>'匕','北'=>'北','北'=>'北','⼕'=>'匚','⼖'=>'匸','匿'=>'匿','⼗'=>'十','〸'=>'十','〹'=>'卄','〺'=>'卅','卉'=>'卉','卑'=>'卑','卑'=>'卑','博'=>'博','⼘'=>'卜','⼙'=>'卩','即'=>'即','卵'=>'卵','卽'=>'卽','卿'=>'卿','卿'=>'卿','卿'=>'卿','⼚'=>'厂','⼛'=>'厶','參'=>'參','⼜'=>'又','及'=>'及','叟'=>'叟','⼝'=>'口','句'=>'句','叫'=>'叫','叱'=>'叱','吆'=>'吆','吏'=>'吏','吝'=>'吝','吸'=>'吸','呂'=>'呂','呈'=>'呈','周'=>'周','咞'=>'咞','咢'=>'咢','咽'=>'咽','哶'=>'哶','唐'=>'唐','啓'=>'啓','啟'=>'啓','啕'=>'啕','啣'=>'啣','善'=>'善','善'=>'善','喇'=>'喇','喙'=>'喙','喙'=>'喙','喝'=>'喝','喝'=>'喝','喫'=>'喫','喳'=>'喳','嗀'=>'嗀','嗂'=>'嗂','嗢'=>'嗢','嘆'=>'嘆','嘆'=>'嘆','噑'=>'噑','器'=>'器','噴'=>'噴','⼞'=>'囗','囹'=>'囹','圖'=>'圖','圗'=>'圗','⼟'=>'土','型'=>'型','城'=>'城','埴'=>'埴','堍'=>'堍','報'=>'報','堲'=>'堲','塀'=>'塀','塚'=>'塚','塚'=>'塚','塞'=>'塞','填'=>'塡','墨'=>'墨','壿'=>'墫','墬'=>'墬','墳'=>'墳','壘'=>'壘','壟'=>'壟','⼠'=>'士','壮'=>'壮','売'=>'売','壷'=>'壷','⼡'=>'夂','夆'=>'夆','⼢'=>'夊','⼣'=>'夕','多'=>'多','夢'=>'夢','⼤'=>'大','奄'=>'奄','奈'=>'奈','契'=>'契','奔'=>'奔','奢'=>'奢','女'=>'女','⼥'=>'女','姘'=>'姘','姬'=>'姬','娛'=>'娛','娧'=>'娧','婢'=>'婢','婦'=>'婦','嬀'=>'媯','媵'=>'媵','嬈'=>'嬈','嬨'=>'嬨','嬾'=>'嬾','嬾'=>'嬾','⼦'=>'子','⼧'=>'宀','宅'=>'宅','寃'=>'寃','寘'=>'寘','寧'=>'寧','寧'=>'寧','寧'=>'寧','寮'=>'寮','寳'=>'寳','⼨'=>'寸','寿'=>'寿','将'=>'将','⼩'=>'小','尢'=>'尢','⼪'=>'尢','⼫'=>'尸','尿'=>'尿','屠'=>'屠','屢'=>'屢','層'=>'層','履'=>'履','屮'=>'屮','屮'=>'屮','⼬'=>'屮','⼭'=>'山','岍'=>'岍','峀'=>'峀','崙'=>'崙','嵃'=>'嵃','嵐'=>'嵐','嵫'=>'嵫','嵮'=>'嵮','嵼'=>'嵼','嶲'=>'嶲','嶺'=>'嶺','⼮'=>'巛','巡'=>'巡','巢'=>'巢','⼯'=>'工','⼰'=>'己','巽'=>'巽','⼱'=>'巾','帲'=>'帡','帨'=>'帨','帽'=>'帽','幩'=>'幩','⼲'=>'干','年'=>'年','⼳'=>'幺','⼴'=>'广','度'=>'度','庰'=>'庰','庳'=>'庳','庶'=>'庶','廉'=>'廉','廊'=>'廊','廊'=>'廊','廒'=>'廒','廓'=>'廓','廙'=>'廙','廬'=>'廬','⼵'=>'廴','廾'=>'廾','⼶'=>'廾','弄'=>'弄','⼷'=>'弋','⼸'=>'弓','弢'=>'弢','弢'=>'弢','⼹'=>'彐','当'=>'当','⼺'=>'彡','形'=>'形','彩'=>'彩','彫'=>'彫','⼻'=>'彳','律'=>'律','徚'=>'徚','復'=>'復','徭'=>'徭','⼼'=>'心','忍'=>'忍','志'=>'志','念'=>'念','忹'=>'忹','怒'=>'怒','怜'=>'怜','悁'=>'悁','悔'=>'悔','悔'=>'悔','惇'=>'惇','惘'=>'惘','惡'=>'惡','愈'=>'愈','慄'=>'慄','慈'=>'慈','慌'=>'慌','慌'=>'慌','慎'=>'慎','慎'=>'慎','慠'=>'慠','慨'=>'慨','慺'=>'慺','憎'=>'憎','憎'=>'憎','憎'=>'憎','憐'=>'憐','憤'=>'憤','憯'=>'憯','憲'=>'憲','懞'=>'懞','懲'=>'懲','懲'=>'懲','懲'=>'懲','懶'=>'懶','懶'=>'懶','戀'=>'戀','⼽'=>'戈','成'=>'成','戛'=>'戛','戮'=>'戮','戴'=>'戴','⼾'=>'戶','⼿'=>'手','扝'=>'扝','抱'=>'抱','拉'=>'拉','拏'=>'拏','拓'=>'拓','拔'=>'拔','拼'=>'拼','拾'=>'拾','挽'=>'挽','捐'=>'捐','捨'=>'捨','捻'=>'捻','掃'=>'掃','掠'=>'掠','掩'=>'掩','揄'=>'揄','揅'=>'揅','揤'=>'揤','㩁'=>'搉','搜'=>'搜','搢'=>'搢','摒'=>'摒','摩'=>'摩','摷'=>'摷','摾'=>'摾','撚'=>'撚','撝'=>'撝','擄'=>'擄','⽀'=>'支','⽁'=>'攴','敏'=>'敏','敏'=>'敏','敖'=>'敖','敬'=>'敬','數'=>'數','⽂'=>'文','⽃'=>'斗','料'=>'料','⽄'=>'斤','⽅'=>'方','旅'=>'旅','⽆'=>'无','既'=>'既','旣'=>'旣','⽇'=>'日','易'=>'易','晉'=>'晉','晩'=>'晚','䀿'=>'晣','晴'=>'晴','晴'=>'晴','暈'=>'暈','暑'=>'暑','暑'=>'暑','暜'=>'暜','暴'=>'暴','曆'=>'曆','⽈'=>'曰','更'=>'更','㫚'=>'曶','書'=>'書','最'=>'最','⽉'=>'月','肦'=>'朌','胐'=>'朏','胊'=>'朐','脁'=>'朓','朗'=>'朗','朗'=>'朗','朗'=>'朗','脧'=>'朘','望'=>'望','望'=>'望','朡'=>'朡','膧'=>'朣','⽊'=>'木','李'=>'李','杓'=>'杓','杖'=>'杖','杞'=>'杞','柿'=>'杮','杻'=>'杻','枅'=>'枅','林'=>'林','柳'=>'柳','柺'=>'柺','栗'=>'栗','栟'=>'栟','桒'=>'桒','梁'=>'梁','梅'=>'梅','梅'=>'梅','梎'=>'梎','梨'=>'梨','椔'=>'椔','楂'=>'楂','樧'=>'榝','榣'=>'榣','槪'=>'槪','樂'=>'樂','樂'=>'樂','樂'=>'樂','樓'=>'樓','檨'=>'檨','櫓'=>'櫓','櫛'=>'櫛','欄'=>'欄','⽋'=>'欠','次'=>'次','歔'=>'歔','⽌'=>'止','歲'=>'歲','歷'=>'歷','歹'=>'歹','⽍'=>'歹','殟'=>'殟','殮'=>'殮','⽎'=>'殳','殺'=>'殺','殺'=>'殺','殺'=>'殺','殻'=>'殻','⽏'=>'毋','⺟'=>'母','⽐'=>'比','⽑'=>'毛','⽒'=>'氏','⽓'=>'气','⽔'=>'水','汎'=>'汎','汧'=>'汧','沈'=>'沈','沿'=>'沿','泌'=>'泌','泍'=>'泍','泥'=>'泥','洖'=>'洖','洛'=>'洛','洞'=>'洞','洴'=>'洴','派'=>'派','流'=>'流','流'=>'流','流'=>'流','浩'=>'浩','浪'=>'浪','海'=>'海','海'=>'海','浸'=>'浸','涅'=>'涅','淋'=>'淋','淚'=>'淚','淪'=>'淪','淹'=>'淹','渚'=>'渚','港'=>'港','湮'=>'湮','潙'=>'溈','溜'=>'溜','溺'=>'溺','滇'=>'滇','滋'=>'滋','滋'=>'滋','滑'=>'滑','滛'=>'滛','漏'=>'漏','漢'=>'漢','漢'=>'漢','漣'=>'漣','潮'=>'潮','濆'=>'濆','濫'=>'濫','濾'=>'濾','瀛'=>'瀛','瀞'=>'瀞','瀞'=>'瀞','瀹'=>'瀹','灊'=>'灊','⽕'=>'火','灰'=>'灰','灷'=>'灷','災'=>'災','炙'=>'炙','炭'=>'炭','烈'=>'烈','烙'=>'烙','煅'=>'煅','煉'=>'煉','煮'=>'煮','煮'=>'煮','熜'=>'熜','燎'=>'燎','燐'=>'燐','爐'=>'爐','爛'=>'爛','爨'=>'爨','⽖'=>'爪','爫'=>'爫','⺤'=>'爫','爵'=>'爵','爵'=>'爵','⽗'=>'父','⽘'=>'爻','⽙'=>'爿','⽚'=>'片','牐'=>'牐','⽛'=>'牙','⽜'=>'牛','牢'=>'牢','犀'=>'犀','犕'=>'犕','⽝'=>'犬','犯'=>'犯','狀'=>'狀','狼'=>'狼','猪'=>'猪','猪'=>'猪','獵'=>'獵','獺'=>'獺','⽞'=>'玄','率'=>'率','率'=>'率','⽟'=>'玉','王'=>'王','玥'=>'玥','玲'=>'玲','珞'=>'珞','理'=>'理','琉'=>'琉','琢'=>'琢','瑇'=>'瑇','瑜'=>'瑜','瑩'=>'瑩','瑱'=>'瑱','瑱'=>'瑱','璅'=>'璅','璉'=>'璉','璘'=>'璘','瓊'=>'瓊','⽠'=>'瓜','⽡'=>'瓦','甆'=>'甆','⽢'=>'甘','⽣'=>'生','甤'=>'甤','⽤'=>'用','⽥'=>'田','画'=>'画','甾'=>'甾','留'=>'留','略'=>'略','異'=>'異','異'=>'異','⽦'=>'疋','⽧'=>'疒','痢'=>'痢','瘐'=>'瘐','瘝'=>'瘝','瘟'=>'瘟','療'=>'療','癩'=>'癩','⽨'=>'癶','⽩'=>'白','⽪'=>'皮','⽫'=>'皿','益'=>'益','益'=>'益','盛'=>'盛','盧'=>'盧','⽬'=>'目','直'=>'直','直'=>'直','省'=>'省','眞'=>'眞','真'=>'真','真'=>'真','着'=>'着','睊'=>'睊','睊'=>'睊','瞋'=>'瞋','瞧'=>'瞧','⽭'=>'矛','⽮'=>'矢','⽯'=>'石','硏'=>'研','硎'=>'硎','硫'=>'硫','碌'=>'碌','碌'=>'碌','碑'=>'碑','磊'=>'磊','磌'=>'磌','磌'=>'磌','磻'=>'磻','礪'=>'礪','⽰'=>'示','礼'=>'礼','社'=>'社','祈'=>'祈','祉'=>'祉','祐'=>'祐','祖'=>'祖','祖'=>'祖','祝'=>'祝','神'=>'神','祥'=>'祥','祿'=>'祿','禍'=>'禍','禎'=>'禎','福'=>'福','福'=>'福','禮'=>'禮','⽱'=>'禸','⽲'=>'禾','秊'=>'秊','秫'=>'秫','稜'=>'稜','穀'=>'穀','穀'=>'穀','穊'=>'穊','穏'=>'穏','⽳'=>'穴','突'=>'突','窱'=>'窱','立'=>'立','⽴'=>'立','竮'=>'竮','⽵'=>'竹','笠'=>'笠','節'=>'節','節'=>'節','篆'=>'篆','築'=>'築','簾'=>'簾','籠'=>'籠','⽶'=>'米','类'=>'类','粒'=>'粒','精'=>'精','糒'=>'糒','糖'=>'糖','糣'=>'糣','糧'=>'糧','糨'=>'糨','⽷'=>'糸','紀'=>'紀','紐'=>'紐','索'=>'索','累'=>'累','絶'=>'絕','絛'=>'絛','絣'=>'絣','綠'=>'綠','綾'=>'綾','緇'=>'緇','練'=>'練','練'=>'練','練'=>'練','縂'=>'縂','縉'=>'縉','縷'=>'縷','繁'=>'繁','繅'=>'繅','⽸'=>'缶','缾'=>'缾','⽹'=>'网','⺫'=>'罒','署'=>'署','罹'=>'罹','罺'=>'罺','羅'=>'羅','⽺'=>'羊','羕'=>'羕','羚'=>'羚','羽'=>'羽','⽻'=>'羽','翺'=>'翺','老'=>'老','⽼'=>'老','者'=>'者','者'=>'者','者'=>'者','⽽'=>'而','⽾'=>'耒','⽿'=>'耳','聆'=>'聆','聠'=>'聠','聯'=>'聯','聰'=>'聰','聾'=>'聾','⾀'=>'聿','⾁'=>'肉','肋'=>'肋','肭'=>'肭','育'=>'育','㬵'=>'胶','腁'=>'胼','脃'=>'脃','脾'=>'脾','臘'=>'臘','⾂'=>'臣','臨'=>'臨','⾃'=>'自','臭'=>'臭','⾄'=>'至','⾅'=>'臼','舁'=>'舁','舁'=>'舁','舄'=>'舄','⾆'=>'舌','⾇'=>'舛','⾈'=>'舟','⾉'=>'艮','良'=>'良','⾊'=>'色','⾋'=>'艸','艹'=>'艹','艹'=>'艹','芋'=>'芋','芑'=>'芑','芝'=>'芝','花'=>'花','芳'=>'芳','芽'=>'芽','若'=>'若','若'=>'若','苦'=>'苦','茝'=>'茝','茣'=>'茣','茶'=>'茶','荒'=>'荒','荓'=>'荓','荣'=>'荣','莭'=>'莭','莽'=>'莽','菉'=>'菉','菊'=>'菊','菌'=>'菌','菜'=>'菜','菧'=>'菧','華'=>'華','菱'=>'菱','落'=>'落','葉'=>'葉','著'=>'著','著'=>'著','蔿'=>'蒍','蓮'=>'蓮','蓱'=>'蓱','蓳'=>'蓳','蓼'=>'蓼','蔖'=>'蔖','蕤'=>'蕤','藍'=>'藍','藺'=>'藺','蘆'=>'蘆','蘒'=>'蘒','蘭'=>'蘭','虁'=>'蘷','蘿'=>'蘿','⾌'=>'虍','虐'=>'虐','虜'=>'虜','虜'=>'虜','虧'=>'虧','虩'=>'虩','⾍'=>'虫','蚈'=>'蚈','蚩'=>'蚩','蛢'=>'蛢','蜎'=>'蜎','蜨'=>'蜨','蝫'=>'蝫','蝹'=>'蝹','蝹'=>'蝹','螆'=>'螆','螺'=>'螺','蟡'=>'蟡','蠁'=>'蠁','蠟'=>'蠟','⾎'=>'血','行'=>'行','⾏'=>'行','衠'=>'衠','衣'=>'衣','⾐'=>'衣','裂'=>'裂','裏'=>'裏','裗'=>'裗','裞'=>'裞','裡'=>'裡','裸'=>'裸','裺'=>'裺','褐'=>'褐','襁'=>'襁','襤'=>'襤','⾑'=>'襾','覆'=>'覆','見'=>'見','⾒'=>'見','視'=>'視','視'=>'視','⾓'=>'角','⾔'=>'言','䚶'=>'訞','詽'=>'訮','誠'=>'誠','說'=>'說','說'=>'說','調'=>'調','請'=>'請','諒'=>'諒','論'=>'論','諭'=>'諭','諭'=>'諭','諸'=>'諸','諸'=>'諸','諾'=>'諾','諾'=>'諾','謁'=>'謁','謁'=>'謁','謹'=>'謹','謹'=>'謹','識'=>'識','讀'=>'讀','讏'=>'讆','變'=>'變','變'=>'變','⾕'=>'谷','⾖'=>'豆','豈'=>'豈','豕'=>'豕','⾗'=>'豕','⾘'=>'豸','⾙'=>'貝','貫'=>'貫','賁'=>'賁','賂'=>'賂','賈'=>'賈','賓'=>'賓','贈'=>'贈','贈'=>'贈','贛'=>'贛','⾚'=>'赤','⾛'=>'走','起'=>'起','趆'=>'赿','⾜'=>'足','趼'=>'趼','跋'=>'跋','跺'=>'跥','路'=>'路','跰'=>'跰','躛'=>'躗','⾝'=>'身','車'=>'車','⾞'=>'車','軔'=>'軔','輧'=>'軿','輦'=>'輦','輪'=>'輪','輸'=>'輸','輸'=>'輸','輻'=>'輻','轢'=>'轢','⾟'=>'辛','辞'=>'辞','辰'=>'辰','⾠'=>'辰','⾡'=>'辵','辶'=>'辶','⻌'=>'辶','連'=>'連','逸'=>'逸','逸'=>'逸','遲'=>'遲','遼'=>'遼','邏'=>'邏','⾢'=>'邑','邔'=>'邔','郎'=>'郎','郱'=>'郱','都'=>'都','鄑'=>'鄑','鄛'=>'鄛','⾣'=>'酉','酪'=>'酪','醙'=>'醙','醴'=>'醴','⾤'=>'釆','里'=>'里','⾥'=>'里','量'=>'量','金'=>'金','⾦'=>'金','鈴'=>'鈴','鈸'=>'鈸','鉶'=>'鉶','鉼'=>'鉼','鋗'=>'鋗','鋘'=>'鋘','錄'=>'錄','鍊'=>'鍊','鎮'=>'鎭','鏹'=>'鏹','鐕'=>'鐕','⾧'=>'長','⾨'=>'門','開'=>'開','閭'=>'閭','閷'=>'閷','⾩'=>'阜','阮'=>'阮','陋'=>'陋','降'=>'降','陵'=>'陵','陸'=>'陸','陼'=>'陼','隆'=>'隆','隣'=>'隣','⾪'=>'隶','隸'=>'隸','⾫'=>'隹','雃'=>'雃','離'=>'離','難'=>'難','難'=>'難','⾬'=>'雨','零'=>'零','雷'=>'雷','霣'=>'霣','露'=>'露','靈'=>'靈','⾭'=>'靑','靖'=>'靖','靖'=>'靖','⾮'=>'非','⾯'=>'面','⾰'=>'革','⾱'=>'韋','韛'=>'韛','韠'=>'韠','⾲'=>'韭','⾳'=>'音','響'=>'響','響'=>'響','⾴'=>'頁','頋'=>'頋','頋'=>'頋','頋'=>'頋','領'=>'領','頩'=>'頩','頻'=>'頻','頻'=>'頻','類'=>'類','⾵'=>'風','⾶'=>'飛','⻝'=>'食','⾷'=>'食','飢'=>'飢','飯'=>'飯','飼'=>'飼','館'=>'館','餩'=>'餩','⾸'=>'首','⾹'=>'香','馧'=>'馧','⾺'=>'馬','駂'=>'駂','駱'=>'駱','駾'=>'駾','驪'=>'驪','⾻'=>'骨','⾼'=>'高','⾽'=>'髟','鬒'=>'鬒','鬒'=>'鬒','⾾'=>'鬥','⾿'=>'鬯','⿀'=>'鬲','⿁'=>'鬼','⿂'=>'魚','魯'=>'魯','鱀'=>'鱀','鱗'=>'鱗','⿃'=>'鳥','鳽'=>'鳽','鵧'=>'鵧','鶴'=>'鶴','鷺'=>'鷺','鸞'=>'鸞','鹃'=>'鹂','⿄'=>'鹵','鹿'=>'鹿','⿅'=>'鹿','麗'=>'麗','麟'=>'麟','⿆'=>'麥','麻'=>'麻','⿇'=>'麻','⿈'=>'黃','⿉'=>'黍','黎'=>'黎','⿊'=>'黑','黹'=>'黹','⿋'=>'黹','⿌'=>'黽','黾'=>'黾','鼅'=>'鼅','⿍'=>'鼎','鼏'=>'鼏','⿎'=>'鼓','鼖'=>'鼖','⿏'=>'鼠','鼻'=>'鼻','⿐'=>'鼻','齃'=>'齃','⿑'=>'齊','⿒'=>'齒','龍'=>'龍','⿓'=>'龍','龎'=>'龎','龜'=>'龜','龜'=>'龜','龜'=>'龜','⿔'=>'龜','⻳'=>'龟','⿕'=>'龠','㒞'=>'㒞','㒹'=>'㒹','㒻'=>'㒻','㓟'=>'㓟','㔕'=>'㔕','䎛'=>'㖈','㛮'=>'㛮','㛼'=>'㛼','㞁'=>'㞁','㠯'=>'㠯','㡢'=>'㡢','㡼'=>'㡼','㣇'=>'㣇','㣣'=>'㣣','㤜'=>'㤜','㤺'=>'㤺','㨮'=>'㨮','㩬'=>'㩬','㫤'=>'㫤','㬈'=>'㬈','㬙'=>'㬙','䐠'=>'㬻','㭉'=>'㭉','㮝'=>'㮝','㮝'=>'㮝','㰘'=>'㰘','㱎'=>'㱎','㴳'=>'㴳','㶖'=>'㶖','㺬'=>'㺬','㺸'=>'㺸','㺸'=>'㺸','㼛'=>'㼛','㿼'=>'㿼','䀈'=>'䀈','䀘'=>'䀘','䀹'=>'䀹','䀹'=>'䀹','䁆'=>'䁆','䂖'=>'䂖','䃣'=>'䃣','䄯'=>'䄯','䈂'=>'䈂','䈧'=>'䈧','䊠'=>'䊠','䌁'=>'䌁','䌴'=>'䌴','䍙'=>'䍙','䏕'=>'䏕','䏙'=>'䏙','䐋'=>'䐋','䑫'=>'䑫','䔫'=>'䔫','䕝'=>'䕝','䕡'=>'䕡','䕫'=>'䕫','䗗'=>'䗗','䗹'=>'䗹','䘵'=>'䘵','䚾'=>'䚾','䛇'=>'䛇','䦕'=>'䦕','䧦'=>'䧦','䩮'=>'䩮','䩶'=>'䩶','䪲'=>'䪲','䬳'=>'䬳','䯎'=>'䯎','䳎'=>'䳎','䳭'=>'䳭','䳸'=>'䳸','䵖'=>'䵖','𠄢'=>'𠄢','𠔜'=>'𠔜','𠔥'=>'𠔥','𠕋'=>'𠕋','𠘺'=>'𠘺','𠠄'=>'𠠄','𠣞'=>'𠣞','𠨬'=>'𠨬','𠭣'=>'𠭣','𡓤'=>'𡓤','𡚨'=>'𡚨','𡛪'=>'𡛪','𡧈'=>'𡧈','𡬘'=>'𡬘','𡴋'=>'𡴋','𡷤'=>'𡷤','𡷦'=>'𡷦','𢆃'=>'𢆃','𢆟'=>'𢆟','𢌱'=>'𢌱','𢌱'=>'𢌱','𢛔'=>'𢛔','𢡄'=>'𢡄','𢡊'=>'𢡊','𢬌'=>'𢬌','𢯱'=>'𢯱','𣀊'=>'𣀊','𣊸'=>'𣊸','𣍟'=>'𣍟','𣎓'=>'𣎓','𣎜'=>'𣎜','𣏃'=>'𣏃','𣏕'=>'𣏕','𣑭'=>'𣑭','𣚣'=>'𣚣','𣢧'=>'𣢧','𣪍'=>'𣪍','𣫺'=>'𣫺','𣲼'=>'𣲼','𣴞'=>'𣴞','𣻑'=>'𣻑','𣽞'=>'𣽞','𣾎'=>'𣾎','𤉣'=>'𤉣','𤎫'=>'𤎫','𤘈'=>'𤘈','𤜵'=>'𤜵','𤠔'=>'𤠔','𤰶'=>'𤰶','𤲒'=>'𤲒','𤾡'=>'𤾡','𤾸'=>'𤾸','𥁄'=>'𥁄','𥃲'=>'𥃲','𥃳'=>'𥃳','𥄙'=>'𥄙','𥄳'=>'𥄳','𥉉'=>'𥉉','𥐝'=>'𥐝','𥘦'=>'𥘦','𥚚'=>'𥚚','𥛅'=>'𥛅','𥥼'=>'𥥼','𥪧'=>'𥪧','𥪧'=>'𥪧','𥮫'=>'𥮫','𥲀'=>'𥲀','𥳐'=>'𥳐','𥾆'=>'𥾆','𦇚'=>'𦇚','𦈨'=>'𦈨','𦉇'=>'𦉇','𦋙'=>'𦋙','𦌾'=>'𦌾','𦓚'=>'𦓚','𦔣'=>'𦔣','𦖨'=>'𦖨','𦞧'=>'𦞧','𦞵'=>'𦞵','𦬼'=>'𦬼','𦰶'=>'𦰶','𦳕'=>'𦳕','𦵫'=>'𦵫','𦼬'=>'𦼬','𦾱'=>'𦾱','𧃒'=>'𧃒','𧏊'=>'𧏊','𧙧'=>'𧙧','𧢮'=>'𧢮','𧥦'=>'𧥦','𧲨'=>'𧲨','𧻓'=>'𧻓','𧼯'=>'𧼯','𨗒'=>'𨗒','𨗭'=>'𨗭','𨜮'=>'𨜮','𨯺'=>'𨯺','𨵷'=>'𨵷','𩅅'=>'𩅅','𩇟'=>'𩇟','𩈚'=>'𩈚','𩐊'=>'𩐊','𩒖'=>'𩒖','𩖶'=>'𩖶','𩬰'=>'𩬰','𪃎'=>'𪃎','𪄅'=>'𪄅','𪈎'=>'𪈎','𪊑'=>'𪊑','𪎒'=>'𪎒','𪘀'=>'𪘀','℃'=>'°C','℉'=>'°F','ℇ'=>'Ɛ','℻'=>'FAX','ℕ'=>'N','№'=>'No','ℚ'=>'Q','₨'=>'Rs','𝐓'=>'T','℡'=>'TEL','𝐔'=>'U','𝐖'=>'W','₩'=>'W̵','𝐗'=>'X','¥'=>'Y̵','𝚲'=>'Λ','𝚵'=>'Ξ','ℿ'=>'Π','ϲ'=>'c','ϒ'=>'Y','𝚽'=>'Φ','𝚿'=>'Ψ','ѣ'=>'Ь̵','ਃ'=>'ঃ','ಃ'=>'ః','່'=>'่','់'=>'่','້'=>'้','໊'=>'๊','໋'=>'๋','៕'=>'๚','៚'=>'๛','ъ'=>'ˉb','៙'=>'๏','೧'=>'౧','૨'=>'२','೨'=>'౨','૩'=>'३','૪'=>'४','૮'=>'८','೯'=>'౯','а'=>'a','Ꮟ'=>'b','ᖯ'=>'b','с'=>'c','ԁ'=>'d','ᑯ'=>'d','е'=>'e','ә'=>'ǝ','ε'=>'ɛ','є'=>'ɛ','ք'=>'f','ց'=>'g','һ'=>'h','հ'=>'h','Ꮒ'=>'h','Ᏺ'=>'h̔','ι'=>'i','і'=>'i','Ꭵ'=>'i','ј'=>'j','յ'=>'j','ᗰ'=>'m','ո'=>'n','η'=>'n̩','ం'=>'o','ಂ'=>'o','ം'=>'o','०'=>'o','੦'=>'o','૦'=>'o','๐'=>'o','໐'=>'o','ο'=>'o','о'=>'o','օ'=>'o','ဝ'=>'o','ρ'=>'p','р'=>'p','ᴩ'=>'ᴘ','գ'=>'q','κ'=>'ĸ','к'=>'ĸ','ᴦ'=>'r','г'=>'r','ѕ'=>'s','υ'=>'u','ս'=>'u','ν'=>'v','ѵ'=>'v','Ꮃ'=>'w','ᗯ'=>'w','х'=>'x','ᕁ'=>'x','у'=>'y','Ꭹ'=>'y','ӡ'=>'ʒ','ჳ'=>'ʒ','ϩ'=>'ƨ','ь'=>'ƅ','ы'=>'ƅi','ɑ'=>'α','ծ'=>'δ','ᕷ'=>'δ','п'=>'π','ɸ'=>'φ','ф'=>'φ','ʙ'=>'в','ɜ'=>'з','ᴍ'=>'м','ʜ'=>'н','ɢ'=>'ԍ','ᴛ'=>'т','ᴙ'=>'я','ઽ'=>'ऽ','ુ'=>'ु','ૂ'=>'ू','ੋ'=>'ॆ','੍'=>'्','્'=>'्','ഉ'=>'உ','ജ'=>'ஐ','ണ'=>'ண','ഴ'=>'ழ','ി'=>'ி','ു'=>'ூ','ಅ'=>'అ','ಆ'=>'ఆ','ಇ'=>'ఇ','ಒ'=>'ఒ','ಓ'=>'ఒౕ','ಜ'=>'జ','ಞ'=>'ఞ','ಣ'=>'ణ','థ'=>'ధּ','ಯ'=>'య','ఠ'=>'రּ','ಱ'=>'ఱ','ಲ'=>'ల','ඌ'=>'ന്ന','ஶ'=>'ശ','ຈ'=>'จ','ບ'=>'บ','ປ'=>'ป','ຝ'=>'ฝ','ພ'=>'พ','ຟ'=>'ฟ','ຍ'=>'ย','។'=>'ฯ','ិ'=>'ิ','ី'=>'ี','ឹ'=>'ึ','ឺ'=>'ื','ຸ'=>'ุ','ູ'=>'ู','ᗅ'=>'A','ᒍ'=>'J','ᕼ'=>'H','ᐯ'=>'V','ᑭ'=>'P','ᗷ'=>'B','ヘ'=>'へ','𐏑'=>'𐎂','𐏓'=>'𐎓','𒀸'=>'𐎚','ᅳ'=>'一','ǀ'=>'丨','ᅵ'=>'丨','Ꭺ'=>'A','Ᏼ'=>'B','Ꮯ'=>'C','ᗞ'=>'D','Ꭼ'=>'E','ᖴ'=>'F','Ꮐ'=>'G','Ꮋ'=>'H','Ꭻ'=>'J','Ꮶ'=>'K','Ꮮ'=>'L','Ꮇ'=>'M','Ꮲ'=>'P','ᖇ'=>'R','Ꮥ'=>'S','Ꮩ'=>'V','Ꮓ'=>'Z');
-
-?> \ No newline at end of file
diff --git a/phpBB/install/data/new_normalizer.php b/phpBB/install/data/new_normalizer.php
index e266f73408..380998f530 100644
--- a/phpBB/install/data/new_normalizer.php
+++ b/phpBB/install/data/new_normalizer.php
@@ -2,9 +2,8 @@
/**
*
* @package install
-* @version $Id$
* @copyright (c) 2007 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -192,5 +191,3 @@ class utf_new_normalizer
return utf_normalizer::recompose($str, $pos, $len, $qc, $decomp_map);
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php
index 7c57dfdc1f..bad51e2fe3 100644
--- a/phpBB/install/database_update.php
+++ b/phpBB/install/database_update.php
@@ -1,114 +1,123 @@
<?php
/**
*
-* @package install
-* @version $Id$
-* @copyright (c) 2006 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @package phpBB3
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
-define('UPDATES_TO_VERSION', '3.0.13-dev');
+$update_start_time = time();
-// Enter any version to update from to test updates. The version within the db will not be updated.
-define('DEBUG_FROM_VERSION', false);
-
-// Which oldest version does this updater support?
-define('OLDEST_FROM_VERSION', '3.0.0');
-
-// Return if we "just include it" to find out for which version the database update is responsible for
-if (defined('IN_PHPBB') && defined('IN_INSTALL'))
-{
- $updates_to_version = UPDATES_TO_VERSION;
- $debug_from_version = DEBUG_FROM_VERSION;
- $oldest_from_version = OLDEST_FROM_VERSION;
-
- return;
-}
+use Symfony\Component\Config\FileLocator;
+use Symfony\Component\DependencyInjection\ContainerBuilder;
+use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
/**
+* @ignore
*/
define('IN_PHPBB', true);
define('IN_INSTALL', true);
-
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './../';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
-if (!function_exists('phpbb_require_updated'))
+function phpbb_end_update($cache, $config)
{
- function phpbb_require_updated($path, $optional = false)
- {
- global $phpbb_root_path;
+ $cache->purge();
- $new_path = $phpbb_root_path . 'install/update/new/' . $path;
- $old_path = $phpbb_root_path . $path;
+ $config->increment('assets_version', 1);
- if (file_exists($new_path))
- {
- require($new_path);
- }
- else if (!$optional || file_exists($old_path))
- {
- require($old_path);
- }
- }
-}
+?>
+ </p>
+ </div>
+ </div>
+ <span class="corners-bottom"><span></span></span>
+ </div>
+ </div>
+ </div>
-phpbb_require_updated('includes/startup.' . $phpEx);
+ <div id="page-footer">
+ Powered by <a href="https://www.phpbb.com/">phpBB</a>&reg; Forum Software &copy; phpBB Group
+ </div>
+ </div>
+</body>
+</html>
-$updates_to_version = UPDATES_TO_VERSION;
-$debug_from_version = DEBUG_FROM_VERSION;
-$oldest_from_version = OLDEST_FROM_VERSION;
+<?php
-@set_time_limit(0);
+ garbage_collection();
+ exit_handler();
+}
-// Include essential scripts
-include($phpbb_root_path . 'config.' . $phpEx);
+require($phpbb_root_path . 'includes/startup.' . $phpEx);
+include($phpbb_root_path . 'config.' . $phpEx);
if (!defined('PHPBB_INSTALLED') || empty($dbms) || empty($acm_type))
{
die("Please read: <a href='../docs/INSTALL.html'>INSTALL.html</a> before attempting to update.");
}
-// Load Extensions
-if (!empty($load_extensions) && function_exists('dl'))
-{
- $load_extensions = explode(',', $load_extensions);
-
- foreach ($load_extensions as $extension)
- {
- @dl(trim($extension));
- }
-}
+// In case $phpbb_adm_relative_path is not set (in case of an update), use the default.
+$phpbb_adm_relative_path = (isset($phpbb_adm_relative_path)) ? $phpbb_adm_relative_path : 'adm/';
+$phpbb_admin_path = (defined('PHPBB_ADMIN_PATH')) ? PHPBB_ADMIN_PATH : $phpbb_root_path . $phpbb_adm_relative_path;
// Include files
-require($phpbb_root_path . 'includes/acm/acm_' . $acm_type . '.' . $phpEx);
-require($phpbb_root_path . 'includes/cache.' . $phpEx);
-require($phpbb_root_path . 'includes/template.' . $phpEx);
-require($phpbb_root_path . 'includes/session.' . $phpEx);
-require($phpbb_root_path . 'includes/auth.' . $phpEx);
+require($phpbb_root_path . 'phpbb/class_loader.' . $phpEx);
require($phpbb_root_path . 'includes/functions.' . $phpEx);
+require($phpbb_root_path . 'includes/functions_content.' . $phpEx);
+require($phpbb_root_path . 'includes/functions_container.' . $phpEx);
-phpbb_require_updated('includes/functions_content.' . $phpEx, true);
-
-require($phpbb_root_path . 'includes/functions_admin.' . $phpEx);
+require($phpbb_root_path . 'config.' . $phpEx);
require($phpbb_root_path . 'includes/constants.' . $phpEx);
-require($phpbb_root_path . 'includes/db/' . $dbms . '.' . $phpEx);
+include($phpbb_root_path . 'includes/utf/utf_normalizer.' . $phpEx);
require($phpbb_root_path . 'includes/utf/utf_tools.' . $phpEx);
-phpbb_require_updated('includes/db/db_tools.' . $phpEx);
-
-// new table constants are separately defined here in case the updater is run
-// before the files are updated
-if (!defined('LOGIN_ATTEMPT_TABLE'))
+// Set PHP error handler to ours
+set_error_handler(defined('PHPBB_MSG_HANDLER') ? PHPBB_MSG_HANDLER : 'msg_handler');
+
+// Setup class loader first
+$phpbb_class_loader = new \phpbb\class_loader('phpbb\\', "{$phpbb_root_path}phpbb/", $phpEx);
+$phpbb_class_loader->register();
+
+// Set up container (must be done here because extensions table may not exist)
+$container_extensions = array(
+ new \phpbb\di\extension\config($phpbb_root_path . 'config.' . $phpEx),
+ new \phpbb\di\extension\core($phpbb_root_path . 'config/'),
+);
+$container_passes = array(
+ new \phpbb\di\pass\collection_pass(),
+);
+$phpbb_container = phpbb_create_container($container_extensions, $phpbb_root_path, $phpEx);
+
+// Compile the container
+foreach ($container_passes as $pass)
{
- define('LOGIN_ATTEMPT_TABLE', $table_prefix . 'login_attempts');
+ $phpbb_container->addCompilerPass($pass);
}
+$phpbb_container->compile();
+
+// set up caching
+$cache = $phpbb_container->get('cache');
+
+// Instantiate some basic classes
+$phpbb_dispatcher = $phpbb_container->get('dispatcher');
+$request = $phpbb_container->get('request');
+$user = $phpbb_container->get('user');
+$auth = $phpbb_container->get('auth');
+$db = $phpbb_container->get('dbal.conn');
+$phpbb_log = $phpbb_container->get('log');
+
+// make sure request_var uses this request instance
+request_var('', 0, false, false, $request); // "dependency injection" for a function
+
+// Grab global variables, re-cache if necessary
+$config = $phpbb_container->get('config');
+set_config(null, null, null, $config);
+set_config_count(null, null, null, $config);
+$orig_version = $config['version'];
-$user = new user();
-$cache = new cache();
-$db = new $sql_db();
+$user->add_lang(array('common', 'acp/common', 'install', 'migrator'));
// Add own hook handler, if present. :o
if (file_exists($phpbb_root_path . 'includes/hooks/index.' . $phpEx))
@@ -116,7 +125,8 @@ if (file_exists($phpbb_root_path . 'includes/hooks/index.' . $phpEx))
require($phpbb_root_path . 'includes/hooks/index.' . $phpEx);
$phpbb_hook = new phpbb_hook(array('exit_handler', 'phpbb_user_session_handler', 'append_sid', array('template', 'display')));
- foreach ($cache->obtain_hooks() as $hook)
+ $phpbb_hook_finder = $phpbb_container->get('hook_finder');
+ foreach ($phpbb_hook_finder->find() as $hook)
{
@include($phpbb_root_path . 'includes/hooks/' . $hook . '.' . $phpEx);
}
@@ -126,2135 +136,153 @@ else
$phpbb_hook = false;
}
-// Connect to DB
-$db->sql_connect($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, false, false);
-
-// We do not need this any longer, unset for safety purposes
-unset($dbpasswd);
-
-$user->ip = (!empty($_SERVER['REMOTE_ADDR'])) ? htmlspecialchars($_SERVER['REMOTE_ADDR']) : '';
-$user->ip = (stripos($user->ip, '::ffff:') === 0) ? substr($user->ip, 7) : $user->ip;
-
-$sql = "SELECT config_value
- FROM " . CONFIG_TABLE . "
- WHERE config_name = 'default_lang'";
-$result = $db->sql_query($sql);
-$row = $db->sql_fetchrow($result);
-$db->sql_freeresult($result);
-
-$language = basename(request_var('language', ''));
-
-if (!$language)
-{
- $language = $row['config_value'];
-}
-
-if (!file_exists($phpbb_root_path . 'language/' . $language))
-{
- die('No language found!');
-}
-
-// And finally, load the relevant language files
-include($phpbb_root_path . 'language/' . $language . '/common.' . $phpEx);
-include($phpbb_root_path . 'language/' . $language . '/acp/common.' . $phpEx);
-include($phpbb_root_path . 'language/' . $language . '/install.' . $phpEx);
-
-// Set PHP error handler to ours
-//set_error_handler('msg_handler');
-
-// Define some variables for the database update
-$inline_update = (request_var('type', 0)) ? true : false;
-
-// To let set_config() calls succeed, we need to make the config array available globally
-$config = array();
-
-$sql = 'SELECT *
- FROM ' . CONFIG_TABLE;
-$result = $db->sql_query($sql);
-
-while ($row = $db->sql_fetchrow($result))
-{
- $config[$row['config_name']] = $row['config_value'];
-}
-$db->sql_freeresult($result);
-
-// phpbb_db_tools will be taken from new files (under install/update/new)
-// if possible, falling back to the board's copy.
-$db_tools = new phpbb_db_tools($db, true);
-
-$database_update_info = database_update_info();
-
-$error_ary = array();
-$errored = false;
-
header('Content-type: text/html; charset=UTF-8');
-
?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" dir="<?php echo $lang['DIRECTION']; ?>" lang="<?php echo $lang['USER_LANG']; ?>" xml:lang="<?php echo $lang['USER_LANG']; ?>">
+<!DOCTYPE html>
+<html dir="<?php echo $user->lang['DIRECTION']; ?>" lang="<?php echo $user->lang['USER_LANG']; ?>">
<head>
+<meta charset="utf-8">
-<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
-<meta http-equiv="content-language" content="<?php echo $lang['USER_LANG']; ?>" />
-<meta http-equiv="content-style-type" content="text/css" />
-<meta http-equiv="imagetoolbar" content="no" />
-
-<title><?php echo $lang['UPDATING_TO_LATEST_STABLE']; ?></title>
+<title><?php echo $user->lang['UPDATING_TO_LATEST_STABLE']; ?></title>
-<link href="../adm/style/admin.css" rel="stylesheet" type="text/css" media="screen" />
+<link href="<?php echo htmlspecialchars($phpbb_admin_path); ?>style/admin.css" rel="stylesheet" type="text/css" media="screen" />
</head>
<body>
-<div id="wrap">
- <div id="page-header">&nbsp;</div>
-
- <div id="page-body">
- <div id="acp">
- <div class="panel">
- <span class="corners-top"><span></span></span>
- <div id="content">
- <div id="main" class="install-body">
-
- <h1><?php echo $lang['UPDATING_TO_LATEST_STABLE']; ?></h1>
-
- <br />
-
- <p><?php echo $lang['DATABASE_TYPE']; ?> :: <strong><?php echo $db->sql_layer; ?></strong><br />
-<?php
-
-if ($debug_from_version !== false)
-{
- $config['version'] = $debug_from_version;
-}
-
-echo $lang['PREVIOUS_VERSION'] . ' :: <strong>' . $config['version'] . '</strong><br />';
-echo $lang['UPDATED_VERSION'] . ' :: <strong>' . $updates_to_version . '</strong></p>';
-
-$current_version = str_replace('rc', 'RC', strtolower($config['version']));
-$latest_version = str_replace('rc', 'RC', strtolower($updates_to_version));
-$orig_version = $config['version'];
-
-// Fill DB version
-if (empty($config['dbms_version']))
-{
- set_config('dbms_version', $db->sql_server_info(true));
-}
-
-// Firebird update from Firebird 2.0 to 2.1+ required?
-if ($db->sql_layer == 'firebird')
-{
- // We do not trust any PHP5 function enabled, we will simply test for a function new in 2.1
- $db->sql_return_on_error(true);
-
- $sql = 'SELECT 1 FROM RDB$DATABASE
- WHERE BIN_AND(10, 1) = 0';
- $result = $db->sql_query($sql);
-
- if (!$result || $db->sql_error_triggered)
- {
- echo '<br /><br />';
- echo '<h1>' . $lang['ERROR'] . '</h1><br />';
-
- echo '<p>' . $lang['FIREBIRD_DBMS_UPDATE_REQUIRED'] . '</p>';
-
- _print_footer();
-
- exit_handler();
- exit;
- }
-
- $db->sql_freeresult($result);
- $db->sql_return_on_error(false);
-}
-
-// MySQL update from MySQL 3.x/4.x to > 4.1.x required?
-if ($db->sql_layer == 'mysql' || $db->sql_layer == 'mysql4' || $db->sql_layer == 'mysqli')
-{
- // Verify by fetching column... if the column type matches the new type we update dbms_version...
- $sql = "SHOW COLUMNS FROM " . CONFIG_TABLE;
- $result = $db->sql_query($sql);
-
- $column_type = '';
- while ($row = $db->sql_fetchrow($result))
- {
- $field = strtolower($row['Field']);
-
- if ($field == 'config_value')
- {
- $column_type = strtolower($row['Type']);
- break;
- }
- }
- $db->sql_freeresult($result);
-
- // If column type is blob, but mysql version says we are on > 4.1.3, then the schema needs an update
- if (strpos($column_type, 'blob') !== false && version_compare($db->sql_server_info(true), '4.1.3', '>='))
- {
- echo '<br /><br />';
- echo '<h1>' . $lang['ERROR'] . '</h1><br />';
-
- echo '<p>' . sprintf($lang['MYSQL_SCHEMA_UPDATE_REQUIRED'], $config['dbms_version'], $db->sql_server_info(true)) . '</p>';
-
- _print_footer();
-
- exit_handler();
- exit;
- }
-}
-
-// Now check if the user wants to update from a version we no longer support updates from
-if (version_compare($current_version, $oldest_from_version, '<'))
-{
- echo '<br /><br /><h1>' . $lang['ERROR'] . '</h1><br />';
- echo '<p>' . sprintf($lang['DB_UPDATE_NOT_SUPPORTED'], $oldest_from_version, $current_version) . '</p>';
-
- _print_footer();
- exit_handler();
- exit;
-}
-
-// If the latest version and the current version are 'unequal', we will update the version_update_from, else we do not update anything.
-if ($inline_update)
-{
- if ($current_version !== $latest_version)
- {
- set_config('version_update_from', $orig_version);
- }
-}
-else
-{
- // If not called from the update script, we will actually remove the traces
- $db->sql_query('DELETE FROM ' . CONFIG_TABLE . " WHERE config_name = 'version_update_from'");
-}
-
-// Schema updates
-?>
- <br /><br />
-
- <h1><?php echo $lang['UPDATE_DATABASE_SCHEMA']; ?></h1>
-
- <br />
- <p><?php echo $lang['PROGRESS']; ?> :: <strong>
-
-<?php
-
-flush();
+ <div id="wrap">
+ <div id="page-header">&nbsp;</div>
-// We go through the schema changes from the lowest to the highest version
-// We try to also include versions 'in-between'...
-$no_updates = true;
-$versions = array_keys($database_update_info);
-for ($i = 0; $i < sizeof($versions); $i++)
-{
- $version = $versions[$i];
- $schema_changes = $database_update_info[$version];
-
- $next_version = (isset($versions[$i + 1])) ? $versions[$i + 1] : $updates_to_version;
-
- // If the installed version to be updated to is < than the current version, and if the current version is >= as the version to be updated to next, we will skip the process
- if (version_compare($version, $current_version, '<') && version_compare($current_version, $next_version, '>='))
- {
- continue;
- }
-
- if (!sizeof($schema_changes))
- {
- continue;
- }
-
- $no_updates = false;
-
- // We run one index after the other... to be consistent with schema changes...
- foreach ($schema_changes as $key => $changes)
- {
- $statements = $db_tools->perform_schema_changes(array($key => $changes));
-
- foreach ($statements as $sql)
- {
- _sql($sql, $errored, $error_ary);
- }
- }
-}
-
-_write_result($no_updates, $errored, $error_ary);
-
-// Data updates
-$error_ary = array();
-$errored = $no_updates = false;
-
-?>
-
-<br /><br />
-<h1><?php echo $lang['UPDATING_DATA']; ?></h1>
-<br />
-<p><?php echo $lang['PROGRESS']; ?> :: <strong>
-
-<?php
-
-flush();
-
-$no_updates = true;
-$versions = array_keys($database_update_info);
-
-// some code magic
-for ($i = 0; $i < sizeof($versions); $i++)
-{
- $version = $versions[$i];
- $next_version = (isset($versions[$i + 1])) ? $versions[$i + 1] : $updates_to_version;
-
- // If the installed version to be updated to is < than the current version, and if the current version is >= as the version to be updated to next, we will skip the process
- if (version_compare($version, $current_version, '<') && version_compare($current_version, $next_version, '>='))
- {
- continue;
- }
+ <div id="page-body">
+ <div id="acp">
+ <div class="panel">
+ <span class="corners-top"><span></span></span>
+ <div id="content">
+ <div id="main" class="install-body">
- change_database_data($no_updates, $version);
-}
-
-_write_result($no_updates, $errored, $error_ary);
+ <h1><?php echo $user->lang['UPDATING_TO_LATEST_STABLE']; ?></h1>
-$error_ary = array();
-$errored = $no_updates = false;
-
-?>
+ <br />
-<br /><br />
-<h1><?php echo $lang['UPDATE_VERSION_OPTIMIZE']; ?></h1>
-<br />
-<p><?php echo $lang['PROGRESS']; ?> :: <strong>
+ <p><?php echo $user->lang['DATABASE_TYPE']; ?> :: <strong><?php echo $db->sql_layer; ?></strong><br />
+ <?php echo $user->lang['PREVIOUS_VERSION']; ?> :: <strong><?php echo $config['version']; ?></strong><br />
<?php
-flush();
-
-if ($debug_from_version === false)
-{
- // update the version
- $sql = "UPDATE " . CONFIG_TABLE . "
- SET config_value = '$updates_to_version'
- WHERE config_name = 'version'";
- _sql($sql, $errored, $error_ary);
-}
-
-// Reset permissions
-$sql = 'UPDATE ' . USERS_TABLE . "
- SET user_permissions = '',
- user_perm_from = 0";
-_sql($sql, $errored, $error_ary);
-
-// Update the dbms version if everything is ok...
-set_config('dbms_version', $db->sql_server_info(true));
-
-/* Optimize/vacuum analyze the tables where appropriate
-// this should be done for each version in future along with
-// the version number update
-switch ($db->sql_layer)
-{
- case 'mysql':
- case 'mysqli':
- case 'mysql4':
- $sql = 'OPTIMIZE TABLE ' . $table_prefix . 'auth_access, ' . $table_prefix . 'banlist, ' . $table_prefix . 'categories, ' . $table_prefix . 'config, ' . $table_prefix . 'disallow, ' . $table_prefix . 'forum_prune, ' . $table_prefix . 'forums, ' . $table_prefix . 'groups, ' . $table_prefix . 'posts, ' . $table_prefix . 'posts_text, ' . $table_prefix . 'privmsgs, ' . $table_prefix . 'privmsgs_text, ' . $table_prefix . 'ranks, ' . $table_prefix . 'search_results, ' . $table_prefix . 'search_wordlist, ' . $table_prefix . 'search_wordmatch, ' . $table_prefix . 'sessions_keys' . $table_prefix . 'smilies, ' . $table_prefix . 'themes, ' . $table_prefix . 'themes_name, ' . $table_prefix . 'topics, ' . $table_prefix . 'topics_watch, ' . $table_prefix . 'user_group, ' . $table_prefix . 'users, ' . $table_prefix . 'vote_desc, ' . $table_prefix . 'vote_results, ' . $table_prefix . 'vote_voters, ' . $table_prefix . 'words';
- _sql($sql, $errored, $error_ary);
- break;
-
- case 'postgresql':
- _sql("VACUUM ANALYZE", $errored, $error_ary);
- break;
-}
+/**
+* @todo firebird/mysql update?
*/
-_write_result($no_updates, $errored, $error_ary);
-
-?>
-
-<br />
-<h1><?php echo $lang['UPDATE_COMPLETED']; ?></h1>
-
-<br />
-
-<?php
+// End startup code
-if (!$inline_update)
+// Make sure migrations have been installed.
+$db_tools = $phpbb_container->get('dbal.tools');
+if (!$db_tools->sql_table_exists($table_prefix . 'migrations'))
{
-?>
-
- <p style="color:red"><?php echo $lang['UPDATE_FILES_NOTICE']; ?></p>
-
- <p><?php echo $lang['COMPLETE_LOGIN_TO_BOARD']; ?></p>
-
-<?php
-}
-else
-{
-?>
-
- <p><?php echo ((isset($lang['INLINE_UPDATE_SUCCESSFUL'])) ? $lang['INLINE_UPDATE_SUCCESSFUL'] : 'The database update was successful. Now you need to continue the update process.'); ?></p>
-
- <p><a href="<?php echo append_sid("{$phpbb_root_path}install/index.{$phpEx}", "mode=update&amp;sub=file_check&amp;language=$language"); ?>" class="button1"><?php echo (isset($lang['CONTINUE_UPDATE_NOW'])) ? $lang['CONTINUE_UPDATE_NOW'] : 'Continue the update process now'; ?></a></p>
-
-<?php
+ $db_tools->sql_create_table($table_prefix . 'migrations', array(
+ 'COLUMNS' => array(
+ 'migration_name' => array('VCHAR', ''),
+ 'migration_depends_on' => array('TEXT', ''),
+ 'migration_schema_done' => array('BOOL', 0),
+ 'migration_data_done' => array('BOOL', 0),
+ 'migration_data_state' => array('TEXT', ''),
+ 'migration_start_time' => array('TIMESTAMP', 0),
+ 'migration_end_time' => array('TIMESTAMP', 0),
+ ),
+ 'PRIMARY_KEY' => 'migration_name',
+ ));
}
-// Add database update to log
-add_log('admin', 'LOG_UPDATE_DATABASE', $orig_version, $updates_to_version);
+$migrator = $phpbb_container->get('migrator');
+$phpbb_extension_manager = $phpbb_container->get('ext.manager');
+$finder = $phpbb_extension_manager->get_finder();
-// Now we purge the session table as well as all cache files
-$cache->purge();
-
-_print_footer();
-
-garbage_collection();
-
-if (function_exists('exit_handler'))
-{
- exit_handler();
-}
-
-/**
-* Print out footer
-*/
-function _print_footer()
-{
- echo <<<EOF
- </div>
- </div>
- <span class="corners-bottom"><span></span></span>
- </div>
- </div>
- </div>
+$migrations = $finder
+ ->core_path('phpbb/db/migration/data/')
+ ->get_classes();
+$migrator->set_migrations($migrations);
- <div id="page-footer">
- Powered by <a href="https://www.phpbb.com/">phpBB</a>&reg; Forum Software &copy; phpBB Group
- </div>
-</div>
+// What is a safe limit of execution time? Half the max execution time should be safe.
+// No more than 15 seconds so the user isn't sitting and waiting for a very long time
+$phpbb_ini = new \phpbb\php\ini();
+$safe_time_limit = min(15, ($phpbb_ini->get_int('max_execution_time') / 2));
-</body>
-</html>
-EOF;
-}
+// While we're going to try limit this to half the max execution time,
+// we want to try and take additional measures to prevent hitting the
+// max execution time (if, say, one migration step takes much longer
+// than the max execution time)
+@set_time_limit(0);
-/**
-* Function for triggering an sql statement
-*/
-function _sql($sql, &$errored, &$error_ary, $echo_dot = true)
+while (!$migrator->finished())
{
- global $db;
+ $migration_start_time = microtime(true);
- if (defined('DEBUG_EXTRA'))
- {
- echo "<br />\n{$sql}\n<br />";
- }
-
- $db->sql_return_on_error(true);
-
- if ($sql === 'begin')
- {
- $result = $db->sql_transaction('begin');
- }
- else if ($sql === 'commit')
+ try
{
- $result = $db->sql_transaction('commit');
+ $migrator->update();
}
- else
+ catch (\phpbb\db\migration\exception $e)
{
- $result = $db->sql_query($sql);
- if ($db->sql_error_triggered)
- {
- $errored = true;
- $error_ary['sql'][] = $db->sql_error_sql;
- $error_ary['error_code'][] = $db->sql_error_returned;
- }
- }
-
- $db->sql_return_on_error(false);
+ echo $e->getLocalisedMessage($user);
- if ($echo_dot)
- {
- echo ". \n";
- flush();
+ phpbb_end_update($cache, $config);
}
- return $result;
-}
-
-function _write_result($no_updates, $errored, $error_ary)
-{
- global $lang;
+ $state = array_merge(array(
+ 'migration_schema_done' => false,
+ 'migration_data_done' => false,
+ ),
+ $migrator->last_run_migration['state']
+ );
- if ($no_updates)
+ if (isset($migrator->last_run_migration['effectively_installed']) && $migrator->last_run_migration['effectively_installed'])
{
- echo ' ' . $lang['NO_UPDATES_REQUIRED'] . '</strong></p>';
+ echo $user->lang('MIGRATION_EFFECTIVELY_INSTALLED', $migrator->last_run_migration['name']);
}
else
{
- echo ' <span class="success">' . $lang['DONE'] . '</span></strong><br />' . $lang['RESULT'] . ' :: ';
-
- if ($errored)
- {
- echo ' <strong>' . $lang['SOME_QUERIES_FAILED'] . '</strong> <ul>';
-
- for ($i = 0; $i < sizeof($error_ary['sql']); $i++)
- {
- echo '<li>' . $lang['ERROR'] . ' :: <strong>' . htmlspecialchars($error_ary['error_code'][$i]['message']) . '</strong><br />';
- echo $lang['SQL'] . ' :: <strong>' . htmlspecialchars($error_ary['sql'][$i]) . '</strong><br /><br /></li>';
- }
-
- echo '</ul> <br /><br />' . $lang['SQL_FAILURE_EXPLAIN'] . '</p>';
- }
- else
+ if ($migrator->last_run_migration['task'] == 'process_data_step' && $state['migration_data_done'])
{
- echo '<strong>' . $lang['NO_ERRORS'] . '</strong></p>';
+ echo $user->lang('MIGRATION_DATA_DONE', $migrator->last_run_migration['name'], (microtime(true) - $migration_start_time));
}
- }
-}
-
-function _add_modules($modules_to_install)
-{
- global $phpbb_root_path, $phpEx, $db;
-
- include_once($phpbb_root_path . 'includes/acp/acp_modules.' . $phpEx);
-
- $_module = new acp_modules();
-
- foreach ($modules_to_install as $module_mode => $module_data)
- {
- $_module->module_class = $module_data['class'];
-
- // Determine parent id first
- $sql = 'SELECT module_id
- FROM ' . MODULES_TABLE . "
- WHERE module_class = '" . $db->sql_escape($module_data['class']) . "'
- AND module_langname = '" . $db->sql_escape($module_data['cat']) . "'
- AND module_mode = ''
- AND module_basename = ''";
- $result = $db->sql_query($sql);
-
- // There may be more than one categories with the same name
- $categories = array();
- while ($row = $db->sql_fetchrow($result))
+ else if ($migrator->last_run_migration['task'] == 'process_data_step')
{
- $categories[] = (int) $row['module_id'];
+ echo $user->lang('MIGRATION_DATA_IN_PROGRESS', $migrator->last_run_migration['name'], (microtime(true) - $migration_start_time));
}
- $db->sql_freeresult($result);
-
- if (!sizeof($categories))
+ else if ($state['migration_schema_done'])
{
- continue;
+ echo $user->lang('MIGRATION_SCHEMA_DONE', $migrator->last_run_migration['name'], (microtime(true) - $migration_start_time));
}
+ }
- // Add the module to all categories found
- foreach ($categories as $parent_id)
- {
- // Check if the module already exists
- $sql = 'SELECT *
- FROM ' . MODULES_TABLE . "
- WHERE module_basename = '" . $db->sql_escape($module_data['base']) . "'
- AND module_class = '" . $db->sql_escape($module_data['class']) . "'
- AND module_langname = '" . $db->sql_escape($module_data['title']) . "'
- AND module_mode = '" . $db->sql_escape($module_mode) . "'
- AND module_auth = '" . $db->sql_escape($module_data['auth']) . "'
- AND parent_id = {$parent_id}";
- $result = $db->sql_query($sql);
- $row = $db->sql_fetchrow($result);
- $db->sql_freeresult($result);
-
- // If it exists, we simply continue with the next category
- if ($row)
- {
- continue;
- }
-
- // Build the module sql row
- $module_row = array(
- 'module_basename' => $module_data['base'],
- 'module_enabled' => (isset($module_data['enabled'])) ? (int) $module_data['enabled'] : 1,
- 'module_display' => (isset($module_data['display'])) ? (int) $module_data['display'] : 1,
- 'parent_id' => $parent_id,
- 'module_class' => $module_data['class'],
- 'module_langname' => $module_data['title'],
- 'module_mode' => $module_mode,
- 'module_auth' => $module_data['auth'],
- );
-
- $_module->update_module_data($module_row, true);
-
- // Ok, do we need to re-order the module, move it up or down?
- if (!isset($module_data['after']))
- {
- continue;
- }
-
- $after_mode = $module_data['after'][0];
- $after_langname = $module_data['after'][1];
-
- // First of all, get the module id for the module this one has to be placed after
- $sql = 'SELECT left_id
- FROM ' . MODULES_TABLE . "
- WHERE module_class = '" . $db->sql_escape($module_data['class']) . "'
- AND module_basename = '" . $db->sql_escape($module_data['base']) . "'
- AND module_langname = '" . $db->sql_escape($after_langname) . "'
- AND module_mode = '" . $db->sql_escape($after_mode) . "'
- AND parent_id = '{$parent_id}'";
- $result = $db->sql_query($sql);
- $first_left_id = (int) $db->sql_fetchfield('left_id');
- $db->sql_freeresult($result);
-
- if (!$first_left_id)
- {
- continue;
- }
-
- // Ok, count the number of modules between $after_mode and the added module
- $sql = 'SELECT COUNT(module_id) as num_modules
- FROM ' . MODULES_TABLE . "
- WHERE module_class = '" . $db->sql_escape($module_data['class']) . "'
- AND parent_id = {$parent_id}
- AND left_id BETWEEN {$first_left_id} AND {$module_row['left_id']}";
- $result = $db->sql_query($sql);
- $steps = (int) $db->sql_fetchfield('num_modules');
- $db->sql_freeresult($result);
-
- // We need to substract 2
- $steps -= 2;
+ echo "<br />\n";
- if ($steps <= 0)
- {
- continue;
- }
+ // Are we approaching the time limit? If so we want to pause the update and continue after refreshing
+ if ((time() - $update_start_time) >= $safe_time_limit)
+ {
+ echo '<br />' . $user->lang['DATABASE_UPDATE_NOT_COMPLETED'] . '<br /><br />';
+ echo '<a href="' . append_sid($phpbb_root_path . 'install/database_update.' . $phpEx, 'type=' . $request->variable('type', 0) . '&amp;language=' . $request->variable('language', 'en')) . '" class="button1">' . $user->lang['DATABASE_UPDATE_CONTINUE'] . '</a>';
- // Ok, move module up $num_modules times. ;)
- $_module->move_module_by($module_row, 'move_up', $steps);
- }
+ phpbb_end_update($cache, $config);
}
-
- $_module->remove_cache_file();
}
-/****************************************************************************
-* ADD YOUR DATABASE SCHEMA CHANGES HERE *
-*****************************************************************************/
-function database_update_info()
+if ($orig_version != $config['version'])
{
- return array(
- // Changes from 3.0.0 to the next version
- '3.0.0' => array(
- // Add the following columns
- 'add_columns' => array(
- FORUMS_TABLE => array(
- 'display_subforum_list' => array('BOOL', 1),
- ),
- SESSIONS_TABLE => array(
- 'session_forum_id' => array('UINT', 0),
- ),
- ),
- 'drop_keys' => array(
- GROUPS_TABLE => array('group_legend'),
- ),
- 'add_index' => array(
- SESSIONS_TABLE => array(
- 'session_forum_id' => array('session_forum_id'),
- ),
- GROUPS_TABLE => array(
- 'group_legend_name' => array('group_legend', 'group_name'),
- ),
- ),
- ),
- // No changes from 3.0.1-RC1 to 3.0.1
- '3.0.1-RC1' => array(),
- // No changes from 3.0.1 to 3.0.2-RC1
- '3.0.1' => array(),
- // Changes from 3.0.2-RC1 to 3.0.2-RC2
- '3.0.2-RC1' => array(
- 'change_columns' => array(
- DRAFTS_TABLE => array(
- 'draft_subject' => array('STEXT_UNI', ''),
- ),
- FORUMS_TABLE => array(
- 'forum_last_post_subject' => array('STEXT_UNI', ''),
- ),
- POSTS_TABLE => array(
- 'post_subject' => array('STEXT_UNI', '', 'true_sort'),
- ),
- PRIVMSGS_TABLE => array(
- 'message_subject' => array('STEXT_UNI', ''),
- ),
- TOPICS_TABLE => array(
- 'topic_title' => array('STEXT_UNI', '', 'true_sort'),
- 'topic_last_post_subject' => array('STEXT_UNI', ''),
- ),
- ),
- 'drop_keys' => array(
- SESSIONS_TABLE => array('session_forum_id'),
- ),
- 'add_index' => array(
- SESSIONS_TABLE => array(
- 'session_fid' => array('session_forum_id'),
- ),
- ),
- ),
- // No changes from 3.0.2-RC2 to 3.0.2
- '3.0.2-RC2' => array(),
-
- // Changes from 3.0.2 to 3.0.3-RC1
- '3.0.2' => array(
- // Add the following columns
- 'add_columns' => array(
- STYLES_TEMPLATE_TABLE => array(
- 'template_inherits_id' => array('UINT:4', 0),
- 'template_inherit_path' => array('VCHAR', ''),
- ),
- GROUPS_TABLE => array(
- 'group_max_recipients' => array('UINT', 0),
- ),
- ),
- ),
-
- // No changes from 3.0.3-RC1 to 3.0.3
- '3.0.3-RC1' => array(),
-
- // Changes from 3.0.3 to 3.0.4-RC1
- '3.0.3' => array(
- 'add_columns' => array(
- PROFILE_FIELDS_TABLE => array(
- 'field_show_profile' => array('BOOL', 0),
- ),
- ),
- 'change_columns' => array(
- STYLES_TABLE => array(
- 'style_id' => array('UINT', NULL, 'auto_increment'),
- 'template_id' => array('UINT', 0),
- 'theme_id' => array('UINT', 0),
- 'imageset_id' => array('UINT', 0),
- ),
- STYLES_IMAGESET_TABLE => array(
- 'imageset_id' => array('UINT', NULL, 'auto_increment'),
- ),
- STYLES_IMAGESET_DATA_TABLE => array(
- 'image_id' => array('UINT', NULL, 'auto_increment'),
- 'imageset_id' => array('UINT', 0),
- ),
- STYLES_THEME_TABLE => array(
- 'theme_id' => array('UINT', NULL, 'auto_increment'),
- ),
- STYLES_TEMPLATE_TABLE => array(
- 'template_id' => array('UINT', NULL, 'auto_increment'),
- ),
- STYLES_TEMPLATE_DATA_TABLE => array(
- 'template_id' => array('UINT', 0),
- ),
- FORUMS_TABLE => array(
- 'forum_style' => array('UINT', 0),
- ),
- USERS_TABLE => array(
- 'user_style' => array('UINT', 0),
- ),
- ),
- ),
-
- // Changes from 3.0.4-RC1 to 3.0.4
- '3.0.4-RC1' => array(),
-
- // Changes from 3.0.4 to 3.0.5-RC1
- '3.0.4' => array(
- 'change_columns' => array(
- FORUMS_TABLE => array(
- 'forum_style' => array('UINT', 0),
- ),
- ),
- ),
-
- // No changes from 3.0.5-RC1 to 3.0.5
- '3.0.5-RC1' => array(),
-
- // Changes from 3.0.5 to 3.0.6-RC1
- '3.0.5' => array(
- 'add_columns' => array(
- CONFIRM_TABLE => array(
- 'attempts' => array('UINT', 0),
- ),
- USERS_TABLE => array(
- 'user_new' => array('BOOL', 1),
- 'user_reminded' => array('TINT:4', 0),
- 'user_reminded_time'=> array('TIMESTAMP', 0),
- ),
- GROUPS_TABLE => array(
- 'group_skip_auth' => array('BOOL', 0, 'after' => 'group_founder_manage'),
- ),
- PRIVMSGS_TABLE => array(
- 'message_reported' => array('BOOL', 0),
- ),
- REPORTS_TABLE => array(
- 'pm_id' => array('UINT', 0),
- ),
- PROFILE_FIELDS_TABLE => array(
- 'field_show_on_vt' => array('BOOL', 0),
- ),
- FORUMS_TABLE => array(
- 'forum_options' => array('UINT:20', 0),
- ),
- ),
- 'change_columns' => array(
- USERS_TABLE => array(
- 'user_options' => array('UINT:11', 230271),
- ),
- ),
- 'add_index' => array(
- REPORTS_TABLE => array(
- 'post_id' => array('post_id'),
- 'pm_id' => array('pm_id'),
- ),
- POSTS_TABLE => array(
- 'post_username' => array('post_username:255'),
- ),
- ),
- ),
-
- // No changes from 3.0.6-RC1 to 3.0.6-RC2
- '3.0.6-RC1' => array(),
- // No changes from 3.0.6-RC2 to 3.0.6-RC3
- '3.0.6-RC2' => array(),
- // No changes from 3.0.6-RC3 to 3.0.6-RC4
- '3.0.6-RC3' => array(),
- // No changes from 3.0.6-RC4 to 3.0.6
- '3.0.6-RC4' => array(),
-
- // Changes from 3.0.6 to 3.0.7-RC1
- '3.0.6' => array(
- 'drop_keys' => array(
- LOG_TABLE => array('log_time'),
- ),
- 'add_index' => array(
- TOPICS_TRACK_TABLE => array(
- 'topic_id' => array('topic_id'),
- ),
- ),
- ),
+ add_log('admin', 'LOG_UPDATE_DATABASE', $orig_version, $config['version']);
+}
- // No changes from 3.0.7-RC1 to 3.0.7-RC2
- '3.0.7-RC1' => array(),
- // No changes from 3.0.7-RC2 to 3.0.7
- '3.0.7-RC2' => array(),
- // No changes from 3.0.7 to 3.0.7-PL1
- '3.0.7' => array(),
- // No changes from 3.0.7-PL1 to 3.0.8-RC1
- '3.0.7-PL1' => array(),
- // No changes from 3.0.8-RC1 to 3.0.8
- '3.0.8-RC1' => array(),
- // Changes from 3.0.8 to 3.0.9-RC1
- '3.0.8' => array(
- 'add_tables' => array(
- LOGIN_ATTEMPT_TABLE => array(
- 'COLUMNS' => array(
- // this column was removed from the database updater
- // after 3.0.9-RC3 was released. It might still exist
- // in 3.0.9-RCX installations and has to be dropped in
- // 3.0.13 after the db_tools class is capable of properly
- // removing a primary key.
- // 'attempt_id' => array('UINT', NULL, 'auto_increment'),
- 'attempt_ip' => array('VCHAR:40', ''),
- 'attempt_browser' => array('VCHAR:150', ''),
- 'attempt_forwarded_for' => array('VCHAR:255', ''),
- 'attempt_time' => array('TIMESTAMP', 0),
- 'user_id' => array('UINT', 0),
- 'username' => array('VCHAR_UNI:255', 0),
- 'username_clean' => array('VCHAR_CI', 0),
- ),
- //'PRIMARY_KEY' => 'attempt_id',
- 'KEYS' => array(
- 'att_ip' => array('INDEX', array('attempt_ip', 'attempt_time')),
- 'att_for' => array('INDEX', array('attempt_forwarded_for', 'attempt_time')),
- 'att_time' => array('INDEX', array('attempt_time')),
- 'user_id' => array('INDEX', 'user_id'),
- ),
- ),
- ),
- 'change_columns' => array(
- BBCODES_TABLE => array(
- 'bbcode_id' => array('USINT', 0),
- ),
- ),
- ),
- // No changes from 3.0.9-RC1 to 3.0.9-RC2
- '3.0.9-RC1' => array(),
- // No changes from 3.0.9-RC2 to 3.0.9-RC3
- '3.0.9-RC2' => array(),
- // No changes from 3.0.9-RC3 to 3.0.9-RC4
- '3.0.9-RC3' => array(),
- // No changes from 3.0.9-RC4 to 3.0.9
- '3.0.9-RC4' => array(),
- // No changes from 3.0.9 to 3.0.10-RC1
- '3.0.9' => array(),
- // No changes from 3.0.10-RC1 to 3.0.10-RC2
- '3.0.10-RC1' => array(),
- // No changes from 3.0.10-RC2 to 3.0.10-RC3
- '3.0.10-RC2' => array(),
- // No changes from 3.0.10-RC3 to 3.0.10
- '3.0.10-RC3' => array(),
- // No changes from 3.0.10 to 3.0.11-RC1
- '3.0.10' => array(),
- // Changes from 3.0.11-RC1 to 3.0.11-RC2
- '3.0.11-RC1' => array(
- 'add_columns' => array(
- PROFILE_FIELDS_TABLE => array(
- 'field_show_novalue' => array('BOOL', 0),
- ),
- ),
- ),
- // No changes from 3.0.11-RC2 to 3.0.11
- '3.0.11-RC2' => array(),
- // No changes from 3.0.11 to 3.0.12-RC1
- '3.0.11' => array(),
- // No changes from 3.0.12-RC1 to 3.0.12-RC2
- '3.0.12-RC1' => array(),
- // No changes from 3.0.12-RC2 to 3.0.12-RC3
- '3.0.12-RC2' => array(),
- // No changes from 3.0.12-RC3 to 3.0.12
- '3.0.12-RC3' => array(),
+echo $user->lang['DATABASE_UPDATE_COMPLETE'] . '<br />';
- /** @todo DROP LOGIN_ATTEMPT_TABLE.attempt_id in 3.0.13-RC1 */
- );
+if ($request->variable('type', 0))
+{
+ echo $user->lang['INLINE_UPDATE_SUCCESSFUL'] . '<br /><br />';
+ echo '<a href="' . append_sid($phpbb_root_path . 'install/index.' . $phpEx, 'mode=update&amp;sub=update_db&amp;language=' . $request->variable('language', 'en')) . '" class="button1">' . $user->lang['CONTINUE_UPDATE_NOW'] . '</a>';
}
-
-/****************************************************************************
-* ADD YOUR DATABASE DATA CHANGES HERE *
-* REMEMBER: You NEED to enter a schema array above and a data array here, *
-* even if both or one of them are empty. *
-*****************************************************************************/
-function change_database_data(&$no_updates, $version)
+else
{
- global $db, $db_tools, $errored, $error_ary, $config, $table_prefix, $phpbb_root_path, $phpEx;
-
- switch ($version)
- {
- case '3.0.0':
-
- $sql = 'UPDATE ' . TOPICS_TABLE . "
- SET topic_last_view_time = topic_last_post_time
- WHERE topic_last_view_time = 0";
- _sql($sql, $errored, $error_ary);
-
- // Update smiley sizes
- $smileys = array('icon_e_surprised.gif', 'icon_eek.gif', 'icon_cool.gif', 'icon_lol.gif', 'icon_mad.gif', 'icon_razz.gif', 'icon_redface.gif', 'icon_cry.gif', 'icon_evil.gif', 'icon_twisted.gif', 'icon_rolleyes.gif', 'icon_exclaim.gif', 'icon_question.gif', 'icon_idea.gif', 'icon_arrow.gif', 'icon_neutral.gif', 'icon_mrgreen.gif', 'icon_e_ugeek.gif');
-
- foreach ($smileys as $smiley)
- {
- if (file_exists($phpbb_root_path . 'images/smilies/' . $smiley))
- {
- list($width, $height) = getimagesize($phpbb_root_path . 'images/smilies/' . $smiley);
-
- $sql = 'UPDATE ' . SMILIES_TABLE . '
- SET smiley_width = ' . $width . ', smiley_height = ' . $height . "
- WHERE smiley_url = '" . $db->sql_escape($smiley) . "'";
-
- _sql($sql, $errored, $error_ary);
- }
- }
-
- $no_updates = false;
- break;
-
- // No changes from 3.0.1-RC1 to 3.0.1
- case '3.0.1-RC1':
- break;
-
- // changes from 3.0.1 to 3.0.2-RC1
- case '3.0.1':
-
- set_config('referer_validation', '1');
- set_config('check_attachment_content', '1');
- set_config('mime_triggers', 'body|head|html|img|plaintext|a href|pre|script|table|title');
-
- $no_updates = false;
- break;
-
- // No changes from 3.0.2-RC1 to 3.0.2-RC2
- case '3.0.2-RC1':
- break;
-
- // No changes from 3.0.2-RC2 to 3.0.2
- case '3.0.2-RC2':
- break;
-
- // Changes from 3.0.2 to 3.0.3-RC1
- case '3.0.2':
- set_config('enable_queue_trigger', '0');
- set_config('queue_trigger_posts', '3');
-
- set_config('pm_max_recipients', '0');
-
- // Set maximum number of recipients for the registered users, bots, guests group
- $sql = 'UPDATE ' . GROUPS_TABLE . ' SET group_max_recipients = 5
- WHERE ' . $db->sql_in_set('group_name', array('GUESTS', 'REGISTERED', 'REGISTERED_COPPA', 'BOTS'));
- _sql($sql, $errored, $error_ary);
-
- // Not prefilling yet
- set_config('dbms_version', '');
-
- // Add new permission u_masspm_group and duplicate settings from u_masspm
- include_once($phpbb_root_path . 'includes/acp/auth.' . $phpEx);
- $auth_admin = new auth_admin();
-
- // Only add the new permission if it does not already exist
- if (empty($auth_admin->acl_options['id']['u_masspm_group']))
- {
- $auth_admin->acl_add_option(array('global' => array('u_masspm_group')));
-
- // Now the tricky part, filling the permission
- $old_id = $auth_admin->acl_options['id']['u_masspm'];
- $new_id = $auth_admin->acl_options['id']['u_masspm_group'];
-
- $tables = array(ACL_GROUPS_TABLE, ACL_ROLES_DATA_TABLE, ACL_USERS_TABLE);
-
- foreach ($tables as $table)
- {
- $sql = 'SELECT *
- FROM ' . $table . '
- WHERE auth_option_id = ' . $old_id;
- $result = _sql($sql, $errored, $error_ary);
-
- $sql_ary = array();
- while ($row = $db->sql_fetchrow($result))
- {
- $row['auth_option_id'] = $new_id;
- $sql_ary[] = $row;
- }
- $db->sql_freeresult($result);
-
- if (sizeof($sql_ary))
- {
- $db->sql_multi_insert($table, $sql_ary);
- }
- }
-
- // Remove any old permission entries
- $auth_admin->acl_clear_prefetch();
- }
-
- /**
- * Do not resync post counts here. An admin may do this later from the ACP
- $start = 0;
- $step = ($config['num_posts']) ? (max((int) ($config['num_posts'] / 5), 20000)) : 20000;
-
- $sql = 'UPDATE ' . USERS_TABLE . ' SET user_posts = 0';
- _sql($sql, $errored, $error_ary);
-
- do
- {
- $sql = 'SELECT COUNT(post_id) AS num_posts, poster_id
- FROM ' . POSTS_TABLE . '
- WHERE post_id BETWEEN ' . ($start + 1) . ' AND ' . ($start + $step) . '
- AND post_postcount = 1 AND post_approved = 1
- GROUP BY poster_id';
- $result = _sql($sql, $errored, $error_ary);
-
- if ($row = $db->sql_fetchrow($result))
- {
- do
- {
- $sql = 'UPDATE ' . USERS_TABLE . " SET user_posts = user_posts + {$row['num_posts']} WHERE user_id = {$row['poster_id']}";
- _sql($sql, $errored, $error_ary);
- }
- while ($row = $db->sql_fetchrow($result));
-
- $start += $step;
- }
- else
- {
- $start = 0;
- }
- $db->sql_freeresult($result);
- }
- while ($start);
- */
-
- $sql = 'UPDATE ' . MODULES_TABLE . '
- SET module_auth = \'acl_a_email && cfg_email_enable\'
- WHERE module_class = \'acp\'
- AND module_basename = \'email\'';
- _sql($sql, $errored, $error_ary);
-
- $no_updates = false;
- break;
-
- // Changes from 3.0.3-RC1 to 3.0.3
- case '3.0.3-RC1':
- if ($db->sql_layer == 'oracle')
- {
- // log_operation is CLOB - but we can change this later
- $sql = 'UPDATE ' . LOG_TABLE . "
- SET log_operation = 'LOG_DELETE_TOPIC'
- WHERE log_operation LIKE 'LOG_TOPIC_DELETED'";
- _sql($sql, $errored, $error_ary);
- }
- else
- {
- $sql = 'UPDATE ' . LOG_TABLE . "
- SET log_operation = 'LOG_DELETE_TOPIC'
- WHERE log_operation = 'LOG_TOPIC_DELETED'";
- _sql($sql, $errored, $error_ary);
- }
-
- $no_updates = false;
- break;
-
- // Changes from 3.0.3 to 3.0.4-RC1
- case '3.0.3':
- // Update the Custom Profile Fields based on previous settings to the new format
- $sql = 'SELECT field_id, field_required, field_show_on_reg, field_hide
- FROM ' . PROFILE_FIELDS_TABLE;
- $result = _sql($sql, $errored, $error_ary);
-
- while ($row = $db->sql_fetchrow($result))
- {
- $sql_ary = array(
- 'field_required' => 0,
- 'field_show_on_reg' => 0,
- 'field_hide' => 0,
- 'field_show_profile'=> 0,
- );
-
- if ($row['field_required'])
- {
- $sql_ary['field_required'] = $sql_ary['field_show_on_reg'] = $sql_ary['field_show_profile'] = 1;
- }
- else if ($row['field_show_on_reg'])
- {
- $sql_ary['field_show_on_reg'] = $sql_ary['field_show_profile'] = 1;
- }
- else if ($row['field_hide'])
- {
- // Only administrators and moderators can see this CPF, if the view is enabled, they can see it, otherwise just admins in the acp_users module
- $sql_ary['field_hide'] = 1;
- }
- else
- {
- // equivelant to "none", which is the "Display in user control panel" option
- $sql_ary['field_show_profile'] = 1;
- }
-
- _sql('UPDATE ' . PROFILE_FIELDS_TABLE . ' SET ' . $db->sql_build_array('UPDATE', $sql_ary) . ' WHERE field_id = ' . $row['field_id'], $errored, $error_ary);
- }
- $no_updates = false;
-
- break;
-
- // Changes from 3.0.4-RC1 to 3.0.4
- case '3.0.4-RC1':
- break;
-
- // Changes from 3.0.4 to 3.0.5-RC1
- case '3.0.4':
-
- // Captcha config variables
- set_config('captcha_gd_wave', 0);
- set_config('captcha_gd_3d_noise', 1);
- set_config('captcha_gd_fonts', 1);
- set_config('confirm_refresh', 1);
-
- // Maximum number of keywords
- set_config('max_num_search_keywords', 10);
-
- // Remove static config var and put it back as dynamic variable
- $sql = 'UPDATE ' . CONFIG_TABLE . "
- SET is_dynamic = 1
- WHERE config_name = 'search_indexing_state'";
- _sql($sql, $errored, $error_ary);
-
- // Hash old MD5 passwords
- $sql = 'SELECT user_id, user_password
- FROM ' . USERS_TABLE . '
- WHERE user_pass_convert = 1';
- $result = _sql($sql, $errored, $error_ary);
-
- while ($row = $db->sql_fetchrow($result))
- {
- if (strlen($row['user_password']) == 32)
- {
- $sql_ary = array(
- 'user_password' => phpbb_hash($row['user_password']),
- );
-
- _sql('UPDATE ' . USERS_TABLE . ' SET ' . $db->sql_build_array('UPDATE', $sql_ary) . ' WHERE user_id = ' . $row['user_id'], $errored, $error_ary);
- }
- }
- $db->sql_freeresult($result);
-
- // Adjust bot entry
- $sql = 'UPDATE ' . BOTS_TABLE . "
- SET bot_agent = 'ichiro/'
- WHERE bot_agent = 'ichiro/2'";
- _sql($sql, $errored, $error_ary);
-
-
- // Before we are able to add a unique key to auth_option, we need to remove duplicate entries
-
- // We get duplicate entries first
- $sql = 'SELECT auth_option
- FROM ' . ACL_OPTIONS_TABLE . '
- GROUP BY auth_option
- HAVING COUNT(*) >= 2';
- $result = $db->sql_query($sql);
-
- $auth_options = array();
- while ($row = $db->sql_fetchrow($result))
- {
- $auth_options[] = $row['auth_option'];
- }
- $db->sql_freeresult($result);
-
- // Remove specific auth options
- if (!empty($auth_options))
- {
- foreach ($auth_options as $option)
- {
- // Select auth_option_ids... the largest id will be preserved
- $sql = 'SELECT auth_option_id
- FROM ' . ACL_OPTIONS_TABLE . "
- WHERE auth_option = '" . $db->sql_escape($option) . "'
- ORDER BY auth_option_id DESC";
- // sql_query_limit not possible here, due to bug in postgresql layer
- $result = $db->sql_query($sql);
-
- // Skip first row, this is our original auth option we want to preserve
- $row = $db->sql_fetchrow($result);
-
- while ($row = $db->sql_fetchrow($result))
- {
- // Ok, remove this auth option...
- _sql('DELETE FROM ' . ACL_OPTIONS_TABLE . ' WHERE auth_option_id = ' . $row['auth_option_id'], $errored, $error_ary);
- _sql('DELETE FROM ' . ACL_ROLES_DATA_TABLE . ' WHERE auth_option_id = ' . $row['auth_option_id'], $errored, $error_ary);
- _sql('DELETE FROM ' . ACL_GROUPS_TABLE . ' WHERE auth_option_id = ' . $row['auth_option_id'], $errored, $error_ary);
- _sql('DELETE FROM ' . ACL_USERS_TABLE . ' WHERE auth_option_id = ' . $row['auth_option_id'], $errored, $error_ary);
- }
- $db->sql_freeresult($result);
- }
- }
-
- // Now make auth_option UNIQUE, by dropping the old index and adding a UNIQUE one.
- $changes = array(
- 'drop_keys' => array(
- ACL_OPTIONS_TABLE => array('auth_option'),
- ),
- );
-
- $statements = $db_tools->perform_schema_changes($changes);
-
- foreach ($statements as $sql)
- {
- _sql($sql, $errored, $error_ary);
- }
-
- $changes = array(
- 'add_unique_index' => array(
- ACL_OPTIONS_TABLE => array(
- 'auth_option' => array('auth_option'),
- ),
- ),
- );
-
- $statements = $db_tools->perform_schema_changes($changes);
-
- foreach ($statements as $sql)
- {
- _sql($sql, $errored, $error_ary);
- }
-
- $no_updates = false;
-
- break;
-
- // No changes from 3.0.5-RC1 to 3.0.5
- case '3.0.5-RC1':
- break;
-
- // Changes from 3.0.5 to 3.0.6-RC1
- case '3.0.5':
- // Let's see if the GD Captcha can be enabled... we simply look for what *is* enabled...
- if (!empty($config['captcha_gd']) && !isset($config['captcha_plugin']))
- {
- set_config('captcha_plugin', 'phpbb_captcha_gd');
- }
- else if (!isset($config['captcha_plugin']))
- {
- set_config('captcha_plugin', 'phpbb_captcha_nogd');
- }
-
- // Entries for the Feed Feature
- set_config('feed_enable', '0');
- set_config('feed_limit', '10');
-
- set_config('feed_overall_forums', '1');
- set_config('feed_overall_forums_limit', '15');
-
- set_config('feed_overall_topics', '0');
- set_config('feed_overall_topics_limit', '15');
-
- set_config('feed_forum', '1');
- set_config('feed_topic', '1');
- set_config('feed_item_statistics', '1');
-
- // Entries for smiley pagination
- set_config('smilies_per_page', '50');
-
- // Entry for reporting PMs
- set_config('allow_pm_report', '1');
-
- // Install modules
- $modules_to_install = array(
- 'feed' => array(
- 'base' => 'board',
- 'class' => 'acp',
- 'title' => 'ACP_FEED_SETTINGS',
- 'auth' => 'acl_a_board',
- 'cat' => 'ACP_BOARD_CONFIGURATION',
- 'after' => array('signature', 'ACP_SIGNATURE_SETTINGS')
- ),
- 'warnings' => array(
- 'base' => 'users',
- 'class' => 'acp',
- 'title' => 'ACP_USER_WARNINGS',
- 'auth' => 'acl_a_user',
- 'display' => 0,
- 'cat' => 'ACP_CAT_USERS',
- 'after' => array('feedback', 'ACP_USER_FEEDBACK')
- ),
- 'send_statistics' => array(
- 'base' => 'send_statistics',
- 'class' => 'acp',
- 'title' => 'ACP_SEND_STATISTICS',
- 'auth' => 'acl_a_server',
- 'cat' => 'ACP_SERVER_CONFIGURATION'
- ),
- 'setting_forum_copy' => array(
- 'base' => 'permissions',
- 'class' => 'acp',
- 'title' => 'ACP_FORUM_PERMISSIONS_COPY',
- 'auth' => 'acl_a_fauth && acl_a_authusers && acl_a_authgroups && acl_a_mauth',
- 'cat' => 'ACP_FORUM_BASED_PERMISSIONS',
- 'after' => array('setting_forum_local', 'ACP_FORUM_PERMISSIONS')
- ),
- 'pm_reports' => array(
- 'base' => 'pm_reports',
- 'class' => 'mcp',
- 'title' => 'MCP_PM_REPORTS_OPEN',
- 'auth' => 'aclf_m_report',
- 'cat' => 'MCP_REPORTS'
- ),
- 'pm_reports_closed' => array(
- 'base' => 'pm_reports',
- 'class' => 'mcp',
- 'title' => 'MCP_PM_REPORTS_CLOSED',
- 'auth' => 'aclf_m_report',
- 'cat' => 'MCP_REPORTS'
- ),
- 'pm_report_details' => array(
- 'base' => 'pm_reports',
- 'class' => 'mcp',
- 'title' => 'MCP_PM_REPORT_DETAILS',
- 'auth' => 'aclf_m_report',
- 'cat' => 'MCP_REPORTS'
- ),
- );
-
- _add_modules($modules_to_install);
-
- // Add newly_registered group... but check if it already exists (we always supported running the updater on any schema)
- $sql = 'SELECT group_id
- FROM ' . GROUPS_TABLE . "
- WHERE group_name = 'NEWLY_REGISTERED'";
- $result = $db->sql_query($sql);
- $group_id = (int) $db->sql_fetchfield('group_id');
- $db->sql_freeresult($result);
-
- if (!$group_id)
- {
- $sql = 'INSERT INTO ' . GROUPS_TABLE . " (group_name, group_type, group_founder_manage, group_colour, group_legend, group_avatar, group_desc, group_desc_uid, group_max_recipients) VALUES ('NEWLY_REGISTERED', 3, 0, '', 0, '', '', '', 5)";
- _sql($sql, $errored, $error_ary);
-
- $group_id = $db->sql_nextid();
- }
-
- // Insert new user role... at the end of the chain
- $sql = 'SELECT role_id
- FROM ' . ACL_ROLES_TABLE . "
- WHERE role_name = 'ROLE_USER_NEW_MEMBER'
- AND role_type = 'u_'";
- $result = $db->sql_query($sql);
- $u_role = (int) $db->sql_fetchfield('role_id');
- $db->sql_freeresult($result);
-
- if (!$u_role)
- {
- $sql = 'SELECT MAX(role_order) as max_order_id
- FROM ' . ACL_ROLES_TABLE . "
- WHERE role_type = 'u_'";
- $result = $db->sql_query($sql);
- $next_order_id = (int) $db->sql_fetchfield('max_order_id');
- $db->sql_freeresult($result);
-
- $next_order_id++;
-
- $sql = 'INSERT INTO ' . ACL_ROLES_TABLE . " (role_name, role_description, role_type, role_order) VALUES ('ROLE_USER_NEW_MEMBER', 'ROLE_DESCRIPTION_USER_NEW_MEMBER', 'u_', $next_order_id)";
- _sql($sql, $errored, $error_ary);
- $u_role = $db->sql_nextid();
-
- if (!$errored)
- {
- // Now add the correct data to the roles...
- // The standard role says that new users are not able to send a PM, Mass PM, are not able to PM groups
- $sql = 'INSERT INTO ' . ACL_ROLES_DATA_TABLE . " (role_id, auth_option_id, auth_setting) SELECT $u_role, auth_option_id, 0 FROM " . ACL_OPTIONS_TABLE . " WHERE auth_option LIKE 'u_%' AND auth_option IN ('u_sendpm', 'u_masspm', 'u_masspm_group')";
- _sql($sql, $errored, $error_ary);
-
- // Add user role to group
- $sql = 'INSERT INTO ' . ACL_GROUPS_TABLE . " (group_id, forum_id, auth_option_id, auth_role_id, auth_setting) VALUES ($group_id, 0, 0, $u_role, 0)";
- _sql($sql, $errored, $error_ary);
- }
- }
-
- // Insert new forum role
- $sql = 'SELECT role_id
- FROM ' . ACL_ROLES_TABLE . "
- WHERE role_name = 'ROLE_FORUM_NEW_MEMBER'
- AND role_type = 'f_'";
- $result = $db->sql_query($sql);
- $f_role = (int) $db->sql_fetchfield('role_id');
- $db->sql_freeresult($result);
-
- if (!$f_role)
- {
- $sql = 'SELECT MAX(role_order) as max_order_id
- FROM ' . ACL_ROLES_TABLE . "
- WHERE role_type = 'f_'";
- $result = $db->sql_query($sql);
- $next_order_id = (int) $db->sql_fetchfield('max_order_id');
- $db->sql_freeresult($result);
-
- $next_order_id++;
-
- $sql = 'INSERT INTO ' . ACL_ROLES_TABLE . " (role_name, role_description, role_type, role_order) VALUES ('ROLE_FORUM_NEW_MEMBER', 'ROLE_DESCRIPTION_FORUM_NEW_MEMBER', 'f_', $next_order_id)";
- _sql($sql, $errored, $error_ary);
- $f_role = $db->sql_nextid();
-
- if (!$errored)
- {
- $sql = 'INSERT INTO ' . ACL_ROLES_DATA_TABLE . " (role_id, auth_option_id, auth_setting) SELECT $f_role, auth_option_id, 0 FROM " . ACL_OPTIONS_TABLE . " WHERE auth_option LIKE 'f_%' AND auth_option IN ('f_noapprove')";
- _sql($sql, $errored, $error_ary);
- }
- }
-
- // Set every members user_new column to 0 (old users) only if there is no one yet (this makes sure we do not execute this more than once)
- $sql = 'SELECT 1
- FROM ' . USERS_TABLE . '
- WHERE user_new = 0';
- $result = $db->sql_query_limit($sql, 1);
- $row = $db->sql_fetchrow($result);
- $db->sql_freeresult($result);
-
- if (!$row)
- {
- $sql = 'UPDATE ' . USERS_TABLE . ' SET user_new = 0';
- _sql($sql, $errored, $error_ary);
- }
-
- // Newly registered users limit
- if (!isset($config['new_member_post_limit']))
- {
- set_config('new_member_post_limit', (!empty($config['enable_queue_trigger'])) ? $config['queue_trigger_posts'] : 0);
- }
-
- if (!isset($config['new_member_group_default']))
- {
- set_config('new_member_group_default', 0);
- }
-
- // To mimick the old "feature" we will assign the forum role to every forum, regardless of the setting (this makes sure there are no "this does not work!!!! YUO!!!" posts...
- // Check if the role is already assigned...
- $sql = 'SELECT forum_id
- FROM ' . ACL_GROUPS_TABLE . '
- WHERE group_id = ' . $group_id . '
- AND auth_role_id = ' . $f_role;
- $result = $db->sql_query($sql);
- $is_options = (int) $db->sql_fetchfield('forum_id');
- $db->sql_freeresult($result);
-
- // Not assigned at all... :/
- if (!$is_options)
- {
- // Get postable forums
- $sql = 'SELECT forum_id
- FROM ' . FORUMS_TABLE . '
- WHERE forum_type != ' . FORUM_LINK;
- $result = $db->sql_query($sql);
-
- while ($row = $db->sql_fetchrow($result))
- {
- _sql('INSERT INTO ' . ACL_GROUPS_TABLE . ' (group_id, forum_id, auth_option_id, auth_role_id, auth_setting) VALUES (' . $group_id . ', ' . (int) $row['forum_id'] . ', 0, ' . $f_role . ', 0)', $errored, $error_ary);
- }
- $db->sql_freeresult($result);
- }
-
- // Clear permissions...
- include_once($phpbb_root_path . 'includes/acp/auth.' . $phpEx);
- $auth_admin = new auth_admin();
- $auth_admin->acl_clear_prefetch();
-
- if (!isset($config['allow_avatar']))
- {
- if ($config['allow_avatar_upload'] || $config['allow_avatar_local'] || $config['allow_avatar_remote'])
- {
- set_config('allow_avatar', '1');
- }
- else
- {
- set_config('allow_avatar', '0');
- }
- }
-
- if (!isset($config['allow_avatar_remote_upload']))
- {
- if ($config['allow_avatar_remote'] && $config['allow_avatar_upload'])
- {
- set_config('allow_avatar_remote_upload', '1');
- }
- else
- {
- set_config('allow_avatar_remote_upload', '0');
- }
- }
-
- // Minimum number of characters
- if (!isset($config['min_post_chars']))
- {
- set_config('min_post_chars', '1');
- }
-
- if (!isset($config['allow_quick_reply']))
- {
- set_config('allow_quick_reply', '1');
- }
-
- // Set every members user_options column to enable
- // bbcode, smilies and URLs for signatures by default
- $sql = 'SELECT user_options
- FROM ' . USERS_TABLE . '
- WHERE user_type IN (' . USER_NORMAL . ', ' . USER_FOUNDER . ')';
- $result = $db->sql_query_limit($sql, 1);
- $user_option = (int) $db->sql_fetchfield('user_options');
- $db->sql_freeresult($result);
-
- // Check if we already updated the database by checking bit 15 which we used to store the sig_bbcode option
- if (!($user_option & 1 << 15))
- {
- // 229376 is the added value to enable all three signature options
- $sql = 'UPDATE ' . USERS_TABLE . ' SET user_options = user_options + 229376';
- _sql($sql, $errored, $error_ary);
- }
-
- if (!isset($config['delete_time']))
- {
- set_config('delete_time', $config['edit_time']);
- }
-
- $no_updates = false;
- break;
-
- // No changes from 3.0.6-RC1 to 3.0.6-RC2
- case '3.0.6-RC1':
- break;
-
- // Changes from 3.0.6-RC2 to 3.0.6-RC3
- case '3.0.6-RC2':
-
- // Update the Custom Profile Fields based on previous settings to the new format
- $sql = 'UPDATE ' . PROFILE_FIELDS_TABLE . '
- SET field_show_on_vt = 1
- WHERE field_hide = 0
- AND (field_required = 1 OR field_show_on_reg = 1 OR field_show_profile = 1)';
- _sql($sql, $errored, $error_ary);
- $no_updates = false;
-
- break;
-
- // No changes from 3.0.6-RC3 to 3.0.6-RC4
- case '3.0.6-RC3':
- break;
-
- // No changes from 3.0.6-RC4 to 3.0.6
- case '3.0.6-RC4':
- break;
-
- // Changes from 3.0.6 to 3.0.7-RC1
- case '3.0.6':
-
- // ATOM Feeds
- set_config('feed_overall', '1');
- set_config('feed_http_auth', '0');
- set_config('feed_limit_post', (string) (isset($config['feed_limit']) ? (int) $config['feed_limit'] : 15));
- set_config('feed_limit_topic', (string) (isset($config['feed_overall_topics_limit']) ? (int) $config['feed_overall_topics_limit'] : 10));
- set_config('feed_topics_new', (!empty($config['feed_overall_topics']) ? '1' : '0'));
- set_config('feed_topics_active', (!empty($config['feed_overall_topics']) ? '1' : '0'));
-
- // Delete all text-templates from the template_data
- $sql = 'DELETE FROM ' . STYLES_TEMPLATE_DATA_TABLE . '
- WHERE template_filename ' . $db->sql_like_expression($db->any_char . '.txt');
- _sql($sql, $errored, $error_ary);
-
- $no_updates = false;
- break;
-
- // Changes from 3.0.7-RC1 to 3.0.7-RC2
- case '3.0.7-RC1':
-
- $sql = 'SELECT user_id, user_email, user_email_hash
- FROM ' . USERS_TABLE . '
- WHERE user_type <> ' . USER_IGNORE . "
- AND user_email <> ''";
- $result = $db->sql_query($sql);
-
- $i = 0;
- while ($row = $db->sql_fetchrow($result))
- {
- // Snapshot of the phpbb_email_hash() function
- // We cannot call it directly because the auto updater updates the DB first. :/
- $user_email_hash = sprintf('%u', crc32(strtolower($row['user_email']))) . strlen($row['user_email']);
-
- if ($user_email_hash != $row['user_email_hash'])
- {
- $sql_ary = array(
- 'user_email_hash' => $user_email_hash,
- );
-
- $sql = 'UPDATE ' . USERS_TABLE . '
- SET ' . $db->sql_build_array('UPDATE', $sql_ary) . '
- WHERE user_id = ' . (int) $row['user_id'];
- _sql($sql, $errored, $error_ary, ($i % 100 == 0));
-
- ++$i;
- }
- }
- $db->sql_freeresult($result);
-
- $no_updates = false;
-
- break;
-
- // No changes from 3.0.7-RC2 to 3.0.7
- case '3.0.7-RC2':
- break;
-
- // No changes from 3.0.7 to 3.0.7-PL1
- case '3.0.7':
- break;
-
- // Changes from 3.0.7-PL1 to 3.0.8-RC1
- case '3.0.7-PL1':
- // Update file extension group names to use language strings.
- $sql = 'SELECT lang_dir
- FROM ' . LANG_TABLE;
- $result = $db->sql_query($sql);
-
- $extension_groups_updated = array();
- while ($lang_dir = $db->sql_fetchfield('lang_dir'))
- {
- $lang_dir = basename($lang_dir);
-
- // The language strings we need are either in language/.../acp/attachments.php
- // in the update package if we're updating to 3.0.8-RC1 or later,
- // or they are in language/.../install.php when we're updating from 3.0.7-PL1 or earlier.
- // On an already updated board, they can also already be in language/.../acp/attachments.php
- // in the board root.
- $lang_files = array(
- "{$phpbb_root_path}install/update/new/language/$lang_dir/acp/attachments.$phpEx",
- "{$phpbb_root_path}language/$lang_dir/install.$phpEx",
- "{$phpbb_root_path}language/$lang_dir/acp/attachments.$phpEx",
- );
-
- foreach ($lang_files as $lang_file)
- {
- if (!file_exists($lang_file))
- {
- continue;
- }
-
- $lang = array();
- include($lang_file);
-
- foreach($lang as $lang_key => $lang_val)
- {
- if (isset($extension_groups_updated[$lang_key]) || strpos($lang_key, 'EXT_GROUP_') !== 0)
- {
- continue;
- }
-
- $sql_ary = array(
- 'group_name' => substr($lang_key, 10), // Strip off 'EXT_GROUP_'
- );
-
- $sql = 'UPDATE ' . EXTENSION_GROUPS_TABLE . '
- SET ' . $db->sql_build_array('UPDATE', $sql_ary) . "
- WHERE group_name = '" . $db->sql_escape($lang_val) . "'";
- _sql($sql, $errored, $error_ary);
-
- $extension_groups_updated[$lang_key] = true;
- }
- }
- }
- $db->sql_freeresult($result);
-
- // Install modules
- $modules_to_install = array(
- 'post' => array(
- 'base' => 'board',
- 'class' => 'acp',
- 'title' => 'ACP_POST_SETTINGS',
- 'auth' => 'acl_a_board',
- 'cat' => 'ACP_MESSAGES',
- 'after' => array('message', 'ACP_MESSAGE_SETTINGS')
- ),
- );
-
- _add_modules($modules_to_install);
-
- // update
- $sql = 'UPDATE ' . MODULES_TABLE . '
- SET module_auth = \'cfg_allow_avatar && (cfg_allow_avatar_local || cfg_allow_avatar_remote || cfg_allow_avatar_upload || cfg_allow_avatar_remote_upload)\'
- WHERE module_class = \'ucp\'
- AND module_basename = \'profile\'
- AND module_mode = \'avatar\'';
- _sql($sql, $errored, $error_ary);
-
- // add Bing Bot
- $bot_name = 'Bing [Bot]';
- $bot_name_clean = utf8_clean_string($bot_name);
-
- $sql = 'SELECT user_id
- FROM ' . USERS_TABLE . "
- WHERE username_clean = '" . $db->sql_escape($bot_name_clean) . "'";
- $result = $db->sql_query($sql);
- $bing_already_added = (bool) $db->sql_fetchfield('user_id');
- $db->sql_freeresult($result);
-
- if (!$bing_already_added)
- {
- $bot_agent = 'bingbot/';
- $bot_ip = '';
- $sql = 'SELECT group_id, group_colour
- FROM ' . GROUPS_TABLE . "
- WHERE group_name = 'BOTS'";
- $result = $db->sql_query($sql);
- $group_row = $db->sql_fetchrow($result);
- $db->sql_freeresult($result);
-
- if (!$group_row)
- {
- // default fallback, should never get here
- $group_row['group_id'] = 6;
- $group_row['group_colour'] = '9E8DA7';
- }
-
- if (!function_exists('user_add'))
- {
- include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
- }
-
- $user_row = array(
- 'user_type' => USER_IGNORE,
- 'group_id' => $group_row['group_id'],
- 'username' => $bot_name,
- 'user_regdate' => time(),
- 'user_password' => '',
- 'user_colour' => $group_row['group_colour'],
- 'user_email' => '',
- 'user_lang' => $config['default_lang'],
- 'user_style' => $config['default_style'],
- 'user_timezone' => 0,
- 'user_dateformat' => $config['default_dateformat'],
- 'user_allow_massemail' => 0,
- );
-
- $user_id = user_add($user_row);
-
- $sql = 'INSERT INTO ' . BOTS_TABLE . ' ' . $db->sql_build_array('INSERT', array(
- 'bot_active' => 1,
- 'bot_name' => (string) $bot_name,
- 'user_id' => (int) $user_id,
- 'bot_agent' => (string) $bot_agent,
- 'bot_ip' => (string) $bot_ip,
- ));
-
- _sql($sql, $errored, $error_ary);
- }
- // end Bing Bot addition
-
- // Delete shadow topics pointing to not existing topics
- $batch_size = 500;
-
- // Set of affected forums we have to resync
- $sync_forum_ids = array();
-
- do
- {
- $sql_array = array(
- 'SELECT' => 't1.topic_id, t1.forum_id',
- 'FROM' => array(
- TOPICS_TABLE => 't1',
- ),
- 'LEFT_JOIN' => array(
- array(
- 'FROM' => array(TOPICS_TABLE => 't2'),
- 'ON' => 't1.topic_moved_id = t2.topic_id',
- ),
- ),
- 'WHERE' => 't1.topic_moved_id <> 0
- AND t2.topic_id IS NULL',
- );
- $sql = $db->sql_build_query('SELECT', $sql_array);
- $result = $db->sql_query_limit($sql, $batch_size);
-
- $topic_ids = array();
- while ($row = $db->sql_fetchrow($result))
- {
- $topic_ids[] = (int) $row['topic_id'];
-
- $sync_forum_ids[(int) $row['forum_id']] = (int) $row['forum_id'];
- }
- $db->sql_freeresult($result);
-
- if (!empty($topic_ids))
- {
- $sql = 'DELETE FROM ' . TOPICS_TABLE . '
- WHERE ' . $db->sql_in_set('topic_id', $topic_ids);
- $db->sql_query($sql);
- }
- }
- while (sizeof($topic_ids) == $batch_size);
-
- // Sync the forums we have deleted shadow topics from.
- sync('forum', 'forum_id', $sync_forum_ids, true, true);
-
- // Unread posts search load switch
- set_config('load_unreads_search', '1');
-
- // Reduce queue interval to 60 seconds, email package size to 20
- if ($config['queue_interval'] == 600)
- {
- set_config('queue_interval', '60');
- }
-
- if ($config['email_package_size'] == 50)
- {
- set_config('email_package_size', '20');
- }
-
- $no_updates = false;
- break;
-
- // No changes from 3.0.8-RC1 to 3.0.8
- case '3.0.8-RC1':
- break;
-
- // Changes from 3.0.8 to 3.0.9-RC1
- case '3.0.8':
- set_config('ip_login_limit_max', '50');
- set_config('ip_login_limit_time', '21600');
- set_config('ip_login_limit_use_forwarded', '0');
-
- // Update file extension group names to use language strings, again.
- $sql = 'SELECT group_id, group_name
- FROM ' . EXTENSION_GROUPS_TABLE . '
- WHERE group_name ' . $db->sql_like_expression('EXT_GROUP_' . $db->any_char);
- $result = $db->sql_query($sql);
-
- while ($row = $db->sql_fetchrow($result))
- {
- $sql_ary = array(
- 'group_name' => substr($row['group_name'], 10), // Strip off 'EXT_GROUP_'
- );
-
- $sql = 'UPDATE ' . EXTENSION_GROUPS_TABLE . '
- SET ' . $db->sql_build_array('UPDATE', $sql_ary) . '
- WHERE group_id = ' . $row['group_id'];
- _sql($sql, $errored, $error_ary);
- }
- $db->sql_freeresult($result);
-
- /*
- * Due to a bug, vanilla phpbb could not create captcha tables
- * in 3.0.8 on firebird. It was possible for board administrators
- * to adjust the code to work. If code was manually adjusted by
- * board administrators, index names would not be the same as
- * what 3.0.9 and newer expect. This code fragment drops captcha
- * tables, destroying all entered Q&A captcha configuration, such
- * that when Q&A is configured next the respective tables will be
- * created with correct index names.
- *
- * If you wish to preserve your Q&A captcha configuration, you can
- * manually rename indexes to the currently expected name:
- * phpbb_captcha_questions_lang_iso => phpbb_captcha_questions_lang
- * phpbb_captcha_answers_question_id => phpbb_captcha_answers_qid
- *
- * Again, this needs to be done only if a board was manually modified
- * to fix broken captcha code.
- *
- if ($db_tools->sql_layer == 'firebird')
- {
- $changes = array(
- 'drop_tables' => array(
- $table_prefix . 'captcha_questions',
- $table_prefix . 'captcha_answers',
- $table_prefix . 'qa_confirm',
- ),
- );
- $statements = $db_tools->perform_schema_changes($changes);
-
- foreach ($statements as $sql)
- {
- _sql($sql, $errored, $error_ary);
- }
- }
- */
-
- $no_updates = false;
- break;
-
- // No changes from 3.0.9-RC1 to 3.0.9-RC2
- case '3.0.9-RC1':
- break;
-
- // No changes from 3.0.9-RC2 to 3.0.9-RC3
- case '3.0.9-RC2':
- break;
-
- // No changes from 3.0.9-RC3 to 3.0.9-RC4
- case '3.0.9-RC3':
- break;
-
- // No changes from 3.0.9-RC4 to 3.0.9
- case '3.0.9-RC4':
- break;
-
- // Changes from 3.0.9 to 3.0.10-RC1
- case '3.0.9':
- if (!isset($config['email_max_chunk_size']))
- {
- set_config('email_max_chunk_size', '50');
- }
-
- $no_updates = false;
- break;
-
- // No changes from 3.0.10-RC1 to 3.0.10-RC2
- case '3.0.10-RC1':
- break;
-
- // No changes from 3.0.10-RC2 to 3.0.10-RC3
- case '3.0.10-RC2':
- break;
-
- // No changes from 3.0.10-RC3 to 3.0.10
- case '3.0.10-RC3':
- break;
-
- // Changes from 3.0.10 to 3.0.11-RC1
- case '3.0.10':
- // Updates users having current style a deactivated one
- $sql = 'SELECT style_id
- FROM ' . STYLES_TABLE . '
- WHERE style_active = 0';
- $result = $db->sql_query($sql);
-
- $deactivated_style_ids = array();
- while ($style_id = $db->sql_fetchfield('style_id', false, $result))
- {
- $deactivated_style_ids[] = (int) $style_id;
- }
- $db->sql_freeresult($result);
-
- if (!empty($deactivated_style_ids))
- {
- $sql = 'UPDATE ' . USERS_TABLE . '
- SET user_style = ' . (int) $config['default_style'] .'
- WHERE ' . $db->sql_in_set('user_style', $deactivated_style_ids);
- _sql($sql, $errored, $error_ary);
- }
-
- // Delete orphan private messages
- $batch_size = 500;
-
- $sql_array = array(
- 'SELECT' => 'p.msg_id',
- 'FROM' => array(
- PRIVMSGS_TABLE => 'p',
- ),
- 'LEFT_JOIN' => array(
- array(
- 'FROM' => array(PRIVMSGS_TO_TABLE => 't'),
- 'ON' => 'p.msg_id = t.msg_id',
- ),
- ),
- 'WHERE' => 't.user_id IS NULL',
- );
- $sql = $db->sql_build_query('SELECT', $sql_array);
-
- do
- {
- $result = $db->sql_query_limit($sql, $batch_size);
-
- $delete_pms = array();
- while ($row = $db->sql_fetchrow($result))
- {
- $delete_pms[] = (int) $row['msg_id'];
- }
- $db->sql_freeresult($result);
-
- if (!empty($delete_pms))
- {
- $sql = 'DELETE FROM ' . PRIVMSGS_TABLE . '
- WHERE ' . $db->sql_in_set('msg_id', $delete_pms);
- _sql($sql, $errored, $error_ary);
- }
- }
- while (sizeof($delete_pms) == $batch_size);
-
- $no_updates = false;
- break;
-
- // No changes from 3.0.11-RC1 to 3.0.11-RC2
- case '3.0.11-RC1':
- break;
-
- // No changes from 3.0.11-RC2 to 3.0.11
- case '3.0.11-RC2':
- break;
-
- // Changes from 3.0.11 to 3.0.12-RC1
- case '3.0.11':
- $sql = 'UPDATE ' . MODULES_TABLE . '
- SET module_auth = \'acl_u_sig\'
- WHERE module_class = \'ucp\'
- AND module_basename = \'profile\'
- AND module_mode = \'signature\'';
- _sql($sql, $errored, $error_ary);
-
- // Update bots
- if (!function_exists('user_delete'))
- {
- include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
- }
-
- $bots_updates = array(
- // Bot Deletions
- 'NG-Search [Bot]' => false,
- 'Nutch/CVS [Bot]' => false,
- 'OmniExplorer [Bot]' => false,
- 'Seekport [Bot]' => false,
- 'Synoo [Bot]' => false,
- 'WiseNut [Bot]' => false,
-
- // Bot Updates
- // Bot name to bot user agent map
- 'Baidu [Spider]' => 'Baiduspider',
- 'Exabot [Bot]' => 'Exabot',
- 'Voyager [Bot]' => 'voyager/',
- 'W3C [Validator]' => 'W3C_Validator',
- );
-
- foreach ($bots_updates as $bot_name => $bot_agent)
- {
- $sql = 'SELECT user_id
- FROM ' . USERS_TABLE . '
- WHERE user_type = ' . USER_IGNORE . "
- AND username_clean = '" . $db->sql_escape(utf8_clean_string($bot_name)) . "'";
- $result = $db->sql_query($sql);
- $bot_user_id = (int) $db->sql_fetchfield('user_id');
- $db->sql_freeresult($result);
-
- if ($bot_user_id)
- {
- if ($bot_agent === false)
- {
- $sql = 'DELETE FROM ' . BOTS_TABLE . "
- WHERE user_id = $bot_user_id";
- _sql($sql, $errored, $error_ary);
-
- user_delete('remove', $bot_user_id);
- }
- else
- {
- $sql = 'UPDATE ' . BOTS_TABLE . "
- SET bot_agent = '" . $db->sql_escape($bot_agent) . "'
- WHERE user_id = $bot_user_id";
- _sql($sql, $errored, $error_ary);
- }
- }
- }
-
- // Disable receiving pms for bots
- $sql = 'SELECT user_id
- FROM ' . BOTS_TABLE;
- $result = $db->sql_query($sql);
-
- $bot_user_ids = array();
- while ($row = $db->sql_fetchrow($result))
- {
- $bot_user_ids[] = (int) $row['user_id'];
- }
- $db->sql_freeresult($result);
-
- if (!empty($bot_user_ids))
- {
- $sql = 'UPDATE ' . USERS_TABLE . '
- SET user_allow_pm = 0
- WHERE ' . $db->sql_in_set('user_id', $bot_user_ids);
- _sql($sql, $errored, $error_ary);
- }
-
- /**
- * Update BBCodes that currently use the LOCAL_URL tag
- *
- * To fix http://tracker.phpbb.com/browse/PHPBB3-8319 we changed
- * the second_pass_replace value, so that needs updating for existing ones
- */
- $sql = 'SELECT *
- FROM ' . BBCODES_TABLE . '
- WHERE bbcode_match ' . $db->sql_like_expression($db->any_char . 'LOCAL_URL' . $db->any_char);
- $result = $db->sql_query($sql);
-
- while ($row = $db->sql_fetchrow($result))
- {
- if (!class_exists('acp_bbcodes'))
- {
- phpbb_require_updated('includes/acp/acp_bbcodes.' . $phpEx);
- }
- $bbcode_match = $row['bbcode_match'];
- $bbcode_tpl = $row['bbcode_tpl'];
-
- $acp_bbcodes = new acp_bbcodes();
- $sql_ary = $acp_bbcodes->build_regexp($bbcode_match, $bbcode_tpl);
-
- $sql = 'UPDATE ' . BBCODES_TABLE . '
- SET ' . $db->sql_build_array('UPDATE', $sql_ary) . '
- WHERE bbcode_id = ' . (int) $row['bbcode_id'];
- $db->sql_query($sql);
- }
- $db->sql_freeresult($result);
-
- $no_updates = false;
- break;
-
- // No changes from 3.0.12-RC1 to 3.0.12-RC2
- case '3.0.12-RC1':
- break;
-
- // No changes from 3.0.12-RC2 to 3.0.12-RC3
- case '3.0.12-RC2':
- break;
-
- // No changes from 3.0.12-RC3 to 3.0.12
- case '3.0.12-RC3':
- break;
- }
+ echo '<div class="errorbox">' . $user->lang['UPDATE_FILES_NOTICE'] . '</div>';
+ echo $user->lang['COMPLETE_LOGIN_TO_BOARD'];
}
-?>
+phpbb_end_update($cache, $config);
diff --git a/phpBB/install/index.php b/phpBB/install/index.php
index 35e7c70e1d..66c8559e98 100644
--- a/phpBB/install/index.php
+++ b/phpBB/install/index.php
@@ -2,12 +2,15 @@
/**
*
* @package install
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
+use Symfony\Component\Config\FileLocator;
+use Symfony\Component\DependencyInjection\ContainerBuilder;
+use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
+
/**#@+
* @ignore
*/
@@ -18,15 +21,14 @@ define('IN_INSTALL', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './../';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
-// @todo Review this test and see if we can find out what it is which prevents PHP 4.2.x from even displaying the page with requirements on it
-if (version_compare(PHP_VERSION, '4.3.3') < 0)
+if (version_compare(PHP_VERSION, '5.3.3') < 0)
{
- die('You are running an unsupported PHP version. Please upgrade to PHP 4.3.3 or higher before trying to install phpBB 3.0');
+ die('You are running an unsupported PHP version. Please upgrade to PHP 5.3.3 or higher before trying to install phpBB 3.1');
}
function phpbb_require_updated($path, $optional = false)
{
- global $phpbb_root_path;
+ global $phpbb_root_path, $table_prefix;
$new_path = $phpbb_root_path . 'install/update/new/' . $path;
$old_path = $phpbb_root_path . $path;
@@ -41,6 +43,23 @@ function phpbb_require_updated($path, $optional = false)
}
}
+function phpbb_include_updated($path, $optional = false)
+{
+ global $phpbb_root_path;
+
+ $new_path = $phpbb_root_path . 'install/update/new/' . $path;
+ $old_path = $phpbb_root_path . $path;
+
+ if (file_exists($new_path))
+ {
+ include($new_path);
+ }
+ else if (!$optional || file_exists($old_path))
+ {
+ include($old_path);
+ }
+}
+
phpbb_require_updated('includes/startup.' . $phpEx);
// Try to override some limits - maybe it helps some...
@@ -71,26 +90,49 @@ else
}
@ini_set('memory_limit', $mem_limit);
+// In case $phpbb_adm_relative_path is not set (in case of an update), use the default.
+$phpbb_adm_relative_path = (isset($phpbb_adm_relative_path)) ? $phpbb_adm_relative_path : 'adm/';
+$phpbb_admin_path = (defined('PHPBB_ADMIN_PATH')) ? PHPBB_ADMIN_PATH : $phpbb_root_path . $phpbb_adm_relative_path;
+
// Include essential scripts
-require($phpbb_root_path . 'includes/functions.' . $phpEx);
+phpbb_require_updated('phpbb/class_loader.' . $phpEx);
+
+phpbb_require_updated('includes/functions.' . $phpEx);
+phpbb_require_updated('includes/functions_container.' . $phpEx);
phpbb_require_updated('includes/functions_content.' . $phpEx, true);
-include($phpbb_root_path . 'includes/auth.' . $phpEx);
-include($phpbb_root_path . 'includes/session.' . $phpEx);
-include($phpbb_root_path . 'includes/template.' . $phpEx);
-include($phpbb_root_path . 'includes/acm/acm_file.' . $phpEx);
-include($phpbb_root_path . 'includes/cache.' . $phpEx);
-include($phpbb_root_path . 'includes/functions_admin.' . $phpEx);
-include($phpbb_root_path . 'includes/utf/utf_tools.' . $phpEx);
-require($phpbb_root_path . 'includes/functions_install.' . $phpEx);
+phpbb_include_updated('includes/functions_admin.' . $phpEx);
+phpbb_include_updated('includes/utf/utf_normalizer.' . $phpEx);
+phpbb_include_updated('includes/utf/utf_tools.' . $phpEx);
+phpbb_require_updated('includes/functions_install.' . $phpEx);
+
+// Setup class loader first
+$phpbb_class_loader_new = new \phpbb\class_loader('phpbb\\', "{$phpbb_root_path}install/update/new/phpbb/", $phpEx);
+$phpbb_class_loader_new->register();
+$phpbb_class_loader = new \phpbb\class_loader('phpbb\\', "{$phpbb_root_path}phpbb/", $phpEx);
+$phpbb_class_loader->register();
+$phpbb_class_loader_ext = new \phpbb\class_loader('\\', "{$phpbb_root_path}ext/", $phpEx);
+$phpbb_class_loader_ext->register();
+
+// Set up container
+$phpbb_container = phpbb_create_install_container($phpbb_root_path, $phpEx);
+
+$phpbb_class_loader->set_cache($phpbb_container->get('cache.driver'));
+$phpbb_class_loader_ext->set_cache($phpbb_container->get('cache.driver'));
+
+$phpbb_dispatcher = $phpbb_container->get('dispatcher');
+$request = $phpbb_container->get('request');
+
+// make sure request_var uses this request instance
+request_var('', 0, false, false, $request); // "dependency injection" for a function
// Try and load an appropriate language if required
-$language = basename(request_var('language', ''));
+$language = basename($request->variable('language', ''));
-if (!empty($_SERVER['HTTP_ACCEPT_LANGUAGE']) && !$language)
+if ($request->header('Accept-Language') && !$language)
{
- $accept_lang_ary = explode(',', strtolower($_SERVER['HTTP_ACCEPT_LANGUAGE']));
+ $accept_lang_ary = explode(',', strtolower($request->header('Accept-Language')));
foreach ($accept_lang_ary as $accept_lang)
{
// Set correct format ... guess full xx_yy form
@@ -145,11 +187,23 @@ if (!file_exists($phpbb_root_path . 'language/' . $language) || !is_dir($phpbb_r
}
// And finally, load the relevant language files
-include($phpbb_root_path . 'language/' . $language . '/common.' . $phpEx);
-include($phpbb_root_path . 'language/' . $language . '/acp/common.' . $phpEx);
-include($phpbb_root_path . 'language/' . $language . '/acp/board.' . $phpEx);
-include($phpbb_root_path . 'language/' . $language . '/install.' . $phpEx);
-include($phpbb_root_path . 'language/' . $language . '/posting.' . $phpEx);
+$load_lang_files = array('common', 'acp/common', 'acp/board', 'install', 'posting');
+$new_path = $phpbb_root_path . 'install/update/new/language/' . $language . '/';
+$old_path = $phpbb_root_path . 'language/' . $language . '/';
+
+// NOTE: we can not use "phpbb_include_updated" as the files uses vars which would be required
+// to be global while loading.
+foreach ($load_lang_files as $lang_file)
+{
+ if (file_exists($new_path . $lang_file . '.' . $phpEx))
+ {
+ include($new_path . $lang_file . '.' . $phpEx);
+ }
+ else
+ {
+ include($old_path . $lang_file . '.' . $phpEx);
+ }
+}
// usually we would need every single constant here - and it would be consistent. For 3.0.x, use a dirty hack... :(
@@ -159,16 +213,14 @@ define('CHMOD_READ', 4);
define('CHMOD_WRITE', 2);
define('CHMOD_EXECUTE', 1);
-$mode = request_var('mode', 'overview');
-$sub = request_var('sub', '');
+$mode = $request->variable('mode', 'overview');
+$sub = $request->variable('sub', '');
// Set PHP error handler to ours
set_error_handler(defined('PHPBB_MSG_HANDLER') ? PHPBB_MSG_HANDLER : 'msg_handler');
-$user = new user();
-$auth = new auth();
-$cache = new cache();
-$template = new template();
+$user = new \phpbb\user();
+$auth = new \phpbb\auth\auth();
// Add own hook handler, if present. :o
if (file_exists($phpbb_root_path . 'includes/hooks/index.' . $phpEx))
@@ -176,7 +228,8 @@ if (file_exists($phpbb_root_path . 'includes/hooks/index.' . $phpEx))
require($phpbb_root_path . 'includes/hooks/index.' . $phpEx);
$phpbb_hook = new phpbb_hook(array('exit_handler', 'phpbb_user_session_handler', 'append_sid', array('template', 'display')));
- foreach ($cache->obtain_hooks() as $hook)
+ $phpbb_hook_finder = $phpbb_container->get('hook_finder');
+ foreach ($phpbb_hook_finder->find() as $hook)
{
@include($phpbb_root_path . 'includes/hooks/' . $hook . '.' . $phpEx);
}
@@ -187,15 +240,22 @@ else
}
// Set some standard variables we want to force
-$config = array(
+$config = new \phpbb\config\config(array(
'load_tplcompile' => '1'
-);
+));
+
+$symfony_request = $phpbb_container->get('symfony_request');
+$phpbb_filesystem = $phpbb_container->get('filesystem');
+$phpbb_path_helper = $phpbb_container->get('path_helper');
+$template = new \phpbb\template\twig\twig($phpbb_path_helper, $config, $user, new \phpbb\template\context());
+$paths = array($phpbb_root_path . 'install/update/new/adm/style', $phpbb_admin_path . 'style');
+$paths = array_filter($paths, 'is_dir');
+$template->set_custom_style('adm', $paths);
-$template->set_custom_template('../adm/style', 'admin');
-$template->assign_var('T_TEMPLATE_PATH', '../adm/style');
+$path = array_shift($paths);
-// the acp template is never stored in the database
-$user->theme['template_storedb'] = false;
+$template->assign_var('T_ASSETS_PATH', $path . '/../../assets');
+$template->assign_var('T_TEMPLATE_PATH', $path);
$install = new module();
@@ -339,15 +399,17 @@ class module
}
define('HEADER_INC', true);
- global $template, $lang, $stage, $phpbb_root_path;
+ global $template, $lang, $stage, $phpbb_admin_path, $path;
$template->assign_vars(array(
'L_CHANGE' => $lang['CHANGE'],
+ 'L_COLON' => $lang['COLON'],
'L_INSTALL_PANEL' => $lang['INSTALL_PANEL'],
'L_SELECT_LANG' => $lang['SELECT_LANG'],
'L_SKIP' => $lang['SKIP'],
'PAGE_TITLE' => $this->get_page_title(),
- 'T_IMAGE_PATH' => $phpbb_root_path . 'adm/images/',
+ 'T_IMAGE_PATH' => htmlspecialchars($phpbb_admin_path) . 'images/',
+ 'T_JQUERY_LINK' => $path . '/../../assets/javascript/jquery.js',
'S_CONTENT_DIRECTION' => $lang['DIRECTION'],
'S_CONTENT_FLOW_BEGIN' => ($lang['DIRECTION'] == 'ltr') ? 'left' : 'right',
@@ -417,15 +479,17 @@ class module
*/
function redirect($page)
{
+ global $request;
+
// HTTP_HOST is having the correct browser url in most cases...
- $server_name = (!empty($_SERVER['HTTP_HOST'])) ? strtolower($_SERVER['HTTP_HOST']) : ((!empty($_SERVER['SERVER_NAME'])) ? $_SERVER['SERVER_NAME'] : getenv('SERVER_NAME'));
- $server_port = (!empty($_SERVER['SERVER_PORT'])) ? (int) $_SERVER['SERVER_PORT'] : (int) getenv('SERVER_PORT');
- $secure = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? 1 : 0;
+ $server_name = strtolower(htmlspecialchars_decode($request->header('Host', $request->server('SERVER_NAME'))));
+ $server_port = $request->server('SERVER_PORT', 0);
+ $secure = $request->is_secure() ? 1 : 0;
- $script_name = (!empty($_SERVER['PHP_SELF'])) ? $_SERVER['PHP_SELF'] : getenv('PHP_SELF');
+ $script_name = htmlspecialchars_decode($request->server('PHP_SELF'));
if (!$script_name)
{
- $script_name = (!empty($_SERVER['REQUEST_URI'])) ? $_SERVER['REQUEST_URI'] : getenv('REQUEST_URI');
+ $script_name = htmlspecialchars_decode($request->server('REQUEST_URI'));
}
// Replace backslashes and doubled slashes (could happen on some proxy setups)
@@ -526,7 +590,7 @@ class module
*/
function error($error, $line, $file, $skip = false)
{
- global $lang, $db, $template;
+ global $lang, $db, $template, $phpbb_admin_path;
if ($skip)
{
@@ -543,12 +607,12 @@ class module
return;
}
- echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">';
- echo '<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr">';
+ echo '<!DOCTYPE html>';
+ echo '<html dir="ltr">';
echo '<head>';
- echo '<meta http-equiv="content-type" content="text/html; charset=utf-8" />';
+ echo '<meta charset="utf-8">';
echo '<title>' . $lang['INST_ERR_FATAL'] . '</title>';
- echo '<link href="../adm/style/admin.css" rel="stylesheet" type="text/css" media="screen" />';
+ echo '<link href="' . htmlspecialchars($phpbb_admin_path) . 'style/admin.css" rel="stylesheet" type="text/css" media="screen" />';
echo '</head>';
echo '<body id="errorpage">';
echo '<div id="wrap">';
@@ -629,7 +693,7 @@ class module
/**
* Generate the relevant HTML for an input field and the associated label and explanatory text
*/
- function input_field($name, $type, $value='', $options='')
+ function input_field($name, $type, $value = '', $options = '')
{
global $lang;
$tpl_type = explode(':', $type);
@@ -639,6 +703,21 @@ class module
{
case 'text':
case 'password':
+ // HTML5 text-like input types
+ case 'color':
+ case 'date':
+ case 'time':
+ case 'datetime':
+ case 'datetime-local':
+ case 'email':
+ case 'month':
+ case 'number':
+ case 'range':
+ case 'search':
+ case 'tel':
+ case 'url':
+ case 'week':
+
$size = (int) $tpl_type[1];
$maxlength = (int) $tpl_type[2];
$autocomplete = (isset($options['autocomplete']) && $options['autocomplete'] == 'off') ? ' autocomplete="off"' : '';
@@ -726,5 +805,3 @@ class module
return $user_select;
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/install/install_convert.php b/phpBB/install/install_convert.php
index fb97255981..a837e9d52a 100644
--- a/phpBB/install/install_convert.php
+++ b/phpBB/install/install_convert.php
@@ -2,9 +2,8 @@
/**
*
* @package install
-* @version $Id$
* @copyright (c) 2006 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -80,6 +79,21 @@ class convert
*/
class install_convert extends module
{
+ /** @var array */
+ protected $lang;
+
+ /** @var string */
+ protected $language;
+
+ /** @var \phpbb\template\template */
+ protected $template;
+
+ /** @var string */
+ protected $phpbb_root_path;
+
+ /** @var string */
+ protected $php_ext;
+
/**
* Variables used while converting, they are accessible from the global variable $convert
*/
@@ -91,55 +105,48 @@ class install_convert extends module
function main($mode, $sub)
{
global $lang, $template, $phpbb_root_path, $phpEx, $cache, $config, $language, $table_prefix;
- global $convert;
+ global $convert, $request, $phpbb_container;
$this->tpl_name = 'install_convert';
$this->mode = $mode;
+ $this->lang = $lang;
+ $this->language = $language;
+ $this->template = $template;
+ $this->phpbb_root_path = $phpbb_root_path;
+ $this->php_ext = $phpEx;
+
+ if (!$this->check_phpbb_installed())
+ {
+ return;
+ }
$convert = new convert($this->p_master);
+ // Enable super globals to prevent issues with the new \phpbb\request\request object
+ $request->enable_super_globals();
+ // Create a normal container now
+ $phpbb_container = phpbb_create_default_container($phpbb_root_path, $phpEx);
+
+ // Create cache
+ $cache = $phpbb_container->get('cache');
+
switch ($sub)
{
case 'intro':
- // Try opening config file
- // @todo If phpBB is not installed, we need to do a cut-down installation here
- // For now, we redirect to the installation script instead
- if (@file_exists($phpbb_root_path . 'config.' . $phpEx))
- {
- include($phpbb_root_path . 'config.' . $phpEx);
- }
-
- if (!defined('PHPBB_INSTALLED'))
- {
- $template->assign_vars(array(
- 'S_NOT_INSTALLED' => true,
- 'TITLE' => $lang['BOARD_NOT_INSTALLED'],
- 'BODY' => sprintf($lang['BOARD_NOT_INSTALLED_EXPLAIN'], append_sid($phpbb_root_path . 'install/index.' . $phpEx, 'mode=install&amp;language=' . $language)),
- ));
-
- return;
- }
-
require($phpbb_root_path . 'config.' . $phpEx);
require($phpbb_root_path . 'includes/constants.' . $phpEx);
- require($phpbb_root_path . 'includes/db/' . $dbms . '.' . $phpEx);
require($phpbb_root_path . 'includes/functions_convert.' . $phpEx);
- $db = new $sql_db();
+ $dbms = phpbb_convert_30_dbms_to_31($dbms);
+
+ $db = new $dbms();
$db->sql_connect($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, false, true);
unset($dbpasswd);
// We need to fill the config to let internal functions correctly work
- $sql = 'SELECT *
- FROM ' . CONFIG_TABLE;
- $result = $db->sql_query($sql);
-
- $config = array();
- while ($row = $db->sql_fetchrow($result))
- {
- $config[$row['config_name']] = $row['config_value'];
- }
- $db->sql_freeresult($result);
+ $config = new \phpbb\config\db($db, new \phpbb\cache\driver\null, CONFIG_TABLE);
+ set_config(null, null, null, $config);
+ set_config_count(null, null, null, $config);
// Detect if there is already a conversion in progress at this point and offer to resume
// It's quite possible that the user will get disconnected during a large conversion so they need to be able to resume it
@@ -217,10 +224,11 @@ class install_convert extends module
require($phpbb_root_path . 'config.' . $phpEx);
require($phpbb_root_path . 'includes/constants.' . $phpEx);
- require($phpbb_root_path . 'includes/db/' . $dbms . '.' . $phpEx);
require($phpbb_root_path . 'includes/functions_convert.' . $phpEx);
- $db = new $sql_db();
+ $dbms = phpbb_convert_30_dbms_to_31($dbms);
+
+ $db = new $dbms();
$db->sql_connect($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, false, true);
unset($dbpasswd);
@@ -257,6 +265,30 @@ class install_convert extends module
}
/**
+ * Check whether phpBB is installed.
+ * Assigns error template vars if not installed.
+ *
+ * @return bool Returns true if phpBB is installed.
+ */
+ public function check_phpbb_installed()
+ {
+ if (phpbb_check_installation_exists($this->phpbb_root_path, $this->php_ext))
+ {
+ return true;
+ }
+
+ $this->page_title = 'BOARD_NOT_INSTALLED';
+ $install_url = append_sid($this->phpbb_root_path . 'install/index.' . $this->php_ext, 'mode=install&amp;language=' . $this->language);
+
+ $this->template->assign_vars(array(
+ 'S_NOT_INSTALLED' => true,
+ 'BODY' => sprintf($this->lang['BOARD_NOT_INSTALLED_EXPLAIN'], $install_url),
+ ));
+
+ return false;
+ }
+
+ /**
* Generate a list of all available conversion modules
*/
function list_convertors($sub)
@@ -340,26 +372,20 @@ class install_convert extends module
require($phpbb_root_path . 'config.' . $phpEx);
require($phpbb_root_path . 'includes/constants.' . $phpEx);
- require($phpbb_root_path . 'includes/db/' . $dbms . '.' . $phpEx);
require($phpbb_root_path . 'includes/functions_convert.' . $phpEx);
- $db = new $sql_db();
+ $dbms = phpbb_convert_30_dbms_to_31($dbms);
+
+ $db = new $dbms();
$db->sql_connect($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, false, true);
unset($dbpasswd);
$this->page_title = $lang['STAGE_SETTINGS'];
// We need to fill the config to let internal functions correctly work
- $sql = 'SELECT *
- FROM ' . CONFIG_TABLE;
- $result = $db->sql_query($sql);
-
- $config = array();
- while ($row = $db->sql_fetchrow($result))
- {
- $config[$row['config_name']] = $row['config_value'];
- }
- $db->sql_freeresult($result);
+ $config = new \phpbb\config\db($db, new \phpbb\cache\driver\null, CONFIG_TABLE);
+ set_config(null, null, null, $config);
+ set_config_count(null, null, null, $config);
$convertor_tag = request_var('tag', '');
@@ -430,6 +456,7 @@ class install_convert extends module
{
$error[] = sprintf($lang['TABLE_PREFIX_SAME'], $src_table_prefix);
}
+ $src_dbms = phpbb_convert_30_dbms_to_31($src_dbms);
// Check table prefix
if (!sizeof($error))
@@ -440,8 +467,7 @@ class install_convert extends module
if ($src_dbms != $dbms || $src_dbhost != $dbhost || $src_dbport != $dbport || $src_dbname != $dbname || $src_dbuser != $dbuser)
{
- $sql_db = 'dbal_' . $src_dbms;
- $src_db = new $sql_db();
+ $src_db = new $src_dbms();
$src_db->sql_connect($src_dbhost, $src_dbuser, htmlspecialchars_decode($src_dbpasswd), $src_dbname, $src_dbport, false, true);
$same_db = false;
}
@@ -584,28 +610,24 @@ class install_convert extends module
*/
function convert_data($sub)
{
- global $template, $user, $phpbb_root_path, $phpEx, $db, $lang, $config, $cache;
+ global $template, $user, $phpbb_root_path, $phpEx, $db, $lang, $config, $cache, $auth;
global $convert, $convert_row, $message_parser, $skip_rows, $language;
+ global $request;
require($phpbb_root_path . 'config.' . $phpEx);
require($phpbb_root_path . 'includes/constants.' . $phpEx);
- require($phpbb_root_path . 'includes/db/' . $dbms . '.' . $phpEx);
require($phpbb_root_path . 'includes/functions_convert.' . $phpEx);
- $db = new $sql_db();
+ $dbms = phpbb_convert_30_dbms_to_31($dbms);
+
+ $db = new $dbms();
$db->sql_connect($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, false, true);
unset($dbpasswd);
- $sql = 'SELECT *
- FROM ' . CONFIG_TABLE;
- $result = $db->sql_query($sql);
-
- $config = array();
- while ($row = $db->sql_fetchrow($result))
- {
- $config[$row['config_name']] = $row['config_value'];
- }
- $db->sql_freeresult($result);
+ // We need to fill the config to let internal functions correctly work
+ $config = new \phpbb\config\db($db, new \phpbb\cache\driver\null, CONFIG_TABLE);
+ set_config(null, null, null, $config);
+ set_config_count(null, null, null, $config);
// Override a couple of config variables for the duration
$config['max_quote_depth'] = 0;
@@ -659,12 +681,8 @@ class install_convert extends module
$src_db = $same_db = null;
if ($convert->src_dbms != $dbms || $convert->src_dbhost != $dbhost || $convert->src_dbport != $dbport || $convert->src_dbname != $dbname || $convert->src_dbuser != $dbuser)
{
- if ($convert->src_dbms != $dbms)
- {
- require($phpbb_root_path . 'includes/db/' . $convert->src_dbms . '.' . $phpEx);
- }
- $sql_db = 'dbal_' . $convert->src_dbms;
- $src_db = new $sql_db();
+ $dbms = $convert->src_dbms;
+ $src_db = new $dbms();
$src_db->sql_connect($convert->src_dbhost, $convert->src_dbuser, htmlspecialchars_decode($convert->src_dbpasswd), $convert->src_dbname, $convert->src_dbport, false, true);
$same_db = false;
}
@@ -755,24 +773,22 @@ class install_convert extends module
$this->p_master->error(sprintf($user->lang['COULD_NOT_FIND_PATH'], $convert->options['forum_path']), __LINE__, __FILE__);
}
- $search_type = basename(trim($config['search_type']));
+ $search_type = $config['search_type'];
// For conversions we are a bit less strict and set to a search backend we know exist...
- if (!file_exists($phpbb_root_path . 'includes/search/' . $search_type . '.' . $phpEx))
+ if (!class_exists($search_type))
{
- $search_type = 'fulltext_native';
+ $search_type = '\phpbb\search\fulltext_native';
set_config('search_type', $search_type);
}
- if (!file_exists($phpbb_root_path . 'includes/search/' . $search_type . '.' . $phpEx))
+ if (!class_exists($search_type))
{
trigger_error('NO_SUCH_SEARCH_MODULE');
}
- require($phpbb_root_path . 'includes/search/' . $search_type . '.' . $phpEx);
-
$error = false;
- $convert->fulltext_search = new $search_type($error);
+ $convert->fulltext_search = new $search_type($error, $phpbb_root_path, $phpEx, $auth, $config, $db, $user);
if ($error)
{
@@ -812,7 +828,7 @@ class install_convert extends module
if (!$current_table && !$skip_rows)
{
- if (empty($_REQUEST['confirm']))
+ if (!$request->variable('confirm', false))
{
// If avatars / ranks / smilies folders are specified make sure they are writable
$bad_folders = array();
@@ -955,7 +971,7 @@ class install_convert extends module
}
else if (sizeof($missing_tables))
{
- $this->p_master->error(sprintf($user->lang['TABLES_MISSING'], implode(', ', $missing_tables)) . '<br /><br />' . $user->lang['CHECK_TABLE_PREFIX'], __LINE__, __FILE__);
+ $this->p_master->error(sprintf($user->lang['TABLES_MISSING'], implode($user->lang['COMMA_SEPARATOR'], $missing_tables)) . '<br /><br />' . $user->lang['CHECK_TABLE_PREFIX'], __LINE__, __FILE__);
}
$url = $this->save_convert_progress('&amp;confirm=1');
@@ -973,7 +989,7 @@ class install_convert extends module
));
return;
- } // if (empty($_REQUEST['confirm']))
+ } // if (!$request->variable('confirm', false)))
$template->assign_block_vars('checks', array(
'S_LEGEND' => true,
@@ -1218,7 +1234,7 @@ class install_convert extends module
$template->assign_block_vars('checks', array(
'TITLE' => "skip_rows = $skip_rows",
- 'RESULT' => $rows . ((defined('DEBUG_EXTRA') && function_exists('memory_get_usage')) ? ceil(memory_get_usage()/1024) . ' ' . $user->lang['KIB'] : ''),
+ 'RESULT' => $rows . ((defined('DEBUG') && function_exists('memory_get_usage')) ? ceil(memory_get_usage()/1024) . ' ' . $user->lang['KIB'] : ''),
));
$mtime = explode(' ', microtime());
@@ -1402,7 +1418,7 @@ class install_convert extends module
}
// When we reach this point, either the current table has been processed or we're running out of time.
- if (still_on_time() && $counting < $convert->batch_size/* && !defined('DEBUG_EXTRA')*/)
+ if (still_on_time() && $counting < $convert->batch_size/* && !defined('DEBUG')*/)
{
$skip_rows = 0;
$current_table++;
@@ -1487,11 +1503,10 @@ class install_convert extends module
$end = ($sync_batch + $batch_size - 1);
// Sync all topics in batch mode...
- sync('topic_approved', 'range', 'topic_id BETWEEN ' . $sync_batch . ' AND ' . $end, true, false);
sync('topic', 'range', 'topic_id BETWEEN ' . $sync_batch . ' AND ' . $end, true, true);
$template->assign_block_vars('checks', array(
- 'TITLE' => sprintf($user->lang['SYNC_TOPIC_ID'], $sync_batch, ($sync_batch + $batch_size)) . ((defined('DEBUG_EXTRA') && function_exists('memory_get_usage')) ? ' [' . ceil(memory_get_usage()/1024) . ' ' . $user->lang['KIB'] . ']' : ''),
+ 'TITLE' => sprintf($user->lang['SYNC_TOPIC_ID'], $sync_batch, ($sync_batch + $batch_size)) . ((defined('DEBUG') && function_exists('memory_get_usage')) ? ' [' . ceil(memory_get_usage()/1024) . ' ' . $user->lang['KIB'] . ']' : ''),
'RESULT' => $user->lang['DONE'],
));
@@ -1561,6 +1576,7 @@ class install_convert extends module
function finish_conversion()
{
global $db, $phpbb_root_path, $phpEx, $convert, $config, $language, $user, $template;
+ global $cache, $auth, $phpbb_container, $phpbb_log;
$db->sql_query('DELETE FROM ' . CONFIG_TABLE . "
WHERE config_name = 'convert_progress'
@@ -1570,9 +1586,10 @@ class install_convert extends module
$db->sql_query('DELETE FROM ' . SESSIONS_TABLE);
@unlink($phpbb_root_path . 'cache/data_global.' . $phpEx);
- cache_moderators();
+ phpbb_cache_moderators($db, $cache, $auth);
// And finally, add a note to the log
+ $phpbb_log = $phpbb_container->get('log');
add_log('admin', 'LOG_INSTALL_CONVERTED', $convert->convertor_data['forum_name'], $config['version']);
$url = $this->p_master->module_url . "?mode={$this->mode}&amp;sub=final&amp;language=$language";
@@ -1779,7 +1796,7 @@ class install_convert extends module
global $convert;
// Can we use IGNORE with this DBMS?
- $sql_ignore = (strpos($db->sql_layer, 'mysql') === 0 && !defined('DEBUG_EXTRA')) ? 'IGNORE ' : '';
+ $sql_ignore = (strpos($db->sql_layer, 'mysql') === 0 && !defined('DEBUG')) ? 'IGNORE ' : '';
$insert_query = 'INSERT ' . $sql_ignore . 'INTO ' . $schema['target'] . ' (';
$aliases = array();
@@ -2109,5 +2126,3 @@ class install_convert extends module
'refresh' => array('lang' => 'REFRESH_PAGE', 'type' => 'radio:yes_no', 'explain' => true),
);
}
-
-?> \ No newline at end of file
diff --git a/phpBB/install/install_install.php b/phpBB/install/install_install.php
index 0a100ae71b..c749b54f40 100644
--- a/phpBB/install/install_install.php
+++ b/phpBB/install/install_install.php
@@ -2,9 +2,8 @@
/**
*
* @package install
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -19,14 +18,9 @@ if (!defined('IN_INSTALL'))
if (!empty($setmodules))
{
// If phpBB is already installed we do not include this module
- if (@file_exists($phpbb_root_path . 'config.' . $phpEx) && !file_exists($phpbb_root_path . 'cache/install_lock'))
+ if (phpbb_check_installation_exists($phpbb_root_path, $phpEx) && !file_exists($phpbb_root_path . 'cache/install_lock'))
{
- include_once($phpbb_root_path . 'config.' . $phpEx);
-
- if (defined('PHPBB_INSTALLED'))
- {
- return;
- }
+ return;
}
$module[] = array(
@@ -53,12 +47,13 @@ class install_install extends module
function main($mode, $sub)
{
- global $lang, $template, $language, $phpbb_root_path, $cache;
+ global $lang, $template, $language, $phpbb_root_path, $phpEx;
+ global $phpbb_container, $cache, $phpbb_log, $request;
switch ($sub)
{
case 'intro':
- $cache->purge();
+ $phpbb_container->get('cache.driver')->purge();
$this->page_title = $lang['SUB_INTRO'];
@@ -102,12 +97,23 @@ class install_install extends module
break;
case 'final':
+ // Enable super globals to prevent issues with the new \phpbb\request\request object
+ $request->enable_super_globals();
+
+ // Create a normal container now
+ $phpbb_container = phpbb_create_default_container($phpbb_root_path, $phpEx);
+
+ // Sets the global variables
+ $cache = $phpbb_container->get('cache');
+ $phpbb_log = $phpbb_container->get('log');
+
$this->build_search_index($mode, $sub);
$this->add_modules($mode, $sub);
$this->add_language($mode, $sub);
$this->add_bots($mode, $sub);
$this->email_admin($mode, $sub);
$this->disable_avatars_if_unwritable();
+ $this->populate_migrations($phpbb_container->get('ext.manager'), $phpbb_container->get('migrator'));
// Remove the lock file
@unlink($phpbb_root_path . 'cache/install_lock');
@@ -132,7 +138,7 @@ class install_install extends module
'BODY' => $lang['REQUIREMENTS_EXPLAIN'],
));
- $passed = array('php' => false, 'db' => false, 'files' => false, 'pcre' => false, 'imagesize' => false,);
+ $passed = array('php' => false, 'db' => false, 'files' => false, 'pcre' => false, 'imagesize' => false, 'json' => false,);
// Test for basic PHP settings
$template->assign_block_vars('checks', array(
@@ -144,7 +150,7 @@ class install_install extends module
// Test the minimum PHP version
$php_version = PHP_VERSION;
- if (version_compare($php_version, '4.3.3') < 0)
+ if (version_compare($php_version, '5.3.3') < 0)
{
$result = '<strong style="color:red">' . $lang['NO'] . '</strong>';
}
@@ -252,13 +258,25 @@ class install_install extends module
'S_LEGEND' => false,
));
-/**
-* Better not enabling and adding to the loaded extensions due to the specific requirements needed
- if (!@extension_loaded('mbstring'))
+ // Check for php json support
+ if (@extension_loaded('json'))
{
- can_load_dll('mbstring');
+ $passed['json'] = true;
+ $result = '<strong style="color:green">' . $lang['YES'] . '</strong>';
}
-*/
+ else
+ {
+ $result = '<strong style="color:red">' . $lang['NO'] . '</strong>';
+ }
+
+ $template->assign_block_vars('checks', array(
+ 'TITLE' => $lang['PHP_JSON_SUPPORT'],
+ 'TITLE_EXPLAIN' => $lang['PHP_JSON_SUPPORT_EXPLAIN'],
+ 'RESULT' => $result,
+
+ 'S_EXPLAIN' => true,
+ 'S_LEGEND' => false,
+ ));
$passed['mbstring'] = true;
if (@extension_loaded('mbstring'))
@@ -363,17 +381,14 @@ class install_install extends module
{
if (!@extension_loaded($dll))
{
- if (!can_load_dll($dll))
- {
- $template->assign_block_vars('checks', array(
- 'TITLE' => $lang['DLL_' . strtoupper($dll)],
- 'RESULT' => '<strong style="color:red">' . $lang['UNAVAILABLE'] . '</strong>',
+ $template->assign_block_vars('checks', array(
+ 'TITLE' => $lang['DLL_' . strtoupper($dll)],
+ 'RESULT' => '<strong style="color:red">' . $lang['UNAVAILABLE'] . '</strong>',
- 'S_EXPLAIN' => false,
- 'S_LEGEND' => false,
- ));
- continue;
- }
+ 'S_EXPLAIN' => false,
+ 'S_LEGEND' => false,
+ ));
+ continue;
}
$template->assign_block_vars('checks', array(
@@ -696,7 +711,7 @@ class install_install extends module
$error = array();
// Check the entered email address and password
- if ($data['admin_name'] == '' || $data['admin_pass1'] == '' || $data['admin_pass2'] == '' || $data['board_email1'] == '' || $data['board_email2'] == '')
+ if ($data['admin_name'] == '' || $data['admin_pass1'] == '' || $data['admin_pass2'] == '' || $data['board_email'] == '')
{
$error[] = $lang['INST_ERR_MISSING_DATA'];
}
@@ -728,12 +743,7 @@ class install_install extends module
$error[] = $lang['INST_ERR_PASSWORD_TOO_LONG'];
}
- if ($data['board_email1'] != $data['board_email2'] && $data['board_email1'] != '')
- {
- $error[] = $lang['INST_ERR_EMAIL_MISMATCH'];
- }
-
- if ($data['board_email1'] != '' && !preg_match('/^' . get_preg_expression('email') . '$/i', $data['board_email1']))
+ if ($data['board_email'] != '' && !preg_match('/^' . get_preg_expression('email') . '$/i', $data['board_email']))
{
$error[] = $lang['INST_ERR_EMAIL_INVALID'];
}
@@ -859,22 +869,7 @@ class install_install extends module
$written = false;
// Create a list of any PHP modules we wish to have loaded
- $load_extensions = array();
$available_dbms = get_available_dbms($data['dbms']);
- $check_exts = array_merge(array($available_dbms[$data['dbms']]['MODULE']), $this->php_dlls_other);
-
- foreach ($check_exts as $dll)
- {
- if (!@extension_loaded($dll))
- {
- if (!can_load_dll($dll))
- {
- continue;
- }
-
- $load_extensions[] = $dll . '.' . PHP_SHLIB_SUFFIX;
- }
- }
// Create a lock file to indicate that there is an install in progress
$fp = @fopen($phpbb_root_path . 'cache/install_lock', 'wb');
@@ -888,7 +883,7 @@ class install_install extends module
@chmod($phpbb_root_path . 'cache/install_lock', 0777);
// Time to convert the data provided into a config file
- $config_data = phpbb_create_config_file_data($data, $available_dbms[$data['dbms']]['DRIVER'], $load_extensions);
+ $config_data = phpbb_create_config_file_data($data, $available_dbms[$data['dbms']]['DRIVER']);
// Attempt to write out the config file directly. If it works, this is the easiest way to do it ...
if ((file_exists($phpbb_root_path . 'config.' . $phpEx) && phpbb_is_writable($phpbb_root_path . 'config.' . $phpEx)) || phpbb_is_writable($phpbb_root_path))
@@ -984,7 +979,7 @@ class install_install extends module
*/
function obtain_advanced_settings($mode, $sub)
{
- global $lang, $template, $phpEx;
+ global $lang, $template, $phpEx, $request;
$this->page_title = $lang['STAGE_ADVANCED'];
@@ -1002,7 +997,7 @@ class install_install extends module
$s_hidden_fields .= '<input type="hidden" name="language" value="' . $data['language'] . '" />';
// HTTP_HOST is having the correct browser url in most cases...
- $server_name = (!empty($_SERVER['HTTP_HOST'])) ? strtolower($_SERVER['HTTP_HOST']) : ((!empty($_SERVER['SERVER_NAME'])) ? $_SERVER['SERVER_NAME'] : getenv('SERVER_NAME'));
+ $server_name = strtolower(htmlspecialchars_decode($request->header('Host', $request->server('SERVER_NAME'))));
// HTTP HOST can carry a port number...
if (strpos($server_name, ':') !== false)
@@ -1012,16 +1007,16 @@ class install_install extends module
$data['email_enable'] = ($data['email_enable'] !== '') ? $data['email_enable'] : true;
$data['server_name'] = ($data['server_name'] !== '') ? $data['server_name'] : $server_name;
- $data['server_port'] = ($data['server_port'] !== '') ? $data['server_port'] : ((!empty($_SERVER['SERVER_PORT'])) ? (int) $_SERVER['SERVER_PORT'] : (int) getenv('SERVER_PORT'));
- $data['server_protocol'] = ($data['server_protocol'] !== '') ? $data['server_protocol'] : ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? 'https://' : 'http://');
- $data['cookie_secure'] = ($data['cookie_secure'] !== '') ? $data['cookie_secure'] : ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? true : false);
+ $data['server_port'] = ($data['server_port'] !== '') ? $data['server_port'] : $request->server('SERVER_PORT', 0);
+ $data['server_protocol'] = ($data['server_protocol'] !== '') ? $data['server_protocol'] : ($request->is_secure() ? 'https://' : 'http://');
+ $data['cookie_secure'] = ($data['cookie_secure'] !== '') ? $data['cookie_secure'] : $request->is_secure();
if ($data['script_path'] === '')
{
- $name = (!empty($_SERVER['PHP_SELF'])) ? $_SERVER['PHP_SELF'] : getenv('PHP_SELF');
+ $name = htmlspecialchars_decode($request->server('PHP_SELF'));
if (!$name)
{
- $name = (!empty($_SERVER['REQUEST_URI'])) ? $_SERVER['REQUEST_URI'] : getenv('REQUEST_URI');
+ $name = htmlspecialchars_decode($request->server('REQUEST_URI'));
}
// Replace backslashes and doubled slashes (could happen on some proxy setups)
@@ -1086,7 +1081,7 @@ class install_install extends module
*/
function load_schema($mode, $sub)
{
- global $db, $lang, $template, $phpbb_root_path, $phpEx;
+ global $db, $lang, $template, $phpbb_root_path, $phpEx, $request;
$this->page_title = $lang['STAGE_CREATE_TABLE'];
$s_hidden_fields = '';
@@ -1102,8 +1097,8 @@ class install_install extends module
}
// HTTP_HOST is having the correct browser url in most cases...
- $server_name = (!empty($_SERVER['HTTP_HOST'])) ? strtolower($_SERVER['HTTP_HOST']) : ((!empty($_SERVER['SERVER_NAME'])) ? $_SERVER['SERVER_NAME'] : getenv('SERVER_NAME'));
- $referer = (!empty($_SERVER['HTTP_REFERER'])) ? strtolower($_SERVER['HTTP_REFERER']) : getenv('HTTP_REFERER');
+ $server_name = strtolower(htmlspecialchars_decode($request->header('Host', $request->server('SERVER_NAME'))));
+ $referer = strtolower($request->header('Referer'));
// HTTP HOST can carry a port number...
if (strpos($server_name, ':') !== false)
@@ -1130,11 +1125,8 @@ class install_install extends module
$dbms = $available_dbms[$data['dbms']]['DRIVER'];
- // Load the appropriate database class if not already loaded
- include($phpbb_root_path . 'includes/db/' . $dbms . '.' . $phpEx);
-
// Instantiate the database
- $db = new $sql_db();
+ $db = new $dbms();
$db->sql_connect($data['dbhost'], $data['dbuser'], htmlspecialchars_decode($data['dbpasswd']), $data['dbname'], $data['dbport'], false, false);
// NOTE: trigger_error does not work here.
@@ -1159,13 +1151,9 @@ class install_install extends module
// How should we treat this schema?
$delimiter = $available_dbms[$data['dbms']]['DELIM'];
-
$sql_query = @file_get_contents($dbms_schema);
-
$sql_query = preg_replace('#phpbb_#i', $data['table_prefix'], $sql_query);
-
$sql_query = phpbb_remove_comments($sql_query);
-
$sql_query = split_sql_file($sql_query, $delimiter);
foreach ($sql_query as $sql)
@@ -1179,10 +1167,31 @@ class install_install extends module
}
unset($sql_query);
+ // Ok we have the db info go ahead and work on building the table
+ $db_table_schema = @file_get_contents('schemas/schema.json');
+ $db_table_schema = json_decode($db_table_schema, true);
+
+ if (!defined('CONFIG_TABLE'))
+ {
+ // CONFIG_TABLE is required by sql_create_index() to check the
+ // length of index names. However table_prefix is not defined
+ // here yet, so we need to create the constant ourselves.
+ define('CONFIG_TABLE', $data['table_prefix'] . 'config');
+ }
+
+ $db_tools = new \phpbb\db\tools($db);
+ foreach ($db_table_schema as $table_name => $table_data)
+ {
+ $db_tools->sql_create_table(
+ $data['table_prefix'] . substr($table_name, 6),
+ $table_data
+ );
+ }
+
// Ok tables have been built, let's fill in the basic information
$sql_query = file_get_contents('schemas/schema_data.sql');
- // Deal with any special comments
+ // Deal with any special comments and characters
switch ($data['dbms'])
{
case 'mssql':
@@ -1194,6 +1203,11 @@ class install_install extends module
case 'postgres':
$sql_query = preg_replace('#\# POSTGRES (BEGIN|COMMIT) \##s', '\1; ', $sql_query);
break;
+
+ case 'mysql':
+ case 'mysqli':
+ $sql_query = str_replace('\\', '\\\\', $sql_query);
+ break;
}
// Change prefix
@@ -1218,8 +1232,7 @@ class install_install extends module
$current_time = time();
- $user_ip = (!empty($_SERVER['REMOTE_ADDR'])) ? htmlspecialchars($_SERVER['REMOTE_ADDR']) : '';
- $user_ip = (stripos($user_ip, '::ffff:') === 0) ? substr($user_ip, 7) : $user_ip;
+ $user_ip = $request->server('REMOTE_ADDR') ? phpbb_ip_normalise($request->server('REMOTE_ADDR')) : '';
if ($data['script_path'] !== '/')
{
@@ -1258,11 +1271,11 @@ class install_install extends module
WHERE config_name = 'server_port'",
'UPDATE ' . $data['table_prefix'] . "config
- SET config_value = '" . $db->sql_escape($data['board_email1']) . "'
+ SET config_value = '" . $db->sql_escape($data['board_email']) . "'
WHERE config_name = 'board_email'",
'UPDATE ' . $data['table_prefix'] . "config
- SET config_value = '" . $db->sql_escape($data['board_email1']) . "'
+ SET config_value = '" . $db->sql_escape($data['board_email']) . "'
WHERE config_name = 'board_contact'",
'UPDATE ' . $data['table_prefix'] . "config
@@ -1321,8 +1334,12 @@ class install_install extends module
SET config_value = '" . md5(mt_rand()) . "'
WHERE config_name = 'avatar_salt'",
+ 'UPDATE ' . $data['table_prefix'] . "config
+ SET config_value = '" . md5(mt_rand()) . "'
+ WHERE config_name = 'plupload_salt'",
+
'UPDATE ' . $data['table_prefix'] . "users
- SET username = '" . $db->sql_escape($data['admin_name']) . "', user_password='" . $db->sql_escape(md5($data['admin_pass1'])) . "', user_ip = '" . $db->sql_escape($user_ip) . "', user_lang = '" . $db->sql_escape($data['default_lang']) . "', user_email='" . $db->sql_escape($data['board_email1']) . "', user_dateformat='" . $db->sql_escape($lang['default_dateformat']) . "', user_email_hash = " . $db->sql_escape(phpbb_email_hash($data['board_email1'])) . ", username_clean = '" . $db->sql_escape(utf8_clean_string($data['admin_name'])) . "'
+ SET username = '" . $db->sql_escape($data['admin_name']) . "', user_password='" . $db->sql_escape(md5($data['admin_pass1'])) . "', user_ip = '" . $db->sql_escape($user_ip) . "', user_lang = '" . $db->sql_escape($data['default_lang']) . "', user_email='" . $db->sql_escape($data['board_email']) . "', user_dateformat='" . $db->sql_escape($lang['default_dateformat']) . "', user_email_hash = " . $db->sql_escape(phpbb_email_hash($data['board_email'])) . ", username_clean = '" . $db->sql_escape(utf8_clean_string($data['admin_name'])) . "'
WHERE username = 'Admin'",
'UPDATE ' . $data['table_prefix'] . "moderator_cache
@@ -1355,7 +1372,7 @@ class install_install extends module
WHERE config_name = 'dbms_version'",
);
- if (@extension_loaded('gd') || can_load_dll('gd'))
+ if (@extension_loaded('gd'))
{
$sql_ary[] = 'UPDATE ' . $data['table_prefix'] . "config
SET config_value = 'phpbb_captcha_gd'
@@ -1414,7 +1431,7 @@ class install_install extends module
*/
function build_search_index($mode, $sub)
{
- global $db, $lang, $phpbb_root_path, $phpEx, $config;
+ global $db, $lang, $phpbb_root_path, $phpEx, $config, $auth, $user;
// Obtain any submitted data
$data = $this->get_submitted_data();
@@ -1431,33 +1448,23 @@ class install_install extends module
$dbms = $available_dbms[$data['dbms']]['DRIVER'];
- // Load the appropriate database class if not already loaded
- include($phpbb_root_path . 'includes/db/' . $dbms . '.' . $phpEx);
-
// Instantiate the database
- $db = new $sql_db();
+ $db = new $dbms();
$db->sql_connect($data['dbhost'], $data['dbuser'], htmlspecialchars_decode($data['dbpasswd']), $data['dbname'], $data['dbport'], false, false);
// NOTE: trigger_error does not work here.
$db->sql_return_on_error(true);
include_once($phpbb_root_path . 'includes/constants.' . $phpEx);
- include_once($phpbb_root_path . 'includes/search/fulltext_native.' . $phpEx);
-
- // Fill the config array - it is needed by those functions we call
- $sql = 'SELECT *
- FROM ' . CONFIG_TABLE;
- $result = $db->sql_query($sql);
+ include_once($phpbb_root_path . 'phpbb/search/fulltext_native.' . $phpEx);
- $config = array();
- while ($row = $db->sql_fetchrow($result))
- {
- $config[$row['config_name']] = $row['config_value'];
- }
- $db->sql_freeresult($result);
+ // We need to fill the config to let internal functions correctly work
+ $config = new \phpbb\config\db($db, new \phpbb\cache\driver\null, CONFIG_TABLE);
+ set_config(null, null, null, $config);
+ set_config_count(null, null, null, $config);
$error = false;
- $search = new fulltext_native($error);
+ $search = new \phpbb\search\fulltext_native($error, $phpbb_root_path, $phpEx, $auth, $config, $db, $user);
$sql = 'SELECT post_id, post_subject, post_text, poster_id, forum_id
FROM ' . POSTS_TABLE;
@@ -1475,7 +1482,13 @@ class install_install extends module
*/
function add_modules($mode, $sub)
{
- global $db, $lang, $phpbb_root_path, $phpEx;
+ global $db, $lang, $phpbb_root_path, $phpEx, $phpbb_extension_manager, $config, $phpbb_container;
+
+ // modules require an extension manager
+ if (empty($phpbb_extension_manager))
+ {
+ $phpbb_extension_manager = $phpbb_container->get('ext.manager');
+ }
include_once($phpbb_root_path . 'includes/acp/acp_modules.' . $phpEx);
@@ -1492,8 +1505,14 @@ class install_install extends module
foreach ($this->module_categories[$module_class] as $cat_name => $subs)
{
+ $basename = '';
+ // Check if this sub-category has a basename. If it has, use it.
+ if (isset($this->module_categories_basenames[$cat_name]))
+ {
+ $basename = $this->module_categories_basenames[$cat_name];
+ }
$module_data = array(
- 'module_basename' => '',
+ 'module_basename' => $basename,
'module_enabled' => 1,
'module_display' => 1,
'parent_id' => 0,
@@ -1521,8 +1540,14 @@ class install_install extends module
{
foreach ($subs as $level2_name)
{
+ $basename = '';
+ // Check if this sub-category has a basename. If it has, use it.
+ if (isset($this->module_categories_basenames[$level2_name]))
+ {
+ $basename = $this->module_categories_basenames[$level2_name];
+ }
$module_data = array(
- 'module_basename' => '',
+ 'module_basename' => $basename,
'module_enabled' => 1,
'module_display' => 1,
'parent_id' => (int) $categories[$cat_name]['id'],
@@ -1590,7 +1615,7 @@ class install_install extends module
// Move main module 4 up...
$sql = 'SELECT *
FROM ' . MODULES_TABLE . "
- WHERE module_basename = 'main'
+ WHERE module_basename = 'acp_main'
AND module_class = 'acp'
AND module_mode = 'main'";
$result = $db->sql_query($sql);
@@ -1602,7 +1627,7 @@ class install_install extends module
// Move permissions intro screen module 4 up...
$sql = 'SELECT *
FROM ' . MODULES_TABLE . "
- WHERE module_basename = 'permissions'
+ WHERE module_basename = 'acp_permissions'
AND module_class = 'acp'
AND module_mode = 'intro'";
$result = $db->sql_query($sql);
@@ -1614,7 +1639,7 @@ class install_install extends module
// Move manage users screen module 5 up...
$sql = 'SELECT *
FROM ' . MODULES_TABLE . "
- WHERE module_basename = 'users'
+ WHERE module_basename = 'acp_users'
AND module_class = 'acp'
AND module_mode = 'overview'";
$result = $db->sql_query($sql);
@@ -1629,7 +1654,7 @@ class install_install extends module
// Move attachment module 4 down...
$sql = 'SELECT *
FROM ' . MODULES_TABLE . "
- WHERE module_basename = 'attachments'
+ WHERE module_basename = 'ucp_attachments'
AND module_class = 'ucp'
AND module_mode = 'attachments'";
$result = $db->sql_query($sql);
@@ -1705,6 +1730,7 @@ class install_install extends module
$this->error('Unable to access the language directory', __LINE__, __FILE__);
}
+ $installed_languages = array();
while (($file = readdir($dir)) !== false)
{
$path = $phpbb_root_path . 'language/' . $file;
@@ -1728,80 +1754,38 @@ class install_install extends module
$db->sql_query('INSERT INTO ' . LANG_TABLE . ' ' . $db->sql_build_array('INSERT', $lang_pack));
+ $installed_languages[] = (int) $db->sql_nextid();
if ($db->sql_error_triggered)
{
$error = $db->sql_error($db->sql_error_sql);
$this->p_master->db_error($error['message'], $db->sql_error_sql, __LINE__, __FILE__);
}
+ }
+ }
+ closedir($dir);
- $valid_localized = array(
- 'icon_back_top', 'icon_contact_aim', 'icon_contact_email', 'icon_contact_icq', 'icon_contact_jabber', 'icon_contact_msnm', 'icon_contact_pm', 'icon_contact_yahoo', 'icon_contact_www', 'icon_post_delete', 'icon_post_edit', 'icon_post_info', 'icon_post_quote', 'icon_post_report', 'icon_user_online', 'icon_user_offline', 'icon_user_profile', 'icon_user_search', 'icon_user_warn', 'button_pm_forward', 'button_pm_new', 'button_pm_reply', 'button_topic_locked', 'button_topic_new', 'button_topic_reply',
- );
-
- $sql_ary = array();
-
- $sql = 'SELECT *
- FROM ' . STYLES_IMAGESET_TABLE;
- $result = $db->sql_query($sql);
-
- while ($imageset_row = $db->sql_fetchrow($result))
- {
- if (@file_exists("{$phpbb_root_path}styles/{$imageset_row['imageset_path']}/imageset/{$lang_pack['lang_iso']}/imageset.cfg"))
- {
- $cfg_data_imageset_data = parse_cfg_file("{$phpbb_root_path}styles/{$imageset_row['imageset_path']}/imageset/{$lang_pack['lang_iso']}/imageset.cfg");
- foreach ($cfg_data_imageset_data as $image_name => $value)
- {
- if (strpos($value, '*') !== false)
- {
- if (substr($value, -1, 1) === '*')
- {
- list($image_filename, $image_height) = explode('*', $value);
- $image_width = 0;
- }
- else
- {
- list($image_filename, $image_height, $image_width) = explode('*', $value);
- }
- }
- else
- {
- $image_filename = $value;
- $image_height = $image_width = 0;
- }
-
- if (strpos($image_name, 'img_') === 0 && $image_filename)
- {
- $image_name = substr($image_name, 4);
- if (in_array($image_name, $valid_localized))
- {
- $sql_ary[] = array(
- 'image_name' => (string) $image_name,
- 'image_filename' => (string) $image_filename,
- 'image_height' => (int) $image_height,
- 'image_width' => (int) $image_width,
- 'imageset_id' => (int) $imageset_row['imageset_id'],
- 'image_lang' => (string) $lang_pack['lang_iso'],
- );
- }
- }
- }
- }
- }
- $db->sql_freeresult($result);
-
- if (sizeof($sql_ary))
- {
- $db->sql_multi_insert(STYLES_IMAGESET_DATA_TABLE, $sql_ary);
+ $sql = 'SELECT *
+ FROM ' . PROFILE_FIELDS_TABLE;
+ $result = $db->sql_query($sql);
- if ($db->sql_error_triggered)
- {
- $error = $db->sql_error($db->sql_error_sql);
- $this->p_master->db_error($error['message'], $db->sql_error_sql, __LINE__, __FILE__);
- }
- }
+ $profile_fields = array();
+ $insert_buffer = new \phpbb\db\sql_insert_buffer($db, PROFILE_LANG_TABLE);
+ while ($row = $db->sql_fetchrow($result))
+ {
+ foreach ($installed_languages as $lang_id)
+ {
+ $insert_buffer->insert(array(
+ 'field_id' => $row['field_id'],
+ 'lang_id' => $lang_id,
+ 'lang_name' => strtoupper(substr($row['field_name'], 6)),// Remove phpbb_ from field name
+ 'lang_explain' => '',
+ 'lang_default_value' => '',
+ ));
}
}
- closedir($dir);
+ $db->sql_freeresult($result);
+
+ $insert_buffer->flush();
}
/**
@@ -1814,17 +1798,10 @@ class install_install extends module
// Obtain any submitted data
$data = $this->get_submitted_data();
- // Fill the config array - it is needed by those functions we call
- $sql = 'SELECT *
- FROM ' . CONFIG_TABLE;
- $result = $db->sql_query($sql);
-
- $config = array();
- while ($row = $db->sql_fetchrow($result))
- {
- $config[$row['config_name']] = $row['config_value'];
- }
- $db->sql_freeresult($result);
+ // We need to fill the config to let internal functions correctly work
+ $config = new \phpbb\config\db($db, new \phpbb\cache\driver\null, CONFIG_TABLE);
+ set_config(null, null, null, $config);
+ set_config_count(null, null, null, $config);
$sql = 'SELECT group_id
FROM ' . GROUPS_TABLE . "
@@ -1856,7 +1833,7 @@ class install_install extends module
'user_email' => '',
'user_lang' => $data['default_lang'],
'user_style' => 1,
- 'user_timezone' => 0,
+ 'user_timezone' => 'UTC',
'user_dateformat' => $lang['default_dateformat'],
'user_allow_massemail' => 0,
'user_allow_pm' => 0,
@@ -1888,23 +1865,17 @@ class install_install extends module
*/
function email_admin($mode, $sub)
{
- global $auth, $config, $db, $lang, $template, $user, $phpbb_root_path, $phpEx;
+ global $auth, $config, $db, $lang, $template, $user, $phpbb_root_path, $phpbb_admin_path, $phpEx;
$this->page_title = $lang['STAGE_FINAL'];
// Obtain any submitted data
$data = $this->get_submitted_data();
- $sql = 'SELECT *
- FROM ' . CONFIG_TABLE;
- $result = $db->sql_query($sql);
-
- $config = array();
- while ($row = $db->sql_fetchrow($result))
- {
- $config[$row['config_name']] = $row['config_value'];
- }
- $db->sql_freeresult($result);
+ // We need to fill the config to let internal functions correctly work
+ $config = new \phpbb\config\db($db, new \phpbb\cache\driver\null, CONFIG_TABLE);
+ set_config(null, null, null, $config);
+ set_config_count(null, null, null, $config);
$user->session_begin();
$auth->login($data['admin_name'], $data['admin_pass1'], false, true, true);
@@ -1922,7 +1893,7 @@ class install_install extends module
$messenger->template('installed', $data['language']);
- $messenger->to($data['board_email1'], $data['admin_name']);
+ $messenger->to($data['board_email'], $data['admin_name']);
$messenger->anti_abuse_headers($config, $user);
@@ -1941,7 +1912,7 @@ class install_install extends module
'TITLE' => $lang['INSTALL_CONGRATS'],
'BODY' => sprintf($lang['INSTALL_CONGRATS_EXPLAIN'], $config['version'], append_sid($phpbb_root_path . 'install/index.' . $phpEx, 'mode=convert&amp;language=' . $data['language']), '../docs/README.html'),
'L_SUBMIT' => $lang['INSTALL_LOGIN'],
- 'U_ACTION' => append_sid($phpbb_root_path . 'adm/index.' . $phpEx, 'i=send_statistics&amp;mode=send_statistics'),
+ 'U_ACTION' => append_sid($phpbb_admin_path . 'index.' . $phpEx, 'i=send_statistics&amp;mode=send_statistics'),
));
}
@@ -1961,6 +1932,26 @@ class install_install extends module
}
/**
+ * Populate migrations for the installation
+ *
+ * This "installs" all migrations from (root path)/phpbb/db/migrations/data.
+ * "installs" means it adds all migrations to the migrations table, but does not
+ * perform any of the actions in the migrations.
+ *
+ * @param \phpbb\extension\manager $extension_manager
+ * @param \phpbb\db\migrator $migrator
+ */
+ function populate_migrations($extension_manager, $migrator)
+ {
+ $finder = $extension_manager->get_finder();
+
+ $migrations = $finder
+ ->core_path('phpbb/db/migration/data/')
+ ->get_classes();
+ $migrator->populate_migrations($migrations);
+ }
+
+ /**
* Generate a list of available mail server authentication methods
*/
function mail_auth_select($selected_method)
@@ -1996,8 +1987,7 @@ class install_install extends module
'admin_name' => utf8_normalize_nfc(request_var('admin_name', '', true)),
'admin_pass1' => request_var('admin_pass1', '', true),
'admin_pass2' => request_var('admin_pass2', '', true),
- 'board_email1' => strtolower(request_var('board_email1', '')),
- 'board_email2' => strtolower(request_var('board_email2', '')),
+ 'board_email' => strtolower(request_var('board_email', '')),
'img_imagick' => request_var('img_imagick', ''),
'ftp_path' => request_var('ftp_path', ''),
'ftp_user' => request_var('ftp_user', ''),
@@ -2036,8 +2026,7 @@ class install_install extends module
'admin_name' => array('lang' => 'ADMIN_USERNAME', 'type' => 'text:25:100', 'explain' => true),
'admin_pass1' => array('lang' => 'ADMIN_PASSWORD', 'type' => 'password:25:100', 'explain' => true),
'admin_pass2' => array('lang' => 'ADMIN_PASSWORD_CONFIRM', 'type' => 'password:25:100', 'explain' => false),
- 'board_email1' => array('lang' => 'CONTACT_EMAIL', 'type' => 'text:25:100', 'explain' => false),
- 'board_email2' => array('lang' => 'CONTACT_EMAIL_CONFIRM', 'type' => 'text:25:100', 'explain' => false),
+ 'board_email' => array('lang' => 'CONTACT_EMAIL', 'type' => 'email:25:100', 'explain' => false),
);
var $advanced_config_options = array(
'legend1' => 'ACP_EMAIL_SETTINGS',
@@ -2178,9 +2167,10 @@ class install_install extends module
'ACP_PERMISSION_ROLES',
'ACP_PERMISSION_MASKS',
),
- 'ACP_CAT_STYLES' => array(
+ 'ACP_CAT_CUSTOMISE' => array(
'ACP_STYLE_MANAGEMENT',
- 'ACP_STYLE_COMPONENTS',
+ 'ACP_EXTENSION_MANAGEMENT',
+ 'ACP_LANGUAGE',
),
'ACP_CAT_MAINTENANCE' => array(
'ACP_FORUM_LOGS',
@@ -2211,6 +2201,9 @@ class install_install extends module
'UCP_ZEBRA' => null,
),
);
+ var $module_categories_basenames = array(
+ 'UCP_PM' => 'ucp_pm',
+ );
var $module_extras = array(
'acp' => array(
@@ -2232,5 +2225,3 @@ class install_install extends module
),
);
}
-
-?> \ No newline at end of file
diff --git a/phpBB/install/install_main.php b/phpBB/install/install_main.php
index e9f35efa1d..974b006db3 100644
--- a/phpBB/install/install_main.php
+++ b/phpBB/install/install_main.php
@@ -2,9 +2,8 @@
/**
*
* @package install
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -74,5 +73,3 @@ class install_main extends module
));
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/install/install_update.php b/phpBB/install/install_update.php
index 2f3ee1c55a..87b7d8d703 100644
--- a/phpBB/install/install_update.php
+++ b/phpBB/install/install_update.php
@@ -2,9 +2,8 @@
/**
*
* @package install
-* @version $Id$
* @copyright (c) 2006 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
* @todo check for writable cache/store/files directory
*/
@@ -20,16 +19,7 @@ if (!defined('IN_INSTALL'))
if (!empty($setmodules))
{
// If phpBB is not installed we do not include this module
- if (@file_exists($phpbb_root_path . 'config.' . $phpEx) && !@file_exists($phpbb_root_path . 'cache/install_lock'))
- {
- include_once($phpbb_root_path . 'config.' . $phpEx);
-
- if (!defined('PHPBB_INSTALLED'))
- {
- return;
- }
- }
- else
+ if (!phpbb_check_installation_exists($phpbb_root_path, $phpEx) || file_exists($phpbb_root_path . 'cache/install_lock'))
{
return;
}
@@ -40,7 +30,7 @@ if (!empty($setmodules))
'module_filename' => substr(basename(__FILE__), 0, -strlen($phpEx)-1),
'module_order' => 30,
'module_subs' => '',
- 'module_stages' => array('INTRO', 'VERSION_CHECK', 'UPDATE_DB', 'FILE_CHECK', 'UPDATE_FILES'),
+ 'module_stages' => array('INTRO', 'VERSION_CHECK', 'FILE_CHECK', 'UPDATE_FILES', 'UPDATE_DB'),
'module_reqs' => ''
);
}
@@ -72,6 +62,25 @@ class install_update extends module
function main($mode, $sub)
{
global $template, $phpEx, $phpbb_root_path, $user, $db, $config, $cache, $auth, $language;
+ global $request, $phpbb_admin_path, $phpbb_adm_relative_path, $phpbb_container;
+
+ // We must enable super globals, otherwise creating a new instance of the request class,
+ // using the new container with a dbal connection will fail with the following PHP Notice:
+ // Object of class phpbb_request_deactivated_super_global could not be converted to int
+ $request->enable_super_globals();
+
+ // Create a normal container now
+ if (file_exists($phpbb_root_path . 'install/update/new/config'))
+ {
+ $phpbb_container = phpbb_create_update_container($phpbb_root_path, $phpEx, $phpbb_root_path . 'install/update/new/config');
+ }
+ else
+ {
+ $phpbb_container = phpbb_create_update_container($phpbb_root_path, $phpEx, $phpbb_root_path . 'config');
+ }
+
+ // Writes into global $cache
+ $cache = $phpbb_container->get('cache');
$this->tpl_name = 'install_update';
$this->page_title = 'UPDATE_INSTALLATION';
@@ -81,7 +90,6 @@ class install_update extends module
// Init DB
require($phpbb_root_path . 'config.' . $phpEx);
- require($phpbb_root_path . 'includes/db/' . $dbms . '.' . $phpEx);
require($phpbb_root_path . 'includes/constants.' . $phpEx);
// Special options for conflicts/modified files
@@ -90,7 +98,9 @@ class install_update extends module
define('MERGE_NEW_FILE', 3);
define('MERGE_MOD_FILE', 4);
- $db = new $sql_db();
+ $dbms = phpbb_convert_30_dbms_to_31($dbms);
+
+ $db = new $dbms();
// Connect to DB
$db->sql_connect($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, false, false);
@@ -98,17 +108,10 @@ class install_update extends module
// We do not need this any longer, unset for safety purposes
unset($dbpasswd);
- $config = array();
-
- $sql = 'SELECT config_name, config_value
- FROM ' . CONFIG_TABLE;
- $result = $db->sql_query($sql);
-
- while ($row = $db->sql_fetchrow($result))
- {
- $config[$row['config_name']] = $row['config_value'];
- }
- $db->sql_freeresult($result);
+ // We need to fill the config to let internal functions correctly work
+ $config = new \phpbb\config\db($db, new \phpbb\cache\driver\null, CONFIG_TABLE);
+ set_config(null, null, null, $config);
+ set_config_count(null, null, null, $config);
// Force template recompile
$config['load_tplcompile'] = 1;
@@ -123,7 +126,7 @@ class install_update extends module
$config['default_lang'] = $language;
$user->data['user_lang'] = $language;
- $user->setup(array('common', 'acp/common', 'acp/board', 'install', 'posting'));
+ $user->add_lang(array('common', 'acp/common', 'acp/board', 'install', 'posting'));
// Reset the default_lang
$config['default_lang'] = $config_default_lang;
@@ -136,10 +139,9 @@ class install_update extends module
}
// Set custom template again. ;)
- $template->set_custom_template('../adm/style', 'admin');
-
- // still, the acp template is never stored in the database
- $user->theme['template_storedb'] = false;
+ $paths = array($phpbb_root_path . 'install/update/new/adm/style', $phpbb_admin_path . 'style');
+ $paths = array_filter($paths, 'is_dir');
+ $template->set_custom_style('adm', $paths);
$template->assign_vars(array(
'S_USER_LANG' => $user->lang['USER_LANG'],
@@ -150,14 +152,23 @@ class install_update extends module
));
// Get current and latest version
- if (($latest_version = $cache->get('_version_info')) === false)
+ $version_helper = $phpbb_container->get('version_helper');
+ try
{
- $this->latest_version = $this->get_file('version_info');
- $cache->put('_version_info', $this->latest_version);
+ $this->latest_version = $version_helper->get_latest_on_current_branch(true);
}
- else
+ catch (\RuntimeException $e)
{
- $this->latest_version = $latest_version;
+ $this->latest_version = false;
+
+ $update_info = array();
+ include($phpbb_root_path . 'install/update/index.' . $phpEx);
+ $info = (empty($update_info) || !is_array($update_info)) ? false : $update_info;
+
+ if ($info !== false)
+ {
+ $this->latest_version = (!empty($info['version']['to'])) ? trim($info['version']['to']) : false;
+ }
}
// For the current version we trick a bit. ;)
@@ -219,12 +230,6 @@ class install_update extends module
if ($this->test_update === false)
{
- // Got the updater template itself updated? If so, we are able to directly use it - but only if all three files are present
- if (in_array('adm/style/install_update.html', $this->update_info['files']))
- {
- $this->tpl_name = '../../install/update/new/adm/style/install_update';
- }
-
// What about the language file? Got it updated?
if (in_array('language/' . $language . '/install.' . $phpEx, $this->update_info['files']))
{
@@ -252,7 +257,7 @@ class install_update extends module
$this->include_file('includes/diff/renderer.' . $phpEx);
// Make sure we stay at the file check if checking the files again
- if (!empty($_POST['check_again']))
+ if ($request->variable('check_again', false, false, \phpbb\request\request_interface::POST))
{
$sub = $this->p_master->sub = 'file_check';
}
@@ -277,15 +282,14 @@ class install_update extends module
$this->page_title = 'STAGE_VERSION_CHECK';
$template->assign_vars(array(
- 'S_UP_TO_DATE' => $up_to_date,
'S_VERSION_CHECK' => true,
- 'U_ACTION' => append_sid($this->p_master->module_url, "language=$language&amp;mode=$mode&amp;sub=file_check"),
- 'U_DB_UPDATE_ACTION' => append_sid($this->p_master->module_url, "language=$language&amp;mode=$mode&amp;sub=update_db"),
+ 'U_ACTION' => append_sid($this->p_master->module_url, "language=$language&amp;mode=$mode&amp;sub=file_check"),
+ 'S_UP_TO_DATE' => $up_to_date,
'LATEST_VERSION' => $this->latest_version,
- 'CURRENT_VERSION' => $this->current_version)
- );
+ 'CURRENT_VERSION' => $this->current_version,
+ ));
// Print out version the update package updates to
if ($this->latest_version != $this->update_info['version']['to'])
@@ -306,30 +310,6 @@ class install_update extends module
break;
case 'update_db':
-
- // Make sure the database update is valid for the latest version
- $valid = false;
- $updates_to_version = '';
-
- if (file_exists($phpbb_root_path . 'install/database_update.' . $phpEx))
- {
- include_once($phpbb_root_path . 'install/database_update.' . $phpEx);
-
- if ($updates_to_version === $this->update_info['version']['to'])
- {
- $valid = true;
- }
- }
-
- // Should not happen at all
- if (!$valid)
- {
- trigger_error($user->lang['DATABASE_UPDATE_INFO_OLD'], E_USER_ERROR);
- }
-
- // Just a precaution
- $cache->purge();
-
// Redirect the user to the database update script with some explanations...
$template->assign_vars(array(
'S_DB_UPDATE' => true,
@@ -337,8 +317,14 @@ class install_update extends module
'U_DB_UPDATE' => append_sid($phpbb_root_path . 'install/database_update.' . $phpEx, 'type=1&amp;language=' . $user->data['user_lang']),
'U_DB_UPDATE_ACTION' => append_sid($this->p_master->module_url, "language=$language&amp;mode=$mode&amp;sub=update_db"),
'U_ACTION' => append_sid($this->p_master->module_url, "language=$language&amp;mode=$mode&amp;sub=file_check"),
+ 'L_EVERYTHING_UP_TO_DATE' => $user->lang('EVERYTHING_UP_TO_DATE', append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=login'), append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=login&amp;redirect=' . $phpbb_adm_relative_path . 'index.php%3Fi=send_statistics%26mode=send_statistics')),
));
+ // Do not display incompatible package note after successful update
+ if ($config['version'] == $this->update_info['version']['to'])
+ {
+ $template->assign_var('S_ERROR', false);
+ }
break;
case 'file_check':
@@ -359,8 +345,8 @@ class install_update extends module
$action = request_var('action', '');
// We are directly within an update. To make sure our update list is correct we check its status.
- $update_list = (!empty($_POST['check_again'])) ? false : $cache->get('_update_list');
- $modified = ($update_list !== false) ? @filemtime($cache->cache_dir . 'data_update_list.' . $phpEx) : 0;
+ $update_list = ($request->variable('check_again', false, false, \phpbb\request\request_interface::POST)) ? false : $cache->get('_update_list');
+ $modified = ($update_list !== false) ? @filemtime($cache->get_driver()->cache_dir . 'data_update_list.' . $phpEx) : 0;
// Make sure the list is up-to-date
if ($update_list !== false)
@@ -505,65 +491,29 @@ class install_update extends module
'S_FILE_CHECK' => true,
'S_ALL_UP_TO_DATE' => $all_up_to_date,
'S_VERSION_UP_TO_DATE' => $up_to_date,
+ 'S_UP_TO_DATE' => $up_to_date,
'U_ACTION' => append_sid($this->p_master->module_url, "language=$language&amp;mode=$mode&amp;sub=file_check"),
'U_UPDATE_ACTION' => append_sid($this->p_master->module_url, "language=$language&amp;mode=$mode&amp;sub=update_files"),
'U_DB_UPDATE_ACTION' => append_sid($this->p_master->module_url, "language=$language&amp;mode=$mode&amp;sub=update_db"),
));
- if ($all_up_to_date)
+ // Since some people try to update to RC releases, but phpBB.com tells them the last version is the version they currently run
+ // we are faced with the updater thinking the database schema is up-to-date; which it is, but should be updated none-the-less
+ // We now try to cope with this by triggering the update process
+ if (version_compare(str_replace('rc', 'RC', strtolower($this->current_version)), str_replace('rc', 'RC', strtolower($this->update_info['version']['to'])), '<'))
{
- // Add database update to log
- add_log('admin', 'LOG_UPDATE_PHPBB', $this->current_version, $this->update_to_version);
-
- // Refresh prosilver css data - this may cause some unhappy users, but
- $sql = 'SELECT *
- FROM ' . STYLES_THEME_TABLE . "
- WHERE LOWER(theme_name) = 'prosilver'";
- $result = $db->sql_query($sql);
- $theme = $db->sql_fetchrow($result);
- $db->sql_freeresult($result);
-
- if ($theme)
- {
- $recache = (empty($theme['theme_data'])) ? true : false;
- $update_time = time();
-
- // We test for stylesheet.css because it is faster and most likely the only file changed on common themes
- if (!$recache && $theme['theme_mtime'] < @filemtime("{$phpbb_root_path}styles/" . $theme['theme_path'] . '/theme/stylesheet.css'))
- {
- $recache = true;
- $update_time = @filemtime("{$phpbb_root_path}styles/" . $theme['theme_path'] . '/theme/stylesheet.css');
- }
- else if (!$recache)
- {
- $last_change = $theme['theme_mtime'];
- $dir = @opendir("{$phpbb_root_path}styles/{$theme['theme_path']}/theme");
-
- if ($dir)
- {
- while (($entry = readdir($dir)) !== false)
- {
- if (substr(strrchr($entry, '.'), 1) == 'css' && $last_change < @filemtime("{$phpbb_root_path}styles/{$theme['theme_path']}/theme/{$entry}"))
- {
- $recache = true;
- break;
- }
- }
- closedir($dir);
- }
- }
+ $template->assign_vars(array(
+ 'S_UP_TO_DATE' => false,
+ ));
+ }
- if ($recache)
- {
- // Instead of re-caching here, we simply remove theme_data... HAR HAR HAR (think about a carribean pirate)
- $sql = 'UPDATE ' . STYLES_THEME_TABLE . " SET theme_data = ''
- WHERE theme_id = " . $theme['theme_id'];
- $db->sql_query($sql);
+ if ($all_up_to_date)
+ {
+ global $phpbb_container;
+ $phpbb_log = $phpbb_container->get('log');
- $cache->destroy('sql', STYLES_THEME_TABLE);
- $cache->destroy('sql', STYLES_TABLE);
- }
- }
+ // Add database update to log
+ $phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_UPDATE_PHPBB', time(), array($this->current_version, $this->update_to_version));
$db->sql_return_on_error(true);
$db->sql_query('DELETE FROM ' . CONFIG_TABLE . " WHERE config_name = 'version_update_from'");
@@ -715,7 +665,7 @@ class install_update extends module
{
$cache->put('_diff_files', $file_list);
- if (!empty($_REQUEST['download']))
+ if ($request->variable('download', false))
{
$params[] = 'download=1';
}
@@ -830,7 +780,7 @@ class install_update extends module
$file_list['status'] = -1;
$cache->put('_diff_files', $file_list);
- if (!empty($_REQUEST['download']))
+ if ($request->variable('download', false))
{
$this->include_file('includes/functions_compress.' . $phpEx);
@@ -923,7 +873,14 @@ class install_update extends module
$test_connection = false;
if ($test_ftp_connection || $submit)
{
- $transfer = new $method(request_var('host', ''), request_var('username', ''), request_var('password', ''), request_var('root_path', ''), request_var('port', ''), request_var('timeout', ''));
+ $transfer = new $method(
+ request_var('host', ''),
+ request_var('username', ''),
+ htmlspecialchars_decode($request->untrimmed_variable('password', '')),
+ request_var('root_path', ''),
+ request_var('port', ''),
+ request_var('timeout', '')
+ );
$test_connection = $transfer->open_session();
// Make sure that the directory is correct by checking for the existence of common.php
@@ -964,7 +921,7 @@ class install_update extends module
'DATA' => $data,
'NAME' => $user->lang[strtoupper($method . '_' . $data)],
'EXPLAIN' => $user->lang[strtoupper($method . '_' . $data) . '_EXPLAIN'],
- 'DEFAULT' => (!empty($_REQUEST[$data])) ? request_var($data, '') : $default
+ 'DEFAULT' => $request->variable($data, (string) $default),
));
}
@@ -1009,7 +966,14 @@ class install_update extends module
}
else
{
- $transfer = new $method(request_var('host', ''), request_var('username', ''), request_var('password', ''), request_var('root_path', ''), request_var('port', ''), request_var('timeout', ''));
+ $transfer = new $method(
+ request_var('host', ''),
+ request_var('username', ''),
+ htmlspecialchars_decode($request->untrimmed_variable('password', '')),
+ request_var('root_path', ''),
+ request_var('port', ''),
+ request_var('timeout', '')
+ );
$transfer->open_session();
}
@@ -1124,16 +1088,10 @@ class install_update extends module
*/
function show_diff(&$update_list)
{
- global $phpbb_root_path, $template, $user;
+ global $phpbb_root_path, $template, $user, $phpbb_adm_relative_path;
$this->tpl_name = 'install_update_diff';
- // Got the diff template itself updated? If so, we are able to directly use it
- if (in_array('adm/style/install_update_diff.html', $this->update_info['files']))
- {
- $this->tpl_name = '../../install/update/new/adm/style/install_update_diff';
- }
-
$this->page_title = 'VIEWING_FILE_DIFF';
$status = request_var('status', '');
@@ -1360,7 +1318,7 @@ class install_update extends module
}
}*/
- if (file_exists($phpbb_root_path . dirname($file)) || (strpos($file, 'styles/') !== 0 && strpos($file, 'language/') !== 0))
+ if (!phpbb_ignore_new_file_on_update($phpbb_root_path, $file))
{
$this->get_custom_info($update_list['new'], $file);
$update_list['new'][] = array('filename' => $file, 'custom' => false);
@@ -1655,37 +1613,6 @@ class install_update extends module
switch ($mode)
{
- case 'version_info':
- global $phpbb_root_path, $phpEx;
-
- $info = get_remote_file('version.phpbb.com', '/phpbb',
- ((defined('PHPBB_QA')) ? '30x_qa.txt' : '30x.txt'), $errstr, $errno);
-
- if ($info !== false)
- {
- $info = explode("\n", $info);
- $info = trim($info[0]);
- }
-
- if ($this->test_update !== false)
- {
- $info = $this->test_update;
- }
-
- // If info is false the fsockopen function may not be working. Instead get the latest version from our update file (and pray it is up-to-date)
- if ($info === false)
- {
- $update_info = array();
- include($phpbb_root_path . 'install/update/index.' . $phpEx);
- $info = (empty($update_info) || !is_array($update_info)) ? false : $update_info;
-
- if ($info !== false)
- {
- $info = (!empty($info['version']['to'])) ? trim($info['version']['to']) : false;
- }
- }
- break;
-
case 'update_info':
global $phpbb_root_path, $phpEx;
@@ -1707,9 +1634,9 @@ class install_update extends module
$info['custom'] = array();
/*
// Get custom installed styles...
- $sql = 'SELECT template_name, template_path
- FROM ' . STYLES_TEMPLATE_TABLE . "
- WHERE LOWER(template_name) NOT IN ('subsilver2', 'prosilver')";
+ $sql = 'SELECT style_name, style_path
+ FROM ' . STYLES_TABLE . "
+ WHERE LOWER(style_name) NOT IN ('subsilver2', 'prosilver')";
$result = $db->sql_query($sql);
$templates = array();
@@ -1728,7 +1655,7 @@ class install_update extends module
{
foreach ($templates as $row)
{
- $info['custom'][$filename][] = str_replace('/prosilver/', '/' . $row['template_path'] . '/', $filename);
+ $info['custom'][$filename][] = str_replace('/prosilver/', '/' . $row['style_path'] . '/', $filename);
}
}
}
@@ -1798,5 +1725,3 @@ class install_update extends module
return $diff;
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/install/phpinfo.php b/phpBB/install/phpinfo.php
index 6480abf34a..83f154933a 100644
--- a/phpBB/install/phpinfo.php
+++ b/phpBB/install/phpinfo.php
@@ -1,5 +1,3 @@
<?php
phpinfo();
-
-?> \ No newline at end of file
diff --git a/phpBB/install/schemas/firebird_schema.sql b/phpBB/install/schemas/firebird_schema.sql
index eae692f529..28649dc54c 100644
--- a/phpBB/install/schemas/firebird_schema.sql
+++ b/phpBB/install/schemas/firebird_schema.sql
@@ -3,1469 +3,3 @@
# To change the contents of this file, edit
# phpBB/develop/create_schema_files.php and
# run it.
-
-# Table: 'phpbb_attachments'
-CREATE TABLE phpbb_attachments (
- attach_id INTEGER NOT NULL,
- post_msg_id INTEGER DEFAULT 0 NOT NULL,
- topic_id INTEGER DEFAULT 0 NOT NULL,
- in_message INTEGER DEFAULT 0 NOT NULL,
- poster_id INTEGER DEFAULT 0 NOT NULL,
- is_orphan INTEGER DEFAULT 1 NOT NULL,
- physical_filename VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL,
- real_filename VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL,
- download_count INTEGER DEFAULT 0 NOT NULL,
- attach_comment BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL,
- extension VARCHAR(100) CHARACTER SET NONE DEFAULT '' NOT NULL,
- mimetype VARCHAR(100) CHARACTER SET NONE DEFAULT '' NOT NULL,
- filesize INTEGER DEFAULT 0 NOT NULL,
- filetime INTEGER DEFAULT 0 NOT NULL,
- thumbnail INTEGER DEFAULT 0 NOT NULL
-);;
-
-ALTER TABLE phpbb_attachments ADD PRIMARY KEY (attach_id);;
-
-CREATE INDEX phpbb_attachments_filetime ON phpbb_attachments(filetime);;
-CREATE INDEX phpbb_attachments_post_msg_id ON phpbb_attachments(post_msg_id);;
-CREATE INDEX phpbb_attachments_topic_id ON phpbb_attachments(topic_id);;
-CREATE INDEX phpbb_attachments_poster_id ON phpbb_attachments(poster_id);;
-CREATE INDEX phpbb_attachments_is_orphan ON phpbb_attachments(is_orphan);;
-
-CREATE GENERATOR phpbb_attachments_gen;;
-SET GENERATOR phpbb_attachments_gen TO 0;;
-
-CREATE TRIGGER t_phpbb_attachments FOR phpbb_attachments
-BEFORE INSERT
-AS
-BEGIN
- NEW.attach_id = GEN_ID(phpbb_attachments_gen, 1);
-END;;
-
-
-# Table: 'phpbb_acl_groups'
-CREATE TABLE phpbb_acl_groups (
- group_id INTEGER DEFAULT 0 NOT NULL,
- forum_id INTEGER DEFAULT 0 NOT NULL,
- auth_option_id INTEGER DEFAULT 0 NOT NULL,
- auth_role_id INTEGER DEFAULT 0 NOT NULL,
- auth_setting INTEGER DEFAULT 0 NOT NULL
-);;
-
-CREATE INDEX phpbb_acl_groups_group_id ON phpbb_acl_groups(group_id);;
-CREATE INDEX phpbb_acl_groups_auth_opt_id ON phpbb_acl_groups(auth_option_id);;
-CREATE INDEX phpbb_acl_groups_auth_role_id ON phpbb_acl_groups(auth_role_id);;
-
-# Table: 'phpbb_acl_options'
-CREATE TABLE phpbb_acl_options (
- auth_option_id INTEGER NOT NULL,
- auth_option VARCHAR(50) CHARACTER SET NONE DEFAULT '' NOT NULL,
- is_global INTEGER DEFAULT 0 NOT NULL,
- is_local INTEGER DEFAULT 0 NOT NULL,
- founder_only INTEGER DEFAULT 0 NOT NULL
-);;
-
-ALTER TABLE phpbb_acl_options ADD PRIMARY KEY (auth_option_id);;
-
-CREATE UNIQUE INDEX phpbb_acl_options_auth_option ON phpbb_acl_options(auth_option);;
-
-CREATE GENERATOR phpbb_acl_options_gen;;
-SET GENERATOR phpbb_acl_options_gen TO 0;;
-
-CREATE TRIGGER t_phpbb_acl_options FOR phpbb_acl_options
-BEFORE INSERT
-AS
-BEGIN
- NEW.auth_option_id = GEN_ID(phpbb_acl_options_gen, 1);
-END;;
-
-
-# Table: 'phpbb_acl_roles'
-CREATE TABLE phpbb_acl_roles (
- role_id INTEGER NOT NULL,
- role_name VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
- role_description BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL,
- role_type VARCHAR(10) CHARACTER SET NONE DEFAULT '' NOT NULL,
- role_order INTEGER DEFAULT 0 NOT NULL
-);;
-
-ALTER TABLE phpbb_acl_roles ADD PRIMARY KEY (role_id);;
-
-CREATE INDEX phpbb_acl_roles_role_type ON phpbb_acl_roles(role_type);;
-CREATE INDEX phpbb_acl_roles_role_order ON phpbb_acl_roles(role_order);;
-
-CREATE GENERATOR phpbb_acl_roles_gen;;
-SET GENERATOR phpbb_acl_roles_gen TO 0;;
-
-CREATE TRIGGER t_phpbb_acl_roles FOR phpbb_acl_roles
-BEFORE INSERT
-AS
-BEGIN
- NEW.role_id = GEN_ID(phpbb_acl_roles_gen, 1);
-END;;
-
-
-# Table: 'phpbb_acl_roles_data'
-CREATE TABLE phpbb_acl_roles_data (
- role_id INTEGER DEFAULT 0 NOT NULL,
- auth_option_id INTEGER DEFAULT 0 NOT NULL,
- auth_setting INTEGER DEFAULT 0 NOT NULL
-);;
-
-ALTER TABLE phpbb_acl_roles_data ADD PRIMARY KEY (role_id, auth_option_id);;
-
-CREATE INDEX phpbb_acl_roles_data_ath_op_id ON phpbb_acl_roles_data(auth_option_id);;
-
-# Table: 'phpbb_acl_users'
-CREATE TABLE phpbb_acl_users (
- user_id INTEGER DEFAULT 0 NOT NULL,
- forum_id INTEGER DEFAULT 0 NOT NULL,
- auth_option_id INTEGER DEFAULT 0 NOT NULL,
- auth_role_id INTEGER DEFAULT 0 NOT NULL,
- auth_setting INTEGER DEFAULT 0 NOT NULL
-);;
-
-CREATE INDEX phpbb_acl_users_user_id ON phpbb_acl_users(user_id);;
-CREATE INDEX phpbb_acl_users_auth_option_id ON phpbb_acl_users(auth_option_id);;
-CREATE INDEX phpbb_acl_users_auth_role_id ON phpbb_acl_users(auth_role_id);;
-
-# Table: 'phpbb_banlist'
-CREATE TABLE phpbb_banlist (
- ban_id INTEGER NOT NULL,
- ban_userid INTEGER DEFAULT 0 NOT NULL,
- ban_ip VARCHAR(40) CHARACTER SET NONE DEFAULT '' NOT NULL,
- ban_email VARCHAR(100) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
- ban_start INTEGER DEFAULT 0 NOT NULL,
- ban_end INTEGER DEFAULT 0 NOT NULL,
- ban_exclude INTEGER DEFAULT 0 NOT NULL,
- ban_reason VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
- ban_give_reason VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE
-);;
-
-ALTER TABLE phpbb_banlist ADD PRIMARY KEY (ban_id);;
-
-CREATE INDEX phpbb_banlist_ban_end ON phpbb_banlist(ban_end);;
-CREATE INDEX phpbb_banlist_ban_user ON phpbb_banlist(ban_userid, ban_exclude);;
-CREATE INDEX phpbb_banlist_ban_email ON phpbb_banlist(ban_email, ban_exclude);;
-CREATE INDEX phpbb_banlist_ban_ip ON phpbb_banlist(ban_ip, ban_exclude);;
-
-CREATE GENERATOR phpbb_banlist_gen;;
-SET GENERATOR phpbb_banlist_gen TO 0;;
-
-CREATE TRIGGER t_phpbb_banlist FOR phpbb_banlist
-BEFORE INSERT
-AS
-BEGIN
- NEW.ban_id = GEN_ID(phpbb_banlist_gen, 1);
-END;;
-
-
-# Table: 'phpbb_bbcodes'
-CREATE TABLE phpbb_bbcodes (
- bbcode_id INTEGER DEFAULT 0 NOT NULL,
- bbcode_tag VARCHAR(16) CHARACTER SET NONE DEFAULT '' NOT NULL,
- bbcode_helpline VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
- display_on_posting INTEGER DEFAULT 0 NOT NULL,
- bbcode_match BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL,
- bbcode_tpl BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL,
- first_pass_match BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL,
- first_pass_replace BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL,
- second_pass_match BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL,
- second_pass_replace BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL
-);;
-
-ALTER TABLE phpbb_bbcodes ADD PRIMARY KEY (bbcode_id);;
-
-CREATE INDEX phpbb_bbcodes_display_on_post ON phpbb_bbcodes(display_on_posting);;
-
-# Table: 'phpbb_bookmarks'
-CREATE TABLE phpbb_bookmarks (
- topic_id INTEGER DEFAULT 0 NOT NULL,
- user_id INTEGER DEFAULT 0 NOT NULL
-);;
-
-ALTER TABLE phpbb_bookmarks ADD PRIMARY KEY (topic_id, user_id);;
-
-
-# Table: 'phpbb_bots'
-CREATE TABLE phpbb_bots (
- bot_id INTEGER NOT NULL,
- bot_active INTEGER DEFAULT 1 NOT NULL,
- bot_name VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
- user_id INTEGER DEFAULT 0 NOT NULL,
- bot_agent VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL,
- bot_ip VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL
-);;
-
-ALTER TABLE phpbb_bots ADD PRIMARY KEY (bot_id);;
-
-CREATE INDEX phpbb_bots_bot_active ON phpbb_bots(bot_active);;
-
-CREATE GENERATOR phpbb_bots_gen;;
-SET GENERATOR phpbb_bots_gen TO 0;;
-
-CREATE TRIGGER t_phpbb_bots FOR phpbb_bots
-BEFORE INSERT
-AS
-BEGIN
- NEW.bot_id = GEN_ID(phpbb_bots_gen, 1);
-END;;
-
-
-# Table: 'phpbb_config'
-CREATE TABLE phpbb_config (
- config_name VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL,
- config_value VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
- is_dynamic INTEGER DEFAULT 0 NOT NULL
-);;
-
-ALTER TABLE phpbb_config ADD PRIMARY KEY (config_name);;
-
-CREATE INDEX phpbb_config_is_dynamic ON phpbb_config(is_dynamic);;
-
-# Table: 'phpbb_confirm'
-CREATE TABLE phpbb_confirm (
- confirm_id CHAR(32) CHARACTER SET NONE DEFAULT '' NOT NULL,
- session_id CHAR(32) CHARACTER SET NONE DEFAULT '' NOT NULL,
- confirm_type INTEGER DEFAULT 0 NOT NULL,
- code VARCHAR(8) CHARACTER SET NONE DEFAULT '' NOT NULL,
- seed INTEGER DEFAULT 0 NOT NULL,
- attempts INTEGER DEFAULT 0 NOT NULL
-);;
-
-ALTER TABLE phpbb_confirm ADD PRIMARY KEY (session_id, confirm_id);;
-
-CREATE INDEX phpbb_confirm_confirm_type ON phpbb_confirm(confirm_type);;
-
-# Table: 'phpbb_disallow'
-CREATE TABLE phpbb_disallow (
- disallow_id INTEGER NOT NULL,
- disallow_username VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE
-);;
-
-ALTER TABLE phpbb_disallow ADD PRIMARY KEY (disallow_id);;
-
-
-CREATE GENERATOR phpbb_disallow_gen;;
-SET GENERATOR phpbb_disallow_gen TO 0;;
-
-CREATE TRIGGER t_phpbb_disallow FOR phpbb_disallow
-BEFORE INSERT
-AS
-BEGIN
- NEW.disallow_id = GEN_ID(phpbb_disallow_gen, 1);
-END;;
-
-
-# Table: 'phpbb_drafts'
-CREATE TABLE phpbb_drafts (
- draft_id INTEGER NOT NULL,
- user_id INTEGER DEFAULT 0 NOT NULL,
- topic_id INTEGER DEFAULT 0 NOT NULL,
- forum_id INTEGER DEFAULT 0 NOT NULL,
- save_time INTEGER DEFAULT 0 NOT NULL,
- draft_subject VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
- draft_message BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL
-);;
-
-ALTER TABLE phpbb_drafts ADD PRIMARY KEY (draft_id);;
-
-CREATE INDEX phpbb_drafts_save_time ON phpbb_drafts(save_time);;
-
-CREATE GENERATOR phpbb_drafts_gen;;
-SET GENERATOR phpbb_drafts_gen TO 0;;
-
-CREATE TRIGGER t_phpbb_drafts FOR phpbb_drafts
-BEFORE INSERT
-AS
-BEGIN
- NEW.draft_id = GEN_ID(phpbb_drafts_gen, 1);
-END;;
-
-
-# Table: 'phpbb_extensions'
-CREATE TABLE phpbb_extensions (
- extension_id INTEGER NOT NULL,
- group_id INTEGER DEFAULT 0 NOT NULL,
- extension VARCHAR(100) CHARACTER SET NONE DEFAULT '' NOT NULL
-);;
-
-ALTER TABLE phpbb_extensions ADD PRIMARY KEY (extension_id);;
-
-
-CREATE GENERATOR phpbb_extensions_gen;;
-SET GENERATOR phpbb_extensions_gen TO 0;;
-
-CREATE TRIGGER t_phpbb_extensions FOR phpbb_extensions
-BEFORE INSERT
-AS
-BEGIN
- NEW.extension_id = GEN_ID(phpbb_extensions_gen, 1);
-END;;
-
-
-# Table: 'phpbb_extension_groups'
-CREATE TABLE phpbb_extension_groups (
- group_id INTEGER NOT NULL,
- group_name VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
- cat_id INTEGER DEFAULT 0 NOT NULL,
- allow_group INTEGER DEFAULT 0 NOT NULL,
- download_mode INTEGER DEFAULT 1 NOT NULL,
- upload_icon VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL,
- max_filesize INTEGER DEFAULT 0 NOT NULL,
- allowed_forums BLOB SUB_TYPE TEXT CHARACTER SET NONE DEFAULT '' NOT NULL,
- allow_in_pm INTEGER DEFAULT 0 NOT NULL
-);;
-
-ALTER TABLE phpbb_extension_groups ADD PRIMARY KEY (group_id);;
-
-
-CREATE GENERATOR phpbb_extension_groups_gen;;
-SET GENERATOR phpbb_extension_groups_gen TO 0;;
-
-CREATE TRIGGER t_phpbb_extension_groups FOR phpbb_extension_groups
-BEFORE INSERT
-AS
-BEGIN
- NEW.group_id = GEN_ID(phpbb_extension_groups_gen, 1);
-END;;
-
-
-# Table: 'phpbb_forums'
-CREATE TABLE phpbb_forums (
- forum_id INTEGER NOT NULL,
- parent_id INTEGER DEFAULT 0 NOT NULL,
- left_id INTEGER DEFAULT 0 NOT NULL,
- right_id INTEGER DEFAULT 0 NOT NULL,
- forum_parents BLOB SUB_TYPE TEXT CHARACTER SET NONE DEFAULT '' NOT NULL,
- forum_name VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
- forum_desc BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL,
- forum_desc_bitfield VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL,
- forum_desc_options INTEGER DEFAULT 7 NOT NULL,
- forum_desc_uid VARCHAR(8) CHARACTER SET NONE DEFAULT '' NOT NULL,
- forum_link VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
- forum_password VARCHAR(40) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
- forum_style INTEGER DEFAULT 0 NOT NULL,
- forum_image VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL,
- forum_rules BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL,
- forum_rules_link VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
- forum_rules_bitfield VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL,
- forum_rules_options INTEGER DEFAULT 7 NOT NULL,
- forum_rules_uid VARCHAR(8) CHARACTER SET NONE DEFAULT '' NOT NULL,
- forum_topics_per_page INTEGER DEFAULT 0 NOT NULL,
- forum_type INTEGER DEFAULT 0 NOT NULL,
- forum_status INTEGER DEFAULT 0 NOT NULL,
- forum_posts INTEGER DEFAULT 0 NOT NULL,
- forum_topics INTEGER DEFAULT 0 NOT NULL,
- forum_topics_real INTEGER DEFAULT 0 NOT NULL,
- forum_last_post_id INTEGER DEFAULT 0 NOT NULL,
- forum_last_poster_id INTEGER DEFAULT 0 NOT NULL,
- forum_last_post_subject VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
- forum_last_post_time INTEGER DEFAULT 0 NOT NULL,
- forum_last_poster_name VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
- forum_last_poster_colour VARCHAR(6) CHARACTER SET NONE DEFAULT '' NOT NULL,
- forum_flags INTEGER DEFAULT 32 NOT NULL,
- forum_options INTEGER DEFAULT 0 NOT NULL,
- display_subforum_list INTEGER DEFAULT 1 NOT NULL,
- display_on_index INTEGER DEFAULT 1 NOT NULL,
- enable_indexing INTEGER DEFAULT 1 NOT NULL,
- enable_icons INTEGER DEFAULT 1 NOT NULL,
- enable_prune INTEGER DEFAULT 0 NOT NULL,
- prune_next INTEGER DEFAULT 0 NOT NULL,
- prune_days INTEGER DEFAULT 0 NOT NULL,
- prune_viewed INTEGER DEFAULT 0 NOT NULL,
- prune_freq INTEGER DEFAULT 0 NOT NULL
-);;
-
-ALTER TABLE phpbb_forums ADD PRIMARY KEY (forum_id);;
-
-CREATE INDEX phpbb_forums_left_right_id ON phpbb_forums(left_id, right_id);;
-CREATE INDEX phpbb_forums_forum_lastpost_id ON phpbb_forums(forum_last_post_id);;
-
-CREATE GENERATOR phpbb_forums_gen;;
-SET GENERATOR phpbb_forums_gen TO 0;;
-
-CREATE TRIGGER t_phpbb_forums FOR phpbb_forums
-BEFORE INSERT
-AS
-BEGIN
- NEW.forum_id = GEN_ID(phpbb_forums_gen, 1);
-END;;
-
-
-# Table: 'phpbb_forums_access'
-CREATE TABLE phpbb_forums_access (
- forum_id INTEGER DEFAULT 0 NOT NULL,
- user_id INTEGER DEFAULT 0 NOT NULL,
- session_id CHAR(32) CHARACTER SET NONE DEFAULT '' NOT NULL
-);;
-
-ALTER TABLE phpbb_forums_access ADD PRIMARY KEY (forum_id, user_id, session_id);;
-
-
-# Table: 'phpbb_forums_track'
-CREATE TABLE phpbb_forums_track (
- user_id INTEGER DEFAULT 0 NOT NULL,
- forum_id INTEGER DEFAULT 0 NOT NULL,
- mark_time INTEGER DEFAULT 0 NOT NULL
-);;
-
-ALTER TABLE phpbb_forums_track ADD PRIMARY KEY (user_id, forum_id);;
-
-
-# Table: 'phpbb_forums_watch'
-CREATE TABLE phpbb_forums_watch (
- forum_id INTEGER DEFAULT 0 NOT NULL,
- user_id INTEGER DEFAULT 0 NOT NULL,
- notify_status INTEGER DEFAULT 0 NOT NULL
-);;
-
-CREATE INDEX phpbb_forums_watch_forum_id ON phpbb_forums_watch(forum_id);;
-CREATE INDEX phpbb_forums_watch_user_id ON phpbb_forums_watch(user_id);;
-CREATE INDEX phpbb_forums_watch_notify_stat ON phpbb_forums_watch(notify_status);;
-
-# Table: 'phpbb_groups'
-CREATE TABLE phpbb_groups (
- group_id INTEGER NOT NULL,
- group_type INTEGER DEFAULT 1 NOT NULL,
- group_founder_manage INTEGER DEFAULT 0 NOT NULL,
- group_skip_auth INTEGER DEFAULT 0 NOT NULL,
- group_name VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
- group_desc BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL,
- group_desc_bitfield VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL,
- group_desc_options INTEGER DEFAULT 7 NOT NULL,
- group_desc_uid VARCHAR(8) CHARACTER SET NONE DEFAULT '' NOT NULL,
- group_display INTEGER DEFAULT 0 NOT NULL,
- group_avatar VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL,
- group_avatar_type INTEGER DEFAULT 0 NOT NULL,
- group_avatar_width INTEGER DEFAULT 0 NOT NULL,
- group_avatar_height INTEGER DEFAULT 0 NOT NULL,
- group_rank INTEGER DEFAULT 0 NOT NULL,
- group_colour VARCHAR(6) CHARACTER SET NONE DEFAULT '' NOT NULL,
- group_sig_chars INTEGER DEFAULT 0 NOT NULL,
- group_receive_pm INTEGER DEFAULT 0 NOT NULL,
- group_message_limit INTEGER DEFAULT 0 NOT NULL,
- group_max_recipients INTEGER DEFAULT 0 NOT NULL,
- group_legend INTEGER DEFAULT 1 NOT NULL
-);;
-
-ALTER TABLE phpbb_groups ADD PRIMARY KEY (group_id);;
-
-CREATE INDEX phpbb_groups_group_legend_name ON phpbb_groups(group_legend, group_name);;
-
-CREATE GENERATOR phpbb_groups_gen;;
-SET GENERATOR phpbb_groups_gen TO 0;;
-
-CREATE TRIGGER t_phpbb_groups FOR phpbb_groups
-BEFORE INSERT
-AS
-BEGIN
- NEW.group_id = GEN_ID(phpbb_groups_gen, 1);
-END;;
-
-
-# Table: 'phpbb_icons'
-CREATE TABLE phpbb_icons (
- icons_id INTEGER NOT NULL,
- icons_url VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL,
- icons_width INTEGER DEFAULT 0 NOT NULL,
- icons_height INTEGER DEFAULT 0 NOT NULL,
- icons_order INTEGER DEFAULT 0 NOT NULL,
- display_on_posting INTEGER DEFAULT 1 NOT NULL
-);;
-
-ALTER TABLE phpbb_icons ADD PRIMARY KEY (icons_id);;
-
-CREATE INDEX phpbb_icons_display_on_posting ON phpbb_icons(display_on_posting);;
-
-CREATE GENERATOR phpbb_icons_gen;;
-SET GENERATOR phpbb_icons_gen TO 0;;
-
-CREATE TRIGGER t_phpbb_icons FOR phpbb_icons
-BEFORE INSERT
-AS
-BEGIN
- NEW.icons_id = GEN_ID(phpbb_icons_gen, 1);
-END;;
-
-
-# Table: 'phpbb_lang'
-CREATE TABLE phpbb_lang (
- lang_id INTEGER NOT NULL,
- lang_iso VARCHAR(30) CHARACTER SET NONE DEFAULT '' NOT NULL,
- lang_dir VARCHAR(30) CHARACTER SET NONE DEFAULT '' NOT NULL,
- lang_english_name VARCHAR(100) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
- lang_local_name VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
- lang_author VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE
-);;
-
-ALTER TABLE phpbb_lang ADD PRIMARY KEY (lang_id);;
-
-CREATE INDEX phpbb_lang_lang_iso ON phpbb_lang(lang_iso);;
-
-CREATE GENERATOR phpbb_lang_gen;;
-SET GENERATOR phpbb_lang_gen TO 0;;
-
-CREATE TRIGGER t_phpbb_lang FOR phpbb_lang
-BEFORE INSERT
-AS
-BEGIN
- NEW.lang_id = GEN_ID(phpbb_lang_gen, 1);
-END;;
-
-
-# Table: 'phpbb_log'
-CREATE TABLE phpbb_log (
- log_id INTEGER NOT NULL,
- log_type INTEGER DEFAULT 0 NOT NULL,
- user_id INTEGER DEFAULT 0 NOT NULL,
- forum_id INTEGER DEFAULT 0 NOT NULL,
- topic_id INTEGER DEFAULT 0 NOT NULL,
- reportee_id INTEGER DEFAULT 0 NOT NULL,
- log_ip VARCHAR(40) CHARACTER SET NONE DEFAULT '' NOT NULL,
- log_time INTEGER DEFAULT 0 NOT NULL,
- log_operation BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL,
- log_data BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL
-);;
-
-ALTER TABLE phpbb_log ADD PRIMARY KEY (log_id);;
-
-CREATE INDEX phpbb_log_log_type ON phpbb_log(log_type);;
-CREATE INDEX phpbb_log_forum_id ON phpbb_log(forum_id);;
-CREATE INDEX phpbb_log_topic_id ON phpbb_log(topic_id);;
-CREATE INDEX phpbb_log_reportee_id ON phpbb_log(reportee_id);;
-CREATE INDEX phpbb_log_user_id ON phpbb_log(user_id);;
-
-CREATE GENERATOR phpbb_log_gen;;
-SET GENERATOR phpbb_log_gen TO 0;;
-
-CREATE TRIGGER t_phpbb_log FOR phpbb_log
-BEFORE INSERT
-AS
-BEGIN
- NEW.log_id = GEN_ID(phpbb_log_gen, 1);
-END;;
-
-
-# Table: 'phpbb_login_attempts'
-CREATE TABLE phpbb_login_attempts (
- attempt_ip VARCHAR(40) CHARACTER SET NONE DEFAULT '' NOT NULL,
- attempt_browser VARCHAR(150) CHARACTER SET NONE DEFAULT '' NOT NULL,
- attempt_forwarded_for VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL,
- attempt_time INTEGER DEFAULT 0 NOT NULL,
- user_id INTEGER DEFAULT 0 NOT NULL,
- username VARCHAR(255) CHARACTER SET UTF8 DEFAULT 0 NOT NULL COLLATE UNICODE,
- username_clean VARCHAR(255) CHARACTER SET UTF8 DEFAULT 0 NOT NULL COLLATE UNICODE
-);;
-
-CREATE INDEX phpbb_login_attempts_att_ip ON phpbb_login_attempts(attempt_ip, attempt_time);;
-CREATE INDEX phpbb_login_attempts_att_for ON phpbb_login_attempts(attempt_forwarded_for, attempt_time);;
-CREATE INDEX phpbb_login_attempts_att_time ON phpbb_login_attempts(attempt_time);;
-CREATE INDEX phpbb_login_attempts_user_id ON phpbb_login_attempts(user_id);;
-
-# Table: 'phpbb_moderator_cache'
-CREATE TABLE phpbb_moderator_cache (
- forum_id INTEGER DEFAULT 0 NOT NULL,
- user_id INTEGER DEFAULT 0 NOT NULL,
- username VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
- group_id INTEGER DEFAULT 0 NOT NULL,
- group_name VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
- display_on_index INTEGER DEFAULT 1 NOT NULL
-);;
-
-CREATE INDEX phpbb_moderator_cache_disp_idx ON phpbb_moderator_cache(display_on_index);;
-CREATE INDEX phpbb_moderator_cache_forum_id ON phpbb_moderator_cache(forum_id);;
-
-# Table: 'phpbb_modules'
-CREATE TABLE phpbb_modules (
- module_id INTEGER NOT NULL,
- module_enabled INTEGER DEFAULT 1 NOT NULL,
- module_display INTEGER DEFAULT 1 NOT NULL,
- module_basename VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL,
- module_class VARCHAR(10) CHARACTER SET NONE DEFAULT '' NOT NULL,
- parent_id INTEGER DEFAULT 0 NOT NULL,
- left_id INTEGER DEFAULT 0 NOT NULL,
- right_id INTEGER DEFAULT 0 NOT NULL,
- module_langname VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL,
- module_mode VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL,
- module_auth VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL
-);;
-
-ALTER TABLE phpbb_modules ADD PRIMARY KEY (module_id);;
-
-CREATE INDEX phpbb_modules_left_right_id ON phpbb_modules(left_id, right_id);;
-CREATE INDEX phpbb_modules_module_enabled ON phpbb_modules(module_enabled);;
-CREATE INDEX phpbb_modules_class_left_id ON phpbb_modules(module_class, left_id);;
-
-CREATE GENERATOR phpbb_modules_gen;;
-SET GENERATOR phpbb_modules_gen TO 0;;
-
-CREATE TRIGGER t_phpbb_modules FOR phpbb_modules
-BEFORE INSERT
-AS
-BEGIN
- NEW.module_id = GEN_ID(phpbb_modules_gen, 1);
-END;;
-
-
-# Table: 'phpbb_poll_options'
-CREATE TABLE phpbb_poll_options (
- poll_option_id INTEGER DEFAULT 0 NOT NULL,
- topic_id INTEGER DEFAULT 0 NOT NULL,
- poll_option_text BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL,
- poll_option_total INTEGER DEFAULT 0 NOT NULL
-);;
-
-CREATE INDEX phpbb_poll_options_poll_opt_id ON phpbb_poll_options(poll_option_id);;
-CREATE INDEX phpbb_poll_options_topic_id ON phpbb_poll_options(topic_id);;
-
-# Table: 'phpbb_poll_votes'
-CREATE TABLE phpbb_poll_votes (
- topic_id INTEGER DEFAULT 0 NOT NULL,
- poll_option_id INTEGER DEFAULT 0 NOT NULL,
- vote_user_id INTEGER DEFAULT 0 NOT NULL,
- vote_user_ip VARCHAR(40) CHARACTER SET NONE DEFAULT '' NOT NULL
-);;
-
-CREATE INDEX phpbb_poll_votes_topic_id ON phpbb_poll_votes(topic_id);;
-CREATE INDEX phpbb_poll_votes_vote_user_id ON phpbb_poll_votes(vote_user_id);;
-CREATE INDEX phpbb_poll_votes_vote_user_ip ON phpbb_poll_votes(vote_user_ip);;
-
-# Table: 'phpbb_posts'
-CREATE TABLE phpbb_posts (
- post_id INTEGER NOT NULL,
- topic_id INTEGER DEFAULT 0 NOT NULL,
- forum_id INTEGER DEFAULT 0 NOT NULL,
- poster_id INTEGER DEFAULT 0 NOT NULL,
- icon_id INTEGER DEFAULT 0 NOT NULL,
- poster_ip VARCHAR(40) CHARACTER SET NONE DEFAULT '' NOT NULL,
- post_time INTEGER DEFAULT 0 NOT NULL,
- post_approved INTEGER DEFAULT 1 NOT NULL,
- post_reported INTEGER DEFAULT 0 NOT NULL,
- enable_bbcode INTEGER DEFAULT 1 NOT NULL,
- enable_smilies INTEGER DEFAULT 1 NOT NULL,
- enable_magic_url INTEGER DEFAULT 1 NOT NULL,
- enable_sig INTEGER DEFAULT 1 NOT NULL,
- post_username VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
- post_subject VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
- post_text BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL,
- post_checksum VARCHAR(32) CHARACTER SET NONE DEFAULT '' NOT NULL,
- post_attachment INTEGER DEFAULT 0 NOT NULL,
- bbcode_bitfield VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL,
- bbcode_uid VARCHAR(8) CHARACTER SET NONE DEFAULT '' NOT NULL,
- post_postcount INTEGER DEFAULT 1 NOT NULL,
- post_edit_time INTEGER DEFAULT 0 NOT NULL,
- post_edit_reason VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
- post_edit_user INTEGER DEFAULT 0 NOT NULL,
- post_edit_count INTEGER DEFAULT 0 NOT NULL,
- post_edit_locked INTEGER DEFAULT 0 NOT NULL
-);;
-
-ALTER TABLE phpbb_posts ADD PRIMARY KEY (post_id);;
-
-CREATE INDEX phpbb_posts_forum_id ON phpbb_posts(forum_id);;
-CREATE INDEX phpbb_posts_topic_id ON phpbb_posts(topic_id);;
-CREATE INDEX phpbb_posts_poster_ip ON phpbb_posts(poster_ip);;
-CREATE INDEX phpbb_posts_poster_id ON phpbb_posts(poster_id);;
-CREATE INDEX phpbb_posts_post_approved ON phpbb_posts(post_approved);;
-CREATE INDEX phpbb_posts_post_username ON phpbb_posts(post_username);;
-CREATE INDEX phpbb_posts_tid_post_time ON phpbb_posts(topic_id, post_time);;
-
-CREATE GENERATOR phpbb_posts_gen;;
-SET GENERATOR phpbb_posts_gen TO 0;;
-
-CREATE TRIGGER t_phpbb_posts FOR phpbb_posts
-BEFORE INSERT
-AS
-BEGIN
- NEW.post_id = GEN_ID(phpbb_posts_gen, 1);
-END;;
-
-
-# Table: 'phpbb_privmsgs'
-CREATE TABLE phpbb_privmsgs (
- msg_id INTEGER NOT NULL,
- root_level INTEGER DEFAULT 0 NOT NULL,
- author_id INTEGER DEFAULT 0 NOT NULL,
- icon_id INTEGER DEFAULT 0 NOT NULL,
- author_ip VARCHAR(40) CHARACTER SET NONE DEFAULT '' NOT NULL,
- message_time INTEGER DEFAULT 0 NOT NULL,
- enable_bbcode INTEGER DEFAULT 1 NOT NULL,
- enable_smilies INTEGER DEFAULT 1 NOT NULL,
- enable_magic_url INTEGER DEFAULT 1 NOT NULL,
- enable_sig INTEGER DEFAULT 1 NOT NULL,
- message_subject VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
- message_text BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL,
- message_edit_reason VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
- message_edit_user INTEGER DEFAULT 0 NOT NULL,
- message_attachment INTEGER DEFAULT 0 NOT NULL,
- bbcode_bitfield VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL,
- bbcode_uid VARCHAR(8) CHARACTER SET NONE DEFAULT '' NOT NULL,
- message_edit_time INTEGER DEFAULT 0 NOT NULL,
- message_edit_count INTEGER DEFAULT 0 NOT NULL,
- to_address BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL,
- bcc_address BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL,
- message_reported INTEGER DEFAULT 0 NOT NULL
-);;
-
-ALTER TABLE phpbb_privmsgs ADD PRIMARY KEY (msg_id);;
-
-CREATE INDEX phpbb_privmsgs_author_ip ON phpbb_privmsgs(author_ip);;
-CREATE INDEX phpbb_privmsgs_message_time ON phpbb_privmsgs(message_time);;
-CREATE INDEX phpbb_privmsgs_author_id ON phpbb_privmsgs(author_id);;
-CREATE INDEX phpbb_privmsgs_root_level ON phpbb_privmsgs(root_level);;
-
-CREATE GENERATOR phpbb_privmsgs_gen;;
-SET GENERATOR phpbb_privmsgs_gen TO 0;;
-
-CREATE TRIGGER t_phpbb_privmsgs FOR phpbb_privmsgs
-BEFORE INSERT
-AS
-BEGIN
- NEW.msg_id = GEN_ID(phpbb_privmsgs_gen, 1);
-END;;
-
-
-# Table: 'phpbb_privmsgs_folder'
-CREATE TABLE phpbb_privmsgs_folder (
- folder_id INTEGER NOT NULL,
- user_id INTEGER DEFAULT 0 NOT NULL,
- folder_name VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
- pm_count INTEGER DEFAULT 0 NOT NULL
-);;
-
-ALTER TABLE phpbb_privmsgs_folder ADD PRIMARY KEY (folder_id);;
-
-CREATE INDEX phpbb_privmsgs_folder_user_id ON phpbb_privmsgs_folder(user_id);;
-
-CREATE GENERATOR phpbb_privmsgs_folder_gen;;
-SET GENERATOR phpbb_privmsgs_folder_gen TO 0;;
-
-CREATE TRIGGER t_phpbb_privmsgs_folder FOR phpbb_privmsgs_folder
-BEFORE INSERT
-AS
-BEGIN
- NEW.folder_id = GEN_ID(phpbb_privmsgs_folder_gen, 1);
-END;;
-
-
-# Table: 'phpbb_privmsgs_rules'
-CREATE TABLE phpbb_privmsgs_rules (
- rule_id INTEGER NOT NULL,
- user_id INTEGER DEFAULT 0 NOT NULL,
- rule_check INTEGER DEFAULT 0 NOT NULL,
- rule_connection INTEGER DEFAULT 0 NOT NULL,
- rule_string VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
- rule_user_id INTEGER DEFAULT 0 NOT NULL,
- rule_group_id INTEGER DEFAULT 0 NOT NULL,
- rule_action INTEGER DEFAULT 0 NOT NULL,
- rule_folder_id INTEGER DEFAULT 0 NOT NULL
-);;
-
-ALTER TABLE phpbb_privmsgs_rules ADD PRIMARY KEY (rule_id);;
-
-CREATE INDEX phpbb_privmsgs_rules_user_id ON phpbb_privmsgs_rules(user_id);;
-
-CREATE GENERATOR phpbb_privmsgs_rules_gen;;
-SET GENERATOR phpbb_privmsgs_rules_gen TO 0;;
-
-CREATE TRIGGER t_phpbb_privmsgs_rules FOR phpbb_privmsgs_rules
-BEFORE INSERT
-AS
-BEGIN
- NEW.rule_id = GEN_ID(phpbb_privmsgs_rules_gen, 1);
-END;;
-
-
-# Table: 'phpbb_privmsgs_to'
-CREATE TABLE phpbb_privmsgs_to (
- msg_id INTEGER DEFAULT 0 NOT NULL,
- user_id INTEGER DEFAULT 0 NOT NULL,
- author_id INTEGER DEFAULT 0 NOT NULL,
- pm_deleted INTEGER DEFAULT 0 NOT NULL,
- pm_new INTEGER DEFAULT 1 NOT NULL,
- pm_unread INTEGER DEFAULT 1 NOT NULL,
- pm_replied INTEGER DEFAULT 0 NOT NULL,
- pm_marked INTEGER DEFAULT 0 NOT NULL,
- pm_forwarded INTEGER DEFAULT 0 NOT NULL,
- folder_id INTEGER DEFAULT 0 NOT NULL
-);;
-
-CREATE INDEX phpbb_privmsgs_to_msg_id ON phpbb_privmsgs_to(msg_id);;
-CREATE INDEX phpbb_privmsgs_to_author_id ON phpbb_privmsgs_to(author_id);;
-CREATE INDEX phpbb_privmsgs_to_usr_flder_id ON phpbb_privmsgs_to(user_id, folder_id);;
-
-# Table: 'phpbb_profile_fields'
-CREATE TABLE phpbb_profile_fields (
- field_id INTEGER NOT NULL,
- field_name VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
- field_type INTEGER DEFAULT 0 NOT NULL,
- field_ident VARCHAR(20) CHARACTER SET NONE DEFAULT '' NOT NULL,
- field_length VARCHAR(20) CHARACTER SET NONE DEFAULT '' NOT NULL,
- field_minlen VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL,
- field_maxlen VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL,
- field_novalue VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
- field_default_value VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
- field_validation VARCHAR(20) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
- field_required INTEGER DEFAULT 0 NOT NULL,
- field_show_novalue INTEGER DEFAULT 0 NOT NULL,
- field_show_on_reg INTEGER DEFAULT 0 NOT NULL,
- field_show_on_vt INTEGER DEFAULT 0 NOT NULL,
- field_show_profile INTEGER DEFAULT 0 NOT NULL,
- field_hide INTEGER DEFAULT 0 NOT NULL,
- field_no_view INTEGER DEFAULT 0 NOT NULL,
- field_active INTEGER DEFAULT 0 NOT NULL,
- field_order INTEGER DEFAULT 0 NOT NULL
-);;
-
-ALTER TABLE phpbb_profile_fields ADD PRIMARY KEY (field_id);;
-
-CREATE INDEX phpbb_profile_fields_fld_type ON phpbb_profile_fields(field_type);;
-CREATE INDEX phpbb_profile_fields_fld_ordr ON phpbb_profile_fields(field_order);;
-
-CREATE GENERATOR phpbb_profile_fields_gen;;
-SET GENERATOR phpbb_profile_fields_gen TO 0;;
-
-CREATE TRIGGER t_phpbb_profile_fields FOR phpbb_profile_fields
-BEFORE INSERT
-AS
-BEGIN
- NEW.field_id = GEN_ID(phpbb_profile_fields_gen, 1);
-END;;
-
-
-# Table: 'phpbb_profile_fields_data'
-CREATE TABLE phpbb_profile_fields_data (
- user_id INTEGER DEFAULT 0 NOT NULL
-);;
-
-ALTER TABLE phpbb_profile_fields_data ADD PRIMARY KEY (user_id);;
-
-
-# Table: 'phpbb_profile_fields_lang'
-CREATE TABLE phpbb_profile_fields_lang (
- field_id INTEGER DEFAULT 0 NOT NULL,
- lang_id INTEGER DEFAULT 0 NOT NULL,
- option_id INTEGER DEFAULT 0 NOT NULL,
- field_type INTEGER DEFAULT 0 NOT NULL,
- lang_value VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE
-);;
-
-ALTER TABLE phpbb_profile_fields_lang ADD PRIMARY KEY (field_id, lang_id, option_id);;
-
-
-# Table: 'phpbb_profile_lang'
-CREATE TABLE phpbb_profile_lang (
- field_id INTEGER DEFAULT 0 NOT NULL,
- lang_id INTEGER DEFAULT 0 NOT NULL,
- lang_name VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
- lang_explain BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL,
- lang_default_value VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE
-);;
-
-ALTER TABLE phpbb_profile_lang ADD PRIMARY KEY (field_id, lang_id);;
-
-
-# Table: 'phpbb_ranks'
-CREATE TABLE phpbb_ranks (
- rank_id INTEGER NOT NULL,
- rank_title VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
- rank_min INTEGER DEFAULT 0 NOT NULL,
- rank_special INTEGER DEFAULT 0 NOT NULL,
- rank_image VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL
-);;
-
-ALTER TABLE phpbb_ranks ADD PRIMARY KEY (rank_id);;
-
-
-CREATE GENERATOR phpbb_ranks_gen;;
-SET GENERATOR phpbb_ranks_gen TO 0;;
-
-CREATE TRIGGER t_phpbb_ranks FOR phpbb_ranks
-BEFORE INSERT
-AS
-BEGIN
- NEW.rank_id = GEN_ID(phpbb_ranks_gen, 1);
-END;;
-
-
-# Table: 'phpbb_reports'
-CREATE TABLE phpbb_reports (
- report_id INTEGER NOT NULL,
- reason_id INTEGER DEFAULT 0 NOT NULL,
- post_id INTEGER DEFAULT 0 NOT NULL,
- pm_id INTEGER DEFAULT 0 NOT NULL,
- user_id INTEGER DEFAULT 0 NOT NULL,
- user_notify INTEGER DEFAULT 0 NOT NULL,
- report_closed INTEGER DEFAULT 0 NOT NULL,
- report_time INTEGER DEFAULT 0 NOT NULL,
- report_text BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL
-);;
-
-ALTER TABLE phpbb_reports ADD PRIMARY KEY (report_id);;
-
-CREATE INDEX phpbb_reports_post_id ON phpbb_reports(post_id);;
-CREATE INDEX phpbb_reports_pm_id ON phpbb_reports(pm_id);;
-
-CREATE GENERATOR phpbb_reports_gen;;
-SET GENERATOR phpbb_reports_gen TO 0;;
-
-CREATE TRIGGER t_phpbb_reports FOR phpbb_reports
-BEFORE INSERT
-AS
-BEGIN
- NEW.report_id = GEN_ID(phpbb_reports_gen, 1);
-END;;
-
-
-# Table: 'phpbb_reports_reasons'
-CREATE TABLE phpbb_reports_reasons (
- reason_id INTEGER NOT NULL,
- reason_title VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
- reason_description BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL,
- reason_order INTEGER DEFAULT 0 NOT NULL
-);;
-
-ALTER TABLE phpbb_reports_reasons ADD PRIMARY KEY (reason_id);;
-
-
-CREATE GENERATOR phpbb_reports_reasons_gen;;
-SET GENERATOR phpbb_reports_reasons_gen TO 0;;
-
-CREATE TRIGGER t_phpbb_reports_reasons FOR phpbb_reports_reasons
-BEFORE INSERT
-AS
-BEGIN
- NEW.reason_id = GEN_ID(phpbb_reports_reasons_gen, 1);
-END;;
-
-
-# Table: 'phpbb_search_results'
-CREATE TABLE phpbb_search_results (
- search_key VARCHAR(32) CHARACTER SET NONE DEFAULT '' NOT NULL,
- search_time INTEGER DEFAULT 0 NOT NULL,
- search_keywords BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL,
- search_authors BLOB SUB_TYPE TEXT CHARACTER SET NONE DEFAULT '' NOT NULL
-);;
-
-ALTER TABLE phpbb_search_results ADD PRIMARY KEY (search_key);;
-
-
-# Table: 'phpbb_search_wordlist'
-CREATE TABLE phpbb_search_wordlist (
- word_id INTEGER NOT NULL,
- word_text VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
- word_common INTEGER DEFAULT 0 NOT NULL,
- word_count INTEGER DEFAULT 0 NOT NULL
-);;
-
-ALTER TABLE phpbb_search_wordlist ADD PRIMARY KEY (word_id);;
-
-CREATE UNIQUE INDEX phpbb_search_wordlist_wrd_txt ON phpbb_search_wordlist(word_text);;
-CREATE INDEX phpbb_search_wordlist_wrd_cnt ON phpbb_search_wordlist(word_count);;
-
-CREATE GENERATOR phpbb_search_wordlist_gen;;
-SET GENERATOR phpbb_search_wordlist_gen TO 0;;
-
-CREATE TRIGGER t_phpbb_search_wordlist FOR phpbb_search_wordlist
-BEFORE INSERT
-AS
-BEGIN
- NEW.word_id = GEN_ID(phpbb_search_wordlist_gen, 1);
-END;;
-
-
-# Table: 'phpbb_search_wordmatch'
-CREATE TABLE phpbb_search_wordmatch (
- post_id INTEGER DEFAULT 0 NOT NULL,
- word_id INTEGER DEFAULT 0 NOT NULL,
- title_match INTEGER DEFAULT 0 NOT NULL
-);;
-
-CREATE UNIQUE INDEX phpbb_search_wordmatch_unq_mtch ON phpbb_search_wordmatch(word_id, post_id, title_match);;
-CREATE INDEX phpbb_search_wordmatch_word_id ON phpbb_search_wordmatch(word_id);;
-CREATE INDEX phpbb_search_wordmatch_post_id ON phpbb_search_wordmatch(post_id);;
-
-# Table: 'phpbb_sessions'
-CREATE TABLE phpbb_sessions (
- session_id CHAR(32) CHARACTER SET NONE DEFAULT '' NOT NULL,
- session_user_id INTEGER DEFAULT 0 NOT NULL,
- session_forum_id INTEGER DEFAULT 0 NOT NULL,
- session_last_visit INTEGER DEFAULT 0 NOT NULL,
- session_start INTEGER DEFAULT 0 NOT NULL,
- session_time INTEGER DEFAULT 0 NOT NULL,
- session_ip VARCHAR(40) CHARACTER SET NONE DEFAULT '' NOT NULL,
- session_browser VARCHAR(150) CHARACTER SET NONE DEFAULT '' NOT NULL,
- session_forwarded_for VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL,
- session_page VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
- session_viewonline INTEGER DEFAULT 1 NOT NULL,
- session_autologin INTEGER DEFAULT 0 NOT NULL,
- session_admin INTEGER DEFAULT 0 NOT NULL
-);;
-
-ALTER TABLE phpbb_sessions ADD PRIMARY KEY (session_id);;
-
-CREATE INDEX phpbb_sessions_session_time ON phpbb_sessions(session_time);;
-CREATE INDEX phpbb_sessions_session_user_id ON phpbb_sessions(session_user_id);;
-CREATE INDEX phpbb_sessions_session_fid ON phpbb_sessions(session_forum_id);;
-
-# Table: 'phpbb_sessions_keys'
-CREATE TABLE phpbb_sessions_keys (
- key_id CHAR(32) CHARACTER SET NONE DEFAULT '' NOT NULL,
- user_id INTEGER DEFAULT 0 NOT NULL,
- last_ip VARCHAR(40) CHARACTER SET NONE DEFAULT '' NOT NULL,
- last_login INTEGER DEFAULT 0 NOT NULL
-);;
-
-ALTER TABLE phpbb_sessions_keys ADD PRIMARY KEY (key_id, user_id);;
-
-CREATE INDEX phpbb_sessions_keys_last_login ON phpbb_sessions_keys(last_login);;
-
-# Table: 'phpbb_sitelist'
-CREATE TABLE phpbb_sitelist (
- site_id INTEGER NOT NULL,
- site_ip VARCHAR(40) CHARACTER SET NONE DEFAULT '' NOT NULL,
- site_hostname VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL,
- ip_exclude INTEGER DEFAULT 0 NOT NULL
-);;
-
-ALTER TABLE phpbb_sitelist ADD PRIMARY KEY (site_id);;
-
-
-CREATE GENERATOR phpbb_sitelist_gen;;
-SET GENERATOR phpbb_sitelist_gen TO 0;;
-
-CREATE TRIGGER t_phpbb_sitelist FOR phpbb_sitelist
-BEFORE INSERT
-AS
-BEGIN
- NEW.site_id = GEN_ID(phpbb_sitelist_gen, 1);
-END;;
-
-
-# Table: 'phpbb_smilies'
-CREATE TABLE phpbb_smilies (
- smiley_id INTEGER NOT NULL,
- code VARCHAR(50) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
- emotion VARCHAR(50) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
- smiley_url VARCHAR(50) CHARACTER SET NONE DEFAULT '' NOT NULL,
- smiley_width INTEGER DEFAULT 0 NOT NULL,
- smiley_height INTEGER DEFAULT 0 NOT NULL,
- smiley_order INTEGER DEFAULT 0 NOT NULL,
- display_on_posting INTEGER DEFAULT 1 NOT NULL
-);;
-
-ALTER TABLE phpbb_smilies ADD PRIMARY KEY (smiley_id);;
-
-CREATE INDEX phpbb_smilies_display_on_post ON phpbb_smilies(display_on_posting);;
-
-CREATE GENERATOR phpbb_smilies_gen;;
-SET GENERATOR phpbb_smilies_gen TO 0;;
-
-CREATE TRIGGER t_phpbb_smilies FOR phpbb_smilies
-BEFORE INSERT
-AS
-BEGIN
- NEW.smiley_id = GEN_ID(phpbb_smilies_gen, 1);
-END;;
-
-
-# Table: 'phpbb_styles'
-CREATE TABLE phpbb_styles (
- style_id INTEGER NOT NULL,
- style_name VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
- style_copyright VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
- style_active INTEGER DEFAULT 1 NOT NULL,
- template_id INTEGER DEFAULT 0 NOT NULL,
- theme_id INTEGER DEFAULT 0 NOT NULL,
- imageset_id INTEGER DEFAULT 0 NOT NULL
-);;
-
-ALTER TABLE phpbb_styles ADD PRIMARY KEY (style_id);;
-
-CREATE UNIQUE INDEX phpbb_styles_style_name ON phpbb_styles(style_name);;
-CREATE INDEX phpbb_styles_template_id ON phpbb_styles(template_id);;
-CREATE INDEX phpbb_styles_theme_id ON phpbb_styles(theme_id);;
-CREATE INDEX phpbb_styles_imageset_id ON phpbb_styles(imageset_id);;
-
-CREATE GENERATOR phpbb_styles_gen;;
-SET GENERATOR phpbb_styles_gen TO 0;;
-
-CREATE TRIGGER t_phpbb_styles FOR phpbb_styles
-BEFORE INSERT
-AS
-BEGIN
- NEW.style_id = GEN_ID(phpbb_styles_gen, 1);
-END;;
-
-
-# Table: 'phpbb_styles_template'
-CREATE TABLE phpbb_styles_template (
- template_id INTEGER NOT NULL,
- template_name VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
- template_copyright VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
- template_path VARCHAR(100) CHARACTER SET NONE DEFAULT '' NOT NULL,
- bbcode_bitfield VARCHAR(255) CHARACTER SET NONE DEFAULT 'kNg=' NOT NULL,
- template_storedb INTEGER DEFAULT 0 NOT NULL,
- template_inherits_id INTEGER DEFAULT 0 NOT NULL,
- template_inherit_path VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL
-);;
-
-ALTER TABLE phpbb_styles_template ADD PRIMARY KEY (template_id);;
-
-CREATE UNIQUE INDEX phpbb_styles_template_tmplte_nm ON phpbb_styles_template(template_name);;
-
-CREATE GENERATOR phpbb_styles_template_gen;;
-SET GENERATOR phpbb_styles_template_gen TO 0;;
-
-CREATE TRIGGER t_phpbb_styles_template FOR phpbb_styles_template
-BEFORE INSERT
-AS
-BEGIN
- NEW.template_id = GEN_ID(phpbb_styles_template_gen, 1);
-END;;
-
-
-# Table: 'phpbb_styles_template_data'
-CREATE TABLE phpbb_styles_template_data (
- template_id INTEGER DEFAULT 0 NOT NULL,
- template_filename VARCHAR(100) CHARACTER SET NONE DEFAULT '' NOT NULL,
- template_included BLOB SUB_TYPE TEXT CHARACTER SET NONE DEFAULT '' NOT NULL,
- template_mtime INTEGER DEFAULT 0 NOT NULL,
- template_data BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL
-);;
-
-CREATE INDEX phpbb_styles_template_data_tid ON phpbb_styles_template_data(template_id);;
-CREATE INDEX phpbb_styles_template_data_tfn ON phpbb_styles_template_data(template_filename);;
-
-# Table: 'phpbb_styles_theme'
-CREATE TABLE phpbb_styles_theme (
- theme_id INTEGER NOT NULL,
- theme_name VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
- theme_copyright VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
- theme_path VARCHAR(100) CHARACTER SET NONE DEFAULT '' NOT NULL,
- theme_storedb INTEGER DEFAULT 0 NOT NULL,
- theme_mtime INTEGER DEFAULT 0 NOT NULL,
- theme_data BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL
-);;
-
-ALTER TABLE phpbb_styles_theme ADD PRIMARY KEY (theme_id);;
-
-CREATE UNIQUE INDEX phpbb_styles_theme_theme_name ON phpbb_styles_theme(theme_name);;
-
-CREATE GENERATOR phpbb_styles_theme_gen;;
-SET GENERATOR phpbb_styles_theme_gen TO 0;;
-
-CREATE TRIGGER t_phpbb_styles_theme FOR phpbb_styles_theme
-BEFORE INSERT
-AS
-BEGIN
- NEW.theme_id = GEN_ID(phpbb_styles_theme_gen, 1);
-END;;
-
-
-# Table: 'phpbb_styles_imageset'
-CREATE TABLE phpbb_styles_imageset (
- imageset_id INTEGER NOT NULL,
- imageset_name VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
- imageset_copyright VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
- imageset_path VARCHAR(100) CHARACTER SET NONE DEFAULT '' NOT NULL
-);;
-
-ALTER TABLE phpbb_styles_imageset ADD PRIMARY KEY (imageset_id);;
-
-CREATE UNIQUE INDEX phpbb_styles_imageset_imgset_nm ON phpbb_styles_imageset(imageset_name);;
-
-CREATE GENERATOR phpbb_styles_imageset_gen;;
-SET GENERATOR phpbb_styles_imageset_gen TO 0;;
-
-CREATE TRIGGER t_phpbb_styles_imageset FOR phpbb_styles_imageset
-BEFORE INSERT
-AS
-BEGIN
- NEW.imageset_id = GEN_ID(phpbb_styles_imageset_gen, 1);
-END;;
-
-
-# Table: 'phpbb_styles_imageset_data'
-CREATE TABLE phpbb_styles_imageset_data (
- image_id INTEGER NOT NULL,
- image_name VARCHAR(200) CHARACTER SET NONE DEFAULT '' NOT NULL,
- image_filename VARCHAR(200) CHARACTER SET NONE DEFAULT '' NOT NULL,
- image_lang VARCHAR(30) CHARACTER SET NONE DEFAULT '' NOT NULL,
- image_height INTEGER DEFAULT 0 NOT NULL,
- image_width INTEGER DEFAULT 0 NOT NULL,
- imageset_id INTEGER DEFAULT 0 NOT NULL
-);;
-
-ALTER TABLE phpbb_styles_imageset_data ADD PRIMARY KEY (image_id);;
-
-CREATE INDEX phpbb_styles_imageset_data_i_d ON phpbb_styles_imageset_data(imageset_id);;
-
-CREATE GENERATOR phpbb_styles_imageset_data_gen;;
-SET GENERATOR phpbb_styles_imageset_data_gen TO 0;;
-
-CREATE TRIGGER t_phpbb_styles_imageset_data FOR phpbb_styles_imageset_data
-BEFORE INSERT
-AS
-BEGIN
- NEW.image_id = GEN_ID(phpbb_styles_imageset_data_gen, 1);
-END;;
-
-
-# Table: 'phpbb_topics'
-CREATE TABLE phpbb_topics (
- topic_id INTEGER NOT NULL,
- forum_id INTEGER DEFAULT 0 NOT NULL,
- icon_id INTEGER DEFAULT 0 NOT NULL,
- topic_attachment INTEGER DEFAULT 0 NOT NULL,
- topic_approved INTEGER DEFAULT 1 NOT NULL,
- topic_reported INTEGER DEFAULT 0 NOT NULL,
- topic_title VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
- topic_poster INTEGER DEFAULT 0 NOT NULL,
- topic_time INTEGER DEFAULT 0 NOT NULL,
- topic_time_limit INTEGER DEFAULT 0 NOT NULL,
- topic_views INTEGER DEFAULT 0 NOT NULL,
- topic_replies INTEGER DEFAULT 0 NOT NULL,
- topic_replies_real INTEGER DEFAULT 0 NOT NULL,
- topic_status INTEGER DEFAULT 0 NOT NULL,
- topic_type INTEGER DEFAULT 0 NOT NULL,
- topic_first_post_id INTEGER DEFAULT 0 NOT NULL,
- topic_first_poster_name VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
- topic_first_poster_colour VARCHAR(6) CHARACTER SET NONE DEFAULT '' NOT NULL,
- topic_last_post_id INTEGER DEFAULT 0 NOT NULL,
- topic_last_poster_id INTEGER DEFAULT 0 NOT NULL,
- topic_last_poster_name VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
- topic_last_poster_colour VARCHAR(6) CHARACTER SET NONE DEFAULT '' NOT NULL,
- topic_last_post_subject VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
- topic_last_post_time INTEGER DEFAULT 0 NOT NULL,
- topic_last_view_time INTEGER DEFAULT 0 NOT NULL,
- topic_moved_id INTEGER DEFAULT 0 NOT NULL,
- topic_bumped INTEGER DEFAULT 0 NOT NULL,
- topic_bumper INTEGER DEFAULT 0 NOT NULL,
- poll_title VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
- poll_start INTEGER DEFAULT 0 NOT NULL,
- poll_length INTEGER DEFAULT 0 NOT NULL,
- poll_max_options INTEGER DEFAULT 1 NOT NULL,
- poll_last_vote INTEGER DEFAULT 0 NOT NULL,
- poll_vote_change INTEGER DEFAULT 0 NOT NULL
-);;
-
-ALTER TABLE phpbb_topics ADD PRIMARY KEY (topic_id);;
-
-CREATE INDEX phpbb_topics_forum_id ON phpbb_topics(forum_id);;
-CREATE INDEX phpbb_topics_forum_id_type ON phpbb_topics(forum_id, topic_type);;
-CREATE INDEX phpbb_topics_last_post_time ON phpbb_topics(topic_last_post_time);;
-CREATE INDEX phpbb_topics_topic_approved ON phpbb_topics(topic_approved);;
-CREATE INDEX phpbb_topics_forum_appr_last ON phpbb_topics(forum_id, topic_approved, topic_last_post_id);;
-CREATE INDEX phpbb_topics_fid_time_moved ON phpbb_topics(forum_id, topic_last_post_time, topic_moved_id);;
-
-CREATE GENERATOR phpbb_topics_gen;;
-SET GENERATOR phpbb_topics_gen TO 0;;
-
-CREATE TRIGGER t_phpbb_topics FOR phpbb_topics
-BEFORE INSERT
-AS
-BEGIN
- NEW.topic_id = GEN_ID(phpbb_topics_gen, 1);
-END;;
-
-
-# Table: 'phpbb_topics_track'
-CREATE TABLE phpbb_topics_track (
- user_id INTEGER DEFAULT 0 NOT NULL,
- topic_id INTEGER DEFAULT 0 NOT NULL,
- forum_id INTEGER DEFAULT 0 NOT NULL,
- mark_time INTEGER DEFAULT 0 NOT NULL
-);;
-
-ALTER TABLE phpbb_topics_track ADD PRIMARY KEY (user_id, topic_id);;
-
-CREATE INDEX phpbb_topics_track_topic_id ON phpbb_topics_track(topic_id);;
-CREATE INDEX phpbb_topics_track_forum_id ON phpbb_topics_track(forum_id);;
-
-# Table: 'phpbb_topics_posted'
-CREATE TABLE phpbb_topics_posted (
- user_id INTEGER DEFAULT 0 NOT NULL,
- topic_id INTEGER DEFAULT 0 NOT NULL,
- topic_posted INTEGER DEFAULT 0 NOT NULL
-);;
-
-ALTER TABLE phpbb_topics_posted ADD PRIMARY KEY (user_id, topic_id);;
-
-
-# Table: 'phpbb_topics_watch'
-CREATE TABLE phpbb_topics_watch (
- topic_id INTEGER DEFAULT 0 NOT NULL,
- user_id INTEGER DEFAULT 0 NOT NULL,
- notify_status INTEGER DEFAULT 0 NOT NULL
-);;
-
-CREATE INDEX phpbb_topics_watch_topic_id ON phpbb_topics_watch(topic_id);;
-CREATE INDEX phpbb_topics_watch_user_id ON phpbb_topics_watch(user_id);;
-CREATE INDEX phpbb_topics_watch_notify_stat ON phpbb_topics_watch(notify_status);;
-
-# Table: 'phpbb_user_group'
-CREATE TABLE phpbb_user_group (
- group_id INTEGER DEFAULT 0 NOT NULL,
- user_id INTEGER DEFAULT 0 NOT NULL,
- group_leader INTEGER DEFAULT 0 NOT NULL,
- user_pending INTEGER DEFAULT 1 NOT NULL
-);;
-
-CREATE INDEX phpbb_user_group_group_id ON phpbb_user_group(group_id);;
-CREATE INDEX phpbb_user_group_user_id ON phpbb_user_group(user_id);;
-CREATE INDEX phpbb_user_group_group_leader ON phpbb_user_group(group_leader);;
-
-# Table: 'phpbb_users'
-CREATE TABLE phpbb_users (
- user_id INTEGER NOT NULL,
- user_type INTEGER DEFAULT 0 NOT NULL,
- group_id INTEGER DEFAULT 3 NOT NULL,
- user_permissions BLOB SUB_TYPE TEXT CHARACTER SET NONE DEFAULT '' NOT NULL,
- user_perm_from INTEGER DEFAULT 0 NOT NULL,
- user_ip VARCHAR(40) CHARACTER SET NONE DEFAULT '' NOT NULL,
- user_regdate INTEGER DEFAULT 0 NOT NULL,
- username VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
- username_clean VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
- user_password VARCHAR(40) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
- user_passchg INTEGER DEFAULT 0 NOT NULL,
- user_pass_convert INTEGER DEFAULT 0 NOT NULL,
- user_email VARCHAR(100) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
- user_email_hash DOUBLE PRECISION DEFAULT 0 NOT NULL,
- user_birthday VARCHAR(10) CHARACTER SET NONE DEFAULT '' NOT NULL,
- user_lastvisit INTEGER DEFAULT 0 NOT NULL,
- user_lastmark INTEGER DEFAULT 0 NOT NULL,
- user_lastpost_time INTEGER DEFAULT 0 NOT NULL,
- user_lastpage VARCHAR(200) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
- user_last_confirm_key VARCHAR(10) CHARACTER SET NONE DEFAULT '' NOT NULL,
- user_last_search INTEGER DEFAULT 0 NOT NULL,
- user_warnings INTEGER DEFAULT 0 NOT NULL,
- user_last_warning INTEGER DEFAULT 0 NOT NULL,
- user_login_attempts INTEGER DEFAULT 0 NOT NULL,
- user_inactive_reason INTEGER DEFAULT 0 NOT NULL,
- user_inactive_time INTEGER DEFAULT 0 NOT NULL,
- user_posts INTEGER DEFAULT 0 NOT NULL,
- user_lang VARCHAR(30) CHARACTER SET NONE DEFAULT '' NOT NULL,
- user_timezone DOUBLE PRECISION DEFAULT 0 NOT NULL,
- user_dst INTEGER DEFAULT 0 NOT NULL,
- user_dateformat VARCHAR(30) CHARACTER SET UTF8 DEFAULT 'd M Y H:i' NOT NULL COLLATE UNICODE,
- user_style INTEGER DEFAULT 0 NOT NULL,
- user_rank INTEGER DEFAULT 0 NOT NULL,
- user_colour VARCHAR(6) CHARACTER SET NONE DEFAULT '' NOT NULL,
- user_new_privmsg INTEGER DEFAULT 0 NOT NULL,
- user_unread_privmsg INTEGER DEFAULT 0 NOT NULL,
- user_last_privmsg INTEGER DEFAULT 0 NOT NULL,
- user_message_rules INTEGER DEFAULT 0 NOT NULL,
- user_full_folder INTEGER DEFAULT -3 NOT NULL,
- user_emailtime INTEGER DEFAULT 0 NOT NULL,
- user_topic_show_days INTEGER DEFAULT 0 NOT NULL,
- user_topic_sortby_type VARCHAR(1) CHARACTER SET NONE DEFAULT 't' NOT NULL,
- user_topic_sortby_dir VARCHAR(1) CHARACTER SET NONE DEFAULT 'd' NOT NULL,
- user_post_show_days INTEGER DEFAULT 0 NOT NULL,
- user_post_sortby_type VARCHAR(1) CHARACTER SET NONE DEFAULT 't' NOT NULL,
- user_post_sortby_dir VARCHAR(1) CHARACTER SET NONE DEFAULT 'a' NOT NULL,
- user_notify INTEGER DEFAULT 0 NOT NULL,
- user_notify_pm INTEGER DEFAULT 1 NOT NULL,
- user_notify_type INTEGER DEFAULT 0 NOT NULL,
- user_allow_pm INTEGER DEFAULT 1 NOT NULL,
- user_allow_viewonline INTEGER DEFAULT 1 NOT NULL,
- user_allow_viewemail INTEGER DEFAULT 1 NOT NULL,
- user_allow_massemail INTEGER DEFAULT 1 NOT NULL,
- user_options INTEGER DEFAULT 230271 NOT NULL,
- user_avatar VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL,
- user_avatar_type INTEGER DEFAULT 0 NOT NULL,
- user_avatar_width INTEGER DEFAULT 0 NOT NULL,
- user_avatar_height INTEGER DEFAULT 0 NOT NULL,
- user_sig BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL,
- user_sig_bbcode_uid VARCHAR(8) CHARACTER SET NONE DEFAULT '' NOT NULL,
- user_sig_bbcode_bitfield VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL,
- user_from VARCHAR(100) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
- user_icq VARCHAR(15) CHARACTER SET NONE DEFAULT '' NOT NULL,
- user_aim VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
- user_yim VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
- user_msnm VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
- user_jabber VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
- user_website VARCHAR(200) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
- user_occ BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL,
- user_interests BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL,
- user_actkey VARCHAR(32) CHARACTER SET NONE DEFAULT '' NOT NULL,
- user_newpasswd VARCHAR(40) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
- user_form_salt VARCHAR(32) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
- user_new INTEGER DEFAULT 1 NOT NULL,
- user_reminded INTEGER DEFAULT 0 NOT NULL,
- user_reminded_time INTEGER DEFAULT 0 NOT NULL
-);;
-
-ALTER TABLE phpbb_users ADD PRIMARY KEY (user_id);;
-
-CREATE INDEX phpbb_users_user_birthday ON phpbb_users(user_birthday);;
-CREATE INDEX phpbb_users_user_email_hash ON phpbb_users(user_email_hash);;
-CREATE INDEX phpbb_users_user_type ON phpbb_users(user_type);;
-CREATE UNIQUE INDEX phpbb_users_username_clean ON phpbb_users(username_clean);;
-
-CREATE GENERATOR phpbb_users_gen;;
-SET GENERATOR phpbb_users_gen TO 0;;
-
-CREATE TRIGGER t_phpbb_users FOR phpbb_users
-BEFORE INSERT
-AS
-BEGIN
- NEW.user_id = GEN_ID(phpbb_users_gen, 1);
-END;;
-
-
-# Table: 'phpbb_warnings'
-CREATE TABLE phpbb_warnings (
- warning_id INTEGER NOT NULL,
- user_id INTEGER DEFAULT 0 NOT NULL,
- post_id INTEGER DEFAULT 0 NOT NULL,
- log_id INTEGER DEFAULT 0 NOT NULL,
- warning_time INTEGER DEFAULT 0 NOT NULL
-);;
-
-ALTER TABLE phpbb_warnings ADD PRIMARY KEY (warning_id);;
-
-
-CREATE GENERATOR phpbb_warnings_gen;;
-SET GENERATOR phpbb_warnings_gen TO 0;;
-
-CREATE TRIGGER t_phpbb_warnings FOR phpbb_warnings
-BEFORE INSERT
-AS
-BEGIN
- NEW.warning_id = GEN_ID(phpbb_warnings_gen, 1);
-END;;
-
-
-# Table: 'phpbb_words'
-CREATE TABLE phpbb_words (
- word_id INTEGER NOT NULL,
- word VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
- replacement VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE
-);;
-
-ALTER TABLE phpbb_words ADD PRIMARY KEY (word_id);;
-
-
-CREATE GENERATOR phpbb_words_gen;;
-SET GENERATOR phpbb_words_gen TO 0;;
-
-CREATE TRIGGER t_phpbb_words FOR phpbb_words
-BEFORE INSERT
-AS
-BEGIN
- NEW.word_id = GEN_ID(phpbb_words_gen, 1);
-END;;
-
-
-# Table: 'phpbb_zebra'
-CREATE TABLE phpbb_zebra (
- user_id INTEGER DEFAULT 0 NOT NULL,
- zebra_id INTEGER DEFAULT 0 NOT NULL,
- friend INTEGER DEFAULT 0 NOT NULL,
- foe INTEGER DEFAULT 0 NOT NULL
-);;
-
-ALTER TABLE phpbb_zebra ADD PRIMARY KEY (user_id, zebra_id);;
-
-
diff --git a/phpBB/install/schemas/mssql_schema.sql b/phpBB/install/schemas/mssql_schema.sql
index 68993d45ee..f88513cf0e 100644
--- a/phpBB/install/schemas/mssql_schema.sql
+++ b/phpBB/install/schemas/mssql_schema.sql
@@ -6,1791 +6,3 @@
* run it.
*/
-/*
- Table: 'phpbb_attachments'
-*/
-CREATE TABLE [phpbb_attachments] (
- [attach_id] [int] IDENTITY (1, 1) NOT NULL ,
- [post_msg_id] [int] DEFAULT (0) NOT NULL ,
- [topic_id] [int] DEFAULT (0) NOT NULL ,
- [in_message] [int] DEFAULT (0) NOT NULL ,
- [poster_id] [int] DEFAULT (0) NOT NULL ,
- [is_orphan] [int] DEFAULT (1) NOT NULL ,
- [physical_filename] [varchar] (255) DEFAULT ('') NOT NULL ,
- [real_filename] [varchar] (255) DEFAULT ('') NOT NULL ,
- [download_count] [int] DEFAULT (0) NOT NULL ,
- [attach_comment] [varchar] (4000) DEFAULT ('') NOT NULL ,
- [extension] [varchar] (100) DEFAULT ('') NOT NULL ,
- [mimetype] [varchar] (100) DEFAULT ('') NOT NULL ,
- [filesize] [int] DEFAULT (0) NOT NULL ,
- [filetime] [int] DEFAULT (0) NOT NULL ,
- [thumbnail] [int] DEFAULT (0) NOT NULL
-)GO
-
-ALTER TABLE [phpbb_attachments] WITH NOCHECK ADD
- CONSTRAINT [PK_phpbb_attachments] PRIMARY KEY CLUSTERED
- (
- [attach_id]
- )
-GO
-
-CREATE INDEX [filetime] ON [phpbb_attachments]([filetime])
-GO
-
-CREATE INDEX [post_msg_id] ON [phpbb_attachments]([post_msg_id])
-GO
-
-CREATE INDEX [topic_id] ON [phpbb_attachments]([topic_id])
-GO
-
-CREATE INDEX [poster_id] ON [phpbb_attachments]([poster_id])
-GO
-
-CREATE INDEX [is_orphan] ON [phpbb_attachments]([is_orphan])
-GO
-
-
-/*
- Table: 'phpbb_acl_groups'
-*/
-CREATE TABLE [phpbb_acl_groups] (
- [group_id] [int] DEFAULT (0) NOT NULL ,
- [forum_id] [int] DEFAULT (0) NOT NULL ,
- [auth_option_id] [int] DEFAULT (0) NOT NULL ,
- [auth_role_id] [int] DEFAULT (0) NOT NULL ,
- [auth_setting] [int] DEFAULT (0) NOT NULL ,
- [mssqlindex] [int] IDENTITY (1, 1) NOT NULL
-)GO
-
-ALTER TABLE [phpbb_acl_groups] WITH NOCHECK ADD
- CONSTRAINT [PK_phpbb_acl_groups] PRIMARY KEY CLUSTERED
- (
- [mssqlindex]
- )
-GO
-
-CREATE INDEX [group_id] ON [phpbb_acl_groups]([group_id])
-GO
-
-CREATE INDEX [auth_opt_id] ON [phpbb_acl_groups]([auth_option_id])
-GO
-
-CREATE INDEX [auth_role_id] ON [phpbb_acl_groups]([auth_role_id])
-GO
-
-
-/*
- Table: 'phpbb_acl_options'
-*/
-CREATE TABLE [phpbb_acl_options] (
- [auth_option_id] [int] IDENTITY (1, 1) NOT NULL ,
- [auth_option] [varchar] (50) DEFAULT ('') NOT NULL ,
- [is_global] [int] DEFAULT (0) NOT NULL ,
- [is_local] [int] DEFAULT (0) NOT NULL ,
- [founder_only] [int] DEFAULT (0) NOT NULL
-)GO
-
-ALTER TABLE [phpbb_acl_options] WITH NOCHECK ADD
- CONSTRAINT [PK_phpbb_acl_options] PRIMARY KEY CLUSTERED
- (
- [auth_option_id]
- )
-GO
-
-CREATE UNIQUE INDEX [auth_option] ON [phpbb_acl_options]([auth_option])
-GO
-
-
-/*
- Table: 'phpbb_acl_roles'
-*/
-CREATE TABLE [phpbb_acl_roles] (
- [role_id] [int] IDENTITY (1, 1) NOT NULL ,
- [role_name] [varchar] (255) DEFAULT ('') NOT NULL ,
- [role_description] [varchar] (4000) DEFAULT ('') NOT NULL ,
- [role_type] [varchar] (10) DEFAULT ('') NOT NULL ,
- [role_order] [int] DEFAULT (0) NOT NULL
-)GO
-
-ALTER TABLE [phpbb_acl_roles] WITH NOCHECK ADD
- CONSTRAINT [PK_phpbb_acl_roles] PRIMARY KEY CLUSTERED
- (
- [role_id]
- )
-GO
-
-CREATE INDEX [role_type] ON [phpbb_acl_roles]([role_type])
-GO
-
-CREATE INDEX [role_order] ON [phpbb_acl_roles]([role_order])
-GO
-
-
-/*
- Table: 'phpbb_acl_roles_data'
-*/
-CREATE TABLE [phpbb_acl_roles_data] (
- [role_id] [int] DEFAULT (0) NOT NULL ,
- [auth_option_id] [int] DEFAULT (0) NOT NULL ,
- [auth_setting] [int] DEFAULT (0) NOT NULL
-)GO
-
-ALTER TABLE [phpbb_acl_roles_data] WITH NOCHECK ADD
- CONSTRAINT [PK_phpbb_acl_roles_data] PRIMARY KEY CLUSTERED
- (
- [role_id],
- [auth_option_id]
- )
-GO
-
-CREATE INDEX [ath_op_id] ON [phpbb_acl_roles_data]([auth_option_id])
-GO
-
-
-/*
- Table: 'phpbb_acl_users'
-*/
-CREATE TABLE [phpbb_acl_users] (
- [user_id] [int] DEFAULT (0) NOT NULL ,
- [forum_id] [int] DEFAULT (0) NOT NULL ,
- [auth_option_id] [int] DEFAULT (0) NOT NULL ,
- [auth_role_id] [int] DEFAULT (0) NOT NULL ,
- [auth_setting] [int] DEFAULT (0) NOT NULL ,
- [mssqlindex] [int] IDENTITY (1, 1) NOT NULL
-)GO
-
-ALTER TABLE [phpbb_acl_users] WITH NOCHECK ADD
- CONSTRAINT [PK_phpbb_acl_users] PRIMARY KEY CLUSTERED
- (
- [mssqlindex]
- )
-GO
-
-CREATE INDEX [user_id] ON [phpbb_acl_users]([user_id])
-GO
-
-CREATE INDEX [auth_option_id] ON [phpbb_acl_users]([auth_option_id])
-GO
-
-CREATE INDEX [auth_role_id] ON [phpbb_acl_users]([auth_role_id])
-GO
-
-
-/*
- Table: 'phpbb_banlist'
-*/
-CREATE TABLE [phpbb_banlist] (
- [ban_id] [int] IDENTITY (1, 1) NOT NULL ,
- [ban_userid] [int] DEFAULT (0) NOT NULL ,
- [ban_ip] [varchar] (40) DEFAULT ('') NOT NULL ,
- [ban_email] [varchar] (100) DEFAULT ('') NOT NULL ,
- [ban_start] [int] DEFAULT (0) NOT NULL ,
- [ban_end] [int] DEFAULT (0) NOT NULL ,
- [ban_exclude] [int] DEFAULT (0) NOT NULL ,
- [ban_reason] [varchar] (255) DEFAULT ('') NOT NULL ,
- [ban_give_reason] [varchar] (255) DEFAULT ('') NOT NULL
-)GO
-
-ALTER TABLE [phpbb_banlist] WITH NOCHECK ADD
- CONSTRAINT [PK_phpbb_banlist] PRIMARY KEY CLUSTERED
- (
- [ban_id]
- )
-GO
-
-CREATE INDEX [ban_end] ON [phpbb_banlist]([ban_end])
-GO
-
-CREATE INDEX [ban_user] ON [phpbb_banlist]([ban_userid], [ban_exclude])
-GO
-
-CREATE INDEX [ban_email] ON [phpbb_banlist]([ban_email], [ban_exclude])
-GO
-
-CREATE INDEX [ban_ip] ON [phpbb_banlist]([ban_ip], [ban_exclude])
-GO
-
-
-/*
- Table: 'phpbb_bbcodes'
-*/
-CREATE TABLE [phpbb_bbcodes] (
- [bbcode_id] [int] DEFAULT (0) NOT NULL ,
- [bbcode_tag] [varchar] (16) DEFAULT ('') NOT NULL ,
- [bbcode_helpline] [varchar] (255) DEFAULT ('') NOT NULL ,
- [display_on_posting] [int] DEFAULT (0) NOT NULL ,
- [bbcode_match] [varchar] (4000) DEFAULT ('') NOT NULL ,
- [bbcode_tpl] [text] DEFAULT ('') NOT NULL ,
- [first_pass_match] [text] DEFAULT ('') NOT NULL ,
- [first_pass_replace] [text] DEFAULT ('') NOT NULL ,
- [second_pass_match] [text] DEFAULT ('') NOT NULL ,
- [second_pass_replace] [text] DEFAULT ('') NOT NULL
-)GO
-
-ALTER TABLE [phpbb_bbcodes] WITH NOCHECK ADD
- CONSTRAINT [PK_phpbb_bbcodes] PRIMARY KEY CLUSTERED
- (
- [bbcode_id]
- )
-GO
-
-CREATE INDEX [display_on_post] ON [phpbb_bbcodes]([display_on_posting])
-GO
-
-
-/*
- Table: 'phpbb_bookmarks'
-*/
-CREATE TABLE [phpbb_bookmarks] (
- [topic_id] [int] DEFAULT (0) NOT NULL ,
- [user_id] [int] DEFAULT (0) NOT NULL
-)GO
-
-ALTER TABLE [phpbb_bookmarks] WITH NOCHECK ADD
- CONSTRAINT [PK_phpbb_bookmarks] PRIMARY KEY CLUSTERED
- (
- [topic_id],
- [user_id]
- )
-GO
-
-
-/*
- Table: 'phpbb_bots'
-*/
-CREATE TABLE [phpbb_bots] (
- [bot_id] [int] IDENTITY (1, 1) NOT NULL ,
- [bot_active] [int] DEFAULT (1) NOT NULL ,
- [bot_name] [varchar] (255) DEFAULT ('') NOT NULL ,
- [user_id] [int] DEFAULT (0) NOT NULL ,
- [bot_agent] [varchar] (255) DEFAULT ('') NOT NULL ,
- [bot_ip] [varchar] (255) DEFAULT ('') NOT NULL
-)GO
-
-ALTER TABLE [phpbb_bots] WITH NOCHECK ADD
- CONSTRAINT [PK_phpbb_bots] PRIMARY KEY CLUSTERED
- (
- [bot_id]
- )
-GO
-
-CREATE INDEX [bot_active] ON [phpbb_bots]([bot_active])
-GO
-
-
-/*
- Table: 'phpbb_config'
-*/
-CREATE TABLE [phpbb_config] (
- [config_name] [varchar] (255) DEFAULT ('') NOT NULL ,
- [config_value] [varchar] (255) DEFAULT ('') NOT NULL ,
- [is_dynamic] [int] DEFAULT (0) NOT NULL
-)GO
-
-ALTER TABLE [phpbb_config] WITH NOCHECK ADD
- CONSTRAINT [PK_phpbb_config] PRIMARY KEY CLUSTERED
- (
- [config_name]
- )
-GO
-
-CREATE INDEX [is_dynamic] ON [phpbb_config]([is_dynamic])
-GO
-
-
-/*
- Table: 'phpbb_confirm'
-*/
-CREATE TABLE [phpbb_confirm] (
- [confirm_id] [char] (32) DEFAULT ('') NOT NULL ,
- [session_id] [char] (32) DEFAULT ('') NOT NULL ,
- [confirm_type] [int] DEFAULT (0) NOT NULL ,
- [code] [varchar] (8) DEFAULT ('') NOT NULL ,
- [seed] [int] DEFAULT (0) NOT NULL ,
- [attempts] [int] DEFAULT (0) NOT NULL
-)GO
-
-ALTER TABLE [phpbb_confirm] WITH NOCHECK ADD
- CONSTRAINT [PK_phpbb_confirm] PRIMARY KEY CLUSTERED
- (
- [session_id],
- [confirm_id]
- )
-GO
-
-CREATE INDEX [confirm_type] ON [phpbb_confirm]([confirm_type])
-GO
-
-
-/*
- Table: 'phpbb_disallow'
-*/
-CREATE TABLE [phpbb_disallow] (
- [disallow_id] [int] IDENTITY (1, 1) NOT NULL ,
- [disallow_username] [varchar] (255) DEFAULT ('') NOT NULL
-)GO
-
-ALTER TABLE [phpbb_disallow] WITH NOCHECK ADD
- CONSTRAINT [PK_phpbb_disallow] PRIMARY KEY CLUSTERED
- (
- [disallow_id]
- )
-GO
-
-
-/*
- Table: 'phpbb_drafts'
-*/
-CREATE TABLE [phpbb_drafts] (
- [draft_id] [int] IDENTITY (1, 1) NOT NULL ,
- [user_id] [int] DEFAULT (0) NOT NULL ,
- [topic_id] [int] DEFAULT (0) NOT NULL ,
- [forum_id] [int] DEFAULT (0) NOT NULL ,
- [save_time] [int] DEFAULT (0) NOT NULL ,
- [draft_subject] [varchar] (255) DEFAULT ('') NOT NULL ,
- [draft_message] [text] DEFAULT ('') NOT NULL
-)GO
-
-ALTER TABLE [phpbb_drafts] WITH NOCHECK ADD
- CONSTRAINT [PK_phpbb_drafts] PRIMARY KEY CLUSTERED
- (
- [draft_id]
- )
-GO
-
-CREATE INDEX [save_time] ON [phpbb_drafts]([save_time])
-GO
-
-
-/*
- Table: 'phpbb_extensions'
-*/
-CREATE TABLE [phpbb_extensions] (
- [extension_id] [int] IDENTITY (1, 1) NOT NULL ,
- [group_id] [int] DEFAULT (0) NOT NULL ,
- [extension] [varchar] (100) DEFAULT ('') NOT NULL
-)GO
-
-ALTER TABLE [phpbb_extensions] WITH NOCHECK ADD
- CONSTRAINT [PK_phpbb_extensions] PRIMARY KEY CLUSTERED
- (
- [extension_id]
- )
-GO
-
-
-/*
- Table: 'phpbb_extension_groups'
-*/
-CREATE TABLE [phpbb_extension_groups] (
- [group_id] [int] IDENTITY (1, 1) NOT NULL ,
- [group_name] [varchar] (255) DEFAULT ('') NOT NULL ,
- [cat_id] [int] DEFAULT (0) NOT NULL ,
- [allow_group] [int] DEFAULT (0) NOT NULL ,
- [download_mode] [int] DEFAULT (1) NOT NULL ,
- [upload_icon] [varchar] (255) DEFAULT ('') NOT NULL ,
- [max_filesize] [int] DEFAULT (0) NOT NULL ,
- [allowed_forums] [varchar] (8000) DEFAULT ('') NOT NULL ,
- [allow_in_pm] [int] DEFAULT (0) NOT NULL
-)GO
-
-ALTER TABLE [phpbb_extension_groups] WITH NOCHECK ADD
- CONSTRAINT [PK_phpbb_extension_groups] PRIMARY KEY CLUSTERED
- (
- [group_id]
- )
-GO
-
-
-/*
- Table: 'phpbb_forums'
-*/
-CREATE TABLE [phpbb_forums] (
- [forum_id] [int] IDENTITY (1, 1) NOT NULL ,
- [parent_id] [int] DEFAULT (0) NOT NULL ,
- [left_id] [int] DEFAULT (0) NOT NULL ,
- [right_id] [int] DEFAULT (0) NOT NULL ,
- [forum_parents] [text] DEFAULT ('') NOT NULL ,
- [forum_name] [varchar] (255) DEFAULT ('') NOT NULL ,
- [forum_desc] [varchar] (4000) DEFAULT ('') NOT NULL ,
- [forum_desc_bitfield] [varchar] (255) DEFAULT ('') NOT NULL ,
- [forum_desc_options] [int] DEFAULT (7) NOT NULL ,
- [forum_desc_uid] [varchar] (8) DEFAULT ('') NOT NULL ,
- [forum_link] [varchar] (255) DEFAULT ('') NOT NULL ,
- [forum_password] [varchar] (40) DEFAULT ('') NOT NULL ,
- [forum_style] [int] DEFAULT (0) NOT NULL ,
- [forum_image] [varchar] (255) DEFAULT ('') NOT NULL ,
- [forum_rules] [varchar] (4000) DEFAULT ('') NOT NULL ,
- [forum_rules_link] [varchar] (255) DEFAULT ('') NOT NULL ,
- [forum_rules_bitfield] [varchar] (255) DEFAULT ('') NOT NULL ,
- [forum_rules_options] [int] DEFAULT (7) NOT NULL ,
- [forum_rules_uid] [varchar] (8) DEFAULT ('') NOT NULL ,
- [forum_topics_per_page] [int] DEFAULT (0) NOT NULL ,
- [forum_type] [int] DEFAULT (0) NOT NULL ,
- [forum_status] [int] DEFAULT (0) NOT NULL ,
- [forum_posts] [int] DEFAULT (0) NOT NULL ,
- [forum_topics] [int] DEFAULT (0) NOT NULL ,
- [forum_topics_real] [int] DEFAULT (0) NOT NULL ,
- [forum_last_post_id] [int] DEFAULT (0) NOT NULL ,
- [forum_last_poster_id] [int] DEFAULT (0) NOT NULL ,
- [forum_last_post_subject] [varchar] (255) DEFAULT ('') NOT NULL ,
- [forum_last_post_time] [int] DEFAULT (0) NOT NULL ,
- [forum_last_poster_name] [varchar] (255) DEFAULT ('') NOT NULL ,
- [forum_last_poster_colour] [varchar] (6) DEFAULT ('') NOT NULL ,
- [forum_flags] [int] DEFAULT (32) NOT NULL ,
- [forum_options] [int] DEFAULT (0) NOT NULL ,
- [display_subforum_list] [int] DEFAULT (1) NOT NULL ,
- [display_on_index] [int] DEFAULT (1) NOT NULL ,
- [enable_indexing] [int] DEFAULT (1) NOT NULL ,
- [enable_icons] [int] DEFAULT (1) NOT NULL ,
- [enable_prune] [int] DEFAULT (0) NOT NULL ,
- [prune_next] [int] DEFAULT (0) NOT NULL ,
- [prune_days] [int] DEFAULT (0) NOT NULL ,
- [prune_viewed] [int] DEFAULT (0) NOT NULL ,
- [prune_freq] [int] DEFAULT (0) NOT NULL
-)GO
-
-ALTER TABLE [phpbb_forums] WITH NOCHECK ADD
- CONSTRAINT [PK_phpbb_forums] PRIMARY KEY CLUSTERED
- (
- [forum_id]
- )
-GO
-
-CREATE INDEX [left_right_id] ON [phpbb_forums]([left_id], [right_id])
-GO
-
-CREATE INDEX [forum_lastpost_id] ON [phpbb_forums]([forum_last_post_id])
-GO
-
-
-/*
- Table: 'phpbb_forums_access'
-*/
-CREATE TABLE [phpbb_forums_access] (
- [forum_id] [int] DEFAULT (0) NOT NULL ,
- [user_id] [int] DEFAULT (0) NOT NULL ,
- [session_id] [char] (32) DEFAULT ('') NOT NULL
-)GO
-
-ALTER TABLE [phpbb_forums_access] WITH NOCHECK ADD
- CONSTRAINT [PK_phpbb_forums_access] PRIMARY KEY CLUSTERED
- (
- [forum_id],
- [user_id],
- [session_id]
- )
-GO
-
-
-/*
- Table: 'phpbb_forums_track'
-*/
-CREATE TABLE [phpbb_forums_track] (
- [user_id] [int] DEFAULT (0) NOT NULL ,
- [forum_id] [int] DEFAULT (0) NOT NULL ,
- [mark_time] [int] DEFAULT (0) NOT NULL
-)GO
-
-ALTER TABLE [phpbb_forums_track] WITH NOCHECK ADD
- CONSTRAINT [PK_phpbb_forums_track] PRIMARY KEY CLUSTERED
- (
- [user_id],
- [forum_id]
- )
-GO
-
-
-/*
- Table: 'phpbb_forums_watch'
-*/
-CREATE TABLE [phpbb_forums_watch] (
- [forum_id] [int] DEFAULT (0) NOT NULL ,
- [user_id] [int] DEFAULT (0) NOT NULL ,
- [notify_status] [int] DEFAULT (0) NOT NULL ,
- [mssqlindex] [int] IDENTITY (1, 1) NOT NULL
-)GO
-
-ALTER TABLE [phpbb_forums_watch] WITH NOCHECK ADD
- CONSTRAINT [PK_phpbb_forums_watch] PRIMARY KEY CLUSTERED
- (
- [mssqlindex]
- )
-GO
-
-CREATE INDEX [forum_id] ON [phpbb_forums_watch]([forum_id])
-GO
-
-CREATE INDEX [user_id] ON [phpbb_forums_watch]([user_id])
-GO
-
-CREATE INDEX [notify_stat] ON [phpbb_forums_watch]([notify_status])
-GO
-
-
-/*
- Table: 'phpbb_groups'
-*/
-CREATE TABLE [phpbb_groups] (
- [group_id] [int] IDENTITY (1, 1) NOT NULL ,
- [group_type] [int] DEFAULT (1) NOT NULL ,
- [group_founder_manage] [int] DEFAULT (0) NOT NULL ,
- [group_skip_auth] [int] DEFAULT (0) NOT NULL ,
- [group_name] [varchar] (255) DEFAULT ('') NOT NULL ,
- [group_desc] [varchar] (4000) DEFAULT ('') NOT NULL ,
- [group_desc_bitfield] [varchar] (255) DEFAULT ('') NOT NULL ,
- [group_desc_options] [int] DEFAULT (7) NOT NULL ,
- [group_desc_uid] [varchar] (8) DEFAULT ('') NOT NULL ,
- [group_display] [int] DEFAULT (0) NOT NULL ,
- [group_avatar] [varchar] (255) DEFAULT ('') NOT NULL ,
- [group_avatar_type] [int] DEFAULT (0) NOT NULL ,
- [group_avatar_width] [int] DEFAULT (0) NOT NULL ,
- [group_avatar_height] [int] DEFAULT (0) NOT NULL ,
- [group_rank] [int] DEFAULT (0) NOT NULL ,
- [group_colour] [varchar] (6) DEFAULT ('') NOT NULL ,
- [group_sig_chars] [int] DEFAULT (0) NOT NULL ,
- [group_receive_pm] [int] DEFAULT (0) NOT NULL ,
- [group_message_limit] [int] DEFAULT (0) NOT NULL ,
- [group_max_recipients] [int] DEFAULT (0) NOT NULL ,
- [group_legend] [int] DEFAULT (1) NOT NULL
-)GO
-
-ALTER TABLE [phpbb_groups] WITH NOCHECK ADD
- CONSTRAINT [PK_phpbb_groups] PRIMARY KEY CLUSTERED
- (
- [group_id]
- )
-GO
-
-CREATE INDEX [group_legend_name] ON [phpbb_groups]([group_legend], [group_name])
-GO
-
-
-/*
- Table: 'phpbb_icons'
-*/
-CREATE TABLE [phpbb_icons] (
- [icons_id] [int] IDENTITY (1, 1) NOT NULL ,
- [icons_url] [varchar] (255) DEFAULT ('') NOT NULL ,
- [icons_width] [int] DEFAULT (0) NOT NULL ,
- [icons_height] [int] DEFAULT (0) NOT NULL ,
- [icons_order] [int] DEFAULT (0) NOT NULL ,
- [display_on_posting] [int] DEFAULT (1) NOT NULL
-)GO
-
-ALTER TABLE [phpbb_icons] WITH NOCHECK ADD
- CONSTRAINT [PK_phpbb_icons] PRIMARY KEY CLUSTERED
- (
- [icons_id]
- )
-GO
-
-CREATE INDEX [display_on_posting] ON [phpbb_icons]([display_on_posting])
-GO
-
-
-/*
- Table: 'phpbb_lang'
-*/
-CREATE TABLE [phpbb_lang] (
- [lang_id] [int] IDENTITY (1, 1) NOT NULL ,
- [lang_iso] [varchar] (30) DEFAULT ('') NOT NULL ,
- [lang_dir] [varchar] (30) DEFAULT ('') NOT NULL ,
- [lang_english_name] [varchar] (100) DEFAULT ('') NOT NULL ,
- [lang_local_name] [varchar] (255) DEFAULT ('') NOT NULL ,
- [lang_author] [varchar] (255) DEFAULT ('') NOT NULL
-)GO
-
-ALTER TABLE [phpbb_lang] WITH NOCHECK ADD
- CONSTRAINT [PK_phpbb_lang] PRIMARY KEY CLUSTERED
- (
- [lang_id]
- )
-GO
-
-CREATE INDEX [lang_iso] ON [phpbb_lang]([lang_iso])
-GO
-
-
-/*
- Table: 'phpbb_log'
-*/
-CREATE TABLE [phpbb_log] (
- [log_id] [int] IDENTITY (1, 1) NOT NULL ,
- [log_type] [int] DEFAULT (0) NOT NULL ,
- [user_id] [int] DEFAULT (0) NOT NULL ,
- [forum_id] [int] DEFAULT (0) NOT NULL ,
- [topic_id] [int] DEFAULT (0) NOT NULL ,
- [reportee_id] [int] DEFAULT (0) NOT NULL ,
- [log_ip] [varchar] (40) DEFAULT ('') NOT NULL ,
- [log_time] [int] DEFAULT (0) NOT NULL ,
- [log_operation] [varchar] (4000) DEFAULT ('') NOT NULL ,
- [log_data] [text] DEFAULT ('') NOT NULL
-)GO
-
-ALTER TABLE [phpbb_log] WITH NOCHECK ADD
- CONSTRAINT [PK_phpbb_log] PRIMARY KEY CLUSTERED
- (
- [log_id]
- )
-GO
-
-CREATE INDEX [log_type] ON [phpbb_log]([log_type])
-GO
-
-CREATE INDEX [forum_id] ON [phpbb_log]([forum_id])
-GO
-
-CREATE INDEX [topic_id] ON [phpbb_log]([topic_id])
-GO
-
-CREATE INDEX [reportee_id] ON [phpbb_log]([reportee_id])
-GO
-
-CREATE INDEX [user_id] ON [phpbb_log]([user_id])
-GO
-
-
-/*
- Table: 'phpbb_login_attempts'
-*/
-CREATE TABLE [phpbb_login_attempts] (
- [attempt_ip] [varchar] (40) DEFAULT ('') NOT NULL ,
- [attempt_browser] [varchar] (150) DEFAULT ('') NOT NULL ,
- [attempt_forwarded_for] [varchar] (255) DEFAULT ('') NOT NULL ,
- [attempt_time] [int] DEFAULT (0) NOT NULL ,
- [user_id] [int] DEFAULT (0) NOT NULL ,
- [username] [varchar] (255) DEFAULT (0) NOT NULL ,
- [username_clean] [varchar] (255) DEFAULT (0) NOT NULL ,
- [mssqlindex] [int] IDENTITY (1, 1) NOT NULL
-)GO
-
-ALTER TABLE [phpbb_login_attempts] WITH NOCHECK ADD
- CONSTRAINT [PK_phpbb_login_attempts] PRIMARY KEY CLUSTERED
- (
- [mssqlindex]
- )
-GO
-
-CREATE INDEX [att_ip] ON [phpbb_login_attempts]([attempt_ip], [attempt_time])
-GO
-
-CREATE INDEX [att_for] ON [phpbb_login_attempts]([attempt_forwarded_for], [attempt_time])
-GO
-
-CREATE INDEX [att_time] ON [phpbb_login_attempts]([attempt_time])
-GO
-
-CREATE INDEX [user_id] ON [phpbb_login_attempts]([user_id])
-GO
-
-
-/*
- Table: 'phpbb_moderator_cache'
-*/
-CREATE TABLE [phpbb_moderator_cache] (
- [forum_id] [int] DEFAULT (0) NOT NULL ,
- [user_id] [int] DEFAULT (0) NOT NULL ,
- [username] [varchar] (255) DEFAULT ('') NOT NULL ,
- [group_id] [int] DEFAULT (0) NOT NULL ,
- [group_name] [varchar] (255) DEFAULT ('') NOT NULL ,
- [display_on_index] [int] DEFAULT (1) NOT NULL ,
- [mssqlindex] [int] IDENTITY (1, 1) NOT NULL
-)GO
-
-ALTER TABLE [phpbb_moderator_cache] WITH NOCHECK ADD
- CONSTRAINT [PK_phpbb_moderator_cache] PRIMARY KEY CLUSTERED
- (
- [mssqlindex]
- )
-GO
-
-CREATE INDEX [disp_idx] ON [phpbb_moderator_cache]([display_on_index])
-GO
-
-CREATE INDEX [forum_id] ON [phpbb_moderator_cache]([forum_id])
-GO
-
-
-/*
- Table: 'phpbb_modules'
-*/
-CREATE TABLE [phpbb_modules] (
- [module_id] [int] IDENTITY (1, 1) NOT NULL ,
- [module_enabled] [int] DEFAULT (1) NOT NULL ,
- [module_display] [int] DEFAULT (1) NOT NULL ,
- [module_basename] [varchar] (255) DEFAULT ('') NOT NULL ,
- [module_class] [varchar] (10) DEFAULT ('') NOT NULL ,
- [parent_id] [int] DEFAULT (0) NOT NULL ,
- [left_id] [int] DEFAULT (0) NOT NULL ,
- [right_id] [int] DEFAULT (0) NOT NULL ,
- [module_langname] [varchar] (255) DEFAULT ('') NOT NULL ,
- [module_mode] [varchar] (255) DEFAULT ('') NOT NULL ,
- [module_auth] [varchar] (255) DEFAULT ('') NOT NULL
-)GO
-
-ALTER TABLE [phpbb_modules] WITH NOCHECK ADD
- CONSTRAINT [PK_phpbb_modules] PRIMARY KEY CLUSTERED
- (
- [module_id]
- )
-GO
-
-CREATE INDEX [left_right_id] ON [phpbb_modules]([left_id], [right_id])
-GO
-
-CREATE INDEX [module_enabled] ON [phpbb_modules]([module_enabled])
-GO
-
-CREATE INDEX [class_left_id] ON [phpbb_modules]([module_class], [left_id])
-GO
-
-
-/*
- Table: 'phpbb_poll_options'
-*/
-CREATE TABLE [phpbb_poll_options] (
- [poll_option_id] [int] DEFAULT (0) NOT NULL ,
- [topic_id] [int] DEFAULT (0) NOT NULL ,
- [poll_option_text] [varchar] (4000) DEFAULT ('') NOT NULL ,
- [poll_option_total] [int] DEFAULT (0) NOT NULL ,
- [mssqlindex] [int] IDENTITY (1, 1) NOT NULL
-)GO
-
-ALTER TABLE [phpbb_poll_options] WITH NOCHECK ADD
- CONSTRAINT [PK_phpbb_poll_options] PRIMARY KEY CLUSTERED
- (
- [mssqlindex]
- )
-GO
-
-CREATE INDEX [poll_opt_id] ON [phpbb_poll_options]([poll_option_id])
-GO
-
-CREATE INDEX [topic_id] ON [phpbb_poll_options]([topic_id])
-GO
-
-
-/*
- Table: 'phpbb_poll_votes'
-*/
-CREATE TABLE [phpbb_poll_votes] (
- [topic_id] [int] DEFAULT (0) NOT NULL ,
- [poll_option_id] [int] DEFAULT (0) NOT NULL ,
- [vote_user_id] [int] DEFAULT (0) NOT NULL ,
- [vote_user_ip] [varchar] (40) DEFAULT ('') NOT NULL ,
- [mssqlindex] [int] IDENTITY (1, 1) NOT NULL
-)GO
-
-ALTER TABLE [phpbb_poll_votes] WITH NOCHECK ADD
- CONSTRAINT [PK_phpbb_poll_votes] PRIMARY KEY CLUSTERED
- (
- [mssqlindex]
- )
-GO
-
-CREATE INDEX [topic_id] ON [phpbb_poll_votes]([topic_id])
-GO
-
-CREATE INDEX [vote_user_id] ON [phpbb_poll_votes]([vote_user_id])
-GO
-
-CREATE INDEX [vote_user_ip] ON [phpbb_poll_votes]([vote_user_ip])
-GO
-
-
-/*
- Table: 'phpbb_posts'
-*/
-CREATE TABLE [phpbb_posts] (
- [post_id] [int] IDENTITY (1, 1) NOT NULL ,
- [topic_id] [int] DEFAULT (0) NOT NULL ,
- [forum_id] [int] DEFAULT (0) NOT NULL ,
- [poster_id] [int] DEFAULT (0) NOT NULL ,
- [icon_id] [int] DEFAULT (0) NOT NULL ,
- [poster_ip] [varchar] (40) DEFAULT ('') NOT NULL ,
- [post_time] [int] DEFAULT (0) NOT NULL ,
- [post_approved] [int] DEFAULT (1) NOT NULL ,
- [post_reported] [int] DEFAULT (0) NOT NULL ,
- [enable_bbcode] [int] DEFAULT (1) NOT NULL ,
- [enable_smilies] [int] DEFAULT (1) NOT NULL ,
- [enable_magic_url] [int] DEFAULT (1) NOT NULL ,
- [enable_sig] [int] DEFAULT (1) NOT NULL ,
- [post_username] [varchar] (255) DEFAULT ('') NOT NULL ,
- [post_subject] [varchar] (255) DEFAULT ('') NOT NULL ,
- [post_text] [text] DEFAULT ('') NOT NULL ,
- [post_checksum] [varchar] (32) DEFAULT ('') NOT NULL ,
- [post_attachment] [int] DEFAULT (0) NOT NULL ,
- [bbcode_bitfield] [varchar] (255) DEFAULT ('') NOT NULL ,
- [bbcode_uid] [varchar] (8) DEFAULT ('') NOT NULL ,
- [post_postcount] [int] DEFAULT (1) NOT NULL ,
- [post_edit_time] [int] DEFAULT (0) NOT NULL ,
- [post_edit_reason] [varchar] (255) DEFAULT ('') NOT NULL ,
- [post_edit_user] [int] DEFAULT (0) NOT NULL ,
- [post_edit_count] [int] DEFAULT (0) NOT NULL ,
- [post_edit_locked] [int] DEFAULT (0) NOT NULL
-)GO
-
-ALTER TABLE [phpbb_posts] WITH NOCHECK ADD
- CONSTRAINT [PK_phpbb_posts] PRIMARY KEY CLUSTERED
- (
- [post_id]
- )
-GO
-
-CREATE INDEX [forum_id] ON [phpbb_posts]([forum_id])
-GO
-
-CREATE INDEX [topic_id] ON [phpbb_posts]([topic_id])
-GO
-
-CREATE INDEX [poster_ip] ON [phpbb_posts]([poster_ip])
-GO
-
-CREATE INDEX [poster_id] ON [phpbb_posts]([poster_id])
-GO
-
-CREATE INDEX [post_approved] ON [phpbb_posts]([post_approved])
-GO
-
-CREATE INDEX [post_username] ON [phpbb_posts]([post_username])
-GO
-
-CREATE INDEX [tid_post_time] ON [phpbb_posts]([topic_id], [post_time])
-GO
-
-
-/*
- Table: 'phpbb_privmsgs'
-*/
-CREATE TABLE [phpbb_privmsgs] (
- [msg_id] [int] IDENTITY (1, 1) NOT NULL ,
- [root_level] [int] DEFAULT (0) NOT NULL ,
- [author_id] [int] DEFAULT (0) NOT NULL ,
- [icon_id] [int] DEFAULT (0) NOT NULL ,
- [author_ip] [varchar] (40) DEFAULT ('') NOT NULL ,
- [message_time] [int] DEFAULT (0) NOT NULL ,
- [enable_bbcode] [int] DEFAULT (1) NOT NULL ,
- [enable_smilies] [int] DEFAULT (1) NOT NULL ,
- [enable_magic_url] [int] DEFAULT (1) NOT NULL ,
- [enable_sig] [int] DEFAULT (1) NOT NULL ,
- [message_subject] [varchar] (255) DEFAULT ('') NOT NULL ,
- [message_text] [text] DEFAULT ('') NOT NULL ,
- [message_edit_reason] [varchar] (255) DEFAULT ('') NOT NULL ,
- [message_edit_user] [int] DEFAULT (0) NOT NULL ,
- [message_attachment] [int] DEFAULT (0) NOT NULL ,
- [bbcode_bitfield] [varchar] (255) DEFAULT ('') NOT NULL ,
- [bbcode_uid] [varchar] (8) DEFAULT ('') NOT NULL ,
- [message_edit_time] [int] DEFAULT (0) NOT NULL ,
- [message_edit_count] [int] DEFAULT (0) NOT NULL ,
- [to_address] [varchar] (4000) DEFAULT ('') NOT NULL ,
- [bcc_address] [varchar] (4000) DEFAULT ('') NOT NULL ,
- [message_reported] [int] DEFAULT (0) NOT NULL
-)GO
-
-ALTER TABLE [phpbb_privmsgs] WITH NOCHECK ADD
- CONSTRAINT [PK_phpbb_privmsgs] PRIMARY KEY CLUSTERED
- (
- [msg_id]
- )
-GO
-
-CREATE INDEX [author_ip] ON [phpbb_privmsgs]([author_ip])
-GO
-
-CREATE INDEX [message_time] ON [phpbb_privmsgs]([message_time])
-GO
-
-CREATE INDEX [author_id] ON [phpbb_privmsgs]([author_id])
-GO
-
-CREATE INDEX [root_level] ON [phpbb_privmsgs]([root_level])
-GO
-
-
-/*
- Table: 'phpbb_privmsgs_folder'
-*/
-CREATE TABLE [phpbb_privmsgs_folder] (
- [folder_id] [int] IDENTITY (1, 1) NOT NULL ,
- [user_id] [int] DEFAULT (0) NOT NULL ,
- [folder_name] [varchar] (255) DEFAULT ('') NOT NULL ,
- [pm_count] [int] DEFAULT (0) NOT NULL
-)GO
-
-ALTER TABLE [phpbb_privmsgs_folder] WITH NOCHECK ADD
- CONSTRAINT [PK_phpbb_privmsgs_folder] PRIMARY KEY CLUSTERED
- (
- [folder_id]
- )
-GO
-
-CREATE INDEX [user_id] ON [phpbb_privmsgs_folder]([user_id])
-GO
-
-
-/*
- Table: 'phpbb_privmsgs_rules'
-*/
-CREATE TABLE [phpbb_privmsgs_rules] (
- [rule_id] [int] IDENTITY (1, 1) NOT NULL ,
- [user_id] [int] DEFAULT (0) NOT NULL ,
- [rule_check] [int] DEFAULT (0) NOT NULL ,
- [rule_connection] [int] DEFAULT (0) NOT NULL ,
- [rule_string] [varchar] (255) DEFAULT ('') NOT NULL ,
- [rule_user_id] [int] DEFAULT (0) NOT NULL ,
- [rule_group_id] [int] DEFAULT (0) NOT NULL ,
- [rule_action] [int] DEFAULT (0) NOT NULL ,
- [rule_folder_id] [int] DEFAULT (0) NOT NULL
-)GO
-
-ALTER TABLE [phpbb_privmsgs_rules] WITH NOCHECK ADD
- CONSTRAINT [PK_phpbb_privmsgs_rules] PRIMARY KEY CLUSTERED
- (
- [rule_id]
- )
-GO
-
-CREATE INDEX [user_id] ON [phpbb_privmsgs_rules]([user_id])
-GO
-
-
-/*
- Table: 'phpbb_privmsgs_to'
-*/
-CREATE TABLE [phpbb_privmsgs_to] (
- [msg_id] [int] DEFAULT (0) NOT NULL ,
- [user_id] [int] DEFAULT (0) NOT NULL ,
- [author_id] [int] DEFAULT (0) NOT NULL ,
- [pm_deleted] [int] DEFAULT (0) NOT NULL ,
- [pm_new] [int] DEFAULT (1) NOT NULL ,
- [pm_unread] [int] DEFAULT (1) NOT NULL ,
- [pm_replied] [int] DEFAULT (0) NOT NULL ,
- [pm_marked] [int] DEFAULT (0) NOT NULL ,
- [pm_forwarded] [int] DEFAULT (0) NOT NULL ,
- [folder_id] [int] DEFAULT (0) NOT NULL ,
- [mssqlindex] [int] IDENTITY (1, 1) NOT NULL
-)GO
-
-ALTER TABLE [phpbb_privmsgs_to] WITH NOCHECK ADD
- CONSTRAINT [PK_phpbb_privmsgs_to] PRIMARY KEY CLUSTERED
- (
- [mssqlindex]
- )
-GO
-
-CREATE INDEX [msg_id] ON [phpbb_privmsgs_to]([msg_id])
-GO
-
-CREATE INDEX [author_id] ON [phpbb_privmsgs_to]([author_id])
-GO
-
-CREATE INDEX [usr_flder_id] ON [phpbb_privmsgs_to]([user_id], [folder_id])
-GO
-
-
-/*
- Table: 'phpbb_profile_fields'
-*/
-CREATE TABLE [phpbb_profile_fields] (
- [field_id] [int] IDENTITY (1, 1) NOT NULL ,
- [field_name] [varchar] (255) DEFAULT ('') NOT NULL ,
- [field_type] [int] DEFAULT (0) NOT NULL ,
- [field_ident] [varchar] (20) DEFAULT ('') NOT NULL ,
- [field_length] [varchar] (20) DEFAULT ('') NOT NULL ,
- [field_minlen] [varchar] (255) DEFAULT ('') NOT NULL ,
- [field_maxlen] [varchar] (255) DEFAULT ('') NOT NULL ,
- [field_novalue] [varchar] (255) DEFAULT ('') NOT NULL ,
- [field_default_value] [varchar] (255) DEFAULT ('') NOT NULL ,
- [field_validation] [varchar] (20) DEFAULT ('') NOT NULL ,
- [field_required] [int] DEFAULT (0) NOT NULL ,
- [field_show_novalue] [int] DEFAULT (0) NOT NULL ,
- [field_show_on_reg] [int] DEFAULT (0) NOT NULL ,
- [field_show_on_vt] [int] DEFAULT (0) NOT NULL ,
- [field_show_profile] [int] DEFAULT (0) NOT NULL ,
- [field_hide] [int] DEFAULT (0) NOT NULL ,
- [field_no_view] [int] DEFAULT (0) NOT NULL ,
- [field_active] [int] DEFAULT (0) NOT NULL ,
- [field_order] [int] DEFAULT (0) NOT NULL
-)GO
-
-ALTER TABLE [phpbb_profile_fields] WITH NOCHECK ADD
- CONSTRAINT [PK_phpbb_profile_fields] PRIMARY KEY CLUSTERED
- (
- [field_id]
- )
-GO
-
-CREATE INDEX [fld_type] ON [phpbb_profile_fields]([field_type])
-GO
-
-CREATE INDEX [fld_ordr] ON [phpbb_profile_fields]([field_order])
-GO
-
-
-/*
- Table: 'phpbb_profile_fields_data'
-*/
-CREATE TABLE [phpbb_profile_fields_data] (
- [user_id] [int] DEFAULT (0) NOT NULL
-)GO
-
-ALTER TABLE [phpbb_profile_fields_data] WITH NOCHECK ADD
- CONSTRAINT [PK_phpbb_profile_fields_data] PRIMARY KEY CLUSTERED
- (
- [user_id]
- )
-GO
-
-
-/*
- Table: 'phpbb_profile_fields_lang'
-*/
-CREATE TABLE [phpbb_profile_fields_lang] (
- [field_id] [int] DEFAULT (0) NOT NULL ,
- [lang_id] [int] DEFAULT (0) NOT NULL ,
- [option_id] [int] DEFAULT (0) NOT NULL ,
- [field_type] [int] DEFAULT (0) NOT NULL ,
- [lang_value] [varchar] (255) DEFAULT ('') NOT NULL
-)GO
-
-ALTER TABLE [phpbb_profile_fields_lang] WITH NOCHECK ADD
- CONSTRAINT [PK_phpbb_profile_fields_lang] PRIMARY KEY CLUSTERED
- (
- [field_id],
- [lang_id],
- [option_id]
- )
-GO
-
-
-/*
- Table: 'phpbb_profile_lang'
-*/
-CREATE TABLE [phpbb_profile_lang] (
- [field_id] [int] DEFAULT (0) NOT NULL ,
- [lang_id] [int] DEFAULT (0) NOT NULL ,
- [lang_name] [varchar] (255) DEFAULT ('') NOT NULL ,
- [lang_explain] [varchar] (4000) DEFAULT ('') NOT NULL ,
- [lang_default_value] [varchar] (255) DEFAULT ('') NOT NULL
-)GO
-
-ALTER TABLE [phpbb_profile_lang] WITH NOCHECK ADD
- CONSTRAINT [PK_phpbb_profile_lang] PRIMARY KEY CLUSTERED
- (
- [field_id],
- [lang_id]
- )
-GO
-
-
-/*
- Table: 'phpbb_ranks'
-*/
-CREATE TABLE [phpbb_ranks] (
- [rank_id] [int] IDENTITY (1, 1) NOT NULL ,
- [rank_title] [varchar] (255) DEFAULT ('') NOT NULL ,
- [rank_min] [int] DEFAULT (0) NOT NULL ,
- [rank_special] [int] DEFAULT (0) NOT NULL ,
- [rank_image] [varchar] (255) DEFAULT ('') NOT NULL
-)GO
-
-ALTER TABLE [phpbb_ranks] WITH NOCHECK ADD
- CONSTRAINT [PK_phpbb_ranks] PRIMARY KEY CLUSTERED
- (
- [rank_id]
- )
-GO
-
-
-/*
- Table: 'phpbb_reports'
-*/
-CREATE TABLE [phpbb_reports] (
- [report_id] [int] IDENTITY (1, 1) NOT NULL ,
- [reason_id] [int] DEFAULT (0) NOT NULL ,
- [post_id] [int] DEFAULT (0) NOT NULL ,
- [pm_id] [int] DEFAULT (0) NOT NULL ,
- [user_id] [int] DEFAULT (0) NOT NULL ,
- [user_notify] [int] DEFAULT (0) NOT NULL ,
- [report_closed] [int] DEFAULT (0) NOT NULL ,
- [report_time] [int] DEFAULT (0) NOT NULL ,
- [report_text] [text] DEFAULT ('') NOT NULL
-)GO
-
-ALTER TABLE [phpbb_reports] WITH NOCHECK ADD
- CONSTRAINT [PK_phpbb_reports] PRIMARY KEY CLUSTERED
- (
- [report_id]
- )
-GO
-
-CREATE INDEX [post_id] ON [phpbb_reports]([post_id])
-GO
-
-CREATE INDEX [pm_id] ON [phpbb_reports]([pm_id])
-GO
-
-
-/*
- Table: 'phpbb_reports_reasons'
-*/
-CREATE TABLE [phpbb_reports_reasons] (
- [reason_id] [int] IDENTITY (1, 1) NOT NULL ,
- [reason_title] [varchar] (255) DEFAULT ('') NOT NULL ,
- [reason_description] [text] DEFAULT ('') NOT NULL ,
- [reason_order] [int] DEFAULT (0) NOT NULL
-)GO
-
-ALTER TABLE [phpbb_reports_reasons] WITH NOCHECK ADD
- CONSTRAINT [PK_phpbb_reports_reasons] PRIMARY KEY CLUSTERED
- (
- [reason_id]
- )
-GO
-
-
-/*
- Table: 'phpbb_search_results'
-*/
-CREATE TABLE [phpbb_search_results] (
- [search_key] [varchar] (32) DEFAULT ('') NOT NULL ,
- [search_time] [int] DEFAULT (0) NOT NULL ,
- [search_keywords] [text] DEFAULT ('') NOT NULL ,
- [search_authors] [text] DEFAULT ('') NOT NULL
-)GO
-
-ALTER TABLE [phpbb_search_results] WITH NOCHECK ADD
- CONSTRAINT [PK_phpbb_search_results] PRIMARY KEY CLUSTERED
- (
- [search_key]
- )
-GO
-
-
-/*
- Table: 'phpbb_search_wordlist'
-*/
-CREATE TABLE [phpbb_search_wordlist] (
- [word_id] [int] IDENTITY (1, 1) NOT NULL ,
- [word_text] [varchar] (255) DEFAULT ('') NOT NULL ,
- [word_common] [int] DEFAULT (0) NOT NULL ,
- [word_count] [int] DEFAULT (0) NOT NULL
-)GO
-
-ALTER TABLE [phpbb_search_wordlist] WITH NOCHECK ADD
- CONSTRAINT [PK_phpbb_search_wordlist] PRIMARY KEY CLUSTERED
- (
- [word_id]
- )
-GO
-
-CREATE UNIQUE INDEX [wrd_txt] ON [phpbb_search_wordlist]([word_text])
-GO
-
-CREATE INDEX [wrd_cnt] ON [phpbb_search_wordlist]([word_count])
-GO
-
-
-/*
- Table: 'phpbb_search_wordmatch'
-*/
-CREATE TABLE [phpbb_search_wordmatch] (
- [post_id] [int] DEFAULT (0) NOT NULL ,
- [word_id] [int] DEFAULT (0) NOT NULL ,
- [title_match] [int] DEFAULT (0) NOT NULL ,
- [mssqlindex] [int] IDENTITY (1, 1) NOT NULL
-)GO
-
-ALTER TABLE [phpbb_search_wordmatch] WITH NOCHECK ADD
- CONSTRAINT [PK_phpbb_search_wordmatch] PRIMARY KEY CLUSTERED
- (
- [mssqlindex]
- )
-GO
-
-CREATE UNIQUE INDEX [unq_mtch] ON [phpbb_search_wordmatch]([word_id], [post_id], [title_match])
-GO
-
-CREATE INDEX [word_id] ON [phpbb_search_wordmatch]([word_id])
-GO
-
-CREATE INDEX [post_id] ON [phpbb_search_wordmatch]([post_id])
-GO
-
-
-/*
- Table: 'phpbb_sessions'
-*/
-CREATE TABLE [phpbb_sessions] (
- [session_id] [char] (32) DEFAULT ('') NOT NULL ,
- [session_user_id] [int] DEFAULT (0) NOT NULL ,
- [session_forum_id] [int] DEFAULT (0) NOT NULL ,
- [session_last_visit] [int] DEFAULT (0) NOT NULL ,
- [session_start] [int] DEFAULT (0) NOT NULL ,
- [session_time] [int] DEFAULT (0) NOT NULL ,
- [session_ip] [varchar] (40) DEFAULT ('') NOT NULL ,
- [session_browser] [varchar] (150) DEFAULT ('') NOT NULL ,
- [session_forwarded_for] [varchar] (255) DEFAULT ('') NOT NULL ,
- [session_page] [varchar] (255) DEFAULT ('') NOT NULL ,
- [session_viewonline] [int] DEFAULT (1) NOT NULL ,
- [session_autologin] [int] DEFAULT (0) NOT NULL ,
- [session_admin] [int] DEFAULT (0) NOT NULL
-)GO
-
-ALTER TABLE [phpbb_sessions] WITH NOCHECK ADD
- CONSTRAINT [PK_phpbb_sessions] PRIMARY KEY CLUSTERED
- (
- [session_id]
- )
-GO
-
-CREATE INDEX [session_time] ON [phpbb_sessions]([session_time])
-GO
-
-CREATE INDEX [session_user_id] ON [phpbb_sessions]([session_user_id])
-GO
-
-CREATE INDEX [session_fid] ON [phpbb_sessions]([session_forum_id])
-GO
-
-
-/*
- Table: 'phpbb_sessions_keys'
-*/
-CREATE TABLE [phpbb_sessions_keys] (
- [key_id] [char] (32) DEFAULT ('') NOT NULL ,
- [user_id] [int] DEFAULT (0) NOT NULL ,
- [last_ip] [varchar] (40) DEFAULT ('') NOT NULL ,
- [last_login] [int] DEFAULT (0) NOT NULL
-)GO
-
-ALTER TABLE [phpbb_sessions_keys] WITH NOCHECK ADD
- CONSTRAINT [PK_phpbb_sessions_keys] PRIMARY KEY CLUSTERED
- (
- [key_id],
- [user_id]
- )
-GO
-
-CREATE INDEX [last_login] ON [phpbb_sessions_keys]([last_login])
-GO
-
-
-/*
- Table: 'phpbb_sitelist'
-*/
-CREATE TABLE [phpbb_sitelist] (
- [site_id] [int] IDENTITY (1, 1) NOT NULL ,
- [site_ip] [varchar] (40) DEFAULT ('') NOT NULL ,
- [site_hostname] [varchar] (255) DEFAULT ('') NOT NULL ,
- [ip_exclude] [int] DEFAULT (0) NOT NULL
-)GO
-
-ALTER TABLE [phpbb_sitelist] WITH NOCHECK ADD
- CONSTRAINT [PK_phpbb_sitelist] PRIMARY KEY CLUSTERED
- (
- [site_id]
- )
-GO
-
-
-/*
- Table: 'phpbb_smilies'
-*/
-CREATE TABLE [phpbb_smilies] (
- [smiley_id] [int] IDENTITY (1, 1) NOT NULL ,
- [code] [varchar] (50) DEFAULT ('') NOT NULL ,
- [emotion] [varchar] (50) DEFAULT ('') NOT NULL ,
- [smiley_url] [varchar] (50) DEFAULT ('') NOT NULL ,
- [smiley_width] [int] DEFAULT (0) NOT NULL ,
- [smiley_height] [int] DEFAULT (0) NOT NULL ,
- [smiley_order] [int] DEFAULT (0) NOT NULL ,
- [display_on_posting] [int] DEFAULT (1) NOT NULL
-)GO
-
-ALTER TABLE [phpbb_smilies] WITH NOCHECK ADD
- CONSTRAINT [PK_phpbb_smilies] PRIMARY KEY CLUSTERED
- (
- [smiley_id]
- )
-GO
-
-CREATE INDEX [display_on_post] ON [phpbb_smilies]([display_on_posting])
-GO
-
-
-/*
- Table: 'phpbb_styles'
-*/
-CREATE TABLE [phpbb_styles] (
- [style_id] [int] IDENTITY (1, 1) NOT NULL ,
- [style_name] [varchar] (255) DEFAULT ('') NOT NULL ,
- [style_copyright] [varchar] (255) DEFAULT ('') NOT NULL ,
- [style_active] [int] DEFAULT (1) NOT NULL ,
- [template_id] [int] DEFAULT (0) NOT NULL ,
- [theme_id] [int] DEFAULT (0) NOT NULL ,
- [imageset_id] [int] DEFAULT (0) NOT NULL
-)GO
-
-ALTER TABLE [phpbb_styles] WITH NOCHECK ADD
- CONSTRAINT [PK_phpbb_styles] PRIMARY KEY CLUSTERED
- (
- [style_id]
- )
-GO
-
-CREATE UNIQUE INDEX [style_name] ON [phpbb_styles]([style_name])
-GO
-
-CREATE INDEX [template_id] ON [phpbb_styles]([template_id])
-GO
-
-CREATE INDEX [theme_id] ON [phpbb_styles]([theme_id])
-GO
-
-CREATE INDEX [imageset_id] ON [phpbb_styles]([imageset_id])
-GO
-
-
-/*
- Table: 'phpbb_styles_template'
-*/
-CREATE TABLE [phpbb_styles_template] (
- [template_id] [int] IDENTITY (1, 1) NOT NULL ,
- [template_name] [varchar] (255) DEFAULT ('') NOT NULL ,
- [template_copyright] [varchar] (255) DEFAULT ('') NOT NULL ,
- [template_path] [varchar] (100) DEFAULT ('') NOT NULL ,
- [bbcode_bitfield] [varchar] (255) DEFAULT ('kNg=') NOT NULL ,
- [template_storedb] [int] DEFAULT (0) NOT NULL ,
- [template_inherits_id] [int] DEFAULT (0) NOT NULL ,
- [template_inherit_path] [varchar] (255) DEFAULT ('') NOT NULL
-)GO
-
-ALTER TABLE [phpbb_styles_template] WITH NOCHECK ADD
- CONSTRAINT [PK_phpbb_styles_template] PRIMARY KEY CLUSTERED
- (
- [template_id]
- )
-GO
-
-CREATE UNIQUE INDEX [tmplte_nm] ON [phpbb_styles_template]([template_name])
-GO
-
-
-/*
- Table: 'phpbb_styles_template_data'
-*/
-CREATE TABLE [phpbb_styles_template_data] (
- [template_id] [int] DEFAULT (0) NOT NULL ,
- [template_filename] [varchar] (100) DEFAULT ('') NOT NULL ,
- [template_included] [varchar] (8000) DEFAULT ('') NOT NULL ,
- [template_mtime] [int] DEFAULT (0) NOT NULL ,
- [template_data] [text] DEFAULT ('') NOT NULL ,
- [mssqlindex] [int] IDENTITY (1, 1) NOT NULL
-)GO
-
-ALTER TABLE [phpbb_styles_template_data] WITH NOCHECK ADD
- CONSTRAINT [PK_phpbb_styles_template_data] PRIMARY KEY CLUSTERED
- (
- [mssqlindex]
- )
-GO
-
-CREATE INDEX [tid] ON [phpbb_styles_template_data]([template_id])
-GO
-
-CREATE INDEX [tfn] ON [phpbb_styles_template_data]([template_filename])
-GO
-
-
-/*
- Table: 'phpbb_styles_theme'
-*/
-CREATE TABLE [phpbb_styles_theme] (
- [theme_id] [int] IDENTITY (1, 1) NOT NULL ,
- [theme_name] [varchar] (255) DEFAULT ('') NOT NULL ,
- [theme_copyright] [varchar] (255) DEFAULT ('') NOT NULL ,
- [theme_path] [varchar] (100) DEFAULT ('') NOT NULL ,
- [theme_storedb] [int] DEFAULT (0) NOT NULL ,
- [theme_mtime] [int] DEFAULT (0) NOT NULL ,
- [theme_data] [text] DEFAULT ('') NOT NULL
-)GO
-
-ALTER TABLE [phpbb_styles_theme] WITH NOCHECK ADD
- CONSTRAINT [PK_phpbb_styles_theme] PRIMARY KEY CLUSTERED
- (
- [theme_id]
- )
-GO
-
-CREATE UNIQUE INDEX [theme_name] ON [phpbb_styles_theme]([theme_name])
-GO
-
-
-/*
- Table: 'phpbb_styles_imageset'
-*/
-CREATE TABLE [phpbb_styles_imageset] (
- [imageset_id] [int] IDENTITY (1, 1) NOT NULL ,
- [imageset_name] [varchar] (255) DEFAULT ('') NOT NULL ,
- [imageset_copyright] [varchar] (255) DEFAULT ('') NOT NULL ,
- [imageset_path] [varchar] (100) DEFAULT ('') NOT NULL
-)GO
-
-ALTER TABLE [phpbb_styles_imageset] WITH NOCHECK ADD
- CONSTRAINT [PK_phpbb_styles_imageset] PRIMARY KEY CLUSTERED
- (
- [imageset_id]
- )
-GO
-
-CREATE UNIQUE INDEX [imgset_nm] ON [phpbb_styles_imageset]([imageset_name])
-GO
-
-
-/*
- Table: 'phpbb_styles_imageset_data'
-*/
-CREATE TABLE [phpbb_styles_imageset_data] (
- [image_id] [int] IDENTITY (1, 1) NOT NULL ,
- [image_name] [varchar] (200) DEFAULT ('') NOT NULL ,
- [image_filename] [varchar] (200) DEFAULT ('') NOT NULL ,
- [image_lang] [varchar] (30) DEFAULT ('') NOT NULL ,
- [image_height] [int] DEFAULT (0) NOT NULL ,
- [image_width] [int] DEFAULT (0) NOT NULL ,
- [imageset_id] [int] DEFAULT (0) NOT NULL
-)GO
-
-ALTER TABLE [phpbb_styles_imageset_data] WITH NOCHECK ADD
- CONSTRAINT [PK_phpbb_styles_imageset_data] PRIMARY KEY CLUSTERED
- (
- [image_id]
- )
-GO
-
-CREATE INDEX [i_d] ON [phpbb_styles_imageset_data]([imageset_id])
-GO
-
-
-/*
- Table: 'phpbb_topics'
-*/
-CREATE TABLE [phpbb_topics] (
- [topic_id] [int] IDENTITY (1, 1) NOT NULL ,
- [forum_id] [int] DEFAULT (0) NOT NULL ,
- [icon_id] [int] DEFAULT (0) NOT NULL ,
- [topic_attachment] [int] DEFAULT (0) NOT NULL ,
- [topic_approved] [int] DEFAULT (1) NOT NULL ,
- [topic_reported] [int] DEFAULT (0) NOT NULL ,
- [topic_title] [varchar] (255) DEFAULT ('') NOT NULL ,
- [topic_poster] [int] DEFAULT (0) NOT NULL ,
- [topic_time] [int] DEFAULT (0) NOT NULL ,
- [topic_time_limit] [int] DEFAULT (0) NOT NULL ,
- [topic_views] [int] DEFAULT (0) NOT NULL ,
- [topic_replies] [int] DEFAULT (0) NOT NULL ,
- [topic_replies_real] [int] DEFAULT (0) NOT NULL ,
- [topic_status] [int] DEFAULT (0) NOT NULL ,
- [topic_type] [int] DEFAULT (0) NOT NULL ,
- [topic_first_post_id] [int] DEFAULT (0) NOT NULL ,
- [topic_first_poster_name] [varchar] (255) DEFAULT ('') NOT NULL ,
- [topic_first_poster_colour] [varchar] (6) DEFAULT ('') NOT NULL ,
- [topic_last_post_id] [int] DEFAULT (0) NOT NULL ,
- [topic_last_poster_id] [int] DEFAULT (0) NOT NULL ,
- [topic_last_poster_name] [varchar] (255) DEFAULT ('') NOT NULL ,
- [topic_last_poster_colour] [varchar] (6) DEFAULT ('') NOT NULL ,
- [topic_last_post_subject] [varchar] (255) DEFAULT ('') NOT NULL ,
- [topic_last_post_time] [int] DEFAULT (0) NOT NULL ,
- [topic_last_view_time] [int] DEFAULT (0) NOT NULL ,
- [topic_moved_id] [int] DEFAULT (0) NOT NULL ,
- [topic_bumped] [int] DEFAULT (0) NOT NULL ,
- [topic_bumper] [int] DEFAULT (0) NOT NULL ,
- [poll_title] [varchar] (255) DEFAULT ('') NOT NULL ,
- [poll_start] [int] DEFAULT (0) NOT NULL ,
- [poll_length] [int] DEFAULT (0) NOT NULL ,
- [poll_max_options] [int] DEFAULT (1) NOT NULL ,
- [poll_last_vote] [int] DEFAULT (0) NOT NULL ,
- [poll_vote_change] [int] DEFAULT (0) NOT NULL
-)GO
-
-ALTER TABLE [phpbb_topics] WITH NOCHECK ADD
- CONSTRAINT [PK_phpbb_topics] PRIMARY KEY CLUSTERED
- (
- [topic_id]
- )
-GO
-
-CREATE INDEX [forum_id] ON [phpbb_topics]([forum_id])
-GO
-
-CREATE INDEX [forum_id_type] ON [phpbb_topics]([forum_id], [topic_type])
-GO
-
-CREATE INDEX [last_post_time] ON [phpbb_topics]([topic_last_post_time])
-GO
-
-CREATE INDEX [topic_approved] ON [phpbb_topics]([topic_approved])
-GO
-
-CREATE INDEX [forum_appr_last] ON [phpbb_topics]([forum_id], [topic_approved], [topic_last_post_id])
-GO
-
-CREATE INDEX [fid_time_moved] ON [phpbb_topics]([forum_id], [topic_last_post_time], [topic_moved_id])
-GO
-
-
-/*
- Table: 'phpbb_topics_track'
-*/
-CREATE TABLE [phpbb_topics_track] (
- [user_id] [int] DEFAULT (0) NOT NULL ,
- [topic_id] [int] DEFAULT (0) NOT NULL ,
- [forum_id] [int] DEFAULT (0) NOT NULL ,
- [mark_time] [int] DEFAULT (0) NOT NULL
-)GO
-
-ALTER TABLE [phpbb_topics_track] WITH NOCHECK ADD
- CONSTRAINT [PK_phpbb_topics_track] PRIMARY KEY CLUSTERED
- (
- [user_id],
- [topic_id]
- )
-GO
-
-CREATE INDEX [topic_id] ON [phpbb_topics_track]([topic_id])
-GO
-
-CREATE INDEX [forum_id] ON [phpbb_topics_track]([forum_id])
-GO
-
-
-/*
- Table: 'phpbb_topics_posted'
-*/
-CREATE TABLE [phpbb_topics_posted] (
- [user_id] [int] DEFAULT (0) NOT NULL ,
- [topic_id] [int] DEFAULT (0) NOT NULL ,
- [topic_posted] [int] DEFAULT (0) NOT NULL
-)GO
-
-ALTER TABLE [phpbb_topics_posted] WITH NOCHECK ADD
- CONSTRAINT [PK_phpbb_topics_posted] PRIMARY KEY CLUSTERED
- (
- [user_id],
- [topic_id]
- )
-GO
-
-
-/*
- Table: 'phpbb_topics_watch'
-*/
-CREATE TABLE [phpbb_topics_watch] (
- [topic_id] [int] DEFAULT (0) NOT NULL ,
- [user_id] [int] DEFAULT (0) NOT NULL ,
- [notify_status] [int] DEFAULT (0) NOT NULL ,
- [mssqlindex] [int] IDENTITY (1, 1) NOT NULL
-)GO
-
-ALTER TABLE [phpbb_topics_watch] WITH NOCHECK ADD
- CONSTRAINT [PK_phpbb_topics_watch] PRIMARY KEY CLUSTERED
- (
- [mssqlindex]
- )
-GO
-
-CREATE INDEX [topic_id] ON [phpbb_topics_watch]([topic_id])
-GO
-
-CREATE INDEX [user_id] ON [phpbb_topics_watch]([user_id])
-GO
-
-CREATE INDEX [notify_stat] ON [phpbb_topics_watch]([notify_status])
-GO
-
-
-/*
- Table: 'phpbb_user_group'
-*/
-CREATE TABLE [phpbb_user_group] (
- [group_id] [int] DEFAULT (0) NOT NULL ,
- [user_id] [int] DEFAULT (0) NOT NULL ,
- [group_leader] [int] DEFAULT (0) NOT NULL ,
- [user_pending] [int] DEFAULT (1) NOT NULL ,
- [mssqlindex] [int] IDENTITY (1, 1) NOT NULL
-)GO
-
-ALTER TABLE [phpbb_user_group] WITH NOCHECK ADD
- CONSTRAINT [PK_phpbb_user_group] PRIMARY KEY CLUSTERED
- (
- [mssqlindex]
- )
-GO
-
-CREATE INDEX [group_id] ON [phpbb_user_group]([group_id])
-GO
-
-CREATE INDEX [user_id] ON [phpbb_user_group]([user_id])
-GO
-
-CREATE INDEX [group_leader] ON [phpbb_user_group]([group_leader])
-GO
-
-
-/*
- Table: 'phpbb_users'
-*/
-CREATE TABLE [phpbb_users] (
- [user_id] [int] IDENTITY (1, 1) NOT NULL ,
- [user_type] [int] DEFAULT (0) NOT NULL ,
- [group_id] [int] DEFAULT (3) NOT NULL ,
- [user_permissions] [text] DEFAULT ('') NOT NULL ,
- [user_perm_from] [int] DEFAULT (0) NOT NULL ,
- [user_ip] [varchar] (40) DEFAULT ('') NOT NULL ,
- [user_regdate] [int] DEFAULT (0) NOT NULL ,
- [username] [varchar] (255) DEFAULT ('') NOT NULL ,
- [username_clean] [varchar] (255) DEFAULT ('') NOT NULL ,
- [user_password] [varchar] (40) DEFAULT ('') NOT NULL ,
- [user_passchg] [int] DEFAULT (0) NOT NULL ,
- [user_pass_convert] [int] DEFAULT (0) NOT NULL ,
- [user_email] [varchar] (100) DEFAULT ('') NOT NULL ,
- [user_email_hash] [float] DEFAULT (0) NOT NULL ,
- [user_birthday] [varchar] (10) DEFAULT ('') NOT NULL ,
- [user_lastvisit] [int] DEFAULT (0) NOT NULL ,
- [user_lastmark] [int] DEFAULT (0) NOT NULL ,
- [user_lastpost_time] [int] DEFAULT (0) NOT NULL ,
- [user_lastpage] [varchar] (200) DEFAULT ('') NOT NULL ,
- [user_last_confirm_key] [varchar] (10) DEFAULT ('') NOT NULL ,
- [user_last_search] [int] DEFAULT (0) NOT NULL ,
- [user_warnings] [int] DEFAULT (0) NOT NULL ,
- [user_last_warning] [int] DEFAULT (0) NOT NULL ,
- [user_login_attempts] [int] DEFAULT (0) NOT NULL ,
- [user_inactive_reason] [int] DEFAULT (0) NOT NULL ,
- [user_inactive_time] [int] DEFAULT (0) NOT NULL ,
- [user_posts] [int] DEFAULT (0) NOT NULL ,
- [user_lang] [varchar] (30) DEFAULT ('') NOT NULL ,
- [user_timezone] [float] DEFAULT (0) NOT NULL ,
- [user_dst] [int] DEFAULT (0) NOT NULL ,
- [user_dateformat] [varchar] (30) DEFAULT ('d M Y H:i') NOT NULL ,
- [user_style] [int] DEFAULT (0) NOT NULL ,
- [user_rank] [int] DEFAULT (0) NOT NULL ,
- [user_colour] [varchar] (6) DEFAULT ('') NOT NULL ,
- [user_new_privmsg] [int] DEFAULT (0) NOT NULL ,
- [user_unread_privmsg] [int] DEFAULT (0) NOT NULL ,
- [user_last_privmsg] [int] DEFAULT (0) NOT NULL ,
- [user_message_rules] [int] DEFAULT (0) NOT NULL ,
- [user_full_folder] [int] DEFAULT (-3) NOT NULL ,
- [user_emailtime] [int] DEFAULT (0) NOT NULL ,
- [user_topic_show_days] [int] DEFAULT (0) NOT NULL ,
- [user_topic_sortby_type] [varchar] (1) DEFAULT ('t') NOT NULL ,
- [user_topic_sortby_dir] [varchar] (1) DEFAULT ('d') NOT NULL ,
- [user_post_show_days] [int] DEFAULT (0) NOT NULL ,
- [user_post_sortby_type] [varchar] (1) DEFAULT ('t') NOT NULL ,
- [user_post_sortby_dir] [varchar] (1) DEFAULT ('a') NOT NULL ,
- [user_notify] [int] DEFAULT (0) NOT NULL ,
- [user_notify_pm] [int] DEFAULT (1) NOT NULL ,
- [user_notify_type] [int] DEFAULT (0) NOT NULL ,
- [user_allow_pm] [int] DEFAULT (1) NOT NULL ,
- [user_allow_viewonline] [int] DEFAULT (1) NOT NULL ,
- [user_allow_viewemail] [int] DEFAULT (1) NOT NULL ,
- [user_allow_massemail] [int] DEFAULT (1) NOT NULL ,
- [user_options] [int] DEFAULT (230271) NOT NULL ,
- [user_avatar] [varchar] (255) DEFAULT ('') NOT NULL ,
- [user_avatar_type] [int] DEFAULT (0) NOT NULL ,
- [user_avatar_width] [int] DEFAULT (0) NOT NULL ,
- [user_avatar_height] [int] DEFAULT (0) NOT NULL ,
- [user_sig] [text] DEFAULT ('') NOT NULL ,
- [user_sig_bbcode_uid] [varchar] (8) DEFAULT ('') NOT NULL ,
- [user_sig_bbcode_bitfield] [varchar] (255) DEFAULT ('') NOT NULL ,
- [user_from] [varchar] (100) DEFAULT ('') NOT NULL ,
- [user_icq] [varchar] (15) DEFAULT ('') NOT NULL ,
- [user_aim] [varchar] (255) DEFAULT ('') NOT NULL ,
- [user_yim] [varchar] (255) DEFAULT ('') NOT NULL ,
- [user_msnm] [varchar] (255) DEFAULT ('') NOT NULL ,
- [user_jabber] [varchar] (255) DEFAULT ('') NOT NULL ,
- [user_website] [varchar] (200) DEFAULT ('') NOT NULL ,
- [user_occ] [varchar] (4000) DEFAULT ('') NOT NULL ,
- [user_interests] [varchar] (4000) DEFAULT ('') NOT NULL ,
- [user_actkey] [varchar] (32) DEFAULT ('') NOT NULL ,
- [user_newpasswd] [varchar] (40) DEFAULT ('') NOT NULL ,
- [user_form_salt] [varchar] (32) DEFAULT ('') NOT NULL ,
- [user_new] [int] DEFAULT (1) NOT NULL ,
- [user_reminded] [int] DEFAULT (0) NOT NULL ,
- [user_reminded_time] [int] DEFAULT (0) NOT NULL
-)GO
-
-ALTER TABLE [phpbb_users] WITH NOCHECK ADD
- CONSTRAINT [PK_phpbb_users] PRIMARY KEY CLUSTERED
- (
- [user_id]
- )
-GO
-
-CREATE INDEX [user_birthday] ON [phpbb_users]([user_birthday])
-GO
-
-CREATE INDEX [user_email_hash] ON [phpbb_users]([user_email_hash])
-GO
-
-CREATE INDEX [user_type] ON [phpbb_users]([user_type])
-GO
-
-CREATE UNIQUE INDEX [username_clean] ON [phpbb_users]([username_clean])
-GO
-
-
-/*
- Table: 'phpbb_warnings'
-*/
-CREATE TABLE [phpbb_warnings] (
- [warning_id] [int] IDENTITY (1, 1) NOT NULL ,
- [user_id] [int] DEFAULT (0) NOT NULL ,
- [post_id] [int] DEFAULT (0) NOT NULL ,
- [log_id] [int] DEFAULT (0) NOT NULL ,
- [warning_time] [int] DEFAULT (0) NOT NULL
-)GO
-
-ALTER TABLE [phpbb_warnings] WITH NOCHECK ADD
- CONSTRAINT [PK_phpbb_warnings] PRIMARY KEY CLUSTERED
- (
- [warning_id]
- )
-GO
-
-
-/*
- Table: 'phpbb_words'
-*/
-CREATE TABLE [phpbb_words] (
- [word_id] [int] IDENTITY (1, 1) NOT NULL ,
- [word] [varchar] (255) DEFAULT ('') NOT NULL ,
- [replacement] [varchar] (255) DEFAULT ('') NOT NULL
-)GO
-
-ALTER TABLE [phpbb_words] WITH NOCHECK ADD
- CONSTRAINT [PK_phpbb_words] PRIMARY KEY CLUSTERED
- (
- [word_id]
- )
-GO
-
-
-/*
- Table: 'phpbb_zebra'
-*/
-CREATE TABLE [phpbb_zebra] (
- [user_id] [int] DEFAULT (0) NOT NULL ,
- [zebra_id] [int] DEFAULT (0) NOT NULL ,
- [friend] [int] DEFAULT (0) NOT NULL ,
- [foe] [int] DEFAULT (0) NOT NULL
-)GO
-
-ALTER TABLE [phpbb_zebra] WITH NOCHECK ADD
- CONSTRAINT [PK_phpbb_zebra] PRIMARY KEY CLUSTERED
- (
- [user_id],
- [zebra_id]
- )
-GO
-
-
diff --git a/phpBB/install/schemas/mysql_40_schema.sql b/phpBB/install/schemas/mysql_40_schema.sql
index 969cbe0472..28649dc54c 100644
--- a/phpBB/install/schemas/mysql_40_schema.sql
+++ b/phpBB/install/schemas/mysql_40_schema.sql
@@ -3,1032 +3,3 @@
# To change the contents of this file, edit
# phpBB/develop/create_schema_files.php and
# run it.
-# Table: 'phpbb_attachments'
-CREATE TABLE phpbb_attachments (
- attach_id mediumint(8) UNSIGNED NOT NULL auto_increment,
- post_msg_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- in_message tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- poster_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- is_orphan tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
- physical_filename varbinary(255) DEFAULT '' NOT NULL,
- real_filename varbinary(255) DEFAULT '' NOT NULL,
- download_count mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- attach_comment blob NOT NULL,
- extension varbinary(100) DEFAULT '' NOT NULL,
- mimetype varbinary(100) DEFAULT '' NOT NULL,
- filesize int(20) UNSIGNED DEFAULT '0' NOT NULL,
- filetime int(11) UNSIGNED DEFAULT '0' NOT NULL,
- thumbnail tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- PRIMARY KEY (attach_id),
- KEY filetime (filetime),
- KEY post_msg_id (post_msg_id),
- KEY topic_id (topic_id),
- KEY poster_id (poster_id),
- KEY is_orphan (is_orphan)
-);
-
-
-# Table: 'phpbb_acl_groups'
-CREATE TABLE phpbb_acl_groups (
- group_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- auth_option_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- auth_role_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- auth_setting tinyint(2) DEFAULT '0' NOT NULL,
- KEY group_id (group_id),
- KEY auth_opt_id (auth_option_id),
- KEY auth_role_id (auth_role_id)
-);
-
-
-# Table: 'phpbb_acl_options'
-CREATE TABLE phpbb_acl_options (
- auth_option_id mediumint(8) UNSIGNED NOT NULL auto_increment,
- auth_option varbinary(50) DEFAULT '' NOT NULL,
- is_global tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- is_local tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- founder_only tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- PRIMARY KEY (auth_option_id),
- UNIQUE auth_option (auth_option)
-);
-
-
-# Table: 'phpbb_acl_roles'
-CREATE TABLE phpbb_acl_roles (
- role_id mediumint(8) UNSIGNED NOT NULL auto_increment,
- role_name blob NOT NULL,
- role_description blob NOT NULL,
- role_type varbinary(10) DEFAULT '' NOT NULL,
- role_order smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
- PRIMARY KEY (role_id),
- KEY role_type (role_type),
- KEY role_order (role_order)
-);
-
-
-# Table: 'phpbb_acl_roles_data'
-CREATE TABLE phpbb_acl_roles_data (
- role_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- auth_option_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- auth_setting tinyint(2) DEFAULT '0' NOT NULL,
- PRIMARY KEY (role_id, auth_option_id),
- KEY ath_op_id (auth_option_id)
-);
-
-
-# Table: 'phpbb_acl_users'
-CREATE TABLE phpbb_acl_users (
- user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- auth_option_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- auth_role_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- auth_setting tinyint(2) DEFAULT '0' NOT NULL,
- KEY user_id (user_id),
- KEY auth_option_id (auth_option_id),
- KEY auth_role_id (auth_role_id)
-);
-
-
-# Table: 'phpbb_banlist'
-CREATE TABLE phpbb_banlist (
- ban_id mediumint(8) UNSIGNED NOT NULL auto_increment,
- ban_userid mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- ban_ip varbinary(40) DEFAULT '' NOT NULL,
- ban_email blob NOT NULL,
- ban_start int(11) UNSIGNED DEFAULT '0' NOT NULL,
- ban_end int(11) UNSIGNED DEFAULT '0' NOT NULL,
- ban_exclude tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- ban_reason blob NOT NULL,
- ban_give_reason blob NOT NULL,
- PRIMARY KEY (ban_id),
- KEY ban_end (ban_end),
- KEY ban_user (ban_userid, ban_exclude),
- KEY ban_email (ban_email(255), ban_exclude),
- KEY ban_ip (ban_ip, ban_exclude)
-);
-
-
-# Table: 'phpbb_bbcodes'
-CREATE TABLE phpbb_bbcodes (
- bbcode_id smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
- bbcode_tag varbinary(16) DEFAULT '' NOT NULL,
- bbcode_helpline blob NOT NULL,
- display_on_posting tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- bbcode_match blob NOT NULL,
- bbcode_tpl mediumblob NOT NULL,
- first_pass_match mediumblob NOT NULL,
- first_pass_replace mediumblob NOT NULL,
- second_pass_match mediumblob NOT NULL,
- second_pass_replace mediumblob NOT NULL,
- PRIMARY KEY (bbcode_id),
- KEY display_on_post (display_on_posting)
-);
-
-
-# Table: 'phpbb_bookmarks'
-CREATE TABLE phpbb_bookmarks (
- topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- PRIMARY KEY (topic_id, user_id)
-);
-
-
-# Table: 'phpbb_bots'
-CREATE TABLE phpbb_bots (
- bot_id mediumint(8) UNSIGNED NOT NULL auto_increment,
- bot_active tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
- bot_name blob NOT NULL,
- user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- bot_agent varbinary(255) DEFAULT '' NOT NULL,
- bot_ip varbinary(255) DEFAULT '' NOT NULL,
- PRIMARY KEY (bot_id),
- KEY bot_active (bot_active)
-);
-
-
-# Table: 'phpbb_config'
-CREATE TABLE phpbb_config (
- config_name varbinary(255) DEFAULT '' NOT NULL,
- config_value blob NOT NULL,
- is_dynamic tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- PRIMARY KEY (config_name),
- KEY is_dynamic (is_dynamic)
-);
-
-
-# Table: 'phpbb_confirm'
-CREATE TABLE phpbb_confirm (
- confirm_id binary(32) DEFAULT '' NOT NULL,
- session_id binary(32) DEFAULT '' NOT NULL,
- confirm_type tinyint(3) DEFAULT '0' NOT NULL,
- code varbinary(8) DEFAULT '' NOT NULL,
- seed int(10) UNSIGNED DEFAULT '0' NOT NULL,
- attempts mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- PRIMARY KEY (session_id, confirm_id),
- KEY confirm_type (confirm_type)
-);
-
-
-# Table: 'phpbb_disallow'
-CREATE TABLE phpbb_disallow (
- disallow_id mediumint(8) UNSIGNED NOT NULL auto_increment,
- disallow_username blob NOT NULL,
- PRIMARY KEY (disallow_id)
-);
-
-
-# Table: 'phpbb_drafts'
-CREATE TABLE phpbb_drafts (
- draft_id mediumint(8) UNSIGNED NOT NULL auto_increment,
- user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- save_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
- draft_subject blob NOT NULL,
- draft_message mediumblob NOT NULL,
- PRIMARY KEY (draft_id),
- KEY save_time (save_time)
-);
-
-
-# Table: 'phpbb_extensions'
-CREATE TABLE phpbb_extensions (
- extension_id mediumint(8) UNSIGNED NOT NULL auto_increment,
- group_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- extension varbinary(100) DEFAULT '' NOT NULL,
- PRIMARY KEY (extension_id)
-);
-
-
-# Table: 'phpbb_extension_groups'
-CREATE TABLE phpbb_extension_groups (
- group_id mediumint(8) UNSIGNED NOT NULL auto_increment,
- group_name blob NOT NULL,
- cat_id tinyint(2) DEFAULT '0' NOT NULL,
- allow_group tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- download_mode tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
- upload_icon varbinary(255) DEFAULT '' NOT NULL,
- max_filesize int(20) UNSIGNED DEFAULT '0' NOT NULL,
- allowed_forums blob NOT NULL,
- allow_in_pm tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- PRIMARY KEY (group_id)
-);
-
-
-# Table: 'phpbb_forums'
-CREATE TABLE phpbb_forums (
- forum_id mediumint(8) UNSIGNED NOT NULL auto_increment,
- parent_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- left_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- right_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- forum_parents mediumblob NOT NULL,
- forum_name blob NOT NULL,
- forum_desc blob NOT NULL,
- forum_desc_bitfield varbinary(255) DEFAULT '' NOT NULL,
- forum_desc_options int(11) UNSIGNED DEFAULT '7' NOT NULL,
- forum_desc_uid varbinary(8) DEFAULT '' NOT NULL,
- forum_link blob NOT NULL,
- forum_password varbinary(120) DEFAULT '' NOT NULL,
- forum_style mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- forum_image varbinary(255) DEFAULT '' NOT NULL,
- forum_rules blob NOT NULL,
- forum_rules_link blob NOT NULL,
- forum_rules_bitfield varbinary(255) DEFAULT '' NOT NULL,
- forum_rules_options int(11) UNSIGNED DEFAULT '7' NOT NULL,
- forum_rules_uid varbinary(8) DEFAULT '' NOT NULL,
- forum_topics_per_page tinyint(4) DEFAULT '0' NOT NULL,
- forum_type tinyint(4) DEFAULT '0' NOT NULL,
- forum_status tinyint(4) DEFAULT '0' NOT NULL,
- forum_posts mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- forum_topics mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- forum_topics_real mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- forum_last_post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- forum_last_poster_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- forum_last_post_subject blob NOT NULL,
- forum_last_post_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
- forum_last_poster_name blob NOT NULL,
- forum_last_poster_colour varbinary(6) DEFAULT '' NOT NULL,
- forum_flags tinyint(4) DEFAULT '32' NOT NULL,
- forum_options int(20) UNSIGNED DEFAULT '0' NOT NULL,
- display_subforum_list tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
- display_on_index tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
- enable_indexing tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
- enable_icons tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
- enable_prune tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- prune_next int(11) UNSIGNED DEFAULT '0' NOT NULL,
- prune_days mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- prune_viewed mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- prune_freq mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- PRIMARY KEY (forum_id),
- KEY left_right_id (left_id, right_id),
- KEY forum_lastpost_id (forum_last_post_id)
-);
-
-
-# Table: 'phpbb_forums_access'
-CREATE TABLE phpbb_forums_access (
- forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- session_id binary(32) DEFAULT '' NOT NULL,
- PRIMARY KEY (forum_id, user_id, session_id)
-);
-
-
-# Table: 'phpbb_forums_track'
-CREATE TABLE phpbb_forums_track (
- user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- mark_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
- PRIMARY KEY (user_id, forum_id)
-);
-
-
-# Table: 'phpbb_forums_watch'
-CREATE TABLE phpbb_forums_watch (
- forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- notify_status tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- KEY forum_id (forum_id),
- KEY user_id (user_id),
- KEY notify_stat (notify_status)
-);
-
-
-# Table: 'phpbb_groups'
-CREATE TABLE phpbb_groups (
- group_id mediumint(8) UNSIGNED NOT NULL auto_increment,
- group_type tinyint(4) DEFAULT '1' NOT NULL,
- group_founder_manage tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- group_skip_auth tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- group_name blob NOT NULL,
- group_desc blob NOT NULL,
- group_desc_bitfield varbinary(255) DEFAULT '' NOT NULL,
- group_desc_options int(11) UNSIGNED DEFAULT '7' NOT NULL,
- group_desc_uid varbinary(8) DEFAULT '' NOT NULL,
- group_display tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- group_avatar varbinary(255) DEFAULT '' NOT NULL,
- group_avatar_type tinyint(2) DEFAULT '0' NOT NULL,
- group_avatar_width smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
- group_avatar_height smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
- group_rank mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- group_colour varbinary(6) DEFAULT '' NOT NULL,
- group_sig_chars mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- group_receive_pm tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- group_message_limit mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- group_max_recipients mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- group_legend tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
- PRIMARY KEY (group_id),
- KEY group_legend_name (group_legend, group_name(255))
-);
-
-
-# Table: 'phpbb_icons'
-CREATE TABLE phpbb_icons (
- icons_id mediumint(8) UNSIGNED NOT NULL auto_increment,
- icons_url varbinary(255) DEFAULT '' NOT NULL,
- icons_width tinyint(4) DEFAULT '0' NOT NULL,
- icons_height tinyint(4) DEFAULT '0' NOT NULL,
- icons_order mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- display_on_posting tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
- PRIMARY KEY (icons_id),
- KEY display_on_posting (display_on_posting)
-);
-
-
-# Table: 'phpbb_lang'
-CREATE TABLE phpbb_lang (
- lang_id tinyint(4) NOT NULL auto_increment,
- lang_iso varbinary(30) DEFAULT '' NOT NULL,
- lang_dir varbinary(30) DEFAULT '' NOT NULL,
- lang_english_name blob NOT NULL,
- lang_local_name blob NOT NULL,
- lang_author blob NOT NULL,
- PRIMARY KEY (lang_id),
- KEY lang_iso (lang_iso)
-);
-
-
-# Table: 'phpbb_log'
-CREATE TABLE phpbb_log (
- log_id mediumint(8) UNSIGNED NOT NULL auto_increment,
- log_type tinyint(4) DEFAULT '0' NOT NULL,
- user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- reportee_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- log_ip varbinary(40) DEFAULT '' NOT NULL,
- log_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
- log_operation blob NOT NULL,
- log_data mediumblob NOT NULL,
- PRIMARY KEY (log_id),
- KEY log_type (log_type),
- KEY forum_id (forum_id),
- KEY topic_id (topic_id),
- KEY reportee_id (reportee_id),
- KEY user_id (user_id)
-);
-
-
-# Table: 'phpbb_login_attempts'
-CREATE TABLE phpbb_login_attempts (
- attempt_ip varbinary(40) DEFAULT '' NOT NULL,
- attempt_browser varbinary(150) DEFAULT '' NOT NULL,
- attempt_forwarded_for varbinary(255) DEFAULT '' NOT NULL,
- attempt_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
- user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- username blob NOT NULL,
- username_clean blob NOT NULL,
- KEY att_ip (attempt_ip, attempt_time),
- KEY att_for (attempt_forwarded_for, attempt_time),
- KEY att_time (attempt_time),
- KEY user_id (user_id)
-);
-
-
-# Table: 'phpbb_moderator_cache'
-CREATE TABLE phpbb_moderator_cache (
- forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- username blob NOT NULL,
- group_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- group_name blob NOT NULL,
- display_on_index tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
- KEY disp_idx (display_on_index),
- KEY forum_id (forum_id)
-);
-
-
-# Table: 'phpbb_modules'
-CREATE TABLE phpbb_modules (
- module_id mediumint(8) UNSIGNED NOT NULL auto_increment,
- module_enabled tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
- module_display tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
- module_basename varbinary(255) DEFAULT '' NOT NULL,
- module_class varbinary(10) DEFAULT '' NOT NULL,
- parent_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- left_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- right_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- module_langname varbinary(255) DEFAULT '' NOT NULL,
- module_mode varbinary(255) DEFAULT '' NOT NULL,
- module_auth varbinary(255) DEFAULT '' NOT NULL,
- PRIMARY KEY (module_id),
- KEY left_right_id (left_id, right_id),
- KEY module_enabled (module_enabled),
- KEY class_left_id (module_class, left_id)
-);
-
-
-# Table: 'phpbb_poll_options'
-CREATE TABLE phpbb_poll_options (
- poll_option_id tinyint(4) DEFAULT '0' NOT NULL,
- topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- poll_option_text blob NOT NULL,
- poll_option_total mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- KEY poll_opt_id (poll_option_id),
- KEY topic_id (topic_id)
-);
-
-
-# Table: 'phpbb_poll_votes'
-CREATE TABLE phpbb_poll_votes (
- topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- poll_option_id tinyint(4) DEFAULT '0' NOT NULL,
- vote_user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- vote_user_ip varbinary(40) DEFAULT '' NOT NULL,
- KEY topic_id (topic_id),
- KEY vote_user_id (vote_user_id),
- KEY vote_user_ip (vote_user_ip)
-);
-
-
-# Table: 'phpbb_posts'
-CREATE TABLE phpbb_posts (
- post_id mediumint(8) UNSIGNED NOT NULL auto_increment,
- topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- poster_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- icon_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- poster_ip varbinary(40) DEFAULT '' NOT NULL,
- post_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
- post_approved tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
- post_reported tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- enable_bbcode tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
- enable_smilies tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
- enable_magic_url tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
- enable_sig tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
- post_username blob NOT NULL,
- post_subject blob NOT NULL,
- post_text mediumblob NOT NULL,
- post_checksum varbinary(32) DEFAULT '' NOT NULL,
- post_attachment tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- bbcode_bitfield varbinary(255) DEFAULT '' NOT NULL,
- bbcode_uid varbinary(8) DEFAULT '' NOT NULL,
- post_postcount tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
- post_edit_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
- post_edit_reason blob NOT NULL,
- post_edit_user mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- post_edit_count smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
- post_edit_locked tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- PRIMARY KEY (post_id),
- KEY forum_id (forum_id),
- KEY topic_id (topic_id),
- KEY poster_ip (poster_ip),
- KEY poster_id (poster_id),
- KEY post_approved (post_approved),
- KEY post_username (post_username(255)),
- KEY tid_post_time (topic_id, post_time)
-);
-
-
-# Table: 'phpbb_privmsgs'
-CREATE TABLE phpbb_privmsgs (
- msg_id mediumint(8) UNSIGNED NOT NULL auto_increment,
- root_level mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- author_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- icon_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- author_ip varbinary(40) DEFAULT '' NOT NULL,
- message_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
- enable_bbcode tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
- enable_smilies tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
- enable_magic_url tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
- enable_sig tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
- message_subject blob NOT NULL,
- message_text mediumblob NOT NULL,
- message_edit_reason blob NOT NULL,
- message_edit_user mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- message_attachment tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- bbcode_bitfield varbinary(255) DEFAULT '' NOT NULL,
- bbcode_uid varbinary(8) DEFAULT '' NOT NULL,
- message_edit_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
- message_edit_count smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
- to_address blob NOT NULL,
- bcc_address blob NOT NULL,
- message_reported tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- PRIMARY KEY (msg_id),
- KEY author_ip (author_ip),
- KEY message_time (message_time),
- KEY author_id (author_id),
- KEY root_level (root_level)
-);
-
-
-# Table: 'phpbb_privmsgs_folder'
-CREATE TABLE phpbb_privmsgs_folder (
- folder_id mediumint(8) UNSIGNED NOT NULL auto_increment,
- user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- folder_name blob NOT NULL,
- pm_count mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- PRIMARY KEY (folder_id),
- KEY user_id (user_id)
-);
-
-
-# Table: 'phpbb_privmsgs_rules'
-CREATE TABLE phpbb_privmsgs_rules (
- rule_id mediumint(8) UNSIGNED NOT NULL auto_increment,
- user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- rule_check mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- rule_connection mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- rule_string blob NOT NULL,
- rule_user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- rule_group_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- rule_action mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- rule_folder_id int(11) DEFAULT '0' NOT NULL,
- PRIMARY KEY (rule_id),
- KEY user_id (user_id)
-);
-
-
-# Table: 'phpbb_privmsgs_to'
-CREATE TABLE phpbb_privmsgs_to (
- msg_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- author_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- pm_deleted tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- pm_new tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
- pm_unread tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
- pm_replied tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- pm_marked tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- pm_forwarded tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- folder_id int(11) DEFAULT '0' NOT NULL,
- KEY msg_id (msg_id),
- KEY author_id (author_id),
- KEY usr_flder_id (user_id, folder_id)
-);
-
-
-# Table: 'phpbb_profile_fields'
-CREATE TABLE phpbb_profile_fields (
- field_id mediumint(8) UNSIGNED NOT NULL auto_increment,
- field_name blob NOT NULL,
- field_type tinyint(4) DEFAULT '0' NOT NULL,
- field_ident varbinary(20) DEFAULT '' NOT NULL,
- field_length varbinary(20) DEFAULT '' NOT NULL,
- field_minlen varbinary(255) DEFAULT '' NOT NULL,
- field_maxlen varbinary(255) DEFAULT '' NOT NULL,
- field_novalue blob NOT NULL,
- field_default_value blob NOT NULL,
- field_validation varbinary(60) DEFAULT '' NOT NULL,
- field_required tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- field_show_novalue tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- field_show_on_reg tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- field_show_on_vt tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- field_show_profile tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- field_hide tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- field_no_view tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- field_active tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- field_order mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- PRIMARY KEY (field_id),
- KEY fld_type (field_type),
- KEY fld_ordr (field_order)
-);
-
-
-# Table: 'phpbb_profile_fields_data'
-CREATE TABLE phpbb_profile_fields_data (
- user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- PRIMARY KEY (user_id)
-);
-
-
-# Table: 'phpbb_profile_fields_lang'
-CREATE TABLE phpbb_profile_fields_lang (
- field_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- lang_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- option_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- field_type tinyint(4) DEFAULT '0' NOT NULL,
- lang_value blob NOT NULL,
- PRIMARY KEY (field_id, lang_id, option_id)
-);
-
-
-# Table: 'phpbb_profile_lang'
-CREATE TABLE phpbb_profile_lang (
- field_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- lang_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- lang_name blob NOT NULL,
- lang_explain blob NOT NULL,
- lang_default_value blob NOT NULL,
- PRIMARY KEY (field_id, lang_id)
-);
-
-
-# Table: 'phpbb_ranks'
-CREATE TABLE phpbb_ranks (
- rank_id mediumint(8) UNSIGNED NOT NULL auto_increment,
- rank_title blob NOT NULL,
- rank_min mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- rank_special tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- rank_image varbinary(255) DEFAULT '' NOT NULL,
- PRIMARY KEY (rank_id)
-);
-
-
-# Table: 'phpbb_reports'
-CREATE TABLE phpbb_reports (
- report_id mediumint(8) UNSIGNED NOT NULL auto_increment,
- reason_id smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
- post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- pm_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- user_notify tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- report_closed tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- report_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
- report_text mediumblob NOT NULL,
- PRIMARY KEY (report_id),
- KEY post_id (post_id),
- KEY pm_id (pm_id)
-);
-
-
-# Table: 'phpbb_reports_reasons'
-CREATE TABLE phpbb_reports_reasons (
- reason_id smallint(4) UNSIGNED NOT NULL auto_increment,
- reason_title blob NOT NULL,
- reason_description mediumblob NOT NULL,
- reason_order smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
- PRIMARY KEY (reason_id)
-);
-
-
-# Table: 'phpbb_search_results'
-CREATE TABLE phpbb_search_results (
- search_key varbinary(32) DEFAULT '' NOT NULL,
- search_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
- search_keywords mediumblob NOT NULL,
- search_authors mediumblob NOT NULL,
- PRIMARY KEY (search_key)
-);
-
-
-# Table: 'phpbb_search_wordlist'
-CREATE TABLE phpbb_search_wordlist (
- word_id mediumint(8) UNSIGNED NOT NULL auto_increment,
- word_text blob NOT NULL,
- word_common tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- word_count mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- PRIMARY KEY (word_id),
- UNIQUE wrd_txt (word_text(255)),
- KEY wrd_cnt (word_count)
-);
-
-
-# Table: 'phpbb_search_wordmatch'
-CREATE TABLE phpbb_search_wordmatch (
- post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- word_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- title_match tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- UNIQUE unq_mtch (word_id, post_id, title_match),
- KEY word_id (word_id),
- KEY post_id (post_id)
-);
-
-
-# Table: 'phpbb_sessions'
-CREATE TABLE phpbb_sessions (
- session_id binary(32) DEFAULT '' NOT NULL,
- session_user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- session_forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- session_last_visit int(11) UNSIGNED DEFAULT '0' NOT NULL,
- session_start int(11) UNSIGNED DEFAULT '0' NOT NULL,
- session_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
- session_ip varbinary(40) DEFAULT '' NOT NULL,
- session_browser varbinary(150) DEFAULT '' NOT NULL,
- session_forwarded_for varbinary(255) DEFAULT '' NOT NULL,
- session_page blob NOT NULL,
- session_viewonline tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
- session_autologin tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- session_admin tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- PRIMARY KEY (session_id),
- KEY session_time (session_time),
- KEY session_user_id (session_user_id),
- KEY session_fid (session_forum_id)
-);
-
-
-# Table: 'phpbb_sessions_keys'
-CREATE TABLE phpbb_sessions_keys (
- key_id binary(32) DEFAULT '' NOT NULL,
- user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- last_ip varbinary(40) DEFAULT '' NOT NULL,
- last_login int(11) UNSIGNED DEFAULT '0' NOT NULL,
- PRIMARY KEY (key_id, user_id),
- KEY last_login (last_login)
-);
-
-
-# Table: 'phpbb_sitelist'
-CREATE TABLE phpbb_sitelist (
- site_id mediumint(8) UNSIGNED NOT NULL auto_increment,
- site_ip varbinary(40) DEFAULT '' NOT NULL,
- site_hostname varbinary(255) DEFAULT '' NOT NULL,
- ip_exclude tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- PRIMARY KEY (site_id)
-);
-
-
-# Table: 'phpbb_smilies'
-CREATE TABLE phpbb_smilies (
- smiley_id mediumint(8) UNSIGNED NOT NULL auto_increment,
- code varbinary(150) DEFAULT '' NOT NULL,
- emotion varbinary(150) DEFAULT '' NOT NULL,
- smiley_url varbinary(50) DEFAULT '' NOT NULL,
- smiley_width smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
- smiley_height smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
- smiley_order mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- display_on_posting tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
- PRIMARY KEY (smiley_id),
- KEY display_on_post (display_on_posting)
-);
-
-
-# Table: 'phpbb_styles'
-CREATE TABLE phpbb_styles (
- style_id mediumint(8) UNSIGNED NOT NULL auto_increment,
- style_name blob NOT NULL,
- style_copyright blob NOT NULL,
- style_active tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
- template_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- theme_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- imageset_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- PRIMARY KEY (style_id),
- UNIQUE style_name (style_name(255)),
- KEY template_id (template_id),
- KEY theme_id (theme_id),
- KEY imageset_id (imageset_id)
-);
-
-
-# Table: 'phpbb_styles_template'
-CREATE TABLE phpbb_styles_template (
- template_id mediumint(8) UNSIGNED NOT NULL auto_increment,
- template_name blob NOT NULL,
- template_copyright blob NOT NULL,
- template_path varbinary(100) DEFAULT '' NOT NULL,
- bbcode_bitfield varbinary(255) DEFAULT 'kNg=' NOT NULL,
- template_storedb tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- template_inherits_id int(4) UNSIGNED DEFAULT '0' NOT NULL,
- template_inherit_path varbinary(255) DEFAULT '' NOT NULL,
- PRIMARY KEY (template_id),
- UNIQUE tmplte_nm (template_name(255))
-);
-
-
-# Table: 'phpbb_styles_template_data'
-CREATE TABLE phpbb_styles_template_data (
- template_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- template_filename varbinary(100) DEFAULT '' NOT NULL,
- template_included blob NOT NULL,
- template_mtime int(11) UNSIGNED DEFAULT '0' NOT NULL,
- template_data mediumblob NOT NULL,
- KEY tid (template_id),
- KEY tfn (template_filename)
-);
-
-
-# Table: 'phpbb_styles_theme'
-CREATE TABLE phpbb_styles_theme (
- theme_id mediumint(8) UNSIGNED NOT NULL auto_increment,
- theme_name blob NOT NULL,
- theme_copyright blob NOT NULL,
- theme_path varbinary(100) DEFAULT '' NOT NULL,
- theme_storedb tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- theme_mtime int(11) UNSIGNED DEFAULT '0' NOT NULL,
- theme_data mediumblob NOT NULL,
- PRIMARY KEY (theme_id),
- UNIQUE theme_name (theme_name(255))
-);
-
-
-# Table: 'phpbb_styles_imageset'
-CREATE TABLE phpbb_styles_imageset (
- imageset_id mediumint(8) UNSIGNED NOT NULL auto_increment,
- imageset_name blob NOT NULL,
- imageset_copyright blob NOT NULL,
- imageset_path varbinary(100) DEFAULT '' NOT NULL,
- PRIMARY KEY (imageset_id),
- UNIQUE imgset_nm (imageset_name(255))
-);
-
-
-# Table: 'phpbb_styles_imageset_data'
-CREATE TABLE phpbb_styles_imageset_data (
- image_id mediumint(8) UNSIGNED NOT NULL auto_increment,
- image_name varbinary(200) DEFAULT '' NOT NULL,
- image_filename varbinary(200) DEFAULT '' NOT NULL,
- image_lang varbinary(30) DEFAULT '' NOT NULL,
- image_height smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
- image_width smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
- imageset_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- PRIMARY KEY (image_id),
- KEY i_d (imageset_id)
-);
-
-
-# Table: 'phpbb_topics'
-CREATE TABLE phpbb_topics (
- topic_id mediumint(8) UNSIGNED NOT NULL auto_increment,
- forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- icon_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- topic_attachment tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- topic_approved tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
- topic_reported tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- topic_title blob NOT NULL,
- topic_poster mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- topic_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
- topic_time_limit int(11) UNSIGNED DEFAULT '0' NOT NULL,
- topic_views mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- topic_replies mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- topic_replies_real mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- topic_status tinyint(3) DEFAULT '0' NOT NULL,
- topic_type tinyint(3) DEFAULT '0' NOT NULL,
- topic_first_post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- topic_first_poster_name blob NOT NULL,
- topic_first_poster_colour varbinary(6) DEFAULT '' NOT NULL,
- topic_last_post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- topic_last_poster_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- topic_last_poster_name blob NOT NULL,
- topic_last_poster_colour varbinary(6) DEFAULT '' NOT NULL,
- topic_last_post_subject blob NOT NULL,
- topic_last_post_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
- topic_last_view_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
- topic_moved_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- topic_bumped tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- topic_bumper mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- poll_title blob NOT NULL,
- poll_start int(11) UNSIGNED DEFAULT '0' NOT NULL,
- poll_length int(11) UNSIGNED DEFAULT '0' NOT NULL,
- poll_max_options tinyint(4) DEFAULT '1' NOT NULL,
- poll_last_vote int(11) UNSIGNED DEFAULT '0' NOT NULL,
- poll_vote_change tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- PRIMARY KEY (topic_id),
- KEY forum_id (forum_id),
- KEY forum_id_type (forum_id, topic_type),
- KEY last_post_time (topic_last_post_time),
- KEY topic_approved (topic_approved),
- KEY forum_appr_last (forum_id, topic_approved, topic_last_post_id),
- KEY fid_time_moved (forum_id, topic_last_post_time, topic_moved_id)
-);
-
-
-# Table: 'phpbb_topics_track'
-CREATE TABLE phpbb_topics_track (
- user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- mark_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
- PRIMARY KEY (user_id, topic_id),
- KEY topic_id (topic_id),
- KEY forum_id (forum_id)
-);
-
-
-# Table: 'phpbb_topics_posted'
-CREATE TABLE phpbb_topics_posted (
- user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- topic_posted tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- PRIMARY KEY (user_id, topic_id)
-);
-
-
-# Table: 'phpbb_topics_watch'
-CREATE TABLE phpbb_topics_watch (
- topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- notify_status tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- KEY topic_id (topic_id),
- KEY user_id (user_id),
- KEY notify_stat (notify_status)
-);
-
-
-# Table: 'phpbb_user_group'
-CREATE TABLE phpbb_user_group (
- group_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- group_leader tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- user_pending tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
- KEY group_id (group_id),
- KEY user_id (user_id),
- KEY group_leader (group_leader)
-);
-
-
-# Table: 'phpbb_users'
-CREATE TABLE phpbb_users (
- user_id mediumint(8) UNSIGNED NOT NULL auto_increment,
- user_type tinyint(2) DEFAULT '0' NOT NULL,
- group_id mediumint(8) UNSIGNED DEFAULT '3' NOT NULL,
- user_permissions mediumblob NOT NULL,
- user_perm_from mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- user_ip varbinary(40) DEFAULT '' NOT NULL,
- user_regdate int(11) UNSIGNED DEFAULT '0' NOT NULL,
- username blob NOT NULL,
- username_clean blob NOT NULL,
- user_password varbinary(120) DEFAULT '' NOT NULL,
- user_passchg int(11) UNSIGNED DEFAULT '0' NOT NULL,
- user_pass_convert tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- user_email blob NOT NULL,
- user_email_hash bigint(20) DEFAULT '0' NOT NULL,
- user_birthday varbinary(10) DEFAULT '' NOT NULL,
- user_lastvisit int(11) UNSIGNED DEFAULT '0' NOT NULL,
- user_lastmark int(11) UNSIGNED DEFAULT '0' NOT NULL,
- user_lastpost_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
- user_lastpage blob NOT NULL,
- user_last_confirm_key varbinary(10) DEFAULT '' NOT NULL,
- user_last_search int(11) UNSIGNED DEFAULT '0' NOT NULL,
- user_warnings tinyint(4) DEFAULT '0' NOT NULL,
- user_last_warning int(11) UNSIGNED DEFAULT '0' NOT NULL,
- user_login_attempts tinyint(4) DEFAULT '0' NOT NULL,
- user_inactive_reason tinyint(2) DEFAULT '0' NOT NULL,
- user_inactive_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
- user_posts mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- user_lang varbinary(30) DEFAULT '' NOT NULL,
- user_timezone decimal(5,2) DEFAULT '0' NOT NULL,
- user_dst tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- user_dateformat varbinary(90) DEFAULT 'd M Y H:i' NOT NULL,
- user_style mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- user_rank mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- user_colour varbinary(6) DEFAULT '' NOT NULL,
- user_new_privmsg int(4) DEFAULT '0' NOT NULL,
- user_unread_privmsg int(4) DEFAULT '0' NOT NULL,
- user_last_privmsg int(11) UNSIGNED DEFAULT '0' NOT NULL,
- user_message_rules tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- user_full_folder int(11) DEFAULT '-3' NOT NULL,
- user_emailtime int(11) UNSIGNED DEFAULT '0' NOT NULL,
- user_topic_show_days smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
- user_topic_sortby_type varbinary(1) DEFAULT 't' NOT NULL,
- user_topic_sortby_dir varbinary(1) DEFAULT 'd' NOT NULL,
- user_post_show_days smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
- user_post_sortby_type varbinary(1) DEFAULT 't' NOT NULL,
- user_post_sortby_dir varbinary(1) DEFAULT 'a' NOT NULL,
- user_notify tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- user_notify_pm tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
- user_notify_type tinyint(4) DEFAULT '0' NOT NULL,
- user_allow_pm tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
- user_allow_viewonline tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
- user_allow_viewemail tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
- user_allow_massemail tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
- user_options int(11) UNSIGNED DEFAULT '230271' NOT NULL,
- user_avatar varbinary(255) DEFAULT '' NOT NULL,
- user_avatar_type tinyint(2) DEFAULT '0' NOT NULL,
- user_avatar_width smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
- user_avatar_height smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
- user_sig mediumblob NOT NULL,
- user_sig_bbcode_uid varbinary(8) DEFAULT '' NOT NULL,
- user_sig_bbcode_bitfield varbinary(255) DEFAULT '' NOT NULL,
- user_from blob NOT NULL,
- user_icq varbinary(15) DEFAULT '' NOT NULL,
- user_aim blob NOT NULL,
- user_yim blob NOT NULL,
- user_msnm blob NOT NULL,
- user_jabber blob NOT NULL,
- user_website blob NOT NULL,
- user_occ blob NOT NULL,
- user_interests blob NOT NULL,
- user_actkey varbinary(32) DEFAULT '' NOT NULL,
- user_newpasswd varbinary(120) DEFAULT '' NOT NULL,
- user_form_salt varbinary(96) DEFAULT '' NOT NULL,
- user_new tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
- user_reminded tinyint(4) DEFAULT '0' NOT NULL,
- user_reminded_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
- PRIMARY KEY (user_id),
- KEY user_birthday (user_birthday),
- KEY user_email_hash (user_email_hash),
- KEY user_type (user_type),
- UNIQUE username_clean (username_clean(255))
-);
-
-
-# Table: 'phpbb_warnings'
-CREATE TABLE phpbb_warnings (
- warning_id mediumint(8) UNSIGNED NOT NULL auto_increment,
- user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- log_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- warning_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
- PRIMARY KEY (warning_id)
-);
-
-
-# Table: 'phpbb_words'
-CREATE TABLE phpbb_words (
- word_id mediumint(8) UNSIGNED NOT NULL auto_increment,
- word blob NOT NULL,
- replacement blob NOT NULL,
- PRIMARY KEY (word_id)
-);
-
-
-# Table: 'phpbb_zebra'
-CREATE TABLE phpbb_zebra (
- user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- zebra_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- friend tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- foe tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- PRIMARY KEY (user_id, zebra_id)
-);
-
-
diff --git a/phpBB/install/schemas/mysql_41_schema.sql b/phpBB/install/schemas/mysql_41_schema.sql
index 15d34894d8..28649dc54c 100644
--- a/phpBB/install/schemas/mysql_41_schema.sql
+++ b/phpBB/install/schemas/mysql_41_schema.sql
@@ -3,1032 +3,3 @@
# To change the contents of this file, edit
# phpBB/develop/create_schema_files.php and
# run it.
-# Table: 'phpbb_attachments'
-CREATE TABLE phpbb_attachments (
- attach_id mediumint(8) UNSIGNED NOT NULL auto_increment,
- post_msg_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- in_message tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- poster_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- is_orphan tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
- physical_filename varchar(255) DEFAULT '' NOT NULL,
- real_filename varchar(255) DEFAULT '' NOT NULL,
- download_count mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- attach_comment text NOT NULL,
- extension varchar(100) DEFAULT '' NOT NULL,
- mimetype varchar(100) DEFAULT '' NOT NULL,
- filesize int(20) UNSIGNED DEFAULT '0' NOT NULL,
- filetime int(11) UNSIGNED DEFAULT '0' NOT NULL,
- thumbnail tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- PRIMARY KEY (attach_id),
- KEY filetime (filetime),
- KEY post_msg_id (post_msg_id),
- KEY topic_id (topic_id),
- KEY poster_id (poster_id),
- KEY is_orphan (is_orphan)
-) CHARACTER SET `utf8` COLLATE `utf8_bin`;
-
-
-# Table: 'phpbb_acl_groups'
-CREATE TABLE phpbb_acl_groups (
- group_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- auth_option_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- auth_role_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- auth_setting tinyint(2) DEFAULT '0' NOT NULL,
- KEY group_id (group_id),
- KEY auth_opt_id (auth_option_id),
- KEY auth_role_id (auth_role_id)
-) CHARACTER SET `utf8` COLLATE `utf8_bin`;
-
-
-# Table: 'phpbb_acl_options'
-CREATE TABLE phpbb_acl_options (
- auth_option_id mediumint(8) UNSIGNED NOT NULL auto_increment,
- auth_option varchar(50) DEFAULT '' NOT NULL,
- is_global tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- is_local tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- founder_only tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- PRIMARY KEY (auth_option_id),
- UNIQUE auth_option (auth_option)
-) CHARACTER SET `utf8` COLLATE `utf8_bin`;
-
-
-# Table: 'phpbb_acl_roles'
-CREATE TABLE phpbb_acl_roles (
- role_id mediumint(8) UNSIGNED NOT NULL auto_increment,
- role_name varchar(255) DEFAULT '' NOT NULL,
- role_description text NOT NULL,
- role_type varchar(10) DEFAULT '' NOT NULL,
- role_order smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
- PRIMARY KEY (role_id),
- KEY role_type (role_type),
- KEY role_order (role_order)
-) CHARACTER SET `utf8` COLLATE `utf8_bin`;
-
-
-# Table: 'phpbb_acl_roles_data'
-CREATE TABLE phpbb_acl_roles_data (
- role_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- auth_option_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- auth_setting tinyint(2) DEFAULT '0' NOT NULL,
- PRIMARY KEY (role_id, auth_option_id),
- KEY ath_op_id (auth_option_id)
-) CHARACTER SET `utf8` COLLATE `utf8_bin`;
-
-
-# Table: 'phpbb_acl_users'
-CREATE TABLE phpbb_acl_users (
- user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- auth_option_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- auth_role_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- auth_setting tinyint(2) DEFAULT '0' NOT NULL,
- KEY user_id (user_id),
- KEY auth_option_id (auth_option_id),
- KEY auth_role_id (auth_role_id)
-) CHARACTER SET `utf8` COLLATE `utf8_bin`;
-
-
-# Table: 'phpbb_banlist'
-CREATE TABLE phpbb_banlist (
- ban_id mediumint(8) UNSIGNED NOT NULL auto_increment,
- ban_userid mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- ban_ip varchar(40) DEFAULT '' NOT NULL,
- ban_email varchar(100) DEFAULT '' NOT NULL,
- ban_start int(11) UNSIGNED DEFAULT '0' NOT NULL,
- ban_end int(11) UNSIGNED DEFAULT '0' NOT NULL,
- ban_exclude tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- ban_reason varchar(255) DEFAULT '' NOT NULL,
- ban_give_reason varchar(255) DEFAULT '' NOT NULL,
- PRIMARY KEY (ban_id),
- KEY ban_end (ban_end),
- KEY ban_user (ban_userid, ban_exclude),
- KEY ban_email (ban_email, ban_exclude),
- KEY ban_ip (ban_ip, ban_exclude)
-) CHARACTER SET `utf8` COLLATE `utf8_bin`;
-
-
-# Table: 'phpbb_bbcodes'
-CREATE TABLE phpbb_bbcodes (
- bbcode_id smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
- bbcode_tag varchar(16) DEFAULT '' NOT NULL,
- bbcode_helpline varchar(255) DEFAULT '' NOT NULL,
- display_on_posting tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- bbcode_match text NOT NULL,
- bbcode_tpl mediumtext NOT NULL,
- first_pass_match mediumtext NOT NULL,
- first_pass_replace mediumtext NOT NULL,
- second_pass_match mediumtext NOT NULL,
- second_pass_replace mediumtext NOT NULL,
- PRIMARY KEY (bbcode_id),
- KEY display_on_post (display_on_posting)
-) CHARACTER SET `utf8` COLLATE `utf8_bin`;
-
-
-# Table: 'phpbb_bookmarks'
-CREATE TABLE phpbb_bookmarks (
- topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- PRIMARY KEY (topic_id, user_id)
-) CHARACTER SET `utf8` COLLATE `utf8_bin`;
-
-
-# Table: 'phpbb_bots'
-CREATE TABLE phpbb_bots (
- bot_id mediumint(8) UNSIGNED NOT NULL auto_increment,
- bot_active tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
- bot_name varchar(255) DEFAULT '' NOT NULL,
- user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- bot_agent varchar(255) DEFAULT '' NOT NULL,
- bot_ip varchar(255) DEFAULT '' NOT NULL,
- PRIMARY KEY (bot_id),
- KEY bot_active (bot_active)
-) CHARACTER SET `utf8` COLLATE `utf8_bin`;
-
-
-# Table: 'phpbb_config'
-CREATE TABLE phpbb_config (
- config_name varchar(255) DEFAULT '' NOT NULL,
- config_value varchar(255) DEFAULT '' NOT NULL,
- is_dynamic tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- PRIMARY KEY (config_name),
- KEY is_dynamic (is_dynamic)
-) CHARACTER SET `utf8` COLLATE `utf8_bin`;
-
-
-# Table: 'phpbb_confirm'
-CREATE TABLE phpbb_confirm (
- confirm_id char(32) DEFAULT '' NOT NULL,
- session_id char(32) DEFAULT '' NOT NULL,
- confirm_type tinyint(3) DEFAULT '0' NOT NULL,
- code varchar(8) DEFAULT '' NOT NULL,
- seed int(10) UNSIGNED DEFAULT '0' NOT NULL,
- attempts mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- PRIMARY KEY (session_id, confirm_id),
- KEY confirm_type (confirm_type)
-) CHARACTER SET `utf8` COLLATE `utf8_bin`;
-
-
-# Table: 'phpbb_disallow'
-CREATE TABLE phpbb_disallow (
- disallow_id mediumint(8) UNSIGNED NOT NULL auto_increment,
- disallow_username varchar(255) DEFAULT '' NOT NULL,
- PRIMARY KEY (disallow_id)
-) CHARACTER SET `utf8` COLLATE `utf8_bin`;
-
-
-# Table: 'phpbb_drafts'
-CREATE TABLE phpbb_drafts (
- draft_id mediumint(8) UNSIGNED NOT NULL auto_increment,
- user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- save_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
- draft_subject varchar(255) DEFAULT '' NOT NULL,
- draft_message mediumtext NOT NULL,
- PRIMARY KEY (draft_id),
- KEY save_time (save_time)
-) CHARACTER SET `utf8` COLLATE `utf8_bin`;
-
-
-# Table: 'phpbb_extensions'
-CREATE TABLE phpbb_extensions (
- extension_id mediumint(8) UNSIGNED NOT NULL auto_increment,
- group_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- extension varchar(100) DEFAULT '' NOT NULL,
- PRIMARY KEY (extension_id)
-) CHARACTER SET `utf8` COLLATE `utf8_bin`;
-
-
-# Table: 'phpbb_extension_groups'
-CREATE TABLE phpbb_extension_groups (
- group_id mediumint(8) UNSIGNED NOT NULL auto_increment,
- group_name varchar(255) DEFAULT '' NOT NULL,
- cat_id tinyint(2) DEFAULT '0' NOT NULL,
- allow_group tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- download_mode tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
- upload_icon varchar(255) DEFAULT '' NOT NULL,
- max_filesize int(20) UNSIGNED DEFAULT '0' NOT NULL,
- allowed_forums text NOT NULL,
- allow_in_pm tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- PRIMARY KEY (group_id)
-) CHARACTER SET `utf8` COLLATE `utf8_bin`;
-
-
-# Table: 'phpbb_forums'
-CREATE TABLE phpbb_forums (
- forum_id mediumint(8) UNSIGNED NOT NULL auto_increment,
- parent_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- left_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- right_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- forum_parents mediumtext NOT NULL,
- forum_name varchar(255) DEFAULT '' NOT NULL,
- forum_desc text NOT NULL,
- forum_desc_bitfield varchar(255) DEFAULT '' NOT NULL,
- forum_desc_options int(11) UNSIGNED DEFAULT '7' NOT NULL,
- forum_desc_uid varchar(8) DEFAULT '' NOT NULL,
- forum_link varchar(255) DEFAULT '' NOT NULL,
- forum_password varchar(40) DEFAULT '' NOT NULL,
- forum_style mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- forum_image varchar(255) DEFAULT '' NOT NULL,
- forum_rules text NOT NULL,
- forum_rules_link varchar(255) DEFAULT '' NOT NULL,
- forum_rules_bitfield varchar(255) DEFAULT '' NOT NULL,
- forum_rules_options int(11) UNSIGNED DEFAULT '7' NOT NULL,
- forum_rules_uid varchar(8) DEFAULT '' NOT NULL,
- forum_topics_per_page tinyint(4) DEFAULT '0' NOT NULL,
- forum_type tinyint(4) DEFAULT '0' NOT NULL,
- forum_status tinyint(4) DEFAULT '0' NOT NULL,
- forum_posts mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- forum_topics mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- forum_topics_real mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- forum_last_post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- forum_last_poster_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- forum_last_post_subject varchar(255) DEFAULT '' NOT NULL,
- forum_last_post_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
- forum_last_poster_name varchar(255) DEFAULT '' NOT NULL,
- forum_last_poster_colour varchar(6) DEFAULT '' NOT NULL,
- forum_flags tinyint(4) DEFAULT '32' NOT NULL,
- forum_options int(20) UNSIGNED DEFAULT '0' NOT NULL,
- display_subforum_list tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
- display_on_index tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
- enable_indexing tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
- enable_icons tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
- enable_prune tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- prune_next int(11) UNSIGNED DEFAULT '0' NOT NULL,
- prune_days mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- prune_viewed mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- prune_freq mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- PRIMARY KEY (forum_id),
- KEY left_right_id (left_id, right_id),
- KEY forum_lastpost_id (forum_last_post_id)
-) CHARACTER SET `utf8` COLLATE `utf8_bin`;
-
-
-# Table: 'phpbb_forums_access'
-CREATE TABLE phpbb_forums_access (
- forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- session_id char(32) DEFAULT '' NOT NULL,
- PRIMARY KEY (forum_id, user_id, session_id)
-) CHARACTER SET `utf8` COLLATE `utf8_bin`;
-
-
-# Table: 'phpbb_forums_track'
-CREATE TABLE phpbb_forums_track (
- user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- mark_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
- PRIMARY KEY (user_id, forum_id)
-) CHARACTER SET `utf8` COLLATE `utf8_bin`;
-
-
-# Table: 'phpbb_forums_watch'
-CREATE TABLE phpbb_forums_watch (
- forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- notify_status tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- KEY forum_id (forum_id),
- KEY user_id (user_id),
- KEY notify_stat (notify_status)
-) CHARACTER SET `utf8` COLLATE `utf8_bin`;
-
-
-# Table: 'phpbb_groups'
-CREATE TABLE phpbb_groups (
- group_id mediumint(8) UNSIGNED NOT NULL auto_increment,
- group_type tinyint(4) DEFAULT '1' NOT NULL,
- group_founder_manage tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- group_skip_auth tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- group_name varchar(255) DEFAULT '' NOT NULL,
- group_desc text NOT NULL,
- group_desc_bitfield varchar(255) DEFAULT '' NOT NULL,
- group_desc_options int(11) UNSIGNED DEFAULT '7' NOT NULL,
- group_desc_uid varchar(8) DEFAULT '' NOT NULL,
- group_display tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- group_avatar varchar(255) DEFAULT '' NOT NULL,
- group_avatar_type tinyint(2) DEFAULT '0' NOT NULL,
- group_avatar_width smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
- group_avatar_height smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
- group_rank mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- group_colour varchar(6) DEFAULT '' NOT NULL,
- group_sig_chars mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- group_receive_pm tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- group_message_limit mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- group_max_recipients mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- group_legend tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
- PRIMARY KEY (group_id),
- KEY group_legend_name (group_legend, group_name)
-) CHARACTER SET `utf8` COLLATE `utf8_bin`;
-
-
-# Table: 'phpbb_icons'
-CREATE TABLE phpbb_icons (
- icons_id mediumint(8) UNSIGNED NOT NULL auto_increment,
- icons_url varchar(255) DEFAULT '' NOT NULL,
- icons_width tinyint(4) DEFAULT '0' NOT NULL,
- icons_height tinyint(4) DEFAULT '0' NOT NULL,
- icons_order mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- display_on_posting tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
- PRIMARY KEY (icons_id),
- KEY display_on_posting (display_on_posting)
-) CHARACTER SET `utf8` COLLATE `utf8_bin`;
-
-
-# Table: 'phpbb_lang'
-CREATE TABLE phpbb_lang (
- lang_id tinyint(4) NOT NULL auto_increment,
- lang_iso varchar(30) DEFAULT '' NOT NULL,
- lang_dir varchar(30) DEFAULT '' NOT NULL,
- lang_english_name varchar(100) DEFAULT '' NOT NULL,
- lang_local_name varchar(255) DEFAULT '' NOT NULL,
- lang_author varchar(255) DEFAULT '' NOT NULL,
- PRIMARY KEY (lang_id),
- KEY lang_iso (lang_iso)
-) CHARACTER SET `utf8` COLLATE `utf8_bin`;
-
-
-# Table: 'phpbb_log'
-CREATE TABLE phpbb_log (
- log_id mediumint(8) UNSIGNED NOT NULL auto_increment,
- log_type tinyint(4) DEFAULT '0' NOT NULL,
- user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- reportee_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- log_ip varchar(40) DEFAULT '' NOT NULL,
- log_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
- log_operation text NOT NULL,
- log_data mediumtext NOT NULL,
- PRIMARY KEY (log_id),
- KEY log_type (log_type),
- KEY forum_id (forum_id),
- KEY topic_id (topic_id),
- KEY reportee_id (reportee_id),
- KEY user_id (user_id)
-) CHARACTER SET `utf8` COLLATE `utf8_bin`;
-
-
-# Table: 'phpbb_login_attempts'
-CREATE TABLE phpbb_login_attempts (
- attempt_ip varchar(40) DEFAULT '' NOT NULL,
- attempt_browser varchar(150) DEFAULT '' NOT NULL,
- attempt_forwarded_for varchar(255) DEFAULT '' NOT NULL,
- attempt_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
- user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- username varchar(255) DEFAULT '0' NOT NULL,
- username_clean varchar(255) DEFAULT '0' NOT NULL,
- KEY att_ip (attempt_ip, attempt_time),
- KEY att_for (attempt_forwarded_for, attempt_time),
- KEY att_time (attempt_time),
- KEY user_id (user_id)
-) CHARACTER SET `utf8` COLLATE `utf8_bin`;
-
-
-# Table: 'phpbb_moderator_cache'
-CREATE TABLE phpbb_moderator_cache (
- forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- username varchar(255) DEFAULT '' NOT NULL,
- group_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- group_name varchar(255) DEFAULT '' NOT NULL,
- display_on_index tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
- KEY disp_idx (display_on_index),
- KEY forum_id (forum_id)
-) CHARACTER SET `utf8` COLLATE `utf8_bin`;
-
-
-# Table: 'phpbb_modules'
-CREATE TABLE phpbb_modules (
- module_id mediumint(8) UNSIGNED NOT NULL auto_increment,
- module_enabled tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
- module_display tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
- module_basename varchar(255) DEFAULT '' NOT NULL,
- module_class varchar(10) DEFAULT '' NOT NULL,
- parent_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- left_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- right_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- module_langname varchar(255) DEFAULT '' NOT NULL,
- module_mode varchar(255) DEFAULT '' NOT NULL,
- module_auth varchar(255) DEFAULT '' NOT NULL,
- PRIMARY KEY (module_id),
- KEY left_right_id (left_id, right_id),
- KEY module_enabled (module_enabled),
- KEY class_left_id (module_class, left_id)
-) CHARACTER SET `utf8` COLLATE `utf8_bin`;
-
-
-# Table: 'phpbb_poll_options'
-CREATE TABLE phpbb_poll_options (
- poll_option_id tinyint(4) DEFAULT '0' NOT NULL,
- topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- poll_option_text text NOT NULL,
- poll_option_total mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- KEY poll_opt_id (poll_option_id),
- KEY topic_id (topic_id)
-) CHARACTER SET `utf8` COLLATE `utf8_bin`;
-
-
-# Table: 'phpbb_poll_votes'
-CREATE TABLE phpbb_poll_votes (
- topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- poll_option_id tinyint(4) DEFAULT '0' NOT NULL,
- vote_user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- vote_user_ip varchar(40) DEFAULT '' NOT NULL,
- KEY topic_id (topic_id),
- KEY vote_user_id (vote_user_id),
- KEY vote_user_ip (vote_user_ip)
-) CHARACTER SET `utf8` COLLATE `utf8_bin`;
-
-
-# Table: 'phpbb_posts'
-CREATE TABLE phpbb_posts (
- post_id mediumint(8) UNSIGNED NOT NULL auto_increment,
- topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- poster_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- icon_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- poster_ip varchar(40) DEFAULT '' NOT NULL,
- post_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
- post_approved tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
- post_reported tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- enable_bbcode tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
- enable_smilies tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
- enable_magic_url tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
- enable_sig tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
- post_username varchar(255) DEFAULT '' NOT NULL,
- post_subject varchar(255) DEFAULT '' NOT NULL COLLATE utf8_unicode_ci,
- post_text mediumtext NOT NULL,
- post_checksum varchar(32) DEFAULT '' NOT NULL,
- post_attachment tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- bbcode_bitfield varchar(255) DEFAULT '' NOT NULL,
- bbcode_uid varchar(8) DEFAULT '' NOT NULL,
- post_postcount tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
- post_edit_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
- post_edit_reason varchar(255) DEFAULT '' NOT NULL,
- post_edit_user mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- post_edit_count smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
- post_edit_locked tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- PRIMARY KEY (post_id),
- KEY forum_id (forum_id),
- KEY topic_id (topic_id),
- KEY poster_ip (poster_ip),
- KEY poster_id (poster_id),
- KEY post_approved (post_approved),
- KEY post_username (post_username),
- KEY tid_post_time (topic_id, post_time)
-) CHARACTER SET `utf8` COLLATE `utf8_bin`;
-
-
-# Table: 'phpbb_privmsgs'
-CREATE TABLE phpbb_privmsgs (
- msg_id mediumint(8) UNSIGNED NOT NULL auto_increment,
- root_level mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- author_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- icon_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- author_ip varchar(40) DEFAULT '' NOT NULL,
- message_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
- enable_bbcode tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
- enable_smilies tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
- enable_magic_url tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
- enable_sig tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
- message_subject varchar(255) DEFAULT '' NOT NULL,
- message_text mediumtext NOT NULL,
- message_edit_reason varchar(255) DEFAULT '' NOT NULL,
- message_edit_user mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- message_attachment tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- bbcode_bitfield varchar(255) DEFAULT '' NOT NULL,
- bbcode_uid varchar(8) DEFAULT '' NOT NULL,
- message_edit_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
- message_edit_count smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
- to_address text NOT NULL,
- bcc_address text NOT NULL,
- message_reported tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- PRIMARY KEY (msg_id),
- KEY author_ip (author_ip),
- KEY message_time (message_time),
- KEY author_id (author_id),
- KEY root_level (root_level)
-) CHARACTER SET `utf8` COLLATE `utf8_bin`;
-
-
-# Table: 'phpbb_privmsgs_folder'
-CREATE TABLE phpbb_privmsgs_folder (
- folder_id mediumint(8) UNSIGNED NOT NULL auto_increment,
- user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- folder_name varchar(255) DEFAULT '' NOT NULL,
- pm_count mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- PRIMARY KEY (folder_id),
- KEY user_id (user_id)
-) CHARACTER SET `utf8` COLLATE `utf8_bin`;
-
-
-# Table: 'phpbb_privmsgs_rules'
-CREATE TABLE phpbb_privmsgs_rules (
- rule_id mediumint(8) UNSIGNED NOT NULL auto_increment,
- user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- rule_check mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- rule_connection mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- rule_string varchar(255) DEFAULT '' NOT NULL,
- rule_user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- rule_group_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- rule_action mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- rule_folder_id int(11) DEFAULT '0' NOT NULL,
- PRIMARY KEY (rule_id),
- KEY user_id (user_id)
-) CHARACTER SET `utf8` COLLATE `utf8_bin`;
-
-
-# Table: 'phpbb_privmsgs_to'
-CREATE TABLE phpbb_privmsgs_to (
- msg_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- author_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- pm_deleted tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- pm_new tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
- pm_unread tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
- pm_replied tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- pm_marked tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- pm_forwarded tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- folder_id int(11) DEFAULT '0' NOT NULL,
- KEY msg_id (msg_id),
- KEY author_id (author_id),
- KEY usr_flder_id (user_id, folder_id)
-) CHARACTER SET `utf8` COLLATE `utf8_bin`;
-
-
-# Table: 'phpbb_profile_fields'
-CREATE TABLE phpbb_profile_fields (
- field_id mediumint(8) UNSIGNED NOT NULL auto_increment,
- field_name varchar(255) DEFAULT '' NOT NULL,
- field_type tinyint(4) DEFAULT '0' NOT NULL,
- field_ident varchar(20) DEFAULT '' NOT NULL,
- field_length varchar(20) DEFAULT '' NOT NULL,
- field_minlen varchar(255) DEFAULT '' NOT NULL,
- field_maxlen varchar(255) DEFAULT '' NOT NULL,
- field_novalue varchar(255) DEFAULT '' NOT NULL,
- field_default_value varchar(255) DEFAULT '' NOT NULL,
- field_validation varchar(20) DEFAULT '' NOT NULL,
- field_required tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- field_show_novalue tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- field_show_on_reg tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- field_show_on_vt tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- field_show_profile tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- field_hide tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- field_no_view tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- field_active tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- field_order mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- PRIMARY KEY (field_id),
- KEY fld_type (field_type),
- KEY fld_ordr (field_order)
-) CHARACTER SET `utf8` COLLATE `utf8_bin`;
-
-
-# Table: 'phpbb_profile_fields_data'
-CREATE TABLE phpbb_profile_fields_data (
- user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- PRIMARY KEY (user_id)
-) CHARACTER SET `utf8` COLLATE `utf8_bin`;
-
-
-# Table: 'phpbb_profile_fields_lang'
-CREATE TABLE phpbb_profile_fields_lang (
- field_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- lang_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- option_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- field_type tinyint(4) DEFAULT '0' NOT NULL,
- lang_value varchar(255) DEFAULT '' NOT NULL,
- PRIMARY KEY (field_id, lang_id, option_id)
-) CHARACTER SET `utf8` COLLATE `utf8_bin`;
-
-
-# Table: 'phpbb_profile_lang'
-CREATE TABLE phpbb_profile_lang (
- field_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- lang_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- lang_name varchar(255) DEFAULT '' NOT NULL,
- lang_explain text NOT NULL,
- lang_default_value varchar(255) DEFAULT '' NOT NULL,
- PRIMARY KEY (field_id, lang_id)
-) CHARACTER SET `utf8` COLLATE `utf8_bin`;
-
-
-# Table: 'phpbb_ranks'
-CREATE TABLE phpbb_ranks (
- rank_id mediumint(8) UNSIGNED NOT NULL auto_increment,
- rank_title varchar(255) DEFAULT '' NOT NULL,
- rank_min mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- rank_special tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- rank_image varchar(255) DEFAULT '' NOT NULL,
- PRIMARY KEY (rank_id)
-) CHARACTER SET `utf8` COLLATE `utf8_bin`;
-
-
-# Table: 'phpbb_reports'
-CREATE TABLE phpbb_reports (
- report_id mediumint(8) UNSIGNED NOT NULL auto_increment,
- reason_id smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
- post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- pm_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- user_notify tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- report_closed tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- report_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
- report_text mediumtext NOT NULL,
- PRIMARY KEY (report_id),
- KEY post_id (post_id),
- KEY pm_id (pm_id)
-) CHARACTER SET `utf8` COLLATE `utf8_bin`;
-
-
-# Table: 'phpbb_reports_reasons'
-CREATE TABLE phpbb_reports_reasons (
- reason_id smallint(4) UNSIGNED NOT NULL auto_increment,
- reason_title varchar(255) DEFAULT '' NOT NULL,
- reason_description mediumtext NOT NULL,
- reason_order smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
- PRIMARY KEY (reason_id)
-) CHARACTER SET `utf8` COLLATE `utf8_bin`;
-
-
-# Table: 'phpbb_search_results'
-CREATE TABLE phpbb_search_results (
- search_key varchar(32) DEFAULT '' NOT NULL,
- search_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
- search_keywords mediumtext NOT NULL,
- search_authors mediumtext NOT NULL,
- PRIMARY KEY (search_key)
-) CHARACTER SET `utf8` COLLATE `utf8_bin`;
-
-
-# Table: 'phpbb_search_wordlist'
-CREATE TABLE phpbb_search_wordlist (
- word_id mediumint(8) UNSIGNED NOT NULL auto_increment,
- word_text varchar(255) DEFAULT '' NOT NULL,
- word_common tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- word_count mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- PRIMARY KEY (word_id),
- UNIQUE wrd_txt (word_text),
- KEY wrd_cnt (word_count)
-) CHARACTER SET `utf8` COLLATE `utf8_bin`;
-
-
-# Table: 'phpbb_search_wordmatch'
-CREATE TABLE phpbb_search_wordmatch (
- post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- word_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- title_match tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- UNIQUE unq_mtch (word_id, post_id, title_match),
- KEY word_id (word_id),
- KEY post_id (post_id)
-) CHARACTER SET `utf8` COLLATE `utf8_bin`;
-
-
-# Table: 'phpbb_sessions'
-CREATE TABLE phpbb_sessions (
- session_id char(32) DEFAULT '' NOT NULL,
- session_user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- session_forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- session_last_visit int(11) UNSIGNED DEFAULT '0' NOT NULL,
- session_start int(11) UNSIGNED DEFAULT '0' NOT NULL,
- session_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
- session_ip varchar(40) DEFAULT '' NOT NULL,
- session_browser varchar(150) DEFAULT '' NOT NULL,
- session_forwarded_for varchar(255) DEFAULT '' NOT NULL,
- session_page varchar(255) DEFAULT '' NOT NULL,
- session_viewonline tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
- session_autologin tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- session_admin tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- PRIMARY KEY (session_id),
- KEY session_time (session_time),
- KEY session_user_id (session_user_id),
- KEY session_fid (session_forum_id)
-) CHARACTER SET `utf8` COLLATE `utf8_bin`;
-
-
-# Table: 'phpbb_sessions_keys'
-CREATE TABLE phpbb_sessions_keys (
- key_id char(32) DEFAULT '' NOT NULL,
- user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- last_ip varchar(40) DEFAULT '' NOT NULL,
- last_login int(11) UNSIGNED DEFAULT '0' NOT NULL,
- PRIMARY KEY (key_id, user_id),
- KEY last_login (last_login)
-) CHARACTER SET `utf8` COLLATE `utf8_bin`;
-
-
-# Table: 'phpbb_sitelist'
-CREATE TABLE phpbb_sitelist (
- site_id mediumint(8) UNSIGNED NOT NULL auto_increment,
- site_ip varchar(40) DEFAULT '' NOT NULL,
- site_hostname varchar(255) DEFAULT '' NOT NULL,
- ip_exclude tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- PRIMARY KEY (site_id)
-) CHARACTER SET `utf8` COLLATE `utf8_bin`;
-
-
-# Table: 'phpbb_smilies'
-CREATE TABLE phpbb_smilies (
- smiley_id mediumint(8) UNSIGNED NOT NULL auto_increment,
- code varchar(50) DEFAULT '' NOT NULL,
- emotion varchar(50) DEFAULT '' NOT NULL,
- smiley_url varchar(50) DEFAULT '' NOT NULL,
- smiley_width smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
- smiley_height smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
- smiley_order mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- display_on_posting tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
- PRIMARY KEY (smiley_id),
- KEY display_on_post (display_on_posting)
-) CHARACTER SET `utf8` COLLATE `utf8_bin`;
-
-
-# Table: 'phpbb_styles'
-CREATE TABLE phpbb_styles (
- style_id mediumint(8) UNSIGNED NOT NULL auto_increment,
- style_name varchar(255) DEFAULT '' NOT NULL,
- style_copyright varchar(255) DEFAULT '' NOT NULL,
- style_active tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
- template_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- theme_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- imageset_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- PRIMARY KEY (style_id),
- UNIQUE style_name (style_name),
- KEY template_id (template_id),
- KEY theme_id (theme_id),
- KEY imageset_id (imageset_id)
-) CHARACTER SET `utf8` COLLATE `utf8_bin`;
-
-
-# Table: 'phpbb_styles_template'
-CREATE TABLE phpbb_styles_template (
- template_id mediumint(8) UNSIGNED NOT NULL auto_increment,
- template_name varchar(255) DEFAULT '' NOT NULL,
- template_copyright varchar(255) DEFAULT '' NOT NULL,
- template_path varchar(100) DEFAULT '' NOT NULL,
- bbcode_bitfield varchar(255) DEFAULT 'kNg=' NOT NULL,
- template_storedb tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- template_inherits_id int(4) UNSIGNED DEFAULT '0' NOT NULL,
- template_inherit_path varchar(255) DEFAULT '' NOT NULL,
- PRIMARY KEY (template_id),
- UNIQUE tmplte_nm (template_name)
-) CHARACTER SET `utf8` COLLATE `utf8_bin`;
-
-
-# Table: 'phpbb_styles_template_data'
-CREATE TABLE phpbb_styles_template_data (
- template_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- template_filename varchar(100) DEFAULT '' NOT NULL,
- template_included text NOT NULL,
- template_mtime int(11) UNSIGNED DEFAULT '0' NOT NULL,
- template_data mediumtext NOT NULL,
- KEY tid (template_id),
- KEY tfn (template_filename)
-) CHARACTER SET `utf8` COLLATE `utf8_bin`;
-
-
-# Table: 'phpbb_styles_theme'
-CREATE TABLE phpbb_styles_theme (
- theme_id mediumint(8) UNSIGNED NOT NULL auto_increment,
- theme_name varchar(255) DEFAULT '' NOT NULL,
- theme_copyright varchar(255) DEFAULT '' NOT NULL,
- theme_path varchar(100) DEFAULT '' NOT NULL,
- theme_storedb tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- theme_mtime int(11) UNSIGNED DEFAULT '0' NOT NULL,
- theme_data mediumtext NOT NULL,
- PRIMARY KEY (theme_id),
- UNIQUE theme_name (theme_name)
-) CHARACTER SET `utf8` COLLATE `utf8_bin`;
-
-
-# Table: 'phpbb_styles_imageset'
-CREATE TABLE phpbb_styles_imageset (
- imageset_id mediumint(8) UNSIGNED NOT NULL auto_increment,
- imageset_name varchar(255) DEFAULT '' NOT NULL,
- imageset_copyright varchar(255) DEFAULT '' NOT NULL,
- imageset_path varchar(100) DEFAULT '' NOT NULL,
- PRIMARY KEY (imageset_id),
- UNIQUE imgset_nm (imageset_name)
-) CHARACTER SET `utf8` COLLATE `utf8_bin`;
-
-
-# Table: 'phpbb_styles_imageset_data'
-CREATE TABLE phpbb_styles_imageset_data (
- image_id mediumint(8) UNSIGNED NOT NULL auto_increment,
- image_name varchar(200) DEFAULT '' NOT NULL,
- image_filename varchar(200) DEFAULT '' NOT NULL,
- image_lang varchar(30) DEFAULT '' NOT NULL,
- image_height smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
- image_width smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
- imageset_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- PRIMARY KEY (image_id),
- KEY i_d (imageset_id)
-) CHARACTER SET `utf8` COLLATE `utf8_bin`;
-
-
-# Table: 'phpbb_topics'
-CREATE TABLE phpbb_topics (
- topic_id mediumint(8) UNSIGNED NOT NULL auto_increment,
- forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- icon_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- topic_attachment tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- topic_approved tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
- topic_reported tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- topic_title varchar(255) DEFAULT '' NOT NULL COLLATE utf8_unicode_ci,
- topic_poster mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- topic_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
- topic_time_limit int(11) UNSIGNED DEFAULT '0' NOT NULL,
- topic_views mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- topic_replies mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- topic_replies_real mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- topic_status tinyint(3) DEFAULT '0' NOT NULL,
- topic_type tinyint(3) DEFAULT '0' NOT NULL,
- topic_first_post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- topic_first_poster_name varchar(255) DEFAULT '' NOT NULL,
- topic_first_poster_colour varchar(6) DEFAULT '' NOT NULL,
- topic_last_post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- topic_last_poster_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- topic_last_poster_name varchar(255) DEFAULT '' NOT NULL,
- topic_last_poster_colour varchar(6) DEFAULT '' NOT NULL,
- topic_last_post_subject varchar(255) DEFAULT '' NOT NULL,
- topic_last_post_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
- topic_last_view_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
- topic_moved_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- topic_bumped tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- topic_bumper mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- poll_title varchar(255) DEFAULT '' NOT NULL,
- poll_start int(11) UNSIGNED DEFAULT '0' NOT NULL,
- poll_length int(11) UNSIGNED DEFAULT '0' NOT NULL,
- poll_max_options tinyint(4) DEFAULT '1' NOT NULL,
- poll_last_vote int(11) UNSIGNED DEFAULT '0' NOT NULL,
- poll_vote_change tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- PRIMARY KEY (topic_id),
- KEY forum_id (forum_id),
- KEY forum_id_type (forum_id, topic_type),
- KEY last_post_time (topic_last_post_time),
- KEY topic_approved (topic_approved),
- KEY forum_appr_last (forum_id, topic_approved, topic_last_post_id),
- KEY fid_time_moved (forum_id, topic_last_post_time, topic_moved_id)
-) CHARACTER SET `utf8` COLLATE `utf8_bin`;
-
-
-# Table: 'phpbb_topics_track'
-CREATE TABLE phpbb_topics_track (
- user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- mark_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
- PRIMARY KEY (user_id, topic_id),
- KEY topic_id (topic_id),
- KEY forum_id (forum_id)
-) CHARACTER SET `utf8` COLLATE `utf8_bin`;
-
-
-# Table: 'phpbb_topics_posted'
-CREATE TABLE phpbb_topics_posted (
- user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- topic_posted tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- PRIMARY KEY (user_id, topic_id)
-) CHARACTER SET `utf8` COLLATE `utf8_bin`;
-
-
-# Table: 'phpbb_topics_watch'
-CREATE TABLE phpbb_topics_watch (
- topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- notify_status tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- KEY topic_id (topic_id),
- KEY user_id (user_id),
- KEY notify_stat (notify_status)
-) CHARACTER SET `utf8` COLLATE `utf8_bin`;
-
-
-# Table: 'phpbb_user_group'
-CREATE TABLE phpbb_user_group (
- group_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- group_leader tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- user_pending tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
- KEY group_id (group_id),
- KEY user_id (user_id),
- KEY group_leader (group_leader)
-) CHARACTER SET `utf8` COLLATE `utf8_bin`;
-
-
-# Table: 'phpbb_users'
-CREATE TABLE phpbb_users (
- user_id mediumint(8) UNSIGNED NOT NULL auto_increment,
- user_type tinyint(2) DEFAULT '0' NOT NULL,
- group_id mediumint(8) UNSIGNED DEFAULT '3' NOT NULL,
- user_permissions mediumtext NOT NULL,
- user_perm_from mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- user_ip varchar(40) DEFAULT '' NOT NULL,
- user_regdate int(11) UNSIGNED DEFAULT '0' NOT NULL,
- username varchar(255) DEFAULT '' NOT NULL,
- username_clean varchar(255) DEFAULT '' NOT NULL,
- user_password varchar(40) DEFAULT '' NOT NULL,
- user_passchg int(11) UNSIGNED DEFAULT '0' NOT NULL,
- user_pass_convert tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- user_email varchar(100) DEFAULT '' NOT NULL,
- user_email_hash bigint(20) DEFAULT '0' NOT NULL,
- user_birthday varchar(10) DEFAULT '' NOT NULL,
- user_lastvisit int(11) UNSIGNED DEFAULT '0' NOT NULL,
- user_lastmark int(11) UNSIGNED DEFAULT '0' NOT NULL,
- user_lastpost_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
- user_lastpage varchar(200) DEFAULT '' NOT NULL,
- user_last_confirm_key varchar(10) DEFAULT '' NOT NULL,
- user_last_search int(11) UNSIGNED DEFAULT '0' NOT NULL,
- user_warnings tinyint(4) DEFAULT '0' NOT NULL,
- user_last_warning int(11) UNSIGNED DEFAULT '0' NOT NULL,
- user_login_attempts tinyint(4) DEFAULT '0' NOT NULL,
- user_inactive_reason tinyint(2) DEFAULT '0' NOT NULL,
- user_inactive_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
- user_posts mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- user_lang varchar(30) DEFAULT '' NOT NULL,
- user_timezone decimal(5,2) DEFAULT '0' NOT NULL,
- user_dst tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- user_dateformat varchar(30) DEFAULT 'd M Y H:i' NOT NULL,
- user_style mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- user_rank mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- user_colour varchar(6) DEFAULT '' NOT NULL,
- user_new_privmsg int(4) DEFAULT '0' NOT NULL,
- user_unread_privmsg int(4) DEFAULT '0' NOT NULL,
- user_last_privmsg int(11) UNSIGNED DEFAULT '0' NOT NULL,
- user_message_rules tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- user_full_folder int(11) DEFAULT '-3' NOT NULL,
- user_emailtime int(11) UNSIGNED DEFAULT '0' NOT NULL,
- user_topic_show_days smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
- user_topic_sortby_type varchar(1) DEFAULT 't' NOT NULL,
- user_topic_sortby_dir varchar(1) DEFAULT 'd' NOT NULL,
- user_post_show_days smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
- user_post_sortby_type varchar(1) DEFAULT 't' NOT NULL,
- user_post_sortby_dir varchar(1) DEFAULT 'a' NOT NULL,
- user_notify tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- user_notify_pm tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
- user_notify_type tinyint(4) DEFAULT '0' NOT NULL,
- user_allow_pm tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
- user_allow_viewonline tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
- user_allow_viewemail tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
- user_allow_massemail tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
- user_options int(11) UNSIGNED DEFAULT '230271' NOT NULL,
- user_avatar varchar(255) DEFAULT '' NOT NULL,
- user_avatar_type tinyint(2) DEFAULT '0' NOT NULL,
- user_avatar_width smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
- user_avatar_height smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
- user_sig mediumtext NOT NULL,
- user_sig_bbcode_uid varchar(8) DEFAULT '' NOT NULL,
- user_sig_bbcode_bitfield varchar(255) DEFAULT '' NOT NULL,
- user_from varchar(100) DEFAULT '' NOT NULL,
- user_icq varchar(15) DEFAULT '' NOT NULL,
- user_aim varchar(255) DEFAULT '' NOT NULL,
- user_yim varchar(255) DEFAULT '' NOT NULL,
- user_msnm varchar(255) DEFAULT '' NOT NULL,
- user_jabber varchar(255) DEFAULT '' NOT NULL,
- user_website varchar(200) DEFAULT '' NOT NULL,
- user_occ text NOT NULL,
- user_interests text NOT NULL,
- user_actkey varchar(32) DEFAULT '' NOT NULL,
- user_newpasswd varchar(40) DEFAULT '' NOT NULL,
- user_form_salt varchar(32) DEFAULT '' NOT NULL,
- user_new tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
- user_reminded tinyint(4) DEFAULT '0' NOT NULL,
- user_reminded_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
- PRIMARY KEY (user_id),
- KEY user_birthday (user_birthday),
- KEY user_email_hash (user_email_hash),
- KEY user_type (user_type),
- UNIQUE username_clean (username_clean)
-) CHARACTER SET `utf8` COLLATE `utf8_bin`;
-
-
-# Table: 'phpbb_warnings'
-CREATE TABLE phpbb_warnings (
- warning_id mediumint(8) UNSIGNED NOT NULL auto_increment,
- user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- log_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- warning_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
- PRIMARY KEY (warning_id)
-) CHARACTER SET `utf8` COLLATE `utf8_bin`;
-
-
-# Table: 'phpbb_words'
-CREATE TABLE phpbb_words (
- word_id mediumint(8) UNSIGNED NOT NULL auto_increment,
- word varchar(255) DEFAULT '' NOT NULL,
- replacement varchar(255) DEFAULT '' NOT NULL,
- PRIMARY KEY (word_id)
-) CHARACTER SET `utf8` COLLATE `utf8_bin`;
-
-
-# Table: 'phpbb_zebra'
-CREATE TABLE phpbb_zebra (
- user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- zebra_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- friend tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- foe tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- PRIMARY KEY (user_id, zebra_id)
-) CHARACTER SET `utf8` COLLATE `utf8_bin`;
-
-
diff --git a/phpBB/install/schemas/oracle_schema.sql b/phpBB/install/schemas/oracle_schema.sql
index af7b2b60ec..61f5d5f961 100644
--- a/phpBB/install/schemas/oracle_schema.sql
+++ b/phpBB/install/schemas/oracle_schema.sql
@@ -43,1882 +43,3 @@ DISCONNECT;
CONNECT phpbb/phpbb_password;
*/
-/*
- Table: 'phpbb_attachments'
-*/
-CREATE TABLE phpbb_attachments (
- attach_id number(8) NOT NULL,
- post_msg_id number(8) DEFAULT '0' NOT NULL,
- topic_id number(8) DEFAULT '0' NOT NULL,
- in_message number(1) DEFAULT '0' NOT NULL,
- poster_id number(8) DEFAULT '0' NOT NULL,
- is_orphan number(1) DEFAULT '1' NOT NULL,
- physical_filename varchar2(255) DEFAULT '' ,
- real_filename varchar2(255) DEFAULT '' ,
- download_count number(8) DEFAULT '0' NOT NULL,
- attach_comment clob DEFAULT '' ,
- extension varchar2(100) DEFAULT '' ,
- mimetype varchar2(100) DEFAULT '' ,
- filesize number(20) DEFAULT '0' NOT NULL,
- filetime number(11) DEFAULT '0' NOT NULL,
- thumbnail number(1) DEFAULT '0' NOT NULL,
- CONSTRAINT pk_phpbb_attachments PRIMARY KEY (attach_id)
-)
-/
-
-CREATE INDEX phpbb_attachments_filetime ON phpbb_attachments (filetime)
-/
-CREATE INDEX phpbb_attachments_post_msg_id ON phpbb_attachments (post_msg_id)
-/
-CREATE INDEX phpbb_attachments_topic_id ON phpbb_attachments (topic_id)
-/
-CREATE INDEX phpbb_attachments_poster_id ON phpbb_attachments (poster_id)
-/
-CREATE INDEX phpbb_attachments_is_orphan ON phpbb_attachments (is_orphan)
-/
-
-CREATE SEQUENCE phpbb_attachments_seq
-/
-
-CREATE OR REPLACE TRIGGER t_phpbb_attachments
-BEFORE INSERT ON phpbb_attachments
-FOR EACH ROW WHEN (
- new.attach_id IS NULL OR new.attach_id = 0
-)
-BEGIN
- SELECT phpbb_attachments_seq.nextval
- INTO :new.attach_id
- FROM dual;
-END;
-/
-
-
-/*
- Table: 'phpbb_acl_groups'
-*/
-CREATE TABLE phpbb_acl_groups (
- group_id number(8) DEFAULT '0' NOT NULL,
- forum_id number(8) DEFAULT '0' NOT NULL,
- auth_option_id number(8) DEFAULT '0' NOT NULL,
- auth_role_id number(8) DEFAULT '0' NOT NULL,
- auth_setting number(2) DEFAULT '0' NOT NULL
-)
-/
-
-CREATE INDEX phpbb_acl_groups_group_id ON phpbb_acl_groups (group_id)
-/
-CREATE INDEX phpbb_acl_groups_auth_opt_id ON phpbb_acl_groups (auth_option_id)
-/
-CREATE INDEX phpbb_acl_groups_auth_role_id ON phpbb_acl_groups (auth_role_id)
-/
-
-/*
- Table: 'phpbb_acl_options'
-*/
-CREATE TABLE phpbb_acl_options (
- auth_option_id number(8) NOT NULL,
- auth_option varchar2(50) DEFAULT '' ,
- is_global number(1) DEFAULT '0' NOT NULL,
- is_local number(1) DEFAULT '0' NOT NULL,
- founder_only number(1) DEFAULT '0' NOT NULL,
- CONSTRAINT pk_phpbb_acl_options PRIMARY KEY (auth_option_id),
- CONSTRAINT u_phpbb_auth_option UNIQUE (auth_option)
-)
-/
-
-
-CREATE SEQUENCE phpbb_acl_options_seq
-/
-
-CREATE OR REPLACE TRIGGER t_phpbb_acl_options
-BEFORE INSERT ON phpbb_acl_options
-FOR EACH ROW WHEN (
- new.auth_option_id IS NULL OR new.auth_option_id = 0
-)
-BEGIN
- SELECT phpbb_acl_options_seq.nextval
- INTO :new.auth_option_id
- FROM dual;
-END;
-/
-
-
-/*
- Table: 'phpbb_acl_roles'
-*/
-CREATE TABLE phpbb_acl_roles (
- role_id number(8) NOT NULL,
- role_name varchar2(765) DEFAULT '' ,
- role_description clob DEFAULT '' ,
- role_type varchar2(10) DEFAULT '' ,
- role_order number(4) DEFAULT '0' NOT NULL,
- CONSTRAINT pk_phpbb_acl_roles PRIMARY KEY (role_id)
-)
-/
-
-CREATE INDEX phpbb_acl_roles_role_type ON phpbb_acl_roles (role_type)
-/
-CREATE INDEX phpbb_acl_roles_role_order ON phpbb_acl_roles (role_order)
-/
-
-CREATE SEQUENCE phpbb_acl_roles_seq
-/
-
-CREATE OR REPLACE TRIGGER t_phpbb_acl_roles
-BEFORE INSERT ON phpbb_acl_roles
-FOR EACH ROW WHEN (
- new.role_id IS NULL OR new.role_id = 0
-)
-BEGIN
- SELECT phpbb_acl_roles_seq.nextval
- INTO :new.role_id
- FROM dual;
-END;
-/
-
-
-/*
- Table: 'phpbb_acl_roles_data'
-*/
-CREATE TABLE phpbb_acl_roles_data (
- role_id number(8) DEFAULT '0' NOT NULL,
- auth_option_id number(8) DEFAULT '0' NOT NULL,
- auth_setting number(2) DEFAULT '0' NOT NULL,
- CONSTRAINT pk_phpbb_acl_roles_data PRIMARY KEY (role_id, auth_option_id)
-)
-/
-
-CREATE INDEX phpbb_acl_roles_data_ath_op_id ON phpbb_acl_roles_data (auth_option_id)
-/
-
-/*
- Table: 'phpbb_acl_users'
-*/
-CREATE TABLE phpbb_acl_users (
- user_id number(8) DEFAULT '0' NOT NULL,
- forum_id number(8) DEFAULT '0' NOT NULL,
- auth_option_id number(8) DEFAULT '0' NOT NULL,
- auth_role_id number(8) DEFAULT '0' NOT NULL,
- auth_setting number(2) DEFAULT '0' NOT NULL
-)
-/
-
-CREATE INDEX phpbb_acl_users_user_id ON phpbb_acl_users (user_id)
-/
-CREATE INDEX phpbb_acl_users_auth_option_id ON phpbb_acl_users (auth_option_id)
-/
-CREATE INDEX phpbb_acl_users_auth_role_id ON phpbb_acl_users (auth_role_id)
-/
-
-/*
- Table: 'phpbb_banlist'
-*/
-CREATE TABLE phpbb_banlist (
- ban_id number(8) NOT NULL,
- ban_userid number(8) DEFAULT '0' NOT NULL,
- ban_ip varchar2(40) DEFAULT '' ,
- ban_email varchar2(300) DEFAULT '' ,
- ban_start number(11) DEFAULT '0' NOT NULL,
- ban_end number(11) DEFAULT '0' NOT NULL,
- ban_exclude number(1) DEFAULT '0' NOT NULL,
- ban_reason varchar2(765) DEFAULT '' ,
- ban_give_reason varchar2(765) DEFAULT '' ,
- CONSTRAINT pk_phpbb_banlist PRIMARY KEY (ban_id)
-)
-/
-
-CREATE INDEX phpbb_banlist_ban_end ON phpbb_banlist (ban_end)
-/
-CREATE INDEX phpbb_banlist_ban_user ON phpbb_banlist (ban_userid, ban_exclude)
-/
-CREATE INDEX phpbb_banlist_ban_email ON phpbb_banlist (ban_email, ban_exclude)
-/
-CREATE INDEX phpbb_banlist_ban_ip ON phpbb_banlist (ban_ip, ban_exclude)
-/
-
-CREATE SEQUENCE phpbb_banlist_seq
-/
-
-CREATE OR REPLACE TRIGGER t_phpbb_banlist
-BEFORE INSERT ON phpbb_banlist
-FOR EACH ROW WHEN (
- new.ban_id IS NULL OR new.ban_id = 0
-)
-BEGIN
- SELECT phpbb_banlist_seq.nextval
- INTO :new.ban_id
- FROM dual;
-END;
-/
-
-
-/*
- Table: 'phpbb_bbcodes'
-*/
-CREATE TABLE phpbb_bbcodes (
- bbcode_id number(4) DEFAULT '0' NOT NULL,
- bbcode_tag varchar2(16) DEFAULT '' ,
- bbcode_helpline varchar2(765) DEFAULT '' ,
- display_on_posting number(1) DEFAULT '0' NOT NULL,
- bbcode_match clob DEFAULT '' ,
- bbcode_tpl clob DEFAULT '' ,
- first_pass_match clob DEFAULT '' ,
- first_pass_replace clob DEFAULT '' ,
- second_pass_match clob DEFAULT '' ,
- second_pass_replace clob DEFAULT '' ,
- CONSTRAINT pk_phpbb_bbcodes PRIMARY KEY (bbcode_id)
-)
-/
-
-CREATE INDEX phpbb_bbcodes_display_on_post ON phpbb_bbcodes (display_on_posting)
-/
-
-/*
- Table: 'phpbb_bookmarks'
-*/
-CREATE TABLE phpbb_bookmarks (
- topic_id number(8) DEFAULT '0' NOT NULL,
- user_id number(8) DEFAULT '0' NOT NULL,
- CONSTRAINT pk_phpbb_bookmarks PRIMARY KEY (topic_id, user_id)
-)
-/
-
-
-/*
- Table: 'phpbb_bots'
-*/
-CREATE TABLE phpbb_bots (
- bot_id number(8) NOT NULL,
- bot_active number(1) DEFAULT '1' NOT NULL,
- bot_name varchar2(765) DEFAULT '' ,
- user_id number(8) DEFAULT '0' NOT NULL,
- bot_agent varchar2(255) DEFAULT '' ,
- bot_ip varchar2(255) DEFAULT '' ,
- CONSTRAINT pk_phpbb_bots PRIMARY KEY (bot_id)
-)
-/
-
-CREATE INDEX phpbb_bots_bot_active ON phpbb_bots (bot_active)
-/
-
-CREATE SEQUENCE phpbb_bots_seq
-/
-
-CREATE OR REPLACE TRIGGER t_phpbb_bots
-BEFORE INSERT ON phpbb_bots
-FOR EACH ROW WHEN (
- new.bot_id IS NULL OR new.bot_id = 0
-)
-BEGIN
- SELECT phpbb_bots_seq.nextval
- INTO :new.bot_id
- FROM dual;
-END;
-/
-
-
-/*
- Table: 'phpbb_config'
-*/
-CREATE TABLE phpbb_config (
- config_name varchar2(255) DEFAULT '' ,
- config_value varchar2(765) DEFAULT '' ,
- is_dynamic number(1) DEFAULT '0' NOT NULL,
- CONSTRAINT pk_phpbb_config PRIMARY KEY (config_name)
-)
-/
-
-CREATE INDEX phpbb_config_is_dynamic ON phpbb_config (is_dynamic)
-/
-
-/*
- Table: 'phpbb_confirm'
-*/
-CREATE TABLE phpbb_confirm (
- confirm_id char(32) DEFAULT '' ,
- session_id char(32) DEFAULT '' ,
- confirm_type number(3) DEFAULT '0' NOT NULL,
- code varchar2(8) DEFAULT '' ,
- seed number(10) DEFAULT '0' NOT NULL,
- attempts number(8) DEFAULT '0' NOT NULL,
- CONSTRAINT pk_phpbb_confirm PRIMARY KEY (session_id, confirm_id)
-)
-/
-
-CREATE INDEX phpbb_confirm_confirm_type ON phpbb_confirm (confirm_type)
-/
-
-/*
- Table: 'phpbb_disallow'
-*/
-CREATE TABLE phpbb_disallow (
- disallow_id number(8) NOT NULL,
- disallow_username varchar2(765) DEFAULT '' ,
- CONSTRAINT pk_phpbb_disallow PRIMARY KEY (disallow_id)
-)
-/
-
-
-CREATE SEQUENCE phpbb_disallow_seq
-/
-
-CREATE OR REPLACE TRIGGER t_phpbb_disallow
-BEFORE INSERT ON phpbb_disallow
-FOR EACH ROW WHEN (
- new.disallow_id IS NULL OR new.disallow_id = 0
-)
-BEGIN
- SELECT phpbb_disallow_seq.nextval
- INTO :new.disallow_id
- FROM dual;
-END;
-/
-
-
-/*
- Table: 'phpbb_drafts'
-*/
-CREATE TABLE phpbb_drafts (
- draft_id number(8) NOT NULL,
- user_id number(8) DEFAULT '0' NOT NULL,
- topic_id number(8) DEFAULT '0' NOT NULL,
- forum_id number(8) DEFAULT '0' NOT NULL,
- save_time number(11) DEFAULT '0' NOT NULL,
- draft_subject varchar2(765) DEFAULT '' ,
- draft_message clob DEFAULT '' ,
- CONSTRAINT pk_phpbb_drafts PRIMARY KEY (draft_id)
-)
-/
-
-CREATE INDEX phpbb_drafts_save_time ON phpbb_drafts (save_time)
-/
-
-CREATE SEQUENCE phpbb_drafts_seq
-/
-
-CREATE OR REPLACE TRIGGER t_phpbb_drafts
-BEFORE INSERT ON phpbb_drafts
-FOR EACH ROW WHEN (
- new.draft_id IS NULL OR new.draft_id = 0
-)
-BEGIN
- SELECT phpbb_drafts_seq.nextval
- INTO :new.draft_id
- FROM dual;
-END;
-/
-
-
-/*
- Table: 'phpbb_extensions'
-*/
-CREATE TABLE phpbb_extensions (
- extension_id number(8) NOT NULL,
- group_id number(8) DEFAULT '0' NOT NULL,
- extension varchar2(100) DEFAULT '' ,
- CONSTRAINT pk_phpbb_extensions PRIMARY KEY (extension_id)
-)
-/
-
-
-CREATE SEQUENCE phpbb_extensions_seq
-/
-
-CREATE OR REPLACE TRIGGER t_phpbb_extensions
-BEFORE INSERT ON phpbb_extensions
-FOR EACH ROW WHEN (
- new.extension_id IS NULL OR new.extension_id = 0
-)
-BEGIN
- SELECT phpbb_extensions_seq.nextval
- INTO :new.extension_id
- FROM dual;
-END;
-/
-
-
-/*
- Table: 'phpbb_extension_groups'
-*/
-CREATE TABLE phpbb_extension_groups (
- group_id number(8) NOT NULL,
- group_name varchar2(765) DEFAULT '' ,
- cat_id number(2) DEFAULT '0' NOT NULL,
- allow_group number(1) DEFAULT '0' NOT NULL,
- download_mode number(1) DEFAULT '1' NOT NULL,
- upload_icon varchar2(255) DEFAULT '' ,
- max_filesize number(20) DEFAULT '0' NOT NULL,
- allowed_forums clob DEFAULT '' ,
- allow_in_pm number(1) DEFAULT '0' NOT NULL,
- CONSTRAINT pk_phpbb_extension_groups PRIMARY KEY (group_id)
-)
-/
-
-
-CREATE SEQUENCE phpbb_extension_groups_seq
-/
-
-CREATE OR REPLACE TRIGGER t_phpbb_extension_groups
-BEFORE INSERT ON phpbb_extension_groups
-FOR EACH ROW WHEN (
- new.group_id IS NULL OR new.group_id = 0
-)
-BEGIN
- SELECT phpbb_extension_groups_seq.nextval
- INTO :new.group_id
- FROM dual;
-END;
-/
-
-
-/*
- Table: 'phpbb_forums'
-*/
-CREATE TABLE phpbb_forums (
- forum_id number(8) NOT NULL,
- parent_id number(8) DEFAULT '0' NOT NULL,
- left_id number(8) DEFAULT '0' NOT NULL,
- right_id number(8) DEFAULT '0' NOT NULL,
- forum_parents clob DEFAULT '' ,
- forum_name varchar2(765) DEFAULT '' ,
- forum_desc clob DEFAULT '' ,
- forum_desc_bitfield varchar2(255) DEFAULT '' ,
- forum_desc_options number(11) DEFAULT '7' NOT NULL,
- forum_desc_uid varchar2(8) DEFAULT '' ,
- forum_link varchar2(765) DEFAULT '' ,
- forum_password varchar2(120) DEFAULT '' ,
- forum_style number(8) DEFAULT '0' NOT NULL,
- forum_image varchar2(255) DEFAULT '' ,
- forum_rules clob DEFAULT '' ,
- forum_rules_link varchar2(765) DEFAULT '' ,
- forum_rules_bitfield varchar2(255) DEFAULT '' ,
- forum_rules_options number(11) DEFAULT '7' NOT NULL,
- forum_rules_uid varchar2(8) DEFAULT '' ,
- forum_topics_per_page number(4) DEFAULT '0' NOT NULL,
- forum_type number(4) DEFAULT '0' NOT NULL,
- forum_status number(4) DEFAULT '0' NOT NULL,
- forum_posts number(8) DEFAULT '0' NOT NULL,
- forum_topics number(8) DEFAULT '0' NOT NULL,
- forum_topics_real number(8) DEFAULT '0' NOT NULL,
- forum_last_post_id number(8) DEFAULT '0' NOT NULL,
- forum_last_poster_id number(8) DEFAULT '0' NOT NULL,
- forum_last_post_subject varchar2(765) DEFAULT '' ,
- forum_last_post_time number(11) DEFAULT '0' NOT NULL,
- forum_last_poster_name varchar2(765) DEFAULT '' ,
- forum_last_poster_colour varchar2(6) DEFAULT '' ,
- forum_flags number(4) DEFAULT '32' NOT NULL,
- forum_options number(20) DEFAULT '0' NOT NULL,
- display_subforum_list number(1) DEFAULT '1' NOT NULL,
- display_on_index number(1) DEFAULT '1' NOT NULL,
- enable_indexing number(1) DEFAULT '1' NOT NULL,
- enable_icons number(1) DEFAULT '1' NOT NULL,
- enable_prune number(1) DEFAULT '0' NOT NULL,
- prune_next number(11) DEFAULT '0' NOT NULL,
- prune_days number(8) DEFAULT '0' NOT NULL,
- prune_viewed number(8) DEFAULT '0' NOT NULL,
- prune_freq number(8) DEFAULT '0' NOT NULL,
- CONSTRAINT pk_phpbb_forums PRIMARY KEY (forum_id)
-)
-/
-
-CREATE INDEX phpbb_forums_left_right_id ON phpbb_forums (left_id, right_id)
-/
-CREATE INDEX phpbb_forums_forum_lastpost_id ON phpbb_forums (forum_last_post_id)
-/
-
-CREATE SEQUENCE phpbb_forums_seq
-/
-
-CREATE OR REPLACE TRIGGER t_phpbb_forums
-BEFORE INSERT ON phpbb_forums
-FOR EACH ROW WHEN (
- new.forum_id IS NULL OR new.forum_id = 0
-)
-BEGIN
- SELECT phpbb_forums_seq.nextval
- INTO :new.forum_id
- FROM dual;
-END;
-/
-
-
-/*
- Table: 'phpbb_forums_access'
-*/
-CREATE TABLE phpbb_forums_access (
- forum_id number(8) DEFAULT '0' NOT NULL,
- user_id number(8) DEFAULT '0' NOT NULL,
- session_id char(32) DEFAULT '' ,
- CONSTRAINT pk_phpbb_forums_access PRIMARY KEY (forum_id, user_id, session_id)
-)
-/
-
-
-/*
- Table: 'phpbb_forums_track'
-*/
-CREATE TABLE phpbb_forums_track (
- user_id number(8) DEFAULT '0' NOT NULL,
- forum_id number(8) DEFAULT '0' NOT NULL,
- mark_time number(11) DEFAULT '0' NOT NULL,
- CONSTRAINT pk_phpbb_forums_track PRIMARY KEY (user_id, forum_id)
-)
-/
-
-
-/*
- Table: 'phpbb_forums_watch'
-*/
-CREATE TABLE phpbb_forums_watch (
- forum_id number(8) DEFAULT '0' NOT NULL,
- user_id number(8) DEFAULT '0' NOT NULL,
- notify_status number(1) DEFAULT '0' NOT NULL
-)
-/
-
-CREATE INDEX phpbb_forums_watch_forum_id ON phpbb_forums_watch (forum_id)
-/
-CREATE INDEX phpbb_forums_watch_user_id ON phpbb_forums_watch (user_id)
-/
-CREATE INDEX phpbb_forums_watch_notify_stat ON phpbb_forums_watch (notify_status)
-/
-
-/*
- Table: 'phpbb_groups'
-*/
-CREATE TABLE phpbb_groups (
- group_id number(8) NOT NULL,
- group_type number(4) DEFAULT '1' NOT NULL,
- group_founder_manage number(1) DEFAULT '0' NOT NULL,
- group_skip_auth number(1) DEFAULT '0' NOT NULL,
- group_name varchar2(255) DEFAULT '' ,
- group_desc clob DEFAULT '' ,
- group_desc_bitfield varchar2(255) DEFAULT '' ,
- group_desc_options number(11) DEFAULT '7' NOT NULL,
- group_desc_uid varchar2(8) DEFAULT '' ,
- group_display number(1) DEFAULT '0' NOT NULL,
- group_avatar varchar2(255) DEFAULT '' ,
- group_avatar_type number(2) DEFAULT '0' NOT NULL,
- group_avatar_width number(4) DEFAULT '0' NOT NULL,
- group_avatar_height number(4) DEFAULT '0' NOT NULL,
- group_rank number(8) DEFAULT '0' NOT NULL,
- group_colour varchar2(6) DEFAULT '' ,
- group_sig_chars number(8) DEFAULT '0' NOT NULL,
- group_receive_pm number(1) DEFAULT '0' NOT NULL,
- group_message_limit number(8) DEFAULT '0' NOT NULL,
- group_max_recipients number(8) DEFAULT '0' NOT NULL,
- group_legend number(1) DEFAULT '1' NOT NULL,
- CONSTRAINT pk_phpbb_groups PRIMARY KEY (group_id)
-)
-/
-
-CREATE INDEX phpbb_groups_group_legend_name ON phpbb_groups (group_legend, group_name)
-/
-
-CREATE SEQUENCE phpbb_groups_seq
-/
-
-CREATE OR REPLACE TRIGGER t_phpbb_groups
-BEFORE INSERT ON phpbb_groups
-FOR EACH ROW WHEN (
- new.group_id IS NULL OR new.group_id = 0
-)
-BEGIN
- SELECT phpbb_groups_seq.nextval
- INTO :new.group_id
- FROM dual;
-END;
-/
-
-
-/*
- Table: 'phpbb_icons'
-*/
-CREATE TABLE phpbb_icons (
- icons_id number(8) NOT NULL,
- icons_url varchar2(255) DEFAULT '' ,
- icons_width number(4) DEFAULT '0' NOT NULL,
- icons_height number(4) DEFAULT '0' NOT NULL,
- icons_order number(8) DEFAULT '0' NOT NULL,
- display_on_posting number(1) DEFAULT '1' NOT NULL,
- CONSTRAINT pk_phpbb_icons PRIMARY KEY (icons_id)
-)
-/
-
-CREATE INDEX phpbb_icons_display_on_posting ON phpbb_icons (display_on_posting)
-/
-
-CREATE SEQUENCE phpbb_icons_seq
-/
-
-CREATE OR REPLACE TRIGGER t_phpbb_icons
-BEFORE INSERT ON phpbb_icons
-FOR EACH ROW WHEN (
- new.icons_id IS NULL OR new.icons_id = 0
-)
-BEGIN
- SELECT phpbb_icons_seq.nextval
- INTO :new.icons_id
- FROM dual;
-END;
-/
-
-
-/*
- Table: 'phpbb_lang'
-*/
-CREATE TABLE phpbb_lang (
- lang_id number(4) NOT NULL,
- lang_iso varchar2(30) DEFAULT '' ,
- lang_dir varchar2(30) DEFAULT '' ,
- lang_english_name varchar2(300) DEFAULT '' ,
- lang_local_name varchar2(765) DEFAULT '' ,
- lang_author varchar2(765) DEFAULT '' ,
- CONSTRAINT pk_phpbb_lang PRIMARY KEY (lang_id)
-)
-/
-
-CREATE INDEX phpbb_lang_lang_iso ON phpbb_lang (lang_iso)
-/
-
-CREATE SEQUENCE phpbb_lang_seq
-/
-
-CREATE OR REPLACE TRIGGER t_phpbb_lang
-BEFORE INSERT ON phpbb_lang
-FOR EACH ROW WHEN (
- new.lang_id IS NULL OR new.lang_id = 0
-)
-BEGIN
- SELECT phpbb_lang_seq.nextval
- INTO :new.lang_id
- FROM dual;
-END;
-/
-
-
-/*
- Table: 'phpbb_log'
-*/
-CREATE TABLE phpbb_log (
- log_id number(8) NOT NULL,
- log_type number(4) DEFAULT '0' NOT NULL,
- user_id number(8) DEFAULT '0' NOT NULL,
- forum_id number(8) DEFAULT '0' NOT NULL,
- topic_id number(8) DEFAULT '0' NOT NULL,
- reportee_id number(8) DEFAULT '0' NOT NULL,
- log_ip varchar2(40) DEFAULT '' ,
- log_time number(11) DEFAULT '0' NOT NULL,
- log_operation clob DEFAULT '' ,
- log_data clob DEFAULT '' ,
- CONSTRAINT pk_phpbb_log PRIMARY KEY (log_id)
-)
-/
-
-CREATE INDEX phpbb_log_log_type ON phpbb_log (log_type)
-/
-CREATE INDEX phpbb_log_forum_id ON phpbb_log (forum_id)
-/
-CREATE INDEX phpbb_log_topic_id ON phpbb_log (topic_id)
-/
-CREATE INDEX phpbb_log_reportee_id ON phpbb_log (reportee_id)
-/
-CREATE INDEX phpbb_log_user_id ON phpbb_log (user_id)
-/
-
-CREATE SEQUENCE phpbb_log_seq
-/
-
-CREATE OR REPLACE TRIGGER t_phpbb_log
-BEFORE INSERT ON phpbb_log
-FOR EACH ROW WHEN (
- new.log_id IS NULL OR new.log_id = 0
-)
-BEGIN
- SELECT phpbb_log_seq.nextval
- INTO :new.log_id
- FROM dual;
-END;
-/
-
-
-/*
- Table: 'phpbb_login_attempts'
-*/
-CREATE TABLE phpbb_login_attempts (
- attempt_ip varchar2(40) DEFAULT '' ,
- attempt_browser varchar2(150) DEFAULT '' ,
- attempt_forwarded_for varchar2(255) DEFAULT '' ,
- attempt_time number(11) DEFAULT '0' NOT NULL,
- user_id number(8) DEFAULT '0' NOT NULL,
- username varchar2(765) DEFAULT '0' NOT NULL,
- username_clean varchar2(255) DEFAULT '0' NOT NULL
-)
-/
-
-CREATE INDEX phpbb_login_attempts_att_ip ON phpbb_login_attempts (attempt_ip, attempt_time)
-/
-CREATE INDEX phpbb_login_attempts_att_for ON phpbb_login_attempts (attempt_forwarded_for, attempt_time)
-/
-CREATE INDEX phpbb_login_attempts_att_time ON phpbb_login_attempts (attempt_time)
-/
-CREATE INDEX phpbb_login_attempts_user_id ON phpbb_login_attempts (user_id)
-/
-
-/*
- Table: 'phpbb_moderator_cache'
-*/
-CREATE TABLE phpbb_moderator_cache (
- forum_id number(8) DEFAULT '0' NOT NULL,
- user_id number(8) DEFAULT '0' NOT NULL,
- username varchar2(765) DEFAULT '' ,
- group_id number(8) DEFAULT '0' NOT NULL,
- group_name varchar2(765) DEFAULT '' ,
- display_on_index number(1) DEFAULT '1' NOT NULL
-)
-/
-
-CREATE INDEX phpbb_moderator_cache_disp_idx ON phpbb_moderator_cache (display_on_index)
-/
-CREATE INDEX phpbb_moderator_cache_forum_id ON phpbb_moderator_cache (forum_id)
-/
-
-/*
- Table: 'phpbb_modules'
-*/
-CREATE TABLE phpbb_modules (
- module_id number(8) NOT NULL,
- module_enabled number(1) DEFAULT '1' NOT NULL,
- module_display number(1) DEFAULT '1' NOT NULL,
- module_basename varchar2(255) DEFAULT '' ,
- module_class varchar2(10) DEFAULT '' ,
- parent_id number(8) DEFAULT '0' NOT NULL,
- left_id number(8) DEFAULT '0' NOT NULL,
- right_id number(8) DEFAULT '0' NOT NULL,
- module_langname varchar2(255) DEFAULT '' ,
- module_mode varchar2(255) DEFAULT '' ,
- module_auth varchar2(255) DEFAULT '' ,
- CONSTRAINT pk_phpbb_modules PRIMARY KEY (module_id)
-)
-/
-
-CREATE INDEX phpbb_modules_left_right_id ON phpbb_modules (left_id, right_id)
-/
-CREATE INDEX phpbb_modules_module_enabled ON phpbb_modules (module_enabled)
-/
-CREATE INDEX phpbb_modules_class_left_id ON phpbb_modules (module_class, left_id)
-/
-
-CREATE SEQUENCE phpbb_modules_seq
-/
-
-CREATE OR REPLACE TRIGGER t_phpbb_modules
-BEFORE INSERT ON phpbb_modules
-FOR EACH ROW WHEN (
- new.module_id IS NULL OR new.module_id = 0
-)
-BEGIN
- SELECT phpbb_modules_seq.nextval
- INTO :new.module_id
- FROM dual;
-END;
-/
-
-
-/*
- Table: 'phpbb_poll_options'
-*/
-CREATE TABLE phpbb_poll_options (
- poll_option_id number(4) DEFAULT '0' NOT NULL,
- topic_id number(8) DEFAULT '0' NOT NULL,
- poll_option_text clob DEFAULT '' ,
- poll_option_total number(8) DEFAULT '0' NOT NULL
-)
-/
-
-CREATE INDEX phpbb_poll_options_poll_opt_id ON phpbb_poll_options (poll_option_id)
-/
-CREATE INDEX phpbb_poll_options_topic_id ON phpbb_poll_options (topic_id)
-/
-
-/*
- Table: 'phpbb_poll_votes'
-*/
-CREATE TABLE phpbb_poll_votes (
- topic_id number(8) DEFAULT '0' NOT NULL,
- poll_option_id number(4) DEFAULT '0' NOT NULL,
- vote_user_id number(8) DEFAULT '0' NOT NULL,
- vote_user_ip varchar2(40) DEFAULT ''
-)
-/
-
-CREATE INDEX phpbb_poll_votes_topic_id ON phpbb_poll_votes (topic_id)
-/
-CREATE INDEX phpbb_poll_votes_vote_user_id ON phpbb_poll_votes (vote_user_id)
-/
-CREATE INDEX phpbb_poll_votes_vote_user_ip ON phpbb_poll_votes (vote_user_ip)
-/
-
-/*
- Table: 'phpbb_posts'
-*/
-CREATE TABLE phpbb_posts (
- post_id number(8) NOT NULL,
- topic_id number(8) DEFAULT '0' NOT NULL,
- forum_id number(8) DEFAULT '0' NOT NULL,
- poster_id number(8) DEFAULT '0' NOT NULL,
- icon_id number(8) DEFAULT '0' NOT NULL,
- poster_ip varchar2(40) DEFAULT '' ,
- post_time number(11) DEFAULT '0' NOT NULL,
- post_approved number(1) DEFAULT '1' NOT NULL,
- post_reported number(1) DEFAULT '0' NOT NULL,
- enable_bbcode number(1) DEFAULT '1' NOT NULL,
- enable_smilies number(1) DEFAULT '1' NOT NULL,
- enable_magic_url number(1) DEFAULT '1' NOT NULL,
- enable_sig number(1) DEFAULT '1' NOT NULL,
- post_username varchar2(765) DEFAULT '' ,
- post_subject varchar2(765) DEFAULT '' ,
- post_text clob DEFAULT '' ,
- post_checksum varchar2(32) DEFAULT '' ,
- post_attachment number(1) DEFAULT '0' NOT NULL,
- bbcode_bitfield varchar2(255) DEFAULT '' ,
- bbcode_uid varchar2(8) DEFAULT '' ,
- post_postcount number(1) DEFAULT '1' NOT NULL,
- post_edit_time number(11) DEFAULT '0' NOT NULL,
- post_edit_reason varchar2(765) DEFAULT '' ,
- post_edit_user number(8) DEFAULT '0' NOT NULL,
- post_edit_count number(4) DEFAULT '0' NOT NULL,
- post_edit_locked number(1) DEFAULT '0' NOT NULL,
- CONSTRAINT pk_phpbb_posts PRIMARY KEY (post_id)
-)
-/
-
-CREATE INDEX phpbb_posts_forum_id ON phpbb_posts (forum_id)
-/
-CREATE INDEX phpbb_posts_topic_id ON phpbb_posts (topic_id)
-/
-CREATE INDEX phpbb_posts_poster_ip ON phpbb_posts (poster_ip)
-/
-CREATE INDEX phpbb_posts_poster_id ON phpbb_posts (poster_id)
-/
-CREATE INDEX phpbb_posts_post_approved ON phpbb_posts (post_approved)
-/
-CREATE INDEX phpbb_posts_post_username ON phpbb_posts (post_username)
-/
-CREATE INDEX phpbb_posts_tid_post_time ON phpbb_posts (topic_id, post_time)
-/
-
-CREATE SEQUENCE phpbb_posts_seq
-/
-
-CREATE OR REPLACE TRIGGER t_phpbb_posts
-BEFORE INSERT ON phpbb_posts
-FOR EACH ROW WHEN (
- new.post_id IS NULL OR new.post_id = 0
-)
-BEGIN
- SELECT phpbb_posts_seq.nextval
- INTO :new.post_id
- FROM dual;
-END;
-/
-
-
-/*
- Table: 'phpbb_privmsgs'
-*/
-CREATE TABLE phpbb_privmsgs (
- msg_id number(8) NOT NULL,
- root_level number(8) DEFAULT '0' NOT NULL,
- author_id number(8) DEFAULT '0' NOT NULL,
- icon_id number(8) DEFAULT '0' NOT NULL,
- author_ip varchar2(40) DEFAULT '' ,
- message_time number(11) DEFAULT '0' NOT NULL,
- enable_bbcode number(1) DEFAULT '1' NOT NULL,
- enable_smilies number(1) DEFAULT '1' NOT NULL,
- enable_magic_url number(1) DEFAULT '1' NOT NULL,
- enable_sig number(1) DEFAULT '1' NOT NULL,
- message_subject varchar2(765) DEFAULT '' ,
- message_text clob DEFAULT '' ,
- message_edit_reason varchar2(765) DEFAULT '' ,
- message_edit_user number(8) DEFAULT '0' NOT NULL,
- message_attachment number(1) DEFAULT '0' NOT NULL,
- bbcode_bitfield varchar2(255) DEFAULT '' ,
- bbcode_uid varchar2(8) DEFAULT '' ,
- message_edit_time number(11) DEFAULT '0' NOT NULL,
- message_edit_count number(4) DEFAULT '0' NOT NULL,
- to_address clob DEFAULT '' ,
- bcc_address clob DEFAULT '' ,
- message_reported number(1) DEFAULT '0' NOT NULL,
- CONSTRAINT pk_phpbb_privmsgs PRIMARY KEY (msg_id)
-)
-/
-
-CREATE INDEX phpbb_privmsgs_author_ip ON phpbb_privmsgs (author_ip)
-/
-CREATE INDEX phpbb_privmsgs_message_time ON phpbb_privmsgs (message_time)
-/
-CREATE INDEX phpbb_privmsgs_author_id ON phpbb_privmsgs (author_id)
-/
-CREATE INDEX phpbb_privmsgs_root_level ON phpbb_privmsgs (root_level)
-/
-
-CREATE SEQUENCE phpbb_privmsgs_seq
-/
-
-CREATE OR REPLACE TRIGGER t_phpbb_privmsgs
-BEFORE INSERT ON phpbb_privmsgs
-FOR EACH ROW WHEN (
- new.msg_id IS NULL OR new.msg_id = 0
-)
-BEGIN
- SELECT phpbb_privmsgs_seq.nextval
- INTO :new.msg_id
- FROM dual;
-END;
-/
-
-
-/*
- Table: 'phpbb_privmsgs_folder'
-*/
-CREATE TABLE phpbb_privmsgs_folder (
- folder_id number(8) NOT NULL,
- user_id number(8) DEFAULT '0' NOT NULL,
- folder_name varchar2(765) DEFAULT '' ,
- pm_count number(8) DEFAULT '0' NOT NULL,
- CONSTRAINT pk_phpbb_privmsgs_folder PRIMARY KEY (folder_id)
-)
-/
-
-CREATE INDEX phpbb_privmsgs_folder_user_id ON phpbb_privmsgs_folder (user_id)
-/
-
-CREATE SEQUENCE phpbb_privmsgs_folder_seq
-/
-
-CREATE OR REPLACE TRIGGER t_phpbb_privmsgs_folder
-BEFORE INSERT ON phpbb_privmsgs_folder
-FOR EACH ROW WHEN (
- new.folder_id IS NULL OR new.folder_id = 0
-)
-BEGIN
- SELECT phpbb_privmsgs_folder_seq.nextval
- INTO :new.folder_id
- FROM dual;
-END;
-/
-
-
-/*
- Table: 'phpbb_privmsgs_rules'
-*/
-CREATE TABLE phpbb_privmsgs_rules (
- rule_id number(8) NOT NULL,
- user_id number(8) DEFAULT '0' NOT NULL,
- rule_check number(8) DEFAULT '0' NOT NULL,
- rule_connection number(8) DEFAULT '0' NOT NULL,
- rule_string varchar2(765) DEFAULT '' ,
- rule_user_id number(8) DEFAULT '0' NOT NULL,
- rule_group_id number(8) DEFAULT '0' NOT NULL,
- rule_action number(8) DEFAULT '0' NOT NULL,
- rule_folder_id number(11) DEFAULT '0' NOT NULL,
- CONSTRAINT pk_phpbb_privmsgs_rules PRIMARY KEY (rule_id)
-)
-/
-
-CREATE INDEX phpbb_privmsgs_rules_user_id ON phpbb_privmsgs_rules (user_id)
-/
-
-CREATE SEQUENCE phpbb_privmsgs_rules_seq
-/
-
-CREATE OR REPLACE TRIGGER t_phpbb_privmsgs_rules
-BEFORE INSERT ON phpbb_privmsgs_rules
-FOR EACH ROW WHEN (
- new.rule_id IS NULL OR new.rule_id = 0
-)
-BEGIN
- SELECT phpbb_privmsgs_rules_seq.nextval
- INTO :new.rule_id
- FROM dual;
-END;
-/
-
-
-/*
- Table: 'phpbb_privmsgs_to'
-*/
-CREATE TABLE phpbb_privmsgs_to (
- msg_id number(8) DEFAULT '0' NOT NULL,
- user_id number(8) DEFAULT '0' NOT NULL,
- author_id number(8) DEFAULT '0' NOT NULL,
- pm_deleted number(1) DEFAULT '0' NOT NULL,
- pm_new number(1) DEFAULT '1' NOT NULL,
- pm_unread number(1) DEFAULT '1' NOT NULL,
- pm_replied number(1) DEFAULT '0' NOT NULL,
- pm_marked number(1) DEFAULT '0' NOT NULL,
- pm_forwarded number(1) DEFAULT '0' NOT NULL,
- folder_id number(11) DEFAULT '0' NOT NULL
-)
-/
-
-CREATE INDEX phpbb_privmsgs_to_msg_id ON phpbb_privmsgs_to (msg_id)
-/
-CREATE INDEX phpbb_privmsgs_to_author_id ON phpbb_privmsgs_to (author_id)
-/
-CREATE INDEX phpbb_privmsgs_to_usr_flder_id ON phpbb_privmsgs_to (user_id, folder_id)
-/
-
-/*
- Table: 'phpbb_profile_fields'
-*/
-CREATE TABLE phpbb_profile_fields (
- field_id number(8) NOT NULL,
- field_name varchar2(765) DEFAULT '' ,
- field_type number(4) DEFAULT '0' NOT NULL,
- field_ident varchar2(20) DEFAULT '' ,
- field_length varchar2(20) DEFAULT '' ,
- field_minlen varchar2(255) DEFAULT '' ,
- field_maxlen varchar2(255) DEFAULT '' ,
- field_novalue varchar2(765) DEFAULT '' ,
- field_default_value varchar2(765) DEFAULT '' ,
- field_validation varchar2(60) DEFAULT '' ,
- field_required number(1) DEFAULT '0' NOT NULL,
- field_show_novalue number(1) DEFAULT '0' NOT NULL,
- field_show_on_reg number(1) DEFAULT '0' NOT NULL,
- field_show_on_vt number(1) DEFAULT '0' NOT NULL,
- field_show_profile number(1) DEFAULT '0' NOT NULL,
- field_hide number(1) DEFAULT '0' NOT NULL,
- field_no_view number(1) DEFAULT '0' NOT NULL,
- field_active number(1) DEFAULT '0' NOT NULL,
- field_order number(8) DEFAULT '0' NOT NULL,
- CONSTRAINT pk_phpbb_profile_fields PRIMARY KEY (field_id)
-)
-/
-
-CREATE INDEX phpbb_profile_fields_fld_type ON phpbb_profile_fields (field_type)
-/
-CREATE INDEX phpbb_profile_fields_fld_ordr ON phpbb_profile_fields (field_order)
-/
-
-CREATE SEQUENCE phpbb_profile_fields_seq
-/
-
-CREATE OR REPLACE TRIGGER t_phpbb_profile_fields
-BEFORE INSERT ON phpbb_profile_fields
-FOR EACH ROW WHEN (
- new.field_id IS NULL OR new.field_id = 0
-)
-BEGIN
- SELECT phpbb_profile_fields_seq.nextval
- INTO :new.field_id
- FROM dual;
-END;
-/
-
-
-/*
- Table: 'phpbb_profile_fields_data'
-*/
-CREATE TABLE phpbb_profile_fields_data (
- user_id number(8) DEFAULT '0' NOT NULL,
- CONSTRAINT pk_phpbb_profile_fields_data PRIMARY KEY (user_id)
-)
-/
-
-
-/*
- Table: 'phpbb_profile_fields_lang'
-*/
-CREATE TABLE phpbb_profile_fields_lang (
- field_id number(8) DEFAULT '0' NOT NULL,
- lang_id number(8) DEFAULT '0' NOT NULL,
- option_id number(8) DEFAULT '0' NOT NULL,
- field_type number(4) DEFAULT '0' NOT NULL,
- lang_value varchar2(765) DEFAULT '' ,
- CONSTRAINT pk_phpbb_profile_fields_lang PRIMARY KEY (field_id, lang_id, option_id)
-)
-/
-
-
-/*
- Table: 'phpbb_profile_lang'
-*/
-CREATE TABLE phpbb_profile_lang (
- field_id number(8) DEFAULT '0' NOT NULL,
- lang_id number(8) DEFAULT '0' NOT NULL,
- lang_name varchar2(765) DEFAULT '' ,
- lang_explain clob DEFAULT '' ,
- lang_default_value varchar2(765) DEFAULT '' ,
- CONSTRAINT pk_phpbb_profile_lang PRIMARY KEY (field_id, lang_id)
-)
-/
-
-
-/*
- Table: 'phpbb_ranks'
-*/
-CREATE TABLE phpbb_ranks (
- rank_id number(8) NOT NULL,
- rank_title varchar2(765) DEFAULT '' ,
- rank_min number(8) DEFAULT '0' NOT NULL,
- rank_special number(1) DEFAULT '0' NOT NULL,
- rank_image varchar2(255) DEFAULT '' ,
- CONSTRAINT pk_phpbb_ranks PRIMARY KEY (rank_id)
-)
-/
-
-
-CREATE SEQUENCE phpbb_ranks_seq
-/
-
-CREATE OR REPLACE TRIGGER t_phpbb_ranks
-BEFORE INSERT ON phpbb_ranks
-FOR EACH ROW WHEN (
- new.rank_id IS NULL OR new.rank_id = 0
-)
-BEGIN
- SELECT phpbb_ranks_seq.nextval
- INTO :new.rank_id
- FROM dual;
-END;
-/
-
-
-/*
- Table: 'phpbb_reports'
-*/
-CREATE TABLE phpbb_reports (
- report_id number(8) NOT NULL,
- reason_id number(4) DEFAULT '0' NOT NULL,
- post_id number(8) DEFAULT '0' NOT NULL,
- pm_id number(8) DEFAULT '0' NOT NULL,
- user_id number(8) DEFAULT '0' NOT NULL,
- user_notify number(1) DEFAULT '0' NOT NULL,
- report_closed number(1) DEFAULT '0' NOT NULL,
- report_time number(11) DEFAULT '0' NOT NULL,
- report_text clob DEFAULT '' ,
- CONSTRAINT pk_phpbb_reports PRIMARY KEY (report_id)
-)
-/
-
-CREATE INDEX phpbb_reports_post_id ON phpbb_reports (post_id)
-/
-CREATE INDEX phpbb_reports_pm_id ON phpbb_reports (pm_id)
-/
-
-CREATE SEQUENCE phpbb_reports_seq
-/
-
-CREATE OR REPLACE TRIGGER t_phpbb_reports
-BEFORE INSERT ON phpbb_reports
-FOR EACH ROW WHEN (
- new.report_id IS NULL OR new.report_id = 0
-)
-BEGIN
- SELECT phpbb_reports_seq.nextval
- INTO :new.report_id
- FROM dual;
-END;
-/
-
-
-/*
- Table: 'phpbb_reports_reasons'
-*/
-CREATE TABLE phpbb_reports_reasons (
- reason_id number(4) NOT NULL,
- reason_title varchar2(765) DEFAULT '' ,
- reason_description clob DEFAULT '' ,
- reason_order number(4) DEFAULT '0' NOT NULL,
- CONSTRAINT pk_phpbb_reports_reasons PRIMARY KEY (reason_id)
-)
-/
-
-
-CREATE SEQUENCE phpbb_reports_reasons_seq
-/
-
-CREATE OR REPLACE TRIGGER t_phpbb_reports_reasons
-BEFORE INSERT ON phpbb_reports_reasons
-FOR EACH ROW WHEN (
- new.reason_id IS NULL OR new.reason_id = 0
-)
-BEGIN
- SELECT phpbb_reports_reasons_seq.nextval
- INTO :new.reason_id
- FROM dual;
-END;
-/
-
-
-/*
- Table: 'phpbb_search_results'
-*/
-CREATE TABLE phpbb_search_results (
- search_key varchar2(32) DEFAULT '' ,
- search_time number(11) DEFAULT '0' NOT NULL,
- search_keywords clob DEFAULT '' ,
- search_authors clob DEFAULT '' ,
- CONSTRAINT pk_phpbb_search_results PRIMARY KEY (search_key)
-)
-/
-
-
-/*
- Table: 'phpbb_search_wordlist'
-*/
-CREATE TABLE phpbb_search_wordlist (
- word_id number(8) NOT NULL,
- word_text varchar2(765) DEFAULT '' ,
- word_common number(1) DEFAULT '0' NOT NULL,
- word_count number(8) DEFAULT '0' NOT NULL,
- CONSTRAINT pk_phpbb_search_wordlist PRIMARY KEY (word_id),
- CONSTRAINT u_phpbb_wrd_txt UNIQUE (word_text)
-)
-/
-
-CREATE INDEX phpbb_search_wordlist_wrd_cnt ON phpbb_search_wordlist (word_count)
-/
-
-CREATE SEQUENCE phpbb_search_wordlist_seq
-/
-
-CREATE OR REPLACE TRIGGER t_phpbb_search_wordlist
-BEFORE INSERT ON phpbb_search_wordlist
-FOR EACH ROW WHEN (
- new.word_id IS NULL OR new.word_id = 0
-)
-BEGIN
- SELECT phpbb_search_wordlist_seq.nextval
- INTO :new.word_id
- FROM dual;
-END;
-/
-
-
-/*
- Table: 'phpbb_search_wordmatch'
-*/
-CREATE TABLE phpbb_search_wordmatch (
- post_id number(8) DEFAULT '0' NOT NULL,
- word_id number(8) DEFAULT '0' NOT NULL,
- title_match number(1) DEFAULT '0' NOT NULL,
- CONSTRAINT u_phpbb_unq_mtch UNIQUE (word_id, post_id, title_match)
-)
-/
-
-CREATE INDEX phpbb_search_wordmatch_word_id ON phpbb_search_wordmatch (word_id)
-/
-CREATE INDEX phpbb_search_wordmatch_post_id ON phpbb_search_wordmatch (post_id)
-/
-
-/*
- Table: 'phpbb_sessions'
-*/
-CREATE TABLE phpbb_sessions (
- session_id char(32) DEFAULT '' ,
- session_user_id number(8) DEFAULT '0' NOT NULL,
- session_forum_id number(8) DEFAULT '0' NOT NULL,
- session_last_visit number(11) DEFAULT '0' NOT NULL,
- session_start number(11) DEFAULT '0' NOT NULL,
- session_time number(11) DEFAULT '0' NOT NULL,
- session_ip varchar2(40) DEFAULT '' ,
- session_browser varchar2(150) DEFAULT '' ,
- session_forwarded_for varchar2(255) DEFAULT '' ,
- session_page varchar2(765) DEFAULT '' ,
- session_viewonline number(1) DEFAULT '1' NOT NULL,
- session_autologin number(1) DEFAULT '0' NOT NULL,
- session_admin number(1) DEFAULT '0' NOT NULL,
- CONSTRAINT pk_phpbb_sessions PRIMARY KEY (session_id)
-)
-/
-
-CREATE INDEX phpbb_sessions_session_time ON phpbb_sessions (session_time)
-/
-CREATE INDEX phpbb_sessions_session_user_id ON phpbb_sessions (session_user_id)
-/
-CREATE INDEX phpbb_sessions_session_fid ON phpbb_sessions (session_forum_id)
-/
-
-/*
- Table: 'phpbb_sessions_keys'
-*/
-CREATE TABLE phpbb_sessions_keys (
- key_id char(32) DEFAULT '' ,
- user_id number(8) DEFAULT '0' NOT NULL,
- last_ip varchar2(40) DEFAULT '' ,
- last_login number(11) DEFAULT '0' NOT NULL,
- CONSTRAINT pk_phpbb_sessions_keys PRIMARY KEY (key_id, user_id)
-)
-/
-
-CREATE INDEX phpbb_sessions_keys_last_login ON phpbb_sessions_keys (last_login)
-/
-
-/*
- Table: 'phpbb_sitelist'
-*/
-CREATE TABLE phpbb_sitelist (
- site_id number(8) NOT NULL,
- site_ip varchar2(40) DEFAULT '' ,
- site_hostname varchar2(255) DEFAULT '' ,
- ip_exclude number(1) DEFAULT '0' NOT NULL,
- CONSTRAINT pk_phpbb_sitelist PRIMARY KEY (site_id)
-)
-/
-
-
-CREATE SEQUENCE phpbb_sitelist_seq
-/
-
-CREATE OR REPLACE TRIGGER t_phpbb_sitelist
-BEFORE INSERT ON phpbb_sitelist
-FOR EACH ROW WHEN (
- new.site_id IS NULL OR new.site_id = 0
-)
-BEGIN
- SELECT phpbb_sitelist_seq.nextval
- INTO :new.site_id
- FROM dual;
-END;
-/
-
-
-/*
- Table: 'phpbb_smilies'
-*/
-CREATE TABLE phpbb_smilies (
- smiley_id number(8) NOT NULL,
- code varchar2(150) DEFAULT '' ,
- emotion varchar2(150) DEFAULT '' ,
- smiley_url varchar2(50) DEFAULT '' ,
- smiley_width number(4) DEFAULT '0' NOT NULL,
- smiley_height number(4) DEFAULT '0' NOT NULL,
- smiley_order number(8) DEFAULT '0' NOT NULL,
- display_on_posting number(1) DEFAULT '1' NOT NULL,
- CONSTRAINT pk_phpbb_smilies PRIMARY KEY (smiley_id)
-)
-/
-
-CREATE INDEX phpbb_smilies_display_on_post ON phpbb_smilies (display_on_posting)
-/
-
-CREATE SEQUENCE phpbb_smilies_seq
-/
-
-CREATE OR REPLACE TRIGGER t_phpbb_smilies
-BEFORE INSERT ON phpbb_smilies
-FOR EACH ROW WHEN (
- new.smiley_id IS NULL OR new.smiley_id = 0
-)
-BEGIN
- SELECT phpbb_smilies_seq.nextval
- INTO :new.smiley_id
- FROM dual;
-END;
-/
-
-
-/*
- Table: 'phpbb_styles'
-*/
-CREATE TABLE phpbb_styles (
- style_id number(8) NOT NULL,
- style_name varchar2(765) DEFAULT '' ,
- style_copyright varchar2(765) DEFAULT '' ,
- style_active number(1) DEFAULT '1' NOT NULL,
- template_id number(8) DEFAULT '0' NOT NULL,
- theme_id number(8) DEFAULT '0' NOT NULL,
- imageset_id number(8) DEFAULT '0' NOT NULL,
- CONSTRAINT pk_phpbb_styles PRIMARY KEY (style_id),
- CONSTRAINT u_phpbb_style_name UNIQUE (style_name)
-)
-/
-
-CREATE INDEX phpbb_styles_template_id ON phpbb_styles (template_id)
-/
-CREATE INDEX phpbb_styles_theme_id ON phpbb_styles (theme_id)
-/
-CREATE INDEX phpbb_styles_imageset_id ON phpbb_styles (imageset_id)
-/
-
-CREATE SEQUENCE phpbb_styles_seq
-/
-
-CREATE OR REPLACE TRIGGER t_phpbb_styles
-BEFORE INSERT ON phpbb_styles
-FOR EACH ROW WHEN (
- new.style_id IS NULL OR new.style_id = 0
-)
-BEGIN
- SELECT phpbb_styles_seq.nextval
- INTO :new.style_id
- FROM dual;
-END;
-/
-
-
-/*
- Table: 'phpbb_styles_template'
-*/
-CREATE TABLE phpbb_styles_template (
- template_id number(8) NOT NULL,
- template_name varchar2(765) DEFAULT '' ,
- template_copyright varchar2(765) DEFAULT '' ,
- template_path varchar2(100) DEFAULT '' ,
- bbcode_bitfield varchar2(255) DEFAULT 'kNg=' NOT NULL,
- template_storedb number(1) DEFAULT '0' NOT NULL,
- template_inherits_id number(4) DEFAULT '0' NOT NULL,
- template_inherit_path varchar2(255) DEFAULT '' ,
- CONSTRAINT pk_phpbb_styles_template PRIMARY KEY (template_id),
- CONSTRAINT u_phpbb_tmplte_nm UNIQUE (template_name)
-)
-/
-
-
-CREATE SEQUENCE phpbb_styles_template_seq
-/
-
-CREATE OR REPLACE TRIGGER t_phpbb_styles_template
-BEFORE INSERT ON phpbb_styles_template
-FOR EACH ROW WHEN (
- new.template_id IS NULL OR new.template_id = 0
-)
-BEGIN
- SELECT phpbb_styles_template_seq.nextval
- INTO :new.template_id
- FROM dual;
-END;
-/
-
-
-/*
- Table: 'phpbb_styles_template_data'
-*/
-CREATE TABLE phpbb_styles_template_data (
- template_id number(8) DEFAULT '0' NOT NULL,
- template_filename varchar2(100) DEFAULT '' ,
- template_included clob DEFAULT '' ,
- template_mtime number(11) DEFAULT '0' NOT NULL,
- template_data clob DEFAULT ''
-)
-/
-
-CREATE INDEX phpbb_styles_template_data_tid ON phpbb_styles_template_data (template_id)
-/
-CREATE INDEX phpbb_styles_template_data_tfn ON phpbb_styles_template_data (template_filename)
-/
-
-/*
- Table: 'phpbb_styles_theme'
-*/
-CREATE TABLE phpbb_styles_theme (
- theme_id number(8) NOT NULL,
- theme_name varchar2(765) DEFAULT '' ,
- theme_copyright varchar2(765) DEFAULT '' ,
- theme_path varchar2(100) DEFAULT '' ,
- theme_storedb number(1) DEFAULT '0' NOT NULL,
- theme_mtime number(11) DEFAULT '0' NOT NULL,
- theme_data clob DEFAULT '' ,
- CONSTRAINT pk_phpbb_styles_theme PRIMARY KEY (theme_id),
- CONSTRAINT u_phpbb_theme_name UNIQUE (theme_name)
-)
-/
-
-
-CREATE SEQUENCE phpbb_styles_theme_seq
-/
-
-CREATE OR REPLACE TRIGGER t_phpbb_styles_theme
-BEFORE INSERT ON phpbb_styles_theme
-FOR EACH ROW WHEN (
- new.theme_id IS NULL OR new.theme_id = 0
-)
-BEGIN
- SELECT phpbb_styles_theme_seq.nextval
- INTO :new.theme_id
- FROM dual;
-END;
-/
-
-
-/*
- Table: 'phpbb_styles_imageset'
-*/
-CREATE TABLE phpbb_styles_imageset (
- imageset_id number(8) NOT NULL,
- imageset_name varchar2(765) DEFAULT '' ,
- imageset_copyright varchar2(765) DEFAULT '' ,
- imageset_path varchar2(100) DEFAULT '' ,
- CONSTRAINT pk_phpbb_styles_imageset PRIMARY KEY (imageset_id),
- CONSTRAINT u_phpbb_imgset_nm UNIQUE (imageset_name)
-)
-/
-
-
-CREATE SEQUENCE phpbb_styles_imageset_seq
-/
-
-CREATE OR REPLACE TRIGGER t_phpbb_styles_imageset
-BEFORE INSERT ON phpbb_styles_imageset
-FOR EACH ROW WHEN (
- new.imageset_id IS NULL OR new.imageset_id = 0
-)
-BEGIN
- SELECT phpbb_styles_imageset_seq.nextval
- INTO :new.imageset_id
- FROM dual;
-END;
-/
-
-
-/*
- Table: 'phpbb_styles_imageset_data'
-*/
-CREATE TABLE phpbb_styles_imageset_data (
- image_id number(8) NOT NULL,
- image_name varchar2(200) DEFAULT '' ,
- image_filename varchar2(200) DEFAULT '' ,
- image_lang varchar2(30) DEFAULT '' ,
- image_height number(4) DEFAULT '0' NOT NULL,
- image_width number(4) DEFAULT '0' NOT NULL,
- imageset_id number(8) DEFAULT '0' NOT NULL,
- CONSTRAINT pk_phpbb_styles_imageset_data PRIMARY KEY (image_id)
-)
-/
-
-CREATE INDEX phpbb_styles_imageset_data_i_d ON phpbb_styles_imageset_data (imageset_id)
-/
-
-CREATE SEQUENCE phpbb_styles_imageset_data_seq
-/
-
-CREATE OR REPLACE TRIGGER t_phpbb_styles_imageset_data
-BEFORE INSERT ON phpbb_styles_imageset_data
-FOR EACH ROW WHEN (
- new.image_id IS NULL OR new.image_id = 0
-)
-BEGIN
- SELECT phpbb_styles_imageset_data_seq.nextval
- INTO :new.image_id
- FROM dual;
-END;
-/
-
-
-/*
- Table: 'phpbb_topics'
-*/
-CREATE TABLE phpbb_topics (
- topic_id number(8) NOT NULL,
- forum_id number(8) DEFAULT '0' NOT NULL,
- icon_id number(8) DEFAULT '0' NOT NULL,
- topic_attachment number(1) DEFAULT '0' NOT NULL,
- topic_approved number(1) DEFAULT '1' NOT NULL,
- topic_reported number(1) DEFAULT '0' NOT NULL,
- topic_title varchar2(765) DEFAULT '' ,
- topic_poster number(8) DEFAULT '0' NOT NULL,
- topic_time number(11) DEFAULT '0' NOT NULL,
- topic_time_limit number(11) DEFAULT '0' NOT NULL,
- topic_views number(8) DEFAULT '0' NOT NULL,
- topic_replies number(8) DEFAULT '0' NOT NULL,
- topic_replies_real number(8) DEFAULT '0' NOT NULL,
- topic_status number(3) DEFAULT '0' NOT NULL,
- topic_type number(3) DEFAULT '0' NOT NULL,
- topic_first_post_id number(8) DEFAULT '0' NOT NULL,
- topic_first_poster_name varchar2(765) DEFAULT '' ,
- topic_first_poster_colour varchar2(6) DEFAULT '' ,
- topic_last_post_id number(8) DEFAULT '0' NOT NULL,
- topic_last_poster_id number(8) DEFAULT '0' NOT NULL,
- topic_last_poster_name varchar2(765) DEFAULT '' ,
- topic_last_poster_colour varchar2(6) DEFAULT '' ,
- topic_last_post_subject varchar2(765) DEFAULT '' ,
- topic_last_post_time number(11) DEFAULT '0' NOT NULL,
- topic_last_view_time number(11) DEFAULT '0' NOT NULL,
- topic_moved_id number(8) DEFAULT '0' NOT NULL,
- topic_bumped number(1) DEFAULT '0' NOT NULL,
- topic_bumper number(8) DEFAULT '0' NOT NULL,
- poll_title varchar2(765) DEFAULT '' ,
- poll_start number(11) DEFAULT '0' NOT NULL,
- poll_length number(11) DEFAULT '0' NOT NULL,
- poll_max_options number(4) DEFAULT '1' NOT NULL,
- poll_last_vote number(11) DEFAULT '0' NOT NULL,
- poll_vote_change number(1) DEFAULT '0' NOT NULL,
- CONSTRAINT pk_phpbb_topics PRIMARY KEY (topic_id)
-)
-/
-
-CREATE INDEX phpbb_topics_forum_id ON phpbb_topics (forum_id)
-/
-CREATE INDEX phpbb_topics_forum_id_type ON phpbb_topics (forum_id, topic_type)
-/
-CREATE INDEX phpbb_topics_last_post_time ON phpbb_topics (topic_last_post_time)
-/
-CREATE INDEX phpbb_topics_topic_approved ON phpbb_topics (topic_approved)
-/
-CREATE INDEX phpbb_topics_forum_appr_last ON phpbb_topics (forum_id, topic_approved, topic_last_post_id)
-/
-CREATE INDEX phpbb_topics_fid_time_moved ON phpbb_topics (forum_id, topic_last_post_time, topic_moved_id)
-/
-
-CREATE SEQUENCE phpbb_topics_seq
-/
-
-CREATE OR REPLACE TRIGGER t_phpbb_topics
-BEFORE INSERT ON phpbb_topics
-FOR EACH ROW WHEN (
- new.topic_id IS NULL OR new.topic_id = 0
-)
-BEGIN
- SELECT phpbb_topics_seq.nextval
- INTO :new.topic_id
- FROM dual;
-END;
-/
-
-
-/*
- Table: 'phpbb_topics_track'
-*/
-CREATE TABLE phpbb_topics_track (
- user_id number(8) DEFAULT '0' NOT NULL,
- topic_id number(8) DEFAULT '0' NOT NULL,
- forum_id number(8) DEFAULT '0' NOT NULL,
- mark_time number(11) DEFAULT '0' NOT NULL,
- CONSTRAINT pk_phpbb_topics_track PRIMARY KEY (user_id, topic_id)
-)
-/
-
-CREATE INDEX phpbb_topics_track_topic_id ON phpbb_topics_track (topic_id)
-/
-CREATE INDEX phpbb_topics_track_forum_id ON phpbb_topics_track (forum_id)
-/
-
-/*
- Table: 'phpbb_topics_posted'
-*/
-CREATE TABLE phpbb_topics_posted (
- user_id number(8) DEFAULT '0' NOT NULL,
- topic_id number(8) DEFAULT '0' NOT NULL,
- topic_posted number(1) DEFAULT '0' NOT NULL,
- CONSTRAINT pk_phpbb_topics_posted PRIMARY KEY (user_id, topic_id)
-)
-/
-
-
-/*
- Table: 'phpbb_topics_watch'
-*/
-CREATE TABLE phpbb_topics_watch (
- topic_id number(8) DEFAULT '0' NOT NULL,
- user_id number(8) DEFAULT '0' NOT NULL,
- notify_status number(1) DEFAULT '0' NOT NULL
-)
-/
-
-CREATE INDEX phpbb_topics_watch_topic_id ON phpbb_topics_watch (topic_id)
-/
-CREATE INDEX phpbb_topics_watch_user_id ON phpbb_topics_watch (user_id)
-/
-CREATE INDEX phpbb_topics_watch_notify_stat ON phpbb_topics_watch (notify_status)
-/
-
-/*
- Table: 'phpbb_user_group'
-*/
-CREATE TABLE phpbb_user_group (
- group_id number(8) DEFAULT '0' NOT NULL,
- user_id number(8) DEFAULT '0' NOT NULL,
- group_leader number(1) DEFAULT '0' NOT NULL,
- user_pending number(1) DEFAULT '1' NOT NULL
-)
-/
-
-CREATE INDEX phpbb_user_group_group_id ON phpbb_user_group (group_id)
-/
-CREATE INDEX phpbb_user_group_user_id ON phpbb_user_group (user_id)
-/
-CREATE INDEX phpbb_user_group_group_leader ON phpbb_user_group (group_leader)
-/
-
-/*
- Table: 'phpbb_users'
-*/
-CREATE TABLE phpbb_users (
- user_id number(8) NOT NULL,
- user_type number(2) DEFAULT '0' NOT NULL,
- group_id number(8) DEFAULT '3' NOT NULL,
- user_permissions clob DEFAULT '' ,
- user_perm_from number(8) DEFAULT '0' NOT NULL,
- user_ip varchar2(40) DEFAULT '' ,
- user_regdate number(11) DEFAULT '0' NOT NULL,
- username varchar2(255) DEFAULT '' ,
- username_clean varchar2(255) DEFAULT '' ,
- user_password varchar2(120) DEFAULT '' ,
- user_passchg number(11) DEFAULT '0' NOT NULL,
- user_pass_convert number(1) DEFAULT '0' NOT NULL,
- user_email varchar2(300) DEFAULT '' ,
- user_email_hash number(20) DEFAULT '0' NOT NULL,
- user_birthday varchar2(10) DEFAULT '' ,
- user_lastvisit number(11) DEFAULT '0' NOT NULL,
- user_lastmark number(11) DEFAULT '0' NOT NULL,
- user_lastpost_time number(11) DEFAULT '0' NOT NULL,
- user_lastpage varchar2(600) DEFAULT '' ,
- user_last_confirm_key varchar2(10) DEFAULT '' ,
- user_last_search number(11) DEFAULT '0' NOT NULL,
- user_warnings number(4) DEFAULT '0' NOT NULL,
- user_last_warning number(11) DEFAULT '0' NOT NULL,
- user_login_attempts number(4) DEFAULT '0' NOT NULL,
- user_inactive_reason number(2) DEFAULT '0' NOT NULL,
- user_inactive_time number(11) DEFAULT '0' NOT NULL,
- user_posts number(8) DEFAULT '0' NOT NULL,
- user_lang varchar2(30) DEFAULT '' ,
- user_timezone number(5, 2) DEFAULT '0' NOT NULL,
- user_dst number(1) DEFAULT '0' NOT NULL,
- user_dateformat varchar2(90) DEFAULT 'd M Y H:i' NOT NULL,
- user_style number(8) DEFAULT '0' NOT NULL,
- user_rank number(8) DEFAULT '0' NOT NULL,
- user_colour varchar2(6) DEFAULT '' ,
- user_new_privmsg number(4) DEFAULT '0' NOT NULL,
- user_unread_privmsg number(4) DEFAULT '0' NOT NULL,
- user_last_privmsg number(11) DEFAULT '0' NOT NULL,
- user_message_rules number(1) DEFAULT '0' NOT NULL,
- user_full_folder number(11) DEFAULT '-3' NOT NULL,
- user_emailtime number(11) DEFAULT '0' NOT NULL,
- user_topic_show_days number(4) DEFAULT '0' NOT NULL,
- user_topic_sortby_type varchar2(1) DEFAULT 't' NOT NULL,
- user_topic_sortby_dir varchar2(1) DEFAULT 'd' NOT NULL,
- user_post_show_days number(4) DEFAULT '0' NOT NULL,
- user_post_sortby_type varchar2(1) DEFAULT 't' NOT NULL,
- user_post_sortby_dir varchar2(1) DEFAULT 'a' NOT NULL,
- user_notify number(1) DEFAULT '0' NOT NULL,
- user_notify_pm number(1) DEFAULT '1' NOT NULL,
- user_notify_type number(4) DEFAULT '0' NOT NULL,
- user_allow_pm number(1) DEFAULT '1' NOT NULL,
- user_allow_viewonline number(1) DEFAULT '1' NOT NULL,
- user_allow_viewemail number(1) DEFAULT '1' NOT NULL,
- user_allow_massemail number(1) DEFAULT '1' NOT NULL,
- user_options number(11) DEFAULT '230271' NOT NULL,
- user_avatar varchar2(255) DEFAULT '' ,
- user_avatar_type number(2) DEFAULT '0' NOT NULL,
- user_avatar_width number(4) DEFAULT '0' NOT NULL,
- user_avatar_height number(4) DEFAULT '0' NOT NULL,
- user_sig clob DEFAULT '' ,
- user_sig_bbcode_uid varchar2(8) DEFAULT '' ,
- user_sig_bbcode_bitfield varchar2(255) DEFAULT '' ,
- user_from varchar2(300) DEFAULT '' ,
- user_icq varchar2(15) DEFAULT '' ,
- user_aim varchar2(765) DEFAULT '' ,
- user_yim varchar2(765) DEFAULT '' ,
- user_msnm varchar2(765) DEFAULT '' ,
- user_jabber varchar2(765) DEFAULT '' ,
- user_website varchar2(600) DEFAULT '' ,
- user_occ clob DEFAULT '' ,
- user_interests clob DEFAULT '' ,
- user_actkey varchar2(32) DEFAULT '' ,
- user_newpasswd varchar2(120) DEFAULT '' ,
- user_form_salt varchar2(96) DEFAULT '' ,
- user_new number(1) DEFAULT '1' NOT NULL,
- user_reminded number(4) DEFAULT '0' NOT NULL,
- user_reminded_time number(11) DEFAULT '0' NOT NULL,
- CONSTRAINT pk_phpbb_users PRIMARY KEY (user_id),
- CONSTRAINT u_phpbb_username_clean UNIQUE (username_clean)
-)
-/
-
-CREATE INDEX phpbb_users_user_birthday ON phpbb_users (user_birthday)
-/
-CREATE INDEX phpbb_users_user_email_hash ON phpbb_users (user_email_hash)
-/
-CREATE INDEX phpbb_users_user_type ON phpbb_users (user_type)
-/
-
-CREATE SEQUENCE phpbb_users_seq
-/
-
-CREATE OR REPLACE TRIGGER t_phpbb_users
-BEFORE INSERT ON phpbb_users
-FOR EACH ROW WHEN (
- new.user_id IS NULL OR new.user_id = 0
-)
-BEGIN
- SELECT phpbb_users_seq.nextval
- INTO :new.user_id
- FROM dual;
-END;
-/
-
-
-/*
- Table: 'phpbb_warnings'
-*/
-CREATE TABLE phpbb_warnings (
- warning_id number(8) NOT NULL,
- user_id number(8) DEFAULT '0' NOT NULL,
- post_id number(8) DEFAULT '0' NOT NULL,
- log_id number(8) DEFAULT '0' NOT NULL,
- warning_time number(11) DEFAULT '0' NOT NULL,
- CONSTRAINT pk_phpbb_warnings PRIMARY KEY (warning_id)
-)
-/
-
-
-CREATE SEQUENCE phpbb_warnings_seq
-/
-
-CREATE OR REPLACE TRIGGER t_phpbb_warnings
-BEFORE INSERT ON phpbb_warnings
-FOR EACH ROW WHEN (
- new.warning_id IS NULL OR new.warning_id = 0
-)
-BEGIN
- SELECT phpbb_warnings_seq.nextval
- INTO :new.warning_id
- FROM dual;
-END;
-/
-
-
-/*
- Table: 'phpbb_words'
-*/
-CREATE TABLE phpbb_words (
- word_id number(8) NOT NULL,
- word varchar2(765) DEFAULT '' ,
- replacement varchar2(765) DEFAULT '' ,
- CONSTRAINT pk_phpbb_words PRIMARY KEY (word_id)
-)
-/
-
-
-CREATE SEQUENCE phpbb_words_seq
-/
-
-CREATE OR REPLACE TRIGGER t_phpbb_words
-BEFORE INSERT ON phpbb_words
-FOR EACH ROW WHEN (
- new.word_id IS NULL OR new.word_id = 0
-)
-BEGIN
- SELECT phpbb_words_seq.nextval
- INTO :new.word_id
- FROM dual;
-END;
-/
-
-
-/*
- Table: 'phpbb_zebra'
-*/
-CREATE TABLE phpbb_zebra (
- user_id number(8) DEFAULT '0' NOT NULL,
- zebra_id number(8) DEFAULT '0' NOT NULL,
- friend number(1) DEFAULT '0' NOT NULL,
- foe number(1) DEFAULT '0' NOT NULL,
- CONSTRAINT pk_phpbb_zebra PRIMARY KEY (user_id, zebra_id)
-)
-/
-
-
diff --git a/phpBB/install/schemas/postgres_schema.sql b/phpBB/install/schemas/postgres_schema.sql
index 0a05a7cd75..3fc8589844 100644
--- a/phpBB/install/schemas/postgres_schema.sql
+++ b/phpBB/install/schemas/postgres_schema.sql
@@ -83,1230 +83,5 @@ CREATE OPERATOR =(
MERGES,
SORT1= <);
-/*
- Table: 'phpbb_attachments'
-*/
-CREATE SEQUENCE phpbb_attachments_seq;
-
-CREATE TABLE phpbb_attachments (
- attach_id INT4 DEFAULT nextval('phpbb_attachments_seq'),
- post_msg_id INT4 DEFAULT '0' NOT NULL CHECK (post_msg_id >= 0),
- topic_id INT4 DEFAULT '0' NOT NULL CHECK (topic_id >= 0),
- in_message INT2 DEFAULT '0' NOT NULL CHECK (in_message >= 0),
- poster_id INT4 DEFAULT '0' NOT NULL CHECK (poster_id >= 0),
- is_orphan INT2 DEFAULT '1' NOT NULL CHECK (is_orphan >= 0),
- physical_filename varchar(255) DEFAULT '' NOT NULL,
- real_filename varchar(255) DEFAULT '' NOT NULL,
- download_count INT4 DEFAULT '0' NOT NULL CHECK (download_count >= 0),
- attach_comment varchar(4000) DEFAULT '' NOT NULL,
- extension varchar(100) DEFAULT '' NOT NULL,
- mimetype varchar(100) DEFAULT '' NOT NULL,
- filesize INT4 DEFAULT '0' NOT NULL CHECK (filesize >= 0),
- filetime INT4 DEFAULT '0' NOT NULL CHECK (filetime >= 0),
- thumbnail INT2 DEFAULT '0' NOT NULL CHECK (thumbnail >= 0),
- PRIMARY KEY (attach_id)
-);
-
-CREATE INDEX phpbb_attachments_filetime ON phpbb_attachments (filetime);
-CREATE INDEX phpbb_attachments_post_msg_id ON phpbb_attachments (post_msg_id);
-CREATE INDEX phpbb_attachments_topic_id ON phpbb_attachments (topic_id);
-CREATE INDEX phpbb_attachments_poster_id ON phpbb_attachments (poster_id);
-CREATE INDEX phpbb_attachments_is_orphan ON phpbb_attachments (is_orphan);
-
-/*
- Table: 'phpbb_acl_groups'
-*/
-CREATE TABLE phpbb_acl_groups (
- group_id INT4 DEFAULT '0' NOT NULL CHECK (group_id >= 0),
- forum_id INT4 DEFAULT '0' NOT NULL CHECK (forum_id >= 0),
- auth_option_id INT4 DEFAULT '0' NOT NULL CHECK (auth_option_id >= 0),
- auth_role_id INT4 DEFAULT '0' NOT NULL CHECK (auth_role_id >= 0),
- auth_setting INT2 DEFAULT '0' NOT NULL
-);
-
-CREATE INDEX phpbb_acl_groups_group_id ON phpbb_acl_groups (group_id);
-CREATE INDEX phpbb_acl_groups_auth_opt_id ON phpbb_acl_groups (auth_option_id);
-CREATE INDEX phpbb_acl_groups_auth_role_id ON phpbb_acl_groups (auth_role_id);
-
-/*
- Table: 'phpbb_acl_options'
-*/
-CREATE SEQUENCE phpbb_acl_options_seq;
-
-CREATE TABLE phpbb_acl_options (
- auth_option_id INT4 DEFAULT nextval('phpbb_acl_options_seq'),
- auth_option varchar(50) DEFAULT '' NOT NULL,
- is_global INT2 DEFAULT '0' NOT NULL CHECK (is_global >= 0),
- is_local INT2 DEFAULT '0' NOT NULL CHECK (is_local >= 0),
- founder_only INT2 DEFAULT '0' NOT NULL CHECK (founder_only >= 0),
- PRIMARY KEY (auth_option_id)
-);
-
-CREATE UNIQUE INDEX phpbb_acl_options_auth_option ON phpbb_acl_options (auth_option);
-
-/*
- Table: 'phpbb_acl_roles'
-*/
-CREATE SEQUENCE phpbb_acl_roles_seq;
-
-CREATE TABLE phpbb_acl_roles (
- role_id INT4 DEFAULT nextval('phpbb_acl_roles_seq'),
- role_name varchar(255) DEFAULT '' NOT NULL,
- role_description varchar(4000) DEFAULT '' NOT NULL,
- role_type varchar(10) DEFAULT '' NOT NULL,
- role_order INT2 DEFAULT '0' NOT NULL CHECK (role_order >= 0),
- PRIMARY KEY (role_id)
-);
-
-CREATE INDEX phpbb_acl_roles_role_type ON phpbb_acl_roles (role_type);
-CREATE INDEX phpbb_acl_roles_role_order ON phpbb_acl_roles (role_order);
-
-/*
- Table: 'phpbb_acl_roles_data'
-*/
-CREATE TABLE phpbb_acl_roles_data (
- role_id INT4 DEFAULT '0' NOT NULL CHECK (role_id >= 0),
- auth_option_id INT4 DEFAULT '0' NOT NULL CHECK (auth_option_id >= 0),
- auth_setting INT2 DEFAULT '0' NOT NULL,
- PRIMARY KEY (role_id, auth_option_id)
-);
-
-CREATE INDEX phpbb_acl_roles_data_ath_op_id ON phpbb_acl_roles_data (auth_option_id);
-
-/*
- Table: 'phpbb_acl_users'
-*/
-CREATE TABLE phpbb_acl_users (
- user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0),
- forum_id INT4 DEFAULT '0' NOT NULL CHECK (forum_id >= 0),
- auth_option_id INT4 DEFAULT '0' NOT NULL CHECK (auth_option_id >= 0),
- auth_role_id INT4 DEFAULT '0' NOT NULL CHECK (auth_role_id >= 0),
- auth_setting INT2 DEFAULT '0' NOT NULL
-);
-
-CREATE INDEX phpbb_acl_users_user_id ON phpbb_acl_users (user_id);
-CREATE INDEX phpbb_acl_users_auth_option_id ON phpbb_acl_users (auth_option_id);
-CREATE INDEX phpbb_acl_users_auth_role_id ON phpbb_acl_users (auth_role_id);
-
-/*
- Table: 'phpbb_banlist'
-*/
-CREATE SEQUENCE phpbb_banlist_seq;
-
-CREATE TABLE phpbb_banlist (
- ban_id INT4 DEFAULT nextval('phpbb_banlist_seq'),
- ban_userid INT4 DEFAULT '0' NOT NULL CHECK (ban_userid >= 0),
- ban_ip varchar(40) DEFAULT '' NOT NULL,
- ban_email varchar(100) DEFAULT '' NOT NULL,
- ban_start INT4 DEFAULT '0' NOT NULL CHECK (ban_start >= 0),
- ban_end INT4 DEFAULT '0' NOT NULL CHECK (ban_end >= 0),
- ban_exclude INT2 DEFAULT '0' NOT NULL CHECK (ban_exclude >= 0),
- ban_reason varchar(255) DEFAULT '' NOT NULL,
- ban_give_reason varchar(255) DEFAULT '' NOT NULL,
- PRIMARY KEY (ban_id)
-);
-
-CREATE INDEX phpbb_banlist_ban_end ON phpbb_banlist (ban_end);
-CREATE INDEX phpbb_banlist_ban_user ON phpbb_banlist (ban_userid, ban_exclude);
-CREATE INDEX phpbb_banlist_ban_email ON phpbb_banlist (ban_email, ban_exclude);
-CREATE INDEX phpbb_banlist_ban_ip ON phpbb_banlist (ban_ip, ban_exclude);
-
-/*
- Table: 'phpbb_bbcodes'
-*/
-CREATE TABLE phpbb_bbcodes (
- bbcode_id INT2 DEFAULT '0' NOT NULL CHECK (bbcode_id >= 0),
- bbcode_tag varchar(16) DEFAULT '' NOT NULL,
- bbcode_helpline varchar(255) DEFAULT '' NOT NULL,
- display_on_posting INT2 DEFAULT '0' NOT NULL CHECK (display_on_posting >= 0),
- bbcode_match varchar(4000) DEFAULT '' NOT NULL,
- bbcode_tpl TEXT DEFAULT '' NOT NULL,
- first_pass_match TEXT DEFAULT '' NOT NULL,
- first_pass_replace TEXT DEFAULT '' NOT NULL,
- second_pass_match TEXT DEFAULT '' NOT NULL,
- second_pass_replace TEXT DEFAULT '' NOT NULL,
- PRIMARY KEY (bbcode_id)
-);
-
-CREATE INDEX phpbb_bbcodes_display_on_post ON phpbb_bbcodes (display_on_posting);
-
-/*
- Table: 'phpbb_bookmarks'
-*/
-CREATE TABLE phpbb_bookmarks (
- topic_id INT4 DEFAULT '0' NOT NULL CHECK (topic_id >= 0),
- user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0),
- PRIMARY KEY (topic_id, user_id)
-);
-
-
-/*
- Table: 'phpbb_bots'
-*/
-CREATE SEQUENCE phpbb_bots_seq;
-
-CREATE TABLE phpbb_bots (
- bot_id INT4 DEFAULT nextval('phpbb_bots_seq'),
- bot_active INT2 DEFAULT '1' NOT NULL CHECK (bot_active >= 0),
- bot_name varchar(255) DEFAULT '' NOT NULL,
- user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0),
- bot_agent varchar(255) DEFAULT '' NOT NULL,
- bot_ip varchar(255) DEFAULT '' NOT NULL,
- PRIMARY KEY (bot_id)
-);
-
-CREATE INDEX phpbb_bots_bot_active ON phpbb_bots (bot_active);
-
-/*
- Table: 'phpbb_config'
-*/
-CREATE TABLE phpbb_config (
- config_name varchar(255) DEFAULT '' NOT NULL,
- config_value varchar(255) DEFAULT '' NOT NULL,
- is_dynamic INT2 DEFAULT '0' NOT NULL CHECK (is_dynamic >= 0),
- PRIMARY KEY (config_name)
-);
-
-CREATE INDEX phpbb_config_is_dynamic ON phpbb_config (is_dynamic);
-
-/*
- Table: 'phpbb_confirm'
-*/
-CREATE TABLE phpbb_confirm (
- confirm_id char(32) DEFAULT '' NOT NULL,
- session_id char(32) DEFAULT '' NOT NULL,
- confirm_type INT2 DEFAULT '0' NOT NULL,
- code varchar(8) DEFAULT '' NOT NULL,
- seed INT4 DEFAULT '0' NOT NULL CHECK (seed >= 0),
- attempts INT4 DEFAULT '0' NOT NULL CHECK (attempts >= 0),
- PRIMARY KEY (session_id, confirm_id)
-);
-
-CREATE INDEX phpbb_confirm_confirm_type ON phpbb_confirm (confirm_type);
-
-/*
- Table: 'phpbb_disallow'
-*/
-CREATE SEQUENCE phpbb_disallow_seq;
-
-CREATE TABLE phpbb_disallow (
- disallow_id INT4 DEFAULT nextval('phpbb_disallow_seq'),
- disallow_username varchar(255) DEFAULT '' NOT NULL,
- PRIMARY KEY (disallow_id)
-);
-
-
-/*
- Table: 'phpbb_drafts'
-*/
-CREATE SEQUENCE phpbb_drafts_seq;
-
-CREATE TABLE phpbb_drafts (
- draft_id INT4 DEFAULT nextval('phpbb_drafts_seq'),
- user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0),
- topic_id INT4 DEFAULT '0' NOT NULL CHECK (topic_id >= 0),
- forum_id INT4 DEFAULT '0' NOT NULL CHECK (forum_id >= 0),
- save_time INT4 DEFAULT '0' NOT NULL CHECK (save_time >= 0),
- draft_subject varchar(255) DEFAULT '' NOT NULL,
- draft_message TEXT DEFAULT '' NOT NULL,
- PRIMARY KEY (draft_id)
-);
-
-CREATE INDEX phpbb_drafts_save_time ON phpbb_drafts (save_time);
-
-/*
- Table: 'phpbb_extensions'
-*/
-CREATE SEQUENCE phpbb_extensions_seq;
-
-CREATE TABLE phpbb_extensions (
- extension_id INT4 DEFAULT nextval('phpbb_extensions_seq'),
- group_id INT4 DEFAULT '0' NOT NULL CHECK (group_id >= 0),
- extension varchar(100) DEFAULT '' NOT NULL,
- PRIMARY KEY (extension_id)
-);
-
-
-/*
- Table: 'phpbb_extension_groups'
-*/
-CREATE SEQUENCE phpbb_extension_groups_seq;
-
-CREATE TABLE phpbb_extension_groups (
- group_id INT4 DEFAULT nextval('phpbb_extension_groups_seq'),
- group_name varchar(255) DEFAULT '' NOT NULL,
- cat_id INT2 DEFAULT '0' NOT NULL,
- allow_group INT2 DEFAULT '0' NOT NULL CHECK (allow_group >= 0),
- download_mode INT2 DEFAULT '1' NOT NULL CHECK (download_mode >= 0),
- upload_icon varchar(255) DEFAULT '' NOT NULL,
- max_filesize INT4 DEFAULT '0' NOT NULL CHECK (max_filesize >= 0),
- allowed_forums varchar(8000) DEFAULT '' NOT NULL,
- allow_in_pm INT2 DEFAULT '0' NOT NULL CHECK (allow_in_pm >= 0),
- PRIMARY KEY (group_id)
-);
-
-
-/*
- Table: 'phpbb_forums'
-*/
-CREATE SEQUENCE phpbb_forums_seq;
-
-CREATE TABLE phpbb_forums (
- forum_id INT4 DEFAULT nextval('phpbb_forums_seq'),
- parent_id INT4 DEFAULT '0' NOT NULL CHECK (parent_id >= 0),
- left_id INT4 DEFAULT '0' NOT NULL CHECK (left_id >= 0),
- right_id INT4 DEFAULT '0' NOT NULL CHECK (right_id >= 0),
- forum_parents TEXT DEFAULT '' NOT NULL,
- forum_name varchar(255) DEFAULT '' NOT NULL,
- forum_desc varchar(4000) DEFAULT '' NOT NULL,
- forum_desc_bitfield varchar(255) DEFAULT '' NOT NULL,
- forum_desc_options INT4 DEFAULT '7' NOT NULL CHECK (forum_desc_options >= 0),
- forum_desc_uid varchar(8) DEFAULT '' NOT NULL,
- forum_link varchar(255) DEFAULT '' NOT NULL,
- forum_password varchar(40) DEFAULT '' NOT NULL,
- forum_style INT4 DEFAULT '0' NOT NULL CHECK (forum_style >= 0),
- forum_image varchar(255) DEFAULT '' NOT NULL,
- forum_rules varchar(4000) DEFAULT '' NOT NULL,
- forum_rules_link varchar(255) DEFAULT '' NOT NULL,
- forum_rules_bitfield varchar(255) DEFAULT '' NOT NULL,
- forum_rules_options INT4 DEFAULT '7' NOT NULL CHECK (forum_rules_options >= 0),
- forum_rules_uid varchar(8) DEFAULT '' NOT NULL,
- forum_topics_per_page INT2 DEFAULT '0' NOT NULL,
- forum_type INT2 DEFAULT '0' NOT NULL,
- forum_status INT2 DEFAULT '0' NOT NULL,
- forum_posts INT4 DEFAULT '0' NOT NULL CHECK (forum_posts >= 0),
- forum_topics INT4 DEFAULT '0' NOT NULL CHECK (forum_topics >= 0),
- forum_topics_real INT4 DEFAULT '0' NOT NULL CHECK (forum_topics_real >= 0),
- forum_last_post_id INT4 DEFAULT '0' NOT NULL CHECK (forum_last_post_id >= 0),
- forum_last_poster_id INT4 DEFAULT '0' NOT NULL CHECK (forum_last_poster_id >= 0),
- forum_last_post_subject varchar(255) DEFAULT '' NOT NULL,
- forum_last_post_time INT4 DEFAULT '0' NOT NULL CHECK (forum_last_post_time >= 0),
- forum_last_poster_name varchar(255) DEFAULT '' NOT NULL,
- forum_last_poster_colour varchar(6) DEFAULT '' NOT NULL,
- forum_flags INT2 DEFAULT '32' NOT NULL,
- forum_options INT4 DEFAULT '0' NOT NULL CHECK (forum_options >= 0),
- display_subforum_list INT2 DEFAULT '1' NOT NULL CHECK (display_subforum_list >= 0),
- display_on_index INT2 DEFAULT '1' NOT NULL CHECK (display_on_index >= 0),
- enable_indexing INT2 DEFAULT '1' NOT NULL CHECK (enable_indexing >= 0),
- enable_icons INT2 DEFAULT '1' NOT NULL CHECK (enable_icons >= 0),
- enable_prune INT2 DEFAULT '0' NOT NULL CHECK (enable_prune >= 0),
- prune_next INT4 DEFAULT '0' NOT NULL CHECK (prune_next >= 0),
- prune_days INT4 DEFAULT '0' NOT NULL CHECK (prune_days >= 0),
- prune_viewed INT4 DEFAULT '0' NOT NULL CHECK (prune_viewed >= 0),
- prune_freq INT4 DEFAULT '0' NOT NULL CHECK (prune_freq >= 0),
- PRIMARY KEY (forum_id)
-);
-
-CREATE INDEX phpbb_forums_left_right_id ON phpbb_forums (left_id, right_id);
-CREATE INDEX phpbb_forums_forum_lastpost_id ON phpbb_forums (forum_last_post_id);
-
-/*
- Table: 'phpbb_forums_access'
-*/
-CREATE TABLE phpbb_forums_access (
- forum_id INT4 DEFAULT '0' NOT NULL CHECK (forum_id >= 0),
- user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0),
- session_id char(32) DEFAULT '' NOT NULL,
- PRIMARY KEY (forum_id, user_id, session_id)
-);
-
-
-/*
- Table: 'phpbb_forums_track'
-*/
-CREATE TABLE phpbb_forums_track (
- user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0),
- forum_id INT4 DEFAULT '0' NOT NULL CHECK (forum_id >= 0),
- mark_time INT4 DEFAULT '0' NOT NULL CHECK (mark_time >= 0),
- PRIMARY KEY (user_id, forum_id)
-);
-
-
-/*
- Table: 'phpbb_forums_watch'
-*/
-CREATE TABLE phpbb_forums_watch (
- forum_id INT4 DEFAULT '0' NOT NULL CHECK (forum_id >= 0),
- user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0),
- notify_status INT2 DEFAULT '0' NOT NULL CHECK (notify_status >= 0)
-);
-
-CREATE INDEX phpbb_forums_watch_forum_id ON phpbb_forums_watch (forum_id);
-CREATE INDEX phpbb_forums_watch_user_id ON phpbb_forums_watch (user_id);
-CREATE INDEX phpbb_forums_watch_notify_stat ON phpbb_forums_watch (notify_status);
-
-/*
- Table: 'phpbb_groups'
-*/
-CREATE SEQUENCE phpbb_groups_seq;
-
-CREATE TABLE phpbb_groups (
- group_id INT4 DEFAULT nextval('phpbb_groups_seq'),
- group_type INT2 DEFAULT '1' NOT NULL,
- group_founder_manage INT2 DEFAULT '0' NOT NULL CHECK (group_founder_manage >= 0),
- group_skip_auth INT2 DEFAULT '0' NOT NULL CHECK (group_skip_auth >= 0),
- group_name varchar_ci DEFAULT '' NOT NULL,
- group_desc varchar(4000) DEFAULT '' NOT NULL,
- group_desc_bitfield varchar(255) DEFAULT '' NOT NULL,
- group_desc_options INT4 DEFAULT '7' NOT NULL CHECK (group_desc_options >= 0),
- group_desc_uid varchar(8) DEFAULT '' NOT NULL,
- group_display INT2 DEFAULT '0' NOT NULL CHECK (group_display >= 0),
- group_avatar varchar(255) DEFAULT '' NOT NULL,
- group_avatar_type INT2 DEFAULT '0' NOT NULL,
- group_avatar_width INT2 DEFAULT '0' NOT NULL CHECK (group_avatar_width >= 0),
- group_avatar_height INT2 DEFAULT '0' NOT NULL CHECK (group_avatar_height >= 0),
- group_rank INT4 DEFAULT '0' NOT NULL CHECK (group_rank >= 0),
- group_colour varchar(6) DEFAULT '' NOT NULL,
- group_sig_chars INT4 DEFAULT '0' NOT NULL CHECK (group_sig_chars >= 0),
- group_receive_pm INT2 DEFAULT '0' NOT NULL CHECK (group_receive_pm >= 0),
- group_message_limit INT4 DEFAULT '0' NOT NULL CHECK (group_message_limit >= 0),
- group_max_recipients INT4 DEFAULT '0' NOT NULL CHECK (group_max_recipients >= 0),
- group_legend INT2 DEFAULT '1' NOT NULL CHECK (group_legend >= 0),
- PRIMARY KEY (group_id)
-);
-
-CREATE INDEX phpbb_groups_group_legend_name ON phpbb_groups (group_legend, group_name);
-
-/*
- Table: 'phpbb_icons'
-*/
-CREATE SEQUENCE phpbb_icons_seq;
-
-CREATE TABLE phpbb_icons (
- icons_id INT4 DEFAULT nextval('phpbb_icons_seq'),
- icons_url varchar(255) DEFAULT '' NOT NULL,
- icons_width INT2 DEFAULT '0' NOT NULL,
- icons_height INT2 DEFAULT '0' NOT NULL,
- icons_order INT4 DEFAULT '0' NOT NULL CHECK (icons_order >= 0),
- display_on_posting INT2 DEFAULT '1' NOT NULL CHECK (display_on_posting >= 0),
- PRIMARY KEY (icons_id)
-);
-
-CREATE INDEX phpbb_icons_display_on_posting ON phpbb_icons (display_on_posting);
-
-/*
- Table: 'phpbb_lang'
-*/
-CREATE SEQUENCE phpbb_lang_seq;
-
-CREATE TABLE phpbb_lang (
- lang_id INT2 DEFAULT nextval('phpbb_lang_seq'),
- lang_iso varchar(30) DEFAULT '' NOT NULL,
- lang_dir varchar(30) DEFAULT '' NOT NULL,
- lang_english_name varchar(100) DEFAULT '' NOT NULL,
- lang_local_name varchar(255) DEFAULT '' NOT NULL,
- lang_author varchar(255) DEFAULT '' NOT NULL,
- PRIMARY KEY (lang_id)
-);
-
-CREATE INDEX phpbb_lang_lang_iso ON phpbb_lang (lang_iso);
-
-/*
- Table: 'phpbb_log'
-*/
-CREATE SEQUENCE phpbb_log_seq;
-
-CREATE TABLE phpbb_log (
- log_id INT4 DEFAULT nextval('phpbb_log_seq'),
- log_type INT2 DEFAULT '0' NOT NULL,
- user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0),
- forum_id INT4 DEFAULT '0' NOT NULL CHECK (forum_id >= 0),
- topic_id INT4 DEFAULT '0' NOT NULL CHECK (topic_id >= 0),
- reportee_id INT4 DEFAULT '0' NOT NULL CHECK (reportee_id >= 0),
- log_ip varchar(40) DEFAULT '' NOT NULL,
- log_time INT4 DEFAULT '0' NOT NULL CHECK (log_time >= 0),
- log_operation varchar(4000) DEFAULT '' NOT NULL,
- log_data TEXT DEFAULT '' NOT NULL,
- PRIMARY KEY (log_id)
-);
-
-CREATE INDEX phpbb_log_log_type ON phpbb_log (log_type);
-CREATE INDEX phpbb_log_forum_id ON phpbb_log (forum_id);
-CREATE INDEX phpbb_log_topic_id ON phpbb_log (topic_id);
-CREATE INDEX phpbb_log_reportee_id ON phpbb_log (reportee_id);
-CREATE INDEX phpbb_log_user_id ON phpbb_log (user_id);
-
-/*
- Table: 'phpbb_login_attempts'
-*/
-CREATE TABLE phpbb_login_attempts (
- attempt_ip varchar(40) DEFAULT '' NOT NULL,
- attempt_browser varchar(150) DEFAULT '' NOT NULL,
- attempt_forwarded_for varchar(255) DEFAULT '' NOT NULL,
- attempt_time INT4 DEFAULT '0' NOT NULL CHECK (attempt_time >= 0),
- user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0),
- username varchar(255) DEFAULT '0' NOT NULL,
- username_clean varchar_ci DEFAULT '0' NOT NULL
-);
-
-CREATE INDEX phpbb_login_attempts_att_ip ON phpbb_login_attempts (attempt_ip, attempt_time);
-CREATE INDEX phpbb_login_attempts_att_for ON phpbb_login_attempts (attempt_forwarded_for, attempt_time);
-CREATE INDEX phpbb_login_attempts_att_time ON phpbb_login_attempts (attempt_time);
-CREATE INDEX phpbb_login_attempts_user_id ON phpbb_login_attempts (user_id);
-
-/*
- Table: 'phpbb_moderator_cache'
-*/
-CREATE TABLE phpbb_moderator_cache (
- forum_id INT4 DEFAULT '0' NOT NULL CHECK (forum_id >= 0),
- user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0),
- username varchar(255) DEFAULT '' NOT NULL,
- group_id INT4 DEFAULT '0' NOT NULL CHECK (group_id >= 0),
- group_name varchar(255) DEFAULT '' NOT NULL,
- display_on_index INT2 DEFAULT '1' NOT NULL CHECK (display_on_index >= 0)
-);
-
-CREATE INDEX phpbb_moderator_cache_disp_idx ON phpbb_moderator_cache (display_on_index);
-CREATE INDEX phpbb_moderator_cache_forum_id ON phpbb_moderator_cache (forum_id);
-
-/*
- Table: 'phpbb_modules'
-*/
-CREATE SEQUENCE phpbb_modules_seq;
-
-CREATE TABLE phpbb_modules (
- module_id INT4 DEFAULT nextval('phpbb_modules_seq'),
- module_enabled INT2 DEFAULT '1' NOT NULL CHECK (module_enabled >= 0),
- module_display INT2 DEFAULT '1' NOT NULL CHECK (module_display >= 0),
- module_basename varchar(255) DEFAULT '' NOT NULL,
- module_class varchar(10) DEFAULT '' NOT NULL,
- parent_id INT4 DEFAULT '0' NOT NULL CHECK (parent_id >= 0),
- left_id INT4 DEFAULT '0' NOT NULL CHECK (left_id >= 0),
- right_id INT4 DEFAULT '0' NOT NULL CHECK (right_id >= 0),
- module_langname varchar(255) DEFAULT '' NOT NULL,
- module_mode varchar(255) DEFAULT '' NOT NULL,
- module_auth varchar(255) DEFAULT '' NOT NULL,
- PRIMARY KEY (module_id)
-);
-
-CREATE INDEX phpbb_modules_left_right_id ON phpbb_modules (left_id, right_id);
-CREATE INDEX phpbb_modules_module_enabled ON phpbb_modules (module_enabled);
-CREATE INDEX phpbb_modules_class_left_id ON phpbb_modules (module_class, left_id);
-
-/*
- Table: 'phpbb_poll_options'
-*/
-CREATE TABLE phpbb_poll_options (
- poll_option_id INT2 DEFAULT '0' NOT NULL,
- topic_id INT4 DEFAULT '0' NOT NULL CHECK (topic_id >= 0),
- poll_option_text varchar(4000) DEFAULT '' NOT NULL,
- poll_option_total INT4 DEFAULT '0' NOT NULL CHECK (poll_option_total >= 0)
-);
-
-CREATE INDEX phpbb_poll_options_poll_opt_id ON phpbb_poll_options (poll_option_id);
-CREATE INDEX phpbb_poll_options_topic_id ON phpbb_poll_options (topic_id);
-
-/*
- Table: 'phpbb_poll_votes'
-*/
-CREATE TABLE phpbb_poll_votes (
- topic_id INT4 DEFAULT '0' NOT NULL CHECK (topic_id >= 0),
- poll_option_id INT2 DEFAULT '0' NOT NULL,
- vote_user_id INT4 DEFAULT '0' NOT NULL CHECK (vote_user_id >= 0),
- vote_user_ip varchar(40) DEFAULT '' NOT NULL
-);
-
-CREATE INDEX phpbb_poll_votes_topic_id ON phpbb_poll_votes (topic_id);
-CREATE INDEX phpbb_poll_votes_vote_user_id ON phpbb_poll_votes (vote_user_id);
-CREATE INDEX phpbb_poll_votes_vote_user_ip ON phpbb_poll_votes (vote_user_ip);
-
-/*
- Table: 'phpbb_posts'
-*/
-CREATE SEQUENCE phpbb_posts_seq;
-
-CREATE TABLE phpbb_posts (
- post_id INT4 DEFAULT nextval('phpbb_posts_seq'),
- topic_id INT4 DEFAULT '0' NOT NULL CHECK (topic_id >= 0),
- forum_id INT4 DEFAULT '0' NOT NULL CHECK (forum_id >= 0),
- poster_id INT4 DEFAULT '0' NOT NULL CHECK (poster_id >= 0),
- icon_id INT4 DEFAULT '0' NOT NULL CHECK (icon_id >= 0),
- poster_ip varchar(40) DEFAULT '' NOT NULL,
- post_time INT4 DEFAULT '0' NOT NULL CHECK (post_time >= 0),
- post_approved INT2 DEFAULT '1' NOT NULL CHECK (post_approved >= 0),
- post_reported INT2 DEFAULT '0' NOT NULL CHECK (post_reported >= 0),
- enable_bbcode INT2 DEFAULT '1' NOT NULL CHECK (enable_bbcode >= 0),
- enable_smilies INT2 DEFAULT '1' NOT NULL CHECK (enable_smilies >= 0),
- enable_magic_url INT2 DEFAULT '1' NOT NULL CHECK (enable_magic_url >= 0),
- enable_sig INT2 DEFAULT '1' NOT NULL CHECK (enable_sig >= 0),
- post_username varchar(255) DEFAULT '' NOT NULL,
- post_subject varchar(255) DEFAULT '' NOT NULL,
- post_text TEXT DEFAULT '' NOT NULL,
- post_checksum varchar(32) DEFAULT '' NOT NULL,
- post_attachment INT2 DEFAULT '0' NOT NULL CHECK (post_attachment >= 0),
- bbcode_bitfield varchar(255) DEFAULT '' NOT NULL,
- bbcode_uid varchar(8) DEFAULT '' NOT NULL,
- post_postcount INT2 DEFAULT '1' NOT NULL CHECK (post_postcount >= 0),
- post_edit_time INT4 DEFAULT '0' NOT NULL CHECK (post_edit_time >= 0),
- post_edit_reason varchar(255) DEFAULT '' NOT NULL,
- post_edit_user INT4 DEFAULT '0' NOT NULL CHECK (post_edit_user >= 0),
- post_edit_count INT2 DEFAULT '0' NOT NULL CHECK (post_edit_count >= 0),
- post_edit_locked INT2 DEFAULT '0' NOT NULL CHECK (post_edit_locked >= 0),
- PRIMARY KEY (post_id)
-);
-
-CREATE INDEX phpbb_posts_forum_id ON phpbb_posts (forum_id);
-CREATE INDEX phpbb_posts_topic_id ON phpbb_posts (topic_id);
-CREATE INDEX phpbb_posts_poster_ip ON phpbb_posts (poster_ip);
-CREATE INDEX phpbb_posts_poster_id ON phpbb_posts (poster_id);
-CREATE INDEX phpbb_posts_post_approved ON phpbb_posts (post_approved);
-CREATE INDEX phpbb_posts_post_username ON phpbb_posts (post_username);
-CREATE INDEX phpbb_posts_tid_post_time ON phpbb_posts (topic_id, post_time);
-
-/*
- Table: 'phpbb_privmsgs'
-*/
-CREATE SEQUENCE phpbb_privmsgs_seq;
-
-CREATE TABLE phpbb_privmsgs (
- msg_id INT4 DEFAULT nextval('phpbb_privmsgs_seq'),
- root_level INT4 DEFAULT '0' NOT NULL CHECK (root_level >= 0),
- author_id INT4 DEFAULT '0' NOT NULL CHECK (author_id >= 0),
- icon_id INT4 DEFAULT '0' NOT NULL CHECK (icon_id >= 0),
- author_ip varchar(40) DEFAULT '' NOT NULL,
- message_time INT4 DEFAULT '0' NOT NULL CHECK (message_time >= 0),
- enable_bbcode INT2 DEFAULT '1' NOT NULL CHECK (enable_bbcode >= 0),
- enable_smilies INT2 DEFAULT '1' NOT NULL CHECK (enable_smilies >= 0),
- enable_magic_url INT2 DEFAULT '1' NOT NULL CHECK (enable_magic_url >= 0),
- enable_sig INT2 DEFAULT '1' NOT NULL CHECK (enable_sig >= 0),
- message_subject varchar(255) DEFAULT '' NOT NULL,
- message_text TEXT DEFAULT '' NOT NULL,
- message_edit_reason varchar(255) DEFAULT '' NOT NULL,
- message_edit_user INT4 DEFAULT '0' NOT NULL CHECK (message_edit_user >= 0),
- message_attachment INT2 DEFAULT '0' NOT NULL CHECK (message_attachment >= 0),
- bbcode_bitfield varchar(255) DEFAULT '' NOT NULL,
- bbcode_uid varchar(8) DEFAULT '' NOT NULL,
- message_edit_time INT4 DEFAULT '0' NOT NULL CHECK (message_edit_time >= 0),
- message_edit_count INT2 DEFAULT '0' NOT NULL CHECK (message_edit_count >= 0),
- to_address varchar(4000) DEFAULT '' NOT NULL,
- bcc_address varchar(4000) DEFAULT '' NOT NULL,
- message_reported INT2 DEFAULT '0' NOT NULL CHECK (message_reported >= 0),
- PRIMARY KEY (msg_id)
-);
-
-CREATE INDEX phpbb_privmsgs_author_ip ON phpbb_privmsgs (author_ip);
-CREATE INDEX phpbb_privmsgs_message_time ON phpbb_privmsgs (message_time);
-CREATE INDEX phpbb_privmsgs_author_id ON phpbb_privmsgs (author_id);
-CREATE INDEX phpbb_privmsgs_root_level ON phpbb_privmsgs (root_level);
-
-/*
- Table: 'phpbb_privmsgs_folder'
-*/
-CREATE SEQUENCE phpbb_privmsgs_folder_seq;
-
-CREATE TABLE phpbb_privmsgs_folder (
- folder_id INT4 DEFAULT nextval('phpbb_privmsgs_folder_seq'),
- user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0),
- folder_name varchar(255) DEFAULT '' NOT NULL,
- pm_count INT4 DEFAULT '0' NOT NULL CHECK (pm_count >= 0),
- PRIMARY KEY (folder_id)
-);
-
-CREATE INDEX phpbb_privmsgs_folder_user_id ON phpbb_privmsgs_folder (user_id);
-
-/*
- Table: 'phpbb_privmsgs_rules'
-*/
-CREATE SEQUENCE phpbb_privmsgs_rules_seq;
-
-CREATE TABLE phpbb_privmsgs_rules (
- rule_id INT4 DEFAULT nextval('phpbb_privmsgs_rules_seq'),
- user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0),
- rule_check INT4 DEFAULT '0' NOT NULL CHECK (rule_check >= 0),
- rule_connection INT4 DEFAULT '0' NOT NULL CHECK (rule_connection >= 0),
- rule_string varchar(255) DEFAULT '' NOT NULL,
- rule_user_id INT4 DEFAULT '0' NOT NULL CHECK (rule_user_id >= 0),
- rule_group_id INT4 DEFAULT '0' NOT NULL CHECK (rule_group_id >= 0),
- rule_action INT4 DEFAULT '0' NOT NULL CHECK (rule_action >= 0),
- rule_folder_id INT4 DEFAULT '0' NOT NULL,
- PRIMARY KEY (rule_id)
-);
-
-CREATE INDEX phpbb_privmsgs_rules_user_id ON phpbb_privmsgs_rules (user_id);
-
-/*
- Table: 'phpbb_privmsgs_to'
-*/
-CREATE TABLE phpbb_privmsgs_to (
- msg_id INT4 DEFAULT '0' NOT NULL CHECK (msg_id >= 0),
- user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0),
- author_id INT4 DEFAULT '0' NOT NULL CHECK (author_id >= 0),
- pm_deleted INT2 DEFAULT '0' NOT NULL CHECK (pm_deleted >= 0),
- pm_new INT2 DEFAULT '1' NOT NULL CHECK (pm_new >= 0),
- pm_unread INT2 DEFAULT '1' NOT NULL CHECK (pm_unread >= 0),
- pm_replied INT2 DEFAULT '0' NOT NULL CHECK (pm_replied >= 0),
- pm_marked INT2 DEFAULT '0' NOT NULL CHECK (pm_marked >= 0),
- pm_forwarded INT2 DEFAULT '0' NOT NULL CHECK (pm_forwarded >= 0),
- folder_id INT4 DEFAULT '0' NOT NULL
-);
-
-CREATE INDEX phpbb_privmsgs_to_msg_id ON phpbb_privmsgs_to (msg_id);
-CREATE INDEX phpbb_privmsgs_to_author_id ON phpbb_privmsgs_to (author_id);
-CREATE INDEX phpbb_privmsgs_to_usr_flder_id ON phpbb_privmsgs_to (user_id, folder_id);
-
-/*
- Table: 'phpbb_profile_fields'
-*/
-CREATE SEQUENCE phpbb_profile_fields_seq;
-
-CREATE TABLE phpbb_profile_fields (
- field_id INT4 DEFAULT nextval('phpbb_profile_fields_seq'),
- field_name varchar(255) DEFAULT '' NOT NULL,
- field_type INT2 DEFAULT '0' NOT NULL,
- field_ident varchar(20) DEFAULT '' NOT NULL,
- field_length varchar(20) DEFAULT '' NOT NULL,
- field_minlen varchar(255) DEFAULT '' NOT NULL,
- field_maxlen varchar(255) DEFAULT '' NOT NULL,
- field_novalue varchar(255) DEFAULT '' NOT NULL,
- field_default_value varchar(255) DEFAULT '' NOT NULL,
- field_validation varchar(20) DEFAULT '' NOT NULL,
- field_required INT2 DEFAULT '0' NOT NULL CHECK (field_required >= 0),
- field_show_novalue INT2 DEFAULT '0' NOT NULL CHECK (field_show_novalue >= 0),
- field_show_on_reg INT2 DEFAULT '0' NOT NULL CHECK (field_show_on_reg >= 0),
- field_show_on_vt INT2 DEFAULT '0' NOT NULL CHECK (field_show_on_vt >= 0),
- field_show_profile INT2 DEFAULT '0' NOT NULL CHECK (field_show_profile >= 0),
- field_hide INT2 DEFAULT '0' NOT NULL CHECK (field_hide >= 0),
- field_no_view INT2 DEFAULT '0' NOT NULL CHECK (field_no_view >= 0),
- field_active INT2 DEFAULT '0' NOT NULL CHECK (field_active >= 0),
- field_order INT4 DEFAULT '0' NOT NULL CHECK (field_order >= 0),
- PRIMARY KEY (field_id)
-);
-
-CREATE INDEX phpbb_profile_fields_fld_type ON phpbb_profile_fields (field_type);
-CREATE INDEX phpbb_profile_fields_fld_ordr ON phpbb_profile_fields (field_order);
-
-/*
- Table: 'phpbb_profile_fields_data'
-*/
-CREATE TABLE phpbb_profile_fields_data (
- user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0),
- PRIMARY KEY (user_id)
-);
-
-
-/*
- Table: 'phpbb_profile_fields_lang'
-*/
-CREATE TABLE phpbb_profile_fields_lang (
- field_id INT4 DEFAULT '0' NOT NULL CHECK (field_id >= 0),
- lang_id INT4 DEFAULT '0' NOT NULL CHECK (lang_id >= 0),
- option_id INT4 DEFAULT '0' NOT NULL CHECK (option_id >= 0),
- field_type INT2 DEFAULT '0' NOT NULL,
- lang_value varchar(255) DEFAULT '' NOT NULL,
- PRIMARY KEY (field_id, lang_id, option_id)
-);
-
-
-/*
- Table: 'phpbb_profile_lang'
-*/
-CREATE TABLE phpbb_profile_lang (
- field_id INT4 DEFAULT '0' NOT NULL CHECK (field_id >= 0),
- lang_id INT4 DEFAULT '0' NOT NULL CHECK (lang_id >= 0),
- lang_name varchar(255) DEFAULT '' NOT NULL,
- lang_explain varchar(4000) DEFAULT '' NOT NULL,
- lang_default_value varchar(255) DEFAULT '' NOT NULL,
- PRIMARY KEY (field_id, lang_id)
-);
-
-
-/*
- Table: 'phpbb_ranks'
-*/
-CREATE SEQUENCE phpbb_ranks_seq;
-
-CREATE TABLE phpbb_ranks (
- rank_id INT4 DEFAULT nextval('phpbb_ranks_seq'),
- rank_title varchar(255) DEFAULT '' NOT NULL,
- rank_min INT4 DEFAULT '0' NOT NULL CHECK (rank_min >= 0),
- rank_special INT2 DEFAULT '0' NOT NULL CHECK (rank_special >= 0),
- rank_image varchar(255) DEFAULT '' NOT NULL,
- PRIMARY KEY (rank_id)
-);
-
-
-/*
- Table: 'phpbb_reports'
-*/
-CREATE SEQUENCE phpbb_reports_seq;
-
-CREATE TABLE phpbb_reports (
- report_id INT4 DEFAULT nextval('phpbb_reports_seq'),
- reason_id INT2 DEFAULT '0' NOT NULL CHECK (reason_id >= 0),
- post_id INT4 DEFAULT '0' NOT NULL CHECK (post_id >= 0),
- pm_id INT4 DEFAULT '0' NOT NULL CHECK (pm_id >= 0),
- user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0),
- user_notify INT2 DEFAULT '0' NOT NULL CHECK (user_notify >= 0),
- report_closed INT2 DEFAULT '0' NOT NULL CHECK (report_closed >= 0),
- report_time INT4 DEFAULT '0' NOT NULL CHECK (report_time >= 0),
- report_text TEXT DEFAULT '' NOT NULL,
- PRIMARY KEY (report_id)
-);
-
-CREATE INDEX phpbb_reports_post_id ON phpbb_reports (post_id);
-CREATE INDEX phpbb_reports_pm_id ON phpbb_reports (pm_id);
-
-/*
- Table: 'phpbb_reports_reasons'
-*/
-CREATE SEQUENCE phpbb_reports_reasons_seq;
-
-CREATE TABLE phpbb_reports_reasons (
- reason_id INT2 DEFAULT nextval('phpbb_reports_reasons_seq'),
- reason_title varchar(255) DEFAULT '' NOT NULL,
- reason_description TEXT DEFAULT '' NOT NULL,
- reason_order INT2 DEFAULT '0' NOT NULL CHECK (reason_order >= 0),
- PRIMARY KEY (reason_id)
-);
-
-
-/*
- Table: 'phpbb_search_results'
-*/
-CREATE TABLE phpbb_search_results (
- search_key varchar(32) DEFAULT '' NOT NULL,
- search_time INT4 DEFAULT '0' NOT NULL CHECK (search_time >= 0),
- search_keywords TEXT DEFAULT '' NOT NULL,
- search_authors TEXT DEFAULT '' NOT NULL,
- PRIMARY KEY (search_key)
-);
-
-
-/*
- Table: 'phpbb_search_wordlist'
-*/
-CREATE SEQUENCE phpbb_search_wordlist_seq;
-
-CREATE TABLE phpbb_search_wordlist (
- word_id INT4 DEFAULT nextval('phpbb_search_wordlist_seq'),
- word_text varchar(255) DEFAULT '' NOT NULL,
- word_common INT2 DEFAULT '0' NOT NULL CHECK (word_common >= 0),
- word_count INT4 DEFAULT '0' NOT NULL CHECK (word_count >= 0),
- PRIMARY KEY (word_id)
-);
-
-CREATE UNIQUE INDEX phpbb_search_wordlist_wrd_txt ON phpbb_search_wordlist (word_text);
-CREATE INDEX phpbb_search_wordlist_wrd_cnt ON phpbb_search_wordlist (word_count);
-
-/*
- Table: 'phpbb_search_wordmatch'
-*/
-CREATE TABLE phpbb_search_wordmatch (
- post_id INT4 DEFAULT '0' NOT NULL CHECK (post_id >= 0),
- word_id INT4 DEFAULT '0' NOT NULL CHECK (word_id >= 0),
- title_match INT2 DEFAULT '0' NOT NULL CHECK (title_match >= 0)
-);
-
-CREATE UNIQUE INDEX phpbb_search_wordmatch_unq_mtch ON phpbb_search_wordmatch (word_id, post_id, title_match);
-CREATE INDEX phpbb_search_wordmatch_word_id ON phpbb_search_wordmatch (word_id);
-CREATE INDEX phpbb_search_wordmatch_post_id ON phpbb_search_wordmatch (post_id);
-
-/*
- Table: 'phpbb_sessions'
-*/
-CREATE TABLE phpbb_sessions (
- session_id char(32) DEFAULT '' NOT NULL,
- session_user_id INT4 DEFAULT '0' NOT NULL CHECK (session_user_id >= 0),
- session_forum_id INT4 DEFAULT '0' NOT NULL CHECK (session_forum_id >= 0),
- session_last_visit INT4 DEFAULT '0' NOT NULL CHECK (session_last_visit >= 0),
- session_start INT4 DEFAULT '0' NOT NULL CHECK (session_start >= 0),
- session_time INT4 DEFAULT '0' NOT NULL CHECK (session_time >= 0),
- session_ip varchar(40) DEFAULT '' NOT NULL,
- session_browser varchar(150) DEFAULT '' NOT NULL,
- session_forwarded_for varchar(255) DEFAULT '' NOT NULL,
- session_page varchar(255) DEFAULT '' NOT NULL,
- session_viewonline INT2 DEFAULT '1' NOT NULL CHECK (session_viewonline >= 0),
- session_autologin INT2 DEFAULT '0' NOT NULL CHECK (session_autologin >= 0),
- session_admin INT2 DEFAULT '0' NOT NULL CHECK (session_admin >= 0),
- PRIMARY KEY (session_id)
-);
-
-CREATE INDEX phpbb_sessions_session_time ON phpbb_sessions (session_time);
-CREATE INDEX phpbb_sessions_session_user_id ON phpbb_sessions (session_user_id);
-CREATE INDEX phpbb_sessions_session_fid ON phpbb_sessions (session_forum_id);
-
-/*
- Table: 'phpbb_sessions_keys'
-*/
-CREATE TABLE phpbb_sessions_keys (
- key_id char(32) DEFAULT '' NOT NULL,
- user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0),
- last_ip varchar(40) DEFAULT '' NOT NULL,
- last_login INT4 DEFAULT '0' NOT NULL CHECK (last_login >= 0),
- PRIMARY KEY (key_id, user_id)
-);
-
-CREATE INDEX phpbb_sessions_keys_last_login ON phpbb_sessions_keys (last_login);
-
-/*
- Table: 'phpbb_sitelist'
-*/
-CREATE SEQUENCE phpbb_sitelist_seq;
-
-CREATE TABLE phpbb_sitelist (
- site_id INT4 DEFAULT nextval('phpbb_sitelist_seq'),
- site_ip varchar(40) DEFAULT '' NOT NULL,
- site_hostname varchar(255) DEFAULT '' NOT NULL,
- ip_exclude INT2 DEFAULT '0' NOT NULL CHECK (ip_exclude >= 0),
- PRIMARY KEY (site_id)
-);
-
-
-/*
- Table: 'phpbb_smilies'
-*/
-CREATE SEQUENCE phpbb_smilies_seq;
-
-CREATE TABLE phpbb_smilies (
- smiley_id INT4 DEFAULT nextval('phpbb_smilies_seq'),
- code varchar(50) DEFAULT '' NOT NULL,
- emotion varchar(50) DEFAULT '' NOT NULL,
- smiley_url varchar(50) DEFAULT '' NOT NULL,
- smiley_width INT2 DEFAULT '0' NOT NULL CHECK (smiley_width >= 0),
- smiley_height INT2 DEFAULT '0' NOT NULL CHECK (smiley_height >= 0),
- smiley_order INT4 DEFAULT '0' NOT NULL CHECK (smiley_order >= 0),
- display_on_posting INT2 DEFAULT '1' NOT NULL CHECK (display_on_posting >= 0),
- PRIMARY KEY (smiley_id)
-);
-
-CREATE INDEX phpbb_smilies_display_on_post ON phpbb_smilies (display_on_posting);
-
-/*
- Table: 'phpbb_styles'
-*/
-CREATE SEQUENCE phpbb_styles_seq;
-
-CREATE TABLE phpbb_styles (
- style_id INT4 DEFAULT nextval('phpbb_styles_seq'),
- style_name varchar(255) DEFAULT '' NOT NULL,
- style_copyright varchar(255) DEFAULT '' NOT NULL,
- style_active INT2 DEFAULT '1' NOT NULL CHECK (style_active >= 0),
- template_id INT4 DEFAULT '0' NOT NULL CHECK (template_id >= 0),
- theme_id INT4 DEFAULT '0' NOT NULL CHECK (theme_id >= 0),
- imageset_id INT4 DEFAULT '0' NOT NULL CHECK (imageset_id >= 0),
- PRIMARY KEY (style_id)
-);
-
-CREATE UNIQUE INDEX phpbb_styles_style_name ON phpbb_styles (style_name);
-CREATE INDEX phpbb_styles_template_id ON phpbb_styles (template_id);
-CREATE INDEX phpbb_styles_theme_id ON phpbb_styles (theme_id);
-CREATE INDEX phpbb_styles_imageset_id ON phpbb_styles (imageset_id);
-
-/*
- Table: 'phpbb_styles_template'
-*/
-CREATE SEQUENCE phpbb_styles_template_seq;
-
-CREATE TABLE phpbb_styles_template (
- template_id INT4 DEFAULT nextval('phpbb_styles_template_seq'),
- template_name varchar(255) DEFAULT '' NOT NULL,
- template_copyright varchar(255) DEFAULT '' NOT NULL,
- template_path varchar(100) DEFAULT '' NOT NULL,
- bbcode_bitfield varchar(255) DEFAULT 'kNg=' NOT NULL,
- template_storedb INT2 DEFAULT '0' NOT NULL CHECK (template_storedb >= 0),
- template_inherits_id INT4 DEFAULT '0' NOT NULL CHECK (template_inherits_id >= 0),
- template_inherit_path varchar(255) DEFAULT '' NOT NULL,
- PRIMARY KEY (template_id)
-);
-
-CREATE UNIQUE INDEX phpbb_styles_template_tmplte_nm ON phpbb_styles_template (template_name);
-
-/*
- Table: 'phpbb_styles_template_data'
-*/
-CREATE TABLE phpbb_styles_template_data (
- template_id INT4 DEFAULT '0' NOT NULL CHECK (template_id >= 0),
- template_filename varchar(100) DEFAULT '' NOT NULL,
- template_included varchar(8000) DEFAULT '' NOT NULL,
- template_mtime INT4 DEFAULT '0' NOT NULL CHECK (template_mtime >= 0),
- template_data TEXT DEFAULT '' NOT NULL
-);
-
-CREATE INDEX phpbb_styles_template_data_tid ON phpbb_styles_template_data (template_id);
-CREATE INDEX phpbb_styles_template_data_tfn ON phpbb_styles_template_data (template_filename);
-
-/*
- Table: 'phpbb_styles_theme'
-*/
-CREATE SEQUENCE phpbb_styles_theme_seq;
-
-CREATE TABLE phpbb_styles_theme (
- theme_id INT4 DEFAULT nextval('phpbb_styles_theme_seq'),
- theme_name varchar(255) DEFAULT '' NOT NULL,
- theme_copyright varchar(255) DEFAULT '' NOT NULL,
- theme_path varchar(100) DEFAULT '' NOT NULL,
- theme_storedb INT2 DEFAULT '0' NOT NULL CHECK (theme_storedb >= 0),
- theme_mtime INT4 DEFAULT '0' NOT NULL CHECK (theme_mtime >= 0),
- theme_data TEXT DEFAULT '' NOT NULL,
- PRIMARY KEY (theme_id)
-);
-
-CREATE UNIQUE INDEX phpbb_styles_theme_theme_name ON phpbb_styles_theme (theme_name);
-
-/*
- Table: 'phpbb_styles_imageset'
-*/
-CREATE SEQUENCE phpbb_styles_imageset_seq;
-
-CREATE TABLE phpbb_styles_imageset (
- imageset_id INT4 DEFAULT nextval('phpbb_styles_imageset_seq'),
- imageset_name varchar(255) DEFAULT '' NOT NULL,
- imageset_copyright varchar(255) DEFAULT '' NOT NULL,
- imageset_path varchar(100) DEFAULT '' NOT NULL,
- PRIMARY KEY (imageset_id)
-);
-
-CREATE UNIQUE INDEX phpbb_styles_imageset_imgset_nm ON phpbb_styles_imageset (imageset_name);
-
-/*
- Table: 'phpbb_styles_imageset_data'
-*/
-CREATE SEQUENCE phpbb_styles_imageset_data_seq;
-
-CREATE TABLE phpbb_styles_imageset_data (
- image_id INT4 DEFAULT nextval('phpbb_styles_imageset_data_seq'),
- image_name varchar(200) DEFAULT '' NOT NULL,
- image_filename varchar(200) DEFAULT '' NOT NULL,
- image_lang varchar(30) DEFAULT '' NOT NULL,
- image_height INT2 DEFAULT '0' NOT NULL CHECK (image_height >= 0),
- image_width INT2 DEFAULT '0' NOT NULL CHECK (image_width >= 0),
- imageset_id INT4 DEFAULT '0' NOT NULL CHECK (imageset_id >= 0),
- PRIMARY KEY (image_id)
-);
-
-CREATE INDEX phpbb_styles_imageset_data_i_d ON phpbb_styles_imageset_data (imageset_id);
-
-/*
- Table: 'phpbb_topics'
-*/
-CREATE SEQUENCE phpbb_topics_seq;
-
-CREATE TABLE phpbb_topics (
- topic_id INT4 DEFAULT nextval('phpbb_topics_seq'),
- forum_id INT4 DEFAULT '0' NOT NULL CHECK (forum_id >= 0),
- icon_id INT4 DEFAULT '0' NOT NULL CHECK (icon_id >= 0),
- topic_attachment INT2 DEFAULT '0' NOT NULL CHECK (topic_attachment >= 0),
- topic_approved INT2 DEFAULT '1' NOT NULL CHECK (topic_approved >= 0),
- topic_reported INT2 DEFAULT '0' NOT NULL CHECK (topic_reported >= 0),
- topic_title varchar(255) DEFAULT '' NOT NULL,
- topic_poster INT4 DEFAULT '0' NOT NULL CHECK (topic_poster >= 0),
- topic_time INT4 DEFAULT '0' NOT NULL CHECK (topic_time >= 0),
- topic_time_limit INT4 DEFAULT '0' NOT NULL CHECK (topic_time_limit >= 0),
- topic_views INT4 DEFAULT '0' NOT NULL CHECK (topic_views >= 0),
- topic_replies INT4 DEFAULT '0' NOT NULL CHECK (topic_replies >= 0),
- topic_replies_real INT4 DEFAULT '0' NOT NULL CHECK (topic_replies_real >= 0),
- topic_status INT2 DEFAULT '0' NOT NULL,
- topic_type INT2 DEFAULT '0' NOT NULL,
- topic_first_post_id INT4 DEFAULT '0' NOT NULL CHECK (topic_first_post_id >= 0),
- topic_first_poster_name varchar(255) DEFAULT '' NOT NULL,
- topic_first_poster_colour varchar(6) DEFAULT '' NOT NULL,
- topic_last_post_id INT4 DEFAULT '0' NOT NULL CHECK (topic_last_post_id >= 0),
- topic_last_poster_id INT4 DEFAULT '0' NOT NULL CHECK (topic_last_poster_id >= 0),
- topic_last_poster_name varchar(255) DEFAULT '' NOT NULL,
- topic_last_poster_colour varchar(6) DEFAULT '' NOT NULL,
- topic_last_post_subject varchar(255) DEFAULT '' NOT NULL,
- topic_last_post_time INT4 DEFAULT '0' NOT NULL CHECK (topic_last_post_time >= 0),
- topic_last_view_time INT4 DEFAULT '0' NOT NULL CHECK (topic_last_view_time >= 0),
- topic_moved_id INT4 DEFAULT '0' NOT NULL CHECK (topic_moved_id >= 0),
- topic_bumped INT2 DEFAULT '0' NOT NULL CHECK (topic_bumped >= 0),
- topic_bumper INT4 DEFAULT '0' NOT NULL CHECK (topic_bumper >= 0),
- poll_title varchar(255) DEFAULT '' NOT NULL,
- poll_start INT4 DEFAULT '0' NOT NULL CHECK (poll_start >= 0),
- poll_length INT4 DEFAULT '0' NOT NULL CHECK (poll_length >= 0),
- poll_max_options INT2 DEFAULT '1' NOT NULL,
- poll_last_vote INT4 DEFAULT '0' NOT NULL CHECK (poll_last_vote >= 0),
- poll_vote_change INT2 DEFAULT '0' NOT NULL CHECK (poll_vote_change >= 0),
- PRIMARY KEY (topic_id)
-);
-
-CREATE INDEX phpbb_topics_forum_id ON phpbb_topics (forum_id);
-CREATE INDEX phpbb_topics_forum_id_type ON phpbb_topics (forum_id, topic_type);
-CREATE INDEX phpbb_topics_last_post_time ON phpbb_topics (topic_last_post_time);
-CREATE INDEX phpbb_topics_topic_approved ON phpbb_topics (topic_approved);
-CREATE INDEX phpbb_topics_forum_appr_last ON phpbb_topics (forum_id, topic_approved, topic_last_post_id);
-CREATE INDEX phpbb_topics_fid_time_moved ON phpbb_topics (forum_id, topic_last_post_time, topic_moved_id);
-
-/*
- Table: 'phpbb_topics_track'
-*/
-CREATE TABLE phpbb_topics_track (
- user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0),
- topic_id INT4 DEFAULT '0' NOT NULL CHECK (topic_id >= 0),
- forum_id INT4 DEFAULT '0' NOT NULL CHECK (forum_id >= 0),
- mark_time INT4 DEFAULT '0' NOT NULL CHECK (mark_time >= 0),
- PRIMARY KEY (user_id, topic_id)
-);
-
-CREATE INDEX phpbb_topics_track_topic_id ON phpbb_topics_track (topic_id);
-CREATE INDEX phpbb_topics_track_forum_id ON phpbb_topics_track (forum_id);
-
-/*
- Table: 'phpbb_topics_posted'
-*/
-CREATE TABLE phpbb_topics_posted (
- user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0),
- topic_id INT4 DEFAULT '0' NOT NULL CHECK (topic_id >= 0),
- topic_posted INT2 DEFAULT '0' NOT NULL CHECK (topic_posted >= 0),
- PRIMARY KEY (user_id, topic_id)
-);
-
-
-/*
- Table: 'phpbb_topics_watch'
-*/
-CREATE TABLE phpbb_topics_watch (
- topic_id INT4 DEFAULT '0' NOT NULL CHECK (topic_id >= 0),
- user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0),
- notify_status INT2 DEFAULT '0' NOT NULL CHECK (notify_status >= 0)
-);
-
-CREATE INDEX phpbb_topics_watch_topic_id ON phpbb_topics_watch (topic_id);
-CREATE INDEX phpbb_topics_watch_user_id ON phpbb_topics_watch (user_id);
-CREATE INDEX phpbb_topics_watch_notify_stat ON phpbb_topics_watch (notify_status);
-
-/*
- Table: 'phpbb_user_group'
-*/
-CREATE TABLE phpbb_user_group (
- group_id INT4 DEFAULT '0' NOT NULL CHECK (group_id >= 0),
- user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0),
- group_leader INT2 DEFAULT '0' NOT NULL CHECK (group_leader >= 0),
- user_pending INT2 DEFAULT '1' NOT NULL CHECK (user_pending >= 0)
-);
-
-CREATE INDEX phpbb_user_group_group_id ON phpbb_user_group (group_id);
-CREATE INDEX phpbb_user_group_user_id ON phpbb_user_group (user_id);
-CREATE INDEX phpbb_user_group_group_leader ON phpbb_user_group (group_leader);
-
-/*
- Table: 'phpbb_users'
-*/
-CREATE SEQUENCE phpbb_users_seq;
-
-CREATE TABLE phpbb_users (
- user_id INT4 DEFAULT nextval('phpbb_users_seq'),
- user_type INT2 DEFAULT '0' NOT NULL,
- group_id INT4 DEFAULT '3' NOT NULL CHECK (group_id >= 0),
- user_permissions TEXT DEFAULT '' NOT NULL,
- user_perm_from INT4 DEFAULT '0' NOT NULL CHECK (user_perm_from >= 0),
- user_ip varchar(40) DEFAULT '' NOT NULL,
- user_regdate INT4 DEFAULT '0' NOT NULL CHECK (user_regdate >= 0),
- username varchar_ci DEFAULT '' NOT NULL,
- username_clean varchar_ci DEFAULT '' NOT NULL,
- user_password varchar(40) DEFAULT '' NOT NULL,
- user_passchg INT4 DEFAULT '0' NOT NULL CHECK (user_passchg >= 0),
- user_pass_convert INT2 DEFAULT '0' NOT NULL CHECK (user_pass_convert >= 0),
- user_email varchar(100) DEFAULT '' NOT NULL,
- user_email_hash INT8 DEFAULT '0' NOT NULL,
- user_birthday varchar(10) DEFAULT '' NOT NULL,
- user_lastvisit INT4 DEFAULT '0' NOT NULL CHECK (user_lastvisit >= 0),
- user_lastmark INT4 DEFAULT '0' NOT NULL CHECK (user_lastmark >= 0),
- user_lastpost_time INT4 DEFAULT '0' NOT NULL CHECK (user_lastpost_time >= 0),
- user_lastpage varchar(200) DEFAULT '' NOT NULL,
- user_last_confirm_key varchar(10) DEFAULT '' NOT NULL,
- user_last_search INT4 DEFAULT '0' NOT NULL CHECK (user_last_search >= 0),
- user_warnings INT2 DEFAULT '0' NOT NULL,
- user_last_warning INT4 DEFAULT '0' NOT NULL CHECK (user_last_warning >= 0),
- user_login_attempts INT2 DEFAULT '0' NOT NULL,
- user_inactive_reason INT2 DEFAULT '0' NOT NULL,
- user_inactive_time INT4 DEFAULT '0' NOT NULL CHECK (user_inactive_time >= 0),
- user_posts INT4 DEFAULT '0' NOT NULL CHECK (user_posts >= 0),
- user_lang varchar(30) DEFAULT '' NOT NULL,
- user_timezone decimal(5,2) DEFAULT '0' NOT NULL,
- user_dst INT2 DEFAULT '0' NOT NULL CHECK (user_dst >= 0),
- user_dateformat varchar(30) DEFAULT 'd M Y H:i' NOT NULL,
- user_style INT4 DEFAULT '0' NOT NULL CHECK (user_style >= 0),
- user_rank INT4 DEFAULT '0' NOT NULL CHECK (user_rank >= 0),
- user_colour varchar(6) DEFAULT '' NOT NULL,
- user_new_privmsg INT4 DEFAULT '0' NOT NULL,
- user_unread_privmsg INT4 DEFAULT '0' NOT NULL,
- user_last_privmsg INT4 DEFAULT '0' NOT NULL CHECK (user_last_privmsg >= 0),
- user_message_rules INT2 DEFAULT '0' NOT NULL CHECK (user_message_rules >= 0),
- user_full_folder INT4 DEFAULT '-3' NOT NULL,
- user_emailtime INT4 DEFAULT '0' NOT NULL CHECK (user_emailtime >= 0),
- user_topic_show_days INT2 DEFAULT '0' NOT NULL CHECK (user_topic_show_days >= 0),
- user_topic_sortby_type varchar(1) DEFAULT 't' NOT NULL,
- user_topic_sortby_dir varchar(1) DEFAULT 'd' NOT NULL,
- user_post_show_days INT2 DEFAULT '0' NOT NULL CHECK (user_post_show_days >= 0),
- user_post_sortby_type varchar(1) DEFAULT 't' NOT NULL,
- user_post_sortby_dir varchar(1) DEFAULT 'a' NOT NULL,
- user_notify INT2 DEFAULT '0' NOT NULL CHECK (user_notify >= 0),
- user_notify_pm INT2 DEFAULT '1' NOT NULL CHECK (user_notify_pm >= 0),
- user_notify_type INT2 DEFAULT '0' NOT NULL,
- user_allow_pm INT2 DEFAULT '1' NOT NULL CHECK (user_allow_pm >= 0),
- user_allow_viewonline INT2 DEFAULT '1' NOT NULL CHECK (user_allow_viewonline >= 0),
- user_allow_viewemail INT2 DEFAULT '1' NOT NULL CHECK (user_allow_viewemail >= 0),
- user_allow_massemail INT2 DEFAULT '1' NOT NULL CHECK (user_allow_massemail >= 0),
- user_options INT4 DEFAULT '230271' NOT NULL CHECK (user_options >= 0),
- user_avatar varchar(255) DEFAULT '' NOT NULL,
- user_avatar_type INT2 DEFAULT '0' NOT NULL,
- user_avatar_width INT2 DEFAULT '0' NOT NULL CHECK (user_avatar_width >= 0),
- user_avatar_height INT2 DEFAULT '0' NOT NULL CHECK (user_avatar_height >= 0),
- user_sig TEXT DEFAULT '' NOT NULL,
- user_sig_bbcode_uid varchar(8) DEFAULT '' NOT NULL,
- user_sig_bbcode_bitfield varchar(255) DEFAULT '' NOT NULL,
- user_from varchar(100) DEFAULT '' NOT NULL,
- user_icq varchar(15) DEFAULT '' NOT NULL,
- user_aim varchar(255) DEFAULT '' NOT NULL,
- user_yim varchar(255) DEFAULT '' NOT NULL,
- user_msnm varchar(255) DEFAULT '' NOT NULL,
- user_jabber varchar(255) DEFAULT '' NOT NULL,
- user_website varchar(200) DEFAULT '' NOT NULL,
- user_occ varchar(4000) DEFAULT '' NOT NULL,
- user_interests varchar(4000) DEFAULT '' NOT NULL,
- user_actkey varchar(32) DEFAULT '' NOT NULL,
- user_newpasswd varchar(40) DEFAULT '' NOT NULL,
- user_form_salt varchar(32) DEFAULT '' NOT NULL,
- user_new INT2 DEFAULT '1' NOT NULL CHECK (user_new >= 0),
- user_reminded INT2 DEFAULT '0' NOT NULL,
- user_reminded_time INT4 DEFAULT '0' NOT NULL CHECK (user_reminded_time >= 0),
- PRIMARY KEY (user_id)
-);
-
-CREATE INDEX phpbb_users_user_birthday ON phpbb_users (user_birthday);
-CREATE INDEX phpbb_users_user_email_hash ON phpbb_users (user_email_hash);
-CREATE INDEX phpbb_users_user_type ON phpbb_users (user_type);
-CREATE UNIQUE INDEX phpbb_users_username_clean ON phpbb_users (username_clean);
-
-/*
- Table: 'phpbb_warnings'
-*/
-CREATE SEQUENCE phpbb_warnings_seq;
-
-CREATE TABLE phpbb_warnings (
- warning_id INT4 DEFAULT nextval('phpbb_warnings_seq'),
- user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0),
- post_id INT4 DEFAULT '0' NOT NULL CHECK (post_id >= 0),
- log_id INT4 DEFAULT '0' NOT NULL CHECK (log_id >= 0),
- warning_time INT4 DEFAULT '0' NOT NULL CHECK (warning_time >= 0),
- PRIMARY KEY (warning_id)
-);
-
-
-/*
- Table: 'phpbb_words'
-*/
-CREATE SEQUENCE phpbb_words_seq;
-
-CREATE TABLE phpbb_words (
- word_id INT4 DEFAULT nextval('phpbb_words_seq'),
- word varchar(255) DEFAULT '' NOT NULL,
- replacement varchar(255) DEFAULT '' NOT NULL,
- PRIMARY KEY (word_id)
-);
-
-
-/*
- Table: 'phpbb_zebra'
-*/
-CREATE TABLE phpbb_zebra (
- user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0),
- zebra_id INT4 DEFAULT '0' NOT NULL CHECK (zebra_id >= 0),
- friend INT2 DEFAULT '0' NOT NULL CHECK (friend >= 0),
- foe INT2 DEFAULT '0' NOT NULL CHECK (foe >= 0),
- PRIMARY KEY (user_id, zebra_id)
-);
-
-
+COMMIT;
-COMMIT; \ No newline at end of file
diff --git a/phpBB/install/schemas/schema.json b/phpBB/install/schemas/schema.json
new file mode 100644
index 0000000000..15d2fd6e84
--- /dev/null
+++ b/phpBB/install/schemas/schema.json
@@ -0,0 +1,3324 @@
+{
+ "phpbb_acl_groups": {
+ "COLUMNS": {
+ "group_id": [
+ "UINT",
+ 0
+ ],
+ "forum_id": [
+ "UINT",
+ 0
+ ],
+ "auth_option_id": [
+ "UINT",
+ 0
+ ],
+ "auth_role_id": [
+ "UINT",
+ 0
+ ],
+ "auth_setting": [
+ "TINT:2",
+ 0
+ ]
+ },
+ "KEYS": {
+ "group_id": [
+ "INDEX",
+ "group_id"
+ ],
+ "auth_opt_id": [
+ "INDEX",
+ "auth_option_id"
+ ],
+ "auth_role_id": [
+ "INDEX",
+ "auth_role_id"
+ ]
+ }
+ },
+ "phpbb_acl_options": {
+ "COLUMNS": {
+ "auth_option_id": [
+ "UINT",
+ null,
+ "auto_increment"
+ ],
+ "auth_option": [
+ "VCHAR:50",
+ ""
+ ],
+ "is_global": [
+ "BOOL",
+ 0
+ ],
+ "is_local": [
+ "BOOL",
+ 0
+ ],
+ "founder_only": [
+ "BOOL",
+ 0
+ ]
+ },
+ "PRIMARY_KEY": "auth_option_id",
+ "KEYS": {
+ "auth_option": [
+ "UNIQUE",
+ [
+ "auth_option"
+ ]
+ ]
+ }
+ },
+ "phpbb_acl_roles": {
+ "COLUMNS": {
+ "role_id": [
+ "UINT",
+ null,
+ "auto_increment"
+ ],
+ "role_name": [
+ "VCHAR_UNI",
+ ""
+ ],
+ "role_description": [
+ "TEXT_UNI",
+ ""
+ ],
+ "role_type": [
+ "VCHAR:10",
+ ""
+ ],
+ "role_order": [
+ "USINT",
+ 0
+ ]
+ },
+ "PRIMARY_KEY": "role_id",
+ "KEYS": {
+ "role_type": [
+ "INDEX",
+ "role_type"
+ ],
+ "role_order": [
+ "INDEX",
+ "role_order"
+ ]
+ }
+ },
+ "phpbb_acl_roles_data": {
+ "COLUMNS": {
+ "role_id": [
+ "UINT",
+ 0
+ ],
+ "auth_option_id": [
+ "UINT",
+ 0
+ ],
+ "auth_setting": [
+ "TINT:2",
+ 0
+ ]
+ },
+ "PRIMARY_KEY": [
+ "role_id",
+ "auth_option_id"
+ ],
+ "KEYS": {
+ "ath_op_id": [
+ "INDEX",
+ "auth_option_id"
+ ]
+ }
+ },
+ "phpbb_acl_users": {
+ "COLUMNS": {
+ "user_id": [
+ "UINT",
+ 0
+ ],
+ "forum_id": [
+ "UINT",
+ 0
+ ],
+ "auth_option_id": [
+ "UINT",
+ 0
+ ],
+ "auth_role_id": [
+ "UINT",
+ 0
+ ],
+ "auth_setting": [
+ "TINT:2",
+ 0
+ ]
+ },
+ "KEYS": {
+ "user_id": [
+ "INDEX",
+ "user_id"
+ ],
+ "auth_option_id": [
+ "INDEX",
+ "auth_option_id"
+ ],
+ "auth_role_id": [
+ "INDEX",
+ "auth_role_id"
+ ]
+ }
+ },
+ "phpbb_attachments": {
+ "COLUMNS": {
+ "attach_id": [
+ "UINT",
+ null,
+ "auto_increment"
+ ],
+ "post_msg_id": [
+ "UINT",
+ 0
+ ],
+ "topic_id": [
+ "UINT",
+ 0
+ ],
+ "in_message": [
+ "BOOL",
+ 0
+ ],
+ "poster_id": [
+ "UINT",
+ 0
+ ],
+ "is_orphan": [
+ "BOOL",
+ 1
+ ],
+ "physical_filename": [
+ "VCHAR",
+ ""
+ ],
+ "real_filename": [
+ "VCHAR",
+ ""
+ ],
+ "download_count": [
+ "UINT",
+ 0
+ ],
+ "attach_comment": [
+ "TEXT_UNI",
+ ""
+ ],
+ "extension": [
+ "VCHAR:100",
+ ""
+ ],
+ "mimetype": [
+ "VCHAR:100",
+ ""
+ ],
+ "filesize": [
+ "UINT:20",
+ 0
+ ],
+ "filetime": [
+ "TIMESTAMP",
+ 0
+ ],
+ "thumbnail": [
+ "BOOL",
+ 0
+ ]
+ },
+ "PRIMARY_KEY": "attach_id",
+ "KEYS": {
+ "filetime": [
+ "INDEX",
+ "filetime"
+ ],
+ "post_msg_id": [
+ "INDEX",
+ "post_msg_id"
+ ],
+ "topic_id": [
+ "INDEX",
+ "topic_id"
+ ],
+ "poster_id": [
+ "INDEX",
+ "poster_id"
+ ],
+ "is_orphan": [
+ "INDEX",
+ "is_orphan"
+ ]
+ }
+ },
+ "phpbb_banlist": {
+ "COLUMNS": {
+ "ban_id": [
+ "UINT",
+ null,
+ "auto_increment"
+ ],
+ "ban_userid": [
+ "UINT",
+ 0
+ ],
+ "ban_ip": [
+ "VCHAR:40",
+ ""
+ ],
+ "ban_email": [
+ "VCHAR_UNI:100",
+ ""
+ ],
+ "ban_start": [
+ "TIMESTAMP",
+ 0
+ ],
+ "ban_end": [
+ "TIMESTAMP",
+ 0
+ ],
+ "ban_exclude": [
+ "BOOL",
+ 0
+ ],
+ "ban_reason": [
+ "VCHAR_UNI",
+ ""
+ ],
+ "ban_give_reason": [
+ "VCHAR_UNI",
+ ""
+ ]
+ },
+ "PRIMARY_KEY": "ban_id",
+ "KEYS": {
+ "ban_end": [
+ "INDEX",
+ "ban_end"
+ ],
+ "ban_user": [
+ "INDEX",
+ [
+ "ban_userid",
+ "ban_exclude"
+ ]
+ ],
+ "ban_email": [
+ "INDEX",
+ [
+ "ban_email",
+ "ban_exclude"
+ ]
+ ],
+ "ban_ip": [
+ "INDEX",
+ [
+ "ban_ip",
+ "ban_exclude"
+ ]
+ ]
+ }
+ },
+ "phpbb_bbcodes": {
+ "COLUMNS": {
+ "bbcode_id": [
+ "USINT",
+ 0
+ ],
+ "bbcode_tag": [
+ "VCHAR:16",
+ ""
+ ],
+ "bbcode_helpline": [
+ "VCHAR_UNI",
+ ""
+ ],
+ "display_on_posting": [
+ "BOOL",
+ 0
+ ],
+ "bbcode_match": [
+ "TEXT_UNI",
+ ""
+ ],
+ "bbcode_tpl": [
+ "MTEXT_UNI",
+ ""
+ ],
+ "first_pass_match": [
+ "MTEXT_UNI",
+ ""
+ ],
+ "first_pass_replace": [
+ "MTEXT_UNI",
+ ""
+ ],
+ "second_pass_match": [
+ "MTEXT_UNI",
+ ""
+ ],
+ "second_pass_replace": [
+ "MTEXT_UNI",
+ ""
+ ]
+ },
+ "PRIMARY_KEY": "bbcode_id",
+ "KEYS": {
+ "display_on_post": [
+ "INDEX",
+ "display_on_posting"
+ ]
+ }
+ },
+ "phpbb_bookmarks": {
+ "COLUMNS": {
+ "topic_id": [
+ "UINT",
+ 0
+ ],
+ "user_id": [
+ "UINT",
+ 0
+ ]
+ },
+ "PRIMARY_KEY": [
+ "topic_id",
+ "user_id"
+ ]
+ },
+ "phpbb_bots": {
+ "COLUMNS": {
+ "bot_id": [
+ "UINT",
+ null,
+ "auto_increment"
+ ],
+ "bot_active": [
+ "BOOL",
+ 1
+ ],
+ "bot_name": [
+ "STEXT_UNI",
+ ""
+ ],
+ "user_id": [
+ "UINT",
+ 0
+ ],
+ "bot_agent": [
+ "VCHAR",
+ ""
+ ],
+ "bot_ip": [
+ "VCHAR",
+ ""
+ ]
+ },
+ "PRIMARY_KEY": "bot_id",
+ "KEYS": {
+ "bot_active": [
+ "INDEX",
+ "bot_active"
+ ]
+ }
+ },
+ "phpbb_config": {
+ "COLUMNS": {
+ "config_name": [
+ "VCHAR",
+ ""
+ ],
+ "config_value": [
+ "VCHAR_UNI",
+ ""
+ ],
+ "is_dynamic": [
+ "BOOL",
+ 0
+ ]
+ },
+ "PRIMARY_KEY": "config_name",
+ "KEYS": {
+ "is_dynamic": [
+ "INDEX",
+ "is_dynamic"
+ ]
+ }
+ },
+ "phpbb_config_text": {
+ "COLUMNS": {
+ "config_name": [
+ "VCHAR",
+ ""
+ ],
+ "config_value": [
+ "MTEXT",
+ ""
+ ]
+ },
+ "PRIMARY_KEY": "config_name"
+ },
+ "phpbb_confirm": {
+ "COLUMNS": {
+ "confirm_id": [
+ "CHAR:32",
+ ""
+ ],
+ "session_id": [
+ "CHAR:32",
+ ""
+ ],
+ "confirm_type": [
+ "TINT:3",
+ 0
+ ],
+ "code": [
+ "VCHAR:8",
+ ""
+ ],
+ "seed": [
+ "UINT:10",
+ 0
+ ],
+ "attempts": [
+ "UINT",
+ 0
+ ]
+ },
+ "PRIMARY_KEY": [
+ "session_id",
+ "confirm_id"
+ ],
+ "KEYS": {
+ "confirm_type": [
+ "INDEX",
+ "confirm_type"
+ ]
+ }
+ },
+ "phpbb_disallow": {
+ "COLUMNS": {
+ "disallow_id": [
+ "UINT",
+ null,
+ "auto_increment"
+ ],
+ "disallow_username": [
+ "VCHAR_UNI:255",
+ ""
+ ]
+ },
+ "PRIMARY_KEY": "disallow_id"
+ },
+ "phpbb_drafts": {
+ "COLUMNS": {
+ "draft_id": [
+ "UINT",
+ null,
+ "auto_increment"
+ ],
+ "user_id": [
+ "UINT",
+ 0
+ ],
+ "topic_id": [
+ "UINT",
+ 0
+ ],
+ "forum_id": [
+ "UINT",
+ 0
+ ],
+ "save_time": [
+ "TIMESTAMP",
+ 0
+ ],
+ "draft_subject": [
+ "STEXT_UNI",
+ ""
+ ],
+ "draft_message": [
+ "MTEXT_UNI",
+ ""
+ ]
+ },
+ "PRIMARY_KEY": "draft_id",
+ "KEYS": {
+ "save_time": [
+ "INDEX",
+ "save_time"
+ ]
+ }
+ },
+ "phpbb_ext": {
+ "COLUMNS": {
+ "ext_name": [
+ "VCHAR",
+ ""
+ ],
+ "ext_active": [
+ "BOOL",
+ 0
+ ],
+ "ext_state": [
+ "TEXT",
+ ""
+ ]
+ },
+ "KEYS": {
+ "ext_name": [
+ "UNIQUE",
+ "ext_name"
+ ]
+ }
+ },
+ "phpbb_extension_groups": {
+ "COLUMNS": {
+ "group_id": [
+ "UINT",
+ null,
+ "auto_increment"
+ ],
+ "group_name": [
+ "VCHAR_UNI",
+ ""
+ ],
+ "cat_id": [
+ "TINT:2",
+ 0
+ ],
+ "allow_group": [
+ "BOOL",
+ 0
+ ],
+ "download_mode": [
+ "BOOL",
+ 1
+ ],
+ "upload_icon": [
+ "VCHAR",
+ ""
+ ],
+ "max_filesize": [
+ "UINT:20",
+ 0
+ ],
+ "allowed_forums": [
+ "TEXT",
+ ""
+ ],
+ "allow_in_pm": [
+ "BOOL",
+ 0
+ ]
+ },
+ "PRIMARY_KEY": "group_id"
+ },
+ "phpbb_extensions": {
+ "COLUMNS": {
+ "extension_id": [
+ "UINT",
+ null,
+ "auto_increment"
+ ],
+ "group_id": [
+ "UINT",
+ 0
+ ],
+ "extension": [
+ "VCHAR:100",
+ ""
+ ]
+ },
+ "PRIMARY_KEY": "extension_id"
+ },
+ "phpbb_forums": {
+ "COLUMNS": {
+ "forum_id": [
+ "UINT",
+ null,
+ "auto_increment"
+ ],
+ "parent_id": [
+ "UINT",
+ 0
+ ],
+ "left_id": [
+ "UINT",
+ 0
+ ],
+ "right_id": [
+ "UINT",
+ 0
+ ],
+ "forum_parents": [
+ "MTEXT",
+ ""
+ ],
+ "forum_name": [
+ "STEXT_UNI",
+ ""
+ ],
+ "forum_desc": [
+ "TEXT_UNI",
+ ""
+ ],
+ "forum_desc_bitfield": [
+ "VCHAR:255",
+ ""
+ ],
+ "forum_desc_options": [
+ "UINT:11",
+ 7
+ ],
+ "forum_desc_uid": [
+ "VCHAR:8",
+ ""
+ ],
+ "forum_link": [
+ "VCHAR_UNI",
+ ""
+ ],
+ "forum_password": [
+ "VCHAR:255",
+ ""
+ ],
+ "forum_style": [
+ "UINT",
+ 0
+ ],
+ "forum_image": [
+ "VCHAR",
+ ""
+ ],
+ "forum_rules": [
+ "TEXT_UNI",
+ ""
+ ],
+ "forum_rules_link": [
+ "VCHAR_UNI",
+ ""
+ ],
+ "forum_rules_bitfield": [
+ "VCHAR:255",
+ ""
+ ],
+ "forum_rules_options": [
+ "UINT:11",
+ 7
+ ],
+ "forum_rules_uid": [
+ "VCHAR:8",
+ ""
+ ],
+ "forum_topics_per_page": [
+ "TINT:4",
+ 0
+ ],
+ "forum_type": [
+ "TINT:4",
+ 0
+ ],
+ "forum_status": [
+ "TINT:4",
+ 0
+ ],
+ "forum_last_post_id": [
+ "UINT",
+ 0
+ ],
+ "forum_last_poster_id": [
+ "UINT",
+ 0
+ ],
+ "forum_last_post_subject": [
+ "STEXT_UNI",
+ ""
+ ],
+ "forum_last_post_time": [
+ "TIMESTAMP",
+ 0
+ ],
+ "forum_last_poster_name": [
+ "VCHAR_UNI",
+ ""
+ ],
+ "forum_last_poster_colour": [
+ "VCHAR:6",
+ ""
+ ],
+ "forum_flags": [
+ "TINT:4",
+ 32
+ ],
+ "display_on_index": [
+ "BOOL",
+ 1
+ ],
+ "enable_indexing": [
+ "BOOL",
+ 1
+ ],
+ "enable_icons": [
+ "BOOL",
+ 1
+ ],
+ "enable_prune": [
+ "BOOL",
+ 0
+ ],
+ "prune_next": [
+ "TIMESTAMP",
+ 0
+ ],
+ "prune_days": [
+ "UINT",
+ 0
+ ],
+ "prune_viewed": [
+ "UINT",
+ 0
+ ],
+ "prune_freq": [
+ "UINT",
+ 0
+ ],
+ "display_subforum_list": [
+ "BOOL",
+ 1
+ ],
+ "forum_options": [
+ "UINT:20",
+ 0
+ ],
+ "forum_posts_approved": [
+ "UINT",
+ 0
+ ],
+ "forum_posts_unapproved": [
+ "UINT",
+ 0
+ ],
+ "forum_posts_softdeleted": [
+ "UINT",
+ 0
+ ],
+ "forum_topics_approved": [
+ "UINT",
+ 0
+ ],
+ "forum_topics_unapproved": [
+ "UINT",
+ 0
+ ],
+ "forum_topics_softdeleted": [
+ "UINT",
+ 0
+ ]
+ },
+ "PRIMARY_KEY": "forum_id",
+ "KEYS": {
+ "left_right_id": [
+ "INDEX",
+ [
+ "left_id",
+ "right_id"
+ ]
+ ],
+ "forum_lastpost_id": [
+ "INDEX",
+ "forum_last_post_id"
+ ]
+ }
+ },
+ "phpbb_forums_access": {
+ "COLUMNS": {
+ "forum_id": [
+ "UINT",
+ 0
+ ],
+ "user_id": [
+ "UINT",
+ 0
+ ],
+ "session_id": [
+ "CHAR:32",
+ ""
+ ]
+ },
+ "PRIMARY_KEY": [
+ "forum_id",
+ "user_id",
+ "session_id"
+ ]
+ },
+ "phpbb_forums_track": {
+ "COLUMNS": {
+ "user_id": [
+ "UINT",
+ 0
+ ],
+ "forum_id": [
+ "UINT",
+ 0
+ ],
+ "mark_time": [
+ "TIMESTAMP",
+ 0
+ ]
+ },
+ "PRIMARY_KEY": [
+ "user_id",
+ "forum_id"
+ ]
+ },
+ "phpbb_forums_watch": {
+ "COLUMNS": {
+ "forum_id": [
+ "UINT",
+ 0
+ ],
+ "user_id": [
+ "UINT",
+ 0
+ ],
+ "notify_status": [
+ "BOOL",
+ 0
+ ]
+ },
+ "KEYS": {
+ "forum_id": [
+ "INDEX",
+ "forum_id"
+ ],
+ "user_id": [
+ "INDEX",
+ "user_id"
+ ],
+ "notify_stat": [
+ "INDEX",
+ "notify_status"
+ ]
+ }
+ },
+ "phpbb_groups": {
+ "COLUMNS": {
+ "group_id": [
+ "UINT",
+ null,
+ "auto_increment"
+ ],
+ "group_type": [
+ "TINT:4",
+ 1
+ ],
+ "group_founder_manage": [
+ "BOOL",
+ 0
+ ],
+ "group_name": [
+ "VCHAR_CI",
+ ""
+ ],
+ "group_desc": [
+ "TEXT_UNI",
+ ""
+ ],
+ "group_desc_bitfield": [
+ "VCHAR:255",
+ ""
+ ],
+ "group_desc_options": [
+ "UINT:11",
+ 7
+ ],
+ "group_desc_uid": [
+ "VCHAR:8",
+ ""
+ ],
+ "group_display": [
+ "BOOL",
+ 0
+ ],
+ "group_avatar": [
+ "VCHAR",
+ ""
+ ],
+ "group_avatar_type": [
+ "VCHAR:255",
+ ""
+ ],
+ "group_avatar_width": [
+ "USINT",
+ 0
+ ],
+ "group_avatar_height": [
+ "USINT",
+ 0
+ ],
+ "group_rank": [
+ "UINT",
+ 0
+ ],
+ "group_colour": [
+ "VCHAR:6",
+ ""
+ ],
+ "group_sig_chars": [
+ "UINT",
+ 0
+ ],
+ "group_receive_pm": [
+ "BOOL",
+ 0
+ ],
+ "group_message_limit": [
+ "UINT",
+ 0
+ ],
+ "group_legend": [
+ "UINT",
+ 0
+ ],
+ "group_max_recipients": [
+ "UINT",
+ 0
+ ],
+ "group_skip_auth": {
+ "0": "BOOL",
+ "1": 0,
+ "after": "group_founder_manage"
+ }
+ },
+ "PRIMARY_KEY": "group_id",
+ "KEYS": {
+ "group_legend_name": [
+ "INDEX",
+ [
+ "group_legend",
+ "group_name"
+ ]
+ ]
+ }
+ },
+ "phpbb_icons": {
+ "COLUMNS": {
+ "icons_id": [
+ "UINT",
+ null,
+ "auto_increment"
+ ],
+ "icons_url": [
+ "VCHAR",
+ ""
+ ],
+ "icons_width": [
+ "TINT:4",
+ 0
+ ],
+ "icons_height": [
+ "TINT:4",
+ 0
+ ],
+ "icons_order": [
+ "UINT",
+ 0
+ ],
+ "display_on_posting": [
+ "BOOL",
+ 1
+ ]
+ },
+ "PRIMARY_KEY": "icons_id",
+ "KEYS": {
+ "display_on_posting": [
+ "INDEX",
+ "display_on_posting"
+ ]
+ }
+ },
+ "phpbb_lang": {
+ "COLUMNS": {
+ "lang_id": [
+ "TINT:4",
+ null,
+ "auto_increment"
+ ],
+ "lang_iso": [
+ "VCHAR:30",
+ ""
+ ],
+ "lang_dir": [
+ "VCHAR:30",
+ ""
+ ],
+ "lang_english_name": [
+ "VCHAR_UNI:100",
+ ""
+ ],
+ "lang_local_name": [
+ "VCHAR_UNI:255",
+ ""
+ ],
+ "lang_author": [
+ "VCHAR_UNI:255",
+ ""
+ ]
+ },
+ "PRIMARY_KEY": "lang_id",
+ "KEYS": {
+ "lang_iso": [
+ "INDEX",
+ "lang_iso"
+ ]
+ }
+ },
+ "phpbb_log": {
+ "COLUMNS": {
+ "log_id": [
+ "UINT",
+ null,
+ "auto_increment"
+ ],
+ "log_type": [
+ "TINT:4",
+ 0
+ ],
+ "user_id": [
+ "UINT",
+ 0
+ ],
+ "forum_id": [
+ "UINT",
+ 0
+ ],
+ "topic_id": [
+ "UINT",
+ 0
+ ],
+ "reportee_id": [
+ "UINT",
+ 0
+ ],
+ "log_ip": [
+ "VCHAR:40",
+ ""
+ ],
+ "log_time": [
+ "TIMESTAMP",
+ 0
+ ],
+ "log_operation": [
+ "TEXT_UNI",
+ ""
+ ],
+ "log_data": [
+ "MTEXT_UNI",
+ ""
+ ]
+ },
+ "PRIMARY_KEY": "log_id",
+ "KEYS": {
+ "log_type": [
+ "INDEX",
+ "log_type"
+ ],
+ "forum_id": [
+ "INDEX",
+ "forum_id"
+ ],
+ "topic_id": [
+ "INDEX",
+ "topic_id"
+ ],
+ "reportee_id": [
+ "INDEX",
+ "reportee_id"
+ ],
+ "user_id": [
+ "INDEX",
+ "user_id"
+ ]
+ }
+ },
+ "phpbb_login_attempts": {
+ "COLUMNS": {
+ "attempt_ip": [
+ "VCHAR:40",
+ ""
+ ],
+ "attempt_browser": [
+ "VCHAR:150",
+ ""
+ ],
+ "attempt_forwarded_for": [
+ "VCHAR:255",
+ ""
+ ],
+ "attempt_time": [
+ "TIMESTAMP",
+ 0
+ ],
+ "user_id": [
+ "UINT",
+ 0
+ ],
+ "username": [
+ "VCHAR_UNI:255",
+ 0
+ ],
+ "username_clean": [
+ "VCHAR_CI",
+ 0
+ ]
+ },
+ "KEYS": {
+ "att_ip": [
+ "INDEX",
+ [
+ "attempt_ip",
+ "attempt_time"
+ ]
+ ],
+ "att_for": [
+ "INDEX",
+ [
+ "attempt_forwarded_for",
+ "attempt_time"
+ ]
+ ],
+ "att_time": [
+ "INDEX",
+ [
+ "attempt_time"
+ ]
+ ],
+ "user_id": [
+ "INDEX",
+ "user_id"
+ ]
+ }
+ },
+ "phpbb_migrations": {
+ "COLUMNS": {
+ "migration_name": [
+ "VCHAR",
+ ""
+ ],
+ "migration_depends_on": [
+ "TEXT",
+ ""
+ ],
+ "migration_schema_done": [
+ "BOOL",
+ 0
+ ],
+ "migration_data_done": [
+ "BOOL",
+ 0
+ ],
+ "migration_data_state": [
+ "TEXT",
+ ""
+ ],
+ "migration_start_time": [
+ "TIMESTAMP",
+ 0
+ ],
+ "migration_end_time": [
+ "TIMESTAMP",
+ 0
+ ]
+ },
+ "PRIMARY_KEY": "migration_name"
+ },
+ "phpbb_moderator_cache": {
+ "COLUMNS": {
+ "forum_id": [
+ "UINT",
+ 0
+ ],
+ "user_id": [
+ "UINT",
+ 0
+ ],
+ "username": [
+ "VCHAR_UNI:255",
+ ""
+ ],
+ "group_id": [
+ "UINT",
+ 0
+ ],
+ "group_name": [
+ "VCHAR_UNI",
+ ""
+ ],
+ "display_on_index": [
+ "BOOL",
+ 1
+ ]
+ },
+ "KEYS": {
+ "disp_idx": [
+ "INDEX",
+ "display_on_index"
+ ],
+ "forum_id": [
+ "INDEX",
+ "forum_id"
+ ]
+ }
+ },
+ "phpbb_modules": {
+ "COLUMNS": {
+ "module_id": [
+ "UINT",
+ null,
+ "auto_increment"
+ ],
+ "module_enabled": [
+ "BOOL",
+ 1
+ ],
+ "module_display": [
+ "BOOL",
+ 1
+ ],
+ "module_basename": [
+ "VCHAR",
+ ""
+ ],
+ "module_class": [
+ "VCHAR:10",
+ ""
+ ],
+ "parent_id": [
+ "UINT",
+ 0
+ ],
+ "left_id": [
+ "UINT",
+ 0
+ ],
+ "right_id": [
+ "UINT",
+ 0
+ ],
+ "module_langname": [
+ "VCHAR",
+ ""
+ ],
+ "module_mode": [
+ "VCHAR",
+ ""
+ ],
+ "module_auth": [
+ "VCHAR",
+ ""
+ ]
+ },
+ "PRIMARY_KEY": "module_id",
+ "KEYS": {
+ "left_right_id": [
+ "INDEX",
+ [
+ "left_id",
+ "right_id"
+ ]
+ ],
+ "module_enabled": [
+ "INDEX",
+ "module_enabled"
+ ],
+ "class_left_id": [
+ "INDEX",
+ [
+ "module_class",
+ "left_id"
+ ]
+ ]
+ }
+ },
+ "phpbb_notification_types": {
+ "COLUMNS": {
+ "notification_type_id": [
+ "USINT",
+ null,
+ "auto_increment"
+ ],
+ "notification_type_name": [
+ "VCHAR:255",
+ ""
+ ],
+ "notification_type_enabled": [
+ "BOOL",
+ 1
+ ]
+ },
+ "PRIMARY_KEY": [
+ "notification_type_id"
+ ],
+ "KEYS": {
+ "type": [
+ "UNIQUE",
+ [
+ "notification_type_name"
+ ]
+ ]
+ }
+ },
+ "phpbb_notifications": {
+ "COLUMNS": {
+ "notification_id": [
+ "UINT:10",
+ null,
+ "auto_increment"
+ ],
+ "notification_type_id": [
+ "USINT",
+ 0
+ ],
+ "item_id": [
+ "UINT",
+ 0
+ ],
+ "item_parent_id": [
+ "UINT",
+ 0
+ ],
+ "user_id": [
+ "UINT",
+ 0
+ ],
+ "notification_read": [
+ "BOOL",
+ 0
+ ],
+ "notification_time": [
+ "TIMESTAMP",
+ 1
+ ],
+ "notification_data": [
+ "TEXT_UNI",
+ ""
+ ]
+ },
+ "PRIMARY_KEY": "notification_id",
+ "KEYS": {
+ "item_ident": [
+ "INDEX",
+ [
+ "notification_type_id",
+ "item_id"
+ ]
+ ],
+ "user": [
+ "INDEX",
+ [
+ "user_id",
+ "notification_read"
+ ]
+ ]
+ }
+ },
+ "phpbb_oauth_accounts": {
+ "COLUMNS": {
+ "user_id": [
+ "UINT",
+ 0
+ ],
+ "provider": [
+ "VCHAR",
+ ""
+ ],
+ "oauth_provider_id": [
+ "TEXT_UNI",
+ ""
+ ]
+ },
+ "PRIMARY_KEY": [
+ "user_id",
+ "provider"
+ ]
+ },
+ "phpbb_oauth_tokens": {
+ "COLUMNS": {
+ "user_id": [
+ "UINT",
+ 0
+ ],
+ "session_id": [
+ "CHAR:32",
+ ""
+ ],
+ "provider": [
+ "VCHAR",
+ ""
+ ],
+ "oauth_token": [
+ "MTEXT",
+ ""
+ ]
+ },
+ "KEYS": {
+ "user_id": [
+ "INDEX",
+ "user_id"
+ ],
+ "provider": [
+ "INDEX",
+ "provider"
+ ]
+ }
+ },
+ "phpbb_poll_options": {
+ "COLUMNS": {
+ "poll_option_id": [
+ "TINT:4",
+ 0
+ ],
+ "topic_id": [
+ "UINT",
+ 0
+ ],
+ "poll_option_text": [
+ "TEXT_UNI",
+ ""
+ ],
+ "poll_option_total": [
+ "UINT",
+ 0
+ ]
+ },
+ "KEYS": {
+ "poll_opt_id": [
+ "INDEX",
+ "poll_option_id"
+ ],
+ "topic_id": [
+ "INDEX",
+ "topic_id"
+ ]
+ }
+ },
+ "phpbb_poll_votes": {
+ "COLUMNS": {
+ "topic_id": [
+ "UINT",
+ 0
+ ],
+ "poll_option_id": [
+ "TINT:4",
+ 0
+ ],
+ "vote_user_id": [
+ "UINT",
+ 0
+ ],
+ "vote_user_ip": [
+ "VCHAR:40",
+ ""
+ ]
+ },
+ "KEYS": {
+ "topic_id": [
+ "INDEX",
+ "topic_id"
+ ],
+ "vote_user_id": [
+ "INDEX",
+ "vote_user_id"
+ ],
+ "vote_user_ip": [
+ "INDEX",
+ "vote_user_ip"
+ ]
+ }
+ },
+ "phpbb_posts": {
+ "COLUMNS": {
+ "post_id": [
+ "UINT",
+ null,
+ "auto_increment"
+ ],
+ "topic_id": [
+ "UINT",
+ 0
+ ],
+ "forum_id": [
+ "UINT",
+ 0
+ ],
+ "poster_id": [
+ "UINT",
+ 0
+ ],
+ "icon_id": [
+ "UINT",
+ 0
+ ],
+ "poster_ip": [
+ "VCHAR:40",
+ ""
+ ],
+ "post_time": [
+ "TIMESTAMP",
+ 0
+ ],
+ "post_reported": [
+ "BOOL",
+ 0
+ ],
+ "enable_bbcode": [
+ "BOOL",
+ 1
+ ],
+ "enable_smilies": [
+ "BOOL",
+ 1
+ ],
+ "enable_magic_url": [
+ "BOOL",
+ 1
+ ],
+ "enable_sig": [
+ "BOOL",
+ 1
+ ],
+ "post_username": [
+ "VCHAR_UNI:255",
+ ""
+ ],
+ "post_subject": [
+ "STEXT_UNI",
+ "",
+ "true_sort"
+ ],
+ "post_text": [
+ "MTEXT_UNI",
+ ""
+ ],
+ "post_checksum": [
+ "VCHAR:32",
+ ""
+ ],
+ "post_attachment": [
+ "BOOL",
+ 0
+ ],
+ "bbcode_bitfield": [
+ "VCHAR:255",
+ ""
+ ],
+ "bbcode_uid": [
+ "VCHAR:8",
+ ""
+ ],
+ "post_postcount": [
+ "BOOL",
+ 1
+ ],
+ "post_edit_time": [
+ "TIMESTAMP",
+ 0
+ ],
+ "post_edit_reason": [
+ "STEXT_UNI",
+ ""
+ ],
+ "post_edit_user": [
+ "UINT",
+ 0
+ ],
+ "post_edit_count": [
+ "USINT",
+ 0
+ ],
+ "post_edit_locked": [
+ "BOOL",
+ 0
+ ],
+ "post_visibility": [
+ "TINT:3",
+ 0
+ ],
+ "post_delete_time": [
+ "TIMESTAMP",
+ 0
+ ],
+ "post_delete_reason": [
+ "STEXT_UNI",
+ ""
+ ],
+ "post_delete_user": [
+ "UINT",
+ 0
+ ]
+ },
+ "PRIMARY_KEY": "post_id",
+ "KEYS": {
+ "forum_id": [
+ "INDEX",
+ "forum_id"
+ ],
+ "topic_id": [
+ "INDEX",
+ "topic_id"
+ ],
+ "poster_ip": [
+ "INDEX",
+ "poster_ip"
+ ],
+ "poster_id": [
+ "INDEX",
+ "poster_id"
+ ],
+ "tid_post_time": [
+ "INDEX",
+ [
+ "topic_id",
+ "post_time"
+ ]
+ ],
+ "post_username": [
+ "INDEX",
+ [
+ "post_username:255"
+ ]
+ ],
+ "post_visibility": [
+ "INDEX",
+ [
+ "post_visibility"
+ ]
+ ]
+ }
+ },
+ "phpbb_privmsgs": {
+ "COLUMNS": {
+ "msg_id": [
+ "UINT",
+ null,
+ "auto_increment"
+ ],
+ "root_level": [
+ "UINT",
+ 0
+ ],
+ "author_id": [
+ "UINT",
+ 0
+ ],
+ "icon_id": [
+ "UINT",
+ 0
+ ],
+ "author_ip": [
+ "VCHAR:40",
+ ""
+ ],
+ "message_time": [
+ "TIMESTAMP",
+ 0
+ ],
+ "enable_bbcode": [
+ "BOOL",
+ 1
+ ],
+ "enable_smilies": [
+ "BOOL",
+ 1
+ ],
+ "enable_magic_url": [
+ "BOOL",
+ 1
+ ],
+ "enable_sig": [
+ "BOOL",
+ 1
+ ],
+ "message_subject": [
+ "STEXT_UNI",
+ ""
+ ],
+ "message_text": [
+ "MTEXT_UNI",
+ ""
+ ],
+ "message_edit_reason": [
+ "STEXT_UNI",
+ ""
+ ],
+ "message_edit_user": [
+ "UINT",
+ 0
+ ],
+ "message_attachment": [
+ "BOOL",
+ 0
+ ],
+ "bbcode_bitfield": [
+ "VCHAR:255",
+ ""
+ ],
+ "bbcode_uid": [
+ "VCHAR:8",
+ ""
+ ],
+ "message_edit_time": [
+ "TIMESTAMP",
+ 0
+ ],
+ "message_edit_count": [
+ "USINT",
+ 0
+ ],
+ "to_address": [
+ "TEXT_UNI",
+ ""
+ ],
+ "bcc_address": [
+ "TEXT_UNI",
+ ""
+ ],
+ "message_reported": [
+ "BOOL",
+ 0
+ ]
+ },
+ "PRIMARY_KEY": "msg_id",
+ "KEYS": {
+ "author_ip": [
+ "INDEX",
+ "author_ip"
+ ],
+ "message_time": [
+ "INDEX",
+ "message_time"
+ ],
+ "author_id": [
+ "INDEX",
+ "author_id"
+ ],
+ "root_level": [
+ "INDEX",
+ "root_level"
+ ]
+ }
+ },
+ "phpbb_privmsgs_folder": {
+ "COLUMNS": {
+ "folder_id": [
+ "UINT",
+ null,
+ "auto_increment"
+ ],
+ "user_id": [
+ "UINT",
+ 0
+ ],
+ "folder_name": [
+ "VCHAR_UNI",
+ ""
+ ],
+ "pm_count": [
+ "UINT",
+ 0
+ ]
+ },
+ "PRIMARY_KEY": "folder_id",
+ "KEYS": {
+ "user_id": [
+ "INDEX",
+ "user_id"
+ ]
+ }
+ },
+ "phpbb_privmsgs_rules": {
+ "COLUMNS": {
+ "rule_id": [
+ "UINT",
+ null,
+ "auto_increment"
+ ],
+ "user_id": [
+ "UINT",
+ 0
+ ],
+ "rule_check": [
+ "UINT",
+ 0
+ ],
+ "rule_connection": [
+ "UINT",
+ 0
+ ],
+ "rule_string": [
+ "VCHAR_UNI",
+ ""
+ ],
+ "rule_user_id": [
+ "UINT",
+ 0
+ ],
+ "rule_group_id": [
+ "UINT",
+ 0
+ ],
+ "rule_action": [
+ "UINT",
+ 0
+ ],
+ "rule_folder_id": [
+ "INT:11",
+ 0
+ ]
+ },
+ "PRIMARY_KEY": "rule_id",
+ "KEYS": {
+ "user_id": [
+ "INDEX",
+ "user_id"
+ ]
+ }
+ },
+ "phpbb_privmsgs_to": {
+ "COLUMNS": {
+ "msg_id": [
+ "UINT",
+ 0
+ ],
+ "user_id": [
+ "UINT",
+ 0
+ ],
+ "author_id": [
+ "UINT",
+ 0
+ ],
+ "pm_deleted": [
+ "BOOL",
+ 0
+ ],
+ "pm_new": [
+ "BOOL",
+ 1
+ ],
+ "pm_unread": [
+ "BOOL",
+ 1
+ ],
+ "pm_replied": [
+ "BOOL",
+ 0
+ ],
+ "pm_marked": [
+ "BOOL",
+ 0
+ ],
+ "pm_forwarded": [
+ "BOOL",
+ 0
+ ],
+ "folder_id": [
+ "INT:11",
+ 0
+ ]
+ },
+ "KEYS": {
+ "msg_id": [
+ "INDEX",
+ "msg_id"
+ ],
+ "author_id": [
+ "INDEX",
+ "author_id"
+ ],
+ "usr_flder_id": [
+ "INDEX",
+ [
+ "user_id",
+ "folder_id"
+ ]
+ ]
+ }
+ },
+ "phpbb_profile_fields": {
+ "COLUMNS": {
+ "field_id": [
+ "UINT",
+ null,
+ "auto_increment"
+ ],
+ "field_name": [
+ "VCHAR_UNI",
+ ""
+ ],
+ "field_type": [
+ "VCHAR:100",
+ ""
+ ],
+ "field_ident": [
+ "VCHAR:20",
+ ""
+ ],
+ "field_length": [
+ "VCHAR:20",
+ ""
+ ],
+ "field_minlen": [
+ "VCHAR",
+ ""
+ ],
+ "field_maxlen": [
+ "VCHAR",
+ ""
+ ],
+ "field_novalue": [
+ "VCHAR_UNI",
+ ""
+ ],
+ "field_default_value": [
+ "VCHAR_UNI",
+ ""
+ ],
+ "field_validation": [
+ "VCHAR_UNI:20",
+ ""
+ ],
+ "field_required": [
+ "BOOL",
+ 0
+ ],
+ "field_show_on_reg": [
+ "BOOL",
+ 0
+ ],
+ "field_hide": [
+ "BOOL",
+ 0
+ ],
+ "field_no_view": [
+ "BOOL",
+ 0
+ ],
+ "field_active": [
+ "BOOL",
+ 0
+ ],
+ "field_order": [
+ "UINT",
+ 0
+ ],
+ "field_show_profile": [
+ "BOOL",
+ 0
+ ],
+ "field_show_on_vt": [
+ "BOOL",
+ 0
+ ],
+ "field_show_novalue": [
+ "BOOL",
+ 0
+ ],
+ "field_show_on_pm": [
+ "BOOL",
+ 0
+ ],
+ "field_show_on_ml": [
+ "BOOL",
+ 0
+ ],
+ "field_is_contact": [
+ "BOOL",
+ 0
+ ],
+ "field_contact_desc": [
+ "VCHAR",
+ ""
+ ],
+ "field_contact_url": [
+ "VCHAR",
+ ""
+ ]
+ },
+ "PRIMARY_KEY": "field_id",
+ "KEYS": {
+ "fld_type": [
+ "INDEX",
+ "field_type"
+ ],
+ "fld_ordr": [
+ "INDEX",
+ "field_order"
+ ]
+ }
+ },
+ "phpbb_profile_fields_data": {
+ "COLUMNS": {
+ "user_id": [
+ "UINT",
+ 0
+ ],
+ "pf_phpbb_interests": [
+ "MTEXT",
+ ""
+ ],
+ "pf_phpbb_occupation": [
+ "MTEXT",
+ ""
+ ],
+ "pf_phpbb_icq": [
+ "VCHAR",
+ ""
+ ],
+ "pf_phpbb_location": [
+ "VCHAR",
+ ""
+ ],
+ "pf_phpbb_website": [
+ "VCHAR",
+ ""
+ ],
+ "pf_phpbb_wlm": [
+ "VCHAR",
+ ""
+ ],
+ "pf_phpbb_yahoo": [
+ "VCHAR",
+ ""
+ ],
+ "pf_phpbb_aol": [
+ "VCHAR",
+ ""
+ ]
+ },
+ "PRIMARY_KEY": "user_id"
+ },
+ "phpbb_profile_fields_lang": {
+ "COLUMNS": {
+ "field_id": [
+ "UINT",
+ 0
+ ],
+ "lang_id": [
+ "UINT",
+ 0
+ ],
+ "option_id": [
+ "UINT",
+ 0
+ ],
+ "field_type": [
+ "VCHAR:100",
+ ""
+ ],
+ "lang_value": [
+ "VCHAR_UNI",
+ ""
+ ]
+ },
+ "PRIMARY_KEY": [
+ "field_id",
+ "lang_id",
+ "option_id"
+ ]
+ },
+ "phpbb_profile_lang": {
+ "COLUMNS": {
+ "field_id": [
+ "UINT",
+ 0
+ ],
+ "lang_id": [
+ "UINT",
+ 0
+ ],
+ "lang_name": [
+ "VCHAR_UNI",
+ ""
+ ],
+ "lang_explain": [
+ "TEXT_UNI",
+ ""
+ ],
+ "lang_default_value": [
+ "VCHAR_UNI",
+ ""
+ ]
+ },
+ "PRIMARY_KEY": [
+ "field_id",
+ "lang_id"
+ ]
+ },
+ "phpbb_ranks": {
+ "COLUMNS": {
+ "rank_id": [
+ "UINT",
+ null,
+ "auto_increment"
+ ],
+ "rank_title": [
+ "VCHAR_UNI",
+ ""
+ ],
+ "rank_min": [
+ "UINT",
+ 0
+ ],
+ "rank_special": [
+ "BOOL",
+ 0
+ ],
+ "rank_image": [
+ "VCHAR",
+ ""
+ ]
+ },
+ "PRIMARY_KEY": "rank_id"
+ },
+ "phpbb_reports": {
+ "COLUMNS": {
+ "report_id": [
+ "UINT",
+ null,
+ "auto_increment"
+ ],
+ "reason_id": [
+ "USINT",
+ 0
+ ],
+ "post_id": [
+ "UINT",
+ 0
+ ],
+ "user_id": [
+ "UINT",
+ 0
+ ],
+ "user_notify": [
+ "BOOL",
+ 0
+ ],
+ "report_closed": [
+ "BOOL",
+ 0
+ ],
+ "report_time": [
+ "TIMESTAMP",
+ 0
+ ],
+ "report_text": [
+ "MTEXT_UNI",
+ ""
+ ],
+ "pm_id": [
+ "UINT",
+ 0
+ ],
+ "reported_post_enable_bbcode": [
+ "BOOL",
+ 1
+ ],
+ "reported_post_enable_smilies": [
+ "BOOL",
+ 1
+ ],
+ "reported_post_enable_magic_url": [
+ "BOOL",
+ 1
+ ],
+ "reported_post_text": [
+ "MTEXT_UNI",
+ ""
+ ],
+ "reported_post_uid": [
+ "VCHAR:8",
+ ""
+ ],
+ "reported_post_bitfield": [
+ "VCHAR:255",
+ ""
+ ]
+ },
+ "PRIMARY_KEY": "report_id",
+ "KEYS": {
+ "post_id": [
+ "INDEX",
+ [
+ "post_id"
+ ]
+ ],
+ "pm_id": [
+ "INDEX",
+ [
+ "pm_id"
+ ]
+ ]
+ }
+ },
+ "phpbb_reports_reasons": {
+ "COLUMNS": {
+ "reason_id": [
+ "USINT",
+ null,
+ "auto_increment"
+ ],
+ "reason_title": [
+ "VCHAR_UNI",
+ ""
+ ],
+ "reason_description": [
+ "MTEXT_UNI",
+ ""
+ ],
+ "reason_order": [
+ "USINT",
+ 0
+ ]
+ },
+ "PRIMARY_KEY": "reason_id"
+ },
+ "phpbb_search_results": {
+ "COLUMNS": {
+ "search_key": [
+ "VCHAR:32",
+ ""
+ ],
+ "search_time": [
+ "TIMESTAMP",
+ 0
+ ],
+ "search_keywords": [
+ "MTEXT_UNI",
+ ""
+ ],
+ "search_authors": [
+ "MTEXT",
+ ""
+ ]
+ },
+ "PRIMARY_KEY": "search_key"
+ },
+ "phpbb_search_wordlist": {
+ "COLUMNS": {
+ "word_id": [
+ "UINT",
+ null,
+ "auto_increment"
+ ],
+ "word_text": [
+ "VCHAR_UNI",
+ ""
+ ],
+ "word_common": [
+ "BOOL",
+ 0
+ ],
+ "word_count": [
+ "UINT",
+ 0
+ ]
+ },
+ "PRIMARY_KEY": "word_id",
+ "KEYS": {
+ "wrd_txt": [
+ "UNIQUE",
+ "word_text"
+ ],
+ "wrd_cnt": [
+ "INDEX",
+ "word_count"
+ ]
+ }
+ },
+ "phpbb_search_wordmatch": {
+ "COLUMNS": {
+ "post_id": [
+ "UINT",
+ 0
+ ],
+ "word_id": [
+ "UINT",
+ 0
+ ],
+ "title_match": [
+ "BOOL",
+ 0
+ ]
+ },
+ "KEYS": {
+ "unq_mtch": [
+ "UNIQUE",
+ [
+ "word_id",
+ "post_id",
+ "title_match"
+ ]
+ ],
+ "word_id": [
+ "INDEX",
+ "word_id"
+ ],
+ "post_id": [
+ "INDEX",
+ "post_id"
+ ]
+ }
+ },
+ "phpbb_sessions": {
+ "COLUMNS": {
+ "session_id": [
+ "CHAR:32",
+ ""
+ ],
+ "session_user_id": [
+ "UINT",
+ 0
+ ],
+ "session_last_visit": [
+ "TIMESTAMP",
+ 0
+ ],
+ "session_start": [
+ "TIMESTAMP",
+ 0
+ ],
+ "session_time": [
+ "TIMESTAMP",
+ 0
+ ],
+ "session_ip": [
+ "VCHAR:40",
+ ""
+ ],
+ "session_browser": [
+ "VCHAR:150",
+ ""
+ ],
+ "session_forwarded_for": [
+ "VCHAR:255",
+ ""
+ ],
+ "session_page": [
+ "VCHAR_UNI",
+ ""
+ ],
+ "session_viewonline": [
+ "BOOL",
+ 1
+ ],
+ "session_autologin": [
+ "BOOL",
+ 0
+ ],
+ "session_admin": [
+ "BOOL",
+ 0
+ ],
+ "session_forum_id": [
+ "UINT",
+ 0
+ ]
+ },
+ "PRIMARY_KEY": "session_id",
+ "KEYS": {
+ "session_time": [
+ "INDEX",
+ "session_time"
+ ],
+ "session_user_id": [
+ "INDEX",
+ "session_user_id"
+ ],
+ "session_fid": [
+ "INDEX",
+ [
+ "session_forum_id"
+ ]
+ ]
+ }
+ },
+ "phpbb_sessions_keys": {
+ "COLUMNS": {
+ "key_id": [
+ "CHAR:32",
+ ""
+ ],
+ "user_id": [
+ "UINT",
+ 0
+ ],
+ "last_ip": [
+ "VCHAR:40",
+ ""
+ ],
+ "last_login": [
+ "TIMESTAMP",
+ 0
+ ]
+ },
+ "PRIMARY_KEY": [
+ "key_id",
+ "user_id"
+ ],
+ "KEYS": {
+ "last_login": [
+ "INDEX",
+ "last_login"
+ ]
+ }
+ },
+ "phpbb_sitelist": {
+ "COLUMNS": {
+ "site_id": [
+ "UINT",
+ null,
+ "auto_increment"
+ ],
+ "site_ip": [
+ "VCHAR:40",
+ ""
+ ],
+ "site_hostname": [
+ "VCHAR",
+ ""
+ ],
+ "ip_exclude": [
+ "BOOL",
+ 0
+ ]
+ },
+ "PRIMARY_KEY": "site_id"
+ },
+ "phpbb_smilies": {
+ "COLUMNS": {
+ "smiley_id": [
+ "UINT",
+ null,
+ "auto_increment"
+ ],
+ "code": [
+ "VCHAR_UNI:50",
+ ""
+ ],
+ "emotion": [
+ "VCHAR_UNI:50",
+ ""
+ ],
+ "smiley_url": [
+ "VCHAR:50",
+ ""
+ ],
+ "smiley_width": [
+ "USINT",
+ 0
+ ],
+ "smiley_height": [
+ "USINT",
+ 0
+ ],
+ "smiley_order": [
+ "UINT",
+ 0
+ ],
+ "display_on_posting": [
+ "BOOL",
+ 1
+ ]
+ },
+ "PRIMARY_KEY": "smiley_id",
+ "KEYS": {
+ "display_on_post": [
+ "INDEX",
+ "display_on_posting"
+ ]
+ }
+ },
+ "phpbb_styles": {
+ "COLUMNS": {
+ "style_id": [
+ "UINT",
+ null,
+ "auto_increment"
+ ],
+ "style_name": [
+ "VCHAR_UNI:255",
+ ""
+ ],
+ "style_copyright": [
+ "VCHAR_UNI",
+ ""
+ ],
+ "style_active": [
+ "BOOL",
+ 1
+ ],
+ "style_path": [
+ "VCHAR:100",
+ ""
+ ],
+ "bbcode_bitfield": [
+ "VCHAR:255",
+ "kNg="
+ ],
+ "style_parent_id": [
+ "UINT:4",
+ 0
+ ],
+ "style_parent_tree": [
+ "TEXT",
+ ""
+ ]
+ },
+ "PRIMARY_KEY": "style_id",
+ "KEYS": {
+ "style_name": [
+ "UNIQUE",
+ "style_name"
+ ]
+ }
+ },
+ "phpbb_teampage": {
+ "COLUMNS": {
+ "teampage_id": [
+ "UINT",
+ null,
+ "auto_increment"
+ ],
+ "group_id": [
+ "UINT",
+ 0
+ ],
+ "teampage_name": [
+ "VCHAR_UNI:255",
+ ""
+ ],
+ "teampage_position": [
+ "UINT",
+ 0
+ ],
+ "teampage_parent": [
+ "UINT",
+ 0
+ ]
+ },
+ "PRIMARY_KEY": "teampage_id"
+ },
+ "phpbb_topics": {
+ "COLUMNS": {
+ "topic_id": [
+ "UINT",
+ null,
+ "auto_increment"
+ ],
+ "forum_id": [
+ "UINT",
+ 0
+ ],
+ "icon_id": [
+ "UINT",
+ 0
+ ],
+ "topic_attachment": [
+ "BOOL",
+ 0
+ ],
+ "topic_reported": [
+ "BOOL",
+ 0
+ ],
+ "topic_title": [
+ "STEXT_UNI",
+ "",
+ "true_sort"
+ ],
+ "topic_poster": [
+ "UINT",
+ 0
+ ],
+ "topic_time": [
+ "TIMESTAMP",
+ 0
+ ],
+ "topic_time_limit": [
+ "TIMESTAMP",
+ 0
+ ],
+ "topic_views": [
+ "UINT",
+ 0
+ ],
+ "topic_status": [
+ "TINT:3",
+ 0
+ ],
+ "topic_type": [
+ "TINT:3",
+ 0
+ ],
+ "topic_first_post_id": [
+ "UINT",
+ 0
+ ],
+ "topic_first_poster_name": [
+ "VCHAR_UNI",
+ ""
+ ],
+ "topic_first_poster_colour": [
+ "VCHAR:6",
+ ""
+ ],
+ "topic_last_post_id": [
+ "UINT",
+ 0
+ ],
+ "topic_last_poster_id": [
+ "UINT",
+ 0
+ ],
+ "topic_last_poster_name": [
+ "VCHAR_UNI",
+ ""
+ ],
+ "topic_last_poster_colour": [
+ "VCHAR:6",
+ ""
+ ],
+ "topic_last_post_subject": [
+ "STEXT_UNI",
+ ""
+ ],
+ "topic_last_post_time": [
+ "TIMESTAMP",
+ 0
+ ],
+ "topic_last_view_time": [
+ "TIMESTAMP",
+ 0
+ ],
+ "topic_moved_id": [
+ "UINT",
+ 0
+ ],
+ "topic_bumped": [
+ "BOOL",
+ 0
+ ],
+ "topic_bumper": [
+ "UINT",
+ 0
+ ],
+ "poll_title": [
+ "STEXT_UNI",
+ ""
+ ],
+ "poll_start": [
+ "TIMESTAMP",
+ 0
+ ],
+ "poll_length": [
+ "TIMESTAMP",
+ 0
+ ],
+ "poll_max_options": [
+ "TINT:4",
+ 1
+ ],
+ "poll_last_vote": [
+ "TIMESTAMP",
+ 0
+ ],
+ "poll_vote_change": [
+ "BOOL",
+ 0
+ ],
+ "topic_visibility": [
+ "TINT:3",
+ 0
+ ],
+ "topic_delete_time": [
+ "TIMESTAMP",
+ 0
+ ],
+ "topic_delete_reason": [
+ "STEXT_UNI",
+ ""
+ ],
+ "topic_delete_user": [
+ "UINT",
+ 0
+ ],
+ "topic_posts_approved": [
+ "UINT",
+ 0
+ ],
+ "topic_posts_unapproved": [
+ "UINT",
+ 0
+ ],
+ "topic_posts_softdeleted": [
+ "UINT",
+ 0
+ ]
+ },
+ "PRIMARY_KEY": "topic_id",
+ "KEYS": {
+ "forum_id": [
+ "INDEX",
+ "forum_id"
+ ],
+ "forum_id_type": [
+ "INDEX",
+ [
+ "forum_id",
+ "topic_type"
+ ]
+ ],
+ "last_post_time": [
+ "INDEX",
+ "topic_last_post_time"
+ ],
+ "fid_time_moved": [
+ "INDEX",
+ [
+ "forum_id",
+ "topic_last_post_time",
+ "topic_moved_id"
+ ]
+ ],
+ "topic_visibility": [
+ "INDEX",
+ [
+ "topic_visibility"
+ ]
+ ],
+ "forum_vis_last": [
+ "INDEX",
+ [
+ "forum_id",
+ "topic_visibility",
+ "topic_last_post_id"
+ ]
+ ]
+ }
+ },
+ "phpbb_topics_posted": {
+ "COLUMNS": {
+ "user_id": [
+ "UINT",
+ 0
+ ],
+ "topic_id": [
+ "UINT",
+ 0
+ ],
+ "topic_posted": [
+ "BOOL",
+ 0
+ ]
+ },
+ "PRIMARY_KEY": [
+ "user_id",
+ "topic_id"
+ ]
+ },
+ "phpbb_topics_track": {
+ "COLUMNS": {
+ "user_id": [
+ "UINT",
+ 0
+ ],
+ "topic_id": [
+ "UINT",
+ 0
+ ],
+ "forum_id": [
+ "UINT",
+ 0
+ ],
+ "mark_time": [
+ "TIMESTAMP",
+ 0
+ ]
+ },
+ "PRIMARY_KEY": [
+ "user_id",
+ "topic_id"
+ ],
+ "KEYS": {
+ "forum_id": [
+ "INDEX",
+ "forum_id"
+ ],
+ "topic_id": [
+ "INDEX",
+ [
+ "topic_id"
+ ]
+ ]
+ }
+ },
+ "phpbb_topics_watch": {
+ "COLUMNS": {
+ "topic_id": [
+ "UINT",
+ 0
+ ],
+ "user_id": [
+ "UINT",
+ 0
+ ],
+ "notify_status": [
+ "BOOL",
+ 0
+ ]
+ },
+ "KEYS": {
+ "topic_id": [
+ "INDEX",
+ "topic_id"
+ ],
+ "user_id": [
+ "INDEX",
+ "user_id"
+ ],
+ "notify_stat": [
+ "INDEX",
+ "notify_status"
+ ]
+ }
+ },
+ "phpbb_user_group": {
+ "COLUMNS": {
+ "group_id": [
+ "UINT",
+ 0
+ ],
+ "user_id": [
+ "UINT",
+ 0
+ ],
+ "group_leader": [
+ "BOOL",
+ 0
+ ],
+ "user_pending": [
+ "BOOL",
+ 1
+ ]
+ },
+ "KEYS": {
+ "group_id": [
+ "INDEX",
+ "group_id"
+ ],
+ "user_id": [
+ "INDEX",
+ "user_id"
+ ],
+ "group_leader": [
+ "INDEX",
+ "group_leader"
+ ]
+ }
+ },
+ "phpbb_user_notifications": {
+ "COLUMNS": {
+ "item_type": [
+ "VCHAR:255",
+ ""
+ ],
+ "item_id": [
+ "UINT",
+ 0
+ ],
+ "user_id": [
+ "UINT",
+ 0
+ ],
+ "method": [
+ "VCHAR:255",
+ ""
+ ],
+ "notify": [
+ "BOOL",
+ 1
+ ]
+ }
+ },
+ "phpbb_users": {
+ "COLUMNS": {
+ "user_id": [
+ "UINT",
+ null,
+ "auto_increment"
+ ],
+ "user_type": [
+ "TINT:2",
+ 0
+ ],
+ "group_id": [
+ "UINT",
+ 3
+ ],
+ "user_permissions": [
+ "MTEXT",
+ ""
+ ],
+ "user_perm_from": [
+ "UINT",
+ 0
+ ],
+ "user_ip": [
+ "VCHAR:40",
+ ""
+ ],
+ "user_regdate": [
+ "TIMESTAMP",
+ 0
+ ],
+ "username": [
+ "VCHAR_CI",
+ ""
+ ],
+ "username_clean": [
+ "VCHAR_CI",
+ ""
+ ],
+ "user_password": [
+ "VCHAR:255",
+ ""
+ ],
+ "user_passchg": [
+ "TIMESTAMP",
+ 0
+ ],
+ "user_pass_convert": [
+ "BOOL",
+ 0
+ ],
+ "user_email": [
+ "VCHAR_UNI:100",
+ ""
+ ],
+ "user_email_hash": [
+ "BINT",
+ 0
+ ],
+ "user_birthday": [
+ "VCHAR:10",
+ ""
+ ],
+ "user_lastvisit": [
+ "TIMESTAMP",
+ 0
+ ],
+ "user_lastmark": [
+ "TIMESTAMP",
+ 0
+ ],
+ "user_lastpost_time": [
+ "TIMESTAMP",
+ 0
+ ],
+ "user_lastpage": [
+ "VCHAR_UNI:200",
+ ""
+ ],
+ "user_last_confirm_key": [
+ "VCHAR:10",
+ ""
+ ],
+ "user_last_search": [
+ "TIMESTAMP",
+ 0
+ ],
+ "user_warnings": [
+ "TINT:4",
+ 0
+ ],
+ "user_last_warning": [
+ "TIMESTAMP",
+ 0
+ ],
+ "user_login_attempts": [
+ "TINT:4",
+ 0
+ ],
+ "user_inactive_reason": [
+ "TINT:2",
+ 0
+ ],
+ "user_inactive_time": [
+ "TIMESTAMP",
+ 0
+ ],
+ "user_posts": [
+ "UINT",
+ 0
+ ],
+ "user_lang": [
+ "VCHAR:30",
+ ""
+ ],
+ "user_timezone": [
+ "VCHAR:100",
+ ""
+ ],
+ "user_dateformat": [
+ "VCHAR_UNI:30",
+ "d M Y H:i"
+ ],
+ "user_style": [
+ "UINT",
+ 0
+ ],
+ "user_rank": [
+ "UINT",
+ 0
+ ],
+ "user_colour": [
+ "VCHAR:6",
+ ""
+ ],
+ "user_new_privmsg": [
+ "INT:4",
+ 0
+ ],
+ "user_unread_privmsg": [
+ "INT:4",
+ 0
+ ],
+ "user_last_privmsg": [
+ "TIMESTAMP",
+ 0
+ ],
+ "user_message_rules": [
+ "BOOL",
+ 0
+ ],
+ "user_full_folder": [
+ "INT:11",
+ -3
+ ],
+ "user_emailtime": [
+ "TIMESTAMP",
+ 0
+ ],
+ "user_topic_show_days": [
+ "USINT",
+ 0
+ ],
+ "user_topic_sortby_type": [
+ "VCHAR:1",
+ "t"
+ ],
+ "user_topic_sortby_dir": [
+ "VCHAR:1",
+ "d"
+ ],
+ "user_post_show_days": [
+ "USINT",
+ 0
+ ],
+ "user_post_sortby_type": [
+ "VCHAR:1",
+ "t"
+ ],
+ "user_post_sortby_dir": [
+ "VCHAR:1",
+ "a"
+ ],
+ "user_notify": [
+ "BOOL",
+ 0
+ ],
+ "user_notify_pm": [
+ "BOOL",
+ 1
+ ],
+ "user_notify_type": [
+ "TINT:4",
+ 0
+ ],
+ "user_allow_pm": [
+ "BOOL",
+ 1
+ ],
+ "user_allow_viewonline": [
+ "BOOL",
+ 1
+ ],
+ "user_allow_viewemail": [
+ "BOOL",
+ 1
+ ],
+ "user_allow_massemail": [
+ "BOOL",
+ 1
+ ],
+ "user_options": [
+ "UINT:11",
+ 230271
+ ],
+ "user_avatar": [
+ "VCHAR",
+ ""
+ ],
+ "user_avatar_type": [
+ "VCHAR:255",
+ ""
+ ],
+ "user_avatar_width": [
+ "USINT",
+ 0
+ ],
+ "user_avatar_height": [
+ "USINT",
+ 0
+ ],
+ "user_sig": [
+ "MTEXT_UNI",
+ ""
+ ],
+ "user_sig_bbcode_uid": [
+ "VCHAR:8",
+ ""
+ ],
+ "user_sig_bbcode_bitfield": [
+ "VCHAR:255",
+ ""
+ ],
+ "user_jabber": [
+ "VCHAR_UNI",
+ ""
+ ],
+ "user_actkey": [
+ "VCHAR:32",
+ ""
+ ],
+ "user_newpasswd": [
+ "VCHAR:255",
+ ""
+ ],
+ "user_form_salt": [
+ "VCHAR_UNI:32",
+ ""
+ ],
+ "user_new": [
+ "BOOL",
+ 1
+ ],
+ "user_reminded": [
+ "TINT:4",
+ 0
+ ],
+ "user_reminded_time": [
+ "TIMESTAMP",
+ 0
+ ]
+ },
+ "PRIMARY_KEY": "user_id",
+ "KEYS": {
+ "user_birthday": [
+ "INDEX",
+ "user_birthday"
+ ],
+ "user_email_hash": [
+ "INDEX",
+ "user_email_hash"
+ ],
+ "user_type": [
+ "INDEX",
+ "user_type"
+ ],
+ "username_clean": [
+ "UNIQUE",
+ "username_clean"
+ ]
+ }
+ },
+ "phpbb_warnings": {
+ "COLUMNS": {
+ "warning_id": [
+ "UINT",
+ null,
+ "auto_increment"
+ ],
+ "user_id": [
+ "UINT",
+ 0
+ ],
+ "post_id": [
+ "UINT",
+ 0
+ ],
+ "log_id": [
+ "UINT",
+ 0
+ ],
+ "warning_time": [
+ "TIMESTAMP",
+ 0
+ ]
+ },
+ "PRIMARY_KEY": "warning_id"
+ },
+ "phpbb_words": {
+ "COLUMNS": {
+ "word_id": [
+ "UINT",
+ null,
+ "auto_increment"
+ ],
+ "word": [
+ "VCHAR_UNI",
+ ""
+ ],
+ "replacement": [
+ "VCHAR_UNI",
+ ""
+ ]
+ },
+ "PRIMARY_KEY": "word_id"
+ },
+ "phpbb_zebra": {
+ "COLUMNS": {
+ "user_id": [
+ "UINT",
+ 0
+ ],
+ "zebra_id": [
+ "UINT",
+ 0
+ ],
+ "friend": [
+ "BOOL",
+ 0
+ ],
+ "foe": [
+ "BOOL",
+ 0
+ ]
+ },
+ "PRIMARY_KEY": [
+ "user_id",
+ "zebra_id"
+ ]
+ }
+} \ No newline at end of file
diff --git a/phpBB/install/schemas/schema_data.sql b/phpBB/install/schemas/schema_data.sql
index b266025c86..885093f1ed 100644
--- a/phpBB/install/schemas/schema_data.sql
+++ b/phpBB/install/schemas/schema_data.sql
@@ -9,6 +9,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('active_sessions',
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_attachments', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_autologin', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_avatar', '1');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_avatar_gravatar', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_avatar_local', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_avatar_remote', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_avatar_upload', '1');
@@ -16,7 +17,9 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_avatar_remot
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_bbcode', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_birthdays', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_bookmarks', '1');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_cdn', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_emailreuse', '0');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_password_reset', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_forum_notify', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_mass_pm', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_name_chars', 'USERNAME_CHARS_ANY');
@@ -37,6 +40,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_sig_pm', '1'
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_sig_smilies', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_smilies', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_topic_notify', '1');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('assets_version', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('attachment_quota', '52428800');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('auth_bbcode_pm', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('auth_flash_pm', '0');
@@ -54,12 +58,12 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('avatar_salt', 'php
INSERT INTO phpbb_config (config_name, config_value) VALUES ('board_contact', 'contact@yourdomain.tld');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('board_disable', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('board_disable_msg', '');
-INSERT INTO phpbb_config (config_name, config_value) VALUES ('board_dst', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('board_email', 'address@yourdomain.tld');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('board_email_form', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('board_email_sig', '{L_CONFIG_BOARD_EMAIL_SIG}');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('board_hide_emails', '1');
-INSERT INTO phpbb_config (config_name, config_value) VALUES ('board_timezone', '0');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('board_index_text', '');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('board_timezone', 'UTC');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('browser_check', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('bump_interval', '10');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('bump_type', 'd');
@@ -88,6 +92,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('dbms_version', '')
INSERT INTO phpbb_config (config_name, config_value) VALUES ('default_dateformat', 'D M d, Y g:i a');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('default_style', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('display_last_edited', '1');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('display_last_subject', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('display_order', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('edit_time', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('delete_time', '0');
@@ -97,6 +102,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('email_function_nam
INSERT INTO phpbb_config (config_name, config_value) VALUES ('email_max_chunk_size', '50');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('email_package_size', '20');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('enable_confirm', '1');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('enable_mod_rewrite', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('enable_pm_icons', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('enable_post_confirm', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('feed_enable', '1');
@@ -124,6 +130,11 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('fulltext_native_co
INSERT INTO phpbb_config (config_name, config_value) VALUES ('fulltext_native_load_upd', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('fulltext_native_max_chars', '14');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('fulltext_native_min_chars', '3');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('fulltext_postgres_max_word_len', '254');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('fulltext_postgres_min_word_len', '4');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('fulltext_postgres_ts_name', 'simple');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('fulltext_sphinx_indexer_mem_limit', '512');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('fulltext_sphinx_stopwords', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('gzip_compress', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('hot_threshold', '25');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('icons_path', 'images/icons');
@@ -155,17 +166,21 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('ldap_server', '');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('ldap_uid', '');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('ldap_user', '');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('ldap_user_filter', '');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('legend_sort_groupname', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('limit_load', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('limit_search_load', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_anon_lastread', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_birthdays', '1');
-INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_cpf_memberlist', '0');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_cpf_memberlist', '1');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_cpf_pm', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_cpf_viewprofile', '1');
-INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_cpf_viewtopic', '0');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_cpf_viewtopic', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_db_lastread', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_db_track', '1');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_jquery_url', '//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_jumpbox', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_moderators', '1');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_notifications', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_online', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_online_guests', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_online_time', '5');
@@ -207,6 +222,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('new_member_post_li
INSERT INTO phpbb_config (config_name, config_value) VALUES ('new_member_group_default', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('override_user_style', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('pass_complex', 'PASS_TYPE_ANY');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('plupload_salt', 'phpbb_plupload');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('pm_edit_time', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('pm_max_boxes', '4');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('pm_max_msgs', '50');
@@ -215,6 +231,8 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('posts_per_page', '
INSERT INTO phpbb_config (config_name, config_value) VALUES ('print_pm', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('queue_interval', '60');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('ranks_path', 'images/ranks');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('read_notification_expire_days', '30');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('read_notification_gc', '86400');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('require_activation', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('referer_validation', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('script_path', '');
@@ -222,7 +240,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('search_block_size'
INSERT INTO phpbb_config (config_name, config_value) VALUES ('search_gc', '7200');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('search_interval', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('search_anonymous_interval', '0');
-INSERT INTO phpbb_config (config_name, config_value) VALUES ('search_type', 'fulltext_native');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('search_type', '\phpbb\search\fulltext_native');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('search_store_results', '1800');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('secure_allow_deny', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('secure_allow_empty_referer', '1');
@@ -233,6 +251,8 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('server_protocol',
INSERT INTO phpbb_config (config_name, config_value) VALUES ('session_gc', '3600');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('session_length', '3600');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('site_desc', '{L_CONFIG_SITE_DESC}');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('site_home_url', '');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('site_home_text', '');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('sitename', '{L_CONFIG_SITENAME}');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('smilies_path', 'images/smilies');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('smilies_per_page', '50');
@@ -242,11 +262,14 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('smtp_host', '');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('smtp_password', '');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('smtp_port', '25');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('smtp_username', '');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('teampage_memberships', '1');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('teampage_forums', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('topics_per_page', '25');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('tpl_allow_php', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('upload_icons_path', 'images/upload_icons');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('upload_path', 'files');
-INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '3.0.13-dev');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('use_system_cron', '0');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '3.1.0-b2-dev');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('warnings_expire_days', '90');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('warnings_gc', '14400');
@@ -261,8 +284,10 @@ INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('num_fi
INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('num_posts', '1', 1);
INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('num_topics', '1', 1);
INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('num_users', '1', 1);
+INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('plupload_last_gc', '0', 1);
INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('rand_seed', '0', 1);
INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('rand_seed_last_update', '0', 1);
+INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('read_notification_last_gc', '0', 1);
INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('record_online_date', '0', 1);
INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('record_online_users', '0', 1);
INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('search_indexing_state', '', 1);
@@ -302,6 +327,7 @@ INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_subscribe', 1);
INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_user_lock', 1);
INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_vote', 1);
INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_votechg', 1);
+INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_softdelete', 1);
# -- Moderator related auth options
INSERT INTO phpbb_acl_options (auth_option, is_local, is_global) VALUES ('m_', 1, 1);
@@ -315,6 +341,7 @@ INSERT INTO phpbb_acl_options (auth_option, is_local, is_global) VALUES ('m_merg
INSERT INTO phpbb_acl_options (auth_option, is_local, is_global) VALUES ('m_move', 1, 1);
INSERT INTO phpbb_acl_options (auth_option, is_local, is_global) VALUES ('m_report', 1, 1);
INSERT INTO phpbb_acl_options (auth_option, is_local, is_global) VALUES ('m_split', 1, 1);
+INSERT INTO phpbb_acl_options (auth_option, is_local, is_global) VALUES ('m_softdelete', 1, 1);
# -- Global moderator auth option (not a local option)
INSERT INTO phpbb_acl_options (auth_option, is_local, is_global) VALUES ('m_ban', 0, 1);
@@ -333,6 +360,7 @@ INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('a_board', 1);
INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('a_bots', 1);
INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('a_clearlogs', 1);
INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('a_email', 1);
+INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('a_extensions', 1);
INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('a_fauth', 1);
INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('a_forum', 1);
INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('a_forumadd', 1);
@@ -372,6 +400,7 @@ INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_chgemail', 1);
INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_chggrp', 1);
INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_chgname', 1);
INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_chgpasswd', 1);
+INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_chgprofileinfo', 1);
INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_download', 1);
INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_hideonline', 1);
INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_ignoreflood', 1);
@@ -430,107 +459,32 @@ INSERT INTO phpbb_acl_roles (role_name, role_description, role_type, role_order)
INSERT INTO phpbb_acl_roles (role_name, role_description, role_type, role_order) VALUES ('ROLE_FORUM_NEW_MEMBER', 'ROLE_DESCRIPTION_FORUM_NEW_MEMBER', 'f_', 10);
# -- phpbb_styles
-INSERT INTO phpbb_styles (style_name, style_copyright, style_active, template_id, theme_id, imageset_id) VALUES ('prosilver', '&copy; phpBB Group', 1, 1, 1, 1);
-
-# -- phpbb_styles_imageset
-INSERT INTO phpbb_styles_imageset (imageset_name, imageset_copyright, imageset_path) VALUES ('prosilver', '&copy; phpBB Group', 'prosilver');
-
-# -- phpbb_styles_imageset_data
-INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('site_logo', 'site_logo.gif', '', 52, 139, 1);
-INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('forum_link', 'forum_link.gif', '', 27, 27, 1);
-INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('forum_read', 'forum_read.gif', '', 27, 27, 1);
-INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('forum_read_locked', 'forum_read_locked.gif', '', 27, 27, 1);
-INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('forum_read_subforum', 'forum_read_subforum.gif', '', 27, 27, 1);
-INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('forum_unread', 'forum_unread.gif', '', 27, 27, 1);
-INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('forum_unread_locked', 'forum_unread_locked.gif', '', 27, 27, 1);
-INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('forum_unread_subforum', 'forum_unread_subforum.gif', '', 27, 27, 1);
-INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('topic_moved', 'topic_moved.gif', '', 27, 27, 1);
-INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('topic_read', 'topic_read.gif', '', 27, 27, 1);
-INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('topic_read_mine', 'topic_read_mine.gif', '', 27, 27, 1);
-INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('topic_read_hot', 'topic_read_hot.gif', '', 27, 27, 1);
-INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('topic_read_hot_mine', 'topic_read_hot_mine.gif', '', 27, 27, 1);
-INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('topic_read_locked', 'topic_read_locked.gif', '', 27, 27, 1);
-INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('topic_read_locked_mine', 'topic_read_locked_mine.gif', '', 27, 27, 1);
-INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('topic_unread', 'topic_unread.gif', '', 27, 27, 1);
-INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('topic_unread_mine', 'topic_unread_mine.gif', '', 27, 27, 1);
-INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('topic_unread_hot', 'topic_unread_hot.gif', '', 27, 27, 1);
-INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('topic_unread_hot_mine', 'topic_unread_hot_mine.gif', '', 27, 27, 1);
-INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('topic_unread_locked', 'topic_unread_locked.gif', '', 27, 27, 1);
-INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('topic_unread_locked_mine', 'topic_unread_locked_mine.gif', '', 27, 27, 1);
-INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('sticky_read', 'sticky_read.gif', '', 27, 27, 1);
-INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('sticky_read_mine', 'sticky_read_mine.gif', '', 27, 27, 1);
-INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('sticky_read_locked', 'sticky_read_locked.gif', '', 27, 27, 1);
-INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('sticky_read_locked_mine', 'sticky_read_locked_mine.gif', '', 27, 27, 1);
-INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('sticky_unread', 'sticky_unread.gif', '', 27, 27, 1);
-INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('sticky_unread_mine', 'sticky_unread_mine.gif', '', 27, 27, 1);
-INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('sticky_unread_locked', 'sticky_unread_locked.gif', '', 27, 27, 1);
-INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('sticky_unread_locked_mine', 'sticky_unread_locked_mine.gif', '', 27, 27, 1);
-INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('announce_read', 'announce_read.gif', '', 27, 27, 1);
-INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('announce_read_mine', 'announce_read_mine.gif', '', 27, 27, 1);
-INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('announce_read_locked', 'announce_read_locked.gif', '', 27, 27, 1);
-INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('announce_read_locked_mine', 'announce_read_locked_mine.gif', '', 27, 27, 1);
-INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('announce_unread', 'announce_unread.gif', '', 27, 27, 1);
-INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('announce_unread_mine', 'announce_unread_mine.gif', '', 27, 27, 1);
-INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('announce_unread_locked', 'announce_unread_locked.gif', '', 27, 27, 1);
-INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('announce_unread_locked_mine', 'announce_unread_locked_mine.gif', '', 27, 27, 1);
-INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('global_read', 'announce_read.gif', '', 27, 27, 1);
-INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('global_read_mine', 'announce_read_mine.gif', '', 27, 27, 1);
-INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('global_read_locked', 'announce_read_locked.gif', '', 27, 27, 1);
-INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('global_read_locked_mine', 'announce_read_locked_mine.gif', '', 27, 27, 1);
-INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('global_unread', 'announce_unread.gif', '', 27, 27, 1);
-INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('global_unread_mine', 'announce_unread_mine.gif', '', 27, 27, 1);
-INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('global_unread_locked', 'announce_unread_locked.gif', '', 27, 27, 1);
-INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('global_unread_locked_mine', 'announce_unread_locked_mine.gif', '', 27, 27, 1);
-INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('pm_read', 'topic_read.gif', '', 27, 27, 1);
-INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('pm_unread', 'topic_unread.gif', '', 27, 27, 1);
-INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_back_top', 'icon_back_top.gif', '', 11, 11, 1);
-INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_contact_aim', 'icon_contact_aim.gif', '', 20, 20, 1);
-INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_contact_email', 'icon_contact_email.gif', '', 20, 20, 1);
-INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_contact_icq', 'icon_contact_icq.gif', '', 20, 20, 1);
-INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_contact_jabber', 'icon_contact_jabber.gif', '', 20, 20, 1);
-INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_contact_msnm', 'icon_contact_msnm.gif', '', 20, 20, 1);
-INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_contact_www', 'icon_contact_www.gif', '', 20, 20, 1);
-INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_contact_yahoo', 'icon_contact_yahoo.gif', '', 20, 20, 1);
-INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_post_delete', 'icon_post_delete.gif', '', 20, 20, 1);
-INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_post_info', 'icon_post_info.gif', '', 20, 20, 1);
-INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_post_report', 'icon_post_report.gif', '', 20, 20, 1);
-INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_post_target', 'icon_post_target.gif', '', 9, 11, 1);
-INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_post_target_unread', 'icon_post_target_unread.gif', '', 9, 11, 1);
-INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_topic_attach', 'icon_topic_attach.gif', '', 10, 7, 1);
-INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_topic_latest', 'icon_topic_latest.gif', '', 9, 11, 1);
-INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_topic_newest', 'icon_topic_newest.gif', '', 9, 11, 1);
-INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_topic_reported', 'icon_topic_reported.gif', '', 14, 16, 1);
-INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_topic_unapproved', 'icon_topic_unapproved.gif', '', 14, 16, 1);
-INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('icon_user_warn', 'icon_user_warn.gif', '', 20, 20, 1);
-INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('subforum_read', 'subforum_read.gif', '', 9, 11, 1);
-INSERT INTO phpbb_styles_imageset_data (image_name, image_filename, image_lang, image_height, image_width, imageset_id) VALUES ('subforum_unread', 'subforum_unread.gif', '', 9, 11, 1);
-
-# -- phpbb_styles_template
-INSERT INTO phpbb_styles_template (template_name, template_copyright, template_path, bbcode_bitfield, template_storedb) VALUES ('prosilver', '&copy; phpBB Group', 'prosilver', 'lNg=', 0);
-
-# -- phpbb_styles_theme
-INSERT INTO phpbb_styles_theme (theme_name, theme_copyright, theme_path, theme_storedb, theme_data) VALUES ('prosilver', '&copy; phpBB Group', 'prosilver', 1, '');
+INSERT INTO phpbb_styles (style_name, style_copyright, style_active, style_path, bbcode_bitfield, style_parent_id, style_parent_tree) VALUES ('prosilver', '&copy; phpBB Group', 1, 'prosilver', 'kNg=', 0, '');
# -- Forums
-INSERT INTO phpbb_forums (forum_name, forum_desc, left_id, right_id, parent_id, forum_type, forum_posts, forum_topics, forum_topics_real, forum_last_post_id, forum_last_poster_id, forum_last_poster_name, forum_last_poster_colour, forum_last_post_time, forum_link, forum_password, forum_image, forum_rules, forum_rules_link, forum_rules_uid, forum_desc_uid, prune_days, prune_viewed, forum_parents) VALUES ('{L_FORUMS_FIRST_CATEGORY}', '', 1, 4, 0, 0, 1, 1, 1, 1, 2, 'Admin', 'AA0000', 972086460, '', '', '', '', '', '', '', 0, 0, '');
+INSERT INTO phpbb_forums (forum_name, forum_desc, left_id, right_id, parent_id, forum_type, forum_posts_approved, forum_posts_unapproved, forum_posts_softdeleted, forum_topics_approved, forum_topics_unapproved, forum_topics_softdeleted, forum_last_post_id, forum_last_poster_id, forum_last_poster_name, forum_last_poster_colour, forum_last_post_time, forum_link, forum_password, forum_image, forum_rules, forum_rules_link, forum_rules_uid, forum_desc_uid, prune_days, prune_viewed, forum_parents) VALUES ('{L_FORUMS_FIRST_CATEGORY}', '', 1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 'Admin', 'AA0000', 972086460, '', '', '', '', '', '', '', 0, 0, '');
-INSERT INTO phpbb_forums (forum_name, forum_desc, left_id, right_id, parent_id, forum_type, forum_posts, forum_topics, forum_topics_real, forum_last_post_id, forum_last_poster_id, forum_last_poster_name, forum_last_poster_colour, forum_last_post_subject, forum_last_post_time, forum_link, forum_password, forum_image, forum_rules, forum_rules_link, forum_rules_uid, forum_desc_uid, prune_days, prune_viewed, forum_parents, forum_flags) VALUES ('{L_FORUMS_TEST_FORUM_TITLE}', '{L_FORUMS_TEST_FORUM_DESC}', 2, 3, 1, 1, 1, 1, 1, 1, 2, 'Admin', 'AA0000', '{L_TOPICS_TOPIC_TITLE}', 972086460, '', '', '', '', '', '', '', 0, 0, '', 48);
+INSERT INTO phpbb_forums (forum_name, forum_desc, left_id, right_id, parent_id, forum_type, forum_posts_approved, forum_posts_unapproved, forum_posts_softdeleted, forum_topics_approved, forum_topics_unapproved, forum_topics_softdeleted, forum_last_post_id, forum_last_poster_id, forum_last_poster_name, forum_last_poster_colour, forum_last_post_subject, forum_last_post_time, forum_link, forum_password, forum_image, forum_rules, forum_rules_link, forum_rules_uid, forum_desc_uid, prune_days, prune_viewed, forum_parents, forum_flags) VALUES ('{L_FORUMS_TEST_FORUM_TITLE}', '{L_FORUMS_TEST_FORUM_DESC}', 2, 3, 1, 1, 1, 0, 0, 1, 0, 0, 1, 2, 'Admin', 'AA0000', '{L_TOPICS_TOPIC_TITLE}', 972086460, '', '', '', '', '', '', '', 0, 0, '', 48);
# -- Users / Anonymous user
-INSERT INTO phpbb_users (user_type, group_id, username, username_clean, user_regdate, user_password, user_email, user_lang, user_style, user_rank, user_colour, user_posts, user_permissions, user_ip, user_birthday, user_lastpage, user_last_confirm_key, user_post_sortby_type, user_post_sortby_dir, user_topic_sortby_type, user_topic_sortby_dir, user_avatar, user_sig, user_sig_bbcode_uid, user_from, user_icq, user_aim, user_yim, user_msnm, user_jabber, user_website, user_occ, user_interests, user_actkey, user_newpasswd, user_allow_massemail) VALUES (2, 1, 'Anonymous', 'anonymous', 0, '', '', 'en', 1, 0, '', 0, '', '', '', '', '', 't', 'a', 't', 'd', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 0);
+INSERT INTO phpbb_users (user_type, group_id, username, username_clean, user_regdate, user_password, user_email, user_lang, user_style, user_rank, user_colour, user_posts, user_permissions, user_ip, user_birthday, user_lastpage, user_last_confirm_key, user_post_sortby_type, user_post_sortby_dir, user_topic_sortby_type, user_topic_sortby_dir, user_avatar, user_sig, user_sig_bbcode_uid, user_jabber, user_actkey, user_newpasswd, user_allow_massemail) VALUES (2, 1, 'Anonymous', 'anonymous', 0, '', '', 'en', 1, 0, '', 0, '', '', '', '', '', 't', 'a', 't', 'd', '', '', '', '', '', '', 0);
# -- username: Admin password: admin (change this or remove it once everything is working!)
-INSERT INTO phpbb_users (user_type, group_id, username, username_clean, user_regdate, user_password, user_email, user_lang, user_style, user_rank, user_colour, user_posts, user_permissions, user_ip, user_birthday, user_lastpage, user_last_confirm_key, user_post_sortby_type, user_post_sortby_dir, user_topic_sortby_type, user_topic_sortby_dir, user_avatar, user_sig, user_sig_bbcode_uid, user_from, user_icq, user_aim, user_yim, user_msnm, user_jabber, user_website, user_occ, user_interests, user_actkey, user_newpasswd) VALUES (3, 5, 'Admin', 'admin', 0, '21232f297a57a5a743894a0e4a801fc3', 'admin@yourdomain.com', 'en', 1, 1, 'AA0000', 1, '', '', '', '', '', 't', 'a', 't', 'd', '', '', '', '', '', '', '', '', '', '', '', '', '', '');
+INSERT INTO phpbb_users (user_type, group_id, username, username_clean, user_regdate, user_password, user_email, user_lang, user_style, user_rank, user_colour, user_posts, user_permissions, user_ip, user_birthday, user_lastpage, user_last_confirm_key, user_post_sortby_type, user_post_sortby_dir, user_topic_sortby_type, user_topic_sortby_dir, user_avatar, user_sig, user_sig_bbcode_uid, user_jabber, user_actkey, user_newpasswd) VALUES (3, 5, 'Admin', 'admin', 0, '21232f297a57a5a743894a0e4a801fc3', 'admin@yourdomain.com', 'en', 1, 1, 'AA0000', 1, '', '', '', '', '', 't', 'a', 't', 'd', '', '', '', '', '', '');
# -- Groups
INSERT INTO phpbb_groups (group_name, group_type, group_founder_manage, group_colour, group_legend, group_avatar, group_desc, group_desc_uid, group_max_recipients) VALUES ('GUESTS', 3, 0, '', 0, '', '', '', 5);
INSERT INTO phpbb_groups (group_name, group_type, group_founder_manage, group_colour, group_legend, group_avatar, group_desc, group_desc_uid, group_max_recipients) VALUES ('REGISTERED', 3, 0, '', 0, '', '', '', 5);
INSERT INTO phpbb_groups (group_name, group_type, group_founder_manage, group_colour, group_legend, group_avatar, group_desc, group_desc_uid, group_max_recipients) VALUES ('REGISTERED_COPPA', 3, 0, '', 0, '', '', '', 5);
-INSERT INTO phpbb_groups (group_name, group_type, group_founder_manage, group_colour, group_legend, group_avatar, group_desc, group_desc_uid, group_max_recipients) VALUES ('GLOBAL_MODERATORS', 3, 0, '00AA00', 1, '', '', '', 0);
+INSERT INTO phpbb_groups (group_name, group_type, group_founder_manage, group_colour, group_legend, group_avatar, group_desc, group_desc_uid, group_max_recipients) VALUES ('GLOBAL_MODERATORS', 3, 0, '00AA00', 2, '', '', '', 0);
INSERT INTO phpbb_groups (group_name, group_type, group_founder_manage, group_colour, group_legend, group_avatar, group_desc, group_desc_uid, group_max_recipients) VALUES ('ADMINISTRATORS', 3, 1, 'AA0000', 1, '', '', '', 0);
INSERT INTO phpbb_groups (group_name, group_type, group_founder_manage, group_colour, group_legend, group_avatar, group_desc, group_desc_uid, group_max_recipients) VALUES ('BOTS', 3, 0, '9E8DA7', 0, '', '', '', 5);
INSERT INTO phpbb_groups (group_name, group_type, group_founder_manage, group_colour, group_legend, group_avatar, group_desc, group_desc_uid, group_max_recipients) VALUES ('NEWLY_REGISTERED', 3, 0, '', 0, '', '', '', 5);
+# -- Teampage
+INSERT INTO phpbb_teampage (group_id, teampage_name, teampage_position, teampage_parent) VALUES (5, '', 1, 0);
+INSERT INTO phpbb_teampage (group_id, teampage_name, teampage_position, teampage_parent) VALUES (4, '', 2, 0);
+
# -- User -> Group
INSERT INTO phpbb_user_group (group_id, user_id, user_pending, group_leader) VALUES (1, 1, 0, 0);
INSERT INTO phpbb_user_group (group_id, user_id, user_pending, group_leader) VALUES (2, 2, 0, 0);
@@ -578,7 +532,7 @@ INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT
INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 11, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'm_%' AND auth_option NOT IN ('m_ban', 'm_chgposter');
# Simple Moderator (m_)
-INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 12, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'm_%' AND auth_option IN ('m_', 'm_delete', 'm_edit', 'm_info', 'm_report');
+INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 12, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'm_%' AND auth_option IN ('m_', 'm_delete', 'm_softdelete', 'm_edit', 'm_info', 'm_report');
# Queue Moderator (m_)
INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 13, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'm_%' AND auth_option IN ('m_', 'm_approve', 'm_edit');
@@ -612,7 +566,7 @@ INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT
INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 22, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'f_%' AND auth_option NOT IN ('f_announce', 'f_attach', 'f_bump', 'f_delete', 'f_flash', 'f_icons', 'f_ignoreflood', 'f_sticky', 'f_user_lock', 'f_votechg');
# New Member (u_)
-INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 23, auth_option_id, 0 FROM phpbb_acl_options WHERE auth_option LIKE 'u_%' AND auth_option IN ('u_sendpm', 'u_masspm', 'u_masspm_group');
+INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 23, auth_option_id, 0 FROM phpbb_acl_options WHERE auth_option LIKE 'u_%' AND auth_option IN ('u_sendpm', 'u_masspm', 'u_masspm_group', 'u_chgprofileinfo');
# New Member (f_)
INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 24, auth_option_id, 0 FROM phpbb_acl_options WHERE auth_option LIKE 'f_%' AND auth_option IN ('f_noapprove');
@@ -676,10 +630,10 @@ INSERT INTO phpbb_acl_groups (group_id, forum_id, auth_option_id, auth_role_id,
# -- Demo Topic
-INSERT INTO phpbb_topics (topic_title, topic_poster, topic_time, topic_views, topic_replies, topic_replies_real, forum_id, topic_status, topic_type, topic_first_post_id, topic_first_poster_name, topic_first_poster_colour, topic_last_post_id, topic_last_poster_id, topic_last_poster_name, topic_last_poster_colour, topic_last_post_subject, topic_last_post_time, topic_last_view_time, poll_title) VALUES ('{L_TOPICS_TOPIC_TITLE}', 2, 972086460, 0, 0, 0, 2, 0, 0, 1, 'Admin', 'AA0000', 1, 2, 'Admin', 'AA0000', '{L_TOPICS_TOPIC_TITLE}', 972086460, 972086460, '');
+INSERT INTO phpbb_topics (topic_title, topic_poster, topic_time, topic_views, topic_posts_approved, topic_posts_unapproved, topic_posts_softdeleted, forum_id, topic_status, topic_type, topic_first_post_id, topic_first_poster_name, topic_first_poster_colour, topic_last_post_id, topic_last_poster_id, topic_last_poster_name, topic_last_poster_colour, topic_last_post_subject, topic_last_post_time, topic_last_view_time, poll_title, topic_visibility) VALUES ('{L_TOPICS_TOPIC_TITLE}', 2, 972086460, 0, 1, 0, 0, 2, 0, 0, 1, 'Admin', 'AA0000', 1, 2, 'Admin', 'AA0000', '{L_TOPICS_TOPIC_TITLE}', 972086460, 972086460, '', 1);
# -- Demo Post
-INSERT INTO phpbb_posts (topic_id, forum_id, poster_id, icon_id, post_time, post_username, poster_ip, post_subject, post_text, post_checksum, bbcode_uid) VALUES (1, 2, 2, 0, 972086460, '', '127.0.0.1', '{L_TOPICS_TOPIC_TITLE}', '{L_DEFAULT_INSTALL_POST}', '5dd683b17f641daf84c040bfefc58ce9', '');
+INSERT INTO phpbb_posts (topic_id, forum_id, poster_id, icon_id, post_time, post_username, poster_ip, post_subject, post_text, post_checksum, bbcode_uid, post_visibility) VALUES (1, 2, 2, 0, 972086460, '', '127.0.0.1', '{L_TOPICS_TOPIC_TITLE}', '{L_DEFAULT_INSTALL_POST}', '5dd683b17f641daf84c040bfefc58ce9', '', 1);
# -- Admin posted to the demo topic
INSERT INTO phpbb_topics_posted (user_id, topic_id, topic_posted) VALUES (2, 1, 1);
@@ -833,4 +787,20 @@ INSERT INTO phpbb_extensions (group_id, extension) VALUES (9, 'mp3');
INSERT INTO phpbb_extensions (group_id, extension) VALUES (9, 'ogg');
INSERT INTO phpbb_extensions (group_id, extension) VALUES (9, 'ogm');
+# Add default profile fields
+INSERT INTO phpbb_profile_fields (field_name, field_type, field_ident, field_length, field_minlen, field_maxlen, field_novalue, field_default_value, field_validation, field_required, field_show_novalue, field_show_on_reg, field_show_on_pm, field_show_on_vt, field_show_on_ml, field_show_profile, field_hide, field_no_view, field_active, field_order, field_is_contact, field_contact_desc, field_contact_url) VALUES ('phpbb_location', 'profilefields.type.string', 'phpbb_location', '20', '2', '100', '', '', '.*', 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 0, '', '');
+INSERT INTO phpbb_profile_fields (field_name, field_type, field_ident, field_length, field_minlen, field_maxlen, field_novalue, field_default_value, field_validation, field_required, field_show_novalue, field_show_on_reg, field_show_on_pm, field_show_on_vt, field_show_on_ml, field_show_profile, field_hide, field_no_view, field_active, field_order, field_is_contact, field_contact_desc, field_contact_url) VALUES ('phpbb_website', 'profilefields.type.url', 'phpbb_website', '40', '12', '255', '', '', '', 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 2, 1, 'VISIT_WEBSITE', '%s');
+INSERT INTO phpbb_profile_fields (field_name, field_type, field_ident, field_length, field_minlen, field_maxlen, field_novalue, field_default_value, field_validation, field_required, field_show_novalue, field_show_on_reg, field_show_on_pm, field_show_on_vt, field_show_on_ml, field_show_profile, field_hide, field_no_view, field_active, field_order, field_is_contact, field_contact_desc, field_contact_url) VALUES ('phpbb_interests', 'profilefields.type.text', 'phpbb_interests', '3|30', '2', '500', '', '', '.*', 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 3, 0, '', '');
+INSERT INTO phpbb_profile_fields (field_name, field_type, field_ident, field_length, field_minlen, field_maxlen, field_novalue, field_default_value, field_validation, field_required, field_show_novalue, field_show_on_reg, field_show_on_pm, field_show_on_vt, field_show_on_ml, field_show_profile, field_hide, field_no_view, field_active, field_order, field_is_contact, field_contact_desc, field_contact_url) VALUES ('phpbb_occupation', 'profilefields.type.text', 'phpbb_occupation', '3|30', '2', '500', '', '', '.*', 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 4, 0, '', '');
+INSERT INTO phpbb_profile_fields (field_name, field_type, field_ident, field_length, field_minlen, field_maxlen, field_novalue, field_default_value, field_validation, field_required, field_show_novalue, field_show_on_reg, field_show_on_pm, field_show_on_vt, field_show_on_ml, field_show_profile, field_hide, field_no_view, field_active, field_order, field_is_contact, field_contact_desc, field_contact_url) VALUES ('phpbb_aol', 'profilefields.type.string', 'phpbb_aol', '40', '5', '255', '', '', '.*', 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 5, 1, '', '');
+INSERT INTO phpbb_profile_fields (field_name, field_type, field_ident, field_length, field_minlen, field_maxlen, field_novalue, field_default_value, field_validation, field_required, field_show_novalue, field_show_on_reg, field_show_on_pm, field_show_on_vt, field_show_on_ml, field_show_profile, field_hide, field_no_view, field_active, field_order, field_is_contact, field_contact_desc, field_contact_url) VALUES ('phpbb_icq', 'profilefields.type.string', 'phpbb_icq', '20', '3', '15', '', '', '[0-9]+', 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 6, 1, 'SEND_ICQ_MESSAGE', 'https://www.icq.com/people/%s/');
+INSERT INTO phpbb_profile_fields (field_name, field_type, field_ident, field_length, field_minlen, field_maxlen, field_novalue, field_default_value, field_validation, field_required, field_show_novalue, field_show_on_reg, field_show_on_pm, field_show_on_vt, field_show_on_ml, field_show_profile, field_hide, field_no_view, field_active, field_order, field_is_contact, field_contact_desc, field_contact_url) VALUES ('phpbb_wlm', 'profilefields.type.string', 'phpbb_wlm', '40', '5', '255', '', '', '.*', 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 7, 1, '', '');
+INSERT INTO phpbb_profile_fields (field_name, field_type, field_ident, field_length, field_minlen, field_maxlen, field_novalue, field_default_value, field_validation, field_required, field_show_novalue, field_show_on_reg, field_show_on_pm, field_show_on_vt, field_show_on_ml, field_show_profile, field_hide, field_no_view, field_active, field_order, field_is_contact, field_contact_desc, field_contact_url) VALUES ('phpbb_yahoo', 'profilefields.type.string', 'phpbb_yahoo', '40', '5', '255', '', '', '.*', 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 8, 1, 'SEND_YIM_MESSAGE', 'http://edit.yahoo.com/config/send_webmesg?.target=%s&amp;.src=pg');
+
+# User Notification Options (for first user)
+INSERT INTO phpbb_user_notifications (item_type, item_id, user_id, method) VALUES('post', 0, 2, '');
+INSERT INTO phpbb_user_notifications (item_type, item_id, user_id, method) VALUES('post', 0, 2, 'email');
+INSERT INTO phpbb_user_notifications (item_type, item_id, user_id, method) VALUES('topic', 0, 2, '');
+INSERT INTO phpbb_user_notifications (item_type, item_id, user_id, method) VALUES('topic', 0, 2, 'email');
+
# POSTGRES COMMIT #
diff --git a/phpBB/install/schemas/sqlite_schema.sql b/phpBB/install/schemas/sqlite_schema.sql
index be7faa4688..28649dc54c 100644
--- a/phpBB/install/schemas/sqlite_schema.sql
+++ b/phpBB/install/schemas/sqlite_schema.sql
@@ -3,1001 +3,3 @@
# To change the contents of this file, edit
# phpBB/develop/create_schema_files.php and
# run it.
-BEGIN TRANSACTION;
-
-# Table: 'phpbb_attachments'
-CREATE TABLE phpbb_attachments (
- attach_id INTEGER PRIMARY KEY NOT NULL ,
- post_msg_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
- topic_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
- in_message INTEGER UNSIGNED NOT NULL DEFAULT '0',
- poster_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
- is_orphan INTEGER UNSIGNED NOT NULL DEFAULT '1',
- physical_filename varchar(255) NOT NULL DEFAULT '',
- real_filename varchar(255) NOT NULL DEFAULT '',
- download_count INTEGER UNSIGNED NOT NULL DEFAULT '0',
- attach_comment text(65535) NOT NULL DEFAULT '',
- extension varchar(100) NOT NULL DEFAULT '',
- mimetype varchar(100) NOT NULL DEFAULT '',
- filesize INTEGER UNSIGNED NOT NULL DEFAULT '0',
- filetime INTEGER UNSIGNED NOT NULL DEFAULT '0',
- thumbnail INTEGER UNSIGNED NOT NULL DEFAULT '0'
-);
-
-CREATE INDEX phpbb_attachments_filetime ON phpbb_attachments (filetime);
-CREATE INDEX phpbb_attachments_post_msg_id ON phpbb_attachments (post_msg_id);
-CREATE INDEX phpbb_attachments_topic_id ON phpbb_attachments (topic_id);
-CREATE INDEX phpbb_attachments_poster_id ON phpbb_attachments (poster_id);
-CREATE INDEX phpbb_attachments_is_orphan ON phpbb_attachments (is_orphan);
-
-# Table: 'phpbb_acl_groups'
-CREATE TABLE phpbb_acl_groups (
- group_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
- forum_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
- auth_option_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
- auth_role_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
- auth_setting tinyint(2) NOT NULL DEFAULT '0'
-);
-
-CREATE INDEX phpbb_acl_groups_group_id ON phpbb_acl_groups (group_id);
-CREATE INDEX phpbb_acl_groups_auth_opt_id ON phpbb_acl_groups (auth_option_id);
-CREATE INDEX phpbb_acl_groups_auth_role_id ON phpbb_acl_groups (auth_role_id);
-
-# Table: 'phpbb_acl_options'
-CREATE TABLE phpbb_acl_options (
- auth_option_id INTEGER PRIMARY KEY NOT NULL ,
- auth_option varchar(50) NOT NULL DEFAULT '',
- is_global INTEGER UNSIGNED NOT NULL DEFAULT '0',
- is_local INTEGER UNSIGNED NOT NULL DEFAULT '0',
- founder_only INTEGER UNSIGNED NOT NULL DEFAULT '0'
-);
-
-CREATE UNIQUE INDEX phpbb_acl_options_auth_option ON phpbb_acl_options (auth_option);
-
-# Table: 'phpbb_acl_roles'
-CREATE TABLE phpbb_acl_roles (
- role_id INTEGER PRIMARY KEY NOT NULL ,
- role_name varchar(255) NOT NULL DEFAULT '',
- role_description text(65535) NOT NULL DEFAULT '',
- role_type varchar(10) NOT NULL DEFAULT '',
- role_order INTEGER UNSIGNED NOT NULL DEFAULT '0'
-);
-
-CREATE INDEX phpbb_acl_roles_role_type ON phpbb_acl_roles (role_type);
-CREATE INDEX phpbb_acl_roles_role_order ON phpbb_acl_roles (role_order);
-
-# Table: 'phpbb_acl_roles_data'
-CREATE TABLE phpbb_acl_roles_data (
- role_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
- auth_option_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
- auth_setting tinyint(2) NOT NULL DEFAULT '0',
- PRIMARY KEY (role_id, auth_option_id)
-);
-
-CREATE INDEX phpbb_acl_roles_data_ath_op_id ON phpbb_acl_roles_data (auth_option_id);
-
-# Table: 'phpbb_acl_users'
-CREATE TABLE phpbb_acl_users (
- user_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
- forum_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
- auth_option_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
- auth_role_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
- auth_setting tinyint(2) NOT NULL DEFAULT '0'
-);
-
-CREATE INDEX phpbb_acl_users_user_id ON phpbb_acl_users (user_id);
-CREATE INDEX phpbb_acl_users_auth_option_id ON phpbb_acl_users (auth_option_id);
-CREATE INDEX phpbb_acl_users_auth_role_id ON phpbb_acl_users (auth_role_id);
-
-# Table: 'phpbb_banlist'
-CREATE TABLE phpbb_banlist (
- ban_id INTEGER PRIMARY KEY NOT NULL ,
- ban_userid INTEGER UNSIGNED NOT NULL DEFAULT '0',
- ban_ip varchar(40) NOT NULL DEFAULT '',
- ban_email varchar(100) NOT NULL DEFAULT '',
- ban_start INTEGER UNSIGNED NOT NULL DEFAULT '0',
- ban_end INTEGER UNSIGNED NOT NULL DEFAULT '0',
- ban_exclude INTEGER UNSIGNED NOT NULL DEFAULT '0',
- ban_reason varchar(255) NOT NULL DEFAULT '',
- ban_give_reason varchar(255) NOT NULL DEFAULT ''
-);
-
-CREATE INDEX phpbb_banlist_ban_end ON phpbb_banlist (ban_end);
-CREATE INDEX phpbb_banlist_ban_user ON phpbb_banlist (ban_userid, ban_exclude);
-CREATE INDEX phpbb_banlist_ban_email ON phpbb_banlist (ban_email, ban_exclude);
-CREATE INDEX phpbb_banlist_ban_ip ON phpbb_banlist (ban_ip, ban_exclude);
-
-# Table: 'phpbb_bbcodes'
-CREATE TABLE phpbb_bbcodes (
- bbcode_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
- bbcode_tag varchar(16) NOT NULL DEFAULT '',
- bbcode_helpline varchar(255) NOT NULL DEFAULT '',
- display_on_posting INTEGER UNSIGNED NOT NULL DEFAULT '0',
- bbcode_match text(65535) NOT NULL DEFAULT '',
- bbcode_tpl mediumtext(16777215) NOT NULL DEFAULT '',
- first_pass_match mediumtext(16777215) NOT NULL DEFAULT '',
- first_pass_replace mediumtext(16777215) NOT NULL DEFAULT '',
- second_pass_match mediumtext(16777215) NOT NULL DEFAULT '',
- second_pass_replace mediumtext(16777215) NOT NULL DEFAULT '',
- PRIMARY KEY (bbcode_id)
-);
-
-CREATE INDEX phpbb_bbcodes_display_on_post ON phpbb_bbcodes (display_on_posting);
-
-# Table: 'phpbb_bookmarks'
-CREATE TABLE phpbb_bookmarks (
- topic_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
- user_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
- PRIMARY KEY (topic_id, user_id)
-);
-
-
-# Table: 'phpbb_bots'
-CREATE TABLE phpbb_bots (
- bot_id INTEGER PRIMARY KEY NOT NULL ,
- bot_active INTEGER UNSIGNED NOT NULL DEFAULT '1',
- bot_name text(65535) NOT NULL DEFAULT '',
- user_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
- bot_agent varchar(255) NOT NULL DEFAULT '',
- bot_ip varchar(255) NOT NULL DEFAULT ''
-);
-
-CREATE INDEX phpbb_bots_bot_active ON phpbb_bots (bot_active);
-
-# Table: 'phpbb_config'
-CREATE TABLE phpbb_config (
- config_name varchar(255) NOT NULL DEFAULT '',
- config_value varchar(255) NOT NULL DEFAULT '',
- is_dynamic INTEGER UNSIGNED NOT NULL DEFAULT '0',
- PRIMARY KEY (config_name)
-);
-
-CREATE INDEX phpbb_config_is_dynamic ON phpbb_config (is_dynamic);
-
-# Table: 'phpbb_confirm'
-CREATE TABLE phpbb_confirm (
- confirm_id char(32) NOT NULL DEFAULT '',
- session_id char(32) NOT NULL DEFAULT '',
- confirm_type tinyint(3) NOT NULL DEFAULT '0',
- code varchar(8) NOT NULL DEFAULT '',
- seed INTEGER UNSIGNED NOT NULL DEFAULT '0',
- attempts INTEGER UNSIGNED NOT NULL DEFAULT '0',
- PRIMARY KEY (session_id, confirm_id)
-);
-
-CREATE INDEX phpbb_confirm_confirm_type ON phpbb_confirm (confirm_type);
-
-# Table: 'phpbb_disallow'
-CREATE TABLE phpbb_disallow (
- disallow_id INTEGER PRIMARY KEY NOT NULL ,
- disallow_username varchar(255) NOT NULL DEFAULT ''
-);
-
-
-# Table: 'phpbb_drafts'
-CREATE TABLE phpbb_drafts (
- draft_id INTEGER PRIMARY KEY NOT NULL ,
- user_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
- topic_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
- forum_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
- save_time INTEGER UNSIGNED NOT NULL DEFAULT '0',
- draft_subject text(65535) NOT NULL DEFAULT '',
- draft_message mediumtext(16777215) NOT NULL DEFAULT ''
-);
-
-CREATE INDEX phpbb_drafts_save_time ON phpbb_drafts (save_time);
-
-# Table: 'phpbb_extensions'
-CREATE TABLE phpbb_extensions (
- extension_id INTEGER PRIMARY KEY NOT NULL ,
- group_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
- extension varchar(100) NOT NULL DEFAULT ''
-);
-
-
-# Table: 'phpbb_extension_groups'
-CREATE TABLE phpbb_extension_groups (
- group_id INTEGER PRIMARY KEY NOT NULL ,
- group_name varchar(255) NOT NULL DEFAULT '',
- cat_id tinyint(2) NOT NULL DEFAULT '0',
- allow_group INTEGER UNSIGNED NOT NULL DEFAULT '0',
- download_mode INTEGER UNSIGNED NOT NULL DEFAULT '1',
- upload_icon varchar(255) NOT NULL DEFAULT '',
- max_filesize INTEGER UNSIGNED NOT NULL DEFAULT '0',
- allowed_forums text(65535) NOT NULL DEFAULT '',
- allow_in_pm INTEGER UNSIGNED NOT NULL DEFAULT '0'
-);
-
-
-# Table: 'phpbb_forums'
-CREATE TABLE phpbb_forums (
- forum_id INTEGER PRIMARY KEY NOT NULL ,
- parent_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
- left_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
- right_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
- forum_parents mediumtext(16777215) NOT NULL DEFAULT '',
- forum_name text(65535) NOT NULL DEFAULT '',
- forum_desc text(65535) NOT NULL DEFAULT '',
- forum_desc_bitfield varchar(255) NOT NULL DEFAULT '',
- forum_desc_options INTEGER UNSIGNED NOT NULL DEFAULT '7',
- forum_desc_uid varchar(8) NOT NULL DEFAULT '',
- forum_link varchar(255) NOT NULL DEFAULT '',
- forum_password varchar(40) NOT NULL DEFAULT '',
- forum_style INTEGER UNSIGNED NOT NULL DEFAULT '0',
- forum_image varchar(255) NOT NULL DEFAULT '',
- forum_rules text(65535) NOT NULL DEFAULT '',
- forum_rules_link varchar(255) NOT NULL DEFAULT '',
- forum_rules_bitfield varchar(255) NOT NULL DEFAULT '',
- forum_rules_options INTEGER UNSIGNED NOT NULL DEFAULT '7',
- forum_rules_uid varchar(8) NOT NULL DEFAULT '',
- forum_topics_per_page tinyint(4) NOT NULL DEFAULT '0',
- forum_type tinyint(4) NOT NULL DEFAULT '0',
- forum_status tinyint(4) NOT NULL DEFAULT '0',
- forum_posts INTEGER UNSIGNED NOT NULL DEFAULT '0',
- forum_topics INTEGER UNSIGNED NOT NULL DEFAULT '0',
- forum_topics_real INTEGER UNSIGNED NOT NULL DEFAULT '0',
- forum_last_post_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
- forum_last_poster_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
- forum_last_post_subject text(65535) NOT NULL DEFAULT '',
- forum_last_post_time INTEGER UNSIGNED NOT NULL DEFAULT '0',
- forum_last_poster_name varchar(255) NOT NULL DEFAULT '',
- forum_last_poster_colour varchar(6) NOT NULL DEFAULT '',
- forum_flags tinyint(4) NOT NULL DEFAULT '32',
- forum_options INTEGER UNSIGNED NOT NULL DEFAULT '0',
- display_subforum_list INTEGER UNSIGNED NOT NULL DEFAULT '1',
- display_on_index INTEGER UNSIGNED NOT NULL DEFAULT '1',
- enable_indexing INTEGER UNSIGNED NOT NULL DEFAULT '1',
- enable_icons INTEGER UNSIGNED NOT NULL DEFAULT '1',
- enable_prune INTEGER UNSIGNED NOT NULL DEFAULT '0',
- prune_next INTEGER UNSIGNED NOT NULL DEFAULT '0',
- prune_days INTEGER UNSIGNED NOT NULL DEFAULT '0',
- prune_viewed INTEGER UNSIGNED NOT NULL DEFAULT '0',
- prune_freq INTEGER UNSIGNED NOT NULL DEFAULT '0'
-);
-
-CREATE INDEX phpbb_forums_left_right_id ON phpbb_forums (left_id, right_id);
-CREATE INDEX phpbb_forums_forum_lastpost_id ON phpbb_forums (forum_last_post_id);
-
-# Table: 'phpbb_forums_access'
-CREATE TABLE phpbb_forums_access (
- forum_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
- user_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
- session_id char(32) NOT NULL DEFAULT '',
- PRIMARY KEY (forum_id, user_id, session_id)
-);
-
-
-# Table: 'phpbb_forums_track'
-CREATE TABLE phpbb_forums_track (
- user_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
- forum_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
- mark_time INTEGER UNSIGNED NOT NULL DEFAULT '0',
- PRIMARY KEY (user_id, forum_id)
-);
-
-
-# Table: 'phpbb_forums_watch'
-CREATE TABLE phpbb_forums_watch (
- forum_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
- user_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
- notify_status INTEGER UNSIGNED NOT NULL DEFAULT '0'
-);
-
-CREATE INDEX phpbb_forums_watch_forum_id ON phpbb_forums_watch (forum_id);
-CREATE INDEX phpbb_forums_watch_user_id ON phpbb_forums_watch (user_id);
-CREATE INDEX phpbb_forums_watch_notify_stat ON phpbb_forums_watch (notify_status);
-
-# Table: 'phpbb_groups'
-CREATE TABLE phpbb_groups (
- group_id INTEGER PRIMARY KEY NOT NULL ,
- group_type tinyint(4) NOT NULL DEFAULT '1',
- group_founder_manage INTEGER UNSIGNED NOT NULL DEFAULT '0',
- group_skip_auth INTEGER UNSIGNED NOT NULL DEFAULT '0',
- group_name varchar(255) NOT NULL DEFAULT '',
- group_desc text(65535) NOT NULL DEFAULT '',
- group_desc_bitfield varchar(255) NOT NULL DEFAULT '',
- group_desc_options INTEGER UNSIGNED NOT NULL DEFAULT '7',
- group_desc_uid varchar(8) NOT NULL DEFAULT '',
- group_display INTEGER UNSIGNED NOT NULL DEFAULT '0',
- group_avatar varchar(255) NOT NULL DEFAULT '',
- group_avatar_type tinyint(2) NOT NULL DEFAULT '0',
- group_avatar_width INTEGER UNSIGNED NOT NULL DEFAULT '0',
- group_avatar_height INTEGER UNSIGNED NOT NULL DEFAULT '0',
- group_rank INTEGER UNSIGNED NOT NULL DEFAULT '0',
- group_colour varchar(6) NOT NULL DEFAULT '',
- group_sig_chars INTEGER UNSIGNED NOT NULL DEFAULT '0',
- group_receive_pm INTEGER UNSIGNED NOT NULL DEFAULT '0',
- group_message_limit INTEGER UNSIGNED NOT NULL DEFAULT '0',
- group_max_recipients INTEGER UNSIGNED NOT NULL DEFAULT '0',
- group_legend INTEGER UNSIGNED NOT NULL DEFAULT '1'
-);
-
-CREATE INDEX phpbb_groups_group_legend_name ON phpbb_groups (group_legend, group_name);
-
-# Table: 'phpbb_icons'
-CREATE TABLE phpbb_icons (
- icons_id INTEGER PRIMARY KEY NOT NULL ,
- icons_url varchar(255) NOT NULL DEFAULT '',
- icons_width tinyint(4) NOT NULL DEFAULT '0',
- icons_height tinyint(4) NOT NULL DEFAULT '0',
- icons_order INTEGER UNSIGNED NOT NULL DEFAULT '0',
- display_on_posting INTEGER UNSIGNED NOT NULL DEFAULT '1'
-);
-
-CREATE INDEX phpbb_icons_display_on_posting ON phpbb_icons (display_on_posting);
-
-# Table: 'phpbb_lang'
-CREATE TABLE phpbb_lang (
- lang_id INTEGER PRIMARY KEY NOT NULL ,
- lang_iso varchar(30) NOT NULL DEFAULT '',
- lang_dir varchar(30) NOT NULL DEFAULT '',
- lang_english_name varchar(100) NOT NULL DEFAULT '',
- lang_local_name varchar(255) NOT NULL DEFAULT '',
- lang_author varchar(255) NOT NULL DEFAULT ''
-);
-
-CREATE INDEX phpbb_lang_lang_iso ON phpbb_lang (lang_iso);
-
-# Table: 'phpbb_log'
-CREATE TABLE phpbb_log (
- log_id INTEGER PRIMARY KEY NOT NULL ,
- log_type tinyint(4) NOT NULL DEFAULT '0',
- user_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
- forum_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
- topic_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
- reportee_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
- log_ip varchar(40) NOT NULL DEFAULT '',
- log_time INTEGER UNSIGNED NOT NULL DEFAULT '0',
- log_operation text(65535) NOT NULL DEFAULT '',
- log_data mediumtext(16777215) NOT NULL DEFAULT ''
-);
-
-CREATE INDEX phpbb_log_log_type ON phpbb_log (log_type);
-CREATE INDEX phpbb_log_forum_id ON phpbb_log (forum_id);
-CREATE INDEX phpbb_log_topic_id ON phpbb_log (topic_id);
-CREATE INDEX phpbb_log_reportee_id ON phpbb_log (reportee_id);
-CREATE INDEX phpbb_log_user_id ON phpbb_log (user_id);
-
-# Table: 'phpbb_login_attempts'
-CREATE TABLE phpbb_login_attempts (
- attempt_ip varchar(40) NOT NULL DEFAULT '',
- attempt_browser varchar(150) NOT NULL DEFAULT '',
- attempt_forwarded_for varchar(255) NOT NULL DEFAULT '',
- attempt_time INTEGER UNSIGNED NOT NULL DEFAULT '0',
- user_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
- username varchar(255) NOT NULL DEFAULT '0',
- username_clean varchar(255) NOT NULL DEFAULT '0'
-);
-
-CREATE INDEX phpbb_login_attempts_att_ip ON phpbb_login_attempts (attempt_ip, attempt_time);
-CREATE INDEX phpbb_login_attempts_att_for ON phpbb_login_attempts (attempt_forwarded_for, attempt_time);
-CREATE INDEX phpbb_login_attempts_att_time ON phpbb_login_attempts (attempt_time);
-CREATE INDEX phpbb_login_attempts_user_id ON phpbb_login_attempts (user_id);
-
-# Table: 'phpbb_moderator_cache'
-CREATE TABLE phpbb_moderator_cache (
- forum_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
- user_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
- username varchar(255) NOT NULL DEFAULT '',
- group_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
- group_name varchar(255) NOT NULL DEFAULT '',
- display_on_index INTEGER UNSIGNED NOT NULL DEFAULT '1'
-);
-
-CREATE INDEX phpbb_moderator_cache_disp_idx ON phpbb_moderator_cache (display_on_index);
-CREATE INDEX phpbb_moderator_cache_forum_id ON phpbb_moderator_cache (forum_id);
-
-# Table: 'phpbb_modules'
-CREATE TABLE phpbb_modules (
- module_id INTEGER PRIMARY KEY NOT NULL ,
- module_enabled INTEGER UNSIGNED NOT NULL DEFAULT '1',
- module_display INTEGER UNSIGNED NOT NULL DEFAULT '1',
- module_basename varchar(255) NOT NULL DEFAULT '',
- module_class varchar(10) NOT NULL DEFAULT '',
- parent_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
- left_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
- right_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
- module_langname varchar(255) NOT NULL DEFAULT '',
- module_mode varchar(255) NOT NULL DEFAULT '',
- module_auth varchar(255) NOT NULL DEFAULT ''
-);
-
-CREATE INDEX phpbb_modules_left_right_id ON phpbb_modules (left_id, right_id);
-CREATE INDEX phpbb_modules_module_enabled ON phpbb_modules (module_enabled);
-CREATE INDEX phpbb_modules_class_left_id ON phpbb_modules (module_class, left_id);
-
-# Table: 'phpbb_poll_options'
-CREATE TABLE phpbb_poll_options (
- poll_option_id tinyint(4) NOT NULL DEFAULT '0',
- topic_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
- poll_option_text text(65535) NOT NULL DEFAULT '',
- poll_option_total INTEGER UNSIGNED NOT NULL DEFAULT '0'
-);
-
-CREATE INDEX phpbb_poll_options_poll_opt_id ON phpbb_poll_options (poll_option_id);
-CREATE INDEX phpbb_poll_options_topic_id ON phpbb_poll_options (topic_id);
-
-# Table: 'phpbb_poll_votes'
-CREATE TABLE phpbb_poll_votes (
- topic_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
- poll_option_id tinyint(4) NOT NULL DEFAULT '0',
- vote_user_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
- vote_user_ip varchar(40) NOT NULL DEFAULT ''
-);
-
-CREATE INDEX phpbb_poll_votes_topic_id ON phpbb_poll_votes (topic_id);
-CREATE INDEX phpbb_poll_votes_vote_user_id ON phpbb_poll_votes (vote_user_id);
-CREATE INDEX phpbb_poll_votes_vote_user_ip ON phpbb_poll_votes (vote_user_ip);
-
-# Table: 'phpbb_posts'
-CREATE TABLE phpbb_posts (
- post_id INTEGER PRIMARY KEY NOT NULL ,
- topic_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
- forum_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
- poster_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
- icon_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
- poster_ip varchar(40) NOT NULL DEFAULT '',
- post_time INTEGER UNSIGNED NOT NULL DEFAULT '0',
- post_approved INTEGER UNSIGNED NOT NULL DEFAULT '1',
- post_reported INTEGER UNSIGNED NOT NULL DEFAULT '0',
- enable_bbcode INTEGER UNSIGNED NOT NULL DEFAULT '1',
- enable_smilies INTEGER UNSIGNED NOT NULL DEFAULT '1',
- enable_magic_url INTEGER UNSIGNED NOT NULL DEFAULT '1',
- enable_sig INTEGER UNSIGNED NOT NULL DEFAULT '1',
- post_username varchar(255) NOT NULL DEFAULT '',
- post_subject text(65535) NOT NULL DEFAULT '',
- post_text mediumtext(16777215) NOT NULL DEFAULT '',
- post_checksum varchar(32) NOT NULL DEFAULT '',
- post_attachment INTEGER UNSIGNED NOT NULL DEFAULT '0',
- bbcode_bitfield varchar(255) NOT NULL DEFAULT '',
- bbcode_uid varchar(8) NOT NULL DEFAULT '',
- post_postcount INTEGER UNSIGNED NOT NULL DEFAULT '1',
- post_edit_time INTEGER UNSIGNED NOT NULL DEFAULT '0',
- post_edit_reason text(65535) NOT NULL DEFAULT '',
- post_edit_user INTEGER UNSIGNED NOT NULL DEFAULT '0',
- post_edit_count INTEGER UNSIGNED NOT NULL DEFAULT '0',
- post_edit_locked INTEGER UNSIGNED NOT NULL DEFAULT '0'
-);
-
-CREATE INDEX phpbb_posts_forum_id ON phpbb_posts (forum_id);
-CREATE INDEX phpbb_posts_topic_id ON phpbb_posts (topic_id);
-CREATE INDEX phpbb_posts_poster_ip ON phpbb_posts (poster_ip);
-CREATE INDEX phpbb_posts_poster_id ON phpbb_posts (poster_id);
-CREATE INDEX phpbb_posts_post_approved ON phpbb_posts (post_approved);
-CREATE INDEX phpbb_posts_post_username ON phpbb_posts (post_username);
-CREATE INDEX phpbb_posts_tid_post_time ON phpbb_posts (topic_id, post_time);
-
-# Table: 'phpbb_privmsgs'
-CREATE TABLE phpbb_privmsgs (
- msg_id INTEGER PRIMARY KEY NOT NULL ,
- root_level INTEGER UNSIGNED NOT NULL DEFAULT '0',
- author_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
- icon_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
- author_ip varchar(40) NOT NULL DEFAULT '',
- message_time INTEGER UNSIGNED NOT NULL DEFAULT '0',
- enable_bbcode INTEGER UNSIGNED NOT NULL DEFAULT '1',
- enable_smilies INTEGER UNSIGNED NOT NULL DEFAULT '1',
- enable_magic_url INTEGER UNSIGNED NOT NULL DEFAULT '1',
- enable_sig INTEGER UNSIGNED NOT NULL DEFAULT '1',
- message_subject text(65535) NOT NULL DEFAULT '',
- message_text mediumtext(16777215) NOT NULL DEFAULT '',
- message_edit_reason text(65535) NOT NULL DEFAULT '',
- message_edit_user INTEGER UNSIGNED NOT NULL DEFAULT '0',
- message_attachment INTEGER UNSIGNED NOT NULL DEFAULT '0',
- bbcode_bitfield varchar(255) NOT NULL DEFAULT '',
- bbcode_uid varchar(8) NOT NULL DEFAULT '',
- message_edit_time INTEGER UNSIGNED NOT NULL DEFAULT '0',
- message_edit_count INTEGER UNSIGNED NOT NULL DEFAULT '0',
- to_address text(65535) NOT NULL DEFAULT '',
- bcc_address text(65535) NOT NULL DEFAULT '',
- message_reported INTEGER UNSIGNED NOT NULL DEFAULT '0'
-);
-
-CREATE INDEX phpbb_privmsgs_author_ip ON phpbb_privmsgs (author_ip);
-CREATE INDEX phpbb_privmsgs_message_time ON phpbb_privmsgs (message_time);
-CREATE INDEX phpbb_privmsgs_author_id ON phpbb_privmsgs (author_id);
-CREATE INDEX phpbb_privmsgs_root_level ON phpbb_privmsgs (root_level);
-
-# Table: 'phpbb_privmsgs_folder'
-CREATE TABLE phpbb_privmsgs_folder (
- folder_id INTEGER PRIMARY KEY NOT NULL ,
- user_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
- folder_name varchar(255) NOT NULL DEFAULT '',
- pm_count INTEGER UNSIGNED NOT NULL DEFAULT '0'
-);
-
-CREATE INDEX phpbb_privmsgs_folder_user_id ON phpbb_privmsgs_folder (user_id);
-
-# Table: 'phpbb_privmsgs_rules'
-CREATE TABLE phpbb_privmsgs_rules (
- rule_id INTEGER PRIMARY KEY NOT NULL ,
- user_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
- rule_check INTEGER UNSIGNED NOT NULL DEFAULT '0',
- rule_connection INTEGER UNSIGNED NOT NULL DEFAULT '0',
- rule_string varchar(255) NOT NULL DEFAULT '',
- rule_user_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
- rule_group_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
- rule_action INTEGER UNSIGNED NOT NULL DEFAULT '0',
- rule_folder_id int(11) NOT NULL DEFAULT '0'
-);
-
-CREATE INDEX phpbb_privmsgs_rules_user_id ON phpbb_privmsgs_rules (user_id);
-
-# Table: 'phpbb_privmsgs_to'
-CREATE TABLE phpbb_privmsgs_to (
- msg_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
- user_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
- author_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
- pm_deleted INTEGER UNSIGNED NOT NULL DEFAULT '0',
- pm_new INTEGER UNSIGNED NOT NULL DEFAULT '1',
- pm_unread INTEGER UNSIGNED NOT NULL DEFAULT '1',
- pm_replied INTEGER UNSIGNED NOT NULL DEFAULT '0',
- pm_marked INTEGER UNSIGNED NOT NULL DEFAULT '0',
- pm_forwarded INTEGER UNSIGNED NOT NULL DEFAULT '0',
- folder_id int(11) NOT NULL DEFAULT '0'
-);
-
-CREATE INDEX phpbb_privmsgs_to_msg_id ON phpbb_privmsgs_to (msg_id);
-CREATE INDEX phpbb_privmsgs_to_author_id ON phpbb_privmsgs_to (author_id);
-CREATE INDEX phpbb_privmsgs_to_usr_flder_id ON phpbb_privmsgs_to (user_id, folder_id);
-
-# Table: 'phpbb_profile_fields'
-CREATE TABLE phpbb_profile_fields (
- field_id INTEGER PRIMARY KEY NOT NULL ,
- field_name varchar(255) NOT NULL DEFAULT '',
- field_type tinyint(4) NOT NULL DEFAULT '0',
- field_ident varchar(20) NOT NULL DEFAULT '',
- field_length varchar(20) NOT NULL DEFAULT '',
- field_minlen varchar(255) NOT NULL DEFAULT '',
- field_maxlen varchar(255) NOT NULL DEFAULT '',
- field_novalue varchar(255) NOT NULL DEFAULT '',
- field_default_value varchar(255) NOT NULL DEFAULT '',
- field_validation varchar(20) NOT NULL DEFAULT '',
- field_required INTEGER UNSIGNED NOT NULL DEFAULT '0',
- field_show_novalue INTEGER UNSIGNED NOT NULL DEFAULT '0',
- field_show_on_reg INTEGER UNSIGNED NOT NULL DEFAULT '0',
- field_show_on_vt INTEGER UNSIGNED NOT NULL DEFAULT '0',
- field_show_profile INTEGER UNSIGNED NOT NULL DEFAULT '0',
- field_hide INTEGER UNSIGNED NOT NULL DEFAULT '0',
- field_no_view INTEGER UNSIGNED NOT NULL DEFAULT '0',
- field_active INTEGER UNSIGNED NOT NULL DEFAULT '0',
- field_order INTEGER UNSIGNED NOT NULL DEFAULT '0'
-);
-
-CREATE INDEX phpbb_profile_fields_fld_type ON phpbb_profile_fields (field_type);
-CREATE INDEX phpbb_profile_fields_fld_ordr ON phpbb_profile_fields (field_order);
-
-# Table: 'phpbb_profile_fields_data'
-CREATE TABLE phpbb_profile_fields_data (
- user_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
- PRIMARY KEY (user_id)
-);
-
-
-# Table: 'phpbb_profile_fields_lang'
-CREATE TABLE phpbb_profile_fields_lang (
- field_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
- lang_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
- option_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
- field_type tinyint(4) NOT NULL DEFAULT '0',
- lang_value varchar(255) NOT NULL DEFAULT '',
- PRIMARY KEY (field_id, lang_id, option_id)
-);
-
-
-# Table: 'phpbb_profile_lang'
-CREATE TABLE phpbb_profile_lang (
- field_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
- lang_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
- lang_name varchar(255) NOT NULL DEFAULT '',
- lang_explain text(65535) NOT NULL DEFAULT '',
- lang_default_value varchar(255) NOT NULL DEFAULT '',
- PRIMARY KEY (field_id, lang_id)
-);
-
-
-# Table: 'phpbb_ranks'
-CREATE TABLE phpbb_ranks (
- rank_id INTEGER PRIMARY KEY NOT NULL ,
- rank_title varchar(255) NOT NULL DEFAULT '',
- rank_min INTEGER UNSIGNED NOT NULL DEFAULT '0',
- rank_special INTEGER UNSIGNED NOT NULL DEFAULT '0',
- rank_image varchar(255) NOT NULL DEFAULT ''
-);
-
-
-# Table: 'phpbb_reports'
-CREATE TABLE phpbb_reports (
- report_id INTEGER PRIMARY KEY NOT NULL ,
- reason_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
- post_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
- pm_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
- user_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
- user_notify INTEGER UNSIGNED NOT NULL DEFAULT '0',
- report_closed INTEGER UNSIGNED NOT NULL DEFAULT '0',
- report_time INTEGER UNSIGNED NOT NULL DEFAULT '0',
- report_text mediumtext(16777215) NOT NULL DEFAULT ''
-);
-
-CREATE INDEX phpbb_reports_post_id ON phpbb_reports (post_id);
-CREATE INDEX phpbb_reports_pm_id ON phpbb_reports (pm_id);
-
-# Table: 'phpbb_reports_reasons'
-CREATE TABLE phpbb_reports_reasons (
- reason_id INTEGER PRIMARY KEY NOT NULL ,
- reason_title varchar(255) NOT NULL DEFAULT '',
- reason_description mediumtext(16777215) NOT NULL DEFAULT '',
- reason_order INTEGER UNSIGNED NOT NULL DEFAULT '0'
-);
-
-
-# Table: 'phpbb_search_results'
-CREATE TABLE phpbb_search_results (
- search_key varchar(32) NOT NULL DEFAULT '',
- search_time INTEGER UNSIGNED NOT NULL DEFAULT '0',
- search_keywords mediumtext(16777215) NOT NULL DEFAULT '',
- search_authors mediumtext(16777215) NOT NULL DEFAULT '',
- PRIMARY KEY (search_key)
-);
-
-
-# Table: 'phpbb_search_wordlist'
-CREATE TABLE phpbb_search_wordlist (
- word_id INTEGER PRIMARY KEY NOT NULL ,
- word_text varchar(255) NOT NULL DEFAULT '',
- word_common INTEGER UNSIGNED NOT NULL DEFAULT '0',
- word_count INTEGER UNSIGNED NOT NULL DEFAULT '0'
-);
-
-CREATE UNIQUE INDEX phpbb_search_wordlist_wrd_txt ON phpbb_search_wordlist (word_text);
-CREATE INDEX phpbb_search_wordlist_wrd_cnt ON phpbb_search_wordlist (word_count);
-
-# Table: 'phpbb_search_wordmatch'
-CREATE TABLE phpbb_search_wordmatch (
- post_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
- word_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
- title_match INTEGER UNSIGNED NOT NULL DEFAULT '0'
-);
-
-CREATE UNIQUE INDEX phpbb_search_wordmatch_unq_mtch ON phpbb_search_wordmatch (word_id, post_id, title_match);
-CREATE INDEX phpbb_search_wordmatch_word_id ON phpbb_search_wordmatch (word_id);
-CREATE INDEX phpbb_search_wordmatch_post_id ON phpbb_search_wordmatch (post_id);
-
-# Table: 'phpbb_sessions'
-CREATE TABLE phpbb_sessions (
- session_id char(32) NOT NULL DEFAULT '',
- session_user_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
- session_forum_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
- session_last_visit INTEGER UNSIGNED NOT NULL DEFAULT '0',
- session_start INTEGER UNSIGNED NOT NULL DEFAULT '0',
- session_time INTEGER UNSIGNED NOT NULL DEFAULT '0',
- session_ip varchar(40) NOT NULL DEFAULT '',
- session_browser varchar(150) NOT NULL DEFAULT '',
- session_forwarded_for varchar(255) NOT NULL DEFAULT '',
- session_page varchar(255) NOT NULL DEFAULT '',
- session_viewonline INTEGER UNSIGNED NOT NULL DEFAULT '1',
- session_autologin INTEGER UNSIGNED NOT NULL DEFAULT '0',
- session_admin INTEGER UNSIGNED NOT NULL DEFAULT '0',
- PRIMARY KEY (session_id)
-);
-
-CREATE INDEX phpbb_sessions_session_time ON phpbb_sessions (session_time);
-CREATE INDEX phpbb_sessions_session_user_id ON phpbb_sessions (session_user_id);
-CREATE INDEX phpbb_sessions_session_fid ON phpbb_sessions (session_forum_id);
-
-# Table: 'phpbb_sessions_keys'
-CREATE TABLE phpbb_sessions_keys (
- key_id char(32) NOT NULL DEFAULT '',
- user_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
- last_ip varchar(40) NOT NULL DEFAULT '',
- last_login INTEGER UNSIGNED NOT NULL DEFAULT '0',
- PRIMARY KEY (key_id, user_id)
-);
-
-CREATE INDEX phpbb_sessions_keys_last_login ON phpbb_sessions_keys (last_login);
-
-# Table: 'phpbb_sitelist'
-CREATE TABLE phpbb_sitelist (
- site_id INTEGER PRIMARY KEY NOT NULL ,
- site_ip varchar(40) NOT NULL DEFAULT '',
- site_hostname varchar(255) NOT NULL DEFAULT '',
- ip_exclude INTEGER UNSIGNED NOT NULL DEFAULT '0'
-);
-
-
-# Table: 'phpbb_smilies'
-CREATE TABLE phpbb_smilies (
- smiley_id INTEGER PRIMARY KEY NOT NULL ,
- code varchar(50) NOT NULL DEFAULT '',
- emotion varchar(50) NOT NULL DEFAULT '',
- smiley_url varchar(50) NOT NULL DEFAULT '',
- smiley_width INTEGER UNSIGNED NOT NULL DEFAULT '0',
- smiley_height INTEGER UNSIGNED NOT NULL DEFAULT '0',
- smiley_order INTEGER UNSIGNED NOT NULL DEFAULT '0',
- display_on_posting INTEGER UNSIGNED NOT NULL DEFAULT '1'
-);
-
-CREATE INDEX phpbb_smilies_display_on_post ON phpbb_smilies (display_on_posting);
-
-# Table: 'phpbb_styles'
-CREATE TABLE phpbb_styles (
- style_id INTEGER PRIMARY KEY NOT NULL ,
- style_name varchar(255) NOT NULL DEFAULT '',
- style_copyright varchar(255) NOT NULL DEFAULT '',
- style_active INTEGER UNSIGNED NOT NULL DEFAULT '1',
- template_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
- theme_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
- imageset_id INTEGER UNSIGNED NOT NULL DEFAULT '0'
-);
-
-CREATE UNIQUE INDEX phpbb_styles_style_name ON phpbb_styles (style_name);
-CREATE INDEX phpbb_styles_template_id ON phpbb_styles (template_id);
-CREATE INDEX phpbb_styles_theme_id ON phpbb_styles (theme_id);
-CREATE INDEX phpbb_styles_imageset_id ON phpbb_styles (imageset_id);
-
-# Table: 'phpbb_styles_template'
-CREATE TABLE phpbb_styles_template (
- template_id INTEGER PRIMARY KEY NOT NULL ,
- template_name varchar(255) NOT NULL DEFAULT '',
- template_copyright varchar(255) NOT NULL DEFAULT '',
- template_path varchar(100) NOT NULL DEFAULT '',
- bbcode_bitfield varchar(255) NOT NULL DEFAULT 'kNg=',
- template_storedb INTEGER UNSIGNED NOT NULL DEFAULT '0',
- template_inherits_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
- template_inherit_path varchar(255) NOT NULL DEFAULT ''
-);
-
-CREATE UNIQUE INDEX phpbb_styles_template_tmplte_nm ON phpbb_styles_template (template_name);
-
-# Table: 'phpbb_styles_template_data'
-CREATE TABLE phpbb_styles_template_data (
- template_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
- template_filename varchar(100) NOT NULL DEFAULT '',
- template_included text(65535) NOT NULL DEFAULT '',
- template_mtime INTEGER UNSIGNED NOT NULL DEFAULT '0',
- template_data mediumtext(16777215) NOT NULL DEFAULT ''
-);
-
-CREATE INDEX phpbb_styles_template_data_tid ON phpbb_styles_template_data (template_id);
-CREATE INDEX phpbb_styles_template_data_tfn ON phpbb_styles_template_data (template_filename);
-
-# Table: 'phpbb_styles_theme'
-CREATE TABLE phpbb_styles_theme (
- theme_id INTEGER PRIMARY KEY NOT NULL ,
- theme_name varchar(255) NOT NULL DEFAULT '',
- theme_copyright varchar(255) NOT NULL DEFAULT '',
- theme_path varchar(100) NOT NULL DEFAULT '',
- theme_storedb INTEGER UNSIGNED NOT NULL DEFAULT '0',
- theme_mtime INTEGER UNSIGNED NOT NULL DEFAULT '0',
- theme_data mediumtext(16777215) NOT NULL DEFAULT ''
-);
-
-CREATE UNIQUE INDEX phpbb_styles_theme_theme_name ON phpbb_styles_theme (theme_name);
-
-# Table: 'phpbb_styles_imageset'
-CREATE TABLE phpbb_styles_imageset (
- imageset_id INTEGER PRIMARY KEY NOT NULL ,
- imageset_name varchar(255) NOT NULL DEFAULT '',
- imageset_copyright varchar(255) NOT NULL DEFAULT '',
- imageset_path varchar(100) NOT NULL DEFAULT ''
-);
-
-CREATE UNIQUE INDEX phpbb_styles_imageset_imgset_nm ON phpbb_styles_imageset (imageset_name);
-
-# Table: 'phpbb_styles_imageset_data'
-CREATE TABLE phpbb_styles_imageset_data (
- image_id INTEGER PRIMARY KEY NOT NULL ,
- image_name varchar(200) NOT NULL DEFAULT '',
- image_filename varchar(200) NOT NULL DEFAULT '',
- image_lang varchar(30) NOT NULL DEFAULT '',
- image_height INTEGER UNSIGNED NOT NULL DEFAULT '0',
- image_width INTEGER UNSIGNED NOT NULL DEFAULT '0',
- imageset_id INTEGER UNSIGNED NOT NULL DEFAULT '0'
-);
-
-CREATE INDEX phpbb_styles_imageset_data_i_d ON phpbb_styles_imageset_data (imageset_id);
-
-# Table: 'phpbb_topics'
-CREATE TABLE phpbb_topics (
- topic_id INTEGER PRIMARY KEY NOT NULL ,
- forum_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
- icon_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
- topic_attachment INTEGER UNSIGNED NOT NULL DEFAULT '0',
- topic_approved INTEGER UNSIGNED NOT NULL DEFAULT '1',
- topic_reported INTEGER UNSIGNED NOT NULL DEFAULT '0',
- topic_title text(65535) NOT NULL DEFAULT '',
- topic_poster INTEGER UNSIGNED NOT NULL DEFAULT '0',
- topic_time INTEGER UNSIGNED NOT NULL DEFAULT '0',
- topic_time_limit INTEGER UNSIGNED NOT NULL DEFAULT '0',
- topic_views INTEGER UNSIGNED NOT NULL DEFAULT '0',
- topic_replies INTEGER UNSIGNED NOT NULL DEFAULT '0',
- topic_replies_real INTEGER UNSIGNED NOT NULL DEFAULT '0',
- topic_status tinyint(3) NOT NULL DEFAULT '0',
- topic_type tinyint(3) NOT NULL DEFAULT '0',
- topic_first_post_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
- topic_first_poster_name varchar(255) NOT NULL DEFAULT '',
- topic_first_poster_colour varchar(6) NOT NULL DEFAULT '',
- topic_last_post_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
- topic_last_poster_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
- topic_last_poster_name varchar(255) NOT NULL DEFAULT '',
- topic_last_poster_colour varchar(6) NOT NULL DEFAULT '',
- topic_last_post_subject text(65535) NOT NULL DEFAULT '',
- topic_last_post_time INTEGER UNSIGNED NOT NULL DEFAULT '0',
- topic_last_view_time INTEGER UNSIGNED NOT NULL DEFAULT '0',
- topic_moved_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
- topic_bumped INTEGER UNSIGNED NOT NULL DEFAULT '0',
- topic_bumper INTEGER UNSIGNED NOT NULL DEFAULT '0',
- poll_title text(65535) NOT NULL DEFAULT '',
- poll_start INTEGER UNSIGNED NOT NULL DEFAULT '0',
- poll_length INTEGER UNSIGNED NOT NULL DEFAULT '0',
- poll_max_options tinyint(4) NOT NULL DEFAULT '1',
- poll_last_vote INTEGER UNSIGNED NOT NULL DEFAULT '0',
- poll_vote_change INTEGER UNSIGNED NOT NULL DEFAULT '0'
-);
-
-CREATE INDEX phpbb_topics_forum_id ON phpbb_topics (forum_id);
-CREATE INDEX phpbb_topics_forum_id_type ON phpbb_topics (forum_id, topic_type);
-CREATE INDEX phpbb_topics_last_post_time ON phpbb_topics (topic_last_post_time);
-CREATE INDEX phpbb_topics_topic_approved ON phpbb_topics (topic_approved);
-CREATE INDEX phpbb_topics_forum_appr_last ON phpbb_topics (forum_id, topic_approved, topic_last_post_id);
-CREATE INDEX phpbb_topics_fid_time_moved ON phpbb_topics (forum_id, topic_last_post_time, topic_moved_id);
-
-# Table: 'phpbb_topics_track'
-CREATE TABLE phpbb_topics_track (
- user_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
- topic_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
- forum_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
- mark_time INTEGER UNSIGNED NOT NULL DEFAULT '0',
- PRIMARY KEY (user_id, topic_id)
-);
-
-CREATE INDEX phpbb_topics_track_topic_id ON phpbb_topics_track (topic_id);
-CREATE INDEX phpbb_topics_track_forum_id ON phpbb_topics_track (forum_id);
-
-# Table: 'phpbb_topics_posted'
-CREATE TABLE phpbb_topics_posted (
- user_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
- topic_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
- topic_posted INTEGER UNSIGNED NOT NULL DEFAULT '0',
- PRIMARY KEY (user_id, topic_id)
-);
-
-
-# Table: 'phpbb_topics_watch'
-CREATE TABLE phpbb_topics_watch (
- topic_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
- user_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
- notify_status INTEGER UNSIGNED NOT NULL DEFAULT '0'
-);
-
-CREATE INDEX phpbb_topics_watch_topic_id ON phpbb_topics_watch (topic_id);
-CREATE INDEX phpbb_topics_watch_user_id ON phpbb_topics_watch (user_id);
-CREATE INDEX phpbb_topics_watch_notify_stat ON phpbb_topics_watch (notify_status);
-
-# Table: 'phpbb_user_group'
-CREATE TABLE phpbb_user_group (
- group_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
- user_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
- group_leader INTEGER UNSIGNED NOT NULL DEFAULT '0',
- user_pending INTEGER UNSIGNED NOT NULL DEFAULT '1'
-);
-
-CREATE INDEX phpbb_user_group_group_id ON phpbb_user_group (group_id);
-CREATE INDEX phpbb_user_group_user_id ON phpbb_user_group (user_id);
-CREATE INDEX phpbb_user_group_group_leader ON phpbb_user_group (group_leader);
-
-# Table: 'phpbb_users'
-CREATE TABLE phpbb_users (
- user_id INTEGER PRIMARY KEY NOT NULL ,
- user_type tinyint(2) NOT NULL DEFAULT '0',
- group_id INTEGER UNSIGNED NOT NULL DEFAULT '3',
- user_permissions mediumtext(16777215) NOT NULL DEFAULT '',
- user_perm_from INTEGER UNSIGNED NOT NULL DEFAULT '0',
- user_ip varchar(40) NOT NULL DEFAULT '',
- user_regdate INTEGER UNSIGNED NOT NULL DEFAULT '0',
- username varchar(255) NOT NULL DEFAULT '',
- username_clean varchar(255) NOT NULL DEFAULT '',
- user_password varchar(40) NOT NULL DEFAULT '',
- user_passchg INTEGER UNSIGNED NOT NULL DEFAULT '0',
- user_pass_convert INTEGER UNSIGNED NOT NULL DEFAULT '0',
- user_email varchar(100) NOT NULL DEFAULT '',
- user_email_hash bigint(20) NOT NULL DEFAULT '0',
- user_birthday varchar(10) NOT NULL DEFAULT '',
- user_lastvisit INTEGER UNSIGNED NOT NULL DEFAULT '0',
- user_lastmark INTEGER UNSIGNED NOT NULL DEFAULT '0',
- user_lastpost_time INTEGER UNSIGNED NOT NULL DEFAULT '0',
- user_lastpage varchar(200) NOT NULL DEFAULT '',
- user_last_confirm_key varchar(10) NOT NULL DEFAULT '',
- user_last_search INTEGER UNSIGNED NOT NULL DEFAULT '0',
- user_warnings tinyint(4) NOT NULL DEFAULT '0',
- user_last_warning INTEGER UNSIGNED NOT NULL DEFAULT '0',
- user_login_attempts tinyint(4) NOT NULL DEFAULT '0',
- user_inactive_reason tinyint(2) NOT NULL DEFAULT '0',
- user_inactive_time INTEGER UNSIGNED NOT NULL DEFAULT '0',
- user_posts INTEGER UNSIGNED NOT NULL DEFAULT '0',
- user_lang varchar(30) NOT NULL DEFAULT '',
- user_timezone decimal(5,2) NOT NULL DEFAULT '0',
- user_dst INTEGER UNSIGNED NOT NULL DEFAULT '0',
- user_dateformat varchar(30) NOT NULL DEFAULT 'd M Y H:i',
- user_style INTEGER UNSIGNED NOT NULL DEFAULT '0',
- user_rank INTEGER UNSIGNED NOT NULL DEFAULT '0',
- user_colour varchar(6) NOT NULL DEFAULT '',
- user_new_privmsg int(4) NOT NULL DEFAULT '0',
- user_unread_privmsg int(4) NOT NULL DEFAULT '0',
- user_last_privmsg INTEGER UNSIGNED NOT NULL DEFAULT '0',
- user_message_rules INTEGER UNSIGNED NOT NULL DEFAULT '0',
- user_full_folder int(11) NOT NULL DEFAULT '-3',
- user_emailtime INTEGER UNSIGNED NOT NULL DEFAULT '0',
- user_topic_show_days INTEGER UNSIGNED NOT NULL DEFAULT '0',
- user_topic_sortby_type varchar(1) NOT NULL DEFAULT 't',
- user_topic_sortby_dir varchar(1) NOT NULL DEFAULT 'd',
- user_post_show_days INTEGER UNSIGNED NOT NULL DEFAULT '0',
- user_post_sortby_type varchar(1) NOT NULL DEFAULT 't',
- user_post_sortby_dir varchar(1) NOT NULL DEFAULT 'a',
- user_notify INTEGER UNSIGNED NOT NULL DEFAULT '0',
- user_notify_pm INTEGER UNSIGNED NOT NULL DEFAULT '1',
- user_notify_type tinyint(4) NOT NULL DEFAULT '0',
- user_allow_pm INTEGER UNSIGNED NOT NULL DEFAULT '1',
- user_allow_viewonline INTEGER UNSIGNED NOT NULL DEFAULT '1',
- user_allow_viewemail INTEGER UNSIGNED NOT NULL DEFAULT '1',
- user_allow_massemail INTEGER UNSIGNED NOT NULL DEFAULT '1',
- user_options INTEGER UNSIGNED NOT NULL DEFAULT '230271',
- user_avatar varchar(255) NOT NULL DEFAULT '',
- user_avatar_type tinyint(2) NOT NULL DEFAULT '0',
- user_avatar_width INTEGER UNSIGNED NOT NULL DEFAULT '0',
- user_avatar_height INTEGER UNSIGNED NOT NULL DEFAULT '0',
- user_sig mediumtext(16777215) NOT NULL DEFAULT '',
- user_sig_bbcode_uid varchar(8) NOT NULL DEFAULT '',
- user_sig_bbcode_bitfield varchar(255) NOT NULL DEFAULT '',
- user_from varchar(100) NOT NULL DEFAULT '',
- user_icq varchar(15) NOT NULL DEFAULT '',
- user_aim varchar(255) NOT NULL DEFAULT '',
- user_yim varchar(255) NOT NULL DEFAULT '',
- user_msnm varchar(255) NOT NULL DEFAULT '',
- user_jabber varchar(255) NOT NULL DEFAULT '',
- user_website varchar(200) NOT NULL DEFAULT '',
- user_occ text(65535) NOT NULL DEFAULT '',
- user_interests text(65535) NOT NULL DEFAULT '',
- user_actkey varchar(32) NOT NULL DEFAULT '',
- user_newpasswd varchar(40) NOT NULL DEFAULT '',
- user_form_salt varchar(32) NOT NULL DEFAULT '',
- user_new INTEGER UNSIGNED NOT NULL DEFAULT '1',
- user_reminded tinyint(4) NOT NULL DEFAULT '0',
- user_reminded_time INTEGER UNSIGNED NOT NULL DEFAULT '0'
-);
-
-CREATE INDEX phpbb_users_user_birthday ON phpbb_users (user_birthday);
-CREATE INDEX phpbb_users_user_email_hash ON phpbb_users (user_email_hash);
-CREATE INDEX phpbb_users_user_type ON phpbb_users (user_type);
-CREATE UNIQUE INDEX phpbb_users_username_clean ON phpbb_users (username_clean);
-
-# Table: 'phpbb_warnings'
-CREATE TABLE phpbb_warnings (
- warning_id INTEGER PRIMARY KEY NOT NULL ,
- user_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
- post_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
- log_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
- warning_time INTEGER UNSIGNED NOT NULL DEFAULT '0'
-);
-
-
-# Table: 'phpbb_words'
-CREATE TABLE phpbb_words (
- word_id INTEGER PRIMARY KEY NOT NULL ,
- word varchar(255) NOT NULL DEFAULT '',
- replacement varchar(255) NOT NULL DEFAULT ''
-);
-
-
-# Table: 'phpbb_zebra'
-CREATE TABLE phpbb_zebra (
- user_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
- zebra_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
- friend INTEGER UNSIGNED NOT NULL DEFAULT '0',
- foe INTEGER UNSIGNED NOT NULL DEFAULT '0',
- PRIMARY KEY (user_id, zebra_id)
-);
-
-
-
-COMMIT; \ No newline at end of file
diff --git a/phpBB/language/en/acp/attachments.php b/phpBB/language/en/acp/attachments.php
index 6aeb3c2188..c7d68d29c2 100644
--- a/phpBB/language/en/acp/attachments.php
+++ b/phpBB/language/en/acp/attachments.php
@@ -4,9 +4,8 @@
* acp_attachments [English]
*
* @package language
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -62,6 +61,7 @@ $lang = array_merge($lang, array(
'ATTACH_MAX_PM_FILESIZE_EXPLAIN' => 'Maximum size of each file, with 0 being unlimited, attached to a private message.',
'ATTACH_ORPHAN_URL' => 'Orphan attachments',
'ATTACH_POST_ID' => 'Post ID',
+ 'ATTACH_POST_TYPE' => 'Post type',
'ATTACH_QUOTA' => 'Total attachment quota',
'ATTACH_QUOTA_EXPLAIN' => 'Maximum drive space available for attachments for the whole board, with 0 being unlimited.',
'ATTACH_TO_POST' => 'Attach file to post',
@@ -170,5 +170,3 @@ $lang = array_merge($lang, array(
'UPLOAD_ICON' => 'Upload icon',
'UPLOAD_NOT_DIR' => 'The upload location you specified does not appear to be a directory.',
));
-
-?> \ No newline at end of file
diff --git a/phpBB/language/en/acp/ban.php b/phpBB/language/en/acp/ban.php
index bc547b6d8f..68a68ebe54 100644
--- a/phpBB/language/en/acp/ban.php
+++ b/phpBB/language/en/acp/ban.php
@@ -4,9 +4,8 @@
* acp_ban [English]
*
* @package language
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -41,7 +40,7 @@ $lang = array_merge($lang, array(
'30_MINS' => '30 minutes',
'6_HOURS' => '6 hours',
- 'ACP_BAN_EXPLAIN' => 'Here you can control the banning of users by name, IP or e-mail address. These methods prevent a user reaching any part of the board. You can give a short (maximum 3000 characters) reason for the ban if you wish. This will be displayed in the admin log. The duration of a ban can also be specified. If you want the ban to end on a specific date rather than after a set time period select <span style="text-decoration: underline;">Until -&gt;</span> for the ban length and enter a date in <kbd>YYYY-MM-DD</kbd> format.',
+ 'ACP_BAN_EXPLAIN' => 'Here you can control the banning of users by name, IP or email address. These methods prevent a user reaching any part of the board. You can give a short (maximum 3000 characters) reason for the ban if you wish. This will be displayed in the admin log. The duration of a ban can also be specified. If you want the ban to end on a specific date rather than after a set time period select <span style="text-decoration: underline;">Until -&gt;</span> for the ban length and enter a date in <kbd>YYYY-MM-DD</kbd> format.',
'BAN_EXCLUDE' => 'Exclude from banning',
'BAN_LENGTH' => 'Length of ban',
@@ -51,12 +50,12 @@ $lang = array_merge($lang, array(
'BANNED_UNTIL_DATE' => 'until %s', // Example: "until Mon 13.Jul.2009, 14:44"
'BANNED_UNTIL_DURATION' => '%1$s (until %2$s)', // Example: "7 days (until Tue 14.Jul.2009, 14:44)"
- 'EMAIL_BAN' => 'Ban one or more e-mail addresses',
- 'EMAIL_BAN_EXCLUDE_EXPLAIN' => 'Enable this to exclude the entered e-mail address from all current bans.',
- 'EMAIL_BAN_EXPLAIN' => 'To specify more than one e-mail address enter each on a new line. To match partial addresses use * as the wildcard, e.g. <samp>*@hotmail.com</samp>, <samp>*@*.domain.tld</samp>, etc.',
- 'EMAIL_NO_BANNED' => 'No banned e-mail addresses',
- 'EMAIL_UNBAN' => 'Un-ban or un-exclude e-mails',
- 'EMAIL_UNBAN_EXPLAIN' => 'You can unban (or un-exclude) multiple e-mail addresses in one go using the appropriate combination of mouse and keyboard for your computer and browser. Excluded e-mail addresses are emphasised.',
+ 'EMAIL_BAN' => 'Ban one or more email addresses',
+ 'EMAIL_BAN_EXCLUDE_EXPLAIN' => 'Enable this to exclude the entered email address from all current bans.',
+ 'EMAIL_BAN_EXPLAIN' => 'To specify more than one email address enter each on a new line. To match partial addresses use * as the wildcard, e.g. <samp>*@hotmail.com</samp>, <samp>*@*.domain.tld</samp>, etc.',
+ 'EMAIL_NO_BANNED' => 'No banned email addresses',
+ 'EMAIL_UNBAN' => 'Un-ban or un-exclude emails',
+ 'EMAIL_UNBAN_EXPLAIN' => 'You can unban (or un-exclude) multiple email addresses in one go using the appropriate combination of mouse and keyboard for your computer and browser. Excluded email addresses are emphasised.',
'IP_BAN' => 'Ban one or more IPs',
'IP_BAN_EXCLUDE_EXPLAIN' => 'Enable this to exclude the entered IP from all current bans.',
@@ -81,5 +80,3 @@ $lang = array_merge($lang, array(
'USER_UNBAN' => 'Un-ban or un-exclude users by username',
'USER_UNBAN_EXPLAIN' => 'You can unban (or un-exclude) multiple users in one go using the appropriate combination of mouse and keyboard for your computer and browser. Excluded users are emphasised.',
));
-
-?> \ No newline at end of file
diff --git a/phpBB/language/en/acp/board.php b/phpBB/language/en/acp/board.php
index f9a40c2bc7..1d2c979e0c 100644
--- a/phpBB/language/en/acp/board.php
+++ b/phpBB/language/en/acp/board.php
@@ -4,9 +4,8 @@
* acp_board [English]
*
* @package language
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -38,6 +37,8 @@ if (empty($lang) || !is_array($lang))
// Board Settings
$lang = array_merge($lang, array(
'ACP_BOARD_SETTINGS_EXPLAIN' => 'Here you can determine the basic operation of your board, give it a fitting name and description, and among other settings adjust the default values for timezone and language.',
+ 'BOARD_INDEX_TEXT' => 'Board index text',
+ 'BOARD_INDEX_TEXT_EXPLAIN' => 'This text is displayed as the board index in the board’s breadcrumbs. If not specified, it will default to “Board index”.',
'CUSTOM_DATEFORMAT' => 'Custom…',
'DEFAULT_DATE_FORMAT' => 'Date format',
'DEFAULT_DATE_FORMAT_EXPLAIN' => 'The date format is the same as the PHP <code>date</code> function.',
@@ -45,11 +46,16 @@ $lang = array_merge($lang, array(
'DEFAULT_STYLE' => 'Default style',
'DISABLE_BOARD' => 'Disable board',
'DISABLE_BOARD_EXPLAIN' => 'This will make the board unavailable to users who are neither administrators nor moderators. You can also enter a short (255 character) message to display if you wish.',
+ 'DISPLAY_LAST_SUBJECT' => 'Display subject of last added post on forum list',
+ 'DISPLAY_LAST_SUBJECT_EXPLAIN' => 'The subject of the last added post will be displayed in the forum list with a hyperlink to the post. Subjects from password protected forums and forums in which user doesn’t have read access are not shown.',
'OVERRIDE_STYLE' => 'Override user style',
'OVERRIDE_STYLE_EXPLAIN' => 'Replaces user’s style with the default.',
'SITE_DESC' => 'Site description',
+ 'SITE_HOME_TEXT' => 'Main website text',
+ 'SITE_HOME_TEXT_EXPLAIN' => 'This text will be displayed as a link to your website homepage in the board’s breadcrumbs. If not specified, it will default to “Home”.',
+ 'SITE_HOME_URL' => 'Main website URL',
+ 'SITE_HOME_URL_EXPLAIN' => 'If specified, a link to this URL will be prepended to your board’s breadcrumbs and the board logo will link to this URL instead of the forum index. An absolute URL is required, e.g. <samp>http://www.phpbb.com</samp>.',
'SITE_NAME' => 'Site name',
- 'SYSTEM_DST' => 'Enable Summer Time/<abbr title="Daylight Saving Time">DST</abbr>',
'SYSTEM_TIMEZONE' => 'Guest timezone',
'SYSTEM_TIMEZONE_EXPLAIN' => 'Timezone to use for displaying times to users who are not logged in (guests, bots). Logged in users set their timezone during registration and can change it in their user control panel.',
'WARNINGS_EXPIRE' => 'Warning duration',
@@ -95,6 +101,7 @@ $lang = array_merge($lang, array(
'ALLOW_AVATARS' => 'Enable avatars',
'ALLOW_AVATARS_EXPLAIN' => 'Allow general usage of avatars;<br />If you disable avatars in general or avatars of a certain mode, the disabled avatars will no longer be shown on the board, but users will still be able to download their own avatars in the User Control Panel.',
+ 'ALLOW_GRAVATAR' => 'Enable gravatar avatars',
'ALLOW_LOCAL' => 'Enable gallery avatars',
'ALLOW_REMOTE' => 'Enable remote avatars',
'ALLOW_REMOTE_EXPLAIN' => 'Avatars linked to from another website.',
@@ -208,7 +215,7 @@ $lang = array_merge($lang, array(
'ACP_REGISTER_SETTINGS_EXPLAIN' => 'Here you are able to define registration and profile related settings.',
'ACC_ACTIVATION' => 'Account activation',
- 'ACC_ACTIVATION_EXPLAIN' => 'This determines whether users have immediate access to the board or if confirmation is required. You can also completely disable new registrations. “Board-wide e-mail” must be enabled in order to use user or admin activation.',
+ 'ACC_ACTIVATION_EXPLAIN' => 'This determines whether users have immediate access to the board or if confirmation is required. You can also completely disable new registrations. “Board-wide email” must be enabled in order to use user or admin activation.',
'NEW_MEMBER_POST_LIMIT' => 'New member post limit',
'NEW_MEMBER_POST_LIMIT_EXPLAIN' => 'New members are within the <em>Newly Registered Users</em> group until they reach this number of posts. You can use this group to keep them from using the PM system or to review their posts. <strong>A value of 0 disables this feature.</strong>',
'NEW_MEMBER_GROUP_DEFAULT' => 'Set Newly Registered Users group to default',
@@ -217,10 +224,10 @@ $lang = array_merge($lang, array(
'ACC_ADMIN' => 'By admin',
'ACC_DISABLE' => 'Disable registration',
'ACC_NONE' => 'No activation (immediate access)',
- 'ACC_USER' => 'By user (e-mail verification)',
+ 'ACC_USER' => 'By user (email verification)',
// 'ACC_USER_ADMIN' => 'User + Admin',
- 'ALLOW_EMAIL_REUSE' => 'Allow e-mail address re-use',
- 'ALLOW_EMAIL_REUSE_EXPLAIN' => 'Different users can register with the same e-mail address.',
+ 'ALLOW_EMAIL_REUSE' => 'Allow email address re-use',
+ 'ALLOW_EMAIL_REUSE_EXPLAIN' => 'Different users can register with the same email address.',
'COPPA' => 'COPPA',
'COPPA_FAX' => 'COPPA fax number',
'COPPA_MAIL' => 'COPPA mailing address',
@@ -347,16 +354,21 @@ $lang = array_merge($lang, array(
$lang = array_merge($lang, array(
'ACP_LOAD_SETTINGS_EXPLAIN' => 'Here you can enable and disable certain board functions to reduce the amount of processing required. On most servers there is no need to disable any functions. However on certain systems or in shared hosting environments it may be beneficial to disable capabilities you do not really need. You can also specify limits for system load and active sessions beyond which the board will go offline.',
+ 'ALLOW_CDN' => 'Allow usage of third party content delivery networks',
+ 'ALLOW_CDN_EXPLAIN' => 'If this setting is enabled, some files will be served from external third party servers instead of your server. This reduces the network bandwidth required by your server, but may present a privacy issue for some board administrators. In a default phpBB installation, this includes loading “jQuery” and the font “Open Sans” from Google’s content delivery network.',
'CUSTOM_PROFILE_FIELDS' => 'Custom profile fields',
'LIMIT_LOAD' => 'Limit system load',
'LIMIT_LOAD_EXPLAIN' => 'If the system’s 1-minute load average exceeds this value the board will automatically go offline. A value of 1.0 equals ~100% utilisation of one processor. This only functions on UNIX based servers and where this information is accessible. The value here resets itself to 0 if phpBB was unable to get the load limit.',
'LIMIT_SESSIONS' => 'Limit sessions',
'LIMIT_SESSIONS_EXPLAIN' => 'If the number of sessions exceeds this value within a one minute period the board will go offline. Set to 0 for unlimited sessions.',
'LOAD_CPF_MEMBERLIST' => 'Allow styles to display custom profile fields in memberlist',
+ 'LOAD_CPF_PM' => 'Display custom profile fields in private messages',
'LOAD_CPF_VIEWPROFILE' => 'Display custom profile fields in user profiles',
'LOAD_CPF_VIEWTOPIC' => 'Display custom profile fields on topic pages',
'LOAD_USER_ACTIVITY' => 'Show user’s activity',
'LOAD_USER_ACTIVITY_EXPLAIN' => 'Displays active topic/forum in user profiles and user control panel. It is recommended to disable this on boards with more than one million posts.',
+ 'READ_NOTIFICATION_EXPIRE_DAYS' => 'Read Notification Expiration',
+ 'READ_NOTIFICATION_EXPIRE_DAYS_EXPLAIN' => 'Number of days that will elapse before a read notification will automatically be deleted. Set this value to 0 to make notifications permanent.',
'RECOMPILE_STYLES' => 'Recompile stale style components',
'RECOMPILE_STYLES_EXPLAIN' => 'Check for updated style components on filesystem and recompile.',
'YES_ANON_READ_MARKING' => 'Enable topic marking for guests',
@@ -380,18 +392,24 @@ $lang = array_merge($lang, array(
// Auth settings
$lang = array_merge($lang, array(
- 'ACP_AUTH_SETTINGS_EXPLAIN' => 'phpBB supports authentication plug-ins, or modules. These allow you determine how users are authenticated when they log into the board. By default three plug-ins are provided; DB, LDAP and Apache. Not all methods require additional information so only fill out fields if they are relevant to the selected method.',
+ 'ACP_AUTH_SETTINGS_EXPLAIN' => 'phpBB supports authentication plug-ins, or modules. These allow you determine how users are authenticated when they log into the board. By default four plug-ins are provided: DB, LDAP, Apache, and OAuth. Not all methods require additional information so only fill out fields if they are relevant to the selected method.',
'AUTH_METHOD' => 'Select an authentication method',
+ 'AUTH_PROVIDER_OAUTH_ERROR_ELEMENT_MISSING' => 'Both the key and secret of each enabled OAuth service provider must be provided. Only one was provided for an OAuth service provider.',
+ 'AUTH_PROVIDER_OAUTH_EXPLAIN' => 'Each OAuth provider requires a unique secret and key in order to authenticate with the external server.<br />These should be supplied by the OAuth service when you register your website with them and should be entered exactly as provided to you.<br />Any service that does not have both a key and a secret entered here will not be available for use by the forum users.',
+ 'AUTH_PROVIDER_OAUTH_KEY' => 'Key',
+ 'AUTH_PROVIDER_OAUTH_TITLE' => 'OAuth',
+ 'AUTH_PROVIDER_OAUTH_SECRET' => 'Secret',
+
'APACHE_SETUP_BEFORE_USE' => 'You have to setup apache authentication before you switch phpBB to this authentication method. Keep in mind that the username you use for apache authentication has to be the same as your phpBB username. Apache authentication can only be used with mod_php (not with a CGI version) and safe_mode disabled.',
'LDAP_DN' => 'LDAP base <var>dn</var>',
'LDAP_DN_EXPLAIN' => 'This is the Distinguished Name, locating the user information, e.g. <samp>o=My Company,c=US</samp>.',
- 'LDAP_EMAIL' => 'LDAP e-mail attribute',
- 'LDAP_EMAIL_EXPLAIN' => 'Set this to the name of your user entry e-mail attribute (if one exists) in order to automatically set the e-mail address for new users. Leaving this empty results in empty e-mail address for users who log in for the first time.',
+ 'LDAP_EMAIL' => 'LDAP email attribute',
+ 'LDAP_EMAIL_EXPLAIN' => 'Set this to the name of your user entry email attribute (if one exists) in order to automatically set the email address for new users. Leaving this empty results in empty email address for users who log in for the first time.',
'LDAP_INCORRECT_USER_PASSWORD' => 'Binding to LDAP server failed with specified user/password.',
- 'LDAP_NO_EMAIL' => 'The specified e-mail attribute does not exist.',
+ 'LDAP_NO_EMAIL' => 'The specified email attribute does not exist.',
'LDAP_NO_IDENTITY' => 'Could not find a login identity for %s.',
'LDAP_PASSWORD' => 'LDAP password',
'LDAP_PASSWORD_EXPLAIN' => 'Leave blank to use anonymous binding, otherwise fill in the password for the above user. Required for Active Directory Servers.<br /><em><strong>Warning:</strong> This password will be stored as plain text in the database, visible to everybody who can access your database or who can view this configuration page.</em>',
@@ -409,7 +427,7 @@ $lang = array_merge($lang, array(
// Server Settings
$lang = array_merge($lang, array(
- 'ACP_SERVER_SETTINGS_EXPLAIN' => 'Here you define server and domain dependant settings. Please ensure the data you enter is accurate, errors will result in e-mails containing incorrect information. When entering the domain name remember it does include http:// or other protocol term. Only alter the port number if you know your server uses a different value, port 80 is correct in most cases.',
+ 'ACP_SERVER_SETTINGS_EXPLAIN' => 'Here you define server and domain dependent settings. Please ensure the data you enter is accurate, errors will result in emails containing incorrect information. When entering the domain name remember it does include http:// or other protocol term. Only alter the port number if you know your server uses a different value, port 80 is correct in most cases.',
'ENABLE_GZIP' => 'Enable GZip compression',
'ENABLE_GZIP_EXPLAIN' => 'Generated content will be compressed prior to sending it to the user. This can reduce network traffic but will also increase CPU usage on both server and client side. Requires zlib PHP extension to be loaded.',
@@ -417,6 +435,10 @@ $lang = array_merge($lang, array(
'FORCE_SERVER_VARS_EXPLAIN' => 'If set to yes the server settings defined here will be used in favour of the automatically determined values.',
'ICONS_PATH' => 'Post icons storage path',
'ICONS_PATH_EXPLAIN' => 'Path under your phpBB root directory, e.g. <samp>images/icons</samp>.',
+ 'MOD_REWRITE_ENABLE' => 'Enable URL Rewriting',
+ 'MOD_REWRITE_ENABLE_EXPLAIN' => 'When enabled, URLs containing ’app.php’ will be rewritten to remove the filename (i.e. app.php/foo will become /foo). <strong>Apache server’s mod_rewrite module is required for this functionality to work; if this option is enabled without mod_rewrite support, URLs on your board may be broken.</strong>',
+ 'MOD_REWRITE_DISABLED' => 'The <strong>mod_rewrite</strong> module on your Apache web server is disabled. Enable the module or contact your web hosting provider if you wish to enable this feature.',
+ 'MOD_REWRITE_INFORMATION_UNAVAILABLE' => 'We are unable to determine whether or not this server supports URL rewriting. This setting may be enabled but if URL rewriting is not available, paths generated by this board (such as for use in links) may be broken. Contact your web hosting provider if you are unsure whether or not you can safely enable this feature.',
'PATH_SETTINGS' => 'Path settings',
'RANKS_PATH' => 'Rank image storage path',
'RANKS_PATH_EXPLAIN' => 'Path under your phpBB root directory, e.g. <samp>images/ranks</samp>.',
@@ -433,6 +455,8 @@ $lang = array_merge($lang, array(
'SMILIES_PATH_EXPLAIN' => 'Path under your phpBB root directory, e.g. <samp>images/smilies</samp>.',
'UPLOAD_ICONS_PATH' => 'Extension group icons storage path',
'UPLOAD_ICONS_PATH_EXPLAIN' => 'Path under your phpBB root directory, e.g. <samp>images/upload_icons</samp>.',
+ 'USE_SYSTEM_CRON' => 'Run periodic tasks from system cron',
+ 'USE_SYSTEM_CRON_EXPLAIN' => 'When off, phpBB will arrange for periodic tasks to be run automatically. When on, phpBB will not schedule any periodic tasks by itself; a system administrator must arrange for <code>cron.php</code> to be invoked by the system cron facility at regular intervals (e.g. every 5 minutes).',
));
// Security Settings
@@ -440,18 +464,20 @@ $lang = array_merge($lang, array(
'ACP_SECURITY_SETTINGS_EXPLAIN' => 'Here you are able to define session and login related settings.',
'ALL' => 'All',
- 'ALLOW_AUTOLOGIN' => 'Allow persistent logins',
- 'ALLOW_AUTOLOGIN_EXPLAIN' => 'Determines whether users can autologin when they visit the board.',
- 'AUTOLOGIN_LENGTH' => 'Persistent login key expiration length (in days)',
- 'AUTOLOGIN_LENGTH_EXPLAIN' => 'Number of days after which persistent login keys are removed or zero to disable.',
+ 'ALLOW_AUTOLOGIN' => 'Allow "Remember Me" logins',
+ 'ALLOW_AUTOLOGIN_EXPLAIN' => 'Determines whether users are given "Remember Me" option when they visit the board.',
+ 'ALLOW_PASSWORD_RESET' => 'Allow password reset ("Forgot Password")',
+ 'ALLOW_PASSWORD_RESET_EXPLAIN' => 'Determines whether or not users are able to use the "I forgot my password" link on the login page to recover their account. If you use an external authentication mechanism you may wish to disable this feature.',
+ 'AUTOLOGIN_LENGTH' => '"Remember Me" login key expiration length (in days)',
+ 'AUTOLOGIN_LENGTH_EXPLAIN' => 'Number of days after which "Remember Me" login keys are removed or zero to disable.',
'BROWSER_VALID' => 'Validate browser',
'BROWSER_VALID_EXPLAIN' => 'Enables browser validation for each session improving security.',
'CHECK_DNSBL' => 'Check IP against DNS Blackhole List',
'CHECK_DNSBL_EXPLAIN' => 'If enabled the user’s IP address is checked against the following DNSBL services on registration and posting: <a href="http://spamcop.net">spamcop.net</a> and <a href="http://www.spamhaus.org">www.spamhaus.org</a>. This lookup may take a while, depending on the server’s configuration. If slowdowns are experienced or too many false positives reported it is recommended to disable this check.',
'CLASS_B' => 'A.B',
'CLASS_C' => 'A.B.C',
- 'EMAIL_CHECK_MX' => 'Check e-mail domain for valid MX record',
- 'EMAIL_CHECK_MX_EXPLAIN' => 'If enabled, the e-mail domain provided on registration and profile changes is checked for a valid MX record.',
+ 'EMAIL_CHECK_MX' => 'Check email domain for valid MX record',
+ 'EMAIL_CHECK_MX_EXPLAIN' => 'If enabled, the email domain provided on registration and profile changes is checked for a valid MX record.',
'FORCE_PASS_CHANGE' => 'Force password change',
'FORCE_PASS_CHANGE_EXPLAIN' => 'Require user to change their password after a set number of days. Setting this value to 0 disables this behaviour.',
'FORM_TIME_MAX' => 'Maximum time to submit forms',
@@ -488,24 +514,24 @@ $lang = array_merge($lang, array(
// Email Settings
$lang = array_merge($lang, array(
- 'ACP_EMAIL_SETTINGS_EXPLAIN' => 'This information is used when the board sends e-mails to your users. Please ensure the e-mail address you specify is valid, any bounced or undeliverable messages will likely be sent to that address. If your host does not provide a native (PHP based) e-mail service you can instead send messages directly using SMTP. This requires the address of an appropriate server (ask your provider if necessary). If the server requires authentication (and only if it does) enter the necessary username, password and authentication method.',
-
- 'ADMIN_EMAIL' => 'Return e-mail address',
- 'ADMIN_EMAIL_EXPLAIN' => 'This will be used as the return address on all e-mails, the technical contact e-mail address. It will always be used as the <samp>Return-Path</samp> and <samp>Sender</samp> address in e-mails.',
- 'BOARD_EMAIL_FORM' => 'Users send e-mail via board',
- 'BOARD_EMAIL_FORM_EXPLAIN' => 'Instead of showing the users e-mail address users are able to send e-mails via the board.',
- 'BOARD_HIDE_EMAILS' => 'Hide e-mail addresses',
- 'BOARD_HIDE_EMAILS_EXPLAIN' => 'This function keeps e-mail addresses completely private.',
- 'CONTACT_EMAIL' => 'Contact e-mail address',
- 'CONTACT_EMAIL_EXPLAIN' => 'This address will be used whenever a specific contact point is needed, e.g. spam, error output, etc. It will always be used as the <samp>From</samp> and <samp>Reply-To</samp> address in e-mails.',
- 'EMAIL_FUNCTION_NAME' => 'E-mail function name',
- 'EMAIL_FUNCTION_NAME_EXPLAIN' => 'The e-mail function used to send mails through PHP.',
- 'EMAIL_PACKAGE_SIZE' => 'E-mail package size',
- 'EMAIL_PACKAGE_SIZE_EXPLAIN' => 'This is the number of maximum e-mails sent out in one package. This setting is applied to the internal message queue; set this value to 0 if you have problems with non-delivered notification e-mails.',
- 'EMAIL_SIG' => 'E-mail signature',
- 'EMAIL_SIG_EXPLAIN' => 'This text will be attached to all e-mails the board sends.',
- 'ENABLE_EMAIL' => 'Enable board-wide e-mails',
- 'ENABLE_EMAIL_EXPLAIN' => 'If this is set to disabled no e-mails will be sent by the board at all. <em>Note the user and admin account activation settings require this setting to be enabled. If currently using “user” or “admin” activation in the activation settings, disabling this setting will require no activation of new accounts.</em>',
+ 'ACP_EMAIL_SETTINGS_EXPLAIN' => 'This information is used when the board sends emails to your users. Please ensure the email address you specify is valid, any bounced or undeliverable messages will likely be sent to that address. If your host does not provide a native (PHP based) email service you can instead send messages directly using SMTP. This requires the address of an appropriate server (ask your provider if necessary). If the server requires authentication (and only if it does) enter the necessary username, password and authentication method.',
+
+ 'ADMIN_EMAIL' => 'Return email address',
+ 'ADMIN_EMAIL_EXPLAIN' => 'This will be used as the return address on all emails, the technical contact email address. It will always be used as the <samp>Return-Path</samp> and <samp>Sender</samp> address in emails.',
+ 'BOARD_EMAIL_FORM' => 'Users send email via board',
+ 'BOARD_EMAIL_FORM_EXPLAIN' => 'Instead of showing the users email address users are able to send emails via the board.',
+ 'BOARD_HIDE_EMAILS' => 'Hide email addresses',
+ 'BOARD_HIDE_EMAILS_EXPLAIN' => 'This function keeps email addresses completely private.',
+ 'CONTACT_EMAIL' => 'Contact email address',
+ 'CONTACT_EMAIL_EXPLAIN' => 'This address will be used whenever a specific contact point is needed, e.g. spam, error output, etc. It will always be used as the <samp>From</samp> and <samp>Reply-To</samp> address in emails.',
+ 'EMAIL_FUNCTION_NAME' => 'Email function name',
+ 'EMAIL_FUNCTION_NAME_EXPLAIN' => 'The email function used to send mails through PHP.',
+ 'EMAIL_PACKAGE_SIZE' => 'Email package size',
+ 'EMAIL_PACKAGE_SIZE_EXPLAIN' => 'This is the number of maximum emails sent out in one package. This setting is applied to the internal message queue; set this value to 0 if you have problems with non-delivered notification emails.',
+ 'EMAIL_SIG' => 'Email signature',
+ 'EMAIL_SIG_EXPLAIN' => 'This text will be attached to all emails the board sends.',
+ 'ENABLE_EMAIL' => 'Enable board-wide emails',
+ 'ENABLE_EMAIL_EXPLAIN' => 'If this is set to disabled no emails will be sent by the board at all. <em>Note the user and admin account activation settings require this setting to be enabled. If currently using “user” or “admin” activation in the activation settings, disabling this setting will require no activation of new accounts.</em>',
'SMTP_AUTH_METHOD' => 'Authentication method for SMTP',
'SMTP_AUTH_METHOD_EXPLAIN' => 'Only used if a username/password is set, ask your provider if you are unsure which method to use.',
'SMTP_CRAM_MD5' => 'CRAM-MD5',
@@ -521,8 +547,8 @@ $lang = array_merge($lang, array(
'SMTP_SETTINGS' => 'SMTP settings',
'SMTP_USERNAME' => 'SMTP username',
'SMTP_USERNAME_EXPLAIN' => 'Only enter a username if your SMTP server requires it.',
- 'USE_SMTP' => 'Use SMTP server for e-mail',
- 'USE_SMTP_EXPLAIN' => 'Select “Yes” if you want or have to send e-mail via a named server instead of the local mail function.',
+ 'USE_SMTP' => 'Use SMTP server for email',
+ 'USE_SMTP_EXPLAIN' => 'Select “Yes” if you want or have to send email via a named server instead of the local mail function.',
));
// Jabber settings
@@ -546,5 +572,3 @@ $lang = array_merge($lang, array(
'JAB_USERNAME' => 'Jabber username or JID',
'JAB_USERNAME_EXPLAIN' => 'Specify a registered username or a valid JID. The username will not be checked for validity. If you only specify a username, then your JID will be the username and the server you specified above. Else, specify a valid JID, for example user@jabber.org.',
));
-
-?> \ No newline at end of file
diff --git a/phpBB/language/en/acp/bots.php b/phpBB/language/en/acp/bots.php
index 3b63f2ea2e..b8e1e9742f 100644
--- a/phpBB/language/en/acp/bots.php
+++ b/phpBB/language/en/acp/bots.php
@@ -4,9 +4,8 @@
* acp_bots [English]
*
* @package language
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -69,5 +68,3 @@ $lang = array_merge($lang, array(
'NO_BOT' => 'Found no bot with the specified ID.',
'NO_BOT_GROUP' => 'Unable to find special bot group.',
));
-
-?> \ No newline at end of file
diff --git a/phpBB/language/en/acp/common.php b/phpBB/language/en/acp/common.php
index f2ab15335d..cf32c7c225 100644
--- a/phpBB/language/en/acp/common.php
+++ b/phpBB/language/en/acp/common.php
@@ -4,9 +4,8 @@
* acp_common [English]
*
* @package language
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -48,7 +47,7 @@ $lang = array_merge($lang, array(
'ACP_BACKUP' => 'Backup',
'ACP_BAN' => 'Banning',
- 'ACP_BAN_EMAILS' => 'Ban e-mails',
+ 'ACP_BAN_EMAILS' => 'Ban emails',
'ACP_BAN_IPS' => 'Ban IPs',
'ACP_BAN_USERNAMES' => 'Ban users',
'ACP_BBCODES' => 'BBCodes',
@@ -60,8 +59,9 @@ $lang = array_merge($lang, array(
'ACP_CAPTCHA' => 'CAPTCHA',
+ 'ACP_CAT_CUSTOMISE' => 'Customise',
'ACP_CAT_DATABASE' => 'Database',
- 'ACP_CAT_DOT_MODS' => '.MODs',
+ 'ACP_CAT_DOT_MODS' => 'Extensions',
'ACP_CAT_FORUMS' => 'Forums',
'ACP_CAT_GENERAL' => 'General',
'ACP_CAT_MAINTENANCE' => 'Maintenance',
@@ -80,8 +80,11 @@ $lang = array_merge($lang, array(
'ACP_DISALLOW' => 'Disallow',
'ACP_DISALLOW_USERNAMES' => 'Disallow usernames',
- 'ACP_EMAIL_SETTINGS' => 'E-mail settings',
- 'ACP_EXTENSION_GROUPS' => 'Manage extension groups',
+ 'ACP_EMAIL_SETTINGS' => 'Email settings',
+ 'ACP_EXTENSION_GROUPS' => 'Manage attachment extension groups',
+ 'ACP_EXTENSION_MANAGEMENT' => 'Extension management',
+ 'ACP_EXTENSIONS' => 'Manage extensions',
+
'ACP_FORUM_BASED_PERMISSIONS' => 'Forum based permissions',
'ACP_FORUM_LOGS' => 'Forum logs',
@@ -100,10 +103,10 @@ $lang = array_merge($lang, array(
'ACP_GROUPS_MANAGE' => 'Manage groups',
'ACP_GROUPS_MANAGEMENT' => 'Group management',
'ACP_GROUPS_PERMISSIONS' => 'Group permissions',
+ 'ACP_GROUPS_POSITION' => 'Manage group positions',
'ACP_ICONS' => 'Topic icons',
'ACP_ICONS_SMILIES' => 'Topic icons/smilies',
- 'ACP_IMAGESETS' => 'Imagesets',
'ACP_INACTIVE_USERS' => 'Inactive users',
'ACP_INDEX' => 'ACP index',
@@ -115,12 +118,16 @@ $lang = array_merge($lang, array(
'ACP_LOGGING' => 'Logging',
'ACP_MAIN' => 'ACP index',
- 'ACP_MANAGE_EXTENSIONS' => 'Manage extensions',
+
+ 'ACP_MANAGE_ATTACHMENTS' => 'Manage attachments',
+ 'ACP_MANAGE_ATTACHMENTS_EXPLAIN' => 'Here you can list and delete files attached to posts and private messages.',
+
+ 'ACP_MANAGE_EXTENSIONS' => 'Manage attachment extensions',
'ACP_MANAGE_FORUMS' => 'Manage forums',
'ACP_MANAGE_RANKS' => 'Manage ranks',
'ACP_MANAGE_REASONS' => 'Manage report/denial reasons',
'ACP_MANAGE_USERS' => 'Manage users',
- 'ACP_MASS_EMAIL' => 'Mass e-mail',
+ 'ACP_MASS_EMAIL' => 'Mass email',
'ACP_MESSAGES' => 'Messages',
'ACP_MESSAGE_SETTINGS' => 'Private message settings',
'ACP_MODULE_MANAGEMENT' => 'Module management',
@@ -162,9 +169,10 @@ $lang = array_merge($lang, array(
'ACP_SERVER_SETTINGS' => 'Server settings',
'ACP_SIGNATURE_SETTINGS' => 'Signature settings',
'ACP_SMILIES' => 'Smilies',
- 'ACP_STYLE_COMPONENTS' => 'Style components',
'ACP_STYLE_MANAGEMENT' => 'Style management',
'ACP_STYLES' => 'Styles',
+ 'ACP_STYLES_CACHE' => 'Purge Cache',
+ 'ACP_STYLES_INSTALL' => 'Install Styles',
'ACP_SUBMIT_CHANGES' => 'Submit changes',
@@ -226,12 +234,16 @@ $lang = array_merge($lang, array(
'DOWNLOAD_AS' => 'Download as',
'DOWNLOAD_STORE' => 'Download or store file',
'DOWNLOAD_STORE_EXPLAIN' => 'You may directly download the file or save it in your <samp>store/</samp> folder.',
+ 'DOWNLOADS' => 'Downloads',
'EDIT' => 'Edit',
'ENABLE' => 'Enable',
'EXPORT_DOWNLOAD' => 'Download',
'EXPORT_STORE' => 'Store',
+ 'FILES_GONE' => 'Some of the attachments you selected for deletion do not exist. They may have been already deleted. Attachments that did exist were deleted.',
+ 'FILES_STATS_WRONG' => 'Your files statistics are probably inaccurate and need to be resynchronised. Actual values: number of attachments = %1$d, total size of attachments = %2$s.',
+
'GENERAL_OPTIONS' => 'General options',
'GENERAL_SETTINGS' => 'General settings',
'GLOBAL_MASK' => 'Global permission mask',
@@ -240,6 +252,8 @@ $lang = array_merge($lang, array(
'IP' => 'User IP',
'IP_HOSTNAME' => 'IP addresses or hostnames',
+ 'LOAD_NOTIFICATIONS' => 'Display Notifications',
+ 'LOAD_NOTIFICATIONS_EXPLAIN' => 'Display the notifications list on every page (typically in the header).',
'LOGGED_IN_AS' => 'You are logged in as:',
'LOGIN_ADMIN' => 'To administer the board you must be an authenticated user.',
'LOGIN_ADMIN_CONFIRM' => 'To administer the board you must re-authenticate yourself.',
@@ -256,7 +270,8 @@ $lang = array_merge($lang, array(
'NOTIFY' => 'Notification',
'NO_ADMIN' => 'You are not authorised to administer this board.',
- 'NO_EMAILS_DEFINED' => 'No valid e-mail addresses found.',
+ 'NO_EMAILS_DEFINED' => 'No valid email addresses found.',
+ 'NO_FILES_TO_DELETE' => 'Attachments you selected for deletion do not exist.',
'NO_PASSWORD_SUPPLIED' => 'You need to enter your password to access the Administration Control Panel.',
'OFF' => 'Off',
@@ -271,7 +286,8 @@ $lang = array_merge($lang, array(
'REMIND' => 'Remind',
'RESYNC' => 'Resynchronise',
- 'RETURN_TO' => 'Return to…',
+ 'RESYNC_FILES_STATS' => 'Resynchronise files statistics',
+ 'RESYNC_FILES_STATS_EXPLAIN' => 'Recalculates the total number and size of files attached to posts and private messages.',
'SELECT_ANONYMOUS' => 'Select anonymous user',
'SELECT_OPTION' => 'Select option',
@@ -283,6 +299,8 @@ $lang = array_merge($lang, array(
'SHOW_ALL_OPERATIONS' => 'Show all operations',
+ 'TOTAL_SIZE' => 'Total size',
+
'UCP' => 'User Control Panel',
'USERNAMES_EXPLAIN' => 'Place each username on a separate line.',
'USER_CONTROL_PANEL' => 'User Control Panel',
@@ -300,7 +318,7 @@ $lang = array_merge($lang, array(
// Logs
$lang = array_merge($lang, array(
'ACP_ADMIN_LOGS_EXPLAIN' => 'This lists all the actions carried out by board administrators. You can sort by username, date, IP or action. If you have appropriate permissions you can also clear individual operations or the log as a whole.',
- 'ACP_CRITICAL_LOGS_EXPLAIN' => 'This lists the actions carried out by the board itself. This log provides you with information you are able to use for solving specific problems, for example non-delivery of e-mails. You can sort by username, date, IP or action. If you have appropriate permissions you can also clear individual operations or the log as a whole.',
+ 'ACP_CRITICAL_LOGS_EXPLAIN' => 'This lists the actions carried out by the board itself. This log provides you with information you are able to use for solving specific problems, for example non-delivery of emails. You can sort by username, date, IP or action. If you have appropriate permissions you can also clear individual operations or the log as a whole.',
'ACP_MOD_LOGS_EXPLAIN' => 'This lists all actions done on forums, topics and posts as well as actions carried out on users by moderators, including banning. You can sort by username, date, IP or action. If you have appropriate permissions you can also clear individual operations or the log as a whole.',
'ACP_USERS_LOGS_EXPLAIN' => 'This lists all actions carried out by users or on users (reports, warnings and user notes).',
'ALL_ENTRIES' => 'All entries',
@@ -342,6 +360,7 @@ $lang = array_merge($lang, array(
'GZIP_COMPRESSION' => 'GZip compression',
+ 'NO_SEARCH_INDEX' => 'The selected search backend does not have a search index.<br />Please create the index for “%1$s” in the %2$ssearch index%3$s section.',
'NOT_AVAILABLE' => 'Not available',
'NUMBER_FILES' => 'Number of attachments',
'NUMBER_POSTS' => 'Number of posts',
@@ -356,29 +375,39 @@ $lang = array_merge($lang, array(
'PURGE_CACHE' => 'Purge the cache',
'PURGE_CACHE_CONFIRM' => 'Are you sure you wish to purge the cache?',
'PURGE_CACHE_EXPLAIN' => 'Purge all cache related items, this includes any cached template files or queries.',
+ 'PURGE_CACHE_SUCCESS' => 'Cache successfully purged.',
'PURGE_SESSIONS' => 'Purge all sessions',
'PURGE_SESSIONS_CONFIRM' => 'Are you sure you wish to purge all sessions? This will log out all users.',
'PURGE_SESSIONS_EXPLAIN' => 'Purge all sessions. This will log out all users by truncating the session table.',
+ 'PURGE_SESSIONS_SUCCESS' => 'Sessions successfully purged.',
'RESET_DATE' => 'Reset board’s start date',
'RESET_DATE_CONFIRM' => 'Are you sure you wish to reset the board’s start date?',
+ 'RESET_DATE_SUCCESS' => 'Board’s start date reset',
'RESET_ONLINE' => 'Reset most users ever online',
'RESET_ONLINE_CONFIRM' => 'Are you sure you wish to reset the most users ever online counter?',
+ 'RESET_ONLINE_SUCCESS' => 'Most users ever online reset',
+ 'RESYNC_FILES_STATS_CONFIRM' => 'Are you sure you wish to resynchronise files statistics?',
'RESYNC_POSTCOUNTS' => 'Resynchronise post counts',
'RESYNC_POSTCOUNTS_EXPLAIN' => 'Only existing posts will be taken into consideration. Pruned posts will not be counted.',
'RESYNC_POSTCOUNTS_CONFIRM' => 'Are you sure you wish to resynchronise post counts?',
+ 'RESYNC_POSTCOUNTS_SUCCESS' => 'Resynchronised post counts',
'RESYNC_POST_MARKING' => 'Resynchronise dotted topics',
'RESYNC_POST_MARKING_CONFIRM' => 'Are you sure you wish to resynchronise dotted topics?',
'RESYNC_POST_MARKING_EXPLAIN' => 'First unmarks all topics and then correctly marks topics that have seen any activity during the past six months.',
+ 'RESYNC_POST_MARKING_SUCCESS' => 'Resynchronised dotted topics',
'RESYNC_STATS' => 'Resynchronise statistics',
'RESYNC_STATS_CONFIRM' => 'Are you sure you wish to resynchronise statistics?',
'RESYNC_STATS_EXPLAIN' => 'Recalculates the total number of posts, topics, users and files.',
+ 'RESYNC_STATS_SUCCESS' => 'Resynchronised statistics',
'RUN' => 'Run now',
'STATISTIC' => 'Statistic',
'STATISTIC_RESYNC_OPTIONS' => 'Resynchronise or reset statistics',
+ 'TIMEZONE_INVALID' => 'The timezone you selected is invalid.',
+ 'TIMEZONE_SELECTED' => '(currently selected)',
'TOPICS_PER_DAY' => 'Topics per day',
'UPLOAD_DIR_SIZE' => 'Size of posted attachments',
@@ -404,8 +433,8 @@ $lang = array_merge($lang, array(
'INACTIVE_REASON_REMIND' => 'Forced user account reactivation',
'INACTIVE_REASON_UNKNOWN' => 'Unknown',
'INACTIVE_USERS' => 'Inactive users',
- 'INACTIVE_USERS_EXPLAIN' => 'This is a list of users who have registered but whose accounts are inactive. You can activate, delete or remind (by sending an e-mail) these users if you wish.',
- 'INACTIVE_USERS_EXPLAIN_INDEX' => 'This is a list of the last 10 registered users who have inactive accounts. Accounts are inactive either because account activation was enabled in user registration settings and these users’ accounts have not yet been activated, or because these accounts have been deactivated. A full list is available by following the link below from where you can activate, delete or remind (by sending an e-mail) these users if you wish.',
+ 'INACTIVE_USERS_EXPLAIN' => 'This is a list of users who have registered but whose accounts are inactive. You can activate, delete or remind (by sending an email) these users if you wish.',
+ 'INACTIVE_USERS_EXPLAIN_INDEX' => 'This is a list of the last 10 registered users who have inactive accounts. Accounts are inactive either because account activation was enabled in user registration settings and these users’ accounts have not yet been activated, or because these accounts have been deactivated. A full list is available by following the link below from where you can activate, delete or remind (by sending an email) these users if you wish.',
'NO_INACTIVE_USERS' => 'No inactive users',
@@ -475,13 +504,13 @@ $lang = array_merge($lang, array(
'LOG_BAN_EXCLUDE_USER' => '<strong>Excluded user from ban</strong> for reason “<em>%1$s</em>”<br />» %2$s',
'LOG_BAN_EXCLUDE_IP' => '<strong>Excluded IP from ban</strong> for reason “<em>%1$s</em>”<br />» %2$s',
- 'LOG_BAN_EXCLUDE_EMAIL' => '<strong>Excluded e-mail from ban</strong> for reason “<em>%1$s</em>”<br />» %2$s',
+ 'LOG_BAN_EXCLUDE_EMAIL' => '<strong>Excluded email from ban</strong> for reason “<em>%1$s</em>”<br />» %2$s',
'LOG_BAN_USER' => '<strong>Banned user</strong> for reason “<em>%1$s</em>”<br />» %2$s',
'LOG_BAN_IP' => '<strong>Banned IP</strong> for reason “<em>%1$s</em>”<br />» %2$s',
- 'LOG_BAN_EMAIL' => '<strong>Banned e-mail</strong> for reason “<em>%1$s</em>”<br />» %2$s',
+ 'LOG_BAN_EMAIL' => '<strong>Banned email</strong> for reason “<em>%1$s</em>”<br />» %2$s',
'LOG_UNBAN_USER' => '<strong>Unbanned user</strong><br />» %s',
'LOG_UNBAN_IP' => '<strong>Unbanned IP</strong><br />» %s',
- 'LOG_UNBAN_EMAIL' => '<strong>Unbanned e-mail</strong><br />» %s',
+ 'LOG_UNBAN_EMAIL' => '<strong>Unbanned email</strong><br />» %s',
'LOG_BBCODE_ADD' => '<strong>Added new BBCode</strong><br />» %s',
'LOG_BBCODE_EDIT' => '<strong>Edited BBCode</strong><br />» %s',
@@ -501,7 +530,7 @@ $lang = array_merge($lang, array(
'LOG_CONFIG_AUTH' => '<strong>Altered authentication settings</strong>',
'LOG_CONFIG_AVATAR' => '<strong>Altered avatar settings</strong>',
'LOG_CONFIG_COOKIE' => '<strong>Altered cookie settings</strong>',
- 'LOG_CONFIG_EMAIL' => '<strong>Altered e-mail settings</strong>',
+ 'LOG_CONFIG_EMAIL' => '<strong>Altered email settings</strong>',
'LOG_CONFIG_FEATURES' => '<strong>Altered board features</strong>',
'LOG_CONFIG_LOAD' => '<strong>Altered load settings</strong>',
'LOG_CONFIG_MESSAGE' => '<strong>Altered private message settings</strong>',
@@ -530,12 +559,17 @@ $lang = array_merge($lang, array(
'LOG_POST_APPROVED' => '<strong>Approved post</strong><br />» %s',
'LOG_POST_DISAPPROVED' => '<strong>Disapproved post “%1$s” with the following reason</strong><br />» %2$s',
'LOG_POST_EDITED' => '<strong>Edited post “%1$s” written by</strong><br />» %2$s',
+ 'LOG_POST_RESTORED' => '<strong>Restored post</strong><br />» %s',
'LOG_REPORT_CLOSED' => '<strong>Closed report</strong><br />» %s',
'LOG_REPORT_DELETED' => '<strong>Deleted report</strong><br />» %s',
+ 'LOG_RESTORE_TOPIC' => '<strong>Restored topic “%1$s” written by</strong><br />» %2$s',
+ 'LOG_SOFTDELETE_POST' => '<strong>Soft deleted post “%1$s” written by</strong><br />» %2$s',
+ 'LOG_SOFTDELETE_TOPIC' => '<strong>Soft deleted topic “%1$s” written by</strong><br />» %2$s',
'LOG_SPLIT_DESTINATION' => '<strong>Moved split posts</strong><br />» to %s',
'LOG_SPLIT_SOURCE' => '<strong>Split posts</strong><br />» from %s',
'LOG_TOPIC_APPROVED' => '<strong>Approved topic</strong><br />» %s',
+ 'LOG_TOPIC_RESTORED' => '<strong>Restored topic</strong><br />» %s',
'LOG_TOPIC_DISAPPROVED' => '<strong>Disapproved topic “%1$s” with the following reason</strong><br />%2$s',
'LOG_TOPIC_RESYNC' => '<strong>Resynchronised topic counters</strong><br />» %s',
'LOG_TOPIC_TYPE_CHANGED' => '<strong>Changed topic type</strong><br />» %s',
@@ -554,7 +588,7 @@ $lang = array_merge($lang, array(
'LOG_DOWNLOAD_REMOVE_IP' => '<strong>Removed IP/hostname from download list</strong><br />» %s',
'LOG_ERROR_JABBER' => '<strong>Jabber error</strong><br />» %s',
- 'LOG_ERROR_EMAIL' => '<strong>E-mail error</strong><br />» %s',
+ 'LOG_ERROR_EMAIL' => '<strong>Email error</strong><br />» %s',
'LOG_FORUM_ADD' => '<strong>Created new forum</strong><br />» %s',
'LOG_FORUM_COPIED_PERMISSIONS' => '<strong>Copied forum permissions</strong> from %1$s<br />» %2$s',
@@ -588,19 +622,9 @@ $lang = array_merge($lang, array(
'LOG_IMAGE_GENERATION_ERROR' => '<strong>Error while creating image</strong><br />» Error in %1$s on line %2$s: %3$s',
- 'LOG_IMAGESET_ADD_DB' => '<strong>Added new imageset to database</strong><br />» %s',
- 'LOG_IMAGESET_ADD_FS' => '<strong>Add new imageset on filesystem</strong><br />» %s',
- 'LOG_IMAGESET_DELETE' => '<strong>Deleted imageset</strong><br />» %s',
- 'LOG_IMAGESET_EDIT_DETAILS' => '<strong>Edited imageset details</strong><br />» %s',
- 'LOG_IMAGESET_EDIT' => '<strong>Edited imageset</strong><br />» %s',
- 'LOG_IMAGESET_EXPORT' => '<strong>Exported imageset</strong><br />» %s',
- 'LOG_IMAGESET_LANG_MISSING' => '<strong>Imageset misses “%2$s” localisation</strong><br />» %1$s',
- 'LOG_IMAGESET_LANG_REFRESHED' => '<strong>Refreshed “%2$s” localisation of imageset</strong><br />» %1$s',
- 'LOG_IMAGESET_REFRESHED' => '<strong>Refreshed imageset</strong><br />» %s',
-
'LOG_INACTIVE_ACTIVATE' => '<strong>Activated inactive users</strong><br />» %s',
'LOG_INACTIVE_DELETE' => '<strong>Deleted inactive users</strong><br />» %s',
- 'LOG_INACTIVE_REMIND' => '<strong>Sent reminder e-mails to inactive users</strong><br />» %s',
+ 'LOG_INACTIVE_REMIND' => '<strong>Sent reminder emails to inactive users</strong><br />» %s',
'LOG_INSTALL_CONVERTED' => '<strong>Converted from %1$s to phpBB %2$s</strong>',
'LOG_INSTALL_INSTALLED' => '<strong>Installed phpBB %s</strong>',
@@ -617,7 +641,7 @@ $lang = array_merge($lang, array(
'LOG_LANGUAGE_FILE_REPLACED' => '<strong>Replaced language file</strong><br />» %s',
'LOG_LANGUAGE_FILE_SUBMITTED' => '<strong>Submitted language file and placed in store folder</strong><br />» %s',
- 'LOG_MASS_EMAIL' => '<strong>Sent mass e-mail</strong><br />» %s',
+ 'LOG_MASS_EMAIL' => '<strong>Sent mass email</strong><br />» %s',
'LOG_MCP_CHANGE_POSTER' => '<strong>Changed poster in topic “%1$s”</strong><br />» from %2$s to %3$s',
@@ -642,6 +666,8 @@ $lang = array_merge($lang, array(
'LOG_U_ROLE_EDIT' => '<strong>User role edited</strong><br />» %s',
'LOG_U_ROLE_REMOVED' => '<strong>User role removed</strong><br />» %s',
+ 'LOG_PLUPLOAD_TIDY_FAILED' => '<strong>Unable to open %1$s for tidying, check permissions.</strong><br />Exception: %2$s<br />Trace: %3$s',
+
'LOG_PROFILE_FIELD_ACTIVATE' => '<strong>Profile field activated</strong><br />» %s',
'LOG_PROFILE_FIELD_CREATE' => '<strong>Profile field added</strong><br />» %s',
'LOG_PROFILE_FIELD_DEACTIVATE' => '<strong>Profile field deactivated</strong><br />» %s',
@@ -669,33 +695,41 @@ $lang = array_merge($lang, array(
'LOG_REFERER_INVALID' => '<strong>Referer validation failed</strong><br />»Referer was “<em>%1$s</em>”. The request was rejected and the session killed.',
'LOG_RESET_DATE' => '<strong>Board start date reset</strong>',
'LOG_RESET_ONLINE' => '<strong>Most users online reset</strong>',
+ 'LOG_RESYNC_FILES_STATS' => '<strong>Files statistics resynchronised</strong>',
'LOG_RESYNC_POSTCOUNTS' => '<strong>User post counts resynchronised</strong>',
'LOG_RESYNC_POST_MARKING' => '<strong>Dotted topics resynchronised</strong>',
'LOG_RESYNC_STATS' => '<strong>Post, topic and user statistics resynchronised</strong>',
'LOG_SEARCH_INDEX_CREATED' => '<strong>Created search index for</strong><br />» %s',
'LOG_SEARCH_INDEX_REMOVED' => '<strong>Removed search index for</strong><br />» %s',
+ 'LOG_SPHINX_ERROR' => '<strong>Sphinx Error</strong><br />» %s',
'LOG_STYLE_ADD' => '<strong>Added new style</strong><br />» %s',
'LOG_STYLE_DELETE' => '<strong>Deleted style</strong><br />» %s',
'LOG_STYLE_EDIT_DETAILS' => '<strong>Edited style</strong><br />» %s',
'LOG_STYLE_EXPORT' => '<strong>Exported style</strong><br />» %s',
+ // @deprecated 3.1
'LOG_TEMPLATE_ADD_DB' => '<strong>Added new template set to database</strong><br />» %s',
+ // @deprecated 3.1
'LOG_TEMPLATE_ADD_FS' => '<strong>Add new template set on filesystem</strong><br />» %s',
'LOG_TEMPLATE_CACHE_CLEARED' => '<strong>Deleted cached versions of template files in template set <em>%1$s</em></strong><br />» %2$s',
'LOG_TEMPLATE_DELETE' => '<strong>Deleted template set</strong><br />» %s',
'LOG_TEMPLATE_EDIT' => '<strong>Edited template set <em>%1$s</em></strong><br />» %2$s',
'LOG_TEMPLATE_EDIT_DETAILS' => '<strong>Edited template details</strong><br />» %s',
'LOG_TEMPLATE_EXPORT' => '<strong>Exported template set</strong><br />» %s',
+ // @deprecated 3.1
'LOG_TEMPLATE_REFRESHED' => '<strong>Refreshed template set</strong><br />» %s',
+ // @deprecated 3.1
'LOG_THEME_ADD_DB' => '<strong>Added new theme to database</strong><br />» %s',
+ // @deprecated 3.1
'LOG_THEME_ADD_FS' => '<strong>Add new theme on filesystem</strong><br />» %s',
'LOG_THEME_DELETE' => '<strong>Theme deleted</strong><br />» %s',
'LOG_THEME_EDIT_DETAILS' => '<strong>Edited theme details</strong><br />» %s',
'LOG_THEME_EDIT' => '<strong>Edited theme <em>%1$s</em></strong>',
'LOG_THEME_EDIT_FILE' => '<strong>Edited theme <em>%1$s</em></strong><br />» Modified file <em>%2$s</em>',
'LOG_THEME_EXPORT' => '<strong>Exported theme</strong><br />» %s',
+ // @deprecated 3.1
'LOG_THEME_REFRESHED' => '<strong>Refreshed theme</strong><br />» %s',
'LOG_UPDATE_DATABASE' => '<strong>Updated Database from version %1$s to version %2$s</strong>',
@@ -704,7 +738,7 @@ $lang = array_merge($lang, array(
'LOG_USER_ACTIVE' => '<strong>User activated</strong><br />» %s',
'LOG_USER_BAN_USER' => '<strong>Banned User via user management</strong> for reason “<em>%1$s</em>”<br />» %2$s',
'LOG_USER_BAN_IP' => '<strong>Banned IP via user management</strong> for reason “<em>%1$s</em>”<br />» %2$s',
- 'LOG_USER_BAN_EMAIL' => '<strong>Banned e-mail via user management</strong> for reason “<em>%1$s</em>”<br />» %2$s',
+ 'LOG_USER_BAN_EMAIL' => '<strong>Banned email via user management</strong> for reason “<em>%1$s</em>”<br />» %2$s',
'LOG_USER_DELETED' => '<strong>Deleted user</strong><br />» %s',
'LOG_USER_DEL_ATTACH' => '<strong>Removed all attachments made by the user</strong><br />» %s',
'LOG_USER_DEL_AVATAR' => '<strong>Removed user avatar</strong><br />» %s',
@@ -717,7 +751,7 @@ $lang = array_merge($lang, array(
'LOG_USER_REACTIVATE' => '<strong>Forced user account reactivation</strong><br />» %s',
'LOG_USER_REMOVED_NR' => '<strong>Removed newly registered flag from user</strong><br />» %s',
- 'LOG_USER_UPDATE_EMAIL' => '<strong>User “%1$s” changed e-mail</strong><br />» from “%2$s” to “%3$s”',
+ 'LOG_USER_UPDATE_EMAIL' => '<strong>User “%1$s” changed email</strong><br />» from “%2$s” to “%3$s”',
'LOG_USER_UPDATE_NAME' => '<strong>Changed username</strong><br />» from “%1$s” to “%2$s”',
'LOG_USER_USER_UPDATE' => '<strong>Updated user details</strong><br />» %s',
@@ -748,5 +782,3 @@ $lang = array_merge($lang, array(
'LOG_WORD_DELETE' => '<strong>Deleted word censor</strong><br />» %s',
'LOG_WORD_EDIT' => '<strong>Edited word censor</strong><br />» %s',
));
-
-?> \ No newline at end of file
diff --git a/phpBB/language/en/acp/database.php b/phpBB/language/en/acp/database.php
index 9c8ecbf13a..e98503ecf5 100644
--- a/phpBB/language/en/acp/database.php
+++ b/phpBB/language/en/acp/database.php
@@ -4,9 +4,8 @@
* acp_database [English]
*
* @package language
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -73,5 +72,3 @@ $lang = array_merge($lang, array(
'TABLE_SELECT' => 'Table select',
'TABLE_SELECT_ERROR'=> 'You must select at least one table.',
));
-
-?> \ No newline at end of file
diff --git a/phpBB/language/en/acp/email.php b/phpBB/language/en/acp/email.php
index 38c9f19c27..aacb35b9bb 100644
--- a/phpBB/language/en/acp/email.php
+++ b/phpBB/language/en/acp/email.php
@@ -4,9 +4,8 @@
* acp_email [English]
*
* @package language
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -37,12 +36,12 @@ if (empty($lang) || !is_array($lang))
// Email settings
$lang = array_merge($lang, array(
- 'ACP_MASS_EMAIL_EXPLAIN' => 'Here you can e-mail a message to either all of your users or all users of a specific group <strong>having the option to receive mass e-mails enabled</strong>. To achieve this an e-mail will be sent out to the administrative e-mail address supplied, with a blind carbon copy sent to all recipients. The default setting is to only include 50 recipients in such an e-mail, for more recipients more e-mails will be sent. If you are emailing a large group of people please be patient after submitting and do not stop the page halfway through. It is normal for a mass emailing to take a long time, you will be notified when the script has completed.',
+ 'ACP_MASS_EMAIL_EXPLAIN' => 'Here you can email a message to either all of your users or all users of a specific group <strong>having the option to receive mass emails enabled</strong>. To achieve this an email will be sent out to the administrative email address supplied, with a blind carbon copy sent to all recipients. The default setting is to only include 50 recipients in such an email, for more recipients more emails will be sent. If you are emailing a large group of people please be patient after submitting and do not stop the page halfway through. It is normal for a mass emailing to take a long time, you will be notified when the script has completed.',
'ALL_USERS' => 'All users',
'COMPOSE' => 'Compose',
- 'EMAIL_SEND_ERROR' => 'There were one or more errors while sending the e-mail. Please check the %sError log%s for detailed error messages.',
+ 'EMAIL_SEND_ERROR' => 'There were one or more errors while sending the email. Please check the %sError log%s for detailed error messages.',
'EMAIL_SENT' => 'This message has been sent.',
'EMAIL_SENT_QUEUE' => 'This message has been queued for sending.',
@@ -54,7 +53,7 @@ $lang = array_merge($lang, array(
'SEND_TO_USERS_EXPLAIN' => 'Entering names here will override any group selected above. Enter each username on a new line.',
'MAIL_BANNED' => 'Mail banned users',
- 'MAIL_BANNED_EXPLAIN' => 'When sending a mass e-mail to a group you can select here whether banned users will also receive the e-mail.',
+ 'MAIL_BANNED_EXPLAIN' => 'When sending a mass email to a group you can select here whether banned users will also receive the email.',
'MAIL_HIGH_PRIORITY' => 'High',
'MAIL_LOW_PRIORITY' => 'Low',
'MAIL_NORMAL_PRIORITY' => 'Normal',
@@ -65,5 +64,3 @@ $lang = array_merge($lang, array(
'NO_EMAIL_MESSAGE' => 'You must enter a message.',
'NO_EMAIL_SUBJECT' => 'You must specify a subject for your message.',
));
-
-?> \ No newline at end of file
diff --git a/phpBB/language/en/acp/extensions.php b/phpBB/language/en/acp/extensions.php
new file mode 100644
index 0000000000..baa7d01763
--- /dev/null
+++ b/phpBB/language/en/acp/extensions.php
@@ -0,0 +1,109 @@
+<?php
+/**
+*
+* acp_extensions [English]
+*
+* @package language
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
+*
+*/
+/**
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* DO NOT CHANGE
+*/
+if (empty($lang) || !is_array($lang))
+{
+ $lang = array();
+}
+
+// DEVELOPERS PLEASE NOTE
+//
+// Placeholders can now contain order information, e.g. instead of
+// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
+// translators to re-order the output of data while ensuring it remains correct
+//
+// You do not need this where single placeholders are used, e.g. 'Message %d' is fine
+// equally where a string contains only two placeholders which are used to wrap text
+// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
+
+
+$lang = array_merge($lang, array(
+ 'EXTENSION' => 'Extension',
+ 'EXTENSIONS' => 'Extensions',
+ 'EXTENSIONS_ADMIN' => 'Extensions Manager',
+ 'EXTENSIONS_EXPLAIN' => 'The Extensions Manager is a tool in your phpBB Board which allows you to manage all of your extensions statuses and view information about them.',
+ 'EXTENSION_INVALID_LIST' => 'The “%s” extension is not valid.<br />%s<br /><br />',
+ 'EXTENSION_NOT_AVAILABLE' => 'The selected extension is not available for this board, please verify your phpBB and PHP versions are allowed (see the details page).',
+ 'EXTENSION_DIR_INVALID' => 'The selected extension has an invalid directory structure and cannot be enabled.',
+
+ 'DETAILS' => 'Details',
+
+ 'EXTENSIONS_DISABLED' => 'Disabled Extensions',
+ 'EXTENSIONS_ENABLED' => 'Enabled Extensions',
+
+ 'EXTENSION_DELETE_DATA' => 'Delete data',
+ 'EXTENSION_DISABLE' => 'Disable',
+ 'EXTENSION_ENABLE' => 'Enable',
+
+ 'EXTENSION_DELETE_DATA_EXPLAIN' => 'Deleting an extension’s data removes all of its data and settings. The extension files are retained so it can be enabled again.',
+ 'EXTENSION_DISABLE_EXPLAIN' => 'Disabling an extension retains its files, data and settings but removes any functionality added by the extension.',
+ 'EXTENSION_ENABLE_EXPLAIN' => 'Enabling an extension allows you to use it on your board.',
+
+ 'EXTENSION_DELETE_DATA_IN_PROGRESS' => 'The extension’s data is currently being deleted. Please do not leave or refresh this page until it is completed.',
+ 'EXTENSION_DISABLE_IN_PROGRESS' => 'The extension is currently being disabled. Please do not leave or refresh this page until it is completed.',
+ 'EXTENSION_ENABLE_IN_PROGRESS' => 'The extension is currently being enabled. Please do not leave or refresh this page until it is completed.',
+
+ 'EXTENSION_DELETE_DATA_SUCCESS' => 'The extension’s data was deleted successfully',
+ 'EXTENSION_DISABLE_SUCCESS' => 'The extension was disabled successfully',
+ 'EXTENSION_ENABLE_SUCCESS' => 'The extension was enabled successfully',
+
+ 'EXTENSION_NAME' => 'Extension Name',
+ 'EXTENSION_ACTIONS' => 'Actions',
+ 'EXTENSION_OPTIONS' => 'Options',
+ 'EXTENSION_UPDATE_HEADLINE' => 'Updating an extension',
+ 'EXTENSION_UPDATE_EXPLAIN' => '<ol>
+ <li>Disable the extension</li>
+ <li>Delete the extension’s files from the filesystem</li>
+ <li>Upload the new files</li>
+ <li>Enable the extension</li>
+ </ol>',
+ 'EXTENSION_REMOVE_HEADLINE' => 'Completly removing an extension from your board',
+ 'EXTENSION_REMOVE_EXPLAIN' => '<ol>
+ <li>Disable the extension</li>
+ <li>Delete the extension’s data</li>
+ <li>Delete the extension’s files from the filesystem</li>
+ </ol>',
+
+ 'EXTENSION_DELETE_DATA_CONFIRM' => 'Are you sure that you wish to delete the data associated with “%s”?<br /><br />This removes all of its data and settings and cannot be undone!',
+ 'EXTENSION_DISABLE_CONFIRM' => 'Are you sure that you wish to disable the “%s” extension?',
+ 'EXTENSION_ENABLE_CONFIRM' => 'Are you sure that you wish to enable the “%s” extension?',
+
+ 'RETURN_TO_EXTENSION_LIST' => 'Return to the extension list',
+
+ 'EXT_DETAILS' => 'Extension Details',
+ 'DISPLAY_NAME' => 'Display Name',
+ 'CLEAN_NAME' => 'Clean Name',
+ 'TYPE' => 'Type',
+ 'DESCRIPTION' => 'Description',
+ 'VERSION' => 'Version',
+ 'HOMEPAGE' => 'Homepage',
+ 'PATH' => 'File Path',
+ 'TIME' => 'Release Time',
+ 'LICENSE' => 'Licence',
+
+ 'REQUIREMENTS' => 'Requirements',
+ 'PHPBB_VERSION' => 'phpBB Version',
+ 'PHP_VERSION' => 'PHP Version',
+ 'AUTHOR_INFORMATION' => 'Author Information',
+ 'AUTHOR_NAME' => 'Name',
+ 'AUTHOR_EMAIL' => 'Email',
+ 'AUTHOR_HOMEPAGE' => 'Homepage',
+ 'AUTHOR_ROLE' => 'Role',
+));
diff --git a/phpBB/language/en/acp/forums.php b/phpBB/language/en/acp/forums.php
index b99a0724be..756cb7ae0f 100644
--- a/phpBB/language/en/acp/forums.php
+++ b/phpBB/language/en/acp/forums.php
@@ -4,9 +4,8 @@
* acp_forums [English]
*
* @package language
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -156,5 +155,3 @@ $lang = array_merge($lang, array(
'UNLOCKED' => 'Unlocked',
));
-
-?> \ No newline at end of file
diff --git a/phpBB/language/en/acp/groups.php b/phpBB/language/en/acp/groups.php
index 3444b98303..58101e5f60 100644
--- a/phpBB/language/en/acp/groups.php
+++ b/phpBB/language/en/acp/groups.php
@@ -4,9 +4,8 @@
* acp_groups [English]
*
* @package language
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -37,6 +36,7 @@ if (empty($lang) || !is_array($lang))
$lang = array_merge($lang, array(
'ACP_GROUPS_MANAGE_EXPLAIN' => 'From this panel you can administer all your usergroups. You can delete, create and edit existing groups. Furthermore, you may choose group leaders, toggle open/hidden/closed group status and set the group name and description.',
+ 'ADD_GROUP_CATEGORY' => 'Add category',
'ADD_USERS' => 'Add users',
'ADD_USERS_EXPLAIN' => 'Here you can add new users to the group. You may select whether this group becomes the new default for the selected users. Additionally you can define them as group leaders. Please enter each username on a separate line.',
@@ -51,11 +51,14 @@ $lang = array_merge($lang, array(
'GROUP_APPROVED' => 'Approved members',
'GROUP_AVATAR' => 'Group avatar',
'GROUP_AVATAR_EXPLAIN' => 'This image will be displayed in the Group Control Panel.',
+ 'GROUP_CATEGORY_NAME' => 'Category name',
'GROUP_CLOSED' => 'Closed',
'GROUP_COLOR' => 'Group colour',
'GROUP_COLOR_EXPLAIN' => 'Defines the colour members’ usernames will appear in, leave blank for user default.',
- 'GROUP_CONFIRM_ADD_USER' => 'Are you sure that you want to add the user %1$s to the group?',
- 'GROUP_CONFIRM_ADD_USERS' => 'Are you sure that you want to add the users %1$s to the group?',
+ 'GROUP_CONFIRM_ADD_USERS' => array(
+ 1 => 'Are you sure that you want to add the user %2$s to the group?',
+ 2 => 'Are you sure that you want to add the users %2$s to the group?',
+ ),
'GROUP_CREATED' => 'Group has been created successfully.',
'GROUP_DEFAULT' => 'Make group default for member',
'GROUP_DEFS_UPDATED' => 'Default group set for all selected members.',
@@ -97,6 +100,8 @@ $lang = array_merge($lang, array(
'GROUP_SETTINGS_SAVE' => 'Group wide settings',
'GROUP_SKIP_AUTH' => 'Exempt group leader from permissions',
'GROUP_SKIP_AUTH_EXPLAIN' => 'If enabled group leader no longer inherit permissions from the group.',
+ 'GROUP_SPECIAL' => 'Pre-defined',
+ 'GROUP_TEAMPAGE' => 'Display group on teampage',
'GROUP_TYPE' => 'Group type',
'GROUP_TYPE_EXPLAIN' => 'This determines which users can join or view this group.',
'GROUP_UPDATED' => 'Group preferences updated successfully.',
@@ -105,19 +110,37 @@ $lang = array_merge($lang, array(
'GROUP_USERS_EXIST' => 'The selected users are already members.',
'GROUP_USERS_REMOVE' => 'Users removed from group and new defaults set successfully.',
+ 'LEGEND_EXPLAIN' => 'These are the groups which are displayed in the group legend:',
+ 'LEGEND_SETTINGS' => 'Legend settings',
+ 'LEGEND_SORT_GROUPNAME' => 'Sort legend by group name',
+ 'LEGEND_SORT_GROUPNAME_EXPLAIN' => 'The order below is ignored when this option is enabled.',
+
+ 'MANAGE_LEGEND' => 'Manage group legend',
+ 'MANAGE_TEAMPAGE' => 'Manage teampage',
'MAKE_DEFAULT_FOR_ALL' => 'Make default group for every member',
'MEMBERS' => 'Members',
'NO_GROUP' => 'No group specified.',
+ 'NO_GROUPS_ADDED' => 'No groups added yet.',
'NO_GROUPS_CREATED' => 'No groups created yet.',
'NO_PERMISSIONS' => 'Do not copy permissions',
'NO_USERS' => 'You haven’t entered any users.',
'NO_USERS_ADDED' => 'No users were added to the group.',
'NO_VALID_USERS' => 'You haven’t entered any users eligible for that action.',
+ 'SELECT_GROUP' => 'Select a group',
'SPECIAL_GROUPS' => 'Pre-defined groups',
'SPECIAL_GROUPS_EXPLAIN' => 'Pre-defined groups are special groups, they cannot be deleted or directly modified. However you can still add users and alter basic settings.',
+ 'TEAMPAGE' => 'Teampage',
+ 'TEAMPAGE_DISP_ALL' => 'All memberships',
+ 'TEAMPAGE_DISP_DEFAULT' => 'User’s default group only',
+ 'TEAMPAGE_DISP_FIRST' => 'First membership only',
+ 'TEAMPAGE_EXPLAIN' => 'These are the groups which are displayed on the teampage:',
+ 'TEAMPAGE_FORUMS' => 'Display moderated forums',
+ 'TEAMPAGE_FORUMS_EXPLAIN' => 'If set to yes, moderators will have a list with all of the forums where they have moderator permissions displayed in their row. This can be very database intensive for big boards.',
+ 'TEAMPAGE_MEMBERSHIPS' => 'Display user memberships',
+ 'TEAMPAGE_SETTINGS' => 'Teampage settings',
'TOTAL_MEMBERS' => 'Members',
'USERS_APPROVED' => 'Users approved successfully.',
@@ -128,5 +151,3 @@ $lang = array_merge($lang, array(
'USER_GROUP_DEFAULT_EXPLAIN' => 'Saying yes here will set this group as the default group for the added users.',
'USER_GROUP_LEADER' => 'Set as group leader',
));
-
-?> \ No newline at end of file
diff --git a/phpBB/language/en/acp/language.php b/phpBB/language/en/acp/language.php
index dde4e3d722..154551bd6e 100644
--- a/phpBB/language/en/acp/language.php
+++ b/phpBB/language/en/acp/language.php
@@ -4,9 +4,8 @@
* acp_language [English]
*
* @package language
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -39,7 +38,7 @@ $lang = array_merge($lang, array(
'ACP_FILES' => 'Admin language files',
'ACP_LANGUAGE_PACKS_EXPLAIN' => 'Here you are able to install/remove language packs. The default language pack is marked with an asterisk (*).',
- 'EMAIL_FILES' => 'E-mail templates',
+ 'EMAIL_FILES' => 'Email templates',
'FILE_CONTENTS' => 'File contents',
'FILE_FROM_STORAGE' => 'File from storage folder',
@@ -99,5 +98,3 @@ $lang = array_merge($lang, array(
'WRONG_LANGUAGE_FILE' => 'Selected language file is invalid.',
));
-
-?> \ No newline at end of file
diff --git a/phpBB/language/en/acp/modules.php b/phpBB/language/en/acp/modules.php
index 875b24a94b..9c1c799720 100644
--- a/phpBB/language/en/acp/modules.php
+++ b/phpBB/language/en/acp/modules.php
@@ -4,9 +4,8 @@
* acp_modules [English]
*
* @package language
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -80,5 +79,3 @@ $lang = array_merge($lang, array(
'SELECT_MODULE' => 'Select a module',
));
-
-?> \ No newline at end of file
diff --git a/phpBB/language/en/acp/permissions.php b/phpBB/language/en/acp/permissions.php
index 6f0e7144e8..6e3ba6876a 100644
--- a/phpBB/language/en/acp/permissions.php
+++ b/phpBB/language/en/acp/permissions.php
@@ -4,9 +4,8 @@
* acp_permissions [English]
*
* @package language
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -58,7 +57,7 @@ $lang = array_merge($lang, array(
'ACL_NEVER' => 'Never',
'ACL_SET' => 'Setting permissions',
- 'ACL_SET_EXPLAIN' => 'Permissions are based on a simple <samp>YES</samp>/<samp>NO</samp> system. Setting an option to <samp>NEVER</samp> for a user or usergroup overrides any other value assigned to it. If you do not wish to assign a value for an option for this user or group select <samp>NO</samp>. If values are assigned for this option elsewhere they will be used in preference, else <samp>NEVER</samp> is assumed. All objects marked (with the checkbox in front of them) will copy the permission set you defined.',
+ 'ACL_SET_EXPLAIN' => 'Permissions are based on a simple <strong>YES</strong>/<strong>NO</strong> system. Setting an option to <strong>NEVER</strong> for a user or usergroup overrides any other value assigned to it. If you do not wish to assign a value for an option for this user or group select <strong>NO</strong>. If values are assigned for this option elsewhere they will be used in preference, else <strong>NEVER</strong> is assumed. All objects marked (with the checkbox in front of them) will copy the permission set you defined.',
'ACL_SETTING' => 'Setting',
'ACL_TYPE_A_' => 'Administrative permissions',
@@ -101,10 +100,10 @@ $lang = array_merge($lang, array(
'ADD_USERS' => 'Add users',
'ADVANCED_PERMISSIONS' => 'Advanced Permissions',
'ALL_GROUPS' => 'Select all groups',
- 'ALL_NEVER' => 'All <samp>NEVER</samp>',
- 'ALL_NO' => 'All <samp>NO</samp>',
+ 'ALL_NEVER' => 'All <strong>NEVER</strong>',
+ 'ALL_NO' => 'All <strong>NO</strong>',
'ALL_USERS' => 'Select all users',
- 'ALL_YES' => 'All <samp>YES</samp>',
+ 'ALL_YES' => 'All <strong>YES</strong>',
'APPLY_ALL_PERMISSIONS' => 'Apply all permissions',
'APPLY_PERMISSIONS' => 'Apply permissions',
'APPLY_PERMISSIONS_EXPLAIN' => 'The permissions and role defined for this item will only be applied to this item and all checked items.',
@@ -138,7 +137,7 @@ $lang = array_merge($lang, array(
'NO_AUTH_SETTING_FOUND' => 'Permission settings not defined.',
'NO_ROLE_ASSIGNED' => 'No role assigned…',
- 'NO_ROLE_ASSIGNED_EXPLAIN' => 'Setting to this role does not change permissions on the right. If you want to unset/remove all permissions you should use the “All <samp>NO</samp>” link.',
+ 'NO_ROLE_ASSIGNED_EXPLAIN' => 'Setting to this role does not change permissions on the right. If you want to unset/remove all permissions you should use the “All <strong>NO</strong>” link.',
'NO_ROLE_AVAILABLE' => 'No role available',
'NO_ROLE_NAME_SPECIFIED' => 'Please give the role a name.',
'NO_ROLE_SELECTED' => 'Role could not be found.',
@@ -197,17 +196,17 @@ $lang = array_merge($lang, array(
'ROLE_DESCRIPTION_FORUM_POLLS' => 'Like Standard Access but can also create polls.',
'ROLE_DESCRIPTION_FORUM_READONLY' => 'Can read the forum, but cannot create new topics or reply to posts.',
'ROLE_DESCRIPTION_FORUM_STANDARD' => 'Can use most forum features including attachments and deleting own topics, but cannot lock own topics, and cannot create polls.',
- 'ROLE_DESCRIPTION_FORUM_NEW_MEMBER' => 'A role for members of the special newly registered users group; contains <samp>NEVER</samp> permissions to lock features for new users.',
+ 'ROLE_DESCRIPTION_FORUM_NEW_MEMBER' => 'A role for members of the special newly registered users group; contains <strong>NEVER</strong> permissions to lock features for new users.',
'ROLE_DESCRIPTION_MOD_FULL' => 'Can use all moderating features, including banning.',
'ROLE_DESCRIPTION_MOD_QUEUE' => 'Can use the Moderation Queue to validate and edit posts, but nothing else.',
'ROLE_DESCRIPTION_MOD_SIMPLE' => 'Can only use basic topic actions. Cannot send warnings or use moderation queue.',
'ROLE_DESCRIPTION_MOD_STANDARD' => 'Can use most moderating tools, but cannot ban users or change the post author.',
'ROLE_DESCRIPTION_USER_FULL' => 'Can use all available forum features for users, including changing the user name or ignoring the flood limit.<br />Not recommended.',
- 'ROLE_DESCRIPTION_USER_LIMITED' => 'Can access some of the user features. Attachments, e-mails, or instant messages are not allowed.',
+ 'ROLE_DESCRIPTION_USER_LIMITED' => 'Can access some of the user features. Attachments, emails, or instant messages are not allowed.',
'ROLE_DESCRIPTION_USER_NOAVATAR' => 'Has a limited feature set and is not allowed to use the Avatar feature.',
'ROLE_DESCRIPTION_USER_NOPM' => 'Has a limited feature set, and is not allowed to use Private Messages.',
'ROLE_DESCRIPTION_USER_STANDARD' => 'Can access most but not all user features. Cannot change user name or ignore the flood limit, for instance.',
- 'ROLE_DESCRIPTION_USER_NEW_MEMBER' => 'A role for members of the special newly registered users group; contains <samp>NEVER</samp> permissions to lock features for new users.',
+ 'ROLE_DESCRIPTION_USER_NEW_MEMBER' => 'A role for members of the special newly registered users group; contains <strong>NEVER</strong> permissions to lock features for new users.',
'ROLE_DESCRIPTION_EXPLAIN' => 'You are able to enter a short explanation of what the role is doing or for what it is meant for. The text you enter here will be displayed within the permissions screens too.',
'ROLE_DESCRIPTION_LONG' => 'The role description is too long, please limit it to 4000 characters.',
@@ -228,48 +227,48 @@ $lang = array_merge($lang, array(
'SET_USERS_PERMISSIONS' => 'Set user permissions',
'SET_USERS_FORUM_PERMISSIONS' => 'Set user forum permissions',
- 'TRACE_DEFAULT' => 'By default every permission is <samp>NO</samp> (unset). So the permission can be overwritten by other settings.',
+ 'TRACE_DEFAULT' => 'By default every permission is <strong>NO</strong> (unset). So the permission can be overwritten by other settings.',
'TRACE_FOR' => 'Trace for',
'TRACE_GLOBAL_SETTING' => '%s (global)',
- 'TRACE_GROUP_NEVER_TOTAL_NEVER' => 'This group’s permission is set to <samp>NEVER</samp> like the total result so the old result is kept.',
- 'TRACE_GROUP_NEVER_TOTAL_NEVER_LOCAL' => 'This group’s permission for this forum is set to <samp>NEVER</samp> like the total result so the old result is kept.',
- 'TRACE_GROUP_NEVER_TOTAL_NO' => 'This group’s permission is set to <samp>NEVER</samp> which becomes the new total value because it wasn’t set yet (set to <samp>NO</samp>).',
- 'TRACE_GROUP_NEVER_TOTAL_NO_LOCAL' => 'This group’s permission for this forum is set to <samp>NEVER</samp> which becomes the new total value because it wasn’t set yet (set to <samp>NO</samp>).',
- 'TRACE_GROUP_NEVER_TOTAL_YES' => 'This group’s permission is set to <samp>NEVER</samp> which overwrites the total <samp>YES</samp> to a <samp>NEVER</samp> for this user.',
- 'TRACE_GROUP_NEVER_TOTAL_YES_LOCAL' => 'This group’s permission for this forum is set to <samp>NEVER</samp> which overwrites the total <samp>YES</samp> to a <samp>NEVER</samp> for this user.',
- 'TRACE_GROUP_NO' => 'The permission is <samp>NO</samp> for this group so the old total value is kept.',
- 'TRACE_GROUP_NO_LOCAL' => 'The permission is <samp>NO</samp> for this group within this forum so the old total value is kept.',
- 'TRACE_GROUP_YES_TOTAL_NEVER' => 'This group’s permission is set to <samp>YES</samp> but the total <samp>NEVER</samp> cannot be overwritten.',
- 'TRACE_GROUP_YES_TOTAL_NEVER_LOCAL' => 'This group’s permission for this forum is set to <samp>YES</samp> but the total <samp>NEVER</samp> cannot be overwritten.',
- 'TRACE_GROUP_YES_TOTAL_NO' => 'This group’s permission is set to <samp>YES</samp> which becomes the new total value because it wasn’t set yet (set to <samp>NO</samp>).',
- 'TRACE_GROUP_YES_TOTAL_NO_LOCAL' => 'This group’s permission for this forum is set to <samp>YES</samp> which becomes the new total value because it wasn’t set yet (set to <samp>NO</samp>).',
- 'TRACE_GROUP_YES_TOTAL_YES' => 'This group’s permission is set to <samp>YES</samp> and the total permission is already set to <samp>YES</samp>, so the total result is kept.',
- 'TRACE_GROUP_YES_TOTAL_YES_LOCAL' => 'This group’s permission for this forum is set to <samp>YES</samp> and the total permission is already set to <samp>YES</samp>, so the total result is kept.',
+ 'TRACE_GROUP_NEVER_TOTAL_NEVER' => 'This group’s permission is set to <strong>NEVER</strong> like the total result so the old result is kept.',
+ 'TRACE_GROUP_NEVER_TOTAL_NEVER_LOCAL' => 'This group’s permission for this forum is set to <strong>NEVER</strong> like the total result so the old result is kept.',
+ 'TRACE_GROUP_NEVER_TOTAL_NO' => 'This group’s permission is set to <strong>NEVER</strong> which becomes the new total value because it wasn’t set yet (set to <strong>NO</strong>).',
+ 'TRACE_GROUP_NEVER_TOTAL_NO_LOCAL' => 'This group’s permission for this forum is set to <strong>NEVER</strong> which becomes the new total value because it wasn’t set yet (set to <strong>NO</strong>).',
+ 'TRACE_GROUP_NEVER_TOTAL_YES' => 'This group’s permission is set to <strong>NEVER</strong> which overwrites the total <strong>YES</strong> to a <strong>NEVER</strong> for this user.',
+ 'TRACE_GROUP_NEVER_TOTAL_YES_LOCAL' => 'This group’s permission for this forum is set to <strong>NEVER</strong> which overwrites the total <strong>YES</strong> to a <strong>NEVER</strong> for this user.',
+ 'TRACE_GROUP_NO' => 'The permission is <strong>NO</strong> for this group so the old total value is kept.',
+ 'TRACE_GROUP_NO_LOCAL' => 'The permission is <strong>NO</strong> for this group within this forum so the old total value is kept.',
+ 'TRACE_GROUP_YES_TOTAL_NEVER' => 'This group’s permission is set to <strong>YES</strong> but the total <strong>NEVER</strong> cannot be overwritten.',
+ 'TRACE_GROUP_YES_TOTAL_NEVER_LOCAL' => 'This group’s permission for this forum is set to <strong>YES</strong> but the total <strong>NEVER</strong> cannot be overwritten.',
+ 'TRACE_GROUP_YES_TOTAL_NO' => 'This group’s permission is set to <strong>YES</strong> which becomes the new total value because it wasn’t set yet (set to <strong>NO</strong>).',
+ 'TRACE_GROUP_YES_TOTAL_NO_LOCAL' => 'This group’s permission for this forum is set to <strong>YES</strong> which becomes the new total value because it wasn’t set yet (set to <strong>NO</strong>).',
+ 'TRACE_GROUP_YES_TOTAL_YES' => 'This group’s permission is set to <strong>YES</strong> and the total permission is already set to <strong>YES</strong>, so the total result is kept.',
+ 'TRACE_GROUP_YES_TOTAL_YES_LOCAL' => 'This group’s permission for this forum is set to <strong>YES</strong> and the total permission is already set to <strong>YES</strong>, so the total result is kept.',
'TRACE_PERMISSION' => 'Trace permission - %s',
'TRACE_RESULT' => 'Trace result',
'TRACE_SETTING' => 'Trace setting',
- 'TRACE_USER_GLOBAL_YES_TOTAL_YES' => 'The forum independent user permission evaluates to <samp>YES</samp> but the total permission is already set to <samp>YES</samp>, so the total result is kept. %sTrace global permission%s',
- 'TRACE_USER_GLOBAL_YES_TOTAL_NEVER' => 'The forum independent user permission evaluates to <samp>YES</samp> which overwrites the current local result <samp>NEVER</samp>. %sTrace global permission%s',
- 'TRACE_USER_GLOBAL_NEVER_TOTAL_KEPT' => 'The forum independent user permission evaluates to <samp>NEVER</samp> which doesn’t influence the local permission. %sTrace global permission%s',
-
- 'TRACE_USER_FOUNDER' => 'The user is a founder, therefore admin permissions are always set to <samp>YES</samp>.',
- 'TRACE_USER_KEPT' => 'The user’s permission is <samp>NO</samp> so the old total value is kept.',
- 'TRACE_USER_KEPT_LOCAL' => 'The user’s permission for this forum is <samp>NO</samp> so the old total value is kept.',
- 'TRACE_USER_NEVER_TOTAL_NEVER' => 'The user’s permission is set to <samp>NEVER</samp> and the total value is set to <samp>NEVER</samp>, so nothing is changed.',
- 'TRACE_USER_NEVER_TOTAL_NEVER_LOCAL' => 'The user’s permission for this forum is set to <samp>NEVER</samp> and the total value is set to <samp>NEVER</samp>, so nothing is changed.',
- 'TRACE_USER_NEVER_TOTAL_NO' => 'The user’s permission is set to <samp>NEVER</samp> which becomes the total value because it was set to NO.',
- 'TRACE_USER_NEVER_TOTAL_NO_LOCAL' => 'The user’s permission for this forum is set to <samp>NEVER</samp> which becomes the total value because it was set to NO.',
- 'TRACE_USER_NEVER_TOTAL_YES' => 'The user’s permission is set to <samp>NEVER</samp> and overwrites the previous <samp>YES</samp>.',
- 'TRACE_USER_NEVER_TOTAL_YES_LOCAL' => 'The user’s permission for this forum is set to <samp>NEVER</samp> and overwrites the previous <samp>YES</samp>.',
- 'TRACE_USER_NO_TOTAL_NO' => 'The user’s permission is <samp>NO</samp> and the total value was set to NO so it defaults to <samp>NEVER</samp>.',
- 'TRACE_USER_NO_TOTAL_NO_LOCAL' => 'The user’s permission for this forum is <samp>NO</samp> and the total value was set to NO so it defaults to <samp>NEVER</samp>.',
- 'TRACE_USER_YES_TOTAL_NEVER' => 'The user’s permission is set to <samp>YES</samp> but the total <samp>NEVER</samp> cannot be overwritten.',
- 'TRACE_USER_YES_TOTAL_NEVER_LOCAL' => 'The user’s permission for this forum is set to <samp>YES</samp> but the total <samp>NEVER</samp> cannot be overwritten.',
- 'TRACE_USER_YES_TOTAL_NO' => 'The user’s permission is set to <samp>YES</samp> which becomes the total value because it was set to <samp>NO</samp>.',
- 'TRACE_USER_YES_TOTAL_NO_LOCAL' => 'The user’s permission for this forum is set to <samp>YES</samp> which becomes the total value because it was set to <samp>NO</samp>.',
- 'TRACE_USER_YES_TOTAL_YES' => 'The user’s permission is set to <samp>YES</samp> and the total value is set to <samp>YES</samp>, so nothing is changed.',
- 'TRACE_USER_YES_TOTAL_YES_LOCAL' => 'The user’s permission for this forum is set to <samp>YES</samp> and the total value is set to <samp>YES</samp>, so nothing is changed.',
+ 'TRACE_USER_GLOBAL_YES_TOTAL_YES' => 'The forum independent user permission evaluates to <strong>YES</strong> but the total permission is already set to <strong>YES</strong>, so the total result is kept. %sTrace global permission%s',
+ 'TRACE_USER_GLOBAL_YES_TOTAL_NEVER' => 'The forum independent user permission evaluates to <strong>YES</strong> which overwrites the current local result <strong>NEVER</strong>. %sTrace global permission%s',
+ 'TRACE_USER_GLOBAL_NEVER_TOTAL_KEPT' => 'The forum independent user permission evaluates to <strong>NEVER</strong> which doesn’t influence the local permission. %sTrace global permission%s',
+
+ 'TRACE_USER_FOUNDER' => 'The user is a founder, therefore admin permissions are always set to <strong>YES</strong>.',
+ 'TRACE_USER_KEPT' => 'The user’s permission is <strong>NO</strong> so the old total value is kept.',
+ 'TRACE_USER_KEPT_LOCAL' => 'The user’s permission for this forum is <strong>NO</strong> so the old total value is kept.',
+ 'TRACE_USER_NEVER_TOTAL_NEVER' => 'The user’s permission is set to <strong>NEVER</strong> and the total value is set to <strong>NEVER</strong>, so nothing is changed.',
+ 'TRACE_USER_NEVER_TOTAL_NEVER_LOCAL' => 'The user’s permission for this forum is set to <strong>NEVER</strong> and the total value is set to <strong>NEVER</strong>, so nothing is changed.',
+ 'TRACE_USER_NEVER_TOTAL_NO' => 'The user’s permission is set to <strong>NEVER</strong> which becomes the total value because it was set to NO.',
+ 'TRACE_USER_NEVER_TOTAL_NO_LOCAL' => 'The user’s permission for this forum is set to <strong>NEVER</strong> which becomes the total value because it was set to NO.',
+ 'TRACE_USER_NEVER_TOTAL_YES' => 'The user’s permission is set to <strong>NEVER</strong> and overwrites the previous <strong>YES</strong>.',
+ 'TRACE_USER_NEVER_TOTAL_YES_LOCAL' => 'The user’s permission for this forum is set to <strong>NEVER</strong> and overwrites the previous <strong>YES</strong>.',
+ 'TRACE_USER_NO_TOTAL_NO' => 'The user’s permission is <strong>NO</strong> and the total value was set to NO so it defaults to <strong>NEVER</strong>.',
+ 'TRACE_USER_NO_TOTAL_NO_LOCAL' => 'The user’s permission for this forum is <strong>NO</strong> and the total value was set to NO so it defaults to <strong>NEVER</strong>.',
+ 'TRACE_USER_YES_TOTAL_NEVER' => 'The user’s permission is set to <strong>YES</strong> but the total <strong>NEVER</strong> cannot be overwritten.',
+ 'TRACE_USER_YES_TOTAL_NEVER_LOCAL' => 'The user’s permission for this forum is set to <strong>YES</strong> but the total <strong>NEVER</strong> cannot be overwritten.',
+ 'TRACE_USER_YES_TOTAL_NO' => 'The user’s permission is set to <strong>YES</strong> which becomes the total value because it was set to <strong>NO</strong>.',
+ 'TRACE_USER_YES_TOTAL_NO_LOCAL' => 'The user’s permission for this forum is set to <strong>YES</strong> which becomes the total value because it was set to <strong>NO</strong>.',
+ 'TRACE_USER_YES_TOTAL_YES' => 'The user’s permission is set to <strong>YES</strong> and the total value is set to <strong>YES</strong>, so nothing is changed.',
+ 'TRACE_USER_YES_TOTAL_YES_LOCAL' => 'The user’s permission for this forum is set to <strong>YES</strong> and the total value is set to <strong>YES</strong>, so nothing is changed.',
'TRACE_WHO' => 'Who',
'TRACE_TOTAL' => 'Total',
@@ -285,5 +284,3 @@ $lang = array_merge($lang, array(
'WRONG_PERMISSION_TYPE' => 'Wrong permission type selected.',
'WRONG_PERMISSION_SETTING_FORMAT' => 'The permission settings are in a wrong format, phpBB is not able to process them correctly.',
));
-
-?> \ No newline at end of file
diff --git a/phpBB/language/en/acp/permissions_phpbb.php b/phpBB/language/en/acp/permissions_phpbb.php
index 945a675861..5ea151f6ea 100644
--- a/phpBB/language/en/acp/permissions_phpbb.php
+++ b/phpBB/language/en/acp/permissions_phpbb.php
@@ -3,9 +3,8 @@
* acp_permissions_phpbb (phpBB Permission Set) [English]
*
* @package language
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*/
/**
@@ -34,208 +33,175 @@ if (empty($lang) || !is_array($lang))
// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
/**
-* MODDERS PLEASE NOTE
+* EXTENSION-DEVELOPERS PLEASE NOTE
*
-* You are able to put your permission sets into a separate file too by
-* prefixing the new file with permissions_ and putting it into the acp
-* language folder.
-*
-* An example of how the file could look like:
-*
-* <code>
-*
-* if (empty($lang) || !is_array($lang))
-* {
-* $lang = array();
-* }
-*
-* // Adding new category
-* $lang['permission_cat']['bugs'] = 'Bugs';
-*
-* // Adding new permission set
-* $lang['permission_type']['bug_'] = 'Bug Permissions';
-*
-* // Adding the permissions
-* $lang = array_merge($lang, array(
-* 'acl_bug_view' => array('lang' => 'Can view bug reports', 'cat' => 'bugs'),
-* 'acl_bug_post' => array('lang' => 'Can post bugs', 'cat' => 'post'), // Using a phpBB category here
-* ));
-*
-* </code>
+* You are able to put your permission sets into your extension.
+* The permissions logic should be added via the 'core.permissions' event.
+* You can easily add new permission categories, types and permissions, by
+* simply merging them into the respective arrays.
+* The respective language strings should be added into a language file, that
+* start with 'permissions_', so they are automatically loaded within the ACP.
*/
-// Define categories and permission types
$lang = array_merge($lang, array(
- 'permission_cat' => array(
- 'actions' => 'Actions',
- 'content' => 'Content',
- 'forums' => 'Forums',
- 'misc' => 'Misc',
- 'permissions' => 'Permissions',
- 'pm' => 'Private messages',
- 'polls' => 'Polls',
- 'post' => 'Post',
- 'post_actions' => 'Post actions',
- 'posting' => 'Posting',
- 'profile' => 'Profile',
- 'settings' => 'Settings',
- 'topic_actions' => 'Topic actions',
- 'user_group' => 'Users &amp; Groups',
- ),
-
- // With defining 'global' here we are able to specify what is printed out if the permission is within the global scope.
- 'permission_type' => array(
- 'u_' => 'User permissions',
- 'a_' => 'Admin permissions',
- 'm_' => 'Moderator permissions',
- 'f_' => 'Forum permissions',
- 'global' => array(
- 'm_' => 'Global moderator permissions',
- ),
- ),
+ 'ACL_CAT_ACTIONS' => 'Actions',
+ 'ACL_CAT_CONTENT' => 'Content',
+ 'ACL_CAT_FORUMS' => 'Forums',
+ 'ACL_CAT_MISC' => 'Misc',
+ 'ACL_CAT_PERMISSIONS' => 'Permissions',
+ 'ACL_CAT_PM' => 'Private messages',
+ 'ACL_CAT_POLLS' => 'Polls',
+ 'ACL_CAT_POST' => 'Post',
+ 'ACL_CAT_POST_ACTIONS' => 'Post actions',
+ 'ACL_CAT_POSTING' => 'Posting',
+ 'ACL_CAT_PROFILE' => 'Profile',
+ 'ACL_CAT_SETTINGS' => 'Settings',
+ 'ACL_CAT_TOPIC_ACTIONS' => 'Topic actions',
+ 'ACL_CAT_USER_GROUP' => 'Users &amp; Groups',
));
// User Permissions
$lang = array_merge($lang, array(
- 'acl_u_viewprofile' => array('lang' => 'Can view profiles, memberlist and online list', 'cat' => 'profile'),
- 'acl_u_chgname' => array('lang' => 'Can change username', 'cat' => 'profile'),
- 'acl_u_chgpasswd' => array('lang' => 'Can change password', 'cat' => 'profile'),
- 'acl_u_chgemail' => array('lang' => 'Can change e-mail address', 'cat' => 'profile'),
- 'acl_u_chgavatar' => array('lang' => 'Can change avatar', 'cat' => 'profile'),
- 'acl_u_chggrp' => array('lang' => 'Can change default usergroup', 'cat' => 'profile'),
-
- 'acl_u_attach' => array('lang' => 'Can attach files', 'cat' => 'post'),
- 'acl_u_download' => array('lang' => 'Can download files', 'cat' => 'post'),
- 'acl_u_savedrafts' => array('lang' => 'Can save drafts', 'cat' => 'post'),
- 'acl_u_chgcensors' => array('lang' => 'Can disable word censors', 'cat' => 'post'),
- 'acl_u_sig' => array('lang' => 'Can use signature', 'cat' => 'post'),
-
- 'acl_u_sendpm' => array('lang' => 'Can send private messages', 'cat' => 'pm'),
- 'acl_u_masspm' => array('lang' => 'Can send messages to multiple users', 'cat' => 'pm'),
- 'acl_u_masspm_group'=> array('lang' => 'Can send messages to groups', 'cat' => 'pm'),
- 'acl_u_readpm' => array('lang' => 'Can read private messages', 'cat' => 'pm'),
- 'acl_u_pm_edit' => array('lang' => 'Can edit own private messages', 'cat' => 'pm'),
- 'acl_u_pm_delete' => array('lang' => 'Can remove private messages from own folder', 'cat' => 'pm'),
- 'acl_u_pm_forward' => array('lang' => 'Can forward private messages', 'cat' => 'pm'),
- 'acl_u_pm_emailpm' => array('lang' => 'Can e-mail private messages', 'cat' => 'pm'),
- 'acl_u_pm_printpm' => array('lang' => 'Can print private messages', 'cat' => 'pm'),
- 'acl_u_pm_attach' => array('lang' => 'Can attach files in private messages', 'cat' => 'pm'),
- 'acl_u_pm_download' => array('lang' => 'Can download files in private messages', 'cat' => 'pm'),
- 'acl_u_pm_bbcode' => array('lang' => 'Can use BBCode in private messages', 'cat' => 'pm'),
- 'acl_u_pm_smilies' => array('lang' => 'Can use smilies in private messages', 'cat' => 'pm'),
- 'acl_u_pm_img' => array('lang' => 'Can use [img] BBCode tag in private messages', 'cat' => 'pm'),
- 'acl_u_pm_flash' => array('lang' => 'Can use [flash] BBCode tag in private messages', 'cat' => 'pm'),
-
- 'acl_u_sendemail' => array('lang' => 'Can send e-mails', 'cat' => 'misc'),
- 'acl_u_sendim' => array('lang' => 'Can send instant messages', 'cat' => 'misc'),
- 'acl_u_ignoreflood' => array('lang' => 'Can ignore flood limit', 'cat' => 'misc'),
- 'acl_u_hideonline' => array('lang' => 'Can hide online status', 'cat' => 'misc'),
- 'acl_u_viewonline' => array('lang' => 'Can view hidden online users', 'cat' => 'misc'),
- 'acl_u_search' => array('lang' => 'Can search board', 'cat' => 'misc'),
+ 'ACL_U_VIEWPROFILE' => 'Can view profiles, memberlist and online list',
+ 'ACL_U_CHGNAME' => 'Can change username',
+ 'ACL_U_CHGPASSWD' => 'Can change password',
+ 'ACL_U_CHGEMAIL' => 'Can change email address',
+ 'ACL_U_CHGAVATAR' => 'Can change avatar',
+ 'ACL_U_CHGGRP' => 'Can change default usergroup',
+ 'ACL_U_CHGPROFILEINFO' => 'Can change profile field information',
+
+ 'ACL_U_ATTACH' => 'Can attach files',
+ 'ACL_U_DOWNLOAD' => 'Can download files',
+ 'ACL_U_SAVEDRAFTS' => 'Can save drafts',
+ 'ACL_U_CHGCENSORS' => 'Can disable word censors',
+ 'ACL_U_SIG' => 'Can use signature',
+
+ 'ACL_U_SENDPM' => 'Can send private messages',
+ 'ACL_U_MASSPM' => 'Can send messages to multiple users',
+ 'ACL_U_MASSPM_GROUP'=> 'Can send messages to groups',
+ 'ACL_U_READPM' => 'Can read private messages',
+ 'ACL_U_PM_EDIT' => 'Can edit own private messages',
+ 'ACL_U_PM_DELETE' => 'Can remove private messages from own folder',
+ 'ACL_U_PM_FORWARD' => 'Can forward private messages',
+ 'ACL_U_PM_EMAILPM' => 'Can email private messages',
+ 'ACL_U_PM_PRINTPM' => 'Can print private messages',
+ 'ACL_U_PM_ATTACH' => 'Can attach files in private messages',
+ 'ACL_U_PM_DOWNLOAD' => 'Can download files in private messages',
+ 'ACL_U_PM_BBCODE' => 'Can use BBCode in private messages',
+ 'ACL_U_PM_SMILIES' => 'Can use smilies in private messages',
+ 'ACL_U_PM_IMG' => 'Can use [img] BBCode tag in private messages',
+ 'ACL_U_PM_FLASH' => 'Can use [flash] BBCode tag in private messages',
+
+ 'ACL_U_SENDEMAIL' => 'Can send emails',
+ 'ACL_U_SENDIM' => 'Can send instant messages',
+ 'ACL_U_IGNOREFLOOD' => 'Can ignore flood limit',
+ 'ACL_U_HIDEONLINE' => 'Can hide online status',
+ 'ACL_U_VIEWONLINE' => 'Can view hidden online users',
+ 'ACL_U_SEARCH' => 'Can search board',
));
// Forum Permissions
$lang = array_merge($lang, array(
- 'acl_f_list' => array('lang' => 'Can see forum', 'cat' => 'post'),
- 'acl_f_read' => array('lang' => 'Can read forum', 'cat' => 'post'),
- 'acl_f_post' => array('lang' => 'Can start new topics', 'cat' => 'post'),
- 'acl_f_reply' => array('lang' => 'Can reply to topics', 'cat' => 'post'),
- 'acl_f_icons' => array('lang' => 'Can use topic/post icons', 'cat' => 'post'),
- 'acl_f_announce' => array('lang' => 'Can post announcements', 'cat' => 'post'),
- 'acl_f_sticky' => array('lang' => 'Can post stickies', 'cat' => 'post'),
-
- 'acl_f_poll' => array('lang' => 'Can create polls', 'cat' => 'polls'),
- 'acl_f_vote' => array('lang' => 'Can vote in polls', 'cat' => 'polls'),
- 'acl_f_votechg' => array('lang' => 'Can change existing vote', 'cat' => 'polls'),
-
- 'acl_f_attach' => array('lang' => 'Can attach files', 'cat' => 'content'),
- 'acl_f_download' => array('lang' => 'Can download files', 'cat' => 'content'),
- 'acl_f_sigs' => array('lang' => 'Can use signatures', 'cat' => 'content'),
- 'acl_f_bbcode' => array('lang' => 'Can use BBCode', 'cat' => 'content'),
- 'acl_f_smilies' => array('lang' => 'Can use smilies', 'cat' => 'content'),
- 'acl_f_img' => array('lang' => 'Can use [img] BBCode tag', 'cat' => 'content'),
- 'acl_f_flash' => array('lang' => 'Can use [flash] BBCode tag', 'cat' => 'content'),
-
- 'acl_f_edit' => array('lang' => 'Can edit own posts', 'cat' => 'actions'),
- 'acl_f_delete' => array('lang' => 'Can delete own posts', 'cat' => 'actions'),
- 'acl_f_user_lock' => array('lang' => 'Can lock own topics', 'cat' => 'actions'),
- 'acl_f_bump' => array('lang' => 'Can bump topics', 'cat' => 'actions'),
- 'acl_f_report' => array('lang' => 'Can report posts', 'cat' => 'actions'),
- 'acl_f_subscribe' => array('lang' => 'Can subscribe forum', 'cat' => 'actions'),
- 'acl_f_print' => array('lang' => 'Can print topics', 'cat' => 'actions'),
- 'acl_f_email' => array('lang' => 'Can e-mail topics', 'cat' => 'actions'),
-
- 'acl_f_search' => array('lang' => 'Can search the forum', 'cat' => 'misc'),
- 'acl_f_ignoreflood' => array('lang' => 'Can ignore flood limit', 'cat' => 'misc'),
- 'acl_f_postcount' => array('lang' => 'Increment post counter<br /><em>Please note that this setting only affects new posts.</em>', 'cat' => 'misc'),
- 'acl_f_noapprove' => array('lang' => 'Can post without approval', 'cat' => 'misc'),
+ 'ACL_F_LIST' => 'Can see forum',
+ 'ACL_F_READ' => 'Can read forum',
+ 'ACL_F_SEARCH' => 'Can search the forum',
+ 'ACL_F_SUBSCRIBE' => 'Can subscribe forum',
+ 'ACL_F_PRINT' => 'Can print topics',
+ 'ACL_F_EMAIL' => 'Can email topics',
+ 'ACL_F_BUMP' => 'Can bump topics',
+ 'ACL_F_USER_LOCK' => 'Can lock own topics',
+ 'ACL_F_DOWNLOAD' => 'Can download files',
+ 'ACL_F_REPORT' => 'Can report posts',
+
+ 'ACL_F_POST' => 'Can start new topics',
+ 'ACL_F_STICKY' => 'Can post stickies',
+ 'ACL_F_ANNOUNCE' => 'Can post announcements',
+ 'ACL_F_REPLY' => 'Can reply to topics',
+ 'ACL_F_EDIT' => 'Can edit own posts',
+ 'ACL_F_DELETE' => 'Can permanently delete own posts',
+ 'ACL_F_SOFTDELETE' => 'Can soft delete own posts<br /><em>Moderators, who have the approve posts permission, can restore soft deleted posts.</em>',
+ 'ACL_F_IGNOREFLOOD' => 'Can ignore flood limit',
+ 'ACL_F_POSTCOUNT' => 'Increment post counter<br /><em>Please note that this setting only affects new posts.</em>',
+ 'ACL_F_NOAPPROVE' => 'Can post without approval',
+
+ 'ACL_F_ATTACH' => 'Can attach files',
+ 'ACL_F_ICONS' => 'Can use topic/post icons',
+ 'ACL_F_BBCODE' => 'Can use BBCode',
+ 'ACL_F_FLASH' => 'Can use [flash] BBCode tag',
+ 'ACL_F_IMG' => 'Can use [img] BBCode tag',
+ 'ACL_F_SIGS' => 'Can use signatures',
+ 'ACL_F_SMILIES' => 'Can use smilies',
+
+ 'ACL_F_POLL' => 'Can create polls',
+ 'ACL_F_VOTE' => 'Can vote in polls',
+ 'ACL_F_VOTECHG' => 'Can change existing vote',
));
// Moderator Permissions
$lang = array_merge($lang, array(
- 'acl_m_edit' => array('lang' => 'Can edit posts', 'cat' => 'post_actions'),
- 'acl_m_delete' => array('lang' => 'Can delete posts', 'cat' => 'post_actions'),
- 'acl_m_approve' => array('lang' => 'Can approve posts', 'cat' => 'post_actions'),
- 'acl_m_report' => array('lang' => 'Can close and delete reports', 'cat' => 'post_actions'),
- 'acl_m_chgposter' => array('lang' => 'Can change post author', 'cat' => 'post_actions'),
-
- 'acl_m_move' => array('lang' => 'Can move topics', 'cat' => 'topic_actions'),
- 'acl_m_lock' => array('lang' => 'Can lock topics', 'cat' => 'topic_actions'),
- 'acl_m_split' => array('lang' => 'Can split topics', 'cat' => 'topic_actions'),
- 'acl_m_merge' => array('lang' => 'Can merge topics', 'cat' => 'topic_actions'),
-
- 'acl_m_info' => array('lang' => 'Can view post details', 'cat' => 'misc'),
- 'acl_m_warn' => array('lang' => 'Can issue warnings<br /><em>This setting is only assigned globally. It is not forum based.</em>', 'cat' => 'misc'), // This moderator setting is only global (and not local)
- 'acl_m_ban' => array('lang' => 'Can manage bans<br /><em>This setting is only assigned globally. It is not forum based.</em>', 'cat' => 'misc'), // This moderator setting is only global (and not local)
+ 'ACL_M_EDIT' => 'Can edit posts',
+ 'ACL_M_DELETE' => 'Can permanently delete posts',
+ 'ACL_M_SOFTDELETE' => 'Can soft delete posts<br /><em>Moderators, who have the approve posts permission, can restore soft deleted posts.</em>',
+ 'ACL_M_APPROVE' => 'Can approve posts',
+ 'ACL_M_REPORT' => 'Can close and delete reports',
+ 'ACL_M_CHGPOSTER' => 'Can change post author',
+
+ 'ACL_M_MOVE' => 'Can move topics',
+ 'ACL_M_LOCK' => 'Can lock topics',
+ 'ACL_M_SPLIT' => 'Can split topics',
+ 'ACL_M_MERGE' => 'Can merge topics',
+
+ 'ACL_M_INFO' => 'Can view post details',
+ 'ACL_M_WARN' => 'Can issue warnings<br /><em>This setting is only assigned globally. It is not forum based.</em>', // This moderator setting is only global (and not local)
+ 'ACL_M_BAN' => 'Can manage bans<br /><em>This setting is only assigned globally. It is not forum based.</em>', // This moderator setting is only global (and not local)
));
// Admin Permissions
$lang = array_merge($lang, array(
- 'acl_a_board' => array('lang' => 'Can alter board settings/check for updates', 'cat' => 'settings'),
- 'acl_a_server' => array('lang' => 'Can alter server/communication settings', 'cat' => 'settings'),
- 'acl_a_jabber' => array('lang' => 'Can alter Jabber settings', 'cat' => 'settings'),
- 'acl_a_phpinfo' => array('lang' => 'Can view php settings', 'cat' => 'settings'),
-
- 'acl_a_forum' => array('lang' => 'Can manage forums', 'cat' => 'forums'),
- 'acl_a_forumadd' => array('lang' => 'Can add new forums', 'cat' => 'forums'),
- 'acl_a_forumdel' => array('lang' => 'Can delete forums', 'cat' => 'forums'),
- 'acl_a_prune' => array('lang' => 'Can prune forums', 'cat' => 'forums'),
-
- 'acl_a_icons' => array('lang' => 'Can alter topic/post icons and smilies', 'cat' => 'posting'),
- 'acl_a_words' => array('lang' => 'Can alter word censors', 'cat' => 'posting'),
- 'acl_a_bbcode' => array('lang' => 'Can define BBCode tags', 'cat' => 'posting'),
- 'acl_a_attach' => array('lang' => 'Can alter attachment related settings', 'cat' => 'posting'),
-
- 'acl_a_user' => array('lang' => 'Can manage users<br /><em>This also includes seeing the users browser agent within the viewonline list.</em>', 'cat' => 'user_group'),
- 'acl_a_userdel' => array('lang' => 'Can delete/prune users', 'cat' => 'user_group'),
- 'acl_a_group' => array('lang' => 'Can manage groups', 'cat' => 'user_group'),
- 'acl_a_groupadd' => array('lang' => 'Can add new groups', 'cat' => 'user_group'),
- 'acl_a_groupdel' => array('lang' => 'Can delete groups', 'cat' => 'user_group'),
- 'acl_a_ranks' => array('lang' => 'Can manage ranks', 'cat' => 'user_group'),
- 'acl_a_profile' => array('lang' => 'Can manage custom profile fields', 'cat' => 'user_group'),
- 'acl_a_names' => array('lang' => 'Can manage disallowed names', 'cat' => 'user_group'),
- 'acl_a_ban' => array('lang' => 'Can manage bans', 'cat' => 'user_group'),
-
- 'acl_a_viewauth' => array('lang' => 'Can view permission masks', 'cat' => 'permissions'),
- 'acl_a_authgroups' => array('lang' => 'Can alter permissions for individual groups', 'cat' => 'permissions'),
- 'acl_a_authusers' => array('lang' => 'Can alter permissions for individual users', 'cat' => 'permissions'),
- 'acl_a_fauth' => array('lang' => 'Can alter forum permission class', 'cat' => 'permissions'),
- 'acl_a_mauth' => array('lang' => 'Can alter moderator permission class', 'cat' => 'permissions'),
- 'acl_a_aauth' => array('lang' => 'Can alter admin permission class', 'cat' => 'permissions'),
- 'acl_a_uauth' => array('lang' => 'Can alter user permission class', 'cat' => 'permissions'),
- 'acl_a_roles' => array('lang' => 'Can manage roles', 'cat' => 'permissions'),
- 'acl_a_switchperm' => array('lang' => 'Can use others permissions', 'cat' => 'permissions'),
-
- 'acl_a_styles' => array('lang' => 'Can manage styles', 'cat' => 'misc'),
- 'acl_a_viewlogs' => array('lang' => 'Can view logs', 'cat' => 'misc'),
- 'acl_a_clearlogs' => array('lang' => 'Can clear logs', 'cat' => 'misc'),
- 'acl_a_modules' => array('lang' => 'Can manage modules', 'cat' => 'misc'),
- 'acl_a_language' => array('lang' => 'Can manage language packs', 'cat' => 'misc'),
- 'acl_a_email' => array('lang' => 'Can send mass e-mail', 'cat' => 'misc'),
- 'acl_a_bots' => array('lang' => 'Can manage bots', 'cat' => 'misc'),
- 'acl_a_reasons' => array('lang' => 'Can manage report/denial reasons', 'cat' => 'misc'),
- 'acl_a_backup' => array('lang' => 'Can backup/restore database', 'cat' => 'misc'),
- 'acl_a_search' => array('lang' => 'Can manage search backends and settings', 'cat' => 'misc'),
+ 'ACL_A_BOARD' => 'Can alter board settings/check for updates',
+ 'ACL_A_SERVER' => 'Can alter server/communication settings',
+ 'ACL_A_JABBER' => 'Can alter Jabber settings',
+ 'ACL_A_PHPINFO' => 'Can view php settings',
+
+ 'ACL_A_FORUM' => 'Can manage forums',
+ 'ACL_A_FORUMADD' => 'Can add new forums',
+ 'ACL_A_FORUMDEL' => 'Can delete forums',
+ 'ACL_A_PRUNE' => 'Can prune forums',
+
+ 'ACL_A_ICONS' => 'Can alter topic/post icons and smilies',
+ 'ACL_A_WORDS' => 'Can alter word censors',
+ 'ACL_A_BBCODE' => 'Can define BBCode tags',
+ 'ACL_A_ATTACH' => 'Can alter attachment related settings',
+
+ 'ACL_A_USER' => 'Can manage users<br /><em>This also includes seeing the users browser agent within the viewonline list.</em>',
+ 'ACL_A_USERDEL' => 'Can delete/prune users',
+ 'ACL_A_GROUP' => 'Can manage groups',
+ 'ACL_A_GROUPADD' => 'Can add new groups',
+ 'ACL_A_GROUPDEL' => 'Can delete groups',
+ 'ACL_A_RANKS' => 'Can manage ranks',
+ 'ACL_A_PROFILE' => 'Can manage custom profile fields',
+ 'ACL_A_NAMES' => 'Can manage disallowed names',
+ 'ACL_A_BAN' => 'Can manage bans',
+
+ 'ACL_A_VIEWAUTH' => 'Can view permission masks',
+ 'ACL_A_AUTHGROUPS' => 'Can alter permissions for individual groups',
+ 'ACL_A_AUTHUSERS' => 'Can alter permissions for individual users',
+ 'ACL_A_FAUTH' => 'Can alter forum permission class',
+ 'ACL_A_MAUTH' => 'Can alter moderator permission class',
+ 'ACL_A_AAUTH' => 'Can alter admin permission class',
+ 'ACL_A_UAUTH' => 'Can alter user permission class',
+ 'ACL_A_ROLES' => 'Can manage roles',
+ 'ACL_A_SWITCHPERM' => 'Can use others permissions',
+
+ 'ACL_A_STYLES' => 'Can manage styles',
+ 'ACL_A_EXTENSIONS' => 'Can manage extensions',
+ 'ACL_A_VIEWLOGS' => 'Can view logs',
+ 'ACL_A_CLEARLOGS' => 'Can clear logs',
+ 'ACL_A_MODULES' => 'Can manage modules',
+ 'ACL_A_LANGUAGE' => 'Can manage language packs',
+ 'ACL_A_EMAIL' => 'Can send mass email',
+ 'ACL_A_BOTS' => 'Can manage bots',
+ 'ACL_A_REASONS' => 'Can manage report/denial reasons',
+ 'ACL_A_BACKUP' => 'Can backup/restore database',
+ 'ACL_A_SEARCH' => 'Can manage search backends and settings',
));
-
-?> \ No newline at end of file
diff --git a/phpBB/language/en/acp/posting.php b/phpBB/language/en/acp/posting.php
index 9232be661b..ea3eadb0dd 100644
--- a/phpBB/language/en/acp/posting.php
+++ b/phpBB/language/en/acp/posting.php
@@ -4,9 +4,8 @@
* acp_posting [English]
*
* @package language
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -46,6 +45,7 @@ $lang = array_merge($lang, array(
'BBCODE_ADDED' => 'BBCode added successfully.',
'BBCODE_EDITED' => 'BBCode edited successfully.',
+ 'BBCODE_DELETED' => 'The BBCode has been removed successfully.',
'BBCODE_NOT_EXIST' => 'The BBCode you selected does not exist.',
'BBCODE_HELPLINE' => 'Help line',
'BBCODE_HELPLINE_EXPLAIN' => 'This field contains the mouse over text of the BBCode.',
@@ -81,7 +81,7 @@ $lang = array_merge($lang, array(
'INTTEXT' => 'Unicode letter characters, numbers, spaces, commas, dots, minus, plus, hyphen, underscore and whitespaces.',
'IDENTIFIER' => 'Characters from the latin alphabet (A-Z), numbers, hyphen and underscore',
'NUMBER' => 'Any series of digits',
- 'EMAIL' => 'A valid e-mail address',
+ 'EMAIL' => 'A valid email address',
'URL' => 'A valid URL using any protocol (http, ftp, etc… cannot be used for javascript exploits). If none is given, “http://” is prefixed to the string.',
'LOCAL_URL' => 'A local URL. The URL must be relative to the topic page and cannot contain a server name or protocol, as links are prefixed with “%s”',
'RELATIVE_URL' => 'A relative URL. You can use this to match parts of a URL, but be careful: a full URL is a valid relative URL. When you want to use relative URLs of your board, use the LOCAL_URL token.',
@@ -122,15 +122,19 @@ $lang = array_merge($lang, array(
'FIRST' => 'First',
'ICONS_ADD' => 'Add a new icon',
- 'ICONS_NONE_ADDED' => 'No icons were added.',
- 'ICONS_ONE_ADDED' => 'The icon has been added successfully.',
- 'ICONS_ADDED' => 'The icons have been added successfully.',
+ 'ICONS_ADDED' => array(
+ 0 => 'No icons were added.',
+ 1 => 'The icon has been added successfully.',
+ 2 => 'The icons have been added successfully.',
+ ),
'ICONS_CONFIG' => 'Icon configuration',
'ICONS_DELETED' => 'The icon has been removed successfully.',
'ICONS_EDIT' => 'Edit icon',
- 'ICONS_ONE_EDITED' => 'The icon has been updated successfully.',
- 'ICONS_NONE_EDITED' => 'No icons were updated.',
- 'ICONS_EDITED' => 'The icons have been updated successfully.',
+ 'ICONS_EDITED' => array(
+ 0 => 'No icons were updated.',
+ 1 => 'The icon has been updated successfully.',
+ 2 => 'The icons have been updated successfully.',
+ ),
'ICONS_HEIGHT' => 'Icon height',
'ICONS_IMAGE' => 'Icon image',
'ICONS_IMPORTED' => 'The icons pack has been installed successfully.',
@@ -162,9 +166,11 @@ $lang = array_merge($lang, array(
'SELECT_PACKAGE' => 'Select a package file',
'SMILIES_ADD' => 'Add a new smiley',
- 'SMILIES_NONE_ADDED' => 'No smilies were added.',
- 'SMILIES_ONE_ADDED' => 'The smiley has been added successfully.',
- 'SMILIES_ADDED' => 'The smilies have been added successfully.',
+ 'SMILIES_ADDED' => array(
+ 0 => 'No smilies were added.',
+ 1 => 'The smiley has been added successfully.',
+ 2 => 'The smilies have been added successfully.',
+ ),
'SMILIES_CODE' => 'Smiley code',
'SMILIES_CONFIG' => 'Smiley configuration',
'SMILIES_DELETED' => 'The smiley has been removed successfully.',
@@ -172,9 +178,11 @@ $lang = array_merge($lang, array(
'SMILIE_NO_CODE' => 'The smiley “%s” was ignored, as there was no code entered.',
'SMILIE_NO_EMOTION' => 'The smiley “%s” was ignored, as there was no emotion entered.',
'SMILIE_NO_FILE' => 'The smiley “%s” was ignored, as the file is missing.',
- 'SMILIES_NONE_EDITED' => 'No smilies were updated.',
- 'SMILIES_ONE_EDITED' => 'The smiley has been updated successfully.',
- 'SMILIES_EDITED' => 'The smilies have been updated successfully.',
+ 'SMILIES_EDITED' => array(
+ 0 => 'No smilies were updated.',
+ 1 => 'The smiley has been updated successfully.',
+ 2 => 'The smilies have been updated successfully.',
+ ),
'SMILIES_EMOTION' => 'Emotion',
'SMILIES_HEIGHT' => 'Smiley height',
'SMILIES_IMAGE' => 'Smiley image',
@@ -186,7 +194,10 @@ $lang = array_merge($lang, array(
'SMILIES_URL' => 'Smiley image file',
'SMILIES_WIDTH' => 'Smiley width',
- 'TOO_MANY_SMILIES' => 'Limit of %d smilies reached.',
+ 'TOO_MANY_SMILIES' => array(
+ 1 => 'Limit of %d smiley reached.',
+ 2 => 'Limit of %d smilies reached.',
+ ),
'WRONG_PAK_TYPE' => 'The specified package does not contain the appropriate data.',
));
@@ -278,5 +289,3 @@ $lang = array_merge($lang, array(
'USED_IN_REPORTS' => 'Used in reports',
));
-
-?> \ No newline at end of file
diff --git a/phpBB/language/en/acp/profile.php b/phpBB/language/en/acp/profile.php
index e193d9303c..dc42693ca7 100644
--- a/phpBB/language/en/acp/profile.php
+++ b/phpBB/language/en/acp/profile.php
@@ -4,9 +4,8 @@
* acp_profile [English]
*
* @package language
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -40,6 +39,7 @@ $lang = array_merge($lang, array(
'ADDED_PROFILE_FIELD' => 'Successfully added custom profile field.',
'ALPHA_ONLY' => 'Alphanumeric only',
'ALPHA_SPACERS' => 'Alphanumeric and spacers',
+ 'ALPHA_UNDERSCORE' => 'Alphanumeric and underscores',
'ALWAYS_TODAY' => 'Always the current date',
'BOOL_ENTRIES_EXPLAIN' => 'Enter your options now',
@@ -66,6 +66,10 @@ $lang = array_merge($lang, array(
'DISPLAY_AT_PROFILE_EXPLAIN' => 'The user is able to change this profile field within the user control panel.',
'DISPLAY_AT_REGISTER' => 'Display on registration screen',
'DISPLAY_AT_REGISTER_EXPLAIN' => 'If this option is enabled, the field will be displayed on registration.',
+ 'DISPLAY_ON_MEMBERLIST' => 'Display on memberlist screen',
+ 'DISPLAY_ON_MEMBERLIST_EXPLAIN' => 'If this option is enabled, the field will be displayed in the user rows on the memberlist screen.',
+ 'DISPLAY_ON_PM' => 'Display on view pm screen',
+ 'DISPLAY_ON_PM_EXPLAIN' => 'If this option is enabled, the field will be displayed in the mini-profile on the pm screen.',
'DISPLAY_ON_VT' => 'Display on viewtopic screen',
'DISPLAY_ON_VT_EXPLAIN' => 'If this option is enabled, the field will be displayed in the mini-profile on the topic screen.',
'DISPLAY_PROFILE_FIELD' => 'Publicly display profile field',
@@ -79,6 +83,8 @@ $lang = array_merge($lang, array(
'EVERYTHING_OK' => 'Everything OK',
'FIELD_BOOL' => 'Boolean (Yes/No)',
+ 'FIELD_CONTACT_DESC' => 'Contact description',
+ 'FIELD_CONTACT_URL' => 'Contact link',
'FIELD_DATE' => 'Date',
'FIELD_DESCRIPTION' => 'Field description',
'FIELD_DESCRIPTION_EXPLAIN' => 'The explanation for this field presented to the user.',
@@ -87,12 +93,15 @@ $lang = array_merge($lang, array(
'FIELD_IDENT_ALREADY_EXIST' => 'The chosen field identification already exist. Please choose another name.',
'FIELD_IDENT_EXPLAIN' => 'The field identification is a name to identify the profile field within the database and the templates.',
'FIELD_INT' => 'Numbers',
+ 'FIELD_IS_CONTACT' => 'Display field as a contact field',
+ 'FIELD_IS_CONTACT_EXPLAIN' => 'Contact fields are displayed with in the contact section of the user profile and are displayed differently in the mini profile next to posts and private messages.',
'FIELD_LENGTH' => 'Length of input box',
'FIELD_NOT_FOUND' => 'Profile field not found.',
'FIELD_STRING' => 'Single text field',
'FIELD_TEXT' => 'Textarea',
'FIELD_TYPE' => 'Field type',
'FIELD_TYPE_EXPLAIN' => 'You are not able to change the field type later.',
+ 'FIELD_URL' => 'URL (Link)',
'FIELD_VALIDATION' => 'Field validation',
'FIRST_OPTION' => 'First option',
@@ -154,5 +163,3 @@ $lang = array_merge($lang, array(
'VISIBILITY_OPTION' => 'Visibility options',
));
-
-?> \ No newline at end of file
diff --git a/phpBB/language/en/acp/prune.php b/phpBB/language/en/acp/prune.php
index 8a06225102..7134efd765 100644
--- a/phpBB/language/en/acp/prune.php
+++ b/phpBB/language/en/acp/prune.php
@@ -4,9 +4,8 @@
* acp_prune [English]
*
* @package language
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -37,7 +36,9 @@ if (empty($lang) || !is_array($lang))
// User pruning
$lang = array_merge($lang, array(
- 'ACP_PRUNE_USERS_EXPLAIN' => 'This section allows you to delete or deactivate users on your board. Accounts can be filtered in a variety of ways; by post count, most recent activity, etc. Criteria may be combined to narrow down which accounts are affected. For example, you can prune users with fewer than 10 posts, who were also inactive after 2002-01-01. Alternatively, you may skip the criteria selection completely by entering a list of users (each on a separate line) into the text field. Take care with this facility! Once a user is deleted, there is no way to reverse the action.',
+ 'ACP_PRUNE_USERS_EXPLAIN' => 'This section allows you to delete or deactivate users on your board. Accounts can be filtered in a variety of ways; by post count, most recent activity, etc. Criteria may be combined to narrow down which accounts are affected. For example, you can prune users with fewer than 10 posts, who were also inactive after 2002-01-01. Use * as a wildcard for text fields. Alternatively, you may skip the criteria selection completely by entering a list of users (each on a separate line) into the text field. Take care with this facility! Once a user is deleted, there is no way to reverse the action.',
+
+ 'CRITERIA' => 'Criteria',
'DEACTIVATE_DELETE' => 'Deactivate or delete',
'DEACTIVATE_DELETE_EXPLAIN' => 'Choose whether to deactivate users or delete them entirely. Please note that deleted users cannot be restored!',
@@ -45,15 +46,18 @@ $lang = array_merge($lang, array(
'DELETE_USER_POSTS' => 'Delete pruned user posts',
'DELETE_USER_POSTS_EXPLAIN' => 'Removes posts made by deleted users, has no effect if users are deactivated.',
- 'JOINED_EXPLAIN' => 'Enter a date in <kbd>YYYY-MM-DD</kbd> format.',
+ 'JOINED_EXPLAIN' => 'Enter a date in <kbd>YYYY-MM-DD</kbd> format. You may use both fields to specify an interval, or leave one blank for an open date range.',
'LAST_ACTIVE_EXPLAIN' => 'Enter a date in <kbd>YYYY-MM-DD</kbd> format. Enter <kbd>0000-00-00</kbd> to prune users who never logged in, <em>Before</em> and <em>After</em> conditions will be ignored.',
+ 'POSTS_ON_QUEUE' => 'Posts Awaiting Approval',
+ 'PRUNE_USERS_GROUP_EXPLAIN' => 'Limit to users within the selected group.',
+ 'PRUNE_USERS_GROUP_NONE' => 'All groups',
'PRUNE_USERS_LIST' => 'Users to be pruned',
- 'PRUNE_USERS_LIST_DELETE' => 'With the selected critera for pruning users the following accounts will be removed.',
- 'PRUNE_USERS_LIST_DEACTIVATE' => 'With the selected critera for pruning users the following accounts will be deactivated.',
+ 'PRUNE_USERS_LIST_DELETE' => 'With the selected critera for pruning users the following accounts will be removed. You can remove individual users from the deletion list by unchecking the box next to their username.',
+ 'PRUNE_USERS_LIST_DEACTIVATE' => 'With the selected critera for pruning users the following accounts will be deactivated. You can remove individual users from the deactivation list by unchecking the box next to their username.',
- 'SELECT_USERS_EXPLAIN' => 'Enter specific usernames here, they will be used in preference to the criteria above. Founders cannot be pruned.',
+ 'SELECT_USERS_EXPLAIN' => 'Enter specific usernames here. They will be used in preference to the criteria above. Founders cannot be pruned.',
'USER_DEACTIVATE_SUCCESS' => 'The selected users have been deactivated successfully.',
'USER_DELETE_SUCCESS' => 'The selected users have been deleted successfully.',
@@ -87,5 +91,3 @@ $lang = array_merge($lang, array(
'TOPICS_PRUNED' => 'Topics pruned',
));
-
-?> \ No newline at end of file
diff --git a/phpBB/language/en/acp/search.php b/phpBB/language/en/acp/search.php
index 79ac75c833..8d9443b481 100644
--- a/phpBB/language/en/acp/search.php
+++ b/phpBB/language/en/acp/search.php
@@ -4,9 +4,8 @@
* acp_search [English]
*
* @package language
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -52,16 +51,40 @@ $lang = array_merge($lang, array(
'DELETING_INDEX_IN_PROGRESS' => 'Deleting the index in progress',
'DELETING_INDEX_IN_PROGRESS_EXPLAIN' => 'The search backend is currently cleaning its index. This can take a few minutes.',
- 'FULLTEXT_MYSQL_INCOMPATIBLE_VERSION' => 'The MySQL fulltext backend can only be used with MySQL4 and above.',
+ 'FULLTEXT_MYSQL_INCOMPATIBLE_DATABASE' => 'The MySQL fulltext backend can only be used with MySQL4 and above.',
'FULLTEXT_MYSQL_NOT_SUPPORTED' => 'MySQL fulltext indexes can only be used with MyISAM or InnoDB tables. MySQL 5.6.4 or later is required for fulltext indexes on InnoDB tables.',
'FULLTEXT_MYSQL_TOTAL_POSTS' => 'Total number of indexed posts',
- 'FULLTEXT_MYSQL_MBSTRING' => 'Support for non-latin UTF-8 characters using mbstring:',
- 'FULLTEXT_MYSQL_PCRE' => 'Support for non-latin UTF-8 characters using PCRE:',
- 'FULLTEXT_MYSQL_MBSTRING_EXPLAIN' => 'If PCRE does not have unicode character properties, the search backend will try to use mbstring’s regular expression engine.',
- 'FULLTEXT_MYSQL_PCRE_EXPLAIN' => 'This search backend requires PCRE unicode character properties, only available in PHP 4.4, 5.1 and above, if you want to search for non-latin characters.',
'FULLTEXT_MYSQL_MIN_SEARCH_CHARS_EXPLAIN' => 'Words with at least this many characters will be indexed for searching. You or your host can only change this setting by changing the mysql configuration.',
'FULLTEXT_MYSQL_MAX_SEARCH_CHARS_EXPLAIN' => 'Words with no more than this many characters will be indexed for searching. You or your host can only change this setting by changing the mysql configuration.',
+ 'FULLTEXT_POSTGRES_INCOMPATIBLE_DATABASE' => 'The PostgreSQL fulltext backend can only be used with PostgreSQL.',
+ 'FULLTEXT_POSTGRES_TS_NOT_USABLE' => 'The PostgreSQL fulltext backend can only be used with PostgreSQL 8.3 and above.',
+ 'FULLTEXT_POSTGRES_TOTAL_POSTS' => 'Total number of indexed posts',
+ 'FULLTEXT_POSTGRES_VERSION_CHECK' => 'PostgreSQL version',
+ 'FULLTEXT_POSTGRES_TS_NAME' => 'Text search Configuration Profile:',
+ 'FULLTEXT_POSTGRES_MIN_WORD_LEN' => 'Minimum word length for keywords',
+ 'FULLTEXT_POSTGRES_MAX_WORD_LEN' => 'Maximum word length for keywords',
+ 'FULLTEXT_POSTGRES_VERSION_CHECK_EXPLAIN' => 'This search backend requires PostgreSQL version 8.3 and above.',
+ 'FULLTEXT_POSTGRES_TS_NAME_EXPLAIN' => 'The Text search configuration profile used to determine the parser and dictionary.',
+ 'FULLTEXT_POSTGRES_MIN_WORD_LEN_EXPLAIN' => 'Words with at least this many characters will be included in the query to the database.',
+ 'FULLTEXT_POSTGRES_MAX_WORD_LEN_EXPLAIN' => 'Words with no more than this many characters will be included in the query to the database.',
+
+ 'FULLTEXT_SPHINX_CONFIGURE' => 'Configure the following settings to generate sphinx config file',
+ 'FULLTEXT_SPHINX_DATA_PATH' => 'Path to data directory',
+ 'FULLTEXT_SPHINX_DATA_PATH_EXPLAIN' => 'It will be used to store the indexes and log files. You should create this directory outside the web accessible directories. (should have a trailing slash)',
+ 'FULLTEXT_SPHINX_DELTA_POSTS' => 'Number of posts in frequently updated delta index',
+ 'FULLTEXT_SPHINX_HOST' => 'Sphinx search daemon host',
+ 'FULLTEXT_SPHINX_HOST_EXPLAIN' => 'Host on which the sphinx search daemon (searchd) listens. Leave empty to use the default localhost',
+ 'FULLTEXT_SPHINX_INDEXER_MEM_LIMIT' => 'Indexer memory limit',
+ 'FULLTEXT_SPHINX_INDEXER_MEM_LIMIT_EXPLAIN' => 'This number should at all times be lower than the RAM available on your machine. If you experience periodic performance problems this might be due to the indexer consuming too many resources. It might help to lower the amount of memory available to the indexer.',
+ 'FULLTEXT_SPHINX_MAIN_POSTS' => 'Number of posts in main index',
+ 'FULLTEXT_SPHINX_PORT' => 'Sphinx search daemon port',
+ 'FULLTEXT_SPHINX_PORT_EXPLAIN' => 'Port on which the sphinx search daemon (searchd) listens. Leave empty to use the default Sphinx API port 9312',
+ 'FULLTEXT_SPHINX_WRONG_DATABASE' => 'The sphinx search for phpBB supports MySQL and PostgreSQL only.',
+ 'FULLTEXT_SPHINX_CONFIG_FILE' => 'Sphinx config file',
+ 'FULLTEXT_SPHINX_CONFIG_FILE_EXPLAIN' => 'The generated content of the sphinx config file. This data needs to be pasted into the sphinx.conf which is used by sphinx search daemon.',
+ 'FULLTEXT_SPHINX_NO_CONFIG_DATA' => 'The sphinx data and config directory paths are not defined. Please define them to generate the config file.',
+
'GENERAL_SEARCH_SETTINGS' => 'General search settings',
'GO_TO_SEARCH_INDEX' => 'Go to search index page',
@@ -85,8 +108,15 @@ $lang = array_merge($lang, array(
'SEARCH_GUEST_INTERVAL' => 'Guest search flood interval',
'SEARCH_GUEST_INTERVAL_EXPLAIN' => 'Number of seconds guests must wait between searches. If one guest searches all others have to wait until the time interval passed.',
- 'SEARCH_INDEX_CREATE_REDIRECT' => 'All posts up to post id %1$d have now been indexed, of which %2$d posts were within this step.<br />The current rate of indexing is approximately %3$.1f posts per second.<br />Indexing in progress…',
- 'SEARCH_INDEX_DELETE_REDIRECT' => 'All posts up to post id %1$d have been removed from the search index.<br />Deleting in progress…',
+ 'SEARCH_INDEX_CREATE_REDIRECT' => array(
+ 2 => 'All posts up to post id %2$d have now been indexed, of which %1$d posts were within this step.<br />',
+ ),
+ 'SEARCH_INDEX_CREATE_REDIRECT_RATE' => array(
+ 2 => 'The current rate of indexing is approximately %1$.1f posts per second.<br />Indexing in progress…',
+ ),
+ 'SEARCH_INDEX_DELETE_REDIRECT' => array(
+ 2 => 'All posts up to post id %2$d have been removed from the search index.<br />Deleting in progress…',
+ ),
'SEARCH_INDEX_CREATED' => 'Successfully indexed all posts in the board database.',
'SEARCH_INDEX_REMOVED' => 'Successfully deleted the search index for this backend.',
'SEARCH_INTERVAL' => 'User search flood interval',
@@ -105,5 +135,3 @@ $lang = array_merge($lang, array(
'YES_SEARCH_UPDATE' => 'Enable fulltext updating',
'YES_SEARCH_UPDATE_EXPLAIN' => 'Updating of fulltext indexes when posting, overridden if search is disabled.',
));
-
-?> \ No newline at end of file
diff --git a/phpBB/language/en/acp/styles.php b/phpBB/language/en/acp/styles.php
index 3194a2ebd6..e7c149600d 100644
--- a/phpBB/language/en/acp/styles.php
+++ b/phpBB/language/en/acp/styles.php
@@ -4,9 +4,8 @@
* acp_styles [English]
*
* @package language
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -36,18 +35,9 @@ if (empty($lang) || !is_array($lang))
// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
$lang = array_merge($lang, array(
- 'ACP_IMAGESETS_EXPLAIN' => 'Imagesets comprise all the button, forum, folder, etc. and other non-style specific images used by the board. Here you can edit, export or delete existing imagesets and import or activate new sets.',
- 'ACP_STYLES_EXPLAIN' => 'Here you can manage the available styles on your board. A style consists of a template, theme and imageset. You may alter existing styles, delete, deactivate, reactivate, create or import new ones. You can also see what a style will look like using the preview function. The current default style is noted by the presence of an asterisk (*). Also listed is the total user count for each style, note that overriding user styles will not be reflected here.',
- 'ACP_TEMPLATES_EXPLAIN' => 'A template set comprises all the markup used to generate the layout of your board. Here you can edit existing template sets, delete, export, import and preview sets. You can also modify the templating code used to generate BBCode.',
- 'ACP_THEMES_EXPLAIN' => 'From here you can create, install, edit, delete and export themes. A theme is the combination of colours and images that are applied to your templates to define the basic look of your board. The range of options open to you depends on the configuration of your server and phpBB installation, see the manual for further details. Please note that when creating new themes the use of an existing theme as a basis is optional.',
- 'ADD_IMAGESET' => 'Create imageset',
- 'ADD_IMAGESET_EXPLAIN' => 'Here you can create a new imageset. Depending on your server configuration and file permissions you may have additional options here. For example you may be able to base this imageset on an existing one. You may also be able to upload or import (from the store directory) a imageset archive. If you upload or import an archive the imageset name can be optionally taken from the archive name (to do this leave the imageset name blank).',
- 'ADD_STYLE' => 'Create style',
- 'ADD_STYLE_EXPLAIN' => 'Here you can create a new style. Depending on your server configuration and file permissions you may have additional options. For example you may be able to base this style on an existing one. You may also be able to upload or import (from the store directory) a style archive. If you upload or import an archive the style name will be determined automatically.',
+ 'ACP_STYLES_EXPLAIN' => 'Here you can manage the available styles on your board. You may alter existing styles, delete, deactivate, reactivate, install new ones. You can also see what a style will look like using the preview function. Also listed is the total user count for each style, note that overriding user styles will not be reflected here.',
'ADD_TEMPLATE' => 'Create template',
'ADD_TEMPLATE_EXPLAIN' => 'Here you can add a new template. Depending on your server configuration and file permissions you may have additional options here. For example you may be able to base this template set on an existing one. You may also be able to upload or import (from the store directory) a template archive. If you upload or import an archive the template name can be optionally taken from the archive name (to do this leave the template name blank).',
- 'ADD_THEME' => 'Create theme',
- 'ADD_THEME_EXPLAIN' => 'Here you can add a new theme. Depending on your server configuration and file permissions you may have additional options here. For example you may be able to base this theme on an existing one. You may also be able to upload or import (from the store directory) a theme archive. If you upload or import an archive the theme name can be optionally taken from the archive name (to do this leave the theme name blank).',
'ARCHIVE_FORMAT' => 'Archive file type',
'AUTOMATIC_EXPLAIN' => 'Leave blank to attempt automatic detection.',
@@ -62,12 +52,11 @@ $lang = array_merge($lang, array(
'CACHE_FILENAME' => 'Template file',
'CACHE_FILESIZE' => 'File size',
'CACHE_MODIFIED' => 'Modified',
- 'CONFIRM_IMAGESET_REFRESH' => 'Are you sure you wish to refresh all imageset data? The settings from the imageset configuration file will overwrite all modifications to the imageset which have been carried out with the imageset editor.',
+ 'CANNOT_BE_INSTALLED' => 'Cannot be installed',
'CONFIRM_TEMPLATE_CLEAR_CACHE' => 'Are you sure you wish to clear all cached versions of your template files?',
- 'CONFIRM_TEMPLATE_REFRESH' => 'Are you sure you wish to refresh all template data in the database with the contents of the template files on the filesystem? This will overwrite all modifications which have been carried out with the template editor while the template was stored in the database.',
- 'CONFIRM_THEME_REFRESH' => 'Are you sure you wish to refresh the theme data stored in the database with the contents of the theme on the filesystem? This will overwrite all modifications which have been carried out with the theme editor while the theme was stored in the database.',
+ 'CONFIRM_DELETE_STYLES' => 'Are you sure you wish to delete selected styles?',
+ 'CONFIRM_UNINSTALL_STYLES' => 'Are you sure you wish to uninstall selected styles?',
'COPYRIGHT' => 'Copyright',
- 'CREATE_IMAGESET' => 'Create new imageset',
'CREATE_STYLE' => 'Create new style',
'CREATE_TEMPLATE' => 'Create new template set',
'CREATE_THEME' => 'Create new theme',
@@ -75,35 +64,26 @@ $lang = array_merge($lang, array(
'DEACTIVATE_DEFAULT' => 'You cannot deactivate the default style.',
'DELETE_FROM_FS' => 'Delete from filesystem',
- 'DELETE_IMAGESET' => 'Delete imageset',
- 'DELETE_IMAGESET_EXPLAIN' => 'Here you can remove the selected imageset from the database. Please note that there is no undo capability. It is recommended that you first export your set for possible future use.',
'DELETE_STYLE' => 'Delete style',
'DELETE_STYLE_EXPLAIN' => 'Here you can remove the selected style. Take care in deleting styles, there is no undo capability.',
+ 'DELETE_STYLE_FILES_FAILED' => 'Error deleting files for style "%s".',
+ 'DELETE_STYLE_FILES_SUCCESS' => 'Files for style "%s" have been deleted.',
'DELETE_TEMPLATE' => 'Delete template',
'DELETE_TEMPLATE_EXPLAIN' => 'Here you can remove the selected template set from the database. Please note that there is no undo capability. It is recommended that you first export your set for possible future use.',
- 'DELETE_THEME' => 'Delete theme',
- 'DELETE_THEME_EXPLAIN' => 'Here you can remove the selected theme from the database. Please note that there is no undo capability. It is recommended that you first export your theme for possible future use.',
'DETAILS' => 'Details',
'DIMENSIONS_EXPLAIN' => 'Selecting yes here will include width/height parameters.',
- 'EDIT_DETAILS_IMAGESET' => 'Edit imageset details',
- 'EDIT_DETAILS_IMAGESET_EXPLAIN' => 'Here you can edit certain imageset details such as its name.',
'EDIT_DETAILS_STYLE' => 'Edit style',
- 'EDIT_DETAILS_STYLE_EXPLAIN' => 'Using the form below you can modify this existing style. You may alter the combination of template, theme and imageset which define the style itself. You may also make the style the default one.',
+ 'EDIT_DETAILS_STYLE_EXPLAIN' => 'Using the form below you can modify this existing style. You may alter the combination of template and theme which define the style itself. You may also make the style the default one.',
'EDIT_DETAILS_TEMPLATE' => 'Edit template details',
- 'EDIT_DETAILS_TEMPLATE_EXPLAIN' => 'Here you can edit certain template details such as its name. You may also have the option to switch storage of the stylesheet from the filesystem to the database and vice versa. This option depends on your PHP configuration and whether your template set can be written to by the web server.',
+ 'EDIT_DETAILS_TEMPLATE_EXPLAIN' => 'Here you can edit certain template details such as its name.',
'EDIT_DETAILS_THEME' => 'Edit theme details',
- 'EDIT_DETAILS_THEME_EXPLAIN' => 'Here you can edit certain theme details such as its name. You may also have the option to switch storage of the stylesheet from the filesystem to the database and vice versa. This option depends on your PHP configuration and whether your stylesheet can be written to by the web server.',
- 'EDIT_IMAGESET' => 'Edit imageset',
- 'EDIT_IMAGESET_EXPLAIN' => 'Here you can edit the individual images which define the imageset. You can also specify dimensions for the image. Dimensions are optional, specifying them can overcome certain rendering issues with some browsers. By not specifying them you reduce the size of the database record a little.',
+ 'EDIT_DETAILS_THEME_EXPLAIN' => 'Here you can edit certain theme details such as its name.',
'EDIT_TEMPLATE' => 'Edit template',
- 'EDIT_TEMPLATE_EXPLAIN' => 'Here you can edit your template set directly. Please remember that these edits are permanent and cannot be undone once submitted. If PHP can write to the template files in your styles directory any changes here will be written directly to those files. If PHP cannot write to those files they will be copied into the database and all changes will only be reflected there. Please take care when editing your template set, remember to close all replacement variable terms {XXXX} and conditional statements.',
- 'EDIT_TEMPLATE_STORED_DB' => 'The template file was unwritable so the template set is now stored in the database containing the modified file.',
+ 'EDIT_TEMPLATE_EXPLAIN' => 'Here you can edit your template set directly. Please remember that these edits are permanent and cannot be undone once submitted. Please take care when editing your template set, remember to close all replacement variable terms {XXXX} and conditional statements.',
'EDIT_THEME' => 'Edit theme',
'EDIT_THEME_EXPLAIN' => 'Here you can edit the selected theme, changing colours, images, etc.',
- 'EDIT_THEME_STORED_DB' => 'The stylesheet file was unwritable so the stylesheet is now stored in the database containing your modification.',
- 'EDIT_THEME_STORE_PARSED' => 'The theme requires that its stylesheet is parsed. This is only possible if it’s stored in the database.',
'EDITOR_DISABLED' => 'The template editor is disabled.',
'EXPORT' => 'Export',
@@ -123,24 +103,7 @@ $lang = array_merge($lang, array(
'IMAGE_NAME' => 'Image name',
'IMAGE_PARAMETER' => 'Parameter',
'IMAGE_VALUE' => 'Value',
- 'IMAGESET_ADDED' => 'New imageset added on filesystem.',
- 'IMAGESET_ADDED_DB' => 'New imageset added to database.',
- 'IMAGESET_DELETED' => 'Imageset deleted successfully.',
- 'IMAGESET_DELETED_FS' => 'Imageset removed from database but some files may remain on the filesystem.',
- 'IMAGESET_DETAILS_UPDATED' => 'Imageset details successfully updated.',
- 'IMAGESET_ERR_ARCHIVE' => 'Please select an archive method.',
- 'IMAGESET_ERR_COPY_LONG' => 'The copyright can be no longer than 60 characters.',
- 'IMAGESET_ERR_NAME_CHARS' => 'The imageset name can only contain alphanumeric characters, -, +, _ and space.',
- 'IMAGESET_ERR_NAME_EXIST' => 'A imageset with that name already exists.',
- 'IMAGESET_ERR_NAME_LONG' => 'The imageset name can be no longer than 30 characters.',
- 'IMAGESET_ERR_NOT_IMAGESET' => 'The archive you specified does not contain a valid imageset.',
- 'IMAGESET_ERR_STYLE_NAME' => 'You must supply a name for this imageset.',
- 'IMAGESET_EXPORT' => 'Export imageset',
- 'IMAGESET_EXPORT_EXPLAIN' => 'Here you can export an imageset in the form of an archive. This archive will contain all the data necessary to install the set of images on another board. You may select whether to download the file directly or to place it in your store folder for download later or via FTP.',
- 'IMAGESET_EXPORTED' => 'Imageset exported successfully and stored in %s.',
- 'IMAGESET_NAME' => 'Imageset name',
- 'IMAGESET_REFRESHED' => 'Imageset refreshed successfully.',
- 'IMAGESET_UPDATED' => 'Imageset updated successfully.',
+
'ITALIC' => 'Italic',
'IMG_CAT_BUTTONS' => 'Localised buttons',
@@ -219,14 +182,9 @@ $lang = array_merge($lang, array(
'IMG_ICON_BACK_TOP' => 'Top',
- 'IMG_ICON_CONTACT_AIM' => 'AIM',
- 'IMG_ICON_CONTACT_EMAIL' => 'Send e-mail',
- 'IMG_ICON_CONTACT_ICQ' => 'ICQ',
+ 'IMG_ICON_CONTACT_EMAIL' => 'Send email',
'IMG_ICON_CONTACT_JABBER' => 'Jabber',
- 'IMG_ICON_CONTACT_MSNM' => 'MSNM',
'IMG_ICON_CONTACT_PM' => 'Send message',
- 'IMG_ICON_CONTACT_YAHOO' => 'YIM',
- 'IMG_ICON_CONTACT_WWW' => 'Website',
'IMG_ICON_POST_DELETE' => 'Delete post',
'IMG_ICON_POST_EDIT' => 'Edit post',
@@ -269,57 +227,38 @@ $lang = array_merge($lang, array(
'INACTIVE_STYLES' => 'Inactive styles',
'INCLUDE_DIMENSIONS' => 'Include dimensions',
- 'INCLUDE_IMAGESET' => 'Include imageset',
'INCLUDE_TEMPLATE' => 'Include template',
'INCLUDE_THEME' => 'Include theme',
'INHERITING_FROM' => 'Inherits from',
- 'INSTALL_IMAGESET' => 'Install imageset',
- 'INSTALL_IMAGESET_EXPLAIN' => 'Here you can install your selected imageset. You can edit certain details if you wish or use the installation defaults.',
'INSTALL_STYLE' => 'Install style',
- 'INSTALL_STYLE_EXPLAIN' => 'Here you can install a new style and if appropriate the corresponding style elements. If you already have the relevant style elements installed they will not be overwritten. Some styles require existing style elements to already be installed. If you try installing such a style and do not have the required elements you will be notified.',
- 'INSTALL_TEMPLATE' => 'Install Template',
- 'INSTALL_TEMPLATE_EXPLAIN' => 'Here you can install a new template set. Depending on your server configuration you may have a number of options here.',
- 'INSTALL_THEME' => 'Install theme',
- 'INSTALL_THEME_EXPLAIN' => 'Here you can install your selected theme. You can edit certain details if you wish or use the installation defaults.',
- 'INSTALLED_IMAGESET' => 'Installed imagesets',
+ 'INSTALL_STYLES' => 'Install styles',
+ 'INSTALL_STYLES_EXPLAIN' => 'Here you can install new styles.<br />If you cannot find a specific style in list below, check to make sure style is already installed. If it is not installed, check if it was uploaded correctly.',
'INSTALLED_STYLE' => 'Installed styles',
- 'INSTALLED_TEMPLATE' => 'Installed templates',
- 'INSTALLED_THEME' => 'Installed themes',
-
- 'KEEP_IMAGESET' => 'Keep “%s” imageset',
- 'KEEP_TEMPLATE' => 'Keep “%s” template',
- 'KEEP_THEME' => 'Keep “%s” theme',
+ 'INVALID_STYLE_ID' => 'Invalid style ID.',
'LINE_SPACING' => 'Line spacing',
'LOCALISED_IMAGES' => 'Localised',
- 'LOCATION_DISABLED_EXPLAIN' => 'This setting is inherited and cannot be changed.',
'NO_CLASS' => 'Cannot find class in stylesheet.',
- 'NO_IMAGESET' => 'Cannot find imageset on filesystem.',
'NO_IMAGE' => 'No image',
'NO_IMAGE_ERROR' => 'Cannot find image on filesystem.',
+ 'NO_MATCHING_STYLES_FOUND' => 'No styles match your query.',
'NO_STYLE' => 'Cannot find style on filesystem.',
'NO_TEMPLATE' => 'Cannot find template on filesystem.',
'NO_THEME' => 'Cannot find theme on filesystem.',
- 'NO_UNINSTALLED_IMAGESET' => 'No uninstalled imagesets detected.',
'NO_UNINSTALLED_STYLE' => 'No uninstalled styles detected.',
- 'NO_UNINSTALLED_TEMPLATE' => 'No uninstalled templates detected.',
- 'NO_UNINSTALLED_THEME' => 'No uninstalled themes detected.',
'NO_UNIT' => 'None',
- 'ONLY_IMAGESET' => 'This is the only remaining imageset, you cannot delete it.',
'ONLY_STYLE' => 'This is the only remaining style, you cannot delete it.',
- 'ONLY_TEMPLATE' => 'This is the only remaining template set, you cannot delete it.',
- 'ONLY_THEME' => 'This is the only remaining theme, you cannot delete it.',
- 'OPTIONAL_BASIS' => 'Optional basis',
+
+ 'PARENT_STYLE_NOT_FOUND' => 'Parent style was not found. This style may not work correctly. Please uninstall it.',
+ 'PURGED_CACHE' => 'Cache was purged.',
'REFRESH' => 'Refresh',
'REPEAT_NO' => 'None',
'REPEAT_X' => 'Only horizontally',
'REPEAT_Y' => 'Only vertically',
'REPEAT_ALL' => 'Both directions',
- 'REPLACE_IMAGESET' => 'Replace imageset with',
- 'REPLACE_IMAGESET_EXPLAIN' => 'This imageset will replace the one you are deleting in any styles that use it.',
'REPLACE_STYLE' => 'Replace style with',
'REPLACE_STYLE_EXPLAIN' => 'This style will replace the one being deleted for members that use it.',
'REPLACE_TEMPLATE' => 'Replace template with',
@@ -327,55 +266,61 @@ $lang = array_merge($lang, array(
'REPLACE_THEME' => 'Replace theme with',
'REPLACE_THEME_EXPLAIN' => 'This theme will replace the one you are deleting in any styles that use it.',
'REPLACE_WITH_OPTION' => 'Replace with “%s”',
- 'REQUIRES_IMAGESET' => 'This style requires the %s imageset to be installed.',
- 'REQUIRES_TEMPLATE' => 'This style requires the %s template set to be installed.',
- 'REQUIRES_THEME' => 'This style requires the %s theme to be installed.',
+ 'REQUIRES_STYLE' => 'This style requires the style "%s" to be installed.',
'SELECT_IMAGE' => 'Select image',
'SELECT_TEMPLATE' => 'Select template file',
'SELECT_THEME' => 'Select theme file',
'SELECTED_IMAGE' => 'Selected image',
- 'SELECTED_IMAGESET' => 'Selected imageset',
'SELECTED_TEMPLATE' => 'Selected template',
'SELECTED_TEMPLATE_FILE' => 'Selected template file',
'SELECTED_THEME' => 'Selected theme',
'SELECTED_THEME_FILE' => 'Selected theme file',
- 'STORE_DATABASE' => 'Database',
'STORE_FILESYSTEM' => 'Filesystem',
'STYLE_ACTIVATE' => 'Activate',
+ 'STYLE_ACTIVATED' => 'Style activated successfully',
'STYLE_ACTIVE' => 'Active',
'STYLE_ADDED' => 'Style added successfully.',
'STYLE_DEACTIVATE' => 'Deactivate',
+ 'STYLE_DEACTIVATED' => 'Style deactivated successfully',
'STYLE_DEFAULT' => 'Make default style',
- 'STYLE_DELETED' => 'Style deleted successfully.',
+ 'STYLE_DEFAULT_CHANGE' => 'Change default style',
+ 'STYLE_DEFAULT_CHANGE_INACTIVE' => 'You must activate style before making it default style.',
+ 'STYLE_DELETED' => 'Style "%s" deleted successfully.',
'STYLE_DETAILS_UPDATED' => 'Style edited successfully.',
'STYLE_ERR_ARCHIVE' => 'Please select an archive method.',
'STYLE_ERR_COPY_LONG' => 'The copyright can be no longer than 60 characters.',
+ 'STYLE_ERR_INVALID_PARENT' => 'Invalid parent style.',
'STYLE_ERR_MORE_ELEMENTS' => 'You must select at least one style element.',
'STYLE_ERR_NAME_CHARS' => 'The style name can only contain alphanumeric characters, -, +, _ and space.',
'STYLE_ERR_NAME_EXIST' => 'A style with that name already exists.',
'STYLE_ERR_NAME_LONG' => 'The style name can be no longer than 30 characters.',
- 'STYLE_ERR_NO_IDS' => 'You must select a template, theme and imageset for this style.',
'STYLE_ERR_NOT_STYLE' => 'The imported or uploaded file did not contain a valid style archive.',
'STYLE_ERR_STYLE_NAME' => 'You must supply a name for this style.',
'STYLE_EXPORT' => 'Export style',
- 'STYLE_EXPORT_EXPLAIN' => 'Here you can export a style in the form of an archive. A style does not need to contain all elements but it must contain at least one. For example if you have created a new theme and imageset for a commonly used template you could simply export the theme and imageset and omit the template. You may select whether to download the file directly or to place it in your store folder for download later or via FTP.',
+ 'STYLE_EXPORT_EXPLAIN' => 'Here you can export a style in the form of an archive. A style does not need to contain all elements but it must contain at least one. For example if you have created a new theme for a commonly used template you could simply export the theme and omit the template. You may select whether to download the file directly or to place it in your store folder for download later or via FTP.',
'STYLE_EXPORTED' => 'Style exported successfully and stored in %s.',
- 'STYLE_IMAGESET' => 'Imageset',
+ 'STYLE_INSTALLED' => 'Style "%s" has been installed.',
+ 'STYLE_INSTALLED_EDIT_DETAILS' => '<a href="%s">Click here</a> to edit style details or to change default style.',
+ 'STYLE_INSTALLED_RETURN_STYLES' => '<a href="%s">Click here</a> to return to installed styles list.',
+ 'STYLE_INSTALLED_RETURN_UNINSTALLED' => '<a href="%s">Click here</a> to install more styles.',
'STYLE_NAME' => 'Style name',
+ 'STYLE_NOT_INSTALLED' => 'Style "%s" was not installed.',
+ 'STYLE_PATH' => 'Style path:',
+ 'STYLE_PARENT' => 'Parent style:',
'STYLE_TEMPLATE' => 'Template',
'STYLE_THEME' => 'Theme',
+ 'STYLE_UNINSTALL' => 'Uninstall',
+ 'STYLE_UNINSTALL_DEPENDENT' => 'Style "%s" cannot be uninstalled because it has one or more child styles.',
+ 'STYLE_UNINSTALLED' => 'Style "%s" uninstalled successfully.',
'STYLE_USED_BY' => 'Used by (including robots)',
- 'TEMPLATE_ADDED' => 'Template set added and stored on filesystem.',
- 'TEMPLATE_ADDED_DB' => 'Template set added and stored in database.',
+ 'TEMPLATE_ADDED' => 'Template set added.',
'TEMPLATE_CACHE' => 'Template cache',
'TEMPLATE_CACHE_EXPLAIN' => 'By default phpBB caches the compiled version of its templates. This decreases the load on the server each time a page is viewed and thus may reduce the page generation time. Here you can view the cache status of each file and delete individual files or the entire cache.',
'TEMPLATE_CACHE_CLEARED' => 'Template cache cleared successfully.',
'TEMPLATE_CACHE_EMPTY' => 'There are no cached templates.',
- 'TEMPLATE_DELETED' => 'Template set deleted successfully.',
- 'TEMPLATE_DELETE_DEPENDENT' => 'The template set cannot be deleted as there are one or more other template sets inheriting from it:',
- 'TEMPLATE_DELETED_FS' => 'Template set removed from database but some files may remain on the filesystem.',
+ 'TEMPLATE_DELETED_FS' => 'Template set removed from database but files remain on the filesystem.',
'TEMPLATE_DETAILS_UPDATED' => 'Template details successfully updated.',
'TEMPLATE_EDITOR' => 'Raw HTML template editor',
'TEMPLATE_EDITOR_HEIGHT' => 'Template editor height',
@@ -383,25 +328,16 @@ $lang = array_merge($lang, array(
'TEMPLATE_ERR_CACHE_READ' => 'The cache directory used to store cached versions of template files could not be opened.',
'TEMPLATE_ERR_COPY_LONG' => 'The copyright can be no longer than 60 characters.',
'TEMPLATE_ERR_NAME_CHARS' => 'The template name can only contain alphanumeric characters, -, +, _ and space.',
- 'TEMPLATE_ERR_NAME_EXIST' => 'A template set with that name already exists.',
'TEMPLATE_ERR_NAME_LONG' => 'The template name can be no longer than 30 characters.',
- 'TEMPLATE_ERR_NOT_TEMPLATE' => 'The archive you specified does not contain a valid template set.',
- 'TEMPLATE_ERR_REQUIRED_OR_INCOMPLETE' => 'The new template set requires the template %s to be installed and not inheriting itself.',
'TEMPLATE_ERR_STYLE_NAME' => 'You must supply a name for this template.',
- 'TEMPLATE_EXPORT' => 'Export templates',
'TEMPLATE_EXPORT_EXPLAIN' => 'Here you can export a template set in the form of an archive. This archive will contain all the files necessary to install the templates on another board. You may select whether to download the file directly or to place it in your store folder for download later or via FTP.',
'TEMPLATE_EXPORTED' => 'Templates exported successfully and stored in %s.',
'TEMPLATE_FILE' => 'Template file',
'TEMPLATE_FILE_UPDATED' => 'Template file updated successfully.',
- 'TEMPLATE_INHERITS' => 'This template sets inherits from %s and thus cannot have a different storage setting than its super template.',
- 'TEMPLATE_LOCATION' => 'Store templates in',
- 'TEMPLATE_LOCATION_EXPLAIN' => 'Images are always stored on the filesystem.',
'TEMPLATE_NAME' => 'Template name',
'TEMPLATE_FILE_NOT_WRITABLE'=> 'Unable to write to template file %s. Please check the permissions for the directory and the files.',
- 'TEMPLATE_REFRESHED' => 'Template refreshed successfully.',
- 'THEME_ADDED' => 'New theme added on filesystem.',
- 'THEME_ADDED_DB' => 'New theme added to database.',
+ 'THEME_ADDED' => 'New theme added.',
'THEME_CLASS_ADDED' => 'Custom class added successfully.',
'THEME_DELETED' => 'Theme deleted successfully.',
'THEME_DELETED_FS' => 'Theme removed from database but files remain on the filesystem.',
@@ -415,25 +351,17 @@ $lang = array_merge($lang, array(
'THEME_ERR_NAME_EXIST' => 'A theme with that name already exists.',
'THEME_ERR_NAME_LONG' => 'The theme name can be no longer than 30 characters.',
'THEME_ERR_NOT_THEME' => 'The archive you specified does not contain a valid theme.',
- 'THEME_ERR_REFRESH_FS' => 'This theme is stored on the filesystem so there is no need to refresh it.',
'THEME_ERR_STYLE_NAME' => 'You must supply a name for this theme.',
'THEME_FILE' => 'Theme file',
+ 'THEME_FILE_NOT_WRITABLE' => 'Unable to write to theme file %s. Please check the permissions for the directory and the files.',
'THEME_EXPORT' => 'Export Theme',
'THEME_EXPORT_EXPLAIN' => 'Here you can export a theme in the form of an archive. This archive will contain all the data necessary to install the theme on another board. You may select whether to download the file directly or to place it in your store folder for download later or via FTP.',
'THEME_EXPORTED' => 'Theme exported successfully and stored in %s.',
- 'THEME_LOCATION' => 'Store stylesheet in',
- 'THEME_LOCATION_EXPLAIN' => 'Images are always stored on the filesystem.',
'THEME_NAME' => 'Theme name',
- 'THEME_REFRESHED' => 'Theme refreshed successfully.',
'THEME_UPDATED' => 'Theme updated successfully.',
'UNDERLINE' => 'Underline',
- 'UNINSTALLED_IMAGESET' => 'Uninstalled imagesets',
- 'UNINSTALLED_STYLE' => 'Uninstalled styles',
- 'UNINSTALLED_TEMPLATE' => 'Uninstalled templates',
- 'UNINSTALLED_THEME' => 'Uninstalled themes',
+ 'UNINSTALL_DEFAULT' => 'You cannot uninstall the default style.',
'UNSET' => 'Undefined',
));
-
-?> \ No newline at end of file
diff --git a/phpBB/language/en/acp/users.php b/phpBB/language/en/acp/users.php
index 25e5ff8269..9faf1d0de9 100644
--- a/phpBB/language/en/acp/users.php
+++ b/phpBB/language/en/acp/users.php
@@ -4,9 +4,8 @@
* acp_users [English]
*
* @package language
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -56,7 +55,7 @@ $lang = array_merge($lang, array(
'CANNOT_REMOVE_YOURSELF' => 'You are not allowed to remove your own user account.',
'CANNOT_SET_FOUNDER_IGNORED' => 'You are not able to promote ignored users to be founders.',
'CANNOT_SET_FOUNDER_INACTIVE' => 'You need to activate users before you promote them to founders, only activated users are able to be promoted.',
- 'CONFIRM_EMAIL_EXPLAIN' => 'You only need to specify this if you are changing the users e-mail address.',
+ 'CONFIRM_EMAIL_EXPLAIN' => 'You only need to specify this if you are changing the users email address.',
'DELETE_POSTS' => 'Delete posts',
'DELETE_USER' => 'Delete user',
@@ -95,8 +94,8 @@ $lang = array_merge($lang, array(
'USER_ADMIN_ACTIVATE' => 'Activate account',
'USER_ADMIN_ACTIVATED' => 'User activated successfully.',
'USER_ADMIN_AVATAR_REMOVED' => 'Successfully removed avatar from user account.',
- 'USER_ADMIN_BAN_EMAIL' => 'Ban by e-mail',
- 'USER_ADMIN_BAN_EMAIL_REASON' => 'E-mail address banned via user management',
+ 'USER_ADMIN_BAN_EMAIL' => 'Ban by email',
+ 'USER_ADMIN_BAN_EMAIL_REASON' => 'Email address banned via user management',
'USER_ADMIN_BAN_IP' => 'Ban by IP',
'USER_ADMIN_BAN_IP_REASON' => 'IP banned via user management',
'USER_ADMIN_BAN_NAME_REASON' => 'Username banned via user management',
@@ -140,5 +139,3 @@ $lang = array_merge($lang, array(
'USER_WARNING_LOG_DELETED' => 'No information available. Possibly the log entry has been deleted.',
'USER_TOOLS' => 'Basic tools',
));
-
-?> \ No newline at end of file
diff --git a/phpBB/language/en/app.php b/phpBB/language/en/app.php
new file mode 100644
index 0000000000..cb56015c30
--- /dev/null
+++ b/phpBB/language/en/app.php
@@ -0,0 +1,49 @@
+<?php
+/**
+*
+* app [English]
+*
+* @package language
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+/**
+* DO NOT CHANGE
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+if (empty($lang) || !is_array($lang))
+{
+ $lang = array();
+}
+
+// DEVELOPERS PLEASE NOTE
+//
+// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
+//
+// Placeholders can now contain order information, e.g. instead of
+// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
+// translators to re-order the output of data while ensuring it remains correct
+//
+// You do not need this where single placeholders are used, e.g. 'Message %d' is fine
+// equally where a string contains only two placeholders which are used to wrap text
+// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
+//
+// Some characters you may want to copy&paste:
+// ’ » “ ” …
+//
+
+$lang = array_merge($lang, array(
+ 'CONTROLLER_ARGUMENT_VALUE_MISSING' => 'Missing value for argument #%1$s: <strong>%3$s</strong> in class <strong>%2$s</strong>',
+ 'CONTROLLER_NOT_SPECIFIED' => 'No controller has been specified.',
+ 'CONTROLLER_NOT_FOUND' => 'The requested page could not be found.',
+ 'CONTROLLER_METHOD_NOT_SPECIFIED' => 'No method was specified for the controller.',
+ 'CONTROLLER_SERVICE_NOT_GIVEN' => 'The controller "<strong>%s</strong>" must have a service specified in ./config/routing.yml.',
+ 'CONTROLLER_SERVICE_UNDEFINED' => 'The service for controller "<strong>%s</strong>" is not defined in ./config/services.yml.',
+ 'CONTROLLER_RETURN_TYPE_INVALID' => 'The controller object <strong>%s</strong> must return a Symfony\Component\HttpFoundation\Response object.',
+));
diff --git a/phpBB/language/en/captcha_qa.php b/phpBB/language/en/captcha_qa.php
index 42c8df2d6d..90e919064e 100644
--- a/phpBB/language/en/captcha_qa.php
+++ b/phpBB/language/en/captcha_qa.php
@@ -4,9 +4,8 @@
* captcha_qa [English]
*
* @package language
-* @version $Id$
* @copyright (c) 2009 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -61,5 +60,3 @@ $lang = array_merge($lang, array(
'QA_LAST_QUESTION' => 'You cannot delete all questions while the plugin is active.',
));
-
-?> \ No newline at end of file
diff --git a/phpBB/language/en/captcha_recaptcha.php b/phpBB/language/en/captcha_recaptcha.php
index 9b2fb2049d..3d91a9d110 100644
--- a/phpBB/language/en/captcha_recaptcha.php
+++ b/phpBB/language/en/captcha_recaptcha.php
@@ -4,9 +4,8 @@
* recaptcha [English]
*
* @package language
-* @version $Id$
* @copyright (c) 2009 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -47,6 +46,5 @@ $lang = array_merge($lang, array(
'RECAPTCHA_PRIVATE_EXPLAIN' => 'Your private reCaptcha key. Keys can be obtained on <a href="http://www.google.com/recaptcha">www.google.com/recaptcha</a>.',
'RECAPTCHA_EXPLAIN' => 'In an effort to prevent automatic submissions, we require that you enter both of the words displayed into the text field underneath.',
+ 'RECAPTCHA_SOCKET_ERROR' => 'There was a problem connecting to the RECAPTCHA service: could not open socket. Try again later.',
));
-
-?> \ No newline at end of file
diff --git a/phpBB/language/en/common.php b/phpBB/language/en/common.php
index 62c18c109c..501195de72 100644
--- a/phpBB/language/en/common.php
+++ b/phpBB/language/en/common.php
@@ -4,9 +4,8 @@
* common [English]
*
* @package language
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -43,8 +42,14 @@ $lang = array_merge($lang, array(
'TRANSLATION_INFO' => '',
'DIRECTION' => 'ltr',
'DATE_FORMAT' => '|d M Y|', // 01 Jan 2007 (with Relative days enabled)
+ 'DATETIME_FORMAT' => '|d M Y, H:i|', // 01 Jan 2007, 13:37 (with Relative days enabled)
'USER_LANG' => 'en-gb',
+ // You can define different rules for the determination of plural forms here.
+ // See http://wiki.phpbb.com/Plural_Rules for more information
+ // or ask the translation manager for help.
+ 'PLURAL_RULE' => 1,
+
'1_DAY' => '1 day',
'1_MONTH' => '1 month',
'1_YEAR' => '1 year',
@@ -57,18 +62,24 @@ $lang = array_merge($lang, array(
'ACCOUNT_DEACTIVATED' => 'Your account has been manually deactivated and is only able to be reactivated by an administrator.',
'ACCOUNT_NOT_ACTIVATED' => 'Your account has not been activated yet.',
'ACP' => 'Administration Control Panel',
+ 'ACP_SHORT' => 'Administer',
'ACTIVE' => 'active',
'ACTIVE_ERROR' => 'The specified username is currently inactive. If you have problems activating your account, please contact a board administrator.',
'ADMINISTRATOR' => 'Administrator',
'ADMINISTRATORS' => 'Administrators',
'AGE' => 'Age',
'AIM' => 'AIM',
+ 'AJAX_ERROR_TITLE' => 'AJAX error',
+ 'AJAX_ERROR_TEXT' => 'Something went wrong when processing your request.',
+ 'AJAX_ERROR_TEXT_ABORT' => 'User aborted request.',
+ 'AJAX_ERROR_TEXT_TIMEOUT' => 'Your request timed out; please try again.',
+ 'AJAX_ERROR_TEXT_PARSERERROR' => 'Something went wrong with the request and the server returned an invalid reply.',
'ALLOWED' => 'Allowed',
'ALL_FILES' => 'All files',
'ALL_FORUMS' => 'All forums',
'ALL_MESSAGES' => 'All messages',
'ALL_POSTS' => 'All posts',
- 'ALL_TIMES' => 'All times are %1$s %2$s',
+ 'ALL_TIMES' => 'All times are <abbr title="%2$s">%1$s</abbr>',
'ALL_TOPICS' => 'All Topics',
'AND' => 'And',
'ARE_WATCHING_FORUM' => 'You have subscribed to be notified of new posts in this forum.',
@@ -78,6 +89,14 @@ $lang = array_merge($lang, array(
'ATTACHED_IMAGE_NOT_IMAGE' => 'The image file you tried to attach is invalid.',
'AUTHOR' => 'Author',
'AUTH_NO_PROFILE_CREATED' => 'The creation of a user profile was unsuccessful.',
+ 'AUTH_PROVIDER_OAUTH_ERROR_INVALID_ENTRY' => 'Invalid database entry.',
+ 'AUTH_PROVIDER_OAUTH_ERROR_INVALID_SERVICE_TYPE' => 'Invalid service type provided to OAuth service handler.',
+ 'AUTH_PROVIDER_OAUTH_ERROR_SERVICE_NOT_CREATED' => 'OAuth service not created',
+ 'AUTH_PROVIDER_OAUTH_SERVICE_BITLY' => 'Bitly',
+ 'AUTH_PROVIDER_OAUTH_SERVICE_FACEBOOK' => 'Facebook',
+ 'AUTH_PROVIDER_OAUTH_SERVICE_GOOGLE' => 'Google',
+ 'AUTH_PROVIDER_OAUTH_TOKEN_ERROR_NOT_STORED' => 'OAuth token not stored.',
+ 'AUTH_PROVIDER_OAUTH_TOKEN_ERROR_INCORRECTLY_STORED' => 'OAuth token incorrectly stored.',
'AVATAR_DISALLOWED_CONTENT' => 'The upload was rejected because the uploaded file was identified as a possible attack vector.',
'AVATAR_DISALLOWED_EXTENSION' => 'This file cannot be displayed because the extension <strong>%s</strong> is not allowed.',
'AVATAR_EMPTY_REMOTE_DATA' => 'The specified avatar could not be uploaded because the remote data appears to be invalid or corrupted.',
@@ -91,11 +110,11 @@ $lang = array_merge($lang, array(
'AVATAR_URL_INVALID' => 'The URL you specified is invalid.',
'AVATAR_URL_NOT_FOUND' => 'The file specified could not be found.',
'AVATAR_WRONG_FILESIZE' => 'The avatar’s filesize must be between 0 and %1d %2s.',
- 'AVATAR_WRONG_SIZE' => 'The submitted avatar is %5$d pixels wide and %6$d pixels high. Avatars must be at least %1$d pixels wide and %2$d pixels high, but no larger than %3$d pixels wide and %4$d pixels high.',
+ 'AVATAR_WRONG_SIZE' => 'The submitted avatar is %5$s wide and %6$s high. Avatars must be at least %1$s wide and %2$s high, but no larger than %3$s wide and %4$s high.',
'BACK_TO_TOP' => 'Top',
'BACK_TO_PREV' => 'Back to previous page',
- 'BAN_TRIGGERED_BY_EMAIL'=> 'A ban has been issued on your e-mail address.',
+ 'BAN_TRIGGERED_BY_EMAIL'=> 'A ban has been issued on your email address.',
'BAN_TRIGGERED_BY_IP' => 'A ban has been issued on your IP address.',
'BAN_TRIGGERED_BY_USER' => 'A ban has been issued on your username.',
'BBCODE_GUIDE' => 'BBCode guide',
@@ -108,20 +127,38 @@ $lang = array_merge($lang, array(
'BOARD_DISABLED' => 'This board is currently disabled.',
'BOARD_UNAVAILABLE' => 'Sorry but the board is temporarily unavailable, please try again in a few minutes.',
'BROWSING_FORUM' => 'Users browsing this forum: %1$s',
- 'BROWSING_FORUM_GUEST' => 'Users browsing this forum: %1$s and %2$d guest',
- 'BROWSING_FORUM_GUESTS' => 'Users browsing this forum: %1$s and %2$d guests',
+ 'BROWSING_FORUM_GUESTS' => array(
+ 1 => 'Users browsing this forum: %2$s and %1$d guest',
+ 2 => 'Users browsing this forum: %2$s and %1$d guests',
+ ),
+ 'BUTTON_EDIT' => 'Edit',
+ 'BUTTON_FORUM_LOCKED' => 'Locked',
+ 'BUTTON_NEW_TOPIC' => 'New Topic',
+ 'BUTTON_PM' => 'PM',
+ 'BUTTON_PM_FORWARD' => 'Forward',
+ 'BUTTON_PM_NEW' => 'New PM',
+ 'BUTTON_PM_REPLY' => 'Send Reply',
+ 'BUTTON_PM_REPLY_ALL' => 'Reply All',
+ 'BUTTON_POST_REPLY' => 'Post Reply',
+ 'BUTTON_QUOTE' => 'Quote',
+ 'BUTTON_TOPIC_LOCKED' => 'Locked',
'BYTES' => 'Bytes',
+ 'BYTES_SHORT' => 'B',
'CANCEL' => 'Cancel',
'CHANGE' => 'Change',
'CHANGE_FONT_SIZE' => 'Change font size',
'CHANGING_PREFERENCES' => 'Changing board preferences',
'CHANGING_PROFILE' => 'Changing profile settings',
- 'CLICK_VIEW_PRIVMSG' => '%sGo to your inbox%s',
+ 'CHARACTERS' => array(
+ 1 => '%d character',
+ 2 => '%d characters',
+ ),
'COLLAPSE_VIEW' => 'Collapse view',
'CLOSE_WINDOW' => 'Close window',
'COLOUR_SWATCH' => 'Colour swatch',
- 'COMMA_SEPARATOR' => ', ', // Used in pagination of ACP & prosilver, use localised comma if appropriate, eg: Ideographic or Arabic
+ 'COLON' => ':',
+ 'COMMA_SEPARATOR' => ', ', // Comma used to join lists into a single string, use localised comma if appropriate, eg: Ideographic or Arabic
'CONFIRM' => 'Confirm',
'CONFIRM_CODE' => 'Confirmation code',
'CONFIRM_CODE_EXPLAIN' => 'Enter the code exactly as it appears. All letters are case insensitive.',
@@ -148,20 +185,22 @@ $lang = array_merge($lang, array(
'DISPLAY_MESSAGES' => 'Display messages from previous',
'DISPLAY_POSTS' => 'Display posts from previous',
'DISPLAY_TOPICS' => 'Display topics from previous',
+ 'DOWNLOAD_ALL' => 'Download all',
+ 'DOWNLOAD_ALL_ATTACHMENTS' => 'Download all attachments',
'DOWNLOADED' => 'Downloaded',
'DOWNLOADING_FILE' => 'Downloading file',
- 'DOWNLOAD_COUNT' => 'Downloaded %d time',
- 'DOWNLOAD_COUNTS' => 'Downloaded %d times',
- 'DOWNLOAD_COUNT_NONE' => 'Not downloaded yet',
- 'VIEWED_COUNT' => 'Viewed %d time',
- 'VIEWED_COUNTS' => 'Viewed %d times',
- 'VIEWED_COUNT_NONE' => 'Not viewed yet',
+ 'DOWNLOAD_COUNTS' => array(
+ 0 => 'Not downloaded yet',
+ 1 => 'Downloaded %d time',
+ 2 => 'Downloaded %d times',
+ ),
'EDIT_POST' => 'Edit post',
- 'EMAIL' => 'E-mail', // Short form for EMAIL_ADDRESS
- 'EMAIL_ADDRESS' => 'E-mail address',
- 'EMAIL_INVALID_EMAIL' => 'The e-mail address you entered is invalid.',
- 'EMAIL_SMTP_ERROR_RESPONSE' => 'Ran into problems sending e-mail at <strong>Line %1$s</strong>. Response: %2$s.',
+ 'ELLIPSIS' => '…',
+ 'EMAIL' => 'Email', // Short form for EMAIL_ADDRESS
+ 'EMAIL_ADDRESS' => 'Email address',
+ 'EMAIL_INVALID_EMAIL' => 'The email address you entered is invalid.',
+ 'EMAIL_SMTP_ERROR_RESPONSE' => 'Ran into problems sending email at <strong>Line %1$s</strong>. Response: %2$s.',
'EMPTY_SUBJECT' => 'You must specify a subject when posting a new topic.',
'EMPTY_MESSAGE_SUBJECT' => 'You must specify a subject when composing a new message.',
'ENABLED' => 'Enabled',
@@ -175,9 +214,14 @@ $lang = array_merge($lang, array(
'ERR_UNWATCHING' => 'An error occurred while trying to unsubscribe.',
'ERR_WATCHING' => 'An error occurred while trying to subscribe.',
'ERR_WRONG_PATH_TO_PHPBB' => 'The phpBB path specified appears to be invalid.',
+ 'ERROR' => 'Error',
'EXPAND_VIEW' => 'Expand view',
'EXTENSION' => 'Extension',
+ 'EXTENSION_CONTROLLER_MISSING' => 'The extension <strong>%s</strong> is missing a controller class and cannot be accessed through the front-end.',
+ 'EXTENSION_CLASS_WRONG_TYPE' => 'The extension controller class <strong>%s</strong> is not an instance of the phpbb_extension_controller_interface.',
+ 'EXTENSION_DISABLED' => 'The extension <strong>%s</strong> is not enabled.',
'EXTENSION_DISABLED_AFTER_POSTING' => 'The extension <strong>%s</strong> has been deactivated and can no longer be displayed.',
+ 'EXTENSION_DOES_NOT_EXIST' => 'The extension <strong>%s</strong> does not exist.',
'FAQ' => 'FAQ',
'FAQ_EXPLAIN' => 'Frequently Asked Questions',
@@ -234,6 +278,8 @@ $lang = array_merge($lang, array(
'GB' => 'GB',
'GIB' => 'GiB',
'GO' => 'Go',
+ 'GOTO_FIRST_POST' => 'Go to first post',
+ 'GOTO_LAST_POST' => 'Go to last post',
'GOTO_PAGE' => 'Go to page',
'GROUP' => 'Group',
'GROUPS' => 'Groups',
@@ -241,12 +287,14 @@ $lang = array_merge($lang, array(
'GROUP_ERR_USERNAME' => 'No group name specified.',
'GROUP_ERR_USER_LONG' => 'Group names cannot exceed 60 characters. The specified group name is too long.',
'GUEST' => 'Guest',
- 'GUEST_USERS_ONLINE' => 'There are %d guest users online',
- 'GUEST_USERS_TOTAL' => '%d guests',
- 'GUEST_USERS_ZERO_ONLINE' => 'There are 0 guest users online',
- 'GUEST_USERS_ZERO_TOTAL' => '0 guests',
- 'GUEST_USER_ONLINE' => 'There is %d guest user online',
- 'GUEST_USER_TOTAL' => '%d guest',
+ 'GUEST_USERS_ONLINE' => array(
+ 1 => 'There is %d guest user online',
+ 2 => 'There are %d guest users online',
+ ),
+ 'GUEST_USERS_TOTAL' => array(
+ 1 => '%d guest',
+ 2 => '%d guests',
+ ),
'G_ADMINISTRATORS' => 'Administrators',
'G_BOTS' => 'Bots',
'G_GUESTS' => 'Guests',
@@ -255,22 +303,20 @@ $lang = array_merge($lang, array(
'G_GLOBAL_MODERATORS' => 'Global moderators',
'G_NEWLY_REGISTERED' => 'Newly registered users',
- 'HIDDEN_USERS_ONLINE' => '%d hidden users online',
- 'HIDDEN_USERS_TOTAL' => '%d hidden',
- 'HIDDEN_USERS_TOTAL_AND' => '%d hidden and ',
- 'HIDDEN_USERS_ZERO_ONLINE' => '0 hidden users online',
- 'HIDDEN_USERS_ZERO_TOTAL' => '0 hidden',
- 'HIDDEN_USERS_ZERO_TOTAL_AND' => '0 hidden and ',
- 'HIDDEN_USER_ONLINE' => '%d hidden user online',
- 'HIDDEN_USER_TOTAL' => '%d hidden',
- 'HIDDEN_USER_TOTAL_AND' => '%d hidden and ',
+ 'HIDDEN_USERS_ONLINE' => array(
+ 1 => '%d hidden user',
+ 2 => '%d hidden users',
+ ),
+ 'HIDDEN_USERS_TOTAL' => array(
+ 1 => '%d hidden',
+ 2 => '%d hidden',
+ ),
'HIDE_GUESTS' => 'Hide guests',
'HIDE_ME' => 'Hide my online status this session',
'HOURS' => 'Hours',
'HOME' => 'Home',
'ICQ' => 'ICQ',
- 'ICQ_STATUS' => 'ICQ status',
'IF' => 'If',
'IMAGE' => 'Image',
'IMAGE_FILETYPE_INVALID' => 'Image file type %d for mimetype %s not supported.',
@@ -278,9 +324,11 @@ $lang = array_merge($lang, array(
'IN' => 'in',
'INDEX' => 'Index page',
'INFORMATION' => 'Information',
+ 'INSECURE_REDIRECT' => 'Tried to redirect to potentially insecure url.',
'INTERESTS' => 'Interests',
'INVALID_DIGEST_CHALLENGE' => 'Invalid digest challenge.',
- 'INVALID_EMAIL_LOG' => '<strong>%s</strong> possibly an invalid e-mail address?',
+ 'INVALID_EMAIL_LOG' => '<strong>%s</strong> possibly an invalid email address?',
+ 'INVALID_PLURAL_RULE' => 'The chosen plural rule is invalid. Valid values are integers between 0 and 15.',
'IP' => 'IP',
'IP_BLACKLISTED' => 'Your IP %1$s has been blocked because it is blacklisted. For details please see <a href="%2$s">%2$s</a>.',
@@ -300,6 +348,7 @@ $lang = array_merge($lang, array(
'LDAP_NO_SERVER_CONNECTION' => 'Could not connect to LDAP server.',
'LDAP_SEARCH_FAILED' => 'An error occurred while searching the LDAP directory.',
'LEGEND' => 'Legend',
+ 'LOADING' => 'Loading',
'LOCATION' => 'Location',
'LOCK_POST' => 'Lock post',
'LOCK_POST_EXPLAIN' => 'Prevent editing',
@@ -310,6 +359,7 @@ $lang = array_merge($lang, array(
'LOGIN_CONFIRM_EXPLAIN' => 'To prevent brute forcing accounts the board requires you to enter a confirmation code after a maximum amount of failed logins. The code is displayed in the image you should see below. If you are visually impaired or cannot otherwise read this code please contact the %sBoard Administrator%s.', // unused
'LOGIN_ERROR_ATTEMPTS' => 'You exceeded the maximum allowed number of login attempts. In addition to your username and password you now also have to solve the CAPTCHA below.',
'LOGIN_ERROR_EXTERNAL_AUTH_APACHE' => 'You have not been authenticated by Apache.',
+ 'LOGIN_ERROR_OAUTH_SERVICE_DOES_NOT_EXIST' => 'A non-existant OAuth service has been requested.',
'LOGIN_ERROR_PASSWORD' => 'You have specified an incorrect password. Please check your password and try again. If you continue to have problems please contact the %sBoard Administrator%s.',
'LOGIN_ERROR_PASSWORD_CONVERT' => 'It was not possible to convert your password when updating this bulletin board’s software. Please %srequest a new password%s. If you continue to have problems please contact the %sBoard Administrator%s.',
'LOGIN_ERROR_USERNAME' => 'You have specified an incorrect username. Please check your username and try again. If you continue to have problems please contact the %sBoard Administrator%s.',
@@ -318,17 +368,22 @@ $lang = array_merge($lang, array(
'LOGIN_VIEWFORUM' => 'The board requires you to be registered and logged in to view this forum.',
'LOGIN_EXPLAIN_EDIT' => 'In order to edit posts in this forum you have to be registered and logged in.',
'LOGIN_EXPLAIN_VIEWONLINE' => 'In order to view the online list you have to be registered and logged in.',
+ 'LOGIN_REQUIRED' => 'You need to login to perform this action.',
'LOGOUT' => 'Logout',
'LOGOUT_USER' => 'Logout [ %s ]',
- 'LOG_ME_IN' => 'Log me on automatically each visit',
+ 'LOG_ME_IN' => 'Remember me',
+ 'MAIN' => 'Main',
'MARK' => 'Mark',
'MARK_ALL' => 'Mark all',
+ 'MARK_ALL_READ' => 'Mark all read',
'MARK_FORUMS_READ' => 'Mark forums read',
+ 'MARK_READ' => 'Mark read',
'MARK_SUBFORUMS_READ' => 'Mark subforums read',
'MB' => 'MB',
'MIB' => 'MiB',
'MCP' => 'Moderator Control Panel',
+ 'MCP_SHORT' => 'Moderate',
'MEMBERLIST' => 'Members',
'MEMBERLIST_EXPLAIN' => 'View complete list of members',
'MERGE' => 'Merge',
@@ -336,6 +391,10 @@ $lang = array_merge($lang, array(
'MERGE_TOPIC' => 'Merge topic',
'MESSAGE' => 'Message',
'MESSAGES' => 'Messages',
+ 'MESSAGES_COUNT' => array(
+ 1 => '%d message',
+ 2 => '%d messages',
+ ),
'MESSAGE_BODY' => 'Message body',
'MINUTES' => 'Minutes',
'MODERATE' => 'Moderate',
@@ -346,24 +405,59 @@ $lang = array_merge($lang, array(
'MODULE_FILE_INCORRECT_CLASS' => 'Module file %s does not contain correct class [%s]',
'MONTH' => 'Month',
'MOVE' => 'Move',
- 'MSNM' => 'MSNM/WLM',
'NA' => 'N/A',
'NEWEST_USER' => 'Our newest member <strong>%s</strong>',
'NEW_MESSAGE' => 'New message',
'NEW_MESSAGES' => 'New messages',
- 'NEW_PM' => '<strong>%d</strong> new message',
- 'NEW_PMS' => '<strong>%d</strong> new messages',
'NEW_POST' => 'New post', // Not used anymore
'NEW_POSTS' => 'New posts', // Not used anymore
'NEXT' => 'Next', // Used in pagination
'NEXT_STEP' => 'Next',
'NEVER' => 'Never',
'NO' => 'No',
+ 'NO_NOTIFICATIONS' => 'You have no notifications',
'NOT_ALLOWED_MANAGE_GROUP' => 'You are not allowed to manage this group.',
'NOT_AUTHORISED' => 'You are not authorised to access this area.',
'NOT_WATCHING_FORUM' => 'You are no longer subscribed to updates on this forum.',
'NOT_WATCHING_TOPIC' => 'You are no longer subscribed to this topic.',
+ 'NOTIFICATIONS' => 'Notifications',
+ // This applies for NOTIFICATION_BOOKMARK, NOTIFICATION_POST, and NOTIFICATION_QUOTE.
+ // %1$s will return a list of users that's concatenated using "," and "and" - see STRING_LIST
+ // Once the user count reaches 5 users or more, the list is trimmed using NOTIFICATION_X_OTHERS
+ // Examples:
+ // A replied...
+ // A and B replied...
+ // A, B and C replied...
+ // A, B, C and 2 others replied...
+ 'NOTIFICATION_BOOKMARK' => array(
+ 1 => '%1$s replied to the topic “%2$s” you have bookmarked.',
+ ),
+ 'NOTIFICATION_GROUP_REQUEST' => '%1$s is requesting to join the group %2$s.',
+ 'NOTIFICATION_GROUP_REQUEST_APPROVED' => 'Your request to join the group %1$s has been approved.',
+ 'NOTIFICATION_PM' => '%1$s sent you a Private Message "%2$s".',
+ 'NOTIFICATION_POST' => array(
+ 1 => '%1$s replied to the topic “%2$s”.',
+ ),
+ 'NOTIFICATION_POST_APPROVED' => 'Your post was approved "%2$s".',
+ 'NOTIFICATION_POST_DISAPPROVED' => 'Your post "%1$s" was disapproved for reason: "%2$s".',
+ 'NOTIFICATION_POST_IN_QUEUE' => 'A new post titled "%2$s" was posted by %1$s and needs approval.',
+ 'NOTIFICATION_QUOTE' => array(
+ 1 => '%1$s quoted you in the post “%2$s”.',
+ ),
+ 'NOTIFICATION_REPORT_PM' => '%1$s reported a Private Message "%2$s" for reason: "%3$s".',
+ 'NOTIFICATION_REPORT_POST' => '%1$s reported a post "%2$s" for reason: "%3$s".',
+ 'NOTIFICATION_REPORT_CLOSED' => '%1$s closed the report you made for "%2$s".',
+ 'NOTIFICATION_TOPIC' => '%1$s posted a new topic "%2$s" in the forum "%3$s".',
+ 'NOTIFICATION_TOPIC_APPROVED' => 'Your topic "%2$s" in the forum "%3$s" was approved.',
+ 'NOTIFICATION_TOPIC_DISAPPROVED' => 'Your topic "%1$s" was disapproved for reason: "%2$s".',
+ 'NOTIFICATION_TOPIC_IN_QUEUE' => 'A new topic titled "%2$s" was posted by %1$s and needs approval.',
+ 'NOTIFICATION_TYPE_NOT_EXIST' => 'The notification type "%s" is missing from the file system.',
+ 'NOTIFICATION_ADMIN_ACTIVATE_USER' => 'The user “%1$s” is newly registered and requires activation.',
+ // Used in conjuction with NOTIFICATION_BOOKMARK, NOTIFICATION_POST, and NOTIFICATION_QUOTE.
+ 'NOTIFICATION_X_OTHERS' => array(
+ 2 => '%d others',
+ ),
'NOTIFY_ADMIN' => 'Please notify the board administrator or webmaster.',
'NOTIFY_ADMIN_EMAIL' => 'Please notify the board administrator or webmaster: <a href="mailto:%1$s">%1$s</a>',
'NO_ACCESS_ATTACHMENT' => 'You are not allowed to access this file.',
@@ -372,11 +466,13 @@ $lang = array_merge($lang, array(
'NO_AUTH_ADMIN' => 'Access to the Administration Control Panel is not allowed as you do not have administrative permissions.',
'NO_AUTH_ADMIN_USER_DIFFER' => 'You are not able to re-authenticate as a different user.',
'NO_AUTH_OPERATION' => 'You do not have the necessary permissions to complete this operation.',
+ 'NO_AVATARS' => 'No avatars currently available',
+ 'NO_AVATAR_SELECTED' => 'You have not selected any avatar.',
'NO_CONNECT_TO_SMTP_HOST' => 'Could not connect to smtp host : %1$s : %2$s',
'NO_BIRTHDAYS' => 'No birthdays today',
- 'NO_EMAIL_MESSAGE' => 'E-mail message was blank.',
+ 'NO_EMAIL_MESSAGE' => 'Email message was blank.',
'NO_EMAIL_RESPONSE_CODE' => 'Could not get mail server response codes.',
- 'NO_EMAIL_SUBJECT' => 'No e-mail subject specified.',
+ 'NO_EMAIL_SUBJECT' => 'No email subject specified.',
'NO_FORUM' => 'The forum you selected does not exist.',
'NO_FORUMS' => 'This board has no forums.',
'NO_GROUP' => 'The requested usergroup does not exist.',
@@ -387,7 +483,6 @@ $lang = array_merge($lang, array(
'NO_MODE' => 'No mode specified.',
'NO_MODERATORS' => 'There are no moderators.',
'NO_NEW_MESSAGES' => 'No new messages',
- 'NO_NEW_PM' => '<strong>0</strong> new messages',
'NO_NEW_POSTS' => 'No new posts', // Not used anymore
'NO_ONLINE_USERS' => 'No registered users',
'NO_POSTS' => 'No posts',
@@ -402,7 +497,6 @@ $lang = array_merge($lang, array(
'NO_TOPIC_FORUM' => 'The topic or forum no longer exists.',
'NO_TOPICS' => 'There are no topics or posts in this forum.',
'NO_TOPICS_TIME_FRAME' => 'No topics exist inside this forum for the selected time frame.',
- 'NO_UNREAD_PM' => '<strong>0</strong> unread messages',
'NO_UNREAD_POSTS' => 'No unread posts',
'NO_UPLOAD_FORM_FOUND' => 'Upload initiated but no valid file upload form found.',
'NO_USER' => 'The requested user does not exist.',
@@ -420,15 +514,28 @@ $lang = array_merge($lang, array(
'OFFLINE' => 'Offline',
'ONLINE' => 'Online',
'ONLINE_BUDDIES' => 'Online friends',
- 'ONLINE_USERS_TOTAL' => 'In total there are <strong>%d</strong> users online :: ',
- 'ONLINE_USERS_ZERO_TOTAL' => 'In total there are <strong>0</strong> users online :: ',
- 'ONLINE_USER_TOTAL' => 'In total there is <strong>%d</strong> user online :: ',
+ // "... :: x registered and y hidden"
+ 'ONLINE_USERS_TOTAL' => array(
+ 1 => 'In total there is <strong>%1$d</strong> user online :: %2$s and %3$s',
+ 2 => 'In total there are <strong>%1$d</strong> users online :: %2$s and %3$s',
+ ),
+ // "... :: x registered, y hidden and z guests"
+ 'ONLINE_USERS_TOTAL_GUESTS' => array(
+ 1 => 'In total there is <strong>%1$d</strong> user online :: %2$s, %3$s and %4$s',
+ 2 => 'In total there are <strong>%1$d</strong> users online :: %2$s, %3$s and %4$s',
+ ),
'OPTIONS' => 'Options',
'PAGE_OF' => 'Page <strong>%1$d</strong> of <strong>%2$d</strong>',
+ 'PAGE_TITLE_NUMBER' => 'Page %s',
'PASSWORD' => 'Password',
'PIXEL' => 'px',
+ 'PIXELS' => array(
+ 1 => '%d pixel',
+ 2 => '%d pixels',
+ ),
'PLAY_QUICKTIME_FILE' => 'Play Quicktime file',
+ 'PLEASE_WAIT' => 'Please wait.',
'PM' => 'PM',
'PM_REPORTED' => 'Click to view report',
'POSTING_MESSAGE' => 'Posting message in %s',
@@ -442,8 +549,12 @@ $lang = array_merge($lang, array(
'POSTS' => 'Posts',
'POSTS_UNAPPROVED' => 'At least one post in this topic has not been approved.',
'POST_BY_AUTHOR' => 'by',
- 'POST_BY_FOE' => 'This post was made by <strong>%1$s</strong> who is currently on your ignore list. %2$sDisplay this post%3$s.',
+ 'POST_BY_FOE' => '<strong>%1$s</strong>, who is currently on your ignore list, made this post.',
+ 'POST_DISPLAY' => '%1$sDisplay this post%2$s.',
'POST_DAY' => '%.2f posts per day',
+ 'POST_DELETED' => 'Deleted post:',
+ 'POST_DELETED_BY' => '<strong>%2$s</strong> deleted the post by <strong>%1$s</strong> on %3$s.',
+ 'POST_DELETED_BY_REASON'=> '<strong>%2$s</strong> deleted the post by <strong>%1$s</strong> on %3$s for the following reason: %4$s',
'POST_DETAILS' => 'Post details',
'POST_NEW_TOPIC' => 'Post new topic',
'POST_PCT' => '%.2f%% of all posts',
@@ -454,7 +565,7 @@ $lang = array_merge($lang, array(
'POST_SUBJECT' => 'Post subject',
'POST_TIME' => 'Post time',
'POST_TOPIC' => 'Post a new topic',
- 'POST_UNAPPROVED' => 'This post is waiting for approval',
+ 'POST_UNAPPROVED' => 'Post awaiting approval:',
'POWERED_BY' => 'Powered by %s',
'PREVIEW' => 'Preview',
'PREVIOUS' => 'Previous', // Used in pagination
@@ -477,15 +588,15 @@ $lang = array_merge($lang, array(
'REDIRECTS' => 'Total redirects',
'REGISTER' => 'Register',
'REGISTERED_USERS' => 'Registered users:',
- 'REG_USERS_ONLINE' => 'There are %d registered users and ',
- 'REG_USERS_TOTAL' => '%d registered, ',
- 'REG_USERS_TOTAL_AND' => '%d registered and ',
- 'REG_USERS_ZERO_ONLINE' => 'There are 0 registered users and ',
- 'REG_USERS_ZERO_TOTAL' => '0 registered, ',
- 'REG_USERS_ZERO_TOTAL_AND' => '0 registered and ',
- 'REG_USER_ONLINE' => 'There is %d registered user and ',
- 'REG_USER_TOTAL' => '%d registered, ',
- 'REG_USER_TOTAL_AND' => '%d registered and ',
+ // "... and 2 hidden users online"
+ 'REG_USERS_ONLINE' => array(
+ 1 => 'There is %1$d registered user and %2$s online',
+ 2 => 'There are %1$d registered users and %2$s online',
+ ),
+ 'REG_USERS_TOTAL' => array(
+ 1 => '%d registered',
+ 2 => '%d registered',
+ ),
'REMOVE' => 'Remove',
'REMOVE_INSTALL' => 'Please delete, move or rename the install directory before you use your board. If this directory is still present, only the Administration Control Panel (ACP) will be accessible.',
'REPLIES' => 'Replies',
@@ -495,14 +606,15 @@ $lang = array_merge($lang, array(
'REPORT_BY' => 'Report by',
'REPORT_POST' => 'Report this post',
'REPORTING_POST' => 'Reporting post',
- 'RESEND_ACTIVATION' => 'Resend activation e-mail',
+ 'RESEND_ACTIVATION' => 'Resend activation email',
'RESET' => 'Reset',
'RESTORE_PERMISSIONS' => 'Restore permissions',
'RETURN_INDEX' => '%sReturn to the index page%s',
'RETURN_FORUM' => '%sReturn to the forum last visited%s',
'RETURN_PAGE' => '%sReturn to the previous page%s',
'RETURN_TOPIC' => '%sReturn to the topic last visited%s',
- 'RETURN_TO' => 'Return to',
+ 'RETURN_TO' => 'Return to “%s”',
+ 'RETURN_TO_INDEX' => 'Return to Board Index',
'FEED' => 'Feed',
'FEED_NEWS' => 'News',
'FEED_TOPICS_ACTIVE' => 'Active Topics',
@@ -541,12 +653,13 @@ $lang = array_merge($lang, array(
'SEARCH_UNREAD' => 'View unread posts',
'SEARCH_USER_POSTS' => 'Search user’s posts',
'SECONDS' => 'Seconds',
+ 'SEE_ALL' => 'See All',
'SELECT' => 'Select',
'SELECT_ALL_CODE' => 'Select all',
'SELECT_DESTINATION_FORUM' => 'Please select a destination forum',
'SELECT_FORUM' => 'Select a forum',
- 'SEND_EMAIL' => 'E-mail', // Used for submit buttons
- 'SEND_EMAIL_USER' => 'E-mail', // Used as: {L_SEND_EMAIL_USER} {USERNAME} -> E-mail UserX
+ 'SEND_EMAIL' => 'Email', // Used for submit buttons
+ 'SEND_EMAIL_USER' => 'Email', // Used as: {L_SEND_EMAIL_USER} {USERNAME} -> Email UserX
'SEND_PRIVATE_MESSAGE' => 'Send private message',
'SETTINGS' => 'Settings',
'SIGNATURE' => 'Signature',
@@ -568,6 +681,8 @@ $lang = array_merge($lang, array(
'START_WATCHING_TOPIC' => 'Subscribe topic',
'STOP_WATCHING_FORUM' => 'Unsubscribe forum',
'STOP_WATCHING_TOPIC' => 'Unsubscribe topic',
+ 'STRING_LIST_MULTI' => '%1$s, and %2$s',
+ 'STRING_LIST_SIMPLE' => '%1$s and %2$s',
'SUBFORUM' => 'Subforum',
'SUBFORUMS' => 'Subforums',
'SUBJECT' => 'Subject',
@@ -579,52 +694,35 @@ $lang = array_merge($lang, array(
'THE_TEAM' => 'The team',
'TIB' => 'TiB',
'TIME' => 'Time',
-
+ 'TIMEOUT_PROCESSING_REQ' => 'Request timed out.',
+
'TOO_LARGE' => 'The value you entered is too large.',
'TOO_LARGE_MAX_RECIPIENTS' => 'The value of <strong>Maximum number of allowed recipients per private message</strong> setting you entered is too large.',
'TOO_LONG' => 'The value you entered is too long.',
- 'TOO_LONG_AIM' => 'The screenname you entered is too long.',
'TOO_LONG_CONFIRM_CODE' => 'The confirm code you entered is too long.',
'TOO_LONG_DATEFORMAT' => 'The date format you entered is too long.',
- 'TOO_LONG_ICQ' => 'The ICQ number you entered is too long.',
- 'TOO_LONG_INTERESTS' => 'The interests you entered is too long.',
'TOO_LONG_JABBER' => 'The Jabber account name you entered is too long.',
- 'TOO_LONG_LOCATION' => 'The location you entered is too long.',
- 'TOO_LONG_MSN' => 'The MSNM/WLM name you entered is too long.',
'TOO_LONG_NEW_PASSWORD' => 'The password you entered is too long.',
- 'TOO_LONG_OCCUPATION' => 'The occupation you entered is too long.',
'TOO_LONG_PASSWORD_CONFIRM' => 'The password confirmation you entered is too long.',
'TOO_LONG_USER_PASSWORD' => 'The password you entered is too long.',
'TOO_LONG_USERNAME' => 'The username you entered is too long.',
- 'TOO_LONG_EMAIL' => 'The e-mail address you entered is too long.',
- 'TOO_LONG_EMAIL_CONFIRM' => 'The e-mail address confirmation you entered is too long.',
- 'TOO_LONG_WEBSITE' => 'The website address you entered is too long.',
- 'TOO_LONG_YIM' => 'The Yahoo! Messenger name you entered is too long.',
+ 'TOO_LONG_EMAIL' => 'The email address you entered is too long.',
'TOO_MANY_VOTE_OPTIONS' => 'You have tried to vote for too many options.',
'TOO_SHORT' => 'The value you entered is too short.',
- 'TOO_SHORT_AIM' => 'The screenname you entered is too short.',
'TOO_SHORT_CONFIRM_CODE' => 'The confirm code you entered is too short.',
'TOO_SHORT_DATEFORMAT' => 'The date format you entered is too short.',
- 'TOO_SHORT_ICQ' => 'The ICQ number you entered is too short.',
- 'TOO_SHORT_INTERESTS' => 'The interests you entered is too short.',
'TOO_SHORT_JABBER' => 'The Jabber account name you entered is too short.',
- 'TOO_SHORT_LOCATION' => 'The location you entered is too short.',
- 'TOO_SHORT_MSN' => 'The MSNM/WLM name you entered is too short.',
'TOO_SHORT_NEW_PASSWORD' => 'The password you entered is too short.',
- 'TOO_SHORT_OCCUPATION' => 'The occupation you entered is too short.',
'TOO_SHORT_PASSWORD_CONFIRM' => 'The password confirmation you entered is too short.',
'TOO_SHORT_USER_PASSWORD' => 'The password you entered is too short.',
'TOO_SHORT_USERNAME' => 'The username you entered is too short.',
- 'TOO_SHORT_EMAIL' => 'The e-mail address you entered is too short.',
- 'TOO_SHORT_EMAIL_CONFIRM' => 'The e-mail address confirmation you entered is too short.',
- 'TOO_SHORT_WEBSITE' => 'The website address you entered is too short.',
- 'TOO_SHORT_YIM' => 'The Yahoo! Messenger name you entered is too short.',
-
+ 'TOO_SHORT_EMAIL' => 'The email address you entered is too short.',
+
'TOO_SMALL' => 'The value you entered is too small.',
'TOO_SMALL_MAX_RECIPIENTS' => 'The value of <strong>Maximum number of allowed recipients per private message</strong> setting you entered is too small.',
@@ -639,19 +737,25 @@ $lang = array_merge($lang, array(
'TOPIC_TITLE' => 'Topic title',
'TOPIC_UNAPPROVED' => 'This topic has not been approved',
'TOTAL_ATTACHMENTS' => 'Attachment(s)',
- 'TOTAL_LOG' => '1 log',
- 'TOTAL_LOGS' => '%d logs',
- 'TOTAL_NO_PM' => '0 private messages in total',
- 'TOTAL_PM' => '1 private message in total',
- 'TOTAL_PMS' => '%d private messages in total',
+ 'TOTAL_LOGS' => array(
+ 1 => '%d log',
+ 2 => '%d logs',
+ ),
+ 'TOTAL_PMS' => array(
+ 1 => '%d private message in total',
+ 2 => '%d private messages in total',
+ ),
'TOTAL_POSTS' => 'Total posts',
- 'TOTAL_POSTS_OTHER' => 'Total posts <strong>%d</strong>',
- 'TOTAL_POSTS_ZERO' => 'Total posts <strong>0</strong>',
+ 'TOTAL_POSTS_COUNT' => array(
+ 2 => 'Total posts <strong>%d</strong>',
+ ),
'TOPIC_REPORTED' => 'This topic has been reported',
- 'TOTAL_TOPICS_OTHER'=> 'Total topics <strong>%d</strong>',
- 'TOTAL_TOPICS_ZERO' => 'Total topics <strong>0</strong>',
- 'TOTAL_USERS_OTHER' => 'Total members <strong>%d</strong>',
- 'TOTAL_USERS_ZERO' => 'Total members <strong>0</strong>',
+ 'TOTAL_TOPICS' => array(
+ 2 => 'Total topics <strong>%d</strong>',
+ ),
+ 'TOTAL_USERS' => array(
+ 2 => 'Total members <strong>%d</strong>',
+ ),
'TRACKED_PHP_ERROR' => 'Tracked PHP errors: %s',
'UNABLE_GET_IMAGE_SIZE' => 'It was not possible to determine the dimensions of the image.',
@@ -659,8 +763,6 @@ $lang = array_merge($lang, array(
'UNKNOWN_BROWSER' => 'Unknown browser',
'UNMARK_ALL' => 'Unmark all',
'UNREAD_MESSAGES' => 'Unread messages',
- 'UNREAD_PM' => '<strong>%d</strong> unread message',
- 'UNREAD_PMS' => '<strong>%d</strong> unread messages',
'UNREAD_POST' => 'Unread post',
'UNREAD_POSTS' => 'Unread posts',
'UNWATCH_FORUM_CONFIRM' => 'Are you sure you wish to unsubscribe from this forum?',
@@ -678,8 +780,10 @@ $lang = array_merge($lang, array(
'USERNAMES' => 'Usernames',
'USER_AVATAR' => 'User avatar',
'USER_CANNOT_READ' => 'You cannot read posts in this forum.',
- 'USER_POST' => '%d Post',
- 'USER_POSTS' => '%d Posts',
+ 'USER_POSTS' => array(
+ 1 => '%d Post',
+ 2 => '%d Posts',
+ ),
'USERS' => 'Users',
'USE_PERMISSIONS' => 'Test out user’s permissions',
@@ -687,6 +791,11 @@ $lang = array_merge($lang, array(
'VARIANT_DATE_SEPARATOR' => ' / ', // Used in date format dropdown, eg: "Today, 13:37 / 01 Jan 2007, 13:37" ... to join a relative date with calendar date
'VIEWED' => 'Viewed',
+ 'VIEWED_COUNTS' => array(
+ 0 => 'Not viewed yet',
+ 1 => 'Viewed %d time',
+ 2 => 'Viewed %d times',
+ ),
'VIEWING_FAQ' => 'Viewing FAQ',
'VIEWING_MEMBERS' => 'Viewing member details',
'VIEWING_ONLINE' => 'Viewing who is online',
@@ -701,8 +810,10 @@ $lang = array_merge($lang, array(
'VIEW_LATEST_POST' => 'View the latest post',
'VIEW_NEWEST_POST' => 'View first unread post',
'VIEW_NOTES' => 'View user notes',
- 'VIEW_ONLINE_TIME' => 'based on users active over the past %d minute',
- 'VIEW_ONLINE_TIMES' => 'based on users active over the past %d minutes',
+ 'VIEW_ONLINE_TIMES' => array(
+ 1 => 'based on users active over the past %d minute',
+ 2 => 'based on users active over the past %d minutes',
+ ),
'VIEW_TOPIC' => 'View topic',
'VIEW_TOPIC_ANNOUNCEMENT' => 'Announcement: ',
'VIEW_TOPIC_GLOBAL' => 'Global Announcement: ',
@@ -723,23 +834,19 @@ $lang = array_merge($lang, array(
'WEBSITE' => 'Website',
'WHOIS' => 'Whois',
'WHO_IS_ONLINE' => 'Who is online',
+ 'WLM' => 'WLM',
'WRONG_PASSWORD' => 'You entered an incorrect password.',
'WRONG_DATA_COLOUR' => 'The colour value you entered is invalid.',
- 'WRONG_DATA_ICQ' => 'The number you entered is not a valid ICQ number.',
'WRONG_DATA_JABBER' => 'The name you entered is not a valid Jabber account name.',
'WRONG_DATA_LANG' => 'The language you specified is not valid.',
- 'WRONG_DATA_WEBSITE' => 'The website address has to be a valid URL, including the protocol. For example http://www.example.com/.',
'WROTE' => 'wrote',
+ 'YAHOO' => 'Yahoo Messenger',
'YEAR' => 'Year',
'YEAR_MONTH_DAY' => '(YYYY-MM-DD)',
'YES' => 'Yes',
- 'YIM' => 'YIM',
'YOU_LAST_VISIT' => 'Last visit was: %s',
- 'YOU_NEW_PM' => 'A new private message is waiting for you in your Inbox.',
- 'YOU_NEW_PMS' => 'New private messages are waiting for you in your Inbox.',
- 'YOU_NO_NEW_PM' => 'No new private messages are waiting for you.',
'datetime' => array(
'TODAY' => 'Today',
@@ -749,7 +856,6 @@ $lang = array_merge($lang, array(
0 => 'less than a minute ago',
1 => '%d minute ago',
2 => '%d minutes ago',
- 60 => '1 hour ago',
),
'Sunday' => 'Sunday',
@@ -795,91 +901,465 @@ $lang = array_merge($lang, array(
'Dec' => 'Dec',
),
- 'tz' => array(
- '-12' => 'UTC - 12 hours',
- '-11' => 'UTC - 11 hours',
- '-10' => 'UTC - 10 hours',
- '-9.5' => 'UTC - 9:30 hours',
- '-9' => 'UTC - 9 hours',
- '-8' => 'UTC - 8 hours',
- '-7' => 'UTC - 7 hours',
- '-6' => 'UTC - 6 hours',
- '-5' => 'UTC - 5 hours',
- '-4.5' => 'UTC - 4:30 hours',
- '-4' => 'UTC - 4 hours',
- '-3.5' => 'UTC - 3:30 hours',
- '-3' => 'UTC - 3 hours',
- '-2' => 'UTC - 2 hours',
- '-1' => 'UTC - 1 hour',
- '0' => 'UTC',
- '1' => 'UTC + 1 hour',
- '2' => 'UTC + 2 hours',
- '3' => 'UTC + 3 hours',
- '3.5' => 'UTC + 3:30 hours',
- '4' => 'UTC + 4 hours',
- '4.5' => 'UTC + 4:30 hours',
- '5' => 'UTC + 5 hours',
- '5.5' => 'UTC + 5:30 hours',
- '5.75' => 'UTC + 5:45 hours',
- '6' => 'UTC + 6 hours',
- '6.5' => 'UTC + 6:30 hours',
- '7' => 'UTC + 7 hours',
- '8' => 'UTC + 8 hours',
- '8.75' => 'UTC + 8:45 hours',
- '9' => 'UTC + 9 hours',
- '9.5' => 'UTC + 9:30 hours',
- '10' => 'UTC + 10 hours',
- '10.5' => 'UTC + 10:30 hours',
- '11' => 'UTC + 11 hours',
- '11.5' => 'UTC + 11:30 hours',
- '12' => 'UTC + 12 hours',
- '12.75' => 'UTC + 12:45 hours',
- '13' => 'UTC + 13 hours',
- '14' => 'UTC + 14 hours',
- 'dst' => '[ <abbr title="Daylight Saving Time">DST</abbr> ]',
- ),
+ // Timezones can be translated. We use this for the Etc/GMT timezones here,
+ // because they are named invers to their offset.
+ 'timezones' => array(
+ 'UTC' => 'UTC',
+
+ 'Etc/GMT-12' => 'GMT+12',
+ 'Etc/GMT-11' => 'GMT+11',
+ 'Etc/GMT-10' => 'GMT+10',
+ 'Etc/GMT-9' => 'GMT+9',
+ 'Etc/GMT-8' => 'GMT+8',
+ 'Etc/GMT-7' => 'GMT+7',
+ 'Etc/GMT-6' => 'GMT+6',
+ 'Etc/GMT-5' => 'GMT+5',
+ 'Etc/GMT-4' => 'GMT+4',
+ 'Etc/GMT-3' => 'GMT+3',
+ 'Etc/GMT-2' => 'GMT+2',
+ 'Etc/GMT-1' => 'GMT+1',
+ 'Etc/GMT+1' => 'GMT-1',
+ 'Etc/GMT+2' => 'GMT-2',
+ 'Etc/GMT+3' => 'GMT-3',
+ 'Etc/GMT+4' => 'GMT-4',
+ 'Etc/GMT+5' => 'GMT-5',
+ 'Etc/GMT+6' => 'GMT-6',
+ 'Etc/GMT+7' => 'GMT-7',
+ 'Etc/GMT+8' => 'GMT-8',
+ 'Etc/GMT+9' => 'GMT-9',
+ 'Etc/GMT+10' => 'GMT-10',
+ 'Etc/GMT+11' => 'GMT-11',
+ 'Etc/GMT+12' => 'GMT-12',
+
+ 'Africa/Abidjan' => 'Africa/Abidjan',
+ 'Africa/Accra' => 'Africa/Accra',
+ 'Africa/Addis_Ababa' => 'Africa/Addis Ababa',
+ 'Africa/Algiers' => 'Africa/Algiers',
+ 'Africa/Asmara' => 'Africa/Asmara',
+ 'Africa/Bamako' => 'Africa/Bamako',
+ 'Africa/Bangui' => 'Africa/Bangui',
+ 'Africa/Banjul' => 'Africa/Banjul',
+ 'Africa/Bissau' => 'Africa/Bissau',
+ 'Africa/Blantyre' => 'Africa/Blantyre',
+ 'Africa/Brazzaville' => 'Africa/Brazzaville',
+ 'Africa/Bujumbura' => 'Africa/Bujumbura',
+ 'Africa/Cairo' => 'Africa/Cairo',
+ 'Africa/Casablanca' => 'Africa/Casablanca',
+ 'Africa/Ceuta' => 'Africa/Ceuta',
+ 'Africa/Conakry' => 'Africa/Conakry',
+ 'Africa/Dakar' => 'Africa/Dakar',
+ 'Africa/Dar_es_Salaam' => 'Africa/Dar es Salaam',
+ 'Africa/Djibouti' => 'Africa/Djibouti',
+ 'Africa/Douala' => 'Africa/Douala',
+ 'Africa/El_Aaiun' => 'Africa/El Aaiun',
+ 'Africa/Freetown' => 'Africa/Freetown',
+ 'Africa/Gaborone' => 'Africa/Gaborone',
+ 'Africa/Harare' => 'Africa/Harare',
+ 'Africa/Johannesburg' => 'Africa/Johannesburg',
+ 'Africa/Juba' => 'Africa/Juba',
+ 'Africa/Kampala' => 'Africa/Kampala',
+ 'Africa/Khartoum' => 'Africa/Khartoum',
+ 'Africa/Kigali' => 'Africa/Kigali',
+ 'Africa/Kinshasa' => 'Africa/Kinshasa',
+ 'Africa/Lagos' => 'Africa/Lagos',
+ 'Africa/Libreville' => 'Africa/Libreville',
+ 'Africa/Lome' => 'Africa/Lome',
+ 'Africa/Luanda' => 'Africa/Luanda',
+ 'Africa/Lubumbashi' => 'Africa/Lubumbashi',
+ 'Africa/Lusaka' => 'Africa/Lusaka',
+ 'Africa/Malabo' => 'Africa/Malabo',
+ 'Africa/Maputo' => 'Africa/Maputo',
+ 'Africa/Maseru' => 'Africa/Maseru',
+ 'Africa/Mbabane' => 'Africa/Mbabane',
+ 'Africa/Mogadishu' => 'Africa/Mogadishu',
+ 'Africa/Monrovia' => 'Africa/Monrovia',
+ 'Africa/Nairobi' => 'Africa/Nairobi',
+ 'Africa/Ndjamena' => 'Africa/Ndjamena',
+ 'Africa/Niamey' => 'Africa/Niamey',
+ 'Africa/Nouakchott' => 'Africa/Nouakchott',
+ 'Africa/Ouagadougou' => 'Africa/Ouagadougou',
+ 'Africa/Porto-Novo' => 'Africa/Porto-Novo',
+ 'Africa/Sao_Tome' => 'Africa/Sao Tome',
+ 'Africa/Tripoli' => 'Africa/Tripoli',
+ 'Africa/Tunis' => 'Africa/Tunis',
+ 'Africa/Windhoek' => 'Africa/Windhoek',
+
+ 'America/Adak' => 'America/Adak',
+ 'America/Anchorage' => 'America/Anchorage',
+ 'America/Anguilla' => 'America/Anguilla',
+ 'America/Antigua' => 'America/Antigua',
+ 'America/Araguaina' => 'America/Araguaina',
- 'tz_zones' => array(
- '-12' => '[UTC - 12] Baker Island Time',
- '-11' => '[UTC - 11] Niue Time, Samoa Standard Time',
- '-10' => '[UTC - 10] Hawaii-Aleutian Standard Time, Cook Island Time',
- '-9.5' => '[UTC - 9:30] Marquesas Islands Time',
- '-9' => '[UTC - 9] Alaska Standard Time, Gambier Island Time',
- '-8' => '[UTC - 8] Pacific Standard Time',
- '-7' => '[UTC - 7] Mountain Standard Time',
- '-6' => '[UTC - 6] Central Standard Time',
- '-5' => '[UTC - 5] Eastern Standard Time',
- '-4.5' => '[UTC - 4:30] Venezuelan Standard Time',
- '-4' => '[UTC - 4] Atlantic Standard Time',
- '-3.5' => '[UTC - 3:30] Newfoundland Standard Time',
- '-3' => '[UTC - 3] Amazon Standard Time, Central Greenland Time',
- '-2' => '[UTC - 2] Fernando de Noronha Time, South Georgia &amp; the South Sandwich Islands Time',
- '-1' => '[UTC - 1] Azores Standard Time, Cape Verde Time, Eastern Greenland Time',
- '0' => '[UTC] Western European Time, Greenwich Mean Time',
- '1' => '[UTC + 1] Central European Time, West African Time',
- '2' => '[UTC + 2] Eastern European Time, Central African Time',
- '3' => '[UTC + 3] Moscow Standard Time, Eastern African Time',
- '3.5' => '[UTC + 3:30] Iran Standard Time',
- '4' => '[UTC + 4] Gulf Standard Time, Samara Standard Time',
- '4.5' => '[UTC + 4:30] Afghanistan Time',
- '5' => '[UTC + 5] Pakistan Standard Time, Yekaterinburg Standard Time',
- '5.5' => '[UTC + 5:30] Indian Standard Time, Sri Lanka Time',
- '5.75' => '[UTC + 5:45] Nepal Time',
- '6' => '[UTC + 6] Bangladesh Time, Bhutan Time, Novosibirsk Standard Time',
- '6.5' => '[UTC + 6:30] Cocos Islands Time, Myanmar Time',
- '7' => '[UTC + 7] Indochina Time, Krasnoyarsk Standard Time',
- '8' => '[UTC + 8] Chinese Standard Time, Australian Western Standard Time, Irkutsk Standard Time',
- '8.75' => '[UTC + 8:45] Southeastern Western Australia Standard Time',
- '9' => '[UTC + 9] Japan Standard Time, Korea Standard Time, Chita Standard Time',
- '9.5' => '[UTC + 9:30] Australian Central Standard Time',
- '10' => '[UTC + 10] Australian Eastern Standard Time, Vladivostok Standard Time',
- '10.5' => '[UTC + 10:30] Lord Howe Standard Time',
- '11' => '[UTC + 11] Solomon Island Time, Magadan Standard Time',
- '11.5' => '[UTC + 11:30] Norfolk Island Time',
- '12' => '[UTC + 12] New Zealand Time, Fiji Time, Kamchatka Standard Time',
- '12.75' => '[UTC + 12:45] Chatham Islands Time',
- '13' => '[UTC + 13] Tonga Time, Phoenix Islands Time',
- '14' => '[UTC + 14] Line Island Time',
+ 'America/Argentina/Buenos_Aires' => 'America/Argentina/Buenos Aires',
+ 'America/Argentina/Catamarca' => 'America/Argentina/Catamarca',
+ 'America/Argentina/Cordoba' => 'America/Argentina/Cordoba',
+ 'America/Argentina/Jujuy' => 'America/Argentina/Jujuy',
+ 'America/Argentina/La_Rioja' => 'America/Argentina/La Rioja',
+ 'America/Argentina/Mendoza' => 'America/Argentina/Mendoza',
+ 'America/Argentina/Rio_Gallegos' => 'America/Argentina/Rio Gallegos',
+ 'America/Argentina/Salta' => 'America/Argentina/Salta',
+ 'America/Argentina/San_Juan' => 'America/Argentina/San Juan',
+ 'America/Argentina/San_Luis' => 'America/Argentina/San Luis',
+ 'America/Argentina/Tucuman' => 'America/Argentina/Tucuman',
+ 'America/Argentina/Ushuaia' => 'America/Argentina/Ushuaia',
+
+ 'America/Aruba' => 'America/Aruba',
+ 'America/Asuncion' => 'America/Asuncion',
+ 'America/Atikokan' => 'America/Atikokan',
+ 'America/Bahia' => 'America/Bahia',
+ 'America/Bahia_Banderas' => 'America/Bahia Banderas',
+ 'America/Barbados' => 'America/Barbados',
+ 'America/Belem' => 'America/Belem',
+ 'America/Belize' => 'America/Belize',
+ 'America/Blanc-Sablon' => 'America/Blanc-Sablon',
+ 'America/Boa_Vista' => 'America/Boa Vista',
+ 'America/Bogota' => 'America/Bogota',
+ 'America/Boise' => 'America/Boise',
+ 'America/Cambridge_Bay' => 'America/Cambridge Bay',
+ 'America/Campo_Grande' => 'America/Campo Grande',
+ 'America/Cancun' => 'America/Cancun',
+ 'America/Caracas' => 'America/Caracas',
+ 'America/Cayenne' => 'America/Cayenne',
+ 'America/Cayman' => 'America/Cayman',
+ 'America/Chicago' => 'America/Chicago',
+ 'America/Chihuahua' => 'America/Chihuahua',
+ 'America/Costa_Rica' => 'America/Costa Rica',
+ 'America/Creston' => 'America/Creston',
+ 'America/Cuiaba' => 'America/Cuiaba',
+ 'America/Curacao' => 'America/Curacao',
+ 'America/Danmarkshavn' => 'America/Danmarkshavn',
+ 'America/Dawson' => 'America/Dawson',
+ 'America/Dawson_Creek' => 'America/Dawson Creek',
+ 'America/Denver' => 'America/Denver',
+ 'America/Detroit' => 'America/Detroit',
+ 'America/Dominica' => 'America/Dominica',
+ 'America/Edmonton' => 'America/Edmonton',
+ 'America/Eirunepe' => 'America/Eirunepe',
+ 'America/El_Salvador' => 'America/El Salvador',
+ 'America/Fortaleza' => 'America/Fortaleza',
+ 'America/Glace_Bay' => 'America/Glace Bay',
+ 'America/Godthab' => 'America/Godthab',
+ 'America/Goose_Bay' => 'America/Goose Bay',
+ 'America/Grand_Turk' => 'America/Grand Turk',
+ 'America/Grenada' => 'America/Grenada',
+ 'America/Guadeloupe' => 'America/Guadeloupe',
+ 'America/Guatemala' => 'America/Guatemala',
+ 'America/Guayaquil' => 'America/Guayaquil',
+ 'America/Guyana' => 'America/Guyana',
+ 'America/Halifax' => 'America/Halifax',
+ 'America/Havana' => 'America/Havana',
+ 'America/Hermosillo' => 'America/Hermosillo',
+ 'America/Indiana/Indianapolis' => 'America/Indiana/Indianapolis',
+ 'America/Indiana/Knox' => 'America/Indiana/Knox',
+ 'America/Indiana/Marengo' => 'America/Indiana/Marengo',
+ 'America/Indiana/Petersburg' => 'America/Indiana/Petersburg',
+ 'America/Indiana/Tell_City' => 'America/Indiana/Tell City',
+ 'America/Indiana/Vevay' => 'America/Indiana/Vevay',
+ 'America/Indiana/Vincennes' => 'America/Indiana/Vincennes',
+ 'America/Indiana/Winamac' => 'America/Indiana/Winamac',
+ 'America/Inuvik' => 'America/Inuvik',
+ 'America/Iqaluit' => 'America/Iqaluit',
+ 'America/Jamaica' => 'America/Jamaica',
+ 'America/Juneau' => 'America/Juneau',
+ 'America/Kentucky/Louisville' => 'America/Kentucky/Louisville',
+ 'America/Kentucky/Monticello' => 'America/Kentucky/Monticello',
+ 'America/Kralendijk' => 'America/Kralendijk',
+ 'America/La_Paz' => 'America/La Paz',
+ 'America/Lima' => 'America/Lima',
+ 'America/Los_Angeles' => 'America/Los Angeles',
+ 'America/Lower_Princes' => 'America/Lower Princes',
+ 'America/Maceio' => 'America/Maceio',
+ 'America/Managua' => 'America/Managua',
+ 'America/Manaus' => 'America/Manaus',
+ 'America/Marigot' => 'America/Marigot',
+ 'America/Martinique' => 'America/Martinique',
+ 'America/Matamoros' => 'America/Matamoros',
+ 'America/Mazatlan' => 'America/Mazatlan',
+ 'America/Menominee' => 'America/Menominee',
+ 'America/Merida' => 'America/Merida',
+ 'America/Metlakatla' => 'America/Metlakatla',
+ 'America/Mexico_City' => 'America/Mexico City',
+ 'America/Miquelon' => 'America/Miquelon',
+ 'America/Moncton' => 'America/Moncton',
+ 'America/Monterrey' => 'America/Monterrey',
+ 'America/Montevideo' => 'America/Montevideo',
+ 'America/Montreal' => 'America/Montreal',
+ 'America/Montserrat' => 'America/Montserrat',
+ 'America/Nassau' => 'America/Nassau',
+ 'America/New_York' => 'America/New York',
+ 'America/Nipigon' => 'America/Nipigon',
+ 'America/Nome' => 'America/Nome',
+ 'America/Noronha' => 'America/Noronha',
+ 'America/North_Dakota/Beulah' => 'America/North Dakota/Beulah',
+ 'America/North_Dakota/Center' => 'America/North Dakota/Center',
+ 'America/North_Dakota/New_Salem' => 'America/North Dakota/New Salem',
+ 'America/Ojinaga' => 'America/Ojinaga',
+ 'America/Panama' => 'America/Panama',
+ 'America/Pangnirtung' => 'America/Pangnirtung',
+ 'America/Paramaribo' => 'America/Paramaribo',
+ 'America/Phoenix' => 'America/Phoenix',
+ 'America/Port-au-Prince' => 'America/Port-au-Prince',
+ 'America/Port_of_Spain' => 'America/Port of Spain',
+ 'America/Porto_Velho' => 'America/Porto Velho',
+ 'America/Puerto_Rico' => 'America/Puerto Rico',
+ 'America/Rainy_River' => 'America/Rainy River',
+ 'America/Rankin_Inlet' => 'America/Rankin Inlet',
+ 'America/Recife' => 'America/Recife',
+ 'America/Regina' => 'America/Regina',
+ 'America/Resolute' => 'America/Resolute',
+ 'America/Rio_Branco' => 'America/Rio Branco',
+ 'America/Santa_Isabel' => 'America/Santa Isabel',
+ 'America/Santarem' => 'America/Santarem',
+ 'America/Santiago' => 'America/Santiago',
+ 'America/Santo_Domingo' => 'America/Santo Domingo',
+ 'America/Sao_Paulo' => 'America/Sao Paulo',
+ 'America/Scoresbysund' => 'America/Scoresbysund',
+ 'America/Shiprock' => 'America/Shiprock',
+ 'America/Sitka' => 'America/Sitka',
+ 'America/St_Barthelemy' => 'America/St. Barthelemy',
+ 'America/St_Johns' => 'America/St. Johns',
+ 'America/St_Kitts' => 'America/St. Kitts',
+ 'America/St_Lucia' => 'America/St. Lucia',
+ 'America/St_Thomas' => 'America/St. Thomas',
+ 'America/St_Vincent' => 'America/St. Vincent',
+ 'America/Swift_Current' => 'America/Swift Current',
+ 'America/Tegucigalpa' => 'America/Tegucigalpa',
+ 'America/Thule' => 'America/Thule',
+ 'America/Thunder_Bay' => 'America/Thunder Bay',
+ 'America/Tijuana' => 'America/Tijuana',
+ 'America/Toronto' => 'America/Toronto',
+ 'America/Tortola' => 'America/Tortola',
+ 'America/Vancouver' => 'America/Vancouver',
+ 'America/Whitehorse' => 'America/Whitehorse',
+ 'America/Winnipeg' => 'America/Winnipeg',
+ 'America/Yakutat' => 'America/Yakutat',
+ 'America/Yellowknife' => 'America/Yellowknife',
+
+ 'Antarctica/Casey' => 'Antarctica/Casey',
+ 'Antarctica/Davis' => 'Antarctica/Davis',
+ 'Antarctica/DumontDUrville' => 'Antarctica/DumontDUrville',
+ 'Antarctica/Macquarie' => 'Antarctica/Macquarie',
+ 'Antarctica/Mawson' => 'Antarctica/Mawson',
+ 'Antarctica/McMurdo' => 'Antarctica/McMurdo',
+ 'Antarctica/Palmer' => 'Antarctica/Palmer',
+ 'Antarctica/Rothera' => 'Antarctica/Rothera',
+ 'Antarctica/South_Pole' => 'Antarctica/South Pole',
+ 'Antarctica/Syowa' => 'Antarctica/Syowa',
+ 'Antarctica/Vostok' => 'Antarctica/Vostok',
+
+ 'Arctic/Longyearbyen' => 'Arctic/Longyearbyen',
+
+ 'Asia/Aden' => 'Asia/Aden',
+ 'Asia/Almaty' => 'Asia/Almaty',
+ 'Asia/Amman' => 'Asia/Amman',
+ 'Asia/Anadyr' => 'Asia/Anadyr',
+ 'Asia/Aqtau' => 'Asia/Aqtau',
+ 'Asia/Aqtobe' => 'Asia/Aqtobe',
+ 'Asia/Ashgabat' => 'Asia/Ashgabat',
+ 'Asia/Baghdad' => 'Asia/Baghdad',
+ 'Asia/Bahrain' => 'Asia/Bahrain',
+ 'Asia/Baku' => 'Asia/Baku',
+ 'Asia/Bangkok' => 'Asia/Bangkok',
+ 'Asia/Beirut' => 'Asia/Beirut',
+ 'Asia/Bishkek' => 'Asia/Bishkek',
+ 'Asia/Brunei' => 'Asia/Brunei',
+ 'Asia/Choibalsan' => 'Asia/Choibalsan',
+ 'Asia/Chongqing' => 'Asia/Chongqing',
+ 'Asia/Colombo' => 'Asia/Colombo',
+ 'Asia/Damascus' => 'Asia/Damascus',
+ 'Asia/Dhaka' => 'Asia/Dhaka',
+ 'Asia/Dili' => 'Asia/Dili',
+ 'Asia/Dubai' => 'Asia/Dubai',
+ 'Asia/Dushanbe' => 'Asia/Dushanbe',
+ 'Asia/Gaza' => 'Asia/Gaza',
+ 'Asia/Harbin' => 'Asia/Harbin',
+ 'Asia/Hebron' => 'Asia/Hebron',
+ 'Asia/Ho_Chi_Minh' => 'Asia/Ho Chi Minh',
+ 'Asia/Hong_Kong' => 'Asia/Hong Kong',
+ 'Asia/Hovd' => 'Asia/Hovd',
+ 'Asia/Irkutsk' => 'Asia/Irkutsk',
+ 'Asia/Jakarta' => 'Asia/Jakarta',
+ 'Asia/Jayapura' => 'Asia/Jayapura',
+ 'Asia/Jerusalem' => 'Asia/Jerusalem',
+ 'Asia/Kabul' => 'Asia/Kabul',
+ 'Asia/Kamchatka' => 'Asia/Kamchatka',
+ 'Asia/Karachi' => 'Asia/Karachi',
+ 'Asia/Kashgar' => 'Asia/Kashgar',
+ 'Asia/Kathmandu' => 'Asia/Kathmandu',
+ 'Asia/Khandyga' => 'Asia/Khandyga',
+ 'Asia/Kolkata' => 'Asia/Kolkata',
+ 'Asia/Krasnoyarsk' => 'Asia/Krasnoyarsk',
+ 'Asia/Kuala_Lumpur' => 'Asia/Kuala Lumpur',
+ 'Asia/Kuching' => 'Asia/Kuching',
+ 'Asia/Kuwait' => 'Asia/Kuwait',
+ 'Asia/Macau' => 'Asia/Macau',
+ 'Asia/Magadan' => 'Asia/Magadan',
+ 'Asia/Makassar' => 'Asia/Makassar',
+ 'Asia/Manila' => 'Asia/Manila',
+ 'Asia/Muscat' => 'Asia/Muscat',
+ 'Asia/Nicosia' => 'Asia/Nicosia',
+ 'Asia/Novokuznetsk' => 'Asia/Novokuznetsk',
+ 'Asia/Novosibirsk' => 'Asia/Novosibirsk',
+ 'Asia/Omsk' => 'Asia/Omsk',
+ 'Asia/Oral' => 'Asia/Oral',
+ 'Asia/Phnom_Penh' => 'Asia/Phnom Penh',
+ 'Asia/Pontianak' => 'Asia/Pontianak',
+ 'Asia/Pyongyang' => 'Asia/Pyongyang',
+ 'Asia/Qatar' => 'Asia/Qatar',
+ 'Asia/Qyzylorda' => 'Asia/Qyzylorda',
+ 'Asia/Rangoon' => 'Asia/Rangoon',
+ 'Asia/Riyadh' => 'Asia/Riyadh',
+ 'Asia/Sakhalin' => 'Asia/Sakhalin',
+ 'Asia/Samarkand' => 'Asia/Samarkand',
+ 'Asia/Seoul' => 'Asia/Seoul',
+ 'Asia/Shanghai' => 'Asia/Shanghai',
+ 'Asia/Singapore' => 'Asia/Singapore',
+ 'Asia/Taipei' => 'Asia/Taipei',
+ 'Asia/Tashkent' => 'Asia/Tashkent',
+ 'Asia/Tbilisi' => 'Asia/Tbilisi',
+ 'Asia/Tehran' => 'Asia/Tehran',
+ 'Asia/Thimphu' => 'Asia/Thimphu',
+ 'Asia/Tokyo' => 'Asia/Tokyo',
+ 'Asia/Ulaanbaatar' => 'Asia/Ulaanbaatar',
+ 'Asia/Urumqi' => 'Asia/Urumqi',
+ 'Asia/Ust-Nera' => 'Asia/Ust-Nera',
+ 'Asia/Vientiane' => 'Asia/Vientiane',
+ 'Asia/Vladivostok' => 'Asia/Vladivostok',
+ 'Asia/Yakutsk' => 'Asia/Yakutsk',
+ 'Asia/Yekaterinburg' => 'Asia/Yekaterinburg',
+ 'Asia/Yerevan' => 'Asia/Yerevan',
+
+ 'Atlantic/Azores' => 'Atlantic/Azores',
+ 'Atlantic/Bermuda' => 'Atlantic/Bermuda',
+ 'Atlantic/Canary' => 'Atlantic/Canary',
+ 'Atlantic/Cape_Verde' => 'Atlantic/Cape Verde',
+ 'Atlantic/Faroe' => 'Atlantic/Faroe',
+ 'Atlantic/Madeira' => 'Atlantic/Madeira',
+ 'Atlantic/Reykjavik' => 'Atlantic/Reykjavik',
+ 'Atlantic/South_Georgia' => 'Atlantic/South Georgia',
+ 'Atlantic/St_Helena' => 'Atlantic/St. Helena',
+ 'Atlantic/Stanley' => 'Atlantic/Stanley',
+
+ 'Australia/Adelaide' => 'Australia/Adelaide',
+ 'Australia/Brisbane' => 'Australia/Brisbane',
+ 'Australia/Broken_Hill' => 'Australia/Broken Hill',
+ 'Australia/Currie' => 'Australia/Currie',
+ 'Australia/Darwin' => 'Australia/Darwin',
+ 'Australia/Eucla' => 'Australia/Eucla',
+ 'Australia/Hobart' => 'Australia/Hobart',
+ 'Australia/Lindeman' => 'Australia/Lindeman',
+ 'Australia/Lord_Howe' => 'Australia/Lord Howe',
+ 'Australia/Melbourne' => 'Australia/Melbourne',
+ 'Australia/Perth' => 'Australia/Perth',
+ 'Australia/Sydney' => 'Australia/Sydney',
+
+ 'Europe/Amsterdam' => 'Europe/Amsterdam',
+ 'Europe/Andorra' => 'Europe/Andorra',
+ 'Europe/Athens' => 'Europe/Athens',
+ 'Europe/Belgrade' => 'Europe/Belgrade',
+ 'Europe/Berlin' => 'Europe/Berlin',
+ 'Europe/Bratislava' => 'Europe/Bratislava',
+ 'Europe/Brussels' => 'Europe/Brussels',
+ 'Europe/Bucharest' => 'Europe/Bucharest',
+ 'Europe/Budapest' => 'Europe/Budapest',
+ 'Europe/Busingen' => 'Europe/Busingen',
+ 'Europe/Chisinau' => 'Europe/Chisinau',
+ 'Europe/Copenhagen' => 'Europe/Copenhagen',
+ 'Europe/Dublin' => 'Europe/Dublin',
+ 'Europe/Gibraltar' => 'Europe/Gibraltar',
+ 'Europe/Guernsey' => 'Europe/Guernsey',
+ 'Europe/Helsinki' => 'Europe/Helsinki',
+ 'Europe/Isle_of_Man' => 'Europe/Isle of Man',
+ 'Europe/Istanbul' => 'Europe/Istanbul',
+ 'Europe/Jersey' => 'Europe/Jersey',
+ 'Europe/Kaliningrad' => 'Europe/Kaliningrad',
+ 'Europe/Kiev' => 'Europe/Kiev',
+ 'Europe/Lisbon' => 'Europe/Lisbon',
+ 'Europe/Ljubljana' => 'Europe/Ljubljana',
+ 'Europe/London' => 'Europe/London',
+ 'Europe/Luxembourg' => 'Europe/Luxembourg',
+ 'Europe/Madrid' => 'Europe/Madrid',
+ 'Europe/Malta' => 'Europe/Malta',
+ 'Europe/Mariehamn' => 'Europe/Mariehamn',
+ 'Europe/Minsk' => 'Europe/Minsk',
+ 'Europe/Monaco' => 'Europe/Monaco',
+ 'Europe/Moscow' => 'Europe/Moscow',
+ 'Europe/Oslo' => 'Europe/Oslo',
+ 'Europe/Paris' => 'Europe/Paris',
+ 'Europe/Podgorica' => 'Europe/Podgorica',
+ 'Europe/Prague' => 'Europe/Prague',
+ 'Europe/Riga' => 'Europe/Riga',
+ 'Europe/Rome' => 'Europe/Rome',
+ 'Europe/Samara' => 'Europe/Samara',
+ 'Europe/San_Marino' => 'Europe/San Marino',
+ 'Europe/Sarajevo' => 'Europe/Sarajevo',
+ 'Europe/Simferopol' => 'Europe/Simferopol',
+ 'Europe/Skopje' => 'Europe/Skopje',
+ 'Europe/Sofia' => 'Europe/Sofia',
+ 'Europe/Stockholm' => 'Europe/Stockholm',
+ 'Europe/Tallinn' => 'Europe/Tallinn',
+ 'Europe/Tirane' => 'Europe/Tirane',
+ 'Europe/Uzhgorod' => 'Europe/Uzhgorod',
+ 'Europe/Vaduz' => 'Europe/Vaduz',
+ 'Europe/Vatican' => 'Europe/Vatican',
+ 'Europe/Vienna' => 'Europe/Vienna',
+ 'Europe/Vilnius' => 'Europe/Vilnius',
+ 'Europe/Volgograd' => 'Europe/Volgograd',
+ 'Europe/Warsaw' => 'Europe/Warsaw',
+ 'Europe/Zagreb' => 'Europe/Zagreb',
+ 'Europe/Zaporozhye' => 'Europe/Zaporozhye',
+ 'Europe/Zurich' => 'Europe/Zurich',
+
+ 'Indian/Antananarivo' => 'Indian/Antananarivo',
+ 'Indian/Chagos' => 'Indian/Chagos',
+ 'Indian/Christmas' => 'Indian/Christmas',
+ 'Indian/Cocos' => 'Indian/Cocos',
+ 'Indian/Comoro' => 'Indian/Comoro',
+ 'Indian/Kerguelen' => 'Indian/Kerguelen',
+ 'Indian/Mahe' => 'Indian/Mahe',
+ 'Indian/Maldives' => 'Indian/Maldives',
+ 'Indian/Mauritius' => 'Indian/Mauritius',
+ 'Indian/Mayotte' => 'Indian/Mayotte',
+ 'Indian/Reunion' => 'Indian/Reunion',
+
+ 'Pacific/Apia' => 'Pacific/Apia',
+ 'Pacific/Auckland' => 'Pacific/Auckland',
+ 'Pacific/Chatham' => 'Pacific/Chatham',
+ 'Pacific/Chuuk' => 'Pacific/Chuuk',
+ 'Pacific/Easter' => 'Pacific/Easter',
+ 'Pacific/Efate' => 'Pacific/Efate',
+ 'Pacific/Enderbury' => 'Pacific/Enderbury',
+ 'Pacific/Fakaofo' => 'Pacific/Fakaofo',
+ 'Pacific/Fiji' => 'Pacific/Fiji',
+ 'Pacific/Funafuti' => 'Pacific/Funafuti',
+ 'Pacific/Galapagos' => 'Pacific/Galapagos',
+ 'Pacific/Gambier' => 'Pacific/Gambier',
+ 'Pacific/Guadalcanal' => 'Pacific/Guadalcanal',
+ 'Pacific/Guam' => 'Pacific/Guam',
+ 'Pacific/Honolulu' => 'Pacific/Honolulu',
+ 'Pacific/Johnston' => 'Pacific/Johnston',
+ 'Pacific/Kiritimati' => 'Pacific/Kiritimati',
+ 'Pacific/Kosrae' => 'Pacific/Kosrae',
+ 'Pacific/Kwajalein' => 'Pacific/Kwajalein',
+ 'Pacific/Majuro' => 'Pacific/Majuro',
+ 'Pacific/Marquesas' => 'Pacific/Marquesas',
+ 'Pacific/Midway' => 'Pacific/Midway',
+ 'Pacific/Nauru' => 'Pacific/Nauru',
+ 'Pacific/Niue' => 'Pacific/Niue',
+ 'Pacific/Norfolk' => 'Pacific/Norfolk',
+ 'Pacific/Noumea' => 'Pacific/Noumea',
+ 'Pacific/Pago_Pago' => 'Pacific/Pago Pago',
+ 'Pacific/Palau' => 'Pacific/Palau',
+ 'Pacific/Pitcairn' => 'Pacific/Pitcairn',
+ 'Pacific/Pohnpei' => 'Pacific/Pohnpei',
+ 'Pacific/Port_Moresby' => 'Pacific/Port Moresby',
+ 'Pacific/Rarotonga' => 'Pacific/Rarotonga',
+ 'Pacific/Saipan' => 'Pacific/Saipan',
+ 'Pacific/Tahiti' => 'Pacific/Tahiti',
+ 'Pacific/Tarawa' => 'Pacific/Tarawa',
+ 'Pacific/Tongatapu' => 'Pacific/Tongatapu',
+ 'Pacific/Wake' => 'Pacific/Wake',
+ 'Pacific/Wallis' => 'Pacific/Wallis',
),
// The value is only an example and will get replaced by the current time on view
@@ -898,5 +1378,3 @@ $lang = array_merge($lang, array(
'default_dateformat' => 'D M d, Y g:i a', // Mon Jan 01, 2007 1:37 pm
));
-
-?> \ No newline at end of file
diff --git a/phpBB/language/en/email/admin_send_email.txt b/phpBB/language/en/email/admin_send_email.txt
index 6687404527..b778496258 100644
--- a/phpBB/language/en/email/admin_send_email.txt
+++ b/phpBB/language/en/email/admin_send_email.txt
@@ -1,9 +1,9 @@
-The following is an e-mail sent to you by an administrator of "{SITENAME}". If this message is spam, contains abusive or other comments you find offensive please contact the webmaster of the board at the following address:
+The following is an email sent to you by an administrator of "{SITENAME}". If this message is spam, contains abusive or other comments you find offensive please contact the webmaster of the board at the following address:
{CONTACT_EMAIL}
-Include this full e-mail (particularly the headers).
+Include this full email (particularly the headers).
Message sent to you follows:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/phpBB/language/en/email/admin_welcome_inactive.txt b/phpBB/language/en/email/admin_welcome_inactive.txt
index 30b3aae852..8605956318 100644
--- a/phpBB/language/en/email/admin_welcome_inactive.txt
+++ b/phpBB/language/en/email/admin_welcome_inactive.txt
@@ -2,7 +2,7 @@ Subject: Welcome to "{SITENAME}"
{WELCOME_MSG}
-Please keep this e-mail for your records. Your account information is as follows:
+Please keep this email for your records. Your account information is as follows:
----------------------------
Username: {USERNAME}
diff --git a/phpBB/language/en/email/bookmark.txt b/phpBB/language/en/email/bookmark.txt
new file mode 100644
index 0000000000..95f17b5693
--- /dev/null
+++ b/phpBB/language/en/email/bookmark.txt
@@ -0,0 +1,20 @@
+Subject: Topic reply notification - "{TOPIC_TITLE}"
+
+Hello {USERNAME},
+
+You are receiving this notification because a topic you bookmarked, "{TOPIC_TITLE}" at "{SITENAME}", has received a reply since your last visit. You can use the following link to view the replies made, no more notifications will be sent until you visit the topic.
+
+If you want to view the newest post made since your last visit, click the following link:
+{U_NEWEST_POST}
+
+If you want to view the topic, click the following link:
+{U_TOPIC}
+
+If you want to view the forum, click the following link:
+{U_FORUM}
+
+If you no longer wish to receive updates about replies to bookmarks, please update your notification settings here:
+
+{U_NOTIFICATION_SETTINGS}
+
+{EMAIL_SIG}
diff --git a/phpBB/language/en/email/coppa_resend_inactive.txt b/phpBB/language/en/email/coppa_resend_inactive.txt
index c3e4af576d..915534a13e 100644
--- a/phpBB/language/en/email/coppa_resend_inactive.txt
+++ b/phpBB/language/en/email/coppa_resend_inactive.txt
@@ -16,7 +16,7 @@ OR mail it to:
Permission to participate at "{SITENAME}" - {U_BOARD}
Username: {USERNAME}
-E-mail: {EMAIL_ADDRESS}
+Email: {EMAIL_ADDRESS}
I HAVE REVIEWED THE INFORMATION PROVIDED BY MY CHILD AND HEREBY GRANT PERMISSION TO "{SITENAME}" TO STORE THIS INFORMATION.
I UNDERSTAND THIS INFORMATION CAN BE CHANGED AT ANY TIME BY ENTERING A PASSWORD.
diff --git a/phpBB/language/en/email/coppa_welcome_inactive.txt b/phpBB/language/en/email/coppa_welcome_inactive.txt
index c3e4af576d..915534a13e 100644
--- a/phpBB/language/en/email/coppa_welcome_inactive.txt
+++ b/phpBB/language/en/email/coppa_welcome_inactive.txt
@@ -16,7 +16,7 @@ OR mail it to:
Permission to participate at "{SITENAME}" - {U_BOARD}
Username: {USERNAME}
-E-mail: {EMAIL_ADDRESS}
+Email: {EMAIL_ADDRESS}
I HAVE REVIEWED THE INFORMATION PROVIDED BY MY CHILD AND HEREBY GRANT PERMISSION TO "{SITENAME}" TO STORE THIS INFORMATION.
I UNDERSTAND THIS INFORMATION CAN BE CHANGED AT ANY TIME BY ENTERING A PASSWORD.
diff --git a/phpBB/language/en/email/email_notify.txt b/phpBB/language/en/email/email_notify.txt
index 0d0ac7fc28..725b52f0cc 100644
--- a/phpBB/language/en/email/email_notify.txt
+++ b/phpBB/language/en/email/email_notify.txt
@@ -1,8 +1,8 @@
-Subject: "{SITENAME}" - E-mail a friend
+Subject: "{SITENAME}" - Email a friend
Hello {TO_USERNAME},
-This e-mail was sent from "{SITENAME}" by {FROM_USERNAME} who thought you may be interested in the following topic:
+This email was sent from "{SITENAME}" by {FROM_USERNAME} who thought you may be interested in the following topic:
{TOPIC_NAME}
@@ -10,7 +10,7 @@ You can find it at:
{U_TOPIC}
-A message from {FROM_USERNAME} may also be included below. Please note that this message has not been seen or approved by the board administrators. If you wish to complain about having received this e-mail please contact the board administrator at {BOARD_CONTACT}. Please quote the message headers when contacting this address.
+A message from {FROM_USERNAME} may also be included below. Please note that this message has not been seen or approved by the board administrators. If you wish to complain about having received this email please contact the board administrator at {BOARD_CONTACT}. Please quote the message headers when contacting this address.
----------
diff --git a/phpBB/language/en/email/group_approved.txt b/phpBB/language/en/email/group_approved.txt
deleted file mode 100644
index 24afefcd07..0000000000
--- a/phpBB/language/en/email/group_approved.txt
+++ /dev/null
@@ -1,10 +0,0 @@
-Subject: Your request has been approved
-
-Congratulations,
-
-Your request to join the "{GROUP_NAME}" group on "{SITENAME}" has been approved.
-Click on the following link to see your group membership.
-
-{U_GROUP}
-
-{EMAIL_SIG}
diff --git a/phpBB/language/en/email/installed.txt b/phpBB/language/en/email/installed.txt
index 60e52e37c4..8f63d07635 100644
--- a/phpBB/language/en/email/installed.txt
+++ b/phpBB/language/en/email/installed.txt
@@ -4,7 +4,7 @@ Congratulations,
You have successfully installed phpBB on your server.
-This e-mail contains important information regarding your installation and should be kept for reference. Your password has been securely stored in our database and cannot be retrieved. In the event that it is forgotten, you will be able to reset it using the email address associated with your account.
+This email contains important information regarding your installation and should be kept for reference. Your password has been securely stored in our database and cannot be retrieved. In the event that it is forgotten, you will be able to reset it using the email address associated with your account.
----------------------------
Username: {USERNAME}
diff --git a/phpBB/language/en/email/newtopic_notify.txt b/phpBB/language/en/email/newtopic_notify.txt
index dcc1fff343..5089e7dcb8 100644
--- a/phpBB/language/en/email/newtopic_notify.txt
+++ b/phpBB/language/en/email/newtopic_notify.txt
@@ -10,4 +10,4 @@ If you no longer wish to watch this forum you can either click the "Unsubscribe
{U_STOP_WATCHING_FORUM}
-{EMAIL_SIG} \ No newline at end of file
+{EMAIL_SIG}
diff --git a/phpBB/language/en/email/post_approved.txt b/phpBB/language/en/email/post_approved.txt
index e715b54026..a02dba142a 100644
--- a/phpBB/language/en/email/post_approved.txt
+++ b/phpBB/language/en/email/post_approved.txt
@@ -10,5 +10,4 @@ If you want to view the post, click the following link:
If you want to view the topic, click the following link:
{U_VIEW_TOPIC}
-
{EMAIL_SIG} \ No newline at end of file
diff --git a/phpBB/language/en/email/post_disapproved.txt b/phpBB/language/en/email/post_disapproved.txt
index 3bc64bb611..9b2ee643ff 100644
--- a/phpBB/language/en/email/post_disapproved.txt
+++ b/phpBB/language/en/email/post_disapproved.txt
@@ -8,5 +8,4 @@ The following reason was given for the disapproval:
{REASON}
-
-{EMAIL_SIG} \ No newline at end of file
+{EMAIL_SIG}
diff --git a/phpBB/language/en/email/post_in_queue.txt b/phpBB/language/en/email/post_in_queue.txt
new file mode 100644
index 0000000000..941f070d37
--- /dev/null
+++ b/phpBB/language/en/email/post_in_queue.txt
@@ -0,0 +1,13 @@
+Subject: Post moderation notification - "{TOPIC_TITLE}"
+
+Hello {USERNAME},
+
+You are receiving this notification because the post "{POST_SUBJECT}" at "{SITENAME}" needs approval.
+
+If you want to view the post, click the following link:
+{U_VIEW_POST}
+
+If you want to view the topic, click the following link:
+{U_TOPIC}
+
+{EMAIL_SIG}
diff --git a/phpBB/language/en/email/privmsg_notify.txt b/phpBB/language/en/email/privmsg_notify.txt
index d3a86cc73c..41fdbb782c 100644
--- a/phpBB/language/en/email/privmsg_notify.txt
+++ b/phpBB/language/en/email/privmsg_notify.txt
@@ -12,4 +12,4 @@ You can view your new message by clicking on the following link:
You have requested that you be notified on this event, remember that you can always choose not to be notified of new messages by changing the appropriate setting in your profile.
-{EMAIL_SIG} \ No newline at end of file
+{EMAIL_SIG}
diff --git a/phpBB/language/en/email/profile_send_email.txt b/phpBB/language/en/email/profile_send_email.txt
index 9fb19e7eb1..3e63777c9f 100644
--- a/phpBB/language/en/email/profile_send_email.txt
+++ b/phpBB/language/en/email/profile_send_email.txt
@@ -1,11 +1,11 @@
Hello {TO_USERNAME},
-The following is an e-mail sent to you by {FROM_USERNAME} via your account on "{SITENAME}". If this message is spam, contains abusive or other comments you find offensive please contact the webmaster of the board at the following address:
+The following is an email sent to you by {FROM_USERNAME} via your account on "{SITENAME}". If this message is spam, contains abusive or other comments you find offensive please contact the webmaster of the board at the following address:
{BOARD_CONTACT}
-Include this full e-mail (particularly the headers). Please note that the reply address to this e-mail has been set to that of {FROM_USERNAME}.
+Include this full email (particularly the headers). Please note that the reply address to this email has been set to that of {FROM_USERNAME}.
Message sent to you follows
~~~~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/phpBB/language/en/email/quote.txt b/phpBB/language/en/email/quote.txt
new file mode 100644
index 0000000000..2b9525801f
--- /dev/null
+++ b/phpBB/language/en/email/quote.txt
@@ -0,0 +1,20 @@
+Subject: Topic reply notification - "{TOPIC_TITLE}"
+
+Hello {USERNAME},
+
+You are receiving this notification because "{AUTHOR_NAME}" quoted you in the topic "{TOPIC_TITLE}" at "{SITENAME}". You can use the following link to view the reply made.
+
+If you want to view the quoted post, click the following link:
+{U_VIEW_POST}
+
+If you want to view the topic, click the following link:
+{U_TOPIC}
+
+If you want to view the forum, click the following link:
+{U_FORUM}
+
+If you no longer wish to receive updates about replies quoting you, please update your notification settings here:
+
+{U_NOTIFICATION_SETTINGS}
+
+{EMAIL_SIG}
diff --git a/phpBB/language/en/email/report_closed.txt b/phpBB/language/en/email/report_closed.txt
index eb7ef22b5e..f248018f9a 100644
--- a/phpBB/language/en/email/report_closed.txt
+++ b/phpBB/language/en/email/report_closed.txt
@@ -4,5 +4,4 @@ Hello {USERNAME},
You are receiving this notification because the report you filed on the post "{POST_SUBJECT}" in "{TOPIC_TITLE}" at "{SITENAME}" was handled by a moderator or by an administrator. The report was afterwards closed. If you have further questions contact {CLOSER_NAME} with a personal message.
-
-{EMAIL_SIG} \ No newline at end of file
+{EMAIL_SIG}
diff --git a/phpBB/language/en/email/report_deleted.txt b/phpBB/language/en/email/report_deleted.txt
index 4292ca2239..9a30ea2ddd 100644
--- a/phpBB/language/en/email/report_deleted.txt
+++ b/phpBB/language/en/email/report_deleted.txt
@@ -4,5 +4,4 @@ Hello {USERNAME},
You are receiving this notification because the report you filed on the post "{POST_SUBJECT}" in "{TOPIC_TITLE}" at "{SITENAME}" was deleted by a moderator or by an administrator.
-
-{EMAIL_SIG} \ No newline at end of file
+{EMAIL_SIG}
diff --git a/phpBB/language/en/email/report_pm.txt b/phpBB/language/en/email/report_pm.txt
new file mode 100644
index 0000000000..a101a014ff
--- /dev/null
+++ b/phpBB/language/en/email/report_pm.txt
@@ -0,0 +1,10 @@
+Subject: Private Message report - "{TOPIC_TITLE}"
+
+Hello {USERNAME},
+
+You are receiving this notification because a Private Message titled "{SUBJECT}" by "{AUTHOR_NAME}" at "{SITENAME}" was reported.
+
+If you want to view the report, click the following link:
+{U_VIEW_REPORT}
+
+{EMAIL_SIG}
diff --git a/phpBB/language/en/email/report_post.txt b/phpBB/language/en/email/report_post.txt
new file mode 100644
index 0000000000..8eb24ec6af
--- /dev/null
+++ b/phpBB/language/en/email/report_post.txt
@@ -0,0 +1,13 @@
+Subject: Post report - "{TOPIC_TITLE}"
+
+Hello {USERNAME},
+
+You are receiving this notification because the post "{POST_SUBJECT}" at "{SITENAME}" was reported.
+
+If you want to view the report, click the following link:
+{U_VIEW_REPORT}
+
+If you want to view the post, click the following link:
+{U_VIEW_POST}
+
+{EMAIL_SIG}
diff --git a/phpBB/language/en/email/short/bookmark.txt b/phpBB/language/en/email/short/bookmark.txt
new file mode 100644
index 0000000000..95f17b5693
--- /dev/null
+++ b/phpBB/language/en/email/short/bookmark.txt
@@ -0,0 +1,20 @@
+Subject: Topic reply notification - "{TOPIC_TITLE}"
+
+Hello {USERNAME},
+
+You are receiving this notification because a topic you bookmarked, "{TOPIC_TITLE}" at "{SITENAME}", has received a reply since your last visit. You can use the following link to view the replies made, no more notifications will be sent until you visit the topic.
+
+If you want to view the newest post made since your last visit, click the following link:
+{U_NEWEST_POST}
+
+If you want to view the topic, click the following link:
+{U_TOPIC}
+
+If you want to view the forum, click the following link:
+{U_FORUM}
+
+If you no longer wish to receive updates about replies to bookmarks, please update your notification settings here:
+
+{U_NOTIFICATION_SETTINGS}
+
+{EMAIL_SIG}
diff --git a/phpBB/language/en/email/short/newtopic_notify.txt b/phpBB/language/en/email/short/newtopic_notify.txt
new file mode 100644
index 0000000000..bf6799e5be
--- /dev/null
+++ b/phpBB/language/en/email/short/newtopic_notify.txt
@@ -0,0 +1,13 @@
+Subject: New topic notification - "{FORUM_NAME}"
+
+Hello {USERNAME},
+
+You are receiving this notification because you are watching the forum "{FORUM_NAME}" at "{SITENAME}". This forum has received a new topic<!-- IF AUTHOR_NAME --> by {AUTHOR_NAME}<!-- ENDIF --> since your last visit, "{TOPIC_TITLE}". You can use the following link to view the forum, no more notifications will be sent until you visit the forum.
+
+{U_FORUM}
+
+If you no longer wish to watch this forum you can either click the "Unsubscribe forum" link found in the forum above, or by clicking the following link:
+
+{U_STOP_WATCHING_FORUM}
+
+{EMAIL_SIG}
diff --git a/phpBB/language/en/email/short/post_approved.txt b/phpBB/language/en/email/short/post_approved.txt
new file mode 100644
index 0000000000..a02dba142a
--- /dev/null
+++ b/phpBB/language/en/email/short/post_approved.txt
@@ -0,0 +1,13 @@
+Subject: Post approved - "{POST_SUBJECT}"
+
+Hello {USERNAME},
+
+You are receiving this notification because your post "{POST_SUBJECT}" at "{SITENAME}" was approved by a moderator or administrator.
+
+If you want to view the post, click the following link:
+{U_VIEW_POST}
+
+If you want to view the topic, click the following link:
+{U_VIEW_TOPIC}
+
+{EMAIL_SIG} \ No newline at end of file
diff --git a/phpBB/language/en/email/short/post_disapproved.txt b/phpBB/language/en/email/short/post_disapproved.txt
new file mode 100644
index 0000000000..9b2ee643ff
--- /dev/null
+++ b/phpBB/language/en/email/short/post_disapproved.txt
@@ -0,0 +1,11 @@
+Subject: Post disapproved - "{POST_SUBJECT}"
+
+Hello {USERNAME},
+
+You are receiving this notification because your post "{POST_SUBJECT}" at "{SITENAME}" was disapproved by a moderator or administrator.
+
+The following reason was given for the disapproval:
+
+{REASON}
+
+{EMAIL_SIG}
diff --git a/phpBB/language/en/email/short/post_in_queue.txt b/phpBB/language/en/email/short/post_in_queue.txt
new file mode 100644
index 0000000000..941f070d37
--- /dev/null
+++ b/phpBB/language/en/email/short/post_in_queue.txt
@@ -0,0 +1,13 @@
+Subject: Post moderation notification - "{TOPIC_TITLE}"
+
+Hello {USERNAME},
+
+You are receiving this notification because the post "{POST_SUBJECT}" at "{SITENAME}" needs approval.
+
+If you want to view the post, click the following link:
+{U_VIEW_POST}
+
+If you want to view the topic, click the following link:
+{U_TOPIC}
+
+{EMAIL_SIG}
diff --git a/phpBB/language/en/email/short/privmsg_notify.txt b/phpBB/language/en/email/short/privmsg_notify.txt
new file mode 100644
index 0000000000..41fdbb782c
--- /dev/null
+++ b/phpBB/language/en/email/short/privmsg_notify.txt
@@ -0,0 +1,15 @@
+Subject: New private message has arrived
+
+Hello {USERNAME},
+
+You have received a new private message from "{AUTHOR_NAME}" to your account on "{SITENAME}" with the following subject:
+
+{SUBJECT}
+
+You can view your new message by clicking on the following link:
+
+{U_VIEW_MESSAGE}
+
+You have requested that you be notified on this event, remember that you can always choose not to be notified of new messages by changing the appropriate setting in your profile.
+
+{EMAIL_SIG}
diff --git a/phpBB/language/en/email/short/quote.txt b/phpBB/language/en/email/short/quote.txt
new file mode 100644
index 0000000000..2b9525801f
--- /dev/null
+++ b/phpBB/language/en/email/short/quote.txt
@@ -0,0 +1,20 @@
+Subject: Topic reply notification - "{TOPIC_TITLE}"
+
+Hello {USERNAME},
+
+You are receiving this notification because "{AUTHOR_NAME}" quoted you in the topic "{TOPIC_TITLE}" at "{SITENAME}". You can use the following link to view the reply made.
+
+If you want to view the quoted post, click the following link:
+{U_VIEW_POST}
+
+If you want to view the topic, click the following link:
+{U_TOPIC}
+
+If you want to view the forum, click the following link:
+{U_FORUM}
+
+If you no longer wish to receive updates about replies quoting you, please update your notification settings here:
+
+{U_NOTIFICATION_SETTINGS}
+
+{EMAIL_SIG}
diff --git a/phpBB/language/en/email/short/report_pm.txt b/phpBB/language/en/email/short/report_pm.txt
new file mode 100644
index 0000000000..a101a014ff
--- /dev/null
+++ b/phpBB/language/en/email/short/report_pm.txt
@@ -0,0 +1,10 @@
+Subject: Private Message report - "{TOPIC_TITLE}"
+
+Hello {USERNAME},
+
+You are receiving this notification because a Private Message titled "{SUBJECT}" by "{AUTHOR_NAME}" at "{SITENAME}" was reported.
+
+If you want to view the report, click the following link:
+{U_VIEW_REPORT}
+
+{EMAIL_SIG}
diff --git a/phpBB/language/en/email/short/report_post.txt b/phpBB/language/en/email/short/report_post.txt
new file mode 100644
index 0000000000..8eb24ec6af
--- /dev/null
+++ b/phpBB/language/en/email/short/report_post.txt
@@ -0,0 +1,13 @@
+Subject: Post report - "{TOPIC_TITLE}"
+
+Hello {USERNAME},
+
+You are receiving this notification because the post "{POST_SUBJECT}" at "{SITENAME}" was reported.
+
+If you want to view the report, click the following link:
+{U_VIEW_REPORT}
+
+If you want to view the post, click the following link:
+{U_VIEW_POST}
+
+{EMAIL_SIG}
diff --git a/phpBB/language/en/email/short/topic_approved.txt b/phpBB/language/en/email/short/topic_approved.txt
new file mode 100644
index 0000000000..60c7ef4c09
--- /dev/null
+++ b/phpBB/language/en/email/short/topic_approved.txt
@@ -0,0 +1,10 @@
+Subject: Topic approved - "{TOPIC_TITLE}"
+
+Hello {USERNAME},
+
+You are receiving this notification because your topic "{TOPIC_TITLE}" at "{SITENAME}" was approved by a moderator or administrator.
+
+If you want to view the topic, click the following link:
+{U_VIEW_TOPIC}
+
+{EMAIL_SIG}
diff --git a/phpBB/language/en/email/short/topic_disapproved.txt b/phpBB/language/en/email/short/topic_disapproved.txt
new file mode 100644
index 0000000000..9c821e2bba
--- /dev/null
+++ b/phpBB/language/en/email/short/topic_disapproved.txt
@@ -0,0 +1,11 @@
+Subject: Topic disapproved - "{TOPIC_TITLE}"
+
+Hello {USERNAME},
+
+You are receiving this notification because your topic "{TOPIC_TITLE}" at "{SITENAME}" was disapproved by a moderator or administrator.
+
+The following reason was given for the disapproval:
+
+{REASON}
+
+{EMAIL_SIG}
diff --git a/phpBB/language/en/email/short/topic_in_queue.txt b/phpBB/language/en/email/short/topic_in_queue.txt
new file mode 100644
index 0000000000..706dddf64f
--- /dev/null
+++ b/phpBB/language/en/email/short/topic_in_queue.txt
@@ -0,0 +1,13 @@
+Subject: Topic moderation notification - "{TOPIC_TITLE}"
+
+Hello {USERNAME},
+
+You are receiving this notification because the topic "{TOPIC_TITLE}" at "{SITENAME}" needs approval.
+
+If you want to view the topic, click the following link:
+{U_VIEW_TOPIC}
+
+If you want to view the forum, click the following link:
+{U_FORUM}
+
+{EMAIL_SIG}
diff --git a/phpBB/language/en/email/short/topic_notify.txt b/phpBB/language/en/email/short/topic_notify.txt
new file mode 100644
index 0000000000..472375fb22
--- /dev/null
+++ b/phpBB/language/en/email/short/topic_notify.txt
@@ -0,0 +1,20 @@
+Subject: Topic reply notification - "{TOPIC_TITLE}"
+
+Hello {USERNAME},
+
+You are receiving this notification because you are watching the topic "{TOPIC_TITLE}" at "{SITENAME}". This topic has received a reply<!-- IF AUTHOR_NAME --> by {AUTHOR_NAME}<!-- ENDIF --> since your last visit. You can use the following link to view the replies made, no more notifications will be sent until you visit the topic.
+
+If you want to view the newest post made since your last visit, click the following link:
+{U_NEWEST_POST}
+
+If you want to view the topic, click the following link:
+{U_TOPIC}
+
+If you want to view the forum, click the following link:
+{U_FORUM}
+
+If you no longer wish to watch this topic you can either click the "Unsubscribe topic" link found at the bottom of the topic above, or by clicking the following link:
+
+{U_STOP_WATCHING_TOPIC}
+
+{EMAIL_SIG}
diff --git a/phpBB/language/en/email/topic_approved.txt b/phpBB/language/en/email/topic_approved.txt
index ffda378d30..60c7ef4c09 100644
--- a/phpBB/language/en/email/topic_approved.txt
+++ b/phpBB/language/en/email/topic_approved.txt
@@ -7,5 +7,4 @@ You are receiving this notification because your topic "{TOPIC_TITLE}" at "{SITE
If you want to view the topic, click the following link:
{U_VIEW_TOPIC}
-
-{EMAIL_SIG} \ No newline at end of file
+{EMAIL_SIG}
diff --git a/phpBB/language/en/email/topic_disapproved.txt b/phpBB/language/en/email/topic_disapproved.txt
index 49ef58bf39..9c821e2bba 100644
--- a/phpBB/language/en/email/topic_disapproved.txt
+++ b/phpBB/language/en/email/topic_disapproved.txt
@@ -8,5 +8,4 @@ The following reason was given for the disapproval:
{REASON}
-
-{EMAIL_SIG} \ No newline at end of file
+{EMAIL_SIG}
diff --git a/phpBB/language/en/email/topic_in_queue.txt b/phpBB/language/en/email/topic_in_queue.txt
new file mode 100644
index 0000000000..706dddf64f
--- /dev/null
+++ b/phpBB/language/en/email/topic_in_queue.txt
@@ -0,0 +1,13 @@
+Subject: Topic moderation notification - "{TOPIC_TITLE}"
+
+Hello {USERNAME},
+
+You are receiving this notification because the topic "{TOPIC_TITLE}" at "{SITENAME}" needs approval.
+
+If you want to view the topic, click the following link:
+{U_VIEW_TOPIC}
+
+If you want to view the forum, click the following link:
+{U_FORUM}
+
+{EMAIL_SIG}
diff --git a/phpBB/language/en/email/topic_notify.txt b/phpBB/language/en/email/topic_notify.txt
index f52ce9395d..d5272d7416 100644
--- a/phpBB/language/en/email/topic_notify.txt
+++ b/phpBB/language/en/email/topic_notify.txt
@@ -16,4 +16,4 @@ If you want to view the forum, click the following link:
If you no longer wish to watch this topic you can either click the "Unsubscribe topic" link found at the bottom of the topic above, or by clicking the following link:
{U_STOP_WATCHING_TOPIC}
-{EMAIL_SIG} \ No newline at end of file
+{EMAIL_SIG}
diff --git a/phpBB/language/en/email/user_reactivate_account.txt b/phpBB/language/en/email/user_reactivate_account.txt
index 4ef7dd899a..385c09f4c5 100644
--- a/phpBB/language/en/email/user_reactivate_account.txt
+++ b/phpBB/language/en/email/user_reactivate_account.txt
@@ -3,7 +3,7 @@ Subject: Reactivate your account on "{SITENAME}"
A board administrator requested that your account be reactivated. Your account is currently inactive.
Please follow the steps listed here to reactivate your account.
-Please keep this e-mail for your records. Your account information is as follows:
+Please keep this email for your records. Your account information is as follows:
----------------------------
Username: {USERNAME}
@@ -15,5 +15,4 @@ Please visit the following link to reactivate your account:
{U_ACTIVATE}
-
{EMAIL_SIG} \ No newline at end of file
diff --git a/phpBB/language/en/email/user_resend_inactive.txt b/phpBB/language/en/email/user_resend_inactive.txt
index 4638d6df63..b9b95ce9e5 100644
--- a/phpBB/language/en/email/user_resend_inactive.txt
+++ b/phpBB/language/en/email/user_resend_inactive.txt
@@ -2,7 +2,7 @@ Subject: Welcome to "{SITENAME}"
{WELCOME_MSG}
-Please keep this e-mail for your records. Your account information is as follows:
+Please keep this email for your records. Your account information is as follows:
----------------------------
Username: {USERNAME}
@@ -14,7 +14,6 @@ Please visit the following link in order to activate your account:
{U_ACTIVATE}
-
Thank you for registering.
{EMAIL_SIG} \ No newline at end of file
diff --git a/phpBB/language/en/email/user_welcome.txt b/phpBB/language/en/email/user_welcome.txt
index 2648769dfd..aaead86afc 100644
--- a/phpBB/language/en/email/user_welcome.txt
+++ b/phpBB/language/en/email/user_welcome.txt
@@ -2,7 +2,7 @@ Subject: Welcome to "{SITENAME}"
{WELCOME_MSG}
-Please keep this e-mail for your records. Your account information is as follows:
+Please keep this email for your records. Your account information is as follows:
----------------------------
Username: {USERNAME}
diff --git a/phpBB/language/en/email/user_welcome_inactive.txt b/phpBB/language/en/email/user_welcome_inactive.txt
index 1b72b1c5a8..5cbb3af3de 100644
--- a/phpBB/language/en/email/user_welcome_inactive.txt
+++ b/phpBB/language/en/email/user_welcome_inactive.txt
@@ -2,7 +2,7 @@ Subject: Welcome to "{SITENAME}"
{WELCOME_MSG}
-Please keep this e-mail for your records. Your account information is as follows:
+Please keep this email for your records. Your account information is as follows:
----------------------------
Username: {USERNAME}
diff --git a/phpBB/language/en/groups.php b/phpBB/language/en/groups.php
index 9f72d4070f..6155d34a8c 100644
--- a/phpBB/language/en/groups.php
+++ b/phpBB/language/en/groups.php
@@ -4,9 +4,8 @@
* groups [English]
*
* @package language
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -92,5 +91,3 @@ $lang = array_merge($lang, array(
'USER_GROUP_DEMOTE_CONFIRM' => 'Are you sure you want to demote as group leader from the selected group?',
'USER_GROUP_DEMOTED' => 'Successfully demoted your leadership.',
));
-
-?> \ No newline at end of file
diff --git a/phpBB/language/en/help_bbcode.php b/phpBB/language/en/help_bbcode.php
index df5f950e3e..e0cda9df04 100644
--- a/phpBB/language/en/help_bbcode.php
+++ b/phpBB/language/en/help_bbcode.php
@@ -4,9 +4,8 @@
* help_bbcode [English]
*
* @package language
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -89,7 +88,7 @@ $help = array(
),
array(
0 => 'Linking to another site',
- 1 => 'phpBB BBCode supports a number of ways of creating URIs (Uniform Resource Indicators) better known as URLs.<ul><li>The first of these uses the <strong>[url=][/url]</strong> tag, whatever you type after the = sign will cause the contents of that tag to act as a URL. For example to link to phpBB.com you could use:<br /><br /><strong>[url=http://www.phpbb.com/]</strong>Visit phpBB!<strong>[/url]</strong><br /><br />This would generate the following link, <a href="http://www.phpbb.com/">Visit phpBB!</a> Please notice that the link opens in the same window or a new window depending on the users browser preferences.</li><li>If you want the URL itself displayed as the link you can do this by simply using:<br /><br /><strong>[url]</strong>http://www.phpbb.com/<strong>[/url]</strong><br /><br />This would generate the following link, <a href="http://www.phpbb.com/">http://www.phpbb.com/</a></li><li>Additionally, phpBB features something called <i>Magic Links</i>, this will turn any syntactically correct URL into a link without you needing to specify any tags or even the leading http://. For example typing www.phpbb.com into your message will automatically lead to <a href="http://www.phpbb.com/">www.phpbb.com</a> being output when you view the message.</li><li>The same thing applies equally to e-mail addresses, you can either specify an address explicitly for example:<br /><br /><strong>[email]</strong>no.one@domain.adr<strong>[/email]</strong><br /><br />which will output <a href="mailto:no.one@domain.adr">no.one@domain.adr</a> or you can just type no.one@domain.adr into your message and it will be automatically converted when you view.</li></ul>As with all the BBCode tags you can wrap URLs around any of the other tags such as <strong>[img][/img]</strong> (see next entry), <strong>[b][/b]</strong>, etc. As with the formatting tags it is up to you to ensure the correct open and close order is following, for example:<br /><br /><strong>[url=http://www.google.com/][img]</strong>http://www.google.com/intl/en_ALL/images/logo.gif<strong>[/url][/img]</strong><br /><br />is <span style="text-decoration: underline">not</span> correct which may lead to your post being deleted so take care.'
+ 1 => 'phpBB BBCode supports a number of ways of creating URIs (Uniform Resource Indicators) better known as URLs.<ul><li>The first of these uses the <strong>[url=][/url]</strong> tag, whatever you type after the = sign will cause the contents of that tag to act as a URL. For example to link to phpBB.com you could use:<br /><br /><strong>[url=http://www.phpbb.com/]</strong>Visit phpBB!<strong>[/url]</strong><br /><br />This would generate the following link, <a href="http://www.phpbb.com/">Visit phpBB!</a> Please notice that the link opens in the same window or a new window depending on the users browser preferences.</li><li>If you want the URL itself displayed as the link you can do this by simply using:<br /><br /><strong>[url]</strong>http://www.phpbb.com/<strong>[/url]</strong><br /><br />This would generate the following link, <a href="http://www.phpbb.com/">http://www.phpbb.com/</a></li><li>Additionally, phpBB features something called <i>Magic Links</i>, this will turn any syntactically correct URL into a link without you needing to specify any tags or even the leading http://. For example typing www.phpbb.com into your message will automatically lead to <a href="http://www.phpbb.com/">www.phpbb.com</a> being output when you view the message.</li><li>The same thing applies equally to email addresses, you can either specify an address explicitly for example:<br /><br /><strong>[email]</strong>no.one@domain.adr<strong>[/email]</strong><br /><br />which will output <a href="mailto:no.one@domain.adr">no.one@domain.adr</a> or you can just type no.one@domain.adr into your message and it will be automatically converted when you view.</li></ul>As with all the BBCode tags you can wrap URLs around any of the other tags such as <strong>[img][/img]</strong> (see next entry), <strong>[b][/b]</strong>, etc. As with the formatting tags it is up to you to ensure the correct open and close order is following, for example:<br /><br /><strong>[url=http://www.google.com/][img]</strong>http://www.google.com/intl/en_ALL/images/logo.gif<strong>[/url][/img]</strong><br /><br />is <span style="text-decoration: underline">not</span> correct which may lead to your post being deleted so take care.'
),
array(
0 => '--',
@@ -112,5 +111,3 @@ $help = array(
1 => 'If you are an administrator on this board and have the proper permissions, you can add further BBCodes through the Custom BBCodes section.'
)
);
-
-?> \ No newline at end of file
diff --git a/phpBB/language/en/help_faq.php b/phpBB/language/en/help_faq.php
index b68336e0f7..94e6622685 100644
--- a/phpBB/language/en/help_faq.php
+++ b/phpBB/language/en/help_faq.php
@@ -4,9 +4,8 @@
* help_faq [English]
*
* @package language
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -44,7 +43,7 @@ $help = array(
),
array(
0 => 'Why do I get logged off automatically?',
- 1 => 'If you do not check the <em>Log me in automatically</em> box when you login, the board will only keep you logged in for a preset time. This prevents misuse of your account by anyone else. To stay logged in, check the box during login. This is not recommended if you access the board from a shared computer, e.g. library, internet cafe, university computer lab, etc. If you do not see this checkbox, it means the board administrator has disabled this feature.'
+ 1 => 'If you do not check the <em>Remember me</em> box when you login, the board will only keep you logged in for a preset time. This prevents misuse of your account by anyone else. To stay logged in, check the box during login. This is not recommended if you access the board from a shared computer, e.g. library, internet cafe, university computer lab, etc. If you do not see this checkbox, it means the board administrator has disabled this feature.'
),
array(
0 => 'How do I prevent my username appearing in the online user listings?',
@@ -56,7 +55,7 @@ $help = array(
),
array(
0 => 'I registered but cannot login!',
- 1 => 'First, check your username and password. If they are correct, then one of two things may have happened. If COPPA support is enabled and you specified being under 13 years old during registration, you will have to follow the instructions you received. Some boards will also require new registrations to be activated, either by yourself or by an administrator before you can logon; this information was present during registration. If you were sent an e-mail, follow the instructions. If you did not receive an e-mail, you may have provided an incorrect e-mail address or the e-mail may have been picked up by a spam filer. If you are sure the e-mail address you provided is correct, try contacting an administrator.'
+ 1 => 'First, check your username and password. If they are correct, then one of two things may have happened. If COPPA support is enabled and you specified being under 13 years old during registration, you will have to follow the instructions you received. Some boards will also require new registrations to be activated, either by yourself or by an administrator before you can logon; this information was present during registration. If you were sent an email, follow the instructions. If you did not receive an email, you may have provided an incorrect email address or the email may have been picked up by a spam filer. If you are sure the email address you provided is correct, try contacting an administrator.'
),
array(
0 => 'I registered in the past but cannot login any more?!',
@@ -88,7 +87,7 @@ $help = array(
),
array(
0 => 'I changed the timezone and the time is still wrong!',
- 1 => 'If you are sure you have set the timezone and Summer Time/DST correctly and the time is still incorrect, then the time stored on the server clock is incorrect. Please notify an administrator to correct the problem.'
+ 1 => 'If you are sure you have set the timezone correctly and the time is still incorrect, then the time stored on the server clock is incorrect. Please notify an administrator to correct the problem.'
),
array(
0 => 'My language is not in the list!',
@@ -103,8 +102,8 @@ $help = array(
1 => 'Ranks, which appear below your username, indicate the number of posts you have made or identify certain users, e.g. moderators and administrators. In general, you cannot directly change the wording of any board ranks as they are set by the board administrator. Please do not abuse the board by posting unnecessarily just to increase your rank. Most boards will not tolerate this and the moderator or administrator will simply lower your post count.'
),
array(
- 0 => 'When I click the e-mail link for a user it asks me to login?',
- 1 => 'Only registered users can send e-mail to other users via the built-in e-mail form, and only if the administrator has enabled this feature. This is to prevent malicious use of the e-mail system by anonymous users.'
+ 0 => 'When I click the email link for a user it asks me to login?',
+ 1 => 'Only registered users can send email to other users via the built-in email form, and only if the administrator has enabled this feature. This is to prevent malicious use of the email system by anonymous users.'
),
array(
0 => '--',
@@ -256,8 +255,8 @@ $help = array(
1 => 'You can block a user from sending you private messages by using message rules within your User Control Panel. If you are receiving abusive private messages from a particular user, inform a board administrator; they have the power to prevent a user from sending private messages.'
),
array(
- 0 => 'I have received a spamming or abusive e-mail from someone on this board!',
- 1 => 'We are sorry to hear that. The e-mail form feature of this board includes safeguards to try and track users who send such posts, so e-mail the board administrator with a full copy of the e-mail you received. It is very important that this includes the headers that contain the details of the user that sent the e-mail. The board administrator can then take action.'
+ 0 => 'I have received a spamming or abusive email from someone on this board!',
+ 1 => 'We are sorry to hear that. The email form feature of this board includes safeguards to try and track users who send such posts, so email the board administrator with a full copy of the email you received. It is very important that this includes the headers that contain the details of the user that sent the email. The board administrator can then take action.'
),
array(
0 => '--',
@@ -337,8 +336,6 @@ $help = array(
),
array(
0 => 'Who do I contact about abusive and/or legal matters related to this board?',
- 1 => 'Any of the administrators listed on the “The team” page should be an appropriate point of contact for your complaints. If this still gets no response then you should contact the owner of the domain (do a <a href="http://www.google.com/search?q=whois">whois lookup</a>) or, if this is running on a free service (e.g. Yahoo!, free.fr, f2s.com, etc.), the management or abuse department of that service. Please note that the phpBB Group has <strong>absolutely no jurisdiction</strong> and cannot in any way be held liable over how, where or by whom this board is used. Do not contact the phpBB Group in relation to any legal (cease and desist, liable, defamatory comment, etc.) matter <strong>not directly related</strong> to the phpBB.com website or the discrete software of phpBB itself. If you do e-mail phpBB Group <strong>about any third party</strong> use of this software then you should expect a terse response or no response at all.'
+ 1 => 'Any of the administrators listed on the “The team” page should be an appropriate point of contact for your complaints. If this still gets no response then you should contact the owner of the domain (do a <a href="http://www.google.com/search?q=whois">whois lookup</a>) or, if this is running on a free service (e.g. Yahoo!, free.fr, f2s.com, etc.), the management or abuse department of that service. Please note that the phpBB Group has <strong>absolutely no jurisdiction</strong> and cannot in any way be held liable over how, where or by whom this board is used. Do not contact the phpBB Group in relation to any legal (cease and desist, liable, defamatory comment, etc.) matter <strong>not directly related</strong> to the phpBB.com website or the discrete software of phpBB itself. If you do email phpBB Group <strong>about any third party</strong> use of this software then you should expect a terse response or no response at all.'
)
);
-
-?> \ No newline at end of file
diff --git a/phpBB/language/en/install.php b/phpBB/language/en/install.php
index 5055ac6a20..081361f661 100644
--- a/phpBB/language/en/install.php
+++ b/phpBB/language/en/install.php
@@ -4,9 +4,8 @@
* install [English]
*
* @package language
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -73,14 +72,13 @@ $lang = array_merge($lang, array(
'CONFIG_FILE_WRITTEN' => 'The configuration file has been written. You may now proceed to the next step of the installation.',
'CONFIG_PHPBB_EMPTY' => 'The phpBB3 config variable for “%s” is empty.',
'CONFIG_RETRY' => 'Retry',
- 'CONTACT_EMAIL_CONFIRM' => 'Confirm contact e-mail',
'CONTINUE_CONVERT' => 'Continue conversion',
'CONTINUE_CONVERT_BODY' => 'A previous conversion attempt has been determined. You are now able to choose between starting a new conversion or continuing the conversion.',
'CONTINUE_LAST' => 'Continue last statements',
'CONTINUE_OLD_CONVERSION' => 'Continue previously started conversion',
'CONVERT' => 'Convert',
'CONVERT_COMPLETE' => 'Conversion completed',
- 'CONVERT_COMPLETE_EXPLAIN' => 'You have now successfully converted your board to phpBB 3.0. You can now login and <a href="../">access your board</a>. Please ensure that the settings were transferred correctly before enabling your board by deleting the install directory. Remember that help on using phpBB is available online via the <a href="https://www.phpbb.com/support/documentation/3.0/">Documentation</a> and the <a href="https://www.phpbb.com/community/viewforum.php?f=46">support forums</a>.',
+ 'CONVERT_COMPLETE_EXPLAIN' => 'You have now successfully converted your board to phpBB 3.1. You can now login and <a href="../">access your board</a>. Please ensure that the settings were transferred correctly before enabling your board by deleting the install directory. Remember that help on using phpBB is available online via the <a href="https://www.phpbb.com/support/documentation/3.0/">Documentation</a> and the <a href="https://www.phpbb.com/community/viewforum.php?f=46">support forums</a>.',
'CONVERT_INTRO' => 'Welcome to the phpBB Unified Convertor Framework',
'CONVERT_INTRO_BODY' => 'From here, you are able to import data from other (installed) board systems. The list below shows all the conversion modules currently available. If there is no convertor shown in this list for the board software you wish to convert from, please check our website where further conversion modules may be available for download.',
'CONVERT_NEW_CONVERSION' => 'New conversion',
@@ -157,7 +155,7 @@ $lang = array_merge($lang, array(
'DLL_XML' => 'XML support [ Jabber ]',
'DLL_ZLIB' => 'zlib compression support [ gz, .tar.gz, .zip ]',
'DL_CONFIG' => 'Download config',
- 'DL_CONFIG_EXPLAIN' => 'You may download the complete config.php to your own PC. You will then need to upload the file manually, replacing any existing config.php in your phpBB 3.0 root directory. Please remember to upload the file in ASCII format (see your FTP application documentation if you are unsure how to achieve this). When you have uploaded the config.php please click “Done” to move to the next stage.',
+ 'DL_CONFIG_EXPLAIN' => 'You may download the complete config.php to your own PC. You will then need to upload the file manually, replacing any existing config.php in your phpBB 3.1 root directory. Please remember to upload the file in ASCII format (see your FTP application documentation if you are unsure how to achieve this). When you have uploaded the config.php please click “Done” to move to the next stage.',
'DL_DOWNLOAD' => 'Download',
'DONE' => 'Done',
@@ -212,7 +210,7 @@ $lang = array_merge($lang, array(
<p>phpBB3 supports the following databases:</p>
<ul>
<li>MySQL 3.23 or above (MySQLi supported)</li>
- <li>PostgreSQL 7.3+</li>
+ <li>PostgreSQL 8.3+</li>
<li>SQLite 2.8.2+</li>
<li>Firebird 2.1+</li>
<li>MS SQL Server 2000 or above (directly or via ODBC)</li>
@@ -242,8 +240,8 @@ $lang = array_merge($lang, array(
'INST_ERR_DB_NO_FIREBIRD_PS'=> 'The database you selected for Firebird has a page size less than 8192, it must be at least 8192.',
'INST_ERR_DB_NO_POSTGRES' => 'The database you have selected was not created in <var>UNICODE</var> or <var>UTF8</var> encoding. Try installing with a database in <var>UNICODE</var> or <var>UTF8</var> encoding.',
'INST_ERR_DB_NO_NAME' => 'No database name specified.',
- 'INST_ERR_EMAIL_INVALID' => 'The e-mail address you entered is invalid.',
- 'INST_ERR_EMAIL_MISMATCH' => 'The e-mails you entered did not match.',
+ 'INST_ERR_EMAIL_INVALID' => 'The email address you entered is invalid.',
+ 'INST_ERR_EMAIL_MISMATCH' => 'The emails you entered did not match.',
'INST_ERR_FATAL' => 'Fatal installation error',
'INST_ERR_FATAL_DB' => 'A fatal and unrecoverable database error has occurred. This may be because the specified user does not have appropriate permissions to <code>CREATE TABLES</code> or <code>INSERT</code> data, etc. Further information may be given below. Please contact your hosting provider in the first instance or the support forums of phpBB for further assistance.',
'INST_ERR_FTP_PATH' => 'Could not change to the given directory, please check the path.',
@@ -294,6 +292,8 @@ $lang = array_merge($lang, array(
'PCRE_UTF_SUPPORT_EXPLAIN' => 'phpBB will <strong>not</strong> run if your PHP installation is not compiled with UTF-8 support in the PCRE extension.',
'PHP_GETIMAGESIZE_SUPPORT' => 'PHP function getimagesize() is available',
'PHP_GETIMAGESIZE_SUPPORT_EXPLAIN' => '<strong>Required</strong> - In order for phpBB to function correctly, the getimagesize function needs to be available.',
+ 'PHP_JSON_SUPPORT' => 'PHP JSON support',
+ 'PHP_JSON_SUPPORT_EXPLAIN' => '<strong>Required</strong> - In order for phpBB to function correctly, the PHP JSON extension needs to be available.',
'PHP_OPTIONAL_MODULE' => 'Optional modules',
'PHP_OPTIONAL_MODULE_EXPLAIN' => '<strong>Optional</strong> - These modules or applications are optional. However, if they are available they will enable extra features.',
'PHP_SUPPORTED_DB' => 'Supported databases',
@@ -302,10 +302,10 @@ $lang = array_merge($lang, array(
'PHP_REGISTER_GLOBALS_EXPLAIN' => 'phpBB will still run if this setting is enabled, but if possible, it is recommended that register_globals is disabled on your PHP install for security reasons.',
'PHP_SAFE_MODE' => 'Safe mode',
'PHP_SETTINGS' => 'PHP version and settings',
- 'PHP_SETTINGS_EXPLAIN' => '<strong>Required</strong> - You must be running at least version 4.3.3 of PHP in order to install phpBB. If <var>safe mode</var> is displayed below your PHP installation is running in that mode. This will impose limitations on remote administration and similar features.',
+ 'PHP_SETTINGS_EXPLAIN' => '<strong>Required</strong> - You must be running at least version 5.3.3 of PHP in order to install phpBB. If <var>safe mode</var> is displayed below your PHP installation is running in that mode. This will impose limitations on remote administration and similar features.',
'PHP_URL_FOPEN_SUPPORT' => 'PHP setting <var>allow_url_fopen</var> is enabled',
'PHP_URL_FOPEN_SUPPORT_EXPLAIN' => '<strong>Optional</strong> - This setting is optional, however certain phpBB functions like off-site avatars will not work properly without it.',
- 'PHP_VERSION_REQD' => 'PHP version >= 4.3.3',
+ 'PHP_VERSION_REQD' => 'PHP version >= 5.3.3',
'POST_ID' => 'Post ID',
'PREFIX_FOUND' => 'A scan of your tables has shown a valid installation using <strong>%s</strong> as table prefix.',
'PREPROCESS_STEP' => 'Executing pre-processing functions/queries',
@@ -325,6 +325,7 @@ $lang = array_merge($lang, array(
'SERVER_CONFIG' => 'Server configuration',
'SEARCH_INDEX_UNCONVERTED' => 'Search index was not converted',
'SEARCH_INDEX_UNCONVERTED_EXPLAIN' => 'Your old search index was not converted. Searching will always yield an empty result. To create a new search index go to the Administration Control Panel, select Maintenance and then choose Search index from the submenu.',
+ 'SELECT_FORUM_GA' => 'In phpBB 3.1 the global announcements are linked to forums. Select a forum for your current global announcements (can be moved later):',
'SOFTWARE' => 'Board software',
'SPECIFY_OPTIONS' => 'Specify conversion options',
'STAGE_ADMINISTRATOR' => 'Administrator details',
@@ -332,7 +333,7 @@ $lang = array_merge($lang, array(
'STAGE_ADVANCED_EXPLAIN' => 'The settings on this page are only necessary to set if you know that you require something different from the default. If you are unsure, just proceed to the next page, as these settings can be altered from the Administration Control Panel later.',
'STAGE_CONFIG_FILE' => 'Configuration file',
'STAGE_CREATE_TABLE' => 'Create database tables',
- 'STAGE_CREATE_TABLE_EXPLAIN' => 'The database tables used by phpBB 3.0 have been created and populated with some initial data. Proceed to the next screen to finish installing phpBB.',
+ 'STAGE_CREATE_TABLE_EXPLAIN' => 'The database tables used by phpBB 3.1 have been created and populated with some initial data. Proceed to the next screen to finish installing phpBB.',
'STAGE_DATABASE' => 'Database settings',
'STAGE_FINAL' => 'Final stage',
'STAGE_INTRO' => 'Introduction',
@@ -345,7 +346,7 @@ $lang = array_merge($lang, array(
'SUB_LICENSE' => 'License',
'SUB_SUPPORT' => 'Support',
'SUCCESSFUL_CONNECT' => 'Successful connection',
- 'SUPPORT_BODY' => 'Full support will be provided for the current stable release of phpBB3, free of charge. This includes:</p><ul><li>installation</li><li>configuration</li><li>technical questions</li><li>problems relating to potential bugs in the software</li><li>updating from Release Candidate (RC) versions to the latest stable version</li><li>converting from phpBB 2.0.x to phpBB3</li><li>converting from other discussion board software to phpBB3 (please see the <a href="https://www.phpbb.com/community/viewforum.php?f=65">Convertors Forum</a>)</li></ul><p>We encourage users still running beta versions of phpBB3 to replace their installation with a fresh copy of the latest version.</p><h2>MODs / Styles</h2><p>For issues relating to MODs, please post in the appropriate <a href="https://www.phpbb.com/community/viewforum.php?f=81">Modifications Forum</a>.<br />For issues relating to styles, templates and imagesets, please post in the appropriate <a href="https://www.phpbb.com/community/viewforum.php?f=80">Styles Forum</a>.<br /><br />If your question relates to a specific package, please post directly in the topic dedicated to the package.</p><h2>Obtaining Support</h2><p><a href="https://www.phpbb.com/community/viewtopic.php?f=14&amp;t=571070">The phpBB Welcome Package</a><br /><a href="https://www.phpbb.com/support/">Support Section</a><br /><a href="https://www.phpbb.com/support/documentation/3.0/quickstart/">Quick Start Guide</a><br /><br />To ensure you stay up to date with the latest news and releases, why not <a href="https://www.phpbb.com/support/">subscribe to our mailing list</a>?<br /><br />',
+ 'SUPPORT_BODY' => 'Full support will be provided for the current stable release of phpBB3, free of charge. This includes:</p><ul><li>installation</li><li>configuration</li><li>technical questions</li><li>problems relating to potential bugs in the software</li><li>updating from Release Candidate (RC) versions to the latest stable version</li><li>converting from phpBB 2.0.x to phpBB3</li><li>converting from other discussion board software to phpBB3 (please see the <a href="https://www.phpbb.com/community/viewforum.php?f=65">Convertors Forum</a>)</li></ul><p>We encourage users still running beta versions of phpBB3 to replace their installation with a fresh copy of the latest version.</p><h2>MODs / Styles</h2><p>For issues relating to MODs, please post in the appropriate <a href="https://www.phpbb.com/community/viewforum.php?f=81">Modifications Forum</a>.<br />For issues relating to styles, templates and themes, please post in the appropriate <a href="https://www.phpbb.com/community/viewforum.php?f=80">Styles Forum</a>.<br /><br />If your question relates to a specific package, please post directly in the topic dedicated to the package.</p><h2>Obtaining Support</h2><p><a href="https://www.phpbb.com/community/viewtopic.php?f=14&amp;t=571070">The phpBB Welcome Package</a><br /><a href="https://www.phpbb.com/support/">Support Section</a><br /><a href="https://www.phpbb.com/support/documentation/3.0/quickstart/">Quick Start Guide</a><br /><br />To ensure you stay up to date with the latest news and releases, why not <a href="https://www.phpbb.com/support/">subscribe to our mailing list</a>?<br /><br />',
'SYNC_FORUMS' => 'Starting to synchronise forums',
'SYNC_POST_COUNT' => 'Synchronising post_counts',
'SYNC_POST_COUNT_ID' => 'Synchronising post_counts from <var>entry</var> %1$s to %2$s.',
@@ -373,7 +374,7 @@ $lang = array_merge($lang, array(
// Updater
$lang = array_merge($lang, array(
- 'ALL_FILES_UP_TO_DATE' => 'All files are up to date with the latest phpBB version. You should now <a href="../ucp.php?mode=login">login to your board</a> and check if everything is working fine. Do not forget to delete, rename or move your install directory! Please send us updated information about your server and board configurations from the <a href="../ucp.php?mode=login&amp;redirect=adm/index.php%3Fi=send_statistics%26mode=send_statistics">Send statistics</a> module in your ACP.',
+ 'ALL_FILES_UP_TO_DATE' => 'All files are up to date with the latest phpBB version.',
'ARCHIVE_FILE' => 'Source file within archive',
'BACK' => 'Back',
@@ -396,7 +397,10 @@ $lang = array_merge($lang, array(
'CURRENT_VERSION' => 'Current version',
'DATABASE_TYPE' => 'Database type',
+ 'DATABASE_UPDATE_COMPLETE' => 'Database updater has completed!',
+ 'DATABASE_UPDATE_CONTINUE' => 'Continue database update',
'DATABASE_UPDATE_INFO_OLD' => 'The database update file within the install directory is outdated. Please make sure you uploaded the correct version of the file.',
+ 'DATABASE_UPDATE_NOT_COMPLETED' => 'The database update has not yet completed.',
'DELETE_USER_REMOVE' => 'Delete user and remove posts',
'DELETE_USER_RETAIN' => 'Delete user but keep posts',
'DESTINATION' => 'Destination file',
@@ -415,8 +419,9 @@ $lang = array_merge($lang, array(
'DOWNLOAD_UPDATE_METHOD' => 'Download modified files archive',
'DOWNLOAD_UPDATE_METHOD_EXPLAIN' => 'Once downloaded you should unpack the archive. You will find the modified files you need to upload to your phpBB root directory within it. Please upload the files to their respective locations then. After you have uploaded all files, please check the files again with the other button below.',
- 'ERROR' => 'Error',
'EDIT_USERNAME' => 'Edit username',
+ 'ERROR' => 'Error',
+ 'EVERYTHING_UP_TO_DATE' => 'Everything is up to date with the latest phpBB version. You should now <a href="%1$s">login to your board</a> and check if everything is working fine. Do not forget to delete, rename or move your install directory! Please send us updated information about your server and board configurations from the <a href="%2$s">Send statistics</a> module in your ACP.',
'FILE_ALREADY_UP_TO_DATE' => 'File is already up to date.',
'FILE_DIFF_NOT_ALLOWED' => 'File not allowed to be diffed.',
@@ -485,6 +490,7 @@ $lang = array_merge($lang, array(
'PREVIOUS_VERSION' => 'Previous version',
'PROGRESS' => 'Progress',
+ 'RELEASE_ANNOUNCEMENT' => 'Announcement',
'RESULT' => 'Result',
'RUN_DATABASE_SCRIPT' => 'Update my database now',
@@ -527,7 +533,7 @@ $lang = array_merge($lang, array(
<h1>Release announcement</h1>
- <p>Please read <a href="%1$s" title="%1$s"><strong>the release announcement for the latest version</strong></a> before you continue your update process, it may contain useful information. It also contains full download links as well as the change log.</p>
+ <p>Please read the release announcement for the latest version before you continue your update process, it may contain useful information. It also contains full download links as well as the change log.</p>
<br />
@@ -542,17 +548,11 @@ $lang = array_merge($lang, array(
</ul>
<p>Once uploaded your board will be offline for normal users due to the install directory you uploaded now present.<br /><br />
- <strong><a href="%2$s" title="%2$s">Now start the update process by pointing your browser to the install folder</a>.</strong><br />
+ <strong><a href="%1$s" title="%1$s">Now start the update process by pointing your browser to the install folder</a>.</strong><br />
<br />
You will then be guided through the update process. You will be notified once the update is complete.
</p>
',
- 'UPDATE_INSTRUCTIONS_INCOMPLETE' => '
-
- <h1>Incomplete update detected</h1>
-
- <p>phpBB detected an incomplete automatic update. Please make sure you followed every step within the automatic update tool. Below you will find the link again, or go directly to your install directory.</p>
- ',
'UPDATE_METHOD' => 'Update method',
'UPDATE_METHOD_EXPLAIN' => 'You are now able to choose your preferred update method. Using the FTP upload will present you with a form you need to enter your FTP account details into. With this method the files will be automatically moved to the new location and backups of the old files being created by appending .bak to the filename. If you choose to download the modified files you are able to unpack and upload them to their correct location manually later.',
'UPDATE_REQUIRES_FILE' => 'The updater requires that the following file is present: %s',
@@ -562,10 +562,10 @@ $lang = array_merge($lang, array(
'UPDATING_DATA' => 'Updating data',
'UPDATING_TO_LATEST_STABLE' => 'Updating database to latest stable release',
'UPDATED_VERSION' => 'Updated version',
- 'UPGRADE_INSTRUCTIONS' => 'A new feature release <strong>%1$s</strong> is available. Please read <a href="%2$s" title="%2$s"><strong>the release announcement</strong></a> to learn about what it has to offer, and how to upgrade.',
'UPLOAD_METHOD' => 'Upload method',
'UPDATE_DB_SUCCESS' => 'Database update was successful.',
+ 'UPDATE_FILE_SUCCESS' => 'File update was successful.',
'USER_ACTIVE' => 'Active user',
'USER_INACTIVE' => 'Inactive user',
@@ -627,5 +627,3 @@ $lang = array_merge($lang, array(
'TOPICS_TOPIC_TITLE' => 'Welcome to phpBB3',
));
-
-?> \ No newline at end of file
diff --git a/phpBB/language/en/mcp.php b/phpBB/language/en/mcp.php
index d0bcec0d9c..b75e0ea495 100644
--- a/phpBB/language/en/mcp.php
+++ b/phpBB/language/en/mcp.php
@@ -4,9 +4,8 @@
* mcp [English]
*
* @package language
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -53,6 +52,10 @@ $lang = array_merge($lang, array(
'APPROVE_POST_CONFIRM' => 'Are you sure you want to approve this post?',
'APPROVE_POSTS' => 'Approve posts',
'APPROVE_POSTS_CONFIRM' => 'Are you sure you want to approve the selected posts?',
+ 'APPROVE_TOPIC' => 'Approve topic',
+ 'APPROVE_TOPIC_CONFIRM' => 'Are you sure you want to approve this topic?',
+ 'APPROVE_TOPICS' => 'Approve topics',
+ 'APPROVE_TOPICS_CONFIRM'=> 'Are you sure you want to approve the selected topics?',
'CANNOT_MOVE_SAME_FORUM'=> 'You cannot move a topic to the forum it’s already in.',
'CANNOT_WARN_ANONYMOUS' => 'You cannot warn unregistered guest users.',
@@ -73,16 +76,12 @@ $lang = array_merge($lang, array(
'DELETE_PM_REPORTS' => 'Delete PM reports',
'DELETE_PM_REPORTS_CONFIRM' => 'Are you sure you want to delete the selected PM reports?',
'DELETE_POSTS' => 'Delete posts',
- 'DELETE_POSTS_CONFIRM' => 'Are you sure you want to delete these posts?',
- 'DELETE_POST_CONFIRM' => 'Are you sure you want to delete this post?',
'DELETE_REPORT' => 'Delete report',
'DELETE_REPORT_CONFIRM' => 'Are you sure you want to delete the selected report?',
'DELETE_REPORTS' => 'Delete reports',
'DELETE_REPORTS_CONFIRM' => 'Are you sure you want to delete the selected reports?',
'DELETE_SHADOW_TOPIC' => 'Delete shadow topic',
'DELETE_TOPICS' => 'Delete selected topics',
- 'DELETE_TOPICS_CONFIRM' => 'Are you sure you want to delete these topics?',
- 'DELETE_TOPIC_CONFIRM' => 'Are you sure you want to delete this topic?',
'DISAPPROVE' => 'Disapprove',
'DISAPPROVE_REASON' => 'Reason for disapproval',
'DISAPPROVE_POST' => 'Disapprove post',
@@ -120,8 +119,10 @@ $lang = array_merge($lang, array(
'LATEST_WARNING_TIME' => 'Latest warning issued',
'LATEST_WARNINGS' => 'Latest 5 warnings',
'LEAVE_SHADOW' => 'Leave shadow topic in place',
- 'LIST_REPORT' => '1 report',
- 'LIST_REPORTS' => '%d reports',
+ 'LIST_REPORTS' => array(
+ 1 => '%d report',
+ 2 => '%d reports',
+ ),
'LOCK' => 'Lock',
'LOCK_POST_POST' => 'Lock post',
'LOCK_POST_POST_CONFIRM' => 'Are you sure you want to prevent editing this post?',
@@ -143,7 +144,7 @@ $lang = array_merge($lang, array(
'MCP_ADD' => 'Add a warning',
'MCP_BAN' => 'Banning',
- 'MCP_BAN_EMAILS' => 'Ban e-mails',
+ 'MCP_BAN_EMAILS' => 'Ban emails',
'MCP_BAN_IPS' => 'Ban IPs',
'MCP_BAN_USERNAMES' => 'Ban Usernames',
@@ -200,6 +201,10 @@ $lang = array_merge($lang, array(
'MCP_QUEUE_UNAPPROVED_POSTS_EXPLAIN' => 'This is a list of all posts which require approving before they will be visible to users.',
'MCP_QUEUE_UNAPPROVED_TOPICS' => 'Topics awaiting approval',
'MCP_QUEUE_UNAPPROVED_TOPICS_EXPLAIN' => 'This is a list of all topics which require approving before they will be visible to users.',
+ 'MCP_QUEUE_DELETED_POSTS' => 'Deleted posts',
+ 'MCP_QUEUE_DELETED_POSTS_EXPLAIN' => 'This is a list of all soft deleted posts. You can restore or permanently delete the posts from this screen.',
+ 'MCP_QUEUE_DELETED_TOPICS' => 'Deleted topics',
+ 'MCP_QUEUE_DELETED_TOPICS_EXPLAIN' => 'This is a list of all soft deleted topics. You can restore or permanently delete the topics from this screen.',
'MCP_VIEW_USER' => 'View warnings for a specific user',
@@ -237,25 +242,32 @@ $lang = array_merge($lang, array(
'NO_POST' => 'You have to select a post in order to warn the user for a post.',
'NO_POST_REPORT' => 'This post was not reported.',
'NO_POST_SELECTED' => 'You must select at least one post to perform this action.',
+ 'NO_POSTS_DELETED' => 'There are no deleted posts.',
+ 'NO_POSTS_QUEUE' => 'There are no posts waiting for approval.',
'NO_REASON_DISAPPROVAL' => 'Please give an appropriate reason for disapproval.',
'NO_REPORT' => 'No report found',
'NO_REPORTS' => 'No reports found',
'NO_REPORT_SELECTED' => 'You must select at least one report to perform this action.',
'NO_TOPIC_ICON' => 'None',
'NO_TOPIC_SELECTED' => 'You must select at least one topic to perform this action.',
+ 'NO_TOPICS_DELETED' => 'There are no deleted topics.',
'NO_TOPICS_QUEUE' => 'There are no topics waiting for approval.',
'ONLY_TOPIC' => 'Only topic “%s”',
'OTHER_USERS' => 'Other users posting from this IP',
+ 'QUICKMOD_ACTION_NOT_ALLOWED' => "%s not allowed as quickmod",
+
'PM_REPORT_CLOSED_SUCCESS' => 'The selected PM report has been closed successfully.',
'PM_REPORT_DELETED_SUCCESS' => 'The selected PM report has been deleted successfully.',
'PM_REPORTED_SUCCESS' => 'This private message has been successfully reported.',
- 'PM_REPORT_TOTAL' => 'In total there is <strong>1</strong> PM report to review.',
'PM_REPORTS_CLOSED_SUCCESS' => 'The selected PM reports have been closed successfully.',
'PM_REPORTS_DELETED_SUCCESS'=> 'The selected PM reports have been deleted successfully.',
- 'PM_REPORTS_TOTAL' => 'In total there are <strong>%d</strong> PM reports to review.',
- 'PM_REPORTS_ZERO_TOTAL' => 'There are no PM reports to review.',
+ 'PM_REPORTS_TOTAL' => array(
+ 0 => 'There are no PM reports to review.',
+ 1 => 'In total there is <strong>1</strong> PM report to review.',
+ 2 => 'In total there are <strong>%d</strong> PM reports to review.',
+ ),
'PM_REPORT_DETAILS' => 'Private message report details',
'POSTER' => 'Poster',
'POSTS_APPROVED_SUCCESS' => 'The selected posts have been approved.',
@@ -263,15 +275,17 @@ $lang = array_merge($lang, array(
'POSTS_DISAPPROVED_SUCCESS' => 'The selected posts have been disapproved.',
'POSTS_LOCKED_SUCCESS' => 'The selected posts have been locked successfully.',
'POSTS_MERGED_SUCCESS' => 'The selected posts have been merged.',
- 'POSTS_UNLOCKED_SUCCESS' => 'The selected posts have been unlocked successfully.',
'POSTS_PER_PAGE' => 'Posts per page',
'POSTS_PER_PAGE_EXPLAIN' => '(Set to 0 to view all posts.)',
+ 'POSTS_RESTORED_SUCCESS' => 'The selected posts have been restored successfully.',
+ 'POSTS_UNLOCKED_SUCCESS' => 'The selected posts have been unlocked successfully.',
'POST_APPROVED_SUCCESS' => 'The selected post has been approved.',
'POST_DELETED_SUCCESS' => 'The selected post has been successfully removed from the database.',
'POST_DISAPPROVED_SUCCESS' => 'The selected post has been disapproved.',
'POST_LOCKED_SUCCESS' => 'Post locked successfully.',
'POST_NOT_EXIST' => 'The post you requested does not exist.',
'POST_REPORTED_SUCCESS' => 'This post has been successfully reported.',
+ 'POST_RESTORED_SUCCESS' => 'This post has been restored successfully.',
'POST_UNLOCKED_SUCCESS' => 'Post unlocked successfully.',
'READ_USERNOTES' => 'User notes',
@@ -282,8 +296,11 @@ $lang = array_merge($lang, array(
'REPORTED_ON_DATE' => 'on',
'REPORTS_CLOSED_SUCCESS' => 'The selected reports have been closed successfully.',
'REPORTS_DELETED_SUCCESS' => 'The selected reports have been deleted successfully.',
- 'REPORTS_TOTAL' => 'In total there are <strong>%d</strong> reports to review.',
- 'REPORTS_ZERO_TOTAL' => 'There are no reports to review.',
+ 'REPORTS_TOTAL' => array(
+ 0 => 'There are no reports to review.',
+ 1 => 'In total there is <strong>1</strong> report to review.',
+ 2 => 'In total there are <strong>%d</strong> reports to review.',
+ ),
'REPORT_CLOSED' => 'This report has already been closed.',
'REPORT_CLOSED_SUCCESS' => 'The selected report has been closed successfully.',
'REPORT_DELETED_SUCCESS' => 'The selected report has been deleted successfully.',
@@ -295,7 +312,15 @@ $lang = array_merge($lang, array(
'REPORT_POST_EXPLAIN' => 'Use this form to report the selected post to the forum moderators and board administrators. Reporting should generally be used only if the post breaks forum rules.',
'REPORT_REASON' => 'Report reason',
'REPORT_TIME' => 'Report time',
- 'REPORT_TOTAL' => 'In total there is <strong>1</strong> report to review.',
+ 'RESTORE' => 'Restore',
+ 'RESTORE_POST' => 'Restore post',
+ 'RESTORE_POST_CONFIRM' => 'Are you sure you want to restore this post?',
+ 'RESTORE_POSTS' => 'Restore posts',
+ 'RESTORE_POSTS_CONFIRM' => 'Are you sure you want to restore the selected posts?',
+ 'RESTORE_TOPIC' => 'Restore topic',
+ 'RESTORE_TOPIC_CONFIRM' => 'Are you sure you want to restore this topic?',
+ 'RESTORE_TOPICS' => 'Restore topics',
+ 'RESTORE_TOPICS_CONFIRM' => 'Are you sure you want to restore the selected topics?',
'RESYNC' => 'Resync',
'RETURN_MESSAGE' => '%sReturn to the message%s',
'RETURN_NEW_FORUM' => '%sGo to the new forum%s',
@@ -336,6 +361,7 @@ $lang = array_merge($lang, array(
'TOPICS_FORKED_SUCCESS' => 'The selected topics have been copied successfully.',
'TOPICS_LOCKED_SUCCESS' => 'The selected topics have been locked.',
'TOPICS_MOVED_SUCCESS' => 'The selected topics have been moved successfully.',
+ 'TOPICS_RESTORED_SUCCESS' => 'The selected topics have been restored successfully.',
'TOPICS_RESYNC_SUCCESS' => 'The selected topics have been resynchronised.',
'TOPICS_TYPE_CHANGED' => 'Topic types changed successfully.',
'TOPICS_UNLOCKED_SUCCESS' => 'The selected topics have been unlocked.',
@@ -346,6 +372,7 @@ $lang = array_merge($lang, array(
'TOPIC_LOCKED_SUCCESS' => 'The selected topic has been locked.',
'TOPIC_MOVED_SUCCESS' => 'The selected topic has been moved successfully.',
'TOPIC_NOT_EXIST' => 'The topic you selected does not exist.',
+ 'TOPIC_RESTORED_SUCCESS' => 'The selected topic has been restored successfully.',
'TOPIC_RESYNC_SUCCESS' => 'The selected topic has been resynchronised.',
'TOPIC_SPLIT_SUCCESS' => 'The selected topic has been split successfully.',
'TOPIC_TIME' => 'Topic time',
@@ -353,9 +380,11 @@ $lang = array_merge($lang, array(
'TOPIC_UNLOCKED_SUCCESS' => 'The selected topic has been unlocked.',
'TOTAL_WARNINGS' => 'Total Warnings',
- 'UNAPPROVED_POSTS_TOTAL' => 'In total there are <strong>%d</strong> posts waiting for approval.',
- 'UNAPPROVED_POSTS_ZERO_TOTAL' => 'There are no posts waiting for approval.',
- 'UNAPPROVED_POST_TOTAL' => 'In total there is <strong>1</strong> post waiting for approval.',
+ 'UNAPPROVED_POSTS_TOTAL' => array(
+ 0 => 'There are no posts waiting for approval.',
+ 1 => 'In total there is <strong>1</strong> post waiting for approval.',
+ 2 => 'In total there are <strong>%d</strong> posts waiting for approval.',
+ ),
'UNLOCK' => 'Unlock',
'UNLOCK_POST' => 'Unlock post',
'UNLOCK_POST_EXPLAIN' => 'Allow editing',
@@ -381,7 +410,7 @@ $lang = array_merge($lang, array(
'WARNING_PM_BODY' => 'The following is a warning which has been issued to you by an administrator or moderator of this site.[quote]%s[/quote]',
'WARNING_PM_SUBJECT' => 'Board warning issued',
'WARNING_POST_DEFAULT' => 'This is a warning regarding the following post made by you: %s .',
- 'WARNINGS_ZERO_TOTAL' => 'No warnings exist.',
+ 'NO_WARNINGS' => 'No warnings exist.',
'YOU_SELECTED_TOPIC' => 'You selected topic number %d: %s.',
@@ -400,5 +429,3 @@ $lang = array_merge($lang, array(
)
),
));
-
-?> \ No newline at end of file
diff --git a/phpBB/language/en/memberlist.php b/phpBB/language/en/memberlist.php
index f59efd3b95..95efe35b7d 100644
--- a/phpBB/language/en/memberlist.php
+++ b/phpBB/language/en/memberlist.php
@@ -4,9 +4,8 @@
* memberlist [English]
*
* @package language
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -47,41 +46,35 @@ $lang = array_merge($lang, array(
'BEFORE' => 'Before',
- 'CC_EMAIL' => 'Send a copy of this e-mail to yourself.',
+ 'CC_EMAIL' => 'Send a copy of this email to yourself.',
'CONTACT_USER' => 'Contact',
'DEST_LANG' => 'Language',
'DEST_LANG_EXPLAIN' => 'Select an appropriate language (if available) for the recipient of this message.',
- 'EMAIL_BODY_EXPLAIN' => 'This message will be sent as plain text, do not include any HTML or BBCode. The return address for this message will be set to your e-mail address.',
- 'EMAIL_DISABLED' => 'Sorry but all e-mail related functions have been disabled.',
- 'EMAIL_SENT' => 'The e-mail has been sent.',
- 'EMAIL_TOPIC_EXPLAIN' => 'This message will be sent as plain text, do not include any HTML or BBCode. Please note that the topic information is already included in the message. The return address for this message will be set to your e-mail address.',
- 'EMPTY_ADDRESS_EMAIL' => 'You must provide a valid e-mail address for the recipient.',
+ 'EMAIL_BODY_EXPLAIN' => 'This message will be sent as plain text, do not include any HTML or BBCode. The return address for this message will be set to your email address.',
+ 'EMAIL_DISABLED' => 'Sorry but all email related functions have been disabled.',
+ 'EMAIL_SENT' => 'The email has been sent.',
+ 'EMAIL_TOPIC_EXPLAIN' => 'This message will be sent as plain text, do not include any HTML or BBCode. Please note that the topic information is already included in the message. The return address for this message will be set to your email address.',
+ 'EMPTY_ADDRESS_EMAIL' => 'You must provide a valid email address for the recipient.',
'EMPTY_MESSAGE_EMAIL' => 'You must enter a message to be emailed.',
'EMPTY_MESSAGE_IM' => 'You must enter a message to be send.',
'EMPTY_NAME_EMAIL' => 'You must enter the real name of the recipient.',
- 'EMPTY_SUBJECT_EMAIL' => 'You must specify a subject for the e-mail.',
+ 'EMPTY_SUBJECT_EMAIL' => 'You must specify a subject for the email.',
'EQUAL_TO' => 'Equal to',
'FIND_USERNAME_EXPLAIN' => 'Use this form to search for specific members. You do not need to fill out all fields. To match partial data use * as a wildcard. When entering dates use the format <kbd>YYYY-MM-DD</kbd>, e.g. <samp>2004-02-29</samp>. Use the mark checkboxes to select one or more usernames (several usernames may be accepted depending on the form itself) and click the Select Marked button to return to the previous form.',
- 'FLOOD_EMAIL_LIMIT' => 'You cannot send another e-mail at this time. Please try again later.',
+ 'FLOOD_EMAIL_LIMIT' => 'You cannot send another email at this time. Please try again later.',
'GROUP_LEADER' => 'Group leader',
'HIDE_MEMBER_SEARCH' => 'Hide member search',
'IM_ADD_CONTACT' => 'Add Contact',
- 'IM_AIM' => 'Please note that you need AOL Instant Messenger installed to use this.',
- 'IM_AIM_EXPRESS' => 'AIM Express',
'IM_DOWNLOAD_APP' => 'Download application',
- 'IM_ICQ' => 'Please note that users may have selected to not receive unsolicited instant messages.',
'IM_JABBER' => 'Please note that users may have selected to not receive unsolicited instant messages.',
'IM_JABBER_SUBJECT' => 'This is an automated message please do not reply! Message from user %1$s at %2$s.',
'IM_MESSAGE' => 'Your message',
- 'IM_MSNM' => 'Please note that you need Windows Messenger installed to use this.',
- 'IM_MSNM_BROWSER' => 'Your browser does not support this.',
- 'IM_MSNM_CONNECT' => 'MSNM is not connected.\nYou have to connect to MSNM to continue.',
'IM_NAME' => 'Your Name',
'IM_NO_DATA' => 'There is no suitable contact information for this user.',
'IM_NO_JABBER' => 'Sorry, direct messaging of Jabber users is not supported on this board. You will need a Jabber client installed on your system to contact the recipient above.',
@@ -93,16 +86,18 @@ $lang = array_merge($lang, array(
'LAST_ACTIVE' => 'Last active',
'LESS_THAN' => 'Less than',
- 'LIST_USER' => '1 user',
- 'LIST_USERS' => '%d users',
- 'LOGIN_EXPLAIN_LEADERS' => 'The board requires you to be registered and logged in to view the team listing.',
+ 'LIST_USERS' => array(
+ 1 => '%d user',
+ 2 => '%d users',
+ ),
+ 'LOGIN_EXPLAIN_TEAM' => 'The board requires you to be registered and logged in to view the team listing.',
'LOGIN_EXPLAIN_MEMBERLIST' => 'The board requires you to be registered and logged in to access the memberlist.',
'LOGIN_EXPLAIN_SEARCHUSER' => 'The board requires you to be registered and logged in to search users.',
'LOGIN_EXPLAIN_VIEWPROFILE' => 'The board requires you to be registered and logged in to view profiles.',
'MORE_THAN' => 'More than',
- 'NO_EMAIL' => 'You are not permitted to send e-mail to this user.',
+ 'NO_EMAIL' => 'You are not permitted to send email to this user.',
'NO_VIEW_USERS' => 'You are not authorised to view the member list or profiles.',
'ORDER' => 'Order',
@@ -117,14 +112,12 @@ $lang = array_merge($lang, array(
'SELECT_MARKED' => 'Select marked',
'SELECT_SORT_METHOD' => 'Select sort method',
- 'SEND_AIM_MESSAGE' => 'Send AIM message',
'SEND_ICQ_MESSAGE' => 'Send ICQ message',
'SEND_IM' => 'Instant messaging',
'SEND_JABBER_MESSAGE' => 'Send Jabber message',
'SEND_MESSAGE' => 'Message',
- 'SEND_MSNM_MESSAGE' => 'Send MSNM/WLM message',
'SEND_YIM_MESSAGE' => 'Send YIM message',
- 'SORT_EMAIL' => 'E-mail',
+ 'SORT_EMAIL' => 'Email',
'SORT_LAST_ACTIVE' => 'Last active',
'SORT_POST_COUNT' => 'Post count',
@@ -135,15 +128,11 @@ $lang = array_merge($lang, array(
'USER_LAST_REMINDED' => array(
0 => 'No reminder sent at this time',
1 => '%1$d reminder sent<br />» %2$s',
+ 2 => '%1$d reminder sent<br />» %2$s',
),
'USER_ONLINE' => 'Online',
'USER_PRESENCE' => 'Board presence',
'USERS_PER_PAGE' => 'Users per page',
'VIEWING_PROFILE' => 'Viewing profile - %s',
- 'VISITED' => 'Last visited',
-
- 'WWW' => 'Website',
));
-
-?> \ No newline at end of file
diff --git a/phpBB/language/en/migrator.php b/phpBB/language/en/migrator.php
new file mode 100644
index 0000000000..1d8886d12b
--- /dev/null
+++ b/phpBB/language/en/migrator.php
@@ -0,0 +1,56 @@
+<?php
+/**
+*
+* migrator [English]
+*
+* @package language
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+/**
+* DO NOT CHANGE
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+if (empty($lang) || !is_array($lang))
+{
+ $lang = array();
+}
+
+// DEVELOPERS PLEASE NOTE
+//
+// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
+//
+// Placeholders can now contain order information, e.g. instead of
+// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
+// translators to re-order the output of data while ensuring it remains correct
+//
+// You do not need this where single placeholders are used, e.g. 'Message %d' is fine
+// equally where a string contains only two placeholders which are used to wrap text
+// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
+
+$lang = array_merge($lang, array(
+ 'CONFIG_NOT_EXIST' => 'The config setting "%s" unexpectedly does not exist.',
+
+ 'GROUP_NOT_EXIST' => 'The group "%s" unexpectedly does not exist.',
+
+ 'MIGRATION_DATA_DONE' => 'Installed Data: %1$s; Time: %2$.2f seconds',
+ 'MIGRATION_DATA_IN_PROGRESS' => 'Installing Data: %1$s; Time: %2$.2f seconds',
+ 'MIGRATION_EFFECTIVELY_INSTALLED' => 'Migration already effectively installed (skipped): %s',
+ 'MIGRATION_EXCEPTION_ERROR' => 'Something went wrong during the request and an exception was thrown. The changes made before the error occurred were reversed to the best of our abilities, but you should check the board for errors.',
+ 'MIGRATION_NOT_FULFILLABLE' => 'The migration "%1$s" is not fulfillable, missing migration "%2$s".',
+ 'MIGRATION_SCHEMA_DONE' => 'Installed Schema: %1$s; Time: %2$.2f seconds',
+
+ 'MODULE_ERROR' => 'An error occurred while creating a module: %s',
+ 'MODULE_INFO_FILE_NOT_EXIST' => 'A required module info file is missing: %2$s',
+ 'MODULE_NOT_EXIST' => 'A required module does not exist: %s',
+
+ 'PERMISSION_NOT_EXIST' => 'The permission setting "%s" unexpectedly does not exist.',
+
+ 'ROLE_NOT_EXIST' => 'The permission role "%s" unexpectedly does not exist.',
+));
diff --git a/phpBB/language/en/plupload.php b/phpBB/language/en/plupload.php
new file mode 100644
index 0000000000..f174920f6b
--- /dev/null
+++ b/phpBB/language/en/plupload.php
@@ -0,0 +1,77 @@
+<?php
+/**
+*
+* plupload [English]
+*
+* @package language
+* @copyright (c) 2010-2013 Moxiecode Systems AB
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+/**
+* DO NOT CHANGE
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+if (empty($lang) || !is_array($lang))
+{
+ $lang = array();
+}
+
+// DEVELOPERS PLEASE NOTE
+//
+// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
+//
+// Placeholders can now contain order information, e.g. instead of
+// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
+// translators to re-order the output of data while ensuring it remains correct
+//
+// You do not need this where single placeholders are used, e.g. 'Message %d' is fine
+// equally where a string contains only two placeholders which are used to wrap text
+// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
+
+$lang = array_merge($lang, array(
+ 'PLUPLOAD_ADD_FILES' => 'Add files',
+ 'PLUPLOAD_ADD_FILES_TO_QUEUE' => 'Add files to the upload queue and click the start button.',
+ 'PLUPLOAD_ALREADY_QUEUED' => '%s already present in the queue.',
+ 'PLUPLOAD_CLOSE' => 'Close',
+ 'PLUPLOAD_DRAG' => 'Drag files here.',
+ 'PLUPLOAD_DUPLICATE_ERROR' => 'Duplicate file error.',
+ 'PLUPLOAD_DRAG_TEXTAREA' => 'You may also attach files by dragging and dropping them in the message box.',
+ 'PLUPLOAD_ERR_INPUT' => 'Failed to open input stream.',
+ 'PLUPLOAD_ERR_MOVE_UPLOADED' => 'Failed to move uploaded file.',
+ 'PLUPLOAD_ERR_OUTPUT' => 'Failed to open output stream.',
+ 'PLUPLOAD_ERR_FILE_TOO_LARGE' => 'File too large:',
+ 'PLUPLOAD_ERR_FILE_COUNT' => 'File count error.',
+ 'PLUPLOAD_ERR_FILE_INVALID_EXT' => 'Invalid file extension:',
+ 'PLUPLOAD_ERR_RUNTIME_MEMORY' => 'Runtime ran out of available memory.',
+ 'PLUPLOAD_ERR_UPLOAD_URL' => 'Upload URL might be wrong or does not exist.',
+ 'PLUPLOAD_EXTENSION_ERROR' => 'File extension error.',
+ 'PLUPLOAD_FILE' => 'File: %s',
+ 'PLUPLOAD_FILE_DETAILS' => 'File: %s, size: %d, max file size: %d',
+ 'PLUPLOAD_FILENAME' => 'Filename',
+ 'PLUPLOAD_FILES_QUEUED' => '%d files queued',
+ 'PLUPLOAD_GENERIC_ERROR' => 'Generic error.',
+ 'PLUPLOAD_HTTP_ERROR' => 'HTTP error.',
+ 'PLUPLOAD_IMAGE_FORMAT' => 'Image format either wrong or not supported.',
+ 'PLUPLOAD_INIT_ERROR' => 'Init error.',
+ 'PLUPLOAD_IO_ERROR' => 'IO error.',
+ 'PLUPLOAD_NOT_APPLICABLE' => 'N/A',
+ 'PLUPLOAD_SECURITY_ERROR' => 'Security error.',
+ 'PLUPLOAD_SELECT_FILES' => 'Select files',
+ 'PLUPLOAD_SIZE' => 'Size',
+ 'PLUPLOAD_SIZE_ERROR' => 'File size error.',
+ 'PLUPLOAD_STATUS' => 'Status',
+ 'PLUPLOAD_START_UPLOAD' => 'Start upload',
+ 'PLUPLOAD_START_CURRENT_UPLOAD' => 'Start uploading queue',
+ 'PLUPLOAD_STOP_UPLOAD' => 'Stop upload',
+ 'PLUPLOAD_STOP_CURRENT_UPLOAD' => 'Stop current upload',
+ // Note: This string is formatted independently by plupload and so does not
+ // use the same formatting rules as normal phpBB translation strings
+ 'PLUPLOAD_UPLOADED' => 'Uploaded %d/%d files',
+));
diff --git a/phpBB/language/en/posting.php b/phpBB/language/en/posting.php
index dfc5065a05..c1d8cef7de 100644
--- a/phpBB/language/en/posting.php
+++ b/phpBB/language/en/posting.php
@@ -4,9 +4,8 @@
* posting [English]
*
* @package language
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -78,8 +77,20 @@ $lang = array_merge($lang, array(
'DELETE_MESSAGE' => 'Delete message',
'DELETE_MESSAGE_CONFIRM' => 'Are you sure you want to delete this message?',
'DELETE_OWN_POSTS' => 'Sorry but you can only delete your own posts.',
+ 'DELETE_PERMANENTLY' => 'Delete permanently',
'DELETE_POST_CONFIRM' => 'Are you sure you want to delete this post?',
- 'DELETE_POST_WARN' => 'Once deleted the post cannot be recovered',
+ 'DELETE_POST_PERMANENTLY_CONFIRM' => 'Are you sure you want to <strong>permanently</strong> delete this post?',
+ 'DELETE_POST_PERMANENTLY' => 'Permanently delete this post so it can not be recovered',
+ 'DELETE_POSTS_CONFIRM' => 'Are you sure you want to delete these posts?',
+ 'DELETE_POSTS_PERMANENTLY_CONFIRM' => 'Are you sure you want to <strong>permanently</strong> delete these posts?',
+ 'DELETE_REASON' => 'Soft delete reason',
+ 'DELETE_REASON_EXPLAIN' => 'The specified reason for deletion will be visible to moderators.',
+ 'DELETE_POST_WARN' => 'Delete this post',
+ 'DELETE_TOPIC_CONFIRM' => 'Are you sure you want to delete this topic?',
+ 'DELETE_TOPIC_PERMANENTLY' => 'Permanently delete this topic so it can not be recovered',
+ 'DELETE_TOPIC_PERMANENTLY_CONFIRM' => 'Are you sure you want to <strong>permanently</strong> delete this topic?',
+ 'DELETE_TOPICS_CONFIRM' => 'Are you sure you want to delete these topics?',
+ 'DELETE_TOPICS_PERMANENTLY_CONFIRM' => 'Are you sure you want to <strong>permanently</strong> delete these topics?',
'DISABLE_BBCODE' => 'Disable BBCode',
'DISABLE_MAGIC_URL' => 'Do not automatically parse URLs',
'DISABLE_SMILIES' => 'Disable smilies',
@@ -122,13 +133,29 @@ $lang = array_merge($lang, array(
'LOGIN_EXPLAIN_QUOTE' => 'You need to login in order to quote posts within this forum.',
'LOGIN_EXPLAIN_REPLY' => 'You need to login in order to reply to topics within this forum.',
- 'MAX_FONT_SIZE_EXCEEDED' => 'You may only use fonts up to size %1$d.',
- 'MAX_FLASH_HEIGHT_EXCEEDED' => 'Your flash files may only be up to %1$d pixels high.',
- 'MAX_FLASH_WIDTH_EXCEEDED' => 'Your flash files may only be up to %1$d pixels wide.',
- 'MAX_IMG_HEIGHT_EXCEEDED' => 'Your images may only be up to %1$d pixels high.',
- 'MAX_IMG_WIDTH_EXCEEDED' => 'Your images may only be up to %1$d pixels wide.',
+ 'MAX_FONT_SIZE_EXCEEDED' => 'You may only use fonts up to size %d.',
+ 'MAX_FLASH_HEIGHT_EXCEEDED' => array(
+ 1 => 'Your flash files may only be up to %d pixel high.',
+ 2 => 'Your flash files may only be up to %d pixels high.',
+ ),
+ 'MAX_FLASH_WIDTH_EXCEEDED' => array(
+ 1 => 'Your flash files may only be up to %d pixel wide.',
+ 2 => 'Your flash files may only be up to %d pixels wide.',
+ ),
+ 'MAX_IMG_HEIGHT_EXCEEDED' => array(
+ 1 => 'Your images may only be up to %1$d pixel high.',
+ 2 => 'Your images may only be up to %1$d pixels high.',
+ ),
+ 'MAX_IMG_WIDTH_EXCEEDED' => array(
+ 1 => 'Your images may only be up to %d pixel wide.',
+ 2 => 'Your images may only be up to %d pixels wide.',
+ ),
- 'MESSAGE_BODY_EXPLAIN' => 'Enter your message here, it may contain no more than <strong>%d</strong> characters.',
+ 'MESSAGE_BODY_EXPLAIN' => array(
+ 0 => '', // zero means no limit, so we don't view a message here.
+ 1 => 'Enter your message here, it may contain no more than <strong>%d</strong> character.',
+ 2 => 'Enter your message here, it may contain no more than <strong>%d</strong> characters.',
+ ),
'MESSAGE_DELETED' => 'This message has been deleted successfully.',
'MORE_SMILIES' => 'View more smilies',
@@ -146,12 +173,18 @@ $lang = array_merge($lang, array(
'PLACE_INLINE' => 'Place inline',
'POLL_DELETE' => 'Delete poll',
'POLL_FOR' => 'Run poll for',
- 'POLL_FOR_EXPLAIN' => 'Enter 0 or leave blank for a never ending poll.',
+ 'POLL_FOR_EXPLAIN' => 'Enter 0 for a never ending poll.',
'POLL_MAX_OPTIONS' => 'Options per user',
'POLL_MAX_OPTIONS_EXPLAIN' => 'This is the number of options each user may select when voting.',
'POLL_OPTIONS' => 'Poll options',
- 'POLL_OPTIONS_EXPLAIN' => 'Place each option on a new line. You may enter up to <strong>%d</strong> options.',
- 'POLL_OPTIONS_EDIT_EXPLAIN' => 'Place each option on a new line. You may enter up to <strong>%d</strong> options. If you remove or add options all previous votes will be reset.',
+ 'POLL_OPTIONS_EXPLAIN' => array(
+ 1 => 'Place each option on a new line. You may enter <strong>%d</strong> option.',
+ 2 => 'Place each option on a new line. You may enter up to <strong>%d</strong> options.',
+ ),
+ 'POLL_OPTIONS_EDIT_EXPLAIN' => array(
+ 1 => 'Place each option on a new line. You may enter <strong>%d</strong> option. If you remove or add options all previous votes will be reset.',
+ 2 => 'Place each option on a new line. You may enter up to <strong>%d</strong> options. If you remove or add options all previous votes will be reset.',
+ ),
'POLL_QUESTION' => 'Poll question',
'POLL_TITLE_TOO_LONG' => 'The poll title must contain fewer than 100 characters.',
'POLL_TITLE_COMP_TOO_LONG' => 'The parsed size of your poll title is too large, consider removing BBCodes or smilies.',
@@ -161,9 +194,9 @@ $lang = array_merge($lang, array(
'POST_APPROVAL_NOTIFY' => 'You will be notified when your post has been approved.',
'POST_CONFIRMATION' => 'Confirmation of post',
'POST_CONFIRM_EXPLAIN' => 'To prevent automated posts the board requires you to enter a confirmation code. The code is displayed in the image you should see below. If you are visually impaired or cannot otherwise read this code please contact the %sBoard Administrator%s.',
- 'POST_DELETED' => 'This message has been deleted successfully.',
- 'POST_EDITED' => 'This message has been edited successfully.',
- 'POST_EDITED_MOD' => 'This message has been edited successfully, but it will need to be approved by a moderator before it is publicly viewable.',
+ 'POST_DELETED' => 'This post has been deleted successfully.',
+ 'POST_EDITED' => 'This post has been edited successfully.',
+ 'POST_EDITED_MOD' => 'This post has been edited successfully, but it will need to be approved by a moderator before it is publicly viewable.',
'POST_GLOBAL' => 'Global',
'POST_ICON' => 'Post icon',
'POST_NORMAL' => 'Normal',
@@ -176,7 +209,10 @@ $lang = array_merge($lang, array(
'POST_TOPIC_AS' => 'Post topic as',
'PROGRESS_BAR' => 'Progress bar',
- 'QUOTE_DEPTH_EXCEEDED' => 'You may embed only %1$d quotes within each other.',
+ 'QUOTE_DEPTH_EXCEEDED' => array(
+ 1 => 'You may embed only %d quote within each other.',
+ 2 => 'You may embed only %d quotes within each other.',
+ ),
'SAVE' => 'Save',
'SAVE_DATE' => 'Saved at',
@@ -187,16 +223,23 @@ $lang = array_merge($lang, array(
'SMILIES_ARE_ON' => 'Smilies are <em>ON</em>',
'STICKY_ANNOUNCE_TIME_LIMIT'=> 'Sticky/Announcement time limit',
'STICK_TOPIC_FOR' => 'Stick topic for',
- 'STICK_TOPIC_FOR_EXPLAIN' => 'Enter 0 or leave blank for a never ending Sticky/Announcement. Please note that this number is relative to the date of the post.',
+ 'STICK_TOPIC_FOR_EXPLAIN' => 'Enter 0 for a never ending Sticky/Announcement. Please note that this number is relative to the date of the post.',
'STYLES_TIP' => 'Tip: Styles can be applied quickly to selected text.',
'TOO_FEW_CHARS' => 'Your message contains too few characters.',
- 'TOO_FEW_CHARS_LIMIT' => 'Your message contains %1$d characters. The minimum number of characters you need to enter is %2$d.',
+ 'TOO_FEW_CHARS_LIMIT' => array(
+ 1 => 'Your message contains %1$d character. The minimum number of characters you need to enter is %2$d.',
+ 2 => 'Your message contains %1$d characters. The minimum number of characters you need to enter is %2$d.',
+ ),
'TOO_FEW_POLL_OPTIONS' => 'You must enter at least two poll options.',
'TOO_MANY_ATTACHMENTS' => 'Cannot add another attachment, %d is the maximum.',
'TOO_MANY_CHARS' => 'Your message contains too many characters.',
- 'TOO_MANY_CHARS_POST' => 'Your message contains %1$d characters. The maximum number of allowed characters is %2$d.',
- 'TOO_MANY_CHARS_SIG' => 'Your signature contains %1$d characters. The maximum number of allowed characters is %2$d.',
+ 'TOO_MANY_CHARS_POST' => array(
+ 2 => 'Your message contains %1$d characters. The maximum number of allowed characters is %2$d.',
+ ),
+ 'TOO_MANY_CHARS_SIG' => array(
+ 2 => 'Your signature contains %1$d characters. The maximum number of allowed characters is %2$d.',
+ ),
'TOO_MANY_POLL_OPTIONS' => 'You have tried to enter too many poll options.',
'TOO_MANY_SMILIES' => 'Your message contains too many smilies. The maximum number of smilies allowed is %d.',
'TOO_MANY_URLS' => 'Your message contains too many URLs. The maximum number of URLs allowed is %d.',
@@ -220,7 +263,5 @@ $lang = array_merge($lang, array(
'VIEW_PRIVATE_MESSAGE' => '%sView your submitted private message%s',
'WRONG_FILESIZE' => 'The file is too big, maximum allowed size is %1d %2s.',
- 'WRONG_SIZE' => 'The image must be at least %1$d pixels wide, %2$d pixels high and at most %3$d pixels wide and %4$d pixels high. The submitted image is %5$d pixels wide and %6$d pixels high.',
+ 'WRONG_SIZE' => 'The image must be at least %1$s wide, %2$s high and at most %3$s wide and %4$s high. The submitted image is %5$s wide and %6$s high.',
));
-
-?> \ No newline at end of file
diff --git a/phpBB/language/en/search.php b/phpBB/language/en/search.php
index 97bc1f9bac..f65022fbcb 100644
--- a/phpBB/language/en/search.php
+++ b/phpBB/language/en/search.php
@@ -4,9 +4,8 @@
* search [English]
*
* @package language
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -41,9 +40,14 @@ $lang = array_merge($lang, array(
'DISPLAY_RESULTS' => 'Display results as',
- 'FOUND_SEARCH_MATCH' => 'Search found %d match',
- 'FOUND_SEARCH_MATCHES' => 'Search found %d matches',
- 'FOUND_MORE_SEARCH_MATCHES' => 'Search found more than %d matches',
+ 'FOUND_SEARCH_MATCHES' => array(
+ 1 => 'Search found %d match',
+ 2 => 'Search found %d matches',
+ ),
+ 'FOUND_MORE_SEARCH_MATCHES' => array(
+ 1 => 'Search found more than %d match',
+ 2 => 'Search found more than %d matches',
+ ),
'GLOBAL' => 'Global announcement',
@@ -56,9 +60,12 @@ $lang = array_merge($lang, array(
'LOGIN_EXPLAIN_UNREADSEARCH'=> 'The board requires you to be registered and logged in to view your unread posts.',
'LOGIN_EXPLAIN_NEWPOSTS' => 'The board requires you to be registered and logged in to view new posts since your last visit.',
- 'MAX_NUM_SEARCH_KEYWORDS_REFINE' => 'You specified too many words to search for. Please do not enter more than %1$d words.',
+ 'MAX_NUM_SEARCH_KEYWORDS_REFINE' => array(
+ 1 => 'You specified too many words to search for. Please do not enter more than %1$d word.',
+ 2 => 'You specified too many words to search for. Please do not enter more than %1$d words.',
+ ),
- 'NO_KEYWORDS' => 'You must specify at least one word to search for. Each word must consist of at least %d characters and must not contain more than %d characters excluding wildcards.',
+ 'NO_KEYWORDS' => 'You must specify at least one word to search for. Each word must consist of at least %s and must not contain more than %s excluding wildcards.',
'NO_RECENT_SEARCHES' => 'No searches have been carried out recently.',
'NO_SEARCH' => 'Sorry but you are not permitted to use the search system.',
'NO_SEARCH_RESULTS' => 'No suitable matches were found.',
@@ -68,6 +75,7 @@ $lang = array_merge($lang, array(
'WORDS_IN_NO_POST' => 'No posts were found because the words <strong>%s</strong> are not contained in any post.',
'POST_CHARACTERS' => 'characters of posts',
+ 'PHRASE_SEARCH_DISABLED' => 'Searching by exact phrase is not supported on this board.',
'RECENT_SEARCHES' => 'Recent searches',
'RESULT_DAYS' => 'Limit results to previous',
@@ -100,8 +108,11 @@ $lang = array_merge($lang, array(
'SORT_FORUM' => 'Forum',
'SORT_POST_SUBJECT' => 'Post subject',
'SORT_TIME' => 'Post time',
+ 'SPHINX_SEARCH_FAILED' => 'Search failed: %s',
+ 'SPHINX_SEARCH_FAILED_LOG' => 'Sorry, search could not be performed. More information about this failure has been logged in the error log.',
- 'TOO_FEW_AUTHOR_CHARS' => 'You must specify at least %d characters of the authors name.',
+ 'TOO_FEW_AUTHOR_CHARS' => array(
+ 1 => 'You must specify at least %d character of the authors name.',
+ 2 => 'You must specify at least %d characters of the authors name.',
+ ),
));
-
-?> \ No newline at end of file
diff --git a/phpBB/language/en/search_ignore_words.php b/phpBB/language/en/search_ignore_words.php
index 2dfdc0df13..afdbe6eecb 100644
--- a/phpBB/language/en/search_ignore_words.php
+++ b/phpBB/language/en/search_ignore_words.php
@@ -4,9 +4,8 @@
* search_ignore_words [English]
*
* @package language
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -268,5 +267,3 @@ $words = array(
'ROTFLMAO',
'YMMV',
);
-
-?> \ No newline at end of file
diff --git a/phpBB/language/en/search_synonyms.php b/phpBB/language/en/search_synonyms.php
index e544456226..18f938258c 100644
--- a/phpBB/language/en/search_synonyms.php
+++ b/phpBB/language/en/search_synonyms.php
@@ -4,9 +4,8 @@
* search_synonyms [English]
*
* @package language
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -188,4 +187,3 @@ $synonyms = array(
'yeild' => 'yield',
);
-?> \ No newline at end of file
diff --git a/phpBB/language/en/ucp.php b/phpBB/language/en/ucp.php
index ad11213052..40c8bd9f8e 100644
--- a/phpBB/language/en/ucp.php
+++ b/phpBB/language/en/ucp.php
@@ -4,9 +4,8 @@
* ucp [English]
*
* @package language
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -39,7 +38,7 @@ if (empty($lang) || !is_array($lang))
$lang = array_merge($lang, array(
'TERMS_OF_USE_CONTENT' => 'By accessing “%1$s” (hereinafter “we”, “us”, “our”, “%1$s”, “%2$s”), you agree to be legally bound by the following terms. If you do not agree to be legally bound by all of the following terms then please do not access and/or use “%1$s”. We may change these at any time and we’ll do our utmost in informing you, though it would be prudent to review this regularly yourself as your continued usage of “%1$s” after changes mean you agree to be legally bound by these terms as they are updated and/or amended.<br />
<br />
- Our forums are powered by phpBB (hereinafter “they”, “them”, “their”, “phpBB software”, “www.phpbb.com”, “phpBB Group”, “phpBB Teams”) which is a bulletin board solution released under the “<a href="http://opensource.org/licenses/gpl-license.php">General Public License</a>” (hereinafter “GPL”) and can be downloaded from <a href="https://www.phpbb.com/">www.phpbb.com</a>. The phpBB software only facilitates internet based discussions, the phpBB Group are not responsible for what we allow and/or disallow as permissible content and/or conduct. For further information about phpBB, please see: <a href="https://www.phpbb.com/">https://www.phpbb.com/</a>.<br />
+ Our forums are powered by phpBB (hereinafter “they”, “them”, “their”, “phpBB software”, “www.phpbb.com”, “phpBB Group”, “phpBB Teams”) which is a bulletin board solution released under the “<a href="http://opensource.org/licenses/gpl-2.0.php">GNU General Public License v2</a>” (hereinafter “GPL”) and can be downloaded from <a href="https://www.phpbb.com/">www.phpbb.com</a>. The phpBB software only facilitates internet based discussions, the phpBB Group are not responsible for what we allow and/or disallow as permissible content and/or conduct. For further information about phpBB, please see: <a href="https://www.phpbb.com/">https://www.phpbb.com/</a>.<br />
<br />
You agree not to post any abusive, obscene, vulgar, slanderous, hateful, threatening, sexually-orientated or any other material that may violate any laws be it of your country, the country where “%1$s” is hosted or International Law. Doing so may lead to you being immediately and permanently banned, with notification of your Internet Service Provider if deemed required by us. The IP address of all posts are recorded to aid in enforcing these conditions. You agree that “%1$s” have the right to remove, edit, move or close any topic at any time should we see fit. As a user you agree to any information you have entered to being stored in a database. While this information will not be disclosed to any third party without your consent, neither “%1$s” nor phpBB shall be held responsible for any hacking attempt that may lead to the data being compromised.
',
@@ -50,9 +49,9 @@ $lang = array_merge($lang, array(
<br />
We may also create cookies external to the phpBB software whilst browsing “%1$s”, though these are outside the scope of this document which is intended to only cover the pages created by the phpBB software. The second way in which we collect your information is by what you submit to us. This can be, and is not limited to: posting as an anonymous user (hereinafter “anonymous posts”), registering on “%1$s” (hereinafter “your account”) and posts submitted by you after registration and whilst logged in (hereinafter “your posts”).<br />
<br />
- Your account will at a bare minimum contain a uniquely identifiable name (hereinafter “your user name”), a personal password used for logging into your account (hereinafter “your password”) and a personal, valid e-mail address (hereinafter “your e-mail”). Your information for your account at “%1$s” is protected by data-protection laws applicable in the country that hosts us. Any information beyond your user name, your password, and your e-mail address required by “%1$s” during the registration process is either mandatory or optional, at the discretion of “%1$s”. In all cases, you have the option of what information in your account is publicly displayed. Furthermore, within your account, you have the option to opt-in or opt-out of automatically generated e-mails from the phpBB software.<br />
+ Your account will at a bare minimum contain a uniquely identifiable name (hereinafter “your user name”), a personal password used for logging into your account (hereinafter “your password”) and a personal, valid email address (hereinafter “your email”). Your information for your account at “%1$s” is protected by data-protection laws applicable in the country that hosts us. Any information beyond your user name, your password, and your email address required by “%1$s” during the registration process is either mandatory or optional, at the discretion of “%1$s”. In all cases, you have the option of what information in your account is publicly displayed. Furthermore, within your account, you have the option to opt-in or opt-out of automatically generated emails from the phpBB software.<br />
<br />
- Your password is ciphered (a one-way hash) so that it is secure. However, it is recommended that you do not reuse the same password across a number of different websites. Your password is the means of accessing your account at “%1$s”, so please guard it carefully and under no circumstance will anyone affiliated with “%1$s”, phpBB or another 3rd party, legitimately ask you for your password. Should you forget your password for your account, you can use the “I forgot my password” feature provided by the phpBB software. This process will ask you to submit your user name and your e-mail, then the phpBB software will generate a new password to reclaim your account.<br />
+ Your password is ciphered (a one-way hash) so that it is secure. However, it is recommended that you do not reuse the same password across a number of different websites. Your password is the means of accessing your account at “%1$s”, so please guard it carefully and under no circumstance will anyone affiliated with “%1$s”, phpBB or another 3rd party, legitimately ask you for your password. Should you forget your password for your account, you can use the “I forgot my password” feature provided by the phpBB software. This process will ask you to submit your user name and your email, then the phpBB software will generate a new password to reclaim your account.<br />
',
));
@@ -62,13 +61,13 @@ $lang = array_merge($lang, array(
'ACCOUNT_ACTIVE_ADMIN' => 'The account has now been activated.',
'ACCOUNT_ACTIVE_PROFILE' => 'Your account has now been successfully reactivated.',
'ACCOUNT_ADDED' => 'Thank you for registering, your account has been created. You may now login with your username and password.',
- 'ACCOUNT_COPPA' => 'Your account has been created but has to be approved, please check your e-mail for details.',
- 'ACCOUNT_EMAIL_CHANGED' => 'Your account has been updated. However, this board requires account reactivation on e-mail changes. An activation key has been sent to the new e-mail address you provided. Please check your e-mail for further information.',
- 'ACCOUNT_EMAIL_CHANGED_ADMIN' => 'Your account has been updated. However, this board requires account reactivation by the administrators on e-mail changes. An e-mail has been sent to them and you will be informed when your account has been reactivated.',
- 'ACCOUNT_INACTIVE' => 'Your account has been created. However, this board requires account activation, an activation key has been sent to the e-mail address you provided. Please check your e-mail for further information.',
- 'ACCOUNT_INACTIVE_ADMIN' => 'Your account has been created. However, this board requires account activation by the administrator group. An e-mail has been sent to them and you will be informed when your account has been activated.',
- 'ACTIVATION_EMAIL_SENT' => 'The activation e-mail has been sent to your e-mail address.',
- 'ACTIVATION_EMAIL_SENT_ADMIN' => 'The activation e-mail has been sent to the administrators e-mail addresses.',
+ 'ACCOUNT_COPPA' => 'Your account has been created but has to be approved, please check your email for details.',
+ 'ACCOUNT_EMAIL_CHANGED' => 'Your account has been updated. However, this board requires account reactivation on email changes. An activation key has been sent to the new email address you provided. Please check your email for further information.',
+ 'ACCOUNT_EMAIL_CHANGED_ADMIN' => 'Your account has been updated. However, this board requires account reactivation by the administrators on email changes. An email has been sent to them and you will be informed when your account has been reactivated.',
+ 'ACCOUNT_INACTIVE' => 'Your account has been created. However, this board requires account activation, an activation key has been sent to the email address you provided. Please check your email for further information.',
+ 'ACCOUNT_INACTIVE_ADMIN' => 'Your account has been created. However, this board requires account activation by the administrator group. An email has been sent to them and you will be informed when your account has been activated.',
+ 'ACTIVATION_EMAIL_SENT' => 'The activation email has been sent to your email address.',
+ 'ACTIVATION_EMAIL_SENT_ADMIN' => 'The activation email has been sent to the administrators email addresses.',
'ADD' => 'Add',
'ADD_BCC' => 'Add [BCC]',
'ADD_FOES' => 'Add new foes',
@@ -80,7 +79,7 @@ $lang = array_merge($lang, array(
'ADD_RULE' => 'Add rule',
'ADD_TO' => 'Add [To]',
'ADD_USERS_UCP_EXPLAIN' => 'Here you can add new users to the group. You may select whether this group becomes the new default for the selected users. Please enter each username on a separate line.',
- 'ADMIN_EMAIL' => 'Administrators can e-mail me information',
+ 'ADMIN_EMAIL' => 'Administrators can email me information',
'AGREE' => 'I agree to these terms',
'ALLOW_PM' => 'Allow users to send you private messages',
'ALLOW_PM_EXPLAIN' => 'Note that administrators and moderators will always be able to send you messages.',
@@ -88,13 +87,24 @@ $lang = array_merge($lang, array(
'ATTACHMENTS_EXPLAIN' => 'This is a list of attachments you have made in posts to this board.',
'ATTACHMENTS_DELETED' => 'Attachments successfully deleted.',
'ATTACHMENT_DELETED' => 'Attachment successfully deleted.',
+ 'AUTOLOGIN_SESSION_KEYS_DELETED'=> 'The selected "Remember Me" login keys were successfully deleted.',
'AVATAR_CATEGORY' => 'Category',
- 'AVATAR_EXPLAIN' => 'Maximum dimensions; width: %1$d pixels, height: %2$d pixels, file size: %3$.2f KiB.',
+ 'AVATAR_DRIVER_GRAVATAR_TITLE' => 'Gravatar',
+ 'AVATAR_DRIVER_GRAVATAR_EXPLAIN'=> 'Gravatar is a service that allows you to maintain the same avatar across multiple websites. Visit <a href="http://www.gravatar.com/">Gravatar</a> for more information.',
+ 'AVATAR_DRIVER_LOCAL_TITLE' => 'Gallery avatar',
+ 'AVATAR_DRIVER_LOCAL_EXPLAIN' => 'You can choose your avatar from a locally available set of avatars.',
+ 'AVATAR_DRIVER_REMOTE_TITLE' => 'Remote avatar',
+ 'AVATAR_DRIVER_REMOTE_EXPLAIN' => 'Link to avatar images from another website.',
+ 'AVATAR_DRIVER_UPLOAD_TITLE' => 'Upload avatar',
+ 'AVATAR_DRIVER_UPLOAD_EXPLAIN' => 'Upload your own custom avatar.',
+ 'AVATAR_EXPLAIN' => 'Maximum dimensions; width: %1$s, height: %2$s, file size: %3$.2f KiB.',
'AVATAR_FEATURES_DISABLED' => 'The avatar functionality is currently disabled.',
'AVATAR_GALLERY' => 'Local gallery',
'AVATAR_GENERAL_UPLOAD_ERROR' => 'Could not upload avatar to %s.',
'AVATAR_NOT_ALLOWED' => 'Your avatar cannot be displayed because avatars have been disallowed.',
'AVATAR_PAGE' => 'Page',
+ 'AVATAR_SELECT' => 'Select your avatar',
+ 'AVATAR_TYPE' => 'Avatar type',
'AVATAR_TYPE_NOT_ALLOWED' => 'Your current avatar cannot be displayed because its type has been disallowed.',
'BACK_TO_DRAFTS' => 'Back to saved drafts',
@@ -103,7 +113,6 @@ $lang = array_merge($lang, array(
'BIRTHDAY_EXPLAIN' => 'Setting a year will list your age when it is your birthday.',
'BOARD_DATE_FORMAT' => 'My date format',
'BOARD_DATE_FORMAT_EXPLAIN' => 'The syntax used is identical to the PHP <a href="http://www.php.net/date">date()</a> function.',
- 'BOARD_DST' => 'Summer Time/<abbr title="Daylight Saving Time">DST</abbr> is in effect',
'BOARD_LANGUAGE' => 'My language',
'BOARD_STYLE' => 'My board style',
'BOARD_TIMEZONE' => 'My timezone',
@@ -123,8 +132,6 @@ $lang = array_merge($lang, array(
'CLICK_RETURN_FOLDER' => '%1$sReturn to your “%3$s” folder%2$s',
'CONFIRMATION' => 'Confirmation of registration',
'CONFIRM_CHANGES' => 'Confirm changes',
- 'CONFIRM_EMAIL' => 'Confirm e-mail address',
- 'CONFIRM_EMAIL_EXPLAIN' => 'You only need to specify this if you are changing your e-mail address.',
'CONFIRM_EXPLAIN' => 'To prevent automated registrations the board requires you to enter a confirmation code. The code is displayed in the image you should see below. If you are visually impaired or cannot otherwise read this code please contact the %sBoard Administrator%s.',
'VC_REFRESH' => 'Refresh confirmation code',
'VC_REFRESH_EXPLAIN' => 'If you cannot read the code you can request a new one by clicking the button.',
@@ -168,16 +175,16 @@ $lang = array_merge($lang, array(
'DEMOTE_SELECTED' => 'Demote selected',
'DISABLE_CENSORS' => 'Enable word censoring',
'DISPLAY_GALLERY' => 'Display gallery',
- 'DOMAIN_NO_MX_RECORD_EMAIL' => 'The entered e-mail domain has no valid MX record.',
+ 'DOMAIN_NO_MX_RECORD_EMAIL' => 'The entered email domain has no valid MX record.',
'DOWNLOADS' => 'Downloads',
'DRAFTS_DELETED' => 'All selected drafts were successfully deleted.',
'DRAFTS_EXPLAIN' => 'Here you can view, edit and delete your saved drafts.',
'DRAFT_UPDATED' => 'Draft successfully updated.',
'EDIT_DRAFT_EXPLAIN' => 'Here you are able to edit your draft. Drafts do not contain attachment and poll information.',
- 'EMAIL_BANNED_EMAIL' => 'The e-mail address you entered is not allowed to be used.',
- 'EMAIL_REMIND' => 'This must be the e-mail address associated with your account. If you have not changed this via your user control panel then it is the e-mail address you registered your account with.',
- 'EMAIL_TAKEN_EMAIL' => 'The entered e-mail address is already in use.',
+ 'EMAIL_BANNED_EMAIL' => 'The email address you entered is not allowed to be used.',
+ 'EMAIL_REMIND' => 'This must be the email address associated with your account. If you have not changed this via your user control panel then it is the email address you registered your account with.',
+ 'EMAIL_TAKEN_EMAIL' => 'The entered email address is already in use.',
'EMPTY_DRAFT' => 'You must enter a message to submit your changes.',
'EMPTY_DRAFT_TITLE' => 'You must enter a draft title.',
'EXPORT_AS_XML' => 'Export as XML',
@@ -188,27 +195,42 @@ $lang = array_merge($lang, array(
'EXPORT_FOLDER' => 'Export this view',
'FIELD_REQUIRED' => 'The field “%s” must be completed.',
- 'FIELD_TOO_SHORT' => 'The field “%1$s” is too short, a minimum of %2$d characters is required.',
- 'FIELD_TOO_LONG' => 'The field “%1$s” is too long, a maximum of %2$d characters is allowed.',
- 'FIELD_TOO_SMALL' => 'The value of “%1$s” is too small, a minimum value of %2$d is required.',
- 'FIELD_TOO_LARGE' => 'The value of “%1$s” is too large, a maximum value of %2$d is allowed.',
+ 'FIELD_TOO_SHORT' => array(
+ 1 => 'The field “%2$s” is too short, a minimum of %1$d character is required.',
+ 2 => 'The field “%2$s” is too short, a minimum of %1$d characters is required.',
+ ),
+ 'FIELD_TOO_LONG' => array(
+ 1 => 'The field “%2$s” is too long, a maximum of %1$d character is allowed.',
+ 2 => 'The field “%2$s” is too long, a maximum of %1$d characters is allowed.',
+ ),
+ 'FIELD_TOO_SMALL' => 'The value of “%2$s” is too small, a minimum value of %1$d is required.',
+ 'FIELD_TOO_LARGE' => 'The value of “%2$s” is too large, a maximum value of %1$d is allowed.',
+ 'FIELD_INVALID_CHARS_INVALID' => 'The field “%s” has invalid characters.',
'FIELD_INVALID_CHARS_NUMBERS_ONLY' => 'The field “%s” has invalid characters, only numbers are allowed.',
'FIELD_INVALID_CHARS_ALPHA_ONLY' => 'The field “%s” has invalid characters, only alphanumeric characters are allowed.',
- 'FIELD_INVALID_CHARS_SPACERS_ONLY' => 'The field “%s” has invalid characters, only alphanumeric, space or -+_[] characters are allowed.',
+ 'FIELD_INVALID_CHARS_ALPHA_SPACERS' => 'The field “%s” has invalid characters, only alphanumeric, space or -+_[] characters are allowed.',
+ 'FIELD_INVALID_CHARS_ALPHA_UNDERSCORE' => 'The field “%s” has invalid characters, only alphanumeric or _ characters are allowed.',
'FIELD_INVALID_DATE' => 'The field “%s” has an invalid date.',
+ 'FIELD_INVALID_URL' => 'The field “%s” has an invalid url.',
'FIELD_INVALID_VALUE' => 'The field “%s” has an invalid value.',
'FOE_MESSAGE' => 'Message from foe',
'FOES_EXPLAIN' => 'Foes are users which will be ignored by default. Posts by these users will not be fully visible. Personal messages from foes are still permitted. Please note that you cannot ignore moderators or administrators.',
'FOES_UPDATED' => 'Your foes list has been updated successfully.',
'FOLDER_ADDED' => 'Folder successfully added.',
- 'FOLDER_MESSAGE_STATUS' => '%1$d from %2$d messages stored',
+ 'FOLDER_MESSAGE_STATUS' => array(
+ 1 => '%2$d out of %1$s stored',
+ 2 => '%2$d out of %1$s stored',
+ ),
'FOLDER_NAME_EMPTY' => 'You must enter a name for this folder.',
'FOLDER_NAME_EXIST' => 'Folder <strong>%s</strong> already exists.',
'FOLDER_OPTIONS' => 'Folder options',
'FOLDER_RENAMED' => 'Folder successfully renamed.',
'FOLDER_REMOVED' => 'Folder successfully removed.',
- 'FOLDER_STATUS_MSG' => 'Folder is %1$d%% full (%2$d from %3$d messages stored)',
+ 'FOLDER_STATUS_MSG' => array(
+ 1 => 'Folder is %3$d%% full (%2$d out of %1$s stored)',
+ 2 => 'Folder is %3$d%% full (%2$d out of %1$s stored)',
+ ),
'FORWARD_PM' => 'Forward PM',
'FORCE_PASSWORD_EXPLAIN' => 'Before you may continue browsing the board you are required to change your password.',
'FRIEND_MESSAGE' => 'Message from friend',
@@ -226,6 +248,11 @@ $lang = array_merge($lang, array(
'GLOBAL_ANNOUNCEMENT' => 'Global announcement',
+ 'GRAVATAR_AVATAR_EMAIL' => 'Gravatar email',
+ 'GRAVATAR_AVATAR_EMAIL_EXPLAIN' => 'Enter the email address you used for registering your account on <a href="http://www.gravatar.com/">Gravatar</a>.',
+ 'GRAVATAR_AVATAR_SIZE' => 'Avatar dimensions',
+ 'GRAVATAR_AVATAR_SIZE_EXPLAIN' => 'Specify the width and height of the avatar, leave blank to attempt automatic verification.',
+
'HIDE_ONLINE' => 'Hide my online status',
'HIDE_ONLINE_EXPLAIN' => 'Changing this setting won’t become effective until your next visit to the board.',
'HOLD_NEW_MESSAGES' => 'Do not accept new messages (New messages will be held back until enough space is available)',
@@ -246,6 +273,12 @@ $lang = array_merge($lang, array(
'LINK_REMOTE_SIZE' => 'Avatar dimensions',
'LINK_REMOTE_SIZE_EXPLAIN' => 'Specify the width and height of the avatar, leave blank to attempt automatic verification.',
'LOGIN_EXPLAIN_UCP' => 'Please login in order to access the User Control Panel.',
+ 'LOGIN_LINK' => 'Link or register your account on an external service with your board account',
+ 'LOGIN_LINK_EXPLAIN' => 'You have attempted to login with an external service that is not yet connected to an account on this board. You must now either link this account to an existing account or create a new account.',
+ 'LOGIN_LINK_MISSING_DATA' => 'Data that is necessary to link your account with an external service is not available. Please restart the login process.',
+ 'LOGIN_LINK_NO_DATA_PROVIDED' => 'No data has been provided to this page to link an external account to a forum account. Please contact the board administrator if you continue to experience problems.',
+ 'LOGIN_KEY' => 'Login Key',
+ 'LOGIN_TIME' => 'Login Time',
'LOGIN_REDIRECT' => 'You have been successfully logged in.',
'LOGOUT_FAILED' => 'You were not logged out, as the request did not match your session. Please contact the board administrator if you continue to experience problems.',
'LOGOUT_REDIRECT' => 'You have been successfully logged out.',
@@ -266,19 +299,42 @@ $lang = array_merge($lang, array(
'MOVE_DELETED_MESSAGES_TO' => 'Move messages from removed folder to',
'MOVE_DOWN' => 'Move down',
'MOVE_MARKED_TO_FOLDER' => 'Move marked to %s',
- 'MOVE_PM_ERROR' => 'An error occurred while moving the messages to the new folder, only %1d from %2d messages were moved.',
+ 'MOVE_PM_ERROR' => array(
+ 1 => 'An error occurred while moving the messages to the new folder, only %2$d out of %1$s was moved.',
+ 2 => 'An error occurred while moving the messages to the new folder, only %2$d out of %1$s were moved.',
+ ),
'MOVE_TO_FOLDER' => 'Move to folder',
'MOVE_UP' => 'Move up',
- 'NEW_EMAIL_CONFIRM_EMPTY' => 'You did not enter a confirm e-mail address.',
- 'NEW_EMAIL_ERROR' => 'The e-mail addresses you entered do not match.',
'NEW_FOLDER_NAME' => 'New folder name',
'NEW_PASSWORD' => 'New password',
'NEW_PASSWORD_CONFIRM_EMPTY' => 'You did not enter a confirm password.',
'NEW_PASSWORD_ERROR' => 'The passwords you entered do not match.',
+
+ 'NOTIFICATIONS_MARK_ALL_READ' => 'Mark all notifications read',
+ 'NOTIFICATIONS_MARK_ALL_READ_CONFIRM' => 'Are you sure you want to mark all notifications read?',
+ 'NOTIFICATIONS_MARK_ALL_READ_SUCCESS' => 'All notifications have been marked read.',
+ 'NOTIFICATION_GROUP_MISCELLANEOUS' => 'Miscellaneous Notifications',
+ 'NOTIFICATION_GROUP_MODERATION' => 'Moderation Notifications',
+ 'NOTIFICATION_GROUP_ADMINISTRATION' => 'Administration Notifications',
+ 'NOTIFICATION_GROUP_POSTING' => 'Posting Notifications',
+ 'NOTIFICATION_METHOD_EMAIL' => 'Email',
+ 'NOTIFICATION_METHOD_JABBER' => 'Jabber',
+ 'NOTIFICATION_TYPE' => 'Notification type',
+ 'NOTIFICATION_TYPE_BOOKMARK' => 'Someone replies to a topic you have bookmarked',
+ 'NOTIFICATION_TYPE_GROUP_REQUEST' => 'Someone requests to join a group you lead',
+ 'NOTIFICATION_TYPE_IN_MODERATION_QUEUE' => 'A post or topic needs approval',
+ 'NOTIFICATION_TYPE_MODERATION_QUEUE' => 'Your topics/posts are approved or disapproved by a moderator',
+ 'NOTIFICATION_TYPE_PM' => 'Someone sends you a private message',
+ 'NOTIFICATION_TYPE_POST' => 'Someone replies to a topic to which you are subscribed',
+ 'NOTIFICATION_TYPE_QUOTE' => 'Someone quotes you in a post',
+ 'NOTIFICATION_TYPE_REPORT' => 'Someone reports a post',
+ 'NOTIFICATION_TYPE_TOPIC' => 'Someone creates a topic in a forum to which you are subscribed',
+ 'NOTIFICATION_TYPE_ADMIN_ACTIVATE_USER' => 'Newly registered user requiring activation',
+
'NOTIFY_METHOD' => 'Notification method',
'NOTIFY_METHOD_BOTH' => 'Both',
- 'NOTIFY_METHOD_EMAIL' => 'E-mail only',
+ 'NOTIFY_METHOD_EMAIL' => 'Email only',
'NOTIFY_METHOD_EXPLAIN' => 'Method for sending messages sent via this board.',
'NOTIFY_METHOD_IM' => 'Jabber only',
'NOTIFY_ON_PM' => 'Notify me on new private messages',
@@ -293,8 +349,10 @@ $lang = array_merge($lang, array(
'NOT_ADDED_FOES_SELF' => 'You cannot add yourself to the foes list.',
'NOT_AGREE' => 'I do not agree to these terms',
'NOT_ENOUGH_SPACE_FOLDER' => 'The destination folder “%s” seems to be full. The requested action has not been taken.',
- 'NOT_MOVED_MESSAGE' => 'You have 1 private message currently on hold because of full folder.',
- 'NOT_MOVED_MESSAGES' => 'You have %d private messages currently on hold because of full folder.',
+ 'NOT_MOVED_MESSAGES' => array(
+ 1 => 'You have %d private message currently on hold because of full folder.',
+ 2 => 'You have %d private messages currently on hold because of full folder.',
+ ),
'NO_ACTION_MODE' => 'No message action specified.',
'NO_AUTHOR' => 'No author defined for this message',
'NO_AVATAR_CATEGORY' => 'None',
@@ -304,6 +362,7 @@ $lang = array_merge($lang, array(
'NO_AUTH_FORWARD_MESSAGE' => 'You are not authorised to forward private messages.',
'NO_AUTH_GROUP_MESSAGE' => 'You are not authorised to send private messages to groups.',
'NO_AUTH_PASSWORD_REMINDER' => 'You are not authorised to request a new password.',
+ 'NO_AUTH_PROFILEINFO' => 'You are not authorised to change your profile information.',
'NO_AUTH_READ_HOLD_MESSAGE' => 'You are not authorised to read private messages that are on hold.',
'NO_AUTH_READ_MESSAGE' => 'You are not authorised to read private messages.',
'NO_AUTH_READ_REMOVED_MESSAGE' => 'You are not able to read this message because it was removed by the author.',
@@ -314,7 +373,7 @@ $lang = array_merge($lang, array(
'NO_BOOKMARKS' => 'You have no bookmarks.',
'NO_BOOKMARKS_SELECTED' => 'You have selected no bookmarks.',
'NO_EDIT_READ_MESSAGE' => 'Private message cannot be edited because it has already been read.',
- 'NO_EMAIL_USER' => 'The e-mail/username information submitted could not be found.',
+ 'NO_EMAIL_USER' => 'The email/username information submitted could not be found.',
'NO_FOES' => 'No foes currently defined',
'NO_FRIENDS' => 'No friends currently defined',
'NO_FRIENDS_OFFLINE' => 'No friends offline',
@@ -334,13 +393,13 @@ $lang = array_merge($lang, array(
'NO_WATCHED_SELECTED' => 'You have not selected any subscribed topics or forums.',
'NO_WATCHED_TOPICS' => 'You are not subscribed to any topics.',
- 'PASS_TYPE_ALPHA_EXPLAIN' => 'Password must be between %1$d and %2$d characters long, must contain letters in mixed case and must contain numbers.',
- 'PASS_TYPE_ANY_EXPLAIN' => 'Must be between %1$d and %2$d characters.',
- 'PASS_TYPE_CASE_EXPLAIN' => 'Password must be between %1$d and %2$d characters long and must contain letters in mixed case.',
- 'PASS_TYPE_SYMBOL_EXPLAIN' => 'Password must be between %1$d and %2$d characters long, must contain letters in mixed case, must contain numbers and must contain symbols.',
+ 'PASS_TYPE_ALPHA_EXPLAIN' => 'Password must be between %1$s and %2$s long, must contain letters in mixed case and must contain numbers.',
+ 'PASS_TYPE_ANY_EXPLAIN' => 'Must be between %1$s and %2$s.',
+ 'PASS_TYPE_CASE_EXPLAIN' => 'Password must be between %1$s and %2$s long and must contain letters in mixed case.',
+ 'PASS_TYPE_SYMBOL_EXPLAIN' => 'Password must be between %1$s and %2$s long, must contain letters in mixed case, must contain numbers and must contain symbols.',
'PASSWORD' => 'Password',
'PASSWORD_ACTIVATED' => 'Your new password has been activated.',
- 'PASSWORD_UPDATED' => 'A new password was sent to your registered e-mail address.',
+ 'PASSWORD_UPDATED' => 'A new password was sent to your registered email address.',
'PERMISSIONS_RESTORED' => 'Successfully restored original permissions.',
'PERMISSIONS_TRANSFERRED' => 'Successfully transferred permissions from <strong>%s</strong>, you are now able to browse the board with this user’s permissions.<br />Please note that admin permissions were not transferred. You are able to revert to your permission set at any time.',
'PM_DISABLED' => 'Private messaging has been disabled on this board.',
@@ -354,7 +413,6 @@ $lang = array_merge($lang, array(
'PM_SUBJECT' => 'Message subject',
'PM_TO' => 'Send to',
'PM_USERS_REMOVED_NO_PM' => 'Some users couldn’t be added as they have disabled private message receipt.',
- 'POPUP_ON_PM' => 'Pop up window on new private message',
'POST_EDIT_PM' => 'Edit message',
'POST_FORWARD_PM' => 'Forward message',
'POST_NEW_PM' => 'Compose message',
@@ -366,6 +424,8 @@ $lang = array_merge($lang, array(
'PREFERENCES_UPDATED' => 'Your preferences have been updated.',
'PROFILE_INFO_NOTICE' => 'Please note that this information may be viewable to other members. Be careful when including any personal details. Any fields marked with a * must be completed.',
'PROFILE_UPDATED' => 'Your profile has been updated.',
+ 'PROFILE_AUTOLOGIN_KEYS' => 'The "Remember Me" login keys automatically log you in when you visit the board. If you logout, the remember me login key is deleted only on the computer you are using to logout. Here you can see remember login keys created on other computers you used to access this site.',
+ 'PROFILE_NO_AUTOLOGIN_KEYS' => 'There are no saved "Remember Me" login keys.',
'RECIPIENT' => 'Recipient',
'RECIPIENTS' => 'Recipients',
@@ -390,17 +450,21 @@ $lang = array_merge($lang, array(
'RULE_DELETED' => 'Rule successfully removed.',
'RULE_LIMIT_REACHED' => 'You cannot add more PM rules. You have reached the maximum number of rules.',
'RULE_NOT_DEFINED' => 'Rule not correctly specified.',
- 'RULE_REMOVED_MESSAGE' => 'One private message had been removed due to private message filters.',
- 'RULE_REMOVED_MESSAGES' => '%d private messages were removed due to private message filters.',
+ 'RULE_REMOVED_MESSAGES' => array(
+ 1 => '%d private message was removed due to private message filters.',
+ 2 => '%d private messages were removed due to private message filters.',
+ ),
'SAME_PASSWORD_ERROR' => 'The new password you entered is the same as your current password.',
'SEARCH_YOUR_POSTS' => 'Show your posts',
'SEND_PASSWORD' => 'Send password',
'SENT_AT' => 'Sent', // Used before dates in private messages
- 'SHOW_EMAIL' => 'Users can contact me by e-mail',
+ 'SHOW_EMAIL' => 'Users can contact me by email',
'SIGNATURE_EXPLAIN' => 'This is a block of text that can be added to posts you make. There is a %d character limit.',
'SIGNATURE_PREVIEW' => 'Your signature will appear like this in posts',
'SIGNATURE_TOO_LONG' => 'Your signature is too long.',
+ 'SELECT_CURRENT_TIME' => 'Select current time',
+ 'SELECT_TIMEZONE' => 'Select timezone',
'SORT' => 'Sort',
'SORT_COMMENT' => 'File comment',
'SORT_DOWNLOADS' => 'Downloads',
@@ -410,20 +474,33 @@ $lang = array_merge($lang, array(
'SORT_SIZE' => 'File size',
'TIMEZONE' => 'Timezone',
- 'TO' => 'To',
+ 'TIMEZONE_DATE_SUGGESTION' => 'Suggestion: %s',
+ 'TIMEZONE_INVALID' => 'The timezone you selected is invalid.',
+ 'TO' => 'Recipient',
+ 'TO_MASS' => 'Recipients',
+ 'TO_ADD' => 'Add recipient',
+ 'TO_ADD_MASS' => 'Add recipients',
+ 'TO_ADD_GROUPS' => 'Add groups',
'TOO_MANY_RECIPIENTS' => 'You tried to send a private message to too many recipients.',
'TOO_MANY_REGISTERS' => 'You have exceeded the maximum number of registration attempts for this session. Please try again later.',
'UCP' => 'User Control Panel',
'UCP_ACTIVATE' => 'Activate account',
- 'UCP_ADMIN_ACTIVATE' => 'Please note that you will need to enter a valid e-mail address before your account is activated. The administrator will review your account and if approved you will receive an e-mail at the address you specified.',
- 'UCP_AIM' => 'AOL Instant Messenger',
+ 'UCP_ADMIN_ACTIVATE' => 'Please note that you will need to enter a valid email address before your account is activated. The administrator will review your account and if approved you will receive an email at the address you specified.',
'UCP_ATTACHMENTS' => 'Attachments',
+ 'UCP_AUTH_LINK' => 'External accounts',
+ 'UCP_AUTH_LINK_ASK' => 'You currently have no account associated with this external service. Click the button below to link your board account to an account with this external service.',
+ 'UCP_AUTH_LINK_ID' => 'Unique identifier',
+ 'UCP_AUTH_LINK_LINK' => 'Link',
+ 'UCP_AUTH_LINK_MANAGE' => 'Manage external account associations',
+ 'UCP_AUTH_LINK_NOT_SUPPORTED' => 'Linking board accounts to external services is not supported by this board’s current authentication method.',
+ 'UCP_AUTH_LINK_TITLE' => 'Manage your external account associations',
+ 'UCP_AUTH_LINK_UNLINK' => 'Unlink',
'UCP_COPPA_BEFORE' => 'Before %s',
'UCP_COPPA_ON_AFTER' => 'On or after %s',
- 'UCP_EMAIL_ACTIVATE' => 'Please note that you will need to enter a valid e-mail address before your account is activated. You will receive an e-mail at the address you provide that contains an account activation link.',
- 'UCP_ICQ' => 'ICQ number',
+ 'UCP_EMAIL_ACTIVATE' => 'Please note that you will need to enter a valid email address before your account is activated. You will receive an email at the address you provide that contains an account activation link.',
'UCP_JABBER' => 'Jabber address',
+ 'UCP_LOGIN_LINK' => 'Set up an external account association',
'UCP_MAIN' => 'Overview',
'UCP_MAIN_ATTACHMENTS' => 'Manage attachments',
@@ -432,9 +509,13 @@ $lang = array_merge($lang, array(
'UCP_MAIN_FRONT' => 'Front page',
'UCP_MAIN_SUBSCRIBED' => 'Manage subscriptions',
- 'UCP_MSNM' => 'WL/MSN Messenger',
'UCP_NO_ATTACHMENTS' => 'You have posted no files.',
+ 'UCP_NOTIFICATION_LIST' => 'Manage notifications',
+ 'UCP_NOTIFICATION_LIST_EXPLAIN' => 'Here you may view all past notifications.',
+ 'UCP_NOTIFICATION_OPTIONS' => 'Edit notification options',
+ 'UCP_NOTIFICATION_OPTIONS_EXPLAIN' => 'Here you can set your preferred notification methods for the board.',
+
'UCP_PREFS' => 'Board preferences',
'UCP_PREFS_PERSONAL' => 'Edit global settings',
'UCP_PREFS_POST' => 'Edit posting defaults',
@@ -444,8 +525,6 @@ $lang = array_merge($lang, array(
'UCP_PM_COMPOSE' => 'Compose message',
'UCP_PM_DRAFTS' => 'Manage PM drafts',
'UCP_PM_OPTIONS' => 'Rules, folders &amp; settings',
- 'UCP_PM_POPUP' => 'Private messages',
- 'UCP_PM_POPUP_TITLE' => 'Private message popup',
'UCP_PM_UNREAD' => 'Unread messages',
'UCP_PM_VIEW' => 'View messages',
@@ -454,16 +533,17 @@ $lang = array_merge($lang, array(
'UCP_PROFILE_PROFILE_INFO' => 'Edit profile',
'UCP_PROFILE_REG_DETAILS' => 'Edit account settings',
'UCP_PROFILE_SIGNATURE' => 'Edit signature',
+ 'UCP_PROFILE_AUTOLOGIN_KEYS'=> 'Manage “Remember Me” login keys',
'UCP_USERGROUPS' => 'Usergroups',
'UCP_USERGROUPS_MEMBER' => 'Edit memberships',
'UCP_USERGROUPS_MANAGE' => 'Manage groups',
+ 'UCP_PASSWORD_RESET_DISABLED' => 'The password reset functionality has been disabled. If you need help accessing your account, please contact the %sBoard Administrator%s',
'UCP_REGISTER_DISABLE' => 'Creating a new account is currently not possible.',
'UCP_REMIND' => 'Send password',
- 'UCP_RESEND' => 'Send activation e-mail',
+ 'UCP_RESEND' => 'Send activation email',
'UCP_WELCOME' => 'Welcome to the User Control Panel. From here you can monitor, view and update your profile, preferences, subscribed forums and topics. You can also send messages to other users (if permitted). Please ensure you read any announcements before continuing.',
- 'UCP_YIM' => 'Yahoo Messenger',
'UCP_ZEBRA' => 'Friends &amp; Foes',
'UCP_ZEBRA_FOES' => 'Manage foes',
'UCP_ZEBRA_FRIENDS' => 'Manage friends',
@@ -473,12 +553,12 @@ $lang = array_merge($lang, array(
'UPLOAD_AVATAR_FILE' => 'Upload from your machine',
'UPLOAD_AVATAR_URL' => 'Upload from a URL',
'UPLOAD_AVATAR_URL_EXPLAIN' => 'Enter the URL of the location containing the image. The image will be copied to this site.',
- 'USERNAME_ALPHA_ONLY_EXPLAIN' => 'Username must be between %1$d and %2$d chars long and use only alphanumeric characters.',
- 'USERNAME_ALPHA_SPACERS_EXPLAIN'=> 'Username must be between %1$d and %2$d chars long and use alphanumeric, space or -+_[] characters.',
- 'USERNAME_ASCII_EXPLAIN' => 'Username must be between %1$d and %2$d chars long and use only ASCII characters, so no special symbols.',
- 'USERNAME_LETTER_NUM_EXPLAIN' => 'Username must be between %1$d and %2$d chars long and use only letter or number characters.',
- 'USERNAME_LETTER_NUM_SPACERS_EXPLAIN'=> 'Username must be between %1$d and %2$d chars long and use letter, number, space or -+_[] characters.',
- 'USERNAME_CHARS_ANY_EXPLAIN' => 'Length must be between %1$d and %2$d characters.',
+ 'USERNAME_ALPHA_ONLY_EXPLAIN' => 'Username must be between %1$s and %2$s long and use only alphanumeric characters.',
+ 'USERNAME_ALPHA_SPACERS_EXPLAIN'=> 'Username must be between %1$s and %2$s long and use alphanumeric, space or -+_[] characters.',
+ 'USERNAME_ASCII_EXPLAIN' => 'Username must be between %1$s and %2$s long and use only ASCII characters, so no special symbols.',
+ 'USERNAME_LETTER_NUM_EXPLAIN' => 'Username must be between %1$s and %2$s long and use only letter or number characters.',
+ 'USERNAME_LETTER_NUM_SPACERS_EXPLAIN'=> 'Username must be between %1$s and %2$s long and use letter, number, space or -+_[] characters.',
+ 'USERNAME_CHARS_ANY_EXPLAIN' => 'Length must be between %1$s and %2$s.',
'USERNAME_TAKEN_USERNAME' => 'The username you entered is already in use, please select an alternative.',
'USERNAME_DISALLOWED_USERNAME' => 'The username you entered has been disallowed or contains a disallowed word. Please choose a different name.',
'USER_NOT_FOUND_OR_INACTIVE' => 'The usernames you specified could either not be found or are not activated users.',
@@ -491,8 +571,10 @@ $lang = array_merge($lang, array(
'VIEW_NEXT_PM' => 'Next PM',
'VIEW_PM' => 'View message',
'VIEW_PM_INFO' => 'Message details',
- 'VIEW_PM_MESSAGE' => '1 message',
- 'VIEW_PM_MESSAGES' => '%d messages',
+ 'VIEW_PM_MESSAGES' => array(
+ 1 => '%d message',
+ 2 => '%d messages',
+ ),
'VIEW_PREVIOUS_HISTORY' => 'Previous PM in history',
'VIEW_PREVIOUS_PM' => 'Previous PM',
'VIEW_SIGS' => 'Display signatures',
@@ -559,5 +641,3 @@ $lang = array_merge($lang, array(
'NO_PENDING' => 'No pending memberships',
'NO_NONMEMBER' => 'No non-member groups',
));
-
-?> \ No newline at end of file
diff --git a/phpBB/language/en/viewforum.php b/phpBB/language/en/viewforum.php
index d2fae20c62..1dee5d2e57 100644
--- a/phpBB/language/en/viewforum.php
+++ b/phpBB/language/en/viewforum.php
@@ -4,9 +4,8 @@
* viewforum [English]
*
* @package language
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -64,8 +63,8 @@ $lang = array_merge($lang, array(
'UNREAD_POSTS_LOCKED' => 'Unread posts [ Locked ]',
'VIEW_FORUM' => 'View forum',
- 'VIEW_FORUM_TOPIC' => '1 topic',
- 'VIEW_FORUM_TOPICS' => '%d topics',
+ 'VIEW_FORUM_TOPICS' => array(
+ 1 => '%d topic',
+ 2 => '%d topics',
+ ),
));
-
-?> \ No newline at end of file
diff --git a/phpBB/language/en/viewtopic.php b/phpBB/language/en/viewtopic.php
index 3e1874f1ab..b566f4b5c0 100644
--- a/phpBB/language/en/viewtopic.php
+++ b/phpBB/language/en/viewtopic.php
@@ -4,9 +4,8 @@
* viewtopic [English]
*
* @package language
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -36,6 +35,7 @@ if (empty($lang) || !is_array($lang))
// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
$lang = array_merge($lang, array(
+ 'APPROVE' => 'Approve',
'ATTACHMENT' => 'Attachment',
'ATTACHMENT_FUNCTIONALITY_DISABLED' => 'The attachments feature has been disabled.',
@@ -48,20 +48,23 @@ $lang = array_merge($lang, array(
'BUMP_TOPIC' => 'Bump topic',
'CODE' => 'Code',
- 'COLLAPSE_QR' => 'Hide Quick Reply',
'DELETE_TOPIC' => 'Delete topic',
+ 'DELETED_INFORMATION' => 'Deleted by %1$s on %2$s',
+ 'DISAPPROVE' => 'Disapprove',
'DOWNLOAD_NOTICE' => 'You do not have the required permissions to view the files attached to this post.',
- 'EDITED_TIMES_TOTAL' => 'Last edited by %1$s on %2$s, edited %3$d times in total.',
- 'EDITED_TIME_TOTAL' => 'Last edited by %1$s on %2$s, edited %3$d time in total.',
- 'EMAIL_TOPIC' => 'E-mail friend',
+ 'EDITED_TIMES_TOTAL' => array(
+ 1 => 'Last edited by %2$s on %3$s, edited %1$d time in total.',
+ 2 => 'Last edited by %2$s on %3$s, edited %1$d times in total.',
+ ),
+ 'EMAIL_TOPIC' => 'Email friend',
'ERROR_NO_ATTACHMENT' => 'The selected attachment does not exist anymore.',
'FILE_NOT_FOUND_404' => 'The file <strong>%s</strong> does not exist.',
'FORK_TOPIC' => 'Copy topic',
- 'FULL_EDITOR' => 'Full Editor',
-
+ 'FULL_EDITOR' => 'Full Editor &amp; Preview',
+
'LINKAGE_FORBIDDEN' => 'You are not authorised to view, download or link from/to this site.',
'LOGIN_NOTIFY_TOPIC' => 'You have been notified about this topic, please login to view it.',
'LOGIN_VIEWTOPIC' => 'The board requires you to be registered and logged in to view this topic.',
@@ -70,8 +73,10 @@ $lang = array_merge($lang, array(
'MAKE_GLOBAL' => 'Change to “Global”',
'MAKE_NORMAL' => 'Change to “Standard Topic”',
'MAKE_STICKY' => 'Change to “Sticky”',
- 'MAX_OPTIONS_SELECT' => 'You may select up to <strong>%d</strong> options',
- 'MAX_OPTION_SELECT' => 'You may select <strong>1</strong> option',
+ 'MAX_OPTIONS_SELECT' => array(
+ 1 => 'You may select <strong>%d</strong> option',
+ 2 => 'You may select up to <strong>%d</strong> options',
+ ),
'MISSING_INLINE_ATTACHMENT' => 'The attachment <strong>%s</strong> is no longer available',
'MOVE_TOPIC' => 'Move topic',
@@ -85,6 +90,7 @@ $lang = array_merge($lang, array(
'POLL_ENDED_AT' => 'Poll ended at %s',
'POLL_RUN_TILL' => 'Poll runs till %s',
'POLL_VOTED_OPTION' => 'You voted for this option',
+ 'POST_DELETED_RESTORE' => 'This post has been deleted. It can be restored.',
'PRINT_TOPIC' => 'Print view',
'QUICK_MOD' => 'Quick-mod tools',
@@ -92,11 +98,13 @@ $lang = array_merge($lang, array(
'QUOTE' => 'Quote',
'REPLY_TO_TOPIC' => 'Reply to topic',
+ 'RESTORE' => 'Restore',
+ 'RESTORE_TOPIC' => 'Restore topic',
'RETURN_POST' => '%sReturn to the post%s',
- 'SHOW_QR' => 'Quick Reply',
'SUBMIT_VOTE' => 'Submit vote',
+ 'TOPIC_TOOLS' => 'Topic tools',
'TOTAL_VOTES' => 'Total votes',
'UNLOCK_TOPIC' => 'Unlock topic',
@@ -105,13 +113,12 @@ $lang = array_merge($lang, array(
'VIEW_NEXT_TOPIC' => 'Next topic',
'VIEW_PREVIOUS_TOPIC' => 'Previous topic',
'VIEW_RESULTS' => 'View results',
- 'VIEW_TOPIC_POST' => '1 post',
- 'VIEW_TOPIC_POSTS' => '%d posts',
+ 'VIEW_TOPIC_POSTS' => array(
+ 1 => '%d post',
+ 2 => '%d posts',
+ ),
'VIEW_UNREAD_POST' => 'First unread post',
- 'VISIT_WEBSITE' => 'WWW',
'VOTE_SUBMITTED' => 'Your vote has been cast.',
'VOTE_CONVERTED' => 'Changing votes is not supported for converted polls.',
));
-
-?> \ No newline at end of file
diff --git a/phpBB/mcp.php b/phpBB/mcp.php
index 48cd68500f..1449346deb 100644
--- a/phpBB/mcp.php
+++ b/phpBB/mcp.php
@@ -2,9 +2,8 @@
/**
*
* @package mcp
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -31,15 +30,8 @@ $template->assign_var('S_IN_MCP', true);
// Basic parameter data
$id = request_var('i', '');
-if (isset($_REQUEST['mode']) && is_array($_REQUEST['mode']))
-{
- $mode = request_var('mode', array(''));
- list($mode, ) = each($mode);
-}
-else
-{
- $mode = request_var('mode', '');
-}
+$mode = request_var('mode', array(''));
+$mode = sizeof($mode) ? array_shift($mode) : request_var('mode', '');
// Only Moderators can go beyond this point
if (!$user->data['is_registered'])
@@ -57,7 +49,7 @@ $action = request_var('action', '');
$action_ary = request_var('action', array('' => 0));
$forum_action = request_var('forum_action', '');
-if ($forum_action !== '' && !empty($_POST['sort']))
+if ($forum_action !== '' && $request->variable('sort', false, false, \phpbb\request\request_interface::POST))
{
$action = $forum_action;
}
@@ -92,7 +84,7 @@ if ($post_id)
$db->sql_freeresult($result);
$topic_id = (int) $row['topic_id'];
- $forum_id = (int) ($row['forum_id']) ? $row['forum_id'] : $forum_id;
+ $forum_id = (int) $row['forum_id'];
}
else if ($topic_id)
{
@@ -166,6 +158,7 @@ if ($quickmod)
case 'move':
case 'delete_post':
case 'delete_topic':
+ case 'restore_topic':
$module->load('mcp', 'main', 'quickmod');
return;
break;
@@ -174,7 +167,7 @@ if ($quickmod)
// Reset start parameter if we jumped from the quickmod dropdown
if (request_var('start', 0))
{
- $_REQUEST['start'] = 0;
+ $request->overwrite('start', 0);
}
$module->set_active('logs', 'topic_logs');
@@ -190,7 +183,26 @@ if ($quickmod)
break;
default:
- trigger_error("$action not allowed as quickmod", E_USER_ERROR);
+ // If needed, the flag can be set to true within event listener
+ // to indicate that the action was handled properly
+ // and to pass by the trigger_error() call below
+ $is_valid_action = false;
+
+ /**
+ * This event allows you to add custom quickmod options
+ *
+ * @event core.modify_quickmod_options
+ * @var object module Instance of module system class
+ * @var string action Quickmod option
+ * @var bool is_valid_action Flag indicating if the action was handled properly
+ * @since 3.1.0-a4
+ */
+ extract($phpbb_dispatcher->trigger_event('core.modify_quickmod_options', compact(array('module', 'action', 'is_valid_action'))));
+
+ if (!$is_valid_action)
+ {
+ trigger_error($user->lang('QUICKMOD_ACTION_NOT_ALLOWED', $action), E_USER_ERROR);
+ }
break;
}
}
@@ -207,7 +219,7 @@ if (!$post_id)
$module->set_display('warn', 'warn_post', false);
}
-if ($mode == '' || $mode == 'unapproved_topics' || $mode == 'unapproved_posts')
+if ($mode == '' || $mode == 'unapproved_topics' || $mode == 'unapproved_posts' || $mode == 'deleted_topics' || $mode == 'deleted_posts')
{
$module->set_display('queue', 'approve_details', false);
}
@@ -240,6 +252,23 @@ if (!$user_id && $username == '')
$module->set_display('warn', 'warn_user', false);
}
+/**
+* This event allows you to set display option for custom MCP modules
+*
+* @event core.modify_mcp_modules_display_option
+* @var p_master module Module system class
+* @var string mode MCP mode
+* @var int user_id User id
+* @var int forum_id Forum id
+* @var int topic_id Topic id
+* @var int post_id Post id
+* @var string username User name
+* @var int id Parent module id
+* @since 3.1.0-b2
+*/
+$vars = array('module', 'mode', 'user_id', 'forum_id', 'topic_id', 'post_id', 'username', 'id');
+extract($phpbb_dispatcher->trigger_event('core.modify_mcp_modules_display_option', compact($vars)));
+
// Load and execute the relevant module
$module->load_active();
@@ -255,7 +284,7 @@ $template->assign_vars(array(
));
// Generate the page, do not display/query online list
-$module->display($module->get_page_title(), false);
+$module->display($module->get_page_title());
/**
* Functions used to generate additional URL paramters
@@ -407,12 +436,6 @@ function get_topic_data($topic_ids, $acl_list = false, $read_tracking = false)
while ($row = $db->sql_fetchrow($result))
{
- if (!$row['forum_id'])
- {
- // Global Announcement?
- $row['forum_id'] = request_var('f', 0);
- }
-
$rowset[$row['topic_id']] = $row;
if ($acl_list && !$auth->acl_gets($acl_list, $row['forum_id']))
@@ -492,18 +515,12 @@ function get_post_data($post_ids, $acl_list = false, $read_tracking = false)
while ($row = $db->sql_fetchrow($result))
{
- if (!$row['forum_id'])
- {
- // Global Announcement?
- $row['forum_id'] = request_var('f', 0);
- }
-
if ($acl_list && !$auth->acl_gets($acl_list, $row['forum_id']))
{
continue;
}
- if (!$row['post_approved'] && !$auth->acl_get('m_approve', $row['forum_id']))
+ if ($row['post_visibility'] != ITEM_APPROVED && !$auth->acl_get('m_approve', $row['forum_id']))
{
// Moderators without the permission to approve post should at least not see them. ;)
continue;
@@ -521,7 +538,7 @@ function get_post_data($post_ids, $acl_list = false, $read_tracking = false)
*/
function get_forum_data($forum_id, $acl_list = 'f_list', $read_tracking = false)
{
- global $auth, $db, $user, $config;
+ global $auth, $db, $user, $config, $phpbb_container;
$rowset = array();
@@ -551,6 +568,8 @@ function get_forum_data($forum_id, $acl_list = 'f_list', $read_tracking = false)
WHERE " . $db->sql_in_set('f.forum_id', $forum_id);
$result = $db->sql_query($sql);
+ $phpbb_content_visibility = $phpbb_container->get('content.visibility');
+
while ($row = $db->sql_fetchrow($result))
{
if ($acl_list && !$auth->acl_gets($acl_list, $row['forum_id']))
@@ -558,10 +577,7 @@ function get_forum_data($forum_id, $acl_list = 'f_list', $read_tracking = false)
continue;
}
- if ($auth->acl_get('m_approve', $row['forum_id']))
- {
- $row['forum_topics'] = $row['forum_topics_real'];
- }
+ $row['forum_topics_approved'] = $phpbb_content_visibility->get_count('forum_topics', $row, $row['forum_id']);
$rowset[$row['forum_id']] = $row;
}
@@ -639,7 +655,7 @@ function mcp_sorting($mode, &$sort_days, &$sort_key, &$sort_dir, &$sort_by_sql,
if (!$auth->acl_get('m_approve', $forum_id))
{
- $sql .= 'AND topic_approved = 1';
+ $sql .= 'AND topic_visibility = ' . ITEM_APPROVED;
}
break;
@@ -655,11 +671,13 @@ function mcp_sorting($mode, &$sort_days, &$sort_key, &$sort_dir, &$sort_by_sql,
if (!$auth->acl_get('m_approve', $forum_id))
{
- $sql .= 'AND post_approved = 1';
+ $sql .= 'AND post_visibility = ' . ITEM_APPROVED;
}
break;
case 'unapproved_posts':
+ case 'deleted_posts':
+ $visibility_const = ($mode == 'unapproved_posts') ? ITEM_UNAPPROVED : ITEM_DELETED;
$type = 'posts';
$default_key = 't';
$default_dir = 'd';
@@ -668,9 +686,9 @@ function mcp_sorting($mode, &$sort_days, &$sort_key, &$sort_dir, &$sort_by_sql,
$sql = 'SELECT COUNT(p.post_id) AS total
FROM ' . POSTS_TABLE . ' p, ' . TOPICS_TABLE . " t
$where_sql " . $db->sql_in_set('p.forum_id', ($forum_id) ? array($forum_id) : array_intersect(get_forum_list('f_read'), get_forum_list('m_approve'))) . '
- AND p.post_approved = 0
+ AND p.post_visibility = ' . $visibility_const . '
AND t.topic_id = p.topic_id
- AND t.topic_first_post_id <> p.post_id';
+ AND t.topic_visibility <> p.post_visibility';
if ($min_time)
{
@@ -679,6 +697,8 @@ function mcp_sorting($mode, &$sort_days, &$sort_key, &$sort_dir, &$sort_by_sql,
break;
case 'unapproved_topics':
+ case 'deleted_topics':
+ $visibility_const = ($mode == 'unapproved_topics') ? ITEM_UNAPPROVED : ITEM_DELETED;
$type = 'topics';
$default_key = 't';
$default_dir = 'd';
@@ -686,7 +706,7 @@ function mcp_sorting($mode, &$sort_days, &$sort_key, &$sort_dir, &$sort_by_sql,
$sql = 'SELECT COUNT(topic_id) AS total
FROM ' . TOPICS_TABLE . "
$where_sql " . $db->sql_in_set('forum_id', ($forum_id) ? array($forum_id) : array_intersect(get_forum_list('f_read'), get_forum_list('m_approve'))) . '
- AND topic_approved = 0';
+ AND topic_visibility = ' . $visibility_const;
if ($min_time)
{
@@ -768,7 +788,7 @@ function mcp_sorting($mode, &$sort_days, &$sort_key, &$sort_dir, &$sort_by_sql,
$limit_days = array(0 => $user->lang['ALL_TOPICS'], 1 => $user->lang['1_DAY'], 7 => $user->lang['7_DAYS'], 14 => $user->lang['2_WEEKS'], 30 => $user->lang['1_MONTH'], 90 => $user->lang['3_MONTHS'], 180 => $user->lang['6_MONTHS'], 365 => $user->lang['1_YEAR']);
$sort_by_text = array('a' => $user->lang['AUTHOR'], 't' => $user->lang['POST_TIME'], 'tt' => $user->lang['TOPIC_TIME'], 'r' => $user->lang['REPLIES'], 's' => $user->lang['SUBJECT'], 'v' => $user->lang['VIEWS']);
- $sort_by_sql = array('a' => 't.topic_first_poster_name', 't' => 't.topic_last_post_time', 'tt' => 't.topic_time', 'r' => (($auth->acl_get('m_approve', $forum_id)) ? 't.topic_replies_real' : 't.topic_replies'), 's' => 't.topic_title', 'v' => 't.topic_views');
+ $sort_by_sql = array('a' => 't.topic_first_poster_name', 't' => 't.topic_last_post_time', 'tt' => 't.topic_time', 'r' => (($auth->acl_get('m_approve', $forum_id)) ? 't.topic_posts_approved + t.topic_posts_unapproved + t.topic_posts_softdeleted' : 't.topic_posts_approved'), 's' => 't.topic_title', 'v' => 't.topic_views');
$limit_time_sql = ($min_time) ? "AND t.topic_last_post_time >= $min_time" : '';
break;
@@ -816,7 +836,7 @@ function mcp_sorting($mode, &$sort_days, &$sort_key, &$sort_dir, &$sort_by_sql,
'S_SELECT_SORT_DAYS' => $s_limit_days)
);
- if (($sort_days && $mode != 'viewlogs') || in_array($mode, array('reports', 'unapproved_topics', 'unapproved_posts')) || $where_sql != 'WHERE')
+ if (($sort_days && $mode != 'viewlogs') || in_array($mode, array('reports', 'unapproved_topics', 'unapproved_posts', 'deleted_topics', 'deleted_posts')) || $where_sql != 'WHERE')
{
$result = $db->sql_query($sql);
$total = (int) $db->sql_fetchfield('total');
@@ -911,5 +931,3 @@ function check_ids(&$ids, $table, $sql_id, $acl_list = false, $single_forum = fa
return ($single_forum === false) ? true : (int) $forum_id;
}
-
-?> \ No newline at end of file
diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php
index 7e510a3368..07c7ceaa13 100644
--- a/phpBB/memberlist.php
+++ b/phpBB/memberlist.php
@@ -2,9 +2,8 @@
/**
*
* @package phpBB3
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -30,8 +29,15 @@ $username = request_var('un', '', true);
$group_id = request_var('g', 0);
$topic_id = request_var('t', 0);
+// Redirect when old mode is used
+if ($mode == 'leaders')
+{
+ send_status_line(301, 'Moved Permanently');
+ redirect(append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=team'));
+}
+
// Check our mode...
-if (!in_array($mode, array('', 'group', 'viewprofile', 'email', 'contact', 'searchuser', 'leaders')))
+if (!in_array($mode, array('', 'group', 'viewprofile', 'email', 'contact', 'searchuser', 'team')))
{
trigger_error('NO_MODE');
}
@@ -65,196 +71,228 @@ $sort_dir = request_var('sd', 'a');
// What do you want to do today? ... oops, I think that line is taken ...
switch ($mode)
{
- case 'leaders':
+ case 'team':
// Display a listing of board admins, moderators
include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
$page_title = $user->lang['THE_TEAM'];
- $template_html = 'memberlist_leaders.html';
-
- $user_ary = $auth->acl_get_list(false, array('a_', 'm_'), false);
-
- $admin_id_ary = $global_mod_id_ary = $mod_id_ary = $forum_id_ary = array();
- foreach ($user_ary as $forum_id => $forum_ary)
- {
- foreach ($forum_ary as $auth_option => $id_ary)
- {
- if (!$forum_id)
- {
- if ($auth_option == 'a_')
- {
- $admin_id_ary = array_merge($admin_id_ary, $id_ary);
- }
- else
- {
- $global_mod_id_ary = array_merge($global_mod_id_ary, $id_ary);
- }
- continue;
- }
- else
- {
- $mod_id_ary = array_merge($mod_id_ary, $id_ary);
- }
+ $template_html = 'memberlist_team.html';
- if ($forum_id)
- {
- foreach ($id_ary as $id)
- {
- $forum_id_ary[$id][] = $forum_id;
- }
- }
- }
- }
-
- $admin_id_ary = array_unique($admin_id_ary);
- $global_mod_id_ary = array_unique($global_mod_id_ary);
+ $sql = 'SELECT *
+ FROM ' . TEAMPAGE_TABLE . '
+ ORDER BY teampage_position ASC';
+ $result = $db->sql_query($sql, 3600);
+ $teampage_data = $db->sql_fetchrowset($result);
+ $db->sql_freeresult($result);
- $mod_id_ary = array_merge($mod_id_ary, $global_mod_id_ary);
- $mod_id_ary = array_unique($mod_id_ary);
+ $sql_ary = array(
+ 'SELECT' => 'g.group_id, g.group_name, g.group_colour, g.group_type, ug.user_id as ug_user_id, t.teampage_id',
- // Admin group id...
- $sql = 'SELECT group_id
- FROM ' . GROUPS_TABLE . "
- WHERE group_name = 'ADMINISTRATORS'";
- $result = $db->sql_query($sql);
- $admin_group_id = (int) $db->sql_fetchfield('group_id');
- $db->sql_freeresult($result);
+ 'FROM' => array(GROUPS_TABLE => 'g'),
- // Get group memberships for the admin id ary...
- $admin_memberships = group_memberships($admin_group_id, $admin_id_ary);
+ 'LEFT_JOIN' => array(
+ array(
+ 'FROM' => array(TEAMPAGE_TABLE => 't'),
+ 'ON' => 't.group_id = g.group_id',
+ ),
+ array(
+ 'FROM' => array(USER_GROUP_TABLE => 'ug'),
+ 'ON' => 'ug.group_id = g.group_id AND ug.user_pending = 0 AND ug.user_id = ' . (int) $user->data['user_id'],
+ ),
+ ),
+ );
- $admin_user_ids = array();
+ $result = $db->sql_query($db->sql_build_query('SELECT', $sql_ary));
- if (!empty($admin_memberships))
+ $group_ids = $groups_ary = array();
+ while ($row = $db->sql_fetchrow($result))
{
- // ok, we only need the user ids...
- foreach ($admin_memberships as $row)
+ if ($row['group_type'] == GROUP_HIDDEN && !$auth->acl_gets('a_group', 'a_groupadd', 'a_groupdel') && $row['ug_user_id'] != $user->data['user_id'])
{
- $admin_user_ids[$row['user_id']] = true;
+ $row['group_name'] = $user->lang['GROUP_UNDISCLOSED'];
+ $row['u_group'] = '';
+ }
+ else
+ {
+ $row['group_name'] = ($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['group_name']] : $row['group_name'];
+ $row['u_group'] = append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=group&amp;g=' . $row['group_id']);
}
- }
- unset($admin_memberships);
-
- $sql = 'SELECT forum_id, forum_name
- FROM ' . FORUMS_TABLE;
- $result = $db->sql_query($sql);
- $forums = array();
- while ($row = $db->sql_fetchrow($result))
- {
- $forums[$row['forum_id']] = $row['forum_name'];
+ if ($row['teampage_id'])
+ {
+ // Only put groups into the array we want to display.
+ // We are fetching all groups, to ensure we got all data for default groups.
+ $group_ids[] = (int) $row['group_id'];
+ }
+ $groups_ary[(int) $row['group_id']] = $row;
}
$db->sql_freeresult($result);
- $sql = $db->sql_build_query('SELECT', array(
- 'SELECT' => 'u.user_id, u.group_id as default_group, u.username, u.username_clean, u.user_colour, u.user_rank, u.user_posts, u.user_allow_pm, g.group_id, g.group_name, g.group_colour, g.group_type, ug.user_id as ug_user_id',
+ $sql_ary = array(
+ 'SELECT' => 'u.user_id, u.group_id as default_group, u.username, u.username_clean, u.user_colour, u.user_rank, u.user_posts, u.user_allow_pm, g.group_id',
'FROM' => array(
- USERS_TABLE => 'u',
- GROUPS_TABLE => 'g'
+ USER_GROUP_TABLE => 'ug',
),
'LEFT_JOIN' => array(
array(
- 'FROM' => array(USER_GROUP_TABLE => 'ug'),
- 'ON' => 'ug.group_id = g.group_id AND ug.user_pending = 0 AND ug.user_id = ' . $user->data['user_id']
- )
+ 'FROM' => array(USERS_TABLE => 'u'),
+ 'ON' => 'ug.user_id = u.user_id AND ug.user_pending = 0',
+ ),
+ array(
+ 'FROM' => array(GROUPS_TABLE => 'g'),
+ 'ON' => 'ug.group_id = g.group_id',
+ ),
),
- 'WHERE' => $db->sql_in_set('u.user_id', array_unique(array_merge($admin_id_ary, $mod_id_ary)), false, true) . '
- AND u.group_id = g.group_id',
+ 'WHERE' => $db->sql_in_set('g.group_id', $group_ids, false, true),
- 'ORDER_BY' => 'g.group_name ASC, u.username_clean ASC'
- ));
- $result = $db->sql_query($sql);
+ 'ORDER_BY' => 'u.username_clean ASC',
+ );
+
+ $result = $db->sql_query($db->sql_build_query('SELECT', $sql_ary));
+ $user_ary = $user_ids = $group_users = array();
while ($row = $db->sql_fetchrow($result))
{
- $which_row = (in_array($row['user_id'], $admin_id_ary)) ? 'admin' : 'mod';
+ $row['forums'] = '';
+ $row['forums_ary'] = array();
+ $user_ary[(int) $row['user_id']] = $row;
+ $user_ids[] = (int) $row['user_id'];
+ $group_users[(int) $row['group_id']][] = (int) $row['user_id'];
+ }
+ $db->sql_freeresult($result);
- // We sort out admins not within the 'Administrators' group.
- // Else, we will list those as admin only having the permission to view logs for example.
- if ($which_row == 'admin' && empty($admin_user_ids[$row['user_id']]))
- {
- // Remove from admin_id_ary, because the user may be a mod instead
- unset($admin_id_ary[array_search($row['user_id'], $admin_id_ary)]);
+ $user_ids = array_unique($user_ids);
- if (!in_array($row['user_id'], $mod_id_ary) && !in_array($row['user_id'], $global_mod_id_ary))
- {
- continue;
- }
- else
+ if (!empty($user_ids) && $config['teampage_forums'])
+ {
+ $template->assign_var('S_DISPLAY_MODERATOR_FORUMS', true);
+ // Get all moderators
+ $perm_ary = $auth->acl_get_list($user_ids, array('m_'), false);
+
+ foreach ($perm_ary as $forum_id => $forum_ary)
+ {
+ foreach ($forum_ary as $auth_option => $id_ary)
{
- $which_row = 'mod';
+ foreach ($id_ary as $id)
+ {
+ if (!$forum_id)
+ {
+ $user_ary[$id]['forums'] = $user->lang['ALL_FORUMS'];
+ }
+ else
+ {
+ $user_ary[$id]['forums_ary'][] = $forum_id;
+ }
+ }
}
}
- $s_forum_select = '';
- $undisclosed_forum = false;
+ $sql = 'SELECT forum_id, forum_name
+ FROM ' . FORUMS_TABLE;
+ $result = $db->sql_query($sql);
- if (isset($forum_id_ary[$row['user_id']]) && !in_array($row['user_id'], $global_mod_id_ary))
+ $forums = array();
+ while ($row = $db->sql_fetchrow($result))
{
- if ($which_row == 'mod' && sizeof(array_diff(array_keys($forums), $forum_id_ary[$row['user_id']])))
+ $forums[$row['forum_id']] = $row['forum_name'];
+ }
+ $db->sql_freeresult($result);
+
+ foreach ($user_ary as $user_id => $user_data)
+ {
+ if (!$user_data['forums'])
{
- foreach ($forum_id_ary[$row['user_id']] as $forum_id)
+ foreach ($user_data['forums_ary'] as $forum_id)
{
+ $user_ary[$user_id]['forums_options'] = true;
if (isset($forums[$forum_id]))
{
if ($auth->acl_get('f_list', $forum_id))
{
- $s_forum_select .= '<option value="">' . $forums[$forum_id] . '</option>';
- }
- else
- {
- $undisclosed_forum = true;
+ $user_ary[$user_id]['forums'] .= '<option value="">' . $forums[$forum_id] . '</option>';
}
}
}
}
}
+ }
- // If the mod is only moderating non-viewable forums we skip the user. There is no gain in displaying the person then...
- if (!$s_forum_select && $undisclosed_forum)
+ $parent_team = 0;
+ foreach ($teampage_data as $team_data)
+ {
+ // If this team entry has no group, it's a category
+ if (!$team_data['group_id'])
{
-// $s_forum_select = '<option value="">' . $user->lang['FORUM_UNDISCLOSED'] . '</option>';
+ $template->assign_block_vars('group', array(
+ 'GROUP_NAME' => $team_data['teampage_name'],
+ ));
+
+ $parent_team = (int) $team_data['teampage_id'];
continue;
}
- // The person is moderating several "public" forums, therefore the person should be listed, but not giving the real group name if hidden.
- if ($row['group_type'] == GROUP_HIDDEN && !$auth->acl_gets('a_group', 'a_groupadd', 'a_groupdel') && $row['ug_user_id'] != $user->data['user_id'])
+ $group_data = $groups_ary[(int) $team_data['group_id']];
+ $group_id = (int) $team_data['group_id'];
+
+ if (!$team_data['teampage_parent'])
{
- $group_name = $user->lang['GROUP_UNDISCLOSED'];
- $u_group = '';
+ // If the group does not have a parent category, we display the groupname as category
+ $template->assign_block_vars('group', array(
+ 'GROUP_NAME' => $group_data['group_name'],
+ 'GROUP_COLOR' => $group_data['group_colour'],
+ 'U_GROUP' => $group_data['u_group'],
+ ));
}
- else
+
+ // Display group members.
+ if (!empty($group_users[$group_id]))
{
- $group_name = ($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['group_name']] : $row['group_name'];
- $u_group = append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=group&amp;g=' . $row['group_id']);
- }
+ foreach ($group_users[$group_id] as $user_id)
+ {
+ if (isset($user_ary[$user_id]))
+ {
+ $row = $user_ary[$user_id];
+ if ($config['teampage_memberships'] == 1 && ($group_id != $groups_ary[$row['default_group']]['group_id']) && $groups_ary[$row['default_group']]['teampage_id'])
+ {
+ // Display users in their primary group, instead of the first group, when it is displayed on the teampage.
+ continue;
+ }
- $rank_title = $rank_img = '';
- get_user_rank($row['user_rank'], (($row['user_id'] == ANONYMOUS) ? false : $row['user_posts']), $rank_title, $rank_img, $rank_img_src);
+ $rank_title = $rank_img = $rank_img_src = '';
+ get_user_rank($row['user_rank'], (($row['user_id'] == ANONYMOUS) ? false : $row['user_posts']), $rank_title, $rank_img, $rank_img_src);
- $template->assign_block_vars($which_row, array(
- 'USER_ID' => $row['user_id'],
- 'FORUMS' => $s_forum_select,
- 'RANK_TITLE' => $rank_title,
- 'GROUP_NAME' => $group_name,
- 'GROUP_COLOR' => $row['group_colour'],
+ $template->assign_block_vars('group.user', array(
+ 'USER_ID' => $row['user_id'],
+ 'FORUMS' => $row['forums'],
+ 'FORUM_OPTIONS' => (isset($row['forums_options'])) ? true : false,
+ 'RANK_TITLE' => $rank_title,
- 'RANK_IMG' => $rank_img,
- 'RANK_IMG_SRC' => $rank_img_src,
+ 'GROUP_NAME' => $groups_ary[$row['default_group']]['group_name'],
+ 'GROUP_COLOR' => $groups_ary[$row['default_group']]['group_colour'],
+ 'U_GROUP' => $groups_ary[$row['default_group']]['u_group'],
- 'U_GROUP' => $u_group,
- 'U_PM' => ($config['allow_privmsg'] && $auth->acl_get('u_sendpm') && ($row['user_allow_pm'] || $auth->acl_gets('a_', 'm_') || $auth->acl_getf_global('m_'))) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&amp;mode=compose&amp;u=' . $row['user_id']) : '',
+ 'RANK_IMG' => $rank_img,
+ 'RANK_IMG_SRC' => $rank_img_src,
- 'USERNAME_FULL' => get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']),
- 'USERNAME' => get_username_string('username', $row['user_id'], $row['username'], $row['user_colour']),
- 'USER_COLOR' => get_username_string('colour', $row['user_id'], $row['username'], $row['user_colour']),
- 'U_VIEW_PROFILE' => get_username_string('profile', $row['user_id'], $row['username'], $row['user_colour']),
- ));
+ 'U_PM' => ($config['allow_privmsg'] && $auth->acl_get('u_sendpm') && ($row['user_allow_pm'] || $auth->acl_gets('a_', 'm_') || $auth->acl_getf_global('m_'))) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&amp;mode=compose&amp;u=' . $row['user_id']) : '',
+
+ 'USERNAME_FULL' => get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']),
+ 'USERNAME' => get_username_string('username', $row['user_id'], $row['username'], $row['user_colour']),
+ 'USER_COLOR' => get_username_string('colour', $row['user_id'], $row['username'], $row['user_colour']),
+ 'U_VIEW_PROFILE' => get_username_string('profile', $row['user_id'], $row['username'], $row['user_colour']),
+ ));
+
+ if ($config['teampage_memberships'] != 2)
+ {
+ unset($user_ary[$user_id]);
+ }
+ }
+ }
+ }
}
- $db->sql_freeresult($result);
$template->assign_vars(array(
'PM_IMG' => $user->img('icon_contact_pm', $user->lang['SEND_PRIVATE_MESSAGE']))
@@ -274,20 +312,6 @@ switch ($mode)
$presence_img = '';
switch ($action)
{
- case 'aim':
- $lang = 'AIM';
- $sql_field = 'user_aim';
- $s_select = 'S_SEND_AIM';
- $s_action = '';
- break;
-
- case 'msnm':
- $lang = 'MSNM';
- $sql_field = 'user_msnm';
- $s_select = 'S_SEND_MSNM';
- $s_action = '';
- break;
-
case 'jabber':
$lang = 'JABBER';
$sql_field = 'user_jabber';
@@ -345,7 +369,7 @@ switch ($mode)
$messenger->subject(htmlspecialchars_decode($subject));
$messenger->replyto($user->data['user_email']);
- $messenger->im($row['user_jabber'], $row['username']);
+ $messenger->set_addresses($row);
$messenger->assign_vars(array(
'BOARD_CONTACT' => $config['board_contact'],
@@ -371,9 +395,6 @@ switch ($mode)
'IM_CONTACT' => $row[$sql_field],
'A_IM_CONTACT' => addslashes($row[$sql_field]),
- 'U_AIM_CONTACT' => ($action == 'aim') ? 'aim:addbuddy?screenname=' . urlencode($row[$sql_field]) : '',
- 'U_AIM_MESSAGE' => ($action == 'aim') ? 'aim:goim?screenname=' . urlencode($row[$sql_field]) . '&amp;message=' . urlencode($config['sitename']) : '',
-
'USERNAME' => $row['username'],
'CONTACT_NAME' => $row[$sql_field],
'SITENAME' => $config['sitename'],
@@ -530,20 +551,11 @@ switch ($mode)
if ($member['user_sig'])
{
- $member['user_sig'] = censor_text($member['user_sig']);
-
- if ($member['user_sig_bbcode_bitfield'])
- {
- include_once($phpbb_root_path . 'includes/bbcode.' . $phpEx);
- $bbcode = new bbcode();
- $bbcode->bbcode_second_pass($member['user_sig'], $member['user_sig_bbcode_uid'], $member['user_sig_bbcode_bitfield']);
- }
-
- $member['user_sig'] = bbcode_nl2br($member['user_sig']);
- $member['user_sig'] = smiley_text($member['user_sig']);
+ $parse_flags = ($member['user_sig_bbcode_bitfield'] ? OPTION_FLAG_BBCODE : 0) | OPTION_FLAG_SMILIES;
+ $member['user_sig'] = generate_text_for_display($member['user_sig'], $member['user_sig_bbcode_uid'], $member['user_sig_bbcode_bitfield'], $parse_flags, true);
}
- $poster_avatar = get_user_avatar($member['user_avatar'], $member['user_avatar_type'], $member['user_avatar_width'], $member['user_avatar_height']);
+ $poster_avatar = phpbb_get_user_avatar($member);
// We need to check if the modules 'zebra' ('friends' & 'foes' mode), 'notes' ('user_notes' mode) and 'warn' ('warn_user' mode) are accessible to decide if we can display appropriate links
$zebra_enabled = $friends_enabled = $foes_enabled = $user_notes_enabled = $warn_user_enabled = false;
@@ -560,25 +572,47 @@ switch ($mode)
$module->list_modules('ucp');
$module->list_modules('mcp');
- $user_notes_enabled = ($module->loaded('notes', 'user_notes')) ? true : false;
- $warn_user_enabled = ($module->loaded('warn', 'warn_user')) ? true : false;
- $zebra_enabled = ($module->loaded('zebra')) ? true : false;
- $friends_enabled = ($module->loaded('zebra', 'friends')) ? true : false;
- $foes_enabled = ($module->loaded('zebra', 'foes')) ? true : false;
+ $user_notes_enabled = ($module->loaded('mcp_notes', 'user_notes')) ? true : false;
+ $warn_user_enabled = ($module->loaded('mcp_warn', 'warn_user')) ? true : false;
+ $zebra_enabled = ($module->loaded('ucp_zebra')) ? true : false;
+ $friends_enabled = ($module->loaded('ucp_zebra', 'friends')) ? true : false;
+ $foes_enabled = ($module->loaded('ucp_zebra', 'foes')) ? true : false;
unset($module);
}
+ /**
+ * Modify user data before we display the profile
+ *
+ * @event core.memberlist_view_profile
+ * @var array member Array with user's data
+ * @var bool user_notes_enabled Is the mcp user notes module
+ * enabled?
+ * @var bool warn_user_enabled Is the mcp warnings module
+ * enabled?
+ * @var bool zebra_enabled Is the ucp zebra module
+ * enabled?
+ * @var bool friends_enabled Is the ucp friends module
+ * enabled?
+ * @var bool foes_enabled Is the ucp foes module
+ * enabled?
+ * @var bool friend Is the user friend?
+ * @var bool foe Is the user foe?
+ * @since 3.1-A1
+ * @changed 3.1.0-b2 Added friend and foe status
+ */
+ $vars = array('member', 'user_notes_enabled', 'warn_user_enabled', 'zebra_enabled', 'friends_enabled', 'foes_enabled', 'friend', 'foe');
+ extract($phpbb_dispatcher->trigger_event('core.memberlist_view_profile', compact($vars)));
+
$template->assign_vars(show_profile($member, $user_notes_enabled, $warn_user_enabled));
// Custom Profile Fields
$profile_fields = array();
if ($config['load_cpf_viewprofile'])
{
- include_once($phpbb_root_path . 'includes/functions_profile_fields.' . $phpEx);
- $cp = new custom_profile();
- $profile_fields = $cp->generate_profile_fields_template('grab', $user_id);
- $profile_fields = (isset($profile_fields[$user_id])) ? $cp->generate_profile_fields_template('show', false, $profile_fields[$user_id]) : array();
+ $cp = $phpbb_container->get('profilefields.manager');
+ $profile_fields = $cp->grab_profile_fields_data($user_id);
+ $profile_fields = (isset($profile_fields[$user_id])) ? $cp->generate_profile_fields_template_data($profile_fields[$user_id]) : array();
}
// If the user has m_approve permission or a_user permission, then list then display unapproved posts
@@ -587,7 +621,7 @@ switch ($mode)
$sql = 'SELECT COUNT(post_id) as posts_in_queue
FROM ' . POSTS_TABLE . '
WHERE poster_id = ' . $user_id . '
- AND post_approved = 0';
+ AND post_visibility = ' . ITEM_UNAPPROVED;
$result = $db->sql_query($sql);
$member['posts_in_queue'] = (int) $db->sql_fetchfield('posts_in_queue');
$db->sql_freeresult($result);
@@ -600,22 +634,15 @@ switch ($mode)
$template->assign_vars(array(
'L_POSTS_IN_QUEUE' => $user->lang('NUM_POSTS_IN_QUEUE', $member['posts_in_queue']),
- 'POSTS_DAY' => sprintf($user->lang['POST_DAY'], $posts_per_day),
- 'POSTS_PCT' => sprintf($user->lang['POST_PCT'], $percentage),
+ 'POSTS_DAY' => $user->lang('POST_DAY', $posts_per_day),
+ 'POSTS_PCT' => $user->lang('POST_PCT', $percentage),
- 'OCCUPATION' => (!empty($member['user_occ'])) ? censor_text($member['user_occ']) : '',
- 'INTERESTS' => (!empty($member['user_interests'])) ? censor_text($member['user_interests']) : '',
'SIGNATURE' => $member['user_sig'],
'POSTS_IN_QUEUE'=> $member['posts_in_queue'],
'AVATAR_IMG' => $poster_avatar,
'PM_IMG' => $user->img('icon_contact_pm', $user->lang['SEND_PRIVATE_MESSAGE']),
'EMAIL_IMG' => $user->img('icon_contact_email', $user->lang['EMAIL']),
- 'WWW_IMG' => $user->img('icon_contact_www', $user->lang['WWW']),
- 'ICQ_IMG' => $user->img('icon_contact_icq', $user->lang['ICQ']),
- 'AIM_IMG' => $user->img('icon_contact_aim', $user->lang['AIM']),
- 'MSN_IMG' => $user->img('icon_contact_msnm', $user->lang['MSNM']),
- 'YIM_IMG' => $user->img('icon_contact_yahoo', $user->lang['YIM']),
'JABBER_IMG' => $user->img('icon_contact_jabber', $user->lang['JABBER']),
'SEARCH_IMG' => $user->img('icon_user_search', $user->lang['SEARCH']),
@@ -623,7 +650,7 @@ switch ($mode)
'S_GROUP_OPTIONS' => $group_options,
'S_CUSTOM_FIELDS' => (isset($profile_fields['row']) && sizeof($profile_fields['row'])) ? true : false,
- 'U_USER_ADMIN' => ($auth->acl_get('a_user')) ? append_sid("{$phpbb_root_path}adm/index.$phpEx", 'i=users&amp;mode=overview&amp;u=' . $user_id, true, $user->session_id) : '',
+ 'U_USER_ADMIN' => ($auth->acl_get('a_user')) ? append_sid("{$phpbb_admin_path}index.$phpEx", 'i=users&amp;mode=overview&amp;u=' . $user_id, true, $user->session_id) : '',
'U_USER_BAN' => ($auth->acl_get('m_ban') && $user_id != $user->data['user_id']) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=ban&amp;mode=user&amp;u=' . $user_id, true, $user->session_id) : '',
'U_MCP_QUEUE' => ($auth->acl_getf_global('m_approve')) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue', true, $user->session_id) : '',
@@ -956,10 +983,11 @@ switch ($mode)
// The basic memberlist
$page_title = $user->lang['MEMBERLIST'];
$template_html = 'memberlist_body.html';
+ $pagination = $phpbb_container->get('pagination');
// Sorting
- $sort_key_text = array('a' => $user->lang['SORT_USERNAME'], 'b' => $user->lang['SORT_LOCATION'], 'c' => $user->lang['SORT_JOINED'], 'd' => $user->lang['SORT_POST_COUNT'], 'f' => $user->lang['WEBSITE'], 'g' => $user->lang['ICQ'], 'h' => $user->lang['AIM'], 'i' => $user->lang['MSNM'], 'j' => $user->lang['YIM'], 'k' => $user->lang['JABBER']);
- $sort_key_sql = array('a' => 'u.username_clean', 'b' => 'u.user_from', 'c' => 'u.user_regdate', 'd' => 'u.user_posts', 'f' => 'u.user_website', 'g' => 'u.user_icq', 'h' => 'u.user_aim', 'i' => 'u.user_msnm', 'j' => 'u.user_yim', 'k' => 'u.user_jabber');
+ $sort_key_text = array('a' => $user->lang['SORT_USERNAME'], 'c' => $user->lang['SORT_JOINED'], 'd' => $user->lang['SORT_POST_COUNT'], 'k' => $user->lang['JABBER']);
+ $sort_key_sql = array('a' => 'u.username_clean', 'c' => 'u.user_regdate', 'd' => 'u.user_posts', 'k' => 'u.user_jabber');
if ($auth->acl_get('a_user'))
{
@@ -1002,19 +1030,15 @@ switch ($mode)
$select_single = request_var('select_single', false);
// Search URL parameters, if any of these are in the URL we do a search
- $search_params = array('username', 'email', 'icq', 'aim', 'yahoo', 'msn', 'jabber', 'search_group_id', 'joined_select', 'active_select', 'count_select', 'joined', 'active', 'count', 'ip');
+ $search_params = array('username', 'email', 'jabber', 'search_group_id', 'joined_select', 'active_select', 'count_select', 'joined', 'active', 'count', 'ip');
// We validate form and field here, only id/class allowed
$form = (!preg_match('/^[a-z0-9_-]+$/i', $form)) ? '' : $form;
$field = (!preg_match('/^[a-z0-9_-]+$/i', $field)) ? '' : $field;
- if (($mode == 'searchuser' || sizeof(array_intersect(array_keys($_GET), $search_params)) > 0) && ($config['load_search'] || $auth->acl_get('a_')))
+ if ((($mode == '' || $mode == 'searchuser') || sizeof(array_intersect($request->variable_names(\phpbb\request\request_interface::GET), $search_params)) > 0) && ($config['load_search'] || $auth->acl_get('a_')))
{
$username = request_var('username', '', true);
$email = strtolower(request_var('email', ''));
- $icq = request_var('icq', '');
- $aim = request_var('aim', '');
- $yahoo = request_var('yahoo', '');
- $msn = request_var('msn', '');
$jabber = request_var('jabber', '');
$search_group_id = request_var('search_group_id', 0);
@@ -1055,23 +1079,14 @@ switch ($mode)
$sql_where .= ($username) ? ' AND u.username_clean ' . $db->sql_like_expression(str_replace('*', $db->any_char, utf8_clean_string($username))) : '';
$sql_where .= ($auth->acl_get('a_user') && $email) ? ' AND u.user_email ' . $db->sql_like_expression(str_replace('*', $db->any_char, $email)) . ' ' : '';
- $sql_where .= ($icq) ? ' AND u.user_icq ' . $db->sql_like_expression(str_replace('*', $db->any_char, $icq)) . ' ' : '';
- $sql_where .= ($aim) ? ' AND u.user_aim ' . $db->sql_like_expression(str_replace('*', $db->any_char, $aim)) . ' ' : '';
- $sql_where .= ($yahoo) ? ' AND u.user_yim ' . $db->sql_like_expression(str_replace('*', $db->any_char, $yahoo)) . ' ' : '';
- $sql_where .= ($msn) ? ' AND u.user_msnm ' . $db->sql_like_expression(str_replace('*', $db->any_char, $msn)) . ' ' : '';
$sql_where .= ($jabber) ? ' AND u.user_jabber ' . $db->sql_like_expression(str_replace('*', $db->any_char, $jabber)) . ' ' : '';
$sql_where .= (is_numeric($count) && isset($find_key_match[$count_select])) ? ' AND u.user_posts ' . $find_key_match[$count_select] . ' ' . (int) $count . ' ' : '';
if (isset($find_key_match[$joined_select]) && sizeof($joined) == 3)
{
- // Before PHP 5.1 an error value -1 can be returned instead of false.
- // Theoretically gmmktime() can also legitimately return -1 as an actual timestamp.
- // But since we do not pass the $second parameter to gmmktime(),
- // an actual unix timestamp -1 cannot be returned in this case.
- // Thus we can check whether it is -1 and treat -1 as an error.
$joined_time = gmmktime(0, 0, 0, (int) $joined[1], (int) $joined[2], (int) $joined[0]);
- if ($joined_time !== false && $joined_time !== -1)
+ if ($joined_time !== false)
{
$sql_where .= " AND u.user_regdate " . $find_key_match[$joined_select] . ' ' . $joined_time;
}
@@ -1081,7 +1096,7 @@ switch ($mode)
{
$active_time = gmmktime(0, 0, 0, (int) $active[1], (int) $active[2], (int) $active[0]);
- if ($active_time !== false && $active_time !== -1)
+ if ($active_time !== false)
{
$sql_where .= " AND u.user_lastvisit " . $find_key_match[$active_select] . ' ' . $active_time;
}
@@ -1126,7 +1141,7 @@ switch ($mode)
$sql = 'SELECT DISTINCT poster_id
FROM ' . POSTS_TABLE . '
WHERE poster_ip ' . ((strpos($ips, '%') !== false) ? 'LIKE' : 'IN') . " ($ips)
- AND forum_id IN (0, " . implode(', ', $ip_forums) . ')';
+ AND " . $db->sql_in_set('forum_id', $ip_forums);
$result = $db->sql_query($sql);
if ($row = $db->sql_fetchrow($result))
@@ -1213,8 +1228,7 @@ switch ($mode)
break;
}
- // Misusing the avatar function for displaying group avatars...
- $avatar_img = get_user_avatar($group_row['group_avatar'], $group_row['group_avatar_type'], $group_row['group_avatar_width'], $group_row['group_avatar_height'], 'GROUP_AVATAR');
+ $avatar_img = phpbb_get_group_avatar($group_row);
// ... same for group rank
$rank_title = $rank_img = $rank_img_src = '';
@@ -1293,10 +1307,6 @@ switch ($mode)
'select_single' => array('select_single', $select_single),
'username' => array('username', '', true),
'email' => array('email', ''),
- 'icq' => array('icq', ''),
- 'aim' => array('aim', ''),
- 'yahoo' => array('yahoo', ''),
- 'msn' => array('msn', ''),
'jabber' => array('jabber', ''),
'search_group_id' => array('search_group_id', 0),
'joined_select' => array('joined_select', 'lt'),
@@ -1367,7 +1377,7 @@ switch ($mode)
}
// Some search user specific data
- if ($mode == 'searchuser' && ($config['load_search'] || $auth->acl_get('a_')))
+ if (($mode == '' || $mode == 'searchuser') && ($config['load_search'] || $auth->acl_get('a_')))
{
$group_selected = request_var('search_group_id', 0);
$s_group_select = '<option value="0"' . ((!$group_selected) ? ' selected="selected"' : '') . '>&nbsp;</option>';
@@ -1425,10 +1435,6 @@ switch ($mode)
$template->assign_vars(array(
'USERNAME' => $username,
'EMAIL' => $email,
- 'ICQ' => $icq,
- 'AIM' => $aim,
- 'YAHOO' => $yahoo,
- 'MSNM' => $msn,
'JABBER' => $jabber,
'JOINED' => implode('-', $joined),
'ACTIVE' => implode('-', $active),
@@ -1438,7 +1444,7 @@ switch ($mode)
'S_IP_SEARCH_ALLOWED' => ($auth->acl_getf_global('m_info')) ? true : false,
'S_EMAIL_SEARCH_ALLOWED'=> ($auth->acl_get('a_user')) ? true : false,
'S_IN_SEARCH_POPUP' => ($form && $field) ? true : false,
- 'S_SEARCH_USER' => true,
+ 'S_SEARCH_USER' => ($mode == 'searchuser' || ($mode == '' && $submit)),
'S_FORM_NAME' => $form,
'S_FIELD_NAME' => $field,
'S_SELECT_SINGLE' => $select_single,
@@ -1451,6 +1457,8 @@ switch ($mode)
);
}
+ $start = $pagination->validate_start($start, $config['topics_per_page'], $config['num_users']);
+
// Get us some users :D
$sql = "SELECT u.user_id
FROM " . USERS_TABLE . " u
@@ -1466,6 +1474,19 @@ switch ($mode)
$user_list[] = (int) $row['user_id'];
}
$db->sql_freeresult($result);
+
+ // Load custom profile fields
+ if ($config['load_cpf_memberlist'])
+ {
+ $cp = $phpbb_container->get('profilefields.manager');
+
+ $cp_row = $cp->generate_profile_fields_template_headlines('field_show_on_ml');
+ foreach ($cp_row as $profile_field)
+ {
+ $template->assign_block_vars('custom_fields', $profile_field);
+ }
+ }
+
$leaders_set = false;
// So, did we get any users?
if (sizeof($user_list))
@@ -1516,11 +1537,20 @@ switch ($mode)
// Load custom profile fields
if ($config['load_cpf_memberlist'])
{
- include_once($phpbb_root_path . 'includes/functions_profile_fields.' . $phpEx);
- $cp = new custom_profile();
-
// Grab all profile fields from users in id cache for later use - similar to the poster cache
- $profile_fields_cache = $cp->generate_profile_fields_template('grab', $user_list);
+ $profile_fields_cache = $cp->grab_profile_fields_data($user_list);
+
+ // Filter the fields we don't want to show
+ foreach ($profile_fields_cache as $user_id => $user_profile_fields)
+ {
+ foreach ($user_profile_fields as $field_ident => $profile_field)
+ {
+ if (!$profile_field['data']['field_show_on_ml'])
+ {
+ unset($profile_fields_cache[$user_id][$field_ident]);
+ }
+ }
+ }
}
// If we sort by last active date we need to adjust the id cache due to user_lastvisit not being the last active date...
@@ -1533,14 +1563,14 @@ switch ($mode)
for ($i = 0, $end = sizeof($user_list); $i < $end; ++$i)
{
$user_id = $user_list[$i];
- $row =& $id_cache[$user_id];
+ $row = $id_cache[$user_id];
$is_leader = (isset($row['group_leader']) && $row['group_leader']) ? true : false;
$leaders_set = ($leaders_set || $is_leader);
$cp_row = array();
if ($config['load_cpf_memberlist'])
{
- $cp_row = (isset($profile_fields_cache[$user_id])) ? $cp->generate_profile_fields_template('show', false, $profile_fields_cache[$user_id]) : array();
+ $cp_row = (isset($profile_fields_cache[$user_id])) ? $cp->generate_profile_fields_template_data($profile_fields_cache[$user_id], false) : array();
}
$memberrow = array_merge(show_profile($row), array(
@@ -1571,36 +1601,24 @@ switch ($mode)
}
}
+ $pagination->generate_template_pagination($pagination_url, 'pagination', 'start', $total_users, $config['topics_per_page'], $start);
+
// Generate page
$template->assign_vars(array(
- 'PAGINATION' => generate_pagination($pagination_url, $total_users, $config['topics_per_page'], $start),
- 'PAGE_NUMBER' => on_page($total_users, $config['topics_per_page'], $start),
- 'TOTAL_USERS' => ($total_users == 1) ? $user->lang['LIST_USER'] : sprintf($user->lang['LIST_USERS'], $total_users),
+ 'TOTAL_USERS' => $user->lang('LIST_USERS', (int) $total_users),
'PROFILE_IMG' => $user->img('icon_user_profile', $user->lang['PROFILE']),
'PM_IMG' => $user->img('icon_contact_pm', $user->lang['SEND_PRIVATE_MESSAGE']),
'EMAIL_IMG' => $user->img('icon_contact_email', $user->lang['EMAIL']),
- 'WWW_IMG' => $user->img('icon_contact_www', $user->lang['WWW']),
- 'ICQ_IMG' => $user->img('icon_contact_icq', $user->lang['ICQ']),
- 'AIM_IMG' => $user->img('icon_contact_aim', $user->lang['AIM']),
- 'MSN_IMG' => $user->img('icon_contact_msnm', $user->lang['MSNM']),
- 'YIM_IMG' => $user->img('icon_contact_yahoo', $user->lang['YIM']),
'JABBER_IMG' => $user->img('icon_contact_jabber', $user->lang['JABBER']),
'SEARCH_IMG' => $user->img('icon_user_search', $user->lang['SEARCH']),
'U_FIND_MEMBER' => ($config['load_search'] || $auth->acl_get('a_')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser' . (($start) ? "&amp;start=$start" : '') . (!empty($params) ? '&amp;' . implode('&amp;', $params) : '')) : '',
- 'U_HIDE_FIND_MEMBER' => ($mode == 'searchuser') ? $u_hide_find_member : '',
+ 'U_HIDE_FIND_MEMBER' => ($mode == 'searchuser' || ($mode == '' && $submit)) ? $u_hide_find_member : '',
'U_SORT_USERNAME' => $sort_url . '&amp;sk=a&amp;sd=' . (($sort_key == 'a' && $sort_dir == 'a') ? 'd' : 'a'),
- 'U_SORT_FROM' => $sort_url . '&amp;sk=b&amp;sd=' . (($sort_key == 'b' && $sort_dir == 'a') ? 'd' : 'a'),
'U_SORT_JOINED' => $sort_url . '&amp;sk=c&amp;sd=' . (($sort_key == 'c' && $sort_dir == 'a') ? 'd' : 'a'),
'U_SORT_POSTS' => $sort_url . '&amp;sk=d&amp;sd=' . (($sort_key == 'd' && $sort_dir == 'a') ? 'd' : 'a'),
'U_SORT_EMAIL' => $sort_url . '&amp;sk=e&amp;sd=' . (($sort_key == 'e' && $sort_dir == 'a') ? 'd' : 'a'),
- 'U_SORT_WEBSITE' => $sort_url . '&amp;sk=f&amp;sd=' . (($sort_key == 'f' && $sort_dir == 'a') ? 'd' : 'a'),
- 'U_SORT_LOCATION' => $sort_url . '&amp;sk=b&amp;sd=' . (($sort_key == 'b' && $sort_dir == 'a') ? 'd' : 'a'),
- 'U_SORT_ICQ' => $sort_url . '&amp;sk=g&amp;sd=' . (($sort_key == 'g' && $sort_dir == 'a') ? 'd' : 'a'),
- 'U_SORT_AIM' => $sort_url . '&amp;sk=h&amp;sd=' . (($sort_key == 'h' && $sort_dir == 'a') ? 'd' : 'a'),
- 'U_SORT_MSN' => $sort_url . '&amp;sk=i&amp;sd=' . (($sort_key == 'i' && $sort_dir == 'a') ? 'd' : 'a'),
- 'U_SORT_YIM' => $sort_url . '&amp;sk=j&amp;sd=' . (($sort_key == 'j' && $sort_dir == 'a') ? 'd' : 'a'),
'U_SORT_ACTIVE' => ($auth->acl_get('u_viewonline')) ? $sort_url . '&amp;sk=l&amp;sd=' . (($sort_key == 'l' && $sort_dir == 'a') ? 'd' : 'a') : '',
'U_SORT_RANK' => $sort_url . '&amp;sk=m&amp;sd=' . (($sort_key == 'm' && $sort_dir == 'a') ? 'd' : 'a'),
'U_LIST_CHAR' => $sort_url . '&amp;sk=a&amp;sd=' . (($sort_key == 'l' && $sort_dir == 'a') ? 'd' : 'a'),
@@ -1615,7 +1633,7 @@ switch ($mode)
}
// Output the page
-page_header($page_title, false);
+page_header($page_title);
$template->set_filenames(array(
'body' => $template_html)
@@ -1629,7 +1647,7 @@ page_footer();
*/
function show_profile($data, $user_notes_enabled = false, $warn_user_enabled = false)
{
- global $config, $auth, $template, $user, $phpEx, $phpbb_root_path;
+ global $config, $auth, $template, $user, $phpEx, $phpbb_root_path, $phpbb_dispatcher;
$username = $data['username'];
$user_id = $data['user_id'];
@@ -1658,11 +1676,11 @@ function show_profile($data, $user_notes_enabled = false, $warn_user_enabled = f
if ($data['user_allow_viewonline'] || $auth->acl_get('u_viewonline'))
{
- $last_visit = (!empty($data['session_time'])) ? $data['session_time'] : $data['user_lastvisit'];
+ $last_active = (!empty($data['session_time'])) ? $data['session_time'] : $data['user_lastvisit'];
}
else
{
- $last_visit = '';
+ $last_active = '';
}
$age = '';
@@ -1673,7 +1691,8 @@ function show_profile($data, $user_notes_enabled = false, $warn_user_enabled = f
if ($bday_year)
{
- $now = phpbb_gmgetdate(time() + $user->timezone + $user->dst);
+ $now = $user->create_datetime();
+ $now = phpbb_gmgetdate($now->getTimestamp() + $now->getOffset());
$diff = $now['mon'] - $bday_month;
if ($diff == 0)
@@ -1690,11 +1709,11 @@ function show_profile($data, $user_notes_enabled = false, $warn_user_enabled = f
}
// Dump it out to the template
- return array(
+ $template_data = array(
'AGE' => $age,
'RANK_TITLE' => $rank_title,
'JOINED' => $user->format_date($data['user_regdate']),
- 'VISITED' => (empty($last_visit)) ? ' - ' : $user->format_date($last_visit),
+ 'LAST_ACTIVE' => (empty($last_active)) ? ' - ' : $user->format_date($last_active),
'POSTS' => ($data['user_posts']) ? $data['user_posts'] : 0,
'WARNINGS' => isset($data['user_warnings']) ? $data['user_warnings'] : 0,
@@ -1705,12 +1724,11 @@ function show_profile($data, $user_notes_enabled = false, $warn_user_enabled = f
'A_USERNAME' => addslashes(get_username_string('username', $user_id, $username, $data['user_colour'])),
- 'AVATAR_IMG' => get_user_avatar($data['user_avatar'], $data['user_avatar_type'], $data['user_avatar_width'], $data['user_avatar_height']),
+ 'AVATAR_IMG' => phpbb_get_user_avatar($data),
'ONLINE_IMG' => (!$config['load_onlinetrack']) ? '' : (($online) ? $user->img('icon_user_online', 'ONLINE') : $user->img('icon_user_offline', 'OFFLINE')),
'S_ONLINE' => ($config['load_onlinetrack'] && $online) ? true : false,
'RANK_IMG' => $rank_img,
'RANK_IMG_SRC' => $rank_img_src,
- 'ICQ_STATUS_IMG' => (!empty($data['user_icq'])) ? '<img src="http://web.icq.com/whitepages/online?icq=' . $data['user_icq'] . '&amp;img=5" width="18" height="18" />' : '',
'S_JABBER_ENABLED' => ($config['jab_enable']) ? true : false,
'S_WARNINGS' => ($auth->acl_getf_global('m_') || $auth->acl_get('m_warn')) ? true : false,
@@ -1720,24 +1738,26 @@ function show_profile($data, $user_notes_enabled = false, $warn_user_enabled = f
'U_WARN' => ($warn_user_enabled && $auth->acl_get('m_warn')) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=warn&amp;mode=warn_user&amp;u=' . $user_id, true, $user->session_id) : '',
'U_PM' => ($config['allow_privmsg'] && $auth->acl_get('u_sendpm') && ($data['user_allow_pm'] || $auth->acl_gets('a_', 'm_') || $auth->acl_getf_global('m_'))) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&amp;mode=compose&amp;u=' . $user_id) : '',
'U_EMAIL' => $email,
- 'U_WWW' => (!empty($data['user_website'])) ? $data['user_website'] : '',
- 'U_SHORT_WWW' => (!empty($data['user_website'])) ? ((strlen($data['user_website']) > 55) ? substr($data['user_website'], 0, 39) . ' ... ' . substr($data['user_website'], -10) : $data['user_website']) : '',
- 'U_ICQ' => ($data['user_icq']) ? 'http://www.icq.com/people/' . urlencode($data['user_icq']) . '/' : '',
- 'U_AIM' => ($data['user_aim'] && $auth->acl_get('u_sendim')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=contact&amp;action=aim&amp;u=' . $user_id) : '',
- 'U_YIM' => ($data['user_yim']) ? 'http://edit.yahoo.com/config/send_webmesg?.target=' . urlencode($data['user_yim']) . '&amp;.src=pg' : '',
- 'U_MSN' => ($data['user_msnm'] && $auth->acl_get('u_sendim')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=contact&amp;action=msnm&amp;u=' . $user_id) : '',
'U_JABBER' => ($data['user_jabber'] && $auth->acl_get('u_sendim')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=contact&amp;action=jabber&amp;u=' . $user_id) : '',
- 'LOCATION' => ($data['user_from']) ? $data['user_from'] : '',
- 'USER_ICQ' => $data['user_icq'],
- 'USER_AIM' => $data['user_aim'],
- 'USER_YIM' => $data['user_yim'],
- 'USER_MSN' => $data['user_msnm'],
'USER_JABBER' => $data['user_jabber'],
'USER_JABBER_IMG' => ($data['user_jabber']) ? $user->img('icon_contact_jabber', $data['user_jabber']) : '',
'L_VIEWING_PROFILE' => sprintf($user->lang['VIEWING_PROFILE'], $username),
);
+
+ /**
+ * Preparing a user's data before displaying it in profile and memberlist
+ *
+ * @event core.memberlist_prepare_profile_data
+ * @var array data Array with user's data
+ * @var array template_data Template array with user's data
+ * @since 3.1-A1
+ */
+ $vars = array('data', 'template_data');
+ extract($phpbb_dispatcher->trigger_event('core.memberlist_prepare_profile_data', compact($vars)));
+
+ return $template_data;
}
function _sort_last_active($first, $second)
@@ -1759,5 +1779,3 @@ function _sort_last_active($first, $second)
return $lesser_than * (int) ($id_cache[$first]['last_visit'] - $id_cache[$second]['last_visit']);
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/auth.php b/phpBB/phpbb/auth/auth.php
index 0585921426..81676e75fc 100644
--- a/phpBB/includes/auth.php
+++ b/phpBB/phpbb/auth/auth.php
@@ -2,19 +2,12 @@
/**
*
* @package phpBB3
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
-/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
+namespace phpbb\auth;
/**
* Permission/Auth class
@@ -104,6 +97,26 @@ class auth
}
/**
+ * Retrieves data wanted by acl function from the database for the
+ * specified user.
+ *
+ * @param int $user_id User ID
+ * @return array User attributes
+ */
+ public function obtain_user_data($user_id)
+ {
+ global $db;
+
+ $sql = 'SELECT user_id, username, user_permissions, user_type
+ FROM ' . USERS_TABLE . '
+ WHERE user_id = ' . $user_id;
+ $result = $db->sql_query($sql);
+ $user_data = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+ return $user_data;
+ }
+
+ /**
* Fill ACL array with relevant bitstrings from user_permissions column
* @access private
*/
@@ -192,7 +205,7 @@ class auth
/**
* Get forums with the specified permission setting
- * if the option is prefixed with !, then the result becomes nagated
+ * if the option is prefixed with !, then the result becomes negated
*
* @param bool $clean set to true if only values needs to be returned which are set/unset
*/
@@ -908,15 +921,14 @@ class auth
*/
function login($username, $password, $autologin = false, $viewonline = 1, $admin = 0)
{
- global $config, $db, $user, $phpbb_root_path, $phpEx;
+ global $config, $db, $user, $phpbb_root_path, $phpEx, $phpbb_container;
$method = trim(basename($config['auth_method']));
- include_once($phpbb_root_path . 'includes/auth/auth_' . $method . '.' . $phpEx);
- $method = 'login_' . $method;
- if (function_exists($method))
+ $provider = $phpbb_container->get('auth.provider.' . $method);
+ if ($provider)
{
- $login = $method($username, $password, $user->ip, $user->browser, $user->forwarded_for);
+ $login = $provider->login($username, $password);
// If the auth module wants us to create an empty profile do so and then treat the status as LOGIN_SUCCESS
if ($login['status'] == LOGIN_SUCCESS_CREATE_PROFILE)
@@ -952,6 +964,18 @@ class auth
);
}
+ // If the auth provider wants us to link an empty account do so and redirect
+ if ($login['status'] == LOGIN_SUCCESS_LINK_PROFILE)
+ {
+ // If this status exists a fourth field is in the $login array called 'redirect_data'
+ // This data is passed along as GET data to the next page allow the account to be linked
+
+ $params = array('mode' => 'login_link');
+ $url = append_sid($phpbb_root_path . 'ucp.' . $phpEx, array_merge($params, $login['redirect_data']));
+
+ redirect($url);
+ }
+
// If login succeeded, we will log the user in... else we pass the login array through...
if ($login['status'] == LOGIN_SUCCESS)
{
@@ -1060,5 +1084,3 @@ class auth
}
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/auth/index.htm b/phpBB/phpbb/auth/index.htm
index ee1f723a7d..ee1f723a7d 100644
--- a/phpBB/includes/auth/index.htm
+++ b/phpBB/phpbb/auth/index.htm
diff --git a/phpBB/phpbb/auth/provider/apache.php b/phpBB/phpbb/auth/provider/apache.php
new file mode 100644
index 0000000000..23cdc89829
--- /dev/null
+++ b/phpBB/phpbb/auth/provider/apache.php
@@ -0,0 +1,262 @@
+<?php
+/**
+*
+* @package auth
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\auth\provider;
+
+/**
+ * Apache authentication provider for phpBB3
+ *
+ * @package auth
+ */
+class apache extends \phpbb\auth\provider\base
+{
+ /**
+ * phpBB passwords manager
+ *
+ * @var \phpbb\passwords\manager
+ */
+ protected $passwords_manager;
+
+ /**
+ * Apache Authentication Constructor
+ *
+ * @param \phpbb\db\driver\driver $db
+ * @param \phpbb\config\config $config
+ * @param \phpbb\passwords\manager $passwords_manager
+ * @param \phpbb\request\request $request
+ * @param \phpbb\user $user
+ * @param string $phpbb_root_path
+ * @param string $php_ext
+ */
+ public function __construct(\phpbb\db\driver\driver $db, \phpbb\config\config $config, \phpbb\passwords\manager $passwords_manager, \phpbb\request\request $request, \phpbb\user $user, $phpbb_root_path, $php_ext)
+ {
+ $this->db = $db;
+ $this->config = $config;
+ $this->passwords_manager = $passwords_manager;
+ $this->request = $request;
+ $this->user = $user;
+ $this->phpbb_root_path = $phpbb_root_path;
+ $this->php_ext = $php_ext;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function init()
+ {
+ if (!$this->request->is_set('PHP_AUTH_USER', \phpbb\request\request_interface::SERVER) || $this->user->data['username'] !== htmlspecialchars_decode($this->request->server('PHP_AUTH_USER')))
+ {
+ return $this->user->lang['APACHE_SETUP_BEFORE_USE'];
+ }
+ return false;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function login($username, $password)
+ {
+ // do not allow empty password
+ if (!$password)
+ {
+ return array(
+ 'status' => LOGIN_ERROR_PASSWORD,
+ 'error_msg' => 'NO_PASSWORD_SUPPLIED',
+ 'user_row' => array('user_id' => ANONYMOUS),
+ );
+ }
+
+ if (!$username)
+ {
+ return array(
+ 'status' => LOGIN_ERROR_USERNAME,
+ 'error_msg' => 'LOGIN_ERROR_USERNAME',
+ 'user_row' => array('user_id' => ANONYMOUS),
+ );
+ }
+
+ if (!$this->request->is_set('PHP_AUTH_USER', \phpbb\request\request_interface::SERVER))
+ {
+ return array(
+ 'status' => LOGIN_ERROR_EXTERNAL_AUTH,
+ 'error_msg' => 'LOGIN_ERROR_EXTERNAL_AUTH_APACHE',
+ 'user_row' => array('user_id' => ANONYMOUS),
+ );
+ }
+
+ $php_auth_user = htmlspecialchars_decode($this->request->server('PHP_AUTH_USER'));
+ $php_auth_pw = htmlspecialchars_decode($this->request->server('PHP_AUTH_PW'));
+
+ if (!empty($php_auth_user) && !empty($php_auth_pw))
+ {
+ if ($php_auth_user !== $username)
+ {
+ return array(
+ 'status' => LOGIN_ERROR_USERNAME,
+ 'error_msg' => 'LOGIN_ERROR_USERNAME',
+ 'user_row' => array('user_id' => ANONYMOUS),
+ );
+ }
+
+ $sql = 'SELECT user_id, username, user_password, user_passchg, user_email, user_type
+ FROM ' . USERS_TABLE . "
+ WHERE username = '" . $this->db->sql_escape($php_auth_user) . "'";
+ $result = $this->db->sql_query($sql);
+ $row = $this->db->sql_fetchrow($result);
+ $this->db->sql_freeresult($result);
+
+ if ($row)
+ {
+ // User inactive...
+ if ($row['user_type'] == USER_INACTIVE || $row['user_type'] == USER_IGNORE)
+ {
+ return array(
+ 'status' => LOGIN_ERROR_ACTIVE,
+ 'error_msg' => 'ACTIVE_ERROR',
+ 'user_row' => $row,
+ );
+ }
+
+ // Successful login...
+ return array(
+ 'status' => LOGIN_SUCCESS,
+ 'error_msg' => false,
+ 'user_row' => $row,
+ );
+ }
+
+ // this is the user's first login so create an empty profile
+ return array(
+ 'status' => LOGIN_SUCCESS_CREATE_PROFILE,
+ 'error_msg' => false,
+ 'user_row' => user_row_apache($php_auth_user, $php_auth_pw),
+ );
+ }
+
+ // Not logged into apache
+ return array(
+ 'status' => LOGIN_ERROR_EXTERNAL_AUTH,
+ 'error_msg' => 'LOGIN_ERROR_EXTERNAL_AUTH_APACHE',
+ 'user_row' => array('user_id' => ANONYMOUS),
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function autologin()
+ {
+ if (!$this->request->is_set('PHP_AUTH_USER', \phpbb\request\request_interface::SERVER))
+ {
+ return array();
+ }
+
+ $php_auth_user = htmlspecialchars_decode($this->request->server('PHP_AUTH_USER'));
+ $php_auth_pw = htmlspecialchars_decode($this->request->server('PHP_AUTH_PW'));
+
+ if (!empty($php_auth_user) && !empty($php_auth_pw))
+ {
+ set_var($php_auth_user, $php_auth_user, 'string', true);
+ set_var($php_auth_pw, $php_auth_pw, 'string', true);
+
+ $sql = 'SELECT *
+ FROM ' . USERS_TABLE . "
+ WHERE username = '" . $this->db->sql_escape($php_auth_user) . "'";
+ $result = $this->db->sql_query($sql);
+ $row = $this->db->sql_fetchrow($result);
+ $this->db->sql_freeresult($result);
+
+ if ($row)
+ {
+ return ($row['user_type'] == USER_INACTIVE || $row['user_type'] == USER_IGNORE) ? array() : $row;
+ }
+
+ if (!function_exists('user_add'))
+ {
+ include($this->phpbb_root_path . 'includes/functions_user.' . $this->php_ext);
+ }
+
+ // create the user if he does not exist yet
+ user_add(user_row_apache($php_auth_user, $php_auth_pw));
+
+ $sql = 'SELECT *
+ FROM ' . USERS_TABLE . "
+ WHERE username_clean = '" . $this->db->sql_escape(utf8_clean_string($php_auth_user)) . "'";
+ $result = $this->db->sql_query($sql);
+ $row = $this->db->sql_fetchrow($result);
+ $this->db->sql_freeresult($result);
+
+ if ($row)
+ {
+ return $row;
+ }
+ }
+
+ return array();
+ }
+
+ /**
+ * This function generates an array which can be passed to the user_add
+ * function in order to create a user
+ *
+ * @param string $username The username of the new user.
+ * @param string $password The password of the new user.
+ * @return array Contains data that can be passed directly to
+ * the user_add function.
+ */
+ private function user_row($username, $password)
+ {
+ // first retrieve default group id
+ $sql = 'SELECT group_id
+ FROM ' . GROUPS_TABLE . "
+ WHERE group_name = '" . $this->db->sql_escape('REGISTERED') . "'
+ AND group_type = " . GROUP_SPECIAL;
+ $result = $this->db->sql_query($sql);
+ $row = $this->db->sql_fetchrow($result);
+ $this->db->sql_freeresult($result);
+
+ if (!$row)
+ {
+ trigger_error('NO_GROUP');
+ }
+
+ // generate user account data
+ return array(
+ 'username' => $username,
+ 'user_password' => $this->passwords_manager->hash($password),
+ 'user_email' => '',
+ 'group_id' => (int) $row['group_id'],
+ 'user_type' => USER_NORMAL,
+ 'user_ip' => $this->user->ip,
+ 'user_new' => ($this->config['new_member_post_limit']) ? 1 : 0,
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function validate_session($user)
+ {
+ // Check if PHP_AUTH_USER is set and handle this case
+ if ($this->request->is_set('PHP_AUTH_USER', \phpbb\request\request_interface::SERVER))
+ {
+ $php_auth_user = $this->request->server('PHP_AUTH_USER');
+
+ return ($php_auth_user === $user['username']) ? true : false;
+ }
+
+ // PHP_AUTH_USER is not set. A valid session is now determined by the user type (anonymous/bot or not)
+ if ($user['user_type'] == USER_IGNORE)
+ {
+ return true;
+ }
+
+ return false;
+ }
+}
diff --git a/phpBB/phpbb/auth/provider/base.php b/phpBB/phpbb/auth/provider/base.php
new file mode 100644
index 0000000000..78a3289356
--- /dev/null
+++ b/phpBB/phpbb/auth/provider/base.php
@@ -0,0 +1,106 @@
+<?php
+/**
+*
+* @package auth
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\auth\provider;
+
+/**
+* Base authentication provider class that all other providers should implement
+*
+* @package auth
+*/
+abstract class base implements \phpbb\auth\provider\provider_interface
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function init()
+ {
+ return;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function autologin()
+ {
+ return;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function acp()
+ {
+ return;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function get_acp_template($new_config)
+ {
+ return;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function get_login_data()
+ {
+ return;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function get_auth_link_data()
+ {
+ return;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function logout($data, $new_session)
+ {
+ return;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function validate_session($user)
+ {
+ return;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function login_link_has_necessary_data($login_link_data)
+ {
+ return;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function link_account(array $link_data)
+ {
+ return;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function unlink_account(array $link_data)
+ {
+ return;
+ }
+}
diff --git a/phpBB/phpbb/auth/provider/db.php b/phpBB/phpbb/auth/provider/db.php
new file mode 100644
index 0000000000..6bbbc0be16
--- /dev/null
+++ b/phpBB/phpbb/auth/provider/db.php
@@ -0,0 +1,299 @@
+<?php
+/**
+*
+* @package auth
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\auth\provider;
+
+/**
+ * Database authentication provider for phpBB3
+ *
+ * This is for authentication via the integrated user table
+ *
+ * @package auth
+ */
+class db extends \phpbb\auth\provider\base
+{
+ /**
+ * phpBB passwords manager
+ *
+ * @var \phpbb\passwords\manager
+ */
+ protected $passwords_manager;
+
+ /**
+ * Database Authentication Constructor
+ *
+ * @param \phpbb\db\driver\driver $db
+ * @param \phpbb\config\config $config
+ * @param \phpbb\passwords\manager $passwords_manager
+ * @param \phpbb\request\request $request
+ * @param \phpbb\user $user
+ * @param string $phpbb_root_path
+ * @param string $php_ext
+ */
+ public function __construct(\phpbb\db\driver\driver $db, \phpbb\config\config $config, \phpbb\passwords\manager $passwords_manager, \phpbb\request\request $request, \phpbb\user $user, $phpbb_root_path, $php_ext)
+ {
+ $this->db = $db;
+ $this->config = $config;
+ $this->passwords_manager = $passwords_manager;
+ $this->request = $request;
+ $this->user = $user;
+ $this->phpbb_root_path = $phpbb_root_path;
+ $this->php_ext = $php_ext;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function login($username, $password)
+ {
+ // Auth plugins get the password untrimmed.
+ // For compatibility we trim() here.
+ $password = trim($password);
+
+ // do not allow empty password
+ if (!$password)
+ {
+ return array(
+ 'status' => LOGIN_ERROR_PASSWORD,
+ 'error_msg' => 'NO_PASSWORD_SUPPLIED',
+ 'user_row' => array('user_id' => ANONYMOUS),
+ );
+ }
+
+ if (!$username)
+ {
+ return array(
+ 'status' => LOGIN_ERROR_USERNAME,
+ 'error_msg' => 'LOGIN_ERROR_USERNAME',
+ 'user_row' => array('user_id' => ANONYMOUS),
+ );
+ }
+
+ $username_clean = utf8_clean_string($username);
+
+ $sql = 'SELECT user_id, username, user_password, user_passchg, user_pass_convert, user_email, user_type, user_login_attempts
+ FROM ' . USERS_TABLE . "
+ WHERE username_clean = '" . $this->db->sql_escape($username_clean) . "'";
+ $result = $this->db->sql_query($sql);
+ $row = $this->db->sql_fetchrow($result);
+ $this->db->sql_freeresult($result);
+
+ if (($this->user->ip && !$this->config['ip_login_limit_use_forwarded']) ||
+ ($this->user->forwarded_for && $this->config['ip_login_limit_use_forwarded']))
+ {
+ $sql = 'SELECT COUNT(*) AS attempts
+ FROM ' . LOGIN_ATTEMPT_TABLE . '
+ WHERE attempt_time > ' . (time() - (int) $this->config['ip_login_limit_time']);
+ if ($this->config['ip_login_limit_use_forwarded'])
+ {
+ $sql .= " AND attempt_forwarded_for = '" . $this->db->sql_escape($this->user->forwarded_for) . "'";
+ }
+ else
+ {
+ $sql .= " AND attempt_ip = '" . $this->db->sql_escape($this->user->ip) . "' ";
+ }
+
+ $result = $this->db->sql_query($sql);
+ $attempts = (int) $this->db->sql_fetchfield('attempts');
+ $this->db->sql_freeresult($result);
+
+ $attempt_data = array(
+ 'attempt_ip' => $this->user->ip,
+ 'attempt_browser' => trim(substr($this->user->browser, 0, 149)),
+ 'attempt_forwarded_for' => $this->user->forwarded_for,
+ 'attempt_time' => time(),
+ 'user_id' => ($row) ? (int) $row['user_id'] : 0,
+ 'username' => $username,
+ 'username_clean' => $username_clean,
+ );
+ $sql = 'INSERT INTO ' . LOGIN_ATTEMPT_TABLE . $this->db->sql_build_array('INSERT', $attempt_data);
+ $result = $this->db->sql_query($sql);
+ }
+ else
+ {
+ $attempts = 0;
+ }
+
+ if (!$row)
+ {
+ if ($this->config['ip_login_limit_max'] && $attempts >= $this->config['ip_login_limit_max'])
+ {
+ return array(
+ 'status' => LOGIN_ERROR_ATTEMPTS,
+ 'error_msg' => 'LOGIN_ERROR_ATTEMPTS',
+ 'user_row' => array('user_id' => ANONYMOUS),
+ );
+ }
+
+ return array(
+ 'status' => LOGIN_ERROR_USERNAME,
+ 'error_msg' => 'LOGIN_ERROR_USERNAME',
+ 'user_row' => array('user_id' => ANONYMOUS),
+ );
+ }
+
+ $show_captcha = ($this->config['max_login_attempts'] && $row['user_login_attempts'] >= $this->config['max_login_attempts']) ||
+ ($this->config['ip_login_limit_max'] && $attempts >= $this->config['ip_login_limit_max']);
+
+ // If there are too many login attempts, we need to check for a confirm image
+ // Every auth module is able to define what to do by itself...
+ if ($show_captcha)
+ {
+ // Visual Confirmation handling
+ if (!class_exists('phpbb_captcha_factory', false))
+ {
+ include ($this->phpbb_root_path . 'includes/captcha/captcha_factory.' . $this->php_ext);
+ }
+
+ $captcha = \phpbb_captcha_factory::get_instance($this->config['captcha_plugin']);
+ $captcha->init(CONFIRM_LOGIN);
+ $vc_response = $captcha->validate($row);
+ if ($vc_response)
+ {
+ return array(
+ 'status' => LOGIN_ERROR_ATTEMPTS,
+ 'error_msg' => 'LOGIN_ERROR_ATTEMPTS',
+ 'user_row' => $row,
+ );
+ }
+ else
+ {
+ $captcha->reset();
+ }
+
+ }
+
+ // If the password convert flag is set we need to convert it
+ if ($row['user_pass_convert'])
+ {
+ // enable super globals to get literal value
+ // this is needed to prevent unicode normalization
+ $super_globals_disabled = $this->request->super_globals_disabled();
+ if ($super_globals_disabled)
+ {
+ $this->request->enable_super_globals();
+ }
+
+ // in phpBB2 passwords were used exactly as they were sent, with addslashes applied
+ $password_old_format = isset($_REQUEST['password']) ? (string) $_REQUEST['password'] : '';
+ $password_old_format = (!STRIP) ? addslashes($password_old_format) : $password_old_format;
+ $password_new_format = $this->request->variable('password', '', true);
+
+ if ($super_globals_disabled)
+ {
+ $this->request->disable_super_globals();
+ }
+
+ if ($password == $password_new_format)
+ {
+ if (!function_exists('utf8_to_cp1252'))
+ {
+ include($this->phpbb_root_path . 'includes/utf/data/recode_basic.' . $this->php_ext);
+ }
+
+ // cp1252 is phpBB2's default encoding, characters outside ASCII range might work when converted into that encoding
+ // plain md5 support left in for conversions from other systems.
+ if ((strlen($row['user_password']) == 34 && ($this->passwords_manager->check(md5($password_old_format), $row['user_password']) || $this->passwords_manager->check(md5(utf8_to_cp1252($password_old_format)), $row['user_password'])))
+ || (strlen($row['user_password']) == 32 && (md5($password_old_format) == $row['user_password'] || md5(utf8_to_cp1252($password_old_format)) == $row['user_password'])))
+ {
+ $hash = $this->passwords_manager->hash($password_new_format);
+
+ // Update the password in the users table to the new format and remove user_pass_convert flag
+ $sql = 'UPDATE ' . USERS_TABLE . '
+ SET user_password = \'' . $this->db->sql_escape($hash) . '\',
+ user_pass_convert = 0
+ WHERE user_id = ' . $row['user_id'];
+ $this->db->sql_query($sql);
+
+ $row['user_pass_convert'] = 0;
+ $row['user_password'] = $hash;
+ }
+ else
+ {
+ // Although we weren't able to convert this password we have to
+ // increase login attempt count to make sure this cannot be exploited
+ $sql = 'UPDATE ' . USERS_TABLE . '
+ SET user_login_attempts = user_login_attempts + 1
+ WHERE user_id = ' . (int) $row['user_id'] . '
+ AND user_login_attempts < ' . LOGIN_ATTEMPTS_MAX;
+ $this->db->sql_query($sql);
+
+ return array(
+ 'status' => LOGIN_ERROR_PASSWORD_CONVERT,
+ 'error_msg' => 'LOGIN_ERROR_PASSWORD_CONVERT',
+ 'user_row' => $row,
+ );
+ }
+ }
+ }
+
+ // Check password ...
+ if (!$row['user_pass_convert'] && $this->passwords_manager->check($password, $row['user_password']))
+ {
+ // Check for old password hash...
+ if ($this->passwords_manager->convert_flag || strlen($row['user_password']) == 32)
+ {
+ $hash = $this->passwords_manager->hash($password);
+
+ // Update the password in the users table to the new format
+ $sql = 'UPDATE ' . USERS_TABLE . "
+ SET user_password = '" . $this->db->sql_escape($hash) . "',
+ user_pass_convert = 0
+ WHERE user_id = {$row['user_id']}";
+ $this->db->sql_query($sql);
+
+ $row['user_password'] = $hash;
+ }
+
+ $sql = 'DELETE FROM ' . LOGIN_ATTEMPT_TABLE . '
+ WHERE user_id = ' . $row['user_id'];
+ $this->db->sql_query($sql);
+
+ if ($row['user_login_attempts'] != 0)
+ {
+ // Successful, reset login attempts (the user passed all stages)
+ $sql = 'UPDATE ' . USERS_TABLE . '
+ SET user_login_attempts = 0
+ WHERE user_id = ' . $row['user_id'];
+ $this->db->sql_query($sql);
+ }
+
+ // User inactive...
+ if ($row['user_type'] == USER_INACTIVE || $row['user_type'] == USER_IGNORE)
+ {
+ return array(
+ 'status' => LOGIN_ERROR_ACTIVE,
+ 'error_msg' => 'ACTIVE_ERROR',
+ 'user_row' => $row,
+ );
+ }
+
+ // Successful login... set user_login_attempts to zero...
+ return array(
+ 'status' => LOGIN_SUCCESS,
+ 'error_msg' => false,
+ 'user_row' => $row,
+ );
+ }
+
+ // Password incorrect - increase login attempts
+ $sql = 'UPDATE ' . USERS_TABLE . '
+ SET user_login_attempts = user_login_attempts + 1
+ WHERE user_id = ' . (int) $row['user_id'] . '
+ AND user_login_attempts < ' . LOGIN_ATTEMPTS_MAX;
+ $this->db->sql_query($sql);
+
+ // Give status about wrong password...
+ return array(
+ 'status' => ($show_captcha) ? LOGIN_ERROR_ATTEMPTS : LOGIN_ERROR_PASSWORD,
+ 'error_msg' => ($show_captcha) ? 'LOGIN_ERROR_ATTEMPTS' : 'LOGIN_ERROR_PASSWORD',
+ 'user_row' => $row,
+ );
+ }
+}
diff --git a/phpBB/includes/db/index.htm b/phpBB/phpbb/auth/provider/index.htm
index ee1f723a7d..ee1f723a7d 100644
--- a/phpBB/includes/db/index.htm
+++ b/phpBB/phpbb/auth/provider/index.htm
diff --git a/phpBB/phpbb/auth/provider/ldap.php b/phpBB/phpbb/auth/provider/ldap.php
new file mode 100644
index 0000000000..e92a227e16
--- /dev/null
+++ b/phpBB/phpbb/auth/provider/ldap.php
@@ -0,0 +1,348 @@
+<?php
+/**
+*
+* @package auth
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\auth\provider;
+
+/**
+ * Database authentication provider for phpBB3
+ *
+ * This is for authentication via the integrated user table
+ *
+ * @package auth
+ */
+class ldap extends \phpbb\auth\provider\base
+{
+ /**
+ * phpBB passwords manager
+ *
+ * @var \phpbb\passwords\manager
+ */
+ protected $passwords_manager;
+
+ /**
+ * LDAP Authentication Constructor
+ *
+ * @param \phpbb\db\driver\driver $db
+ * @param \phpbb\config\config $config
+ * @param \phpbb\passwords\manager $passwords_manager
+ * @param \phpbb\user $user
+ */
+ public function __construct(\phpbb\db\driver\driver $db, \phpbb\config\config $config, \phpbb\passwords\manager $passwords_manager, \phpbb\user $user)
+ {
+ $this->db = $db;
+ $this->config = $config;
+ $this->passwords_manager = $passwords_manager;
+ $this->user = $user;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function init()
+ {
+ if (!@extension_loaded('ldap'))
+ {
+ return $this->user->lang['LDAP_NO_LDAP_EXTENSION'];
+ }
+
+ $this->config['ldap_port'] = (int) $this->config['ldap_port'];
+ if ($this->config['ldap_port'])
+ {
+ $ldap = @ldap_connect($this->config['ldap_server'], $this->config['ldap_port']);
+ }
+ else
+ {
+ $ldap = @ldap_connect($this->config['ldap_server']);
+ }
+
+ if (!$ldap)
+ {
+ return $this->user->lang['LDAP_NO_SERVER_CONNECTION'];
+ }
+
+ @ldap_set_option($ldap, LDAP_OPT_PROTOCOL_VERSION, 3);
+ @ldap_set_option($ldap, LDAP_OPT_REFERRALS, 0);
+
+ if ($this->config['ldap_user'] || $this->config['ldap_password'])
+ {
+ if (!@ldap_bind($ldap, htmlspecialchars_decode($this->config['ldap_user']), htmlspecialchars_decode($this->config['ldap_password'])))
+ {
+ return $this->user->lang['LDAP_INCORRECT_USER_PASSWORD'];
+ }
+ }
+
+ // ldap_connect only checks whether the specified server is valid, so the connection might still fail
+ $search = @ldap_search(
+ $ldap,
+ htmlspecialchars_decode($this->config['ldap_base_dn']),
+ $this->ldap_user_filter($this->user->data['username']),
+ (empty($this->config['ldap_email'])) ?
+ array(htmlspecialchars_decode($this->config['ldap_uid'])) :
+ array(htmlspecialchars_decode($this->config['ldap_uid']), htmlspecialchars_decode($this->config['ldap_email'])),
+ 0,
+ 1
+ );
+
+ if ($search === false)
+ {
+ return $this->user->lang['LDAP_SEARCH_FAILED'];
+ }
+
+ $result = @ldap_get_entries($ldap, $search);
+
+ @ldap_close($ldap);
+
+ if (!is_array($result) || sizeof($result) < 2)
+ {
+ return sprintf($this->user->lang['LDAP_NO_IDENTITY'], $this->user->data['username']);
+ }
+
+ if (!empty($this->config['ldap_email']) && !isset($result[0][htmlspecialchars_decode($this->config['ldap_email'])]))
+ {
+ return $this->user->lang['LDAP_NO_EMAIL'];
+ }
+
+ return false;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function login($username, $password)
+ {
+ // do not allow empty password
+ if (!$password)
+ {
+ return array(
+ 'status' => LOGIN_ERROR_PASSWORD,
+ 'error_msg' => 'NO_PASSWORD_SUPPLIED',
+ 'user_row' => array('user_id' => ANONYMOUS),
+ );
+ }
+
+ if (!$username)
+ {
+ return array(
+ 'status' => LOGIN_ERROR_USERNAME,
+ 'error_msg' => 'LOGIN_ERROR_USERNAME',
+ 'user_row' => array('user_id' => ANONYMOUS),
+ );
+ }
+
+ if (!@extension_loaded('ldap'))
+ {
+ return array(
+ 'status' => LOGIN_ERROR_EXTERNAL_AUTH,
+ 'error_msg' => 'LDAP_NO_LDAP_EXTENSION',
+ 'user_row' => array('user_id' => ANONYMOUS),
+ );
+ }
+
+ $this->config['ldap_port'] = (int) $this->config['ldap_port'];
+ if ($this->config['ldap_port'])
+ {
+ $ldap = @ldap_connect($this->config['ldap_server'], $this->config['ldap_port']);
+ }
+ else
+ {
+ $ldap = @ldap_connect($this->config['ldap_server']);
+ }
+
+ if (!$ldap)
+ {
+ return array(
+ 'status' => LOGIN_ERROR_EXTERNAL_AUTH,
+ 'error_msg' => 'LDAP_NO_SERVER_CONNECTION',
+ 'user_row' => array('user_id' => ANONYMOUS),
+ );
+ }
+
+ @ldap_set_option($ldap, LDAP_OPT_PROTOCOL_VERSION, 3);
+ @ldap_set_option($ldap, LDAP_OPT_REFERRALS, 0);
+
+ if ($this->config['ldap_user'] || $this->config['ldap_password'])
+ {
+ if (!@ldap_bind($ldap, htmlspecialchars_decode($this->config['ldap_user']), htmlspecialchars_decode($this->config['ldap_password'])))
+ {
+ return array(
+ 'status' => LOGIN_ERROR_EXTERNAL_AUTH,
+ 'error_msg' => 'LDAP_NO_SERVER_CONNECTION',
+ 'user_row' => array('user_id' => ANONYMOUS),
+ );
+ }
+ }
+
+ $search = @ldap_search(
+ $ldap,
+ htmlspecialchars_decode($this->config['ldap_base_dn']),
+ $this->ldap_user_filter($username),
+ (empty($this->config['ldap_email'])) ?
+ array(htmlspecialchars_decode($this->config['ldap_uid'])) :
+ array(htmlspecialchars_decode($this->config['ldap_uid']), htmlspecialchars_decode($this->config['ldap_email'])),
+ 0,
+ 1
+ );
+
+ $ldap_result = @ldap_get_entries($ldap, $search);
+
+ if (is_array($ldap_result) && sizeof($ldap_result) > 1)
+ {
+ if (@ldap_bind($ldap, $ldap_result[0]['dn'], htmlspecialchars_decode($password)))
+ {
+ @ldap_close($ldap);
+
+ $sql ='SELECT user_id, username, user_password, user_passchg, user_email, user_type
+ FROM ' . USERS_TABLE . "
+ WHERE username_clean = '" . $this->db->sql_escape(utf8_clean_string($username)) . "'";
+ $result = $this->db->sql_query($sql);
+ $row = $this->db->sql_fetchrow($result);
+ $this->db->sql_freeresult($result);
+
+ if ($row)
+ {
+ unset($ldap_result);
+
+ // User inactive...
+ if ($row['user_type'] == USER_INACTIVE || $row['user_type'] == USER_IGNORE)
+ {
+ return array(
+ 'status' => LOGIN_ERROR_ACTIVE,
+ 'error_msg' => 'ACTIVE_ERROR',
+ 'user_row' => $row,
+ );
+ }
+
+ // Successful login... set user_login_attempts to zero...
+ return array(
+ 'status' => LOGIN_SUCCESS,
+ 'error_msg' => false,
+ 'user_row' => $row,
+ );
+ }
+ else
+ {
+ // retrieve default group id
+ $sql = 'SELECT group_id
+ FROM ' . GROUPS_TABLE . "
+ WHERE group_name = '" . $this->db->sql_escape('REGISTERED') . "'
+ AND group_type = " . GROUP_SPECIAL;
+ $result = $this->db->sql_query($sql);
+ $row = $this->db->sql_fetchrow($result);
+ $this->db->sql_freeresult($result);
+
+ if (!$row)
+ {
+ trigger_error('NO_GROUP');
+ }
+
+ // generate user account data
+ $ldap_user_row = array(
+ 'username' => $username,
+ 'user_password' => $this->passwords_manager->hash($password),
+ 'user_email' => (!empty($this->config['ldap_email'])) ? utf8_htmlspecialchars($ldap_result[0][htmlspecialchars_decode($this->config['ldap_email'])][0]) : '',
+ 'group_id' => (int) $row['group_id'],
+ 'user_type' => USER_NORMAL,
+ 'user_ip' => $this->user->ip,
+ 'user_new' => ($this->config['new_member_post_limit']) ? 1 : 0,
+ );
+
+ unset($ldap_result);
+
+ // this is the user's first login so create an empty profile
+ return array(
+ 'status' => LOGIN_SUCCESS_CREATE_PROFILE,
+ 'error_msg' => false,
+ 'user_row' => $ldap_user_row,
+ );
+ }
+ }
+ else
+ {
+ unset($ldap_result);
+ @ldap_close($ldap);
+
+ // Give status about wrong password...
+ return array(
+ 'status' => LOGIN_ERROR_PASSWORD,
+ 'error_msg' => 'LOGIN_ERROR_PASSWORD',
+ 'user_row' => array('user_id' => ANONYMOUS),
+ );
+ }
+ }
+
+ @ldap_close($ldap);
+
+ return array(
+ 'status' => LOGIN_ERROR_USERNAME,
+ 'error_msg' => 'LOGIN_ERROR_USERNAME',
+ 'user_row' => array('user_id' => ANONYMOUS),
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+
+ public function acp()
+ {
+ // These are fields required in the config table
+ return array(
+ 'ldap_server', 'ldap_port', 'ldap_base_dn', 'ldap_uid', 'ldap_user_filter', 'ldap_email', 'ldap_user', 'ldap_password',
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function get_acp_template($new_config)
+ {
+ return array(
+ 'TEMPLATE_FILE' => 'auth_provider_ldap.html',
+ 'TEMPLATE_VARS' => array(
+ 'AUTH_LDAP_DN' => $new_config['ldap_base_dn'],
+ 'AUTH_LDAP_EMAIL' => $new_config['ldap_email'],
+ 'AUTH_LDAP_PASSORD' => $new_config['ldap_password'],
+ 'AUTH_LDAP_PORT' => $new_config['ldap_port'],
+ 'AUTH_LDAP_SERVER' => $new_config['ldap_server'],
+ 'AUTH_LDAP_UID' => $new_config['ldap_uid'],
+ 'AUTH_LDAP_USER' => $new_config['ldap_user'],
+ 'AUTH_LDAP_USER_FILTER' => $new_config['ldap_user_filter'],
+ ),
+ );
+ }
+
+ /**
+ * Generates a filter string for ldap_search to find a user
+ *
+ * @param $username string Username identifying the searched user
+ *
+ * @return string A filter string for ldap_search
+ */
+ private function ldap_user_filter($username)
+ {
+ $filter = '(' . $this->config['ldap_uid'] . '=' . $this->ldap_escape(htmlspecialchars_decode($username)) . ')';
+ if ($this->config['ldap_user_filter'])
+ {
+ $_filter = ($this->config['ldap_user_filter'][0] == '(' && substr($this->config['ldap_user_filter'], -1) == ')') ? $this->config['ldap_user_filter'] : "({$this->config['ldap_user_filter']})";
+ $filter = "(&{$filter}{$_filter})";
+ }
+ return $filter;
+ }
+
+ /**
+ * Escapes an LDAP AttributeValue
+ *
+ * @param string $string The string to be escaped
+ * @return string The escaped string
+ */
+ private function ldap_escape($string)
+ {
+ return str_replace(array('*', '\\', '(', ')'), array('\\*', '\\\\', '\\(', '\\)'), $string);
+ }
+}
diff --git a/phpBB/phpbb/auth/provider/oauth/oauth.php b/phpBB/phpbb/auth/provider/oauth/oauth.php
new file mode 100644
index 0000000000..0128c89248
--- /dev/null
+++ b/phpBB/phpbb/auth/provider/oauth/oauth.php
@@ -0,0 +1,621 @@
+<?php
+/**
+*
+* @package auth
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\auth\provider\oauth;
+
+use OAuth\Common\Consumer\Credentials;
+use OAuth\Common\Http\Uri\Uri;
+
+/**
+* OAuth authentication provider for phpBB3
+*
+* @package auth
+*/
+class oauth extends \phpbb\auth\provider\base
+{
+ /**
+ * Database driver
+ *
+ * @var \phpbb\db\driver\driver
+ */
+ protected $db;
+
+ /**
+ * phpBB config
+ *
+ * @var \phpbb\config\config
+ */
+ protected $config;
+
+ /**
+ * phpBB passwords manager
+ *
+ * @var \phpbb\passwords\manager
+ */
+ protected $passwords_manager;
+
+ /**
+ * phpBB request object
+ *
+ * @var \phpbb\request\request_interface
+ */
+ protected $request;
+
+ /**
+ * phpBB user
+ *
+ * @var \phpbb\user
+ */
+ protected $user;
+
+ /**
+ * OAuth token table
+ *
+ * @var string
+ */
+ protected $auth_provider_oauth_token_storage_table;
+
+ /**
+ * OAuth account association table
+ *
+ * @var string
+ */
+ protected $auth_provider_oauth_token_account_assoc;
+
+ /**
+ * All OAuth service providers
+ *
+ * @var \phpbb\di\service_collection Contains \phpbb\auth\provider\oauth\service_interface
+ */
+ protected $service_providers;
+
+ /**
+ * Users table
+ *
+ * @var string
+ */
+ protected $users_table;
+
+ /**
+ * Cached current uri object
+ *
+ * @var \OAuth\Common\Http\Uri\UriInterface|null
+ */
+ protected $current_uri;
+
+ /**
+ * phpBB root path
+ *
+ * @var string
+ */
+ protected $phpbb_root_path;
+
+ /**
+ * PHP extenstion
+ *
+ * @var string
+ */
+ protected $php_ext;
+
+ /**
+ * OAuth Authentication Constructor
+ *
+ * @param \phpbb\db\driver\driver $db
+ * @param \phpbb\config\config $config
+ * @param \phpbb\passwords\manager $passwords_manager
+ * @param \phpbb\request\request_interface $request
+ * @param \phpbb\user $user
+ * @param string $auth_provider_oauth_token_storage_table
+ * @param string $auth_provider_oauth_token_account_assoc
+ * @param \phpbb\di\service_collection $service_providers Contains \phpbb\auth\provider\oauth\service_interface
+ * @param string $users_table
+ * @param string $phpbb_root_path
+ * @param string $php_ext
+ */
+ public function __construct(\phpbb\db\driver\driver $db, \phpbb\config\config $config, \phpbb\passwords\manager $passwords_manager, \phpbb\request\request_interface $request, \phpbb\user $user, $auth_provider_oauth_token_storage_table, $auth_provider_oauth_token_account_assoc, \phpbb\di\service_collection $service_providers, $users_table, $phpbb_root_path, $php_ext)
+ {
+ $this->db = $db;
+ $this->config = $config;
+ $this->passwords_manager = $passwords_manager;
+ $this->request = $request;
+ $this->user = $user;
+ $this->auth_provider_oauth_token_storage_table = $auth_provider_oauth_token_storage_table;
+ $this->auth_provider_oauth_token_account_assoc = $auth_provider_oauth_token_account_assoc;
+ $this->service_providers = $service_providers;
+ $this->users_table = $users_table;
+ $this->phpbb_root_path = $phpbb_root_path;
+ $this->php_ext = $php_ext;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function init()
+ {
+ // This does not test whether or not the key and secret provided are valid.
+ foreach ($this->service_providers as $service_provider)
+ {
+ $credentials = $service_provider->get_service_credentials();
+
+ if (($credentials['key'] && !$credentials['secret']) || (!$credentials['key'] && $credentials['secret']))
+ {
+ return $this->user->lang['AUTH_PROVIDER_OAUTH_ERROR_ELEMENT_MISSING'];
+ }
+ }
+ return false;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function login($username, $password)
+ {
+ // Temporary workaround for only having one authentication provider available
+ if (!$this->request->is_set('oauth_service'))
+ {
+ $provider = new \phpbb\auth\provider\db($this->db, $this->config, $this->passwords_manager, $this->request, $this->user, $this->phpbb_root_path, $this->php_ext);
+ return $provider->login($username, $password);
+ }
+
+ // Requst the name of the OAuth service
+ $service_name_original = $this->request->variable('oauth_service', '', false);
+ $service_name = 'auth.provider.oauth.service.' . strtolower($service_name_original);
+ if ($service_name_original === '' || !array_key_exists($service_name, $this->service_providers))
+ {
+ return array(
+ 'status' => LOGIN_ERROR_EXTERNAL_AUTH,
+ 'error_msg' => 'LOGIN_ERROR_OAUTH_SERVICE_DOES_NOT_EXIST',
+ 'user_row' => array('user_id' => ANONYMOUS),
+ );
+ }
+
+ // Get the service credentials for the given service
+ $service_credentials = $this->service_providers[$service_name]->get_service_credentials();
+
+ $storage = new \phpbb\auth\provider\oauth\token_storage($this->db, $this->user, $this->auth_provider_oauth_token_storage_table);
+ $query = 'mode=login&login=external&oauth_service=' . $service_name_original;
+ $service = $this->get_service($service_name_original, $storage, $service_credentials, $query, $this->service_providers[$service_name]->get_auth_scope());
+
+ if ($this->request->is_set('code', \phpbb\request\request_interface::GET))
+ {
+ $this->service_providers[$service_name]->set_external_service_provider($service);
+ $unique_id = $this->service_providers[$service_name]->perform_auth_login();
+
+ // Check to see if this provider is already assosciated with an account
+ $data = array(
+ 'provider' => $service_name_original,
+ 'oauth_provider_id' => $unique_id
+ );
+ $sql = 'SELECT user_id FROM ' . $this->auth_provider_oauth_token_account_assoc . '
+ WHERE ' . $this->db->sql_build_array('SELECT', $data);
+ $result = $this->db->sql_query($sql);
+ $row = $this->db->sql_fetchrow($result);
+ $this->db->sql_freeresult($result);
+
+ if (!$row)
+ {
+ // The user does not yet exist, ask to link or create profile
+ return array(
+ 'status' => LOGIN_SUCCESS_LINK_PROFILE,
+ 'error_msg' => 'LOGIN_OAUTH_ACCOUNT_NOT_LINKED',
+ 'user_row' => array(),
+ 'redirect_data' => array(
+ 'auth_provider' => 'oauth',
+ 'login_link_oauth_service' => $service_name_original,
+ ),
+ );
+ }
+
+ // Retrieve the user's account
+ $sql = 'SELECT user_id, username, user_password, user_passchg, user_pass_convert, user_email, user_type, user_login_attempts
+ FROM ' . $this->users_table . '
+ WHERE user_id = ' . (int) $row['user_id'];
+ $result = $this->db->sql_query($sql);
+ $row = $this->db->sql_fetchrow($result);
+ $this->db->sql_freeresult($result);
+
+ if (!$row)
+ {
+ throw new Exception('AUTH_PROVIDER_OAUTH_ERROR_INVALID_ENTRY');
+ }
+
+ // Update token storage to store the user_id
+ $storage->set_user_id($row['user_id']);
+
+ // The user is now authenticated and can be logged in
+ return array(
+ 'status' => LOGIN_SUCCESS,
+ 'error_msg' => false,
+ 'user_row' => $row,
+ );
+ }
+ else
+ {
+ $url = $service->getAuthorizationUri();
+ header('Location: ' . $url);
+ }
+ }
+
+ /**
+ * Returns the cached current_uri object or creates and caches it if it is
+ * not already created. In each case the query string is updated based on
+ * the $query parameter.
+ *
+ * @param string $service_name The name of the service
+ * @param string $query The query string of the current_uri
+ * used in redirects
+ * @return \OAuth\Common\Http\Uri\UriInterface
+ */
+ protected function get_current_uri($service_name, $query)
+ {
+ if ($this->current_uri)
+ {
+ $this->current_uri->setQuery($query);
+ return $this->current_uri;
+ }
+
+ $uri_factory = new \OAuth\Common\Http\Uri\UriFactory();
+ $current_uri = $uri_factory->createFromSuperGlobalArray($this->request->get_super_global(\phpbb\request\request_interface::SERVER));
+ $current_uri->setQuery($query);
+
+ $this->current_uri = $current_uri;
+ return $current_uri;
+ }
+
+ /**
+ * Returns a new service object
+ *
+ * @param string $service_name The name of the service
+ * @param \phpbb\auth\provider\oauth\token_storage $storage
+ * @param array $service_credentials {@see \phpbb\auth\provider\oauth\oauth::get_service_credentials}
+ * @param string $query The query string of the
+ * current_uri used in redirection
+ * @param array $scope The scope of the request against
+ * the api.
+ * @return \OAuth\Common\Service\ServiceInterface
+ */
+ protected function get_service($service_name, \phpbb\auth\provider\oauth\token_storage $storage, array $service_credentials, $query, array $scopes = array())
+ {
+ $current_uri = $this->get_current_uri($service_name, $query);
+
+ // Setup the credentials for the requests
+ $credentials = new Credentials(
+ $service_credentials['key'],
+ $service_credentials['secret'],
+ $current_uri->getAbsoluteUri()
+ );
+
+ $service_factory = new \OAuth\ServiceFactory();
+ $service = $service_factory->createService($service_name, $credentials, $storage, $scopes);
+
+ if (!$service)
+ {
+ throw new Exception('AUTH_PROVIDER_OAUTH_ERROR_SERVICE_NOT_CREATED');
+ }
+
+ return $service;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function get_login_data()
+ {
+ $login_data = array(
+ 'TEMPLATE_FILE' => 'login_body_oauth.html',
+ 'BLOCK_VAR_NAME' => 'oauth',
+ 'BLOCK_VARS' => array(),
+ );
+
+ foreach ($this->service_providers as $service_name => $service_provider)
+ {
+ // Only include data if the credentials are set
+ $credentials = $service_provider->get_service_credentials();
+ if ($credentials['key'] && $credentials['secret'])
+ {
+ $actual_name = str_replace('auth.provider.oauth.service.', '', $service_name);
+ $redirect_url = build_url(false) . '&login=external&oauth_service=' . $actual_name;
+ $login_data['BLOCK_VARS'][$service_name] = array(
+ 'REDIRECT_URL' => redirect($redirect_url, true),
+ 'SERVICE_NAME' => $this->user->lang['AUTH_PROVIDER_OAUTH_SERVICE_' . strtoupper($actual_name)],
+ );
+ }
+ }
+
+ return $login_data;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function acp()
+ {
+ $ret = array();
+
+ foreach ($this->service_providers as $service_name => $service_provider)
+ {
+ $actual_name = str_replace('auth.provider.oauth.service.', '', $service_name);
+ $ret[] = 'auth_oauth_' . $actual_name . '_key';
+ $ret[] = 'auth_oauth_' . $actual_name . '_secret';
+ }
+
+ return $ret;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function get_acp_template($new_config)
+ {
+ $ret = array(
+ 'BLOCK_VAR_NAME' => 'oauth_services',
+ 'BLOCK_VARS' => array(),
+ 'TEMPLATE_FILE' => 'auth_provider_oauth.html',
+ 'TEMPLATE_VARS' => array(),
+ );
+
+ foreach ($this->service_providers as $service_name => $service_provider)
+ {
+ $actual_name = str_replace('auth.provider.oauth.service.', '', $service_name);
+ $ret['BLOCK_VARS'][$actual_name] = array(
+ 'ACTUAL_NAME' => $this->user->lang['AUTH_PROVIDER_OAUTH_SERVICE_' . strtoupper($actual_name)],
+ 'KEY' => $new_config['auth_oauth_' . $actual_name . '_key'],
+ 'NAME' => $actual_name,
+ 'SECRET' => $new_config['auth_oauth_' . $actual_name . '_secret'],
+ );
+ }
+
+ return $ret;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function login_link_has_necessary_data($login_link_data)
+ {
+ if (empty($login_link_data))
+ {
+ return 'LOGIN_LINK_NO_DATA_PROVIDED';
+ }
+
+ if (!array_key_exists('oauth_service', $login_link_data) || !$login_link_data['oauth_service'] ||
+ !array_key_exists('link_method', $login_link_data) || !$login_link_data['link_method'])
+ {
+ return 'LOGIN_LINK_MISSING_DATA';
+ }
+
+ return null;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function link_account(array $link_data)
+ {
+ // Check for a valid link method (auth_link or login_link)
+ if (!array_key_exists('link_method', $link_data) ||
+ !in_array($link_data['link_method'], array(
+ 'auth_link',
+ 'login_link',
+ )))
+ {
+ return 'LOGIN_LINK_MISSING_DATA';
+ }
+
+ // We must have an oauth_service listed, check for it two ways
+ if (!array_key_exists('oauth_service', $link_data) || !$link_data['oauth_service'])
+ {
+ $link_data['oauth_service'] = $this->request->variable('oauth_service', '');
+
+ if (!$link_data['oauth_service'])
+ {
+ return 'LOGIN_LINK_MISSING_DATA';
+ }
+ }
+
+ $service_name = 'auth.provider.oauth.service.' . strtolower($link_data['oauth_service']);
+ if (!array_key_exists($service_name, $this->service_providers))
+ {
+ return 'LOGIN_ERROR_OAUTH_SERVICE_DOES_NOT_EXIST';
+ }
+
+ switch ($link_data['link_method'])
+ {
+ case 'auth_link':
+ return $this->link_account_auth_link($link_data, $service_name);
+ case 'login_link':
+ return $this->link_account_login_link($link_data, $service_name);
+ }
+ }
+
+ /**
+ * Performs the account linking for login_link
+ *
+ * @param array $link_data The same variable given to {@see \phpbb\auth\provider\provider_interface::link_account}
+ * @param string $service_name The name of the service being used in
+ * linking.
+ * @return string|null Returns a language constant (string) if an error is
+ * encountered, or null on success.
+ */
+ protected function link_account_login_link(array $link_data, $service_name)
+ {
+ $storage = new \phpbb\auth\provider\oauth\token_storage($this->db, $this->user, $this->auth_provider_oauth_token_storage_table);
+
+ // Check for an access token, they should have one
+ if (!$storage->has_access_token_by_session($service_name))
+ {
+ return 'LOGIN_LINK_ERROR_OAUTH_NO_ACCESS_TOKEN';
+ }
+
+ // Prepare the query string
+ $query = 'mode=login_link&login_link_oauth_service=' . strtolower($link_data['oauth_service']);
+
+ // Prepare for an authentication request
+ $service_credentials = $this->service_providers[$service_name]->get_service_credentials();
+ $scopes = $this->service_providers[$service_name]->get_auth_scope();
+ $service = $this->get_service(strtolower($link_data['oauth_service']), $storage, $service_credentials, $query, $scopes);
+ $this->service_providers[$service_name]->set_external_service_provider($service);
+
+ // The user has already authenticated successfully, request to authenticate again
+ $unique_id = $this->service_providers[$service_name]->perform_token_auth();
+
+ // Insert into table, they will be able to log in after this
+ $data = array(
+ 'user_id' => $link_data['user_id'],
+ 'provider' => strtolower($link_data['oauth_service']),
+ 'oauth_provider_id' => $unique_id,
+ );
+
+ $this->link_account_perform_link($data);
+ // Update token storage to store the user_id
+ $storage->set_user_id($link_data['user_id']);
+ }
+
+ /**
+ * Performs the account linking for auth_link
+ *
+ * @param array $link_data The same variable given to {@see \phpbb\auth\provider\provider_interface::link_account}
+ * @param string $service_name The name of the service being used in
+ * linking.
+ * @return string|null Returns a language constant (string) if an error is
+ * encountered, or null on success.
+ */
+ protected function link_account_auth_link(array $link_data, $service_name)
+ {
+ $storage = new \phpbb\auth\provider\oauth\token_storage($this->db, $this->user, $this->auth_provider_oauth_token_storage_table);
+ $query = 'i=ucp_auth_link&mode=auth_link&link=1&oauth_service=' . strtolower($link_data['oauth_service']);
+ $service_credentials = $this->service_providers[$service_name]->get_service_credentials();
+ $scopes = $this->service_providers[$service_name]->get_auth_scope();
+ $service = $this->get_service(strtolower($link_data['oauth_service']), $storage, $service_credentials, $query, $scopes);
+
+ if ($this->request->is_set('code', \phpbb\request\request_interface::GET))
+ {
+ $this->service_providers[$service_name]->set_external_service_provider($service);
+ $unique_id = $this->service_providers[$service_name]->perform_auth_login();
+
+ // Insert into table, they will be able to log in after this
+ $data = array(
+ 'user_id' => $this->user->data['user_id'],
+ 'provider' => strtolower($link_data['oauth_service']),
+ 'oauth_provider_id' => $unique_id,
+ );
+
+ $this->link_account_perform_link($data);
+ }
+ else
+ {
+ $url = $service->getAuthorizationUri();
+ header('Location: ' . $url);
+ }
+ }
+
+ /**
+ * Performs the query that inserts an account link
+ *
+ * @param array $data This array is passed to db->sql_build_array
+ */
+ protected function link_account_perform_link(array $data)
+ {
+ $sql = 'INSERT INTO ' . $this->auth_provider_oauth_token_account_assoc . '
+ ' . $this->db->sql_build_array('INSERT', $data);
+ $this->db->sql_query($sql);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function logout($data, $new_session)
+ {
+ // Clear all tokens belonging to the user
+ $storage = new \phpbb\auth\provider\oauth\token_storage($this->db, $this->user, $this->auth_provider_oauth_token_storage_table);
+ $storage->clearAllTokens();
+
+ return;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function get_auth_link_data()
+ {
+ $block_vars = array();
+
+ // Get all external accounts tied to the current user
+ $data = array(
+ 'user_id' => (int) $this->user->data['user_id'],
+ );
+ $sql = 'SELECT oauth_provider_id, provider FROM ' . $this->auth_provider_oauth_token_account_assoc . '
+ WHERE ' . $this->db->sql_build_array('SELECT', $data);
+ $result = $this->db->sql_query($sql);
+ $rows = $this->db->sql_fetchrowset($result);
+ $this->db->sql_freeresult($result);
+
+ $oauth_user_ids = array();
+
+ if ($rows !== false && sizeof($rows))
+ {
+ foreach ($rows as $row)
+ {
+ $oauth_user_ids[$row['provider']] = $row['oauth_provider_id'];
+ }
+ }
+ unset($rows);
+
+ foreach ($this->service_providers as $service_name => $service_provider)
+ {
+ // Only include data if the credentials are set
+ $credentials = $service_provider->get_service_credentials();
+ if ($credentials['key'] && $credentials['secret'])
+ {
+ $actual_name = str_replace('auth.provider.oauth.service.', '', $service_name);
+
+ $block_vars[$service_name] = array(
+ 'HIDDEN_FIELDS' => array(
+ 'link' => (!isset($oauth_user_ids[$actual_name])),
+ 'oauth_service' => $actual_name,
+ ),
+
+ 'SERVICE_NAME' => $this->user->lang['AUTH_PROVIDER_OAUTH_SERVICE_' . strtoupper($actual_name)],
+ 'UNIQUE_ID' => (isset($oauth_user_ids[$actual_name])) ? $oauth_user_ids[$actual_name] : null,
+ );
+ }
+ }
+
+ return array(
+ 'BLOCK_VAR_NAME' => 'oauth',
+ 'BLOCK_VARS' => $block_vars,
+
+ 'TEMPLATE_FILE' => 'ucp_auth_link_oauth.html',
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function unlink_account(array $link_data)
+ {
+ if (!array_key_exists('oauth_service', $link_data) || !$link_data['oauth_service'])
+ {
+ return 'LOGIN_LINK_MISSING_DATA';
+ }
+
+ // Remove the link
+ $sql = 'DELETE FROM ' . $this->auth_provider_oauth_token_account_assoc . "
+ WHERE provider = '" . $this->db->sql_escape($link_data['oauth_service']) . "'
+ AND user_id = " . (int) $this->user->data['user_id'];
+ $this->db->sql_query($sql);
+
+ // Clear all tokens belonging to the user on this servce
+ $service_name = 'auth.provider.oauth.service.' . strtolower($link_data['oauth_service']);
+ $storage = new \phpbb\auth\provider\oauth\token_storage($this->db, $this->user, $this->auth_provider_oauth_token_storage_table);
+ $storage->clearToken($service_name);
+
+ return;
+ }
+}
diff --git a/phpBB/phpbb/auth/provider/oauth/service/base.php b/phpBB/phpbb/auth/provider/oauth/service/base.php
new file mode 100644
index 0000000000..7a144d2f51
--- /dev/null
+++ b/phpBB/phpbb/auth/provider/oauth/service/base.php
@@ -0,0 +1,49 @@
+<?php
+/**
+*
+* @package auth
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\auth\provider\oauth\service;
+
+/**
+* Base OAuth abstract class that all OAuth services should implement
+*
+* @package auth
+*/
+abstract class base implements \phpbb\auth\provider\oauth\service\service_interface
+{
+ /**
+ * External OAuth service provider
+ *
+ * @var \OAuth\Common\Service\ServiceInterface
+ */
+ protected $service_provider;
+
+ /**
+ * {@inheritdoc}
+ */
+ public function get_external_service_provider()
+ {
+ return $this->service_provider;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function get_auth_scope()
+ {
+ return array();
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function set_external_service_provider(\OAuth\Common\Service\ServiceInterface $service_provider)
+ {
+ $this->service_provider = $service_provider;
+ }
+}
diff --git a/phpBB/phpbb/auth/provider/oauth/service/bitly.php b/phpBB/phpbb/auth/provider/oauth/service/bitly.php
new file mode 100644
index 0000000000..b4050033a6
--- /dev/null
+++ b/phpBB/phpbb/auth/provider/oauth/service/bitly.php
@@ -0,0 +1,92 @@
+<?php
+/**
+*
+* @package auth
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\auth\provider\oauth\service;
+
+/**
+* Bitly OAuth service
+*
+* @package auth
+*/
+class bitly extends \phpbb\auth\provider\oauth\service\base
+{
+ /**
+ * phpBB config
+ *
+ * @var \phpbb\config\config
+ */
+ protected $config;
+
+ /**
+ * phpBB request
+ *
+ * @var \phpbb\request\request_interface
+ */
+ protected $request;
+
+ /**
+ * Constructor
+ *
+ * @param \phpbb\config\config $config
+ * @param \phpbb\request\request_interface $request
+ */
+ public function __construct(\phpbb\config\config $config, \phpbb\request\request_interface $request)
+ {
+ $this->config = $config;
+ $this->request = $request;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function get_service_credentials()
+ {
+ return array(
+ 'key' => $this->config['auth_oauth_bitly_key'],
+ 'secret' => $this->config['auth_oauth_bitly_secret'],
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function perform_auth_login()
+ {
+ if (!($this->service_provider instanceof \OAuth\OAuth2\Service\Bitly))
+ {
+ throw new \phpbb\auth\provider\oauth\service\exception('AUTH_PROVIDER_OAUTH_ERROR_INVALID_SERVICE_TYPE');
+ }
+
+ // This was a callback request from bitly, get the token
+ $this->service_provider->requestAccessToken($this->request->variable('code', ''));
+
+ // Send a request with it
+ $result = json_decode($this->service_provider->request('user/info'), true);
+
+ // Return the unique identifier returned from bitly
+ return $result['data']['login'];
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function perform_token_auth()
+ {
+ if (!($this->service_provider instanceof \OAuth\OAuth2\Service\Bitly))
+ {
+ throw new \phpbb\auth\provider\oauth\service\exception('AUTH_PROVIDER_OAUTH_ERROR_INVALID_SERVICE_TYPE');
+ }
+
+ // Send a request with it
+ $result = json_decode($this->service_provider->request('user/info'), true);
+
+ // Return the unique identifier returned from bitly
+ return $result['data']['login'];
+ }
+}
diff --git a/phpBB/phpbb/auth/provider/oauth/service/exception.php b/phpBB/phpbb/auth/provider/oauth/service/exception.php
new file mode 100644
index 0000000000..3bc93be01e
--- /dev/null
+++ b/phpBB/phpbb/auth/provider/oauth/service/exception.php
@@ -0,0 +1,19 @@
+<?php
+/**
+*
+* @package auth
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\auth\provider\oauth\service;
+
+/**
+* OAuth service exception class
+*
+* @package auth
+*/
+class exception extends \RuntimeException
+{
+}
diff --git a/phpBB/phpbb/auth/provider/oauth/service/facebook.php b/phpBB/phpbb/auth/provider/oauth/service/facebook.php
new file mode 100644
index 0000000000..2698be8b18
--- /dev/null
+++ b/phpBB/phpbb/auth/provider/oauth/service/facebook.php
@@ -0,0 +1,92 @@
+<?php
+/**
+*
+* @package auth
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\auth\provider\oauth\service;
+
+/**
+* Facebook OAuth service
+*
+* @package auth
+*/
+class facebook extends base
+{
+ /**
+ * phpBB config
+ *
+ * @var phpbb\config\config
+ */
+ protected $config;
+
+ /**
+ * phpBB request
+ *
+ * @var phpbb\request\request_interface
+ */
+ protected $request;
+
+ /**
+ * Constructor
+ *
+ * @param phpbb\config\config $config
+ * @param phpbb\request\request_interface $request
+ */
+ public function __construct(\phpbb\config\config $config, \phpbb\request\request_interface $request)
+ {
+ $this->config = $config;
+ $this->request = $request;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function get_service_credentials()
+ {
+ return array(
+ 'key' => $this->config['auth_oauth_facebook_key'],
+ 'secret' => $this->config['auth_oauth_facebook_secret'],
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function perform_auth_login()
+ {
+ if (!($this->service_provider instanceof \OAuth\OAuth2\Service\Facebook))
+ {
+ throw new exception('AUTH_PROVIDER_OAUTH_ERROR_INVALID_SERVICE_TYPE');
+ }
+
+ // This was a callback request, get the token
+ $this->service_provider->requestAccessToken($this->request->variable('code', ''));
+
+ // Send a request with it
+ $result = json_decode($this->service_provider->request('/me'), true);
+
+ // Return the unique identifier
+ return $result['id'];
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function perform_token_auth()
+ {
+ if (!($this->service_provider instanceof \OAuth\OAuth2\Service\Facebook))
+ {
+ throw new exception('AUTH_PROVIDER_OAUTH_ERROR_INVALID_SERVICE_TYPE');
+ }
+
+ // Send a request with it
+ $result = json_decode($this->service_provider->request('/me'), true);
+
+ // Return the unique identifier
+ return $result['id'];
+ }
+}
diff --git a/phpBB/phpbb/auth/provider/oauth/service/google.php b/phpBB/phpbb/auth/provider/oauth/service/google.php
new file mode 100644
index 0000000000..08cb025c2d
--- /dev/null
+++ b/phpBB/phpbb/auth/provider/oauth/service/google.php
@@ -0,0 +1,103 @@
+<?php
+/**
+*
+* @package auth
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\auth\provider\oauth\service;
+
+/**
+* Google OAuth service
+*
+* @package auth
+*/
+class google extends base
+{
+ /**
+ * phpBB config
+ *
+ * @var phpbb\config\config
+ */
+ protected $config;
+
+ /**
+ * phpBB request
+ *
+ * @var phpbb\request\request_interface
+ */
+ protected $request;
+
+ /**
+ * Constructor
+ *
+ * @param phpbb\config\config $config
+ * @param phpbb\request\request_interface $request
+ */
+ public function __construct(\phpbb\config\config $config, \phpbb\request\request_interface $request)
+ {
+ $this->config = $config;
+ $this->request = $request;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function get_auth_scope()
+ {
+ return array(
+ 'userinfo_email',
+ 'userinfo_profile',
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function get_service_credentials()
+ {
+ return array(
+ 'key' => $this->config['auth_oauth_google_key'],
+ 'secret' => $this->config['auth_oauth_google_secret'],
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function perform_auth_login()
+ {
+ if (!($this->service_provider instanceof \OAuth\OAuth2\Service\Google))
+ {
+ throw new exception('AUTH_PROVIDER_OAUTH_ERROR_INVALID_SERVICE_TYPE');
+ }
+
+ // This was a callback request, get the token
+ $this->service_provider->requestAccessToken($this->request->variable('code', ''));
+
+ // Send a request with it
+ $result = json_decode($this->service_provider->request('https://www.googleapis.com/oauth2/v1/userinfo'), true);
+
+ // Return the unique identifier
+ return $result['id'];
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function perform_token_auth()
+ {
+ if (!($this->service_provider instanceof \OAuth\OAuth2\Service\Google))
+ {
+ throw new exception('AUTH_PROVIDER_OAUTH_ERROR_INVALID_SERVICE_TYPE');
+ }
+
+ // Send a request with it
+ $result = json_decode($this->service_provider->request('https://www.googleapis.com/oauth2/v1/userinfo'), true);
+
+ // Return the unique identifier
+ return $result['id'];
+ }
+}
diff --git a/phpBB/phpbb/auth/provider/oauth/service/service_interface.php b/phpBB/phpbb/auth/provider/oauth/service/service_interface.php
new file mode 100644
index 0000000000..eee3a51cac
--- /dev/null
+++ b/phpBB/phpbb/auth/provider/oauth/service/service_interface.php
@@ -0,0 +1,71 @@
+<?php
+/**
+*
+* @package auth
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\auth\provider\oauth\service;
+
+/**
+* OAuth service interface
+*
+* @package auth
+*/
+interface service_interface
+{
+ /**
+ * Returns an array of the scopes necessary for auth
+ *
+ * @return array An array of the required scopes
+ */
+ public function get_auth_scope();
+
+ /**
+ * Returns the external library service provider once it has been set
+ *
+ * @param \OAuth\Common\Service\ServiceInterface|null
+ */
+ public function get_external_service_provider();
+
+ /**
+ * Returns an array containing the service credentials belonging to requested
+ * service.
+ *
+ * @return array An array containing the 'key' and the 'secret' of the
+ * service in the form:
+ * array(
+ * 'key' => string
+ * 'secret' => string
+ * )
+ */
+ public function get_service_credentials();
+
+ /**
+ * Returns the results of the authentication in json format
+ *
+ * @throws \phpbb\auth\provider\oauth\service\exception
+ * @return string The unique identifier returned by the service provider
+ * that is used to authenticate the user with phpBB.
+ */
+ public function perform_auth_login();
+
+ /**
+ * Returns the results of the authentication in json format
+ * Use this function when the user already has an access token
+ *
+ * @throws \phpbb\auth\provider\oauth\service\exception
+ * @return string The unique identifier returned by the service provider
+ * that is used to authenticate the user with phpBB.
+ */
+ public function perform_token_auth();
+
+ /**
+ * Sets the external library service provider
+ *
+ * @param \OAuth\Common\Service\ServiceInterface $service
+ */
+ public function set_external_service_provider(\OAuth\Common\Service\ServiceInterface $service_provider);
+}
diff --git a/phpBB/phpbb/auth/provider/oauth/token_storage.php b/phpBB/phpbb/auth/provider/oauth/token_storage.php
new file mode 100644
index 0000000000..43574288dc
--- /dev/null
+++ b/phpBB/phpbb/auth/provider/oauth/token_storage.php
@@ -0,0 +1,360 @@
+<?php
+/**
+*
+* @package auth
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\auth\provider\oauth;
+
+
+use OAuth\OAuth1\Token\StdOAuth1Token;
+use OAuth\Common\Token\TokenInterface;
+use OAuth\Common\Storage\TokenStorageInterface;
+use OAuth\Common\Storage\Exception\StorageException;
+use OAuth\Common\Storage\Exception\TokenNotFoundException;
+
+/**
+* OAuth storage wrapper for phpbb's cache
+*
+* @package auth
+*/
+class token_storage implements TokenStorageInterface
+{
+ /**
+ * Cache driver.
+ *
+ * @var \phpbb\db\driver\driver
+ */
+ protected $db;
+
+ /**
+ * phpBB user
+ *
+ * @var \phpbb\user
+ */
+ protected $user;
+
+ /**
+ * OAuth token table
+ *
+ * @var string
+ */
+ protected $auth_provider_oauth_table;
+
+ /**
+ * @var object|TokenInterface
+ */
+ protected $cachedToken;
+
+ /**
+ * Creates token storage for phpBB.
+ *
+ * @param \phpbb\db\driver\driver $db
+ * @param \phpbb\user $user
+ * @param string $auth_provider_oauth_table
+ */
+ public function __construct(\phpbb\db\driver\driver $db, \phpbb\user $user, $auth_provider_oauth_table)
+ {
+ $this->db = $db;
+ $this->user = $user;
+ $this->auth_provider_oauth_table = $auth_provider_oauth_table;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function retrieveAccessToken($service)
+ {
+ $service = $this->get_service_name_for_db($service);
+
+ if ($this->cachedToken instanceof TokenInterface)
+ {
+ return $this->cachedToken;
+ }
+
+ $data = array(
+ 'user_id' => (int) $this->user->data['user_id'],
+ 'provider' => $service,
+ );
+
+ if ((int) $this->user->data['user_id'] === ANONYMOUS)
+ {
+ $data['session_id'] = $this->user->data['session_id'];
+ }
+
+ return $this->_retrieve_access_token($data);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function storeAccessToken($service, TokenInterface $token)
+ {
+ $service = $this->get_service_name_for_db($service);
+
+ $this->cachedToken = $token;
+
+ $data = array(
+ 'user_id' => (int) $this->user->data['user_id'],
+ 'provider' => $service,
+ 'oauth_token' => $this->json_encode_token($token),
+ 'session_id' => $this->user->data['session_id'],
+ );
+
+ $sql = 'INSERT INTO ' . $this->auth_provider_oauth_table . '
+ ' . $this->db->sql_build_array('INSERT', $data);
+ $this->db->sql_query($sql);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function hasAccessToken($service)
+ {
+ $service = $this->get_service_name_for_db($service);
+
+ if ($this->cachedToken) {
+ return true;
+ }
+
+ $data = array(
+ 'user_id' => (int) $this->user->data['user_id'],
+ 'provider' => $service,
+ );
+
+ if ((int) $this->user->data['user_id'] === ANONYMOUS)
+ {
+ $data['session_id'] = $this->user->data['session_id'];
+ }
+
+ return $this->_has_acess_token($data);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function clearToken($service)
+ {
+ $service = $this->get_service_name_for_db($service);
+
+ $this->cachedToken = null;
+
+ $sql = 'DELETE FROM ' . $this->auth_provider_oauth_table . '
+ WHERE user_id = ' . (int) $this->user->data['user_id'] . "
+ AND provider = '" . $this->db->sql_escape($service) . "'";
+
+ if ((int) $this->user->data['user_id'] === ANONYMOUS)
+ {
+ $sql .= " AND session_id = '" . $this->db->sql_escape($this->user->data['session_id']) . "'";
+ }
+
+ $this->db->sql_query($sql);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function clearAllTokens()
+ {
+ $this->cachedToken = null;
+
+ $sql = 'DELETE FROM ' . $this->auth_provider_oauth_table . '
+ WHERE user_id = ' . (int) $this->user->data['user_id'];
+
+ if ((int) $this->user->data['user_id'] === ANONYMOUS)
+ {
+ $sql .= " AND session_id = '" . $this->db->sql_escape($this->user->data['session_id']) . "'";
+ }
+
+ $this->db->sql_query($sql);
+ }
+
+ /**
+ * Updates the user_id field in the database assosciated with the token
+ *
+ * @param int $user_id
+ */
+ public function set_user_id($user_id)
+ {
+ if (!$this->cachedToken)
+ {
+ return;
+ }
+
+ $sql = 'UPDATE ' . $this->auth_provider_oauth_table . '
+ SET ' . $this->db->sql_build_array('UPDATE', array(
+ 'user_id' => (int) $user_id
+ )) . '
+ WHERE user_id = ' . (int) $this->user->data['user_id'] . "
+ AND session_id = '" . $this->db->sql_escape($this->user->data['session_id']) . "'";
+ $this->db->sql_query($sql);
+ }
+
+ /**
+ * Checks to see if an access token exists solely by the session_id of the user
+ *
+ * @return bool true if they have token, false if they don't
+ */
+ public function has_access_token_by_session($service)
+ {
+ $service = $this->get_service_name_for_db($service);
+
+ if ($this->cachedToken)
+ {
+ return true;
+ }
+
+ $data = array(
+ 'session_id' => $this->user->data['session_id'],
+ 'provider' => $service,
+ );
+
+ return $this->_has_acess_token($data);
+ }
+
+ /**
+ * A helper function that performs the query for has access token functions
+ *
+ * @param array $data
+ * @return bool
+ */
+ protected function _has_acess_token($data)
+ {
+ return (bool) $this->get_access_token_row($data);
+ }
+
+ public function retrieve_access_token_by_session($service)
+ {
+ $service = $this->get_service_name_for_db($service);
+
+ if ($this->cachedToken instanceof TokenInterface) {
+ return $this->cachedToken;
+ }
+
+ $data = array(
+ 'session_id' => $this->user->data['session_id'],
+ 'provider' => $service,
+ );
+
+ return $this->_retrieve_access_token($data);
+ }
+
+ /**
+ * A helper function that performs the query for retrieve access token functions
+ * Also checks if the token is a valid token
+ *
+ * @param array $data
+ * @return mixed
+ */
+ protected function _retrieve_access_token($data)
+ {
+ $row = $this->get_access_token_row($data);
+
+ if (!$row)
+ {
+ throw new TokenNotFoundException('AUTH_PROVIDER_OAUTH_TOKEN_ERROR_NOT_STORED');
+ }
+
+ $token = $this->json_decode_token($row['oauth_token']);
+
+ // Ensure that the token was serialized/unserialized correctly
+ if (!($token instanceof TokenInterface))
+ {
+ $this->clearToken();
+ throw new TokenNotFoundException('AUTH_PROVIDER_OAUTH_TOKEN_ERROR_INCORRECTLY_STORED');
+ }
+
+ $this->cachedToken = $token;
+ return $token;
+ }
+
+ /**
+ * A helper function that performs the query for retrieving an access token
+ *
+ * @param array $data
+ * @return mixed
+ */
+ protected function get_access_token_row($data)
+ {
+ $sql = 'SELECT oauth_token FROM ' . $this->auth_provider_oauth_table . '
+ WHERE ' . $this->db->sql_build_array('SELECT', $data);
+ $result = $this->db->sql_query($sql);
+ $row = $this->db->sql_fetchrow($result);
+ $this->db->sql_freeresult($result);
+
+ return $row;
+ }
+
+ public function json_encode_token(TokenInterface $token)
+ {
+ $members = array(
+ 'accessToken' => $token->getAccessToken(),
+ 'endOfLife' => $token->getEndOfLife(),
+ 'extraParams' => $token->getExtraParams(),
+ 'refreshToken' => $token->getRefreshToken(),
+
+ 'token_class' => get_class($token),
+ );
+
+ // Handle additional data needed for OAuth1 tokens
+ if ($token instanceof StdOAuth1Token)
+ {
+ $members['requestToken'] = $token->getRequestToken();
+ $members['requestTokenSecret'] = $token->getRequestTokenSecret();
+ $members['accessTokenSecret'] = $token->getAccessTokenSecret();
+ }
+
+ return json_encode($members);
+ }
+
+ public function json_decode_token($json)
+ {
+ $token_data = json_decode($json, true);
+
+ if ($token_data === null)
+ {
+ throw new TokenNotFoundException('AUTH_PROVIDER_OAUTH_TOKEN_ERROR_INCORRECTLY_STORED');
+ }
+
+ $token_class = $token_data['token_class'];
+ $access_token = $token_data['accessToken'];
+ $refresh_token = $token_data['refreshToken'];
+ $endOfLife = $token_data['endOfLife'];
+ $extra_params = $token_data['extraParams'];
+
+ // Create the token
+ $token = new $token_class($access_token, $refresh_token, TokenInterface::EOL_NEVER_EXPIRES, $extra_params);
+ $token->setEndOfLife($endOfLife);
+
+ // Handle OAuth 1.0 specific elements
+ if ($token instanceof StdOAuth1Token)
+ {
+ $token->setRequestToken($token_data['requestToken']);
+ $token->setRequestTokenSecret($token_data['requestTokenSecret']);
+ $token->setAccessTokenSecret($token_data['accessTokenSecret']);
+ }
+
+ return $token;
+ }
+
+ /**
+ * Returns the name of the service as it must be stored in the database.
+ *
+ * @param string $service The name of the OAuth service
+ * @return string The name of the OAuth service as it needs to be stored
+ * in the database.
+ */
+ protected function get_service_name_for_db($service)
+ {
+ // Enforce the naming convention for oauth services
+ if (strpos($service, 'auth.provider.oauth.service.') !== 0)
+ {
+ $service = 'auth.provider.oauth.service.' . strtolower($service);
+ }
+
+ return $service;
+ }
+}
diff --git a/phpBB/phpbb/auth/provider/provider_interface.php b/phpBB/phpbb/auth/provider/provider_interface.php
new file mode 100644
index 0000000000..946731f52d
--- /dev/null
+++ b/phpBB/phpbb/auth/provider/provider_interface.php
@@ -0,0 +1,191 @@
+<?php
+/**
+*
+* @package auth
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\auth\provider;
+
+/**
+ * The interface authentication provider classes have to implement.
+ *
+ * @package auth
+ */
+interface provider_interface
+{
+ /**
+ * Checks whether the user is currently identified to the authentication
+ * provider.
+ * Called in acp_board while setting authentication plugins.
+ * Changing to an authentication provider will not be permitted in acp_board
+ * if there is an error.
+ *
+ * @return boolean|string False if the user is identified, otherwise an
+ * error message, or null if not implemented.
+ */
+ public function init();
+
+ /**
+ * Performs login.
+ *
+ * @param string $username The name of the user being authenticated.
+ * @param string $password The password of the user.
+ * @return array An associative array of the format:
+ * array(
+ * 'status' => status constant
+ * 'error_msg' => string
+ * 'user_row' => array
+ * )
+ * A fourth key of the array may be present:
+ * 'redirect_data' This key is only used when 'status' is
+ * equal to LOGIN_SUCCESS_LINK_PROFILE and its value is an
+ * associative array that is turned into GET variables on
+ * the redirect url.
+ */
+ public function login($username, $password);
+
+ /**
+ * Autologin function
+ *
+ * @return array|null containing the user row, empty if no auto login
+ * should take place, or null if not impletmented.
+ */
+ public function autologin();
+
+ /**
+ * This function is used to output any required fields in the authentication
+ * admin panel. It also defines any required configuration table fields.
+ *
+ * @return array|null Returns null if not implemented or an array of the
+ * configuration fields of the provider.
+ */
+ public function acp();
+
+ /**
+ * This function updates the template with variables related to the acp
+ * options with whatever configuraton values are passed to it as an array.
+ * It then returns the name of the acp file related to this authentication
+ * provider.
+ * @param array $new_config Contains the new configuration values that
+ * have been set in acp_board.
+ * @return array|null Returns null if not implemented or an array with
+ * the template file name and an array of the vars
+ * that the template needs that must conform to the
+ * following example:
+ * array(
+ * 'TEMPLATE_FILE' => string,
+ * 'TEMPLATE_VARS' => array(...),
+ * )
+ * An optional third element may be added to this
+ * array: 'BLOCK_VAR_NAME'. If this is present,
+ * then its value should be a string that is used
+ * to designate the name of the loop used in the
+ * ACP template file. When this is present, an
+ * additional key named 'BLOCK_VARS' is required.
+ * This must be an array containing at least one
+ * array of variables that will be assigned during
+ * the loop in the template. An example of this is
+ * presented below:
+ * array(
+ * 'BLOCK_VAR_NAME' => string,
+ * 'BLOCK_VARS' => array(
+ * 'KEY IS UNIMPORTANT' => array(...),
+ * ),
+ * 'TEMPLATE_FILE' => string,
+ * 'TEMPLATE_VARS' => array(...),
+ * )
+ */
+ public function get_acp_template($new_config);
+
+ /**
+ * Returns an array of data necessary to build custom elements on the login
+ * form.
+ *
+ * @return array|null If this function is not implemented on an auth
+ * provider then it returns null. If it is implemented
+ * it will return an array of up to four elements of
+ * which only 'TEMPLATE_FILE'. If 'BLOCK_VAR_NAME' is
+ * present then 'BLOCK_VARS' must also be present in
+ * the array. The fourth element 'VARS' is also
+ * optional. The array, with all four elements present
+ * looks like the following:
+ * array(
+ * 'TEMPLATE_FILE' => string,
+ * 'BLOCK_VAR_NAME' => string,
+ * 'BLOCK_VARS' => array(...),
+ * 'VARS' => array(...),
+ * )
+ */
+ public function get_login_data();
+
+ /**
+ * Performs additional actions during logout.
+ *
+ * @param array $data An array corresponding to
+ * \phpbb\session::data
+ * @param boolean $new_session True for a new session, false for no new
+ * session.
+ */
+ public function logout($data, $new_session);
+
+ /**
+ * The session validation function checks whether the user is still logged
+ * into phpBB.
+ *
+ * @param array $user
+ * @return boolean true if the given user is authenticated, false if the
+ * session should be closed, or null if not implemented.
+ */
+ public function validate_session($user);
+
+ /**
+ * Checks to see if $login_link_data contains all information except for the
+ * user_id of an account needed to successfully link an external account to
+ * a forum account.
+ *
+ * @param array $link_data Any data needed to link a phpBB account to
+ * an external account.
+ * @return string|null Returns a string with a language constant if there
+ * is data missing or null if there is no error.
+ */
+ public function login_link_has_necessary_data($login_link_data);
+
+ /**
+ * Links an external account to a phpBB account.
+ *
+ * @param array $link_data Any data needed to link a phpBB account to
+ * an external account.
+ */
+ public function link_account(array $link_data);
+
+ /**
+ * Returns an array of data necessary to build the ucp_auth_link page
+ *
+ * @return array|null If this function is not implemented on an auth
+ * provider then it returns null. If it is implemented
+ * it will return an array of up to four elements of
+ * which only 'TEMPLATE_FILE'. If 'BLOCK_VAR_NAME' is
+ * present then 'BLOCK_VARS' must also be present in
+ * the array. The fourth element 'VARS' is also
+ * optional. The array, with all four elements present
+ * looks like the following:
+ * array(
+ * 'TEMPLATE_FILE' => string,
+ * 'BLOCK_VAR_NAME' => string,
+ * 'BLOCK_VARS' => array(...),
+ * 'VARS' => array(...),
+ * )
+ */
+ public function get_auth_link_data();
+
+ /**
+ * Unlinks an external account from a phpBB account.
+ *
+ * @param array $link_data Any data needed to unlink a phpBB account
+ * from a phpbb account.
+ */
+ public function unlink_account(array $link_data);
+}
diff --git a/phpBB/phpbb/avatar/driver/driver.php b/phpBB/phpbb/avatar/driver/driver.php
new file mode 100644
index 0000000000..dd55f09119
--- /dev/null
+++ b/phpBB/phpbb/avatar/driver/driver.php
@@ -0,0 +1,129 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2011 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\avatar\driver;
+
+/**
+* Base class for avatar drivers
+* @package phpBB3
+*/
+abstract class driver implements \phpbb\avatar\driver\driver_interface
+{
+ /**
+ * Avatar driver name
+ * @var string
+ */
+ protected $name;
+
+ /**
+ * Current board configuration
+ * @var \phpbb\config\config
+ */
+ protected $config;
+
+ /**
+ * Current $phpbb_root_path
+ * @var string
+ */
+ protected $phpbb_root_path;
+
+ /**
+ * Current $php_ext
+ * @var string
+ */
+ protected $php_ext;
+
+ /**
+ * Path Helper
+ * @var \phpbb\path_helper
+ */
+ protected $path_helper;
+
+ /**
+ * Cache driver
+ * @var \phpbb\cache\driver\driver_interface
+ */
+ protected $cache;
+
+ /**
+ * Array of allowed avatar image extensions
+ * Array is used for setting the allowed extensions in the fileupload class
+ * and as a base for a regex of allowed extensions, which will be formed by
+ * imploding the array with a "|".
+ *
+ * @var array
+ */
+ protected $allowed_extensions = array(
+ 'gif',
+ 'jpg',
+ 'jpeg',
+ 'png',
+ );
+
+ /**
+ * Construct a driver object
+ *
+ * @param \phpbb\config\config $config phpBB configuration
+ * @param \phpbb\request\request $request Request object
+ * @param string $phpbb_root_path Path to the phpBB root
+ * @param string $php_ext PHP file extension
+ * @param \phpbb_path_helper $path_helper phpBB path helper
+ * @param \phpbb\cache\driver\driver_interface $cache Cache driver
+ */
+ public function __construct(\phpbb\config\config $config, $phpbb_root_path, $php_ext, \phpbb\path_helper $path_helper, \phpbb\cache\driver\driver_interface $cache = null)
+ {
+ $this->config = $config;
+ $this->phpbb_root_path = $phpbb_root_path;
+ $this->php_ext = $php_ext;
+ $this->path_helper = $path_helper;
+ $this->cache = $cache;
+ }
+
+ /**
+ * @inheritdoc
+ */
+ public function get_custom_html($user, $row, $alt = '')
+ {
+ return '';
+ }
+
+ /**
+ * @inheritdoc
+ */
+ public function prepare_form_acp($user)
+ {
+ return array();
+ }
+
+ /**
+ * @inheritdoc
+ */
+ public function delete($row)
+ {
+ return true;
+ }
+
+ /**
+ * @inheritdoc
+ */
+ public function get_name()
+ {
+ return $this->name;
+ }
+
+ /**
+ * Sets the name of the driver.
+ *
+ * @param string $name Driver name
+ */
+ public function set_name($name)
+ {
+ $this->name = $name;
+ }
+}
diff --git a/phpBB/phpbb/avatar/driver/driver_interface.php b/phpBB/phpbb/avatar/driver/driver_interface.php
new file mode 100644
index 0000000000..7f049469a2
--- /dev/null
+++ b/phpBB/phpbb/avatar/driver/driver_interface.php
@@ -0,0 +1,110 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2011 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\avatar\driver;
+
+/**
+* Interface for avatar drivers
+* @package phpBB3
+*/
+interface driver_interface
+{
+ /**
+ * Returns the name of the driver.
+ *
+ * @return string Name of driver.
+ */
+ public function get_name();
+
+ /**
+ * Get the avatar url and dimensions
+ *
+ * @param array $row User data or group data that has been cleaned with
+ * \phpbb\avatar\manager::clean_row
+ * @return array Avatar data, must have keys src, width and height, e.g.
+ * ['src' => '', 'width' => 0, 'height' => 0]
+ */
+ public function get_data($row);
+
+ /**
+ * Returns custom html if it is needed for displaying this avatar
+ *
+ * @param \phpbb\user $user phpBB user object
+ * @param array $row User data or group data that has been cleaned with
+ * \phpbb\avatar\manager::clean_row
+ * @param string $alt Alternate text for avatar image
+ *
+ * @return string HTML
+ */
+ public function get_custom_html($user, $row, $alt = '');
+
+ /**
+ * Prepare form for changing the settings of this avatar
+ *
+ * @param \phpbb\request\request $request Request object
+ * @param \phpbb\template\template $template Template object
+ * @param \phpbb\user $user User object
+ * @param array $row User data or group data that has been cleaned with
+ * \phpbb\avatar\manager::clean_row
+ * @param array &$error Reference to an error array that is filled by this
+ * function. Key values can either be a string with a language key or
+ * an array that will be passed to vsprintf() with the language key in
+ * the first array key.
+ *
+ * @return bool True if form has been successfully prepared
+ */
+ public function prepare_form($request, $template, $user, $row, &$error);
+
+ /**
+ * Prepare form for changing the acp settings of this avatar
+ *
+ * @param \phpbb\user $user phpBB user object
+ *
+ * @return array Array of configuration options as consumed by acp_board.
+ * The setting for enabling/disabling the avatar will be handled by
+ * the avatar manager.
+ */
+ public function prepare_form_acp($user);
+
+ /**
+ * Process form data
+ *
+ * @param \phpbb\request\request $request Request object
+ * @param \phpbb\template\template $template Template object
+ * @param \phpbb\user $user User object
+ * @param array $row User data or group data that has been cleaned with
+ * \phpbb\avatar\manager::clean_row
+ * @param array &$error Reference to an error array that is filled by this
+ * function. Key values can either be a string with a language key or
+ * an array that will be passed to vsprintf() with the language key in
+ * the first array key.
+ *
+ * @return array Array containing the avatar data as follows:
+ * ['avatar'], ['avatar_width'], ['avatar_height']
+ */
+ public function process_form($request, $template, $user, $row, &$error);
+
+ /**
+ * Delete avatar
+ *
+ * @param array $row User data or group data that has been cleaned with
+ * \phpbb\avatar\manager::clean_row
+ *
+ * @return bool True if avatar has been deleted or there is no need to delete,
+ * i.e. when the avatar is not hosted locally.
+ */
+ public function delete($row);
+
+ /**
+ * Get the avatar driver's template name
+ *
+ * @return string Avatar driver's template name
+ */
+ public function get_template_name();
+}
diff --git a/phpBB/phpbb/avatar/driver/gravatar.php b/phpBB/phpbb/avatar/driver/gravatar.php
new file mode 100644
index 0000000000..9f14b7f468
--- /dev/null
+++ b/phpBB/phpbb/avatar/driver/gravatar.php
@@ -0,0 +1,174 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\avatar\driver;
+
+/**
+* Handles avatars hosted at gravatar.com
+* @package phpBB3
+*/
+class gravatar extends \phpbb\avatar\driver\driver
+{
+ /**
+ * The URL for the gravatar service
+ */
+ const GRAVATAR_URL = '//secure.gravatar.com/avatar/';
+
+ /**
+ * @inheritdoc
+ */
+ public function get_data($row)
+ {
+ return array(
+ 'src' => $row['avatar'],
+ 'width' => $row['avatar_width'],
+ 'height' => $row['avatar_height'],
+ );
+ }
+
+ /**
+ * @inheritdoc
+ */
+ public function get_custom_html($user, $row, $alt = '')
+ {
+ return '<img src="' . $this->get_gravatar_url($row) . '" ' .
+ ($row['avatar_width'] ? ('width="' . $row['avatar_width'] . '" ') : '') .
+ ($row['avatar_height'] ? ('height="' . $row['avatar_height'] . '" ') : '') .
+ 'alt="' . ((!empty($user->lang[$alt])) ? $user->lang[$alt] : $alt) . '" />';
+ }
+
+ /**
+ * @inheritdoc
+ */
+ public function prepare_form($request, $template, $user, $row, &$error)
+ {
+ $template->assign_vars(array(
+ 'AVATAR_GRAVATAR_WIDTH' => (($row['avatar_type'] == $this->get_name() || $row['avatar_type'] == 'gravatar') && $row['avatar_width']) ? $row['avatar_width'] : $request->variable('avatar_gravatar_width', 0),
+ 'AVATAR_GRAVATAR_HEIGHT' => (($row['avatar_type'] == $this->get_name() || $row['avatar_type'] == 'gravatar') && $row['avatar_height']) ? $row['avatar_height'] : $request->variable('avatar_gravatar_width', 0),
+ 'AVATAR_GRAVATAR_EMAIL' => (($row['avatar_type'] == $this->get_name() || $row['avatar_type'] == 'gravatar') && $row['avatar']) ? $row['avatar'] : '',
+ ));
+
+ return true;
+ }
+
+ /**
+ * @inheritdoc
+ */
+ public function process_form($request, $template, $user, $row, &$error)
+ {
+ $row['avatar'] = $request->variable('avatar_gravatar_email', '');
+ $row['avatar_width'] = $request->variable('avatar_gravatar_width', 0);
+ $row['avatar_height'] = $request->variable('avatar_gravatar_height', 0);
+
+ if (!function_exists('validate_data'))
+ {
+ require($this->phpbb_root_path . 'includes/functions_user.' . $this->php_ext);
+ }
+
+ $validate_array = validate_data(
+ array(
+ 'email' => $row['avatar'],
+ ),
+ array(
+ 'email' => array(
+ array('string', false, 6, 60),
+ array('email'))
+ )
+ );
+
+ $error = array_merge($error, $validate_array);
+
+ if (!empty($error))
+ {
+ return false;
+ }
+
+ // Make sure getimagesize works...
+ if (function_exists('getimagesize') && ($row['avatar_width'] <= 0 || $row['avatar_height'] <= 0))
+ {
+ /**
+ * default to the minimum of the maximum allowed avatar size if the size
+ * is not or only partially entered
+ */
+ $row['avatar_width'] = $row['avatar_height'] = min($this->config['avatar_max_width'], $this->config['avatar_max_height']);
+ $url = $this->get_gravatar_url($row);
+
+ if (($row['avatar_width'] <= 0 || $row['avatar_height'] <= 0) && (($image_data = getimagesize($url)) === false))
+ {
+ $error[] = 'UNABLE_GET_IMAGE_SIZE';
+ return false;
+ }
+
+ if (!empty($image_data) && ($image_data[0] <= 0 || $image_data[1] <= 0))
+ {
+ $error[] = 'AVATAR_NO_SIZE';
+ return false;
+ }
+
+ $row['avatar_width'] = ($row['avatar_width'] && $row['avatar_height']) ? $row['avatar_width'] : $image_data[0];
+ $row['avatar_height'] = ($row['avatar_width'] && $row['avatar_height']) ? $row['avatar_height'] : $image_data[1];
+ }
+
+ if ($row['avatar_width'] <= 0 || $row['avatar_height'] <= 0)
+ {
+ $error[] = 'AVATAR_NO_SIZE';
+ return false;
+ }
+
+ if ($this->config['avatar_max_width'] || $this->config['avatar_max_height'])
+ {
+ if ($row['avatar_width'] > $this->config['avatar_max_width'] || $row['avatar_height'] > $this->config['avatar_max_height'])
+ {
+ $error[] = array('AVATAR_WRONG_SIZE', $this->config['avatar_min_width'], $this->config['avatar_min_height'], $this->config['avatar_max_width'], $this->config['avatar_max_height'], $row['avatar_width'], $row['avatar_height']);
+ return false;
+ }
+ }
+
+ if ($this->config['avatar_min_width'] || $this->config['avatar_min_height'])
+ {
+ if ($row['avatar_width'] < $this->config['avatar_min_width'] || $row['avatar_height'] < $this->config['avatar_min_height'])
+ {
+ $error[] = array('AVATAR_WRONG_SIZE', $this->config['avatar_min_width'], $this->config['avatar_min_height'], $this->config['avatar_max_width'], $this->config['avatar_max_height'], $row['avatar_width'], $row['avatar_height']);
+ return false;
+ }
+ }
+
+ return array(
+ 'avatar' => $row['avatar'],
+ 'avatar_width' => $row['avatar_width'],
+ 'avatar_height' => $row['avatar_height'],
+ );
+ }
+
+ /**
+ * @inheritdoc
+ */
+ public function get_template_name()
+ {
+ return 'ucp_avatar_options_gravatar.html';
+ }
+
+ /**
+ * Build gravatar URL for output on page
+ *
+ * @return string Gravatar URL
+ */
+ protected function get_gravatar_url($row)
+ {
+ $url = self::GRAVATAR_URL;
+ $url .= md5(strtolower(trim($row['avatar'])));
+
+ if ($row['avatar_width'] || $row['avatar_height'])
+ {
+ $url .= '?s=' . max($row['avatar_width'], $row['avatar_height']);
+ }
+
+ return $url;
+ }
+}
diff --git a/phpBB/phpbb/avatar/driver/local.php b/phpBB/phpbb/avatar/driver/local.php
new file mode 100644
index 0000000000..611a44cb3d
--- /dev/null
+++ b/phpBB/phpbb/avatar/driver/local.php
@@ -0,0 +1,199 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2011 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\avatar\driver;
+
+/**
+* Handles avatars selected from the board gallery
+* @package phpBB3
+*/
+class local extends \phpbb\avatar\driver\driver
+{
+ /**
+ * @inheritdoc
+ */
+ public function get_data($row)
+ {
+ return array(
+ 'src' => $this->path_helper->get_web_root_path() . $this->config['avatar_gallery_path'] . '/' . $row['avatar'],
+ 'width' => $row['avatar_width'],
+ 'height' => $row['avatar_height'],
+ );
+ }
+
+ /**
+ * @inheritdoc
+ */
+ public function prepare_form($request, $template, $user, $row, &$error)
+ {
+ $avatar_list = $this->get_avatar_list($user);
+ $category = $request->variable('avatar_local_cat', '');
+
+ foreach ($avatar_list as $cat => $null)
+ {
+ if (!empty($avatar_list[$cat]))
+ {
+ $template->assign_block_vars('avatar_local_cats', array(
+ 'NAME' => $cat,
+ 'SELECTED' => ($cat == $category),
+ ));
+ }
+
+ if ($cat != $category)
+ {
+ unset($avatar_list[$cat]);
+ }
+ }
+
+ if (!empty($avatar_list[$category]))
+ {
+ $template->assign_vars(array(
+ 'AVATAR_LOCAL_SHOW' => true,
+ ));
+
+ $table_cols = isset($row['avatar_gallery_cols']) ? $row['avatar_gallery_cols'] : 4;
+ $row_count = $col_count = $avatar_pos = 0;
+ $avatar_count = sizeof($avatar_list[$category]);
+
+ reset($avatar_list[$category]);
+
+ while ($avatar_pos < $avatar_count)
+ {
+ $img = current($avatar_list[$category]);
+ next($avatar_list[$category]);
+
+ if ($col_count == 0)
+ {
+ ++$row_count;
+ $template->assign_block_vars('avatar_local_row', array(
+ ));
+ }
+
+ $template->assign_block_vars('avatar_local_row.avatar_local_col', array(
+ 'AVATAR_IMAGE' => $this->phpbb_root_path . $this->config['avatar_gallery_path'] . '/' . $img['file'],
+ 'AVATAR_NAME' => $img['name'],
+ 'AVATAR_FILE' => $img['filename'],
+ ));
+
+ $template->assign_block_vars('avatar_local_row.avatar_local_option', array(
+ 'AVATAR_FILE' => $img['filename'],
+ 'S_OPTIONS_AVATAR' => $img['filename']
+ ));
+
+ $col_count = ($col_count + 1) % $table_cols;
+
+ ++$avatar_pos;
+ }
+ }
+
+ return true;
+ }
+
+ /**
+ * @inheritdoc
+ */
+ public function prepare_form_acp($user)
+ {
+ return array(
+ 'avatar_gallery_path' => array('lang' => 'AVATAR_GALLERY_PATH', 'validate' => 'rpath', 'type' => 'text:20:255', 'explain' => true),
+ );
+ }
+
+ /**
+ * @inheritdoc
+ */
+ public function process_form($request, $template, $user, $row, &$error)
+ {
+ $avatar_list = $this->get_avatar_list($user);
+ $category = $request->variable('avatar_local_cat', '');
+
+ $file = $request->variable('avatar_local_file', '');
+
+ if (empty($category) || empty($file))
+ {
+ $error[] = 'NO_AVATAR_SELECTED';
+ return false;
+ }
+
+ if (!isset($avatar_list[$category][urldecode($file)]))
+ {
+ $error[] = 'AVATAR_URL_NOT_FOUND';
+ return false;
+ }
+
+ return array(
+ 'avatar' => ($category != $user->lang['MAIN']) ? $category . '/' . $file : $file,
+ 'avatar_width' => $avatar_list[$category][urldecode($file)]['width'],
+ 'avatar_height' => $avatar_list[$category][urldecode($file)]['height'],
+ );
+ }
+
+ /**
+ * @inheritdoc
+ */
+ public function get_template_name()
+ {
+ return 'ucp_avatar_options_local.html';
+ }
+
+ /**
+ * Get a list of avatars that are locally available
+ * Results get cached for 24 hours (86400 seconds)
+ *
+ * @param \phpbb\user $user User object
+ *
+ * @return array Array containing the locally available avatars
+ */
+ protected function get_avatar_list($user)
+ {
+ $avatar_list = ($this->cache == null) ? false : $this->cache->get('avatar_local_list');
+
+ if ($avatar_list === false)
+ {
+ $avatar_list = array();
+ $path = $this->phpbb_root_path . $this->config['avatar_gallery_path'];
+
+ $iterator = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($path, \FilesystemIterator::SKIP_DOTS | \FilesystemIterator::UNIX_PATHS), \RecursiveIteratorIterator::SELF_FIRST);
+ foreach ($iterator as $file_info)
+ {
+ $file_path = $file_info->getPath();
+ $image = $file_info->getFilename();
+
+ // Match all images in the gallery folder
+ if (preg_match('#^[^&\'"<>]+\.(?:' . implode('|', $this->allowed_extensions) . ')$#i', $image) && is_file($file_path . '/' . $image))
+ {
+ if (function_exists('getimagesize'))
+ {
+ $dims = getimagesize($file_path . '/' . $image);
+ }
+ else
+ {
+ $dims = array(0, 0);
+ }
+ $cat = ($path == $file_path) ? $user->lang['MAIN'] : str_replace("$path/", '', $file_path);
+ $avatar_list[$cat][$image] = array(
+ 'file' => ($cat != $user->lang['MAIN']) ? rawurlencode($cat) . '/' . rawurlencode($image) : rawurlencode($image),
+ 'filename' => rawurlencode($image),
+ 'name' => ucfirst(str_replace('_', ' ', preg_replace('#^(.*)\..*$#', '\1', $image))),
+ 'width' => $dims[0],
+ 'height' => $dims[1],
+ );
+ }
+ }
+ ksort($avatar_list);
+
+ if ($this->cache != null)
+ {
+ $this->cache->put('avatar_local_list', $avatar_list, 86400);
+ }
+ }
+
+ return $avatar_list;
+ }
+}
diff --git a/phpBB/phpbb/avatar/driver/remote.php b/phpBB/phpbb/avatar/driver/remote.php
new file mode 100644
index 0000000000..36623942df
--- /dev/null
+++ b/phpBB/phpbb/avatar/driver/remote.php
@@ -0,0 +1,197 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2011 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\avatar\driver;
+
+/**
+* Handles avatars hosted remotely
+* @package phpBB3
+*/
+class remote extends \phpbb\avatar\driver\driver
+{
+ /**
+ * @inheritdoc
+ */
+ public function get_data($row)
+ {
+ return array(
+ 'src' => $row['avatar'],
+ 'width' => $row['avatar_width'],
+ 'height' => $row['avatar_height'],
+ );
+ }
+
+ /**
+ * @inheritdoc
+ */
+ public function prepare_form($request, $template, $user, $row, &$error)
+ {
+ $template->assign_vars(array(
+ 'AVATAR_REMOTE_WIDTH' => ((in_array($row['avatar_type'], array(AVATAR_REMOTE, $this->get_name(), 'remote'))) && $row['avatar_width']) ? $row['avatar_width'] : $request->variable('avatar_remote_width', 0),
+ 'AVATAR_REMOTE_HEIGHT' => ((in_array($row['avatar_type'], array(AVATAR_REMOTE, $this->get_name(), 'remote'))) && $row['avatar_height']) ? $row['avatar_height'] : $request->variable('avatar_remote_width', 0),
+ 'AVATAR_REMOTE_URL' => ((in_array($row['avatar_type'], array(AVATAR_REMOTE, $this->get_name(), 'remote'))) && $row['avatar']) ? $row['avatar'] : '',
+ ));
+
+ return true;
+ }
+
+ /**
+ * @inheritdoc
+ */
+ public function process_form($request, $template, $user, $row, &$error)
+ {
+ $url = $request->variable('avatar_remote_url', '');
+ $width = $request->variable('avatar_remote_width', 0);
+ $height = $request->variable('avatar_remote_height', 0);
+
+ if (!preg_match('#^(http|https|ftp)://#i', $url))
+ {
+ $url = 'http://' . $url;
+ }
+
+ if (!function_exists('validate_data'))
+ {
+ require($this->phpbb_root_path . 'includes/functions_user.' . $this->php_ext);
+ }
+
+ $validate_array = validate_data(
+ array(
+ 'url' => $url,
+ ),
+ array(
+ 'url' => array('string', true, 5, 255),
+ )
+ );
+
+ $error = array_merge($error, $validate_array);
+
+ if (!empty($error))
+ {
+ return false;
+ }
+
+ // Check if this url looks alright
+ // This isn't perfect, but it's what phpBB 3.0 did, and might as well make sure everything is compatible
+ if (!preg_match('#^(http|https|ftp)://(?:(.*?\.)*?[a-z0-9\-]+?\.[a-z]{2,4}|(?:\d{1,3}\.){3,5}\d{1,3}):?([0-9]*?).*?\.('. implode('|', $this->allowed_extensions) . ')$#i', $url))
+ {
+ $error[] = 'AVATAR_URL_INVALID';
+ return false;
+ }
+
+ // Make sure getimagesize works...
+ if (function_exists('getimagesize'))
+ {
+ if (($width <= 0 || $height <= 0) && (($image_data = @getimagesize($url)) === false))
+ {
+ $error[] = 'UNABLE_GET_IMAGE_SIZE';
+ return false;
+ }
+
+ if (!empty($image_data) && ($image_data[0] <= 0 || $image_data[1] <= 0))
+ {
+ $error[] = 'AVATAR_NO_SIZE';
+ return false;
+ }
+
+ $width = ($width && $height) ? $width : $image_data[0];
+ $height = ($width && $height) ? $height : $image_data[1];
+ }
+
+ if ($width <= 0 || $height <= 0)
+ {
+ $error[] = 'AVATAR_NO_SIZE';
+ return false;
+ }
+
+ if (!class_exists('fileupload'))
+ {
+ include($this->phpbb_root_path . 'includes/functions_upload.' . $this->php_ext);
+ }
+
+ $types = \fileupload::image_types();
+ $extension = strtolower(\filespec::get_extension($url));
+
+ // Check if this is actually an image
+ if ($file_stream = @fopen($url, 'r'))
+ {
+ // Timeout after 1 second
+ stream_set_timeout($file_stream, 1);
+ $meta = stream_get_meta_data($file_stream);
+ foreach ($meta['wrapper_data'] as $header)
+ {
+ $header = preg_split('/ /', $header, 2);
+ if (strtr(strtolower(trim($header[0], ':')), '_', '-') === 'content-type')
+ {
+ if (strpos($header[1], 'image/') !== 0)
+ {
+ $error[] = 'AVATAR_URL_INVALID';
+ fclose($file_stream);
+ return false;
+ }
+ else
+ {
+ fclose($file_stream);
+ break;
+ }
+ }
+ }
+ }
+ else
+ {
+ $error[] = 'AVATAR_URL_INVALID';
+ return false;
+ }
+
+ if (!empty($image_data) && (!isset($types[$image_data[2]]) || !in_array($extension, $types[$image_data[2]])))
+ {
+ if (!isset($types[$image_data[2]]))
+ {
+ $error[] = 'UNABLE_GET_IMAGE_SIZE';
+ }
+ else
+ {
+ $error[] = array('IMAGE_FILETYPE_MISMATCH', $types[$image_data[2]][0], $extension);
+ }
+
+ return false;
+ }
+
+ if ($this->config['avatar_max_width'] || $this->config['avatar_max_height'])
+ {
+ if ($width > $this->config['avatar_max_width'] || $height > $this->config['avatar_max_height'])
+ {
+ $error[] = array('AVATAR_WRONG_SIZE', $this->config['avatar_min_width'], $this->config['avatar_min_height'], $this->config['avatar_max_width'], $this->config['avatar_max_height'], $width, $height);
+ return false;
+ }
+ }
+
+ if ($this->config['avatar_min_width'] || $this->config['avatar_min_height'])
+ {
+ if ($width < $this->config['avatar_min_width'] || $height < $this->config['avatar_min_height'])
+ {
+ $error[] = array('AVATAR_WRONG_SIZE', $this->config['avatar_min_width'], $this->config['avatar_min_height'], $this->config['avatar_max_width'], $this->config['avatar_max_height'], $width, $height);
+ return false;
+ }
+ }
+
+ return array(
+ 'avatar' => $url,
+ 'avatar_width' => $width,
+ 'avatar_height' => $height,
+ );
+ }
+
+ /**
+ * @inheritdoc
+ */
+ public function get_template_name()
+ {
+ return 'ucp_avatar_options_remote.html';
+ }
+}
diff --git a/phpBB/phpbb/avatar/driver/upload.php b/phpBB/phpbb/avatar/driver/upload.php
new file mode 100644
index 0000000000..1e50e135e4
--- /dev/null
+++ b/phpBB/phpbb/avatar/driver/upload.php
@@ -0,0 +1,187 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2011 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\avatar\driver;
+
+/**
+* Handles avatars uploaded to the board
+* @package phpBB3
+*/
+class upload extends \phpbb\avatar\driver\driver
+{
+ /**
+ * @inheritdoc
+ */
+ public function get_data($row, $ignore_config = false)
+ {
+ return array(
+ 'src' => $this->path_helper->get_web_root_path() . 'download/file.' . $this->php_ext . '?avatar=' . $row['avatar'],
+ 'width' => $row['avatar_width'],
+ 'height' => $row['avatar_height'],
+ );
+ }
+
+ /**
+ * @inheritdoc
+ */
+ public function prepare_form($request, $template, $user, $row, &$error)
+ {
+ if (!$this->can_upload())
+ {
+ return false;
+ }
+
+ $template->assign_vars(array(
+ 'S_UPLOAD_AVATAR_URL' => ($this->config['allow_avatar_remote_upload']) ? true : false,
+ 'AVATAR_UPLOAD_SIZE' => $this->config['avatar_filesize'],
+ ));
+
+ return true;
+ }
+
+ /**
+ * @inheritdoc
+ */
+ public function process_form($request, $template, $user, $row, &$error)
+ {
+ if (!$this->can_upload())
+ {
+ return false;
+ }
+
+ if (!class_exists('fileupload'))
+ {
+ include($this->phpbb_root_path . 'includes/functions_upload.' . $this->php_ext);
+ }
+
+ $upload = new \fileupload('AVATAR_', $this->allowed_extensions, $this->config['avatar_filesize'], $this->config['avatar_min_width'], $this->config['avatar_min_height'], $this->config['avatar_max_width'], $this->config['avatar_max_height'], (isset($this->config['mime_triggers']) ? explode('|', $this->config['mime_triggers']) : false));
+
+ $url = $request->variable('avatar_upload_url', '');
+ $upload_file = $request->file('avatar_upload_file');
+
+ if (!empty($upload_file['name']))
+ {
+ $file = $upload->form_upload('avatar_upload_file');
+ }
+ elseif (!empty($this->config['allow_avatar_remote_upload']) && !empty($url))
+ {
+ if (!preg_match('#^(http|https|ftp)://#i', $url))
+ {
+ $url = 'http://' . $url;
+ }
+
+ if (!function_exists('validate_data'))
+ {
+ require($this->phpbb_root_path . 'includes/functions_user.' . $this->php_ext);
+ }
+
+ $validate_array = validate_data(
+ array(
+ 'url' => $url,
+ ),
+ array(
+ 'url' => array('string', true, 5, 255),
+ )
+ );
+
+ $error = array_merge($error, $validate_array);
+
+ if (!empty($error))
+ {
+ return false;
+ }
+
+ $file = $upload->remote_upload($url);
+ }
+ else
+ {
+ $error[] = 'NO_AVATAR_SELECTED';
+ return false;
+ }
+
+ $prefix = $this->config['avatar_salt'] . '_';
+ $file->clean_filename('avatar', $prefix, $row['id']);
+
+ $destination = $this->config['avatar_path'];
+
+ // Adjust destination path (no trailing slash)
+ if (substr($destination, -1, 1) == '/' || substr($destination, -1, 1) == '\\')
+ {
+ $destination = substr($destination, 0, -1);
+ }
+
+ $destination = str_replace(array('../', '..\\', './', '.\\'), '', $destination);
+ if ($destination && ($destination[0] == '/' || $destination[0] == "\\"))
+ {
+ $destination = '';
+ }
+
+ // Move file and overwrite any existing image
+ $file->move_file($destination, true);
+
+ if (sizeof($file->error))
+ {
+ $file->remove();
+ $error = array_merge($error, $file->error);
+ return false;
+ }
+
+ return array(
+ 'avatar' => $row['id'] . '_' . time() . '.' . $file->get('extension'),
+ 'avatar_width' => $file->get('width'),
+ 'avatar_height' => $file->get('height'),
+ );
+ }
+
+ /**
+ * @inheritdoc
+ */
+ public function prepare_form_acp($user)
+ {
+ return array(
+ 'allow_avatar_remote_upload'=> array('lang' => 'ALLOW_REMOTE_UPLOAD', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
+ 'avatar_filesize' => array('lang' => 'MAX_FILESIZE', 'validate' => 'int:0', 'type' => 'number:0', 'explain' => true, 'append' => ' ' . $user->lang['BYTES']),
+ 'avatar_path' => array('lang' => 'AVATAR_STORAGE_PATH', 'validate' => 'rwpath', 'type' => 'text:20:255', 'explain' => true),
+ );
+ }
+
+ /**
+ * @inheritdoc
+ */
+ public function delete($row)
+ {
+ $ext = substr(strrchr($row['avatar'], '.'), 1);
+ $filename = $this->phpbb_root_path . $this->config['avatar_path'] . '/' . $this->config['avatar_salt'] . '_' . $row['id'] . '.' . $ext;
+
+ if (file_exists($filename))
+ {
+ @unlink($filename);
+ }
+
+ return true;
+ }
+
+ /**
+ * @inheritdoc
+ */
+ public function get_template_name()
+ {
+ return 'ucp_avatar_options_upload.html';
+ }
+
+ /**
+ * Check if user is able to upload an avatar
+ *
+ * @return bool True if user can upload, false if not
+ */
+ protected function can_upload()
+ {
+ return (file_exists($this->phpbb_root_path . $this->config['avatar_path']) && phpbb_is_writable($this->phpbb_root_path . $this->config['avatar_path']) && (@ini_get('file_uploads') || strtolower(@ini_get('file_uploads')) == 'on'));
+ }
+}
diff --git a/phpBB/phpbb/avatar/manager.php b/phpBB/phpbb/avatar/manager.php
new file mode 100644
index 0000000000..6ce924d2eb
--- /dev/null
+++ b/phpBB/phpbb/avatar/manager.php
@@ -0,0 +1,309 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2011 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\avatar;
+
+/**
+* @package avatar
+*/
+class manager
+{
+ /**
+ * phpBB configuration
+ * @var \phpbb\config\config
+ */
+ protected $config;
+
+ /**
+ * Array that contains a list of enabled drivers
+ * @var array
+ */
+ static protected $enabled_drivers = false;
+
+ /**
+ * Array that contains all available avatar drivers which are passed via the
+ * service container
+ * @var array
+ */
+ protected $avatar_drivers;
+
+ /**
+ * Default avatar data row
+ * @var array
+ */
+ static protected $default_row = array(
+ 'avatar' => '',
+ 'avatar_type' => '',
+ 'avatar_width' => '',
+ 'avatar_height' => '',
+ );
+
+ /**
+ * Construct an avatar manager object
+ *
+ * @param \phpbb\config\config $config phpBB configuration
+ * @param array $avatar_drivers Avatar drivers passed via the service container
+ */
+ public function __construct(\phpbb\config\config $config, $avatar_drivers)
+ {
+ $this->config = $config;
+ $this->register_avatar_drivers($avatar_drivers);
+ }
+
+ /**
+ * Register avatar drivers
+ *
+ * @param array $avatar_drivers Service collection of avatar drivers
+ */
+ protected function register_avatar_drivers($avatar_drivers)
+ {
+ if (!empty($avatar_drivers))
+ {
+ foreach ($avatar_drivers as $driver)
+ {
+ $this->avatar_drivers[$driver->get_name()] = $driver;
+ }
+ }
+ }
+
+ /**
+ * Get the driver object specified by the avatar type
+ *
+ * @param string $avatar_type Avatar type; by default an avatar's service container name
+ * @param bool $load_enabled Load only enabled avatars
+ *
+ * @return object Avatar driver object
+ */
+ public function get_driver($avatar_type, $load_enabled = true)
+ {
+ if (self::$enabled_drivers === false)
+ {
+ $this->load_enabled_drivers();
+ }
+
+ $avatar_drivers = ($load_enabled) ? self::$enabled_drivers : $this->get_all_drivers();
+
+ // Legacy stuff...
+ switch ($avatar_type)
+ {
+ case AVATAR_GALLERY:
+ $avatar_type = 'avatar.driver.local';
+ break;
+ case AVATAR_UPLOAD:
+ $avatar_type = 'avatar.driver.upload';
+ break;
+ case AVATAR_REMOTE:
+ $avatar_type = 'avatar.driver.remote';
+ break;
+ }
+
+ if (!isset($avatar_drivers[$avatar_type]))
+ {
+ return null;
+ }
+
+ /*
+ * There is no need to handle invalid avatar types as the following code
+ * will cause a ServiceNotFoundException if the type does not exist
+ */
+ $driver = $this->avatar_drivers[$avatar_type];
+
+ return $driver;
+ }
+
+ /**
+ * Load the list of enabled drivers
+ * This is executed once and fills self::$enabled_drivers
+ */
+ protected function load_enabled_drivers()
+ {
+ if (!empty($this->avatar_drivers))
+ {
+ self::$enabled_drivers = array();
+ foreach ($this->avatar_drivers as $driver)
+ {
+ if ($this->is_enabled($driver))
+ {
+ self::$enabled_drivers[$driver->get_name()] = $driver->get_name();
+ }
+ }
+ asort(self::$enabled_drivers);
+ }
+ }
+
+ /**
+ * Get a list of all avatar drivers
+ *
+ * As this function will only be called in the ACP avatar settings page, it
+ * doesn't make much sense to cache the list of all avatar drivers like the
+ * list of the enabled drivers.
+ *
+ * @return array Array containing a list of all avatar drivers
+ */
+ public function get_all_drivers()
+ {
+ $drivers = array();
+
+ if (!empty($this->avatar_drivers))
+ {
+ foreach ($this->avatar_drivers as $driver)
+ {
+ $drivers[$driver->get_name()] = $driver->get_name();
+ }
+ asort($drivers);
+ }
+
+ return $drivers;
+ }
+
+ /**
+ * Get a list of enabled avatar drivers
+ *
+ * @return array Array containing a list of the enabled avatar drivers
+ */
+ public function get_enabled_drivers()
+ {
+ if (self::$enabled_drivers === false)
+ {
+ $this->load_enabled_drivers();
+ }
+
+ return self::$enabled_drivers;
+ }
+
+ /**
+ * Strip out user_, group_, or other prefixes from array keys
+ *
+ * @param array $row User data or group data
+ * @param string $prefix Prefix of data keys (e.g. user), should not include the trailing underscore
+ *
+ * @return array User or group data with keys that have been
+ * stripped from the preceding "user_" or "group_"
+ * Also the group id is prefixed with g, when the prefix group is removed.
+ */
+ static public function clean_row($row, $prefix = '')
+ {
+ // Upon creation of a user/group $row might be empty
+ if (empty($row))
+ {
+ return self::$default_row;
+ }
+
+ $output = array();
+ foreach ($row as $key => $value)
+ {
+ $key = preg_replace("#^(?:{$prefix}_)#", '', $key);
+ $output[$key] = $value;
+ }
+
+ if ($prefix === 'group' && isset($output['id']))
+ {
+ $output['id'] = 'g' . $output['id'];
+ }
+
+ return $output;
+ }
+
+ /**
+ * Clean driver names that are returned from template files
+ * Underscores are replaced with dots
+ *
+ * @param string $name Driver name
+ *
+ * @return string Cleaned driver name
+ */
+ static public function clean_driver_name($name)
+ {
+ return str_replace(array('\\', '_'), '.', $name);
+ }
+
+ /**
+ * Prepare driver names for use in template files
+ * Dots are replaced with underscores
+ *
+ * @param string $name Clean driver name
+ *
+ * @return string Prepared driver name
+ */
+ static public function prepare_driver_name($name)
+ {
+ return str_replace('.', '_', $name);
+ }
+
+ /**
+ * Check if avatar is enabled
+ *
+ * @param object $driver Avatar driver object
+ *
+ * @return bool True if avatar is enabled, false if it's disabled
+ */
+ public function is_enabled($driver)
+ {
+ $config_name = $this->get_driver_config_name($driver);
+
+ return $this->config["allow_avatar_{$config_name}"];
+ }
+
+ /**
+ * Get the settings array for enabling/disabling an avatar driver
+ *
+ * @param object $driver Avatar driver object
+ *
+ * @return array Array of configuration options as consumed by acp_board
+ */
+ public function get_avatar_settings($driver)
+ {
+ $config_name = $this->get_driver_config_name($driver);
+
+ return array(
+ 'allow_avatar_' . $config_name => array('lang' => 'ALLOW_' . strtoupper(str_replace('\\', '_', $config_name)), 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
+ );
+ }
+
+ /**
+ * Get the config name of an avatar driver
+ *
+ * @param object $driver Avatar driver object
+ *
+ * @return string Avatar driver config name
+ */
+ public function get_driver_config_name($driver)
+ {
+ return preg_replace('#^phpbb\\\\avatar\\\\driver\\\\#', '', get_class($driver));
+ }
+
+ /**
+ * Replace "error" strings with their real, localized form
+ *
+ * @param \phpbb\user phpBB User object
+ * @param array $error Array containing error strings
+ * Key values can either be a string with a language key or an array
+ * that will be passed to vsprintf() with the language key in the
+ * first array key.
+ *
+ * @return array Array containing the localized error strings
+ */
+ public function localize_errors(\phpbb\user $user, $error)
+ {
+ foreach ($error as $key => $lang)
+ {
+ if (is_array($lang))
+ {
+ $lang_key = array_shift($lang);
+ $error[$key] = vsprintf($user->lang($lang_key), $lang);
+ }
+ else
+ {
+ $error[$key] = $user->lang("$lang");
+ }
+ }
+
+ return $error;
+ }
+}
diff --git a/phpBB/includes/acm/acm_apc.php b/phpBB/phpbb/cache/driver/apc.php
index 205353d3a5..77b7b11181 100644
--- a/phpBB/includes/acm/acm_apc.php
+++ b/phpBB/phpbb/cache/driver/apc.php
@@ -2,38 +2,23 @@
/**
*
* @package acm
-* @version $Id$
* @copyright (c) 2005, 2009 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
-/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-// Include the abstract base
-if (!class_exists('acm_memory'))
-{
- require("{$phpbb_root_path}includes/acm/acm_memory.$phpEx");
-}
+namespace phpbb\cache\driver;
/**
* ACM for APC
* @package acm
*/
-class acm extends acm_memory
+class apc extends \phpbb\cache\driver\memory
{
var $extension = 'apc';
/**
- * Purge cache data
- *
- * @return null
+ * {@inheritDoc}
*/
function purge()
{
@@ -80,5 +65,3 @@ class acm extends acm_memory
return apc_delete($this->key_prefix . $var);
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/phpbb/cache/driver/base.php b/phpBB/phpbb/cache/driver/base.php
new file mode 100644
index 0000000000..feaca25a5b
--- /dev/null
+++ b/phpBB/phpbb/cache/driver/base.php
@@ -0,0 +1,17 @@
+<?php
+/**
+*
+* @package acm
+* @copyright (c) 2010 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\cache\driver;
+
+/**
+* @package acm
+*/
+abstract class base implements \phpbb\cache\driver\driver_interface
+{
+}
diff --git a/phpBB/phpbb/cache/driver/driver_interface.php b/phpBB/phpbb/cache/driver/driver_interface.php
new file mode 100644
index 0000000000..8444028115
--- /dev/null
+++ b/phpBB/phpbb/cache/driver/driver_interface.php
@@ -0,0 +1,165 @@
+<?php
+/**
+*
+* @package acm
+* @copyright (c) 2010 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\cache\driver;
+
+/**
+* An interface that all cache drivers must implement
+*
+* @package acm
+*/
+interface driver_interface
+{
+ /**
+ * Load global cache
+ *
+ * @return mixed False if an error was encountered, otherwise the data type of the cached data
+ */
+ public function load();
+
+ /**
+ * Unload cache object
+ *
+ * @return null
+ */
+ public function unload();
+
+ /**
+ * Save modified objects
+ *
+ * @return null
+ */
+ public function save();
+
+ /**
+ * Tidy cache
+ *
+ * @return null
+ */
+ public function tidy();
+
+ /**
+ * Get saved cache object
+ *
+ * @param string $var_name Cache key
+ * @return mixed False if an error was encountered, otherwise the saved cached object
+ */
+ public function get($var_name);
+
+ /**
+ * Put data into cache
+ *
+ * @param string $var_name Cache key
+ * @param mixed $var Cached data to store
+ * @param int $ttl Time-to-live of cached data
+ * @return null
+ */
+ public function put($var_name, $var, $ttl = 0);
+
+ /**
+ * Purge cache data
+ *
+ * @return null
+ */
+ public function purge();
+
+ /**
+ * Destroy cache data
+ *
+ * @param string $var_name Cache key
+ * @param string $table Table name
+ * @return null
+ */
+ public function destroy($var_name, $table = '');
+
+ /**
+ * Check if a given cache entry exists
+ *
+ * @param string $var_name Cache key
+ *
+ * @return bool True if cache file exists and has not expired.
+ * False otherwise.
+ */
+ public function _exists($var_name);
+
+ /**
+ * Load result of an SQL query from cache.
+ *
+ * @param string $query SQL query
+ *
+ * @return int|bool Query ID (integer) if cache contains a rowset
+ * for the specified query.
+ * False otherwise.
+ */
+ public function sql_load($query);
+
+ /**
+ * Save result of an SQL query in cache.
+ *
+ * In persistent cache stores, this function stores the query
+ * result to persistent storage. In other words, there is no need
+ * to call save() afterwards.
+ *
+ * @param \phpbb\db\driver\driver $db Database connection
+ * @param string $query SQL query, should be used for generating storage key
+ * @param mixed $query_result The result from \dbal::sql_query, to be passed to
+ * \dbal::sql_fetchrow to get all rows and store them
+ * in cache.
+ * @param int $ttl Time to live, after this timeout the query should
+ * expire from the cache.
+ * @return int|mixed If storing in cache succeeded, an integer $query_id
+ * representing the query should be returned. Otherwise
+ * the original $query_result should be returned.
+ */
+ public function sql_save(\phpbb\db\driver\driver $db, $query, $query_result, $ttl);
+
+ /**
+ * Check if result for a given SQL query exists in cache.
+ *
+ * @param int $query_id
+ * @return bool
+ */
+ public function sql_exists($query_id);
+
+ /**
+ * Fetch row from cache (database)
+ *
+ * @param int $query_id
+ * @return array|bool The query result if found in the cache, otherwise
+ * false.
+ */
+ public function sql_fetchrow($query_id);
+
+ /**
+ * Fetch a field from the current row of a cached database result (database)
+ *
+ * @param int $query_id
+ * @param $field The name of the column.
+ * @return string|bool The field of the query result if found in the cache,
+ * otherwise false.
+ */
+ public function sql_fetchfield($query_id, $field);
+
+ /**
+ * Seek a specific row in an a cached database result (database)
+ *
+ * @param int $rownum Row to seek to.
+ * @param int $query_id
+ * @return bool
+ */
+ public function sql_rowseek($rownum, $query_id);
+
+ /**
+ * Free memory used for a cached database result (database)
+ *
+ * @param int $query_id
+ * @return bool
+ */
+ public function sql_freeresult($query_id);
+}
diff --git a/phpBB/includes/acm/acm_eaccelerator.php b/phpBB/phpbb/cache/driver/eaccelerator.php
index ecec3ac9a5..d1ad69ef6d 100644
--- a/phpBB/includes/acm/acm_eaccelerator.php
+++ b/phpBB/phpbb/cache/driver/eaccelerator.php
@@ -2,32 +2,19 @@
/**
*
* @package acm
-* @version $Id$
* @copyright (c) 2005, 2009 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
-/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-// Include the abstract base
-if (!class_exists('acm_memory'))
-{
- require("{$phpbb_root_path}includes/acm/acm_memory.$phpEx");
-}
+namespace phpbb\cache\driver;
/**
* ACM for eAccelerator
* @package acm
* @todo Missing locks from destroy() talk with David
*/
-class acm extends acm_memory
+class eaccelerator extends \phpbb\cache\driver\memory
{
var $extension = 'eaccelerator';
var $function = 'eaccelerator_get';
@@ -35,9 +22,7 @@ class acm extends acm_memory
var $serialize_header = '#phpbb-serialized#';
/**
- * Purge cache data
- *
- * @return null
+ * {@inheritDoc}
*/
function purge()
{
@@ -52,10 +37,8 @@ class acm extends acm_memory
}
/**
- * Perform cache garbage collection
- *
- * @return null
- */
+ * {@inheritDoc}
+ */
function tidy()
{
eaccelerator_gc();
@@ -117,5 +100,3 @@ class acm extends acm_memory
return eaccelerator_rm($this->key_prefix . $var);
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/acm/acm_file.php b/phpBB/phpbb/cache/driver/file.php
index 524a28561e..a57a805193 100644
--- a/phpBB/includes/acm/acm_file.php
+++ b/phpBB/phpbb/cache/driver/file.php
@@ -2,25 +2,18 @@
/**
*
* @package acm
-* @version $Id$
* @copyright (c) 2005, 2009 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
-/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
+namespace phpbb\cache\driver;
/**
* ACM File Based Caching
* @package acm
*/
-class acm
+class file extends \phpbb\cache\driver\base
{
var $vars = array();
var $var_expires = array();
@@ -33,14 +26,14 @@ class acm
/**
* Set cache path
*/
- function acm()
+ function __construct($cache_dir = null)
{
global $phpbb_root_path;
- $this->cache_dir = $phpbb_root_path . 'cache/';
+ $this->cache_dir = !is_null($cache_dir) ? $cache_dir : $phpbb_root_path . 'cache/';
}
/**
- * Load global cache
+ * {@inheritDoc}
*/
function load()
{
@@ -48,7 +41,7 @@ class acm
}
/**
- * Unload cache object
+ * {@inheritDoc}
*/
function unload()
{
@@ -65,7 +58,7 @@ class acm
}
/**
- * Save modified objects
+ * {@inheritDoc}
*/
function save()
{
@@ -100,7 +93,7 @@ class acm
}
/**
- * Tidy cache
+ * {@inheritDoc}
*/
function tidy()
{
@@ -162,7 +155,7 @@ class acm
}
/**
- * Get saved cache object
+ * {@inheritDoc}
*/
function get($var_name)
{
@@ -184,7 +177,7 @@ class acm
}
/**
- * Put data into cache
+ * {@inheritDoc}
*/
function put($var_name, $var, $ttl = 31536000)
{
@@ -201,28 +194,39 @@ class acm
}
/**
- * Purge cache data
+ * {@inheritDoc}
*/
function purge()
{
// Purge all phpbb cache files
- $dir = @opendir($this->cache_dir);
-
- if (!$dir)
+ try
+ {
+ $iterator = new \DirectoryIterator($this->cache_dir);
+ }
+ catch (Exception $e)
{
return;
}
- while (($entry = readdir($dir)) !== false)
+ foreach ($iterator as $fileInfo)
{
- if (strpos($entry, 'sql_') !== 0 && strpos($entry, 'data_') !== 0 && strpos($entry, 'ctpl_') !== 0 && strpos($entry, 'tpl_') !== 0)
+ if ($fileInfo->isDot())
{
continue;
}
-
- $this->remove_file($this->cache_dir . $entry);
+ $filename = $fileInfo->getFilename();
+ if ($fileInfo->isDir())
+ {
+ $this->remove_dir($fileInfo->getPathname());
+ }
+ elseif (strpos($filename, 'container_') === 0 ||
+ strpos($filename, 'url_matcher') === 0 ||
+ strpos($filename, 'sql_') === 0 ||
+ strpos($filename, 'data_') === 0)
+ {
+ $this->remove_file($fileInfo->getPathname());
+ }
}
- closedir($dir);
unset($this->vars);
unset($this->var_expires);
@@ -238,7 +242,45 @@ class acm
}
/**
- * Destroy cache data
+ * Remove directory
+ *
+ * @param string $dir Directory to remove
+ *
+ * @return null
+ */
+ protected function remove_dir($dir)
+ {
+ try
+ {
+ $iterator = new \DirectoryIterator($dir);
+ }
+ catch (Exception $e)
+ {
+ return;
+ }
+
+ foreach ($iterator as $fileInfo)
+ {
+ if ($fileInfo->isDot())
+ {
+ continue;
+ }
+
+ if ($fileInfo->isDir())
+ {
+ $this->remove_dir($fileInfo->getPathname());
+ }
+ else
+ {
+ $this->remove_file($fileInfo->getPathname());
+ }
+ }
+
+ @rmdir($dir);
+ }
+
+ /**
+ * {@inheritDoc}
*/
function destroy($var_name, $table = '')
{
@@ -317,7 +359,7 @@ class acm
}
/**
- * Check if a given cache entry exist
+ * {@inheritDoc}
*/
function _exists($var_name)
{
@@ -343,7 +385,7 @@ class acm
}
/**
- * Load cached sql query
+ * {@inheritDoc}
*/
function sql_load($query)
{
@@ -363,12 +405,10 @@ class acm
}
/**
- * Save sql query
+ * {@inheritDoc}
*/
- function sql_save($query, &$query_result, $ttl)
+ function sql_save(\phpbb\db\driver\driver $db, $query, $query_result, $ttl)
{
- global $db;
-
// Remove extra spaces and tabs
$query = preg_replace('/[\n\r\s\t]+/', ' ', $query);
@@ -384,12 +424,14 @@ class acm
if ($this->_write('sql_' . md5($query), $this->sql_rowset[$query_id], $ttl + time(), $query))
{
- $query_result = $query_id;
+ return $query_id;
}
+
+ return $query_result;
}
/**
- * Ceck if a given sql query exist in cache
+ * {@inheritDoc}
*/
function sql_exists($query_id)
{
@@ -397,7 +439,7 @@ class acm
}
/**
- * Fetch row from cache (database)
+ * {@inheritDoc}
*/
function sql_fetchrow($query_id)
{
@@ -410,7 +452,7 @@ class acm
}
/**
- * Fetch a field from the current row of a cached database result (database)
+ * {@inheritDoc}
*/
function sql_fetchfield($query_id, $field)
{
@@ -423,7 +465,7 @@ class acm
}
/**
- * Seek a specific row in an a cached database result (database)
+ * {@inheritDoc}
*/
function sql_rowseek($rownum, $query_id)
{
@@ -437,7 +479,7 @@ class acm
}
/**
- * Free memory used for a cached database result (database)
+ * {@inheritDoc}
*/
function sql_freeresult($query_id)
{
@@ -647,10 +689,11 @@ class acm
$file = "{$this->cache_dir}$filename.$phpEx";
+ $lock = new \phpbb\lock\flock($file);
+ $lock->acquire();
+
if ($handle = @fopen($file, 'wb'))
{
- @flock($handle, LOCK_EX);
-
// File header
fwrite($handle, '<' . '?php exit; ?' . '>');
@@ -691,7 +734,6 @@ class acm
fwrite($handle, $data);
}
- @flock($handle, LOCK_UN);
fclose($handle);
if (!function_exists('phpbb_chmod'))
@@ -702,14 +744,24 @@ class acm
phpbb_chmod($file, CHMOD_READ | CHMOD_WRITE);
- return true;
+ $return_value = true;
+ }
+ else
+ {
+ $return_value = false;
}
- return false;
+ $lock->release();
+
+ return $return_value;
}
/**
* Removes/unlinks file
+ *
+ * @param string $filename Filename to remove
+ * @param bool $check Check file permissions
+ * @return bool True if the file was successfully removed, otherwise false
*/
function remove_file($filename, $check = false)
{
@@ -728,5 +780,3 @@ class acm
return @unlink($filename);
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/acm/acm_memcache.php b/phpBB/phpbb/cache/driver/memcache.php
index 70bc219952..eb3fced973 100644
--- a/phpBB/includes/acm/acm_memcache.php
+++ b/phpBB/phpbb/cache/driver/memcache.php
@@ -2,25 +2,12 @@
/**
*
* @package acm
-* @version $Id$
* @copyright (c) 2005, 2009 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
-/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-// Include the abstract base
-if (!class_exists('acm_memory'))
-{
- require("{$phpbb_root_path}includes/acm/acm_memory.$phpEx");
-}
+namespace phpbb\cache\driver;
if (!defined('PHPBB_ACM_MEMCACHE_PORT'))
{
@@ -47,19 +34,19 @@ if (!defined('PHPBB_ACM_MEMCACHE'))
* ACM for Memcached
* @package acm
*/
-class acm extends acm_memory
+class memcache extends \phpbb\cache\driver\memory
{
var $extension = 'memcache';
var $memcache;
var $flags = 0;
- function acm()
+ function __construct()
{
// Call the parent constructor
- parent::acm_memory();
+ parent::__construct();
- $this->memcache = new Memcache;
+ $this->memcache = new \Memcache;
foreach(explode(',', PHPBB_ACM_MEMCACHE) as $u)
{
$parts = explode('/', $u);
@@ -69,9 +56,7 @@ class acm extends acm_memory
}
/**
- * Unload the cache resources
- *
- * @return null
+ * {@inheritDoc}
*/
function unload()
{
@@ -81,9 +66,7 @@ class acm extends acm_memory
}
/**
- * Purge cache data
- *
- * @return null
+ * {@inheritDoc}
*/
function purge()
{
@@ -134,5 +117,3 @@ class acm extends acm_memory
return $this->memcache->delete($this->key_prefix . $var);
}
}
-
-?>
diff --git a/phpBB/includes/acm/acm_memory.php b/phpBB/phpbb/cache/driver/memory.php
index 2936ea0bae..b618b0f3e6 100644
--- a/phpBB/includes/acm/acm_memory.php
+++ b/phpBB/phpbb/cache/driver/memory.php
@@ -2,25 +2,18 @@
/**
*
* @package acm
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
-/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
+namespace phpbb\cache\driver;
/**
* ACM Abstract Memory Class
* @package acm
*/
-class acm_memory
+abstract class memory extends \phpbb\cache\driver\base
{
var $key_prefix;
@@ -34,7 +27,7 @@ class acm_memory
/**
* Set cache path
*/
- function acm_memory()
+ function __construct()
{
global $phpbb_root_path, $dbname, $table_prefix;
@@ -57,7 +50,7 @@ class acm_memory
}
/**
- * Load global cache
+ * {@inheritDoc}
*/
function load()
{
@@ -73,7 +66,7 @@ class acm_memory
}
/**
- * Unload cache object
+ * {@inheritDoc}
*/
function unload()
{
@@ -88,7 +81,7 @@ class acm_memory
}
/**
- * Save modified objects
+ * {@inheritDoc}
*/
function save()
{
@@ -103,7 +96,7 @@ class acm_memory
}
/**
- * Tidy cache
+ * {@inheritDoc}
*/
function tidy()
{
@@ -113,7 +106,7 @@ class acm_memory
}
/**
- * Get saved cache object
+ * {@inheritDoc}
*/
function get($var_name)
{
@@ -133,7 +126,7 @@ class acm_memory
}
/**
- * Put data into cache
+ * {@inheritDoc}
*/
function put($var_name, $var, $ttl = 2592000)
{
@@ -149,7 +142,7 @@ class acm_memory
}
/**
- * Purge cache data
+ * {@inheritDoc}
*/
function purge()
{
@@ -163,7 +156,12 @@ class acm_memory
while (($entry = readdir($dir)) !== false)
{
- if (strpos($entry, 'sql_') !== 0 && strpos($entry, 'data_') !== 0 && strpos($entry, 'ctpl_') !== 0 && strpos($entry, 'tpl_') !== 0)
+ if (strpos($entry, 'container_') !== 0 &&
+ strpos($entry, 'url_matcher') !== 0 &&
+ strpos($entry, 'sql_') !== 0 &&
+ strpos($entry, 'data_') !== 0 &&
+ strpos($entry, 'ctpl_') !== 0 &&
+ strpos($entry, 'tpl_') !== 0)
{
continue;
}
@@ -185,7 +183,7 @@ class acm_memory
/**
- * Destroy cache data
+ * {@inheritDoc}
*/
function destroy($var_name, $table = '')
{
@@ -239,7 +237,7 @@ class acm_memory
}
/**
- * Check if a given cache entry exist
+ * {@inheritDoc}
*/
function _exists($var_name)
{
@@ -259,7 +257,7 @@ class acm_memory
}
/**
- * Load cached sql query
+ * {@inheritDoc}
*/
function sql_load($query)
{
@@ -279,12 +277,10 @@ class acm_memory
}
/**
- * Save sql query
+ * {@inheritDoc}
*/
- function sql_save($query, &$query_result, $ttl)
+ function sql_save(\phpbb\db\driver\driver $db, $query, $query_result, $ttl)
{
- global $db;
-
// Remove extra spaces and tabs
$query = preg_replace('/[\n\r\s\t]+/', ' ', $query);
$hash = md5($query);
@@ -295,7 +291,7 @@ class acm_memory
if (!preg_match('/FROM \\(?(`?\\w+`?(?: \\w+)?(?:, ?`?\\w+`?(?: \\w+)?)*)\\)?/', $query, $regs))
{
// Bail out if the match fails.
- return;
+ return $query_result;
}
$tables = array_map('trim', explode(',', $regs[1]));
@@ -335,11 +331,11 @@ class acm_memory
$this->_write('sql_' . $hash, $this->sql_rowset[$query_id], $ttl);
- $query_result = $query_id;
+ return $query_id;
}
/**
- * Ceck if a given sql query exist in cache
+ * {@inheritDoc}
*/
function sql_exists($query_id)
{
@@ -347,7 +343,7 @@ class acm_memory
}
/**
- * Fetch row from cache (database)
+ * {@inheritDoc}
*/
function sql_fetchrow($query_id)
{
@@ -360,7 +356,7 @@ class acm_memory
}
/**
- * Fetch a field from the current row of a cached database result (database)
+ * {@inheritDoc}
*/
function sql_fetchfield($query_id, $field)
{
@@ -373,7 +369,7 @@ class acm_memory
}
/**
- * Seek a specific row in an a cached database result (database)
+ * {@inheritDoc}
*/
function sql_rowseek($rownum, $query_id)
{
@@ -387,7 +383,7 @@ class acm_memory
}
/**
- * Free memory used for a cached database result (database)
+ * {@inheritDoc}
*/
function sql_freeresult($query_id)
{
@@ -404,6 +400,10 @@ class acm_memory
/**
* Removes/unlinks file
+ *
+ * @param string $filename Filename to remove
+ * @param bool $check Check file permissions
+ * @return bool True if the file was successfully removed, otherwise false
*/
function remove_file($filename, $check = false)
{
@@ -435,5 +435,3 @@ class acm_memory
return true;
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/acm/acm_null.php b/phpBB/phpbb/cache/driver/null.php
index fca67115a7..8af63eb725 100644
--- a/phpBB/includes/acm/acm_null.php
+++ b/phpBB/phpbb/cache/driver/null.php
@@ -2,35 +2,28 @@
/**
*
* @package acm
-* @version $Id$
* @copyright (c) 2005, 2009 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
-/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
+namespace phpbb\cache\driver;
/**
* ACM Null Caching
* @package acm
*/
-class acm
+class null extends \phpbb\cache\driver\base
{
/**
* Set cache path
*/
- function acm()
+ function __construct()
{
}
/**
- * Load global cache
+ * {@inheritDoc}
*/
function load()
{
@@ -38,21 +31,21 @@ class acm
}
/**
- * Unload cache object
+ * {@inheritDoc}
*/
function unload()
{
}
/**
- * Save modified objects
+ * {@inheritDoc}
*/
function save()
{
}
/**
- * Tidy cache
+ * {@inheritDoc}
*/
function tidy()
{
@@ -61,7 +54,7 @@ class acm
}
/**
- * Get saved cache object
+ * {@inheritDoc}
*/
function get($var_name)
{
@@ -69,28 +62,28 @@ class acm
}
/**
- * Put data into cache
+ * {@inheritDoc}
*/
function put($var_name, $var, $ttl = 0)
{
}
/**
- * Purge cache data
+ * {@inheritDoc}
*/
function purge()
{
}
/**
- * Destroy cache data
+ * {@inheritDoc}
*/
function destroy($var_name, $table = '')
{
}
/**
- * Check if a given cache entry exist
+ * {@inheritDoc}
*/
function _exists($var_name)
{
@@ -98,7 +91,7 @@ class acm
}
/**
- * Load cached sql query
+ * {@inheritDoc}
*/
function sql_load($query)
{
@@ -106,14 +99,15 @@ class acm
}
/**
- * Save sql query
+ * {@inheritDoc}
*/
- function sql_save($query, &$query_result, $ttl)
+ function sql_save(\phpbb\db\driver\driver $db, $query, $query_result, $ttl)
{
+ return $query_result;
}
/**
- * Ceck if a given sql query exist in cache
+ * {@inheritDoc}
*/
function sql_exists($query_id)
{
@@ -121,7 +115,7 @@ class acm
}
/**
- * Fetch row from cache (database)
+ * {@inheritDoc}
*/
function sql_fetchrow($query_id)
{
@@ -129,7 +123,7 @@ class acm
}
/**
- * Fetch a field from the current row of a cached database result (database)
+ * {@inheritDoc}
*/
function sql_fetchfield($query_id, $field)
{
@@ -137,7 +131,7 @@ class acm
}
/**
- * Seek a specific row in an a cached database result (database)
+ * {@inheritDoc}
*/
function sql_rowseek($rownum, $query_id)
{
@@ -145,12 +139,10 @@ class acm
}
/**
- * Free memory used for a cached database result (database)
+ * {@inheritDoc}
*/
function sql_freeresult($query_id)
{
return false;
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/acm/acm_redis.php b/phpBB/phpbb/cache/driver/redis.php
index dc11ca7768..2f2a32a12d 100644
--- a/phpBB/includes/acm/acm_redis.php
+++ b/phpBB/phpbb/cache/driver/redis.php
@@ -3,23 +3,11 @@
*
* @package acm
* @copyright (c) 2011 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
-/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-// Include the abstract base
-if (!class_exists('acm_memory'))
-{
- require("{$phpbb_root_path}includes/acm/acm_memory.$phpEx");
-}
+namespace phpbb\cache\driver;
if (!defined('PHPBB_ACM_REDIS_PORT'))
{
@@ -39,19 +27,45 @@ if (!defined('PHPBB_ACM_REDIS_HOST'))
*
* @package acm
*/
-class acm extends acm_memory
+class redis extends \phpbb\cache\driver\memory
{
var $extension = 'redis';
var $redis;
- function acm()
+ /**
+ * Creates a redis cache driver.
+ *
+ * The following global constants affect operation:
+ *
+ * PHPBB_ACM_REDIS_HOST
+ * PHPBB_ACM_REDIS_PORT
+ * PHPBB_ACM_REDIS_PASSWORD
+ * PHPBB_ACM_REDIS_DB
+ *
+ * There are no publicly documented constructor parameters.
+ */
+ function __construct()
{
// Call the parent constructor
- parent::acm_memory();
+ parent::__construct();
+
+ $this->redis = new \Redis();
- $this->redis = new Redis();
- $this->redis->connect(PHPBB_ACM_REDIS_HOST, PHPBB_ACM_REDIS_PORT);
+ $args = func_get_args();
+ if (!empty($args))
+ {
+ $ok = call_user_func_array(array($this->redis, 'connect'), $args);
+ }
+ else
+ {
+ $ok = $this->redis->connect(PHPBB_ACM_REDIS_HOST, PHPBB_ACM_REDIS_PORT);
+ }
+
+ if (!$ok)
+ {
+ trigger_error('Could not connect to redis server');
+ }
if (defined('PHPBB_ACM_REDIS_PASSWORD'))
{
@@ -63,8 +77,8 @@ class acm extends acm_memory
}
}
- $this->redis->setOption(Redis::OPT_SERIALIZER, Redis::SERIALIZER_PHP);
- $this->redis->setOption(Redis::OPT_PREFIX, $this->key_prefix);
+ $this->redis->setOption(\Redis::OPT_SERIALIZER, \Redis::SERIALIZER_PHP);
+ $this->redis->setOption(\Redis::OPT_PREFIX, $this->key_prefix);
if (defined('PHPBB_ACM_REDIS_DB'))
{
@@ -78,9 +92,7 @@ class acm extends acm_memory
}
/**
- * Unload the cache resources
- *
- * @return null
+ * {@inheritDoc}
*/
function unload()
{
@@ -90,9 +102,7 @@ class acm extends acm_memory
}
/**
- * Purge cache data
- *
- * @return null
+ * {@inheritDoc}
*/
function purge()
{
diff --git a/phpBB/includes/acm/acm_wincache.php b/phpBB/phpbb/cache/driver/wincache.php
index 7faba4f5b6..d0f636d9cb 100644
--- a/phpBB/includes/acm/acm_wincache.php
+++ b/phpBB/phpbb/cache/driver/wincache.php
@@ -3,36 +3,22 @@
*
* @package acm
* @copyright (c) 2010 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
-/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-// Include the abstract base
-if (!class_exists('acm_memory'))
-{
- require("{$phpbb_root_path}includes/acm/acm_memory.$phpEx");
-}
+namespace phpbb\cache\driver;
/**
* ACM for WinCache
* @package acm
*/
-class acm extends acm_memory
+class wincache extends \phpbb\cache\driver\memory
{
var $extension = 'wincache';
/**
- * Purge cache data
- *
- * @return null
+ * {@inheritDoc}
*/
function purge()
{
diff --git a/phpBB/includes/acm/acm_xcache.php b/phpBB/phpbb/cache/driver/xcache.php
index e3d83f8bfa..6c9323ec83 100644
--- a/phpBB/includes/acm/acm_xcache.php
+++ b/phpBB/phpbb/cache/driver/xcache.php
@@ -2,25 +2,12 @@
/**
*
* @package acm
-* @version $Id$
* @copyright (c) 2005, 2009 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
-/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-// Include the abstract base
-if (!class_exists('acm_memory'))
-{
- require("{$phpbb_root_path}includes/acm/acm_memory.$phpEx");
-}
+namespace phpbb\cache\driver;
/**
* ACM for XCache
@@ -31,13 +18,13 @@ if (!class_exists('acm_memory'))
* - xcache.admin.enable_auth = off (or xcache.admin.user and xcache.admin.password set)
*
*/
-class acm extends acm_memory
+class xcache extends \phpbb\cache\driver\memory
{
var $extension = 'XCache';
- function acm()
+ function __construct()
{
- parent::acm_memory();
+ parent::__construct();
if (!function_exists('ini_get') || (int) ini_get('xcache.var_size') <= 0)
{
@@ -46,9 +33,7 @@ class acm extends acm_memory
}
/**
- * Purge cache data
- *
- * @return null
+ * {@inheritDoc}
*/
function purge()
{
@@ -111,11 +96,9 @@ class acm extends acm_memory
* @access protected
* @param string $var Cache key
* @return bool True if it exists, otherwise false
- */
+ */
function _isset($var)
{
return xcache_isset($this->key_prefix . $var);
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/cache.php b/phpBB/phpbb/cache/service.php
index 612adcca4f..ebbcfb8cdb 100644
--- a/phpBB/includes/cache.php
+++ b/phpBB/phpbb/cache/service.php
@@ -2,69 +2,95 @@
/**
*
* @package acm
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
-/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
+namespace phpbb\cache;
/**
-* Class for grabbing/handling cached entries, extends acm_file or acm_db depending on the setup
+* Class for grabbing/handling cached entries
* @package acm
*/
-class cache extends acm
+class service
{
/**
- * Get config values
+ * Cache driver.
+ *
+ * @var \phpbb\cache\driver\driver_interface
*/
- function obtain_config()
- {
- global $db;
+ protected $driver;
- if (($config = $this->get('config')) !== false)
- {
- $sql = 'SELECT config_name, config_value
- FROM ' . CONFIG_TABLE . '
- WHERE is_dynamic = 1';
- $result = $db->sql_query($sql);
+ /**
+ * The config.
+ *
+ * @var \phpbb\config\config
+ */
+ protected $config;
- while ($row = $db->sql_fetchrow($result))
- {
- $config[$row['config_name']] = $row['config_value'];
- }
- $db->sql_freeresult($result);
- }
- else
- {
- $config = $cached_config = array();
+ /**
+ * Database connection.
+ *
+ * @var \phpbb\db\driver\driver
+ */
+ protected $db;
+
+ /**
+ * Root path.
+ *
+ * @var string
+ */
+ protected $phpbb_root_path;
- $sql = 'SELECT config_name, config_value, is_dynamic
- FROM ' . CONFIG_TABLE;
- $result = $db->sql_query($sql);
+ /**
+ * PHP extension.
+ *
+ * @var string
+ */
+ protected $php_ext;
- while ($row = $db->sql_fetchrow($result))
- {
- if (!$row['is_dynamic'])
- {
- $cached_config[$row['config_name']] = $row['config_value'];
- }
+ /**
+ * Creates a cache service around a cache driver
+ *
+ * @param \phpbb\cache\driver\driver_interface $driver The cache driver
+ * @param \phpbb\config\config $config The config
+ * @param \phpbb\db\driver\driver $db Database connection
+ * @param string $phpbb_root_path Root path
+ * @param string $php_ext PHP extension
+ */
+ public function __construct(\phpbb\cache\driver\driver_interface $driver, \phpbb\config\config $config, \phpbb\db\driver\driver $db, $phpbb_root_path, $php_ext)
+ {
+ $this->set_driver($driver);
+ $this->config = $config;
+ $this->db = $db;
+ $this->phpbb_root_path = $phpbb_root_path;
+ $this->php_ext = $php_ext;
+ }
- $config[$row['config_name']] = $row['config_value'];
- }
- $db->sql_freeresult($result);
+ /**
+ * Returns the cache driver used by this cache service.
+ *
+ * @return \phpbb\cache\driver\driver_interface The cache driver
+ */
+ public function get_driver()
+ {
+ return $this->driver;
+ }
- $this->put('config', $cached_config);
- }
+ /**
+ * Replaces the cache driver used by this cache service.
+ *
+ * @param \phpbb\cache\driver\driver_interface $driver The cache driver
+ */
+ public function set_driver(\phpbb\cache\driver\driver_interface $driver)
+ {
+ $this->driver = $driver;
+ }
- return $config;
+ public function __call($method, $arguments)
+ {
+ return call_user_func_array(array($this->driver, $method), $arguments);
}
/**
@@ -73,23 +99,21 @@ class cache extends acm
*/
function obtain_word_list()
{
- global $db;
-
- if (($censors = $this->get('_word_censors')) === false)
+ if (($censors = $this->driver->get('_word_censors')) === false)
{
$sql = 'SELECT word, replacement
FROM ' . WORDS_TABLE;
- $result = $db->sql_query($sql);
+ $result = $this->db->sql_query($sql);
$censors = array();
- while ($row = $db->sql_fetchrow($result))
+ while ($row = $this->db->sql_fetchrow($result))
{
$censors['match'][] = get_censor_preg_expression($row['word']);
$censors['replace'][] = $row['replacement'];
}
- $db->sql_freeresult($result);
+ $this->db->sql_freeresult($result);
- $this->put('_word_censors', $censors);
+ $this->driver->put('_word_censors', $censors);
}
return $censors;
@@ -100,27 +124,25 @@ class cache extends acm
*/
function obtain_icons()
{
- if (($icons = $this->get('_icons')) === false)
+ if (($icons = $this->driver->get('_icons')) === false)
{
- global $db;
-
// Topic icons
$sql = 'SELECT *
FROM ' . ICONS_TABLE . '
ORDER BY icons_order';
- $result = $db->sql_query($sql);
+ $result = $this->db->sql_query($sql);
$icons = array();
- while ($row = $db->sql_fetchrow($result))
+ while ($row = $this->db->sql_fetchrow($result))
{
$icons[$row['icons_id']]['img'] = $row['icons_url'];
$icons[$row['icons_id']]['width'] = (int) $row['icons_width'];
$icons[$row['icons_id']]['height'] = (int) $row['icons_height'];
$icons[$row['icons_id']]['display'] = (bool) $row['display_on_posting'];
}
- $db->sql_freeresult($result);
+ $this->db->sql_freeresult($result);
- $this->put('_icons', $icons);
+ $this->driver->put('_icons', $icons);
}
return $icons;
@@ -131,17 +153,15 @@ class cache extends acm
*/
function obtain_ranks()
{
- if (($ranks = $this->get('_ranks')) === false)
+ if (($ranks = $this->driver->get('_ranks')) === false)
{
- global $db;
-
$sql = 'SELECT *
FROM ' . RANKS_TABLE . '
ORDER BY rank_min DESC';
- $result = $db->sql_query($sql);
+ $result = $this->db->sql_query($sql);
$ranks = array();
- while ($row = $db->sql_fetchrow($result))
+ while ($row = $this->db->sql_fetchrow($result))
{
if ($row['rank_special'])
{
@@ -159,9 +179,9 @@ class cache extends acm
);
}
}
- $db->sql_freeresult($result);
+ $this->db->sql_freeresult($result);
- $this->put('_ranks', $ranks);
+ $this->driver->put('_ranks', $ranks);
}
return $ranks;
@@ -176,10 +196,8 @@ class cache extends acm
*/
function obtain_attach_extensions($forum_id)
{
- if (($extensions = $this->get('_extensions')) === false)
+ if (($extensions = $this->driver->get('_extensions')) === false)
{
- global $db;
-
$extensions = array(
'_allowed_post' => array(),
'_allowed_pm' => array(),
@@ -190,9 +208,9 @@ class cache extends acm
FROM ' . EXTENSIONS_TABLE . ' e, ' . EXTENSION_GROUPS_TABLE . ' g
WHERE e.group_id = g.group_id
AND (g.allow_group = 1 OR g.allow_in_pm = 1)';
- $result = $db->sql_query($sql);
+ $result = $this->db->sql_query($sql);
- while ($row = $db->sql_fetchrow($result))
+ while ($row = $this->db->sql_fetchrow($result))
{
$extension = strtolower(trim($row['extension']));
@@ -203,6 +221,7 @@ class cache extends acm
'max_filesize' => (int) $row['max_filesize'],
'allow_group' => $row['allow_group'],
'allow_in_pm' => $row['allow_in_pm'],
+ 'group_name' => $row['group_name'],
);
$allowed_forums = ($row['allowed_forums']) ? unserialize(trim($row['allowed_forums'])) : array();
@@ -218,9 +237,9 @@ class cache extends acm
$extensions['_allowed_pm'][$extension] = 0;
}
}
- $db->sql_freeresult($result);
+ $this->db->sql_freeresult($result);
- $this->put('_extensions', $extensions);
+ $this->driver->put('_extensions', $extensions);
}
// Forum post
@@ -281,11 +300,9 @@ class cache extends acm
*/
function obtain_bots()
{
- if (($bots = $this->get('_bots')) === false)
+ if (($bots = $this->driver->get('_bots')) === false)
{
- global $db;
-
- switch ($db->sql_layer)
+ switch ($this->db->sql_layer)
{
case 'mssql':
case 'mssql_odbc':
@@ -311,16 +328,16 @@ class cache extends acm
ORDER BY LENGTH(bot_agent) DESC';
break;
}
- $result = $db->sql_query($sql);
+ $result = $this->db->sql_query($sql);
$bots = array();
- while ($row = $db->sql_fetchrow($result))
+ while ($row = $this->db->sql_fetchrow($result))
{
$bots[] = $row;
}
- $db->sql_freeresult($result);
+ $this->db->sql_freeresult($result);
- $this->put('_bots', $bots);
+ $this->driver->put('_bots', $bots);
}
return $bots;
@@ -329,50 +346,32 @@ class cache extends acm
/**
* Obtain cfg file data
*/
- function obtain_cfg_items($theme)
+ function obtain_cfg_items($style)
{
- global $config, $phpbb_root_path;
+ $parsed_array = $this->driver->get('_cfg_' . $style['style_path']);
- $parsed_items = array(
- 'theme' => array(),
- 'template' => array(),
- 'imageset' => array()
- );
-
- foreach ($parsed_items as $key => $parsed_array)
+ if ($parsed_array === false)
{
- $parsed_array = $this->get('_cfg_' . $key . '_' . $theme[$key . '_path']);
-
- if ($parsed_array === false)
- {
- $parsed_array = array();
- }
-
- $reparse = false;
- $filename = $phpbb_root_path . 'styles/' . $theme[$key . '_path'] . '/' . $key . '/' . $key . '.cfg';
+ $parsed_array = array();
+ }
- if (!file_exists($filename))
- {
- continue;
- }
+ $filename = $this->phpbb_root_path . 'styles/' . $style['style_path'] . '/style.cfg';
- if (!isset($parsed_array['filetime']) || (($config['load_tplcompile'] && @filemtime($filename) > $parsed_array['filetime'])))
- {
- $reparse = true;
- }
+ if (!file_exists($filename))
+ {
+ return $parsed_array;
+ }
+ if (!isset($parsed_array['filetime']) || (($this->config['load_tplcompile'] && @filemtime($filename) > $parsed_array['filetime'])))
+ {
// Re-parse cfg file
- if ($reparse)
- {
- $parsed_array = parse_cfg_file($filename);
- $parsed_array['filetime'] = @filemtime($filename);
+ $parsed_array = parse_cfg_file($filename);
+ $parsed_array['filetime'] = @filemtime($filename);
- $this->put('_cfg_' . $key . '_' . $theme[$key . '_path'], $parsed_array);
- }
- $parsed_items[$key] = $parsed_array;
+ $this->driver->put('_cfg_' . $style['style_path'], $parsed_array);
}
- return $parsed_items;
+ return $parsed_array;
}
/**
@@ -380,58 +379,22 @@ class cache extends acm
*/
function obtain_disallowed_usernames()
{
- if (($usernames = $this->get('_disallowed_usernames')) === false)
+ if (($usernames = $this->driver->get('_disallowed_usernames')) === false)
{
- global $db;
-
$sql = 'SELECT disallow_username
FROM ' . DISALLOW_TABLE;
- $result = $db->sql_query($sql);
+ $result = $this->db->sql_query($sql);
$usernames = array();
- while ($row = $db->sql_fetchrow($result))
+ while ($row = $this->db->sql_fetchrow($result))
{
$usernames[] = str_replace('%', '.*?', preg_quote(utf8_clean_string($row['disallow_username']), '#'));
}
- $db->sql_freeresult($result);
+ $this->db->sql_freeresult($result);
- $this->put('_disallowed_usernames', $usernames);
+ $this->driver->put('_disallowed_usernames', $usernames);
}
return $usernames;
}
-
- /**
- * Obtain hooks...
- */
- function obtain_hooks()
- {
- global $phpbb_root_path, $phpEx;
-
- if (($hook_files = $this->get('_hooks')) === false)
- {
- $hook_files = array();
-
- // Now search for hooks...
- $dh = @opendir($phpbb_root_path . 'includes/hooks/');
-
- if ($dh)
- {
- while (($file = readdir($dh)) !== false)
- {
- if (strpos($file, 'hook_') === 0 && substr($file, -(strlen($phpEx) + 1)) === '.' . $phpEx)
- {
- $hook_files[] = substr($file, 0, -(strlen($phpEx) + 1));
- }
- }
- closedir($dh);
- }
-
- $this->put('_hooks', $hook_files);
- }
-
- return $hook_files;
- }
}
-
-?> \ No newline at end of file
diff --git a/phpBB/phpbb/class_loader.php b/phpBB/phpbb/class_loader.php
new file mode 100644
index 0000000000..ee9767148b
--- /dev/null
+++ b/phpBB/phpbb/class_loader.php
@@ -0,0 +1,162 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb;
+
+/**
+* The class loader resolves class names to file system paths and loads them if
+* necessary.
+*
+* Classes have to be of the form phpbb_(dir_)*(classpart_)*, so directory names
+* must never contain underscores. Example: phpbb_dir_subdir_class_name is a
+* valid class name, while phpbb_dir_sub_dir_class_name is not.
+*
+* If every part of the class name is a directory, the last directory name is
+* also used as the filename, e.g. phpbb_dir would resolve to dir/dir.php.
+*
+* @package phpBB3
+*/
+class class_loader
+{
+ private $namespace;
+ private $path;
+ private $php_ext;
+ private $cache;
+
+ /**
+ * A map of looked up class names to paths relative to $this->path.
+ * This map is stored in cache and looked up if the cache is available.
+ *
+ * @var array
+ */
+ private $cached_paths = array();
+
+ /**
+ * Creates a new \phpbb\class_loader, which loads files with the given
+ * file extension from the given path.
+ *
+ * @param string $namespace Required namespace for files to be loaded
+ * @param string $path Directory to load files from
+ * @param string $php_ext The file extension for PHP files
+ * @param \phpbb\cache\driver\driver_interface $cache An implementation of the phpBB cache interface.
+ */
+ public function __construct($namespace, $path, $php_ext = 'php', \phpbb\cache\driver\driver_interface $cache = null)
+ {
+ if ($namespace[0] !== '\\')
+ {
+ $namespace = '\\' . $namespace;
+ }
+
+ $this->namespace = $namespace;
+ $this->path = $path;
+ $this->php_ext = $php_ext;
+
+ $this->set_cache($cache);
+ }
+
+ /**
+ * Provide the class loader with a cache to store paths. If set to null, the
+ * the class loader will resolve paths by checking for the existance of every
+ * directory in the class name every time.
+ *
+ * @param \phpbb\cache\driver\driver_interface $cache An implementation of the phpBB cache interface.
+ */
+ public function set_cache(\phpbb\cache\driver\driver_interface $cache = null)
+ {
+ if ($cache)
+ {
+ $this->cached_paths = $cache->get('class_loader_' . str_replace('\\', '__', $this->namespace));
+
+ if ($this->cached_paths === false)
+ {
+ $this->cached_paths = array();
+ }
+ }
+
+ $this->cache = $cache;
+ }
+
+ /**
+ * Registers the class loader as an autoloader using SPL.
+ */
+ public function register()
+ {
+ spl_autoload_register(array($this, 'load_class'));
+ }
+
+ /**
+ * Removes the class loader from the SPL autoloader stack.
+ */
+ public function unregister()
+ {
+ spl_autoload_unregister(array($this, 'load_class'));
+ }
+
+ /**
+ * Resolves a phpBB class name to a relative path which can be included.
+ *
+ * @param string $class The class name to resolve, must be in the
+ * namespace the loader was constructed with.
+ * Has to begin with \
+ * @return string|bool A relative path to the file containing the
+ * class or false if looking it up failed.
+ */
+ public function resolve_path($class)
+ {
+ if (isset($this->cached_paths[$class]))
+ {
+ return $this->path . $this->cached_paths[$class] . '.' . $this->php_ext;
+ }
+
+ if (!preg_match('/^' . preg_quote($this->namespace, '/') . '[a-zA-Z0-9_\\\\]+$/', $class))
+ {
+ return false;
+ }
+
+ $relative_path = str_replace('\\', '/', substr($class, strlen($this->namespace)));
+
+ if (!file_exists($this->path . $relative_path . '.' . $this->php_ext))
+ {
+ return false;
+ }
+
+ if ($this->cache)
+ {
+ $this->cached_paths[$class] = $relative_path;
+ $this->cache->put('class_loader_' . str_replace('\\', '__', $this->namespace), $this->cached_paths);
+ }
+
+ return $this->path . $relative_path . '.' . $this->php_ext;
+ }
+
+ /**
+ * Resolves a class name to a path and then includes it.
+ *
+ * @param string $class The class name which is being loaded.
+ */
+ public function load_class($class)
+ {
+ // In general $class is not supposed to contain a leading backslash,
+ // but sometimes it does. See tickets PHP-50731 and HHVM-1840.
+ if ($class[0] !== '\\')
+ {
+ $class = '\\' . $class;
+ }
+
+ if (substr($class, 0, strlen($this->namespace)) === $this->namespace)
+ {
+ $path = $this->resolve_path($class);
+
+ if ($path)
+ {
+ require $path;
+ }
+ }
+ }
+}
diff --git a/phpBB/phpbb/config/config.php b/phpBB/phpbb/config/config.php
new file mode 100644
index 0000000000..d37922acf1
--- /dev/null
+++ b/phpBB/phpbb/config/config.php
@@ -0,0 +1,164 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2010 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\config;
+
+/**
+* Configuration container class
+* @package phpBB3
+*/
+class config implements \ArrayAccess, \IteratorAggregate, \Countable
+{
+ /**
+ * The configuration data
+ * @var array(string => string)
+ */
+ protected $config;
+
+ /**
+ * Creates a configuration container with a default set of values
+ *
+ * @param array(string => string) $config The configuration data.
+ */
+ public function __construct(array $config)
+ {
+ $this->config = $config;
+ }
+
+ /**
+ * Retrieves an ArrayIterator over the configuration values.
+ *
+ * @return ArrayIterator An iterator over all config data
+ */
+ public function getIterator()
+ {
+ return new \ArrayIterator($this->config);
+ }
+
+ /**
+ * Checks if the specified config value exists.
+ *
+ * @param string $key The configuration option's name.
+ * @return bool Whether the configuration option exists.
+ */
+ public function offsetExists($key)
+ {
+ return isset($this->config[$key]);
+ }
+
+ /**
+ * Retrieves a configuration value.
+ *
+ * @param string $key The configuration option's name.
+ * @return string The configuration value
+ */
+ public function offsetGet($key)
+ {
+ return (isset($this->config[$key])) ? $this->config[$key] : '';
+ }
+
+ /**
+ * Temporarily overwrites the value of a configuration variable.
+ *
+ * The configuration change will not persist. It will be lost
+ * after the request.
+ *
+ * @param string $key The configuration option's name.
+ * @param string $value The temporary value.
+ */
+ public function offsetSet($key, $value)
+ {
+ $this->config[$key] = $value;
+ }
+
+ /**
+ * Called when deleting a configuration value directly, triggers an error.
+ *
+ * @param string $key The configuration option's name.
+ */
+ public function offsetUnset($key)
+ {
+ trigger_error('Config values have to be deleted explicitly with the \phpbb\config\config::delete($key) method.', E_USER_ERROR);
+ }
+
+ /**
+ * Retrieves the number of configuration options currently set.
+ *
+ * @return int Number of config options
+ */
+ public function count()
+ {
+ return count($this->config);
+ }
+
+ /**
+ * Removes a configuration option
+ *
+ * @param String $key The configuration option's name
+ * @param bool $use_cache Whether this variable should be cached or if it
+ * changes too frequently to be efficiently cached
+ * @return null
+ */
+ public function delete($key, $use_cache = true)
+ {
+ unset($this->config[$key]);
+ }
+
+ /**
+ * Sets a configuration option's value
+ *
+ * @param string $key The configuration option's name
+ * @param string $value New configuration value
+ * @param bool $use_cache Whether this variable should be cached or if it
+ * changes too frequently to be efficiently cached.
+ */
+ public function set($key, $value, $use_cache = true)
+ {
+ $this->config[$key] = $value;
+ }
+
+ /**
+ * Sets a configuration option's value only if the old_value matches the
+ * current configuration value or the configuration value does not exist yet.
+ *
+ * @param string $key The configuration option's name
+ * @param string $old_value Current configuration value
+ * @param string $new_value New configuration value
+ * @param bool $use_cache Whether this variable should be cached or if it
+ * changes too frequently to be efficiently cached.
+ * @return bool True if the value was changed, false otherwise.
+ */
+ public function set_atomic($key, $old_value, $new_value, $use_cache = true)
+ {
+ if (!isset($this->config[$key]) || $this->config[$key] == $old_value)
+ {
+ $this->config[$key] = $new_value;
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * Increments an integer configuration value.
+ *
+ * @param string $key The configuration option's name
+ * @param int $increment Amount to increment by
+ * @param bool $use_cache Whether this variable should be cached or if it
+ * changes too frequently to be efficiently cached.
+ */
+ function increment($key, $increment, $use_cache = true)
+ {
+ if (!isset($this->config[$key]))
+ {
+ $this->config[$key] = 0;
+ }
+
+ $this->config[$key] += $increment;
+ }
+}
diff --git a/phpBB/phpbb/config/db.php b/phpBB/phpbb/config/db.php
new file mode 100644
index 0000000000..c1a3630a14
--- /dev/null
+++ b/phpBB/phpbb/config/db.php
@@ -0,0 +1,201 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2010 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\config;
+
+/**
+* Configuration container class
+* @package phpBB3
+*/
+class db extends \phpbb\config\config
+{
+ /**
+ * Cache instance
+ * @var \phpbb\cache\driver\driver_interface
+ */
+ protected $cache;
+
+ /**
+ * Database connection
+ * @var \phpbb\db\driver\driver
+ */
+ protected $db;
+
+ /**
+ * Name of the database table used for configuration.
+ * @var string
+ */
+ protected $table;
+
+ /**
+ * Creates a configuration container with a default set of values
+ *
+ * @param \phpbb\db\driver\driver $db Database connection
+ * @param \phpbb\cache\driver\driver_interface $cache Cache instance
+ * @param string $table Configuration table name
+ */
+ public function __construct(\phpbb\db\driver\driver $db, \phpbb\cache\driver\driver_interface $cache, $table)
+ {
+ $this->db = $db;
+ $this->cache = $cache;
+ $this->table = $table;
+
+ if (($config = $cache->get('config')) !== false)
+ {
+ $sql = 'SELECT config_name, config_value
+ FROM ' . $this->table . '
+ WHERE is_dynamic = 1';
+ $result = $this->db->sql_query($sql);
+
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ $config[$row['config_name']] = $row['config_value'];
+ }
+ $this->db->sql_freeresult($result);
+ }
+ else
+ {
+ $config = $cached_config = array();
+
+ $sql = 'SELECT config_name, config_value, is_dynamic
+ FROM ' . $this->table;
+ $result = $this->db->sql_query($sql);
+
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ if (!$row['is_dynamic'])
+ {
+ $cached_config[$row['config_name']] = $row['config_value'];
+ }
+
+ $config[$row['config_name']] = $row['config_value'];
+ }
+ $this->db->sql_freeresult($result);
+
+ $cache->put('config', $cached_config);
+ }
+
+ parent::__construct($config);
+ }
+
+ /**
+ * Removes a configuration option
+ *
+ * @param String $key The configuration option's name
+ * @param bool $use_cache Whether this variable should be cached or if it
+ * changes too frequently to be efficiently cached
+ * @return null
+ */
+ public function delete($key, $use_cache = true)
+ {
+ $sql = 'DELETE FROM ' . $this->table . "
+ WHERE config_name = '" . $this->db->sql_escape($key) . "'";
+ $this->db->sql_query($sql);
+
+ unset($this->config[$key]);
+
+ if ($use_cache)
+ {
+ $this->cache->destroy('config');
+ }
+ }
+
+ /**
+ * Sets a configuration option's value
+ *
+ * @param string $key The configuration option's name
+ * @param string $value New configuration value
+ * @param bool $use_cache Whether this variable should be cached or if it
+ * changes too frequently to be efficiently cached.
+ */
+ public function set($key, $value, $use_cache = true)
+ {
+ $this->set_atomic($key, false, $value, $use_cache);
+ }
+
+ /**
+ * Sets a configuration option's value only if the old_value matches the
+ * current configuration value or the configuration value does not exist yet.
+ *
+ * @param string $key The configuration option's name
+ * @param mixed $old_value Current configuration value or false to ignore
+ * the old value
+ * @param string $new_value New configuration value
+ * @param bool $use_cache Whether this variable should be cached or if it
+ * changes too frequently to be efficiently cached
+ * @return bool True if the value was changed, false otherwise
+ */
+ public function set_atomic($key, $old_value, $new_value, $use_cache = true)
+ {
+ $sql = 'UPDATE ' . $this->table . "
+ SET config_value = '" . $this->db->sql_escape($new_value) . "'
+ WHERE config_name = '" . $this->db->sql_escape($key) . "'";
+
+ if ($old_value !== false)
+ {
+ $sql .= " AND config_value = '" . $this->db->sql_escape($old_value) . "'";
+ }
+
+ $result = $this->db->sql_query($sql);
+
+ if (!$this->db->sql_affectedrows($result) && isset($this->config[$key]))
+ {
+ return false;
+ }
+
+ if (!isset($this->config[$key]))
+ {
+ $sql = 'INSERT INTO ' . $this->table . ' ' . $this->db->sql_build_array('INSERT', array(
+ 'config_name' => $key,
+ 'config_value' => $new_value,
+ 'is_dynamic' => ($use_cache) ? 0 : 1));
+ $this->db->sql_query($sql);
+ }
+
+ if ($use_cache)
+ {
+ $this->cache->destroy('config');
+ }
+
+ $this->config[$key] = $new_value;
+ return true;
+ }
+
+ /**
+ * Increments an integer config value directly in the database.
+ *
+ * Using this method instead of setting the new value directly avoids race
+ * conditions and unlike set_atomic it cannot fail.
+ *
+ * @param string $key The configuration option's name
+ * @param int $increment Amount to increment by
+ * @param bool $use_cache Whether this variable should be cached or if it
+ * changes too frequently to be efficiently cached.
+ */
+ function increment($key, $increment, $use_cache = true)
+ {
+ if (!isset($this->config[$key]))
+ {
+ $this->set($key, '0', $use_cache);
+ }
+
+ $sql_update = $this->db->cast_expr_to_string($this->db->cast_expr_to_bigint('config_value') . ' + ' . (int) $increment);
+
+ $this->db->sql_query('UPDATE ' . $this->table . '
+ SET config_value = ' . $sql_update . "
+ WHERE config_name = '" . $this->db->sql_escape($key) . "'");
+
+ if ($use_cache)
+ {
+ $this->cache->destroy('config');
+ }
+
+ $this->config[$key] += $increment;
+ }
+}
diff --git a/phpBB/phpbb/config/db_text.php b/phpBB/phpbb/config/db_text.php
new file mode 100644
index 0000000000..b1ea112b53
--- /dev/null
+++ b/phpBB/phpbb/config/db_text.php
@@ -0,0 +1,157 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\config;
+
+/**
+* Manages configuration options with an arbitrary length value stored in a TEXT
+* column. In constrast to class \phpbb\config\db, values are never cached and
+* prefetched, but every get operation sends a query to the database.
+*
+* @package phpBB3
+*/
+class db_text
+{
+ /**
+ * Database connection
+ * @var \phpbb\db\driver\driver
+ */
+ protected $db;
+
+ /**
+ * Name of the database table used.
+ * @var string
+ */
+ protected $table;
+
+ /**
+ * @param \phpbb\db\driver\driver $db Database connection
+ * @param string $table Table name
+ */
+ public function __construct(\phpbb\db\driver\driver $db, $table)
+ {
+ $this->db = $db;
+ $this->table = $this->db->sql_escape($table);
+ }
+
+ /**
+ * Sets the configuration option with the name $key to $value.
+ *
+ * @param string $key The configuration option's name
+ * @param string $value New configuration value
+ *
+ * @return null
+ */
+ public function set($key, $value)
+ {
+ $this->set_array(array($key => $value));
+ }
+
+ /**
+ * Gets the configuration value for the name $key.
+ *
+ * @param string $key The configuration option's name
+ *
+ * @return string|null String result on success
+ * null if there is no such option
+ */
+ public function get($key)
+ {
+ $map = $this->get_array(array($key));
+
+ return isset($map[$key]) ? $map[$key] : null;
+ }
+
+ /**
+ * Removes the configuration option with the name $key.
+ *
+ * @param string $key The configuration option's name
+ *
+ * @return null
+ */
+ public function delete($key)
+ {
+ $this->delete_array(array($key));
+ }
+
+ /**
+ * Mass set configuration options: Receives an associative array,
+ * treats array keys as configuration option names and associated
+ * array values as their configuration option values.
+ *
+ * @param array $map Map from configuration names to values
+ *
+ * @return null
+ */
+ public function set_array(array $map)
+ {
+ $this->db->sql_transaction('begin');
+
+ foreach ($map as $key => $value)
+ {
+ $sql = 'UPDATE ' . $this->table . "
+ SET config_value = '" . $this->db->sql_escape($value) . "'
+ WHERE config_name = '" . $this->db->sql_escape($key) . "'";
+ $result = $this->db->sql_query($sql);
+
+ if (!$this->db->sql_affectedrows($result))
+ {
+ $sql = 'INSERT INTO ' . $this->table . ' ' . $this->db->sql_build_array('INSERT', array(
+ 'config_name' => $key,
+ 'config_value' => $value,
+ ));
+ $this->db->sql_query($sql);
+ }
+ }
+
+ $this->db->sql_transaction('commit');
+ }
+
+ /**
+ * Mass get configuration options: Receives a set of configuration
+ * option names and returns the result as a key => value map where
+ * array keys are configuration option names and array values are
+ * associated config option values.
+ *
+ * @param array $keys Set of configuration option names
+ *
+ * @return array Map from configuration names to values
+ */
+ public function get_array(array $keys)
+ {
+ $sql = 'SELECT *
+ FROM ' . $this->table . '
+ WHERE ' . $this->db->sql_in_set('config_name', $keys, false, true);
+ $result = $this->db->sql_query($sql);
+
+ $map = array();
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ $map[$row['config_name']] = $row['config_value'];
+ }
+ $this->db->sql_freeresult($result);
+
+ return $map;
+ }
+
+ /**
+ * Mass delete configuration options.
+ *
+ * @param array $keys Set of configuration option names
+ *
+ * @return null
+ */
+ public function delete_array(array $keys)
+ {
+ $sql = 'DELETE
+ FROM ' . $this->table . '
+ WHERE ' . $this->db->sql_in_set('config_name', $keys, false, true);
+ $result = $this->db->sql_query($sql);
+ }
+}
diff --git a/phpBB/phpbb/console/application.php b/phpBB/phpbb/console/application.php
new file mode 100644
index 0000000000..fdcd9d42f6
--- /dev/null
+++ b/phpBB/phpbb/console/application.php
@@ -0,0 +1,23 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\console;
+
+use Symfony\Component\DependencyInjection\TaggedContainerInterface;
+
+class application extends \Symfony\Component\Console\Application
+{
+ function register_container_commands(TaggedContainerInterface $container, $tag = 'console.command')
+ {
+ foreach($container->findTaggedServiceIds($tag) as $id => $void)
+ {
+ $this->add($container->get($id));
+ }
+ }
+}
diff --git a/phpBB/phpbb/console/command/command.php b/phpBB/phpbb/console/command/command.php
new file mode 100644
index 0000000000..6abbdd203c
--- /dev/null
+++ b/phpBB/phpbb/console/command/command.php
@@ -0,0 +1,14 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\console\command;
+
+abstract class command extends \Symfony\Component\Console\Command\Command
+{
+}
diff --git a/phpBB/phpbb/console/command/config/command.php b/phpBB/phpbb/console/command/config/command.php
new file mode 100644
index 0000000000..b105bc826d
--- /dev/null
+++ b/phpBB/phpbb/console/command/config/command.php
@@ -0,0 +1,22 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+namespace phpbb\console\command\config;
+
+abstract class command extends \phpbb\console\command\command
+{
+ /** @var \phpbb\config\config */
+ protected $config;
+
+ function __construct(\phpbb\config\config $config)
+ {
+ $this->config = $config;
+
+ parent::__construct();
+ }
+}
diff --git a/phpBB/phpbb/console/command/config/delete.php b/phpBB/phpbb/console/command/config/delete.php
new file mode 100644
index 0000000000..9a2d00561d
--- /dev/null
+++ b/phpBB/phpbb/console/command/config/delete.php
@@ -0,0 +1,46 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+namespace phpbb\console\command\config;
+
+use Symfony\Component\Console\Input\InputArgument;
+use Symfony\Component\Console\Input\InputInterface;
+use Symfony\Component\Console\Input\InputOption;
+use Symfony\Component\Console\Output\OutputInterface;
+
+class delete extends command
+{
+ protected function configure()
+ {
+ $this
+ ->setName('config:delete')
+ ->setDescription('Deletes a configuration option')
+ ->addArgument(
+ 'key',
+ InputArgument::REQUIRED,
+ "The configuration option's name"
+ )
+ ;
+ }
+
+ protected function execute(InputInterface $input, OutputInterface $output)
+ {
+ $key = $input->getArgument('key');
+
+ if (isset($this->config[$key]))
+ {
+ $this->config->delete($key);
+
+ $output->writeln("<info>Successfully deleted config $key</info>");
+ }
+ else
+ {
+ $output->writeln("<error>Config $key does not exist</error>");
+ }
+ }
+}
diff --git a/phpBB/phpbb/console/command/config/get.php b/phpBB/phpbb/console/command/config/get.php
new file mode 100644
index 0000000000..275c82b53f
--- /dev/null
+++ b/phpBB/phpbb/console/command/config/get.php
@@ -0,0 +1,54 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+namespace phpbb\console\command\config;
+
+use Symfony\Component\Console\Input\InputArgument;
+use Symfony\Component\Console\Input\InputInterface;
+use Symfony\Component\Console\Input\InputOption;
+use Symfony\Component\Console\Output\OutputInterface;
+
+class get extends command
+{
+ protected function configure()
+ {
+ $this
+ ->setName('config:get')
+ ->setDescription("Gets a configuration option's value")
+ ->addArgument(
+ 'key',
+ InputArgument::REQUIRED,
+ "The configuration option's name"
+ )
+ ->addOption(
+ 'no-newline',
+ null,
+ InputOption::VALUE_NONE,
+ 'Set this option if the value should be printed without a new line at the end.'
+ )
+ ;
+ }
+
+ protected function execute(InputInterface $input, OutputInterface $output)
+ {
+ $key = $input->getArgument('key');
+
+ if (isset($this->config[$key]) && $input->getOption('no-newline'))
+ {
+ $output->write($this->config[$key]);
+ }
+ elseif (isset($this->config[$key]))
+ {
+ $output->writeln($this->config[$key]);
+ }
+ else
+ {
+ $output->writeln("<error>Could not get config $key</error>");
+ }
+ }
+}
diff --git a/phpBB/phpbb/console/command/config/increment.php b/phpBB/phpbb/console/command/config/increment.php
new file mode 100644
index 0000000000..bc6b63c6ff
--- /dev/null
+++ b/phpBB/phpbb/console/command/config/increment.php
@@ -0,0 +1,52 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+namespace phpbb\console\command\config;
+
+use Symfony\Component\Console\Input\InputArgument;
+use Symfony\Component\Console\Input\InputInterface;
+use Symfony\Component\Console\Input\InputOption;
+use Symfony\Component\Console\Output\OutputInterface;
+
+class increment extends command
+{
+ protected function configure()
+ {
+ $this
+ ->setName('config:increment')
+ ->setDescription("Increments a configuration option's value")
+ ->addArgument(
+ 'key',
+ InputArgument::REQUIRED,
+ "The configuration option's name"
+ )
+ ->addArgument(
+ 'increment',
+ InputArgument::REQUIRED,
+ 'Amount to increment by'
+ )
+ ->addOption(
+ 'dynamic',
+ 'd',
+ InputOption::VALUE_NONE,
+ 'Set this option if the configuration option changes too frequently to be efficiently cached.'
+ )
+ ;
+ }
+
+ protected function execute(InputInterface $input, OutputInterface $output)
+ {
+ $key = $input->getArgument('key');
+ $increment = $input->getArgument('increment');
+ $use_cache = !$input->getOption('dynamic');
+
+ $this->config->increment($key, $increment, $use_cache);
+
+ $output->writeln("<info>Successfully incremented config $key</info>");
+ }
+}
diff --git a/phpBB/phpbb/console/command/config/set.php b/phpBB/phpbb/console/command/config/set.php
new file mode 100644
index 0000000000..9d471a96ad
--- /dev/null
+++ b/phpBB/phpbb/console/command/config/set.php
@@ -0,0 +1,52 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+namespace phpbb\console\command\config;
+
+use Symfony\Component\Console\Input\InputArgument;
+use Symfony\Component\Console\Input\InputInterface;
+use Symfony\Component\Console\Input\InputOption;
+use Symfony\Component\Console\Output\OutputInterface;
+
+class set extends command
+{
+ protected function configure()
+ {
+ $this
+ ->setName('config:set')
+ ->setDescription("Sets a configuration option's value")
+ ->addArgument(
+ 'key',
+ InputArgument::REQUIRED,
+ "The configuration option's name"
+ )
+ ->addArgument(
+ 'value',
+ InputArgument::REQUIRED,
+ 'New configuration value, use 0 and 1 to specify boolean values'
+ )
+ ->addOption(
+ 'dynamic',
+ 'd',
+ InputOption::VALUE_NONE,
+ 'Set this option if the configuration option changes too frequently to be efficiently cached.'
+ )
+ ;
+ }
+
+ protected function execute(InputInterface $input, OutputInterface $output)
+ {
+ $key = $input->getArgument('key');
+ $value = $input->getArgument('value');
+ $use_cache = !$input->getOption('dynamic');
+
+ $this->config->set($key, $value, $use_cache);
+
+ $output->writeln("<info>Successfully set config $key</info>");
+ }
+}
diff --git a/phpBB/phpbb/console/command/config/set_atomic.php b/phpBB/phpbb/console/command/config/set_atomic.php
new file mode 100644
index 0000000000..03e7a60210
--- /dev/null
+++ b/phpBB/phpbb/console/command/config/set_atomic.php
@@ -0,0 +1,65 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+namespace phpbb\console\command\config;
+
+use Symfony\Component\Console\Input\InputArgument;
+use Symfony\Component\Console\Input\InputInterface;
+use Symfony\Component\Console\Input\InputOption;
+use Symfony\Component\Console\Output\OutputInterface;
+
+class set_atomic extends command
+{
+ protected function configure()
+ {
+ $this
+ ->setName('config:set-atomic')
+ ->setDescription("Sets a configuration option's value only if the old matches the current value.")
+ ->addArgument(
+ 'key',
+ InputArgument::REQUIRED,
+ "The configuration option's name"
+ )
+ ->addArgument(
+ 'old',
+ InputArgument::REQUIRED,
+ 'Current configuration value, use 0 and 1 to specify boolean values'
+ )
+ ->addArgument(
+ 'new',
+ InputArgument::REQUIRED,
+ 'New configuration value, use 0 and 1 to specify boolean values'
+ )
+ ->addOption(
+ 'dynamic',
+ 'd',
+ InputOption::VALUE_NONE,
+ 'Set this option if the configuration option changes too frequently to be efficiently cached.'
+ )
+ ;
+ }
+
+ protected function execute(InputInterface $input, OutputInterface $output)
+ {
+ $key = $input->getArgument('key');
+ $old_value = $input->getArgument('old');
+ $new_value = $input->getArgument('new');
+ $use_cache = !$input->getOption('dynamic');
+
+ if ($this->config->set_atomic($key, $old_value, $new_value, $use_cache))
+ {
+ $output->writeln("<info>Successfully set config $key</info>");
+ return 0;
+ }
+ else
+ {
+ $output->writeln("<error>Could not set config $key</error>");
+ return 1;
+ }
+ }
+}
diff --git a/phpBB/phpbb/console/command/extension/command.php b/phpBB/phpbb/console/command/extension/command.php
new file mode 100644
index 0000000000..edde7ce2e2
--- /dev/null
+++ b/phpBB/phpbb/console/command/extension/command.php
@@ -0,0 +1,22 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+namespace phpbb\console\command\extension;
+
+abstract class command extends \phpbb\console\command\command
+{
+ /** @var \phpbb\extension\manager */
+ protected $manager;
+
+ function __construct(\phpbb\extension\manager $manager)
+ {
+ $this->manager = $manager;
+
+ parent::__construct();
+ }
+}
diff --git a/phpBB/phpbb/console/command/extension/disable.php b/phpBB/phpbb/console/command/extension/disable.php
new file mode 100644
index 0000000000..e4de70ca34
--- /dev/null
+++ b/phpBB/phpbb/console/command/extension/disable.php
@@ -0,0 +1,47 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+namespace phpbb\console\command\extension;
+
+use Symfony\Component\Console\Input\InputArgument;
+use Symfony\Component\Console\Input\InputInterface;
+use Symfony\Component\Console\Output\OutputInterface;
+
+class disable extends command
+{
+ protected function configure()
+ {
+ $this
+ ->setName('extension:disable')
+ ->setDescription('Disables the specified extension.')
+ ->addArgument(
+ 'extension-name',
+ InputArgument::REQUIRED,
+ 'Name of the extension'
+ )
+ ;
+ }
+
+ protected function execute(InputInterface $input, OutputInterface $output)
+ {
+ $name = $input->getArgument('extension-name');
+ $this->manager->disable($name);
+ $this->manager->load_extensions();
+
+ if ($this->manager->enabled($name))
+ {
+ $output->writeln("<error>Could not disable extension $name</error>");
+ return 1;
+ }
+ else
+ {
+ $output->writeln("<info>Successfully disabled extension $name</info>");
+ return 0;
+ }
+ }
+}
diff --git a/phpBB/phpbb/console/command/extension/enable.php b/phpBB/phpbb/console/command/extension/enable.php
new file mode 100644
index 0000000000..ee7dae76aa
--- /dev/null
+++ b/phpBB/phpbb/console/command/extension/enable.php
@@ -0,0 +1,47 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+namespace phpbb\console\command\extension;
+
+use Symfony\Component\Console\Input\InputArgument;
+use Symfony\Component\Console\Input\InputInterface;
+use Symfony\Component\Console\Output\OutputInterface;
+
+class enable extends command
+{
+ protected function configure()
+ {
+ $this
+ ->setName('extension:enable')
+ ->setDescription('Enables the specified extension.')
+ ->addArgument(
+ 'extension-name',
+ InputArgument::REQUIRED,
+ 'Name of the extension'
+ )
+ ;
+ }
+
+ protected function execute(InputInterface $input, OutputInterface $output)
+ {
+ $name = $input->getArgument('extension-name');
+ $this->manager->enable($name);
+ $this->manager->load_extensions();
+
+ if ($this->manager->enabled($name))
+ {
+ $output->writeln("<info>Successfully enabled extension $name</info>");
+ return 0;
+ }
+ else
+ {
+ $output->writeln("<error>Could not enable extension $name</error>");
+ return 1;
+ }
+ }
+}
diff --git a/phpBB/phpbb/console/command/extension/purge.php b/phpBB/phpbb/console/command/extension/purge.php
new file mode 100644
index 0000000000..c2e1d2928c
--- /dev/null
+++ b/phpBB/phpbb/console/command/extension/purge.php
@@ -0,0 +1,47 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+namespace phpbb\console\command\extension;
+
+use Symfony\Component\Console\Input\InputArgument;
+use Symfony\Component\Console\Input\InputInterface;
+use Symfony\Component\Console\Output\OutputInterface;
+
+class purge extends command
+{
+ protected function configure()
+ {
+ $this
+ ->setName('extension:purge')
+ ->setDescription('Purges the specified extension.')
+ ->addArgument(
+ 'extension-name',
+ InputArgument::REQUIRED,
+ 'Name of the extension'
+ )
+ ;
+ }
+
+ protected function execute(InputInterface $input, OutputInterface $output)
+ {
+ $name = $input->getArgument('extension-name');
+ $this->manager->purge($name);
+ $this->manager->load_extensions();
+
+ if ($this->manager->enabled($name))
+ {
+ $output->writeln("<error>Could not purge extension $name</error>");
+ return 1;
+ }
+ else
+ {
+ $output->writeln("<info>Successfully purge extension $name</info>");
+ return 0;
+ }
+ }
+}
diff --git a/phpBB/phpbb/console/command/extension/show.php b/phpBB/phpbb/console/command/extension/show.php
new file mode 100644
index 0000000000..0f48ac2379
--- /dev/null
+++ b/phpBB/phpbb/console/command/extension/show.php
@@ -0,0 +1,58 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+namespace phpbb\console\command\extension;
+
+use Symfony\Component\Console\Input\InputInterface;
+use Symfony\Component\Console\Output\OutputInterface;
+
+class show extends command
+{
+ protected function configure()
+ {
+ $this
+ ->setName('extension:show')
+ ->setDescription('Lists all extensions in the database and on the filesystem.')
+ ;
+ }
+
+ protected function execute(InputInterface $input, OutputInterface $output)
+ {
+ $this->manager->load_extensions();
+ $all = array_keys($this->manager->all_available());
+
+ if (empty($all))
+ {
+ $output->writeln('<comment>No extensions were found.</comment>');
+ return 3;
+ }
+
+ $enabled = array_keys($this->manager->all_enabled());
+ $this->print_extension_list($output, 'Enabled', $enabled);
+
+ $output->writeln('');
+
+ $disabled = array_keys($this->manager->all_disabled());
+ $this->print_extension_list($output, 'Disabled', $disabled);
+
+ $output->writeln('');
+
+ $purged = array_diff($all, $enabled, $disabled);
+ $this->print_extension_list($output, 'Available', $purged);
+ }
+
+ protected function print_extension_list(OutputInterface $output, $type, array $extensions)
+ {
+ $output->writeln("<info>$type:</info>");
+
+ foreach ($extensions as $extension)
+ {
+ $output->writeln(" - $extension");
+ }
+ }
+}
diff --git a/phpBB/phpbb/console/command/fixup/recalculate_email_hash.php b/phpBB/phpbb/console/command/fixup/recalculate_email_hash.php
new file mode 100644
index 0000000000..04db880091
--- /dev/null
+++ b/phpBB/phpbb/console/command/fixup/recalculate_email_hash.php
@@ -0,0 +1,71 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+namespace phpbb\console\command\fixup;
+
+use Symfony\Component\Console\Input\InputInterface;
+use Symfony\Component\Console\Output\OutputInterface;
+
+class recalculate_email_hash extends \phpbb\console\command\command
+{
+ /** @var \phpbb\db\driver\driver */
+ protected $db;
+
+ function __construct(\phpbb\db\driver\driver $db)
+ {
+ $this->db = $db;
+
+ parent::__construct();
+ }
+
+ protected function configure()
+ {
+ $this
+ ->setName('fixup:recalculate-email-hash')
+ ->setDescription('Recalculates the user_email_hash column of the users table.')
+ ;
+ }
+
+ protected function execute(InputInterface $input, OutputInterface $output)
+ {
+ $sql = 'SELECT user_id, user_email, user_email_hash
+ FROM ' . USERS_TABLE . '
+ WHERE user_type <> ' . USER_IGNORE . "
+ AND user_email <> ''";
+ $result = $this->db->sql_query($sql);
+
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ $user_email_hash = phpbb_email_hash($row['user_email']);
+ if ($user_email_hash !== $row['user_email_hash'])
+ {
+ $sql_ary = array(
+ 'user_email_hash' => $user_email_hash,
+ );
+
+ $sql = 'UPDATE ' . USERS_TABLE . '
+ SET ' . $this->db->sql_build_array('UPDATE', $sql_ary) . '
+ WHERE user_id = ' . (int) $row['user_id'];
+ $this->db->sql_query($sql);
+
+ if ($output->getVerbosity() >= OutputInterface::VERBOSITY_DEBUG)
+ {
+ $output->writeln(sprintf(
+ 'user_id %d, email %s => %s',
+ $row['user_id'],
+ $row['user_email'],
+ $user_email_hash
+ ));
+ }
+ }
+ }
+ $this->db->sql_freeresult($result);
+
+ $output->writeln('<info>Successfully recalculated all email hashes.</info>');
+ }
+}
diff --git a/phpBB/phpbb/content_visibility.php b/phpBB/phpbb/content_visibility.php
new file mode 100644
index 0000000000..f18ee0fd73
--- /dev/null
+++ b/phpBB/phpbb/content_visibility.php
@@ -0,0 +1,650 @@
+<?php
+/**
+*
+* @package phpbb
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb;
+
+/**
+* phpbb_visibility
+* Handle fetching and setting the visibility for topics and posts
+* @package phpbb
+*/
+class content_visibility
+{
+ /**
+ * Database object
+ * @var \phpbb\db\driver\driver
+ */
+ protected $db;
+
+ /**
+ * User object
+ * @var \phpbb\user
+ */
+ protected $user;
+
+ /**
+ * Auth object
+ * @var \phpbb\auth\auth
+ */
+ protected $auth;
+
+ /**
+ * phpBB root path
+ * @var string
+ */
+ protected $phpbb_root_path;
+
+ /**
+ * PHP Extension
+ * @var string
+ */
+ protected $php_ext;
+
+ /**
+ * Constructor
+ *
+ * @param \phpbb\auth\auth $auth Auth object
+ * @param \phpbb\db\driver\driver $db Database object
+ * @param \phpbb\user $user User object
+ * @param string $phpbb_root_path Root path
+ * @param string $php_ext PHP Extension
+ * @return null
+ */
+ public function __construct(\phpbb\auth\auth $auth, \phpbb\db\driver\driver $db, \phpbb\user $user, $phpbb_root_path, $php_ext, $forums_table, $posts_table, $topics_table, $users_table)
+ {
+ $this->auth = $auth;
+ $this->db = $db;
+ $this->user = $user;
+ $this->phpbb_root_path = $phpbb_root_path;
+ $this->php_ext = $php_ext;
+ $this->forums_table = $forums_table;
+ $this->posts_table = $posts_table;
+ $this->topics_table = $topics_table;
+ $this->users_table = $users_table;
+ }
+
+ /**
+ * Can the current logged-in user soft-delete posts?
+ *
+ * @param $forum_id int Forum ID whose permissions to check
+ * @param $poster_id int Poster ID of the post in question
+ * @param $post_locked bool Is the post locked?
+ * @return bool
+ */
+ public function can_soft_delete($forum_id, $poster_id, $post_locked)
+ {
+ if ($this->auth->acl_get('m_softdelete', $forum_id))
+ {
+ return true;
+ }
+ else if ($this->auth->acl_get('f_softdelete', $forum_id) && $poster_id == $this->user->data['user_id'] && !$post_locked)
+ {
+ return true;
+ }
+
+ return false;
+ }
+
+ /**
+ * Get the topics post count or the forums post/topic count based on permissions
+ *
+ * @param $mode string One of topic_posts, forum_posts or forum_topics
+ * @param $data array Array with the topic/forum data to calculate from
+ * @param $forum_id int The forum id is used for permission checks
+ * @return int Number of posts/topics the user can see in the topic/forum
+ */
+ public function get_count($mode, $data, $forum_id)
+ {
+ if (!$this->auth->acl_get('m_approve', $forum_id))
+ {
+ return (int) $data[$mode . '_approved'];
+ }
+
+ return (int) $data[$mode . '_approved'] + (int) $data[$mode . '_unapproved'] + (int) $data[$mode . '_softdeleted'];
+ }
+
+ /**
+ * Create topic/post visibility SQL for a given forum ID
+ *
+ * Note: Read permissions are not checked.
+ *
+ * @param $mode string Either "topic" or "post"
+ * @param $forum_id int The forum id is used for permission checks
+ * @param $table_alias string Table alias to prefix in SQL queries
+ * @return string The appropriate combination SQL logic for topic/post_visibility
+ */
+ public function get_visibility_sql($mode, $forum_id, $table_alias = '')
+ {
+ if ($this->auth->acl_get('m_approve', $forum_id))
+ {
+ return '1 = 1';
+ }
+
+ return $table_alias . $mode . '_visibility = ' . ITEM_APPROVED;
+ }
+
+ /**
+ * Create topic/post visibility SQL for a set of forums
+ *
+ * Note: Read permissions are not checked. Forums without read permissions
+ * should not be in $forum_ids
+ *
+ * @param $mode string Either "topic" or "post"
+ * @param $forum_ids array Array of forum ids which the posts/topics are limited to
+ * @param $table_alias string Table alias to prefix in SQL queries
+ * @return string The appropriate combination SQL logic for topic/post_visibility
+ */
+ public function get_forums_visibility_sql($mode, $forum_ids = array(), $table_alias = '')
+ {
+ $where_sql = '(';
+
+ $approve_forums = array_intersect($forum_ids, array_keys($this->auth->acl_getf('m_approve', true)));
+
+ if (sizeof($approve_forums))
+ {
+ // Remove moderator forums from the rest
+ $forum_ids = array_diff($forum_ids, $approve_forums);
+
+ if (!sizeof($forum_ids))
+ {
+ // The user can see all posts/topics in all specified forums
+ return $this->db->sql_in_set($table_alias . 'forum_id', $approve_forums);
+ }
+ else
+ {
+ // Moderator can view all posts/topics in some forums
+ $where_sql .= $this->db->sql_in_set($table_alias . 'forum_id', $approve_forums) . ' OR ';
+ }
+ }
+ else
+ {
+ // The user is just a normal user
+ return $table_alias . $mode . '_visibility = ' . ITEM_APPROVED . '
+ AND ' . $this->db->sql_in_set($table_alias . 'forum_id', $forum_ids, false, true);
+ }
+
+ $where_sql .= '(' . $table_alias . $mode . '_visibility = ' . ITEM_APPROVED . '
+ AND ' . $this->db->sql_in_set($table_alias . 'forum_id', $forum_ids) . '))';
+
+ return $where_sql;
+ }
+
+ /**
+ * Create topic/post visibility SQL for all forums on the board
+ *
+ * Note: Read permissions are not checked. Forums without read permissions
+ * should be in $exclude_forum_ids
+ *
+ * @param $mode string Either "topic" or "post"
+ * @param $exclude_forum_ids array Array of forum ids which are excluded
+ * @param $table_alias string Table alias to prefix in SQL queries
+ * @return string The appropriate combination SQL logic for topic/post_visibility
+ */
+ public function get_global_visibility_sql($mode, $exclude_forum_ids = array(), $table_alias = '')
+ {
+ $where_sqls = array();
+
+ $approve_forums = array_diff(array_keys($this->auth->acl_getf('m_approve', true)), $exclude_forum_ids);
+
+ if (sizeof($exclude_forum_ids))
+ {
+ $where_sqls[] = '(' . $this->db->sql_in_set($table_alias . 'forum_id', $exclude_forum_ids, true) . '
+ AND ' . $table_alias . $mode . '_visibility = ' . ITEM_APPROVED . ')';
+ }
+ else
+ {
+ $where_sqls[] = $table_alias . $mode . '_visibility = ' . ITEM_APPROVED;
+ }
+
+ if (sizeof($approve_forums))
+ {
+ $where_sqls[] = $this->db->sql_in_set($table_alias . 'forum_id', $approve_forums);
+ return '(' . implode(' OR ', $where_sqls) . ')';
+ }
+
+ // There is only one element, so we just return that one
+ return $where_sqls[0];
+ }
+
+ /**
+ * Change visibility status of one post or all posts of a topic
+ *
+ * @param $visibility int Element of {ITEM_APPROVED, ITEM_DELETED}
+ * @param $post_id mixed Post ID or array of post IDs to act on,
+ * if it is empty, all posts of topic_id will be modified
+ * @param $topic_id int Topic where $post_id is found
+ * @param $forum_id int Forum where $topic_id is found
+ * @param $user_id int User performing the action
+ * @param $time int Timestamp when the action is performed
+ * @param $reason string Reason why the visibilty was changed.
+ * @param $is_starter bool Is this the first post of the topic changed?
+ * @param $is_latest bool Is this the last post of the topic changed?
+ * @param $limit_visibility mixed Limit updating per topic_id to a certain visibility
+ * @param $limit_delete_time mixed Limit updating per topic_id to a certain deletion time
+ * @return array Changed post data, empty array if an error occured.
+ */
+ public function set_post_visibility($visibility, $post_id, $topic_id, $forum_id, $user_id, $time, $reason, $is_starter, $is_latest, $limit_visibility = false, $limit_delete_time = false)
+ {
+ if (!in_array($visibility, array(ITEM_APPROVED, ITEM_DELETED)))
+ {
+ return array();
+ }
+
+ if ($post_id)
+ {
+ if (is_array($post_id))
+ {
+ $where_sql = $this->db->sql_in_set('post_id', array_map('intval', $post_id));
+ }
+ else
+ {
+ $where_sql = 'post_id = ' . (int) $post_id;
+ }
+ $where_sql .= ' AND topic_id = ' . (int) $topic_id;
+ }
+ else
+ {
+ $where_sql = 'topic_id = ' . (int) $topic_id;
+
+ // Limit the posts to a certain visibility and deletion time
+ // This allows us to only restore posts, that were approved
+ // when the topic got soft deleted. So previous soft deleted
+ // and unapproved posts are still soft deleted/unapproved
+ if ($limit_visibility !== false)
+ {
+ $where_sql .= ' AND post_visibility = ' . (int) $limit_visibility;
+ }
+
+ if ($limit_delete_time !== false)
+ {
+ $where_sql .= ' AND post_delete_time = ' . (int) $limit_delete_time;
+ }
+ }
+
+ $sql = 'SELECT poster_id, post_id, post_postcount, post_visibility
+ FROM ' . $this->posts_table . '
+ WHERE ' . $where_sql;
+ $result = $this->db->sql_query($sql);
+
+ $post_ids = $poster_postcounts = $postcounts = $postcount_visibility = array();
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ $post_ids[] = (int) $row['post_id'];
+
+ if ($row['post_visibility'] != $visibility)
+ {
+ if ($row['post_postcount'] && !isset($poster_postcounts[(int) $row['poster_id']]))
+ {
+ $poster_postcounts[(int) $row['poster_id']] = 1;
+ }
+ else if ($row['post_postcount'])
+ {
+ $poster_postcounts[(int) $row['poster_id']]++;
+ }
+
+ if (!isset($postcount_visibility[$row['post_visibility']]))
+ {
+ $postcount_visibility[$row['post_visibility']] = 1;
+ }
+ else
+ {
+ $postcount_visibility[$row['post_visibility']]++;
+ }
+ }
+ }
+ $this->db->sql_freeresult($result);
+
+ if (empty($post_ids))
+ {
+ return array();
+ }
+
+ $data = array(
+ 'post_visibility' => (int) $visibility,
+ 'post_delete_user' => (int) $user_id,
+ 'post_delete_time' => ((int) $time) ?: time(),
+ 'post_delete_reason' => truncate_string($reason, 255, 255, false),
+ );
+
+ $sql = 'UPDATE ' . $this->posts_table . '
+ SET ' . $this->db->sql_build_array('UPDATE', $data) . '
+ WHERE ' . $this->db->sql_in_set('post_id', $post_ids);
+ $this->db->sql_query($sql);
+
+ // Group the authors by post count, to reduce the number of queries
+ foreach ($poster_postcounts as $poster_id => $num_posts)
+ {
+ $postcounts[$num_posts][] = $poster_id;
+ }
+
+ // Update users postcounts
+ foreach ($postcounts as $num_posts => $poster_ids)
+ {
+ if ($visibility == ITEM_DELETED)
+ {
+ $sql = 'UPDATE ' . $this->users_table . '
+ SET user_posts = 0
+ WHERE ' . $this->db->sql_in_set('user_id', $poster_ids) . '
+ AND user_posts < ' . $num_posts;
+ $this->db->sql_query($sql);
+
+ $sql = 'UPDATE ' . $this->users_table . '
+ SET user_posts = user_posts - ' . $num_posts . '
+ WHERE ' . $this->db->sql_in_set('user_id', $poster_ids) . '
+ AND user_posts >= ' . $num_posts;
+ $this->db->sql_query($sql);
+ }
+ else
+ {
+ $sql = 'UPDATE ' . $this->users_table . '
+ SET user_posts = user_posts + ' . $num_posts . '
+ WHERE ' . $this->db->sql_in_set('user_id', $poster_ids);
+ $this->db->sql_query($sql);
+ }
+ }
+
+ $update_topic_postcount = true;
+
+ // Sync the first/last topic information if needed
+ if (!$is_starter && $is_latest)
+ {
+ if (!function_exists('update_post_information'))
+ {
+ include($this->phpbb_root_path . 'includes/functions_posting.' . $this->php_ext);
+ }
+
+ // update_post_information can only update the last post info ...
+ if ($topic_id)
+ {
+ update_post_information('topic', $topic_id, false);
+ }
+ if ($forum_id)
+ {
+ update_post_information('forum', $forum_id, false);
+ }
+ }
+ else if ($is_starter && $topic_id)
+ {
+ if (!function_exists('sync'))
+ {
+ include($this->phpbb_root_path . 'includes/functions_admin.' . $this->php_ext);
+ }
+
+ // ... so we need to use sync, if the first post is changed.
+ // The forum is resynced recursive by sync() itself.
+ sync('topic', 'topic_id', $topic_id, true);
+
+ // sync recalculates the topic replies and forum posts by itself, so we don't do that.
+ $update_topic_postcount = false;
+ }
+
+ // Update the topic's reply count and the forum's post count
+ if ($update_topic_postcount)
+ {
+ $cur_posts = $cur_unapproved_posts = $cur_softdeleted_posts = 0;
+ foreach ($postcount_visibility as $post_visibility => $visibility_posts)
+ {
+ // We need to substract the posts from the counters ...
+ if ($post_visibility == ITEM_APPROVED)
+ {
+ $cur_posts += $visibility_posts;
+ }
+ else if ($post_visibility == ITEM_UNAPPROVED)
+ {
+ $cur_unapproved_posts += $visibility_posts;
+ }
+ else if ($post_visibility == ITEM_DELETED)
+ {
+ $cur_softdeleted_posts += $visibility_posts;
+ }
+ }
+
+ $sql_ary = array();
+ if ($visibility == ITEM_DELETED)
+ {
+ if ($cur_posts)
+ {
+ $sql_ary['posts_approved'] = ' - ' . $cur_posts;
+ }
+ if ($cur_unapproved_posts)
+ {
+ $sql_ary['posts_unapproved'] = ' - ' . $cur_unapproved_posts;
+ }
+ if ($cur_posts + $cur_unapproved_posts)
+ {
+ $sql_ary['posts_softdeleted'] = ' + ' . ($cur_posts + $cur_unapproved_posts);
+ }
+ }
+ else
+ {
+ if ($cur_unapproved_posts)
+ {
+ $sql_ary['posts_unapproved'] = ' - ' . $cur_unapproved_posts;
+ }
+ if ($cur_softdeleted_posts)
+ {
+ $sql_ary['posts_softdeleted'] = ' - ' . $cur_softdeleted_posts;
+ }
+ if ($cur_softdeleted_posts + $cur_unapproved_posts)
+ {
+ $sql_ary['posts_approved'] = ' + ' . ($cur_softdeleted_posts + $cur_unapproved_posts);
+ }
+ }
+
+ if (sizeof($sql_ary))
+ {
+ $topic_sql = $forum_sql = array();
+
+ foreach ($sql_ary as $field => $value_change)
+ {
+ $topic_sql[] = 'topic_' . $field . ' = topic_' . $field . $value_change;
+ $forum_sql[] = 'forum_' . $field . ' = forum_' . $field . $value_change;
+ }
+
+ // Update the number for replies and posts
+ $sql = 'UPDATE ' . $this->topics_table . '
+ SET ' . implode(', ', $topic_sql) . '
+ WHERE topic_id = ' . (int) $topic_id;
+ $this->db->sql_query($sql);
+
+ $sql = 'UPDATE ' . $this->forums_table . '
+ SET ' . implode(', ', $forum_sql) . '
+ WHERE forum_id = ' . (int) $forum_id;
+ $this->db->sql_query($sql);
+ }
+ }
+
+ return $data;
+ }
+
+ /**
+ * Set topic visibility
+ *
+ * Allows approving (which is akin to undeleting/restore) or soft deleting an entire topic.
+ * Calls set_post_visibility as needed.
+ *
+ * Note: By default, when a soft deleted topic is restored. Only posts that
+ * were approved at the time of soft deleting, are being restored.
+ * Same applies to soft deleting. Only approved posts will be marked
+ * as soft deleted.
+ * If you want to update all posts, use the force option.
+ *
+ * @param $visibility int Element of {ITEM_APPROVED, ITEM_DELETED}
+ * @param $topic_id mixed Topic ID to act on
+ * @param $forum_id int Forum where $topic_id is found
+ * @param $user_id int User performing the action
+ * @param $time int Timestamp when the action is performed
+ * @param $reason string Reason why the visibilty was changed.
+ * @param $force_update_all bool Force to update all posts within the topic
+ * @return array Changed topic data, empty array if an error occured.
+ */
+ public function set_topic_visibility($visibility, $topic_id, $forum_id, $user_id, $time, $reason, $force_update_all = false)
+ {
+ if (!in_array($visibility, array(ITEM_APPROVED, ITEM_DELETED)))
+ {
+ return array();
+ }
+
+ if (!$force_update_all)
+ {
+ $sql = 'SELECT topic_visibility, topic_delete_time
+ FROM ' . $this->topics_table . '
+ WHERE topic_id = ' . (int) $topic_id;
+ $result = $this->db->sql_query($sql);
+ $original_topic_data = $this->db->sql_fetchrow($result);
+ $this->db->sql_freeresult($result);
+
+ if (!$original_topic_data)
+ {
+ // The topic does not exist...
+ return array();
+ }
+ }
+
+ // Note, we do not set a reason for the posts, just for the topic
+ $data = array(
+ 'topic_visibility' => (int) $visibility,
+ 'topic_delete_user' => (int) $user_id,
+ 'topic_delete_time' => ((int) $time) ?: time(),
+ 'topic_delete_reason' => truncate_string($reason, 255, 255, false),
+ );
+
+ $sql = 'UPDATE ' . $this->topics_table . '
+ SET ' . $this->db->sql_build_array('UPDATE', $data) . '
+ WHERE topic_id = ' . (int) $topic_id;
+ $this->db->sql_query($sql);
+
+ if (!$this->db->sql_affectedrows())
+ {
+ return array();
+ }
+
+ if (!$force_update_all && $original_topic_data['topic_delete_time'] && $original_topic_data['topic_visibility'] == ITEM_DELETED && $visibility == ITEM_APPROVED)
+ {
+ // If we're restoring a topic we only restore posts, that were soft deleted through the topic soft deletion.
+ $this->set_post_visibility($visibility, false, $topic_id, $forum_id, $user_id, $time, '', true, true, $original_topic_data['topic_visibility'], $original_topic_data['topic_delete_time']);
+ }
+ else if (!$force_update_all && $original_topic_data['topic_visibility'] == ITEM_APPROVED && $visibility == ITEM_DELETED)
+ {
+ // If we're soft deleting a topic we only approved posts are soft deleted.
+ $this->set_post_visibility($visibility, false, $topic_id, $forum_id, $user_id, $time, '', true, true, $original_topic_data['topic_visibility']);
+ }
+ else
+ {
+ $this->set_post_visibility($visibility, false, $topic_id, $forum_id, $user_id, $time, '', true, true);
+ }
+
+ return $data;
+ }
+
+ /**
+ * Add post to topic and forum statistics
+ *
+ * @param $data array Contains information from the topics table about given topic
+ * @param $sql_data array Populated with the SQL changes, may be empty at call time
+ * @return null
+ */
+ public function add_post_to_statistic($data, &$sql_data)
+ {
+ $sql_data[$this->topics_table] = (($sql_data[$this->topics_table]) ? $sql_data[$this->topics_table] . ', ' : '') . 'topic_posts_approved = topic_posts_approved + 1';
+
+ $sql_data[$this->forums_table] = (($sql_data[$this->forums_table]) ? $sql_data[$this->forums_table] . ', ' : '') . 'forum_posts_approved = forum_posts_approved + 1';
+
+ if ($data['post_postcount'])
+ {
+ $sql_data[$this->users_table] = (($sql_data[$this->users_table]) ? $sql_data[$this->users_table] . ', ' : '') . 'user_posts = user_posts + 1';
+ }
+
+ set_config_count('num_posts', 1, true);
+ }
+
+ /**
+ * Remove post from topic and forum statistics
+ *
+ * @param $data array Contains information from the topics table about given topic
+ * @param $sql_data array Populated with the SQL changes, may be empty at call time
+ * @return null
+ */
+ public function remove_post_from_statistic($data, &$sql_data)
+ {
+ $sql_data[$this->topics_table] = ((!empty($sql_data[$this->topics_table])) ? $sql_data[$this->topics_table] . ', ' : '') . 'topic_posts_approved = topic_posts_approved - 1';
+ $sql_data[$this->forums_table] = ((!empty($sql_data[$this->forums_table])) ? $sql_data[$this->forums_table] . ', ' : '') . 'forum_posts_approved = forum_posts_approved - 1';
+
+ if ($data['post_postcount'])
+ {
+ $sql_data[$this->users_table] = ((!empty($sql_data[$this->users_table])) ? $sql_data[$this->users_table] . ', ' : '') . 'user_posts = user_posts - 1';
+ }
+
+ set_config_count('num_posts', -1, true);
+ }
+
+ /**
+ * Remove topic from forum statistics
+ *
+ * @param $topic_id int The topic to act on
+ * @param $forum_id int Forum where the topic is found
+ * @param $topic_row array Contains information from the topic, may be empty at call time
+ * @param $sql_data array Populated with the SQL changes, may be empty at call time
+ * @return null
+ */
+ public function remove_topic_from_statistic($topic_id, $forum_id, &$topic_row, &$sql_data)
+ {
+ // Do we need to grab some topic informations?
+ if (!sizeof($topic_row))
+ {
+ $sql = 'SELECT topic_type, topic_posts_approved, topic_posts_unapproved, topic_posts_softdeleted, topic_visibility
+ FROM ' . $this->topics_table . '
+ WHERE topic_id = ' . (int) $topic_id;
+ $result = $this->db->sql_query($sql);
+ $topic_row = $this->db->sql_fetchrow($result);
+ $this->db->sql_freeresult($result);
+ }
+
+ // If this is an edited topic or the first post the topic gets completely disapproved later on...
+ $sql_data[$this->forums_table] = (($sql_data[$this->forums_table]) ? $sql_data[$this->forums_table] . ', ' : '') . 'forum_topics_approved = forum_topics_approved - 1';
+ $sql_data[$this->forums_table] .= ', forum_posts_approved = forum_posts_approved - ' . $topic_row['topic_posts_approved'];
+ $sql_data[$this->forums_table] .= ', forum_posts_unapproved = forum_posts_unapproved - ' . $topic_row['topic_posts_unapproved'];
+ $sql_data[$this->forums_table] .= ', forum_posts_softdeleted = forum_posts_softdeleted - ' . $topic_row['topic_posts_softdeleted'];
+
+ set_config_count('num_topics', -1, true);
+ set_config_count('num_posts', $topic_row['topic_posts_approved'] * (-1), true);
+
+ // Get user post count information
+ $sql = 'SELECT poster_id, COUNT(post_id) AS num_posts
+ FROM ' . $this->posts_table . '
+ WHERE topic_id = ' . (int) $topic_id . '
+ AND post_postcount = 1
+ AND post_visibility = ' . ITEM_APPROVED . '
+ GROUP BY poster_id';
+ $result = $this->db->sql_query($sql);
+
+ $postcounts = array();
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ $postcounts[(int) $row['num_posts']][] = (int) $row['poster_id'];
+ }
+ $this->db->sql_freeresult($result);
+
+ // Decrement users post count
+ foreach ($postcounts as $num_posts => $poster_ids)
+ {
+ $sql = 'UPDATE ' . $this->users_table . '
+ SET user_posts = 0
+ WHERE user_posts < ' . $num_posts . '
+ AND ' . $this->db->sql_in_set('user_id', $poster_ids);
+ $this->db->sql_query($sql);
+
+ $sql = 'UPDATE ' . $this->users_table . '
+ SET user_posts = user_posts - ' . $num_posts . '
+ WHERE user_posts >= ' . $num_posts . '
+ AND ' . $this->db->sql_in_set('user_id', $poster_ids);
+ $this->db->sql_query($sql);
+ }
+ }
+}
diff --git a/phpBB/phpbb/controller/exception.php b/phpBB/phpbb/controller/exception.php
new file mode 100644
index 0000000000..06ece8d1d5
--- /dev/null
+++ b/phpBB/phpbb/controller/exception.php
@@ -0,0 +1,18 @@
+<?php
+/**
+*
+* @package controller
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\controller;
+
+/**
+* Controller exception class
+* @package phpBB3
+*/
+class exception extends \RuntimeException
+{
+}
diff --git a/phpBB/phpbb/controller/helper.php b/phpBB/phpbb/controller/helper.php
new file mode 100644
index 0000000000..54c30c93fc
--- /dev/null
+++ b/phpBB/phpbb/controller/helper.php
@@ -0,0 +1,149 @@
+<?php
+/**
+*
+* @package controller
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\controller;
+
+use Symfony\Component\HttpFoundation\Response;
+use Symfony\Component\Routing\Generator\UrlGenerator;
+use Symfony\Component\Routing\RequestContext;
+
+/**
+* Controller helper class, contains methods that do things for controllers
+* @package phpBB3
+*/
+class helper
+{
+ /**
+ * Template object
+ * @var \phpbb\template\template
+ */
+ protected $template;
+
+ /**
+ * User object
+ * @var \phpbb\user
+ */
+ protected $user;
+
+ /**
+ * config object
+ * @var \phpbb\config\config
+ */
+ protected $config;
+
+ /**
+ * phpBB root path
+ * @var string
+ */
+ protected $phpbb_root_path;
+
+ /**
+ * PHP extension
+ * @var string
+ */
+ protected $php_ext;
+
+ /**
+ * Constructor
+ *
+ * @param \phpbb\template\template $template Template object
+ * @param \phpbb\user $user User object
+ * @param \phpbb\config\config $config Config object
+ * @param \phpbb\controller\provider $provider Path provider
+ * @param string $phpbb_root_path phpBB root path
+ * @param string $php_ext PHP extension
+ */
+ public function __construct(\phpbb\template\template $template, \phpbb\user $user, \phpbb\config\config $config, \phpbb\controller\provider $provider, $phpbb_root_path, $php_ext)
+ {
+ $this->template = $template;
+ $this->user = $user;
+ $this->config = $config;
+ $this->phpbb_root_path = $phpbb_root_path;
+ $this->php_ext = $php_ext;
+ $this->route_collection = $provider->get_routes();
+ }
+
+ /**
+ * Automate setting up the page and creating the response object.
+ *
+ * @param string $handle The template handle to render
+ * @param string $page_title The title of the page to output
+ * @param int $status_code The status code to be sent to the page header
+ * @return Response object containing rendered page
+ */
+ public function render($template_file, $page_title = '', $status_code = 200, $display_online_list = false)
+ {
+ page_header($page_title, $display_online_list);
+
+ $this->template->set_filenames(array(
+ 'body' => $template_file,
+ ));
+
+ page_footer(true, false, false);
+
+ return new Response($this->template->assign_display('body'), $status_code);
+ }
+
+ /**
+ * Generate a URL to a route
+ *
+ * @param string $route Name of the route to travel
+ * @param array $params String or array of additional url parameters
+ * @param bool $is_amp Is url using &amp; (true) or & (false)
+ * @param string $session_id Possibility to use a custom session id instead of the global one
+ * @return string The URL already passed through append_sid()
+ */
+ public function route($route, array $params = array(), $is_amp = true, $session_id = false)
+ {
+ $anchor = '';
+ if (isset($params['#']))
+ {
+ $anchor = '#' . $params['#'];
+ unset($params['#']);
+ }
+ $url_generator = new UrlGenerator($this->route_collection, new RequestContext());
+ $route_url = $url_generator->generate($route, $params);
+
+ if (strpos($route_url, '/') === 0)
+ {
+ $route_url = substr($route_url, 1);
+ }
+
+ if ($is_amp)
+ {
+ $route_url = str_replace(array('&amp;', '&'), array('&', '&amp;'), $route_url);
+ }
+
+ // If enable_mod_rewrite is false, we need to include app.php
+ $route_prefix = $this->phpbb_root_path;
+ if (empty($this->config['enable_mod_rewrite']))
+ {
+ $route_prefix .= 'app.' . $this->php_ext . '/';
+ }
+
+ return append_sid($route_prefix . $route_url . $anchor, false, $is_amp, $session_id);
+ }
+
+ /**
+ * Output an error, effectively the same thing as trigger_error
+ *
+ * @param string $message The error message
+ * @param string $code The error code (e.g. 404, 500, 503, etc.)
+ * @return Response A Reponse instance
+ */
+ public function error($message, $code = 500)
+ {
+ $this->template->assign_vars(array(
+ 'MESSAGE_TEXT' => $message,
+ 'MESSAGE_TITLE' => $this->user->lang('INFORMATION'),
+ ));
+
+ return $this->render('message_body.html', $this->user->lang('INFORMATION'), $code);
+ }
+}
diff --git a/phpBB/phpbb/controller/provider.php b/phpBB/phpbb/controller/provider.php
new file mode 100644
index 0000000000..9df8130210
--- /dev/null
+++ b/phpBB/phpbb/controller/provider.php
@@ -0,0 +1,83 @@
+<?php
+/**
+*
+* @package controller
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\controller;
+
+use Symfony\Component\Routing\RouteCollection;
+use Symfony\Component\Routing\Loader\YamlFileLoader;
+use Symfony\Component\Config\FileLocator;
+
+/**
+* Controller interface
+* @package phpBB3
+*/
+class provider
+{
+ /**
+ * YAML file(s) containing route information
+ * @var array
+ */
+ protected $routing_files;
+
+ /**
+ * Collection of the routes in phpBB and all found extensions
+ * @var RouteCollection
+ */
+ protected $routes;
+
+ /**
+ * Construct method
+ *
+ * @param array() $routing_files Array of strings containing paths
+ * to YAML files holding route information
+ */
+ public function __construct(\phpbb\extension\finder $finder = null, $routing_files = array())
+ {
+ $this->routing_files = $routing_files;
+
+ if ($finder)
+ {
+ // We hardcode the path to the core config directory
+ // because the finder cannot find it
+ $this->routing_files = array_merge($this->routing_files, array('config/routing.yml'), array_keys($finder
+ ->directory('config')
+ ->suffix('routing.yml')
+ ->find()
+ ));
+ }
+ }
+
+ /**
+ * Find a list of controllers and return it
+ *
+ * @param string $base_path Base path to prepend to file paths
+ * @return null
+ */
+ public function find($base_path = '')
+ {
+ $this->routes = new RouteCollection;
+ foreach ($this->routing_files as $file_path)
+ {
+ $loader = new YamlFileLoader(new FileLocator($base_path));
+ $this->routes->addCollection($loader->load($file_path));
+ }
+
+ return $this;
+ }
+
+ /**
+ * Get the list of routes
+ *
+ * @return RouteCollection Get the route collection
+ */
+ public function get_routes()
+ {
+ return $this->routes;
+ }
+}
diff --git a/phpBB/phpbb/controller/resolver.php b/phpBB/phpbb/controller/resolver.php
new file mode 100644
index 0000000000..233179e343
--- /dev/null
+++ b/phpBB/phpbb/controller/resolver.php
@@ -0,0 +1,148 @@
+<?php
+/**
+*
+* @package controller
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\controller;
+
+use Symfony\Component\HttpKernel\Controller\ControllerResolverInterface;
+use Symfony\Component\DependencyInjection\ContainerInterface;
+use Symfony\Component\HttpFoundation\Request;
+
+/**
+* Controller manager class
+* @package phpBB3
+*/
+class resolver implements ControllerResolverInterface
+{
+ /**
+ * User object
+ * @var \phpbb\user
+ */
+ protected $user;
+
+ /**
+ * ContainerInterface object
+ * @var ContainerInterface
+ */
+ protected $container;
+
+ /**
+ * phpbb\template\template object
+ * @var phpbb\template\template
+ */
+ protected $template;
+
+ /**
+ * Construct method
+ *
+ * @param \phpbb\user $user User Object
+ * @param ContainerInterface $container ContainerInterface object
+ * @param \phpbb\template\template $template
+ */
+ public function __construct(\phpbb\user $user, ContainerInterface $container, \phpbb\template\template $template = null)
+ {
+ $this->user = $user;
+ $this->container = $container;
+ $this->template = $template;
+ }
+
+ /**
+ * Load a controller callable
+ *
+ * @param Symfony\Component\HttpFoundation\Request $request Symfony Request object
+ * @return bool|Callable Callable or false
+ * @throws \phpbb\controller\exception
+ */
+ public function getController(Request $request)
+ {
+ $controller = $request->attributes->get('_controller');
+
+ if (!$controller)
+ {
+ throw new \phpbb\controller\exception($this->user->lang['CONTROLLER_NOT_SPECIFIED']);
+ }
+
+ // Require a method name along with the service name
+ if (stripos($controller, ':') === false)
+ {
+ throw new \phpbb\controller\exception($this->user->lang['CONTROLLER_METHOD_NOT_SPECIFIED']);
+ }
+
+ list($service, $method) = explode(':', $controller);
+
+ if (!$this->container->has($service))
+ {
+ throw new \phpbb\controller\exception($this->user->lang('CONTROLLER_SERVICE_UNDEFINED', $service));
+ }
+
+ $controller_object = $this->container->get($service);
+
+ /*
+ * If this is an extension controller, we'll try to automatically set
+ * the style paths for the extension (the ext author can change them
+ * if necessary).
+ */
+ $controller_dir = explode('\\', get_class($controller_object));
+
+ // 0 vendor, 1 extension name, ...
+ if (!is_null($this->template) && isset($controller_dir[1]))
+ {
+ $controller_style_dir = 'ext/' . $controller_dir[0] . '/' . $controller_dir[1] . '/styles';
+
+ if (is_dir($controller_style_dir))
+ {
+ $this->template->set_style(array($controller_style_dir, 'styles'));
+ }
+ }
+
+ return array($controller_object, $method);
+ }
+
+ /**
+ * Dependencies should be specified in the service definition and can be
+ * then accessed in __construct(). Arguments are sent through the URL path
+ * and should match the parameters of the method you are using as your
+ * controller.
+ *
+ * @param Symfony\Component\HttpFoundation\Request $request Symfony Request object
+ * @param mixed $controller A callable (controller class, method)
+ * @return bool False
+ * @throws \phpbb\controller\exception
+ */
+ public function getArguments(Request $request, $controller)
+ {
+ // At this point, $controller contains the object and method name
+ list($object, $method) = $controller;
+ $mirror = new \ReflectionMethod($object, $method);
+
+ $arguments = array();
+ $parameters = $mirror->getParameters();
+ $attributes = $request->attributes->all();
+ foreach ($parameters as $param)
+ {
+ if (array_key_exists($param->name, $attributes))
+ {
+ $arguments[] = $attributes[$param->name];
+ }
+ else if ($param->getClass() && $param->getClass()->isInstance($request))
+ {
+ $arguments[] = $request;
+ }
+ else if ($param->isDefaultValueAvailable())
+ {
+ $arguments[] = $param->getDefaultValue();
+ }
+ else
+ {
+ throw new \phpbb\controller\exception($this->user->lang('CONTROLLER_ARGUMENT_VALUE_MISSING', $param->getPosition() + 1, get_class($object) . ':' . $method, $param->name));
+ }
+ }
+
+ return $arguments;
+ }
+}
diff --git a/phpBB/phpbb/cron/manager.php b/phpBB/phpbb/cron/manager.php
new file mode 100644
index 0000000000..b6af07aff7
--- /dev/null
+++ b/phpBB/phpbb/cron/manager.php
@@ -0,0 +1,132 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2010 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\cron;
+
+/**
+* Cron manager class.
+*
+* Finds installed cron tasks, stores task objects, provides task selection.
+*
+* @package phpBB3
+*/
+class manager
+{
+ /**
+ * Set of \phpbb\cron\task\wrapper objects.
+ * Array holding all tasks that have been found.
+ *
+ * @var array
+ */
+ protected $tasks = array();
+
+ protected $phpbb_root_path;
+ protected $php_ext;
+
+ /**
+ * Constructor. Loads all available tasks.
+ *
+ * @param array|Traversable $tasks Provides an iterable set of task names
+ */
+ public function __construct($tasks, $phpbb_root_path, $php_ext)
+ {
+ $this->phpbb_root_path = $phpbb_root_path;
+ $this->php_ext = $php_ext;
+
+ $this->load_tasks($tasks);
+ }
+
+ /**
+ * Loads tasks given by name, wraps them
+ * and puts them into $this->tasks.
+ *
+ * @param array|Traversable $tasks Array of instances of \phpbb\cron\task\task
+ *
+ * @return null
+ */
+ public function load_tasks($tasks)
+ {
+ foreach ($tasks as $task)
+ {
+ $this->tasks[] = $this->wrap_task($task);
+ }
+ }
+
+ /**
+ * Finds a task that is ready to run.
+ *
+ * If several tasks are ready, any one of them could be returned.
+ *
+ * If no tasks are ready, null is returned.
+ *
+ * @return \phpbb\cron\task\wrapper|null
+ */
+ public function find_one_ready_task()
+ {
+ foreach ($this->tasks as $task)
+ {
+ if ($task->is_ready())
+ {
+ return $task;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Finds all tasks that are ready to run.
+ *
+ * @return array List of tasks which are ready to run (wrapped in \phpbb\cron\task\wrapper).
+ */
+ public function find_all_ready_tasks()
+ {
+ $tasks = array();
+ foreach ($this->tasks as $task)
+ {
+ if ($task->is_ready())
+ {
+ $tasks[] = $task;
+ }
+ }
+ return $tasks;
+ }
+
+ /**
+ * Finds a task by name.
+ *
+ * If there is no task with the specified name, null is returned.
+ *
+ * Web runner uses this method to resolve names to tasks.
+ *
+ * @param string $name Name of the task to look up.
+ * @return \phpbb\cron\task\task A task corresponding to the given name, or null.
+ */
+ public function find_task($name)
+ {
+ foreach ($this->tasks as $task)
+ {
+ if ($task->get_name() == $name)
+ {
+ return $task;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Wraps a task inside an instance of \phpbb\cron\task\wrapper.
+ *
+ * @param \phpbb\cron\task\task $task The task.
+ * @return \phpbb\cron\task\wrapper The wrapped task.
+ */
+ public function wrap_task(\phpbb\cron\task\task $task)
+ {
+ return new \phpbb\cron\task\wrapper($task, $this->phpbb_root_path, $this->php_ext);
+ }
+}
diff --git a/phpBB/phpbb/cron/task/base.php b/phpBB/phpbb/cron/task/base.php
new file mode 100644
index 0000000000..63f0407bcd
--- /dev/null
+++ b/phpBB/phpbb/cron/task/base.php
@@ -0,0 +1,70 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2010 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\cron\task;
+
+/**
+* Cron task base class. Provides sensible defaults for cron tasks
+* and partially implements cron task interface, making writing cron tasks easier.
+*
+* At a minimum, subclasses must override the run() method.
+*
+* Cron tasks need not inherit from this base class. If desired,
+* they may implement cron task interface directly.
+*
+* @package phpBB3
+*/
+abstract class base implements \phpbb\cron\task\task
+{
+ private $name;
+
+ /**
+ * Returns the name of the task.
+ *
+ * @return string Name of wrapped task.
+ */
+ public function get_name()
+ {
+ return $this->name;
+ }
+
+ /**
+ * Sets the name of the task.
+ *
+ * @param string $name The task name
+ */
+ public function set_name($name)
+ {
+ $this->name = $name;
+ }
+
+ /**
+ * Returns whether this cron task can run, given current board configuration.
+ *
+ * For example, a cron task that prunes forums can only run when
+ * forum pruning is enabled.
+ *
+ * @return bool
+ */
+ public function is_runnable()
+ {
+ return true;
+ }
+
+ /**
+ * Returns whether this cron task should run now, because enough time
+ * has passed since it was last run.
+ *
+ * @return bool
+ */
+ public function should_run()
+ {
+ return true;
+ }
+}
diff --git a/phpBB/phpbb/cron/task/core/prune_all_forums.php b/phpBB/phpbb/cron/task/core/prune_all_forums.php
new file mode 100644
index 0000000000..90b9a5914b
--- /dev/null
+++ b/phpBB/phpbb/cron/task/core/prune_all_forums.php
@@ -0,0 +1,87 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2010 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\cron\task\core;
+
+/**
+* Prune all forums cron task.
+*
+* It is intended to be invoked from system cron.
+* This task will find all forums for which pruning is enabled, and will
+* prune all forums as necessary.
+*
+* @package phpBB3
+*/
+class prune_all_forums extends \phpbb\cron\task\base
+{
+ protected $phpbb_root_path;
+ protected $php_ext;
+ protected $config;
+ protected $db;
+
+ /**
+ * Constructor.
+ *
+ * @param string $phpbb_root_path The root path
+ * @param string $php_ext The PHP extension
+ * @param \phpbb\config\config $config The config
+ * @param \phpbb\db\driver\driver $db The db connection
+ */
+ public function __construct($phpbb_root_path, $php_ext, \phpbb\config\config $config, \phpbb\db\driver\driver $db)
+ {
+ $this->phpbb_root_path = $phpbb_root_path;
+ $this->php_ext = $php_ext;
+ $this->config = $config;
+ $this->db = $db;
+ }
+
+ /**
+ * Runs this cron task.
+ *
+ * @return null
+ */
+ public function run()
+ {
+ if (!function_exists('auto_prune'))
+ {
+ include($this->phpbb_root_path . 'includes/functions_admin.' . $this->php_ext);
+ }
+
+ $sql = 'SELECT forum_id, prune_next, enable_prune, prune_days, prune_viewed, forum_flags, prune_freq
+ FROM ' . FORUMS_TABLE . "
+ WHERE enable_prune = 1
+ AND prune_next < " . time();
+ $result = $this->db->sql_query($sql);
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ if ($row['prune_days'])
+ {
+ auto_prune($row['forum_id'], 'posted', $row['forum_flags'], $row['prune_days'], $row['prune_freq']);
+ }
+
+ if ($row['prune_viewed'])
+ {
+ auto_prune($row['forum_id'], 'viewed', $row['forum_flags'], $row['prune_viewed'], $row['prune_freq']);
+ }
+ }
+ $this->db->sql_freeresult($result);
+ }
+
+ /**
+ * Returns whether this cron task can run, given current board configuration.
+ *
+ * This cron task will only run when system cron is utilised.
+ *
+ * @return bool
+ */
+ public function is_runnable()
+ {
+ return (bool) $this->config['use_system_cron'];
+ }
+}
diff --git a/phpBB/phpbb/cron/task/core/prune_forum.php b/phpBB/phpbb/cron/task/core/prune_forum.php
new file mode 100644
index 0000000000..e0d8b067c5
--- /dev/null
+++ b/phpBB/phpbb/cron/task/core/prune_forum.php
@@ -0,0 +1,157 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2010 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\cron\task\core;
+
+/**
+* Prune one forum cron task.
+*
+* It is intended to be used when cron is invoked via web.
+* This task can decide whether it should be run using data obtained by viewforum
+* code, without making additional database queries.
+*
+* @package phpBB3
+*/
+class prune_forum extends \phpbb\cron\task\base implements \phpbb\cron\task\parametrized
+{
+ protected $phpbb_root_path;
+ protected $php_ext;
+ protected $config;
+ protected $db;
+
+ /**
+ * If $forum_data is given, it is assumed to contain necessary information
+ * about a single forum that is to be pruned.
+ *
+ * If $forum_data is not given, forum id will be retrieved via request_var
+ * and a database query will be performed to load the necessary information
+ * about the forum.
+ */
+ protected $forum_data;
+
+ /**
+ * Constructor.
+ *
+ * @param string $phpbb_root_path The root path
+ * @param string $php_ext The PHP extension
+ * @param \phpbb\config\config $config The config
+ * @param \phpbb\db\driver\driver $db The db connection
+ */
+ public function __construct($phpbb_root_path, $php_ext, \phpbb\config\config $config, \phpbb\db\driver\driver $db)
+ {
+ $this->phpbb_root_path = $phpbb_root_path;
+ $this->php_ext = $php_ext;
+ $this->config = $config;
+ $this->db = $db;
+ }
+
+ /**
+ * Manually set forum data.
+ *
+ * @param array $forum_data Information about a forum to be pruned.
+ */
+ public function set_forum_data($forum_data)
+ {
+ $this->forum_data = $forum_data;
+ }
+
+ /**
+ * Runs this cron task.
+ *
+ * @return null
+ */
+ public function run()
+ {
+ if (!function_exists('auto_prune'))
+ {
+ include($this->phpbb_root_path . 'includes/functions_admin.' . $this->php_ext);
+ }
+
+ if ($this->forum_data['prune_days'])
+ {
+ auto_prune($this->forum_data['forum_id'], 'posted', $this->forum_data['forum_flags'], $this->forum_data['prune_days'], $this->forum_data['prune_freq']);
+ }
+
+ if ($this->forum_data['prune_viewed'])
+ {
+ auto_prune($this->forum_data['forum_id'], 'viewed', $this->forum_data['forum_flags'], $this->forum_data['prune_viewed'], $this->forum_data['prune_freq']);
+ }
+ }
+
+ /**
+ * Returns whether this cron task can run, given current board configuration.
+ *
+ * This cron task will not run when system cron is utilised, as in
+ * such cases prune_all_forums task would run instead.
+ *
+ * Additionally, this task must be given the forum data, either via
+ * the constructor or parse_parameters method.
+ *
+ * @return bool
+ */
+ public function is_runnable()
+ {
+ return !$this->config['use_system_cron'] && $this->forum_data;
+ }
+
+ /**
+ * Returns whether this cron task should run now, because enough time
+ * has passed since it was last run.
+ *
+ * Forum pruning interval is specified in the forum data.
+ *
+ * @return bool
+ */
+ public function should_run()
+ {
+ return $this->forum_data['enable_prune'] && $this->forum_data['prune_next'] < time();
+ }
+
+ /**
+ * Returns parameters of this cron task as an array.
+ * The array has one key, f, whose value is id of the forum to be pruned.
+ *
+ * @return array
+ */
+ public function get_parameters()
+ {
+ return array('f' => $this->forum_data['forum_id']);
+ }
+
+ /**
+ * Parses parameters found in $request, which is an instance of
+ * \phpbb\request\request_interface.
+ *
+ * It is expected to have a key f whose value is id of the forum to be pruned.
+ *
+ * @param \phpbb\request\request_interface $request Request object.
+ *
+ * @return null
+ */
+ public function parse_parameters(\phpbb\request\request_interface $request)
+ {
+ $this->forum_data = null;
+ if ($request->is_set('f'))
+ {
+ $forum_id = $request->variable('f', 0);
+
+ $sql = 'SELECT forum_id, prune_next, enable_prune, prune_days, prune_viewed, forum_flags, prune_freq
+ FROM ' . FORUMS_TABLE . "
+ WHERE forum_id = $forum_id";
+ $result = $this->db->sql_query($sql);
+ $row = $this->db->sql_fetchrow($result);
+ $this->db->sql_freeresult($result);
+
+ if ($row)
+ {
+ $this->forum_data = $row;
+ }
+ }
+ }
+}
diff --git a/phpBB/phpbb/cron/task/core/prune_notifications.php b/phpBB/phpbb/cron/task/core/prune_notifications.php
new file mode 100644
index 0000000000..9f67c54e1c
--- /dev/null
+++ b/phpBB/phpbb/cron/task/core/prune_notifications.php
@@ -0,0 +1,59 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\cron\task\core;
+
+/**
+* Prune notifications cron task.
+*
+* @package phpBB3
+*/
+class prune_notifications extends \phpbb\cron\task\base
+{
+ protected $config;
+ protected $notification_manager;
+
+ /**
+ * Constructor.
+ *
+ * @param \phpbb\config\config $config The config
+ * @param \phpbb\notification\manager $notification_manager Notification manager
+ */
+ public function __construct(\phpbb\config\config $config, \phpbb\notification\manager $notification_manager)
+ {
+ $this->config = $config;
+ $this->notification_manager = $notification_manager;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function run()
+ {
+ // time minus expire days in seconds
+ $timestamp = time() - ($this->config['read_notification_expire_days'] * 60 * 60 * 24);
+ $this->notification_manager->prune_notifications($timestamp);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function is_runnable()
+ {
+ return (bool) $this->config['read_notification_expire_days'];
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function should_run()
+ {
+ return $this->config['read_notification_last_gc'] < time() - $this->config['read_notification_gc'];
+ }
+}
diff --git a/phpBB/phpbb/cron/task/core/queue.php b/phpBB/phpbb/cron/task/core/queue.php
new file mode 100644
index 0000000000..cd799b8024
--- /dev/null
+++ b/phpBB/phpbb/cron/task/core/queue.php
@@ -0,0 +1,76 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2010 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\cron\task\core;
+
+/**
+* Queue cron task. Sends email and jabber messages queued by other scripts.
+*
+* @package phpBB3
+*/
+class queue extends \phpbb\cron\task\base
+{
+ protected $phpbb_root_path;
+ protected $php_ext;
+ protected $config;
+
+ /**
+ * Constructor.
+ *
+ * @param string $phpbb_root_path The root path
+ * @param string $php_ext The PHP extension
+ * @param \phpbb\config\config $config The config
+ */
+ public function __construct($phpbb_root_path, $php_ext, \phpbb\config\config $config)
+ {
+ $this->phpbb_root_path = $phpbb_root_path;
+ $this->php_ext = $php_ext;
+ $this->config = $config;
+ }
+
+ /**
+ * Runs this cron task.
+ *
+ * @return null
+ */
+ public function run()
+ {
+ if (!class_exists('queue'))
+ {
+ include($this->phpbb_root_path . 'includes/functions_messenger.' . $this->php_ext);
+ }
+ $queue = new \queue();
+ $queue->process();
+ }
+
+ /**
+ * Returns whether this cron task can run, given current board configuration.
+ *
+ * Queue task is only run if the email queue (file) exists.
+ *
+ * @return bool
+ */
+ public function is_runnable()
+ {
+ return file_exists($this->phpbb_root_path . 'cache/queue.' . $this->php_ext);
+ }
+
+ /**
+ * Returns whether this cron task should run now, because enough time
+ * has passed since it was last run.
+ *
+ * The interval between queue runs is specified in board configuration.
+ *
+ * @return bool
+ */
+ public function should_run()
+ {
+ return $this->config['last_queue_run'] < time() - $this->config['queue_interval_config'];
+ }
+}
diff --git a/phpBB/phpbb/cron/task/core/tidy_cache.php b/phpBB/phpbb/cron/task/core/tidy_cache.php
new file mode 100644
index 0000000000..a94a85db53
--- /dev/null
+++ b/phpBB/phpbb/cron/task/core/tidy_cache.php
@@ -0,0 +1,70 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2010 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\cron\task\core;
+
+/**
+* Tidy cache cron task.
+*
+* @package phpBB3
+*/
+class tidy_cache extends \phpbb\cron\task\base
+{
+ protected $config;
+ protected $cache;
+
+ /**
+ * Constructor.
+ *
+ * @param \phpbb\config\config $config The config
+ * @param \phpbb\cache\driver\driver_interface $cache The cache driver
+ */
+ public function __construct(\phpbb\config\config $config, \phpbb\cache\driver\driver_interface $cache)
+ {
+ $this->config = $config;
+ $this->cache = $cache;
+ }
+
+ /**
+ * Runs this cron task.
+ *
+ * @return null
+ */
+ public function run()
+ {
+ $this->cache->tidy();
+ }
+
+ /**
+ * Returns whether this cron task can run, given current board configuration.
+ *
+ * Tidy cache cron task runs if the cache implementation in use
+ * supports tidying.
+ *
+ * @return bool
+ */
+ public function is_runnable()
+ {
+ return true;
+ }
+
+ /**
+ * Returns whether this cron task should run now, because enough time
+ * has passed since it was last run.
+ *
+ * The interval between cache tidying is specified in board
+ * configuration.
+ *
+ * @return bool
+ */
+ public function should_run()
+ {
+ return $this->config['cache_last_gc'] < time() - $this->config['cache_gc'];
+ }
+}
diff --git a/phpBB/phpbb/cron/task/core/tidy_database.php b/phpBB/phpbb/cron/task/core/tidy_database.php
new file mode 100644
index 0000000000..f712a5047c
--- /dev/null
+++ b/phpBB/phpbb/cron/task/core/tidy_database.php
@@ -0,0 +1,64 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2010 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\cron\task\core;
+
+/**
+* Tidy database cron task.
+*
+* @package phpBB3
+*/
+class tidy_database extends \phpbb\cron\task\base
+{
+ protected $phpbb_root_path;
+ protected $php_ext;
+ protected $config;
+
+ /**
+ * Constructor.
+ *
+ * @param string $phpbb_root_path The root path
+ * @param string $php_ext The PHP extension
+ * @param \phpbb\config\config $config The config
+ */
+ public function __construct($phpbb_root_path, $php_ext, \phpbb\config\config $config)
+ {
+ $this->phpbb_root_path = $phpbb_root_path;
+ $this->php_ext = $php_ext;
+ $this->config = $config;
+ }
+
+ /**
+ * Runs this cron task.
+ *
+ * @return null
+ */
+ public function run()
+ {
+ if (!function_exists('tidy_database'))
+ {
+ include($this->phpbb_root_path . 'includes/functions_admin.' . $this->php_ext);
+ }
+ tidy_database();
+ }
+
+ /**
+ * Returns whether this cron task should run now, because enough time
+ * has passed since it was last run.
+ *
+ * The interval between database tidying is specified in board
+ * configuration.
+ *
+ * @return bool
+ */
+ public function should_run()
+ {
+ return $this->config['database_last_gc'] < time() - $this->config['database_gc'];
+ }
+}
diff --git a/phpBB/phpbb/cron/task/core/tidy_plupload.php b/phpBB/phpbb/cron/task/core/tidy_plupload.php
new file mode 100644
index 0000000000..5a98e0bd7b
--- /dev/null
+++ b/phpBB/phpbb/cron/task/core/tidy_plupload.php
@@ -0,0 +1,116 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\cron\task\core;
+
+/**
+* Cron task for cleaning plupload's temporary upload directory.
+*
+* @package phpBB3
+*/
+class tidy_plupload extends \phpbb\cron\task\base
+{
+ /**
+ * How old a file must be (in seconds) before it is deleted.
+ * @var int
+ */
+ protected $max_file_age = 86400;
+
+ /**
+ * How often we run the cron (in seconds).
+ * @var int
+ */
+ protected $cron_frequency = 86400;
+
+ /**
+ * phpBB root path
+ * @var string
+ */
+ protected $phpbb_root_path;
+
+ /**
+ * Config object
+ * @var \phpbb\config\config
+ */
+ protected $config;
+
+ /**
+ * Directory where plupload stores temporary files.
+ * @var string
+ */
+ protected $plupload_upload_path;
+
+ /**
+ * Constructor.
+ *
+ * @param string $phpbb_root_path The root path
+ * @param \phpbb\config\config $config The config
+ */
+ public function __construct($phpbb_root_path, \phpbb\config\config $config)
+ {
+ $this->phpbb_root_path = $phpbb_root_path;
+ $this->config = $config;
+
+ $this->plupload_upload_path = $this->phpbb_root_path . $this->config['upload_path'] . '/plupload';
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function run()
+ {
+ // Remove old temporary file (perhaps failed uploads?)
+ $last_valid_timestamp = time() - $this->max_file_age;
+ try
+ {
+ $iterator = new \DirectoryIterator($this->plupload_upload_path);
+ foreach ($iterator as $file)
+ {
+ if (strpos($file->getBasename(), $this->config['plupload_salt']) !== 0)
+ {
+ // Skip over any non-plupload files.
+ continue;
+ }
+
+ if ($file->getMTime() < $last_valid_timestamp)
+ {
+ @unlink($file->getPathname());
+ }
+ }
+ }
+ catch (\UnexpectedValueException $e)
+ {
+ add_log(
+ 'critical',
+ 'LOG_PLUPLOAD_TIDY_FAILED',
+ $this->plupload_upload_path,
+ $e->getMessage(),
+ $e->getTraceAsString()
+ );
+ }
+
+ $this->config->set('plupload_last_gc', time(), true);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function is_runnable()
+ {
+ return !empty($this->config['plupload_salt']) && is_dir($this->plupload_upload_path);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function should_run()
+ {
+ return $this->config['plupload_last_gc'] < time() - $this->cron_frequency;
+ }
+}
diff --git a/phpBB/phpbb/cron/task/core/tidy_search.php b/phpBB/phpbb/cron/task/core/tidy_search.php
new file mode 100644
index 0000000000..42f7df308f
--- /dev/null
+++ b/phpBB/phpbb/cron/task/core/tidy_search.php
@@ -0,0 +1,98 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2010 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\cron\task\core;
+
+/**
+* Tidy search cron task.
+*
+* Will only run when the currently selected search backend supports tidying.
+*
+* @package phpBB3
+*/
+class tidy_search extends \phpbb\cron\task\base
+{
+ protected $phpbb_root_path;
+ protected $php_ext;
+ protected $auth;
+ protected $config;
+ protected $db;
+ protected $user;
+
+ /**
+ * Constructor.
+ *
+ * @param string $phpbb_root_path The root path
+ * @param string $php_ext The PHP extension
+ * @param \phpbb\auth\auth $auth The auth
+ * @param \phpbb\config\config $config The config
+ * @param \phpbb\db\driver\driver $db The db connection
+ * @param \phpbb\user $user The user
+ */
+ public function __construct($phpbb_root_path, $php_ext, \phpbb\auth\auth $auth, \phpbb\config\config $config, \phpbb\db\driver\driver $db, \phpbb\user $user)
+ {
+ $this->phpbb_root_path = $phpbb_root_path;
+ $this->php_ext = $php_ext;
+ $this->auth = $auth;
+ $this->config = $config;
+ $this->db = $db;
+ $this->user = $user;
+ }
+
+ /**
+ * Runs this cron task.
+ *
+ * @return null
+ */
+ public function run()
+ {
+ // Select the search method
+ $search_type = basename($this->config['search_type']);
+
+ // We do some additional checks in the module to ensure it can actually be utilised
+ $error = false;
+ $search = new $search_type($error, $this->phpbb_root_path, $this->php_ext, $this->auth, $this->config, $this->db, $this->user);
+
+ if (!$error)
+ {
+ $search->tidy();
+ }
+ }
+
+ /**
+ * Returns whether this cron task can run, given current board configuration.
+ *
+ * Search cron task is runnable in all normal use. It may not be
+ * runnable if the search backend implementation selected in board
+ * configuration does not exist.
+ *
+ * @return bool
+ */
+ public function is_runnable()
+ {
+ // Select the search method
+ $search_type = basename($this->config['search_type']);
+
+ return class_exists($search_type);
+ }
+
+ /**
+ * Returns whether this cron task should run now, because enough time
+ * has passed since it was last run.
+ *
+ * The interval between search tidying is specified in board
+ * configuration.
+ *
+ * @return bool
+ */
+ public function should_run()
+ {
+ return $this->config['search_last_gc'] < time() - $this->config['search_gc'];
+ }
+}
diff --git a/phpBB/phpbb/cron/task/core/tidy_sessions.php b/phpBB/phpbb/cron/task/core/tidy_sessions.php
new file mode 100644
index 0000000000..68094af1f7
--- /dev/null
+++ b/phpBB/phpbb/cron/task/core/tidy_sessions.php
@@ -0,0 +1,57 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2010 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\cron\task\core;
+
+/**
+* Tidy sessions cron task.
+*
+* @package phpBB3
+*/
+class tidy_sessions extends \phpbb\cron\task\base
+{
+ protected $config;
+ protected $user;
+
+ /**
+ * Constructor.
+ *
+ * @param \phpbb\config\config $config The config
+ * @param \phpbb\user $user The user
+ */
+ public function __construct(\phpbb\config\config $config, \phpbb\user $user)
+ {
+ $this->config = $config;
+ $this->user = $user;
+ }
+
+ /**
+ * Runs this cron task.
+ *
+ * @return null
+ */
+ public function run()
+ {
+ $this->user->session_gc();
+ }
+
+ /**
+ * Returns whether this cron task should run now, because enough time
+ * has passed since it was last run.
+ *
+ * The interval between session tidying is specified in board
+ * configuration.
+ *
+ * @return bool
+ */
+ public function should_run()
+ {
+ return $this->config['session_last_gc'] < time() - $this->config['session_gc'];
+ }
+}
diff --git a/phpBB/phpbb/cron/task/core/tidy_warnings.php b/phpBB/phpbb/cron/task/core/tidy_warnings.php
new file mode 100644
index 0000000000..a0ff23fc57
--- /dev/null
+++ b/phpBB/phpbb/cron/task/core/tidy_warnings.php
@@ -0,0 +1,78 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2010 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\cron\task\core;
+
+/**
+* Tidy warnings cron task.
+*
+* Will only run when warnings are configured to expire.
+*
+* @package phpBB3
+*/
+class tidy_warnings extends \phpbb\cron\task\base
+{
+ protected $phpbb_root_path;
+ protected $php_ext;
+ protected $config;
+
+ /**
+ * Constructor.
+ *
+ * @param string $phpbb_root_path The root path
+ * @param string $php_ext The PHP extension
+ * @param \phpbb\config\config $config The config
+ */
+ public function __construct($phpbb_root_path, $php_ext, \phpbb\config\config $config)
+ {
+ $this->phpbb_root_path = $phpbb_root_path;
+ $this->php_ext = $php_ext;
+ $this->config = $config;
+ }
+
+ /**
+ * Runs this cron task.
+ *
+ * @return null
+ */
+ public function run()
+ {
+ if (!function_exists('tidy_warnings'))
+ {
+ include($this->phpbb_root_path . 'includes/functions_admin.' . $this->php_ext);
+ }
+ tidy_warnings();
+ }
+
+ /**
+ * Returns whether this cron task can run, given current board configuration.
+ *
+ * If warnings are set to never expire, this cron task will not run.
+ *
+ * @return bool
+ */
+ public function is_runnable()
+ {
+ return (bool) $this->config['warnings_expire_days'];
+ }
+
+ /**
+ * Returns whether this cron task should run now, because enough time
+ * has passed since it was last run.
+ *
+ * The interval between warnings tidying is specified in board
+ * configuration.
+ *
+ * @return bool
+ */
+ public function should_run()
+ {
+ return $this->config['warnings_last_gc'] < time() - $this->config['warnings_gc'];
+ }
+}
diff --git a/phpBB/phpbb/cron/task/parametrized.php b/phpBB/phpbb/cron/task/parametrized.php
new file mode 100644
index 0000000000..1aeead0399
--- /dev/null
+++ b/phpBB/phpbb/cron/task/parametrized.php
@@ -0,0 +1,46 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2010 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\cron\task;
+
+/**
+* Parametrized cron task interface.
+*
+* Parametrized cron tasks are somewhat of a cross between regular cron tasks and
+* delayed jobs. Whereas regular cron tasks perform some action globally,
+* parametrized cron tasks perform actions on a particular object (or objects).
+* Parametrized cron tasks do not make sense and are not usable without
+* specifying these objects.
+*
+* @package phpBB3
+*/
+interface parametrized extends \phpbb\cron\task\task
+{
+ /**
+ * Returns parameters of this cron task as an array.
+ *
+ * The array must map string keys to string values.
+ *
+ * @return array
+ */
+ public function get_parameters();
+
+ /**
+ * Parses parameters found in $request, which is an instance of
+ * \phpbb\request\request_interface.
+ *
+ * $request contains user input and must not be trusted.
+ * Cron task must validate all data before using it.
+ *
+ * @param \phpbb\request\request_interface $request Request object.
+ *
+ * @return null
+ */
+ public function parse_parameters(\phpbb\request\request_interface $request);
+}
diff --git a/phpBB/phpbb/cron/task/task.php b/phpBB/phpbb/cron/task/task.php
new file mode 100644
index 0000000000..3ce3de9598
--- /dev/null
+++ b/phpBB/phpbb/cron/task/task.php
@@ -0,0 +1,49 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2010 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\cron\task;
+
+/**
+* Cron task interface
+* @package phpBB3
+*/
+interface task
+{
+ /**
+ * Returns the name of the task.
+ *
+ * @return string Name of wrapped task.
+ */
+ public function get_name();
+
+ /**
+ * Runs this cron task.
+ *
+ * @return null
+ */
+ public function run();
+
+ /**
+ * Returns whether this cron task can run, given current board configuration.
+ *
+ * For example, a cron task that prunes forums can only run when
+ * forum pruning is enabled.
+ *
+ * @return bool
+ */
+ public function is_runnable();
+
+ /**
+ * Returns whether this cron task should run now, because enough time
+ * has passed since it was last run.
+ *
+ * @return bool
+ */
+ public function should_run();
+}
diff --git a/phpBB/phpbb/cron/task/wrapper.php b/phpBB/phpbb/cron/task/wrapper.php
new file mode 100644
index 0000000000..fc3f897206
--- /dev/null
+++ b/phpBB/phpbb/cron/task/wrapper.php
@@ -0,0 +1,102 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2010 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\cron\task;
+
+/**
+* Cron task wrapper class.
+* Enhances cron tasks with convenience methods that work identically for all tasks.
+*
+* @package phpBB3
+*/
+class wrapper
+{
+ protected $task;
+ protected $phpbb_root_path;
+ protected $php_ext;
+
+ /**
+ * Constructor.
+ *
+ * Wraps a task $task, which must implement cron_task interface.
+ *
+ * @param \phpbb\cron\task\task $task The cron task to wrap.
+ */
+ public function __construct(\phpbb\cron\task\task $task, $phpbb_root_path, $php_ext)
+ {
+ $this->task = $task;
+ $this->phpbb_root_path = $phpbb_root_path;
+ $this->php_ext = $php_ext;
+ }
+
+ /**
+ * Returns whether the wrapped task is parametrised.
+ *
+ * Parametrized tasks accept parameters during initialization and must
+ * normally be scheduled with parameters.
+ *
+ * @return bool Whether or not this task is parametrized.
+ */
+ public function is_parametrized()
+ {
+ return $this->task instanceof \phpbb\cron\task\parametrized;
+ }
+
+ /**
+ * Returns whether the wrapped task is ready to run.
+ *
+ * A task is ready to run when it is runnable according to current configuration
+ * and enough time has passed since it was last run.
+ *
+ * @return bool Whether the wrapped task is ready to run.
+ */
+ public function is_ready()
+ {
+ return $this->task->is_runnable() && $this->task->should_run();
+ }
+
+ /**
+ * Returns a url through which this task may be invoked via web.
+ *
+ * When system cron is not in use, running a cron task is accomplished
+ * by outputting an image with the url returned by this function as
+ * source.
+ *
+ * @return string URL through which this task may be invoked.
+ */
+ public function get_url()
+ {
+ $name = $this->get_name();
+ if ($this->is_parametrized())
+ {
+ $params = $this->task->get_parameters();
+ $extra = '';
+ foreach ($params as $key => $value)
+ {
+ $extra .= '&amp;' . $key . '=' . urlencode($value);
+ }
+ }
+ else
+ {
+ $extra = '';
+ }
+ $url = append_sid($this->phpbb_root_path . 'cron.' . $this->php_ext, 'cron_type=' . $name . $extra);
+ return $url;
+ }
+
+ /**
+ * Forwards all other method calls to the wrapped task implementation.
+ *
+ * @return mixed
+ */
+ public function __call($name, $args)
+ {
+ return call_user_func_array(array($this->task, $name), $args);
+ }
+}
diff --git a/phpBB/phpbb/datetime.php b/phpBB/phpbb/datetime.php
new file mode 100644
index 0000000000..dfa21976e0
--- /dev/null
+++ b/phpBB/phpbb/datetime.php
@@ -0,0 +1,160 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*/
+
+namespace phpbb;
+
+/**
+* phpBB custom extensions to the PHP DateTime class
+* This handles the relative formats phpBB employs
+*/
+class datetime extends \DateTime
+{
+ /**
+ * String used to wrap the date segment which should be replaced by today/tomorrow/yesterday
+ */
+ const RELATIVE_WRAPPER = '|';
+
+ /**
+ * @var user User who is the context for this DateTime instance
+ */
+ protected $user;
+
+ /**
+ * @var array Date formats are preprocessed by phpBB, to save constant recalculation they are cached.
+ */
+ static protected $format_cache = array();
+
+ /**
+ * Constructs a new instance of \phpbb\datetime, expanded to include an argument to inject
+ * the user context and modify the timezone to the users selected timezone if one is not set.
+ *
+ * @param string $time String in a format accepted by strtotime().
+ * @param DateTimeZone $timezone Time zone of the time.
+ * @param user User object for context.
+ */
+ public function __construct($user, $time = 'now', \DateTimeZone $timezone = null)
+ {
+ $this->user = $user;
+ $timezone = $timezone ?: $this->user->timezone;
+
+ parent::__construct($time, $timezone);
+ }
+
+ /**
+ * Formats the current date time into the specified format
+ *
+ * @param string $format Optional format to use for output, defaults to users chosen format
+ * @param boolean $force_absolute Force output of a non relative date
+ * @return string Formatted date time
+ */
+ public function format($format = '', $force_absolute = false)
+ {
+ $format = $format ? $format : $this->user->date_format;
+ $format = self::format_cache($format, $this->user);
+ $relative = ($format['is_short'] && !$force_absolute);
+ $now = new self($this->user, 'now', $this->user->timezone);
+
+ $timestamp = $this->getTimestamp();
+ $now_ts = $now->getTimeStamp();
+
+ $delta = $now_ts - $timestamp;
+
+ if ($relative)
+ {
+ /*
+ * Check the delta is less than or equal to 1 hour
+ * and the delta not more than a minute in the past
+ * and the delta is either greater than -5 seconds or timestamp
+ * and current time are of the same minute (they must be in the same hour already)
+ * finally check that relative dates are supported by the language pack
+ */
+ if ($delta <= 3600 && $delta > -60 &&
+ ($delta >= -5 || (($now_ts / 60) % 60) == (($timestamp / 60) % 60))
+ && isset($this->user->lang['datetime']['AGO']))
+ {
+ return $this->user->lang(array('datetime', 'AGO'), max(0, (int) floor($delta / 60)));
+ }
+ else
+ {
+ $midnight = clone $now;
+ $midnight->setTime(0, 0, 0);
+
+ $midnight = $midnight->getTimestamp();
+
+ $day = false;
+
+ if ($timestamp > $midnight + 86400)
+ {
+ $day = 'TOMORROW';
+ }
+ else if ($timestamp > $midnight)
+ {
+ $day = 'TODAY';
+ }
+ else if ($timestamp > $midnight - 86400)
+ {
+ $day = 'YESTERDAY';
+ }
+
+ if ($day !== false)
+ {
+ // Format using the short formatting and finally swap out the relative token placeholder with the correct value
+ return str_replace(self::RELATIVE_WRAPPER . self::RELATIVE_WRAPPER, $this->user->lang['datetime'][$day], strtr(parent::format($format['format_short']), $format['lang']));
+ }
+ }
+ }
+
+ return strtr(parent::format($format['format_long']), $format['lang']);
+ }
+
+ /**
+ * Magic method to convert DateTime object to string
+ *
+ * @return Formatted date time, according to the users default settings.
+ */
+ public function __toString()
+ {
+ return $this->format();
+ }
+
+ /**
+ * Pre-processes the specified date format
+ *
+ * @param string $format Output format
+ * @param user $user User object to use for localisation
+ * @return array Processed date format
+ */
+ static protected function format_cache($format, $user)
+ {
+ $lang = $user->lang_name;
+
+ if (!isset(self::$format_cache[$lang]))
+ {
+ self::$format_cache[$lang] = array();
+ }
+
+ if (!isset(self::$format_cache[$lang][$format]))
+ {
+ // Is the user requesting a friendly date format (i.e. 'Today 12:42')?
+ self::$format_cache[$lang][$format] = array(
+ 'is_short' => strpos($format, self::RELATIVE_WRAPPER) !== false,
+ 'format_short' => substr($format, 0, strpos($format, self::RELATIVE_WRAPPER)) . self::RELATIVE_WRAPPER . self::RELATIVE_WRAPPER . substr(strrchr($format, self::RELATIVE_WRAPPER), 1),
+ 'format_long' => str_replace(self::RELATIVE_WRAPPER, '', $format),
+ 'lang' => array_filter($user->lang['datetime'], 'is_string'),
+ );
+
+ // Short representation of month in format? Some languages use different terms for the long and short format of May
+ if ((strpos($format, '\M') === false && strpos($format, 'M') !== false) || (strpos($format, '\r') === false && strpos($format, 'r') !== false))
+ {
+ self::$format_cache[$lang][$format]['lang']['May'] = $user->lang['datetime']['May_short'];
+ }
+ }
+
+ return self::$format_cache[$lang][$format];
+ }
+}
diff --git a/phpBB/includes/db/dbal.php b/phpBB/phpbb/db/driver/driver.php
index 30d2870938..b61800006f 100644
--- a/phpBB/includes/db/dbal.php
+++ b/phpBB/phpbb/db/driver/driver.php
@@ -2,25 +2,18 @@
/**
*
* @package dbal
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
-/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
+namespace phpbb\db\driver;
/**
* Database Abstraction Layer
* @package dbal
*/
-class dbal
+class driver
{
var $db_connect_id;
var $query_result;
@@ -73,17 +66,17 @@ class dbal
/**
* Constructor
*/
- function dbal()
+ function __construct()
{
$this->num_queries = array(
- 'cached' => 0,
- 'normal' => 0,
- 'total' => 0,
+ 'cached' => 0,
+ 'normal' => 0,
+ 'total' => 0,
);
// Fill default sql layer based on the class being called.
// This can be changed by the specified layer itself later if needed.
- $this->sql_layer = substr(get_class($this), 5);
+ $this->sql_layer = substr(get_class($this), strlen('phpbb\db\driver\\'));
// Do not change this please! This variable is used to easy the use of it - and is hardcoded.
$this->any_char = chr(0) . '%';
@@ -207,7 +200,7 @@ class dbal
$query_id = $this->query_result;
}
- if (isset($cache->sql_rowset[$query_id]))
+ if ($cache && $cache->sql_exists($query_id))
{
return $cache->sql_rowseek($rownum, $query_id);
}
@@ -257,7 +250,7 @@ class dbal
$this->sql_rowseek($rownum, $query_id);
}
- if (!is_object($query_id) && isset($cache->sql_rowset[$query_id]))
+ if ($cache && !is_object($query_id) && $cache->sql_exists($query_id))
{
return $cache->sql_fetchfield($query_id, $field);
}
@@ -285,6 +278,37 @@ class dbal
}
/**
+ * Build a case expression
+ *
+ * Note: The two statements action_true and action_false must have the same data type (int, vchar, ...) in the database!
+ *
+ * @param string $condition The condition which must be true, to use action_true rather then action_else
+ * @param string $action_true SQL expression that is used, if the condition is true
+ * @param string $action_else SQL expression that is used, if the condition is false, optional
+ * @return string CASE expression including the condition and statements
+ */
+ public function sql_case($condition, $action_true, $action_false = false)
+ {
+ $sql_case = 'CASE WHEN ' . $condition;
+ $sql_case .= ' THEN ' . $action_true;
+ $sql_case .= ($action_false !== false) ? ' ELSE ' . $action_false : '';
+ $sql_case .= ' END';
+ return $sql_case;
+ }
+
+ /**
+ * Build a concatenated expression
+ *
+ * @param string $expr1 Base SQL expression where we append the second one
+ * @param string $expr2 SQL expression that is appended to the first expression
+ * @return string Concatenated string
+ */
+ public function sql_concatenate($expr1, $expr2)
+ {
+ return $expr1 . ' || ' . $expr2;
+ }
+
+ /**
* Returns whether results of a query need to be buffered to run a transaction while iterating over them.
*
* @return bool Whether buffering is required.
@@ -364,7 +388,7 @@ class dbal
* Build sql statement from array for insert/update/select statements
*
* Idea for this from Ikonboard
- * Possible query values: INSERT, INSERT_SELECT, UPDATE, SELECT
+ * Possible query values: INSERT, INSERT_SELECT, UPDATE, SELECT, DELETE
*
*/
function sql_build_array($query, $assoc_ary = false)
@@ -399,7 +423,7 @@ class dbal
{
trigger_error('The MULTI_INSERT query value is no longer supported. Please use sql_multi_insert() instead.', E_USER_ERROR);
}
- else if ($query == 'UPDATE' || $query == 'SELECT')
+ else if ($query == 'UPDATE' || $query == 'SELECT' || $query == 'DELETE')
{
$values = array();
foreach ($assoc_ary as $key => $var)
@@ -501,6 +525,28 @@ class dbal
}
/**
+ * Returns SQL string to cast a string expression to an int.
+ *
+ * @param string $expression An expression evaluating to string
+ * @return string Expression returning an int
+ */
+ function cast_expr_to_bigint($expression)
+ {
+ return $expression;
+ }
+
+ /**
+ * Returns SQL string to cast an integer expression to a string.
+ *
+ * @param string $expression An expression evaluating to int
+ * @return string Expression returning a string
+ */
+ function cast_expr_to_string($expression)
+ {
+ return $expression;
+ }
+
+ /**
* Run LOWER() on DB column of type text (i.e. neither varchar nor char).
*
* @param string $column_name The column name to use
@@ -516,12 +562,12 @@ class dbal
* Run more than one insert statement.
*
* @param string $table table name to run the statements on
- * @param array &$sql_ary multi-dimensional array holding the statement data.
+ * @param array $sql_ary multi-dimensional array holding the statement data.
*
* @return bool false if no statements were executed.
* @access public
*/
- function sql_multi_insert($table, &$sql_ary)
+ function sql_multi_insert($table, $sql_ary)
{
if (!sizeof($sql_ary))
{
@@ -714,8 +760,8 @@ class dbal
// Show complete SQL error and path to administrators only
// Additionally show complete error on installation or if extended debug mode is enabled
- // The DEBUG_EXTRA constant is for development only!
- if ((isset($auth) && $auth->acl_get('a_')) || defined('IN_INSTALL') || defined('DEBUG_EXTRA'))
+ // The DEBUG constant is for development only!
+ if ((isset($auth) && $auth->acl_get('a_')) || defined('IN_INSTALL') || defined('DEBUG'))
{
$message .= ($sql) ? '<br /><br />SQL<br /><br />' . htmlspecialchars($sql) : '';
}
@@ -770,9 +816,10 @@ class dbal
*/
function sql_report($mode, $query = '')
{
- global $cache, $starttime, $phpbb_root_path, $user;
+ global $cache, $starttime, $phpbb_root_path, $phpbb_path_helper, $user;
+ global $request;
- if (empty($_REQUEST['explain']))
+ if (is_object($request) && !$request->variable('explain', false))
{
return false;
}
@@ -794,14 +841,12 @@ class dbal
$mtime = explode(' ', microtime());
$totaltime = $mtime[0] + $mtime[1] - $starttime;
- echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml" dir="ltr">
+ echo '<!DOCTYPE html>
+ <html dir="ltr">
<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
- <meta http-equiv="Content-Style-Type" content="text/css" />
- <meta http-equiv="imagetoolbar" content="no" />
+ <meta charset="utf-8">
<title>SQL Report</title>
- <link href="' . $phpbb_root_path . 'adm/style/admin.css" rel="stylesheet" type="text/css" media="screen" />
+ <link href="' . htmlspecialchars($phpbb_path_helper->update_web_root_path($phpbb_root_path) . $phpbb_path_helper->get_adm_relative_path()) . 'style/admin.css" rel="stylesheet" type="text/css" media="screen" />
</head>
<body id="errorpage">
<div id="wrap">
@@ -991,10 +1036,3 @@ class dbal
return $rows_total;
}
}
-
-/**
-* This variable holds the class name to use later
-*/
-$sql_db = (!empty($dbms)) ? 'dbal_' . basename($dbms) : 'dbal';
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/db/firebird.php b/phpBB/phpbb/db/driver/firebird.php
index 7072c58ac0..ed56a5d154 100644
--- a/phpBB/includes/db/firebird.php
+++ b/phpBB/phpbb/db/driver/firebird.php
@@ -2,28 +2,19 @@
/**
*
* @package dbal
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
-/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-include_once($phpbb_root_path . 'includes/db/dbal.' . $phpEx);
+namespace phpbb\db\driver;
/**
* Firebird/Interbase Database Abstraction Layer
* Minimum Requirement is Firebird 2.1
* @package dbal
*/
-class dbal_firebird extends dbal
+class firebird extends \phpbb\db\driver\driver
{
var $last_query_text = '';
var $service_handle = false;
@@ -151,13 +142,13 @@ class dbal_firebird extends dbal
global $cache;
// EXPLAIN only in extra debug mode
- if (defined('DEBUG_EXTRA'))
+ if (defined('DEBUG'))
{
$this->sql_report('start', $query);
}
$this->last_query_text = $query;
- $this->query_result = ($cache_ttl && method_exists($cache, 'sql_load')) ? $cache->sql_load($query) : false;
+ $this->query_result = ($cache && $cache_ttl) ? $cache->sql_load($query) : false;
$this->sql_add_num_queries($this->query_result);
if ($this->query_result === false)
@@ -252,7 +243,7 @@ class dbal_firebird extends dbal
$this->sql_error($query);
}
- if (defined('DEBUG_EXTRA'))
+ if (defined('DEBUG'))
{
$this->sql_report('stop', $query);
}
@@ -270,17 +261,17 @@ class dbal_firebird extends dbal
}
}
- if ($cache_ttl && method_exists($cache, 'sql_save'))
+ if ($cache && $cache_ttl)
{
$this->open_queries[(int) $this->query_result] = $this->query_result;
- $cache->sql_save($query, $this->query_result, $cache_ttl);
+ $this->query_result = $cache->sql_save($this, $query, $this->query_result, $cache_ttl);
}
else if (strpos($query, 'SELECT') === 0 && $this->query_result)
{
$this->open_queries[(int) $this->query_result] = $this->query_result;
}
}
- else if (defined('DEBUG_EXTRA'))
+ else if (defined('DEBUG'))
{
$this->sql_report('fromcache', $query);
}
@@ -333,7 +324,7 @@ class dbal_firebird extends dbal
$query_id = $this->query_result;
}
- if (isset($cache->sql_rowset[$query_id]))
+ if ($cache && $cache->sql_exists($query_id))
{
return $cache->sql_fetchrow($query_id);
}
@@ -399,7 +390,7 @@ class dbal_firebird extends dbal
$query_id = $this->query_result;
}
- if (isset($cache->sql_rowset[$query_id]))
+ if ($cache && !is_object($query_id) && $cache->sql_exists($query_id))
{
return $cache->sql_freeresult($query_id);
}
@@ -450,6 +441,23 @@ class dbal_firebird extends dbal
}
/**
+ * @inheritdoc
+ */
+ function cast_expr_to_bigint($expression)
+ {
+ // Precision must be from 1 to 18
+ return 'CAST(' . $expression . ' as DECIMAL(18, 0))';
+ }
+
+ /**
+ * @inheritdoc
+ */
+ function cast_expr_to_string($expression)
+ {
+ return 'CAST(' . $expression . ' as VARCHAR(255))';
+ }
+
+ /**
* return sql error array
* @access private
*/
@@ -522,5 +530,3 @@ class dbal_firebird extends dbal
}
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/db/mssql.php b/phpBB/phpbb/db/driver/mssql.php
index 2dd95c2508..6ebc891673 100644
--- a/phpBB/includes/db/mssql.php
+++ b/phpBB/phpbb/db/driver/mssql.php
@@ -2,28 +2,19 @@
/**
*
* @package dbal
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
-/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-include_once($phpbb_root_path . 'includes/db/dbal.' . $phpEx);
+namespace phpbb\db\driver;
/**
* MSSQL Database Abstraction Layer
* Minimum Requirement is MSSQL 2000+
* @package dbal
*/
-class dbal_mssql extends dbal
+class mssql extends \phpbb\db\driver\driver
{
var $connect_error = '';
@@ -49,14 +40,7 @@ class dbal_mssql extends dbal
@ini_set('mssql.textlimit', 2147483647);
@ini_set('mssql.textsize', 2147483647);
- if (version_compare(PHP_VERSION, '5.1.0', '>=') || (version_compare(PHP_VERSION, '5.0.0-dev', '<=') && version_compare(PHP_VERSION, '4.4.1', '>=')))
- {
- $this->db_connect_id = ($this->persistency) ? @mssql_pconnect($this->server, $this->user, $sqlpassword, $new_link) : @mssql_connect($this->server, $this->user, $sqlpassword, $new_link);
- }
- else
- {
- $this->db_connect_id = ($this->persistency) ? @mssql_pconnect($this->server, $this->user, $sqlpassword) : @mssql_connect($this->server, $this->user, $sqlpassword);
- }
+ $this->db_connect_id = ($this->persistency) ? @mssql_pconnect($this->server, $this->user, $sqlpassword, $new_link) : @mssql_connect($this->server, $this->user, $sqlpassword, $new_link);
if ($this->db_connect_id && $this->dbname != '')
{
@@ -108,6 +92,14 @@ class dbal_mssql extends dbal
}
/**
+ * {@inheritDoc}
+ */
+ public function sql_concatenate($expr1, $expr2)
+ {
+ return $expr1 . ' + ' . $expr2;
+ }
+
+ /**
* SQL Transaction
* @access private
*/
@@ -147,12 +139,12 @@ class dbal_mssql extends dbal
global $cache;
// EXPLAIN only in extra debug mode
- if (defined('DEBUG_EXTRA'))
+ if (defined('DEBUG'))
{
$this->sql_report('start', $query);
}
- $this->query_result = ($cache_ttl && method_exists($cache, 'sql_load')) ? $cache->sql_load($query) : false;
+ $this->query_result = ($cache && $cache_ttl) ? $cache->sql_load($query) : false;
$this->sql_add_num_queries($this->query_result);
if ($this->query_result === false)
@@ -162,22 +154,22 @@ class dbal_mssql extends dbal
$this->sql_error($query);
}
- if (defined('DEBUG_EXTRA'))
+ if (defined('DEBUG'))
{
$this->sql_report('stop', $query);
}
- if ($cache_ttl && method_exists($cache, 'sql_save'))
+ if ($cache && $cache_ttl)
{
$this->open_queries[(int) $this->query_result] = $this->query_result;
- $cache->sql_save($query, $this->query_result, $cache_ttl);
+ $this->query_result = $cache->sql_save($this, $query, $this->query_result, $cache_ttl);
}
else if (strpos($query, 'SELECT') === 0 && $this->query_result)
{
$this->open_queries[(int) $this->query_result] = $this->query_result;
}
}
- else if (defined('DEBUG_EXTRA'))
+ else if (defined('DEBUG'))
{
$this->sql_report('fromcache', $query);
}
@@ -242,7 +234,7 @@ class dbal_mssql extends dbal
$query_id = $this->query_result;
}
- if (isset($cache->sql_rowset[$query_id]))
+ if ($cache && $cache->sql_exists($query_id))
{
return $cache->sql_fetchrow($query_id);
}
@@ -259,7 +251,7 @@ class dbal_mssql extends dbal
{
foreach ($row as $key => $value)
{
- $row[$key] = ($value === ' ' || $value === NULL) ? '' : $value;
+ $row[$key] = ($value === ' ' || $value === null) ? '' : $value;
}
}
@@ -279,7 +271,7 @@ class dbal_mssql extends dbal
$query_id = $this->query_result;
}
- if (isset($cache->sql_rowset[$query_id]))
+ if ($cache && $cache->sql_exists($query_id))
{
return $cache->sql_rowseek($rownum, $query_id);
}
@@ -318,14 +310,14 @@ class dbal_mssql extends dbal
$query_id = $this->query_result;
}
- if (isset($cache->sql_rowset[$query_id]))
+ if ($cache && !is_object($query_id) && $cache->sql_exists($query_id))
{
return $cache->sql_freeresult($query_id);
}
- if (isset($this->open_queries[$query_id]))
+ if (isset($this->open_queries[(int) $query_id]))
{
- unset($this->open_queries[$query_id]);
+ unset($this->open_queries[(int) $query_id]);
return @mssql_free_result($query_id);
}
@@ -472,5 +464,3 @@ class dbal_mssql extends dbal
}
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/phpbb/db/driver/mssql_base.php b/phpBB/phpbb/db/driver/mssql_base.php
new file mode 100644
index 0000000000..113f1c6902
--- /dev/null
+++ b/phpBB/phpbb/db/driver/mssql_base.php
@@ -0,0 +1,59 @@
+<?php
+/**
+*
+* @package dbal
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\db\driver;
+
+/**
+* MSSQL Database Base Abstraction Layer
+* @package dbal
+ */
+abstract class mssql_base extends \phpbb\db\driver\driver
+{
+ /**
+ * {@inheritDoc}
+ */
+ public function sql_concatenate($expr1, $expr2)
+ {
+ return $expr1 . ' + ' . $expr2;
+ }
+
+ /**
+ * Escape string used in sql query
+ */
+ function sql_escape($msg)
+ {
+ return str_replace(array("'", "\0"), array("''", ''), $msg);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ function sql_lower_text($column_name)
+ {
+ return "LOWER(SUBSTRING($column_name, 1, DATALENGTH($column_name)))";
+ }
+
+ /**
+ * Build LIKE expression
+ * @access private
+ */
+ function _sql_like_expression($expression)
+ {
+ return $expression . " ESCAPE '\\'";
+ }
+
+ /**
+ * Build db-specific query data
+ * @access private
+ */
+ function _sql_custom_build($stage, $data)
+ {
+ return $data;
+ }
+}
diff --git a/phpBB/includes/db/mssql_odbc.php b/phpBB/phpbb/db/driver/mssql_odbc.php
index 04501cce8b..f8c70f1cd7 100644
--- a/phpBB/includes/db/mssql_odbc.php
+++ b/phpBB/phpbb/db/driver/mssql_odbc.php
@@ -2,21 +2,12 @@
/**
*
* @package dbal
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
-/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-include_once($phpbb_root_path . 'includes/db/dbal.' . $phpEx);
+namespace phpbb\db\driver;
/**
* Unified ODBC functions
@@ -29,7 +20,7 @@ include_once($phpbb_root_path . 'includes/db/dbal.' . $phpEx);
*
* @package dbal
*/
-class dbal_mssql_odbc extends dbal
+class mssql_odbc extends \phpbb\db\driver\mssql_base
{
var $last_query_text = '';
var $connect_error = '';
@@ -168,13 +159,13 @@ class dbal_mssql_odbc extends dbal
global $cache;
// EXPLAIN only in extra debug mode
- if (defined('DEBUG_EXTRA'))
+ if (defined('DEBUG'))
{
$this->sql_report('start', $query);
}
$this->last_query_text = $query;
- $this->query_result = ($cache_ttl && method_exists($cache, 'sql_load')) ? $cache->sql_load($query) : false;
+ $this->query_result = ($cache && $cache_ttl) ? $cache->sql_load($query) : false;
$this->sql_add_num_queries($this->query_result);
if ($this->query_result === false)
@@ -184,22 +175,22 @@ class dbal_mssql_odbc extends dbal
$this->sql_error($query);
}
- if (defined('DEBUG_EXTRA'))
+ if (defined('DEBUG'))
{
$this->sql_report('stop', $query);
}
- if ($cache_ttl && method_exists($cache, 'sql_save'))
+ if ($cache && $cache_ttl)
{
$this->open_queries[(int) $this->query_result] = $this->query_result;
- $cache->sql_save($query, $this->query_result, $cache_ttl);
+ $this->query_result = $cache->sql_save($this, $query, $this->query_result, $cache_ttl);
}
else if (strpos($query, 'SELECT') === 0 && $this->query_result)
{
$this->open_queries[(int) $this->query_result] = $this->query_result;
}
}
- else if (defined('DEBUG_EXTRA'))
+ else if (defined('DEBUG'))
{
$this->sql_report('fromcache', $query);
}
@@ -256,7 +247,7 @@ class dbal_mssql_odbc extends dbal
* Fetch current row
* @note number of bytes returned depends on odbc.defaultlrl php.ini setting. If it is limited to 4K for example only 4K of data is returned max.
*/
- function sql_fetchrow($query_id = false, $debug = false)
+ function sql_fetchrow($query_id = false)
{
global $cache;
@@ -265,7 +256,7 @@ class dbal_mssql_odbc extends dbal
$query_id = $this->query_result;
}
- if (isset($cache->sql_rowset[$query_id]))
+ if ($cache && $cache->sql_exists($query_id))
{
return $cache->sql_fetchrow($query_id);
}
@@ -306,7 +297,7 @@ class dbal_mssql_odbc extends dbal
$query_id = $this->query_result;
}
- if (isset($cache->sql_rowset[$query_id]))
+ if ($cache && !is_object($query_id) && $cache->sql_exists($query_id))
{
return $cache->sql_freeresult($query_id);
}
@@ -321,40 +312,6 @@ class dbal_mssql_odbc extends dbal
}
/**
- * Escape string used in sql query
- */
- function sql_escape($msg)
- {
- return str_replace(array("'", "\0"), array("''", ''), $msg);
- }
-
- /**
- * {@inheritDoc}
- */
- function sql_lower_text($column_name)
- {
- return "LOWER(SUBSTRING($column_name, 1, DATALENGTH($column_name)))";
- }
-
- /**
- * Build LIKE expression
- * @access private
- */
- function _sql_like_expression($expression)
- {
- return $expression . " ESCAPE '\\'";
- }
-
- /**
- * Build db-specific query data
- * @access private
- */
- function _sql_custom_build($stage, $data)
- {
- return $data;
- }
-
- /**
* return sql error array
* @access private
*/
@@ -418,5 +375,3 @@ class dbal_mssql_odbc extends dbal
}
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/db/mssqlnative.php b/phpBB/phpbb/db/driver/mssqlnative.php
index b91372ac61..125db9c8d4 100644
--- a/phpBB/includes/db/mssqlnative.php
+++ b/phpBB/phpbb/db/driver/mssqlnative.php
@@ -2,9 +2,8 @@
/**
*
* @package dbal
-* @version $Id$
* @copyright (c) 2010 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
* This is the MS SQL Server Native database abstraction layer.
* PHP mssql native driver required.
@@ -12,191 +11,14 @@
*
*/
-/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-include_once($phpbb_root_path . 'includes/db/dbal.' . $phpEx);
-
-/**
- * Prior to version 1.1 the SQL Server Native PHP driver didn't support sqlsrv_num_rows, or cursor based seeking so we recall all rows into an array
- * and maintain our own cursor index into that array.
- */
-class result_mssqlnative
-{
- public function result_mssqlnative($queryresult = false)
- {
- $this->m_cursor = 0;
- $this->m_rows = array();
- $this->m_num_fields = sqlsrv_num_fields($queryresult);
- $this->m_field_meta = sqlsrv_field_metadata($queryresult);
-
- while ($row = sqlsrv_fetch_array($queryresult, SQLSRV_FETCH_ASSOC))
- {
- if ($row !== null)
- {
- foreach($row as $k => $v)
- {
- if (is_object($v) && method_exists($v, 'format'))
- {
- $row[$k] = $v->format("Y-m-d\TH:i:s\Z");
- }
- }
- $this->m_rows[] = $row;//read results into memory, cursors are not supported
- }
- }
-
- $this->m_row_count = sizeof($this->m_rows);
- }
-
- private function array_to_obj($array, &$obj)
- {
- foreach ($array as $key => $value)
- {
- if (is_array($value))
- {
- $obj->$key = new stdClass();
- array_to_obj($value, $obj->$key);
- }
- else
- {
- $obj->$key = $value;
- }
- }
- return $obj;
- }
-
- public function fetch($mode = SQLSRV_FETCH_BOTH, $object_class = 'stdClass')
- {
- if ($this->m_cursor >= $this->m_row_count || $this->m_row_count == 0)
- {
- return false;
- }
-
- $ret = false;
- $arr_num = array();
-
- if ($mode == SQLSRV_FETCH_NUMERIC || $mode == SQLSRV_FETCH_BOTH)
- {
- foreach($this->m_rows[$this->m_cursor] as $key => $value)
- {
- $arr_num[] = $value;
- }
- }
-
- switch ($mode)
- {
- case SQLSRV_FETCH_ASSOC:
- $ret = $this->m_rows[$this->m_cursor];
- break;
- case SQLSRV_FETCH_NUMERIC:
- $ret = $arr_num;
- break;
- case 'OBJECT':
- $ret = $this->array_to_obj($this->m_rows[$this->m_cursor], $o = new $object_class);
- break;
- case SQLSRV_FETCH_BOTH:
- default:
- $ret = $this->m_rows[$this->m_cursor] + $arr_num;
- break;
- }
- $this->m_cursor++;
- return $ret;
- }
-
- public function get($pos, $fld)
- {
- return $this->m_rows[$pos][$fld];
- }
-
- public function num_rows()
- {
- return $this->m_row_count;
- }
-
- public function seek($iRow)
- {
- $this->m_cursor = min($iRow, $this->m_row_count);
- }
-
- public function num_fields()
- {
- return $this->m_num_fields;
- }
-
- public function field_name($nr)
- {
- $arr_keys = array_keys($this->m_rows[0]);
- return $arr_keys[$nr];
- }
-
- public function field_type($nr)
- {
- $i = 0;
- $int_type = -1;
- $str_type = '';
-
- foreach ($this->m_field_meta as $meta)
- {
- if ($nr == $i)
- {
- $int_type = $meta['Type'];
- break;
- }
- $i++;
- }
-
- //http://msdn.microsoft.com/en-us/library/cc296183.aspx contains type table
- switch ($int_type)
- {
- case SQLSRV_SQLTYPE_BIGINT: $str_type = 'bigint'; break;
- case SQLSRV_SQLTYPE_BINARY: $str_type = 'binary'; break;
- case SQLSRV_SQLTYPE_BIT: $str_type = 'bit'; break;
- case SQLSRV_SQLTYPE_CHAR: $str_type = 'char'; break;
- case SQLSRV_SQLTYPE_DATETIME: $str_type = 'datetime'; break;
- case SQLSRV_SQLTYPE_DECIMAL/*($precision, $scale)*/: $str_type = 'decimal'; break;
- case SQLSRV_SQLTYPE_FLOAT: $str_type = 'float'; break;
- case SQLSRV_SQLTYPE_IMAGE: $str_type = 'image'; break;
- case SQLSRV_SQLTYPE_INT: $str_type = 'int'; break;
- case SQLSRV_SQLTYPE_MONEY: $str_type = 'money'; break;
- case SQLSRV_SQLTYPE_NCHAR/*($charCount)*/: $str_type = 'nchar'; break;
- case SQLSRV_SQLTYPE_NUMERIC/*($precision, $scale)*/: $str_type = 'numeric'; break;
- case SQLSRV_SQLTYPE_NVARCHAR/*($charCount)*/: $str_type = 'nvarchar'; break;
- case SQLSRV_SQLTYPE_NTEXT: $str_type = 'ntext'; break;
- case SQLSRV_SQLTYPE_REAL: $str_type = 'real'; break;
- case SQLSRV_SQLTYPE_SMALLDATETIME: $str_type = 'smalldatetime'; break;
- case SQLSRV_SQLTYPE_SMALLINT: $str_type = 'smallint'; break;
- case SQLSRV_SQLTYPE_SMALLMONEY: $str_type = 'smallmoney'; break;
- case SQLSRV_SQLTYPE_TEXT: $str_type = 'text'; break;
- case SQLSRV_SQLTYPE_TIMESTAMP: $str_type = 'timestamp'; break;
- case SQLSRV_SQLTYPE_TINYINT: $str_type = 'tinyint'; break;
- case SQLSRV_SQLTYPE_UNIQUEIDENTIFIER: $str_type = 'uniqueidentifier'; break;
- case SQLSRV_SQLTYPE_UDT: $str_type = 'UDT'; break;
- case SQLSRV_SQLTYPE_VARBINARY/*($byteCount)*/: $str_type = 'varbinary'; break;
- case SQLSRV_SQLTYPE_VARCHAR/*($charCount)*/: $str_type = 'varchar'; break;
- case SQLSRV_SQLTYPE_XML: $str_type = 'xml'; break;
- default: $str_type = $int_type;
- }
- return $str_type;
- }
-
- public function free()
- {
- unset($this->m_rows);
- return;
- }
-}
+namespace phpbb\db\driver;
/**
* @package dbal
*/
-class dbal_mssqlnative extends dbal
+class mssqlnative extends \phpbb\db\driver\mssql_base
{
- var $m_insert_id = NULL;
+ var $m_insert_id = null;
var $last_query_text = '';
var $query_options = array();
var $connect_error = '';
@@ -306,13 +128,13 @@ class dbal_mssqlnative extends dbal
global $cache;
// EXPLAIN only in extra debug mode
- if (defined('DEBUG_EXTRA'))
+ if (defined('DEBUG'))
{
$this->sql_report('start', $query);
}
$this->last_query_text = $query;
- $this->query_result = ($cache_ttl && method_exists($cache, 'sql_load')) ? $cache->sql_load($query) : false;
+ $this->query_result = ($cache && $cache_ttl) ? $cache->sql_load($query) : false;
$this->sql_add_num_queries($this->query_result);
if ($this->query_result === false)
@@ -324,22 +146,22 @@ class dbal_mssqlnative extends dbal
// reset options for next query
$this->query_options = array();
- if (defined('DEBUG_EXTRA'))
+ if (defined('DEBUG'))
{
$this->sql_report('stop', $query);
}
- if ($cache_ttl && method_exists($cache, 'sql_save'))
+ if ($cache && $cache_ttl)
{
$this->open_queries[(int) $this->query_result] = $this->query_result;
- $cache->sql_save($query, $this->query_result, $cache_ttl);
+ $this->query_result = $cache->sql_save($this, $query, $this->query_result, $cache_ttl);
}
else if (strpos($query, 'SELECT') === 0 && $this->query_result)
{
$this->open_queries[(int) $this->query_result] = $this->query_result;
}
}
- else if (defined('DEBUG_EXTRA'))
+ else if (defined('DEBUG'))
{
$this->sql_report('fromcache', $query);
}
@@ -397,7 +219,7 @@ class dbal_mssqlnative extends dbal
*/
function sql_affectedrows()
{
- return (!empty($this->query_result)) ? @sqlsrv_rows_affected($this->query_result) : false;
+ return ($this->db_connect_id) ? @sqlsrv_rows_affected($this->query_result) : false;
}
/**
@@ -412,7 +234,7 @@ class dbal_mssqlnative extends dbal
$query_id = $this->query_result;
}
- if (isset($cache->sql_rowset[$query_id]))
+ if ($cache && $cache->sql_exists($query_id))
{
return $cache->sql_fetchrow($query_id);
}
@@ -428,7 +250,7 @@ class dbal_mssqlnative extends dbal
{
foreach ($row as $key => $value)
{
- $row[$key] = ($value === ' ' || $value === NULL) ? '' : $value;
+ $row[$key] = ($value === ' ' || $value === null) ? '' : $value;
}
// remove helper values from LIMIT queries
@@ -472,42 +294,18 @@ class dbal_mssqlnative extends dbal
$query_id = $this->query_result;
}
- if (isset($cache->sql_rowset[$query_id]))
+ if ($cache && !is_object($query_id) && $cache->sql_exists($query_id))
{
return $cache->sql_freeresult($query_id);
}
- if (isset($this->open_queries[$query_id]))
+ if (isset($this->open_queries[(int) $query_id]))
{
- unset($this->open_queries[$query_id]);
+ unset($this->open_queries[(int) $query_id]);
return @sqlsrv_free_stmt($query_id);
}
- return false;
- }
-
- /**
- * Escape string used in sql query
- */
- function sql_escape($msg)
- {
- return str_replace(array("'", "\0"), array("''", ''), $msg);
- }
-
- /**
- * {@inheritDoc}
- */
- function sql_lower_text($column_name)
- {
- return "LOWER(SUBSTRING($column_name, 1, DATALENGTH($column_name)))";
- }
- /**
- * Build LIKE expression
- * @access private
- */
- function _sql_like_expression($expression)
- {
- return $expression . " ESCAPE '\\'";
+ return false;
}
/**
@@ -556,15 +354,6 @@ class dbal_mssqlnative extends dbal
}
/**
- * Build db-specific query data
- * @access private
- */
- function _sql_custom_build($stage, $data)
- {
- return $data;
- }
-
- /**
* Close sql connection
* @access private
*/
@@ -648,5 +437,3 @@ class dbal_mssqlnative extends dbal
$this->query_options = $options;
}
}
-
-?>
diff --git a/phpBB/includes/db/mysql.php b/phpBB/phpbb/db/driver/mysql.php
index 252cb20bd4..e311f0dd74 100644
--- a/phpBB/includes/db/mysql.php
+++ b/phpBB/phpbb/db/driver/mysql.php
@@ -2,21 +2,12 @@
/**
*
* @package dbal
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
-/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-include_once($phpbb_root_path . 'includes/db/dbal.' . $phpEx);
+namespace phpbb\db\driver;
/**
* MySQL4 Database Abstraction Layer
@@ -27,7 +18,7 @@ include_once($phpbb_root_path . 'includes/db/dbal.' . $phpEx);
* MySQL 5.0+
* @package dbal
*/
-class dbal_mysql extends dbal
+class mysql extends \phpbb\db\driver\mysql_base
{
var $multi_insert = true;
var $connect_error = '';
@@ -178,12 +169,12 @@ class dbal_mysql extends dbal
global $cache;
// EXPLAIN only in extra debug mode
- if (defined('DEBUG_EXTRA'))
+ if (defined('DEBUG'))
{
$this->sql_report('start', $query);
}
- $this->query_result = ($cache_ttl && method_exists($cache, 'sql_load')) ? $cache->sql_load($query) : false;
+ $this->query_result = ($cache && $cache_ttl) ? $cache->sql_load($query) : false;
$this->sql_add_num_queries($this->query_result);
if ($this->query_result === false)
@@ -193,22 +184,22 @@ class dbal_mysql extends dbal
$this->sql_error($query);
}
- if (defined('DEBUG_EXTRA'))
+ if (defined('DEBUG'))
{
$this->sql_report('stop', $query);
}
- if ($cache_ttl && method_exists($cache, 'sql_save'))
+ if ($cache && $cache_ttl)
{
$this->open_queries[(int) $this->query_result] = $this->query_result;
- $cache->sql_save($query, $this->query_result, $cache_ttl);
+ $this->query_result = $cache->sql_save($this, $query, $this->query_result, $cache_ttl);
}
else if (strpos($query, 'SELECT') === 0 && $this->query_result)
{
$this->open_queries[(int) $this->query_result] = $this->query_result;
}
}
- else if (defined('DEBUG_EXTRA'))
+ else if (defined('DEBUG'))
{
$this->sql_report('fromcache', $query);
}
@@ -222,25 +213,6 @@ class dbal_mysql extends dbal
}
/**
- * Build LIMIT query
- */
- function _sql_query_limit($query, $total, $offset = 0, $cache_ttl = 0)
- {
- $this->query_result = false;
-
- // if $total is set to 0 we do not want to limit the number of rows
- if ($total == 0)
- {
- // Having a value of -1 was always a bug
- $total = '18446744073709551615';
- }
-
- $query .= "\n LIMIT " . ((!empty($offset)) ? $offset . ', ' . $total : $total);
-
- return $this->sql_query($query, $cache_ttl);
- }
-
- /**
* Return number of affected rows
*/
function sql_affectedrows()
@@ -260,7 +232,7 @@ class dbal_mysql extends dbal
$query_id = $this->query_result;
}
- if (isset($cache->sql_rowset[$query_id]))
+ if ($cache && $cache->sql_exists($query_id))
{
return $cache->sql_fetchrow($query_id);
}
@@ -281,7 +253,7 @@ class dbal_mysql extends dbal
$query_id = $this->query_result;
}
- if (isset($cache->sql_rowset[$query_id]))
+ if ($cache && $cache->sql_exists($query_id))
{
return $cache->sql_rowseek($rownum, $query_id);
}
@@ -309,7 +281,7 @@ class dbal_mysql extends dbal
$query_id = $this->query_result;
}
- if (isset($cache->sql_rowset[$query_id]))
+ if ($cache && !is_object($query_id) && $cache->sql_exists($query_id))
{
return $cache->sql_freeresult($query_id);
}
@@ -337,101 +309,6 @@ class dbal_mysql extends dbal
}
/**
- * Gets the estimated number of rows in a specified table.
- *
- * @param string $table_name Table name
- *
- * @return string Number of rows in $table_name.
- * Prefixed with ~ if estimated (otherwise exact).
- *
- * @access public
- */
- function get_estimated_row_count($table_name)
- {
- $table_status = $this->get_table_status($table_name);
-
- if (isset($table_status['Engine']))
- {
- if ($table_status['Engine'] === 'MyISAM')
- {
- return $table_status['Rows'];
- }
- else if ($table_status['Engine'] === 'InnoDB' && $table_status['Rows'] > 100000)
- {
- return '~' . $table_status['Rows'];
- }
- }
-
- return parent::get_row_count($table_name);
- }
-
- /**
- * Gets the exact number of rows in a specified table.
- *
- * @param string $table_name Table name
- *
- * @return string Exact number of rows in $table_name.
- *
- * @access public
- */
- function get_row_count($table_name)
- {
- $table_status = $this->get_table_status($table_name);
-
- if (isset($table_status['Engine']) && $table_status['Engine'] === 'MyISAM')
- {
- return $table_status['Rows'];
- }
-
- return parent::get_row_count($table_name);
- }
-
- /**
- * Gets some information about the specified table.
- *
- * @param string $table_name Table name
- *
- * @return array
- *
- * @access protected
- */
- function get_table_status($table_name)
- {
- $sql = "SHOW TABLE STATUS
- LIKE '" . $this->sql_escape($table_name) . "'";
- $result = $this->sql_query($sql);
- $table_status = $this->sql_fetchrow($result);
- $this->sql_freeresult($result);
-
- return $table_status;
- }
-
- /**
- * Build LIKE expression
- * @access private
- */
- function _sql_like_expression($expression)
- {
- return $expression;
- }
-
- /**
- * Build db-specific query data
- * @access private
- */
- function _sql_custom_build($stage, $data)
- {
- switch ($stage)
- {
- case 'FROM':
- $data = '(' . $data . ')';
- break;
- }
-
- return $data;
- }
-
- /**
* return sql error array
* @access private
*/
@@ -587,5 +464,3 @@ class dbal_mysql extends dbal
}
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/phpbb/db/driver/mysql_base.php b/phpBB/phpbb/db/driver/mysql_base.php
new file mode 100644
index 0000000000..87b6d153a9
--- /dev/null
+++ b/phpBB/phpbb/db/driver/mysql_base.php
@@ -0,0 +1,139 @@
+<?php
+/**
+*
+* @package dbal
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\db\driver;
+
+/**
+* Abstract MySQL Database Base Abstraction Layer
+* @package dbal
+*/
+abstract class mysql_base extends \phpbb\db\driver\driver
+{
+ /**
+ * {@inheritDoc}
+ */
+ public function sql_concatenate($expr1, $expr2)
+ {
+ return 'CONCAT(' . $expr1 . ', ' . $expr2 . ')';
+ }
+
+ /**
+ * Build LIMIT query
+ */
+ function _sql_query_limit($query, $total, $offset = 0, $cache_ttl = 0)
+ {
+ $this->query_result = false;
+
+ // if $total is set to 0 we do not want to limit the number of rows
+ if ($total == 0)
+ {
+ // MySQL 4.1+ no longer supports -1 in limit queries
+ $total = '18446744073709551615';
+ }
+
+ $query .= "\n LIMIT " . ((!empty($offset)) ? $offset . ', ' . $total : $total);
+
+ return $this->sql_query($query, $cache_ttl);
+ }
+
+ /**
+ * Gets the estimated number of rows in a specified table.
+ *
+ * @param string $table_name Table name
+ *
+ * @return string Number of rows in $table_name.
+ * Prefixed with ~ if estimated (otherwise exact).
+ *
+ * @access public
+ */
+ function get_estimated_row_count($table_name)
+ {
+ $table_status = $this->get_table_status($table_name);
+
+ if (isset($table_status['Engine']))
+ {
+ if ($table_status['Engine'] === 'MyISAM')
+ {
+ return $table_status['Rows'];
+ }
+ else if ($table_status['Engine'] === 'InnoDB' && $table_status['Rows'] > 100000)
+ {
+ return '~' . $table_status['Rows'];
+ }
+ }
+
+ return parent::get_row_count($table_name);
+ }
+
+ /**
+ * Gets the exact number of rows in a specified table.
+ *
+ * @param string $table_name Table name
+ *
+ * @return string Exact number of rows in $table_name.
+ *
+ * @access public
+ */
+ function get_row_count($table_name)
+ {
+ $table_status = $this->get_table_status($table_name);
+
+ if (isset($table_status['Engine']) && $table_status['Engine'] === 'MyISAM')
+ {
+ return $table_status['Rows'];
+ }
+
+ return parent::get_row_count($table_name);
+ }
+
+ /**
+ * Gets some information about the specified table.
+ *
+ * @param string $table_name Table name
+ *
+ * @return array
+ *
+ * @access protected
+ */
+ function get_table_status($table_name)
+ {
+ $sql = "SHOW TABLE STATUS
+ LIKE '" . $this->sql_escape($table_name) . "'";
+ $result = $this->sql_query($sql);
+ $table_status = $this->sql_fetchrow($result);
+ $this->sql_freeresult($result);
+
+ return $table_status;
+ }
+
+ /**
+ * Build LIKE expression
+ * @access private
+ */
+ function _sql_like_expression($expression)
+ {
+ return $expression;
+ }
+
+ /**
+ * Build db-specific query data
+ * @access private
+ */
+ function _sql_custom_build($stage, $data)
+ {
+ switch ($stage)
+ {
+ case 'FROM':
+ $data = '(' . $data . ')';
+ break;
+ }
+
+ return $data;
+ }
+}
diff --git a/phpBB/includes/db/mysqli.php b/phpBB/phpbb/db/driver/mysqli.php
index 69f1d26a40..adc8f96302 100644
--- a/phpBB/includes/db/mysqli.php
+++ b/phpBB/phpbb/db/driver/mysqli.php
@@ -2,21 +2,12 @@
/**
*
* @package dbal
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
-/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-include_once($phpbb_root_path . 'includes/db/dbal.' . $phpEx);
+namespace phpbb\db\driver;
/**
* MySQLi Database Abstraction Layer
@@ -24,7 +15,7 @@ include_once($phpbb_root_path . 'includes/db/dbal.' . $phpEx);
* MySQL 4.1+ or MySQL 5.0+
* @package dbal
*/
-class dbal_mysqli extends dbal
+class mysqli extends \phpbb\db\driver\mysql_base
{
var $multi_insert = true;
var $connect_error = '';
@@ -32,7 +23,7 @@ class dbal_mysqli extends dbal
/**
* Connect to server
*/
- function sql_connect($sqlserver, $sqluser, $sqlpassword, $database, $port = false, $persistency = false , $new_link = false)
+ function sql_connect($sqlserver, $sqluser, $sqlpassword, $database, $port = false, $persistency = false, $new_link = false)
{
if (!function_exists('mysqli_connect'))
{
@@ -48,11 +39,11 @@ class dbal_mysqli extends dbal
$this->server = ($this->persistency) ? 'p:' . (($sqlserver) ? $sqlserver : 'localhost') : $sqlserver;
$this->dbname = $database;
- $port = (!$port) ? NULL : $port;
+ $port = (!$port) ? null : $port;
// If port is set and it is not numeric, most likely mysqli socket is set.
// Try to map it to the $socket parameter.
- $socket = NULL;
+ $socket = null;
if ($port)
{
if (is_numeric($port))
@@ -62,7 +53,7 @@ class dbal_mysqli extends dbal
else
{
$socket = $port;
- $port = NULL;
+ $port = null;
}
}
@@ -106,6 +97,7 @@ class dbal_mysqli extends dbal
/**
* Version information about used database
+ * @param bool $raw if true, only return the fetched sql_server_version
* @param bool $use_cache If true, it is safe to retrieve the value from the cache
* @return string sql server version
*/
@@ -174,12 +166,12 @@ class dbal_mysqli extends dbal
global $cache;
// EXPLAIN only in extra debug mode
- if (defined('DEBUG_EXTRA'))
+ if (defined('DEBUG'))
{
$this->sql_report('start', $query);
}
- $this->query_result = ($cache_ttl && method_exists($cache, 'sql_load')) ? $cache->sql_load($query) : false;
+ $this->query_result = ($cache && $cache_ttl) ? $cache->sql_load($query) : false;
$this->sql_add_num_queries($this->query_result);
if ($this->query_result === false)
@@ -189,17 +181,17 @@ class dbal_mysqli extends dbal
$this->sql_error($query);
}
- if (defined('DEBUG_EXTRA'))
+ if (defined('DEBUG'))
{
$this->sql_report('stop', $query);
}
- if ($cache_ttl && method_exists($cache, 'sql_save'))
+ if ($cache && $cache_ttl)
{
- $cache->sql_save($query, $this->query_result, $cache_ttl);
+ $this->query_result = $cache->sql_save($this, $query, $this->query_result, $cache_ttl);
}
}
- else if (defined('DEBUG_EXTRA'))
+ else if (defined('DEBUG'))
{
$this->sql_report('fromcache', $query);
}
@@ -213,25 +205,6 @@ class dbal_mysqli extends dbal
}
/**
- * Build LIMIT query
- */
- function _sql_query_limit($query, $total, $offset = 0, $cache_ttl = 0)
- {
- $this->query_result = false;
-
- // if $total is set to 0 we do not want to limit the number of rows
- if ($total == 0)
- {
- // MySQL 4.1+ no longer supports -1 in limit queries
- $total = '18446744073709551615';
- }
-
- $query .= "\n LIMIT " . ((!empty($offset)) ? $offset . ', ' . $total : $total);
-
- return $this->sql_query($query, $cache_ttl);
- }
-
- /**
* Return number of affected rows
*/
function sql_affectedrows()
@@ -251,7 +224,7 @@ class dbal_mysqli extends dbal
$query_id = $this->query_result;
}
- if (!is_object($query_id) && isset($cache->sql_rowset[$query_id]))
+ if ($cache && !is_object($query_id) && $cache->sql_exists($query_id))
{
return $cache->sql_fetchrow($query_id);
}
@@ -278,7 +251,7 @@ class dbal_mysqli extends dbal
$query_id = $this->query_result;
}
- if (!is_object($query_id) && isset($cache->sql_rowset[$query_id]))
+ if ($cache && !is_object($query_id) && $cache->sql_exists($query_id))
{
return $cache->sql_rowseek($rownum, $query_id);
}
@@ -306,7 +279,7 @@ class dbal_mysqli extends dbal
$query_id = $this->query_result;
}
- if (!is_object($query_id) && isset($cache->sql_rowset[$query_id]))
+ if ($cache && !is_object($query_id) && $cache->sql_exists($query_id))
{
return $cache->sql_freeresult($query_id);
}
@@ -323,101 +296,6 @@ class dbal_mysqli extends dbal
}
/**
- * Gets the estimated number of rows in a specified table.
- *
- * @param string $table_name Table name
- *
- * @return string Number of rows in $table_name.
- * Prefixed with ~ if estimated (otherwise exact).
- *
- * @access public
- */
- function get_estimated_row_count($table_name)
- {
- $table_status = $this->get_table_status($table_name);
-
- if (isset($table_status['Engine']))
- {
- if ($table_status['Engine'] === 'MyISAM')
- {
- return $table_status['Rows'];
- }
- else if ($table_status['Engine'] === 'InnoDB' && $table_status['Rows'] > 100000)
- {
- return '~' . $table_status['Rows'];
- }
- }
-
- return parent::get_row_count($table_name);
- }
-
- /**
- * Gets the exact number of rows in a specified table.
- *
- * @param string $table_name Table name
- *
- * @return string Exact number of rows in $table_name.
- *
- * @access public
- */
- function get_row_count($table_name)
- {
- $table_status = $this->get_table_status($table_name);
-
- if (isset($table_status['Engine']) && $table_status['Engine'] === 'MyISAM')
- {
- return $table_status['Rows'];
- }
-
- return parent::get_row_count($table_name);
- }
-
- /**
- * Gets some information about the specified table.
- *
- * @param string $table_name Table name
- *
- * @return array
- *
- * @access protected
- */
- function get_table_status($table_name)
- {
- $sql = "SHOW TABLE STATUS
- LIKE '" . $this->sql_escape($table_name) . "'";
- $result = $this->sql_query($sql);
- $table_status = $this->sql_fetchrow($result);
- $this->sql_freeresult($result);
-
- return $table_status;
- }
-
- /**
- * Build LIKE expression
- * @access private
- */
- function _sql_like_expression($expression)
- {
- return $expression;
- }
-
- /**
- * Build db-specific query data
- * @access private
- */
- function _sql_custom_build($stage, $data)
- {
- switch ($stage)
- {
- case 'FROM':
- $data = '(' . $data . ')';
- break;
- }
-
- return $data;
- }
-
- /**
* return sql error array
* @access private
*/
@@ -577,5 +455,3 @@ class dbal_mysqli extends dbal
}
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/db/oracle.php b/phpBB/phpbb/db/driver/oracle.php
index 4a7a4ecc8c..36ed43d4a7 100644
--- a/phpBB/includes/db/oracle.php
+++ b/phpBB/phpbb/db/driver/oracle.php
@@ -2,27 +2,18 @@
/**
*
* @package dbal
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
-/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-include_once($phpbb_root_path . 'includes/db/dbal.' . $phpEx);
+namespace phpbb\db\driver;
/**
* Oracle Database Abstraction Layer
* @package dbal
*/
-class dbal_oracle extends dbal
+class oracle extends \phpbb\db\driver\driver
{
var $last_query_text = '';
var $connect_error = '';
@@ -264,13 +255,13 @@ class dbal_oracle extends dbal
global $cache;
// EXPLAIN only in extra debug mode
- if (defined('DEBUG_EXTRA'))
+ if (defined('DEBUG'))
{
$this->sql_report('start', $query);
}
$this->last_query_text = $query;
- $this->query_result = ($cache_ttl && method_exists($cache, 'sql_load')) ? $cache->sql_load($query) : false;
+ $this->query_result = ($cache && $cache_ttl) ? $cache->sql_load($query) : false;
$this->sql_add_num_queries($this->query_result);
if ($this->query_result === false)
@@ -441,22 +432,22 @@ class dbal_oracle extends dbal
}
}
- if (defined('DEBUG_EXTRA'))
+ if (defined('DEBUG'))
{
$this->sql_report('stop', $query);
}
- if ($cache_ttl && method_exists($cache, 'sql_save'))
+ if ($cache && $cache_ttl)
{
$this->open_queries[(int) $this->query_result] = $this->query_result;
- $cache->sql_save($query, $this->query_result, $cache_ttl);
+ $this->query_result = $cache->sql_save($this, $query, $this->query_result, $cache_ttl);
}
else if (strpos($query, 'SELECT') === 0 && $this->query_result)
{
$this->open_queries[(int) $this->query_result] = $this->query_result;
}
}
- else if (defined('DEBUG_EXTRA'))
+ else if (defined('DEBUG'))
{
$this->sql_report('fromcache', $query);
}
@@ -501,7 +492,7 @@ class dbal_oracle extends dbal
$query_id = $this->query_result;
}
- if (isset($cache->sql_rowset[$query_id]))
+ if ($cache && $cache->sql_exists($query_id))
{
return $cache->sql_fetchrow($query_id);
}
@@ -553,7 +544,7 @@ class dbal_oracle extends dbal
$query_id = $this->query_result;
}
- if (isset($cache->sql_rowset[$query_id]))
+ if ($cache && $cache->sql_exists($query_id))
{
return $cache->sql_rowseek($rownum, $query_id);
}
@@ -622,7 +613,7 @@ class dbal_oracle extends dbal
$query_id = $this->query_result;
}
- if (isset($cache->sql_rowset[$query_id]))
+ if ($cache && !is_object($query_id) && $cache->sql_exists($query_id))
{
return $cache->sql_freeresult($query_id);
}
@@ -804,5 +795,3 @@ class dbal_oracle extends dbal
}
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/db/postgres.php b/phpBB/phpbb/db/driver/postgres.php
index bb116e0763..5dbd1ca74f 100644
--- a/phpBB/includes/db/postgres.php
+++ b/phpBB/phpbb/db/driver/postgres.php
@@ -2,33 +2,19 @@
/**
*
* @package dbal
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
-/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-include_once($phpbb_root_path . 'includes/db/dbal.' . $phpEx);
-
-if (!class_exists('phpbb_error_collector'))
-{
- include($phpbb_root_path . 'includes/error_collector.' . $phpEx);
-}
+namespace phpbb\db\driver;
/**
* PostgreSQL Database Abstraction Layer
* Minimum Requirement is Version 7.3+
* @package dbal
*/
-class dbal_postgres extends dbal
+class postgres extends \phpbb\db\driver\driver
{
var $last_query_text = '';
var $connect_error = '';
@@ -92,7 +78,7 @@ class dbal_postgres extends dbal
$this->connect_error = 'pg_pconnect function does not exist, is pgsql extension installed?';
return $this->sql_error('');
}
- $collector = new phpbb_error_collector;
+ $collector = new \phpbb\error_collector;
$collector->install();
$this->db_connect_id = (!$new_link) ? @pg_pconnect($connect_string) : @pg_pconnect($connect_string, PGSQL_CONNECT_FORCE_NEW);
}
@@ -103,7 +89,7 @@ class dbal_postgres extends dbal
$this->connect_error = 'pg_connect function does not exist, is pgsql extension installed?';
return $this->sql_error('');
}
- $collector = new phpbb_error_collector;
+ $collector = new \phpbb\error_collector;
$collector->install();
$this->db_connect_id = (!$new_link) ? @pg_connect($connect_string) : @pg_connect($connect_string, PGSQL_CONNECT_FORCE_NEW);
}
@@ -195,13 +181,13 @@ class dbal_postgres extends dbal
global $cache;
// EXPLAIN only in extra debug mode
- if (defined('DEBUG_EXTRA'))
+ if (defined('DEBUG'))
{
$this->sql_report('start', $query);
}
$this->last_query_text = $query;
- $this->query_result = ($cache_ttl && method_exists($cache, 'sql_load')) ? $cache->sql_load($query) : false;
+ $this->query_result = ($cache && $cache_ttl) ? $cache->sql_load($query) : false;
$this->sql_add_num_queries($this->query_result);
if ($this->query_result === false)
@@ -211,22 +197,22 @@ class dbal_postgres extends dbal
$this->sql_error($query);
}
- if (defined('DEBUG_EXTRA'))
+ if (defined('DEBUG'))
{
$this->sql_report('stop', $query);
}
- if ($cache_ttl && method_exists($cache, 'sql_save'))
+ if ($cache && $cache_ttl)
{
$this->open_queries[(int) $this->query_result] = $this->query_result;
- $cache->sql_save($query, $this->query_result, $cache_ttl);
+ $this->query_result = $cache->sql_save($this, $query, $this->query_result, $cache_ttl);
}
else if (strpos($query, 'SELECT') === 0 && $this->query_result)
{
$this->open_queries[(int) $this->query_result] = $this->query_result;
}
}
- else if (defined('DEBUG_EXTRA'))
+ else if (defined('DEBUG'))
{
$this->sql_report('fromcache', $query);
}
@@ -286,7 +272,7 @@ class dbal_postgres extends dbal
$query_id = $this->query_result;
}
- if (isset($cache->sql_rowset[$query_id]))
+ if ($cache && $cache->sql_exists($query_id))
{
return $cache->sql_fetchrow($query_id);
}
@@ -307,7 +293,7 @@ class dbal_postgres extends dbal
$query_id = $this->query_result;
}
- if (isset($cache->sql_rowset[$query_id]))
+ if ($cache && $cache->sql_exists($query_id))
{
return $cache->sql_rowseek($rownum, $query_id);
}
@@ -334,7 +320,7 @@ class dbal_postgres extends dbal
return false;
}
- $temp_result = @pg_fetch_assoc($temp_q_id, NULL);
+ $temp_result = @pg_fetch_assoc($temp_q_id, null);
@pg_free_result($query_id);
return ($temp_result) ? $temp_result['last_value'] : false;
@@ -356,7 +342,7 @@ class dbal_postgres extends dbal
$query_id = $this->query_result;
}
- if (isset($cache->sql_rowset[$query_id]))
+ if ($cache && !is_object($query_id) && $cache->sql_exists($query_id))
{
return $cache->sql_freeresult($query_id);
}
@@ -389,6 +375,22 @@ class dbal_postgres extends dbal
}
/**
+ * @inheritdoc
+ */
+ function cast_expr_to_bigint($expression)
+ {
+ return 'CAST(' . $expression . ' as DECIMAL(255, 0))';
+ }
+
+ /**
+ * @inheritdoc
+ */
+ function cast_expr_to_string($expression)
+ {
+ return 'CAST(' . $expression . ' as VARCHAR(255))';
+ }
+
+ /**
* return sql error array
* @access private
*/
@@ -446,7 +448,7 @@ class dbal_postgres extends dbal
if ($result = @pg_query($this->db_connect_id, "EXPLAIN $explain_query"))
{
- while ($row = @pg_fetch_assoc($result, NULL))
+ while ($row = @pg_fetch_assoc($result, null))
{
$html_table = $this->sql_report('add_select_row', $query, $html_table, $row);
}
@@ -466,7 +468,7 @@ class dbal_postgres extends dbal
$endtime = $endtime[0] + $endtime[1];
$result = @pg_query($this->db_connect_id, $query);
- while ($void = @pg_fetch_assoc($result, NULL))
+ while ($void = @pg_fetch_assoc($result, null))
{
// Take the time spent on parsing rows into account
}
@@ -481,5 +483,3 @@ class dbal_postgres extends dbal
}
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/db/sqlite.php b/phpBB/phpbb/db/driver/sqlite.php
index 557b057cce..59ec895c0f 100644
--- a/phpBB/includes/db/sqlite.php
+++ b/phpBB/phpbb/db/driver/sqlite.php
@@ -2,28 +2,19 @@
/**
*
* @package dbal
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
-/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-include_once($phpbb_root_path . 'includes/db/dbal.' . $phpEx);
+namespace phpbb\db\driver;
/**
* Sqlite Database Abstraction Layer
* Minimum Requirement: 2.8.2+
* @package dbal
*/
-class dbal_sqlite extends dbal
+class sqlite extends \phpbb\db\driver\driver
{
var $connect_error = '';
@@ -132,12 +123,12 @@ class dbal_sqlite extends dbal
global $cache;
// EXPLAIN only in extra debug mode
- if (defined('DEBUG_EXTRA'))
+ if (defined('DEBUG'))
{
$this->sql_report('start', $query);
}
- $this->query_result = ($cache_ttl && method_exists($cache, 'sql_load')) ? $cache->sql_load($query) : false;
+ $this->query_result = ($cache && $cache_ttl) ? $cache->sql_load($query) : false;
$this->sql_add_num_queries($this->query_result);
if ($this->query_result === false)
@@ -147,22 +138,22 @@ class dbal_sqlite extends dbal
$this->sql_error($query);
}
- if (defined('DEBUG_EXTRA'))
+ if (defined('DEBUG'))
{
$this->sql_report('stop', $query);
}
- if ($cache_ttl && method_exists($cache, 'sql_save'))
+ if ($cache && $cache_ttl)
{
$this->open_queries[(int) $this->query_result] = $this->query_result;
- $cache->sql_save($query, $this->query_result, $cache_ttl);
+ $this->query_result = $cache->sql_save($this, $query, $this->query_result, $cache_ttl);
}
else if (strpos($query, 'SELECT') === 0 && $this->query_result)
{
$this->open_queries[(int) $this->query_result] = $this->query_result;
}
}
- else if (defined('DEBUG_EXTRA'))
+ else if (defined('DEBUG'))
{
$this->sql_report('fromcache', $query);
}
@@ -213,7 +204,7 @@ class dbal_sqlite extends dbal
$query_id = $this->query_result;
}
- if (isset($cache->sql_rowset[$query_id]))
+ if ($cache && $cache->sql_exists($query_id))
{
return $cache->sql_fetchrow($query_id);
}
@@ -234,7 +225,7 @@ class dbal_sqlite extends dbal
$query_id = $this->query_result;
}
- if (isset($cache->sql_rowset[$query_id]))
+ if ($cache && $cache->sql_exists($query_id))
{
return $cache->sql_rowseek($rownum, $query_id);
}
@@ -262,7 +253,7 @@ class dbal_sqlite extends dbal
$query_id = $this->query_result;
}
- if (isset($cache->sql_rowset[$query_id]))
+ if ($cache && !is_object($query_id) && $cache->sql_exists($query_id))
{
return $cache->sql_freeresult($query_id);
}
@@ -366,5 +357,3 @@ class dbal_sqlite extends dbal
}
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/phpbb/db/migration/data/v30x/local_url_bbcode.php b/phpBB/phpbb/db/migration/data/v30x/local_url_bbcode.php
new file mode 100644
index 0000000000..5e6ba90336
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v30x/local_url_bbcode.php
@@ -0,0 +1,59 @@
+<?php
+/**
+*
+* @package migration
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\db\migration\data\v30x;
+
+class local_url_bbcode extends \phpbb\db\migration\migration
+{
+ static public function depends_on()
+ {
+ return array('\phpbb\db\migration\data\v30x\release_3_0_12_rc1');
+ }
+
+ public function update_data()
+ {
+ return array(
+ array('custom', array(array($this, 'update_local_url_bbcode'))),
+ );
+ }
+
+ /**
+ * Update BBCodes that currently use the LOCAL_URL tag
+ *
+ * To fix http://tracker.phpbb.com/browse/PHPBB3-8319 we changed
+ * the second_pass_replace value, so that needs updating for existing ones
+ */
+ public function update_local_url_bbcode()
+ {
+ $sql = 'SELECT *
+ FROM ' . BBCODES_TABLE . '
+ WHERE bbcode_match ' . $this->db->sql_like_expression($this->db->any_char . 'LOCAL_URL' . $this->db->any_char);
+ $result = $this->db->sql_query($sql);
+
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ if (!class_exists('acp_bbcodes'))
+ {
+ global $phpEx;
+ phpbb_require_updated('includes/acp/acp_bbcodes.' . $phpEx);
+ }
+ $bbcode_match = $row['bbcode_match'];
+ $bbcode_tpl = $row['bbcode_tpl'];
+
+ $acp_bbcodes = new \acp_bbcodes();
+ $sql_ary = $acp_bbcodes->build_regexp($bbcode_match, $bbcode_tpl);
+
+ $sql = 'UPDATE ' . BBCODES_TABLE . '
+ SET ' . $this->db->sql_build_array('UPDATE', $sql_ary) . '
+ WHERE bbcode_id = ' . (int) $row['bbcode_id'];
+ $this->sql_query($sql);
+ }
+ $this->db->sql_freeresult($result);
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v30x/release_3_0_0.php b/phpBB/phpbb/db/migration/data/v30x/release_3_0_0.php
new file mode 100644
index 0000000000..41ade22a29
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v30x/release_3_0_0.php
@@ -0,0 +1,1177 @@
+<?php
+/**
+*
+* @package migration
+* @copyright (c) 2014 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\db\migration\data\v30x;
+
+class release_3_0_0 extends \phpbb\db\migration\migration
+{
+ public function effectively_installed()
+ {
+ return phpbb_version_compare($this->config['version'], '3.0.0', '>=');
+ }
+
+ public function update_schema()
+ {
+ return array(
+ 'add_tables' => array(
+ $this->table_prefix . 'attachments' => array(
+ 'COLUMNS' => array(
+ 'attach_id' => array('UINT', NULL, 'auto_increment'),
+ 'post_msg_id' => array('UINT', 0),
+ 'topic_id' => array('UINT', 0),
+ 'in_message' => array('BOOL', 0),
+ 'poster_id' => array('UINT', 0),
+ 'is_orphan' => array('BOOL', 1),
+ 'physical_filename' => array('VCHAR', ''),
+ 'real_filename' => array('VCHAR', ''),
+ 'download_count' => array('UINT', 0),
+ 'attach_comment' => array('TEXT_UNI', ''),
+ 'extension' => array('VCHAR:100', ''),
+ 'mimetype' => array('VCHAR:100', ''),
+ 'filesize' => array('UINT:20', 0),
+ 'filetime' => array('TIMESTAMP', 0),
+ 'thumbnail' => array('BOOL', 0),
+ ),
+ 'PRIMARY_KEY' => 'attach_id',
+ 'KEYS' => array(
+ 'filetime' => array('INDEX', 'filetime'),
+ 'post_msg_id' => array('INDEX', 'post_msg_id'),
+ 'topic_id' => array('INDEX', 'topic_id'),
+ 'poster_id' => array('INDEX', 'poster_id'),
+ 'is_orphan' => array('INDEX', 'is_orphan'),
+ ),
+ ),
+
+ $this->table_prefix . 'acl_groups' => array(
+ 'COLUMNS' => array(
+ 'group_id' => array('UINT', 0),
+ 'forum_id' => array('UINT', 0),
+ 'auth_option_id' => array('UINT', 0),
+ 'auth_role_id' => array('UINT', 0),
+ 'auth_setting' => array('TINT:2', 0),
+ ),
+ 'KEYS' => array(
+ 'group_id' => array('INDEX', 'group_id'),
+ 'auth_opt_id' => array('INDEX', 'auth_option_id'),
+ 'auth_role_id' => array('INDEX', 'auth_role_id'),
+ ),
+ ),
+
+ $this->table_prefix . 'acl_options' => array(
+ 'COLUMNS' => array(
+ 'auth_option_id' => array('UINT', NULL, 'auto_increment'),
+ 'auth_option' => array('VCHAR:50', ''),
+ 'is_global' => array('BOOL', 0),
+ 'is_local' => array('BOOL', 0),
+ 'founder_only' => array('BOOL', 0),
+ ),
+ 'PRIMARY_KEY' => 'auth_option_id',
+ 'KEYS' => array(
+ 'auth_option' => array('INDEX', 'auth_option'),
+ ),
+ ),
+
+ $this->table_prefix . 'acl_roles' => array(
+ 'COLUMNS' => array(
+ 'role_id' => array('UINT', NULL, 'auto_increment'),
+ 'role_name' => array('VCHAR_UNI', ''),
+ 'role_description' => array('TEXT_UNI', ''),
+ 'role_type' => array('VCHAR:10', ''),
+ 'role_order' => array('USINT', 0),
+ ),
+ 'PRIMARY_KEY' => 'role_id',
+ 'KEYS' => array(
+ 'role_type' => array('INDEX', 'role_type'),
+ 'role_order' => array('INDEX', 'role_order'),
+ ),
+ ),
+
+ $this->table_prefix . 'acl_roles_data' => array(
+ 'COLUMNS' => array(
+ 'role_id' => array('UINT', 0),
+ 'auth_option_id' => array('UINT', 0),
+ 'auth_setting' => array('TINT:2', 0),
+ ),
+ 'PRIMARY_KEY' => array('role_id', 'auth_option_id'),
+ 'KEYS' => array(
+ 'ath_op_id' => array('INDEX', 'auth_option_id'),
+ ),
+ ),
+
+ $this->table_prefix . 'acl_users' => array(
+ 'COLUMNS' => array(
+ 'user_id' => array('UINT', 0),
+ 'forum_id' => array('UINT', 0),
+ 'auth_option_id' => array('UINT', 0),
+ 'auth_role_id' => array('UINT', 0),
+ 'auth_setting' => array('TINT:2', 0),
+ ),
+ 'KEYS' => array(
+ 'user_id' => array('INDEX', 'user_id'),
+ 'auth_option_id' => array('INDEX', 'auth_option_id'),
+ 'auth_role_id' => array('INDEX', 'auth_role_id'),
+ ),
+ ),
+
+ $this->table_prefix . 'banlist' => array(
+ 'COLUMNS' => array(
+ 'ban_id' => array('UINT', NULL, 'auto_increment'),
+ 'ban_userid' => array('UINT', 0),
+ 'ban_ip' => array('VCHAR:40', ''),
+ 'ban_email' => array('VCHAR_UNI:100', ''),
+ 'ban_start' => array('TIMESTAMP', 0),
+ 'ban_end' => array('TIMESTAMP', 0),
+ 'ban_exclude' => array('BOOL', 0),
+ 'ban_reason' => array('VCHAR_UNI', ''),
+ 'ban_give_reason' => array('VCHAR_UNI', ''),
+ ),
+ 'PRIMARY_KEY' => 'ban_id',
+ 'KEYS' => array(
+ 'ban_end' => array('INDEX', 'ban_end'),
+ 'ban_user' => array('INDEX', array('ban_userid', 'ban_exclude')),
+ 'ban_email' => array('INDEX', array('ban_email', 'ban_exclude')),
+ 'ban_ip' => array('INDEX', array('ban_ip', 'ban_exclude')),
+ ),
+ ),
+
+ $this->table_prefix . 'bbcodes' => array(
+ 'COLUMNS' => array(
+ 'bbcode_id' => array('TINT:3', 0),
+ 'bbcode_tag' => array('VCHAR:16', ''),
+ 'bbcode_helpline' => array('VCHAR_UNI', ''),
+ 'display_on_posting' => array('BOOL', 0),
+ 'bbcode_match' => array('TEXT_UNI', ''),
+ 'bbcode_tpl' => array('MTEXT_UNI', ''),
+ 'first_pass_match' => array('MTEXT_UNI', ''),
+ 'first_pass_replace' => array('MTEXT_UNI', ''),
+ 'second_pass_match' => array('MTEXT_UNI', ''),
+ 'second_pass_replace' => array('MTEXT_UNI', ''),
+ ),
+ 'PRIMARY_KEY' => 'bbcode_id',
+ 'KEYS' => array(
+ 'display_on_post' => array('INDEX', 'display_on_posting'),
+ ),
+ ),
+
+ $this->table_prefix . 'bookmarks' => array(
+ 'COLUMNS' => array(
+ 'topic_id' => array('UINT', 0),
+ 'user_id' => array('UINT', 0),
+ ),
+ 'PRIMARY_KEY' => array('topic_id', 'user_id'),
+ ),
+
+ $this->table_prefix . 'bots' => array(
+ 'COLUMNS' => array(
+ 'bot_id' => array('UINT', NULL, 'auto_increment'),
+ 'bot_active' => array('BOOL', 1),
+ 'bot_name' => array('STEXT_UNI', ''),
+ 'user_id' => array('UINT', 0),
+ 'bot_agent' => array('VCHAR', ''),
+ 'bot_ip' => array('VCHAR', ''),
+ ),
+ 'PRIMARY_KEY' => 'bot_id',
+ 'KEYS' => array(
+ 'bot_active' => array('INDEX', 'bot_active'),
+ ),
+ ),
+
+ $this->table_prefix . 'config' => array(
+ 'COLUMNS' => array(
+ 'config_name' => array('VCHAR', ''),
+ 'config_value' => array('VCHAR_UNI', ''),
+ 'is_dynamic' => array('BOOL', 0),
+ ),
+ 'PRIMARY_KEY' => 'config_name',
+ 'KEYS' => array(
+ 'is_dynamic' => array('INDEX', 'is_dynamic'),
+ ),
+ ),
+
+ $this->table_prefix . 'confirm' => array(
+ 'COLUMNS' => array(
+ 'confirm_id' => array('CHAR:32', ''),
+ 'session_id' => array('CHAR:32', ''),
+ 'confirm_type' => array('TINT:3', 0),
+ 'code' => array('VCHAR:8', ''),
+ 'seed' => array('UINT:10', 0),
+ ),
+ 'PRIMARY_KEY' => array('session_id', 'confirm_id'),
+ 'KEYS' => array(
+ 'confirm_type' => array('INDEX', 'confirm_type'),
+ ),
+ ),
+
+ $this->table_prefix . 'disallow' => array(
+ 'COLUMNS' => array(
+ 'disallow_id' => array('UINT', NULL, 'auto_increment'),
+ 'disallow_username' => array('VCHAR_UNI:255', ''),
+ ),
+ 'PRIMARY_KEY' => 'disallow_id',
+ ),
+
+ $this->table_prefix . 'drafts' => array(
+ 'COLUMNS' => array(
+ 'draft_id' => array('UINT', NULL, 'auto_increment'),
+ 'user_id' => array('UINT', 0),
+ 'topic_id' => array('UINT', 0),
+ 'forum_id' => array('UINT', 0),
+ 'save_time' => array('TIMESTAMP', 0),
+ 'draft_subject' => array('XSTEXT_UNI', ''),
+ 'draft_message' => array('MTEXT_UNI', ''),
+ ),
+ 'PRIMARY_KEY' => 'draft_id',
+ 'KEYS' => array(
+ 'save_time' => array('INDEX', 'save_time'),
+ ),
+ ),
+
+ $this->table_prefix . 'extensions' => array(
+ 'COLUMNS' => array(
+ 'extension_id' => array('UINT', NULL, 'auto_increment'),
+ 'group_id' => array('UINT', 0),
+ 'extension' => array('VCHAR:100', ''),
+ ),
+ 'PRIMARY_KEY' => 'extension_id',
+ ),
+
+ $this->table_prefix . 'extension_groups' => array(
+ 'COLUMNS' => array(
+ 'group_id' => array('UINT', NULL, 'auto_increment'),
+ 'group_name' => array('VCHAR_UNI', ''),
+ 'cat_id' => array('TINT:2', 0),
+ 'allow_group' => array('BOOL', 0),
+ 'download_mode' => array('BOOL', 1),
+ 'upload_icon' => array('VCHAR', ''),
+ 'max_filesize' => array('UINT:20', 0),
+ 'allowed_forums' => array('TEXT', ''),
+ 'allow_in_pm' => array('BOOL', 0),
+ ),
+ 'PRIMARY_KEY' => 'group_id',
+ ),
+
+ $this->table_prefix . 'forums' => array(
+ 'COLUMNS' => array(
+ 'forum_id' => array('UINT', NULL, 'auto_increment'),
+ 'parent_id' => array('UINT', 0),
+ 'left_id' => array('UINT', 0),
+ 'right_id' => array('UINT', 0),
+ 'forum_parents' => array('MTEXT', ''),
+ 'forum_name' => array('STEXT_UNI', ''),
+ 'forum_desc' => array('TEXT_UNI', ''),
+ 'forum_desc_bitfield' => array('VCHAR:255', ''),
+ 'forum_desc_options' => array('UINT:11', 7),
+ 'forum_desc_uid' => array('VCHAR:8', ''),
+ 'forum_link' => array('VCHAR_UNI', ''),
+ 'forum_password' => array('VCHAR_UNI:40', ''),
+ 'forum_style' => array('USINT', 0),
+ 'forum_image' => array('VCHAR', ''),
+ 'forum_rules' => array('TEXT_UNI', ''),
+ 'forum_rules_link' => array('VCHAR_UNI', ''),
+ 'forum_rules_bitfield' => array('VCHAR:255', ''),
+ 'forum_rules_options' => array('UINT:11', 7),
+ 'forum_rules_uid' => array('VCHAR:8', ''),
+ 'forum_topics_per_page' => array('TINT:4', 0),
+ 'forum_type' => array('TINT:4', 0),
+ 'forum_status' => array('TINT:4', 0),
+ 'forum_posts' => array('UINT', 0),
+ 'forum_topics' => array('UINT', 0),
+ 'forum_topics_real' => array('UINT', 0),
+ 'forum_last_post_id' => array('UINT', 0),
+ 'forum_last_poster_id' => array('UINT', 0),
+ 'forum_last_post_subject' => array('XSTEXT_UNI', ''),
+ 'forum_last_post_time' => array('TIMESTAMP', 0),
+ 'forum_last_poster_name'=> array('VCHAR_UNI', ''),
+ 'forum_last_poster_colour'=> array('VCHAR:6', ''),
+ 'forum_flags' => array('TINT:4', 32),
+ 'display_on_index' => array('BOOL', 1),
+ 'enable_indexing' => array('BOOL', 1),
+ 'enable_icons' => array('BOOL', 1),
+ 'enable_prune' => array('BOOL', 0),
+ 'prune_next' => array('TIMESTAMP', 0),
+ 'prune_days' => array('UINT', 0),
+ 'prune_viewed' => array('UINT', 0),
+ 'prune_freq' => array('UINT', 0),
+ ),
+ 'PRIMARY_KEY' => 'forum_id',
+ 'KEYS' => array(
+ 'left_right_id' => array('INDEX', array('left_id', 'right_id')),
+ 'forum_lastpost_id' => array('INDEX', 'forum_last_post_id'),
+ ),
+ ),
+
+ $this->table_prefix . 'forums_access' => array(
+ 'COLUMNS' => array(
+ 'forum_id' => array('UINT', 0),
+ 'user_id' => array('UINT', 0),
+ 'session_id' => array('CHAR:32', ''),
+ ),
+ 'PRIMARY_KEY' => array('forum_id', 'user_id', 'session_id'),
+ ),
+
+ $this->table_prefix . 'forums_track' => array(
+ 'COLUMNS' => array(
+ 'user_id' => array('UINT', 0),
+ 'forum_id' => array('UINT', 0),
+ 'mark_time' => array('TIMESTAMP', 0),
+ ),
+ 'PRIMARY_KEY' => array('user_id', 'forum_id'),
+ ),
+
+ $this->table_prefix . 'forums_watch' => array(
+ 'COLUMNS' => array(
+ 'forum_id' => array('UINT', 0),
+ 'user_id' => array('UINT', 0),
+ 'notify_status' => array('BOOL', 0),
+ ),
+ 'KEYS' => array(
+ 'forum_id' => array('INDEX', 'forum_id'),
+ 'user_id' => array('INDEX', 'user_id'),
+ 'notify_stat' => array('INDEX', 'notify_status'),
+ ),
+ ),
+
+ $this->table_prefix . 'groups' => array(
+ 'COLUMNS' => array(
+ 'group_id' => array('UINT', NULL, 'auto_increment'),
+ 'group_type' => array('TINT:4', 1),
+ 'group_founder_manage' => array('BOOL', 0),
+ 'group_name' => array('VCHAR_CI', ''),
+ 'group_desc' => array('TEXT_UNI', ''),
+ 'group_desc_bitfield' => array('VCHAR:255', ''),
+ 'group_desc_options' => array('UINT:11', 7),
+ 'group_desc_uid' => array('VCHAR:8', ''),
+ 'group_display' => array('BOOL', 0),
+ 'group_avatar' => array('VCHAR', ''),
+ 'group_avatar_type' => array('TINT:2', 0),
+ 'group_avatar_width' => array('USINT', 0),
+ 'group_avatar_height' => array('USINT', 0),
+ 'group_rank' => array('UINT', 0),
+ 'group_colour' => array('VCHAR:6', ''),
+ 'group_sig_chars' => array('UINT', 0),
+ 'group_receive_pm' => array('BOOL', 0),
+ 'group_message_limit' => array('UINT', 0),
+ 'group_legend' => array('BOOL', 1),
+ ),
+ 'PRIMARY_KEY' => 'group_id',
+ 'KEYS' => array(
+ 'group_legend' => array('INDEX', 'group_legend'),
+ ),
+ ),
+
+ $this->table_prefix . 'icons' => array(
+ 'COLUMNS' => array(
+ 'icons_id' => array('UINT', NULL, 'auto_increment'),
+ 'icons_url' => array('VCHAR', ''),
+ 'icons_width' => array('TINT:4', 0),
+ 'icons_height' => array('TINT:4', 0),
+ 'icons_order' => array('UINT', 0),
+ 'display_on_posting' => array('BOOL', 1),
+ ),
+ 'PRIMARY_KEY' => 'icons_id',
+ 'KEYS' => array(
+ 'display_on_posting' => array('INDEX', 'display_on_posting'),
+ ),
+ ),
+
+ $this->table_prefix . 'lang' => array(
+ 'COLUMNS' => array(
+ 'lang_id' => array('TINT:4', NULL, 'auto_increment'),
+ 'lang_iso' => array('VCHAR:30', ''),
+ 'lang_dir' => array('VCHAR:30', ''),
+ 'lang_english_name' => array('VCHAR_UNI:100', ''),
+ 'lang_local_name' => array('VCHAR_UNI:255', ''),
+ 'lang_author' => array('VCHAR_UNI:255', ''),
+ ),
+ 'PRIMARY_KEY' => 'lang_id',
+ 'KEYS' => array(
+ 'lang_iso' => array('INDEX', 'lang_iso'),
+ ),
+ ),
+
+ $this->table_prefix . 'log' => array(
+ 'COLUMNS' => array(
+ 'log_id' => array('UINT', NULL, 'auto_increment'),
+ 'log_type' => array('TINT:4', 0),
+ 'user_id' => array('UINT', 0),
+ 'forum_id' => array('UINT', 0),
+ 'topic_id' => array('UINT', 0),
+ 'reportee_id' => array('UINT', 0),
+ 'log_ip' => array('VCHAR:40', ''),
+ 'log_time' => array('TIMESTAMP', 0),
+ 'log_operation' => array('TEXT_UNI', ''),
+ 'log_data' => array('MTEXT_UNI', ''),
+ ),
+ 'PRIMARY_KEY' => 'log_id',
+ 'KEYS' => array(
+ 'log_type' => array('INDEX', 'log_type'),
+ 'forum_id' => array('INDEX', 'forum_id'),
+ 'topic_id' => array('INDEX', 'topic_id'),
+ 'reportee_id' => array('INDEX', 'reportee_id'),
+ 'user_id' => array('INDEX', 'user_id'),
+ ),
+ ),
+
+ $this->table_prefix . 'moderator_cache' => array(
+ 'COLUMNS' => array(
+ 'forum_id' => array('UINT', 0),
+ 'user_id' => array('UINT', 0),
+ 'username' => array('VCHAR_UNI:255', ''),
+ 'group_id' => array('UINT', 0),
+ 'group_name' => array('VCHAR_UNI', ''),
+ 'display_on_index' => array('BOOL', 1),
+ ),
+ 'KEYS' => array(
+ 'disp_idx' => array('INDEX', 'display_on_index'),
+ 'forum_id' => array('INDEX', 'forum_id'),
+ ),
+ ),
+
+ $this->table_prefix . 'modules' => array(
+ 'COLUMNS' => array(
+ 'module_id' => array('UINT', NULL, 'auto_increment'),
+ 'module_enabled' => array('BOOL', 1),
+ 'module_display' => array('BOOL', 1),
+ 'module_basename' => array('VCHAR', ''),
+ 'module_class' => array('VCHAR:10', ''),
+ 'parent_id' => array('UINT', 0),
+ 'left_id' => array('UINT', 0),
+ 'right_id' => array('UINT', 0),
+ 'module_langname' => array('VCHAR', ''),
+ 'module_mode' => array('VCHAR', ''),
+ 'module_auth' => array('VCHAR', ''),
+ ),
+ 'PRIMARY_KEY' => 'module_id',
+ 'KEYS' => array(
+ 'left_right_id' => array('INDEX', array('left_id', 'right_id')),
+ 'module_enabled' => array('INDEX', 'module_enabled'),
+ 'class_left_id' => array('INDEX', array('module_class', 'left_id')),
+ ),
+ ),
+
+ $this->table_prefix . 'poll_options' => array(
+ 'COLUMNS' => array(
+ 'poll_option_id' => array('TINT:4', 0),
+ 'topic_id' => array('UINT', 0),
+ 'poll_option_text' => array('TEXT_UNI', ''),
+ 'poll_option_total' => array('UINT', 0),
+ ),
+ 'KEYS' => array(
+ 'poll_opt_id' => array('INDEX', 'poll_option_id'),
+ 'topic_id' => array('INDEX', 'topic_id'),
+ ),
+ ),
+
+ $this->table_prefix . 'poll_votes' => array(
+ 'COLUMNS' => array(
+ 'topic_id' => array('UINT', 0),
+ 'poll_option_id' => array('TINT:4', 0),
+ 'vote_user_id' => array('UINT', 0),
+ 'vote_user_ip' => array('VCHAR:40', ''),
+ ),
+ 'KEYS' => array(
+ 'topic_id' => array('INDEX', 'topic_id'),
+ 'vote_user_id' => array('INDEX', 'vote_user_id'),
+ 'vote_user_ip' => array('INDEX', 'vote_user_ip'),
+ ),
+ ),
+
+ $this->table_prefix . 'posts' => array(
+ 'COLUMNS' => array(
+ 'post_id' => array('UINT', NULL, 'auto_increment'),
+ 'topic_id' => array('UINT', 0),
+ 'forum_id' => array('UINT', 0),
+ 'poster_id' => array('UINT', 0),
+ 'icon_id' => array('UINT', 0),
+ 'poster_ip' => array('VCHAR:40', ''),
+ 'post_time' => array('TIMESTAMP', 0),
+ 'post_approved' => array('BOOL', 1),
+ 'post_reported' => array('BOOL', 0),
+ 'enable_bbcode' => array('BOOL', 1),
+ 'enable_smilies' => array('BOOL', 1),
+ 'enable_magic_url' => array('BOOL', 1),
+ 'enable_sig' => array('BOOL', 1),
+ 'post_username' => array('VCHAR_UNI:255', ''),
+ 'post_subject' => array('XSTEXT_UNI', '', 'true_sort'),
+ 'post_text' => array('MTEXT_UNI', ''),
+ 'post_checksum' => array('VCHAR:32', ''),
+ 'post_attachment' => array('BOOL', 0),
+ 'bbcode_bitfield' => array('VCHAR:255', ''),
+ 'bbcode_uid' => array('VCHAR:8', ''),
+ 'post_postcount' => array('BOOL', 1),
+ 'post_edit_time' => array('TIMESTAMP', 0),
+ 'post_edit_reason' => array('STEXT_UNI', ''),
+ 'post_edit_user' => array('UINT', 0),
+ 'post_edit_count' => array('USINT', 0),
+ 'post_edit_locked' => array('BOOL', 0),
+ ),
+ 'PRIMARY_KEY' => 'post_id',
+ 'KEYS' => array(
+ 'forum_id' => array('INDEX', 'forum_id'),
+ 'topic_id' => array('INDEX', 'topic_id'),
+ 'poster_ip' => array('INDEX', 'poster_ip'),
+ 'poster_id' => array('INDEX', 'poster_id'),
+ 'post_approved' => array('INDEX', 'post_approved'),
+ 'tid_post_time' => array('INDEX', array('topic_id', 'post_time')),
+ ),
+ ),
+
+ $this->table_prefix . 'privmsgs' => array(
+ 'COLUMNS' => array(
+ 'msg_id' => array('UINT', NULL, 'auto_increment'),
+ 'root_level' => array('UINT', 0),
+ 'author_id' => array('UINT', 0),
+ 'icon_id' => array('UINT', 0),
+ 'author_ip' => array('VCHAR:40', ''),
+ 'message_time' => array('TIMESTAMP', 0),
+ 'enable_bbcode' => array('BOOL', 1),
+ 'enable_smilies' => array('BOOL', 1),
+ 'enable_magic_url' => array('BOOL', 1),
+ 'enable_sig' => array('BOOL', 1),
+ 'message_subject' => array('XSTEXT_UNI', ''),
+ 'message_text' => array('MTEXT_UNI', ''),
+ 'message_edit_reason' => array('STEXT_UNI', ''),
+ 'message_edit_user' => array('UINT', 0),
+ 'message_attachment' => array('BOOL', 0),
+ 'bbcode_bitfield' => array('VCHAR:255', ''),
+ 'bbcode_uid' => array('VCHAR:8', ''),
+ 'message_edit_time' => array('TIMESTAMP', 0),
+ 'message_edit_count' => array('USINT', 0),
+ 'to_address' => array('TEXT_UNI', ''),
+ 'bcc_address' => array('TEXT_UNI', ''),
+ ),
+ 'PRIMARY_KEY' => 'msg_id',
+ 'KEYS' => array(
+ 'author_ip' => array('INDEX', 'author_ip'),
+ 'message_time' => array('INDEX', 'message_time'),
+ 'author_id' => array('INDEX', 'author_id'),
+ 'root_level' => array('INDEX', 'root_level'),
+ ),
+ ),
+
+ $this->table_prefix . 'privmsgs_folder' => array(
+ 'COLUMNS' => array(
+ 'folder_id' => array('UINT', NULL, 'auto_increment'),
+ 'user_id' => array('UINT', 0),
+ 'folder_name' => array('VCHAR_UNI', ''),
+ 'pm_count' => array('UINT', 0),
+ ),
+ 'PRIMARY_KEY' => 'folder_id',
+ 'KEYS' => array(
+ 'user_id' => array('INDEX', 'user_id'),
+ ),
+ ),
+
+ $this->table_prefix . 'privmsgs_rules' => array(
+ 'COLUMNS' => array(
+ 'rule_id' => array('UINT', NULL, 'auto_increment'),
+ 'user_id' => array('UINT', 0),
+ 'rule_check' => array('UINT', 0),
+ 'rule_connection' => array('UINT', 0),
+ 'rule_string' => array('VCHAR_UNI', ''),
+ 'rule_user_id' => array('UINT', 0),
+ 'rule_group_id' => array('UINT', 0),
+ 'rule_action' => array('UINT', 0),
+ 'rule_folder_id' => array('INT:11', 0),
+ ),
+ 'PRIMARY_KEY' => 'rule_id',
+ 'KEYS' => array(
+ 'user_id' => array('INDEX', 'user_id'),
+ ),
+ ),
+
+ $this->table_prefix . 'privmsgs_to' => array(
+ 'COLUMNS' => array(
+ 'msg_id' => array('UINT', 0),
+ 'user_id' => array('UINT', 0),
+ 'author_id' => array('UINT', 0),
+ 'pm_deleted' => array('BOOL', 0),
+ 'pm_new' => array('BOOL', 1),
+ 'pm_unread' => array('BOOL', 1),
+ 'pm_replied' => array('BOOL', 0),
+ 'pm_marked' => array('BOOL', 0),
+ 'pm_forwarded' => array('BOOL', 0),
+ 'folder_id' => array('INT:11', 0),
+ ),
+ 'KEYS' => array(
+ 'msg_id' => array('INDEX', 'msg_id'),
+ 'author_id' => array('INDEX', 'author_id'),
+ 'usr_flder_id' => array('INDEX', array('user_id', 'folder_id')),
+ ),
+ ),
+
+ $this->table_prefix . 'profile_fields' => array(
+ 'COLUMNS' => array(
+ 'field_id' => array('UINT', NULL, 'auto_increment'),
+ 'field_name' => array('VCHAR_UNI', ''),
+ 'field_type' => array('TINT:4', 0),
+ 'field_ident' => array('VCHAR:20', ''),
+ 'field_length' => array('VCHAR:20', ''),
+ 'field_minlen' => array('VCHAR', ''),
+ 'field_maxlen' => array('VCHAR', ''),
+ 'field_novalue' => array('VCHAR_UNI', ''),
+ 'field_default_value' => array('VCHAR_UNI', ''),
+ 'field_validation' => array('VCHAR_UNI:20', ''),
+ 'field_required' => array('BOOL', 0),
+ 'field_show_on_reg' => array('BOOL', 0),
+ 'field_hide' => array('BOOL', 0),
+ 'field_no_view' => array('BOOL', 0),
+ 'field_active' => array('BOOL', 0),
+ 'field_order' => array('UINT', 0),
+ ),
+ 'PRIMARY_KEY' => 'field_id',
+ 'KEYS' => array(
+ 'fld_type' => array('INDEX', 'field_type'),
+ 'fld_ordr' => array('INDEX', 'field_order'),
+ ),
+ ),
+
+ $this->table_prefix . 'profile_fields_data' => array(
+ 'COLUMNS' => array(
+ 'user_id' => array('UINT', 0),
+ ),
+ 'PRIMARY_KEY' => 'user_id',
+ ),
+
+ $this->table_prefix . 'profile_fields_lang' => array(
+ 'COLUMNS' => array(
+ 'field_id' => array('UINT', 0),
+ 'lang_id' => array('UINT', 0),
+ 'option_id' => array('UINT', 0),
+ 'field_type' => array('TINT:4', 0),
+ 'lang_value' => array('VCHAR_UNI', ''),
+ ),
+ 'PRIMARY_KEY' => array('field_id', 'lang_id', 'option_id'),
+ ),
+
+ $this->table_prefix . 'profile_lang' => array(
+ 'COLUMNS' => array(
+ 'field_id' => array('UINT', 0),
+ 'lang_id' => array('UINT', 0),
+ 'lang_name' => array('VCHAR_UNI', ''),
+ 'lang_explain' => array('TEXT_UNI', ''),
+ 'lang_default_value' => array('VCHAR_UNI', ''),
+ ),
+ 'PRIMARY_KEY' => array('field_id', 'lang_id'),
+ ),
+
+ $this->table_prefix . 'ranks' => array(
+ 'COLUMNS' => array(
+ 'rank_id' => array('UINT', NULL, 'auto_increment'),
+ 'rank_title' => array('VCHAR_UNI', ''),
+ 'rank_min' => array('UINT', 0),
+ 'rank_special' => array('BOOL', 0),
+ 'rank_image' => array('VCHAR', ''),
+ ),
+ 'PRIMARY_KEY' => 'rank_id',
+ ),
+
+ $this->table_prefix . 'reports' => array(
+ 'COLUMNS' => array(
+ 'report_id' => array('UINT', NULL, 'auto_increment'),
+ 'reason_id' => array('USINT', 0),
+ 'post_id' => array('UINT', 0),
+ 'user_id' => array('UINT', 0),
+ 'user_notify' => array('BOOL', 0),
+ 'report_closed' => array('BOOL', 0),
+ 'report_time' => array('TIMESTAMP', 0),
+ 'report_text' => array('MTEXT_UNI', ''),
+ ),
+ 'PRIMARY_KEY' => 'report_id',
+ ),
+
+ $this->table_prefix . 'reports_reasons' => array(
+ 'COLUMNS' => array(
+ 'reason_id' => array('USINT', NULL, 'auto_increment'),
+ 'reason_title' => array('VCHAR_UNI', ''),
+ 'reason_description' => array('MTEXT_UNI', ''),
+ 'reason_order' => array('USINT', 0),
+ ),
+ 'PRIMARY_KEY' => 'reason_id',
+ ),
+
+ $this->table_prefix . 'search_results' => array(
+ 'COLUMNS' => array(
+ 'search_key' => array('VCHAR:32', ''),
+ 'search_time' => array('TIMESTAMP', 0),
+ 'search_keywords' => array('MTEXT_UNI', ''),
+ 'search_authors' => array('MTEXT', ''),
+ ),
+ 'PRIMARY_KEY' => 'search_key',
+ ),
+
+ $this->table_prefix . 'search_wordlist' => array(
+ 'COLUMNS' => array(
+ 'word_id' => array('UINT', NULL, 'auto_increment'),
+ 'word_text' => array('VCHAR_UNI', ''),
+ 'word_common' => array('BOOL', 0),
+ 'word_count' => array('UINT', 0),
+ ),
+ 'PRIMARY_KEY' => 'word_id',
+ 'KEYS' => array(
+ 'wrd_txt' => array('UNIQUE', 'word_text'),
+ 'wrd_cnt' => array('INDEX', 'word_count'),
+ ),
+ ),
+
+ $this->table_prefix . 'search_wordmatch' => array(
+ 'COLUMNS' => array(
+ 'post_id' => array('UINT', 0),
+ 'word_id' => array('UINT', 0),
+ 'title_match' => array('BOOL', 0),
+ ),
+ 'KEYS' => array(
+ 'unq_mtch' => array('UNIQUE', array('word_id', 'post_id', 'title_match')),
+ 'word_id' => array('INDEX', 'word_id'),
+ 'post_id' => array('INDEX', 'post_id'),
+ ),
+ ),
+
+ $this->table_prefix . 'sessions' => array(
+ 'COLUMNS' => array(
+ 'session_id' => array('CHAR:32', ''),
+ 'session_user_id' => array('UINT', 0),
+ 'session_last_visit' => array('TIMESTAMP', 0),
+ 'session_start' => array('TIMESTAMP', 0),
+ 'session_time' => array('TIMESTAMP', 0),
+ 'session_ip' => array('VCHAR:40', ''),
+ 'session_browser' => array('VCHAR:150', ''),
+ 'session_forwarded_for' => array('VCHAR:255', ''),
+ 'session_page' => array('VCHAR_UNI', ''),
+ 'session_viewonline' => array('BOOL', 1),
+ 'session_autologin' => array('BOOL', 0),
+ 'session_admin' => array('BOOL', 0),
+ ),
+ 'PRIMARY_KEY' => 'session_id',
+ 'KEYS' => array(
+ 'session_time' => array('INDEX', 'session_time'),
+ 'session_user_id' => array('INDEX', 'session_user_id'),
+ ),
+ ),
+
+ $this->table_prefix . 'sessions_keys' => array(
+ 'COLUMNS' => array(
+ 'key_id' => array('CHAR:32', ''),
+ 'user_id' => array('UINT', 0),
+ 'last_ip' => array('VCHAR:40', ''),
+ 'last_login' => array('TIMESTAMP', 0),
+ ),
+ 'PRIMARY_KEY' => array('key_id', 'user_id'),
+ 'KEYS' => array(
+ 'last_login' => array('INDEX', 'last_login'),
+ ),
+ ),
+
+ $this->table_prefix . 'sitelist' => array(
+ 'COLUMNS' => array(
+ 'site_id' => array('UINT', NULL, 'auto_increment'),
+ 'site_ip' => array('VCHAR:40', ''),
+ 'site_hostname' => array('VCHAR', ''),
+ 'ip_exclude' => array('BOOL', 0),
+ ),
+ 'PRIMARY_KEY' => 'site_id',
+ ),
+
+ $this->table_prefix . 'smilies' => array(
+ 'COLUMNS' => array(
+ 'smiley_id' => array('UINT', NULL, 'auto_increment'),
+// We may want to set 'code' to VCHAR:50 or check if unicode support is possible... at the moment only ASCII characters are allowed.
+ 'code' => array('VCHAR_UNI:50', ''),
+ 'emotion' => array('VCHAR_UNI:50', ''),
+ 'smiley_url' => array('VCHAR:50', ''),
+ 'smiley_width' => array('USINT', 0),
+ 'smiley_height' => array('USINT', 0),
+ 'smiley_order' => array('UINT', 0),
+ 'display_on_posting'=> array('BOOL', 1),
+ ),
+ 'PRIMARY_KEY' => 'smiley_id',
+ 'KEYS' => array(
+ 'display_on_post' => array('INDEX', 'display_on_posting'),
+ ),
+ ),
+
+ $this->table_prefix . 'styles' => array(
+ 'COLUMNS' => array(
+ 'style_id' => array('USINT', NULL, 'auto_increment'),
+ 'style_name' => array('VCHAR_UNI:255', ''),
+ 'style_copyright' => array('VCHAR_UNI', ''),
+ 'style_active' => array('BOOL', 1),
+ 'template_id' => array('USINT', 0),
+ 'theme_id' => array('USINT', 0),
+ 'imageset_id' => array('USINT', 0),
+ ),
+ 'PRIMARY_KEY' => 'style_id',
+ 'KEYS' => array(
+ 'style_name' => array('UNIQUE', 'style_name'),
+ 'template_id' => array('INDEX', 'template_id'),
+ 'theme_id' => array('INDEX', 'theme_id'),
+ 'imageset_id' => array('INDEX', 'imageset_id'),
+ ),
+ ),
+
+ $this->table_prefix . 'styles_template' => array(
+ 'COLUMNS' => array(
+ 'template_id' => array('USINT', NULL, 'auto_increment'),
+ 'template_name' => array('VCHAR_UNI:255', ''),
+ 'template_copyright' => array('VCHAR_UNI', ''),
+ 'template_path' => array('VCHAR:100', ''),
+ 'bbcode_bitfield' => array('VCHAR:255', 'kNg='),
+ 'template_storedb' => array('BOOL', 0),
+ ),
+ 'PRIMARY_KEY' => 'template_id',
+ 'KEYS' => array(
+ 'tmplte_nm' => array('UNIQUE', 'template_name'),
+ ),
+ ),
+
+ $this->table_prefix . 'styles_template_data' => array(
+ 'COLUMNS' => array(
+ 'template_id' => array('USINT', 0),
+ 'template_filename' => array('VCHAR:100', ''),
+ 'template_included' => array('TEXT', ''),
+ 'template_mtime' => array('TIMESTAMP', 0),
+ 'template_data' => array('MTEXT_UNI', ''),
+ ),
+ 'KEYS' => array(
+ 'tid' => array('INDEX', 'template_id'),
+ 'tfn' => array('INDEX', 'template_filename'),
+ ),
+ ),
+
+ $this->table_prefix . 'styles_theme' => array(
+ 'COLUMNS' => array(
+ 'theme_id' => array('USINT', NULL, 'auto_increment'),
+ 'theme_name' => array('VCHAR_UNI:255', ''),
+ 'theme_copyright' => array('VCHAR_UNI', ''),
+ 'theme_path' => array('VCHAR:100', ''),
+ 'theme_storedb' => array('BOOL', 0),
+ 'theme_mtime' => array('TIMESTAMP', 0),
+ 'theme_data' => array('MTEXT_UNI', ''),
+ ),
+ 'PRIMARY_KEY' => 'theme_id',
+ 'KEYS' => array(
+ 'theme_name' => array('UNIQUE', 'theme_name'),
+ ),
+ ),
+
+ $this->table_prefix . 'styles_imageset' => array(
+ 'COLUMNS' => array(
+ 'imageset_id' => array('USINT', NULL, 'auto_increment'),
+ 'imageset_name' => array('VCHAR_UNI:255', ''),
+ 'imageset_copyright' => array('VCHAR_UNI', ''),
+ 'imageset_path' => array('VCHAR:100', ''),
+ ),
+ 'PRIMARY_KEY' => 'imageset_id',
+ 'KEYS' => array(
+ 'imgset_nm' => array('UNIQUE', 'imageset_name'),
+ ),
+ ),
+
+ $this->table_prefix . 'styles_imageset_data' => array(
+ 'COLUMNS' => array(
+ 'image_id' => array('USINT', NULL, 'auto_increment'),
+ 'image_name' => array('VCHAR:200', ''),
+ 'image_filename' => array('VCHAR:200', ''),
+ 'image_lang' => array('VCHAR:30', ''),
+ 'image_height' => array('USINT', 0),
+ 'image_width' => array('USINT', 0),
+ 'imageset_id' => array('USINT', 0),
+ ),
+ 'PRIMARY_KEY' => 'image_id',
+ 'KEYS' => array(
+ 'i_d' => array('INDEX', 'imageset_id'),
+ ),
+ ),
+
+ $this->table_prefix . 'topics' => array(
+ 'COLUMNS' => array(
+ 'topic_id' => array('UINT', NULL, 'auto_increment'),
+ 'forum_id' => array('UINT', 0),
+ 'icon_id' => array('UINT', 0),
+ 'topic_attachment' => array('BOOL', 0),
+ 'topic_approved' => array('BOOL', 1),
+ 'topic_reported' => array('BOOL', 0),
+ 'topic_title' => array('XSTEXT_UNI', '', 'true_sort'),
+ 'topic_poster' => array('UINT', 0),
+ 'topic_time' => array('TIMESTAMP', 0),
+ 'topic_time_limit' => array('TIMESTAMP', 0),
+ 'topic_views' => array('UINT', 0),
+ 'topic_replies' => array('UINT', 0),
+ 'topic_replies_real' => array('UINT', 0),
+ 'topic_status' => array('TINT:3', 0),
+ 'topic_type' => array('TINT:3', 0),
+ 'topic_first_post_id' => array('UINT', 0),
+ 'topic_first_poster_name' => array('VCHAR_UNI', ''),
+ 'topic_first_poster_colour' => array('VCHAR:6', ''),
+ 'topic_last_post_id' => array('UINT', 0),
+ 'topic_last_poster_id' => array('UINT', 0),
+ 'topic_last_poster_name' => array('VCHAR_UNI', ''),
+ 'topic_last_poster_colour' => array('VCHAR:6', ''),
+ 'topic_last_post_subject' => array('XSTEXT_UNI', ''),
+ 'topic_last_post_time' => array('TIMESTAMP', 0),
+ 'topic_last_view_time' => array('TIMESTAMP', 0),
+ 'topic_moved_id' => array('UINT', 0),
+ 'topic_bumped' => array('BOOL', 0),
+ 'topic_bumper' => array('UINT', 0),
+ 'poll_title' => array('STEXT_UNI', ''),
+ 'poll_start' => array('TIMESTAMP', 0),
+ 'poll_length' => array('TIMESTAMP', 0),
+ 'poll_max_options' => array('TINT:4', 1),
+ 'poll_last_vote' => array('TIMESTAMP', 0),
+ 'poll_vote_change' => array('BOOL', 0),
+ ),
+ 'PRIMARY_KEY' => 'topic_id',
+ 'KEYS' => array(
+ 'forum_id' => array('INDEX', 'forum_id'),
+ 'forum_id_type' => array('INDEX', array('forum_id', 'topic_type')),
+ 'last_post_time' => array('INDEX', 'topic_last_post_time'),
+ 'topic_approved' => array('INDEX', 'topic_approved'),
+ 'forum_appr_last' => array('INDEX', array('forum_id', 'topic_approved', 'topic_last_post_id')),
+ 'fid_time_moved' => array('INDEX', array('forum_id', 'topic_last_post_time', 'topic_moved_id')),
+ ),
+ ),
+
+ $this->table_prefix . 'topics_track' => array(
+ 'COLUMNS' => array(
+ 'user_id' => array('UINT', 0),
+ 'topic_id' => array('UINT', 0),
+ 'forum_id' => array('UINT', 0),
+ 'mark_time' => array('TIMESTAMP', 0),
+ ),
+ 'PRIMARY_KEY' => array('user_id', 'topic_id'),
+ 'KEYS' => array(
+ 'forum_id' => array('INDEX', 'forum_id'),
+ ),
+ ),
+
+ $this->table_prefix . 'topics_posted' => array(
+ 'COLUMNS' => array(
+ 'user_id' => array('UINT', 0),
+ 'topic_id' => array('UINT', 0),
+ 'topic_posted' => array('BOOL', 0),
+ ),
+ 'PRIMARY_KEY' => array('user_id', 'topic_id'),
+ ),
+
+ $this->table_prefix . 'topics_watch' => array(
+ 'COLUMNS' => array(
+ 'topic_id' => array('UINT', 0),
+ 'user_id' => array('UINT', 0),
+ 'notify_status' => array('BOOL', 0),
+ ),
+ 'KEYS' => array(
+ 'topic_id' => array('INDEX', 'topic_id'),
+ 'user_id' => array('INDEX', 'user_id'),
+ 'notify_stat' => array('INDEX', 'notify_status'),
+ ),
+ ),
+
+ $this->table_prefix . 'user_group' => array(
+ 'COLUMNS' => array(
+ 'group_id' => array('UINT', 0),
+ 'user_id' => array('UINT', 0),
+ 'group_leader' => array('BOOL', 0),
+ 'user_pending' => array('BOOL', 1),
+ ),
+ 'KEYS' => array(
+ 'group_id' => array('INDEX', 'group_id'),
+ 'user_id' => array('INDEX', 'user_id'),
+ 'group_leader' => array('INDEX', 'group_leader'),
+ ),
+ ),
+
+ $this->table_prefix . 'users' => array(
+ 'COLUMNS' => array(
+ 'user_id' => array('UINT', NULL, 'auto_increment'),
+ 'user_type' => array('TINT:2', 0),
+ 'group_id' => array('UINT', 3),
+ 'user_permissions' => array('MTEXT', ''),
+ 'user_perm_from' => array('UINT', 0),
+ 'user_ip' => array('VCHAR:40', ''),
+ 'user_regdate' => array('TIMESTAMP', 0),
+ 'username' => array('VCHAR_CI', ''),
+ 'username_clean' => array('VCHAR_CI', ''),
+ 'user_password' => array('VCHAR_UNI:40', ''),
+ 'user_passchg' => array('TIMESTAMP', 0),
+ 'user_pass_convert' => array('BOOL', 0),
+ 'user_email' => array('VCHAR_UNI:100', ''),
+ 'user_email_hash' => array('BINT', 0),
+ 'user_birthday' => array('VCHAR:10', ''),
+ 'user_lastvisit' => array('TIMESTAMP', 0),
+ 'user_lastmark' => array('TIMESTAMP', 0),
+ 'user_lastpost_time' => array('TIMESTAMP', 0),
+ 'user_lastpage' => array('VCHAR_UNI:200', ''),
+ 'user_last_confirm_key' => array('VCHAR:10', ''),
+ 'user_last_search' => array('TIMESTAMP', 0),
+ 'user_warnings' => array('TINT:4', 0),
+ 'user_last_warning' => array('TIMESTAMP', 0),
+ 'user_login_attempts' => array('TINT:4', 0),
+ 'user_inactive_reason' => array('TINT:2', 0),
+ 'user_inactive_time' => array('TIMESTAMP', 0),
+ 'user_posts' => array('UINT', 0),
+ 'user_lang' => array('VCHAR:30', ''),
+ 'user_timezone' => array('DECIMAL', 0),
+ 'user_dst' => array('BOOL', 0),
+ 'user_dateformat' => array('VCHAR_UNI:30', 'd M Y H:i'),
+ 'user_style' => array('USINT', 0),
+ 'user_rank' => array('UINT', 0),
+ 'user_colour' => array('VCHAR:6', ''),
+ 'user_new_privmsg' => array('INT:4', 0),
+ 'user_unread_privmsg' => array('INT:4', 0),
+ 'user_last_privmsg' => array('TIMESTAMP', 0),
+ 'user_message_rules' => array('BOOL', 0),
+ 'user_full_folder' => array('INT:11', -3),
+ 'user_emailtime' => array('TIMESTAMP', 0),
+ 'user_topic_show_days' => array('USINT', 0),
+ 'user_topic_sortby_type' => array('VCHAR:1', 't'),
+ 'user_topic_sortby_dir' => array('VCHAR:1', 'd'),
+ 'user_post_show_days' => array('USINT', 0),
+ 'user_post_sortby_type' => array('VCHAR:1', 't'),
+ 'user_post_sortby_dir' => array('VCHAR:1', 'a'),
+ 'user_notify' => array('BOOL', 0),
+ 'user_notify_pm' => array('BOOL', 1),
+ 'user_notify_type' => array('TINT:4', 0),
+ 'user_allow_pm' => array('BOOL', 1),
+ 'user_allow_viewonline' => array('BOOL', 1),
+ 'user_allow_viewemail' => array('BOOL', 1),
+ 'user_allow_massemail' => array('BOOL', 1),
+ 'user_options' => array('UINT:11', 895),
+ 'user_avatar' => array('VCHAR', ''),
+ 'user_avatar_type' => array('TINT:2', 0),
+ 'user_avatar_width' => array('USINT', 0),
+ 'user_avatar_height' => array('USINT', 0),
+ 'user_sig' => array('MTEXT_UNI', ''),
+ 'user_sig_bbcode_uid' => array('VCHAR:8', ''),
+ 'user_sig_bbcode_bitfield' => array('VCHAR:255', ''),
+ 'user_from' => array('VCHAR_UNI:100', ''),
+ 'user_icq' => array('VCHAR:15', ''),
+ 'user_aim' => array('VCHAR_UNI', ''),
+ 'user_yim' => array('VCHAR_UNI', ''),
+ 'user_msnm' => array('VCHAR_UNI', ''),
+ 'user_jabber' => array('VCHAR_UNI', ''),
+ 'user_website' => array('VCHAR_UNI:200', ''),
+ 'user_occ' => array('TEXT_UNI', ''),
+ 'user_interests' => array('TEXT_UNI', ''),
+ 'user_actkey' => array('VCHAR:32', ''),
+ 'user_newpasswd' => array('VCHAR_UNI:40', ''),
+ 'user_form_salt' => array('VCHAR_UNI:32', ''),
+
+ ),
+ 'PRIMARY_KEY' => 'user_id',
+ 'KEYS' => array(
+ 'user_birthday' => array('INDEX', 'user_birthday'),
+ 'user_email_hash' => array('INDEX', 'user_email_hash'),
+ 'user_type' => array('INDEX', 'user_type'),
+ 'username_clean' => array('UNIQUE', 'username_clean'),
+ ),
+ ),
+
+ $this->table_prefix . 'warnings' => array(
+ 'COLUMNS' => array(
+ 'warning_id' => array('UINT', NULL, 'auto_increment'),
+ 'user_id' => array('UINT', 0),
+ 'post_id' => array('UINT', 0),
+ 'log_id' => array('UINT', 0),
+ 'warning_time' => array('TIMESTAMP', 0),
+ ),
+ 'PRIMARY_KEY' => 'warning_id',
+ ),
+
+ $this->table_prefix . 'words' => array(
+ 'COLUMNS' => array(
+ 'word_id' => array('UINT', NULL, 'auto_increment'),
+ 'word' => array('VCHAR_UNI', ''),
+ 'replacement' => array('VCHAR_UNI', ''),
+ ),
+ 'PRIMARY_KEY' => 'word_id',
+ ),
+
+ $this->table_prefix . 'zebra' => array(
+ 'COLUMNS' => array(
+ 'user_id' => array('UINT', 0),
+ 'zebra_id' => array('UINT', 0),
+ 'friend' => array('BOOL', 0),
+ 'foe' => array('BOOL', 0),
+ ),
+ 'PRIMARY_KEY' => array('user_id', 'zebra_id'),
+ ),
+ ),
+ );
+ }
+
+ public function revert_schema()
+ {
+ return array(
+ 'drop_tables' => array(
+ $this->table_prefix . 'attachments',
+ $this->table_prefix . 'acl_groups',
+ $this->table_prefix . 'acl_options',
+ $this->table_prefix . 'acl_roles',
+ $this->table_prefix . 'acl_roles_data',
+ $this->table_prefix . 'acl_users',
+ $this->table_prefix . 'banlist',
+ $this->table_prefix . 'bbcodes',
+ $this->table_prefix . 'bookmarks',
+ $this->table_prefix . 'bots',
+ $this->table_prefix . 'config',
+ $this->table_prefix . 'confirm',
+ $this->table_prefix . 'disallow',
+ $this->table_prefix . 'drafts',
+ $this->table_prefix . 'extensions',
+ $this->table_prefix . 'extension_groups',
+ $this->table_prefix . 'forums',
+ $this->table_prefix . 'forums_access',
+ $this->table_prefix . 'forums_track',
+ $this->table_prefix . 'forums_watch',
+ $this->table_prefix . 'groups',
+ $this->table_prefix . 'icons',
+ $this->table_prefix . 'lang',
+ $this->table_prefix . 'log',
+ $this->table_prefix . 'moderator_cache',
+ $this->table_prefix . 'modules',
+ $this->table_prefix . 'poll_options',
+ $this->table_prefix . 'poll_votes',
+ $this->table_prefix . 'posts',
+ $this->table_prefix . 'privmsgs',
+ $this->table_prefix . 'privmsgs_folder',
+ $this->table_prefix . 'privmsgs_rules',
+ $this->table_prefix . 'privmsgs_to',
+ $this->table_prefix . 'profile_fields',
+ $this->table_prefix . 'profile_fields_data',
+ $this->table_prefix . 'profile_fields_lang',
+ $this->table_prefix . 'profile_lang',
+ $this->table_prefix . 'ranks',
+ $this->table_prefix . 'reports',
+ $this->table_prefix . 'reports_reasons',
+ $this->table_prefix . 'search_results',
+ $this->table_prefix . 'search_wordlist',
+ $this->table_prefix . 'search_wordmatch',
+ $this->table_prefix . 'sessions',
+ $this->table_prefix . 'sessions_keys',
+ $this->table_prefix . 'sitelist',
+ $this->table_prefix . 'smilies',
+ $this->table_prefix . 'styles',
+ $this->table_prefix . 'styles_template',
+ $this->table_prefix . 'styles_template_data',
+ $this->table_prefix . 'styles_theme',
+ $this->table_prefix . 'styles_imageset',
+ $this->table_prefix . 'styles_imageset_data',
+ $this->table_prefix . 'topics',
+ $this->table_prefix . 'topics_track',
+ $this->table_prefix . 'topics_posted',
+ $this->table_prefix . 'topics_watch',
+ $this->table_prefix . 'user_group',
+ $this->table_prefix . 'users',
+ $this->table_prefix . 'warnings',
+ $this->table_prefix . 'words',
+ $this->table_prefix . 'zebra',
+ ),
+ );
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v30x/release_3_0_1.php b/phpBB/phpbb/db/migration/data/v30x/release_3_0_1.php
new file mode 100644
index 0000000000..aed0f2784b
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v30x/release_3_0_1.php
@@ -0,0 +1,30 @@
+<?php
+/**
+*
+* @package migration
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License v2
+*
+*/
+
+namespace phpbb\db\migration\data\v30x;
+
+class release_3_0_1 extends \phpbb\db\migration\migration
+{
+ public function effectively_installed()
+ {
+ return phpbb_version_compare($this->config['version'], '3.0.1', '>=');
+ }
+
+ static public function depends_on()
+ {
+ return array('\phpbb\db\migration\data\v30x\release_3_0_1_rc1');
+ }
+
+ public function update_data()
+ {
+ return array(
+ array('config.update', array('version', '3.0.1')),
+ );
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v30x/release_3_0_10.php b/phpBB/phpbb/db/migration/data/v30x/release_3_0_10.php
new file mode 100644
index 0000000000..305309c3bd
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v30x/release_3_0_10.php
@@ -0,0 +1,30 @@
+<?php
+/**
+*
+* @package migration
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License v2
+*
+*/
+
+namespace phpbb\db\migration\data\v30x;
+
+class release_3_0_10 extends \phpbb\db\migration\migration
+{
+ public function effectively_installed()
+ {
+ return phpbb_version_compare($this->config['version'], '3.0.10', '>=');
+ }
+
+ static public function depends_on()
+ {
+ return array('\phpbb\db\migration\data\v30x\release_3_0_10_rc3');
+ }
+
+ public function update_data()
+ {
+ return array(
+ array('config.update', array('version', '3.0.10')),
+ );
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v30x/release_3_0_10_rc1.php b/phpBB/phpbb/db/migration/data/v30x/release_3_0_10_rc1.php
new file mode 100644
index 0000000000..fb50d67fb5
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v30x/release_3_0_10_rc1.php
@@ -0,0 +1,32 @@
+<?php
+/**
+*
+* @package migration
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License v2
+*
+*/
+
+namespace phpbb\db\migration\data\v30x;
+
+class release_3_0_10_rc1 extends \phpbb\db\migration\migration
+{
+ public function effectively_installed()
+ {
+ return phpbb_version_compare($this->config['version'], '3.0.10-RC1', '>=');
+ }
+
+ static public function depends_on()
+ {
+ return array('\phpbb\db\migration\data\v30x\release_3_0_9');
+ }
+
+ public function update_data()
+ {
+ return array(
+ array('config.add', array('email_max_chunk_size', 50)),
+
+ array('config.update', array('version', '3.0.10-RC1')),
+ );
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v30x/release_3_0_10_rc2.php b/phpBB/phpbb/db/migration/data/v30x/release_3_0_10_rc2.php
new file mode 100644
index 0000000000..63ba1e8fc2
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v30x/release_3_0_10_rc2.php
@@ -0,0 +1,30 @@
+<?php
+/**
+*
+* @package migration
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License v2
+*
+*/
+
+namespace phpbb\db\migration\data\v30x;
+
+class release_3_0_10_rc2 extends \phpbb\db\migration\migration
+{
+ public function effectively_installed()
+ {
+ return phpbb_version_compare($this->config['version'], '3.0.10-RC2', '>=');
+ }
+
+ static public function depends_on()
+ {
+ return array('\phpbb\db\migration\data\v30x\release_3_0_10_rc1');
+ }
+
+ public function update_data()
+ {
+ return array(
+ array('config.update', array('version', '3.0.10-RC2')),
+ );
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v30x/release_3_0_10_rc3.php b/phpBB/phpbb/db/migration/data/v30x/release_3_0_10_rc3.php
new file mode 100644
index 0000000000..7055063032
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v30x/release_3_0_10_rc3.php
@@ -0,0 +1,30 @@
+<?php
+/**
+*
+* @package migration
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License v2
+*
+*/
+
+namespace phpbb\db\migration\data\v30x;
+
+class release_3_0_10_rc3 extends \phpbb\db\migration\migration
+{
+ public function effectively_installed()
+ {
+ return phpbb_version_compare($this->config['version'], '3.0.10-RC3', '>=');
+ }
+
+ static public function depends_on()
+ {
+ return array('\phpbb\db\migration\data\v30x\release_3_0_10_rc2');
+ }
+
+ public function update_data()
+ {
+ return array(
+ array('config.update', array('version', '3.0.10-RC3')),
+ );
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v30x/release_3_0_11.php b/phpBB/phpbb/db/migration/data/v30x/release_3_0_11.php
new file mode 100644
index 0000000000..1246597efb
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v30x/release_3_0_11.php
@@ -0,0 +1,30 @@
+<?php
+/**
+*
+* @package migration
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License v2
+*
+*/
+
+namespace phpbb\db\migration\data\v30x;
+
+class release_3_0_11 extends \phpbb\db\migration\migration
+{
+ public function effectively_installed()
+ {
+ return phpbb_version_compare($this->config['version'], '3.0.11', '>=');
+ }
+
+ static public function depends_on()
+ {
+ return array('\phpbb\db\migration\data\v30x\release_3_0_11_rc2');
+ }
+
+ public function update_data()
+ {
+ return array(
+ array('config.update', array('version', '3.0.11')),
+ );
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v30x/release_3_0_11_rc1.php b/phpBB/phpbb/db/migration/data/v30x/release_3_0_11_rc1.php
new file mode 100644
index 0000000000..7e284235e1
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v30x/release_3_0_11_rc1.php
@@ -0,0 +1,97 @@
+<?php
+/**
+*
+* @package migration
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License v2
+*
+*/
+
+namespace phpbb\db\migration\data\v30x;
+
+class release_3_0_11_rc1 extends \phpbb\db\migration\migration
+{
+ public function effectively_installed()
+ {
+ return phpbb_version_compare($this->config['version'], '3.0.11-RC1', '>=');
+ }
+
+ static public function depends_on()
+ {
+ return array('\phpbb\db\migration\data\v30x\release_3_0_10');
+ }
+
+ public function update_data()
+ {
+ return array(
+ array('custom', array(array(&$this, 'cleanup_deactivated_styles'))),
+ array('custom', array(array(&$this, 'delete_orphan_private_messages'))),
+
+ array('config.update', array('version', '3.0.11-RC1')),
+ );
+ }
+
+ public function cleanup_deactivated_styles()
+ {
+ // Updates users having current style a deactivated one
+ $sql = 'SELECT style_id
+ FROM ' . STYLES_TABLE . '
+ WHERE style_active = 0';
+ $result = $this->sql_query($sql);
+
+ $deactivated_style_ids = array();
+ while ($style_id = $this->db->sql_fetchfield('style_id', false, $result))
+ {
+ $deactivated_style_ids[] = (int) $style_id;
+ }
+ $this->db->sql_freeresult($result);
+
+ if (!empty($deactivated_style_ids))
+ {
+ $sql = 'UPDATE ' . USERS_TABLE . '
+ SET user_style = ' . (int) $this->config['default_style'] .'
+ WHERE ' . $this->db->sql_in_set('user_style', $deactivated_style_ids);
+ $this->sql_query($sql);
+ }
+ }
+
+ public function delete_orphan_private_messages()
+ {
+ // Delete orphan private messages
+ $batch_size = 500;
+
+ $sql_array = array(
+ 'SELECT' => 'p.msg_id',
+ 'FROM' => array(
+ PRIVMSGS_TABLE => 'p',
+ ),
+ 'LEFT_JOIN' => array(
+ array(
+ 'FROM' => array(PRIVMSGS_TO_TABLE => 't'),
+ 'ON' => 'p.msg_id = t.msg_id',
+ ),
+ ),
+ 'WHERE' => 't.user_id IS NULL',
+ );
+ $sql = $this->db->sql_build_query('SELECT', $sql_array);
+
+ $result = $this->db->sql_query_limit($sql, $batch_size);
+
+ $delete_pms = array();
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ $delete_pms[] = (int) $row['msg_id'];
+ }
+ $this->db->sql_freeresult($result);
+
+ if (!empty($delete_pms))
+ {
+ $sql = 'DELETE FROM ' . PRIVMSGS_TABLE . '
+ WHERE ' . $this->db->sql_in_set('msg_id', $delete_pms);
+ $this->sql_query($sql);
+
+ // Return false to have the Migrator call this function again
+ return false;
+ }
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v30x/release_3_0_11_rc2.php b/phpBB/phpbb/db/migration/data/v30x/release_3_0_11_rc2.php
new file mode 100644
index 0000000000..017038855d
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v30x/release_3_0_11_rc2.php
@@ -0,0 +1,52 @@
+<?php
+/**
+*
+* @package migration
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License v2
+*
+*/
+
+namespace phpbb\db\migration\data\v30x;
+
+class release_3_0_11_rc2 extends \phpbb\db\migration\migration
+{
+ public function effectively_installed()
+ {
+ return phpbb_version_compare($this->config['version'], '3.0.11-RC2', '>=');
+ }
+
+ static public function depends_on()
+ {
+ return array('\phpbb\db\migration\data\v30x\release_3_0_11_rc1');
+ }
+
+ public function update_schema()
+ {
+ return array(
+ 'add_columns' => array(
+ $this->table_prefix . 'profile_fields' => array(
+ 'field_show_novalue' => array('BOOL', 0),
+ ),
+ ),
+ );
+ }
+
+ public function revert_schema()
+ {
+ return array(
+ 'drop_columns' => array(
+ $this->table_prefix . 'profile_fields' => array(
+ 'field_show_novalue',
+ ),
+ ),
+ );
+ }
+
+ public function update_data()
+ {
+ return array(
+ array('config.update', array('version', '3.0.11-RC2')),
+ );
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v30x/release_3_0_12.php b/phpBB/phpbb/db/migration/data/v30x/release_3_0_12.php
new file mode 100644
index 0000000000..5a2d569724
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v30x/release_3_0_12.php
@@ -0,0 +1,33 @@
+<?php
+/**
+*
+* @package migration
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License v2
+*
+*/
+
+namespace phpbb\db\migration\data\v30x;
+
+class release_3_0_12 extends \phpbb\db\migration\migration
+{
+ public function effectively_installed()
+ {
+ return phpbb_version_compare($this->config['version'], '3.0.12', '>=') && phpbb_version_compare($this->config['version'], '3.1.0-dev', '<');
+ }
+
+ static public function depends_on()
+ {
+ return array('\phpbb\db\migration\data\v30x\release_3_0_12_rc3');
+ }
+
+ public function update_data()
+ {
+ return array(
+ array('if', array(
+ phpbb_version_compare($this->config['version'], '3.0.12', '<'),
+ array('config.update', array('version', '3.0.12')),
+ )),
+ );
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v30x/release_3_0_12_rc1.php b/phpBB/phpbb/db/migration/data/v30x/release_3_0_12_rc1.php
new file mode 100644
index 0000000000..35a3015959
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v30x/release_3_0_12_rc1.php
@@ -0,0 +1,125 @@
+<?php
+/**
+*
+* @package migration
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License v2
+*
+*/
+
+namespace phpbb\db\migration\data\v30x;
+
+/** @todo DROP LOGIN_ATTEMPT_TABLE.attempt_id in 3.0.12-RC1 **/
+
+class release_3_0_12_rc1 extends \phpbb\db\migration\migration
+{
+ public function effectively_installed()
+ {
+ return phpbb_version_compare($this->config['version'], '3.0.12-RC1', '>=');
+ }
+
+ static public function depends_on()
+ {
+ return array('\phpbb\db\migration\data\v30x\release_3_0_11');
+ }
+
+ public function update_data()
+ {
+ return array(
+ array('custom', array(array(&$this, 'update_module_auth'))),
+ array('custom', array(array(&$this, 'update_bots'))),
+ array('custom', array(array(&$this, 'disable_bots_from_receiving_pms'))),
+
+ array('config.update', array('version', '3.0.12-RC1')),
+ );
+ }
+
+ public function disable_bots_from_receiving_pms()
+ {
+ // Disable receiving pms for bots
+ $sql = 'SELECT user_id
+ FROM ' . BOTS_TABLE;
+ $result = $this->db->sql_query($sql);
+
+ $bot_user_ids = array();
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ $bot_user_ids[] = (int) $row['user_id'];
+ }
+ $this->db->sql_freeresult($result);
+
+ if (!empty($bot_user_ids))
+ {
+ $sql = 'UPDATE ' . USERS_TABLE . '
+ SET user_allow_pm = 0
+ WHERE ' . $this->db->sql_in_set('user_id', $bot_user_ids);
+ $this->sql_query($sql);
+ }
+ }
+
+ public function update_module_auth()
+ {
+ $sql = 'UPDATE ' . MODULES_TABLE . '
+ SET module_auth = \'acl_u_sig\'
+ WHERE module_class = \'ucp\'
+ AND module_basename = \'profile\'
+ AND module_mode = \'signature\'';
+ $this->sql_query($sql);
+ }
+
+ public function update_bots()
+ {
+ // Update bots
+ if (!function_exists('user_delete'))
+ {
+ include($this->phpbb_root_path . 'includes/functions_user.' . $this->php_ext);
+ }
+
+ $bots_updates = array(
+ // Bot Deletions
+ 'NG-Search [Bot]' => false,
+ 'Nutch/CVS [Bot]' => false,
+ 'OmniExplorer [Bot]' => false,
+ 'Seekport [Bot]' => false,
+ 'Synoo [Bot]' => false,
+ 'WiseNut [Bot]' => false,
+
+ // Bot Updates
+ // Bot name to bot user agent map
+ 'Baidu [Spider]' => 'Baiduspider',
+ 'Exabot [Bot]' => 'Exabot',
+ 'Voyager [Bot]' => 'voyager/',
+ 'W3C [Validator]' => 'W3C_Validator',
+ );
+
+ foreach ($bots_updates as $bot_name => $bot_agent)
+ {
+ $sql = 'SELECT user_id
+ FROM ' . USERS_TABLE . '
+ WHERE user_type = ' . USER_IGNORE . "
+ AND username_clean = '" . $this->db->sql_escape(utf8_clean_string($bot_name)) . "'";
+ $result = $this->db->sql_query($sql);
+ $bot_user_id = (int) $this->db->sql_fetchfield('user_id');
+ $this->db->sql_freeresult($result);
+
+ if ($bot_user_id)
+ {
+ if ($bot_agent === false)
+ {
+ $sql = 'DELETE FROM ' . BOTS_TABLE . "
+ WHERE user_id = $bot_user_id";
+ $this->sql_query($sql);
+
+ user_delete('retain', $bot_user_id);
+ }
+ else
+ {
+ $sql = 'UPDATE ' . BOTS_TABLE . "
+ SET bot_agent = '" . $this->db->sql_escape($bot_agent) . "'
+ WHERE user_id = $bot_user_id";
+ $this->sql_query($sql);
+ }
+ }
+ }
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v30x/release_3_0_12_rc2.php b/phpBB/phpbb/db/migration/data/v30x/release_3_0_12_rc2.php
new file mode 100644
index 0000000000..3edb578fc8
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v30x/release_3_0_12_rc2.php
@@ -0,0 +1,33 @@
+<?php
+/**
+*
+* @package migration
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License v2
+*
+*/
+
+namespace phpbb\db\migration\data\v30x;
+
+class release_3_0_12_rc2 extends \phpbb\db\migration\migration
+{
+ public function effectively_installed()
+ {
+ return phpbb_version_compare($this->config['version'], '3.0.12-RC2', '>=') && phpbb_version_compare($this->config['version'], '3.1.0-dev', '<');
+ }
+
+ static public function depends_on()
+ {
+ return array('\phpbb\db\migration\data\v30x\release_3_0_12_rc1');
+ }
+
+ public function update_data()
+ {
+ return array(
+ array('if', array(
+ phpbb_version_compare($this->config['version'], '3.0.12-RC2', '<'),
+ array('config.update', array('version', '3.0.12-RC2')),
+ )),
+ );
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v30x/release_3_0_12_rc3.php b/phpBB/phpbb/db/migration/data/v30x/release_3_0_12_rc3.php
new file mode 100644
index 0000000000..510693a5b7
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v30x/release_3_0_12_rc3.php
@@ -0,0 +1,33 @@
+<?php
+/**
+*
+* @package migration
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License v2
+*
+*/
+
+namespace phpbb\db\migration\data\v30x;
+
+class release_3_0_12_rc3 extends \phpbb\db\migration\migration
+{
+ public function effectively_installed()
+ {
+ return phpbb_version_compare($this->config['version'], '3.0.12-RC3', '>=') && phpbb_version_compare($this->config['version'], '3.1.0-dev', '<');
+ }
+
+ static public function depends_on()
+ {
+ return array('\phpbb\db\migration\data\v30x\release_3_0_12_rc2');
+ }
+
+ public function update_data()
+ {
+ return array(
+ array('if', array(
+ phpbb_version_compare($this->config['version'], '3.0.12-RC3', '<'),
+ array('config.update', array('version', '3.0.12-RC3')),
+ )),
+ );
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v30x/release_3_0_1_rc1.php b/phpBB/phpbb/db/migration/data/v30x/release_3_0_1_rc1.php
new file mode 100644
index 0000000000..c8273c0801
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v30x/release_3_0_1_rc1.php
@@ -0,0 +1,115 @@
+<?php
+/**
+*
+* @package migration
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License v2
+*
+*/
+
+namespace phpbb\db\migration\data\v30x;
+
+class release_3_0_1_rc1 extends \phpbb\db\migration\migration
+{
+ public function effectively_installed()
+ {
+ return phpbb_version_compare($this->config['version'], '3.0.1-RC1', '>=');
+ }
+
+ static public function depends_on()
+ {
+ return array('\phpbb\db\migration\data\v30x\release_3_0_0');
+ }
+
+ public function update_schema()
+ {
+ return array(
+ 'add_columns' => array(
+ $this->table_prefix . 'forums' => array(
+ 'display_subforum_list' => array('BOOL', 1),
+ ),
+ $this->table_prefix . 'sessions' => array(
+ 'session_forum_id' => array('UINT', 0),
+ ),
+ ),
+ 'drop_keys' => array(
+ $this->table_prefix . 'groups' => array(
+ 'group_legend',
+ ),
+ ),
+ 'add_index' => array(
+ $this->table_prefix . 'sessions' => array(
+ 'session_forum_id' => array('session_forum_id'),
+ ),
+ $this->table_prefix . 'groups' => array(
+ 'group_legend_name' => array('group_legend', 'group_name'),
+ ),
+ ),
+ );
+ }
+
+ public function revert_schema()
+ {
+ return array(
+ 'drop_columns' => array(
+ $this->table_prefix . 'forums' => array(
+ 'display_subforum_list',
+ ),
+ $this->table_prefix . 'sessions' => array(
+ 'session_forum_id',
+ ),
+ ),
+ 'add_index' => array(
+ $this->table_prefix . 'groups' => array(
+ 'group_legend' => array('group_legend'),
+ ),
+ ),
+ 'drop_keys' => array(
+ $this->table_prefix . 'sessions' => array(
+ 'session_forum_id',
+ ),
+ $this->table_prefix . 'groups' => array(
+ 'group_legend_name',
+ ),
+ ),
+ );
+ }
+
+ public function update_data()
+ {
+ return array(
+ array('custom', array(array(&$this, 'fix_unset_last_view_time'))),
+ array('custom', array(array(&$this, 'reset_smiley_size'))),
+
+ array('config.update', array('version', '3.0.1-RC1')),
+ );
+ }
+
+ public function fix_unset_last_view_time()
+ {
+ $sql = 'UPDATE ' . $this->table_prefix . "topics
+ SET topic_last_view_time = topic_last_post_time
+ WHERE topic_last_view_time = 0";
+ $this->sql_query($sql);
+ }
+
+ public function reset_smiley_size()
+ {
+ // Update smiley sizes
+ $smileys = array('icon_e_surprised.gif', 'icon_eek.gif', 'icon_cool.gif', 'icon_lol.gif', 'icon_mad.gif', 'icon_razz.gif', 'icon_redface.gif', 'icon_cry.gif', 'icon_evil.gif', 'icon_twisted.gif', 'icon_rolleyes.gif', 'icon_exclaim.gif', 'icon_question.gif', 'icon_idea.gif', 'icon_arrow.gif', 'icon_neutral.gif', 'icon_mrgreen.gif', 'icon_e_ugeek.gif');
+
+ foreach ($smileys as $smiley)
+ {
+ if (file_exists($this->phpbb_root_path . 'images/smilies/' . $smiley))
+ {
+ list($width, $height) = getimagesize($this->phpbb_root_path . 'images/smilies/' . $smiley);
+
+ $sql = 'UPDATE ' . SMILIES_TABLE . '
+ SET smiley_width = ' . $width . ', smiley_height = ' . $height . "
+ WHERE smiley_url = '" . $this->db->sql_escape($smiley) . "'";
+
+ $this->sql_query($sql);
+ }
+ }
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v30x/release_3_0_2.php b/phpBB/phpbb/db/migration/data/v30x/release_3_0_2.php
new file mode 100644
index 0000000000..7e2a08590e
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v30x/release_3_0_2.php
@@ -0,0 +1,30 @@
+<?php
+/**
+*
+* @package migration
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License v2
+*
+*/
+
+namespace phpbb\db\migration\data\v30x;
+
+class release_3_0_2 extends \phpbb\db\migration\migration
+{
+ public function effectively_installed()
+ {
+ return phpbb_version_compare($this->config['version'], '3.0.2', '>=');
+ }
+
+ static public function depends_on()
+ {
+ return array('\phpbb\db\migration\data\v30x\release_3_0_2_rc2');
+ }
+
+ public function update_data()
+ {
+ return array(
+ array('config.update', array('version', '3.0.2')),
+ );
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v30x/release_3_0_2_rc1.php b/phpBB/phpbb/db/migration/data/v30x/release_3_0_2_rc1.php
new file mode 100644
index 0000000000..7a856383e2
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v30x/release_3_0_2_rc1.php
@@ -0,0 +1,34 @@
+<?php
+/**
+*
+* @package migration
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License v2
+*
+*/
+
+namespace phpbb\db\migration\data\v30x;
+
+class release_3_0_2_rc1 extends \phpbb\db\migration\migration
+{
+ public function effectively_installed()
+ {
+ return phpbb_version_compare($this->config['version'], '3.0.2-RC1', '>=');
+ }
+
+ static public function depends_on()
+ {
+ return array('\phpbb\db\migration\data\v30x\release_3_0_1');
+ }
+
+ public function update_data()
+ {
+ return array(
+ array('config.add', array('referer_validation', '1')),
+ array('config.add', array('check_attachment_content', '1')),
+ array('config.add', array('mime_triggers', 'body|head|html|img|plaintext|a href|pre|script|table|title')),
+
+ array('config.update', array('version', '3.0.2-RC1')),
+ );
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v30x/release_3_0_2_rc2.php b/phpBB/phpbb/db/migration/data/v30x/release_3_0_2_rc2.php
new file mode 100644
index 0000000000..61562575eb
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v30x/release_3_0_2_rc2.php
@@ -0,0 +1,82 @@
+<?php
+/**
+*
+* @package migration
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License v2
+*
+*/
+
+namespace phpbb\db\migration\data\v30x;
+
+class release_3_0_2_rc2 extends \phpbb\db\migration\migration
+{
+ public function effectively_installed()
+ {
+ return phpbb_version_compare($this->config['version'], '3.0.2-RC2', '>=');
+ }
+
+ static public function depends_on()
+ {
+ return array('\phpbb\db\migration\data\v30x\release_3_0_2_rc1');
+ }
+
+ public function update_schema()
+ {
+ return array(
+ 'change_columns' => array(
+ $this->table_prefix . 'drafts' => array(
+ 'draft_subject' => array('STEXT_UNI', ''),
+ ),
+ $this->table_prefix . 'forums' => array(
+ 'forum_last_post_subject' => array('STEXT_UNI', ''),
+ ),
+ $this->table_prefix . 'posts' => array(
+ 'post_subject' => array('STEXT_UNI', '', 'true_sort'),
+ ),
+ $this->table_prefix . 'privmsgs' => array(
+ 'message_subject' => array('STEXT_UNI', ''),
+ ),
+ $this->table_prefix . 'topics' => array(
+ 'topic_title' => array('STEXT_UNI', '', 'true_sort'),
+ 'topic_last_post_subject' => array('STEXT_UNI', ''),
+ ),
+ ),
+ 'drop_keys' => array(
+ $this->table_prefix . 'sessions' => array(
+ 'session_forum_id',
+ ),
+ ),
+ 'add_index' => array(
+ $this->table_prefix . 'sessions' => array(
+ 'session_fid' => array('session_forum_id'),
+ ),
+ ),
+ );
+ }
+
+ public function revert_schema()
+ {
+ return array(
+ 'add_index' => array(
+ $this->table_prefix . 'sessions' => array(
+ 'session_forum_id' => array(
+ 'session_forum_id',
+ ),
+ ),
+ ),
+ 'drop_keys' => array(
+ $this->table_prefix . 'sessions' => array(
+ 'session_fid',
+ ),
+ ),
+ );
+ }
+
+ public function update_data()
+ {
+ return array(
+ array('config.update', array('version', '3.0.2-RC2')),
+ );
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v30x/release_3_0_3.php b/phpBB/phpbb/db/migration/data/v30x/release_3_0_3.php
new file mode 100644
index 0000000000..b2adbeaa43
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v30x/release_3_0_3.php
@@ -0,0 +1,30 @@
+<?php
+/**
+*
+* @package migration
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License v2
+*
+*/
+
+namespace phpbb\db\migration\data\v30x;
+
+class release_3_0_3 extends \phpbb\db\migration\migration
+{
+ public function effectively_installed()
+ {
+ return phpbb_version_compare($this->config['version'], '3.0.3', '>=');
+ }
+
+ static public function depends_on()
+ {
+ return array('\phpbb\db\migration\data\v30x\release_3_0_3_rc1');
+ }
+
+ public function update_data()
+ {
+ return array(
+ array('config.update', array('version', '3.0.3')),
+ );
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v30x/release_3_0_3_rc1.php b/phpBB/phpbb/db/migration/data/v30x/release_3_0_3_rc1.php
new file mode 100644
index 0000000000..57bd59bba3
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v30x/release_3_0_3_rc1.php
@@ -0,0 +1,85 @@
+<?php
+/**
+*
+* @package migration
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License v2
+*
+*/
+
+namespace phpbb\db\migration\data\v30x;
+
+class release_3_0_3_rc1 extends \phpbb\db\migration\migration
+{
+ public function effectively_installed()
+ {
+ return phpbb_version_compare($this->config['version'], '3.0.3-RC1', '>=');
+ }
+
+ static public function depends_on()
+ {
+ return array('\phpbb\db\migration\data\v30x\release_3_0_2');
+ }
+
+ public function update_schema()
+ {
+ return array(
+ 'add_columns' => array(
+ $this->table_prefix . 'styles_template' => array(
+ 'template_inherits_id' => array('UINT:4', 0),
+ 'template_inherit_path' => array('VCHAR', ''),
+ ),
+ $this->table_prefix . 'groups' => array(
+ 'group_max_recipients' => array('UINT', 0),
+ ),
+ ),
+ );
+ }
+
+ public function revert_schema()
+ {
+ return array(
+ 'drop_columns' => array(
+ $this->table_prefix . 'styles_template' => array(
+ 'template_inherits_id',
+ 'template_inherit_path',
+ ),
+ $this->table_prefix . 'groups' => array(
+ 'group_max_recipients',
+ ),
+ ),
+ );
+ }
+
+ public function update_data()
+ {
+ return array(
+ array('config.add', array('enable_queue_trigger', '0')),
+ array('config.add', array('queue_trigger_posts', '3')),
+ array('config.add', array('pm_max_recipients', '0')),
+ array('custom', array(array(&$this, 'set_group_default_max_recipients'))),
+ array('config.add', array('dbms_version', $this->db->sql_server_info(true))),
+ array('permission.add', array('u_masspm_group', true, 'u_masspm')),
+ array('custom', array(array(&$this, 'correct_acp_email_permissions'))),
+
+ array('config.update', array('version', '3.0.3-RC1')),
+ );
+ }
+
+ public function correct_acp_email_permissions()
+ {
+ $sql = 'UPDATE ' . $this->table_prefix . 'modules
+ SET module_auth = \'acl_a_email && cfg_email_enable\'
+ WHERE module_class = \'acp\'
+ AND module_basename = \'email\'';
+ $this->sql_query($sql);
+ }
+
+ public function set_group_default_max_recipients()
+ {
+ // Set maximum number of recipients for the registered users, bots, guests group
+ $sql = 'UPDATE ' . GROUPS_TABLE . ' SET group_max_recipients = 5
+ WHERE ' . $this->db->sql_in_set('group_name', array('GUESTS', 'REGISTERED', 'REGISTERED_COPPA', 'BOTS'));
+ $this->sql_query($sql);
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v30x/release_3_0_4.php b/phpBB/phpbb/db/migration/data/v30x/release_3_0_4.php
new file mode 100644
index 0000000000..5d6140393b
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v30x/release_3_0_4.php
@@ -0,0 +1,51 @@
+<?php
+/**
+*
+* @package migration
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License v2
+*
+*/
+
+namespace phpbb\db\migration\data\v30x;
+
+class release_3_0_4 extends \phpbb\db\migration\migration
+{
+ public function effectively_installed()
+ {
+ return phpbb_version_compare($this->config['version'], '3.0.4', '>=');
+ }
+
+ static public function depends_on()
+ {
+ return array('\phpbb\db\migration\data\v30x\release_3_0_4_rc1');
+ }
+
+ public function update_data()
+ {
+ return array(
+ array('custom', array(array(&$this, 'rename_log_delete_topic'))),
+
+ array('config.update', array('version', '3.0.4')),
+ );
+ }
+
+ public function rename_log_delete_topic()
+ {
+ if ($this->db->sql_layer == 'oracle')
+ {
+ // log_operation is CLOB - but we can change this later
+ $sql = 'UPDATE ' . $this->table_prefix . "log
+ SET log_operation = 'LOG_DELETE_TOPIC'
+ WHERE log_operation LIKE 'LOG_TOPIC_DELETED'";
+ $this->sql_query($sql);
+ }
+ else
+ {
+ $sql = 'UPDATE ' . $this->table_prefix . "log
+ SET log_operation = 'LOG_DELETE_TOPIC'
+ WHERE log_operation = 'LOG_TOPIC_DELETED'";
+ $this->sql_query($sql);
+ }
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v30x/release_3_0_4_rc1.php b/phpBB/phpbb/db/migration/data/v30x/release_3_0_4_rc1.php
new file mode 100644
index 0000000000..a8af4dd76c
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v30x/release_3_0_4_rc1.php
@@ -0,0 +1,125 @@
+<?php
+/**
+*
+* @package migration
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License v2
+*
+*/
+
+namespace phpbb\db\migration\data\v30x;
+
+class release_3_0_4_rc1 extends \phpbb\db\migration\migration
+{
+ public function effectively_installed()
+ {
+ return phpbb_version_compare($this->config['version'], '3.0.4-RC1', '>=');
+ }
+
+ static public function depends_on()
+ {
+ return array('\phpbb\db\migration\data\v30x\release_3_0_3');
+ }
+
+ public function update_schema()
+ {
+ return array(
+ 'add_columns' => array(
+ $this->table_prefix . 'profile_fields' => array(
+ 'field_show_profile' => array('BOOL', 0),
+ ),
+ ),
+ 'change_columns' => array(
+ $this->table_prefix . 'styles' => array(
+ 'style_id' => array('UINT', NULL, 'auto_increment'),
+ 'template_id' => array('UINT', 0),
+ 'theme_id' => array('UINT', 0),
+ 'imageset_id' => array('UINT', 0),
+ ),
+ $this->table_prefix . 'styles_imageset' => array(
+ 'imageset_id' => array('UINT', NULL, 'auto_increment'),
+ ),
+ $this->table_prefix . 'styles_imageset_data' => array(
+ 'image_id' => array('UINT', NULL, 'auto_increment'),
+ 'imageset_id' => array('UINT', 0),
+ ),
+ $this->table_prefix . 'styles_theme' => array(
+ 'theme_id' => array('UINT', NULL, 'auto_increment'),
+ ),
+ $this->table_prefix . 'styles_template' => array(
+ 'template_id' => array('UINT', NULL, 'auto_increment'),
+ ),
+ $this->table_prefix . 'styles_template_data' => array(
+ 'template_id' => array('UINT', 0),
+ ),
+ $this->table_prefix . 'forums' => array(
+ 'forum_style' => array('UINT', 0),
+ ),
+ $this->table_prefix . 'users' => array(
+ 'user_style' => array('UINT', 0),
+ ),
+ ),
+ );
+ }
+
+ public function revert_schema()
+ {
+ return array(
+ 'drop_columns' => array(
+ $this->table_prefix . 'profile_fields' => array(
+ 'field_show_profile',
+ ),
+ ),
+ );
+ }
+
+ public function update_data()
+ {
+ return array(
+ array('custom', array(array(&$this, 'update_custom_profile_fields'))),
+
+ array('config.update', array('version', '3.0.4-RC1')),
+ );
+ }
+
+ public function update_custom_profile_fields()
+ {
+ // Update the Custom Profile Fields based on previous settings to the new \format
+ $sql = 'SELECT field_id, field_required, field_show_on_reg, field_hide
+ FROM ' . PROFILE_FIELDS_TABLE;
+ $result = $this->db->sql_query($sql);
+
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ $sql_ary = array(
+ 'field_required' => 0,
+ 'field_show_on_reg' => 0,
+ 'field_hide' => 0,
+ 'field_show_profile'=> 0,
+ );
+
+ if ($row['field_required'])
+ {
+ $sql_ary['field_required'] = $sql_ary['field_show_on_reg'] = $sql_ary['field_show_profile'] = 1;
+ }
+ else if ($row['field_show_on_reg'])
+ {
+ $sql_ary['field_show_on_reg'] = $sql_ary['field_show_profile'] = 1;
+ }
+ else if ($row['field_hide'])
+ {
+ // Only administrators and moderators can see this CPF, if the view is enabled, they can see it, otherwise just admins in the acp_users module
+ $sql_ary['field_hide'] = 1;
+ }
+ else
+ {
+ // equivelant to "none", which is the "Display in user control panel" option
+ $sql_ary['field_show_profile'] = 1;
+ }
+
+ $this->sql_query('UPDATE ' . $this->table_prefix . 'profile_fields SET ' . $this->db->sql_build_array('UPDATE', $sql_ary) . ' WHERE field_id = ' . $row['field_id'], $errored, $error_ary);
+ }
+
+ $this->db->sql_freeresult($result);
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v30x/release_3_0_5.php b/phpBB/phpbb/db/migration/data/v30x/release_3_0_5.php
new file mode 100644
index 0000000000..7bbe7ffed9
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v30x/release_3_0_5.php
@@ -0,0 +1,30 @@
+<?php
+/**
+*
+* @package migration
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License v2
+*
+*/
+
+namespace phpbb\db\migration\data\v30x;
+
+class release_3_0_5 extends \phpbb\db\migration\migration
+{
+ public function effectively_installed()
+ {
+ return phpbb_version_compare($this->config['version'], '3.0.5', '>=');
+ }
+
+ static public function depends_on()
+ {
+ return array('\phpbb\db\migration\data\v30x\release_3_0_5_rc1part2');
+ }
+
+ public function update_data()
+ {
+ return array(
+ array('config.update', array('version', '3.0.5')),
+ );
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v30x/release_3_0_5_rc1.php b/phpBB/phpbb/db/migration/data/v30x/release_3_0_5_rc1.php
new file mode 100644
index 0000000000..ffe2c6a44d
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v30x/release_3_0_5_rc1.php
@@ -0,0 +1,126 @@
+<?php
+/**
+*
+* @package migration
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License v2
+*
+*/
+
+namespace phpbb\db\migration\data\v30x;
+
+class release_3_0_5_rc1 extends \phpbb\db\migration\migration
+{
+ public function effectively_installed()
+ {
+ return phpbb_version_compare($this->config['version'], '3.0.5-RC1', '>=');
+ }
+
+ static public function depends_on()
+ {
+ return array('\phpbb\db\migration\data\v30x\release_3_0_4');
+ }
+
+ public function update_schema()
+ {
+ return array(
+ 'change_columns' => array(
+ $this->table_prefix . 'forums' => array(
+ 'forum_style' => array('UINT', 0),
+ ),
+ ),
+ );
+ }
+
+ public function update_data()
+ {
+ $search_indexing_state = $this->config['search_indexing_state'];
+
+ return array(
+ array('config.add', array('captcha_gd_wave', 0)),
+ array('config.add', array('captcha_gd_3d_noise', 1)),
+ array('config.add', array('captcha_gd_fonts', 1)),
+ array('config.add', array('confirm_refresh', 1)),
+ array('config.add', array('max_num_search_keywords', 10)),
+ array('config.remove', array('search_indexing_state')),
+ array('config.add', array('search_indexing_state', $search_indexing_state, true)),
+ array('custom', array(array(&$this, 'hash_old_passwords'))),
+ array('custom', array(array(&$this, 'update_ichiro_bot'))),
+ );
+ }
+
+ public function hash_old_passwords()
+ {
+ $sql = 'SELECT user_id, user_password
+ FROM ' . $this->table_prefix . 'users
+ WHERE user_pass_convert = 1';
+ $result = $this->db->sql_query($sql);
+
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ if (strlen($row['user_password']) == 32)
+ {
+ $sql_ary = array(
+ 'user_password' => phpbb_hash($row['user_password']),
+ );
+
+ $this->sql_query('UPDATE ' . $this->table_prefix . 'users SET ' . $this->db->sql_build_array('UPDATE', $sql_ary) . ' WHERE user_id = ' . $row['user_id']);
+ }
+ }
+ $this->db->sql_freeresult($result);
+ }
+
+ public function update_ichiro_bot()
+ {
+ // Adjust bot entry
+ $sql = 'UPDATE ' . $this->table_prefix . "bots
+ SET bot_agent = 'ichiro/'
+ WHERE bot_agent = 'ichiro/2'";
+ $this->sql_query($sql);
+ }
+
+ public function remove_duplicate_auth_options()
+ {
+ // Before we are able to add a unique key to auth_option, we need to remove duplicate entries
+ $sql = 'SELECT auth_option
+ FROM ' . $this->table_prefix . 'acl_options
+ GROUP BY auth_option
+ HAVING COUNT(*) >= 2';
+ $result = $this->db->sql_query($sql);
+
+ $auth_options = array();
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ $auth_options[] = $row['auth_option'];
+ }
+ $this->db->sql_freeresult($result);
+
+ // Remove specific auth options
+ if (!empty($auth_options))
+ {
+ foreach ($auth_options as $option)
+ {
+ // Select auth_option_ids... the largest id will be preserved
+ $sql = 'SELECT auth_option_id
+ FROM ' . ACL_OPTIONS_TABLE . "
+ WHERE auth_option = '" . $db->sql_escape($option) . "'
+ ORDER BY auth_option_id DESC";
+ // sql_query_limit not possible here, due to bug in postgresql layer
+ $result = $this->db->sql_query($sql);
+
+ // Skip first row, this is our original auth option we want to preserve
+ $row = $this->db->sql_fetchrow($result);
+
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ // Ok, remove this auth option...
+ $this->sql_query('DELETE FROM ' . ACL_OPTIONS_TABLE . ' WHERE auth_option_id = ' . $row['auth_option_id']);
+ $this->sql_query('DELETE FROM ' . ACL_ROLES_DATA_TABLE . ' WHERE auth_option_id = ' . $row['auth_option_id']);
+ $this->sql_query('DELETE FROM ' . ACL_GROUPS_TABLE . ' WHERE auth_option_id = ' . $row['auth_option_id']);
+ $this->sql_query('DELETE FROM ' . ACL_USERS_TABLE . ' WHERE auth_option_id = ' . $row['auth_option_id']);
+ }
+ $this->db->sql_freeresult($result);
+ }
+ }
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v30x/release_3_0_5_rc1part2.php b/phpBB/phpbb/db/migration/data/v30x/release_3_0_5_rc1part2.php
new file mode 100644
index 0000000000..04b14b5189
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v30x/release_3_0_5_rc1part2.php
@@ -0,0 +1,44 @@
+<?php
+/**
+*
+* @package migration
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License v2
+*
+*/
+
+namespace phpbb\db\migration\data\v30x;
+
+class release_3_0_5_rc1part2 extends \phpbb\db\migration\migration
+{
+ public function effectively_installed()
+ {
+ return phpbb_version_compare($this->config['version'], '3.0.5-RC1', '>=');
+ }
+
+ static public function depends_on()
+ {
+ return array('\phpbb\db\migration\data\v30x\release_3_0_5_rc1');
+ }
+
+ public function update_schema()
+ {
+ return array(
+ 'drop_keys' => array(
+ $this->table_prefix . 'acl_options' => array('auth_option'),
+ ),
+ 'add_unique_index' => array(
+ $this->table_prefix . 'acl_options' => array(
+ 'auth_option' => array('auth_option'),
+ ),
+ ),
+ );
+ }
+
+ public function update_data()
+ {
+ return array(
+ array('config.update', array('version', '3.0.5-RC1')),
+ );
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v30x/release_3_0_6.php b/phpBB/phpbb/db/migration/data/v30x/release_3_0_6.php
new file mode 100644
index 0000000000..85ea2e9d20
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v30x/release_3_0_6.php
@@ -0,0 +1,30 @@
+<?php
+/**
+*
+* @package migration
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License v2
+*
+*/
+
+namespace phpbb\db\migration\data\v30x;
+
+class release_3_0_6 extends \phpbb\db\migration\migration
+{
+ public function effectively_installed()
+ {
+ return phpbb_version_compare($this->config['version'], '3.0.6', '>=');
+ }
+
+ static public function depends_on()
+ {
+ return array('\phpbb\db\migration\data\v30x\release_3_0_6_rc4');
+ }
+
+ public function update_data()
+ {
+ return array(
+ array('config.update', array('version', '3.0.6')),
+ );
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v30x/release_3_0_6_rc1.php b/phpBB/phpbb/db/migration/data/v30x/release_3_0_6_rc1.php
new file mode 100644
index 0000000000..87d5e490f8
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v30x/release_3_0_6_rc1.php
@@ -0,0 +1,326 @@
+<?php
+/**
+*
+* @package migration
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License v2
+*
+*/
+
+namespace phpbb\db\migration\data\v30x;
+
+class release_3_0_6_rc1 extends \phpbb\db\migration\migration
+{
+ public function effectively_installed()
+ {
+ return phpbb_version_compare($this->config['version'], '3.0.6-RC1', '>=');
+ }
+
+ static public function depends_on()
+ {
+ return array('\phpbb\db\migration\data\v30x\release_3_0_5');
+ }
+
+ public function update_schema()
+ {
+ return array(
+ 'add_columns' => array(
+ $this->table_prefix . 'confirm' => array(
+ 'attempts' => array('UINT', 0),
+ ),
+ $this->table_prefix . 'users' => array(
+ 'user_new' => array('BOOL', 1),
+ 'user_reminded' => array('TINT:4', 0),
+ 'user_reminded_time' => array('TIMESTAMP', 0),
+ ),
+ $this->table_prefix . 'groups' => array(
+ 'group_skip_auth' => array('BOOL', 0, 'after' => 'group_founder_manage'),
+ ),
+ $this->table_prefix . 'privmsgs' => array(
+ 'message_reported' => array('BOOL', 0),
+ ),
+ $this->table_prefix . 'reports' => array(
+ 'pm_id' => array('UINT', 0),
+ ),
+ $this->table_prefix . 'profile_fields' => array(
+ 'field_show_on_vt' => array('BOOL', 0),
+ ),
+ $this->table_prefix . 'forums' => array(
+ 'forum_options' => array('UINT:20', 0),
+ ),
+ ),
+ 'change_columns' => array(
+ $this->table_prefix . 'users' => array(
+ 'user_options' => array('UINT:11', 230271),
+ ),
+ ),
+ 'add_index' => array(
+ $this->table_prefix . 'reports' => array(
+ 'post_id' => array('post_id'),
+ 'pm_id' => array('pm_id'),
+ ),
+ $this->table_prefix . 'posts' => array(
+ 'post_username' => array('post_username:255'),
+ ),
+ ),
+ );
+ }
+
+ public function revert_schema()
+ {
+ return array(
+ 'drop_columns' => array(
+ $this->table_prefix . 'confirm' => array(
+ 'attempts',
+ ),
+ $this->table_prefix . 'users' => array(
+ 'user_new',
+ 'user_reminded',
+ 'user_reminded_time',
+ ),
+ $this->table_prefix . 'groups' => array(
+ 'group_skip_auth',
+ ),
+ $this->table_prefix . 'privmsgs' => array(
+ 'message_reported',
+ ),
+ $this->table_prefix . 'reports' => array(
+ 'pm_id',
+ ),
+ $this->table_prefix . 'profile_fields' => array(
+ 'field_show_on_vt',
+ ),
+ $this->table_prefix . 'forums' => array(
+ 'forum_options',
+ ),
+ ),
+ 'drop_keys' => array(
+ $this->table_prefix . 'reports' => array(
+ 'post_id',
+ 'pm_id',
+ ),
+ $this->table_prefix . 'posts' => array(
+ 'post_username',
+ ),
+ ),
+ );
+ }
+
+ public function update_data()
+ {
+ return array(
+ array('config.add', array('captcha_plugin', 'phpbb_captcha_nogd')),
+ array('if', array(
+ ($this->config['captcha_gd']),
+ array('config.update', array('captcha_plugin', 'phpbb_captcha_gd')),
+ )),
+
+ array('config.add', array('feed_enable', 0)),
+ array('config.add', array('feed_limit', 10)),
+ array('config.add', array('feed_overall_forums', 1)),
+ array('config.add', array('feed_overall_forums_limit', 15)),
+ array('config.add', array('feed_overall_topics', 0)),
+ array('config.add', array('feed_overall_topics_limit', 15)),
+ array('config.add', array('feed_forum', 1)),
+ array('config.add', array('feed_topic', 1)),
+ array('config.add', array('feed_item_statistics', 1)),
+
+ array('config.add', array('smilies_per_page', 50)),
+ array('config.add', array('allow_pm_report', 1)),
+ array('config.add', array('min_post_chars', 1)),
+ array('config.add', array('allow_quick_reply', 1)),
+ array('config.add', array('new_member_post_limit', 0)),
+ array('config.add', array('new_member_group_default', 0)),
+ array('config.add', array('delete_time', $this->config['edit_time'])),
+
+ array('config.add', array('allow_avatar', 0)),
+ array('if', array(
+ ($this->config['allow_avatar_upload'] || $this->config['allow_avatar_local'] || $this->config['allow_avatar_remote']),
+ array('config.update', array('allow_avatar', 1)),
+ )),
+ array('config.add', array('allow_avatar_remote_upload', 0)),
+ array('if', array(
+ ($this->config['allow_avatar_remote'] && $this->config['allow_avatar_upload']),
+ array('config.update', array('allow_avatar_remote_upload', 1)),
+ )),
+
+ array('module.add', array(
+ 'acp',
+ 'ACP_BOARD_CONFIGURATION',
+ array(
+ 'module_basename' => 'acp_board',
+ 'modes' => array('feed'),
+ ),
+ )),
+ array('module.add', array(
+ 'acp',
+ 'ACP_CAT_USERS',
+ array(
+ 'module_basename' => 'acp_users',
+ 'modes' => array('warnings'),
+ ),
+ )),
+ array('module.add', array(
+ 'acp',
+ 'ACP_SERVER_CONFIGURATION',
+ array(
+ 'module_basename' => 'acp_send_statistics',
+ 'modes' => array('send_statistics'),
+ ),
+ )),
+ array('module.add', array(
+ 'acp',
+ 'ACP_FORUM_BASED_PERMISSIONS',
+ array(
+ 'module_basename' => 'acp_permissions',
+ 'modes' => array('setting_forum_copy'),
+ ),
+ )),
+ array('module.add', array(
+ 'mcp',
+ 'MCP_REPORTS',
+ array(
+ 'module_basename' => 'mcp_pm_reports',
+ 'modes' => array('pm_reports','pm_reports_closed','pm_report_details'),
+ ),
+ )),
+ array('custom', array(array(&$this, 'add_newly_registered_group'))),
+ array('custom', array(array(&$this, 'set_user_options_default'))),
+
+ array('config.update', array('version', '3.0.6-RC1')),
+ );
+ }
+
+ public function set_user_options_default()
+ {
+ // 229376 is the added value to enable all three signature options
+ $sql = 'UPDATE ' . USERS_TABLE . ' SET user_options = user_options + 229376';
+ $this->sql_query($sql);
+ }
+
+ public function add_newly_registered_group()
+ {
+ // Add newly_registered group... but check if it already exists (we always supported running the updater on any schema)
+ $sql = 'SELECT group_id
+ FROM ' . GROUPS_TABLE . "
+ WHERE group_name = 'NEWLY_REGISTERED'";
+ $result = $this->db->sql_query($sql);
+ $group_id = (int) $this->db->sql_fetchfield('group_id');
+ $this->db->sql_freeresult($result);
+
+ if (!$group_id)
+ {
+ $sql = 'INSERT INTO ' . GROUPS_TABLE . " (group_name, group_type, group_founder_manage, group_colour, group_legend, group_avatar, group_desc, group_desc_uid, group_max_recipients) VALUES ('NEWLY_REGISTERED', 3, 0, '', 0, '', '', '', 5)";
+ $this->sql_query($sql);
+
+ $group_id = $this->db->sql_nextid();
+ }
+
+ // Insert new user role... at the end of the chain
+ $sql = 'SELECT role_id
+ FROM ' . ACL_ROLES_TABLE . "
+ WHERE role_name = 'ROLE_USER_NEW_MEMBER'
+ AND role_type = 'u_'";
+ $result = $this->db->sql_query($sql);
+ $u_role = (int) $this->db->sql_fetchfield('role_id');
+ $this->db->sql_freeresult($result);
+
+ if (!$u_role)
+ {
+ $sql = 'SELECT MAX(role_order) as max_order_id
+ FROM ' . ACL_ROLES_TABLE . "
+ WHERE role_type = 'u_'";
+ $result = $this->db->sql_query($sql);
+ $next_order_id = (int) $this->db->sql_fetchfield('max_order_id');
+ $this->db->sql_freeresult($result);
+
+ $next_order_id++;
+
+ $sql = 'INSERT INTO ' . ACL_ROLES_TABLE . " (role_name, role_description, role_type, role_order) VALUES ('ROLE_USER_NEW_MEMBER', 'ROLE_DESCRIPTION_USER_NEW_MEMBER', 'u_', $next_order_id)";
+ $this->sql_query($sql);
+ $u_role = $this->db->sql_nextid();
+
+ // Now add the correct data to the roles...
+ // The standard role says that new users are not able to send a PM, Mass PM, are not able to PM groups
+ $sql = 'INSERT INTO ' . ACL_ROLES_DATA_TABLE . " (role_id, auth_option_id, auth_setting) SELECT $u_role, auth_option_id, 0 FROM " . ACL_OPTIONS_TABLE . " WHERE auth_option LIKE 'u_%' AND auth_option IN ('u_sendpm', 'u_masspm', 'u_masspm_group')";
+ $this->sql_query($sql);
+
+ // Add user role to group
+ $sql = 'INSERT INTO ' . ACL_GROUPS_TABLE . " (group_id, forum_id, auth_option_id, auth_role_id, auth_setting) VALUES ($group_id, 0, 0, $u_role, 0)";
+ $this->sql_query($sql);
+ }
+
+ // Insert new forum role
+ $sql = 'SELECT role_id
+ FROM ' . ACL_ROLES_TABLE . "
+ WHERE role_name = 'ROLE_FORUM_NEW_MEMBER'
+ AND role_type = 'f_'";
+ $result = $this->db->sql_query($sql);
+ $f_role = (int) $this->db->sql_fetchfield('role_id');
+ $this->db->sql_freeresult($result);
+
+ if (!$f_role)
+ {
+ $sql = 'SELECT MAX(role_order) as max_order_id
+ FROM ' . ACL_ROLES_TABLE . "
+ WHERE role_type = 'f_'";
+ $result = $this->db->sql_query($sql);
+ $next_order_id = (int) $this->db->sql_fetchfield('max_order_id');
+ $this->db->sql_freeresult($result);
+
+ $next_order_id++;
+
+ $sql = 'INSERT INTO ' . ACL_ROLES_TABLE . " (role_name, role_description, role_type, role_order) VALUES ('ROLE_FORUM_NEW_MEMBER', 'ROLE_DESCRIPTION_FORUM_NEW_MEMBER', 'f_', $next_order_id)";
+ $this->sql_query($sql);
+ $f_role = $this->db->sql_nextid();
+
+ $sql = 'INSERT INTO ' . ACL_ROLES_DATA_TABLE . " (role_id, auth_option_id, auth_setting) SELECT $f_role, auth_option_id, 0 FROM " . ACL_OPTIONS_TABLE . " WHERE auth_option LIKE 'f_%' AND auth_option IN ('f_noapprove')";
+ $this->sql_query($sql);
+ }
+
+ // Set every members user_new column to 0 (old users) only if there is no one yet (this makes sure we do not execute this more than once)
+ $sql = 'SELECT 1
+ FROM ' . USERS_TABLE . '
+ WHERE user_new = 0';
+ $result = $this->db->sql_query_limit($sql, 1);
+ $row = $this->db->sql_fetchrow($result);
+ $this->db->sql_freeresult($result);
+
+ if (!$row)
+ {
+ $sql = 'UPDATE ' . USERS_TABLE . ' SET user_new = 0';
+ $this->sql_query($sql);
+ }
+
+ // To mimick the old "feature" we will assign the forum role to every forum, regardless of the setting (this makes sure there are no "this does not work!!!! YUO!!!" posts...
+ // Check if the role is already assigned...
+ $sql = 'SELECT forum_id
+ FROM ' . ACL_GROUPS_TABLE . '
+ WHERE group_id = ' . $group_id . '
+ AND auth_role_id = ' . $f_role;
+ $result = $this->db->sql_query($sql);
+ $is_options = (int) $this->db->sql_fetchfield('forum_id');
+ $this->db->sql_freeresult($result);
+
+ // Not assigned at all... :/
+ if (!$is_options)
+ {
+ // Get postable forums
+ $sql = 'SELECT forum_id
+ FROM ' . FORUMS_TABLE . '
+ WHERE forum_type != ' . FORUM_LINK;
+ $result = $this->db->sql_query($sql);
+
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ $this->sql_query('INSERT INTO ' . ACL_GROUPS_TABLE . ' (group_id, forum_id, auth_option_id, auth_role_id, auth_setting) VALUES (' . $group_id . ', ' . (int) $row['forum_id'] . ', 0, ' . $f_role . ', 0)');
+ }
+ $this->db->sql_freeresult($result);
+ }
+
+ // Clear permissions...
+ include_once($this->phpbb_root_path . 'includes/acp/auth.' . $this->php_ext);
+ $auth_admin = new \auth_admin();
+ $auth_admin->acl_clear_prefetch();
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v30x/release_3_0_6_rc2.php b/phpBB/phpbb/db/migration/data/v30x/release_3_0_6_rc2.php
new file mode 100644
index 0000000000..7a0ef28601
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v30x/release_3_0_6_rc2.php
@@ -0,0 +1,30 @@
+<?php
+/**
+*
+* @package migration
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License v2
+*
+*/
+
+namespace phpbb\db\migration\data\v30x;
+
+class release_3_0_6_rc2 extends \phpbb\db\migration\migration
+{
+ public function effectively_installed()
+ {
+ return phpbb_version_compare($this->config['version'], '3.0.6-RC2', '>=');
+ }
+
+ static public function depends_on()
+ {
+ return array('\phpbb\db\migration\data\v30x\release_3_0_6_rc1');
+ }
+
+ public function update_data()
+ {
+ return array(
+ array('config.update', array('version', '3.0.6-RC2')),
+ );
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v30x/release_3_0_6_rc3.php b/phpBB/phpbb/db/migration/data/v30x/release_3_0_6_rc3.php
new file mode 100644
index 0000000000..73a1fe9e6a
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v30x/release_3_0_6_rc3.php
@@ -0,0 +1,42 @@
+<?php
+/**
+*
+* @package migration
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License v2
+*
+*/
+
+namespace phpbb\db\migration\data\v30x;
+
+class release_3_0_6_rc3 extends \phpbb\db\migration\migration
+{
+ public function effectively_installed()
+ {
+ return phpbb_version_compare($this->config['version'], '3.0.6-RC3', '>=');
+ }
+
+ static public function depends_on()
+ {
+ return array('\phpbb\db\migration\data\v30x\release_3_0_6_rc2');
+ }
+
+ public function update_data()
+ {
+ return array(
+ array('custom', array(array(&$this, 'update_cp_fields'))),
+
+ array('config.update', array('version', '3.0.6-RC3')),
+ );
+ }
+
+ public function update_cp_fields()
+ {
+ // Update the Custom Profile Fields based on previous settings to the new \format
+ $sql = 'UPDATE ' . PROFILE_FIELDS_TABLE . '
+ SET field_show_on_vt = 1
+ WHERE field_hide = 0
+ AND (field_required = 1 OR field_show_on_reg = 1 OR field_show_profile = 1)';
+ $this->sql_query($sql);
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v30x/release_3_0_6_rc4.php b/phpBB/phpbb/db/migration/data/v30x/release_3_0_6_rc4.php
new file mode 100644
index 0000000000..b6e5be2c2f
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v30x/release_3_0_6_rc4.php
@@ -0,0 +1,30 @@
+<?php
+/**
+*
+* @package migration
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License v2
+*
+*/
+
+namespace phpbb\db\migration\data\v30x;
+
+class release_3_0_6_rc4 extends \phpbb\db\migration\migration
+{
+ public function effectively_installed()
+ {
+ return phpbb_version_compare($this->config['version'], '3.0.6-RC4', '>=');
+ }
+
+ static public function depends_on()
+ {
+ return array('\phpbb\db\migration\data\v30x\release_3_0_6_rc3');
+ }
+
+ public function update_data()
+ {
+ return array(
+ array('config.update', array('version', '3.0.6-RC4')),
+ );
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v30x/release_3_0_7.php b/phpBB/phpbb/db/migration/data/v30x/release_3_0_7.php
new file mode 100644
index 0000000000..2b0da30bc6
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v30x/release_3_0_7.php
@@ -0,0 +1,30 @@
+<?php
+/**
+*
+* @package migration
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License v2
+*
+*/
+
+namespace phpbb\db\migration\data\v30x;
+
+class release_3_0_7 extends \phpbb\db\migration\migration
+{
+ public function effectively_installed()
+ {
+ return phpbb_version_compare($this->config['version'], '3.0.7', '>=');
+ }
+
+ static public function depends_on()
+ {
+ return array('\phpbb\db\migration\data\v30x\release_3_0_7_rc2');
+ }
+
+ public function update_data()
+ {
+ return array(
+ array('config.update', array('version', '3.0.7')),
+ );
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v30x/release_3_0_7_pl1.php b/phpBB/phpbb/db/migration/data/v30x/release_3_0_7_pl1.php
new file mode 100644
index 0000000000..3547ee77e1
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v30x/release_3_0_7_pl1.php
@@ -0,0 +1,30 @@
+<?php
+/**
+*
+* @package migration
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License v2
+*
+*/
+
+namespace phpbb\db\migration\data\v30x;
+
+class release_3_0_7_pl1 extends \phpbb\db\migration\migration
+{
+ public function effectively_installed()
+ {
+ return phpbb_version_compare($this->config['version'], '3.0.7-pl1', '>=');
+ }
+
+ static public function depends_on()
+ {
+ return array('\phpbb\db\migration\data\v30x\release_3_0_7');
+ }
+
+ public function update_data()
+ {
+ return array(
+ array('config.update', array('version', '3.0.7-pl1')),
+ );
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v30x/release_3_0_7_rc1.php b/phpBB/phpbb/db/migration/data/v30x/release_3_0_7_rc1.php
new file mode 100644
index 0000000000..de4d772808
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v30x/release_3_0_7_rc1.php
@@ -0,0 +1,78 @@
+<?php
+/**
+*
+* @package migration
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License v2
+*
+*/
+
+namespace phpbb\db\migration\data\v30x;
+
+class release_3_0_7_rc1 extends \phpbb\db\migration\migration
+{
+ public function effectively_installed()
+ {
+ return phpbb_version_compare($this->config['version'], '3.0.7-RC1', '>=');
+ }
+
+ static public function depends_on()
+ {
+ return array('\phpbb\db\migration\data\v30x\release_3_0_6');
+ }
+
+ public function update_schema()
+ {
+ return array(
+ 'drop_keys' => array(
+ $this->table_prefix . 'log' => array(
+ 'log_time',
+ ),
+ ),
+ 'add_index' => array(
+ $this->table_prefix . 'topics_track' => array(
+ 'topic_id' => array('topic_id'),
+ ),
+ ),
+ );
+ }
+
+ public function revert_schema()
+ {
+ return array(
+ 'add_index' => array(
+ $this->table_prefix . 'log' => array(
+ 'log_time' => array('log_time'),
+ ),
+ ),
+ 'drop_keys' => array(
+ $this->table_prefix . 'topics_track' => array(
+ 'topic_id',
+ ),
+ ),
+ );
+ }
+
+ public function update_data()
+ {
+ return array(
+ array('config.add', array('feed_overall', 1)),
+ array('config.add', array('feed_http_auth', 0)),
+ array('config.add', array('feed_limit_post', $this->config['feed_limit'])),
+ array('config.add', array('feed_limit_topic', $this->config['feed_overall_topics_limit'])),
+ array('config.add', array('feed_topics_new', $this->config['feed_overall_topics'])),
+ array('config.add', array('feed_topics_active', $this->config['feed_overall_topics'])),
+ array('custom', array(array(&$this, 'delete_text_templates'))),
+
+ array('config.update', array('version', '3.0.7-RC1')),
+ );
+ }
+
+ public function delete_text_templates()
+ {
+ // Delete all text-templates from the template_data
+ $sql = 'DELETE FROM ' . STYLES_TEMPLATE_DATA_TABLE . '
+ WHERE template_filename ' . $this->db->sql_like_expression($this->db->any_char . '.txt');
+ $this->sql_query($sql);
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v30x/release_3_0_7_rc2.php b/phpBB/phpbb/db/migration/data/v30x/release_3_0_7_rc2.php
new file mode 100644
index 0000000000..800803a753
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v30x/release_3_0_7_rc2.php
@@ -0,0 +1,75 @@
+<?php
+/**
+*
+* @package migration
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License v2
+*
+*/
+
+namespace phpbb\db\migration\data\v30x;
+
+class release_3_0_7_rc2 extends \phpbb\db\migration\migration
+{
+ public function effectively_installed()
+ {
+ return phpbb_version_compare($this->config['version'], '3.0.7-RC2', '>=');
+ }
+
+ static public function depends_on()
+ {
+ return array('\phpbb\db\migration\data\v30x\release_3_0_7_rc1');
+ }
+
+ public function update_data()
+ {
+ return array(
+ array('custom', array(array(&$this, 'update_email_hash'))),
+
+ array('config.update', array('version', '3.0.7-RC2')),
+ );
+ }
+
+ public function update_email_hash($start = 0)
+ {
+ $limit = 1000;
+
+ $sql = 'SELECT user_id, user_email, user_email_hash
+ FROM ' . USERS_TABLE . '
+ WHERE user_type <> ' . USER_IGNORE . "
+ AND user_email <> ''";
+ $result = $this->db->sql_query_limit($sql, $limit, $start);
+
+ $i = 0;
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ $i++;
+
+ // Snapshot of the phpbb_email_hash() function
+ // We cannot call it directly because the auto updater updates the DB first. :/
+ $user_email_hash = sprintf('%u', crc32(strtolower($row['user_email']))) . strlen($row['user_email']);
+
+ if ($user_email_hash != $row['user_email_hash'])
+ {
+ $sql_ary = array(
+ 'user_email_hash' => $user_email_hash,
+ );
+
+ $sql = 'UPDATE ' . USERS_TABLE . '
+ SET ' . $this->db->sql_build_array('UPDATE', $sql_ary) . '
+ WHERE user_id = ' . (int) $row['user_id'];
+ $this->sql_query($sql);
+ }
+ }
+ $this->db->sql_freeresult($result);
+
+ if ($i < $limit)
+ {
+ // Completed
+ return;
+ }
+
+ // Return the next start, will be sent to $start when this function is called again
+ return $start + $limit;
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v30x/release_3_0_8.php b/phpBB/phpbb/db/migration/data/v30x/release_3_0_8.php
new file mode 100644
index 0000000000..6c8b1df6fc
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v30x/release_3_0_8.php
@@ -0,0 +1,30 @@
+<?php
+/**
+*
+* @package migration
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License v2
+*
+*/
+
+namespace phpbb\db\migration\data\v30x;
+
+class release_3_0_8 extends \phpbb\db\migration\migration
+{
+ public function effectively_installed()
+ {
+ return phpbb_version_compare($this->config['version'], '3.0.8', '>=');
+ }
+
+ static public function depends_on()
+ {
+ return array('\phpbb\db\migration\data\v30x\release_3_0_8_rc1');
+ }
+
+ public function update_data()
+ {
+ return array(
+ array('config.update', array('version', '3.0.8')),
+ );
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v30x/release_3_0_8_rc1.php b/phpBB/phpbb/db/migration/data/v30x/release_3_0_8_rc1.php
new file mode 100644
index 0000000000..1a14e5c961
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v30x/release_3_0_8_rc1.php
@@ -0,0 +1,223 @@
+<?php
+/**
+*
+* @package migration
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License v2
+*
+*/
+
+namespace phpbb\db\migration\data\v30x;
+
+class release_3_0_8_rc1 extends \phpbb\db\migration\migration
+{
+ public function effectively_installed()
+ {
+ return phpbb_version_compare($this->config['version'], '3.0.8-RC1', '>=');
+ }
+
+ static public function depends_on()
+ {
+ return array('\phpbb\db\migration\data\v30x\release_3_0_7_pl1');
+ }
+
+ public function update_data()
+ {
+ return array(
+ array('custom', array(array(&$this, 'update_file_extension_group_names'))),
+ array('custom', array(array(&$this, 'update_module_auth'))),
+ array('custom', array(array(&$this, 'update_bots'))),
+ array('custom', array(array(&$this, 'delete_orphan_shadow_topics'))),
+ array('module.add', array(
+ 'acp',
+ 'ACP_MESSAGES',
+ array(
+ 'module_basename' => 'acp_board',
+ 'modes' => array('post'),
+ ),
+ )),
+ array('config.add', array('load_unreads_search', 1)),
+ array('config.update_if_equals', array(600, 'queue_interval', 60)),
+ array('config.update_if_equals', array(50, 'email_package_size', 20)),
+
+ array('config.update', array('version', '3.0.8-RC1')),
+ );
+ }
+
+ public function update_file_extension_group_names()
+ {
+ // Update file extension group names to use language strings.
+ $sql = 'SELECT lang_dir
+ FROM ' . LANG_TABLE;
+ $result = $this->db->sql_query($sql);
+
+ $extension_groups_updated = array();
+ while ($lang_dir = $this->db->sql_fetchfield('lang_dir'))
+ {
+ $lang_dir = basename($lang_dir);
+
+ // The language strings we need are either in language/.../acp/attachments.php
+ // in the update package if we're updating to 3.0.8-RC1 or later,
+ // or they are in language/.../install.php when we're updating from 3.0.7-PL1 or earlier.
+ // On an already updated board, they can also already be in language/.../acp/attachments.php
+ // in the board root.
+ $lang_files = array(
+ "{$this->phpbb_root_path}install/update/new/language/$lang_dir/acp/attachments.{$this->php_ext}",
+ "{$this->phpbb_root_path}language/$lang_dir/install.{$this->php_ext}",
+ "{$this->phpbb_root_path}language/$lang_dir/acp/attachments.{$this->php_ext}",
+ );
+
+ foreach ($lang_files as $lang_file)
+ {
+ if (!file_exists($lang_file))
+ {
+ continue;
+ }
+
+ $lang = array();
+ include($lang_file);
+
+ foreach($lang as $lang_key => $lang_val)
+ {
+ if (isset($extension_groups_updated[$lang_key]) || strpos($lang_key, 'EXT_GROUP_') !== 0)
+ {
+ continue;
+ }
+
+ $sql_ary = array(
+ 'group_name' => substr($lang_key, 10), // Strip off 'EXT_GROUP_'
+ );
+
+ $sql = 'UPDATE ' . EXTENSION_GROUPS_TABLE . '
+ SET ' . $this->db->sql_build_array('UPDATE', $sql_ary) . "
+ WHERE group_name = '" . $this->db->sql_escape($lang_val) . "'";
+ $this->sql_query($sql);
+
+ $extension_groups_updated[$lang_key] = true;
+ }
+ }
+ }
+ $this->db->sql_freeresult($result);
+ }
+
+ public function update_module_auth()
+ {
+ $sql = 'UPDATE ' . MODULES_TABLE . '
+ SET module_auth = \'cfg_allow_avatar && (cfg_allow_avatar_local || cfg_allow_avatar_remote || cfg_allow_avatar_upload || cfg_allow_avatar_remote_upload)\'
+ WHERE module_class = \'ucp\'
+ AND module_basename = \'profile\'
+ AND module_mode = \'avatar\'';
+ $this->sql_query($sql);
+ }
+
+ public function update_bots()
+ {
+ $bot_name = 'Bing [Bot]';
+ $bot_name_clean = utf8_clean_string($bot_name);
+
+ $sql = 'SELECT user_id
+ FROM ' . USERS_TABLE . "
+ WHERE username_clean = '" . $this->db->sql_escape($bot_name_clean) . "'";
+ $result = $this->db->sql_query($sql);
+ $bing_already_added = (bool) $this->db->sql_fetchfield('user_id');
+ $this->db->sql_freeresult($result);
+
+ if (!$bing_already_added)
+ {
+ $bot_agent = 'bingbot/';
+ $bot_ip = '';
+ $sql = 'SELECT group_id, group_colour
+ FROM ' . GROUPS_TABLE . "
+ WHERE group_name = 'BOTS'";
+ $result = $this->db->sql_query($sql);
+ $group_row = $this->db->sql_fetchrow($result);
+ $this->db->sql_freeresult($result);
+
+ if (!$group_row)
+ {
+ // default fallback, should never get here
+ $group_row['group_id'] = 6;
+ $group_row['group_colour'] = '9E8DA7';
+ }
+
+ if (!function_exists('user_add'))
+ {
+ include($this->phpbb_root_path . 'includes/functions_user.' . $this->php_ext);
+ }
+
+ $user_row = array(
+ 'user_type' => USER_IGNORE,
+ 'group_id' => $group_row['group_id'],
+ 'username' => $bot_name,
+ 'user_regdate' => time(),
+ 'user_password' => '',
+ 'user_colour' => $group_row['group_colour'],
+ 'user_email' => '',
+ 'user_lang' => $this->config['default_lang'],
+ 'user_style' => $this->config['default_style'],
+ 'user_timezone' => 0,
+ 'user_dateformat' => $this->config['default_dateformat'],
+ 'user_allow_massemail' => 0,
+ );
+
+ $user_id = user_add($user_row);
+
+ $sql = 'INSERT INTO ' . BOTS_TABLE . ' ' . $this->db->sql_build_array('INSERT', array(
+ 'bot_active' => 1,
+ 'bot_name' => (string) $bot_name,
+ 'user_id' => (int) $user_id,
+ 'bot_agent' => (string) $bot_agent,
+ 'bot_ip' => (string) $bot_ip,
+ ));
+
+ $this->sql_query($sql);
+ }
+ }
+
+ public function delete_orphan_shadow_topics()
+ {
+ // Delete shadow topics pointing to not existing topics
+ $batch_size = 500;
+
+ // Set of affected forums we have to resync
+ $sync_forum_ids = array();
+
+ $sql_array = array(
+ 'SELECT' => 't1.topic_id, t1.forum_id',
+ 'FROM' => array(
+ TOPICS_TABLE => 't1',
+ ),
+ 'LEFT_JOIN' => array(
+ array(
+ 'FROM' => array(TOPICS_TABLE => 't2'),
+ 'ON' => 't1.topic_moved_id = t2.topic_id',
+ ),
+ ),
+ 'WHERE' => 't1.topic_moved_id <> 0
+ AND t2.topic_id IS NULL',
+ );
+ $sql = $this->db->sql_build_query('SELECT', $sql_array);
+ $result = $this->db->sql_query_limit($sql, $batch_size);
+
+ $topic_ids = array();
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ $topic_ids[] = (int) $row['topic_id'];
+
+ $sync_forum_ids[(int) $row['forum_id']] = (int) $row['forum_id'];
+ }
+ $this->db->sql_freeresult($result);
+
+ if (!empty($topic_ids))
+ {
+ $sql = 'DELETE FROM ' . TOPICS_TABLE . '
+ WHERE ' . $this->db->sql_in_set('topic_id', $topic_ids);
+ $this->db->sql_query($sql);
+
+ // Sync the forums we have deleted shadow topics from.
+ sync('forum', 'forum_id', $sync_forum_ids, true, true);
+
+ return false;
+ }
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v30x/release_3_0_9.php b/phpBB/phpbb/db/migration/data/v30x/release_3_0_9.php
new file mode 100644
index 0000000000..9af2fce971
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v30x/release_3_0_9.php
@@ -0,0 +1,30 @@
+<?php
+/**
+*
+* @package migration
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License v2
+*
+*/
+
+namespace phpbb\db\migration\data\v30x;
+
+class release_3_0_9 extends \phpbb\db\migration\migration
+{
+ public function effectively_installed()
+ {
+ return phpbb_version_compare($this->config['version'], '3.0.9', '>=');
+ }
+
+ static public function depends_on()
+ {
+ return array('\phpbb\db\migration\data\v30x\release_3_0_9_rc4');
+ }
+
+ public function update_data()
+ {
+ return array(
+ array('config.update', array('version', '3.0.9')),
+ );
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v30x/release_3_0_9_rc1.php b/phpBB/phpbb/db/migration/data/v30x/release_3_0_9_rc1.php
new file mode 100644
index 0000000000..3fb790bc0d
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v30x/release_3_0_9_rc1.php
@@ -0,0 +1,126 @@
+<?php
+/**
+*
+* @package migration
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License v2
+*
+*/
+
+namespace phpbb\db\migration\data\v30x;
+
+class release_3_0_9_rc1 extends \phpbb\db\migration\migration
+{
+ public function effectively_installed()
+ {
+ return phpbb_version_compare($this->config['version'], '3.0.9-RC1', '>=');
+ }
+
+ static public function depends_on()
+ {
+ return array('\phpbb\db\migration\data\v30x\release_3_0_8');
+ }
+
+ public function update_schema()
+ {
+ return array(
+ 'add_tables' => array(
+ $this->table_prefix . 'login_attempts' => array(
+ 'COLUMNS' => array(
+ // this column was removed from the database updater
+ // after 3.0.9-RC3 was released. It might still exist
+ // in 3.0.9-RCX installations and has to be dropped as
+ // soon as the db_tools class is capable of properly
+ // removing a primary key.
+ // 'attempt_id' => array('UINT', NULL, 'auto_increment'),
+ 'attempt_ip' => array('VCHAR:40', ''),
+ 'attempt_browser' => array('VCHAR:150', ''),
+ 'attempt_forwarded_for' => array('VCHAR:255', ''),
+ 'attempt_time' => array('TIMESTAMP', 0),
+ 'user_id' => array('UINT', 0),
+ 'username' => array('VCHAR_UNI:255', 0),
+ 'username_clean' => array('VCHAR_CI', 0),
+ ),
+ //'PRIMARY_KEY' => 'attempt_id',
+ 'KEYS' => array(
+ 'att_ip' => array('INDEX', array('attempt_ip', 'attempt_time')),
+ 'att_for' => array('INDEX', array('attempt_forwarded_for', 'attempt_time')),
+ 'att_time' => array('INDEX', array('attempt_time')),
+ 'user_id' => array('INDEX', 'user_id'),
+ ),
+ ),
+ ),
+ 'change_columns' => array(
+ $this->table_prefix . 'bbcodes' => array(
+ 'bbcode_id' => array('USINT', 0),
+ ),
+ ),
+ );
+ }
+
+ public function revert_schema()
+ {
+ return array(
+ 'drop_tables' => array(
+ $this->table_prefix . 'login_attempts',
+ ),
+ );
+ }
+
+ public function update_data()
+ {
+ return array(
+ array('config.add', array('ip_login_limit_max', 50)),
+ array('config.add', array('ip_login_limit_time', 21600)),
+ array('config.add', array('ip_login_limit_use_forwarded', 0)),
+ array('custom', array(array(&$this, 'update_file_extension_group_names'))),
+ array('custom', array(array(&$this, 'fix_firebird_qa_captcha'))),
+
+ array('config.update', array('version', '3.0.9-RC1')),
+ );
+ }
+
+ public function update_file_extension_group_names()
+ {
+ // Update file extension group names to use language strings, again.
+ $sql = 'SELECT group_id, group_name
+ FROM ' . EXTENSION_GROUPS_TABLE . '
+ WHERE group_name ' . $this->db->sql_like_expression('EXT_GROUP_' . $this->db->any_char);
+ $result = $this->db->sql_query($sql);
+
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ $sql_ary = array(
+ 'group_name' => substr($row['group_name'], 10), // Strip off 'EXT_GROUP_'
+ );
+
+ $sql = 'UPDATE ' . EXTENSION_GROUPS_TABLE . '
+ SET ' . $this->db->sql_build_array('UPDATE', $sql_ary) . '
+ WHERE group_id = ' . $row['group_id'];
+ $this->sql_query($sql);
+ }
+ $this->db->sql_freeresult($result);
+ }
+
+ public function fix_firebird_qa_captcha()
+ {
+ // Recover from potentially broken Q&A CAPTCHA table on firebird
+ // Q&A CAPTCHA was uninstallable, so it's safe to remove these
+ // without data loss
+ if ($this->db_tools->sql_layer == 'firebird')
+ {
+ $tables = array(
+ $this->table_prefix . 'captcha_questions',
+ $this->table_prefix . 'captcha_answers',
+ $this->table_prefix . 'qa_confirm',
+ );
+ foreach ($tables as $table)
+ {
+ if ($this->db_tools->sql_table_exists($table))
+ {
+ $this->db_tools->sql_table_drop($table);
+ }
+ }
+ }
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v30x/release_3_0_9_rc2.php b/phpBB/phpbb/db/migration/data/v30x/release_3_0_9_rc2.php
new file mode 100644
index 0000000000..cd79d24ade
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v30x/release_3_0_9_rc2.php
@@ -0,0 +1,30 @@
+<?php
+/**
+*
+* @package migration
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License v2
+*
+*/
+
+namespace phpbb\db\migration\data\v30x;
+
+class release_3_0_9_rc2 extends \phpbb\db\migration\migration
+{
+ public function effectively_installed()
+ {
+ return phpbb_version_compare($this->config['version'], '3.0.9-RC2', '>=');
+ }
+
+ static public function depends_on()
+ {
+ return array('\phpbb\db\migration\data\v30x\release_3_0_9_rc1');
+ }
+
+ public function update_data()
+ {
+ return array(
+ array('config.update', array('version', '3.0.9-RC2')),
+ );
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v30x/release_3_0_9_rc3.php b/phpBB/phpbb/db/migration/data/v30x/release_3_0_9_rc3.php
new file mode 100644
index 0000000000..7e59b8f9e8
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v30x/release_3_0_9_rc3.php
@@ -0,0 +1,30 @@
+<?php
+/**
+*
+* @package migration
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License v2
+*
+*/
+
+namespace phpbb\db\migration\data\v30x;
+
+class release_3_0_9_rc3 extends \phpbb\db\migration\migration
+{
+ public function effectively_installed()
+ {
+ return phpbb_version_compare($this->config['version'], '3.0.9-RC3', '>=');
+ }
+
+ static public function depends_on()
+ {
+ return array('\phpbb\db\migration\data\v30x\release_3_0_9_rc2');
+ }
+
+ public function update_data()
+ {
+ return array(
+ array('config.update', array('version', '3.0.9-RC3')),
+ );
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v30x/release_3_0_9_rc4.php b/phpBB/phpbb/db/migration/data/v30x/release_3_0_9_rc4.php
new file mode 100644
index 0000000000..e71d9defa6
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v30x/release_3_0_9_rc4.php
@@ -0,0 +1,30 @@
+<?php
+/**
+*
+* @package migration
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License v2
+*
+*/
+
+namespace phpbb\db\migration\data\v30x;
+
+class release_3_0_9_rc4 extends \phpbb\db\migration\migration
+{
+ public function effectively_installed()
+ {
+ return phpbb_version_compare($this->config['version'], '3.0.9-RC4', '>=');
+ }
+
+ static public function depends_on()
+ {
+ return array('\phpbb\db\migration\data\v30x\release_3_0_9_rc3');
+ }
+
+ public function update_data()
+ {
+ return array(
+ array('config.update', array('version', '3.0.9-RC4')),
+ );
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v310/acp_prune_users_module.php b/phpBB/phpbb/db/migration/data/v310/acp_prune_users_module.php
new file mode 100644
index 0000000000..ab5b1a535b
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v310/acp_prune_users_module.php
@@ -0,0 +1,77 @@
+<?php
+/**
+*
+* @package migration
+* @copyright (c) 2014 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License v2
+*
+*/
+
+namespace phpbb\db\migration\data\v310;
+
+class acp_prune_users_module extends \phpbb\db\migration\migration
+{
+ public function effectively_installed()
+ {
+ $sql = 'SELECT module_id
+ FROM ' . MODULES_TABLE . "
+ WHERE module_class = 'acp'
+ AND module_langname = 'ACP_CAT_USERS'";
+ $result = $this->db->sql_query($sql);
+ $acp_cat_users_id = (int) $this->db->sql_fetchfield('module_id');
+ $this->db->sql_freeresult($result);
+
+ $sql = 'SELECT parent_id
+ FROM ' . MODULES_TABLE . "
+ WHERE module_class = 'acp'
+ AND module_basename = 'acp_prune'
+ AND module_mode = 'users'";
+ $result = $this->db->sql_query($sql);
+ $acp_prune_users_parent = (int) $this->db->sql_fetchfield('parent_id');
+ $this->db->sql_freeresult($result);
+
+ // Skip migration if "Users" category has been deleted
+ // or the module has already been moved to that category
+ return !$acp_cat_users_id || $acp_cat_users_id === $acp_prune_users_parent;
+ }
+
+ static public function depends_on()
+ {
+ return array('\phpbb\db\migration\data\v310\beta1');
+ }
+
+ public function update_data()
+ {
+ return array(
+ array('custom', array(array($this, 'move_prune_users_module'))),
+ );
+ }
+
+ public function move_prune_users_module()
+ {
+ $sql = 'SELECT module_id
+ FROM ' . MODULES_TABLE . "
+ WHERE module_class = 'acp'
+ AND module_basename = 'acp_prune'
+ AND module_mode = 'users'";
+ $result = $this->db->sql_query($sql);
+ $acp_prune_users_id = (int) $this->db->sql_fetchfield('module_id');
+ $this->db->sql_freeresult($result);
+
+ $sql = 'SELECT module_id
+ FROM ' . MODULES_TABLE . "
+ WHERE module_class = 'acp'
+ AND module_langname = 'ACP_CAT_USERS'";
+ $result = $this->db->sql_query($sql);
+ $acp_cat_users_id = (int) $this->db->sql_fetchfield('module_id');
+ $this->db->sql_freeresult($result);
+
+ if (!class_exists('\acp_modules'))
+ {
+ include($this->phpbb_root_path . 'includes/acp/acp_modules.' . $this->php_ext);
+ }
+ $module_manager = new \acp_modules();
+ $module_manager->module_class = 'acp';
+ $module_manager->move_module($acp_prune_users_id, $acp_cat_users_id);
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v310/acp_style_components_module.php b/phpBB/phpbb/db/migration/data/v310/acp_style_components_module.php
new file mode 100644
index 0000000000..9f168f4fd6
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v310/acp_style_components_module.php
@@ -0,0 +1,42 @@
+<?php
+/**
+*
+* @package migration
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\db\migration\data\v310;
+
+class acp_style_components_module extends \phpbb\db\migration\migration
+{
+ public function effectively_installed()
+ {
+ $sql = 'SELECT module_id
+ FROM ' . MODULES_TABLE . "
+ WHERE module_class = 'acp'
+ AND module_langname = 'ACP_STYLE_COMPONENTS'";
+ $result = $this->db->sql_query($sql);
+ $module_id = $this->db->sql_fetchfield('module_id');
+ $this->db->sql_freeresult($result);
+
+ return $module_id == false;
+ }
+
+ static public function depends_on()
+ {
+ return array('\phpbb\db\migration\data\v310\dev');
+ }
+
+ public function update_data()
+ {
+ return array(
+ array('module.remove', array(
+ 'acp',
+ false,
+ 'ACP_STYLE_COMPONENTS',
+ )),
+ );
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v310/allow_cdn.php b/phpBB/phpbb/db/migration/data/v310/allow_cdn.php
new file mode 100644
index 0000000000..aa471df6e7
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v310/allow_cdn.php
@@ -0,0 +1,33 @@
+<?php
+/**
+*
+* @package migration
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License v2
+*
+*/
+
+namespace phpbb\db\migration\data\v310;
+
+class allow_cdn extends \phpbb\db\migration\migration
+{
+ public function effectively_installed()
+ {
+ return isset($this->config['allow_cdn']);
+ }
+
+ static public function depends_on()
+ {
+ return array(
+ '\phpbb\db\migration\data\v310\jquery_update',
+ );
+ }
+
+ public function update_data()
+ {
+ return array(
+ array('config.add', array('allow_cdn', (int) $this->config['load_jquery_cdn'])),
+ array('config.remove', array('load_jquery_cdn')),
+ );
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v310/alpha1.php b/phpBB/phpbb/db/migration/data/v310/alpha1.php
new file mode 100644
index 0000000000..403e301e64
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v310/alpha1.php
@@ -0,0 +1,44 @@
+<?php
+/**
+*
+* @package migration
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License v2
+*
+*/
+
+namespace phpbb\db\migration\data\v310;
+
+class alpha1 extends \phpbb\db\migration\migration
+{
+ static public function depends_on()
+ {
+ return array(
+ '\phpbb\db\migration\data\v30x\local_url_bbcode',
+ '\phpbb\db\migration\data\v30x\release_3_0_12',
+ '\phpbb\db\migration\data\v310\acp_style_components_module',
+ '\phpbb\db\migration\data\v310\allow_cdn',
+ '\phpbb\db\migration\data\v310\auth_provider_oauth',
+ '\phpbb\db\migration\data\v310\avatars',
+ '\phpbb\db\migration\data\v310\boardindex',
+ '\phpbb\db\migration\data\v310\config_db_text',
+ '\phpbb\db\migration\data\v310\forgot_password',
+ '\phpbb\db\migration\data\v310\mod_rewrite',
+ '\phpbb\db\migration\data\v310\mysql_fulltext_drop',
+ '\phpbb\db\migration\data\v310\namespaces',
+ '\phpbb\db\migration\data\v310\notifications_cron',
+ '\phpbb\db\migration\data\v310\notification_options_reconvert',
+ '\phpbb\db\migration\data\v310\plupload',
+ '\phpbb\db\migration\data\v310\signature_module_auth',
+ '\phpbb\db\migration\data\v310\softdelete_mcp_modules',
+ '\phpbb\db\migration\data\v310\teampage',
+ );
+ }
+
+ public function update_data()
+ {
+ return array(
+ array('config.update', array('version', '3.1.0-a1')),
+ );
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v310/alpha2.php b/phpBB/phpbb/db/migration/data/v310/alpha2.php
new file mode 100644
index 0000000000..3c0853f924
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v310/alpha2.php
@@ -0,0 +1,28 @@
+<?php
+/**
+*
+* @package migration
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License v2
+*
+*/
+
+namespace phpbb\db\migration\data\v310;
+
+class alpha2 extends \phpbb\db\migration\migration
+{
+ static public function depends_on()
+ {
+ return array(
+ '\phpbb\db\migration\data\v310\alpha1',
+ '\phpbb\db\migration\data\v310\notifications_cron_p2',
+ );
+ }
+
+ public function update_data()
+ {
+ return array(
+ array('config.update', array('version', '3.1.0-a2')),
+ );
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v310/alpha3.php b/phpBB/phpbb/db/migration/data/v310/alpha3.php
new file mode 100644
index 0000000000..4bd2231bb9
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v310/alpha3.php
@@ -0,0 +1,30 @@
+<?php
+/**
+*
+* @package migration
+* @copyright (c) 2014 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License v2
+*
+*/
+
+namespace phpbb\db\migration\data\v310;
+
+class alpha3 extends \phpbb\db\migration\migration
+{
+ static public function depends_on()
+ {
+ return array(
+ '\phpbb\db\migration\data\v310\alpha2',
+ '\phpbb\db\migration\data\v310\avatar_types',
+ '\phpbb\db\migration\data\v310\passwords',
+ '\phpbb\db\migration\data\v310\profilefield_types',
+ );
+ }
+
+ public function update_data()
+ {
+ return array(
+ array('config.update', array('version', '3.1.0-a3')),
+ );
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v310/auth_provider_oauth.php b/phpBB/phpbb/db/migration/data/v310/auth_provider_oauth.php
new file mode 100644
index 0000000000..971a7e8504
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v310/auth_provider_oauth.php
@@ -0,0 +1,73 @@
+<?php
+/**
+*
+* @package migration
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License v2
+*
+*/
+
+namespace phpbb\db\migration\data\v310;
+
+class auth_provider_oauth extends \phpbb\db\migration\migration
+{
+ public function effectively_installed()
+ {
+ return $this->db_tools->sql_table_exists($this->table_prefix . 'auth_provider_oauth');
+ }
+
+ public function update_schema()
+ {
+ return array(
+ 'add_tables' => array(
+ $this->table_prefix . 'oauth_tokens' => array(
+ 'COLUMNS' => array(
+ 'user_id' => array('UINT', 0), // phpbb_users.user_id
+ 'session_id' => array('CHAR:32', ''), // phpbb_sessions.session_id used only when user_id not set
+ 'provider' => array('VCHAR', ''), // Name of the OAuth provider
+ 'oauth_token' => array('MTEXT', ''), // Serialized token
+ ),
+ 'KEYS' => array(
+ 'user_id' => array('INDEX', 'user_id'),
+ 'provider' => array('INDEX', 'provider'),
+ ),
+ ),
+ $this->table_prefix . 'oauth_accounts' => array(
+ 'COLUMNS' => array(
+ 'user_id' => array('UINT', 0),
+ 'provider' => array('VCHAR', ''),
+ 'oauth_provider_id' => array('TEXT_UNI', ''),
+ ),
+ 'PRIMARY_KEY' => array(
+ 'user_id',
+ 'provider',
+ ),
+ ),
+ ),
+ );
+ }
+
+ public function revert_schema()
+ {
+ return array(
+ 'drop_tables' => array(
+ $this->table_prefix . 'oauth_tokens',
+ $this->table_prefix . 'oauth_accounts',
+ ),
+ );
+ }
+
+ public function update_data()
+ {
+ return array(
+ array('module.add', array(
+ 'ucp',
+ 'UCP_PROFILE',
+ array(
+ 'module_basename' => 'ucp_auth_link',
+ 'modes' => array('auth_link'),
+ ),
+ )),
+ );
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v310/avatar_types.php b/phpBB/phpbb/db/migration/data/v310/avatar_types.php
new file mode 100644
index 0000000000..bdbdccf0c5
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v310/avatar_types.php
@@ -0,0 +1,60 @@
+<?php
+/**
+*
+* @package migration
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License v2
+*
+*/
+
+namespace phpbb\db\migration\data\v310;
+
+class avatar_types extends \phpbb\db\migration\migration
+{
+ /**
+ * @var avatar type map
+ */
+ protected $avatar_type_map = array(
+ AVATAR_UPLOAD => 'avatar.driver.upload',
+ AVATAR_REMOTE => 'avatar.driver.remote',
+ AVATAR_GALLERY => 'avatar.driver.local',
+ );
+
+ static public function depends_on()
+ {
+ return array(
+ '\phpbb\db\migration\data\v310\dev',
+ '\phpbb\db\migration\data\v310\avatars',
+ );
+ }
+
+ public function update_data()
+ {
+ return array(
+ array('custom', array(array($this, 'update_user_avatar_type'))),
+ array('custom', array(array($this, 'update_group_avatar_type'))),
+ );
+ }
+
+ public function update_user_avatar_type()
+ {
+ foreach ($this->avatar_type_map as $old => $new)
+ {
+ $sql = 'UPDATE ' . $this->table_prefix . "users
+ SET user_avatar_type = '$new'
+ WHERE user_avatar_type = '$old'";
+ $this->db->sql_query($sql);
+ }
+ }
+
+ public function update_group_avatar_type()
+ {
+ foreach ($this->avatar_type_map as $old => $new)
+ {
+ $sql = 'UPDATE ' . $this->table_prefix . "groups
+ SET group_avatar_type = '$new'
+ WHERE group_avatar_type = '$old'";
+ $this->db->sql_query($sql);
+ }
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v310/avatars.php b/phpBB/phpbb/db/migration/data/v310/avatars.php
new file mode 100644
index 0000000000..80ce606f29
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v310/avatars.php
@@ -0,0 +1,69 @@
+<?php
+/**
+*
+* @package migration
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License v2
+*
+*/
+
+namespace phpbb\db\migration\data\v310;
+
+class avatars extends \phpbb\db\migration\migration
+{
+ public function effectively_installed()
+ {
+ return isset($this->config['allow_avatar_gravatar']);
+ }
+
+ static public function depends_on()
+ {
+ return array('\phpbb\db\migration\data\v30x\release_3_0_11');
+ }
+
+ public function update_schema()
+ {
+ return array(
+ 'change_columns' => array(
+ $this->table_prefix . 'users' => array(
+ 'user_avatar_type' => array('VCHAR:255', ''),
+ ),
+ $this->table_prefix . 'groups' => array(
+ 'group_avatar_type' => array('VCHAR:255', ''),
+ ),
+ ),
+ );
+ }
+
+ public function revert_schema()
+ {
+ return array(
+ 'change_columns' => array(
+ $this->table_prefix . 'users' => array(
+ 'user_avatar_type' => array('TINT:2', ''),
+ ),
+ $this->table_prefix . 'groups' => array(
+ 'group_avatar_type' => array('TINT:2', ''),
+ ),
+ ),
+ );
+ }
+
+ public function update_data()
+ {
+ return array(
+ array('config.add', array('allow_avatar_gravatar', 0)),
+ array('custom', array(array($this, 'update_module_auth'))),
+ );
+ }
+
+ public function update_module_auth()
+ {
+ $sql = 'UPDATE ' . $this->table_prefix . "modules
+ SET module_auth = 'cfg_allow_avatar'
+ WHERE module_class = 'ucp'
+ AND module_basename = 'ucp_profile'
+ AND module_mode = 'avatar'";
+ $this->db->sql_query($sql);
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v310/beta1.php b/phpBB/phpbb/db/migration/data/v310/beta1.php
new file mode 100644
index 0000000000..36d0c62b6f
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v310/beta1.php
@@ -0,0 +1,33 @@
+<?php
+/**
+*
+* @package migration
+* @copyright (c) 2014 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License v2
+*
+*/
+
+namespace phpbb\db\migration\data\v310;
+
+class beta1 extends \phpbb\db\migration\migration
+{
+ static public function depends_on()
+ {
+ return array(
+ '\phpbb\db\migration\data\v310\alpha3',
+ '\phpbb\db\migration\data\v310\passwords_p2',
+ '\phpbb\db\migration\data\v310\postgres_fulltext_drop',
+ '\phpbb\db\migration\data\v310\profilefield_change_load_settings',
+ '\phpbb\db\migration\data\v310\profilefield_location',
+ '\phpbb\db\migration\data\v310\soft_delete_mod_convert2',
+ '\phpbb\db\migration\data\v310\ucp_popuppm_module',
+ );
+ }
+
+ public function update_data()
+ {
+ return array(
+ array('config.update', array('version', '3.1.0-b1')),
+ );
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v310/boardindex.php b/phpBB/phpbb/db/migration/data/v310/boardindex.php
new file mode 100644
index 0000000000..27492f2d0d
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v310/boardindex.php
@@ -0,0 +1,25 @@
+<?php
+/**
+*
+* @package migration
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License v2
+*
+*/
+
+namespace phpbb\db\migration\data\v310;
+
+class boardindex extends \phpbb\db\migration\migration
+{
+ public function effectively_installed()
+ {
+ return isset($this->config['board_index_text']);
+ }
+
+ public function update_data()
+ {
+ return array(
+ array('config.add', array('board_index_text', '')),
+ );
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v310/config_db_text.php b/phpBB/phpbb/db/migration/data/v310/config_db_text.php
new file mode 100644
index 0000000000..1a7ee7a9a6
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v310/config_db_text.php
@@ -0,0 +1,47 @@
+<?php
+/**
+*
+* @package migration
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License v2
+*
+*/
+
+namespace phpbb\db\migration\data\v310;
+
+class config_db_text extends \phpbb\db\migration\migration
+{
+ public function effectively_installed()
+ {
+ return $this->db_tools->sql_table_exists($this->table_prefix . 'config_text');
+ }
+
+ static public function depends_on()
+ {
+ return array('\phpbb\db\migration\data\v30x\release_3_0_11');
+ }
+
+ public function update_schema()
+ {
+ return array(
+ 'add_tables' => array(
+ $this->table_prefix . 'config_text' => array(
+ 'COLUMNS' => array(
+ 'config_name' => array('VCHAR', ''),
+ 'config_value' => array('MTEXT', ''),
+ ),
+ 'PRIMARY_KEY' => 'config_name',
+ ),
+ ),
+ );
+ }
+
+ public function revert_schema()
+ {
+ return array(
+ 'drop_tables' => array(
+ $this->table_prefix . 'config_text',
+ ),
+ );
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v310/dev.php b/phpBB/phpbb/db/migration/data/v310/dev.php
new file mode 100644
index 0000000000..83611d3731
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v310/dev.php
@@ -0,0 +1,411 @@
+<?php
+/**
+*
+* @package migration
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License v2
+*
+*/
+
+namespace phpbb\db\migration\data\v310;
+
+class dev extends \phpbb\db\migration\migration
+{
+ public function effectively_installed()
+ {
+ return version_compare($this->config['version'], '3.1.0-dev', '>=');
+ }
+
+ static public function depends_on()
+ {
+ return array(
+ '\phpbb\db\migration\data\v310\extensions',
+ '\phpbb\db\migration\data\v310\style_update_p2',
+ '\phpbb\db\migration\data\v310\timezone_p2',
+ '\phpbb\db\migration\data\v310\reported_posts_display',
+ '\phpbb\db\migration\data\v310\migrations_table',
+ );
+ }
+
+ public function update_schema()
+ {
+ return array(
+ 'add_columns' => array(
+ $this->table_prefix . 'groups' => array(
+ 'group_teampage' => array('UINT', 0, 'after' => 'group_legend'),
+ ),
+ $this->table_prefix . 'profile_fields' => array(
+ 'field_show_on_pm' => array('BOOL', 0),
+ ),
+ $this->table_prefix . 'styles' => array(
+ 'style_path' => array('VCHAR:100', ''),
+ 'bbcode_bitfield' => array('VCHAR:255', 'kNg='),
+ 'style_parent_id' => array('UINT:4', 0),
+ 'style_parent_tree' => array('TEXT', ''),
+ ),
+ $this->table_prefix . 'reports' => array(
+ 'reported_post_text' => array('MTEXT_UNI', ''),
+ 'reported_post_uid' => array('VCHAR:8', ''),
+ 'reported_post_bitfield' => array('VCHAR:255', ''),
+ ),
+ ),
+ 'change_columns' => array(
+ $this->table_prefix . 'groups' => array(
+ 'group_legend' => array('UINT', 0),
+ ),
+ ),
+ );
+ }
+
+ public function revert_schema()
+ {
+ return array(
+ 'drop_columns' => array(
+ $this->table_prefix . 'groups' => array(
+ 'group_teampage',
+ ),
+ $this->table_prefix . 'profile_fields' => array(
+ 'field_show_on_pm',
+ ),
+ $this->table_prefix . 'styles' => array(
+ 'style_path',
+ 'bbcode_bitfield',
+ 'style_parent_id',
+ 'style_parent_tree',
+ ),
+ $this->table_prefix . 'reports' => array(
+ 'reported_post_text',
+ 'reported_post_uid',
+ 'reported_post_bitfield',
+ ),
+ ),
+ );
+ }
+
+ public function update_data()
+ {
+ return array(
+ array('if', array(
+ (strpos('phpbb_search_', $this->config['search_type']) !== 0),
+ array('config.update', array('search_type', 'phpbb_search_' . $this->config['search_type'])),
+ )),
+
+ array('config.add', array('fulltext_postgres_ts_name', 'simple')),
+ array('config.add', array('fulltext_postgres_min_word_len', 4)),
+ array('config.add', array('fulltext_postgres_max_word_len', 254)),
+ array('config.add', array('fulltext_sphinx_stopwords', 0)),
+ array('config.add', array('fulltext_sphinx_indexer_mem_limit', 512)),
+
+ array('config.add', array('load_jquery_cdn', 0)),
+ array('config.add', array('load_jquery_url', '//ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js')),
+
+ array('config.add', array('use_system_cron', 0)),
+
+ array('config.add', array('legend_sort_groupname', 0)),
+ array('config.add', array('teampage_forums', 1)),
+ array('config.add', array('teampage_memberships', 1)),
+
+ array('config.add', array('load_cpf_pm', 0)),
+
+ array('config.add', array('display_last_subject', 1)),
+
+ array('config.add', array('assets_version', 1)),
+
+ array('config.add', array('site_home_url', '')),
+ array('config.add', array('site_home_text', '')),
+
+ array('permission.add', array('u_chgprofileinfo', true, 'u_sig')),
+
+ array('module.add', array(
+ 'acp',
+ 'ACP_GROUPS',
+ array(
+ 'module_basename' => 'acp_groups',
+ 'modes' => array('position'),
+ ),
+ )),
+ array('module.add', array(
+ 'acp',
+ 'ACP_ATTACHMENTS',
+ array(
+ 'module_basename' => 'acp_attachments',
+ 'modes' => array('manage'),
+ ),
+ )),
+ array('module.add', array(
+ 'acp',
+ 'ACP_STYLE_MANAGEMENT',
+ array(
+ 'module_basename' => 'acp_styles',
+ 'modes' => array('install', 'cache'),
+ ),
+ )),
+ array('module.add', array(
+ 'ucp',
+ 'UCP_PROFILE',
+ array(
+ 'module_basename' => 'ucp_profile',
+ 'modes' => array('autologin_keys'),
+ ),
+ )),
+ // Module will be renamed later
+ array('module.add', array(
+ 'acp',
+ 'ACP_CAT_STYLES',
+ 'ACP_LANGUAGE'
+ )),
+
+ array('module.remove', array(
+ 'acp',
+ false,
+ 'ACP_TEMPLATES',
+ )),
+ array('module.remove', array(
+ 'acp',
+ false,
+ 'ACP_THEMES',
+ )),
+ array('module.remove', array(
+ 'acp',
+ false,
+ 'ACP_IMAGESETS',
+ )),
+
+ array('custom', array(array($this, 'rename_module_basenames'))),
+ array('custom', array(array($this, 'rename_styles_module'))),
+ array('custom', array(array($this, 'add_group_teampage'))),
+ array('custom', array(array($this, 'update_group_legend'))),
+ array('custom', array(array($this, 'localise_global_announcements'))),
+ array('custom', array(array($this, 'update_ucp_pm_basename'))),
+ array('custom', array(array($this, 'update_ucp_profile_auth'))),
+ array('custom', array(array($this, 'move_customise_modules'))),
+
+ array('config.update', array('version', '3.1.0-dev')),
+ );
+ }
+
+ public function move_customise_modules()
+ {
+ // Move language management to new location in the Customise tab
+ // First get language module id
+ $sql = 'SELECT module_id FROM ' . MODULES_TABLE . "
+ WHERE module_basename = 'acp_language'";
+ $result = $this->db->sql_query($sql);
+ $language_module_id = $this->db->sql_fetchfield('module_id');
+ $this->db->sql_freeresult($result);
+ // Next get language management module id of the one just created
+ $sql = 'SELECT module_id FROM ' . MODULES_TABLE . "
+ WHERE module_langname = 'ACP_LANGUAGE'";
+ $result = $this->db->sql_query($sql);
+ $language_management_module_id = $this->db->sql_fetchfield('module_id');
+ $this->db->sql_freeresult($result);
+
+ if (!class_exists('acp_modules'))
+ {
+ include($this->phpbb_root_path . 'includes/acp/acp_modules.' . $this->php_ext);
+ }
+ // acp_modules calls adm_back_link, which is undefined at this point
+ if (!function_exists('adm_back_link'))
+ {
+ include($this->phpbb_root_path . 'includes/functions_acp.' . $this->php_ext);
+ }
+ $module_manager = new \acp_modules();
+ $module_manager->module_class = 'acp';
+ $module_manager->move_module($language_module_id, $language_management_module_id);
+ }
+
+ public function update_ucp_pm_basename()
+ {
+ $sql = 'SELECT module_id, module_basename
+ FROM ' . MODULES_TABLE . "
+ WHERE module_basename <> 'ucp_pm' AND
+ module_langname='UCP_PM'";
+ $result = $this->db->sql_query_limit($sql, 1);
+
+ if ($row = $this->db->sql_fetchrow($result))
+ {
+ // This update is still not applied. Applying it
+
+ $sql = 'UPDATE ' . MODULES_TABLE . "
+ SET module_basename = 'ucp_pm'
+ WHERE module_id = " . (int) $row['module_id'];
+
+ $this->sql_query($sql);
+ }
+ $this->db->sql_freeresult($result);
+ }
+
+ public function update_ucp_profile_auth()
+ {
+ // Update the auth setting for the module
+ $sql = 'UPDATE ' . MODULES_TABLE . "
+ SET module_auth = 'acl_u_chgprofileinfo'
+ WHERE module_class = 'ucp'
+ AND module_basename = 'ucp_profile'
+ AND module_mode = 'profile_info'";
+ $this->sql_query($sql);
+ }
+
+ public function rename_styles_module()
+ {
+ // Rename styles module to Customise
+ $sql = 'UPDATE ' . MODULES_TABLE . "
+ SET module_langname = 'ACP_CAT_CUSTOMISE'
+ WHERE module_langname = 'ACP_CAT_STYLES'";
+ $this->sql_query($sql);
+ }
+
+ public function rename_module_basenames()
+ {
+ // rename all module basenames to full classname
+ $sql = 'SELECT module_id, module_basename, module_class
+ FROM ' . MODULES_TABLE;
+ $result = $this->db->sql_query($sql);
+
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ $module_id = (int) $row['module_id'];
+ unset($row['module_id']);
+
+ if (!empty($row['module_basename']) && !empty($row['module_class']))
+ {
+ // all the class names start with class name or with phpbb_ for auto loading
+ if (strpos($row['module_basename'], $row['module_class'] . '_') !== 0 &&
+ strpos($row['module_basename'], 'phpbb_') !== 0)
+ {
+ $row['module_basename'] = $row['module_class'] . '_' . $row['module_basename'];
+
+ $sql_update = $this->db->sql_build_array('UPDATE', $row);
+
+ $sql = 'UPDATE ' . MODULES_TABLE . '
+ SET ' . $sql_update . '
+ WHERE module_id = ' . $module_id;
+ $this->sql_query($sql);
+ }
+ }
+ }
+
+ $this->db->sql_freeresult($result);
+ }
+
+ public function add_group_teampage()
+ {
+ $sql = 'UPDATE ' . GROUPS_TABLE . '
+ SET group_teampage = 1
+ WHERE group_type = ' . GROUP_SPECIAL . "
+ AND group_name = 'ADMINISTRATORS'";
+ $this->sql_query($sql);
+
+ $sql = 'UPDATE ' . GROUPS_TABLE . '
+ SET group_teampage = 2
+ WHERE group_type = ' . GROUP_SPECIAL . "
+ AND group_name = 'GLOBAL_MODERATORS'";
+ $this->sql_query($sql);
+ }
+
+ public function update_group_legend()
+ {
+ $sql = 'SELECT group_id
+ FROM ' . GROUPS_TABLE . '
+ WHERE group_legend = 1
+ ORDER BY group_name ASC';
+ $result = $this->db->sql_query($sql);
+
+ $next_legend = 1;
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ $sql = 'UPDATE ' . GROUPS_TABLE . '
+ SET group_legend = ' . $next_legend . '
+ WHERE group_id = ' . (int) $row['group_id'];
+ $this->sql_query($sql);
+
+ $next_legend++;
+ }
+ $this->db->sql_freeresult($result);
+ }
+
+ public function localise_global_announcements()
+ {
+ // Localise Global Announcements
+ $sql = 'SELECT topic_id, topic_approved, (topic_replies + 1) AS topic_posts, topic_last_post_id, topic_last_post_subject, topic_last_post_time, topic_last_poster_id, topic_last_poster_name, topic_last_poster_colour
+ FROM ' . TOPICS_TABLE . '
+ WHERE forum_id = 0
+ AND topic_type = ' . POST_GLOBAL;
+ $result = $this->db->sql_query($sql);
+
+ $global_announcements = $update_lastpost_data = array();
+ $update_lastpost_data['forum_last_post_time'] = 0;
+ $update_forum_data = array(
+ 'forum_posts' => 0,
+ 'forum_topics' => 0,
+ 'forum_topics_real' => 0,
+ );
+
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ $global_announcements[] = (int) $row['topic_id'];
+
+ $update_forum_data['forum_posts'] += (int) $row['topic_posts'];
+ $update_forum_data['forum_topics_real']++;
+ if ($row['topic_approved'])
+ {
+ $update_forum_data['forum_topics']++;
+ }
+
+ if ($update_lastpost_data['forum_last_post_time'] < $row['topic_last_post_time'])
+ {
+ $update_lastpost_data = array(
+ 'forum_last_post_id' => (int) $row['topic_last_post_id'],
+ 'forum_last_post_subject' => $row['topic_last_post_subject'],
+ 'forum_last_post_time' => (int) $row['topic_last_post_time'],
+ 'forum_last_poster_id' => (int) $row['topic_last_poster_id'],
+ 'forum_last_poster_name' => $row['topic_last_poster_name'],
+ 'forum_last_poster_colour' => $row['topic_last_poster_colour'],
+ );
+ }
+ }
+ $this->db->sql_freeresult($result);
+
+ if (!empty($global_announcements))
+ {
+ // Update the post/topic-count for the forum and the last-post if needed
+ $sql = 'SELECT forum_id
+ FROM ' . FORUMS_TABLE . '
+ WHERE forum_type = ' . FORUM_POST;
+ $result = $this->db->sql_query_limit($sql, 1);
+ $ga_forum_id = $this->db->sql_fetchfield('forum_id');
+ $this->db->sql_freeresult($result);
+
+ $sql = 'SELECT forum_last_post_time
+ FROM ' . FORUMS_TABLE . '
+ WHERE forum_id = ' . $ga_forum_id;
+ $result = $this->db->sql_query($sql);
+ $lastpost = (int) $this->db->sql_fetchfield('forum_last_post_time');
+ $this->db->sql_freeresult($result);
+
+ $sql_update = 'forum_posts = forum_posts + ' . $update_forum_data['forum_posts'] . ', ';
+ $sql_update .= 'forum_topics_real = forum_topics_real + ' . $update_forum_data['forum_topics_real'] . ', ';
+ $sql_update .= 'forum_topics = forum_topics + ' . $update_forum_data['forum_topics'];
+ if ($lastpost < $update_lastpost_data['forum_last_post_time'])
+ {
+ $sql_update .= ', ' . $this->db->sql_build_array('UPDATE', $update_lastpost_data);
+ }
+
+ $sql = 'UPDATE ' . FORUMS_TABLE . '
+ SET ' . $sql_update . '
+ WHERE forum_id = ' . $ga_forum_id;
+ $this->sql_query($sql);
+
+ // Update some forum_ids
+ $table_ary = array(TOPICS_TABLE, POSTS_TABLE, LOG_TABLE, DRAFTS_TABLE, TOPICS_TRACK_TABLE);
+ foreach ($table_ary as $table)
+ {
+ $sql = "UPDATE $table
+ SET forum_id = $ga_forum_id
+ WHERE " . $this->db->sql_in_set('topic_id', $global_announcements);
+ $this->sql_query($sql);
+ }
+ unset($table_ary);
+ }
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v310/extensions.php b/phpBB/phpbb/db/migration/data/v310/extensions.php
new file mode 100644
index 0000000000..d8b38dbc9e
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v310/extensions.php
@@ -0,0 +1,71 @@
+<?php
+/**
+*
+* @package migration
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License v2
+*
+*/
+
+namespace phpbb\db\migration\data\v310;
+
+class extensions extends \phpbb\db\migration\migration
+{
+ public function effectively_installed()
+ {
+ return $this->db_tools->sql_table_exists($this->table_prefix . 'ext');
+ }
+
+ static public function depends_on()
+ {
+ return array('\phpbb\db\migration\data\v30x\release_3_0_11');
+ }
+
+ public function update_schema()
+ {
+ return array(
+ 'add_tables' => array(
+ $this->table_prefix . 'ext' => array(
+ 'COLUMNS' => array(
+ 'ext_name' => array('VCHAR', ''),
+ 'ext_active' => array('BOOL', 0),
+ 'ext_state' => array('TEXT', ''),
+ ),
+ 'KEYS' => array(
+ 'ext_name' => array('UNIQUE', 'ext_name'),
+ ),
+ ),
+ ),
+ );
+ }
+
+ public function revert_schema()
+ {
+ return array(
+ 'drop_tables' => array(
+ $this->table_prefix . 'ext',
+ ),
+ );
+ }
+
+ public function update_data()
+ {
+ return array(
+ // Module will be renamed later
+ array('module.add', array(
+ 'acp',
+ 'ACP_CAT_STYLES',
+ 'ACP_EXTENSION_MANAGEMENT'
+ )),
+ array('module.add', array(
+ 'acp',
+ 'ACP_EXTENSION_MANAGEMENT',
+ array(
+ 'module_basename' => 'acp_extensions',
+ 'modes' => array('main'),
+ ),
+ )),
+ array('permission.add', array('a_extensions', true, 'a_styles')),
+ );
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v310/forgot_password.php b/phpBB/phpbb/db/migration/data/v310/forgot_password.php
new file mode 100644
index 0000000000..814093caa9
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v310/forgot_password.php
@@ -0,0 +1,30 @@
+<?php
+/**
+*
+* @package migration
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License v2
+*
+*/
+
+namespace phpbb\db\migration\data\v310;
+
+class forgot_password extends \phpbb\db\migration\migration
+{
+ public function effectively_installed()
+ {
+ return isset($this->config['allow_password_reset']);
+ }
+
+ static public function depends_on()
+ {
+ return array('\phpbb\db\migration\data\v30x\release_3_0_11');
+ }
+
+ public function update_data()
+ {
+ return array(
+ array('config.add', array('allow_password_reset', 1)),
+ );
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v310/jquery_update.php b/phpBB/phpbb/db/migration/data/v310/jquery_update.php
new file mode 100644
index 0000000000..bd2de2b4d4
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v310/jquery_update.php
@@ -0,0 +1,33 @@
+<?php
+/**
+*
+* @package migration
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License v2
+*
+*/
+
+namespace phpbb\db\migration\data\v310;
+
+class jquery_update extends \phpbb\db\migration\migration
+{
+ public function effectively_installed()
+ {
+ return $this->config['load_jquery_url'] !== '//ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js';
+ }
+
+ static public function depends_on()
+ {
+ return array(
+ '\phpbb\db\migration\data\v310\dev',
+ );
+ }
+
+ public function update_data()
+ {
+ return array(
+ array('config.update', array('load_jquery_url', '//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js')),
+ );
+ }
+
+}
diff --git a/phpBB/phpbb/db/migration/data/v310/migrations_table.php b/phpBB/phpbb/db/migration/data/v310/migrations_table.php
new file mode 100644
index 0000000000..e70fd35819
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v310/migrations_table.php
@@ -0,0 +1,47 @@
+<?php
+/**
+*
+* @package migration
+* @copyright (c) 2014 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\db\migration\data\v310;
+
+class migrations_table extends \phpbb\db\migration\migration
+{
+ public function effectively_installed()
+ {
+ return $this->db_tools->sql_table_exists($this->table_prefix . 'migrations');
+ }
+
+ public function update_schema()
+ {
+ return array(
+ 'add_tables' => array(
+ $this->table_prefix . 'migrations' => array(
+ 'COLUMNS' => array(
+ 'migration_name' => array('VCHAR', ''),
+ 'migration_depends_on' => array('TEXT', ''),
+ 'migration_schema_done' => array('BOOL', 0),
+ 'migration_data_done' => array('BOOL', 0),
+ 'migration_data_state' => array('TEXT', ''),
+ 'migration_start_time' => array('TIMESTAMP', 0),
+ 'migration_end_time' => array('TIMESTAMP', 0),
+ ),
+ 'PRIMARY_KEY' => 'migration_name',
+ ),
+ ),
+ );
+ }
+
+ public function revert_schema()
+ {
+ return array(
+ 'drop_tables' => array(
+ $this->table_prefix . 'migrations',
+ ),
+ );
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v310/mod_rewrite.php b/phpBB/phpbb/db/migration/data/v310/mod_rewrite.php
new file mode 100644
index 0000000000..ffb790b135
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v310/mod_rewrite.php
@@ -0,0 +1,27 @@
+<?php
+/**
+*
+* @package migration
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License v2
+*
+*/
+
+namespace phpbb\db\migration\data\v310;
+
+class mod_rewrite extends \phpbb\db\migration\migration
+{
+ static public function depends_on()
+ {
+ return array(
+ '\phpbb\db\migration\data\v310\dev',
+ );
+ }
+
+ public function update_data()
+ {
+ return array(
+ array('config.add', array('enable_mod_rewrite', '0')),
+ );
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v310/mysql_fulltext_drop.php b/phpBB/phpbb/db/migration/data/v310/mysql_fulltext_drop.php
new file mode 100644
index 0000000000..97d174d4bc
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v310/mysql_fulltext_drop.php
@@ -0,0 +1,47 @@
+<?php
+/**
+*
+* @package migration
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\db\migration\data\v310;
+
+class mysql_fulltext_drop extends \phpbb\db\migration\migration
+{
+ public function effectively_installed()
+ {
+ // This migration is irrelevant for all non-MySQL DBMSes.
+ return strpos($this->db->sql_layer, 'mysql') === false;
+ }
+
+ static public function depends_on()
+ {
+ return array(
+ '\phpbb\db\migration\data\v310\dev',
+ );
+ }
+
+ public function update_schema()
+ {
+ /*
+ * Drop FULLTEXT indexes related to MySQL fulltext search.
+ * Doing so is equivalent to dropping the search index from the ACP.
+ * Possibly time-consuming recreation of the search index (i.e.
+ * FULLTEXT indexes) is left as a task to the admin to not
+ * unnecessarily stall the upgrade process. The new search index will
+ * then require about 40% less table space (also see PHPBB3-11621).
+ */
+ return array(
+ 'drop_keys' => array(
+ $this->table_prefix . 'posts' => array(
+ 'post_subject',
+ 'post_text',
+ 'post_content',
+ ),
+ ),
+ );
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v310/namespaces.php b/phpBB/phpbb/db/migration/data/v310/namespaces.php
new file mode 100644
index 0000000000..f74ecbd874
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v310/namespaces.php
@@ -0,0 +1,30 @@
+<?php
+/**
+*
+* @package migration
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License v2
+*
+*/
+
+namespace phpbb\db\migration\data\v310;
+
+class namespaces extends \phpbb\db\migration\migration
+{
+ static public function depends_on()
+ {
+ return array(
+ '\phpbb\db\migration\data\v310\dev',
+ );
+ }
+
+ public function update_data()
+ {
+ return array(
+ array('if', array(
+ (preg_match('#^phpbb_search_#', $this->config['search_type'])),
+ array('config.update', array('search_type', str_replace('phpbb_search_', '\\phpbb\\search\\', $this->config['search_type']))),
+ )),
+ );
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v310/notification_options_reconvert.php b/phpBB/phpbb/db/migration/data/v310/notification_options_reconvert.php
new file mode 100644
index 0000000000..4195623618
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v310/notification_options_reconvert.php
@@ -0,0 +1,137 @@
+<?php
+/**
+*
+* @package migration
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\db\migration\data\v310;
+
+class notification_options_reconvert extends \phpbb\db\migration\migration
+{
+ static public function depends_on()
+ {
+ return array('\phpbb\db\migration\data\v310\notifications_schema_fix');
+ }
+
+ public function update_data()
+ {
+ return array(
+ array('custom', array(array($this, 'purge_notifications'))),
+ array('custom', array(array($this, 'convert_notifications'))),
+ );
+ }
+
+ public function purge_notifications()
+ {
+ $sql = 'DELETE FROM ' . $this->table_prefix . 'user_notifications';
+ $this->sql_query($sql);
+ }
+
+ public function convert_notifications($start)
+ {
+ $insert_buffer = new \phpbb\db\sql_insert_buffer($this->db, $this->table_prefix . 'user_notifications');
+
+ return $this->perform_conversion($insert_buffer, $start);
+ }
+
+ /**
+ * Perform the conversion (separate for testability)
+ *
+ * @param \phpbb\db\sql_insert_buffer $insert_buffer
+ * @param int $start Start of staggering step
+ * @return mixed int start of the next step, null if the end was reached
+ */
+ public function perform_conversion(\phpbb\db\sql_insert_buffer $insert_buffer, $start)
+ {
+ $limit = 250;
+ $converted_users = 0;
+
+ $sql = 'SELECT user_id, user_notify_type, user_notify_pm
+ FROM ' . $this->table_prefix . 'users
+ ORDER BY user_id';
+ $result = $this->db->sql_query_limit($sql, $limit, $start);
+
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ $converted_users++;
+ $notification_methods = array();
+
+ // In-board notification
+ $notification_methods[] = '';
+
+ if ($row['user_notify_type'] == NOTIFY_EMAIL || $row['user_notify_type'] == NOTIFY_BOTH)
+ {
+ $notification_methods[] = 'email';
+ }
+
+ if ($row['user_notify_type'] == NOTIFY_IM || $row['user_notify_type'] == NOTIFY_BOTH)
+ {
+ $notification_methods[] = 'jabber';
+ }
+
+ // Notifications for posts
+ foreach (array('post', 'topic') as $item_type)
+ {
+ $this->add_method_rows(
+ $insert_buffer,
+ $item_type,
+ 0,
+ $row['user_id'],
+ $notification_methods
+ );
+ }
+
+ if ($row['user_notify_pm'])
+ {
+ // Notifications for private messages
+ // User either gets all methods or no method
+ $this->add_method_rows(
+ $insert_buffer,
+ 'pm',
+ 0,
+ $row['user_id'],
+ $notification_methods
+ );
+ }
+ }
+ $this->db->sql_freeresult($result);
+
+ $insert_buffer->flush();
+
+ if ($converted_users < $limit)
+ {
+ // No more users left, we are done...
+ return;
+ }
+
+ return $start + $limit;
+ }
+
+ /**
+ * Insert method rows to DB
+ *
+ * @param \phpbb\db\sql_insert_buffer $insert_buffer
+ * @param string $item_type
+ * @param int $item_id
+ * @param int $user_id
+ * @param string $methods
+ */
+ protected function add_method_rows(\phpbb\db\sql_insert_buffer $insert_buffer, $item_type, $item_id, $user_id, array $methods)
+ {
+ $row_base = array(
+ 'item_type' => $item_type,
+ 'item_id' => (int) $item_id,
+ 'user_id' => (int) $user_id,
+ 'notify' => 1
+ );
+
+ foreach ($methods as $method)
+ {
+ $row_base['method'] = $method;
+ $insert_buffer->insert($row_base);
+ }
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v310/notifications.php b/phpBB/phpbb/db/migration/data/v310/notifications.php
new file mode 100644
index 0000000000..61be25bb5f
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v310/notifications.php
@@ -0,0 +1,98 @@
+<?php
+/**
+*
+* @package migration
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License v2
+*
+*/
+
+namespace phpbb\db\migration\data\v310;
+
+class notifications extends \phpbb\db\migration\migration
+{
+ public function effectively_installed()
+ {
+ return $this->db_tools->sql_table_exists($this->table_prefix . 'notifications');
+ }
+
+ static public function depends_on()
+ {
+ return array('\phpbb\db\migration\data\v310\dev');
+ }
+
+ public function update_schema()
+ {
+ return array(
+ 'add_tables' => array(
+ $this->table_prefix . 'notification_types' => array(
+ 'COLUMNS' => array(
+ 'notification_type' => array('VCHAR:255', ''),
+ 'notification_type_enabled' => array('BOOL', 1),
+ ),
+ 'PRIMARY_KEY' => array('notification_type', 'notification_type_enabled'),
+ ),
+ $this->table_prefix . 'notifications' => array(
+ 'COLUMNS' => array(
+ 'notification_id' => array('UINT', null, 'auto_increment'),
+ 'item_type' => array('VCHAR:255', ''),
+ 'item_id' => array('UINT', 0),
+ 'item_parent_id' => array('UINT', 0),
+ 'user_id' => array('UINT', 0),
+ 'notification_read' => array('BOOL', 0),
+ 'notification_time' => array('TIMESTAMP', 1),
+ 'notification_data' => array('TEXT_UNI', ''),
+ ),
+ 'PRIMARY_KEY' => 'notification_id',
+ 'KEYS' => array(
+ 'item_ident' => array('INDEX', array('item_type', 'item_id')),
+ 'user' => array('INDEX', array('user_id', 'notification_read')),
+ ),
+ ),
+ $this->table_prefix . 'user_notifications' => array(
+ 'COLUMNS' => array(
+ 'item_type' => array('VCHAR:255', ''),
+ 'item_id' => array('UINT', 0),
+ 'user_id' => array('UINT', 0),
+ 'method' => array('VCHAR:255', ''),
+ 'notify' => array('BOOL', 1),
+ ),
+ ),
+ ),
+ );
+ }
+
+ public function revert_schema()
+ {
+ return array(
+ 'drop_tables' => array(
+ $this->table_prefix . 'notification_types',
+ $this->table_prefix . 'notifications',
+ $this->table_prefix . 'user_notifications',
+ ),
+ );
+ }
+
+ public function update_data()
+ {
+ return array(
+ array('module.add', array(
+ 'ucp',
+ 'UCP_MAIN',
+ array(
+ 'module_basename' => 'ucp_notifications',
+ 'modes' => array('notification_list'),
+ ),
+ )),
+ array('module.add', array(
+ 'ucp',
+ 'UCP_PREFS',
+ array(
+ 'module_basename' => 'ucp_notifications',
+ 'modes' => array('notification_options'),
+ ),
+ )),
+ array('config.add', array('load_notifications', 1)),
+ );
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v310/notifications_cron.php b/phpBB/phpbb/db/migration/data/v310/notifications_cron.php
new file mode 100644
index 0000000000..d5fa9c58a5
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v310/notifications_cron.php
@@ -0,0 +1,27 @@
+<?php
+/**
+*
+* @package migration
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\db\migration\data\v310;
+
+class notifications_cron extends \phpbb\db\migration\migration
+{
+ static public function depends_on()
+ {
+ return array('\phpbb\db\migration\data\v310\notifications');
+ }
+
+ public function update_data()
+ {
+ return array(
+ array('config.add', array('read_notification_expire_days', 30)),
+ array('config.add', array('read_notification_last_gc', 0)), // last run
+ array('config.add', array('read_notification_gc', (60 * 60 * 24))), // seconds between run; 1 day
+ );
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v310/notifications_cron_p2.php b/phpBB/phpbb/db/migration/data/v310/notifications_cron_p2.php
new file mode 100644
index 0000000000..050e679cc0
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v310/notifications_cron_p2.php
@@ -0,0 +1,27 @@
+<?php
+/**
+*
+* @package migration
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\db\migration\data\v310;
+
+class notifications_cron_p2 extends \phpbb\db\migration\migration
+{
+ static public function depends_on()
+ {
+ return array('\phpbb\db\migration\data\v310\notifications_cron');
+ }
+
+ public function update_data()
+ {
+ return array(
+ // Make read_notification_last_gc dynamic.
+ array('config.remove', array('read_notification_last_gc')),
+ array('config.add', array('read_notification_last_gc', 0, 1)),
+ );
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v310/notifications_schema_fix.php b/phpBB/phpbb/db/migration/data/v310/notifications_schema_fix.php
new file mode 100644
index 0000000000..eb2eb361ee
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v310/notifications_schema_fix.php
@@ -0,0 +1,94 @@
+<?php
+/**
+*
+* @package migration
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License v2
+*
+*/
+
+namespace phpbb\db\migration\data\v310;
+
+class notifications_schema_fix extends \phpbb\db\migration\migration
+{
+ static public function depends_on()
+ {
+ return array('\phpbb\db\migration\data\v310\notifications');
+ }
+
+ public function update_schema()
+ {
+ return array(
+ 'drop_tables' => array(
+ $this->table_prefix . 'notification_types',
+ $this->table_prefix . 'notifications',
+ ),
+ 'add_tables' => array(
+ $this->table_prefix . 'notification_types' => array(
+ 'COLUMNS' => array(
+ 'notification_type_id' => array('USINT', null, 'auto_increment'),
+ 'notification_type_name' => array('VCHAR:255', ''),
+ 'notification_type_enabled' => array('BOOL', 1),
+ ),
+ 'PRIMARY_KEY' => array('notification_type_id'),
+ 'KEYS' => array(
+ 'type' => array('UNIQUE', array('notification_type_name')),
+ ),
+ ),
+ $this->table_prefix . 'notifications' => array(
+ 'COLUMNS' => array(
+ 'notification_id' => array('UINT:10', null, 'auto_increment'),
+ 'notification_type_id' => array('USINT', 0),
+ 'item_id' => array('UINT', 0),
+ 'item_parent_id' => array('UINT', 0),
+ 'user_id' => array('UINT', 0),
+ 'notification_read' => array('BOOL', 0),
+ 'notification_time' => array('TIMESTAMP', 1),
+ 'notification_data' => array('TEXT_UNI', ''),
+ ),
+ 'PRIMARY_KEY' => 'notification_id',
+ 'KEYS' => array(
+ 'item_ident' => array('INDEX', array('notification_type_id', 'item_id')),
+ 'user' => array('INDEX', array('user_id', 'notification_read')),
+ ),
+ ),
+ ),
+ );
+ }
+
+ public function revert_schema()
+ {
+ return array(
+ 'drop_tables' => array(
+ $this->table_prefix . 'notification_types',
+ $this->table_prefix . 'notifications',
+ ),
+ 'add_tables' => array(
+ $this->table_prefix . 'notification_types' => array(
+ 'COLUMNS' => array(
+ 'notification_type' => array('VCHAR:255', ''),
+ 'notification_type_enabled' => array('BOOL', 1),
+ ),
+ 'PRIMARY_KEY' => array('notification_type', 'notification_type_enabled'),
+ ),
+ $this->table_prefix . 'notifications' => array(
+ 'COLUMNS' => array(
+ 'notification_id' => array('UINT', null, 'auto_increment'),
+ 'item_type' => array('VCHAR:255', ''),
+ 'item_id' => array('UINT', 0),
+ 'item_parent_id' => array('UINT', 0),
+ 'user_id' => array('UINT', 0),
+ 'notification_read' => array('BOOL', 0),
+ 'notification_time' => array('TIMESTAMP', 1),
+ 'notification_data' => array('TEXT_UNI', ''),
+ ),
+ 'PRIMARY_KEY' => 'notification_id',
+ 'KEYS' => array(
+ 'item_ident' => array('INDEX', array('item_type', 'item_id')),
+ 'user' => array('INDEX', array('user_id', 'notification_read')),
+ ),
+ ),
+ ),
+ );
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v310/passwords.php b/phpBB/phpbb/db/migration/data/v310/passwords.php
new file mode 100644
index 0000000000..3422f75917
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v310/passwords.php
@@ -0,0 +1,46 @@
+<?php
+/**
+*
+* @package migration
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License v2
+*
+*/
+
+namespace phpbb\db\migration\data\v310;
+
+class passwords extends \phpbb\db\migration\migration
+{
+ static public function depends_on()
+ {
+ return array('\phpbb\db\migration\data\v30x\release_3_0_11');
+ }
+
+ public function update_schema()
+ {
+ return array(
+ 'change_columns' => array(
+ $this->table_prefix . 'users' => array(
+ 'user_password' => array('VCHAR:255', ''),
+ ),
+ $this->table_prefix . 'forums' => array(
+ 'forum_password' => array('VCHAR:255', ''),
+ ),
+ ),
+ );
+ }
+
+ public function revert_schema()
+ {
+ return array(
+ 'change_columns' => array(
+ $this->table_prefix . 'users' => array(
+ 'user_password' => array('VCHAR:40', ''),
+ ),
+ $this->table_prefix . 'forums' => array(
+ 'forum_password' => array('VCHAR:40', ''),
+ ),
+ ),
+ );
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v310/passwords_p2.php b/phpBB/phpbb/db/migration/data/v310/passwords_p2.php
new file mode 100644
index 0000000000..553e79403d
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v310/passwords_p2.php
@@ -0,0 +1,40 @@
+<?php
+/**
+*
+* @package migration
+* @copyright (c) 2014 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License v2
+*
+*/
+
+namespace phpbb\db\migration\data\v310;
+
+class passwords_p2 extends \phpbb\db\migration\migration
+{
+ static public function depends_on()
+ {
+ return array('\phpbb\db\migration\data\v310\passwords');
+ }
+
+ public function update_schema()
+ {
+ return array(
+ 'change_columns' => array(
+ $this->table_prefix . 'users' => array(
+ 'user_newpasswd' => array('VCHAR:255', ''),
+ ),
+ ),
+ );
+ }
+
+ public function revert_schema()
+ {
+ return array(
+ 'change_columns' => array(
+ $this->table_prefix . 'users' => array(
+ 'user_newpasswd' => array('VCHAR:40', ''),
+ ),
+ ),
+ );
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v310/plupload.php b/phpBB/phpbb/db/migration/data/v310/plupload.php
new file mode 100644
index 0000000000..7cdba507a2
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v310/plupload.php
@@ -0,0 +1,32 @@
+<?php
+/**
+*
+* @package migration
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\db\migration\data\v310;
+
+class plupload extends \phpbb\db\migration\migration
+{
+ public function effectively_installed()
+ {
+ return isset($this->config['plupload_last_gc']) &&
+ isset($this->config['plupload_salt']);
+ }
+
+ static public function depends_on()
+ {
+ return array('\phpbb\db\migration\data\v310\dev');
+ }
+
+ public function update_data()
+ {
+ return array(
+ array('config.add', array('plupload_last_gc', 0)),
+ array('config.add', array('plupload_salt', unique_id())),
+ );
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v310/postgres_fulltext_drop.php b/phpBB/phpbb/db/migration/data/v310/postgres_fulltext_drop.php
new file mode 100644
index 0000000000..7d4aea3c95
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v310/postgres_fulltext_drop.php
@@ -0,0 +1,47 @@
+<?php
+/**
+*
+* @package migration
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\db\migration\data\v310;
+
+class postgres_fulltext_drop extends \phpbb\db\migration\migration
+{
+ public function effectively_installed()
+ {
+ // This migration is irrelevant for all non-PostgreSQL DBMSes.
+ return strpos($this->db->sql_layer, 'postgres') === false;
+ }
+
+ static public function depends_on()
+ {
+ return array(
+ '\phpbb\db\migration\data\v310\dev',
+ );
+ }
+
+ public function update_schema()
+ {
+ /*
+ * Drop FULLTEXT indexes related to PostgreSQL fulltext search.
+ * Doing so is equivalent to dropping the search index from the ACP.
+ * Possibly time-consuming recreation of the search index (i.e.
+ * FULLTEXT indexes) is left as a task to the admin to not
+ * unnecessarily stall the upgrade process. The new search index will
+ * then require about 40% less table space (also see PHPBB3-11040).
+ */
+ return array(
+ 'drop_keys' => array(
+ $this->table_prefix . 'posts' => array(
+ 'post_subject',
+ 'post_text',
+ 'post_content',
+ ),
+ ),
+ );
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v310/profilefield_aol.php b/phpBB/phpbb/db/migration/data/v310/profilefield_aol.php
new file mode 100644
index 0000000000..87574cb858
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v310/profilefield_aol.php
@@ -0,0 +1,51 @@
+<?php
+/**
+*
+* @package migration
+* @copyright (c) 2014 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\db\migration\data\v310;
+
+class profilefield_aol extends \phpbb\db\migration\profilefield_base_migration
+{
+ static public function depends_on()
+ {
+ return array(
+ '\phpbb\db\migration\data\v310\profilefield_yahoo_cleanup',
+ );
+ }
+
+ protected $profilefield_name = 'phpbb_aol';
+
+ protected $profilefield_database_type = array('VCHAR', '');
+
+ protected $profilefield_data = array(
+ 'field_name' => 'phpbb_aol',
+ 'field_type' => 'profilefields.type.string',
+ 'field_ident' => 'phpbb_aol',
+ 'field_length' => '40',
+ 'field_minlen' => '5',
+ 'field_maxlen' => '255',
+ 'field_novalue' => '',
+ 'field_default_value' => '',
+ 'field_validation' => '.*',
+ 'field_required' => 0,
+ 'field_show_novalue' => 0,
+ 'field_show_on_reg' => 0,
+ 'field_show_on_pm' => 1,
+ 'field_show_on_vt' => 1,
+ 'field_show_on_ml' => 0,
+ 'field_show_profile' => 1,
+ 'field_hide' => 0,
+ 'field_no_view' => 0,
+ 'field_active' => 1,
+ 'field_is_contact' => 1,
+ 'field_contact_desc' => '',
+ 'field_contact_url' => '',
+ );
+
+ protected $user_column_name = 'user_aim';
+}
diff --git a/phpBB/phpbb/db/migration/data/v310/profilefield_aol_cleanup.php b/phpBB/phpbb/db/migration/data/v310/profilefield_aol_cleanup.php
new file mode 100644
index 0000000000..a7088c6a7a
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v310/profilefield_aol_cleanup.php
@@ -0,0 +1,47 @@
+<?php
+/**
+*
+* @package migration
+* @copyright (c) 2014 phpBB Group
+ * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\db\migration\data\v310;
+
+class profilefield_aol_cleanup extends \phpbb\db\migration\migration
+{
+ public function effectively_installed()
+ {
+ return !$this->db_tools->sql_column_exists($this->table_prefix . 'users', 'user_aim');
+ }
+
+ static public function depends_on()
+ {
+ return array(
+ '\phpbb\db\migration\data\v310\profilefield_aol',
+ );
+ }
+
+ public function update_schema()
+ {
+ return array(
+ 'drop_columns' => array(
+ $this->table_prefix . 'users' => array(
+ 'user_aim',
+ ),
+ ),
+ );
+ }
+
+ public function revert_schema()
+ {
+ return array(
+ 'add_columns' => array(
+ $this->table_prefix . 'users' => array(
+ 'user_aim' => array('VCHAR_UNI', ''),
+ ),
+ ),
+ );
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v310/profilefield_change_load_settings.php b/phpBB/phpbb/db/migration/data/v310/profilefield_change_load_settings.php
new file mode 100644
index 0000000000..7d09d8149a
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v310/profilefield_change_load_settings.php
@@ -0,0 +1,30 @@
+<?php
+/**
+*
+* @package migration
+* @copyright (c) 2014 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\db\migration\data\v310;
+
+class profilefield_change_load_settings extends \phpbb\db\migration\migration
+{
+ static public function depends_on()
+ {
+ return array(
+ '\phpbb\db\migration\data\v310\profilefield_aol_cleanup',
+ );
+ }
+
+ public function update_data()
+ {
+ return array(
+ array('config.update', array('load_cpf_memberlist', '1')),
+ array('config.update', array('load_cpf_pm', '1')),
+ array('config.update', array('load_cpf_viewprofile', '1')),
+ array('config.update', array('load_cpf_viewtopic', '1')),
+ );
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v310/profilefield_cleanup.php b/phpBB/phpbb/db/migration/data/v310/profilefield_cleanup.php
new file mode 100644
index 0000000000..9e7ba68327
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v310/profilefield_cleanup.php
@@ -0,0 +1,51 @@
+<?php
+/**
+*
+* @package migration
+* @copyright (c) 2014 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License v2
+*
+*/
+
+namespace phpbb\db\migration\data\v310;
+
+class profilefield_cleanup extends \phpbb\db\migration\migration
+{
+ public function effectively_installed()
+ {
+ return !$this->db_tools->sql_column_exists($this->table_prefix . 'users', 'user_occ') &&
+ !$this->db_tools->sql_column_exists($this->table_prefix . 'users', 'user_interests');
+ }
+
+ static public function depends_on()
+ {
+ return array(
+ '\phpbb\db\migration\data\v310\profilefield_interests',
+ '\phpbb\db\migration\data\v310\profilefield_occupation',
+ );
+ }
+
+ public function update_schema()
+ {
+ return array(
+ 'drop_columns' => array(
+ $this->table_prefix . 'users' => array(
+ 'user_occ',
+ 'user_interests',
+ ),
+ ),
+ );
+ }
+
+ public function revert_schema()
+ {
+ return array(
+ 'add_columns' => array(
+ $this->table_prefix . 'users' => array(
+ 'user_occ' => array('MTEXT', ''),
+ 'user_interests' => array('MTEXT', ''),
+ ),
+ ),
+ );
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v310/profilefield_contact_field.php b/phpBB/phpbb/db/migration/data/v310/profilefield_contact_field.php
new file mode 100644
index 0000000000..c7617813eb
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v310/profilefield_contact_field.php
@@ -0,0 +1,51 @@
+<?php
+/**
+*
+* @package migration
+* @copyright (c) 2014 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\db\migration\data\v310;
+
+class profilefield_contact_field extends \phpbb\db\migration\migration
+{
+ public function effectively_installed()
+ {
+ return $this->db_tools->sql_column_exists($this->table_prefix . 'profile_fields', 'field_is_contact');
+ }
+
+ static public function depends_on()
+ {
+ return array(
+ '\phpbb\db\migration\data\v310\profilefield_on_memberlist',
+ );
+ }
+
+ public function update_schema()
+ {
+ return array(
+ 'add_columns' => array(
+ $this->table_prefix . 'profile_fields' => array(
+ 'field_is_contact' => array('BOOL', 0),
+ 'field_contact_desc' => array('VCHAR', ''),
+ 'field_contact_url' => array('VCHAR', ''),
+ ),
+ ),
+ );
+ }
+
+ public function revert_schema()
+ {
+ return array(
+ 'drop_columns' => array(
+ $this->table_prefix . 'profile_fields' => array(
+ 'field_is_contact',
+ 'field_contact_desc',
+ 'field_contact_url',
+ ),
+ ),
+ );
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v310/profilefield_icq.php b/phpBB/phpbb/db/migration/data/v310/profilefield_icq.php
new file mode 100644
index 0000000000..2c8c8c511f
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v310/profilefield_icq.php
@@ -0,0 +1,50 @@
+<?php
+/**
+*
+* @package migration
+* @copyright (c) 2014 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\db\migration\data\v310;
+
+class profilefield_icq extends \phpbb\db\migration\profilefield_base_migration
+{
+ static public function depends_on()
+ {
+ return array(
+ '\phpbb\db\migration\data\v310\profilefield_contact_field',
+ );
+ }
+
+ protected $profilefield_name = 'phpbb_icq';
+
+ protected $profilefield_database_type = array('VCHAR', '');
+
+ protected $profilefield_data = array(
+ 'field_name' => 'phpbb_icq',
+ 'field_type' => 'profilefields.type.string',
+ 'field_ident' => 'phpbb_icq',
+ 'field_length' => '20',
+ 'field_minlen' => '3',
+ 'field_maxlen' => '15',
+ 'field_novalue' => '',
+ 'field_default_value' => '',
+ 'field_validation' => '[0-9]+',
+ 'field_required' => 0,
+ 'field_show_novalue' => 0,
+ 'field_show_on_reg' => 0,
+ 'field_show_on_pm' => 1,
+ 'field_show_on_vt' => 1,
+ 'field_show_profile' => 1,
+ 'field_hide' => 0,
+ 'field_no_view' => 0,
+ 'field_active' => 1,
+ 'field_is_contact' => 1,
+ 'field_contact_desc' => 'SEND_ICQ_MESSAGE',
+ 'field_contact_url' => 'https://www.icq.com/people/%s/',
+ );
+
+ protected $user_column_name = 'user_icq';
+}
diff --git a/phpBB/phpbb/db/migration/data/v310/profilefield_icq_cleanup.php b/phpBB/phpbb/db/migration/data/v310/profilefield_icq_cleanup.php
new file mode 100644
index 0000000000..0129a7248f
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v310/profilefield_icq_cleanup.php
@@ -0,0 +1,47 @@
+<?php
+/**
+*
+* @package migration
+* @copyright (c) 2014 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\db\migration\data\v310;
+
+class profilefield_icq_cleanup extends \phpbb\db\migration\migration
+{
+ public function effectively_installed()
+ {
+ return !$this->db_tools->sql_column_exists($this->table_prefix . 'users', 'user_icq');
+ }
+
+ static public function depends_on()
+ {
+ return array(
+ '\phpbb\db\migration\data\v310\profilefield_icq',
+ );
+ }
+
+ public function update_schema()
+ {
+ return array(
+ 'drop_columns' => array(
+ $this->table_prefix . 'users' => array(
+ 'user_icq',
+ ),
+ ),
+ );
+ }
+
+ public function revert_schema()
+ {
+ return array(
+ 'add_columns' => array(
+ $this->table_prefix . 'users' => array(
+ 'user_icq' => array('VCHAR:20', ''),
+ ),
+ ),
+ );
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v310/profilefield_interests.php b/phpBB/phpbb/db/migration/data/v310/profilefield_interests.php
new file mode 100644
index 0000000000..2b943c5e53
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v310/profilefield_interests.php
@@ -0,0 +1,48 @@
+<?php
+/**
+*
+* @package migration
+* @copyright (c) 2014 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License v2
+*
+*/
+
+namespace phpbb\db\migration\data\v310;
+
+class profilefield_interests extends \phpbb\db\migration\profilefield_base_migration
+{
+ static public function depends_on()
+ {
+ return array(
+ '\phpbb\db\migration\data\v310\profilefield_types',
+ '\phpbb\db\migration\data\v310\profilefield_show_novalue',
+ );
+ }
+
+ protected $profilefield_name = 'phpbb_interests';
+
+ protected $profilefield_database_type = array('MTEXT', '');
+
+ protected $profilefield_data = array(
+ 'field_name' => 'phpbb_interests',
+ 'field_type' => 'profilefields.type.text',
+ 'field_ident' => 'phpbb_interests',
+ 'field_length' => '3|30',
+ 'field_minlen' => '2',
+ 'field_maxlen' => '500',
+ 'field_novalue' => '',
+ 'field_default_value' => '',
+ 'field_validation' => '.*',
+ 'field_required' => 0,
+ 'field_show_novalue' => 0,
+ 'field_show_on_reg' => 0,
+ 'field_show_on_pm' => 0,
+ 'field_show_on_vt' => 0,
+ 'field_show_profile' => 1,
+ 'field_hide' => 0,
+ 'field_no_view' => 0,
+ 'field_active' => 1,
+ );
+
+ protected $user_column_name = 'user_interests';
+}
diff --git a/phpBB/phpbb/db/migration/data/v310/profilefield_location.php b/phpBB/phpbb/db/migration/data/v310/profilefield_location.php
new file mode 100644
index 0000000000..4e62eab2d7
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v310/profilefield_location.php
@@ -0,0 +1,48 @@
+<?php
+/**
+*
+* @package migration
+* @copyright (c) 2014 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License v2
+*
+*/
+
+namespace phpbb\db\migration\data\v310;
+
+class profilefield_location extends \phpbb\db\migration\profilefield_base_migration
+{
+ static public function depends_on()
+ {
+ return array(
+ '\phpbb\db\migration\data\v310\profilefield_types',
+ '\phpbb\db\migration\data\v310\profilefield_on_memberlist',
+ );
+ }
+
+ protected $profilefield_name = 'phpbb_location';
+
+ protected $profilefield_database_type = array('VCHAR', '');
+
+ protected $profilefield_data = array(
+ 'field_name' => 'phpbb_location',
+ 'field_type' => 'profilefields.type.string',
+ 'field_ident' => 'phpbb_location',
+ 'field_length' => '20',
+ 'field_minlen' => '2',
+ 'field_maxlen' => '100',
+ 'field_novalue' => '',
+ 'field_default_value' => '',
+ 'field_validation' => '.*',
+ 'field_required' => 0,
+ 'field_show_novalue' => 0,
+ 'field_show_on_reg' => 0,
+ 'field_show_on_pm' => 1,
+ 'field_show_on_vt' => 1,
+ 'field_show_profile' => 1,
+ 'field_hide' => 0,
+ 'field_no_view' => 0,
+ 'field_active' => 1,
+ );
+
+ protected $user_column_name = 'user_from';
+}
diff --git a/phpBB/phpbb/db/migration/data/v310/profilefield_location_cleanup.php b/phpBB/phpbb/db/migration/data/v310/profilefield_location_cleanup.php
new file mode 100644
index 0000000000..54ff2a31eb
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v310/profilefield_location_cleanup.php
@@ -0,0 +1,47 @@
+<?php
+/**
+*
+* @package migration
+* @copyright (c) 2014 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\db\migration\data\v310;
+
+class profilefield_location_cleanup extends \phpbb\db\migration\migration
+{
+ public function effectively_installed()
+ {
+ return !$this->db_tools->sql_column_exists($this->table_prefix . 'users', 'user_from');
+ }
+
+ static public function depends_on()
+ {
+ return array(
+ '\phpbb\db\migration\data\v310\profilefield_location',
+ );
+ }
+
+ public function update_schema()
+ {
+ return array(
+ 'drop_columns' => array(
+ $this->table_prefix . 'users' => array(
+ 'user_from',
+ ),
+ ),
+ );
+ }
+
+ public function revert_schema()
+ {
+ return array(
+ 'add_columns' => array(
+ $this->table_prefix . 'users' => array(
+ 'user_from' => array('VCHAR_UNI:100', ''),
+ ),
+ ),
+ );
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v310/profilefield_occupation.php b/phpBB/phpbb/db/migration/data/v310/profilefield_occupation.php
new file mode 100644
index 0000000000..b0ea961c08
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v310/profilefield_occupation.php
@@ -0,0 +1,47 @@
+<?php
+/**
+*
+* @package migration
+* @copyright (c) 2014 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License v2
+*
+*/
+
+namespace phpbb\db\migration\data\v310;
+
+class profilefield_occupation extends \phpbb\db\migration\profilefield_base_migration
+{
+ static public function depends_on()
+ {
+ return array(
+ '\phpbb\db\migration\data\v310\profilefield_interests',
+ );
+ }
+
+ protected $profilefield_name = 'phpbb_occupation';
+
+ protected $profilefield_database_type = array('MTEXT', '');
+
+ protected $profilefield_data = array(
+ 'field_name' => 'phpbb_occupation',
+ 'field_type' => 'profilefields.type.text',
+ 'field_ident' => 'phpbb_occupation',
+ 'field_length' => '3|30',
+ 'field_minlen' => '2',
+ 'field_maxlen' => '500',
+ 'field_novalue' => '',
+ 'field_default_value' => '',
+ 'field_validation' => '.*',
+ 'field_required' => 0,
+ 'field_show_novalue' => 0,
+ 'field_show_on_reg' => 0,
+ 'field_show_on_pm' => 0,
+ 'field_show_on_vt' => 0,
+ 'field_show_profile' => 1,
+ 'field_hide' => 0,
+ 'field_no_view' => 0,
+ 'field_active' => 1,
+ );
+
+ protected $user_column_name = 'user_occ';
+}
diff --git a/phpBB/phpbb/db/migration/data/v310/profilefield_on_memberlist.php b/phpBB/phpbb/db/migration/data/v310/profilefield_on_memberlist.php
new file mode 100644
index 0000000000..ce51944c3e
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v310/profilefield_on_memberlist.php
@@ -0,0 +1,47 @@
+<?php
+/**
+*
+* @package migration
+* @copyright (c) 2014 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License v2
+*
+*/
+
+namespace phpbb\db\migration\data\v310;
+
+class profilefield_on_memberlist extends \phpbb\db\migration\migration
+{
+ public function effectively_installed()
+ {
+ return $this->db_tools->sql_column_exists($this->table_prefix . 'profile_fields', 'field_show_on_ml');
+ }
+
+ static public function depends_on()
+ {
+ return array(
+ '\phpbb\db\migration\data\v310\profilefield_cleanup',
+ );
+ }
+
+ public function update_schema()
+ {
+ return array(
+ 'add_columns' => array(
+ $this->table_prefix . 'profile_fields' => array(
+ 'field_show_on_ml' => array('BOOL', 0),
+ ),
+ ),
+ );
+ }
+
+ public function revert_schema()
+ {
+ return array(
+ 'drop_columns' => array(
+ $this->table_prefix . 'profile_fields' => array(
+ 'field_show_on_ml',
+ ),
+ ),
+ );
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v310/profilefield_show_novalue.php b/phpBB/phpbb/db/migration/data/v310/profilefield_show_novalue.php
new file mode 100644
index 0000000000..d37103e2ce
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v310/profilefield_show_novalue.php
@@ -0,0 +1,45 @@
+<?php
+/**
+*
+* @package migration
+* @copyright (c) 2014 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\db\migration\data\v310;
+
+class profilefield_show_novalue extends \phpbb\db\migration\migration
+{
+ public function effectively_installed()
+ {
+ return $this->db_tools->sql_column_exists($this->table_prefix . 'profile_fields', 'field_show_novalue');
+ }
+
+ static public function depends_on()
+ {
+ return array('\phpbb\db\migration\data\v310\profilefield_types');
+ }
+
+ public function update_schema()
+ {
+ return array(
+ 'add_columns' => array(
+ $this->table_prefix . 'profile_fields' => array(
+ 'field_show_novalue' => array('BOOL', 0),
+ ),
+ ),
+ );
+ }
+
+ public function revert_schema()
+ {
+ return array(
+ 'drop_columns' => array(
+ $this->table_prefix . 'profile_fields' => array(
+ 'field_show_novalue',
+ ),
+ ),
+ );
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v310/profilefield_types.php b/phpBB/phpbb/db/migration/data/v310/profilefield_types.php
new file mode 100644
index 0000000000..2152aaee20
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v310/profilefield_types.php
@@ -0,0 +1,106 @@
+<?php
+/**
+*
+* @package migration
+* @copyright (c) 2014 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License v2
+*
+*/
+
+namespace phpbb\db\migration\data\v310;
+
+class profilefield_types extends \phpbb\db\migration\migration
+{
+
+ static public function depends_on()
+ {
+ return array(
+ '\phpbb\db\migration\data\v310\alpha2',
+ );
+ }
+
+ public function update_schema()
+ {
+ return array(
+ 'change_columns' => array(
+ $this->table_prefix . 'profile_fields' => array(
+ 'field_type' => array('VCHAR:100', ''),
+ ),
+ $this->table_prefix . 'profile_fields_lang' => array(
+ 'field_type' => array('VCHAR:100', ''),
+ ),
+ ),
+ );
+ }
+
+ public function update_data()
+ {
+ return array(
+ array('custom', array(array($this, 'update_profile_fields_type'))),
+ array('custom', array(array($this, 'update_profile_fields_lang_type'))),
+ );
+ }
+
+ public function update_profile_fields_type()
+ {
+ // Update profile field types
+ $sql = 'SELECT field_type
+ FROM ' . $this->table_prefix . 'profile_fields
+ GROUP BY field_type';
+ $result = $this->db->sql_query($sql);
+
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ $sql = 'UPDATE ' . $this->table_prefix . "profile_fields
+ SET field_type = '" . $this->db->sql_escape($this->convert_phpbb30_field_type($row['field_type'])) . "'
+ WHERE field_type = '" . $this->db->sql_escape($row['field_type']) . "'";
+ $this->sql_query($sql);
+ }
+ $this->db->sql_freeresult($result);
+ }
+
+ public function update_profile_fields_lang_type()
+ {
+ // Update profile field language types
+ $sql = 'SELECT field_type
+ FROM ' . $this->table_prefix . 'profile_fields_lang
+ GROUP BY field_type';
+ $result = $this->db->sql_query($sql);
+
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ $sql = 'UPDATE ' . $this->table_prefix . "profile_fields_lang
+ SET field_type = '" . $this->db->sql_escape($this->convert_phpbb30_field_type($row['field_type'])) . "'
+ WHERE field_type = '" . $this->db->sql_escape($row['field_type']) . "'";
+ $this->sql_query($sql);
+ }
+ $this->db->sql_freeresult($result);
+ }
+
+ /**
+ * Determine the new field type for a given phpBB 3.0 field type
+ *
+ * @param $field_type string Field type in 3.0
+ * @return string Field new type which is used since 3.1
+ */
+ public function convert_phpbb30_field_type($field_type)
+ {
+ switch ($field_type)
+ {
+ case FIELD_INT:
+ return 'profilefields.type.int';
+ case FIELD_STRING:
+ return 'profilefields.type.string';
+ case FIELD_TEXT:
+ return 'profilefields.type.text';
+ case FIELD_BOOL:
+ return 'profilefields.type.bool';
+ case FIELD_DROPDOWN:
+ return 'profilefields.type.dropdown';
+ case FIELD_DATE:
+ return 'profilefields.type.date';
+ default:
+ return $field_type;
+ }
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v310/profilefield_website.php b/phpBB/phpbb/db/migration/data/v310/profilefield_website.php
new file mode 100644
index 0000000000..818b66d2e4
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v310/profilefield_website.php
@@ -0,0 +1,52 @@
+<?php
+/**
+*
+* @package migration
+* @copyright (c) 2014 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\db\migration\data\v310;
+
+class profilefield_website extends \phpbb\db\migration\profilefield_base_migration
+{
+ static public function depends_on()
+ {
+ return array(
+ '\phpbb\db\migration\data\v310\profilefield_on_memberlist',
+ '\phpbb\db\migration\data\v310\profilefield_icq_cleanup',
+ );
+ }
+
+ protected $profilefield_name = 'phpbb_website';
+
+ protected $profilefield_database_type = array('VCHAR', '');
+
+ protected $profilefield_data = array(
+ 'field_name' => 'phpbb_website',
+ 'field_type' => 'profilefields.type.url',
+ 'field_ident' => 'phpbb_website',
+ 'field_length' => '40',
+ 'field_minlen' => '12',
+ 'field_maxlen' => '255',
+ 'field_novalue' => '',
+ 'field_default_value' => '',
+ 'field_validation' => '',
+ 'field_required' => 0,
+ 'field_show_novalue' => 0,
+ 'field_show_on_reg' => 0,
+ 'field_show_on_pm' => 1,
+ 'field_show_on_vt' => 1,
+ 'field_show_on_ml' => 1,
+ 'field_show_profile' => 1,
+ 'field_hide' => 0,
+ 'field_no_view' => 0,
+ 'field_active' => 1,
+ 'field_is_contact' => 1,
+ 'field_contact_desc' => 'VISIT_WEBSITE',
+ 'field_contact_url' => '%s',
+ );
+
+ protected $user_column_name = 'user_website';
+}
diff --git a/phpBB/phpbb/db/migration/data/v310/profilefield_website_cleanup.php b/phpBB/phpbb/db/migration/data/v310/profilefield_website_cleanup.php
new file mode 100644
index 0000000000..35cc92199e
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v310/profilefield_website_cleanup.php
@@ -0,0 +1,47 @@
+<?php
+/**
+*
+* @package migration
+* @copyright (c) 2014 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\db\migration\data\v310;
+
+class profilefield_website_cleanup extends \phpbb\db\migration\migration
+{
+ public function effectively_installed()
+ {
+ return !$this->db_tools->sql_column_exists($this->table_prefix . 'users', 'user_website');
+ }
+
+ static public function depends_on()
+ {
+ return array(
+ '\phpbb\db\migration\data\v310\profilefield_website',
+ );
+ }
+
+ public function update_schema()
+ {
+ return array(
+ 'drop_columns' => array(
+ $this->table_prefix . 'users' => array(
+ 'user_website',
+ ),
+ ),
+ );
+ }
+
+ public function revert_schema()
+ {
+ return array(
+ 'add_columns' => array(
+ $this->table_prefix . 'users' => array(
+ 'user_website' => array('VCHAR_UNI:200', ''),
+ ),
+ ),
+ );
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v310/profilefield_wlm.php b/phpBB/phpbb/db/migration/data/v310/profilefield_wlm.php
new file mode 100644
index 0000000000..8a42f1fea1
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v310/profilefield_wlm.php
@@ -0,0 +1,51 @@
+<?php
+/**
+*
+* @package migration
+* @copyright (c) 2014 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\db\migration\data\v310;
+
+class profilefield_wlm extends \phpbb\db\migration\profilefield_base_migration
+{
+ static public function depends_on()
+ {
+ return array(
+ '\phpbb\db\migration\data\v310\profilefield_website_cleanup',
+ );
+ }
+
+ protected $profilefield_name = 'phpbb_wlm';
+
+ protected $profilefield_database_type = array('VCHAR', '');
+
+ protected $profilefield_data = array(
+ 'field_name' => 'phpbb_wlm',
+ 'field_type' => 'profilefields.type.string',
+ 'field_ident' => 'phpbb_wlm',
+ 'field_length' => '40',
+ 'field_minlen' => '5',
+ 'field_maxlen' => '255',
+ 'field_novalue' => '',
+ 'field_default_value' => '',
+ 'field_validation' => '.*',
+ 'field_required' => 0,
+ 'field_show_novalue' => 0,
+ 'field_show_on_reg' => 0,
+ 'field_show_on_pm' => 1,
+ 'field_show_on_vt' => 1,
+ 'field_show_on_ml' => 0,
+ 'field_show_profile' => 1,
+ 'field_hide' => 0,
+ 'field_no_view' => 0,
+ 'field_active' => 1,
+ 'field_is_contact' => 1,
+ 'field_contact_desc' => '',
+ 'field_contact_url' => '',
+ );
+
+ protected $user_column_name = 'user_msnm';
+}
diff --git a/phpBB/phpbb/db/migration/data/v310/profilefield_wlm_cleanup.php b/phpBB/phpbb/db/migration/data/v310/profilefield_wlm_cleanup.php
new file mode 100644
index 0000000000..98b92eb188
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v310/profilefield_wlm_cleanup.php
@@ -0,0 +1,47 @@
+<?php
+/**
+*
+* @package migration
+* @copyright (c) 2014 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\db\migration\data\v310;
+
+class profilefield_wlm_cleanup extends \phpbb\db\migration\migration
+{
+ public function effectively_installed()
+ {
+ return !$this->db_tools->sql_column_exists($this->table_prefix . 'users', 'user_msnm');
+ }
+
+ static public function depends_on()
+ {
+ return array(
+ '\phpbb\db\migration\data\v310\profilefield_wlm',
+ );
+ }
+
+ public function update_schema()
+ {
+ return array(
+ 'drop_columns' => array(
+ $this->table_prefix . 'users' => array(
+ 'user_msnm',
+ ),
+ ),
+ );
+ }
+
+ public function revert_schema()
+ {
+ return array(
+ 'add_columns' => array(
+ $this->table_prefix . 'users' => array(
+ 'user_msnm' => array('VCHAR_UNI', ''),
+ ),
+ ),
+ );
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v310/profilefield_yahoo.php b/phpBB/phpbb/db/migration/data/v310/profilefield_yahoo.php
new file mode 100644
index 0000000000..808aec8099
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v310/profilefield_yahoo.php
@@ -0,0 +1,51 @@
+<?php
+/**
+*
+* @package migration
+* @copyright (c) 2014 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\db\migration\data\v310;
+
+class profilefield_yahoo extends \phpbb\db\migration\profilefield_base_migration
+{
+ static public function depends_on()
+ {
+ return array(
+ '\phpbb\db\migration\data\v310\profilefield_wlm_cleanup',
+ );
+ }
+
+ protected $profilefield_name = 'phpbb_yahoo';
+
+ protected $profilefield_database_type = array('VCHAR', '');
+
+ protected $profilefield_data = array(
+ 'field_name' => 'phpbb_yahoo',
+ 'field_type' => 'profilefields.type.string',
+ 'field_ident' => 'phpbb_yahoo',
+ 'field_length' => '40',
+ 'field_minlen' => '5',
+ 'field_maxlen' => '255',
+ 'field_novalue' => '',
+ 'field_default_value' => '',
+ 'field_validation' => '.*',
+ 'field_required' => 0,
+ 'field_show_novalue' => 0,
+ 'field_show_on_reg' => 0,
+ 'field_show_on_pm' => 1,
+ 'field_show_on_vt' => 1,
+ 'field_show_on_ml' => 0,
+ 'field_show_profile' => 1,
+ 'field_hide' => 0,
+ 'field_no_view' => 0,
+ 'field_active' => 1,
+ 'field_is_contact' => 1,
+ 'field_contact_desc' => 'SEND_YIM_MESSAGE',
+ 'field_contact_url' => 'http://edit.yahoo.com/config/send_webmesg?.target=%s&amp;.src=pg',
+ );
+
+ protected $user_column_name = 'user_yim';
+}
diff --git a/phpBB/phpbb/db/migration/data/v310/profilefield_yahoo_cleanup.php b/phpBB/phpbb/db/migration/data/v310/profilefield_yahoo_cleanup.php
new file mode 100644
index 0000000000..c11d06576f
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v310/profilefield_yahoo_cleanup.php
@@ -0,0 +1,47 @@
+<?php
+/**
+*
+* @package migration
+* @copyright (c) 2014 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\db\migration\data\v310;
+
+class profilefield_yahoo_cleanup extends \phpbb\db\migration\migration
+{
+ public function effectively_installed()
+ {
+ return !$this->db_tools->sql_column_exists($this->table_prefix . 'users', 'user_yim');
+ }
+
+ static public function depends_on()
+ {
+ return array(
+ '\phpbb\db\migration\data\v310\profilefield_yahoo',
+ );
+ }
+
+ public function update_schema()
+ {
+ return array(
+ 'drop_columns' => array(
+ $this->table_prefix . 'users' => array(
+ 'user_yim',
+ ),
+ ),
+ );
+ }
+
+ public function revert_schema()
+ {
+ return array(
+ 'add_columns' => array(
+ $this->table_prefix . 'users' => array(
+ 'user_yim' => array('VCHAR_UNI', ''),
+ ),
+ ),
+ );
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v310/reported_posts_display.php b/phpBB/phpbb/db/migration/data/v310/reported_posts_display.php
new file mode 100644
index 0000000000..56b7a0916c
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v310/reported_posts_display.php
@@ -0,0 +1,49 @@
+<?php
+/**
+*
+* @package migration
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License v2
+*
+*/
+
+namespace phpbb\db\migration\data\v310;
+
+class reported_posts_display extends \phpbb\db\migration\migration
+{
+ public function effectively_installed()
+ {
+ return $this->db_tools->sql_column_exists($this->table_prefix . 'reports', 'reported_post_enable_bbcode');
+ }
+
+ static public function depends_on()
+ {
+ return array('\phpbb\db\migration\data\v30x\release_3_0_11');
+ }
+
+ public function update_schema()
+ {
+ return array(
+ 'add_columns' => array(
+ $this->table_prefix . 'reports' => array(
+ 'reported_post_enable_bbcode' => array('BOOL', 1),
+ 'reported_post_enable_smilies' => array('BOOL', 1),
+ 'reported_post_enable_magic_url' => array('BOOL', 1),
+ ),
+ ),
+ );
+ }
+
+ public function revert_schema()
+ {
+ return array(
+ 'drop_columns' => array(
+ $this->table_prefix . 'reports' => array(
+ 'reported_post_enable_bbcode',
+ 'reported_post_enable_smilies',
+ 'reported_post_enable_magic_url',
+ ),
+ ),
+ );
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v310/signature_module_auth.php b/phpBB/phpbb/db/migration/data/v310/signature_module_auth.php
new file mode 100644
index 0000000000..6da1cb8009
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v310/signature_module_auth.php
@@ -0,0 +1,53 @@
+<?php
+/**
+*
+* @package migration
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License v2
+*
+*/
+
+namespace phpbb\db\migration\data\v310;
+
+class signature_module_auth extends \phpbb\db\migration\migration
+{
+ public function effectively_installed()
+ {
+ $sql = 'SELECT module_auth
+ FROM ' . MODULES_TABLE . "
+ WHERE module_class = 'ucp'
+ AND module_basename = 'ucp_profile'
+ AND module_mode = 'signature'";
+ $result = $this->db->sql_query($sql);
+ $module_auth = $this->db->sql_fetchfield('module_auth');
+ $this->db->sql_freeresult($result);
+
+ return $module_auth === 'acl_u_sig' || $module_auth === false;
+ }
+
+ static public function depends_on()
+ {
+ return array('\phpbb\db\migration\data\v310\dev');
+ }
+
+ public function update_data()
+ {
+ return array(
+ array('custom', array(
+ array($this, 'update_signature_module_auth'),
+ ),
+ ),
+ );
+ }
+
+ public function update_signature_module_auth()
+ {
+ $sql = 'UPDATE ' . MODULES_TABLE . "
+ SET module_auth = 'acl_u_sig'
+ WHERE module_class = 'ucp'
+ AND module_basename = 'ucp_profile'
+ AND module_mode = 'signature'
+ AND module_auth = ''";
+ $this->db->sql_query($sql);
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v310/soft_delete_mod_convert.php b/phpBB/phpbb/db/migration/data/v310/soft_delete_mod_convert.php
new file mode 100644
index 0000000000..c9255d88ee
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v310/soft_delete_mod_convert.php
@@ -0,0 +1,128 @@
+<?php
+/**
+*
+* @package migration
+* @copyright (c) 2014 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\db\migration\data\v310;
+
+/**
+ * Migration to convert the Soft Delete MOD for 3.0
+ *
+ * https://www.phpbb.com/customise/db/mod/soft_delete/
+ */
+class soft_delete_mod_convert extends \phpbb\db\migration\migration
+{
+ static public function depends_on()
+ {
+ return array(
+ '\phpbb\db\migration\data\v310\alpha3',
+ );
+ }
+
+ public function effectively_installed()
+ {
+ return !$this->db_tools->sql_column_exists($this->table_prefix . 'posts', 'post_deleted');
+ }
+
+ public function update_data()
+ {
+ return array(
+ array('permission.remove', array('m_harddelete', true)),
+ array('permission.remove', array('m_harddelete', false)),
+
+ array('custom', array(array($this, 'convert_posts'))),
+ array('custom', array(array($this, 'convert_topics'))),
+ );
+ }
+
+ public function convert_posts($start)
+ {
+ $content_visibility = $this->get_content_visibility();
+
+ $limit = 250;
+ $i = 0;
+
+ $sql = 'SELECT p.*, t.topic_first_post_id, t.topic_last_post_id
+ FROM ' . $this->table_prefix . 'posts p, ' . $this->table_prefix . 'topics t
+ WHERE p.post_deleted > 0
+ AND t.topic_id = p.topic_id';
+ $result = $this->db->sql_query_limit($sql, $limit, $start);
+
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ $content_visibility->set_post_visibility(
+ ITEM_DELETED,
+ $row['post_id'],
+ $row['topic_id'],
+ $row['forum_id'],
+ $row['post_deleted'],
+ $row['post_deleted_time'],
+ '',
+ ($row['post_id'] == $row['topic_first_post_id']) ? true : false,
+ ($row['post_id'] == $row['topic_last_post_id']) ? true : false
+ );
+
+ $i++;
+ }
+
+ $this->db->sql_freeresult($result);
+
+ if ($i == $limit)
+ {
+ return $start + $i;
+ }
+ }
+
+ public function convert_topics($start)
+ {
+ $content_visibility = $this->get_content_visibility();
+
+ $limit = 100;
+ $i = 0;
+
+ $sql = 'SELECT *
+ FROM ' . $this->table_prefix . 'topics
+ WHERE topic_deleted > 0';
+ $result = $this->db->sql_query_limit($sql, $limit, $start);
+
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ $content_visibility->set_topic_visibility(
+ ITEM_DELETED,
+ $row['topic_id'],
+ $row['forum_id'],
+ $row['topic_deleted'],
+ $row['topic_deleted_time'],
+ ''
+ );
+
+ $i++;
+ }
+
+ $this->db->sql_freeresult($result);
+
+ if ($i == $limit)
+ {
+ return $start + $i;
+ }
+ }
+
+ protected function get_content_visibility()
+ {
+ return new \phpbb\content_visibility(
+ new \phpbb\auth\auth(),
+ $this->db,
+ new \phpbb\user(),
+ $this->phpbb_root_path,
+ $this->php_ext,
+ $this->table_prefix . 'forums',
+ $this->table_prefix . 'posts',
+ $this->table_prefix . 'topics',
+ $this->table_prefix . 'users'
+ );
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v310/soft_delete_mod_convert2.php b/phpBB/phpbb/db/migration/data/v310/soft_delete_mod_convert2.php
new file mode 100644
index 0000000000..ab4be269e6
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v310/soft_delete_mod_convert2.php
@@ -0,0 +1,62 @@
+<?php
+/**
+*
+* @package migration
+* @copyright (c) 2014 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\db\migration\data\v310;
+
+/**
+ * Migration to convert the Soft Delete MOD for 3.0
+ *
+ * https://www.phpbb.com/customise/db/mod/soft_delete/
+ */
+class soft_delete_mod_convert2 extends \phpbb\db\migration\migration
+{
+ static public function depends_on()
+ {
+ return array(
+ '\phpbb\db\migration\data\v310\soft_delete_mod_convert',
+ );
+ }
+
+ public function effectively_installed()
+ {
+ return !$this->db_tools->sql_column_exists($this->table_prefix . 'posts', 'post_deleted');
+ }
+
+ public function update_schema()
+ {
+ return array(
+ 'drop_columns' => array(
+ $this->table_prefix . 'forums' => array('forum_deleted_topic_count', 'forum_deleted_reply_count'),
+ $this->table_prefix . 'posts' => array('post_deleted', 'post_deleted_time'),
+ $this->table_prefix . 'topics' => array('topic_deleted', 'topic_deleted_time', 'topic_deleted_reply_count'),
+ ),
+ );
+ }
+
+ public function revert_schema()
+ {
+ return array(
+ 'add_columns' => array(
+ $this->table_prefix . 'forums' => array(
+ 'forum_deleted_topic_count' => array('UINT', 0),
+ 'forum_deleted_reply_count' => array('UINT', 0),
+ ),
+ $this->table_prefix . 'posts' => array(
+ 'post_deleted' => array('UINT', 0),
+ 'post_deleted_time' => array('TIMESTAMP', 0),
+ ),
+ $this->table_prefix . 'topics' => array(
+ 'topic_deleted' => array('UINT', 0),
+ 'topic_deleted_time' => array('TIMESTAMP', 0),
+ 'topic_deleted_reply_count' => array('UINT', 0),
+ ),
+ ),
+ );
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v310/softdelete_mcp_modules.php b/phpBB/phpbb/db/migration/data/v310/softdelete_mcp_modules.php
new file mode 100644
index 0000000000..d1a31815b2
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v310/softdelete_mcp_modules.php
@@ -0,0 +1,57 @@
+<?php
+/**
+*
+* @package migration
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License v2
+*
+*/
+
+namespace phpbb\db\migration\data\v310;
+
+class softdelete_mcp_modules extends \phpbb\db\migration\migration
+{
+ public function effectively_installed()
+ {
+ $sql = 'SELECT module_id
+ FROM ' . MODULES_TABLE . "
+ WHERE module_class = 'mcp'
+ AND module_basename = 'mcp_queue'
+ AND module_mode = 'deleted_topics'";
+ $result = $this->db->sql_query($sql);
+ $module_id = $this->db->sql_fetchfield('module_id');
+ $this->db->sql_freeresult($result);
+
+ return $module_id !== false;
+ }
+
+ static public function depends_on()
+ {
+ return array(
+ '\phpbb\db\migration\data\v310\dev',
+ '\phpbb\db\migration\data\v310\softdelete_p2',
+ );
+ }
+
+ public function update_data()
+ {
+ return array(
+ array('module.add', array(
+ 'mcp',
+ 'MCP_QUEUE',
+ array(
+ 'module_basename' => 'mcp_queue',
+ 'modes' => array('deleted_topics'),
+ ),
+ )),
+ array('module.add', array(
+ 'mcp',
+ 'MCP_QUEUE',
+ array(
+ 'module_basename' => 'mcp_queue',
+ 'modes' => array('deleted_posts'),
+ ),
+ )),
+ );
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v310/softdelete_p1.php b/phpBB/phpbb/db/migration/data/v310/softdelete_p1.php
new file mode 100644
index 0000000000..f080c78c50
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v310/softdelete_p1.php
@@ -0,0 +1,198 @@
+<?php
+/**
+*
+* @package migration
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License v2
+*
+*/
+
+namespace phpbb\db\migration\data\v310;
+
+class softdelete_p1 extends \phpbb\db\migration\migration
+{
+ public function effectively_installed()
+ {
+ return $this->db_tools->sql_column_exists($this->table_prefix . 'posts', 'post_visibility');
+ }
+
+ static public function depends_on()
+ {
+ return array('\phpbb\db\migration\data\v310\dev');
+ }
+
+ public function update_schema()
+ {
+ return array(
+ 'add_columns' => array(
+ $this->table_prefix . 'forums' => array(
+ 'forum_posts_approved' => array('UINT', 0),
+ 'forum_posts_unapproved' => array('UINT', 0),
+ 'forum_posts_softdeleted' => array('UINT', 0),
+ 'forum_topics_approved' => array('UINT', 0),
+ 'forum_topics_unapproved' => array('UINT', 0),
+ 'forum_topics_softdeleted' => array('UINT', 0),
+ ),
+ $this->table_prefix . 'posts' => array(
+ 'post_visibility' => array('TINT:3', 0),
+ 'post_delete_time' => array('TIMESTAMP', 0),
+ 'post_delete_reason' => array('STEXT_UNI', ''),
+ 'post_delete_user' => array('UINT', 0),
+ ),
+ $this->table_prefix . 'topics' => array(
+ 'topic_visibility' => array('TINT:3', 0),
+ 'topic_delete_time' => array('TIMESTAMP', 0),
+ 'topic_delete_reason' => array('STEXT_UNI', ''),
+ 'topic_delete_user' => array('UINT', 0),
+ 'topic_posts_approved' => array('UINT', 0),
+ 'topic_posts_unapproved' => array('UINT', 0),
+ 'topic_posts_softdeleted' => array('UINT', 0),
+ ),
+ ),
+ 'add_index' => array(
+ $this->table_prefix . 'posts' => array(
+ 'post_visibility' => array('post_visibility'),
+ ),
+ $this->table_prefix . 'topics' => array(
+ 'topic_visibility' => array('topic_visibility'),
+ 'forum_vis_last' => array('forum_id', 'topic_visibility', 'topic_last_post_id'),
+ ),
+ ),
+ );
+ }
+
+ public function revert_schema()
+ {
+ return array(
+ 'drop_columns' => array(
+ $this->table_prefix . 'forums' => array(
+ 'forum_posts_approved',
+ 'forum_posts_unapproved',
+ 'forum_posts_softdeleted',
+ 'forum_topics_approved',
+ 'forum_topics_unapproved',
+ 'forum_topics_softdeleted',
+ ),
+ $this->table_prefix . 'posts' => array(
+ 'post_visibility',
+ 'post_delete_time',
+ 'post_delete_reason',
+ 'post_delete_user',
+ ),
+ $this->table_prefix . 'topics' => array(
+ 'topic_visibility',
+ 'topic_delete_time',
+ 'topic_delete_reason',
+ 'topic_delete_user',
+ 'topic_posts_approved',
+ 'topic_posts_unapproved',
+ 'topic_posts_softdeleted',
+ ),
+ ),
+ 'drop_keys' => array(
+ $this->table_prefix . 'posts' => array('post_visibility'),
+ $this->table_prefix . 'topics' => array('topic_visibility', 'forum_vis_last'),
+ ),
+ );
+ }
+
+ public function update_data()
+ {
+ return array(
+ array('custom', array(array($this, 'update_post_visibility'))),
+ array('custom', array(array($this, 'update_topic_visibility'))),
+ array('custom', array(array($this, 'update_topics_post_counts'))),
+ array('custom', array(array($this, 'update_forums_topic_and_post_counts'))),
+
+ array('permission.add', array('f_softdelete', false)),
+ array('permission.add', array('m_softdelete', false)),
+ );
+ }
+
+ public function update_post_visibility()
+ {
+ $sql = 'UPDATE ' . $this->table_prefix . 'posts
+ SET post_visibility = post_approved';
+ $this->sql_query($sql);
+ }
+
+ public function update_topic_visibility()
+ {
+ $sql = 'UPDATE ' . $this->table_prefix . 'topics
+ SET topic_visibility = topic_approved';
+ $this->sql_query($sql);
+ }
+
+ public function update_topics_post_counts()
+ {
+ /*
+ * Using sql_case here to avoid "BIGINT UNSIGNED value is out of range" errors.
+ * As we update all topics in 2 queries, one broken topic would stop the conversion
+ * for all topics and the surpressed error will cause the admin to not even notice it.
+ */
+ $sql = 'UPDATE ' . $this->table_prefix . 'topics
+ SET topic_posts_approved = topic_replies + 1,
+ topic_posts_unapproved = ' . $this->db->sql_case('topic_replies_real > topic_replies', 'topic_replies_real - topic_replies', '0') . '
+ WHERE topic_visibility = ' . ITEM_APPROVED;
+ $this->sql_query($sql);
+
+ $sql = 'UPDATE ' . $this->table_prefix . 'topics
+ SET topic_posts_approved = 0,
+ topic_posts_unapproved = (' . $this->db->sql_case('topic_replies_real > topic_replies', 'topic_replies_real - topic_replies', '0') . ') + 1
+ WHERE topic_visibility = ' . ITEM_UNAPPROVED;
+ $this->sql_query($sql);
+ }
+
+ public function update_forums_topic_and_post_counts($start)
+ {
+ $start = (int) $start;
+ $limit = 10;
+ $converted_forums = 0;
+
+ $sql = 'SELECT forum_id, topic_visibility, COUNT(topic_id) AS sum_topics, SUM(topic_posts_approved) AS sum_posts_approved, SUM(topic_posts_unapproved) AS sum_posts_unapproved
+ FROM ' . $this->table_prefix . 'topics
+ GROUP BY forum_id, topic_visibility
+ ORDER BY forum_id, topic_visibility';
+ $result = $this->db->sql_query_limit($sql, $limit, $start);
+
+ $update_forums = array();
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ $converted_forums++;
+
+ $forum_id = (int) $row['forum_id'];
+ if (!isset($update_forums[$forum_id]))
+ {
+ $update_forums[$forum_id] = array(
+ 'forum_posts_approved' => 0,
+ 'forum_posts_unapproved' => 0,
+ 'forum_topics_approved' => 0,
+ 'forum_topics_unapproved' => 0,
+ );
+ }
+
+ $update_forums[$forum_id]['forum_posts_approved'] += (int) $row['sum_posts_approved'];
+ $update_forums[$forum_id]['forum_posts_unapproved'] += (int) $row['sum_posts_unapproved'];
+
+ $update_forums[$forum_id][(($row['topic_visibility'] == ITEM_APPROVED) ? 'forum_topics_approved' : 'forum_topics_unapproved')] += (int) $row['sum_topics'];
+ }
+ $this->db->sql_freeresult($result);
+
+ foreach ($update_forums as $forum_id => $forum_data)
+ {
+ $sql = 'UPDATE ' . FORUMS_TABLE . '
+ SET ' . $this->db->sql_build_array('UPDATE', $forum_data) . '
+ WHERE forum_id = ' . $forum_id;
+ $this->sql_query($sql);
+ }
+
+ if ($converted_forums < $limit)
+ {
+ // There are no more topics, we are done
+ return;
+ }
+
+ // There are still more topics to query, return the next start value
+ return $start + $limit;
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v310/softdelete_p2.php b/phpBB/phpbb/db/migration/data/v310/softdelete_p2.php
new file mode 100644
index 0000000000..38b190c766
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v310/softdelete_p2.php
@@ -0,0 +1,74 @@
+<?php
+/**
+*
+* @package migration
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License v2
+*
+*/
+
+namespace phpbb\db\migration\data\v310;
+
+class softdelete_p2 extends \phpbb\db\migration\migration
+{
+ public function effectively_installed()
+ {
+ return !$this->db_tools->sql_column_exists($this->table_prefix . 'posts', 'post_approved');
+ }
+
+ static public function depends_on()
+ {
+ return array(
+ '\phpbb\db\migration\data\v310\dev',
+ '\phpbb\db\migration\data\v310\softdelete_p1',
+ );
+ }
+
+ public function update_schema()
+ {
+ return array(
+ 'drop_columns' => array(
+ $this->table_prefix . 'forums' => array('forum_posts', 'forum_topics', 'forum_topics_real'),
+ $this->table_prefix . 'posts' => array('post_approved'),
+ $this->table_prefix . 'topics' => array('topic_approved', 'topic_replies', 'topic_replies_real'),
+ ),
+ 'drop_keys' => array(
+ $this->table_prefix . 'posts' => array('post_approved'),
+ $this->table_prefix . 'topics' => array(
+ 'forum_appr_last',
+ 'topic_approved',
+ ),
+ ),
+ );
+ }
+
+ public function revert_schema()
+ {
+ return array(
+ 'add_columns' => array(
+ $this->table_prefix . 'forums' => array(
+ 'forum_posts' => array('UINT', 0),
+ 'forum_topics' => array('UINT', 0),
+ 'forum_topics_real' => array('UINT', 0),
+ ),
+ $this->table_prefix . 'posts' => array(
+ 'post_approved' => array('BOOL', 1),
+ ),
+ $this->table_prefix . 'topics' => array(
+ 'topic_approved' => array('BOOL', 1),
+ 'topic_replies' => array('UINT', 0),
+ 'topic_replies_real' => array('UINT', 0),
+ ),
+ ),
+ 'add_index' => array(
+ $this->table_prefix . 'posts' => array(
+ 'post_approved' => array('post_approved'),
+ ),
+ $this->table_prefix . 'topics' => array(
+ 'forum_appr_last' => array('forum_id', 'topic_approved', 'topic_last_post_id'),
+ 'topic_approved' => array('topic_approved'),
+ ),
+ ),
+ );
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v310/style_update_p1.php b/phpBB/phpbb/db/migration/data/v310/style_update_p1.php
new file mode 100644
index 0000000000..26f1046287
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v310/style_update_p1.php
@@ -0,0 +1,187 @@
+<?php
+/**
+*
+* @package migration
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License v2
+*
+*/
+
+namespace phpbb\db\migration\data\v310;
+
+class style_update_p1 extends \phpbb\db\migration\migration
+{
+ public function effectively_installed()
+ {
+ return !$this->db_tools->sql_table_exists($this->table_prefix . 'styles_imageset');
+ }
+
+ static public function depends_on()
+ {
+ return array('\phpbb\db\migration\data\v30x\release_3_0_11');
+ }
+
+ public function update_schema()
+ {
+ return array(
+ 'add_columns' => array(
+ $this->table_prefix . 'styles' => array(
+ 'style_path' => array('VCHAR:100', ''),
+ 'bbcode_bitfield' => array('VCHAR:255', 'kNg='),
+ 'style_parent_id' => array('UINT', 0),
+ 'style_parent_tree' => array('TEXT', ''),
+ ),
+ ),
+ );
+ }
+
+ public function revert_schema()
+ {
+ return array(
+ 'drop_columns' => array(
+ $this->table_prefix . 'styles' => array(
+ 'style_path',
+ 'bbcode_bitfield',
+ 'style_parent_id',
+ 'style_parent_tree',
+ ),
+ ),
+ );
+ }
+
+ public function update_data()
+ {
+ return array(
+ array('custom', array(array($this, 'styles_update'))),
+ );
+ }
+
+ public function styles_update()
+ {
+ // Get list of valid 3.1 styles
+ $available_styles = array('prosilver');
+
+ $iterator = new \DirectoryIterator($this->phpbb_root_path . 'styles');
+ $skip_dirs = array('.', '..', 'prosilver');
+ foreach ($iterator as $fileinfo)
+ {
+ if ($fileinfo->isDir() && !in_array($fileinfo->getFilename(), $skip_dirs) && file_exists($fileinfo->getPathname() . '/style.cfg'))
+ {
+ $style_cfg = parse_cfg_file($fileinfo->getPathname() . '/style.cfg');
+ if (isset($style_cfg['phpbb_version']) && version_compare($style_cfg['phpbb_version'], '3.1.0-dev', '>='))
+ {
+ // 3.1 style
+ $available_styles[] = $fileinfo->getFilename();
+ }
+ }
+ }
+
+ // Get all installed styles
+ if ($this->db_tools->sql_table_exists($this->table_prefix . 'styles_imageset'))
+ {
+ $sql = 'SELECT s.style_id, t.template_path, t.template_id, t.bbcode_bitfield, t.template_inherits_id, t.template_inherit_path, c.theme_path, c.theme_id, i.imageset_path
+ FROM ' . STYLES_TABLE . ' s, ' . $this->table_prefix . 'styles_template t, ' . $this->table_prefix . 'styles_theme c, ' . $this->table_prefix . "styles_imageset i
+ WHERE t.template_id = s.template_id
+ AND c.theme_id = s.theme_id
+ AND i.imageset_id = s.imageset_id";
+ }
+ else
+ {
+ $sql = 'SELECT s.style_id, t.template_path, t.template_id, t.bbcode_bitfield, t.template_inherits_id, t.template_inherit_path, c.theme_path, c.theme_id
+ FROM ' . STYLES_TABLE . ' s, ' . $this->table_prefix . 'styles_template t, ' . $this->table_prefix . "stles_theme c
+ WHERE t.template_id = s.template_id
+ AND c.theme_id = s.theme_id";
+ }
+ $result = $this->db->sql_query($sql);
+
+ $styles = array();
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ $styles[] = $row;
+ }
+ $this->db->sql_freeresult($result);
+
+ // Decide which styles to keep, all others will be deleted
+ $valid_styles = array();
+ foreach ($styles as $style_row)
+ {
+ if (
+ // Delete styles with parent style (not supported yet)
+ $style_row['template_inherits_id'] == 0 &&
+ // Check if components match
+ $style_row['template_path'] == $style_row['theme_path'] && (!isset($style_row['imageset_path']) || $style_row['template_path'] == $style_row['imageset_path']) &&
+ // Check if components are valid
+ in_array($style_row['template_path'], $available_styles)
+ )
+ {
+ // Valid style. Keep it
+ $sql_ary = array(
+ 'style_path' => $style_row['template_path'],
+ 'bbcode_bitfield' => $style_row['bbcode_bitfield'],
+ 'style_parent_id' => 0,
+ 'style_parent_tree' => '',
+ );
+ $this->sql_query('UPDATE ' . STYLES_TABLE . '
+ SET ' . $this->db->sql_build_array('UPDATE', $sql_ary) . '
+ WHERE style_id = ' . $style_row['style_id']);
+ $valid_styles[] = (int) $style_row['style_id'];
+ }
+ }
+
+ // Remove old entries from styles table
+ if (!sizeof($valid_styles))
+ {
+ // No valid styles: remove everything and add prosilver
+ $this->sql_query('DELETE FROM ' . STYLES_TABLE, $errored, $error_ary);
+
+ $sql_ary = array(
+ 'style_name' => 'prosilver',
+ 'style_copyright' => '&copy; phpBB Group',
+ 'style_active' => 1,
+ 'style_path' => 'prosilver',
+ 'bbcode_bitfield' => 'lNg=',
+ 'style_parent_id' => 0,
+ 'style_parent_tree' => '',
+
+ // Will be removed in the next step
+ 'imageset_id' => 0,
+ 'template_id' => 0,
+ 'theme_id' => 0,
+ );
+
+ $sql = 'INSERT INTO ' . STYLES_TABLE . ' ' . $this->db->sql_build_array('INSERT', $sql_ary);
+ $this->sql_query($sql);
+
+ $sql = 'SELECT style_id
+ FROM ' . $table . "
+ WHERE style_name = 'prosilver'";
+ $result = $this->sql_query($sql);
+ $default_style = $this->db->sql_fetchfield($result);
+ $this->db->sql_freeresult($result);
+
+ set_config('default_style', $default_style);
+
+ $sql = 'UPDATE ' . USERS_TABLE . ' SET user_style = 0';
+ $this->sql_query($sql);
+ }
+ else
+ {
+ // There are valid styles in styles table. Remove styles that are outdated
+ $this->sql_query('DELETE FROM ' . STYLES_TABLE . '
+ WHERE ' . $this->db->sql_in_set('style_id', $valid_styles, true));
+
+ // Change default style
+ if (!in_array($this->config['default_style'], $valid_styles))
+ {
+ $this->sql_query('UPDATE ' . CONFIG_TABLE . "
+ SET config_value = '" . $valid_styles[0] . "'
+ WHERE config_name = 'default_style'");
+ }
+
+ // Reset styles for users
+ $this->sql_query('UPDATE ' . USERS_TABLE . '
+ SET user_style = 0
+ WHERE ' . $this->db->sql_in_set('user_style', $valid_styles, true));
+ }
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v310/style_update_p2.php b/phpBB/phpbb/db/migration/data/v310/style_update_p2.php
new file mode 100644
index 0000000000..40d6a4dbbd
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v310/style_update_p2.php
@@ -0,0 +1,147 @@
+<?php
+/**
+*
+* @package migration
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License v2
+*
+*/
+
+namespace phpbb\db\migration\data\v310;
+
+class style_update_p2 extends \phpbb\db\migration\migration
+{
+ public function effectively_installed()
+ {
+ return !$this->db_tools->sql_table_exists($this->table_prefix . 'styles_imageset');
+ }
+
+ static public function depends_on()
+ {
+ return array('\phpbb\db\migration\data\v310\style_update_p1');
+ }
+
+ public function update_schema()
+ {
+ return array(
+ 'drop_keys' => array(
+ $this->table_prefix . 'styles' => array(
+ 'imageset_id',
+ 'template_id',
+ 'theme_id',
+ ),
+ ),
+
+ 'drop_columns' => array(
+ $this->table_prefix . 'styles' => array(
+ 'imageset_id',
+ 'template_id',
+ 'theme_id',
+ ),
+ ),
+
+ 'drop_tables' => array(
+ $this->table_prefix . 'styles_imageset',
+ $this->table_prefix . 'styles_imageset_data',
+ $this->table_prefix . 'styles_template',
+ $this->table_prefix . 'styles_template_data',
+ $this->table_prefix . 'styles_theme',
+ ),
+ );
+ }
+
+ public function revert_schema()
+ {
+ return array(
+ 'add_columns' => array(
+ $this->table_prefix . 'styles' => array(
+ 'imageset_id' => array('UINT', 0),
+ 'template_id' => array('UINT', 0),
+ 'theme_id' => array('UINT', 0),
+ ),
+ ),
+
+ 'add_index' => array(
+ $this->table_prefix . 'styles' => array(
+ 'imageset_id' => array('imageset_id'),
+ 'template_id' => array('template_id'),
+ 'theme_id' => array('theme_id'),
+ ),
+ ),
+
+ 'add_tables' => array(
+ $this->table_prefix . 'styles_imageset' => array(
+ 'COLUMNS' => array(
+ 'imageset_id' => array('UINT', null, 'auto_increment'),
+ 'imageset_name' => array('VCHAR_UNI:255', ''),
+ 'imageset_copyright' => array('VCHAR_UNI', ''),
+ 'imageset_path' => array('VCHAR:100', ''),
+ ),
+ 'PRIMARY_KEY' => 'imageset_id',
+ 'KEYS' => array(
+ 'imgset_nm' => array('UNIQUE', 'imageset_name'),
+ ),
+ ),
+ $this->table_prefix . 'styles_imageset_data' => array(
+ 'COLUMNS' => array(
+ 'image_id' => array('UINT', null, 'auto_increment'),
+ 'image_name' => array('VCHAR:200', ''),
+ 'image_filename' => array('VCHAR:200', ''),
+ 'image_lang' => array('VCHAR:30', ''),
+ 'image_height' => array('USINT', 0),
+ 'image_width' => array('USINT', 0),
+ 'imageset_id' => array('UINT', 0),
+ ),
+ 'PRIMARY_KEY' => 'image_id',
+ 'KEYS' => array(
+ 'i_d' => array('INDEX', 'imageset_id'),
+ ),
+ ),
+ $this->table_prefix . 'styles_template' => array(
+ 'COLUMNS' => array(
+ 'template_id' => array('UINT', null, 'auto_increment'),
+ 'template_name' => array('VCHAR_UNI:255', ''),
+ 'template_copyright' => array('VCHAR_UNI', ''),
+ 'template_path' => array('VCHAR:100', ''),
+ 'bbcode_bitfield' => array('VCHAR:255', 'kNg='),
+ 'template_storedb' => array('BOOL', 0),
+ 'template_inherits_id' => array('UINT:4', 0),
+ 'template_inherit_path' => array('VCHAR', ''),
+ ),
+ 'PRIMARY_KEY' => 'template_id',
+ 'KEYS' => array(
+ 'tmplte_nm' => array('UNIQUE', 'template_name'),
+ ),
+ ),
+ $this->table_prefix . 'styles_template_data' => array(
+ 'COLUMNS' => array(
+ 'template_id' => array('UINT', 0),
+ 'template_filename' => array('VCHAR:100', ''),
+ 'template_included' => array('TEXT', ''),
+ 'template_mtime' => array('TIMESTAMP', 0),
+ 'template_data' => array('MTEXT_UNI', ''),
+ ),
+ 'KEYS' => array(
+ 'tid' => array('INDEX', 'template_id'),
+ 'tfn' => array('INDEX', 'template_filename'),
+ ),
+ ),
+ $this->table_prefix . 'styles_theme' => array(
+ 'COLUMNS' => array(
+ 'theme_id' => array('UINT', null, 'auto_increment'),
+ 'theme_name' => array('VCHAR_UNI:255', ''),
+ 'theme_copyright' => array('VCHAR_UNI', ''),
+ 'theme_path' => array('VCHAR:100', ''),
+ 'theme_storedb' => array('BOOL', 0),
+ 'theme_mtime' => array('TIMESTAMP', 0),
+ 'theme_data' => array('MTEXT_UNI', ''),
+ ),
+ 'PRIMARY_KEY' => 'theme_id',
+ 'KEYS' => array(
+ 'theme_name' => array('UNIQUE', 'theme_name'),
+ ),
+ ),
+ ),
+ );
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v310/teampage.php b/phpBB/phpbb/db/migration/data/v310/teampage.php
new file mode 100644
index 0000000000..172435c672
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v310/teampage.php
@@ -0,0 +1,106 @@
+<?php
+/**
+*
+* @package migration
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License v2
+*
+*/
+
+namespace phpbb\db\migration\data\v310;
+
+class teampage extends \phpbb\db\migration\migration
+{
+ public function effectively_installed()
+ {
+ return $this->db_tools->sql_table_exists($this->table_prefix . 'teampage');
+ }
+
+ static public function depends_on()
+ {
+ return array('\phpbb\db\migration\data\v310\dev');
+ }
+
+ public function update_schema()
+ {
+ return array(
+ 'add_tables' => array(
+ $this->table_prefix . 'teampage' => array(
+ 'COLUMNS' => array(
+ 'teampage_id' => array('UINT', null, 'auto_increment'),
+ 'group_id' => array('UINT', 0),
+ 'teampage_name' => array('VCHAR_UNI:255', ''),
+ 'teampage_position' => array('UINT', 0),
+ 'teampage_parent' => array('UINT', 0),
+ ),
+ 'PRIMARY_KEY' => 'teampage_id',
+ ),
+ ),
+ 'drop_columns' => array(
+ $this->table_prefix . 'groups' => array(
+ 'group_teampage',
+ ),
+ ),
+ );
+ }
+
+ public function revert_schema()
+ {
+ return array(
+ 'drop_tables' => array(
+ $this->table_prefix . 'teampage',
+ ),
+ 'add_columns' => array(
+ $this->table_prefix . 'groups' => array(
+ 'group_teampage' => array('UINT', 0, 'after' => 'group_legend'),
+ ),
+ ),
+ );
+ }
+
+ public function update_data()
+ {
+ return array(
+ array('custom', array(array($this, 'add_groups_teampage'))),
+ );
+ }
+
+ public function add_groups_teampage()
+ {
+ $sql = 'SELECT teampage_id
+ FROM ' . TEAMPAGE_TABLE;
+ $result = $this->db->sql_query_limit($sql, 1);
+ $added_groups_teampage = (bool) $this->db->sql_fetchfield('teampage_id');
+ $this->db->sql_freeresult($result);
+
+ if (!$added_groups_teampage)
+ {
+ $sql = 'SELECT *
+ FROM ' . GROUPS_TABLE . '
+ WHERE group_type = ' . GROUP_SPECIAL . "
+ AND (group_name = 'ADMINISTRATORS'
+ OR group_name = 'GLOBAL_MODERATORS')
+ ORDER BY group_name ASC";
+ $result = $this->db->sql_query($sql);
+
+ $teampage_entries = array();
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ $teampage_entries[] = array(
+ 'group_id' => (int) $row['group_id'],
+ 'teampage_name' => '',
+ 'teampage_position' => sizeof($teampage_entries) + 1,
+ 'teampage_parent' => 0,
+ );
+ }
+ $this->db->sql_freeresult($result);
+
+ if (sizeof($teampage_entries))
+ {
+ $this->db->sql_multi_insert(TEAMPAGE_TABLE, $teampage_entries);
+ }
+ unset($teampage_entries);
+ }
+
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v310/timezone.php b/phpBB/phpbb/db/migration/data/v310/timezone.php
new file mode 100644
index 0000000000..dd0c6a2093
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v310/timezone.php
@@ -0,0 +1,165 @@
+<?php
+/**
+*
+* @package migration
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License v2
+*
+*/
+
+namespace phpbb\db\migration\data\v310;
+
+class timezone extends \phpbb\db\migration\migration
+{
+ public function effectively_installed()
+ {
+ return !$this->db_tools->sql_column_exists($this->table_prefix . 'users', 'user_dst');
+ }
+
+ static public function depends_on()
+ {
+ return array('\phpbb\db\migration\data\v30x\release_3_0_11');
+ }
+
+ public function update_schema()
+ {
+ return array(
+ 'change_columns' => array(
+ $this->table_prefix . 'users' => array(
+ 'user_timezone' => array('VCHAR:100', ''),
+ ),
+ ),
+ );
+ }
+
+ public function update_data()
+ {
+ return array(
+ array('custom', array(array($this, 'update_timezones'))),
+ );
+ }
+
+ public function update_timezones()
+ {
+ // Update user timezones
+ $sql = 'SELECT user_dst, user_timezone
+ FROM ' . $this->table_prefix . 'users
+ GROUP BY user_timezone, user_dst';
+ $result = $this->db->sql_query($sql);
+
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ $sql = 'UPDATE ' . $this->table_prefix . "users
+ SET user_timezone = '" . $this->db->sql_escape($this->convert_phpbb30_timezone($row['user_timezone'], $row['user_dst'])) . "'
+ WHERE user_timezone = '" . $this->db->sql_escape($row['user_timezone']) . "'
+ AND user_dst = " . (int) $row['user_dst'];
+ $this->sql_query($sql);
+ }
+ $this->db->sql_freeresult($result);
+
+ // Update board default timezone
+ $sql = 'UPDATE ' . $this->table_prefix . "config
+ SET config_value = '" . $this->convert_phpbb30_timezone($this->config['board_timezone'], $this->config['board_dst']) . "'
+ WHERE config_name = 'board_timezone'";
+ $this->sql_query($sql);
+ }
+
+ /**
+ * Determine the new timezone for a given phpBB 3.0 timezone and
+ * "Daylight Saving Time" option
+ *
+ * @param $timezone float Users timezone in 3.0
+ * @param $dst int Users daylight saving time
+ * @return string Users new php Timezone which is used since 3.1
+ */
+ public function convert_phpbb30_timezone($timezone, $dst)
+ {
+ $offset = $timezone + $dst;
+
+ switch ($timezone)
+ {
+ case '-12':
+ return 'Etc/GMT+' . abs($offset); //'[UTC - 12] Baker Island Time'
+ case '-11':
+ return 'Etc/GMT+' . abs($offset); //'[UTC - 11] Niue Time, Samoa Standard Time'
+ case '-10':
+ return 'Etc/GMT+' . abs($offset); //'[UTC - 10] Hawaii-Aleutian Standard Time, Cook Island Time'
+ case '-9.5':
+ return 'Pacific/Marquesas'; //'[UTC - 9:30] Marquesas Islands Time'
+ case '-9':
+ return 'Etc/GMT+' . abs($offset); //'[UTC - 9] Alaska Standard Time, Gambier Island Time'
+ case '-8':
+ return 'Etc/GMT+' . abs($offset); //'[UTC - 8] Pacific Standard Time'
+ case '-7':
+ return 'Etc/GMT+' . abs($offset); //'[UTC - 7] Mountain Standard Time'
+ case '-6':
+ return 'Etc/GMT+' . abs($offset); //'[UTC - 6] Central Standard Time'
+ case '-5':
+ return 'Etc/GMT+' . abs($offset); //'[UTC - 5] Eastern Standard Time'
+ case '-4.5':
+ return 'America/Caracas'; //'[UTC - 4:30] Venezuelan Standard Time'
+ case '-4':
+ return 'Etc/GMT+' . abs($offset); //'[UTC - 4] Atlantic Standard Time'
+ case '-3.5':
+ return 'America/St_Johns'; //'[UTC - 3:30] Newfoundland Standard Time'
+ case '-3':
+ return 'Etc/GMT+' . abs($offset); //'[UTC - 3] Amazon Standard Time, Central Greenland Time'
+ case '-2':
+ return 'Etc/GMT+' . abs($offset); //'[UTC - 2] Fernando de Noronha Time, South Georgia &amp; the South Sandwich Islands Time'
+ case '-1':
+ return 'Etc/GMT+' . abs($offset); //'[UTC - 1] Azores Standard Time, Cape Verde Time, Eastern Greenland Time'
+ case '0':
+ return (!$dst) ? 'UTC' : 'Etc/GMT-1'; //'[UTC] Western European Time, Greenwich Mean Time'
+ case '1':
+ return 'Etc/GMT-' . $offset; //'[UTC + 1] Central European Time, West African Time'
+ case '2':
+ return 'Etc/GMT-' . $offset; //'[UTC + 2] Eastern European Time, Central African Time'
+ case '3':
+ return 'Etc/GMT-' . $offset; //'[UTC + 3] Moscow Standard Time, Eastern African Time'
+ case '3.5':
+ return 'Asia/Tehran'; //'[UTC + 3:30] Iran Standard Time'
+ case '4':
+ return 'Etc/GMT-' . $offset; //'[UTC + 4] Gulf Standard Time, Samara Standard Time'
+ case '4.5':
+ return 'Asia/Kabul'; //'[UTC + 4:30] Afghanistan Time'
+ case '5':
+ return 'Etc/GMT-' . $offset; //'[UTC + 5] Pakistan Standard Time, Yekaterinburg Standard Time'
+ case '5.5':
+ return 'Asia/Kolkata'; //'[UTC + 5:30] Indian Standard Time, Sri Lanka Time'
+ case '5.75':
+ return 'Asia/Kathmandu'; //'[UTC + 5:45] Nepal Time'
+ case '6':
+ return 'Etc/GMT-' . $offset; //'[UTC + 6] Bangladesh Time, Bhutan Time, Novosibirsk Standard Time'
+ case '6.5':
+ return 'Indian/Cocos'; //'[UTC + 6:30] Cocos Islands Time, Myanmar Time'
+ case '7':
+ return 'Etc/GMT-' . $offset; //'[UTC + 7] Indochina Time, Krasnoyarsk Standard Time'
+ case '8':
+ return 'Etc/GMT-' . $offset; //'[UTC + 8] Chinese Standard Time, Australian Western Standard Time, Irkutsk Standard Time'
+ case '8.75':
+ return 'Australia/Eucla'; //'[UTC + 8:45] Southeastern Western Australia Standard Time'
+ case '9':
+ return 'Etc/GMT-' . $offset; //'[UTC + 9] Japan Standard Time, Korea Standard Time, Chita Standard Time'
+ case '9.5':
+ return 'Australia/ACT'; //'[UTC + 9:30] Australian Central Standard Time'
+ case '10':
+ return 'Etc/GMT-' . $offset; //'[UTC + 10] Australian Eastern Standard Time, Vladivostok Standard Time'
+ case '10.5':
+ return 'Australia/Lord_Howe'; //'[UTC + 10:30] Lord Howe Standard Time'
+ case '11':
+ return 'Etc/GMT-' . $offset; //'[UTC + 11] Solomon Island Time, Magadan Standard Time'
+ case '11.5':
+ return 'Pacific/Norfolk'; //'[UTC + 11:30] Norfolk Island Time'
+ case '12':
+ return 'Etc/GMT-12'; //'[UTC + 12] New Zealand Time, Fiji Time, Kamchatka Standard Time'
+ case '12.75':
+ return 'Pacific/Chatham'; //'[UTC + 12:45] Chatham Islands Time'
+ case '13':
+ return 'Pacific/Tongatapu'; //'[UTC + 13] Tonga Time, Phoenix Islands Time'
+ case '14':
+ return 'Pacific/Kiritimati'; //'[UTC + 14] Line Island Time'
+ default:
+ return 'UTC';
+ }
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v310/timezone_p2.php b/phpBB/phpbb/db/migration/data/v310/timezone_p2.php
new file mode 100644
index 0000000000..1066ab8571
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v310/timezone_p2.php
@@ -0,0 +1,45 @@
+<?php
+/**
+*
+* @package migration
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License v2
+*
+*/
+
+namespace phpbb\db\migration\data\v310;
+
+class timezone_p2 extends \phpbb\db\migration\migration
+{
+ public function effectively_installed()
+ {
+ return !$this->db_tools->sql_column_exists($this->table_prefix . 'users', 'user_dst');
+ }
+
+ static public function depends_on()
+ {
+ return array('\phpbb\db\migration\data\v310\timezone');
+ }
+
+ public function update_schema()
+ {
+ return array(
+ 'drop_columns' => array(
+ $this->table_prefix . 'users' => array(
+ 'user_dst',
+ ),
+ ),
+ );
+ }
+
+ public function revert_schema()
+ {
+ return array(
+ 'add_columns' => array(
+ $this->table_prefix . 'users' => array(
+ 'user_dst' => array('BOOL', 0),
+ ),
+ ),
+ );
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v310/ucp_popuppm_module.php b/phpBB/phpbb/db/migration/data/v310/ucp_popuppm_module.php
new file mode 100644
index 0000000000..f8ada6c6f5
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v310/ucp_popuppm_module.php
@@ -0,0 +1,42 @@
+<?php
+/**
+*
+* @package migration
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\db\migration\data\v310;
+
+class ucp_popuppm_module extends \phpbb\db\migration\migration
+{
+ public function effectively_installed()
+ {
+ $sql = 'SELECT module_id
+ FROM ' . MODULES_TABLE . "
+ WHERE module_class = 'ucp'
+ AND module_langname = 'UCP_PM_POPUP_TITLE'";
+ $result = $this->db->sql_query($sql);
+ $module_id = $this->db->sql_fetchfield('module_id');
+ $this->db->sql_freeresult($result);
+
+ return $module_id == false;
+ }
+
+ static public function depends_on()
+ {
+ return array('\phpbb\db\migration\data\v310\dev');
+ }
+
+ public function update_data()
+ {
+ return array(
+ array('module.remove', array(
+ 'ucp',
+ 'UCP_PM',
+ 'UCP_PM_POPUP_TITLE',
+ )),
+ );
+ }
+}
diff --git a/phpBB/phpbb/db/migration/exception.php b/phpBB/phpbb/db/migration/exception.php
new file mode 100644
index 0000000000..cfe546d1ab
--- /dev/null
+++ b/phpBB/phpbb/db/migration/exception.php
@@ -0,0 +1,73 @@
+<?php
+/**
+*
+* @package db
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License v2
+*
+*/
+
+namespace phpbb\db\migration;
+
+/**
+* The migrator is responsible for applying new migrations in the correct order.
+*
+* @package db
+*/
+class exception extends \Exception
+{
+ /**
+ * Extra parameters sent to exception to aid in debugging
+ * @var array
+ */
+ protected $parameters;
+
+ /**
+ * Throw an exception.
+ *
+ * First argument is the error message.
+ * Additional arguments will be output with the error message.
+ */
+ public function __construct()
+ {
+ $parameters = func_get_args();
+ $message = array_shift($parameters);
+ parent::__construct($message);
+
+ $this->parameters = $parameters;
+ }
+
+ /**
+ * Output the error as a string
+ *
+ * @return string
+ */
+ public function __toString()
+ {
+ return $this->message . ': ' . var_export($this->parameters, true);
+ }
+
+ /**
+ * Get the parameters
+ *
+ * @return array
+ */
+ public function getParameters()
+ {
+ return $this->parameters;
+ }
+
+ /**
+ * Get localised message (with $user->lang())
+ *
+ * @param \phpbb\user $user
+ * @return string
+ */
+ public function getLocalisedMessage(\phpbb\user $user)
+ {
+ $parameters = $this->getParameters();
+ array_unshift($parameters, $this->getMessage());
+
+ return call_user_func_array(array($user, 'lang'), $parameters);
+ }
+}
diff --git a/phpBB/phpbb/db/migration/helper.php b/phpBB/phpbb/db/migration/helper.php
new file mode 100644
index 0000000000..009ad1da9f
--- /dev/null
+++ b/phpBB/phpbb/db/migration/helper.php
@@ -0,0 +1,82 @@
+<?php
+/**
+*
+* @package db
+* @copyright (c) 2014 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+namespace phpbb\db\migration;
+
+/**
+* The migrator is responsible for applying new migrations in the correct order.
+*
+* @package db
+*/
+class helper
+{
+ /**
+ * Get the schema steps from an array of schema changes
+ *
+ * This splits up $schema_changes into individual changes so that the
+ * changes can be chunked
+ *
+ * @param array $schema_changes from migration
+ * @return array
+ */
+ public function get_schema_steps($schema_changes)
+ {
+ $steps = array();
+
+ // Nested level of data (only supports 1/2 currently)
+ $nested_level = array(
+ 'drop_tables' => 1,
+ 'add_tables' => 1,
+ 'change_columns' => 2,
+ 'add_columns' => 2,
+ 'drop_keys' => 2,
+ 'drop_columns' => 2,
+ 'add_primary_keys' => 2, // perform_schema_changes only uses one level, but second is in the function
+ 'add_unique_index' => 2,
+ 'add_index' => 2,
+ );
+
+ foreach ($nested_level as $change_type => $data_depth)
+ {
+ if (!empty($schema_changes[$change_type]))
+ {
+ foreach ($schema_changes[$change_type] as $key => $value)
+ {
+ if ($data_depth === 1)
+ {
+ $steps[] = array(
+ 'dbtools.perform_schema_changes', array(array(
+ $change_type => array(
+ (!is_int($key)) ? $key : 0 => $value,
+ ),
+ )),
+ );
+ }
+ else if ($data_depth === 2)
+ {
+ foreach ($value as $key2 => $value2)
+ {
+ $steps[] = array(
+ 'dbtools.perform_schema_changes', array(array(
+ $change_type => array(
+ $key => array(
+ $key2 => $value2,
+ ),
+ ),
+ )),
+ );
+ }
+ }
+ }
+ }
+ }
+
+ return $steps;
+ }
+}
diff --git a/phpBB/phpbb/db/migration/migration.php b/phpBB/phpbb/db/migration/migration.php
new file mode 100644
index 0000000000..b32de00871
--- /dev/null
+++ b/phpBB/phpbb/db/migration/migration.php
@@ -0,0 +1,184 @@
+<?php
+/**
+*
+* @package db
+* @copyright (c) 2011 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License v2
+*
+*/
+
+namespace phpbb\db\migration;
+
+/**
+* Abstract base class for database migrations
+*
+* Each migration consists of a set of schema and data changes to be implemented
+* in a subclass. This class provides various utility methods to simplify editing
+* a phpBB.
+*
+* @package db
+*/
+abstract class migration
+{
+ /** @var \phpbb\config\config */
+ protected $config;
+
+ /** @var \phpbb\db\driver\driver */
+ protected $db;
+
+ /** @var \phpbb\db\tools */
+ protected $db_tools;
+
+ /** @var string */
+ protected $table_prefix;
+
+ /** @var string */
+ protected $phpbb_root_path;
+
+ /** @var string */
+ protected $php_ext;
+
+ /** @var array Errors, if any occurred */
+ protected $errors;
+
+ /** @var array List of queries executed through $this->sql_query() */
+ protected $queries = array();
+
+ /**
+ * Constructor
+ *
+ * @param \phpbb\config\config $config
+ * @param \phpbb\db\driver\driver $db
+ * @param \phpbb\db\tools $db_tools
+ * @param string $phpbb_root_path
+ * @param string $php_ext
+ * @param string $table_prefix
+ */
+ public function __construct(\phpbb\config\config $config, \phpbb\db\driver\driver $db, \phpbb\db\tools $db_tools, $phpbb_root_path, $php_ext, $table_prefix)
+ {
+ $this->config = $config;
+ $this->db = $db;
+ $this->db_tools = $db_tools;
+ $this->table_prefix = $table_prefix;
+
+ $this->phpbb_root_path = $phpbb_root_path;
+ $this->php_ext = $php_ext;
+
+ $this->errors = array();
+ }
+
+ /**
+ * Defines other migrations to be applied first
+ *
+ * @return array An array of migration class names
+ */
+ static public function depends_on()
+ {
+ return array();
+ }
+
+ /**
+ * Allows you to check if the migration is effectively installed (entirely optional)
+ *
+ * This is checked when a migration is installed. If true is returned, the migration will be set as
+ * installed without performing the database changes.
+ * This function is intended to help moving to migrations from a previous database updater, where some
+ * migrations may have been installed already even though they are not yet listed in the migrations table.
+ *
+ * @return bool True if this migration is installed, False if this migration is not installed (checked on install)
+ */
+ public function effectively_installed()
+ {
+ return false;
+ }
+
+ /**
+ * Updates the database schema by providing a set of change instructions
+ *
+ * @return array Array of schema changes (compatible with db_tools->perform_schema_changes())
+ */
+ public function update_schema()
+ {
+ return array();
+ }
+
+ /**
+ * Reverts the database schema by providing a set of change instructions
+ *
+ * @return array Array of schema changes (compatible with db_tools->perform_schema_changes())
+ */
+ public function revert_schema()
+ {
+ return array();
+ }
+
+ /**
+ * Updates data by returning a list of instructions to be executed
+ *
+ * @return array Array of data update instructions
+ */
+ public function update_data()
+ {
+ return array();
+ }
+
+ /**
+ * Reverts data by returning a list of instructions to be executed
+ *
+ * @return array Array of data instructions that will be performed on revert
+ * NOTE: calls to tools (such as config.add) are automatically reverted when
+ * possible, so you should not attempt to revert those, this is mostly for
+ * otherwise unrevertable calls (custom functions for example)
+ */
+ public function revert_data()
+ {
+ return array();
+ }
+
+ /**
+ * Wrapper for running queries to generate user feedback on updates
+ *
+ * @param string $sql SQL query to run on the database
+ * @return mixed Query result from db->sql_query()
+ */
+ protected function sql_query($sql)
+ {
+ $this->queries[] = $sql;
+
+ $this->db->sql_return_on_error(true);
+
+ if ($sql === 'begin')
+ {
+ $result = $this->db->sql_transaction('begin');
+ }
+ else if ($sql === 'commit')
+ {
+ $result = $this->db->sql_transaction('commit');
+ }
+ else
+ {
+ $result = $this->db->sql_query($sql);
+ if ($this->db->sql_error_triggered)
+ {
+ $this->errors[] = array(
+ 'sql' => $this->db->sql_error_sql,
+ 'code' => $this->db->sql_error_returned,
+ );
+ }
+ }
+
+ $this->db->sql_return_on_error(false);
+
+ return $result;
+ }
+
+ /**
+ * Get the list of queries run
+ *
+ * @return array
+ */
+ public function get_queries()
+ {
+ return $this->queries;
+ }
+}
diff --git a/phpBB/phpbb/db/migration/profilefield_base_migration.php b/phpBB/phpbb/db/migration/profilefield_base_migration.php
new file mode 100644
index 0000000000..dec7a4c2bb
--- /dev/null
+++ b/phpBB/phpbb/db/migration/profilefield_base_migration.php
@@ -0,0 +1,155 @@
+<?php
+/**
+*
+* @package migration
+* @copyright (c) 2014 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License v2
+*
+*/
+
+namespace phpbb\db\migration;
+
+abstract class profilefield_base_migration extends \phpbb\db\migration\migration
+{
+ protected $profilefield_name;
+
+ protected $profilefield_database_type;
+
+ protected $profilefield_data;
+
+ protected $user_column_name;
+
+ public function effectively_installed()
+ {
+ return $this->db_tools->sql_column_exists($this->table_prefix . 'profile_fields_data', 'pf_' . $this->profilefield_name);
+ }
+
+ public function update_schema()
+ {
+ return array(
+ 'add_columns' => array(
+ $this->table_prefix . 'profile_fields_data' => array(
+ 'pf_' . $this->profilefield_name => $this->profilefield_database_type,
+ ),
+ ),
+ );
+ }
+
+ public function revert_schema()
+ {
+ return array(
+ 'drop_columns' => array(
+ $this->table_prefix . 'profile_fields_data' => array(
+ 'pf_' . $this->profilefield_name,
+ ),
+ ),
+ );
+ }
+
+ public function update_data()
+ {
+ return array(
+ array('custom', array(array($this, 'create_custom_field'))),
+ array('custom', array(array($this, 'convert_user_field_to_custom_field'))),
+ );
+ }
+
+ public function create_custom_field()
+ {
+ $sql = 'SELECT MAX(field_order) as max_field_order
+ FROM ' . PROFILE_FIELDS_TABLE;
+ $result = $this->db->sql_query($sql);
+ $max_field_order = (int) $this->db->sql_fetchfield('max_field_order');
+ $this->db->sql_freeresult($result);
+
+ $sql_ary = array_merge($this->profilefield_data, array(
+ 'field_order' => $max_field_order + 1,
+ ));
+
+ $sql = 'INSERT INTO ' . PROFILE_FIELDS_TABLE . ' ' . $this->db->sql_build_array('INSERT', $sql_ary);
+ $this->db->sql_query($sql);
+ $field_id = (int) $this->db->sql_nextid();
+
+ $insert_buffer = new \phpbb\db\sql_insert_buffer($this->db, PROFILE_LANG_TABLE);
+
+ $sql = 'SELECT lang_id
+ FROM ' . LANG_TABLE;
+ $result = $this->db->sql_query($sql);
+ while ($lang_id = (int) $this->db->sql_fetchfield('lang_id'))
+ {
+ $insert_buffer->insert(array(
+ 'field_id' => $field_id,
+ 'lang_id' => $lang_id,
+ 'lang_name' => strtoupper(substr($this->profilefield_name, 6)),// Remove phpbb_ from field name
+ 'lang_explain' => '',
+ 'lang_default_value' => '',
+ ));
+ }
+ $this->db->sql_freeresult($result);
+
+ $insert_buffer->flush();
+ }
+
+ /**
+ * @param int $start Start of staggering step
+ * @return mixed int start of the next step, null if the end was reached
+ */
+ public function convert_user_field_to_custom_field($start)
+ {
+ $insert_buffer = new \phpbb\db\sql_insert_buffer($this->db, $this->table_prefix . 'profile_fields_data');
+ $limit = 250;
+ $converted_users = 0;
+
+ $sql = 'SELECT user_id, ' . $this->user_column_name . '
+ FROM ' . $this->table_prefix . 'users
+ WHERE ' . $this->user_column_name . " <> ''
+ ORDER BY user_id";
+ $result = $this->db->sql_query_limit($sql, $limit, $start);
+
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ $converted_users++;
+
+ $cp_data = array(
+ 'pf_' . $this->profilefield_name => $row[$this->user_column_name],
+ );
+
+ $sql = 'UPDATE ' . $this->table_prefix . 'profile_fields_data
+ SET ' . $this->db->sql_build_array('UPDATE', $cp_data) . '
+ WHERE user_id = ' . (int) $row['user_id'];
+ $this->db->sql_query($sql);
+
+ if (!$this->db->sql_affectedrows())
+ {
+ $cp_data['user_id'] = (int) $row['user_id'];
+ $cp_data = array_merge($this->get_insert_sql_array(), $cp_data);
+ $insert_buffer->insert($cp_data);
+ }
+ }
+ $this->db->sql_freeresult($result);
+
+ $insert_buffer->flush();
+
+ if ($converted_users < $limit)
+ {
+ // No more users left, we are done...
+ return;
+ }
+
+ return $start + $limit;
+ }
+
+ protected function get_insert_sql_array()
+ {
+ static $profile_row;
+
+ if ($profile_row === null)
+ {
+ global $phpbb_container;
+ $manager = $phpbb_container->get('profilefields.manager');
+ $profile_row = $manager->build_insert_sql_array(array());
+ }
+
+ return $profile_row;
+ }
+}
diff --git a/phpBB/phpbb/db/migration/schema_generator.php b/phpBB/phpbb/db/migration/schema_generator.php
new file mode 100644
index 0000000000..a7e2fa8f06
--- /dev/null
+++ b/phpBB/phpbb/db/migration/schema_generator.php
@@ -0,0 +1,179 @@
+<?php
+/**
+*
+* @package db
+* @copyright (c) 2014 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\db\migration;
+
+/**
+* The schema generator generates the schema based on the existing migrations
+*
+* @package db
+*/
+class schema_generator
+{
+ /** @var \phpbb\config\config */
+ protected $config;
+
+ /** @var \phpbb\db\driver\driver */
+ protected $db;
+
+ /** @var \phpbb\db\tools */
+ protected $db_tools;
+
+ /** @var array */
+ protected $class_names;
+
+ /** @var string */
+ protected $table_prefix;
+
+ /** @var string */
+ protected $phpbb_root_path;
+
+ /** @var string */
+ protected $php_ext;
+
+ /** @var array */
+ protected $tables;
+
+ /**
+ * Constructor
+ */
+ public function __construct(array $class_names, \phpbb\config\config $config, \phpbb\db\driver\driver $db, \phpbb\db\tools $db_tools, $phpbb_root_path, $php_ext, $table_prefix)
+ {
+ $this->config = $config;
+ $this->db = $db;
+ $this->db_tools = $db_tools;
+ $this->class_names = $class_names;
+ $this->phpbb_root_path = $phpbb_root_path;
+ $this->php_ext = $php_ext;
+ $this->table_prefix = $table_prefix;
+ }
+
+ /**
+ * Loads all migrations and their application state from the database.
+ *
+ * @return array
+ */
+ public function get_schema()
+ {
+ if (!empty($this->tables))
+ {
+ return $this->tables;
+ }
+
+ $migrations = $this->class_names;
+
+ $tree = array();
+ while (!empty($migrations))
+ {
+ foreach ($migrations as $migration_class)
+ {
+ $open_dependencies = array_diff($migration_class::depends_on(), $tree);
+ if (empty($open_dependencies))
+ {
+ $migration = new $migration_class($this->config, $this->db, $this->db_tools, $this->phpbb_root_path, $this->php_ext, $this->table_prefix);
+ $tree[] = $migration_class;
+ $migration_key = array_search($migration_class, $migrations);
+
+ foreach ($migration->update_schema() as $change_type => $data)
+ {
+ if ($change_type === 'add_tables')
+ {
+ foreach ($data as $table => $table_data)
+ {
+ $this->tables[$table] = $table_data;
+ }
+ }
+ else if ($change_type === 'drop_tables')
+ {
+ foreach ($data as $table)
+ {
+ unset($this->tables[$table]);
+ }
+ }
+ else if ($change_type === 'add_columns')
+ {
+ foreach ($data as $table => $add_columns)
+ {
+ foreach ($add_columns as $column => $column_data)
+ {
+ $this->tables[$table]['COLUMNS'][$column] = $column_data;
+ }
+ }
+ }
+ else if ($change_type === 'change_columns')
+ {
+ foreach ($data as $table => $change_columns)
+ {
+ foreach ($change_columns as $column => $column_data)
+ {
+ $this->tables[$table]['COLUMNS'][$column] = $column_data;
+ }
+ }
+ }
+ else if ($change_type === 'drop_columns')
+ {
+ foreach ($data as $table => $drop_columns)
+ {
+ if (is_array($drop_columns))
+ {
+ foreach ($drop_columns as $column)
+ {
+ unset($this->tables[$table]['COLUMNS'][$column]);
+ }
+ }
+ else
+ {
+ unset($this->tables[$table]['COLUMNS'][$drop_columns]);
+ }
+ }
+ }
+ else if ($change_type === 'add_unique_index')
+ {
+ foreach ($data as $table => $add_index)
+ {
+ foreach ($add_index as $key => $index_data)
+ {
+ $this->tables[$table]['KEYS'][$key] = array('UNIQUE', $index_data);
+ }
+ }
+ }
+ else if ($change_type === 'add_index')
+ {
+ foreach ($data as $table => $add_index)
+ {
+ foreach ($add_index as $key => $index_data)
+ {
+ $this->tables[$table]['KEYS'][$key] = array('INDEX', $index_data);
+ }
+ }
+ }
+ else if ($change_type === 'drop_keys')
+ {
+ foreach ($data as $table => $drop_keys)
+ {
+ foreach ($drop_keys as $key)
+ {
+ unset($this->tables[$table]['KEYS'][$key]);
+ }
+ }
+ }
+ else
+ {
+ var_dump($change_type);
+ }
+ }
+ unset($migrations[$migration_key]);
+ }
+ }
+ }
+
+ ksort($this->tables);
+ return $this->tables;
+ }
+}
diff --git a/phpBB/phpbb/db/migration/tool/config.php b/phpBB/phpbb/db/migration/tool/config.php
new file mode 100644
index 0000000000..36a1931f4e
--- /dev/null
+++ b/phpBB/phpbb/db/migration/tool/config.php
@@ -0,0 +1,156 @@
+<?php
+/**
+*
+* @package migration
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License v2
+*
+*/
+
+namespace phpbb\db\migration\tool;
+
+/**
+* Migration config tool
+*
+* @package db
+*/
+class config implements \phpbb\db\migration\tool\tool_interface
+{
+ /** @var \phpbb\config\config */
+ protected $config;
+
+ /**
+ * Constructor
+ *
+ * @param \phpbb\config\config $config
+ */
+ public function __construct(\phpbb\config\config $config)
+ {
+ $this->config = $config;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function get_name()
+ {
+ return 'config';
+ }
+
+ /**
+ * Add a config setting.
+ *
+ * @param string $config_name The name of the config setting
+ * you would like to add
+ * @param mixed $config_value The value of the config setting
+ * @param bool $is_dynamic True if it is dynamic (changes very often)
+ * and should not be stored in the cache, false if not.
+ * @return null
+ */
+ public function add($config_name, $config_value, $is_dynamic = false)
+ {
+ if (isset($this->config[$config_name]))
+ {
+ return;
+ }
+
+ $this->config->set($config_name, $config_value, !$is_dynamic);
+ }
+
+ /**
+ * Update an existing config setting.
+ *
+ * @param string $config_name The name of the config setting you would
+ * like to update
+ * @param mixed $config_value The value of the config setting
+ * @return null
+ */
+ public function update($config_name, $config_value)
+ {
+ if (!isset($this->config[$config_name]))
+ {
+ throw new \phpbb\db\migration\exception('CONFIG_NOT_EXIST', $config_name);
+ }
+
+ $this->config->set($config_name, $config_value);
+ }
+
+ /**
+ * Update a config setting if the first argument equal to the
+ * current config value
+ *
+ * @param string $compare If equal to the current config value, will be
+ * updated to the new config value, otherwise not
+ * @param string $config_name The name of the config setting you would
+ * like to update
+ * @param mixed $config_value The value of the config setting
+ * @return null
+ */
+ public function update_if_equals($compare, $config_name, $config_value)
+ {
+ if (!isset($this->config[$config_name]))
+ {
+ throw new \phpbb\db\migration\exception('CONFIG_NOT_EXIST', $config_name);
+ }
+
+ $this->config->set_atomic($config_name, $compare, $config_value);
+ }
+
+ /**
+ * Remove an existing config setting.
+ *
+ * @param string $config_name The name of the config setting you would
+ * like to remove
+ * @return null
+ */
+ public function remove($config_name)
+ {
+ if (!isset($this->config[$config_name]))
+ {
+ return;
+ }
+
+ $this->config->delete($config_name);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function reverse()
+ {
+ $arguments = func_get_args();
+ $original_call = array_shift($arguments);
+
+ $call = false;
+ switch ($original_call)
+ {
+ case 'add':
+ $call = 'remove';
+ break;
+
+ case 'remove':
+ $call = 'add';
+ if (sizeof($arguments) == 1)
+ {
+ $arguments[] = '';
+ }
+ break;
+
+ case 'update_if_equals':
+ $call = 'update_if_equals';
+
+ // Set to the original value if the current value is what we compared to originally
+ $arguments = array(
+ $arguments[2],
+ $arguments[1],
+ $arguments[0],
+ );
+ break;
+ }
+
+ if ($call)
+ {
+ return call_user_func_array(array(&$this, $call), $arguments);
+ }
+ }
+}
diff --git a/phpBB/phpbb/db/migration/tool/module.php b/phpBB/phpbb/db/migration/tool/module.php
new file mode 100644
index 0000000000..ebbcbae301
--- /dev/null
+++ b/phpBB/phpbb/db/migration/tool/module.php
@@ -0,0 +1,484 @@
+<?php
+/**
+*
+* @package migration
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License v2
+*
+*/
+
+namespace phpbb\db\migration\tool;
+
+/**
+* Migration module management tool
+*
+* @package db
+*/
+class module implements \phpbb\db\migration\tool\tool_interface
+{
+ /** @var \phpbb\cache\service */
+ protected $cache;
+
+ /** @var \phpbb\db\driver\driver */
+ protected $db;
+
+ /** @var \phpbb\user */
+ protected $user;
+
+ /** @var string */
+ protected $phpbb_root_path;
+
+ /** @var string */
+ protected $php_ext;
+
+ /** @var string */
+ protected $modules_table;
+
+ /**
+ * Constructor
+ *
+ * @param \phpbb\db\driver\driver $db
+ * @param \phpbb\cache\service $cache
+ * @param \phpbb\user $user
+ * @param string $phpbb_root_path
+ * @param string $php_ext
+ * @param string $modules_table
+ */
+ public function __construct(\phpbb\db\driver\driver $db, \phpbb\cache\service $cache, \phpbb\user $user, $phpbb_root_path, $php_ext, $modules_table)
+ {
+ $this->db = $db;
+ $this->cache = $cache;
+ $this->user = $user;
+ $this->phpbb_root_path = $phpbb_root_path;
+ $this->php_ext = $php_ext;
+ $this->modules_table = $modules_table;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function get_name()
+ {
+ return 'module';
+ }
+
+ /**
+ * Module Exists
+ *
+ * Check if a module exists
+ *
+ * @param string $class The module class(acp|mcp|ucp)
+ * @param int|string|bool $parent The parent module_id|module_langname (0 for no parent).
+ * Use false to ignore the parent check and check class wide.
+ * @param int|string $module The module_id|module_langname you would like to
+ * check for to see if it exists
+ * @return bool true/false if module exists
+ */
+ public function exists($class, $parent, $module)
+ {
+ // the main root directory should return true
+ if (!$module)
+ {
+ return true;
+ }
+
+ $parent_sql = '';
+ if ($parent !== false)
+ {
+ // Allows '' to be sent as 0
+ $parent = $parent ?: 0;
+
+ if (!is_numeric($parent))
+ {
+ $sql = 'SELECT module_id
+ FROM ' . $this->modules_table . "
+ WHERE module_langname = '" . $this->db->sql_escape($parent) . "'
+ AND module_class = '" . $this->db->sql_escape($class) . "'";
+ $result = $this->db->sql_query($sql);
+ $module_id = $this->db->sql_fetchfield('module_id');
+ $this->db->sql_freeresult($result);
+
+ if (!$module_id)
+ {
+ return false;
+ }
+
+ $parent_sql = 'AND parent_id = ' . (int) $module_id;
+ }
+ else
+ {
+ $parent_sql = 'AND parent_id = ' . (int) $parent;
+ }
+ }
+
+ $sql = 'SELECT module_id
+ FROM ' . $this->modules_table . "
+ WHERE module_class = '" . $this->db->sql_escape($class) . "'
+ $parent_sql
+ AND " . ((is_numeric($module)) ? 'module_id = ' . (int) $module : "module_langname = '" . $this->db->sql_escape($module) . "'");
+ $result = $this->db->sql_query($sql);
+ $module_id = $this->db->sql_fetchfield('module_id');
+ $this->db->sql_freeresult($result);
+
+ if ($module_id)
+ {
+ return true;
+ }
+
+ return false;
+ }
+
+ /**
+ * Module Add
+ *
+ * Add a new module
+ *
+ * @param string $class The module class(acp|mcp|ucp)
+ * @param int|string $parent The parent module_id|module_langname (0 for no parent)
+ * @param array $data an array of the data on the new \module.
+ * This can be setup in two different ways.
+ * 1. The "manual" way. For inserting a category or one at a time.
+ * It will be merged with the base array shown a bit below,
+ * but at the least requires 'module_langname' to be sent, and,
+ * if you want to create a module (instead of just a category) you must
+ * send module_basename and module_mode.
+ * array(
+ * 'module_enabled' => 1,
+ * 'module_display' => 1,
+ * 'module_basename' => '',
+ * 'module_class' => $class,
+ * 'parent_id' => (int) $parent,
+ * 'module_langname' => '',
+ * 'module_mode' => '',
+ * 'module_auth' => '',
+ * )
+ * 2. The "automatic" way. For inserting multiple at a time based on the
+ * specs in the info file for the module(s). For this to work the
+ * modules must be correctly setup in the info file.
+ * An example follows (this would insert the settings, log, and flag
+ * modes from the includes/acp/info/acp_asacp.php file):
+ * array(
+ * 'module_basename' => 'asacp',
+ * 'modes' => array('settings', 'log', 'flag'),
+ * )
+ * Optionally you may not send 'modes' and it will insert all of the
+ * modules in that info file.
+ * path, specify that here
+ * @return null
+ */
+ public function add($class, $parent = 0, $data = array())
+ {
+ // Allows '' to be sent as 0
+ $parent = $parent ?: 0;
+
+ // allow sending the name as a string in $data to create a category
+ if (!is_array($data))
+ {
+ $data = array('module_langname' => $data);
+ }
+
+ if (!isset($data['module_langname']))
+ {
+ // The "automatic" way
+ $basename = (isset($data['module_basename'])) ? $data['module_basename'] : '';
+ $module = $this->get_module_info($class, $basename);
+
+ $result = '';
+ foreach ($module['modes'] as $mode => $module_info)
+ {
+ if (!isset($data['modes']) || in_array($mode, $data['modes']))
+ {
+ $new_module = array(
+ 'module_basename' => $basename,
+ 'module_langname' => $module_info['title'],
+ 'module_mode' => $mode,
+ 'module_auth' => $module_info['auth'],
+ 'module_display' => (isset($module_info['display'])) ? $module_info['display'] : true,
+ 'before' => (isset($module_info['before'])) ? $module_info['before'] : false,
+ 'after' => (isset($module_info['after'])) ? $module_info['after'] : false,
+ );
+
+ // Run the "manual" way with the data we've collected.
+ $this->add($class, $parent, $new_module);
+ }
+ }
+
+ return;
+ }
+
+ // The "manual" way
+ if (!is_numeric($parent))
+ {
+ $sql = 'SELECT module_id
+ FROM ' . $this->modules_table . "
+ WHERE module_langname = '" . $this->db->sql_escape($parent) . "'
+ AND module_class = '" . $this->db->sql_escape($class) . "'";
+ $result = $this->db->sql_query($sql);
+ $module_id = $this->db->sql_fetchfield('module_id');
+ $this->db->sql_freeresult($result);
+
+ if (!$module_id)
+ {
+ throw new \phpbb\db\migration\exception('MODULE_NOT_EXIST', $parent);
+ }
+
+ $parent = $data['parent_id'] = $module_id;
+ }
+ else if (!$this->exists($class, false, $parent))
+ {
+ throw new \phpbb\db\migration\exception('MODULE_NOT_EXIST', $parent);
+ }
+
+ if ($this->exists($class, $parent, $data['module_langname']))
+ {
+ return;
+ }
+
+ if (!class_exists('acp_modules'))
+ {
+ include($this->phpbb_root_path . 'includes/acp/acp_modules.' . $this->php_ext);
+ $this->user->add_lang('acp/modules');
+ }
+ $acp_modules = new \acp_modules();
+
+ $module_data = array(
+ 'module_enabled' => (isset($data['module_enabled'])) ? $data['module_enabled'] : 1,
+ 'module_display' => (isset($data['module_display'])) ? $data['module_display'] : 1,
+ 'module_basename' => (isset($data['module_basename'])) ? $data['module_basename'] : '',
+ 'module_class' => $class,
+ 'parent_id' => (int) $parent,
+ 'module_langname' => (isset($data['module_langname'])) ? $data['module_langname'] : '',
+ 'module_mode' => (isset($data['module_mode'])) ? $data['module_mode'] : '',
+ 'module_auth' => (isset($data['module_auth'])) ? $data['module_auth'] : '',
+ );
+ $result = $acp_modules->update_module_data($module_data, true);
+
+ // update_module_data can either return a string or an empty array...
+ if (is_string($result))
+ {
+ // Error
+ throw new \phpbb\db\migration\exception('MODULE_ERROR', $result);
+ }
+ else
+ {
+ // Success
+ $module_log_name = ((isset($this->user->lang[$data['module_langname']])) ? $this->user->lang[$data['module_langname']] : $data['module_langname']);
+ add_log('admin', 'LOG_MODULE_ADD', $module_log_name);
+
+ // Move the module if requested above/below an existing one
+ if (isset($data['before']) && $data['before'])
+ {
+ $sql = 'SELECT left_id
+ FROM ' . $this->modules_table . "
+ WHERE module_class = '" . $this->db->sql_escape($class) . "'
+ AND parent_id = " . (int) $parent . "
+ AND module_langname = '" . $this->db->sql_escape($data['before']) . "'";
+ $this->db->sql_query($sql);
+ $to_left = (int) $this->db->sql_fetchfield('left_id');
+
+ $sql = 'UPDATE ' . $this->modules_table . "
+ SET left_id = left_id + 2, right_id = right_id + 2
+ WHERE module_class = '" . $this->db->sql_escape($class) . "'
+ AND left_id >= $to_left
+ AND left_id < {$module_data['left_id']}";
+ $this->db->sql_query($sql);
+
+ $sql = 'UPDATE ' . $this->modules_table . "
+ SET left_id = $to_left, right_id = " . ($to_left + 1) . "
+ WHERE module_class = '" . $this->db->sql_escape($class) . "'
+ AND module_id = {$module_data['module_id']}";
+ $this->db->sql_query($sql);
+ }
+ else if (isset($data['after']) && $data['after'])
+ {
+ $sql = 'SELECT right_id
+ FROM ' . $this->modules_table . "
+ WHERE module_class = '" . $this->db->sql_escape($class) . "'
+ AND parent_id = " . (int) $parent . "
+ AND module_langname = '" . $this->db->sql_escape($data['after']) . "'";
+ $this->db->sql_query($sql);
+ $to_right = (int) $this->db->sql_fetchfield('right_id');
+
+ $sql = 'UPDATE ' . $this->modules_table . "
+ SET left_id = left_id + 2, right_id = right_id + 2
+ WHERE module_class = '" . $this->db->sql_escape($class) . "'
+ AND left_id >= $to_right
+ AND left_id < {$module_data['left_id']}";
+ $this->db->sql_query($sql);
+
+ $sql = 'UPDATE ' . $this->modules_table . '
+ SET left_id = ' . ($to_right + 1) . ', right_id = ' . ($to_right + 2) . "
+ WHERE module_class = '" . $this->db->sql_escape($class) . "'
+ AND module_id = {$module_data['module_id']}";
+ $this->db->sql_query($sql);
+ }
+ }
+
+ // Clear the Modules Cache
+ $this->cache->destroy("_modules_$class");
+ }
+
+ /**
+ * Module Remove
+ *
+ * Remove a module
+ *
+ * @param string $class The module class(acp|mcp|ucp)
+ * @param int|string|bool $parent The parent module_id|module_langname(0 for no parent).
+ * Use false to ignore the parent check and check class wide.
+ * @param int|string $module The module id|module_langname
+ * specify that here
+ * @return null
+ */
+ public function remove($class, $parent = 0, $module = '')
+ {
+ // Imitation of module_add's "automatic" and "manual" method so the uninstaller works from the same set of instructions for umil_auto
+ if (is_array($module))
+ {
+ if (isset($module['module_langname']))
+ {
+ // Manual Method
+ return $this->remove($class, $parent, $module['module_langname']);
+ }
+
+ // Failed.
+ if (!isset($module['module_basename']))
+ {
+ throw new \phpbb\db\migration\exception('MODULE_NOT_EXIST');
+ }
+
+ // Automatic method
+ $basename = $module['module_basename'];
+ $module_info = $this->get_module_info($class, $basename);
+
+ foreach ($module_info['modes'] as $mode => $info)
+ {
+ if (!isset($module['modes']) || in_array($mode, $module['modes']))
+ {
+ $this->remove($class, $parent, $info['title']);
+ }
+ }
+ }
+ else
+ {
+ if (!$this->exists($class, $parent, $module))
+ {
+ return;
+ }
+
+ $parent_sql = '';
+ if ($parent !== false)
+ {
+ // Allows '' to be sent as 0
+ $parent = ($parent) ?: 0;
+
+ if (!is_numeric($parent))
+ {
+ $sql = 'SELECT module_id
+ FROM ' . $this->modules_table . "
+ WHERE module_langname = '" . $this->db->sql_escape($parent) . "'
+ AND module_class = '" . $this->db->sql_escape($class) . "'";
+ $result = $this->db->sql_query($sql);
+ $module_id = $this->db->sql_fetchfield('module_id');
+ $this->db->sql_freeresult($result);
+
+ // we know it exists from the module_exists check
+ $parent_sql = 'AND parent_id = ' . (int) $module_id;
+ }
+ else
+ {
+ $parent_sql = 'AND parent_id = ' . (int) $parent;
+ }
+ }
+
+ $module_ids = array();
+ if (!is_numeric($module))
+ {
+ $sql = 'SELECT module_id
+ FROM ' . $this->modules_table . "
+ WHERE module_langname = '" . $this->db->sql_escape($module) . "'
+ AND module_class = '" . $this->db->sql_escape($class) . "'
+ $parent_sql";
+ $result = $this->db->sql_query($sql);
+ while ($module_id = $this->db->sql_fetchfield('module_id'))
+ {
+ $module_ids[] = (int) $module_id;
+ }
+ $this->db->sql_freeresult($result);
+ }
+ else
+ {
+ $module_ids[] = (int) $module;
+ }
+
+ if (!class_exists('acp_modules'))
+ {
+ include($this->phpbb_root_path . 'includes/acp/acp_modules.' . $this->php_ext);
+ $this->user->add_lang('acp/modules');
+ }
+ $acp_modules = new \acp_modules();
+ $acp_modules->module_class = $class;
+
+ foreach ($module_ids as $module_id)
+ {
+ $result = $acp_modules->delete_module($module_id);
+ if (!empty($result))
+ {
+ return;
+ }
+ }
+
+ $this->cache->destroy("_modules_$class");
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function reverse()
+ {
+ $arguments = func_get_args();
+ $original_call = array_shift($arguments);
+
+ $call = false;
+ switch ($original_call)
+ {
+ case 'add':
+ $call = 'remove';
+ break;
+
+ case 'remove':
+ $call = 'add';
+ break;
+ }
+
+ if ($call)
+ {
+ return call_user_func_array(array(&$this, $call), $arguments);
+ }
+ }
+
+ /**
+ * Wrapper for \acp_modules::get_module_infos()
+ *
+ * @param string $class Module Class
+ * @param string $basename Module Basename
+ * @return array Module Information
+ */
+ protected function get_module_info($class, $basename)
+ {
+ if (!class_exists('acp_modules'))
+ {
+ include($this->phpbb_root_path . 'includes/acp/acp_modules.' . $this->php_ext);
+ }
+ $acp_modules = new \acp_modules();
+ $module = $acp_modules->get_module_infos($basename, $class, true);
+
+ if (empty($module))
+ {
+ throw new \phpbb\db\migration\exception('MODULE_INFO_FILE_NOT_EXIST', $class, $basename);
+ }
+
+ return array_pop($module);
+ }
+}
diff --git a/phpBB/phpbb/db/migration/tool/permission.php b/phpBB/phpbb/db/migration/tool/permission.php
new file mode 100644
index 0000000000..38fcbd2952
--- /dev/null
+++ b/phpBB/phpbb/db/migration/tool/permission.php
@@ -0,0 +1,624 @@
+<?php
+/**
+*
+* @package migration
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License v2
+*
+*/
+
+namespace phpbb\db\migration\tool;
+
+/**
+* Migration permission management tool
+*
+* @package db
+*/
+class permission implements \phpbb\db\migration\tool\tool_interface
+{
+ /** @var \phpbb\auth\auth */
+ protected $auth;
+
+ /** @var \phpbb\cache\service */
+ protected $cache;
+
+ /** @var \phpbb\db\driver\driver */
+ protected $db;
+
+ /** @var string */
+ protected $phpbb_root_path;
+
+ /** @var string */
+ protected $php_ext;
+
+ /**
+ * Constructor
+ *
+ * @param \phpbb\db\driver\driver $db
+ * @param \phpbb\cache\service $cache
+ * @param \phpbb\auth\auth $auth
+ * @param string $phpbb_root_path
+ * @param string $php_ext
+ */
+ public function __construct(\phpbb\db\driver\driver $db, \phpbb\cache\service $cache, \phpbb\auth\auth $auth, $phpbb_root_path, $php_ext)
+ {
+ $this->db = $db;
+ $this->cache = $cache;
+ $this->auth = $auth;
+ $this->phpbb_root_path = $phpbb_root_path;
+ $this->php_ext = $php_ext;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function get_name()
+ {
+ return 'permission';
+ }
+
+ /**
+ * Permission Exists
+ *
+ * Check if a permission (auth) setting exists
+ *
+ * @param string $auth_option The name of the permission (auth) option
+ * @param bool $global True for checking a global permission setting,
+ * False for a local permission setting
+ * @return bool true if it exists, false if not
+ */
+ public function exists($auth_option, $global = true)
+ {
+ if ($global)
+ {
+ $type_sql = ' AND is_global = 1';
+ }
+ else
+ {
+ $type_sql = ' AND is_local = 1';
+ }
+
+ $sql = 'SELECT auth_option_id
+ FROM ' . ACL_OPTIONS_TABLE . "
+ WHERE auth_option = '" . $this->db->sql_escape($auth_option) . "'"
+ . $type_sql;
+ $result = $this->db->sql_query($sql);
+
+ $row = $this->db->sql_fetchrow($result);
+ $this->db->sql_freeresult($result);
+
+ if ($row)
+ {
+ return true;
+ }
+
+ return false;
+ }
+
+ /**
+ * Permission Add
+ *
+ * Add a permission (auth) option
+ *
+ * @param string $auth_option The name of the permission (auth) option
+ * @param bool $global True for checking a global permission setting,
+ * False for a local permission setting
+ * @return null
+ */
+ public function add($auth_option, $global = true, $copy_from = false)
+ {
+ if ($this->exists($auth_option, $global))
+ {
+ return;
+ }
+
+ // We've added permissions, so set to true to notify the user.
+ $this->permissions_added = true;
+
+ if (!class_exists('auth_admin'))
+ {
+ include($this->phpbb_root_path . 'includes/acp/auth.' . $this->php_ext);
+ }
+ $auth_admin = new \auth_admin();
+
+ // We have to add a check to see if the !$global (if global, local, and if local, global) permission already exists. If it does, acl_add_option currently has a bug which would break the ACL system, so we are having a work-around here.
+ if ($this->exists($auth_option, !$global))
+ {
+ $sql_ary = array(
+ 'is_global' => 1,
+ 'is_local' => 1,
+ );
+ $sql = 'UPDATE ' . ACL_OPTIONS_TABLE . '
+ SET ' . $this->db->sql_build_array('UPDATE', $sql_ary) . "
+ WHERE auth_option = '" . $this->db->sql_escape($auth_option) . "'";
+ $this->db->sql_query($sql);
+ }
+ else
+ {
+ if ($global)
+ {
+ $auth_admin->acl_add_option(array('global' => array($auth_option)));
+ }
+ else
+ {
+ $auth_admin->acl_add_option(array('local' => array($auth_option)));
+ }
+ }
+
+ // The permission has been added, now we can copy it if needed
+ if ($copy_from && isset($auth_admin->acl_options['id'][$copy_from]))
+ {
+ $old_id = $auth_admin->acl_options['id'][$copy_from];
+ $new_id = $auth_admin->acl_options['id'][$auth_option];
+
+ $tables = array(ACL_GROUPS_TABLE, ACL_ROLES_DATA_TABLE, ACL_USERS_TABLE);
+
+ foreach ($tables as $table)
+ {
+ $sql = 'SELECT *
+ FROM ' . $table . '
+ WHERE auth_option_id = ' . $old_id;
+ $result = $this->db->sql_query($sql);
+
+ $sql_ary = array();
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ $row['auth_option_id'] = $new_id;
+ $sql_ary[] = $row;
+ }
+ $this->db->sql_freeresult($result);
+
+ if (!empty($sql_ary))
+ {
+ $this->db->sql_multi_insert($table, $sql_ary);
+ }
+ }
+
+ $auth_admin->acl_clear_prefetch();
+ }
+ }
+
+ /**
+ * Permission Remove
+ *
+ * Remove a permission (auth) option
+ *
+ * @param string $auth_option The name of the permission (auth) option
+ * @param bool $global True for checking a global permission setting,
+ * False for a local permission setting
+ * @return null
+ */
+ public function remove($auth_option, $global = true)
+ {
+ if (!$this->exists($auth_option, $global))
+ {
+ return;
+ }
+
+ if ($global)
+ {
+ $type_sql = ' AND is_global = 1';
+ }
+ else
+ {
+ $type_sql = ' AND is_local = 1';
+ }
+ $sql = 'SELECT auth_option_id, is_global, is_local
+ FROM ' . ACL_OPTIONS_TABLE . "
+ WHERE auth_option = '" . $this->db->sql_escape($auth_option) . "'" .
+ $type_sql;
+ $result = $this->db->sql_query($sql);
+ $row = $this->db->sql_fetchrow($result);
+ $this->db->sql_freeresult($result);
+
+ $id = (int) $row['auth_option_id'];
+
+ // If it is a local and global permission, do not remove the row! :P
+ if ($row['is_global'] && $row['is_local'])
+ {
+ $sql = 'UPDATE ' . ACL_OPTIONS_TABLE . '
+ SET ' . (($global) ? 'is_global = 0' : 'is_local = 0') . '
+ WHERE auth_option_id = ' . $id;
+ $this->db->sql_query($sql);
+ }
+ else
+ {
+ // Delete time
+ $tables = array(ACL_GROUPS_TABLE, ACL_ROLES_DATA_TABLE, ACL_USERS_TABLE, ACL_OPTIONS_TABLE);
+ foreach ($tables as $table)
+ {
+ $this->db->sql_query('DELETE FROM ' . $table . '
+ WHERE auth_option_id = ' . $id);
+ }
+ }
+
+ // Purge the auth cache
+ $this->cache->destroy('_acl_options');
+ $this->auth->acl_clear_prefetch();
+ }
+
+ /**
+ * Add a new permission role
+ *
+ * @param string $role_name The new role name
+ * @param sting $role_type The type (u_, m_, a_)
+ * @return null
+ */
+ public function role_add($role_name, $role_type, $role_description = '')
+ {
+ $sql = 'SELECT role_id
+ FROM ' . ACL_ROLES_TABLE . "
+ WHERE role_name = '" . $this->db->sql_escape($role_name) . "'";
+ $this->db->sql_query($sql);
+ $role_id = (int) $this->db->sql_fetchfield('role_id');
+
+ if ($role_id)
+ {
+ return;
+ }
+
+ $sql = 'SELECT MAX(role_order) AS max_role_order
+ FROM ' . ACL_ROLES_TABLE . "
+ WHERE role_type = '" . $this->db->sql_escape($role_type) . "'";
+ $this->db->sql_query($sql);
+ $role_order = (int) $this->db->sql_fetchfield('max_role_order');
+ $role_order = (!$role_order) ? 1 : $role_order + 1;
+
+ $sql_ary = array(
+ 'role_name' => $role_name,
+ 'role_description' => $role_description,
+ 'role_type' => $role_type,
+ 'role_order' => $role_order,
+ );
+
+ $sql = 'INSERT INTO ' . ACL_ROLES_TABLE . ' ' . $this->db->sql_build_array('INSERT', $sql_ary);
+ $this->db->sql_query($sql);
+ }
+
+ /**
+ * Update the name on a permission role
+ *
+ * @param string $old_role_name The old role name
+ * @param string $new_role_name The new role name
+ * @return null
+ */
+ public function role_update($old_role_name, $new_role_name)
+ {
+ $sql = 'SELECT role_id
+ FROM ' . ACL_ROLES_TABLE . "
+ WHERE role_name = '" . $this->db->sql_escape($old_role_name) . "'";
+ $this->db->sql_query($sql);
+ $role_id = (int) $this->db->sql_fetchfield('role_id');
+
+ if (!$role_id)
+ {
+ throw new \phpbb\db\migration\exception('ROLE_NOT_EXIST', $old_role_name);
+ }
+
+ $sql = 'UPDATE ' . ACL_ROLES_TABLE . "
+ SET role_name = '" . $this->db->sql_escape($new_role_name) . "'
+ WHERE role_name = '" . $this->db->sql_escape($old_role_name) . "'";
+ $this->db->sql_query($sql);
+ }
+
+ /**
+ * Remove a permission role
+ *
+ * @param string $role_name The role name to remove
+ * @return null
+ */
+ public function role_remove($role_name)
+ {
+ $sql = 'SELECT role_id
+ FROM ' . ACL_ROLES_TABLE . "
+ WHERE role_name = '" . $this->db->sql_escape($role_name) . "'";
+ $this->db->sql_query($sql);
+ $role_id = (int) $this->db->sql_fetchfield('role_id');
+
+ if (!$role_id)
+ {
+ return;
+ }
+
+ $sql = 'DELETE FROM ' . ACL_ROLES_DATA_TABLE . '
+ WHERE role_id = ' . $role_id;
+ $this->db->sql_query($sql);
+
+ $sql = 'DELETE FROM ' . ACL_ROLES_TABLE . '
+ WHERE role_id = ' . $role_id;
+ $this->db->sql_query($sql);
+
+ $this->auth->acl_clear_prefetch();
+ }
+
+ /**
+ * Permission Set
+ *
+ * Allows you to set permissions for a certain group/role
+ *
+ * @param string $name The name of the role/group
+ * @param string|array $auth_option The auth_option or array of
+ * auth_options you would like to set
+ * @param string $type The type (role|group)
+ * @param bool $has_permission True if you want to give them permission,
+ * false if you want to deny them permission
+ * @return null
+ */
+ public function permission_set($name, $auth_option, $type = 'role', $has_permission = true)
+ {
+ if (!is_array($auth_option))
+ {
+ $auth_option = array($auth_option);
+ }
+
+ $new_auth = array();
+ $sql = 'SELECT auth_option_id
+ FROM ' . ACL_OPTIONS_TABLE . '
+ WHERE ' . $this->db->sql_in_set('auth_option', $auth_option);
+ $result = $this->db->sql_query($sql);
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ $new_auth[] = (int) $row['auth_option_id'];
+ }
+ $this->db->sql_freeresult($result);
+
+ if (empty($new_auth))
+ {
+ return;
+ }
+
+ $current_auth = array();
+
+ $type = (string) $type; // Prevent PHP bug.
+
+ switch ($type)
+ {
+ case 'role':
+ $sql = 'SELECT role_id
+ FROM ' . ACL_ROLES_TABLE . "
+ WHERE role_name = '" . $this->db->sql_escape($name) . "'";
+ $this->db->sql_query($sql);
+ $role_id = (int) $this->db->sql_fetchfield('role_id');
+
+ if (!$role_id)
+ {
+ throw new \phpbb\db\migration\exception('ROLE_NOT_EXIST', $name);
+ }
+
+ $sql = 'SELECT auth_option_id, auth_setting
+ FROM ' . ACL_ROLES_DATA_TABLE . '
+ WHERE role_id = ' . $role_id;
+ $result = $this->db->sql_query($sql);
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ $current_auth[$row['auth_option_id']] = $row['auth_setting'];
+ }
+ $this->db->sql_freeresult($result);
+ break;
+
+ case 'group':
+ $sql = 'SELECT group_id
+ FROM ' . GROUPS_TABLE . "
+ WHERE group_name = '" . $this->db->sql_escape($name) . "'";
+ $this->db->sql_query($sql);
+ $group_id = (int) $this->db->sql_fetchfield('group_id');
+
+ if (!$group_id)
+ {
+ throw new \phpbb\db\migration\exception('GROUP_NOT_EXIST', $name);
+ }
+
+ // If the group has a role set for them we will add the requested permissions to that role.
+ $sql = 'SELECT auth_role_id
+ FROM ' . ACL_GROUPS_TABLE . '
+ WHERE group_id = ' . $group_id . '
+ AND auth_role_id <> 0
+ AND forum_id = 0';
+ $this->db->sql_query($sql);
+ $role_id = (int) $this->db->sql_fetchfield('auth_role_id');
+ if ($role_id)
+ {
+ $sql = 'SELECT role_name
+ FROM ' . ACL_ROLES_TABLE . '
+ WHERE role_id = ' . $role_id;
+ $this->db->sql_query($sql);
+ $role_name = $this->db->sql_fetchfield('role_name');
+
+ return $this->permission_set($role_name, $auth_option, 'role', $has_permission);
+ }
+
+ $sql = 'SELECT auth_option_id, auth_setting
+ FROM ' . ACL_GROUPS_TABLE . '
+ WHERE group_id = ' . $group_id;
+ $result = $this->db->sql_query($sql);
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ $current_auth[$row['auth_option_id']] = $row['auth_setting'];
+ }
+ $this->db->sql_freeresult($result);
+ break;
+ }
+
+ $sql_ary = array();
+ switch ($type)
+ {
+ case 'role':
+ foreach ($new_auth as $auth_option_id)
+ {
+ if (!isset($current_auth[$auth_option_id]))
+ {
+ $sql_ary[] = array(
+ 'role_id' => $role_id,
+ 'auth_option_id' => $auth_option_id,
+ 'auth_setting' => $has_permission,
+ );
+ }
+ }
+
+ $this->db->sql_multi_insert(ACL_ROLES_DATA_TABLE, $sql_ary);
+ break;
+
+ case 'group':
+ foreach ($new_auth as $auth_option_id)
+ {
+ if (!isset($current_auth[$auth_option_id]))
+ {
+ $sql_ary[] = array(
+ 'group_id' => $group_id,
+ 'auth_option_id' => $auth_option_id,
+ 'auth_setting' => $has_permission,
+ );
+ }
+ }
+
+ $this->db->sql_multi_insert(ACL_GROUPS_TABLE, $sql_ary);
+ break;
+ }
+
+ $this->auth->acl_clear_prefetch();
+ }
+
+ /**
+ * Permission Unset
+ *
+ * Allows you to unset (remove) permissions for a certain group/role
+ *
+ * @param string $name The name of the role/group
+ * @param string|array $auth_option The auth_option or array of
+ * auth_options you would like to set
+ * @param string $type The type (role|group)
+ * @return null
+ */
+ public function permission_unset($name, $auth_option, $type = 'role')
+ {
+ if (!is_array($auth_option))
+ {
+ $auth_option = array($auth_option);
+ }
+
+ $to_remove = array();
+ $sql = 'SELECT auth_option_id
+ FROM ' . ACL_OPTIONS_TABLE . '
+ WHERE ' . $this->db->sql_in_set('auth_option', $auth_option);
+ $result = $this->db->sql_query($sql);
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ $to_remove[] = (int) $row['auth_option_id'];
+ }
+ $this->db->sql_freeresult($result);
+
+ if (empty($to_remove))
+ {
+ return;
+ }
+
+ $type = (string) $type; // Prevent PHP bug.
+
+ switch ($type)
+ {
+ case 'role':
+ $sql = 'SELECT role_id
+ FROM ' . ACL_ROLES_TABLE . "
+ WHERE role_name = '" . $this->db->sql_escape($name) . "'";
+ $this->db->sql_query($sql);
+ $role_id = (int) $this->db->sql_fetchfield('role_id');
+
+ if (!$role_id)
+ {
+ throw new \phpbb\db\migration\exception('ROLE_NOT_EXIST', $name);
+ }
+
+ $sql = 'DELETE FROM ' . ACL_ROLES_DATA_TABLE . '
+ WHERE ' . $this->db->sql_in_set('auth_option_id', $to_remove);
+ $this->db->sql_query($sql);
+ break;
+
+ case 'group':
+ $sql = 'SELECT group_id
+ FROM ' . GROUPS_TABLE . "
+ WHERE group_name = '" . $this->db->sql_escape($name) . "'";
+ $this->db->sql_query($sql);
+ $group_id = (int) $this->db->sql_fetchfield('group_id');
+
+ if (!$group_id)
+ {
+ throw new \phpbb\db\migration\exception('GROUP_NOT_EXIST', $name);
+ }
+
+ // If the group has a role set for them we will remove the requested permissions from that role.
+ $sql = 'SELECT auth_role_id
+ FROM ' . ACL_GROUPS_TABLE . '
+ WHERE group_id = ' . $group_id . '
+ AND auth_role_id <> 0';
+ $this->db->sql_query($sql);
+ $role_id = (int) $this->db->sql_fetchfield('auth_role_id');
+ if ($role_id)
+ {
+ $sql = 'SELECT role_name
+ FROM ' . ACL_ROLES_TABLE . '
+ WHERE role_id = ' . $role_id;
+ $this->db->sql_query($sql);
+ $role_name = $this->db->sql_fetchfield('role_name');
+
+ return $this->permission_unset($role_name, $auth_option, 'role');
+ }
+
+ $sql = 'DELETE FROM ' . ACL_GROUPS_TABLE . '
+ WHERE ' . $this->db->sql_in_set('auth_option_id', $to_remove);
+ $this->db->sql_query($sql);
+ break;
+ }
+
+ $this->auth->acl_clear_prefetch();
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function reverse()
+ {
+ $arguments = func_get_args();
+ $original_call = array_shift($arguments);
+
+ $call = false;
+ switch ($original_call)
+ {
+ case 'add':
+ $call = 'remove';
+ break;
+
+ case 'remove':
+ $call = 'add';
+ break;
+
+ case 'permission_set':
+ $call = 'permission_unset';
+ break;
+
+ case 'permission_unset':
+ $call = 'permission_set';
+ break;
+
+ case 'role_add':
+ $call = 'role_remove';
+ break;
+
+ case 'role_remove':
+ $call = 'role_add';
+ break;
+
+ case 'role_update':
+ // Set to the original value if the current value is what we compared to originally
+ $arguments = array(
+ $arguments[1],
+ $arguments[0],
+ );
+ break;
+ }
+
+ if ($call)
+ {
+ return call_user_func_array(array(&$this, $call), $arguments);
+ }
+ }
+}
diff --git a/phpBB/phpbb/db/migration/tool/tool_interface.php b/phpBB/phpbb/db/migration/tool/tool_interface.php
new file mode 100644
index 0000000000..e7b89d8858
--- /dev/null
+++ b/phpBB/phpbb/db/migration/tool/tool_interface.php
@@ -0,0 +1,35 @@
+<?php
+/**
+*
+* @package migration
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License v2
+*
+*/
+
+namespace phpbb\db\migration\tool;
+
+/**
+* Migration tool interface
+*
+* @package db
+*/
+interface tool_interface
+{
+ /**
+ * Retrieve a short name used for commands in migrations.
+ *
+ * @return string short name
+ */
+ public function get_name();
+
+ /**
+ * Reverse an original install action
+ *
+ * First argument is the original call to the class (e.g. add, remove)
+ * After the first argument, send the original arguments to the function in the original call
+ *
+ * @return null
+ */
+ public function reverse();
+}
diff --git a/phpBB/phpbb/db/migrator.php b/phpBB/phpbb/db/migrator.php
new file mode 100644
index 0000000000..4fb3f1a241
--- /dev/null
+++ b/phpBB/phpbb/db/migrator.php
@@ -0,0 +1,757 @@
+<?php
+/**
+*
+* @package db
+* @copyright (c) 2011 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+namespace phpbb\db;
+
+/**
+* The migrator is responsible for applying new migrations in the correct order.
+*
+* @package db
+*/
+class migrator
+{
+ /** @var \phpbb\config\config */
+ protected $config;
+
+ /** @var \phpbb\db\driver\driver */
+ protected $db;
+
+ /** @var \phpbb\db\tools */
+ protected $db_tools;
+
+ /** @var \phpbb\db\migration\helper */
+ protected $helper;
+
+ /** @var string */
+ protected $table_prefix;
+
+ /** @var string */
+ protected $phpbb_root_path;
+
+ /** @var string */
+ protected $php_ext;
+
+ /** @var string */
+ protected $migrations_table;
+
+ /**
+ * State of all migrations
+ *
+ * (SELECT * FROM migrations table)
+ *
+ * @var array
+ */
+ protected $migration_state = array();
+
+ /**
+ * Array of all migrations available to be run
+ *
+ * @var array
+ */
+ protected $migrations = array();
+
+ /**
+ * 'name,' 'class,' and 'state' of the last migration run
+ *
+ * 'effectively_installed' set and set to true if the migration was effectively_installed
+ *
+ * @var array
+ */
+ public $last_run_migration = false;
+
+ /**
+ * Constructor of the database migrator
+ */
+ public function __construct(\phpbb\config\config $config, \phpbb\db\driver\driver $db, \phpbb\db\tools $db_tools, $migrations_table, $phpbb_root_path, $php_ext, $table_prefix, $tools, \phpbb\db\migration\helper $helper)
+ {
+ $this->config = $config;
+ $this->db = $db;
+ $this->db_tools = $db_tools;
+ $this->helper = $helper;
+
+ $this->migrations_table = $migrations_table;
+
+ $this->phpbb_root_path = $phpbb_root_path;
+ $this->php_ext = $php_ext;
+
+ $this->table_prefix = $table_prefix;
+
+ foreach ($tools as $tool)
+ {
+ $this->tools[$tool->get_name()] = $tool;
+ }
+
+ $this->tools['dbtools'] = $this->db_tools;
+
+ $this->load_migration_state();
+ }
+
+ /**
+ * Loads all migrations and their application state from the database.
+ *
+ * @return null
+ */
+ public function load_migration_state()
+ {
+ $this->migration_state = array();
+
+ // prevent errors in case the table does not exist yet
+ $this->db->sql_return_on_error(true);
+
+ $sql = "SELECT *
+ FROM " . $this->migrations_table;
+ $result = $this->db->sql_query($sql);
+
+ if (!$this->db->sql_error_triggered)
+ {
+ while ($migration = $this->db->sql_fetchrow($result))
+ {
+ $this->migration_state[$migration['migration_name']] = $migration;
+
+ $this->migration_state[$migration['migration_name']]['migration_depends_on'] = unserialize($migration['migration_depends_on']);
+ }
+ }
+
+ $this->db->sql_freeresult($result);
+
+ $this->db->sql_return_on_error(false);
+ }
+
+ /**
+ * Sets the list of available migration class names to the given array.
+ *
+ * @param array $class_names An array of migration class names
+ * @return null
+ */
+ public function set_migrations($class_names)
+ {
+ $this->migrations = $class_names;
+ }
+
+ /**
+ * Runs a single update step from the next migration to be applied.
+ *
+ * The update step can either be a schema or a (partial) data update. To
+ * check if update() needs to be called again use the finished() method.
+ *
+ * @return null
+ */
+ public function update()
+ {
+ foreach ($this->migrations as $name)
+ {
+ if (!isset($this->migration_state[$name]) ||
+ !$this->migration_state[$name]['migration_schema_done'] ||
+ !$this->migration_state[$name]['migration_data_done'])
+ {
+ if (!$this->try_apply($name))
+ {
+ continue;
+ }
+ else
+ {
+ return;
+ }
+ }
+ }
+ }
+
+ /**
+ * Attempts to apply a step of the given migration or one of its dependencies
+ *
+ * @param string The class name of the migration
+ * @return bool Whether any update step was successfully run
+ */
+ protected function try_apply($name)
+ {
+ if (!class_exists($name))
+ {
+ return false;
+ }
+
+ $migration = $this->get_migration($name);
+
+ $state = (isset($this->migration_state[$name])) ?
+ $this->migration_state[$name] :
+ array(
+ 'migration_depends_on' => $migration->depends_on(),
+ 'migration_schema_done' => false,
+ 'migration_data_done' => false,
+ 'migration_data_state' => '',
+ 'migration_start_time' => 0,
+ 'migration_end_time' => 0,
+ );
+
+ foreach ($state['migration_depends_on'] as $depend)
+ {
+ if ($this->unfulfillable($depend) !== false)
+ {
+ throw new \phpbb\db\migration\exception('MIGRATION_NOT_FULFILLABLE', $name, $depend);
+ }
+
+ if (!isset($this->migration_state[$depend]) ||
+ !$this->migration_state[$depend]['migration_schema_done'] ||
+ !$this->migration_state[$depend]['migration_data_done'])
+ {
+ return $this->try_apply($depend);
+ }
+ }
+
+ $this->last_run_migration = array(
+ 'name' => $name,
+ 'class' => $migration,
+ 'state' => $state,
+ 'task' => '',
+ );
+
+ if (!isset($this->migration_state[$name]))
+ {
+ if ($state['migration_start_time'] == 0 && $migration->effectively_installed())
+ {
+ $state = array(
+ 'migration_depends_on' => $migration->depends_on(),
+ 'migration_schema_done' => true,
+ 'migration_data_done' => true,
+ 'migration_data_state' => '',
+ 'migration_start_time' => 0,
+ 'migration_end_time' => 0,
+ );
+
+ $this->last_run_migration['effectively_installed'] = true;
+ }
+ else
+ {
+ $state['migration_start_time'] = time();
+ }
+ }
+
+ $this->set_migration_state($name, $state);
+
+ if (!$state['migration_schema_done'])
+ {
+ $this->last_run_migration['task'] = 'process_schema_step';
+ $steps = $this->helper->get_schema_steps($migration->update_schema());
+ $result = $this->process_data_step($steps, $state['migration_data_state']);
+
+ $state['migration_data_state'] = ($result === true) ? '' : $result;
+ $state['migration_schema_done'] = ($result === true);
+ }
+ else if (!$state['migration_data_done'])
+ {
+ try
+ {
+ $this->last_run_migration['task'] = 'process_data_step';
+ $result = $this->process_data_step($migration->update_data(), $state['migration_data_state']);
+
+ $state['migration_data_state'] = ($result === true) ? '' : $result;
+ $state['migration_data_done'] = ($result === true);
+ $state['migration_end_time'] = ($result === true) ? time() : 0;
+ }
+ catch (\phpbb\db\migration\exception $e)
+ {
+ // Revert the schema changes
+ $this->revert($name);
+
+ // Rethrow exception
+ throw $e;
+ }
+ }
+
+ $this->set_migration_state($name, $state);
+
+ return true;
+ }
+
+ /**
+ * Runs a single revert step from the last migration installed
+ *
+ * YOU MUST ADD/SET ALL MIGRATIONS THAT COULD BE DEPENDENT ON THE MIGRATION TO REVERT TO BEFORE CALLING THIS METHOD!
+ * The revert step can either be a schema or a (partial) data revert. To
+ * check if revert() needs to be called again use the migration_state() method.
+ *
+ * @param string $migration String migration name to revert (including any that depend on this migration)
+ * @return null
+ */
+ public function revert($migration)
+ {
+ if (!isset($this->migration_state[$migration]))
+ {
+ // Not installed
+ return;
+ }
+
+ foreach ($this->migration_state as $name => $state)
+ {
+ if (!empty($state['migration_depends_on']) && in_array($migration, $state['migration_depends_on']))
+ {
+ $this->revert($name);
+ }
+ }
+
+ $this->try_revert($migration);
+ }
+
+ /**
+ * Attempts to revert a step of the given migration or one of its dependencies
+ *
+ * @param string The class name of the migration
+ * @return bool Whether any update step was successfully run
+ */
+ protected function try_revert($name)
+ {
+ if (!class_exists($name))
+ {
+ return false;
+ }
+
+ $migration = $this->get_migration($name);
+
+ $state = $this->migration_state[$name];
+
+ $this->last_run_migration = array(
+ 'name' => $name,
+ 'class' => $migration,
+ 'task' => '',
+ );
+
+ if ($state['migration_data_done'])
+ {
+ if ($state['migration_data_state'] !== 'revert_data')
+ {
+ $result = $this->process_data_step($migration->update_data(), $state['migration_data_state'], true);
+
+ $state['migration_data_state'] = ($result === true) ? 'revert_data' : $result;
+ }
+ else
+ {
+ $result = $this->process_data_step($migration->revert_data(), '', false);
+
+ $state['migration_data_state'] = ($result === true) ? '' : $result;
+ $state['migration_data_done'] = ($result === true) ? false : true;
+ }
+
+ $this->set_migration_state($name, $state);
+ }
+ else if ($state['migration_schema_done'])
+ {
+ $steps = $this->helper->get_schema_steps($migration->revert_schema());
+ $result = $this->process_data_step($steps, $state['migration_data_state']);
+
+ $state['migration_data_state'] = ($result === true) ? '' : $result;
+ $state['migration_schema_done'] = ($result === true) ? false : true;
+
+ if (!$state['migration_schema_done'])
+ {
+ $sql = 'DELETE FROM ' . $this->migrations_table . "
+ WHERE migration_name = '" . $this->db->sql_escape($name) . "'";
+ $this->db->sql_query($sql);
+
+ unset($this->migration_state[$name]);
+ }
+ }
+
+ return true;
+ }
+
+ /**
+ * Process the data step of the migration
+ *
+ * @param array $steps The steps to run
+ * @param bool|string $state Current state of the migration
+ * @param bool $revert true to revert a data step
+ * @return bool|string migration state. True if completed, serialized array if not finished
+ */
+ protected function process_data_step($steps, $state, $revert = false)
+ {
+ $state = ($state) ? unserialize($state) : false;
+
+ // reverse order of steps if reverting
+ if ($revert === true)
+ {
+ $steps = array_reverse($steps);
+ }
+
+ foreach ($steps as $step_identifier => $step)
+ {
+ $last_result = 0;
+ if ($state)
+ {
+ // Continue until we reach the step that matches the last step called
+ if ($state['step'] != $step_identifier)
+ {
+ continue;
+ }
+
+ // We send the result from last time to the callable function
+ $last_result = $state['result'];
+
+ // Set state to false since we reached the point we were at
+ $state = false;
+ }
+
+ try
+ {
+ // Result will be null or true if everything completed correctly
+ $result = $this->run_step($step, $last_result, $revert);
+ if ($result !== null && $result !== true)
+ {
+ return serialize(array(
+ 'result' => $result,
+ 'step' => $step_identifier,
+ ));
+ }
+ }
+ catch (\phpbb\db\migration\exception $e)
+ {
+ // We should try rolling back here
+ foreach ($steps as $reverse_step_identifier => $reverse_step)
+ {
+ // If we've reached the current step we can break because we reversed everything that was run
+ if ($reverse_step_identifier == $step_identifier)
+ {
+ break;
+ }
+
+ // Reverse the step that was run
+ $result = $this->run_step($reverse_step, false, !$revert);
+ }
+
+ // rethrow the exception
+ throw $e;
+ }
+ }
+
+ return true;
+ }
+
+ /**
+ * Run a single step
+ *
+ * An exception should be thrown if an error occurs
+ *
+ * @param mixed $step Data step from migration
+ * @param mixed $last_result Result to pass to the callable (only for 'custom' method)
+ * @param bool $reverse False to install, True to attempt uninstallation by reversing the call
+ * @return null
+ */
+ protected function run_step($step, $last_result = 0, $reverse = false)
+ {
+ $callable_and_parameters = $this->get_callable_from_step($step, $last_result, $reverse);
+
+ if ($callable_and_parameters === false)
+ {
+ return;
+ }
+
+ $callable = $callable_and_parameters[0];
+ $parameters = $callable_and_parameters[1];
+
+ return call_user_func_array($callable, $parameters);
+ }
+
+ /**
+ * Get a callable statement from a data step
+ *
+ * @param array $step Data step from migration
+ * @param mixed $last_result Result to pass to the callable (only for 'custom' method)
+ * @param bool $reverse False to install, True to attempt uninstallation by reversing the call
+ * @return array Array with parameters for call_user_func_array(), 0 is the callable, 1 is parameters
+ */
+ protected function get_callable_from_step(array $step, $last_result = 0, $reverse = false)
+ {
+ $type = $step[0];
+ $parameters = $step[1];
+
+ $parts = explode('.', $type);
+
+ $class = $parts[0];
+ $method = false;
+
+ if (isset($parts[1]))
+ {
+ $method = $parts[1];
+ }
+
+ switch ($class)
+ {
+ case 'if':
+ if (!isset($parameters[0]))
+ {
+ throw new \phpbb\db\migration\exception('MIGRATION_INVALID_DATA_MISSING_CONDITION', $step);
+ }
+
+ if (!isset($parameters[1]))
+ {
+ throw new \phpbb\db\migration\exception('MIGRATION_INVALID_DATA_MISSING_STEP', $step);
+ }
+
+ $condition = $parameters[0];
+
+ if (!$condition)
+ {
+ return false;
+ }
+
+ $step = $parameters[1];
+
+ return $this->get_callable_from_step($step);
+ break;
+
+ case 'custom':
+ if (!is_callable($parameters[0]))
+ {
+ throw new \phpbb\db\migration\exception('MIGRATION_INVALID_DATA_CUSTOM_NOT_CALLABLE', $step);
+ }
+
+ return array(
+ $parameters[0],
+ array($last_result),
+ );
+ break;
+
+ default:
+ if (!$method)
+ {
+ throw new \phpbb\db\migration\exception('MIGRATION_INVALID_DATA_UNKNOWN_TYPE', $step);
+ }
+
+ if (!isset($this->tools[$class]))
+ {
+ throw new \phpbb\db\migration\exception('MIGRATION_INVALID_DATA_UNDEFINED_TOOL', $step);
+ }
+
+ if (!method_exists(get_class($this->tools[$class]), $method))
+ {
+ throw new \phpbb\db\migration\exception('MIGRATION_INVALID_DATA_UNDEFINED_METHOD', $step);
+ }
+
+ // Attempt to reverse operations
+ if ($reverse)
+ {
+ array_unshift($parameters, $method);
+
+ return array(
+ array($this->tools[$class], 'reverse'),
+ $parameters,
+ );
+ }
+
+ return array(
+ array($this->tools[$class], $method),
+ $parameters,
+ );
+ break;
+ }
+ }
+
+ /**
+ * Insert/Update migration row into the database
+ *
+ * @param string $name Name of the migration
+ * @param array $state
+ * @return null
+ */
+ protected function set_migration_state($name, $state)
+ {
+ $migration_row = $state;
+ $migration_row['migration_depends_on'] = serialize($state['migration_depends_on']);
+
+ if (isset($this->migration_state[$name]))
+ {
+ $sql = 'UPDATE ' . $this->migrations_table . '
+ SET ' . $this->db->sql_build_array('UPDATE', $migration_row) . "
+ WHERE migration_name = '" . $this->db->sql_escape($name) . "'";
+ $this->db->sql_query($sql);
+ }
+ else
+ {
+ $migration_row['migration_name'] = $name;
+ $sql = 'INSERT INTO ' . $this->migrations_table . '
+ ' . $this->db->sql_build_array('INSERT', $migration_row);
+ $this->db->sql_query($sql);
+ }
+
+ $this->migration_state[$name] = $state;
+
+ $this->last_run_migration['state'] = $state;
+ }
+
+ /**
+ * Checks if a migration's dependencies can even theoretically be satisfied.
+ *
+ * @param string $name The class name of the migration
+ * @return bool|string False if fulfillable, string of missing migration name if unfulfillable
+ */
+ public function unfulfillable($name)
+ {
+ if (isset($this->migration_state[$name]))
+ {
+ return false;
+ }
+
+ if (!class_exists($name))
+ {
+ return $name;
+ }
+
+ $migration = $this->get_migration($name);
+ $depends = $migration->depends_on();
+
+ foreach ($depends as $depend)
+ {
+ $unfulfillable = $this->unfulfillable($depend);
+ if ($unfulfillable !== false)
+ {
+ return $unfulfillable;
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Checks whether all available, fulfillable migrations have been applied.
+ *
+ * @return bool Whether the migrations have been applied
+ */
+ public function finished()
+ {
+ foreach ($this->migrations as $name)
+ {
+ if (!isset($this->migration_state[$name]))
+ {
+ // skip unfulfillable migrations, but fulfillables mean we
+ // are not finished yet
+ if ($this->unfulfillable($name) !== false)
+ {
+ continue;
+ }
+
+ return false;
+ }
+
+ $migration = $this->migration_state[$name];
+
+ if (!$migration['migration_schema_done'] || !$migration['migration_data_done'])
+ {
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ /**
+ * Gets a migration state (whether it is installed and to what extent)
+ *
+ * @param string $migration String migration name to check if it is installed
+ * @return bool|array False if the migration has not at all been installed, array
+ */
+ public function migration_state($migration)
+ {
+ if (!isset($this->migration_state[$migration]))
+ {
+ return false;
+ }
+
+ return $this->migration_state[$migration];
+ }
+
+ /**
+ * Helper to get a migration
+ *
+ * @param string $name Name of the migration
+ * @return \phpbb\db\migration\migration
+ */
+ protected function get_migration($name)
+ {
+ return new $name($this->config, $this->db, $this->db_tools, $this->phpbb_root_path, $this->php_ext, $this->table_prefix);
+ }
+
+ /**
+ * This function adds all migrations sent to it to the migrations table
+ *
+ * THIS SHOULD NOT GENERALLY BE USED! THIS IS FOR THE PHPBB INSTALLER.
+ * THIS WILL THROW ERRORS IF MIGRATIONS ALREADY EXIST IN THE TABLE, DO NOT CALL MORE THAN ONCE!
+ *
+ * @param array $migrations Array of migrations (names) to add to the migrations table
+ * @return null
+ */
+ public function populate_migrations($migrations)
+ {
+ foreach ($migrations as $name)
+ {
+ if ($this->migration_state($name) === false)
+ {
+ $state = array(
+ 'migration_depends_on' => $name::depends_on(),
+ 'migration_schema_done' => true,
+ 'migration_data_done' => true,
+ 'migration_data_state' => '',
+ 'migration_start_time' => time(),
+ 'migration_end_time' => time(),
+ );
+ $this->set_migration_state($name, $state);
+ }
+ }
+ }
+
+ /**
+ * Load migration data files from a directory
+ *
+ * @param \phpbb\extension\finder $finder
+ * @param string $path Path to migration data files
+ * @param bool $check_fulfillable If TRUE (default), we will check
+ * if all of the migrations are fulfillable after loading them.
+ * If FALSE, we will not check. You SHOULD check at least once
+ * to prevent errors (if including multiple directories, check
+ * with the last call to prevent throwing errors unnecessarily).
+ * @return array Array of migration names
+ */
+ public function load_migrations(\phpbb\extension\finder $finder, $path, $check_fulfillable = true)
+ {
+ if (!is_dir($path))
+ {
+ throw new \phpbb\db\migration\exception('DIRECTORY INVALID', $path);
+ }
+
+ $migrations = array();
+
+ $files = $finder
+ ->extension_directory("/")
+ ->find_from_paths(array('/' => $path));
+ foreach ($files as $file)
+ {
+ $migrations[$file['path'] . $file['filename']] = '';
+ }
+ $migrations = $finder->get_classes_from_files($migrations);
+
+ foreach ($migrations as $migration)
+ {
+ if (!in_array($migration, $this->migrations))
+ {
+ $this->migrations[] = $migration;
+ }
+ }
+
+ if ($check_fulfillable)
+ {
+ foreach ($this->migrations as $name)
+ {
+ $unfulfillable = $this->unfulfillable($name);
+ if ($unfulfillable !== false)
+ {
+ throw new \phpbb\db\migration\exception('MIGRATION_NOT_FULFILLABLE', $name, $unfulfillable);
+ }
+ }
+ }
+
+ return $this->migrations;
+ }
+}
diff --git a/phpBB/phpbb/db/sql_insert_buffer.php b/phpBB/phpbb/db/sql_insert_buffer.php
new file mode 100644
index 0000000000..41026ad425
--- /dev/null
+++ b/phpBB/phpbb/db/sql_insert_buffer.php
@@ -0,0 +1,144 @@
+<?php
+/**
+*
+* @package dbal
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\db;
+
+/**
+* Collects rows for insert into a database until the buffer size is reached.
+* Then flushes the buffer to the database and starts over again.
+*
+* Benefits over collecting a (possibly huge) insert array and then using
+* $db->sql_multi_insert() include:
+*
+* - Going over max packet size of the database connection is usually prevented
+* because the data is submitted in batches.
+*
+* - Reaching database connection timeout is usually prevented because
+* submission of batches talks to the database every now and then.
+*
+* - Usage of less PHP memory because data no longer needed is discarded on
+* buffer flush.
+*
+* Attention:
+* Please note that users of this class have to call flush() to flush the
+* remaining rows to the database after their batch insert operation is
+* finished.
+*
+* Usage:
+* <code>
+* $buffer = new \phpbb\db\sql_insert_buffer($db, 'test_table', 1234);
+*
+* while (do_stuff())
+* {
+* $buffer->insert(array(
+* 'column1' => 'value1',
+* 'column2' => 'value2',
+* ));
+* }
+*
+* $buffer->flush();
+* </code>
+*
+* @package dbal
+*/
+class sql_insert_buffer
+{
+ /** @var \phpbb\db\driver\driver */
+ protected $db;
+
+ /** @var string */
+ protected $table_name;
+
+ /** @var int */
+ protected $max_buffered_rows;
+
+ /** @var array */
+ protected $buffer = array();
+
+ /**
+ * @param \phpbb\db\driver\driver $db
+ * @param string $table_name
+ * @param int $max_buffered_rows
+ */
+ public function __construct(\phpbb\db\driver\driver $db, $table_name, $max_buffered_rows = 500)
+ {
+ $this->db = $db;
+ $this->table_name = $table_name;
+ $this->max_buffered_rows = $max_buffered_rows;
+ }
+
+ /**
+ * Inserts a single row into the buffer if multi insert is supported by the
+ * database (otherwise an insert query is sent immediately). Then flushes
+ * the buffer if the number of rows in the buffer is now greater than or
+ * equal to $max_buffered_rows.
+ *
+ * @param array $row
+ *
+ * @return bool True when some data was flushed to the database.
+ * False otherwise.
+ */
+ public function insert(array $row)
+ {
+ $this->buffer[] = $row;
+
+ // Flush buffer if it is full or when DB does not support multi inserts.
+ // In the later case, the buffer will always only contain one row.
+ if (!$this->db->multi_insert || sizeof($this->buffer) >= $this->max_buffered_rows)
+ {
+ return $this->flush();
+ }
+
+ return false;
+ }
+
+ /**
+ * Inserts a row set, i.e. an array of rows, by calling insert().
+ *
+ * Please note that it is in most cases better to use insert() instead of
+ * first building a huge rowset. Or at least sizeof($rows) should be kept
+ * small.
+ *
+ * @param array $rows
+ *
+ * @return bool True when some data was flushed to the database.
+ * False otherwise.
+ */
+ public function insert_all(array $rows)
+ {
+ // Using bitwise |= because PHP does not have logical ||=
+ $result = 0;
+
+ foreach ($rows as $row)
+ {
+ $result |= (int) $this->insert($row);
+ }
+
+ return (bool) $result;
+ }
+
+ /**
+ * Flushes the buffer content to the DB and clears the buffer.
+ *
+ * @return bool True when some data was flushed to the database.
+ * False otherwise.
+ */
+ public function flush()
+ {
+ if (!empty($this->buffer))
+ {
+ $this->db->sql_multi_insert($this->table_name, $this->buffer);
+ $this->buffer = array();
+
+ return true;
+ }
+
+ return false;
+ }
+}
diff --git a/phpBB/includes/db/db_tools.php b/phpBB/phpbb/db/tools.php
index 8dce769395..8631c11d0e 100644
--- a/phpBB/includes/db/db_tools.php
+++ b/phpBB/phpbb/db/tools.php
@@ -2,28 +2,20 @@
/**
*
* @package dbal
-* @version $Id$
* @copyright (c) 2007 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
-/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
+namespace phpbb\db;
/**
* Database Tools for handling cross-db actions such as altering columns, etc.
* Currently not supported is returning SQL for creating tables.
*
* @package dbal
-* @note currently not used within phpBB3, but may be utilized later.
*/
-class phpbb_db_tools
+class tools
{
/**
* Current sql layer
@@ -33,253 +25,263 @@ class phpbb_db_tools
/**
* @var object DB object
*/
- var $db = NULL;
+ var $db = null;
/**
* The Column types for every database we support
* @var array
*/
- var $dbms_type_map = array(
- 'mysql_41' => array(
- 'INT:' => 'int(%d)',
- 'BINT' => 'bigint(20)',
- 'UINT' => 'mediumint(8) UNSIGNED',
- 'UINT:' => 'int(%d) UNSIGNED',
- 'TINT:' => 'tinyint(%d)',
- 'USINT' => 'smallint(4) UNSIGNED',
- 'BOOL' => 'tinyint(1) UNSIGNED',
- 'VCHAR' => 'varchar(255)',
- 'VCHAR:' => 'varchar(%d)',
- 'CHAR:' => 'char(%d)',
- 'XSTEXT' => 'text',
- 'XSTEXT_UNI'=> 'varchar(100)',
- 'STEXT' => 'text',
- 'STEXT_UNI' => 'varchar(255)',
- 'TEXT' => 'text',
- 'TEXT_UNI' => 'text',
- 'MTEXT' => 'mediumtext',
- 'MTEXT_UNI' => 'mediumtext',
- 'TIMESTAMP' => 'int(11) UNSIGNED',
- 'DECIMAL' => 'decimal(5,2)',
- 'DECIMAL:' => 'decimal(%d,2)',
- 'PDECIMAL' => 'decimal(6,3)',
- 'PDECIMAL:' => 'decimal(%d,3)',
- 'VCHAR_UNI' => 'varchar(255)',
- 'VCHAR_UNI:'=> 'varchar(%d)',
- 'VCHAR_CI' => 'varchar(255)',
- 'VARBINARY' => 'varbinary(255)',
- ),
-
- 'mysql_40' => array(
- 'INT:' => 'int(%d)',
- 'BINT' => 'bigint(20)',
- 'UINT' => 'mediumint(8) UNSIGNED',
- 'UINT:' => 'int(%d) UNSIGNED',
- 'TINT:' => 'tinyint(%d)',
- 'USINT' => 'smallint(4) UNSIGNED',
- 'BOOL' => 'tinyint(1) UNSIGNED',
- 'VCHAR' => 'varbinary(255)',
- 'VCHAR:' => 'varbinary(%d)',
- 'CHAR:' => 'binary(%d)',
- 'XSTEXT' => 'blob',
- 'XSTEXT_UNI'=> 'blob',
- 'STEXT' => 'blob',
- 'STEXT_UNI' => 'blob',
- 'TEXT' => 'blob',
- 'TEXT_UNI' => 'blob',
- 'MTEXT' => 'mediumblob',
- 'MTEXT_UNI' => 'mediumblob',
- 'TIMESTAMP' => 'int(11) UNSIGNED',
- 'DECIMAL' => 'decimal(5,2)',
- 'DECIMAL:' => 'decimal(%d,2)',
- 'PDECIMAL' => 'decimal(6,3)',
- 'PDECIMAL:' => 'decimal(%d,3)',
- 'VCHAR_UNI' => 'blob',
- 'VCHAR_UNI:'=> array('varbinary(%d)', 'limit' => array('mult', 3, 255, 'blob')),
- 'VCHAR_CI' => 'blob',
- 'VARBINARY' => 'varbinary(255)',
- ),
-
- 'firebird' => array(
- 'INT:' => 'INTEGER',
- 'BINT' => 'DOUBLE PRECISION',
- 'UINT' => 'INTEGER',
- 'UINT:' => 'INTEGER',
- 'TINT:' => 'INTEGER',
- 'USINT' => 'INTEGER',
- 'BOOL' => 'INTEGER',
- 'VCHAR' => 'VARCHAR(255) CHARACTER SET NONE',
- 'VCHAR:' => 'VARCHAR(%d) CHARACTER SET NONE',
- 'CHAR:' => 'CHAR(%d) CHARACTER SET NONE',
- 'XSTEXT' => 'BLOB SUB_TYPE TEXT CHARACTER SET NONE',
- 'STEXT' => 'BLOB SUB_TYPE TEXT CHARACTER SET NONE',
- 'TEXT' => 'BLOB SUB_TYPE TEXT CHARACTER SET NONE',
- 'MTEXT' => 'BLOB SUB_TYPE TEXT CHARACTER SET NONE',
- 'XSTEXT_UNI'=> 'VARCHAR(100) CHARACTER SET UTF8',
- 'STEXT_UNI' => 'VARCHAR(255) CHARACTER SET UTF8',
- 'TEXT_UNI' => 'BLOB SUB_TYPE TEXT CHARACTER SET UTF8',
- 'MTEXT_UNI' => 'BLOB SUB_TYPE TEXT CHARACTER SET UTF8',
- 'TIMESTAMP' => 'INTEGER',
- 'DECIMAL' => 'DOUBLE PRECISION',
- 'DECIMAL:' => 'DOUBLE PRECISION',
- 'PDECIMAL' => 'DOUBLE PRECISION',
- 'PDECIMAL:' => 'DOUBLE PRECISION',
- 'VCHAR_UNI' => 'VARCHAR(255) CHARACTER SET UTF8',
- 'VCHAR_UNI:'=> 'VARCHAR(%d) CHARACTER SET UTF8',
- 'VCHAR_CI' => 'VARCHAR(255) CHARACTER SET UTF8',
- 'VARBINARY' => 'CHAR(255) CHARACTER SET NONE',
- ),
-
- 'mssql' => array(
- 'INT:' => '[int]',
- 'BINT' => '[float]',
- 'UINT' => '[int]',
- 'UINT:' => '[int]',
- 'TINT:' => '[int]',
- 'USINT' => '[int]',
- 'BOOL' => '[int]',
- 'VCHAR' => '[varchar] (255)',
- 'VCHAR:' => '[varchar] (%d)',
- 'CHAR:' => '[char] (%d)',
- 'XSTEXT' => '[varchar] (1000)',
- 'STEXT' => '[varchar] (3000)',
- 'TEXT' => '[varchar] (8000)',
- 'MTEXT' => '[text]',
- 'XSTEXT_UNI'=> '[varchar] (100)',
- 'STEXT_UNI' => '[varchar] (255)',
- 'TEXT_UNI' => '[varchar] (4000)',
- 'MTEXT_UNI' => '[text]',
- 'TIMESTAMP' => '[int]',
- 'DECIMAL' => '[float]',
- 'DECIMAL:' => '[float]',
- 'PDECIMAL' => '[float]',
- 'PDECIMAL:' => '[float]',
- 'VCHAR_UNI' => '[varchar] (255)',
- 'VCHAR_UNI:'=> '[varchar] (%d)',
- 'VCHAR_CI' => '[varchar] (255)',
- 'VARBINARY' => '[varchar] (255)',
- ),
-
- 'mssqlnative' => array(
- 'INT:' => '[int]',
- 'BINT' => '[float]',
- 'UINT' => '[int]',
- 'UINT:' => '[int]',
- 'TINT:' => '[int]',
- 'USINT' => '[int]',
- 'BOOL' => '[int]',
- 'VCHAR' => '[varchar] (255)',
- 'VCHAR:' => '[varchar] (%d)',
- 'CHAR:' => '[char] (%d)',
- 'XSTEXT' => '[varchar] (1000)',
- 'STEXT' => '[varchar] (3000)',
- 'TEXT' => '[varchar] (8000)',
- 'MTEXT' => '[text]',
- 'XSTEXT_UNI'=> '[varchar] (100)',
- 'STEXT_UNI' => '[varchar] (255)',
- 'TEXT_UNI' => '[varchar] (4000)',
- 'MTEXT_UNI' => '[text]',
- 'TIMESTAMP' => '[int]',
- 'DECIMAL' => '[float]',
- 'DECIMAL:' => '[float]',
- 'PDECIMAL' => '[float]',
- 'PDECIMAL:' => '[float]',
- 'VCHAR_UNI' => '[varchar] (255)',
- 'VCHAR_UNI:'=> '[varchar] (%d)',
- 'VCHAR_CI' => '[varchar] (255)',
- 'VARBINARY' => '[varchar] (255)',
- ),
-
- 'oracle' => array(
- 'INT:' => 'number(%d)',
- 'BINT' => 'number(20)',
- 'UINT' => 'number(8)',
- 'UINT:' => 'number(%d)',
- 'TINT:' => 'number(%d)',
- 'USINT' => 'number(4)',
- 'BOOL' => 'number(1)',
- 'VCHAR' => 'varchar2(255)',
- 'VCHAR:' => 'varchar2(%d)',
- 'CHAR:' => 'char(%d)',
- 'XSTEXT' => 'varchar2(1000)',
- 'STEXT' => 'varchar2(3000)',
- 'TEXT' => 'clob',
- 'MTEXT' => 'clob',
- 'XSTEXT_UNI'=> 'varchar2(300)',
- 'STEXT_UNI' => 'varchar2(765)',
- 'TEXT_UNI' => 'clob',
- 'MTEXT_UNI' => 'clob',
- 'TIMESTAMP' => 'number(11)',
- 'DECIMAL' => 'number(5, 2)',
- 'DECIMAL:' => 'number(%d, 2)',
- 'PDECIMAL' => 'number(6, 3)',
- 'PDECIMAL:' => 'number(%d, 3)',
- 'VCHAR_UNI' => 'varchar2(765)',
- 'VCHAR_UNI:'=> array('varchar2(%d)', 'limit' => array('mult', 3, 765, 'clob')),
- 'VCHAR_CI' => 'varchar2(255)',
- 'VARBINARY' => 'raw(255)',
- ),
-
- 'sqlite' => array(
- 'INT:' => 'int(%d)',
- 'BINT' => 'bigint(20)',
- 'UINT' => 'INTEGER UNSIGNED', //'mediumint(8) UNSIGNED',
- 'UINT:' => 'INTEGER UNSIGNED', // 'int(%d) UNSIGNED',
- 'TINT:' => 'tinyint(%d)',
- 'USINT' => 'INTEGER UNSIGNED', //'mediumint(4) UNSIGNED',
- 'BOOL' => 'INTEGER UNSIGNED', //'tinyint(1) UNSIGNED',
- 'VCHAR' => 'varchar(255)',
- 'VCHAR:' => 'varchar(%d)',
- 'CHAR:' => 'char(%d)',
- 'XSTEXT' => 'text(65535)',
- 'STEXT' => 'text(65535)',
- 'TEXT' => 'text(65535)',
- 'MTEXT' => 'mediumtext(16777215)',
- 'XSTEXT_UNI'=> 'text(65535)',
- 'STEXT_UNI' => 'text(65535)',
- 'TEXT_UNI' => 'text(65535)',
- 'MTEXT_UNI' => 'mediumtext(16777215)',
- 'TIMESTAMP' => 'INTEGER UNSIGNED', //'int(11) UNSIGNED',
- 'DECIMAL' => 'decimal(5,2)',
- 'DECIMAL:' => 'decimal(%d,2)',
- 'PDECIMAL' => 'decimal(6,3)',
- 'PDECIMAL:' => 'decimal(%d,3)',
- 'VCHAR_UNI' => 'varchar(255)',
- 'VCHAR_UNI:'=> 'varchar(%d)',
- 'VCHAR_CI' => 'varchar(255)',
- 'VARBINARY' => 'blob',
- ),
-
- 'postgres' => array(
- 'INT:' => 'INT4',
- 'BINT' => 'INT8',
- 'UINT' => 'INT4', // unsigned
- 'UINT:' => 'INT4', // unsigned
- 'USINT' => 'INT2', // unsigned
- 'BOOL' => 'INT2', // unsigned
- 'TINT:' => 'INT2',
- 'VCHAR' => 'varchar(255)',
- 'VCHAR:' => 'varchar(%d)',
- 'CHAR:' => 'char(%d)',
- 'XSTEXT' => 'varchar(1000)',
- 'STEXT' => 'varchar(3000)',
- 'TEXT' => 'varchar(8000)',
- 'MTEXT' => 'TEXT',
- 'XSTEXT_UNI'=> 'varchar(100)',
- 'STEXT_UNI' => 'varchar(255)',
- 'TEXT_UNI' => 'varchar(4000)',
- 'MTEXT_UNI' => 'TEXT',
- 'TIMESTAMP' => 'INT4', // unsigned
- 'DECIMAL' => 'decimal(5,2)',
- 'DECIMAL:' => 'decimal(%d,2)',
- 'PDECIMAL' => 'decimal(6,3)',
- 'PDECIMAL:' => 'decimal(%d,3)',
- 'VCHAR_UNI' => 'varchar(255)',
- 'VCHAR_UNI:'=> 'varchar(%d)',
- 'VCHAR_CI' => 'varchar_ci',
- 'VARBINARY' => 'bytea',
- ),
- );
+ var $dbms_type_map = array();
+
+ /**
+ * Get the column types for every database we support
+ *
+ * @return array
+ */
+ public static function get_dbms_type_map()
+ {
+ return array(
+ 'mysql_41' => array(
+ 'INT:' => 'int(%d)',
+ 'BINT' => 'bigint(20)',
+ 'UINT' => 'mediumint(8) UNSIGNED',
+ 'UINT:' => 'int(%d) UNSIGNED',
+ 'TINT:' => 'tinyint(%d)',
+ 'USINT' => 'smallint(4) UNSIGNED',
+ 'BOOL' => 'tinyint(1) UNSIGNED',
+ 'VCHAR' => 'varchar(255)',
+ 'VCHAR:' => 'varchar(%d)',
+ 'CHAR:' => 'char(%d)',
+ 'XSTEXT' => 'text',
+ 'XSTEXT_UNI'=> 'varchar(100)',
+ 'STEXT' => 'text',
+ 'STEXT_UNI' => 'varchar(255)',
+ 'TEXT' => 'text',
+ 'TEXT_UNI' => 'text',
+ 'MTEXT' => 'mediumtext',
+ 'MTEXT_UNI' => 'mediumtext',
+ 'TIMESTAMP' => 'int(11) UNSIGNED',
+ 'DECIMAL' => 'decimal(5,2)',
+ 'DECIMAL:' => 'decimal(%d,2)',
+ 'PDECIMAL' => 'decimal(6,3)',
+ 'PDECIMAL:' => 'decimal(%d,3)',
+ 'VCHAR_UNI' => 'varchar(255)',
+ 'VCHAR_UNI:'=> 'varchar(%d)',
+ 'VCHAR_CI' => 'varchar(255)',
+ 'VARBINARY' => 'varbinary(255)',
+ ),
+
+ 'mysql_40' => array(
+ 'INT:' => 'int(%d)',
+ 'BINT' => 'bigint(20)',
+ 'UINT' => 'mediumint(8) UNSIGNED',
+ 'UINT:' => 'int(%d) UNSIGNED',
+ 'TINT:' => 'tinyint(%d)',
+ 'USINT' => 'smallint(4) UNSIGNED',
+ 'BOOL' => 'tinyint(1) UNSIGNED',
+ 'VCHAR' => 'varbinary(255)',
+ 'VCHAR:' => 'varbinary(%d)',
+ 'CHAR:' => 'binary(%d)',
+ 'XSTEXT' => 'blob',
+ 'XSTEXT_UNI'=> 'blob',
+ 'STEXT' => 'blob',
+ 'STEXT_UNI' => 'blob',
+ 'TEXT' => 'blob',
+ 'TEXT_UNI' => 'blob',
+ 'MTEXT' => 'mediumblob',
+ 'MTEXT_UNI' => 'mediumblob',
+ 'TIMESTAMP' => 'int(11) UNSIGNED',
+ 'DECIMAL' => 'decimal(5,2)',
+ 'DECIMAL:' => 'decimal(%d,2)',
+ 'PDECIMAL' => 'decimal(6,3)',
+ 'PDECIMAL:' => 'decimal(%d,3)',
+ 'VCHAR_UNI' => 'blob',
+ 'VCHAR_UNI:'=> array('varbinary(%d)', 'limit' => array('mult', 3, 255, 'blob')),
+ 'VCHAR_CI' => 'blob',
+ 'VARBINARY' => 'varbinary(255)',
+ ),
+
+ 'firebird' => array(
+ 'INT:' => 'INTEGER',
+ 'BINT' => 'DOUBLE PRECISION',
+ 'UINT' => 'INTEGER',
+ 'UINT:' => 'INTEGER',
+ 'TINT:' => 'INTEGER',
+ 'USINT' => 'INTEGER',
+ 'BOOL' => 'INTEGER',
+ 'VCHAR' => 'VARCHAR(255) CHARACTER SET NONE',
+ 'VCHAR:' => 'VARCHAR(%d) CHARACTER SET NONE',
+ 'CHAR:' => 'CHAR(%d) CHARACTER SET NONE',
+ 'XSTEXT' => 'BLOB SUB_TYPE TEXT CHARACTER SET NONE',
+ 'STEXT' => 'BLOB SUB_TYPE TEXT CHARACTER SET NONE',
+ 'TEXT' => 'BLOB SUB_TYPE TEXT CHARACTER SET NONE',
+ 'MTEXT' => 'BLOB SUB_TYPE TEXT CHARACTER SET NONE',
+ 'XSTEXT_UNI'=> 'VARCHAR(100) CHARACTER SET UTF8',
+ 'STEXT_UNI' => 'VARCHAR(255) CHARACTER SET UTF8',
+ 'TEXT_UNI' => 'BLOB SUB_TYPE TEXT CHARACTER SET UTF8',
+ 'MTEXT_UNI' => 'BLOB SUB_TYPE TEXT CHARACTER SET UTF8',
+ 'TIMESTAMP' => 'INTEGER',
+ 'DECIMAL' => 'DOUBLE PRECISION',
+ 'DECIMAL:' => 'DOUBLE PRECISION',
+ 'PDECIMAL' => 'DOUBLE PRECISION',
+ 'PDECIMAL:' => 'DOUBLE PRECISION',
+ 'VCHAR_UNI' => 'VARCHAR(255) CHARACTER SET UTF8',
+ 'VCHAR_UNI:'=> 'VARCHAR(%d) CHARACTER SET UTF8',
+ 'VCHAR_CI' => 'VARCHAR(255) CHARACTER SET UTF8',
+ 'VARBINARY' => 'CHAR(255) CHARACTER SET NONE',
+ ),
+
+ 'mssql' => array(
+ 'INT:' => '[int]',
+ 'BINT' => '[float]',
+ 'UINT' => '[int]',
+ 'UINT:' => '[int]',
+ 'TINT:' => '[int]',
+ 'USINT' => '[int]',
+ 'BOOL' => '[int]',
+ 'VCHAR' => '[varchar] (255)',
+ 'VCHAR:' => '[varchar] (%d)',
+ 'CHAR:' => '[char] (%d)',
+ 'XSTEXT' => '[varchar] (1000)',
+ 'STEXT' => '[varchar] (3000)',
+ 'TEXT' => '[varchar] (8000)',
+ 'MTEXT' => '[text]',
+ 'XSTEXT_UNI'=> '[varchar] (100)',
+ 'STEXT_UNI' => '[varchar] (255)',
+ 'TEXT_UNI' => '[varchar] (4000)',
+ 'MTEXT_UNI' => '[text]',
+ 'TIMESTAMP' => '[int]',
+ 'DECIMAL' => '[float]',
+ 'DECIMAL:' => '[float]',
+ 'PDECIMAL' => '[float]',
+ 'PDECIMAL:' => '[float]',
+ 'VCHAR_UNI' => '[varchar] (255)',
+ 'VCHAR_UNI:'=> '[varchar] (%d)',
+ 'VCHAR_CI' => '[varchar] (255)',
+ 'VARBINARY' => '[varchar] (255)',
+ ),
+
+ 'mssqlnative' => array(
+ 'INT:' => '[int]',
+ 'BINT' => '[float]',
+ 'UINT' => '[int]',
+ 'UINT:' => '[int]',
+ 'TINT:' => '[int]',
+ 'USINT' => '[int]',
+ 'BOOL' => '[int]',
+ 'VCHAR' => '[varchar] (255)',
+ 'VCHAR:' => '[varchar] (%d)',
+ 'CHAR:' => '[char] (%d)',
+ 'XSTEXT' => '[varchar] (1000)',
+ 'STEXT' => '[varchar] (3000)',
+ 'TEXT' => '[varchar] (8000)',
+ 'MTEXT' => '[text]',
+ 'XSTEXT_UNI'=> '[varchar] (100)',
+ 'STEXT_UNI' => '[varchar] (255)',
+ 'TEXT_UNI' => '[varchar] (4000)',
+ 'MTEXT_UNI' => '[text]',
+ 'TIMESTAMP' => '[int]',
+ 'DECIMAL' => '[float]',
+ 'DECIMAL:' => '[float]',
+ 'PDECIMAL' => '[float]',
+ 'PDECIMAL:' => '[float]',
+ 'VCHAR_UNI' => '[varchar] (255)',
+ 'VCHAR_UNI:'=> '[varchar] (%d)',
+ 'VCHAR_CI' => '[varchar] (255)',
+ 'VARBINARY' => '[varchar] (255)',
+ ),
+
+ 'oracle' => array(
+ 'INT:' => 'number(%d)',
+ 'BINT' => 'number(20)',
+ 'UINT' => 'number(8)',
+ 'UINT:' => 'number(%d)',
+ 'TINT:' => 'number(%d)',
+ 'USINT' => 'number(4)',
+ 'BOOL' => 'number(1)',
+ 'VCHAR' => 'varchar2(255)',
+ 'VCHAR:' => 'varchar2(%d)',
+ 'CHAR:' => 'char(%d)',
+ 'XSTEXT' => 'varchar2(1000)',
+ 'STEXT' => 'varchar2(3000)',
+ 'TEXT' => 'clob',
+ 'MTEXT' => 'clob',
+ 'XSTEXT_UNI'=> 'varchar2(300)',
+ 'STEXT_UNI' => 'varchar2(765)',
+ 'TEXT_UNI' => 'clob',
+ 'MTEXT_UNI' => 'clob',
+ 'TIMESTAMP' => 'number(11)',
+ 'DECIMAL' => 'number(5, 2)',
+ 'DECIMAL:' => 'number(%d, 2)',
+ 'PDECIMAL' => 'number(6, 3)',
+ 'PDECIMAL:' => 'number(%d, 3)',
+ 'VCHAR_UNI' => 'varchar2(765)',
+ 'VCHAR_UNI:'=> array('varchar2(%d)', 'limit' => array('mult', 3, 765, 'clob')),
+ 'VCHAR_CI' => 'varchar2(255)',
+ 'VARBINARY' => 'raw(255)',
+ ),
+
+ 'sqlite' => array(
+ 'INT:' => 'int(%d)',
+ 'BINT' => 'bigint(20)',
+ 'UINT' => 'INTEGER UNSIGNED', //'mediumint(8) UNSIGNED',
+ 'UINT:' => 'INTEGER UNSIGNED', // 'int(%d) UNSIGNED',
+ 'TINT:' => 'tinyint(%d)',
+ 'USINT' => 'INTEGER UNSIGNED', //'mediumint(4) UNSIGNED',
+ 'BOOL' => 'INTEGER UNSIGNED', //'tinyint(1) UNSIGNED',
+ 'VCHAR' => 'varchar(255)',
+ 'VCHAR:' => 'varchar(%d)',
+ 'CHAR:' => 'char(%d)',
+ 'XSTEXT' => 'text(65535)',
+ 'STEXT' => 'text(65535)',
+ 'TEXT' => 'text(65535)',
+ 'MTEXT' => 'mediumtext(16777215)',
+ 'XSTEXT_UNI'=> 'text(65535)',
+ 'STEXT_UNI' => 'text(65535)',
+ 'TEXT_UNI' => 'text(65535)',
+ 'MTEXT_UNI' => 'mediumtext(16777215)',
+ 'TIMESTAMP' => 'INTEGER UNSIGNED', //'int(11) UNSIGNED',
+ 'DECIMAL' => 'decimal(5,2)',
+ 'DECIMAL:' => 'decimal(%d,2)',
+ 'PDECIMAL' => 'decimal(6,3)',
+ 'PDECIMAL:' => 'decimal(%d,3)',
+ 'VCHAR_UNI' => 'varchar(255)',
+ 'VCHAR_UNI:'=> 'varchar(%d)',
+ 'VCHAR_CI' => 'varchar(255)',
+ 'VARBINARY' => 'blob',
+ ),
+
+ 'postgres' => array(
+ 'INT:' => 'INT4',
+ 'BINT' => 'INT8',
+ 'UINT' => 'INT4', // unsigned
+ 'UINT:' => 'INT4', // unsigned
+ 'USINT' => 'INT2', // unsigned
+ 'BOOL' => 'INT2', // unsigned
+ 'TINT:' => 'INT2',
+ 'VCHAR' => 'varchar(255)',
+ 'VCHAR:' => 'varchar(%d)',
+ 'CHAR:' => 'char(%d)',
+ 'XSTEXT' => 'varchar(1000)',
+ 'STEXT' => 'varchar(3000)',
+ 'TEXT' => 'varchar(8000)',
+ 'MTEXT' => 'TEXT',
+ 'XSTEXT_UNI'=> 'varchar(100)',
+ 'STEXT_UNI' => 'varchar(255)',
+ 'TEXT_UNI' => 'varchar(4000)',
+ 'MTEXT_UNI' => 'TEXT',
+ 'TIMESTAMP' => 'INT4', // unsigned
+ 'DECIMAL' => 'decimal(5,2)',
+ 'DECIMAL:' => 'decimal(%d,2)',
+ 'PDECIMAL' => 'decimal(6,3)',
+ 'PDECIMAL:' => 'decimal(%d,3)',
+ 'VCHAR_UNI' => 'varchar(255)',
+ 'VCHAR_UNI:'=> 'varchar(%d)',
+ 'VCHAR_CI' => 'varchar_ci',
+ 'VARBINARY' => 'bytea',
+ ),
+ );
+ }
/**
* A list of types being unsigned for better reference in some db's
@@ -302,14 +304,16 @@ class phpbb_db_tools
/**
* Constructor. Set DB Object and set {@link $return_statements return_statements}.
*
- * @param phpbb_dbal $db DBAL object
+ * @param \phpbb\db\driver\driver $db Database connection
* @param bool $return_statements True if only statements should be returned and no SQL being executed
*/
- function phpbb_db_tools(&$db, $return_statements = false)
+ public function __construct(\phpbb\db\driver\driver $db, $return_statements = false)
{
$this->db = $db;
$this->return_statements = $return_statements;
+ $this->dbms_type_map = self::get_dbms_type_map();
+
// Determine mapping database type
switch ($this->db->sql_layer)
{
@@ -348,6 +352,17 @@ class phpbb_db_tools
}
/**
+ * Setter for {@link $return_statements return_statements}.
+ *
+ * @param bool $return_statements True if SQL should not be executed but returned as strings
+ * @return null
+ */
+ public function set_return_statements($return_statements)
+ {
+ $this->return_statements = $return_statements;
+ }
+
+ /**
* Gets a list of tables in the database.
*
* @return array Array of table names (all lower case)
@@ -672,6 +687,8 @@ class phpbb_db_tools
* Handle passed database update array.
* Expected structure...
* Key being one of the following
+ * drop_tables: Drop tables
+ * add_tables: Add tables
* change_columns: Column changes (only type, not name)
* add_columns: Add columns to a table
* drop_keys: Dropping keys
@@ -1453,54 +1470,9 @@ class phpbb_db_tools
}
// Get type
- if (strpos($column_data[0], ':') !== false)
- {
- list($orig_column_type, $column_length) = explode(':', $column_data[0]);
- if (!is_array($this->dbms_type_map[$this->sql_layer][$orig_column_type . ':']))
- {
- $column_type = sprintf($this->dbms_type_map[$this->sql_layer][$orig_column_type . ':'], $column_length);
- }
- else
- {
- if (isset($this->dbms_type_map[$this->sql_layer][$orig_column_type . ':']['rule']))
- {
- switch ($this->dbms_type_map[$this->sql_layer][$orig_column_type . ':']['rule'][0])
- {
- case 'div':
- $column_length /= $this->dbms_type_map[$this->sql_layer][$orig_column_type . ':']['rule'][1];
- $column_length = ceil($column_length);
- $column_type = sprintf($this->dbms_type_map[$this->sql_layer][$orig_column_type . ':'][0], $column_length);
- break;
- }
- }
-
- if (isset($this->dbms_type_map[$this->sql_layer][$orig_column_type . ':']['limit']))
- {
- switch ($this->dbms_type_map[$this->sql_layer][$orig_column_type . ':']['limit'][0])
- {
- case 'mult':
- $column_length *= $this->dbms_type_map[$this->sql_layer][$orig_column_type . ':']['limit'][1];
- if ($column_length > $this->dbms_type_map[$this->sql_layer][$orig_column_type . ':']['limit'][2])
- {
- $column_type = $this->dbms_type_map[$this->sql_layer][$orig_column_type . ':']['limit'][3];
- }
- else
- {
- $column_type = sprintf($this->dbms_type_map[$this->sql_layer][$orig_column_type . ':'][0], $column_length);
- }
- break;
- }
- }
- }
- $orig_column_type .= ':';
- }
- else
- {
- $orig_column_type = $column_data[0];
- $column_type = $this->dbms_type_map[$this->sql_layer][$column_data[0]];
- }
+ list($column_type, $orig_column_type) = $this->get_column_type($column_data[0]);
- // Adjust default value if db-dependant specified
+ // Adjust default value if db-dependent specified
if (is_array($column_data[1]))
{
$column_data[1] = (isset($column_data[1][$this->sql_layer])) ? $column_data[1][$this->sql_layer] : $column_data[1]['default'];
@@ -1674,6 +1646,65 @@ class phpbb_db_tools
}
/**
+ * Get the column's database type from the type map
+ *
+ * @param string $column_map_type
+ * @return array column type for this database
+ * and map type without length
+ */
+ function get_column_type($column_map_type)
+ {
+ if (strpos($column_map_type, ':') !== false)
+ {
+ list($orig_column_type, $column_length) = explode(':', $column_map_type);
+ if (!is_array($this->dbms_type_map[$this->sql_layer][$orig_column_type . ':']))
+ {
+ $column_type = sprintf($this->dbms_type_map[$this->sql_layer][$orig_column_type . ':'], $column_length);
+ }
+ else
+ {
+ if (isset($this->dbms_type_map[$this->sql_layer][$orig_column_type . ':']['rule']))
+ {
+ switch ($this->dbms_type_map[$this->sql_layer][$orig_column_type . ':']['rule'][0])
+ {
+ case 'div':
+ $column_length /= $this->dbms_type_map[$this->sql_layer][$orig_column_type . ':']['rule'][1];
+ $column_length = ceil($column_length);
+ $column_type = sprintf($this->dbms_type_map[$this->sql_layer][$orig_column_type . ':'][0], $column_length);
+ break;
+ }
+ }
+
+ if (isset($this->dbms_type_map[$this->sql_layer][$orig_column_type . ':']['limit']))
+ {
+ switch ($this->dbms_type_map[$this->sql_layer][$orig_column_type . ':']['limit'][0])
+ {
+ case 'mult':
+ $column_length *= $this->dbms_type_map[$this->sql_layer][$orig_column_type . ':']['limit'][1];
+ if ($column_length > $this->dbms_type_map[$this->sql_layer][$orig_column_type . ':']['limit'][2])
+ {
+ $column_type = $this->dbms_type_map[$this->sql_layer][$orig_column_type . ':']['limit'][3];
+ }
+ else
+ {
+ $column_type = sprintf($this->dbms_type_map[$this->sql_layer][$orig_column_type . ':'][0], $column_length);
+ }
+ break;
+ }
+ }
+ }
+ $orig_column_type .= ':';
+ }
+ else
+ {
+ $orig_column_type = $column_map_type;
+ $column_type = $this->dbms_type_map[$this->sql_layer][$column_map_type];
+ }
+
+ return array($column_type, $orig_column_type);
+ }
+
+ /**
* Add new column
*/
function sql_column_add($table_name, $column_name, $column_data, $inline = false)
@@ -2521,5 +2552,3 @@ class phpbb_db_tools
return $this->_sql_run_sql($statements);
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/phpbb/di/extension/config.php b/phpBB/phpbb/di/extension/config.php
new file mode 100644
index 0000000000..2603e7b358
--- /dev/null
+++ b/phpBB/phpbb/di/extension/config.php
@@ -0,0 +1,78 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\di\extension;
+
+use Symfony\Component\DependencyInjection\ContainerBuilder;
+use Symfony\Component\HttpKernel\DependencyInjection\Extension;
+use Symfony\Component\DependencyInjection\Loader\XmlFileLoader;
+use Symfony\Component\Config\FileLocator;
+
+/**
+* Container config extension
+*/
+class config extends Extension
+{
+ public function __construct($config_file)
+ {
+ $this->config_file = $config_file;
+ }
+
+ /**
+ * Loads a specific configuration.
+ *
+ * @param array $config An array of configuration values
+ * @param ContainerBuilder $container A ContainerBuilder instance
+ *
+ * @throws InvalidArgumentException When provided tag is not defined in this extension
+ */
+ public function load(array $config, ContainerBuilder $container)
+ {
+ require($this->config_file);
+
+ $container->setParameter('core.adm_relative_path', (isset($phpbb_adm_relative_path) ? $phpbb_adm_relative_path : 'adm/'));
+ $container->setParameter('core.table_prefix', $table_prefix);
+ $container->setParameter('cache.driver.class', $this->convert_30_acm_type($acm_type));
+ $container->setParameter('dbal.driver.class', phpbb_convert_30_dbms_to_31($dbms));
+ $container->setParameter('dbal.dbhost', $dbhost);
+ $container->setParameter('dbal.dbuser', $dbuser);
+ $container->setParameter('dbal.dbpasswd', $dbpasswd);
+ $container->setParameter('dbal.dbname', $dbname);
+ $container->setParameter('dbal.dbport', $dbport);
+ $container->setParameter('dbal.new_link', defined('PHPBB_DB_NEW_LINK') && PHPBB_DB_NEW_LINK);
+ }
+
+ /**
+ * Returns the recommended alias to use in XML.
+ *
+ * This alias is also the mandatory prefix to use when using YAML.
+ *
+ * @return string The alias
+ */
+ public function getAlias()
+ {
+ return 'config';
+ }
+
+ /**
+ * Convert 3.0 ACM type to 3.1 cache driver class name
+ *
+ * @param string $acm_type ACM type
+ * @return cache driver class
+ */
+ protected function convert_30_acm_type($acm_type)
+ {
+ if (preg_match('#^[a-z]+$#', $acm_type))
+ {
+ return 'phpbb\\cache\\driver\\' . $acm_type;
+ }
+
+ return $acm_type;
+ }
+}
diff --git a/phpBB/phpbb/di/extension/core.php b/phpBB/phpbb/di/extension/core.php
new file mode 100644
index 0000000000..455dfa7ecd
--- /dev/null
+++ b/phpBB/phpbb/di/extension/core.php
@@ -0,0 +1,63 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\di\extension;
+
+use Symfony\Component\DependencyInjection\ContainerBuilder;
+use Symfony\Component\HttpKernel\DependencyInjection\Extension;
+use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
+use Symfony\Component\Config\FileLocator;
+
+/**
+* Container core extension
+*/
+class core extends Extension
+{
+ /**
+ * Config path
+ * @var string
+ */
+ protected $config_path;
+
+ /**
+ * Constructor
+ *
+ * @param string $config_path Config path
+ */
+ public function __construct($config_path)
+ {
+ $this->config_path = $config_path;
+ }
+
+ /**
+ * Loads a specific configuration.
+ *
+ * @param array $config An array of configuration values
+ * @param ContainerBuilder $container A ContainerBuilder instance
+ *
+ * @throws InvalidArgumentException When provided tag is not defined in this extension
+ */
+ public function load(array $config, ContainerBuilder $container)
+ {
+ $loader = new YamlFileLoader($container, new FileLocator(phpbb_realpath($this->config_path)));
+ $loader->load('services.yml');
+ }
+
+ /**
+ * Returns the recommended alias to use in XML.
+ *
+ * This alias is also the mandatory prefix to use when using YAML.
+ *
+ * @return string The alias
+ */
+ public function getAlias()
+ {
+ return 'core';
+ }
+}
diff --git a/phpBB/phpbb/di/extension/ext.php b/phpBB/phpbb/di/extension/ext.php
new file mode 100644
index 0000000000..4f2f24cb1a
--- /dev/null
+++ b/phpBB/phpbb/di/extension/ext.php
@@ -0,0 +1,63 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\di\extension;
+
+use Symfony\Component\DependencyInjection\ContainerBuilder;
+use Symfony\Component\HttpKernel\DependencyInjection\Extension;
+use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
+use Symfony\Component\Config\FileLocator;
+
+/**
+* Container ext extension
+*/
+class ext extends Extension
+{
+ protected $paths = array();
+
+ public function __construct($enabled_extensions)
+ {
+ foreach ($enabled_extensions as $ext => $path)
+ {
+ $this->paths[] = $path;
+ }
+ }
+
+ /**
+ * Loads a specific configuration.
+ *
+ * @param array $config An array of configuration values
+ * @param ContainerBuilder $container A ContainerBuilder instance
+ *
+ * @throws InvalidArgumentException When provided tag is not defined in this extension
+ */
+ public function load(array $config, ContainerBuilder $container)
+ {
+ foreach ($this->paths as $path)
+ {
+ if (file_exists($path . '/config/services.yml'))
+ {
+ $loader = new YamlFileLoader($container, new FileLocator(phpbb_realpath($path . '/config')));
+ $loader->load('services.yml');
+ }
+ }
+ }
+
+ /**
+ * Returns the recommended alias to use in XML.
+ *
+ * This alias is also the mandatory prefix to use when using YAML.
+ *
+ * @return string The alias
+ */
+ public function getAlias()
+ {
+ return 'ext';
+ }
+}
diff --git a/phpBB/phpbb/di/pass/collection_pass.php b/phpBB/phpbb/di/pass/collection_pass.php
new file mode 100644
index 0000000000..507271de3e
--- /dev/null
+++ b/phpBB/phpbb/di/pass/collection_pass.php
@@ -0,0 +1,40 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\di\pass;
+
+use Symfony\Component\DependencyInjection\ContainerBuilder;
+use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
+
+/**
+* Appends an add method call to the definition of each collection service for
+* the services tagged with the appropriate name defined in the collection's
+* service_collection tag.
+*/
+class collection_pass implements CompilerPassInterface
+{
+ /**
+ * Modify the container before it is passed to the rest of the code
+ *
+ * @param ContainerBuilder $container ContainerBuilder object
+ * @return null
+ */
+ public function process(ContainerBuilder $container)
+ {
+ foreach ($container->findTaggedServiceIds('service_collection') as $id => $data)
+ {
+ $definition = $container->getDefinition($id);
+
+ foreach ($container->findTaggedServiceIds($data[0]['tag']) as $service_id => $service_data)
+ {
+ $definition->addMethodCall('add', array($service_id));
+ }
+ }
+ }
+}
diff --git a/phpBB/phpbb/di/pass/kernel_pass.php b/phpBB/phpbb/di/pass/kernel_pass.php
new file mode 100644
index 0000000000..9c2b193361
--- /dev/null
+++ b/phpBB/phpbb/di/pass/kernel_pass.php
@@ -0,0 +1,62 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\di\pass;
+
+use Symfony\Component\DependencyInjection\ContainerBuilder;
+use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
+
+class kernel_pass implements CompilerPassInterface
+{
+ /**
+ * Modify the container before it is passed to the rest of the code
+ *
+ * @param ContainerBuilder $container ContainerBuilder object
+ * @return null
+ */
+ public function process(ContainerBuilder $container)
+ {
+ $definition = $container->getDefinition('dispatcher');
+
+ foreach ($container->findTaggedServiceIds('kernel.event_listener') as $id => $events)
+ {
+ foreach ($events as $event)
+ {
+ $priority = isset($event['priority']) ? $event['priority'] : 0;
+
+ if (!isset($event['event']))
+ {
+ throw new \InvalidArgumentException(sprintf('Service "%1$s" must define the "event" attribute on "kernel.event_listener" tags.', $id));
+ }
+
+ if (!isset($event['method']))
+ {
+ throw new \InvalidArgumentException(sprintf('Service "%1$s" must define the "method" attribute on "kernel.event_listener" tags.', $id));
+ }
+
+ $definition->addMethodCall('addListenerService', array($event['event'], array($id, $event['method']), $priority));
+ }
+ }
+
+ foreach ($container->findTaggedServiceIds('kernel.event_subscriber') as $id => $attributes)
+ {
+ // We must assume that the class value has been correctly filled, even if the service is created by a factory
+ $class = $container->getDefinition($id)->getClass();
+
+ $refClass = new \ReflectionClass($class);
+ $interface = 'Symfony\Component\EventDispatcher\EventSubscriberInterface';
+ if (!$refClass->implementsInterface($interface))
+ {
+ throw new \InvalidArgumentException(sprintf('Service "%1$s" must implement interface "%2$s".', $id, $interface));
+ }
+
+ $definition->addMethodCall('addSubscriberService', array($id, $class));
+ }
+ }
+}
diff --git a/phpBB/phpbb/di/service_collection.php b/phpBB/phpbb/di/service_collection.php
new file mode 100644
index 0000000000..65df9ab1d1
--- /dev/null
+++ b/phpBB/phpbb/di/service_collection.php
@@ -0,0 +1,43 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2011 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\di;
+
+use Symfony\Component\DependencyInjection\ContainerInterface;
+
+/**
+* Collection of services to be configured at container compile time.
+*
+* @package phpBB3
+*/
+class service_collection extends \ArrayObject
+{
+ /**
+ * Constructor
+ *
+ * @param ContainerInterface $container Container object
+ */
+ public function __construct(ContainerInterface $container)
+ {
+ $this->container = $container;
+ }
+
+ /**
+ * Add a service to the collection
+ *
+ * @param string $name The service name
+ * @return null
+ */
+ public function add($name)
+ {
+ $task = $this->container->get($name);
+
+ $this->offsetSet($name, $task);
+ }
+}
diff --git a/phpBB/includes/error_collector.php b/phpBB/phpbb/error_collector.php
index 3c0a89a1f3..297972c6b8 100644
--- a/phpBB/includes/error_collector.php
+++ b/phpBB/phpbb/error_collector.php
@@ -2,25 +2,18 @@
/**
*
* @package phpBB
-* @version $Id$
* @copyright (c) 2011 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
-/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
+namespace phpbb;
-class phpbb_error_collector
+class error_collector
{
var $errors;
- function phpbb_error_collector()
+ function __construct()
{
$this->errors = array();
}
diff --git a/phpBB/phpbb/event/data.php b/phpBB/phpbb/event/data.php
new file mode 100644
index 0000000000..fbb16574ed
--- /dev/null
+++ b/phpBB/phpbb/event/data.php
@@ -0,0 +1,62 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\event;
+
+use Symfony\Component\EventDispatcher\Event;
+
+class data extends Event implements \ArrayAccess
+{
+ private $data;
+
+ public function __construct(array $data = array())
+ {
+ $this->set_data($data);
+ }
+
+ public function set_data(array $data = array())
+ {
+ $this->data = $data;
+ }
+
+ public function get_data()
+ {
+ return $this->data;
+ }
+
+ /**
+ * Returns data filtered to only include specified keys.
+ *
+ * This effectively discards any keys added to data by hooks.
+ */
+ public function get_data_filtered($keys)
+ {
+ return array_intersect_key($this->data, array_flip($keys));
+ }
+
+ public function offsetExists($offset)
+ {
+ return isset($this->data[$offset]);
+ }
+
+ public function offsetGet($offset)
+ {
+ return isset($this->data[$offset]) ? $this->data[$offset] : null;
+ }
+
+ public function offsetSet($offset, $value)
+ {
+ $this->data[$offset] = $value;
+ }
+
+ public function offsetUnset($offset)
+ {
+ unset($this->data[$offset]);
+ }
+}
diff --git a/phpBB/phpbb/event/dispatcher.php b/phpBB/phpbb/event/dispatcher.php
new file mode 100644
index 0000000000..74b35eb78d
--- /dev/null
+++ b/phpBB/phpbb/event/dispatcher.php
@@ -0,0 +1,36 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\event;
+
+use Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher;
+
+/**
+* Extension of the Symfony2 EventDispatcher
+*
+* It provides an additional `trigger_event` method, which
+* gives some syntactic sugar for dispatching events. Instead
+* of creating the event object, the method will do that for
+* you.
+*
+* Example:
+*
+* $vars = array('page_title');
+* extract($phpbb_dispatcher->trigger_event('core.index', compact($vars)));
+*
+*/
+class dispatcher extends ContainerAwareEventDispatcher
+{
+ public function trigger_event($eventName, $data = array())
+ {
+ $event = new \phpbb\event\data($data);
+ $this->dispatch($eventName, $event);
+ return $event->get_data_filtered(array_keys($data));
+ }
+}
diff --git a/phpBB/phpbb/event/extension_subscriber_loader.php b/phpBB/phpbb/event/extension_subscriber_loader.php
new file mode 100644
index 0000000000..6408f93e2a
--- /dev/null
+++ b/phpBB/phpbb/event/extension_subscriber_loader.php
@@ -0,0 +1,35 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\event;
+
+use Symfony\Component\EventDispatcher\EventDispatcherInterface;
+
+class extension_subscriber_loader
+{
+ private $dispatcher;
+ private $listener_collection;
+
+ public function __construct(EventDispatcherInterface $dispatcher, \phpbb\di\service_collection $listener_collection)
+ {
+ $this->dispatcher = $dispatcher;
+ $this->listener_collection = $listener_collection;
+ }
+
+ public function load()
+ {
+ if (!empty($this->listener_collection))
+ {
+ foreach ($this->listener_collection as $listener)
+ {
+ $this->dispatcher->addSubscriber($listener);
+ }
+ }
+ }
+}
diff --git a/phpBB/phpbb/event/kernel_exception_subscriber.php b/phpBB/phpbb/event/kernel_exception_subscriber.php
new file mode 100644
index 0000000000..8a4de1fbad
--- /dev/null
+++ b/phpBB/phpbb/event/kernel_exception_subscriber.php
@@ -0,0 +1,78 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\event;
+
+use Symfony\Component\EventDispatcher\EventSubscriberInterface;
+use Symfony\Component\HttpKernel\KernelEvents;
+use Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent;
+use Symfony\Component\HttpKernel\Exception\HttpException;
+use Symfony\Component\HttpFoundation\Response;
+
+class kernel_exception_subscriber implements EventSubscriberInterface
+{
+ /**
+ * Template object
+ * @var \phpbb\template\template
+ */
+ protected $template;
+
+ /**
+ * User object
+ * @var \phpbb\user
+ */
+ protected $user;
+
+ /**
+ * Construct method
+ *
+ * @param \phpbb\template\template $template Template object
+ * @param \phpbb\user $user User object
+ */
+ public function __construct(\phpbb\template\template $template, \phpbb\user $user)
+ {
+ $this->template = $template;
+ $this->user = $user;
+ }
+
+ /**
+ * This listener is run when the KernelEvents::EXCEPTION event is triggered
+ *
+ * @param GetResponseForExceptionEvent $event
+ * @return null
+ */
+ public function on_kernel_exception(GetResponseForExceptionEvent $event)
+ {
+ page_header($this->user->lang('INFORMATION'));
+
+ $exception = $event->getException();
+
+ $this->template->assign_vars(array(
+ 'MESSAGE_TITLE' => $this->user->lang('INFORMATION'),
+ 'MESSAGE_TEXT' => $exception->getMessage(),
+ ));
+
+ $this->template->set_filenames(array(
+ 'body' => 'message_body.html',
+ ));
+
+ page_footer(true, false, false);
+
+ $status_code = $exception instanceof HttpException ? $exception->getStatusCode() : 500;
+ $response = new Response($this->template->assign_display('body'), $status_code);
+ $event->setResponse($response);
+ }
+
+ public static function getSubscribedEvents()
+ {
+ return array(
+ KernelEvents::EXCEPTION => 'on_kernel_exception',
+ );
+ }
+}
diff --git a/phpBB/phpbb/event/kernel_request_subscriber.php b/phpBB/phpbb/event/kernel_request_subscriber.php
new file mode 100644
index 0000000000..7d5418498b
--- /dev/null
+++ b/phpBB/phpbb/event/kernel_request_subscriber.php
@@ -0,0 +1,77 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\event;
+
+use Symfony\Component\EventDispatcher\EventSubscriberInterface;
+use Symfony\Component\HttpKernel\KernelEvents;
+use Symfony\Component\HttpKernel\Event\GetResponseEvent;
+use Symfony\Component\HttpKernel\EventListener\RouterListener;
+use Symfony\Component\Routing\RequestContext;
+
+class kernel_request_subscriber implements EventSubscriberInterface
+{
+ /**
+ * Extension finder object
+ * @var \phpbb\extension\finder
+ */
+ protected $finder;
+
+ /**
+ * PHP extension
+ * @var string
+ */
+ protected $php_ext;
+
+ /**
+ * Root path
+ * @var string
+ */
+ protected $root_path;
+
+ /**
+ * Construct method
+ *
+ * @param \phpbb\extension\finder $finder Extension finder object
+ * @param string $root_path Root path
+ * @param string $php_ext PHP extension
+ */
+ public function __construct(\phpbb\extension\finder $finder, $root_path, $php_ext)
+ {
+ $this->finder = $finder;
+ $this->root_path = $root_path;
+ $this->php_ext = $php_ext;
+ }
+
+ /**
+ * This listener is run when the KernelEvents::REQUEST event is triggered
+ *
+ * This is responsible for setting up the routing information
+ *
+ * @param GetResponseEvent $event
+ * @return null
+ */
+ public function on_kernel_request(GetResponseEvent $event)
+ {
+ $request = $event->getRequest();
+ $context = new RequestContext();
+ $context->fromRequest($request);
+
+ $matcher = phpbb_get_url_matcher($this->finder, $context, $this->root_path, $this->php_ext);
+ $router_listener = new RouterListener($matcher, $context);
+ $router_listener->onKernelRequest($event);
+ }
+
+ public static function getSubscribedEvents()
+ {
+ return array(
+ KernelEvents::REQUEST => 'on_kernel_request',
+ );
+ }
+}
diff --git a/phpBB/phpbb/event/kernel_terminate_subscriber.php b/phpBB/phpbb/event/kernel_terminate_subscriber.php
new file mode 100644
index 0000000000..32dba322d1
--- /dev/null
+++ b/phpBB/phpbb/event/kernel_terminate_subscriber.php
@@ -0,0 +1,37 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\event;
+
+use Symfony\Component\EventDispatcher\EventSubscriberInterface;
+use Symfony\Component\HttpKernel\KernelEvents;
+use Symfony\Component\HttpKernel\Event\PostResponseEvent;
+
+class kernel_terminate_subscriber implements EventSubscriberInterface
+{
+ /**
+ * This listener is run when the KernelEvents::TERMINATE event is triggered
+ * This comes after a Response has been sent to the server; this is
+ * primarily cleanup stuff.
+ *
+ * @param PostResponseEvent $event
+ * @return null
+ */
+ public function on_kernel_terminate(PostResponseEvent $event)
+ {
+ exit_handler();
+ }
+
+ public static function getSubscribedEvents()
+ {
+ return array(
+ KernelEvents::TERMINATE => 'on_kernel_terminate',
+ );
+ }
+}
diff --git a/phpBB/phpbb/extension/base.php b/phpBB/phpbb/extension/base.php
new file mode 100644
index 0000000000..1f871750e0
--- /dev/null
+++ b/phpBB/phpbb/extension/base.php
@@ -0,0 +1,129 @@
+<?php
+/**
+*
+* @package extension
+* @copyright (c) 2011 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\extension;
+
+use Symfony\Component\DependencyInjection\ContainerInterface;
+
+/**
+* A base class for extensions without custom enable/disable/purge code.
+*
+* @package extension
+*/
+class base implements \phpbb\extension\extension_interface
+{
+ /** @var ContainerInterface */
+ protected $container;
+
+ /** @var \phpbb\extension\finder */
+ protected $finder;
+
+ /** @var \phpbb\db\migrator */
+ protected $migrator;
+
+ /** @var string */
+ protected $extension_name;
+
+ /** @var string */
+ protected $extension_path;
+
+ /**
+ * Constructor
+ *
+ * @param ContainerInterface $container Container object
+ * @param \phpbb\extension\finder $extension_finder
+ * @param string $extension_name Name of this extension (from ext.manager)
+ * @param string $extension_path Relative path to this extension
+ */
+ public function __construct(ContainerInterface $container, \phpbb\extension\finder $extension_finder, \phpbb\db\migrator $migrator, $extension_name, $extension_path)
+ {
+ $this->container = $container;
+ $this->extension_finder = $extension_finder;
+ $this->migrator = $migrator;
+
+ $this->extension_name = $extension_name;
+ $this->extension_path = $extension_path;
+ }
+
+ /**
+ * Single enable step that installs any included migrations
+ *
+ * @param mixed $old_state State returned by previous call of this method
+ * @return false Indicates no further steps are required
+ */
+ public function enable_step($old_state)
+ {
+ $migrations = $this->get_migration_file_list();
+
+ $this->migrator->set_migrations($migrations);
+
+ $this->migrator->update();
+
+ return !$this->migrator->finished();
+ }
+
+ /**
+ * Single disable step that does nothing
+ *
+ * @param mixed $old_state State returned by previous call of this method
+ * @return false Indicates no further steps are required
+ */
+ public function disable_step($old_state)
+ {
+ return false;
+ }
+
+ /**
+ * Single purge step that reverts any included and installed migrations
+ *
+ * @param mixed $old_state State returned by previous call of this method
+ * @return false Indicates no further steps are required
+ */
+ public function purge_step($old_state)
+ {
+ $migrations = $this->get_migration_file_list();
+
+ $this->migrator->set_migrations($migrations);
+
+ foreach ($migrations as $migration)
+ {
+ while ($this->migrator->migration_state($migration) !== false)
+ {
+ $this->migrator->revert($migration);
+
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Get the list of migration files from this extension
+ *
+ * @return array
+ */
+ protected function get_migration_file_list()
+ {
+ static $migrations = false;
+
+ if ($migrations !== false)
+ {
+ return $migrations;
+ }
+
+ // Only have the finder search in this extension path directory
+ $migrations = $this->extension_finder
+ ->extension_directory('/migrations')
+ ->find_from_extension($this->extension_name, $this->extension_path);
+ $migrations = $this->extension_finder->get_classes_from_files($migrations);
+
+ return $migrations;
+ }
+}
diff --git a/phpBB/phpbb/extension/exception.php b/phpBB/phpbb/extension/exception.php
new file mode 100644
index 0000000000..82327c9d5e
--- /dev/null
+++ b/phpBB/phpbb/extension/exception.php
@@ -0,0 +1,21 @@
+<?php
+/**
+*
+* @package extension
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\extension;
+
+/**
+ * Exception class for metadata
+ */
+class exception extends \UnexpectedValueException
+{
+ public function __toString()
+ {
+ return $this->getMessage();
+ }
+}
diff --git a/phpBB/phpbb/extension/extension_interface.php b/phpBB/phpbb/extension/extension_interface.php
new file mode 100644
index 0000000000..bddff51b5a
--- /dev/null
+++ b/phpBB/phpbb/extension/extension_interface.php
@@ -0,0 +1,61 @@
+<?php
+/**
+*
+* @package extension
+* @copyright (c) 2011 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\extension;
+
+/**
+* The interface extension meta classes have to implement to run custom code
+* on enable/disable/purge.
+*
+* @package extension
+*/
+interface extension_interface
+{
+ /**
+ * enable_step is executed on enabling an extension until it returns false.
+ *
+ * Calls to this function can be made in subsequent requests, when the
+ * function is invoked through a webserver with a too low max_execution_time.
+ *
+ * @param mixed $old_state The return value of the previous call
+ * of this method, or false on the first call
+ * @return mixed Returns false after last step, otherwise
+ * temporary state which is passed as an
+ * argument to the next step
+ */
+ public function enable_step($old_state);
+
+ /**
+ * Disables the extension.
+ *
+ * Calls to this function can be made in subsequent requests, when the
+ * function is invoked through a webserver with a too low max_execution_time.
+ *
+ * @param mixed $old_state The return value of the previous call
+ * of this method, or false on the first call
+ * @return mixed Returns false after last step, otherwise
+ * temporary state which is passed as an
+ * argument to the next step
+ */
+ public function disable_step($old_state);
+
+ /**
+ * purge_step is executed on purging an extension until it returns false.
+ *
+ * Calls to this function can be made in subsequent requests, when the
+ * function is invoked through a webserver with a too low max_execution_time.
+ *
+ * @param mixed $old_state The return value of the previous call
+ * of this method, or false on the first call
+ * @return mixed Returns false after last step, otherwise
+ * temporary state which is passed as an
+ * argument to the next step
+ */
+ public function purge_step($old_state);
+}
diff --git a/phpBB/phpbb/extension/finder.php b/phpBB/phpbb/extension/finder.php
new file mode 100644
index 0000000000..6cc6e1808a
--- /dev/null
+++ b/phpBB/phpbb/extension/finder.php
@@ -0,0 +1,530 @@
+<?php
+/**
+*
+* @package extension
+* @copyright (c) 2011 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\extension;
+
+/**
+* The extension finder provides a simple way to locate files in active extensions
+*
+* @package extension
+*/
+class finder
+{
+ protected $extension_manager;
+ protected $filesystem;
+ protected $phpbb_root_path;
+ protected $cache;
+ protected $php_ext;
+
+ /**
+ * The cache variable name used to store $this->cached_queries in $this->cache.
+ *
+ * Allows the use of multiple differently configured finders with the same cache.
+ * @var string
+ */
+ protected $cache_name;
+
+ /**
+ * An associative array, containing all search parameters set in methods.
+ * @var array
+ */
+ protected $query;
+
+ /**
+ * A map from md5 hashes of serialized queries to their previously retrieved
+ * results.
+ * @var array
+ */
+ protected $cached_queries;
+
+ /**
+ * Creates a new finder instance with its dependencies
+ *
+ * @param \phpbb\extension\manager $extension_manager An extension manager
+ * instance that provides the finder with a list of active
+ * extensions and their locations
+ * @param \phpbb\filesystem $filesystem Filesystem instance
+ * @param string $phpbb_root_path Path to the phpbb root directory
+ * @param \phpbb\cache\driver\driver_interface $cache A cache instance or null
+ * @param string $php_ext php file extension
+ * @param string $cache_name The name of the cache variable, defaults to
+ * _ext_finder
+ */
+ public function __construct(\phpbb\extension\manager $extension_manager, \phpbb\filesystem $filesystem, $phpbb_root_path = '', \phpbb\cache\driver\driver_interface $cache = null, $php_ext = 'php', $cache_name = '_ext_finder')
+ {
+ $this->extension_manager = $extension_manager;
+ $this->filesystem = $filesystem;
+ $this->phpbb_root_path = $phpbb_root_path;
+ $this->cache = $cache;
+ $this->php_ext = $php_ext;
+ $this->cache_name = $cache_name;
+
+ $this->query = array(
+ 'core_path' => false,
+ 'core_suffix' => false,
+ 'core_prefix' => false,
+ 'core_directory' => false,
+ 'extension_suffix' => false,
+ 'extension_prefix' => false,
+ 'extension_directory' => false,
+ );
+
+ $this->cached_queries = ($this->cache) ? $this->cache->get($this->cache_name) : false;
+ }
+
+ /**
+ * Sets a core path to be searched in addition to extensions
+ *
+ * @param string $core_path The path relative to phpbb_root_path
+ * @return \phpbb\extension\finder This object for chaining calls
+ */
+ public function core_path($core_path)
+ {
+ $this->query['core_path'] = $core_path;
+ return $this;
+ }
+
+ /**
+ * Sets the suffix all files found in extensions and core must match.
+ *
+ * There is no default file extension, so to find PHP files only, you will
+ * have to specify .php as a suffix. However when using get_classes, the .php
+ * file extension is automatically added to suffixes.
+ *
+ * @param string $suffix A filename suffix
+ * @return \phpbb\extension\finder This object for chaining calls
+ */
+ public function suffix($suffix)
+ {
+ $this->core_suffix($suffix);
+ $this->extension_suffix($suffix);
+ return $this;
+ }
+
+ /**
+ * Sets a suffix all files found in extensions must match
+ *
+ * There is no default file extension, so to find PHP files only, you will
+ * have to specify .php as a suffix. However when using get_classes, the .php
+ * file extension is automatically added to suffixes.
+ *
+ * @param string $extension_suffix A filename suffix
+ * @return \phpbb\extension\finder This object for chaining calls
+ */
+ public function extension_suffix($extension_suffix)
+ {
+ $this->query['extension_suffix'] = $extension_suffix;
+ return $this;
+ }
+
+ /**
+ * Sets a suffix all files found in the core path must match
+ *
+ * There is no default file extension, so to find PHP files only, you will
+ * have to specify .php as a suffix. However when using get_classes, the .php
+ * file extension is automatically added to suffixes.
+ *
+ * @param string $core_suffix A filename suffix
+ * @return \phpbb\extension\finder This object for chaining calls
+ */
+ public function core_suffix($core_suffix)
+ {
+ $this->query['core_suffix'] = $core_suffix;
+ return $this;
+ }
+
+ /**
+ * Sets the prefix all files found in extensions and core must match
+ *
+ * @param string $prefix A filename prefix
+ * @return \phpbb\extension\finder This object for chaining calls
+ */
+ public function prefix($prefix)
+ {
+ $this->core_prefix($prefix);
+ $this->extension_prefix($prefix);
+ return $this;
+ }
+
+ /**
+ * Sets a prefix all files found in extensions must match
+ *
+ * @param string $extension_prefix A filename prefix
+ * @return \phpbb\extension\finder This object for chaining calls
+ */
+ public function extension_prefix($extension_prefix)
+ {
+ $this->query['extension_prefix'] = $extension_prefix;
+ return $this;
+ }
+
+ /**
+ * Sets a prefix all files found in the core path must match
+ *
+ * @param string $core_prefix A filename prefix
+ * @return \phpbb\extension\finder This object for chaining calls
+ */
+ public function core_prefix($core_prefix)
+ {
+ $this->query['core_prefix'] = $core_prefix;
+ return $this;
+ }
+
+ /**
+ * Sets a directory all files found in extensions and core must be contained in
+ *
+ * Automatically sets the core_directory if its value does not differ from
+ * the current directory.
+ *
+ * @param string $directory
+ * @return \phpbb\extension\finder This object for chaining calls
+ */
+ public function directory($directory)
+ {
+ $this->core_directory($directory);
+ $this->extension_directory($directory);
+ return $this;
+ }
+
+ /**
+ * Sets a directory all files found in extensions must be contained in
+ *
+ * @param string $extension_directory
+ * @return \phpbb\extension\finder This object for chaining calls
+ */
+ public function extension_directory($extension_directory)
+ {
+ $this->query['extension_directory'] = $this->sanitise_directory($extension_directory);
+ return $this;
+ }
+
+ /**
+ * Sets a directory all files found in the core path must be contained in
+ *
+ * @param string $core_directory
+ * @return \phpbb\extension\finder This object for chaining calls
+ */
+ public function core_directory($core_directory)
+ {
+ $this->query['core_directory'] = $this->sanitise_directory($core_directory);
+ return $this;
+ }
+
+ /**
+ * Removes occurances of /./ and makes sure path ends without trailing slash
+ *
+ * @param string $directory A directory pattern
+ * @return string A cleaned up directory pattern
+ */
+ protected function sanitise_directory($directory)
+ {
+ $directory = $this->filesystem->clean_path($directory);
+ $dir_len = strlen($directory);
+
+ if ($dir_len > 1 && $directory[$dir_len - 1] === '/')
+ {
+ $directory = substr($directory, 0, -1);
+ }
+
+ return $directory;
+ }
+
+ /**
+ * Finds classes matching the configured options if they follow phpBB naming rules.
+ *
+ * The php file extension is automatically added to suffixes.
+ *
+ * Note: If a file is matched but contains a class name not following the
+ * phpBB naming rules an incorrect class name will be returned.
+ *
+ * @param bool $cache Whether the result should be cached
+ * @param bool $use_all_available Use all available instead of just all
+ * enabled extensions
+ * @return array An array of found class names
+ */
+ public function get_classes($cache = true, $use_all_available = false)
+ {
+ $this->query['extension_suffix'] .= '.' . $this->php_ext;
+ $this->query['core_suffix'] .= '.' . $this->php_ext;
+
+ $files = $this->find($cache, false, $use_all_available);
+
+ return $this->get_classes_from_files($files);
+ }
+
+ /**
+ * Get class names from a list of files
+ *
+ * @param array $files Array of files (from find())
+ * @return array Array of class names
+ */
+ public function get_classes_from_files($files)
+ {
+ $classes = array();
+ foreach ($files as $file => $ext_name)
+ {
+ $class = substr($file, 0, -strlen('.' . $this->php_ext));
+ if ($ext_name === '/' && preg_match('#^includes/#', $file))
+ {
+ $class = preg_replace('#^includes/#', '', $class);
+ $classes[] = 'phpbb_' . str_replace('/', '_', $class);
+ }
+ else
+ {
+ $class = preg_replace('#^ext/#', '', $class);
+ $classes[] = '\\' . str_replace('/', '\\', $class);
+ }
+ }
+ return $classes;
+ }
+
+ /**
+ * Finds all directories matching the configured options
+ *
+ * @param bool $cache Whether the result should be cached
+ * @param bool $use_all_available Use all available instead of just all
+ * enabled extensions
+ * @param bool $extension_keys Whether the result should have extension name as array key
+ * @return array An array of paths to found directories
+ */
+ public function get_directories($cache = true, $use_all_available = false, $extension_keys = false)
+ {
+ return $this->find_with_root_path($cache, true, $use_all_available, $extension_keys);
+ }
+
+ /**
+ * Finds all files matching the configured options.
+ *
+ * @param bool $cache Whether the result should be cached
+ * @param bool $use_all_available Use all available instead of just all
+ * enabled extensions
+ * @return array An array of paths to found files
+ */
+ public function get_files($cache = true, $use_all_available = false)
+ {
+ return $this->find_with_root_path($cache, false, $use_all_available);
+ }
+
+ /**
+ * A wrapper around the general find which prepends a root path to results
+ *
+ * @param bool $cache Whether the result should be cached
+ * @param bool $is_dir Directories will be returned when true, only files
+ * otherwise
+ * @param bool $use_all_available Use all available instead of just all
+ * enabled extensions
+ * @param bool $extension_keys If true, result will be associative array
+ * with extension name as key
+ * @return array An array of paths to found items
+ */
+ protected function find_with_root_path($cache = true, $is_dir = false, $use_all_available = false, $extension_keys = false)
+ {
+ $items = $this->find($cache, $is_dir, $use_all_available);
+
+ $result = array();
+ foreach ($items as $item => $ext_name)
+ {
+ if ($extension_keys)
+ {
+ $result[$ext_name] = $this->phpbb_root_path . $item;
+ }
+ else
+ {
+ $result[] = $this->phpbb_root_path . $item;
+ }
+ }
+
+ return $result;
+ }
+
+ /**
+ * Finds all file system entries matching the configured options
+ *
+ * @param bool $cache Whether the result should be cached
+ * @param bool $is_dir Directories will be returned when true, only files
+ * otherwise
+ * @param bool $use_all_available Use all available instead of just all
+ * enabled extensions
+ * @return array An array of paths to found items
+ */
+ public function find($cache = true, $is_dir = false, $use_all_available = false)
+ {
+ if ($use_all_available)
+ {
+ $extensions = $this->extension_manager->all_available();
+ }
+ else
+ {
+ $extensions = $this->extension_manager->all_enabled();
+ }
+
+ if ($this->query['core_path'])
+ {
+ $extensions['/'] = $this->phpbb_root_path . $this->query['core_path'];
+ }
+
+ $files = array();
+ $file_list = $this->find_from_paths($extensions, $cache, $is_dir);
+
+ foreach ($file_list as $file)
+ {
+ $files[$file['named_path']] = $file['ext_name'];
+ }
+
+ return $files;
+ }
+
+ /**
+ * Finds all file system entries matching the configured options for one
+ * specific extension
+ *
+ * @param string $extension_name Name of the extension
+ * @param string $extension_path Relative path to the extension root directory
+ * @param bool $cache Whether the result should be cached
+ * @param bool $is_dir Directories will be returned when true, only files
+ * otherwise
+ * @return array An array of paths to found items
+ */
+ public function find_from_extension($extension_name, $extension_path, $cache = true, $is_dir = false)
+ {
+ $extensions = array(
+ $extension_name => $extension_path,
+ );
+
+ $files = array();
+ $file_list = $this->find_from_paths($extensions, $cache, $is_dir);
+
+ foreach ($file_list as $file)
+ {
+ $files[$file['named_path']] = $file['ext_name'];
+ }
+
+ return $files;
+ }
+
+ /**
+ * Finds all file system entries matching the configured options from
+ * an array of paths
+ *
+ * @param array $extensions Array of extensions (name => full relative path)
+ * @param bool $cache Whether the result should be cached
+ * @param bool $is_dir Directories will be returned when true, only files
+ * otherwise
+ * @return array An array of paths to found items
+ */
+ public function find_from_paths($extensions, $cache = true, $is_dir = false)
+ {
+ $this->query['is_dir'] = $is_dir;
+ $query = md5(serialize($this->query) . serialize($extensions));
+
+ if (!defined('DEBUG') && $cache && isset($this->cached_queries[$query]))
+ {
+ return $this->cached_queries[$query];
+ }
+
+ $files = array();
+
+ foreach ($extensions as $name => $path)
+ {
+ $ext_name = $name;
+
+ if (!file_exists($path))
+ {
+ continue;
+ }
+
+ if ($name === '/')
+ {
+ $location = $this->query['core_path'];
+ $name = '';
+ $suffix = $this->query['core_suffix'];
+ $prefix = $this->query['core_prefix'];
+ $directory = $this->query['core_directory'];
+ }
+ else
+ {
+ $location = 'ext/';
+ $name .= '/';
+ $suffix = $this->query['extension_suffix'];
+ $prefix = $this->query['extension_prefix'];
+ $directory = $this->query['extension_directory'];
+ }
+
+ // match only first directory if leading slash is given
+ if ($directory === '/')
+ {
+ $directory_pattern = '^' . preg_quote(DIRECTORY_SEPARATOR, '#');
+ }
+ else if ($directory && $directory[0] === '/')
+ {
+ $directory_pattern = '^' . preg_quote(str_replace('/', DIRECTORY_SEPARATOR, $directory) . DIRECTORY_SEPARATOR, '#');
+ }
+ else
+ {
+ $directory_pattern = preg_quote(DIRECTORY_SEPARATOR . str_replace('/', DIRECTORY_SEPARATOR, $directory) . DIRECTORY_SEPARATOR, '#');
+ }
+ if ($is_dir)
+ {
+ $directory_pattern .= '$';
+ }
+ $directory_pattern = '#' . $directory_pattern . '#';
+
+ $iterator = new \RecursiveIteratorIterator(
+ new \phpbb\recursive_dot_prefix_filter_iterator(
+ new \RecursiveDirectoryIterator(
+ $path,
+ \FilesystemIterator::SKIP_DOTS
+ )
+ ),
+ \RecursiveIteratorIterator::SELF_FIRST
+ );
+
+ foreach ($iterator as $file_info)
+ {
+ $filename = $file_info->getFilename();
+
+ if ($file_info->isDir() == $is_dir)
+ {
+ if ($is_dir)
+ {
+ $relative_path = $iterator->getInnerIterator()->getSubPath() . DIRECTORY_SEPARATOR . basename($filename) . DIRECTORY_SEPARATOR;
+ if ($relative_path[0] !== DIRECTORY_SEPARATOR)
+ {
+ $relative_path = DIRECTORY_SEPARATOR . $relative_path;
+ }
+ }
+ else
+ {
+ $relative_path = DIRECTORY_SEPARATOR . $iterator->getInnerIterator()->getSubPathname();
+ }
+
+ if ((!$suffix || substr($relative_path, -strlen($suffix)) === $suffix) &&
+ (!$prefix || substr($filename, 0, strlen($prefix)) === $prefix) &&
+ (!$directory || preg_match($directory_pattern, $relative_path)))
+ {
+ $files[] = array(
+ 'named_path' => str_replace(DIRECTORY_SEPARATOR, '/', $location . $name . substr($relative_path, 1)),
+ 'ext_name' => $ext_name,
+ 'path' => str_replace(array(DIRECTORY_SEPARATOR, $this->phpbb_root_path), array('/', ''), $file_info->getPath()) . '/',
+ 'filename' => $filename,
+ );
+ }
+ }
+ }
+ }
+
+ if ($cache && $this->cache)
+ {
+ $this->cached_queries[$query] = $files;
+ $this->cache->put($this->cache_name, $this->cached_queries);
+ }
+
+ return $files;
+ }
+}
diff --git a/phpBB/phpbb/extension/manager.php b/phpBB/phpbb/extension/manager.php
new file mode 100644
index 0000000000..993bd1b925
--- /dev/null
+++ b/phpBB/phpbb/extension/manager.php
@@ -0,0 +1,533 @@
+<?php
+/**
+*
+* @package extension
+* @copyright (c) 2011 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\extension;
+
+use Symfony\Component\DependencyInjection\ContainerInterface;
+
+/**
+* The extension manager provides means to activate/deactivate extensions.
+*
+* @package extension
+*/
+class manager
+{
+ /** @var ContainerInterface */
+ protected $container;
+
+ protected $db;
+ protected $config;
+ protected $cache;
+ protected $php_ext;
+ protected $extensions;
+ protected $extension_table;
+ protected $phpbb_root_path;
+ protected $cache_name;
+
+ /**
+ * Creates a manager and loads information from database
+ *
+ * @param ContainerInterface $container A container
+ * @param \phpbb\db\driver\driver $db A database connection
+ * @param \phpbb\config\config $config \phpbb\config\config
+ * @param \phpbb\filesystem $filesystem
+ * @param string $extension_table The name of the table holding extensions
+ * @param string $phpbb_root_path Path to the phpbb includes directory.
+ * @param string $php_ext php file extension
+ * @param \phpbb\cache\driver\driver_interface $cache A cache instance or null
+ * @param string $cache_name The name of the cache variable, defaults to _ext
+ */
+ public function __construct(ContainerInterface $container, \phpbb\db\driver\driver $db, \phpbb\config\config $config, \phpbb\filesystem $filesystem, $extension_table, $phpbb_root_path, $php_ext = 'php', \phpbb\cache\driver\driver_interface $cache = null, $cache_name = '_ext')
+ {
+ $this->container = $container;
+ $this->phpbb_root_path = $phpbb_root_path;
+ $this->db = $db;
+ $this->config = $config;
+ $this->cache = $cache;
+ $this->filesystem = $filesystem;
+ $this->php_ext = $php_ext;
+ $this->extension_table = $extension_table;
+ $this->cache_name = $cache_name;
+
+ $this->extensions = ($this->cache) ? $this->cache->get($this->cache_name) : false;
+
+ if ($this->extensions === false)
+ {
+ $this->load_extensions();
+ }
+ }
+
+ /**
+ * Loads all extension information from the database
+ *
+ * @return null
+ */
+ public function load_extensions()
+ {
+ $this->extensions = array();
+
+ // Do not try to load any extensions when installing or updating
+ // Note: database updater invokes this code, and in 3.0
+ // there is no extension table therefore the rest of this function
+ // fails
+ if (defined('IN_INSTALL'))
+ {
+ return;
+ }
+
+ $sql = 'SELECT *
+ FROM ' . $this->extension_table;
+
+ $result = $this->db->sql_query($sql);
+ $extensions = $this->db->sql_fetchrowset($result);
+ $this->db->sql_freeresult($result);
+
+ foreach ($extensions as $extension)
+ {
+ $extension['ext_path'] = $this->get_extension_path($extension['ext_name']);
+ $this->extensions[$extension['ext_name']] = $extension;
+ }
+
+ ksort($this->extensions);
+
+ if ($this->cache)
+ {
+ $this->cache->put($this->cache_name, $this->extensions);
+ }
+ }
+
+ /**
+ * Generates the path to an extension
+ *
+ * @param string $name The name of the extension
+ * @param bool $phpbb_relative Whether the path should be relative to phpbb root
+ * @return string Path to an extension
+ */
+ public function get_extension_path($name, $phpbb_relative = false)
+ {
+ $name = str_replace('.', '', $name);
+
+ return (($phpbb_relative) ? $this->phpbb_root_path : '') . 'ext/' . $name . '/';
+ }
+
+ /**
+ * Instantiates the extension meta class for the extension with the given name
+ *
+ * @param string $name The extension name
+ * @return \phpbb\extension\extension_interface Instance of the extension meta class or
+ * \phpbb\extension\base if the class does not exist
+ */
+ public function get_extension($name)
+ {
+ $extension_class_name = str_replace('/', '\\', $name) . '\\ext';
+
+ $migrator = $this->container->get('migrator');
+
+ if (class_exists($extension_class_name))
+ {
+ return new $extension_class_name($this->container, $this->get_finder(), $migrator, $name, $this->get_extension_path($name, true));
+ }
+ else
+ {
+ return new \phpbb\extension\base($this->container, $this->get_finder(), $migrator, $name, $this->get_extension_path($name, true));
+ }
+ }
+
+ /**
+ * Instantiates the metadata manager for the extension with the given name
+ *
+ * @param string $name The extension name
+ * @param string $template The template manager
+ * @return \phpbb\extension\metadata_manager Instance of the metadata manager
+ */
+ public function create_extension_metadata_manager($name, \phpbb\template\template $template)
+ {
+ return new \phpbb\extension\metadata_manager($name, $this->config, $this, $template, $this->phpbb_root_path);
+ }
+
+ /**
+ * Runs a step of the extension enabling process.
+ *
+ * Allows the exentension to enable in a long running script that works
+ * in multiple steps across requests. State is kept for the extension
+ * in the extensions table.
+ *
+ * @param string $name The extension's name
+ * @return bool False if enabling is finished, true otherwise
+ */
+ public function enable_step($name)
+ {
+ // ignore extensions that are already enabled
+ if (isset($this->extensions[$name]) && $this->extensions[$name]['ext_active'])
+ {
+ return false;
+ }
+
+ $old_state = (isset($this->extensions[$name]['ext_state'])) ? unserialize($this->extensions[$name]['ext_state']) : false;
+
+ $extension = $this->get_extension($name);
+ $state = $extension->enable_step($old_state);
+
+ $active = ($state === false);
+
+ $extension_data = array(
+ 'ext_name' => $name,
+ 'ext_active' => $active,
+ 'ext_state' => serialize($state),
+ );
+
+ $this->extensions[$name] = $extension_data;
+ $this->extensions[$name]['ext_path'] = $this->get_extension_path($extension_data['ext_name']);
+ ksort($this->extensions);
+
+ $sql = 'SELECT COUNT(ext_name) as row_count
+ FROM ' . $this->extension_table . "
+ WHERE ext_name = '" . $this->db->sql_escape($name) . "'";
+ $result = $this->db->sql_query($sql);
+ $count = $this->db->sql_fetchfield('row_count');
+ $this->db->sql_freeresult($result);
+
+ if ($count)
+ {
+ $sql = 'UPDATE ' . $this->extension_table . '
+ SET ' . $this->db->sql_build_array('UPDATE', $extension_data) . "
+ WHERE ext_name = '" . $this->db->sql_escape($name) . "'";
+ $this->db->sql_query($sql);
+ }
+ else
+ {
+ $sql = 'INSERT INTO ' . $this->extension_table . '
+ ' . $this->db->sql_build_array('INSERT', $extension_data);
+ $this->db->sql_query($sql);
+ }
+
+ if ($this->cache)
+ {
+ $this->cache->purge();
+ }
+
+ if ($active)
+ {
+ $this->config->increment('assets_version', 1);
+ }
+
+ return !$active;
+ }
+
+ /**
+ * Enables an extension
+ *
+ * This method completely enables an extension. But it could be long running
+ * so never call this in a script that has a max_execution time.
+ *
+ * @param string $name The extension's name
+ * @return null
+ */
+ public function enable($name)
+ {
+ // @codingStandardsIgnoreStart
+ while ($this->enable_step($name));
+ // @codingStandardsIgnoreEnd
+ }
+
+ /**
+ * Disables an extension
+ *
+ * Calls the disable method on the extension's meta class to allow it to
+ * process the event.
+ *
+ * @param string $name The extension's name
+ * @return bool False if disabling is finished, true otherwise
+ */
+ public function disable_step($name)
+ {
+ // ignore extensions that are already disabled
+ if (!isset($this->extensions[$name]) || !$this->extensions[$name]['ext_active'])
+ {
+ return false;
+ }
+
+ $old_state = unserialize($this->extensions[$name]['ext_state']);
+
+ $extension = $this->get_extension($name);
+ $state = $extension->disable_step($old_state);
+
+ // continue until the state is false
+ if ($state !== false)
+ {
+ $extension_data = array(
+ 'ext_state' => serialize($state),
+ );
+ $this->extensions[$name]['ext_state'] = serialize($state);
+
+ $sql = 'UPDATE ' . $this->extension_table . '
+ SET ' . $this->db->sql_build_array('UPDATE', $extension_data) . "
+ WHERE ext_name = '" . $this->db->sql_escape($name) . "'";
+ $this->db->sql_query($sql);
+
+ if ($this->cache)
+ {
+ $this->cache->purge();
+ }
+
+ return true;
+ }
+
+ $extension_data = array(
+ 'ext_active' => false,
+ 'ext_state' => serialize(false),
+ );
+ $this->extensions[$name]['ext_active'] = false;
+ $this->extensions[$name]['ext_state'] = serialize(false);
+
+ $sql = 'UPDATE ' . $this->extension_table . '
+ SET ' . $this->db->sql_build_array('UPDATE', $extension_data) . "
+ WHERE ext_name = '" . $this->db->sql_escape($name) . "'";
+ $this->db->sql_query($sql);
+
+ if ($this->cache)
+ {
+ $this->cache->purge();
+ }
+
+ return false;
+ }
+
+ /**
+ * Disables an extension
+ *
+ * Disables an extension completely at once. This process could run for a
+ * while so never call this in a script that has a max_execution time.
+ *
+ * @param string $name The extension's name
+ * @return null
+ */
+ public function disable($name)
+ {
+ // @codingStandardsIgnoreStart
+ while ($this->disable_step($name));
+ // @codingStandardsIgnoreEnd
+ }
+
+ /**
+ * Purge an extension
+ *
+ * Disables the extension first if active, and then calls purge on the
+ * extension's meta class to delete the extension's database content.
+ *
+ * @param string $name The extension's name
+ * @return bool False if purging is finished, true otherwise
+ */
+ public function purge_step($name)
+ {
+ // ignore extensions that do not exist
+ if (!isset($this->extensions[$name]))
+ {
+ return false;
+ }
+
+ // disable first if necessary
+ if ($this->extensions[$name]['ext_active'])
+ {
+ $this->disable($name);
+ }
+
+ $old_state = unserialize($this->extensions[$name]['ext_state']);
+
+ $extension = $this->get_extension($name);
+ $state = $extension->purge_step($old_state);
+
+ // continue until the state is false
+ if ($state !== false)
+ {
+ $extension_data = array(
+ 'ext_state' => serialize($state),
+ );
+ $this->extensions[$name]['ext_state'] = serialize($state);
+
+ $sql = 'UPDATE ' . $this->extension_table . '
+ SET ' . $this->db->sql_build_array('UPDATE', $extension_data) . "
+ WHERE ext_name = '" . $this->db->sql_escape($name) . "'";
+ $this->db->sql_query($sql);
+
+ if ($this->cache)
+ {
+ $this->cache->purge();
+ }
+
+ return true;
+ }
+
+ unset($this->extensions[$name]);
+
+ $sql = 'DELETE FROM ' . $this->extension_table . "
+ WHERE ext_name = '" . $this->db->sql_escape($name) . "'";
+ $this->db->sql_query($sql);
+
+ if ($this->cache)
+ {
+ $this->cache->purge();
+ }
+
+ return false;
+ }
+
+ /**
+ * Purge an extension
+ *
+ * Purges an extension completely at once. This process could run for a while
+ * so never call this in a script that has a max_execution time.
+ *
+ * @param string $name The extension's name
+ * @return null
+ */
+ public function purge($name)
+ {
+ // @codingStandardsIgnoreStart
+ while ($this->purge_step($name));
+ // @codingStandardsIgnoreEnd
+ }
+
+ /**
+ * Retrieves a list of all available extensions on the filesystem
+ *
+ * @return array An array with extension names as keys and paths to the
+ * extension as values
+ */
+ public function all_available()
+ {
+ $available = array();
+ if (!is_dir($this->phpbb_root_path . 'ext/'))
+ {
+ return $available;
+ }
+
+ $iterator = new \RecursiveIteratorIterator(
+ new \RecursiveDirectoryIterator($this->phpbb_root_path . 'ext/', \FilesystemIterator::NEW_CURRENT_AND_KEY | \FilesystemIterator::FOLLOW_SYMLINKS),
+ \RecursiveIteratorIterator::SELF_FIRST);
+ foreach ($iterator as $file_info)
+ {
+ if ($file_info->isFile() && $file_info->getFilename() == 'ext.' . $this->php_ext)
+ {
+ $ext_name = $iterator->getInnerIterator()->getSubPath();
+ $composer_file = $iterator->getPath() . '/composer.json';
+
+ // Ignore the extension if there is no composer.json.
+ if (!is_readable($composer_file) || !($ext_info = file_get_contents($composer_file)))
+ {
+ continue;
+ }
+
+ $ext_info = json_decode($ext_info, true);
+ $ext_name = str_replace(DIRECTORY_SEPARATOR, '/', $ext_name);
+
+ // Ignore the extension if directory depth is not correct or if the directory structure
+ // does not match the name value specified in composer.json.
+ if (substr_count($ext_name, '/') !== 1 || !isset($ext_info['name']) || $ext_name != $ext_info['name'])
+ {
+ continue;
+ }
+
+ $available[$ext_name] = $this->phpbb_root_path . 'ext/' . $ext_name . '/';
+ }
+ }
+ ksort($available);
+ return $available;
+ }
+
+ /**
+ * Retrieves all configured extensions.
+ *
+ * All enabled and disabled extensions are considered configured. A purged
+ * extension that is no longer in the database is not configured.
+ *
+ * @return array An array with extension names as keys and and the
+ * database stored extension information as values
+ */
+ public function all_configured()
+ {
+ $configured = array();
+ foreach ($this->extensions as $name => $data)
+ {
+ $data['ext_path'] = $this->phpbb_root_path . $data['ext_path'];
+ $configured[$name] = $data;
+ }
+ return $configured;
+ }
+
+ /**
+ * Retrieves all enabled extensions.
+ *
+ * @return array An array with extension names as keys and and the
+ * database stored extension information as values
+ */
+ public function all_enabled()
+ {
+ $enabled = array();
+ foreach ($this->extensions as $name => $data)
+ {
+ if ($data['ext_active'])
+ {
+ $enabled[$name] = $this->phpbb_root_path . $data['ext_path'];
+ }
+ }
+ return $enabled;
+ }
+
+ /**
+ * Retrieves all disabled extensions.
+ *
+ * @return array An array with extension names as keys and and the
+ * database stored extension information as values
+ */
+ public function all_disabled()
+ {
+ $disabled = array();
+ foreach ($this->extensions as $name => $data)
+ {
+ if (!$data['ext_active'])
+ {
+ $disabled[$name] = $this->phpbb_root_path . $data['ext_path'];
+ }
+ }
+ return $disabled;
+ }
+
+ /**
+ * Check to see if a given extension is available on the filesystem
+ *
+ * @param string $name Extension name to check NOTE: Can be user input
+ * @return bool Depending on whether or not the extension is available
+ */
+ public function available($name)
+ {
+ return file_exists($this->get_extension_path($name, true));
+ }
+
+ /**
+ * Check to see if a given extension is enabled
+ *
+ * @param string $name Extension name to check
+ * @return bool Depending on whether or not the extension is enabled
+ */
+ public function enabled($name)
+ {
+ return isset($this->extensions[$name]) && $this->extensions[$name]['ext_active'];
+ }
+
+ /**
+ * Instantiates a \phpbb\extension\finder.
+ *
+ * @return \phpbb\extension\finder An extension finder instance
+ */
+ public function get_finder()
+ {
+ return new \phpbb\extension\finder($this, $this->filesystem, $this->phpbb_root_path, $this->cache, $this->php_ext, $this->cache_name . '_finder');
+ }
+}
diff --git a/phpBB/phpbb/extension/metadata_manager.php b/phpBB/phpbb/extension/metadata_manager.php
new file mode 100644
index 0000000000..c90445ee09
--- /dev/null
+++ b/phpBB/phpbb/extension/metadata_manager.php
@@ -0,0 +1,375 @@
+<?php
+/**
+*
+* @package extension
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\extension;
+
+/**
+* The extension metadata manager validates and gets meta-data for extensions
+*
+* @package extension
+*/
+class metadata_manager
+{
+ /**
+ * phpBB Config instance
+ * @var \phpbb\config\config
+ */
+ protected $config;
+
+ /**
+ * phpBB Extension Manager
+ * @var \phpbb\extension\manager
+ */
+ protected $extension_manager;
+
+ /**
+ * phpBB Template instance
+ * @var \phpbb\template\template
+ */
+ protected $template;
+
+ /**
+ * phpBB root path
+ * @var string
+ */
+ protected $phpbb_root_path;
+
+ /**
+ * Name (including vendor) of the extension
+ * @var string
+ */
+ protected $ext_name;
+
+ /**
+ * Metadata from the composer.json file
+ * @var array
+ */
+ protected $metadata;
+
+ /**
+ * Link (including root path) to the metadata file
+ * @var string
+ */
+ protected $metadata_file;
+
+ /**
+ * Creates the metadata manager
+ *
+ * @param string $ext_name Name (including vendor) of the extension
+ * @param \phpbb\config\config $config phpBB Config instance
+ * @param \phpbb\extension\manager $extension_manager An instance of the phpBBb extension manager
+ * @param \phpbb\template\template $template phpBB Template instance
+ * @param string $phpbb_root_path Path to the phpbb includes directory.
+ */
+ public function __construct($ext_name, \phpbb\config\config $config, \phpbb\extension\manager $extension_manager, \phpbb\template\template $template, $phpbb_root_path)
+ {
+ $this->config = $config;
+ $this->extension_manager = $extension_manager;
+ $this->template = $template;
+ $this->phpbb_root_path = $phpbb_root_path;
+
+ $this->ext_name = $ext_name;
+ $this->metadata = array();
+ $this->metadata_file = '';
+ }
+
+ /**
+ * Processes and gets the metadata requested
+ *
+ * @param string $element All for all metadata that it has and is valid, otherwise specify which section you want by its shorthand term.
+ * @return array Contains all of the requested metadata, throws an exception on failure
+ */
+ public function get_metadata($element = 'all')
+ {
+ $this->set_metadata_file();
+
+ // Fetch the metadata
+ $this->fetch_metadata();
+
+ // Clean the metadata
+ $this->clean_metadata_array();
+
+ switch ($element)
+ {
+ case 'all':
+ default:
+ // Validate the metadata
+ if (!$this->validate())
+ {
+ return false;
+ }
+
+ return $this->metadata;
+ break;
+
+ case 'name':
+ return ($this->validate('name')) ? $this->metadata['name'] : false;
+ break;
+
+ case 'display-name':
+ if (isset($this->metadata['extra']['display-name']))
+ {
+ return $this->metadata['extra']['display-name'];
+ }
+ else
+ {
+ return ($this->validate('name')) ? $this->metadata['name'] : false;
+ }
+ break;
+ }
+ }
+
+ /**
+ * Sets the filepath of the metadata file
+ *
+ * @return boolean Set to true if it exists, throws an exception on failure
+ */
+ private function set_metadata_file()
+ {
+ $ext_filepath = $this->extension_manager->get_extension_path($this->ext_name);
+ $metadata_filepath = $this->phpbb_root_path . $ext_filepath . 'composer.json';
+
+ $this->metadata_file = $metadata_filepath;
+
+ if (!file_exists($this->metadata_file))
+ {
+ throw new \phpbb\extension\exception('The required file does not exist: ' . $this->metadata_file);
+ }
+ }
+
+ /**
+ * Gets the contents of the composer.json file
+ *
+ * @return bool True if success, throws an exception on failure
+ */
+ private function fetch_metadata()
+ {
+ if (!file_exists($this->metadata_file))
+ {
+ throw new \phpbb\extension\exception('The required file does not exist: ' . $this->metadata_file);
+ }
+ else
+ {
+ if (!($file_contents = file_get_contents($this->metadata_file)))
+ {
+ throw new \phpbb\extension\exception('file_get_contents failed on ' . $this->metadata_file);
+ }
+
+ if (($metadata = json_decode($file_contents, true)) === null)
+ {
+ throw new \phpbb\extension\exception('json_decode failed on ' . $this->metadata_file);
+ }
+
+ $this->metadata = $metadata;
+
+ return true;
+ }
+ }
+
+ /**
+ * This array handles the cleaning of the array
+ *
+ * @return array Contains the cleaned metadata array
+ */
+ private function clean_metadata_array()
+ {
+ return $this->metadata;
+ }
+
+ /**
+ * Validate fields
+ *
+ * @param string $name ("all" for display and enable validation
+ * "display" for name, type, and authors
+ * "name", "type")
+ * @return Bool True if valid, throws an exception if invalid
+ */
+ public function validate($name = 'display')
+ {
+ // Basic fields
+ $fields = array(
+ 'name' => '#^[a-zA-Z0-9_\x7f-\xff]{2,}/[a-zA-Z0-9_\x7f-\xff]{2,}$#',
+ 'type' => '#^phpbb-extension$#',
+ 'license' => '#.+#',
+ 'version' => '#.+#',
+ );
+
+ switch ($name)
+ {
+ case 'all':
+ $this->validate('display');
+
+ $this->validate_enable();
+ break;
+
+ case 'display':
+ foreach ($fields as $field => $data)
+ {
+ $this->validate($field);
+ }
+
+ $this->validate_authors();
+ break;
+
+ default:
+ if (isset($fields[$name]))
+ {
+ if (!isset($this->metadata[$name]))
+ {
+ throw new \phpbb\extension\exception("Required meta field '$name' has not been set.");
+ }
+
+ if (!preg_match($fields[$name], $this->metadata[$name]))
+ {
+ throw new \phpbb\extension\exception("Meta field '$name' is invalid.");
+ }
+ }
+ break;
+ }
+
+ return true;
+ }
+
+ /**
+ * Validates the contents of the authors field
+ *
+ * @return boolean True when passes validation, throws exception if invalid
+ */
+ public function validate_authors()
+ {
+ if (empty($this->metadata['authors']))
+ {
+ throw new \phpbb\extension\exception("Required meta field 'authors' has not been set.");
+ }
+
+ foreach ($this->metadata['authors'] as $author)
+ {
+ if (!isset($author['name']))
+ {
+ throw new \phpbb\extension\exception("Required meta field 'author name' has not been set.");
+ }
+ }
+
+ return true;
+ }
+
+ /**
+ * This array handles the verification that this extension can be enabled on this board
+ *
+ * @return bool True if validation succeeded, False if failed
+ */
+ public function validate_enable()
+ {
+ // Check for valid directory & phpBB, PHP versions
+ if (!$this->validate_dir() || !$this->validate_require_phpbb() || !$this->validate_require_php())
+ {
+ return false;
+ }
+
+ return true;
+ }
+
+ /**
+ * Validates the most basic directory structure to ensure it follows <vendor>/<ext> convention.
+ *
+ * @return boolean True when passes validation
+ */
+ public function validate_dir()
+ {
+ return (substr_count($this->ext_name, '/') === 1 && $this->ext_name == $this->get_metadata('name'));
+ }
+
+
+ /**
+ * Validates the contents of the phpbb requirement field
+ *
+ * @return boolean True when passes validation
+ */
+ public function validate_require_phpbb()
+ {
+ if (!isset($this->metadata['require']['phpbb/phpbb']))
+ {
+ return false;
+ }
+
+ return true;
+ }
+
+ /**
+ * Validates the contents of the php requirement field
+ *
+ * @return boolean True when passes validation
+ */
+ public function validate_require_php()
+ {
+ if (!isset($this->metadata['require']['php']))
+ {
+ return false;
+ }
+
+ return true;
+ }
+
+ /**
+ * Version validation helper
+ *
+ * @param string $string The string for comparing to a version
+ * @param string $current_version The version to compare to
+ * @return bool True/False if meets version requirements
+ */
+ private function _validate_version($string, $current_version)
+ {
+ // Allow them to specify their own comparison operator (ex: <3.1.2, >=3.1.0)
+ $comparison_matches = false;
+ preg_match('#[=<>]+#', $string, $comparison_matches);
+
+ if (!empty($comparison_matches))
+ {
+ return version_compare($current_version, str_replace(array($comparison_matches[0], ' '), '', $string), $comparison_matches[0]);
+ }
+
+ return version_compare($current_version, $string, '>=');
+ }
+
+ /**
+ * Outputs the metadata into the template
+ *
+ * @return null
+ */
+ public function output_template_data()
+ {
+ $this->template->assign_vars(array(
+ 'META_NAME' => htmlspecialchars($this->metadata['name']),
+ 'META_TYPE' => htmlspecialchars($this->metadata['type']),
+ 'META_DESCRIPTION' => (isset($this->metadata['description'])) ? htmlspecialchars($this->metadata['description']) : '',
+ 'META_HOMEPAGE' => (isset($this->metadata['homepage'])) ? $this->metadata['homepage'] : '',
+ 'META_VERSION' => (isset($this->metadata['version'])) ? htmlspecialchars($this->metadata['version']) : '',
+ 'META_TIME' => (isset($this->metadata['time'])) ? htmlspecialchars($this->metadata['time']) : '',
+ 'META_LICENSE' => htmlspecialchars($this->metadata['license']),
+
+ 'META_REQUIRE_PHP' => (isset($this->metadata['require']['php'])) ? htmlspecialchars($this->metadata['require']['php']) : '',
+ 'META_REQUIRE_PHP_FAIL' => !$this->validate_require_php(),
+
+ 'META_REQUIRE_PHPBB' => (isset($this->metadata['require']['phpbb/phpbb'])) ? htmlspecialchars($this->metadata['require']['phpbb/phpbb']) : '',
+ 'META_REQUIRE_PHPBB_FAIL' => !$this->validate_require_phpbb(),
+
+ 'META_DISPLAY_NAME' => (isset($this->metadata['extra']['display-name'])) ? htmlspecialchars($this->metadata['extra']['display-name']) : '',
+ ));
+
+ foreach ($this->metadata['authors'] as $author)
+ {
+ $this->template->assign_block_vars('meta_authors', array(
+ 'AUTHOR_NAME' => htmlspecialchars($author['name']),
+ 'AUTHOR_EMAIL' => (isset($author['email'])) ? $author['email'] : '',
+ 'AUTHOR_HOMEPAGE' => (isset($author['homepage'])) ? $author['homepage'] : '',
+ 'AUTHOR_ROLE' => (isset($author['role'])) ? htmlspecialchars($author['role']) : '',
+ ));
+ }
+ }
+}
diff --git a/phpBB/phpbb/extension/provider.php b/phpBB/phpbb/extension/provider.php
new file mode 100644
index 0000000000..bfdc2b66b9
--- /dev/null
+++ b/phpBB/phpbb/extension/provider.php
@@ -0,0 +1,70 @@
+<?php
+/**
+*
+* @package extension
+* @copyright (c) 2011 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\extension;
+
+/**
+* Provides a set of items found in extensions.
+*
+* This abstract class is essentially a wrapper around item-specific
+* finding logic. It handles storing the extension manager via constructor
+* for the finding logic to use to find the items, and provides an
+* iterator interface over the items found by the finding logic.
+*
+* Items could be anything, for example template paths or cron task names.
+* Derived classes completely define what the items are.
+*
+* @package extension
+*/
+abstract class provider implements \IteratorAggregate
+{
+ /**
+ * Array holding all found items
+ * @var array|null
+ */
+ protected $items = null;
+
+ /**
+ * An extension manager to search for items in extensions
+ * @var \phpbb\extension\manager
+ */
+ protected $extension_manager;
+
+ /**
+ * Constructor. Loads all available items.
+ *
+ * @param \phpbb\extension\manager $extension_manager phpBB extension manager
+ */
+ public function __construct(\phpbb\extension\manager $extension_manager)
+ {
+ $this->extension_manager = $extension_manager;
+ }
+
+ /**
+ * Finds items using the extension manager.
+ *
+ * @return array List of task names
+ */
+ abstract protected function find();
+
+ /**
+ * Retrieve an iterator over all items
+ *
+ * @return ArrayIterator An iterator for the array of template paths
+ */
+ public function getIterator()
+ {
+ if ($this->items === null)
+ {
+ $this->items = $this->find();
+ }
+
+ return new \ArrayIterator($this->items);
+ }
+}
diff --git a/phpBB/phpbb/feed/base.php b/phpBB/phpbb/feed/base.php
new file mode 100644
index 0000000000..e6c1e606fa
--- /dev/null
+++ b/phpBB/phpbb/feed/base.php
@@ -0,0 +1,255 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\feed;
+
+/**
+* Base class with some generic functions and settings.
+*
+* @package phpBB3
+*/
+abstract class base
+{
+ /**
+ * Feed helper object
+ * @var \phpbb\feed\helper
+ */
+ protected $helper;
+
+ /** @var \phpbb\config\config */
+ protected $config;
+
+ /** @var \phpbb\db\driver\driver */
+ protected $db;
+
+ /** @var \phpbb\cache\driver\driver_interface */
+ protected $cache;
+
+ /** @var \phpbb\user */
+ protected $user;
+
+ /** @var \phpbb\auth\auth */
+ protected $auth;
+
+ /** @var string */
+ protected $phpEx;
+
+ /**
+ * SQL Query to be executed to get feed items
+ */
+ var $sql = array();
+
+ /**
+ * Keys specified for retrieval of title, content, etc.
+ */
+ var $keys = array();
+
+ /**
+ * Number of items to fetch. Usually overwritten by $config['feed_something']
+ */
+ var $num_items = 15;
+
+ /**
+ * Separator for title elements to separate items (for example forum / topic)
+ */
+ var $separator = "\xE2\x80\xA2"; // &bull;
+
+ /**
+ * Separator for the statistics row (Posted by, post date, replies, etc.)
+ */
+ var $separator_stats = "\xE2\x80\x94"; // &mdash;
+
+ /**
+ * Constructor
+ *
+ * @param \phpbb\feed\helper $helper Feed helper
+ * @param \phpbb\config\config $config Config object
+ * @param \phpbb\db\driver\driver $db Database connection
+ * @param \phpbb\cache\driver\driver_interface $cache Cache object
+ * @param \phpbb\user $user User object
+ * @param \phpbb\auth\auth $auth Auth object
+ * @param \phpbb\content_visibility $content_visibility Auth object
+ * @param string $phpEx php file extension
+ * @return null
+ */
+ function __construct(\phpbb\feed\helper $helper, \phpbb\config\config $config, \phpbb\db\driver\driver $db, \phpbb\cache\driver\driver_interface $cache, \phpbb\user $user, \phpbb\auth\auth $auth, \phpbb\content_visibility $content_visibility, $phpEx)
+ {
+ $this->config = $config;
+ $this->helper = $helper;
+ $this->db = $db;
+ $this->cache = $cache;
+ $this->user = $user;
+ $this->auth = $auth;
+ $this->content_visibility = $content_visibility;
+ $this->phpEx = $phpEx;
+
+ $this->set_keys();
+
+ // Allow num_items to be string
+ if (is_string($this->num_items))
+ {
+ $this->num_items = (int) $this->config[$this->num_items];
+
+ // A precaution
+ if (!$this->num_items)
+ {
+ $this->num_items = 10;
+ }
+ }
+ }
+
+ /**
+ * Set keys.
+ */
+ function set_keys()
+ {
+ }
+
+ /**
+ * Open feed
+ */
+ function open()
+ {
+ }
+
+ /**
+ * Close feed
+ */
+ function close()
+ {
+ if (!empty($this->result))
+ {
+ $this->db->sql_freeresult($this->result);
+ }
+ }
+
+ /**
+ * Set key
+ */
+ function set($key, $value)
+ {
+ $this->keys[$key] = $value;
+ }
+
+ /**
+ * Get key
+ */
+ function get($key)
+ {
+ return (isset($this->keys[$key])) ? $this->keys[$key] : null;
+ }
+
+ function get_readable_forums()
+ {
+ static $forum_ids;
+
+ if (!isset($forum_ids))
+ {
+ $forum_ids = array_keys($this->auth->acl_getf('f_read', true));
+ }
+
+ return $forum_ids;
+ }
+
+ function get_moderator_approve_forums()
+ {
+ static $forum_ids;
+
+ if (!isset($forum_ids))
+ {
+ $forum_ids = array_keys($this->auth->acl_getf('m_approve', true));
+ }
+
+ return $forum_ids;
+ }
+
+ function is_moderator_approve_forum($forum_id)
+ {
+ static $forum_ids;
+
+ if (!isset($forum_ids))
+ {
+ $forum_ids = array_flip($this->get_moderator_approve_forums());
+ }
+
+ return (isset($forum_ids[$forum_id])) ? true : false;
+ }
+
+ function get_excluded_forums()
+ {
+ static $forum_ids;
+
+ // Matches acp/acp_board.php
+ $cache_name = 'feed_excluded_forum_ids';
+
+ if (!isset($forum_ids) && ($forum_ids = $this->cache->get('_' . $cache_name)) === false)
+ {
+ $sql = 'SELECT forum_id
+ FROM ' . FORUMS_TABLE . '
+ WHERE ' . $this->db->sql_bit_and('forum_options', FORUM_OPTION_FEED_EXCLUDE, '<> 0');
+ $result = $this->db->sql_query($sql);
+
+ $forum_ids = array();
+ while ($forum_id = (int) $this->db->sql_fetchfield('forum_id'))
+ {
+ $forum_ids[$forum_id] = $forum_id;
+ }
+ $this->db->sql_freeresult($result);
+
+ $this->cache->put('_' . $cache_name, $forum_ids);
+ }
+
+ return $forum_ids;
+ }
+
+ function is_excluded_forum($forum_id)
+ {
+ $forum_ids = $this->get_excluded_forums();
+
+ return isset($forum_ids[$forum_id]) ? true : false;
+ }
+
+ function get_passworded_forums()
+ {
+ return $this->user->get_passworded_forums();
+ }
+
+ function get_item()
+ {
+ static $result;
+
+ if (!isset($result))
+ {
+ if (!$this->get_sql())
+ {
+ return false;
+ }
+
+ // Query database
+ $sql = $this->db->sql_build_query('SELECT', $this->sql);
+ $result = $this->db->sql_query_limit($sql, $this->num_items);
+ }
+
+ return $this->db->sql_fetchrow($result);
+ }
+
+ function user_viewprofile($row)
+ {
+ $author_id = (int) $row[$this->get('author_id')];
+
+ if ($author_id == ANONYMOUS)
+ {
+ // Since we cannot link to a profile, we just return GUEST
+ // instead of $row['username']
+ return $this->user->lang['GUEST'];
+ }
+
+ return '<a href="' . $this->helper->append_sid('memberlist.' . $this->phpEx, 'mode=viewprofile&amp;u=' . $author_id) . '">' . $row[$this->get('creator')] . '</a>';
+ }
+}
diff --git a/phpBB/phpbb/feed/factory.php b/phpBB/phpbb/feed/factory.php
new file mode 100644
index 0000000000..d370160563
--- /dev/null
+++ b/phpBB/phpbb/feed/factory.php
@@ -0,0 +1,123 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\feed;
+
+/**
+* Factory class to return correct object
+* @package phpBB3
+*/
+class factory
+{
+ /**
+ * Service container object
+ * @var object
+ */
+ protected $container;
+
+ /** @var \phpbb\config\config */
+ protected $config;
+
+ /** @var \phpbb\db\driver\driver */
+ protected $db;
+
+ /**
+ * Constructor
+ *
+ * @param objec $container Container object
+ * @param \phpbb\config\config $config Config object
+ * @param \phpbb\db\driver\driver $db Database connection
+ * @return null
+ */
+ public function __construct($container, \phpbb\config\config $config, \phpbb\db\driver\driver $db)
+ {
+ $this->container = $container;
+ $this->config = $config;
+ $this->db = $db;
+ }
+
+ /**
+ * Return correct object for specified mode
+ *
+ * @param string $mode The feeds mode.
+ * @param int $forum_id Forum id specified by the script if forum feed provided.
+ * @param int $topic_id Topic id specified by the script if topic feed provided.
+ *
+ * @return object Returns correct feeds object for specified mode.
+ */
+ function get_feed($mode, $forum_id, $topic_id)
+ {
+ switch ($mode)
+ {
+ case 'forums':
+ if (!$this->config['feed_overall_forums'])
+ {
+ return false;
+ }
+
+ return $this->container->get('feed.forums');
+ break;
+
+ case 'topics':
+ case 'topics_new':
+ if (!$this->config['feed_topics_new'])
+ {
+ return false;
+ }
+
+ return $this->container->get('feed.topics');
+ break;
+
+ case 'topics_active':
+ if (!$this->config['feed_topics_active'])
+ {
+ return false;
+ }
+
+ return $this->container->get('feed.topics_active');
+ break;
+
+ case 'news':
+ // Get at least one news forum
+ $sql = 'SELECT forum_id
+ FROM ' . FORUMS_TABLE . '
+ WHERE ' . $this->db->sql_bit_and('forum_options', FORUM_OPTION_FEED_NEWS, '<> 0');
+ $result = $this->db->sql_query_limit($sql, 1, 0, 600);
+ $s_feed_news = (int) $this->db->sql_fetchfield('forum_id');
+ $this->db->sql_freeresult($result);
+
+ if (!$s_feed_news)
+ {
+ return false;
+ }
+
+ return $this->container->get('feed.news');
+ break;
+
+ default:
+ if ($topic_id && $this->config['feed_topic'])
+ {
+ return $this->container->get('feed.topic')
+ ->set_topic_id($topic_id);
+ }
+ else if ($forum_id && $this->config['feed_forum'])
+ {
+ return $this->container->get('feed.forum')
+ ->set_forum_id($forum_id);
+ }
+ else if ($this->config['feed_overall'])
+ {
+ return $this->container->get('feed.overall');
+ }
+
+ return false;
+ break;
+ }
+ }
+}
diff --git a/phpBB/phpbb/feed/forum.php b/phpBB/phpbb/feed/forum.php
new file mode 100644
index 0000000000..85ecb60f7e
--- /dev/null
+++ b/phpBB/phpbb/feed/forum.php
@@ -0,0 +1,139 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\feed;
+
+/**
+* Forum feed
+*
+* This will give you the last {$this->num_items} posts made
+* within a specific forum.
+*
+* @package phpBB3
+*/
+class forum extends \phpbb\feed\post_base
+{
+ var $forum_id = 0;
+ var $forum_data = array();
+
+ /**
+ * Set the Forum ID
+ *
+ * @param int $forum_id Forum ID
+ * @return \phpbb\feed\forum
+ */
+ public function set_forum_id($forum_id)
+ {
+ $this->forum_id = (int) $forum_id;
+
+ return $this;
+ }
+
+ function open()
+ {
+ // Check if forum exists
+ $sql = 'SELECT forum_id, forum_name, forum_password, forum_type, forum_options
+ FROM ' . FORUMS_TABLE . '
+ WHERE forum_id = ' . $this->forum_id;
+ $result = $this->db->sql_query($sql);
+ $this->forum_data = $this->db->sql_fetchrow($result);
+ $this->db->sql_freeresult($result);
+
+ if (empty($this->forum_data))
+ {
+ trigger_error('NO_FORUM');
+ }
+
+ // Forum needs to be postable
+ if ($this->forum_data['forum_type'] != FORUM_POST)
+ {
+ trigger_error('NO_FEED');
+ }
+
+ // Make sure forum is not excluded from feed
+ if (phpbb_optionget(FORUM_OPTION_FEED_EXCLUDE, $this->forum_data['forum_options']))
+ {
+ trigger_error('NO_FEED');
+ }
+
+ // Make sure we can read this forum
+ if (!$this->auth->acl_get('f_read', $this->forum_id))
+ {
+ trigger_error('SORRY_AUTH_READ');
+ }
+
+ // Make sure forum is not passworded or user is authed
+ if ($this->forum_data['forum_password'])
+ {
+ $forum_ids_passworded = $this->get_passworded_forums();
+
+ if (isset($forum_ids_passworded[$this->forum_id]))
+ {
+ trigger_error('SORRY_AUTH_READ');
+ }
+
+ unset($forum_ids_passworded);
+ }
+ }
+
+ function get_sql()
+ {
+ // Determine topics with recent activity
+ $sql = 'SELECT topic_id, topic_last_post_time
+ FROM ' . TOPICS_TABLE . '
+ WHERE forum_id = ' . $this->forum_id . '
+ AND topic_moved_id = 0
+ AND ' . $this->content_visibility->get_visibility_sql('topic', $this->forum_id) . '
+ ORDER BY topic_last_post_time DESC';
+ $result = $this->db->sql_query_limit($sql, $this->num_items);
+
+ $topic_ids = array();
+ $min_post_time = 0;
+ while ($row = $this->db->sql_fetchrow())
+ {
+ $topic_ids[] = (int) $row['topic_id'];
+
+ $min_post_time = (int) $row['topic_last_post_time'];
+ }
+ $this->db->sql_freeresult($result);
+
+ if (empty($topic_ids))
+ {
+ return false;
+ }
+
+ $this->sql = array(
+ 'SELECT' => 'p.post_id, p.topic_id, p.post_time, p.post_edit_time, p.post_visibility, p.post_subject, p.post_text, p.bbcode_bitfield, p.bbcode_uid, p.enable_bbcode, p.enable_smilies, p.enable_magic_url, p.post_attachment, ' .
+ 'u.username, u.user_id',
+ 'FROM' => array(
+ POSTS_TABLE => 'p',
+ USERS_TABLE => 'u',
+ ),
+ 'WHERE' => $this->db->sql_in_set('p.topic_id', $topic_ids) . '
+ AND ' . $this->content_visibility->get_visibility_sql('post', $this->forum_id, 'p.') . '
+ AND p.post_time >= ' . $min_post_time . '
+ AND p.poster_id = u.user_id',
+ 'ORDER_BY' => 'p.post_time DESC',
+ );
+
+ return true;
+ }
+
+ function adjust_item(&$item_row, &$row)
+ {
+ parent::adjust_item($item_row, $row);
+
+ $item_row['title'] = (isset($row['forum_name']) && $row['forum_name'] !== '') ? $row['forum_name'] . ' ' . $this->separator . ' ' . $item_row['title'] : $item_row['title'];
+ }
+
+ function get_item()
+ {
+ return ($row = parent::get_item()) ? array_merge($this->forum_data, $row) : $row;
+ }
+}
diff --git a/phpBB/phpbb/feed/forums.php b/phpBB/phpbb/feed/forums.php
new file mode 100644
index 0000000000..ddbb0bf7b3
--- /dev/null
+++ b/phpBB/phpbb/feed/forums.php
@@ -0,0 +1,66 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\feed;
+
+/**
+* 'All Forums' feed
+*
+* This will give you a list of all postable forums where feeds are enabled
+* including forum description, topic stats and post stats
+*
+* @package phpBB3
+*/
+class forums extends \phpbb\feed\base
+{
+ var $num_items = 0;
+
+ function set_keys()
+ {
+ $this->set('title', 'forum_name');
+ $this->set('text', 'forum_desc');
+ $this->set('bitfield', 'forum_desc_bitfield');
+ $this->set('bbcode_uid','forum_desc_uid');
+ $this->set('updated', 'forum_last_post_time');
+ $this->set('options', 'forum_desc_options');
+ }
+
+ function get_sql()
+ {
+ $in_fid_ary = array_diff($this->get_readable_forums(), $this->get_excluded_forums());
+ if (empty($in_fid_ary))
+ {
+ return false;
+ }
+
+ // Build SQL Query
+ $this->sql = array(
+ 'SELECT' => 'f.forum_id, f.left_id, f.forum_name, f.forum_last_post_time,
+ f.forum_desc, f.forum_desc_bitfield, f.forum_desc_uid, f.forum_desc_options,
+ f.forum_topics_approved, f.forum_posts_approved',
+ 'FROM' => array(FORUMS_TABLE => 'f'),
+ 'WHERE' => 'f.forum_type = ' . FORUM_POST . '
+ AND ' . $this->db->sql_in_set('f.forum_id', $in_fid_ary),
+ 'ORDER_BY' => 'f.left_id ASC',
+ );
+
+ return true;
+ }
+
+ function adjust_item(&$item_row, &$row)
+ {
+ $item_row['link'] = $this->helper->append_sid('viewforum.' . $this->phpEx, 'f=' . $row['forum_id']);
+
+ if ($this->config['feed_item_statistics'])
+ {
+ $item_row['statistics'] = $this->user->lang('TOTAL_TOPICS', (int) $row['forum_topics_approved'])
+ . ' ' . $this->separator_stats . ' ' . $this->user->lang('TOTAL_POSTS_COUNT', (int) $row['forum_posts_approved']);
+ }
+ }
+}
diff --git a/phpBB/phpbb/feed/helper.php b/phpBB/phpbb/feed/helper.php
new file mode 100644
index 0000000000..12acf997ac
--- /dev/null
+++ b/phpBB/phpbb/feed/helper.php
@@ -0,0 +1,178 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\feed;
+
+/**
+* Class with some helpful functions used in feeds
+* @package phpBB3
+*/
+class helper
+{
+ /** @var \phpbb\config\config */
+ protected $config;
+
+ /** @var \phpbb\user */
+ protected $user;
+
+ /** @var string */
+ protected $phpbb_root_path;
+
+ /** @var string */
+ protected $phpEx;
+
+ /**
+ * Constructor
+ *
+ * @param \phpbb\config\config $config Config object
+ * @param \phpbb\user $user User object
+ * @param string $phpbb_root_path Root path
+ * @return null
+ */
+ public function __construct(\phpbb\config\config $config, \phpbb\user $user, $phpbb_root_path, $phpEx)
+ {
+ $this->config = $config;
+ $this->user = $user;
+ $this->phpbb_root_path = $phpbb_root_path;
+ $this->phpEx = $phpEx;
+ }
+
+ /**
+ * Run links through append_sid(), prepend generate_board_url() and remove session id
+ */
+ public function get_board_url()
+ {
+ static $board_url;
+
+ if (empty($board_url))
+ {
+ $board_url = generate_board_url();
+ }
+
+ return $board_url;
+ }
+
+ /**
+ * Run links through append_sid(), prepend generate_board_url() and remove session id
+ */
+ public function append_sid($url, $params)
+ {
+ return append_sid($this->get_board_url() . '/' . $url, $params, true, '');
+ }
+
+ /**
+ * Generate ISO 8601 date string (RFC 3339)
+ */
+ public function format_date($time)
+ {
+ static $zone_offset;
+ static $offset_string;
+
+ if (empty($offset_string))
+ {
+ $zone_offset = $this->user->create_datetime()->getOffset();
+ $offset_string = phpbb_format_timezone_offset($zone_offset);
+ }
+
+ return gmdate("Y-m-d\TH:i:s", $time + $zone_offset) . $offset_string;
+ }
+
+ /**
+ * Generate text content
+ *
+ * @param string $content is feed text content
+ * @param string $uid is bbcode_uid
+ * @param string $bitfield is bbcode bitfield
+ * @param int $options bbcode flag options
+ * @param int $forum_id is the forum id
+ * @param array $post_attachments is an array containing the attachments and their respective info
+ * @return string the html content to be printed for the feed
+ */
+ public function generate_content($content, $uid, $bitfield, $options, $forum_id, $post_attachments)
+ {
+ if (empty($content))
+ {
+ return '';
+ }
+
+ // Prepare some bbcodes for better parsing
+ $content = preg_replace("#\[quote(=&quot;.*?&quot;)?:$uid\]\s*(.*?)\s*\[/quote:$uid\]#si", "[quote$1:$uid]<br />$2<br />[/quote:$uid]", $content);
+
+ $content = generate_text_for_display($content, $uid, $bitfield, $options);
+
+ // Add newlines
+ $content = str_replace('<br />', '<br />' . "\n", $content);
+
+ // Convert smiley Relative paths to Absolute path, Windows style
+ $content = str_replace($this->phpbb_root_path . $this->config['smilies_path'], $this->get_board_url() . '/' . $this->config['smilies_path'], $content);
+
+ // Remove "Select all" link and mouse events
+ $content = str_replace('<a href="#" onclick="selectCode(this); return false;">' . $this->user->lang['SELECT_ALL_CODE'] . '</a>', '', $content);
+ $content = preg_replace('#(onkeypress|onclick)="(.*?)"#si', '', $content);
+
+ // Firefox does not support CSS for feeds, though
+
+ // Remove font sizes
+ // $content = preg_replace('#<span style="font-size: [0-9]+%; line-height: [0-9]+%;">([^>]+)</span>#iU', '\1', $content);
+
+ // Make text strong :P
+ // $content = preg_replace('#<span style="font-weight: bold?">(.*?)</span>#iU', '<strong>\1</strong>', $content);
+
+ // Italic
+ // $content = preg_replace('#<span style="font-style: italic?">([^<]+)</span>#iU', '<em>\1</em>', $content);
+
+ // Underline
+ // $content = preg_replace('#<span style="text-decoration: underline?">([^<]+)</span>#iU', '<u>\1</u>', $content);
+
+ // Remove embed Windows Media Streams
+ $content = preg_replace( '#<\!--\[if \!IE\]>-->([^[]+)<\!--<!\[endif\]-->#si', '', $content);
+
+ // Do not use &lt; and &gt;, because we want to retain code contained in [code][/code]
+
+ // Remove embed and objects
+ $content = preg_replace( '#<(object|embed)(.*?) (value|src)=(.*?) ([^[]+)(object|embed)>#si',' <a href=$4 target="_blank"><strong>$1</strong></a> ',$content);
+
+ // Remove some specials html tag, because somewhere there are a mod to allow html tags ;)
+ $content = preg_replace( '#<(script|iframe)([^[]+)\1>#siU', ' <strong>$1</strong> ', $content);
+
+ // Parse inline images to display with the feed
+ if (!empty($post_attachments))
+ {
+ $update_count = array();
+ parse_attachments($forum_id, $content, $post_attachments, $update_count);
+ $post_attachments = implode('<br />', $post_attachments);
+
+ // Convert attachments' relative path to absolute path
+ $post_attachments = str_replace($this->phpbb_root_path . 'download/file.' . $this->phpEx, $this->get_board_url() . '/download/file.' . $this->phpEx, $post_attachments);
+
+ $content .= $post_attachments;
+ }
+
+ // Remove Comments from inline attachments [ia]
+ $content = preg_replace('#<dd>(.*?)</dd>#','',$content);
+
+ // Replace some entities with their unicode counterpart
+ $entities = array(
+ '&nbsp;' => "\xC2\xA0",
+ '&bull;' => "\xE2\x80\xA2",
+ '&middot;' => "\xC2\xB7",
+ '&copy;' => "\xC2\xA9",
+ );
+
+ $content = str_replace(array_keys($entities), array_values($entities), $content);
+
+ // Remove CDATA blocks. ;)
+ $content = preg_replace('#\<\!\[CDATA\[(.*?)\]\]\>#s', '', $content);
+
+ // Other control characters
+ $content = preg_replace('#(?:[\x00-\x1F\x7F]+|(?:\xC2[\x80-\x9F])+)#', '', $content);
+
+ return $content;
+ }
+}
diff --git a/phpBB/phpbb/feed/news.php b/phpBB/phpbb/feed/news.php
new file mode 100644
index 0000000000..1b7c452a92
--- /dev/null
+++ b/phpBB/phpbb/feed/news.php
@@ -0,0 +1,106 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\feed;
+
+/**
+* News feed
+*
+* This will give you {$this->num_items} first posts
+* of all topics in the selected news forums.
+*
+* @package phpBB3
+*/
+class news extends \phpbb\feed\topic_base
+{
+ function get_news_forums()
+ {
+ static $forum_ids;
+
+ // Matches acp/acp_board.php
+ $cache_name = 'feed_news_forum_ids';
+
+ if (!isset($forum_ids) && ($forum_ids = $this->cache->get('_' . $cache_name)) === false)
+ {
+ $sql = 'SELECT forum_id
+ FROM ' . FORUMS_TABLE . '
+ WHERE ' . $this->db->sql_bit_and('forum_options', FORUM_OPTION_FEED_NEWS, '<> 0');
+ $result = $this->db->sql_query($sql);
+
+ $forum_ids = array();
+ while ($forum_id = (int) $this->db->sql_fetchfield('forum_id'))
+ {
+ $forum_ids[$forum_id] = $forum_id;
+ }
+ $this->db->sql_freeresult($result);
+
+ $this->cache->put('_' . $cache_name, $forum_ids);
+ }
+
+ return $forum_ids;
+ }
+
+ function get_sql()
+ {
+ // Determine forum ids
+ $in_fid_ary = array_intersect($this->get_news_forums(), $this->get_readable_forums());
+ if (empty($in_fid_ary))
+ {
+ return false;
+ }
+
+ $in_fid_ary = array_diff($in_fid_ary, $this->get_passworded_forums());
+ if (empty($in_fid_ary))
+ {
+ return false;
+ }
+
+ // We really have to get the post ids first!
+ $sql = 'SELECT topic_first_post_id, topic_time
+ FROM ' . TOPICS_TABLE . '
+ WHERE ' . $this->db->sql_in_set('forum_id', $in_fid_ary) . '
+ AND topic_moved_id = 0
+ AND topic_visibility = ' . ITEM_APPROVED . '
+ ORDER BY topic_time DESC';
+ $result = $this->db->sql_query_limit($sql, $this->num_items);
+
+ $post_ids = array();
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ $post_ids[] = (int) $row['topic_first_post_id'];
+ }
+ $this->db->sql_freeresult($result);
+
+ if (empty($post_ids))
+ {
+ return false;
+ }
+
+ $this->sql = array(
+ 'SELECT' => 'f.forum_id, f.forum_name,
+ t.topic_id, t.topic_title, t.topic_poster, t.topic_first_poster_name, t.topic_posts_approved, t.topic_posts_unapproved, t.topic_posts_softdeleted, t.topic_views, t.topic_time, t.topic_last_post_time,
+ p.post_id, p.post_time, p.post_edit_time, p.post_text, p.bbcode_bitfield, p.bbcode_uid, p.enable_bbcode, p.enable_smilies, p.enable_magic_url, p.post_attachment',
+ 'FROM' => array(
+ TOPICS_TABLE => 't',
+ POSTS_TABLE => 'p',
+ ),
+ 'LEFT_JOIN' => array(
+ array(
+ 'FROM' => array(FORUMS_TABLE => 'f'),
+ 'ON' => 'p.forum_id = f.forum_id',
+ ),
+ ),
+ 'WHERE' => 'p.topic_id = t.topic_id
+ AND ' . $this->db->sql_in_set('p.post_id', $post_ids),
+ 'ORDER_BY' => 'p.post_time DESC',
+ );
+
+ return true;
+ }
+}
diff --git a/phpBB/phpbb/feed/overall.php b/phpBB/phpbb/feed/overall.php
new file mode 100644
index 0000000000..d99200475e
--- /dev/null
+++ b/phpBB/phpbb/feed/overall.php
@@ -0,0 +1,84 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\feed;
+
+/**
+* Board wide feed (aka overall feed)
+*
+* This will give you the newest {$this->num_items} posts
+* from the whole board.
+*
+* @package phpBB3
+*/
+class overall extends \phpbb\feed\post_base
+{
+ function get_sql()
+ {
+ $forum_ids = array_diff($this->get_readable_forums(), $this->get_excluded_forums(), $this->get_passworded_forums());
+ if (empty($forum_ids))
+ {
+ return false;
+ }
+
+ // Determine topics with recent activity
+ $sql = 'SELECT topic_id, topic_last_post_time
+ FROM ' . TOPICS_TABLE . '
+ WHERE topic_moved_id = 0
+ AND ' . $this->content_visibility->get_forums_visibility_sql('topic', $forum_ids) . '
+ ORDER BY topic_last_post_time DESC';
+ $result = $this->db->sql_query_limit($sql, $this->num_items);
+
+ $topic_ids = array();
+ $min_post_time = 0;
+ while ($row = $this->db->sql_fetchrow())
+ {
+ $topic_ids[] = (int) $row['topic_id'];
+
+ $min_post_time = (int) $row['topic_last_post_time'];
+ }
+ $this->db->sql_freeresult($result);
+
+ if (empty($topic_ids))
+ {
+ return false;
+ }
+
+ // Get the actual data
+ $this->sql = array(
+ 'SELECT' => 'f.forum_id, f.forum_name, ' .
+ 'p.post_id, p.topic_id, p.post_time, p.post_edit_time, p.post_visibility, p.post_subject, p.post_text, p.bbcode_bitfield, p.bbcode_uid, p.enable_bbcode, p.enable_smilies, p.enable_magic_url, p.post_attachment, ' .
+ 'u.username, u.user_id',
+ 'FROM' => array(
+ USERS_TABLE => 'u',
+ POSTS_TABLE => 'p',
+ ),
+ 'LEFT_JOIN' => array(
+ array(
+ 'FROM' => array(FORUMS_TABLE => 'f'),
+ 'ON' => 'f.forum_id = p.forum_id',
+ ),
+ ),
+ 'WHERE' => $this->db->sql_in_set('p.topic_id', $topic_ids) . '
+ AND ' . $this->content_visibility->get_forums_visibility_sql('post', $forum_ids, 'p.') . '
+ AND p.post_time >= ' . $min_post_time . '
+ AND u.user_id = p.poster_id',
+ 'ORDER_BY' => 'p.post_time DESC',
+ );
+
+ return true;
+ }
+
+ function adjust_item(&$item_row, &$row)
+ {
+ parent::adjust_item($item_row, $row);
+
+ $item_row['title'] = (isset($row['forum_name']) && $row['forum_name'] !== '') ? $row['forum_name'] . ' ' . $this->separator . ' ' . $item_row['title'] : $item_row['title'];
+ }
+}
diff --git a/phpBB/phpbb/feed/post_base.php b/phpBB/phpbb/feed/post_base.php
new file mode 100644
index 0000000000..c797d6a8ca
--- /dev/null
+++ b/phpBB/phpbb/feed/post_base.php
@@ -0,0 +1,89 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\feed;
+
+/**
+* Abstract class for post based feeds
+*
+* @package phpBB3
+*/
+abstract class post_base extends \phpbb\feed\base
+{
+ var $num_items = 'feed_limit_post';
+ var $attachments = array();
+
+ function set_keys()
+ {
+ $this->set('title', 'post_subject');
+ $this->set('title2', 'topic_title');
+
+ $this->set('author_id', 'user_id');
+ $this->set('creator', 'username');
+ $this->set('published', 'post_time');
+ $this->set('updated', 'post_edit_time');
+ $this->set('text', 'post_text');
+
+ $this->set('bitfield', 'bbcode_bitfield');
+ $this->set('bbcode_uid','bbcode_uid');
+
+ $this->set('enable_bbcode', 'enable_bbcode');
+ $this->set('enable_smilies', 'enable_smilies');
+ $this->set('enable_magic_url', 'enable_magic_url');
+ }
+
+ function adjust_item(&$item_row, &$row)
+ {
+ $item_row['link'] = $this->helper->append_sid('viewtopic.' . $this->phpEx, "t={$row['topic_id']}&amp;p={$row['post_id']}#p{$row['post_id']}");
+
+ if ($this->config['feed_item_statistics'])
+ {
+ $item_row['statistics'] = $this->user->lang['POSTED'] . ' ' . $this->user->lang['POST_BY_AUTHOR'] . ' ' . $this->user_viewprofile($row)
+ . ' ' . $this->separator_stats . ' ' . $this->user->format_date($row[$this->get('published')])
+ . (($this->is_moderator_approve_forum($row['forum_id']) && $row['post_visibility'] !== ITEM_APPROVED) ? ' ' . $this->separator_stats . ' ' . $this->user->lang['POST_UNAPPROVED'] : '');
+ }
+ }
+
+ function fetch_attachments()
+ {
+ $sql_array = array(
+ 'SELECT' => 'a.*',
+ 'FROM' => array(
+ ATTACHMENTS_TABLE => 'a'
+ ),
+ 'WHERE' => 'a.in_message = 0 ',
+ 'ORDER_BY' => 'a.filetime DESC, a.post_msg_id ASC',
+ );
+
+ if (isset($this->topic_id))
+ {
+ $sql_array['WHERE'] .= 'AND a.topic_id = ' . (int) $this->topic_id;
+ }
+ else if (isset($this->forum_id))
+ {
+ $sql_array['LEFT_JOIN'] = array(
+ array(
+ 'FROM' => array(TOPICS_TABLE => 't'),
+ 'ON' => 'a.topic_id = t.topic_id',
+ )
+ );
+ $sql_array['WHERE'] .= 'AND t.forum_id = ' . (int) $this->forum_id;
+ }
+
+ $sql = $this->db->sql_build_query('SELECT', $sql_array);
+ $result = $this->db->sql_query($sql);
+
+ // Set attachments in feed items
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ $this->attachments[$row['post_msg_id']][] = $row;
+ }
+ $this->db->sql_freeresult($result);
+ }
+}
diff --git a/phpBB/phpbb/feed/topic.php b/phpBB/phpbb/feed/topic.php
new file mode 100644
index 0000000000..a7acfb502f
--- /dev/null
+++ b/phpBB/phpbb/feed/topic.php
@@ -0,0 +1,110 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\feed;
+
+/**
+* Topic feed for a specific topic
+*
+* This will give you the last {$this->num_items} posts made within this topic.
+*
+* @package phpBB3
+*/
+class topic extends \phpbb\feed\post_base
+{
+ var $topic_id = 0;
+ var $forum_id = 0;
+ var $topic_data = array();
+
+ /**
+ * Set the Topic ID
+ *
+ * @param int $topic_id Topic ID
+ * @return \phpbb\feed\topic
+ */
+ public function set_topic_id($topic_id)
+ {
+ $this->topic_id = (int) $topic_id;
+
+ return $this;
+ }
+
+ function open()
+ {
+ $sql = 'SELECT f.forum_options, f.forum_password, t.topic_id, t.forum_id, t.topic_visibility, t.topic_title, t.topic_time, t.topic_views, t.topic_posts_approved, t.topic_type
+ FROM ' . TOPICS_TABLE . ' t
+ LEFT JOIN ' . FORUMS_TABLE . ' f
+ ON (f.forum_id = t.forum_id)
+ WHERE t.topic_id = ' . $this->topic_id;
+ $result = $this->db->sql_query($sql);
+ $this->topic_data = $this->db->sql_fetchrow($result);
+ $this->db->sql_freeresult($result);
+
+ if (empty($this->topic_data))
+ {
+ trigger_error('NO_TOPIC');
+ }
+
+ $this->forum_id = (int) $this->topic_data['forum_id'];
+
+ // Make sure topic is either approved or user authed
+ if ($this->topic_data['topic_visibility'] != ITEM_APPROVED && !$this->auth->acl_get('m_approve', $this->forum_id))
+ {
+ trigger_error('SORRY_AUTH_READ');
+ }
+
+ // Make sure forum is not excluded from feed
+ if (phpbb_optionget(FORUM_OPTION_FEED_EXCLUDE, $this->topic_data['forum_options']))
+ {
+ trigger_error('NO_FEED');
+ }
+
+ // Make sure we can read this forum
+ if (!$this->auth->acl_get('f_read', $this->forum_id))
+ {
+ trigger_error('SORRY_AUTH_READ');
+ }
+
+ // Make sure forum is not passworded or user is authed
+ if ($this->topic_data['forum_password'])
+ {
+ $forum_ids_passworded = $this->get_passworded_forums();
+
+ if (isset($forum_ids_passworded[$this->forum_id]))
+ {
+ trigger_error('SORRY_AUTH_READ');
+ }
+
+ unset($forum_ids_passworded);
+ }
+ }
+
+ function get_sql()
+ {
+ $this->sql = array(
+ 'SELECT' => 'p.post_id, p.post_time, p.post_edit_time, p.post_visibility, p.post_subject, p.post_text, p.bbcode_bitfield, p.bbcode_uid, p.enable_bbcode, p.enable_smilies, p.enable_magic_url, p.post_attachment, ' .
+ 'u.username, u.user_id',
+ 'FROM' => array(
+ POSTS_TABLE => 'p',
+ USERS_TABLE => 'u',
+ ),
+ 'WHERE' => 'p.topic_id = ' . $this->topic_id . '
+ AND ' . $this->content_visibility->get_visibility_sql('post', $this->forum_id, 'p.') . '
+ AND p.poster_id = u.user_id',
+ 'ORDER_BY' => 'p.post_time DESC',
+ );
+
+ return true;
+ }
+
+ function get_item()
+ {
+ return ($row = parent::get_item()) ? array_merge($this->topic_data, $row) : $row;
+ }
+}
diff --git a/phpBB/phpbb/feed/topic_base.php b/phpBB/phpbb/feed/topic_base.php
new file mode 100644
index 0000000000..7e28e67b82
--- /dev/null
+++ b/phpBB/phpbb/feed/topic_base.php
@@ -0,0 +1,53 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\feed;
+
+/**
+* Abstract class for topic based feeds
+*
+* @package phpBB3
+*/
+abstract class topic_base extends \phpbb\feed\base
+{
+ var $num_items = 'feed_limit_topic';
+
+ function set_keys()
+ {
+ $this->set('title', 'topic_title');
+ $this->set('title2', 'forum_name');
+
+ $this->set('author_id', 'topic_poster');
+ $this->set('creator', 'topic_first_poster_name');
+ $this->set('published', 'post_time');
+ $this->set('updated', 'post_edit_time');
+ $this->set('text', 'post_text');
+
+ $this->set('bitfield', 'bbcode_bitfield');
+ $this->set('bbcode_uid','bbcode_uid');
+
+ $this->set('enable_bbcode', 'enable_bbcode');
+ $this->set('enable_smilies', 'enable_smilies');
+ $this->set('enable_magic_url', 'enable_magic_url');
+ }
+
+ function adjust_item(&$item_row, &$row)
+ {
+ $item_row['link'] = $this->helper->append_sid('viewtopic.' . $this->phpEx, 't=' . $row['topic_id'] . '&amp;p=' . $row['post_id'] . '#p' . $row['post_id']);
+
+ if ($this->config['feed_item_statistics'])
+ {
+ $item_row['statistics'] = $this->user->lang['POSTED'] . ' ' . $this->user->lang['POST_BY_AUTHOR'] . ' ' . $this->user_viewprofile($row)
+ . ' ' . $this->separator_stats . ' ' . $this->user->format_date($row[$this->get('published')])
+ . ' ' . $this->separator_stats . ' ' . $this->user->lang['REPLIES'] . ' ' . $this->content_visibility->get_count('topic_posts', $row, $row['forum_id']) - 1
+ . ' ' . $this->separator_stats . ' ' . $this->user->lang['VIEWS'] . ' ' . $row['topic_views']
+ . (($this->is_moderator_approve_forum($row['forum_id']) && $row['topic_posts_unapproved']) ? ' ' . $this->separator_stats . ' ' . $this->user->lang['POSTS_UNAPPROVED'] : '');
+ }
+ }
+}
diff --git a/phpBB/phpbb/feed/topics.php b/phpBB/phpbb/feed/topics.php
new file mode 100644
index 0000000000..e8b9f6de6c
--- /dev/null
+++ b/phpBB/phpbb/feed/topics.php
@@ -0,0 +1,85 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\feed;
+
+/**
+* New Topics feed
+*
+* This will give you the last {$this->num_items} created topics
+* including the first post.
+*
+* @package phpBB3
+*/
+class topics extends \phpbb\feed\topic_base
+{
+ function get_sql()
+ {
+ $forum_ids_read = $this->get_readable_forums();
+ if (empty($forum_ids_read))
+ {
+ return false;
+ }
+
+ $in_fid_ary = array_diff($forum_ids_read, $this->get_excluded_forums(), $this->get_passworded_forums());
+ if (empty($in_fid_ary))
+ {
+ return false;
+ }
+
+ // We really have to get the post ids first!
+ $sql = 'SELECT topic_first_post_id, topic_time
+ FROM ' . TOPICS_TABLE . '
+ WHERE ' . $this->db->sql_in_set('forum_id', $in_fid_ary) . '
+ AND topic_moved_id = 0
+ AND topic_visibility = ' . ITEM_APPROVED . '
+ ORDER BY topic_time DESC';
+ $result = $this->db->sql_query_limit($sql, $this->num_items);
+
+ $post_ids = array();
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ $post_ids[] = (int) $row['topic_first_post_id'];
+ }
+ $this->db->sql_freeresult($result);
+
+ if (empty($post_ids))
+ {
+ return false;
+ }
+
+ $this->sql = array(
+ 'SELECT' => 'f.forum_id, f.forum_name,
+ t.topic_id, t.topic_title, t.topic_poster, t.topic_first_poster_name, t.topic_posts_approved, t.topic_posts_unapproved, t.topic_posts_softdeleted, t.topic_views, t.topic_time, t.topic_last_post_time,
+ p.post_id, p.post_time, p.post_edit_time, p.post_text, p.bbcode_bitfield, p.bbcode_uid, p.enable_bbcode, p.enable_smilies, p.enable_magic_url, p.post_attachment',
+ 'FROM' => array(
+ TOPICS_TABLE => 't',
+ POSTS_TABLE => 'p',
+ ),
+ 'LEFT_JOIN' => array(
+ array(
+ 'FROM' => array(FORUMS_TABLE => 'f'),
+ 'ON' => 'p.forum_id = f.forum_id',
+ ),
+ ),
+ 'WHERE' => 'p.topic_id = t.topic_id
+ AND ' . $this->db->sql_in_set('p.post_id', $post_ids),
+ 'ORDER_BY' => 'p.post_time DESC',
+ );
+
+ return true;
+ }
+
+ function adjust_item(&$item_row, &$row)
+ {
+ parent::adjust_item($item_row, $row);
+
+ $item_row['title'] = (isset($row['forum_name']) && $row['forum_name'] !== '') ? $row['forum_name'] . ' ' . $this->separator . ' ' . $item_row['title'] : $item_row['title'];
+ }
+}
diff --git a/phpBB/phpbb/feed/topics_active.php b/phpBB/phpbb/feed/topics_active.php
new file mode 100644
index 0000000000..809a536c2a
--- /dev/null
+++ b/phpBB/phpbb/feed/topics_active.php
@@ -0,0 +1,130 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\feed;
+
+/**
+* Active Topics feed
+*
+* This will give you the last {$this->num_items} topics
+* with replies made withing the last {$this->sort_days} days
+* including the last post.
+*
+* @package phpBB3
+*/
+class topics_active extends \phpbb\feed\topic_base
+{
+ var $sort_days = 7;
+
+ function set_keys()
+ {
+ parent::set_keys();
+
+ $this->set('author_id', 'topic_last_poster_id');
+ $this->set('creator', 'topic_last_poster_name');
+ }
+
+ function get_sql()
+ {
+ $forum_ids_read = $this->get_readable_forums();
+ if (empty($forum_ids_read))
+ {
+ return false;
+ }
+
+ $in_fid_ary = array_intersect($forum_ids_read, $this->get_forum_ids());
+ $in_fid_ary = array_diff($in_fid_ary, $this->get_passworded_forums());
+ if (empty($in_fid_ary))
+ {
+ return false;
+ }
+
+ // Search for topics in last X days
+ $last_post_time_sql = ($this->sort_days) ? ' AND topic_last_post_time > ' . (time() - ($this->sort_days * 24 * 3600)) : '';
+
+ // We really have to get the post ids first!
+ $sql = 'SELECT topic_last_post_id, topic_last_post_time
+ FROM ' . TOPICS_TABLE . '
+ WHERE ' . $this->db->sql_in_set('forum_id', $in_fid_ary) . '
+ AND topic_moved_id = 0
+ AND topic_visibility = ' . ITEM_APPROVED . '
+ ' . $last_post_time_sql . '
+ ORDER BY topic_last_post_time DESC';
+ $result = $this->db->sql_query_limit($sql, $this->num_items);
+
+ $post_ids = array();
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ $post_ids[] = (int) $row['topic_last_post_id'];
+ }
+ $this->db->sql_freeresult($result);
+
+ if (empty($post_ids))
+ {
+ return false;
+ }
+
+ $this->sql = array(
+ 'SELECT' => 'f.forum_id, f.forum_name,
+ t.topic_id, t.topic_title, t.topic_posts_approved, t.topic_posts_unapproved, t.topic_posts_softdeleted, t.topic_views,
+ t.topic_last_poster_id, t.topic_last_poster_name, t.topic_last_post_time,
+ p.post_id, p.post_time, p.post_edit_time, p.post_text, p.bbcode_bitfield, p.bbcode_uid, p.enable_bbcode, p.enable_smilies, p.enable_magic_url, p.post_attachment',
+ 'FROM' => array(
+ TOPICS_TABLE => 't',
+ POSTS_TABLE => 'p',
+ ),
+ 'LEFT_JOIN' => array(
+ array(
+ 'FROM' => array(FORUMS_TABLE => 'f'),
+ 'ON' => 'p.forum_id = f.forum_id',
+ ),
+ ),
+ 'WHERE' => 'p.topic_id = t.topic_id
+ AND ' . $this->db->sql_in_set('p.post_id', $post_ids),
+ 'ORDER_BY' => 'p.post_time DESC',
+ );
+
+ return true;
+ }
+
+ function get_forum_ids()
+ {
+ static $forum_ids;
+
+ $cache_name = 'feed_topic_active_forum_ids';
+
+ if (!isset($forum_ids) && ($forum_ids = $this->cache->get('_' . $cache_name)) === false)
+ {
+ $sql = 'SELECT forum_id
+ FROM ' . FORUMS_TABLE . '
+ WHERE forum_type = ' . FORUM_POST . '
+ AND ' . $this->db->sql_bit_and('forum_options', FORUM_OPTION_FEED_EXCLUDE, '= 0') . '
+ AND ' . $this->db->sql_bit_and('forum_flags', log(FORUM_FLAG_ACTIVE_TOPICS, 2), '<> 0');
+ $result = $this->db->sql_query($sql);
+
+ $forum_ids = array();
+ while ($forum_id = (int) $this->db->sql_fetchfield('forum_id'))
+ {
+ $forum_ids[$forum_id] = $forum_id;
+ }
+ $this->db->sql_freeresult($result);
+
+ $this->cache->put('_' . $cache_name, $forum_ids, 180);
+ }
+
+ return $forum_ids;
+ }
+
+ function adjust_item(&$item_row, &$row)
+ {
+ parent::adjust_item($item_row, $row);
+
+ $item_row['title'] = (isset($row['forum_name']) && $row['forum_name'] !== '') ? $row['forum_name'] . ' ' . $this->separator . ' ' . $item_row['title'] : $item_row['title'];
+ }
+}
diff --git a/phpBB/phpbb/filesystem.php b/phpBB/phpbb/filesystem.php
new file mode 100644
index 0000000000..7878be0a5e
--- /dev/null
+++ b/phpBB/phpbb/filesystem.php
@@ -0,0 +1,47 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb;
+
+/**
+* A class with various functions that are related to paths, files and the filesystem
+* @package phpBB3
+*/
+class filesystem
+{
+ /**
+ * Eliminates useless . and .. components from specified path.
+ *
+ * @param string $path Path to clean
+ * @return string Cleaned path
+ */
+ public function clean_path($path)
+ {
+ $exploded = explode('/', $path);
+ $filtered = array();
+ foreach ($exploded as $part)
+ {
+ if ($part === '.' && !empty($filtered))
+ {
+ continue;
+ }
+
+ if ($part === '..' && !empty($filtered) && $filtered[sizeof($filtered) - 1] !== '..')
+ {
+ array_pop($filtered);
+ }
+ else
+ {
+ $filtered[] = $part;
+ }
+ }
+ $path = implode('/', $filtered);
+ return $path;
+ }
+}
diff --git a/phpBB/phpbb/groupposition/exception.php b/phpBB/phpbb/groupposition/exception.php
new file mode 100644
index 0000000000..f43502235d
--- /dev/null
+++ b/phpBB/phpbb/groupposition/exception.php
@@ -0,0 +1,17 @@
+<?php
+/**
+*
+* @package groupposition
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License v2
+*
+*/
+
+namespace phpbb\groupposition;
+
+/**
+* @package groupposition
+*/
+class exception extends \Exception
+{
+}
diff --git a/phpBB/phpbb/groupposition/groupposition_interface.php b/phpBB/phpbb/groupposition/groupposition_interface.php
new file mode 100644
index 0000000000..9785172a00
--- /dev/null
+++ b/phpBB/phpbb/groupposition/groupposition_interface.php
@@ -0,0 +1,78 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\groupposition;
+
+/**
+* Interface to manage group positions in various places of phpbb
+*
+* The interface provides simple methods to add, delete and move a group
+*
+* @package phpBB3
+*/
+interface groupposition_interface
+{
+ /**
+ * Returns the value for a given group, if the group exists.
+ * @param int $group_id group_id of the group to be selected
+ * @return int position of the group
+ */
+ public function get_group_value($group_id);
+
+ /**
+ * Get number of groups displayed
+ *
+ * @return int value of the last item displayed
+ */
+ public function get_group_count();
+
+ /**
+ * Addes a group by group_id
+ *
+ * @param int $group_id group_id of the group to be added
+ * @return bool True if the group was added successfully
+ */
+ public function add_group($group_id);
+
+ /**
+ * Deletes a group by group_id
+ *
+ * @param int $group_id group_id of the group to be deleted
+ * @param bool $skip_group Skip setting the value for this group, to save the query, when you need to update it anyway.
+ * @return bool True if the group was deleted successfully
+ */
+ public function delete_group($group_id, $skip_group = false);
+
+ /**
+ * Moves a group up by group_id
+ *
+ * @param int $group_id group_id of the group to be moved
+ * @return bool True if the group was moved successfully
+ */
+ public function move_up($group_id);
+
+ /**
+ * Moves a group down by group_id
+ *
+ * @param int $group_id group_id of the group to be moved
+ * @return bool True if the group was moved successfully
+ */
+ public function move_down($group_id);
+
+ /**
+ * Moves a group up/down
+ *
+ * @param int $group_id group_id of the group to be moved
+ * @param int $delta number of steps:
+ * - positive = move up
+ * - negative = move down
+ * @return bool True if the group was moved successfully
+ */
+ public function move($group_id, $delta);
+}
diff --git a/phpBB/phpbb/groupposition/legend.php b/phpBB/phpbb/groupposition/legend.php
new file mode 100644
index 0000000000..47ba06c006
--- /dev/null
+++ b/phpBB/phpbb/groupposition/legend.php
@@ -0,0 +1,245 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\groupposition;
+
+/**
+* Legend group position class
+*
+* group_legend is an ascending list 1, 2, ..., n for groups which are displayed. 1 is the first group, n the last.
+* If the value is 0 (self::GROUP_DISABLED) the group is not displayed.
+*
+* @package phpBB3
+*/
+class legend implements \phpbb\groupposition\groupposition_interface
+{
+ /**
+ * Group is not displayed
+ */
+ const GROUP_DISABLED = 0;
+
+ /**
+ * Database object
+ * @var \phpbb\db\driver\driver
+ */
+ protected $db;
+
+ /**
+ * User object
+ * @var \phpbb\user
+ */
+ protected $user;
+
+ /**
+ * Constructor
+ *
+ * @param \phpbb\db\driver\driver $db Database object
+ * @param \phpbb\user $user User object
+ */
+ public function __construct(\phpbb\db\driver\driver $db, \phpbb\user $user)
+ {
+ $this->db = $db;
+ $this->user = $user;
+ }
+
+ /**
+ * Returns the group_legend for a given group, if the group exists.
+ *
+ * {@inheritDoc}
+ */
+ public function get_group_value($group_id)
+ {
+ $sql = 'SELECT group_legend
+ FROM ' . GROUPS_TABLE . '
+ WHERE group_id = ' . (int) $group_id;
+ $result = $this->db->sql_query($sql);
+ $current_value = $this->db->sql_fetchfield('group_legend');
+ $this->db->sql_freeresult($result);
+
+ if ($current_value === false)
+ {
+ // Group not found.
+ throw new \phpbb\groupposition\exception('NO_GROUP');
+ }
+
+ return (int) $current_value;
+ }
+
+ /**
+ * Get number of groups, displayed on the legend
+ *
+ * {@inheritDoc}
+ */
+ public function get_group_count()
+ {
+ $sql = 'SELECT group_legend
+ FROM ' . GROUPS_TABLE . '
+ ORDER BY group_legend DESC';
+ $result = $this->db->sql_query_limit($sql, 1);
+ $group_count = (int) $this->db->sql_fetchfield('group_legend');
+ $this->db->sql_freeresult($result);
+
+ return $group_count;
+ }
+
+ /**
+ * Adds a group by group_id
+ *
+ * {@inheritDoc}
+ */
+ public function add_group($group_id)
+ {
+ $current_value = $this->get_group_value($group_id);
+
+ if ($current_value == self::GROUP_DISABLED)
+ {
+ // Group is currently not displayed, add it at the end.
+ $next_value = 1 + $this->get_group_count();
+
+ $sql = 'UPDATE ' . GROUPS_TABLE . '
+ SET group_legend = ' . $next_value . '
+ WHERE group_legend = ' . self::GROUP_DISABLED . '
+ AND group_id = ' . (int) $group_id;
+ $this->db->sql_query($sql);
+ return true;
+ }
+
+ return false;
+ }
+
+ /**
+ * Deletes a group by setting the field to self::GROUP_DISABLED and closing the gap in the list.
+ *
+ * {@inheritDoc}
+ */
+ public function delete_group($group_id, $skip_group = false)
+ {
+ $current_value = $this->get_group_value($group_id);
+
+ if ($current_value != self::GROUP_DISABLED)
+ {
+ $this->db->sql_transaction('begin');
+
+ $sql = 'UPDATE ' . GROUPS_TABLE . '
+ SET group_legend = group_legend - 1
+ WHERE group_legend > ' . $current_value;
+ $this->db->sql_query($sql);
+
+ if (!$skip_group)
+ {
+ $sql = 'UPDATE ' . GROUPS_TABLE . '
+ SET group_legend = ' . self::GROUP_DISABLED . '
+ WHERE group_id = ' . (int) $group_id;
+ $this->db->sql_query($sql);
+ }
+
+ $this->db->sql_transaction('commit');
+
+ return true;
+ }
+
+ return false;
+ }
+
+ /**
+ * Moves a group up by group_id
+ *
+ * {@inheritDoc}
+ */
+ public function move_up($group_id)
+ {
+ return $this->move($group_id, 1);
+ }
+
+ /**
+ * Moves a group down by group_id
+ *
+ * {@inheritDoc}
+ */
+ public function move_down($group_id)
+ {
+ return $this->move($group_id, -1);
+ }
+
+ /**
+ * Moves a group up/down
+ *
+ * {@inheritDoc}
+ */
+ public function move($group_id, $delta)
+ {
+ $delta = (int) $delta;
+ if (!$delta)
+ {
+ return false;
+ }
+
+ $move_up = ($delta > 0) ? true : false;
+ $current_value = $this->get_group_value($group_id);
+
+ if ($current_value != self::GROUP_DISABLED)
+ {
+ $this->db->sql_transaction('begin');
+
+ // First we move all groups between our current value and the target value up/down 1,
+ // so we have a gap for our group to move.
+ $sql = 'UPDATE ' . GROUPS_TABLE . '
+ SET group_legend = group_legend' . (($move_up) ? ' + 1' : ' - 1') . '
+ WHERE group_legend > ' . self::GROUP_DISABLED . '
+ AND group_legend' . (($move_up) ? ' >= ' : ' <= ') . ($current_value - $delta) . '
+ AND group_legend' . (($move_up) ? ' < ' : ' > ') . $current_value;
+ $this->db->sql_query($sql);
+
+ // Because there might be fewer groups above/below the group than we wanted to move,
+ // we use the number of changed groups, to update the group.
+ $delta = (int) $this->db->sql_affectedrows();
+
+ if ($delta)
+ {
+ // And now finally, when we moved some other groups and built a gap,
+ // we can move the desired group to it.
+ $sql = 'UPDATE ' . GROUPS_TABLE . '
+ SET group_legend = group_legend ' . (($move_up) ? ' - ' : ' + ') . $delta . '
+ WHERE group_id = ' . (int) $group_id;
+ $this->db->sql_query($sql);
+
+ $this->db->sql_transaction('commit');
+
+ return true;
+ }
+
+ $this->db->sql_transaction('commit');
+ }
+
+ return false;
+ }
+
+ /**
+ * Get group type language var
+ *
+ * @param int $group_type group_type from the groups-table
+ * @return string name of the language variable for the given group-type.
+ */
+ static public function group_type_language($group_type)
+ {
+ switch ($group_type)
+ {
+ case GROUP_OPEN:
+ return 'GROUP_REQUEST';
+ case GROUP_CLOSED:
+ return 'GROUP_CLOSED';
+ case GROUP_HIDDEN:
+ return 'GROUP_HIDDEN';
+ case GROUP_SPECIAL:
+ return 'GROUP_SPECIAL';
+ case GROUP_FREE:
+ return 'GROUP_OPEN';
+ }
+ }
+}
diff --git a/phpBB/phpbb/groupposition/teampage.php b/phpBB/phpbb/groupposition/teampage.php
new file mode 100644
index 0000000000..d934571ebc
--- /dev/null
+++ b/phpBB/phpbb/groupposition/teampage.php
@@ -0,0 +1,598 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\groupposition;
+
+/**
+* Teampage group position class
+*
+* Teampage position is an ascending list 1, 2, ..., n for items which are displayed. 1 is the first item, n the last.
+*
+* @package phpBB3
+*/
+class teampage implements \phpbb\groupposition\groupposition_interface
+{
+ /**
+ * Group is not displayed
+ */
+ const GROUP_DISABLED = 0;
+
+ /**
+ * No parent item
+ */
+ const NO_PARENT = 0;
+
+ /**
+ * Database object
+ * @var \phpbb\db\driver\driver
+ */
+ protected $db;
+
+ /**
+ * User object
+ * @var \phpbb\user
+ */
+ protected $user;
+
+ /**
+ * Cache object
+ * @var \phpbb\cache\driver\driver_interface
+ */
+ protected $cache;
+
+ /**
+ * Constructor
+ *
+ * @param \phpbb\db\driver\driver $db Database object
+ * @param \phpbb\user $user User object
+ * @param \phpbb\cache\driver\driver_interface $cache Cache object
+ */
+ public function __construct(\phpbb\db\driver\driver $db, \phpbb\user $user, \phpbb\cache\driver\driver_interface $cache)
+ {
+ $this->db = $db;
+ $this->user = $user;
+ $this->cache = $cache;
+ }
+
+ /**
+ * Returns the teampage position for a given group, if the group exists.
+ *
+ * {@inheritDoc}
+ */
+ public function get_group_value($group_id)
+ {
+ // The join is required to ensure that the group itself exists
+ $sql = 'SELECT g.group_id, t.teampage_position
+ FROM ' . GROUPS_TABLE . ' g
+ LEFT JOIN ' . TEAMPAGE_TABLE . ' t
+ ON (t.group_id = g.group_id)
+ WHERE g.group_id = ' . (int) $group_id;
+ $result = $this->db->sql_query($sql);
+ $row = $this->db->sql_fetchrow($result);
+ $this->db->sql_freeresult($result);
+
+ if ($row === false)
+ {
+ // Group not found.
+ throw new \phpbb\groupposition\exception('NO_GROUP');
+ }
+
+ return (int) $row['teampage_position'];
+ }
+
+ /**
+ * Returns the row for a given group, if the group exists.
+ *
+ * @param int $group_id group_id of the group to be selected
+ * @return array Data row of the group
+ */
+ public function get_group_values($group_id)
+ {
+ // The join is required to ensure that the group itself exists
+ $sql = 'SELECT *
+ FROM ' . GROUPS_TABLE . ' g
+ LEFT JOIN ' . TEAMPAGE_TABLE . ' t
+ ON (t.group_id = g.group_id)
+ WHERE g.group_id = ' . (int) $group_id;
+ $result = $this->db->sql_query($sql);
+ $row = $this->db->sql_fetchrow($result);
+ $this->db->sql_freeresult($result);
+
+ if ($row === false)
+ {
+ // Group not found.
+ throw new \phpbb\groupposition\exception('NO_GROUP');
+ }
+
+ return $row;
+ }
+
+ /**
+ * Returns the teampage position for a given teampage item, if the item exists.
+ *
+ * @param int $teampage_id Teampage_id of the selected item
+ * @return int Teampage position of the item
+ */
+ public function get_teampage_value($teampage_id)
+ {
+ $sql = 'SELECT teampage_position
+ FROM ' . TEAMPAGE_TABLE . '
+ WHERE teampage_id = ' . (int) $teampage_id;
+ $result = $this->db->sql_query($sql);
+ $current_value = $this->db->sql_fetchfield('teampage_position');
+ $this->db->sql_freeresult($result);
+
+ if ($current_value === false)
+ {
+ // Group not found.
+ throw new \phpbb\groupposition\exception('NO_GROUP');
+ }
+
+ return (int) $current_value;
+ }
+
+ /**
+ * Returns the teampage row for a given teampage item, if the item exists.
+ *
+ * @param int $teampage_id Teampage_id of the selected item
+ * @return array Teampage row of the item
+ */
+ public function get_teampage_values($teampage_id)
+ {
+ $sql = 'SELECT teampage_position, teampage_parent
+ FROM ' . TEAMPAGE_TABLE . '
+ WHERE teampage_id = ' . (int) $teampage_id;
+ $result = $this->db->sql_query($sql);
+ $row = $this->db->sql_fetchrow($result);
+ $this->db->sql_freeresult($result);
+
+ if ($row === false)
+ {
+ // Group not found.
+ throw new \phpbb\groupposition\exception('NO_GROUP');
+ }
+
+ return $row;
+ }
+
+
+ /**
+ * Get number of items displayed
+ *
+ * {@inheritDoc}
+ */
+ public function get_group_count()
+ {
+ $sql = 'SELECT teampage_position
+ FROM ' . TEAMPAGE_TABLE . '
+ ORDER BY teampage_position DESC';
+ $result = $this->db->sql_query_limit($sql, 1);
+ $group_count = (int) $this->db->sql_fetchfield('teampage_position');
+ $this->db->sql_freeresult($result);
+
+ return $group_count;
+ }
+
+ /**
+ * Adds a group by group_id
+ *
+ * {@inheritDoc}
+ */
+ public function add_group($group_id)
+ {
+ return $this->add_group_teampage($group_id, self::NO_PARENT);
+ }
+
+ /**
+ * Adds a group by group_id
+ *
+ * @param int $group_id group_id of the group to be added
+ * @param int $parent_id Teampage ID of the parent item
+ * @return bool True if the group was added successfully
+ */
+ public function add_group_teampage($group_id, $parent_id)
+ {
+ $current_value = $this->get_group_value($group_id);
+
+ if ($current_value == self::GROUP_DISABLED)
+ {
+ if ($parent_id != self::NO_PARENT)
+ {
+ // Check, whether the given parent is a category
+ $sql = 'SELECT teampage_id
+ FROM ' . TEAMPAGE_TABLE . '
+ WHERE group_id = 0
+ AND teampage_id = ' . (int) $parent_id;
+ $result = $this->db->sql_query_limit($sql, 1);
+ $parent_is_category = (bool) $this->db->sql_fetchfield('teampage_id');
+ $this->db->sql_freeresult($result);
+
+ if ($parent_is_category)
+ {
+ // Get value of last child from this parent and add group there
+ $sql = 'SELECT teampage_position
+ FROM ' . TEAMPAGE_TABLE . '
+ WHERE teampage_parent = ' . (int) $parent_id . '
+ OR teampage_id = ' . (int) $parent_id . '
+ ORDER BY teampage_position DESC';
+ $result = $this->db->sql_query_limit($sql, 1);
+ $new_position = (int) $this->db->sql_fetchfield('teampage_position');
+ $this->db->sql_freeresult($result);
+
+ $sql = 'UPDATE ' . TEAMPAGE_TABLE . '
+ SET teampage_position = teampage_position + 1
+ WHERE teampage_position > ' . $new_position;
+ $this->db->sql_query($sql);
+ }
+ }
+ else
+ {
+ // Add group at the end
+ $new_position = $this->get_group_count();
+ }
+
+ $sql_ary = array(
+ 'group_id' => $group_id,
+ 'teampage_position' => $new_position + 1,
+ 'teampage_parent' => $parent_id,
+ );
+
+ $sql = 'INSERT INTO ' . TEAMPAGE_TABLE . ' ' . $this->db->sql_build_array('INSERT', $sql_ary);
+ $this->db->sql_query($sql);
+
+ $this->cache->destroy('sql', TEAMPAGE_TABLE);
+ return true;
+ }
+
+ $this->cache->destroy('sql', TEAMPAGE_TABLE);
+ return false;
+ }
+
+ /**
+ * Adds a new category
+ *
+ * @param string $category_name Name of the category to be added
+ * @return bool True if the category was added successfully
+ */
+ public function add_category_teampage($category_name)
+ {
+ if ($category_name === '')
+ {
+ return false;
+ }
+
+ $num_entries = $this->get_group_count();
+
+ $sql_ary = array(
+ 'group_id' => 0,
+ 'teampage_position' => $num_entries + 1,
+ 'teampage_parent' => 0,
+ 'teampage_name' => truncate_string($category_name, 255, 255),
+ );
+
+ $sql = 'INSERT INTO ' . TEAMPAGE_TABLE . ' ' . $this->db->sql_build_array('INSERT', $sql_ary);
+ $this->db->sql_query($sql);
+
+ $this->cache->destroy('sql', TEAMPAGE_TABLE);
+ return true;
+ }
+
+ /**
+ * Deletes a group from the list and closes the gap in the position list.
+ *
+ * {@inheritDoc}
+ */
+ public function delete_group($group_id, $skip_group = false)
+ {
+ $current_value = $this->get_group_value($group_id);
+
+ if ($current_value != self::GROUP_DISABLED)
+ {
+ $sql = 'UPDATE ' . TEAMPAGE_TABLE . '
+ SET teampage_position = teampage_position - 1
+ WHERE teampage_position > ' . $current_value;
+ $this->db->sql_query($sql);
+
+ $sql = 'DELETE FROM ' . TEAMPAGE_TABLE . '
+ WHERE group_id = ' . $group_id;
+ $this->db->sql_query($sql);
+
+ $this->cache->destroy('sql', TEAMPAGE_TABLE);
+ return true;
+ }
+
+ $this->cache->destroy('sql', TEAMPAGE_TABLE);
+ return false;
+ }
+
+ /**
+ * Deletes an item from the list and closes the gap in the position list.
+ *
+ * @param int $teampage_id teampage_id of the item to be deleted
+ * @param bool $skip_group Skip setting the group to GROUP_DISABLED, to save the query, when you need to update it anyway.
+ * @return bool True if the item was deleted successfully
+ */
+ public function delete_teampage($teampage_id, $skip_group = false)
+ {
+ $current_value = $this->get_teampage_value($teampage_id);
+
+ if ($current_value != self::GROUP_DISABLED)
+ {
+ $sql = 'DELETE FROM ' . TEAMPAGE_TABLE . '
+ WHERE teampage_id = ' . $teampage_id . '
+ OR teampage_parent = ' . $teampage_id;
+ $this->db->sql_query($sql);
+
+ $delta = (int) $this->db->sql_affectedrows();
+
+ $sql = 'UPDATE ' . TEAMPAGE_TABLE . '
+ SET teampage_position = teampage_position - ' . $delta . '
+ WHERE teampage_position > ' . $current_value;
+ $this->db->sql_query($sql);
+
+ $this->cache->destroy('sql', TEAMPAGE_TABLE);
+ return true;
+ }
+
+ $this->cache->destroy('sql', TEAMPAGE_TABLE);
+ return false;
+ }
+
+ /**
+ * Moves a group up by group_id
+ *
+ * {@inheritDoc}
+ */
+ public function move_up($group_id)
+ {
+ return $this->move($group_id, 1);
+ }
+
+ /**
+ * Moves an item up by teampage_id
+ *
+ * @param int $group_id group_id of the group to be moved
+ * @return bool True if the group was moved successfully
+ */
+ public function move_up_teampage($teampage_id)
+ {
+ return $this->move_teampage($teampage_id, 1);
+ }
+
+ /**
+ * Moves a group down by group_id
+ *
+ * {@inheritDoc}
+ */
+ public function move_down($group_id)
+ {
+ return $this->move($group_id, -1);
+ }
+
+ /**
+ * Movesan item down by teampage_id
+ *
+ * @param int $group_id group_id of the group to be moved
+ * @return bool True if the group was moved successfully
+ */
+ public function move_down_teampage($teampage_id)
+ {
+ return $this->move_teampage($teampage_id, -1);
+ }
+
+ /**
+ * Moves a group up/down
+ *
+ * {@inheritDoc}
+ */
+ public function move($group_id, $delta)
+ {
+ $delta = (int) $delta;
+ if (!$delta)
+ {
+ return false;
+ }
+
+ $move_up = ($delta > 0) ? true : false;
+ $data = $this->get_group_values($group_id);
+
+ $current_value = (int) $data['teampage_position'];
+ if ($current_value != self::GROUP_DISABLED)
+ {
+ $this->db->sql_transaction('begin');
+
+ if (!$move_up && $data['teampage_parent'] == self::NO_PARENT)
+ {
+ // If we move items down, we need to grab the one sibling more,
+ // so we do not ignore the children of the previous sibling.
+ // We will remove the additional sibling later on.
+ $delta = abs($delta) + 1;
+ }
+
+ $sql = 'SELECT teampage_position
+ FROM ' . TEAMPAGE_TABLE . '
+ WHERE teampage_parent = ' . (int) $data['teampage_parent'] . '
+ AND teampage_position' . (($move_up) ? ' < ' : ' > ') . $current_value . '
+ ORDER BY teampage_position' . (($move_up) ? ' DESC' : ' ASC');
+ $result = $this->db->sql_query_limit($sql, $delta);
+
+ $sibling_count = 0;
+ $sibling_limit = $delta;
+
+ // Reset the delta, as we recalculate the new real delta
+ $delta = 0;
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ $sibling_count++;
+ $delta = $current_value - $row['teampage_position'];
+
+ if (!$move_up && $data['teampage_parent'] == self::NO_PARENT && $sibling_count == $sibling_limit)
+ {
+ // Remove the additional sibling we added previously
+ $delta++;
+ }
+ }
+ $this->db->sql_freeresult($result);
+
+ if ($delta)
+ {
+ // First we move all items between our current value and the target value up/down 1,
+ // so we have a gap for our item to move.
+ $sql = 'UPDATE ' . TEAMPAGE_TABLE . '
+ SET teampage_position = teampage_position' . (($move_up) ? ' + 1' : ' - 1') . '
+ WHERE teampage_position' . (($move_up) ? ' >= ' : ' <= ') . ($current_value - $delta) . '
+ AND teampage_position' . (($move_up) ? ' < ' : ' > ') . $current_value;
+ $this->db->sql_query($sql);
+
+ // And now finally, when we moved some other items and built a gap,
+ // we can move the desired item to it.
+ $sql = 'UPDATE ' . TEAMPAGE_TABLE . '
+ SET teampage_position = teampage_position ' . (($move_up) ? ' - ' : ' + ') . abs($delta) . '
+ WHERE group_id = ' . (int) $group_id;
+ $this->db->sql_query($sql);
+
+ $this->db->sql_transaction('commit');
+ $this->cache->destroy('sql', TEAMPAGE_TABLE);
+
+ return true;
+ }
+
+ $this->db->sql_transaction('commit');
+ }
+
+ $this->cache->destroy('sql', TEAMPAGE_TABLE);
+ return false;
+ }
+
+ /**
+ * Moves an item up/down
+ *
+ * @param int $teampage_id teampage_id of the item to be moved
+ * @param int $delta number of steps:
+ * - positive = move up
+ * - negative = move down
+ * @return bool True if the group was moved successfully
+ */
+ public function move_teampage($teampage_id, $delta)
+ {
+ $delta = (int) $delta;
+ if (!$delta)
+ {
+ return false;
+ }
+
+ $move_up = ($delta > 0) ? true : false;
+ $data = $this->get_teampage_values($teampage_id);
+
+ $current_value = (int) $data['teampage_position'];
+ if ($current_value != self::GROUP_DISABLED)
+ {
+ $this->db->sql_transaction('begin');
+
+ if (!$move_up && $data['teampage_parent'] == self::NO_PARENT)
+ {
+ // If we move items down, we need to grab the one sibling more,
+ // so we do not ignore the children of the previous sibling.
+ // We will remove the additional sibling later on.
+ $delta = abs($delta) + 1;
+ }
+
+ $sql = 'SELECT teampage_id, teampage_position
+ FROM ' . TEAMPAGE_TABLE . '
+ WHERE teampage_parent = ' . (int) $data['teampage_parent'] . '
+ AND teampage_position' . (($move_up) ? ' < ' : ' > ') . $current_value . '
+ ORDER BY teampage_position' . (($move_up) ? ' DESC' : ' ASC');
+ $result = $this->db->sql_query_limit($sql, $delta);
+
+ $sibling_count = 0;
+ $sibling_limit = $delta;
+
+ // Reset the delta, as we recalculate the new real delta
+ $delta = 0;
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ $sibling_count++;
+ $delta = $current_value - $row['teampage_position'];
+
+ // Remove the additional sibling we added previously
+ // But only, if we included it, this is not be the case
+ // when we reached the end of our list
+ if (!$move_up && $data['teampage_parent'] == self::NO_PARENT && $sibling_count == $sibling_limit)
+ {
+ $delta++;
+ }
+ }
+ $this->db->sql_freeresult($result);
+
+ if ($delta)
+ {
+ $sql = 'SELECT COUNT(teampage_id) as num_items
+ FROM ' . TEAMPAGE_TABLE . '
+ WHERE teampage_id = ' . (int) $teampage_id . '
+ OR teampage_parent = ' . (int) $teampage_id;
+ $result = $this->db->sql_query($sql);
+ $num_items = (int) $this->db->sql_fetchfield('num_items');
+ $this->db->sql_freeresult($result);
+
+ // First we move all items between our current value and the target value up/down 1,
+ // so we have a gap for our item to move.
+ $sql = 'UPDATE ' . TEAMPAGE_TABLE . '
+ SET teampage_position = teampage_position' . (($move_up) ? ' + ' : ' - ') . $num_items . '
+ WHERE teampage_position' . (($move_up) ? ' >= ' : ' <= ') . ($current_value - $delta) . '
+ AND teampage_position' . (($move_up) ? ' < ' : ' > ') . $current_value . '
+ AND NOT (teampage_id = ' . (int) $teampage_id . '
+ OR teampage_parent = ' . (int) $teampage_id . ')';
+ $this->db->sql_query($sql);
+
+ $delta = (!$move_up && $data['teampage_parent'] == self::NO_PARENT) ? (abs($delta) - ($num_items - 1)) : abs($delta);
+
+ // And now finally, when we moved some other items and built a gap,
+ // we can move the desired item to it.
+ $sql = 'UPDATE ' . TEAMPAGE_TABLE . '
+ SET teampage_position = teampage_position ' . (($move_up) ? ' - ' : ' + ') . $delta . '
+ WHERE teampage_id = ' . (int) $teampage_id . '
+ OR teampage_parent = ' . (int) $teampage_id;
+ $this->db->sql_query($sql);
+
+ $this->db->sql_transaction('commit');
+ $this->cache->destroy('sql', TEAMPAGE_TABLE);
+
+ return true;
+ }
+
+ $this->db->sql_transaction('commit');
+ }
+
+ $this->cache->destroy('sql', TEAMPAGE_TABLE);
+ return false;
+ }
+
+ /**
+ * Get group type language var
+ *
+ * @param int $group_type group_type from the groups-table
+ * @return string name of the language variable for the given group-type.
+ */
+ static public function group_type_language($group_type)
+ {
+ switch ($group_type)
+ {
+ case GROUP_OPEN:
+ return 'GROUP_REQUEST';
+ case GROUP_CLOSED:
+ return 'GROUP_CLOSED';
+ case GROUP_HIDDEN:
+ return 'GROUP_HIDDEN';
+ case GROUP_SPECIAL:
+ return 'GROUP_SPECIAL';
+ case GROUP_FREE:
+ return 'GROUP_OPEN';
+ }
+ }
+}
diff --git a/phpBB/phpbb/hook/finder.php b/phpBB/phpbb/hook/finder.php
new file mode 100644
index 0000000000..c8f71861d9
--- /dev/null
+++ b/phpBB/phpbb/hook/finder.php
@@ -0,0 +1,78 @@
+<?php
+/**
+*
+* @package extension
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\hook;
+
+/**
+* The hook finder locates installed hooks.
+*
+* @package phpBB3
+*/
+class finder
+{
+ protected $phpbb_root_path;
+ protected $cache;
+ protected $php_ext;
+
+ /**
+ * Creates a new finder instance.
+ *
+ * @param string $phpbb_root_path Path to the phpbb root directory
+ * @param string $php_ext php file extension
+ * @param \phpbb\cache\driver\driver_interface $cache A cache instance or null
+ */
+ public function __construct($phpbb_root_path, $php_ext, \phpbb\cache\driver\driver_interface $cache = null)
+ {
+ $this->phpbb_root_path = $phpbb_root_path;
+ $this->cache = $cache;
+ $this->php_ext = $php_ext;
+ }
+
+ /**
+ * Finds all hook files.
+ *
+ * @param bool $cache Whether the result should be cached
+ * @return array An array of paths to found hook files
+ */
+ public function find($cache = true)
+ {
+ if (!defined('DEBUG') && $cache && $this->cache)
+ {
+ $hook_files = $this->cache->get('_hooks');
+ if ($hook_files !== false)
+ {
+ return $hook_files;
+ }
+ }
+
+ $hook_files = array();
+
+ // Now search for hooks...
+ $dh = @opendir($this->phpbb_root_path . 'includes/hooks/');
+
+ if ($dh)
+ {
+ while (($file = readdir($dh)) !== false)
+ {
+ if (strpos($file, 'hook_') === 0 && substr($file, -strlen('.' . $this->php_ext)) === '.' . $this->php_ext)
+ {
+ $hook_files[] = substr($file, 0, -(strlen($this->php_ext) + 1));
+ }
+ }
+ closedir($dh);
+ }
+
+ if ($cache && $this->cache)
+ {
+ $this->cache->put('_hooks', $hook_files);
+ }
+
+ return $hook_files;
+ }
+}
diff --git a/phpBB/phpbb/json_response.php b/phpBB/phpbb/json_response.php
new file mode 100644
index 0000000000..45c2f6cac4
--- /dev/null
+++ b/phpBB/phpbb/json_response.php
@@ -0,0 +1,35 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2011 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+namespace phpbb;
+
+/**
+* JSON class
+* @package phpBB3
+*/
+class json_response
+{
+ /**
+ * Send the data to the client and exit the script.
+ *
+ * @param array $data Any additional data to send.
+ * @param bool $exit Will exit the script if true.
+ */
+ public function send($data, $exit = true)
+ {
+ header('Content-Type: application/json');
+ echo json_encode($data);
+
+ if ($exit)
+ {
+ garbage_collection();
+ exit_handler();
+ }
+ }
+}
diff --git a/phpBB/phpbb/lock/db.php b/phpBB/phpbb/lock/db.php
new file mode 100644
index 0000000000..461adda045
--- /dev/null
+++ b/phpBB/phpbb/lock/db.php
@@ -0,0 +1,143 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2010 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\lock;
+
+/**
+* Database locking class
+* @package phpBB3
+*/
+class db
+{
+ /**
+ * Name of the config variable this lock uses
+ * @var string
+ */
+ private $config_name;
+
+ /**
+ * Unique identifier for this lock.
+ *
+ * @var string
+ */
+ private $unique_id;
+
+ /**
+ * Stores the state of this lock
+ * @var bool
+ */
+ private $locked;
+
+ /**
+ * The phpBB configuration
+ * @var \phpbb\config\config
+ */
+ private $config;
+
+ /**
+ * A database connection
+ * @var \phpbb\db\driver\driver
+ */
+ private $db;
+
+ /**
+ * Creates a named released instance of the lock.
+ *
+ * You have to call acquire() to actually create the lock.
+ *
+ * @param string $config_name A config variable to be used for locking
+ * @param array $config The phpBB configuration
+ * @param \phpbb\db\driver\driver $db A database connection
+ */
+ public function __construct($config_name, \phpbb\config\config $config, \phpbb\db\driver\driver $db)
+ {
+ $this->config_name = $config_name;
+ $this->config = $config;
+ $this->db = $db;
+ }
+
+ /**
+ * Tries to acquire the lock by updating
+ * the configuration variable in the database.
+ *
+ * As a lock may only be held by one process at a time, lock
+ * acquisition may fail if another process is holding the lock
+ * or if another process obtained the lock but never released it.
+ * Locks are forcibly released after a timeout of 1 hour.
+ *
+ * @return bool true if lock was acquired
+ * false otherwise
+ */
+ public function acquire()
+ {
+ if ($this->locked)
+ {
+ return false;
+ }
+
+ if (!isset($this->config[$this->config_name]))
+ {
+ $this->config->set($this->config_name, '0', false);
+ }
+ $lock_value = $this->config[$this->config_name];
+
+ // make sure lock cannot be acquired by multiple processes
+ if ($lock_value)
+ {
+ // if the other process is running more than an hour already we have to assume it
+ // aborted without cleaning the lock
+ $time = explode(' ', $lock_value);
+ $time = $time[0];
+
+ if ($time + 3600 >= time())
+ {
+ return false;
+ }
+ }
+
+ $this->unique_id = time() . ' ' . unique_id();
+
+ // try to update the config value, if it was already modified by another
+ // process we failed to acquire the lock.
+ $this->locked = $this->config->set_atomic($this->config_name, $lock_value, $this->unique_id, false);
+
+ return $this->locked;
+ }
+
+ /**
+ * Does this process own the lock?
+ *
+ * @return bool true if lock is owned
+ * false otherwise
+ */
+ public function owns_lock()
+ {
+ return (bool) $this->locked;
+ }
+
+ /**
+ * Releases the lock.
+ *
+ * The lock must have been previously obtained, that is, acquire() call
+ * was issued and returned true.
+ *
+ * Note: Attempting to release a lock that is already released,
+ * that is, calling release() multiple times, is harmless.
+ *
+ * @return null
+ */
+ public function release()
+ {
+ if ($this->locked)
+ {
+ $this->config->set_atomic($this->config_name, $this->unique_id, '0', false);
+ $this->locked = false;
+ }
+ }
+}
diff --git a/phpBB/phpbb/lock/flock.php b/phpBB/phpbb/lock/flock.php
new file mode 100644
index 0000000000..94a5895440
--- /dev/null
+++ b/phpBB/phpbb/lock/flock.php
@@ -0,0 +1,138 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\lock;
+
+/**
+* File locking class
+* @package phpBB3
+*/
+class flock
+{
+ /**
+ * Path to the file to which access is controlled
+ *
+ * @var string
+ */
+ private $path;
+
+ /**
+ * File pointer for the lock file
+ * @var string
+ */
+ private $lock_fp;
+
+ /**
+ * Constructor.
+ *
+ * You have to call acquire() to actually acquire the lock.
+ *
+ * @param string $path Path to the file to which access is controlled
+ */
+ public function __construct($path)
+ {
+ $this->path = $path;
+ $this->lock_fp = null;
+ }
+
+ /**
+ * Tries to acquire the lock.
+ *
+ * If the lock is already held by another process, this call will block
+ * until the other process releases the lock. If a lock is acquired and
+ * is not released before script finishes but the process continues to
+ * live (apache/fastcgi) then subsequent processes trying to acquire
+ * the same lock will be blocked forever.
+ *
+ * If the lock is already held by the same process via another instance
+ * of this class, this call will block forever.
+ *
+ * If flock function is disabled in php or fails to work, lock
+ * acquisition will fail and false will be returned.
+ *
+ * @return bool true if lock was acquired
+ * false otherwise
+ */
+ public function acquire()
+ {
+ if ($this->lock_fp)
+ {
+ return false;
+ }
+
+ // For systems that can't have two processes opening
+ // one file for writing simultaneously
+ if (file_exists($this->path . '.lock'))
+ {
+ $mode = 'rb';
+ }
+ else
+ {
+ $mode = 'wb';
+ }
+
+ $this->lock_fp = @fopen($this->path . '.lock', $mode);
+
+ if ($mode == 'wb')
+ {
+ if (!$this->lock_fp)
+ {
+ // Two processes may attempt to create lock file at the same time.
+ // Have the losing process try opening the lock file again for reading
+ // on the assumption that the winning process created it
+ $mode = 'rb';
+ $this->lock_fp = @fopen($this->path . '.lock', $mode);
+ }
+ else
+ {
+ // Only need to set mode when the lock file is written
+ @chmod($this->path . '.lock', 0666);
+ }
+ }
+
+ if ($this->lock_fp)
+ {
+ @flock($this->lock_fp, LOCK_EX);
+ }
+
+ return (bool) $this->lock_fp;
+ }
+
+ /**
+ * Does this process own the lock?
+ *
+ * @return bool true if lock is owned
+ * false otherwise
+ */
+ public function owns_lock()
+ {
+ return (bool) $this->lock_fp;
+ }
+
+ /**
+ * Releases the lock.
+ *
+ * The lock must have been previously obtained, that is, acquire() call
+ * was issued and returned true.
+ *
+ * Note: Attempting to release a lock that is already released,
+ * that is, calling release() multiple times, is harmless.
+ *
+ * @return null
+ */
+ public function release()
+ {
+ if ($this->lock_fp)
+ {
+ @flock($this->lock_fp, LOCK_UN);
+ fclose($this->lock_fp);
+ $this->lock_fp = null;
+ }
+ }
+}
diff --git a/phpBB/phpbb/log/log.php b/phpBB/phpbb/log/log.php
new file mode 100644
index 0000000000..68b023e244
--- /dev/null
+++ b/phpBB/phpbb/log/log.php
@@ -0,0 +1,733 @@
+<?php
+/**
+*
+* @package \phpbb\log\log
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\log;
+
+/**
+* This class is used to add entries into the log table.
+*
+* @package \phpbb\log\log
+*/
+class log implements \phpbb\log\log_interface
+{
+ /**
+ * If set, administrative user profile links will be returned and messages
+ * will not be censored.
+ * @var bool
+ */
+ protected $is_in_admin;
+
+ /**
+ * An array with the disabled log types. Logs of such types will not be
+ * added when add_log() is called.
+ * @var array
+ */
+ protected $disabled_types;
+
+ /**
+ * Keeps the total log count of the last call to get_logs()
+ * @var int
+ */
+ protected $entry_count;
+
+ /**
+ * Keeps the offset of the last valid page of the last call to get_logs()
+ * @var int
+ */
+ protected $last_page_offset;
+
+ /**
+ * The table we use to store our logs.
+ * @var string
+ */
+ protected $log_table;
+
+ /**
+ * Database object
+ * @var \phpbb\db\driver\driver
+ */
+ protected $db;
+
+ /**
+ * User object
+ * @var \phpbb\user
+ */
+ protected $user;
+
+ /**
+ * Auth object
+ * @var \phpbb\auth\auth
+ */
+ protected $auth;
+
+ /**
+ * Event dispatcher object
+ * @var phpbb_dispatcher
+ */
+ protected $dispatcher;
+
+ /**
+ * phpBB root path
+ * @var string
+ */
+ protected $phpbb_root_path;
+
+ /**
+ * Admin root path
+ * @var string
+ */
+ protected $phpbb_admin_path;
+
+ /**
+ * PHP Extension
+ * @var string
+ */
+ protected $php_ext;
+
+ /**
+ * Constructor
+ *
+ * @param \phpbb\db\driver\driver $db Database object
+ * @param \phpbb\user $user User object
+ * @param \phpbb\auth\auth $auth Auth object
+ * @param phpbb_dispatcher $phpbb_dispatcher Event dispatcher
+ * @param string $phpbb_root_path Root path
+ * @param string $relative_admin_path Relative admin root path
+ * @param string $php_ext PHP Extension
+ * @param string $log_table Name of the table we use to store our logs
+ * @return null
+ */
+ public function __construct($db, $user, $auth, $phpbb_dispatcher, $phpbb_root_path, $relative_admin_path, $php_ext, $log_table)
+ {
+ $this->db = $db;
+ $this->user = $user;
+ $this->auth = $auth;
+ $this->dispatcher = $phpbb_dispatcher;
+ $this->phpbb_root_path = $phpbb_root_path;
+ $this->phpbb_admin_path = $this->phpbb_root_path . $relative_admin_path;
+ $this->php_ext = $php_ext;
+ $this->log_table = $log_table;
+
+ /*
+ * IN_ADMIN is set after the session is created,
+ * so we need to take ADMIN_START into account as well, otherwise
+ * it will not work for the \phpbb\log\log object we create in common.php
+ */
+ $this->set_is_admin((defined('ADMIN_START') && ADMIN_START) || (defined('IN_ADMIN') && IN_ADMIN));
+ $this->enable();
+ }
+
+ /**
+ * Set is_in_admin in order to return administrative user profile links
+ * in get_logs()
+ *
+ * @param bool $is_in_admin Are we called from within the acp?
+ * @return null
+ */
+ public function set_is_admin($is_in_admin)
+ {
+ $this->is_in_admin = (bool) $is_in_admin;
+ }
+
+ /**
+ * Returns the is_in_admin option
+ *
+ * @return bool
+ */
+ public function get_is_admin()
+ {
+ return $this->is_in_admin;
+ }
+
+ /**
+ * Set table name
+ *
+ * @param string $log_table Can overwrite the table to use for the logs
+ * @return null
+ */
+ public function set_log_table($log_table)
+ {
+ $this->log_table = $log_table;
+ }
+
+ /**
+ * This function returns the state of the log system.
+ *
+ * {@inheritDoc}
+ */
+ public function is_enabled($type = '')
+ {
+ if ($type == '' || $type == 'all')
+ {
+ return !isset($this->disabled_types['all']);
+ }
+ return !isset($this->disabled_types[$type]) && !isset($this->disabled_types['all']);
+ }
+
+ /**
+ * Disable log
+ *
+ * This function allows disabling the log system or parts of it, for this
+ * page call. When add_log is called and the type is disabled,
+ * the log will not be added to the database.
+ *
+ * {@inheritDoc}
+ */
+ public function disable($type = '')
+ {
+ if (is_array($type))
+ {
+ foreach ($type as $disable_type)
+ {
+ $this->disable($disable_type);
+ }
+ return;
+ }
+
+ // Empty string is an equivalent for all types.
+ if ($type == '')
+ {
+ $type = 'all';
+ }
+ $this->disabled_types[$type] = true;
+ }
+
+ /**
+ * Enable log
+ *
+ * This function allows re-enabling the log system.
+ *
+ * {@inheritDoc}
+ */
+ public function enable($type = '')
+ {
+ if (is_array($type))
+ {
+ foreach ($type as $enable_type)
+ {
+ $this->enable($enable_type);
+ }
+ return;
+ }
+
+ if ($type == '' || $type == 'all')
+ {
+ $this->disabled_types = array();
+ return;
+ }
+ unset($this->disabled_types[$type]);
+ }
+
+ /**
+ * Adds a log to the database
+ *
+ * {@inheritDoc}
+ */
+ public function add($mode, $user_id, $log_ip, $log_operation, $log_time = false, $additional_data = array())
+ {
+ if (!$this->is_enabled($mode))
+ {
+ return false;
+ }
+
+ if ($log_time == false)
+ {
+ $log_time = time();
+ }
+
+ $sql_ary = array(
+ 'user_id' => $user_id,
+ 'log_ip' => $log_ip,
+ 'log_time' => $log_time,
+ 'log_operation' => $log_operation,
+ );
+
+ switch ($mode)
+ {
+ case 'admin':
+ $sql_ary += array(
+ 'log_type' => LOG_ADMIN,
+ 'log_data' => (!empty($additional_data)) ? serialize($additional_data) : '',
+ );
+ break;
+
+ case 'mod':
+ $forum_id = (int) $additional_data['forum_id'];
+ unset($additional_data['forum_id']);
+ $topic_id = (int) $additional_data['topic_id'];
+ unset($additional_data['topic_id']);
+ $sql_ary += array(
+ 'log_type' => LOG_MOD,
+ 'forum_id' => $forum_id,
+ 'topic_id' => $topic_id,
+ 'log_data' => (!empty($additional_data)) ? serialize($additional_data) : '',
+ );
+ break;
+
+ case 'user':
+ $reportee_id = (int) $additional_data['reportee_id'];
+ unset($additional_data['reportee_id']);
+
+ $sql_ary += array(
+ 'log_type' => LOG_USERS,
+ 'reportee_id' => $reportee_id,
+ 'log_data' => (!empty($additional_data)) ? serialize($additional_data) : '',
+ );
+ break;
+
+ case 'critical':
+ $sql_ary += array(
+ 'log_type' => LOG_CRITICAL,
+ 'log_data' => (!empty($additional_data)) ? serialize($additional_data) : '',
+ );
+ break;
+ }
+
+ /**
+ * Allows to modify log data before we add it to the database
+ *
+ * NOTE: if sql_ary does not contain a log_type value, the entry will
+ * not be stored in the database. So ensure to set it, if needed.
+ *
+ * @event core.add_log
+ * @var string mode Mode of the entry we log
+ * @var int user_id ID of the user who triggered the log
+ * @var string log_ip IP of the user who triggered the log
+ * @var string log_operation Language key of the log operation
+ * @var int log_time Timestamp, when the log was added
+ * @var array additional_data Array with additional log data
+ * @var array sql_ary Array with log data we insert into the
+ * database. If sql_ary[log_type] is not set,
+ * we won't add the entry to the database.
+ * @since 3.1-A1
+ */
+ $vars = array('mode', 'user_id', 'log_ip', 'log_operation', 'log_time', 'additional_data', 'sql_ary');
+ extract($this->dispatcher->trigger_event('core.add_log', compact($vars)));
+
+ // We didn't find a log_type, so we don't save it in the database.
+ if (!isset($sql_ary['log_type']))
+ {
+ return false;
+ }
+
+ $this->db->sql_query('INSERT INTO ' . $this->log_table . ' ' . $this->db->sql_build_array('INSERT', $sql_ary));
+
+ return $this->db->sql_nextid();
+ }
+
+ /**
+ * Grab the logs from the database
+ *
+ * {@inheritDoc}
+ */
+ public function get_logs($mode, $count_logs = true, $limit = 0, $offset = 0, $forum_id = 0, $topic_id = 0, $user_id = 0, $log_time = 0, $sort_by = 'l.log_time DESC', $keywords = '')
+ {
+ $this->entry_count = 0;
+ $this->last_page_offset = $offset;
+
+ $topic_id_list = $reportee_id_list = array();
+
+ $profile_url = ($this->get_is_admin() && $this->phpbb_admin_path) ? append_sid("{$this->phpbb_admin_path}index.{$this->php_ext}", 'i=users&amp;mode=overview') : append_sid("{$this->phpbb_root_path}memberlist.{$this->php_ext}", 'mode=viewprofile');
+
+ switch ($mode)
+ {
+ case 'admin':
+ $log_type = LOG_ADMIN;
+ $sql_additional = '';
+ break;
+
+ case 'mod':
+ $log_type = LOG_MOD;
+ $sql_additional = '';
+
+ if ($topic_id)
+ {
+ $sql_additional = 'AND l.topic_id = ' . (int) $topic_id;
+ }
+ else if (is_array($forum_id))
+ {
+ $sql_additional = 'AND ' . $this->db->sql_in_set('l.forum_id', array_map('intval', $forum_id));
+ }
+ else if ($forum_id)
+ {
+ $sql_additional = 'AND l.forum_id = ' . (int) $forum_id;
+ }
+ break;
+
+ case 'user':
+ $log_type = LOG_USERS;
+ $sql_additional = 'AND l.reportee_id = ' . (int) $user_id;
+ break;
+
+ case 'users':
+ $log_type = LOG_USERS;
+ $sql_additional = '';
+ break;
+
+ case 'critical':
+ $log_type = LOG_CRITICAL;
+ $sql_additional = '';
+ break;
+
+ default:
+ $log_type = false;
+ $sql_additional = '';
+ }
+
+ /**
+ * Overwrite log type and limitations before we count and get the logs
+ *
+ * NOTE: if log_type is false, no entries will be returned.
+ *
+ * @event core.get_logs_modify_type
+ * @var string mode Mode of the entries we display
+ * @var bool count_logs Do we count all matching entries?
+ * @var int limit Limit the number of entries
+ * @var int offset Offset when fetching the entries
+ * @var mixed forum_id Limit entries to the forum_id,
+ * can also be an array of forum_ids
+ * @var int topic_id Limit entries to the topic_id
+ * @var int user_id Limit entries to the user_id
+ * @var int log_time Limit maximum age of log entries
+ * @var string sort_by SQL order option
+ * @var string keywords Will only return entries that have the
+ * keywords in log_operation or log_data
+ * @var string profile_url URL to the users profile
+ * @var int log_type Limit logs to a certain type. If log_type
+ * is false, no entries will be returned.
+ * @var string sql_additional Additional conditions for the entries,
+ * e.g.: 'AND l.forum_id = 1'
+ * @since 3.1-A1
+ */
+ $vars = array('mode', 'count_logs', 'limit', 'offset', 'forum_id', 'topic_id', 'user_id', 'log_time', 'sort_by', 'keywords', 'profile_url', 'log_type', 'sql_additional');
+ extract($this->dispatcher->trigger_event('core.get_logs_modify_type', compact($vars)));
+
+ if ($log_type === false)
+ {
+ $this->last_page_offset = 0;
+ return array();
+ }
+
+ $sql_keywords = '';
+ if (!empty($keywords))
+ {
+ // Get the SQL condition for our keywords
+ $sql_keywords = $this->generate_sql_keyword($keywords);
+ }
+
+ if ($count_logs)
+ {
+ $sql = 'SELECT COUNT(l.log_id) AS total_entries
+ FROM ' . $this->log_table . ' l, ' . USERS_TABLE . ' u
+ WHERE l.log_type = ' . (int) $log_type . '
+ AND l.user_id = u.user_id
+ AND l.log_time >= ' . (int) $log_time . "
+ $sql_keywords
+ $sql_additional";
+ $result = $this->db->sql_query($sql);
+ $this->entry_count = (int) $this->db->sql_fetchfield('total_entries');
+ $this->db->sql_freeresult($result);
+
+ if ($this->entry_count == 0)
+ {
+ // Save the queries, because there are no logs to display
+ $this->last_page_offset = 0;
+ return array();
+ }
+
+ // Return the user to the last page that is valid
+ while ($this->last_page_offset >= $this->entry_count)
+ {
+ $this->last_page_offset = max(0, $this->last_page_offset - $limit);
+ }
+ }
+
+ $sql = 'SELECT l.*, u.username, u.username_clean, u.user_colour
+ FROM ' . $this->log_table . ' l, ' . USERS_TABLE . ' u
+ WHERE l.log_type = ' . (int) $log_type . '
+ AND u.user_id = l.user_id
+ ' . (($log_time) ? 'AND l.log_time >= ' . (int) $log_time : '') . "
+ $sql_keywords
+ $sql_additional
+ ORDER BY $sort_by";
+ $result = $this->db->sql_query_limit($sql, $limit, $this->last_page_offset);
+
+ $i = 0;
+ $log = array();
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ $row['forum_id'] = (int) $row['forum_id'];
+ if ($row['topic_id'])
+ {
+ $topic_id_list[] = (int) $row['topic_id'];
+ }
+
+ if ($row['reportee_id'])
+ {
+ $reportee_id_list[] = (int) $row['reportee_id'];
+ }
+
+ $log_entry_data = array(
+ 'id' => (int) $row['log_id'],
+
+ 'reportee_id' => (int) $row['reportee_id'],
+ 'reportee_username' => '',
+ 'reportee_username_full'=> '',
+
+ 'user_id' => (int) $row['user_id'],
+ 'username' => $row['username'],
+ 'username_full' => get_username_string('full', $row['user_id'], $row['username'], $row['user_colour'], false, $profile_url),
+
+ 'ip' => $row['log_ip'],
+ 'time' => (int) $row['log_time'],
+ 'forum_id' => (int) $row['forum_id'],
+ 'topic_id' => (int) $row['topic_id'],
+
+ 'viewforum' => ($row['forum_id'] && $this->auth->acl_get('f_read', $row['forum_id'])) ? append_sid("{$this->phpbb_root_path}viewforum.{$this->php_ext}", 'f=' . $row['forum_id']) : false,
+ 'action' => (isset($this->user->lang[$row['log_operation']])) ? $this->user->lang[$row['log_operation']] : '{' . ucfirst(str_replace('_', ' ', $row['log_operation'])) . '}',
+ );
+
+ /**
+ * Modify the entry's data before it is returned
+ *
+ * @event core.get_logs_modify_entry_data
+ * @var array row Entry data from the database
+ * @var array log_entry_data Entry's data which is returned
+ * @since 3.1-A1
+ */
+ $vars = array('row', 'log_entry_data');
+ extract($this->dispatcher->trigger_event('core.get_logs_modify_entry_data', compact($vars)));
+
+ $log[$i] = $log_entry_data;
+
+ if (!empty($row['log_data']))
+ {
+ $log_data_ary = unserialize($row['log_data']);
+ $log_data_ary = ($log_data_ary !== false) ? $log_data_ary : array();
+
+ if (isset($this->user->lang[$row['log_operation']]))
+ {
+ // Check if there are more occurrences of % than
+ // arguments, if there are we fill out the arguments
+ // array. It doesn't matter if we add more arguments than
+ // placeholders.
+ if ((substr_count($log[$i]['action'], '%') - sizeof($log_data_ary)) > 0)
+ {
+ $log_data_ary = array_merge($log_data_ary, array_fill(0, substr_count($log[$i]['action'], '%') - sizeof($log_data_ary), ''));
+ }
+
+ $log[$i]['action'] = vsprintf($log[$i]['action'], $log_data_ary);
+
+ // If within the admin panel we do not censor text out
+ if ($this->get_is_admin())
+ {
+ $log[$i]['action'] = bbcode_nl2br($log[$i]['action']);
+ }
+ else
+ {
+ $log[$i]['action'] = bbcode_nl2br(censor_text($log[$i]['action']));
+ }
+ }
+ else if (!empty($log_data_ary))
+ {
+ $log[$i]['action'] .= '<br />' . implode('', $log_data_ary);
+ }
+
+ /* Apply make_clickable... has to be seen if it is for good. :/
+ // Seems to be not for the moment, reconsider later...
+ $log[$i]['action'] = make_clickable($log[$i]['action']);
+ */
+ }
+
+ $i++;
+ }
+ $this->db->sql_freeresult($result);
+
+ /**
+ * Get some additional data after we got all log entries
+ *
+ * @event core.get_logs_get_additional_data
+ * @var array log Array with all our log entries
+ * @var array topic_id_list Array of topic ids, for which we
+ * get the permission data
+ * @var array reportee_id_list Array of additional user IDs we
+ * get the username strings for
+ * @since 3.1-A1
+ */
+ $vars = array('log', 'topic_id_list', 'reportee_id_list');
+ extract($this->dispatcher->trigger_event('core.get_logs_get_additional_data', compact($vars)));
+
+ if (sizeof($topic_id_list))
+ {
+ $topic_auth = $this->get_topic_auth($topic_id_list);
+
+ foreach ($log as $key => $row)
+ {
+ $log[$key]['viewtopic'] = (isset($topic_auth['f_read'][$row['topic_id']])) ? append_sid("{$this->phpbb_root_path}viewtopic.{$this->php_ext}", 'f=' . $topic_auth['f_read'][$row['topic_id']] . '&amp;t=' . $row['topic_id']) : false;
+ $log[$key]['viewlogs'] = (isset($topic_auth['m_'][$row['topic_id']])) ? append_sid("{$this->phpbb_root_path}mcp.{$this->php_ext}", 'i=logs&amp;mode=topic_logs&amp;t=' . $row['topic_id'], true, $this->user->session_id) : false;
+ }
+ }
+
+ if (sizeof($reportee_id_list))
+ {
+ $reportee_data_list = $this->get_reportee_data($reportee_id_list);
+
+ foreach ($log as $key => $row)
+ {
+ if (!isset($reportee_data_list[$row['reportee_id']]))
+ {
+ continue;
+ }
+
+ $log[$key]['reportee_username'] = $reportee_data_list[$row['reportee_id']]['username'];
+ $log[$key]['reportee_username_full'] = get_username_string('full', $row['reportee_id'], $reportee_data_list[$row['reportee_id']]['username'], $reportee_data_list[$row['reportee_id']]['user_colour'], false, $profile_url);
+ }
+ }
+
+ return $log;
+ }
+
+ /**
+ * Generates a sql condition for the specified keywords
+ *
+ * @param string $keywords The keywords the user specified to search for
+ *
+ * @return string Returns the SQL condition searching for the keywords
+ */
+ protected function generate_sql_keyword($keywords)
+ {
+ // Use no preg_quote for $keywords because this would lead to sole
+ // backslashes being added. We also use an OR connection here for
+ // spaces and the | string. Currently, regex is not supported for
+ // searching (but may come later).
+ $keywords = preg_split('#[\s|]+#u', utf8_strtolower($keywords), 0, PREG_SPLIT_NO_EMPTY);
+ $sql_keywords = '';
+
+ if (!empty($keywords))
+ {
+ $keywords_pattern = array();
+
+ // Build pattern and keywords...
+ for ($i = 0, $num_keywords = sizeof($keywords); $i < $num_keywords; $i++)
+ {
+ $keywords_pattern[] = preg_quote($keywords[$i], '#');
+ $keywords[$i] = $this->db->sql_like_expression($this->db->any_char . $keywords[$i] . $this->db->any_char);
+ }
+
+ $keywords_pattern = '#' . implode('|', $keywords_pattern) . '#ui';
+
+ $operations = array();
+ foreach ($this->user->lang as $key => $value)
+ {
+ if (substr($key, 0, 4) == 'LOG_' && preg_match($keywords_pattern, $value))
+ {
+ $operations[] = $key;
+ }
+ }
+
+ $sql_keywords = 'AND (';
+ if (!empty($operations))
+ {
+ $sql_keywords .= $this->db->sql_in_set('l.log_operation', $operations) . ' OR ';
+ }
+ $sql_lower = $this->db->sql_lower_text('l.log_data');
+ $sql_keywords .= " $sql_lower " . implode(" OR $sql_lower ", $keywords) . ')';
+ }
+
+ return $sql_keywords;
+ }
+
+ /**
+ * Determine whether the user is allowed to read and/or moderate the forum of the topic
+ *
+ * @param array $topic_ids Array with the topic ids
+ *
+ * @return array Returns an array with two keys 'm_' and 'read_f' which are also an array of topic_id => forum_id sets when the permissions are given. Sample:
+ * array(
+ * 'permission' => array(
+ * topic_id => forum_id
+ * ),
+ * ),
+ */
+ protected function get_topic_auth(array $topic_ids)
+ {
+ $forum_auth = array('f_read' => array(), 'm_' => array());
+ $topic_ids = array_unique($topic_ids);
+
+ $sql = 'SELECT topic_id, forum_id
+ FROM ' . TOPICS_TABLE . '
+ WHERE ' . $this->db->sql_in_set('topic_id', array_map('intval', $topic_ids));
+ $result = $this->db->sql_query($sql);
+
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ $row['topic_id'] = (int) $row['topic_id'];
+ $row['forum_id'] = (int) $row['forum_id'];
+
+ if ($this->auth->acl_get('f_read', $row['forum_id']))
+ {
+ $forum_auth['f_read'][$row['topic_id']] = $row['forum_id'];
+ }
+
+ if ($this->auth->acl_gets('a_', 'm_', $row['forum_id']))
+ {
+ $forum_auth['m_'][$row['topic_id']] = $row['forum_id'];
+ }
+ }
+ $this->db->sql_freeresult($result);
+
+ return $forum_auth;
+ }
+
+ /**
+ * Get the data for all reportee from the database
+ *
+ * @param array $reportee_ids Array with the user ids of the reportees
+ *
+ * @return array Returns an array with the reportee data
+ */
+ protected function get_reportee_data(array $reportee_ids)
+ {
+ $reportee_ids = array_unique($reportee_ids);
+ $reportee_data_list = array();
+
+ $sql = 'SELECT user_id, username, user_colour
+ FROM ' . USERS_TABLE . '
+ WHERE ' . $this->db->sql_in_set('user_id', $reportee_ids);
+ $result = $this->db->sql_query($sql);
+
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ $reportee_data_list[$row['user_id']] = $row;
+ }
+ $this->db->sql_freeresult($result);
+
+ return $reportee_data_list;
+ }
+
+ /**
+ * Get total log count
+ *
+ * {@inheritDoc}
+ */
+ public function get_log_count()
+ {
+ return ($this->entry_count) ? $this->entry_count : 0;
+ }
+
+ /**
+ * Get offset of the last valid log page
+ *
+ * {@inheritDoc}
+ */
+ public function get_valid_offset()
+ {
+ return ($this->last_page_offset) ? $this->last_page_offset : 0;
+ }
+}
diff --git a/phpBB/phpbb/log/log_interface.php b/phpBB/phpbb/log/log_interface.php
new file mode 100644
index 0000000000..420ba79691
--- /dev/null
+++ b/phpBB/phpbb/log/log_interface.php
@@ -0,0 +1,100 @@
+<?php
+/**
+*
+* @package \phpbb\log\log
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\log;
+
+/**
+* The interface for the log-system.
+*
+* @package \phpbb\log\log
+*/
+interface log_interface
+{
+ /**
+ * This function returns the state of the log system.
+ *
+ * @param string $type The log type we want to check. Empty to get
+ * global log status.
+ *
+ * @return bool True if log for the type is enabled
+ */
+ public function is_enabled($type = '');
+
+ /**
+ * Disable log
+ *
+ * This function allows disabling the log system or parts of it, for this
+ * page call. When add_log is called and the type is disabled,
+ * the log will not be added to the database.
+ *
+ * @param mixed $type The log type we want to disable. Empty to
+ * disable all logs. Can also be an array of types.
+ *
+ * @return null
+ */
+ public function disable($type = '');
+
+ /**
+ * Enable log
+ *
+ * This function allows re-enabling the log system.
+ *
+ * @param mixed $type The log type we want to enable. Empty to
+ * enable all logs. Can also be an array of types.
+ *
+ * @return null
+ */
+ public function enable($type = '');
+
+ /**
+ * Adds a log entry to the database
+ *
+ * @param string $mode The mode defines which log_type is used and from which log the entry is retrieved
+ * @param int $user_id User ID of the user
+ * @param string $log_ip IP address of the user
+ * @param string $log_operation Name of the operation
+ * @param int $log_time Timestamp when the log entry was added, if empty time() will be used
+ * @param 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.
+ */
+ public function add($mode, $user_id, $log_ip, $log_operation, $log_time = false, $additional_data = array());
+
+ /**
+ * Grab the logs from the database
+ *
+ * @param string $mode The mode defines which log_type is used and ifrom which log the entry is retrieved
+ * @param bool $count_logs Shall we count all matching log entries?
+ * @param int $limit Limit the number of entries that are returned
+ * @param int $offset Offset when fetching the log entries, f.e. when paginating
+ * @param mixed $forum_id Restrict the log entries to the given forum_id (can also be an array of forum_ids)
+ * @param int $topic_id Restrict the log entries to the given topic_id
+ * @param int $user_id Restrict the log entries to the given user_id
+ * @param int $log_time Only get log entries newer than the given timestamp
+ * @param string $sort_by SQL order option, e.g. 'l.log_time DESC'
+ * @param string $keywords Will only return log entries that have the keywords in log_operation or log_data
+ *
+ * @return array The result array with the logs
+ */
+ public function get_logs($mode, $count_logs = true, $limit = 0, $offset = 0, $forum_id = 0, $topic_id = 0, $user_id = 0, $log_time = 0, $sort_by = 'l.log_time DESC', $keywords = '');
+
+ /**
+ * Get total log count
+ *
+ * @return int Returns the number of matching logs from the last call to get_logs()
+ */
+ public function get_log_count();
+
+ /**
+ * Get offset of the last valid page
+ *
+ * @return int Returns the offset of the last valid page from the last call to get_logs()
+ */
+ public function get_valid_offset();
+}
diff --git a/phpBB/phpbb/log/null.php b/phpBB/phpbb/log/null.php
new file mode 100644
index 0000000000..77d0fbe2d7
--- /dev/null
+++ b/phpBB/phpbb/log/null.php
@@ -0,0 +1,72 @@
+<?php
+/**
+*
+* @package phpbb_log
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\log;
+
+/**
+* Null logger
+*
+* @package phpbb_log
+*/
+class null implements log_interface
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function is_enabled($type = '')
+ {
+ return false;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function disable($type = '')
+ {
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function enable($type = '')
+ {
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function add($mode, $user_id, $log_ip, $log_operation, $log_time = false, $additional_data = array())
+ {
+ return false;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function get_logs($mode, $count_logs = true, $limit = 0, $offset = 0, $forum_id = 0, $topic_id = 0, $user_id = 0, $log_time = 0, $sort_by = 'l.log_time DESC', $keywords = '')
+ {
+ return array();
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function get_log_count()
+ {
+ return 0;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function get_valid_offset()
+ {
+ return 0;
+ }
+}
diff --git a/phpBB/phpbb/mimetype/content_guesser.php b/phpBB/phpbb/mimetype/content_guesser.php
new file mode 100644
index 0000000000..2d74582a21
--- /dev/null
+++ b/phpBB/phpbb/mimetype/content_guesser.php
@@ -0,0 +1,33 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\mimetype;
+
+/**
+* @package mimetype
+*/
+
+class content_guesser extends guesser_base
+{
+ /**
+ * @inheritdoc
+ */
+ public function is_supported()
+ {
+ return function_exists('mime_content_type');
+ }
+
+ /**
+ * @inheritdoc
+ */
+ public function guess($file, $file_name = '')
+ {
+ return mime_content_type($file);
+ }
+}
diff --git a/phpBB/phpbb/mimetype/extension_guesser.php b/phpBB/phpbb/mimetype/extension_guesser.php
new file mode 100644
index 0000000000..f6f4ae0138
--- /dev/null
+++ b/phpBB/phpbb/mimetype/extension_guesser.php
@@ -0,0 +1,509 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\mimetype;
+
+/**
+* @package mimetype
+*/
+
+class extension_guesser extends guesser_base
+{
+ /**
+ * @var file extension map
+ */
+ protected $extension_map = array(
+ '3dm' => 'x-world/x-3dmf',
+ '3dmf' => 'x-world/x-3dmf',
+ 'a' => 'application/octet-stream',
+ 'aab' => 'application/x-authorware-bin',
+ 'aam' => 'application/x-authorware-map',
+ 'aas' => 'application/x-authorware-seg',
+ 'abc' => 'text/vnd.abc',
+ 'acgi' => 'text/html',
+ 'afl' => 'video/animaflex',
+ 'ai' => 'application/postscript',
+ 'aif' => 'audio/aiff',
+ 'aifc' => 'audio/aiff',
+ 'aiff' => 'audio/aiff',
+ 'aim' => 'application/x-aim',
+ 'aip' => 'text/x-audiosoft-intra',
+ 'ani' => 'application/x-navi-animation',
+ 'aos' => 'application/x-nokia-9000-communicator-add-on-software',
+ 'aps' => 'application/mime',
+ 'arc' => 'application/octet-stream',
+ 'arj' => 'application/arj',
+ 'art' => 'image/x-jg',
+ 'asf' => 'video/x-ms-asf',
+ 'asm' => 'text/x-asm',
+ 'asp' => 'text/asp',
+ 'asx' => 'video/x-ms-asf',
+ 'au' => 'audio/x-au',
+ 'avi' => 'video/avi',
+ 'avs' => 'video/avs-video',
+ 'bcpio' => 'application/x-bcpio',
+ 'bin' => 'application/x-binary',
+ 'bm' => 'image/bmp',
+ 'bmp' => 'image/bmp',
+ 'boo' => 'application/book',
+ 'book' => 'application/book',
+ 'boz' => 'application/x-bzip2',
+ 'bsh' => 'application/x-bsh',
+ 'bz' => 'application/x-bzip',
+ 'bz2' => 'application/x-bzip2',
+ 'c' => 'text/x-c',
+ 'c++' => 'text/x-c',
+ 'cat' => 'application/vnd.ms-pki.seccat',
+ 'cc' => 'text/plain',
+ 'ccad' => 'application/clariscad',
+ 'cco' => 'application/x-cocoa',
+ 'cdf' => 'application/cdf',
+ 'cer' => 'application/x-x509-ca-cert',
+ 'cha' => 'application/x-chat',
+ 'chat' => 'application/x-chat',
+ 'class' => 'application/java',
+ 'com' => 'application/octet-stream',
+ 'conf' => 'text/plain',
+ 'cpio' => 'application/x-cpio',
+ 'cpp' => 'text/x-c',
+ 'cpt' => 'application/x-cpt',
+ 'crl' => 'application/pkix-crl',
+ 'crt' => 'application/x-x509-ca-cert',
+ 'csh' => 'application/x-csh',
+ 'css' => 'text/css',
+ 'cxx' => 'text/plain',
+ 'dcr' => 'application/x-director',
+ 'deepv' => 'application/x-deepv',
+ 'def' => 'text/plain',
+ 'der' => 'application/x-x509-ca-cert',
+ 'dif' => 'video/x-dv',
+ 'dir' => 'application/x-director',
+ 'dl' => 'video/dl',
+ 'doc' => 'application/msword',
+ 'dot' => 'application/msword',
+ 'dp' => 'application/commonground',
+ 'drw' => 'application/drafting',
+ 'dump' => 'application/octet-stream',
+ 'dv' => 'video/x-dv',
+ 'dvi' => 'application/x-dvi',
+ 'dwf' => 'model/vnd.dwf',
+ 'dwg' => 'image/x-dwg',
+ 'dxf' => 'image/x-dwg',
+ 'dxr' => 'application/x-director',
+ 'el' => 'text/x-script.elisp',
+ 'elc' => 'application/x-elc',
+ 'env' => 'application/x-envoy',
+ 'eps' => 'application/postscript',
+ 'es' => 'application/x-esrehber',
+ 'etx' => 'text/x-setext',
+ 'evy' => 'application/x-envoy',
+ 'exe' => 'application/octet-stream',
+ 'f' => 'text/x-fortran',
+ 'f77' => 'text/x-fortran',
+ 'f90' => 'text/x-fortran',
+ 'fdf' => 'application/vnd.fdf',
+ 'fif' => 'image/fif',
+ 'fli' => 'video/x-fli',
+ 'flo' => 'image/florian',
+ 'flx' => 'text/vnd.fmi.flexstor',
+ 'fmf' => 'video/x-atomic3d-feature',
+ 'for' => 'text/x-fortran',
+ 'fpx' => 'image/vnd.fpx',
+ 'frl' => 'application/freeloader',
+ 'funk' => 'audio/make',
+ 'g' => 'text/plain',
+ 'g3' => 'image/g3fax',
+ 'gif' => 'image/gif',
+ 'gl' => 'video/x-gl',
+ 'gsd' => 'audio/x-gsm',
+ 'gsm' => 'audio/x-gsm',
+ 'gsp' => 'application/x-gsp',
+ 'gss' => 'application/x-gss',
+ 'gtar' => 'application/x-gtar',
+ 'gz' => 'application/x-gzip',
+ 'gzip' => 'application/x-gzip',
+ 'h' => 'text/x-h',
+ 'hdf' => 'application/x-hdf',
+ 'help' => 'application/x-helpfile',
+ 'hgl' => 'application/vnd.hp-hpgl',
+ 'hh' => 'text/x-h',
+ 'hlb' => 'text/x-script',
+ 'hlp' => 'application/hlp',
+ 'hpg' => 'application/vnd.hp-hpgl',
+ 'hpgl' => 'application/vnd.hp-hpgl',
+ 'hqx' => 'application/x-binhex40',
+ 'hta' => 'application/hta',
+ 'htc' => 'text/x-component',
+ 'htm' => 'text/html',
+ 'html' => 'text/html',
+ 'htmls' => 'text/html',
+ 'htt' => 'text/webviewhtml',
+ 'htx' => 'text/html',
+ 'ice' => 'x-conference/x-cooltalk',
+ 'ico' => 'image/x-icon',
+ 'idc' => 'text/plain',
+ 'ief' => 'image/ief',
+ 'iefs' => 'image/ief',
+ 'iges' => 'application/iges',
+ 'igs' => 'application/iges',
+ 'ima' => 'application/x-ima',
+ 'imap' => 'application/x-httpd-imap',
+ 'inf' => 'application/inf',
+ 'ins' => 'application/x-internett-signup',
+ 'ip' => 'application/x-ip2',
+ 'isu' => 'video/x-isvideo',
+ 'it' => 'audio/it',
+ 'iv' => 'application/x-inventor',
+ 'ivr' => 'i-world/i-vrml',
+ 'ivy' => 'application/x-livescreen',
+ 'jam' => 'audio/x-jam',
+ 'jav' => 'text/plain',
+ 'jav' => 'text/x-java-source',
+ 'java' => 'text/x-java-source',
+ 'jcm' => 'application/x-java-commerce',
+ 'jfif' => 'image/jpeg',
+ 'jfif-tbnl' => 'image/jpeg',
+ 'jpe' => 'image/jpeg',
+ 'jpeg' => 'image/jpeg',
+ 'jpg' => 'image/jpeg',
+ 'jps' => 'image/x-jps',
+ 'js' => 'application/x-javascript',
+ 'jut' => 'image/jutvision',
+ 'kar' => 'audio/midi',
+ 'ksh' => 'text/x-script.ksh',
+ 'la' => 'audio/x-nspaudio',
+ 'lam' => 'audio/x-liveaudio',
+ 'latex' => 'application/x-latex',
+ 'lha' => 'application/x-lha',
+ 'lhx' => 'application/octet-stream',
+ 'list' => 'text/plain',
+ 'lma' => 'audio/x-nspaudio',
+ 'log' => 'text/plain',
+ 'lsp' => 'text/x-script.lisp',
+ 'lst' => 'text/plain',
+ 'lsx' => 'text/x-la-asf',
+ 'ltx' => 'application/x-latex',
+ 'lzh' => 'application/x-lzh',
+ 'lzx' => 'application/x-lzx',
+ 'm' => 'text/x-m',
+ 'm1v' => 'video/mpeg',
+ 'm2a' => 'audio/mpeg',
+ 'm2v' => 'video/mpeg',
+ 'm3u' => 'audio/x-mpequrl',
+ 'man' => 'application/x-troff-man',
+ 'map' => 'application/x-navimap',
+ 'mar' => 'text/plain',
+ 'mbd' => 'application/mbedlet',
+ 'mc$' => 'application/x-magic-cap-package-1.0',
+ 'mcd' => 'application/x-mathcad',
+ 'mcf' => 'text/mcf',
+ 'mcp' => 'application/netmc',
+ 'me' => 'application/x-troff-me',
+ 'mht' => 'message/rfc822',
+ 'mhtml' => 'message/rfc822',
+ 'mid' => 'audio/x-midi',
+ 'midi' => 'audio/x-midi',
+ 'mif' => 'application/x-mif',
+ 'mime' => 'www/mime',
+ 'mjf' => 'audio/x-vnd.audioexplosion.mjuicemediafile',
+ 'mjpg' => 'video/x-motion-jpeg',
+ 'mm' => 'application/x-meme',
+ 'mme' => 'application/base64',
+ 'mod' => 'audio/x-mod',
+ 'moov' => 'video/quicktime',
+ 'mov' => 'video/quicktime',
+ 'movie' => 'video/x-sgi-movie',
+ 'mp2' => 'audio/x-mpeg',
+ 'mp3' => 'audio/x-mpeg-3',
+ 'mpa' => 'audio/mpeg',
+ 'mpc' => 'application/x-project',
+ 'mpe' => 'video/mpeg',
+ 'mpeg' => 'video/mpeg',
+ 'mpg' => 'video/mpeg',
+ 'mpga' => 'audio/mpeg',
+ 'mpp' => 'application/vnd.ms-project',
+ 'mpt' => 'application/x-project',
+ 'mpv' => 'application/x-project',
+ 'mpx' => 'application/x-project',
+ 'mrc' => 'application/marc',
+ 'ms' => 'application/x-troff-ms',
+ 'mv' => 'video/x-sgi-movie',
+ 'my' => 'audio/make',
+ 'mzz' => 'application/x-vnd.audioexplosion.mzz',
+ 'nap' => 'image/naplps',
+ 'naplps' => 'image/naplps',
+ 'nc' => 'application/x-netcdf',
+ 'ncm' => 'application/vnd.nokia.configuration-message',
+ 'nif' => 'image/x-niff',
+ 'niff' => 'image/x-niff',
+ 'nix' => 'application/x-mix-transfer',
+ 'nsc' => 'application/x-conference',
+ 'nvd' => 'application/x-navidoc',
+ 'o' => 'application/octet-stream',
+ 'oda' => 'application/oda',
+ 'omc' => 'application/x-omc',
+ 'omcd' => 'application/x-omcdatamaker',
+ 'omcr' => 'application/x-omcregerator',
+ 'p' => 'text/x-pascal',
+ 'p10' => 'application/x-pkcs10',
+ 'p12' => 'application/x-pkcs12',
+ 'p7a' => 'application/x-pkcs7-signature',
+ 'p7c' => 'application/x-pkcs7-mime',
+ 'p7m' => 'application/x-pkcs7-mime',
+ 'p7r' => 'application/x-pkcs7-certreqresp',
+ 'p7s' => 'application/pkcs7-signature',
+ 'part' => 'application/pro_eng',
+ 'pas' => 'text/pascal',
+ 'pbm' => 'image/x-portable-bitmap',
+ 'pcl' => 'application/x-pcl',
+ 'pct' => 'image/x-pict',
+ 'pcx' => 'image/x-pcx',
+ 'pdb' => 'chemical/x-pdb',
+ 'pdf' => 'application/pdf',
+ 'pfunk' => 'audio/make.my.funk',
+ 'pgm' => 'image/x-portable-greymap',
+ 'pic' => 'image/pict',
+ 'pict' => 'image/pict',
+ 'pkg' => 'application/x-newton-compatible-pkg',
+ 'pko' => 'application/vnd.ms-pki.pko',
+ 'pl' => 'text/x-script.perl',
+ 'plx' => 'application/x-pixclscript',
+ 'pm' => 'text/x-script.perl-module',
+ 'pm4' => 'application/x-pagemaker',
+ 'pm5' => 'application/x-pagemaker',
+ 'png' => 'image/png',
+ 'pnm' => 'image/x-portable-anymap',
+ 'pot' => 'application/mspowerpoint',
+ 'pov' => 'model/x-pov',
+ 'ppa' => 'application/vnd.ms-powerpoint',
+ 'ppm' => 'image/x-portable-pixmap',
+ 'pps' => 'application/mspowerpoint',
+ 'ppt' => 'application/mspowerpoint',
+ 'ppz' => 'application/mspowerpoint',
+ 'pre' => 'application/x-freelance',
+ 'prt' => 'application/pro_eng',
+ 'ps' => 'application/postscript',
+ 'psd' => 'application/octet-stream',
+ 'pvu' => 'paleovu/x-pv',
+ 'pwz' => 'application/vnd.ms-powerpoint',
+ 'py' => 'text/x-script.phyton',
+ 'pyc' => 'applicaiton/x-bytecode.python',
+ 'qcp' => 'audio/vnd.qcelp',
+ 'qd3' => 'x-world/x-3dmf',
+ 'qd3d' => 'x-world/x-3dmf',
+ 'qif' => 'image/x-quicktime',
+ 'qt' => 'video/quicktime',
+ 'qtc' => 'video/x-qtc',
+ 'qti' => 'image/x-quicktime',
+ 'qtif' => 'image/x-quicktime',
+ 'ra' => 'audio/x-realaudio',
+ 'ram' => 'audio/x-pn-realaudio',
+ 'ras' => 'image/x-cmu-raster',
+ 'rast' => 'image/cmu-raster',
+ 'rexx' => 'text/x-script.rexx',
+ 'rf' => 'image/vnd.rn-realflash',
+ 'rgb' => 'image/x-rgb',
+ 'rm' => 'audio/x-pn-realaudio',
+ 'rmi' => 'audio/mid',
+ 'rmm' => 'audio/x-pn-realaudio',
+ 'rmp' => 'audio/x-pn-realaudio',
+ 'rng' => 'application/vnd.nokia.ringing-tone',
+ 'rnx' => 'application/vnd.rn-realplayer',
+ 'roff' => 'application/x-troff',
+ 'rp' => 'image/vnd.rn-realpix',
+ 'rpm' => 'audio/x-pn-realaudio-plugin',
+ 'rt' => 'text/richtext',
+ 'rtf' => 'text/richtext',
+ 'rtx' => 'text/richtext',
+ 'rv' => 'video/vnd.rn-realvideo',
+ 's' => 'text/x-asm',
+ 's3m' => 'audio/s3m',
+ 'saveme' => 'application/octet-stream',
+ 'sbk' => 'application/x-tbook',
+ 'scm' => 'video/x-scm',
+ 'sdml' => 'text/plain',
+ 'sdp' => 'application/x-sdp',
+ 'sdr' => 'application/sounder',
+ 'sea' => 'application/x-sea',
+ 'set' => 'application/set',
+ 'sgm' => 'text/x-sgml',
+ 'sgml' => 'text/x-sgml',
+ 'sh' => 'text/x-script.sh',
+ 'shar' => 'application/x-shar',
+ 'shtml' => 'text/x-server-parsed-html',
+ 'sid' => 'audio/x-psid',
+ 'sit' => 'application/x-stuffit',
+ 'skd' => 'application/x-koan',
+ 'skm' => 'application/x-koan',
+ 'skp' => 'application/x-koan',
+ 'skt' => 'application/x-koan',
+ 'sl' => 'application/x-seelogo',
+ 'smi' => 'application/smil',
+ 'smil' => 'application/smil',
+ 'snd' => 'audio/x-adpcm',
+ 'sol' => 'application/solids',
+ 'spc' => 'text/x-speech',
+ 'spl' => 'application/futuresplash',
+ 'spr' => 'application/x-sprite',
+ 'sprite' => 'application/x-sprite',
+ 'src' => 'application/x-wais-source',
+ 'ssi' => 'text/x-server-parsed-html',
+ 'ssm' => 'application/streamingmedia',
+ 'sst' => 'application/vnd.ms-pki.certstore',
+ 'step' => 'application/step',
+ 'stl' => 'application/vnd.ms-pki.stl',
+ 'stp' => 'application/step',
+ 'sv4cpio' => 'application/x-sv4cpio',
+ 'sv4crc' => 'application/x-sv4crc',
+ 'svf' => 'image/x-dwg',
+ 'svr' => 'application/x-world',
+ 'swf' => 'application/x-shockwave-flash',
+ 't' => 'application/x-troff',
+ 'talk' => 'text/x-speech',
+ 'tar' => 'application/x-tar',
+ 'tbk' => 'application/x-tbook',
+ 'tcl' => 'text/x-script.tcl',
+ 'tcsh' => 'text/x-script.tcsh',
+ 'tex' => 'application/x-tex',
+ 'texi' => 'application/x-texinfo',
+ 'texinfo' => 'application/x-texinfo',
+ 'text' => 'text/plain',
+ 'tgz' => 'application/x-compressed',
+ 'tif' => 'image/tiff',
+ 'tiff' => 'image/tiff',
+ 'tr' => 'application/x-troff',
+ 'tsi' => 'audio/tsp-audio',
+ 'tsp' => 'audio/tsplayer',
+ 'tsv' => 'text/tab-separated-values',
+ 'turbot' => 'image/florian',
+ 'txt' => 'text/plain',
+ 'uil' => 'text/x-uil',
+ 'uni' => 'text/uri-list',
+ 'unis' => 'text/uri-list',
+ 'unv' => 'application/i-deas',
+ 'uri' => 'text/uri-list',
+ 'uris' => 'text/uri-list',
+ 'ustar' => 'multipart/x-ustar',
+ 'uu' => 'text/x-uuencode',
+ 'uue' => 'text/x-uuencode',
+ 'vcd' => 'application/x-cdlink',
+ 'vcs' => 'text/x-vcalendar',
+ 'vda' => 'application/vda',
+ 'vdo' => 'video/vdo',
+ 'vew' => 'application/groupwise',
+ 'viv' => 'video/vivo',
+ 'vivo' => 'video/vivo',
+ 'vmd' => 'application/vocaltec-media-desc',
+ 'vmf' => 'application/vocaltec-media-file',
+ 'voc' => 'audio/voc',
+ 'vos' => 'video/vosaic',
+ 'vox' => 'audio/voxware',
+ 'vqe' => 'audio/x-twinvq-plugin',
+ 'vqf' => 'audio/x-twinvq',
+ 'vql' => 'audio/x-twinvq-plugin',
+ 'vrml' => 'application/x-vrml',
+ 'vrt' => 'x-world/x-vrt',
+ 'vsd' => 'application/x-visio',
+ 'vst' => 'application/x-visio',
+ 'vsw' => 'application/x-visio',
+ 'w60' => 'application/wordperfect6.0',
+ 'w61' => 'application/wordperfect6.1',
+ 'w6w' => 'application/msword',
+ 'wav' => 'audio/wav',
+ 'wb1' => 'application/x-qpro',
+ 'wbmp' => 'image/vnd.wap.wbmp',
+ 'web' => 'application/vnd.xara',
+ 'wiz' => 'application/msword',
+ 'wk1' => 'application/x-123',
+ 'wmf' => 'windows/metafile',
+ 'wml' => 'text/vnd.wap.wml',
+ 'wmlc' => 'application/vnd.wap.wmlc',
+ 'wmls' => 'text/vnd.wap.wmlscript',
+ 'wmlsc' => 'application/vnd.wap.wmlscriptc',
+ 'word' => 'application/msword',
+ 'wp' => 'application/wordperfect',
+ 'wp5' => 'application/wordperfect',
+ 'wp6' => 'application/wordperfect',
+ 'wpd' => 'application/wordperfect',
+ 'wq1' => 'application/x-lotus',
+ 'wri' => 'application/mswrite',
+ 'wrl' => 'model/vrml',
+ 'wrz' => 'model/vrml',
+ 'wsc' => 'text/scriplet',
+ 'wsrc' => 'application/x-wais-source',
+ 'wtk' => 'application/x-wintalk',
+ 'xbm' => 'image/xbm',
+ 'xdr' => 'video/x-amt-demorun',
+ 'xgz' => 'xgl/drawing',
+ 'xif' => 'image/vnd.xiff',
+ 'xl' => 'application/excel',
+ 'xla' => 'application/excel',
+ 'xlb' => 'application/excel',
+ 'xlc' => 'application/excel',
+ 'xld' => 'application/excel',
+ 'xlk' => 'application/excel',
+ 'xll' => 'application/excel',
+ 'xlm' => 'application/excel',
+ 'xls' => 'application/excel',
+ 'xlt' => 'application/excel',
+ 'xlv' => 'application/excel',
+ 'xlw' => 'application/excel',
+ 'xm' => 'audio/xm',
+ 'xml' => 'text/xml',
+ 'xmz' => 'xgl/movie',
+ 'xpix' => 'application/x-vnd.ls-xpix',
+ 'xpm' => 'image/xpm',
+ 'x-png' => 'image/png',
+ 'xsr' => 'video/x-amt-showrun',
+ 'xwd' => 'image/x-xwindowdump',
+ 'xyz' => 'chemical/x-pdb',
+ 'z' => 'application/x-compressed',
+ 'zip' => 'application/x-zip-compressed',
+ 'zoo' => 'application/octet-stream',
+ 'zsh' => 'text/x-script.zsh',
+ );
+
+ /**
+ * @inheritdoc
+ */
+ public function is_supported()
+ {
+ return true;
+ }
+
+ /**
+ * @inheritdoc
+ */
+ public function guess($file, $file_name = '')
+ {
+ $file_name = (empty($file_name)) ? $file : $file_name;
+ return $this->map_extension_to_type($file_name);
+ }
+
+ /**
+ * Map extension of supplied file_name to mime type
+ *
+ * @param string $file_name Path to file or filename
+ *
+ * @return string|null Mimetype if known or null if not
+ */
+ protected function map_extension_to_type($file_name)
+ {
+ $extension = pathinfo($file_name, PATHINFO_EXTENSION);
+
+ if (isset($this->extension_map[$extension]))
+ {
+ return $this->extension_map[$extension];
+ }
+ else
+ {
+ return null;
+ }
+ }
+}
diff --git a/phpBB/phpbb/mimetype/guesser.php b/phpBB/phpbb/mimetype/guesser.php
new file mode 100644
index 0000000000..3499b3b0f7
--- /dev/null
+++ b/phpBB/phpbb/mimetype/guesser.php
@@ -0,0 +1,130 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\mimetype;
+
+/**
+* @package mimetype
+*/
+
+class guesser
+{
+ /**
+ * @const Default priority for mimetype guessers
+ */
+ const PRIORITY_DEFAULT = 0;
+
+ /**
+ * @var mimetype guessers
+ */
+ protected $guessers;
+
+ /**
+ * Construct a mimetype guesser object
+ *
+ * @param array $mimetype_guessers Mimetype guesser service collection
+ */
+ public function __construct($mimetype_guessers)
+ {
+ $this->register_guessers($mimetype_guessers);
+ }
+
+ /**
+ * Register MimeTypeGuessers and sort them by priority
+ *
+ * @param array $mimetype_guessers Mimetype guesser service collection
+ *
+ * @throws \LogicException If incorrect or not mimetype guessers have
+ * been supplied to class
+ */
+ protected function register_guessers($mimetype_guessers)
+ {
+ foreach ($mimetype_guessers as $guesser)
+ {
+ $is_supported = (method_exists($guesser, 'is_supported')) ? 'is_supported' : '';
+ $is_supported = (method_exists($guesser, 'isSupported')) ? 'isSupported' : $is_supported;
+
+ if (empty($is_supported))
+ {
+ throw new \LogicException('Incorrect mimetype guesser supplied.');
+ }
+
+ if ($guesser->$is_supported())
+ {
+ $this->guessers[] = $guesser;
+ }
+ }
+
+ if (empty($this->guessers))
+ {
+ throw new \LogicException('No mimetype guesser supplied.');
+ }
+
+ // Sort guessers by priority
+ usort($this->guessers, array($this, 'sort_priority'));
+ }
+
+ /**
+ * Sort the priority of supplied guessers
+ * This is a compare function for usort. A guesser with higher priority
+ * should be used first and vice versa. usort() orders the array values
+ * from low to high depending on what the comparison function returns
+ * to it. Return value should be smaller than 0 if value a is smaller
+ * than value b. This has been reversed in the comparision function in
+ * order to sort the guessers from high to low.
+ * Method has been set to public in order to allow proper testing.
+ *
+ * @param object $guesser_a Mimetype guesser a
+ * @param object $guesser_b Mimetype guesser b
+ *
+ * @return int If both guessers have the same priority 0, bigger
+ * than 0 if first guesser has lower priority, and lower
+ * than 0 if first guesser has higher priority
+ */
+ public function sort_priority($guesser_a, $guesser_b)
+ {
+ $priority_a = (int) (method_exists($guesser_a, 'get_priority')) ? $guesser_a->get_priority() : self::PRIORITY_DEFAULT;
+ $priority_b = (int) (method_exists($guesser_b, 'get_priority')) ? $guesser_b->get_priority() : self::PRIORITY_DEFAULT;
+
+ return $priority_b - $priority_a;
+ }
+
+ /**
+ * Guess mimetype of supplied file
+ *
+ * @param string $file Path to file
+ *
+ * @return string Guess for mimetype of file
+ */
+ public function guess($file, $file_name = '')
+ {
+ if (!is_file($file))
+ {
+ return false;
+ }
+
+ if (!is_readable($file))
+ {
+ return false;
+ }
+
+ foreach ($this->guessers as $guesser)
+ {
+ $mimetype = $guesser->guess($file, $file_name);
+
+ // Try to guess something that is not the fallback application/octet-stream
+ if ($mimetype !== null && $mimetype !== 'application/octet-stream')
+ {
+ return $mimetype;
+ }
+ }
+ // Return any mimetype if we got a result or the fallback value
+ return (!empty($mimetype)) ? $mimetype : 'application/octet-stream';
+ }
+}
diff --git a/phpBB/phpbb/mimetype/guesser_base.php b/phpBB/phpbb/mimetype/guesser_base.php
new file mode 100644
index 0000000000..082b098028
--- /dev/null
+++ b/phpBB/phpbb/mimetype/guesser_base.php
@@ -0,0 +1,38 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\mimetype;
+
+/**
+* @package mimetype
+*/
+
+abstract class guesser_base implements guesser_interface
+{
+ /**
+ * @var int Guesser Priority
+ */
+ protected $priority;
+
+ /**
+ * @inheritdoc
+ */
+ public function get_priority()
+ {
+ return $this->priority;
+ }
+
+ /**
+ * @inheritdoc
+ */
+ public function set_priority($priority)
+ {
+ $this->priority = $priority;
+ }
+}
diff --git a/phpBB/phpbb/mimetype/guesser_interface.php b/phpBB/phpbb/mimetype/guesser_interface.php
new file mode 100644
index 0000000000..103689765e
--- /dev/null
+++ b/phpBB/phpbb/mimetype/guesser_interface.php
@@ -0,0 +1,49 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\mimetype;
+
+/**
+* @package mimetype
+*/
+
+interface guesser_interface
+{
+ /**
+ * Returns whether this guesser is supported on the current OS
+ *
+ * @return bool True if guesser is supported, false if not
+ */
+ public function is_supported();
+
+ /**
+ * Guess mimetype of supplied file
+ *
+ * @param string $file Path to file
+ *
+ * @return string Guess for mimetype of file
+ */
+ public function guess($file, $file_name = '');
+
+ /**
+ * Get the guesser priority
+ *
+ * @return int Guesser priority
+ */
+ public function get_priority();
+
+ /**
+ * Set the guesser priority
+ *
+ * @param int Guesser priority
+ *
+ * @return void
+ */
+ public function set_priority($priority);
+}
diff --git a/phpBB/phpbb/notification/exception.php b/phpBB/phpbb/notification/exception.php
new file mode 100644
index 0000000000..6bdded3fd8
--- /dev/null
+++ b/phpBB/phpbb/notification/exception.php
@@ -0,0 +1,23 @@
+<?php
+/**
+*
+* @package notifications
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License v2
+*
+*/
+
+namespace phpbb\notification;
+
+/**
+* Notifications exception
+*
+* @package notifications
+*/
+class exception extends \Exception
+{
+ public function __toString()
+ {
+ return $this->getMessage();
+ }
+}
diff --git a/phpBB/phpbb/notification/manager.php b/phpBB/phpbb/notification/manager.php
new file mode 100644
index 0000000000..2e8652771b
--- /dev/null
+++ b/phpBB/phpbb/notification/manager.php
@@ -0,0 +1,912 @@
+<?php
+/**
+*
+* @package notifications
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\notification;
+
+/**
+* Notifications service class
+* @package notifications
+*/
+class manager
+{
+ /** @var array */
+ protected $notification_types;
+
+ /** @var array */
+ protected $notification_methods;
+
+ /** @var ContainerBuilder */
+ protected $phpbb_container;
+
+ /** @var \phpbb\user_loader */
+ protected $user_loader;
+
+ /** @var \phpbb\config\config */
+ protected $config;
+
+ /** @var \phpbb\db\driver\driver */
+ protected $db;
+
+ /** @var \phpbb\cache\service */
+ protected $cache;
+
+ /** @var \phpbb\user */
+ protected $user;
+
+ /** @var string */
+ protected $phpbb_root_path;
+
+ /** @var string */
+ protected $php_ext;
+
+ /** @var string */
+ protected $notification_types_table;
+
+ /** @var string */
+ protected $notifications_table;
+
+ /** @var string */
+ protected $user_notifications_table;
+
+ /**
+ * Notification Constructor
+ *
+ * @param array $notification_types
+ * @param array $notification_methods
+ * @param ContainerBuilder $phpbb_container
+ * @param \phpbb\user_loader $user_loader
+ * @param \phpbb\config\config $config
+ * @param \phpbb\db\driver\driver $db
+ * @param \phpbb\user $user
+ * @param string $phpbb_root_path
+ * @param string $php_ext
+ * @param string $notification_types_table
+ * @param string $notifications_table
+ * @param string $user_notifications_table
+ * @return \phpbb\notification\manager
+ */
+ public function __construct($notification_types, $notification_methods, $phpbb_container, \phpbb\user_loader $user_loader, \phpbb\config\config $config, \phpbb\db\driver\driver $db, \phpbb\cache\service $cache, $user, $phpbb_root_path, $php_ext, $notification_types_table, $notifications_table, $user_notifications_table)
+ {
+ $this->notification_types = $notification_types;
+ $this->notification_methods = $notification_methods;
+ $this->phpbb_container = $phpbb_container;
+
+ $this->user_loader = $user_loader;
+ $this->config = $config;
+ $this->db = $db;
+ $this->cache = $cache;
+ $this->user = $user;
+
+ $this->phpbb_root_path = $phpbb_root_path;
+ $this->php_ext = $php_ext;
+
+ $this->notification_types_table = $notification_types_table;
+ $this->notifications_table = $notifications_table;
+ $this->user_notifications_table = $user_notifications_table;
+ }
+
+ /**
+ * Load the user's notifications
+ *
+ * @param array $options Optional options to control what notifications are loaded
+ * notification_id Notification id to load (or array of notification ids)
+ * user_id User id to load notifications for (Default: $user->data['user_id'])
+ * order_by Order by (Default: notification_time)
+ * order_dir Order direction (Default: DESC)
+ * limit Number of notifications to load (Default: 5)
+ * start Notifications offset (Default: 0)
+ * all_unread Load all unread notifications? If set to true, count_unread is set to true (Default: false)
+ * count_unread Count all unread notifications? (Default: false)
+ * count_total Count all notifications? (Default: false)
+ * @return array Array of information based on the request with keys:
+ * 'notifications' array of notification type objects
+ * 'unread_count' number of unread notifications the user has if count_unread is true in the options
+ * 'total_count' number of notifications the user has if count_total is true in the options
+ */
+ public function load_notifications(array $options = array())
+ {
+ // Merge default options
+ $options = array_merge(array(
+ 'notification_id' => false,
+ 'user_id' => $this->user->data['user_id'],
+ 'order_by' => 'notification_time',
+ 'order_dir' => 'DESC',
+ 'limit' => 0,
+ 'start' => 0,
+ 'all_unread' => false,
+ 'count_unread' => false,
+ 'count_total' => false,
+ ), $options);
+
+ // If all_unread, count_unread must be true
+ $options['count_unread'] = ($options['all_unread']) ? true : $options['count_unread'];
+
+ // Anonymous users and bots never receive notifications
+ if ($options['user_id'] == $this->user->data['user_id'] && ($this->user->data['user_id'] == ANONYMOUS || $this->user->data['user_type'] == USER_IGNORE))
+ {
+ return array(
+ 'notifications' => array(),
+ 'unread_count' => 0,
+ 'total_count' => 0,
+ );
+ }
+
+ $notifications = $user_ids = array();
+ $load_special = array();
+ $total_count = $unread_count = 0;
+
+ if ($options['count_unread'])
+ {
+ // Get the total number of unread notifications
+ $sql = 'SELECT COUNT(n.notification_id) AS unread_count
+ FROM ' . $this->notifications_table . ' n, ' . $this->notification_types_table . ' nt
+ WHERE n.user_id = ' . (int) $options['user_id'] . '
+ AND n.notification_read = 0
+ AND nt.notification_type_id = n.notification_type_id
+ AND nt.notification_type_enabled = 1';
+ $result = $this->db->sql_query($sql);
+ $unread_count = (int) $this->db->sql_fetchfield('unread_count');
+ $this->db->sql_freeresult($result);
+ }
+
+ if ($options['count_total'])
+ {
+ // Get the total number of notifications
+ $sql = 'SELECT COUNT(n.notification_id) AS total_count
+ FROM ' . $this->notifications_table . ' n, ' . $this->notification_types_table . ' nt
+ WHERE n.user_id = ' . (int) $options['user_id'] . '
+ AND nt.notification_type_id = n.notification_type_id
+ AND nt.notification_type_enabled = 1';
+ $result = $this->db->sql_query($sql);
+ $total_count = (int) $this->db->sql_fetchfield('total_count');
+ $this->db->sql_freeresult($result);
+ }
+
+ if (!$options['count_total'] || $total_count)
+ {
+ $rowset = array();
+
+ // Get the main notifications
+ $sql = 'SELECT n.*, nt.notification_type_name
+ FROM ' . $this->notifications_table . ' n, ' . $this->notification_types_table . ' nt
+ WHERE n.user_id = ' . (int) $options['user_id'] .
+ (($options['notification_id']) ? ((is_array($options['notification_id'])) ? ' AND ' . $this->db->sql_in_set('n.notification_id', $options['notification_id']) : ' AND n.notification_id = ' . (int) $options['notification_id']) : '') . '
+ AND nt.notification_type_id = n.notification_type_id
+ AND nt.notification_type_enabled = 1
+ ORDER BY n.' . $this->db->sql_escape($options['order_by']) . ' ' . $this->db->sql_escape($options['order_dir']);
+ $result = $this->db->sql_query_limit($sql, $options['limit'], $options['start']);
+
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ $rowset[$row['notification_id']] = $row;
+ }
+ $this->db->sql_freeresult($result);
+
+ // Get all unread notifications
+ if ($unread_count && $options['all_unread'] && !empty($rowset))
+ {
+ $sql = 'SELECT n.*, nt.notification_type_name
+ FROM ' . $this->notifications_table . ' n, ' . $this->notification_types_table . ' nt
+ WHERE n.user_id = ' . (int) $options['user_id'] . '
+ AND n.notification_read = 0
+ AND ' . $this->db->sql_in_set('n.notification_id', array_keys($rowset), true) . '
+ AND nt.notification_type_id = n.notification_type_id
+ AND nt.notification_type_enabled = 1
+ ORDER BY n.' . $this->db->sql_escape($options['order_by']) . ' ' . $this->db->sql_escape($options['order_dir']);
+ $result = $this->db->sql_query_limit($sql, $options['limit'], $options['start']);
+
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ $rowset[$row['notification_id']] = $row;
+ }
+ $this->db->sql_freeresult($result);
+ }
+
+ foreach ($rowset as $row)
+ {
+ $notification = $this->get_item_type_class($row['notification_type_name'], $row);
+
+ // Array of user_ids to query all at once
+ $user_ids = array_merge($user_ids, $notification->users_to_query());
+
+ // Some notification types also require querying additional tables themselves
+ if (!isset($load_special[$row['notification_type_name']]))
+ {
+ $load_special[$row['notification_type_name']] = array();
+ }
+ $load_special[$row['notification_type_name']] = array_merge($load_special[$row['notification_type_name']], $notification->get_load_special());
+
+ $notifications[$row['notification_id']] = $notification;
+ }
+
+ $this->user_loader->load_users($user_ids);
+
+ // Allow each type to load its own special items
+ foreach ($load_special as $item_type => $data)
+ {
+ $item_class = $this->get_item_type_class($item_type);
+
+ $item_class->load_special($data, $notifications);
+ }
+ }
+
+ return array(
+ 'notifications' => $notifications,
+ 'unread_count' => $unread_count,
+ 'total_count' => $total_count,
+ );
+ }
+
+ /**
+ * Mark notifications read
+ *
+ * @param bool|string|array $notification_type_name Type identifier or array of item types (only acceptable if the $data is identical for the specified types). False to mark read for all item types
+ * @param bool|int|array $item_id Item id or array of item ids. False to mark read for all item ids
+ * @param bool|int|array $user_id User id or array of user ids. False to mark read for all user ids
+ * @param bool|int $time Time at which to mark all notifications prior to as read. False to mark all as read. (Default: False)
+ */
+ public function mark_notifications_read($notification_type_name, $item_id, $user_id, $time = false)
+ {
+ $time = ($time !== false) ? $time : time();
+
+ $sql = 'UPDATE ' . $this->notifications_table . "
+ SET notification_read = 1
+ WHERE notification_time <= " . (int) $time .
+ (($notification_type_name !== false) ? ' AND ' .
+ (is_array($notification_type_name) ? $this->db->sql_in_set('notification_type_id', $this->get_notification_type_ids($notification_type_name)) : 'notification_type_id = ' . $this->get_notification_type_id($notification_type_name)) : '') .
+ (($user_id !== false) ? ' AND ' . (is_array($user_id) ? $this->db->sql_in_set('user_id', $user_id) : 'user_id = ' . (int) $user_id) : '') .
+ (($item_id !== false) ? ' AND ' . (is_array($item_id) ? $this->db->sql_in_set('item_id', $item_id) : 'item_id = ' . (int) $item_id) : '');
+ $this->db->sql_query($sql);
+ }
+
+ /**
+ * Mark notifications read from a parent identifier
+ *
+ * @param string|array $notification_type_name Type identifier or array of item types (only acceptable if the $data is identical for the specified types)
+ * @param bool|int|array $item_parent_id Item parent id or array of item parent ids. False to mark read for all item parent ids
+ * @param bool|int|array $user_id User id or array of user ids. False to mark read for all user ids
+ * @param bool|int $time Time at which to mark all notifications prior to as read. False to mark all as read. (Default: False)
+ */
+ public function mark_notifications_read_by_parent($notification_type_name, $item_parent_id, $user_id, $time = false)
+ {
+ $time = ($time !== false) ? $time : time();
+
+ $sql = 'UPDATE ' . $this->notifications_table . "
+ SET notification_read = 1
+ WHERE notification_time <= " . (int) $time .
+ (($notification_type_name !== false) ? ' AND ' .
+ (is_array($notification_type_name) ? $this->db->sql_in_set('notification_type_id', $this->get_notification_type_ids($notification_type_name)) : 'notification_type_id = ' . $this->get_notification_type_id($notification_type_name)) : '') .
+ (($item_parent_id !== false) ? ' AND ' . (is_array($item_parent_id) ? $this->db->sql_in_set('item_parent_id', $item_parent_id) : 'item_parent_id = ' . (int) $item_parent_id) : '') .
+ (($user_id !== false) ? ' AND ' . (is_array($user_id) ? $this->db->sql_in_set('user_id', $user_id) : 'user_id = ' . (int) $user_id) : '');
+ $this->db->sql_query($sql);
+ }
+
+ /**
+ * Mark notifications read
+ *
+ * @param int|array $notification_id Notification id or array of notification ids.
+ * @param bool|int $time Time at which to mark all notifications prior to as read. False to mark all as read. (Default: False)
+ */
+ public function mark_notifications_read_by_id($notification_id, $time = false)
+ {
+ $time = ($time !== false) ? $time : time();
+
+ $sql = 'UPDATE ' . $this->notifications_table . "
+ SET notification_read = 1
+ WHERE notification_time <= " . (int) $time . '
+ AND ' . ((is_array($notification_id)) ? $this->db->sql_in_set('notification_id', $notification_id) : 'notification_id = ' . (int) $notification_id);
+ $this->db->sql_query($sql);
+ }
+
+ /**
+ * Add a notification
+ *
+ * @param string|array $notification_type_name Type identifier or array of item types (only acceptable if the $data is identical for the specified types)
+ * Note: If you send an array of types, any user who could receive multiple notifications from this single item will only receive
+ * a single notification. If they MUST receive multiple notifications, call this function multiple times instead of sending an array
+ * @param array $data Data specific for this type that will be inserted
+ * @param array $options Optional options to control what notifications are loaded
+ * ignore_users array of data to specify which users should not receive certain types of notifications
+ * @return array Information about what users were notified and how they were notified
+ */
+ public function add_notifications($notification_type_name, $data, array $options = array())
+ {
+ $options = array_merge(array(
+ 'ignore_users' => array(),
+ ), $options);
+
+ if (is_array($notification_type_name))
+ {
+ $notified_users = array();
+ $temp_options = $options;
+
+ foreach ($notification_type_name as $type)
+ {
+ $temp_options['ignore_users'] = $options['ignore_users'] + $notified_users;
+ $notified_users += $this->add_notifications($type, $data, $temp_options);
+ }
+
+ return $notified_users;
+ }
+
+ $item_id = $this->get_item_type_class($notification_type_name)->get_item_id($data);
+
+ // find out which users want to receive this type of notification
+ $notify_users = $this->get_item_type_class($notification_type_name)->find_users_for_notification($data, $options);
+
+ $this->add_notifications_for_users($notification_type_name, $data, $notify_users);
+
+ return $notify_users;
+ }
+
+ /**
+ * Add a notification for specific users
+ *
+ * @param string|array $notification_type_name Type identifier or array of item types (only acceptable if the $data is identical for the specified types)
+ * @param array $data Data specific for this type that will be inserted
+ * @param array $notify_users User list to notify
+ */
+ public function add_notifications_for_users($notification_type_name, $data, $notify_users)
+ {
+ if (is_array($notification_type_name))
+ {
+ foreach ($notification_type_name as $type)
+ {
+ $this->add_notifications_for_users($type, $data, $notify_users);
+ }
+
+ return;
+ }
+
+ $notification_type_id = $this->get_notification_type_id($notification_type_name);
+
+ $item_id = $this->get_item_type_class($notification_type_name)->get_item_id($data);
+
+ $user_ids = array();
+ $notification_objects = $notification_methods = array();
+
+ // Never send notifications to the anonymous user!
+ unset($notify_users[ANONYMOUS]);
+
+ // Make sure not to send new notifications to users who've already been notified about this item
+ // This may happen when an item was added, but now new users are able to see the item
+ $sql = 'SELECT n.user_id
+ FROM ' . $this->notifications_table . ' n, ' . $this->notification_types_table . ' nt
+ WHERE n.notification_type_id = ' . (int) $notification_type_id . '
+ AND n.item_id = ' . (int) $item_id . '
+ AND nt.notification_type_id = n.notification_type_id
+ AND nt.notification_type_enabled = 1';
+ $result = $this->db->sql_query($sql);
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ unset($notify_users[$row['user_id']]);
+ }
+ $this->db->sql_freeresult($result);
+
+ if (!sizeof($notify_users))
+ {
+ return;
+ }
+
+ // Allow notifications to perform actions before creating the insert array (such as run a query to cache some data needed for all notifications)
+ $notification = $this->get_item_type_class($notification_type_name);
+ $pre_create_data = $notification->pre_create_insert_array($data, $notify_users);
+ unset($notification);
+
+ $insert_buffer = new \phpbb\db\sql_insert_buffer($this->db, $this->notifications_table);
+
+ // Go through each user so we can insert a row in the DB and then notify them by their desired means
+ foreach ($notify_users as $user => $methods)
+ {
+ $notification = $this->get_item_type_class($notification_type_name);
+
+ $notification->user_id = (int) $user;
+
+ // Insert notification row using buffer.
+ $insert_buffer->insert($notification->create_insert_array($data, $pre_create_data));
+
+ // Users are needed to send notifications
+ $user_ids = array_merge($user_ids, $notification->users_to_query());
+
+ foreach ($methods as $method)
+ {
+ // setup the notification methods and add the notification to the queue
+ if ($method) // blank means we just insert it as a notification, but do not notify them by any other means
+ {
+ if (!isset($notification_methods[$method]))
+ {
+ $notification_methods[$method] = $this->get_method_class($method);
+ }
+
+ $notification_methods[$method]->add_to_queue($notification);
+ }
+ }
+ }
+
+ $insert_buffer->flush();
+
+ // We need to load all of the users to send notifications
+ $this->user_loader->load_users($user_ids);
+
+ // run the queue for each method to send notifications
+ foreach ($notification_methods as $method)
+ {
+ $method->notify();
+ }
+ }
+
+ /**
+ * Update a notification
+ *
+ * @param string|array $notification_type_name Type identifier or array of item types (only acceptable if the $data is identical for the specified types)
+ * @param array $data Data specific for this type that will be updated
+ */
+ public function update_notifications($notification_type_name, $data)
+ {
+ if (is_array($notification_type_name))
+ {
+ foreach ($notification_type_name as $type)
+ {
+ $this->update_notifications($type, $data);
+ }
+
+ return;
+ }
+
+ $notification = $this->get_item_type_class($notification_type_name);
+
+ // Allow the notifications class to over-ride the update_notifications functionality
+ if (method_exists($notification, 'update_notifications'))
+ {
+ // Return False to over-ride the rest of the update
+ if ($notification->update_notifications($data) === false)
+ {
+ return;
+ }
+ }
+
+ $notification_type_id = $this->get_notification_type_id($notification_type_name);
+ $item_id = $notification->get_item_id($data);
+ $update_array = $notification->create_update_array($data);
+
+ $sql = 'UPDATE ' . $this->notifications_table . '
+ SET ' . $this->db->sql_build_array('UPDATE', $update_array) . '
+ WHERE notification_type_id = ' . (int) $notification_type_id . '
+ AND item_id = ' . (int) $item_id;
+ $this->db->sql_query($sql);
+ }
+
+ /**
+ * Delete a notification
+ *
+ * @param string|array $notification_type_name Type identifier or array of item types (only acceptable if the $item_id is identical for the specified types)
+ * @param int|array $item_id Identifier within the type (or array of ids)
+ * @param mixed $parent_id Parent identifier within the type (or array of ids), used in combination with item_id if specified (Default: false; not checked)
+ */
+ public function delete_notifications($notification_type_name, $item_id, $parent_id = false)
+ {
+ if (is_array($notification_type_name))
+ {
+ foreach ($notification_type_name as $type)
+ {
+ $this->delete_notifications($type, $item_id, $parent_id);
+ }
+
+ return;
+ }
+
+ $notification_type_id = $this->get_notification_type_id($notification_type_name);
+
+ $sql = 'DELETE FROM ' . $this->notifications_table . '
+ WHERE notification_type_id = ' . (int) $notification_type_id . '
+ AND ' . (is_array($item_id) ? $this->db->sql_in_set('item_id', $item_id) : 'item_id = ' . (int) $item_id) .
+ (($parent_id !== false) ? ' AND ' . ((is_array($parent_id) ? $this->db->sql_in_set('item_parent_id', $parent_id) : 'item_parent_id = ' . (int) $parent_id)) : '');
+ $this->db->sql_query($sql);
+ }
+
+ /**
+ * Get all of the subscription types
+ *
+ * @return array Array of item types
+ */
+ public function get_subscription_types()
+ {
+ $subscription_types = array();
+
+ foreach ($this->notification_types as $type_name => $data)
+ {
+ $type = $this->get_item_type_class($type_name);
+
+ if ($type instanceof \phpbb\notification\type\type_interface && $type->is_available())
+ {
+ $options = array_merge(array(
+ 'id' => $type->get_type(),
+ 'lang' => 'NOTIFICATION_TYPE_' . strtoupper($type->get_type()),
+ 'group' => 'NOTIFICATION_GROUP_MISCELLANEOUS',
+ ), (($type::$notification_option !== false) ? $type::$notification_option : array()));
+
+ $subscription_types[$options['group']][$options['id']] = $options;
+ }
+ }
+
+ // Move Miscellaneous to the very last section
+ if (isset($subscription_types['NOTIFICATION_GROUP_MISCELLANEOUS']))
+ {
+ $miscellaneous = $subscription_types['NOTIFICATION_GROUP_MISCELLANEOUS'];
+ unset($subscription_types['NOTIFICATION_GROUP_MISCELLANEOUS']);
+ $subscription_types['NOTIFICATION_GROUP_MISCELLANEOUS'] = $miscellaneous;
+ }
+
+ return $subscription_types;
+ }
+
+ /**
+ * Get all of the subscription methods
+ *
+ * @return array Array of methods
+ */
+ public function get_subscription_methods()
+ {
+ $subscription_methods = array();
+
+ foreach ($this->notification_methods as $method_name => $data)
+ {
+ $method = $this->get_method_class($method_name);
+
+ if ($method instanceof \phpbb\notification\method\method_interface && $method->is_available())
+ {
+ $subscription_methods[$method_name] = array(
+ 'id' => $method->get_type(),
+ 'lang' => 'NOTIFICATION_METHOD_' . strtoupper($method->get_type()),
+ );
+ }
+ }
+
+ return $subscription_methods;
+ }
+
+ /**
+ * Get global subscriptions (item_id = 0)
+ *
+ * @param bool|int $user_id The user_id to add the subscription for (bool false for current user)
+ *
+ * @return array Subscriptions
+ */
+ public function get_global_subscriptions($user_id = false)
+ {
+ $user_id = ($user_id === false) ? $this->user->data['user_id'] : $user_id;
+
+ $subscriptions = array();
+
+ foreach ($this->get_subscription_types() as $group_name => $types)
+ {
+ foreach ($types as $id => $type)
+ {
+ $sql = 'SELECT method, notify
+ FROM ' . $this->user_notifications_table . '
+ WHERE user_id = ' . (int) $user_id . "
+ AND item_type = '" . $this->db->sql_escape($id) . "'
+ AND item_id = 0";
+ $result = $this->db->sql_query($sql);
+
+ $row = $this->db->sql_fetchrow($result);
+ if (!$row)
+ {
+ // No rows at all, default to ''
+ $subscriptions[$id] = array('');
+ }
+ else
+ {
+ do
+ {
+ if (!$row['notify'])
+ {
+ continue;
+ }
+
+ if (!isset($subscriptions[$id]))
+ {
+ $subscriptions[$id] = array();
+ }
+
+ $subscriptions[$id][] = $row['method'];
+ }
+ while ($row = $this->db->sql_fetchrow($result));
+ }
+
+ $this->db->sql_freeresult($result);
+ }
+ }
+
+ return $subscriptions;
+ }
+
+ /**
+ * Add a subscription
+ *
+ * @param string $item_type Type identifier of the subscription
+ * @param int $item_id The id of the item
+ * @param string $method The method of the notification e.g. '', 'email', or 'jabber'
+ * @param bool|int $user_id The user_id to add the subscription for (bool false for current user)
+ */
+ public function add_subscription($item_type, $item_id = 0, $method = '', $user_id = false)
+ {
+ if ($method !== '')
+ {
+ // Make sure to subscribe them to the base subscription
+ $this->add_subscription($item_type, $item_id, '', $user_id);
+ }
+
+ $user_id = ($user_id === false) ? $this->user->data['user_id'] : $user_id;
+
+ $sql = 'SELECT notify
+ FROM ' . $this->user_notifications_table . "
+ WHERE item_type = '" . $this->db->sql_escape($item_type) . "'
+ AND item_id = " . (int) $item_id . '
+ AND user_id = ' .(int) $user_id . "
+ AND method = '" . $this->db->sql_escape($method) . "'";
+ $this->db->sql_query($sql);
+ $current = $this->db->sql_fetchfield('notify');
+ $this->db->sql_freeresult();
+
+ if ($current === false)
+ {
+ $sql = 'INSERT INTO ' . $this->user_notifications_table . ' ' .
+ $this->db->sql_build_array('INSERT', array(
+ 'item_type' => $item_type,
+ 'item_id' => (int) $item_id,
+ 'user_id' => (int) $user_id,
+ 'method' => $method,
+ 'notify' => 1,
+ ));
+ $this->db->sql_query($sql);
+ }
+ else if (!$current)
+ {
+ $sql = 'UPDATE ' . $this->user_notifications_table . "
+ SET notify = 1
+ WHERE item_type = '" . $this->db->sql_escape($item_type) . "'
+ AND item_id = " . (int) $item_id . '
+ AND user_id = ' .(int) $user_id . "
+ AND method = '" . $this->db->sql_escape($method) . "'";
+ $this->db->sql_query($sql);
+ }
+ }
+
+ /**
+ * Delete a subscription
+ *
+ * @param string $item_type Type identifier of the subscription
+ * @param int $item_id The id of the item
+ * @param string $method The method of the notification e.g. '', 'email', or 'jabber'
+ * @param bool|int $user_id The user_id to add the subscription for (bool false for current user)
+ */
+ public function delete_subscription($item_type, $item_id = 0, $method = '', $user_id = false)
+ {
+ $user_id = ($user_id === false) ? $this->user->data['user_id'] : $user_id;
+
+ // If no method, make sure that no other notification methods for this item are selected before deleting
+ if ($method === '')
+ {
+ $sql = 'SELECT COUNT(*) as num_notifications
+ FROM ' . $this->user_notifications_table . "
+ WHERE item_type = '" . $this->db->sql_escape($item_type) . "'
+ AND item_id = " . (int) $item_id . '
+ AND user_id = ' .(int) $user_id . "
+ AND method <> ''
+ AND notify = 1";
+ $this->db->sql_query($sql);
+ $num_notifications = $this->db->sql_fetchfield('num_notifications');
+ $this->db->sql_freeresult();
+
+ if ($num_notifications)
+ {
+ return;
+ }
+ }
+
+ $sql = 'UPDATE ' . $this->user_notifications_table . "
+ SET notify = 0
+ WHERE item_type = '" . $this->db->sql_escape($item_type) . "'
+ AND item_id = " . (int) $item_id . '
+ AND user_id = ' .(int) $user_id . "
+ AND method = '" . $this->db->sql_escape($method) . "'";
+ $this->db->sql_query($sql);
+
+ if (!$this->db->sql_affectedrows())
+ {
+ $sql = 'INSERT INTO ' . $this->user_notifications_table . ' ' .
+ $this->db->sql_build_array('INSERT', array(
+ 'item_type' => $item_type,
+ 'item_id' => (int) $item_id,
+ 'user_id' => (int) $user_id,
+ 'method' => $method,
+ 'notify' => 0,
+ ));
+ $this->db->sql_query($sql);
+ }
+ }
+
+ /**
+ * Disable all notifications of a certain type
+ *
+ * This should be called when an extension which has notification types
+ * is disabled so that all those notifications are hidden and do not
+ * cause errors
+ *
+ * @param string $notification_type_name Type identifier of the subscription
+ */
+ public function disable_notifications($notification_type_name)
+ {
+ $sql = 'UPDATE ' . $this->notification_types_table . "
+ SET notification_type_enabled = 0
+ WHERE notification_type_name = '" . $this->db->sql_escape($notification_type_name) . "'";
+ $this->db->sql_query($sql);
+ }
+
+ /**
+ * Purge all notifications of a certain type
+ *
+ * This should be called when an extension which has notification types
+ * is purged so that all those notifications are removed
+ *
+ * @param string $notification_type_name Type identifier of the subscription
+ */
+ public function purge_notifications($notification_type_name)
+ {
+ $notification_type_id = $this->get_notification_type_id($notification_type_name);
+
+ $sql = 'DELETE FROM ' . $this->notifications_table . '
+ WHERE notification_type_id = ' . (int) $notification_type_id;
+ $this->db->sql_query($sql);
+
+ $sql = 'DELETE FROM ' . $this->notification_types_table . '
+ WHERE notification_type_id = ' . (int) $notification_type_id;
+ $this->db->sql_query($sql);
+
+ $this->cache->destroy('notification_type_ids');
+ }
+
+ /**
+ * Enable all notifications of a certain type
+ *
+ * This should be called when an extension which has notification types
+ * that was disabled is re-enabled so that all those notifications that
+ * were hidden are shown again
+ *
+ * @param string $notification_type_name Type identifier of the subscription
+ */
+ public function enable_notifications($notification_type_name)
+ {
+ $sql = 'UPDATE ' . $this->notification_types_table . "
+ SET notification_type_enabled = 1
+ WHERE notification_type_name = '" . $this->db->sql_escape($notification_type_name) . "'";
+ $this->db->sql_query($sql);
+ }
+
+ /**
+ * Delete all notifications older than a certain time
+ *
+ * @param int $timestamp Unix timestamp to delete all notifications that were created before
+ * @param bool $only_unread True (default) to only prune read notifications
+ */
+ public function prune_notifications($timestamp, $only_read = true)
+ {
+ $sql = 'DELETE FROM ' . $this->notifications_table . '
+ WHERE notification_time < ' . (int) $timestamp .
+ (($only_read) ? ' AND notification_read = 1' : '');
+ $this->db->sql_query($sql);
+
+ $this->config->set('read_notification_last_gc', time(), false);
+ }
+
+ /**
+ * Helper to get the notifications item type class and set it up
+ */
+ public function get_item_type_class($notification_type_name, $data = array())
+ {
+ $notification_type_name = (strpos($notification_type_name, 'notification.type.') === 0) ? $notification_type_name : 'notification.type.' . $notification_type_name;
+
+ $item = $this->load_object($notification_type_name);
+
+ $item->set_initial_data($data);
+
+ return $item;
+ }
+
+ /**
+ * Helper to get the notifications method class and set it up
+ */
+ public function get_method_class($method_name)
+ {
+ $method_name = (strpos($method_name, 'notification.method.') === 0) ? $method_name : 'notification.method.' . $method_name;
+
+ return $this->load_object($method_name);
+ }
+
+ /**
+ * Helper to load objects (notification types/methods)
+ */
+ protected function load_object($object_name)
+ {
+ $object = $this->phpbb_container->get($object_name);
+
+ if (method_exists($object, 'set_notification_manager'))
+ {
+ $object->set_notification_manager($this);
+ }
+
+ return $object;
+ }
+
+ /**
+ * Get the notification type id from the name
+ *
+ * @param string $notification_type_name The name
+ * @return int the notification_type_id
+ */
+ public function get_notification_type_id($notification_type_name)
+ {
+ $notification_type_ids = $this->cache->get('notification_type_ids');
+
+ if ($notification_type_ids === false)
+ {
+ $notification_type_ids = array();
+
+ $sql = 'SELECT notification_type_id, notification_type_name
+ FROM ' . $this->notification_types_table;
+ $result = $this->db->sql_query($sql);
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ $notification_type_ids[$row['notification_type_name']] = (int) $row['notification_type_id'];
+ }
+ $this->db->sql_freeresult($result);
+
+ $this->cache->put('notification_type_ids', $notification_type_ids);
+ }
+
+ if (!isset($notification_type_ids[$notification_type_name]))
+ {
+ if (!isset($this->notification_types[$notification_type_name]) && !isset($this->notification_types['notification.type.' . $notification_type_name]))
+ {
+ throw new \phpbb\notification\exception($this->user->lang('NOTIFICATION_TYPE_NOT_EXIST', $notification_type_name));
+ }
+
+ $sql = 'INSERT INTO ' . $this->notification_types_table . ' ' . $this->db->sql_build_array('INSERT', array(
+ 'notification_type_name' => $notification_type_name,
+ 'notification_type_enabled' => 1,
+ ));
+ $this->db->sql_query($sql);
+
+ $notification_type_ids[$notification_type_name] = (int) $this->db->sql_nextid();
+
+ $this->cache->put('notification_type_ids', $notification_type_ids);
+ }
+
+ return $notification_type_ids[$notification_type_name];
+ }
+
+ /**
+ * Get notification type ids (as an array)
+ *
+ * @param array $notification_type_names Array of strings
+ * @return array Array of integers
+ */
+ public function get_notification_type_ids(array $notification_type_names)
+ {
+ $notification_type_ids = array();
+
+ foreach ($notification_type_names as $name)
+ {
+ $notification_type_ids[$name] = $this->get_notification_type_id($name);
+ }
+
+ return $notification_type_ids;
+ }
+}
diff --git a/phpBB/phpbb/notification/method/base.php b/phpBB/phpbb/notification/method/base.php
new file mode 100644
index 0000000000..4ce42de830
--- /dev/null
+++ b/phpBB/phpbb/notification/method/base.php
@@ -0,0 +1,110 @@
+<?php
+/**
+*
+* @package notifications
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\notification\method;
+
+/**
+* Base notifications method class
+* @package notifications
+*/
+abstract class base implements \phpbb\notification\method\method_interface
+{
+ /** @var \phpbb\notification\manager */
+ protected $notification_manager;
+
+ /** @var \phpbb\user_loader */
+ protected $user_loader;
+
+ /** @var \phpbb\db\driver\driver */
+ protected $db;
+
+ /** @var \phpbb\cache\driver\driver_interface */
+ protected $cache;
+
+ /** @var \phpbb\template\template */
+ protected $template;
+
+ /** @var \phpbb\extension\manager */
+ protected $extension_manager;
+
+ /** @var \phpbb\user */
+ protected $user;
+
+ /** @var \phpbb\auth\auth */
+ protected $auth;
+
+ /** @var \phpbb\config\config */
+ protected $config;
+
+ /** @var string */
+ protected $phpbb_root_path;
+
+ /** @var string */
+ protected $php_ext;
+
+ /**
+ * Queue of messages to be sent
+ *
+ * @var array
+ */
+ protected $queue = array();
+
+ /**
+ * Notification Method Base Constructor
+ *
+ * @param \phpbb\user_loader $user_loader
+ * @param \phpbb\db\driver\driver $db
+ * @param \phpbb\cache\driver\driver_interface $cache
+ * @param \phpbb\user $user
+ * @param \phpbb\auth\auth $auth
+ * @param \phpbb\config\config $config
+ * @param string $phpbb_root_path
+ * @param string $php_ext
+ * @return \phpbb\notification\method\base
+ */
+ public function __construct(\phpbb\user_loader $user_loader, \phpbb\db\driver\driver $db, \phpbb\cache\driver\driver_interface $cache, $user, \phpbb\auth\auth $auth, \phpbb\config\config $config, $phpbb_root_path, $php_ext)
+ {
+ $this->user_loader = $user_loader;
+ $this->db = $db;
+ $this->cache = $cache;
+ $this->user = $user;
+ $this->auth = $auth;
+ $this->config = $config;
+ $this->phpbb_root_path = $phpbb_root_path;
+ $this->php_ext = $php_ext;
+ }
+
+ /**
+ * Set notification manager (required)
+ *
+ * @param \phpbb\notification\manager $notification_manager
+ */
+ public function set_notification_manager(\phpbb\notification\manager $notification_manager)
+ {
+ $this->notification_manager = $notification_manager;
+ }
+
+ /**
+ * Add a notification to the queue
+ *
+ * @param \phpbb\notification\type\type_interface $notification
+ */
+ public function add_to_queue(\phpbb\notification\type\type_interface $notification)
+ {
+ $this->queue[] = $notification;
+ }
+
+ /**
+ * Empty the queue
+ */
+ protected function empty_queue()
+ {
+ $this->queue = array();
+ }
+}
diff --git a/phpBB/phpbb/notification/method/email.php b/phpBB/phpbb/notification/method/email.php
new file mode 100644
index 0000000000..e039fae8de
--- /dev/null
+++ b/phpBB/phpbb/notification/method/email.php
@@ -0,0 +1,46 @@
+<?php
+/**
+*
+* @package notifications
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\notification\method;
+
+/**
+* Email notification method class
+* This class handles sending emails for notifications
+*
+* @package notifications
+*/
+class email extends \phpbb\notification\method\messenger_base
+{
+ /**
+ * Get notification method name
+ *
+ * @return string
+ */
+ public function get_type()
+ {
+ return 'email';
+ }
+
+ /**
+ * Is this method available for the user?
+ * This is checked on the notifications options
+ */
+ public function is_available()
+ {
+ return $this->config['email_enable'] && $this->user->data['user_email'];
+ }
+
+ /**
+ * Parse the queue and notify the users
+ */
+ public function notify()
+ {
+ return $this->notify_using_messenger(NOTIFY_EMAIL);
+ }
+}
diff --git a/phpBB/phpbb/notification/method/jabber.php b/phpBB/phpbb/notification/method/jabber.php
new file mode 100644
index 0000000000..bdfaf5a6fc
--- /dev/null
+++ b/phpBB/phpbb/notification/method/jabber.php
@@ -0,0 +1,63 @@
+<?php
+/**
+*
+* @package notifications
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\notification\method;
+
+/**
+* Jabber notification method class
+* This class handles sending Jabber messages for notifications
+*
+* @package notifications
+*/
+class jabber extends \phpbb\notification\method\messenger_base
+{
+ /**
+ * Get notification method name
+ *
+ * @return string
+ */
+ public function get_type()
+ {
+ return 'jabber';
+ }
+
+ /**
+ * Is this method available for the user?
+ * This is checked on the notifications options
+ */
+ public function is_available()
+ {
+ return ($this->global_available() && $this->user->data['user_jabber']);
+ }
+
+ /**
+ * Is this method available at all?
+ * This is checked before notifications are sent
+ */
+ public function global_available()
+ {
+ return !(
+ empty($this->config['jab_enable']) ||
+ empty($this->config['jab_host']) ||
+ empty($this->config['jab_username']) ||
+ empty($this->config['jab_password']) ||
+ !@extension_loaded('xml')
+ );
+ }
+
+ public function notify()
+ {
+ if (!$this->global_available())
+ {
+ return;
+ }
+
+ return $this->notify_using_messenger(NOTIFY_IM, 'short/');
+ }
+}
diff --git a/phpBB/phpbb/notification/method/messenger_base.php b/phpBB/phpbb/notification/method/messenger_base.php
new file mode 100644
index 0000000000..7cb38eb59d
--- /dev/null
+++ b/phpBB/phpbb/notification/method/messenger_base.php
@@ -0,0 +1,94 @@
+<?php
+/**
+*
+* @package notifications
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\notification\method;
+
+/**
+* Abstract notification method handling email and jabber notifications
+* using the phpBB messenger.
+*
+* @package notifications
+*/
+abstract class messenger_base extends \phpbb\notification\method\base
+{
+ /**
+ * Notify using phpBB messenger
+ *
+ * @param int $notify_method Notify method for messenger (e.g. NOTIFY_IM)
+ * @param string $template_dir_prefix Base directory to prepend to the email template name
+ *
+ * @return null
+ */
+ protected function notify_using_messenger($notify_method, $template_dir_prefix = '')
+ {
+ if (empty($this->queue))
+ {
+ return;
+ }
+
+ // Load all users we want to notify (we need their email address)
+ $user_ids = $users = array();
+ foreach ($this->queue as $notification)
+ {
+ $user_ids[] = $notification->user_id;
+ }
+
+ // We do not send emails to banned users
+ if (!function_exists('phpbb_get_banned_user_ids'))
+ {
+ include($this->phpbb_root_path . 'includes/functions_user.' . $this->php_ext);
+ }
+ $banned_users = phpbb_get_banned_user_ids($user_ids);
+
+ // Load all the users we need
+ $this->user_loader->load_users($user_ids);
+
+ // Load the messenger
+ if (!class_exists('messenger'))
+ {
+ include($this->phpbb_root_path . 'includes/functions_messenger.' . $this->php_ext);
+ }
+ $messenger = new \messenger();
+ $board_url = generate_board_url();
+
+ // Time to go through the queue and send emails
+ foreach ($this->queue as $notification)
+ {
+ if ($notification->get_email_template() === false)
+ {
+ continue;
+ }
+
+ $user = $this->user_loader->get_user($notification->user_id);
+
+ if ($user['user_type'] == USER_IGNORE || in_array($notification->user_id, $banned_users))
+ {
+ continue;
+ }
+
+ $messenger->template($template_dir_prefix . $notification->get_email_template(), $user['user_lang']);
+
+ $messenger->set_addresses($user);
+
+ $messenger->assign_vars(array_merge(array(
+ 'USERNAME' => $user['username'],
+
+ 'U_NOTIFICATION_SETTINGS' => generate_board_url() . '/ucp.' . $this->php_ext . '?i=ucp_notifications',
+ ), $notification->get_email_template_variables()));
+
+ $messenger->send($notify_method);
+ }
+
+ // Save the queue in the messenger class (has to be called or these emails could be lost?)
+ $messenger->save_queue();
+
+ // We're done, empty the queue
+ $this->empty_queue();
+ }
+}
diff --git a/phpBB/phpbb/notification/method/method_interface.php b/phpBB/phpbb/notification/method/method_interface.php
new file mode 100644
index 0000000000..4830d06b86
--- /dev/null
+++ b/phpBB/phpbb/notification/method/method_interface.php
@@ -0,0 +1,42 @@
+<?php
+/**
+*
+* @package notifications
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\notification\method;
+
+/**
+* Base notifications method interface
+* @package notifications
+*/
+interface method_interface
+{
+ /**
+ * Get notification method name
+ *
+ * @return string
+ */
+ public function get_type();
+
+ /**
+ * Is this method available for the user?
+ * This is checked on the notifications options
+ */
+ public function is_available();
+
+ /**
+ * Add a notification to the queue
+ *
+ * @param \phpbb\notification\type\type_interface $notification
+ */
+ public function add_to_queue(\phpbb\notification\type\type_interface $notification);
+
+ /**
+ * Parse the queue and notify the users
+ */
+ public function notify();
+}
diff --git a/phpBB/phpbb/notification/type/admin_activate_user.php b/phpBB/phpbb/notification/type/admin_activate_user.php
new file mode 100644
index 0000000000..426da4db03
--- /dev/null
+++ b/phpBB/phpbb/notification/type/admin_activate_user.php
@@ -0,0 +1,166 @@
+<?php
+/**
+*
+* @package notifications
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\notification\type;
+
+/**
+* Admin activation notifications class
+* This class handles notifications for users requiring admin activation
+*
+* @package notifications
+*/
+class admin_activate_user extends \phpbb\notification\type\base
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function get_type()
+ {
+ return 'admin_activate_user';
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected $language_key = 'NOTIFICATION_ADMIN_ACTIVATE_USER';
+
+ /**
+ * {@inheritdoc}
+ */
+ public static $notification_option = array(
+ 'lang' => 'NOTIFICATION_TYPE_ADMIN_ACTIVATE_USER',
+ 'group' => 'NOTIFICATION_GROUP_ADMINISTRATION',
+ );
+
+ /**
+ * {@inheritdoc}
+ */
+ public function is_available()
+ {
+ return ($this->auth->acl_get('a_user') && $this->config['require_activation'] == USER_ACTIVATION_ADMIN);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public static function get_item_id($user)
+ {
+ return (int) $user['user_id'];
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public static function get_item_parent_id($post)
+ {
+ return 0;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function find_users_for_notification($user, $options = array())
+ {
+ $options = array_merge(array(
+ 'ignore_users' => array(),
+ ), $options);
+
+ // Grab admins that have permission to administer users.
+ $admin_ary = $this->auth->acl_get_list(false, 'a_user', false);
+ $users = (!empty($admin_ary[0]['a_user'])) ? $admin_ary[0]['a_user'] : array();
+
+ // Grab founders
+ $sql = 'SELECT user_id
+ FROM ' . USERS_TABLE . '
+ WHERE user_type = ' . USER_FOUNDER;
+ $result = $this->db->sql_query($sql);
+
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ $users[] = (int) $row['user_id'];
+ }
+ $this->db->sql_freeresult($result);
+
+ if (empty($users))
+ {
+ return array();
+ }
+ $users = array_unique($users);
+
+ return $this->check_user_notification_options($users, $options);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function get_avatar()
+ {
+ return $this->user_loader->get_avatar($this->item_id);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function get_title()
+ {
+ $username = $this->user_loader->get_username($this->item_id, 'no_profile');
+
+ return $this->user->lang($this->language_key, $username);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function get_email_template()
+ {
+ return 'admin_activate';
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function get_email_template_variables()
+ {
+ $board_url = generate_board_url();
+ $username = $this->user_loader->get_username($this->item_id, 'no_profile');
+
+ return array(
+ 'USERNAME' => htmlspecialchars_decode($username),
+ 'U_USER_DETAILS' => "{$board_url}/memberlist.{$this->php_ext}?mode=viewprofile&u={$this->item_id}",
+ 'U_ACTIVATE' => "{$board_url}/ucp.{$this->php_ext}?mode=activate&u={$this->item_id}&k={$this->get_data('user_actkey')}",
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function get_url()
+ {
+ return append_sid($this->phpbb_root_path . 'memberlist.' . $this->php_ext, "mode=viewprofile&u={$this->item_id}");
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function users_to_query()
+ {
+ return array($this->item_id);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function create_insert_array($user, $pre_create_data)
+ {
+ $this->set_data('user_actkey', $user['user_actkey']);
+ $this->notification_time = $user['user_regdate'];
+
+ return parent::create_insert_array($user, $pre_create_data);
+ }
+}
diff --git a/phpBB/phpbb/notification/type/approve_post.php b/phpBB/phpbb/notification/type/approve_post.php
new file mode 100644
index 0000000000..e51ff12b3e
--- /dev/null
+++ b/phpBB/phpbb/notification/type/approve_post.php
@@ -0,0 +1,141 @@
+<?php
+/**
+*
+* @package notifications
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\notification\type;
+
+/**
+* Post approved notifications class
+* This class handles notifications for posts when they are approved (to their authors)
+*
+* @package notifications
+*/
+class approve_post extends \phpbb\notification\type\post
+{
+ /**
+ * Get notification type name
+ *
+ * @return string
+ */
+ public function get_type()
+ {
+ return 'approve_post';
+ }
+
+ /**
+ * Language key used to output the text
+ *
+ * @var string
+ */
+ protected $language_key = 'NOTIFICATION_POST_APPROVED';
+
+ /**
+ * Inherit notification read status from post.
+ *
+ * @var bool
+ */
+ protected $inherit_read_status = false;
+
+ /**
+ * Notification option data (for outputting to the user)
+ *
+ * @var bool|array False if the service should use it's default data
+ * Array of data (including keys 'id', 'lang', and 'group')
+ */
+ public static $notification_option = array(
+ 'id' => 'moderation_queue',
+ 'lang' => 'NOTIFICATION_TYPE_MODERATION_QUEUE',
+ 'group' => 'NOTIFICATION_GROUP_POSTING',
+ );
+
+ /**
+ * Is available
+ */
+ public function is_available()
+ {
+ return !$this->auth->acl_get('m_approve');
+ }
+
+ /**
+ * Find the users who want to receive notifications
+ *
+ * @param array $post Data from
+ *
+ * @return array
+ */
+ public function find_users_for_notification($post, $options = array())
+ {
+ $options = array_merge(array(
+ 'ignore_users' => array(),
+ ), $options);
+
+ $users = array();
+ $users[$post['poster_id']] = array('');
+
+ $auth_read = $this->auth->acl_get_list(array_keys($users), 'f_read', $post['forum_id']);
+
+ if (empty($auth_read))
+ {
+ return array();
+ }
+
+ return $this->check_user_notification_options($auth_read[$post['forum_id']]['f_read'], array_merge($options, array(
+ 'item_type' => self::$notification_option['id'],
+ )));
+ }
+
+ /**
+ * Pre create insert array function
+ * This allows you to perform certain actions, like run a query
+ * and load data, before create_insert_array() is run. The data
+ * returned from this function will be sent to create_insert_array().
+ *
+ * @param array $post Post data from submit_post
+ * @param array $notify_users Notify users list
+ * Formated from find_users_for_notification()
+ * @return array Whatever you want to send to create_insert_array().
+ */
+ public function pre_create_insert_array($post, $notify_users)
+ {
+ // In the parent class, this is used to check if the post is already
+ // read by a user and marks the notification read if it was marked read.
+ // Returning an empty array in effect, forces it to be marked as unread
+ // (and also saves a query)
+ return array();
+ }
+
+ /**
+ * Function for preparing the data for insertion in an SQL query
+ * (The service handles insertion)
+ *
+ * @param array $post Data from submit_post
+ * @param array $pre_create_data Data from pre_create_insert_array()
+ *
+ * @return array Array of data ready to be inserted into the database
+ */
+ public function create_insert_array($post, $pre_create_data = array())
+ {
+ $this->set_data('post_subject', $post['post_subject']);
+
+ $data = parent::create_insert_array($post, $pre_create_data);
+
+ $this->notification_time = $data['notification_time'] = time();
+
+ return $data;
+ }
+
+ /**
+ * Get email template
+ *
+ * @return string|bool
+ */
+ public function get_email_template()
+ {
+ return 'post_approved';
+ }
+}
diff --git a/phpBB/phpbb/notification/type/approve_topic.php b/phpBB/phpbb/notification/type/approve_topic.php
new file mode 100644
index 0000000000..11a240e03d
--- /dev/null
+++ b/phpBB/phpbb/notification/type/approve_topic.php
@@ -0,0 +1,139 @@
+<?php
+/**
+*
+* @package notifications
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\notification\type;
+
+/**
+* Topic approved notifications class
+* This class handles notifications for topics when they are approved (for authors)
+*
+* @package notifications
+*/
+class approve_topic extends \phpbb\notification\type\topic
+{
+ /**
+ * Get notification type name
+ *
+ * @return string
+ */
+ public function get_type()
+ {
+ return 'approve_topic';
+ }
+
+ /**
+ * Language key used to output the text
+ *
+ * @var string
+ */
+ protected $language_key = 'NOTIFICATION_TOPIC_APPROVED';
+
+ /**
+ * Inherit notification read status from topic.
+ *
+ * @var bool
+ */
+ protected $inherit_read_status = false;
+
+ /**
+ * Notification option data (for outputting to the user)
+ *
+ * @var bool|array False if the service should use it's default data
+ * Array of data (including keys 'id', 'lang', and 'group')
+ */
+ public static $notification_option = array(
+ 'id' => 'moderation_queue',
+ 'lang' => 'NOTIFICATION_TYPE_MODERATION_QUEUE',
+ 'group' => 'NOTIFICATION_GROUP_POSTING',
+ );
+
+ /**
+ * Is available
+ */
+ public function is_available()
+ {
+ return !$this->auth->acl_get('m_approve');
+ }
+
+ /**
+ * Find the users who want to receive notifications
+ *
+ * @param array $post Data from
+ *
+ * @return array
+ */
+ public function find_users_for_notification($post, $options = array())
+ {
+ $options = array_merge(array(
+ 'ignore_users' => array(),
+ ), $options);
+
+ $users = array();
+ $users[$post['poster_id']] = array('');
+
+ $auth_read = $this->auth->acl_get_list(array_keys($users), 'f_read', $post['forum_id']);
+
+ if (empty($auth_read))
+ {
+ return array();
+ }
+
+ return $this->check_user_notification_options($auth_read[$post['forum_id']]['f_read'], array_merge($options, array(
+ 'item_type' => self::$notification_option['id'],
+ )));
+ }
+
+ /**
+ * Pre create insert array function
+ * This allows you to perform certain actions, like run a query
+ * and load data, before create_insert_array() is run. The data
+ * returned from this function will be sent to create_insert_array().
+ *
+ * @param array $post Post data from submit_post
+ * @param array $notify_users Notify users list
+ * Formated from find_users_for_notification()
+ * @return array Whatever you want to send to create_insert_array().
+ */
+ public function pre_create_insert_array($post, $notify_users)
+ {
+ // In the parent class, this is used to check if the post is already
+ // read by a user and marks the notification read if it was marked read.
+ // Returning an empty array in effect, forces it to be marked as unread
+ // (and also saves a query)
+ return array();
+ }
+
+ /**
+ * Function for preparing the data for insertion in an SQL query
+ * (The service handles insertion)
+ *
+ * @param array $post Data from submit_post
+ * @param array $pre_create_data Data from pre_create_insert_array()
+ *
+ * @return array Array of data ready to be inserted into the database
+ */
+ public function create_insert_array($post, $pre_create_data = array())
+ {
+ $data = parent::create_insert_array($post, $pre_create_data);
+
+ $this->notification_time = $data['notification_time'] = time();
+
+ return $data;
+ }
+
+ /**
+ * Get email template
+ *
+ * @return string|bool
+ */
+ public function get_email_template()
+ {
+ return 'topic_approved';
+ }
+}
diff --git a/phpBB/phpbb/notification/type/base.php b/phpBB/phpbb/notification/type/base.php
new file mode 100644
index 0000000000..10c876b286
--- /dev/null
+++ b/phpBB/phpbb/notification/type/base.php
@@ -0,0 +1,485 @@
+<?php
+/**
+*
+* @package notifications
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\notification\type;
+
+/**
+* Base notifications class
+* @package notifications
+*/
+abstract class base implements \phpbb\notification\type\type_interface
+{
+ /** @var \phpbb\notification\manager */
+ protected $notification_manager;
+
+ /** @var \phpbb\user_loader */
+ protected $user_loader;
+
+ /** @var \phpbb\db\driver\driver */
+ protected $db;
+
+ /** @var \phpbb\cache\driver\driver_interface */
+ protected $cache;
+
+ /** @var \phpbb\template\template */
+ protected $template;
+
+ /** @var \phpbb\user */
+ protected $user;
+
+ /** @var \phpbb\auth\auth */
+ protected $auth;
+
+ /** @var \phpbb\config\config */
+ protected $config;
+
+ /** @var string */
+ protected $phpbb_root_path;
+
+ /** @var string */
+ protected $php_ext;
+
+ /** @var string */
+ protected $notification_types_table;
+
+ /** @var string */
+ protected $notifications_table;
+
+ /** @var string */
+ protected $user_notifications_table;
+
+ /**
+ * Notification option data (for outputting to the user)
+ *
+ * @var bool|array False if the service should use its default data
+ * Array of data (including keys 'id', 'lang', and 'group')
+ */
+ public static $notification_option = false;
+
+ /**
+ * The notification_type_id, set upon creation of the class
+ * This is the notification_type_id from the notification_types table
+ *
+ * @var int
+ */
+ protected $notification_type_id;
+
+ /**
+ * Indentification data
+ * notification_type_id - ID of the item type (auto generated, from notification types table)
+ * item_id - ID of the item (e.g. post_id, msg_id)
+ * item_parent_id - Parent item id (ex: for topic => forum_id, for post => topic_id, etc)
+ * user_id
+ * notification_read
+ * notification_time
+ * notification_data (special serialized field that each notification type can use to store stuff)
+ *
+ * @var array $data Notification row from the database
+ * This must be private, all interaction should use __get(), __set(), get_data(), set_data()
+ */
+ private $data = array();
+
+ /**
+ * Notification Type Base Constructor
+ *
+ * @param \phpbb\user_loader $user_loader
+ * @param \phpbb\db\driver\driver $db
+ * @param \phpbb\cache\driver\driver_interface $cache
+ * @param \phpbb\user $user
+ * @param \phpbb\auth\auth $auth
+ * @param \phpbb\config\config $config
+ * @param string $phpbb_root_path
+ * @param string $php_ext
+ * @param string $notification_types_table
+ * @param string $notifications_table
+ * @param string $user_notifications_table
+ * @return \phpbb\notification\type\base
+ */
+ public function __construct(\phpbb\user_loader $user_loader, \phpbb\db\driver\driver $db, \phpbb\cache\driver\driver_interface $cache, $user, \phpbb\auth\auth $auth, \phpbb\config\config $config, $phpbb_root_path, $php_ext, $notification_types_table, $notifications_table, $user_notifications_table)
+ {
+ $this->user_loader = $user_loader;
+ $this->db = $db;
+ $this->cache = $cache;
+ $this->user = $user;
+ $this->auth = $auth;
+ $this->config = $config;
+
+ $this->phpbb_root_path = $phpbb_root_path;
+ $this->php_ext = $php_ext;
+
+ $this->notification_types_table = $notification_types_table;
+ $this->notifications_table = $notifications_table;
+ $this->user_notifications_table = $user_notifications_table;
+ }
+
+ /**
+ * Set notification manager (required)
+ *
+ * @param \phpbb\notification\manager $notification_manager
+ */
+ public function set_notification_manager(\phpbb\notification\manager $notification_manager)
+ {
+ $this->notification_manager = $notification_manager;
+
+ $this->notification_type_id = $this->notification_manager->get_notification_type_id($this->get_type());
+ }
+
+ /**
+ * Set initial data from the database
+ *
+ * @param array $data Row directly from the database
+ */
+ public function set_initial_data($data = array())
+ {
+ // The row from the database (unless this is a new notification we're going to add)
+ $this->data = $data;
+ $this->data['notification_data'] = (isset($this->data['notification_data'])) ? unserialize($this->data['notification_data']) : array();
+ }
+
+ /**
+ * Magic method to get data from this notification
+ *
+ * @param mixed $name
+ * @return mixed
+ */
+ public function __get($name)
+ {
+ return (!isset($this->data[$name])) ? null : $this->data[$name];
+ }
+
+
+ /**
+ * Magic method to set data on this notification
+ *
+ * @param mixed $name
+ * @return null
+ */
+ public function __set($name, $value)
+ {
+ $this->data[$name] = $value;
+ }
+
+
+ /**
+ * Magic method to get a string of this notification
+ *
+ * Primarily for testing
+ *
+ * @param string $name
+ * @return mixed
+ */
+ public function __toString()
+ {
+ return (!empty($this->data)) ? var_export($this->data, true) : $this->get_type();
+ }
+
+ /**
+ * Get special data (only important for the classes that extend this)
+ *
+ * @param string $name Name of the variable to get
+ * @return mixed
+ */
+ protected function get_data($name)
+ {
+ return ($name === false) ? $this->data['notification_data'] : ((isset($this->data['notification_data'][$name])) ? $this->data['notification_data'][$name] : null);
+ }
+
+ /**
+ * Set special data (only important for the classes that extend this)
+ *
+ * @param string $name Name of the variable to set
+ * @param mixed $value Value to set to the variable
+ * @return mixed
+ */
+ protected function set_data($name, $value)
+ {
+ $this->data['notification_data'][$name] = $value;
+ }
+
+ /**
+ * Function for preparing the data for insertion in an SQL query
+ * (The service handles insertion)
+ *
+ * @param array $type_data Data unique to this notification type
+ * @param array $pre_create_data Data from pre_create_insert_array()
+ * @return array Array of data ready to be inserted into the database
+ */
+ public function create_insert_array($type_data, $pre_create_data = array())
+ {
+ // Defaults
+ $this->data = array_merge(array(
+ 'item_id' => static::get_item_id($type_data),
+ 'notification_type_id' => $this->notification_type_id,
+ 'item_parent_id' => static::get_item_parent_id($type_data),
+
+ 'notification_time' => time(),
+ 'notification_read' => false,
+
+ 'notification_data' => array(),
+ ), $this->data);
+
+ $data = $this->data;
+
+ $data['notification_data'] = serialize($data['notification_data']);
+
+ return $data;
+ }
+
+ /**
+ * Function for preparing the data for update in an SQL query
+ * (The service handles insertion)
+ *
+ * @param array $type_data Data unique to this notification type
+ * @return array Array of data ready to be updated in the database
+ */
+ public function create_update_array($type_data)
+ {
+ $data = $this->create_insert_array($type_data);
+
+ // Unset data unique to each row
+ unset(
+ $data['notification_time'], // Also unsetting time, since it always tries to change the time to current (if you actually need to change the time, over-ride this function)
+ $data['notification_id'],
+ $data['notification_read'],
+ $data['user_id']
+ );
+
+ return $data;
+ }
+
+ /**
+ * Mark this item read
+ *
+ * @param bool $return True to return a string containing the SQL code to update this item, False to execute it (Default: False)
+ * @return string|null If $return is False, nothing will be returned, else the sql code to update this item
+ */
+ public function mark_read($return = false)
+ {
+ return $this->mark(false, $return);
+ }
+
+ /**
+ * Mark this item unread
+ *
+ * @param bool $return True to return a string containing the SQL code to update this item, False to execute it (Default: False)
+ * @return string|null If $return is False, nothing will be returned, else the sql code to update this item
+ */
+ public function mark_unread($return = false)
+ {
+ return $this->mark(true, $return);
+ }
+
+ /**
+ * Prepare to output the notification to the template
+ *
+ * @return array Template variables
+ */
+ public function prepare_for_display()
+ {
+ $mark_hash = generate_link_hash('mark_notification_read');
+
+ if ($this->get_url())
+ {
+ $u_mark_read = append_sid($this->phpbb_root_path . 'index.' . $this->php_ext, 'mark_notification=' . $this->notification_id . '&amp;hash=' . $mark_hash);
+ }
+ else
+ {
+ $redirect = (($this->user->page['page_dir']) ? $this->user->page['page_dir'] . '/' : '') . $this->user->page['page_name'] . (($this->user->page['query_string']) ? '?' . $this->user->page['query_string'] : '');
+
+ $u_mark_read = append_sid($this->phpbb_root_path . 'index.' . $this->php_ext, 'mark_notification=' . $this->notification_id . '&amp;hash=' . $mark_hash . '&amp;redirect=' . urlencode($redirect));
+ }
+
+ return array(
+ 'NOTIFICATION_ID' => $this->notification_id,
+
+ 'AVATAR' => $this->get_avatar(),
+
+ 'FORMATTED_TITLE' => $this->get_title(),
+
+ 'URL' => $this->get_url(),
+ 'TIME' => $this->user->format_date($this->notification_time),
+
+ 'UNREAD' => !$this->notification_read,
+
+ 'U_MARK_READ' => (!$this->notification_read) ? $u_mark_read : '',
+ );
+ }
+
+ /**
+ * -------------- Fall back functions -------------------
+ */
+
+ /**
+ * URL to unsubscribe to this notification (fall back)
+ *
+ * @param string|bool $method Method name to unsubscribe from (email|jabber|etc), False to unsubscribe from all notifications for this item
+ */
+ public function get_unsubscribe_url($method = false)
+ {
+ return false;
+ }
+
+ /**
+ * Get the user's avatar (fall back)
+ *
+ * @return string
+ */
+ public function get_avatar()
+ {
+ return '';
+ }
+
+ /**
+ * Get the special items to load (fall back)
+ *
+ * @return array
+ */
+ public function get_load_special()
+ {
+ return array();
+ }
+
+ /**
+ * Load the special items (fall back)
+ */
+ public function load_special($data, $notifications)
+ {
+ return;
+ }
+
+ /**
+ * Is available (fall back)
+ *
+ * @return bool
+ */
+ public function is_available()
+ {
+ return true;
+ }
+
+ /**
+ * Pre create insert array function (fall back)
+ *
+ * @return array
+ */
+ public function pre_create_insert_array($type_data, $notify_users)
+ {
+ return array();
+ }
+
+ /**
+ * -------------- Helper functions -------------------
+ */
+
+ /**
+ * Find the users who want to receive notifications (helper)
+ *
+ * @param array $user_ids User IDs to check if they want to receive notifications
+ * (Bool False to check all users besides anonymous and bots (USER_IGNORE))
+ *
+ * @return array
+ */
+ protected function check_user_notification_options($user_ids = false, $options = array())
+ {
+ $options = array_merge(array(
+ 'ignore_users' => array(),
+ 'item_type' => $this->get_type(),
+ 'item_id' => 0, // Global by default
+ ), $options);
+
+ if ($user_ids === false)
+ {
+ $user_ids = array();
+
+ $sql = 'SELECT user_id
+ FROM ' . USERS_TABLE . '
+ WHERE user_id <> ' . ANONYMOUS . '
+ AND user_type <> ' . USER_IGNORE;
+ $result = $this->db->sql_query($sql);
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ $user_ids[] = $row['user_id'];
+ }
+ $this->db->sql_freeresult($result);
+ }
+
+ if (empty($user_ids))
+ {
+ return array();
+ }
+
+ $rowset = $resulting_user_ids = array();
+
+ $sql = 'SELECT user_id, method, notify
+ FROM ' . $this->user_notifications_table . '
+ WHERE ' . $this->db->sql_in_set('user_id', $user_ids) . "
+ AND item_type = '" . $this->db->sql_escape($options['item_type']) . "'
+ AND item_id = " . (int) $options['item_id'];
+ $result = $this->db->sql_query($sql);
+
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ $resulting_user_ids[] = $row['user_id'];
+
+ if (!$row['notify'] || (isset($options['ignore_users'][$row['user_id']]) && in_array($row['method'], $options['ignore_users'][$row['user_id']])))
+ {
+ continue;
+ }
+
+ if (!isset($rowset[$row['user_id']]))
+ {
+ $rowset[$row['user_id']] = array();
+ }
+
+ $rowset[$row['user_id']][] = $row['method'];
+ }
+
+ $this->db->sql_freeresult($result);
+
+ foreach ($user_ids as $user_id)
+ {
+ if (!in_array($user_id, $resulting_user_ids) && !isset($options['ignore_users'][$user_id]))
+ {
+ // No rows at all for this user, default to ''
+ $rowset[$user_id] = array('');
+ }
+ }
+
+ return $rowset;
+ }
+
+ /**
+ * Mark this item read/unread helper
+ *
+ * @param bool $unread Unread (True/False) (Default: False)
+ * @param bool $return True to return a string containing the SQL code to update this item, False to execute it (Default: False)
+ * @return string|null If $return is False, nothing will be returned, else the sql code to update this item
+ */
+ protected function mark($unread = true, $return = false)
+ {
+ $this->notification_read = (bool) !$unread;
+
+ $where = array(
+ 'notification_type_id = ' . (int) $this->notification_type_id,
+ 'item_id = ' . (int) $this->item_id,
+ 'user_id = ' . (int) $this->user_id,
+ );
+ $where = implode(' AND ', $where);
+
+ if ($return)
+ {
+ return $where;
+ }
+
+ $sql = 'UPDATE ' . $this->notifications_table . '
+ SET notification_read = ' . (int) $this->notification_read . '
+ WHERE ' . $where;
+ $this->db->sql_query($sql);
+ }
+}
diff --git a/phpBB/phpbb/notification/type/bookmark.php b/phpBB/phpbb/notification/type/bookmark.php
new file mode 100644
index 0000000000..003998677d
--- /dev/null
+++ b/phpBB/phpbb/notification/type/bookmark.php
@@ -0,0 +1,132 @@
+<?php
+/**
+*
+* @package notifications
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\notification\type;
+
+/**
+* Bookmark updating notifications class
+* This class handles notifications for replies to a bookmarked topic
+*
+* @package notifications
+*/
+class bookmark extends \phpbb\notification\type\post
+{
+ /**
+ * Get notification type name
+ *
+ * @return string
+ */
+ public function get_type()
+ {
+ return 'bookmark';
+ }
+
+ /**
+ * Language key used to output the text
+ *
+ * @var string
+ */
+ protected $language_key = 'NOTIFICATION_BOOKMARK';
+
+ /**
+ * Notification option data (for outputting to the user)
+ *
+ * @var bool|array False if the service should use it's default data
+ * Array of data (including keys 'id', 'lang', and 'group')
+ */
+ public static $notification_option = array(
+ 'lang' => 'NOTIFICATION_TYPE_BOOKMARK',
+ 'group' => 'NOTIFICATION_GROUP_POSTING',
+ );
+
+ /**
+ * Is available
+ */
+ public function is_available()
+ {
+ return $this->config['allow_bookmarks'];
+ }
+
+ /**
+ * Find the users who want to receive notifications
+ *
+ * @param array $post Data from
+ *
+ * @return array
+ */
+ public function find_users_for_notification($post, $options = array())
+ {
+ $options = array_merge(array(
+ 'ignore_users' => array(),
+ ), $options);
+
+ $users = array();
+
+ $sql = 'SELECT user_id
+ FROM ' . BOOKMARKS_TABLE . '
+ WHERE ' . $this->db->sql_in_set('topic_id', $post['topic_id']) . '
+ AND user_id <> ' . (int) $post['poster_id'];
+ $result = $this->db->sql_query($sql);
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ $users[] = (int) $row['user_id'];
+ }
+ $this->db->sql_freeresult($result);
+
+ if (empty($users))
+ {
+ return array();
+ }
+ sort($users);
+
+ $auth_read = $this->auth->acl_get_list($users, 'f_read', $post['forum_id']);
+
+ if (empty($auth_read))
+ {
+ return array();
+ }
+
+ $notify_users = $this->check_user_notification_options($auth_read[$post['forum_id']]['f_read'], $options);
+
+ // Try to find the users who already have been notified about replies and have not read the topic since and just update their notifications
+ $update_notifications = array();
+ $sql = 'SELECT n.*
+ FROM ' . $this->notifications_table . ' n, ' . $this->notification_types_table . ' nt
+ WHERE n.notification_type_id = ' . (int) $this->notification_type_id . '
+ AND n.item_parent_id = ' . (int) self::get_item_parent_id($post) . '
+ AND n.notification_read = 0
+ AND nt.notification_type_id = n.notification_type_id
+ AND nt.notification_type_enabled = 1';
+ $result = $this->db->sql_query($sql);
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ // Do not create a new notification
+ unset($notify_users[$row['user_id']]);
+
+ $notification = $this->notification_manager->get_item_type_class($this->get_type(), $row);
+ $sql = 'UPDATE ' . $this->notifications_table . '
+ SET ' . $this->db->sql_build_array('UPDATE', $notification->add_responders($post)) . '
+ WHERE notification_id = ' . $row['notification_id'];
+ $this->db->sql_query($sql);
+ }
+ $this->db->sql_freeresult($result);
+
+ return $notify_users;
+ }
+
+ /**
+ * Get email template
+ *
+ * @return string|bool
+ */
+ public function get_email_template()
+ {
+ return 'bookmark';
+ }
+}
diff --git a/phpBB/phpbb/notification/type/disapprove_post.php b/phpBB/phpbb/notification/type/disapprove_post.php
new file mode 100644
index 0000000000..70de2a3e10
--- /dev/null
+++ b/phpBB/phpbb/notification/type/disapprove_post.php
@@ -0,0 +1,121 @@
+<?php
+/**
+*
+* @package notifications
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\notification\type;
+
+/**
+* Post disapproved notifications class
+* This class handles notifications for posts when they are disapproved (for authors)
+*
+* @package notifications
+*/
+class disapprove_post extends \phpbb\notification\type\approve_post
+{
+ /**
+ * Get notification type name
+ *
+ * @return string
+ */
+ public function get_type()
+ {
+ return 'disapprove_post';
+ }
+
+ /**
+ * Language key used to output the text
+ *
+ * @var string
+ */
+ protected $language_key = 'NOTIFICATION_POST_DISAPPROVED';
+
+ /**
+ * Inherit notification read status from post.
+ *
+ * @var bool
+ */
+ protected $inherit_read_status = false;
+
+ /**
+ * Notification option data (for outputting to the user)
+ *
+ * @var bool|array False if the service should use it's default data
+ * Array of data (including keys 'id', 'lang', and 'group')
+ */
+ public static $notification_option = array(
+ 'id' => 'moderation_queue',
+ 'lang' => 'NOTIFICATION_TYPE_MODERATION_QUEUE',
+ 'group' => 'NOTIFICATION_GROUP_POSTING',
+ );
+
+ /**
+ * Get the HTML formatted title of this notification
+ *
+ * @return string
+ */
+ public function get_title()
+ {
+ return $this->user->lang(
+ $this->language_key,
+ censor_text($this->get_data('topic_title')),
+ $this->get_data('disapprove_reason')
+ );
+ }
+
+ /**
+ * Get the url to this item
+ *
+ * @return string URL
+ */
+ public function get_url()
+ {
+ return '';
+ }
+
+ /**
+ * Get email template variables
+ *
+ * @return array
+ */
+ public function get_email_template_variables()
+ {
+ return array_merge(parent::get_email_template_variables(), array(
+ 'REASON' => htmlspecialchars_decode($this->get_data('disapprove_reason')),
+ ));
+ }
+
+ /**
+ * Function for preparing the data for insertion in an SQL query
+ * (The service handles insertion)
+ *
+ * @param array $post Data from submit_post
+ * @param array $pre_create_data Data from pre_create_insert_array()
+ *
+ * @return array Array of data ready to be inserted into the database
+ */
+ public function create_insert_array($post, $pre_create_data = array())
+ {
+ $this->set_data('disapprove_reason', $post['disapprove_reason']);
+
+ $data = parent::create_insert_array($post);
+
+ $this->notification_time = $data['notification_time'] = time();
+
+ return $data;
+ }
+
+ /**
+ * Get email template
+ *
+ * @return string|bool
+ */
+ public function get_email_template()
+ {
+ return 'post_disapproved';
+ }
+}
diff --git a/phpBB/phpbb/notification/type/disapprove_topic.php b/phpBB/phpbb/notification/type/disapprove_topic.php
new file mode 100644
index 0000000000..d39201d928
--- /dev/null
+++ b/phpBB/phpbb/notification/type/disapprove_topic.php
@@ -0,0 +1,121 @@
+<?php
+/**
+*
+* @package notifications
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\notification\type;
+
+/**
+* Topic disapproved notifications class
+* This class handles notifications for topics when they are disapproved (for authors)
+*
+* @package notifications
+*/
+class disapprove_topic extends \phpbb\notification\type\approve_topic
+{
+ /**
+ * Get notification type name
+ *
+ * @return string
+ */
+ public function get_type()
+ {
+ return 'disapprove_topic';
+ }
+
+ /**
+ * Language key used to output the text
+ *
+ * @var string
+ */
+ protected $language_key = 'NOTIFICATION_TOPIC_DISAPPROVED';
+
+ /**
+ * Inherit notification read status from topic.
+ *
+ * @var bool
+ */
+ protected $inherit_read_status = false;
+
+ /**
+ * Notification option data (for outputting to the user)
+ *
+ * @var bool|array False if the service should use it's default data
+ * Array of data (including keys 'id', 'lang', and 'group')
+ */
+ public static $notification_option = array(
+ 'id' => 'moderation_queue',
+ 'lang' => 'NOTIFICATION_TYPE_MODERATION_QUEUE',
+ 'group' => 'NOTIFICATION_GROUP_POSTING',
+ );
+
+ /**
+ * Get the HTML formatted title of this notification
+ *
+ * @return string
+ */
+ public function get_title()
+ {
+ return $this->user->lang(
+ $this->language_key,
+ censor_text($this->get_data('topic_title')),
+ $this->get_data('disapprove_reason')
+ );
+ }
+
+ /**
+ * Get the url to this item
+ *
+ * @return string URL
+ */
+ public function get_url()
+ {
+ return '';
+ }
+
+ /**
+ * Get email template variables
+ *
+ * @return array
+ */
+ public function get_email_template_variables()
+ {
+ return array_merge(parent::get_email_template_variables(), array(
+ 'REASON' => htmlspecialchars_decode($this->get_data('disapprove_reason')),
+ ));
+ }
+
+ /**
+ * Function for preparing the data for insertion in an SQL query
+ * (The service handles insertion)
+ *
+ * @param array $post Data from submit_post
+ * @param array $pre_create_data Data from pre_create_insert_array()
+ *
+ * @return array Array of data ready to be inserted into the database
+ */
+ public function create_insert_array($post, $pre_create_data = array())
+ {
+ $this->set_data('disapprove_reason', $post['disapprove_reason']);
+
+ $data = parent::create_insert_array($post, $pre_create_data);
+
+ $this->notification_time = $data['notification_time'] = time();
+
+ return $data;
+ }
+
+ /**
+ * Get email template
+ *
+ * @return string|bool
+ */
+ public function get_email_template()
+ {
+ return 'topic_disapproved';
+ }
+}
diff --git a/phpBB/phpbb/notification/type/group_request.php b/phpBB/phpbb/notification/type/group_request.php
new file mode 100644
index 0000000000..e0527fe220
--- /dev/null
+++ b/phpBB/phpbb/notification/type/group_request.php
@@ -0,0 +1,157 @@
+<?php
+/**
+*
+* @package notifications
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\notification\type;
+
+class group_request extends \phpbb\notification\type\base
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function get_type()
+ {
+ return 'group_request';
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public static $notification_option = array(
+ 'lang' => 'NOTIFICATION_TYPE_GROUP_REQUEST',
+ );
+
+ /**
+ * {@inheritdoc}
+ */
+ public function is_available()
+ {
+ // Leader of any groups?
+ $sql = 'SELECT group_id
+ FROM ' . USER_GROUP_TABLE . '
+ WHERE user_id = ' . (int) $this->user->data['user_id'] . '
+ AND group_leader = 1';
+ $result = $this->db->sql_query_limit($sql, 1);
+ $row = $this->db->sql_fetchrow($result);
+ $this->db->sql_freeresult($result);
+
+ return (!empty($row)) ? true : false;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public static function get_item_id($group)
+ {
+ return (int) $group['user_id'];
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public static function get_item_parent_id($group)
+ {
+ // Group id is the parent
+ return (int) $group['group_id'];
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function find_users_for_notification($group, $options = array())
+ {
+ $options = array_merge(array(
+ 'ignore_users' => array(),
+ ), $options);
+
+ $sql = 'SELECT user_id
+ FROM ' . USER_GROUP_TABLE . '
+ WHERE group_leader = 1
+ AND group_id = ' . (int) $group['group_id'];
+ $result = $this->db->sql_query($sql);
+
+ $user_ids = array();
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ $user_ids[] = (int) $row['user_id'];
+ }
+ $this->db->sql_freeresult($result);
+
+ $this->user_loader->load_users($user_ids);
+
+ return $this->check_user_notification_options($user_ids, $options);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function get_avatar()
+ {
+ return $this->user_loader->get_avatar($this->item_id);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function get_title()
+ {
+ $username = $this->user_loader->get_username($this->item_id, 'no_profile');
+
+ return $this->user->lang('NOTIFICATION_GROUP_REQUEST', $username, $this->get_data('group_name'));
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function get_email_template()
+ {
+ return 'group_request';
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function get_email_template_variables()
+ {
+ $user_data = $this->user_loader->get_user($this->item_id);
+
+ return array(
+ 'GROUP_NAME' => htmlspecialchars_decode($this->get_data('group_name')),
+ 'REQUEST_USERNAME' => htmlspecialchars_decode($user_data['username']),
+
+ 'U_PENDING' => generate_board_url() . "/ucp.{$this->php_ext}?i=groups&mode=manage&action=list&g={$this->item_parent_id}",
+ 'U_GROUP' => generate_board_url() . "/memberlist.{$this->php_ext}?mode=group&g={$this->item_parent_id}",
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function get_url()
+ {
+ return append_sid($this->phpbb_root_path . 'ucp.' . $this->php_ext, "i=groups&mode=manage&action=list&g={$this->item_parent_id}");
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function users_to_query()
+ {
+ return array($this->item_id);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function create_insert_array($group, $pre_create_data = array())
+ {
+ $this->set_data('group_name', $group['group_name']);
+
+ return parent::create_insert_array($group, $pre_create_data);
+ }
+}
diff --git a/phpBB/phpbb/notification/type/group_request_approved.php b/phpBB/phpbb/notification/type/group_request_approved.php
new file mode 100644
index 0000000000..448f049412
--- /dev/null
+++ b/phpBB/phpbb/notification/type/group_request_approved.php
@@ -0,0 +1,112 @@
+<?php
+/**
+*
+* @package notifications
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\notification\type;
+
+class group_request_approved extends \phpbb\notification\type\base
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function get_type()
+ {
+ return 'group_request_approved';
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function is_available()
+ {
+ return false;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public static function get_item_id($group)
+ {
+ return (int) $group['group_id'];
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public static function get_item_parent_id($group)
+ {
+ return 0;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function find_users_for_notification($group, $options = array())
+ {
+ $users = array();
+
+ $group['user_ids'] = (!is_array($group['user_ids'])) ? array($group['user_ids']) : $group['user_ids'];
+
+ foreach ($group['user_ids'] as $user_id)
+ {
+ $users[$user_id] = array('');
+ }
+
+ return $users;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function get_title()
+ {
+ return $this->user->lang('NOTIFICATION_GROUP_REQUEST_APPROVED', $this->get_data('group_name'));
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function get_url()
+ {
+ return append_sid($this->phpbb_root_path . 'memberlist.' . $this->php_ext, "mode=group&g={$this->item_id}");
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function create_insert_array($group, $pre_create_data = array())
+ {
+ $this->set_data('group_name', $group['group_name']);
+
+ return parent::create_insert_array($group, $pre_create_data);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function users_to_query()
+ {
+ return array();
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function get_email_template()
+ {
+ return false;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function get_email_template_variables()
+ {
+ return array();
+ }
+}
diff --git a/phpBB/phpbb/notification/type/pm.php b/phpBB/phpbb/notification/type/pm.php
new file mode 100644
index 0000000000..584a30efa6
--- /dev/null
+++ b/phpBB/phpbb/notification/type/pm.php
@@ -0,0 +1,178 @@
+<?php
+/**
+*
+* @package notifications
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\notification\type;
+
+/**
+* Private message notifications class
+* This class handles notifications for private messages
+*
+* @package notifications
+*/
+class pm extends \phpbb\notification\type\base
+{
+ /**
+ * Get notification type name
+ *
+ * @return string
+ */
+ public function get_type()
+ {
+ return 'pm';
+ }
+
+ /**
+ * Notification option data (for outputting to the user)
+ *
+ * @var bool|array False if the service should use it's default data
+ * Array of data (including keys 'id', 'lang', and 'group')
+ */
+ public static $notification_option = array(
+ 'lang' => 'NOTIFICATION_TYPE_PM',
+ );
+
+ /**
+ * Is available
+ */
+ public function is_available()
+ {
+ return ($this->config['allow_privmsg'] && $this->auth->acl_get('u_readpm'));
+ }
+
+ /**
+ * Get the id of the
+ *
+ * @param array $pm The data from the private message
+ */
+ public static function get_item_id($pm)
+ {
+ return (int) $pm['msg_id'];
+ }
+
+ /**
+ * Get the id of the parent
+ *
+ * @param array $pm The data from the pm
+ */
+ public static function get_item_parent_id($pm)
+ {
+ // No parent
+ return 0;
+ }
+
+ /**
+ * Find the users who want to receive notifications
+ *
+ * @param array $pm Data from
+ *
+ * @return array
+ */
+ public function find_users_for_notification($pm, $options = array())
+ {
+ $options = array_merge(array(
+ 'ignore_users' => array(),
+ ), $options);
+
+ if (!sizeof($pm['recipients']))
+ {
+ return array();
+ }
+
+ unset($pm['recipients'][$pm['from_user_id']]);
+
+ $this->user_loader->load_users(array_keys($pm['recipients']));
+
+ return $this->check_user_notification_options(array_keys($pm['recipients']), $options);
+ }
+
+ /**
+ * Get the user's avatar
+ */
+ public function get_avatar()
+ {
+ return $this->user_loader->get_avatar($this->get_data('from_user_id'));
+ }
+
+ /**
+ * Get the HTML formatted title of this notification
+ *
+ * @return string
+ */
+ public function get_title()
+ {
+ $username = $this->user_loader->get_username($this->get_data('from_user_id'), 'no_profile');
+
+ return $this->user->lang('NOTIFICATION_PM', $username, $this->get_data('message_subject'));
+ }
+
+ /**
+ * Get email template
+ *
+ * @return string|bool
+ */
+ public function get_email_template()
+ {
+ return 'privmsg_notify';
+ }
+
+ /**
+ * Get email template variables
+ *
+ * @return array
+ */
+ public function get_email_template_variables()
+ {
+ $user_data = $this->user_loader->get_user($this->get_data('from_user_id'));
+
+ return array(
+ 'AUTHOR_NAME' => htmlspecialchars_decode($user_data['username']),
+ 'SUBJECT' => htmlspecialchars_decode(censor_text($this->get_data('message_subject'))),
+
+ 'U_VIEW_MESSAGE' => generate_board_url() . '/ucp.' . $this->php_ext . "?i=pm&mode=view&p={$this->item_id}",
+ );
+ }
+
+ /**
+ * Get the url to this item
+ *
+ * @return string URL
+ */
+ public function get_url()
+ {
+ return append_sid($this->phpbb_root_path . 'ucp.' . $this->php_ext, "i=pm&amp;mode=view&amp;p={$this->item_id}");
+ }
+
+ /**
+ * Users needed to query before this notification can be displayed
+ *
+ * @return array Array of user_ids
+ */
+ public function users_to_query()
+ {
+ return array($this->get_data('from_user_id'));
+ }
+
+ /**
+ * Function for preparing the data for insertion in an SQL query
+ * (The service handles insertion)
+ *
+ * @param array $post Data from submit_post
+ * @param array $pre_create_data Data from pre_create_insert_array()
+ *
+ * @return array Array of data ready to be inserted into the database
+ */
+ public function create_insert_array($pm, $pre_create_data = array())
+ {
+ $this->set_data('from_user_id', $pm['from_user_id']);
+
+ $this->set_data('message_subject', $pm['message_subject']);
+
+ return parent::create_insert_array($pm, $pre_create_data);
+ }
+}
diff --git a/phpBB/phpbb/notification/type/post.php b/phpBB/phpbb/notification/type/post.php
new file mode 100644
index 0000000000..f973becc3b
--- /dev/null
+++ b/phpBB/phpbb/notification/type/post.php
@@ -0,0 +1,412 @@
+<?php
+/**
+*
+* @package notifications
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\notification\type;
+
+/**
+* Post notifications class
+* This class handles notifications for replies to a topic
+*
+* @package notifications
+*/
+class post extends \phpbb\notification\type\base
+{
+ /**
+ * Get notification type name
+ *
+ * @return string
+ */
+ public function get_type()
+ {
+ return 'post';
+ }
+
+ /**
+ * Language key used to output the text
+ *
+ * @var string
+ */
+ protected $language_key = 'NOTIFICATION_POST';
+
+ /**
+ * Inherit notification read status from post.
+ *
+ * @var bool
+ */
+ protected $inherit_read_status = true;
+
+ /**
+ * Notification option data (for outputting to the user)
+ *
+ * @var bool|array False if the service should use it's default data
+ * Array of data (including keys 'id', 'lang', and 'group')
+ */
+ public static $notification_option = array(
+ 'lang' => 'NOTIFICATION_TYPE_POST',
+ 'group' => 'NOTIFICATION_GROUP_POSTING',
+ );
+
+ /**
+ * Is available
+ */
+ public function is_available()
+ {
+ return $this->config['allow_topic_notify'];
+ }
+
+ /**
+ * Get the id of the item
+ *
+ * @param array $post The data from the post
+ */
+ public static function get_item_id($post)
+ {
+ return (int) $post['post_id'];
+ }
+
+ /**
+ * Get the id of the parent
+ *
+ * @param array $post The data from the post
+ */
+ public static function get_item_parent_id($post)
+ {
+ return (int) $post['topic_id'];
+ }
+
+ /**
+ * Find the users who want to receive notifications
+ *
+ * @param array $post Data from
+ *
+ * @return array
+ */
+ public function find_users_for_notification($post, $options = array())
+ {
+ $options = array_merge(array(
+ 'ignore_users' => array(),
+ ), $options);
+
+ $users = array();
+
+ $sql = 'SELECT user_id
+ FROM ' . TOPICS_WATCH_TABLE . '
+ WHERE topic_id = ' . (int) $post['topic_id'] . '
+ AND notify_status = ' . NOTIFY_YES . '
+ AND user_id <> ' . (int) $post['poster_id'];
+ $result = $this->db->sql_query($sql);
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ $users[] = (int) $row['user_id'];
+ }
+ $this->db->sql_freeresult($result);
+
+ $sql = 'SELECT user_id
+ FROM ' . FORUMS_WATCH_TABLE . '
+ WHERE forum_id = ' . (int) $post['forum_id'] . '
+ AND notify_status = ' . NOTIFY_YES . '
+ AND user_id <> ' . (int) $post['poster_id'];
+ $result = $this->db->sql_query($sql);
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ $users[] = (int) $row['user_id'];
+ }
+ $this->db->sql_freeresult($result);
+
+ if (empty($users))
+ {
+ return array();
+ }
+
+ $users = array_unique($users);
+ sort($users);
+
+ $auth_read = $this->auth->acl_get_list($users, 'f_read', $post['forum_id']);
+
+ if (empty($auth_read))
+ {
+ return array();
+ }
+
+ $notify_users = $this->check_user_notification_options($auth_read[$post['forum_id']]['f_read'], $options);
+
+ // Try to find the users who already have been notified about replies and have not read the topic since and just update their notifications
+ $update_notifications = array();
+ $sql = 'SELECT n.*
+ FROM ' . $this->notifications_table . ' n, ' . $this->notification_types_table . ' nt
+ WHERE n.notification_type_id = ' . (int) $this->notification_type_id . '
+ AND n.item_parent_id = ' . (int) self::get_item_parent_id($post) . '
+ AND n.notification_read = 0
+ AND nt.notification_type_id = n.notification_type_id
+ AND nt.notification_type_enabled = 1';
+ $result = $this->db->sql_query($sql);
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ // Do not create a new notification
+ unset($notify_users[$row['user_id']]);
+
+ $notification = $this->notification_manager->get_item_type_class($this->get_type(), $row);
+ $sql = 'UPDATE ' . $this->notifications_table . '
+ SET ' . $this->db->sql_build_array('UPDATE', $notification->add_responders($post)) . '
+ WHERE notification_id = ' . $row['notification_id'];
+ $this->db->sql_query($sql);
+ }
+ $this->db->sql_freeresult($result);
+
+ return $notify_users;
+ }
+
+ /**
+ * Get the user's avatar
+ */
+ public function get_avatar()
+ {
+ return $this->user_loader->get_avatar($this->get_data('poster_id'));
+ }
+
+ /**
+ * Get the HTML formatted title of this notification
+ *
+ * @return string
+ */
+ public function get_title()
+ {
+ $responders = $this->get_data('responders');
+ $usernames = array();
+
+ if (!is_array($responders))
+ {
+ $responders = array();
+ }
+
+ $responders = array_merge(array(array(
+ 'poster_id' => $this->get_data('poster_id'),
+ 'username' => $this->get_data('post_username'),
+ )), $responders);
+
+ $responders_cnt = sizeof($responders);
+ $responders = $this->trim_user_ary($responders);
+ $trimmed_responders_cnt = $responders_cnt - sizeof($responders);
+
+ foreach ($responders as $responder)
+ {
+ if ($responder['username'])
+ {
+ $usernames[] = $responder['username'];
+ }
+ else
+ {
+ $usernames[] = $this->user_loader->get_username($responder['poster_id'], 'no_profile');
+ }
+ }
+
+ if ($trimmed_responders_cnt)
+ {
+ $usernames[] = $this->user->lang('NOTIFICATION_X_OTHERS', $trimmed_responders_cnt);
+ }
+
+ return $this->user->lang(
+ $this->language_key,
+ phpbb_generate_string_list($usernames, $this->user),
+ censor_text($this->get_data('topic_title')),
+ $responders_cnt
+ );
+ }
+
+ /**
+ * Get email template
+ *
+ * @return string|bool
+ */
+ public function get_email_template()
+ {
+ return 'topic_notify';
+ }
+
+ /**
+ * Get email template variables
+ *
+ * @return array
+ */
+ public function get_email_template_variables()
+ {
+ if ($this->get_data('post_username'))
+ {
+ $username = $this->get_data('post_username');
+ }
+ else
+ {
+ $username = $this->user_loader->get_username($this->get_data('poster_id'), 'username');
+ }
+
+ return array(
+ 'AUTHOR_NAME' => htmlspecialchars_decode($username),
+ 'POST_SUBJECT' => htmlspecialchars_decode(censor_text($this->get_data('post_subject'))),
+ 'TOPIC_TITLE' => htmlspecialchars_decode(censor_text($this->get_data('topic_title'))),
+
+ 'U_VIEW_POST' => generate_board_url() . "/viewtopic.{$this->php_ext}?p={$this->item_id}#p{$this->item_id}",
+ 'U_NEWEST_POST' => generate_board_url() . "/viewtopic.{$this->php_ext}?f={$this->get_data('forum_id')}&t={$this->item_parent_id}&e=1&view=unread#unread",
+ 'U_TOPIC' => generate_board_url() . "/viewtopic.{$this->php_ext}?f={$this->get_data('forum_id')}&t={$this->item_parent_id}",
+ 'U_VIEW_TOPIC' => generate_board_url() . "/viewtopic.{$this->php_ext}?f={$this->get_data('forum_id')}&t={$this->item_parent_id}",
+ 'U_FORUM' => generate_board_url() . "/viewforum.{$this->php_ext}?f={$this->get_data('forum_id')}",
+ 'U_STOP_WATCHING_TOPIC' => generate_board_url() . "/viewtopic.{$this->php_ext}?uid={$this->user_id}&f={$this->get_data('forum_id')}&t={$this->item_parent_id}&unwatch=topic",
+ );
+ }
+
+ /**
+ * Get the url to this item
+ *
+ * @return string URL
+ */
+ public function get_url()
+ {
+ return append_sid($this->phpbb_root_path . 'viewtopic.' . $this->php_ext, "p={$this->item_id}#p{$this->item_id}");
+ }
+
+ /**
+ * Users needed to query before this notification can be displayed
+ *
+ * @return array Array of user_ids
+ */
+ public function users_to_query()
+ {
+ $responders = $this->get_data('responders');
+ $users = array(
+ $this->get_data('poster_id'),
+ );
+
+ if (is_array($responders))
+ {
+ foreach ($responders as $responder)
+ {
+ $users[] = $responder['poster_id'];
+ }
+ }
+
+ return $this->trim_user_ary($users);
+ }
+
+ /**
+ * Trim the user array passed down to 3 users if the array contains
+ * more than 4 users.
+ *
+ * @param array $users Array of users
+ * @return array Trimmed array of user_ids
+ */
+ public function trim_user_ary($users)
+ {
+ if (sizeof($users) > 4)
+ {
+ array_splice($users, 3);
+ }
+ return $users;
+ }
+
+ /**
+ * Pre create insert array function
+ * This allows you to perform certain actions, like run a query
+ * and load data, before create_insert_array() is run. The data
+ * returned from this function will be sent to create_insert_array().
+ *
+ * @param array $post Post data from submit_post
+ * @param array $notify_users Notify users list
+ * Formated from find_users_for_notification()
+ * @return array Whatever you want to send to create_insert_array().
+ */
+ public function pre_create_insert_array($post, $notify_users)
+ {
+ if (!sizeof($notify_users) || !$this->inherit_read_status)
+ {
+ return array();
+ }
+
+ $tracking_data = array();
+ $sql = 'SELECT user_id, mark_time FROM ' . TOPICS_TRACK_TABLE . '
+ WHERE topic_id = ' . (int) $post['topic_id'] . '
+ AND ' . $this->db->sql_in_set('user_id', array_keys($notify_users));
+ $result = $this->db->sql_query($sql);
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ $tracking_data[$row['user_id']] = $row['mark_time'];
+ }
+
+ return $tracking_data;
+ }
+
+ /**
+ * Function for preparing the data for insertion in an SQL query
+ * (The service handles insertion)
+ *
+ * @param array $post Data from submit_post
+ * @param array $pre_create_data Data from pre_create_insert_array()
+ *
+ * @return array Array of data ready to be inserted into the database
+ */
+ public function create_insert_array($post, $pre_create_data = array())
+ {
+ $this->set_data('poster_id', $post['poster_id']);
+
+ $this->set_data('topic_title', $post['topic_title']);
+
+ $this->set_data('post_subject', $post['post_subject']);
+
+ $this->set_data('post_username', (($post['poster_id'] == ANONYMOUS) ? $post['post_username'] : ''));
+
+ $this->set_data('forum_id', $post['forum_id']);
+
+ $this->set_data('forum_name', $post['forum_name']);
+
+ $this->notification_time = $post['post_time'];
+
+ // Topics can be "read" before they are public (while awaiting approval).
+ // Make sure that if the user has read the topic, it's marked as read in the notification
+ if ($this->inherit_read_status && isset($pre_create_data[$this->user_id]) && $pre_create_data[$this->user_id] >= $this->notification_time)
+ {
+ $this->notification_read = true;
+ }
+
+ return parent::create_insert_array($post, $pre_create_data);
+ }
+
+ /**
+ * Add responders to the notification
+ *
+ * @param mixed $post
+ */
+ public function add_responders($post)
+ {
+ // Do not add them as a responder if they were the original poster that created the notification
+ if ($this->get_data('poster_id') == $post['poster_id'])
+ {
+ return array('notification_data' => serialize($this->get_data(false)));
+ }
+
+ $responders = $this->get_data('responders');
+
+ $responders = ($responders === null) ? array() : $responders;
+
+ foreach ($responders as $responder)
+ {
+ // Do not add them as a responder multiple times
+ if ($responder['poster_id'] == $post['poster_id'])
+ {
+ return array('notification_data' => serialize($this->get_data(false)));
+ }
+ }
+
+ $responders[] = array(
+ 'poster_id' => $post['poster_id'],
+ 'username' => (($post['poster_id'] == ANONYMOUS) ? $post['post_username'] : ''),
+ );
+
+ $this->set_data('responders', $responders);
+
+ return array('notification_data' => serialize($this->get_data(false)));
+ }
+}
diff --git a/phpBB/phpbb/notification/type/post_in_queue.php b/phpBB/phpbb/notification/type/post_in_queue.php
new file mode 100644
index 0000000000..db16763583
--- /dev/null
+++ b/phpBB/phpbb/notification/type/post_in_queue.php
@@ -0,0 +1,148 @@
+<?php
+/**
+*
+* @package notifications
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\notification\type;
+
+/**
+* Post in queue notifications class
+* This class handles notifications for posts that are put in the moderation queue (for moderators)
+*
+* @package notifications
+*/
+class post_in_queue extends \phpbb\notification\type\post
+{
+ /**
+ * Get notification type name
+ *
+ * @return string
+ */
+ public function get_type()
+ {
+ return 'post_in_queue';
+ }
+
+ /**
+ * Language key used to output the text
+ *
+ * @var string
+ */
+ protected $language_key = 'NOTIFICATION_POST_IN_QUEUE';
+
+ /**
+ * Notification option data (for outputting to the user)
+ *
+ * @var bool|array False if the service should use it's default data
+ * Array of data (including keys 'id', 'lang', and 'group')
+ */
+ public static $notification_option = array(
+ 'id' => 'needs_approval',
+ 'lang' => 'NOTIFICATION_TYPE_IN_MODERATION_QUEUE',
+ 'group' => 'NOTIFICATION_GROUP_MODERATION',
+ );
+
+ /**
+ * Permission to check for (in find_users_for_notification)
+ *
+ * @var string Permission name
+ */
+ protected $permission = 'm_approve';
+
+ /**
+ * Is available
+ */
+ public function is_available()
+ {
+ $has_permission = $this->auth->acl_getf($this->permission, true);
+
+ return (!empty($has_permission));
+ }
+
+ /**
+ * Find the users who want to receive notifications
+ *
+ * @param array $post Data from the post
+ *
+ * @return array
+ */
+ public function find_users_for_notification($post, $options = array())
+ {
+ $options = array_merge(array(
+ 'ignore_users' => array(),
+ ), $options);
+
+ // 0 is for global moderator permissions
+ $auth_approve = $this->auth->acl_get_list(false, $this->permission, array($post['forum_id'], 0));
+
+ if (empty($auth_approve))
+ {
+ return array();
+ }
+
+ $has_permission = array();
+
+ if (isset($auth_approve[$post['forum_id']][$this->permission]))
+ {
+ $has_permission = $auth_approve[$post['forum_id']][$this->permission];
+ }
+
+ if (isset($auth_approve[0][$this->permission]))
+ {
+ $has_permission = array_unique(array_merge($has_permission, $auth_approve[0][$this->permission]));
+ }
+ sort($has_permission);
+
+ $auth_read = $this->auth->acl_get_list($has_permission, 'f_read', $post['forum_id']);
+ if (empty($auth_read))
+ {
+ return array();
+ }
+
+ return $this->check_user_notification_options($auth_read[$post['forum_id']]['f_read'], array_merge($options, array(
+ 'item_type' => self::$notification_option['id'],
+ )));
+ }
+
+ /**
+ * Get the url to this item
+ *
+ * @return string URL
+ */
+ public function get_url()
+ {
+ return append_sid($this->phpbb_root_path . 'mcp.' . $this->php_ext, "i=queue&amp;mode=approve_details&amp;f={$this->get_data('forum_id')}&amp;p={$this->item_id}");
+ }
+
+ /**
+ * Function for preparing the data for insertion in an SQL query
+ * (The service handles insertion)
+ *
+ * @param array $post Data from submit_post
+ * @param array $pre_create_data Data from pre_create_insert_array()
+ *
+ * @return array Array of data ready to be inserted into the database
+ */
+ public function create_insert_array($post, $pre_create_data = array())
+ {
+ $data = parent::create_insert_array($post, $pre_create_data);
+
+ $this->notification_time = $data['notification_time'] = time();
+
+ return $data;
+ }
+
+ /**
+ * Get email template
+ *
+ * @return string|bool
+ */
+ public function get_email_template()
+ {
+ return 'post_in_queue';
+ }
+}
diff --git a/phpBB/phpbb/notification/type/quote.php b/phpBB/phpbb/notification/type/quote.php
new file mode 100644
index 0000000000..745430e114
--- /dev/null
+++ b/phpBB/phpbb/notification/type/quote.php
@@ -0,0 +1,216 @@
+<?php
+/**
+*
+* @package notifications
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\notification\type;
+
+/**
+* Post quoting notifications class
+* This class handles notifying users when they have been quoted in a post
+*
+* @package notifications
+*/
+class quote extends \phpbb\notification\type\post
+{
+ /**
+ * Get notification type name
+ *
+ * @return string
+ */
+ public function get_type()
+ {
+ return 'quote';
+ }
+
+ /**
+ * regular expression to match to find usernames
+ *
+ * @var string
+ */
+ protected static $regular_expression_match = '#\[quote=&quot;(.+?)&quot;#';
+
+ /**
+ * Language key used to output the text
+ *
+ * @var string
+ */
+ protected $language_key = 'NOTIFICATION_QUOTE';
+
+ /**
+ * Notification option data (for outputting to the user)
+ *
+ * @var bool|array False if the service should use it's default data
+ * Array of data (including keys 'id', 'lang', and 'group')
+ */
+ public static $notification_option = array(
+ 'lang' => 'NOTIFICATION_TYPE_QUOTE',
+ 'group' => 'NOTIFICATION_GROUP_POSTING',
+ );
+
+ /**
+ * Is available
+ */
+ public function is_available()
+ {
+ return true;
+ }
+
+ /**
+ * Find the users who want to receive notifications
+ *
+ * @param array $post Data from
+ *
+ * @return array
+ */
+ public function find_users_for_notification($post, $options = array())
+ {
+ $options = array_merge(array(
+ 'ignore_users' => array(),
+ ), $options);
+
+ $usernames = false;
+ preg_match_all(self::$regular_expression_match, $post['post_text'], $usernames);
+
+ if (empty($usernames[1]))
+ {
+ return array();
+ }
+
+ $usernames[1] = array_unique($usernames[1]);
+
+ $usernames = array_map('utf8_clean_string', $usernames[1]);
+
+ $users = array();
+
+ $sql = 'SELECT user_id
+ FROM ' . USERS_TABLE . '
+ WHERE ' . $this->db->sql_in_set('username_clean', $usernames) . '
+ AND user_id <> ' . (int) $post['poster_id'];
+ $result = $this->db->sql_query($sql);
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ $users[] = (int) $row['user_id'];
+ }
+ $this->db->sql_freeresult($result);
+
+ if (empty($users))
+ {
+ return array();
+ }
+ sort($users);
+
+ $auth_read = $this->auth->acl_get_list($users, 'f_read', $post['forum_id']);
+
+ if (empty($auth_read))
+ {
+ return array();
+ }
+
+ $notify_users = $this->check_user_notification_options($auth_read[$post['forum_id']]['f_read'], $options);
+
+ // Try to find the users who already have been notified about replies and have not read the topic since and just update their notifications
+ $update_notifications = array();
+ $sql = 'SELECT n.*
+ FROM ' . $this->notifications_table . ' n, ' . $this->notification_types_table . ' nt
+ WHERE n.notification_type_id = ' . (int) $this->notification_type_id . '
+ AND n.item_parent_id = ' . (int) self::get_item_parent_id($post) . '
+ AND n.notification_read = 0
+ AND nt.notification_type_id = n.notification_type_id
+ AND nt.notification_type_enabled = 1';
+ $result = $this->db->sql_query($sql);
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ // Do not create a new notification
+ unset($notify_users[$row['user_id']]);
+
+ $notification = $this->notification_manager->get_item_type_class($this->get_type(), $row);
+ $sql = 'UPDATE ' . $this->notifications_table . '
+ SET ' . $this->db->sql_build_array('UPDATE', $notification->add_responders($post)) . '
+ WHERE notification_id = ' . $row['notification_id'];
+ $this->db->sql_query($sql);
+ }
+ $this->db->sql_freeresult($result);
+
+ return $notify_users;
+ }
+
+ /**
+ * Update a notification
+ *
+ * @param array $data Data specific for this type that will be updated
+ */
+ public function update_notifications($post)
+ {
+ $old_notifications = array();
+ $sql = 'SELECT n.user_id
+ FROM ' . $this->notifications_table . ' n, ' . $this->notification_types_table . ' nt
+ WHERE n.notification_type_id = ' . (int) $this->notification_type_id . '
+ AND n.item_id = ' . self::get_item_id($post) . '
+ AND nt.notification_type_id = n.notification_type_id
+ AND nt.notification_type_enabled = 1';
+ $result = $this->db->sql_query($sql);
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ $old_notifications[] = $row['user_id'];
+ }
+ $this->db->sql_freeresult($result);
+
+ // Find the new users to notify
+ $notifications = $this->find_users_for_notification($post);
+
+ // Find the notifications we must delete
+ $remove_notifications = array_diff($old_notifications, array_keys($notifications));
+
+ // Find the notifications we must add
+ $add_notifications = array();
+ foreach (array_diff(array_keys($notifications), $old_notifications) as $user_id)
+ {
+ $add_notifications[$user_id] = $notifications[$user_id];
+ }
+
+ // Add the necessary notifications
+ $this->notification_manager->add_notifications_for_users($this->get_type(), $post, $add_notifications);
+
+ // Remove the necessary notifications
+ if (!empty($remove_notifications))
+ {
+ $sql = 'DELETE FROM ' . $this->notifications_table . '
+ WHERE notification_type_id = ' . (int) $this->notification_type_id . '
+ AND item_id = ' . self::get_item_id($post) . '
+ AND ' . $this->db->sql_in_set('user_id', $remove_notifications);
+ $this->db->sql_query($sql);
+ }
+
+ // return true to continue with the update code in the notifications service (this will update the rest of the notifications)
+ return true;
+ }
+
+ /**
+ * Get email template
+ *
+ * @return string|bool
+ */
+ public function get_email_template()
+ {
+ return 'quote';
+ }
+
+ /**
+ * Get email template variables
+ *
+ * @return array
+ */
+ public function get_email_template_variables()
+ {
+ $user_data = $this->user_loader->get_user($this->get_data('poster_id'));
+
+ return array_merge(parent::get_email_template_variables(), array(
+ 'AUTHOR_NAME' => htmlspecialchars_decode($user_data['username']),
+ ));
+ }
+}
diff --git a/phpBB/phpbb/notification/type/report_pm.php b/phpBB/phpbb/notification/type/report_pm.php
new file mode 100644
index 0000000000..55f6bf946d
--- /dev/null
+++ b/phpBB/phpbb/notification/type/report_pm.php
@@ -0,0 +1,223 @@
+<?php
+/**
+*
+* @package notifications
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\notification\type;
+
+/**
+* Private message reported notifications class
+* This class handles notifications for private messages when they are reported
+*
+* @package notifications
+*/
+class report_pm extends \phpbb\notification\type\pm
+{
+ /**
+ * Get notification type name
+ *
+ * @return string
+ */
+ public function get_type()
+ {
+ return 'report_pm';
+ }
+
+ /**
+ * Language key used to output the text
+ *
+ * @var string
+ */
+ protected $language_key = 'NOTIFICATION_REPORT_PM';
+
+ /**
+ * Permission to check for (in find_users_for_notification)
+ *
+ * @var string Permission name
+ */
+ protected $permission = 'm_report';
+
+ /**
+ * Notification option data (for outputting to the user)
+ *
+ * @var bool|array False if the service should use it's default data
+ * Array of data (including keys 'id', 'lang', and 'group')
+ */
+ public static $notification_option = array(
+ 'id' => 'report',
+ 'lang' => 'NOTIFICATION_TYPE_REPORT',
+ 'group' => 'NOTIFICATION_GROUP_MODERATION',
+ );
+
+ /**
+ * Get the id of the parent
+ *
+ * @param array $pm The data from the pm
+ */
+ public static function get_item_parent_id($pm)
+ {
+ return (int) $pm['report_id'];
+ }
+
+ /**
+ * Is this type available to the current user (defines whether or not it will be shown in the UCP Edit notification options)
+ *
+ * @return bool True/False whether or not this is available to the user
+ */
+ public function is_available()
+ {
+ $m_approve = $this->auth->acl_getf($this->permission, true);
+
+ return (!empty($m_approve));
+ }
+
+
+ /**
+ * Find the users who want to receive notifications
+ * (copied from post_in_queue)
+ *
+ * @param array $post Data from the post
+ *
+ * @return array
+ */
+ public function find_users_for_notification($post, $options = array())
+ {
+ $options = array_merge(array(
+ 'ignore_users' => array(),
+ ), $options);
+
+ // Global
+ $post['forum_id'] = 0;
+
+ $auth_approve = $this->auth->acl_get_list(false, $this->permission, $post['forum_id']);
+
+ if (empty($auth_approve))
+ {
+ return array();
+ }
+
+ if (($key = array_search($this->user->data['user_id'], $auth_approve[$post['forum_id']][$this->permission])))
+ {
+ unset($auth_approve[$post['forum_id']][$this->permission][$key]);
+ }
+
+ return $this->check_user_notification_options($auth_approve[$post['forum_id']][$this->permission], array_merge($options, array(
+ 'item_type' => self::$notification_option['id'],
+ )));
+ }
+
+ /**
+ * Get email template
+ *
+ * @return string|bool
+ */
+ public function get_email_template()
+ {
+ return 'report_pm';
+ }
+
+ /**
+ * Get email template variables
+ *
+ * @return array
+ */
+ public function get_email_template_variables()
+ {
+ return array(
+ 'AUTHOR_NAME' => htmlspecialchars_decode($user_data['username']),
+ 'SUBJECT' => htmlspecialchars_decode(censor_text($this->get_data('message_subject'))),
+
+ 'U_VIEW_REPORT' => generate_board_url() . "mcp.{$this->php_ext}?r={$this->item_parent_id}&amp;i=pm_reports&amp;mode=pm_report_details",
+ );
+ }
+
+ /**
+ * Get the url to this item
+ *
+ * @return string URL
+ */
+ public function get_url()
+ {
+ return append_sid($this->phpbb_root_path . 'mcp.' . $this->php_ext, "r={$this->item_parent_id}&amp;i=pm_reports&amp;mode=pm_report_details");
+ }
+
+ /**
+ * Get the HTML formatted title of this notification
+ *
+ * @return string
+ */
+ public function get_title()
+ {
+ $this->user->add_lang('mcp');
+
+ $username = $this->user_loader->get_username($this->get_data('reporter_id'), 'no_profile');
+
+ if ($this->get_data('report_text'))
+ {
+ return $this->user->lang(
+ $this->language_key,
+ $username,
+ censor_text($this->get_data('message_subject')),
+ $this->get_data('report_text')
+ );
+ }
+
+ if (isset($this->user->lang[$this->get_data('reason_title')]))
+ {
+ return $this->user->lang(
+ $this->language_key,
+ $username,
+ censor_text($this->get_data('message_subject')),
+ $this->user->lang[$this->get_data('reason_title')]
+ );
+ }
+
+ return $this->user->lang(
+ $this->language_key,
+ $username,
+ censor_text($this->get_data('message_subject')),
+ $this->get_data('reason_description')
+ );
+ }
+
+ /**
+ * Get the user's avatar
+ */
+ public function get_avatar()
+ {
+ return $this->user_loader->get_avatar($this->get_data('reporter_id'));
+ }
+
+ /**
+ * Users needed to query before this notification can be displayed
+ *
+ * @return array Array of user_ids
+ */
+ public function users_to_query()
+ {
+ return array($this->get_data('reporter_id'));
+ }
+
+ /**
+ * Function for preparing the data for insertion in an SQL query
+ * (The service handles insertion)
+ *
+ * @param array $post Data from submit_post
+ * @param array $pre_create_data Data from pre_create_insert_array()
+ *
+ * @return array Array of data ready to be inserted into the database
+ */
+ public function create_insert_array($post, $pre_create_data = array())
+ {
+ $this->set_data('reporter_id', $this->user->data['user_id']);
+ $this->set_data('reason_title', strtoupper($post['reason_title']));
+ $this->set_data('reason_description', $post['reason_description']);
+ $this->set_data('report_text', $post['report_text']);
+
+ return parent::create_insert_array($post, $pre_create_data);
+ }
+}
diff --git a/phpBB/phpbb/notification/type/report_pm_closed.php b/phpBB/phpbb/notification/type/report_pm_closed.php
new file mode 100644
index 0000000000..56485f5d37
--- /dev/null
+++ b/phpBB/phpbb/notification/type/report_pm_closed.php
@@ -0,0 +1,149 @@
+<?php
+/**
+*
+* @package notifications
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\notification\type;
+
+/**
+* PM report closed notifications class
+* This class handles notifications for when reports are closed on PMs (for the one who reported the PM)
+*
+* @package notifications
+*/
+class report_pm_closed extends \phpbb\notification\type\pm
+{
+ /**
+ * Get notification type name
+ *
+ * @return string
+ */
+ public function get_type()
+ {
+ return 'report_pm_closed';
+ }
+
+ /**
+ * Email template to use to send notifications
+ *
+ * @var string
+ */
+ public $email_template = '';
+
+ /**
+ * Language key used to output the text
+ *
+ * @var string
+ */
+ protected $language_key = 'NOTIFICATION_REPORT_CLOSED';
+
+ public function is_available()
+ {
+ return false;
+ }
+
+ /**
+ * Find the users who want to receive notifications
+ *
+ * @param array $pm Data from
+ *
+ * @return array
+ */
+ public function find_users_for_notification($pm, $options = array())
+ {
+ if ($pm['reporter'] == $this->user->data['user_id'])
+ {
+ return array();
+ }
+
+ return array($pm['reporter'] => array(''));
+ }
+
+ /**
+ * Get email template
+ *
+ * @return string|bool
+ */
+ public function get_email_template()
+ {
+ return false;
+ }
+
+ /**
+ * Get email template variables
+ *
+ * @return array
+ */
+ public function get_email_template_variables()
+ {
+ return array();
+ }
+
+ /**
+ * Get the url to this item
+ *
+ * @return string URL
+ */
+ public function get_url()
+ {
+ return '';
+ }
+
+ /**
+ * Get the HTML formatted title of this notification
+ *
+ * @return string
+ */
+ public function get_title()
+ {
+ $username = $this->user_loader->get_username($this->get_data('closer_id'), 'no_profile');
+
+ return $this->user->lang(
+ $this->language_key,
+ $username,
+ censor_text($this->get_data('message_subject'))
+ );
+ }
+
+ /**
+ * Get the user's avatar
+ */
+ public function get_avatar()
+ {
+ return $this->user_loader->get_avatar($this->get_data('closer_id'));
+ }
+
+ /**
+ * Users needed to query before this notification can be displayed
+ *
+ * @return array Array of user_ids
+ */
+ public function users_to_query()
+ {
+ return array($this->get_data('closer_id'));
+ }
+
+ /**
+ * Function for preparing the data for insertion in an SQL query
+ * (The service handles insertion)
+ *
+ * @param array $pm PM Data
+ * @param array $pre_create_data Data from pre_create_insert_array()
+ *
+ * @return array Array of data ready to be inserted into the database
+ */
+ public function create_insert_array($pm, $pre_create_data = array())
+ {
+ $this->set_data('closer_id', $pm['closer_id']);
+
+ $data = parent::create_insert_array($pm, $pre_create_data);
+
+ $this->notification_time = $data['notification_time'] = time();
+
+ return $data;
+ }
+}
diff --git a/phpBB/phpbb/notification/type/report_post.php b/phpBB/phpbb/notification/type/report_post.php
new file mode 100644
index 0000000000..9bf035b91e
--- /dev/null
+++ b/phpBB/phpbb/notification/type/report_post.php
@@ -0,0 +1,197 @@
+<?php
+/**
+*
+* @package notifications
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\notification\type;
+
+/**
+* Reported post notifications class
+* This class handles notifications for reported posts
+*
+* @package notifications
+*/
+class report_post extends \phpbb\notification\type\post_in_queue
+{
+ /**
+ * Get notification type name
+ *
+ * @return string
+ */
+ public function get_type()
+ {
+ return 'report_post';
+ }
+
+ /**
+ * Language key used to output the text
+ *
+ * @var string
+ */
+ protected $language_key = 'NOTIFICATION_REPORT_POST';
+
+ /**
+ * Inherit notification read status from post.
+ *
+ * @var bool
+ */
+ protected $inherit_read_status = false;
+
+ /**
+ * Permission to check for (in find_users_for_notification)
+ *
+ * @var string Permission name
+ */
+ protected $permission = 'm_report';
+
+ /**
+ * Notification option data (for outputting to the user)
+ *
+ * @var bool|array False if the service should use it's default data
+ * Array of data (including keys 'id' and 'lang')
+ */
+ public static $notification_option = array(
+ 'id' => 'report',
+ 'lang' => 'NOTIFICATION_TYPE_REPORT',
+ 'group' => 'NOTIFICATION_GROUP_MODERATION',
+ );
+
+ /**
+ * Find the users who want to receive notifications
+ *
+ * @param array $post Data from the post
+ *
+ * @return array
+ */
+ public function find_users_for_notification($post, $options = array())
+ {
+ $notify_users = parent::find_users_for_notification($post, $options);
+
+ // never notify reporter
+ unset($notify_users[$this->user->data['user_id']]);
+
+ return $notify_users;
+ }
+
+ /**
+ * Get email template
+ *
+ * @return string|bool
+ */
+ public function get_email_template()
+ {
+ return 'report_post';
+ }
+
+ /**
+ * Get email template variables
+ *
+ * @return array
+ */
+ public function get_email_template_variables()
+ {
+ $board_url = generate_board_url();
+
+ return array(
+ 'POST_SUBJECT' => htmlspecialchars_decode(censor_text($this->get_data('post_subject'))),
+ 'TOPIC_TITLE' => htmlspecialchars_decode(censor_text($this->get_data('topic_title'))),
+
+ 'U_VIEW_REPORT' => "{$board_url}/mcp.{$this->php_ext}?f={$this->get_data('forum_id')}&amp;p={$this->item_id}&amp;i=reports&amp;mode=report_details#reports",
+ 'U_VIEW_POST' => "{$board_url}/viewtopic.{$this->php_ext}?p={$this->item_id}#p{$this->item_id}",
+ 'U_NEWEST_POST' => "{$board_url}/viewtopic.{$this->php_ext}?f={$this->get_data('forum_id')}&t={$this->item_parent_id}&view=unread#unread",
+ 'U_TOPIC' => "{$board_url}/viewtopic.{$this->php_ext}?f={$this->get_data('forum_id')}&t={$this->item_parent_id}",
+ 'U_VIEW_TOPIC' => "{$board_url}/viewtopic.{$this->php_ext}?f={$this->get_data('forum_id')}&t={$this->item_parent_id}",
+ 'U_FORUM' => "{$board_url}/viewforum.{$this->php_ext}?f={$this->get_data('forum_id')}",
+ );
+ }
+
+ /**
+ * Get the url to this item
+ *
+ * @return string URL
+ */
+ public function get_url()
+ {
+ return append_sid($this->phpbb_root_path . 'mcp.' . $this->php_ext, "f={$this->get_data('forum_id')}&amp;p={$this->item_id}&amp;i=reports&amp;mode=report_details#reports");
+ }
+
+ /**
+ * Get the HTML formatted title of this notification
+ *
+ * @return string
+ */
+ public function get_title()
+ {
+ $this->user->add_lang('mcp');
+
+ $username = $this->user_loader->get_username($this->get_data('reporter_id'), 'no_profile');
+
+ if ($this->get_data('report_text'))
+ {
+ return $this->user->lang(
+ $this->language_key,
+ $username,
+ censor_text($this->get_data('post_subject')),
+ $this->get_data('report_text')
+ );
+ }
+
+ if (isset($this->user->lang[$this->get_data('reason_title')]))
+ {
+ return $this->user->lang(
+ $this->language_key,
+ $username,
+ censor_text($this->get_data('post_subject')),
+ $this->user->lang[$this->get_data('reason_title')]
+ );
+ }
+
+ return $this->user->lang(
+ $this->language_key,
+ $username,
+ censor_text($this->get_data('post_subject')),
+ $this->get_data('reason_description')
+ );
+ }
+
+ /**
+ * Get the user's avatar
+ */
+ public function get_avatar()
+ {
+ return $this->user_loader->get_avatar($this->get_data('reporter_id'));
+ }
+
+ /**
+ * Users needed to query before this notification can be displayed
+ *
+ * @return array Array of user_ids
+ */
+ public function users_to_query()
+ {
+ return array($this->get_data('reporter_id'));
+ }
+
+ /**
+ * Function for preparing the data for insertion in an SQL query
+ * (The service handles insertion)
+ *
+ * @param array $post Data from submit_post
+ * @param array $pre_create_data Data from pre_create_insert_array()
+ *
+ * @return array Array of data ready to be inserted into the database
+ */
+ public function create_insert_array($post, $pre_create_data = array())
+ {
+ $this->set_data('reporter_id', $this->user->data['user_id']);
+ $this->set_data('reason_title', strtoupper($post['reason_title']));
+ $this->set_data('reason_description', $post['reason_description']);
+ $this->set_data('report_text', $post['report_text']);
+
+ return parent::create_insert_array($post, $pre_create_data);
+ }
+}
diff --git a/phpBB/phpbb/notification/type/report_post_closed.php b/phpBB/phpbb/notification/type/report_post_closed.php
new file mode 100644
index 0000000000..fff45612b3
--- /dev/null
+++ b/phpBB/phpbb/notification/type/report_post_closed.php
@@ -0,0 +1,156 @@
+<?php
+/**
+*
+* @package notifications
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\notification\type;
+
+/**
+* Post report closed notifications class
+* This class handles notifications for when reports are closed on posts (for the one who reported the post)
+*
+* @package notifications
+*/
+class report_post_closed extends \phpbb\notification\type\post
+{
+ /**
+ * Get notification type name
+ *
+ * @return string
+ */
+ public function get_type()
+ {
+ return 'report_post_closed';
+ }
+
+ /**
+ * Email template to use to send notifications
+ *
+ * @var string
+ */
+ public $email_template = '';
+
+ /**
+ * Language key used to output the text
+ *
+ * @var string
+ */
+ protected $language_key = 'NOTIFICATION_REPORT_CLOSED';
+
+ /**
+ * Inherit notification read status from post.
+ *
+ * @var bool
+ */
+ protected $inherit_read_status = false;
+
+ public function is_available()
+ {
+ return false;
+ }
+
+ /**
+ * Find the users who want to receive notifications
+ *
+ * @param array $post Data from
+ *
+ * @return array
+ */
+ public function find_users_for_notification($post, $options = array())
+ {
+ if ($post['reporter'] == $this->user->data['user_id'])
+ {
+ return array();
+ }
+
+ return array($post['reporter'] => array(''));
+ }
+
+ /**
+ * Get email template
+ *
+ * @return string|bool
+ */
+ public function get_email_template()
+ {
+ return false;
+ }
+
+ /**
+ * Get email template variables
+ *
+ * @return array
+ */
+ public function get_email_template_variables()
+ {
+ return array();
+ }
+
+ /**
+ * Get the url to this item
+ *
+ * @return string URL
+ */
+ public function get_url()
+ {
+ return '';
+ }
+
+ /**
+ * Get the HTML formatted title of this notification
+ *
+ * @return string
+ */
+ public function get_title()
+ {
+ $username = $this->user_loader->get_username($this->get_data('closer_id'), 'no_profile');
+
+ return $this->user->lang(
+ $this->language_key,
+ $username,
+ censor_text($this->get_data('post_subject'))
+ );
+ }
+
+ /**
+ * Get the user's avatar
+ */
+ public function get_avatar()
+ {
+ return $this->user_loader->get_avatar($this->get_data('closer_id'));
+ }
+
+ /**
+ * Users needed to query before this notification can be displayed
+ *
+ * @return array Array of user_ids
+ */
+ public function users_to_query()
+ {
+ return array($this->get_data('closer_id'));
+ }
+
+ /**
+ * Function for preparing the data for insertion in an SQL query
+ * (The service handles insertion)
+ *
+ * @param array $post Data from submit_post
+ * @param array $pre_create_data Data from pre_create_insert_array()
+ *
+ * @return array Array of data ready to be inserted into the database
+ */
+ public function create_insert_array($post, $pre_create_data = array())
+ {
+ $this->set_data('closer_id', $post['closer_id']);
+
+ $data = parent::create_insert_array($post, $pre_create_data);
+
+ $this->notification_time = $data['notification_time'] = time();
+
+ return $data;
+ }
+}
diff --git a/phpBB/phpbb/notification/type/topic.php b/phpBB/phpbb/notification/type/topic.php
new file mode 100644
index 0000000000..635d05bccd
--- /dev/null
+++ b/phpBB/phpbb/notification/type/topic.php
@@ -0,0 +1,278 @@
+<?php
+/**
+*
+* @package notifications
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\notification\type;
+
+/**
+* Topic notifications class
+* This class handles notifications for new topics
+*
+* @package notifications
+*/
+class topic extends \phpbb\notification\type\base
+{
+ /**
+ * Get notification type name
+ *
+ * @return string
+ */
+ public function get_type()
+ {
+ return 'topic';
+ }
+
+ /**
+ * Language key used to output the text
+ *
+ * @var string
+ */
+ protected $language_key = 'NOTIFICATION_TOPIC';
+
+ /**
+ * Inherit notification read status from topic.
+ *
+ * @var bool
+ */
+ protected $inherit_read_status = true;
+
+ /**
+ * Notification option data (for outputting to the user)
+ *
+ * @var bool|array False if the service should use it's default data
+ * Array of data (including keys 'id', 'lang', and 'group')
+ */
+ public static $notification_option = array(
+ 'lang' => 'NOTIFICATION_TYPE_TOPIC',
+ 'group' => 'NOTIFICATION_GROUP_POSTING',
+ );
+
+ /**
+ * Is available
+ */
+ public function is_available()
+ {
+ return $this->config['allow_forum_notify'];
+ }
+
+ /**
+ * Get the id of the item
+ *
+ * @param array $post The data from the post
+ */
+ public static function get_item_id($post)
+ {
+ return (int) $post['topic_id'];
+ }
+
+ /**
+ * Get the id of the parent
+ *
+ * @param array $post The data from the post
+ */
+ public static function get_item_parent_id($post)
+ {
+ return (int) $post['forum_id'];
+ }
+
+ /**
+ * Find the users who want to receive notifications
+ *
+ * @param array $topic Data from the topic
+ *
+ * @return array
+ */
+ public function find_users_for_notification($topic, $options = array())
+ {
+ $options = array_merge(array(
+ 'ignore_users' => array(),
+ ), $options);
+
+ $users = array();
+
+ $sql = 'SELECT user_id
+ FROM ' . FORUMS_WATCH_TABLE . '
+ WHERE forum_id = ' . (int) $topic['forum_id'] . '
+ AND notify_status = ' . NOTIFY_YES . '
+ AND user_id <> ' . (int) $topic['poster_id'];
+ $result = $this->db->sql_query($sql);
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ $users[] = (int) $row['user_id'];
+ }
+ $this->db->sql_freeresult($result);
+
+ if (empty($users))
+ {
+ return array();
+ }
+
+ $auth_read = $this->auth->acl_get_list($users, 'f_read', $topic['forum_id']);
+
+ if (empty($auth_read))
+ {
+ return array();
+ }
+
+ return $this->check_user_notification_options($auth_read[$topic['forum_id']]['f_read'], $options);
+ }
+
+ /**
+ * Get the user's avatar
+ */
+ public function get_avatar()
+ {
+ return $this->user_loader->get_avatar($this->get_data('poster_id'));
+ }
+
+ /**
+ * Get the HTML formatted title of this notification
+ *
+ * @return string
+ */
+ public function get_title()
+ {
+ if ($this->get_data('post_username'))
+ {
+ $username = $this->get_data('post_username');
+ }
+ else
+ {
+ $username = $this->user_loader->get_username($this->get_data('poster_id'), 'no_profile');
+ }
+
+ return $this->user->lang(
+ $this->language_key,
+ $username,
+ censor_text($this->get_data('topic_title')),
+ $this->get_data('forum_name')
+ );
+ }
+
+ /**
+ * Get email template
+ *
+ * @return string|bool
+ */
+ public function get_email_template()
+ {
+ return 'newtopic_notify';
+ }
+
+ /**
+ * Get email template variables
+ *
+ * @return array
+ */
+ public function get_email_template_variables()
+ {
+ $board_url = generate_board_url();
+
+ if ($this->get_data('post_username'))
+ {
+ $username = $this->get_data('post_username');
+ }
+ else
+ {
+ $username = $this->user_loader->get_username($this->get_data('poster_id'), 'username');
+ }
+
+ return array(
+ 'AUTHOR_NAME' => htmlspecialchars_decode($username),
+ 'FORUM_NAME' => htmlspecialchars_decode($this->get_data('forum_name')),
+ 'TOPIC_TITLE' => htmlspecialchars_decode(censor_text($this->get_data('topic_title'))),
+
+ 'U_TOPIC' => "{$board_url}/viewtopic.{$this->php_ext}?f={$this->item_parent_id}&t={$this->item_id}",
+ 'U_VIEW_TOPIC' => "{$board_url}/viewtopic.{$this->php_ext}?f={$this->item_parent_id}&t={$this->item_id}",
+ 'U_FORUM' => "{$board_url}/viewforum.{$this->php_ext}?f={$this->item_parent_id}",
+ 'U_STOP_WATCHING_FORUM' => "{$board_url}/viewforum.{$this->php_ext}?uid={$this->user_id}&f={$this->item_parent_id}&unwatch=forum",
+ );
+ }
+
+ /**
+ * Get the url to this item
+ *
+ * @return string URL
+ */
+ public function get_url()
+ {
+ return append_sid($this->phpbb_root_path . 'viewtopic.' . $this->php_ext, "f={$this->item_parent_id}&amp;t={$this->item_id}");
+ }
+
+ /**
+ * Users needed to query before this notification can be displayed
+ *
+ * @return array Array of user_ids
+ */
+ public function users_to_query()
+ {
+ return array($this->get_data('poster_id'));
+ }
+
+ /**
+ * Pre create insert array function
+ * This allows you to perform certain actions, like run a query
+ * and load data, before create_insert_array() is run. The data
+ * returned from this function will be sent to create_insert_array().
+ *
+ * @param array $post Post data from submit_post
+ * @param array $notify_users Notify users list
+ * Formated from find_users_for_notification()
+ * @return array Whatever you want to send to create_insert_array().
+ */
+ public function pre_create_insert_array($post, $notify_users)
+ {
+ if (!sizeof($notify_users) || !$this->inherit_read_status)
+ {
+ return array();
+ }
+
+ $tracking_data = array();
+ $sql = 'SELECT user_id, mark_time FROM ' . TOPICS_TRACK_TABLE . '
+ WHERE topic_id = ' . (int) $post['topic_id'] . '
+ AND ' . $this->db->sql_in_set('user_id', array_keys($notify_users));
+ $result = $this->db->sql_query($sql);
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ $tracking_data[$row['user_id']] = $row['mark_time'];
+ }
+
+ return $tracking_data;
+ }
+
+ /**
+ * Function for preparing the data for insertion in an SQL query
+ * (The service handles insertion)
+ *
+ * @param array $post Data from submit_post
+ * @param array $pre_create_data Data from pre_create_insert_array()
+ *
+ * @return array Array of data ready to be inserted into the database
+ */
+ public function create_insert_array($post, $pre_create_data = array())
+ {
+ $this->set_data('poster_id', $post['poster_id']);
+
+ $this->set_data('topic_title', $post['topic_title']);
+
+ $this->set_data('post_username', (($post['poster_id'] == ANONYMOUS) ? $post['post_username'] : ''));
+
+ $this->set_data('forum_name', $post['forum_name']);
+
+ $this->notification_time = $post['post_time'];
+
+ // Topics can be "read" before they are public (while awaiting approval).
+ // Make sure that if the user has read the topic, it's marked as read in the notification
+ if ($this->inherit_read_status && isset($pre_create_data[$this->user_id]) && $pre_create_data[$this->user_id] >= $this->notification_time)
+ {
+ $this->notification_read = true;
+ }
+
+ return parent::create_insert_array($post, $pre_create_data);
+ }
+}
diff --git a/phpBB/phpbb/notification/type/topic_in_queue.php b/phpBB/phpbb/notification/type/topic_in_queue.php
new file mode 100644
index 0000000000..c8c1b5b7e2
--- /dev/null
+++ b/phpBB/phpbb/notification/type/topic_in_queue.php
@@ -0,0 +1,148 @@
+<?php
+/**
+*
+* @package notifications
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\notification\type;
+
+/**
+* Topic in queue notifications class
+* This class handles notifications for topics when they are put in the moderation queue (for moderators)
+*
+* @package notifications
+*/
+class topic_in_queue extends \phpbb\notification\type\topic
+{
+ /**
+ * Get notification type name
+ *
+ * @return string
+ */
+ public function get_type()
+ {
+ return 'topic_in_queue';
+ }
+
+ /**
+ * Language key used to output the text
+ *
+ * @var string
+ */
+ protected $language_key = 'NOTIFICATION_TOPIC_IN_QUEUE';
+
+ /**
+ * Notification option data (for outputting to the user)
+ *
+ * @var bool|array False if the service should use it's default data
+ * Array of data (including keys 'id', 'lang', and 'group')
+ */
+ public static $notification_option = array(
+ 'id' => 'needs_approval',
+ 'lang' => 'NOTIFICATION_TYPE_IN_MODERATION_QUEUE',
+ 'group' => 'NOTIFICATION_GROUP_MODERATION',
+ );
+
+ /**
+ * Permission to check for (in find_users_for_notification)
+ *
+ * @var string Permission name
+ */
+ protected $permission = 'm_approve';
+
+ /**
+ * Is available
+ */
+ public function is_available()
+ {
+ $has_permission = $this->auth->acl_getf($this->permission, true);
+
+ return (!empty($has_permission));
+ }
+
+ /**
+ * Find the users who want to receive notifications
+ *
+ * @param array $topic Data from the topic
+ *
+ * @return array
+ */
+ public function find_users_for_notification($topic, $options = array())
+ {
+ $options = array_merge(array(
+ 'ignore_users' => array(),
+ ), $options);
+
+ // 0 is for global moderator permissions
+ $auth_approve = $this->auth->acl_get_list(false, 'm_approve', array($topic['forum_id'], 0));
+
+ if (empty($auth_approve))
+ {
+ return array();
+ }
+
+ $has_permission = array();
+
+ if (isset($auth_approve[$topic['forum_id']][$this->permission]))
+ {
+ $has_permission = $auth_approve[$topic['forum_id']][$this->permission];
+ }
+
+ if (isset($auth_approve[0][$this->permission]))
+ {
+ $has_permission = array_unique(array_merge($has_permission, $auth_approve[0][$this->permission]));
+ }
+ sort($has_permission);
+
+ $auth_read = $this->auth->acl_get_list($has_permission, 'f_read', $topic['forum_id']);
+ if (empty($auth_read))
+ {
+ return array();
+ }
+
+ return $this->check_user_notification_options($auth_read[$topic['forum_id']]['f_read'], array_merge($options, array(
+ 'item_type' => self::$notification_option['id'],
+ )));
+ }
+
+ /**
+ * Get the url to this item
+ *
+ * @return string URL
+ */
+ public function get_url()
+ {
+ return append_sid($this->phpbb_root_path . 'mcp.' . $this->php_ext, "i=queue&amp;mode=approve_details&amp;f={$this->item_parent_id}&amp;t={$this->item_id}");
+ }
+
+ /**
+ * Function for preparing the data for insertion in an SQL query
+ * (The service handles insertion)
+ *
+ * @param array $topic Data from submit_post
+ * @param array $pre_create_data Data from pre_create_insert_array()
+ *
+ * @return array Array of data ready to be inserted into the database
+ */
+ public function create_insert_array($topic, $pre_create_data = array())
+ {
+ $data = parent::create_insert_array($topic, $pre_create_data);
+
+ $this->notification_time = $data['notification_time'] = time();
+
+ return $data;
+ }
+
+ /**
+ * Get email template
+ *
+ * @return string|bool
+ */
+ public function get_email_template()
+ {
+ return 'topic_in_queue';
+ }
+}
diff --git a/phpBB/phpbb/notification/type/type_interface.php b/phpBB/phpbb/notification/type/type_interface.php
new file mode 100644
index 0000000000..e3e6898172
--- /dev/null
+++ b/phpBB/phpbb/notification/type/type_interface.php
@@ -0,0 +1,183 @@
+<?php
+/**
+*
+* @package notifications
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\notification\type;
+
+/**
+* Base notifications interface
+* @package notifications
+*/
+interface type_interface
+{
+ /**
+ * Get notification type name
+ *
+ * @return string
+ */
+ public function get_type();
+
+ /**
+ * Set initial data from the database
+ *
+ * @param array $data Row directly from the database
+ */
+ public function set_initial_data($data);
+
+ /**
+ * Get the id of the item
+ *
+ * @param array $type_data The type specific data
+ */
+ public static function get_item_id($type_data);
+
+ /**
+ * Get the id of the parent
+ *
+ * @param array $type_data The type specific data
+ */
+ public static function get_item_parent_id($type_data);
+
+ /**
+ * Is this type available to the current user (defines whether or not it will be shown in the UCP Edit notification options)
+ *
+ * @return bool True/False whether or not this is available to the user
+ */
+ public function is_available();
+
+ /**
+ * Find the users who want to receive notifications
+ *
+ * @param array $type_data The type specific data
+ * @param array $options Options for finding users for notification
+ * ignore_users => array of users and user types that should not receive notifications from this type because they've already been notified
+ * e.g.: array(2 => array(''), 3 => array('', 'email'), ...)
+ *
+ * @return array
+ */
+ public function find_users_for_notification($type_data, $options);
+
+ /**
+ * Users needed to query before this notification can be displayed
+ *
+ * @return array Array of user_ids
+ */
+ public function users_to_query();
+
+ /**
+ * Get the special items to load
+ *
+ * @return array Data will be combined sent to load_special() so you can run a single query and get data required for this notification type
+ */
+ public function get_load_special();
+
+ /**
+ * Load the special items
+ *
+ * @param array $data Data from get_load_special()
+ * @param array $notifications Array of notifications (key is notification_id, value is the notification objects)
+ */
+ public function load_special($data, $notifications);
+
+ /**
+ * Get the HTML formatted title of this notification
+ *
+ * @return string
+ */
+ public function get_title();
+
+ /**
+ * Get the url to this item
+ *
+ * @return string URL
+ */
+ public function get_url();
+
+ /**
+ * URL to unsubscribe to this notification
+ *
+ * @param string|bool $method Method name to unsubscribe from (email|jabber|etc), False to unsubscribe from all notifications for this item
+ */
+ public function get_unsubscribe_url($method);
+
+ /**
+ * Get the user's avatar (the user who caused the notification typically)
+ *
+ * @return string
+ */
+ public function get_avatar();
+
+ /**
+ * Prepare to output the notification to the template
+ */
+ public function prepare_for_display();
+
+ /**
+ * Get email template
+ *
+ * @return string|bool
+ */
+ public function get_email_template();
+
+ /**
+ * Get email template variables
+ *
+ * @return array
+ */
+ public function get_email_template_variables();
+
+ /**
+ * Pre create insert array function
+ * This allows you to perform certain actions, like run a query
+ * and load data, before create_insert_array() is run. The data
+ * returned from this function will be sent to create_insert_array().
+ *
+ * @param array $type_data The type specific data
+ * @param array $notify_users Notify users list
+ * Formated from find_users_for_notification()
+ * @return array Whatever you want to send to create_insert_array().
+ */
+ public function pre_create_insert_array($type_data, $notify_users);
+
+ /**
+ * Function for preparing the data for insertion in an SQL query
+ * (The service handles insertion)
+ *
+ * @param array $type_data The type specific data
+ * @param array $pre_create_data Data from pre_create_insert_array()
+ *
+ * @return array Array of data ready to be inserted into the database
+ */
+ public function create_insert_array($type_data, $pre_create_data);
+
+ /**
+ * Function for preparing the data for update in an SQL query
+ * (The service handles insertion)
+ *
+ * @param array $type_data Data unique to this notification type
+ *
+ * @return array Array of data ready to be updated in the database
+ */
+ public function create_update_array($type_data);
+
+ /**
+ * Mark this item read
+ *
+ * @param bool $return True to return a string containing the SQL code to update this item, False to execute it (Default: False)
+ * @return string
+ */
+ public function mark_read($return);
+
+ /**
+ * Mark this item unread
+ *
+ * @param bool $return True to return a string containing the SQL code to update this item, False to execute it (Default: False)
+ * @return string
+ */
+ public function mark_unread($return);
+}
diff --git a/phpBB/phpbb/pagination.php b/phpBB/phpbb/pagination.php
new file mode 100644
index 0000000000..6a7631c89d
--- /dev/null
+++ b/phpBB/phpbb/pagination.php
@@ -0,0 +1,315 @@
+<?php
+/**
+*
+* @package phpbb
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb;
+
+class pagination
+{
+ /** @var \phpbb\template\template */
+ protected $template;
+
+ /** @var \phpbb\user */
+ protected $user;
+
+ /**
+ * Constructor
+ *
+ * @param \phpbb\template\template $template
+ * @param \phpbb\user $user
+ * @param \phpbb\controller\helper $helper
+ */
+ public function __construct(\phpbb\template\template $template, \phpbb\user $user, \phpbb\controller\helper $helper)
+ {
+ $this->template = $template;
+ $this->user = $user;
+ $this->helper = $helper;
+ }
+
+ /**
+ * Generate a pagination link based on the url and the page information
+ *
+ * @param string $base_url is url prepended to all links generated within the function
+ * If you use page numbers inside your controller route, base_url should contains a placeholder (%d)
+ * for the page. Also be sure to specify the pagination path information into the start_name argument
+ * @param string $on_page is the page for which we want to generate the link
+ * @param string $start_name is the name of the parameter containing the first item of the given page (example: start=20)
+ * If you use page numbers inside your controller route, start name should be the string
+ * that should be removed for the first page (example: /page/%d)
+ * @param int $per_page the number of items, posts, etc. to display per page, used to determine the number of pages to produce
+ * @return URL for the requested page
+ */
+ protected function generate_page_link($base_url, $on_page, $start_name, $per_page)
+ {
+ if (!is_string($base_url))
+ {
+ if (is_array($base_url['routes']))
+ {
+ $route = ($on_page > 1) ? $base_url['routes'][1] : $base_url['routes'][0];
+ }
+ else
+ {
+ $route = $base_url['routes'];
+ }
+ $params = (isset($base_url['params'])) ? $base_url['params'] : array();
+ $is_amp = (isset($base_url['is_amp'])) ? $base_url['is_amp'] : true;
+ $session_id = (isset($base_url['session_id'])) ? $base_url['session_id'] : false;
+
+ if ($on_page > 1 || !is_array($base_url['routes']))
+ {
+ $params[$start_name] = (int) $on_page;
+ }
+
+ return $this->helper->route($route, $params, $is_amp, $session_id);
+ }
+ else
+ {
+ $url_delim = (strpos($base_url, '?') === false) ? '?' : ((strpos($base_url, '?') === strlen($base_url) - 1) ? '' : '&amp;');
+ return ($on_page > 1) ? $base_url . $url_delim . $start_name . '=' . (($on_page - 1) * $per_page) : $base_url;
+ }
+ }
+
+ /**
+ * Generate template rendered pagination
+ * Allows full control of rendering of pagination with the template
+ *
+ * @param string $base_url is url prepended to all links generated within the function
+ * If you use page numbers inside your controller route, base_url should contains a placeholder (%d)
+ * for the page. Also be sure to specify the pagination path information into the start_name argument
+ * @param string $block_var_name is the name assigned to the pagination data block within the template (example: <!-- BEGIN pagination -->)
+ * @param string $start_name is the name of the parameter containing the first item of the given page (example: start=20)
+ * If you use page numbers inside your controller route, start name should be the string
+ * that should be removed for the first page (example: /page/%d)
+ * @param int $num_items the total number of items, posts, etc., used to determine the number of pages to produce
+ * @param int $per_page the number of items, posts, etc. to display per page, used to determine the number of pages to produce
+ * @param int $start the item which should be considered currently active, used to determine the page we're on
+ * @param bool $reverse_count determines whether we weight display of the list towards the start (false) or end (true) of the list
+ * @param bool $ignore_on_page decides whether we enable an active (unlinked) item, used primarily for embedded lists
+ * @return null
+ */
+ public function generate_template_pagination($base_url, $block_var_name, $start_name, $num_items, $per_page, $start = 1, $reverse_count = false, $ignore_on_page = false)
+ {
+ $total_pages = ceil($num_items / $per_page);
+ $on_page = $this->get_on_page($per_page, $start);
+ $u_previous_page = $u_next_page = '';
+
+ if ($total_pages > 1)
+ {
+ if ($reverse_count)
+ {
+ $start_page = ($total_pages > 5) ? $total_pages - 4 : 1;
+ $end_page = $total_pages;
+ }
+ else
+ {
+ // What we're doing here is calculating what the "start" and "end" pages should be. We
+ // do this by assuming pagination is "centered" around the currently active page with
+ // the three previous and three next page links displayed. Anything more than that and
+ // we display the ellipsis, likewise anything less.
+ //
+ // $start_page is the page at which we start creating the list. When we have five or less
+ // pages we start at page 1 since there will be no ellipsis displayed. Anymore than that
+ // and we calculate the start based on the active page. This is the min/max calculation.
+ // First (max) would we end up starting on a page less than 1? Next (min) would we end
+ // up starting so close to the end that we'd not display our minimum number of pages.
+ //
+ // $end_page is the last page in the list to display. Like $start_page we use a min/max to
+ // determine this number. Again at most five pages? Then just display them all. More than
+ // five and we first (min) determine whether we'd end up listing more pages than exist.
+ // We then (max) ensure we're displaying the minimum number of pages.
+ $start_page = ($total_pages > 5) ? min(max(1, $on_page - 3), $total_pages - 4) : 1;
+ $end_page = ($total_pages > 5) ? max(min($total_pages, $on_page + 3), 5) : $total_pages;
+ }
+
+ if ($on_page != 1)
+ {
+ $u_previous_page = $this->generate_page_link($base_url, $on_page - 1, $start_name, $per_page);
+
+ $this->template->assign_block_vars($block_var_name, array(
+ 'PAGE_NUMBER' => '',
+ 'PAGE_URL' => $u_previous_page,
+ 'S_IS_CURRENT' => false,
+ 'S_IS_PREV' => true,
+ 'S_IS_NEXT' => false,
+ 'S_IS_ELLIPSIS' => false,
+ ));
+ }
+
+ // This do...while exists purely to negate the need for start and end assign_block_vars, i.e.
+ // to display the first and last page in the list plus any ellipsis. We use this loop to jump
+ // around a little within the list depending on where we're starting (and ending).
+ $at_page = 1;
+ do
+ {
+ // We decide whether to display the ellipsis during the loop. The ellipsis is always
+ // displayed as either the second or penultimate item in the list. So are we at either
+ // of those points and of course do we even need to display it, i.e. is the list starting
+ // on at least page 3 and ending three pages before the final item.
+ $this->template->assign_block_vars($block_var_name, array(
+ 'PAGE_NUMBER' => $at_page,
+ 'PAGE_URL' => $this->generate_page_link($base_url, $at_page, $start_name, $per_page),
+ 'S_IS_CURRENT' => (!$ignore_on_page && $at_page == $on_page),
+ 'S_IS_NEXT' => false,
+ 'S_IS_PREV' => false,
+ 'S_IS_ELLIPSIS' => ($at_page == 2 && $start_page > 2) || ($at_page == $total_pages - 1 && $end_page < $total_pages - 1),
+ ));
+
+ // We may need to jump around in the list depending on whether we have or need to display
+ // the ellipsis. Are we on page 2 and are we more than one page away from the start
+ // of the list? Yes? Then we jump to the start of the list. Likewise are we at the end of
+ // the list and are there more than two pages left in total? Yes? Then jump to the penultimate
+ // page (so we can display the ellipsis next pass). Else, increment the counter and keep
+ // going
+ if ($at_page == 2 && $at_page < $start_page - 1)
+ {
+ $at_page = $start_page;
+ }
+ else if ($at_page == $end_page && $end_page < $total_pages - 1)
+ {
+ $at_page = $total_pages - 1;
+ }
+ else
+ {
+ $at_page++;
+ }
+ }
+ while ($at_page <= $total_pages);
+
+ if ($on_page != $total_pages)
+ {
+ $u_next_page = $this->generate_page_link($base_url, $on_page + 1, $start_name, $per_page);
+
+ $this->template->assign_block_vars($block_var_name, array(
+ 'PAGE_NUMBER' => '',
+ 'PAGE_URL' => $u_next_page,
+ 'S_IS_CURRENT' => false,
+ 'S_IS_PREV' => false,
+ 'S_IS_NEXT' => true,
+ 'S_IS_ELLIPSIS' => false,
+ ));
+ }
+ }
+
+ // If the block_var_name is a nested block, we will use the last (most
+ // inner) block as a prefix for the template variables. If the last block
+ // name is pagination, the prefix is empty. If the rest of the
+ // block_var_name is not empty, we will modify the last row of that block
+ // and add our pagination items.
+ $tpl_block_name = $tpl_prefix = '';
+ if (strrpos($block_var_name, '.') !== false)
+ {
+ $tpl_block_name = substr($block_var_name, 0, strrpos($block_var_name, '.'));
+ $tpl_prefix = strtoupper(substr($block_var_name, strrpos($block_var_name, '.') + 1));
+ }
+ else
+ {
+ $tpl_prefix = strtoupper($block_var_name);
+ }
+ $tpl_prefix = ($tpl_prefix == 'PAGINATION') ? '' : $tpl_prefix . '_';
+
+ $template_array = array(
+ $tpl_prefix . 'BASE_URL' => is_string($base_url) ? $base_url : '',//@todo: Fix this for routes
+ $tpl_prefix . 'START_NAME' => $start_name,
+ $tpl_prefix . 'PER_PAGE' => $per_page,
+ 'U_' . $tpl_prefix . 'PREVIOUS_PAGE' => ($on_page != 1) ? $u_previous_page : '',
+ 'U_' . $tpl_prefix . 'NEXT_PAGE' => ($on_page != $total_pages) ? $u_next_page : '',
+ $tpl_prefix . 'TOTAL_PAGES' => $total_pages,
+ $tpl_prefix . 'CURRENT_PAGE' => $on_page,
+ $tpl_prefix . 'PAGE_NUMBER' => $this->on_page($num_items, $per_page, $start),
+ );
+
+ if ($tpl_block_name)
+ {
+ $this->template->alter_block_array($tpl_block_name, $template_array, true, 'change');
+ }
+ else
+ {
+ $this->template->assign_vars($template_array);
+ }
+ }
+
+ /**
+ * Get current page number
+ *
+ * @param int $per_page the number of items, posts, etc. per page
+ * @param int $start the item which should be considered currently active, used to determine the page we're on
+ * @return int Current page number
+ */
+ public function get_on_page($per_page, $start)
+ {
+ return floor($start / $per_page) + 1;
+ }
+
+ /**
+ * Return current page
+ *
+ * @param int $num_items the total number of items, posts, topics, etc.
+ * @param int $per_page the number of items, posts, etc. per page
+ * @param int $start the item which should be considered currently active, used to determine the page we're on
+ * @return string Descriptive pagination string (e.g. "page 1 of 10")
+ */
+ public function on_page($num_items, $per_page, $start)
+ {
+ $on_page = $this->get_on_page($per_page, $start);
+ return $this->user->lang('PAGE_OF', $on_page, max(ceil($num_items / $per_page), 1));
+ }
+
+ /**
+ * Get current page number
+ *
+ * @param int $start the item which should be considered currently active, used to determine the page we're on
+ * @param int $per_page the number of items, posts, etc. per page
+ * @param int $num_items the total number of items, posts, topics, etc.
+ * @return int Current page number
+ */
+ public function validate_start($start, $per_page, $num_items)
+ {
+ if ($start < 0 || $start >= $num_items)
+ {
+ return ($start < 0 || $num_items <= 0) ? 0 : floor(($num_items - 1) / $per_page) * $per_page;
+ }
+
+ return $start;
+ }
+
+ /**
+ * Get new start when searching from the end
+ *
+ * If the user is trying to reach late pages, start searching from the end.
+ *
+ * @param int $start the item which should be considered currently active, used to determine the page we're on
+ * @param int $limit the number of items, posts, etc. to display
+ * @param int $num_items the total number of items, posts, topics, etc.
+ * @return int Current page number
+ */
+ public function reverse_start($start, $limit, $num_items)
+ {
+ return max(0, $num_items - $limit - $start);
+ }
+
+ /**
+ * Get new item limit when searching from the end
+ *
+ * If the user is trying to reach late pages, start searching from the end.
+ * In this case the items to display might be lower then the actual per_page setting.
+ *
+ * @param int $start the item which should be considered currently active, used to determine the page we're on
+ * @param int $per_page the number of items, posts, etc. per page
+ * @param int $num_items the total number of items, posts, topics, etc.
+ * @return int Current page number
+ */
+ public function reverse_limit($start, $per_page, $num_items)
+ {
+ if ($start + $per_page > $num_items)
+ {
+ return min($per_page, max(1, $num_items - $start));
+ }
+
+ return $per_page;
+ }
+}
diff --git a/phpBB/phpbb/passwords/driver/base.php b/phpBB/phpbb/passwords/driver/base.php
new file mode 100644
index 0000000000..8256fd721c
--- /dev/null
+++ b/phpBB/phpbb/passwords/driver/base.php
@@ -0,0 +1,45 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\passwords\driver;
+
+/**
+* @package passwords
+*/
+abstract class base implements driver_interface
+{
+ /** @var phpbb\config\config */
+ protected $config;
+
+ /** @var phpbb\passwords\driver\helper */
+ protected $helper;
+
+ /** @var driver name */
+ protected $name;
+
+ /**
+ * Constructor of passwords driver object
+ *
+ * @param \phpbb\config\config $config phpBB config
+ * @param \phpbb\passwords\driver\helper $helper Password driver helper
+ */
+ public function __construct(\phpbb\config\config $config, helper $helper)
+ {
+ $this->config = $config;
+ $this->helper = $helper;
+ }
+
+ /**
+ * @inheritdoc
+ */
+ public function is_supported()
+ {
+ return true;
+ }
+}
diff --git a/phpBB/phpbb/passwords/driver/bcrypt.php b/phpBB/phpbb/passwords/driver/bcrypt.php
new file mode 100644
index 0000000000..1d1b1e267d
--- /dev/null
+++ b/phpBB/phpbb/passwords/driver/bcrypt.php
@@ -0,0 +1,104 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\passwords\driver;
+
+/**
+* @package passwords
+*/
+class bcrypt extends base
+{
+ const PREFIX = '$2a$';
+
+ /**
+ * @inheritdoc
+ */
+ public function get_prefix()
+ {
+ return self::PREFIX;
+ }
+
+ /**
+ * @inheritdoc
+ */
+ public function hash($password, $salt = '')
+ {
+ // The 2x and 2y prefixes of bcrypt might not be supported
+ // Revert to 2a if this is the case
+ $prefix = (!$this->is_supported()) ? '$2a$' : $this->get_prefix();
+
+ // Do not support 8-bit characters with $2a$ bcrypt
+ // Also see http://www.php.net/security/crypt_blowfish.php
+ if ($prefix === self::PREFIX)
+ {
+ if (ord($password[strlen($password)-1]) & 128)
+ {
+ return false;
+ }
+ }
+
+ if ($salt == '')
+ {
+ $salt = $prefix . '10$' . $this->get_random_salt();
+ }
+
+ $hash = crypt($password, $salt);
+ if (strlen($hash) < 60)
+ {
+ return false;
+ }
+ return $hash;
+ }
+
+ /**
+ * @inheritdoc
+ */
+ public function check($password, $hash)
+ {
+ $salt = substr($hash, 0, 29);
+ if (strlen($salt) != 29)
+ {
+ return false;
+ }
+
+ if ($hash == $this->hash($password, $salt))
+ {
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * Get a random salt value with a length of 22 characters
+ *
+ * @return string Salt for password hashing
+ */
+ protected function get_random_salt()
+ {
+ return $this->helper->hash_encode64($this->helper->get_random_salt(22), 22);
+ }
+
+ /**
+ * @inheritdoc
+ */
+ public function get_settings_only($hash, $full = false)
+ {
+ if ($full)
+ {
+ $pos = stripos($hash, '$', 1) + 1;
+ $length = 22 + (strripos($hash, '$') + 1 - $pos);
+ }
+ else
+ {
+ $pos = strripos($hash, '$') + 1;
+ $length = 22;
+ }
+ return substr($hash, $pos, $length);
+ }
+}
diff --git a/phpBB/phpbb/passwords/driver/bcrypt_2y.php b/phpBB/phpbb/passwords/driver/bcrypt_2y.php
new file mode 100644
index 0000000000..11c3617e49
--- /dev/null
+++ b/phpBB/phpbb/passwords/driver/bcrypt_2y.php
@@ -0,0 +1,34 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\passwords\driver;
+
+/**
+* @package passwords
+*/
+class bcrypt_2y extends bcrypt
+{
+ const PREFIX = '$2y$';
+
+ /**
+ * @inheritdoc
+ */
+ public function get_prefix()
+ {
+ return self::PREFIX;
+ }
+
+ /**
+ * @inheritdoc
+ */
+ public function is_supported()
+ {
+ return (version_compare(PHP_VERSION, '5.3.7', '<')) ? false : true;
+ }
+}
diff --git a/phpBB/phpbb/passwords/driver/driver_interface.php b/phpBB/phpbb/passwords/driver/driver_interface.php
new file mode 100644
index 0000000000..ebaf0626af
--- /dev/null
+++ b/phpBB/phpbb/passwords/driver/driver_interface.php
@@ -0,0 +1,60 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\passwords\driver;
+
+/**
+* @package passwords
+*/
+interface driver_interface
+{
+ /**
+ * Check if hash type is supported
+ *
+ * @return bool True if supported, false if not
+ */
+ public function is_supported();
+
+ /**
+ * Returns the hash prefix
+ *
+ * @return string Hash prefix
+ */
+ public function get_prefix();
+
+ /**
+ * Hash the password
+ *
+ * @param string $password The password that should be hashed
+ *
+ * @return bool|string Password hash or false if something went wrong
+ * during hashing
+ */
+ public function hash($password);
+
+ /**
+ * Check the password against the supplied hash
+ *
+ * @param string $password The password to check
+ * @param string $hash The password hash to check against
+ *
+ * @return bool True if password is correct, else false
+ */
+ public function check($password, $hash);
+
+ /**
+ * Get only the settings of the specified hash
+ *
+ * @param string $hash Password hash
+ * @param bool $full Return full settings or only settings
+ * related to the salt
+ * @return string String containing the hash settings
+ */
+ public function get_settings_only($hash, $full = false);
+}
diff --git a/phpBB/phpbb/passwords/driver/helper.php b/phpBB/phpbb/passwords/driver/helper.php
new file mode 100644
index 0000000000..4b8dc9a123
--- /dev/null
+++ b/phpBB/phpbb/passwords/driver/helper.php
@@ -0,0 +1,144 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\passwords\driver;
+
+/**
+* @package passwords
+*/
+class helper
+{
+ /**
+ * @var phpbb\config\config
+ */
+ protected $config;
+
+ /**
+ * base64 alphabet
+ * @var string
+ */
+ public $itoa64 = './0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';
+
+ /**
+ * Construct a driver helper object
+ *
+ * @param phpbb\config\config $config phpBB configuration
+ */
+ public function __construct(\phpbb\config\config $config)
+ {
+ $this->config = $config;
+ }
+
+ /**
+ * Base64 encode hash
+ *
+ * @param string $input Input string
+ * @param int $count Input string length
+ *
+ * @return string base64 encoded string
+ */
+ public function hash_encode64($input, $count)
+ {
+ $output = '';
+ $i = 0;
+
+ do
+ {
+ $value = ord($input[$i++]);
+ $output .= $this->itoa64[$value & 0x3f];
+
+ if ($i < $count)
+ {
+ $value |= ord($input[$i]) << 8;
+ }
+
+ $output .= $this->itoa64[($value >> 6) & 0x3f];
+
+ if ($i++ >= $count)
+ {
+ break;
+ }
+
+ if ($i < $count)
+ {
+ $value |= ord($input[$i]) << 16;
+ }
+
+ $output .= $this->itoa64[($value >> 12) & 0x3f];
+
+ if ($i++ >= $count)
+ {
+ break;
+ }
+
+ $output .= $this->itoa64[($value >> 18) & 0x3f];
+ }
+ while ($i < $count);
+
+ return $output;
+ }
+
+ /**
+ * Return unique id
+ *
+ * @param string $extra Additional entropy
+ *
+ * @return string Unique id
+ */
+ public function unique_id($extra = 'c')
+ {
+ static $dss_seeded = false;
+
+ $val = $this->config['rand_seed'] . microtime();
+ $val = md5($val);
+ $this->config['rand_seed'] = md5($this->config['rand_seed'] . $val . $extra);
+
+ if ($dss_seeded !== true && ($this->config['rand_seed_last_update'] < time() - rand(1,10)))
+ {
+ $this->config->set('rand_seed_last_update', time(), true);
+ $this->config->set('rand_seed', $this->config['rand_seed'], true);
+ $dss_seeded = true;
+ }
+
+ return substr($val, 4, 16);
+ }
+
+ /**
+ * Get random salt with specified length
+ *
+ * @param int $length Salt length
+ * @param string $rand_seed Seed for random data (optional). For tests.
+ *
+ * @return string Random salt with specified length
+ */
+ public function get_random_salt($length, $rand_seed = '/dev/urandom')
+ {
+ $random = '';
+
+ if (($fh = @fopen($rand_seed, 'rb')))
+ {
+ $random = fread($fh, $length);
+ fclose($fh);
+ }
+
+ if (strlen($random) < $length)
+ {
+ $random = '';
+ $random_state = $this->unique_id();
+
+ for ($i = 0; $i < $length; $i += 16)
+ {
+ $random_state = md5($this->unique_id() . $random_state);
+ $random .= pack('H*', md5($random_state));
+ }
+ $random = substr($random, 0, $length);
+ }
+ return $random;
+ }
+}
diff --git a/phpBB/phpbb/passwords/driver/phpass.php b/phpBB/phpbb/passwords/driver/phpass.php
new file mode 100644
index 0000000000..80c4d7a7f0
--- /dev/null
+++ b/phpBB/phpbb/passwords/driver/phpass.php
@@ -0,0 +1,26 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\passwords\driver;
+
+/**
+* @package passwords
+*/
+class phpass extends salted_md5
+{
+ const PREFIX = '$P$';
+
+ /**
+ * @inheritdoc
+ */
+ public function get_prefix()
+ {
+ return self::PREFIX;
+ }
+}
diff --git a/phpBB/phpbb/passwords/driver/salted_md5.php b/phpBB/phpbb/passwords/driver/salted_md5.php
new file mode 100644
index 0000000000..5c72726422
--- /dev/null
+++ b/phpBB/phpbb/passwords/driver/salted_md5.php
@@ -0,0 +1,160 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\passwords\driver;
+
+/**
+*
+* @version Version 0.1 / slightly modified for phpBB 3.1.x (using $H$ as hash type identifier)
+*
+* Portable PHP password hashing framework.
+*
+* Written by Solar Designer <solar at openwall.com> in 2004-2006 and placed in
+* the public domain.
+*
+* There's absolutely no warranty.
+*
+* The homepage URL for this framework is:
+*
+* http://www.openwall.com/phpass/
+*
+* Please be sure to update the Version line if you edit this file in any way.
+* It is suggested that you leave the main version number intact, but indicate
+* your project name (after the slash) and add your own revision information.
+*
+* Please do not change the "private" password hashing method implemented in
+* here, thereby making your hashes incompatible. However, if you must, please
+* change the hash type identifier (the "$P$") to something different.
+*
+* Obviously, since this code is in the public domain, the above are not
+* requirements (there can be none), but merely suggestions.
+*
+*/
+
+/**
+* @package passwords
+*/
+class salted_md5 extends base
+{
+ const PREFIX = '$H$';
+
+ /**
+ * @inheritdoc
+ */
+ public function get_prefix()
+ {
+ return self::PREFIX;
+ }
+
+ /**
+ * @inheritdoc
+ */
+ public function hash($password, $setting = '')
+ {
+ if ($setting)
+ {
+ if (($settings = $this->get_hash_settings($setting)) === false)
+ {
+ // Return md5 of password if settings do not
+ // comply with our standards. This will only
+ // happen if pre-determined settings are
+ // directly passed to the driver. The manager
+ // will not do this. Same as the old hashing
+ // implementatio in phpBB 3.0
+ return md5($password);
+ }
+ }
+ else
+ {
+ $settings = $this->get_hash_settings($this->generate_salt());
+ }
+
+ $hash = md5($settings['salt'] . $password, true);
+ do
+ {
+ $hash = md5($hash . $password, true);
+ }
+ while (--$settings['count']);
+
+ $output = $settings['full'];
+ $output .= $this->helper->hash_encode64($hash, 16);
+
+ return $output;
+ }
+
+ /**
+ * @inheritdoc
+ */
+ public function check($password, $hash)
+ {
+ if (strlen($hash) !== 34)
+ {
+ return md5($password) === $hash;
+ }
+
+ return $hash === $this->hash($password, $hash);
+ }
+
+ /**
+ * Generate salt for hashing method
+ *
+ * @return string Salt for hashing method
+ */
+ protected function generate_salt()
+ {
+ $count = 6;
+
+ $random = $this->helper->get_random_salt($count);
+
+ $salt = $this->get_prefix();
+ $salt .= $this->helper->itoa64[min($count + 5, 30)];
+ $salt .= $this->helper->hash_encode64($random, $count);
+
+ return $salt;
+ }
+
+ /**
+ * Get hash settings
+ *
+ * @param string $hash The hash that contains the settings
+ *
+ * @return bool|array Array containing the count_log2, salt, and full
+ * hash settings string or false if supplied hash is empty
+ * or contains incorrect settings
+ */
+ public function get_hash_settings($hash)
+ {
+ if (empty($hash))
+ {
+ return false;
+ }
+
+ $count_log2 = strpos($this->helper->itoa64, $hash[3]);
+ $salt = substr($hash, 4, 8);
+
+ if ($count_log2 < 7 || $count_log2 > 30 || strlen($salt) != 8)
+ {
+ return false;
+ }
+
+ return array(
+ 'count' => 1 << $count_log2,
+ 'salt' => $salt,
+ 'full' => substr($hash, 0, 12),
+ );
+ }
+
+ /**
+ * @inheritdoc
+ */
+ public function get_settings_only($hash, $full = false)
+ {
+ return substr($hash, 3, 9);
+ }
+}
diff --git a/phpBB/phpbb/passwords/helper.php b/phpBB/phpbb/passwords/helper.php
new file mode 100644
index 0000000000..95bad5805f
--- /dev/null
+++ b/phpBB/phpbb/passwords/helper.php
@@ -0,0 +1,103 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\passwords;
+
+/**
+* @package passwords
+*/
+class helper
+{
+ /**
+ * Get hash settings from combined hash
+ *
+ * @param string $hash Password hash of combined hash
+ *
+ * @return array An array containing the hash settings for the hash
+ * types in successive order as described by the combined
+ * password hash or an empty array if hash does not
+ * properly fit the combined hash format
+ */
+ public function get_combined_hash_settings($hash)
+ {
+ $output = array();
+
+ preg_match('#^\$([a-zA-Z0-9\\\]*?)\$#', $hash, $match);
+ $hash_settings = substr($hash, strpos($hash, $match[1]) + strlen($match[1]) + 1);
+ $matches = explode('\\', $match[1]);
+ foreach ($matches as $cur_type)
+ {
+ $dollar_position = strpos($hash_settings, '$');
+ $output[] = substr($hash_settings, 0, ($dollar_position != false) ? $dollar_position : strlen($hash_settings));
+ $hash_settings = substr($hash_settings, $dollar_position + 1);
+ }
+
+ return $output;
+ }
+
+ /**
+ * Combine hash prefixes, settings, and actual hash
+ *
+ * @param array $data Array containing the keys 'prefix' and 'settings'.
+ * It will hold the prefixes and settings
+ * @param string $type Data type of the supplied value
+ * @param string $value Value that should be put into the data array
+ *
+ * @return string|null Return complete combined hash if type is neither
+ * 'prefix' nor 'settings', nothing if it is
+ */
+ public function combine_hash_output(&$data, $type, $value)
+ {
+ if ($type == 'prefix')
+ {
+ $data[$type] .= ($data[$type] !== '$') ? '\\' : '';
+ $data[$type] .= str_replace('$', '', $value);
+ }
+ elseif ($type == 'settings')
+ {
+ $data[$type] .= ($data[$type] !== '$') ? '$' : '';
+ $data[$type] .= $value;
+ }
+ else
+ {
+ // Return full hash
+ return $data['prefix'] . $data['settings'] . '$' . $value;
+ }
+ }
+
+ /**
+ * Rebuild hash for hashing functions
+ *
+ * @param string $prefix Hash prefix
+ * @param string $settings Hash settings
+ *
+ * @return string Rebuilt hash for hashing functions
+ */
+ public function rebuild_hash($prefix, $settings)
+ {
+ $rebuilt_hash = $prefix;
+ if (strpos($settings, '\\') !== false)
+ {
+ $settings = str_replace('\\', '$', $settings);
+ }
+ $rebuilt_hash .= $settings;
+ return $rebuilt_hash;
+ }
+
+ /**
+ * Obtain only the actual hash after the prefixes
+ *
+ * @param string $hash The full password hash
+ * @return string Actual hash (incl. settings)
+ */
+ public function obtain_hash_only($hash)
+ {
+ return substr($hash, strripos($hash, '$') + 1);
+ }
+}
diff --git a/phpBB/phpbb/passwords/manager.php b/phpBB/phpbb/passwords/manager.php
new file mode 100644
index 0000000000..0ac6b05ec4
--- /dev/null
+++ b/phpBB/phpbb/passwords/manager.php
@@ -0,0 +1,341 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\passwords;
+
+/**
+* @package passwords
+*/
+class manager
+{
+ /**
+ * Default hashing method
+ */
+ protected $type = false;
+
+ /**
+ * Hashing algorithm type map
+ * Will be used to map hash prefix to type
+ */
+ protected $type_map = false;
+
+ /**
+ * Service collection of hashing algorithms
+ * Needs to be public for passwords helper
+ */
+ public $algorithms = false;
+
+ /**
+ * Password convert flag. Signals that password should be converted
+ */
+ public $convert_flag = false;
+
+ /**
+ * Passwords helper
+ * @var phpbb\passwords\helper
+ */
+ protected $helper;
+
+ /**
+ * phpBB configuration
+ * @var phpbb\config\config
+ */
+ protected $config;
+
+ /**
+ * Construct a passwords object
+ *
+ * @param phpbb\config\config $config phpBB configuration
+ * @param array $hashing_algorithms Hashing driver
+ * service collection
+ * @param phpbb\passwords\helper $helper Passwords helper object
+ * @param string $defaults List of default driver types
+ */
+ public function __construct(\phpbb\config\config $config, $hashing_algorithms, helper $helper, $defaults)
+ {
+ $this->config = $config;
+ $this->helper = $helper;
+
+ $this->fill_type_map($hashing_algorithms);
+ $this->register_default_type($defaults);
+ }
+
+ /**
+ * Register default type
+ * Will register the first supported type from the list of default types
+ *
+ * @param array $defaults List of default types in order from first to
+ * use to last to use
+ */
+ protected function register_default_type($defaults)
+ {
+ foreach ($defaults as $type)
+ {
+ if ($this->algorithms[$type]->is_supported())
+ {
+ $this->type = $this->algorithms[$type]->get_prefix();
+ break;
+ }
+ }
+ }
+
+ /**
+ * Fill algorithm type map
+ *
+ * @param phpbb\di\service_collection $hashing_algorithms
+ */
+ protected function fill_type_map($hashing_algorithms)
+ {
+ foreach ($hashing_algorithms as $algorithm)
+ {
+ if (!isset($this->type_map[$algorithm->get_prefix()]))
+ {
+ $this->type_map[$algorithm->get_prefix()] = $algorithm;
+ }
+ }
+ $this->algorithms = $hashing_algorithms;
+ }
+
+ /**
+ * Get the algorithm specified by a specific prefix
+ *
+ * @param string $prefix Password hash prefix
+ *
+ * @return object|bool The hash type object or false if prefix is not
+ * supported
+ */
+ protected function get_algorithm($prefix)
+ {
+ if (isset($this->type_map[$prefix]))
+ {
+ return $this->type_map[$prefix];
+ }
+ else
+ {
+ return false;
+ }
+ }
+
+ /**
+ * Detect the hash type of the supplied hash
+ *
+ * @param string $hash Password hash that should be checked
+ *
+ * @return object|bool The hash type object or false if the specified
+ * type is not supported
+ */
+ public function detect_algorithm($hash)
+ {
+ /*
+ * preg_match() will also show hashing algos like $2a\H$, which
+ * is a combination of bcrypt and phpass. Legacy algorithms
+ * like md5 will not be matched by this and need to be treated
+ * differently.
+ */
+ if (!preg_match('#^\$([a-zA-Z0-9\\\]*?)\$#', $hash, $match))
+ {
+ return $this->get_algorithm('$H$');
+ }
+
+ // Be on the lookout for multiple hashing algorithms
+ // 2 is correct: H\2a > 2, H\P > 2
+ if (strlen($match[1]) > 2)
+ {
+ $hash_types = explode('\\', $match[1]);
+ $return_ary = array();
+ foreach ($hash_types as $type)
+ {
+ // we do not support the same hashing
+ // algorithm more than once
+ if (isset($return_ary[$type]))
+ {
+ return false;
+ }
+
+ $return_ary[$type] = $this->get_algorithm('$' . $type . '$');
+
+ if (empty($return_ary[$type]))
+ {
+ return false;
+ }
+ }
+ return $return_ary;
+ }
+
+ // get_algorithm() will automatically return false if prefix
+ // is not supported
+ return $this->get_algorithm($match[0]);
+ }
+
+ /**
+ * Hash supplied password
+ *
+ * @param string $password Password that should be hashed
+ * @param string $type Hash type. Will default to standard hash type if
+ * none is supplied
+ * @return string|bool Password hash of supplied password or false if
+ * if something went wrong during hashing
+ */
+ public function hash($password, $type = '')
+ {
+ if (strlen($password) > 4096)
+ {
+ // If the password is too huge, we will simply reject it
+ // and not let the server try to hash it.
+ return false;
+ }
+
+ // Try to retrieve algorithm by service name if type doesn't
+ // start with dollar sign
+ if (!is_array($type) && strpos($type, '$') !== 0 && isset($this->algorithms[$type]))
+ {
+ $type = $this->algorithms[$type]->get_prefix();
+ }
+
+ $type = ($type === '') ? $this->type : $type;
+
+ if (is_array($type))
+ {
+ return $this->combined_hash_password($password, $type);
+ }
+
+ if (isset($this->type_map[$type]))
+ {
+ $hashing_algorithm = $this->type_map[$type];
+ }
+ else
+ {
+ return false;
+ }
+
+ return $hashing_algorithm->hash($password);
+ }
+
+ /**
+ * Check supplied password against hash and set convert_flag if password
+ * needs to be converted to different format (preferrably newer one)
+ *
+ * @param string $password Password that should be checked
+ * @param string $hash Stored hash
+ * @return string|bool True if password is correct, false if not
+ */
+ public function check($password, $hash)
+ {
+ if (strlen($password) > 4096)
+ {
+ // If the password is too huge, we will simply reject it
+ // and not let the server try to hash it.
+ return false;
+ }
+
+ // First find out what kind of hash we're dealing with
+ $stored_hash_type = $this->detect_algorithm($hash);
+ if ($stored_hash_type == false)
+ {
+ return false;
+ }
+
+ // Multiple hash passes needed
+ if (is_array($stored_hash_type))
+ {
+ $correct = $this->check_combined_hash($password, $stored_hash_type, $hash);
+ $this->convert_flag = ($correct === true) ? true : false;
+ return $correct;
+ }
+
+ if ($stored_hash_type->get_prefix() !== $this->type)
+ {
+ $this->convert_flag = true;
+ }
+ else
+ {
+ $this->convert_flag = false;
+ }
+
+ return $stored_hash_type->check($password, $hash);
+ }
+
+ /**
+ * Create combined hash from already hashed password
+ *
+ * @param string $password_hash Complete current password hash
+ * @param string $type Type of the hashing algorithm the password hash
+ * should be combined with
+ * @return string|bool Combined password hash if combined hashing was
+ * successful, else false
+ */
+ public function combined_hash_password($password_hash, $type)
+ {
+ $data = array(
+ 'prefix' => '$',
+ 'settings' => '$',
+ );
+ $hash_settings = $this->helper->get_combined_hash_settings($password_hash);
+ $hash = $hash_settings[0];
+
+ // Put settings of current hash into data array
+ $stored_hash_type = $this->detect_algorithm($password_hash);
+ $this->helper->combine_hash_output($data, 'prefix', $stored_hash_type->get_prefix());
+ $this->helper->combine_hash_output($data, 'settings', $stored_hash_type->get_settings_only($password_hash));
+
+ // Hash current hash with the defined types
+ foreach ($type as $cur_type)
+ {
+ if (isset($this->algorithms[$cur_type]))
+ {
+ $new_hash_type = $this->algorithms[$cur_type];
+ }
+ else
+ {
+ $new_hash_type = $this->get_algorithm($cur_type);
+ }
+
+ if (!$new_hash_type)
+ {
+ return false;
+ }
+
+ $new_hash = $new_hash_type->hash(str_replace($stored_hash_type->get_settings_only($password_hash), '', $hash));
+ $this->helper->combine_hash_output($data, 'prefix', $new_hash_type->get_prefix());
+ $this->helper->combine_hash_output($data, 'settings', substr(str_replace('$', '\\', $new_hash_type->get_settings_only($new_hash, true)), 0));
+ $hash = str_replace($new_hash_type->get_settings_only($new_hash), '', $this->helper->obtain_hash_only($new_hash));
+ }
+ return $this->helper->combine_hash_output($data, 'hash', $hash);
+ }
+
+ /**
+ * Check combined password hash against the supplied password
+ *
+ * @param string $password Password entered by user
+ * @param array $stored_hash_type An array containing the hash types
+ * as described by stored password hash
+ * @param string $hash Stored password hash
+ *
+ * @return bool True if password is correct, false if not
+ */
+ public function check_combined_hash($password, $stored_hash_type, $hash)
+ {
+ $i = 0;
+ $data = array(
+ 'prefix' => '$',
+ 'settings' => '$',
+ );
+ $hash_settings = $this->helper->get_combined_hash_settings($hash);
+ foreach ($stored_hash_type as $key => $hash_type)
+ {
+ $rebuilt_hash = $this->helper->rebuild_hash($hash_type->get_prefix(), $hash_settings[$i]);
+ $this->helper->combine_hash_output($data, 'prefix', $key);
+ $this->helper->combine_hash_output($data, 'settings', $hash_settings[$i]);
+ $cur_hash = $hash_type->hash($password, $rebuilt_hash);
+ $password = str_replace($rebuilt_hash, '', $cur_hash);
+ $i++;
+ }
+ return ($hash === $this->helper->combine_hash_output($data, 'hash', $password));
+ }
+}
diff --git a/phpBB/phpbb/path_helper.php b/phpBB/phpbb/path_helper.php
new file mode 100644
index 0000000000..a8e12c4063
--- /dev/null
+++ b/phpBB/phpbb/path_helper.php
@@ -0,0 +1,209 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb;
+
+/**
+* A class with various functions that are related to paths, files and the filesystem
+* @package phpBB3
+*/
+class path_helper
+{
+ /** @var \phpbb\symfony_request */
+ protected $symfony_request;
+
+ /** @var \phpbb\filesystem */
+ protected $filesystem;
+
+ /** @var string */
+ protected $phpbb_root_path;
+
+ /** @var string */
+ protected $adm_relative_path;
+
+ /** @var string */
+ protected $php_ext;
+
+ /** @var string */
+ protected $web_root_path;
+
+ /**
+ * Constructor
+ *
+ * @param \phpbb\symfony_request $symfony_request
+ * @param \phpbb\filesystem $filesystem
+ * @param string $phpbb_root_path Relative path to phpBB root
+ * @param string $php_ext PHP extension (php)
+ */
+ public function __construct(\phpbb\symfony_request $symfony_request, \phpbb\filesystem $filesystem, $phpbb_root_path, $php_ext, $adm_relative_path = null)
+ {
+ $this->symfony_request = $symfony_request;
+ $this->filesystem = $filesystem;
+ $this->phpbb_root_path = $phpbb_root_path;
+ $this->php_ext = $php_ext;
+ $this->adm_relative_path = $adm_relative_path;
+ }
+
+ /**
+ * Get the phpBB root path
+ *
+ * @return string
+ */
+ public function get_phpbb_root_path()
+ {
+ return $this->phpbb_root_path;
+ }
+
+ /**
+ * Get the adm root path
+ *
+ * @return string
+ */
+ public function get_adm_relative_path()
+ {
+ return $this->adm_relative_path;
+ }
+
+ /**
+ * Get the php extension
+ *
+ * @return string
+ */
+ public function get_php_ext()
+ {
+ return $this->php_ext;
+ }
+
+ /**
+ * Update a web path to the correct relative root path
+ *
+ * This replaces $phpbb_root_path . some_url with
+ * get_web_root_path() . some_url
+ *
+ * @param string $path The path to be updated
+ * @return string
+ */
+ public function update_web_root_path($path)
+ {
+ if (strpos($path, $this->phpbb_root_path) === 0)
+ {
+ $path = substr($path, strlen($this->phpbb_root_path));
+
+ return $this->get_web_root_path() . $path;
+ }
+
+ return $path;
+ }
+
+ /**
+ * Strips away the web root path and prepends the normal root path
+ *
+ * This replaces get_web_root_path() . some_url with
+ * $phpbb_root_path . some_url
+ *
+ * @param string $path The path to be updated
+ * @return string
+ */
+ public function remove_web_root_path($path)
+ {
+ if (strpos($path, $this->get_web_root_path()) === 0)
+ {
+ $path = substr($path, strlen($this->get_web_root_path()));
+
+ return $this->phpbb_root_path . $path;
+ }
+
+ return $path;
+ }
+
+ /**
+ * Get a relative root path from the current URL
+ *
+ * @return string
+ */
+ public function get_web_root_path()
+ {
+ if ($this->symfony_request === null)
+ {
+ return $this->phpbb_root_path;
+ }
+
+ if (null !== $this->web_root_path)
+ {
+ return $this->web_root_path;
+ }
+
+ // Path info (e.g. /foo/bar)
+ $path_info = $this->filesystem->clean_path($this->symfony_request->getPathInfo());
+
+ // Full request URI (e.g. phpBB/app.php/foo/bar)
+ $request_uri = $this->symfony_request->getRequestUri();
+
+ // Script name URI (e.g. phpBB/app.php)
+ $script_name = $this->symfony_request->getScriptName();
+
+ /*
+ * If the path info is empty (single /), then we're not using
+ * a route like app.php/foo/bar
+ */
+ if ($path_info === '/')
+ {
+ return $this->web_root_path = $this->phpbb_root_path;
+ }
+
+ // How many corrections might we need?
+ $corrections = substr_count($path_info, '/');
+
+ /*
+ * If the script name (e.g. phpBB/app.php) exists in the
+ * requestUri (e.g. phpBB/app.php/foo/template), then we
+ * are have a non-rewritten URL.
+ */
+ if (strpos($request_uri, $script_name) === 0)
+ {
+ /*
+ * Append ../ to the end of the phpbb_root_path as many times
+ * as / exists in path_info
+ */
+ return $this->web_root_path = $this->phpbb_root_path . str_repeat('../', $corrections);
+ }
+
+ /*
+ * If we're here it means we're at a re-written path, so we must
+ * correct the relative path for web URLs. We must append ../
+ * to the end of the root path as many times as / exists in path_info
+ * less one time (because the script, e.g. /app.php, doesn't exist in
+ * the URL)
+ */
+ return $this->web_root_path = $this->phpbb_root_path . str_repeat('../', $corrections - 1);
+ }
+
+ /**
+ * Eliminates useless . and .. components from specified URL
+ *
+ * @param string $url URL to clean
+ *
+ * @return string Cleaned URL
+ */
+ public function clean_url($url)
+ {
+ $delimiter_position = strpos($url, '://');
+ // URL should contain :// but it shouldn't start with it.
+ // Do not clean URLs that do not fit these constraints.
+ if (empty($delimiter_position))
+ {
+ return $url;
+ }
+ $scheme = substr($url, 0, $delimiter_position) . '://';
+ // Add length of URL delimiter to position
+ $path = substr($url, $delimiter_position + 3);
+
+ return $scheme . $this->filesystem->clean_path($path);
+ }
+}
diff --git a/phpBB/phpbb/permissions.php b/phpBB/phpbb/permissions.php
new file mode 100644
index 0000000000..a3fddb0b9e
--- /dev/null
+++ b/phpBB/phpbb/permissions.php
@@ -0,0 +1,335 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb;
+
+class permissions
+{
+ /**
+ * Event dispatcher object
+ * @var \phpbb\event\dispatcher
+ */
+ protected $dispatcher;
+
+ /**
+ * User object
+ * @var \phpbb\user
+ */
+ protected $user;
+
+ /**
+ * Constructor
+ *
+ * @param \phpbb\event\dispatcher $phpbb_dispatcher Event dispatcher
+ * @param \phpbb\user $user User Object
+ * @return null
+ */
+ public function __construct(\phpbb\event\dispatcher $phpbb_dispatcher, \phpbb\user $user)
+ {
+ $this->dispatcher = $phpbb_dispatcher;
+ $this->user = $user;
+
+ $categories = $this->categories;
+ $types = $this->types;
+ $permissions = $this->permissions;
+
+ /**
+ * Allows to specify additional permission categories, types and permissions
+ *
+ * @event core.permissions
+ * @var array types Array with permission types (a_, u_, m_, etc.)
+ * @var array categories Array with permission categories (pm, post, settings, misc, etc.)
+ * @var array permissions Array with permissions. Each Permission has the following layout:
+ * '<type><permission>' => array(
+ * 'lang' => 'Language Key with a Short description', // Optional, if not set,
+ * // the permissions identifier '<type><permission>' is used with
+ * // all uppercase.
+ * 'cat' => 'Identifier of the category, the permission should be displayed in',
+ * ),
+ * Example:
+ * 'u_viewprofile' => array(
+ * 'lang' => 'ACL_U_VIEWPROFILE',
+ * 'cat' => 'profile',
+ * ),
+ * @since 3.1-A1
+ */
+ $vars = array('types', 'categories', 'permissions');
+ extract($phpbb_dispatcher->trigger_event('core.permissions', compact($vars)));
+
+ $this->categories = $categories;
+ $this->types = $types;
+ $this->permissions = $permissions;
+ }
+
+ /**
+ * Returns an array with all the permission categories (pm, post, settings, misc, etc.)
+ *
+ * @return array Layout: cat-identifier => Language key
+ */
+ public function get_categories()
+ {
+ return $this->categories;
+ }
+
+ /**
+ * Returns the language string of a permission category
+ *
+ * @param string $category Identifier of the category
+ * @return string Language string
+ */
+ public function get_category_lang($category)
+ {
+ return $this->user->lang($this->categories[$category]);
+ }
+
+ /**
+ * Returns an array with all the permission types (a_, u_, m_, etc.)
+ *
+ * @return array Layout: type-identifier => Language key
+ */
+ public function get_types()
+ {
+ return $this->types;
+ }
+
+ /**
+ * Returns the language string of a permission type
+ *
+ * @param string $type Identifier of the type
+ * @param mixed $scope Scope of the type (should be 'global', 'local' or false)
+ * @return string Language string
+ */
+ public function get_type_lang($type, $scope = false)
+ {
+ if ($scope && isset($this->types[$scope][$type]))
+ {
+ $lang_key = $this->types[$scope][$type];
+ }
+ else if (isset($this->types[$type]))
+ {
+ $lang_key = $this->types[$type];
+ }
+ else
+ {
+ $lang_key = 'ACL_TYPE_' . strtoupper(($scope) ? $scope . '_' . $type : $type);
+ }
+
+ return $this->user->lang($lang_key);
+ }
+
+ /**
+ * Returns an array with all the permissions.
+ * Each Permission has the following layout:
+ * '<type><permission>' => array(
+ * 'lang' => 'Language Key with a Short description', // Optional, if not set,
+ * // the permissions identifier '<type><permission>' is used with
+ * // all uppercase.
+ * 'cat' => 'Identifier of the category, the permission should be displayed in',
+ * ),
+ * Example:
+ * 'u_viewprofile' => array(
+ * 'lang' => 'ACL_U_VIEWPROFILE',
+ * 'cat' => 'profile',
+ * ),
+ *
+ * @return array
+ */
+ public function get_permissions()
+ {
+ return $this->permissions;
+ }
+
+ /**
+ * Returns the category of a permission
+ *
+ * @param string $permission Identifier of the permission
+ * @return string Returns the category identifier of the permission
+ */
+ public function get_permission_category($permission)
+ {
+ return (isset($this->permissions[$permission]['cat'])) ? $this->permissions[$permission]['cat'] : 'misc';
+ }
+
+ /**
+ * Returns the language string of a permission
+ *
+ * @param string $permission Identifier of the permission
+ * @return string Language string
+ */
+ public function get_permission_lang($permission)
+ {
+ return (isset($this->permissions[$permission]['lang'])) ? $this->user->lang($this->permissions[$permission]['lang']) : $this->user->lang('ACL_' . strtoupper($permission));
+ }
+
+ protected $types = array(
+ 'u_' => 'ACL_TYPE_U_',
+ 'a_' => 'ACL_TYPE_A_',
+ 'm_' => 'ACL_TYPE_M_',
+ 'f_' => 'ACL_TYPE_F_',
+ 'global' => array(
+ 'm_' => 'ACL_TYPE_GLOBAL_M_',
+ ),
+ );
+
+ protected $categories = array(
+ 'actions' => 'ACL_CAT_ACTIONS',
+ 'content' => 'ACL_CAT_CONTENT',
+ 'forums' => 'ACL_CAT_FORUMS',
+ 'misc' => 'ACL_CAT_MISC',
+ 'permissions' => 'ACL_CAT_PERMISSIONS',
+ 'pm' => 'ACL_CAT_PM',
+ 'polls' => 'ACL_CAT_POLLS',
+ 'post' => 'ACL_CAT_POST',
+ 'post_actions' => 'ACL_CAT_POST_ACTIONS',
+ 'posting' => 'ACL_CAT_POSTING',
+ 'profile' => 'ACL_CAT_PROFILE',
+ 'settings' => 'ACL_CAT_SETTINGS',
+ 'topic_actions' => 'ACL_CAT_TOPIC_ACTIONS',
+ 'user_group' => 'ACL_CAT_USER_GROUP',
+ );
+
+ protected $permissions = array(
+ // User Permissions
+ 'u_viewprofile' => array('lang' => 'ACL_U_VIEWPROFILE', 'cat' => 'profile'),
+ 'u_chgname' => array('lang' => 'ACL_U_CHGNAME', 'cat' => 'profile'),
+ 'u_chgpasswd' => array('lang' => 'ACL_U_CHGPASSWD', 'cat' => 'profile'),
+ 'u_chgemail' => array('lang' => 'ACL_U_CHGEMAIL', 'cat' => 'profile'),
+ 'u_chgavatar' => array('lang' => 'ACL_U_CHGAVATAR', 'cat' => 'profile'),
+ 'u_chggrp' => array('lang' => 'ACL_U_CHGGRP', 'cat' => 'profile'),
+ 'u_chgprofileinfo' => array('lang' => 'ACL_U_CHGPROFILEINFO', 'cat' => 'profile'),
+
+ 'u_attach' => array('lang' => 'ACL_U_ATTACH', 'cat' => 'post'),
+ 'u_download' => array('lang' => 'ACL_U_DOWNLOAD', 'cat' => 'post'),
+ 'u_savedrafts' => array('lang' => 'ACL_U_SAVEDRAFTS', 'cat' => 'post'),
+ 'u_chgcensors' => array('lang' => 'ACL_U_CHGCENSORS', 'cat' => 'post'),
+ 'u_sig' => array('lang' => 'ACL_U_SIG', 'cat' => 'post'),
+
+ 'u_sendpm' => array('lang' => 'ACL_U_SENDPM', 'cat' => 'pm'),
+ 'u_masspm' => array('lang' => 'ACL_U_MASSPM', 'cat' => 'pm'),
+ 'u_masspm_group'=> array('lang' => 'ACL_U_MASSPM_GROUP', 'cat' => 'pm'),
+ 'u_readpm' => array('lang' => 'ACL_U_READPM', 'cat' => 'pm'),
+ 'u_pm_edit' => array('lang' => 'ACL_U_PM_EDIT', 'cat' => 'pm'),
+ 'u_pm_delete' => array('lang' => 'ACL_U_PM_DELETE', 'cat' => 'pm'),
+ 'u_pm_forward' => array('lang' => 'ACL_U_PM_FORWARD', 'cat' => 'pm'),
+ 'u_pm_emailpm' => array('lang' => 'ACL_U_PM_EMAILPM', 'cat' => 'pm'),
+ 'u_pm_printpm' => array('lang' => 'ACL_U_PM_PRINTPM', 'cat' => 'pm'),
+ 'u_pm_attach' => array('lang' => 'ACL_U_PM_ATTACH', 'cat' => 'pm'),
+ 'u_pm_download' => array('lang' => 'ACL_U_PM_DOWNLOAD', 'cat' => 'pm'),
+ 'u_pm_bbcode' => array('lang' => 'ACL_U_PM_BBCODE', 'cat' => 'pm'),
+ 'u_pm_smilies' => array('lang' => 'ACL_U_PM_SMILIES', 'cat' => 'pm'),
+ 'u_pm_img' => array('lang' => 'ACL_U_PM_IMG', 'cat' => 'pm'),
+ 'u_pm_flash' => array('lang' => 'ACL_U_PM_FLASH', 'cat' => 'pm'),
+
+ 'u_sendemail' => array('lang' => 'ACL_U_SENDEMAIL', 'cat' => 'misc'),
+ 'u_sendim' => array('lang' => 'ACL_U_SENDIM', 'cat' => 'misc'),
+ 'u_ignoreflood' => array('lang' => 'ACL_U_IGNOREFLOOD', 'cat' => 'misc'),
+ 'u_hideonline' => array('lang' => 'ACL_U_HIDEONLINE', 'cat' => 'misc'),
+ 'u_viewonline' => array('lang' => 'ACL_U_VIEWONLINE', 'cat' => 'misc'),
+ 'u_search' => array('lang' => 'ACL_U_SEARCH', 'cat' => 'misc'),
+
+ // Forum Permissions
+ 'f_list' => array('lang' => 'ACL_F_LIST', 'cat' => 'actions'),
+ 'f_read' => array('lang' => 'ACL_F_READ', 'cat' => 'actions'),
+ 'f_search' => array('lang' => 'ACL_F_SEARCH', 'cat' => 'actions'),
+ 'f_subscribe' => array('lang' => 'ACL_F_SUBSCRIBE', 'cat' => 'actions'),
+ 'f_print' => array('lang' => 'ACL_F_PRINT', 'cat' => 'actions'),
+ 'f_email' => array('lang' => 'ACL_F_EMAIL', 'cat' => 'actions'),
+ 'f_bump' => array('lang' => 'ACL_F_BUMP', 'cat' => 'actions'),
+ 'f_user_lock' => array('lang' => 'ACL_F_USER_LOCK', 'cat' => 'actions'),
+ 'f_download' => array('lang' => 'ACL_F_DOWNLOAD', 'cat' => 'actions'),
+ 'f_report' => array('lang' => 'ACL_F_REPORT', 'cat' => 'actions'),
+
+ 'f_post' => array('lang' => 'ACL_F_POST', 'cat' => 'post'),
+ 'f_sticky' => array('lang' => 'ACL_F_STICKY', 'cat' => 'post'),
+ 'f_announce' => array('lang' => 'ACL_F_ANNOUNCE', 'cat' => 'post'),
+ 'f_reply' => array('lang' => 'ACL_F_REPLY', 'cat' => 'post'),
+ 'f_edit' => array('lang' => 'ACL_F_EDIT', 'cat' => 'post'),
+ 'f_delete' => array('lang' => 'ACL_F_DELETE', 'cat' => 'post'),
+ 'f_softdelete' => array('lang' => 'ACL_F_SOFTDELETE', 'cat' => 'post'),
+ 'f_ignoreflood' => array('lang' => 'ACL_F_IGNOREFLOOD', 'cat' => 'post'),
+ 'f_postcount' => array('lang' => 'ACL_F_POSTCOUNT', 'cat' => 'post'),
+ 'f_noapprove' => array('lang' => 'ACL_F_NOAPPROVE', 'cat' => 'post'),
+
+ 'f_attach' => array('lang' => 'ACL_F_ATTACH', 'cat' => 'content'),
+ 'f_icons' => array('lang' => 'ACL_F_ICONS', 'cat' => 'content'),
+ 'f_bbcode' => array('lang' => 'ACL_F_BBCODE', 'cat' => 'content'),
+ 'f_flash' => array('lang' => 'ACL_F_FLASH', 'cat' => 'content'),
+ 'f_img' => array('lang' => 'ACL_F_IMG', 'cat' => 'content'),
+ 'f_sigs' => array('lang' => 'ACL_F_SIGS', 'cat' => 'content'),
+ 'f_smilies' => array('lang' => 'ACL_F_SMILIES', 'cat' => 'content'),
+
+ 'f_poll' => array('lang' => 'ACL_F_POLL', 'cat' => 'polls'),
+ 'f_vote' => array('lang' => 'ACL_F_VOTE', 'cat' => 'polls'),
+ 'f_votechg' => array('lang' => 'ACL_F_VOTECHG', 'cat' => 'polls'),
+
+ // Moderator Permissions
+ 'm_edit' => array('lang' => 'ACL_M_EDIT', 'cat' => 'post_actions'),
+ 'm_delete' => array('lang' => 'ACL_M_DELETE', 'cat' => 'post_actions'),
+ 'm_approve' => array('lang' => 'ACL_M_APPROVE', 'cat' => 'post_actions'),
+ 'm_report' => array('lang' => 'ACL_M_REPORT', 'cat' => 'post_actions'),
+ 'm_chgposter' => array('lang' => 'ACL_M_CHGPOSTER', 'cat' => 'post_actions'),
+
+ 'm_move' => array('lang' => 'ACL_M_MOVE', 'cat' => 'topic_actions'),
+ 'm_lock' => array('lang' => 'ACL_M_LOCK', 'cat' => 'topic_actions'),
+ 'm_split' => array('lang' => 'ACL_M_SPLIT', 'cat' => 'topic_actions'),
+ 'm_merge' => array('lang' => 'ACL_M_MERGE', 'cat' => 'topic_actions'),
+
+ 'm_info' => array('lang' => 'ACL_M_INFO', 'cat' => 'misc'),
+ 'm_warn' => array('lang' => 'ACL_M_WARN', 'cat' => 'misc'),
+ 'm_ban' => array('lang' => 'ACL_M_BAN', 'cat' => 'misc'),
+
+ // Admin Permissions
+ 'a_board' => array('lang' => 'ACL_A_BOARD', 'cat' => 'settings'),
+ 'a_server' => array('lang' => 'ACL_A_SERVER', 'cat' => 'settings'),
+ 'a_jabber' => array('lang' => 'ACL_A_JABBER', 'cat' => 'settings'),
+ 'a_phpinfo' => array('lang' => 'ACL_A_PHPINFO', 'cat' => 'settings'),
+
+ 'a_forum' => array('lang' => 'ACL_A_FORUM', 'cat' => 'forums'),
+ 'a_forumadd' => array('lang' => 'ACL_A_FORUMADD', 'cat' => 'forums'),
+ 'a_forumdel' => array('lang' => 'ACL_A_FORUMDEL', 'cat' => 'forums'),
+ 'a_prune' => array('lang' => 'ACL_A_PRUNE', 'cat' => 'forums'),
+
+ 'a_icons' => array('lang' => 'ACL_A_ICONS', 'cat' => 'posting'),
+ 'a_words' => array('lang' => 'ACL_A_WORDS', 'cat' => 'posting'),
+ 'a_bbcode' => array('lang' => 'ACL_A_BBCODE', 'cat' => 'posting'),
+ 'a_attach' => array('lang' => 'ACL_A_ATTACH', 'cat' => 'posting'),
+
+ 'a_user' => array('lang' => 'ACL_A_USER', 'cat' => 'user_group'),
+ 'a_userdel' => array('lang' => 'ACL_A_USERDEL', 'cat' => 'user_group'),
+ 'a_group' => array('lang' => 'ACL_A_GROUP', 'cat' => 'user_group'),
+ 'a_groupadd' => array('lang' => 'ACL_A_GROUPADD', 'cat' => 'user_group'),
+ 'a_groupdel' => array('lang' => 'ACL_A_GROUPDEL', 'cat' => 'user_group'),
+ 'a_ranks' => array('lang' => 'ACL_A_RANKS', 'cat' => 'user_group'),
+ 'a_profile' => array('lang' => 'ACL_A_PROFILE', 'cat' => 'user_group'),
+ 'a_names' => array('lang' => 'ACL_A_NAMES', 'cat' => 'user_group'),
+ 'a_ban' => array('lang' => 'ACL_A_BAN', 'cat' => 'user_group'),
+
+ 'a_viewauth' => array('lang' => 'ACL_A_VIEWAUTH', 'cat' => 'permissions'),
+ 'a_authgroups' => array('lang' => 'ACL_A_AUTHGROUPS', 'cat' => 'permissions'),
+ 'a_authusers' => array('lang' => 'ACL_A_AUTHUSERS', 'cat' => 'permissions'),
+ 'a_fauth' => array('lang' => 'ACL_A_FAUTH', 'cat' => 'permissions'),
+ 'a_mauth' => array('lang' => 'ACL_A_MAUTH', 'cat' => 'permissions'),
+ 'a_aauth' => array('lang' => 'ACL_A_AAUTH', 'cat' => 'permissions'),
+ 'a_uauth' => array('lang' => 'ACL_A_UAUTH', 'cat' => 'permissions'),
+ 'a_roles' => array('lang' => 'ACL_A_ROLES', 'cat' => 'permissions'),
+ 'a_switchperm' => array('lang' => 'ACL_A_SWITCHPERM', 'cat' => 'permissions'),
+
+ 'a_styles' => array('lang' => 'ACL_A_STYLES', 'cat' => 'misc'),
+ 'a_extensions' => array('lang' => 'ACL_A_EXTENSIONS', 'cat' => 'misc'),
+ 'a_viewlogs' => array('lang' => 'ACL_A_VIEWLOGS', 'cat' => 'misc'),
+ 'a_clearlogs' => array('lang' => 'ACL_A_CLEARLOGS', 'cat' => 'misc'),
+ 'a_modules' => array('lang' => 'ACL_A_MODULES', 'cat' => 'misc'),
+ 'a_language' => array('lang' => 'ACL_A_LANGUAGE', 'cat' => 'misc'),
+ 'a_email' => array('lang' => 'ACL_A_EMAIL', 'cat' => 'misc'),
+ 'a_bots' => array('lang' => 'ACL_A_BOTS', 'cat' => 'misc'),
+ 'a_reasons' => array('lang' => 'ACL_A_REASONS', 'cat' => 'misc'),
+ 'a_backup' => array('lang' => 'ACL_A_BACKUP', 'cat' => 'misc'),
+ 'a_search' => array('lang' => 'ACL_A_SEARCH', 'cat' => 'misc'),
+ );
+}
diff --git a/phpBB/phpbb/php/ini.php b/phpBB/phpbb/php/ini.php
new file mode 100644
index 0000000000..f0f53807fe
--- /dev/null
+++ b/phpBB/phpbb/php/ini.php
@@ -0,0 +1,169 @@
+<?php
+/**
+*
+* @package phpBB
+* @copyright (c) 2011 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\php;
+
+/**
+* Wrapper class for ini_get function.
+*
+* Provides easier handling of the different interpretations of ini values.
+*
+* @package phpBB
+*/
+class ini
+{
+ /**
+ * Simple wrapper for ini_get()
+ * See http://php.net/manual/en/function.ini-get.php
+ *
+ * @param string $varname The configuration option name.
+ * @return bool|string False if configuration option does not exist,
+ * the configuration option value (string) otherwise.
+ */
+ public function get($varname)
+ {
+ return ini_get($varname);
+ }
+
+ /**
+ * Gets the configuration option value as a trimmed string.
+ *
+ * @param string $varname The configuration option name.
+ * @return bool|string False if configuration option does not exist,
+ * the configuration option value (string) otherwise.
+ */
+ public function get_string($varname)
+ {
+ $value = $this->get($varname);
+
+ if ($value === false)
+ {
+ return false;
+ }
+
+ return trim($value);
+ }
+
+ /**
+ * Gets configuration option value as a boolean.
+ * Interprets the string value 'off' as false.
+ *
+ * @param string $varname The configuration option name.
+ * @return bool False if configuration option does not exist.
+ * False if configuration option is disabled.
+ * True otherwise.
+ */
+ public function get_bool($varname)
+ {
+ $value = $this->get_string($varname);
+
+ if (empty($value) || strtolower($value) == 'off')
+ {
+ return false;
+ }
+
+ return true;
+ }
+
+ /**
+ * Gets configuration option value as an integer.
+ *
+ * @param string $varname The configuration option name.
+ * @return bool|int False if configuration option does not exist,
+ * false if configuration option value is not numeric,
+ * the configuration option value (integer) otherwise.
+ */
+ public function get_int($varname)
+ {
+ $value = $this->get_string($varname);
+
+ if (!is_numeric($value))
+ {
+ return false;
+ }
+
+ return (int) $value;
+ }
+
+ /**
+ * Gets configuration option value as a float.
+ *
+ * @param string $varname The configuration option name.
+ * @return bool|float False if configuration option does not exist,
+ * false if configuration option value is not numeric,
+ * the configuration option value (float) otherwise.
+ */
+ public function get_float($varname)
+ {
+ $value = $this->get_string($varname);
+
+ if (!is_numeric($value))
+ {
+ return false;
+ }
+
+ return (float) $value;
+ }
+
+ /**
+ * Gets configuration option value in bytes.
+ * Converts strings like '128M' to bytes (integer or float).
+ *
+ * @param string $varname The configuration option name.
+ * @return bool|int|float False if configuration option does not exist,
+ * false if configuration option value is not well-formed,
+ * the configuration option value otherwise.
+ */
+ public function get_bytes($varname)
+ {
+ $value = $this->get_string($varname);
+
+ if ($value === false)
+ {
+ return false;
+ }
+
+ if (is_numeric($value))
+ {
+ // Already in bytes.
+ return phpbb_to_numeric($value);
+ }
+ else if (strlen($value) < 2)
+ {
+ // Single character.
+ return false;
+ }
+ else if (strlen($value) < 3 && $value[0] === '-')
+ {
+ // Two characters but the first one is a minus.
+ return false;
+ }
+
+ $value_lower = strtolower($value);
+ $value_numeric = phpbb_to_numeric($value);
+
+ switch ($value_lower[strlen($value_lower) - 1])
+ {
+ case 'g':
+ $value_numeric *= 1024;
+ case 'm':
+ $value_numeric *= 1024;
+ case 'k':
+ $value_numeric *= 1024;
+ break;
+
+ default:
+ // It's not already in bytes (and thus numeric)
+ // and does not carry a unit.
+ return false;
+ }
+
+ return $value_numeric;
+ }
+}
diff --git a/phpBB/phpbb/plupload/plupload.php b/phpBB/phpbb/plupload/plupload.php
new file mode 100644
index 0000000000..6bff2b8a7e
--- /dev/null
+++ b/phpBB/phpbb/plupload/plupload.php
@@ -0,0 +1,371 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\plupload;
+
+/**
+* This class handles all server-side plupload functions
+*
+* @package \phpbb\plupload\plupload
+*/
+class plupload
+{
+ /**
+ * @var string
+ */
+ protected $phpbb_root_path;
+
+ /**
+ * @var \phpbb\config\config
+ */
+ protected $config;
+
+ /**
+ * @var \phpbb\request\request_interface
+ */
+ protected $request;
+
+ /**
+ * @var \phpbb\user
+ */
+ protected $user;
+
+ /**
+ * @var \phpbb\php\ini
+ */
+ protected $php_ini;
+
+ /**
+ * @var \phpbb\mimetype\guesser
+ */
+ protected $mimetype_guesser;
+
+ /**
+ * Final destination for uploaded files, i.e. the "files" directory.
+ * @var string
+ */
+ protected $upload_directory;
+
+ /**
+ * Temporary upload directory for plupload uploads.
+ * @var string
+ */
+ protected $temporary_directory;
+
+ /**
+ * Constructor.
+ *
+ * @param string $phpbb_root_path
+ * @param \phpbb\config\config $config
+ * @param \phpbb\request\request_interface $request
+ * @param \phpbb\user $user
+ * @param \phpbb\php\ini $php_ini
+ * @param \phpbb\mimetype\guesser $mimetype_guesser
+ *
+ * @return null
+ */
+ public function __construct($phpbb_root_path, \phpbb\config\config $config, \phpbb\request\request_interface $request, \phpbb\user $user, \phpbb\php\ini $php_ini, \phpbb\mimetype\guesser $mimetype_guesser)
+ {
+ $this->phpbb_root_path = $phpbb_root_path;
+ $this->config = $config;
+ $this->request = $request;
+ $this->user = $user;
+ $this->php_ini = $php_ini;
+ $this->mimetype_guesser = $mimetype_guesser;
+
+ $this->upload_directory = $this->phpbb_root_path . $this->config['upload_path'];
+ $this->temporary_directory = $this->upload_directory . '/plupload';
+ }
+
+ /**
+ * Plupload allows for chunking so we must check for that and assemble
+ * the whole file first before performing any checks on it.
+ *
+ * @param string $form_name The name of the file element in the upload form
+ *
+ * @return array|null null if there are no chunks to piece together
+ * otherwise array containing the path to the
+ * pieced-together file and its size
+ */
+ public function handle_upload($form_name)
+ {
+ $chunks_expected = $this->request->variable('chunks', 0);
+
+ // If chunking is disabled or we are not using plupload, just return
+ // and handle the file as usual
+ if ($chunks_expected < 2)
+ {
+ return;
+ }
+
+ $file_name = $this->request->variable('name', '');
+ $chunk = $this->request->variable('chunk', 0);
+
+ $this->user->add_lang('plupload');
+ $this->prepare_temporary_directory();
+
+ $file_path = $this->temporary_filepath($file_name);
+ $this->integrate_uploaded_file($form_name, $chunk, $file_path);
+
+ // If we are done with all the chunks, strip the .part suffix and then
+ // handle the resulting file as normal, otherwise die and await the
+ // next chunk.
+ if ($chunk == $chunks_expected - 1)
+ {
+ rename("{$file_path}.part", $file_path);
+
+ // Need to modify some of the $_FILES values to reflect the new file
+ return array(
+ 'tmp_name' => $file_path,
+ 'name' => $this->request->variable('real_filename', ''),
+ 'size' => filesize($file_path),
+ 'type' => $this->mimetype_guesser->guess($file_path, $file_name),
+ );
+ }
+ else
+ {
+ $json_response = new \phpbb\json_response();
+ $json_response->send(array(
+ 'jsonrpc' => '2.0',
+ 'id' => 'id',
+ 'result' => null,
+ ));
+ }
+ }
+
+ /**
+ * Fill in the plupload configuration options in the template
+ *
+ * @param \phpbb\cache\service $cache
+ * @param \phpbb\template\template $template
+ * @param string $s_action The URL to submit the POST data to
+ * @param int $forum_id The ID of the forum
+ *
+ * @return null
+ */
+ public function configure(\phpbb\cache\service $cache, \phpbb\template\template $template, $s_action, $forum_id)
+ {
+ $filters = $this->generate_filter_string($cache, $forum_id);
+ $chunk_size = $this->get_chunk_size();
+ $resize = $this->generate_resize_string();
+
+ $template->assign_vars(array(
+ 'S_RESIZE' => $resize,
+ 'S_PLUPLOAD' => true,
+ 'FILTERS' => $filters,
+ 'CHUNK_SIZE' => $chunk_size,
+ 'S_PLUPLOAD_URL' => htmlspecialchars_decode($s_action),
+ ));
+
+ $this->user->add_lang('plupload');
+ }
+
+ /**
+ * Checks whether the page request was sent by plupload or not
+ *
+ * @return bool
+ */
+ public function is_active()
+ {
+ return $this->request->header('X-PHPBB-USING-PLUPLOAD', false);
+ }
+
+ /**
+ * Returns whether the current HTTP request is a multipart request.
+ *
+ * @return bool
+ */
+ public function is_multipart()
+ {
+ $content_type = $this->request->server('CONTENT_TYPE');
+
+ return strpos($content_type, 'multipart') === 0;
+ }
+
+ /**
+ * Sends an error message back to the client via JSON response
+ *
+ * @param int $code The error code
+ * @param string $msg The translation string of the message to be sent
+ *
+ * @return null
+ */
+ public function emit_error($code, $msg)
+ {
+ $json_response = new \phpbb\json_response();
+ $json_response->send(array(
+ 'jsonrpc' => '2.0',
+ 'id' => 'id',
+ 'error' => array(
+ 'code' => $code,
+ 'message' => $this->user->lang($msg),
+ ),
+ ));
+ }
+
+ /**
+ * Looks at the list of allowed extensions and generates a string
+ * appropriate for use in configuring plupload with
+ *
+ * @param \phpbb\cache\service $cache
+ * @param string $forum_id The ID of the forum
+ *
+ * @return string
+ */
+ public function generate_filter_string(\phpbb\cache\service $cache, $forum_id)
+ {
+ $attach_extensions = $cache->obtain_attach_extensions($forum_id);
+ unset($attach_extensions['_allowed_']);
+ $groups = array();
+
+ // Re-arrange the extension array to $groups[$group_name][]
+ foreach ($attach_extensions as $extension => $extension_info)
+ {
+ if (!isset($groups[$extension_info['group_name']]))
+ {
+ $groups[$extension_info['group_name']] = array();
+ }
+
+ $groups[$extension_info['group_name']][] = $extension;
+ }
+
+ $filters = array();
+ foreach ($groups as $group => $extensions)
+ {
+ $filters[] = sprintf(
+ "{title: '%s', extensions: '%s'}",
+ addslashes(ucfirst(strtolower($group))),
+ addslashes(implode(',', $extensions))
+ );
+ }
+
+ return implode(',', $filters);
+ }
+
+ /**
+ * Generates a string that is used to tell plupload to automatically resize
+ * files before uploading them.
+ *
+ * @return string
+ */
+ public function generate_resize_string()
+ {
+ $resize = '';
+ if ($this->config['img_max_height'] > 0 && $this->config['img_max_width'] > 0)
+ {
+ $resize = sprintf(
+ 'resize: {width: %d, height: %d, quality: 100},',
+ (int) $this->config['img_max_height'],
+ (int) $this->config['img_max_width']
+ );
+ }
+
+ return $resize;
+ }
+
+ /**
+ * Checks various php.ini values and the maximum file size to determine
+ * the maximum size chunks a file can be split up into for upload
+ *
+ * @return int
+ */
+ public function get_chunk_size()
+ {
+ $max = min(
+ $this->php_ini->get_bytes('upload_max_filesize'),
+ $this->php_ini->get_bytes('post_max_size'),
+ max(1, $this->php_ini->get_bytes('memory_limit')),
+ $this->config['max_filesize']
+ );
+
+ // Use half of the maximum possible to leave plenty of room for other
+ // POST data.
+ return floor($max / 2);
+ }
+
+ protected function temporary_filepath($file_name)
+ {
+ // Must preserve the extension for plupload to work.
+ return sprintf(
+ '%s/%s_%s%s',
+ $this->temporary_directory,
+ $this->config['plupload_salt'],
+ md5($file_name),
+ \filespec::get_extension($file_name)
+ );
+ }
+
+ /**
+ * Checks whether the chunk we are about to deal with was actually uploaded
+ * by PHP and actually exists, if not, it generates an error
+ *
+ * @param string $form_name The name of the file in the form data
+ *
+ * @return null
+ */
+ protected function integrate_uploaded_file($form_name, $chunk, $file_path)
+ {
+ $is_multipart = $this->is_multipart();
+ $upload = $this->request->file($form_name);
+ if ($is_multipart && (!isset($upload['tmp_name']) || !is_uploaded_file($upload['tmp_name'])))
+ {
+ $this->emit_error(103, 'PLUPLOAD_ERR_MOVE_UPLOADED');
+ }
+
+ $tmp_file = $this->temporary_filepath($upload['tmp_name']);
+
+ if (!move_uploaded_file($upload['tmp_name'], $tmp_file))
+ {
+ $this->emit_error(103, 'PLUPLOAD_ERR_MOVE_UPLOADED');
+ }
+
+ $out = fopen("{$file_path}.part", $chunk == 0 ? 'wb' : 'ab');
+ if (!$out)
+ {
+ $this->emit_error(102, 'PLUPLOAD_ERR_OUTPUT');
+ }
+
+ $in = fopen(($is_multipart) ? $tmp_file : 'php://input', 'rb');
+ if (!$in)
+ {
+ $this->emit_error(101, 'PLUPLOAD_ERR_INPUT');
+ }
+
+ while ($buf = fread($in, 4096))
+ {
+ fwrite($out, $buf);
+ }
+
+ fclose($in);
+ fclose($out);
+
+ if ($is_multipart)
+ {
+ unlink($tmp_file);
+ }
+ }
+
+ /**
+ * Creates the temporary directory if it does not already exist.
+ *
+ * @return null
+ */
+ protected function prepare_temporary_directory()
+ {
+ if (!file_exists($this->temporary_directory))
+ {
+ mkdir($this->temporary_directory);
+
+ copy(
+ $this->upload_directory . '/index.htm',
+ $this->temporary_directory . '/index.htm'
+ );
+ }
+ }
+}
diff --git a/phpBB/phpbb/profilefields/lang_helper.php b/phpBB/phpbb/profilefields/lang_helper.php
new file mode 100644
index 0000000000..7bae1bdc18
--- /dev/null
+++ b/phpBB/phpbb/profilefields/lang_helper.php
@@ -0,0 +1,130 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2014 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\profilefields;
+
+/**
+* Custom Profile Fields
+* @package phpBB3
+*/
+class lang_helper
+{
+ /**
+ * Array with the language option, grouped by field and language
+ * @var array
+ */
+ protected $options_lang = array();
+
+ /**
+ * Database object
+ * @var \phpbb\db\driver\driver
+ */
+ protected $db;
+
+ /**
+ * Table where the language strings are stored
+ * @var string
+ */
+ protected $language_table;
+
+ /**
+ * Construct
+ *
+ * @param \phpbb\db\driver\driver $db Database object
+ * @param string $language_table Table where the language strings are stored
+ */
+ public function __construct($db, $language_table)
+ {
+ $this->db = $db;
+ $this->language_table = $language_table;
+ }
+
+ /**
+ * Get language entries for options and store them here for later use
+ */
+ public function get_option_lang($field_id, $lang_id, $field_type, $preview_options)
+ {
+ if ($preview_options !== false)
+ {
+ $lang_options = (!is_array($preview_options)) ? explode("\n", $preview_options) : $preview_options;
+
+ foreach ($lang_options as $num => $var)
+ {
+ if (!isset($this->options_lang[$field_id]))
+ {
+ $this->options_lang[$field_id] = array();
+ }
+ if (!isset($this->options_lang[$field_id][$lang_id]))
+ {
+ $this->options_lang[$field_id][$lang_id] = array();
+ }
+ $this->options_lang[$field_id][$lang_id][($num + 1)] = $var;
+ }
+ }
+ else
+ {
+ $sql = 'SELECT option_id, lang_value
+ FROM ' . $this->language_table . '
+ WHERE field_id = ' . (int) $field_id . '
+ AND lang_id = ' . (int) $lang_id . "
+ AND field_type = '" . $this->db->sql_escape($field_type) . "'
+ ORDER BY option_id";
+ $result = $this->db->sql_query($sql);
+
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ $this->options_lang[$field_id][$lang_id][($row['option_id'] + 1)] = $row['lang_value'];
+ }
+ $this->db->sql_freeresult($result);
+ }
+ }
+
+ /**
+ * Are language options set for this field?
+ *
+ * @param int $field_id Database ID of the field
+ * @param int $lang_id ID of the language
+ * @param int $field_value Selected value of the field
+ * @return boolean
+ */
+ public function is_set($field_id, $lang_id = null, $field_value = null)
+ {
+ $is_set = isset($this->options_lang[$field_id]);
+
+ if ($is_set && (!is_null($lang_id) || !is_null($field_value)))
+ {
+ $is_set = isset($this->options_lang[$field_id][$lang_id]);
+ }
+
+ if ($is_set && !is_null($field_value))
+ {
+ $is_set = isset($this->options_lang[$field_id][$lang_id][$field_value]);
+ }
+
+ return $is_set;
+ }
+
+ /**
+ * Get the selected language string
+ *
+ * @param int $field_id Database ID of the field
+ * @param int $lang_id ID of the language
+ * @param int $field_value Selected value of the field
+ * @return string
+ */
+ public function get($field_id, $lang_id, $field_value = null)
+ {
+ if (is_null($field_value))
+ {
+ return $this->options_lang[$field_id][$lang_id];
+ }
+
+ return $this->options_lang[$field_id][$lang_id][$field_value];
+ }
+}
diff --git a/phpBB/phpbb/profilefields/manager.php b/phpBB/phpbb/profilefields/manager.php
new file mode 100644
index 0000000000..a4626bc5de
--- /dev/null
+++ b/phpBB/phpbb/profilefields/manager.php
@@ -0,0 +1,436 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2014 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\profilefields;
+
+/**
+* Custom Profile Fields
+* @package phpBB3
+*/
+class manager
+{
+ /**
+ * Auth object
+ * @var \phpbb\auth\auth
+ */
+ protected $auth;
+
+ /**
+ * Database object
+ * @var \phpbb\db\driver\driver
+ */
+ protected $db;
+
+ /**
+ * Request object
+ * @var \phpbb\request\request
+ */
+ protected $request;
+
+ /**
+ * Template object
+ * @var \phpbb\template\template
+ */
+ protected $template;
+
+ /**
+ * Service Collection object
+ * @var \phpbb\di\service_collection
+ */
+ protected $type_collection;
+
+ /**
+ * User object
+ * @var \phpbb\user
+ */
+ protected $user;
+
+ protected $fields_table;
+
+ protected $fields_language_table;
+
+ protected $fields_data_table;
+
+ protected $profile_cache = array();
+
+ /**
+ * Construct
+ *
+ * @param \phpbb\auth\auth $auth Auth object
+ * @param \phpbb\db\driver\driver $db Database object
+ * @param \phpbb\request\request $request Request object
+ * @param \phpbb\template\template $template Template object
+ * @param \phpbb\di\service_collection $type_collection
+ * @param \phpbb\user $user User object
+ * @param string $fields_table
+ * @param string $fields_language_table
+ * @param string $fields_data_table
+ */
+ public function __construct(\phpbb\auth\auth $auth, \phpbb\db\driver\driver $db, \phpbb\request\request $request, \phpbb\template\template $template, \phpbb\di\service_collection $type_collection, \phpbb\user $user, $fields_table, $fields_language_table, $fields_data_table)
+ {
+ $this->auth = $auth;
+ $this->db = $db;
+ $this->request = $request;
+ $this->template = $template;
+ $this->type_collection = $type_collection;
+ $this->user = $user;
+
+ $this->fields_table = $fields_table;
+ $this->fields_language_table = $fields_language_table;
+ $this->fields_data_table = $fields_data_table;
+ }
+
+ /**
+ * Assign editable fields to template, mode can be profile (for profile change) or register (for registration)
+ * Called by ucp_profile and ucp_register
+ */
+ public function generate_profile_fields($mode, $lang_id)
+ {
+ $sql_where = '';
+ switch ($mode)
+ {
+ case 'register':
+ // If the field is required we show it on the registration page
+ $sql_where .= ' AND f.field_show_on_reg = 1';
+ break;
+
+ case 'profile':
+ // Show hidden fields to moderators/admins
+ if (!$this->auth->acl_gets('a_', 'm_') && !$this->auth->acl_getf_global('m_'))
+ {
+ $sql_where .= ' AND f.field_show_profile = 1';
+ }
+ break;
+
+ default:
+ trigger_error('Wrong profile mode specified', E_USER_ERROR);
+ break;
+ }
+
+ $sql = 'SELECT l.*, f.*
+ FROM ' . $this->fields_language_table . ' l, ' . $this->fields_table . " f
+ WHERE f.field_active = 1
+ $sql_where
+ AND l.lang_id = " . (int) $lang_id . '
+ AND l.field_id = f.field_id
+ ORDER BY f.field_order';
+ $result = $this->db->sql_query($sql);
+
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ // Return templated field
+ $profile_field = $this->type_collection[$row['field_type']];
+ $tpl_snippet = $profile_field->process_field_row('change', $row);
+
+ $this->template->assign_block_vars('profile_fields', array(
+ 'LANG_NAME' => $this->user->lang($row['lang_name']),
+ 'LANG_EXPLAIN' => $this->user->lang($row['lang_explain']),
+ 'FIELD' => $tpl_snippet,
+ 'FIELD_ID' => $profile_field->get_field_ident($row),
+ 'S_REQUIRED' => ($row['field_required']) ? true : false,
+ ));
+ }
+ $this->db->sql_freeresult($result);
+ }
+
+ /**
+ * Build profile cache, used for display
+ */
+ protected function build_cache()
+ {
+ $this->profile_cache = array();
+
+ // Display hidden/no_view fields for admin/moderator
+ $sql = 'SELECT l.*, f.*
+ FROM ' . $this->fields_language_table . ' l, ' . $this->fields_table . ' f
+ WHERE l.lang_id = ' . $this->user->get_iso_lang_id() . '
+ AND f.field_active = 1 ' .
+ ((!$this->auth->acl_gets('a_', 'm_') && !$this->auth->acl_getf_global('m_')) ? ' AND f.field_hide = 0 ' : '') . '
+ AND f.field_no_view = 0
+ AND l.field_id = f.field_id
+ ORDER BY f.field_order';
+ $result = $this->db->sql_query($sql);
+
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ $this->profile_cache[$row['field_ident']] = $row;
+ }
+ $this->db->sql_freeresult($result);
+ }
+
+ /**
+ * Submit profile field for validation
+ */
+ public function submit_cp_field($mode, $lang_id, &$cp_data, &$cp_error)
+ {
+ $sql_where = '';
+ switch ($mode)
+ {
+ case 'register':
+ // If the field is required we show it on the registration page
+ $sql_where .= ' AND f.field_show_on_reg = 1';
+ break;
+
+ case 'profile':
+ // Show hidden fields to moderators/admins
+ if (!$this->auth->acl_gets('a_', 'm_') && !$this->auth->acl_getf_global('m_'))
+ {
+ $sql_where .= ' AND f.field_show_profile = 1';
+ }
+ break;
+
+ default:
+ trigger_error('Wrong profile mode specified', E_USER_ERROR);
+ break;
+ }
+
+ $sql = 'SELECT l.*, f.*
+ FROM ' . $this->fields_language_table . ' l, ' . $this->fields_table . ' f
+ WHERE l.lang_id = ' . (int) $lang_id . "
+ AND f.field_active = 1
+ $sql_where
+ AND l.field_id = f.field_id
+ ORDER BY f.field_order";
+ $result = $this->db->sql_query($sql);
+
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ $profile_field = $this->type_collection[$row['field_type']];
+ $cp_data['pf_' . $row['field_ident']] = $profile_field->get_profile_field($row);
+ $check_value = $cp_data['pf_' . $row['field_ident']];
+
+ if (($cp_result = $profile_field->validate_profile_field($check_value, $row)) !== false)
+ {
+ // If the result is not false, it's an error message
+ $cp_error[] = $cp_result;
+ }
+ }
+ $this->db->sql_freeresult($result);
+ }
+
+ /**
+ * Update profile field data directly
+ */
+ public function update_profile_field_data($user_id, $cp_data)
+ {
+ if (!sizeof($cp_data))
+ {
+ return;
+ }
+
+ $sql = 'UPDATE ' . $this->fields_data_table . '
+ SET ' . $this->db->sql_build_array('UPDATE', $cp_data) . '
+ WHERE user_id = ' . (int) $user_id;
+ $this->db->sql_query($sql);
+
+ if (!$this->db->sql_affectedrows())
+ {
+ $cp_data['user_id'] = (int) $user_id;
+
+ $this->db->sql_return_on_error(true);
+
+ $sql = 'INSERT INTO ' . $this->fields_data_table . ' ' . $this->db->sql_build_array('INSERT', $cp_data);
+ $this->db->sql_query($sql);
+
+ $this->db->sql_return_on_error(false);
+ }
+ }
+
+ /**
+ * Generate the template arrays in order to display the column names
+ *
+ * @param string $restrict_option Restrict the published fields to a certain profile field option
+ * @return array Returns an array with the template variables type, name and explain for the fields to display
+ */
+ public function generate_profile_fields_template_headlines($restrict_option = '')
+ {
+ if (!sizeof($this->profile_cache))
+ {
+ $this->build_cache();
+ }
+
+ $tpl_fields = array();
+
+ // Go through the fields in correct order
+ foreach ($this->profile_cache as $field_ident => $field_data)
+ {
+ if ($restrict_option && !$field_data[$restrict_option])
+ {
+ continue;
+ }
+
+ $profile_field = $this->type_collection[$field_data['field_type']];
+
+ $tpl_fields[] = array(
+ 'PROFILE_FIELD_TYPE' => $field_data['field_type'],
+ 'PROFILE_FIELD_NAME' => $profile_field->get_field_name($field_data['lang_name']),
+ 'PROFILE_FIELD_EXPLAIN' => $this->user->lang($field_data['lang_explain']),
+ );
+ }
+
+ return $tpl_fields;
+ }
+
+ /**
+ * Grab the user specific profile fields data
+ *
+ * @param int|array $user_ids Single user id or an array of ids
+ * @return array Users profile fields data
+ */
+ public function grab_profile_fields_data($user_ids = 0)
+ {
+ if (!is_array($user_ids))
+ {
+ $user_ids = array($user_ids);
+ }
+
+ if (!sizeof($this->profile_cache))
+ {
+ $this->build_cache();
+ }
+
+ if (!sizeof($user_ids))
+ {
+ return array();
+ }
+
+ $sql = 'SELECT *
+ FROM ' . $this->fields_data_table . '
+ WHERE ' . $this->db->sql_in_set('user_id', array_map('intval', $user_ids));
+ $result = $this->db->sql_query($sql);
+
+ $field_data = array();
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ $field_data[$row['user_id']] = $row;
+ }
+ $this->db->sql_freeresult($result);
+
+ $user_fields = array();
+
+ // Go through the fields in correct order
+ foreach (array_keys($this->profile_cache) as $used_ident)
+ {
+ foreach ($field_data as $user_id => $row)
+ {
+ $user_fields[$user_id][$used_ident]['value'] = $row['pf_' . $used_ident];
+ $user_fields[$user_id][$used_ident]['data'] = $this->profile_cache[$used_ident];
+ }
+
+ foreach ($user_ids as $user_id)
+ {
+ if (!isset($user_fields[$user_id][$used_ident]) && $this->profile_cache[$used_ident]['field_show_novalue'])
+ {
+ $user_fields[$user_id][$used_ident]['value'] = '';
+ $user_fields[$user_id][$used_ident]['data'] = $this->profile_cache[$used_ident];
+ }
+ }
+ }
+
+ return $user_fields;
+ }
+
+ /**
+ * Assign the user's profile fields data to the template
+ *
+ * @param array $profile_row Array with users profile field data
+ * @param bool $use_contact_fields Should we display contact fields as such?
+ * This requires special treatments (links should not be parsed in the values, and more)
+ * @return array
+ */
+ public function generate_profile_fields_template_data($profile_row, $use_contact_fields = true)
+ {
+ // $profile_row == $user_fields[$row['user_id']];
+ $tpl_fields = array();
+ $tpl_fields['row'] = $tpl_fields['blockrow'] = array();
+
+ foreach ($profile_row as $ident => $ident_ary)
+ {
+ $profile_field = $this->type_collection[$ident_ary['data']['field_type']];
+ $value = $profile_field->get_profile_value($ident_ary['value'], $ident_ary['data']);
+
+ if ($value === null)
+ {
+ continue;
+ }
+
+ $field_desc = $contact_url = '';
+ if ($use_contact_fields)
+ {
+ $value = $profile_field->get_profile_contact_value($ident_ary['value'], $ident_ary['data']);
+ $field_desc = $this->user->lang($ident_ary['data']['field_contact_desc']);
+ if (strpos($field_desc, '%s') !== false)
+ {
+ $field_desc = sprintf($field_desc, $value);
+ }
+ $contact_url = '';
+ if (strpos($ident_ary['data']['field_contact_url'], '%s') !== false)
+ {
+ $contact_url = sprintf($ident_ary['data']['field_contact_url'], $value);
+ }
+ }
+
+ $tpl_fields['row'] += array(
+ 'PROFILE_' . strtoupper($ident) . '_IDENT' => $ident,
+ 'PROFILE_' . strtoupper($ident) . '_VALUE' => $value,
+ 'PROFILE_' . strtoupper($ident) . '_CONTACT'=> $contact_url,
+ 'PROFILE_' . strtoupper($ident) . '_DESC' => $field_desc,
+ 'PROFILE_' . strtoupper($ident) . '_TYPE' => $ident_ary['data']['field_type'],
+ 'PROFILE_' . strtoupper($ident) . '_NAME' => $this->user->lang($ident_ary['data']['lang_name']),
+ 'PROFILE_' . strtoupper($ident) . '_EXPLAIN'=> $this->user->lang($ident_ary['data']['lang_explain']),
+
+ 'S_PROFILE_' . strtoupper($ident) . '_CONTACT' => $ident_ary['data']['field_is_contact'],
+ 'S_PROFILE_' . strtoupper($ident) => true,
+ );
+
+ $tpl_fields['blockrow'][] = array(
+ 'PROFILE_FIELD_IDENT' => $ident,
+ 'PROFILE_FIELD_VALUE' => $value,
+ 'PROFILE_FIELD_CONTACT' => $contact_url,
+ 'PROFILE_FIELD_DESC' => $field_desc,
+ 'PROFILE_FIELD_TYPE' => $ident_ary['data']['field_type'],
+ 'PROFILE_FIELD_NAME' => $this->user->lang($ident_ary['data']['lang_name']),
+ 'PROFILE_FIELD_EXPLAIN' => $this->user->lang($ident_ary['data']['lang_explain']),
+
+ 'S_PROFILE_CONTACT' => $ident_ary['data']['field_is_contact'],
+ 'S_PROFILE_' . strtoupper($ident) => true,
+ );
+ }
+
+ return $tpl_fields;
+ }
+
+ /**
+ * Build Array for user insertion into custom profile fields table
+ */
+ public function build_insert_sql_array($cp_data)
+ {
+ $sql_not_in = array();
+ foreach ($cp_data as $key => $null)
+ {
+ $sql_not_in[] = (strncmp($key, 'pf_', 3) === 0) ? substr($key, 3) : $key;
+ }
+
+ $sql = 'SELECT f.field_type, f.field_ident, f.field_default_value, l.lang_default_value
+ FROM ' . $this->fields_language_table . ' l, ' . $this->fields_table . ' f
+ WHERE l.lang_id = ' . $this->user->get_iso_lang_id() . '
+ ' . ((sizeof($sql_not_in)) ? ' AND ' . $this->db->sql_in_set('f.field_ident', $sql_not_in, true) : '') . '
+ AND l.field_id = f.field_id';
+ $result = $this->db->sql_query($sql);
+
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ $profile_field = $this->type_collection[$row['field_type']];
+ $cp_data['pf_' . $row['field_ident']] = $profile_field->get_default_field_value($row);
+ }
+ $this->db->sql_freeresult($result);
+
+ return $cp_data;
+ }
+}
diff --git a/phpBB/phpbb/profilefields/type/type_base.php b/phpBB/phpbb/profilefields/type/type_base.php
new file mode 100644
index 0000000000..a96196674d
--- /dev/null
+++ b/phpBB/phpbb/profilefields/type/type_base.php
@@ -0,0 +1,191 @@
+<?php
+/**
+*
+* @package phpBB
+* @copyright (c) 2014 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\profilefields\type;
+
+abstract class type_base implements type_interface
+{
+ /**
+ * Request object
+ * @var \phpbb\request\request
+ */
+ protected $request;
+
+ /**
+ * Template object
+ * @var \phpbb\template\template
+ */
+ protected $template;
+
+ /**
+ * User object
+ * @var \phpbb\user
+ */
+ protected $user;
+
+ /**
+ * Construct
+ *
+ * @param \phpbb\request\request $request Request object
+ * @param \phpbb\template\template $template Template object
+ * @param \phpbb\user $user User object
+ * @param string $language_table Table where the language strings are stored
+ */
+ public function __construct(\phpbb\request\request $request, \phpbb\template\template $template, \phpbb\user $user)
+ {
+ $this->request = $request;
+ $this->template = $template;
+ $this->user = $user;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function get_name()
+ {
+ return $this->user->lang('FIELD_' . strtoupper($this->get_name_short()));
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function get_service_name()
+ {
+ return 'profilefields.type.' . $this->get_name_short();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function get_template_filename()
+ {
+ return 'profilefields/' . $this->get_name_short() . '.html';
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function get_field_ident($field_data)
+ {
+ return 'pf_' . $field_data['field_ident'];
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function get_field_name($field_name)
+ {
+ return isset($this->user->lang[$field_name]) ? $this->user->lang[$field_name] : $field_name;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function get_profile_contact_value($field_value, $field_data)
+ {
+ return $this->get_profile_value($field_value, $field_data);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function get_language_options_input($field_data)
+ {
+ $field_data['l_lang_name'] = $this->request->variable('l_lang_name', array(0 => ''), true);
+ $field_data['l_lang_explain'] = $this->request->variable('l_lang_explain', array(0 => ''), true);
+ $field_data['l_lang_default_value'] = $this->request->variable('l_lang_default_value', array(0 => ''), true);
+ $field_data['l_lang_options'] = $this->request->variable('l_lang_options', array(0 => ''), true);
+
+ return $field_data;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function prepare_options_form(&$exclude_options, &$visibility_options)
+ {
+ return $this->request->variable('lang_options', '', true);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function validate_options_on_submit($error, $field_data)
+ {
+ return $error;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function get_excluded_options($key, $action, $current_value, &$field_data, $step)
+ {
+ if ($step == 3 && ($field_data[$key] || $action != 'edit') && $key == 'l_lang_options' && is_array($field_data[$key]))
+ {
+ foreach ($field_data[$key] as $lang_id => $options)
+ {
+ $field_data[$key][$lang_id] = explode("\n", $options);
+ }
+
+ return $current_value;
+ }
+
+ return $current_value;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function prepare_hidden_fields($step, $key, $action, &$field_data)
+ {
+ if (!$this->request->is_set($key))
+ {
+ // Do not set this variable, we will use the default value
+ return null;
+ }
+ else if ($key == 'field_ident' && isset($field_data[$key]))
+ {
+ return $field_data[$key];
+ }
+ else
+ {
+ return $this->request->variable($key, '', true);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function display_options(&$template_vars, &$field_data)
+ {
+ return;
+ }
+
+ /**
+ * Return templated value/field. Possible values for $mode are:
+ * change == user is able to set/enter profile values; preview == just show the value
+ */
+ public function process_field_row($mode, $profile_row)
+ {
+ $preview_options = ($mode == 'preview') ? $profile_row['lang_options'] : false;
+
+ // set template filename
+ $this->template->set_filenames(array(
+ 'cp_body' => $this->get_template_filename(),
+ ));
+
+ // empty previously filled blockvars
+ $this->template->destroy_block_vars($this->get_name_short());
+
+ // Assign template variables
+ $this->generate_field($profile_row, $preview_options);
+
+ return $this->template->assign_display('cp_body');
+ }
+}
diff --git a/phpBB/phpbb/profilefields/type/type_bool.php b/phpBB/phpbb/profilefields/type/type_bool.php
new file mode 100644
index 0000000000..fa9c0a8714
--- /dev/null
+++ b/phpBB/phpbb/profilefields/type/type_bool.php
@@ -0,0 +1,387 @@
+<?php
+/**
+*
+* @package phpBB
+* @copyright (c) 2014 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\profilefields\type;
+
+class type_bool extends type_base
+{
+ /**
+ * Profile fields language helper
+ * @var \phpbb\profilefields\lang_helper
+ */
+ protected $lang_helper;
+
+ /**
+ * Request object
+ * @var \phpbb\request\request
+ */
+ protected $request;
+
+ /**
+ * Template object
+ * @var \phpbb\template\template
+ */
+ protected $template;
+
+ /**
+ * User object
+ * @var \phpbb\user
+ */
+ protected $user;
+
+ /**
+ * Construct
+ *
+ * @param \phpbb\profilefields\lang_helper $lang_helper Profile fields language helper
+ * @param \phpbb\request\request $request Request object
+ * @param \phpbb\template\template $template Template object
+ * @param \phpbb\user $user User object
+ * @param string $language_table Table where the language strings are stored
+ */
+ public function __construct(\phpbb\profilefields\lang_helper $lang_helper, \phpbb\request\request $request, \phpbb\template\template $template, \phpbb\user $user)
+ {
+ $this->lang_helper = $lang_helper;
+ $this->request = $request;
+ $this->template = $template;
+ $this->user = $user;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function get_name_short()
+ {
+ return 'bool';
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function get_options($default_lang_id, $field_data)
+ {
+ $profile_row = array(
+ 'var_name' => 'field_default_value',
+ 'field_id' => 1,
+ 'lang_name' => $field_data['lang_name'],
+ 'lang_explain' => $field_data['lang_explain'],
+ 'lang_id' => $default_lang_id,
+ 'field_default_value' => $field_data['field_default_value'],
+ 'field_ident' => 'field_default_value',
+ 'field_type' => $this->get_service_name(),
+ 'field_length' => $field_data['field_length'],
+ 'lang_options' => $field_data['lang_options'],
+ );
+
+ $options = array(
+ 0 => array('TITLE' => $this->user->lang['FIELD_TYPE'], 'EXPLAIN' => $this->user->lang['BOOL_TYPE_EXPLAIN'], 'FIELD' => '<label><input type="radio" class="radio" name="field_length" value="1"' . (($field_data['field_length'] == 1) ? ' checked="checked"' : '') . ' onchange="document.getElementById(\'add_profile_field\').submit();" /> ' . $this->user->lang['RADIO_BUTTONS'] . '</label><label><input type="radio" class="radio" name="field_length" value="2"' . (($field_data['field_length'] == 2) ? ' checked="checked"' : '') . ' onchange="document.getElementById(\'add_profile_field\').submit();" /> ' . $this->user->lang['CHECKBOX'] . '</label>'),
+ 1 => array('TITLE' => $this->user->lang['DEFAULT_VALUE'], 'FIELD' => $this->process_field_row('preview', $profile_row)),
+ );
+
+ return $options;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function get_default_option_values()
+ {
+ return array(
+ 'field_length' => 1,
+ 'field_minlen' => 0,
+ 'field_maxlen' => 0,
+ 'field_validation' => '',
+ 'field_novalue' => 0,
+ 'field_default_value' => 0,
+ );
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function get_default_field_value($field_data)
+ {
+ return $field_data['field_default_value'];
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function get_profile_field($profile_row)
+ {
+ $var_name = 'pf_' . $profile_row['field_ident'];
+
+ // Checkbox
+ if ($profile_row['field_length'] == 2)
+ {
+ return ($this->request->is_set($var_name)) ? 1 : 0;
+ }
+ else
+ {
+ return $this->request->variable($var_name, (int) $profile_row['field_default_value']);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function validate_profile_field(&$field_value, $field_data)
+ {
+ $field_value = (bool) $field_value;
+
+ if (!$field_value && $field_data['field_required'])
+ {
+ return $this->user->lang('FIELD_REQUIRED', $this->get_field_name($field_data['lang_name']));
+ }
+
+ return false;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function get_profile_value($field_value, $field_data)
+ {
+ $field_id = $field_data['field_id'];
+ $lang_id = $field_data['lang_id'];
+
+ if (!$this->lang_helper->is_set($field_id, $lang_id))
+ {
+ $this->lang_helper->get_option_lang($field_id, $lang_id, FIELD_BOOL, false);
+ }
+
+ if (!$field_value && $field_data['field_show_novalue'])
+ {
+ $field_value = $field_data['field_default_value'];
+ }
+
+ if ($field_data['field_length'] == 1)
+ {
+ return ($this->lang_helper->is_set($field_id, $lang_id, (int) $field_value)) ? $this->lang_helper->get($field_id, $lang_id, (int) $field_value) : null;
+ }
+ else if (!$field_value)
+ {
+ return null;
+ }
+ else
+ {
+ return $this->lang_helper->is_set($field_id, $lang_id, $field_value + 1);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function generate_field($profile_row, $preview_options = false)
+ {
+ $profile_row['field_ident'] = (isset($profile_row['var_name'])) ? $profile_row['var_name'] : 'pf_' . $profile_row['field_ident'];
+ $field_ident = $profile_row['field_ident'];
+ $default_value = $profile_row['field_default_value'];
+
+ // checkbox - set the value to "true" if it has been set to 1
+ if ($profile_row['field_length'] == 2)
+ {
+ $value = ($this->request->is_set($field_ident) && $this->request->variable($field_ident, $default_value) == 1) ? true : ((!isset($this->user->profile_fields[$field_ident]) || $preview_options !== false) ? $default_value : $this->user->profile_fields[$field_ident]);
+ }
+ else
+ {
+ $value = ($this->request->is_set($field_ident)) ? $this->request->variable($field_ident, $default_value) : ((!isset($this->user->profile_fields[$field_ident]) || $preview_options !== false) ? $default_value : $this->user->profile_fields[$field_ident]);
+ }
+
+ $profile_row['field_value'] = (int) $value;
+ $this->template->assign_block_vars('bool', array_change_key_case($profile_row, CASE_UPPER));
+
+ if ($profile_row['field_length'] == 1)
+ {
+ if (!$this->lang_helper->is_set($profile_row['field_id'], $profile_row['lang_id'], 1))
+ {
+ $this->lang_helper->get_option_lang($profile_row['field_id'], $profile_row['lang_id'], $this->get_service_name(), $preview_options);
+ }
+
+ $options = $this->lang_helper->get($profile_row['field_id'], $profile_row['lang_id']);
+ foreach ($options as $option_id => $option_value)
+ {
+ $this->template->assign_block_vars('bool.options', array(
+ 'OPTION_ID' => $option_id,
+ 'CHECKED' => ($value == $option_id) ? ' checked="checked"' : '',
+ 'VALUE' => $option_value,
+ ));
+ }
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function get_field_ident($field_data)
+ {
+ return ($field_data['field_length'] == '1') ? '' : 'pf_' . $field_data['field_ident'];
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function get_database_column_type()
+ {
+ return 'TINT:2';
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function get_language_options($field_data)
+ {
+ $options = array(
+ 'lang_name' => 'string',
+ 'lang_options' => 'two_options',
+ );
+
+ if ($field_data['lang_explain'])
+ {
+ $options['lang_explain'] = 'text';
+ }
+
+ return $options;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function get_language_options_input($field_data)
+ {
+ $field_data['l_lang_name'] = $this->request->variable('l_lang_name', array(0 => ''), true);
+ $field_data['l_lang_explain'] = $this->request->variable('l_lang_explain', array(0 => ''), true);
+ $field_data['l_lang_default_value'] = $this->request->variable('l_lang_default_value', array(0 => ''), true);
+
+ /**
+ * @todo check if this line is correct...
+ $field_data['l_lang_default_value'] = $this->request->variable('l_lang_default_value', array(0 => array('')), true);
+ */
+ $field_data['l_lang_options'] = $this->request->variable('l_lang_options', array(0 => array('')), true);
+
+ return $field_data;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function prepare_options_form(&$exclude_options, &$visibility_options)
+ {
+ $exclude_options[1][] = 'lang_options';
+
+ return $this->request->variable('lang_options', array(''), true);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function validate_options_on_submit($error, $field_data)
+ {
+ if (empty($field_data['lang_options'][0]) || empty($field_data['lang_options'][1]))
+ {
+ $error[] = $this->user->lang['NO_FIELD_ENTRIES'];
+ }
+
+ return $error;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function get_excluded_options($key, $action, $current_value, &$field_data, $step)
+ {
+ if ($step == 2 && $key == 'field_default_value')
+ {
+ // 'field_length' == 1 defines radio buttons. Possible values are 1 or 2 only.
+ // 'field_length' == 2 defines checkbox. Possible values are 0 or 1 only.
+ // If we switch the type on step 2, we have to adjust field value.
+ // 1 is a common value for the checkbox and radio buttons.
+
+ // Adjust unchecked checkbox value.
+ // If we return or save settings from 2nd/3rd page
+ // and the checkbox is unchecked, set the value to 0.
+ if ($this->request->is_set('step') && !$this->request->is_set($key))
+ {
+ return 0;
+ }
+
+ // If we switch to the checkbox type but former radio buttons value was 2,
+ // which is not the case for the checkbox, set it to 0 (unchecked).
+ if ($field_data['field_length'] == 2 && $current_value == 2)
+ {
+ return 0;
+ }
+ // If we switch to the radio buttons but the former checkbox value was 0,
+ // which is not the case for the radio buttons, set it to 0.
+ else if ($field_data['field_length'] == 1 && $current_value == 0)
+ {
+ return 2;
+ }
+ }
+
+ if ($step == 3 && ($field_data[$key] || $action != 'edit') && $key == 'l_lang_options')
+ {
+ $field_data[$key] = $this->request->variable($key, array(0 => array('')), true);
+
+ return $current_value;
+ }
+
+ return parent::get_excluded_options($key, $action, $current_value, $field_data, $step);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function prepare_hidden_fields($step, $key, $action, &$field_data)
+ {
+ if ($key == 'l_lang_options' && $this->request->is_set('l_lang_options'))
+ {
+ return $this->request->variable($key, array(array('')), true);
+ }
+ else if ($key == 'field_default_value')
+ {
+ return $this->request->variable($key, $field_data[$key]);
+ }
+ else
+ {
+ if (!$this->request->is_set($key))
+ {
+ return false;
+ }
+ else if ($key == 'field_ident' && isset($field_data[$key]))
+ {
+ return $field_data[$key];
+ }
+ else
+ {
+ return ($key == 'lang_options') ? $this->request->variable($key, array(''), true) : $this->request->variable($key, '', true);
+ }
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function display_options(&$template_vars, &$field_data)
+ {
+ // Initialize these array elements if we are creating a new field
+ if (!sizeof($field_data['lang_options']))
+ {
+ // No options have been defined for a boolean field.
+ $field_data['lang_options'][0] = '';
+ $field_data['lang_options'][1] = '';
+ }
+
+ $template_vars = array_merge($template_vars, array(
+ 'S_BOOL' => true,
+ 'L_LANG_OPTIONS_EXPLAIN' => $this->user->lang['BOOL_ENTRIES_EXPLAIN'],
+ 'FIRST_LANG_OPTION' => $field_data['lang_options'][0],
+ 'SECOND_LANG_OPTION' => $field_data['lang_options'][1],
+ ));
+ }
+}
diff --git a/phpBB/phpbb/profilefields/type/type_date.php b/phpBB/phpbb/profilefields/type/type_date.php
new file mode 100644
index 0000000000..af3d65c9b6
--- /dev/null
+++ b/phpBB/phpbb/profilefields/type/type_date.php
@@ -0,0 +1,358 @@
+<?php
+/**
+*
+* @package phpBB
+* @copyright (c) 2014 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\profilefields\type;
+
+class type_date extends type_base
+{
+ /**
+ * Request object
+ * @var \phpbb\request\request
+ */
+ protected $request;
+
+ /**
+ * Template object
+ * @var \phpbb\template\template
+ */
+ protected $template;
+
+ /**
+ * User object
+ * @var \phpbb\user
+ */
+ protected $user;
+
+ /**
+ * Construct
+ *
+ * @param \phpbb\request\request $request Request object
+ * @param \phpbb\template\template $template Template object
+ * @param \phpbb\user $user User object
+ * @param string $language_table Table where the language strings are stored
+ */
+ public function __construct(\phpbb\request\request $request, \phpbb\template\template $template, \phpbb\user $user)
+ {
+ $this->request = $request;
+ $this->template = $template;
+ $this->user = $user;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function get_name_short()
+ {
+ return 'date';
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function get_options($default_lang_id, $field_data)
+ {
+ $profile_row = array(
+ 'var_name' => 'field_default_value',
+ 'lang_name' => $field_data['lang_name'],
+ 'lang_explain' => $field_data['lang_explain'],
+ 'lang_id' => $default_lang_id,
+ 'field_default_value' => $field_data['field_default_value'],
+ 'field_ident' => 'field_default_value',
+ 'field_type' => $this->get_service_name(),
+ 'field_length' => $field_data['field_length'],
+ 'lang_options' => $field_data['lang_options'],
+ );
+
+ $always_now = request_var('always_now', -1);
+ if ($always_now == -1)
+ {
+ $s_checked = ($field_data['field_default_value'] == 'now') ? true : false;
+ }
+ else
+ {
+ $s_checked = ($always_now) ? true : false;
+ }
+
+ $options = array(
+ 0 => array('TITLE' => $this->user->lang['DEFAULT_VALUE'], 'FIELD' => $this->process_field_row('preview', $profile_row)),
+ 1 => array('TITLE' => $this->user->lang['ALWAYS_TODAY'], 'FIELD' => '<label><input type="radio" class="radio" name="always_now" value="1"' . (($s_checked) ? ' checked="checked"' : '') . ' onchange="document.getElementById(\'add_profile_field\').submit();" /> ' . $this->user->lang['YES'] . '</label><label><input type="radio" class="radio" name="always_now" value="0"' . ((!$s_checked) ? ' checked="checked"' : '') . ' onchange="document.getElementById(\'add_profile_field\').submit();" /> ' . $this->user->lang['NO'] . '</label>'),
+ );
+
+ return $options;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function get_default_option_values()
+ {
+ return array(
+ 'field_length' => 10,
+ 'field_minlen' => 10,
+ 'field_maxlen' => 10,
+ 'field_validation' => '',
+ 'field_novalue' => ' 0- 0- 0',
+ 'field_default_value' => ' 0- 0- 0',
+ );
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function get_default_field_value($field_data)
+ {
+ if ($field_data['field_default_value'] == 'now')
+ {
+ $now = getdate();
+ $field_data['field_default_value'] = sprintf('%2d-%2d-%4d', $now['mday'], $now['mon'], $now['year']);
+ }
+
+ return $field_data['field_default_value'];
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function get_profile_field($profile_row)
+ {
+ $var_name = 'pf_' . $profile_row['field_ident'];
+
+ if (!$this->request->is_set($var_name . '_day'))
+ {
+ if ($profile_row['field_default_value'] == 'now')
+ {
+ $now = getdate();
+ $profile_row['field_default_value'] = sprintf('%2d-%2d-%4d', $now['mday'], $now['mon'], $now['year']);
+ }
+ list($day, $month, $year) = explode('-', $profile_row['field_default_value']);
+ }
+ else
+ {
+ $day = $this->request->variable($var_name . '_day', 0);
+ $month = $this->request->variable($var_name . '_month', 0);
+ $year = $this->request->variable($var_name . '_year', 0);
+ }
+
+ return sprintf('%2d-%2d-%4d', $day, $month, $year);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function validate_profile_field(&$field_value, $field_data)
+ {
+ $field_validate = explode('-', $field_value);
+
+ $day = (isset($field_validate[0])) ? (int) $field_validate[0] : 0;
+ $month = (isset($field_validate[1])) ? (int) $field_validate[1] : 0;
+ $year = (isset($field_validate[2])) ? (int) $field_validate[2] : 0;
+
+ if ((!$day || !$month || !$year) && !$field_data['field_required'])
+ {
+ return false;
+ }
+
+ if ((!$day || !$month || !$year) && $field_data['field_required'])
+ {
+ return $this->user->lang('FIELD_REQUIRED', $this->get_field_name($field_data['lang_name']));
+ }
+
+ if ($day < 0 || $day > 31 || $month < 0 || $month > 12 || ($year < 1901 && $year > 0) || $year > gmdate('Y', time()) + 50)
+ {
+ return $this->user->lang('FIELD_INVALID_DATE', $this->get_field_name($field_data['lang_name']));
+ }
+
+ if (checkdate($month, $day, $year) === false)
+ {
+ return $this->user->lang('FIELD_INVALID_DATE', $this->get_field_name($field_data['lang_name']));
+ }
+
+ return false;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function get_profile_value($field_value, $field_data)
+ {
+ $date = explode('-', $field_value);
+ $day = (isset($date[0])) ? (int) $date[0] : 0;
+ $month = (isset($date[1])) ? (int) $date[1] : 0;
+ $year = (isset($date[2])) ? (int) $date[2] : 0;
+
+ if (!$day && !$month && !$year && !$field_data['field_show_novalue'])
+ {
+ return null;
+ }
+ else if ($day && $month && $year)
+ {
+ // Date should display as the same date for every user regardless of timezone
+ return $this->user->create_datetime()
+ ->setDate($year, $month, $day)
+ ->setTime(0, 0, 0)
+ ->format($this->user->lang['DATE_FORMAT'], true);
+ }
+
+ return $field_value;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function generate_field($profile_row, $preview_options = false)
+ {
+ $profile_row['field_ident'] = (isset($profile_row['var_name'])) ? $profile_row['var_name'] : 'pf_' . $profile_row['field_ident'];
+ $field_ident = $profile_row['field_ident'];
+
+ $now = getdate();
+
+ if (!$this->request->is_set($profile_row['field_ident'] . '_day'))
+ {
+ if ($profile_row['field_default_value'] == 'now')
+ {
+ $profile_row['field_default_value'] = sprintf('%2d-%2d-%4d', $now['mday'], $now['mon'], $now['year']);
+ }
+ list($day, $month, $year) = explode('-', ((!isset($this->user->profile_fields[$field_ident]) || $preview_options !== false) ? $profile_row['field_default_value'] : $this->user->profile_fields[$field_ident]));
+ }
+ else
+ {
+ if ($preview_options !== false && $profile_row['field_default_value'] == 'now')
+ {
+ $profile_row['field_default_value'] = sprintf('%2d-%2d-%4d', $now['mday'], $now['mon'], $now['year']);
+ list($day, $month, $year) = explode('-', ((!isset($this->user->profile_fields[$field_ident]) || $preview_options !== false) ? $profile_row['field_default_value'] : $this->user->profile_fields[$field_ident]));
+ }
+ else
+ {
+ $day = $this->request->variable($profile_row['field_ident'] . '_day', 0);
+ $month = $this->request->variable($profile_row['field_ident'] . '_month', 0);
+ $year = $this->request->variable($profile_row['field_ident'] . '_year', 0);
+ }
+ }
+
+ $profile_row['s_day_options'] = '<option value="0"' . ((!$day) ? ' selected="selected"' : '') . '>--</option>';
+ for ($i = 1; $i < 32; $i++)
+ {
+ $profile_row['s_day_options'] .= '<option value="' . $i . '"' . (($i == $day) ? ' selected="selected"' : '') . ">$i</option>";
+ }
+
+ $profile_row['s_month_options'] = '<option value="0"' . ((!$month) ? ' selected="selected"' : '') . '>--</option>';
+ for ($i = 1; $i < 13; $i++)
+ {
+ $profile_row['s_month_options'] .= '<option value="' . $i . '"' . (($i == $month) ? ' selected="selected"' : '') . ">$i</option>";
+ }
+
+ $profile_row['s_year_options'] = '<option value="0"' . ((!$year) ? ' selected="selected"' : '') . '>--</option>';
+ for ($i = $now['year'] - 100; $i <= $now['year'] + 100; $i++)
+ {
+ $profile_row['s_year_options'] .= '<option value="' . $i . '"' . (($i == $year) ? ' selected="selected"' : '') . ">$i</option>";
+ }
+
+ $profile_row['field_value'] = 0;
+ $this->template->assign_block_vars('date', array_change_key_case($profile_row, CASE_UPPER));
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function get_field_ident($field_data)
+ {
+ return '';
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function get_database_column_type()
+ {
+ return 'VCHAR:10';
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function get_language_options($field_data)
+ {
+ $options = array(
+ 'lang_name' => 'string',
+ );
+
+ if ($field_data['lang_explain'])
+ {
+ $options['lang_explain'] = 'text';
+ }
+
+ return $options;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function get_excluded_options($key, $action, $current_value, &$field_data, $step)
+ {
+ if ($step == 2 && $key == 'field_default_value')
+ {
+ $always_now = $this->request->variable('always_now', -1);
+
+ if ($always_now == 1 || ($always_now === -1 && $current_value == 'now'))
+ {
+ $now = getdate();
+
+ $field_data['field_default_value_day'] = $now['mday'];
+ $field_data['field_default_value_month'] = $now['mon'];
+ $field_data['field_default_value_year'] = $now['year'];
+ $current_value = 'now';
+ $this->request->overwrite('field_default_value', $current_value, \phpbb\request\request_interface::POST);
+ }
+ else
+ {
+ if ($this->request->is_set('field_default_value_day'))
+ {
+ $field_data['field_default_value_day'] = $this->request->variable('field_default_value_day', 0);
+ $field_data['field_default_value_month'] = $this->request->variable('field_default_value_month', 0);
+ $field_data['field_default_value_year'] = $this->request->variable('field_default_value_year', 0);
+ $current_value = sprintf('%2d-%2d-%4d', $field_data['field_default_value_day'], $field_data['field_default_value_month'], $field_data['field_default_value_year']);
+ $this->request->overwrite('field_default_value', $current_value, \phpbb\request\request_interface::POST);
+ }
+ else
+ {
+ list($field_data['field_default_value_day'], $field_data['field_default_value_month'], $field_data['field_default_value_year']) = explode('-', $current_value);
+ }
+ }
+
+ return $current_value;
+ }
+
+ return parent::get_excluded_options($key, $action, $current_value, $field_data, $step);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function prepare_hidden_fields($step, $key, $action, &$field_data)
+ {
+ if ($key == 'field_default_value')
+ {
+ $always_now = $this->request->variable('always_now', 0);
+
+ if ($always_now)
+ {
+ return 'now';
+ }
+ else if ($this->request->is_set('field_default_value_day'))
+ {
+ $field_data['field_default_value_day'] = $this->request->variable('field_default_value_day', 0);
+ $field_data['field_default_value_month'] = $this->request->variable('field_default_value_month', 0);
+ $field_data['field_default_value_year'] = $this->request->variable('field_default_value_year', 0);
+ return sprintf('%2d-%2d-%4d', $field_data['field_default_value_day'], $field_data['field_default_value_month'], $field_data['field_default_value_year']);
+ }
+ }
+
+ return parent::prepare_hidden_fields($step, $key, $action, $field_data);
+ }
+}
diff --git a/phpBB/phpbb/profilefields/type/type_dropdown.php b/phpBB/phpbb/profilefields/type/type_dropdown.php
new file mode 100644
index 0000000000..bcf0ba05f9
--- /dev/null
+++ b/phpBB/phpbb/profilefields/type/type_dropdown.php
@@ -0,0 +1,297 @@
+<?php
+/**
+*
+* @package phpBB
+* @copyright (c) 2014 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\profilefields\type;
+
+class type_dropdown extends type_base
+{
+ /**
+ * Profile fields language helper
+ * @var \phpbb\profilefields\lang_helper
+ */
+ protected $lang_helper;
+
+ /**
+ * Request object
+ * @var \phpbb\request\request
+ */
+ protected $request;
+
+ /**
+ * Template object
+ * @var \phpbb\template\template
+ */
+ protected $template;
+
+ /**
+ * User object
+ * @var \phpbb\user
+ */
+ protected $user;
+
+ /**
+ * Construct
+ *
+ * @param \phpbb\profilefields\lang_helper $lang_helper Profile fields language helper
+ * @param \phpbb\request\request $request Request object
+ * @param \phpbb\template\template $template Template object
+ * @param \phpbb\user $user User object
+ * @param string $language_table Table where the language strings are stored
+ */
+ public function __construct(\phpbb\profilefields\lang_helper $lang_helper, \phpbb\request\request $request, \phpbb\template\template $template, \phpbb\user $user)
+ {
+ $this->lang_helper = $lang_helper;
+ $this->request = $request;
+ $this->template = $template;
+ $this->user = $user;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function get_name_short()
+ {
+ return 'dropdown';
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function get_options($default_lang_id, $field_data)
+ {
+ $profile_row[0] = array(
+ 'var_name' => 'field_default_value',
+ 'field_id' => 1,
+ 'lang_name' => $field_data['lang_name'],
+ 'lang_explain' => $field_data['lang_explain'],
+ 'lang_id' => $default_lang_id,
+ 'field_default_value' => $field_data['field_default_value'],
+ 'field_ident' => 'field_default_value',
+ 'field_type' => $this->get_service_name(),
+ 'lang_options' => $field_data['lang_options'],
+ );
+
+ $profile_row[1] = $profile_row[0];
+ $profile_row[1]['var_name'] = 'field_novalue';
+ $profile_row[1]['field_ident'] = 'field_novalue';
+ $profile_row[1]['field_default_value'] = $field_data['field_novalue'];
+
+ $options = array(
+ 0 => array('TITLE' => $this->user->lang['DEFAULT_VALUE'], 'FIELD' => $this->process_field_row('preview', $profile_row[0])),
+ 1 => array('TITLE' => $this->user->lang['NO_VALUE_OPTION'], 'EXPLAIN' => $this->user->lang['NO_VALUE_OPTION_EXPLAIN'], 'FIELD' => $this->process_field_row('preview', $profile_row[1])),
+ );
+
+ return $options;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function get_default_option_values()
+ {
+ return array(
+ 'field_length' => 0,
+ 'field_minlen' => 0,
+ 'field_maxlen' => 5,
+ 'field_validation' => '',
+ 'field_novalue' => 0,
+ 'field_default_value' => 0,
+ );
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function get_default_field_value($field_data)
+ {
+ return $field_data['field_default_value'];
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function get_profile_field($profile_row)
+ {
+ $var_name = 'pf_' . $profile_row['field_ident'];
+ return $this->request->variable($var_name, (int) $profile_row['field_default_value']);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function validate_profile_field(&$field_value, $field_data)
+ {
+ $field_value = (int) $field_value;
+
+ // retrieve option lang data if necessary
+ if (!$this->lang_helper->is_set($field_data['field_id'], $field_data['lang_id'], 1))
+ {
+ $this->lang_helper->get_option_lang($field_data['field_id'], $field_data['lang_id'], $this->get_service_name(), false);
+ }
+
+ if (!$this->lang_helper->is_set($field_data['field_id'], $field_data['lang_id'], $field_value))
+ {
+ return $this->user->lang('FIELD_INVALID_VALUE', $this->get_field_name($field_data['lang_name']));
+ }
+
+ if ($field_value == $field_data['field_novalue'] && $field_data['field_required'])
+ {
+ return $this->user->lang('FIELD_REQUIRED', $this->get_field_name($field_data['lang_name']));
+ }
+
+ return false;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function get_profile_value($field_value, $field_data)
+ {
+ $field_id = $field_data['field_id'];
+ $lang_id = $field_data['lang_id'];
+ if (!$this->lang_helper->is_set($field_id, $lang_id))
+ {
+ $this->lang_helper->get_option_lang($field_id, $lang_id, $this->get_service_name(), false);
+ }
+
+ if ($field_value == $field_data['field_novalue'] && !$field_data['field_show_novalue'])
+ {
+ return null;
+ }
+
+ $field_value = (int) $field_value;
+
+ // User not having a value assigned
+ if (!$this->lang_helper->is_set($field_id, $lang_id, $field_value))
+ {
+ if ($field_data['field_show_novalue'])
+ {
+ $field_value = $field_data['field_novalue'];
+ }
+ else
+ {
+ return null;
+ }
+ }
+
+ return $this->lang_helper->get($field_id, $lang_id, $field_value);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function generate_field($profile_row, $preview_options = false)
+ {
+ $profile_row['field_ident'] = (isset($profile_row['var_name'])) ? $profile_row['var_name'] : 'pf_' . $profile_row['field_ident'];
+ $field_ident = $profile_row['field_ident'];
+ $default_value = $profile_row['field_default_value'];
+
+ $value = ($this->request->is_set($field_ident)) ? $this->request->variable($field_ident, $default_value) : ((!isset($this->user->profile_fields[$field_ident]) || $preview_options !== false) ? $default_value : $this->user->profile_fields[$field_ident]);
+
+ if (!$this->lang_helper->is_set($profile_row['field_id'], $profile_row['lang_id'], 1))
+ {
+ $this->lang_helper->get_option_lang($profile_row['field_id'], $profile_row['lang_id'], $this->get_service_name(), $preview_options);
+ }
+
+ $profile_row['field_value'] = (int) $value;
+ $this->template->assign_block_vars('dropdown', array_change_key_case($profile_row, CASE_UPPER));
+
+ $options = $this->lang_helper->get($profile_row['field_id'], $profile_row['lang_id']);
+ foreach ($options as $option_id => $option_value)
+ {
+ $this->template->assign_block_vars('dropdown.options', array(
+ 'OPTION_ID' => $option_id,
+ 'SELECTED' => ($value == $option_id) ? ' selected="selected"' : '',
+ 'VALUE' => $option_value,
+ ));
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function get_database_column_type()
+ {
+ return 'UINT';
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function get_language_options($field_data)
+ {
+ $options = array(
+ 'lang_name' => 'string',
+ 'lang_options' => 'optionfield',
+ );
+
+ if ($field_data['lang_explain'])
+ {
+ $options['lang_explain'] = 'text';
+ }
+
+ return $options;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function prepare_options_form(&$exclude_options, &$visibility_options)
+ {
+ $exclude_options[1][] = 'lang_options';
+
+ return $this->request->variable('lang_options', '', true);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function validate_options_on_submit($error, $field_data)
+ {
+ if (!sizeof($field_data['lang_options']))
+ {
+ $error[] = $this->user->lang['NO_FIELD_ENTRIES'];
+ }
+
+ return $error;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function get_excluded_options($key, $action, $current_value, &$field_data, $step)
+ {
+ if ($step == 2 && $key == 'field_maxlen')
+ {
+ // Get the number of options if this key is 'field_maxlen'
+ return sizeof(explode("\n", $this->request->variable('lang_options', '', true)));
+ }
+
+ return parent::get_excluded_options($key, $action, $current_value, $field_data, $step);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function display_options(&$template_vars, &$field_data)
+ {
+ // Initialize these array elements if we are creating a new field
+ if (!sizeof($field_data['lang_options']))
+ {
+ // No options have been defined for the dropdown menu
+ $field_data['lang_options'] = array();
+ }
+
+ $template_vars = array_merge($template_vars, array(
+ 'S_DROPDOWN' => true,
+ 'L_LANG_OPTIONS_EXPLAIN' => $this->user->lang['DROPDOWN_ENTRIES_EXPLAIN'],
+ 'LANG_OPTIONS' => implode("\n", $field_data['lang_options']),
+ ));
+ }
+}
diff --git a/phpBB/phpbb/profilefields/type/type_int.php b/phpBB/phpbb/profilefields/type/type_int.php
new file mode 100644
index 0000000000..c98c863e13
--- /dev/null
+++ b/phpBB/phpbb/profilefields/type/type_int.php
@@ -0,0 +1,234 @@
+<?php
+/**
+*
+* @package phpBB
+* @copyright (c) 2014 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\profilefields\type;
+
+class type_int extends type_base
+{
+ /**
+ * Request object
+ * @var \phpbb\request\request
+ */
+ protected $request;
+
+ /**
+ * Template object
+ * @var \phpbb\template\template
+ */
+ protected $template;
+
+ /**
+ * User object
+ * @var \phpbb\user
+ */
+ protected $user;
+
+ /**
+ * Construct
+ *
+ * @param \phpbb\request\request $request Request object
+ * @param \phpbb\template\template $template Template object
+ * @param \phpbb\user $user User object
+ * @param string $language_table Table where the language strings are stored
+ */
+ public function __construct(\phpbb\request\request $request, \phpbb\template\template $template, \phpbb\user $user)
+ {
+ $this->request = $request;
+ $this->template = $template;
+ $this->user = $user;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function get_name_short()
+ {
+ return 'int';
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function get_options($default_lang_id, $field_data)
+ {
+ $options = array(
+ 0 => array('TITLE' => $this->user->lang['FIELD_LENGTH'], 'FIELD' => '<input type="number" min="0" max="99999" name="field_length" size="5" value="' . $field_data['field_length'] . '" />'),
+ 1 => array('TITLE' => $this->user->lang['MIN_FIELD_NUMBER'], 'FIELD' => '<input type="number" min="0" max="99999" name="field_minlen" size="5" value="' . $field_data['field_minlen'] . '" />'),
+ 2 => array('TITLE' => $this->user->lang['MAX_FIELD_NUMBER'], 'FIELD' => '<input type="number" min="0" max="99999" name="field_maxlen" size="5" value="' . $field_data['field_maxlen'] . '" />'),
+ 3 => array('TITLE' => $this->user->lang['DEFAULT_VALUE'], 'FIELD' => '<input type="number" name="field_default_value" value="' . $field_data['field_default_value'] . '" />'),
+ );
+
+ return $options;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function get_default_option_values()
+ {
+ return array(
+ 'field_length' => 5,
+ 'field_minlen' => 0,
+ 'field_maxlen' => 100,
+ 'field_validation' => '',
+ 'field_novalue' => 0,
+ 'field_default_value' => 0,
+ );
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function get_default_field_value($field_data)
+ {
+ if ($field_data['field_default_value'] === '')
+ {
+ // We cannot insert an empty string into an integer column.
+ return null;
+ }
+
+ return $field_data['field_default_value'];
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function get_profile_field($profile_row)
+ {
+ $var_name = 'pf_' . $profile_row['field_ident'];
+ if ($this->request->is_set($var_name) && $this->request->variable($var_name, '') === '')
+ {
+ return null;
+ }
+ else
+ {
+ return $this->request->variable($var_name, (int) $profile_row['field_default_value']);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function validate_profile_field(&$field_value, $field_data)
+ {
+ if (trim($field_value) === '' && !$field_data['field_required'])
+ {
+ return false;
+ }
+
+ $field_value = (int) $field_value;
+
+ if ($field_value < $field_data['field_minlen'])
+ {
+ return $this->user->lang('FIELD_TOO_SMALL', (int) $field_data['field_minlen'], $this->get_field_name($field_data['lang_name']));
+ }
+ else if ($field_value > $field_data['field_maxlen'])
+ {
+ return $this->user->lang('FIELD_TOO_LARGE', (int) $field_data['field_maxlen'], $this->get_field_name($field_data['lang_name']));
+ }
+
+ return false;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function get_profile_value($field_value, $field_data)
+ {
+ if (($field_value === '' || $field_value === null) && !$field_data['field_show_novalue'])
+ {
+ return null;
+ }
+ return (int) $field_value;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function generate_field($profile_row, $preview_options = false)
+ {
+ $profile_row['field_ident'] = (isset($profile_row['var_name'])) ? $profile_row['var_name'] : 'pf_' . $profile_row['field_ident'];
+ $field_ident = $profile_row['field_ident'];
+ $default_value = $profile_row['field_default_value'];
+
+ if ($this->request->is_set($field_ident))
+ {
+ $value = ($this->request->variable($field_ident, '') === '') ? null : $this->request->variable($field_ident, $default_value);
+ }
+ else
+ {
+ if ($preview_options === false && array_key_exists($field_ident, $this->user->profile_fields) && is_null($this->user->profile_fields[$field_ident]))
+ {
+ $value = null;
+ }
+ else if (!isset($this->user->profile_fields[$field_ident]) || $preview_options !== false)
+ {
+ $value = $default_value;
+ }
+ else
+ {
+ $value = $this->user->profile_fields[$field_ident];
+ }
+ }
+
+ $profile_row['field_value'] = (is_null($value) || $value === '') ? '' : (int) $value;
+
+ $this->template->assign_block_vars('int', array_change_key_case($profile_row, CASE_UPPER));
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function get_field_ident($field_data)
+ {
+ return 'pf_' . $field_data['field_ident'];
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function get_database_column_type()
+ {
+ return 'BINT';
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function get_language_options($field_data)
+ {
+ $options = array(
+ 'lang_name' => 'string',
+ );
+
+ if ($field_data['lang_explain'])
+ {
+ $options['lang_explain'] = 'text';
+ }
+
+ return $options;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function get_excluded_options($key, $action, $current_value, &$field_data, $step)
+ {
+ if ($step == 2 && $key == 'field_default_value')
+ {
+ // Permit an empty string
+ if ($action == 'create' && $this->request->variable('field_default_value', '') === '')
+ {
+ return '';
+ }
+ }
+
+ return parent::get_excluded_options($key, $action, $current_value, $field_data, $step);
+ }
+}
diff --git a/phpBB/phpbb/profilefields/type/type_interface.php b/phpBB/phpbb/profilefields/type/type_interface.php
new file mode 100644
index 0000000000..a1c3d879c8
--- /dev/null
+++ b/phpBB/phpbb/profilefields/type/type_interface.php
@@ -0,0 +1,205 @@
+<?php
+/**
+*
+* @package phpBB
+* @copyright (c) 2014 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\profilefields\type;
+
+interface type_interface
+{
+ /**
+ * Get the translated name of the type
+ *
+ * @return string Translated name of the field type
+ */
+ public function get_name();
+
+ /**
+ * Get the short name of the type, used for error messages and template loops
+ *
+ * @return string lowercase version of the fields type
+ */
+ public function get_name_short();
+
+ /**
+ * Get the name of service representing the type
+ *
+ * @return string lowercase version of the fields type
+ */
+ public function get_service_name();
+
+ /**
+ * Get the name of template file for this type
+ *
+ * @return string Returns the name of the template file
+ */
+ public function get_template_filename();
+
+ /**
+ * Get dropdown options for second step in ACP
+ *
+ * @param string $default_lang_id ID of the default language
+ * @param array $field_data Array with data for this field
+ * @return array with the acp options
+ */
+ public function get_options($default_lang_id, $field_data);
+
+ /**
+ * Get default values for the options of this type
+ *
+ * @return array with values like default field size and more
+ */
+ public function get_default_option_values();
+
+ /**
+ * Get default value for this type
+ *
+ * @param array $field_data Array with data for this field
+ * @return mixed default value for new users when no value is given
+ */
+ public function get_default_field_value($field_data);
+
+ /**
+ * Get profile field value on submit
+ *
+ * @param array $profile_row Array with data for this field
+ * @return mixed Submitted value of the profile field
+ */
+ public function get_profile_field($profile_row);
+
+ /**
+ * Validate entered profile field data
+ *
+ * @param mixed $field_value Field value to validate
+ * @param array $field_data Array with requirements of the field
+ * @return mixed String with the error message
+ */
+ public function validate_profile_field(&$field_value, $field_data);
+
+ /**
+ * Get Profile Value for display
+ *
+ * @param mixed $field_value Field value as stored in the database
+ * @param array $field_data Array with requirements of the field
+ * @return mixed Field value to display
+ */
+ public function get_profile_value($field_value, $field_data);
+
+ /**
+ * Get Profile Value for display
+ *
+ * When displaying a contact field, we don't want to have links already parsed and more
+ *
+ * @param mixed $field_value Field value as stored in the database
+ * @param array $field_data Array with requirements of the field
+ * @return mixed Field value to display
+ */
+ public function get_profile_contact_value($field_value, $field_data);
+
+ /**
+ * Generate the input field for display
+ *
+ * @param array $profile_row Array with data for this field
+ * @param mixed $preview_options When previewing we use different data
+ * @return null
+ */
+ public function generate_field($profile_row, $preview_options = false);
+
+ /**
+ * Get the ident of the field
+ *
+ * Some types are multivalue, we can't give them a field_id
+ * as we would not know which to pick.
+ *
+ * @param array $field_data Array with data for this field
+ * @return string ident of the field
+ */
+ public function get_field_ident($field_data);
+
+ /**
+ * Get the column type for the database
+ *
+ * @return string Returns the database column type
+ */
+ public function get_database_column_type();
+
+ /**
+ * Get the options we need to display for the language input fields in the ACP
+ *
+ * @param array $field_data Array with data for this field
+ * @return array Returns the language options we need to generate
+ */
+ public function get_language_options($field_data);
+
+ /**
+ * Get the input for the supplied language options
+ *
+ * @param array $field_data Array with data for this field
+ * @return array Returns the language options we need to generate
+ */
+ public function get_language_options_input($field_data);
+
+ /**
+ * Allows exclusion of options in single steps of the creation process
+ *
+ * @param array $exclude_options Array with options that should be excluded in the steps
+ * @param array $visibility_options Array with options responsible for the fields visibility
+ * @return mixed Returns the provided language options
+ */
+ public function prepare_options_form(&$exclude_options, &$visibility_options);
+
+ /**
+ * Allows exclusion of options in single steps of the creation process
+ *
+ * @param array $error Array with error messages
+ * @param array $field_data Array with data for this field
+ * @return array Array with error messages
+ */
+ public function validate_options_on_submit($error, $field_data);
+
+ /**
+ * Allows manipulating the intended variables if needed
+ *
+ * @param string $key Name of the option
+ * @param string $action Currently performed action (create|edit)
+ * @param mixed $current_value Currently value of the option
+ * @param array $field_data Array with data for this field
+ * @param int $step Step on which the option is excluded
+ * @return mixed Final value of the option
+ */
+ public function get_excluded_options($key, $action, $current_value, &$field_data, $step);
+
+ /**
+ * Allows manipulating the intended variables if needed
+ *
+ * @param string $key Name of the option
+ * @param int $step Step on which the option is hidden
+ * @param string $action Currently performed action (create|edit)
+ * @param array $field_data Array with data for this field
+ * @return mixed Final value of the option
+ */
+ public function prepare_hidden_fields($step, $key, $action, &$field_data);
+
+ /**
+ * Allows assigning of additional template variables
+ *
+ * @param array $template_vars Template variables we are going to assign
+ * @param array $field_data Array with data for this field
+ * @return null
+ */
+ public function display_options(&$template_vars, &$field_data);
+
+ /**
+ * Return templated value/field. Possible values for $mode are:
+ * change == user is able to set/enter profile values; preview == just show the value
+ *
+ * @param string $mode Mode for displaying the field (preview|change)
+ * @param array $profile_row Array with data for this field
+ * @return null
+ */
+ public function process_field_row($mode, $profile_row);
+}
diff --git a/phpBB/phpbb/profilefields/type/type_string.php b/phpBB/phpbb/profilefields/type/type_string.php
new file mode 100644
index 0000000000..9dada592eb
--- /dev/null
+++ b/phpBB/phpbb/profilefields/type/type_string.php
@@ -0,0 +1,156 @@
+<?php
+/**
+*
+* @package phpBB
+* @copyright (c) 2014 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\profilefields\type;
+
+class type_string extends type_string_common
+{
+ /**
+ * Request object
+ * @var \phpbb\request\request
+ */
+ protected $request;
+
+ /**
+ * Template object
+ * @var \phpbb\template\template
+ */
+ protected $template;
+
+ /**
+ * User object
+ * @var \phpbb\user
+ */
+ protected $user;
+
+ /**
+ * Construct
+ *
+ * @param \phpbb\request\request $request Request object
+ * @param \phpbb\template\template $template Template object
+ * @param \phpbb\user $user User object
+ * @param string $language_table Table where the language strings are stored
+ */
+ public function __construct(\phpbb\request\request $request, \phpbb\template\template $template, \phpbb\user $user)
+ {
+ $this->request = $request;
+ $this->template = $template;
+ $this->user = $user;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function get_name_short()
+ {
+ return 'string';
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function get_options($default_lang_id, $field_data)
+ {
+ $options = array(
+ 0 => array('TITLE' => $this->user->lang['FIELD_LENGTH'], 'FIELD' => '<input type="number" min="0" name="field_length" size="5" value="' . $field_data['field_length'] . '" />'),
+ 1 => array('TITLE' => $this->user->lang['MIN_FIELD_CHARS'], 'FIELD' => '<input type="number" min="0" name="field_minlen" size="5" value="' . $field_data['field_minlen'] . '" />'),
+ 2 => array('TITLE' => $this->user->lang['MAX_FIELD_CHARS'], 'FIELD' => '<input type="number" min="0" name="field_maxlen" size="5" value="' . $field_data['field_maxlen'] . '" />'),
+ 3 => array('TITLE' => $this->user->lang['FIELD_VALIDATION'], 'FIELD' => '<select name="field_validation">' . $this->validate_options($field_data) . '</select>'),
+ );
+
+ return $options;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function get_default_option_values()
+ {
+ return array(
+ 'field_length' => 10,
+ 'field_minlen' => 0,
+ 'field_maxlen' => 20,
+ 'field_validation' => '.*',
+ 'field_novalue' => '',
+ 'field_default_value' => '',
+ );
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function get_profile_field($profile_row)
+ {
+ $var_name = 'pf_' . $profile_row['field_ident'];
+ return $this->request->variable($var_name, (string) $profile_row['field_default_value'], true);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function validate_profile_field(&$field_value, $field_data)
+ {
+ return $this->validate_string_profile_field('string', $field_value, $field_data);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function generate_field($profile_row, $preview_options = false)
+ {
+ $profile_row['field_ident'] = (isset($profile_row['var_name'])) ? $profile_row['var_name'] : 'pf_' . $profile_row['field_ident'];
+ $field_ident = $profile_row['field_ident'];
+ $default_value = $profile_row['lang_default_value'];
+ $profile_row['field_value'] = ($this->request->is_set($field_ident)) ? $this->request->variable($field_ident, $default_value, true) : ((!isset($this->user->profile_fields[$field_ident]) || $preview_options !== false) ? $default_value : $this->user->profile_fields[$field_ident]);
+
+ $this->template->assign_block_vars($this->get_name_short(), array_change_key_case($profile_row, CASE_UPPER));
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function get_database_column_type()
+ {
+ return 'VCHAR';
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function get_language_options($field_data)
+ {
+ $options = array(
+ 'lang_name' => 'string',
+ );
+
+ if ($field_data['lang_explain'])
+ {
+ $options['lang_explain'] = 'text';
+ }
+
+ if (strlen($field_data['lang_default_value']))
+ {
+ $options['lang_default_value'] = 'string';
+ }
+
+ return $options;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function display_options(&$template_vars, &$field_data)
+ {
+ $template_vars = array_merge($template_vars, array(
+ 'S_STRING' => true,
+ 'L_DEFAULT_VALUE_EXPLAIN' => $this->user->lang['STRING_DEFAULT_VALUE_EXPLAIN'],
+ 'LANG_DEFAULT_VALUE' => $field_data['lang_default_value'],
+ ));
+ }
+}
diff --git a/phpBB/phpbb/profilefields/type/type_string_common.php b/phpBB/phpbb/profilefields/type/type_string_common.php
new file mode 100644
index 0000000000..78e219a61f
--- /dev/null
+++ b/phpBB/phpbb/profilefields/type/type_string_common.php
@@ -0,0 +1,128 @@
+<?php
+/**
+*
+* @package phpBB
+* @copyright (c) 2014 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\profilefields\type;
+
+abstract class type_string_common extends type_base
+{
+ protected $validation_options = array(
+ 'CHARS_ANY' => '.*',
+ 'NUMBERS_ONLY' => '[0-9]+',
+ 'ALPHA_ONLY' => '[\w]+',
+ 'ALPHA_UNDERSCORE' => '[\w_]+',
+ 'ALPHA_SPACERS' => '[\w_\+\. \-\[\]]+',
+ );
+
+ /**
+ * Return possible validation options
+ */
+ public function validate_options($field_data)
+ {
+ $validate_options = '';
+ foreach ($this->validation_options as $lang => $value)
+ {
+ $selected = ($field_data['field_validation'] == $value) ? ' selected="selected"' : '';
+ $validate_options .= '<option value="' . $value . '"' . $selected . '>' . $this->user->lang[$lang] . '</option>';
+ }
+
+ return $validate_options;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function get_default_field_value($field_data)
+ {
+ return $field_data['lang_default_value'];
+ }
+
+ /**
+ * Validate entered profile field data
+ *
+ * @param string $field_type Field type (string or text)
+ * @param mixed $field_value Field value to validate
+ * @param array $field_data Array with requirements of the field
+ * @return mixed String with key of the error language string, false otherwise
+ */
+ public function validate_string_profile_field($field_type, &$field_value, $field_data)
+ {
+ if (trim($field_value) === '' && !$field_data['field_required'])
+ {
+ return false;
+ }
+ else if (trim($field_value) === '' && $field_data['field_required'])
+ {
+ return $this->user->lang('FIELD_REQUIRED', $this->get_field_name($field_data['lang_name']));
+ }
+
+ if ($field_data['field_minlen'] && utf8_strlen($field_value) < $field_data['field_minlen'])
+ {
+ return $this->user->lang('FIELD_TOO_SHORT', (int) $field_data['field_minlen'], $this->get_field_name($field_data['lang_name']));
+ }
+ else if ($field_data['field_maxlen'] && utf8_strlen(html_entity_decode($field_value)) > $field_data['field_maxlen'])
+ {
+ return $this->user->lang('FIELD_TOO_LONG', (int) $field_data['field_maxlen'], $this->get_field_name($field_data['lang_name']));
+ }
+
+ if (!empty($field_data['field_validation']) && $field_data['field_validation'] != '.*')
+ {
+ $field_validate = ($field_type != 'text') ? $field_value : bbcode_nl2br($field_value);
+ if (!preg_match('#^' . str_replace('\\\\', '\\', $field_data['field_validation']) . '$#i', $field_validate))
+ {
+ $validation = array_search($field_data['field_validation'], $this->validation_options);
+ if ($validation)
+ {
+ return $this->user->lang('FIELD_INVALID_CHARS_' . $validation, $this->get_field_name($field_data['lang_name']));
+ }
+ return $this->user->lang('FIELD_INVALID_CHARS_INVALID', $this->get_field_name($field_data['lang_name']));
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function get_profile_value($field_value, $field_data)
+ {
+ if (!$field_value && !$field_data['field_show_novalue'])
+ {
+ return null;
+ }
+
+ $field_value = make_clickable($field_value);
+ $field_value = censor_text($field_value);
+ $field_value = bbcode_nl2br($field_value);
+ return $field_value;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function get_profile_contact_value($field_value, $field_data)
+ {
+ if (!$field_value && !$field_data['field_show_novalue'])
+ {
+ return null;
+ }
+
+ return $field_value;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function prepare_options_form(&$exclude_options, &$visibility_options)
+ {
+ $exclude_options[1][] = 'lang_default_value';
+
+ return $this->request->variable('lang_options', '', true);
+ }
+}
diff --git a/phpBB/phpbb/profilefields/type/type_text.php b/phpBB/phpbb/profilefields/type/type_text.php
new file mode 100644
index 0000000000..660bb20ef8
--- /dev/null
+++ b/phpBB/phpbb/profilefields/type/type_text.php
@@ -0,0 +1,201 @@
+<?php
+/**
+*
+* @package phpBB
+* @copyright (c) 2014 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\profilefields\type;
+
+class type_text extends type_string_common
+{
+ /**
+ * Request object
+ * @var \phpbb\request\request
+ */
+ protected $request;
+
+ /**
+ * Template object
+ * @var \phpbb\template\template
+ */
+ protected $template;
+
+ /**
+ * User object
+ * @var \phpbb\user
+ */
+ protected $user;
+
+ /**
+ * Construct
+ *
+ * @param \phpbb\request\request $request Request object
+ * @param \phpbb\template\template $template Template object
+ * @param \phpbb\user $user User object
+ * @param string $language_table Table where the language strings are stored
+ */
+ public function __construct(\phpbb\request\request $request, \phpbb\template\template $template, \phpbb\user $user)
+ {
+ $this->request = $request;
+ $this->template = $template;
+ $this->user = $user;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function get_name_short()
+ {
+ return 'text';
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function get_options($default_lang_id, $field_data)
+ {
+ $options = array(
+ 0 => array('TITLE' => $this->user->lang['FIELD_LENGTH'], 'FIELD' => '<input type="number" min="0" max="99999" name="rows" size="5" value="' . $field_data['rows'] . '" /> ' . $this->user->lang['ROWS'] . '</dd><dd><input type="number" min="0" max="99999" name="columns" size="5" value="' . $field_data['columns'] . '" /> ' . $this->user->lang['COLUMNS'] . ' <input type="hidden" name="field_length" value="' . $field_data['field_length'] . '" />'),
+ 1 => array('TITLE' => $this->user->lang['MIN_FIELD_CHARS'], 'FIELD' => '<input type="number" min="0" max="9999999999" name="field_minlen" size="10" value="' . $field_data['field_minlen'] . '" />'),
+ 2 => array('TITLE' => $this->user->lang['MAX_FIELD_CHARS'], 'FIELD' => '<input type="number" min="0" max="9999999999" name="field_maxlen" size="10" value="' . $field_data['field_maxlen'] . '" />'),
+ 3 => array('TITLE' => $this->user->lang['FIELD_VALIDATION'], 'FIELD' => '<select name="field_validation">' . $this->validate_options($field_data) . '</select>'),
+ );
+
+ return $options;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function get_default_option_values()
+ {
+ return array(
+ 'field_length' => '5|80',
+ 'field_minlen' => 0,
+ 'field_maxlen' => 1000,
+ 'field_validation' => '.*',
+ 'field_novalue' => '',
+ 'field_default_value' => '',
+ );
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function get_profile_field($profile_row)
+ {
+ $var_name = 'pf_' . $profile_row['field_ident'];
+ return $this->request->variable($var_name, (string) $profile_row['field_default_value'], true);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function validate_profile_field(&$field_value, $field_data)
+ {
+ return $this->validate_string_profile_field('text', $field_value, $field_data);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function generate_field($profile_row, $preview_options = false)
+ {
+ $field_length = explode('|', $profile_row['field_length']);
+ $profile_row['field_rows'] = $field_length[0];
+ $profile_row['field_cols'] = $field_length[1];
+ $profile_row['field_ident'] = (isset($profile_row['var_name'])) ? $profile_row['var_name'] : 'pf_' . $profile_row['field_ident'];
+ $field_ident = $profile_row['field_ident'];
+ $default_value = $profile_row['lang_default_value'];
+
+ $profile_row['field_value'] = ($this->request->is_set($field_ident)) ? $this->request->variable($field_ident, $default_value, true) : ((!isset($this->user->profile_fields[$field_ident]) || $preview_options !== false) ? $default_value : $this->user->profile_fields[$field_ident]);
+
+ $this->template->assign_block_vars('text', array_change_key_case($profile_row, CASE_UPPER));
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function get_database_column_type()
+ {
+ return 'MTEXT';
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function get_language_options($field_data)
+ {
+ $options = array(
+ 'lang_name' => 'string',
+ );
+
+ if ($field_data['lang_explain'])
+ {
+ $options['lang_explain'] = 'text';
+ }
+
+ if (strlen($field_data['lang_default_value']))
+ {
+ $options['lang_default_value'] = 'text';
+ }
+
+ return $options;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function get_excluded_options($key, $action, $current_value, &$field_data, $step)
+ {
+ if ($step == 2 && $key == 'field_length')
+ {
+ if ($this->request->is_set('rows'))
+ {
+ $field_data['rows'] = $this->request->variable('rows', 0);
+ $field_data['columns'] = $this->request->variable('columns', 0);
+ $current_value = $field_data['rows'] . '|' . $field_data['columns'];
+ }
+ else
+ {
+ $row_col = explode('|', $current_value);
+ $field_data['rows'] = $row_col[0];
+ $field_data['columns'] = $row_col[1];
+ }
+
+ return $current_value;
+ }
+
+ return parent::get_excluded_options($key, $action, $current_value, $field_data, $step);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function prepare_hidden_fields($step, $key, $action, &$field_data)
+ {
+ if ($key == 'field_length' && $this->request->is_set('rows'))
+ {
+ $field_data['rows'] = $this->request->variable('rows', 0);
+ $field_data['columns'] = $this->request->variable('columns', 0);
+ return $field_data['rows'] . '|' . $field_data['columns'];
+ }
+
+ return parent::prepare_hidden_fields($step, $key, $action, $field_data);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function display_options(&$template_vars, &$field_data)
+ {
+ $template_vars = array_merge($template_vars, array(
+ 'S_TEXT' => true,
+ 'L_DEFAULT_VALUE_EXPLAIN' => $this->user->lang['TEXT_DEFAULT_VALUE_EXPLAIN'],
+ 'LANG_DEFAULT_VALUE' => $field_data['lang_default_value'],
+ ));
+ }
+}
diff --git a/phpBB/phpbb/profilefields/type/type_url.php b/phpBB/phpbb/profilefields/type/type_url.php
new file mode 100644
index 0000000000..b1523b9355
--- /dev/null
+++ b/phpBB/phpbb/profilefields/type/type_url.php
@@ -0,0 +1,70 @@
+<?php
+/**
+*
+* @package phpBB
+* @copyright (c) 2014 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\profilefields\type;
+
+class type_url extends type_string
+{
+ /**
+ * {@inheritDoc}
+ */
+ public function get_name_short()
+ {
+ return 'url';
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function get_options($default_lang_id, $field_data)
+ {
+ $options = array(
+ 0 => array('TITLE' => $this->user->lang['FIELD_LENGTH'], 'FIELD' => '<input type="number" min="0" name="field_length" size="5" value="' . $field_data['field_length'] . '" />'),
+ 1 => array('TITLE' => $this->user->lang['MIN_FIELD_CHARS'], 'FIELD' => '<input type="number" min="0" name="field_minlen" size="5" value="' . $field_data['field_minlen'] . '" />'),
+ 2 => array('TITLE' => $this->user->lang['MAX_FIELD_CHARS'], 'FIELD' => '<input type="number" min="0" name="field_maxlen" size="5" value="' . $field_data['field_maxlen'] . '" />'),
+ );
+
+ return $options;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function get_default_option_values()
+ {
+ return array(
+ 'field_length' => 40,
+ 'field_minlen' => 0,
+ 'field_maxlen' => 200,
+ 'field_validation' => '',
+ 'field_novalue' => '',
+ 'field_default_value' => '',
+ );
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function validate_profile_field(&$field_value, $field_data)
+ {
+ $field_value = trim($field_value);
+
+ if ($field_value === '' && !$field_data['field_required'])
+ {
+ return false;
+ }
+
+ if (!preg_match('#^' . get_preg_expression('url') . '$#i', $field_value))
+ {
+ return $this->user->lang('FIELD_INVALID_URL', $this->get_field_name($field_data['lang_name']));
+ }
+
+ return false;
+ }
+}
diff --git a/phpBB/phpbb/recursive_dot_prefix_filter_iterator.php b/phpBB/phpbb/recursive_dot_prefix_filter_iterator.php
new file mode 100644
index 0000000000..6ef63ec906
--- /dev/null
+++ b/phpBB/phpbb/recursive_dot_prefix_filter_iterator.php
@@ -0,0 +1,28 @@
+<?php
+/**
+*
+* @package extension
+* @copyright (c) 2014 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb;
+
+/**
+* Class recursive_dot_prefix_filter_iterator
+*
+* This filter ignores directories starting with a dot.
+* When searching for php classes and template files of extensions
+* we don't need to look inside these directories.
+*
+* @package phpbb
+*/
+class recursive_dot_prefix_filter_iterator extends \RecursiveFilterIterator
+{
+ public function accept()
+ {
+ $filename = $this->current()->getFilename();
+ return !$this->current()->isDir() || $filename[0] !== '.';
+ }
+}
diff --git a/phpBB/phpbb/request/deactivated_super_global.php b/phpBB/phpbb/request/deactivated_super_global.php
new file mode 100644
index 0000000000..b6940cf51f
--- /dev/null
+++ b/phpBB/phpbb/request/deactivated_super_global.php
@@ -0,0 +1,114 @@
+<?php
+/**
+*
+* @package \phpbb\request\request
+* @copyright (c) 2010 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\request;
+
+/**
+* Replacement for a superglobal (like $_GET or $_POST) which calls
+* trigger_error on all operations but isset, overloads the [] operator with SPL.
+*
+* @package \phpbb\request\request
+*/
+class deactivated_super_global implements \ArrayAccess, \Countable, \IteratorAggregate
+{
+ /**
+ * @var string Holds the name of the superglobal this is replacing.
+ */
+ private $name;
+
+ /**
+ * @var \phpbb\request\request_interface::POST|GET|REQUEST|COOKIE Super global constant.
+ */
+ private $super_global;
+
+ /**
+ * @var \phpbb\request\request_interface The request class instance holding the actual request data.
+ */
+ private $request;
+
+ /**
+ * Constructor generates an error message fitting the super global to be used within the other functions.
+ *
+ * @param \phpbb\request\request_interface $request A request class instance holding the real super global data.
+ * @param string $name Name of the super global this is a replacement for - e.g. '_GET'.
+ * @param \phpbb\request\request_interface::POST|GET|REQUEST|COOKIE $super_global The variable's super global constant.
+ */
+ public function __construct(\phpbb\request\request_interface $request, $name, $super_global)
+ {
+ $this->request = $request;
+ $this->name = $name;
+ $this->super_global = $super_global;
+ }
+
+ /**
+ * Calls trigger_error with the file and line number the super global was used in.
+ */
+ private function error()
+ {
+ $file = '';
+ $line = 0;
+
+ $message = 'Illegal use of $' . $this->name . '. You must use the request class or request_var() to access input data. Found in %s on line %d. This error message was generated by deactivated_super_global.';
+
+ $backtrace = debug_backtrace();
+ if (isset($backtrace[1]))
+ {
+ $file = $backtrace[1]['file'];
+ $line = $backtrace[1]['line'];
+ }
+ trigger_error(sprintf($message, $file, $line), E_USER_ERROR);
+ }
+
+ /**
+ * Redirects isset to the correct request class call.
+ *
+ * @param string $offset The key of the super global being accessed.
+ *
+ * @return bool Whether the key on the super global exists.
+ */
+ public function offsetExists($offset)
+ {
+ return $this->request->is_set($offset, $this->super_global);
+ }
+
+ /**#@+
+ * Part of the \ArrayAccess implementation, will always result in a FATAL error.
+ */
+ public function offsetGet($offset)
+ {
+ $this->error();
+ }
+
+ public function offsetSet($offset, $value)
+ {
+ $this->error();
+ }
+
+ public function offsetUnset($offset)
+ {
+ $this->error();
+ }
+ /**#@-*/
+
+ /**
+ * Part of the \Countable implementation, will always result in a FATAL error
+ */
+ public function count()
+ {
+ $this->error();
+ }
+
+ /**
+ * Part of the Traversable/IteratorAggregate implementation, will always result in a FATAL error
+ */
+ public function getIterator()
+ {
+ $this->error();
+ }
+}
diff --git a/phpBB/phpbb/request/request.php b/phpBB/phpbb/request/request.php
new file mode 100644
index 0000000000..3171a6edb7
--- /dev/null
+++ b/phpBB/phpbb/request/request.php
@@ -0,0 +1,417 @@
+<?php
+/**
+*
+* @package \phpbb\request\request
+* @copyright (c) 2010 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\request;
+
+/**
+* All application input is accessed through this class.
+*
+* It provides a method to disable access to input data through super globals.
+* This should force MOD authors to read about data validation.
+*
+* @package \phpbb\request\request
+*/
+class request implements \phpbb\request\request_interface
+{
+ /**
+ * @var array The names of super global variables that this class should protect if super globals are disabled.
+ */
+ protected $super_globals = array(
+ \phpbb\request\request_interface::POST => '_POST',
+ \phpbb\request\request_interface::GET => '_GET',
+ \phpbb\request\request_interface::REQUEST => '_REQUEST',
+ \phpbb\request\request_interface::COOKIE => '_COOKIE',
+ \phpbb\request\request_interface::SERVER => '_SERVER',
+ \phpbb\request\request_interface::FILES => '_FILES',
+ );
+
+ /**
+ * @var array Stores original contents of $_REQUEST array.
+ */
+ protected $original_request = null;
+
+ /**
+ * @var
+ */
+ protected $super_globals_disabled = false;
+
+ /**
+ * @var array An associative array that has the value of super global constants as keys and holds their data as values.
+ */
+ protected $input;
+
+ /**
+ * @var \phpbb\request\type_cast_helper_interface An instance of a type cast helper providing convenience methods for type conversions.
+ */
+ protected $type_cast_helper;
+
+ /**
+ * Initialises the request class, that means it stores all input data in {@link $input input}
+ * and then calls {@link \phpbb\request\deactivated_super_global \phpbb\request\deactivated_super_global}
+ */
+ public function __construct(\phpbb\request\type_cast_helper_interface $type_cast_helper = null, $disable_super_globals = true)
+ {
+ if ($type_cast_helper)
+ {
+ $this->type_cast_helper = $type_cast_helper;
+ }
+ else
+ {
+ $this->type_cast_helper = new \phpbb\request\type_cast_helper();
+ }
+
+ foreach ($this->super_globals as $const => $super_global)
+ {
+ $this->input[$const] = isset($GLOBALS[$super_global]) ? $GLOBALS[$super_global] : array();
+ }
+
+ // simulate request_order = GP
+ $this->original_request = $this->input[\phpbb\request\request_interface::REQUEST];
+ $this->input[\phpbb\request\request_interface::REQUEST] = $this->input[\phpbb\request\request_interface::POST] + $this->input[\phpbb\request\request_interface::GET];
+
+ if ($disable_super_globals)
+ {
+ $this->disable_super_globals();
+ }
+ }
+
+ /**
+ * Getter for $super_globals_disabled
+ *
+ * @return bool Whether super globals are disabled or not.
+ */
+ public function super_globals_disabled()
+ {
+ return $this->super_globals_disabled;
+ }
+
+ /**
+ * Disables access of super globals specified in $super_globals.
+ * This is achieved by overwriting the super globals with instances of {@link \phpbb\request\deactivated_super_global \phpbb\request\deactivated_super_global}
+ */
+ public function disable_super_globals()
+ {
+ if (!$this->super_globals_disabled)
+ {
+ foreach ($this->super_globals as $const => $super_global)
+ {
+ unset($GLOBALS[$super_global]);
+ $GLOBALS[$super_global] = new \phpbb\request\deactivated_super_global($this, $super_global, $const);
+ }
+
+ $this->super_globals_disabled = true;
+ }
+ }
+
+ /**
+ * Enables access of super globals specified in $super_globals if they were disabled by {@link disable_super_globals disable_super_globals}.
+ * This is achieved by making the super globals point to the data stored within this class in {@link $input input}.
+ */
+ public function enable_super_globals()
+ {
+ if ($this->super_globals_disabled)
+ {
+ foreach ($this->super_globals as $const => $super_global)
+ {
+ $GLOBALS[$super_global] = $this->input[$const];
+ }
+
+ $GLOBALS['_REQUEST'] = $this->original_request;
+
+ $this->super_globals_disabled = false;
+ }
+ }
+
+ /**
+ * This function allows overwriting or setting a value in one of the super global arrays.
+ *
+ * Changes which are performed on the super globals directly will not have any effect on the results of
+ * other methods this class provides. Using this function should be avoided if possible! It will
+ * consume twice the the amount of memory of the value
+ *
+ * @param string $var_name The name of the variable that shall be overwritten
+ * @param mixed $value The value which the variable shall contain.
+ * If this is null the variable will be unset.
+ * @param \phpbb\request\request_interface::POST|GET|REQUEST|COOKIE $super_global
+ * Specifies which super global shall be changed
+ */
+ public function overwrite($var_name, $value, $super_global = \phpbb\request\request_interface::REQUEST)
+ {
+ if (!isset($this->super_globals[$super_global]))
+ {
+ return;
+ }
+
+ $this->type_cast_helper->add_magic_quotes($value);
+
+ // setting to null means unsetting
+ if ($value === null)
+ {
+ unset($this->input[$super_global][$var_name]);
+ if (!$this->super_globals_disabled())
+ {
+ unset($GLOBALS[$this->super_globals[$super_global]][$var_name]);
+ }
+ }
+ else
+ {
+ $this->input[$super_global][$var_name] = $value;
+ if (!$this->super_globals_disabled())
+ {
+ $GLOBALS[$this->super_globals[$super_global]][$var_name] = $value;
+ }
+ }
+
+ if (!$this->super_globals_disabled())
+ {
+ unset($GLOBALS[$this->super_globals[$super_global]][$var_name]);
+ $GLOBALS[$this->super_globals[$super_global]][$var_name] = $value;
+ }
+ }
+
+ /**
+ * Central type safe input handling function.
+ * All variables in GET or POST requests should be retrieved through this function to maximise security.
+ *
+ * @param string|array $var_name The form variable's name from which data shall be retrieved.
+ * If the value is an array this may be an array of indizes which will give
+ * direct access to a value at any depth. E.g. if the value of "var" is array(1 => "a")
+ * then specifying array("var", 1) as the name will return "a".
+ * @param mixed $default A default value that is returned if the variable was not set.
+ * This function will always return a value of the same type as the default.
+ * @param bool $multibyte If $default is a string this paramater has to be true if the variable may contain any UTF-8 characters
+ * Default is false, causing all bytes outside the ASCII range (0-127) to be replaced with question marks
+ * @param \phpbb\request\request_interface::POST|GET|REQUEST|COOKIE $super_global
+ * Specifies which super global should be used
+ *
+ * @return mixed The value of $_REQUEST[$var_name] run through {@link set_var set_var} to ensure that the type is the
+ * the same as that of $default. If the variable is not set $default is returned.
+ */
+ public function variable($var_name, $default, $multibyte = false, $super_global = \phpbb\request\request_interface::REQUEST)
+ {
+ return $this->_variable($var_name, $default, $multibyte, $super_global, true);
+ }
+
+ /**
+ * Get a variable, but without trimming strings.
+ * Same functionality as variable(), except does not run trim() on strings.
+ * This method should be used when handling passwords.
+ *
+ * @param string|array $var_name The form variable's name from which data shall be retrieved.
+ * If the value is an array this may be an array of indizes which will give
+ * direct access to a value at any depth. E.g. if the value of "var" is array(1 => "a")
+ * then specifying array("var", 1) as the name will return "a".
+ * @param mixed $default A default value that is returned if the variable was not set.
+ * This function will always return a value of the same type as the default.
+ * @param bool $multibyte If $default is a string this paramater has to be true if the variable may contain any UTF-8 characters
+ * Default is false, causing all bytes outside the ASCII range (0-127) to be replaced with question marks
+ * @param \phpbb\request\request_interface::POST|GET|REQUEST|COOKIE $super_global
+ * Specifies which super global should be used
+ *
+ * @return mixed The value of $_REQUEST[$var_name] run through {@link set_var set_var} to ensure that the type is the
+ * the same as that of $default. If the variable is not set $default is returned.
+ */
+ public function untrimmed_variable($var_name, $default, $multibyte = false, $super_global = \phpbb\request\request_interface::REQUEST)
+ {
+ return $this->_variable($var_name, $default, $multibyte, $super_global, false);
+ }
+
+ /**
+ * Shortcut method to retrieve SERVER variables.
+ *
+ * Also fall back to getenv(), some CGI setups may need it (probably not, but
+ * whatever).
+ *
+ * @param string|array $var_name See \phpbb\request\request_interface::variable
+ * @param mixed $Default See \phpbb\request\request_interface::variable
+ *
+ * @return mixed The server variable value.
+ */
+ public function server($var_name, $default = '')
+ {
+ $multibyte = true;
+
+ if ($this->is_set($var_name, \phpbb\request\request_interface::SERVER))
+ {
+ return $this->variable($var_name, $default, $multibyte, \phpbb\request\request_interface::SERVER);
+ }
+ else
+ {
+ $var = getenv($var_name);
+ $this->type_cast_helper->recursive_set_var($var, $default, $multibyte);
+ return $var;
+ }
+ }
+
+ /**
+ * Shortcut method to retrieve the value of client HTTP headers.
+ *
+ * @param string|array $header_name The name of the header to retrieve.
+ * @param mixed $default See \phpbb\request\request_interface::variable
+ *
+ * @return mixed The header value.
+ */
+ public function header($header_name, $default = '')
+ {
+ $var_name = 'HTTP_' . str_replace('-', '_', strtoupper($header_name));
+ return $this->server($var_name, $default);
+ }
+
+ /**
+ * Shortcut method to retrieve $_FILES variables
+ *
+ * @param string $form_name The name of the file input form element
+ *
+ * @return array The uploaded file's information or an empty array if the
+ * variable does not exist in _FILES.
+ */
+ public function file($form_name)
+ {
+ return $this->variable($form_name, array('name' => 'none'), false, \phpbb\request\request_interface::FILES);
+ }
+
+ /**
+ * Checks whether a certain variable was sent via POST.
+ * To make sure that a request was sent using POST you should call this function
+ * on at least one variable.
+ *
+ * @param string $name The name of the form variable which should have a
+ * _p suffix to indicate the check in the code that creates the form too.
+ *
+ * @return bool True if the variable was set in a POST request, false otherwise.
+ */
+ public function is_set_post($name)
+ {
+ return $this->is_set($name, \phpbb\request\request_interface::POST);
+ }
+
+ /**
+ * Checks whether a certain variable is set in one of the super global
+ * arrays.
+ *
+ * @param string $var Name of the variable
+ * @param \phpbb\request\request_interface::POST|GET|REQUEST|COOKIE $super_global
+ * Specifies the super global which shall be checked
+ *
+ * @return bool True if the variable was sent as input
+ */
+ public function is_set($var, $super_global = \phpbb\request\request_interface::REQUEST)
+ {
+ return isset($this->input[$super_global][$var]);
+ }
+
+ /**
+ * Checks whether the current request is an AJAX request (XMLHttpRequest)
+ *
+ * @return bool True if the current request is an ajax request
+ */
+ public function is_ajax()
+ {
+ return $this->header('X-Requested-With') == 'XMLHttpRequest';
+ }
+
+ /**
+ * Checks if the current request is happening over HTTPS.
+ *
+ * @return bool True if the request is secure.
+ */
+ public function is_secure()
+ {
+ return $this->server('HTTPS') == 'on';
+ }
+
+ /**
+ * Returns all variable names for a given super global
+ *
+ * @param \phpbb\request\request_interface::POST|GET|REQUEST|COOKIE $super_global
+ * The super global from which names shall be taken
+ *
+ * @return array All variable names that are set for the super global.
+ * Pay attention when using these, they are unsanitised!
+ */
+ public function variable_names($super_global = \phpbb\request\request_interface::REQUEST)
+ {
+ if (!isset($this->input[$super_global]))
+ {
+ return array();
+ }
+
+ return array_keys($this->input[$super_global]);
+ }
+
+ /**
+ * Helper function used by variable() and untrimmed_variable().
+ *
+ * @param string|array $var_name The form variable's name from which data shall be retrieved.
+ * If the value is an array this may be an array of indizes which will give
+ * direct access to a value at any depth. E.g. if the value of "var" is array(1 => "a")
+ * then specifying array("var", 1) as the name will return "a".
+ * @param mixed $default A default value that is returned if the variable was not set.
+ * This function will always return a value of the same type as the default.
+ * @param bool $multibyte If $default is a string this paramater has to be true if the variable may contain any UTF-8 characters
+ * Default is false, causing all bytes outside the ASCII range (0-127) to be replaced with question marks
+ * @param \phpbb\request\request_interface::POST|GET|REQUEST|COOKIE $super_global
+ * Specifies which super global should be used
+ * @param bool $trim Indicates whether trim() should be applied to string values.
+ *
+ * @return mixed The value of $_REQUEST[$var_name] run through {@link set_var set_var} to ensure that the type is the
+ * the same as that of $default. If the variable is not set $default is returned.
+ */
+ protected function _variable($var_name, $default, $multibyte = false, $super_global = \phpbb\request\request_interface::REQUEST, $trim = true)
+ {
+ $path = false;
+
+ // deep direct access to multi dimensional arrays
+ if (is_array($var_name))
+ {
+ $path = $var_name;
+ // make sure at least the variable name is specified
+ if (empty($path))
+ {
+ return (is_array($default)) ? array() : $default;
+ }
+ // the variable name is the first element on the path
+ $var_name = array_shift($path);
+ }
+
+ if (!isset($this->input[$super_global][$var_name]))
+ {
+ return (is_array($default)) ? array() : $default;
+ }
+ $var = $this->input[$super_global][$var_name];
+
+ if ($path)
+ {
+ // walk through the array structure and find the element we are looking for
+ foreach ($path as $key)
+ {
+ if (is_array($var) && isset($var[$key]))
+ {
+ $var = $var[$key];
+ }
+ else
+ {
+ return (is_array($default)) ? array() : $default;
+ }
+ }
+ }
+
+ $this->type_cast_helper->recursive_set_var($var, $default, $multibyte, $trim);
+
+ return $var;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function get_super_global($super_global = \phpbb\request\request_interface::REQUEST)
+ {
+ return $this->input[$super_global];
+ }
+}
diff --git a/phpBB/phpbb/request/request_interface.php b/phpBB/phpbb/request/request_interface.php
new file mode 100644
index 0000000000..1f9978b276
--- /dev/null
+++ b/phpBB/phpbb/request/request_interface.php
@@ -0,0 +1,143 @@
+<?php
+/**
+*
+* @package \phpbb\request\request
+* @copyright (c) 2010 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\request;
+
+/**
+* An interface through which all application input can be accessed.
+*
+* @package \phpbb\request\request
+*/
+interface request_interface
+{
+ /**#@+
+ * Constant identifying the super global with the same name.
+ */
+ const POST = 0;
+ const GET = 1;
+ const REQUEST = 2;
+ const COOKIE = 3;
+ const SERVER = 4;
+ const FILES = 5;
+ /**#@-*/
+
+ /**
+ * This function allows overwriting or setting a value in one of the super global arrays.
+ *
+ * Changes which are performed on the super globals directly will not have any effect on the results of
+ * other methods this class provides. Using this function should be avoided if possible! It will
+ * consume twice the the amount of memory of the value
+ *
+ * @param string $var_name The name of the variable that shall be overwritten
+ * @param mixed $value The value which the variable shall contain.
+ * If this is null the variable will be unset.
+ * @param \phpbb\request\request_interface::POST|GET|REQUEST|COOKIE $super_global
+ * Specifies which super global shall be changed
+ */
+ public function overwrite($var_name, $value, $super_global = \phpbb\request\request_interface::REQUEST);
+
+ /**
+ * Central type safe input handling function.
+ * All variables in GET or POST requests should be retrieved through this function to maximise security.
+ *
+ * @param string|array $var_name The form variable's name from which data shall be retrieved.
+ * If the value is an array this may be an array of indizes which will give
+ * direct access to a value at any depth. E.g. if the value of "var" is array(1 => "a")
+ * then specifying array("var", 1) as the name will return "a".
+ * @param mixed $default A default value that is returned if the variable was not set.
+ * This function will always return a value of the same type as the default.
+ * @param bool $multibyte If $default is a string this paramater has to be true if the variable may contain any UTF-8 characters
+ * Default is false, causing all bytes outside the ASCII range (0-127) to be replaced with question marks
+ * @param \phpbb\request\request_interface::POST|GET|REQUEST|COOKIE $super_global
+ * Specifies which super global should be used
+ *
+ * @return mixed The value of $_REQUEST[$var_name] run through {@link set_var set_var} to ensure that the type is the
+ * the same as that of $default. If the variable is not set $default is returned.
+ */
+ public function variable($var_name, $default, $multibyte = false, $super_global = \phpbb\request\request_interface::REQUEST);
+
+ /**
+ * Shortcut method to retrieve SERVER variables.
+ *
+ * @param string|array $var_name See \phpbb\request\request_interface::variable
+ * @param mixed $default See \phpbb\request\request_interface::variable
+ *
+ * @return mixed The server variable value.
+ */
+ public function server($var_name, $default = '');
+
+ /**
+ * Shortcut method to retrieve the value of client HTTP headers.
+ *
+ * @param string|array $header_name The name of the header to retrieve.
+ * @param mixed $default See \phpbb\request\request_interface::variable
+ *
+ * @return mixed The header value.
+ */
+ public function header($var_name, $default = '');
+
+ /**
+ * Checks whether a certain variable was sent via POST.
+ * To make sure that a request was sent using POST you should call this function
+ * on at least one variable.
+ *
+ * @param string $name The name of the form variable which should have a
+ * _p suffix to indicate the check in the code that creates the form too.
+ *
+ * @return bool True if the variable was set in a POST request, false otherwise.
+ */
+ public function is_set_post($name);
+
+ /**
+ * Checks whether a certain variable is set in one of the super global
+ * arrays.
+ *
+ * @param string $var Name of the variable
+ * @param \phpbb\request\request_interface::POST|GET|REQUEST|COOKIE $super_global
+ * Specifies the super global which shall be checked
+ *
+ * @return bool True if the variable was sent as input
+ */
+ public function is_set($var, $super_global = \phpbb\request\request_interface::REQUEST);
+
+ /**
+ * Checks whether the current request is an AJAX request (XMLHttpRequest)
+ *
+ * @return bool True if the current request is an ajax request
+ */
+ public function is_ajax();
+
+ /**
+ * Checks if the current request is happening over HTTPS.
+ *
+ * @return bool True if the request is secure.
+ */
+ public function is_secure();
+
+ /**
+ * Returns all variable names for a given super global
+ *
+ * @param \phpbb\request\request_interface::POST|GET|REQUEST|COOKIE $super_global
+ * The super global from which names shall be taken
+ *
+ * @return array All variable names that are set for the super global.
+ * Pay attention when using these, they are unsanitised!
+ */
+ public function variable_names($super_global = \phpbb\request\request_interface::REQUEST);
+
+ /**
+ * Returns the original array of the requested super global
+ *
+ * @param \phpbb\request\request_interface::POST|GET|REQUEST|COOKIE $super_global
+ * The super global which will be returned
+ *
+ * @return array The original array of the requested super global.
+ */
+ public function get_super_global($super_global = \phpbb\request\request_interface::REQUEST);
+}
diff --git a/phpBB/phpbb/request/type_cast_helper.php b/phpBB/phpbb/request/type_cast_helper.php
new file mode 100644
index 0000000000..e9b55663af
--- /dev/null
+++ b/phpBB/phpbb/request/type_cast_helper.php
@@ -0,0 +1,188 @@
+<?php
+/**
+*
+* @package \phpbb\request\request
+* @copyright (c) 2010 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\request;
+
+/**
+* A helper class that provides convenience methods for type casting.
+*
+* @package \phpbb\request\request
+*/
+class type_cast_helper implements \phpbb\request\type_cast_helper_interface
+{
+
+ /**
+ * @var string Whether slashes need to be stripped from input
+ */
+ protected $strip;
+
+ /**
+ * Initialises the type cast helper class.
+ * All it does is find out whether magic quotes are turned on.
+ */
+ public function __construct()
+ {
+ if (version_compare(PHP_VERSION, '5.4.0-dev', '>='))
+ {
+ $this->strip = false;
+ }
+ else
+ {
+ $this->strip = (@get_magic_quotes_gpc()) ? true : false;
+ }
+ }
+
+ /**
+ * Recursively applies addslashes to a variable.
+ *
+ * @param mixed &$var Variable passed by reference to which slashes will be added.
+ */
+ public function addslashes_recursively(&$var)
+ {
+ if (is_string($var))
+ {
+ $var = addslashes($var);
+ }
+ else if (is_array($var))
+ {
+ $var_copy = $var;
+ $var = array();
+ foreach ($var_copy as $key => $value)
+ {
+ if (is_string($key))
+ {
+ $key = addslashes($key);
+ }
+ $var[$key] = $value;
+
+ $this->addslashes_recursively($var[$key]);
+ }
+ }
+ }
+
+ /**
+ * Recursively applies addslashes to a variable if magic quotes are turned on.
+ *
+ * @param mixed &$var Variable passed by reference to which slashes will be added.
+ */
+ public function add_magic_quotes(&$var)
+ {
+ if ($this->strip)
+ {
+ $this->addslashes_recursively($var);
+ }
+ }
+
+ /**
+ * Set variable $result to a particular type.
+ *
+ * @param mixed &$result The variable to fill
+ * @param mixed $var The contents to fill with
+ * @param mixed $type The variable type. Will be used with {@link settype()}
+ * @param bool $multibyte Indicates whether string values may contain UTF-8 characters.
+ * Default is false, causing all bytes outside the ASCII range (0-127) to be replaced with question marks.
+ * @param bool $trim Indicates whether trim() should be applied to string values.
+ * Default is true.
+ */
+ public function set_var(&$result, $var, $type, $multibyte = false, $trim = true)
+ {
+ settype($var, $type);
+ $result = $var;
+
+ if ($type == 'string')
+ {
+ $result = str_replace(array("\r\n", "\r", "\0"), array("\n", "\n", ''), $result);
+
+ if ($trim)
+ {
+ $result = trim($result);
+ }
+
+ $result = htmlspecialchars($result, ENT_COMPAT, 'UTF-8');
+
+ if ($multibyte)
+ {
+ $result = utf8_normalize_nfc($result);
+ }
+
+ if (!empty($result))
+ {
+ // Make sure multibyte characters are wellformed
+ if ($multibyte)
+ {
+ if (!preg_match('/^./u', $result))
+ {
+ $result = '';
+ }
+ }
+ else
+ {
+ // no multibyte, allow only ASCII (0-127)
+ $result = preg_replace('/[\x80-\xFF]/', '?', $result);
+ }
+ }
+
+ $result = ($this->strip) ? stripslashes($result) : $result;
+ }
+ }
+
+ /**
+ * Recursively sets a variable to a given type using {@link set_var set_var}
+ *
+ * @param string $var The value which shall be sanitised (passed by reference).
+ * @param mixed $default Specifies the type $var shall have.
+ * If it is an array and $var is not one, then an empty array is returned.
+ * Otherwise var is cast to the same type, and if $default is an array all
+ * keys and values are cast recursively using this function too.
+ * @param bool $multibyte Indicates whether string keys and values may contain UTF-8 characters.
+ * Default is false, causing all bytes outside the ASCII range (0-127) to
+ * be replaced with question marks.
+ * @param bool $trim Indicates whether trim() should be applied to string values.
+ * Default is true.
+ */
+ public function recursive_set_var(&$var, $default, $multibyte, $trim = true)
+ {
+ if (is_array($var) !== is_array($default))
+ {
+ $var = (is_array($default)) ? array() : $default;
+ return;
+ }
+
+ if (!is_array($default))
+ {
+ $type = gettype($default);
+ $this->set_var($var, $var, $type, $multibyte, $trim);
+ }
+ else
+ {
+ // make sure there is at least one key/value pair to use get the
+ // types from
+ if (empty($default))
+ {
+ $var = array();
+ return;
+ }
+
+ list($default_key, $default_value) = each($default);
+ $value_type = gettype($default_value);
+ $key_type = gettype($default_key);
+
+ $_var = $var;
+ $var = array();
+
+ foreach ($_var as $k => $v)
+ {
+ $this->set_var($k, $k, $key_type, $multibyte);
+
+ $this->recursive_set_var($v, $default_value, $multibyte, $trim);
+ $var[$k] = $v;
+ }
+ }
+ }
+}
diff --git a/phpBB/phpbb/request/type_cast_helper_interface.php b/phpBB/phpbb/request/type_cast_helper_interface.php
new file mode 100644
index 0000000000..f12795eef9
--- /dev/null
+++ b/phpBB/phpbb/request/type_cast_helper_interface.php
@@ -0,0 +1,57 @@
+<?php
+/**
+*
+* @package \phpbb\request\request
+* @copyright (c) 2010 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\request;
+
+/**
+* An interface for type cast operations.
+*
+* @package \phpbb\request\request
+*/
+interface type_cast_helper_interface
+{
+ /**
+ * Recursively applies addslashes to a variable.
+ *
+ * @param mixed &$var Variable passed by reference to which slashes will be added.
+ */
+ public function addslashes_recursively(&$var);
+
+ /**
+ * Recursively applies addslashes to a variable if magic quotes are turned on.
+ *
+ * @param mixed &$var Variable passed by reference to which slashes will be added.
+ */
+ public function add_magic_quotes(&$var);
+
+ /**
+ * Set variable $result to a particular type.
+ *
+ * @param mixed &$result The variable to fill
+ * @param mixed $var The contents to fill with
+ * @param mixed $type The variable type. Will be used with {@link settype()}
+ * @param bool $multibyte Indicates whether string values may contain UTF-8 characters.
+ * Default is false, causing all bytes outside the ASCII range (0-127) to be replaced with question marks.
+ */
+ public function set_var(&$result, $var, $type, $multibyte = false);
+
+ /**
+ * Recursively sets a variable to a given type using {@link set_var set_var}.
+ *
+ * @param string $var The value which shall be sanitised (passed by reference).
+ * @param mixed $default Specifies the type $var shall have.
+ * If it is an array and $var is not one, then an empty array is returned.
+ * Otherwise var is cast to the same type, and if $default is an array all
+ * keys and values are cast recursively using this function too.
+ * @param bool $multibyte Indicates whether string keys and values may contain UTF-8 characters.
+ * Default is false, causing all bytes outside the ASCII range (0-127) to
+ * be replaced with question marks.
+ */
+ public function recursive_set_var(&$var, $default, $multibyte);
+}
diff --git a/phpBB/includes/search/search.php b/phpBB/phpbb/search/base.php
index df7c8a0892..9ecf3751d0 100644
--- a/phpBB/includes/search/search.php
+++ b/phpBB/phpbb/search/base.php
@@ -2,19 +2,12 @@
/**
*
* @package search
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
-/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
+namespace phpbb\search;
/**
* @ignore
@@ -24,12 +17,12 @@ define('SEARCH_RESULT_IN_CACHE', 1);
define('SEARCH_RESULT_INCOMPLETE', 2);
/**
-* search_backend
+* \phpbb\search\base
* optional base class for search plugins providing simple caching based on ACM
* and functions to retrieve ignore_words and synonyms
* @package search
*/
-class search_backend
+class base
{
var $ignore_words = array();
var $match_synonym = array();
@@ -95,7 +88,7 @@ class search_backend
*
* @return int SEARCH_RESULT_NOT_IN_CACHE or SEARCH_RESULT_IN_CACHE or SEARCH_RESULT_INCOMPLETE
*/
- function obtain_ids($search_key, &$result_count, &$id_ary, $start, $per_page, $sort_dir)
+ function obtain_ids($search_key, &$result_count, &$id_ary, &$start, $per_page, $sort_dir)
{
global $cache;
@@ -110,6 +103,19 @@ class search_backend
$reverse_ids = ($stored_ids[-2] != $sort_dir) ? true : false;
$complete = true;
+ // Change start parameter in case out of bounds
+ if ($result_count)
+ {
+ if ($start < 0)
+ {
+ $start = 0;
+ }
+ else if ($start >= $result_count)
+ {
+ $start = floor(($result_count - 1) / $per_page) * $per_page;
+ }
+ }
+
// change the start to the actual end of the current request if the sort direction differs
// from the dirction in the cache and reverse the ids later
if ($reverse_ids)
@@ -316,5 +322,3 @@ class search_backend
$db->sql_query($sql);
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/search/fulltext_mysql.php b/phpBB/phpbb/search/fulltext_mysql.php
index f28b8885e7..509b73e26e 100644
--- a/phpBB/includes/search/fulltext_mysql.php
+++ b/phpBB/phpbb/search/fulltext_mysql.php
@@ -2,79 +2,150 @@
/**
*
* @package search
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
-/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
-* @ignore
-*/
-include_once($phpbb_root_path . 'includes/search/search.' . $phpEx);
+namespace phpbb\search;
/**
* fulltext_mysql
* Fulltext search for MySQL
* @package search
*/
-class fulltext_mysql extends search_backend
+class fulltext_mysql extends \phpbb\search\base
{
- var $stats = array();
- var $word_length = array();
- var $split_words = array();
- var $search_query;
- var $common_words = array();
- var $pcre_properties = false;
- var $mbstring_regex = false;
-
- function fulltext_mysql(&$error)
- {
- global $config;
+ /**
+ * Associative array holding index stats
+ * @var array
+ */
+ protected $stats = array();
+
+ /**
+ * Holds the words entered by user, obtained by splitting the entered query on whitespace
+ * @var array
+ */
+ protected $split_words = array();
- $this->word_length = array('min' => $config['fulltext_mysql_min_word_len'], 'max' => $config['fulltext_mysql_max_word_len']);
+ /**
+ * Config object
+ * @var \phpbb\config\config
+ */
+ protected $config;
- if (version_compare(PHP_VERSION, '5.1.0', '>=') || (version_compare(PHP_VERSION, '5.0.0-dev', '<=') && version_compare(PHP_VERSION, '4.4.0', '>=')))
- {
- // While this is the proper range of PHP versions, PHP may not be linked with the bundled PCRE lib and instead with an older version
- if (@preg_match('/\p{L}/u', 'a') !== false)
- {
- $this->pcre_properties = true;
- }
- }
+ /**
+ * Database connection
+ * @var \phpbb\db\driver\driver
+ */
+ protected $db;
- if (function_exists('mb_ereg'))
+ /**
+ * User object
+ * @var \phpbb\user
+ */
+ protected $user;
+
+ /**
+ * Associative array stores the min and max word length to be searched
+ * @var array
+ */
+ protected $word_length = array();
+
+ /**
+ * Contains tidied search query.
+ * Operators are prefixed in search query and common words excluded
+ * @var string
+ */
+ protected $search_query;
+
+ /**
+ * Contains common words.
+ * Common words are words with length less/more than min/max length
+ * @var array
+ */
+ protected $common_words = array();
+
+ /**
+ * Constructor
+ * Creates a new \phpbb\search\fulltext_mysql, which is used as a search backend
+ *
+ * @param string|bool $error Any error that occurs is passed on through this reference variable otherwise false
+ */
+ public function __construct(&$error, $phpbb_root_path, $phpEx, $auth, $config, $db, $user)
+ {
+ $this->config = $config;
+ $this->db = $db;
+ $this->user = $user;
+
+ $this->word_length = array('min' => $this->config['fulltext_mysql_min_word_len'], 'max' => $this->config['fulltext_mysql_max_word_len']);
+
+ /**
+ * Load the UTF tools
+ */
+ if (!function_exists('utf8_strlen'))
{
- $this->mbstring_regex = true;
- mb_regex_encoding('UTF-8');
+ include($phpbb_root_path . 'includes/utf/utf_tools.' . $phpEx);
}
$error = false;
}
/**
- * Checks for correct MySQL version and stores min/max word length in the config
+ * Returns the name of this search backend to be displayed to administrators
+ *
+ * @return string Name
*/
- function init()
+ public function get_name()
+ {
+ return 'MySQL Fulltext';
+ }
+
+ /**
+ * Returns the search_query
+ *
+ * @return string search query
+ */
+ public function get_search_query()
+ {
+ return $this->search_query;
+ }
+
+ /**
+ * Returns the common_words array
+ *
+ * @return array common words that are ignored by search backend
+ */
+ public function get_common_words()
{
- global $db, $user;
+ return $this->common_words;
+ }
+
+ /**
+ * Returns the word_length array
+ *
+ * @return array min and max word length for searching
+ */
+ public function get_word_length()
+ {
+ return $this->word_length;
+ }
- if ($db->sql_layer != 'mysql4' && $db->sql_layer != 'mysqli')
+ /**
+ * Checks for correct MySQL version and stores min/max word length in the config
+ *
+ * @return string|bool Language key of the error/incompatiblity occurred
+ */
+ public function init()
+ {
+ if ($this->db->sql_layer != 'mysql4' && $this->db->sql_layer != 'mysqli')
{
- return $user->lang['FULLTEXT_MYSQL_INCOMPATIBLE_VERSION'];
+ return $this->user->lang['FULLTEXT_MYSQL_INCOMPATIBLE_DATABASE'];
}
- $result = $db->sql_query('SHOW TABLE STATUS LIKE \'' . POSTS_TABLE . '\'');
- $info = $db->sql_fetchrow($result);
- $db->sql_freeresult($result);
+ $result = $this->db->sql_query('SHOW TABLE STATUS LIKE \'' . POSTS_TABLE . '\'');
+ $info = $this->db->sql_fetchrow($result);
+ $this->db->sql_freeresult($result);
$engine = '';
if (isset($info['Engine']))
@@ -91,23 +162,23 @@ class fulltext_mysql extends search_backend
// FULLTEXT is supported on InnoDB since MySQL 5.6.4 according to
// http://dev.mysql.com/doc/refman/5.6/en/innodb-storage-engine.html
$engine === 'InnoDB' &&
- phpbb_version_compare($db->sql_server_info(true), '5.6.4', '>=');
+ phpbb_version_compare($this->db->sql_server_info(true), '5.6.4', '>=');
if (!$fulltext_supported)
{
- return $user->lang['FULLTEXT_MYSQL_NOT_SUPPORTED'];
+ return $this->user->lang['FULLTEXT_MYSQL_NOT_SUPPORTED'];
}
$sql = 'SHOW VARIABLES
LIKE \'ft\_%\'';
- $result = $db->sql_query($sql);
+ $result = $this->db->sql_query($sql);
$mysql_info = array();
- while ($row = $db->sql_fetchrow($result))
+ while ($row = $this->db->sql_fetchrow($result))
{
$mysql_info[$row['Variable_name']] = $row['Value'];
}
- $db->sql_freeresult($result);
+ $this->db->sql_freeresult($result);
set_config('fulltext_mysql_max_word_len', $mysql_info['ft_max_word_len']);
set_config('fulltext_mysql_min_word_len', $mysql_info['ft_min_word_len']);
@@ -123,10 +194,8 @@ class fulltext_mysql extends search_backend
* @param string $terms is either 'all' or 'any'
* @return bool false if no valid keywords were found and otherwise true
*/
- function split_keywords(&$keywords, $terms)
+ public function split_keywords(&$keywords, $terms)
{
- global $config, $user;
-
if ($terms == 'all')
{
$match = array('#\sand\s#iu', '#\sor\s#iu', '#\snot\s#iu', '#(^|\s)\+#', '#(^|\s)-#', '#(^|\s)\|#');
@@ -139,45 +208,15 @@ class fulltext_mysql extends search_backend
$split_keywords = preg_replace("#[\n\r\t]+#", ' ', trim(htmlspecialchars_decode($keywords)));
// Split words
- if ($this->pcre_properties)
- {
- $split_keywords = preg_replace('#([^\p{L}\p{N}\'*"()])#u', '$1$1', str_replace('\'\'', '\' \'', trim($split_keywords)));
- }
- else if ($this->mbstring_regex)
- {
- $split_keywords = mb_ereg_replace('([^\w\'*"()])', '\\1\\1', str_replace('\'\'', '\' \'', trim($split_keywords)));
- }
- else
- {
- $split_keywords = preg_replace('#([^\w\'*"()])#u', '$1$1', str_replace('\'\'', '\' \'', trim($split_keywords)));
- }
-
- if ($this->pcre_properties)
- {
- $matches = array();
- preg_match_all('#(?:[^\p{L}\p{N}*"()]|^)([+\-|]?(?:[\p{L}\p{N}*"()]+\'?)*[\p{L}\p{N}*"()])(?:[^\p{L}\p{N}*"()]|$)#u', $split_keywords, $matches);
- $this->split_words = $matches[1];
- }
- else if ($this->mbstring_regex)
- {
- mb_ereg_search_init($split_keywords, '(?:[^\w*"()]|^)([+\-|]?(?:[\w*"()]+\'?)*[\w*"()])(?:[^\w*"()]|$)');
-
- while (($word = mb_ereg_search_regs()))
- {
- $this->split_words[] = $word[1];
- }
- }
- else
- {
- $matches = array();
- preg_match_all('#(?:[^\w*"()]|^)([+\-|]?(?:[\w*"()]+\'?)*[\w*"()])(?:[^\w*"()]|$)#u', $split_keywords, $matches);
- $this->split_words = $matches[1];
- }
+ $split_keywords = preg_replace('#([^\p{L}\p{N}\'*"()])#u', '$1$1', str_replace('\'\'', '\' \'', trim($split_keywords)));
+ $matches = array();
+ preg_match_all('#(?:[^\p{L}\p{N}*"()]|^)([+\-|]?(?:[\p{L}\p{N}*"()]+\'?)*[\p{L}\p{N}*"()])(?:[^\p{L}\p{N}*"()]|$)#u', $split_keywords, $matches);
+ $this->split_words = $matches[1];
// We limit the number of allowed keywords to minimize load on the database
- if ($config['max_num_search_keywords'] && sizeof($this->split_words) > $config['max_num_search_keywords'])
+ if ($this->config['max_num_search_keywords'] && sizeof($this->split_words) > $this->config['max_num_search_keywords'])
{
- trigger_error($user->lang('MAX_NUM_SEARCH_KEYWORDS_REFINE', $config['max_num_search_keywords'], sizeof($this->split_words)));
+ trigger_error($this->user->lang('MAX_NUM_SEARCH_KEYWORDS_REFINE', (int) $this->config['max_num_search_keywords'], sizeof($this->split_words)));
}
// to allow phrase search, we need to concatenate quoted words
@@ -200,7 +239,7 @@ class fulltext_mysql extends search_backend
}
else
{
- $tmp_split_words[] = $word . ' ';
+ $tmp_split_words[] = $word;
}
}
if ($phrase)
@@ -219,7 +258,7 @@ class fulltext_mysql extends search_backend
// check word length
$clean_len = utf8_strlen(str_replace('*', '', $clean_word));
- if (($clean_len < $config['fulltext_mysql_min_word_len']) || ($clean_len > $config['fulltext_mysql_max_word_len']))
+ if (($clean_len < $this->config['fulltext_mysql_min_word_len']) || ($clean_len > $this->config['fulltext_mysql_max_word_len']))
{
$this->common_words[] = $word;
unset($this->split_words[$i]);
@@ -271,54 +310,22 @@ class fulltext_mysql extends search_backend
/**
* Turns text into an array of words
+ * @param string $text contains post text/subject
*/
- function split_message($text)
+ public function split_message($text)
{
- global $config;
-
// Split words
- if ($this->pcre_properties)
- {
- $text = preg_replace('#([^\p{L}\p{N}\'*])#u', '$1$1', str_replace('\'\'', '\' \'', trim($text)));
- }
- else if ($this->mbstring_regex)
- {
- $text = mb_ereg_replace('([^\w\'*])', '\\1\\1', str_replace('\'\'', '\' \'', trim($text)));
- }
- else
- {
- $text = preg_replace('#([^\w\'*])#u', '$1$1', str_replace('\'\'', '\' \'', trim($text)));
- }
-
- if ($this->pcre_properties)
- {
- $matches = array();
- preg_match_all('#(?:[^\p{L}\p{N}*]|^)([+\-|]?(?:[\p{L}\p{N}*]+\'?)*[\p{L}\p{N}*])(?:[^\p{L}\p{N}*]|$)#u', $text, $matches);
- $text = $matches[1];
- }
- else if ($this->mbstring_regex)
- {
- mb_ereg_search_init($text, '(?:[^\w*]|^)([+\-|]?(?:[\w*]+\'?)*[\w*])(?:[^\w*]|$)');
-
- $text = array();
- while (($word = mb_ereg_search_regs()))
- {
- $text[] = $word[1];
- }
- }
- else
- {
- $matches = array();
- preg_match_all('#(?:[^\w*]|^)([+\-|]?(?:[\w*]+\'?)*[\w*])(?:[^\w*]|$)#u', $text, $matches);
- $text = $matches[1];
- }
+ $text = preg_replace('#([^\p{L}\p{N}\'*])#u', '$1$1', str_replace('\'\'', '\' \'', trim($text)));
+ $matches = array();
+ preg_match_all('#(?:[^\p{L}\p{N}*]|^)([+\-|]?(?:[\p{L}\p{N}*]+\'?)*[\p{L}\p{N}*])(?:[^\p{L}\p{N}*]|$)#u', $text, $matches);
+ $text = $matches[1];
// remove too short or too long words
$text = array_values($text);
for ($i = 0, $n = sizeof($text); $i < $n; $i++)
{
$text[$i] = trim($text[$i]);
- if (utf8_strlen($text[$i]) < $config['fulltext_mysql_min_word_len'] || utf8_strlen($text[$i]) > $config['fulltext_mysql_max_word_len'])
+ if (utf8_strlen($text[$i]) < $this->config['fulltext_mysql_min_word_len'] || utf8_strlen($text[$i]) > $this->config['fulltext_mysql_max_word_len'])
{
unset($text[$i]);
}
@@ -328,7 +335,7 @@ class fulltext_mysql extends search_backend
}
/**
- * Performs a search on keywords depending on display specific params. You have to run split_keywords() first.
+ * Performs a search on keywords depending on display specific params. You have to run split_keywords() first
*
* @param string $type contains either posts or topics depending on what should be searched for
* @param string $fields contains either titleonly (topic titles should be searched), msgonly (only message bodies should be searched), firstpost (only subject and body of the first post should be searched) or all (all post bodies and subjects should be searched)
@@ -338,7 +345,7 @@ class fulltext_mysql extends search_backend
* @param string $sort_dir is either a or d representing ASC and DESC
* @param string $sort_days specifies the maximum amount of days a post may be old
* @param array $ex_fid_ary specifies an array of forum ids which should not be searched
- * @param array $m_approve_fid_ary specifies an array of forum ids in which the searcher is allowed to view unapproved posts
+ * @param string $post_visibility specifies which types of posts the user can view in which forums
* @param int $topic_id is set to 0 or a topic id, if it is not 0 then only posts in this topic should be searched
* @param array $author_ary an array of author ids if the author should be ignored during the search the array is empty
* @param string $author_name specifies the author match, when ANONYMOUS is also a search-match
@@ -346,14 +353,10 @@ class fulltext_mysql extends search_backend
* @param int $start indicates the first index of the page
* @param int $per_page number of ids each page is supposed to contain
* @return boolean|int total number of results
- *
- * @access public
*/
- function keyword_search($type, $fields, $terms, $sort_by_sql, $sort_key, $sort_dir, $sort_days, $ex_fid_ary, $m_approve_fid_ary, $topic_id, $author_ary, $author_name, &$id_ary, $start, $per_page)
+ public function keyword_search($type, $fields, $terms, $sort_by_sql, $sort_key, $sort_dir, $sort_days, $ex_fid_ary, $post_visibility, $topic_id, $author_ary, $author_name, &$id_ary, &$start, $per_page)
{
- global $config, $db;
-
- // No keywords? No posts.
+ // No keywords? No posts
if (!$this->search_query)
{
return false;
@@ -369,10 +372,15 @@ class fulltext_mysql extends search_backend
$sort_key,
$topic_id,
implode(',', $ex_fid_ary),
- implode(',', $m_approve_fid_ary),
+ $post_visibility,
implode(',', $author_ary)
)));
+ if ($start < 0)
+ {
+ $start = 0;
+ }
+
// try reading the results from cache
$result_count = 0;
if ($this->obtain_ids($search_key, $result_count, $id_ary, $start, $per_page, $sort_dir) == SEARCH_RESULT_IN_CACHE)
@@ -431,19 +439,6 @@ class fulltext_mysql extends search_backend
break;
}
- if (!sizeof($m_approve_fid_ary))
- {
- $m_approve_fid_sql = ' AND p.post_approved = 1';
- }
- else if ($m_approve_fid_ary === array(-1))
- {
- $m_approve_fid_sql = '';
- }
- else
- {
- $m_approve_fid_sql = ' AND (p.post_approved = 1 OR ' . $db->sql_in_set('p.forum_id', $m_approve_fid_ary, true) . ')';
- }
-
$sql_select = (!$result_count) ? 'SQL_CALC_FOUND_ROWS ' : '';
$sql_select = ($type == 'posts') ? $sql_select . 'p.post_id' : 'DISTINCT ' . $sql_select . 't.topic_id';
$sql_from = ($join_topic) ? TOPICS_TABLE . ' t, ' : '';
@@ -451,11 +446,11 @@ class fulltext_mysql extends search_backend
if (sizeof($author_ary) && $author_name)
{
// first one matches post of registered users, second one guests and deleted users
- $sql_author = ' AND (' . $db->sql_in_set('p.poster_id', array_diff($author_ary, array(ANONYMOUS)), false, true) . ' OR p.post_username ' . $author_name . ')';
+ $sql_author = ' AND (' . $this->db->sql_in_set('p.poster_id', array_diff($author_ary, array(ANONYMOUS)), false, true) . ' OR p.post_username ' . $author_name . ')';
}
else if (sizeof($author_ary))
{
- $sql_author = ' AND ' . $db->sql_in_set('p.poster_id', $author_ary);
+ $sql_author = ' AND ' . $this->db->sql_in_set('p.poster_id', $author_ary);
}
else
{
@@ -465,39 +460,34 @@ class fulltext_mysql extends search_backend
$sql_where_options = $sql_sort_join;
$sql_where_options .= ($topic_id) ? ' AND p.topic_id = ' . $topic_id : '';
$sql_where_options .= ($join_topic) ? ' AND t.topic_id = p.topic_id' : '';
- $sql_where_options .= (sizeof($ex_fid_ary)) ? ' AND ' . $db->sql_in_set('p.forum_id', $ex_fid_ary, true) : '';
- $sql_where_options .= $m_approve_fid_sql;
+ $sql_where_options .= (sizeof($ex_fid_ary)) ? ' AND ' . $this->db->sql_in_set('p.forum_id', $ex_fid_ary, true) : '';
+ $sql_where_options .= ' AND ' . $post_visibility;
$sql_where_options .= $sql_author;
$sql_where_options .= ($sort_days) ? ' AND p.post_time >= ' . (time() - ($sort_days * 86400)) : '';
$sql_where_options .= $sql_match_where;
$sql = "SELECT $sql_select
FROM $sql_from$sql_sort_table" . POSTS_TABLE . " p
- WHERE MATCH ($sql_match) AGAINST ('" . $db->sql_escape(htmlspecialchars_decode($this->search_query)) . "' IN BOOLEAN MODE)
+ WHERE MATCH ($sql_match) AGAINST ('" . $this->db->sql_escape(htmlspecialchars_decode($this->search_query)) . "' IN BOOLEAN MODE)
$sql_where_options
ORDER BY $sql_sort";
- $result = $db->sql_query_limit($sql, $config['search_block_size'], $start);
+ $result = $this->db->sql_query_limit($sql, $this->config['search_block_size'], $start);
- while ($row = $db->sql_fetchrow($result))
+ while ($row = $this->db->sql_fetchrow($result))
{
$id_ary[] = (int) $row[$field];
}
- $db->sql_freeresult($result);
+ $this->db->sql_freeresult($result);
$id_ary = array_unique($id_ary);
- if (!sizeof($id_ary))
- {
- return false;
- }
-
// if the total result count is not cached yet, retrieve it from the db
if (!$result_count)
{
- $sql = 'SELECT FOUND_ROWS() as result_count';
- $result = $db->sql_query($sql);
- $result_count = (int) $db->sql_fetchfield('result_count');
- $db->sql_freeresult($result);
+ $sql_found_rows = 'SELECT FOUND_ROWS() as result_count';
+ $result = $this->db->sql_query($sql_found_rows);
+ $result_count = (int) $this->db->sql_fetchfield('result_count');
+ $this->db->sql_freeresult($result);
if (!$result_count)
{
@@ -505,6 +495,21 @@ class fulltext_mysql extends search_backend
}
}
+ if ($start >= $result_count)
+ {
+ $start = floor(($result_count - 1) / $per_page) * $per_page;
+
+ $result = $this->db->sql_query_limit($sql, $this->config['search_block_size'], $start);
+
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ $id_ary[] = (int) $row[$field];
+ }
+ $this->db->sql_freeresult($result);
+
+ $id_ary = array_unique($id_ary);
+ }
+
// store the ids, from start on then delete anything that isn't on the current page because we only need ids for one page
$this->save_ids($search_key, implode(' ', $this->split_words), $author_ary, $result_count, $id_ary, $start, $sort_dir);
$id_ary = array_slice($id_ary, 0, (int) $per_page);
@@ -522,7 +527,7 @@ class fulltext_mysql extends search_backend
* @param string $sort_dir is either a or d representing ASC and DESC
* @param string $sort_days specifies the maximum amount of days a post may be old
* @param array $ex_fid_ary specifies an array of forum ids which should not be searched
- * @param array $m_approve_fid_ary specifies an array of forum ids in which the searcher is allowed to view unapproved posts
+ * @param string $post_visibility specifies which types of posts the user can view in which forums
* @param int $topic_id is set to 0 or a topic id, if it is not 0 then only posts in this topic should be searched
* @param array $author_ary an array of author ids
* @param string $author_name specifies the author match, when ANONYMOUS is also a search-match
@@ -530,14 +535,10 @@ class fulltext_mysql extends search_backend
* @param int $start indicates the first index of the page
* @param int $per_page number of ids each page is supposed to contain
* @return boolean|int total number of results
- *
- * @access public
*/
- function author_search($type, $firstpost_only, $sort_by_sql, $sort_key, $sort_dir, $sort_days, $ex_fid_ary, $m_approve_fid_ary, $topic_id, $author_ary, $author_name, &$id_ary, $start, $per_page)
+ public function author_search($type, $firstpost_only, $sort_by_sql, $sort_key, $sort_dir, $sort_days, $ex_fid_ary, $post_visibility, $topic_id, $author_ary, $author_name, &$id_ary, &$start, $per_page)
{
- global $config, $db;
-
- // No author? No posts.
+ // No author? No posts
if (!sizeof($author_ary))
{
return 0;
@@ -554,11 +555,16 @@ class fulltext_mysql extends search_backend
$sort_key,
$topic_id,
implode(',', $ex_fid_ary),
- implode(',', $m_approve_fid_ary),
+ $post_visibility,
implode(',', $author_ary),
$author_name,
)));
+ if ($start < 0)
+ {
+ $start = 0;
+ }
+
// try reading the results from cache
$result_count = 0;
if ($this->obtain_ids($search_key, $result_count, $id_ary, $start, $per_page, $sort_dir) == SEARCH_RESULT_IN_CACHE)
@@ -572,13 +578,13 @@ class fulltext_mysql extends search_backend
if ($author_name)
{
// first one matches post of registered users, second one guests and deleted users
- $sql_author = '(' . $db->sql_in_set('p.poster_id', array_diff($author_ary, array(ANONYMOUS)), false, true) . ' OR p.post_username ' . $author_name . ')';
+ $sql_author = '(' . $this->db->sql_in_set('p.poster_id', array_diff($author_ary, array(ANONYMOUS)), false, true) . ' OR p.post_username ' . $author_name . ')';
}
else
{
- $sql_author = $db->sql_in_set('p.poster_id', $author_ary);
+ $sql_author = $this->db->sql_in_set('p.poster_id', $author_ary);
}
- $sql_fora = (sizeof($ex_fid_ary)) ? ' AND ' . $db->sql_in_set('p.forum_id', $ex_fid_ary, true) : '';
+ $sql_fora = (sizeof($ex_fid_ary)) ? ' AND ' . $this->db->sql_in_set('p.forum_id', $ex_fid_ary, true) : '';
$sql_topic_id = ($topic_id) ? ' AND p.topic_id = ' . (int) $topic_id : '';
$sql_time = ($sort_days) ? ' AND p.post_time >= ' . (time() - ($sort_days * 86400)) : '';
$sql_firstpost = ($firstpost_only) ? ' AND p.post_id = t.topic_first_post_id' : '';
@@ -604,18 +610,7 @@ class fulltext_mysql extends search_backend
break;
}
- if (!sizeof($m_approve_fid_ary))
- {
- $m_approve_fid_sql = ' AND p.post_approved = 1';
- }
- else if ($m_approve_fid_ary == array(-1))
- {
- $m_approve_fid_sql = '';
- }
- else
- {
- $m_approve_fid_sql = ' AND (p.post_approved = 1 OR ' . $db->sql_in_set('p.forum_id', $m_approve_fid_ary, true) . ')';
- }
+ $m_approve_fid_sql = ' AND ' . $post_visibility;
// If the cache was completely empty count the results
$calc_results = ($result_count) ? '' : 'SQL_CALC_FOUND_ROWS ';
@@ -653,21 +648,21 @@ class fulltext_mysql extends search_backend
}
// Only read one block of posts from the db and then cache it
- $result = $db->sql_query_limit($sql, $config['search_block_size'], $start);
+ $result = $this->db->sql_query_limit($sql, $this->config['search_block_size'], $start);
- while ($row = $db->sql_fetchrow($result))
+ while ($row = $this->db->sql_fetchrow($result))
{
$id_ary[] = (int) $row[$field];
}
- $db->sql_freeresult($result);
+ $this->db->sql_freeresult($result);
// retrieve the total result count if needed
if (!$result_count)
{
- $sql = 'SELECT FOUND_ROWS() as result_count';
- $result = $db->sql_query($sql);
- $result_count = (int) $db->sql_fetchfield('result_count');
- $db->sql_freeresult($result);
+ $sql_found_rows = 'SELECT FOUND_ROWS() as result_count';
+ $result = $this->db->sql_query($sql_found_rows);
+ $result_count = (int) $this->db->sql_fetchfield('result_count');
+ $this->db->sql_freeresult($result);
if (!$result_count)
{
@@ -675,6 +670,20 @@ class fulltext_mysql extends search_backend
}
}
+ if ($start >= $result_count)
+ {
+ $start = floor(($result_count - 1) / $per_page) * $per_page;
+
+ $result = $this->db->sql_query_limit($sql, $this->config['search_block_size'], $start);
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ $id_ary[] = (int) $row[$field];
+ }
+ $this->db->sql_freeresult($result);
+
+ $id_ary = array_unique($id_ary);
+ }
+
if (sizeof($id_ary))
{
$this->save_ids($search_key, '', $author_ary, $result_count, $id_ary, $start, $sort_dir);
@@ -686,14 +695,17 @@ class fulltext_mysql extends search_backend
}
/**
- * Destroys cached search results, that contained one of the new words in a post so the results won't be outdated.
+ * Destroys cached search results, that contained one of the new words in a post so the results won't be outdated
*
- * @param string $mode contains the post mode: edit, post, reply, quote ...
+ * @param string $mode contains the post mode: edit, post, reply, quote ...
+ * @param int $post_id contains the post id of the post to index
+ * @param string $message contains the post text of the post
+ * @param string $subject contains the subject of the post to index
+ * @param int $poster_id contains the user id of the poster
+ * @param int $forum_id contains the forum id of parent forum of the post
*/
- function index($mode, $post_id, &$message, &$subject, $poster_id, $forum_id)
+ public function index($mode, $post_id, &$message, &$subject, $poster_id, $forum_id)
{
- global $db;
-
// Split old and new post/subject to obtain array of words
$split_text = $this->split_message($message);
$split_title = ($subject) ? $this->split_message($subject) : array();
@@ -712,7 +724,7 @@ class fulltext_mysql extends search_backend
/**
* Destroy cached results, that might be outdated after deleting a post
*/
- function index_remove($post_ids, $author_ids, $forum_ids)
+ public function index_remove($post_ids, $author_ids, $forum_ids)
{
$this->destroy_cache(array(), array_unique($author_ids));
}
@@ -720,10 +732,8 @@ class fulltext_mysql extends search_backend
/**
* Destroy old cache entries
*/
- function tidy()
+ public function tidy()
{
- global $db, $config;
-
// destroy too old cached search results
$this->destroy_cache(array());
@@ -732,11 +742,11 @@ class fulltext_mysql extends search_backend
/**
* Create fulltext index
+ *
+ * @return string|bool error string is returned incase of errors otherwise false
*/
- function create_index($acp_module, $u_action)
+ public function create_index($acp_module, $u_action)
{
- global $db;
-
// Make sure we can actually use MySQL with fulltext indexes
if ($error = $this->init())
{
@@ -752,7 +762,7 @@ class fulltext_mysql extends search_backend
if (!isset($this->stats['post_subject']))
{
- if ($db->sql_layer == 'mysqli' || version_compare($db->sql_server_info(true), '4.1.3', '>='))
+ if ($this->db->sql_layer == 'mysqli' || version_compare($this->db->sql_server_info(true), '4.1.3', '>='))
{
$alter[] = 'MODIFY post_subject varchar(255) COLLATE utf8_unicode_ci DEFAULT \'\' NOT NULL';
}
@@ -763,9 +773,9 @@ class fulltext_mysql extends search_backend
$alter[] = 'ADD FULLTEXT (post_subject)';
}
- if (!isset($this->stats['post_text']))
+ if (!isset($this->stats['post_content']))
{
- if ($db->sql_layer == 'mysqli' || version_compare($db->sql_server_info(true), '4.1.3', '>='))
+ if ($this->db->sql_layer == 'mysqli' || version_compare($this->db->sql_server_info(true), '4.1.3', '>='))
{
$alter[] = 'MODIFY post_text mediumtext COLLATE utf8_unicode_ci NOT NULL';
}
@@ -773,31 +783,27 @@ class fulltext_mysql extends search_backend
{
$alter[] = 'MODIFY post_text mediumtext NOT NULL';
}
- $alter[] = 'ADD FULLTEXT (post_text)';
- }
- if (!isset($this->stats['post_content']))
- {
- $alter[] = 'ADD FULLTEXT post_content (post_subject, post_text)';
+ $alter[] = 'ADD FULLTEXT post_content (post_text, post_subject)';
}
if (sizeof($alter))
{
- $db->sql_query('ALTER TABLE ' . POSTS_TABLE . ' ' . implode(', ', $alter));
+ $this->db->sql_query('ALTER TABLE ' . POSTS_TABLE . ' ' . implode(', ', $alter));
}
- $db->sql_query('TRUNCATE TABLE ' . SEARCH_RESULTS_TABLE);
+ $this->db->sql_query('TRUNCATE TABLE ' . SEARCH_RESULTS_TABLE);
return false;
}
/**
* Drop fulltext index
+ *
+ * @return string|bool error string is returned incase of errors otherwise false
*/
- function delete_index($acp_module, $u_action)
+ public function delete_index($acp_module, $u_action)
{
- global $db;
-
// Make sure we can actually use MySQL with fulltext indexes
if ($error = $this->init())
{
@@ -816,11 +822,6 @@ class fulltext_mysql extends search_backend
$alter[] = 'DROP INDEX post_subject';
}
- if (isset($this->stats['post_text']))
- {
- $alter[] = 'DROP INDEX post_text';
- }
-
if (isset($this->stats['post_content']))
{
$alter[] = 'DROP INDEX post_content';
@@ -828,10 +829,10 @@ class fulltext_mysql extends search_backend
if (sizeof($alter))
{
- $db->sql_query('ALTER TABLE ' . POSTS_TABLE . ' ' . implode(', ', $alter));
+ $this->db->sql_query('ALTER TABLE ' . POSTS_TABLE . ' ' . implode(', ', $alter));
}
- $db->sql_query('TRUNCATE TABLE ' . SEARCH_RESULTS_TABLE);
+ $this->db->sql_query('TRUNCATE TABLE ' . SEARCH_RESULTS_TABLE);
return false;
}
@@ -839,38 +840,37 @@ class fulltext_mysql extends search_backend
/**
* Returns true if both FULLTEXT indexes exist
*/
- function index_created()
+ public function index_created()
{
if (empty($this->stats))
{
$this->get_stats();
}
- return (isset($this->stats['post_text']) && isset($this->stats['post_subject']) && isset($this->stats['post_content'])) ? true : false;
+ return isset($this->stats['post_subject']) && isset($this->stats['post_content']);
}
/**
* Returns an associative array containing information about the indexes
*/
- function index_stats()
+ public function index_stats()
{
- global $user;
-
if (empty($this->stats))
{
$this->get_stats();
}
return array(
- $user->lang['FULLTEXT_MYSQL_TOTAL_POSTS'] => ($this->index_created()) ? $this->stats['total_posts'] : 0,
+ $this->user->lang['FULLTEXT_MYSQL_TOTAL_POSTS'] => ($this->index_created()) ? $this->stats['total_posts'] : 0,
);
}
- function get_stats()
+ /**
+ * Computes the stats and store them in the $this->stats associative array
+ */
+ protected function get_stats()
{
- global $db;
-
- if (strpos($db->sql_layer, 'mysql') === false)
+ if (strpos($this->db->sql_layer, 'mysql') === false)
{
$this->stats = array();
return;
@@ -878,20 +878,16 @@ class fulltext_mysql extends search_backend
$sql = 'SHOW INDEX
FROM ' . POSTS_TABLE;
- $result = $db->sql_query($sql);
+ $result = $this->db->sql_query($sql);
- while ($row = $db->sql_fetchrow($result))
+ while ($row = $this->db->sql_fetchrow($result))
{
// deal with older MySQL versions which didn't use Index_type
$index_type = (isset($row['Index_type'])) ? $row['Index_type'] : $row['Comment'];
if ($index_type == 'FULLTEXT')
{
- if ($row['Key_name'] == 'post_text')
- {
- $this->stats['post_text'] = $row;
- }
- else if ($row['Key_name'] == 'post_subject')
+ if ($row['Key_name'] == 'post_subject')
{
$this->stats['post_subject'] = $row;
}
@@ -901,34 +897,26 @@ class fulltext_mysql extends search_backend
}
}
}
- $db->sql_freeresult($result);
+ $this->db->sql_freeresult($result);
- $this->stats['total_posts'] = empty($this->stats) ? 0 : $db->get_estimated_row_count(POSTS_TABLE);
+ $this->stats['total_posts'] = empty($this->stats) ? 0 : $this->db->get_estimated_row_count(POSTS_TABLE);
}
/**
* Display a note, that UTF-8 support is not available with certain versions of PHP
+ *
+ * @return associative array containing template and config variables
*/
- function acp()
+ public function acp()
{
- global $user, $config;
-
$tpl = '
<dl>
- <dt><label>' . $user->lang['FULLTEXT_MYSQL_PCRE'] . '</label><br /><span>' . $user->lang['FULLTEXT_MYSQL_PCRE_EXPLAIN'] . '</span></dt>
- <dd>' . (($this->pcre_properties) ? $user->lang['YES'] : $user->lang['NO']) . ' (PHP ' . PHP_VERSION . ')</dd>
+ <dt><label>' . $this->user->lang['MIN_SEARCH_CHARS'] . $this->user->lang['COLON'] . '</label><br /><span>' . $this->user->lang['FULLTEXT_MYSQL_MIN_SEARCH_CHARS_EXPLAIN'] . '</span></dt>
+ <dd>' . $this->config['fulltext_mysql_min_word_len'] . '</dd>
</dl>
<dl>
- <dt><label>' . $user->lang['FULLTEXT_MYSQL_MBSTRING'] . '</label><br /><span>' . $user->lang['FULLTEXT_MYSQL_MBSTRING_EXPLAIN'] . '</span></dt>
- <dd>' . (($this->mbstring_regex) ? $user->lang['YES'] : $user->lang['NO']). '</dd>
- </dl>
- <dl>
- <dt><label>' . $user->lang['MIN_SEARCH_CHARS'] . ':</label><br /><span>' . $user->lang['FULLTEXT_MYSQL_MIN_SEARCH_CHARS_EXPLAIN'] . '</span></dt>
- <dd>' . $config['fulltext_mysql_min_word_len'] . '</dd>
- </dl>
- <dl>
- <dt><label>' . $user->lang['MAX_SEARCH_CHARS'] . ':</label><br /><span>' . $user->lang['FULLTEXT_MYSQL_MAX_SEARCH_CHARS_EXPLAIN'] . '</span></dt>
- <dd>' . $config['fulltext_mysql_max_word_len'] . '</dd>
+ <dt><label>' . $this->user->lang['MAX_SEARCH_CHARS'] . $this->user->lang['COLON'] . '</label><br /><span>' . $this->user->lang['FULLTEXT_MYSQL_MAX_SEARCH_CHARS_EXPLAIN'] . '</span></dt>
+ <dd>' . $this->config['fulltext_mysql_max_word_len'] . '</dd>
</dl>
';
@@ -939,5 +927,3 @@ class fulltext_mysql extends search_backend
);
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/includes/search/fulltext_native.php b/phpBB/phpbb/search/fulltext_native.php
index 29c5a72874..60180f1728 100644
--- a/phpBB/includes/search/fulltext_native.php
+++ b/phpBB/phpbb/search/fulltext_native.php
@@ -2,87 +2,181 @@
/**
*
* @package search
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
-/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
-* @ignore
-*/
-include_once($phpbb_root_path . 'includes/search/search.' . $phpEx);
+namespace phpbb\search;
/**
* fulltext_native
* phpBB's own db driven fulltext search, version 2
* @package search
*/
-class fulltext_native extends search_backend
+class fulltext_native extends \phpbb\search\base
{
- var $stats = array();
- var $word_length = array();
- var $search_query;
- var $common_words = array();
+ /**
+ * Associative array holding index stats
+ * @var array
+ */
+ protected $stats = array();
- var $must_contain_ids = array();
- var $must_not_contain_ids = array();
- var $must_exclude_one_ids = array();
+ /**
+ * Associative array stores the min and max word length to be searched
+ * @var array
+ */
+ protected $word_length = array();
/**
- * Initialises the fulltext_native search backend with min/max word length and makes sure the UTF-8 normalizer is loaded.
- *
- * @param boolean|string &$error is passed by reference and should either be set to false on success or an error message on failure.
+ * Contains tidied search query.
+ * Operators are prefixed in search query and common words excluded
+ * @var string
+ */
+ protected $search_query;
+
+ /**
+ * Contains common words.
+ * Common words are words with length less/more than min/max length
+ * @var array
+ */
+ protected $common_words = array();
+
+ /**
+ * Post ids of posts containing words that are to be included
+ * @var array
+ */
+ protected $must_contain_ids = array();
+
+ /**
+ * Post ids of posts containing words that should not be included
+ * @var array
+ */
+ protected $must_not_contain_ids = array();
+
+ /**
+ * Post ids of posts containing atleast one word that needs to be excluded
+ * @var array
+ */
+ protected $must_exclude_one_ids = array();
+
+ /**
+ * Relative path to board root
+ * @var string
+ */
+ protected $phpbb_root_path;
+
+ /**
+ * PHP Extension
+ * @var string
+ */
+ protected $php_ext;
+
+ /**
+ * Config object
+ * @var \phpbb\config\config
+ */
+ protected $config;
+
+ /**
+ * Database connection
+ * @var \phpbb\db\driver\driver
+ */
+ protected $db;
+
+ /**
+ * User object
+ * @var \phpbb\user
+ */
+ protected $user;
+
+ /**
+ * Initialises the fulltext_native search backend with min/max word length and makes sure the UTF-8 normalizer is loaded
*
- * @access public
+ * @param boolean|string &$error is passed by reference and should either be set to false on success or an error message on failure
*/
- function fulltext_native(&$error)
+ public function __construct(&$error, $phpbb_root_path, $phpEx, $auth, $config, $db, $user)
{
- global $phpbb_root_path, $phpEx, $config;
+ $this->phpbb_root_path = $phpbb_root_path;
+ $this->php_ext = $phpEx;
+ $this->config = $config;
+ $this->db = $db;
+ $this->user = $user;
- $this->word_length = array('min' => $config['fulltext_native_min_chars'], 'max' => $config['fulltext_native_max_chars']);
+ $this->word_length = array('min' => $this->config['fulltext_native_min_chars'], 'max' => $this->config['fulltext_native_max_chars']);
/**
* Load the UTF tools
*/
if (!class_exists('utf_normalizer'))
{
- include($phpbb_root_path . 'includes/utf/utf_normalizer.' . $phpEx);
+ include($this->phpbb_root_path . 'includes/utf/utf_normalizer.' . $this->php_ext);
+ }
+ if (!function_exists('utf8_decode_ncr'))
+ {
+ include($this->phpbb_root_path . 'includes/utf/utf_tools.' . $this->php_ext);
}
-
$error = false;
}
/**
- * This function fills $this->search_query with the cleaned user search query.
+ * Returns the name of this search backend to be displayed to administrators
+ *
+ * @return string Name
+ */
+ public function get_name()
+ {
+ return 'phpBB Native Fulltext';
+ }
+
+ /**
+ * Returns the search_query
+ *
+ * @return string search query
+ */
+ public function get_search_query()
+ {
+ return $this->search_query;
+ }
+
+ /**
+ * Returns the common_words array
+ *
+ * @return array common words that are ignored by search backend
+ */
+ public function get_common_words()
+ {
+ return $this->common_words;
+ }
+
+ /**
+ * Returns the word_length array
+ *
+ * @return array min and max word length for searching
+ */
+ public function get_word_length()
+ {
+ return $this->word_length;
+ }
+
+ /**
+ * This function fills $this->search_query with the cleaned user search query
*
* If $terms is 'any' then the words will be extracted from the search query
* and combined with | inside brackets. They will afterwards be treated like
* an standard search query.
*
* Then it analyses the query and fills the internal arrays $must_not_contain_ids,
- * $must_contain_ids and $must_exclude_one_ids which are later used by keyword_search().
+ * $must_contain_ids and $must_exclude_one_ids which are later used by keyword_search()
*
* @param string $keywords contains the search query string as entered by the user
* @param string $terms is either 'all' (use search query as entered, default words to 'must be contained in post')
* or 'any' (find all posts containing at least one of the given words)
* @return boolean false if no valid keywords were found and otherwise true
- *
- * @access public
*/
- function split_keywords($keywords, $terms)
+ public function split_keywords($keywords, $terms)
{
- global $db, $user, $config;
-
$tokens = '+-|()*';
$keywords = trim($this->cleanup($keywords, $tokens));
@@ -181,9 +275,9 @@ class fulltext_native extends search_backend
$num_keywords = sizeof(explode(' ', $keywords));
// We limit the number of allowed keywords to minimize load on the database
- if ($config['max_num_search_keywords'] && $num_keywords > $config['max_num_search_keywords'])
+ if ($this->config['max_num_search_keywords'] && $num_keywords > $this->config['max_num_search_keywords'])
{
- trigger_error($user->lang('MAX_NUM_SEARCH_KEYWORDS_REFINE', $config['max_num_search_keywords'], $num_keywords));
+ trigger_error($this->user->lang('MAX_NUM_SEARCH_KEYWORDS_REFINE', (int) $this->config['max_num_search_keywords'], $num_keywords));
}
// $keywords input format: each word separated by a space, words in a bracket are not separated
@@ -213,12 +307,12 @@ class fulltext_native extends search_backend
{
$sql = 'SELECT word_id, word_text, word_common
FROM ' . SEARCH_WORDLIST_TABLE . '
- WHERE ' . $db->sql_in_set('word_text', $exact_words) . '
+ WHERE ' . $this->db->sql_in_set('word_text', $exact_words) . '
ORDER BY word_count ASC';
- $result = $db->sql_query($sql);
+ $result = $this->db->sql_query($sql);
// store an array of words and ids, remove common words
- while ($row = $db->sql_fetchrow($result))
+ while ($row = $this->db->sql_fetchrow($result))
{
if ($row['word_common'])
{
@@ -229,7 +323,7 @@ class fulltext_native extends search_backend
$words[$row['word_text']] = (int) $row['word_id'];
}
- $db->sql_freeresult($result);
+ $this->db->sql_freeresult($result);
}
// Handle +, - without preceeding whitespace character
@@ -305,7 +399,7 @@ class fulltext_native extends search_backend
{
if (strpos($word_part, '*') !== false)
{
- $id_words[] = '\'' . $db->sql_escape(str_replace('*', '%', $word_part)) . '\'';
+ $id_words[] = '\'' . $this->db->sql_escape(str_replace('*', '%', $word_part)) . '\'';
$non_common_words[] = $word_part;
}
else if (isset($words[$word_part]))
@@ -338,7 +432,7 @@ class fulltext_native extends search_backend
// throw an error if we shall not ignore unexistant words
else if (!$ignore_no_id && sizeof($non_common_words))
{
- trigger_error(sprintf($user->lang['WORDS_IN_NO_POST'], implode(', ', $non_common_words)));
+ trigger_error(sprintf($user->lang['WORDS_IN_NO_POST'], implode($user->lang['COMMA_SEPARATOR'], $non_common_words)));
}
unset($non_common_words);
}
@@ -350,7 +444,7 @@ class fulltext_native extends search_backend
$len = utf8_strlen(str_replace('*', '', $word));
if ($len >= $this->word_length['min'] && $len <= $this->word_length['max'])
{
- $this->{$mode . '_ids'}[] = '\'' . $db->sql_escape(str_replace('*', '%', $word)) . '\'';
+ $this->{$mode . '_ids'}[] = '\'' . $this->db->sql_escape(str_replace('*', '%', $word)) . '\'';
}
else
{
@@ -384,7 +478,7 @@ class fulltext_native extends search_backend
}
/**
- * Performs a search on keywords depending on display specific params. You have to run split_keywords() first.
+ * Performs a search on keywords depending on display specific params. You have to run split_keywords() first
*
* @param string $type contains either posts or topics depending on what should be searched for
* @param string $fields contains either titleonly (topic titles should be searched), msgonly (only message bodies should be searched), firstpost (only subject and body of the first post should be searched) or all (all post bodies and subjects should be searched)
@@ -394,7 +488,7 @@ class fulltext_native extends search_backend
* @param string $sort_dir is either a or d representing ASC and DESC
* @param string $sort_days specifies the maximum amount of days a post may be old
* @param array $ex_fid_ary specifies an array of forum ids which should not be searched
- * @param array $m_approve_fid_ary specifies an array of forum ids in which the searcher is allowed to view unapproved posts
+ * @param string $post_visibility specifies which types of posts the user can view in which forums
* @param int $topic_id is set to 0 or a topic id, if it is not 0 then only posts in this topic should be searched
* @param array $author_ary an array of author ids if the author should be ignored during the search the array is empty
* @param string $author_name specifies the author match, when ANONYMOUS is also a search-match
@@ -402,13 +496,9 @@ class fulltext_native extends search_backend
* @param int $start indicates the first index of the page
* @param int $per_page number of ids each page is supposed to contain
* @return boolean|int total number of results
- *
- * @access public
*/
- function keyword_search($type, $fields, $terms, $sort_by_sql, $sort_key, $sort_dir, $sort_days, $ex_fid_ary, $m_approve_fid_ary, $topic_id, $author_ary, $author_name, &$id_ary, $start, $per_page)
+ public function keyword_search($type, $fields, $terms, $sort_by_sql, $sort_key, $sort_dir, $sort_days, $ex_fid_ary, $post_visibility, $topic_id, $author_ary, $author_name, &$id_ary, &$start, $per_page)
{
- global $config, $db;
-
// No keywords? No posts.
if (empty($this->search_query))
{
@@ -441,7 +531,7 @@ class fulltext_native extends search_backend
$sort_key,
$topic_id,
implode(',', $ex_fid_ary),
- implode(',', $m_approve_fid_ary),
+ $post_visibility,
implode(',', $author_ary),
$author_name,
)));
@@ -529,7 +619,7 @@ class fulltext_native extends search_backend
}
}
- $sql_where[] = $db->sql_in_set("m$m_num.word_id", $word_ids);
+ $sql_where[] = $this->db->sql_in_set("m$m_num.word_id", $word_ids);
unset($word_id_sql);
unset($word_ids);
@@ -583,7 +673,7 @@ class fulltext_native extends search_backend
{
$sql_array['LEFT_JOIN'][] = array(
'FROM' => array(SEARCH_WORDMATCH_TABLE => 'm' . $m_num),
- 'ON' => $db->sql_in_set("m$m_num.word_id", $this->must_not_contain_ids) . (($title_match) ? " AND m$m_num.$title_match" : '') . " AND m$m_num.post_id = m0.post_id"
+ 'ON' => $this->db->sql_in_set("m$m_num.word_id", $this->must_not_contain_ids) . (($title_match) ? " AND m$m_num.$title_match" : '') . " AND m$m_num.post_id = m0.post_id"
);
$sql_where[] = "m$m_num.word_id IS NULL";
@@ -618,14 +708,7 @@ class fulltext_native extends search_backend
$sql_where[] = '(' . implode(' OR ', $is_null_joins) . ')';
}
- if (!sizeof($m_approve_fid_ary))
- {
- $sql_where[] = 'p.post_approved = 1';
- }
- else if ($m_approve_fid_ary !== array(-1))
- {
- $sql_where[] = '(p.post_approved = 1 OR ' . $db->sql_in_set('p.forum_id', $m_approve_fid_ary, true) . ')';
- }
+ $sql_where[] = $post_visibility;
if ($topic_id)
{
@@ -637,18 +720,18 @@ class fulltext_native extends search_backend
if ($author_name)
{
// first one matches post of registered users, second one guests and deleted users
- $sql_author = '(' . $db->sql_in_set('p.poster_id', array_diff($author_ary, array(ANONYMOUS)), false, true) . ' OR p.post_username ' . $author_name . ')';
+ $sql_author = '(' . $this->db->sql_in_set('p.poster_id', array_diff($author_ary, array(ANONYMOUS)), false, true) . ' OR p.post_username ' . $author_name . ')';
}
else
{
- $sql_author = $db->sql_in_set('p.poster_id', $author_ary);
+ $sql_author = $this->db->sql_in_set('p.poster_id', $author_ary);
}
$sql_where[] = $sql_author;
}
if (sizeof($ex_fid_ary))
{
- $sql_where[] = $db->sql_in_set('p.forum_id', $ex_fid_ary, true);
+ $sql_where[] = $this->db->sql_in_set('p.forum_id', $ex_fid_ary, true);
}
if ($sort_days)
@@ -673,7 +756,7 @@ class fulltext_native extends search_backend
);
}
- switch ($db->sql_layer)
+ switch ($this->db->sql_layer)
{
case 'mysql4':
case 'mysqli':
@@ -687,17 +770,17 @@ class fulltext_native extends search_backend
case 'sqlite':
$sql_array_count['SELECT'] = ($type == 'posts') ? 'DISTINCT p.post_id' : 'DISTINCT p.topic_id';
$sql = 'SELECT COUNT(' . (($type == 'posts') ? 'post_id' : 'topic_id') . ') as total_results
- FROM (' . $db->sql_build_query('SELECT', $sql_array_count) . ')';
+ FROM (' . $this->db->sql_build_query('SELECT', $sql_array_count) . ')';
// no break
default:
$sql_array_count['SELECT'] = ($type == 'posts') ? 'COUNT(DISTINCT p.post_id) AS total_results' : 'COUNT(DISTINCT p.topic_id) AS total_results';
- $sql = (!$sql) ? $db->sql_build_query('SELECT', $sql_array_count) : $sql;
+ $sql = (!$sql) ? $this->db->sql_build_query('SELECT', $sql_array_count) : $sql;
- $result = $db->sql_query($sql);
- $total_results = (int) $db->sql_fetchfield('total_results');
- $db->sql_freeresult($result);
+ $result = $this->db->sql_query($sql);
+ $total_results = (int) $this->db->sql_fetchfield('total_results');
+ $this->db->sql_freeresult($result);
if (!$total_results)
{
@@ -743,37 +826,32 @@ class fulltext_native extends search_backend
unset($sql_where, $sql_sort, $group_by);
- $sql = $db->sql_build_query('SELECT', $sql_array);
- $result = $db->sql_query_limit($sql, $config['search_block_size'], $start);
+ $sql = $this->db->sql_build_query('SELECT', $sql_array);
+ $result = $this->db->sql_query_limit($sql, $this->config['search_block_size'], $start);
- while ($row = $db->sql_fetchrow($result))
+ while ($row = $this->db->sql_fetchrow($result))
{
$id_ary[] = (int) $row[(($type == 'posts') ? 'post_id' : 'topic_id')];
}
- $db->sql_freeresult($result);
-
- if (!sizeof($id_ary))
- {
- return false;
- }
+ $this->db->sql_freeresult($result);
// if we use mysql and the total result count is not cached yet, retrieve it from the db
if (!$total_results && $is_mysql)
{
- // Count rows for the executed queries. Replace $select within $sql with SQL_CALC_FOUND_ROWS, and run it.
+ // Count rows for the executed queries. Replace $select within $sql with SQL_CALC_FOUND_ROWS, and run it
$sql_array_copy = $sql_array;
$sql_array_copy['SELECT'] = 'SQL_CALC_FOUND_ROWS p.post_id ';
- $sql = $db->sql_build_query('SELECT', $sql_array_copy);
+ $sql_calc = $this->db->sql_build_query('SELECT', $sql_array_copy);
unset($sql_array_copy);
- $db->sql_query($sql);
- $db->sql_freeresult($result);
+ $this->db->sql_query($sql_calc);
+ $this->db->sql_freeresult($result);
- $sql = 'SELECT FOUND_ROWS() as total_results';
- $result = $db->sql_query($sql);
- $total_results = (int) $db->sql_fetchfield('total_results');
- $db->sql_freeresult($result);
+ $sql_count = 'SELECT FOUND_ROWS() as total_results';
+ $result = $this->db->sql_query($sql_count);
+ $total_results = (int) $this->db->sql_fetchfield('total_results');
+ $this->db->sql_freeresult($result);
if (!$total_results)
{
@@ -781,6 +859,20 @@ class fulltext_native extends search_backend
}
}
+ if ($start >= $total_results)
+ {
+ $start = floor(($total_results - 1) / $per_page) * $per_page;
+
+ $result = $this->db->sql_query_limit($sql, $this->config['search_block_size'], $start);
+
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ $id_ary[] = (int) $row[(($type == 'posts') ? 'post_id' : 'topic_id')];
+ }
+ $this->db->sql_freeresult($result);
+
+ }
+
// store the ids, from start on then delete anything that isn't on the current page because we only need ids for one page
$this->save_ids($search_key, $this->search_query, $author_ary, $total_results, $id_ary, $start, $sort_dir);
$id_ary = array_slice($id_ary, 0, (int) $per_page);
@@ -798,7 +890,7 @@ class fulltext_native extends search_backend
* @param string $sort_dir is either a or d representing ASC and DESC
* @param string $sort_days specifies the maximum amount of days a post may be old
* @param array $ex_fid_ary specifies an array of forum ids which should not be searched
- * @param array $m_approve_fid_ary specifies an array of forum ids in which the searcher is allowed to view unapproved posts
+ * @param string $post_visibility specifies which types of posts the user can view in which forums
* @param int $topic_id is set to 0 or a topic id, if it is not 0 then only posts in this topic should be searched
* @param array $author_ary an array of author ids
* @param string $author_name specifies the author match, when ANONYMOUS is also a search-match
@@ -806,14 +898,10 @@ class fulltext_native extends search_backend
* @param int $start indicates the first index of the page
* @param int $per_page number of ids each page is supposed to contain
* @return boolean|int total number of results
- *
- * @access public
*/
- function author_search($type, $firstpost_only, $sort_by_sql, $sort_key, $sort_dir, $sort_days, $ex_fid_ary, $m_approve_fid_ary, $topic_id, $author_ary, $author_name, &$id_ary, $start, $per_page)
+ public function author_search($type, $firstpost_only, $sort_by_sql, $sort_key, $sort_dir, $sort_days, $ex_fid_ary, $post_visibility, $topic_id, $author_ary, $author_name, &$id_ary, &$start, $per_page)
{
- global $config, $db;
-
- // No author? No posts.
+ // No author? No posts
if (!sizeof($author_ary))
{
return 0;
@@ -830,7 +918,7 @@ class fulltext_native extends search_backend
$sort_key,
$topic_id,
implode(',', $ex_fid_ary),
- implode(',', $m_approve_fid_ary),
+ $post_visibility,
implode(',', $author_ary),
$author_name,
)));
@@ -848,16 +936,17 @@ class fulltext_native extends search_backend
if ($author_name)
{
// first one matches post of registered users, second one guests and deleted users
- $sql_author = '(' . $db->sql_in_set('p.poster_id', array_diff($author_ary, array(ANONYMOUS)), false, true) . ' OR p.post_username ' . $author_name . ')';
+ $sql_author = '(' . $this->db->sql_in_set('p.poster_id', array_diff($author_ary, array(ANONYMOUS)), false, true) . ' OR p.post_username ' . $author_name . ')';
}
else
{
- $sql_author = $db->sql_in_set('p.poster_id', $author_ary);
+ $sql_author = $this->db->sql_in_set('p.poster_id', $author_ary);
}
- $sql_fora = (sizeof($ex_fid_ary)) ? ' AND ' . $db->sql_in_set('p.forum_id', $ex_fid_ary, true) : '';
+ $sql_fora = (sizeof($ex_fid_ary)) ? ' AND ' . $this->db->sql_in_set('p.forum_id', $ex_fid_ary, true) : '';
$sql_time = ($sort_days) ? ' AND p.post_time >= ' . (time() - ($sort_days * 86400)) : '';
$sql_topic_id = ($topic_id) ? ' AND p.topic_id = ' . (int) $topic_id : '';
$sql_firstpost = ($firstpost_only) ? ' AND p.post_id = t.topic_first_post_id' : '';
+ $post_visibility = ($post_visibility) ? ' AND ' . $post_visibility : '';
// Build sql strings for sorting
$sql_sort = $sort_by_sql[$sort_key] . (($sort_dir == 'a') ? ' ASC' : ' DESC');
@@ -880,26 +969,13 @@ class fulltext_native extends search_backend
break;
}
- if (!sizeof($m_approve_fid_ary))
- {
- $m_approve_fid_sql = ' AND p.post_approved = 1';
- }
- else if ($m_approve_fid_ary == array(-1))
- {
- $m_approve_fid_sql = '';
- }
- else
- {
- $m_approve_fid_sql = ' AND (p.post_approved = 1 OR ' . $db->sql_in_set('p.forum_id', $m_approve_fid_ary, true) . ')';
- }
-
$select = ($type == 'posts') ? 'p.post_id' : 't.topic_id';
$is_mysql = false;
// If the cache was completely empty count the results
if (!$total_results)
{
- switch ($db->sql_layer)
+ switch ($this->db->sql_layer)
{
case 'mysql4':
case 'mysqli':
@@ -915,13 +991,13 @@ class fulltext_native extends search_backend
WHERE $sql_author
$sql_topic_id
$sql_firstpost
- $m_approve_fid_sql
+ $post_visibility
$sql_fora
$sql_time";
}
else
{
- if ($db->sql_layer == 'sqlite')
+ if ($this->db->sql_layer == 'sqlite')
{
$sql = 'SELECT COUNT(topic_id) as total_results
FROM (SELECT DISTINCT t.topic_id';
@@ -935,15 +1011,15 @@ class fulltext_native extends search_backend
WHERE $sql_author
$sql_topic_id
$sql_firstpost
- $m_approve_fid_sql
+ $post_visibility
$sql_fora
AND t.topic_id = p.topic_id
- $sql_time" . (($db->sql_layer == 'sqlite') ? ')' : '');
+ $sql_time" . (($this->db->sql_layer == 'sqlite') ? ')' : '');
}
- $result = $db->sql_query($sql);
+ $result = $this->db->sql_query($sql);
- $total_results = (int) $db->sql_fetchfield('total_results');
- $db->sql_freeresult($result);
+ $total_results = (int) $this->db->sql_fetchfield('total_results');
+ $this->db->sql_freeresult($result);
if (!$total_results)
{
@@ -961,7 +1037,7 @@ class fulltext_native extends search_backend
WHERE $sql_author
$sql_topic_id
$sql_firstpost
- $m_approve_fid_sql
+ $post_visibility
$sql_fora
$sql_sort_join
$sql_time
@@ -975,7 +1051,7 @@ class fulltext_native extends search_backend
WHERE $sql_author
$sql_topic_id
$sql_firstpost
- $m_approve_fid_sql
+ $post_visibility
$sql_fora
AND t.topic_id = p.topic_id
$sql_sort_join
@@ -986,26 +1062,26 @@ class fulltext_native extends search_backend
}
// Only read one block of posts from the db and then cache it
- $result = $db->sql_query_limit($sql, $config['search_block_size'], $start);
+ $result = $this->db->sql_query_limit($sql, $this->config['search_block_size'], $start);
- while ($row = $db->sql_fetchrow($result))
+ while ($row = $this->db->sql_fetchrow($result))
{
$id_ary[] = (int) $row[$field];
}
- $db->sql_freeresult($result);
+ $this->db->sql_freeresult($result);
if (!$total_results && $is_mysql)
{
// Count rows for the executed queries. Replace $select within $sql with SQL_CALC_FOUND_ROWS, and run it.
- $sql = str_replace('SELECT ' . $select, 'SELECT DISTINCT SQL_CALC_FOUND_ROWS p.post_id', $sql);
+ $sql_calc = str_replace('SELECT ' . $select, 'SELECT DISTINCT SQL_CALC_FOUND_ROWS p.post_id', $sql);
- $db->sql_query($sql);
- $db->sql_freeresult($result);
+ $this->db->sql_query($sql_calc);
+ $this->db->sql_freeresult($result);
- $sql = 'SELECT FOUND_ROWS() as total_results';
- $result = $db->sql_query($sql);
- $total_results = (int) $db->sql_fetchfield('total_results');
- $db->sql_freeresult($result);
+ $sql_count = 'SELECT FOUND_ROWS() as total_results';
+ $result = $this->db->sql_query($sql_count);
+ $total_results = (int) $this->db->sql_fetchfield('total_results');
+ $this->db->sql_freeresult($result);
if (!$total_results)
{
@@ -1013,6 +1089,19 @@ class fulltext_native extends search_backend
}
}
+ if ($start >= $total_results)
+ {
+ $start = floor(($total_results - 1) / $per_page) * $per_page;
+
+ $result = $this->db->sql_query_limit($sql, $this->config['search_block_size'], $start);
+
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ $id_ary[] = (int) $row[$field];
+ }
+ $this->db->sql_freeresult($result);
+ }
+
if (sizeof($id_ary))
{
$this->save_ids($search_key, '', $author_ary, $total_results, $id_ary, $start, $sort_dir);
@@ -1033,13 +1122,9 @@ class fulltext_native extends search_backend
*
* @param string $text Text to split, encoded in UTF-8
* @return array Array of UTF-8 words
- *
- * @access private
*/
- function split_message($text)
+ public function split_message($text)
{
- global $phpbb_root_path, $phpEx, $user;
-
$match = $words = array();
/**
@@ -1088,8 +1173,8 @@ class fulltext_native extends search_backend
* we know that it will also be lower than CJK ranges
*/
if ((strncmp($word, UTF8_HANGUL_FIRST, 3) < 0 || strncmp($word, UTF8_HANGUL_LAST, 3) > 0)
- && (strncmp($word, UTF8_CJK_FIRST, 3) < 0 || strncmp($word, UTF8_CJK_LAST, 3) > 0)
- && (strncmp($word, UTF8_CJK_B_FIRST, 4) < 0 || strncmp($word, UTF8_CJK_B_LAST, 4) > 0))
+ && (strncmp($word, UTF8_CJK_FIRST, 3) < 0 || strncmp($word, UTF8_CJK_LAST, 3) > 0)
+ && (strncmp($word, UTF8_CJK_B_FIRST, 4) < 0 || strncmp($word, UTF8_CJK_B_LAST, 4) > 0))
{
$word = strtok(' ');
continue;
@@ -1112,14 +1197,10 @@ class fulltext_native extends search_backend
* @param string &$subject New or updated post subject
* @param int $poster_id Post author's user id
* @param int $forum_id The id of the forum in which the post is located
- *
- * @access public
*/
- function index($mode, $post_id, &$message, &$subject, $poster_id, $forum_id)
+ public function index($mode, $post_id, &$message, &$subject, $poster_id, $forum_id)
{
- global $config, $db, $user;
-
- if (!$config['fulltext_native_load_upd'])
+ if (!$this->config['fulltext_native_load_upd'])
{
/**
* The search indexer is disabled, return
@@ -1145,14 +1226,14 @@ class fulltext_native extends search_backend
FROM ' . SEARCH_WORDLIST_TABLE . ' w, ' . SEARCH_WORDMATCH_TABLE . " m
WHERE m.post_id = $post_id
AND w.word_id = m.word_id";
- $result = $db->sql_query($sql);
+ $result = $this->db->sql_query($sql);
- while ($row = $db->sql_fetchrow($result))
+ while ($row = $this->db->sql_fetchrow($result))
{
$which = ($row['title_match']) ? 'title' : 'post';
$cur_words[$which][$row['word_text']] = $row['word_id'];
}
- $db->sql_freeresult($result);
+ $this->db->sql_freeresult($result);
$words['add']['post'] = array_diff($split_text, array_keys($cur_words['post']));
$words['add']['title'] = array_diff($split_title, array_keys($cur_words['title']));
@@ -1180,18 +1261,18 @@ class fulltext_native extends search_backend
{
$sql = 'SELECT word_id, word_text
FROM ' . SEARCH_WORDLIST_TABLE . '
- WHERE ' . $db->sql_in_set('word_text', $unique_add_words);
- $result = $db->sql_query($sql);
+ WHERE ' . $this->db->sql_in_set('word_text', $unique_add_words);
+ $result = $this->db->sql_query($sql);
$word_ids = array();
- while ($row = $db->sql_fetchrow($result))
+ while ($row = $this->db->sql_fetchrow($result))
{
$word_ids[$row['word_text']] = $row['word_id'];
}
- $db->sql_freeresult($result);
+ $this->db->sql_freeresult($result);
$new_words = array_diff($unique_add_words, array_keys($word_ids));
- $db->sql_transaction('begin');
+ $this->db->sql_transaction('begin');
if (sizeof($new_words))
{
$sql_ary = array();
@@ -1200,15 +1281,15 @@ class fulltext_native extends search_backend
{
$sql_ary[] = array('word_text' => (string) $word, 'word_count' => 0);
}
- $db->sql_return_on_error(true);
- $db->sql_multi_insert(SEARCH_WORDLIST_TABLE, $sql_ary);
- $db->sql_return_on_error(false);
+ $this->db->sql_return_on_error(true);
+ $this->db->sql_multi_insert(SEARCH_WORDLIST_TABLE, $sql_ary);
+ $this->db->sql_return_on_error(false);
}
unset($new_words, $sql_ary);
}
else
{
- $db->sql_transaction('begin');
+ $this->db->sql_transaction('begin');
}
// now update the search match table, remove links to removed words and add links to new words
@@ -1225,22 +1306,22 @@ class fulltext_native extends search_backend
}
$sql = 'DELETE FROM ' . SEARCH_WORDMATCH_TABLE . '
- WHERE ' . $db->sql_in_set('word_id', $sql_in) . '
+ WHERE ' . $this->db->sql_in_set('word_id', $sql_in) . '
AND post_id = ' . intval($post_id) . "
AND title_match = $title_match";
- $db->sql_query($sql);
+ $this->db->sql_query($sql);
$sql = 'UPDATE ' . SEARCH_WORDLIST_TABLE . '
SET word_count = word_count - 1
- WHERE ' . $db->sql_in_set('word_id', $sql_in) . '
+ WHERE ' . $this->db->sql_in_set('word_id', $sql_in) . '
AND word_count > 0';
- $db->sql_query($sql);
+ $this->db->sql_query($sql);
unset($sql_in);
}
}
- $db->sql_return_on_error(true);
+ $this->db->sql_return_on_error(true);
foreach ($words['add'] as $word_in => $word_ary)
{
$title_match = ($word_in == 'title') ? 1 : 0;
@@ -1250,18 +1331,18 @@ class fulltext_native extends search_backend
$sql = 'INSERT INTO ' . SEARCH_WORDMATCH_TABLE . ' (post_id, word_id, title_match)
SELECT ' . (int) $post_id . ', word_id, ' . (int) $title_match . '
FROM ' . SEARCH_WORDLIST_TABLE . '
- WHERE ' . $db->sql_in_set('word_text', $word_ary);
- $db->sql_query($sql);
+ WHERE ' . $this->db->sql_in_set('word_text', $word_ary);
+ $this->db->sql_query($sql);
$sql = 'UPDATE ' . SEARCH_WORDLIST_TABLE . '
SET word_count = word_count + 1
- WHERE ' . $db->sql_in_set('word_text', $word_ary);
- $db->sql_query($sql);
+ WHERE ' . $this->db->sql_in_set('word_text', $word_ary);
+ $this->db->sql_query($sql);
}
}
- $db->sql_return_on_error(false);
+ $this->db->sql_return_on_error(false);
- $db->sql_transaction('commit');
+ $this->db->sql_transaction('commit');
// destroy cached search results containing any of the words removed or added
$this->destroy_cache(array_unique(array_merge($words['add']['post'], $words['add']['title'], $words['del']['post'], $words['del']['title'])), array($poster_id));
@@ -1274,20 +1355,18 @@ class fulltext_native extends search_backend
/**
* Removes entries from the wordmatch table for the specified post_ids
*/
- function index_remove($post_ids, $author_ids, $forum_ids)
+ public function index_remove($post_ids, $author_ids, $forum_ids)
{
- global $db;
-
if (sizeof($post_ids))
{
$sql = 'SELECT w.word_id, w.word_text, m.title_match
FROM ' . SEARCH_WORDMATCH_TABLE . ' m, ' . SEARCH_WORDLIST_TABLE . ' w
- WHERE ' . $db->sql_in_set('m.post_id', $post_ids) . '
+ WHERE ' . $this->db->sql_in_set('m.post_id', $post_ids) . '
AND w.word_id = m.word_id';
- $result = $db->sql_query($sql);
+ $result = $this->db->sql_query($sql);
$message_word_ids = $title_word_ids = $word_texts = array();
- while ($row = $db->sql_fetchrow($result))
+ while ($row = $this->db->sql_fetchrow($result))
{
if ($row['title_match'])
{
@@ -1299,32 +1378,32 @@ class fulltext_native extends search_backend
}
$word_texts[] = $row['word_text'];
}
- $db->sql_freeresult($result);
+ $this->db->sql_freeresult($result);
if (sizeof($title_word_ids))
{
$sql = 'UPDATE ' . SEARCH_WORDLIST_TABLE . '
SET word_count = word_count - 1
- WHERE ' . $db->sql_in_set('word_id', $title_word_ids) . '
+ WHERE ' . $this->db->sql_in_set('word_id', $title_word_ids) . '
AND word_count > 0';
- $db->sql_query($sql);
+ $this->db->sql_query($sql);
}
if (sizeof($message_word_ids))
{
$sql = 'UPDATE ' . SEARCH_WORDLIST_TABLE . '
SET word_count = word_count - 1
- WHERE ' . $db->sql_in_set('word_id', $message_word_ids) . '
+ WHERE ' . $this->db->sql_in_set('word_id', $message_word_ids) . '
AND word_count > 0';
- $db->sql_query($sql);
+ $this->db->sql_query($sql);
}
unset($title_word_ids);
unset($message_word_ids);
$sql = 'DELETE FROM ' . SEARCH_WORDMATCH_TABLE . '
- WHERE ' . $db->sql_in_set('post_id', $post_ids);
- $db->sql_query($sql);
+ WHERE ' . $this->db->sql_in_set('post_id', $post_ids);
+ $this->db->sql_query($sql);
}
$this->destroy_cache(array_unique($word_texts), array_unique($author_ids));
@@ -1334,13 +1413,11 @@ class fulltext_native extends search_backend
* Tidy up indexes: Tag 'common words' and remove
* words no longer referenced in the match table
*/
- function tidy()
+ public function tidy()
{
- global $db, $config;
-
// Is the fulltext indexer disabled? If yes then we need not
// carry on ... it's okay ... I know when I'm not wanted boo hoo
- if (!$config['fulltext_native_load_upd'])
+ if (!$this->config['fulltext_native_load_upd'])
{
set_config('search_last_gc', time(), true);
return;
@@ -1349,31 +1426,31 @@ class fulltext_native extends search_backend
$destroy_cache_words = array();
// Remove common words
- if ($config['num_posts'] >= 100 && $config['fulltext_native_common_thres'])
+ if ($this->config['num_posts'] >= 100 && $this->config['fulltext_native_common_thres'])
{
- $common_threshold = ((double) $config['fulltext_native_common_thres']) / 100.0;
+ $common_threshold = ((double) $this->config['fulltext_native_common_thres']) / 100.0;
// First, get the IDs of common words
$sql = 'SELECT word_id, word_text
FROM ' . SEARCH_WORDLIST_TABLE . '
- WHERE word_count > ' . floor($config['num_posts'] * $common_threshold) . '
+ WHERE word_count > ' . floor($this->config['num_posts'] * $common_threshold) . '
OR word_common = 1';
- $result = $db->sql_query($sql);
+ $result = $this->db->sql_query($sql);
$sql_in = array();
- while ($row = $db->sql_fetchrow($result))
+ while ($row = $this->db->sql_fetchrow($result))
{
$sql_in[] = $row['word_id'];
$destroy_cache_words[] = $row['word_text'];
}
- $db->sql_freeresult($result);
+ $this->db->sql_freeresult($result);
if (sizeof($sql_in))
{
// Flag the words
$sql = 'UPDATE ' . SEARCH_WORDLIST_TABLE . '
SET word_common = 1
- WHERE ' . $db->sql_in_set('word_id', $sql_in);
- $db->sql_query($sql);
+ WHERE ' . $this->db->sql_in_set('word_id', $sql_in);
+ $this->db->sql_query($sql);
// by setting search_last_gc to the new time here we make sure that if a user reloads because the
// following query takes too long, he won't run into it again
@@ -1381,8 +1458,8 @@ class fulltext_native extends search_backend
// Delete the matches
$sql = 'DELETE FROM ' . SEARCH_WORDMATCH_TABLE . '
- WHERE ' . $db->sql_in_set('word_id', $sql_in);
- $db->sql_query($sql);
+ WHERE ' . $this->db->sql_in_set('word_id', $sql_in);
+ $this->db->sql_query($sql);
}
unset($sql_in);
}
@@ -1399,23 +1476,21 @@ class fulltext_native extends search_backend
/**
* Deletes all words from the index
*/
- function delete_index($acp_module, $u_action)
+ public function delete_index($acp_module, $u_action)
{
- global $db;
-
- switch ($db->sql_layer)
+ switch ($this->db->sql_layer)
{
case 'sqlite':
case 'firebird':
- $db->sql_query('DELETE FROM ' . SEARCH_WORDLIST_TABLE);
- $db->sql_query('DELETE FROM ' . SEARCH_WORDMATCH_TABLE);
- $db->sql_query('DELETE FROM ' . SEARCH_RESULTS_TABLE);
+ $this->db->sql_query('DELETE FROM ' . SEARCH_WORDLIST_TABLE);
+ $this->db->sql_query('DELETE FROM ' . SEARCH_WORDMATCH_TABLE);
+ $this->db->sql_query('DELETE FROM ' . SEARCH_RESULTS_TABLE);
break;
default:
- $db->sql_query('TRUNCATE TABLE ' . SEARCH_WORDLIST_TABLE);
- $db->sql_query('TRUNCATE TABLE ' . SEARCH_WORDMATCH_TABLE);
- $db->sql_query('TRUNCATE TABLE ' . SEARCH_RESULTS_TABLE);
+ $this->db->sql_query('TRUNCATE TABLE ' . SEARCH_WORDLIST_TABLE);
+ $this->db->sql_query('TRUNCATE TABLE ' . SEARCH_WORDMATCH_TABLE);
+ $this->db->sql_query('TRUNCATE TABLE ' . SEARCH_RESULTS_TABLE);
break;
}
}
@@ -1423,7 +1498,7 @@ class fulltext_native extends search_backend
/**
* Returns true if both FULLTEXT indexes exist
*/
- function index_created()
+ public function index_created()
{
if (!sizeof($this->stats))
{
@@ -1436,26 +1511,22 @@ class fulltext_native extends search_backend
/**
* Returns an associative array containing information about the indexes
*/
- function index_stats()
+ public function index_stats()
{
- global $user;
-
if (!sizeof($this->stats))
{
$this->get_stats();
}
return array(
- $user->lang['TOTAL_WORDS'] => $this->stats['total_words'],
- $user->lang['TOTAL_MATCHES'] => $this->stats['total_matches']);
+ $this->user->lang['TOTAL_WORDS'] => $this->stats['total_words'],
+ $this->user->lang['TOTAL_MATCHES'] => $this->stats['total_matches']);
}
- function get_stats()
+ protected function get_stats()
{
- global $db;
-
- $this->stats['total_words'] = $db->get_estimated_row_count(SEARCH_WORDLIST_TABLE);
- $this->stats['total_matches'] = $db->get_estimated_row_count(SEARCH_WORDMATCH_TABLE);
+ $this->stats['total_words'] = $this->db->get_estimated_row_count(SEARCH_WORDLIST_TABLE);
+ $this->stats['total_matches'] = $this->db->get_estimated_row_count(SEARCH_WORDMATCH_TABLE);
}
/**
@@ -1471,11 +1542,10 @@ class fulltext_native extends search_backend
* @param string $encoding Text encoding
* @return string Cleaned up text, only alphanumeric chars are left
*
- * @todo normalizer::cleanup being able to be used?
+ * @todo \normalizer::cleanup being able to be used?
*/
- function cleanup($text, $allowed_chars = null, $encoding = 'utf-8')
+ protected function cleanup($text, $allowed_chars = null, $encoding = 'utf-8')
{
- global $phpbb_root_path, $phpEx;
static $conv = array(), $conv_loaded = array();
$words = $allow = array();
@@ -1504,7 +1574,7 @@ class fulltext_native extends search_backend
* If we use it more widely, an instance of that class should be held in a
* a global variable instead
*/
- utf_normalizer::nfc($text);
+ \utf_normalizer::nfc($text);
/**
* The first thing we do is:
@@ -1598,8 +1668,8 @@ class fulltext_native extends search_backend
$pos += $utf_len;
if (($utf_char >= UTF8_HANGUL_FIRST && $utf_char <= UTF8_HANGUL_LAST)
- || ($utf_char >= UTF8_CJK_FIRST && $utf_char <= UTF8_CJK_LAST)
- || ($utf_char >= UTF8_CJK_B_FIRST && $utf_char <= UTF8_CJK_B_LAST))
+ || ($utf_char >= UTF8_CJK_FIRST && $utf_char <= UTF8_CJK_LAST)
+ || ($utf_char >= UTF8_CJK_B_FIRST && $utf_char <= UTF8_CJK_B_LAST))
{
/**
* All characters within these ranges are valid
@@ -1672,7 +1742,7 @@ class fulltext_native extends search_backend
if (!isset($conv_loaded[$idx]))
{
$conv_loaded[$idx] = 1;
- $file = $phpbb_root_path . 'includes/utf/data/search_indexer_' . $idx . '.' . $phpEx;
+ $file = $this->phpbb_root_path . 'includes/utf/data/search_indexer_' . $idx . '.' . $this->php_ext;
if (file_exists($file))
{
@@ -1703,31 +1773,28 @@ class fulltext_native extends search_backend
/**
* Returns a list of options for the ACP to display
*/
- function acp()
+ public function acp()
{
- global $user, $config;
-
-
/**
* if we need any options, copied from fulltext_native for now, will have to be adjusted or removed
*/
$tpl = '
<dl>
- <dt><label for="fulltext_native_load_upd">' . $user->lang['YES_SEARCH_UPDATE'] . ':</label><br /><span>' . $user->lang['YES_SEARCH_UPDATE_EXPLAIN'] . '</span></dt>
- <dd><label><input type="radio" id="fulltext_native_load_upd" name="config[fulltext_native_load_upd]" value="1"' . (($config['fulltext_native_load_upd']) ? ' checked="checked"' : '') . ' class="radio" /> ' . $user->lang['YES'] . '</label><label><input type="radio" name="config[fulltext_native_load_upd]" value="0"' . ((!$config['fulltext_native_load_upd']) ? ' checked="checked"' : '') . ' class="radio" /> ' . $user->lang['NO'] . '</label></dd>
+ <dt><label for="fulltext_native_load_upd">' . $this->user->lang['YES_SEARCH_UPDATE'] . $this->user->lang['COLON'] . '</label><br /><span>' . $this->user->lang['YES_SEARCH_UPDATE_EXPLAIN'] . '</span></dt>
+ <dd><label><input type="radio" id="fulltext_native_load_upd" name="config[fulltext_native_load_upd]" value="1"' . (($this->config['fulltext_native_load_upd']) ? ' checked="checked"' : '') . ' class="radio" /> ' . $this->user->lang['YES'] . '</label><label><input type="radio" name="config[fulltext_native_load_upd]" value="0"' . ((!$this->config['fulltext_native_load_upd']) ? ' checked="checked"' : '') . ' class="radio" /> ' . $this->user->lang['NO'] . '</label></dd>
</dl>
<dl>
- <dt><label for="fulltext_native_min_chars">' . $user->lang['MIN_SEARCH_CHARS'] . ':</label><br /><span>' . $user->lang['MIN_SEARCH_CHARS_EXPLAIN'] . '</span></dt>
- <dd><input id="fulltext_native_min_chars" type="text" size="3" maxlength="3" name="config[fulltext_native_min_chars]" value="' . (int) $config['fulltext_native_min_chars'] . '" /></dd>
+ <dt><label for="fulltext_native_min_chars">' . $this->user->lang['MIN_SEARCH_CHARS'] . $this->user->lang['COLON'] . '</label><br /><span>' . $this->user->lang['MIN_SEARCH_CHARS_EXPLAIN'] . '</span></dt>
+ <dd><input id="fulltext_native_min_chars" type="number" size="3" maxlength="3" min="0" max="255" name="config[fulltext_native_min_chars]" value="' . (int) $this->config['fulltext_native_min_chars'] . '" /></dd>
</dl>
<dl>
- <dt><label for="fulltext_native_max_chars">' . $user->lang['MAX_SEARCH_CHARS'] . ':</label><br /><span>' . $user->lang['MAX_SEARCH_CHARS_EXPLAIN'] . '</span></dt>
- <dd><input id="fulltext_native_max_chars" type="text" size="3" maxlength="3" name="config[fulltext_native_max_chars]" value="' . (int) $config['fulltext_native_max_chars'] . '" /></dd>
+ <dt><label for="fulltext_native_max_chars">' . $this->user->lang['MAX_SEARCH_CHARS'] . $this->user->lang['COLON'] . '</label><br /><span>' . $this->user->lang['MAX_SEARCH_CHARS_EXPLAIN'] . '</span></dt>
+ <dd><input id="fulltext_native_max_chars" type="number" size="3" maxlength="3" min="0" max="255" name="config[fulltext_native_max_chars]" value="' . (int) $this->config['fulltext_native_max_chars'] . '" /></dd>
</dl>
<dl>
- <dt><label for="fulltext_native_common_thres">' . $user->lang['COMMON_WORD_THRESHOLD'] . ':</label><br /><span>' . $user->lang['COMMON_WORD_THRESHOLD_EXPLAIN'] . '</span></dt>
- <dd><input id="fulltext_native_common_thres" type="text" size="3" maxlength="3" name="config[fulltext_native_common_thres]" value="' . (double) $config['fulltext_native_common_thres'] . '" /> %</dd>
+ <dt><label for="fulltext_native_common_thres">' . $this->user->lang['COMMON_WORD_THRESHOLD'] . $this->user->lang['COLON'] . '</label><br /><span>' . $this->user->lang['COMMON_WORD_THRESHOLD_EXPLAIN'] . '</span></dt>
+ <dd><input id="fulltext_native_common_thres" type="text" size="3" maxlength="3" name="config[fulltext_native_common_thres]" value="' . (double) $this->config['fulltext_native_common_thres'] . '" /> %</dd>
</dl>
';
@@ -1738,5 +1805,3 @@ class fulltext_native extends search_backend
);
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/phpbb/search/fulltext_postgres.php b/phpBB/phpbb/search/fulltext_postgres.php
new file mode 100644
index 0000000000..63caeffcc5
--- /dev/null
+++ b/phpBB/phpbb/search/fulltext_postgres.php
@@ -0,0 +1,955 @@
+<?php
+/**
+*
+* @package search
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\search;
+
+/**
+* fulltext_postgres
+* Fulltext search for PostgreSQL
+* @package search
+*/
+class fulltext_postgres extends \phpbb\search\base
+{
+ /**
+ * Associative array holding index stats
+ * @var array
+ */
+ protected $stats = array();
+
+ /**
+ * Holds the words entered by user, obtained by splitting the entered query on whitespace
+ * @var array
+ */
+ protected $split_words = array();
+
+ /**
+ * True if PostgreSQL version supports tsearch
+ * @var boolean
+ */
+ protected $tsearch_usable = false;
+
+ /**
+ * Stores the PostgreSQL version
+ * @var string
+ */
+ protected $version;
+
+ /**
+ * Stores the tsearch query
+ * @var string
+ */
+ protected $tsearch_query;
+
+ /**
+ * True if phrase search is supported.
+ * PostgreSQL fulltext currently doesn't support it
+ * @var boolean
+ */
+ protected $phrase_search = false;
+
+ /**
+ * Config object
+ * @var \phpbb\config\config
+ */
+ protected $config;
+
+ /**
+ * Database connection
+ * @var \phpbb\db\driver\driver
+ */
+ protected $db;
+
+ /**
+ * User object
+ * @var \phpbb\user
+ */
+ protected $user;
+
+ /**
+ * Contains tidied search query.
+ * Operators are prefixed in search query and common words excluded
+ * @var string
+ */
+ protected $search_query;
+
+ /**
+ * Contains common words.
+ * Common words are words with length less/more than min/max length
+ * @var array
+ */
+ protected $common_words = array();
+
+ /**
+ * Associative array stores the min and max word length to be searched
+ * @var array
+ */
+ protected $word_length = array();
+
+ /**
+ * Constructor
+ * Creates a new \phpbb\search\fulltext_postgres, which is used as a search backend
+ *
+ * @param string|bool $error Any error that occurs is passed on through this reference variable otherwise false
+ */
+ public function __construct(&$error, $phpbb_root_path, $phpEx, $auth, $config, $db, $user)
+ {
+ $this->config = $config;
+ $this->db = $db;
+ $this->user = $user;
+
+ $this->word_length = array('min' => $this->config['fulltext_postgres_min_word_len'], 'max' => $this->config['fulltext_postgres_max_word_len']);
+
+ if ($this->db->sql_layer == 'postgres')
+ {
+ $pgsql_version = explode(',', substr($this->db->sql_server_info(), 10));
+ $this->version = trim($pgsql_version[0]);
+ if (version_compare($this->version, '8.3', '>='))
+ {
+ $this->tsearch_usable = true;
+ }
+ }
+
+ /**
+ * Load the UTF tools
+ */
+ if (!function_exists('utf8_strlen'))
+ {
+ include($phpbb_root_path . 'includes/utf/utf_tools.' . $phpEx);
+ }
+
+ $error = false;
+ }
+
+ /**
+ * Returns the name of this search backend to be displayed to administrators
+ *
+ * @return string Name
+ */
+ public function get_name()
+ {
+ return 'PostgreSQL Fulltext';
+ }
+
+ /**
+ * Returns the search_query
+ *
+ * @return string search query
+ */
+ public function get_search_query()
+ {
+ return $this->search_query;
+ }
+
+ /**
+ * Returns the common_words array
+ *
+ * @return array common words that are ignored by search backend
+ */
+ public function get_common_words()
+ {
+ return $this->common_words;
+ }
+
+ /**
+ * Returns the word_length array
+ *
+ * @return array min and max word length for searching
+ */
+ public function get_word_length()
+ {
+ return $this->word_length;
+ }
+
+ /**
+ * Returns if phrase search is supported or not
+ *
+ * @return bool
+ */
+ public function supports_phrase_search()
+ {
+ return $this->phrase_search;
+ }
+
+ /**
+ * Checks for correct PostgreSQL version and stores min/max word length in the config
+ *
+ * @return string|bool Language key of the error/incompatiblity occurred
+ */
+ public function init()
+ {
+ if ($this->db->sql_layer != 'postgres')
+ {
+ return $this->user->lang['FULLTEXT_POSTGRES_INCOMPATIBLE_DATABASE'];
+ }
+
+ if (!$this->tsearch_usable)
+ {
+ return $this->user->lang['FULLTEXT_POSTGRES_TS_NOT_USABLE'];
+ }
+
+ return false;
+ }
+
+ /**
+ * Splits keywords entered by a user into an array of words stored in $this->split_words
+ * Stores the tidied search query in $this->search_query
+ *
+ * @param string &$keywords Contains the keyword as entered by the user
+ * @param string $terms is either 'all' or 'any'
+ * @return bool false if no valid keywords were found and otherwise true
+ */
+ public function split_keywords(&$keywords, $terms)
+ {
+ if ($terms == 'all')
+ {
+ $match = array('#\sand\s#iu', '#\sor\s#iu', '#\snot\s#iu', '#(^|\s)\+#', '#(^|\s)-#', '#(^|\s)\|#');
+ $replace = array(' +', ' |', ' -', ' +', ' -', ' |');
+
+ $keywords = preg_replace($match, $replace, $keywords);
+ }
+
+ // Filter out as above
+ $split_keywords = preg_replace("#[\"\n\r\t]+#", ' ', trim(htmlspecialchars_decode($keywords)));
+
+ // Split words
+ $split_keywords = preg_replace('#([^\p{L}\p{N}\'*"()])#u', '$1$1', str_replace('\'\'', '\' \'', trim($split_keywords)));
+ $matches = array();
+ preg_match_all('#(?:[^\p{L}\p{N}*"()]|^)([+\-|]?(?:[\p{L}\p{N}*"()]+\'?)*[\p{L}\p{N}*"()])(?:[^\p{L}\p{N}*"()]|$)#u', $split_keywords, $matches);
+ $this->split_words = $matches[1];
+
+ foreach ($this->split_words as $i => $word)
+ {
+ $clean_word = preg_replace('#^[+\-|"]#', '', $word);
+
+ // check word length
+ $clean_len = utf8_strlen(str_replace('*', '', $clean_word));
+ if (($clean_len < $this->config['fulltext_postgres_min_word_len']) || ($clean_len > $this->config['fulltext_postgres_max_word_len']))
+ {
+ $this->common_words[] = $word;
+ unset($this->split_words[$i]);
+ }
+ }
+
+ if ($terms == 'any')
+ {
+ $this->search_query = '';
+ $this->tsearch_query = '';
+ foreach ($this->split_words as $word)
+ {
+ if ((strpos($word, '+') === 0) || (strpos($word, '-') === 0) || (strpos($word, '|') === 0))
+ {
+ $word = substr($word, 1);
+ }
+ $this->search_query .= $word . ' ';
+ $this->tsearch_query .= '|' . $word . ' ';
+ }
+ }
+ else
+ {
+ $this->search_query = '';
+ $this->tsearch_query = '';
+ foreach ($this->split_words as $word)
+ {
+ if (strpos($word, '+') === 0)
+ {
+ $this->search_query .= $word . ' ';
+ $this->tsearch_query .= '&' . substr($word, 1) . ' ';
+ }
+ elseif (strpos($word, '-') === 0)
+ {
+ $this->search_query .= $word . ' ';
+ $this->tsearch_query .= '&!' . substr($word, 1) . ' ';
+ }
+ elseif (strpos($word, '|') === 0)
+ {
+ $this->search_query .= $word . ' ';
+ $this->tsearch_query .= '|' . substr($word, 1) . ' ';
+ }
+ else
+ {
+ $this->search_query .= '+' . $word . ' ';
+ $this->tsearch_query .= '&' . $word . ' ';
+ }
+ }
+ }
+
+ $this->tsearch_query = substr($this->tsearch_query, 1);
+ $this->search_query = utf8_htmlspecialchars($this->search_query);
+
+ if ($this->search_query)
+ {
+ $this->split_words = array_values($this->split_words);
+ sort($this->split_words);
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * Turns text into an array of words
+ * @param string $text contains post text/subject
+ */
+ public function split_message($text)
+ {
+ // Split words
+ $text = preg_replace('#([^\p{L}\p{N}\'*])#u', '$1$1', str_replace('\'\'', '\' \'', trim($text)));
+ $matches = array();
+ preg_match_all('#(?:[^\p{L}\p{N}*]|^)([+\-|]?(?:[\p{L}\p{N}*]+\'?)*[\p{L}\p{N}*])(?:[^\p{L}\p{N}*]|$)#u', $text, $matches);
+ $text = $matches[1];
+
+ // remove too short or too long words
+ $text = array_values($text);
+ for ($i = 0, $n = sizeof($text); $i < $n; $i++)
+ {
+ $text[$i] = trim($text[$i]);
+ if (utf8_strlen($text[$i]) < $this->config['fulltext_postgres_min_word_len'] || utf8_strlen($text[$i]) > $this->config['fulltext_postgres_max_word_len'])
+ {
+ unset($text[$i]);
+ }
+ }
+
+ return array_values($text);
+ }
+
+ /**
+ * Performs a search on keywords depending on display specific params. You have to run split_keywords() first
+ *
+ * @param string $type contains either posts or topics depending on what should be searched for
+ * @param string $fields contains either titleonly (topic titles should be searched), msgonly (only message bodies should be searched), firstpost (only subject and body of the first post should be searched) or all (all post bodies and subjects should be searched)
+ * @param string $terms is either 'all' (use query as entered, words without prefix should default to "have to be in field") or 'any' (ignore search query parts and just return all posts that contain any of the specified words)
+ * @param array $sort_by_sql contains SQL code for the ORDER BY part of a query
+ * @param string $sort_key is the key of $sort_by_sql for the selected sorting
+ * @param string $sort_dir is either a or d representing ASC and DESC
+ * @param string $sort_days specifies the maximum amount of days a post may be old
+ * @param array $ex_fid_ary specifies an array of forum ids which should not be searched
+ * @param string $post_visibility specifies which types of posts the user can view in which forums
+ * @param int $topic_id is set to 0 or a topic id, if it is not 0 then only posts in this topic should be searched
+ * @param array $author_ary an array of author ids if the author should be ignored during the search the array is empty
+ * @param string $author_name specifies the author match, when ANONYMOUS is also a search-match
+ * @param array &$id_ary passed by reference, to be filled with ids for the page specified by $start and $per_page, should be ordered
+ * @param int $start indicates the first index of the page
+ * @param int $per_page number of ids each page is supposed to contain
+ * @return boolean|int total number of results
+ */
+ public function keyword_search($type, $fields, $terms, $sort_by_sql, $sort_key, $sort_dir, $sort_days, $ex_fid_ary, $post_visibility, $topic_id, $author_ary, $author_name, &$id_ary, &$start, $per_page)
+ {
+ // No keywords? No posts
+ if (!$this->search_query)
+ {
+ return false;
+ }
+
+ // When search query contains queries like -foo
+ if (strpos($this->search_query, '+') === false)
+ {
+ return false;
+ }
+
+ // generate a search_key from all the options to identify the results
+ $search_key = md5(implode('#', array(
+ implode(', ', $this->split_words),
+ $type,
+ $fields,
+ $terms,
+ $sort_days,
+ $sort_key,
+ $topic_id,
+ implode(',', $ex_fid_ary),
+ $post_visibility,
+ implode(',', $author_ary)
+ )));
+
+ if ($start < 0)
+ {
+ $start = 0;
+ }
+
+ // try reading the results from cache
+ $result_count = 0;
+ if ($this->obtain_ids($search_key, $result_count, $id_ary, $start, $per_page, $sort_dir) == SEARCH_RESULT_IN_CACHE)
+ {
+ return $result_count;
+ }
+
+ $id_ary = array();
+
+ $join_topic = ($type == 'posts') ? false : true;
+
+ // Build sql strings for sorting
+ $sql_sort = $sort_by_sql[$sort_key] . (($sort_dir == 'a') ? ' ASC' : ' DESC');
+ $sql_sort_table = $sql_sort_join = '';
+
+ switch ($sql_sort[0])
+ {
+ case 'u':
+ $sql_sort_table = USERS_TABLE . ' u, ';
+ $sql_sort_join = ($type == 'posts') ? ' AND u.user_id = p.poster_id ' : ' AND u.user_id = t.topic_poster ';
+ break;
+
+ case 't':
+ $join_topic = true;
+ break;
+
+ case 'f':
+ $sql_sort_table = FORUMS_TABLE . ' f, ';
+ $sql_sort_join = ' AND f.forum_id = p.forum_id ';
+ break;
+ }
+
+ // Build some display specific sql strings
+ switch ($fields)
+ {
+ case 'titleonly':
+ $sql_match = 'p.post_subject';
+ $sql_match_where = ' AND p.post_id = t.topic_first_post_id';
+ $join_topic = true;
+ break;
+
+ case 'msgonly':
+ $sql_match = 'p.post_text';
+ $sql_match_where = '';
+ break;
+
+ case 'firstpost':
+ $sql_match = 'p.post_subject, p.post_text';
+ $sql_match_where = ' AND p.post_id = t.topic_first_post_id';
+ $join_topic = true;
+ break;
+
+ default:
+ $sql_match = 'p.post_subject, p.post_text';
+ $sql_match_where = '';
+ break;
+ }
+
+ $sql_select = ($type == 'posts') ? 'p.post_id' : 'DISTINCT t.topic_id';
+ $sql_from = ($join_topic) ? TOPICS_TABLE . ' t, ' : '';
+ $field = ($type == 'posts') ? 'post_id' : 'topic_id';
+ $sql_author = (sizeof($author_ary) == 1) ? ' = ' . $author_ary[0] : 'IN (' . implode(', ', $author_ary) . ')';
+
+ if (sizeof($author_ary) && $author_name)
+ {
+ // first one matches post of registered users, second one guests and deleted users
+ $sql_author = '(' . $this->db->sql_in_set('p.poster_id', array_diff($author_ary, array(ANONYMOUS)), false, true) . ' OR p.post_username ' . $author_name . ')';
+ }
+ else if (sizeof($author_ary))
+ {
+ $sql_author = ' AND ' . $this->db->sql_in_set('p.poster_id', $author_ary);
+ }
+ else
+ {
+ $sql_author = '';
+ }
+
+ $sql_where_options = $sql_sort_join;
+ $sql_where_options .= ($topic_id) ? ' AND p.topic_id = ' . $topic_id : '';
+ $sql_where_options .= ($join_topic) ? ' AND t.topic_id = p.topic_id' : '';
+ $sql_where_options .= (sizeof($ex_fid_ary)) ? ' AND ' . $this->db->sql_in_set('p.forum_id', $ex_fid_ary, true) : '';
+ $sql_where_options .= ' AND ' . $post_visibility;
+ $sql_where_options .= $sql_author;
+ $sql_where_options .= ($sort_days) ? ' AND p.post_time >= ' . (time() - ($sort_days * 86400)) : '';
+ $sql_where_options .= $sql_match_where;
+
+ $tmp_sql_match = array();
+ $sql_match = str_replace(',', " || ' ' ||", $sql_match);
+ $tmp_sql_match = "to_tsvector ('" . $this->db->sql_escape($this->config['fulltext_postgres_ts_name']) . "', " . $sql_match . ") @@ to_tsquery ('" . $this->db->sql_escape($this->config['fulltext_postgres_ts_name']) . "', '" . $this->db->sql_escape($this->tsearch_query) . "')";
+
+ $this->db->sql_transaction('begin');
+
+ $sql_from = "FROM $sql_from$sql_sort_table" . POSTS_TABLE . " p";
+ $sql_where = "WHERE (" . $tmp_sql_match . ")
+ $sql_where_options";
+ $sql = "SELECT $sql_select
+ $sql_from
+ $sql_where
+ ORDER BY $sql_sort";
+ $result = $this->db->sql_query_limit($sql, $this->config['search_block_size'], $start);
+
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ $id_ary[] = $row[$field];
+ }
+ $this->db->sql_freeresult($result);
+
+ $id_ary = array_unique($id_ary);
+
+ // if the total result count is not cached yet, retrieve it from the db
+ if (!$result_count)
+ {
+ $sql_count = "SELECT COUNT(*) as result_count
+ $sql_from
+ $sql_where";
+ $result = $this->db->sql_query($sql_count);
+ $result_count = (int) $this->db->sql_fetchfield('result_count');
+ $this->db->sql_freeresult($result);
+
+ if (!$result_count)
+ {
+ return false;
+ }
+ }
+
+ $this->db->sql_transaction('commit');
+
+ if ($start >= $result_count)
+ {
+ $start = floor(($result_count - 1) / $per_page) * $per_page;
+
+ $result = $this->db->sql_query_limit($sql, $this->config['search_block_size'], $start);
+
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ $id_ary[] = $row[$field];
+ }
+ $this->db->sql_freeresult($result);
+
+ $id_ary = array_unique($id_ary);
+ }
+
+ // store the ids, from start on then delete anything that isn't on the current page because we only need ids for one page
+ $this->save_ids($search_key, implode(' ', $this->split_words), $author_ary, $result_count, $id_ary, $start, $sort_dir);
+ $id_ary = array_slice($id_ary, 0, (int) $per_page);
+
+ return $result_count;
+ }
+
+ /**
+ * Performs a search on an author's posts without caring about message contents. Depends on display specific params
+ *
+ * @param string $type contains either posts or topics depending on what should be searched for
+ * @param boolean $firstpost_only if true, only topic starting posts will be considered
+ * @param array $sort_by_sql contains SQL code for the ORDER BY part of a query
+ * @param string $sort_key is the key of $sort_by_sql for the selected sorting
+ * @param string $sort_dir is either a or d representing ASC and DESC
+ * @param string $sort_days specifies the maximum amount of days a post may be old
+ * @param array $ex_fid_ary specifies an array of forum ids which should not be searched
+ * @param string $post_visibility specifies which types of posts the user can view in which forums
+ * @param int $topic_id is set to 0 or a topic id, if it is not 0 then only posts in this topic should be searched
+ * @param array $author_ary an array of author ids
+ * @param string $author_name specifies the author match, when ANONYMOUS is also a search-match
+ * @param array &$id_ary passed by reference, to be filled with ids for the page specified by $start and $per_page, should be ordered
+ * @param int $start indicates the first index of the page
+ * @param int $per_page number of ids each page is supposed to contain
+ * @return boolean|int total number of results
+ */
+ public function author_search($type, $firstpost_only, $sort_by_sql, $sort_key, $sort_dir, $sort_days, $ex_fid_ary, $post_visibility, $topic_id, $author_ary, $author_name, &$id_ary, &$start, $per_page)
+ {
+ // No author? No posts
+ if (!sizeof($author_ary))
+ {
+ return 0;
+ }
+
+ // generate a search_key from all the options to identify the results
+ $search_key = md5(implode('#', array(
+ '',
+ $type,
+ ($firstpost_only) ? 'firstpost' : '',
+ '',
+ '',
+ $sort_days,
+ $sort_key,
+ $topic_id,
+ implode(',', $ex_fid_ary),
+ $post_visibility,
+ implode(',', $author_ary),
+ $author_name,
+ )));
+
+ if ($start < 0)
+ {
+ $start = 0;
+ }
+
+ // try reading the results from cache
+ $result_count = 0;
+ if ($this->obtain_ids($search_key, $result_count, $id_ary, $start, $per_page, $sort_dir) == SEARCH_RESULT_IN_CACHE)
+ {
+ return $result_count;
+ }
+
+ $id_ary = array();
+
+ // Create some display specific sql strings
+ if ($author_name)
+ {
+ // first one matches post of registered users, second one guests and deleted users
+ $sql_author = '(' . $this->db->sql_in_set('p.poster_id', array_diff($author_ary, array(ANONYMOUS)), false, true) . ' OR p.post_username ' . $author_name . ')';
+ }
+ else
+ {
+ $sql_author = $this->db->sql_in_set('p.poster_id', $author_ary);
+ }
+ $sql_fora = (sizeof($ex_fid_ary)) ? ' AND ' . $this->db->sql_in_set('p.forum_id', $ex_fid_ary, true) : '';
+ $sql_topic_id = ($topic_id) ? ' AND p.topic_id = ' . (int) $topic_id : '';
+ $sql_time = ($sort_days) ? ' AND p.post_time >= ' . (time() - ($sort_days * 86400)) : '';
+ $sql_firstpost = ($firstpost_only) ? ' AND p.post_id = t.topic_first_post_id' : '';
+
+ // Build sql strings for sorting
+ $sql_sort = $sort_by_sql[$sort_key] . (($sort_dir == 'a') ? ' ASC' : ' DESC');
+ $sql_sort_table = $sql_sort_join = '';
+ switch ($sql_sort[0])
+ {
+ case 'u':
+ $sql_sort_table = USERS_TABLE . ' u, ';
+ $sql_sort_join = ($type == 'posts') ? ' AND u.user_id = p.poster_id ' : ' AND u.user_id = t.topic_poster ';
+ break;
+
+ case 't':
+ $sql_sort_table = ($type == 'posts' && !$firstpost_only) ? TOPICS_TABLE . ' t, ' : '';
+ $sql_sort_join = ($type == 'posts' && !$firstpost_only) ? ' AND t.topic_id = p.topic_id ' : '';
+ break;
+
+ case 'f':
+ $sql_sort_table = FORUMS_TABLE . ' f, ';
+ $sql_sort_join = ' AND f.forum_id = p.forum_id ';
+ break;
+ }
+
+ $m_approve_fid_sql = ' AND ' . $post_visibility;
+
+ // Build the query for really selecting the post_ids
+ if ($type == 'posts')
+ {
+ $sql = "SELECT p.post_id
+ FROM " . $sql_sort_table . POSTS_TABLE . ' p' . (($firstpost_only) ? ', ' . TOPICS_TABLE . ' t ' : ' ') . "
+ WHERE $sql_author
+ $sql_topic_id
+ $sql_firstpost
+ $m_approve_fid_sql
+ $sql_fora
+ $sql_sort_join
+ $sql_time
+ ORDER BY $sql_sort";
+ $field = 'post_id';
+ }
+ else
+ {
+ $sql = "SELECT t.topic_id
+ FROM " . $sql_sort_table . TOPICS_TABLE . ' t, ' . POSTS_TABLE . " p
+ WHERE $sql_author
+ $sql_topic_id
+ $sql_firstpost
+ $m_approve_fid_sql
+ $sql_fora
+ AND t.topic_id = p.topic_id
+ $sql_sort_join
+ $sql_time
+ GROUP BY t.topic_id, $sort_by_sql[$sort_key]
+ ORDER BY $sql_sort";
+ $field = 'topic_id';
+ }
+
+ $this->db->sql_transaction('begin');
+
+ // Only read one block of posts from the db and then cache it
+ $result = $this->db->sql_query_limit($sql, $this->config['search_block_size'], $start);
+
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ $id_ary[] = $row[$field];
+ }
+ $this->db->sql_freeresult($result);
+
+ // retrieve the total result count if needed
+ if (!$result_count)
+ {
+ if ($type == 'posts')
+ {
+ $sql_count = "SELECT COUNT(*) as result_count
+ FROM " . $sql_sort_table . POSTS_TABLE . ' p' . (($firstpost_only) ? ', ' . TOPICS_TABLE . ' t ' : ' ') . "
+ WHERE $sql_author
+ $sql_topic_id
+ $sql_firstpost
+ $m_approve_fid_sql
+ $sql_fora
+ $sql_sort_join
+ $sql_time";
+ }
+ else
+ {
+ $sql_count = "SELECT COUNT(*) as result_count
+ FROM " . $sql_sort_table . TOPICS_TABLE . ' t, ' . POSTS_TABLE . " p
+ WHERE $sql_author
+ $sql_topic_id
+ $sql_firstpost
+ $m_approve_fid_sql
+ $sql_fora
+ AND t.topic_id = p.topic_id
+ $sql_sort_join
+ $sql_time
+ GROUP BY t.topic_id, $sort_by_sql[$sort_key]";
+ }
+
+ $result = $this->db->sql_query($sql_count);
+ $result_count = (int) $this->db->sql_fetchfield('result_count');
+
+ if (!$result_count)
+ {
+ return false;
+ }
+ }
+
+ $this->db->sql_transaction('commit');
+
+ if ($start >= $result_count)
+ {
+ $start = floor(($result_count - 1) / $per_page) * $per_page;
+
+ $result = $this->db->sql_query_limit($sql, $this->config['search_block_size'], $start);
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ $id_ary[] = (int) $row[$field];
+ }
+ $this->db->sql_freeresult($result);
+
+ $id_ary = array_unique($id_ary);
+ }
+
+ if (sizeof($id_ary))
+ {
+ $this->save_ids($search_key, '', $author_ary, $result_count, $id_ary, $start, $sort_dir);
+ $id_ary = array_slice($id_ary, 0, $per_page);
+
+ return $result_count;
+ }
+ return false;
+ }
+
+ /**
+ * Destroys cached search results, that contained one of the new words in a post so the results won't be outdated
+ *
+ * @param string $mode contains the post mode: edit, post, reply, quote ...
+ * @param int $post_id contains the post id of the post to index
+ * @param string $message contains the post text of the post
+ * @param string $subject contains the subject of the post to index
+ * @param int $poster_id contains the user id of the poster
+ * @param int $forum_id contains the forum id of parent forum of the post
+ */
+ public function index($mode, $post_id, &$message, &$subject, $poster_id, $forum_id)
+ {
+ // Split old and new post/subject to obtain array of words
+ $split_text = $this->split_message($message);
+ $split_title = ($subject) ? $this->split_message($subject) : array();
+
+ $words = array_unique(array_merge($split_text, $split_title));
+
+ unset($split_text);
+ unset($split_title);
+
+ // destroy cached search results containing any of the words removed or added
+ $this->destroy_cache($words, array($poster_id));
+
+ unset($words);
+ }
+
+ /**
+ * Destroy cached results, that might be outdated after deleting a post
+ */
+ public function index_remove($post_ids, $author_ids, $forum_ids)
+ {
+ $this->destroy_cache(array(), $author_ids);
+ }
+
+ /**
+ * Destroy old cache entries
+ */
+ public function tidy()
+ {
+ // destroy too old cached search results
+ $this->destroy_cache(array());
+
+ set_config('search_last_gc', time(), true);
+ }
+
+ /**
+ * Create fulltext index
+ *
+ * @return string|bool error string is returned incase of errors otherwise false
+ */
+ public function create_index($acp_module, $u_action)
+ {
+ // Make sure we can actually use PostgreSQL with fulltext indexes
+ if ($error = $this->init())
+ {
+ return $error;
+ }
+
+ if (empty($this->stats))
+ {
+ $this->get_stats();
+ }
+
+ if (!isset($this->stats['post_subject']))
+ {
+ $this->db->sql_query("CREATE INDEX " . POSTS_TABLE . "_" . $this->config['fulltext_postgres_ts_name'] . "_post_subject ON " . POSTS_TABLE . " USING gin (to_tsvector ('" . $this->db->sql_escape($this->config['fulltext_postgres_ts_name']) . "', post_subject))");
+ }
+
+ if (!isset($this->stats['post_content']))
+ {
+ $this->db->sql_query("CREATE INDEX " . POSTS_TABLE . "_" . $this->config['fulltext_postgres_ts_name'] . "_post_content ON " . POSTS_TABLE . " USING gin (to_tsvector ('" . $this->db->sql_escape($this->config['fulltext_postgres_ts_name']) . "', post_text || ' ' || post_subject))");
+ }
+
+ $this->db->sql_query('TRUNCATE TABLE ' . SEARCH_RESULTS_TABLE);
+
+ return false;
+ }
+
+ /**
+ * Drop fulltext index
+ *
+ * @return string|bool error string is returned incase of errors otherwise false
+ */
+ public function delete_index($acp_module, $u_action)
+ {
+ // Make sure we can actually use PostgreSQL with fulltext indexes
+ if ($error = $this->init())
+ {
+ return $error;
+ }
+
+ if (empty($this->stats))
+ {
+ $this->get_stats();
+ }
+
+ if (isset($this->stats['post_subject']))
+ {
+ $this->db->sql_query('DROP INDEX ' . $this->stats['post_subject']['relname']);
+ }
+
+ if (isset($this->stats['post_content']))
+ {
+ $this->db->sql_query('DROP INDEX ' . $this->stats['post_content']['relname']);
+ }
+
+ $this->db->sql_query('TRUNCATE TABLE ' . SEARCH_RESULTS_TABLE);
+
+ return false;
+ }
+
+ /**
+ * Returns true if both FULLTEXT indexes exist
+ */
+ public function index_created()
+ {
+ if (empty($this->stats))
+ {
+ $this->get_stats();
+ }
+
+ return (isset($this->stats['post_subject']) && isset($this->stats['post_content'])) ? true : false;
+ }
+
+ /**
+ * Returns an associative array containing information about the indexes
+ */
+ public function index_stats()
+ {
+ if (empty($this->stats))
+ {
+ $this->get_stats();
+ }
+
+ return array(
+ $this->user->lang['FULLTEXT_POSTGRES_TOTAL_POSTS'] => ($this->index_created()) ? $this->stats['total_posts'] : 0,
+ );
+ }
+
+ /**
+ * Computes the stats and store them in the $this->stats associative array
+ */
+ protected function get_stats()
+ {
+ if ($this->db->sql_layer != 'postgres')
+ {
+ $this->stats = array();
+ return;
+ }
+
+ $sql = "SELECT c2.relname, pg_catalog.pg_get_indexdef(i.indexrelid, 0, true) AS indexdef
+ FROM pg_catalog.pg_class c1, pg_catalog.pg_index i, pg_catalog.pg_class c2
+ WHERE c1.relname = '" . POSTS_TABLE . "'
+ AND pg_catalog.pg_table_is_visible(c1.oid)
+ AND c1.oid = i.indrelid
+ AND i.indexrelid = c2.oid";
+ $result = $this->db->sql_query($sql);
+
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ // deal with older PostgreSQL versions which didn't use Index_type
+ if (strpos($row['indexdef'], 'to_tsvector') !== false)
+ {
+ if ($row['relname'] == POSTS_TABLE . '_' . $this->config['fulltext_postgres_ts_name'] . '_post_subject' || $row['relname'] == POSTS_TABLE . '_post_subject')
+ {
+ $this->stats['post_subject'] = $row;
+ }
+ else if ($row['relname'] == POSTS_TABLE . '_' . $this->config['fulltext_postgres_ts_name'] . '_post_content' || $row['relname'] == POSTS_TABLE . '_post_content')
+ {
+ $this->stats['post_content'] = $row;
+ }
+ }
+ }
+ $this->db->sql_freeresult($result);
+
+ $this->stats['total_posts'] = $this->config['num_posts'];
+ }
+
+ /**
+ * Display various options that can be configured for the backend from the acp
+ *
+ * @return associative array containing template and config variables
+ */
+ public function acp()
+ {
+ $tpl = '
+ <dl>
+ <dt><label>' . $this->user->lang['FULLTEXT_POSTGRES_VERSION_CHECK'] . '</label><br /><span>' . $this->user->lang['FULLTEXT_POSTGRES_VERSION_CHECK_EXPLAIN'] . '</span></dt>
+ <dd>' . (($this->tsearch_usable) ? $this->user->lang['YES'] : $this->user->lang['NO']) . ' (PostgreSQL ' . $this->version . ')</dd>
+ </dl>
+ <dl>
+ <dt><label>' . $this->user->lang['FULLTEXT_POSTGRES_TS_NAME'] . '</label><br /><span>' . $this->user->lang['FULLTEXT_POSTGRES_TS_NAME_EXPLAIN'] . '</span></dt>
+ <dd><select name="config[fulltext_postgres_ts_name]">';
+
+ if ($this->db->sql_layer == 'postgres' && $this->tsearch_usable)
+ {
+ $sql = 'SELECT cfgname AS ts_name
+ FROM pg_ts_config';
+ $result = $this->db->sql_query($sql);
+
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ $tpl .= '<option value="' . $row['ts_name'] . '"' . ($row['ts_name'] === $this->config['fulltext_postgres_ts_name'] ? ' selected="selected"' : '') . '>' . $row['ts_name'] . '</option>';
+ }
+ $this->db->sql_freeresult($result);
+ }
+ else
+ {
+ $tpl .= '<option value="' . $this->config['fulltext_postgres_ts_name'] . '" selected="selected">' . $this->config['fulltext_postgres_ts_name'] . '</option>';
+ }
+
+ $tpl .= '</select></dd>
+ </dl>
+ <dl>
+ <dt><label for="fulltext_postgres_min_word_len">' . $this->user->lang['FULLTEXT_POSTGRES_MIN_WORD_LEN'] . $this->user->lang['COLON'] . '</label><br /><span>' . $this->user->lang['FULLTEXT_POSTGRES_MIN_WORD_LEN_EXPLAIN'] . '</span></dt>
+ <dd><input id="fulltext_postgres_min_word_len" type="number" size="3" maxlength="3" min="0" max="255" name="config[fulltext_postgres_min_word_len]" value="' . (int) $this->config['fulltext_postgres_min_word_len'] . '" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="fulltext_postgres_max_word_len">' . $this->user->lang['FULLTEXT_POSTGRES_MAX_WORD_LEN'] . $this->user->lang['COLON'] . '</label><br /><span>' . $this->user->lang['FULLTEXT_POSTGRES_MAX_WORD_LEN_EXPLAIN'] . '</span></dt>
+ <dd><input id="fulltext_postgres_max_word_len" type="number" size="3" maxlength="3" min="0" max="255" name="config[fulltext_postgres_max_word_len]" value="' . (int) $this->config['fulltext_postgres_max_word_len'] . '" /></dd>
+ </dl>
+ ';
+
+ // These are fields required in the config table
+ return array(
+ 'tpl' => $tpl,
+ 'config' => array('fulltext_postgres_ts_name' => 'string', 'fulltext_postgres_min_word_len' => 'integer:0:255', 'fulltext_postgres_max_word_len' => 'integer:0:255')
+ );
+ }
+}
diff --git a/phpBB/phpbb/search/fulltext_sphinx.php b/phpBB/phpbb/search/fulltext_sphinx.php
new file mode 100644
index 0000000000..d86a394326
--- /dev/null
+++ b/phpBB/phpbb/search/fulltext_sphinx.php
@@ -0,0 +1,904 @@
+<?php
+/**
+*
+* @package search
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\search;
+
+define('SPHINX_MAX_MATCHES', 20000);
+define('SPHINX_CONNECT_RETRIES', 3);
+define('SPHINX_CONNECT_WAIT_TIME', 300);
+
+/**
+* fulltext_sphinx
+* Fulltext search based on the sphinx search deamon
+* @package search
+*/
+class fulltext_sphinx
+{
+ /**
+ * Associative array holding index stats
+ * @var array
+ */
+ protected $stats = array();
+
+ /**
+ * Holds the words entered by user, obtained by splitting the entered query on whitespace
+ * @var array
+ */
+ protected $split_words = array();
+
+ /**
+ * Holds unique sphinx id
+ * @var string
+ */
+ protected $id;
+
+ /**
+ * Stores the names of both main and delta sphinx indexes
+ * separated by a semicolon
+ * @var string
+ */
+ protected $indexes;
+
+ /**
+ * Sphinx searchd client object
+ * @var SphinxClient
+ */
+ protected $sphinx;
+
+ /**
+ * Relative path to board root
+ * @var string
+ */
+ protected $phpbb_root_path;
+
+ /**
+ * PHP Extension
+ * @var string
+ */
+ protected $php_ext;
+
+ /**
+ * Auth object
+ * @var \phpbb\auth\auth
+ */
+ protected $auth;
+
+ /**
+ * Config object
+ * @var \phpbb\config\config
+ */
+ protected $config;
+
+ /**
+ * Database connection
+ * @var \phpbb\db\driver\driver
+ */
+ protected $db;
+
+ /**
+ * Database Tools object
+ * @var \phpbb\db\tools
+ */
+ protected $db_tools;
+
+ /**
+ * Stores the database type if supported by sphinx
+ * @var string
+ */
+ protected $dbtype;
+
+ /**
+ * User object
+ * @var \phpbb\user
+ */
+ protected $user;
+
+ /**
+ * Stores the generated content of the sphinx config file
+ * @var string
+ */
+ protected $config_file_data = '';
+
+ /**
+ * Contains tidied search query.
+ * Operators are prefixed in search query and common words excluded
+ * @var string
+ */
+ protected $search_query;
+
+ /**
+ * Constructor
+ * Creates a new \phpbb\search\fulltext_postgres, which is used as a search backend
+ *
+ * @param string|bool $error Any error that occurs is passed on through this reference variable otherwise false
+ */
+ public function __construct(&$error, $phpbb_root_path, $phpEx, $auth, $config, $db, $user)
+ {
+ $this->phpbb_root_path = $phpbb_root_path;
+ $this->php_ext = $phpEx;
+ $this->config = $config;
+ $this->user = $user;
+ $this->db = $db;
+ $this->auth = $auth;
+
+ // Initialize \phpbb\db\tools object
+ $this->db_tools = new \phpbb\db\tools($this->db);
+
+ if(!$this->config['fulltext_sphinx_id'])
+ {
+ set_config('fulltext_sphinx_id', unique_id());
+ }
+ $this->id = $this->config['fulltext_sphinx_id'];
+ $this->indexes = 'index_phpbb_' . $this->id . '_delta;index_phpbb_' . $this->id . '_main';
+
+ if (!class_exists('SphinxClient'))
+ {
+ require($this->phpbb_root_path . 'includes/sphinxapi.' . $this->php_ext);
+ }
+
+ // Initialize sphinx client
+ $this->sphinx = new \SphinxClient();
+
+ $this->sphinx->SetServer(($this->config['fulltext_sphinx_host'] ? $this->config['fulltext_sphinx_host'] : 'localhost'), ($this->config['fulltext_sphinx_port'] ? (int) $this->config['fulltext_sphinx_port'] : 9312));
+
+ $error = false;
+ }
+
+ /**
+ * Returns the name of this search backend to be displayed to administrators
+ *
+ * @return string Name
+ */
+ public function get_name()
+ {
+ return 'Sphinx Fulltext';
+ }
+
+ /**
+ * Returns the search_query
+ *
+ * @return string search query
+ */
+ public function get_search_query()
+ {
+ return $this->search_query;
+ }
+
+ /**
+ * Returns false as there is no word_len array
+ *
+ * @return false
+ */
+ public function get_word_length()
+ {
+ return false;
+ }
+
+ /**
+ * Returns an empty array as there are no common_words
+ *
+ * @return array common words that are ignored by search backend
+ */
+ public function get_common_words()
+ {
+ return array();
+ }
+
+ /**
+ * Checks permissions and paths, if everything is correct it generates the config file
+ *
+ * @return string|bool Language key of the error/incompatiblity encountered, or false if successful
+ */
+ public function init()
+ {
+ if ($this->db->sql_layer != 'mysql' && $this->db->sql_layer != 'mysql4' && $this->db->sql_layer != 'mysqli' && $this->db->sql_layer != 'postgres')
+ {
+ return $this->user->lang['FULLTEXT_SPHINX_WRONG_DATABASE'];
+ }
+
+ // Move delta to main index each hour
+ set_config('search_gc', 3600);
+
+ return false;
+ }
+
+ /**
+ * Generates content of sphinx.conf
+ *
+ * @return bool True if sphinx.conf content is correctly generated, false otherwise
+ */
+ protected function config_generate()
+ {
+ // Check if Database is supported by Sphinx
+ if ($this->db->sql_layer =='mysql' || $this->db->sql_layer == 'mysql4' || $this->db->sql_layer == 'mysqli')
+ {
+ $this->dbtype = 'mysql';
+ }
+ else if ($this->db->sql_layer == 'postgres')
+ {
+ $this->dbtype = 'pgsql';
+ }
+ else
+ {
+ $this->config_file_data = $this->user->lang('FULLTEXT_SPHINX_WRONG_DATABASE');
+ return false;
+ }
+
+ // Check if directory paths have been filled
+ if (!$this->config['fulltext_sphinx_data_path'])
+ {
+ $this->config_file_data = $this->user->lang('FULLTEXT_SPHINX_NO_CONFIG_DATA');
+ return false;
+ }
+
+ include($this->phpbb_root_path . 'config.' . $this->php_ext);
+
+ /* Now that we're sure everything was entered correctly,
+ generate a config for the index. We use a config value
+ fulltext_sphinx_id for this, as it should be unique. */
+ $config_object = new \phpbb\search\sphinx\config($this->config_file_data);
+ $config_data = array(
+ 'source source_phpbb_' . $this->id . '_main' => array(
+ array('type', $this->dbtype . ' # mysql or pgsql'),
+ // This config value sql_host needs to be changed incase sphinx and sql are on different servers
+ array('sql_host', $dbhost . ' # SQL server host sphinx connects to'),
+ array('sql_user', $dbuser),
+ array('sql_pass', $dbpasswd),
+ array('sql_db', $dbname),
+ array('sql_port', $dbport . ' # optional, default is 3306 for mysql and 5432 for pgsql'),
+ array('sql_query_pre', 'SET NAMES \'utf8\''),
+ array('sql_query_pre', 'UPDATE ' . SPHINX_TABLE . ' SET max_doc_id = (SELECT MAX(post_id) FROM ' . POSTS_TABLE . ') WHERE counter_id = 1'),
+ array('sql_query_range', 'SELECT MIN(post_id), MAX(post_id) FROM ' . POSTS_TABLE . ''),
+ array('sql_range_step', '5000'),
+ array('sql_query', 'SELECT
+ p.post_id AS id,
+ p.forum_id,
+ p.topic_id,
+ p.poster_id,
+ p.post_visibility,
+ CASE WHEN p.post_id = t.topic_first_post_id THEN 1 ELSE 0 END as topic_first_post,
+ p.post_time,
+ p.post_subject,
+ p.post_subject as title,
+ p.post_text as data,
+ t.topic_last_post_time,
+ 0 as deleted
+ FROM ' . POSTS_TABLE . ' p, ' . TOPICS_TABLE . ' t
+ WHERE
+ p.topic_id = t.topic_id
+ AND p.post_id >= $start AND p.post_id <= $end'),
+ array('sql_query_post', ''),
+ array('sql_query_post_index', 'UPDATE ' . SPHINX_TABLE . ' SET max_doc_id = $maxid WHERE counter_id = 1'),
+ array('sql_query_info', 'SELECT * FROM ' . POSTS_TABLE . ' WHERE post_id = $id'),
+ array('sql_attr_uint', 'forum_id'),
+ array('sql_attr_uint', 'topic_id'),
+ array('sql_attr_uint', 'poster_id'),
+ array('sql_attr_uint', 'post_visibility'),
+ array('sql_attr_bool', 'topic_first_post'),
+ array('sql_attr_bool', 'deleted'),
+ array('sql_attr_timestamp', 'post_time'),
+ array('sql_attr_timestamp', 'topic_last_post_time'),
+ array('sql_attr_string', 'post_subject'),
+ ),
+ 'source source_phpbb_' . $this->id . '_delta : source_phpbb_' . $this->id . '_main' => array(
+ array('sql_query_pre', ''),
+ array('sql_query_range', ''),
+ array('sql_range_step', ''),
+ array('sql_query', 'SELECT
+ p.post_id AS id,
+ p.forum_id,
+ p.topic_id,
+ p.poster_id,
+ p.post_visibility,
+ CASE WHEN p.post_id = t.topic_first_post_id THEN 1 ELSE 0 END as topic_first_post,
+ p.post_time,
+ p.post_subject,
+ p.post_subject as title,
+ p.post_text as data,
+ t.topic_last_post_time,
+ 0 as deleted
+ FROM ' . POSTS_TABLE . ' p, ' . TOPICS_TABLE . ' t
+ WHERE
+ p.topic_id = t.topic_id
+ AND p.post_id >= ( SELECT max_doc_id FROM ' . SPHINX_TABLE . ' WHERE counter_id=1 )'),
+ ),
+ 'index index_phpbb_' . $this->id . '_main' => array(
+ array('path', $this->config['fulltext_sphinx_data_path'] . 'index_phpbb_' . $this->id . '_main'),
+ array('source', 'source_phpbb_' . $this->id . '_main'),
+ array('docinfo', 'extern'),
+ array('morphology', 'none'),
+ array('stopwords', ''),
+ array('min_word_len', '2'),
+ array('charset_type', 'utf-8'),
+ array('charset_table', 'U+FF10..U+FF19->0..9, 0..9, U+FF41..U+FF5A->a..z, U+FF21..U+FF3A->a..z, A..Z->a..z, a..z, U+0149, U+017F, U+0138, U+00DF, U+00FF, U+00C0..U+00D6->U+00E0..U+00F6, U+00E0..U+00F6, U+00D8..U+00DE->U+00F8..U+00FE, U+00F8..U+00FE, U+0100->U+0101, U+0101, U+0102->U+0103, U+0103, U+0104->U+0105, U+0105, U+0106->U+0107, U+0107, U+0108->U+0109, U+0109, U+010A->U+010B, U+010B, U+010C->U+010D, U+010D, U+010E->U+010F, U+010F, U+0110->U+0111, U+0111, U+0112->U+0113, U+0113, U+0114->U+0115, U+0115, U+0116->U+0117, U+0117, U+0118->U+0119, U+0119, U+011A->U+011B, U+011B, U+011C->U+011D, U+011D, U+011E->U+011F, U+011F, U+0130->U+0131, U+0131, U+0132->U+0133, U+0133, U+0134->U+0135, U+0135, U+0136->U+0137, U+0137, U+0139->U+013A, U+013A, U+013B->U+013C, U+013C, U+013D->U+013E, U+013E, U+013F->U+0140, U+0140, U+0141->U+0142, U+0142, U+0143->U+0144, U+0144, U+0145->U+0146, U+0146, U+0147->U+0148, U+0148, U+014A->U+014B, U+014B, U+014C->U+014D, U+014D, U+014E->U+014F, U+014F, U+0150->U+0151, U+0151, U+0152->U+0153, U+0153, U+0154->U+0155, U+0155, U+0156->U+0157, U+0157, U+0158->U+0159, U+0159, U+015A->U+015B, U+015B, U+015C->U+015D, U+015D, U+015E->U+015F, U+015F, U+0160->U+0161, U+0161, U+0162->U+0163, U+0163, U+0164->U+0165, U+0165, U+0166->U+0167, U+0167, U+0168->U+0169, U+0169, U+016A->U+016B, U+016B, U+016C->U+016D, U+016D, U+016E->U+016F, U+016F, U+0170->U+0171, U+0171, U+0172->U+0173, U+0173, U+0174->U+0175, U+0175, U+0176->U+0177, U+0177, U+0178->U+00FF, U+00FF, U+0179->U+017A, U+017A, U+017B->U+017C, U+017C, U+017D->U+017E, U+017E, U+0410..U+042F->U+0430..U+044F, U+0430..U+044F, U+4E00..U+9FFF'),
+ array('min_prefix_len', '0'),
+ array('min_infix_len', '0'),
+ ),
+ 'index index_phpbb_' . $this->id . '_delta : index_phpbb_' . $this->id . '_main' => array(
+ array('path', $this->config['fulltext_sphinx_data_path'] . 'index_phpbb_' . $this->id . '_delta'),
+ array('source', 'source_phpbb_' . $this->id . '_delta'),
+ ),
+ 'indexer' => array(
+ array('mem_limit', $this->config['fulltext_sphinx_indexer_mem_limit'] . 'M'),
+ ),
+ 'searchd' => array(
+ array('compat_sphinxql_magics' , '0'),
+ array('listen' , ($this->config['fulltext_sphinx_host'] ? $this->config['fulltext_sphinx_host'] : 'localhost') . ':' . ($this->config['fulltext_sphinx_port'] ? $this->config['fulltext_sphinx_port'] : '9312')),
+ array('log', $this->config['fulltext_sphinx_data_path'] . 'log/searchd.log'),
+ array('query_log', $this->config['fulltext_sphinx_data_path'] . 'log/sphinx-query.log'),
+ array('read_timeout', '5'),
+ array('max_children', '30'),
+ array('pid_file', $this->config['fulltext_sphinx_data_path'] . 'searchd.pid'),
+ array('max_matches', (string) SPHINX_MAX_MATCHES),
+ array('binlog_path', $this->config['fulltext_sphinx_data_path']),
+ ),
+ );
+
+ $non_unique = array('sql_query_pre' => true, 'sql_attr_uint' => true, 'sql_attr_timestamp' => true, 'sql_attr_str2ordinal' => true, 'sql_attr_bool' => true);
+ $delete = array('sql_group_column' => true, 'sql_date_column' => true, 'sql_str2ordinal_column' => true);
+ foreach ($config_data as $section_name => $section_data)
+ {
+ $section = $config_object->get_section_by_name($section_name);
+ if (!$section)
+ {
+ $section = $config_object->add_section($section_name);
+ }
+
+ foreach ($delete as $key => $void)
+ {
+ $section->delete_variables_by_name($key);
+ }
+
+ foreach ($non_unique as $key => $void)
+ {
+ $section->delete_variables_by_name($key);
+ }
+
+ foreach ($section_data as $entry)
+ {
+ $key = $entry[0];
+ $value = $entry[1];
+
+ if (!isset($non_unique[$key]))
+ {
+ $variable = $section->get_variable_by_name($key);
+ if (!$variable)
+ {
+ $variable = $section->create_variable($key, $value);
+ }
+ else
+ {
+ $variable->set_value($value);
+ }
+ }
+ else
+ {
+ $variable = $section->create_variable($key, $value);
+ }
+ }
+ }
+ $this->config_file_data = $config_object->get_data();
+
+ return true;
+ }
+
+ /**
+ * Splits keywords entered by a user into an array of words stored in $this->split_words
+ * Stores the tidied search query in $this->search_query
+ *
+ * @param string $keywords Contains the keyword as entered by the user
+ * @param string $terms is either 'all' or 'any'
+ * @return false if no valid keywords were found and otherwise true
+ */
+ public function split_keywords(&$keywords, $terms)
+ {
+ if ($terms == 'all')
+ {
+ $match = array('#\sand\s#i', '#\sor\s#i', '#\snot\s#i', '#\+#', '#-#', '#\|#', '#@#');
+ $replace = array(' & ', ' | ', ' - ', ' +', ' -', ' |', '');
+
+ $replacements = 0;
+ $keywords = preg_replace($match, $replace, $keywords);
+ $this->sphinx->SetMatchMode(SPH_MATCH_EXTENDED);
+ }
+ else
+ {
+ $this->sphinx->SetMatchMode(SPH_MATCH_ANY);
+ }
+
+ // Keep quotes and new lines
+ $keywords = str_replace(array('&quot;', "\n"), array('"', ' '), trim($keywords));
+
+ if (strlen($keywords) > 0)
+ {
+ $this->search_query = str_replace('"', '&quot;', $keywords);
+ return true;
+ }
+
+ return false;
+ }
+
+ /**
+ * Performs a search on keywords depending on display specific params. You have to run split_keywords() first
+ *
+ * @param string $type contains either posts or topics depending on what should be searched for
+ * @param string $fields contains either titleonly (topic titles should be searched), msgonly (only message bodies should be searched), firstpost (only subject and body of the first post should be searched) or all (all post bodies and subjects should be searched)
+ * @param string $terms is either 'all' (use query as entered, words without prefix should default to "have to be in field") or 'any' (ignore search query parts and just return all posts that contain any of the specified words)
+ * @param array $sort_by_sql contains SQL code for the ORDER BY part of a query
+ * @param string $sort_key is the key of $sort_by_sql for the selected sorting
+ * @param string $sort_dir is either a or d representing ASC and DESC
+ * @param string $sort_days specifies the maximum amount of days a post may be old
+ * @param array $ex_fid_ary specifies an array of forum ids which should not be searched
+ * @param string $post_visibility specifies which types of posts the user can view in which forums
+ * @param int $topic_id is set to 0 or a topic id, if it is not 0 then only posts in this topic should be searched
+ * @param array $author_ary an array of author ids if the author should be ignored during the search the array is empty
+ * @param string $author_name specifies the author match, when ANONYMOUS is also a search-match
+ * @param array &$id_ary passed by reference, to be filled with ids for the page specified by $start and $per_page, should be ordered
+ * @param int $start indicates the first index of the page
+ * @param int $per_page number of ids each page is supposed to contain
+ * @return boolean|int total number of results
+ */
+ public function keyword_search($type, $fields, $terms, $sort_by_sql, $sort_key, $sort_dir, $sort_days, $ex_fid_ary, $post_visibility, $topic_id, $author_ary, $author_name, &$id_ary, &$start, $per_page)
+ {
+ // No keywords? No posts.
+ if (!strlen($this->search_query) && !sizeof($author_ary))
+ {
+ return false;
+ }
+
+ $id_ary = array();
+
+ $join_topic = ($type != 'posts');
+
+ // Sorting
+
+ if ($type == 'topics')
+ {
+ switch ($sort_key)
+ {
+ case 'a':
+ $this->sphinx->SetGroupBy('topic_id', SPH_GROUPBY_ATTR, 'poster_id ' . (($sort_dir == 'a') ? 'ASC' : 'DESC'));
+ break;
+
+ case 'f':
+ $this->sphinx->SetGroupBy('topic_id', SPH_GROUPBY_ATTR, 'forum_id ' . (($sort_dir == 'a') ? 'ASC' : 'DESC'));
+ break;
+
+ case 'i':
+
+ case 's':
+ $this->sphinx->SetGroupBy('topic_id', SPH_GROUPBY_ATTR, 'post_subject ' . (($sort_dir == 'a') ? 'ASC' : 'DESC'));
+ break;
+
+ case 't':
+
+ default:
+ $this->sphinx->SetGroupBy('topic_id', SPH_GROUPBY_ATTR, 'topic_last_post_time ' . (($sort_dir == 'a') ? 'ASC' : 'DESC'));
+ break;
+ }
+ }
+ else
+ {
+ switch ($sort_key)
+ {
+ case 'a':
+ $this->sphinx->SetSortMode(($sort_dir == 'a') ? SPH_SORT_ATTR_ASC : SPH_SORT_ATTR_DESC, 'poster_id');
+ break;
+
+ case 'f':
+ $this->sphinx->SetSortMode(($sort_dir == 'a') ? SPH_SORT_ATTR_ASC : SPH_SORT_ATTR_DESC, 'forum_id');
+ break;
+
+ case 'i':
+
+ case 's':
+ $this->sphinx->SetSortMode(($sort_dir == 'a') ? SPH_SORT_ATTR_ASC : SPH_SORT_ATTR_DESC, 'post_subject');
+ break;
+
+ case 't':
+
+ default:
+ $this->sphinx->SetSortMode(($sort_dir == 'a') ? SPH_SORT_ATTR_ASC : SPH_SORT_ATTR_DESC, 'post_time');
+ break;
+ }
+ }
+
+ // Most narrow filters first
+ if ($topic_id)
+ {
+ $this->sphinx->SetFilter('topic_id', array($topic_id));
+ }
+
+ $search_query_prefix = '';
+
+ switch ($fields)
+ {
+ case 'titleonly':
+ // Only search the title
+ if ($terms == 'all')
+ {
+ $search_query_prefix = '@title ';
+ }
+ // Weight for the title
+ $this->sphinx->SetFieldWeights(array("title" => 5, "data" => 1));
+ // 1 is first_post, 0 is not first post
+ $this->sphinx->SetFilter('topic_first_post', array(1));
+ break;
+
+ case 'msgonly':
+ // Only search the body
+ if ($terms == 'all')
+ {
+ $search_query_prefix = '@data ';
+ }
+ // Weight for the body
+ $this->sphinx->SetFieldWeights(array("title" => 1, "data" => 5));
+ break;
+
+ case 'firstpost':
+ // More relative weight for the title, also search the body
+ $this->sphinx->SetFieldWeights(array("title" => 5, "data" => 1));
+ // 1 is first_post, 0 is not first post
+ $this->sphinx->SetFilter('topic_first_post', array(1));
+ break;
+
+ default:
+ // More relative weight for the title, also search the body
+ $this->sphinx->SetFieldWeights(array("title" => 5, "data" => 1));
+ break;
+ }
+
+ if (sizeof($author_ary))
+ {
+ $this->sphinx->SetFilter('poster_id', $author_ary);
+ }
+
+ // As this is not simply possible at the moment, we limit the result to approved posts.
+ // This will make it impossible for moderators to search unapproved and softdeleted posts,
+ // but at least it will also cause the same for normal users.
+ $this->sphinx->SetFilter('post_visibility', array(ITEM_APPROVED));
+
+ if (sizeof($ex_fid_ary))
+ {
+ // All forums that a user is allowed to access
+ $fid_ary = array_unique(array_intersect(array_keys($this->auth->acl_getf('f_read', true)), array_keys($this->auth->acl_getf('f_search', true))));
+ // All forums that the user wants to and can search in
+ $search_forums = array_diff($fid_ary, $ex_fid_ary);
+
+ if (sizeof($search_forums))
+ {
+ $this->sphinx->SetFilter('forum_id', $search_forums);
+ }
+ }
+
+ $this->sphinx->SetFilter('deleted', array(0));
+
+ $this->sphinx->SetLimits($start, (int) $per_page, SPHINX_MAX_MATCHES);
+ $result = $this->sphinx->Query($search_query_prefix . str_replace('&quot;', '"', $this->search_query), $this->indexes);
+
+ // Could be connection to localhost:9312 failed (errno=111,
+ // msg=Connection refused) during rotate, retry if so
+ $retries = SPHINX_CONNECT_RETRIES;
+ while (!$result && (strpos($this->sphinx->GetLastError(), "errno=111,") !== false) && $retries--)
+ {
+ usleep(SPHINX_CONNECT_WAIT_TIME);
+ $result = $this->sphinx->Query($search_query_prefix . str_replace('&quot;', '"', $this->search_query), $this->indexes);
+ }
+
+ if ($this->sphinx->GetLastError())
+ {
+ add_log('critical', 'LOG_SPHINX_ERROR', $this->sphinx->GetLastError());
+ if ($this->auth->acl_get('a_'))
+ {
+ trigger_error($this->user->lang('SPHINX_SEARCH_FAILED', $this->sphinx->GetLastError()));
+ }
+ else
+ {
+ trigger_error($this->user->lang('SPHINX_SEARCH_FAILED_LOG'));
+ }
+ }
+
+ $result_count = $result['total_found'];
+
+ if ($result_count && $start >= $result_count)
+ {
+ $start = floor(($result_count - 1) / $per_page) * $per_page;
+
+ $this->sphinx->SetLimits((int) $start, (int) $per_page, SPHINX_MAX_MATCHES);
+ $result = $this->sphinx->Query($search_query_prefix . str_replace('&quot;', '"', $this->search_query), $this->indexes);
+
+ // Could be connection to localhost:9312 failed (errno=111,
+ // msg=Connection refused) during rotate, retry if so
+ $retries = SPHINX_CONNECT_RETRIES;
+ while (!$result && (strpos($this->sphinx->GetLastError(), "errno=111,") !== false) && $retries--)
+ {
+ usleep(SPHINX_CONNECT_WAIT_TIME);
+ $result = $this->sphinx->Query($search_query_prefix . str_replace('&quot;', '"', $this->search_query), $this->indexes);
+ }
+ }
+
+ $id_ary = array();
+ if (isset($result['matches']))
+ {
+ if ($type == 'posts')
+ {
+ $id_ary = array_keys($result['matches']);
+ }
+ else
+ {
+ foreach ($result['matches'] as $key => $value)
+ {
+ $id_ary[] = $value['attrs']['topic_id'];
+ }
+ }
+ }
+ else
+ {
+ return false;
+ }
+
+ $id_ary = array_slice($id_ary, 0, (int) $per_page);
+
+ return $result_count;
+ }
+
+ /**
+ * Performs a search on an author's posts without caring about message contents. Depends on display specific params
+ *
+ * @param string $type contains either posts or topics depending on what should be searched for
+ * @param boolean $firstpost_only if true, only topic starting posts will be considered
+ * @param array $sort_by_sql contains SQL code for the ORDER BY part of a query
+ * @param string $sort_key is the key of $sort_by_sql for the selected sorting
+ * @param string $sort_dir is either a or d representing ASC and DESC
+ * @param string $sort_days specifies the maximum amount of days a post may be old
+ * @param array $ex_fid_ary specifies an array of forum ids which should not be searched
+ * @param string $post_visibility specifies which types of posts the user can view in which forums
+ * @param int $topic_id is set to 0 or a topic id, if it is not 0 then only posts in this topic should be searched
+ * @param array $author_ary an array of author ids
+ * @param string $author_name specifies the author match, when ANONYMOUS is also a search-match
+ * @param array &$id_ary passed by reference, to be filled with ids for the page specified by $start and $per_page, should be ordered
+ * @param int $start indicates the first index of the page
+ * @param int $per_page number of ids each page is supposed to contain
+ * @return boolean|int total number of results
+ */
+ public function author_search($type, $firstpost_only, $sort_by_sql, $sort_key, $sort_dir, $sort_days, $ex_fid_ary, $post_visibility, $topic_id, $author_ary, $author_name, &$id_ary, $start, $per_page)
+ {
+ $this->search_query = '';
+
+ $this->sphinx->SetMatchMode(SPH_MATCH_FULLSCAN);
+ $fields = ($firstpost_only) ? 'firstpost' : 'all';
+ $terms = 'all';
+ return $this->keyword_search($type, $fields, $terms, $sort_by_sql, $sort_key, $sort_dir, $sort_days, $ex_fid_ary, $post_visibility, $topic_id, $author_ary, $author_name, $id_ary, $start, $per_page);
+ }
+
+ /**
+ * Updates wordlist and wordmatch tables when a message is posted or changed
+ *
+ * @param string $mode Contains the post mode: edit, post, reply, quote
+ * @param int $post_id The id of the post which is modified/created
+ * @param string &$message New or updated post content
+ * @param string &$subject New or updated post subject
+ * @param int $poster_id Post author's user id
+ * @param int $forum_id The id of the forum in which the post is located
+ */
+ public function index($mode, $post_id, &$message, &$subject, $poster_id, $forum_id)
+ {
+ if ($mode == 'edit')
+ {
+ $this->sphinx->UpdateAttributes($this->indexes, array('forum_id', 'poster_id'), array((int)$post_id => array((int)$forum_id, (int)$poster_id)));
+ }
+ else if ($mode != 'post' && $post_id)
+ {
+ // Update topic_last_post_time for full topic
+ $sql_array = array(
+ 'SELECT' => 'p1.post_id',
+ 'FROM' => array(
+ POSTS_TABLE => 'p1',
+ ),
+ 'LEFT_JOIN' => array(array(
+ 'FROM' => array(
+ POSTS_TABLE => 'p2'
+ ),
+ 'ON' => 'p1.topic_id = p2.topic_id',
+ )),
+ );
+
+ $sql = $this->db->sql_build_query('SELECT', $sql_array);
+ $result = $this->db->sql_query($sql);
+
+ $post_updates = array();
+ $post_time = time();
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ $post_updates[(int)$row['post_id']] = array($post_time);
+ }
+ $this->db->sql_freeresult($result);
+
+ if (sizeof($post_updates))
+ {
+ $this->sphinx->UpdateAttributes($this->indexes, array('topic_last_post_time'), $post_updates);
+ }
+ }
+ }
+
+ /**
+ * Delete a post from the index after it was deleted
+ */
+ public function index_remove($post_ids, $author_ids, $forum_ids)
+ {
+ $values = array();
+ foreach ($post_ids as $post_id)
+ {
+ $values[$post_id] = array(1);
+ }
+
+ $this->sphinx->UpdateAttributes($this->indexes, array('deleted'), $values);
+ }
+
+ /**
+ * Nothing needs to be destroyed
+ */
+ public function tidy($create = false)
+ {
+ set_config('search_last_gc', time(), true);
+ }
+
+ /**
+ * Create sphinx table
+ *
+ * @return string|bool error string is returned incase of errors otherwise false
+ */
+ public function create_index($acp_module, $u_action)
+ {
+ if (!$this->index_created())
+ {
+ $table_data = array(
+ 'COLUMNS' => array(
+ 'counter_id' => array('UINT', 0),
+ 'max_doc_id' => array('UINT', 0),
+ ),
+ 'PRIMARY_KEY' => 'counter_id',
+ );
+ $this->db_tools->sql_create_table(SPHINX_TABLE, $table_data);
+
+ $sql = 'TRUNCATE TABLE ' . SPHINX_TABLE;
+ $this->db->sql_query($sql);
+
+ $data = array(
+ 'counter_id' => '1',
+ 'max_doc_id' => '0',
+ );
+ $sql = 'INSERT INTO ' . SPHINX_TABLE . ' ' . $this->db->sql_build_array('INSERT', $data);
+ $this->db->sql_query($sql);
+ }
+
+ return false;
+ }
+
+ /**
+ * Drop sphinx table
+ *
+ * @return string|bool error string is returned incase of errors otherwise false
+ */
+ public function delete_index($acp_module, $u_action)
+ {
+ if (!$this->index_created())
+ {
+ return false;
+ }
+
+ $this->db_tools->sql_table_drop(SPHINX_TABLE);
+
+ return false;
+ }
+
+ /**
+ * Returns true if the sphinx table was created
+ *
+ * @return bool true if sphinx table was created
+ */
+ public function index_created($allow_new_files = true)
+ {
+ $created = false;
+
+ if ($this->db_tools->sql_table_exists(SPHINX_TABLE))
+ {
+ $created = true;
+ }
+
+ return $created;
+ }
+
+ /**
+ * Returns an associative array containing information about the indexes
+ *
+ * @return string|bool Language string of error false otherwise
+ */
+ public function index_stats()
+ {
+ if (empty($this->stats))
+ {
+ $this->get_stats();
+ }
+
+ return array(
+ $this->user->lang['FULLTEXT_SPHINX_MAIN_POSTS'] => ($this->index_created()) ? $this->stats['main_posts'] : 0,
+ $this->user->lang['FULLTEXT_SPHINX_DELTA_POSTS'] => ($this->index_created()) ? $this->stats['total_posts'] - $this->stats['main_posts'] : 0,
+ $this->user->lang['FULLTEXT_MYSQL_TOTAL_POSTS'] => ($this->index_created()) ? $this->stats['total_posts'] : 0,
+ );
+ }
+
+ /**
+ * Collects stats that can be displayed on the index maintenance page
+ */
+ protected function get_stats()
+ {
+ if ($this->index_created())
+ {
+ $sql = 'SELECT COUNT(post_id) as total_posts
+ FROM ' . POSTS_TABLE;
+ $result = $this->db->sql_query($sql);
+ $this->stats['total_posts'] = (int) $this->db->sql_fetchfield('total_posts');
+ $this->db->sql_freeresult($result);
+
+ $sql = 'SELECT COUNT(p.post_id) as main_posts
+ FROM ' . POSTS_TABLE . ' p, ' . SPHINX_TABLE . ' m
+ WHERE p.post_id <= m.max_doc_id
+ AND m.counter_id = 1';
+ $result = $this->db->sql_query($sql);
+ $this->stats['main_posts'] = (int) $this->db->sql_fetchfield('main_posts');
+ $this->db->sql_freeresult($result);
+ }
+ }
+
+ /**
+ * Returns a list of options for the ACP to display
+ *
+ * @return associative array containing template and config variables
+ */
+ public function acp()
+ {
+ $config_vars = array(
+ 'fulltext_sphinx_data_path' => 'string',
+ 'fulltext_sphinx_host' => 'string',
+ 'fulltext_sphinx_port' => 'string',
+ 'fulltext_sphinx_indexer_mem_limit' => 'int',
+ );
+
+ $tpl = '
+ <span class="error">' . $this->user->lang['FULLTEXT_SPHINX_CONFIGURE']. '</span>
+ <dl>
+ <dt><label for="fulltext_sphinx_data_path">' . $this->user->lang['FULLTEXT_SPHINX_DATA_PATH'] . $this->user->lang['COLON'] . '</label><br /><span>' . $this->user->lang['FULLTEXT_SPHINX_DATA_PATH_EXPLAIN'] . '</span></dt>
+ <dd><input id="fulltext_sphinx_data_path" type="text" size="40" maxlength="255" name="config[fulltext_sphinx_data_path]" value="' . $this->config['fulltext_sphinx_data_path'] . '" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="fulltext_sphinx_host">' . $this->user->lang['FULLTEXT_SPHINX_HOST'] . $this->user->lang['COLON'] . '</label><br /><span>' . $this->user->lang['FULLTEXT_SPHINX_HOST_EXPLAIN'] . '</span></dt>
+ <dd><input id="fulltext_sphinx_host" type="text" size="40" maxlength="255" name="config[fulltext_sphinx_host]" value="' . $this->config['fulltext_sphinx_host'] . '" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="fulltext_sphinx_port">' . $this->user->lang['FULLTEXT_SPHINX_PORT'] . $this->user->lang['COLON'] . '</label><br /><span>' . $this->user->lang['FULLTEXT_SPHINX_PORT_EXPLAIN'] . '</span></dt>
+ <dd><input id="fulltext_sphinx_port" type="number" size="4" maxlength="10" name="config[fulltext_sphinx_port]" value="' . $this->config['fulltext_sphinx_port'] . '" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="fulltext_sphinx_indexer_mem_limit">' . $this->user->lang['FULLTEXT_SPHINX_INDEXER_MEM_LIMIT'] . $this->user->lang['COLON'] . '</label><br /><span>' . $this->user->lang['FULLTEXT_SPHINX_INDEXER_MEM_LIMIT_EXPLAIN'] . '</span></dt>
+ <dd><input id="fulltext_sphinx_indexer_mem_limit" type="number" size="4" maxlength="10" name="config[fulltext_sphinx_indexer_mem_limit]" value="' . $this->config['fulltext_sphinx_indexer_mem_limit'] . '" /> ' . $this->user->lang['MIB'] . '</dd>
+ </dl>
+ <dl>
+ <dt><label for="fulltext_sphinx_config_file">' . $this->user->lang['FULLTEXT_SPHINX_CONFIG_FILE'] . $this->user->lang['COLON'] . '</label><br /><span>' . $this->user->lang['FULLTEXT_SPHINX_CONFIG_FILE_EXPLAIN'] . '</span></dt>
+ <dd>' . (($this->config_generate()) ? '<textarea readonly="readonly" rows="6" id="sphinx_config_data">' . htmlspecialchars($this->config_file_data) . '</textarea>' : $this->config_file_data) . '</dd>
+ <dl>
+ ';
+
+ // These are fields required in the config table
+ return array(
+ 'tpl' => $tpl,
+ 'config' => $config_vars
+ );
+ }
+}
diff --git a/phpBB/includes/search/index.htm b/phpBB/phpbb/search/index.htm
index ee1f723a7d..ee1f723a7d 100644
--- a/phpBB/includes/search/index.htm
+++ b/phpBB/phpbb/search/index.htm
diff --git a/phpBB/phpbb/search/sphinx/config.php b/phpBB/phpbb/search/sphinx/config.php
new file mode 100644
index 0000000000..cb8e4524df
--- /dev/null
+++ b/phpBB/phpbb/search/sphinx/config.php
@@ -0,0 +1,282 @@
+<?php
+/**
+*
+* @package search
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\search\sphinx;
+
+/**
+* \phpbb\search\sphinx\config
+* An object representing the sphinx configuration
+* Can read it from file and write it back out after modification
+* @package search
+*/
+class config
+{
+ private $sections = array();
+
+ /**
+ * Constructor which optionally loads data from a variable
+ *
+ * @param string $config_data Variable containing the sphinx configuration data
+ *
+ * @access public
+ */
+ function __construct($config_data)
+ {
+ if ($config_data != '')
+ {
+ $this->read($config_data);
+ }
+ }
+
+ /**
+ * Get a section object by its name
+ *
+ * @param string $name The name of the section that shall be returned
+ * @return \phpbb\search\sphinx\config_section The section object or null if none was found
+ *
+ * @access public
+ */
+ function get_section_by_name($name)
+ {
+ for ($i = 0, $size = sizeof($this->sections); $i < $size; $i++)
+ {
+ // Make sure this is really a section object and not a comment
+ if (($this->sections[$i] instanceof \phpbb\search\sphinx\config_section) && $this->sections[$i]->get_name() == $name)
+ {
+ return $this->sections[$i];
+ }
+ }
+ }
+
+ /**
+ * Appends a new empty section to the end of the config
+ *
+ * @param string $name The name for the new section
+ * @return \phpbb\search\sphinx\config_section The newly created section object
+ *
+ * @access public
+ */
+ function add_section($name)
+ {
+ $this->sections[] = new \phpbb\search\sphinx\config_section($name, '');
+ return $this->sections[sizeof($this->sections) - 1];
+ }
+
+ /**
+ * Reads the config file data
+ *
+ * @param string $config_data The config file data
+ *
+ * @access private
+ */
+ function read($config_data)
+ {
+ $this->sections = array();
+
+ $section = null;
+ $found_opening_bracket = false;
+ $in_value = false;
+
+ foreach ($config_data as $i => $line)
+ {
+ // If the value of a variable continues to the next line because the line
+ // break was escaped then we don't trim leading space but treat it as a part of the value
+ if ($in_value)
+ {
+ $line = rtrim($line);
+ }
+ else
+ {
+ $line = trim($line);
+ }
+
+ // If we're not inside a section look for one
+ if (!$section)
+ {
+ // Add empty lines and comments as comment objects to the section list
+ // that way they're not deleted when reassembling the file from the sections
+ if (!$line || $line[0] == '#')
+ {
+ $this->sections[] = new \phpbb\search\sphinx\config_comment($config_file[$i]);
+ continue;
+ }
+ else
+ {
+ // Otherwise we scan the line reading the section name until we find
+ // an opening curly bracket or a comment
+ $section_name = '';
+ $section_name_comment = '';
+ $found_opening_bracket = false;
+ for ($j = 0, $length = strlen($line); $j < $length; $j++)
+ {
+ if ($line[$j] == '#')
+ {
+ $section_name_comment = substr($line, $j);
+ break;
+ }
+
+ if ($found_opening_bracket)
+ {
+ continue;
+ }
+
+ if ($line[$j] == '{')
+ {
+ $found_opening_bracket = true;
+ continue;
+ }
+
+ $section_name .= $line[$j];
+ }
+
+ // And then we create the new section object
+ $section_name = trim($section_name);
+ $section = new \phpbb\search\sphinx\config_section($section_name, $section_name_comment);
+ }
+ }
+ else
+ {
+ // If we're looking for variables inside a section
+ $skip_first = false;
+
+ // If we're not in a value continuing over the line feed
+ if (!$in_value)
+ {
+ // Then add empty lines and comments as comment objects to the variable list
+ // of this section so they're not deleted on reassembly
+ if (!$line || $line[0] == '#')
+ {
+ $section->add_variable(new \phpbb\search\sphinx\config_comment($config_file[$i]));
+ continue;
+ }
+
+ // As long as we haven't yet actually found an opening bracket for this section
+ // we treat everything as comments so it's not deleted either
+ if (!$found_opening_bracket)
+ {
+ if ($line[0] == '{')
+ {
+ $skip_first = true;
+ $line = substr($line, 1);
+ $found_opening_bracket = true;
+ }
+ else
+ {
+ $section->add_variable(new \phpbb\search\sphinx\config_comment($config_file[$i]));
+ continue;
+ }
+ }
+ }
+
+ // If we did not find a comment in this line or still add to the previous
+ // line's value ...
+ if ($line || $in_value)
+ {
+ if (!$in_value)
+ {
+ $name = '';
+ $value = '';
+ $comment = '';
+ $found_assignment = false;
+ }
+ $in_value = false;
+ $end_section = false;
+
+ /* ... then we should prase this line char by char:
+ - first there's the variable name
+ - then an equal sign
+ - the variable value
+ - possibly a backslash before the linefeed in this case we need to continue
+ parsing the value in the next line
+ - a # indicating that the rest of the line is a comment
+ - a closing curly bracket indicating the end of this section*/
+ for ($j = 0, $length = strlen($line); $j < $length; $j++)
+ {
+ if ($line[$j] == '#')
+ {
+ $comment = substr($line, $j);
+ break;
+ }
+ else if ($line[$j] == '}')
+ {
+ $comment = substr($line, $j + 1);
+ $end_section = true;
+ break;
+ }
+ else if (!$found_assignment)
+ {
+ if ($line[$j] == '=')
+ {
+ $found_assignment = true;
+ }
+ else
+ {
+ $name .= $line[$j];
+ }
+ }
+ else
+ {
+ if ($line[$j] == '\\' && $j == $length - 1)
+ {
+ $value .= "\n";
+ $in_value = true;
+ // Go to the next line and keep processing the value in there
+ continue 2;
+ }
+ $value .= $line[$j];
+ }
+ }
+
+ // If a name and an equal sign were found then we have append a
+ // new variable object to the section
+ if ($name && $found_assignment)
+ {
+ $section->add_variable(new \phpbb\search\sphinx\config_variable(trim($name), trim($value), ($end_section) ? '' : $comment));
+ continue;
+ }
+
+ /* If we found a closing curly bracket this section has been completed
+ and we can append it to the section list and continue with looking for
+ the next section */
+ if ($end_section)
+ {
+ $section->set_end_comment($comment);
+ $this->sections[] = $section;
+ $section = null;
+ continue;
+ }
+ }
+
+ // If we did not find anything meaningful up to here, then just treat it
+ // as a comment
+ $comment = ($skip_first) ? "\t" . substr(ltrim($config_file[$i]), 1) : $config_file[$i];
+ $section->add_variable(new \phpbb\search\sphinx\config_comment($comment));
+ }
+ }
+
+ }
+
+ /**
+ * Returns the config data
+ *
+ * @return string $data The config data that is generated
+ *
+ * @access public
+ */
+ function get_data()
+ {
+ $data = "";
+ foreach ($this->sections as $section)
+ {
+ $data .= $section->to_string();
+ }
+
+ return $data;
+ }
+}
diff --git a/phpBB/phpbb/search/sphinx/config_comment.php b/phpBB/phpbb/search/sphinx/config_comment.php
new file mode 100644
index 0000000000..20b1c19af1
--- /dev/null
+++ b/phpBB/phpbb/search/sphinx/config_comment.php
@@ -0,0 +1,43 @@
+<?php
+/**
+*
+* @package search
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\search\sphinx;
+
+/**
+* \phpbb\search\sphinx\config_comment
+* Represents a comment inside the sphinx configuration
+*/
+class config_comment
+{
+ private $exact_string;
+
+ /**
+ * Create a new comment
+ *
+ * @param string $exact_string The content of the comment including newlines, leading whitespace, etc.
+ *
+ * @access public
+ */
+ function __construct($exact_string)
+ {
+ $this->exact_string = $exact_string;
+ }
+
+ /**
+ * Simply returns the comment as it was created
+ *
+ * @return string The exact string that was specified in the constructor
+ *
+ * @access public
+ */
+ function to_string()
+ {
+ return $this->exact_string;
+ }
+}
diff --git a/phpBB/phpbb/search/sphinx/config_section.php b/phpBB/phpbb/search/sphinx/config_section.php
new file mode 100644
index 0000000000..8f9253ec56
--- /dev/null
+++ b/phpBB/phpbb/search/sphinx/config_section.php
@@ -0,0 +1,156 @@
+<?php
+/**
+*
+* @package search
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\search\sphinx;
+
+/**
+* \phpbb\search\sphinx\config_section
+* Represents a single section inside the sphinx configuration
+*/
+class config_section
+{
+ private $name;
+ private $comment;
+ private $end_comment;
+ private $variables = array();
+
+ /**
+ * Construct a new section
+ *
+ * @param string $name Name of the section
+ * @param string $comment Comment that should be appended after the name in the
+ * textual format.
+ *
+ * @access public
+ */
+ function __construct($name, $comment)
+ {
+ $this->name = $name;
+ $this->comment = $comment;
+ $this->end_comment = '';
+ }
+
+ /**
+ * Add a variable object to the list of variables in this section
+ *
+ * @param \phpbb\search\sphinx\config_variable $variable The variable object
+ *
+ * @access public
+ */
+ function add_variable($variable)
+ {
+ $this->variables[] = $variable;
+ }
+
+ /**
+ * Adds a comment after the closing bracket in the textual representation
+ *
+ * @param string $end_comment
+ *
+ * @access public
+ */
+ function set_end_comment($end_comment)
+ {
+ $this->end_comment = $end_comment;
+ }
+
+ /**
+ * Getter for the name of this section
+ *
+ * @return string Section's name
+ *
+ * @access public
+ */
+ function get_name()
+ {
+ return $this->name;
+ }
+
+ /**
+ * Get a variable object by its name
+ *
+ * @param string $name The name of the variable that shall be returned
+ * @return \phpbb\search\sphinx\config_section The first variable object from this section with the
+ * given name or null if none was found
+ *
+ * @access public
+ */
+ function get_variable_by_name($name)
+ {
+ for ($i = 0, $size = sizeof($this->variables); $i < $size; $i++)
+ {
+ // Make sure this is a variable object and not a comment
+ if (($this->variables[$i] instanceof \phpbb\search\sphinx\config_variable) && $this->variables[$i]->get_name() == $name)
+ {
+ return $this->variables[$i];
+ }
+ }
+ }
+
+ /**
+ * Deletes all variables with the given name
+ *
+ * @param string $name The name of the variable objects that are supposed to be removed
+ *
+ * @access public
+ */
+ function delete_variables_by_name($name)
+ {
+ for ($i = 0, $size = sizeof($this->variables); $i < $size; $i++)
+ {
+ // Make sure this is a variable object and not a comment
+ if (($this->variables[$i] instanceof \phpbb\search\sphinx\config_variable) && $this->variables[$i]->get_name() == $name)
+ {
+ array_splice($this->variables, $i, 1);
+ $i--;
+ }
+ }
+ }
+
+ /**
+ * Create a new variable object and append it to the variable list of this section
+ *
+ * @param string $name The name for the new variable
+ * @param string $value The value for the new variable
+ * @return \phpbb\search\sphinx\config_variable Variable object that was created
+ *
+ * @access public
+ */
+ function create_variable($name, $value)
+ {
+ $this->variables[] = new \phpbb\search\sphinx\config_variable($name, $value, '');
+ return $this->variables[sizeof($this->variables) - 1];
+ }
+
+ /**
+ * Turns this object into a string which can be written to a config file
+ *
+ * @return string Config data in textual form, parsable for sphinx
+ *
+ * @access public
+ */
+ function to_string()
+ {
+ $content = $this->name . ' ' . $this->comment . "\n{\n";
+
+ // Make sure we don't get too many newlines after the opening bracket
+ while (trim($this->variables[0]->to_string()) == '')
+ {
+ array_shift($this->variables);
+ }
+
+ foreach ($this->variables as $variable)
+ {
+ $content .= $variable->to_string();
+ }
+ $content .= '}' . $this->end_comment . "\n";
+
+ return $content;
+ }
+}
diff --git a/phpBB/phpbb/search/sphinx/config_variable.php b/phpBB/phpbb/search/sphinx/config_variable.php
new file mode 100644
index 0000000000..c0f6d28dcc
--- /dev/null
+++ b/phpBB/phpbb/search/sphinx/config_variable.php
@@ -0,0 +1,74 @@
+<?php
+/**
+*
+* @package search
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\search\sphinx;
+
+/**
+* \phpbb\search\sphinx\config_variable
+* Represents a single variable inside the sphinx configuration
+*/
+class config_variable
+{
+ private $name;
+ private $value;
+ private $comment;
+
+ /**
+ * Constructs a new variable object
+ *
+ * @param string $name Name of the variable
+ * @param string $value Value of the variable
+ * @param string $comment Optional comment after the variable in the
+ * config file
+ *
+ * @access public
+ */
+ function __construct($name, $value, $comment)
+ {
+ $this->name = $name;
+ $this->value = $value;
+ $this->comment = $comment;
+ }
+
+ /**
+ * Getter for the variable's name
+ *
+ * @return string The variable object's name
+ *
+ * @access public
+ */
+ function get_name()
+ {
+ return $this->name;
+ }
+
+ /**
+ * Allows changing the variable's value
+ *
+ * @param string $value New value for this variable
+ *
+ * @access public
+ */
+ function set_value($value)
+ {
+ $this->value = $value;
+ }
+
+ /**
+ * Turns this object into a string readable by sphinx
+ *
+ * @return string Config data in textual form
+ *
+ * @access public
+ */
+ function to_string()
+ {
+ return "\t" . $this->name . ' = ' . str_replace("\n", " \\\n", $this->value) . ' ' . $this->comment . "\n";
+ }
+}
diff --git a/phpBB/includes/session.php b/phpBB/phpbb/session.php
index fe5357f32e..f530d30f1f 100644
--- a/phpBB/includes/session.php
+++ b/phpBB/phpbb/session.php
@@ -2,19 +2,12 @@
/**
*
* @package phpBB3
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
-/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
+namespace phpbb;
/**
* Session class
@@ -39,18 +32,20 @@ class session
*
* @param string $root_path current root path (phpbb_root_path)
*/
- function extract_current_page($root_path)
+ static function extract_current_page($root_path)
{
+ global $request, $symfony_request, $phpbb_filesystem;
+
$page_array = array();
// First of all, get the request uri...
- $script_name = (!empty($_SERVER['PHP_SELF'])) ? $_SERVER['PHP_SELF'] : getenv('PHP_SELF');
- $args = (!empty($_SERVER['QUERY_STRING'])) ? explode('&', $_SERVER['QUERY_STRING']) : explode('&', getenv('QUERY_STRING'));
+ $script_name = $symfony_request->getScriptName();
+ $args = explode('&', $symfony_request->getQueryString());
// If we are unable to get the script name we use REQUEST_URI as a failover and note it within the page array for easier support...
if (!$script_name)
{
- $script_name = (!empty($_SERVER['REQUEST_URI'])) ? $_SERVER['REQUEST_URI'] : getenv('REQUEST_URI');
+ $script_name = htmlspecialchars_decode($request->server('REQUEST_URI'));
$script_name = (($pos = strpos($script_name, '?')) !== false) ? substr($script_name, 0, $pos) : $script_name;
$page_array['failover'] = 1;
}
@@ -86,6 +81,12 @@ class session
$page_name = (substr($script_name, -1, 1) == '/') ? '' : basename($script_name);
$page_name = urlencode(htmlspecialchars($page_name));
+ $symfony_request_path = $phpbb_filesystem->clean_path($symfony_request->getPathInfo());
+ if ($symfony_request_path !== '/')
+ {
+ $page_name .= $symfony_request_path;
+ }
+
// current directory within the phpBB root (for example: adm)
$root_dirs = explode('/', str_replace('\\', '/', phpbb_realpath($root_path)));
$page_dirs = explode('/', str_replace('\\', '/', phpbb_realpath('./')));
@@ -102,10 +103,14 @@ class session
}
// Current page from phpBB root (for example: adm/index.php?i=10&b=2)
- $page = (($page_dir) ? $page_dir . '/' : '') . $page_name . (($query_string) ? "?$query_string" : '');
+ $page = (($page_dir) ? $page_dir . '/' : '') . $page_name;
+ if ($query_string)
+ {
+ $page .= '?' . $query_string;
+ }
// The script path from the webroot to the current directory (for example: /phpBB3/adm/) : always prefixed with / and ends in /
- $script_path = trim(str_replace('\\', '/', dirname($script_name)));
+ $script_path = $symfony_request->getBasePath();
// The script path from the webroot to the phpBB root (for example: /phpBB3/)
$script_dirs = explode('/', $script_path);
@@ -130,7 +135,7 @@ class session
'root_script_path' => str_replace(' ', '%20', htmlspecialchars($root_script_path)),
'page' => $page,
- 'forum' => (isset($_REQUEST['f']) && $_REQUEST['f'] > 0) ? (int) $_REQUEST['f'] : 0,
+ 'forum' => request_var('f', 0),
);
return $page_array;
@@ -141,10 +146,10 @@ class session
*/
function extract_current_hostname()
{
- global $config;
+ global $config, $request;
// Get hostname
- $host = (!empty($_SERVER['HTTP_HOST'])) ? $_SERVER['HTTP_HOST'] : ((!empty($_SERVER['SERVER_NAME'])) ? $_SERVER['SERVER_NAME'] : getenv('SERVER_NAME'));
+ $host = htmlspecialchars_decode($request->header('Host', $request->server('SERVER_NAME')));
// Should be a string and lowered
$host = (string) strtolower($host);
@@ -206,14 +211,15 @@ class session
function session_begin($update_session_page = true)
{
global $phpEx, $SID, $_SID, $_EXTRA_URL, $db, $config, $phpbb_root_path;
+ global $request, $phpbb_container;
// Give us some basic information
$this->time_now = time();
$this->cookie_data = array('u' => 0, 'k' => '');
$this->update_session_page = $update_session_page;
- $this->browser = (!empty($_SERVER['HTTP_USER_AGENT'])) ? htmlspecialchars((string) $_SERVER['HTTP_USER_AGENT']) : '';
- $this->referer = (!empty($_SERVER['HTTP_REFERER'])) ? htmlspecialchars((string) $_SERVER['HTTP_REFERER']) : '';
- $this->forwarded_for = (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) ? htmlspecialchars((string) $_SERVER['HTTP_X_FORWARDED_FOR']) : '';
+ $this->browser = $request->header('User-Agent');
+ $this->referer = $request->header('Referer');
+ $this->forwarded_for = $request->header('X-Forwarded-For');
$this->host = $this->extract_current_hostname();
$this->page = $this->extract_current_page($phpbb_root_path);
@@ -241,7 +247,7 @@ class session
$this->forwarded_for = '';
}
- if (isset($_COOKIE[$config['cookie_name'] . '_sid']) || isset($_COOKIE[$config['cookie_name'] . '_u']))
+ if ($request->is_set($config['cookie_name'] . '_sid', \phpbb\request\request_interface::COOKIE) || $request->is_set($config['cookie_name'] . '_u', \phpbb\request\request_interface::COOKIE))
{
$this->cookie_data['u'] = request_var($config['cookie_name'] . '_u', 0, false, true);
$this->cookie_data['k'] = request_var($config['cookie_name'] . '_k', '', false, true);
@@ -267,7 +273,7 @@ class session
// Why no forwarded_for et al? Well, too easily spoofed. With the results of my recent requests
// it's pretty clear that in the majority of cases you'll at least be left with a proxy/cache ip.
- $this->ip = (!empty($_SERVER['REMOTE_ADDR'])) ? (string) $_SERVER['REMOTE_ADDR'] : '';
+ $this->ip = htmlspecialchars_decode($request->server('REMOTE_ADDR'));
$this->ip = preg_replace('# {2,}#', ' ', str_replace(',', ' ', $this->ip));
// split the list of IPs
@@ -278,6 +284,24 @@ class session
foreach ($ips as $ip)
{
+ if (function_exists('phpbb_ip_normalise'))
+ {
+ // Normalise IP address
+ $ip = phpbb_ip_normalise($ip);
+
+ if (empty($ip))
+ {
+ // IP address is invalid.
+ break;
+ }
+
+ // IP address is valid.
+ $this->ip = $ip;
+
+ // Skip legacy code.
+ continue;
+ }
+
if (preg_match(get_preg_expression('ipv4'), $ip))
{
$this->ip = $ip;
@@ -323,7 +347,8 @@ class session
}
// if no session id is set, redirect to index.php
- if (defined('NEED_SID') && (!isset($_GET['sid']) || $this->session_id !== $_GET['sid']))
+ $session_id = $request->variable('sid', '');
+ if (defined('NEED_SID') && (empty($session_id) || $this->session_id !== $session_id))
{
send_status_line(401, 'Unauthorized');
redirect(append_sid("{$phpbb_root_path}index.$phpEx"));
@@ -370,7 +395,7 @@ class session
$referer_valid = true;
// we assume HEAD and TRACE to be foul play and thus only whitelist GET
- if (@$config['referer_validation'] && isset($_SERVER['REQUEST_METHOD']) && strtolower($_SERVER['REQUEST_METHOD']) !== 'get')
+ if (@$config['referer_validation'] && strtolower($request->server('REQUEST_METHOD')) !== 'get')
{
$referer_valid = $this->validate_referer($check_referer_path);
}
@@ -381,15 +406,18 @@ class session
// Check whether the session is still valid if we have one
$method = basename(trim($config['auth_method']));
- include_once($phpbb_root_path . 'includes/auth/auth_' . $method . '.' . $phpEx);
- $method = 'validate_session_' . $method;
- if (function_exists($method))
+ $provider = $phpbb_container->get('auth.provider.' . $method);
+
+ if (!($provider instanceof \phpbb\auth\provider\provider_interface))
{
- if (!$method($this->data))
- {
- $session_expired = true;
- }
+ throw new \RuntimeException($provider . ' must implement \phpbb\auth\provider\provider_interface');
+ }
+
+ $ret = $provider->validate_session($this->data);
+ if ($ret !== null && !$ret)
+ {
+ $session_expired = true;
}
if (!$session_expired)
@@ -424,9 +452,7 @@ class session
$db->sql_return_on_error(true);
- $sql = 'UPDATE ' . SESSIONS_TABLE . ' SET ' . $db->sql_build_array('UPDATE', $sql_ary) . "
- WHERE session_id = '" . $db->sql_escape($this->session_id) . "'";
- $result = $db->sql_query($sql);
+ $this->update_session($sql_ary);
$db->sql_return_on_error(false);
@@ -436,9 +462,7 @@ class session
{
unset($sql_ary['session_forum_id']);
- $sql = 'UPDATE ' . SESSIONS_TABLE . ' SET ' . $db->sql_build_array('UPDATE', $sql_ary) . "
- WHERE session_id = '" . $db->sql_escape($this->session_id) . "'";
- $db->sql_query($sql);
+ $this->update_session($sql_ary);
}
if ($this->data['user_id'] != ANONYMOUS && !empty($config['new_member_post_limit']) && $this->data['user_new'] && $config['new_member_post_limit'] <= $this->data['user_posts'])
@@ -457,7 +481,7 @@ class session
else
{
// Added logging temporarly to help debug bugs...
- if (defined('DEBUG_EXTRA') && $this->data['user_id'] != ANONYMOUS)
+ if (defined('DEBUG') && $this->data['user_id'] != ANONYMOUS)
{
if ($referer_valid)
{
@@ -487,7 +511,7 @@ class session
*/
function session_create($user_id = false, $set_admin = false, $persist_login = false, $viewonline = true)
{
- global $SID, $_SID, $db, $config, $cache, $phpbb_root_path, $phpEx;
+ global $SID, $_SID, $db, $config, $cache, $phpbb_root_path, $phpEx, $phpbb_container;
$this->data = array();
@@ -551,18 +575,14 @@ class session
}
$method = basename(trim($config['auth_method']));
- include_once($phpbb_root_path . 'includes/auth/auth_' . $method . '.' . $phpEx);
- $method = 'autologin_' . $method;
- if (function_exists($method))
- {
- $this->data = $method();
+ $provider = $phpbb_container->get('auth.provider.' . $method);
+ $this->data = $provider->autologin();
- if (sizeof($this->data))
- {
- $this->cookie_data['k'] = '';
- $this->cookie_data['u'] = $this->data['user_id'];
- }
+ if (sizeof($this->data))
+ {
+ $this->cookie_data['k'] = '';
+ $this->cookie_data['u'] = $this->data['user_id'];
}
// If we're presented with an autologin key we'll join against it.
@@ -705,9 +725,7 @@ class session
$sql_ary['session_forum_id'] = $this->page['forum'];
}
- $sql = 'UPDATE ' . SESSIONS_TABLE . ' SET ' . $db->sql_build_array('UPDATE', $sql_ary) . "
- WHERE session_id = '" . $db->sql_escape($this->session_id) . "'";
- $db->sql_query($sql);
+ $this->update_session($sql_ary);
// Update the last visit time
$sql = 'UPDATE ' . USERS_TABLE . '
@@ -869,7 +887,7 @@ class session
*/
function session_kill($new_session = true)
{
- global $SID, $_SID, $db, $config, $phpbb_root_path, $phpEx;
+ global $SID, $_SID, $db, $config, $phpbb_root_path, $phpEx, $phpbb_container;
$sql = 'DELETE FROM ' . SESSIONS_TABLE . "
WHERE session_id = '" . $db->sql_escape($this->session_id) . "'
@@ -878,13 +896,9 @@ class session
// Allow connecting logout with external auth method logout
$method = basename(trim($config['auth_method']));
- include_once($phpbb_root_path . 'includes/auth/auth_' . $method . '.' . $phpEx);
- $method = 'logout_' . $method;
- if (function_exists($method))
- {
- $method($this->data, $new_session);
- }
+ $provider = $phpbb_container->get('auth.provider.' . $method);
+ $provider->logout($this->data, $new_session);
if ($this->data['user_id'] != ANONYMOUS)
{
@@ -1008,11 +1022,12 @@ class session
}
// only called from CRON; should be a safe workaround until the infrastructure gets going
- if (!class_exists('phpbb_captcha_factory'))
+ if (!class_exists('phpbb_captcha_factory', false))
{
include($phpbb_root_path . "includes/captcha/captcha_factory." . $phpEx);
}
- phpbb_captcha_factory::garbage_collect($config['captcha_plugin']);
+ $captcha_factory = new \phpbb_captcha_factory();
+ $captcha_factory->garbage_collect($config['captcha_plugin']);
$sql = 'DELETE FROM ' . LOGIN_ATTEMPT_TABLE . '
WHERE attempt_time < ' . (time() - (int) $config['ip_login_limit_time']);
@@ -1212,7 +1227,6 @@ class session
$this->session_create(ANONYMOUS);
}
-
// Determine which message to output
$till_date = ($ban_row['ban_end']) ? $this->format_date($ban_row['ban_end']) : '';
$message = ($ban_row['ban_end']) ? 'BOARD_BAN_TIME' : 'BOARD_BAN_PERM';
@@ -1443,7 +1457,7 @@ class session
*/
function validate_referer($check_script_path = false)
{
- global $config;
+ global $config, $request;
// no referer - nothing to validate, user's fault for turning it off (we only check on POST; so meta can't be the reason)
if (empty($this->referer) || empty($this->host))
@@ -1461,7 +1475,7 @@ class session
else if ($check_script_path && rtrim($this->page['root_script_path'], '/') !== '')
{
$ref = substr($ref, strlen($host));
- $server_port = (!empty($_SERVER['SERVER_PORT'])) ? (int) $_SERVER['SERVER_PORT'] : (int) getenv('SERVER_PORT');
+ $server_port = $request->server('SERVER_PORT', 0);
if ($server_port !== 80 && $server_port !== 443 && stripos($ref, ":$server_port") === 0)
{
@@ -1486,974 +1500,21 @@ class session
WHERE session_id = \'' . $db->sql_escape($this->session_id) . '\'';
$db->sql_query($sql);
}
-}
-
-
-/**
-* Base user class
-*
-* This is the overarching class which contains (through session extend)
-* all methods utilised for user functionality during a session.
-*
-* @package phpBB3
-*/
-class user extends session
-{
- var $lang = array();
- var $help = array();
- var $theme = array();
- var $date_format;
- var $timezone;
- var $dst;
-
- var $lang_name = false;
- var $lang_id = false;
- var $lang_path;
- var $img_lang;
- var $img_array = array();
-
- // Able to add new options (up to id 31)
- var $keyoptions = array('viewimg' => 0, 'viewflash' => 1, 'viewsmilies' => 2, 'viewsigs' => 3, 'viewavatars' => 4, 'viewcensors' => 5, 'attachsig' => 6, 'bbcode' => 8, 'smilies' => 9, 'popuppm' => 10, 'sig_bbcode' => 15, 'sig_smilies' => 16, 'sig_links' => 17);
-
- /**
- * Constructor to set the lang path
- */
- function user()
- {
- global $phpbb_root_path;
-
- $this->lang_path = $phpbb_root_path . 'language/';
- }
-
- /**
- * Function to set custom language path (able to use directory outside of phpBB)
- *
- * @param string $lang_path New language path used.
- * @access public
- */
- function set_custom_lang_path($lang_path)
- {
- $this->lang_path = $lang_path;
-
- if (substr($this->lang_path, -1) != '/')
- {
- $this->lang_path .= '/';
- }
- }
-
- /**
- * Setup basic user-specific items (style, language, ...)
- */
- function setup($lang_set = false, $style = false)
- {
- global $db, $template, $config, $auth, $phpEx, $phpbb_root_path, $cache;
-
- if ($this->data['user_id'] != ANONYMOUS)
- {
- $this->lang_name = (file_exists($this->lang_path . $this->data['user_lang'] . "/common.$phpEx")) ? $this->data['user_lang'] : basename($config['default_lang']);
-
- $this->date_format = $this->data['user_dateformat'];
- $this->timezone = $this->data['user_timezone'] * 3600;
- $this->dst = $this->data['user_dst'] * 3600;
- }
- else
- {
- $this->lang_name = basename($config['default_lang']);
- $this->date_format = $config['default_dateformat'];
- $this->timezone = $config['board_timezone'] * 3600;
- $this->dst = $config['board_dst'] * 3600;
-
- /**
- * If a guest user is surfing, we try to guess his/her language first by obtaining the browser language
- * If re-enabled we need to make sure only those languages installed are checked
- * Commented out so we do not loose the code.
-
- if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE']))
- {
- $accept_lang_ary = explode(',', $_SERVER['HTTP_ACCEPT_LANGUAGE']);
-
- foreach ($accept_lang_ary as $accept_lang)
- {
- // Set correct format ... guess full xx_YY form
- $accept_lang = substr($accept_lang, 0, 2) . '_' . strtoupper(substr($accept_lang, 3, 2));
- $accept_lang = basename($accept_lang);
-
- if (file_exists($this->lang_path . $accept_lang . "/common.$phpEx"))
- {
- $this->lang_name = $config['default_lang'] = $accept_lang;
- break;
- }
- else
- {
- // No match on xx_YY so try xx
- $accept_lang = substr($accept_lang, 0, 2);
- $accept_lang = basename($accept_lang);
-
- if (file_exists($this->lang_path . $accept_lang . "/common.$phpEx"))
- {
- $this->lang_name = $config['default_lang'] = $accept_lang;
- break;
- }
- }
- }
- }
- */
- }
-
- // We include common language file here to not load it every time a custom language file is included
- $lang = &$this->lang;
-
- // Do not suppress error if in DEBUG_EXTRA mode
- $include_result = (defined('DEBUG_EXTRA')) ? (include $this->lang_path . $this->lang_name . "/common.$phpEx") : (@include $this->lang_path . $this->lang_name . "/common.$phpEx");
-
- if ($include_result === false)
- {
- die('Language file ' . $this->lang_path . $this->lang_name . "/common.$phpEx" . " couldn't be opened.");
- }
-
- $this->add_lang($lang_set);
- unset($lang_set);
-
- if (!empty($_GET['style']) && $auth->acl_get('a_styles') && !defined('ADMIN_START'))
- {
- global $SID, $_EXTRA_URL;
-
- $style = request_var('style', 0);
- $SID .= '&amp;style=' . $style;
- $_EXTRA_URL = array('style=' . $style);
- }
- else
- {
- // Set up style
- $style = ($style) ? $style : ((!$config['override_user_style']) ? $this->data['user_style'] : $config['default_style']);
- }
-
- $sql = 'SELECT s.style_id, t.template_storedb, t.template_path, t.template_id, t.bbcode_bitfield, t.template_inherits_id, t.template_inherit_path, c.theme_path, c.theme_name, c.theme_storedb, c.theme_id, i.imageset_path, i.imageset_id, i.imageset_name
- FROM ' . STYLES_TABLE . ' s, ' . STYLES_TEMPLATE_TABLE . ' t, ' . STYLES_THEME_TABLE . ' c, ' . STYLES_IMAGESET_TABLE . " i
- WHERE s.style_id = $style
- AND t.template_id = s.template_id
- AND c.theme_id = s.theme_id
- AND i.imageset_id = s.imageset_id";
- $result = $db->sql_query($sql, 3600);
- $this->theme = $db->sql_fetchrow($result);
- $db->sql_freeresult($result);
-
- // User has wrong style
- if (!$this->theme && $style == $this->data['user_style'])
- {
- $style = $this->data['user_style'] = $config['default_style'];
-
- $sql = 'UPDATE ' . USERS_TABLE . "
- SET user_style = $style
- WHERE user_id = {$this->data['user_id']}";
- $db->sql_query($sql);
-
- $sql = 'SELECT s.style_id, t.template_storedb, t.template_path, t.template_id, t.bbcode_bitfield, c.theme_path, c.theme_name, c.theme_storedb, c.theme_id, i.imageset_path, i.imageset_id, i.imageset_name
- FROM ' . STYLES_TABLE . ' s, ' . STYLES_TEMPLATE_TABLE . ' t, ' . STYLES_THEME_TABLE . ' c, ' . STYLES_IMAGESET_TABLE . " i
- WHERE s.style_id = $style
- AND t.template_id = s.template_id
- AND c.theme_id = s.theme_id
- AND i.imageset_id = s.imageset_id";
- $result = $db->sql_query($sql, 3600);
- $this->theme = $db->sql_fetchrow($result);
- $db->sql_freeresult($result);
- }
-
- if (!$this->theme)
- {
- trigger_error('NO_STYLE_DATA', E_USER_ERROR);
- }
-
- // Now parse the cfg file and cache it
- $parsed_items = $cache->obtain_cfg_items($this->theme);
-
- // We are only interested in the theme configuration for now
- $parsed_items = $parsed_items['theme'];
-
- $check_for = array(
- 'parse_css_file' => (int) 0,
- 'pagination_sep' => (string) ', '
- );
-
- foreach ($check_for as $key => $default_value)
- {
- $this->theme[$key] = (isset($parsed_items[$key])) ? $parsed_items[$key] : $default_value;
- settype($this->theme[$key], gettype($default_value));
-
- if (is_string($default_value))
- {
- $this->theme[$key] = htmlspecialchars($this->theme[$key]);
- }
- }
-
- // If the style author specified the theme needs to be cached
- // (because of the used paths and variables) than make sure it is the case.
- // For example, if the theme uses language-specific images it needs to be stored in db.
- if (!$this->theme['theme_storedb'] && $this->theme['parse_css_file'])
- {
- $this->theme['theme_storedb'] = 1;
-
- $stylesheet = file_get_contents("{$phpbb_root_path}styles/{$this->theme['theme_path']}/theme/stylesheet.css");
- // Match CSS imports
- $matches = array();
- preg_match_all('/@import url\(["\'](.*)["\']\);/i', $stylesheet, $matches);
-
- if (sizeof($matches))
- {
- $content = '';
- foreach ($matches[0] as $idx => $match)
- {
- if ($content = @file_get_contents("{$phpbb_root_path}styles/{$this->theme['theme_path']}/theme/" . $matches[1][$idx]))
- {
- $content = trim($content);
- }
- else
- {
- $content = '';
- }
- $stylesheet = str_replace($match, $content, $stylesheet);
- }
- unset($content);
- }
-
- $stylesheet = str_replace('./', 'styles/' . $this->theme['theme_path'] . '/theme/', $stylesheet);
-
- $sql_ary = array(
- 'theme_data' => $stylesheet,
- 'theme_mtime' => time(),
- 'theme_storedb' => 1
- );
-
- $sql = 'UPDATE ' . STYLES_THEME_TABLE . '
- SET ' . $db->sql_build_array('UPDATE', $sql_ary) . '
- WHERE theme_id = ' . $this->theme['theme_id'];
- $db->sql_query($sql);
-
- unset($sql_ary);
- }
-
- $template->set_template();
-
- $this->img_lang = (file_exists($phpbb_root_path . 'styles/' . $this->theme['imageset_path'] . '/imageset/' . $this->lang_name)) ? $this->lang_name : $config['default_lang'];
-
- // Same query in style.php
- $sql = 'SELECT *
- FROM ' . STYLES_IMAGESET_DATA_TABLE . '
- WHERE imageset_id = ' . $this->theme['imageset_id'] . "
- AND image_filename <> ''
- AND image_lang IN ('" . $db->sql_escape($this->img_lang) . "', '')";
- $result = $db->sql_query($sql, 3600);
-
- $localised_images = false;
- while ($row = $db->sql_fetchrow($result))
- {
- if ($row['image_lang'])
- {
- $localised_images = true;
- }
-
- $row['image_filename'] = rawurlencode($row['image_filename']);
- $this->img_array[$row['image_name']] = $row;
- }
- $db->sql_freeresult($result);
-
- // there were no localised images, try to refresh the localised imageset for the user's language
- if (!$localised_images)
- {
- // Attention: this code ignores the image definition list from acp_styles and just takes everything
- // that the config file contains
- $sql_ary = array();
-
- $db->sql_transaction('begin');
-
- $sql = 'DELETE FROM ' . STYLES_IMAGESET_DATA_TABLE . '
- WHERE imageset_id = ' . $this->theme['imageset_id'] . '
- AND image_lang = \'' . $db->sql_escape($this->img_lang) . '\'';
- $result = $db->sql_query($sql);
-
- if (@file_exists("{$phpbb_root_path}styles/{$this->theme['imageset_path']}/imageset/{$this->img_lang}/imageset.cfg"))
- {
- $cfg_data_imageset_data = parse_cfg_file("{$phpbb_root_path}styles/{$this->theme['imageset_path']}/imageset/{$this->img_lang}/imageset.cfg");
- foreach ($cfg_data_imageset_data as $image_name => $value)
- {
- if (strpos($value, '*') !== false)
- {
- if (substr($value, -1, 1) === '*')
- {
- list($image_filename, $image_height) = explode('*', $value);
- $image_width = 0;
- }
- else
- {
- list($image_filename, $image_height, $image_width) = explode('*', $value);
- }
- }
- else
- {
- $image_filename = $value;
- $image_height = $image_width = 0;
- }
-
- if (strpos($image_name, 'img_') === 0 && $image_filename)
- {
- $image_name = substr($image_name, 4);
- $sql_ary[] = array(
- 'image_name' => (string) $image_name,
- 'image_filename' => (string) $image_filename,
- 'image_height' => (int) $image_height,
- 'image_width' => (int) $image_width,
- 'imageset_id' => (int) $this->theme['imageset_id'],
- 'image_lang' => (string) $this->img_lang,
- );
- }
- }
- }
-
- if (sizeof($sql_ary))
- {
- $db->sql_multi_insert(STYLES_IMAGESET_DATA_TABLE, $sql_ary);
- $db->sql_transaction('commit');
- $cache->destroy('sql', STYLES_IMAGESET_DATA_TABLE);
-
- add_log('admin', 'LOG_IMAGESET_LANG_REFRESHED', $this->theme['imageset_name'], $this->img_lang);
- }
- else
- {
- $db->sql_transaction('commit');
- add_log('admin', 'LOG_IMAGESET_LANG_MISSING', $this->theme['imageset_name'], $this->img_lang);
- }
- }
-
- // Call phpbb_user_session_handler() in case external application want to "bend" some variables or replace classes...
- // After calling it we continue script execution...
- phpbb_user_session_handler();
-
- // If this function got called from the error handler we are finished here.
- if (defined('IN_ERROR_HANDLER'))
- {
- return;
- }
-
- // Disable board if the install/ directory is still present
- // For the brave development army we do not care about this, else we need to comment out this everytime we develop locally
- if (!defined('DEBUG_EXTRA') && !defined('ADMIN_START') && !defined('IN_INSTALL') && !defined('IN_LOGIN') && file_exists($phpbb_root_path . 'install') && !is_file($phpbb_root_path . 'install'))
- {
- // Adjust the message slightly according to the permissions
- if ($auth->acl_gets('a_', 'm_') || $auth->acl_getf_global('m_'))
- {
- $message = 'REMOVE_INSTALL';
- }
- else
- {
- $message = (!empty($config['board_disable_msg'])) ? $config['board_disable_msg'] : 'BOARD_DISABLE';
- }
- trigger_error($message);
- }
-
- // Is board disabled and user not an admin or moderator?
- if ($config['board_disable'] && !defined('IN_LOGIN') && !$auth->acl_gets('a_', 'm_') && !$auth->acl_getf_global('m_'))
- {
- if ($this->data['is_bot'])
- {
- send_status_line(503, 'Service Unavailable');
- }
-
- $message = (!empty($config['board_disable_msg'])) ? $config['board_disable_msg'] : 'BOARD_DISABLE';
- trigger_error($message);
- }
-
- // Is load exceeded?
- if ($config['limit_load'] && $this->load !== false)
- {
- if ($this->load > floatval($config['limit_load']) && !defined('IN_LOGIN') && !defined('IN_ADMIN'))
- {
- // Set board disabled to true to let the admins/mods get the proper notification
- $config['board_disable'] = '1';
-
- if (!$auth->acl_gets('a_', 'm_') && !$auth->acl_getf_global('m_'))
- {
- if ($this->data['is_bot'])
- {
- send_status_line(503, 'Service Unavailable');
- }
- trigger_error('BOARD_UNAVAILABLE');
- }
- }
- }
-
- if (isset($this->data['session_viewonline']))
- {
- // Make sure the user is able to hide his session
- if (!$this->data['session_viewonline'])
- {
- // Reset online status if not allowed to hide the session...
- if (!$auth->acl_get('u_hideonline'))
- {
- $sql = 'UPDATE ' . SESSIONS_TABLE . '
- SET session_viewonline = 1
- WHERE session_user_id = ' . $this->data['user_id'];
- $db->sql_query($sql);
- $this->data['session_viewonline'] = 1;
- }
- }
- else if (!$this->data['user_allow_viewonline'])
- {
- // the user wants to hide and is allowed to -> cloaking device on.
- if ($auth->acl_get('u_hideonline'))
- {
- $sql = 'UPDATE ' . SESSIONS_TABLE . '
- SET session_viewonline = 0
- WHERE session_user_id = ' . $this->data['user_id'];
- $db->sql_query($sql);
- $this->data['session_viewonline'] = 0;
- }
- }
- }
-
-
- // Does the user need to change their password? If so, redirect to the
- // ucp profile reg_details page ... of course do not redirect if we're already in the ucp
- if (!defined('IN_ADMIN') && !defined('ADMIN_START') && $config['chg_passforce'] && !empty($this->data['is_registered']) && $auth->acl_get('u_chgpasswd') && $this->data['user_passchg'] < time() - ($config['chg_passforce'] * 86400))
- {
- if (strpos($this->page['query_string'], 'mode=reg_details') === false && $this->page['page_name'] != "ucp.$phpEx")
- {
- redirect(append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=profile&amp;mode=reg_details'));
- }
- }
-
- return;
- }
/**
- * More advanced language substitution
- * Function to mimic sprintf() with the possibility of using phpBB's language system to substitute nullar/singular/plural forms.
- * Params are the language key and the parameters to be substituted.
- * This function/functionality is inspired by SHS` and Ashe.
+ * Update the session data
*
- * Example call: <samp>$user->lang('NUM_POSTS_IN_QUEUE', 1);</samp>
+ * @param array $session_data associative array of session keys to be updated
+ * @param string $session_id optional session_id, defaults to current user's session_id
*/
- function lang()
- {
- $args = func_get_args();
- $key = $args[0];
-
- if (is_array($key))
- {
- $lang = &$this->lang[array_shift($key)];
-
- foreach ($key as $_key)
- {
- $lang = &$lang[$_key];
- }
- }
- else
- {
- $lang = &$this->lang[$key];
- }
-
- // Return if language string does not exist
- if (!isset($lang) || (!is_string($lang) && !is_array($lang)))
- {
- return $key;
- }
-
- // If the language entry is a string, we simply mimic sprintf() behaviour
- if (is_string($lang))
- {
- if (sizeof($args) == 1)
- {
- return $lang;
- }
-
- // Replace key with language entry and simply pass along...
- $args[0] = $lang;
- return call_user_func_array('sprintf', $args);
- }
-
- // It is an array... now handle different nullar/singular/plural forms
- $key_found = false;
-
- // We now get the first number passed and will select the key based upon this number
- for ($i = 1, $num_args = sizeof($args); $i < $num_args; $i++)
- {
- if (is_int($args[$i]))
- {
- $numbers = array_keys($lang);
-
- foreach ($numbers as $num)
- {
- if ($num > $args[$i])
- {
- break;
- }
-
- $key_found = $num;
- }
- break;
- }
- }
-
- // Ok, let's check if the key was found, else use the last entry (because it is mostly the plural form)
- if ($key_found === false)
- {
- $numbers = array_keys($lang);
- $key_found = end($numbers);
- }
-
- // Use the language string we determined and pass it to sprintf()
- $args[0] = $lang[$key_found];
- return call_user_func_array('sprintf', $args);
- }
-
- /**
- * Add Language Items - use_db and use_help are assigned where needed (only use them to force inclusion)
- *
- * @param mixed $lang_set specifies the language entries to include
- * @param bool $use_db internal variable for recursion, do not use
- * @param bool $use_help internal variable for recursion, do not use
- *
- * Examples:
- * <code>
- * $lang_set = array('posting', 'help' => 'faq');
- * $lang_set = array('posting', 'viewtopic', 'help' => array('bbcode', 'faq'))
- * $lang_set = array(array('posting', 'viewtopic'), 'help' => array('bbcode', 'faq'))
- * $lang_set = 'posting'
- * $lang_set = array('help' => 'faq', 'db' => array('help:faq', 'posting'))
- * </code>
- */
- function add_lang($lang_set, $use_db = false, $use_help = false)
- {
- global $phpEx;
-
- if (is_array($lang_set))
- {
- foreach ($lang_set as $key => $lang_file)
- {
- // Please do not delete this line.
- // We have to force the type here, else [array] language inclusion will not work
- $key = (string) $key;
-
- if ($key == 'db')
- {
- $this->add_lang($lang_file, true, $use_help);
- }
- else if ($key == 'help')
- {
- $this->add_lang($lang_file, $use_db, true);
- }
- else if (!is_array($lang_file))
- {
- $this->set_lang($this->lang, $this->help, $lang_file, $use_db, $use_help);
- }
- else
- {
- $this->add_lang($lang_file, $use_db, $use_help);
- }
- }
- unset($lang_set);
- }
- else if ($lang_set)
- {
- $this->set_lang($this->lang, $this->help, $lang_set, $use_db, $use_help);
- }
- }
-
- /**
- * Set language entry (called by add_lang)
- * @access private
- */
- function set_lang(&$lang, &$help, $lang_file, $use_db = false, $use_help = false)
- {
- global $phpEx;
-
- // Make sure the language name is set (if the user setup did not happen it is not set)
- if (!$this->lang_name)
- {
- global $config;
- $this->lang_name = basename($config['default_lang']);
- }
-
- // $lang == $this->lang
- // $help == $this->help
- // - add appropriate variables here, name them as they are used within the language file...
- if (!$use_db)
- {
- if ($use_help && strpos($lang_file, '/') !== false)
- {
- $language_filename = $this->lang_path . $this->lang_name . '/' . substr($lang_file, 0, stripos($lang_file, '/') + 1) . 'help_' . substr($lang_file, stripos($lang_file, '/') + 1) . '.' . $phpEx;
- }
- else
- {
- $language_filename = $this->lang_path . $this->lang_name . '/' . (($use_help) ? 'help_' : '') . $lang_file . '.' . $phpEx;
- }
-
- if (!file_exists($language_filename))
- {
- global $config;
-
- if ($this->lang_name == 'en')
- {
- // The user's selected language is missing the file, the board default's language is missing the file, and the file doesn't exist in /en.
- $language_filename = str_replace($this->lang_path . 'en', $this->lang_path . $this->data['user_lang'], $language_filename);
- trigger_error('Language file ' . $language_filename . ' couldn\'t be opened.', E_USER_ERROR);
- }
- else if ($this->lang_name == basename($config['default_lang']))
- {
- // Fall back to the English Language
- $this->lang_name = 'en';
- $this->set_lang($lang, $help, $lang_file, $use_db, $use_help);
- }
- else if ($this->lang_name == $this->data['user_lang'])
- {
- // Fall back to the board default language
- $this->lang_name = basename($config['default_lang']);
- $this->set_lang($lang, $help, $lang_file, $use_db, $use_help);
- }
-
- // Reset the lang name
- $this->lang_name = (file_exists($this->lang_path . $this->data['user_lang'] . "/common.$phpEx")) ? $this->data['user_lang'] : basename($config['default_lang']);
- return;
- }
-
- // Do not suppress error if in DEBUG_EXTRA mode
- $include_result = (defined('DEBUG_EXTRA')) ? (include $language_filename) : (@include $language_filename);
-
- if ($include_result === false)
- {
- trigger_error('Language file ' . $language_filename . ' couldn\'t be opened.', E_USER_ERROR);
- }
- }
- else if ($use_db)
- {
- // Get Database Language Strings
- // Put them into $lang if nothing is prefixed, put them into $help if help: is prefixed
- // For example: help:faq, posting
- }
- }
-
- /**
- * Format user date
- *
- * @param int $gmepoch unix timestamp
- * @param string $format date format in date() notation. | used to indicate relative dates, for example |d m Y|, h:i is translated to Today, h:i.
- * @param bool $forcedate force non-relative date format.
- *
- * @return mixed translated date
- */
- function format_date($gmepoch, $format = false, $forcedate = false)
- {
- static $midnight;
- static $date_cache;
-
- $format = (!$format) ? $this->date_format : $format;
- $now = time();
- $delta = $now - $gmepoch;
-
- if (!isset($date_cache[$format]))
- {
- // Is the user requesting a friendly date format (i.e. 'Today 12:42')?
- $date_cache[$format] = array(
- 'is_short' => strpos($format, '|'),
- 'format_short' => substr($format, 0, strpos($format, '|')) . '||' . substr(strrchr($format, '|'), 1),
- 'format_long' => str_replace('|', '', $format),
- // Filter out values that are not strings (e.g. arrays) for strtr().
- 'lang' => array_filter($this->lang['datetime'], 'is_string'),
- );
-
- // Short representation of month in format? Some languages use different terms for the long and short format of May
- if ((strpos($format, '\M') === false && strpos($format, 'M') !== false) || (strpos($format, '\r') === false && strpos($format, 'r') !== false))
- {
- $date_cache[$format]['lang']['May'] = $this->lang['datetime']['May_short'];
- }
- }
-
- // Zone offset
- $zone_offset = $this->timezone + $this->dst;
-
- // Show date <= 1 hour ago as 'xx min ago' but not greater than 60 seconds in the future
- // A small tolerence is given for times in the future but in the same minute are displayed as '< than a minute ago'
- if ($delta <= 3600 && $delta > -60 && ($delta >= -5 || (($now / 60) % 60) == (($gmepoch / 60) % 60)) && $date_cache[$format]['is_short'] !== false && !$forcedate && isset($this->lang['datetime']['AGO']))
- {
- return $this->lang(array('datetime', 'AGO'), max(0, (int) floor($delta / 60)));
- }
-
- if (!$midnight)
- {
- list($d, $m, $y) = explode(' ', gmdate('j n Y', time() + $zone_offset));
- $midnight = gmmktime(0, 0, 0, $m, $d, $y) - $zone_offset;
- }
-
- if ($date_cache[$format]['is_short'] !== false && !$forcedate && !($gmepoch < $midnight - 86400 || $gmepoch > $midnight + 172800))
- {
- $day = false;
-
- if ($gmepoch > $midnight + 86400)
- {
- $day = 'TOMORROW';
- }
- else if ($gmepoch > $midnight)
- {
- $day = 'TODAY';
- }
- else if ($gmepoch > $midnight - 86400)
- {
- $day = 'YESTERDAY';
- }
-
- if ($day !== false)
- {
- return str_replace('||', $this->lang['datetime'][$day], strtr(@gmdate($date_cache[$format]['format_short'], $gmepoch + $zone_offset), $date_cache[$format]['lang']));
- }
- }
-
- return strtr(@gmdate($date_cache[$format]['format_long'], $gmepoch + $zone_offset), $date_cache[$format]['lang']);
- }
-
- /**
- * Get language id currently used by the user
- */
- function get_iso_lang_id()
- {
- global $config, $db;
-
- if (!empty($this->lang_id))
- {
- return $this->lang_id;
- }
-
- if (!$this->lang_name)
- {
- $this->lang_name = $config['default_lang'];
- }
-
- $sql = 'SELECT lang_id
- FROM ' . LANG_TABLE . "
- WHERE lang_iso = '" . $db->sql_escape($this->lang_name) . "'";
- $result = $db->sql_query($sql);
- $this->lang_id = (int) $db->sql_fetchfield('lang_id');
- $db->sql_freeresult($result);
-
- return $this->lang_id;
- }
-
- /**
- * Get users profile fields
- */
- function get_profile_fields($user_id)
- {
- global $db;
-
- if (isset($this->profile_fields))
- {
- return;
- }
-
- $sql = 'SELECT *
- FROM ' . PROFILE_FIELDS_DATA_TABLE . "
- WHERE user_id = $user_id";
- $result = $db->sql_query_limit($sql, 1);
- $this->profile_fields = (!($row = $db->sql_fetchrow($result))) ? array() : $row;
- $db->sql_freeresult($result);
- }
-
- /**
- * Specify/Get image
- * $suffix is no longer used - we know it. ;) It is there for backward compatibility.
- */
- function img($img, $alt = '', $width = false, $suffix = '', $type = 'full_tag')
- {
- static $imgs;
- global $phpbb_root_path;
-
- $img_data = &$imgs[$img];
-
- if (empty($img_data))
- {
- if (!isset($this->img_array[$img]))
- {
- // Do not fill the image to let designers decide what to do if the image is empty
- $img_data = '';
- return $img_data;
- }
-
- // Use URL if told so
- $root_path = (defined('PHPBB_USE_BOARD_URL_PATH') && PHPBB_USE_BOARD_URL_PATH) ? generate_board_url() . '/' : $phpbb_root_path;
-
- $path = 'styles/' . rawurlencode($this->theme['imageset_path']) . '/imageset/' . ($this->img_array[$img]['image_lang'] ? $this->img_array[$img]['image_lang'] .'/' : '') . $this->img_array[$img]['image_filename'];
-
- $img_data['src'] = $root_path . $path;
- $img_data['width'] = $this->img_array[$img]['image_width'];
- $img_data['height'] = $this->img_array[$img]['image_height'];
-
- // We overwrite the width and height to the phpbb logo's width
- // and height here if the contents of the site_logo file are
- // really equal to the phpbb_logo
- // This allows us to change the dimensions of the phpbb_logo without
- // modifying the imageset.cfg and causing a conflict for everyone
- // who modified it for their custom logo on updating
- if ($img == 'site_logo' && file_exists($phpbb_root_path . $path))
- {
- global $cache;
-
- $img_file_hashes = $cache->get('imageset_site_logo_md5');
-
- if ($img_file_hashes === false)
- {
- $img_file_hashes = array();
- }
-
- $key = $this->theme['imageset_path'] . '::' . $this->img_array[$img]['image_lang'];
- if (!isset($img_file_hashes[$key]))
- {
- $img_file_hashes[$key] = md5(file_get_contents($phpbb_root_path . $path));
- $cache->put('imageset_site_logo_md5', $img_file_hashes);
- }
-
- $phpbb_logo_hash = '0c461a32cd3621643105f0d02a772c10';
-
- if ($phpbb_logo_hash == $img_file_hashes[$key])
- {
- $img_data['width'] = '149';
- $img_data['height'] = '52';
- }
- }
- }
-
- $alt = (!empty($this->lang[$alt])) ? $this->lang[$alt] : $alt;
-
- switch ($type)
- {
- case 'src':
- return $img_data['src'];
- break;
-
- case 'width':
- return ($width === false) ? $img_data['width'] : $width;
- break;
-
- case 'height':
- return $img_data['height'];
- break;
-
- default:
- $use_width = ($width === false) ? $img_data['width'] : $width;
-
- return '<img src="' . $img_data['src'] . '"' . (($use_width) ? ' width="' . $use_width . '"' : '') . (($img_data['height']) ? ' height="' . $img_data['height'] . '"' : '') . ' alt="' . $alt . '" title="' . $alt . '" />';
- break;
- }
- }
-
- /**
- * Get option bit field from user options.
- *
- * @param int $key option key, as defined in $keyoptions property.
- * @param int $data bit field value to use, or false to use $this->data['user_options']
- * @return bool true if the option is set in the bit field, false otherwise
- */
- function optionget($key, $data = false)
- {
- $var = ($data !== false) ? $data : $this->data['user_options'];
- return phpbb_optionget($this->keyoptions[$key], $var);
- }
-
- /**
- * Set option bit field for user options.
- *
- * @param int $key Option key, as defined in $keyoptions property.
- * @param bool $value True to set the option, false to clear the option.
- * @param int $data Current bit field value, or false to use $this->data['user_options']
- * @return int|bool If $data is false, the bit field is modified and
- * written back to $this->data['user_options'], and
- * return value is true if the bit field changed and
- * false otherwise. If $data is not false, the new
- * bitfield value is returned.
- */
- function optionset($key, $value, $data = false)
- {
- $var = ($data !== false) ? $data : $this->data['user_options'];
-
- $new_var = phpbb_optionset($this->keyoptions[$key], $value, $var);
-
- if ($data === false)
- {
- if ($new_var != $var)
- {
- $this->data['user_options'] = $new_var;
- return true;
- }
- else
- {
- return false;
- }
- }
- else
- {
- return $new_var;
- }
- }
-
- /**
- * Funtion to make the user leave the NEWLY_REGISTERED system group.
- * @access public
- */
- function leave_newly_registered()
+ public function update_session($session_data, $session_id = null)
{
global $db;
- if (empty($this->data['user_new']))
- {
- return false;
- }
-
- if (!function_exists('remove_newly_registered'))
- {
- global $phpbb_root_path, $phpEx;
-
- include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
- }
- if ($group = remove_newly_registered($this->data['user_id'], $this->data))
- {
- $this->data['group_id'] = $group;
-
- }
- $this->data['user_permissions'] = '';
- $this->data['user_new'] = 0;
-
- return true;
- }
+ $session_id = ($session_id) ? $session_id : $this->session_id;
- /**
- * Returns all password protected forum ids the user is currently NOT authenticated for.
- *
- * @return array Array of forum ids
- * @access public
- */
- function get_passworded_forums()
- {
- global $db;
-
- $sql = 'SELECT f.forum_id, fa.user_id
- FROM ' . FORUMS_TABLE . ' f
- LEFT JOIN ' . FORUMS_ACCESS_TABLE . " fa
- ON (fa.forum_id = f.forum_id
- AND fa.session_id = '" . $db->sql_escape($this->session_id) . "')
- WHERE f.forum_password <> ''";
- $result = $db->sql_query($sql);
-
- $forum_ids = array();
- while ($row = $db->sql_fetchrow($result))
- {
- $forum_id = (int) $row['forum_id'];
-
- if ($row['user_id'] != $this->data['user_id'])
- {
- $forum_ids[$forum_id] = $forum_id;
- }
- }
- $db->sql_freeresult($result);
-
- return $forum_ids;
+ $sql = 'UPDATE ' . SESSIONS_TABLE . ' SET ' . $db->sql_build_array('UPDATE', $session_data) . "
+ WHERE session_id = '" . $db->sql_escape($session_id) . "'";
+ $db->sql_query($sql);
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/phpbb/symfony_request.php b/phpBB/phpbb/symfony_request.php
new file mode 100644
index 0000000000..ebe862a565
--- /dev/null
+++ b/phpBB/phpbb/symfony_request.php
@@ -0,0 +1,40 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb;
+
+use Symfony\Component\HttpFoundation\Request;
+
+class symfony_request extends Request
+{
+ /**
+ * Constructor
+ *
+ * @param phpbb\request\request_interface $phpbb_request
+ */
+ public function __construct(\phpbb\request\request_interface $phpbb_request)
+ {
+ // This function is meant to sanitize the global input arrays
+ $sanitizer = function(&$value, $key) {
+ $type_cast_helper = new \phpbb\request\type_cast_helper();
+ $type_cast_helper->set_var($value, $value, gettype($value), true);
+ };
+
+ $get_parameters = $phpbb_request->get_super_global(\phpbb\request\request_interface::GET);
+ $post_parameters = $phpbb_request->get_super_global(\phpbb\request\request_interface::POST);
+ $server_parameters = $phpbb_request->get_super_global(\phpbb\request\request_interface::SERVER);
+ $files_parameters = $phpbb_request->get_super_global(\phpbb\request\request_interface::FILES);
+ $cookie_parameters = $phpbb_request->get_super_global(\phpbb\request\request_interface::COOKIE);
+
+ array_walk_recursive($get_parameters, $sanitizer);
+ array_walk_recursive($post_parameters, $sanitizer);
+
+ parent::__construct($get_parameters, $post_parameters, array(), $cookie_parameters, $files_parameters, $server_parameters);
+ }
+}
diff --git a/phpBB/phpbb/template/asset.php b/phpBB/phpbb/template/asset.php
new file mode 100644
index 0000000000..24e0d6698d
--- /dev/null
+++ b/phpBB/phpbb/template/asset.php
@@ -0,0 +1,181 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\template;
+
+class asset
+{
+ protected $components = array();
+
+ /** @var \phpbb\path_helper **/
+ protected $path_helper;
+
+ /**
+ * Constructor
+ *
+ * @param string $url URL
+ */
+ public function __construct($url, \phpbb\path_helper $path_helper)
+ {
+ $this->path_helper = $path_helper;
+
+ $this->set_url($url);
+ }
+
+ /**
+ * Set URL
+ *
+ * @param string $url URL
+ */
+ public function set_url($url)
+ {
+ if (version_compare(PHP_VERSION, '5.4.7') < 0 && substr($url, 0, 2) === '//')
+ {
+ // Workaround for PHP 5.4.6 and older bug #62844 - add fake scheme and then remove it
+ $this->components = parse_url('http:' . $url);
+ $this->components['scheme'] = '';
+ return;
+ }
+ $this->components = parse_url($url);
+ }
+
+ /**
+ * Convert URL components into string
+ *
+ * @param array $components URL components
+ * @return string URL
+ */
+ protected function join_url($components)
+ {
+ $path = '';
+ if (isset($components['scheme']))
+ {
+ $path = $components['scheme'] === '' ? '//' : $components['scheme'] . '://';
+ }
+
+ if (isset($components['user']) || isset($components['pass']))
+ {
+ if ($path === '' && !isset($components['port']))
+ {
+ $path = '//';
+ }
+ $path .= $components['user'];
+ if (isset($components['pass']))
+ {
+ $path .= ':' . $components['pass'];
+ }
+ $path .= '@';
+ }
+
+ if (isset($components['host']))
+ {
+ if ($path === '' && !isset($components['port']))
+ {
+ $path = '//';
+ }
+ $path .= $components['host'];
+ if (isset($components['port']))
+ {
+ $path .= ':' . $components['port'];
+ }
+ }
+
+ if (isset($components['path']))
+ {
+ $path .= $components['path'];
+ }
+
+ if (isset($components['query']))
+ {
+ $path .= '?' . $components['query'];
+ }
+
+ if (isset($components['fragment']))
+ {
+ $path .= '#' . $components['fragment'];
+ }
+
+ return $path;
+ }
+
+ /**
+ * Get URL
+ *
+ * @return string URL
+ */
+ public function get_url()
+ {
+ return $this->path_helper->update_web_root_path($this->join_url($this->components));
+ }
+
+ /**
+ * Checks if URL is local and relative
+ *
+ * @return boolean True if URL is local and relative
+ */
+ public function is_relative()
+ {
+ if (empty($this->components) || !isset($this->components['path']))
+ {
+ // Invalid URL
+ return false;
+ }
+ return !isset($this->components['scheme']) && !isset($this->components['host']) && substr($this->components['path'], 0, 1) !== '/';
+ }
+
+ /**
+ * Get path component of current URL
+ *
+ * @return string Path
+ */
+ public function get_path()
+ {
+ return isset($this->components['path']) ? $this->components['path'] : '';
+ }
+
+ /**
+ * Set path component
+ *
+ * @param string $path Path component
+ * @param boolean $urlencode If true, parts of path should be encoded with rawurlencode()
+ */
+ public function set_path($path, $urlencode = false)
+ {
+ if ($urlencode)
+ {
+ $paths = explode('/', $path);
+ foreach ($paths as &$dir)
+ {
+ $dir = rawurlencode($dir);
+ }
+ $path = implode('/', $paths);
+ }
+ $this->components['path'] = $path;
+ }
+
+ /**
+ * Add assets_version parameter to URL.
+ * Parameter will not be added if assets_version already exists in URL
+ *
+ * @param string $version Version
+ */
+ public function add_assets_version($version)
+ {
+ if (!isset($this->components['query']))
+ {
+ $this->components['query'] = 'assets_version=' . $version;
+ return;
+ }
+ $query = $this->components['query'];
+ if (!preg_match('/(^|[&;])assets_version=/', $query))
+ {
+ $this->components['query'] = $query . '&amp;assets_version=' . $version;
+ }
+ }
+}
diff --git a/phpBB/phpbb/template/base.php b/phpBB/phpbb/template/base.php
new file mode 100644
index 0000000000..5bce79fd85
--- /dev/null
+++ b/phpBB/phpbb/template/base.php
@@ -0,0 +1,152 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\template;
+
+abstract class base implements template
+{
+ /**
+ * Template context.
+ * Stores template data used during template rendering.
+ *
+ * @var \phpbb\template\context
+ */
+ protected $context;
+
+ /**
+ * Array of filenames assigned to set_filenames
+ *
+ * @var array
+ */
+ protected $filenames = array();
+
+ /**
+ * {@inheritdoc}
+ */
+ public function set_filenames(array $filename_array)
+ {
+ $this->filenames = array_merge($this->filenames, $filename_array);
+
+ return $this;
+ }
+
+ /**
+ * Get a filename from the handle
+ *
+ * @param string $handle
+ * @return string
+ */
+ protected function get_filename_from_handle($handle)
+ {
+ return (isset($this->filenames[$handle])) ? $this->filenames[$handle] : $handle;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function destroy()
+ {
+ $this->context->clear();
+
+ return $this;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function destroy_block_vars($blockname)
+ {
+ $this->context->destroy_block_vars($blockname);
+
+ return $this;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function assign_vars(array $vararray)
+ {
+ foreach ($vararray as $key => $val)
+ {
+ $this->assign_var($key, $val);
+ }
+
+ return $this;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function assign_var($varname, $varval)
+ {
+ $this->context->assign_var($varname, $varval);
+
+ return $this;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function append_var($varname, $varval)
+ {
+ $this->context->append_var($varname, $varval);
+
+ return $this;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function assign_block_vars($blockname, array $vararray)
+ {
+ $this->context->assign_block_vars($blockname, $vararray);
+
+ return $this;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function assign_block_vars_array($blockname, array $block_vars_array)
+ {
+ $this->context->assign_block_vars_array($blockname, $block_vars_array);
+
+ return $this;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function alter_block_array($blockname, array $vararray, $key = false, $mode = 'insert')
+ {
+ return $this->context->alter_block_array($blockname, $vararray, $key, $mode);
+ }
+
+ /**
+ * Calls hook if any is defined.
+ *
+ * @param string $handle Template handle being displayed.
+ * @param string $method Method name of the caller.
+ */
+ protected function call_hook($handle, $method)
+ {
+ global $phpbb_hook;
+
+ if (!empty($phpbb_hook) && $phpbb_hook->call_hook(array(__CLASS__, $method), $handle, $this))
+ {
+ if ($phpbb_hook->hook_return(array(__CLASS__, $method)))
+ {
+ $result = $phpbb_hook->hook_return_result(array(__CLASS__, $method));
+ return array($result);
+ }
+ }
+
+ return false;
+ }
+}
diff --git a/phpBB/phpbb/template/context.php b/phpBB/phpbb/template/context.php
new file mode 100644
index 0000000000..a222fbb69e
--- /dev/null
+++ b/phpBB/phpbb/template/context.php
@@ -0,0 +1,401 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2011 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\template;
+
+/**
+* Stores variables assigned to template.
+*
+* @package phpBB3
+*/
+class context
+{
+ /**
+ * variable that holds all the data we'll be substituting into
+ * the compiled templates. Takes form:
+ * --> $this->tpldata[block][iteration#][child][iteration#][child2][iteration#][variablename] == value
+ * if it's a root-level variable, it'll be like this:
+ * --> $this->tpldata[.][0][varname] == value
+ *
+ * @var array
+ */
+ private $tpldata = array('.' => array(0 => array()));
+
+ /**
+ * @var array Reference to template->tpldata['.'][0]
+ */
+ private $rootref;
+
+ public function __construct()
+ {
+ $this->clear();
+ }
+
+ /**
+ * Clears template data set.
+ */
+ public function clear()
+ {
+ $this->tpldata = array('.' => array(0 => array()));
+ $this->rootref = &$this->tpldata['.'][0];
+ }
+
+ /**
+ * Assign a single scalar value to a single key.
+ *
+ * Value can be a string, an integer or a boolean.
+ *
+ * @param string $varname Variable name
+ * @param string $varval Value to assign to variable
+ */
+ public function assign_var($varname, $varval)
+ {
+ $this->rootref[$varname] = $varval;
+
+ return true;
+ }
+
+ /**
+ * Append text to the string value stored in a key.
+ *
+ * Text is appended using the string concatenation operator (.).
+ *
+ * @param string $varname Variable name
+ * @param string $varval Value to append to variable
+ */
+ public function append_var($varname, $varval)
+ {
+ $this->rootref[$varname] = (isset($this->rootref[$varname]) ? $this->rootref[$varname] : '') . $varval;
+
+ return true;
+ }
+
+ /**
+ * Returns a reference to template data array.
+ *
+ * This function is public so that template renderer may invoke it.
+ * Users should alter template variables via functions in \phpbb\template\template.
+ *
+ * Note: modifying returned array will affect data stored in the context.
+ *
+ * @return array template data
+ */
+ public function &get_data_ref()
+ {
+ // returning a reference directly is not
+ // something php is capable of doing
+ $ref = &$this->tpldata;
+ return $ref;
+ }
+
+ /**
+ * Returns a reference to template root scope.
+ *
+ * This function is public so that template renderer may invoke it.
+ * Users should not need to invoke this function.
+ *
+ * Note: modifying returned array will affect data stored in the context.
+ *
+ * @return array template data
+ */
+ public function &get_root_ref()
+ {
+ // rootref is already a reference
+ return $this->rootref;
+ }
+
+ /**
+ * Assign key variable pairs from an array to a specified block
+ *
+ * @param string $blockname Name of block to assign $vararray to
+ * @param array $vararray A hash of variable name => value pairs
+ */
+ public function assign_block_vars($blockname, array $vararray)
+ {
+ if (strpos($blockname, '.') !== false)
+ {
+ // Nested block.
+ $blocks = explode('.', $blockname);
+ $blockcount = sizeof($blocks) - 1;
+
+ $str = &$this->tpldata;
+ for ($i = 0; $i < $blockcount; $i++)
+ {
+ $str = &$str[$blocks[$i]];
+ $str = &$str[sizeof($str) - 1];
+ }
+
+ $s_row_count = isset($str[$blocks[$blockcount]]) ? sizeof($str[$blocks[$blockcount]]) : 0;
+ $vararray['S_ROW_COUNT'] = $vararray['S_ROW_NUM'] = $s_row_count;
+
+ // Assign S_FIRST_ROW
+ if (!$s_row_count)
+ {
+ $vararray['S_FIRST_ROW'] = true;
+ }
+
+ // Assign S_BLOCK_NAME
+ $vararray['S_BLOCK_NAME'] = $blocks[$blockcount];
+
+ // Now the tricky part, we always assign S_LAST_ROW and remove the entry before
+ // This is much more clever than going through the complete template data on display (phew)
+ $vararray['S_LAST_ROW'] = true;
+ if ($s_row_count > 0)
+ {
+ unset($str[$blocks[$blockcount]][($s_row_count - 1)]['S_LAST_ROW']);
+ }
+
+ // Now we add the block that we're actually assigning to.
+ // We're adding a new iteration to this block with the given
+ // variable assignments.
+ $str[$blocks[$blockcount]][] = $vararray;
+ $s_num_rows = sizeof($str[$blocks[$blockcount]]);
+
+ // Set S_NUM_ROWS
+ foreach ($str[$blocks[$blockcount]] as &$mod_block)
+ {
+ $mod_block['S_NUM_ROWS'] = $s_num_rows;
+ }
+ }
+ else
+ {
+ // Top-level block.
+ $s_row_count = (isset($this->tpldata[$blockname])) ? sizeof($this->tpldata[$blockname]) : 0;
+ $vararray['S_ROW_COUNT'] = $vararray['S_ROW_NUM'] = $s_row_count;
+
+ // Assign S_FIRST_ROW
+ if (!$s_row_count)
+ {
+ $vararray['S_FIRST_ROW'] = true;
+ }
+
+ // Assign S_BLOCK_NAME
+ $vararray['S_BLOCK_NAME'] = $blockname;
+
+ // We always assign S_LAST_ROW and remove the entry before
+ $vararray['S_LAST_ROW'] = true;
+ if ($s_row_count > 0)
+ {
+ unset($this->tpldata[$blockname][($s_row_count - 1)]['S_LAST_ROW']);
+ }
+
+ // Add a new iteration to this block with the variable assignments we were given.
+ $this->tpldata[$blockname][] = $vararray;
+ $s_num_rows = sizeof($this->tpldata[$blockname]);
+
+ // Set S_NUM_ROWS
+ foreach ($this->tpldata[$blockname] as &$mod_block)
+ {
+ $mod_block['S_NUM_ROWS'] = $s_num_rows;
+ }
+ }
+
+ return true;
+ }
+
+ /**
+ * Assign key variable pairs from an array to a whole specified block loop
+ *
+ * @param string $blockname Name of block to assign $block_vars_array to
+ * @param array $block_vars_array An array of hashes of variable name => value pairs
+ */
+ public function assign_block_vars_array($blockname, array $block_vars_array)
+ {
+ foreach ($block_vars_array as $vararray)
+ {
+ $this->assign_block_vars($blockname, $vararray);
+ }
+
+ return true;
+ }
+
+ /**
+ * Change already assigned key variable pair (one-dimensional - single loop entry)
+ *
+ * An example of how to use this function:
+ * {@example alter_block_array.php}
+ *
+ * @param string $blockname the blockname, for example 'loop'
+ * @param array $vararray the var array to insert/add or merge
+ * @param mixed $key Key to search for
+ *
+ * array: KEY => VALUE [the key/value pair to search for within the loop to determine the correct position]
+ *
+ * int: Position [the position to change or insert at directly given]
+ *
+ * If key is false the position is set to 0
+ * If key is true the position is set to the last entry
+ *
+ * @param string $mode Mode to execute (valid modes are 'insert' and 'change')
+ *
+ * If insert, the vararray is inserted at the given position (position counting from zero).
+ * If change, the current block gets merged with the vararray (resulting in new key/value pairs be added and existing keys be replaced by the new \value).
+ *
+ * Since counting begins by zero, inserting at the last position will result in this array: array(vararray, last positioned array)
+ * and inserting at position 1 will result in this array: array(first positioned array, vararray, following vars)
+ *
+ * @return bool false on error, true on success
+ */
+ public function alter_block_array($blockname, array $vararray, $key = false, $mode = 'insert')
+ {
+ if (strpos($blockname, '.') !== false)
+ {
+ // Nested block.
+ $blocks = explode('.', $blockname);
+ $blockcount = sizeof($blocks) - 1;
+
+ $block = &$this->tpldata;
+ for ($i = 0; $i < $blockcount; $i++)
+ {
+ if (($pos = strpos($blocks[$i], '[')) !== false)
+ {
+ $name = substr($blocks[$i], 0, $pos);
+
+ if (strpos($blocks[$i], '[]') === $pos)
+ {
+ $index = sizeof($block[$name]) - 1;
+ }
+ else
+ {
+ $index = min((int) substr($blocks[$i], $pos + 1, -1), sizeof($block[$name]) - 1);
+ }
+ }
+ else
+ {
+ $name = $blocks[$i];
+ $index = sizeof($block[$name]) - 1;
+ }
+ $block = &$block[$name];
+ $block = &$block[$index];
+ }
+
+ $block = &$block[$blocks[$i]]; // Traverse the last block
+ }
+ else
+ {
+ // Top-level block.
+ $block = &$this->tpldata[$blockname];
+ }
+
+ // Change key to zero (change first position) if false and to last position if true
+ if ($key === false || $key === true)
+ {
+ $key = ($key === false) ? 0 : sizeof($block);
+ }
+
+ // Get correct position if array given
+ if (is_array($key))
+ {
+ // Search array to get correct position
+ list($search_key, $search_value) = @each($key);
+
+ $key = null;
+ foreach ($block as $i => $val_ary)
+ {
+ if ($val_ary[$search_key] === $search_value)
+ {
+ $key = $i;
+ break;
+ }
+ }
+
+ // key/value pair not found
+ if ($key === null)
+ {
+ return false;
+ }
+ }
+
+ // Insert Block
+ if ($mode == 'insert')
+ {
+ // Make sure we are not exceeding the last iteration
+ if ($key >= sizeof($this->tpldata[$blockname]))
+ {
+ $key = sizeof($this->tpldata[$blockname]);
+ unset($this->tpldata[$blockname][($key - 1)]['S_LAST_ROW']);
+ $vararray['S_LAST_ROW'] = true;
+ }
+ else if ($key === 0)
+ {
+ unset($this->tpldata[$blockname][0]['S_FIRST_ROW']);
+ $vararray['S_FIRST_ROW'] = true;
+ }
+
+ // Assign S_BLOCK_NAME
+ $vararray['S_BLOCK_NAME'] = $blockname;
+
+ // Re-position template blocks
+ for ($i = sizeof($block); $i > $key; $i--)
+ {
+ $block[$i] = $block[$i-1];
+
+ $block[$i]['S_ROW_COUNT'] = $block[$i]['S_ROW_NUM'] = $i;
+ }
+
+ // Insert vararray at given position
+ $block[$key] = $vararray;
+ $block[$key]['S_ROW_COUNT'] = $block[$key]['S_ROW_NUM'] = $key;
+
+ // Set S_NUM_ROWS
+ foreach ($this->tpldata[$blockname] as &$mod_block)
+ {
+ $mod_block['S_NUM_ROWS'] = sizeof($this->tpldata[$blockname]);
+ }
+
+ return true;
+ }
+
+ // Which block to change?
+ if ($mode == 'change')
+ {
+ if ($key == sizeof($block))
+ {
+ $key--;
+ }
+
+ $block[$key] = array_merge($block[$key], $vararray);
+
+ return true;
+ }
+
+ return false;
+ }
+
+ /**
+ * Reset/empty complete block
+ *
+ * @param string $blockname Name of block to destroy
+ */
+ public function destroy_block_vars($blockname)
+ {
+ if (strpos($blockname, '.') !== false)
+ {
+ // Nested block.
+ $blocks = explode('.', $blockname);
+ $blockcount = sizeof($blocks) - 1;
+
+ $str = &$this->tpldata;
+ for ($i = 0; $i < $blockcount; $i++)
+ {
+ $str = &$str[$blocks[$i]];
+ $str = &$str[sizeof($str) - 1];
+ }
+
+ unset($str[$blocks[$blockcount]]);
+ }
+ else
+ {
+ // Top-level block.
+ unset($this->tpldata[$blockname]);
+ }
+
+ return true;
+ }
+}
diff --git a/phpBB/phpbb/template/template.php b/phpBB/phpbb/template/template.php
new file mode 100644
index 0000000000..87ae7a9766
--- /dev/null
+++ b/phpBB/phpbb/template/template.php
@@ -0,0 +1,177 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\template;
+
+interface template
+{
+
+ /**
+ * Clear the cache
+ *
+ * @return \phpbb\template\template
+ */
+ public function clear_cache();
+
+ /**
+ * Sets the template filenames for handles.
+ *
+ * @param array $filename_array Should be a hash of handle => filename pairs.
+ * @return \phpbb\template\template $this
+ */
+ public function set_filenames(array $filename_array);
+
+ /**
+ * Get the style tree of the style preferred by the current user
+ *
+ * @return array Style tree, most specific first
+ */
+ public function get_user_style();
+
+ /**
+ * Set style location based on (current) user's chosen style.
+ *
+ * @param array $style_directories The directories to add style paths for
+ * E.g. array('ext/foo/bar/styles', 'styles')
+ * Default: array('styles') (phpBB's style directory)
+ * @return \phpbb\template\template $this
+ */
+ public function set_style($style_directories = array('styles'));
+
+ /**
+ * Set custom style location (able to use directory outside of phpBB).
+ *
+ * Note: Templates are still compiled to phpBB's cache directory.
+ *
+ * @param string|array $names Array of names or string of name of template(s) in inheritance tree order, used by extensions.
+ * @param string|array or string $paths Array of style paths, relative to current root directory
+ * @return \phpbb\template\template $this
+ */
+ public function set_custom_style($names, $paths);
+
+ /**
+ * Clears all variables and blocks assigned to this template.
+ *
+ * @return \phpbb\template\template $this
+ */
+ public function destroy();
+
+ /**
+ * Reset/empty complete block
+ *
+ * @param string $blockname Name of block to destroy
+ * @return \phpbb\template\template $this
+ */
+ public function destroy_block_vars($blockname);
+
+ /**
+ * Display a template for provided handle.
+ *
+ * The template will be loaded and compiled, if necessary, first.
+ *
+ * This function calls hooks.
+ *
+ * @param string $handle Handle to display
+ * @return \phpbb\template\template $this
+ */
+ public function display($handle);
+
+ /**
+ * Display the handle and assign the output to a template variable
+ * or return the compiled result.
+ *
+ * @param string $handle Handle to operate on
+ * @param string $template_var Template variable to assign compiled handle to
+ * @param bool $return_content If true return compiled handle, otherwise assign to $template_var
+ * @return \phpbb\template\template|string if $return_content is true return string of the compiled handle, otherwise return $this
+ */
+ public function assign_display($handle, $template_var = '', $return_content = true);
+
+ /**
+ * Assign key variable pairs from an array
+ *
+ * @param array $vararray A hash of variable name => value pairs
+ * @return \phpbb\template\template $this
+ */
+ public function assign_vars(array $vararray);
+
+ /**
+ * Assign a single scalar value to a single key.
+ *
+ * Value can be a string, an integer or a boolean.
+ *
+ * @param string $varname Variable name
+ * @param string $varval Value to assign to variable
+ * @return \phpbb\template\template $this
+ */
+ public function assign_var($varname, $varval);
+
+ /**
+ * Append text to the string value stored in a key.
+ *
+ * Text is appended using the string concatenation operator (.).
+ *
+ * @param string $varname Variable name
+ * @param string $varval Value to append to variable
+ * @return \phpbb\template\template $this
+ */
+ public function append_var($varname, $varval);
+
+ /**
+ * Assign key variable pairs from an array to a specified block
+ * @param string $blockname Name of block to assign $vararray to
+ * @param array $vararray A hash of variable name => value pairs
+ * @return \phpbb\template\template $this
+ */
+ public function assign_block_vars($blockname, array $vararray);
+
+ /**
+ * Assign key variable pairs from an array to a whole specified block loop
+ * @param string $blockname Name of block to assign $block_vars_array to
+ * @param array $block_vars_array An array of hashes of variable name => value pairs
+ * @return \phpbb\template\template $this
+ */
+ public function assign_block_vars_array($blockname, array $block_vars_array);
+
+ /**
+ * Change already assigned key variable pair (one-dimensional - single loop entry)
+ *
+ * An example of how to use this function:
+ * {@example alter_block_array.php}
+ *
+ * @param string $blockname the blockname, for example 'loop'
+ * @param array $vararray the var array to insert/add or merge
+ * @param mixed $key Key to search for
+ *
+ * array: KEY => VALUE [the key/value pair to search for within the loop to determine the correct position]
+ *
+ * int: Position [the position to change or insert at directly given]
+ *
+ * If key is false the position is set to 0
+ * If key is true the position is set to the last entry
+ *
+ * @param string $mode Mode to execute (valid modes are 'insert' and 'change')
+ *
+ * If insert, the vararray is inserted at the given position (position counting from zero).
+ * If change, the current block gets merged with the vararray (resulting in new \key/value pairs be added and existing keys be replaced by the new \value).
+ *
+ * Since counting begins by zero, inserting at the last position will result in this array: array(vararray, last positioned array)
+ * and inserting at position 1 will result in this array: array(first positioned array, vararray, following vars)
+ *
+ * @return bool false on error, true on success
+ */
+ public function alter_block_array($blockname, array $vararray, $key = false, $mode = 'insert');
+
+ /**
+ * Get path to template for handle (required for BBCode parser)
+ *
+ * @return string
+ */
+ public function get_source_file_for_handle($handle);
+}
diff --git a/phpBB/phpbb/template/twig/definition.php b/phpBB/phpbb/template/twig/definition.php
new file mode 100644
index 0000000000..945c46675e
--- /dev/null
+++ b/phpBB/phpbb/template/twig/definition.php
@@ -0,0 +1,63 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\template\twig;
+
+/**
+* This class holds all DEFINE variables from the current page load
+*/
+class definition
+{
+ /** @var array **/
+ protected $definitions = array();
+
+ /**
+ * Get a DEFINE'd variable
+ *
+ * @param string $name
+ * @return mixed Null if not found
+ */
+ public function __call($name, $arguments)
+ {
+ return (isset($this->definitions[$name])) ? $this->definitions[$name] : null;
+ }
+
+ /**
+ * DEFINE a variable
+ *
+ * @param string $name
+ * @param mixed $value
+ * @return \phpbb\template\twig\definition
+ */
+ public function set($name, $value)
+ {
+ $this->definitions[$name] = $value;
+
+ return $this;
+ }
+
+ /**
+ * Append to a variable
+ *
+ * @param string $name
+ * @param string $value
+ * @return \phpbb\template\twig\definition
+ */
+ public function append($name, $value)
+ {
+ if (!isset($this->definitions[$name]))
+ {
+ $this->definitions[$name] = '';
+ }
+
+ $this->definitions[$name] .= $value;
+
+ return $this;
+ }
+}
diff --git a/phpBB/phpbb/template/twig/environment.php b/phpBB/phpbb/template/twig/environment.php
new file mode 100644
index 0000000000..aa55f1e011
--- /dev/null
+++ b/phpBB/phpbb/template/twig/environment.php
@@ -0,0 +1,200 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\template\twig;
+
+class environment extends \Twig_Environment
+{
+ /** @var \phpbb\config\config */
+ protected $phpbb_config;
+
+ /** @var \phpbb\path_helper */
+ protected $phpbb_path_helper;
+
+ /** @var \phpbb\extension\manager */
+ protected $extension_manager;
+
+ /** @var string */
+ protected $phpbb_root_path;
+
+ /** @var string */
+ protected $web_root_path;
+
+ /** @var array **/
+ protected $namespace_look_up_order = array('__main__');
+
+ /**
+ * Constructor
+ *
+ * @param \phpbb\config\config $phpbb_config
+ * @param \phpbb\path_helper
+ * @param \phpbb\extension\manager
+ * @param string $phpbb_root_path
+ * @param Twig_LoaderInterface $loader
+ * @param array $options Array of options to pass to Twig
+ */
+ public function __construct($phpbb_config, \phpbb\path_helper $path_helper, \phpbb\extension\manager $extension_manager = null, \Twig_LoaderInterface $loader = null, $options = array())
+ {
+ $this->phpbb_config = $phpbb_config;
+
+ $this->phpbb_path_helper = $path_helper;
+ $this->extension_manager = $extension_manager;
+
+ $this->phpbb_root_path = $this->phpbb_path_helper->get_phpbb_root_path();
+ $this->web_root_path = $this->phpbb_path_helper->get_web_root_path();
+
+ return parent::__construct($loader, $options);
+ }
+
+ /**
+ * Get the list of enabled phpBB extensions
+ *
+ * Used in EVENT node
+ *
+ * @return array
+ */
+ public function get_phpbb_extensions()
+ {
+ return ($this->extension_manager) ? $this->extension_manager->all_enabled() : array();
+ }
+
+ /**
+ * Get phpBB config
+ *
+ * @return \phpbb\config\config
+ */
+ public function get_phpbb_config()
+ {
+ return $this->phpbb_config;
+ }
+
+ /**
+ * Get the phpBB root path
+ *
+ * @return string
+ */
+ public function get_phpbb_root_path()
+ {
+ return $this->phpbb_root_path;
+ }
+
+ /**
+ * Get the web root path
+ *
+ * @return string
+ */
+ public function get_web_root_path()
+ {
+ return $this->web_root_path;
+ }
+
+ /**
+ * Get the phpbb path helper object
+ *
+ * @return \phpbb\path_helper
+ */
+ public function get_path_helper()
+ {
+ return $this->phpbb_path_helper;
+ }
+
+ /**
+ * Get the namespace look up order
+ *
+ * @return array
+ */
+ public function getNamespaceLookUpOrder()
+ {
+ return $this->namespace_look_up_order;
+ }
+
+ /**
+ * Set the namespace look up order to load templates from
+ *
+ * @param array $namespace
+ * @return Twig_Environment
+ */
+ public function setNamespaceLookUpOrder($namespace)
+ {
+ $this->namespace_look_up_order = $namespace;
+
+ return $this;
+ }
+
+ /**
+ * Loads a template by name.
+ *
+ * @param string $name The template name
+ * @param integer $index The index if it is an embedded template
+ * @return Twig_TemplateInterface A template instance representing the given template name
+ */
+ public function loadTemplate($name, $index = null)
+ {
+ if (strpos($name, '@') === false)
+ {
+ foreach ($this->getNamespaceLookUpOrder() as $namespace)
+ {
+ try
+ {
+ if ($namespace === '__main__')
+ {
+ return parent::loadTemplate($name, $index);
+ }
+
+ return parent::loadTemplate('@' . $namespace . '/' . $name, $index);
+ }
+ catch (\Twig_Error_Loader $e)
+ {
+ }
+ }
+
+ // We were unable to load any templates
+ throw $e;
+ }
+ else
+ {
+ return parent::loadTemplate($name, $index);
+ }
+ }
+
+ /**
+ * Finds a template by name.
+ *
+ * @param string $name The template name
+ * @return string
+ */
+ public function findTemplate($name)
+ {
+ if (strpos($name, '@') === false)
+ {
+ foreach ($this->getNamespaceLookUpOrder() as $namespace)
+ {
+ try
+ {
+ if ($namespace === '__main__')
+ {
+ return parent::getLoader()->getCacheKey($name);
+ }
+
+ return parent::getLoader()->getCacheKey('@' . $namespace . '/' . $name);
+ }
+ catch (Twig_Error_Loader $e)
+ {
+ }
+ }
+
+ // We were unable to load any templates
+ throw $e;
+ }
+ else
+ {
+ return parent::getLoader()->getCacheKey($name);
+ }
+ }
+}
diff --git a/phpBB/phpbb/template/twig/extension.php b/phpBB/phpbb/template/twig/extension.php
new file mode 100644
index 0000000000..6847dbd9f8
--- /dev/null
+++ b/phpBB/phpbb/template/twig/extension.php
@@ -0,0 +1,182 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\template\twig;
+
+class extension extends \Twig_Extension
+{
+ /** @var \phpbb\template\context */
+ protected $context;
+
+ /** @var \phpbb\user */
+ protected $user;
+
+ /**
+ * Constructor
+ *
+ * @param \phpbb\template\context $context
+ * @param \phpbb\user $user
+ * @return \phpbb\template\twig\extension
+ */
+ public function __construct(\phpbb\template\context $context, $user)
+ {
+ $this->context = $context;
+ $this->user = $user;
+ }
+
+ /**
+ * Get the name of this extension
+ *
+ * @return string
+ */
+ public function getName()
+ {
+ return 'phpbb';
+ }
+
+ /**
+ * Returns the token parser instance to add to the existing list.
+ *
+ * @return array An array of Twig_TokenParser instances
+ */
+ public function getTokenParsers()
+ {
+ return array(
+ new \phpbb\template\twig\tokenparser\defineparser,
+ new \phpbb\template\twig\tokenparser\includeparser,
+ new \phpbb\template\twig\tokenparser\includejs,
+ new \phpbb\template\twig\tokenparser\includecss,
+ new \phpbb\template\twig\tokenparser\event,
+ new \phpbb\template\twig\tokenparser\includephp,
+ new \phpbb\template\twig\tokenparser\php,
+ );
+ }
+
+ /**
+ * Returns a list of filters to add to the existing list.
+ *
+ * @return array An array of filters
+ */
+ public function getFilters()
+ {
+ return array(
+ new \Twig_SimpleFilter('subset', array($this, 'loop_subset'), array('needs_environment' => true)),
+ new \Twig_SimpleFilter('addslashes', 'addslashes'),
+ );
+ }
+
+ /**
+ * Returns a list of global functions to add to the existing list.
+ *
+ * @return array An array of global functions
+ */
+ public function getFunctions()
+ {
+ return array(
+ new \Twig_SimpleFunction('lang', array($this, 'lang')),
+ );
+ }
+
+ /**
+ * Returns a list of operators to add to the existing list.
+ *
+ * @return array An array of operators
+ */
+ public function getOperators()
+ {
+ return array(
+ array(
+ '!' => array('precedence' => 50, 'class' => 'Twig_Node_Expression_Unary_Not'),
+ ),
+ array(
+ // precedence settings are copied from similar operators in Twig core extension
+ '||' => array('precedence' => 10, 'class' => 'Twig_Node_Expression_Binary_Or', 'associativity' => \Twig_ExpressionParser::OPERATOR_LEFT),
+ '&&' => array('precedence' => 15, 'class' => 'Twig_Node_Expression_Binary_And', 'associativity' => \Twig_ExpressionParser::OPERATOR_LEFT),
+
+ 'eq' => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_Equal', 'associativity' => \Twig_ExpressionParser::OPERATOR_LEFT),
+
+ 'ne' => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_NotEqual', 'associativity' => \Twig_ExpressionParser::OPERATOR_LEFT),
+ 'neq' => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_NotEqual', 'associativity' => \Twig_ExpressionParser::OPERATOR_LEFT),
+ '<>' => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_NotEqual', 'associativity' => \Twig_ExpressionParser::OPERATOR_LEFT),
+
+ '===' => array('precedence' => 20, 'class' => '\phpbb\template\twig\node\expression\binary\equalequal', 'associativity' => \Twig_ExpressionParser::OPERATOR_LEFT),
+ '!==' => array('precedence' => 20, 'class' => '\phpbb\template\twig\node\expression\binary\notequalequal', 'associativity' => \Twig_ExpressionParser::OPERATOR_LEFT),
+
+ 'gt' => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_Greater', 'associativity' => \Twig_ExpressionParser::OPERATOR_LEFT),
+ 'gte' => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_GreaterEqual', 'associativity' => \Twig_ExpressionParser::OPERATOR_LEFT),
+ 'ge' => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_GreaterEqual', 'associativity' => \Twig_ExpressionParser::OPERATOR_LEFT),
+ 'lt' => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_Less', 'associativity' => \Twig_ExpressionParser::OPERATOR_LEFT),
+ 'lte' => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_LessEqual', 'associativity' => \Twig_ExpressionParser::OPERATOR_LEFT),
+ 'le' => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_LessEqual', 'associativity' => \Twig_ExpressionParser::OPERATOR_LEFT),
+
+ 'mod' => array('precedence' => 60, 'class' => 'Twig_Node_Expression_Binary_Mod', 'associativity' => \Twig_ExpressionParser::OPERATOR_LEFT),
+ ),
+ );
+ }
+
+ /**
+ * Grabs a subset of a loop
+ *
+ * @param Twig_Environment $env A Twig_Environment instance
+ * @param mixed $item A variable
+ * @param integer $start Start of the subset
+ * @param integer $end End of the subset
+ * @param Boolean $preserveKeys Whether to preserve key or not (when the input is an array)
+ *
+ * @return mixed The sliced variable
+ */
+ function loop_subset(\Twig_Environment $env, $item, $start, $end = null, $preserveKeys = false)
+ {
+ // We do almost the same thing as Twig's slice (array_slice), except when $end is positive
+ if ($end >= 1)
+ {
+ // When end is > 1, subset will end on the last item in an array with the specified $end
+ // This is different from slice in that it is the number we end on rather than the number
+ // of items to grab (length)
+
+ // Start must always be the actual starting number for this calculation (not negative)
+ $start = ($start < 0) ? sizeof($item) + $start : $start;
+ $end = $end - $start;
+ }
+
+ // We always include the last element (this was the past design)
+ $end = ($end == -1 || $end === null) ? null : $end + 1;
+
+ return twig_slice($env, $item, $start, $end, $preserveKeys);
+ }
+
+ /**
+ * Get output for a language variable (L_FOO, LA_FOO)
+ *
+ * This function checks to see if the language var was outputted to $context
+ * (e.g. in the ACP, L_TITLE)
+ * If not, we return the result of $user->lang()
+ *
+ * @param string $lang name
+ * @return string
+ */
+ function lang()
+ {
+ $args = func_get_args();
+ $key = $args[0];
+
+ $context = $this->context->get_data_ref();
+ $context_vars = $context['.'][0];
+
+ if (isset($context_vars['L_' . $key]))
+ {
+ return $context_vars['L_' . $key];
+ }
+
+ // LA_ is transformed into lang(\'$1\')|addslashes, so we should not
+ // need to check for it
+
+ return call_user_func_array(array($this->user, 'lang'), $args);
+ }
+}
diff --git a/phpBB/phpbb/template/twig/lexer.php b/phpBB/phpbb/template/twig/lexer.php
new file mode 100644
index 0000000000..f4efc58540
--- /dev/null
+++ b/phpBB/phpbb/template/twig/lexer.php
@@ -0,0 +1,343 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\template\twig;
+
+class lexer extends \Twig_Lexer
+{
+ public function tokenize($code, $filename = null)
+ {
+ // Our phpBB tags
+ // Commented out tokens are handled separately from the main replace
+ $phpbb_tags = array(
+ /*'BEGIN',
+ 'BEGINELSE',
+ 'END',
+ 'IF',
+ 'ELSE',
+ 'ELSEIF',
+ 'ENDIF',
+ 'DEFINE',
+ 'UNDEFINE',*/
+ 'ENDDEFINE',
+ 'INCLUDE',
+ 'INCLUDEPHP',
+ 'INCLUDEJS',
+ 'INCLUDECSS',
+ 'PHP',
+ 'ENDPHP',
+ 'EVENT',
+ );
+
+ // Twig tag masks
+ $twig_tags = array(
+ 'autoescape',
+ 'endautoescape',
+ 'if',
+ 'elseif',
+ 'else',
+ 'endif',
+ 'block',
+ 'endblock',
+ 'use',
+ 'extends',
+ 'embed',
+ 'filter',
+ 'endfilter',
+ 'flush',
+ 'for',
+ 'endfor',
+ 'macro',
+ 'endmacro',
+ 'import',
+ 'from',
+ 'sandbox',
+ 'endsandbox',
+ 'set',
+ 'endset',
+ 'spaceless',
+ 'endspaceless',
+ 'verbatim',
+ 'endverbatim',
+ );
+
+ // Fix tokens that may have inline variables (e.g. <!-- DEFINE $TEST = '{FOO}')
+ $code = $this->strip_surrounding_quotes(array(
+ 'INCLUDE',
+ 'INCLUDEPHP',
+ 'INCLUDEJS',
+ 'INCLUDECSS',
+ ), $code);
+ $code = $this->fix_inline_variable_tokens(array(
+ 'DEFINE \$[a-zA-Z0-9_]+ =',
+ 'INCLUDE',
+ 'INCLUDEPHP',
+ 'INCLUDEJS',
+ 'INCLUDECSS',
+ ), $code);
+ $code = $this->add_surrounding_quotes(array(
+ 'INCLUDE',
+ 'INCLUDEPHP',
+ 'INCLUDEJS',
+ 'INCLUDECSS',
+ ), $code);
+
+ // Fix our BEGIN statements
+ $code = $this->fix_begin_tokens($code);
+
+ // Fix our IF tokens
+ $code = $this->fix_if_tokens($code);
+
+ // Fix our DEFINE tokens
+ $code = $this->fix_define_tokens($code);
+
+ // Replace all of our starting tokens, <!-- TOKEN --> with Twig style, {% TOKEN %}
+ // This also strips outer parenthesis, <!-- IF (blah) --> becomes <!-- IF blah -->
+ $code = preg_replace('#<!-- (' . implode('|', $phpbb_tags) . ')(?: (.*?) ?)?-->#', '{% $1 $2 %}', $code);
+
+ // Replace all of our twig masks with Twig code (e.g. <!-- BLOCK .+ --> with {% block $1 %})
+ $code = $this->replace_twig_tag_masks($code, $twig_tags);
+
+ // Replace all of our language variables, {L_VARNAME}, with Twig style, {{ lang('NAME') }}
+ // Appends any filters after lang()
+ $code = preg_replace('#{L_([a-zA-Z0-9_\.]+)(\|[^}]+?)?}#', '{{ lang(\'$1\')$2 }}', $code);
+
+ // Replace all of our escaped language variables, {LA_VARNAME}, with Twig style, {{ lang('NAME')|addslashes }}
+ // Appends any filters after lang(), but before addslashes
+ $code = preg_replace('#{LA_([a-zA-Z0-9_\.]+)(\|[^}]+?)?}#', '{{ lang(\'$1\')$2|addslashes }}', $code);
+
+ // Replace all of our variables, {VARNAME}, with Twig style, {{ VARNAME }}
+ // Appends any filters
+ $code = preg_replace('#{([a-zA-Z0-9_\.]+)(\|[^}]+?)?}#', '{{ $1$2 }}', $code);
+
+ return parent::tokenize($code, $filename);
+ }
+
+ /**
+ * Strip surrounding quotes
+ *
+ * First step to fix tokens that may have inline variables
+ * E.g. <!-- INCLUDE '{TEST}.html' to <!-- INCLUDE {TEST}.html
+ *
+ * @param array $tokens array of tokens to search for (imploded to a regular expression)
+ * @param string $code
+ * @return string
+ */
+ protected function strip_surrounding_quotes($tokens, $code)
+ {
+ // Remove matching quotes at the beginning/end if a statement;
+ // E.g. 'asdf'"' -> asdf'"
+ // E.g. "asdf'"" -> asdf'"
+ // E.g. 'asdf'" -> 'asdf'"
+ return preg_replace('#<!-- (' . implode('|', $tokens) . ') (([\'"])?(.*?)\1) -->#', '<!-- $1 $2 -->', $code);
+ }
+
+ /**
+ * Fix tokens that may have inline variables
+ *
+ * Second step to fix tokens that may have inline variables
+ * E.g. <!-- INCLUDE '{TEST}.html' to <!-- INCLUDE ' ~ {TEST} ~ '.html
+ *
+ * @param array $tokens array of tokens to search for (imploded to a regular expression)
+ * @param string $code
+ * @return string
+ */
+ protected function fix_inline_variable_tokens($tokens, $code)
+ {
+ $callback = function($matches)
+ {
+ // Replace template variables with start/end to parse variables (' ~ TEST ~ '.html)
+ $matches[2] = preg_replace('#{([a-zA-Z0-9_\.$]+)}#', "'~ \$1 ~'", $matches[2]);
+
+ return "<!-- {$matches[1]} {$matches[2]} -->";
+ };
+
+ return preg_replace_callback('#<!-- (' . implode('|', $tokens) . ') (.+?) -->#', $callback, $code);
+ }
+
+ /**
+ * Add surrounding quotes
+ *
+ * Last step to fix tokens that may have inline variables
+ * E.g. <!-- INCLUDE '{TEST}.html' to <!-- INCLUDE '' ~ {TEST} ~ '.html'
+ *
+ * @param array $tokens array of tokens to search for (imploded to a regular expression)
+ * @param string $code
+ * @return string
+ */
+ protected function add_surrounding_quotes($tokens, $code)
+ {
+ return preg_replace('#<!-- (' . implode('|', $tokens) . ') (.+?) -->#', '<!-- $1 \'$2\' -->', $code);
+ }
+
+ /**
+ * Fix begin tokens (convert our BEGIN to Twig for)
+ *
+ * Not meant to be used outside of this context, public because the anonymous function calls this
+ *
+ * @param string $code
+ * @param array $parent_nodes (used in recursion)
+ * @return string
+ */
+ public function fix_begin_tokens($code, $parent_nodes = array())
+ {
+ // PHP 5.3 cannot use $this in an anonymous function, so use this as a work-around
+ $parent_class = $this;
+ $callback = function ($matches) use ($parent_class, $parent_nodes)
+ {
+ $name = $matches[1];
+ $subset = trim(substr($matches[2], 1, -1)); // Remove parenthesis
+ $body = $matches[3];
+
+ // Replace <!-- BEGINELSE -->
+ $body = str_replace('<!-- BEGINELSE -->', '{% else %}', $body);
+
+ // Is the designer wanting to call another loop in a loop?
+ // <!-- BEGIN loop -->
+ // <!-- BEGIN !loop2 -->
+ // <!-- END !loop2 -->
+ // <!-- END loop -->
+ // 'loop2' is actually on the same nesting level as 'loop' you assign
+ // variables to it with template->assign_block_vars('loop2', array(...))
+ if (strpos($name, '!') === 0)
+ {
+ // Count the number if ! occurrences
+ $count = substr_count($name, '!');
+ for ($i = 0; $i < $count; $i++)
+ {
+ array_pop($parent_nodes);
+ $name = substr($name, 1);
+ }
+ }
+
+ // Remove all parent nodes, e.g. foo, bar from foo.bar.foobar.VAR
+ foreach ($parent_nodes as $node)
+ {
+ $body = preg_replace('#([^a-zA-Z0-9_])' . $node . '\.([a-zA-Z0-9_]+)\.#', '$1$2.', $body);
+ }
+
+ // Add current node to list of parent nodes for child nodes
+ $parent_nodes[] = $name;
+
+ // Recursive...fix any child nodes
+ $body = $parent_class->fix_begin_tokens($body, $parent_nodes);
+
+ // Need the parent variable name
+ array_pop($parent_nodes);
+ $parent = (!empty($parent_nodes)) ? end($parent_nodes) . '.' : '';
+
+ if ($subset !== '')
+ {
+ $subset = '|subset(' . $subset . ')';
+ }
+
+ $parent = ($parent) ?: 'loops.';
+ // Turn into a Twig for loop
+ return "{% for {$name} in {$parent}{$name}{$subset} %}{$body}{% endfor %}";
+ };
+
+ return preg_replace_callback('#<!-- BEGIN ([!a-zA-Z0-9_]+)(\([0-9,\-]+\))? -->(.+?)<!-- END \1 -->#s', $callback, $code);
+ }
+
+ /**
+ * Fix IF statements
+ *
+ * @param string $code
+ * @return string
+ */
+ protected function fix_if_tokens($code)
+ {
+ // Replace ELSE IF with ELSEIF
+ $code = preg_replace('#<!-- ELSE IF (.+?) -->#', '<!-- ELSEIF $1 -->', $code);
+
+ // Replace our "div by" with Twig's divisibleby (Twig does not like test names with spaces)
+ $code = preg_replace('# div by ([0-9]+)#', ' divisibleby($1)', $code);
+
+ $callback = function($matches)
+ {
+ $inner = $matches[2];
+ // Replace $TEST with definition.TEST
+ $inner = preg_replace('#(\s\(*!?)\$([a-zA-Z_0-9]+)#', '$1definition.$2', $inner);
+
+ // Replace .foo with loops.foo|length
+ $inner = preg_replace('#(\s\(*!?)\.([a-zA-Z_0-9]+)([^a-zA-Z_0-9\.])#', '$1loops.$2|length$3', $inner);
+
+ // Replace .foo.bar with foo.bar|length
+ $inner = preg_replace('#(\s\(*!?)\.([a-zA-Z_0-9\.]+)([^a-zA-Z_0-9\.])#', '$1$2|length$3', $inner);
+
+ return "<!-- {$matches[1]}IF{$inner}-->";
+ };
+
+ return preg_replace_callback('#<!-- (ELSE)?IF((.*?) \(*!?[\$|\.]([^\s]+)(.*?))-->#', $callback, $code);
+ }
+
+ /**
+ * Fix DEFINE statements and {$VARNAME} variables
+ *
+ * @param string $code
+ * @return string
+ */
+ protected function fix_define_tokens($code)
+ {
+ /**
+ * Changing $VARNAME to definition.varname because set is only local
+ * context (e.g. DEFINE $TEST will only make $TEST available in current
+ * template and any child templates, but not any parent templates).
+ *
+ * DEFINE handles setting it properly to definition in its node, but the
+ * variables reading FROM it need to be altered to definition.VARNAME
+ *
+ * Setting up definition as a class in the array passed to Twig
+ * ($context) makes set definition.TEST available in the global context
+ */
+
+ // Replace <!-- DEFINE $NAME with {% DEFINE definition.NAME
+ $code = preg_replace('#<!-- DEFINE \$(.*?) -->#', '{% DEFINE $1 %}', $code);
+
+ // Changing UNDEFINE NAME to DEFINE NAME = null to save from creating an extra token parser/node
+ $code = preg_replace('#<!-- UNDEFINE \$(.*?)-->#', '{% DEFINE $1= null %}', $code);
+
+ // Replace all of our variables, {$VARNAME}, with Twig style, {{ definition.VARNAME }}
+ $code = preg_replace('#{\$([a-zA-Z0-9_\.]+)}#', '{{ definition.$1 }}', $code);
+
+ // Replace all of our variables, ~ $VARNAME ~, with Twig style, ~ definition.VARNAME ~
+ $code = preg_replace('#~ \$([a-zA-Z0-9_\.]+) ~#', '~ definition.$1 ~', $code);
+
+ return $code;
+ }
+
+ /**
+ * Replace Twig tag masks with Twig tag calls
+ *
+ * E.g. <!-- BLOCK foo --> with {% block foo %}
+ *
+ * @param string $code
+ * @param array $twig_tags All tags we want to create a mask for
+ * @return string
+ */
+ protected function replace_twig_tag_masks($code, $twig_tags)
+ {
+ $callback = function ($matches)
+ {
+ $matches[1] = strtolower($matches[1]);
+
+ return "{% {$matches[1]}{$matches[2]}%}";
+ };
+
+ foreach ($twig_tags as &$tag)
+ {
+ $tag = strtoupper($tag);
+ }
+
+ // twig_tags is an array of the twig tags, which are all lowercase, but we use all uppercase tags
+ $code = preg_replace_callback('#<!-- (' . implode('|', $twig_tags) . ')(.*?)-->#',$callback, $code);
+
+ return $code;
+ }
+}
diff --git a/phpBB/phpbb/template/twig/loader.php b/phpBB/phpbb/template/twig/loader.php
new file mode 100644
index 0000000000..e01e9de467
--- /dev/null
+++ b/phpBB/phpbb/template/twig/loader.php
@@ -0,0 +1,144 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\template\twig;
+
+/**
+* Twig Template loader
+* @package phpBB3
+*/
+class loader extends \Twig_Loader_Filesystem
+{
+ protected $safe_directories = array();
+
+ /**
+ * Set safe directories
+ *
+ * @param array $directories Array of directories that are safe (empty to clear)
+ * @return Twig_Loader_Filesystem
+ */
+ public function setSafeDirectories($directories = array())
+ {
+ $this->safe_directories = array();
+
+ if (!empty($directories))
+ {
+ foreach ($directories as $directory)
+ {
+ $this->addSafeDirectory($directory);
+ }
+ }
+
+ return $this;
+ }
+
+ /**
+ * Add safe directory
+ *
+ * @param string $directory Directory that should be added
+ * @return Twig_Loader_Filesystem
+ */
+ public function addSafeDirectory($directory)
+ {
+ $directory = phpbb_realpath($directory);
+
+ if ($directory !== false)
+ {
+ $this->safe_directories[] = $directory;
+ }
+
+ return $this;
+ }
+
+ /**
+ * Get current safe directories
+ *
+ * @return array
+ */
+ public function getSafeDirectories()
+ {
+ return $this->safe_directories;
+ }
+
+ /**
+ * Override for parent::validateName()
+ *
+ * This is done because we added support for safe directories, and when Twig
+ * findTemplate() is called, validateName() is called first, which would
+ * always throw an exception if the file is outside of the configured
+ * template directories.
+ */
+ protected function validateName($name)
+ {
+ return;
+ }
+
+ /**
+ * Find the template
+ *
+ * Override for Twig_Loader_Filesystem::findTemplate to add support
+ * for loading from safe directories.
+ */
+ protected function findTemplate($name)
+ {
+ $name = (string) $name;
+
+ // normalize name
+ $name = preg_replace('#/{2,}#', '/', strtr($name, '\\', '/'));
+
+ // If this is in the cache we can skip the entire process below
+ // as it should have already been validated
+ if (isset($this->cache[$name])) {
+ return $this->cache[$name];
+ }
+
+ // First, find the template name. The override above of validateName
+ // causes the validateName process to be skipped for this call
+ $file = parent::findTemplate($name);
+
+ try
+ {
+ // Try validating the name (which may throw an exception)
+ parent::validateName($name);
+ }
+ catch (Twig_Error_Loader $e)
+ {
+ if (strpos($e->getRawMessage(), 'Looks like you try to load a template outside configured directories') === 0)
+ {
+ // Ok, so outside of the configured template directories, we
+ // can now check if we're within a "safe" directory
+
+ // Find the real path of the directory the file is in
+ $directory = phpbb_realpath(dirname($file));
+
+ if ($directory === false)
+ {
+ // Some sort of error finding the actual path, must throw the exception
+ throw $e;
+ }
+
+ foreach ($this->safe_directories as $safe_directory)
+ {
+ if (strpos($directory, $safe_directory) === 0)
+ {
+ // The directory being loaded is below a directory
+ // that is "safe". We're good to load it!
+ return $file;
+ }
+ }
+ }
+
+ // Not within any safe directories
+ throw $e;
+ }
+
+ // No exception from validateName, safe to load.
+ return $file;
+ }
+}
diff --git a/phpBB/phpbb/template/twig/node/definenode.php b/phpBB/phpbb/template/twig/node/definenode.php
new file mode 100644
index 0000000000..6a9969f8c6
--- /dev/null
+++ b/phpBB/phpbb/template/twig/node/definenode.php
@@ -0,0 +1,52 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2013 phpBB Group, sections (c) 2009 Fabien Potencier, Armin Ronacher
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\template\twig\node;
+
+
+class definenode extends \Twig_Node
+{
+ public function __construct($capture, \Twig_NodeInterface $name, \Twig_NodeInterface $value, $lineno, $tag = null)
+ {
+ parent::__construct(array('name' => $name, 'value' => $value), array('capture' => $capture, 'safe' => false), $lineno, $tag);
+ }
+
+ /**
+ * Compiles the node to PHP.
+ *
+ * @param Twig_Compiler A Twig_Compiler instance
+ */
+ public function compile(\Twig_Compiler $compiler)
+ {
+ $compiler->addDebugInfo($this);
+
+ if ($this->getAttribute('capture')) {
+ $compiler
+ ->write("ob_start();\n")
+ ->subcompile($this->getNode('value'))
+ ;
+
+ $compiler->write("\$value = ('' === \$value = ob_get_clean()) ? '' : new \Twig_Markup(\$value, \$this->env->getCharset());\n");
+ }
+ else
+ {
+ $compiler
+ ->write("\$value = ")
+ ->subcompile($this->getNode('value'))
+ ->raw(";\n")
+ ;
+ }
+
+ $compiler
+ ->write("\$context['definition']->set('")
+ ->raw($this->getNode('name')->getAttribute('name'))
+ ->raw("', \$value);\n")
+ ;
+ }
+}
diff --git a/phpBB/phpbb/template/twig/node/event.php b/phpBB/phpbb/template/twig/node/event.php
new file mode 100644
index 0000000000..7a1181a866
--- /dev/null
+++ b/phpBB/phpbb/template/twig/node/event.php
@@ -0,0 +1,79 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\template\twig\node;
+
+
+class event extends \Twig_Node
+{
+ /**
+ * The subdirectory in which all template listener files must be placed
+ * @var string
+ */
+ protected $listener_directory = 'event/';
+
+ /** @var Twig_Environment */
+ protected $environment;
+
+ public function __construct(\Twig_Node_Expression $expr, \phpbb\template\twig\environment $environment, $lineno, $tag = null)
+ {
+ $this->environment = $environment;
+
+ parent::__construct(array('expr' => $expr), array(), $lineno, $tag);
+ }
+
+ /**
+ * Compiles the node to PHP.
+ *
+ * @param Twig_Compiler A Twig_Compiler instance
+ */
+ public function compile(\Twig_Compiler $compiler)
+ {
+ $compiler->addDebugInfo($this);
+
+ $location = $this->listener_directory . $this->getNode('expr')->getAttribute('name');
+
+ foreach ($this->environment->get_phpbb_extensions() as $ext_namespace => $ext_path)
+ {
+ $ext_namespace = str_replace('/', '_', $ext_namespace);
+
+ if (defined('DEBUG'))
+ {
+ // If debug mode is enabled, lets check for new/removed EVENT
+ // templates on page load rather than at compile. This is
+ // slower, but makes developing extensions easier (no need to
+ // purge the cache when a new event template file is added)
+ $compiler
+ ->write("if (\$this->env->getLoader()->exists('@{$ext_namespace}/{$location}.html')) {\n")
+ ->indent()
+ ;
+ }
+
+ if (defined('DEBUG') || $this->environment->getLoader()->exists('@' . $ext_namespace . '/' . $location . '.html'))
+ {
+ $compiler
+ ->write("\$previous_look_up_order = \$this->env->getNamespaceLookUpOrder();\n")
+
+ // We set the namespace lookup order to be this extension first, then the main path
+ ->write("\$this->env->setNamespaceLookUpOrder(array('{$ext_namespace}', '__main__'));\n")
+ ->write("\$this->env->loadTemplate('@{$ext_namespace}/{$location}.html')->display(\$context);\n")
+ ->write("\$this->env->setNamespaceLookUpOrder(\$previous_look_up_order);\n")
+ ;
+ }
+
+ if (defined('DEBUG'))
+ {
+ $compiler
+ ->outdent()
+ ->write("}\n\n")
+ ;
+ }
+ }
+ }
+}
diff --git a/phpBB/phpbb/template/twig/node/expression/binary/equalequal.php b/phpBB/phpbb/template/twig/node/expression/binary/equalequal.php
new file mode 100644
index 0000000000..f3bbfa6691
--- /dev/null
+++ b/phpBB/phpbb/template/twig/node/expression/binary/equalequal.php
@@ -0,0 +1,19 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\template\twig\node\expression\binary;
+
+
+class equalequal extends \Twig_Node_Expression_Binary
+{
+ public function operator(\Twig_Compiler $compiler)
+ {
+ return $compiler->raw('===');
+ }
+}
diff --git a/phpBB/phpbb/template/twig/node/expression/binary/notequalequal.php b/phpBB/phpbb/template/twig/node/expression/binary/notequalequal.php
new file mode 100644
index 0000000000..c9c2687e08
--- /dev/null
+++ b/phpBB/phpbb/template/twig/node/expression/binary/notequalequal.php
@@ -0,0 +1,19 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\template\twig\node\expression\binary;
+
+
+class notequalequal extends \Twig_Node_Expression_Binary
+{
+ public function operator(\Twig_Compiler $compiler)
+ {
+ return $compiler->raw('!==');
+ }
+}
diff --git a/phpBB/phpbb/template/twig/node/includeasset.php b/phpBB/phpbb/template/twig/node/includeasset.php
new file mode 100644
index 0000000000..f6c9dc9c58
--- /dev/null
+++ b/phpBB/phpbb/template/twig/node/includeasset.php
@@ -0,0 +1,77 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\template\twig\node;
+
+abstract class includeasset extends \Twig_Node
+{
+ /** @var Twig_Environment */
+ protected $environment;
+
+ public function __construct(\Twig_Node_Expression $expr, \phpbb\template\twig\environment $environment, $lineno, $tag = null)
+ {
+ $this->environment = $environment;
+
+ parent::__construct(array('expr' => $expr), array(), $lineno, $tag);
+ }
+ /**
+ * Compiles the node to PHP.
+ *
+ * @param Twig_Compiler A Twig_Compiler instance
+ */
+ public function compile(\Twig_Compiler $compiler)
+ {
+ $compiler->addDebugInfo($this);
+
+ $config = $this->environment->get_phpbb_config();
+
+ $compiler
+ ->write("\$asset_file = ")
+ ->subcompile($this->getNode('expr'))
+ ->raw(";\n")
+ ->write("\$asset = new \phpbb\\template\\asset(\$asset_file, \$this->getEnvironment()->get_path_helper());\n")
+ ->write("if (substr(\$asset_file, 0, 2) !== './' && \$asset->is_relative()) {\n")
+ ->indent()
+ ->write("\$asset_path = \$asset->get_path();")
+ ->write("\$local_file = \$this->getEnvironment()->get_phpbb_root_path() . \$asset_path;\n")
+ ->write("if (!file_exists(\$local_file)) {\n")
+ ->indent()
+ ->write("\$local_file = \$this->getEnvironment()->findTemplate(\$asset_path);\n")
+ ->write("\$asset->set_path(\$local_file, true);\n")
+ ->outdent()
+ ->write("\$asset->add_assets_version('{$config['assets_version']}');\n")
+ ->write("\$asset_file = \$asset->get_url();\n")
+ ->write("}\n")
+ ->outdent()
+ ->write("}\n")
+ ->write("\$context['definition']->append('{$this->get_definition_name()}', '")
+ ;
+
+ $this->append_asset($compiler);
+
+ $compiler
+ ->raw("\n');\n")
+ ;
+ }
+
+ /**
+ * Get the definition name
+ *
+ * @return string (e.g. 'SCRIPTS')
+ */
+ abstract public function get_definition_name();
+
+ /**
+ * Append the output code for the asset
+ *
+ * @param Twig_Compiler A Twig_Compiler instance
+ * @return null
+ */
+ abstract protected function append_asset(\Twig_Compiler $compiler);
+}
diff --git a/phpBB/phpbb/template/twig/node/includecss.php b/phpBB/phpbb/template/twig/node/includecss.php
new file mode 100644
index 0000000000..deb279fa4a
--- /dev/null
+++ b/phpBB/phpbb/template/twig/node/includecss.php
@@ -0,0 +1,33 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\template\twig\node;
+
+class includecss extends \phpbb\template\twig\node\includeasset
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function get_definition_name()
+ {
+ return 'STYLESHEETS';
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function append_asset(\Twig_Compiler $compiler)
+ {
+ $compiler
+ ->raw("<link href=\"' . ")
+ ->raw("\$asset_file . '\"")
+ ->raw(' rel="stylesheet" type="text/css" media="screen, projection" />')
+ ;
+ }
+}
diff --git a/phpBB/phpbb/template/twig/node/includejs.php b/phpBB/phpbb/template/twig/node/includejs.php
new file mode 100644
index 0000000000..696b640eac
--- /dev/null
+++ b/phpBB/phpbb/template/twig/node/includejs.php
@@ -0,0 +1,35 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\template\twig\node;
+
+class includejs extends \phpbb\template\twig\node\includeasset
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function get_definition_name()
+ {
+ return 'SCRIPTS';
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function append_asset(\Twig_Compiler $compiler)
+ {
+ $config = $this->environment->get_phpbb_config();
+
+ $compiler
+ ->raw("<script type=\"text/javascript\" src=\"' . ")
+ ->raw("\$asset_file")
+ ->raw(". '\"></script>\n")
+ ;
+ }
+}
diff --git a/phpBB/phpbb/template/twig/node/includenode.php b/phpBB/phpbb/template/twig/node/includenode.php
new file mode 100644
index 0000000000..d9b45d6407
--- /dev/null
+++ b/phpBB/phpbb/template/twig/node/includenode.php
@@ -0,0 +1,50 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\template\twig\node;
+
+
+class includenode extends \Twig_Node_Include
+{
+ /**
+ * Compiles the node to PHP.
+ *
+ * @param Twig_Compiler A Twig_Compiler instance
+ */
+ public function compile(\Twig_Compiler $compiler)
+ {
+ $compiler->addDebugInfo($this);
+
+ $compiler
+ ->write("\$location = ")
+ ->subcompile($this->getNode('expr'))
+ ->raw(";\n")
+ ->write("\$namespace = false;\n")
+ ->write("if (strpos(\$location, '@') === 0) {\n")
+ ->indent()
+ ->write("\$namespace = substr(\$location, 1, strpos(\$location, '/') - 1);\n")
+ ->write("\$previous_look_up_order = \$this->env->getNamespaceLookUpOrder();\n")
+
+ // We set the namespace lookup order to be this namespace first, then the main path
+ ->write("\$this->env->setNamespaceLookUpOrder(array(\$namespace, '__main__'));\n")
+ ->outdent()
+ ->write("}\n")
+ ;
+
+ parent::compile($compiler);
+
+ $compiler
+ ->write("if (\$namespace) {\n")
+ ->indent()
+ ->write("\$this->env->setNamespaceLookUpOrder(\$previous_look_up_order);\n")
+ ->outdent()
+ ->write("}\n")
+ ;
+ }
+}
diff --git a/phpBB/phpbb/template/twig/node/includephp.php b/phpBB/phpbb/template/twig/node/includephp.php
new file mode 100644
index 0000000000..3f4621c0a9
--- /dev/null
+++ b/phpBB/phpbb/template/twig/node/includephp.php
@@ -0,0 +1,85 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2013 phpBB Group, sections (c) 2009 Fabien Potencier, Armin Ronacher
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\template\twig\node;
+
+
+class includephp extends \Twig_Node
+{
+ /** @var Twig_Environment */
+ protected $environment;
+
+ public function __construct(\Twig_Node_Expression $expr, \phpbb\template\twig\environment $environment, $lineno, $ignoreMissing = false, $tag = null)
+ {
+ $this->environment = $environment;
+
+ parent::__construct(array('expr' => $expr), array('ignore_missing' => (Boolean) $ignoreMissing), $lineno, $tag);
+ }
+
+ /**
+ * Compiles the node to PHP.
+ *
+ * @param Twig_Compiler A Twig_Compiler instance
+ */
+ public function compile(\Twig_Compiler $compiler)
+ {
+ $compiler->addDebugInfo($this);
+
+ $config = $this->environment->get_phpbb_config();
+
+ if (!$config['tpl_allow_php'])
+ {
+ $compiler
+ ->write("// INCLUDEPHP Disabled\n")
+ ;
+
+ return;
+ }
+
+ if ($this->getAttribute('ignore_missing')) {
+ $compiler
+ ->write("try {\n")
+ ->indent()
+ ;
+ }
+
+ $compiler
+ ->write("\$location = ")
+ ->subcompile($this->getNode('expr'))
+ ->raw(";\n")
+ ->write("if (phpbb_is_absolute(\$location)) {\n")
+ ->indent()
+ // Absolute path specified
+ ->write("require(\$location);\n")
+ ->outdent()
+ ->write("} else if (file_exists(\$this->getEnvironment()->get_phpbb_root_path() . \$location)) {\n")
+ ->indent()
+ // PHP file relative to phpbb_root_path
+ ->write("require(\$this->getEnvironment()->get_phpbb_root_path() . \$location);\n")
+ ->outdent()
+ ->write("} else {\n")
+ ->indent()
+ // Local path (behaves like INCLUDE)
+ ->write("require(\$this->getEnvironment()->getLoader()->getCacheKey(\$location));\n")
+ ->outdent()
+ ->write("}\n")
+ ;
+
+ if ($this->getAttribute('ignore_missing')) {
+ $compiler
+ ->outdent()
+ ->write("} catch (\Twig_Error_Loader \$e) {\n")
+ ->indent()
+ ->write("// ignore missing template\n")
+ ->outdent()
+ ->write("}\n\n")
+ ;
+ }
+ }
+}
diff --git a/phpBB/phpbb/template/twig/node/php.php b/phpBB/phpbb/template/twig/node/php.php
new file mode 100644
index 0000000000..2b18551266
--- /dev/null
+++ b/phpBB/phpbb/template/twig/node/php.php
@@ -0,0 +1,49 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\template\twig\node;
+
+
+class php extends \Twig_Node
+{
+ /** @var Twig_Environment */
+ protected $environment;
+
+ public function __construct(\Twig_Node_Text $text, \phpbb\template\twig\environment $environment, $lineno, $tag = null)
+ {
+ $this->environment = $environment;
+
+ parent::__construct(array('text' => $text), array(), $lineno, $tag);
+ }
+
+ /**
+ * Compiles the node to PHP.
+ *
+ * @param Twig_Compiler A Twig_Compiler instance
+ */
+ public function compile(\Twig_Compiler $compiler)
+ {
+ $compiler->addDebugInfo($this);
+
+ $config = $this->environment->get_phpbb_config();
+
+ if (!$config['tpl_allow_php'])
+ {
+ $compiler
+ ->write("// PHP Disabled\n")
+ ;
+
+ return;
+ }
+
+ $compiler
+ ->raw($this->getNode('text')->getAttribute('data'))
+ ;
+ }
+}
diff --git a/phpBB/phpbb/template/twig/tokenparser/defineparser.php b/phpBB/phpbb/template/twig/tokenparser/defineparser.php
new file mode 100644
index 0000000000..8484f2e81a
--- /dev/null
+++ b/phpBB/phpbb/template/twig/tokenparser/defineparser.php
@@ -0,0 +1,67 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2013 phpBB Group, sections (c) 2009 Fabien Potencier
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\template\twig\tokenparser;
+
+
+class defineparser extends \Twig_TokenParser
+{
+ /**
+ * Parses a token and returns a node.
+ *
+ * @param Twig_Token $token A Twig_Token instance
+ *
+ * @return Twig_NodeInterface A Twig_NodeInterface instance
+ */
+ public function parse(\Twig_Token $token)
+ {
+ $lineno = $token->getLine();
+ $stream = $this->parser->getStream();
+ $name = $this->parser->getExpressionParser()->parseExpression();
+
+ $capture = false;
+ if ($stream->test(\Twig_Token::OPERATOR_TYPE, '=')) {
+ $stream->next();
+ $value = $this->parser->getExpressionParser()->parseExpression();
+
+ if ($value instanceof \Twig_Node_Expression_Name)
+ {
+ // This would happen if someone improperly formed their DEFINE syntax
+ // e.g. <!-- DEFINE $VAR = foo -->
+ throw new \Twig_Error_Syntax('Invalid DEFINE', $token->getLine(), $this->parser->getFilename());
+ }
+
+ $stream->expect(\Twig_Token::BLOCK_END_TYPE);
+ } else {
+ $capture = true;
+
+ $stream->expect(\Twig_Token::BLOCK_END_TYPE);
+
+ $value = $this->parser->subparse(array($this, 'decideBlockEnd'), true);
+ $stream->expect(\Twig_Token::BLOCK_END_TYPE);
+ }
+
+ return new \phpbb\template\twig\node\definenode($capture, $name, $value, $lineno, $this->getTag());
+ }
+
+ public function decideBlockEnd(\Twig_Token $token)
+ {
+ return $token->test('ENDDEFINE');
+ }
+
+ /**
+ * Gets the tag name associated with this token parser.
+ *
+ * @return string The tag name
+ */
+ public function getTag()
+ {
+ return 'DEFINE';
+ }
+}
diff --git a/phpBB/phpbb/template/twig/tokenparser/event.php b/phpBB/phpbb/template/twig/tokenparser/event.php
new file mode 100644
index 0000000000..8864e879f8
--- /dev/null
+++ b/phpBB/phpbb/template/twig/tokenparser/event.php
@@ -0,0 +1,41 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\template\twig\tokenparser;
+
+
+class event extends \Twig_TokenParser
+{
+ /**
+ * Parses a token and returns a node.
+ *
+ * @param Twig_Token $token A Twig_Token instance
+ *
+ * @return Twig_NodeInterface A Twig_NodeInterface instance
+ */
+ public function parse(\Twig_Token $token)
+ {
+ $expr = $this->parser->getExpressionParser()->parseExpression();
+
+ $stream = $this->parser->getStream();
+ $stream->expect(\Twig_Token::BLOCK_END_TYPE);
+
+ return new \phpbb\template\twig\node\event($expr, $this->parser->getEnvironment(), $token->getLine(), $this->getTag());
+ }
+
+ /**
+ * Gets the tag name associated with this token parser.
+ *
+ * @return string The tag name
+ */
+ public function getTag()
+ {
+ return 'EVENT';
+ }
+}
diff --git a/phpBB/phpbb/template/twig/tokenparser/includecss.php b/phpBB/phpbb/template/twig/tokenparser/includecss.php
new file mode 100644
index 0000000000..7bf4c610b1
--- /dev/null
+++ b/phpBB/phpbb/template/twig/tokenparser/includecss.php
@@ -0,0 +1,40 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\template\twig\tokenparser;
+
+class includecss extends \Twig_TokenParser
+{
+ /**
+ * Parses a token and returns a node.
+ *
+ * @param Twig_Token $token A Twig_Token instance
+ *
+ * @return Twig_NodeInterface A Twig_NodeInterface instance
+ */
+ public function parse(\Twig_Token $token)
+ {
+ $expr = $this->parser->getExpressionParser()->parseExpression();
+
+ $stream = $this->parser->getStream();
+ $stream->expect(\Twig_Token::BLOCK_END_TYPE);
+
+ return new \phpbb\template\twig\node\includecss($expr, $this->parser->getEnvironment(), $token->getLine(), $this->getTag());
+ }
+
+ /**
+ * Gets the tag name associated with this token parser.
+ *
+ * @return string The tag name
+ */
+ public function getTag()
+ {
+ return 'INCLUDECSS';
+ }
+}
diff --git a/phpBB/phpbb/template/twig/tokenparser/includejs.php b/phpBB/phpbb/template/twig/tokenparser/includejs.php
new file mode 100644
index 0000000000..0e46915b86
--- /dev/null
+++ b/phpBB/phpbb/template/twig/tokenparser/includejs.php
@@ -0,0 +1,41 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\template\twig\tokenparser;
+
+
+class includejs extends \Twig_TokenParser
+{
+ /**
+ * Parses a token and returns a node.
+ *
+ * @param Twig_Token $token A Twig_Token instance
+ *
+ * @return Twig_NodeInterface A Twig_NodeInterface instance
+ */
+ public function parse(\Twig_Token $token)
+ {
+ $expr = $this->parser->getExpressionParser()->parseExpression();
+
+ $stream = $this->parser->getStream();
+ $stream->expect(\Twig_Token::BLOCK_END_TYPE);
+
+ return new \phpbb\template\twig\node\includejs($expr, $this->parser->getEnvironment(), $token->getLine(), $this->getTag());
+ }
+
+ /**
+ * Gets the tag name associated with this token parser.
+ *
+ * @return string The tag name
+ */
+ public function getTag()
+ {
+ return 'INCLUDEJS';
+ }
+}
diff --git a/phpBB/phpbb/template/twig/tokenparser/includeparser.php b/phpBB/phpbb/template/twig/tokenparser/includeparser.php
new file mode 100644
index 0000000000..d351f1b4cd
--- /dev/null
+++ b/phpBB/phpbb/template/twig/tokenparser/includeparser.php
@@ -0,0 +1,40 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2013 phpBB Group, sections (c) 2009 Fabien Potencier
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\template\twig\tokenparser;
+
+
+class includeparser extends \Twig_TokenParser_Include
+{
+ /**
+ * Parses a token and returns a node.
+ *
+ * @param Twig_Token $token A Twig_Token instance
+ *
+ * @return Twig_NodeInterface A Twig_NodeInterface instance
+ */
+ public function parse(\Twig_Token $token)
+ {
+ $expr = $this->parser->getExpressionParser()->parseExpression();
+
+ list($variables, $only, $ignoreMissing) = $this->parseArguments();
+
+ return new \phpbb\template\twig\node\includenode($expr, $variables, $only, $ignoreMissing, $token->getLine(), $this->getTag());
+ }
+
+ /**
+ * Gets the tag name associated with this token parser.
+ *
+ * @return string The tag name
+ */
+ public function getTag()
+ {
+ return 'INCLUDE';
+ }
+}
diff --git a/phpBB/phpbb/template/twig/tokenparser/includephp.php b/phpBB/phpbb/template/twig/tokenparser/includephp.php
new file mode 100644
index 0000000000..1b3d1742e3
--- /dev/null
+++ b/phpBB/phpbb/template/twig/tokenparser/includephp.php
@@ -0,0 +1,50 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2013 phpBB Group, sections (c) 2009 Fabien Potencier, Armin Ronacher
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\template\twig\tokenparser;
+
+
+class includephp extends \Twig_TokenParser
+{
+ /**
+ * Parses a token and returns a node.
+ *
+ * @param Twig_Token $token A Twig_Token instance
+ *
+ * @return Twig_NodeInterface A Twig_NodeInterface instance
+ */
+ public function parse(\Twig_Token $token)
+ {
+ $expr = $this->parser->getExpressionParser()->parseExpression();
+
+ $stream = $this->parser->getStream();
+
+ $ignoreMissing = false;
+ if ($stream->test(\Twig_Token::NAME_TYPE, 'ignore')) {
+ $stream->next();
+ $stream->expect(\Twig_Token::NAME_TYPE, 'missing');
+
+ $ignoreMissing = true;
+ }
+
+ $stream->expect(\Twig_Token::BLOCK_END_TYPE);
+
+ return new \phpbb\template\twig\node\includephp($expr, $this->parser->getEnvironment(), $token->getLine(), $ignoreMissing, $this->getTag());
+ }
+
+ /**
+ * Gets the tag name associated with this token parser.
+ *
+ * @return string The tag name
+ */
+ public function getTag()
+ {
+ return 'INCLUDEPHP';
+ }
+}
diff --git a/phpBB/phpbb/template/twig/tokenparser/php.php b/phpBB/phpbb/template/twig/tokenparser/php.php
new file mode 100644
index 0000000000..b427969e2d
--- /dev/null
+++ b/phpBB/phpbb/template/twig/tokenparser/php.php
@@ -0,0 +1,49 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\template\twig\tokenparser;
+
+
+class php extends \Twig_TokenParser
+{
+ /**
+ * Parses a token and returns a node.
+ *
+ * @param Twig_Token $token A Twig_Token instance
+ *
+ * @return Twig_NodeInterface A Twig_NodeInterface instance
+ */
+ public function parse(\Twig_Token $token)
+ {
+ $stream = $this->parser->getStream();
+
+ $stream->expect(\Twig_Token::BLOCK_END_TYPE);
+
+ $body = $this->parser->subparse(array($this, 'decideEnd'), true);
+
+ $stream->expect(\Twig_Token::BLOCK_END_TYPE);
+
+ return new \phpbb\template\twig\node\php($body, $this->parser->getEnvironment(), $token->getLine(), $this->getTag());
+ }
+
+ public function decideEnd(\Twig_Token $token)
+ {
+ return $token->test('ENDPHP');
+ }
+
+ /**
+ * Gets the tag name associated with this token parser.
+ *
+ * @return string The tag name
+ */
+ public function getTag()
+ {
+ return 'PHP';
+ }
+}
diff --git a/phpBB/phpbb/template/twig/twig.php b/phpBB/phpbb/template/twig/twig.php
new file mode 100644
index 0000000000..83630f5992
--- /dev/null
+++ b/phpBB/phpbb/template/twig/twig.php
@@ -0,0 +1,335 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\template\twig;
+
+/**
+* Twig Template class.
+* @package phpBB3
+*/
+class twig extends \phpbb\template\base
+{
+ /**
+ * Path of the cache directory for the template
+ *
+ * Cannot be changed during runtime.
+ *
+ * @var string
+ */
+ private $cachepath = '';
+
+ /**
+ * phpBB path helper
+ * @var \phpbb\path_helper
+ */
+ protected $path_helper;
+
+ /**
+ * phpBB root path
+ * @var string
+ */
+ protected $phpbb_root_path;
+
+ /**
+ * PHP file extension
+ * @var string
+ */
+ protected $php_ext;
+
+ /**
+ * phpBB config instance
+ * @var \phpbb\config\config
+ */
+ protected $config;
+
+ /**
+ * Current user
+ * @var \phpbb\user
+ */
+ protected $user;
+
+ /**
+ * Extension manager.
+ *
+ * @var \phpbb\extension\manager
+ */
+ protected $extension_manager;
+
+ /**
+ * Twig Environment
+ *
+ * @var Twig_Environment
+ */
+ protected $twig;
+
+ /**
+ * Constructor.
+ *
+ * @param \phpbb\path_helper $path_helper
+ * @param \phpbb\config\config $config
+ * @param \phpbb\user $user
+ * @param \phpbb\template\context $context template context
+ * @param \phpbb\extension\manager $extension_manager extension manager, if null then template events will not be invoked
+ */
+ public function __construct(\phpbb\path_helper $path_helper, $config, $user, \phpbb\template\context $context, \phpbb\extension\manager $extension_manager = null)
+ {
+ $this->path_helper = $path_helper;
+ $this->phpbb_root_path = $path_helper->get_phpbb_root_path();
+ $this->php_ext = $path_helper->get_php_ext();
+ $this->config = $config;
+ $this->user = $user;
+ $this->context = $context;
+ $this->extension_manager = $extension_manager;
+
+ $this->cachepath = $this->phpbb_root_path . 'cache/twig/';
+
+ // Initiate the loader, __main__ namespace paths will be setup later in set_style_names()
+ $loader = new \phpbb\template\twig\loader('');
+
+ $this->twig = new \phpbb\template\twig\environment(
+ $this->config,
+ $this->path_helper,
+ $this->extension_manager,
+ $loader,
+ array(
+ 'cache' => (defined('IN_INSTALL')) ? false : $this->cachepath,
+ 'debug' => defined('DEBUG'),
+ 'auto_reload' => (bool) $this->config['load_tplcompile'],
+ 'autoescape' => false,
+ )
+ );
+
+ $this->twig->addExtension(
+ new \phpbb\template\twig\extension(
+ $this->context,
+ $this->user
+ )
+ );
+
+ $lexer = new \phpbb\template\twig\lexer($this->twig);
+
+ $this->twig->setLexer($lexer);
+
+ // Add admin namespace
+ if ($this->path_helper->get_adm_relative_path() !== null && is_dir($this->phpbb_root_path . $this->path_helper->get_adm_relative_path() . 'style/'))
+ {
+ $this->twig->getLoader()->setPaths($this->phpbb_root_path . $this->path_helper->get_adm_relative_path() . 'style/', 'admin');
+ }
+ }
+
+ /**
+ * Clear the cache
+ *
+ * @return \phpbb\template\template
+ */
+ public function clear_cache()
+ {
+ if (is_dir($this->cachepath))
+ {
+ $this->twig->clearCacheFiles();
+ }
+
+ return $this;
+ }
+
+ /**
+ * Get the style tree of the style preferred by the current user
+ *
+ * @return array Style tree, most specific first
+ */
+ public function get_user_style()
+ {
+ $style_list = array(
+ $this->user->style['style_path'],
+ );
+
+ if ($this->user->style['style_parent_id'])
+ {
+ $style_list = array_merge($style_list, array_reverse(explode('/', $this->user->style['style_parent_tree'])));
+ }
+
+ return $style_list;
+ }
+
+ /**
+ * Set style location based on (current) user's chosen style.
+ *
+ * @param array $style_directories The directories to add style paths for
+ * E.g. array('ext/foo/bar/styles', 'styles')
+ * Default: array('styles') (phpBB's style directory)
+ * @return \phpbb\template\template $this
+ */
+ public function set_style($style_directories = array('styles'))
+ {
+ if ($style_directories !== array('styles') && $this->twig->getLoader()->getPaths('core') === array())
+ {
+ // We should set up the core styles path since not already setup
+ $this->set_style();
+ }
+
+ $names = $this->get_user_style();
+
+ $paths = array();
+ foreach ($style_directories as $directory)
+ {
+ foreach ($names as $name)
+ {
+ $path = $this->phpbb_root_path . trim($directory, '/') . "/{$name}/";
+ $template_path = $path . 'template/';
+
+ if (is_dir($template_path))
+ {
+ // Add the base style directory as a safe directory
+ $this->twig->getLoader()->addSafeDirectory($path);
+
+ $paths[] = $template_path;
+ }
+ }
+ }
+
+ // If we're setting up the main phpBB styles directory and the core
+ // namespace isn't setup yet, we will set it up now
+ if ($style_directories === array('styles') && $this->twig->getLoader()->getPaths('core') === array())
+ {
+ // Set up the core style paths namespace
+ $this->twig->getLoader()->setPaths($paths, 'core');
+ }
+
+ $this->set_custom_style($names, $paths);
+
+ return $this;
+ }
+
+ /**
+ * Set custom style location (able to use directory outside of phpBB).
+ *
+ * Note: Templates are still compiled to phpBB's cache directory.
+ *
+ * @param string|array $names Array of names or string of name of template(s) in inheritance tree order, used by extensions.
+ * @param string|array or string $paths Array of style paths, relative to current root directory
+ * @return phpbb_template $this
+ */
+ public function set_custom_style($names, $paths)
+ {
+ $paths = (is_string($paths)) ? array($paths) : $paths;
+ $names = (is_string($names)) ? array($names) : $names;
+
+ // Set as __main__ namespace
+ $this->twig->getLoader()->setPaths($paths);
+
+ // Add all namespaces for all extensions
+ if ($this->extension_manager instanceof \phpbb\extension\manager)
+ {
+ $names[] = 'all';
+
+ foreach ($this->extension_manager->all_enabled() as $ext_namespace => $ext_path)
+ {
+ // namespaces cannot contain /
+ $namespace = str_replace('/', '_', $ext_namespace);
+ $paths = array();
+
+ foreach ($names as $style_name)
+ {
+ $ext_style_path = $ext_path . 'styles/' . $style_name . '/';
+ $ext_style_template_path = $ext_style_path . 'template/';
+
+ if (is_dir($ext_style_template_path))
+ {
+ // Add the base style directory as a safe directory
+ $this->twig->getLoader()->addSafeDirectory($ext_style_path);
+
+ $paths[] = $ext_style_template_path;
+ }
+ }
+
+ $this->twig->getLoader()->setPaths($paths, $namespace);
+ }
+ }
+
+ return $this;
+ }
+
+ /**
+ * Display a template for provided handle.
+ *
+ * The template will be loaded and compiled, if necessary, first.
+ *
+ * This function calls hooks.
+ *
+ * @param string $handle Handle to display
+ * @return \phpbb\template\template $this
+ */
+ public function display($handle)
+ {
+ $result = $this->call_hook($handle, __FUNCTION__);
+ if ($result !== false)
+ {
+ return $result[0];
+ }
+
+ $this->twig->display($this->get_filename_from_handle($handle), $this->get_template_vars());
+
+ return $this;
+ }
+
+ /**
+ * Display the handle and assign the output to a template variable
+ * or return the compiled result.
+ *
+ * @param string $handle Handle to operate on
+ * @param string $template_var Template variable to assign compiled handle to
+ * @param bool $return_content If true return compiled handle, otherwise assign to $template_var
+ * @return \phpbb\template\template|string if $return_content is true return string of the compiled handle, otherwise return $this
+ */
+ public function assign_display($handle, $template_var = '', $return_content = true)
+ {
+ if ($return_content)
+ {
+ return $this->twig->render($this->get_filename_from_handle($handle), $this->get_template_vars());
+ }
+
+ $this->assign_var($template_var, $this->twig->render($this->get_filename_from_handle($handle, $this->get_template_vars())));
+
+ return $this;
+ }
+
+ /**
+ * Get template vars in a format Twig will use (from the context)
+ *
+ * @return array
+ */
+ protected function get_template_vars()
+ {
+ $context_vars = $this->context->get_data_ref();
+
+ $vars = array_merge(
+ $context_vars['.'][0], // To get normal vars
+ array(
+ 'definition' => new \phpbb\template\twig\definition(),
+ 'user' => $this->user,
+ 'loops' => $context_vars, // To get loops
+ )
+ );
+
+ // cleanup
+ unset($vars['loops']['.']);
+
+ return $vars;
+ }
+
+ /**
+ * Get path to template for handle (required for BBCode parser)
+ *
+ * @return string
+ */
+ public function get_source_file_for_handle($handle)
+ {
+ return $this->twig->getLoader()->getCacheKey($this->get_filename_from_handle($handle));
+ }
+}
diff --git a/phpBB/phpbb/tree/nestedset.php b/phpBB/phpbb/tree/nestedset.php
new file mode 100644
index 0000000000..2bfb65732d
--- /dev/null
+++ b/phpBB/phpbb/tree/nestedset.php
@@ -0,0 +1,870 @@
+<?php
+/**
+*
+* @package tree
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\tree;
+
+abstract class nestedset implements \phpbb\tree\tree_interface
+{
+ /** @var \phpbb\db\driver\driver */
+ protected $db;
+
+ /** @var \phpbb\lock\db */
+ protected $lock;
+
+ /** @var string */
+ protected $table_name;
+
+ /**
+ * Prefix for the language keys returned by exceptions
+ * @var string
+ */
+ protected $message_prefix = '';
+
+ /**
+ * Column names in the table
+ * @var string
+ */
+ protected $column_item_id = 'item_id';
+ protected $column_left_id = 'left_id';
+ protected $column_right_id = 'right_id';
+ protected $column_parent_id = 'parent_id';
+ protected $column_item_parents = 'item_parents';
+
+ /**
+ * Additional SQL restrictions
+ * Allows to have multiple nested sets in one table
+ * @var string
+ */
+ protected $sql_where = '';
+
+ /**
+ * List of item properties to be cached in the item_parents column
+ * @var array
+ */
+ protected $item_basic_data = array('*');
+
+ /**
+ * Construct
+ *
+ * @param \phpbb\db\driver\driver $db Database connection
+ * @param \phpbb\lock\db $lock Lock class used to lock the table when moving forums around
+ * @param string $table_name Table name
+ * @param string $message_prefix Prefix for the messages thrown by exceptions
+ * @param string $sql_where Additional SQL restrictions for the queries
+ * @param array $item_basic_data Array with basic item data that is stored in item_parents
+ * @param array $columns Array with column names to overwrite
+ */
+ public function __construct(\phpbb\db\driver\driver $db, \phpbb\lock\db $lock, $table_name, $message_prefix = '', $sql_where = '', $item_basic_data = array(), $columns = array())
+ {
+ $this->db = $db;
+ $this->lock = $lock;
+
+ $this->table_name = $table_name;
+ $this->message_prefix = $message_prefix;
+ $this->sql_where = $sql_where;
+ $this->item_basic_data = (!empty($item_basic_data)) ? $item_basic_data : array('*');
+
+ if (!empty($columns))
+ {
+ foreach ($columns as $column => $name)
+ {
+ $column_name = 'column_' . $column;
+ $this->$column_name = $name;
+ }
+ }
+ }
+
+ /**
+ * Returns additional sql where restrictions
+ *
+ * @param string $operator SQL operator that needs to be prepended to sql_where,
+ * if it is not empty.
+ * @param string $column_prefix Prefix that needs to be prepended to column names
+ * @return string Returns additional where statements to narrow down the tree,
+ * prefixed with operator and prepended column_prefix to column names
+ */
+ public function get_sql_where($operator = 'AND', $column_prefix = '')
+ {
+ return (!$this->sql_where) ? '' : $operator . ' ' . sprintf($this->sql_where, $column_prefix);
+ }
+
+ /**
+ * Acquires a lock on the item table
+ *
+ * @return bool True if the lock was acquired, false if it has been acquired previously
+ *
+ * @throws RuntimeException If the lock could not be acquired
+ */
+ protected function acquire_lock()
+ {
+ if ($this->lock->owns_lock())
+ {
+ return false;
+ }
+
+ if (!$this->lock->acquire())
+ {
+ throw new \RuntimeException($this->message_prefix . 'LOCK_FAILED_ACQUIRE');
+ }
+
+ return true;
+ }
+
+ /**
+ * @inheritdoc
+ */
+ public function insert(array $additional_data)
+ {
+ $item_data = $this->reset_nestedset_values($additional_data);
+
+ $sql = 'INSERT INTO ' . $this->table_name . ' ' . $this->db->sql_build_array('INSERT', $item_data);
+ $this->db->sql_query($sql);
+
+ $item_data[$this->column_item_id] = (int) $this->db->sql_nextid();
+
+ return array_merge($item_data, $this->add_item_to_nestedset($item_data[$this->column_item_id]));
+ }
+
+ /**
+ * Add an item which already has a database row at the end of the tree
+ *
+ * @param int $item_id The item to be added
+ * @return array Array with updated data, if the item was added successfully
+ * Empty array otherwise
+ */
+ protected function add_item_to_nestedset($item_id)
+ {
+ $sql = 'SELECT MAX(' . $this->column_right_id . ') AS ' . $this->column_right_id . '
+ FROM ' . $this->table_name . '
+ ' . $this->get_sql_where('WHERE');
+ $result = $this->db->sql_query($sql);
+ $current_max_right_id = (int) $this->db->sql_fetchfield($this->column_right_id);
+ $this->db->sql_freeresult($result);
+
+ $update_item_data = array(
+ $this->column_parent_id => 0,
+ $this->column_left_id => $current_max_right_id + 1,
+ $this->column_right_id => $current_max_right_id + 2,
+ $this->column_item_parents => '',
+ );
+
+ $sql = 'UPDATE ' . $this->table_name . '
+ SET ' . $this->db->sql_build_array('UPDATE', $update_item_data) . '
+ WHERE ' . $this->column_item_id . ' = ' . (int) $item_id . '
+ AND ' . $this->column_parent_id . ' = 0
+ AND ' . $this->column_left_id . ' = 0
+ AND ' . $this->column_right_id . ' = 0';
+ $this->db->sql_query($sql);
+
+ return ($this->db->sql_affectedrows() == 1) ? $update_item_data : array();
+ }
+
+ /**
+ * Remove an item from the tree without deleting it from the database
+ *
+ * Also removes all subitems from the tree without deleting them from the database either
+ *
+ * @param int $item_id The item to be deleted
+ * @return array Item ids that have been removed
+ */
+ protected function remove_item_from_nestedset($item_id)
+ {
+ $item_id = (int) $item_id;
+ if (!$item_id)
+ {
+ throw new \OutOfBoundsException($this->message_prefix . 'INVALID_ITEM');
+ }
+
+ $items = $this->get_subtree_data($item_id);
+ $item_ids = array_keys($items);
+
+ if (empty($items) || !isset($items[$item_id]))
+ {
+ throw new \OutOfBoundsException($this->message_prefix . 'INVALID_ITEM');
+ }
+
+ $this->remove_subset($item_ids, $items[$item_id]);
+
+ return $item_ids;
+ }
+
+ /**
+ * @inheritdoc
+ */
+ public function delete($item_id)
+ {
+ $removed_items = $this->remove_item_from_nestedset($item_id);
+
+ $sql = 'DELETE FROM ' . $this->table_name . '
+ WHERE ' . $this->db->sql_in_set($this->column_item_id, $removed_items) . '
+ ' . $this->get_sql_where('AND');
+ $this->db->sql_query($sql);
+
+ return $removed_items;
+ }
+
+ /**
+ * @inheritdoc
+ */
+ public function move($item_id, $delta)
+ {
+ if ($delta == 0)
+ {
+ return false;
+ }
+
+ $this->acquire_lock();
+
+ $action = ($delta > 0) ? 'move_up' : 'move_down';
+ $delta = abs($delta);
+
+ // Keep $this->get_sql_where() here, to ensure we are in the right tree.
+ $sql = 'SELECT *
+ FROM ' . $this->table_name . '
+ WHERE ' . $this->column_item_id . ' = ' . (int) $item_id . '
+ ' . $this->get_sql_where();
+ $result = $this->db->sql_query_limit($sql, $delta);
+ $item = $this->db->sql_fetchrow($result);
+ $this->db->sql_freeresult($result);
+
+ if (!$item)
+ {
+ $this->lock->release();
+ throw new \OutOfBoundsException($this->message_prefix . 'INVALID_ITEM');
+ }
+
+ /**
+ * Fetch all the siblings between the item's current spot
+ * and where we want to move it to. If there are less than $delta
+ * siblings between the current spot and the target then the
+ * item will move as far as possible
+ */
+ $sql = "SELECT {$this->column_item_id}, {$this->column_parent_id}, {$this->column_left_id}, {$this->column_right_id}, {$this->column_item_parents}
+ FROM " . $this->table_name . '
+ WHERE ' . $this->column_parent_id . ' = ' . (int) $item[$this->column_parent_id] . '
+ ' . $this->get_sql_where() . '
+ AND ';
+
+ if ($action == 'move_up')
+ {
+ $sql .= $this->column_right_id . ' < ' . (int) $item[$this->column_right_id] . ' ORDER BY ' . $this->column_right_id . ' DESC';
+ }
+ else
+ {
+ $sql .= $this->column_left_id . ' > ' . (int) $item[$this->column_left_id] . ' ORDER BY ' . $this->column_left_id . ' ASC';
+ }
+
+ $result = $this->db->sql_query_limit($sql, $delta);
+
+ $target = false;
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ $target = $row;
+ }
+ $this->db->sql_freeresult($result);
+
+ if (!$target)
+ {
+ $this->lock->release();
+ // The item is already on top or bottom
+ return false;
+ }
+
+ /**
+ * $left_id and $right_id define the scope of the items that are affected by the move.
+ * $diff_up and $diff_down are the values to substract or add to each item's left_id
+ * and right_id in order to move them up or down.
+ * $move_up_left and $move_up_right define the scope of the items that are moving
+ * up. Other items in the scope of ($left_id, $right_id) are considered to move down.
+ */
+ if ($action == 'move_up')
+ {
+ $left_id = (int) $target[$this->column_left_id];
+ $right_id = (int) $item[$this->column_right_id];
+
+ $diff_up = (int) $item[$this->column_left_id] - (int) $target[$this->column_left_id];
+ $diff_down = (int) $item[$this->column_right_id] + 1 - (int) $item[$this->column_left_id];
+
+ $move_up_left = (int) $item[$this->column_left_id];
+ $move_up_right = (int) $item[$this->column_right_id];
+ }
+ else
+ {
+ $left_id = (int) $item[$this->column_left_id];
+ $right_id = (int) $target[$this->column_right_id];
+
+ $diff_up = (int) $item[$this->column_right_id] + 1 - (int) $item[$this->column_left_id];
+ $diff_down = (int) $target[$this->column_right_id] - (int) $item[$this->column_right_id];
+
+ $move_up_left = (int) $item[$this->column_right_id] + 1;
+ $move_up_right = (int) $target[$this->column_right_id];
+ }
+
+ // Now do the dirty job
+ $sql = 'UPDATE ' . $this->table_name . '
+ SET ' . $this->column_left_id . ' = ' . $this->column_left_id . ' + CASE
+ WHEN ' . $this->column_left_id . " BETWEEN {$move_up_left} AND {$move_up_right} THEN -{$diff_up}
+ ELSE {$diff_down}
+ END,
+ " . $this->column_right_id . ' = ' . $this->column_right_id . ' + CASE
+ WHEN ' . $this->column_right_id . " BETWEEN {$move_up_left} AND {$move_up_right} THEN -{$diff_up}
+ ELSE {$diff_down}
+ END
+ WHERE
+ " . $this->column_left_id . " BETWEEN {$left_id} AND {$right_id}
+ AND " . $this->column_right_id . " BETWEEN {$left_id} AND {$right_id}
+ " . $this->get_sql_where();
+ $this->db->sql_query($sql);
+
+ $this->lock->release();
+
+ return true;
+ }
+
+ /**
+ * @inheritdoc
+ */
+ public function move_down($item_id)
+ {
+ return $this->move($item_id, -1);
+ }
+
+ /**
+ * @inheritdoc
+ */
+ public function move_up($item_id)
+ {
+ return $this->move($item_id, 1);
+ }
+
+ /**
+ * @inheritdoc
+ */
+ public function move_children($current_parent_id, $new_parent_id)
+ {
+ $current_parent_id = (int) $current_parent_id;
+ $new_parent_id = (int) $new_parent_id;
+
+ if ($current_parent_id == $new_parent_id)
+ {
+ return false;
+ }
+
+ if (!$current_parent_id)
+ {
+ throw new \OutOfBoundsException($this->message_prefix . 'INVALID_ITEM');
+ }
+
+ $this->acquire_lock();
+
+ $item_data = $this->get_subtree_data($current_parent_id);
+ if (!isset($item_data[$current_parent_id]))
+ {
+ $this->lock->release();
+ throw new \OutOfBoundsException($this->message_prefix . 'INVALID_ITEM');
+ }
+
+ $current_parent = $item_data[$current_parent_id];
+ unset($item_data[$current_parent_id]);
+ $move_items = array_keys($item_data);
+
+ if (($current_parent[$this->column_right_id] - $current_parent[$this->column_left_id]) <= 1)
+ {
+ $this->lock->release();
+ return false;
+ }
+
+ if (in_array($new_parent_id, $move_items))
+ {
+ $this->lock->release();
+ throw new \OutOfBoundsException($this->message_prefix . 'INVALID_PARENT');
+ }
+
+ $diff = sizeof($move_items) * 2;
+ $sql_exclude_moved_items = $this->db->sql_in_set($this->column_item_id, $move_items, true);
+
+ $this->db->sql_transaction('begin');
+
+ $this->remove_subset($move_items, $current_parent, false, true);
+
+ if ($new_parent_id)
+ {
+ // Retrieve new-parent again, it may have been changed...
+ $sql = 'SELECT *
+ FROM ' . $this->table_name . '
+ WHERE ' . $this->column_item_id . ' = ' . $new_parent_id;
+ $result = $this->db->sql_query($sql);
+ $new_parent = $this->db->sql_fetchrow($result);
+ $this->db->sql_freeresult($result);
+
+ if (!$new_parent)
+ {
+ $this->db->sql_transaction('rollback');
+ $this->lock->release();
+ throw new \OutOfBoundsException($this->message_prefix . 'INVALID_PARENT');
+ }
+
+ $new_right_id = $this->prepare_adding_subset($move_items, $new_parent, true);
+
+ if ($new_right_id > $current_parent[$this->column_right_id])
+ {
+ $diff = ' + ' . ($new_right_id - $current_parent[$this->column_right_id]);
+ }
+ else
+ {
+ $diff = ' - ' . abs($new_right_id - $current_parent[$this->column_right_id]);
+ }
+ }
+ else
+ {
+ $sql = 'SELECT MAX(' . $this->column_right_id . ') AS ' . $this->column_right_id . '
+ FROM ' . $this->table_name . '
+ WHERE ' . $sql_exclude_moved_items . '
+ ' . $this->get_sql_where('AND');
+ $result = $this->db->sql_query($sql);
+ $row = $this->db->sql_fetchrow($result);
+ $this->db->sql_freeresult($result);
+
+ $diff = ' + ' . ($row[$this->column_right_id] - $current_parent[$this->column_left_id]);
+ }
+
+ $sql = 'UPDATE ' . $this->table_name . '
+ SET ' . $this->column_left_id . ' = ' . $this->column_left_id . $diff . ',
+ ' . $this->column_right_id . ' = ' . $this->column_right_id . $diff . ',
+ ' . $this->column_parent_id . ' = ' . $this->db->sql_case($this->column_parent_id . ' = ' . $current_parent_id, $new_parent_id, $this->column_parent_id) . ',
+ ' . $this->column_item_parents . " = ''
+ WHERE " . $this->db->sql_in_set($this->column_item_id, $move_items) . '
+ ' . $this->get_sql_where('AND');
+ $this->db->sql_query($sql);
+
+ $this->db->sql_transaction('commit');
+ $this->lock->release();
+
+ return true;
+ }
+
+ /**
+ * @inheritdoc
+ */
+ public function change_parent($item_id, $new_parent_id)
+ {
+ $item_id = (int) $item_id;
+ $new_parent_id = (int) $new_parent_id;
+
+ if ($item_id == $new_parent_id)
+ {
+ return false;
+ }
+
+ if (!$item_id)
+ {
+ throw new \OutOfBoundsException($this->message_prefix . 'INVALID_ITEM');
+ }
+
+ $this->acquire_lock();
+
+ $item_data = $this->get_subtree_data($item_id);
+ if (!isset($item_data[$item_id]))
+ {
+ $this->lock->release();
+ throw new \OutOfBoundsException($this->message_prefix . 'INVALID_ITEM');
+ }
+
+ $item = $item_data[$item_id];
+ $move_items = array_keys($item_data);
+
+ if (in_array($new_parent_id, $move_items))
+ {
+ $this->lock->release();
+ throw new \OutOfBoundsException($this->message_prefix . 'INVALID_PARENT');
+ }
+
+ $diff = sizeof($move_items) * 2;
+ $sql_exclude_moved_items = $this->db->sql_in_set($this->column_item_id, $move_items, true);
+
+ $this->db->sql_transaction('begin');
+
+ $this->remove_subset($move_items, $item, false, true);
+
+ if ($new_parent_id)
+ {
+ // Retrieve new-parent again, it may have been changed...
+ $sql = 'SELECT *
+ FROM ' . $this->table_name . '
+ WHERE ' . $this->column_item_id . ' = ' . $new_parent_id;
+ $result = $this->db->sql_query($sql);
+ $new_parent = $this->db->sql_fetchrow($result);
+ $this->db->sql_freeresult($result);
+
+ if (!$new_parent)
+ {
+ $this->db->sql_transaction('rollback');
+ $this->lock->release();
+ throw new \OutOfBoundsException($this->message_prefix . 'INVALID_PARENT');
+ }
+
+ $new_right_id = $this->prepare_adding_subset($move_items, $new_parent, true);
+
+ if ($new_right_id > (int) $item[$this->column_right_id])
+ {
+ $diff = ' + ' . ($new_right_id - (int) $item[$this->column_right_id] - 1);
+ }
+ else
+ {
+ $diff = ' - ' . abs($new_right_id - (int) $item[$this->column_right_id] - 1);
+ }
+ }
+ else
+ {
+ $sql = 'SELECT MAX(' . $this->column_right_id . ') AS ' . $this->column_right_id . '
+ FROM ' . $this->table_name . '
+ WHERE ' . $sql_exclude_moved_items . '
+ ' . $this->get_sql_where('AND');
+ $result = $this->db->sql_query($sql);
+ $row = $this->db->sql_fetchrow($result);
+ $this->db->sql_freeresult($result);
+
+ $diff = ' + ' . ($row[$this->column_right_id] - (int) $item[$this->column_left_id] + 1);
+ }
+
+ $sql = 'UPDATE ' . $this->table_name . '
+ SET ' . $this->column_left_id . ' = ' . $this->column_left_id . $diff . ',
+ ' . $this->column_right_id . ' = ' . $this->column_right_id . $diff . ',
+ ' . $this->column_parent_id . ' = ' . $this->db->sql_case($this->column_item_id . ' = ' . $item_id, $new_parent_id, $this->column_parent_id) . ',
+ ' . $this->column_item_parents . " = ''
+ WHERE " . $this->db->sql_in_set($this->column_item_id, $move_items) . '
+ ' . $this->get_sql_where('AND');
+ $this->db->sql_query($sql);
+
+ $this->db->sql_transaction('commit');
+ $this->lock->release();
+
+ return true;
+ }
+
+ /**
+ * @inheritdoc
+ */
+ public function get_path_and_subtree_data($item_id, $order_asc = true, $include_item = true)
+ {
+ $condition = 'i2.' . $this->column_left_id . ' BETWEEN i1.' . $this->column_left_id . ' AND i1.' . $this->column_right_id . '
+ OR i1.' . $this->column_left_id . ' BETWEEN i2.' . $this->column_left_id . ' AND i2.' . $this->column_right_id;
+
+ return $this->get_set_of_nodes_data($item_id, $condition, $order_asc, $include_item);
+ }
+
+ /**
+ * @inheritdoc
+ */
+ public function get_path_data($item_id, $order_asc = true, $include_item = true)
+ {
+ $condition = 'i1.' . $this->column_left_id . ' BETWEEN i2.' . $this->column_left_id . ' AND i2.' . $this->column_right_id . '';
+
+ return $this->get_set_of_nodes_data($item_id, $condition, $order_asc, $include_item);
+ }
+
+ /**
+ * @inheritdoc
+ */
+ public function get_subtree_data($item_id, $order_asc = true, $include_item = true)
+ {
+ $condition = 'i2.' . $this->column_left_id . ' BETWEEN i1.' . $this->column_left_id . ' AND i1.' . $this->column_right_id . '';
+
+ return $this->get_set_of_nodes_data($item_id, $condition, $order_asc, $include_item);
+ }
+
+ /**
+ * Get items that are related to the given item by the condition
+ *
+ * @param int $item_id Id of the item to retrieve the node set from
+ * @param string $condition Query string restricting the item list
+ * @param bool $order_asc Order the items ascending by their left_id
+ * @param bool $include_item Should the item matching the given item id be included in the list as well
+ * @return array Array of items (containing all columns from the item table)
+ * ID => Item data
+ */
+ protected function get_set_of_nodes_data($item_id, $condition, $order_asc = true, $include_item = true)
+ {
+ $rows = array();
+
+ $sql = 'SELECT i2.*
+ FROM ' . $this->table_name . ' i1
+ LEFT JOIN ' . $this->table_name . " i2
+ ON (($condition) " . $this->get_sql_where('AND', 'i2.') . ')
+ WHERE i1.' . $this->column_item_id . ' = ' . (int) $item_id . '
+ ' . $this->get_sql_where('AND', 'i1.') . '
+ ORDER BY i2.' . $this->column_left_id . ' ' . ($order_asc ? 'ASC' : 'DESC');
+ $result = $this->db->sql_query($sql);
+
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ if (!$include_item && $item_id == $row[$this->column_item_id])
+ {
+ continue;
+ }
+
+ $rows[(int) $row[$this->column_item_id]] = $row;
+ }
+ $this->db->sql_freeresult($result);
+
+ return $rows;
+ }
+
+ /**
+ * Get basic data of all parent items
+ *
+ * Basic data is defined in the $item_basic_data property.
+ * Data is cached in the item_parents column in the item table
+ *
+ * @param array $item The item to get the path from
+ * @return array Array of items (containing basic columns from the item table)
+ * ID => Item data
+ */
+ public function get_path_basic_data(array $item)
+ {
+ $parents = array();
+ if ($item[$this->column_parent_id])
+ {
+ if (!$item[$this->column_item_parents])
+ {
+ $sql = 'SELECT ' . implode(', ', $this->item_basic_data) . '
+ FROM ' . $this->table_name . '
+ WHERE ' . $this->column_left_id . ' < ' . (int) $item[$this->column_left_id] . '
+ AND ' . $this->column_right_id . ' > ' . (int) $item[$this->column_right_id] . '
+ ' . $this->get_sql_where('AND') . '
+ ORDER BY ' . $this->column_left_id . ' ASC';
+ $result = $this->db->sql_query($sql);
+
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ $parents[$row[$this->column_item_id]] = $row;
+ }
+ $this->db->sql_freeresult($result);
+
+ $item_parents = serialize($parents);
+
+ $sql = 'UPDATE ' . $this->table_name . '
+ SET ' . $this->column_item_parents . " = '" . $this->db->sql_escape($item_parents) . "'
+ WHERE " . $this->column_parent_id . ' = ' . (int) $item[$this->column_parent_id];
+ $this->db->sql_query($sql);
+ }
+ else
+ {
+ $parents = unserialize($item[$this->column_item_parents]);
+ }
+ }
+
+ return $parents;
+ }
+
+ /**
+ * Get all items from the tree
+ *
+ * @param bool $order_asc Order the items ascending by their left_id
+ * @return array Array of items (containing all columns from the item table)
+ * ID => Item data
+ */
+ public function get_all_tree_data($order_asc = true)
+ {
+ $rows = array();
+
+ $sql = 'SELECT *
+ FROM ' . $this->table_name . ' ' .
+ $this->get_sql_where('WHERE') . '
+ ORDER BY ' . $this->column_left_id . ' ' . ($order_asc ? 'ASC' : 'DESC');
+ $result = $this->db->sql_query($sql);
+
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ $rows[(int) $row[$this->column_item_id]] = $row;
+ }
+ $this->db->sql_freeresult($result);
+
+ return $rows;
+ }
+
+ /**
+ * Remove a subset from the nested set
+ *
+ * @param array $subset_items Subset of items to remove
+ * @param array $bounding_item Item containing the right bound of the subset
+ * @param bool $set_subset_zero Should the parent, left and right id of the items be set to 0, or kept unchanged?
+ * In case of removing an item from the tree, we should the values to 0
+ * In case of moving an item, we shouldkeep the original values, in order to allow "+ diff" later
+ * @return null
+ */
+ protected function remove_subset(array $subset_items, array $bounding_item, $set_subset_zero = true)
+ {
+ $acquired_new_lock = $this->acquire_lock();
+
+ $diff = sizeof($subset_items) * 2;
+ $sql_subset_items = $this->db->sql_in_set($this->column_item_id, $subset_items);
+ $sql_not_subset_items = $this->db->sql_in_set($this->column_item_id, $subset_items, true);
+
+ $sql_is_parent = $this->column_left_id . ' <= ' . (int) $bounding_item[$this->column_right_id] . '
+ AND ' . $this->column_right_id . ' >= ' . (int) $bounding_item[$this->column_right_id];
+
+ $sql_is_right = $this->column_left_id . ' > ' . (int) $bounding_item[$this->column_right_id];
+
+ $set_left_id = $this->db->sql_case($sql_is_right, $this->column_left_id . ' - ' . $diff, $this->column_left_id);
+ $set_right_id = $this->db->sql_case($sql_is_parent . ' OR ' . $sql_is_right, $this->column_right_id . ' - ' . $diff, $this->column_right_id);
+
+ if ($set_subset_zero)
+ {
+ $set_left_id = $this->db->sql_case($sql_subset_items, 0, $set_left_id);
+ $set_right_id = $this->db->sql_case($sql_subset_items, 0, $set_right_id);
+ }
+
+ $sql = 'UPDATE ' . $this->table_name . '
+ SET ' . (($set_subset_zero) ? $this->column_parent_id . ' = ' . $this->db->sql_case($sql_subset_items, 0, $this->column_parent_id) . ',' : '') . '
+ ' . $this->column_left_id . ' = ' . $set_left_id . ',
+ ' . $this->column_right_id . ' = ' . $set_right_id . '
+ ' . ((!$set_subset_zero) ? ' WHERE ' . $sql_not_subset_items . ' ' . $this->get_sql_where('AND') : $this->get_sql_where('WHERE'));
+ $this->db->sql_query($sql);
+
+ if ($acquired_new_lock)
+ {
+ $this->lock->release();
+ }
+ }
+
+ /**
+ * Prepare adding a subset to the nested set
+ *
+ * @param array $subset_items Subset of items to add
+ * @param array $new_parent Item containing the right bound of the new parent
+ * @return int New right id of the parent item
+ */
+ protected function prepare_adding_subset(array $subset_items, array $new_parent)
+ {
+ $diff = sizeof($subset_items) * 2;
+ $sql_not_subset_items = $this->db->sql_in_set($this->column_item_id, $subset_items, true);
+
+ $set_left_id = $this->db->sql_case($this->column_left_id . ' > ' . (int) $new_parent[$this->column_right_id], $this->column_left_id . ' + ' . $diff, $this->column_left_id);
+ $set_right_id = $this->db->sql_case($this->column_right_id . ' >= ' . (int) $new_parent[$this->column_right_id], $this->column_right_id . ' + ' . $diff, $this->column_right_id);
+
+ $sql = 'UPDATE ' . $this->table_name . '
+ SET ' . $this->column_left_id . ' = ' . $set_left_id . ',
+ ' . $this->column_right_id . ' = ' . $set_right_id . '
+ WHERE ' . $sql_not_subset_items . '
+ ' . $this->get_sql_where('AND');
+ $this->db->sql_query($sql);
+
+ return $new_parent[$this->column_right_id] + $diff;
+ }
+
+ /**
+ * Resets values required for the nested set system
+ *
+ * @param array $item Original item data
+ * @return array Original item data + nested set defaults
+ */
+ protected function reset_nestedset_values(array $item)
+ {
+ $item_data = array_merge($item, array(
+ $this->column_parent_id => 0,
+ $this->column_left_id => 0,
+ $this->column_right_id => 0,
+ $this->column_item_parents => '',
+ ));
+
+ unset($item_data[$this->column_item_id]);
+
+ return $item_data;
+ }
+
+ /**
+ * Regenerate left/right ids from parent/child relationship
+ *
+ * This method regenerates the left/right ids for the tree based on
+ * the parent/child relations. This function executes three queries per
+ * item, so it should only be called, when the set has one of the following
+ * problems:
+ * - The set has a duplicated value inside the left/right id chain
+ * - The set has a missing value inside the left/right id chain
+ * - The set has items that do not have a left/right id set
+ *
+ * When regenerating the items, the items are sorted by parent id and their
+ * current left id, so the current child/parent relationships are kept
+ * and running the function on a working set will not change the order.
+ *
+ * @param int $new_id First left_id to be used (should start with 1)
+ * @param int $parent_id parent_id of the current set (default = 0)
+ * @param bool $reset_ids Should we reset all left_id/right_id on the first call?
+ * @return int $new_id The next left_id/right_id that should be used
+ */
+ public function regenerate_left_right_ids($new_id, $parent_id = 0, $reset_ids = false)
+ {
+ if ($acquired_new_lock = $this->acquire_lock())
+ {
+ $this->db->sql_transaction('begin');
+
+ if (!$reset_ids)
+ {
+ $sql = 'UPDATE ' . $this->table_name . '
+ SET ' . $this->column_item_parents . " = ''
+ " . $this->get_sql_where('WHERE');
+ $this->db->sql_query($sql);
+ }
+ }
+
+ if ($reset_ids)
+ {
+ $sql = 'UPDATE ' . $this->table_name . '
+ SET ' . $this->db->sql_build_array('UPDATE', array(
+ $this->column_left_id => 0,
+ $this->column_right_id => 0,
+ $this->column_item_parents => '',
+ )) . '
+ ' . $this->get_sql_where('WHERE');
+ $this->db->sql_query($sql);
+ }
+
+ $sql = 'SELECT *
+ FROM ' . $this->table_name . '
+ WHERE ' . $this->column_parent_id . ' = ' . (int) $parent_id . '
+ ' . $this->get_sql_where('AND') . '
+ ORDER BY ' . $this->column_left_id . ', ' . $this->column_item_id . ' ASC';
+ $result = $this->db->sql_query($sql);
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ // First we update the left_id for this module
+ if ($row[$this->column_left_id] != $new_id)
+ {
+ $sql = 'UPDATE ' . $this->table_name . '
+ SET ' . $this->db->sql_build_array('UPDATE', array($this->column_left_id => $new_id)) . '
+ WHERE ' . $this->column_item_id . ' = ' . (int) $row[$this->column_item_id];
+ $this->db->sql_query($sql);
+ }
+ $new_id++;
+
+ // Then we go through any children and update their left/right id's
+ $new_id = $this->regenerate_left_right_ids($new_id, $row[$this->column_item_id]);
+
+ // Then we come back and update the right_id for this module
+ if ($row[$this->column_right_id] != $new_id)
+ {
+ $sql = 'UPDATE ' . $this->table_name . '
+ SET ' . $this->db->sql_build_array('UPDATE', array($this->column_right_id => $new_id)) . '
+ WHERE ' . $this->column_item_id . ' = ' . (int) $row[$this->column_item_id];
+ $this->db->sql_query($sql);
+ }
+ $new_id++;
+ }
+ $this->db->sql_freeresult($result);
+
+ if ($acquired_new_lock)
+ {
+ $this->db->sql_transaction('commit');
+ $this->lock->release();
+ }
+
+ return $new_id;
+ }
+}
diff --git a/phpBB/phpbb/tree/nestedset_forum.php b/phpBB/phpbb/tree/nestedset_forum.php
new file mode 100644
index 0000000000..ef6023546b
--- /dev/null
+++ b/phpBB/phpbb/tree/nestedset_forum.php
@@ -0,0 +1,40 @@
+<?php
+/**
+*
+* @package tree
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\tree;
+
+class nestedset_forum extends \phpbb\tree\nestedset
+{
+ /**
+ * Construct
+ *
+ * @param \phpbb\db\driver\driver $db Database connection
+ * @param \phpbb\lock\db $lock Lock class used to lock the table when moving forums around
+ * @param string $table_name Table name
+ */
+ public function __construct(\phpbb\db\driver\driver $db, \phpbb\lock\db $lock, $table_name)
+ {
+ parent::__construct(
+ $db,
+ $lock,
+ $table_name,
+ 'FORUM_NESTEDSET_',
+ '',
+ array(
+ 'forum_id',
+ 'forum_name',
+ 'forum_type',
+ ),
+ array(
+ 'item_id' => 'forum_id',
+ 'item_parents' => 'forum_parents',
+ )
+ );
+ }
+}
diff --git a/phpBB/phpbb/tree/tree_interface.php b/phpBB/phpbb/tree/tree_interface.php
new file mode 100644
index 0000000000..90ec27e024
--- /dev/null
+++ b/phpBB/phpbb/tree/tree_interface.php
@@ -0,0 +1,116 @@
+<?php
+/**
+*
+* @package tree
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\tree;
+
+interface tree_interface
+{
+ /**
+ * Inserts an item into the database table and into the tree.
+ *
+ * @param array $item The item to be added
+ * @return array Array with item data as set in the database
+ */
+ public function insert(array $additional_data);
+
+ /**
+ * Delete an item from the tree and from the database table
+ *
+ * Also deletes the subtree from the tree and from the database table
+ *
+ * @param int $item_id The item to be deleted
+ * @return array Item ids that have been deleted
+ */
+ public function delete($item_id);
+
+ /**
+ * Move an item by a given delta
+ *
+ * An item is only moved up/down within the same parent. If the delta is
+ * larger then the number of children, the item is moved to the top/bottom
+ * of the list of children within this parent.
+ *
+ * @param int $item_id The item to be moved
+ * @param int $delta Number of steps to move this item, < 0 => down, > 0 => up
+ * @return bool True if the item was moved
+ */
+ public function move($item_id, $delta);
+
+ /**
+ * Move an item down by 1
+ *
+ * @param int $item_id The item to be moved
+ * @return bool True if the item was moved
+ */
+ public function move_down($item_id);
+
+ /**
+ * Move an item up by 1
+ *
+ * @param int $item_id The item to be moved
+ * @return bool True if the item was moved
+ */
+ public function move_up($item_id);
+
+ /**
+ * Moves all children of one item to another item
+ *
+ * If the new parent already has children, the new children are appended
+ * to the list.
+ *
+ * @param int $current_parent_id The current parent item
+ * @param int $new_parent_id The new parent item
+ * @return bool True if any items where moved
+ */
+ public function move_children($current_parent_id, $new_parent_id);
+
+ /**
+ * Change parent item
+ *
+ * Moves the item to the bottom of the new \parent's list of children
+ *
+ * @param int $item_id The item to be moved
+ * @param int $new_parent_id The new parent item
+ * @return bool True if the parent was set successfully
+ */
+ public function change_parent($item_id, $new_parent_id);
+
+ /**
+ * Get all items that are either ancestors or descendants of the item
+ *
+ * @param int $item_id Id of the item to retrieve the ancestors/descendants from
+ * @param bool $order_asc Order the items ascendingly (most outer ancestor first)
+ * @param bool $include_item Should the item matching the given item id be included in the list as well
+ * @return array Array of items (containing all columns from the item table)
+ * ID => Item data
+ */
+ public function get_path_and_subtree_data($item_id, $order_asc, $include_item);
+
+ /**
+ * Get all of the item's ancestors
+ *
+ * @param int $item_id Id of the item to retrieve the ancestors from
+ * @param bool $order_asc Order the items ascendingly (most outer ancestor first)
+ * @param bool $include_item Should the item matching the given item id be included in the list as well
+ * @return array Array of items (containing all columns from the item table)
+ * ID => Item data
+ */
+ public function get_path_data($item_id, $order_asc, $include_item);
+
+ /**
+ * Get all of the item's descendants
+ *
+ * @param int $item_id Id of the item to retrieve the descendants from
+ * @param bool $order_asc Order the items ascendingly
+ * @param bool $include_item Should the item matching the given item id be included in the list as well
+ * @return array Array of items (containing all columns from the item table)
+ * ID => Item data
+ */
+ public function get_subtree_data($item_id, $order_asc, $include_item);
+}
diff --git a/phpBB/phpbb/user.php b/phpBB/phpbb/user.php
new file mode 100644
index 0000000000..b9b3896606
--- /dev/null
+++ b/phpBB/phpbb/user.php
@@ -0,0 +1,887 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb;
+
+/**
+* Base user class
+*
+* This is the overarching class which contains (through session extend)
+* all methods utilised for user functionality during a session.
+*
+* @package phpBB3
+*/
+class user extends \phpbb\session
+{
+ var $lang = array();
+ var $help = array();
+ var $style = array();
+ var $date_format;
+
+ /**
+ * DateTimeZone object holding the timezone of the user
+ */
+ public $timezone;
+
+ var $lang_name = false;
+ var $lang_id = false;
+ var $lang_path;
+ var $img_lang;
+ var $img_array = array();
+
+ // Able to add new options (up to id 31)
+ var $keyoptions = array('viewimg' => 0, 'viewflash' => 1, 'viewsmilies' => 2, 'viewsigs' => 3, 'viewavatars' => 4, 'viewcensors' => 5, 'attachsig' => 6, 'bbcode' => 8, 'smilies' => 9, 'sig_bbcode' => 15, 'sig_smilies' => 16, 'sig_links' => 17);
+
+ /**
+ * Constructor to set the lang path
+ */
+ function __construct()
+ {
+ global $phpbb_root_path;
+
+ $this->lang_path = $phpbb_root_path . 'language/';
+ }
+
+ /**
+ * Function to set custom language path (able to use directory outside of phpBB)
+ *
+ * @param string $lang_path New language path used.
+ * @access public
+ */
+ function set_custom_lang_path($lang_path)
+ {
+ $this->lang_path = $lang_path;
+
+ if (substr($this->lang_path, -1) != '/')
+ {
+ $this->lang_path .= '/';
+ }
+ }
+
+ /**
+ * Setup basic user-specific items (style, language, ...)
+ */
+ function setup($lang_set = false, $style_id = false)
+ {
+ global $db, $template, $config, $auth, $phpEx, $phpbb_root_path, $cache;
+ global $phpbb_dispatcher;
+
+ if ($this->data['user_id'] != ANONYMOUS)
+ {
+ $user_lang_name = (file_exists($this->lang_path . $this->data['user_lang'] . "/common.$phpEx")) ? $this->data['user_lang'] : basename($config['default_lang']);
+ $user_date_format = $this->data['user_dateformat'];
+ $user_timezone = $this->data['user_timezone'];
+ }
+ else
+ {
+ $user_lang_name = basename($config['default_lang']);
+ $user_date_format = $config['default_dateformat'];
+ $user_timezone = $config['board_timezone'];
+
+ /**
+ * If a guest user is surfing, we try to guess his/her language first by obtaining the browser language
+ * If re-enabled we need to make sure only those languages installed are checked
+ * Commented out so we do not loose the code.
+
+ if ($request->header('Accept-Language'))
+ {
+ $accept_lang_ary = explode(',', $request->header('Accept-Language'));
+
+ foreach ($accept_lang_ary as $accept_lang)
+ {
+ // Set correct format ... guess full xx_YY form
+ $accept_lang = substr($accept_lang, 0, 2) . '_' . strtoupper(substr($accept_lang, 3, 2));
+ $accept_lang = basename($accept_lang);
+
+ if (file_exists($this->lang_path . $accept_lang . "/common.$phpEx"))
+ {
+ $user_lang_name = $config['default_lang'] = $accept_lang;
+ break;
+ }
+ else
+ {
+ // No match on xx_YY so try xx
+ $accept_lang = substr($accept_lang, 0, 2);
+ $accept_lang = basename($accept_lang);
+
+ if (file_exists($this->lang_path . $accept_lang . "/common.$phpEx"))
+ {
+ $user_lang_name = $config['default_lang'] = $accept_lang;
+ break;
+ }
+ }
+ }
+ }
+ */
+ }
+
+ $user_data = $this->data;
+ $lang_set_ext = array();
+
+ /**
+ * Event to load language files and modify user data on every page
+ *
+ * @event core.user_setup
+ * @var array user_data Array with user's data row
+ * @var string user_lang_name Basename of the user's langauge
+ * @var string user_date_format User's date/time format
+ * @var string user_timezone User's timezone, should be one of
+ * http://www.php.net/manual/en/timezones.php
+ * @var mixed lang_set String or array of language files
+ * @var array lang_set_ext Array containing entries of format
+ * array(
+ * 'ext_name' => (string) [extension name],
+ * 'lang_set' => (string|array) [language files],
+ * )
+ * For performance reasons, only load translations
+ * that are absolutely needed globally using this
+ * event. Use local events otherwise.
+ * @var mixed style_id Style we are going to display
+ * @since 3.1-A1
+ */
+ $vars = array('user_data', 'user_lang_name', 'user_date_format', 'user_timezone', 'lang_set', 'lang_set_ext', 'style_id');
+ extract($phpbb_dispatcher->trigger_event('core.user_setup', compact($vars)));
+
+ $this->data = $user_data;
+ $this->lang_name = $user_lang_name;
+ $this->date_format = $user_date_format;
+
+ try
+ {
+ $this->timezone = new \DateTimeZone($user_timezone);
+ }
+ catch (\Exception $e)
+ {
+ // If the timezone the user has selected is invalid, we fall back to UTC.
+ $this->timezone = new \DateTimeZone('UTC');
+ }
+
+ // We include common language file here to not load it every time a custom language file is included
+ $lang = &$this->lang;
+
+ // Do not suppress error if in DEBUG mode
+ $include_result = (defined('DEBUG')) ? (include $this->lang_path . $this->lang_name . "/common.$phpEx") : (@include $this->lang_path . $this->lang_name . "/common.$phpEx");
+
+ if ($include_result === false)
+ {
+ die('Language file ' . $this->lang_path . $this->lang_name . "/common.$phpEx" . " couldn't be opened.");
+ }
+
+ $this->add_lang($lang_set);
+ unset($lang_set);
+
+ foreach ($lang_set_ext as $ext_lang_pair)
+ {
+ $this->add_lang_ext($ext_lang_pair['ext_name'], $ext_lang_pair['lang_set']);
+ }
+ unset($lang_set_ext);
+
+ $style_request = request_var('style', 0);
+ if ($style_request && (!$config['override_user_style'] || $auth->acl_get('a_styles')) && !defined('ADMIN_START'))
+ {
+ global $SID, $_EXTRA_URL;
+
+ $style_id = $style_request;
+ $SID .= '&amp;style=' . $style_id;
+ $_EXTRA_URL = array('style=' . $style_id);
+ }
+ else
+ {
+ // Set up style
+ $style_id = ($style_id) ? $style_id : ((!$config['override_user_style']) ? $this->data['user_style'] : $config['default_style']);
+ }
+
+ $sql = 'SELECT *
+ FROM ' . STYLES_TABLE . " s
+ WHERE s.style_id = $style_id";
+ $result = $db->sql_query($sql, 3600);
+ $this->style = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ // Fallback to user's standard style
+ if (!$this->style && $style_id != $this->data['user_style'])
+ {
+ $style_id = $this->data['user_style'];
+
+ $sql = 'SELECT *
+ FROM ' . STYLES_TABLE . " s
+ WHERE s.style_id = $style_id";
+ $result = $db->sql_query($sql, 3600);
+ $this->style = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+ }
+
+ // User has wrong style
+ if (!$this->style && $style_id == $this->data['user_style'])
+ {
+ $style_id = $this->data['user_style'] = $config['default_style'];
+
+ $sql = 'UPDATE ' . USERS_TABLE . "
+ SET user_style = $style_id
+ WHERE user_id = {$this->data['user_id']}";
+ $db->sql_query($sql);
+
+ $sql = 'SELECT *
+ FROM ' . STYLES_TABLE . " s
+ WHERE s.style_id = $style_id";
+ $result = $db->sql_query($sql, 3600);
+ $this->style = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+ }
+
+ if (!$this->style)
+ {
+ trigger_error('NO_STYLE_DATA', E_USER_ERROR);
+ }
+
+ // Now parse the cfg file and cache it
+ $parsed_items = $cache->obtain_cfg_items($this->style);
+
+ $check_for = array(
+ 'pagination_sep' => (string) ', '
+ );
+
+ foreach ($check_for as $key => $default_value)
+ {
+ $this->style[$key] = (isset($parsed_items[$key])) ? $parsed_items[$key] : $default_value;
+ settype($this->style[$key], gettype($default_value));
+
+ if (is_string($default_value))
+ {
+ $this->style[$key] = htmlspecialchars($this->style[$key]);
+ }
+ }
+
+ $template->set_style();
+
+ $this->img_lang = $this->lang_name;
+
+ // Call phpbb_user_session_handler() in case external application want to "bend" some variables or replace classes...
+ // After calling it we continue script execution...
+ phpbb_user_session_handler();
+
+ // If this function got called from the error handler we are finished here.
+ if (defined('IN_ERROR_HANDLER'))
+ {
+ return;
+ }
+
+ // Disable board if the install/ directory is still present
+ // For the brave development army we do not care about this, else we need to comment out this everytime we develop locally
+ if (!defined('DEBUG') && !defined('ADMIN_START') && !defined('IN_INSTALL') && !defined('IN_LOGIN') && file_exists($phpbb_root_path . 'install') && !is_file($phpbb_root_path . 'install'))
+ {
+ // Adjust the message slightly according to the permissions
+ if ($auth->acl_gets('a_', 'm_') || $auth->acl_getf_global('m_'))
+ {
+ $message = 'REMOVE_INSTALL';
+ }
+ else
+ {
+ $message = (!empty($config['board_disable_msg'])) ? $config['board_disable_msg'] : 'BOARD_DISABLE';
+ }
+ trigger_error($message);
+ }
+
+ // Is board disabled and user not an admin or moderator?
+ if ($config['board_disable'] && !defined('IN_LOGIN') && !$auth->acl_gets('a_', 'm_') && !$auth->acl_getf_global('m_'))
+ {
+ if ($this->data['is_bot'])
+ {
+ send_status_line(503, 'Service Unavailable');
+ }
+
+ $message = (!empty($config['board_disable_msg'])) ? $config['board_disable_msg'] : 'BOARD_DISABLE';
+ trigger_error($message);
+ }
+
+ // Is load exceeded?
+ if ($config['limit_load'] && $this->load !== false)
+ {
+ if ($this->load > floatval($config['limit_load']) && !defined('IN_LOGIN') && !defined('IN_ADMIN'))
+ {
+ // Set board disabled to true to let the admins/mods get the proper notification
+ $config['board_disable'] = '1';
+
+ if (!$auth->acl_gets('a_', 'm_') && !$auth->acl_getf_global('m_'))
+ {
+ if ($this->data['is_bot'])
+ {
+ send_status_line(503, 'Service Unavailable');
+ }
+ trigger_error('BOARD_UNAVAILABLE');
+ }
+ }
+ }
+
+ if (isset($this->data['session_viewonline']))
+ {
+ // Make sure the user is able to hide his session
+ if (!$this->data['session_viewonline'])
+ {
+ // Reset online status if not allowed to hide the session...
+ if (!$auth->acl_get('u_hideonline'))
+ {
+ $sql = 'UPDATE ' . SESSIONS_TABLE . '
+ SET session_viewonline = 1
+ WHERE session_user_id = ' . $this->data['user_id'];
+ $db->sql_query($sql);
+ $this->data['session_viewonline'] = 1;
+ }
+ }
+ else if (!$this->data['user_allow_viewonline'])
+ {
+ // the user wants to hide and is allowed to -> cloaking device on.
+ if ($auth->acl_get('u_hideonline'))
+ {
+ $sql = 'UPDATE ' . SESSIONS_TABLE . '
+ SET session_viewonline = 0
+ WHERE session_user_id = ' . $this->data['user_id'];
+ $db->sql_query($sql);
+ $this->data['session_viewonline'] = 0;
+ }
+ }
+ }
+
+ // Does the user need to change their password? If so, redirect to the
+ // ucp profile reg_details page ... of course do not redirect if we're already in the ucp
+ if (!defined('IN_ADMIN') && !defined('ADMIN_START') && $config['chg_passforce'] && !empty($this->data['is_registered']) && $auth->acl_get('u_chgpasswd') && $this->data['user_passchg'] < time() - ($config['chg_passforce'] * 86400))
+ {
+ if (strpos($this->page['query_string'], 'mode=reg_details') === false && $this->page['page_name'] != "ucp.$phpEx")
+ {
+ redirect(append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=profile&amp;mode=reg_details'));
+ }
+ }
+
+ return;
+ }
+
+ /**
+ * More advanced language substitution
+ * Function to mimic sprintf() with the possibility of using phpBB's language system to substitute nullar/singular/plural forms.
+ * Params are the language key and the parameters to be substituted.
+ * This function/functionality is inspired by SHS` and Ashe.
+ *
+ * Example call: <samp>$user->lang('NUM_POSTS_IN_QUEUE', 1);</samp>
+ *
+ * If the first parameter is an array, the elements are used as keys and subkeys to get the language entry:
+ * Example: <samp>$user->lang(array('datetime', 'AGO'), 1)</samp> uses $user->lang['datetime']['AGO'] as language entry.
+ */
+ function lang()
+ {
+ $args = func_get_args();
+ $key = $args[0];
+
+ if (is_array($key))
+ {
+ $lang = &$this->lang[array_shift($key)];
+
+ foreach ($key as $_key)
+ {
+ $lang = &$lang[$_key];
+ }
+ }
+ else
+ {
+ $lang = &$this->lang[$key];
+ }
+
+ // Return if language string does not exist
+ if (!isset($lang) || (!is_string($lang) && !is_array($lang)))
+ {
+ return $key;
+ }
+
+ // If the language entry is a string, we simply mimic sprintf() behaviour
+ if (is_string($lang))
+ {
+ if (sizeof($args) == 1)
+ {
+ return $lang;
+ }
+
+ // Replace key with language entry and simply pass along...
+ $args[0] = $lang;
+ return call_user_func_array('sprintf', $args);
+ }
+ else if (sizeof($lang) == 0)
+ {
+ // If the language entry is an empty array, we just return the language key
+ return $args[0];
+ }
+
+ // It is an array... now handle different nullar/singular/plural forms
+ $key_found = false;
+
+ // We now get the first number passed and will select the key based upon this number
+ for ($i = 1, $num_args = sizeof($args); $i < $num_args; $i++)
+ {
+ if (is_int($args[$i]) || is_float($args[$i]))
+ {
+ if ($args[$i] == 0 && isset($lang[0]))
+ {
+ // We allow each translation using plural forms to specify a version for the case of 0 things,
+ // so that "0 users" may be displayed as "No users".
+ $key_found = 0;
+ break;
+ }
+ else
+ {
+ $use_plural_form = $this->get_plural_form($args[$i]);
+ if (isset($lang[$use_plural_form]))
+ {
+ // The key we should use exists, so we use it.
+ $key_found = $use_plural_form;
+ }
+ else
+ {
+ // If the key we need to use does not exist, we fall back to the previous one.
+ $numbers = array_keys($lang);
+
+ foreach ($numbers as $num)
+ {
+ if ($num > $use_plural_form)
+ {
+ break;
+ }
+
+ $key_found = $num;
+ }
+ }
+ break;
+ }
+ }
+ }
+
+ // Ok, let's check if the key was found, else use the last entry (because it is mostly the plural form)
+ if ($key_found === false)
+ {
+ $numbers = array_keys($lang);
+ $key_found = end($numbers);
+ }
+
+ // Use the language string we determined and pass it to sprintf()
+ $args[0] = $lang[$key_found];
+ return call_user_func_array('sprintf', $args);
+ }
+
+ /**
+ * Determine which plural form we should use.
+ * For some languages this is not as simple as for English.
+ *
+ * @param $number int|float The number we want to get the plural case for. Float numbers are floored.
+ * @param $force_rule mixed False to use the plural rule of the language package
+ * or an integer to force a certain plural rule
+ * @return int The plural-case we need to use for the number plural-rule combination
+ */
+ function get_plural_form($number, $force_rule = false)
+ {
+ $number = (int) $number;
+
+ // Default to English system
+ $plural_rule = ($force_rule !== false) ? $force_rule : ((isset($this->lang['PLURAL_RULE'])) ? $this->lang['PLURAL_RULE'] : 1);
+
+ return phpbb_get_plural_form($plural_rule, $number);
+ }
+
+ /**
+ * Add Language Items - use_db and use_help are assigned where needed (only use them to force inclusion)
+ *
+ * @param mixed $lang_set specifies the language entries to include
+ * @param bool $use_db internal variable for recursion, do not use
+ * @param bool $use_help internal variable for recursion, do not use
+ * @param string $ext_name The extension to load language from, or empty for core files
+ *
+ * Examples:
+ * <code>
+ * $lang_set = array('posting', 'help' => 'faq');
+ * $lang_set = array('posting', 'viewtopic', 'help' => array('bbcode', 'faq'))
+ * $lang_set = array(array('posting', 'viewtopic'), 'help' => array('bbcode', 'faq'))
+ * $lang_set = 'posting'
+ * $lang_set = array('help' => 'faq', 'db' => array('help:faq', 'posting'))
+ * </code>
+ */
+ function add_lang($lang_set, $use_db = false, $use_help = false, $ext_name = '')
+ {
+ global $phpEx;
+
+ if (is_array($lang_set))
+ {
+ foreach ($lang_set as $key => $lang_file)
+ {
+ // Please do not delete this line.
+ // We have to force the type here, else [array] language inclusion will not work
+ $key = (string) $key;
+
+ if ($key == 'db')
+ {
+ $this->add_lang($lang_file, true, $use_help, $ext_name);
+ }
+ else if ($key == 'help')
+ {
+ $this->add_lang($lang_file, $use_db, true, $ext_name);
+ }
+ else if (!is_array($lang_file))
+ {
+ $this->set_lang($this->lang, $this->help, $lang_file, $use_db, $use_help, $ext_name);
+ }
+ else
+ {
+ $this->add_lang($lang_file, $use_db, $use_help, $ext_name);
+ }
+ }
+ unset($lang_set);
+ }
+ else if ($lang_set)
+ {
+ $this->set_lang($this->lang, $this->help, $lang_set, $use_db, $use_help, $ext_name);
+ }
+ }
+
+ /**
+ * Add Language Items from an extension - use_db and use_help are assigned where needed (only use them to force inclusion)
+ *
+ * @param string $ext_name The extension to load language from, or empty for core files
+ * @param mixed $lang_set specifies the language entries to include
+ * @param bool $use_db internal variable for recursion, do not use
+ * @param bool $use_help internal variable for recursion, do not use
+ */
+ function add_lang_ext($ext_name, $lang_set, $use_db = false, $use_help = false)
+ {
+ if ($ext_name === '/')
+ {
+ $ext_name = '';
+ }
+
+ $this->add_lang($lang_set, $use_db, $use_help, $ext_name);
+ }
+
+ /**
+ * Set language entry (called by add_lang)
+ * @access private
+ */
+ function set_lang(&$lang, &$help, $lang_file, $use_db = false, $use_help = false, $ext_name = '')
+ {
+ global $phpbb_root_path, $phpEx;
+
+ // Make sure the language name is set (if the user setup did not happen it is not set)
+ if (!$this->lang_name)
+ {
+ global $config;
+ $this->lang_name = basename($config['default_lang']);
+ }
+
+ // $lang == $this->lang
+ // $help == $this->help
+ // - add appropriate variables here, name them as they are used within the language file...
+ if (!$use_db)
+ {
+ if ($use_help && strpos($lang_file, '/') !== false)
+ {
+ $filename = dirname($lang_file) . '/help_' . basename($lang_file);
+ }
+ else
+ {
+ $filename = (($use_help) ? 'help_' : '') . $lang_file;
+ }
+
+ if ($ext_name)
+ {
+ global $phpbb_extension_manager;
+ $ext_path = $phpbb_extension_manager->get_extension_path($ext_name, true);
+
+ $lang_path = $ext_path . 'language/';
+ }
+ else
+ {
+ $lang_path = $this->lang_path;
+ }
+
+ if (strpos($phpbb_root_path . $filename, $lang_path . $this->lang_name . '/') === 0)
+ {
+ $language_filename = $phpbb_root_path . $filename;
+ }
+ else
+ {
+ $language_filename = $lang_path . $this->lang_name . '/' . $filename . '.' . $phpEx;
+ }
+
+ // If we are in install, try to use the updated version, when available
+ $install_language_filename = str_replace('language/', 'install/update/new/language/', $language_filename);
+ if (defined('IN_INSTALL') && file_exists($install_language_filename))
+ {
+ $language_filename = $install_language_filename;
+ }
+
+ if (!file_exists($language_filename))
+ {
+ global $config;
+
+ if ($this->lang_name == 'en')
+ {
+ // The user's selected language is missing the file, the board default's language is missing the file, and the file doesn't exist in /en.
+ $language_filename = str_replace($lang_path . 'en', $lang_path . $this->data['user_lang'], $language_filename);
+ trigger_error('Language file ' . $language_filename . ' couldn\'t be opened.', E_USER_ERROR);
+ }
+ else if ($this->lang_name == basename($config['default_lang']))
+ {
+ // Fall back to the English Language
+ $reset_lang_name = $this->lang_name;
+ $this->lang_name = 'en';
+ $this->set_lang($lang, $help, $lang_file, $use_db, $use_help, $ext_name);
+ $this->lang_name = $reset_lang_name;
+ }
+ else if ($this->lang_name == $this->data['user_lang'])
+ {
+ // Fall back to the board default language
+ $reset_lang_name = $this->lang_name;
+ $this->lang_name = basename($config['default_lang']);
+ $this->set_lang($lang, $help, $lang_file, $use_db, $use_help, $ext_name);
+ $this->lang_name = $reset_lang_name;
+ }
+
+ return;
+ }
+
+ // Do not suppress error if in DEBUG mode
+ $include_result = (defined('DEBUG')) ? (include $language_filename) : (@include $language_filename);
+
+ if ($include_result === false)
+ {
+ trigger_error('Language file ' . $language_filename . ' couldn\'t be opened.', E_USER_ERROR);
+ }
+ }
+ else if ($use_db)
+ {
+ // Get Database Language Strings
+ // Put them into $lang if nothing is prefixed, put them into $help if help: is prefixed
+ // For example: help:faq, posting
+ }
+ }
+
+ /**
+ * Format user date
+ *
+ * @param int $gmepoch unix timestamp
+ * @param string $format date format in date() notation. | used to indicate relative dates, for example |d m Y|, h:i is translated to Today, h:i.
+ * @param bool $forcedate force non-relative date format.
+ *
+ * @return mixed translated date
+ */
+ function format_date($gmepoch, $format = false, $forcedate = false)
+ {
+ static $utc;
+
+ if (!isset($utc))
+ {
+ $utc = new \DateTimeZone('UTC');
+ }
+
+ $time = new \phpbb\datetime($this, "@$gmepoch", $utc);
+ $time->setTimezone($this->timezone);
+
+ return $time->format($format, $forcedate);
+ }
+
+ /**
+ * Create a \phpbb\datetime object in the context of the current user
+ *
+ * @since 3.1
+ * @param string $time String in a format accepted by strtotime().
+ * @param DateTimeZone $timezone Time zone of the time.
+ * @return \phpbb\datetime Date time object linked to the current users locale
+ */
+ public function create_datetime($time = 'now', \DateTimeZone $timezone = null)
+ {
+ $timezone = $timezone ?: $this->timezone;
+ return new \phpbb\datetime($this, $time, $timezone);
+ }
+
+ /**
+ * Get the UNIX timestamp for a datetime in the users timezone, so we can store it in the database.
+ *
+ * @param string $format Format of the entered date/time
+ * @param string $time Date/time with the timezone applied
+ * @param DateTimeZone $timezone Timezone of the date/time, falls back to timezone of current user
+ * @return int Returns the unix timestamp
+ */
+ public function get_timestamp_from_format($format, $time, \DateTimeZone $timezone = null)
+ {
+ $timezone = $timezone ?: $this->timezone;
+ $date = \DateTime::createFromFormat($format, $time, $timezone);
+ return ($date !== false) ? $date->format('U') : false;
+ }
+
+ /**
+ * Get language id currently used by the user
+ */
+ function get_iso_lang_id()
+ {
+ global $config, $db;
+
+ if (!empty($this->lang_id))
+ {
+ return $this->lang_id;
+ }
+
+ if (!$this->lang_name)
+ {
+ $this->lang_name = $config['default_lang'];
+ }
+
+ $sql = 'SELECT lang_id
+ FROM ' . LANG_TABLE . "
+ WHERE lang_iso = '" . $db->sql_escape($this->lang_name) . "'";
+ $result = $db->sql_query($sql);
+ $this->lang_id = (int) $db->sql_fetchfield('lang_id');
+ $db->sql_freeresult($result);
+
+ return $this->lang_id;
+ }
+
+ /**
+ * Get users profile fields
+ */
+ function get_profile_fields($user_id)
+ {
+ global $db;
+
+ if (isset($this->profile_fields))
+ {
+ return;
+ }
+
+ $sql = 'SELECT *
+ FROM ' . PROFILE_FIELDS_DATA_TABLE . "
+ WHERE user_id = $user_id";
+ $result = $db->sql_query_limit($sql, 1);
+ $this->profile_fields = (!($row = $db->sql_fetchrow($result))) ? array() : $row;
+ $db->sql_freeresult($result);
+ }
+
+ /**
+ * Specify/Get image
+ */
+ function img($img, $alt = '')
+ {
+ $alt = (!empty($this->lang[$alt])) ? $this->lang[$alt] : $alt;
+ return '<span class="imageset ' . $img . '">' . $alt . '</span>';
+ }
+
+ /**
+ * Get option bit field from user options.
+ *
+ * @param int $key option key, as defined in $keyoptions property.
+ * @param int $data bit field value to use, or false to use $this->data['user_options']
+ * @return bool true if the option is set in the bit field, false otherwise
+ */
+ function optionget($key, $data = false)
+ {
+ $var = ($data !== false) ? $data : $this->data['user_options'];
+ return phpbb_optionget($this->keyoptions[$key], $var);
+ }
+
+ /**
+ * Set option bit field for user options.
+ *
+ * @param int $key Option key, as defined in $keyoptions property.
+ * @param bool $value True to set the option, false to clear the option.
+ * @param int $data Current bit field value, or false to use $this->data['user_options']
+ * @return int|bool If $data is false, the bit field is modified and
+ * written back to $this->data['user_options'], and
+ * return value is true if the bit field changed and
+ * false otherwise. If $data is not false, the new
+ * bitfield value is returned.
+ */
+ function optionset($key, $value, $data = false)
+ {
+ $var = ($data !== false) ? $data : $this->data['user_options'];
+
+ $new_var = phpbb_optionset($this->keyoptions[$key], $value, $var);
+
+ if ($data === false)
+ {
+ if ($new_var != $var)
+ {
+ $this->data['user_options'] = $new_var;
+ return true;
+ }
+ else
+ {
+ return false;
+ }
+ }
+ else
+ {
+ return $new_var;
+ }
+ }
+
+ /**
+ * Funtion to make the user leave the NEWLY_REGISTERED system group.
+ * @access public
+ */
+ function leave_newly_registered()
+ {
+ global $db;
+
+ if (empty($this->data['user_new']))
+ {
+ return false;
+ }
+
+ if (!function_exists('remove_newly_registered'))
+ {
+ global $phpbb_root_path, $phpEx;
+
+ include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
+ }
+ if ($group = remove_newly_registered($this->data['user_id'], $this->data))
+ {
+ $this->data['group_id'] = $group;
+
+ }
+ $this->data['user_permissions'] = '';
+ $this->data['user_new'] = 0;
+
+ return true;
+ }
+
+ /**
+ * Returns all password protected forum ids the user is currently NOT authenticated for.
+ *
+ * @return array Array of forum ids
+ * @access public
+ */
+ function get_passworded_forums()
+ {
+ global $db;
+
+ $sql = 'SELECT f.forum_id, fa.user_id
+ FROM ' . FORUMS_TABLE . ' f
+ LEFT JOIN ' . FORUMS_ACCESS_TABLE . " fa
+ ON (fa.forum_id = f.forum_id
+ AND fa.session_id = '" . $db->sql_escape($this->session_id) . "')
+ WHERE f.forum_password <> ''";
+ $result = $db->sql_query($sql);
+
+ $forum_ids = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $forum_id = (int) $row['forum_id'];
+
+ if ($row['user_id'] != $this->data['user_id'])
+ {
+ $forum_ids[$forum_id] = $forum_id;
+ }
+ }
+ $db->sql_freeresult($result);
+
+ return $forum_ids;
+ }
+}
diff --git a/phpBB/phpbb/user_loader.php b/phpBB/phpbb/user_loader.php
new file mode 100644
index 0000000000..c1d69802f8
--- /dev/null
+++ b/phpBB/phpbb/user_loader.php
@@ -0,0 +1,226 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb;
+
+/**
+* User loader class
+*
+* This handles loading users from the database and
+* storing in them in a temporary cache so we do not
+* have to query the same user multiple times in
+* different services.
+*/
+class user_loader
+{
+ /** @var \phpbb\db\driver\driver */
+ protected $db = null;
+
+ /** @var string */
+ protected $phpbb_root_path = null;
+
+ /** @var string */
+ protected $php_ext = null;
+
+ /** @var string */
+ protected $users_table = null;
+
+ /**
+ * Users loaded from the DB
+ *
+ * @var array Array of user data that we've loaded from the DB
+ */
+ protected $users = array();
+
+ /**
+ * User loader constructor
+ *
+ * @param \phpbb\db\driver\driver $db A database connection
+ * @param string $phpbb_root_path Path to the phpbb includes directory.
+ * @param string $php_ext php file extension
+ * @param string $users_table The name of the database table (phpbb_users)
+ */
+ public function __construct(\phpbb\db\driver\driver $db, $phpbb_root_path, $php_ext, $users_table)
+ {
+ $this->db = $db;
+
+ $this->phpbb_root_path = $phpbb_root_path;
+ $this->php_ext = $php_ext;
+
+ $this->users_table = $users_table;
+ }
+
+ /**
+ * Load user helper
+ *
+ * @param array $user_ids
+ */
+ public function load_users(array $user_ids)
+ {
+ $user_ids[] = ANONYMOUS;
+
+ // Make user_ids unique and convert to integer.
+ $user_ids = array_map('intval', array_unique($user_ids));
+
+ // Do not load users we already have in $this->users
+ $user_ids = array_diff($user_ids, array_keys($this->users));
+
+ if (sizeof($user_ids))
+ {
+ $sql = 'SELECT *
+ FROM ' . $this->users_table . '
+ WHERE ' . $this->db->sql_in_set('user_id', $user_ids);
+ $result = $this->db->sql_query($sql);
+
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ $this->users[$row['user_id']] = $row;
+ }
+ $this->db->sql_freeresult($result);
+ }
+ }
+
+ /**
+ * Load a user by username
+ *
+ * Stores the full data in the user cache so they do not need to be loaded again
+ * Returns the user id so you may use get_user() from the returned value
+ *
+ * @param string $username Raw username to load (will be cleaned)
+ * @return int User ID for the username
+ */
+ public function load_user_by_username($username)
+ {
+ $sql = 'SELECT *
+ FROM ' . $this->users_table . "
+ WHERE username_clean = '" . $this->db->sql_escape(utf8_clean_string($username)) . "'";
+ $result = $this->db->sql_query($sql);
+ $row = $this->db->sql_fetchrow($result);
+ $this->db->sql_freeresult($result);
+
+ if ($row)
+ {
+ $this->users[$row['user_id']] = $row;
+
+ return $row['user_id'];
+ }
+
+ return ANONYMOUS;
+ }
+
+ /**
+ * Get a user row from our users cache
+ *
+ * @param int $user_id User ID of the user you want to retreive
+ * @param bool $query Should we query the database if this user has not yet been loaded?
+ * Typically this should be left as false and you should make sure
+ * you load users ahead of time with load_users()
+ * @return array|bool Row from the database of the user or Anonymous if the user wasn't loaded/does not exist
+ * or bool False if the anonymous user was not loaded
+ */
+ public function get_user($user_id, $query = false)
+ {
+ if (isset($this->users[$user_id]))
+ {
+ return $this->users[$user_id];
+ }
+ // Query them if we must (if ANONYMOUS is sent as the user_id and we have not loaded Anonymous yet, we must load Anonymous as a last resort)
+ else if ($query || $user_id == ANONYMOUS)
+ {
+ $this->load_users(array($user_id));
+
+ return $this->get_user($user_id);
+ }
+
+ return $this->get_user(ANONYMOUS);
+ }
+
+ /**
+ * Get username
+ *
+ * @param int $user_id User ID of the user you want to retreive the username for
+ * @param string $mode The mode to load (same as get_username_string). One of the following:
+ * profile (for getting an url to the profile)
+ * username (for obtaining the username)
+ * colour (for obtaining the user colour)
+ * full (for obtaining a html string representing a coloured link to the users profile)
+ * no_profile (the same as full but forcing no profile link)
+ * @param string $guest_username Optional parameter to specify the guest username. It will be used in favor of the GUEST language variable then.
+ * @param string $custom_profile_url Optional parameter to specify a profile url. The user id get appended to this url as &amp;u={user_id}
+ * @param bool $query Should we query the database if this user has not yet been loaded?
+ * Typically this should be left as false and you should make sure
+ * you load users ahead of time with load_users()
+ * @return string
+ */
+ public function get_username($user_id, $mode, $guest_username = false, $custom_profile_url = false, $query = false)
+ {
+ if (!($user = $this->get_user($user_id, $query)))
+ {
+ return '';
+ }
+
+ return get_username_string($mode, $user['user_id'], $user['username'], $user['user_colour'], $guest_username, $custom_profile_url);
+ }
+
+ /**
+ * Get avatar
+ *
+ * @param int $user_id User ID of the user you want to retreive the avatar for
+ * @param bool $query Should we query the database if this user has not yet been loaded?
+ * Typically this should be left as false and you should make sure
+ * you load users ahead of time with load_users()
+ * @return string
+ */
+ public function get_avatar($user_id, $query = false)
+ {
+ if (!($user = $this->get_user($user_id, $query)))
+ {
+ return '';
+ }
+
+ if (!function_exists('get_user_avatar'))
+ {
+ include($this->phpbb_root_path . 'includes/functions_display.' . $this->php_ext);
+ }
+
+ return get_user_avatar($user['user_avatar'], $user['user_avatar_type'], $user['user_avatar_width'], $user['user_avatar_height']);
+ }
+
+ /**
+ * Get rank
+ *
+ * @param int $user_id User ID of the user you want to retreive the rank for
+ * @param bool $query Should we query the database if this user has not yet been loaded?
+ * Typically this should be left as false and you should make sure
+ * you load users ahead of time with load_users()
+ * @return array Array with keys 'rank_title', 'rank_img', and 'rank_img_src'
+ */
+ public function get_rank($user_id, $query = false)
+ {
+ if (!($user = $this->get_user($user_id, $query)))
+ {
+ return '';
+ }
+
+ if (!function_exists('get_user_rank'))
+ {
+ include($this->phpbb_root_path . 'includes/functions_display.' . $this->php_ext);
+ }
+
+ $rank = array(
+ 'rank_title',
+ 'rank_img',
+ 'rank_img_src',
+ );
+
+ get_user_rank($user['user_rank'], (($user['user_id'] == ANONYMOUS) ? false : $user['user_posts']), $rank['rank_title'], $rank['rank_img'], $rank['rank_img_src']);
+
+ return $rank;
+ }
+}
diff --git a/phpBB/phpbb/version_helper.php b/phpBB/phpbb/version_helper.php
new file mode 100644
index 0000000000..e2fdf6ce63
--- /dev/null
+++ b/phpBB/phpbb/version_helper.php
@@ -0,0 +1,271 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2014 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb;
+
+/**
+ * Class to handle version checking and comparison
+ */
+class version_helper
+{
+ /**
+ * @var string Host
+ */
+ protected $host = 'version.phpbb.com';
+
+ /**
+ * @var string Path to file
+ */
+ protected $path = '/phpbb';
+
+ /**
+ * @var string File name
+ */
+ protected $file = 'versions.json';
+
+ /**
+ * @var string Current version installed
+ */
+ protected $current_version;
+
+ /**
+ * @var null|string Null to not force stability, 'unstable' or 'stable' to
+ * force the corresponding stability
+ */
+ protected $force_stability;
+
+ /** @var \phpbb\cache\service */
+ protected $cache;
+
+ /** @var \phpbb\config\config */
+ protected $config;
+
+ /** @var \phpbb\user */
+ protected $user;
+
+ /**
+ * Constructor
+ *
+ * @param \phpbb\cache\service $cache
+ * @param \phpbb\config\config $config
+ * @param \phpbb\user $user
+ */
+ public function __construct(\phpbb\cache\service $cache, \phpbb\config\config $config, \phpbb\user $user)
+ {
+ $this->cache = $cache;
+ $this->config = $config;
+ $this->user = $user;
+
+ if (defined('PHPBB_QA'))
+ {
+ $this->force_stability = 'unstable';
+ }
+
+ $this->current_version = $this->config['version'];
+ }
+
+ /**
+ * Set location to the file
+ *
+ * @param string $host Host (e.g. version.phpbb.com)
+ * @param string $path Path to file (e.g. /phpbb)
+ * @param string $file File name (Default: versions.json)
+ * @return version_helper
+ */
+ public function set_file_location($host, $path, $file = 'versions.json')
+ {
+ $this->host = $host;
+ $this->path = $path;
+ $this->file = $file;
+
+ return $this;
+ }
+
+ /**
+ * Set current version
+ *
+ * @param string $version The current version
+ * @return version_helper
+ */
+ public function set_current_version($version)
+ {
+ $this->current_version = $version;
+
+ return $this;
+ }
+
+ /**
+ * Over-ride the stability to force check to include unstable versions
+ *
+ * @param null|string Null to not force stability, 'unstable' or 'stable' to
+ * force the corresponding stability
+ * @return version_helper
+ */
+ public function force_stability($stability)
+ {
+ $this->force_stability = $stability;
+
+ return $this;
+ }
+
+ /**
+ * Wrapper for version_compare() that allows using uppercase A and B
+ * for alpha and beta releases.
+ *
+ * See http://www.php.net/manual/en/function.version-compare.php
+ *
+ * @param string $version1 First version number
+ * @param string $version2 Second version number
+ * @param string $operator Comparison operator (optional)
+ *
+ * @return mixed Boolean (true, false) if comparison operator is specified.
+ * Integer (-1, 0, 1) otherwise.
+ */
+ public function compare($version1, $version2, $operator = null)
+ {
+ return phpbb_version_compare($version1, $version2, $operator);
+ }
+
+ /**
+ * Check whether or not a version is "stable"
+ *
+ * Stable means only numbers OR a pl release
+ *
+ * @param string $version
+ * @return bool Bool true or false
+ */
+ public function is_stable($version)
+ {
+ $matches = false;
+ preg_match('/^[\d\.]+/', $version, $matches);
+
+ if (empty($matches[0]))
+ {
+ return false;
+ }
+
+ return $this->compare($version, $matches[0], '>=');
+ }
+
+ /**
+ * Gets the latest version for the current branch the user is on
+ *
+ * @param bool $force_update Ignores cached data. Defaults to false.
+ * @return string
+ * @throws \RuntimeException
+ */
+ public function get_latest_on_current_branch($force_update = false)
+ {
+ $versions = $this->get_versions_matching_stability($force_update);
+
+ $self = $this;
+ $current_version = $this->current_version;
+
+ // Filter out any versions less than to the current version
+ $versions = array_filter($versions, function($data) use ($self, $current_version) {
+ return $self->compare($data['current'], $current_version, '>=');
+ });
+
+ // Get the lowest version from the previous list.
+ return array_reduce($versions, function($value, $data) use ($self) {
+ if ($value === null || $self->compare($data['current'], $value, '<'))
+ {
+ return $data['current'];
+ }
+
+ return $value;
+ });
+ }
+
+ /**
+ * Obtains the latest version information
+ *
+ * @param bool $force_update Ignores cached data. Defaults to false.
+ * @return string
+ * @throws \RuntimeException
+ */
+ public function get_suggested_updates($force_update = false)
+ {
+ $versions = $this->get_versions_matching_stability($force_update);
+
+ $self = $this;
+ $current_version = $this->current_version;
+
+ // Filter out any versions less than or equal to the current version
+ return array_filter($versions, function($data) use ($self, $current_version) {
+ return $self->compare($data['current'], $current_version, '>');
+ });
+ }
+
+ /**
+ * Obtains the latest version information matching the stability of the current install
+ *
+ * @param bool $force_update Ignores cached data. Defaults to false.
+ * @return string Version info
+ * @throws \RuntimeException
+ */
+ public function get_versions_matching_stability($force_update = false)
+ {
+ $info = $this->get_versions($force_update);
+
+ if ($this->force_stability !== null)
+ {
+ return ($this->force_stability === 'unstable') ? $info['unstable'] : $info['stable'];
+ }
+
+ return ($this->is_stable($this->current_version)) ? $info['stable'] : $info['unstable'];
+ }
+
+ /**
+ * Obtains the latest version information
+ *
+ * @param bool $force_update Ignores cached data. Defaults to false.
+ * @return string Version info, includes stable and unstable data
+ * @throws \RuntimeException
+ */
+ public function get_versions($force_update = false)
+ {
+ $cache_file = 'versioncheck_' . $this->host . $this->path . $this->file;
+
+ $info = $this->cache->get($cache_file);
+
+ if ($info === false || $force_update)
+ {
+ $errstr = $errno = '';
+ $info = get_remote_file($this->host, $this->path, $this->file, $errstr, $errno);
+
+ if (!empty($errstr))
+ {
+ throw new \RuntimeException($errstr);
+ }
+
+ $info = json_decode($info, true);
+
+ if (empty($info['stable']) || empty($info['unstable']))
+ {
+ $this->user->add_lang('acp/common');
+
+ throw new \RuntimeException($this->user->lang('VERSIONCHECK_FAIL'));
+ }
+
+ // Replace & with &amp; on announcement links
+ foreach ($info as $stability => $branches)
+ {
+ foreach ($branches as $branch => $branch_data)
+ {
+ $info[$stability][$branch]['announcement'] = str_replace('&', '&amp;', $branch_data['announcement']);
+ }
+ }
+
+ $this->cache->put($cache_file, $info, 86400); // 24 hours
+ }
+
+ return $info;
+ }
+}
diff --git a/phpBB/posting.php b/phpBB/posting.php
index 61df10b125..ef90c229da 100644
--- a/phpBB/posting.php
+++ b/phpBB/posting.php
@@ -2,9 +2,8 @@
/**
*
* @package phpBB3
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -36,15 +35,56 @@ $submit = (isset($_POST['post'])) ? true : false;
$preview = (isset($_POST['preview'])) ? true : false;
$save = (isset($_POST['save'])) ? true : false;
$load = (isset($_POST['load'])) ? true : false;
-$delete = (isset($_POST['delete'])) ? true : false;
+$confirm = $request->is_set_post('confirm');
$cancel = (isset($_POST['cancel']) && !isset($_POST['save'])) ? true : false;
-$refresh = (isset($_POST['add_file']) || isset($_POST['delete_file']) || isset($_POST['full_editor']) || isset($_POST['cancel_unglobalise']) || $save || $load) ? true : false;
-$mode = ($delete && !$preview && !$refresh && $submit) ? 'delete' : request_var('mode', '');
+$refresh = (isset($_POST['add_file']) || isset($_POST['delete_file']) || isset($_POST['cancel_unglobalise']) || $save || $load || $preview);
+$mode = request_var('mode', '');
+
+// If the user is not allowed to delete the post, we try to soft delete it, so we overwrite the mode here.
+if ($mode == 'delete' && (($confirm && !$request->is_set_post('delete_permanent')) || !$auth->acl_gets('f_delete', 'm_delete', $forum_id)))
+{
+ $mode = 'soft_delete';
+}
$error = $post_data = array();
$current_time = time();
+/**
+* This event allows you to alter the above parameters, such as submit and mode
+*
+* Note: $refresh must be true to retain previously submitted form data.
+*
+* Note: The template class will not work properly until $user->setup() is
+* called, and it has not been called yet. Extensions requiring template
+* assignments should use an event that comes later in this file.
+*
+* @event core.modify_posting_parameters
+* @var int post_id ID of the post
+* @var int topic_id ID of the topic
+* @var int forum_id ID of the forum
+* @var int draft_id ID of the draft
+* @var int lastclick Timestamp of when the form was last loaded
+* @var bool submit Whether or not the form has been submitted
+* @var bool preview Whether or not the post is being previewed
+* @var bool save Whether or not a draft is being saved
+* @var bool load Whether or not a draft is being loaded
+* @var bool delete Whether or not the post is being deleted
+* @var bool cancel Whether or not to cancel the form (returns to
+* viewtopic or viewforum depending on if the user
+* is posting a new topic or editing a post)
+* @var bool refresh Whether or not to retain previously submitted data
+* @var string mode What action to take if the form has been sumitted
+* post|reply|quote|edit|delete|bump|smilies|popup
+* @var array error Any error strings; a non-empty array aborts
+* form submission.
+* NOTE: Should be actual language strings, NOT
+* language keys.
+* @since 3.1-A1
+*/
+$vars = array('post_id', 'topic_id', 'forum_id', 'draft_id', 'lastclick', 'submit', 'preview', 'save', 'load', 'delete', 'cancel', 'refresh', 'mode', 'error');
+extract($phpbb_dispatcher->trigger_event('core.modify_posting_parameters', compact($vars)));
+
// Was cancel pressed? If so then redirect to the appropriate page
if ($cancel || ($current_time - $lastclick < 2 && $submit))
{
@@ -58,6 +98,8 @@ if (in_array($mode, array('post', 'reply', 'quote', 'edit', 'delete')) && !$foru
trigger_error('NO_FORUM');
}
+$phpbb_content_visibility = $phpbb_container->get('content.visibility');
+
// We need to know some basic information in all cases before we do anything.
switch ($mode)
{
@@ -87,14 +129,14 @@ switch ($mode)
$sql = 'SELECT f.*, t.*
FROM ' . TOPICS_TABLE . ' t, ' . FORUMS_TABLE . " f
WHERE t.topic_id = $topic_id
- AND (f.forum_id = t.forum_id
- OR f.forum_id = $forum_id)" .
- (($auth->acl_get('m_approve', $forum_id)) ? '' : 'AND t.topic_approved = 1');
+ AND f.forum_id = t.forum_id
+ AND " . $phpbb_content_visibility->get_visibility_sql('topic', $forum_id, 't.');
break;
case 'quote':
case 'edit':
case 'delete':
+ case 'soft_delete':
if (!$post_id)
{
$user->setup('posting');
@@ -116,9 +158,8 @@ switch ($mode)
WHERE p.post_id = $post_id
AND t.topic_id = p.topic_id
AND u.user_id = p.poster_id
- AND (f.forum_id = t.forum_id
- OR f.forum_id = $forum_id)" .
- (($auth->acl_get('m_approve', $forum_id)) ? '' : 'AND p.post_approved = 1');
+ AND f.forum_id = t.forum_id
+ AND " . $phpbb_content_visibility->get_visibility_sql('post', $forum_id, 'p.');
break;
case 'smilies':
@@ -166,7 +207,7 @@ if (!$post_data)
// Not able to reply to unapproved posts/topics
// TODO: add more descriptive language key
-if ($auth->acl_get('m_approve', $forum_id) && ((($mode == 'reply' || $mode == 'bump') && !$post_data['topic_approved']) || ($mode == 'quote' && !$post_data['post_approved'])))
+if ($auth->acl_get('m_approve', $forum_id) && ((($mode == 'reply' || $mode == 'bump') && $post_data['topic_visibility'] != ITEM_APPROVED) || ($mode == 'quote' && $post_data['post_visibility'] != ITEM_APPROVED)))
{
trigger_error(($mode == 'reply' || $mode == 'bump') ? 'TOPIC_UNAPPROVED' : 'POST_UNAPPROVED');
}
@@ -182,7 +223,7 @@ $user->setup(array('posting', 'mcp', 'viewtopic'), $post_data['forum_style']);
if ($config['enable_post_confirm'] && !$user->data['is_registered'])
{
include($phpbb_root_path . 'includes/captcha/captcha_factory.' . $phpEx);
- $captcha =& phpbb_captcha_factory::get_instance($config['captcha_plugin']);
+ $captcha = phpbb_captcha_factory::get_instance($config['captcha_plugin']);
$captcha->init(CONFIRM_POST);
}
@@ -214,8 +255,18 @@ if (!$auth->acl_get('f_read', $forum_id))
{
trigger_error('USER_CANNOT_READ');
}
+ $message = $user->lang['LOGIN_EXPLAIN_POST'];
- login_box('', $user->lang['LOGIN_EXPLAIN_POST']);
+ if ($request->is_ajax())
+ {
+ $json = new phpbb\json_response();
+ $json->send(array(
+ 'title' => $user->lang['INFORMATION'],
+ 'message' => $message,
+ ));
+ }
+
+ login_box('', $message);
}
// Permission to do the action asked?
@@ -258,11 +309,23 @@ switch ($mode)
break;
case 'delete':
- if ($user->data['is_registered'] && $auth->acl_gets('f_delete', 'm_delete', $forum_id))
+ if ($user->data['is_registered'] && ($auth->acl_get('m_delete', $forum_id) || ($post_data['poster_id'] == $user->data['user_id'] && $auth->acl_get('f_delete', $forum_id))))
{
$is_authed = true;
}
break;
+
+ case 'soft_delete':
+ if ($user->data['is_registered'] && $phpbb_content_visibility->can_soft_delete($forum_id, $post_data['poster_id'], $post_data['post_edit_locked']))
+ {
+ $is_authed = true;
+ }
+ else
+ {
+ // Display the same error message for softdelete we use for delete
+ $mode = 'delete';
+ }
+ break;
}
if (!$is_authed)
@@ -273,8 +336,18 @@ if (!$is_authed)
{
trigger_error('USER_CANNOT_' . strtoupper($check_auth));
}
+ $message = $user->lang['LOGIN_EXPLAIN_' . strtoupper($mode)];
- login_box('', $user->lang['LOGIN_EXPLAIN_' . strtoupper($mode)]);
+ if ($request->is_ajax())
+ {
+ $json = new phpbb\json_response();
+ $json->send(array(
+ 'title' => $user->lang['INFORMATION'],
+ 'message' => $message,
+ ));
+ }
+
+ login_box('', $message);
}
// Is the user able to post within this forum?
@@ -310,9 +383,17 @@ if ($mode == 'edit' && !$auth->acl_get('m_edit', $forum_id))
}
// Handle delete mode...
-if ($mode == 'delete')
+if ($mode == 'delete' || $mode == 'soft_delete')
{
- handle_post_delete($forum_id, $topic_id, $post_id, $post_data);
+ if ($mode == 'soft_delete' && $post_data['post_visibility'] == ITEM_DELETED)
+ {
+ $user->setup('posting');
+ trigger_error('NO_POST');
+ }
+
+ $allow_reason = $auth->acl_get('m_softdelete', $forum_id) || ($auth->acl_gets('m_delete', 'f_delete', $forum_id) && $auth->acl_gets('m_softdelete', 'f_softdelete', $forum_id));
+ $soft_delete_reason = ($mode == 'soft_delete' && $allow_reason) ? $request->variable('delete_reason', '', true) : '';
+ handle_post_delete($forum_id, $topic_id, $post_id, $post_data, ($mode == 'soft_delete'), $soft_delete_reason);
return;
}
@@ -320,13 +401,17 @@ if ($mode == 'delete')
if ($mode == 'bump')
{
if ($bump_time = bump_topic_allowed($forum_id, $post_data['topic_bumped'], $post_data['topic_last_post_time'], $post_data['topic_poster'], $post_data['topic_last_poster_id'])
- && check_link_hash(request_var('hash', ''), "topic_{$post_data['topic_id']}"))
+ && check_link_hash(request_var('hash', ''), "topic_{$post_data['topic_id']}"))
{
$meta_url = phpbb_bump_topic($forum_id, $topic_id, $post_data, $current_time);
meta_refresh(3, $meta_url);
+ $message = $user->lang['TOPIC_BUMPED'];
- $message = $user->lang['TOPIC_BUMPED'] . '<br /><br />' . sprintf($user->lang['VIEW_MESSAGE'], '<a href="' . $meta_url . '">', '</a>');
- $message .= '<br /><br />' . sprintf($user->lang['RETURN_FORUM'], '<a href="' . append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $forum_id) . '">', '</a>');
+ if (!$request->is_ajax())
+ {
+ $message .= '<br /><br />' . $user->lang('VIEW_MESSAGE', '<a href="' . $meta_url . '">', '</a>');
+ $message .= '<br /><br />' . $user->lang('RETURN_FORUM', '<a href="' . append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $forum_id) . '">', '</a>');
+ }
trigger_error($message);
}
@@ -391,6 +476,8 @@ if ($mode == 'edit')
$orig_poll_options_size = sizeof($post_data['poll_options']);
$message_parser = new parse_message();
+$plupload = $phpbb_container->get('plupload');
+$message_parser->set_plupload($plupload);
if (isset($post_data['post_text']))
{
@@ -417,7 +504,7 @@ $message_parser->get_submitted_attachment_data($post_data['poster_id']);
if ($post_data['post_attachment'] && !$submit && !$refresh && !$preview && $mode == 'edit')
{
// Do not change to SELECT *
- $sql = 'SELECT attach_id, is_orphan, attach_comment, real_filename
+ $sql = 'SELECT attach_id, is_orphan, attach_comment, real_filename, filesize
FROM ' . ATTACHMENTS_TABLE . "
WHERE post_msg_id = $post_id
AND in_message = 0
@@ -636,7 +723,7 @@ if ($submit || $preview || $refresh)
$message_parser->message = utf8_normalize_nfc(request_var('message', '', true));
$post_data['username'] = utf8_normalize_nfc(request_var('username', $post_data['username'], true));
- $post_data['post_edit_reason'] = (!empty($_POST['edit_reason']) && $mode == 'edit' && $auth->acl_get('m_edit', $forum_id)) ? utf8_normalize_nfc(request_var('edit_reason', '', true)) : '';
+ $post_data['post_edit_reason'] = ($request->variable('edit_reason', false, false, \phpbb\request\request_interface::POST) && $mode == 'edit' && $auth->acl_get('m_edit', $forum_id)) ? utf8_normalize_nfc(request_var('edit_reason', '', true)) : '';
$post_data['orig_topic_type'] = $post_data['topic_type'];
$post_data['topic_type'] = request_var('topic_type', (($mode != 'post') ? (int) $post_data['topic_type'] : POST_NORMAL));
@@ -754,8 +841,13 @@ if ($submit || $preview || $refresh)
// We make sure nobody else made exactly the same change
// we're about to submit by also checking $message_md5 != $post_data['post_checksum']
- if (($edit_post_message_checksum !== '' && $edit_post_message_checksum != $post_data['post_checksum'] && $message_md5 != $post_data['post_checksum'])
- || ($edit_post_subject_checksum !== '' && $edit_post_subject_checksum != $post_data['post_subject_md5'] && md5($post_data['post_subject']) != $post_data['post_subject_md5']))
+ if ($edit_post_message_checksum !== '' &&
+ $edit_post_message_checksum != $post_data['post_checksum'] &&
+ $message_md5 != $post_data['post_checksum']
+ ||
+ $edit_post_subject_checksum !== '' &&
+ $edit_post_subject_checksum != $post_data['post_subject_md5'] &&
+ md5($post_data['post_subject']) != $post_data['post_subject_md5'])
{
if (topic_review($topic_id, $forum_id, 'post_review_edit', $post_id))
{
@@ -844,7 +936,7 @@ if ($submit || $preview || $refresh)
if (($result = validate_string($post_data['username'], false, $config['min_name_chars'], $config['max_name_chars'])) !== false)
{
$min_max_amount = ($result == 'TOO_SHORT') ? $config['min_name_chars'] : $config['max_name_chars'];
- $error[] = sprintf($user->lang['FIELD_' . $result], $user->lang['USERNAME'], $min_max_amount);
+ $error[] = $user->lang('FIELD_' . $result, $min_max_amount, $user->lang['USERNAME']);
}
}
@@ -868,6 +960,19 @@ if ($submit || $preview || $refresh)
$error[] = $user->lang['FORM_INVALID'];
}
+ if ($submit && $mode == 'edit' && $post_data['post_visibility'] == ITEM_DELETED && !isset($_POST['soft_delete']) && $auth->acl_get('m_approve', $forum_id))
+ {
+ $is_first_post = ($post_id == $post_data['topic_first_post_id'] || !$post_data['topic_posts_approved']);
+ $is_last_post = ($post_id == $post_data['topic_last_post_id'] || !$post_data['topic_posts_approved']);
+ $updated_post_data = $phpbb_content_visibility->set_post_visibility(ITEM_APPROVED, $post_id, $post_data['topic_id'], $post_data['forum_id'], $user->data['user_id'], time(), '', $is_first_post, $is_last_post);
+
+ if (!empty($updated_post_data))
+ {
+ // Update the post_data, so we don't need to refetch it.
+ $post_data = array_merge($post_data, $updated_post_data);
+ }
+ }
+
// Parse subject
if (!$preview && !$refresh && utf8_clean_string($post_data['post_subject']) === '' && ($mode == 'post' || ($mode == 'edit' && $post_data['topic_first_post_id'] == $post_id)))
{
@@ -996,60 +1101,6 @@ if ($submit || $preview || $refresh)
// Store message, sync counters
if (!sizeof($error) && $submit)
{
- // Check if we want to de-globalize the topic... and ask for new forum
- if ($post_data['topic_type'] != POST_GLOBAL)
- {
- $sql = 'SELECT topic_type, forum_id
- FROM ' . TOPICS_TABLE . "
- WHERE topic_id = $topic_id";
- $result = $db->sql_query($sql);
- $row = $db->sql_fetchrow($result);
- $db->sql_freeresult($result);
-
- if ($row && !$row['forum_id'] && $row['topic_type'] == POST_GLOBAL)
- {
- $to_forum_id = request_var('to_forum_id', 0);
-
- if ($to_forum_id)
- {
- $sql = 'SELECT forum_type
- FROM ' . FORUMS_TABLE . '
- WHERE forum_id = ' . $to_forum_id;
- $result = $db->sql_query($sql);
- $forum_type = (int) $db->sql_fetchfield('forum_type');
- $db->sql_freeresult($result);
-
- if ($forum_type != FORUM_POST || !$auth->acl_get('f_post', $to_forum_id) || !$auth->acl_get('f_noapprove', $to_forum_id))
- {
- $to_forum_id = 0;
- }
- }
-
- if (!$to_forum_id)
- {
- include_once($phpbb_root_path . 'includes/functions_admin.' . $phpEx);
-
- $template->assign_vars(array(
- 'S_FORUM_SELECT' => make_forum_select(false, false, false, true, true, true),
- 'S_UNGLOBALISE' => true)
- );
-
- $submit = false;
- $refresh = true;
- }
- else
- {
- if (!$auth->acl_get('f_post', $to_forum_id))
- {
- // This will only be triggered if the user tried to trick the forum.
- trigger_error('NOT_AUTHORISED');
- }
-
- $forum_id = $to_forum_id;
- }
- }
- }
-
if ($submit)
{
// Lock/Unlock Topic
@@ -1121,14 +1172,15 @@ if ($submit || $preview || $refresh)
'attachment_data' => $message_parser->attachment_data,
'filename_data' => $message_parser->filename_data,
- 'topic_approved' => (isset($post_data['topic_approved'])) ? $post_data['topic_approved'] : false,
- 'post_approved' => (isset($post_data['post_approved'])) ? $post_data['post_approved'] : false,
+ 'topic_visibility' => (isset($post_data['topic_visibility'])) ? $post_data['topic_visibility'] : false,
+ 'post_visibility' => (isset($post_data['post_visibility'])) ? $post_data['post_visibility'] : false,
);
if ($mode == 'edit')
{
- $data['topic_replies_real'] = $post_data['topic_replies_real'];
- $data['topic_replies'] = $post_data['topic_replies'];
+ $data['topic_posts_approved'] = $post_data['topic_posts_approved'];
+ $data['topic_posts_unapproved'] = $post_data['topic_posts_unapproved'];
+ $data['topic_posts_softdeleted'] = $post_data['topic_posts_softdeleted'];
}
// Only return the username when it is either a guest posting or we are editing a post and
@@ -1145,6 +1197,15 @@ if ($submit || $preview || $refresh)
$captcha->reset();
}
+ // Handle delete mode...
+ if ($request->is_set_post('delete') || $request->is_set_post('delete_permanent'))
+ {
+ $allow_reason = $auth->acl_get('m_softdelete', $forum_id) || ($auth->acl_gets('m_delete', 'f_delete', $forum_id) && $auth->acl_gets('m_softdelete', 'f_softdelete', $forum_id));
+ $soft_delete_reason = (!$request->is_set_post('delete_permanent') && $allow_reason) ? $request->variable('delete_reason', '', true) : '';
+ handle_post_delete($forum_id, $topic_id, $post_id, $post_data, !$request->is_set_post('delete_permanent'), $soft_delete_reason);
+ return;
+ }
+
// Check the permissions for post approval.
// Moderators must go through post approval like ordinary users.
if ((!$auth->acl_get('f_noapprove', $data['forum_id']) && empty($data['force_approved_state'])) || (isset($data['force_approved_state']) && !$data['force_approved_state']))
@@ -1152,17 +1213,11 @@ if ($submit || $preview || $refresh)
meta_refresh(10, $redirect_url);
$message = ($mode == 'edit') ? $user->lang['POST_EDITED_MOD'] : $user->lang['POST_STORED_MOD'];
$message .= (($user->data['user_id'] == ANONYMOUS) ? '' : ' '. $user->lang['POST_APPROVAL_NOTIFY']);
+ $message .= '<br /><br />' . sprintf($user->lang['RETURN_FORUM'], '<a href="' . append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $data['forum_id']) . '">', '</a>');
+ trigger_error($message);
}
- else
- {
- meta_refresh(3, $redirect_url);
- $message = ($mode == 'edit') ? 'POST_EDITED' : 'POST_STORED';
- $message = $user->lang[$message] . '<br /><br />' . sprintf($user->lang['VIEW_MESSAGE'], '<a href="' . $redirect_url . '">', '</a>');
- }
-
- $message .= '<br /><br />' . sprintf($user->lang['RETURN_FORUM'], '<a href="' . append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $data['forum_id']) . '">', '</a>');
- trigger_error($message);
+ redirect($redirect_url);
}
}
}
@@ -1219,8 +1274,8 @@ if (!sizeof($error) && $preview)
'POLL_QUESTION' => $parse_poll->message,
'L_POLL_LENGTH' => ($post_data['poll_length']) ? sprintf($user->lang['POLL_RUN_TILL'], $user->format_date($poll_end)) : '',
- 'L_MAX_VOTES' => ($post_data['poll_max_options'] == 1) ? $user->lang['MAX_OPTION_SELECT'] : sprintf($user->lang['MAX_OPTIONS_SELECT'], $post_data['poll_max_options']))
- );
+ 'L_MAX_VOTES' => $user->lang('MAX_OPTIONS_SELECT', (int) $post_data['poll_max_options']),
+ ));
$parse_poll->message = implode("\n", $post_data['poll_options']);
$parse_poll->format_display($post_data['enable_bbcode'], $post_data['enable_urls'], $post_data['enable_smilies']);
@@ -1263,8 +1318,8 @@ if (!sizeof($error) && $preview)
'PREVIEW_MESSAGE' => $preview_message,
'PREVIEW_SIGNATURE' => $preview_signature,
- 'S_DISPLAY_PREVIEW' => true)
- );
+ 'S_DISPLAY_PREVIEW' => !empty($preview_message),
+ ));
}
}
@@ -1422,12 +1477,13 @@ add_form_key('posting');
$template->assign_vars(array(
'L_POST_A' => $page_title,
'L_ICON' => ($mode == 'reply' || $mode == 'quote' || ($mode == 'edit' && $post_id != $post_data['topic_first_post_id'])) ? $user->lang['POST_ICON'] : $user->lang['TOPIC_ICON'],
- 'L_MESSAGE_BODY_EXPLAIN' => (intval($config['max_post_chars'])) ? sprintf($user->lang['MESSAGE_BODY_EXPLAIN'], intval($config['max_post_chars'])) : '',
+ 'L_MESSAGE_BODY_EXPLAIN' => $user->lang('MESSAGE_BODY_EXPLAIN', (int) $config['max_post_chars']),
+ 'L_TOO_MANY_ATTACHMENTS' => $user->lang('TOO_MANY_ATTACHMENTS', (int) $config['max_attachments']),
'FORUM_NAME' => $post_data['forum_name'],
'FORUM_DESC' => ($post_data['forum_desc']) ? generate_text_for_display($post_data['forum_desc'], $post_data['forum_desc_uid'], $post_data['forum_desc_bitfield'], $post_data['forum_desc_options']) : '',
'TOPIC_TITLE' => censor_text($post_data['topic_title']),
- 'MODERATORS' => (sizeof($moderators)) ? implode(', ', $moderators[$forum_id]) : '',
+ 'MODERATORS' => (sizeof($moderators)) ? implode($user->lang['COMMA_SEPARATOR'], $moderators[$forum_id]) : '',
'USERNAME' => ((!$preview && $mode != 'quote') || $preview) ? $post_data['username'] : '',
'SUBJECT' => $post_data['post_subject'],
'MESSAGE' => $post_data['post_text'],
@@ -1441,11 +1497,13 @@ $template->assign_vars(array(
'POST_DATE' => ($post_data['post_time']) ? $user->format_date($post_data['post_time']) : '',
'ERROR' => (sizeof($error)) ? implode('<br />', $error) : '',
'TOPIC_TIME_LIMIT' => (int) $post_data['topic_time_limit'],
- 'EDIT_REASON' => $post_data['post_edit_reason'],
+ 'EDIT_REASON' => $request->variable('edit_reason', ''),
'U_VIEW_FORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", "f=$forum_id"),
'U_VIEW_TOPIC' => ($mode != 'post') ? append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&amp;t=$topic_id") : '',
'U_PROGRESS_BAR' => append_sid("{$phpbb_root_path}posting.$phpEx", "f=$forum_id&amp;mode=popup"),
'UA_PROGRESS_BAR' => addslashes(append_sid("{$phpbb_root_path}posting.$phpEx", "f=$forum_id&amp;mode=popup")),
+ 'ATTACH_ORDER' => ($config['display_order']) ? 'asc' : 'desc',
+ 'MAX_ATTACHMENTS' => ($auth->acl_get('a_') || $auth->acl_get('m_', $forum_id)) ? 0 : (int) $config['max_attachments'],
'S_PRIVMSGS' => false,
'S_CLOSE_PROGRESS_WINDOW' => (isset($_POST['add_file'])) ? true : false,
@@ -1466,6 +1524,11 @@ $template->assign_vars(array(
'S_LOCK_TOPIC_CHECKED' => ($lock_topic_checked) ? ' checked="checked"' : '',
'S_LOCK_POST_ALLOWED' => ($mode == 'edit' && $auth->acl_get('m_edit', $forum_id)) ? true : false,
'S_LOCK_POST_CHECKED' => ($lock_post_checked) ? ' checked="checked"' : '',
+ 'S_SOFTDELETE_CHECKED' => ($mode == 'edit' && $post_data['post_visibility'] == ITEM_DELETED) ? ' checked="checked"' : '',
+ 'S_DELETE_REASON' => ($mode == 'edit' && $auth->acl_get('m_softdelete', $forum_id)) ? true : false,
+ 'S_SOFTDELETE_ALLOWED' => ($mode == 'edit' && $phpbb_content_visibility->can_soft_delete($forum_id, $post_data['poster_id'], $lock_post_checked)) ? true : false,
+ 'S_RESTORE_ALLOWED' => $auth->acl_get('m_approve', $forum_id),
+ 'S_IS_DELETED' => ($mode == 'edit' && $post_data['post_visibility'] == ITEM_DELETED) ? true : false,
'S_LINKS_ALLOWED' => $url_status,
'S_MAGIC_URL_CHECKED' => ($urls_checked) ? ' checked="checked"' : '',
'S_TYPE_TOGGLE' => $topic_type_toggle,
@@ -1479,8 +1542,17 @@ $template->assign_vars(array(
'S_BBCODE_QUOTE' => $quote_status,
'S_POST_ACTION' => $s_action,
- 'S_HIDDEN_FIELDS' => $s_hidden_fields)
-);
+ 'S_HIDDEN_FIELDS' => $s_hidden_fields,
+ 'S_ATTACH_DATA' => json_encode($message_parser->attachment_data),
+));
+
+/**
+* This event allows you to modify template variables for the posting screen
+*
+* @event core.posting_modify_template_vars
+* @since 3.1-A1
+*/
+$phpbb_dispatcher->dispatch('core.posting_modify_template_vars');
// Build custom bbcodes array
display_custom_bbcodes();
@@ -1495,7 +1567,7 @@ if (($mode == 'post' || ($mode == 'edit' && $post_id == $post_data['topic_first_
'S_POLL_DELETE' => ($mode == 'edit' && sizeof($post_data['poll_options']) && ((!$post_data['poll_last_vote'] && $post_data['poster_id'] == $user->data['user_id'] && $auth->acl_get('f_delete', $forum_id)) || $auth->acl_get('m_delete', $forum_id))),
'S_POLL_DELETE_CHECKED' => (!empty($poll_delete)) ? true : false,
- 'L_POLL_OPTIONS_EXPLAIN' => sprintf($user->lang['POLL_OPTIONS_' . (($mode == 'edit') ? 'EDIT_' : '') . 'EXPLAIN'], $config['max_poll_options']),
+ 'L_POLL_OPTIONS_EXPLAIN' => $user->lang('POLL_OPTIONS_' . (($mode == 'edit') ? 'EDIT_' : '') . 'EXPLAIN', (int) $config['max_poll_options']),
'VOTE_CHANGE_CHECKED' => (!empty($post_data['poll_vote_change'])) ? ' checked="checked"' : '',
'POLL_TITLE' => (isset($post_data['poll_title'])) ? $post_data['poll_title'] : '',
@@ -1508,11 +1580,16 @@ if (($mode == 'post' || ($mode == 'edit' && $post_id == $post_data['topic_first_
// Show attachment box for adding attachments if true
$allowed = ($auth->acl_get('f_attach', $forum_id) && $auth->acl_get('u_attach') && $config['allow_attachments'] && $form_enctype);
+if ($allowed)
+{
+ $plupload->configure($cache, $template, $s_action, $forum_id);
+}
+
// Attachment entry
posting_gen_attachment_entry($attachment_data, $filename_data, $allowed);
// Output page ...
-page_header($page_title, false);
+page_header($page_title);
$template->set_filenames(array(
'body' => 'posting_body.html')
@@ -1540,7 +1617,7 @@ function upload_popup($forum_style = 0)
($forum_style) ? $user->setup('posting', $forum_style) : $user->setup('posting');
- page_header($user->lang['PROGRESS_BAR'], false);
+ page_header($user->lang['PROGRESS_BAR']);
$template->set_filenames(array(
'popup' => 'posting_progress_bar.html')
@@ -1559,18 +1636,20 @@ function upload_popup($forum_style = 0)
/**
* Do the various checks required for removing posts as well as removing it
*/
-function handle_post_delete($forum_id, $topic_id, $post_id, &$post_data)
+function handle_post_delete($forum_id, $topic_id, $post_id, &$post_data, $is_soft = false, $soft_delete_reason = '')
{
- global $user, $db, $auth, $config;
+ global $user, $db, $auth, $config, $request;
global $phpbb_root_path, $phpEx;
+ $perm_check = ($is_soft) ? 'softdelete' : 'delete';
+
// If moderator removing post or user itself removing post, present a confirmation screen
- if ($auth->acl_get('m_delete', $forum_id) || ($post_data['poster_id'] == $user->data['user_id'] && $user->data['is_registered'] && $auth->acl_get('f_delete', $forum_id) && $post_id == $post_data['topic_last_post_id'] && !$post_data['post_edit_locked'] && ($post_data['post_time'] > time() - ($config['delete_time'] * 60) || !$config['delete_time'])))
+ if ($auth->acl_get("m_$perm_check", $forum_id) || ($post_data['poster_id'] == $user->data['user_id'] && $user->data['is_registered'] && $auth->acl_get("f_$perm_check", $forum_id) && $post_id == $post_data['topic_last_post_id'] && !$post_data['post_edit_locked'] && ($post_data['post_time'] > time() - ($config['delete_time'] * 60) || !$config['delete_time'])))
{
- $s_hidden_fields = build_hidden_fields(array(
+ $s_hidden_fields = array(
'p' => $post_id,
'f' => $forum_id,
- 'mode' => 'delete')
+ 'mode' => ($is_soft) ? 'soft_delete' : 'delete',
);
if (confirm_box(true))
@@ -1578,41 +1657,76 @@ function handle_post_delete($forum_id, $topic_id, $post_id, &$post_data)
$data = array(
'topic_first_post_id' => $post_data['topic_first_post_id'],
'topic_last_post_id' => $post_data['topic_last_post_id'],
- 'topic_replies_real' => $post_data['topic_replies_real'],
- 'topic_approved' => $post_data['topic_approved'],
+ 'topic_posts_approved' => $post_data['topic_posts_approved'],
+ 'topic_posts_unapproved' => $post_data['topic_posts_unapproved'],
+ 'topic_posts_softdeleted' => $post_data['topic_posts_softdeleted'],
+ 'topic_visibility' => $post_data['topic_visibility'],
'topic_type' => $post_data['topic_type'],
- 'post_approved' => $post_data['post_approved'],
+ 'post_visibility' => $post_data['post_visibility'],
'post_reported' => $post_data['post_reported'],
'post_time' => $post_data['post_time'],
'poster_id' => $post_data['poster_id'],
- 'post_postcount' => $post_data['post_postcount']
+ 'post_postcount' => $post_data['post_postcount'],
);
- $next_post_id = delete_post($forum_id, $topic_id, $post_id, $data);
+ $next_post_id = delete_post($forum_id, $topic_id, $post_id, $data, $is_soft, $soft_delete_reason);
$post_username = ($post_data['poster_id'] == ANONYMOUS && !empty($post_data['post_username'])) ? $post_data['post_username'] : $post_data['username'];
if ($next_post_id === false)
{
- add_log('mod', $forum_id, $topic_id, 'LOG_DELETE_TOPIC', $post_data['topic_title'], $post_username);
+ add_log('mod', $forum_id, $topic_id, (($is_soft) ? 'LOG_SOFTDELETE_TOPIC' : 'LOG_DELETE_TOPIC'), $post_data['topic_title'], $post_username);
$meta_info = append_sid("{$phpbb_root_path}viewforum.$phpEx", "f=$forum_id");
$message = $user->lang['POST_DELETED'];
}
else
{
- add_log('mod', $forum_id, $topic_id, 'LOG_DELETE_POST', $post_data['post_subject'], $post_username);
+ add_log('mod', $forum_id, $topic_id, (($is_soft) ? 'LOG_SOFTDELETE_POST' : 'LOG_DELETE_POST'), $post_data['post_subject'], $post_username);
$meta_info = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&amp;t=$topic_id&amp;p=$next_post_id") . "#p$next_post_id";
- $message = $user->lang['POST_DELETED'] . '<br /><br />' . sprintf($user->lang['RETURN_TOPIC'], '<a href="' . $meta_info . '">', '</a>');
+ $message = $user->lang['POST_DELETED'];
+
+ if (!$request->is_ajax())
+ {
+ $message .= '<br /><br />' . $user->lang('RETURN_TOPIC', '<a href="' . $meta_info . '">', '</a>');
+ }
}
meta_refresh(3, $meta_info);
- $message .= '<br /><br />' . sprintf($user->lang['RETURN_FORUM'], '<a href="' . append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $forum_id) . '">', '</a>');
+ if (!$request->is_ajax())
+ {
+ $message .= '<br /><br />' . $user->lang('RETURN_FORUM', '<a href="' . append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $forum_id) . '">', '</a>');
+ }
trigger_error($message);
}
else
{
- confirm_box(false, 'DELETE_POST', $s_hidden_fields);
+ global $user, $template, $request;
+
+ $can_delete = $auth->acl_get('m_delete', $forum_id) || ($post_data['poster_id'] == $user->data['user_id'] && $user->data['is_registered'] && $auth->acl_get('f_delete', $forum_id));
+ $can_softdelete = $auth->acl_get('m_softdelete', $forum_id) || ($post_data['poster_id'] == $user->data['user_id'] && $user->data['is_registered'] && $auth->acl_get('f_softdelete', $forum_id));
+ $display_reason = $auth->acl_get('m_softdelete', $forum_id) || ($can_delete && $can_softdelete);
+
+ $template->assign_vars(array(
+ 'S_SOFTDELETED' => $post_data['post_visibility'] == ITEM_DELETED,
+ 'S_CHECKED_PERMANENT' => $request->is_set_post('delete_permanent') ? ' checked="checked"' : '',
+ 'S_ALLOWED_DELETE' => $can_delete,
+ 'S_ALLOWED_SOFTDELETE' => $can_softdelete,
+ 'S_DELETE_REASON' => $display_reason,
+ ));
+
+ $l_confirm = 'DELETE_POST';
+ if ($post_data['post_visibility'] == ITEM_DELETED)
+ {
+ $l_confirm .= '_PERMANENTLY';
+ $s_hidden_fields['delete_permanent'] = '1';
+ }
+ else if (!$can_softdelete)
+ {
+ $s_hidden_fields['delete_permanent'] = '1';
+ }
+
+ confirm_box(false, $l_confirm, build_hidden_fields($s_hidden_fields), 'confirm_delete_body.html');
}
}
@@ -1629,5 +1743,3 @@ function handle_post_delete($forum_id, $topic_id, $post_id, &$post_data)
trigger_error('USER_CANNOT_DELETE');
}
-
-?> \ No newline at end of file
diff --git a/phpBB/report.php b/phpBB/report.php
index c909b4fcf3..5081f90ad1 100644
--- a/phpBB/report.php
+++ b/phpBB/report.php
@@ -2,9 +2,8 @@
/**
*
* @package phpBB3
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -72,8 +71,14 @@ if ($post_id)
trigger_error('POST_NOT_EXIST');
}
- $forum_id = (int) ($report_data['forum_id']) ? $report_data['forum_id'] : $forum_id;
- $topic_id = (int) $report_data['topic_id'];
+ $forum_id = (int) $report_data['forum_id'];
+ $topic_id = (int) $report_data['topic_id'];
+ $reported_post_text = $report_data['post_text'];
+ $reported_post_bitfield = $report_data['bbcode_bitfield'];
+ $reported_post_uid = $report_data['bbcode_uid'];
+ $reported_post_enable_bbcode = $report_data['enable_bbcode'];
+ $reported_post_enable_smilies = $report_data['enable_smilies'];
+ $reported_post_enable_magic_url = $report_data['enable_magic_url'];
$sql = 'SELECT *
FROM ' . FORUMS_TABLE . '
@@ -131,12 +136,19 @@ else
$message .= '<br /><br />' . sprintf($user->lang['RETURN_PM'], '<a href="' . $redirect_url . '">', '</a>');
trigger_error($message);
}
+
+ $reported_post_text = $report_data['message_text'];
+ $reported_post_bitfield = $report_data['bbcode_bitfield'];
+ $reported_post_uid = $report_data['bbcode_uid'];
+ $reported_post_enable_bbcode = $report_data['enable_bbcode'];
+ $reported_post_enable_smilies = $report_data['enable_smilies'];
+ $reported_post_enable_magic_url = $report_data['enable_magic_url'];
}
if ($config['enable_post_confirm'] && !$user->data['is_registered'])
{
include($phpbb_root_path . 'includes/captcha/captcha_factory.' . $phpEx);
- $captcha =& phpbb_captcha_factory::get_instance($config['captcha_plugin']);
+ $captcha = phpbb_captcha_factory::get_instance($config['captcha_plugin']);
$captcha->init(CONFIRM_REPORT);
}
@@ -175,20 +187,28 @@ if ($submit && $reason_id)
}
$sql_ary = array(
- 'reason_id' => (int) $reason_id,
- 'post_id' => $post_id,
- 'pm_id' => $pm_id,
- 'user_id' => (int) $user->data['user_id'],
- 'user_notify' => (int) $user_notify,
- 'report_closed' => 0,
- 'report_time' => (int) time(),
- 'report_text' => (string) $report_text
+ 'reason_id' => (int) $reason_id,
+ 'post_id' => $post_id,
+ 'pm_id' => $pm_id,
+ 'user_id' => (int) $user->data['user_id'],
+ 'user_notify' => (int) $user_notify,
+ 'report_closed' => 0,
+ 'report_time' => (int) time(),
+ 'report_text' => (string) $report_text,
+ 'reported_post_text' => $reported_post_text,
+ 'reported_post_uid' => $reported_post_uid,
+ 'reported_post_bitfield' => $reported_post_bitfield,
+ 'reported_post_enable_bbcode' => $reported_post_enable_bbcode,
+ 'reported_post_enable_smilies' => $reported_post_enable_smilies,
+ 'reported_post_enable_magic_url' => $reported_post_enable_magic_url,
);
$sql = 'INSERT INTO ' . REPORTS_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary);
$db->sql_query($sql);
$report_id = $db->sql_nextid();
+ $phpbb_notifications = $phpbb_container->get('notification_manager');
+
if ($post_id)
{
$sql = 'UPDATE ' . POSTS_TABLE . '
@@ -207,6 +227,10 @@ if ($submit && $reason_id)
$lang_return = $user->lang['RETURN_TOPIC'];
$lang_success = $user->lang['POST_REPORTED_SUCCESS'];
+
+ $phpbb_notifications->add_notifications('report_post', array_merge($report_data, $row, $forum_data, array(
+ 'report_text' => $report_text,
+ )));
}
else
{
@@ -233,6 +257,12 @@ if ($submit && $reason_id)
$lang_return = $user->lang['RETURN_PM'];
$lang_success = $user->lang['PM_REPORTED_SUCCESS'];
+
+ $phpbb_notifications->add_notifications('report_pm', array_merge($report_data, $row, array(
+ 'report_text' => $report_text,
+ 'from_user_id' => $report_data['author_id'],
+ 'report_id' => $report_id,
+ )));
}
meta_refresh(3, $redirect_url);
@@ -284,5 +314,3 @@ $template->set_filenames(array(
);
page_footer();
-
-?> \ No newline at end of file
diff --git a/phpBB/search.php b/phpBB/search.php
index 0f13dbbfa0..4756a941f5 100644
--- a/phpBB/search.php
+++ b/phpBB/search.php
@@ -2,9 +2,8 @@
/**
*
* @package phpBB3
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -73,7 +72,7 @@ switch ($search_id)
login_box('', $user->lang['LOGIN_EXPLAIN_UNREADSEARCH']);
}
break;
-
+
// The "new posts" search uses user_lastvisit which is user based, so it should require user to log in.
case 'newposts':
if ($user->data['user_id'] == ANONYMOUS)
@@ -81,7 +80,7 @@ switch ($search_id)
login_box('', $user->lang['LOGIN_EXPLAIN_NEWPOSTS']);
}
break;
-
+
default:
// There's nothing to do here for now ;)
break;
@@ -120,6 +119,9 @@ $sort_by_text = array('a' => $user->lang['SORT_AUTHOR'], 't' => $user->lang['SOR
$s_limit_days = $s_sort_key = $s_sort_dir = $u_sort_param = '';
gen_sort_selects($limit_days, $sort_by_text, $sort_days, $sort_key, $sort_dir, $s_limit_days, $s_sort_key, $s_sort_dir, $u_sort_param);
+$phpbb_content_visibility = $phpbb_container->get('content.visibility');
+$pagination = $phpbb_container->get('pagination');
+
if ($keywords || $author || $author_id || $search_id || $submit)
{
// clear arrays
@@ -136,7 +138,7 @@ if ($keywords || $author || $author_id || $search_id || $submit)
{
if ((strpos($author, '*') !== false) && (utf8_strlen(str_replace(array('*', '%'), '', $author)) < $config['min_search_author_chars']))
{
- trigger_error(sprintf($user->lang['TOO_FEW_AUTHOR_CHARS'], $config['min_search_author_chars']));
+ trigger_error($user->lang('TOO_FEW_AUTHOR_CHARS', (int) $config['min_search_author_chars']));
}
$sql_where = (strpos($author, '*') !== false) ? ' username_clean ' . $db->sql_like_expression(str_replace('*', $db->any_char, utf8_clean_string($author))) : " username_clean = '" . $db->sql_escape(utf8_clean_string($author)) . "'";
@@ -250,22 +252,9 @@ if ($keywords || $author || $author_id || $search_id || $submit)
}
$db->sql_freeresult($result);
- // find out in which forums the user is allowed to view approved posts
- if ($auth->acl_get('m_approve'))
- {
- $m_approve_fid_ary = array(-1);
- $m_approve_fid_sql = '';
- }
- else if ($auth->acl_getf_global('m_approve'))
- {
- $m_approve_fid_ary = array_diff(array_keys($auth->acl_getf('!m_approve', true)), $ex_fid_ary);
- $m_approve_fid_sql = ' AND (p.post_approved = 1' . ((sizeof($m_approve_fid_ary)) ? ' OR ' . $db->sql_in_set('p.forum_id', $m_approve_fid_ary, true) : '') . ')';
- }
- else
- {
- $m_approve_fid_ary = array();
- $m_approve_fid_sql = ' AND p.post_approved = 1';
- }
+ // find out in which forums the user is allowed to view posts
+ $m_approve_posts_fid_sql = $phpbb_content_visibility->get_global_visibility_sql('post', $ex_fid_ary, 'p.');
+ $m_approve_topics_fid_sql = $phpbb_content_visibility->get_global_visibility_sql('topic', $ex_fid_ary, 't.');
if ($reset_search_forum)
{
@@ -273,32 +262,39 @@ if ($keywords || $author || $author_id || $search_id || $submit)
}
// Select which method we'll use to obtain the post_id or topic_id information
- $search_type = basename($config['search_type']);
+ $search_type = $config['search_type'];
- if (!file_exists($phpbb_root_path . 'includes/search/' . $search_type . '.' . $phpEx))
+ if (!class_exists($search_type))
{
trigger_error('NO_SUCH_SEARCH_MODULE');
}
-
- require("{$phpbb_root_path}includes/search/$search_type.$phpEx");
-
// We do some additional checks in the module to ensure it can actually be utilised
$error = false;
- $search = new $search_type($error);
+ $search = new $search_type($error, $phpbb_root_path, $phpEx, $auth, $config, $db, $user);
if ($error)
{
trigger_error($error);
}
+ $common_words = $search->get_common_words();
+
// let the search module split up the keywords
if ($keywords)
{
$correct_query = $search->split_keywords($keywords, $search_terms);
- if (!$correct_query || (empty($search->search_query) && !sizeof($author_id_ary) && !$search_id))
+ if (!$correct_query || (!$search->get_search_query() && !sizeof($author_id_ary) && !$search_id))
{
- $ignored = (sizeof($search->common_words)) ? sprintf($user->lang['IGNORED_TERMS_EXPLAIN'], implode(' ', $search->common_words)) . '<br />' : '';
- trigger_error($ignored . sprintf($user->lang['NO_KEYWORDS'], $search->word_length['min'], $search->word_length['max']));
+ $ignored = (sizeof($common_words)) ? sprintf($user->lang['IGNORED_TERMS_EXPLAIN'], implode(' ', $common_words)) . '<br />' : '';
+ $word_length = $search->get_word_length();
+ if ($word_length)
+ {
+ trigger_error($ignored . $user->lang('NO_KEYWORDS', $user->lang('CHARACTERS', (int) $word_length['min']), $user->lang('CHARACTERS', (int) $word_length['max'])));
+ }
+ else
+ {
+ trigger_error($ignored);
+ }
}
}
@@ -336,7 +332,7 @@ if ($keywords || $author || $author_id || $search_id || $submit)
FROM ' . TOPICS_TABLE . " t
WHERE t.topic_moved_id = 0
$last_post_time_sql
- " . str_replace(array('p.', 'post_'), array('t.', 'topic_'), $m_approve_fid_sql) . '
+ AND " . $m_approve_topics_fid_sql . '
' . ((sizeof($ex_fid_ary)) ? ' AND ' . $db->sql_in_set('t.forum_id', $ex_fid_ary, true) : '') . '
ORDER BY t.topic_last_post_time DESC';
$field = 'topic_id';
@@ -371,10 +367,10 @@ if ($keywords || $author || $author_id || $search_id || $submit)
{
$sql = "SELECT p.post_id
FROM $sort_join" . POSTS_TABLE . ' p, ' . TOPICS_TABLE . " t
- WHERE t.topic_replies = 0
+ WHERE t.topic_posts_approved = 1
AND p.topic_id = t.topic_id
$last_post_time
- $m_approve_fid_sql
+ AND $m_approve_posts_fid_sql
" . ((sizeof($ex_fid_ary)) ? ' AND ' . $db->sql_in_set('p.forum_id', $ex_fid_ary, true) : '') . "
$sql_sort";
$field = 'post_id';
@@ -383,11 +379,11 @@ if ($keywords || $author || $author_id || $search_id || $submit)
{
$sql = 'SELECT DISTINCT ' . $sort_by_sql[$sort_key] . ", p.topic_id
FROM $sort_join" . POSTS_TABLE . ' p, ' . TOPICS_TABLE . " t
- WHERE t.topic_replies = 0
+ WHERE t.topic_posts_approved = 1
AND t.topic_moved_id = 0
AND p.topic_id = t.topic_id
$last_post_time
- $m_approve_fid_sql
+ AND $m_approve_topics_fid_sql
" . ((sizeof($ex_fid_ary)) ? ' AND ' . $db->sql_in_set('p.forum_id', $ex_fid_ary, true) : '') . "
$sql_sort";
$field = 'topic_id';
@@ -403,7 +399,7 @@ if ($keywords || $author || $author_id || $search_id || $submit)
$sql_sort = 'ORDER BY ' . $sort_by_sql[$sort_key] . (($sort_dir == 'a') ? ' ASC' : ' DESC');
$sql_where = 'AND t.topic_moved_id = 0
- ' . str_replace(array('p.', 'post_'), array('t.', 'topic_'), $m_approve_fid_sql) . '
+ AND ' . $m_approve_topics_fid_sql . '
' . ((sizeof($ex_fid_ary)) ? 'AND ' . $db->sql_in_set('t.forum_id', $ex_fid_ary, true) : '');
gen_sort_selects($limit_days, $sort_by_text, $sort_days, $sort_key, $sort_dir, $s_limit_days, $s_sort_key, $s_sort_dir, $u_sort_param);
@@ -426,9 +422,9 @@ if ($keywords || $author || $author_id || $search_id || $submit)
{
$sql = 'SELECT p.post_id
FROM ' . POSTS_TABLE . ' p
- WHERE p.post_time > ' . $user->data['user_lastvisit'] . "
- $m_approve_fid_sql
- " . ((sizeof($ex_fid_ary)) ? ' AND ' . $db->sql_in_set('p.forum_id', $ex_fid_ary, true) : '') . "
+ WHERE p.post_time > ' . $user->data['user_lastvisit'] . '
+ AND ' . $m_approve_posts_fid_sql . '
+ ' . ((sizeof($ex_fid_ary)) ? ' AND ' . $db->sql_in_set('p.forum_id', $ex_fid_ary, true) : '') . "
$sql_sort";
$field = 'post_id';
}
@@ -438,7 +434,7 @@ if ($keywords || $author || $author_id || $search_id || $submit)
FROM ' . TOPICS_TABLE . ' t
WHERE t.topic_last_post_time > ' . $user->data['user_lastvisit'] . '
AND t.topic_moved_id = 0
- ' . str_replace(array('p.', 'post_'), array('t.', 'topic_'), $m_approve_fid_sql) . '
+ AND ' . $m_approve_topics_fid_sql . '
' . ((sizeof($ex_fid_ary)) ? 'AND ' . $db->sql_in_set('t.forum_id', $ex_fid_ary, true) : '') . "
$sql_sort";
/*
@@ -450,8 +446,7 @@ if ($keywords || $author || $author_id || $search_id || $submit)
WHERE p.post_time > ' . $user->data['user_lastvisit'] . '
AND t.topic_id = p.topic_id
AND t.topic_moved_id = 0
- ' . $m_approve_fid_sql . '
- ' . ((sizeof($ex_fid_ary)) ? 'AND ' . $db->sql_in_set('t.forum_id', $ex_fid_ary, true) : '') . "
+ AND ' . $m_approve_topics_fid_sql . "
GROUP BY t.topic_id
$sql_sort";
*/
@@ -507,14 +502,7 @@ if ($keywords || $author || $author_id || $search_id || $submit)
}
// Make sure $start is set to the last page if it exceeds the amount
- if ($start < 0)
- {
- $start = 0;
- }
- else if ($start >= $total_match_count)
- {
- $start = floor(($total_match_count - 1) / $per_page) * $per_page;
- }
+ $start = $pagination->validate_start($start, $per_page, $total_match_count);
$id_ary = array_slice($id_ary, $start, $per_page);
}
@@ -527,17 +515,16 @@ if ($keywords || $author || $author_id || $search_id || $submit)
// make sure that some arrays are always in the same order
sort($ex_fid_ary);
- sort($m_approve_fid_ary);
sort($author_id_ary);
- if (!empty($search->search_query))
+ if ($search->get_search_query())
{
- $total_match_count = $search->keyword_search($show_results, $search_fields, $search_terms, $sort_by_sql, $sort_key, $sort_dir, $sort_days, $ex_fid_ary, $m_approve_fid_ary, $topic_id, $author_id_ary, $sql_author_match, $id_ary, $start, $per_page);
+ $total_match_count = $search->keyword_search($show_results, $search_fields, $search_terms, $sort_by_sql, $sort_key, $sort_dir, $sort_days, $ex_fid_ary, $m_approve_posts_fid_sql, $topic_id, $author_id_ary, $sql_author_match, $id_ary, $start, $per_page);
}
else if (sizeof($author_id_ary))
{
$firstpost_only = ($search_fields === 'firstpost' || $search_fields == 'titleonly') ? true : false;
- $total_match_count = $search->author_search($show_results, $firstpost_only, $sort_by_sql, $sort_key, $sort_dir, $sort_days, $ex_fid_ary, $m_approve_fid_ary, $topic_id, $author_id_ary, $sql_author_match, $id_ary, $start, $per_page);
+ $total_match_count = $search->author_search($show_results, $firstpost_only, $sort_by_sql, $sort_key, $sort_dir, $sort_days, $ex_fid_ary, $m_approve_posts_fid_sql, $topic_id, $author_id_ary, $sql_author_match, $id_ary, $start, $per_page);
}
$sql_where = '';
@@ -546,7 +533,7 @@ if ($keywords || $author || $author_id || $search_id || $submit)
{
$sql_where .= $db->sql_in_set(($show_results == 'posts') ? 'p.post_id' : 't.topic_id', $id_ary);
$sql_where .= (sizeof($ex_fid_ary)) ? ' AND (' . $db->sql_in_set('f.forum_id', $ex_fid_ary, true) . ' OR f.forum_id IS NULL)' : '';
- $sql_where .= ($show_results == 'posts') ? $m_approve_fid_sql : str_replace(array('p.post_approved', 'p.forum_id'), array('t.topic_approved', 't.forum_id'), $m_approve_fid_sql);
+ $sql_where .= ' AND ' . (($show_results == 'posts') ? $m_approve_posts_fid_sql : $m_approve_topics_fid_sql);
}
if ($show_results == 'posts')
@@ -566,11 +553,11 @@ if ($keywords || $author || $author_id || $search_id || $submit)
// Output header
if ($found_more_search_matches)
{
- $l_search_matches = sprintf($user->lang['FOUND_MORE_SEARCH_MATCHES'], $total_match_count);
+ $l_search_matches = $user->lang('FOUND_MORE_SEARCH_MATCHES', (int) $total_match_count);
}
else
{
- $l_search_matches = ($total_match_count == 1) ? sprintf($user->lang['FOUND_SEARCH_MATCH'], $total_match_count) : sprintf($user->lang['FOUND_SEARCH_MATCHES'], $total_match_count);
+ $l_search_matches = $user->lang('FOUND_SEARCH_MATCHES', (int) $total_match_count);
}
// define some vars for urls
@@ -594,14 +581,24 @@ if ($keywords || $author || $author_id || $search_id || $submit)
$u_search .= ($search_fields != 'all') ? '&amp;sf=' . $search_fields : '';
$u_search .= ($return_chars != 300) ? '&amp;ch=' . $return_chars : '';
+ // Check if search backend supports phrase search or not
+ $phrase_search_disabled = '';
+ if (strpos(html_entity_decode($keywords), '"') !== false && method_exists($search, 'supports_phrase_search'))
+ {
+ $phrase_search_disabled = $search->supports_phrase_search() ? false : true;
+ }
+
+ $pagination->generate_template_pagination($u_search, 'pagination', 'start', $total_match_count, $per_page, $start);
+
$template->assign_vars(array(
'SEARCH_TITLE' => $l_search_title,
'SEARCH_MATCHES' => $l_search_matches,
'SEARCH_WORDS' => $keywords,
- 'SEARCHED_QUERY' => $search->search_query,
- 'IGNORED_WORDS' => (sizeof($search->common_words)) ? implode(' ', $search->common_words) : '',
- 'PAGINATION' => generate_pagination($u_search, $total_match_count, $per_page, $start),
- 'PAGE_NUMBER' => on_page($total_match_count, $per_page, $start),
+ 'SEARCHED_QUERY' => $search->get_search_query(),
+ 'IGNORED_WORDS' => (sizeof($common_words)) ? implode(' ', $common_words) : '',
+
+ 'PHRASE_SEARCH_DISABLED' => $phrase_search_disabled,
+
'TOTAL_MATCHES' => $total_match_count,
'SEARCH_IN_RESULTS' => ($search_id) ? false : true,
@@ -615,6 +612,7 @@ if ($keywords || $author || $author_id || $search_id || $submit)
'NEWEST_POST_IMG' => $user->img('icon_topic_newest', 'VIEW_NEWEST_POST'),
'REPORTED_IMG' => $user->img('icon_topic_reported', 'TOPIC_REPORTED'),
'UNAPPROVED_IMG' => $user->img('icon_topic_unapproved', 'TOPIC_UNAPPROVED'),
+ 'DELETED_IMG' => $user->img('icon_topic_deleted', 'TOPIC_DELETED'),
'LAST_POST_IMG' => $user->img('icon_topic_latest', 'VIEW_LATEST_POST'),
'U_SEARCH_WORDS' => $u_search,
@@ -672,10 +670,22 @@ if ($keywords || $author || $author_id || $search_id || $submit)
if ($config['load_anon_lastread'] || ($user->data['is_registered'] && !$config['load_db_lastread']))
{
- $tracking_topics = (isset($_COOKIE[$config['cookie_name'] . '_track'])) ? ((STRIP) ? stripslashes($_COOKIE[$config['cookie_name'] . '_track']) : $_COOKIE[$config['cookie_name'] . '_track']) : '';
+ $tracking_topics = $request->variable($config['cookie_name'] . '_track', '', true, \phpbb\request\request_interface::COOKIE);
$tracking_topics = ($tracking_topics) ? tracking_unserialize($tracking_topics) : array();
}
+ /**
+ * Event to modify the SQL query before the topic data is retrieved
+ *
+ * @event core.search_get_topic_data
+ * @var string sql_select The SQL SELECT string used by search to get topic data
+ * @var string sql_from The SQL FROM string used by search to get topic data
+ * @var string sql_where The SQL WHERE string used by search to get topic data
+ * @since 3.1-A1
+ */
+ $vars = array('sql_select', 'sql_from', 'sql_where');
+ extract($phpbb_dispatcher->trigger_event('core.search_get_topic_data', compact($vars)));
+
$sql = "SELECT $sql_select
FROM $sql_from
WHERE $sql_where";
@@ -739,11 +749,11 @@ if ($keywords || $author || $author_id || $search_id || $submit)
{
if ($user->data['is_registered'] && $config['load_db_lastread'])
{
- $topic_tracking_info[$forum_id] = get_topic_tracking($forum_id, $forum['topic_list'], $forum['rowset'], array($forum_id => $forum['mark_time']), ($forum_id) ? false : $forum['topic_list']);
+ $topic_tracking_info[$forum_id] = get_topic_tracking($forum_id, $forum['topic_list'], $forum['rowset'], array($forum_id => $forum['mark_time']));
}
else if ($config['load_anon_lastread'] || $user->data['is_registered'])
{
- $topic_tracking_info[$forum_id] = get_complete_topic_tracking($forum_id, $forum['topic_list'], ($forum_id) ? false : $forum['topic_list']);
+ $topic_tracking_info[$forum_id] = get_complete_topic_tracking($forum_id, $forum['topic_list']);
if (!$user->data['is_registered'])
{
@@ -851,40 +861,11 @@ if ($keywords || $author || $author_id || $search_id || $submit)
$forum_id = $row['forum_id'];
$result_topic_id = $row['topic_id'];
$topic_title = censor_text($row['topic_title']);
+ $replies = $phpbb_content_visibility->get_count('topic_posts', $row, $forum_id) - 1;
- // we need to select a forum id for this global topic
- if (!$forum_id)
- {
- if (!isset($g_forum_id))
- {
- // Get a list of forums the user cannot read
- $forum_ary = array_unique(array_keys($auth->acl_getf('!f_read', true)));
-
- // Determine first forum the user is able to read (must not be a category)
- $sql = 'SELECT forum_id
- FROM ' . FORUMS_TABLE . '
- WHERE forum_type = ' . FORUM_POST;
-
- if (sizeof($forum_ary))
- {
- $sql .= ' AND ' . $db->sql_in_set('forum_id', $forum_ary, true);
- }
-
- $result = $db->sql_query_limit($sql, 1);
- $g_forum_id = (int) $db->sql_fetchfield('forum_id');
- }
- $u_forum_id = $g_forum_id;
- }
- else
- {
- $u_forum_id = $forum_id;
- }
-
- $view_topic_url_params = "f=$u_forum_id&amp;t=$result_topic_id" . (($u_hilit) ? "&amp;hilit=$u_hilit" : '');
+ $view_topic_url_params = "f=$forum_id&amp;t=$result_topic_id" . (($u_hilit) ? "&amp;hilit=$u_hilit" : '');
$view_topic_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", $view_topic_url_params);
- $replies = ($auth->acl_get('m_approve', $forum_id)) ? $row['topic_replies_real'] : $row['topic_replies'];
-
if ($show_results == 'topics')
{
if ($config['load_db_track'] && $author_id === $user->data['user_id'])
@@ -897,9 +878,11 @@ if ($keywords || $author || $author_id || $search_id || $submit)
$unread_topic = (isset($topic_tracking_info[$forum_id][$row['topic_id']]) && $row['topic_last_post_time'] > $topic_tracking_info[$forum_id][$row['topic_id']]) ? true : false;
- $topic_unapproved = (!$row['topic_approved'] && $auth->acl_get('m_approve', $forum_id)) ? true : false;
- $posts_unapproved = ($row['topic_approved'] && $row['topic_replies'] < $row['topic_replies_real'] && $auth->acl_get('m_approve', $forum_id)) ? true : false;
+ $topic_unapproved = ($row['topic_visibility'] == ITEM_UNAPPROVED && $auth->acl_get('m_approve', $forum_id)) ? true : false;
+ $posts_unapproved = ($row['topic_visibility'] == ITEM_APPROVED && $row['topic_posts_unapproved'] && $auth->acl_get('m_approve', $forum_id)) ? true : false;
+ $topic_deleted = $row['topic_visibility'] == ITEM_DELETED;
$u_mcp_queue = ($topic_unapproved || $posts_unapproved) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue&amp;mode=' . (($topic_unapproved) ? 'approve_details' : 'unapproved_posts') . "&amp;t=$result_topic_id", true, $user->session_id) : '';
+ $u_mcp_queue = (!$u_mcp_queue && $topic_deleted) ? append_sid("{$phpbb_root_path}mcp.$phpEx", "i=queue&amp;mode=deleted_topics&amp;t=$result_topic_id", true, $user->session_id) : '';
$row['topic_title'] = preg_replace('#(?!<.*)(?<!\w)(' . $hilit . ')(?!\w|[^<>]*(?:</s(?:cript|tyle))?>)#is', '<span class="posthilit">$1</span>', $row['topic_title']);
@@ -915,14 +898,11 @@ if ($keywords || $author || $author_id || $search_id || $submit)
'LAST_POST_AUTHOR_COLOUR' => get_username_string('colour', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']),
'LAST_POST_AUTHOR_FULL' => get_username_string('full', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']),
- 'PAGINATION' => topic_generate_pagination($replies, $view_topic_url),
'TOPIC_TYPE' => $topic_type,
+ 'TOPIC_IMG_STYLE' => $folder_img,
'TOPIC_FOLDER_IMG' => $user->img($folder_img, $folder_alt),
- 'TOPIC_FOLDER_IMG_SRC' => $user->img($folder_img, $folder_alt, false, '', 'src'),
'TOPIC_FOLDER_IMG_ALT' => $user->lang[$folder_alt],
- 'TOPIC_FOLDER_IMG_WIDTH'=> $user->img($folder_img, '', false, '', 'width'),
- 'TOPIC_FOLDER_IMG_HEIGHT' => $user->img($folder_img, '', false, '', 'height'),
'TOPIC_ICON_IMG' => (!empty($icons[$row['icon_id']])) ? $icons[$row['icon_id']]['img'] : '',
'TOPIC_ICON_IMG_WIDTH' => (!empty($icons[$row['icon_id']])) ? $icons[$row['icon_id']]['width'] : '',
@@ -930,7 +910,6 @@ if ($keywords || $author || $author_id || $search_id || $submit)
'ATTACH_ICON_IMG' => ($auth->acl_get('u_download') && $auth->acl_get('f_download', $forum_id) && $row['topic_attachment']) ? $user->img('icon_topic_attach', $user->lang['TOTAL_ATTACHMENTS']) : '',
'UNAPPROVED_IMG' => ($topic_unapproved || $posts_unapproved) ? $user->img('icon_topic_unapproved', ($topic_unapproved) ? 'TOPIC_UNAPPROVED' : 'POSTS_UNAPPROVED') : '',
- 'S_TOPIC_GLOBAL' => (!$forum_id) ? true : false,
'S_TOPIC_TYPE' => $row['topic_type'],
'S_USER_POSTED' => (!empty($row['topic_posted'])) ? true : false,
'S_UNREAD_TOPIC' => $unread_topic,
@@ -938,6 +917,7 @@ if ($keywords || $author || $author_id || $search_id || $submit)
'S_TOPIC_REPORTED' => (!empty($row['topic_reported']) && $auth->acl_get('m_report', $forum_id)) ? true : false,
'S_TOPIC_UNAPPROVED' => $topic_unapproved,
'S_POSTS_UNAPPROVED' => $posts_unapproved,
+ 'S_TOPIC_DELETED' => $topic_deleted,
'U_LAST_POST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", $view_topic_url_params . '&amp;p=' . $row['topic_last_post_id']) . '#p' . $row['topic_last_post_id'],
'U_LAST_POST_AUTHOR' => get_username_string('profile', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']),
@@ -971,14 +951,8 @@ if ($keywords || $author || $author_id || $search_id || $submit)
}
else
{
- // Second parse bbcode here
- if ($row['bbcode_bitfield'])
- {
- $bbcode->bbcode_second_pass($row['post_text'], $row['bbcode_uid'], $row['bbcode_bitfield']);
- }
-
- $row['post_text'] = bbcode_nl2br($row['post_text']);
- $row['post_text'] = smiley_text($row['post_text']);
+ $parse_flags = ($row['bbcode_bitfield'] ? OPTION_FLAG_BBCODE : 0) | OPTION_FLAG_SMILIES;
+ $row['post_text'] = generate_text_for_display($row['post_text'], $row['bbcode_uid'], $row['bbcode_bitfield'], $parse_flags, false);
if (!empty($attachments[$row['post_id']]))
{
@@ -1008,7 +982,7 @@ if ($keywords || $author || $author_id || $search_id || $submit)
);
}
- $template->assign_block_vars('searchresults', array_merge($tpl_ary, array(
+ $tpl_ary = array_merge($tpl_ary, array(
'FORUM_ID' => $forum_id,
'TOPIC_ID' => $result_topic_id,
'POST_ID' => ($show_results == 'posts') ? $row['post_id'] : false,
@@ -1020,14 +994,33 @@ if ($keywords || $author || $author_id || $search_id || $submit)
'U_VIEW_TOPIC' => $view_topic_url,
'U_VIEW_FORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $forum_id),
- 'U_VIEW_POST' => (!empty($row['post_id'])) ? append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&amp;t=" . $row['topic_id'] . '&amp;p=' . $row['post_id'] . (($u_hilit) ? '&amp;hilit=' . $u_hilit : '')) . '#p' . $row['post_id'] : '')
+ 'U_VIEW_POST' => (!empty($row['post_id'])) ? append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&amp;t=" . $row['topic_id'] . '&amp;p=' . $row['post_id'] . (($u_hilit) ? '&amp;hilit=' . $u_hilit : '')) . '#p' . $row['post_id'] : '',
));
+
+ /**
+ * Modify the topic data before it is assigned to the template
+ *
+ * @event core.search_modify_tpl_ary
+ * @var array row Array with topic data
+ * @var array tpl_ary Template block array with topic data
+ * @since 3.1-A1
+ */
+ $vars = array('row', 'tpl_ary');
+ extract($phpbb_dispatcher->trigger_event('core.search_modify_tpl_ary', compact($vars)));
+
+ $template->assign_block_vars('searchresults', $tpl_ary);
+
+ if ($show_results == 'topics')
+ {
+ $pagination->generate_template_pagination($view_topic_url, 'searchresults.pagination', 'start', $replies + 1, $config['posts_per_page'], 1, true, true);
+ }
}
if ($topic_id && ($topic_id == $result_topic_id))
{
$template->assign_vars(array(
'SEARCH_TOPIC' => $topic_title,
+ 'L_RETURN_TO_TOPIC' => $user->lang('RETURN_TO', $topic_title),
'U_SEARCH_TOPIC' => $view_topic_url
));
}
@@ -1230,5 +1223,3 @@ $template->set_filenames(array(
make_jumpbox(append_sid("{$phpbb_root_path}viewforum.$phpEx"));
page_footer();
-
-?> \ No newline at end of file
diff --git a/phpBB/style.php b/phpBB/style.php
deleted file mode 100644
index f1b41c6a85..0000000000
--- a/phpBB/style.php
+++ /dev/null
@@ -1,293 +0,0 @@
-<?php
-/**
-*
-* @package phpBB3
-* @version $Id$
-* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
-*
-*/
-
-/**
-* @ignore
-*/
-define('IN_PHPBB', true);
-$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
-$phpEx = substr(strrchr(__FILE__, '.'), 1);
-
-require($phpbb_root_path . 'includes/startup.' . $phpEx);
-require($phpbb_root_path . 'config.' . $phpEx);
-
-if (!defined('PHPBB_INSTALLED') || empty($dbms) || empty($acm_type))
-{
- exit;
-}
-
-// Load Extensions
-if (!empty($load_extensions) && function_exists('dl'))
-{
- $load_extensions = explode(',', $load_extensions);
-
- foreach ($load_extensions as $extension)
- {
- @dl(trim($extension));
- }
-}
-
-$id = (isset($_GET['id'])) ? intval($_GET['id']) : 0;
-
-// This is a simple script to grab and output the requested CSS data stored in the DB
-// We include a session_id check to try and limit 3rd party linking ... unless they
-// happen to have a current session it will output nothing. We will also cache the
-// resulting CSS data for five minutes ... anything to reduce the load on the SQL
-// server a little
-if ($id)
-{
- // Include files
- require($phpbb_root_path . 'includes/acm/acm_' . $acm_type . '.' . $phpEx);
- require($phpbb_root_path . 'includes/cache.' . $phpEx);
- require($phpbb_root_path . 'includes/db/' . $dbms . '.' . $phpEx);
- require($phpbb_root_path . 'includes/constants.' . $phpEx);
- require($phpbb_root_path . 'includes/functions.' . $phpEx);
-
- $db = new $sql_db();
- $cache = new cache();
-
- // Connect to DB
- if (!@$db->sql_connect($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, false, false))
- {
- exit;
- }
- unset($dbpasswd);
-
- $config = $cache->obtain_config();
- $user = false;
-
- // try to get a session ID from REQUEST array
- $sid = request_var('sid', '');
-
- if (!$sid)
- {
- // if that failed, then look in the cookies
- $sid = request_var($config['cookie_name'] . '_sid', '', false, true);
- }
-
- if (strspn($sid, 'abcdefABCDEF0123456789') !== strlen($sid))
- {
- $sid = '';
- }
-
- if ($sid)
- {
- $sql = 'SELECT u.user_id, u.user_lang
- FROM ' . SESSIONS_TABLE . ' s, ' . USERS_TABLE . " u
- WHERE s.session_id = '" . $db->sql_escape($sid) . "'
- AND s.session_user_id = u.user_id";
- $result = $db->sql_query($sql);
- $user = $db->sql_fetchrow($result);
- $db->sql_freeresult($result);
- }
-
- $recompile = $config['load_tplcompile'];
- if (!$user)
- {
- $id = ($id) ? $id : $config['default_style'];
-// Commented out because calls do not always include the SID anymore
-// $recompile = false;
- $user = array('user_id' => ANONYMOUS);
- }
-
- $sql = 'SELECT s.style_id, c.theme_id, c.theme_data, c.theme_path, c.theme_name, c.theme_mtime, i.*, t.template_path
- FROM ' . STYLES_TABLE . ' s, ' . STYLES_TEMPLATE_TABLE . ' t, ' . STYLES_THEME_TABLE . ' c, ' . STYLES_IMAGESET_TABLE . ' i
- WHERE s.style_id = ' . $id . '
- AND t.template_id = s.template_id
- AND c.theme_id = s.theme_id
- AND i.imageset_id = s.imageset_id';
- $result = $db->sql_query($sql, 300);
- $theme = $db->sql_fetchrow($result);
- $db->sql_freeresult($result);
-
- if (!$theme)
- {
- exit;
- }
-
- if ($user['user_id'] == ANONYMOUS)
- {
- $user['user_lang'] = $config['default_lang'];
- }
-
- $user_image_lang = (file_exists($phpbb_root_path . 'styles/' . $theme['imageset_path'] . '/imageset/' . $user['user_lang'])) ? $user['user_lang'] : $config['default_lang'];
-
- // Same query in session.php
- $sql = 'SELECT *
- FROM ' . STYLES_IMAGESET_DATA_TABLE . '
- WHERE imageset_id = ' . $theme['imageset_id'] . "
- AND image_filename <> ''
- AND image_lang IN ('" . $db->sql_escape($user_image_lang) . "', '')";
- $result = $db->sql_query($sql, 3600);
-
- $img_array = array();
- while ($row = $db->sql_fetchrow($result))
- {
- $img_array[$row['image_name']] = $row;
- }
- $db->sql_freeresult($result);
-
- // gzip_compression
- if ($config['gzip_compress'])
- {
- // IE6 is not able to compress the style (do not ask us why!)
- $browser = (!empty($_SERVER['HTTP_USER_AGENT'])) ? strtolower(htmlspecialchars((string) $_SERVER['HTTP_USER_AGENT'])) : '';
-
- if ($browser && strpos($browser, 'msie 6.0') === false && @extension_loaded('zlib') && !headers_sent())
- {
- ob_start('ob_gzhandler');
- }
- }
-
- // Expire time of seven days if not recached
- $expire_time = 7*86400;
- $recache = false;
-
- // Re-cache stylesheet data if necessary
- if ($recompile || empty($theme['theme_data']))
- {
- $recache = (empty($theme['theme_data'])) ? true : false;
- $update_time = time();
-
- // We test for stylesheet.css because it is faster and most likely the only file changed on common themes
- if (!$recache && $theme['theme_mtime'] < @filemtime("{$phpbb_root_path}styles/" . $theme['theme_path'] . '/theme/stylesheet.css'))
- {
- $recache = true;
- $update_time = @filemtime("{$phpbb_root_path}styles/" . $theme['theme_path'] . '/theme/stylesheet.css');
- }
- else if (!$recache)
- {
- $last_change = $theme['theme_mtime'];
- $dir = @opendir("{$phpbb_root_path}styles/{$theme['theme_path']}/theme");
-
- if ($dir)
- {
- while (($entry = readdir($dir)) !== false)
- {
- if (substr(strrchr($entry, '.'), 1) == 'css' && $last_change < @filemtime("{$phpbb_root_path}styles/{$theme['theme_path']}/theme/{$entry}"))
- {
- $recache = true;
- break;
- }
- }
- closedir($dir);
- }
- }
- }
-
- if ($recache)
- {
- include_once($phpbb_root_path . 'includes/acp/acp_styles.' . $phpEx);
-
- $theme['theme_data'] = acp_styles::db_theme_data($theme);
- $theme['theme_mtime'] = $update_time;
-
- // Save CSS contents
- $sql_ary = array(
- 'theme_mtime' => $theme['theme_mtime'],
- 'theme_data' => $theme['theme_data']
- );
-
- $sql = 'UPDATE ' . STYLES_THEME_TABLE . ' SET ' . $db->sql_build_array('UPDATE', $sql_ary) . "
- WHERE theme_id = {$theme['theme_id']}";
- $db->sql_query($sql);
-
- $cache->destroy('sql', STYLES_THEME_TABLE);
- }
-
- // Only set the expire time if the theme changed data is older than 30 minutes - to cope with changes from the ACP
- if ($recache || $theme['theme_mtime'] > (time() - 1800))
- {
- header('Expires: 0');
- }
- else
- {
- header('Expires: ' . gmdate('D, d M Y H:i:s \G\M\T', time() + $expire_time));
- }
-
- header('Content-type: text/css; charset=UTF-8');
-
- // Parse Theme Data
- $replace = array(
- '{T_THEME_PATH}' => "{$phpbb_root_path}styles/" . rawurlencode($theme['theme_path']) . '/theme',
- '{T_TEMPLATE_PATH}' => "{$phpbb_root_path}styles/" . rawurlencode($theme['template_path']) . '/template',
- '{T_IMAGESET_PATH}' => "{$phpbb_root_path}styles/" . rawurlencode($theme['imageset_path']) . '/imageset',
- '{T_IMAGESET_LANG_PATH}' => "{$phpbb_root_path}styles/" . rawurlencode($theme['imageset_path']) . '/imageset/' . $user_image_lang,
- '{T_STYLESHEET_NAME}' => $theme['theme_name'],
- '{S_USER_LANG}' => $user['user_lang']
- );
-
- $theme['theme_data'] = str_replace(array_keys($replace), array_values($replace), $theme['theme_data']);
-
- $matches = array();
- preg_match_all('#\{IMG_([A-Za-z0-9_]*?)_(WIDTH|HEIGHT|SRC)\}#', $theme['theme_data'], $matches);
-
- $imgs = $find = $replace = array();
- if (isset($matches[0]) && sizeof($matches[0]))
- {
- foreach ($matches[1] as $i => $img)
- {
- $img = strtolower($img);
- $find[] = $matches[0][$i];
-
- if (!isset($img_array[$img]))
- {
- $replace[] = '';
- continue;
- }
-
- if (!isset($imgs[$img]))
- {
- $img_data = &$img_array[$img];
- $imgsrc = ($img_data['image_lang'] ? $img_data['image_lang'] . '/' : '') . $img_data['image_filename'];
- $imgs[$img] = array(
- 'src' => $phpbb_root_path . 'styles/' . rawurlencode($theme['imageset_path']) . '/imageset/' . $imgsrc,
- 'width' => $img_data['image_width'],
- 'height' => $img_data['image_height'],
- );
- }
-
- switch ($matches[2][$i])
- {
- case 'SRC':
- $replace[] = $imgs[$img]['src'];
- break;
-
- case 'WIDTH':
- $replace[] = $imgs[$img]['width'];
- break;
-
- case 'HEIGHT':
- $replace[] = $imgs[$img]['height'];
- break;
-
- default:
- continue;
- }
- }
-
- if (sizeof($find))
- {
- $theme['theme_data'] = str_replace($find, $replace, $theme['theme_data']);
- }
- }
-
- echo $theme['theme_data'];
-
- if (!empty($cache))
- {
- $cache->unload();
- }
- $db->sql_close();
-}
-
-exit;
-
-?> \ No newline at end of file
diff --git a/phpBB/styles/prosilver/imageset/en/button_pm_forward.gif b/phpBB/styles/prosilver/imageset/en/button_pm_forward.gif
deleted file mode 100644
index 3384df34be..0000000000
--- a/phpBB/styles/prosilver/imageset/en/button_pm_forward.gif
+++ /dev/null
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/en/button_pm_new.gif b/phpBB/styles/prosilver/imageset/en/button_pm_new.gif
deleted file mode 100644
index cc0381c6b2..0000000000
--- a/phpBB/styles/prosilver/imageset/en/button_pm_new.gif
+++ /dev/null
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/en/button_pm_reply.gif b/phpBB/styles/prosilver/imageset/en/button_pm_reply.gif
deleted file mode 100644
index 3275b06d52..0000000000
--- a/phpBB/styles/prosilver/imageset/en/button_pm_reply.gif
+++ /dev/null
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/en/button_topic_locked.gif b/phpBB/styles/prosilver/imageset/en/button_topic_locked.gif
deleted file mode 100644
index b08918a24f..0000000000
--- a/phpBB/styles/prosilver/imageset/en/button_topic_locked.gif
+++ /dev/null
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/en/button_topic_new.gif b/phpBB/styles/prosilver/imageset/en/button_topic_new.gif
deleted file mode 100644
index 5b7b1e0e60..0000000000
--- a/phpBB/styles/prosilver/imageset/en/button_topic_new.gif
+++ /dev/null
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/en/button_topic_reply.gif b/phpBB/styles/prosilver/imageset/en/button_topic_reply.gif
deleted file mode 100644
index e900c80c70..0000000000
--- a/phpBB/styles/prosilver/imageset/en/button_topic_reply.gif
+++ /dev/null
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/en/imageset.cfg b/phpBB/styles/prosilver/imageset/en/imageset.cfg
deleted file mode 100644
index a23eb170fb..0000000000
--- a/phpBB/styles/prosilver/imageset/en/imageset.cfg
+++ /dev/null
@@ -1,35 +0,0 @@
-#
-# phpBB Imageset Configuration File
-#
-# @package phpBB3
-# @copyright (c) 2006 phpBB Group
-# @license http://opensource.org/licenses/gpl-license.php GNU Public License
-#
-#
-# At the left is the name, please do not change this
-# At the right the value is entered
-# For on/off options the valid values are on, off, 1, 0, true and false
-#
-# Values get trimmed, if you want to add a space in front or at the end of
-# the value, then enclose the value with single or double quotes.
-# Single and double quotes do not need to be escaped.
-#
-#
-
-# Images
-img_icon_contact_pm = icon_contact_pm.gif*20*28
-
-img_icon_post_edit = icon_post_edit.gif*20*42
-img_icon_post_quote = icon_post_quote.gif*20*54
-
-img_icon_user_online = icon_user_online.gif*58*58
-img_icon_user_offline =
-img_icon_user_search =
-
-img_button_pm_forward = button_pm_forward.gif*25*96
-img_button_pm_new = button_pm_new.gif*25*84
-img_button_pm_reply = button_pm_reply.gif*25*96
-
-img_button_topic_locked = button_topic_locked.gif*25*88
-img_button_topic_new = button_topic_new.gif*25*96
-img_button_topic_reply = button_topic_reply.gif*25*96
diff --git a/phpBB/styles/prosilver/imageset/icon_contact_msnm.gif b/phpBB/styles/prosilver/imageset/icon_contact_msnm.gif
deleted file mode 100644
index b82253599b..0000000000
--- a/phpBB/styles/prosilver/imageset/icon_contact_msnm.gif
+++ /dev/null
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/imageset.cfg b/phpBB/styles/prosilver/imageset/imageset.cfg
deleted file mode 100644
index 22178d8a9d..0000000000
--- a/phpBB/styles/prosilver/imageset/imageset.cfg
+++ /dev/null
@@ -1,116 +0,0 @@
-#
-# phpBB Imageset Configuration File
-#
-# @package phpBB3
-# @copyright (c) 2006 phpBB Group
-# @license http://opensource.org/licenses/gpl-license.php GNU Public License
-#
-#
-# At the left is the name, please do not change this
-# At the right the value is entered
-# For on/off options the valid values are on, off, 1, 0, true and false
-#
-# Values get trimmed, if you want to add a space in front or at the end of
-# the value, then enclose the value with single or double quotes.
-# Single and double quotes do not need to be escaped.
-#
-#
-
-# General Information about this style
-name = prosilver
-copyright = &copy; phpBB Group, 2007
-version = 3.0.12
-
-# Images
-img_site_logo = site_logo.gif*52*139
-img_poll_left =
-img_poll_center =
-img_poll_right =
-img_icon_friend =
-img_icon_foe =
-
-img_forum_link = forum_link.gif*27*27
-img_forum_read = forum_read.gif*27*27
-img_forum_read_locked = forum_read_locked.gif*27*27
-img_forum_read_subforum = forum_read_subforum.gif*27*27
-img_forum_unread = forum_unread.gif*27*27
-img_forum_unread_locked = forum_unread_locked.gif*27*27
-img_forum_unread_subforum = forum_unread_subforum.gif*27*27
-
-img_topic_moved = topic_moved.gif*27*27
-
-img_topic_read = topic_read.gif*27*27
-img_topic_read_mine = topic_read_mine.gif*27*27
-img_topic_read_hot = topic_read_hot.gif*27*27
-img_topic_read_hot_mine = topic_read_hot_mine.gif*27*27
-img_topic_read_locked = topic_read_locked.gif*27*27
-img_topic_read_locked_mine = topic_read_locked_mine.gif*27*27
-
-img_topic_unread = topic_unread.gif*27*27
-img_topic_unread_mine = topic_unread_mine.gif*27*27
-img_topic_unread_hot = topic_unread_hot.gif*27*27
-img_topic_unread_hot_mine = topic_unread_hot_mine.gif*27*27
-img_topic_unread_locked = topic_unread_locked.gif*27*27
-img_topic_unread_locked_mine = topic_unread_locked_mine.gif*27*27
-
-img_sticky_read = sticky_read.gif*27*27
-img_sticky_read_mine = sticky_read_mine.gif*27*27
-img_sticky_read_locked = sticky_read_locked.gif*27*27
-img_sticky_read_locked_mine = sticky_read_locked_mine.gif*27*27
-img_sticky_unread = sticky_unread.gif*27*27
-img_sticky_unread_mine = sticky_unread_mine.gif*27*27
-img_sticky_unread_locked = sticky_unread_locked.gif*27*27
-img_sticky_unread_locked_mine = sticky_unread_locked_mine.gif*27*27
-
-img_announce_read = announce_read.gif*27*27
-img_announce_read_mine = announce_read_mine.gif*27*27
-img_announce_read_locked = announce_read_locked.gif*27*27
-img_announce_read_locked_mine = announce_read_locked_mine.gif*27*27
-img_announce_unread = announce_unread.gif*27*27
-img_announce_unread_mine = announce_unread_mine.gif*27*27
-img_announce_unread_locked = announce_unread_locked.gif*27*27
-img_announce_unread_locked_mine = announce_unread_locked_mine.gif*27*27
-
-img_global_read = announce_read.gif*27*27
-img_global_read_mine = announce_read_mine.gif*27*27
-img_global_read_locked = announce_read_locked.gif*27*27
-img_global_read_locked_mine = announce_read_locked_mine.gif*27*27
-img_global_unread = announce_unread.gif*27*27
-img_global_unread_mine = announce_unread_mine.gif*27*27
-img_global_unread_locked = announce_unread_locked.gif*27*27
-img_global_unread_locked_mine = announce_unread_locked_mine.gif*27*27
-
-img_subforum_read = subforum_read.gif*9*11
-img_subforum_unread = subforum_unread.gif*9*11
-
-img_pm_read = topic_read.gif*27*27
-img_pm_unread = topic_unread.gif*27*27
-
-img_icon_back_top = icon_back_top.gif*11*11
-
-img_icon_contact_aim = icon_contact_aim.gif*20*20
-img_icon_contact_email = icon_contact_email.gif*20*20
-img_icon_contact_icq = icon_contact_icq.gif*20*20
-img_icon_contact_jabber = icon_contact_jabber.gif*20*20
-img_icon_contact_msnm = icon_contact_msnm.gif*20*20
-
-img_icon_contact_www = icon_contact_www.gif*20*20
-img_icon_contact_yahoo = icon_contact_yahoo.gif*20*20
-
-img_icon_post_delete = icon_post_delete.gif*20*20
-
-img_icon_post_info = icon_post_info.gif*20*20
-
-img_icon_post_report = icon_post_report.gif*20*20
-img_icon_post_target = icon_post_target.gif*9*11
-img_icon_post_target_unread = icon_post_target_unread.gif*9*11
-
-img_icon_topic_attach = icon_topic_attach.gif*10*7
-img_icon_topic_latest = icon_topic_latest.gif*9*11
-img_icon_topic_newest = icon_topic_newest.gif*9*11
-img_icon_topic_reported = icon_topic_reported.gif*14*16
-img_icon_topic_unapproved = icon_topic_unapproved.gif*14*16
-
-img_icon_user_profile =
-
-img_icon_user_warn = icon_user_warn.gif*20*20
diff --git a/phpBB/styles/prosilver/style.cfg b/phpBB/styles/prosilver/style.cfg
index abd5a5dd22..6b73b25a79 100644
--- a/phpBB/styles/prosilver/style.cfg
+++ b/phpBB/styles/prosilver/style.cfg
@@ -3,12 +3,11 @@
#
# @package phpBB3
# @copyright (c) 2005 phpBB Group
-# @license http://opensource.org/licenses/gpl-license.php GNU Public License
+# @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
#
#
# At the left is the name, please do not change this
# At the right the value is entered
-# For on/off options the valid values are on, off, 1, 0, true and false
#
# Values get trimmed, if you want to add a space in front or at the end of
# the value, then enclose the value with single or double quotes.
@@ -19,4 +18,12 @@
# General Information about this style
name = prosilver
copyright = © phpBB Group, 2007
-version = 3.0.12
+style_version = 3.1.0-b1
+phpbb_version = 3.1.0-b1
+
+# Defining a different template bitfield
+# template_bitfield = lNg=
+
+# Parent style
+# Set value to empty or to this style's name if this style does not have a parent style
+parent = prosilver
diff --git a/phpBB/styles/prosilver/template/ajax.js b/phpBB/styles/prosilver/template/ajax.js
new file mode 100644
index 0000000000..1d70adc48d
--- /dev/null
+++ b/phpBB/styles/prosilver/template/ajax.js
@@ -0,0 +1,409 @@
+(function($) { // Avoid conflicts with other libraries
+
+"use strict";
+
+/**
+* Close popup alert after a specified delay
+*
+* @param int Delay in ms until darkenwrapper's click event is triggered
+*/
+phpbb.closeDarkenWrapper = function(delay) {
+ setTimeout(function() {
+ $('#darkenwrapper').trigger('click');
+ }, delay);
+};
+
+// This callback will mark all forum icons read
+phpbb.addAjaxCallback('mark_forums_read', function(res) {
+ var readTitle = res.NO_UNREAD_POSTS;
+ var unreadTitle = res.UNREAD_POSTS;
+ var iconsArray = {
+ 'forum_unread': 'forum_read',
+ 'forum_unread_subforum': 'forum_read_subforum',
+ 'forum_unread_locked': 'forum_read_locked'
+ };
+
+ $('li.row').find('dl[class*="forum_unread"]').each(function() {
+ var $this = $(this);
+
+ $.each(iconsArray, function(unreadClass, readClass) {
+ if ($this.hasClass(unreadClass)) {
+ $this.removeClass(unreadClass).addClass(readClass);
+ }
+ });
+ $this.children('dt[title="' + unreadTitle + '"]').attr('title', readTitle);
+ });
+
+ // Mark subforums read
+ $('a.subforum[class*="unread"]').removeClass('unread').addClass('read');
+
+ // Mark topics read if we are watching a category and showing active topics
+ if ($('#active_topics').length) {
+ phpbb.ajaxCallbacks.mark_topics_read.call(this, res, false);
+ }
+
+ // Update mark forums read links
+ $('[data-ajax="mark_forums_read"]').attr('href', res.U_MARK_FORUMS);
+
+ phpbb.closeDarkenWrapper(3000);
+});
+
+/**
+* This callback will mark all topic icons read
+*
+* @param update_topic_links bool Wether "Mark topics read" links should be
+* updated. Defaults to true.
+*/
+phpbb.addAjaxCallback('mark_topics_read', function(res, update_topic_links) {
+ var readTitle = res.NO_UNREAD_POSTS;
+ var unreadTitle = res.UNREAD_POSTS;
+ var iconsArray = {
+ 'global_unread': 'global_read',
+ 'announce_unread': 'announce_read',
+ 'sticky_unread': 'sticky_read',
+ 'topic_unread': 'topic_read'
+ };
+ var iconsState = ['', '_hot', '_hot_mine', '_locked', '_locked_mine', '_mine'];
+ var unreadClassSelectors = '';
+ var classMap = {};
+ var classNames = [];
+
+ if (typeof update_topic_links === 'undefined') {
+ update_topic_links = true;
+ }
+
+ $.each(iconsArray, function(unreadClass, readClass) {
+ $.each(iconsState, function(key, value) {
+ // Only topics can be hot
+ if ((value === '_hot' || value === '_hot_mine') && unreadClass !== 'topic_unread') {
+ return true;
+ }
+ classMap[unreadClass + value] = readClass + value;
+ classNames.push(unreadClass + value);
+ });
+ });
+
+ unreadClassSelectors = '.' + classNames.join(',.');
+
+ $('li.row').find(unreadClassSelectors).each(function() {
+ var $this = $(this);
+ $.each(classMap, function(unreadClass, readClass) {
+ if ($this.hasClass(unreadClass)) {
+ $this.removeClass(unreadClass).addClass(readClass);
+ }
+ });
+ $this.children('dt[title="' + unreadTitle + '"]').attr('title', readTitle);
+ });
+
+ // Remove link to first unread post
+ $('a').has('span.icon_topic_newest').remove();
+
+ // Update mark topics read links
+ if (update_topic_links) {
+ $('[data-ajax="mark_topics_read"]').attr('href', res.U_MARK_TOPICS);
+ }
+
+ phpbb.closeDarkenWrapper(3000);
+});
+
+// This callback will mark all notifications read
+phpbb.addAjaxCallback('notification.mark_all_read', function(res) {
+ if (typeof res.success !== 'undefined') {
+ phpbb.markNotifications($('#notification_list li.bg2'), 0);
+ phpbb.closeDarkenWrapper(3000);
+ }
+});
+
+// This callback will mark a notification read
+phpbb.addAjaxCallback('notification.mark_read', function(res) {
+ if (typeof res.success !== 'undefined') {
+ var unreadCount = Number($('#notification_list_button strong').html()) - 1;
+ phpbb.markNotifications($(this).parent('li.bg2'), unreadCount);
+ }
+});
+
+/**
+ * Mark notification popup rows as read.
+ *
+ * @param {jQuery} el jQuery object(s) to mark read.
+ * @param {int} unreadCount The new unread notifications count.
+ */
+phpbb.markNotifications = function(el, unreadCount) {
+ // Remove the unread status.
+ el.removeClass('bg2');
+ el.find('a.mark_read').remove();
+
+ // Update the notification link to the real URL.
+ el.each(function() {
+ var link = $(this).find('a');
+ link.attr('href', link.attr('data-real-url'));
+ });
+
+ // Update the unread count.
+ $('#notification_list_button strong').html(unreadCount);
+ // Remove the Mark all read link if there are no unread notifications.
+ if (!unreadCount) {
+ $('#mark_all_notifications').remove();
+ }
+};
+
+// This callback finds the post from the delete link, and removes it.
+phpbb.addAjaxCallback('post_delete', function() {
+ var el = $(this),
+ postId;
+
+ if (el.attr('data-refresh') === undefined) {
+ postId = el[0].href.split('&p=')[1];
+ var post = el.parents('#p' + postId).css('pointer-events', 'none');
+ if (post.hasClass('bg1') || post.hasClass('bg2')) {
+ var posts1 = post.nextAll('.bg1');
+ post.nextAll('.bg2').removeClass('bg2').addClass('bg1');
+ posts1.removeClass('bg1').addClass('bg2');
+ }
+ post.fadeOut(function() {
+ $(this).remove();
+ });
+ }
+});
+
+// This callback removes the approve / disapprove div or link.
+phpbb.addAjaxCallback('post_visibility', function(res) {
+ var remove = (res.visible) ? $(this) : $(this).parents('.post');
+ $(remove).css('pointer-events', 'none').fadeOut(function() {
+ $(this).remove();
+ });
+
+ if (res.visible)
+ {
+ // Remove the "Deleted by" message from the post on restoring.
+ remove.parents('.post').find('.post_deleted_msg').css('pointer-events', 'none').fadeOut(function() {
+ $(this).remove();
+ });
+ }
+});
+
+// This removes the parent row of the link or form that fired the callback.
+phpbb.addAjaxCallback('row_delete', function() {
+ $(this).parents('tr').remove();
+});
+
+// This handles friend / foe additions removals.
+phpbb.addAjaxCallback('zebra', function(res) {
+ var zebra;
+
+ if (res.success) {
+ zebra = $('.zebra');
+ zebra.first().html(res.MESSAGE_TEXT);
+ zebra.not(':first').html('&nbsp;').prev().html('&nbsp;');
+ }
+});
+
+/**
+ * This callback updates the poll results after voting.
+ */
+phpbb.addAjaxCallback('vote_poll', function(res) {
+ if (typeof res.success !== 'undefined') {
+ var poll = $('.topic_poll');
+ var panel = poll.find('.panel');
+ var results_visible = poll.find('dl:first-child .resultbar').is(':visible');
+
+ // Set min-height to prevent the page from jumping when the content changes
+ var update_panel_height = function (height) {
+ var height = (typeof height === 'undefined') ? panel.find('.inner').outerHeight() : height;
+ panel.css('min-height', height);
+ };
+ update_panel_height();
+
+ // Remove the View results link
+ if (!results_visible) {
+ poll.find('.poll_view_results').hide(500);
+ }
+
+ if (!res.can_vote) {
+ poll.find('.polls, .poll_max_votes, .poll_vote, .poll_option_select').fadeOut(500, function () {
+ poll.find('.resultbar, .poll_option_percent, .poll_total_votes').show();
+ });
+ } else {
+ // If the user can still vote, simply slide down the results
+ poll.find('.resultbar, .poll_option_percent, .poll_total_votes').show(500);
+ }
+
+ // Update the total votes count
+ poll.find('.poll_total_vote_cnt').html(res.total_votes);
+
+ // Update each option
+ poll.find('[data-poll-option-id]').each(function() {
+ var option = $(this);
+ var option_id = option.attr('data-poll-option-id');
+ var voted = (typeof res.user_votes[option_id] !== 'undefined') ? true : false;
+ var percent = (!res.total_votes) ? 0 : Math.round((res.vote_counts[option_id] / res.total_votes) * 100);
+
+ option.toggleClass('voted', voted);
+
+ // Update the bars
+ var bar = option.find('.resultbar div');
+ var bar_time_lapse = (res.can_vote) ? 500 : 1500;
+ var new_bar_class = (percent == 100) ? 'pollbar5' : 'pollbar' + (Math.floor(percent / 20) + 1);
+
+ setTimeout(function () {
+ bar.animate({width: percent + '%'}, 500).removeClass('pollbar1 pollbar2 pollbar3 pollbar4 pollbar5').addClass(new_bar_class);
+ bar.html(res.vote_counts[option_id]);
+
+ var percent_txt = (!percent) ? res.NO_VOTES : percent + '%';
+ option.find('.poll_option_percent').html(percent_txt);
+ }, bar_time_lapse);
+ });
+
+ if (!res.can_vote) {
+ poll.find('.polls').delay(400).fadeIn(500);
+ }
+
+ // Display "Your vote has been cast." message. Disappears after 5 seconds.
+ var confirmation_delay = (res.can_vote) ? 300 : 900;
+ poll.find('.vote-submitted').delay(confirmation_delay).slideDown(200, function() {
+ if (results_visible) {
+ update_panel_height();
+ }
+
+ $(this).delay(5000).fadeOut(500, function() {
+ resize_panel(300);
+ });
+ });
+
+ // Remove the gap resulting from removing options
+ setTimeout(function() {
+ resize_panel(500);
+ }, 1500);
+
+ var resize_panel = function (time) {
+ var panel_height = panel.height();
+ var inner_height = panel.find('.inner').outerHeight();
+
+ if (panel_height != inner_height) {
+ panel.css({'min-height': '', 'height': panel_height}).animate({height: inner_height}, time, function () {
+ panel.css({'min-height': inner_height, 'height': ''});
+ });
+ }
+ };
+ }
+});
+
+/**
+ * Show poll results when clicking View results link.
+ */
+$('.poll_view_results a').click(function(e) {
+ // Do not follow the link
+ e.preventDefault();
+
+ var poll = $(this).parents('.topic_poll');
+
+ poll.find('.resultbar, .poll_option_percent, .poll_total_votes').show(500);
+ poll.find('.poll_view_results').hide(500);
+});
+
+$('[data-ajax]').each(function() {
+ var $this = $(this),
+ ajax = $this.attr('data-ajax'),
+ fn;
+
+ if (ajax !== 'false') {
+ fn = (ajax !== 'true') ? ajax : null;
+ phpbb.ajaxify({
+ selector: this,
+ refresh: $this.attr('data-refresh') !== undefined,
+ callback: fn
+ });
+ }
+});
+
+
+/**
+ * This simply appends #preview to the action of the
+ * QR action when you click the Full Editor & Preview button
+ */
+$('#qr_full_editor').click(function() {
+ $('#qr_postform').attr('action', function(i, val) {
+ return val + '#preview';
+ });
+});
+
+
+/**
+ * Make the display post links to use JS
+ */
+$('.display_post').click(function(e) {
+ // Do not follow the link
+ e.preventDefault();
+
+ var post_id = $(this).attr('data-post-id');
+ $('#post_content' + post_id).show();
+ $('#profile' + post_id).show();
+ $('#post_hidden' + post_id).hide();
+});
+
+
+
+/**
+ * This AJAXifies the quick-mod tools. The reason it cannot be a standard
+ * callback / data attribute is that it requires filtering - some of the options
+ * can be ajaxified, while others cannot.
+ */
+phpbb.ajaxify({
+ selector: '#quickmodform',
+ refresh: true,
+ filter: function (data) {
+ var action = $('#quick-mod-select').val();
+
+ if (action === 'make_normal') {
+ return $(this).find('select option[value="make_global"]').length > 0;
+ } else if (action === 'lock' || action === 'unlock') {
+ return true;
+ }
+
+ if (action === 'delete_topic' || action === 'make_sticky' || action === 'make_announce' || action === 'make_global') {
+ return true;
+ }
+
+ return false;
+ }
+});
+
+$('#quick-mod-select').change(function () {
+ $('#quickmodform').submit();
+});
+
+$('#delete_permanent').click(function () {
+ if ($(this).attr('checked')) {
+ $('#delete_reason').hide();
+ } else {
+ $('#delete_reason').show();
+ }
+});
+
+/**
+* Toggle the member search panel in memberlist.php.
+*
+* If user returns to search page after viewing results the search panel is automatically displayed.
+* In any case the link will toggle the display status of the search panel and link text will be
+* appropriately changed based on the status of the search panel.
+*/
+$('#member_search').click(function () {
+ $('#memberlist_search').slideToggle('fast');
+ phpbb.ajax_callbacks.alt_text.call(this);
+ // Focus on the username textbox if it's available and displayed
+ if ($('#memberlist_search').is(':visible')) {
+ $('#username').focus();
+ }
+ return false;
+});
+
+/**
+* Automatically resize textarea
+*/
+$(document).ready(function() {
+ phpbb.resizeTextArea($('textarea:not(#message-box textarea, .no-auto-resize)'), {minHeight: 75, maxHeight: 250});
+ phpbb.resizeTextArea($('#message-box textarea'));
+});
+
+
+})(jQuery); // Avoid conflicts with other libraries
diff --git a/phpBB/styles/prosilver/template/avatars.js b/phpBB/styles/prosilver/template/avatars.js
new file mode 100644
index 0000000000..26ea24c0db
--- /dev/null
+++ b/phpBB/styles/prosilver/template/avatars.js
@@ -0,0 +1,15 @@
+(function($) { // Avoid conflicts with other libraries
+
+"use strict";
+
+function avatarHide() {
+ $('#avatar_options > div').hide();
+
+ var selected = $('#avatar_driver').val();
+ $('#avatar_option_' + selected).show();
+}
+
+avatarHide();
+$('#avatar_driver').bind('change', avatarHide);
+
+})(jQuery); // Avoid conflicts with other libraries
diff --git a/phpBB/styles/prosilver/template/bbcode.html b/phpBB/styles/prosilver/template/bbcode.html
index bb90c46ced..909c09df5a 100644
--- a/phpBB/styles/prosilver/template/bbcode.html
+++ b/phpBB/styles/prosilver/template/bbcode.html
@@ -8,12 +8,12 @@
<!-- BEGIN listitem --><li><!-- END listitem -->
<!-- BEGIN listitem_close --></li><!-- END listitem_close -->
-<!-- BEGIN quote_username_open --><blockquote><div><cite>{USERNAME} {L_WROTE}:</cite><!-- END quote_username_open -->
+<!-- BEGIN quote_username_open --><blockquote><div><cite>{USERNAME} {L_WROTE}{L_COLON}</cite><!-- END quote_username_open -->
<!-- BEGIN quote_open --><blockquote class="uncited"><div><!-- END quote_open -->
<!-- BEGIN quote_close --></div></blockquote><!-- END quote_close -->
-<!-- BEGIN code_open --><dl class="codebox"><dt>{L_CODE}: <a href="#" onclick="selectCode(this); return false;">{L_SELECT_ALL_CODE}</a></dt><dd><code><!-- END code_open -->
-<!-- BEGIN code_close --></code></dd></dl><!-- END code_close -->
+<!-- BEGIN code_open --><div class="codebox"><p>{L_CODE}{L_COLON} <a href="#" onclick="selectCode(this); return false;">{L_SELECT_ALL_CODE}</a></p><code><!-- END code_open -->
+<!-- BEGIN code_close --></code></div><!-- END code_close -->
<!-- BEGIN inline_attachment_open --><div class="inline-attachment"><!-- END inline_attachment_open -->
<!-- BEGIN inline_attachment_close --></div><!-- END inline_attachment_close -->
@@ -37,4 +37,4 @@
<!-- BEGIN email --><a href="mailto:{EMAIL}">{DESCRIPTION}</a><!-- END email -->
-<!-- BEGIN flash --><object classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000" codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=5,0,0,0" width="{WIDTH}" height="{HEIGHT}"><param name="movie" value="{URL}" /><param name="play" value="false" /><param name="loop" value="false" /><param name="quality" value="high" /><param name="allowScriptAccess" value="never" /><param name="allowNetworking" value="internal" /><embed src="{URL}" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" width="{WIDTH}" height="{HEIGHT}" play="false" loop="false" quality="high" allowscriptaccess="never" allownetworking="internal"></embed></object><!-- END flash --> \ No newline at end of file
+<!-- BEGIN flash --><object classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000" codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=5,0,0,0" width="{WIDTH}" height="{HEIGHT}"><param name="movie" value="{URL}" /><param name="play" value="false" /><param name="loop" value="false" /><param name="quality" value="high" /><param name="allowScriptAccess" value="never" /><param name="allowNetworking" value="internal" /><embed src="{URL}" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" width="{WIDTH}" height="{HEIGHT}" play="false" loop="false" quality="high" allowscriptaccess="never" allownetworking="internal"></embed></object><!-- END flash -->
diff --git a/phpBB/styles/prosilver/template/captcha_default.html b/phpBB/styles/prosilver/template/captcha_default.html
index bccf231251..c9c5295d13 100644
--- a/phpBB/styles/prosilver/template/captcha_default.html
+++ b/phpBB/styles/prosilver/template/captcha_default.html
@@ -1,6 +1,6 @@
<!-- IF S_TYPE == 1 -->
<div class="panel">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<h3>{L_CONFIRMATION}</h3>
<p>{L_CONFIRM_EXPLAIN}</p>
@@ -9,7 +9,7 @@
<!-- ENDIF -->
<dl>
- <dt><label for="confirm_code">{L_CONFIRM_CODE}:</label></dt>
+ <dt><label for="confirm_code">{L_CONFIRM_CODE}{L_COLON}</label></dt>
<dd><img src="{CONFIRM_IMAGE_LINK}" alt="{L_CONFIRM_CODE}" /></dd>
<dd><input type="text" name="confirm_code" id="confirm_code" size="8" maxlength="8" tabindex="{$CAPTCHA_TAB_INDEX}" class="inputbox narrow" title="{L_CONFIRM_CODE}" />
<!-- IF S_CONFIRM_REFRESH --><input type="submit" name="refresh_vc" id="refresh_vc" class="button2" value="{L_VC_REFRESH}" /><!-- ENDIF -->
@@ -19,6 +19,6 @@
<!-- IF S_TYPE == 1 -->
</fieldset>
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
<!-- ENDIF -->
diff --git a/phpBB/styles/prosilver/template/captcha_qa.html b/phpBB/styles/prosilver/template/captcha_qa.html
index 0b18ada3bb..c179f6dc20 100644
--- a/phpBB/styles/prosilver/template/captcha_qa.html
+++ b/phpBB/styles/prosilver/template/captcha_qa.html
@@ -1,13 +1,13 @@
<!-- IF S_TYPE == 1 -->
<div class="panel">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<h3>{L_CONFIRMATION}</h3>
<fieldset class="fields2">
<!-- ENDIF -->
<dl>
- <dt><label>{QA_CONFIRM_QUESTION}:</label><br /><span>{L_CONFIRM_QUESTION_EXPLAIN}</span></dt>
+ <dt><label>{QA_CONFIRM_QUESTION}{L_COLON}</label><br /><span>{L_CONFIRM_QUESTION_EXPLAIN}</span></dt>
<dd>
<input type="text" tabindex="{$CAPTCHA_TAB_INDEX}" name="qa_answer" id="answer" size="45" class="inputbox autowidth" title="{L_ANSWER}" />
<input type="hidden" name="qa_confirm_id" id="qa_confirm_id" value="{QA_CONFIRM_ID}" />
@@ -16,6 +16,6 @@
<!-- IF S_TYPE == 1 -->
</fieldset>
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
<!-- ENDIF -->
diff --git a/phpBB/styles/prosilver/template/captcha_recaptcha.html b/phpBB/styles/prosilver/template/captcha_recaptcha.html
index 51a1615bd5..aad1008241 100644
--- a/phpBB/styles/prosilver/template/captcha_recaptcha.html
+++ b/phpBB/styles/prosilver/template/captcha_recaptcha.html
@@ -1,6 +1,6 @@
<!-- IF S_TYPE == 1 -->
<div class="panel">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<h3>{L_CONFIRMATION}</h3>
<p>{L_CONFIRM_EXPLAIN}</p>
@@ -10,7 +10,7 @@
<!-- IF S_RECAPTCHA_AVAILABLE -->
<dl>
- <dt><label>{L_CONFIRM_CODE}</label>:<br /><span>{L_RECAPTCHA_EXPLAIN}</span></dt>
+ <dt><label>{L_CONFIRM_CODE}{L_COLON}</label><br /><span>{L_RECAPTCHA_EXPLAIN}</span></dt>
<dd>
<script type="text/javascript">
// <![CDATA[
@@ -45,6 +45,6 @@
<!-- IF S_TYPE == 1 -->
</fieldset>
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
<!-- ENDIF -->
diff --git a/phpBB/styles/prosilver/template/confirm_body.html b/phpBB/styles/prosilver/template/confirm_body.html
index 5b783915a4..a0428025cf 100644
--- a/phpBB/styles/prosilver/template/confirm_body.html
+++ b/phpBB/styles/prosilver/template/confirm_body.html
@@ -1,20 +1,35 @@
+<!-- IF S_AJAX_REQUEST -->
+ <form action="{S_CONFIRM_ACTION}" method="post">
+ <h3>{MESSAGE_TITLE}</h3>
+ <p>{MESSAGE_TEXT}</p>
+
+ <fieldset class="submit-buttons">
+ <input type="button" name="confirm" value="{L_YES}" class="button2" />&nbsp;
+ <input type="button" name="cancel" value="{L_NO}" class="button2" />
+ </fieldset>
+ </form>
+
+<!-- ELSE -->
+
<!-- INCLUDE overall_header.html -->
<form id="confirm" action="{S_CONFIRM_ACTION}" method="post">
<div class="panel">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<h2>{MESSAGE_TITLE}</h2>
<p>{MESSAGE_TEXT}</p>
-
+
<fieldset class="submit-buttons">
{S_HIDDEN_FIELDS}
- <input type="submit" name="confirm" value="{L_YES}" class="button2" />&nbsp;
+ <input type="submit" name="confirm" value="{L_YES}" class="button2" />&nbsp;
<input type="submit" name="cancel" value="{L_NO}" class="button2" />
</fieldset>
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
</form>
<!-- INCLUDE overall_footer.html -->
+
+<!-- ENDIF -->
diff --git a/phpBB/styles/prosilver/template/confirm_delete_body.html b/phpBB/styles/prosilver/template/confirm_delete_body.html
new file mode 100644
index 0000000000..dc09974d1c
--- /dev/null
+++ b/phpBB/styles/prosilver/template/confirm_delete_body.html
@@ -0,0 +1,74 @@
+<!-- IF S_AJAX_REQUEST -->
+ <form action="{S_CONFIRM_ACTION}" method="post">
+ <p>{MESSAGE_TEXT}</p>
+
+ <!-- IF not S_SOFTDELETED and (S_DELETE_REASON or (S_ALLOWED_DELETE and S_ALLOWED_SOFTDELETE)) -->
+ <!-- IF S_ALLOWED_DELETE and S_ALLOWED_SOFTDELETE -->
+ <label>
+ <strong>{L_DELETE_PERMANENTLY}{L_COLON}</strong>
+ <input id="delete_permanent" name="delete_permanent" type="checkbox" value="1" {S_CHECKED_PERMANENT} />
+ <!-- IF S_TOPIC_MODE -->{L_DELETE_TOPIC_PERMANENTLY}<!-- ELSE -->{L_DELETE_POST_PERMANENTLY}<!-- ENDIF -->
+ </label>
+ <!-- ENDIF -->
+
+ <!-- IF S_DELETE_REASON -->
+ <label for="delete_reason">
+ <strong>{L_DELETE_REASON}{L_COLON}</strong><br /><span>{L_DELETE_REASON_EXPLAIN}</span><br />
+ <input type="text" name="delete_reason" value="" class="inputbox autowidth" maxlength="120" size="45" />
+ </label>
+ <!-- ENDIF -->
+ <!-- ENDIF -->
+
+ <fieldset class="submit-buttons">
+ <input type="button" name="confirm" value="{L_YES}" class="button1" />&nbsp;
+ <input type="button" name="cancel" value="{L_NO}" class="button2" />
+ </fieldset>
+ </form>
+
+<!-- ELSE -->
+
+<!-- INCLUDE overall_header.html -->
+
+<form id="confirm" action="{S_CONFIRM_ACTION}" method="post">
+<div class="panel">
+ <div class="inner">
+
+ <h2>{MESSAGE_TITLE}</h2>
+
+ <p>{MESSAGE_TEXT}</p>
+
+ <!-- IF not S_SOFTDELETED and (S_DELETE_REASON or (S_ALLOWED_DELETE and S_ALLOWED_SOFTDELETE)) -->
+ <fieldset class="fields1">
+ <!-- IF S_ALLOWED_DELETE and S_ALLOWED_SOFTDELETE -->
+ <dl>
+ <dt><label for="delete_permanent">{L_DELETE_PERMANENTLY}{L_COLON}</label></dt>
+ <dd>
+ <label for="delete_permanent">
+ <input id="delete_permanent" name="delete_permanent" type="checkbox" value="1" {S_CHECKED_PERMANENT} />
+ <!-- IF S_TOPIC_MODE -->{L_DELETE_TOPIC_PERMANENTLY}<!-- ELSE -->{L_DELETE_POST_PERMANENTLY}<!-- ENDIF -->
+ </label>
+ </dd>
+ </dl>
+ <!-- ENDIF -->
+
+ <!-- IF S_DELETE_REASON -->
+ <dl>
+ <dt><label for="delete_reason">{L_DELETE_REASON}{L_COLON}</label><br /><span>{L_DELETE_REASON_EXPLAIN}</span></dt>
+ <dd><input type="text" name="delete_reason" id="delete_reason" value="" class="inputbox autowidth" maxlength="120" size="45" /></dd>
+ </dl>
+ <!-- ENDIF -->
+ </fieldset>
+ <!-- ENDIF -->
+
+ <fieldset class="submit-buttons">
+ {S_HIDDEN_FIELDS}
+ <input type="submit" name="confirm" value="{L_YES}" class="button1" />&nbsp;
+ <input type="submit" name="cancel" value="{L_NO}" class="button2" />
+ </fieldset>
+
+ </div>
+</div>
+</form>
+
+<!-- INCLUDE overall_footer.html -->
+<!-- ENDIF -->
diff --git a/phpBB/styles/prosilver/template/custom_profile_fields.html b/phpBB/styles/prosilver/template/custom_profile_fields.html
deleted file mode 100644
index 44c68f532b..0000000000
--- a/phpBB/styles/prosilver/template/custom_profile_fields.html
+++ /dev/null
@@ -1,31 +0,0 @@
-<!-- BEGIN dropdown -->
-<select name="{dropdown.FIELD_IDENT}" id="{dropdown.FIELD_IDENT}">
- <!-- BEGIN options --><option value="{dropdown.options.OPTION_ID}"{dropdown.options.SELECTED}>{dropdown.options.VALUE}</option><!-- END options -->
-</select>
-<!-- END dropdown -->
-
-<!-- BEGIN text -->
-<textarea name="{text.FIELD_IDENT}" id="{text.FIELD_IDENT}" rows="{text.FIELD_ROWS}" cols="{text.FIELD_COLS}" class="inputbox autowidth">{text.FIELD_VALUE}</textarea>
-<!-- END text -->
-
-<!-- BEGIN string -->
-<input type="text" class="inputbox autowidth" name="{string.FIELD_IDENT}" id="{string.FIELD_IDENT}" size="{string.FIELD_LENGTH}" maxlength="{string.FIELD_MAXLEN}" value="{string.FIELD_VALUE}" />
-<!-- END string -->
-
-<!-- BEGIN bool -->
-<!-- IF bool.FIELD_LENGTH eq 1 -->
- <!-- BEGIN options --><label for="{bool.FIELD_IDENT}_{bool.options.OPTION_ID}"><input type="radio" class="radio" name="{bool.FIELD_IDENT}" id="{bool.FIELD_IDENT}_{bool.options.OPTION_ID}" value="{bool.options.OPTION_ID}"{bool.options.CHECKED} /> {bool.options.VALUE}</label> <!-- END options -->
-<!-- ELSE -->
- <input type="checkbox" class="radio" name="{bool.FIELD_IDENT}" id="{bool.FIELD_IDENT}"<!-- IF bool.FIELD_VALUE --> checked="checked"<!-- ENDIF --> />
-<!-- ENDIF -->
-<!-- END bool -->
-
-<!-- BEGIN int -->
-<input type="text" class="inputbox autowidth" name="{int.FIELD_IDENT}" id="{int.FIELD_IDENT}" size="{int.FIELD_LENGTH}" value="{int.FIELD_VALUE}" />
-<!-- END int -->
-
-<!-- BEGIN date -->
-<label for="{date.FIELD_IDENT}_day">{L_DAY}: <select name="{date.FIELD_IDENT}_day" id="{date.FIELD_IDENT}_day">{date.S_DAY_OPTIONS}</select></label>
-<label for="{date.FIELD_IDENT}_month">{L_MONTH}: <select name="{date.FIELD_IDENT}_month" id="{date.FIELD_IDENT}_month">{date.S_MONTH_OPTIONS}</select></label>
-<label for="{date.FIELD_IDENT}_year">{L_YEAR}: <select name="{date.FIELD_IDENT}_year" id="{date.FIELD_IDENT}_year">{date.S_YEAR_OPTIONS}</select></label>
-<!-- END date -->
diff --git a/phpBB/styles/prosilver/template/drafts.html b/phpBB/styles/prosilver/template/drafts.html
index dea3bb414e..4b2e1bf0c6 100644
--- a/phpBB/styles/prosilver/template/drafts.html
+++ b/phpBB/styles/prosilver/template/drafts.html
@@ -2,43 +2,48 @@
<!-- IF .draftrow -->
<div class="panel">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<h3>{L_LOAD_DRAFT}</h3>
<p>{L_LOAD_DRAFT_EXPLAIN}</p>
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
<div class="<!-- IF not S_PRIVMSGS -->forumbg<!-- ELSE -->panel<!-- ENDIF -->">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
- <ul class="topiclist">
+ <ul class="topiclist two-long-columns">
<li class="header">
<dl>
<dt>{L_LOAD_DRAFT}</dt>
- <dd class="posted">{L_SAVE_DATE}</dd>
+ <dd class="info">{L_SAVE_DATE}</dd>
</dl>
</li>
</ul>
- <ul class="topiclist<!-- IF not S_PRIVMSGS --> topics<!-- ELSE --> cplist<!-- ENDIF -->">
+ <ul class="topiclist two-long-columns<!-- IF not S_PRIVMSGS --> topics<!-- ELSE --> cplist<!-- ENDIF -->">
<!-- BEGIN draftrow -->
<li class="row<!-- IF draftrow.S_ROW_COUNT is even --> bg1<!-- ELSE --> bg2<!-- ENDIF -->">
<dl>
<dt>
- <a href="{draftrow.U_INSERT}" title="{L_LOAD_DRAFT}" class="topictitle">{draftrow.DRAFT_SUBJECT}</a><br />
- <!-- IF not S_PRIVMSGS --><!-- IF draftrow.S_LINK_TOPIC -->{L_TOPIC}: <a href="{draftrow.U_VIEW}">{draftrow.TITLE}</a>
- <!-- ELSEIF draftrow.S_LINK_FORUM -->{L_FORUM}: <a href="{draftrow.U_VIEW}">{draftrow.TITLE}</a>
- <!-- ELSE -->{L_NO_TOPIC_FORUM}<!-- ENDIF --><!-- ENDIF -->
+ <div class="list-inner">
+ <a href="{draftrow.U_INSERT}" title="{L_LOAD_DRAFT}" class="topictitle">{draftrow.DRAFT_SUBJECT}</a><br />
+ <!-- IF not S_PRIVMSGS --><!-- IF draftrow.S_LINK_TOPIC -->{L_TOPIC}{L_COLON} <a href="{draftrow.U_VIEW}">{draftrow.TITLE}</a>
+ <!-- ELSEIF draftrow.S_LINK_FORUM -->{L_FORUM}{L_COLON} <a href="{draftrow.U_VIEW}">{draftrow.TITLE}</a>
+ <!-- ELSE -->{L_NO_TOPIC_FORUM}<!-- ENDIF --><!-- ENDIF -->
+ <div class="responsive-show" style="display: none;">
+ {L_SAVE_DATE}{L_COLON} <strong>{draftrow.DATE}</strong>
+ </div>
+ </div>
</dt>
- <dd class="posted">{draftrow.DATE}</dd>
+ <dd class="info"><span>{draftrow.DATE}</span></dd>
</dl>
</li>
<!-- END draftrow -->
</ul>
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
<!-- ENDIF -->
diff --git a/phpBB/styles/prosilver/template/editor.js b/phpBB/styles/prosilver/template/editor.js
deleted file mode 100644
index 42be70be92..0000000000
--- a/phpBB/styles/prosilver/template/editor.js
+++ /dev/null
@@ -1,459 +0,0 @@
-/**
-* bbCode control by subBlue design [ www.subBlue.com ]
-* Includes unixsafe colour palette selector by SHS`
-*/
-
-// Startup variables
-var imageTag = false;
-var theSelection = false;
-
-var bbcodeEnabled = true;
-// Check for Browser & Platform for PC & IE specific bits
-// More details from: http://www.mozilla.org/docs/web-developer/sniffer/browser_type.html
-var clientPC = navigator.userAgent.toLowerCase(); // Get client info
-var clientVer = parseInt(navigator.appVersion); // Get browser version
-
-var is_ie = ((clientPC.indexOf('msie') != -1) && (clientPC.indexOf('opera') == -1));
-var is_win = ((clientPC.indexOf('win') != -1) || (clientPC.indexOf('16bit') != -1));
-var baseHeight;
-
-/**
-* Shows the help messages in the helpline window
-*/
-function helpline(help)
-{
- document.forms[form_name].helpbox.value = help_line[help];
-}
-
-/**
-* Fix a bug involving the TextRange object. From
-* http://www.frostjedi.com/terra/scripts/demo/caretBug.html
-*/
-function initInsertions()
-{
- var doc;
-
- if (document.forms[form_name])
- {
- doc = document;
- }
- else
- {
- doc = opener.document;
- }
-
- var textarea = doc.forms[form_name].elements[text_name];
-
- if (is_ie && typeof(baseHeight) != 'number')
- {
- textarea.focus();
- baseHeight = doc.selection.createRange().duplicate().boundingHeight;
-
- if (!document.forms[form_name])
- {
- document.body.focus();
- }
- }
-}
-
-/**
-* bbstyle
-*/
-function bbstyle(bbnumber)
-{
- if (bbnumber != -1)
- {
- bbfontstyle(bbtags[bbnumber], bbtags[bbnumber+1]);
- }
- else
- {
- insert_text('[*]');
- document.forms[form_name].elements[text_name].focus();
- }
-}
-
-/**
-* Apply bbcodes
-*/
-function bbfontstyle(bbopen, bbclose)
-{
- theSelection = false;
-
- var textarea = document.forms[form_name].elements[text_name];
-
- textarea.focus();
-
- if ((clientVer >= 4) && is_ie && is_win)
- {
- // Get text selection
- theSelection = document.selection.createRange().text;
-
- if (theSelection)
- {
- // Add tags around selection
- document.selection.createRange().text = bbopen + theSelection + bbclose;
- document.forms[form_name].elements[text_name].focus();
- theSelection = '';
- return;
- }
- }
- else if (document.forms[form_name].elements[text_name].selectionEnd && (document.forms[form_name].elements[text_name].selectionEnd - document.forms[form_name].elements[text_name].selectionStart > 0))
- {
- mozWrap(document.forms[form_name].elements[text_name], bbopen, bbclose);
- document.forms[form_name].elements[text_name].focus();
- theSelection = '';
- return;
- }
-
- //The new position for the cursor after adding the bbcode
- var caret_pos = getCaretPosition(textarea).start;
- var new_pos = caret_pos + bbopen.length;
-
- // Open tag
- insert_text(bbopen + bbclose);
-
- // Center the cursor when we don't have a selection
- // Gecko and proper browsers
- if (!isNaN(textarea.selectionStart))
- {
- textarea.selectionStart = new_pos;
- textarea.selectionEnd = new_pos;
- }
- // IE
- else if (document.selection)
- {
- var range = textarea.createTextRange();
- range.move("character", new_pos);
- range.select();
- storeCaret(textarea);
- }
-
- textarea.focus();
- return;
-}
-
-/**
-* Insert text at position
-*/
-function insert_text(text, spaces, popup)
-{
- var textarea;
-
- if (!popup)
- {
- textarea = document.forms[form_name].elements[text_name];
- }
- else
- {
- textarea = opener.document.forms[form_name].elements[text_name];
- }
- if (spaces)
- {
- text = ' ' + text + ' ';
- }
-
- // Since IE9, IE also has textarea.selectionStart, but it still needs to be treated the old way.
- // Therefore we simply add a !is_ie here until IE fixes the text-selection completely.
- if (!isNaN(textarea.selectionStart) && !is_ie)
- {
- var sel_start = textarea.selectionStart;
- var sel_end = textarea.selectionEnd;
-
- mozWrap(textarea, text, '');
- textarea.selectionStart = sel_start + text.length;
- textarea.selectionEnd = sel_end + text.length;
- }
- else if (textarea.createTextRange && textarea.caretPos)
- {
- if (baseHeight != textarea.caretPos.boundingHeight)
- {
- textarea.focus();
- storeCaret(textarea);
- }
-
- var caret_pos = textarea.caretPos;
- caret_pos.text = caret_pos.text.charAt(caret_pos.text.length - 1) == ' ' ? caret_pos.text + text + ' ' : caret_pos.text + text;
- }
- else
- {
- textarea.value = textarea.value + text;
- }
- if (!popup)
- {
- textarea.focus();
- }
-}
-
-/**
-* Add inline attachment at position
-*/
-function attach_inline(index, filename)
-{
- insert_text('[attachment=' + index + ']' + filename + '[/attachment]');
- document.forms[form_name].elements[text_name].focus();
-}
-
-/**
-* Add quote text to message
-*/
-function addquote(post_id, username, l_wrote)
-{
- var message_name = 'message_' + post_id;
- var theSelection = '';
- var divarea = false;
-
- if (l_wrote === undefined)
- {
- // Backwards compatibility
- l_wrote = 'wrote';
- }
-
- if (document.all)
- {
- divarea = document.all[message_name];
- }
- else
- {
- divarea = document.getElementById(message_name);
- }
-
- // Get text selection - not only the post content :(
- // IE9 must use the document.selection method but has the *.getSelection so we just force no IE
- if (window.getSelection && !is_ie && !window.opera)
- {
- theSelection = window.getSelection().toString();
- }
- else if (document.getSelection && !is_ie)
- {
- theSelection = document.getSelection();
- }
- else if (document.selection)
- {
- theSelection = document.selection.createRange().text;
- }
-
- if (theSelection == '' || typeof theSelection == 'undefined' || theSelection == null)
- {
- if (divarea.innerHTML)
- {
- theSelection = divarea.innerHTML.replace(/<br>/ig, '\n');
- theSelection = theSelection.replace(/<br\/>/ig, '\n');
- theSelection = theSelection.replace(/&lt\;/ig, '<');
- theSelection = theSelection.replace(/&gt\;/ig, '>');
- theSelection = theSelection.replace(/&amp\;/ig, '&');
- theSelection = theSelection.replace(/&nbsp\;/ig, ' ');
- }
- else if (document.all)
- {
- theSelection = divarea.innerText;
- }
- else if (divarea.textContent)
- {
- theSelection = divarea.textContent;
- }
- else if (divarea.firstChild.nodeValue)
- {
- theSelection = divarea.firstChild.nodeValue;
- }
- }
-
- if (theSelection)
- {
- if (bbcodeEnabled)
- {
- insert_text('[quote="' + username + '"]' + theSelection + '[/quote]');
- }
- else
- {
- insert_text(username + ' ' + l_wrote + ':' + '\n');
- var lines = split_lines(theSelection);
- for (i = 0; i < lines.length; i++)
- {
- insert_text('> ' + lines[i] + '\n');
- }
- }
- }
-
- return;
-}
-
-function split_lines(text)
-{
- var lines = text.split('\n');
- var splitLines = new Array();
- var j = 0;
- for(i = 0; i < lines.length; i++)
- {
- if (lines[i].length <= 80)
- {
- splitLines[j] = lines[i];
- j++;
- }
- else
- {
- var line = lines[i];
- do
- {
- var splitAt = line.indexOf(' ', 80);
-
- if (splitAt == -1)
- {
- splitLines[j] = line;
- j++;
- }
- else
- {
- splitLines[j] = line.substring(0, splitAt);
- line = line.substring(splitAt);
- j++;
- }
- }
- while(splitAt != -1);
- }
- }
- return splitLines;
-}
-/**
-* From http://www.massless.org/mozedit/
-*/
-function mozWrap(txtarea, open, close)
-{
- var selLength = (typeof(txtarea.textLength) == 'undefined') ? txtarea.value.length : txtarea.textLength;
- var selStart = txtarea.selectionStart;
- var selEnd = txtarea.selectionEnd;
- var scrollTop = txtarea.scrollTop;
-
- if (selEnd == 1 || selEnd == 2)
- {
- selEnd = selLength;
- }
-
- var s1 = (txtarea.value).substring(0,selStart);
- var s2 = (txtarea.value).substring(selStart, selEnd);
- var s3 = (txtarea.value).substring(selEnd, selLength);
-
- txtarea.value = s1 + open + s2 + close + s3;
- txtarea.selectionStart = selStart + open.length;
- txtarea.selectionEnd = selEnd + open.length;
- txtarea.focus();
- txtarea.scrollTop = scrollTop;
-
- return;
-}
-
-/**
-* Insert at Caret position. Code from
-* http://www.faqts.com/knowledge_base/view.phtml/aid/1052/fid/130
-*/
-function storeCaret(textEl)
-{
- if (textEl.createTextRange && document.selection)
- {
- textEl.caretPos = document.selection.createRange().duplicate();
- }
-}
-
-/**
-* Color pallette
-*/
-function colorPalette(dir, width, height)
-{
- var r = 0, g = 0, b = 0;
- var numberList = new Array(6);
- var color = '';
-
- numberList[0] = '00';
- numberList[1] = '40';
- numberList[2] = '80';
- numberList[3] = 'BF';
- numberList[4] = 'FF';
-
- document.writeln('<table cellspacing="1" cellpadding="0" border="0">');
-
- for (r = 0; r < 5; r++)
- {
- if (dir == 'h')
- {
- document.writeln('<tr>');
- }
-
- for (g = 0; g < 5; g++)
- {
- if (dir == 'v')
- {
- document.writeln('<tr>');
- }
-
- for (b = 0; b < 5; b++)
- {
- color = String(numberList[r]) + String(numberList[g]) + String(numberList[b]);
- document.write('<td bgcolor="#' + color + '" style="width: ' + width + 'px; height: ' + height + 'px;">');
- document.write('<a href="#" onclick="bbfontstyle(\'[color=#' + color + ']\', \'[/color]\'); return false;"><img src="images/spacer.gif" width="' + width + '" height="' + height + '" alt="#' + color + '" title="#' + color + '" /></a>');
- document.writeln('</td>');
- }
-
- if (dir == 'v')
- {
- document.writeln('</tr>');
- }
- }
-
- if (dir == 'h')
- {
- document.writeln('</tr>');
- }
- }
- document.writeln('</table>');
-}
-
-
-/**
-* Caret Position object
-*/
-function caretPosition()
-{
- var start = null;
- var end = null;
-}
-
-
-/**
-* Get the caret position in an textarea
-*/
-function getCaretPosition(txtarea)
-{
- var caretPos = new caretPosition();
-
- // simple Gecko/Opera way
- if(txtarea.selectionStart || txtarea.selectionStart == 0)
- {
- caretPos.start = txtarea.selectionStart;
- caretPos.end = txtarea.selectionEnd;
- }
- // dirty and slow IE way
- else if(document.selection)
- {
-
- // get current selection
- var range = document.selection.createRange();
-
- // a new selection of the whole textarea
- var range_all = document.body.createTextRange();
- range_all.moveToElementText(txtarea);
-
- // calculate selection start point by moving beginning of range_all to beginning of range
- var sel_start;
- for (sel_start = 0; range_all.compareEndPoints('StartToStart', range) < 0; sel_start++)
- {
- range_all.moveStart('character', 1);
- }
-
- txtarea.sel_start = sel_start;
-
- // we ignore the end value for IE, this is already dirty enough and we don't need it
- caretPos.start = txtarea.sel_start;
- caretPos.end = txtarea.sel_start;
- }
-
- return caretPos;
-}
diff --git a/phpBB/styles/prosilver/template/faq_body.html b/phpBB/styles/prosilver/template/faq_body.html
index 36d677a505..46f738aa3a 100644
--- a/phpBB/styles/prosilver/template/faq_body.html
+++ b/phpBB/styles/prosilver/template/faq_body.html
@@ -4,7 +4,7 @@
<div class="panel bg1" id="faqlinks">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<div class="column1">
<!-- BEGIN faq_block -->
<!-- IF faq_block.SWITCH_COLUMN or (SWITCH_COLUMN_MANUALLY and faq_block.S_ROW_COUNT == 4) -->
@@ -21,7 +21,7 @@
</dl>
<!-- END faq_block -->
</div>
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
@@ -30,7 +30,7 @@
<!-- BEGIN faq_block -->
<div class="panel <!-- IF faq_block.S_ROW_COUNT is odd -->bg1<!-- ELSE -->bg2<!-- ENDIF -->">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<div class="content">
<h2>{faq_block.BLOCK_TITLE}</h2>
@@ -44,7 +44,7 @@
<!-- END faq_row -->
</div>
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
<!-- END faq_block -->
diff --git a/phpBB/styles/prosilver/template/forum_fn.js b/phpBB/styles/prosilver/template/forum_fn.js
index 6a65caf6f6..de51b54e9b 100644
--- a/phpBB/styles/prosilver/template/forum_fn.js
+++ b/phpBB/styles/prosilver/template/forum_fn.js
@@ -3,12 +3,18 @@
*/
/**
+* Find a member
+*/
+function find_username(url) {
+ popup(url, 760, 570, '_usersearch');
+ return false;
+}
+
+/**
* Window popup
*/
-function popup(url, width, height, name)
-{
- if (!name)
- {
+function popup(url, width, height, name) {
+ if (!name) {
name = '_popup';
}
@@ -19,19 +25,26 @@ function popup(url, width, height, name)
/**
* Jump to page
*/
-function jumpto()
-{
- var page = prompt(jump_page, on_page);
-
- if (page !== null && !isNaN(page) && page == Math.floor(page) && page > 0)
- {
- if (base_url.indexOf('?') == -1)
- {
- document.location.href = base_url + '?start=' + ((page - 1) * per_page);
+function jumpto(item) {
+ if (!item || !item.length) {
+ item = $('a.pagination-trigger[data-lang-jump-page]');
+ if (!item.length) {
+ return;
}
- else
- {
- document.location.href = base_url.replace(/&amp;/g, '&') + '&start=' + ((page - 1) * per_page);
+ }
+
+ var jump_page = item.attr('data-lang-jump-page'),
+ on_page = item.attr('data-on-page'),
+ per_page = item.attr('data-per-page'),
+ base_url = item.attr('data-base-url'),
+ start_name = item.attr('data-start-name'),
+ page = prompt(jump_page, on_page);
+
+ if (page !== null && !isNaN(page) && page == Math.floor(page) && page > 0) {
+ if (base_url.indexOf('?') === -1) {
+ document.location.href = base_url + '?' + start_name + '=' + ((page - 1) * per_page);
+ } else {
+ document.location.href = base_url.replace(/&amp;/g, '&') + '&' + start_name + '=' + ((page - 1) * per_page);
}
}
}
@@ -40,53 +53,36 @@ function jumpto()
* Mark/unmark checklist
* id = ID of parent container, name = name prefix, state = state [true/false]
*/
-function marklist(id, name, state)
-{
- var parent = document.getElementById(id);
- if (!parent)
- {
- eval('parent = document.' + id);
- }
-
- if (!parent)
- {
- return;
- }
-
- var rb = parent.getElementsByTagName('input');
-
- for (var r = 0; r < rb.length; r++)
- {
- if (rb[r].name.substr(0, name.length) == name)
- {
- rb[r].checked = state;
+function marklist(id, name, state) {
+ jQuery('#' + id + ' input[type=checkbox][name]').each(function() {
+ var $this = jQuery(this);
+ if ($this.attr('name').substr(0, name.length) == name) {
+ $this.prop('checked', state);
}
- }
+ });
}
/**
* Resize viewable area for attached image or topic review panel (possibly others to come)
* e = element
*/
-function viewableArea(e, itself)
-{
- if (!e) return;
- if (!itself)
- {
+function viewableArea(e, itself) {
+ if (!e) {
+ return;
+ }
+
+ if (!itself) {
e = e.parentNode;
}
-
- if (!e.vaHeight)
- {
+
+ if (!e.vaHeight) {
// Store viewable area height before changing style to auto
e.vaHeight = e.offsetHeight;
e.vaMaxHeight = e.style.maxHeight;
e.style.height = 'auto';
e.style.maxHeight = 'none';
e.style.overflow = 'visible';
- }
- else
- {
+ } else {
// Restore viewable area height to the default
e.style.height = e.vaHeight + 'px';
e.style.overflow = 'auto';
@@ -100,71 +96,60 @@ function viewableArea(e, itself)
* s[-1,0,1] = hide,toggle display,show
* type = string: inline, block, inline-block or other CSS "display" type
*/
-function dE(n, s, type)
-{
- if (!type)
- {
+function dE(n, s, type) {
+ if (!type) {
type = 'block';
}
var e = document.getElementById(n);
- if (!s)
- {
- s = (e.style.display == '' || e.style.display == type) ? -1 : 1;
+ if (!s) {
+ s = (e.style.display === '' || e.style.display === type) ? -1 : 1;
}
- e.style.display = (s == 1) ? type : 'none';
+ e.style.display = (s === 1) ? type : 'none';
}
/**
* Alternate display of subPanels
*/
-function subPanels(p)
-{
- var i, e, t;
-
- if (typeof(p) == 'string')
- {
- show_panel = p;
- }
+jQuery(document).ready(function() {
+ jQuery('.sub-panels').each(function() {
+
+ var panels = [],
+ childNodes = jQuery('a[data-subpanel]', this).each(function() {
+ panels.push(this.getAttribute('data-subpanel'));
+ }),
+ show_panel = this.getAttribute('data-show-panel');
+
+ if (panels.length) {
+ subPanels(show_panel);
+ childNodes.click(function () {
+ subPanels(this.getAttribute('data-subpanel'));
+ return false;
+ });
+ }
- for (i = 0; i < panels.length; i++)
- {
- e = document.getElementById(panels[i]);
- t = document.getElementById(panels[i] + '-tab');
+ function subPanels(p) {
+ var i;
- if (e)
- {
- if (panels[i] == show_panel)
- {
- e.style.display = 'block';
- if (t)
- {
- t.className = 'activetab';
- }
+ if (typeof(p) === 'string') {
+ show_panel = p;
}
- else
- {
- e.style.display = 'none';
- if (t)
- {
- t.className = '';
- }
+
+ for (i = 0; i < panels.length; i++) {
+ jQuery('#' + panels[i]).css('display', panels[i] === show_panel ? 'block' : 'none');
+ jQuery('#' + panels[i] + '-tab').toggleClass('activetab', panels[i] === show_panel);
}
}
- }
-}
+ });
+});
/**
* Call print preview
*/
-function printPage()
-{
- if (is_ie)
- {
+function printPage() {
+ if (is_ie) {
printPreview();
- }
- else
- {
+ } else {
window.print();
}
}
@@ -173,70 +158,60 @@ function printPage()
* Show/hide groups of blocks
* c = CSS style name
* e = checkbox element
-* t = toggle dispay state (used to show 'grip-show' image in the profile block when hiding the profiles)
+* t = toggle dispay state (used to show 'grip-show' image in the profile block when hiding the profiles)
*/
-function displayBlocks(c, e, t)
-{
- var s = (e.checked == true) ? 1 : -1;
+function displayBlocks(c, e, t) {
+ var s = (e.checked === true) ? 1 : -1;
- if (t)
- {
+ if (t) {
s *= -1;
}
var divs = document.getElementsByTagName("DIV");
- for (var d = 0; d < divs.length; d++)
- {
- if (divs[d].className.indexOf(c) == 0)
- {
- divs[d].style.display = (s == 1) ? 'none' : 'block';
+ for (var d = 0; d < divs.length; d++) {
+ if (divs[d].className.indexOf(c) === 0) {
+ divs[d].style.display = (s === 1) ? 'none' : 'block';
}
}
}
-function selectCode(a)
-{
+function selectCode(a) {
// Get ID of code block
var e = a.parentNode.parentNode.getElementsByTagName('CODE')[0];
+ var s, r;
// Not IE and IE9+
- if (window.getSelection)
- {
- var s = window.getSelection();
+ if (window.getSelection) {
+ s = window.getSelection();
// Safari
- if (s.setBaseAndExtent)
- {
+ if (s.setBaseAndExtent) {
s.setBaseAndExtent(e, 0, e, e.innerText.length - 1);
}
// Firefox and Opera
- else
- {
+ else {
// workaround for bug # 42885
- if (window.opera && e.innerHTML.substring(e.innerHTML.length - 4) == '<BR>')
- {
+ if (window.opera && e.innerHTML.substring(e.innerHTML.length - 4) === '<BR>') {
e.innerHTML = e.innerHTML + '&nbsp;';
}
- var r = document.createRange();
+ r = document.createRange();
r.selectNodeContents(e);
s.removeAllRanges();
s.addRange(r);
}
}
// Some older browsers
- else if (document.getSelection)
- {
- var s = document.getSelection();
- var r = document.createRange();
+ else if (document.getSelection) {
+ s = document.getSelection();
+ r = document.createRange();
r.selectNodeContents(e);
s.removeAllRanges();
s.addRange(r);
}
// IE
- else if (document.selection)
- {
- var r = document.body.createTextRange();
+ else if (document.selection) {
+ r = document.body.createTextRange();
r.moveToElementText(e);
r.select();
}
@@ -246,25 +221,22 @@ function selectCode(a)
* Play quicktime file by determining it's width/height
* from the displayed rectangle area
*/
-function play_qt_file(obj)
-{
+function play_qt_file(obj) {
var rectangle = obj.GetRectangle();
+ var width, height;
- if (rectangle)
- {
+ if (rectangle) {
rectangle = rectangle.split(',');
- var x1 = parseInt(rectangle[0]);
- var x2 = parseInt(rectangle[2]);
- var y1 = parseInt(rectangle[1]);
- var y2 = parseInt(rectangle[3]);
-
- var width = (x1 < 0) ? (x1 * -1) + x2 : x2 - x1;
- var height = (y1 < 0) ? (y1 * -1) + y2 : y2 - y1;
- }
- else
- {
- var width = 200;
- var height = 0;
+ var x1 = parseInt(rectangle[0], 10);
+ var x2 = parseInt(rectangle[2], 10);
+ var y1 = parseInt(rectangle[1], 10);
+ var y2 = parseInt(rectangle[3], 10);
+
+ width = (x1 < 0) ? (x1 * -1) + x2 : x2 - x1;
+ height = (y1 < 0) ? (y1 * -1) + y2 : y2 - y1;
+ } else {
+ width = 200;
+ height = 0;
}
obj.width = width;
@@ -274,80 +246,29 @@ function play_qt_file(obj)
obj.Play();
}
-/**
-* Check if the nodeName of elem is name
-* @author jQuery
-*/
-function is_node_name(elem, name)
-{
- return elem.nodeName && elem.nodeName.toUpperCase() == name.toUpperCase();
-}
-
-/**
-* Check if elem is in array, return position
-* @author jQuery
-*/
-function is_in_array(elem, array)
-{
- for (var i = 0, length = array.length; i < length; i++)
- // === is correct (IE)
- if (array[i] === elem)
- return i;
-
- return -1;
-}
-
-/**
-* Find Element, type and class in tree
-* Not used, but may come in handy for those not using JQuery
-* @author jQuery.find, Meik Sievertsen
-*/
-function find_in_tree(node, tag, type, class_name)
-{
- var result, element, i = 0, length = node.childNodes.length;
-
- for (element = node.childNodes[0]; i < length; element = node.childNodes[++i])
- {
- if (!element || element.nodeType != 1) continue;
-
- if ((!tag || is_node_name(element, tag)) && (!type || element.type == type) && (!class_name || is_in_array(class_name, (element.className || element).toString().split(/\s+/)) > -1))
- {
- return element;
- }
-
- if (element.childNodes.length)
- result = find_in_tree(element, tag, type, class_name);
-
- if (result) return result;
- }
-}
-
var in_autocomplete = false;
var last_key_entered = '';
/**
* Check event key
*/
-function phpbb_check_key(event)
-{
+function phpbb_check_key(event) {
// Keycode is array down or up?
- if (event.keyCode && (event.keyCode == 40 || event.keyCode == 38))
+ if (event.keyCode && (event.keyCode === 40 || event.keyCode === 38)) {
in_autocomplete = true;
+ }
// Make sure we are not within an "autocompletion" field
- if (in_autocomplete)
- {
+ if (in_autocomplete) {
// If return pressed and key changed we reset the autocompletion
- if (!last_key_entered || last_key_entered == event.which)
- {
+ if (!last_key_entered || last_key_entered === event.which) {
in_autocompletion = false;
return true;
}
}
// Keycode is not return, then return. ;)
- if (event.which != 13)
- {
+ if (event.which !== 13) {
last_key_entered = event.which;
return true;
}
@@ -356,88 +277,665 @@ function phpbb_check_key(event)
}
/**
-* Usually used for onkeypress event, to submit a form on enter
+* Apply onkeypress event for forcing default submit button on ENTER key press
*/
-function submit_default_button(event, selector, class_name)
-{
- // Add which for key events
- if (!event.which && ((event.charCode || event.charCode === 0) ? event.charCode : event.keyCode))
- event.which = event.charCode || event.keyCode;
+function apply_onkeypress_event() {
+ jQuery('form input[type=text], form input[type=password]').on('keypress', function (e) {
+ var default_button = jQuery(this).parents('form').find('input[type=submit].default-submit-action');
+
+ if (!default_button || default_button.length <= 0) {
+ return true;
+ }
+
+ if (phpbb_check_key(e)) {
+ return true;
+ }
+
+ if ((e.which && e.which === 13) || (e.keyCode && e.keyCode === 13)) {
+ default_button.click();
+ return false;
+ }
- if (phpbb_check_key(event))
return true;
+ });
+}
+
+jQuery(document).ready(apply_onkeypress_event);
- var current = selector['parentNode'];
+/**
+* Functions for user search popup
+*/
+function insert_user(formId, value)
+{
+ var form = jQuery(formId),
+ formName = form.attr('data-form-name'),
+ fieldName = form.attr('data-field-name'),
+ item = opener.document.forms[formName][fieldName];
- // Search parent form element
- while (current && (!current.nodeName || current.nodeType != 1 || !is_node_name(current, 'form')) && current != document)
- current = current['parentNode'];
+ if (item.value.length && item.type == 'textarea') {
+ value = item.value + "\n" + value;
+ }
- // Find the input submit button with the class name
- //current = find_in_tree(current, 'input', 'submit', class_name);
- var input_tags = current.getElementsByTagName('input');
- current = false;
+ item.value = value;
+}
- for (var i = 0, element = input_tags[0]; i < input_tags.length; element = input_tags[++i])
+function insert_marked_users(formId, users)
+{
+ if (typeof(users.length) == "undefined")
+ {
+ if (users.checked)
+ {
+ insert_user(formId, users.value);
+ }
+ }
+ else if (users.length > 0)
{
- if (element.type == 'submit' && is_in_array(class_name, (element.className || element).toString().split(/\s+/)) > -1)
- current = element;
+ for (i = 0; i < users.length; i++)
+ {
+ if (users[i].checked)
+ {
+ insert_user(formId, users[i].value);
+ }
+ }
}
- if (!current)
- return true;
+ self.close();
+}
- // Submit form
- current.focus();
- current.click();
- return false;
+function insert_single_user(formId, user)
+{
+ insert_user(formId, user);
+ self.close();
}
/**
-* Apply onkeypress event for forcing default submit button on ENTER key press
-* The jQuery snippet used is based on http://greatwebguy.com/programming/dom/default-html-button-submit-on-enter-with-jquery/
-* The non-jQuery code is a mimick of the jQuery code ;)
+* Parse document block
*/
-function apply_onkeypress_event()
+function parse_document(container)
{
- // jQuery code in case jQuery is used
- if (jquery_present)
- {
- jQuery('form input[type=text], form input[type=password]').on('keypress', function (e)
- {
- var default_button = jQuery(this).parents('form').find('input[type=submit].default-submit-action');
-
- if (!default_button || default_button.length <= 0)
- return true;
+ var test = document.createElement('div'),
+ oldBrowser = (typeof test.style.borderRadius == 'undefined');
+
+ delete test;
+
+ /**
+ * Reset avatar dimensions when changing URL or EMAIL
+ */
+ container.find('input[data-reset-on-edit]').bind('keyup', function() {
+ $(this.getAttribute('data-reset-on-edit')).val('');
+ });
+
+ /**
+ * Pagination
+ */
+ container.find('a.pagination-trigger').click(function() {
+ jumpto($(this));
+ });
+
+ /**
+ * Dropdowns
+ */
+ container.find('.dropdown-container').each(function() {
+ var $this = $(this),
+ trigger = $this.find('.dropdown-trigger:first'),
+ contents = $this.find('.dropdown'),
+ options = {
+ direction: 'auto',
+ verticalDirection: 'auto'
+ },
+ data;
+
+ if (!trigger.length) {
+ data = $this.attr('data-dropdown-trigger');
+ trigger = data ? $this.children(data) : $this.children('a:first');
+ }
- if (phpbb_check_key(e))
- return true;
+ if (!contents.length) {
+ data = $this.attr('data-dropdown-contents');
+ contents = data ? $this.children(data) : $this.children('div:first');
+ }
- if ((e.which && e.which == 13) || (e.keyCode && e.keyCode == 13))
- {
- default_button.click();
- return false;
- }
+ if (!trigger.length || !contents.length) return;
- return true;
- });
-
+ if ($this.hasClass('dropdown-up')) options.verticalDirection = 'up';
+ if ($this.hasClass('dropdown-down')) options.verticalDirection = 'down';
+ if ($this.hasClass('dropdown-left')) options.direction = 'left';
+ if ($this.hasClass('dropdown-right')) options.direction = 'right';
+
+ phpbb.registerDropdown(trigger, contents, options);
+ });
+
+ /**
+ * Adjust HTML code for IE8 and older versions
+ */
+ if (oldBrowser) {
+ // Fix .linklist.bulletin lists
+ container.find('ul.linklist.bulletin li:first-child, ul.linklist.bulletin li.rightside:last-child').addClass('no-bulletin');
+
+ // Do not run functions below for old browsers
return;
}
- var input_tags = document.getElementsByTagName('input');
+ /**
+ * Resize navigation block to keep all links on same line
+ */
+ container.find('.navlinks').each(function() {
+ var $this = $(this),
+ left = $this.children().not('.rightside'),
+ right = $this.children('.rightside');
- for (var i = 0, element = input_tags[0]; i < input_tags.length ; element = input_tags[++i])
- {
- if (element.type == 'text' || element.type == 'password')
+ if (left.length !== 1 || !right.length) return;
+
+ function resize() {
+ var width = 0,
+ diff = left.outerWidth(true) - left.width();
+
+ right.each(function() {
+ width += $(this).outerWidth(true);
+ });
+ left.css('max-width', Math.floor($this.width() - width - diff) + 'px');
+ }
+
+ resize();
+ $(window).resize(resize);
+ });
+
+ /**
+ * Makes breadcrumbs responsive
+ */
+ container.find('.breadcrumbs:not([data-skip-responsive])').each(function() {
+ var $this = $(this),
+ $body = $('body'),
+ links = $this.find('.crumb'),
+ length = links.length,
+ classes = ['wrapped-max', 'wrapped-wide', 'wrapped-medium', 'wrapped-small', 'wrapped-tiny'],
+ classesLength = classes.length,
+ maxHeight = 0,
+ lastWidth = false,
+ wrapped = false;
+
+ // Set tooltips
+ $this.find('a').each(function() {
+ var $link = $(this);
+ $link.attr('title', $link.text());
+ });
+
+ // Funciton that checks breadcrumbs
+ function check() {
+ var height = $this.height(),
+ width = $body.width(),
+ link, i, j;
+
+ maxHeight = parseInt($this.css('line-height')) | 0;
+ links.each(function() {
+ if ($(this).height() > 0) {
+ maxHeight = Math.max(maxHeight, $(this).outerHeight(true));
+ }
+ });
+
+ if (height <= maxHeight) {
+ if (!wrapped || lastWidth === false || lastWidth >= width) {
+ lastWidth = width;
+ return;
+ }
+ }
+ lastWidth = width;
+
+ if (wrapped) {
+ $this.removeClass('wrapped').find('.crumb.wrapped').removeClass('wrapped ' + classes.join(' '));
+ wrapped = false;
+ if ($this.height() <= maxHeight) {
+ return;
+ }
+ }
+
+ wrapped = true;
+ $this.addClass('wrapped');
+ if ($this.height() <= maxHeight) {
+ return;
+ }
+
+ for (i = 0; i < classesLength; i ++) {
+ for (j = length - 1; j >= 0; j --) {
+ links.eq(j).addClass('wrapped ' + classes[i]);
+ if ($this.height() <= maxHeight) {
+ return;
+ }
+ }
+ }
+ }
+
+ // Run function and set event
+ check();
+ $(window).resize(check);
+ });
+
+ /**
+ * Adjust topiclist lists with check boxes
+ */
+ container.find('ul.topiclist dd.mark').siblings('dt').children('.list-inner').addClass('with-mark');
+
+ /**
+ * Appends contents of all extra columns to first column in
+ * .topiclist lists for mobile devices. Copies contents as is.
+ *
+ * To add that functionality to .topiclist list simply add
+ * responsive-show-all to list of classes
+ */
+ container.find('.topiclist.responsive-show-all > li > dl').each(function() {
+ var $this = $(this),
+ block = $this.find('dt .responsive-show:last-child'),
+ first = true;
+
+ // Create block that is visible only on mobile devices
+ if (!block.length) {
+ $this.find('dt > .list-inner').append('<div class="responsive-show" style="display:none;" />');
+ block = $this.find('dt .responsive-show:last-child');
+ }
+ else {
+ first = (block.text().trim().length == 0);
+ }
+
+ // Copy contents of each column
+ $this.find('dd').not('.mark').each(function() {
+ var column = $(this),
+ children = column.children(),
+ html = column.html();
+
+ if (children.length == 1 && children.text() == column.text()) {
+ html = children.html();
+ }
+
+ block.append((first ? '' : '<br />') + html);
+
+ first = false;
+ });
+ });
+
+ /**
+ * Same as above, but prepends text from header to each
+ * column before contents of that column.
+ *
+ * To add that functionality to .topiclist list simply add
+ * responsive-show-columns to list of classes
+ */
+ container.find('.topiclist.responsive-show-columns').each(function() {
+ var list = $(this),
+ headers = [],
+ headersLength = 0;
+
+ // Find all headers, get contents
+ list.prev('.topiclist').find('li.header dd').not('.mark').each(function() {
+ headers.push($(this).text());
+ headersLength ++;
+ });
+
+ if (!headersLength) {
+ return;
+ }
+
+ // Parse each row
+ list.find('dl').each(function() {
+ var $this = $(this),
+ block = $this.find('dt .responsive-show:last-child'),
+ first = true;
+
+ // Create block that is visible only on mobile devices
+ if (!block.length) {
+ $this.find('dt > .list-inner').append('<div class="responsive-show" style="display:none;" />');
+ block = $this.find('dt .responsive-show:last-child');
+ }
+ else {
+ first = (block.text().trim().length == 0);
+ }
+
+ // Copy contents of each column
+ $this.find('dd').not('.mark').each(function(i) {
+ var column = $(this),
+ children = column.children(),
+ html = column.html();
+
+ if (children.length == 1 && children.text() == column.text()) {
+ html = children.html();
+ }
+
+ // Prepend contents of matching header before contents of column
+ if (i < headersLength) {
+ html = headers[i] + ': <strong>' + html + '</strong>';
+ }
+
+ block.append((first ? '' : '<br />') + html);
+
+ first = false;
+ });
+ });
+ });
+
+ /**
+ * Responsive tables
+ */
+ container.find('table.table1').not('.not-responsive').each(function() {
+ var $this = $(this),
+ th = $this.find('thead > tr > th'),
+ columns = th.length,
+ headers = [],
+ totalHeaders = 0,
+ i, headersLength;
+
+ // Find each header
+ th.each(function(column) {
+ var cell = $(this),
+ colspan = parseInt(cell.attr('colspan')),
+ dfn = cell.attr('data-dfn'),
+ text = dfn ? dfn : cell.text();
+
+ colspan = isNaN(colspan) || colspan < 1 ? 1 : colspan;
+
+ for (i=0; i<colspan; i++) {
+ headers.push(text);
+ }
+ totalHeaders ++;
+
+ if (dfn && !column) {
+ $this.addClass('show-header');
+ }
+ });
+
+ headersLength = headers.length;
+
+ // Add header text to each cell as <dfn>
+ $this.addClass('responsive');
+
+ if (totalHeaders < 2) {
+ $this.addClass('show-header');
+ return;
+ }
+
+ $this.find('tbody > tr').each(function() {
+ var row = $(this),
+ cells = row.children('td'),
+ column = 0;
+
+ if (cells.length == 1) {
+ row.addClass('big-column');
+ return;
+ }
+
+ cells.each(function() {
+ var cell = $(this),
+ colspan = parseInt(cell.attr('colspan')),
+ text = cell.text().trim();
+
+ if (headersLength <= column) {
+ return;
+ }
+
+ if ((text.length && text !== '-') || cell.children().length) {
+ cell.prepend('<dfn style="display: none;">' + headers[column] + '</dfn>');
+ }
+ else {
+ cell.addClass('empty');
+ }
+
+ colspan = isNaN(colspan) || colspan < 1 ? 1 : colspan;
+ column += colspan;
+ });
+ });
+ });
+
+ /**
+ * Hide empty responsive tables
+ */
+ container.find('table.responsive > tbody').not('.responsive-skip-empty').each(function() {
+ var items = $(this).children('tr');
+ if (items.length == 0)
{
- // onkeydown is possible too
- element.onkeypress = function (evt) { submit_default_button((evt || window.event), this, 'default-submit-action'); };
+ $(this).parent('table:first').addClass('responsive-hide');
}
- }
+ });
+
+ /**
+ * Responsive link lists
+ */
+ container.find('.linklist:not(.navlinks, [data-skip-responsive]), .postbody ul.profile-icons:not([data-skip-responsive])').each(function() {
+ var $this = $(this),
+ $body = $('body'),
+ filterSkip = '.breadcrumbs, [data-skip-responsive]',
+ filterLast = '.pagination, .icon-notifications, .icon-pm, .icon-logout, .icon-login, .mark-read, .edit-icon, .quote-icon',
+ allLinks = $this.children(),
+ links = allLinks.not(filterSkip),
+ html = '<li class="responsive-menu" style="display:none;"><a href="javascript:void(0);" class="responsive-menu-link">&nbsp;</a><div class="dropdown" style="display:none;"><div class="pointer"><div class="pointer-inner" /></div><ul class="dropdown-contents" /></div></li>',
+ filterLastList = links.filter(filterLast);
+
+ if (links.is('.rightside'))
+ {
+ links.filter('.rightside:first').before(html);
+ }
+ else
+ {
+ $this.append(html);
+ }
+
+ var item = $this.children('.responsive-menu'),
+ menu = item.find('.dropdown-contents'),
+ lastWidth = false,
+ compact = false,
+ responsive = false,
+ copied = false;
+
+ function check() {
+ var width = $body.width();
+ if (responsive && width <= lastWidth) {
+ return;
+ }
+
+ // Reset responsive and compact layout
+ if (responsive) {
+ responsive = false;
+ $this.removeClass('responsive');
+ links.css('display', '');
+ item.css('display', 'none');
+ }
+
+ if (compact) {
+ compact = false;
+ $this.removeClass('compact');
+ }
+
+ // Find tallest element
+ var maxHeight = 0;
+ allLinks.each(function() {
+ if (!$(this).height()) return;
+ maxHeight = Math.max(maxHeight, $(this).outerHeight(true));
+ });
+
+ if (maxHeight < 1) {
+ return;
+ }
+
+ // Nothing to resize if block's height is not bigger than tallest element's height
+ if ($this.height() <= maxHeight) {
+ return;
+ }
+
+ // Enable compact layout, find tallest element, compare to height of whole block
+ compact = true;
+ $this.addClass('compact');
+
+ var compactMaxHeight = 0;
+ allLinks.each(function() {
+ if (!$(this).height()) return;
+ compactMaxHeight = Math.max(compactMaxHeight, $(this).outerHeight(true));
+ });
+
+ if ($this.height() <= maxHeight) {
+ return;
+ }
+
+ // Compact layout did not resize block enough, switch to responsive layout
+ compact = false;
+ $this.removeClass('compact');
+ responsive = true;
+
+ if (!copied) {
+ var clone = links.clone(true);
+ clone.filter('.rightside').each(function() {
+ menu.prepend(this);
+ });
+ menu.prepend(clone.not('.rightside'));
+ menu.find('li.leftside, li.rightside').removeClass('leftside rightside');
+ menu.find('.inputbox').parents('li:first').css('white-space', 'normal');
+ copied = true;
+ }
+ else {
+ menu.children().css('display', '');
+ }
+
+ item.css('display', '');
+ $this.addClass('responsive');
+
+ // Try to not hide filtered items
+ if (filterLastList.length) {
+ links.not(filterLast).css('display', 'none');
+
+ maxHeight = 0;
+ filterLastList.each(function() {
+ if (!$(this).height()) return;
+ maxHeight = Math.max(maxHeight, $(this).outerHeight(true));
+ });
+
+ if ($this.height() <= maxHeight) {
+ menu.children().filter(filterLast).css('display', 'none');
+ return;
+ }
+ }
+
+ links.css('display', 'none');
+ }
+
+ phpbb.registerDropdown(item.find('a.responsive-menu-link'), item.find('.dropdown'));
+
+ check();
+ $(window).resize(check);
+ });
+
+ /**
+ * Responsive tabs
+ */
+ container.find('#tabs, #minitabs').not('[data-skip-responsive]').each(function() {
+ var $this = $(this),
+ $body = $('body'),
+ ul = $this.children(),
+ tabs = ul.children().not('[data-skip-responsive]'),
+ links = tabs.children('a'),
+ item = ul.append('<li class="responsive-tab" style="display:none;"><a href="javascript:void(0);" class="responsive-tab-link"><span>&nbsp;</span></a><div class="dropdown tab-dropdown" style="display: none;"><div class="pointer"><div class="pointer-inner" /></div><ul class="dropdown-contents" /></div></li>').find('li.responsive-tab'),
+ menu = item.find('.dropdown-contents'),
+ maxHeight = 0,
+ lastWidth = false,
+ responsive = false;
+
+ links.each(function() {
+ var link = $(this);
+ maxHeight = Math.max(maxHeight, Math.max(link.outerHeight(true), link.parent().outerHeight(true)));
+ })
+
+ function check() {
+ var width = $body.width(),
+ height = $this.height();
+
+ if (arguments.length == 0 && (!responsive || width <= lastWidth) && height <= maxHeight) {
+ return;
+ }
+
+ tabs.show();
+ item.hide();
+
+ lastWidth = width;
+ height = $this.height();
+ if (height <= maxHeight) {
+ responsive = false;
+ if (item.hasClass('dropdown-visible')) {
+ phpbb.toggleDropdown.call(item.find('a.responsive-tab-link').get(0));
+ }
+ return;
+ }
+
+ responsive = true;
+ item.show();
+ menu.html('');
+
+ var availableTabs = tabs.filter(':not(.activetab, .responsive-tab)'),
+ total = availableTabs.length,
+ i, tab;
+
+ for (i = total - 1; i >= 0; i --) {
+ tab = availableTabs.eq(i);
+ menu.prepend(tab.clone(true));
+ tab.hide();
+ if ($this.height() <= maxHeight) {
+ menu.find('a').click(function() { check(true); });
+ return;
+ }
+ }
+ menu.find('a').click(function() { check(true); });
+ }
+
+ phpbb.registerDropdown(item.find('a.responsive-tab-link'), item.find('.dropdown'), {visibleClass: 'activetab'});
+
+ check(true);
+ $(window).resize(check);
+ });
+
+ /**
+ * Hide UCP/MCP navigation if there is only 1 item
+ */
+ container.find('#navigation').each(function() {
+ var items = $(this).children('ol, ul').children('li');
+ if (items.length == 1)
+ {
+ $(this).addClass('responsive-hide');
+ }
+ });
+
+ /**
+ * Replace responsive text
+ */
+ container.find('[data-responsive-text]').each(function() {
+ var $this = $(this),
+ fullText = $this.text(),
+ responsiveText = $this.attr('data-responsive-text'),
+ responsive = false;
+
+ function check() {
+ if ($(window).width() > 700) {
+ if (!responsive) return;
+ $this.text(fullText);
+ responsive = false;
+ return;
+ }
+ if (responsive) return;
+ $this.text(responsiveText);
+ responsive = true;
+ }
+
+ check();
+ $(window).resize(check);
+ });
}
/**
-* Detect JQuery existance. We currently do not deliver it, but some styles do, so why not benefit from it. ;)
+* Run onload functions
*/
-var jquery_present = typeof jQuery == 'function';
+(function($) {
+ $(document).ready(function() {
+ // Swap .nojs and .hasjs
+ $('#phpbb.nojs').toggleClass('nojs hasjs');
+
+ // Focus forms
+ $('form[data-focus]:first').each(function() {
+ $('#' + this.getAttribute('data-focus')).focus();
+ });
+
+ parse_document($('body'));
+ });
+})(jQuery);
diff --git a/phpBB/styles/prosilver/template/forumlist_body.html b/phpBB/styles/prosilver/template/forumlist_body.html
index e9ed5d9daf..0dd47bea9e 100644
--- a/phpBB/styles/prosilver/template/forumlist_body.html
+++ b/phpBB/styles/prosilver/template/forumlist_body.html
@@ -3,17 +3,18 @@
<!-- IF (forumrow.S_IS_CAT and not forumrow.S_FIRST_ROW) or forumrow.S_NO_CAT -->
</ul>
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
<!-- ENDIF -->
+ <!-- EVENT forumlist_body_category_header_before -->
<!-- IF forumrow.S_IS_CAT or forumrow.S_FIRST_ROW or forumrow.S_NO_CAT -->
<div class="forabg">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<ul class="topiclist">
<li class="header">
<dl class="icon">
- <dt><!-- IF forumrow.S_IS_CAT --><a href="{forumrow.U_VIEWFORUM}">{forumrow.FORUM_NAME}</a><!-- ELSE -->{L_FORUM}<!-- ENDIF --></dt>
+ <dt><div class="list-inner"><!-- IF forumrow.S_IS_CAT --><a href="{forumrow.U_VIEWFORUM}">{forumrow.FORUM_NAME}</a><!-- ELSE -->{L_FORUM}<!-- ENDIF --></div></dt>
<dd class="topics">{L_TOPICS}</dd>
<dd class="posts">{L_POSTS}</dd>
<dd class="lastpost"><span>{L_LAST_POST}</span></dd>
@@ -22,29 +23,59 @@
</ul>
<ul class="topiclist forums">
<!-- ENDIF -->
+ <!-- EVENT forumlist_body_category_header_after -->
<!-- IF not forumrow.S_IS_CAT -->
<li class="row">
- <dl class="icon" style="background-image: url({forumrow.FORUM_FOLDER_IMG_SRC}); background-repeat: no-repeat;">
+ <dl class="icon {forumrow.FORUM_IMG_STYLE}">
<dt title="{forumrow.FORUM_FOLDER_IMG_ALT}">
- <!-- IF S_ENABLE_FEEDS and forumrow.S_FEED_ENABLED --><!-- <a class="feed-icon-forum" title="{L_FEED} - {forumrow.FORUM_NAME}" href="{U_FEED}?f={forumrow.FORUM_ID}"><img src="{T_THEME_PATH}/images/feed.gif" alt="{L_FEED} - {forumrow.FORUM_NAME}" /></a> --><!-- ENDIF -->
+ <!-- IF forumrow.S_UNREAD_FORUM --><a href="{forumrow.U_VIEWFORUM}" class="icon-link"></a><!-- ENDIF -->
+ <div class="list-inner">
+ <!-- IF S_ENABLE_FEEDS and forumrow.S_FEED_ENABLED --><!-- <a class="feed-icon-forum" title="{L_FEED} - {forumrow.FORUM_NAME}" href="{U_FEED}?f={forumrow.FORUM_ID}"><img src="{T_THEME_PATH}/images/feed.gif" alt="{L_FEED} - {forumrow.FORUM_NAME}" /></a> --><!-- ENDIF -->
- <!-- IF forumrow.FORUM_IMAGE --><span class="forum-image">{forumrow.FORUM_IMAGE}</span><!-- ENDIF -->
- <a href="{forumrow.U_VIEWFORUM}" class="forumtitle">{forumrow.FORUM_NAME}</a><br />
- {forumrow.FORUM_DESC}
- <!-- IF forumrow.MODERATORS -->
- <br /><strong>{forumrow.L_MODERATOR_STR}:</strong> {forumrow.MODERATORS}
- <!-- ENDIF -->
- <!-- IF forumrow.SUBFORUMS and forumrow.S_LIST_SUBFORUMS --><br /><strong>{forumrow.L_SUBFORUM_STR}</strong> {forumrow.SUBFORUMS}<!-- ENDIF -->
+ <!-- IF forumrow.FORUM_IMAGE --><span class="forum-image">{forumrow.FORUM_IMAGE}</span><!-- ENDIF -->
+ <a href="{forumrow.U_VIEWFORUM}" class="forumtitle">{forumrow.FORUM_NAME}</a><br />
+ {forumrow.FORUM_DESC}
+ <!-- IF forumrow.MODERATORS -->
+ <br /><strong>{forumrow.L_MODERATOR_STR}{L_COLON}</strong> {forumrow.MODERATORS}
+ <!-- ENDIF -->
+ <!-- IF .forumrow.subforum and forumrow.S_LIST_SUBFORUMS -->
+ <!-- EVENT forumlist_body_subforums_before -->
+ <br /><strong>{forumrow.L_SUBFORUM_STR}{L_COLON}</strong>
+ <!-- BEGIN subforum -->
+ <a href="{forumrow.subforum.U_SUBFORUM}" class="subforum<!-- IF forumrow.subforum.S_UNREAD --> unread<!-- ELSE --> read<!-- ENDIF -->" title="<!-- IF forumrow.subforum.UNREAD -->{L_UNREAD_POSTS}<!-- ELSE -->{L_NO_UNREAD_POSTS}<!-- ENDIF -->">{forumrow.subforum.SUBFORUM_NAME}</a><!-- IF not forumrow.subforum.S_LAST_ROW -->{L_COMMA_SEPARATOR}<!-- ENDIF -->
+ <!-- END subforum -->
+ <!-- EVENT forumlist_body_subforums_after -->
+ <!-- ENDIF -->
+
+ <!-- IF not S_IS_BOT -->
+ <div class="responsive-show" style="display: none;">
+ <!-- IF forumrow.CLICKS -->
+ {L_REDIRECTS}{L_COLON} <strong>{forumrow.CLICKS}</strong>
+ <!-- ELSEIF not forumrow.S_IS_LINK and forumrow.TOPICS -->
+ {L_TOPICS}{L_COLON} <strong>{forumrow.TOPICS}</strong>
+ <!-- ENDIF -->
+ </div>
+ <!-- ENDIF -->
+ </div>
</dt>
<!-- IF forumrow.CLICKS -->
- <dd class="redirect"><span>{L_REDIRECTS}: {forumrow.CLICKS}</span></dd>
+ <dd class="redirect"><span>{L_REDIRECTS}{L_COLON} {forumrow.CLICKS}</span></dd>
<!-- ELSEIF not forumrow.S_IS_LINK -->
<dd class="topics">{forumrow.TOPICS} <dfn>{L_TOPICS}</dfn></dd>
<dd class="posts">{forumrow.POSTS} <dfn>{L_POSTS}</dfn></dd>
<dd class="lastpost"><span>
- <!-- IF forumrow.U_UNAPPROVED_TOPICS --><a href="{forumrow.U_UNAPPROVED_TOPICS}">{UNAPPROVED_IMG}</a><!-- ENDIF -->
- <!-- IF forumrow.LAST_POST_TIME --><dfn>{L_LAST_POST}</dfn> {L_POST_BY_AUTHOR} {forumrow.LAST_POSTER_FULL}
+ <!-- IF forumrow.U_UNAPPROVED_TOPICS -->
+ <a href="{forumrow.U_UNAPPROVED_TOPICS}">{UNAPPROVED_IMG}</a>
+ <!-- ELSEIF forumrow.U_UNAPPROVED_POSTS -->
+ <a href="{forumrow.U_UNAPPROVED_POSTS}">{UNAPPROVED_POST_IMG}</a>
+ <!-- ENDIF -->
+ <!-- IF forumrow.LAST_POST_TIME --><dfn>{L_LAST_POST}</dfn>
+ <!-- IF forumrow.S_DISPLAY_SUBJECT -->
+ <!-- EVENT forumlist_body_last_post_title_prepend -->
+ <a href="{forumrow.U_LAST_POST}" title="{forumrow.LAST_POST_SUBJECT}" class="lastsubject">{forumrow.LAST_POST_SUBJECT_TRUNCATED}</a> <br />
+ <!-- ENDIF -->
+ {L_POST_BY_AUTHOR} {forumrow.LAST_POSTER_FULL}
<!-- IF not S_IS_BOT --><a href="{forumrow.U_LAST_POST}">{LAST_POST_IMG}</a> <!-- ENDIF --><br />{forumrow.LAST_POST_TIME}<!-- ELSE -->{L_NO_POSTS}<br />&nbsp;<!-- ENDIF --></span>
</dd>
<!-- ENDIF -->
@@ -55,14 +86,15 @@
<!-- IF forumrow.S_LAST_ROW -->
</ul>
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
+ <!-- EVENT forumlist_body_last_row_after -->
<!-- ENDIF -->
<!-- BEGINELSE -->
<div class="panel">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<strong>{L_NO_FORUMS}</strong>
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
<!-- END forumrow -->
diff --git a/phpBB/styles/prosilver/template/index_body.html b/phpBB/styles/prosilver/template/index_body.html
index d4d50a11c0..50c7640e62 100644
--- a/phpBB/styles/prosilver/template/index_body.html
+++ b/phpBB/styles/prosilver/template/index_body.html
@@ -1,27 +1,41 @@
<!-- INCLUDE overall_header.html -->
-<p class="{S_CONTENT_FLOW_END}<!-- IF S_USER_LOGGED_IN --> rightside<!-- ENDIF -->"><!-- IF S_USER_LOGGED_IN -->{LAST_VISIT_DATE}<!-- ELSE -->{CURRENT_TIME}<!-- ENDIF --></p>
-<!-- IF U_MCP --><p>{CURRENT_TIME} <br />[&nbsp;<a href="{U_MCP}">{L_MCP}</a>&nbsp;]</p><!-- ELSEIF S_USER_LOGGED_IN --><p>{CURRENT_TIME}</p><!-- ENDIF -->
+<p class="{S_CONTENT_FLOW_END} responsive-center<!-- IF S_USER_LOGGED_IN --> rightside<!-- ENDIF -->"><!-- IF S_USER_LOGGED_IN -->{LAST_VISIT_DATE}<!-- ELSE -->{CURRENT_TIME}<!-- ENDIF --></p>
+<!-- IF S_USER_LOGGED_IN --><p class="responsive-center">{CURRENT_TIME}<!-- IF U_MCP or U_ACP --> <br />[&nbsp;<!-- IF U_ACP --><a href="{U_ACP}" title="{L_ACP}" data-responsive-text="{L_ACP_SHORT}">{L_ACP}</a><!-- IF U_MCP -->&nbsp;|&nbsp;<!-- ENDIF --><!-- ENDIF --><!-- IF U_MCP --><a href="{U_MCP}" title="{L_MCP}" data-responsive-text="{L_MCP_SHORT}">{L_MCP}</a><!-- ENDIF -->&nbsp;]<!-- ENDIF --></p><!-- ENDIF -->
+
+<!-- EVENT index_body_linklist_before -->
<!-- IF S_DISPLAY_SEARCH or (S_USER_LOGGED_IN and not S_IS_BOT) -->
-<ul class="linklist">
+<ul class="linklist bulletin">
<!-- IF S_DISPLAY_SEARCH -->
- <li><a href="{U_SEARCH_UNANSWERED}">{L_SEARCH_UNANSWERED}</a><!-- IF S_LOAD_UNREADS --> &bull; <a href="{U_SEARCH_UNREAD}">{L_SEARCH_UNREAD}</a><!-- ENDIF --><!-- IF S_USER_LOGGED_IN --> &bull; <a href="{U_SEARCH_NEW}">{L_SEARCH_NEW}</a><!-- ENDIF --> &bull; <a href="{U_SEARCH_ACTIVE_TOPICS}">{L_SEARCH_ACTIVE_TOPICS}</a></li>
+ <li><a href="{U_SEARCH_UNANSWERED}">{L_SEARCH_UNANSWERED}</a></li>
+ <!-- IF S_LOAD_UNREADS -->
+ <li><a href="{U_SEARCH_UNREAD}">{L_SEARCH_UNREAD}</a></li>
+ <!-- ENDIF -->
+ <!-- IF S_USER_LOGGED_IN -->
+ <li><a href="{U_SEARCH_NEW}">{L_SEARCH_NEW}</a></li>
+ <!-- ENDIF -->
+ <li><a href="{U_SEARCH_ACTIVE_TOPICS}">{L_SEARCH_ACTIVE_TOPICS}</a></li>
<!-- ENDIF -->
- <!-- IF not S_IS_BOT and U_MARK_FORUMS --><li class="rightside"><a href="{U_MARK_FORUMS}" accesskey="m">{L_MARK_FORUMS_READ}</a></li><!-- ENDIF -->
+ <!-- IF not S_IS_BOT and U_MARK_FORUMS --><li class="rightside mark-read"><a href="{U_MARK_FORUMS}" accesskey="m" data-ajax="mark_forums_read" data-overlay="false">{L_MARK_FORUMS_READ}</a></li><!-- ENDIF -->
</ul>
<!-- ENDIF -->
+<!-- EVENT index_body_linklist_after -->
+
<!-- INCLUDE forumlist_body.html -->
<!-- IF not S_USER_LOGGED_IN and not S_IS_BOT -->
<form method="post" action="{S_LOGIN_ACTION}" class="headerspace">
<h3><a href="{U_LOGIN_LOGOUT}">{L_LOGIN_LOGOUT}</a><!-- IF S_REGISTER_ENABLED -->&nbsp; &bull; &nbsp;<a href="{U_REGISTER}">{L_REGISTER}</a><!-- ENDIF --></h3>
<fieldset class="quick-login">
- <label for="username">{L_USERNAME}:</label>&nbsp;<input type="text" name="username" id="username" size="10" class="inputbox" title="{L_USERNAME}" />
- <label for="password">{L_PASSWORD}:</label>&nbsp;<input type="password" name="password" id="password" size="10" class="inputbox" title="{L_PASSWORD}" />
+ <label for="username"><span>{L_USERNAME}{L_COLON}</span> <input type="text" name="username" id="username" size="10" class="inputbox" title="{L_USERNAME}" /></label>
+ <label for="password"><span>{L_PASSWORD}{L_COLON}</span> <input type="password" name="password" id="password" size="10" class="inputbox" title="{L_PASSWORD}" /></label>
+ <!-- IF U_SEND_PASSWORD -->
+ <a href="{U_SEND_PASSWORD}">{L_FORGOT_PASS}</a>
+ <!-- ENDIF -->
<!-- IF S_AUTOLOGIN_ENABLED -->
- | <label for="autologin">{L_LOG_ME_IN} <input type="checkbox" name="autologin" id="autologin" /></label>
+ <span class="responsive-hide">|</span> <label for="autologin">{L_LOG_ME_IN} <input type="checkbox" name="autologin" id="autologin" /></label>
<!-- ENDIF -->
<input type="submit" name="login" value="{L_LOGIN}" class="button2" />
{S_LOGIN_REDIRECT}
@@ -29,15 +43,17 @@
</form>
<!-- ENDIF -->
+<!-- EVENT index_body_stat_blocks_before -->
+
<!-- IF S_DISPLAY_ONLINE_LIST -->
<!-- IF U_VIEWONLINE --><h3><a href="{U_VIEWONLINE}">{L_WHO_IS_ONLINE}</a></h3><!-- ELSE --><h3>{L_WHO_IS_ONLINE}</h3><!-- ENDIF -->
<p>{TOTAL_USERS_ONLINE} ({L_ONLINE_EXPLAIN})<br />{RECORD_USERS}<br /> <br />{LOGGED_IN_USER_LIST}
- <!-- IF LEGEND --><br /><em>{L_LEGEND}: {LEGEND}</em><!-- ENDIF --></p>
+ <!-- IF LEGEND --><br /><em>{L_LEGEND}{L_COLON} {LEGEND}</em><!-- ENDIF --></p>
<!-- ENDIF -->
-<!-- IF S_DISPLAY_BIRTHDAY_LIST and BIRTHDAY_LIST -->
+<!-- IF S_DISPLAY_BIRTHDAY_LIST -->
<h3>{L_BIRTHDAYS}</h3>
- <p><!-- IF BIRTHDAY_LIST -->{L_CONGRATULATIONS}: <strong>{BIRTHDAY_LIST}</strong><!-- ELSE -->{L_NO_BIRTHDAYS}<!-- ENDIF --></p>
+ <p><!-- IF .birthdays -->{L_CONGRATULATIONS}{L_COLON} <strong><!-- BEGIN birthdays -->{birthdays.USERNAME}<!-- IF birthdays.AGE !== '' --> ({birthdays.AGE})<!-- ENDIF --><!-- IF not birthdays.S_LAST_ROW -->, <!-- ENDIF --><!-- END birthdays --></strong><!-- ELSE -->{L_NO_BIRTHDAYS}<!-- ENDIF --></p>
<!-- ENDIF -->
<!-- IF NEWEST_USER -->
@@ -45,4 +61,4 @@
<p>{TOTAL_POSTS} &bull; {TOTAL_TOPICS} &bull; {TOTAL_USERS} &bull; {NEWEST_USER}</p>
<!-- ENDIF -->
-<!-- INCLUDE overall_footer.html --> \ No newline at end of file
+<!-- INCLUDE overall_footer.html -->
diff --git a/phpBB/styles/prosilver/template/jumpbox.html b/phpBB/styles/prosilver/template/jumpbox.html
index 1029627561..47d322407d 100644
--- a/phpBB/styles/prosilver/template/jumpbox.html
+++ b/phpBB/styles/prosilver/template/jumpbox.html
@@ -1,23 +1,24 @@
<!-- IF S_VIEWTOPIC -->
- <p></p><p><a href="{U_VIEW_FORUM}" class="left-box {S_CONTENT_FLOW_BEGIN}" accesskey="r">{L_RETURN_TO} {FORUM_NAME}</a></p>
+ <p class="jumpbox-return"><a href="{U_VIEW_FORUM}" class="left-box arrow-{S_CONTENT_FLOW_BEGIN}" accesskey="r">{L_RETURN_TO_FORUM}</a></p>
<!-- ELSEIF S_VIEWFORUM -->
- <p></p><p><a href="{U_INDEX}" class="left-box {S_CONTENT_FLOW_BEGIN}" accesskey="r">{L_RETURN_TO} {L_INDEX}</a></p>
+ <p class="jumpbox-return"><a href="{U_INDEX}" class="left-box arrow-{S_CONTENT_FLOW_BEGIN}" accesskey="r">{L_RETURN_TO_INDEX}</a></p>
<!-- ELSEIF SEARCH_TOPIC -->
- <p></p><p><a class="left-box {S_CONTENT_FLOW_BEGIN}" href="{U_SEARCH_TOPIC}" accesskey="r">{L_RETURN_TO}: {SEARCH_TOPIC}</a></p>
+ <p class="jumpbox-return"><a class="left-box arrow-{S_CONTENT_FLOW_BEGIN}" href="{U_SEARCH_TOPIC}" accesskey="r">{L_RETURN_TO_TOPIC}</a></p>
<!-- ELSEIF S_SEARCH_ACTION -->
- <p></p><p><a class="left-box {S_CONTENT_FLOW_BEGIN}" href="{U_SEARCH}" title="{L_SEARCH_ADV}" accesskey="r">{L_RETURN_TO_SEARCH_ADV}</a></p>
+ <p class="jumpbox-return"><a class="left-box arrow-{S_CONTENT_FLOW_BEGIN}" href="{U_SEARCH}" title="{L_SEARCH_ADV}" accesskey="r">{L_RETURN_TO_SEARCH_ADV}</a></p>
<!-- ENDIF -->
<!-- IF S_DISPLAY_JUMPBOX -->
- <form method="post" id="jumpbox" action="{S_JUMPBOX_ACTION}" onsubmit="if(this.f.value == -1){return false;}">
+ <form method="get" id="jumpbox" action="{S_JUMPBOX_ACTION}" onsubmit="if(this.f.value == -1){return false;}">
<!-- IF $CUSTOM_FIELDSET_CLASS -->
<fieldset class="{$CUSTOM_FIELDSET_CLASS}">
<!-- ELSE -->
<fieldset class="jumpbox">
<!-- ENDIF -->
- <label for="f" accesskey="j"><!-- IF S_IN_MCP and S_MERGE_SELECT -->{L_SELECT_TOPICS_FROM}<!-- ELSEIF S_IN_MCP -->{L_MODERATE_FORUM}<!-- ELSE -->{L_JUMP_TO}<!-- ENDIF -->:</label>
+ {HIDDEN_FIELDS_FOR_JUMPBOX}
+ <label for="f" accesskey="j"><!-- IF S_IN_MCP and S_MERGE_SELECT -->{L_SELECT_TOPICS_FROM}<!-- ELSEIF S_IN_MCP -->{L_MODERATE_FORUM}<!-- ELSE -->{L_JUMP_TO}<!-- ENDIF -->{L_COLON}</label>
<select name="f" id="f" onchange="if(this.options[this.selectedIndex].value != -1){ document.forms['jumpbox'].submit() }">
<!-- BEGIN jumpbox_forums -->
<!-- IF jumpbox_forums.S_FORUM_COUNT == 1 --><option value="-1">------------------</option><!-- ENDIF -->
diff --git a/phpBB/styles/prosilver/template/login_body.html b/phpBB/styles/prosilver/template/login_body.html
index 36c2eae349..38d9f8c68b 100644
--- a/phpBB/styles/prosilver/template/login_body.html
+++ b/phpBB/styles/prosilver/template/login_body.html
@@ -1,14 +1,8 @@
<!-- INCLUDE overall_header.html -->
-<script type="text/javascript">
-// <![CDATA[
- onload_functions.push('document.getElementById("<!-- IF S_ADMIN_AUTH -->{PASSWORD_CREDENTIAL}<!-- ELSE -->{USERNAME_CREDENTIAL}<!-- ENDIF -->").focus();');
-// ]]>
-</script>
-
-<form action="{S_LOGIN_ACTION}" method="post" id="login">
+<form action="{S_LOGIN_ACTION}" method="post" id="login" data-focus="<!-- IF S_ADMIN_AUTH -->{PASSWORD_CREDENTIAL}<!-- ELSE -->{USERNAME_CREDENTIAL}<!-- ENDIF -->">
<div class="panel">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<div class="content">
<h2><!-- IF LOGIN_EXPLAIN -->{LOGIN_EXPLAIN}<!-- ELSE -->{L_LOGIN}<!-- ENDIF --></h2>
@@ -16,11 +10,11 @@
<fieldset <!-- IF not S_CONFIRM_CODE -->class="fields1"<!-- ELSE -->class="fields2"<!-- ENDIF -->>
<!-- IF LOGIN_ERROR --><div class="error">{LOGIN_ERROR}</div><!-- ENDIF -->
<dl>
- <dt><label for="{USERNAME_CREDENTIAL}">{L_USERNAME}:</label></dt>
+ <dt><label for="{USERNAME_CREDENTIAL}">{L_USERNAME}{L_COLON}</label></dt>
<dd><input type="text" tabindex="1" name="{USERNAME_CREDENTIAL}" id="{USERNAME_CREDENTIAL}" size="25" value="{USERNAME}" class="inputbox autowidth" /></dd>
</dl>
<dl>
- <dt><label for="{PASSWORD_CREDENTIAL}">{L_PASSWORD}:</label></dt>
+ <dt><label for="{PASSWORD_CREDENTIAL}">{L_PASSWORD}{L_COLON}</label></dt>
<dd><input type="password" tabindex="2" id="{PASSWORD_CREDENTIAL}" name="{PASSWORD_CREDENTIAL}" size="25" class="inputbox autowidth" /></dd>
<!-- IF S_DISPLAY_FULL_LOGIN and (U_SEND_PASSWORD or U_RESEND_ACTIVATION) -->
<!-- IF U_SEND_PASSWORD --><dd><a href="{U_SEND_PASSWORD}">{L_FORGOT_PASS}</a></dd><!-- ENDIF -->
@@ -45,13 +39,17 @@
</dl>
</fieldset>
</div>
- <span class="corners-bottom"><span></span></span></div>
+
+ <!-- IF not S_ADMIN_AUTH and PROVIDER_TEMPLATE_FILE -->
+ <!-- INCLUDE {PROVIDER_TEMPLATE_FILE} -->
+ <!-- ENDIF -->
+ </div>
</div>
<!-- IF not S_ADMIN_AUTH and S_REGISTER_ENABLED -->
<div class="panel">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<div class="content">
<h3>{L_REGISTER}</h3>
@@ -61,10 +59,10 @@
<p><a href="{U_REGISTER}" class="button2">{L_REGISTER}</a></p>
</div>
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
<!-- ENDIF -->
</form>
-<!-- INCLUDE overall_footer.html --> \ No newline at end of file
+<!-- INCLUDE overall_footer.html -->
diff --git a/phpBB/styles/prosilver/template/login_body_oauth.html b/phpBB/styles/prosilver/template/login_body_oauth.html
new file mode 100644
index 0000000000..156485d211
--- /dev/null
+++ b/phpBB/styles/prosilver/template/login_body_oauth.html
@@ -0,0 +1,8 @@
+<div class="content">
+ <!-- BEGIN oauth -->
+ <dl>
+ <dt>&nbsp;</dt>
+ <dd><a href="{oauth.REDIRECT_URL}" class="button2">{oauth.SERVICE_NAME}</a></dd>
+ </dl>
+ <!-- END oauth -->
+</div>
diff --git a/phpBB/styles/prosilver/template/login_forum.html b/phpBB/styles/prosilver/template/login_forum.html
index 81a83b6340..c83a625b3f 100644
--- a/phpBB/styles/prosilver/template/login_forum.html
+++ b/phpBB/styles/prosilver/template/login_forum.html
@@ -5,7 +5,7 @@
<form id="login_forum" method="post" action="{S_LOGIN_ACTION}">
{S_FORM_TOKEN}
<div class="panel">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<div class="content">
<h2>{L_LOGIN}</h2>
@@ -21,7 +21,7 @@
<!-- ENDIF -->
<dl>
- <dt><label for="password">{L_PASSWORD}:</label></dt>
+ <dt><label for="password">{L_PASSWORD}{L_COLON}</label></dt>
<dd><input type="password" tabindex="1" id="password" name="password" size="25" class="inputbox narrow" /></dd>
</dl>
{S_LOGIN_REDIRECT}
@@ -32,10 +32,10 @@
</fieldset>
</div>
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
</form>
<!-- INCLUDE jumpbox.html -->
-<!-- INCLUDE overall_footer.html --> \ No newline at end of file
+<!-- INCLUDE overall_footer.html -->
diff --git a/phpBB/styles/prosilver/template/mcp_approve.html b/phpBB/styles/prosilver/template/mcp_approve.html
index 185dd49c1b..ab7f92e262 100644
--- a/phpBB/styles/prosilver/template/mcp_approve.html
+++ b/phpBB/styles/prosilver/template/mcp_approve.html
@@ -1,9 +1,36 @@
+<!-- IF S_AJAX_REQUEST -->
+
+ <h3>{MESSAGE_TITLE}</h3>
+ <p>{MESSAGE_TEXT}</p>
+
+ <!-- IF S_NOTIFY_POSTER -->
+ <label><input type="checkbox" name="notify_poster" checked="checked" /> <!-- IF S_APPROVE -->{L_NOTIFY_POSTER_APPROVAL}<!-- ELSE -->{L_NOTIFY_POSTER_DISAPPROVAL}<!-- ENDIF --></label>
+ <!-- ENDIF -->
+
+ <!-- IF not S_APPROVE and not S_RESTORE and .reason -->
+ <label><strong>{L_DISAPPROVE_REASON}{L_COLON}</strong>
+ <select name="reason_id">
+ <!-- BEGIN reason --><option value="{reason.ID}"<!-- IF reason.S_SELECTED --> selected="selected"<!-- ENDIF -->>{reason.DESCRIPTION}</option><!-- END reason -->
+ </select></label>
+
+ <label><strong>{L_MORE_INFO}{L_COLON}</strong><br /><span>{L_CAN_LEAVE_BLANK}</span>
+ <textarea class="inputbox" name="reason" id="reason" rows="4" cols="40">{REASON}</textarea>
+ </label>
+ <!-- ENDIF -->
+
+ <fieldset class="submit-buttons">
+ <input type="button" name="confirm" value="{YES_VALUE}" class="button1" />&nbsp;
+ <input type="button" name="cancel" value="{L_NO}" class="button2" />
+ </fieldset>
+
+<!-- ELSE -->
+
<!-- INCLUDE overall_header.html -->
<form id="confirm" action="{S_CONFIRM_ACTION}" method="post">
<div class="panel">
{S_FORM_TOKEN}
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<div class="content">
@@ -18,16 +45,16 @@
</dl>
<!-- ENDIF -->
- <!-- IF not S_APPROVE -->
+ <!-- IF not S_APPROVE and not S_RESTORE and .reason -->
<dl class="fields2 nobg">
- <dt><label>{L_DISAPPROVE_REASON}:</label></dt>
+ <dt><label>{L_DISAPPROVE_REASON}{L_COLON}</label></dt>
<dd><select name="reason_id">
<!-- BEGIN reason --><option value="{reason.ID}"<!-- IF reason.S_SELECTED --> selected="selected"<!-- ENDIF -->>{reason.DESCRIPTION}</option><!-- END reason -->
</select>
</dd>
</dl>
<dl class="fields2 nobg">
- <dt><label for="reason">{L_MORE_INFO}:</label><br /><span>{L_CAN_LEAVE_BLANK}</span></dt>
+ <dt><label for="reason">{L_MORE_INFO}{L_COLON}</label><br /><span>{L_CAN_LEAVE_BLANK}</span></dt>
<dd><textarea class="inputbox" name="reason" id="reason" rows="4" cols="40">{REASON}</textarea></dd>
</dl>
<!-- ENDIF -->
@@ -45,9 +72,10 @@
</div>
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
</form>
-<!-- INCLUDE overall_footer.html --> \ No newline at end of file
+<!-- INCLUDE overall_footer.html -->
+<!-- ENDIF -->
diff --git a/phpBB/styles/prosilver/template/mcp_ban.html b/phpBB/styles/prosilver/template/mcp_ban.html
index 460c95e2a1..591dbf8076 100644
--- a/phpBB/styles/prosilver/template/mcp_ban.html
+++ b/phpBB/styles/prosilver/template/mcp_ban.html
@@ -36,35 +36,35 @@
<h2>{L_TITLE}</h2>
<div class="panel">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<h3>{L_TITLE}</h3>
<p>{L_EXPLAIN}</p>
<fieldset>
<dl>
- <dt><label for="ban">{L_BAN_CELL}:</label></dt>
+ <dt><label for="ban">{L_BAN_CELL}{L_COLON}</label></dt>
<dd><label for="ban"><textarea name="ban" id="ban" class="inputbox" cols="40" rows="3">{BAN_QUANTIFIER}</textarea></label></dd>
<!-- IF S_USERNAME_BAN --><dd><strong><a href="{U_FIND_USERNAME}" onclick="find_username(this.href); return false;">{L_FIND_USERNAME}</a></strong></dd><!-- ENDIF -->
</dl>
<dl>
- <dt><label for="banlength">{L_BAN_LENGTH}:</label></dt>
+ <dt><label for="banlength">{L_BAN_LENGTH}{L_COLON}</label></dt>
<dd><label for="banlength"><select name="banlength" id="banlength" onchange="if(this.value==-1){document.getElementById('banlengthother').style.display = 'block';}else{document.getElementById('banlengthother').style.display='none';}">{S_BAN_END_OPTIONS}</select></label></dd>
<dd id="banlengthother" style="display: none;"><label><input type="text" name="banlengthother" class="inputbox" /><br /><span>{L_YEAR_MONTH_DAY}</span></label></dd>
</dl>
<dl>
- <dt><label for="banreason">{L_BAN_REASON}:</label></dt>
+ <dt><label for="banreason">{L_BAN_REASON}{L_COLON}</label></dt>
<dd><input name="banreason" id="banreason" type="text" class="inputbox" maxlength="255" /></dd>
</dl>
<dl>
- <dt><label for="bangivereason">{L_BAN_GIVE_REASON}:</label></dt>
+ <dt><label for="bangivereason">{L_BAN_GIVE_REASON}{L_COLON}</label></dt>
<dd><input name="bangivereason" id="bangivereason" type="text" class="inputbox" maxlength="255" /></dd>
</dl>
<hr />
<dl>
- <dt><label for="banexclude0">{L_BAN_EXCLUDE}:</label><br /><span>{L_BAN_EXCLUDE_EXPLAIN}</span></dt>
+ <dt><label for="banexclude0">{L_BAN_EXCLUDE}{L_COLON}</label><br /><span>{L_BAN_EXCLUDE_EXPLAIN}</span></dt>
<dd>
<label for="banexclude1"><input type="radio" name="banexclude" id="banexclude1" value="1" /> {L_YES}</label>
<label for="banexclude0"><input type="radio" name="banexclude" id="banexclude0" value="0" checked="checked" /> {L_NO}</label>
@@ -72,7 +72,7 @@
</dl>
</fieldset>
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
<fieldset class="submit-buttons">
@@ -82,7 +82,7 @@
</fieldset>
<div class="panel">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<h3>{L_UNBAN_TITLE}</h3>
<p>{L_UNBAN_EXPLAIN}</p>
@@ -90,24 +90,24 @@
<!-- IF S_BANNED_OPTIONS -->
<fieldset>
<dl>
- <dt><label for="unban">{L_BAN_CELL}:</label></dt>
+ <dt><label for="unban">{L_BAN_CELL}{L_COLON}</label></dt>
<dd><select name="unban[]" id="unban" multiple="multiple" size="5" onchange="if (this.selectedIndex != -1) {display_details(this.options[this.selectedIndex].value);}">{BANNED_OPTIONS}</select></dd>
</dl>
<dl>
- <dt>{L_BAN_LENGTH}:</dt>
+ <dt>{L_BAN_LENGTH}{L_COLON}</dt>
<dd><strong id="unbanlength"></strong></dd>
</dl>
<dl>
- <dt>{L_BAN_REASON}:</dt>
+ <dt>{L_BAN_REASON}{L_COLON}</dt>
<dd><strong id="unbanreason"></strong></dd>
</dl>
<dl>
- <dt>{L_BAN_GIVE_REASON}:</dt>
+ <dt>{L_BAN_GIVE_REASON}{L_COLON}</dt>
<dd><strong id="unbangivereason"></strong></dd>
</dl>
</fieldset>
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
<fieldset class="submit-buttons">
@@ -119,10 +119,10 @@
<p><strong>{L_NO_BAN_CELL}</strong></p>
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
<!-- ENDIF -->
</form>
-<!-- INCLUDE mcp_footer.html --> \ No newline at end of file
+<!-- INCLUDE mcp_footer.html -->
diff --git a/phpBB/styles/prosilver/template/mcp_footer.html b/phpBB/styles/prosilver/template/mcp_footer.html
index 5a48d95f23..e5768bdc6b 100644
--- a/phpBB/styles/prosilver/template/mcp_footer.html
+++ b/phpBB/styles/prosilver/template/mcp_footer.html
@@ -6,4 +6,4 @@
<span class="corners-bottom"><span></span></span></div>
</div>
-<!-- INCLUDE overall_footer.html --> \ No newline at end of file
+<!-- INCLUDE overall_footer.html -->
diff --git a/phpBB/styles/prosilver/template/mcp_forum.html b/phpBB/styles/prosilver/template/mcp_forum.html
index 2c98f7c9fa..4a8c4c5de9 100644
--- a/phpBB/styles/prosilver/template/mcp_forum.html
+++ b/phpBB/styles/prosilver/template/mcp_forum.html
@@ -3,47 +3,79 @@
<!-- DEFINE $CUSTOM_FIELDSET_CLASS = 'forum-selection2' -->
<!-- INCLUDE jumpbox.html -->
-<h2><a href="{U_VIEW_FORUM}">{L_FORUM}: {FORUM_NAME}</a></h2>
+<h2><a href="{U_VIEW_FORUM}">{L_FORUM}{L_COLON} {FORUM_NAME}</a></h2>
<form method="post" id="mcp" action="{S_MCP_ACTION}">
<div class="panel">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
- <!-- IF PAGINATION or TOTAL_TOPICS -->
+ <!-- IF .pagination or TOTAL_TOPICS -->
<ul class="linklist">
<li class="rightside pagination">
- <!-- IF TOTAL_TOPICS --> {TOTAL_TOPICS}<!-- ENDIF -->
- <!-- IF PAGE_NUMBER --><!-- IF PAGINATION --> &bull; <a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{PAGE_NUMBER}</a> &bull; <span>{PAGINATION}</span><!-- ELSE --> &bull; {PAGE_NUMBER}<!-- ENDIF --><!-- ENDIF -->
+ <!-- IF TOTAL_TOPICS --> {TOTAL_TOPICS} &bull; <!-- ENDIF -->
+ <!-- IF .pagination -->
+ <!-- INCLUDE pagination.html -->
+ <!-- ELSE -->
+ {PAGE_NUMBER}
+ <!-- ENDIF -->
</li>
</ul>
<!-- ENDIF -->
<!-- IF .topicrow -->
- <ul class="topiclist">
+ <ul class="topiclist<!-- IF S_MERGE_SELECT --> missing-column<!-- ENDIF -->">
<li class="header">
<dl class="icon">
- <dt>{L_TOPICS}</dt>
+ <dt><div class="list-inner">{L_TOPICS}</div></dt>
<dd class="posts">{L_REPLIES}</dd>
<dd class="lastpost"><span>{L_LAST_POST}</span></dd>
<!-- IF not S_MERGE_SELECT --><dd class="mark">{L_MARK}</dd><!-- ENDIF -->
</dl>
</li>
</ul>
- <ul class="topiclist cplist">
+ <ul class="topiclist cplist<!-- IF S_MERGE_SELECT --> missing-column<!-- ENDIF -->">
<!-- BEGIN topicrow -->
<li class="row<!-- IF topicrow.S_ROW_COUNT is odd --> bg1<!-- ELSE --> bg2<!-- ENDIF --><!-- IF topicrow.S_TOPIC_REPORTED --> reported<!-- ENDIF -->">
- <dl class="icon" style="background-image: url({topicrow.TOPIC_FOLDER_IMG_SRC}); background-repeat: no-repeat;">
+ <dl class="icon {topicrow.TOPIC_IMG_STYLE}">
<dt <!-- IF topicrow.TOPIC_ICON_IMG -->style="background-image: url({T_ICONS_PATH}{topicrow.TOPIC_ICON_IMG}); background-repeat: no-repeat;"<!-- ENDIF -->>
+ <!-- IF topicrow.S_UNREAD_TOPIC --><a href="{topicrow.U_NEWEST_POST}" class="icon-link"></a><!-- ENDIF -->
+ <div class="list-inner">
+
<!-- IF topicrow.S_SELECT_TOPIC --><a href="{topicrow.U_SELECT_TOPIC}" class="topictitle">[ {L_SELECT_MERGE} ]</a>&nbsp;&nbsp; <!-- ENDIF -->
<a href="{topicrow.U_VIEW_TOPIC}" class="topictitle">{topicrow.TOPIC_TITLE}</a>
<!-- IF topicrow.S_TOPIC_UNAPPROVED or topicrow.S_POSTS_UNAPPROVED --><a href="{topicrow.U_MCP_QUEUE}">{topicrow.UNAPPROVED_IMG}</a> <!-- ENDIF -->
+ <!-- IF topicrow.S_TOPIC_DELETED or topicrow.S_POSTS_DELETED --><a href="{topicrow.U_MCP_QUEUE}">{topicrow.DELETED_IMG}</a> <!-- ENDIF -->
<!-- IF topicrow.S_TOPIC_REPORTED --><a href="{topicrow.U_MCP_REPORT}">{REPORTED_IMG}</a><!-- ENDIF -->
<!-- IF topicrow.S_MOVED_TOPIC and S_CAN_DELETE -->&nbsp;<a href="{topicrow.U_DELETE_TOPIC}" class="topictitle">[ {L_DELETE_SHADOW_TOPIC} ]</a><!-- ENDIF -->
<br />
- <!-- IF topicrow.PAGINATION --><strong class="pagination"><span>{topicrow.PAGINATION}</span></strong><!-- ENDIF -->
- <!-- IF topicrow.ATTACH_ICON_IMG -->{topicrow.ATTACH_ICON_IMG} <!-- ENDIF -->{L_POST_BY_AUTHOR} {topicrow.TOPIC_AUTHOR_FULL} &raquo; {topicrow.FIRST_POST_TIME} </dt>
+ <!-- IF .topicrow.pagination -->
+ <div class="pagination">
+ <ul>
+ <!-- BEGIN pagination -->
+ <!-- IF topicrow.pagination.S_IS_PREV -->
+ <!-- ELSEIF topicrow.pagination.S_IS_CURRENT --><li class="active"><span>{topicrow.pagination.PAGE_NUMBER}</span></li>
+ <!-- ELSEIF topicrow.pagination.S_IS_ELLIPSIS --><li class="ellipsis"><span>{L_ELLIPSIS}</span></li>
+ <!-- ELSEIF topicrow.pagination.S_IS_NEXT -->
+ <!-- ELSE --><li><a href="{topicrow.pagination.PAGE_URL}">{topicrow.pagination.PAGE_NUMBER}</a></li>
+ <!-- ENDIF -->
+ <!-- END pagination -->
+ </ul>
+ </div>
+ <!-- ENDIF -->
+ <div class="responsive-hide">
+ <!-- IF topicrow.ATTACH_ICON_IMG -->{topicrow.ATTACH_ICON_IMG} <!-- ENDIF -->
+ {L_POST_BY_AUTHOR} {topicrow.TOPIC_AUTHOR_FULL} &raquo; {topicrow.FIRST_POST_TIME}
+ </div>
+ <div class="responsive-show" style="display: none;">
+ <!-- IF topicrow.ATTACH_ICON_IMG -->{topicrow.ATTACH_ICON_IMG} <!-- ENDIF -->
+ {L_LAST_POST} {L_POST_BY_AUTHOR} {topicrow.LAST_POST_AUTHOR_FULL} &laquo; {topicrow.LAST_POST_TIME}<br />
+ {L_REPLIES}{L_COLON} <strong>{topicrow.REPLIES}</strong>
+ </div>
+
+ </div>
+ </dt>
<dd class="posts">{topicrow.REPLIES} <dfn>{L_REPLIES}</dfn></dd>
<dd class="lastpost"><span><dfn>{L_LAST_POST} </dfn>{L_POST_BY_AUTHOR} {topicrow.LAST_POST_AUTHOR_FULL}<br />{topicrow.LAST_POST_TIME}</span>
</dd>
@@ -63,25 +95,30 @@
<!-- ENDIF -->
<fieldset class="display-options">
- <!-- IF NEXT_PAGE --><a href="{NEXT_PAGE}" class="right-box {S_CONTENT_FLOW_END}">{L_NEXT}</a><!-- ENDIF -->
- <!-- IF PREVIOUS_PAGE --><a href="{PREVIOUS_PAGE}" class="left-box {S_CONTENT_FLOW_BEGIN}">{L_PREVIOUS}</a><!-- ENDIF -->
- <label>{L_DISPLAY_TOPICS}: {S_SELECT_SORT_DAYS}</label>
+ <!-- IF U_NEXT_PAGE --><a href="{U_NEXT_PAGE}" class="right-box arrow-{S_CONTENT_FLOW_END}">{L_NEXT}</a><!-- ENDIF -->
+ <!-- IF U_PREVIOUS_PAGE --><a href="{U_PREVIOUS_PAGE}" class="left-box arrow-{S_CONTENT_FLOW_BEGIN}">{L_PREVIOUS}</a><!-- ENDIF -->
+ <label>{L_DISPLAY_TOPICS}{L_COLON} {S_SELECT_SORT_DAYS}</label>
<label>{L_SORT_BY} {S_SELECT_SORT_KEY}</label>
- <label>{S_SELECT_SORT_DIR} <input type="submit" name="sort" value="{L_GO}" class="button2" /></label>
+ <label>{S_SELECT_SORT_DIR}</label>
+ <input type="submit" name="sort" value="{L_GO}" class="button2" />
</fieldset>
<hr />
- <!-- IF PAGINATION or TOTAL_TOPICS -->
+ <!-- IF .pagination or TOTAL_TOPICS -->
<ul class="linklist">
<li class="rightside pagination">
- <!-- IF TOTAL_TOPICS --> {TOTAL_TOPICS}<!-- ENDIF -->
- <!-- IF PAGE_NUMBER --><!-- IF PAGINATION --> &bull; <a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{PAGE_NUMBER}</a> &bull; <span>{PAGINATION}</span><!-- ELSE --> &bull; {PAGE_NUMBER}<!-- ENDIF --><!-- ENDIF -->
+ <!-- IF TOTAL_TOPICS --> {TOTAL_TOPICS} &bull; <!-- ENDIF -->
+ <!-- IF .pagination -->
+ <!-- INCLUDE pagination.html -->
+ <!-- ELSE -->
+ {PAGE_NUMBER}
+ <!-- ENDIF -->
</li>
</ul>
<!-- ENDIF -->
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
<fieldset class="display-actions">
@@ -89,6 +126,7 @@
<select name="action">
<option value="" selected="selected">{L_SELECT_ACTION}</option>
<!-- IF S_CAN_DELETE --><option value="delete_topic">{L_DELETE}</option><!-- ENDIF -->
+ <!-- IF S_CAN_RESTORE --><option value="restore_topic">{L_RESTORE}</option><!-- ENDIF -->
<!-- IF S_CAN_MERGE --><option value="merge_topics">{L_MERGE}</option><!-- ENDIF -->
<!-- IF S_CAN_MOVE --><option value="move">{L_MOVE}</option><!-- ENDIF -->
<!-- IF S_CAN_FORK --><option value="fork">{L_FORK}</option><!-- ENDIF -->
@@ -108,4 +146,4 @@
</fieldset>
</form>
-<!-- INCLUDE mcp_footer.html --> \ No newline at end of file
+<!-- INCLUDE mcp_footer.html -->
diff --git a/phpBB/styles/prosilver/template/mcp_front.html b/phpBB/styles/prosilver/template/mcp_front.html
index 89ab753f12..44295611cf 100644
--- a/phpBB/styles/prosilver/template/mcp_front.html
+++ b/phpBB/styles/prosilver/template/mcp_front.html
@@ -7,32 +7,34 @@
<form id="mcp_queue" method="post" action="{S_MCP_QUEUE_ACTION}">
<div class="panel">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<h3>{L_LATEST_UNAPPROVED}</h3>
- <!-- IF S_HAS_UNAPPROVED_POSTS --><p>{L_UNAPPROVED_TOTAL}</p><!-- ENDIF -->
+ <p>{L_UNAPPROVED_TOTAL}</p>
<!-- IF .unapproved -->
- <ul class="topiclist">
+ <ul class="topiclist missing-column">
<li class="header">
<dl>
- <dt>{L_VIEW_DETAILS}</dt>
+ <dt><div class="list-inner">{L_VIEW_DETAILS}</div></dt>
<dd class="moderation"><span>{L_TOPIC} &amp; {L_FORUM}</span></dd>
</dl>
</li>
</ul>
- <ul class="topiclist cplist">
+ <ul class="topiclist cplist missing-column responsive-show-all">
<!-- BEGIN unapproved -->
<li class="row<!-- IF unapproved.S_ROW_COUNT is odd --> bg1<!-- ELSE --> bg2<!-- ENDIF -->">
<dl>
<dt>
- <a href="{unapproved.U_POST_DETAILS}" class="topictitle">{unapproved.SUBJECT}</a> {unapproved.ATTACH_ICON_IMG}<br />
- {L_POSTED} {L_POST_BY_AUTHOR} {unapproved.AUTHOR_FULL} &raquo; {unapproved.POST_TIME}
+ <div class="list-inner">
+ <a href="{unapproved.U_POST_DETAILS}" class="topictitle">{unapproved.SUBJECT}</a> {unapproved.ATTACH_ICON_IMG}<br />
+ {L_POSTED} {L_POST_BY_AUTHOR} {unapproved.AUTHOR_FULL} &raquo; {unapproved.POST_TIME}
+ </div>
</dt>
<dd class="moderation"><span>
- {L_TOPIC}: <a href="{unapproved.U_TOPIC}">{unapproved.TOPIC_TITLE}</a> [<a href="{unapproved.U_MCP_TOPIC}">{L_MODERATE}</a>]<br />
- {L_FORUM}: <!-- IF unapproved.U_FORUM --><a href="{unapproved.U_FORUM}">{unapproved.FORUM_NAME}</a><!-- ELSE -->{unapproved.FORUM_NAME}<!-- ENDIF --><!-- IF unapproved.U_MCP_FORUM --> [<a href="{unapproved.U_MCP_FORUM}">{L_MODERATE}</a>]<!-- ENDIF --></span>
+ {L_TOPIC}{L_COLON} <a href="{unapproved.U_TOPIC}">{unapproved.TOPIC_TITLE}</a> [<a href="{unapproved.U_MCP_TOPIC}">{L_MODERATE}</a>]<br />
+ {L_FORUM}{L_COLON} <!-- IF unapproved.U_FORUM --><a href="{unapproved.U_FORUM}">{unapproved.FORUM_NAME}</a><!-- ELSE -->{unapproved.FORUM_NAME}<!-- ENDIF --><!-- IF unapproved.U_MCP_FORUM --> [<a href="{unapproved.U_MCP_FORUM}">{L_MODERATE}</a>]<!-- ENDIF --></span>
</dd>
<dd class="mark"><input type="checkbox" name="post_id_list[]" value="{unapproved.POST_ID}" /></dd>
@@ -40,11 +42,9 @@
</li>
<!-- END unapproved -->
</ul>
- <!-- ELSE -->
- <p>{L_UNAPPROVED_POSTS_ZERO_TOTAL}</p>
<!-- ENDIF -->
- <span class="corners-bottom"><span></span></span></div>
+ </div>
{S_FORM_TOKEN}
</div>
@@ -61,70 +61,72 @@
<!-- IF S_SHOW_REPORTS -->
<div class="panel">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<h3>{L_LATEST_REPORTED}</h3>
- <!-- IF S_HAS_REPORTS --><p>{L_REPORTS_TOTAL}</p><!-- ENDIF -->
+ <p>{L_REPORTS_TOTAL}</p>
<!-- IF .report -->
- <ul class="topiclist">
+ <ul class="topiclist two-long-columns">
<li class="header">
<dl>
- <dt>{L_VIEW_DETAILS}</dt>
+ <dt><div class="list-inner">{L_VIEW_DETAILS}</div></dt>
<dd class="moderation"><span>{L_REPORTER} &amp; {L_FORUM}</span></dd>
</dl>
</li>
</ul>
- <ul class="topiclist cplist">
+ <ul class="topiclist cplist two-long-columns responsive-show-all">
<!-- BEGIN report -->
<li class="row<!-- IF report.S_ROW_COUNT is odd --> bg1<!-- ELSE --> bg2<!-- ENDIF -->">
<dl>
<dt>
- <a href="{report.U_POST_DETAILS}#reports" class="topictitle">{report.SUBJECT}</a> {report.ATTACH_ICON_IMG}<br />
- <span>{L_POSTED} {L_POST_BY_AUTHOR} {report.AUTHOR_FULL} &raquo; {report.POST_TIME}</span>
+ <div class="list-inner">
+ <a href="{report.U_POST_DETAILS}#reports" class="topictitle">{report.SUBJECT}</a> {report.ATTACH_ICON_IMG}<br />
+ <span>{L_POSTED} {L_POST_BY_AUTHOR} {report.AUTHOR_FULL} &raquo; {report.POST_TIME}</span>
+ </div>
</dt>
<dd class="moderation">
<span>{L_REPORTED} {L_POST_BY_AUTHOR} {report.REPORTER_FULL} {L_REPORTED_ON_DATE} {report.REPORT_TIME}<br />
- {L_FORUM}: <a href="{report.U_FORUM}">{report.FORUM_NAME}</a></span>
+ {L_FORUM}{L_COLON} <a href="{report.U_FORUM}">{report.FORUM_NAME}</a></span>
</dd>
</dl>
</li>
<!-- END report -->
</ul>
- <!-- ELSE -->
- <p>{L_REPORTS_ZERO_TOTAL}</p>
<!-- ENDIF -->
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
<!-- ENDIF -->
<!-- IF S_SHOW_PM_REPORTS -->
<div class="panel">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<h3>{L_LATEST_REPORTED_PMS}</h3>
- <!-- IF S_HAS_PM_REPORTS --><p>{L_PM_REPORTS_TOTAL}</p><!-- ENDIF -->
+ <p>{L_PM_REPORTS_TOTAL}</p>
<!-- IF .pm_report -->
- <ul class="topiclist">
+ <ul class="topiclist two-long-columns">
<li class="header">
<dl>
- <dt>{L_VIEW_DETAILS}</dt>
+ <dt><div class="list-inner">{L_VIEW_DETAILS}</div></dt>
<dd class="moderation"><span>{L_REPORTER}</span></dd>
</dl>
</li>
</ul>
- <ul class="topiclist cplist">
+ <ul class="topiclist cplist two-long-columns responsive-show-all">
<!-- BEGIN pm_report -->
<li class="row<!-- IF pm_report.S_ROW_COUNT is odd --> bg1<!-- ELSE --> bg2<!-- ENDIF -->">
<dl>
<dt>
- <a href="{pm_report.U_PM_DETAILS}" class="topictitle">{pm_report.PM_SUBJECT}</a> {pm_report.ATTACH_ICON_IMG}<br />
- <span>{L_MESSAGE_BY_AUTHOR} {pm_report.PM_AUTHOR_FULL} &raquo; {pm_report.PM_TIME}</span><br />
- <span>{L_MESSAGE_TO} {pm_report.RECIPIENTS}</span>
+ <div class="list-inner">
+ <a href="{pm_report.U_PM_DETAILS}" class="topictitle">{pm_report.PM_SUBJECT}</a> {pm_report.ATTACH_ICON_IMG}<br />
+ <span>{L_MESSAGE_BY_AUTHOR} {pm_report.PM_AUTHOR_FULL} &raquo; {pm_report.PM_TIME}</span><br />
+ <span>{L_MESSAGE_TO} {pm_report.RECIPIENTS}</span>
+ </div>
</dt>
<dd class="moderation">
<span>{L_REPORTED} {L_POST_BY_AUTHOR} {pm_report.REPORTER_FULL} {L_REPORTED_ON_DATE} {pm_report.REPORT_TIME}</span>
@@ -133,21 +135,19 @@
</li>
<!-- END pm_report -->
</ul>
- <!-- ELSE -->
- <p>{L_PM_REPORTS_ZERO_TOTAL}</p>
<!-- ENDIF -->
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
<!-- ENDIF -->
<!-- IF S_SHOW_LOGS -->
<div class="panel">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<h3>{L_LATEST_LOGS}</h3>
- <table class="table1" cellspacing="0">
+ <table class="table1">
<thead>
<tr>
<th class="name">{L_ACTION}</th>
@@ -176,8 +176,8 @@
</tbody>
</table>
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
<!-- ENDIF -->
-<!-- INCLUDE mcp_footer.html --> \ No newline at end of file
+<!-- INCLUDE mcp_footer.html -->
diff --git a/phpBB/styles/prosilver/template/mcp_header.html b/phpBB/styles/prosilver/template/mcp_header.html
index 13cc7e12cf..2b2105e770 100644
--- a/phpBB/styles/prosilver/template/mcp_header.html
+++ b/phpBB/styles/prosilver/template/mcp_header.html
@@ -3,10 +3,8 @@
<h2>{L_MCP}</h2>
<!-- IF U_MCP -->
- <p class="linkmcp">
- [ <a href="{U_MCP}">{L_MCP}</a><!-- IF U_MCP_FORUM --> | <a href="{U_MCP_FORUM}">{L_MODERATE_FORUM}</a><!-- ENDIF -->
- <!-- IF U_MCP_TOPIC --> | <a href="{U_MCP_TOPIC}">{L_MODERATE_TOPIC}</a><!-- ENDIF -->
- <!-- IF U_MCP_POST --> | <a href="{U_MCP_POST}">{L_MODERATE_POST}</a><!-- ENDIF --> ]
+ <p class="linkmcp responsive-center">
+ [<!-- IF U_ACP -->&nbsp;<a href="{U_ACP}" title="{L_ACP}" data-responsive-text="{L_ACP_SHORT}">{L_ACP}</a>&nbsp;|<!-- ENDIF -->&nbsp;<a href="{U_MCP}" title="{L_MCP}" data-responsive-text="{L_MCP_SHORT}">{L_MCP}</a><!-- IF U_MCP_FORUM -->&nbsp;|&nbsp;<a href="{U_MCP_FORUM}">{L_MODERATE_FORUM}</a><!-- ENDIF --><!-- IF U_MCP_TOPIC -->&nbsp;|&nbsp;<a href="{U_MCP_TOPIC}">{L_MODERATE_TOPIC}</a><!-- ENDIF --><!-- IF U_MCP_POST -->&nbsp;|&nbsp;<a href="{U_MCP_POST}">{L_MODERATE_POST}</a><!-- ENDIF -->&nbsp;]
</p>
<!-- ENDIF -->
@@ -19,7 +17,7 @@
</div>
<div class="panel bg3">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<div style="width: 100%;">
@@ -41,7 +39,7 @@
</div>
</div>
- <div id="cp-main" class="mcp-main">
+ <div id="cp-main" class="mcp-main panel-container">
<!-- IF MESSAGE -->
<div class="content">
<h2>{L_MESSAGE}</h2>
@@ -49,19 +47,3 @@
<p><!-- BEGIN return_links -->{return_links.MESSAGE_LINK}<br /><br /><!-- END return_links --></p>
</div>
<!-- ENDIF -->
-
- <!-- IF CONFIRM_MESSAGE -->
- <form id="confirm" method="post" action="{S_CONFIRM_ACTION}"{S_FORM_ENCTYPE}>
-
- <div class="content">
- <h2>{L_PLEASE_CONFIRM}</h2>
- <p>{CONFIRM_MESSAGE}</p>
-
- <fieldset class="submit-buttons">
- {S_HIDDEN_FIELDS}<input class="button1" type="submit" name="submit" value="{L_YES}" />&nbsp;
- <input class="button2" type="cancel" value="{L_NO}" />
- </fieldset>
- </div>
-
- </form>
- <!-- ENDIF -->
diff --git a/phpBB/styles/prosilver/template/mcp_logs.html b/phpBB/styles/prosilver/template/mcp_logs.html
index 494f63cb1b..b930bbbcc6 100644
--- a/phpBB/styles/prosilver/template/mcp_logs.html
+++ b/phpBB/styles/prosilver/template/mcp_logs.html
@@ -5,19 +5,23 @@
<form method="post" id="mcp" action="{U_POST_ACTION}">
<div class="panel">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<ul class="linklist">
<li class="leftside">
- {L_SEARCH_KEYWORDS}: <input type="text" class="inputbox autowidth" name="keywords" value="{S_KEYWORDS}" />&nbsp;<input type="submit" class="button2" name="filter" value="{L_SEARCH}" />
+ {L_SEARCH_KEYWORDS}{L_COLON} <input type="search" class="inputbox autowidth" name="keywords" value="{S_KEYWORDS}" />&nbsp;<input type="submit" class="button2" name="filter" value="{L_SEARCH}" />
</li>
<li class="rightside pagination">
- <!-- IF TOTAL -->{TOTAL} <!-- ENDIF -->
- <!-- IF PAGE_NUMBER --><!-- IF PAGINATION --> &bull; <a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{PAGE_NUMBER}</a> &bull; <span>{PAGINATION}</span><!-- ELSE --> &bull; {PAGE_NUMBER}<!-- ENDIF --><!-- ENDIF -->
+ <!-- IF TOTAL -->{TOTAL} &bull; <!-- ENDIF -->
+ <!-- IF .pagination -->
+ <!-- INCLUDE pagination.html -->
+ <!-- ELSE -->
+ {PAGE_NUMBER}
+ <!-- ENDIF -->
</li>
</ul>
- <table cellspacing="1" class="table1">
+ <table class="table1">
<thead>
<tr>
<th>{L_USERNAME}</th>
@@ -50,9 +54,9 @@
<!-- IF .log -->
<fieldset class="display-options">
- <!-- IF NEXT_PAGE --><a href="{NEXT_PAGE}" class="right-box {S_CONTENT_FLOW_END}">{L_NEXT}</a><!-- ENDIF -->
- <!-- IF PREVIOUS_PAGE --><a href="{PREVIOUS_PAGE}" class="left-box {S_CONTENT_FLOW_BEGIN}">{L_PREVIOUS}</a><!-- ENDIF -->
- <label>{L_DISPLAY_POSTS}: {S_SELECT_SORT_DAYS}</label>
+ <!-- IF U_NEXT_PAGE --><a href="{U_NEXT_PAGE}" class="right-box arrow-{S_CONTENT_FLOW_END}">{L_NEXT}</a><!-- ENDIF -->
+ <!-- IF U_PREVIOUS_PAGE --><a href="{U_PREVIOUS_PAGE}" class="left-box arrow-{S_CONTENT_FLOW_BEGIN}">{L_PREVIOUS}</a><!-- ENDIF -->
+ <label>{L_DISPLAY_POSTS}{L_COLON} {S_SELECT_SORT_DAYS}</label>
<label>{L_SORT_BY} {S_SELECT_SORT_KEY}</label>
<label>{S_SELECT_SORT_DIR}</label>
<input type="submit" name="sort" value="{L_GO}" class="button2" />
@@ -62,12 +66,16 @@
<ul class="linklist">
<li class="rightside pagination">
- <!-- IF TOTAL -->{TOTAL} <!-- ENDIF -->
- <!-- IF PAGE_NUMBER --><!-- IF PAGINATION --> &bull; <a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{PAGE_NUMBER}</a> &bull; <span>{PAGINATION}</span><!-- ELSE --> &bull; {PAGE_NUMBER}<!-- ENDIF --><!-- ENDIF -->
+ <!-- IF TOTAL -->{TOTAL} &bull; <!-- ENDIF -->
+ <!-- IF .pagination -->
+ <!-- INCLUDE pagination.html -->
+ <!-- ELSE -->
+ {PAGE_NUMBER}
+ <!-- ENDIF -->
</li>
</ul>
{S_FORM_TOKEN}
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
<!-- IF S_CLEAR_ALLOWED -->
@@ -80,11 +88,11 @@
<!-- ENDIF -->
<!-- ELSE -->
{S_FORM_TOKEN}
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
<!-- ENDIF -->
</form>
<br />
-<!-- INCLUDE mcp_footer.html --> \ No newline at end of file
+<!-- INCLUDE mcp_footer.html -->
diff --git a/phpBB/styles/prosilver/template/mcp_message.html b/phpBB/styles/prosilver/template/mcp_message.html
index 1fde48b2cc..7102c658c4 100644
--- a/phpBB/styles/prosilver/template/mcp_message.html
+++ b/phpBB/styles/prosilver/template/mcp_message.html
@@ -5,4 +5,4 @@
<p>{MESSAGE_TEXT}</p>
</div>
-<!-- INCLUDE mcp_footer.html --> \ No newline at end of file
+<!-- INCLUDE mcp_footer.html -->
diff --git a/phpBB/styles/prosilver/template/mcp_move.html b/phpBB/styles/prosilver/template/mcp_move.html
index 804d76b14b..c2ee25f0d9 100644
--- a/phpBB/styles/prosilver/template/mcp_move.html
+++ b/phpBB/styles/prosilver/template/mcp_move.html
@@ -1,9 +1,40 @@
+<!-- IF S_AJAX_REQUEST -->
+
+ <h3>{MESSAGE_TITLE}</h3>
+ <p>{MESSAGE_TEXT}</p>
+
+ <!-- IF ADDITIONAL_MSG --><p>{ADDITIONAL_MSG}</p><!-- ENDIF -->
+
+ <label>
+ <strong>{L_SELECT_DESTINATION_FORUM}{L_COLON}</strong>
+ <select name="to_forum_id">{S_FORUM_SELECT}</select>
+ </label>
+
+ <!-- IF S_CAN_LEAVE_SHADOW -->
+ <label for="move_leave_shadow">
+ <input type="checkbox" name="move_leave_shadow" id="move_leave_shadow" />{L_LEAVE_SHADOW}
+ </label>
+ <!-- ENDIF -->
+
+ <!-- IF S_CAN_LOCK_TOPIC -->
+ <label for="move_lock_topics">
+ <input type="checkbox" name="move_lock_topics" id="move_lock_topics" />{L_LOCK_TOPIC}
+ </label>
+ <!-- ENDIF -->
+
+ <fieldset class="submit-buttons">
+ <input type="button" name="confirm" value="{YES_VALUE}" class="button1" />&nbsp;
+ <input type="button" name="cancel" value="{L_NO}" class="button2" />
+ </fieldset>
+
+<!-- ELSE -->
+
<!-- INCLUDE overall_header.html -->
<form id="confirm" action="{S_CONFIRM_ACTION}" method="post">
<div class="panel">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<div class="content">
<h2>{MESSAGE_TITLE}</h2>
@@ -11,9 +42,10 @@
<fieldset>
<dl class="fields2">
- <dt><label>{L_SELECT_DESTINATION_FORUM}:</label></dt>
+ <dt><label>{L_SELECT_DESTINATION_FORUM}{L_COLON}</label></dt>
<dd><select name="to_forum_id">{S_FORUM_SELECT}</select></dd>
- <!-- IF S_CAN_LEAVE_SHADOW --><dd><label for="move_leave_shadow"><input type="checkbox" name="move_leave_shadow" id="move_leave_shadow" checked="checked" />{L_LEAVE_SHADOW}</label></dd><!-- ENDIF -->
+ <!-- IF S_CAN_LEAVE_SHADOW --><dd><label for="move_leave_shadow"><input type="checkbox" name="move_leave_shadow" id="move_leave_shadow" />{L_LEAVE_SHADOW}</label></dd><!-- ENDIF -->
+ <!-- IF S_CAN_LOCK_TOPIC --><dd><label for="move_lock_topics"><input type="checkbox" name="move_lock_topics" id="move_lock_topics" />{L_LOCK_TOPIC}</label></dd><!-- ENDIF -->
</dl>
<dl class="fields2">
<dt>&nbsp;</dt>
@@ -29,8 +61,9 @@
</div>
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
</form>
-<!-- INCLUDE overall_footer.html --> \ No newline at end of file
+<!-- INCLUDE overall_footer.html -->
+<!-- ENDIF -->
diff --git a/phpBB/styles/prosilver/template/mcp_notes_front.html b/phpBB/styles/prosilver/template/mcp_notes_front.html
index 045a7619ed..db10284bce 100644
--- a/phpBB/styles/prosilver/template/mcp_notes_front.html
+++ b/phpBB/styles/prosilver/template/mcp_notes_front.html
@@ -5,17 +5,17 @@
<h2>{L_TITLE}</h2>
<div class="panel">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<fieldset>
<dl>
- <dt><label for="username">{L_SELECT_USER}:</label></dt>
+ <dt><label for="username">{L_SELECT_USER}{L_COLON}</label></dt>
<dd><input name="username" id="username" type="text" class="inputbox" /></dd>
<dd><strong><a href="{U_FIND_USERNAME}" onclick="find_username(this.href); return false;">{L_FIND_USERNAME}</a></strong></dd>
</dl>
</fieldset>
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
<fieldset class="submit-buttons">
@@ -25,4 +25,4 @@
</fieldset>
</form>
-<!-- INCLUDE mcp_footer.html --> \ No newline at end of file
+<!-- INCLUDE mcp_footer.html -->
diff --git a/phpBB/styles/prosilver/template/mcp_notes_user.html b/phpBB/styles/prosilver/template/mcp_notes_user.html
index 7e92445476..9b6c9b2667 100644
--- a/phpBB/styles/prosilver/template/mcp_notes_user.html
+++ b/phpBB/styles/prosilver/template/mcp_notes_user.html
@@ -5,7 +5,7 @@
<h2>{L_TITLE}</h2>
<div class="panel">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<h3>{USERNAME_FULL}</h3>
@@ -16,20 +16,20 @@
<div class="column2">
<dl class="details">
- <!-- IF RANK_TITLE --><dt>{L_RANK}:</dt><dd>{RANK_TITLE}</dd><!-- ENDIF -->
- <!-- IF RANK_IMG --><dt><!-- IF RANK_TITLE -->&nbsp;<!-- ELSE -->{L_RANK}:<!-- ENDIF --></dt><dd>{RANK_IMG}</dd><!-- ENDIF -->
- <dt>{L_JOINED}:</dt><dd>{JOINED}</dd>
- <dt>{L_TOTAL_POSTS}:</dt><dd>{POSTS}</dd>
- <dt>{L_WARNINGS}: </dt><dd>{WARNINGS}</dd>
+ <!-- IF RANK_TITLE --><dt>{L_RANK}{L_COLON}</dt><dd>{RANK_TITLE}</dd><!-- ENDIF -->
+ <!-- IF RANK_IMG --><dt><!-- IF RANK_TITLE -->&nbsp;<!-- ELSE -->{L_RANK}{L_COLON}<!-- ENDIF --></dt><dd>{RANK_IMG}</dd><!-- ENDIF -->
+ <dt>{L_JOINED}{L_COLON}</dt><dd>{JOINED}</dd>
+ <dt>{L_TOTAL_POSTS}{L_COLON}</dt><dd>{POSTS}</dd>
+ <dt>{L_WARNINGS}{L_COLON} </dt><dd>{WARNINGS}</dd>
</dl>
</div>
</div>
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
<div class="panel">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<h3>{L_ADD_FEEDBACK}</h3>
<p>{L_ADD_FEEDBACK_EXPLAIN}</p>
@@ -38,7 +38,7 @@
<textarea name="usernote" id="usernote" class="inputbox" cols="40" rows="3"></textarea>
</fieldset>
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
<fieldset class="submit-buttons">
@@ -48,19 +48,23 @@
</fieldset>
<div class="panel">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<ul class="linklist">
<li class="leftside">
- {L_SEARCH_KEYWORDS}: <input type="text" class="inputbox autowidth" name="keywords" value="{S_KEYWORDS}" />&nbsp;<input type="submit" class="button2" name="filter" value="{L_SEARCH}" />
+ {L_SEARCH_KEYWORDS}{L_COLON} <input type="search" class="inputbox autowidth" name="keywords" value="{S_KEYWORDS}" />&nbsp;<input type="submit" class="button2" name="filter" value="{L_SEARCH}" />
</li>
<li class="rightside pagination">
- <!-- IF TOTAL_REPORTS -->{TOTAL_REPORTS} <!-- ENDIF -->
- <!-- IF PAGE_NUMBER --><!-- IF PAGINATION --> &bull; <a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{PAGE_NUMBER}</a> &bull; <span>{PAGINATION}</span><!-- ELSE --> &bull; {PAGE_NUMBER}<!-- ENDIF --><!-- ENDIF -->
+ <!-- IF TOTAL_REPORTS -->{TOTAL_REPORTS} &bull; <!-- ENDIF -->
+ <!-- IF .pagination -->
+ <!-- INCLUDE pagination.html -->
+ <!-- ELSE -->
+ {PAGE_NUMBER}
+ <!-- ENDIF -->
</li>
</ul>
- <table cellspacing="1" class="table1">
+ <table class="table1">
<thead>
<tr>
<th>{L_REPORT_BY}</th>
@@ -84,16 +88,16 @@
<tr>
<td class="bg1" colspan="<!-- IF S_CLEAR_ALLOWED -->5<!-- ELSE -->4<!-- ENDIF -->" align="center"><span class="gen">{L_NO_ENTRIES}</span></td>
</tr>
- <!-- END usernames -->
+ <!-- END usernotes -->
</tbody>
</table>
<hr />
<fieldset class="display-options">
- <!-- IF NEXT_PAGE --><a href="{NEXT_PAGE}" class="right-box {S_CONTENT_FLOW_END}">{L_NEXT}</a><!-- ENDIF -->
- <!-- IF PREVIOUS_PAGE --><a href="{PREVIOUS_PAGE}" class="left-box {S_CONTENT_FLOW_BEGIN}">{L_PREVIOUS}</a><!-- ENDIF -->
- <label>{L_DISPLAY_LOG}: {S_SELECT_SORT_DAYS}</label>
+ <!-- IF U_NEXT_PAGE --><a href="{U_NEXT_PAGE}" class="right-box arrow-{S_CONTENT_FLOW_END}">{L_NEXT}</a><!-- ENDIF -->
+ <!-- IF U_PREVIOUS_PAGE --><a href="{U_PREVIOUS_PAGE}" class="left-box arrow-{S_CONTENT_FLOW_BEGIN}">{L_PREVIOUS}</a><!-- ENDIF -->
+ <label>{L_DISPLAY_LOG}{L_COLON} {S_SELECT_SORT_DAYS}</label>
<label>{L_SORT_BY} {S_SELECT_SORT_KEY}</label><label>{S_SELECT_SORT_DIR}</label>
<input type="submit" name="sort" value="{L_GO}" class="button2" />
</fieldset>
@@ -102,12 +106,16 @@
<ul class="linklist">
<li class="rightside pagination">
- <!-- IF TOTAL_REPORTS -->{TOTAL_REPORTS}<!-- ENDIF -->
- <!-- IF PAGE_NUMBER --><!-- IF PAGINATION --> &bull; <a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{PAGE_NUMBER}</a> &bull; <span>{PAGINATION}</span><!-- ELSE --> &bull; {PAGE_NUMBER}<!-- ENDIF --><!-- ENDIF -->
+ <!-- IF TOTAL_REPORTS -->{TOTAL_REPORTS} &bull; <!-- ENDIF -->
+ <!-- IF .pagination -->
+ <!-- INCLUDE pagination.html -->
+ <!-- ELSE -->
+ {PAGE_NUMBER}
+ <!-- ENDIF -->
</li>
</ul>
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
<!-- IF S_CLEAR_ALLOWED -->
@@ -122,4 +130,4 @@
<!-- ENDIF -->
</form>
-<!-- INCLUDE mcp_footer.html --> \ No newline at end of file
+<!-- INCLUDE mcp_footer.html -->
diff --git a/phpBB/styles/prosilver/template/mcp_post.html b/phpBB/styles/prosilver/template/mcp_post.html
index 11f63a3ea2..2b4ebec5c8 100644
--- a/phpBB/styles/prosilver/template/mcp_post.html
+++ b/phpBB/styles/prosilver/template/mcp_post.html
@@ -8,13 +8,13 @@
<!-- ENDIF -->
<div id="report" class="panel">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<div class="postbody">
- <h3>{L_REPORT_REASON}: {REPORT_REASON_TITLE}</h3>
+ <h3>{L_REPORT_REASON}{L_COLON} {REPORT_REASON_TITLE}</h3>
<p class="author">{L_REPORTED} {L_POST_BY_AUTHOR} {REPORTER_FULL} &laquo; {REPORT_DATE}</p>
<!-- IF S_REPORT_CLOSED -->
- <p class="rules">{L_REPORT_CLOSED}</p>
+ <p class="post-notice reported">{L_REPORT_CLOSED}</p>
<!-- ENDIF -->
<div class="content">
<!-- IF REPORT_TEXT -->
@@ -25,7 +25,7 @@
</div>
</div>
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
<form method="post" id="mcp_report" action="{S_CLOSE_ACTION}">
@@ -45,9 +45,11 @@
<!-- ENDIF -->
<div class="panel">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<div class="postbody">
+ <h3><a href="{U_VIEW_POST}">{POST_SUBJECT}</a></h3>
+
<!-- IF U_EDIT -->
<ul class="profile-icons">
<li class="edit-icon"><a href="{U_EDIT}" title="{L_EDIT_POST}"><span>{L_EDIT_POST}</span></a></li>
@@ -56,13 +58,12 @@
<span class="right-box" id="expand"><a href="#post_details" onclick="viewableArea(getElementById('post_details'), true); var rev_text = getElementById('expand').getElementsByTagName('a').item(0).firstChild; if (rev_text.data == '{LA_EXPAND_VIEW}'){rev_text.data = '{LA_COLLAPSE_VIEW}'; } else if (rev_text.data == '{LA_COLLAPSE_VIEW}'){rev_text.data = '{LA_EXPAND_VIEW}'}; return false;">{L_EXPAND_VIEW}</a></span>
- <h3><a href="{U_VIEW_POST}">{POST_SUBJECT}</a></h3>
<!-- IF S_PM -->
<p class="author">
- <strong>{L_SENT_AT}:</strong> {POST_DATE}
- <br /><strong>{L_PM_FROM}:</strong> {POST_AUTHOR_FULL}
- <!-- IF S_TO_RECIPIENT --><br /><strong>{L_TO}:</strong> <!-- BEGIN to_recipient --><!-- IF to_recipient.NAME_FULL -->{to_recipient.NAME_FULL}<!-- ELSE --><a href="{to_recipient.U_VIEW}" style="color:<!-- IF to_recipient.COLOUR -->{to_recipient.COLOUR}<!-- ELSEIF to_recipient.IS_GROUP -->#0000FF<!-- ENDIF -->;">{to_recipient.NAME}</a><!-- ENDIF -->&nbsp;<!-- END to_recipient --><!-- ENDIF -->
- <!-- IF S_BCC_RECIPIENT --><br /><strong>{L_BCC}:</strong> <!-- BEGIN bcc_recipient --><!-- IF bcc_recipient.NAME_FULL -->{bcc_recipient.NAME_FULL}<!-- ELSE --><a href="{bcc_recipient.U_VIEW}" style="color:<!-- IF bcc_recipient.COLOUR -->{bcc_recipient.COLOUR}<!-- ELSEIF bcc_recipient.IS_GROUP -->#0000FF<!-- ENDIF -->;">{bcc_recipient.NAME}</a><!-- ENDIF -->&nbsp;<!-- END bcc_recipient --><!-- ENDIF -->
+ <strong>{L_SENT_AT}{L_COLON}</strong> {POST_DATE}
+ <br /><strong>{L_PM_FROM}{L_COLON}</strong> {POST_AUTHOR_FULL}
+ <!-- IF S_TO_RECIPIENT --><br /><strong>{L_TO}{L_COLON}</strong> <!-- BEGIN to_recipient --><!-- IF to_recipient.NAME_FULL -->{to_recipient.NAME_FULL}<!-- ELSE --><a href="{to_recipient.U_VIEW}" style="color:<!-- IF to_recipient.COLOUR -->{to_recipient.COLOUR}<!-- ELSEIF to_recipient.IS_GROUP -->#0000FF<!-- ENDIF -->;">{to_recipient.NAME}</a><!-- ENDIF -->&nbsp;<!-- END to_recipient --><!-- ENDIF -->
+ <!-- IF S_BCC_RECIPIENT --><br /><strong>{L_BCC}{L_COLON}</strong> <!-- BEGIN bcc_recipient --><!-- IF bcc_recipient.NAME_FULL -->{bcc_recipient.NAME_FULL}<!-- ELSE --><a href="{bcc_recipient.U_VIEW}" style="color:<!-- IF bcc_recipient.COLOUR -->{bcc_recipient.COLOUR}<!-- ELSEIF bcc_recipient.IS_GROUP -->#0000FF<!-- ENDIF -->;">{bcc_recipient.NAME}</a><!-- ENDIF -->&nbsp;<!-- END bcc_recipient --><!-- ENDIF -->
</p>
<!-- ELSE -->
<p class="author">{MINI_POST_IMG} {L_POSTED} {L_POST_BY_AUTHOR} {POST_AUTHOR_FULL} &raquo; {POST_DATE}</p>
@@ -71,7 +72,7 @@
<!-- IF S_POST_UNAPPROVED -->
<form method="post" id="mcp_approve" action="{U_APPROVE_ACTION}">
- <p class="rules">
+ <p class="post-notice unapproved">
<input class="button2" type="submit" value="{L_DISAPPROVE}" name="action[disapprove]" /> &nbsp;
<input class="button1" type="submit" value="{L_APPROVE}" name="action[approve]" />
<!-- IF not S_FIRST_POST --><input type="hidden" name="mode" value="unapproved_posts" /><!-- ENDIF -->
@@ -79,10 +80,21 @@
{S_FORM_TOKEN}
</p>
</form>
+ <!-- ELSEIF S_POST_DELETED -->
+ <form method="post" id="mcp_approve" action="{U_APPROVE_ACTION}">
+
+ <p class="post-notice deleted">
+ <input class="button2" type="submit" value="{L_DELETE}" name="action[disapprove]" /> &nbsp;
+ <input class="button1" type="submit" value="{L_RESTORE}" name="action[restore]" />
+ <!-- IF not S_FIRST_POST --><input type="hidden" name="mode" value="unapproved_posts" /><!-- ENDIF -->
+ <input type="hidden" name="post_id_list[]" value="{POST_ID}" />
+ {S_FORM_TOKEN}
+ </p>
+ </form>
<!-- ENDIF -->
<!-- IF S_MESSAGE_REPORTED -->
- <p class="rules">
+ <p class="post-notice reported">
{REPORTED_IMG} <a href="{U_MCP_REPORT}"><strong>{L_MESSAGE_REPORTED}</strong></a>
</p>
<!-- ENDIF -->
@@ -100,13 +112,20 @@
</dl>
<!-- ENDIF -->
+ <!-- IF DELETED_MESSAGE or DELETE_REASON -->
+ <div class="notice">
+ {DELETED_MESSAGE}
+ <!-- IF DELETE_REASON --><br /><strong>{L_REASON}{L_COLON}</strong> <em>{DELETE_REASON}</em><!-- ENDIF -->
+ </div>
+ <!-- ENDIF -->
+
<!-- IF SIGNATURE -->
<div id="sig{POST_ID}" class="signature">{SIGNATURE}</div>
<!-- ENDIF -->
<!-- IF S_MCP_REPORT and S_CAN_VIEWIP -->
<hr />
- <div><!-- IF S_PM -->{L_THIS_PM_IP}<!-- ELSE -->{L_THIS_POST_IP}<!-- ENDIF -->: <!-- IF U_WHOIS -->
+ <div><!-- IF S_PM -->{L_THIS_PM_IP}<!-- ELSE -->{L_THIS_POST_IP}<!-- ENDIF -->{L_COLON} <!-- IF U_WHOIS -->
<a href="{U_WHOIS}"><!-- IF POST_IPADDR -->{POST_IPADDR}<!-- ELSE -->{POST_IP}<!-- ENDIF --></a> (<!-- IF POST_IPADDR -->{POST_IP}<!-- ELSE --><a href="{U_LOOKUP_IP}">{L_LOOKUP_IP}</a><!-- ENDIF -->)
<!-- ELSE -->
<!-- IF POST_IPADDR -->{POST_IPADDR} ({POST_IP})<!-- ELSE -->{POST_IP}<!-- IF U_LOOKUP_IP --> (<a href="{U_LOOKUP_IP}">{L_LOOKUP_IP}</a>)<!-- ENDIF --><!-- ENDIF -->
@@ -115,12 +134,12 @@
</div>
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
<!-- IF S_CAN_LOCK_POST or S_CAN_DELETE_POST or S_CAN_CHGPOSTER -->
<div class="panel">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<h3>{L_MOD_OPTIONS}</h3>
<!-- IF S_CAN_CHGPOSTER -->
@@ -128,7 +147,7 @@
<fieldset>
<dl>
- <dt><label>{L_CHANGE_POSTER}:</label></dt>
+ <dt><label>{L_CHANGE_POSTER}{L_COLON}</label></dt>
<!-- IF S_USER_SELECT --><dd><select name="u">{S_USER_SELECT}</select> <input type="submit" class="button2" name="action[chgposter_ip]" value="{L_CONFIRM}" /></dd><!-- ENDIF -->
<dd style="margin-top:3px;">
<input class="inputbox autowidth" type="text" name="username" value="" />
@@ -147,7 +166,7 @@
<fieldset>
<dl>
- <dt><label>{L_MOD_OPTIONS}:</label></dt>
+ <dt><label>{L_MOD_OPTIONS}{L_COLON}</label></dt>
<dd><select name="action">
<!-- IF S_CAN_LOCK_POST --><!-- IF S_POST_LOCKED --><option value="unlock_post">{L_UNLOCK_POST} [{L_UNLOCK_POST_EXPLAIN}]</option><!-- ELSE --><option value="lock_post">{L_LOCK_POST} [{L_LOCK_POST_EXPLAIN}]</option><!-- ENDIF --><!-- ENDIF -->
<!-- IF S_CAN_DELETE_POST --><option value="delete_post">{L_DELETE_POST}</option><!-- ENDIF -->
@@ -159,18 +178,18 @@
</form>
<!-- ENDIF -->
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
<!-- ENDIF -->
<!-- IF S_MCP_QUEUE or S_MCP_REPORT or RETURN_TOPIC -->
<div class="panel">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<p><!-- IF S_MCP_QUEUE -->{RETURN_QUEUE} | {RETURN_TOPIC_SIMPLE} | {RETURN_POST}<!-- ELSEIF S_MCP_REPORT -->{RETURN_REPORTS}<!-- IF not S_PM --> | <a href="{U_VIEW_POST}">{L_VIEW_POST}</a> | <a href="{U_VIEW_TOPIC}">{L_VIEW_TOPIC}</a> | <a href="{U_VIEW_FORUM}">{L_VIEW_FORUM}</a><!-- ENDIF --><!-- ELSE -->{RETURN_TOPIC}<!-- ENDIF --></p>
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
<!-- ENDIF -->
@@ -179,7 +198,7 @@
<!-- IF S_SHOW_USER_NOTES -->
<div class="panel" id="usernotes">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<form method="post" id="mcp_notes" action="{U_POST_ACTION}">
@@ -187,7 +206,7 @@
<h3>{L_FEEDBACK}</h3>
<!-- BEGIN usernotes -->
- <span class="small"><strong>{L_REPORTED_BY}: {usernotes.REPORT_BY} &laquo; {usernotes.REPORT_AT}</strong></span>
+ <span class="small"><strong>{L_REPORTED_BY}{L_COLON} {usernotes.REPORT_BY} &laquo; {usernotes.REPORT_AT}</strong></span>
<!-- IF S_CLEAR_ALLOWED --><div class="right-box"><input type="checkbox" name="marknote[]" value="{usernotes.ID}" /></div><!-- ENDIF -->
<div class="postbody">{usernotes.ACTION}</div>
@@ -216,36 +235,36 @@
</fieldset>
</form>
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
<!-- ENDIF -->
<!-- IF S_SHOW_REPORTS -->
<div class="panel" id="reports">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<h3>{L_MCP_POST_REPORTS}</h3>
<!-- BEGIN reports -->
- <span class="small"><strong>{L_REPORTED_BY}: <!-- IF reports.U_REPORTER --><a href="{reports.U_REPORTER}">{reports.REPORTER}</a><!-- ELSE -->{reports.REPORTER}<!-- ENDIF --> &laquo; {reports.REPORT_TIME}</strong></span>
- <p><em>{reports.REASON_TITLE}: {reports.REASON_DESC}</em><!-- IF reports.REPORT_TEXT --><br />{reports.REPORT_TEXT}<!-- ENDIF --></p>
+ <span class="small"><strong>{L_REPORTED_BY}{L_COLON} <!-- IF reports.U_REPORTER --><a href="{reports.U_REPORTER}">{reports.REPORTER}</a><!-- ELSE -->{reports.REPORTER}<!-- ENDIF --> &laquo; {reports.REPORT_TIME}</strong></span>
+ <p><em>{reports.REASON_TITLE}{L_COLON} {reports.REASON_DESC}</em><!-- IF reports.REPORT_TEXT --><br />{reports.REPORT_TEXT}<!-- ENDIF --></p>
<!-- END reports -->
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
<!-- ENDIF -->
<!-- IF S_CAN_VIEWIP and not S_MCP_REPORT -->
<div class="panel" id="ip">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
- <p>{L_THIS_POST_IP}: <!-- IF U_WHOIS -->
+ <p>{L_THIS_POST_IP}{L_COLON} <!-- IF U_WHOIS -->
<a href="{U_WHOIS}"><!-- IF POST_IPADDR -->{POST_IPADDR}<!-- ELSE -->{POST_IP}<!-- ENDIF --></a> (<!-- IF POST_IPADDR -->{POST_IP}<!-- ELSE --><a href="{U_LOOKUP_IP}">{L_LOOKUP_IP}</a><!-- ENDIF -->)
<!-- ELSE -->
<!-- IF POST_IPADDR -->{POST_IPADDR} ({POST_IP})<!-- ELSE -->{POST_IP}<!-- IF U_LOOKUP_IP --> (<a href="{U_LOOKUP_IP}">{L_LOOKUP_IP}</a>)<!-- ENDIF --><!-- ENDIF -->
<!-- ENDIF --></p>
- <table class="table1" cellspacing="1">
+ <table class="table1">
<thead>
<tr>
<th class="name">{L_OTHER_USERS}</th>
@@ -266,7 +285,7 @@
</tbody>
</table>
- <table class="table1" cellspacing="1">
+ <table class="table1">
<thead>
<tr>
<th class="name">{L_IPS_POSTED_FROM}</th>
@@ -289,7 +308,7 @@
<p><a href="{U_LOOKUP_ALL}#ip">{L_LOOKUP_ALL}</a></p>
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
<!-- ENDIF -->
@@ -297,4 +316,4 @@
<!-- IF S_TOPIC_REVIEW --><!-- INCLUDE posting_topic_review.html --><!-- ENDIF -->
-<!-- INCLUDE mcp_footer.html --> \ No newline at end of file
+<!-- INCLUDE mcp_footer.html -->
diff --git a/phpBB/styles/prosilver/template/mcp_queue.html b/phpBB/styles/prosilver/template/mcp_queue.html
index 57fb149257..461d5982db 100644
--- a/phpBB/styles/prosilver/template/mcp_queue.html
+++ b/phpBB/styles/prosilver/template/mcp_queue.html
@@ -3,7 +3,7 @@
<form id="mcp" method="post" action="{S_MCP_ACTION}">
<fieldset class="forum-selection">
- <label for="fo">{L_FORUM}: <select name="f" id="fo">{S_FORUM_OPTIONS}</select></label>
+ <label for="fo">{L_FORUM}{L_COLON} <select name="f" id="fo">{S_FORUM_OPTIONS}</select></label>
<input type="submit" name="sort" value="{L_GO}" class="button2" />
{S_FORM_TOKEN}
</fieldset>
@@ -11,27 +11,31 @@
<h2>{L_TITLE}</h2>
<div class="panel">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<p>{L_EXPLAIN}</p>
<!-- IF .postrow -->
<ul class="linklist">
<li class="rightside pagination">
- <!-- IF TOTAL --> {TOTAL}<!-- ENDIF -->
- <!-- IF PAGE_NUMBER --><!-- IF PAGINATION --> &bull; <a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{PAGE_NUMBER}</a> &bull; <span>{PAGINATION}</span><!-- ELSE --> &bull; {PAGE_NUMBER}<!-- ENDIF --><!-- ENDIF -->
+ <!-- IF TOTAL --> {TOTAL} &bull; <!-- ENDIF -->
+ <!-- IF .pagination -->
+ <!-- INCLUDE pagination.html -->
+ <!-- ELSE -->
+ {PAGE_NUMBER}
+ <!-- ENDIF -->
</li>
</ul>
- <ul class="topiclist">
+ <ul class="topiclist missing-column">
<li class="header">
<dl>
- <dt><!-- IF S_TOPICS -->{L_TOPIC}<!-- ELSE -->{L_POST}<!-- ENDIF --></dt>
+ <dt><div class="list-inner"><!-- IF S_TOPICS -->{L_TOPIC}<!-- ELSE -->{L_POST}<!-- ENDIF --></div></dt>
<dd class="moderation"><span><!-- IF not S_TOPICS -->{L_TOPIC} &amp; <!-- ENDIF -->{L_FORUM}</span></dd>
<dd class="mark">{L_MARK}</dd>
</dl>
</li>
</ul>
- <ul class="topiclist cplist">
+ <ul class="topiclist cplist missing-column responsive-show-all">
<!-- BEGIN postrow -->
@@ -42,18 +46,26 @@
<li class="row<!-- IF postrow.S_ROW_COUNT is odd --> bg1<!-- ELSE --> bg2<!-- ENDIF -->">
<dl>
<dt>
- <a href="{postrow.U_VIEW_DETAILS}" class="topictitle">{postrow.POST_SUBJECT}</a> <br />
- <span>{L_POSTED} {L_POST_BY_AUTHOR} {postrow.POST_AUTHOR_FULL} &raquo; {postrow.POST_TIME}</span>
+ <div class="list-inner">
+ <a href="{postrow.U_VIEW_DETAILS}" class="topictitle">{postrow.POST_SUBJECT}</a> {postrow.ATTACH_ICON_IMG}<br />
+ <span>{L_POSTED} {L_POST_BY_AUTHOR} {postrow.POST_AUTHOR_FULL} &raquo; {postrow.POST_TIME}</span>
+ </div>
</dt>
<dd class="moderation">
<span>
- <!-- IF S_TOPICS --><br /><!-- ELSE -->{L_TOPIC}: <a href="{postrow.U_TOPIC}">{postrow.TOPIC_TITLE}</a> <br /><!-- ENDIF -->
- {L_FORUM}: <a href="{postrow.U_VIEWFORUM}">{postrow.FORUM_NAME}</a>
+ <!-- IF S_TOPICS --><br /><!-- ELSE -->{L_TOPIC}{L_COLON} <a href="{postrow.U_TOPIC}">{postrow.TOPIC_TITLE}</a> <br /><!-- ENDIF -->
+ {L_FORUM}{L_COLON} <a href="{postrow.U_VIEWFORUM}">{postrow.FORUM_NAME}</a>
</span>
</dd>
- <dd class="mark"><input type="checkbox" name="post_id_list[]" value="{postrow.POST_ID}" /></dd>
+ <dd class="mark">
+ <!-- IF S_TOPICS -->
+ <input type="checkbox" name="topic_id_list[]" value="{postrow.TOPIC_ID}" />
+ <!-- ELSE -->
+ <input type="checkbox" name="post_id_list[]" value="{postrow.POST_ID}" />
+ <!-- ENDIF -->
+ </dd>
</dl>
</li>
<!-- ENDIF -->
@@ -61,9 +73,9 @@
</ul>
<fieldset class="display-options">
- <!-- IF NEXT_PAGE --><a href="{NEXT_PAGE}" class="right-box {S_CONTENT_FLOW_END}">{L_NEXT}</a><!-- ENDIF -->
- <!-- IF PREVIOUS_PAGE --><a href="{PREVIOUS_PAGE}" class="left-box {S_CONTENT_FLOW_BEGIN}">{L_PREVIOUS}</a><!-- ENDIF -->
- <label>{L_DISPLAY_POSTS}: {S_SELECT_SORT_DAYS}</label>
+ <!-- IF U_NEXT_PAGE --><a href="{U_NEXT_PAGE}" class="right-box arrow-{S_CONTENT_FLOW_END}">{L_NEXT}</a><!-- ENDIF -->
+ <!-- IF U_PREVIOUS_PAGE --><a href="{U_PREVIOUS_PAGE}" class="left-box arrow-{S_CONTENT_FLOW_BEGIN}">{L_PREVIOUS}</a><!-- ENDIF -->
+ <label>{L_DISPLAY_POSTS}{L_COLON} {S_SELECT_SORT_DAYS}</label>
<label>{L_SORT_BY} {S_SELECT_SORT_KEY}</label><label>{S_SELECT_SORT_DIR}</label>
<!-- IF TOPIC_ID --><label><input type="checkbox" class="radio" name="t" value="{TOPIC_ID}" checked="checked" />&nbsp; <strong>{L_ONLY_TOPIC}</strong></label><!-- ENDIF -->
<input type="submit" name="sort" value="{L_GO}" class="button2" />
@@ -73,24 +85,45 @@
<ul class="linklist">
<li class="rightside pagination">
- <!-- IF TOTAL -->{TOTAL}<!-- ENDIF -->
- <!-- IF PAGE_NUMBER --><!-- IF PAGINATION --> &bull; <a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{PAGE_NUMBER}</a> &bull; <span>{PAGINATION}</span><!-- ELSE --> &bull; {PAGE_NUMBER}<!-- ENDIF --><!-- ENDIF -->
+ <!-- IF TOTAL -->{TOTAL} &bull; <!-- ENDIF -->
+ <!-- IF .pagination -->
+ <!-- INCLUDE pagination.html -->
+ <!-- ELSE -->
+ {PAGE_NUMBER}
+ <!-- ENDIF -->
</li>
</ul>
<!-- ELSE -->
- <p class="notopics"><strong><!-- IF S_TOPICS -->{L_NO_TOPICS_QUEUE}<!-- ELSE -->{L_UNAPPROVED_POSTS_ZERO_TOTAL}<!-- ENDIF --></strong></p>
+ <p class="notopics"><strong>
+ <!-- IF S_RESTORE -->
+ <!-- IF S_TOPICS -->{L_NO_TOPICS_DELETED}<!-- ELSE -->{L_NO_POSTS_DELETED}<!-- ENDIF -->
+ <!-- ELSE -->
+ <!-- IF S_TOPICS -->{L_NO_TOPICS_QUEUE}<!-- ELSE -->{L_NO_POSTS_QUEUE}<!-- ENDIF -->
+ <!-- ENDIF -->
+ </strong></p>
<!-- ENDIF -->
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
<!-- IF .postrow -->
<fieldset class="display-actions">
+ <!-- IF S_RESTORE -->
+ <input class="button2" type="submit" name="action[delete]" value="{L_DELETE}" />&nbsp;
+ <input class="button1" type="submit" name="action[restore]" value="{L_RESTORE}" />
+ <!-- ELSE -->
<input class="button2" type="submit" name="action[disapprove]" value="{L_DISAPPROVE}" />&nbsp;
<input class="button1" type="submit" name="action[approve]" value="{L_APPROVE}" />
- <div><a href="#" onclick="marklist('mcp', 'post_id_list', true); return false;">{L_MARK_ALL}</a> :: <a href="#" onclick="marklist('mcp', 'post_id_list', false); return false;">{L_UNMARK_ALL}</a></div>
+ <!-- ENDIF -->
+ <div>
+ <!-- IF S_TOPICS -->
+ <a href="#" onclick="marklist('mcp', 'topic_id_list', true); return false;">{L_MARK_ALL}</a> :: <a href="#" onclick="marklist('mcp', 'topic_id_list', false); return false;">{L_UNMARK_ALL}</a>
+ <!-- ELSE -->
+ <a href="#" onclick="marklist('mcp', 'post_id_list', true); return false;">{L_MARK_ALL}</a> :: <a href="#" onclick="marklist('mcp', 'post_id_list', false); return false;">{L_UNMARK_ALL}</a>
+ <!-- ENDIF -->
+ </div>
</fieldset>
<!-- ENDIF -->
</form>
-<!-- INCLUDE mcp_footer.html --> \ No newline at end of file
+<!-- INCLUDE mcp_footer.html -->
diff --git a/phpBB/styles/prosilver/template/mcp_reports.html b/phpBB/styles/prosilver/template/mcp_reports.html
index eefb24ee91..ffa82d5e0e 100644
--- a/phpBB/styles/prosilver/template/mcp_reports.html
+++ b/phpBB/styles/prosilver/template/mcp_reports.html
@@ -4,7 +4,7 @@
<!-- IF not S_PM -->
<fieldset class="forum-selection">
- <label for="fo">{L_FORUM}: <select name="f" id="fo">{S_FORUM_OPTIONS}</select></label>
+ <label for="fo">{L_FORUM}{L_COLON} <select name="f" id="fo">{S_FORUM_OPTIONS}</select></label>
<input type="submit" name="sort" value="{L_GO}" class="button2" />
{S_FORM_TOKEN}
</fieldset>
@@ -13,48 +13,63 @@
<h2>{L_TITLE}</h2>
<div class="panel">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<p>{L_EXPLAIN}</p>
<!-- IF .postrow -->
<ul class="linklist">
<li class="rightside pagination">
- <!-- IF TOTAL -->{TOTAL_REPORTS}<!-- ENDIF -->
- <!-- IF PAGE_NUMBER --><!-- IF PAGINATION --> &bull; <a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{PAGE_NUMBER}</a> &bull; <span>{PAGINATION}</span><!-- ELSE --> &bull; {PAGE_NUMBER}<!-- ENDIF --><!-- ENDIF -->
+ <!-- IF TOTAL -->{TOTAL_REPORTS} &bull; <!-- ENDIF -->
+ <!-- IF .pagination -->
+ <!-- INCLUDE pagination.html -->
+ <!-- ELSE -->
+ {PAGE_NUMBER}
+ <!-- ENDIF -->
</li>
</ul>
- <ul class="topiclist">
+ <ul class="topiclist missing-column">
<li class="header">
<dl>
- <dt>{L_VIEW_DETAILS}</dt>
+ <dt><div class="list-inner">{L_VIEW_DETAILS}</div></dt>
<dd class="moderation"><span>{L_REPORTER}<!-- IF not S_PM --> &amp; {L_FORUM}<!-- ENDIF --></span></dd>
<dd class="mark">{L_MARK}</dd>
</dl>
</li>
</ul>
- <ul class="topiclist cplist">
+ <ul class="topiclist cplist missing-column">
<!-- BEGIN postrow -->
<li class="row<!-- IF postrow.S_ROW_COUNT is odd --> bg1<!-- ELSE --> bg2<!-- ENDIF -->">
<dl>
<!-- IF S_PM -->
<dt>
- <a href="{postrow.U_VIEW_DETAILS}" class="topictitle">{postrow.PM_SUBJECT}</a> {postrow.ATTACH_ICON_IMG}<br />
- <span>{L_MESSAGE_BY_AUTHOR} {postrow.PM_AUTHOR_FULL} &raquo; {postrow.PM_TIME}</span><br />
- <span>{L_MESSAGE_TO} {postrow.RECIPIENTS}</span>
+ <div class="list-inner">
+ <a href="{postrow.U_VIEW_DETAILS}" class="topictitle">{postrow.PM_SUBJECT}</a> {postrow.ATTACH_ICON_IMG}<br />
+ <span>{L_MESSAGE_BY_AUTHOR} {postrow.PM_AUTHOR_FULL} &raquo; {postrow.PM_TIME}</span><br />
+ <span>{L_MESSAGE_TO} {postrow.RECIPIENTS}</span>
+ <div class="responsive-show" style="display: none;">
+ {L_REPORTER}{L_COLON} {postrow.REPORTER_FULL} &laquo; {postrow.REPORT_TIME}
+ </div>
+ </div>
</dt>
<dd class="moderation">
<span>{postrow.REPORTER_FULL} &laquo; {postrow.REPORT_TIME}</span>
</dd>
<!-- ELSE -->
<dt>
- <a href="{postrow.U_VIEW_DETAILS}" class="topictitle">{postrow.POST_SUBJECT}</a> {postrow.ATTACH_ICON_IMG}<br />
- <span>{L_POSTED} {L_POST_BY_AUTHOR} {postrow.POST_AUTHOR_FULL} &raquo; {postrow.POST_TIME}</span>
+ <div class="list-inner">
+ <a href="{postrow.U_VIEW_DETAILS}" class="topictitle">{postrow.POST_SUBJECT}</a> {postrow.ATTACH_ICON_IMG}<br />
+ <span>{L_POSTED} {L_POST_BY_AUTHOR} {postrow.POST_AUTHOR_FULL} &raquo; {postrow.POST_TIME}</span>
+ <div class="responsive-show" style="display: none;">
+ {L_REPORTER}{L_COLON} {postrow.REPORTER_FULL} &laquo; {postrow.REPORT_TIME}<br />
+ <!-- IF postrow.U_VIEWFORUM -->{L_FORUM}{L_COLON} <a href="{postrow.U_VIEWFORUM}">{postrow.FORUM_NAME}</a><!-- ELSE -->{postrow.FORUM_NAME}<!-- ENDIF -->
+ </div>
+ </div>
</dt>
<dd class="moderation">
<span>{postrow.REPORTER_FULL} &laquo; {postrow.REPORT_TIME}<br />
- <!-- IF postrow.U_VIEWFORUM -->{L_FORUM}: <a href="{postrow.U_VIEWFORUM}">{postrow.FORUM_NAME}</a><!-- ELSE -->{postrow.FORUM_NAME}<!-- ENDIF --></span>
+ <!-- IF postrow.U_VIEWFORUM -->{L_FORUM}{L_COLON} <a href="{postrow.U_VIEWFORUM}">{postrow.FORUM_NAME}</a><!-- ELSE -->{postrow.FORUM_NAME}<!-- ENDIF --></span>
</dd>
<!-- ENDIF -->
<dd class="mark"><input type="checkbox" name="report_id_list[]" value="{postrow.REPORT_ID}" /></dd>
@@ -64,9 +79,9 @@
</ul>
<fieldset class="display-options">
- <!-- IF NEXT_PAGE --><a href="{NEXT_PAGE}" class="right-box {S_CONTENT_FLOW_END}">{L_NEXT}</a><!-- ENDIF -->
- <!-- IF PREVIOUS_PAGE --><a href="{PREVIOUS_PAGE}" class="left-box {S_CONTENT_FLOW_BEGIN}">{L_PREVIOUS}</a><!-- ENDIF -->
- <label>{L_DISPLAY_POSTS}: {S_SELECT_SORT_DAYS}</label>
+ <!-- IF U_NEXT_PAGE --><a href="{U_NEXT_PAGE}" class="right-box arrow-{S_CONTENT_FLOW_END}">{L_NEXT}</a><!-- ENDIF -->
+ <!-- IF U_PREVIOUS_PAGE --><a href="{U_PREVIOUS_PAGE}" class="left-box arrow-{S_CONTENT_FLOW_BEGIN}">{L_PREVIOUS}</a><!-- ENDIF -->
+ <label>{L_DISPLAY_POSTS}{L_COLON} {S_SELECT_SORT_DAYS}</label>
<label>{L_SORT_BY} {S_SELECT_SORT_KEY}</label><label>{S_SELECT_SORT_DIR}</label>
<!-- IF TOPIC_ID --><label><input type="checkbox" class="radio" name="t" value="{TOPIC_ID}" checked="checked" />&nbsp; <strong>{L_ONLY_TOPIC}</strong></label><!-- ENDIF -->
<input type="submit" name="sort" value="{L_GO}" class="button2" />
@@ -74,8 +89,12 @@
<hr />
<ul class="linklist">
<li class="rightside pagination">
- <!-- IF TOTAL -->{TOTAL_REPORTS}<!-- ENDIF -->
- <!-- IF PAGE_NUMBER --><!-- IF PAGINATION --> &bull; <a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{PAGE_NUMBER}</a> &bull; <span>{PAGINATION}</span><!-- ELSE --> &bull; {PAGE_NUMBER}<!-- ENDIF --><!-- ENDIF -->
+ <!-- IF TOTAL -->{TOTAL_REPORTS} &bull; <!-- ENDIF -->
+ <!-- IF .pagination -->
+ <!-- INCLUDE pagination.html -->
+ <!-- ELSE -->
+ {PAGE_NUMBER}
+ <!-- ENDIF -->
</li>
</ul>
@@ -83,7 +102,7 @@
<p><strong>{L_NO_REPORTS}</strong></p>
<!-- ENDIF -->
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
<!-- IF .postrow -->
@@ -95,4 +114,4 @@
<!-- ENDIF -->
</form>
-<!-- INCLUDE mcp_footer.html --> \ No newline at end of file
+<!-- INCLUDE mcp_footer.html -->
diff --git a/phpBB/styles/prosilver/template/mcp_topic.html b/phpBB/styles/prosilver/template/mcp_topic.html
index 13b661ef0a..bfe18579a6 100644
--- a/phpBB/styles/prosilver/template/mcp_topic.html
+++ b/phpBB/styles/prosilver/template/mcp_topic.html
@@ -1,38 +1,26 @@
<!-- INCLUDE mcp_header.html -->
<div class="tabs-container">
-<h2><a href="{U_VIEW_TOPIC}">{L_TOPIC}: {TOPIC_TITLE}</a></h2>
-
-<script type="text/javascript">
-// <![CDATA[
-var panels = new Array('display-panel', 'split-panel', 'merge-panel');
+<h2><a href="{U_VIEW_TOPIC}">{L_TOPIC}{L_COLON} {TOPIC_TITLE}</a></h2>
<!-- IF S_MERGE_VIEW -->
- var show_panel = 'merge-panel';
+ <!-- DEFINE $SHOW_PANEL = 'merge-panel' -->
<!-- ELSEIF S_SPLIT_VIEW -->
- var show_panel = 'split-panel';
+ <!-- DEFINE $SHOW_PANEL = 'split-panel' -->
<!-- ELSE -->
- var show_panel = 'display-panel';
+ <!-- DEFINE $SHOW_PANEL = 'display-panel' -->
<!-- ENDIF -->
-onload_functions.push('subPanels()');
-
-// ]]>
-</script>
-
-<div id="minitabs">
+<div id="minitabs" class="sub-panels" data-show-panel="{$SHOW_PANEL}">
<ul>
<li id="display-panel-tab"<!-- IF not S_MERGE_VIEW --> class="activetab"<!-- ENDIF -->>
- <span class="corners-top"><span></span></span>
- <a href="#minitabs" onclick="subPanels('display-panel'); return false;"><span>{L_DISPLAY_OPTIONS}</span></a>
+ <a href="#minitabs" data-subpanel="display-panel"><span>{L_DISPLAY_OPTIONS}</span></a>
</li>
<li id="split-panel-tab">
- <span class="corners-top"><span></span></span>
- <a href="#minitabs" onclick="subPanels('split-panel'); return false;"><span>{L_SPLIT_TOPIC}</span></a>
+ <a href="#minitabs" data-subpanel="split-panel"><span>{L_SPLIT_TOPIC}</span></a>
</li>
<li id="merge-panel-tab"<!-- IF S_MERGE_VIEW --> class="activetab"<!-- ENDIF -->>
- <span class="corners-top"><span></span></span>
- <a href="#minitabs" onclick="subPanels('merge-panel'); return false;"><span>{L_MERGE_POSTS}</span></a>
+ <a href="#minitabs" data-subpanel="merge-panel"><span>{L_MERGE_POSTS}</span></a>
</li>
</ul>
</div>
@@ -41,15 +29,15 @@ onload_functions.push('subPanels()');
<form id="mcp" method="post" action="{S_MCP_ACTION}">
<div class="panel">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<fieldset id="display-panel" class="fields2">
<dl>
- <dt><label for="posts_per_page">{L_POSTS_PER_PAGE}:</label><br /><span>{L_POSTS_PER_PAGE_EXPLAIN}</span></dt>
- <dd><input class="inputbox autowidth" type="text" name="posts_per_page" id="posts_per_page" size="6" value="{POSTS_PER_PAGE}" /></dd>
+ <dt><label for="posts_per_page">{L_POSTS_PER_PAGE}{L_COLON}</label><br /><span>{L_POSTS_PER_PAGE_EXPLAIN}</span></dt>
+ <dd><input class="inputbox autowidth" type="number" min="1" name="posts_per_page" id="posts_per_page" size="6" value="{POSTS_PER_PAGE}" /></dd>
</dl>
<dl>
- <dt><label>{L_DISPLAY_POSTS}:</label></dt>
+ <dt><label>{L_DISPLAY_POSTS}{L_COLON}</label></dt>
<dd>{S_SELECT_SORT_DAYS}&nbsp;&nbsp;<label>{L_SORT_BY} {S_SELECT_SORT_KEY}</label><label>{S_SELECT_SORT_DIR}</label> <input type="submit" name="sort" value="{L_GO}" class="button2" /></dd>
</dl>
</fieldset>
@@ -60,18 +48,18 @@ onload_functions.push('subPanels()');
<!-- IF S_SHOW_TOPIC_ICONS -->
<dl>
- <dt><label for="icon">{L_TOPIC_ICON}:</label></dt>
+ <dt><label for="icon">{L_TOPIC_ICON}{L_COLON}</label></dt>
<dd><label for="icon"><input type="radio" name="icon" id="icon" value="0" checked="checked" /> {L_NO_TOPIC_ICON}</label>
<!-- BEGIN topic_icon --><label for="icon-{topic_icon.ICON_ID}"><input type="radio" name="icon" id="icon-{topic_icon.ICON_ID}" value="{topic_icon.ICON_ID}" {topic_icon.S_ICON_CHECKED} /><img src="{topic_icon.ICON_IMG}" width="{topic_icon.ICON_WIDTH}" height="{topic_icon.ICON_HEIGHT}" alt="" title="" /></label> <!-- END topic_icon --></dd>
</dl>
<!-- ENDIF -->
<dl>
- <dt><label for="subject">{L_SPLIT_SUBJECT}:</label></dt>
- <dd><input type="text" name="subject" id="subject" size="45" maxlength="64" tabindex="2" value="{SPLIT_SUBJECT}" title="{L_SPLIT_SUBJECT}" class="inputbox" /></dd>
+ <dt><label for="subject">{L_SPLIT_SUBJECT}{L_COLON}</label></dt>
+ <dd><input type="text" name="subject" id="subject" size="45" maxlength="124" tabindex="2" value="{SPLIT_SUBJECT}" title="{L_SPLIT_SUBJECT}" class="inputbox" /></dd>
</dl>
<dl>
- <dt><label>{L_SPLIT_FORUM}:</label></dt>
+ <dt><label>{L_SPLIT_FORUM}{L_COLON}</label></dt>
<dd><select name="to_forum_id">{S_FORUM_SELECT}</select></dd>
</dl>
</fieldset>
@@ -81,9 +69,9 @@ onload_functions.push('subPanels()');
<fieldset id="merge-panel" class="fields2">
<p>{L_MERGE_TOPIC_EXPLAIN}</p>
<dl>
- <dt><label for="to_topic_id">{L_MERGE_TOPIC_ID}:</label></dt>
+ <dt><label for="to_topic_id">{L_MERGE_TOPIC_ID}{L_COLON}</label></dt>
<dd>
- <input class="inputbox autowidth" type="text" size="6" name="to_topic_id" id="to_topic_id" value="{TO_TOPIC_ID}" />
+ <input class="inputbox autowidth" type="number" min="0" size="6" name="to_topic_id" id="to_topic_id" value="{TO_TOPIC_ID}" />
<a href="{U_SELECT_TOPIC}" >{L_SELECT_TOPIC}</a>
</dd>
<!-- IF TO_TOPIC_INFO --><dd>{TO_TOPIC_INFO}</dd><!-- ENDIF -->
@@ -91,32 +79,43 @@ onload_functions.push('subPanels()');
</fieldset>
<!-- ENDIF -->
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
<div class="panel">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<h3 id="review">
<span class="right-box"><a href="#review" onclick="viewableArea(getElementById('topicreview'), true); var rev_text = getElementById('review').getElementsByTagName('a').item(0).firstChild; if (rev_text.data == '{LA_EXPAND_VIEW}'){rev_text.data = '{LA_COLLAPSE_VIEW}'; } else if (rev_text.data == '{LA_COLLAPSE_VIEW}'){rev_text.data = '{LA_EXPAND_VIEW}'};">{L_EXPAND_VIEW}</a></span>
- {L_TOPIC_REVIEW}: {TOPIC_TITLE}
+ {L_TOPIC_REVIEW}{L_COLON} {TOPIC_TITLE}
</h3>
<div id="topicreview">
<!-- BEGIN postrow -->
<div class="post <!-- IF postrow.S_ROW_COUNT is odd -->bg1<!-- ELSE -->bg2<!-- ENDIF -->">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<div class="postbody" id="pr{postrow.POST_ID}">
- <ul class="profile-icons"><li class="info-icon"><a href="{postrow.U_POST_DETAILS}" title="{L_POST_DETAILS}"><span>{L_POST_DETAILS}</span></a></li><li><label for="post_id_list_select_{postrow.POST_ID}">{L_SELECT}: <input type="checkbox" id="post_id_list_select_{postrow.POST_ID}" name="post_id_list[]" value="{postrow.POST_ID}"<!-- IF postrow.S_CHECKED --> checked="checked"<!-- ENDIF --> /></label></li></ul>
+ <ul class="profile-icons"><li class="info-icon"><a href="{postrow.U_POST_DETAILS}" title="{L_POST_DETAILS}"><span>{L_POST_DETAILS}</span></a></li><li><label for="post_id_list_select_{postrow.POST_ID}">{L_SELECT}{L_COLON} <input type="checkbox" id="post_id_list_select_{postrow.POST_ID}" name="post_id_list[]" value="{postrow.POST_ID}"<!-- IF postrow.S_CHECKED --> checked="checked"<!-- ENDIF --> /></label></li></ul>
<h3><a href="{postrow.U_POST_DETAILS}">{postrow.POST_SUBJECT}</a></h3>
<p class="author"><a href="#pr{postrow.POST_ID}">{postrow.MINI_POST_IMG}</a> {L_POSTED} {postrow.POST_DATE} {L_POST_BY_AUTHOR} <strong>{postrow.POST_AUTHOR_FULL}</strong><!-- IF postrow.U_MCP_DETAILS --> [ <a href="{postrow.U_MCP_DETAILS}">{L_POST_DETAILS}</a> ]<!-- ENDIF --></p>
- <!-- IF postrow.S_POST_UNAPPROVED or postrow.S_POST_REPORTED -->
- <p class="rules">
- <!-- IF postrow.S_POST_UNAPPROVED -->{UNAPPROVED_IMG} <a href="{postrow.U_MCP_APPROVE}"><strong>{L_POST_UNAPPROVED}</strong></a><br /><!-- ENDIF -->
- <!-- IF postrow.S_POST_REPORTED -->{REPORTED_IMG} <a href="{postrow.U_MCP_REPORT}"><strong>{L_POST_REPORTED}</strong></a><!-- ENDIF -->
+ <!-- IF postrow.S_POST_UNAPPROVED -->
+ <p class="post-notice unapproved">
+ <a href="{postrow.U_MCP_APPROVE}"><strong>{L_POST_UNAPPROVED}</strong></a>
+ </p>
+ <!-- ENDIF -->
+
+ <!-- IF postrow.S_POST_DELETED -->
+ <p class="post-notice deleted">
+ <a href="{postrow.U_MCP_APPROVE}"><strong>{L_POST_DELETED}</strong></a>
+ </p>
+ <!-- ENDIF -->
+
+ <!-- IF postrow.S_POST_REPORTED -->
+ <p class="post-notice reported">
+ <a href="{postrow.U_MCP_REPORT}"><strong>{L_POST_REPORTED}</strong></a>
</p>
<!-- ENDIF -->
@@ -133,23 +132,27 @@ onload_functions.push('subPanels()');
</div>
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
<!-- END postrow -->
</div>
<hr />
- <!-- IF PAGINATION or TOTAL_POSTS -->
+ <!-- IF .pagination or TOTAL_POSTS -->
<ul class="linklist">
<li class="rightside pagination">
- <!-- IF TOTAL_POSTS --> {TOTAL_POSTS}<!-- ENDIF -->
- <!-- IF PAGE_NUMBER --><!-- IF PAGINATION --> &bull; <a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{PAGE_NUMBER}</a> &bull; <span>{PAGINATION}</span><!-- ELSE --> &bull; {PAGE_NUMBER}<!-- ENDIF --><!-- ENDIF -->
+ <!-- IF TOTAL_POSTS --> {TOTAL_POSTS} &bull; <!-- ENDIF -->
+ <!-- IF .pagination -->
+ <!-- INCLUDE pagination.html -->
+ <!-- ELSE -->
+ {PAGE_NUMBER}
+ <!-- ENDIF -->
</li>
</ul>
<!-- ENDIF -->
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
<fieldset class="display-actions">
@@ -158,6 +161,7 @@ onload_functions.push('subPanels()');
<!-- IF S_CAN_APPROVE --><option value="approve">{L_APPROVE_POSTS}</option><!-- ENDIF -->
<!-- IF S_CAN_LOCK --><option value="lock_post">{L_LOCK_POST_POSTS} [ {L_LOCK_POST_EXPLAIN} ]</option><option value="unlock_post">{L_UNLOCK_POST_POSTS}</option><!-- ENDIF -->
<!-- IF S_CAN_DELETE --><option value="delete_post">{L_DELETE_POSTS}</option><!-- ENDIF -->
+ <!-- IF S_CAN_RESTORE --><option value="restore">{L_RESTORE_POSTS}</option><!-- ENDIF -->
<!-- IF S_CAN_MERGE --><option value="merge_posts"<!-- IF S_MERGE_VIEW --> selected="selected"<!-- ENDIF -->>{L_MERGE_POSTS}</option><!-- ENDIF -->
<!-- IF S_CAN_SPLIT --><option value="split_all"<!-- IF S_SPLIT_VIEW --> selected="selected"<!-- ENDIF -->>{L_SPLIT_POSTS}</option><option value="split_beyond">{L_SPLIT_AFTER}</option><!-- ENDIF -->
<!-- IF S_CAN_SYNC --><option value="resync">{L_RESYNC}</option><!-- ENDIF -->
@@ -170,4 +174,4 @@ onload_functions.push('subPanels()');
</form>
-<!-- INCLUDE mcp_footer.html --> \ No newline at end of file
+<!-- INCLUDE mcp_footer.html -->
diff --git a/phpBB/styles/prosilver/template/mcp_viewlogs.html b/phpBB/styles/prosilver/template/mcp_viewlogs.html
deleted file mode 100644
index 264152d3ae..0000000000
--- a/phpBB/styles/prosilver/template/mcp_viewlogs.html
+++ /dev/null
@@ -1,53 +0,0 @@
-<!-- INCLUDE mcp_header.html -->
-
-<form method="post" id="mcp" action="{S_MCP_ACTION}">
-
-<table class="tablebg" width="100%" cellspacing="1" cellpadding="2" border="0">
-<tr>
- <th colspan="<!-- IF S_TOPIC_ID -->4<!-- ELSE -->5<!-- ENDIF -->" height="28" nowrap="nowrap">{L_DISPLAY_OPTIONS}</th>
-</tr>
-<tr>
- <td colspan="<!-- IF S_TOPIC_ID -->4<!-- ELSE -->5<!-- ENDIF -->" class="cat" height="28" align="center"><span class="gensmall">{L_DISPLAY_LOG}:</span> {S_SELECT_SORT_DAYS}&nbsp;<span class="gensmall">{L_SORT_BY}</span> {S_SELECT_SORT_KEY} {S_SELECT_SORT_DIR}&nbsp;<input class="btnlite" type="submit" name="sort" value="{L_GO}" /></span></td>
-</tr>
-<tr>
- <th width="15%" height="28" nowrap="nowrap">{L_USERNAME}</th>
- <th width="12%" nowrap="nowrap">{L_IP}</th>
- <th width="18%" nowrap="nowrap">{L_TIME}</th>
- <th width="45%" nowrap="nowrap">{L_ACTION}</th>
- <!-- IF not S_TOPIC_ID --><th width="8%" nowrap="nowrap"></th><!-- ENDIF -->
-</tr>
-<!-- IF S_TOPIC_ID -->
- <tr>
- <td class="bg3" colspan="5"><span class="gensmall">{L_LOGS_CURRENT_TOPIC} <a href="{U_VIEW_TOPIC}"><strong>{TOPIC_NAME}</strong></a></td>
- </tr>
-<!-- ENDIF -->
-
-<!-- BEGIN log -->
-<tr>
- <td class="bg1" nowrap="nowrap"><span class="gen">{log.USERNAME}</span></td>
- <td class="bg1" align="center" nowrap="nowrap"><span class="gen">{log.IP}</span></td>
- <td class="bg1" align="center" nowrap="nowrap"><span class="gensmall">{log.TIME}</span></td>
- <td class="bg1"><span class="gen">{log.ACTION}</span></td>
- <!-- IF not S_TOPIC_ID -->
- <td class="bg1" align="center" nowrap="nowrap"><span class="gensmall"><!-- IF log.U_VIEW_TOPIC --><a href="{log.U_VIEW_TOPIC}">{L_VIEW_TOPIC}</a><!-- IF log.U_VIEWLOGS --> | <!-- ENDIF --><!-- ENDIF --><!-- IF log.U_VIEWLOGS --><a href="{log.U_VIEWLOGS}">{L_VIEW_TOPIC_LOGS}</a><!-- ENDIF --></span></td>
- <!-- ENDIF -->
-</tr>
-<!-- BEGINELSE -->
- <tr>
- <td class="bg1" colspan="<!-- IF S_TOPIC_ID -->4<!-- ELSE -->5<!-- ENDIF -->" align="center"><span class="gen">{L_NO_ENTRIES}</span></td>
- </tr>
-<!-- END log -->
-<div>
- {S_FORM_TOKEN}
-</div>
-</table>
-</form>
-
-<table width="100%" cellspacing="2" cellpadding="2" border="0" align="center">
-<tr>
- <td class="nav" align="left" valign="middle">{PAGE_NUMBER}</td>
- <td align="right" valign="top" nowrap="nowrap"><!-- IF PAGINATION --><strong><a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{L_GOTO_PAGE}</a> <!-- IF PREVIOUS_PAGE --><a href="{PREVIOUS_PAGE}">{L_PREVIOUS}</a>&nbsp;&nbsp;<!-- ENDIF -->{PAGINATION}<!-- IF NEXT_PAGE -->&nbsp;&nbsp;<a href="{NEXT_PAGE}">{L_NEXT}</a><!-- ENDIF --></strong><!-- ENDIF --></td>
-</tr>
-</table>
-
-<!-- INCLUDE mcp_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/prosilver/template/mcp_warn_front.html b/phpBB/styles/prosilver/template/mcp_warn_front.html
index fc8fa37fab..668a0d81a8 100644
--- a/phpBB/styles/prosilver/template/mcp_warn_front.html
+++ b/phpBB/styles/prosilver/template/mcp_warn_front.html
@@ -5,19 +5,19 @@
<h2>{L_WARN_USER}</h2>
<div class="panel">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<h3>{L_SELECT_USER}</h3>
<fieldset>
<dl>
- <dt><label for="username">{L_SELECT_USER}:</label></dt>
+ <dt><label for="username">{L_SELECT_USER}{L_COLON}</label></dt>
<dd><input name="username" id="username" type="text" class="inputbox" /></dd>
<dd><strong><a href="{U_FIND_USERNAME}" onclick="find_username(this.href); return false;">{L_FIND_USERNAME}</a></strong></dd>
</dl>
</fieldset>
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
<fieldset class="submit-buttons">
@@ -28,12 +28,12 @@
</form>
<div class="panel">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<h3>{L_MOST_WARNINGS}</h3>
<!-- IF .highest -->
- <table class="table1" cellspacing="0">
+ <table class="table1">
<thead>
<tr>
<th class="name">{L_USERNAME}</th>
@@ -51,23 +51,23 @@
<td>{highest.WARNING_TIME}</td>
<td><a href="{highest.U_NOTES}">{L_VIEW_NOTES}</a></td>
</tr>
- <!-- END latest -->
+ <!-- END highest -->
</tbody>
</table>
<!-- ELSE -->
- <p><strong>{L_WARNINGS_ZERO_TOTAL}</strong></p>
+ <p><strong>{L_NO_WARNINGS}</strong></p>
<!-- ENDIF -->
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
<div class="panel">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<h3>{L_LATEST_WARNINGS}</h3>
<!-- IF .latest -->
- <table class="table1" cellspacing="0">
+ <table class="table1">
<thead>
<tr>
<th class="name">{L_USERNAME}</th>
@@ -88,10 +88,10 @@
</tbody>
</table>
<!-- ELSE -->
- <p><strong>{L_WARNINGS_ZERO_TOTAL}</strong></p>
+ <p><strong>{L_NO_WARNINGS}</strong></p>
<!-- ENDIF -->
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
-<!-- INCLUDE mcp_footer.html --> \ No newline at end of file
+<!-- INCLUDE mcp_footer.html -->
diff --git a/phpBB/styles/prosilver/template/mcp_warn_list.html b/phpBB/styles/prosilver/template/mcp_warn_list.html
index 3da7c4c389..731c945fe6 100644
--- a/phpBB/styles/prosilver/template/mcp_warn_list.html
+++ b/phpBB/styles/prosilver/template/mcp_warn_list.html
@@ -5,19 +5,23 @@
<h2>{L_WARNED_USERS}</h2>
<div class="panel">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<p>{L_WARNED_USERS_EXPLAIN}</p>
<!-- IF .user -->
<ul class="linklist">
<li class="rightside pagination">
- <!-- IF TOTAL_USERS -->{TOTAL_USERS} <!-- ENDIF -->
- <!-- IF PAGE_NUMBER --><!-- IF PAGINATION --> &bull; <a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{PAGE_NUMBER}</a> &bull; <span>{PAGINATION}</span><!-- ELSE --> &bull; {PAGE_NUMBER}<!-- ENDIF --><!-- ENDIF -->
+ <!-- IF TOTAL_USERS -->{TOTAL_USERS} &bull; <!-- ENDIF -->
+ <!-- IF .pagination -->
+ <!-- INCLUDE pagination.html -->
+ <!-- ELSE -->
+ {PAGE_NUMBER}
+ <!-- ENDIF -->
</li>
</ul>
- <table class="table1" cellspacing="0">
+ <table class="table1">
<thead>
<tr>
<th class="name">{L_USERNAME}</th>
@@ -40,7 +44,7 @@
</table>
<fieldset class="display-options">
- <label>{L_DISPLAY_POSTS}: {S_SELECT_SORT_DAYS}</label>
+ <label>{L_DISPLAY_POSTS}{L_COLON} {S_SELECT_SORT_DAYS}</label>
<label>{L_SORT_BY} {S_SELECT_SORT_KEY}</label><label>{S_SELECT_SORT_DIR}</label>
<input type="submit" name="sort" value="{L_GO}" class="button2" />
</fieldset>
@@ -48,19 +52,23 @@
<ul class="linklist">
<li class="rightside pagination">
- <!-- IF TOTAL_USERS -->{TOTAL_USERS} <!-- ENDIF -->
- <!-- IF PAGE_NUMBER --><!-- IF PAGINATION --> &bull; <a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{PAGE_NUMBER}</a> &bull; <span>{PAGINATION}</span><!-- ELSE --> &bull; {PAGE_NUMBER}<!-- ENDIF --><!-- ENDIF -->
+ <!-- IF TOTAL_USERS -->{TOTAL_USERS} &bull; <!-- ENDIF -->
+ <!-- IF .pagination -->
+ <!-- INCLUDE pagination.html -->
+ <!-- ELSE -->
+ {PAGE_NUMBER}
+ <!-- ENDIF -->
</li>
</ul>
<!-- ELSE -->
- <p><strong>{L_WARNINGS_ZERO_TOTAL}</strong></p>
+ <p><strong>{L_NO_WARNINGS}</strong></p>
<!-- ENDIF -->
- <span class="corners-bottom"><span></span></span></div>
+ </div>
{S_FORM_TOKEN}
</div>
</form>
-<!-- INCLUDE mcp_footer.html --> \ No newline at end of file
+<!-- INCLUDE mcp_footer.html -->
diff --git a/phpBB/styles/prosilver/template/mcp_warn_post.html b/phpBB/styles/prosilver/template/mcp_warn_post.html
index d09209f5a4..0dd2e14d92 100644
--- a/phpBB/styles/prosilver/template/mcp_warn_post.html
+++ b/phpBB/styles/prosilver/template/mcp_warn_post.html
@@ -5,7 +5,7 @@
<h2>{L_MCP_WARN_POST}</h2>
<div class="panel">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<h3><!-- IF USER_COLOR --><span style="color: #{USER_COLOR}">{USERNAME}</span><!-- ELSE -->{USERNAME}<!-- ENDIF --></h3>
@@ -16,20 +16,20 @@
<div class="column2">
<dl class="details">
- <!-- IF RANK_TITLE --><dt>{L_RANK}:</dt><dd>{RANK_TITLE}</dd><!-- ENDIF -->
- <!-- IF RANK_IMG --><dt><!-- IF RANK_TITLE -->&nbsp;<!-- ELSE -->{L_RANK}:<!-- ENDIF --></dt><dd>{RANK_IMG}</dd><!-- ENDIF -->
- <dt>{L_JOINED}:</dt><dd>{JOINED}</dd>
- <dt>{L_TOTAL_POSTS}:</dt><dd>{POSTS}</dd>
- <dt>{L_WARNINGS}: </dt><dd>{WARNINGS}</dd>
+ <!-- IF RANK_TITLE --><dt>{L_RANK}{L_COLON}</dt><dd>{RANK_TITLE}</dd><!-- ENDIF -->
+ <!-- IF RANK_IMG --><dt><!-- IF RANK_TITLE -->&nbsp;<!-- ELSE -->{L_RANK}{L_COLON}<!-- ENDIF --></dt><dd>{RANK_IMG}</dd><!-- ENDIF -->
+ <dt>{L_JOINED}{L_COLON}</dt><dd>{JOINED}</dd>
+ <dt>{L_TOTAL_POSTS}{L_COLON}</dt><dd>{POSTS}</dd>
+ <dt>{L_WARNINGS}{L_COLON} </dt><dd>{WARNINGS}</dd>
</dl>
</div>
</div>
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
<div class="panel">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<h3>{L_POST_DETAILS}</h3>
@@ -41,11 +41,11 @@
</div>
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
<div class="panel">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<h3>{L_ADD_WARNING}</h3>
<p>{L_ADD_WARNING_EXPLAIN}</p>
@@ -61,7 +61,7 @@
<!-- ENDIF -->
</fieldset>
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
<fieldset class="submit-buttons">
@@ -71,4 +71,4 @@
</fieldset>
</form>
-<!-- INCLUDE mcp_footer.html --> \ No newline at end of file
+<!-- INCLUDE mcp_footer.html -->
diff --git a/phpBB/styles/prosilver/template/mcp_warn_user.html b/phpBB/styles/prosilver/template/mcp_warn_user.html
index dfc167399f..1541f2e5f6 100644
--- a/phpBB/styles/prosilver/template/mcp_warn_user.html
+++ b/phpBB/styles/prosilver/template/mcp_warn_user.html
@@ -5,7 +5,7 @@
<h2>{L_WARN_USER}</h2>
<div class="panel">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<h3>{USERNAME_FULL}</h3>
@@ -16,20 +16,20 @@
<div class="column2">
<dl class="details">
- <!-- IF RANK_TITLE --><dt>{L_RANK}:</dt><dd>{RANK_TITLE}</dd><!-- ENDIF -->
- <!-- IF RANK_IMG --><dt><!-- IF RANK_TITLE -->&nbsp;<!-- ELSE -->{L_RANK}:<!-- ENDIF --></dt><dd>{RANK_IMG}</dd><!-- ENDIF -->
- <dt>{L_JOINED}:</dt><dd>{JOINED}</dd>
- <dt>{L_TOTAL_POSTS}:</dt><dd>{POSTS}</dd>
- <dt>{L_WARNINGS}: </dt><dd>{WARNINGS}</dd>
+ <!-- IF RANK_TITLE --><dt>{L_RANK}{L_COLON}</dt><dd>{RANK_TITLE}</dd><!-- ENDIF -->
+ <!-- IF RANK_IMG --><dt><!-- IF RANK_TITLE -->&nbsp;<!-- ELSE -->{L_RANK}{L_COLON}<!-- ENDIF --></dt><dd>{RANK_IMG}</dd><!-- ENDIF -->
+ <dt>{L_JOINED}{L_COLON}</dt><dd>{JOINED}</dd>
+ <dt>{L_TOTAL_POSTS}{L_COLON}</dt><dd>{POSTS}</dd>
+ <dt>{L_WARNINGS}{L_COLON} </dt><dd>{WARNINGS}</dd>
</dl>
</div>
</div>
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
<div class="panel">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<h3>{L_ADD_WARNING}</h3>
<p>{L_ADD_WARNING_EXPLAIN}</p>
@@ -45,7 +45,7 @@
<!-- ENDIF -->
</fieldset>
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
<fieldset class="submit-buttons">
@@ -55,4 +55,4 @@
</fieldset>
</form>
-<!-- INCLUDE mcp_footer.html --> \ No newline at end of file
+<!-- INCLUDE mcp_footer.html -->
diff --git a/phpBB/styles/prosilver/template/mcp_whois.html b/phpBB/styles/prosilver/template/mcp_whois.html
index 5872bd0b91..41a825458d 100644
--- a/phpBB/styles/prosilver/template/mcp_whois.html
+++ b/phpBB/styles/prosilver/template/mcp_whois.html
@@ -2,15 +2,15 @@
<h2>{L_WHOIS}</h2>
<div class="panel">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
- <p><a class="{S_CONTENT_FLOW_BEGIN}" href="{U_RETURN_POST}">{L_RETURN_POST}</a></p>
+ <p><a class="arrow-{S_CONTENT_FLOW_BEGIN}" href="{U_RETURN_POST}">{L_RETURN_POST}</a></p>
<div class="postbody"><div class="content">
<pre>{WHOIS}</pre>
</div></div>
- <p><a class="{S_CONTENT_FLOW_BEGIN}" href="{U_RETURN_POST}">{L_RETURN_POST}</a></p>
+ <p><a class="arrow-{S_CONTENT_FLOW_BEGIN}" href="{U_RETURN_POST}">{L_RETURN_POST}</a></p>
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
-<!-- INCLUDE mcp_footer.html --> \ No newline at end of file
+<!-- INCLUDE mcp_footer.html -->
diff --git a/phpBB/styles/prosilver/template/memberlist_body.html b/phpBB/styles/prosilver/template/memberlist_body.html
index 5ea774bf06..7ba289cfd6 100644
--- a/phpBB/styles/prosilver/template/memberlist_body.html
+++ b/phpBB/styles/prosilver/template/memberlist_body.html
@@ -1,15 +1,13 @@
<!-- IF S_IN_SEARCH_POPUP -->
<!-- INCLUDE simple_header.html -->
<!-- INCLUDE memberlist_search.html -->
- <form method="post" id="results" action="{S_MODE_ACTION}" onsubmit="insert_marked(this.user); return false">
-
-<!-- ELSEIF S_SEARCH_USER -->
- <!-- INCLUDE overall_header.html -->
- <!-- INCLUDE memberlist_search.html -->
- <form method="post" action="{S_MODE_ACTION}">
+ <form method="post" id="results" action="{S_MODE_ACTION}" onsubmit="insert_marked_users('#results', this.user); return false;" data-form-name="{S_FORM_NAME}" data-field-name="{S_FIELD_NAME}">
<!-- ELSE -->
<!-- INCLUDE overall_header.html -->
+ <div class="panel" id="memberlist_search"<!-- IF not S_SEARCH_USER --> style="display: none;"<!-- ENDIF -->>
+ <!-- INCLUDE memberlist_search.html -->
+ </div>
<form method="post" action="{S_MODE_ACTION}">
<!-- ENDIF -->
@@ -25,40 +23,44 @@
</p>
<!-- ELSE -->
- <h2 class="solo">{PAGE_TITLE}<!-- IF SEARCH_WORDS -->: <a href="{U_SEARCH_WORDS}">{SEARCH_WORDS}</a><!-- ENDIF --></h2>
+ <h2 class="solo">{PAGE_TITLE}<!-- IF SEARCH_WORDS -->{L_COLON} <a href="{U_SEARCH_WORDS}">{SEARCH_WORDS}</a><!-- ENDIF --></h2>
<div class="panel">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
- <ul class="linklist">
+ <ul class="linklist wrap">
<li>
-
- <!-- IF U_FIND_MEMBER and not S_SEARCH_USER --><a href="{U_FIND_MEMBER}">{L_FIND_USERNAME}</a> &bull; <!-- ELSEIF S_SEARCH_USER and U_HIDE_FIND_MEMBER and not S_IN_SEARCH_POPUP --><a href="{U_HIDE_FIND_MEMBER}">{L_HIDE_MEMBER_SEARCH}</a> &bull; <!-- ENDIF -->
+ <!-- IF U_FIND_MEMBER and not S_SEARCH_USER --><a href="{U_FIND_MEMBER}" id="member_search" data-alt-text="{LA_HIDE_MEMBER_SEARCH}">{L_FIND_USERNAME}</a> &bull; <!-- ELSEIF S_SEARCH_USER and U_HIDE_FIND_MEMBER and not S_IN_SEARCH_POPUP --><a href="{U_HIDE_FIND_MEMBER}" id="member_search" data-alt-text="{LA_FIND_USERNAME}">{L_HIDE_MEMBER_SEARCH}</a> &bull; <!-- ENDIF -->
<strong style="font-size: 0.95em;">
<!-- BEGIN first_char -->
- <a href="{first_char.U_SORT}">{first_char.DESC}</a>&nbsp;
+ <a href="{first_char.U_SORT}">{first_char.DESC}</a>&nbsp;
<!-- END first_char -->
</strong>
</li>
<li class="rightside pagination">
- {TOTAL_USERS} &bull;
- <!-- IF PAGINATION --><a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{PAGE_NUMBER}</a> &bull; <span>{PAGINATION}</span><!-- ELSE -->{PAGE_NUMBER}<!-- ENDIF -->
+ {TOTAL_USERS}
+ <!-- IF .pagination -->
+ &bull;
+ <!-- INCLUDE pagination.html -->
+ <!-- ELSE -->
+ {PAGE_NUMBER}
+ <!-- ENDIF -->
</li>
</ul>
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
<!-- ENDIF -->
<!-- IF S_LEADERS_SET or not S_SHOW_GROUP or not .memberrow -->
<div class="forumbg forumbg-table">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
- <table class="table1" cellspacing="1" id="memberlist">
+ <table class="table1" id="memberlist">
<thead>
<tr>
- <th class="name"><span class="rank-img"><a href="{U_SORT_RANK}">{L_RANK}</a></span><a href="{U_SORT_USERNAME}"><!-- IF S_SHOW_GROUP and .memberrow -->{L_GROUP_LEADER}<!-- ELSE -->{L_USERNAME}<!-- ENDIF --></a></th>
+ <th class="name" data-dfn="{L_RANK}{L_COMMA_SEPARATOR}<!-- IF S_SHOW_GROUP and .memberrow -->{L_GROUP_LEADER}<!-- ELSE -->{L_USERNAME}<!-- ENDIF -->"><span class="rank-img"><a href="{U_SORT_RANK}">{L_RANK}</a></span><a href="{U_SORT_USERNAME}"><!-- IF S_SHOW_GROUP and .memberrow -->{L_GROUP_LEADER}<!-- ELSE -->{L_USERNAME}<!-- ENDIF --></a></th>
<th class="posts"><a href="{U_SORT_POSTS}#memberlist">{L_POSTS}</a></th>
- <th class="info"><a href="{U_SORT_WEBSITE}#memberlist">{L_WEBSITE}</a>{L_COMMA_SEPARATOR}<a href="{U_SORT_LOCATION}">{L_LOCATION}</a></th>
+ <th class="info"><!-- BEGIN custom_fields --><!-- IF not custom_fields.S_FIRST_ROW -->{L_COMMA_SEPARATOR} <!-- ENDIF -->{custom_fields.PROFILE_FIELD_NAME}<!-- END custom_fields --></th>
<th class="joined"><a href="{U_SORT_JOINED}#memberlist">{L_JOINED}</a></th>
<!-- IF U_SORT_ACTIVE --><th class="active"><a href="{U_SORT_ACTIVE}#memberlist">{L_LAST_ACTIVE}</a></th><!-- ENDIF -->
</tr>
@@ -77,19 +79,19 @@
</tbody>
</table>
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
<!-- ENDIF -->
<div class="forumbg forumbg-table">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
- <table class="table1" cellspacing="1">
+ <table class="table1">
<thead>
<tr>
<!-- IF not S_LEADERS_SET -->
- <th class="name"><span class="rank-img"><a href="{U_SORT_RANK}">{L_RANK}</a></span><a href="{U_SORT_USERNAME}"><!-- IF S_SHOW_GROUP -->{L_GROUP_MEMBERS}<!-- ELSE -->{L_USERNAME}<!-- ENDIF --></a></th>
+ <th class="name" data-dfn="{L_RANK}{L_COMMA_SEPARATOR}{L_USERNAME}"><span class="rank-img"><a href="{U_SORT_RANK}">{L_RANK}</a></span><a href="{U_SORT_USERNAME}"><!-- IF S_SHOW_GROUP -->{L_GROUP_MEMBERS}<!-- ELSE -->{L_USERNAME}<!-- ENDIF --></a></th>
<th class="posts"><a href="{U_SORT_POSTS}#memberlist">{L_POSTS}</a></th>
- <th class="info"><a href="{U_SORT_WEBSITE}#memberlist">{L_WEBSITE}</a>{L_COMMA_SEPARATOR}<a href="{U_SORT_LOCATION}">{L_LOCATION}</a></th>
+ <th class="info"><!-- BEGIN custom_fields --><!-- IF not custom_fields.S_FIRST_ROW -->{L_COMMA_SEPARATOR} <!-- ENDIF -->{custom_fields.PROFILE_FIELD_NAME}<!-- END custom_fields --></th>
<th class="joined"><a href="{U_SORT_JOINED}#memberlist">{L_JOINED}</a></th>
<!-- IF U_SORT_ACTIVE --><th class="active"><a href="{U_SORT_ACTIVE}#memberlist">{L_LAST_ACTIVE}</a></th><!-- ENDIF -->
<!-- ELSEIF S_SHOW_GROUP -->
@@ -107,11 +109,11 @@
<!-- ENDIF -->
<tr class="<!-- IF memberrow.S_ROW_COUNT is even -->bg1<!-- ELSE -->bg2<!-- ENDIF -->">
- <td><!-- IF memberrow.RANK_IMG --><span class="rank-img">{memberrow.RANK_IMG}</span><!-- ELSE --><span class="rank-img">{memberrow.RANK_TITLE}</span><!-- ENDIF --><!-- IF S_IN_SEARCH_POPUP and not S_SELECT_SINGLE --><input type="checkbox" name="user" value="{memberrow.USERNAME}" /> <!-- ENDIF -->{memberrow.USERNAME_FULL}<!-- IF S_SELECT_SINGLE --><br />[&nbsp;<a href="#" onclick="insert_single('{memberrow.A_USERNAME}'); return false;">{L_SELECT}</a>&nbsp;]<!-- ENDIF --></td>
+ <td><!-- IF memberrow.RANK_IMG --><span class="rank-img">{memberrow.RANK_IMG}</span><!-- ELSE --><span class="rank-img">{memberrow.RANK_TITLE}</span><!-- ENDIF --><!-- IF S_IN_SEARCH_POPUP and not S_SELECT_SINGLE --><input type="checkbox" name="user" value="{memberrow.USERNAME}" /> <!-- ENDIF --><!-- EVENT memberlist_body_username_prepend -->{memberrow.USERNAME_FULL}<!-- EVENT memberlist_body_username_append --><!-- IF S_IN_SEARCH_POPUP --><br />[&nbsp;<a href="#" onclick="insert_single_user('#results', '{memberrow.A_USERNAME}'); return false;">{L_SELECT}</a>&nbsp;]<!-- ENDIF --></td>
<td class="posts"><!-- IF memberrow.POSTS and S_DISPLAY_SEARCH --><a href="{memberrow.U_SEARCH_USER}" title="{L_SEARCH_USER_POSTS}">{memberrow.POSTS}</a><!-- ELSE -->{memberrow.POSTS}<!-- ENDIF --></td>
- <td class="info"><!-- IF memberrow.U_WWW or memberrow.LOCATION --><!-- IF memberrow.U_WWW --><div><a href="{memberrow.U_WWW}" title="{L_VISIT_WEBSITE}: {memberrow.U_WWW}">{memberrow.U_SHORT_WWW}</a></div><!-- ENDIF --><!-- IF memberrow.LOCATION --><div>{memberrow.LOCATION}</div><!-- ENDIF --><!-- ELSE -->&nbsp;<!-- ENDIF --></td>
+ <td class="info"><!-- BEGIN custom_fields --><div>{memberrow.custom_fields.PROFILE_FIELD_VALUE}</div><!-- BEGINELSE -->&nbsp;<!-- END custom_fields --></td>
<td>{memberrow.JOINED}</td>
- <!-- IF S_VIEWONLINE --><td>{memberrow.VISITED}&nbsp;</td><!-- ENDIF -->
+ <!-- IF S_VIEWONLINE --><td>{memberrow.LAST_ACTIVE}&nbsp;</td><!-- ENDIF -->
</tr>
<!-- BEGINELSE -->
<tr class="bg1">
@@ -121,7 +123,7 @@
</tbody>
</table>
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
<!-- IF S_IN_SEARCH_POPUP and not S_SELECT_SINGLE -->
@@ -138,10 +140,11 @@
<!-- IF S_IN_SEARCH_POPUP and not S_SEARCH_USER -->
<fieldset class="display-options">
- <!-- IF PREVIOUS_PAGE --><a href="{PREVIOUS_PAGE}" class="left-box {S_CONTENT_FLOW_BEGIN}">{L_PREVIOUS}</a><!-- ENDIF -->
- <!-- IF NEXT_PAGE --><a href="{NEXT_PAGE}" class="right-box {S_CONTENT_FLOW_END}">{L_NEXT}</a><!-- ENDIF -->
- <label for="sk">{L_SELECT_SORT_METHOD}: <select name="sk" id="sk">{S_MODE_SELECT}</select></label>
- <label for="sd">{L_ORDER} <select name="sd" id="sd">{S_ORDER_SELECT}</select> <input type="submit" name="sort" value="{L_SUBMIT}" class="button2" /></label>
+ <!-- IF U_PREVIOUS_PAGE --><a href="{U_PREVIOUS_PAGE}" class="left-box arrow-{S_CONTENT_FLOW_BEGIN}">{L_PREVIOUS}</a><!-- ENDIF -->
+ <!-- IF U_NEXT_PAGE --><a href="{U_NEXT_PAGE}" class="right-box arrow-{S_CONTENT_FLOW_END}">{L_NEXT}</a><!-- ENDIF -->
+ <label for="sk">{L_SELECT_SORT_METHOD}{L_COLON} <select name="sk" id="sk">{S_MODE_SELECT}</select></label>
+ <label for="sd">{L_ORDER} <select name="sd" id="sd">{S_ORDER_SELECT}</select></label>
+ <input type="submit" name="sort" value="{L_SUBMIT}" class="button2" />
</fieldset>
<!-- ENDIF -->
@@ -150,7 +153,14 @@
<hr />
<ul class="linklist">
- <li class="rightside pagination">{TOTAL_USERS} &bull; <!-- IF PAGINATION --><a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{PAGE_NUMBER}</a> &bull; <span>{PAGINATION}</span><!-- ELSE -->{PAGE_NUMBER}<!-- ENDIF --></li>
+ <li class="rightside pagination">{TOTAL_USERS}
+ <!-- IF .pagination -->
+ &bull;
+ <!-- INCLUDE pagination.html -->
+ <!-- ELSE -->
+ {PAGE_NUMBER}
+ <!-- ENDIF -->
+ </li>
</ul>
<!-- IF S_IN_SEARCH_POPUP -->
@@ -158,4 +168,4 @@
<!-- ELSE -->
<!-- INCLUDE jumpbox.html -->
<!-- INCLUDE overall_footer.html -->
-<!-- ENDIF --> \ No newline at end of file
+<!-- ENDIF -->
diff --git a/phpBB/styles/prosilver/template/memberlist_email.html b/phpBB/styles/prosilver/template/memberlist_email.html
index e8870d8921..218402a9e9 100644
--- a/phpBB/styles/prosilver/template/memberlist_email.html
+++ b/phpBB/styles/prosilver/template/memberlist_email.html
@@ -5,37 +5,37 @@
<form method="post" action="{S_POST_ACTION}" id="post">
<div class="panel">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<div class="content">
<!-- IF ERROR_MESSAGE --><p class="error">{ERROR_MESSAGE}</p><!-- ENDIF -->
<fieldset class="fields2">
<!-- IF S_SEND_USER -->
<dl>
- <dt><label>{L_RECIPIENT}:</label></dt>
+ <dt><label>{L_RECIPIENT}{L_COLON}</label></dt>
<dd><strong>{USERNAME}</strong></dd>
</dl>
<dl>
- <dt><label for="subject">{L_SUBJECT}:</label></dt>
+ <dt><label for="subject">{L_SUBJECT}{L_COLON}</label></dt>
<dd><input class="inputbox autowidth" type="text" name="subject" id="subject" size="50" tabindex="1" value="{SUBJECT}" /></dd>
</dl>
<!-- ELSE -->
<dl>
- <dt><label for="email">{L_EMAIL_ADDRESS}:</label></dt>
- <dd><input class="inputbox autowidth" type="text" name="email" id="email" size="50" maxlength="100" tabindex="2" value="{EMAIL}" /></dd>
+ <dt><label for="email">{L_EMAIL_ADDRESS}{L_COLON}</label></dt>
+ <dd><input class="inputbox autowidth" type="email" name="email" id="email" size="50" maxlength="100" tabindex="2" value="{EMAIL}" /></dd>
</dl>
<dl>
- <dt><label for="name">{L_REAL_NAME}:</label></dt>
+ <dt><label for="name">{L_REAL_NAME}{L_COLON}</label></dt>
<dd><input class="inputbox autowidth" type="text" name="name" id="name" size="50" tabindex="3" value="{NAME}" /></dd>
</dl>
<dl>
- <dt><label for="lang">{L_DEST_LANG}:</label><br />
+ <dt><label for="lang">{L_DEST_LANG}{L_COLON}</label><br />
<span>{L_DEST_LANG_EXPLAIN}</span></dt>
<dd><select name="lang">{S_LANG_OPTIONS}</select></dd>
</dl>
<!-- ENDIF -->
<dl>
- <dt><label for="message">{L_MESSAGE_BODY}:</label><br />
+ <dt><label for="message">{L_MESSAGE_BODY}{L_COLON}</label><br />
<span>{L_EMAIL_BODY_EXPLAIN}</span></dt>
<dd><textarea class="inputbox" name="message" id="message" rows="15" cols="76" tabindex="4">{MESSAGE}</textarea></dd>
</dl>
@@ -46,20 +46,20 @@
</fieldset>
</div>
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
<div class="panel">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<div class="content">
<fieldset class="submit-buttons">
<input type="submit" tabindex="6" name="submit" class="button1" value="{L_SEND_EMAIL}" />
</fieldset>
</div>
- <span class="corners-bottom"><span></span></span></div>
+ </div>
{S_FORM_TOKEN}
</div>
</form>
-<!-- INCLUDE overall_footer.html --> \ No newline at end of file
+<!-- INCLUDE overall_footer.html -->
diff --git a/phpBB/styles/prosilver/template/memberlist_im.html b/phpBB/styles/prosilver/template/memberlist_im.html
index 49de3b2596..4fb383a0ba 100644
--- a/phpBB/styles/prosilver/template/memberlist_im.html
+++ b/phpBB/styles/prosilver/template/memberlist_im.html
@@ -1,158 +1,46 @@
<!-- INCLUDE simple_header.html -->
-<!-- MSNM info from http://www.cdolive.net/ - doesn't seem to work with MSN Messenger -->
<h2 class="solo">{L_SEND_IM}</h2>
<form method="post" action="{S_IM_ACTION}">
<div class="panel bg2">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<p>{L_SEND_IM_EXPLAIN}</p>
<fieldset>
<dl class="fields2">
- <dt><label>{L_IM_RECIPIENT}:</label></dt>
- <dd><strong>{USERNAME}</strong><!-- IF S_SEND_ICQ or S_SEND_AIM or S_SEND_MSNM or S_NO_SEND_JABBER --> [ {IM_CONTACT} ]<!-- ENDIF --><!-- IF PRESENCE_IMG --> {PRESENCE_IMG}<!-- ENDIF --></dd>
+ <dt><label>{L_IM_RECIPIENT}{L_COLON}</label></dt>
+ <dd><strong>{USERNAME}</strong><!-- IF S_NO_SEND_JABBER --> [ {IM_CONTACT} ]<!-- ENDIF --><!-- IF PRESENCE_IMG --> {PRESENCE_IMG}<!-- ENDIF --></dd>
</dl>
- <!-- IF S_SEND_ICQ -->
- <dl class="fields2">
- <dt><label for="from">{L_IM_NAME}:</label></dt>
- <dd><input class="inputbox autowidth" type="text" name="from" id="from" size="20" /></dd>
- </dl>
- <dl class="fields2">
- <dt><label for="body">{L_IM_MESSAGE}:</label></dt>
- <dd><textarea class="inputbox autowidth" name="body" id="body" rows="5" cols="45"></textarea></dd>
- </dl>
- <dl class="fields2">
- <dt>&nbsp;</dt>
- <dd><input class="button1" name="submit" type="submit" value="{L_IM_SEND}" /></dd>
- </dl>
- <input type="hidden" name="fromemail" value="{EMAIL}" />
- <input type="hidden" name="subject" value="{SITENAME}" />
- <input type="hidden" name="to" value="{IM_CONTACT}" />
- <!-- ENDIF -->
-
- <!-- IF S_SEND_AIM -->
- <dl class="fields2">
- <dt>&nbsp;</dt>
- <dd><a href="{U_AIM_CONTACT}">{L_IM_ADD_CONTACT}</a></dd>
- <dd><a href="{U_AIM_MESSAGE}">{L_IM_SEND_MESSAGE}</a></dd>
- <dd><a href="http://www.aim.com">{L_IM_DOWNLOAD_APP}</a> | <a href="http://www.aim.com/products/express">{L_IM_AIM_EXPRESS}</a></dd>
- </dl>
- <!-- ENDIF -->
-
- <!-- IF S_SEND_MSNM -->
- <dl class="fields2">
- <dt>&nbsp;</dt>
- <dd><object classid="clsid:B69003B3-C55E-4B48-836C-BC5946FC3B28" codetype="application/x-oleobject" id="objMessengerApp" width="0" height="0"></object></dd>
- <dd><a href="#" onclick="add_contact('{A_IM_CONTACT}'); return false;">{L_IM_ADD_CONTACT}</a></dd>
- <dd><a href="#" onclick="im_contact('{A_IM_CONTACT}'); return false;">{L_IM_SEND_MESSAGE}</a></dd>
- </dl>
- <!-- ENDIF -->
-
<!-- IF S_SEND_JABBER -->
<dl class="fields2">
- <dt><label for="message">{L_IM_MESSAGE}:</label></dt>
+ <dt><label for="message">{L_IM_MESSAGE}{L_COLON}</label></dt>
<dd><textarea class="inputbox autowidth" name="message" id="message" rows="5" cols="45"></textarea></dd>
</dl>
<dl class="fields2">
<dt>&nbsp;</dt>
<dd><input class="button1" name="submit" type="submit" value="{L_IM_SEND}" /></dd>
</dl>
- <!-- ENDIF -->
-
- <!-- IF S_NO_SEND_JABBER -->
<dl class="fields2">
<dt>&nbsp;</dt>
- <dd>{L_IM_NO_JABBER}</dd>
+ <dd>{L_IM_SENT_JABBER}</dd>
</dl>
- <!-- ENDIF -->
-
- <!-- IF S_SENT_JABBER -->
+ <!-- ELSE IF S_NO_SEND_JABBER -->
<dl class="fields2">
<dt>&nbsp;</dt>
- <dd>{L_IM_SENT_JABBER}</dd>
+ <dd>{L_IM_NO_JABBER}</dd>
</dl>
<!-- ENDIF -->
{S_FORM_TOKEN}
</fieldset>
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
</form>
<a href="#" onclick="window.close(); return false;">{L_CLOSE_WINDOW}</a>
-<script type="text/javascript">
-// <![CDATA[
-
- /** The following will not work with Windows Vista **/
-
- var app = document.getElementById('objMessengerApp');
-
- /**
- * Check whether the browser supports this and whether MSNM is connected
- */
- function msn_supported()
- {
- // Does the browser support the MSNM object?
- if (app.MyStatus)
- {
- // Is MSNM connected?
- if (app.MyStatus == 1)
- {
- alert('{LA_IM_MSNM_CONNECT}');
- return false;
- }
- }
- else
- {
- alert('{LA_IM_MSNM_BROWSER}');
- return false;
- }
- return true;
- }
-
- /**
- * Add to your contact list
- */
- function add_contact(address)
- {
- if (msn_supported())
- {
- // Could return an error while MSNM is connecting, don't want that
- try
- {
- app.AddContact(0, address);
- }
- catch (e)
- {
- return;
- }
- }
-}
-
-/**
-* Write IM to contact
-*/
-function im_contact(address)
-{
- if (msn_supported())
- {
- // Could return an error while MSNM is connecting, don't want that
- try
- {
- app.InstantMessage(address);
- }
- catch (e)
- {
- return;
- }
- }
-}
-// ]]>
-</script>
-
-<!-- INCLUDE simple_footer.html --> \ No newline at end of file
+<!-- INCLUDE simple_footer.html -->
diff --git a/phpBB/styles/prosilver/template/memberlist_leaders.html b/phpBB/styles/prosilver/template/memberlist_leaders.html
deleted file mode 100644
index 26e299d261..0000000000
--- a/phpBB/styles/prosilver/template/memberlist_leaders.html
+++ /dev/null
@@ -1,76 +0,0 @@
-<!-- INCLUDE overall_header.html -->
-
-<h2 class="solo">{PAGE_TITLE}</h2>
-
-<form method="post" action="{S_MODE_ACTION}">
-
-<div class="forumbg forumbg-table">
- <div class="inner"><span class="corners-top"><span></span></span>
-
- <table class="table1" cellspacing="1">
- <thead>
- <tr>
- <th class="name"><span class="rank-img">{L_RANK}&nbsp;</span>{L_ADMINISTRATORS}</th>
- <th class="info">{L_PRIMARY_GROUP}</th>
- <th class="info">{L_FORUMS}</th>
- </tr>
- </thead>
- <tbody>
-<!-- BEGIN admin -->
- <tr class="<!-- IF admin.S_ROW_COUNT is even -->bg1<!-- ELSE -->bg2<!-- ENDIF -->">
- <td><!-- IF admin.RANK_IMG --><span class="rank-img">{admin.RANK_IMG}</span><!-- ELSE --><span class="rank-img">{admin.RANK_TITLE}</span><!-- ENDIF -->{admin.USERNAME_FULL}</td>
- <td class="info"><!-- IF admin.U_GROUP -->
- <a<!-- IF admin.GROUP_COLOR --> style="font-weight: bold; color:#{admin.GROUP_COLOR}"<!-- ENDIF --> href="{admin.U_GROUP}">{admin.GROUP_NAME}</a>
- <!-- ELSE -->
- {admin.GROUP_NAME}
- <!-- ENDIF --></td>
- <td class="info">-</td>
- </tr>
-<!-- BEGINELSE -->
- <tr class="bg1">
- <td colspan="3"><strong>{L_NO_ADMINISTRATORS}</strong></td>
- </tr>
-<!-- END admin -->
- </tbody>
- </table>
-
- <span class="corners-bottom"><span></span></span></div>
-</div>
-
-<div class="forumbg forumbg-table">
- <div class="inner"><span class="corners-top"><span></span></span>
-
- <table class="table1" cellspacing="1">
- <thead>
- <tr>
- <th class="name">{L_MODERATORS}</th>
- <th class="info">&nbsp;</th>
- <th class="info">&nbsp;</th>
- </tr>
- </thead>
- <tbody>
-<!-- BEGIN mod -->
- <tr class="<!-- IF mod.S_ROW_COUNT is even -->bg1<!-- ELSE -->bg2<!-- ENDIF -->">
- <td><!-- IF mod.RANK_IMG --><span class="rank-img">{mod.RANK_IMG}</span><!-- ELSE --><span class="rank-img">{mod.RANK_TITLE}</span><!-- ENDIF -->{mod.USERNAME_FULL}</td>
- <td class="info"><!-- IF mod.U_GROUP -->
- <a<!-- IF mod.GROUP_COLOR --> style="font-weight: bold; color:#{mod.GROUP_COLOR}"<!-- ENDIF --> href="{mod.U_GROUP}">{mod.GROUP_NAME}</a>
- <!-- ELSE -->
- {mod.GROUP_NAME}
- <!-- ENDIF --></td>
- <td class="info"><!-- IF not mod.FORUMS -->{L_ALL_FORUMS}<!-- ELSE --><select style="width: 100%;">{mod.FORUMS}</select><!-- ENDIF --></td>
- </tr>
-<!-- BEGINELSE -->
- <tr class="bg1">
- <td colspan="3"><strong>{L_NO_MODERATORS}</strong></td>
- </tr>
-<!-- END mod -->
- </tbody>
- </table>
-
- <span class="corners-bottom"><span></span></span></div>
-</div>
-
-</form>
-
-<!-- INCLUDE jumpbox.html -->
-<!-- INCLUDE overall_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/prosilver/template/memberlist_search.html b/phpBB/styles/prosilver/template/memberlist_search.html
index e6a4bfba97..ee89b103b5 100644
--- a/phpBB/styles/prosilver/template/memberlist_search.html
+++ b/phpBB/styles/prosilver/template/memberlist_search.html
@@ -1,115 +1,57 @@
-<!-- IF S_IN_SEARCH_POPUP -->
-<!-- You should retain this javascript in your own template! -->
-<script type="text/javascript">
-// <![CDATA[
-function insert_user(user)
-{
- opener.document.forms['{S_FORM_NAME}'].{S_FIELD_NAME}.value = ( opener.document.forms['{S_FORM_NAME}'].{S_FIELD_NAME}.value.length && opener.document.forms['{S_FORM_NAME}'].{S_FIELD_NAME}.type == "textarea" ) ? opener.document.forms['{S_FORM_NAME}'].{S_FIELD_NAME}.value + "\n" + user : user;
-}
-
-function insert_marked(users)
-{
- if (typeof(users.length) == "undefined")
- {
- if (users.checked)
- {
- insert_user(users.value);
- }
- }
- else if (users.length > 0)
- {
- for (i = 0; i < users.length; i++)
- {
- if (users[i].checked)
- {
- insert_user(users[i].value);
- }
- }
- }
-
- self.close();
-}
-
-function insert_single(user)
-{
- opener.document.forms['{S_FORM_NAME}'].{S_FIELD_NAME}.value = user;
- self.close();
-}
-// ]]>
-</script>
-<script type="text/javascript" src="{T_SUPER_TEMPLATE_PATH}/forum_fn.js"></script>
-<!-- ENDIF -->
-
<h2 class="solo">{L_FIND_USERNAME}</h2>
<form method="post" action="{S_MODE_ACTION}" id="search_memberlist">
<div class="panel">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<p>{L_FIND_USERNAME_EXPLAIN}</p>
<fieldset class="fields1 column1">
<dl>
- <dt><label for="username">{L_USERNAME}:</label></dt>
+ <dt><label for="username">{L_USERNAME}{L_COLON}</label></dt>
<dd><input type="text" name="username" id="username" value="{USERNAME}" class="inputbox" /></dd>
</dl>
<!-- IF S_EMAIL_SEARCH_ALLOWED -->
<dl>
- <dt><label for="email">{L_EMAIL}:</label></dt>
+ <dt><label for="email">{L_EMAIL}{L_COLON}</label></dt>
<dd><input type="text" name="email" id="email" value="{EMAIL}" class="inputbox" /></dd>
</dl>
<!-- ENDIF -->
<dl>
- <dt><label for="icq">{L_ICQ}:</label></dt>
- <dd><input type="text" name="icq" id="icq" value="{ICQ}" class="inputbox" /></dd>
- </dl>
- <dl>
- <dt><label for="aim">{L_AIM}:</label></dt>
- <dd><input type="text" name="aim" id="aim" value="{AIM}" class="inputbox" /></dd>
- </dl>
- <dl>
- <dt><label for="yahoo">{L_YIM}:</label></dt>
- <dd><input type="text" name="yahoo" id="yahoo" value="{YAHOO}" class="inputbox" /></dd>
- </dl>
- <dl>
- <dt><label for="msn">{L_MSNM}:</label></dt>
- <dd><input type="text" name="msn" id="msn" value="{MSNM}" class="inputbox" /></dd>
- </dl>
- <dl>
<dt><label for="jabber">{L_JABBER}:</label></dt>
<dd><input type="text" name="jabber" id="jabber" value="{JABBER}" class="inputbox" /></dd>
</dl>
+ <dl>
+ <dt><label for="search_group_id">{L_GROUP}{L_COLON}</label></dt>
+ <dd><select name="search_group_id" id="search_group_id">{S_GROUP_SELECT}</select></dd>
+ </dl>
+ <dl>
+ <dt><label for="sk" class="label3">{L_SORT_BY}{L_COLON}</label></dt>
+ <dd><select name="sk" id="sk">{S_SORT_OPTIONS}</select> <select name="sd">{S_ORDER_SELECT}</select></dd>
+ </dl>
</fieldset>
<fieldset class="fields1 column2">
<dl>
- <dt><label for="joined">{L_JOINED}:</label></dt>
+ <dt><label for="joined">{L_JOINED}{L_COLON}</label></dt>
<dd><select name="joined_select">{S_JOINED_TIME_OPTIONS}</select> <input class="inputbox medium" type="text" name="joined" id="joined" value="{JOINED}" /></dd>
</dl>
<!-- IF S_VIEWONLINE -->
<dl>
- <dt><label for="active">{L_LAST_ACTIVE}:</label></dt>
+ <dt><label for="active">{L_LAST_ACTIVE}{L_COLON}</label></dt>
<dd><select name="active_select">{S_ACTIVE_TIME_OPTIONS}</select> <input class="inputbox medium" type="text" name="active" id="active" value="{ACTIVE}" /></dd>
</dl>
<!-- ENDIF -->
<dl>
- <dt><label for="count">{L_POSTS}:</label></dt>
- <dd><select name="count_select">{S_COUNT_OPTIONS}</select> <input class="inputbox medium" type="text" name="count" id="count" value="{COUNT}" /></dd>
+ <dt><label for="count">{L_POSTS}{L_COLON}</label></dt>
+ <dd><select name="count_select">{S_COUNT_OPTIONS}</select> <input class="inputbox medium" type="number" min="0" name="count" id="count" value="{COUNT}" /></dd>
</dl>
<!-- IF S_IP_SEARCH_ALLOWED -->
<dl>
- <dt><label for="ip">{L_POST_IP}:</label></dt>
+ <dt><label for="ip">{L_POST_IP}{L_COLON}</label></dt>
<dd><input class="inputbox medium" type="text" name="ip" id="ip" value="{IP}" /></dd>
</dl>
<!-- ENDIF -->
- <dl>
- <dt><label for="search_group_id">{L_GROUP}:</label></dt>
- <dd><select name="search_group_id" id="search_group_id">{S_GROUP_SELECT}</select></dd>
- </dl>
- <dl>
- <dt><label for="sk" class="label3">{L_SORT_BY}:</label></dt>
- <dd><select name="sk" id="sk">{S_SORT_OPTIONS}</select> <select name="sd">{S_ORDER_SELECT}</select></dd>
- </dl>
</fieldset>
<div class="clear"></div>
@@ -122,7 +64,7 @@ function insert_single(user)
{S_FORM_TOKEN}
</fieldset>
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
</form>
diff --git a/phpBB/styles/prosilver/template/memberlist_team.html b/phpBB/styles/prosilver/template/memberlist_team.html
new file mode 100644
index 0000000000..fd2ba564d3
--- /dev/null
+++ b/phpBB/styles/prosilver/template/memberlist_team.html
@@ -0,0 +1,47 @@
+<!-- INCLUDE overall_header.html -->
+
+<h2 class="solo">{PAGE_TITLE}</h2>
+
+<form method="post" action="{S_MODE_ACTION}">
+
+<!-- BEGIN group -->
+<div class="forumbg forumbg-table">
+ <div class="inner">
+
+ <table class="table1">
+ <thead>
+ <tr>
+ <th class="name" data-dfn="{L_RANK}{L_COMMA_SEPARATOR}{L_USERNAME}"><span class="rank-img">{L_RANK}&nbsp;</span><!-- IF group.U_GROUP --><a href="{group.U_GROUP}">{group.GROUP_NAME}</a><!-- ELSE -->{group.GROUP_NAME}<!-- ENDIF --></th>
+ <th class="info">{L_PRIMARY_GROUP}</th>
+ <!-- IF S_DISPLAY_MODERATOR_FORUMS --><th class="info">{L_MODERATOR}</th><!-- ENDIF -->
+ </tr>
+ </thead>
+ <tbody>
+<!-- BEGIN user -->
+ <tr class="<!-- IF group.user.S_ROW_COUNT is even -->bg1<!-- ELSE -->bg2<!-- ENDIF -->">
+ <td><!-- IF group.user.RANK_IMG --><span class="rank-img">{group.user.RANK_IMG}</span><!-- ELSE --><span class="rank-img">{group.user.RANK_TITLE}</span><!-- ENDIF -->{group.user.USERNAME_FULL}</td>
+ <td class="info"><!-- IF group.user.U_GROUP -->
+ <a<!-- IF group.user.GROUP_COLOR --> style="font-weight: bold; color: #{group.user.GROUP_COLOR}"<!-- ENDIF --> href="{group.user.U_GROUP}">{group.user.GROUP_NAME}</a>
+ <!-- ELSE -->
+ {group.user.GROUP_NAME}
+ <!-- ENDIF --></td>
+ <!-- IF S_DISPLAY_MODERATOR_FORUMS -->
+ <td class="info"><!-- IF group.user.FORUM_OPTIONS --><select style="width: 100%;">{group.user.FORUMS}</select><!-- ELSEIF group.user.FORUMS -->{group.user.FORUMS}<!-- ELSE -->-<!-- ENDIF --></td>
+ <!-- ENDIF -->
+ </tr>
+<!-- BEGINELSE -->
+ <tr class="bg1">
+ <td colspan="3"><strong>{L_NO_MEMBERS}</strong></td>
+ </tr>
+<!-- END user -->
+ </tbody>
+ </table>
+
+ </div>
+</div>
+<!-- END group -->
+
+</form>
+
+<!-- INCLUDE jumpbox.html -->
+<!-- INCLUDE overall_footer.html -->
diff --git a/phpBB/styles/prosilver/template/memberlist_view.html b/phpBB/styles/prosilver/template/memberlist_view.html
index 2758a7e6cc..57d6fe0911 100644
--- a/phpBB/styles/prosilver/template/memberlist_view.html
+++ b/phpBB/styles/prosilver/template/memberlist_view.html
@@ -4,7 +4,7 @@
<form method="post" action="{S_PROFILE_ACTION}" id="viewprofile">
<div class="panel bg1<!-- IF S_ONLINE --> online<!-- ENDIF -->">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<!-- IF AVATAR_IMG -->
<dl class="left-box">
@@ -14,8 +14,8 @@
</dl>
<!-- ENDIF -->
- <dl class="left-box details" style="width: 80%;">
- <dt>{L_USERNAME}:</dt>
+ <dl class="left-box details profile-details">
+ <dt>{L_USERNAME}{L_COLON}</dt>
<dd>
<!-- IF USER_COLOR --><span style="color: {USER_COLOR}; font-weight: bold;"><!-- ELSE --><span><!-- ENDIF -->{USERNAME}</span>
<!-- IF U_USER_ADMIN --> [ <a href="{U_USER_ADMIN}">{L_USER_ADMIN}</a> ]<!-- ENDIF -->
@@ -23,53 +23,60 @@
<!-- IF U_SWITCH_PERMISSIONS --> [ <a href="{U_SWITCH_PERMISSIONS}">{L_USE_PERMISSIONS}</a> ]<!-- ENDIF -->
</dd>
<!-- IF not AVATAR_IMG -->
- <!-- IF RANK_TITLE --><dt>{L_RANK}:</dt> <dd>{RANK_TITLE}</dd><!-- ENDIF -->
- <!-- IF RANK_IMG --><dt><!-- IF RANK_TITLE -->&nbsp;<!-- ELSE -->{L_RANK}:<!-- ENDIF --></dt> <dd>{RANK_IMG}</dd><!-- ENDIF -->
+ <!-- IF RANK_TITLE --><dt>{L_RANK}{L_COLON}</dt> <dd>{RANK_TITLE}</dd><!-- ENDIF -->
+ <!-- IF RANK_IMG --><dt><!-- IF RANK_TITLE -->&nbsp;<!-- ELSE -->{L_RANK}{L_COLON}<!-- ENDIF --></dt> <dd>{RANK_IMG}</dd><!-- ENDIF -->
<!-- ENDIF -->
- <!-- IF S_USER_INACTIVE --><dt>{L_USER_IS_INACTIVE}:</dt> <dd>{USER_INACTIVE_REASON}</dd><!-- ENDIF -->
- <!-- IF LOCATION --><dt>{L_LOCATION}:</dt> <dd>{LOCATION}</dd><!-- ENDIF -->
- <!-- IF AGE !== '' --><dt>{L_AGE}:</dt> <dd>{AGE}</dd><!-- ENDIF -->
- <!-- IF OCCUPATION --><dt>{L_OCCUPATION}:</dt> <dd>{OCCUPATION}</dd><!-- ENDIF -->
- <!-- IF INTERESTS --><dt>{L_INTERESTS}:</dt> <dd>{INTERESTS}</dd><!-- ENDIF -->
- <!-- IF S_GROUP_OPTIONS --><dt>{L_USERGROUPS}:</dt> <dd><select name="g">{S_GROUP_OPTIONS}</select> <input type="submit" name="submit" value="{L_GO}" class="button2" /></dd><!-- ENDIF -->
- <!-- BEGIN custom_fields --><dt>{custom_fields.PROFILE_FIELD_NAME}:</dt> <dd>{custom_fields.PROFILE_FIELD_VALUE}</dd><!-- END custom_fields -->
+ <!-- IF S_USER_INACTIVE --><dt>{L_USER_IS_INACTIVE}{L_COLON}</dt> <dd>{USER_INACTIVE_REASON}</dd><!-- ENDIF -->
+ <!-- IF AGE !== '' --><dt>{L_AGE}{L_COLON}</dt> <dd>{AGE}</dd><!-- ENDIF -->
+ <!-- IF S_GROUP_OPTIONS --><dt>{L_USERGROUPS}{L_COLON}</dt> <dd><select name="g">{S_GROUP_OPTIONS}</select> <input type="submit" name="submit" value="{L_GO}" class="button2" /></dd><!-- ENDIF -->
+ <!-- BEGIN custom_fields -->
+ <!-- IF not custom_fields.S_PROFILE_CONTACT -->
+ <dt>{custom_fields.PROFILE_FIELD_NAME}{L_COLON}</dt> <dd>{custom_fields.PROFILE_FIELD_VALUE}</dd>
+ <!-- ENDIF -->
+ <!-- END custom_fields -->
<!-- IF S_USER_LOGGED_IN and S_ZEBRA -->
<!-- IF U_REMOVE_FRIEND -->
- <dt>&nbsp;</dt> <dd><a href="{U_REMOVE_FRIEND}"><strong>{L_REMOVE_FRIEND}</strong></a></dd>
+ <dt>&nbsp;</dt> <dd class="zebra"><a href="{U_REMOVE_FRIEND}" data-ajax="zebra"><strong>{L_REMOVE_FRIEND}</strong></a></dd>
<!-- ELSEIF U_REMOVE_FOE -->
- <dt>&nbsp;</dt> <dd><a href="{U_REMOVE_FOE}"><strong>{L_REMOVE_FOE}</strong></a></dd>
+ <dt>&nbsp;</dt> <dd class="zebra"><a href="{U_REMOVE_FOE}" data-ajax="zebra"><strong>{L_REMOVE_FOE}</strong></a></dd>
<!-- ELSE -->
<!-- IF U_ADD_FRIEND -->
- <dt>&nbsp;</dt> <dd><a href="{U_ADD_FRIEND}"><strong>{L_ADD_FRIEND}</strong></a></dd>
+ <dt>&nbsp;</dt> <dd class="zebra"><a href="{U_ADD_FRIEND}" data-ajax="zebra"><strong>{L_ADD_FRIEND}</strong></a></dd>
<!-- ENDIF -->
<!-- IF U_ADD_FOE -->
- <dt>&nbsp;</dt> <dd><a href="{U_ADD_FOE}"><strong>{L_ADD_FOE}</strong></a></dd>
+ <dt>&nbsp;</dt> <dd class="zebra"><a href="{U_ADD_FOE}" data-ajax="zebra"><strong>{L_ADD_FOE}</strong></a></dd>
<!-- ENDIF -->
<!-- ENDIF -->
<!-- ENDIF -->
</dl>
- <span class="corners-bottom"><span></span></span></div>
+ <span class="clear"></span></div>
</div>
+<!-- EVENT memberlist_view_contact_before -->
<div class="panel bg2">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<div class="column1">
<h3>{L_CONTACT_USER} {USERNAME}</h3>
<dl class="details">
- <!-- IF U_EMAIL --><dt>{L_EMAIL_ADDRESS}:</dt> <dd><a href="{U_EMAIL}">{L_SEND_EMAIL_USER} {USERNAME}</a></dd><!-- ENDIF -->
- <!-- IF U_WWW --><dt>{L_WEBSITE}:</dt> <dd><a href="{U_WWW}" title="{L_VISIT_WEBSITE}: {U_WWW}">{U_WWW}</a></dd><!-- ENDIF -->
- <!-- IF U_PM --><dt>{L_PM}:</dt> <dd><a href="{U_PM}">{L_SEND_PRIVATE_MESSAGE}</a></dd><!-- ENDIF -->
- <!-- IF U_MSN or USER_MSN --><dt>{L_MSNM}:</dt> <dd><!-- IF U_MSN --><a href="{U_MSN}" onclick="popup(this.href, 550, 320); return false;">{L_SEND_MSNM_MESSAGE}</a><!-- ELSE -->{USER_MSN}<!-- ENDIF --></dd><!-- ENDIF -->
- <!-- IF U_YIM or USER_YIM --><dt>{L_YIM}:</dt> <dd><!-- IF U_YIM --><a href="{U_YIM}" onclick="popup(this.href, 780, 550); return false;">{L_SEND_YIM_MESSAGE}</a><!-- ELSE -->{USER_YIM}<!-- ENDIF --></dd><!-- ENDIF -->
- <!-- IF U_AIM or USER_AIM --><dt>{L_AIM}:</dt> <dd><!-- IF U_AIM --><a href="{U_AIM}" onclick="popup(this.href, 550, 320); return false;">{L_SEND_AIM_MESSAGE}</a><!-- ELSE -->{USER_AIM}<!-- ENDIF --></dd><!-- ENDIF -->
- <!-- IF U_ICQ or USER_ICQ --><dt>{L_ICQ}:</dt> <dd><!-- IF U_ICQ --><a href="{U_ICQ}" onclick="popup(this.href, 550, 320); return false;">{L_SEND_ICQ_MESSAGE}</a><!-- ELSE -->{USER_ICQ}<!-- ENDIF --></dd><!-- ENDIF -->
- <!-- IF U_JABBER and S_JABBER_ENABLED --><dt>{L_JABBER}:</dt> <dd><a href="{U_JABBER}" onclick="popup(this.href, 550, 320); return false;">{L_SEND_JABBER_MESSAGE}</a></dd><!-- ELSEIF USER_JABBER --><dt>{L_JABBER}:</dt> <dd>{USER_JABBER}</dd><!-- ENDIF -->
+ <!-- IF U_EMAIL --><dt>{L_EMAIL_ADDRESS}{L_COLON}</dt> <dd><a href="{U_EMAIL}">{L_SEND_EMAIL_USER} {USERNAME}</a></dd><!-- ENDIF -->
+ <!-- IF U_PM --><dt>{L_PM}{L_COLON}</dt> <dd><a href="{U_PM}">{L_SEND_PRIVATE_MESSAGE}</a></dd><!-- ENDIF -->
+ <!-- IF U_JABBER and S_JABBER_ENABLED --><dt>{L_JABBER}{L_COLON}</dt> <dd><a href="{U_JABBER}" onclick="popup(this.href, 550, 320); return false;">{L_SEND_JABBER_MESSAGE}</a></dd><!-- ELSEIF USER_JABBER --><dt>{L_JABBER}{L_COLON}</dt> <dd>{USER_JABBER}</dd><!-- ENDIF -->
+ <!-- BEGIN custom_fields -->
+ <!-- IF custom_fields.S_PROFILE_CONTACT -->
+ <dt>{custom_fields.PROFILE_FIELD_NAME}{L_COLON}</dt>
+ <!-- IF custom_fields.PROFILE_FIELD_CONTACT -->
+ <dd><a href="{custom_fields.PROFILE_FIELD_CONTACT}">{custom_fields.PROFILE_FIELD_DESC}</a></dd>
+ <!-- ELSE -->
+ <dd>{custom_fields.PROFILE_FIELD_VALUE}</dd>
+ <!-- ENDIF -->
+ <!-- ENDIF -->
+ <!-- END custom_fields -->
<!-- IF S_PROFILE_FIELD1 -->
<!-- NOTE: Use a construct like this to include admin defined profile fields. Replace FIELD1 with the name of your field. -->
- <dt>{PROFILE_FIELD1_NAME}:</dt> <dd>{PROFILE_FIELD1_VALUE}</dd>
+ <dt>{PROFILE_FIELD1_NAME}{L_COLON}</dt> <dd>{PROFILE_FIELD1_VALUE}</dd>
<!-- ENDIF -->
</dl>
</div>
@@ -77,40 +84,45 @@
<div class="column2">
<h3>{L_USER_FORUM}</h3>
<dl class="details">
- <dt>{L_JOINED}:</dt> <dd>{JOINED}</dd>
- <dt>{L_VISITED}:</dt> <dd>{VISITED}</dd>
+ <!-- EVENT memberlist_view_user_statistics_before -->
+ <dt>{L_JOINED}{L_COLON}</dt> <dd>{JOINED}</dd>
+ <dt>{L_LAST_ACTIVE}{L_COLON}</dt> <dd>{LAST_ACTIVE}</dd>
<!-- IF S_WARNINGS -->
- <dt>{L_WARNINGS}: </dt>
+ <dt>{L_WARNINGS}{L_COLON} </dt>
<dd><strong>{WARNINGS}</strong><!-- IF U_NOTES or U_WARN --> [ <!-- IF U_NOTES --><a href="{U_NOTES}">{L_VIEW_NOTES}</a><!-- ENDIF --> <!-- IF U_WARN --><!-- IF U_NOTES --> | <!-- ENDIF --><a href="{U_WARN}">{L_WARN_USER}</a><!-- ENDIF --> ]<!-- ENDIF --></dd>
<!-- ENDIF -->
- <dt>{L_TOTAL_POSTS}:</dt>
+ <dt>{L_TOTAL_POSTS}{L_COLON}</dt>
<dd>{POSTS} <!-- IF S_DISPLAY_SEARCH -->| <strong><a href="{U_SEARCH_USER}">{L_SEARCH_USER_POSTS}</a></strong><!-- ENDIF -->
<!-- IF POSTS_PCT --><br />({POSTS_PCT} / {POSTS_DAY})<!-- ENDIF -->
<!-- IF POSTS_IN_QUEUE and U_MCP_QUEUE --><br />(<a href="{U_MCP_QUEUE}">{L_POSTS_IN_QUEUE}</a>)<!-- ELSEIF POSTS_IN_QUEUE --><br />({L_POSTS_IN_QUEUE})<!-- ENDIF -->
</dd>
<!-- IF S_SHOW_ACTIVITY and POSTS -->
- <dt>{L_ACTIVE_IN_FORUM}:</dt> <dd><!-- IF ACTIVE_FORUM != '' --><strong><a href="{U_ACTIVE_FORUM}">{ACTIVE_FORUM}</a></strong><br />({ACTIVE_FORUM_POSTS} / {ACTIVE_FORUM_PCT})<!-- ELSE --> - <!-- ENDIF --></dd>
- <dt>{L_ACTIVE_IN_TOPIC}:</dt> <dd><!-- IF ACTIVE_TOPIC != '' --><strong><a href="{U_ACTIVE_TOPIC}">{ACTIVE_TOPIC}</a></strong><br />({ACTIVE_TOPIC_POSTS} / {ACTIVE_TOPIC_PCT})<!-- ELSE --> - <!-- ENDIF --></dd>
+ <dt>{L_ACTIVE_IN_FORUM}{L_COLON}</dt> <dd><!-- IF ACTIVE_FORUM != '' --><strong><a href="{U_ACTIVE_FORUM}">{ACTIVE_FORUM}</a></strong><br />({ACTIVE_FORUM_POSTS} / {ACTIVE_FORUM_PCT})<!-- ELSE --> - <!-- ENDIF --></dd>
+ <dt>{L_ACTIVE_IN_TOPIC}{L_COLON}</dt> <dd><!-- IF ACTIVE_TOPIC != '' --><strong><a href="{U_ACTIVE_TOPIC}">{ACTIVE_TOPIC}</a></strong><br />({ACTIVE_TOPIC_POSTS} / {ACTIVE_TOPIC_PCT})<!-- ELSE --> - <!-- ENDIF --></dd>
<!-- ENDIF -->
+ <!-- EVENT memberlist_view_user_statistics_after -->
</dl>
</div>
- <span class="corners-bottom"><span></span></span></div>
+ <span class="clear"></span></div>
</div>
+<!-- EVENT memberlist_view_contact_after -->
<!-- IF SIGNATURE -->
<div class="panel bg1">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<h3>{L_SIGNATURE}</h3>
- <div class="postbody"><div class="signature" style="border-top:none; margin-top: 0;">{SIGNATURE}</div></div>
+ <div class="postbody"><div class="signature standalone">{SIGNATURE}</div></div>
- <span class="corners-bottom"><span></span></span></div>
+ <span class="clear"></span></div>
</div>
<!-- ENDIF -->
</form>
+<!-- EVENT memberlist_view_content_append -->
+
<!-- INCLUDE jumpbox.html -->
-<!-- INCLUDE overall_footer.html --> \ No newline at end of file
+<!-- INCLUDE overall_footer.html -->
diff --git a/phpBB/styles/prosilver/template/message_body.html b/phpBB/styles/prosilver/template/message_body.html
index 3a970769b7..a844246055 100644
--- a/phpBB/styles/prosilver/template/message_body.html
+++ b/phpBB/styles/prosilver/template/message_body.html
@@ -5,11 +5,11 @@
<!-- ENDIF -->
<div class="panel" id="message">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<h2>{MESSAGE_TITLE}</h2>
<p>{MESSAGE_TEXT}</p>
- <!-- IF SCRIPT_NAME == "search" and not S_BOARD_DISABLED and not S_NO_SEARCH and L_RETURN_TO_SEARCH_ADV --><p><a href="{U_SEARCH}" class="{S_CONTENT_FLOW_BEGIN}">{L_RETURN_TO_SEARCH_ADV}</a></p><!-- ENDIF -->
- <span class="corners-bottom"><span></span></span></div>
+ <!-- IF SCRIPT_NAME == "search" and not S_BOARD_DISABLED and not S_NO_SEARCH and L_RETURN_TO_SEARCH_ADV --><p><a href="{U_SEARCH}" class="arrow-{S_CONTENT_FLOW_BEGIN}">{L_RETURN_TO_SEARCH_ADV}</a></p><!-- ENDIF -->
+ </div>
</div>
<!-- IF S_SIMPLE_MESSAGE -->
diff --git a/phpBB/styles/prosilver/template/overall_footer.html b/phpBB/styles/prosilver/template/overall_footer.html
index fc6a37cbe3..662008b7fa 100644
--- a/phpBB/styles/prosilver/template/overall_footer.html
+++ b/phpBB/styles/prosilver/template/overall_footer.html
@@ -1,37 +1,67 @@
+ <!-- EVENT overall_footer_content_after -->
</div>
<div id="page-footer">
<div class="navbar">
- <div class="inner"><span class="corners-top"><span></span></span>
-
- <ul class="linklist">
- <li class="icon-home"><a href="{U_INDEX}">{L_INDEX}</a></li>
- <!-- IF not S_IS_BOT -->
- <!-- IF S_WATCH_FORUM_LINK --><li <!-- IF S_WATCHING_FORUM -->class="icon-unsubscribe"<!-- ELSE -->class="icon-subscribe"<!-- ENDIF -->><a href="{S_WATCH_FORUM_LINK}" title="{S_WATCH_FORUM_TITLE}">{S_WATCH_FORUM_TITLE}</a></li><!-- ENDIF -->
- <!-- IF U_WATCH_TOPIC --><li <!-- IF S_WATCHING_TOPIC -->class="icon-unsubscribe"<!-- ELSE -->class="icon-subscribe"<!-- ENDIF -->><a href="{U_WATCH_TOPIC}" title="{L_WATCH_TOPIC}">{L_WATCH_TOPIC}</a></li><!-- ENDIF -->
- <!-- IF U_BOOKMARK_TOPIC --><li class="icon-bookmark"><a href="{U_BOOKMARK_TOPIC}" title="{L_BOOKMARK_TOPIC}">{L_BOOKMARK_TOPIC}</a></li><!-- ENDIF -->
- <!-- IF U_BUMP_TOPIC --><li class="icon-bump"><a href="{U_BUMP_TOPIC}" title="{L_BUMP_TOPIC}">{L_BUMP_TOPIC}</a></li><!-- ENDIF -->
- <!-- ENDIF -->
- <li class="rightside"><!-- IF U_TEAM --><a href="{U_TEAM}">{L_THE_TEAM}</a> &bull; <!-- ENDIF --><!-- IF not S_IS_BOT --><a href="{U_DELETE_COOKIES}">{L_DELETE_COOKIES}</a> &bull; <!-- ENDIF -->{S_TIMEZONE}</li>
+ <div class="inner">
+
+ <ul class="linklist bulletin">
+ <li class="small-icon icon-home breadcrumbs"><!-- IF U_SITE_HOME --><span class="crumb"><a href="{U_SITE_HOME}">{L_SITE_HOME}</a> <strong>&#8249;</strong></span> <!-- ENDIF --><span class="crumb"><a href="{U_INDEX}">{L_INDEX}</a></span>
+ <!-- EVENT overall_footer_breadcrumb_append -->
+ </li>
+ <!-- IF not S_IS_BOT -->
+ <!-- IF U_WATCH_FORUM_LINK --><li class="small-icon icon-<!-- IF S_WATCHING_FORUM -->unsubscribe<!-- ELSE -->subscribe<!-- ENDIF -->"><a href="{U_WATCH_FORUM_LINK}" title="{S_WATCH_FORUM_TITLE}" data-ajax="toggle_link" data-toggle-class="small-icon icon-<!-- IF not S_WATCHING_FORUM -->unsubscribe<!-- ELSE -->subscribe<!-- ENDIF -->" data-toggle-text="{S_WATCH_FORUM_TOGGLE}" data-toggle-url="{U_WATCH_FORUM_TOGGLE}">{S_WATCH_FORUM_TITLE}</a></li><!-- ENDIF -->
+ <!-- ENDIF -->
+ <li class="rightside">{S_TIMEZONE}</li>
+ <!-- IF not S_IS_BOT --><li class="rightside"><a href="{U_DELETE_COOKIES}" data-ajax="true" data-refresh="true">{L_DELETE_COOKIES}</a></li><!-- ENDIF -->
+ <!-- IF U_TEAM --><li class="rightside"><a href="{U_TEAM}">{L_THE_TEAM}</a><!-- ENDIF -->
</ul>
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
- <div class="copyright">{CREDIT_LINE}
+ <div class="copyright">
+ <!-- EVENT overall_footer_copyright_prepend -->
+ {CREDIT_LINE}
<!-- IF TRANSLATION_INFO --><br />{TRANSLATION_INFO}<!-- ENDIF -->
+ <!-- EVENT overall_footer_copyright_append -->
<!-- IF DEBUG_OUTPUT --><br />{DEBUG_OUTPUT}<!-- ENDIF -->
<!-- IF U_ACP --><br /><strong><a href="{U_ACP}">{L_ACP}</a></strong><!-- ENDIF -->
</div>
+
+ <div id="darkenwrapper" data-ajax-error-title="{L_AJAX_ERROR_TITLE}" data-ajax-error-text="{L_AJAX_ERROR_TEXT}" data-ajax-error-text-abort="{L_AJAX_ERROR_TEXT_ABORT}" data-ajax-error-text-timeout="{L_AJAX_ERROR_TEXT_TIMEOUT}" data-ajax-error-text-parsererror="{L_AJAX_ERROR_TEXT_PARSERERROR}">
+ <div id="darken">&nbsp;</div>
+ </div>
+ <div id="loading_indicator"></div>
+
+ <div id="phpbb_alert" class="phpbb_alert" data-l-err="{L_ERROR}" data-l-timeout-processing-req="{L_TIMEOUT_PROCESSING_REQ}">
+ <a href="#" class="alert_close"></a>
+ <h3 class="alert_title"></h3><p class="alert_text"></p>
+ </div>
+ <div id="phpbb_confirm" class="phpbb_alert">
+ <a href="#" class="alert_close"></a>
+ <div class="alert_text"></div>
+ </div>
</div>
</div>
<div>
- <a id="bottom" name="bottom" accesskey="z"></a>
+ <a id="bottom" accesskey="z"></a>
<!-- IF not S_IS_BOT -->{RUN_CRON_TASK}<!-- ENDIF -->
</div>
+<script type="text/javascript" src="{T_JQUERY_LINK}"></script>
+<!-- IF S_ALLOW_CDN --><script type="text/javascript">window.jQuery || document.write(unescape('%3Cscript src="{T_ASSETS_PATH}/javascript/jquery.js?assets_version={T_ASSETS_VERSION}" type="text/javascript"%3E%3C/script%3E'));</script><!-- ENDIF -->
+<script type="text/javascript" src="{T_ASSETS_PATH}/javascript/core.js?assets_version={T_ASSETS_VERSION}"></script>
+<!-- INCLUDEJS forum_fn.js -->
+<!-- INCLUDEJS ajax.js -->
+
+<!-- EVENT overall_footer_after -->
+
+<!-- IF S_PLUPLOAD --><!-- INCLUDE plupload.html --><!-- ENDIF -->
+{$SCRIPTS}
+
</body>
-</html> \ No newline at end of file
+</html>
diff --git a/phpBB/styles/prosilver/template/overall_header.html b/phpBB/styles/prosilver/template/overall_header.html
index c75cc92940..3c4f03c073 100644
--- a/phpBB/styles/prosilver/template/overall_header.html
+++ b/phpBB/styles/prosilver/template/overall_header.html
@@ -1,17 +1,12 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}" xml:lang="{S_USER_LANG}">
+<!DOCTYPE html>
+<html dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}">
<head>
-
-<meta http-equiv="content-type" content="text/html; charset={S_CONTENT_ENCODING}" />
-<meta http-equiv="content-style-type" content="text/css" />
-<meta http-equiv="content-language" content="{S_USER_LANG}" />
-<meta http-equiv="imagetoolbar" content="no" />
-<meta name="resource-type" content="document" />
-<meta name="distribution" content="global" />
+<meta charset="utf-8">
+<meta name="viewport" content="width=device-width" />
<meta name="keywords" content="" />
<meta name="description" content="" />
{META}
-<title>{SITENAME} &bull; <!-- IF S_IN_MCP -->{L_MCP} &bull; <!-- ELSEIF S_IN_UCP -->{L_UCP} &bull; <!-- ENDIF -->{PAGE_TITLE}</title>
+<title><!-- IF UNREAD_NOTIFICATIONS_COUNT -->({UNREAD_NOTIFICATIONS_COUNT}) <!-- ENDIF --><!-- IF not S_VIEWTOPIC and not S_VIEWFORUM -->{SITENAME} - <!-- ENDIF --><!-- IF S_IN_MCP -->{L_MCP} - <!-- ELSEIF S_IN_UCP -->{L_UCP} - <!-- ENDIF -->{PAGE_TITLE}<!-- IF S_VIEWTOPIC or S_VIEWFORUM --> - {SITENAME}<!-- ENDIF --></title>
<!-- IF S_ENABLE_FEEDS -->
<!-- IF S_ENABLE_FEEDS_OVERALL --><link rel="alternate" type="application/atom+xml" title="{L_FEED} - {SITENAME}" href="{U_FEED}" /><!-- ENDIF -->
@@ -30,78 +25,41 @@
Modified by:
-->
-<script type="text/javascript">
-// <![CDATA[
- var jump_page = '{LA_JUMP_PAGE}:';
- var on_page = '{ON_PAGE}';
- var per_page = '{PER_PAGE}';
- var base_url = '{A_BASE_URL}';
- var style_cookie = 'phpBBstyle';
- var style_cookie_settings = '{A_COOKIE_SETTINGS}';
- var onload_functions = new Array();
- var onunload_functions = new Array();
-
- <!-- IF S_USER_PM_POPUP and S_NEW_PM -->
- var url = '{UA_POPUP_PM}';
- window.open(url.replace(/&amp;/g, '&'), '_phpbbprivmsg', 'height=225,resizable=yes,scrollbars=yes, width=400');
- <!-- ENDIF -->
-
- /**
- * Find a member
- */
- function find_username(url)
- {
- popup(url, 760, 570, '_usersearch');
- return false;
- }
-
- /**
- * New function for handling multiple calls to window.onload and window.unload by pentapenguin
- */
- window.onload = function()
- {
- for (var i = 0; i < onload_functions.length; i++)
- {
- eval(onload_functions[i]);
- }
- };
-
- window.onunload = function()
- {
- for (var i = 0; i < onunload_functions.length; i++)
- {
- eval(onunload_functions[i]);
- }
- };
-
-// ]]>
-</script>
-<script type="text/javascript" src="{T_SUPER_TEMPLATE_PATH}/styleswitcher.js"></script>
-<script type="text/javascript" src="{T_SUPER_TEMPLATE_PATH}/forum_fn.js"></script>
-
-<link href="{T_THEME_PATH}/print.css" rel="stylesheet" type="text/css" media="print" title="printonly" />
+<link href="{T_THEME_PATH}/print.css?assets_version={T_ASSETS_VERSION}" rel="stylesheet" type="text/css" media="print" title="printonly" />
+<!-- IF S_ALLOW_CDN --><link href="//fonts.googleapis.com/css?family=Open+Sans:600&amp;subset=latin,cyrillic-ext,latin-ext,cyrillic,greek-ext,greek,vietnamese" rel="stylesheet" type="text/css" media="screen, projection" /><!-- ENDIF -->
<link href="{T_STYLESHEET_LINK}" rel="stylesheet" type="text/css" media="screen, projection" />
-
-<link href="{T_THEME_PATH}/normal.css" rel="stylesheet" type="text/css" title="A" />
-<link href="{T_THEME_PATH}/medium.css" rel="alternate stylesheet" type="text/css" title="A+" />
-<link href="{T_THEME_PATH}/large.css" rel="alternate stylesheet" type="text/css" title="A++" />
+<link href="{T_STYLESHEET_LANG_LINK}" rel="stylesheet" type="text/css" media="screen, projection" />
+<link href="{T_THEME_PATH}/responsive.css?assets_version={T_ASSETS_VERSION}" rel="stylesheet" type="text/css" media="only screen and (max-width: 700px), only screen and (max-device-width: 700px)" />
<!-- IF S_CONTENT_DIRECTION eq 'rtl' -->
- <link href="{T_THEME_PATH}/bidi.css" rel="stylesheet" type="text/css" media="screen, projection" />
+ <link href="{T_THEME_PATH}/bidi.css?assets_version={T_ASSETS_VERSION}" rel="stylesheet" type="text/css" media="screen, projection" />
<!-- ENDIF -->
+<!-- IF S_PLUPLOAD -->
+ <link href="{T_THEME_PATH}/plupload.css?assets_version={T_ASSETS_VERSION}" rel="stylesheet" type="text/css" media="screen, projection" />
+<!-- ENDIF -->
+
+<!--[if lte IE 8]>
+ <link href="{T_THEME_PATH}/tweaks.css?assets_version={T_ASSETS_VERSION}" rel="stylesheet" type="text/css" media="screen, projection" />
+<![endif]-->
+
+<!-- EVENT overall_header_head_append -->
+
+{$STYLESHEETS}
+
</head>
+<body id="phpbb" class="nojs section-{SCRIPT_NAME} {S_CONTENT_DIRECTION}">
-<body id="phpbb" class="section-{SCRIPT_NAME} {S_CONTENT_DIRECTION}">
+<!-- EVENT overall_header_body_before -->
<div id="wrap">
- <a id="top" name="top" accesskey="t"></a>
+ <a id="top" accesskey="t"></a>
<div id="page-header">
<div class="headerbar">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<div id="site-description">
- <a href="{U_INDEX}" title="{L_INDEX}" id="logo">{SITE_LOGO_IMG}</a>
+ <a href="<!-- IF U_SITE_HOME -->{U_SITE_HOME}<!-- ELSE -->{U_INDEX}<!-- ENDIF -->" title="<!-- IF U_SITE_HOME -->{L_SITE_HOME}<!-- ELSE -->{L_INDEX}<!-- ENDIF -->" id="logo">{SITE_LOGO_IMG}</a>
<h1>{SITENAME}</h1>
<p>{SITE_DESCRIPTION}</p>
<p class="skiplink"><a href="#start_here">{L_SKIP}</a></p>
@@ -111,7 +69,7 @@
<div id="search-box">
<form action="{U_SEARCH}" method="get" id="search">
<fieldset>
- <input name="keywords" id="keywords" type="text" maxlength="128" title="{L_SEARCH_KEYWORDS}" class="inputbox search" value="<!-- IF SEARCH_WORDS-->{SEARCH_WORDS}<!-- ELSE -->{L_SEARCH_MINI}<!-- ENDIF -->" onclick="if(this.value=='{LA_SEARCH_MINI}')this.value='';" onblur="if(this.value=='')this.value='{LA_SEARCH_MINI}';" />
+ <input name="keywords" id="keywords" type="search" maxlength="128" title="{L_SEARCH_KEYWORDS}" class="inputbox search" value="{SEARCH_WORDS}" placeholder="{L_SEARCH_MINI}" />
<input class="button2" value="{L_SEARCH}" type="submit" /><br />
<a href="{U_SEARCH}" title="{L_SEARCH_ADV_EXPLAIN}">{L_SEARCH_ADV}</a> {S_SEARCH_HIDDEN_FIELDS}
</fieldset>
@@ -119,58 +77,115 @@
</div>
<!-- ENDIF -->
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
<div class="navbar">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<ul class="linklist navlinks">
- <li class="icon-home"><a href="{U_INDEX}" accesskey="h">{L_INDEX}</a> <!-- BEGIN navlinks --> <strong>&#8249;</strong> <a href="{navlinks.U_VIEW_FORUM}">{navlinks.FORUM_NAME}</a><!-- END navlinks --></li>
-
- <li class="rightside"><a href="#" onclick="fontsizeup(); return false;" onkeypress="return fontsizeup(event);" class="fontsize" title="{L_CHANGE_FONT_SIZE}">{L_CHANGE_FONT_SIZE}</a></li>
+ <!-- DEFINE $MICRODATA = ' itemtype="http://data-vocabulary.org/Breadcrumb" itemscope=""' -->
+ <li class="small-icon icon-home breadcrumbs"><!-- IF U_SITE_HOME --><span class="crumb"><a href="{U_SITE_HOME}"{$MICRODATA}>{L_SITE_HOME}</a> <strong>&#8249;</strong></span> <!-- ENDIF -->
+ <span class="crumb"><a href="{U_INDEX}" accesskey="h"{$MICRODATA}>{L_INDEX}</a></span>
+ <!-- BEGIN navlinks --> <span class="crumb"><strong>&#8249;</strong> <a href="{navlinks.U_VIEW_FORUM}"{$MICRODATA}>{navlinks.FORUM_NAME}</a></span><!-- END navlinks -->
+ <!-- EVENT overall_header_breadcrumb_append -->
+ </li>
<!-- IF U_EMAIL_TOPIC --><li class="rightside"><a href="{U_EMAIL_TOPIC}" title="{L_EMAIL_TOPIC}" class="sendemail">{L_EMAIL_TOPIC}</a></li><!-- ENDIF -->
<!-- IF U_EMAIL_PM --><li class="rightside"><a href="{U_EMAIL_PM}" title="{L_EMAIL_PM}" class="sendemail">{L_EMAIL_PM}</a></li><!-- ENDIF -->
<!-- IF U_PRINT_TOPIC --><li class="rightside"><a href="{U_PRINT_TOPIC}" title="{L_PRINT_TOPIC}" accesskey="p" class="print">{L_PRINT_TOPIC}</a></li><!-- ENDIF -->
<!-- IF U_PRINT_PM --><li class="rightside"><a href="{U_PRINT_PM}" title="{L_PRINT_PM}" accesskey="p" class="print">{L_PRINT_PM}</a></li><!-- ENDIF -->
+ <!-- IF S_DISPLAY_SEARCH and not S_IN_SEARCH --><li class="responsive-search rightside" style="display: none;"><a href="{U_SEARCH}" title="{L_SEARCH_ADV_EXPLAIN}">{L_SEARCH}</a></li><!-- ENDIF -->
</ul>
+ <ul class="linklist bulletin">
<!-- IF not S_IS_BOT and S_USER_LOGGED_IN -->
- <ul class="linklist leftside">
- <li class="icon-ucp">
+ <!-- IF S_NOTIFICATIONS_DISPLAY -->
+ <li class="small-icon icon-notification" data-skip-responsive="true">
+ <a href="{U_VIEW_ALL_NOTIFICATIONS}" id="notification_list_button"><span>{L_NOTIFICATIONS} [</span><strong>{NOTIFICATIONS_COUNT}</strong><span>]</span></a>
+ <div id="notification_list" class="dropdown dropdown-extended notification_list">
+ <div class="pointer"><div class="pointer-inner"></div></div>
+ <div class="dropdown-contents">
+ <div class="header">
+ {L_NOTIFICATIONS}
+ <span class="header_settings">
+ <a href="{U_NOTIFICATION_SETTINGS}">{L_SETTINGS}</a>
+ <!-- IF NOTIFICATIONS_COUNT -->
+ <span id="mark_all_notifications"> &bull; <a href="{U_MARK_ALL_NOTIFICATIONS}" data-ajax="notification.mark_all_read">{L_MARK_ALL_READ}</a></span>
+ <!-- ENDIF -->
+ </span>
+ </div>
+
+ <ul>
+ <!-- IF not .notifications -->
+ <li>
+ {L_NO_NOTIFICATIONS}
+ </li>
+ <!-- ENDIF -->
+ <!-- BEGIN notifications -->
+ <li class="<!-- IF notifications.UNREAD --> bg2<!-- ENDIF -->">
+ <!-- IF notifications.URL -->
+ <a href="<!-- IF notifications.UNREAD -->{notifications.U_MARK_READ}" data-real-url="{notifications.URL}<!-- ELSE -->{notifications.URL}<!-- ENDIF -->">
+ <!-- ENDIF -->
+ <!-- IF notifications.AVATAR -->{notifications.AVATAR}<!-- ELSE --><img src="{T_THEME_PATH}/images/no_avatar.gif" alt="" /><!-- ENDIF -->
+ <div class="notification_text">
+ <p>{notifications.FORMATTED_TITLE}</p>
+ <p>&raquo; {notifications.TIME}</p>
+ </div>
+ <!-- IF notifications.URL --></a><!-- ENDIF -->
+ <!-- IF notifications.UNREAD -->
+ <a href="{notifications.U_MARK_READ}" class="mark_read icon-mark" data-ajax="notification.mark_read" title="{L_MARK_READ}"></a>
+ <!-- ENDIF -->
+ </li>
+ <!-- END notifications -->
+ </ul>
+
+ <div class="footer">
+ <a href="{U_VIEW_ALL_NOTIFICATIONS}"><span>{L_SEE_ALL}</span></a>
+ </div>
+ </div>
+ </div>
+ </li>
+ <!-- ENDIF -->
+ <!-- IF S_DISPLAY_PM -->
+ <li class="small-icon icon-pm">
+ <a href="{U_PRIVATEMSGS}"><span>{L_PRIVATE_MESSAGES} [</span><strong>{PRIVATE_MESSAGE_COUNT}</strong><span>]</span></a>
+ </li>
+ <!-- ENDIF -->
+ <li class="small-icon icon-ucp">
<a href="{U_PROFILE}" title="{L_PROFILE}" accesskey="e">{L_PROFILE}</a>
- <!-- IF S_DISPLAY_PM --> (<a href="{U_PRIVATEMSGS}">{PRIVATE_MESSAGE_INFO}</a>)<!-- ENDIF -->
- <!-- IF S_DISPLAY_SEARCH --> &bull;
- <a href="{U_SEARCH_SELF}">{L_SEARCH_SELF}</a>
- <!-- ENDIF -->
- <!-- IF U_RESTORE_PERMISSIONS --> &bull;
- <a href="{U_RESTORE_PERMISSIONS}">{L_RESTORE_PERMISSIONS}</a>
- <!-- ENDIF -->
</li>
- </ul>
+ <!-- IF S_DISPLAY_SEARCH -->
+ <li class="icon-search-self"><a href="{U_SEARCH_SELF}">{L_SEARCH_SELF}</a></li>
+ <!-- ENDIF -->
+ <!-- IF U_RESTORE_PERMISSIONS -->
+ <li class="icon-restore-permissions"><a href="{U_RESTORE_PERMISSIONS}">{L_RESTORE_PERMISSIONS}</a></li>
+ <!-- ENDIF -->
<!-- ENDIF -->
- <ul class="linklist rightside">
- <li class="icon-faq"><a href="{U_FAQ}" title="{L_FAQ_EXPLAIN}">{L_FAQ}</a></li>
+ <!-- EVENT overall_header_navigation_append -->
<!-- IF not S_IS_BOT -->
- <!-- IF S_DISPLAY_MEMBERLIST --><li class="icon-members"><a href="{U_MEMBERLIST}" title="{L_MEMBERLIST_EXPLAIN}">{L_MEMBERLIST}</a></li><!-- ENDIF -->
- <!-- IF not S_USER_LOGGED_IN and S_REGISTER_ENABLED and not (S_SHOW_COPPA or S_REGISTRATION) --><li class="icon-register"><a href="{U_REGISTER}">{L_REGISTER}</a></li><!-- ENDIF -->
- <li class="icon-logout"><a href="{U_LOGIN_LOGOUT}" title="{L_LOGIN_LOGOUT}" accesskey="x">{L_LOGIN_LOGOUT}</a></li>
+ <li class="small-icon icon-logout rightside no-bulletin"><a href="{U_LOGIN_LOGOUT}" title="{L_LOGIN_LOGOUT}" accesskey="x">{L_LOGIN_LOGOUT}</a></li>
+ <!-- IF not S_USER_LOGGED_IN and S_REGISTER_ENABLED and not (S_SHOW_COPPA or S_REGISTRATION) --><li class="small-icon icon-register rightside no-bulletin"><a href="{U_REGISTER}">{L_REGISTER}</a></li><!-- ENDIF -->
+ <!-- IF S_DISPLAY_MEMBERLIST --><li class="small-icon icon-members rightside no-bulletin"><a href="{U_MEMBERLIST}" title="{L_MEMBERLIST_EXPLAIN}">{L_MEMBERLIST}</a></li><!-- ENDIF -->
<!-- ENDIF -->
+ <li class="small-icon icon-faq rightside no-bulletin"><a href="{U_FAQ}" title="{L_FAQ_EXPLAIN}">{L_FAQ}</a></li>
+ <!-- EVENT overall_header_navigation_prepend -->
</ul>
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
</div>
- <a name="start_here"></a>
+ <a id="start_here"></a>
<div id="page-body">
<!-- IF S_BOARD_DISABLED and S_USER_LOGGED_IN and (U_MCP or U_ACP) -->
<div id="information" class="rules">
- <div class="inner"><span class="corners-top"><span></span></span>
- <strong>{L_INFORMATION}:</strong> {L_BOARD_DISABLED}
- <span class="corners-bottom"><span></span></span></div>
+ <div class="inner">
+ <strong>{L_INFORMATION}{L_COLON}</strong> {L_BOARD_DISABLED}
+ </div>
</div>
<!-- ENDIF -->
+
+ <!-- EVENT overall_header_content_before -->
diff --git a/phpBB/styles/prosilver/template/pagination.html b/phpBB/styles/prosilver/template/pagination.html
new file mode 100644
index 0000000000..e27a90900a
--- /dev/null
+++ b/phpBB/styles/prosilver/template/pagination.html
@@ -0,0 +1,18 @@
+ <!-- IF BASE_URL -->
+ <a href="#" class="pagination-trigger" title="{L_JUMP_TO_PAGE}" data-lang-jump-page="{L_JUMP_PAGE|e('html_attr')}{L_COLON}" data-on-page="{CURRENT_PAGE}" data-per-page="{PER_PAGE}" data-base-url="{BASE_URL|e('html_attr')}" data-base-is-route="{BASE_IS_ROUTE}" data-start-name="{START_NAME}">{PAGE_NUMBER}</a> &bull;
+ <!-- ELSE -->
+ {PAGE_NUMBER} &bull;
+ <!-- ENDIF -->
+ <ul>
+ <!-- BEGIN pagination -->
+ <!-- IF pagination.S_IS_PREV -->
+ <!-- ELSEIF pagination.S_IS_CURRENT -->
+ <li class="active"><span>{pagination.PAGE_NUMBER}</span></li>
+ <!-- ELSEIF pagination.S_IS_ELLIPSIS -->
+ <li class="ellipsis"><span>{L_ELLIPSIS}</span></li>
+ <!-- ELSEIF pagination.S_IS_NEXT -->
+ <!-- ELSE -->
+ <li><a href="{pagination.PAGE_URL}">{pagination.PAGE_NUMBER}</a></li>
+ <!-- ENDIF -->
+ <!-- END pagination -->
+ </ul>
diff --git a/phpBB/styles/prosilver/template/plupload.html b/phpBB/styles/prosilver/template/plupload.html
new file mode 100644
index 0000000000..fc663118c1
--- /dev/null
+++ b/phpBB/styles/prosilver/template/plupload.html
@@ -0,0 +1,69 @@
+<script type="text/javascript">
+//<![CDATA[
+phpbb.plupload = {
+ i18n: {
+ 'b': '{LA_BYTES_SHORT}',
+ 'kb': '{LA_KB}',
+ 'mb': '{LA_MB}',
+ 'gb': '{LA_GB}',
+ 'tb': '{LA_TB}',
+ 'Add Files': '{LA_PLUPLOAD_ADD_FILES}',
+ 'Add files to the upload queue and click the start button.': '{LA_PLUPLOAD_ADD_FILES_TO_QUEUE}',
+ 'Close': '{LA_PLUPLOAD_CLOSE}',
+ 'Drag files here.': '{LA_PLUPLOAD_DRAG}',
+ 'Duplicate file error.': '{LA_PLUPLOAD_DUPLICATE_ERROR}',
+ 'File: %s': '{LA_PLUPLOAD_FILE}',
+ 'File: %s, size: %d, max file size: %d': '{LA_PLUPLOAD_FILE_DETAILS}',
+ 'File count error.': '{LA_PLUPLOAD_ERR_FILE_COUNT}',
+ 'File extension error.': '{LA_PLUPLOAD_EXTENSION_ERROR}',
+ 'File size error.': '{LA_PLUPLOAD_SIZE_ERROR}',
+ 'File too large:': '{LA_PLUPLOAD_ERR_FILE_TOO_LARGE}',
+ 'Filename': '{LA_PLUPLOAD_FILENAME}',
+ 'Generic error.': '{LA_PLUPLOAD_GENERIC_ERROR}',
+ 'HTTP Error.': '{LA_PLUPLOAD_HTTP_ERROR}',
+ 'Image format either wrong or not supported.': '{LA_PLUPLOAD_IMAGE_FORMAT}',
+ 'Init error.': '{LA_PLUPLOAD_INIT_ERROR}',
+ 'IO error.': '{LA_PLUPLOAD_IO_ERROR}',
+ 'Invalid file extension:': '{LA_PLUPLOAD_ERR_FILE_INVALID_EXT}',
+ 'N/A': '{LA_PLUPLOAD_NOT_APPLICABLE}',
+ 'Runtime ran out of available memory.': '{LA_PLUPLOAD_ERR_RUNTIME_MEMORY}',
+ 'Security error.': '{LA_PLUPLOAD_SECURITY_ERROR}',
+ 'Select files': '{LA_PLUPLOAD_SELECT_FILES}',
+ 'Size': '{LA_PLUPLOAD_SIZE}',
+ 'Start Upload': '{LA_PLUPLOAD_START_UPLOAD}',
+ 'Start uploading queue': '{LA_PLUPLOAD_START_CURRENT_UPLOAD}',
+ 'Status': '{LA_PLUPLOAD_STATUS}',
+ 'Stop Upload': '{LA_PLUPLOAD_STOP_UPLOAD}',
+ 'Stop current upload': '{LA_PLUPLOAD_STOP_CURRENT_UPLOAD}',
+ "Upload URL might be wrong or doesn't exist.": '{LA_PLUPLOAD_ERR_UPLOAD_URL}',
+ 'Uploaded %d/%d files': '{LA_PLUPLOAD_UPLOADED}',
+ '%d files queued': '{LA_PLUPLOAD_FILES_QUEUED}',
+ '%s already present in the queue.': '{LA_PLUPLOAD_ALREADY_QUEUED}'
+ },
+ config: {
+ runtimes: 'html5',
+ url: '{S_PLUPLOAD_URL}',
+ max_file_size: '{FILESIZE}b',
+ chunk_size: '{CHUNK_SIZE}b',
+ unique_names: true,
+ filters: [{FILTERS}],
+ {S_RESIZE}
+ headers: {'X-PHPBB-USING-PLUPLOAD': '1', 'X-Requested-With': 'XMLHttpRequest'},
+ file_data_name: 'fileupload',
+ multipart_params: {'add_file': '{LA_ADD_FILE}'},
+ form_hook: '#postform',
+ browse_button: 'add_files',
+ drop_element : 'message',
+ },
+ lang: {
+ ERROR: '{LA_ERROR}',
+ TOO_MANY_ATTACHMENTS: '{LA_TOO_MANY_ATTACHMENTS}',
+ },
+ order: '{ATTACH_ORDER}',
+ maxFiles: {MAX_ATTACHMENTS},
+ data: {S_ATTACH_DATA},
+}
+//]]>
+</script>
+<!-- INCLUDEJS {T_ASSETS_PATH}/plupload/plupload.full.min.js -->
+<!-- INCLUDEJS {T_ASSETS_PATH}/javascript/plupload.js -->
diff --git a/phpBB/styles/prosilver/template/posting_attach_body.html b/phpBB/styles/prosilver/template/posting_attach_body.html
index d39405487d..8a2004c29b 100644
--- a/phpBB/styles/prosilver/template/posting_attach_body.html
+++ b/phpBB/styles/prosilver/template/posting_attach_body.html
@@ -1,21 +1,89 @@
-<div class="panel bg3" id="attach-panel">
- <div class="inner"><span class="corners-top"><span></span></span>
+<div class="panel bg3 panel-container" id="attach-panel">
+ <div class="inner">
- <p>{L_ADD_ATTACHMENT_EXPLAIN}</p>
+ <p>{L_ADD_ATTACHMENT_EXPLAIN} <span class="hidden" id="drag-n-drop-message">{L_PLUPLOAD_DRAG_TEXTAREA}</span></p>
- <fieldset class="fields2">
+ <fieldset class="fields2" id="attach-panel-basic">
<dl>
- <dt><label for="fileupload">{L_FILENAME}:</label></dt>
+ <dt><label for="fileupload">{L_FILENAME}{L_COLON}</label></dt>
<dd>
<input type="file" name="fileupload" id="fileupload" maxlength="{FILESIZE}" value="" class="inputbox autowidth" />
<input type="submit" name="add_file" value="{L_ADD_FILE}" class="button2" onclick="upload = true;" />
</dd>
</dl>
<dl>
- <dt><label for="filecomment">{L_FILE_COMMENT}:</label></dt>
+ <dt><label for="filecomment">{L_FILE_COMMENT}{L_COLON}</label></dt>
<dd><textarea name="filecomment" id="filecomment" rows="1" cols="40" class="inputbox autowidth">{FILE_COMMENT}</textarea></dd>
</dl>
</fieldset>
- <span class="corners-bottom"><span></span></span></div>
+ <div id="attach-panel-multi">
+ <input type="button" class="button2" value="{L_PLUPLOAD_ADD_FILES}" id="add_files" />
+ </div>
+
+ <div class="panel<!-- IF not .attach_row --> hidden<!-- ENDIF -->" id="file-list-container">
+ <div class="inner">
+ <table class="table1 zebra-list">
+ <thead>
+ <tr>
+ <th class="attach-name">{L_PLUPLOAD_FILENAME}</th>
+ <th class="attach-comment">{L_FILE_COMMENT}</th>
+ <th class="attach-filesize">{L_PLUPLOAD_SIZE}</th>
+ <th class="attach-status">{L_PLUPLOAD_STATUS}</th>
+ </tr>
+ </thead>
+ <tbody class="responsive-skip-empty" id="file-list">
+ <tr class="attach-row" id="attach-row-tpl">
+ <td class="attach-name">
+ <dfn style="display: none;">{L_PLUPLOAD_FILENAME}</dfn>
+ <span class="file-name"></span>
+ <span class="attach-controls">
+ <input type="button" value="{L_PLACE_INLINE}" class="button2 hidden file-inline-bbcode" />&nbsp;
+ <input type="button" value="{L_DELETE_FILE}" class="button2 file-delete" />
+ </span>
+ <span class="clear"></span>
+ </td>
+ <td class="attach-comment">
+ <dfn style="display: none;">{L_FILE_COMMENT}</dfn>
+ <textarea rows="1" cols="30" class="inputbox"></textarea>
+ </td>
+ <td class="attach-filesize">
+ <dfn style="display: none;">{L_PLUPLOAD_SIZE}</dfn>
+ <span class="file-size"></span>
+ </td>
+ <td class="attach-status">
+ <dfn style="display: none;">{L_PLUPLOAD_STATUS}</dfn>
+ <span class="file-progress">
+ <span class="file-progress-bar"></span>
+ </span>
+ <span class="file-status"></span>
+ </td>
+ </tr>
+ <!-- BEGIN attach_row -->
+ <tr class="attach-row" data-attach-id="{attach_row.ATTACH_ID}">
+ <td class="attach-name">
+ <span class="file-name"><a href="{attach_row.U_VIEW_ATTACHMENT}">{attach_row.FILENAME}</a></span>
+ <span class="attach-controls">
+ <!-- IF S_INLINE_ATTACHMENT_OPTIONS --><input type="button" value="{L_PLACE_INLINE}" class="button2 file-inline-bbcode" />&nbsp; <!-- ENDIF -->
+ <input type="submit" name="delete_file[{attach_row.ASSOC_INDEX}]" value="{L_DELETE_FILE}" class="button2 file-delete" />
+ </span>
+ <span class="clear"></span>
+ </td>
+ <td class="attach-comment">
+ <textarea name="comment_list[{attach_row.ASSOC_INDEX}]" rows="1" cols="30" class="inputbox">{attach_row.FILE_COMMENT}</textarea>
+ {attach_row.S_HIDDEN}
+ </td>
+ <td class="attach-filesize">
+ <span class="file-size">{attach_row.FILESIZE}</span>
+ </td>
+ <td class="attach-status">
+ <span class="file-status file-uploaded"></span>
+ </td>
+ </tr>
+ <!-- END attach_row -->
+ </tbody>
+ </table>
+ </div>
+ </div>
+ </div>
</div>
diff --git a/phpBB/styles/prosilver/template/posting_buttons.html b/phpBB/styles/prosilver/template/posting_buttons.html
index 78c2a0d9f2..1164b2ffbe 100644
--- a/phpBB/styles/prosilver/template/posting_buttons.html
+++ b/phpBB/styles/prosilver/template/posting_buttons.html
@@ -32,64 +32,55 @@
<!-- END custom_tags -->
}
- var panels = new Array('options-panel', 'attach-panel', 'poll-panel');
- var show_panel = 'options-panel';
+ function change_palette()
+ {
+ dE('colour_palette');
+ e = document.getElementById('colour_palette');
+ if (e.style.display == 'block')
+ {
+ document.getElementById('bbpalette').value = '{LA_FONT_COLOR_HIDE}';
+ }
+ else
+ {
+ document.getElementById('bbpalette').value = '{LA_FONT_COLOR}';
+ }
+ }
// ]]>
</script>
-<script type="text/javascript" src="{T_SUPER_TEMPLATE_PATH}/editor.js"></script>
+<!-- INCLUDEJS {T_ASSETS_PATH}/javascript/editor.js -->
<!-- IF S_BBCODE_ALLOWED -->
<div id="colour_palette" style="display: none;">
<dl style="clear: left;">
- <dt><label>{L_FONT_COLOR}:</label></dt>
- <dd>
- <script type="text/javascript">
- // <![CDATA[
- function change_palette()
- {
- dE('colour_palette');
- e = document.getElementById('colour_palette');
-
- if (e.style.display == 'block')
- {
- document.getElementById('bbpalette').value = '{LA_FONT_COLOR_HIDE}';
- }
- else
- {
- document.getElementById('bbpalette').value = '{LA_FONT_COLOR}';
- }
- }
-
- colorPalette('h', 15, 10);
- // ]]>
- </script>
- </dd>
+ <dt><label>{L_FONT_COLOR}{L_COLON}</label></dt>
+ <dd id="color_palette_placeholder" data-orientation="h" data-height="12" data-width="15" data-bbcode="true"></dd>
</dl>
</div>
+<!-- EVENT posting_editor_buttons_before -->
<div id="format-buttons">
- <input type="button" class="button2" accesskey="b" name="addbbcode0" value=" B " style="font-weight:bold; width: 30px" onclick="bbstyle(0)" title="{L_BBCODE_B_HELP}" />
- <input type="button" class="button2" accesskey="i" name="addbbcode2" value=" i " style="font-style:italic; width: 30px" onclick="bbstyle(2)" title="{L_BBCODE_I_HELP}" />
- <input type="button" class="button2" accesskey="u" name="addbbcode4" value=" u " style="text-decoration: underline; width: 30px" onclick="bbstyle(4)" title="{L_BBCODE_U_HELP}" />
+ <input type="button" class="button2 bbcode-b" accesskey="b" name="addbbcode0" value=" B " style="font-weight:bold; width: 30px" onclick="bbstyle(0)" title="{L_BBCODE_B_HELP}" />
+ <input type="button" class="button2 bbcode-i" accesskey="i" name="addbbcode2" value=" i " style="font-style:italic; width: 30px" onclick="bbstyle(2)" title="{L_BBCODE_I_HELP}" />
+ <input type="button" class="button2 bbcode-u" accesskey="u" name="addbbcode4" value=" u " style="text-decoration: underline; width: 30px" onclick="bbstyle(4)" title="{L_BBCODE_U_HELP}" />
<!-- IF S_BBCODE_QUOTE -->
- <input type="button" class="button2" accesskey="q" name="addbbcode6" value="Quote" style="width: 50px" onclick="bbstyle(6)" title="{L_BBCODE_Q_HELP}" />
+ <input type="button" class="button2 bbcode-quote" accesskey="q" name="addbbcode6" value="Quote" style="width: 50px" onclick="bbstyle(6)" title="{L_BBCODE_Q_HELP}" />
<!-- ENDIF -->
- <input type="button" class="button2" accesskey="c" name="addbbcode8" value="Code" style="width: 40px" onclick="bbstyle(8)" title="{L_BBCODE_C_HELP}" />
- <input type="button" class="button2" accesskey="l" name="addbbcode10" value="List" style="width: 40px" onclick="bbstyle(10)" title="{L_BBCODE_L_HELP}" />
- <input type="button" class="button2" accesskey="o" name="addbbcode12" value="List=" style="width: 40px" onclick="bbstyle(12)" title="{L_BBCODE_O_HELP}" />
- <input type="button" class="button2" accesskey="y" name="addlistitem" value="[*]" style="width: 40px" onclick="bbstyle(-1)" title="{L_BBCODE_LISTITEM_HELP}" />
+ <input type="button" class="button2 bbcode-code" accesskey="c" name="addbbcode8" value="Code" style="width: 40px" onclick="bbstyle(8)" title="{L_BBCODE_C_HELP}" />
+ <input type="button" class="button2 bbcode-list" accesskey="l" name="addbbcode10" value="List" style="width: 40px" onclick="bbstyle(10)" title="{L_BBCODE_L_HELP}" />
+ <input type="button" class="button2 bbcode-list-" accesskey="o" name="addbbcode12" value="List=" style="width: 40px" onclick="bbstyle(12)" title="{L_BBCODE_O_HELP}" />
+ <input type="button" class="button2 bbcode-asterisk" accesskey="y" name="addlistitem" value="[*]" style="width: 40px" onclick="bbstyle(-1)" title="{L_BBCODE_LISTITEM_HELP}" />
<!-- IF S_BBCODE_IMG -->
- <input type="button" class="button2" accesskey="p" name="addbbcode14" value="Img" style="width: 40px" onclick="bbstyle(14)" title="{L_BBCODE_P_HELP}" />
+ <input type="button" class="button2 bbcode-img" accesskey="p" name="addbbcode14" value="Img" style="width: 40px" onclick="bbstyle(14)" title="{L_BBCODE_P_HELP}" />
<!-- ENDIF -->
<!-- IF S_LINKS_ALLOWED -->
- <input type="button" class="button2" accesskey="w" name="addbbcode16" value="URL" style="text-decoration: underline; width: 40px" onclick="bbstyle(16)" title="{L_BBCODE_W_HELP}" />
+ <input type="button" class="button2 bbcode-url" accesskey="w" name="addbbcode16" value="URL" style="text-decoration: underline; width: 40px" onclick="bbstyle(16)" title="{L_BBCODE_W_HELP}" />
<!-- ENDIF -->
<!-- IF S_BBCODE_FLASH -->
- <input type="button" class="button2" accesskey="d" name="addbbcode18" value="Flash" onclick="bbstyle(18)" title="{L_BBCODE_D_HELP}" />
+ <input type="button" class="button2 bbcode-flash" accesskey="d" name="addbbcode18" value="Flash" onclick="bbstyle(18)" title="{L_BBCODE_D_HELP}" />
<!-- ENDIF -->
- <select name="addbbcode20" onchange="bbfontstyle('[size=' + this.form.addbbcode20.options[this.form.addbbcode20.selectedIndex].value + ']', '[/size]');this.form.addbbcode20.selectedIndex = 2;" title="{L_BBCODE_F_HELP}">
+ <select name="addbbcode20" class="bbcode-size" onchange="bbfontstyle('[size=' + this.form.addbbcode20.options[this.form.addbbcode20.selectedIndex].value + ']', '[/size]');this.form.addbbcode20.selectedIndex = 2;" title="{L_BBCODE_F_HELP}">
<option value="50">{L_FONT_TINY}</option>
<option value="85">{L_FONT_SMALL}</option>
<option value="100" selected="selected">{L_FONT_NORMAL}</option>
@@ -100,9 +91,10 @@
<!-- ENDIF -->
<!-- ENDIF -->
</select>
- <input type="button" class="button2" name="bbpalette" id="bbpalette" value="{L_FONT_COLOR}" onclick="change_palette();" title="{L_BBCODE_S_HELP}" />
+ <input type="button" class="button2 bbcode-color" name="bbpalette" id="bbpalette" value="{L_FONT_COLOR}" onclick="change_palette();" title="{L_BBCODE_S_HELP}" />
<!-- BEGIN custom_tags -->
- <input type="button" class="button2" name="addbbcode{custom_tags.BBCODE_ID}" value="{custom_tags.BBCODE_TAG}" onclick="bbstyle({custom_tags.BBCODE_ID})" title="{custom_tags.BBCODE_HELPLINE}" />
+ <input type="button" class="button2 bbcode-{custom_tags.BBCODE_TAG_CLEAN}" name="addbbcode{custom_tags.BBCODE_ID}" value="{custom_tags.BBCODE_TAG}" onclick="bbstyle({custom_tags.BBCODE_ID})" title="{custom_tags.BBCODE_HELPLINE}" />
<!-- END custom_tags -->
</div>
+<!-- EVENT posting_editor_buttons_after -->
<!-- ENDIF -->
diff --git a/phpBB/styles/prosilver/template/posting_editor.html b/phpBB/styles/prosilver/template/posting_editor.html
index 5acdb3a08c..e311b85cbe 100644
--- a/phpBB/styles/prosilver/template/posting_editor.html
+++ b/phpBB/styles/prosilver/template/posting_editor.html
@@ -1,91 +1,9 @@
-<script type="text/javascript">
-// <![CDATA[
- onload_functions.push('apply_onkeypress_event()');
-// ]]>
-</script>
-
<fieldset class="fields1">
- <!-- IF ERROR --><p class="error">{ERROR}</p><!-- ENDIF -->
-
- <!-- IF S_PRIVMSGS and not S_SHOW_DRAFTS -->
-
- <div class="column1">
- <!-- IF S_ALLOW_MASS_PM -->
- <!-- IF .to_recipient -->
- <dl>
- <dt><label>{L_TO}:</label></dt>
- <dd>
- <!-- BEGIN to_recipient -->
- <!-- IF not to_recipient.S_FIRST_ROW and to_recipient.S_ROW_COUNT mod 2 eq 0 --></dd><dd><!-- ENDIF -->
- <!-- IF to_recipient.IS_GROUP --><a href="{to_recipient.U_VIEW}"><strong>{to_recipient.NAME}</strong></a><!-- ELSE -->{to_recipient.NAME_FULL}<!-- ENDIF -->&nbsp;
- <!-- IF not S_EDIT_POST --><input type="submit" name="remove_{to_recipient.TYPE}[{to_recipient.UG_ID}]" value="x" class="button2" />&nbsp;<!-- ENDIF -->
- <!-- END to_recipient -->
- </dd>
- </dl>
- <!-- ENDIF -->
- <!-- IF .bcc_recipient -->
- <dl>
- <dt><label>{L_BCC}:</label></dt>
- <dd>
- <!-- BEGIN bcc_recipient -->
- <!-- IF not bcc_recipient.S_FIRST_ROW and bcc_recipient.S_ROW_COUNT mod 2 eq 0 --></dd><dd><!-- ENDIF -->
- <!-- IF bcc_recipient.IS_GROUP --><a href="{bcc_recipient.U_VIEW}"><strong>{bcc_recipient.NAME}</strong></a><!-- ELSE -->{bcc_recipient.NAME_FULL}<!-- ENDIF -->&nbsp;
- <!-- IF not S_EDIT_POST --><input type="submit" name="remove_{bcc_recipient.TYPE}[{bcc_recipient.UG_ID}]" value="x" class="button2" />&nbsp;<!-- ENDIF -->
- <!-- END bcc_recipient -->
- </dd>
- </dl>
- <!-- ENDIF -->
- <!-- IF not S_EDIT_POST -->
- <dl class="pmlist">
- <dt><textarea id="username_list" name="username_list" class="inputbox" cols="50" rows="2" tabindex="1"></textarea></dt>
- <dd><span><a href="{U_FIND_USERNAME}" onclick="find_username(this.href); return false;">{L_FIND_USERNAME}</a></span></dd>
- <dd><input type="submit" name="add_to" value="{L_ADD}" class="button2" tabindex="1" /></dd>
- <dd><input type="submit" name="add_bcc" value="{L_ADD_BCC}" class="button2" tabindex="1" /></dd>
- </dl>
- <!-- ENDIF -->
- <!-- ELSE -->
- <dl>
- <dt><label for="username_list">{L_TO}:</label><!-- IF not S_EDIT_POST --><br /><span><a href="{U_FIND_USERNAME}" onclick="find_username(this.href); return false">{L_FIND_USERNAME}</a></span><!-- ENDIF --></dt>
- <!-- IF .to_recipient -->
- <dd>
- <!-- BEGIN to_recipient -->
- <!-- IF not to_recipient.S_FIRST_ROW and to_recipient.S_ROW_COUNT mod 2 eq 0 --></dd><dd><!-- ENDIF -->
- <!-- IF to_recipient.IS_GROUP --><a href="{to_recipient.U_VIEW}"><strong>{to_recipient.NAME}</strong></a><!-- ELSE -->{to_recipient.NAME_FULL}<!-- ENDIF -->&nbsp;
- <!-- IF not S_EDIT_POST --><input type="submit" name="remove_{to_recipient.TYPE}[{to_recipient.UG_ID}]" value="x" class="button2" />&nbsp;<!-- ENDIF -->
- <!-- END to_recipient -->
- </dd>
- <!-- ENDIF -->
-
- <!-- IF not S_EDIT_POST -->
- <dd><input class="inputbox" type="text" name="username_list" id="username_list" size="20" value="" /> <input type="submit" name="add_to" value="{L_ADD}" class="button2" /></dd>
- <!-- ENDIF -->
- </dl>
- <!-- ENDIF -->
-
- </div>
-
- <!-- IF S_GROUP_OPTIONS -->
- <div class="column2">
- <dl>
- <dd><label for="group_list">{L_USERGROUPS}:</label> <select name="group_list[]" id="group_list" multiple="multiple" size="4" class="inputbox">{S_GROUP_OPTIONS}</select></dd>
- </dl>
- </div>
- <!-- ENDIF -->
-
- <div class="clear"></div>
-
- <!-- ENDIF -->
-
- <!-- IF S_DELETE_ALLOWED -->
- <dl>
- <dt><label for="delete">{L_DELETE_POST}:</label></dt>
- <dd><label for="delete"><input type="checkbox" name="delete" id="delete" /> {L_DELETE_POST_WARN}</label></dd>
- </dl>
- <!-- ENDIF -->
+<!-- IF ERROR --><p class="error">{ERROR}</p><!-- ENDIF -->
<!-- IF S_SHOW_TOPIC_ICONS or S_SHOW_PM_ICONS -->
<dl>
- <dt><label for="icon">{L_ICON}:</label></dt>
+ <dt><label for="icon">{L_ICON}{L_COLON}</label></dt>
<dd>
<label for="icon"><input type="radio" name="icon" id="icon" value="0" checked="checked" tabindex="1" /> <!-- IF S_SHOW_TOPIC_ICONS -->{L_NO_TOPIC_ICON}<!-- ELSE -->{L_NO_PM_ICON}<!-- ENDIF --></label>
<!-- BEGIN topic_icon --><label for="icon-{topic_icon.ICON_ID}"><input type="radio" name="icon" id="icon-{topic_icon.ICON_ID}" value="{topic_icon.ICON_ID}" {topic_icon.S_ICON_CHECKED} tabindex="1" /><img src="{topic_icon.ICON_IMG}" width="{topic_icon.ICON_WIDTH}" height="{topic_icon.ICON_HEIGHT}" alt="" title="" /></label> <!-- END topic_icon -->
@@ -95,15 +13,17 @@
<!-- IF not S_PRIVMSGS and S_DISPLAY_USERNAME -->
<dl style="clear: left;">
- <dt><label for="username">{L_USERNAME}:</label></dt>
+ <dt><label for="username">{L_USERNAME}{L_COLON}</label></dt>
<dd><input type="text" tabindex="1" name="username" id="username" size="25" value="{USERNAME}" class="inputbox autowidth" /></dd>
</dl>
<!-- ENDIF -->
+ <!-- EVENT posting_editor_subject_before -->
+
<!-- IF S_POST_ACTION or S_PRIVMSGS or S_EDIT_DRAFT -->
<dl style="clear: left;">
- <dt><label for="subject">{L_SUBJECT}:</label></dt>
- <dd><input type="text" name="subject" id="subject" size="45" maxlength="<!-- IF S_NEW_MESSAGE -->60<!-- ELSE -->64<!-- ENDIF -->" tabindex="2" value="{SUBJECT}{DRAFT_SUBJECT}" class="inputbox autowidth" /></dd>
+ <dt><label for="subject">{L_SUBJECT}{L_COLON}</label></dt>
+ <dd><input type="text" name="subject" id="subject" size="45" maxlength="<!-- IF S_NEW_MESSAGE -->120<!-- ELSE -->124<!-- ENDIF -->" tabindex="2" value="{SUBJECT}{DRAFT_SUBJECT}" class="inputbox autowidth" /></dd>
</dl>
<!-- IF CAPTCHA_TEMPLATE and S_CONFIRM_CODE -->
<!-- DEFINE $CAPTCHA_TAB_INDEX = 3 -->
@@ -111,6 +31,8 @@
<!-- ENDIF -->
<!-- ENDIF -->
+ <!-- EVENT posting_editor_subject_after -->
+
<!-- INCLUDE posting_buttons.html -->
<div id="smiley-box">
@@ -125,14 +47,16 @@
<!-- ENDIF -->
<!-- IF BBCODE_STATUS -->
- <!-- IF .smiley --><hr /><!-- ENDIF -->
- {BBCODE_STATUS}<br />
- <!-- IF S_BBCODE_ALLOWED -->
- {IMG_STATUS}<br />
- {FLASH_STATUS}<br />
- {URL_STATUS}<br />
- <!-- ENDIF -->
- {SMILIES_STATUS}
+ <div class="bbcode-status">
+ <!-- IF .smiley --><hr /><!-- ENDIF -->
+ {BBCODE_STATUS}<br />
+ <!-- IF S_BBCODE_ALLOWED -->
+ {IMG_STATUS}<br />
+ {FLASH_STATUS}<br />
+ {URL_STATUS}<br />
+ <!-- ENDIF -->
+ {SMILIES_STATUS}
+ </div>
<!-- ENDIF -->
<!-- IF S_EDIT_DRAFT || S_DISPLAY_REVIEW -->
<!-- IF S_DISPLAY_REVIEW --><hr /><!-- ENDIF -->
@@ -141,49 +65,25 @@
<!-- ENDIF -->
</div>
+ <!-- EVENT posting_editor_message_before -->
+
<div id="message-box">
<textarea <!-- IF S_UCP_ACTION and not S_PRIVMSGS and not S_EDIT_DRAFT -->name="signature" id="signature" style="height: 9em;"<!-- ELSE -->name="message" id="message"<!-- ENDIF --> rows="15" cols="76" tabindex="4" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);" onfocus="initInsertions();" class="inputbox">{MESSAGE}{DRAFT_MESSAGE}{SIGNATURE}</textarea>
</div>
-</fieldset>
+
+ <!-- EVENT posting_editor_message_after -->
+ </fieldset>
<!-- IF $EXTRA_POSTING_OPTIONS eq 1 -->
<!-- IF not S_SHOW_DRAFTS -->
- <span class="corners-bottom"><span></span></span></div>
- </div>
- <!-- ENDIF -->
-
- <!-- IF S_HAS_ATTACHMENTS -->
- <div class="panel bg2">
- <div class="inner"><span class="corners-top"><span></span></span>
- <h3>{L_POSTED_ATTACHMENTS}</h3>
-
- <fieldset class="fields2">
-
- <!-- BEGIN attach_row -->
- <dl>
-
- <dt><label for="comment_list_{attach_row.ASSOC_INDEX}">{L_FILE_COMMENT}:</label></dt>
- <dd><textarea name="comment_list[{attach_row.ASSOC_INDEX}]" id="comment_list_{attach_row.ASSOC_INDEX}" rows="1" cols="35" class="inputbox">{attach_row.FILE_COMMENT}</textarea></dd>
- <dd><a href="{attach_row.U_VIEW_ATTACHMENT}">{attach_row.FILENAME}</a></dd>
- <dd style="margin-top: 5px;">
- <!-- IF S_INLINE_ATTACHMENT_OPTIONS --><input type="button" value="{L_PLACE_INLINE}" onclick="attach_inline({attach_row.ASSOC_INDEX}, '{attach_row.A_FILENAME}');" class="button2" />&nbsp; <!-- ENDIF -->
- <input type="submit" name="delete_file[{attach_row.ASSOC_INDEX}]" value="{L_DELETE_FILE}" class="button2" />
- </dd>
- </dl>
- {attach_row.S_HIDDEN}
- <!-- IF not attach_row.S_LAST_ROW --><hr class="dashed" /><!-- ENDIF -->
- <!-- END attach_row -->
-
- </fieldset>
-
- <span class="corners-bottom"><span></span></span></div>
</div>
+ </div>
<!-- ENDIF -->
<!-- IF not S_SHOW_DRAFTS and not $SIG_EDIT eq 1 -->
<div class="panel bg2">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<fieldset class="submit-buttons">
{S_HIDDEN_ADDRESS_FIELD}
{S_HIDDEN_FIELDS}
@@ -194,25 +94,34 @@
</fieldset>
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
<!-- ENDIF -->
<!-- IF not S_PRIVMSGS and not S_SHOW_DRAFTS and not $SIG_EDIT eq 1 -->
- <div id="tabs">
+ <div id="tabs" class="sub-panels" data-show-panel="options-panel">
<ul>
- <li id="options-panel-tab" class="activetab"><a href="#tabs" onclick="subPanels('options-panel'); return false;"><span>{L_OPTIONS}</span></a></li>
- <!-- IF S_SHOW_ATTACH_BOX --><li id="attach-panel-tab"><a href="#tabs" onclick="subPanels('attach-panel'); return false;"><span>{L_ADD_ATTACHMENT}</span></a></li><!-- ENDIF -->
- <!-- IF S_SHOW_POLL_BOX || S_POLL_DELETE --><li id="poll-panel-tab"><a href="#tabs" onclick="subPanels('poll-panel'); return false;"><span>{L_ADD_POLL}</span></a></li><!-- ENDIF -->
+ <li id="options-panel-tab" class="activetab"><a href="#tabs" data-subpanel="options-panel"><span>{L_OPTIONS}</span></a></li>
+ <!-- IF S_SHOW_ATTACH_BOX -->
+ <li id="attach-panel-tab">
+ <a href="#tabs" data-subpanel="attach-panel">
+ <span>
+ {L_ATTACHMENTS} <strong id="file-total-progress"><strong id="file-total-progress-bar"></strong></strong>
+ </span>
+ </a>
+ </li>
+ <!-- ENDIF -->
+ <!-- IF S_SHOW_POLL_BOX || S_POLL_DELETE --><li id="poll-panel-tab"><a href="#tabs" data-subpanel="poll-panel"><span>{L_ADD_POLL}</span></a></li><!-- ENDIF -->
</ul>
</div>
<!-- ENDIF -->
<!-- IF not S_SHOW_DRAFTS and not $SIG_EDIT eq 1 -->
<div class="panel bg3" id="options-panel">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<fieldset class="fields1">
+ <!-- EVENT posting_editor_options_prepend -->
<!-- IF S_BBCODE_ALLOWED -->
<div><label for="disable_bbcode"><input type="checkbox" name="disable_bbcode" id="disable_bbcode"{S_BBCODE_CHECKED} /> {L_DISABLE_BBCODE}</label></div>
<!-- ENDIF -->
@@ -241,26 +150,37 @@
<!-- IF S_TYPE_TOGGLE -->
<dl>
- <dt><label for="topic_type-0"><!-- IF S_EDIT_POST -->{L_CHANGE_TOPIC_TO}<!-- ELSE -->{L_POST_TOPIC_AS}<!-- ENDIF -->:</label></dt>
+ <dt><label for="topic_type-0"><!-- IF S_EDIT_POST -->{L_CHANGE_TOPIC_TO}<!-- ELSE -->{L_POST_TOPIC_AS}<!-- ENDIF -->{L_COLON}</label></dt>
<dd><!-- BEGIN topic_type --><label for="topic_type-{topic_type.VALUE}"><input type="radio" name="topic_type" id="topic_type-{topic_type.VALUE}" value="{topic_type.VALUE}"{topic_type.S_CHECKED} />{topic_type.L_TOPIC_TYPE}</label> <!-- END topic_type --></dd>
</dl>
<!-- ENDIF -->
<!-- IF S_TOPIC_TYPE_ANNOUNCE or S_TOPIC_TYPE_STICKY -->
<dl>
- <dt><label for="topic_time_limit">{L_STICK_TOPIC_FOR}:</label></dt>
- <dd><label for="topic_time_limit"><input type="text" name="topic_time_limit" id="topic_time_limit" size="3" maxlength="3" value="{TOPIC_TIME_LIMIT}" class="inputbox autowidth" /> {L_DAYS}</label></dd>
+ <dt><label for="topic_time_limit">{L_STICK_TOPIC_FOR}{L_COLON}</label></dt>
+ <dd><label for="topic_time_limit"><input type="number" min="0" max="999" name="topic_time_limit" id="topic_time_limit" size="3" maxlength="3" value="{TOPIC_TIME_LIMIT}" class="inputbox autowidth" /> {L_DAYS}</label></dd>
<dd>{L_STICK_TOPIC_FOR_EXPLAIN}</dd>
</dl>
<!-- ENDIF -->
+ <!-- IF S_SOFTDELETE_ALLOWED or S_DELETE_ALLOWED -->
+ <hr class="dashed" />
+ <dl>
+ <dt><label for="delete">{L_DELETE_POST}{L_COLON}</label></dt>
+ <dd><label for="delete"><input type="checkbox" name="delete" id="delete" {S_SOFTDELETE_CHECKED} /> {L_DELETE_POST_WARN}</label></dd>
+ <!-- IF S_DELETE_ALLOWED and S_SOFTDELETE_ALLOWED -->
+ <dd><label for="delete_permanent"><input type="checkbox" name="delete_permanent" id="delete_permanent" /> {L_DELETE_POST_PERMANENTLY}</label></dd>
+ <!-- ENDIF -->
+ </dl>
+ <!-- ENDIF -->
+
<!-- IF S_EDIT_REASON -->
<dl>
- <dt><label for="edit_reason">{L_EDIT_REASON}:</label></dt>
+ <dt><label for="edit_reason">{L_EDIT_REASON}{L_COLON}</label></dt>
<dd><input type="text" name="edit_reason" id="edit_reason" value="{EDIT_REASON}" class="inputbox" /></dd>
</dl>
<!-- ENDIF -->
</fieldset>
<!-- ENDIF -->
-<!-- ENDIF --> \ No newline at end of file
+<!-- ENDIF -->
diff --git a/phpBB/styles/prosilver/template/posting_layout.html b/phpBB/styles/prosilver/template/posting_layout.html
index b81c8162d7..0b9ddedf47 100644
--- a/phpBB/styles/prosilver/template/posting_layout.html
+++ b/phpBB/styles/prosilver/template/posting_layout.html
@@ -7,8 +7,8 @@
<!-- ENDIF -->
<!-- IF S_FORUM_RULES -->
- <div class="rules">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="rules<!-- IF U_FORUM_RULES --> rules-link<!-- ENDIF -->">
+ <div class="inner">
<!-- IF U_FORUM_RULES -->
<a href="{U_FORUM_RULES}">{L_FORUM_RULES}</a>
@@ -17,7 +17,7 @@
{FORUM_RULES}
<!-- ENDIF -->
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
<!-- ENDIF -->
@@ -25,12 +25,12 @@
<!-- IF S_DRAFT_LOADED -->
<div class="panel">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<h3>{L_INFORMATION}</h3>
<p>{L_DRAFT_LOADED}</p>
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
<!-- ENDIF -->
@@ -40,12 +40,12 @@
<!-- IF S_UNGLOBALISE -->
<div class="panel bg3">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<fieldset class="fields1">
<h2>{L_SELECT_DESTINATION_FORUM}</h2>
<p>{L_UNGLOBALISE_EXPLAIN}</p>
<dl>
- <dt><label for="to_forum_id">{L_MOVE}:</label></dt>
+ <dt><label for="to_forum_id">{L_MOVE}{L_COLON}</label></dt>
<dd><select id="to_forum_id" name="to_forum_id">{S_FORUM_SELECT}</select></dd>
</dl>
@@ -55,21 +55,21 @@
</dl>
</fieldset>
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
<!-- ENDIF -->
<!-- IF S_DISPLAY_PREVIEW --><!-- INCLUDE posting_preview.html --><!-- ENDIF -->
<div class="panel" id="postingbox">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<h3>{L_POST_A}</h3>
<!-- DEFINE $EXTRA_POSTING_OPTIONS = 1 -->
<!-- INCLUDE posting_editor.html -->
{S_FORM_TOKEN}
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
<!-- IF S_SHOW_ATTACH_BOX --><!-- INCLUDE posting_attach_body.html --><!-- ENDIF -->
@@ -79,12 +79,5 @@
<!-- IF S_DISPLAY_REVIEW --><!-- INCLUDE posting_topic_review.html --><!-- ENDIF -->
</form>
-<!-- IF not S_PRIVMSGS -->
-<script type="text/javascript">
-// <![CDATA[
- subPanels(show_panel);
-// ]]>
-</script>
-<!-- ENDIF -->
<!-- INCLUDE overall_footer.html -->
diff --git a/phpBB/styles/prosilver/template/posting_pm_header.html b/phpBB/styles/prosilver/template/posting_pm_header.html
new file mode 100644
index 0000000000..114b361e9a
--- /dev/null
+++ b/phpBB/styles/prosilver/template/posting_pm_header.html
@@ -0,0 +1,82 @@
+<fieldset class="fields1">
+ <!-- IF not S_SHOW_DRAFTS -->
+
+ <!-- IF S_GROUP_OPTIONS -->
+ <div class="column2">
+ <label for="group_list"><strong>{L_TO_ADD_GROUPS}{L_COLON}</strong></label><br />
+ <select name="group_list[]" id="group_list" multiple="multiple" size="3" class="inputbox">{S_GROUP_OPTIONS}</select><br />
+ </div>
+ <!-- ENDIF -->
+ <!-- IF S_ALLOW_MASS_PM -->
+ <div class="column1">
+ <!-- IF not S_EDIT_POST -->
+ <dl class="pmlist">
+ <dt><label><strong>{L_TO_ADD_MASS}{L_COLON}</strong><textarea id="username_list" name="username_list" class="inputbox" cols="50" rows="2" tabindex="1"></textarea></label></dt>
+ <dd class="recipients">
+ <input type="submit" name="add_to" value="{L_ADD}" class="button2" tabindex="1" />
+ <input type="submit" name="add_bcc" value="{L_ADD_BCC}" class="button2" tabindex="1" />
+ <span><a href="{U_FIND_USERNAME}" onclick="find_username(this.href); return false;">{L_FIND_USERNAME}</a></span>
+ </dd>
+ </dl>
+ <!-- ENDIF -->
+ </div>
+ <!-- IF .to_recipient or .bcc_recipient --><hr /><!-- ENDIF -->
+ <div class="column1">
+ <!-- IF .to_recipient -->
+ <dl>
+ <dt><label>{L_TO_MASS}{L_COLON}</label></dt>
+ <dd class="recipients">
+ <ul class="recipients">
+ <!-- BEGIN to_recipient -->
+ <li>
+ <!-- IF not S_EDIT_POST --><input type="submit" name="remove_{to_recipient.TYPE}[{to_recipient.UG_ID}]" value="x" class="button2" /><!-- ENDIF -->
+ <!-- IF to_recipient.IS_GROUP --><a href="{to_recipient.U_VIEW}"><strong>{to_recipient.NAME}</strong></a><!-- ELSE -->{to_recipient.NAME_FULL}<!-- ENDIF -->
+ </li>
+ <!-- END to_recipient -->
+ </ul>
+ </dd>
+ </dl>
+ <!-- ENDIF -->
+ </div>
+ <!-- IF .bcc_recipient -->
+ <div class="column2">
+ <dl>
+ <dt><label>{L_BCC}{L_COLON}</label></dt>
+ <dd class="recipients">
+ <ul class="recipients">
+ <!-- BEGIN bcc_recipient -->
+ <li>
+ <!-- IF not S_EDIT_POST --><input type="submit" name="remove_{bcc_recipient.TYPE}[{bcc_recipient.UG_ID}]" value="x" class="button2" /><!-- ENDIF -->
+ <!-- IF bcc_recipient.IS_GROUP --><a href="{bcc_recipient.U_VIEW}"><strong>{bcc_recipient.NAME}</strong></a><!-- ELSE -->{bcc_recipient.NAME_FULL}<!-- ENDIF -->
+ </li>
+ <!-- END bcc_recipient -->
+ </ul>
+ </dd>
+ </dl>
+ </div>
+ <!-- ENDIF -->
+ <!-- ELSE -->
+ <div class="column1">
+ <dl>
+ <dt><label for="username_list">{L_TO_ADD}{L_COLON}</label><!-- IF not S_EDIT_POST --><br /><span><a href="{U_FIND_USERNAME}" onclick="find_username(this.href); return false">{L_FIND_USERNAME}</a></span><!-- ENDIF --></dt>
+ <!-- IF not S_EDIT_POST -->
+ <dd><input class="inputbox" type="text" name="username_list" id="username_list" size="20" value="" /> <input type="submit" name="add_to" value="{L_ADD}" class="button2" /></dd>
+ <!-- ENDIF -->
+ <!-- IF .to_recipient -->
+ <dd class="recipients">
+ <ul class="recipients">
+ <!-- BEGIN to_recipient -->
+ <li>
+ <!-- IF to_recipient.IS_GROUP --><a href="{to_recipient.U_VIEW}"><strong>{to_recipient.NAME}</strong></a><!-- ELSE -->{to_recipient.NAME_FULL}<!-- ENDIF -->&nbsp;
+ <!-- IF not S_EDIT_POST --><input type="submit" name="remove_{to_recipient.TYPE}[{to_recipient.UG_ID}]" value="x" class="button2" /><!-- ENDIF -->
+ </li>
+ <!-- END to_recipient -->
+ </dd>
+ <!-- ENDIF -->
+ </dl>
+ </div>
+ <!-- ENDIF -->
+
+ <div class="clear"></div>
+ <!-- ENDIF -->
+ </fieldset>
diff --git a/phpBB/styles/prosilver/template/posting_pm_layout.html b/phpBB/styles/prosilver/template/posting_pm_layout.html
index 48812da102..c9b4a915ae 100644
--- a/phpBB/styles/prosilver/template/posting_pm_layout.html
+++ b/phpBB/styles/prosilver/template/posting_pm_layout.html
@@ -2,12 +2,12 @@
<!-- IF S_DRAFT_LOADED -->
<div class="panel">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<h3>{L_INFORMATION}</h3>
<p>{L_DRAFT_LOADED_PM}</p>
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
<!-- ENDIF -->
@@ -17,13 +17,19 @@
<h2>{L_TITLE}</h2>
+<div class="panel" id="pmheader-postingbox">
+ <div class="inner">
+ <!-- INCLUDE posting_pm_header.html -->
+ </div>
+</div>
+
<div class="panel" id="postingbox">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<!-- DEFINE $EXTRA_POSTING_OPTIONS = 1 -->
<!-- INCLUDE posting_editor.html -->
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
<!-- IF S_SHOW_ATTACH_BOX --><!-- INCLUDE posting_attach_body.html --><!-- ENDIF -->
@@ -32,4 +38,4 @@
<!-- IF S_DISPLAY_HISTORY --><!-- INCLUDE ucp_pm_history.html --><!-- ENDIF -->
-<!-- INCLUDE ucp_footer.html --> \ No newline at end of file
+<!-- INCLUDE ucp_footer.html -->
diff --git a/phpBB/styles/prosilver/template/posting_poll_body.html b/phpBB/styles/prosilver/template/posting_poll_body.html
index ba0014ce57..a131c10533 100644
--- a/phpBB/styles/prosilver/template/posting_poll_body.html
+++ b/phpBB/styles/prosilver/template/posting_poll_body.html
@@ -1,5 +1,5 @@
<div class="panel bg3" id="poll-panel">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<!-- IF S_SHOW_POLL_BOX -->
<p>{L_ADD_POLL_EXPLAIN}</p>
@@ -9,48 +9,48 @@
<!-- IF S_SHOW_POLL_BOX -->
<!-- IF S_POLL_DELETE -->
<dl>
- <dt><label for="poll_delete">{L_POLL_DELETE}:</label></dt>
+ <dt><label for="poll_delete">{L_POLL_DELETE}{L_COLON}</label></dt>
<dd><label for="poll_delete"><input type="checkbox" name="poll_delete" id="poll_delete"<!-- IF S_POLL_DELETE_CHECKED --> checked="checked"<!-- ENDIF --> /> </label></dd>
</dl>
<!-- ENDIF -->
<dl>
- <dt><label for="poll_title">{L_POLL_QUESTION}:</label></dt>
+ <dt><label for="poll_title">{L_POLL_QUESTION}{L_COLON}</label></dt>
<dd><input type="text" name="poll_title" id="poll_title" maxlength="255" value="{POLL_TITLE}" class="inputbox" /></dd>
</dl>
<dl>
- <dt><label for="poll_option_text">{L_POLL_OPTIONS}:</label><br /><span>{L_POLL_OPTIONS_EXPLAIN}</span></dt>
+ <dt><label for="poll_option_text">{L_POLL_OPTIONS}{L_COLON}</label><br /><span>{L_POLL_OPTIONS_EXPLAIN}</span></dt>
<dd><textarea name="poll_option_text" id="poll_option_text" rows="5" cols="35" class="inputbox">{POLL_OPTIONS}</textarea></dd>
</dl>
<hr class="dashed" />
<dl>
- <dt><label for="poll_max_options">{L_POLL_MAX_OPTIONS}:</label></dt>
- <dd><input type="text" name="poll_max_options" id="poll_max_options" size="3" maxlength="3" value="{POLL_MAX_OPTIONS}" class="inputbox autowidth" /></dd>
+ <dt><label for="poll_max_options">{L_POLL_MAX_OPTIONS}{L_COLON}</label></dt>
+ <dd><input type="number" min="0" max="999" name="poll_max_options" id="poll_max_options" size="3" maxlength="3" value="{POLL_MAX_OPTIONS}" class="inputbox autowidth" /></dd>
<dd>{L_POLL_MAX_OPTIONS_EXPLAIN}</dd>
</dl>
<dl>
- <dt><label for="poll_length">{L_POLL_FOR}:</label></dt>
- <dd><label for="poll_length"><input type="text" name="poll_length" id="poll_length" size="3" maxlength="3" value="{POLL_LENGTH}" class="inputbox autowidth" /> {L_DAYS}</label></dd>
+ <dt><label for="poll_length">{L_POLL_FOR}{L_COLON}</label></dt>
+ <dd><label for="poll_length"><input type="number" min="0" max="999" name="poll_length" id="poll_length" size="3" maxlength="3" value="{POLL_LENGTH}" class="inputbox autowidth" /> {L_DAYS}</label></dd>
<dd>{L_POLL_FOR_EXPLAIN}</dd>
</dl>
<!-- IF S_POLL_VOTE_CHANGE -->
<hr class="dashed" />
-
+
<dl>
- <dt><label for="poll_vote_change">{L_POLL_VOTE_CHANGE}:</label></dt>
+ <dt><label for="poll_vote_change">{L_POLL_VOTE_CHANGE}{L_COLON}</label></dt>
<dd><label for="poll_vote_change"><input type="checkbox" id="poll_vote_change" name="poll_vote_change"{VOTE_CHANGE_CHECKED} /> {L_POLL_VOTE_CHANGE_EXPLAIN}</label></dd>
</dl>
<!-- ENDIF -->
<!-- ELSEIF S_POLL_DELETE -->
<dl class="fields1">
- <dt><label for="poll_delete">{L_POLL_DELETE}:</label></dt>
+ <dt><label for="poll_delete">{L_POLL_DELETE}{L_COLON}</label></dt>
<dd><label for="poll_delete"><input type="checkbox" name="poll_delete" id="poll_delete"<!-- IF S_POLL_DELETE_CHECKED --> checked="checked"<!-- ENDIF --> /> </label></dd>
</dl>
<!-- ENDIF -->
</fieldset>
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
diff --git a/phpBB/styles/prosilver/template/posting_preview.html b/phpBB/styles/prosilver/template/posting_preview.html
index 82227c23b0..a5aae8c436 100644
--- a/phpBB/styles/prosilver/template/posting_preview.html
+++ b/phpBB/styles/prosilver/template/posting_preview.html
@@ -1,9 +1,9 @@
<div class="post <!-- IF S_PRIVMSGS -->pm<!-- ELSE -->bg2<!-- ENDIF -->" id="preview">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<!-- IF S_HAS_POLL_OPTIONS -->
<div class="content">
- <h2>{L_PREVIEW}: {POLL_QUESTION}</h2>
+ <h2>{L_PREVIEW}{L_COLON} {POLL_QUESTION}</h2>
<p class="author"><!-- IF L_POLL_LENGTH -->{L_POLL_LENGTH}<br /><!-- ENDIF -->{L_MAX_VOTES}</p>
<fieldset class="polls">
@@ -16,16 +16,16 @@
</fieldset>
</div>
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
<div class="post bg2">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<!-- ENDIF -->
<div class="postbody">
- <h3>{L_PREVIEW}: {PREVIEW_SUBJECT}</h3>
+ <h3>{L_PREVIEW}{L_COLON} {PREVIEW_SUBJECT}</h3>
<div class="content">{PREVIEW_MESSAGE}</div>
@@ -41,7 +41,7 @@
<!-- IF PREVIEW_SIGNATURE --><div class="signature">{PREVIEW_SIGNATURE}</div><!-- ENDIF -->
</div>
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
<hr />
diff --git a/phpBB/styles/prosilver/template/posting_review.html b/phpBB/styles/prosilver/template/posting_review.html
index 78b994c989..2771c9829a 100644
--- a/phpBB/styles/prosilver/template/posting_review.html
+++ b/phpBB/styles/prosilver/template/posting_review.html
@@ -5,11 +5,11 @@
<!-- BEGIN post_review_row -->
<!-- IF post_review_row.S_IGNORE_POST -->
<div class="post bg3 post-ignore">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
{post_review_row.L_IGNORE_POST}
<!-- ELSE -->
<div class="post <!-- IF post_review_row.S_ROW_COUNT is odd -->bg1<!-- ELSE -->bg2<!-- ENDIF --><!-- IF post_review_row.ONLINE_STATUS --> online<!-- ENDIF -->">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<!-- ENDIF -->
<div class="postbody" id="ppr{post_review_row.POST_ID}">
@@ -28,8 +28,8 @@
</div>
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
<!-- END post_review_row -->
-<hr /> \ No newline at end of file
+<hr />
diff --git a/phpBB/styles/prosilver/template/posting_smilies.html b/phpBB/styles/prosilver/template/posting_smilies.html
index d45b185ed3..c5371b9b6a 100644
--- a/phpBB/styles/prosilver/template/posting_smilies.html
+++ b/phpBB/styles/prosilver/template/posting_smilies.html
@@ -6,18 +6,22 @@
var text_name = opener.text_name;
// ]]>
</script>
-<script type="text/javascript" src="{T_SUPER_TEMPLATE_PATH}/editor.js"></script>
+<!-- INCLUDEJS {T_ASSETS_PATH}/javascript/editor.js -->
<h2>{L_SMILIES}</h2>
<div class="panel">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<!-- BEGIN smiley -->
<a href="#" onclick="initInsertions(); insert_text('{smiley.A_SMILEY_CODE}', true, true); return false;"><img src="{smiley.SMILEY_IMG}" width="{smiley.SMILEY_WIDTH}" height="{smiley.SMILEY_HEIGHT}" alt="{smiley.SMILEY_CODE}" title="{smiley.SMILEY_DESC}" /></a>
- <!-- END smiley -->
+ <!-- END smiley -->
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
-<div>{PAGINATION}</div>
-<a href="#" onclick="window.close(); return false;">{L_CLOSE_WINDOW}</a>
+<div class="pagination">
+ <!-- IF .pagination -->
+ <!-- INCLUDE pagination.html -->
+ <!-- ENDIF -->
+</div>
+<a href="#" onclick="window.close(); return false;">{L_CLOSE_WINDOW}</a>
-<!-- INCLUDE simple_footer.html --> \ No newline at end of file
+<!-- INCLUDE simple_footer.html -->
diff --git a/phpBB/styles/prosilver/template/posting_topic_review.html b/phpBB/styles/prosilver/template/posting_topic_review.html
index a05f057e21..d2faed5f8f 100644
--- a/phpBB/styles/prosilver/template/posting_topic_review.html
+++ b/phpBB/styles/prosilver/template/posting_topic_review.html
@@ -1,7 +1,7 @@
<h3 id="review">
<span class="right-box"><a href="#review" onclick="viewableArea(getElementById('topicreview'), true); var rev_text = getElementById('review').getElementsByTagName('a').item(0).firstChild; if (rev_text.data == '{LA_EXPAND_VIEW}'){rev_text.data = '{LA_COLLAPSE_VIEW}'; } else if (rev_text.data == '{LA_COLLAPSE_VIEW}'){rev_text.data = '{LA_EXPAND_VIEW}'};">{L_EXPAND_VIEW}</a></span>
- {L_TOPIC_REVIEW}: {TOPIC_TITLE}
+ {L_TOPIC_REVIEW}{L_COLON} {TOPIC_TITLE}
</h3>
<div id="topicreview">
@@ -14,21 +14,24 @@
<!-- IF topic_review_row.S_IGNORE_POST -->
<div class="post bg3 post-ignore">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
{topic_review_row.L_IGNORE_POST}
<!-- ELSE -->
- <div class="post <!-- IF topic_review_row.S_ROW_COUNT is odd -->bg1<!-- ELSE -->bg2<!-- ENDIF -->">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="post <!-- IF topic_review_row.S_ROW_COUNT is odd -->bg1<!-- ELSE -->bg2<!-- ENDIF --><!-- IF topic_review_row.POST_ID == REPORTED_POST_ID --> reported<!-- ENDIF -->">
+ <div class="inner">
<!-- ENDIF -->
<div class="postbody" id="pr{topic_review_row.POST_ID}">
+ <h3><a href="#pr{topic_review_row.POST_ID}">{topic_review_row.POST_SUBJECT}</a></h3>
+
<!-- IF topic_review_row.POSTER_QUOTE and topic_review_row.DECODED_MESSAGE -->
<ul class="profile-icons">
<li class="quote-icon"><a href="#postingbox" onclick="addquote({topic_review_row.POST_ID}, '{topic_review_row.POSTER_QUOTE}', '{LA_WROTE}');" title="{L_QUOTE} {topic_review_row.POST_AUTHOR}"><span>{L_QUOTE} {topic_review_row.POST_AUTHOR}</span></a></li>
</ul>
<!-- ENDIF -->
+
<!-- IF topic_review_row.U_MCP_DETAILS --><div class="right-box"><a href="{topic_review_row.U_MCP_DETAILS}">{L_POST_DETAILS}</a></div><!-- ENDIF -->
- <h3><a href="#pr{topic_review_row.POST_ID}">{topic_review_row.POST_SUBJECT}</a></h3>
+
<p class="author"><!-- IF S_IS_BOT -->{topic_review_row.MINI_POST_IMG}<!-- ELSE --><a href="{topic_review_row.U_MINI_POST}">{topic_review_row.MINI_POST_IMG}</a><!-- ENDIF --> {L_POST_BY_AUTHOR} <strong>{topic_review_row.POST_AUTHOR_FULL}</strong> &raquo; {topic_review_row.POST_DATE} </p>
<div class="content">{topic_review_row.MESSAGE}</div>
@@ -45,7 +48,7 @@
<div id="message_{topic_review_row.POST_ID}" style="display: none;">{topic_review_row.DECODED_MESSAGE}</div>
<!-- ENDIF -->
</div>
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
<!-- END topic_review_row -->
</div>
@@ -56,4 +59,4 @@
<p><a href="#report" class="top2">{L_BACK_TO_TOP}</a></p>
<!-- ELSE -->
<p><a href="#postingbox" class="top2">{L_BACK_TO_TOP}</a></p>
-<!-- ENDIF --> \ No newline at end of file
+<!-- ENDIF -->
diff --git a/phpBB/styles/prosilver/template/profilefields/bool.html b/phpBB/styles/prosilver/template/profilefields/bool.html
new file mode 100644
index 0000000000..f1d7ba75f4
--- /dev/null
+++ b/phpBB/styles/prosilver/template/profilefields/bool.html
@@ -0,0 +1,7 @@
+<!-- BEGIN bool -->
+<!-- IF bool.FIELD_LENGTH eq 1 -->
+ <!-- BEGIN options --><label for="{bool.FIELD_IDENT}_{bool.options.OPTION_ID}"><input type="radio" class="radio" name="{bool.FIELD_IDENT}" id="{bool.FIELD_IDENT}_{bool.options.OPTION_ID}" value="{bool.options.OPTION_ID}"{bool.options.CHECKED} /> {bool.options.VALUE}</label> <!-- END options -->
+<!-- ELSE -->
+ <input type="checkbox" class="radio" name="{bool.FIELD_IDENT}" id="{bool.FIELD_IDENT}"<!-- IF bool.FIELD_VALUE --> checked="checked"<!-- ENDIF --> />
+<!-- ENDIF -->
+<!-- END bool -->
diff --git a/phpBB/styles/prosilver/template/profilefields/date.html b/phpBB/styles/prosilver/template/profilefields/date.html
new file mode 100644
index 0000000000..5d5bc04ed6
--- /dev/null
+++ b/phpBB/styles/prosilver/template/profilefields/date.html
@@ -0,0 +1,5 @@
+<!-- BEGIN date -->
+<label for="{date.FIELD_IDENT}_day">{L_DAY}{L_COLON} <select name="{date.FIELD_IDENT}_day" id="{date.FIELD_IDENT}_day">{date.S_DAY_OPTIONS}</select></label>
+<label for="{date.FIELD_IDENT}_month">{L_MONTH}{L_COLON} <select name="{date.FIELD_IDENT}_month" id="{date.FIELD_IDENT}_month">{date.S_MONTH_OPTIONS}</select></label>
+<label for="{date.FIELD_IDENT}_year">{L_YEAR}{L_COLON} <select name="{date.FIELD_IDENT}_year" id="{date.FIELD_IDENT}_year">{date.S_YEAR_OPTIONS}</select></label>
+<!-- END date -->
diff --git a/phpBB/styles/prosilver/template/profilefields/dropdown.html b/phpBB/styles/prosilver/template/profilefields/dropdown.html
new file mode 100644
index 0000000000..243b7039da
--- /dev/null
+++ b/phpBB/styles/prosilver/template/profilefields/dropdown.html
@@ -0,0 +1,5 @@
+<!-- BEGIN dropdown -->
+<select name="{dropdown.FIELD_IDENT}" id="{dropdown.FIELD_IDENT}">
+ <!-- BEGIN options --><option value="{dropdown.options.OPTION_ID}"{dropdown.options.SELECTED}>{dropdown.options.VALUE}</option><!-- END options -->
+</select>
+<!-- END dropdown -->
diff --git a/phpBB/styles/prosilver/template/profilefields/int.html b/phpBB/styles/prosilver/template/profilefields/int.html
new file mode 100644
index 0000000000..a6f9a0a49e
--- /dev/null
+++ b/phpBB/styles/prosilver/template/profilefields/int.html
@@ -0,0 +1,3 @@
+<!-- BEGIN int -->
+<input type="number" min="{int.FIELD_MINLEN}" max="{int.FIELD_MAXLEN}" class="inputbox autowidth" name="{int.FIELD_IDENT}" id="{int.FIELD_IDENT}" size="{int.FIELD_LENGTH}" value="{int.FIELD_VALUE}" />
+<!-- END int -->
diff --git a/phpBB/styles/prosilver/template/profilefields/string.html b/phpBB/styles/prosilver/template/profilefields/string.html
new file mode 100644
index 0000000000..cf457d39ad
--- /dev/null
+++ b/phpBB/styles/prosilver/template/profilefields/string.html
@@ -0,0 +1,3 @@
+<!-- BEGIN string -->
+<input type="text" class="inputbox autowidth" name="{string.FIELD_IDENT}" id="{string.FIELD_IDENT}" size="{string.FIELD_LENGTH}" maxlength="{string.FIELD_MAXLEN}" value="{string.FIELD_VALUE}" />
+<!-- END string -->
diff --git a/phpBB/styles/prosilver/template/profilefields/text.html b/phpBB/styles/prosilver/template/profilefields/text.html
new file mode 100644
index 0000000000..f54c63925c
--- /dev/null
+++ b/phpBB/styles/prosilver/template/profilefields/text.html
@@ -0,0 +1,3 @@
+<!-- BEGIN text -->
+<textarea name="{text.FIELD_IDENT}" id="{text.FIELD_IDENT}" rows="{text.FIELD_ROWS}" cols="{text.FIELD_COLS}" class="inputbox">{text.FIELD_VALUE}</textarea>
+<!-- END text -->
diff --git a/phpBB/styles/prosilver/template/profilefields/url.html b/phpBB/styles/prosilver/template/profilefields/url.html
new file mode 100644
index 0000000000..8dd3a90de1
--- /dev/null
+++ b/phpBB/styles/prosilver/template/profilefields/url.html
@@ -0,0 +1,3 @@
+<!-- BEGIN url -->
+<input type="url" class="inputbox autowidth" name="{url.FIELD_IDENT}" id="{url.FIELD_IDENT}" size="{url.FIELD_LENGTH}" maxlength="{url.FIELD_MAXLEN}" value="{url.FIELD_VALUE}" />
+<!-- END url -->
diff --git a/phpBB/styles/prosilver/template/quickreply_editor.html b/phpBB/styles/prosilver/template/quickreply_editor.html
index ea07c2e6d8..8da9919db8 100644
--- a/phpBB/styles/prosilver/template/quickreply_editor.html
+++ b/phpBB/styles/prosilver/template/quickreply_editor.html
@@ -1,79 +1,26 @@
-<script type="text/javascript">
-// <![CDATA[
- function hide_qr(show)
- {
- dE('qr_editor_div');
- dE('qr_showeditor_div');
- if (show && document.getElementById('qr_editor_div').style.display != 'none')
- {
- document.getElementsByName('message')[0].focus();
- }
- return true;
- }
-
-
- function init_qr()
- {
- dE('qr_showeditor_div');
- return true;
- }
- onload_functions.push('init_qr();');
- // ]]>
-</script>
-<noscript>
- <form method="post" action="{U_QR_ACTION}">
- <div class="panel" id="qr_ns_editor_div">
- <div class="inner"><span class="corners-top"><span></span></span>
- <h2>{L_QUICKREPLY}</h2>
- <fieldset class="fields1">
- <dl style="clear: left;">
- <dt><label for="subject">{L_SUBJECT}:</label></dt>
- <dd><input type="text" name="subject" id="subject-ns" size="45" maxlength="64" tabindex="2" value="{SUBJECT}" class="inputbox autowidth" /></dd>
- </dl>
- <div id="message-box-ns">
- <textarea style="height: 9em;" name="message" rows="7" cols="76" tabindex="3" class="inputbox"></textarea>
- </div>
- </fieldset>
- <fieldset class="submit-buttons">
- {S_FORM_TOKEN}
- {QR_HIDDEN_FIELDS}
- <input type="submit" accesskey="s" tabindex="6" name="post" value="{L_SUBMIT}" class="button1" />&nbsp;
- <input type="submit" accesskey="f" tabindex="7" name="full_editor" value="{L_FULL_EDITOR}" class="button2" />&nbsp;
- </fieldset>
- <span class="corners-bottom"><span></span></span></div>
- </div>
- </form>
-</noscript>
-<form method="post" action="{U_QR_ACTION}">
- <div class="panel" style="display: none" id="qr_editor_div">
- <div class="inner"><span class="corners-top"><span></span></span>
+<form method="post" action="{U_QR_ACTION}" id="qr_postform">
+<!-- EVENT quickreply_editor_panel_before -->
+ <div class="panel">
+ <div class="inner">
<h2>{L_QUICKREPLY}</h2>
<fieldset class="fields1">
<dl style="clear: left;">
- <dt><label for="subject">{L_SUBJECT}:</label></dt>
- <dd><input type="text" name="subject" id="subject" size="45" maxlength="64" tabindex="2" value="{SUBJECT}" class="inputbox autowidth" /></dd>
+ <dt><label for="subject">{L_SUBJECT}{L_COLON}</label></dt>
+ <dd><input type="text" name="subject" id="subject" size="45" maxlength="124" tabindex="2" value="{SUBJECT}" class="inputbox autowidth" /></dd>
</dl>
+ <!-- EVENT quickreply_editor_message_before -->
<div id="message-box">
<textarea style="height: 9em;" name="message" rows="7" cols="76" tabindex="3" class="inputbox"></textarea>
</div>
+ <!-- EVENT quickreply_editor_message_after -->
</fieldset>
<fieldset class="submit-buttons">
{S_FORM_TOKEN}
{QR_HIDDEN_FIELDS}
- <input type="submit" accesskey="s" tabindex="6" name="post" value="{L_SUBMIT}" class="button1" />&nbsp;
- <input type="submit" accesskey="f" tabindex="7" name="full_editor" value="{L_FULL_EDITOR}" class="button2" />&nbsp;
+ <input type="submit" accesskey="f" tabindex="6" name="preview" value="{L_FULL_EDITOR}" class="button2" id="qr_full_editor" />&nbsp;
+ <input type="submit" accesskey="s" tabindex="7" name="post" value="{L_SUBMIT}" class="button1" />&nbsp;
</fieldset>
- <a href="" class="right-box up" onclick="hide_qr(false); return false;" title="{L_COLLAPSE_QR}">{L_COLLAPSE_QR}</a>
- <span class="corners-bottom"><span></span></span></div>
- </div>
- <div class="panel" style="display: none" id="qr_showeditor_div" >
- <div class="inner"><span class="corners-top"><span></span></span>
-
- <div class="content">
- <fieldset class="submit-buttons">
- <input type="submit" name="show_qr" tabindex="1" class="button2" value="{L_SHOW_QR}" onclick="hide_qr(true);return false;"/>
- </fieldset>
- </div>
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
+<!-- EVENT quickreply_editor_panel_after -->
</form>
diff --git a/phpBB/styles/prosilver/template/report_body.html b/phpBB/styles/prosilver/template/report_body.html
index 2d6a857afb..2a5e6c9d0e 100644
--- a/phpBB/styles/prosilver/template/report_body.html
+++ b/phpBB/styles/prosilver/template/report_body.html
@@ -4,7 +4,7 @@
<form method="post" action="{S_REPORT_ACTION}" id="report">
<div class="panel">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<div class="content">
<p><!-- IF S_REPORT_POST -->{L_REPORT_POST_EXPLAIN}<!-- ELSE -->{L_REPORT_MESSAGE_EXPLAIN}<!-- ENDIF --></p>
@@ -12,12 +12,12 @@
<fieldset>
<!-- IF ERROR --><dl><dd class="error">{ERROR}</dd></dl><!-- ENDIF -->
<dl class="fields2">
- <dt><label for="reason_id">{L_REASON}:</label></dt>
+ <dt><label for="reason_id">{L_REASON}{L_COLON}</label></dt>
<dd><select name="reason_id" id="reason_id" class="full"><!-- BEGIN reason --><option value="{reason.ID}"<!-- IF reason.S_SELECTED --> selected="selected"<!-- ENDIF -->>{reason.DESCRIPTION}</option><!-- END reason --></select></dd>
</dl>
<!-- IF S_CAN_NOTIFY -->
<dl class="fields2">
- <dt><label for="notify1">{L_REPORT_NOTIFY}:</label><br /><span>{L_REPORT_NOTIFY_EXPLAIN}</span></dt>
+ <dt><label for="notify1">{L_REPORT_NOTIFY}{L_COLON}</label><br /><span>{L_REPORT_NOTIFY_EXPLAIN}</span></dt>
<dd>
<label for="notify1"><input type="radio" name="notify" id="notify1" value="1" <!-- IF not S_NOTIFY -->checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label for="notify0"><input type="radio" name="notify" id="notify0" value="0" <!-- IF S_NOTIFY -->checked="checked"<!-- ENDIF --> /> {L_NO}</label>
@@ -25,7 +25,7 @@
</dl>
<!-- ENDIF -->
<dl class="fields2">
- <dt><label for="report_text">{L_MORE_INFO}:</label><br /><span>{L_CAN_LEAVE_BLANK}</span></dt>
+ <dt><label for="report_text">{L_MORE_INFO}{L_COLON}</label><br /><span>{L_CAN_LEAVE_BLANK}</span></dt>
<dd><textarea name="report_text" id="report_text" rows="10" cols="76" class="inputbox">{REPORT_TEXT}</textarea></dd>
</dl>
<!-- IF CAPTCHA_TEMPLATE -->
@@ -34,11 +34,11 @@
</fieldset>
</div>
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
<div class="panel">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<div class="content">
<fieldset class="submit-buttons">
@@ -48,8 +48,8 @@
</fieldset>
</div>
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
</form>
-<!-- INCLUDE overall_footer.html --> \ No newline at end of file
+<!-- INCLUDE overall_footer.html -->
diff --git a/phpBB/styles/prosilver/template/search_body.html b/phpBB/styles/prosilver/template/search_body.html
index 4b1d30d77d..2f15830eb1 100644
--- a/phpBB/styles/prosilver/template/search_body.html
+++ b/phpBB/styles/prosilver/template/search_body.html
@@ -1,54 +1,48 @@
<!-- INCLUDE overall_header.html -->
-<script type="text/javascript">
-// <![CDATA[
- onload_functions.push('document.getElementById("keywords").focus();');
-// ]]>
-</script>
-
<h2 class="solo">{L_SEARCH}</h2>
-<form method="get" action="{S_SEARCH_ACTION}">
+<form method="get" action="{S_SEARCH_ACTION}" data-focus="keywords">
<div class="panel">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<h3>{L_SEARCH_QUERY}</h3>
<fieldset>
<dl>
- <dt><label for="keywords">{L_SEARCH_KEYWORDS}:</label><br /><span>{L_SEARCH_KEYWORDS_EXPLAIN}</span></dt>
- <dd><input type="text" class="inputbox" name="keywords" id="keywords" size="40" title="{L_SEARCH_KEYWORDS}" /></dd>
+ <dt><label for="keywords">{L_SEARCH_KEYWORDS}{L_COLON}</label><br /><span>{L_SEARCH_KEYWORDS_EXPLAIN}</span></dt>
+ <dd><input type="search" class="inputbox" name="keywords" id="keywords" size="40" title="{L_SEARCH_KEYWORDS}" /></dd>
<dd><label for="terms1"><input type="radio" name="terms" id="terms1" value="all" checked="checked" /> {L_SEARCH_ALL_TERMS}</label></dd>
<dd><label for="terms2"><input type="radio" name="terms" id="terms2" value="any" /> {L_SEARCH_ANY_TERMS}</label></dd>
</dl>
<dl>
- <dt><label for="author">{L_SEARCH_AUTHOR}:</label><br /><span>{L_SEARCH_AUTHOR_EXPLAIN}</span></dt>
- <dd><input type="text" class="inputbox" name="author" id="author" size="40" title="{L_SEARCH_AUTHOR}" /></dd>
+ <dt><label for="author">{L_SEARCH_AUTHOR}{L_COLON}</label><br /><span>{L_SEARCH_AUTHOR_EXPLAIN}</span></dt>
+ <dd><input type="search" class="inputbox" name="author" id="author" size="40" title="{L_SEARCH_AUTHOR}" /></dd>
</dl>
</fieldset>
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
<div class="panel bg2">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<h3>{L_SEARCH_OPTIONS}</h3>
<fieldset>
<dl>
- <dt><label for="search_forum">{L_SEARCH_FORUMS}:</label><br /><span>{L_SEARCH_FORUMS_EXPLAIN}</span></dt>
+ <dt><label for="search_forum">{L_SEARCH_FORUMS}{L_COLON}</label><br /><span>{L_SEARCH_FORUMS_EXPLAIN}</span></dt>
<dd><select name="fid[]" id="search_forum" multiple="multiple" size="8" title="{L_SEARCH_FORUMS}">{S_FORUM_OPTIONS}</select></dd>
</dl>
<dl>
- <dt><label for="search_child1">{L_SEARCH_SUBFORUMS}:</label></dt>
+ <dt><label for="search_child1">{L_SEARCH_SUBFORUMS}{L_COLON}</label></dt>
<dd>
<label for="search_child1"><input type="radio" name="sc" id="search_child1" value="1" checked="checked" /> {L_YES}</label>
<label for="search_child2"><input type="radio" name="sc" id="search_child2" value="0" /> {L_NO}</label>
</dd>
</dl>
<dl>
- <dt><label for="sf1">{L_SEARCH_WITHIN}:</label></dt>
+ <dt><label for="sf1">{L_SEARCH_WITHIN}{L_COLON}</label></dt>
<dd><label for="sf1"><input type="radio" name="sf" id="sf1" value="all" checked="checked" /> {L_SEARCH_TITLE_MSG}</label></dd>
<dd><label for="sf2"><input type="radio" name="sf" id="sf2" value="msgonly" /> {L_SEARCH_MSG_ONLY}</label></dd>
<dd><label for="sf3"><input type="radio" name="sf" id="sf3" value="titleonly" /> {L_SEARCH_TITLE_ONLY}</label></dd>
@@ -58,50 +52,50 @@
<hr class="dashed" />
<dl>
- <dt><label for="show_results1">{L_DISPLAY_RESULTS}:</label></dt>
+ <dt><label for="show_results1">{L_DISPLAY_RESULTS}{L_COLON}</label></dt>
<dd>
<label for="show_results1"><input type="radio" name="sr" id="show_results1" value="posts" checked="checked" /> {L_POSTS}</label>
<label for="show_results2"><input type="radio" name="sr" id="show_results2" value="topics" /> {L_TOPICS}</label>
</dd>
</dl>
<dl>
- <dt><label for="sd">{L_RESULT_SORT}:</label></dt>
+ <dt><label for="sd">{L_RESULT_SORT}{L_COLON}</label></dt>
<dd>{S_SELECT_SORT_KEY}&nbsp;
<label for="sa"><input type="radio" name="sd" id="sa" value="a" /> {L_SORT_ASCENDING}</label>
<label for="sd"><input type="radio" name="sd" id="sd" value="d" checked="checked" /> {L_SORT_DESCENDING}</label>
</dd>
</dl>
<dl>
- <dt><label>{L_RESULT_DAYS}:</label></dt>
+ <dt><label>{L_RESULT_DAYS}{L_COLON}</label></dt>
<dd>{S_SELECT_SORT_DAYS}</dd>
</dl>
<dl>
- <dt><label>{L_RETURN_FIRST}:</label></dt>
+ <dt><label>{L_RETURN_FIRST}{L_COLON}</label></dt>
<dd><select name="ch" title="{L_RETURN_FIRST}">{S_CHARACTER_OPTIONS}</select> {L_POST_CHARACTERS}</dd>
</dl>
</fieldset>
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
<div class="panel bg3">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<fieldset class="submit-buttons">
{S_HIDDEN_FIELDS}<input type="reset" value="{L_RESET}" name="reset" class="button2" />&nbsp;
<input type="submit" name="submit" value="{L_SEARCH}" class="button1" />
</fieldset>
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
</form>
<!-- IF .recentsearch -->
<div class="forumbg forumbg-table">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
- <table class="table1" cellspacing="1">
+ <table class="table1">
<thead>
<tr>
<th colspan="2" class="name">{L_RECENT_SEARCHES}</th>
@@ -111,7 +105,7 @@
<!-- BEGIN recentsearch -->
<tr class="<!-- IF recentsearch.S_ROW_COUNT is even -->bg1<!-- ELSE -->bg2<!-- ENDIF -->">
<td><a href="{recentsearch.U_KEYWORDS}">{recentsearch.KEYWORDS}</a></td>
- <td class="active"><span>&nbsp;{recentsearch.TIME}</span></td>
+ <td class="active">{recentsearch.TIME}</td>
</tr>
<!-- BEGINELSE -->
<tr class="bg1">
@@ -121,7 +115,7 @@
</tbody>
</table>
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
<!-- ENDIF -->
diff --git a/phpBB/styles/prosilver/template/search_results.html b/phpBB/styles/prosilver/template/search_results.html
index 0ea9d8a047..3307c68627 100644
--- a/phpBB/styles/prosilver/template/search_results.html
+++ b/phpBB/styles/prosilver/template/search_results.html
@@ -1,16 +1,17 @@
<!-- INCLUDE overall_header.html -->
-<h2><!-- IF SEARCH_TITLE -->{SEARCH_TITLE}<!-- ELSE -->{SEARCH_MATCHES}<!-- ENDIF --><!-- IF SEARCH_WORDS -->: <a href="{U_SEARCH_WORDS}">{SEARCH_WORDS}</a><!-- ENDIF --></h2>
-<!-- IF SEARCHED_QUERY --> <p>{L_SEARCHED_QUERY}: <strong>{SEARCHED_QUERY}</strong></p><!-- ENDIF -->
-<!-- IF IGNORED_WORDS --> <p>{L_IGNORED_TERMS}: <strong>{IGNORED_WORDS}</strong></p><!-- ENDIF -->
+<h2><!-- IF SEARCH_TITLE -->{SEARCH_TITLE}<!-- ELSE -->{SEARCH_MATCHES}<!-- ENDIF --><!-- IF SEARCH_WORDS -->{L_COLON} <a href="{U_SEARCH_WORDS}">{SEARCH_WORDS}</a><!-- ENDIF --></h2>
+<!-- IF SEARCHED_QUERY --> <p>{L_SEARCHED_QUERY}{L_COLON} <strong>{SEARCHED_QUERY}</strong></p><!-- ENDIF -->
+<!-- IF IGNORED_WORDS --> <p>{L_IGNORED_TERMS}{L_COLON} <strong>{IGNORED_WORDS}</strong></p><!-- ENDIF -->
+<!-- IF PHRASE_SEARCH_DISABLED --> <p><strong>{L_PHRASE_SEARCH_DISABLED}</strong></p><!-- ENDIF -->
<!-- IF SEARCH_TOPIC -->
- <p><a class="{S_CONTENT_FLOW_BEGIN}" href="{U_SEARCH_TOPIC}">{L_RETURN_TO}: {SEARCH_TOPIC}</a></p>
+ <p><a class="arrow-{S_CONTENT_FLOW_BEGIN}" href="{U_SEARCH_TOPIC}">{L_RETURN_TO_TOPIC}</a></p>
<!-- ELSE -->
- <p><a class="{S_CONTENT_FLOW_BEGIN}" href="{U_SEARCH}" title="{L_SEARCH_ADV}">{L_RETURN_TO_SEARCH_ADV}</a></p>
+ <p><a class="arrow-{S_CONTENT_FLOW_BEGIN}" href="{U_SEARCH}" title="{L_SEARCH_ADV}">{L_RETURN_TO_SEARCH_ADV}</a></p>
<!-- ENDIF -->
-<!-- IF PAGINATION or SEARCH_MATCHES or PAGE_NUMBER -->
+<!-- IF .pagination or SEARCH_MATCHES or PAGE_NUMBER -->
<form method="post" action="{S_SEARCH_ACTION}">
<div class="topic-actions">
@@ -18,14 +19,20 @@
<!-- IF SEARCH_MATCHES -->
<div class="search-box">
<!-- IF SEARCH_IN_RESULTS -->
- <label for="add_keywords">{L_SEARCH_IN_RESULTS}: <input type="text" name="add_keywords" id="add_keywords" value="" class="inputbox narrow" /></label>
+ <label for="add_keywords">{L_SEARCH_IN_RESULTS}{L_COLON} <input type="search" name="add_keywords" id="add_keywords" value="" class="inputbox narrow" /></label>
<input class="button2" type="submit" name="submit" value="{L_SEARCH}" />
<!-- ENDIF -->
</div>
<!-- ENDIF -->
<div class="rightside pagination">
- {SEARCH_MATCHES}<!-- IF PAGINATION --> &bull; <a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{PAGE_NUMBER}</a> &bull; <span>{PAGINATION}</span><!-- ELSE --> &bull; {PAGE_NUMBER}<!-- ENDIF -->
+ {SEARCH_MATCHES}
+ <!-- IF .pagination -->
+ &bull;
+ <!-- INCLUDE pagination.html -->
+ <!-- ELSE -->
+ {PAGE_NUMBER}
+ <!-- ENDIF -->
</div>
</div>
@@ -37,11 +44,11 @@
<!-- IF .searchresults -->
<div class="forumbg">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<ul class="topiclist">
<li class="header">
<dl class="icon">
- <dt>{L_TOPICS}</dt>
+ <dt><div class="list-inner">{L_TOPICS}</div></dt>
<dd class="posts">{L_REPLIES}</dd>
<dd class="views">{L_VIEWS}</dd>
<dd class="lastpost"><span>{L_LAST_POST}</span></dd>
@@ -52,34 +59,54 @@
<!-- BEGIN searchresults -->
<li class="row<!-- IF searchresults.S_ROW_COUNT is even --> bg1<!-- ELSE --> bg2<!-- ENDIF -->">
- <dl class="icon" style="background-image: url({searchresults.TOPIC_FOLDER_IMG_SRC}); background-repeat: no-repeat;">
- <dt <!-- IF searchresults.TOPIC_ICON_IMG -->style="background-image: url({T_ICONS_PATH}{searchresults.TOPIC_ICON_IMG}); background-repeat: no-repeat;"<!-- ENDIF -->>
- <!-- IF searchresults.S_UNREAD_TOPIC --><a href="{searchresults.U_NEWEST_POST}">{NEWEST_POST_IMG}</a> <!-- ENDIF -->
- <a href="{searchresults.U_VIEW_TOPIC}" class="topictitle">{searchresults.TOPIC_TITLE}</a> {searchresults.ATTACH_ICON_IMG}
- <!-- IF searchresults.S_TOPIC_UNAPPROVED or searchresults.S_POSTS_UNAPPROVED --><a href="{searchresults.U_MCP_QUEUE}">{searchresults.UNAPPROVED_IMG}</a> <!-- ENDIF -->
- <!-- IF searchresults.S_TOPIC_REPORTED --><a href="{searchresults.U_MCP_REPORT}">{REPORTED_IMG}</a><!-- ENDIF --><br />
- <!-- IF searchresults.PAGINATION --><strong class="pagination"><span>{searchresults.PAGINATION}</span></strong><!-- ENDIF -->
- {L_POST_BY_AUTHOR} {searchresults.TOPIC_AUTHOR_FULL} &raquo; {searchresults.FIRST_POST_TIME}
- <!-- IF not searchresults.S_TOPIC_GLOBAL -->{L_IN} <a href="{searchresults.U_VIEW_FORUM}">{searchresults.FORUM_TITLE}</a><!-- ELSE --> ({L_GLOBAL})<!-- ENDIF -->
+ <dl class="icon {searchresults.TOPIC_IMG_STYLE}">
+ <dt <!-- IF searchresults.TOPIC_ICON_IMG -->style="background-image: url({T_ICONS_PATH}{searchresults.TOPIC_ICON_IMG}); background-repeat: no-repeat;"<!-- ENDIF --> title="{searchresults.TOPIC_FOLDER_IMG_ALT}">
+ <!-- IF searchresults.S_UNREAD_TOPIC and not S_IS_BOT --><a href="{searchresults.U_NEWEST_POST}" class="icon-link"></a><!-- ENDIF -->
+ <div class="list-inner">
+
+ <!-- EVENT topiclist_row_prepend -->
+ <!-- IF searchresults.S_UNREAD_TOPIC and not S_IS_BOT --><a href="{searchresults.U_NEWEST_POST}">{NEWEST_POST_IMG}</a> <!-- ENDIF -->
+ <a href="{searchresults.U_VIEW_TOPIC}" class="topictitle">{searchresults.TOPIC_TITLE}</a> {searchresults.ATTACH_ICON_IMG}
+ <!-- IF searchresults.S_TOPIC_UNAPPROVED or searchresults.S_POSTS_UNAPPROVED --><a href="{searchresults.U_MCP_QUEUE}">{searchresults.UNAPPROVED_IMG}</a> <!-- ENDIF -->
+ <!-- IF searchresults.S_TOPIC_DELETED --><a href="{searchresults.U_MCP_QUEUE}">{DELETED_IMG}</a> <!-- ENDIF -->
+ <!-- IF searchresults.S_TOPIC_REPORTED --><a href="{searchresults.U_MCP_REPORT}">{REPORTED_IMG}</a><!-- ENDIF --><br />
+ <!-- IF .searchresults.pagination -->
+ <div class="pagination">
+ <ul>
+ <!-- BEGIN pagination -->
+ <!-- IF searchresults.pagination.S_IS_PREV -->
+ <!-- ELSEIF searchresults.pagination.S_IS_CURRENT --><li class="active"><span>{searchresults.pagination.PAGE_NUMBER}</span></li>
+ <!-- ELSEIF searchresults.pagination.S_IS_ELLIPSIS --><li class="ellipsis"><span>{L_ELLIPSIS}</span></li>
+ <!-- ELSEIF searchresults.pagination.S_IS_NEXT -->
+ <!-- ELSE --><li><a href="{searchresults.pagination.PAGE_URL}">{searchresults.pagination.PAGE_NUMBER}</a></li>
+ <!-- ENDIF -->
+ <!-- END pagination -->
+ </ul>
+ </div>
+ <!-- ENDIF -->
+ {L_POST_BY_AUTHOR} {searchresults.TOPIC_AUTHOR_FULL} &raquo; {searchresults.FIRST_POST_TIME} &raquo; {L_IN} <a href="{searchresults.U_VIEW_FORUM}">{searchresults.FORUM_TITLE}</a>
+ <!-- EVENT topiclist_row_append -->
+
+ </div>
</dt>
<dd class="posts">{searchresults.TOPIC_REPLIES}</dd>
<dd class="views">{searchresults.TOPIC_VIEWS}</dd>
<dd class="lastpost"><span>
{L_POST_BY_AUTHOR} {searchresults.LAST_POST_AUTHOR_FULL}
- <!-- IF not S_IS_BOT --><a href="{searchresults.U_LAST_POST}">{LAST_POST_IMG}</a> <!-- ENDIF --><br />{searchresults.LAST_POST_TIME}<br /> </span>
+ <!-- IF not S_IS_BOT --><a href="{searchresults.U_LAST_POST}" title="{L_GOTO_LAST_POST}">{LAST_POST_IMG}</a> <!-- ENDIF --><br />{searchresults.LAST_POST_TIME}<br /> </span>
</dd>
</dl>
</li>
<!-- END searchresults -->
</ul>
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
<!-- ELSE -->
<div class="panel">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<strong>{L_NO_SEARCH_RESULTS}</strong>
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
<!-- ENDIF -->
@@ -87,59 +114,55 @@
<!-- BEGIN searchresults -->
<div class="search post <!-- IF searchresults.S_ROW_COUNT is odd -->bg1<!-- ELSE -->bg2<!-- ENDIF --><!-- IF searchresults.S_POST_REPORTED --> reported<!-- ENDIF -->">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<!-- IF searchresults.S_IGNORE_POST -->
<div class="postbody">
{searchresults.L_IGNORE_POST}
</div>
<!-- ELSE -->
+ <dl class="postprofile">
+ <dt class="author">{L_POST_BY_AUTHOR} {searchresults.POST_AUTHOR_FULL}</dt>
+ <dd class="search-result-date">{searchresults.POST_DATE}</dd>
+ <dd>{L_FORUM}{L_COLON} <a href="{searchresults.U_VIEW_FORUM}">{searchresults.FORUM_TITLE}</a></dd>
+ <dd>{L_TOPIC}{L_COLON} <a href="{searchresults.U_VIEW_TOPIC}">{searchresults.TOPIC_TITLE}</a></dd>
+ <dd>{L_REPLIES}{L_COLON} <strong>{searchresults.TOPIC_REPLIES}</strong></dd>
+ <dd>{L_VIEWS}{L_COLON} <strong>{searchresults.TOPIC_VIEWS}</strong></dd>
+ </dl>
+
<div class="postbody">
<h3><a href="{searchresults.U_VIEW_POST}">{searchresults.POST_SUBJECT}</a></h3>
<div class="content">{searchresults.MESSAGE}</div>
</div>
-
- <dl class="postprofile">
- <dt class="author">{L_POST_BY_AUTHOR} {searchresults.POST_AUTHOR_FULL}</dt>
- <dd>{searchresults.POST_DATE}</dd>
- <dd>&nbsp;</dd>
- <!-- IF searchresults.FORUM_TITLE -->
- <dd>{L_FORUM}: <a href="{searchresults.U_VIEW_FORUM}">{searchresults.FORUM_TITLE}</a></dd>
- <dd>{L_TOPIC}: <a href="{searchresults.U_VIEW_TOPIC}">{searchresults.TOPIC_TITLE}</a></dd>
- <!-- ELSE -->
- <dd>{L_GLOBAL}: <a href="{searchresults.U_VIEW_TOPIC}">{searchresults.TOPIC_TITLE}</a></dd>
- <!-- ENDIF -->
- <dd>{L_REPLIES}: <strong>{searchresults.TOPIC_REPLIES}</strong></dd>
- <dd>{L_VIEWS}: <strong>{searchresults.TOPIC_VIEWS}</strong></dd>
- </dl>
<!-- ENDIF -->
<!-- IF not searchresults.S_IGNORE_POST -->
<ul class="searchresults">
- <li ><a href="{searchresults.U_VIEW_POST}" class="{S_CONTENT_FLOW_END}">{L_JUMP_TO_POST}</a></li>
+ <li ><a href="{searchresults.U_VIEW_POST}" class="arrow-{S_CONTENT_FLOW_END}">{L_JUMP_TO_POST}</a></li>
</ul>
<!-- ENDIF -->
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
<!-- BEGINELSE -->
<div class="panel">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<strong>{L_NO_SEARCH_RESULTS}</strong>
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
<!-- END searchresults -->
<!-- ENDIF -->
-<!-- IF PAGINATION or .searchresults or S_SELECT_SORT_KEY or S_SELECT_SORT_DAYS -->
+<!-- IF .pagination or .searchresults or S_SELECT_SORT_KEY or S_SELECT_SORT_DAYS -->
<form method="post" action="{S_SEARCH_ACTION}">
<fieldset class="display-options">
- <!-- IF PREVIOUS_PAGE --><a href="{PREVIOUS_PAGE}" class="left-box {S_CONTENT_FLOW_BEGIN}">{L_PREVIOUS}</a><!-- ENDIF -->
- <!-- IF NEXT_PAGE --><a href="{NEXT_PAGE}" class="right-box {S_CONTENT_FLOW_END}">{L_NEXT}</a><!-- ENDIF -->
+ <!-- IF U_PREVIOUS_PAGE --><a href="{U_PREVIOUS_PAGE}" class="left-box arrow-{S_CONTENT_FLOW_BEGIN}">{L_PREVIOUS}</a><!-- ENDIF -->
+ <!-- IF U_NEXT_PAGE --><a href="{U_NEXT_PAGE}" class="right-box arrow-{S_CONTENT_FLOW_END}">{L_NEXT}</a><!-- ENDIF -->
<!-- IF S_SELECT_SORT_DAYS or S_SELECT_SORT_KEY -->
<label><!-- IF S_SHOW_TOPICS -->{L_DISPLAY_POSTS}<!-- ELSE -->{L_SORT_BY}</label><label><!-- ENDIF --> {S_SELECT_SORT_DAYS}<!-- IF S_SELECT_SORT_KEY --></label> <label>{S_SELECT_SORT_KEY}</label>
- <label>{S_SELECT_SORT_DIR}<!-- ENDIF --> <input type="submit" name="sort" value="{L_GO}" class="button2" /></label>
+ <label>{S_SELECT_SORT_DIR}<!-- ENDIF --></label>
+ <input type="submit" name="sort" value="{L_GO}" class="button2" />
<!-- ENDIF -->
</fieldset>
@@ -148,14 +171,20 @@
<hr />
<!-- ENDIF -->
-<!-- IF PAGINATION or .searchresults or PAGE_NUMBER -->
+<!-- IF .pagination or .searchresults or PAGE_NUMBER -->
<ul class="linklist">
<li class="rightside pagination">
- {SEARCH_MATCHES}<!-- IF PAGINATION --> &bull; <a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{PAGE_NUMBER}</a> &bull; <span>{PAGINATION}</span><!-- ELSE --> &bull; {PAGE_NUMBER}<!-- ENDIF -->
+ {SEARCH_MATCHES}
+ <!-- IF .pagination -->
+ &bull;
+ <!-- INCLUDE pagination.html -->
+ <!-- ELSE -->
+ {PAGE_NUMBER}
+ <!-- ENDIF -->
</li>
</ul>
<!-- ENDIF -->
<!-- INCLUDE jumpbox.html -->
-<!-- INCLUDE overall_footer.html --> \ No newline at end of file
+<!-- INCLUDE overall_footer.html -->
diff --git a/phpBB/styles/prosilver/template/simple_footer.html b/phpBB/styles/prosilver/template/simple_footer.html
index cc54c42d18..10edece3cd 100644
--- a/phpBB/styles/prosilver/template/simple_footer.html
+++ b/phpBB/styles/prosilver/template/simple_footer.html
@@ -6,5 +6,13 @@
</div>
</div>
+<script type="text/javascript" src="{T_JQUERY_LINK}"></script>
+<!-- IF S_ALLOW_CDN --><script type="text/javascript">window.jQuery || document.write(unescape('%3Cscript src="{T_ASSETS_PATH}/javascript/jquery.js?assets_version={T_ASSETS_VERSION}" type="text/javascript"%3E%3C/script%3E'));</script><!-- ENDIF -->
+<!-- INCLUDEJS forum_fn.js -->
+
+<!-- EVENT simple_footer_after -->
+
+{$SCRIPTS}
+
</body>
-</html> \ No newline at end of file
+</html>
diff --git a/phpBB/styles/prosilver/template/simple_header.html b/phpBB/styles/prosilver/template/simple_header.html
index 9cc8060762..24a99154d0 100644
--- a/phpBB/styles/prosilver/template/simple_header.html
+++ b/phpBB/styles/prosilver/template/simple_header.html
@@ -1,71 +1,35 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}" xml:lang="{S_USER_LANG}">
+<!DOCTYPE html>
+<html dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}">
<head>
-
-<meta http-equiv="content-type" content="text/html; charset={S_CONTENT_ENCODING}" />
-<meta http-equiv="content-style-type" content="text/css" />
-<meta http-equiv="content-language" content="{S_USER_LANG}" />
-<meta http-equiv="imagetoolbar" content="no" />
-<meta name="resource-type" content="document" />
-<meta name="distribution" content="global" />
+<meta charset="utf-8">
+<meta name="viewport" content="width=device-width" />
<meta name="keywords" content="" />
<meta name="description" content="" />
{META}
<title>{SITENAME} &bull; <!-- IF S_IN_MCP -->{L_MCP} &bull; <!-- ELSEIF S_IN_UCP -->{L_UCP} &bull; <!-- ENDIF -->{PAGE_TITLE}</title>
-<script type="text/javascript">
-// <![CDATA[
-
- var jump_page = '{LA_JUMP_PAGE}:';
- var on_page = '{ON_PAGE}';
- var per_page = '{PER_PAGE}';
- var base_url = '{A_BASE_URL}';
- var style_cookie = 'phpBBstyle';
- var onload_functions = new Array();
- var onunload_functions = new Array();
- var style_cookie_settings = '{A_COOKIE_SETTINGS}';
-
- /**
- * New function for handling multiple calls to window.onload and window.unload by pentapenguin
- */
- window.onload = function()
- {
- for (var i = 0; i < onload_functions.length; i++)
- {
- eval(onload_functions[i]);
- }
- }
-
- window.onunload = function()
- {
- for (var i = 0; i < onunload_functions.length; i++)
- {
- eval(onunload_functions[i]);
- }
- }
-
-// ]]>
-</script>
-<script type="text/javascript" src="{T_SUPER_TEMPLATE_PATH}/styleswitcher.js"></script>
-<script type="text/javascript" src="{T_SUPER_TEMPLATE_PATH}/forum_fn.js"></script>
-
-<link href="{T_THEME_PATH}/print.css" rel="stylesheet" type="text/css" media="print" title="printonly" />
+<link href="{T_THEME_PATH}/print.css?assets_version={T_ASSETS_VERSION}" rel="stylesheet" type="text/css" media="print" title="printonly" />
+<!-- IF S_ALLOW_CDN --><link href="//fonts.googleapis.com/css?family=Open+Sans:600&amp;subset=latin,cyrillic-ext,latin-ext,cyrillic,greek-ext,greek,vietnamese" rel="stylesheet" type="text/css" media="screen, projection" /><!-- ENDIF -->
<link href="{T_STYLESHEET_LINK}" rel="stylesheet" type="text/css" media="screen, projection" />
-
-<link href="{T_THEME_PATH}/normal.css" rel="alternate stylesheet" type="text/css" title="A" />
-<link href="{T_THEME_PATH}/medium.css" rel="alternate stylesheet" type="text/css" title="A+" />
-<link href="{T_THEME_PATH}/large.css" rel="alternate stylesheet" type="text/css" title="A++" />
+<link href="{T_STYLESHEET_LANG_LINK}" rel="stylesheet" type="text/css" media="screen, projection" />
+<link href="{T_THEME_PATH}/responsive.css?assets_version={T_ASSETS_VERSION}" rel="stylesheet" type="text/css" media="only screen and (max-width: 700px), only screen and (max-device-width: 700px)" />
<!-- IF S_CONTENT_DIRECTION eq 'rtl' -->
- <link href="{T_THEME_PATH}/bidi.css" rel="stylesheet" type="text/css" media="screen, projection" />
+ <link href="{T_THEME_PATH}/bidi.css?assets_version={T_ASSETS_VERSION}" rel="stylesheet" type="text/css" media="screen, projection" />
<!-- ENDIF -->
+<!--[if lte IE 8]>
+ <link href="{T_THEME_PATH}/tweaks.css?assets_version={T_ASSETS_VERSION}" rel="stylesheet" type="text/css" media="screen, projection" />
+<![endif]-->
+
<!-- DEFINE $POPUP = 1 -->
</head>
-<body id="phpbb" class="{S_CONTENT_DIRECTION}">
+<body id="phpbb" class="nojs {S_CONTENT_DIRECTION}">
+
+<!-- EVENT simple_header_body_before -->
<div id="simple-wrap">
- <a id="top" name="top" accesskey="t"></a>
- <div id="page-body"> \ No newline at end of file
+ <a id="top" accesskey="t"></a>
+ <div id="page-body">
diff --git a/phpBB/styles/prosilver/template/styleswitcher.js b/phpBB/styles/prosilver/template/styleswitcher.js
deleted file mode 100644
index bbcac9b69c..0000000000
--- a/phpBB/styles/prosilver/template/styleswitcher.js
+++ /dev/null
@@ -1,193 +0,0 @@
-
-function fontsizeup(event)
-{
- // Skip tabs; 9 being the ASCII code for a tab
- if (event && getKeyCode(event) == 9)
- {
- return true;
- }
-
- var active = getActiveStyleSheet();
-
- switch (active)
- {
- case 'A--':
- setActiveStyleSheet('A-');
- break;
-
- case 'A-':
- setActiveStyleSheet('A');
- break;
-
- case 'A':
- setActiveStyleSheet('A+');
- break;
-
- case 'A+':
- setActiveStyleSheet('A++');
- break;
-
- case 'A++':
- setActiveStyleSheet('A');
- break;
-
- default:
- setActiveStyleSheet('A');
- break;
- }
-
- return false;
-}
-
-function fontsizedown(event)
-{
- // Skip tabs
- if (event && getKeyCode(event) == 9)
- {
- return true;
- }
-
- var active = getActiveStyleSheet();
-
- switch (active)
- {
- case 'A++' :
- setActiveStyleSheet('A+');
- break;
-
- case 'A+' :
- setActiveStyleSheet('A');
- break;
-
- case 'A' :
- setActiveStyleSheet('A-');
- break;
-
- case 'A-' :
- setActiveStyleSheet('A--');
- break;
-
- case 'A--' :
- break;
-
- default :
- setActiveStyleSheet('A--');
- break;
- }
-
- return false;
-}
-
-function getKeyCode(event)
-{
- // IE doesn't fire the onkeypress event for tabs
- // Reference: http://www.quirksmode.org/js/keys.html
-
- var code = (event.keyCode) ? event.keyCode : 0;
-
- // Probably using FF
- if (!code && event.charCode)
- {
- code = event.charCode;
- }
-
- return code;
-}
-
-function setActiveStyleSheet(title)
-{
- var i, a, main;
-
- for (i = 0; (a = document.getElementsByTagName('link')[i]); i++)
- {
- if (a.getAttribute('rel').indexOf('style') != -1 && a.getAttribute('title'))
- {
- a.disabled = true;
- if (a.getAttribute('title') == title)
- {
- a.disabled = false;
- }
- }
- }
-}
-
-function getActiveStyleSheet()
-{
- var i, a;
-
- for (i = 0; (a = document.getElementsByTagName('link')[i]); i++)
- {
- if (a.getAttribute('rel').indexOf('style') != -1 && a.getAttribute('title') && !a.disabled)
- {
- return a.getAttribute('title');
- }
- }
-
- return null;
-}
-
-function getPreferredStyleSheet()
-{
- return ('A-');
-}
-
-function createCookie(name, value, days)
-{
- if (days)
- {
- var date = new Date();
- date.setTime(date.getTime() + (days*24*60*60*1000));
- var expires = '; expires=' + date.toGMTString();
- }
- else
- {
- expires = '';
- }
-
- document.cookie = name + '=' + value + expires + style_cookie_settings;
-}
-
-function readCookie(name)
-{
- var nameEQ = name + '=';
- var ca = document.cookie.split(';');
-
- for (var i = 0; i < ca.length; i++)
- {
- var c = ca[i];
-
- while (c.charAt(0) == ' ')
- {
- c = c.substring(1, c.length);
- }
-
- if (c.indexOf(nameEQ) == 0)
- {
- return c.substring(nameEQ.length, c.length);
- }
- }
-
- return null;
-}
-
-function load_cookie()
-{
- var cookie = readCookie('style_cookie');
- var title = cookie ? cookie : getPreferredStyleSheet();
- setActiveStyleSheet(title);
-}
-
-function unload_cookie()
-{
- var title = getActiveStyleSheet();
- createCookie('style_cookie', title, 365);
-}
-
-onload_functions.push('load_cookie()');
-onunload_functions.push('unload_cookie()');
-
-/*
-var cookie = readCookie("style");
-var title = cookie ? cookie : getPreferredStyleSheet();
-setActiveStyleSheet(title);
-*/
diff --git a/phpBB/styles/prosilver/template/template.cfg b/phpBB/styles/prosilver/template/template.cfg
deleted file mode 100644
index af84a0a66c..0000000000
--- a/phpBB/styles/prosilver/template/template.cfg
+++ /dev/null
@@ -1,30 +0,0 @@
-#
-# phpBB Template Configuration File
-#
-# @package phpBB3
-# @copyright (c) 2006 phpBB Group
-# @license http://opensource.org/licenses/gpl-license.php GNU Public License
-#
-#
-# At the left is the name, please do not change this
-# At the right the value is entered
-# For on/off options the valid values are on, off, 1, 0, true and false
-#
-# Values get trimmed, if you want to add a space in front or at the end of
-# the value, then enclose the value with single or double quotes.
-# Single and double quotes do not need to be escaped.
-#
-#
-
-# General Information about this template
-name = prosilver
-copyright = &copy; phpBB Group, 2007
-version = 3.0.12
-
-# Defining a different template bitfield
-template_bitfield = lNg=
-
-# Template inheritance
-# See http://blog.phpbb.com/2008/07/31/templating-just-got-easier/
-# Set value to empty to ignore template inheritance
-inherit_from = prosilver
diff --git a/phpBB/styles/prosilver/template/timezone.js b/phpBB/styles/prosilver/template/timezone.js
new file mode 100644
index 0000000000..e0d3da9ff7
--- /dev/null
+++ b/phpBB/styles/prosilver/template/timezone.js
@@ -0,0 +1,21 @@
+(function($) { // Avoid conflicts with other libraries
+
+"use strict";
+
+$('#tz_date').change(function() {
+ phpbb.timezoneSwitchDate(false);
+});
+
+$('#tz_select_date_suggest').click(function(){
+ phpbb.timezonePreselectSelect(true);
+});
+
+$(document).ready(
+ phpbb.timezoneEnableDateSelection
+);
+
+$(document).ready(
+ phpbb.timezonePreselectSelect($('#tz_select_date_suggest').attr('timezone-preselect') === 'true')
+);
+
+})(jQuery); // Avoid conflicts with other libraries
diff --git a/phpBB/styles/prosilver/template/timezone_option.html b/phpBB/styles/prosilver/template/timezone_option.html
new file mode 100644
index 0000000000..fc0579bffd
--- /dev/null
+++ b/phpBB/styles/prosilver/template/timezone_option.html
@@ -0,0 +1,20 @@
+<dl>
+ <dt><label for="timezone">{L_BOARD_TIMEZONE}{L_COLON}</label></dt>
+ <!-- IF S_TZ_DATE_OPTIONS -->
+ <dd id="tz_select_date" style="display: none;">
+ <select name="tz_date" id="tz_date" class="autowidth tz_select">
+ <option value="">{L_SELECT_CURRENT_TIME}</option>
+ {S_TZ_DATE_OPTIONS}
+ </select>
+ <input type="button" id="tz_select_date_suggest" class="button2" style="display: none;" timezone-preselect="<!-- IF S_TZ_PRESELECT -->true<!-- ELSE -->false<!-- ENDIF -->" data-l-suggestion="{L_TIMEZONE_DATE_SUGGESTION}" value="{L_TIMEZONE_DATE_SUGGESTION}" />
+ </dd>
+ <!-- ENDIF -->
+ <dd>
+ <select name="tz" id="timezone" class="autowidth tz_select">
+ <option value="">{L_SELECT_TIMEZONE}</option>
+ {S_TZ_OPTIONS}
+ </select>
+
+ <!-- INCLUDEJS timezone.js -->
+ </dd>
+</dl>
diff --git a/phpBB/styles/prosilver/template/ucp_agreement.html b/phpBB/styles/prosilver/template/ucp_agreement.html
index 3825abc08f..6c96be864a 100644
--- a/phpBB/styles/prosilver/template/ucp_agreement.html
+++ b/phpBB/styles/prosilver/template/ucp_agreement.html
@@ -19,7 +19,7 @@
<form method="post" action="{S_UCP_ACTION}" id="register">
<p class="rightside">
- <label for="lang">{L_LANGUAGE}:</label><select name="lang" id="lang" onchange="change_language(this.value); return false;" title="{L_LANGUAGE}">{S_LANG_OPTIONS}</select>
+ <label for="lang">{L_LANGUAGE}{L_COLON}</label><select name="lang" id="lang" onchange="change_language(this.value); return false;" title="{L_LANGUAGE}">{S_LANG_OPTIONS}</select>
{S_HIDDEN_FIELDS}
</p>
</form>
@@ -31,16 +31,16 @@
<form method="post" action="{S_UCP_ACTION}" id="agreement">
<div class="panel">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<div class="content">
<h2>{SITENAME} - {L_REGISTRATION}</h2>
<p><!-- IF S_SHOW_COPPA -->{L_COPPA_BIRTHDAY}<!-- ELSE -->{L_TERMS_OF_USE}<!-- ENDIF --></p>
</div>
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
<div class="panel">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<fieldset class="submit-buttons">
<!-- IF S_SHOW_COPPA -->
<strong><a href="{U_COPPA_NO}" class="button1">{L_COPPA_NO}</a></strong>&nbsp; <a href="{U_COPPA_YES}" class="button2">{L_COPPA_YES}</a>
@@ -51,21 +51,21 @@
{S_HIDDEN_FIELDS}
{S_FORM_TOKEN}
</fieldset>
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
</form>
<!-- ELSEIF S_AGREEMENT -->
<div class="panel">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<div class="content">
<h2>{SITENAME} - {AGREEMENT_TITLE}</h2>
<p>{AGREEMENT_TEXT}</p>
<hr class="dashed" />
<p><a href="{U_BACK}" class="button2">{L_BACK}</a></p>
</div>
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
<!-- ENDIF -->
diff --git a/phpBB/styles/prosilver/template/ucp_attachments.html b/phpBB/styles/prosilver/template/ucp_attachments.html
index 8052fdc435..ed39e80c12 100644
--- a/phpBB/styles/prosilver/template/ucp_attachments.html
+++ b/phpBB/styles/prosilver/template/ucp_attachments.html
@@ -5,35 +5,43 @@
<h2>{L_TITLE}</h2>
<div class="panel">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<p>{L_ATTACHMENTS_EXPLAIN}</p>
<!-- IF .attachrow -->
<ul class="linklist">
<li class="rightside pagination">
- <!-- IF TOTAL_ATTACHMENTS -->{TOTAL_ATTACHMENTS} {L_TITLE}<!-- ENDIF -->
- <!-- IF PAGE_NUMBER --><!-- IF PAGINATION --> &bull; <a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{PAGE_NUMBER}</a> &bull; <span>{PAGINATION}</span><!-- ELSE --> &bull; {PAGE_NUMBER}<!-- ENDIF --><!-- ENDIF -->
+ <!-- IF TOTAL_ATTACHMENTS -->{TOTAL_ATTACHMENTS} {L_TITLE} &bull; <!-- ENDIF -->
+ <!-- IF .pagination -->
+ <!-- INCLUDE pagination.html -->
+ <!-- ELSE -->
+ {PAGE_NUMBER}
+ <!-- ENDIF -->
</li>
</ul>
<ul class="topiclist">
<li class="header">
<dl>
- <dt style="width: 40%"><a href="{U_SORT_FILENAME}">{L_FILENAME}</a></dt>
+ <dt><div class="list-inner"><a href="{U_SORT_FILENAME}">{L_FILENAME}</a></div></dt>
<dd class="extra"><a href="{U_SORT_DOWNLOADS}">{L_DOWNLOADS}</a></dd>
<dd class="time"><span><a href="{U_SORT_POST_TIME}">{L_POST_TIME}</a></span></dd>
<dd class="mark">{L_MARK}</dd>
</dl>
</li>
</ul>
- <ul class="topiclist cplist">
+ <ul class="topiclist cplist responsive-show-columns">
<!-- BEGIN attachrow -->
<li class="row<!-- IF attachrow.S_ROW_COUNT is odd --> bg1<!-- ELSE --> bg2<!-- ENDIF -->">
<dl>
- <dt style="width: 40%"><a href="{attachrow.U_VIEW_ATTACHMENT}" class="topictitle">{attachrow.FILENAME}</a> ({attachrow.SIZE})<br />
- <!-- IF attachrow.S_IN_MESSAGE -->{L_PM}: <!-- ELSE -->{L_TOPIC}: <!-- ENDIF --><a href="{attachrow.U_VIEW_TOPIC}">{attachrow.TOPIC_TITLE}</a></dt>
+ <dt>
+ <div class="list-inner">
+ <a href="{attachrow.U_VIEW_ATTACHMENT}" class="topictitle">{attachrow.FILENAME}</a> ({attachrow.SIZE})<br />
+ <!-- IF attachrow.S_IN_MESSAGE -->{L_PM}{L_COLON} <!-- ELSE -->{L_TOPIC}{L_COLON} <!-- ENDIF --><a href="{attachrow.U_VIEW_TOPIC}">{attachrow.TOPIC_TITLE}</a>
+ </div>
+ </dt>
<dd class="extra">{attachrow.DOWNLOAD_COUNT}</dd>
<dd class="time"><span>{attachrow.POST_TIME}</span></dd>
<dd class="mark"><input type="checkbox" name="attachment[{attachrow.ATTACH_ID}]" value="1" /></dd>
@@ -43,9 +51,9 @@
</ul>
<fieldset class="display-options">
- <!-- IF NEXT_PAGE --><a href="{NEXT_PAGE}" class="right-box {S_CONTENT_FLOW_END}">{L_NEXT}</a><!-- ENDIF -->
- <!-- IF PREVIOUS_PAGE --><a href="{PREVIOUS_PAGE}" class="left-box {S_CONTENT_FLOW_BEGIN}">{L_PREVIOUS}</a><!-- ENDIF -->
- <label for="sk">{L_SORT_BY}: <select name="sk" id="sk">{S_SORT_OPTIONS}</select></label>
+ <!-- IF U_NEXT_PAGE --><a href="{U_NEXT_PAGE}" class="right-box arrow-{S_CONTENT_FLOW_END}">{L_NEXT}</a><!-- ENDIF -->
+ <!-- IF U_PREVIOUS_PAGE --><a href="{U_PREVIOUS_PAGE}" class="left-box arrow-{S_CONTENT_FLOW_BEGIN}">{L_PREVIOUS}</a><!-- ENDIF -->
+ <label for="sk">{L_SORT_BY}{L_COLON} <select name="sk" id="sk">{S_SORT_OPTIONS}</select></label>
<label><select name="sd" id="sd">{S_ORDER_SELECT}</select></label>
<input class="button2" type="submit" name="sort" value="{L_SORT}" />
{S_FORM_TOKEN}
@@ -55,15 +63,19 @@
<ul class="linklist">
<li class="rightside pagination">
- <!-- IF TOTAL_ATTACHMENTS -->{TOTAL_ATTACHMENTS} {L_TITLE}<!-- ENDIF -->
- <!-- IF PAGE_NUMBER --><!-- IF PAGINATION --> &bull; <a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{PAGE_NUMBER}</a> &bull; <span>{PAGINATION}</span><!-- ELSE --> &bull; {PAGE_NUMBER}<!-- ENDIF --><!-- ENDIF -->
+ <!-- IF TOTAL_ATTACHMENTS -->{TOTAL_ATTACHMENTS} {L_TITLE} &bull; <!-- ENDIF -->
+ <!-- IF .pagination -->
+ <!-- INCLUDE pagination.html -->
+ <!-- ELSE -->
+ {PAGE_NUMBER}
+ <!-- ENDIF -->
</li>
</ul>
<!-- ELSE -->
<p><strong>{L_UCP_NO_ATTACHMENTS}</strong></p>
<!-- ENDIF -->
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
<!-- IF S_ATTACHMENT_ROWS -->
@@ -75,4 +87,4 @@
<!-- ENDIF -->
</form>
-<!-- INCLUDE ucp_footer.html --> \ No newline at end of file
+<!-- INCLUDE ucp_footer.html -->
diff --git a/phpBB/styles/prosilver/template/ucp_auth_link.html b/phpBB/styles/prosilver/template/ucp_auth_link.html
new file mode 100644
index 0000000000..078da58d19
--- /dev/null
+++ b/phpBB/styles/prosilver/template/ucp_auth_link.html
@@ -0,0 +1,15 @@
+<!-- INCLUDE ucp_header.html -->
+
+<h2>{L_UCP_AUTH_LINK_TITLE}</h2>
+
+<div class="panel">
+ <div class="inner">
+ <!-- IF ERROR --><dl><dd class="error">{ERROR}</dd></dl><!-- ENDIF -->
+
+ <!-- IF PROVIDER_TEMPLATE_FILE -->
+ <!-- INCLUDE {PROVIDER_TEMPLATE_FILE} -->
+ <!-- ENDIF -->
+ </div>
+</div>
+
+<!-- INCLUDE ucp_footer.html -->
diff --git a/phpBB/styles/prosilver/template/ucp_auth_link_oauth.html b/phpBB/styles/prosilver/template/ucp_auth_link_oauth.html
new file mode 100644
index 0000000000..18316613b0
--- /dev/null
+++ b/phpBB/styles/prosilver/template/ucp_auth_link_oauth.html
@@ -0,0 +1,29 @@
+<!-- BEGIN oauth -->
+ <form id="ucp" method="post" action="{S_UCP_ACTION}">
+ <h3>{oauth.SERVICE_NAME}</h3>
+
+ <fieldset class="fields2">
+ <!-- IF oauth.UNIQUE_ID -->
+ <dl>
+ <dt>{L_UCP_AUTH_LINK_ID}{L_COLON}</dt>
+ <dd>{oauth.UNIQUE_ID}</dd>
+ </dl>
+ <dl>
+ <dt>&nbsp;</dt>
+ <dd><input type="submit" name="submit" tabindex="6" value="{L_UCP_AUTH_LINK_UNLINK}" class="button1" /></dd>
+ </dl>
+ <!-- ELSE -->
+ <dl>
+ <dd>{L_UCP_AUTH_LINK_ASK}</dd>
+ </dl>
+ <dl>
+ <dt>&nbsp;</dt>
+ <dd><input type="submit" name="submit" tabindex="6" value="{L_UCP_AUTH_LINK_LINK}" class="button1" /></dd>
+ </dl>
+ <!-- ENDIF -->
+ </fieldset>
+ {oauth.HIDDEN_FIELDS}
+ {S_HIDDEN_FIELDS}
+ {S_FORM_TOKEN}
+ </form>
+<!-- END oauth -->
diff --git a/phpBB/styles/prosilver/template/ucp_avatar_options.html b/phpBB/styles/prosilver/template/ucp_avatar_options.html
index 7012c42f3b..072f235eb1 100644
--- a/phpBB/styles/prosilver/template/ucp_avatar_options.html
+++ b/phpBB/styles/prosilver/template/ucp_avatar_options.html
@@ -1,70 +1,50 @@
-
<div class="panel">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<!-- IF not S_AVATARS_ENABLED -->
<p>{L_AVATAR_FEATURES_DISABLED}</p>
<!-- ENDIF -->
<fieldset>
<!-- IF ERROR --><p class="error">{ERROR}</p><!-- ENDIF -->
- <dl>
- <dt><label>{L_CURRENT_IMAGE}:</label><br /><span>{L_AVATAR_EXPLAIN}</span></dt>
- <dd><!-- IF AVATAR -->{AVATAR}<!-- ELSE --><img src="{T_THEME_PATH}/images/no_avatar.gif" alt="" /><!-- ENDIF --></dd>
- <dd><label for="delete"><input type="checkbox" name="delete" id="delete" /> {L_DELETE_AVATAR}</label></dd>
- </dl>
-
- <!-- IF S_UPLOAD_AVATAR_FILE -->
<dl>
- <dt><label for="uploadfile">{L_UPLOAD_AVATAR_FILE}:</label></dt>
- <dd><input type="hidden" name="MAX_FILE_SIZE" value="{AVATAR_SIZE}" /><input type="file" name="uploadfile" id="uploadfile" class="inputbox autowidth" /></dd>
- </dl>
- <!-- ENDIF -->
-
- <!-- IF S_UPLOAD_AVATAR_URL -->
- <dl>
- <dt><label for="uploadurl">{L_UPLOAD_AVATAR_URL}:</label><br /><span>{L_UPLOAD_AVATAR_URL_EXPLAIN}</span></dt>
- <dd><input type="text" name="uploadurl" id="uploadurl" value="{AVATAR_URL}" class="inputbox" /></dd>
- </dl>
- <!-- ENDIF -->
-
- <!-- IF S_LINK_AVATAR -->
- <dl>
- <dt><label for="remotelink">{L_LINK_REMOTE_AVATAR}:</label><br /><span>{L_LINK_REMOTE_AVATAR_EXPLAIN}</span></dt>
- <dd><input type="text" name="remotelink" id="remotelink" value="{AVATAR_REMOTE}" class="inputbox" /></dd>
+ <dt><label>{L_CURRENT_IMAGE}{L_COLON}</label><br /><span>{L_AVATAR_EXPLAIN}</span></dt>
+ <dd><!-- IF AVATAR -->{AVATAR}<!-- ELSE --><img src="{T_THEME_PATH}/images/no_avatar.gif" alt="" /><!-- ENDIF --></dd>
+ <dd><label for="avatar_delete"><input type="checkbox" name="avatar_delete" id="avatar_delete" /> {L_DELETE_AVATAR}</label></dd>
</dl>
+ </fieldset>
+ <h3>{L_AVATAR_SELECT}</h3>
+ <fieldset>
<dl>
- <dt><label for="width">{L_LINK_REMOTE_SIZE}:</label><br /><span>{L_LINK_REMOTE_SIZE_EXPLAIN}</span></dt>
- <dd>
- <label for="width"><input type="text" name="width" id="width" size="3" value="{AVATAR_WIDTH}" class="inputbox autowidth" /> {L_PIXEL}</label> &times;&nbsp;
- <label for="height"><input type="text" name="height" id="height" size="3" value="{AVATAR_HEIGHT}" class="inputbox autowidth" /> {L_PIXEL}</label>
- </dd>
+ <dt><label>{L_AVATAR_TYPE}{L_COLON}</label></dt>
+ <dd><select name="avatar_driver" id="avatar_driver">
+ <option value="">{L_NO_AVATAR_CATEGORY}</option>
+ <!-- BEGIN avatar_drivers -->
+ <option value="{avatar_drivers.DRIVER}"<!-- IF avatar_drivers.SELECTED --> selected="selected"<!-- ENDIF -->>{avatar_drivers.L_TITLE}</option>
+ <!-- END avatar_drivers -->
+ </select></dd>
</dl>
- <!-- ENDIF -->
</fieldset>
+ <div id="avatar_options">
+<!-- BEGIN avatar_drivers -->
+ <div id="avatar_option_{avatar_drivers.DRIVER}">
+ <noscript>
+ <h3 class="avatar_section_header">{avatar_drivers.L_TITLE}</h3>
+ </noscript>
+ <p>{avatar_drivers.L_EXPLAIN}</p>
- <!-- IF S_IN_AVATAR_GALLERY -->
- <span class="corners-bottom"><span></span></span></div>
+ <fieldset>
+ {avatar_drivers.OUTPUT}
+ </fieldset>
+ </div>
+<!-- END avatar_drivers -->
+ </div>
+<!-- IF not S_GROUP_MANAGE -->
+ <fieldset class="submit-buttons">
+ <input type="reset" value="{L_RESET}" name="reset" class="button2" /> &nbsp;
+ <input type="submit" name="submit" value="{L_SUBMIT}" class="button1" />
+ </fieldset>
+<!-- ENDIF -->
</div>
-
- <div class="panel">
- <div class="inner"><span class="corners-top"><span></span></span>
-
- <h3>{L_AVATAR_GALLERY}</h3>
-
- <fieldset>
- <label for="category">{L_AVATAR_CATEGORY}: <select name="category" id="category">{S_CAT_OPTIONS}</select></label>
- <input type="submit" value="{L_GO}" name="display_gallery" class="button2" />
- <input type="submit" name="cancel" value="{L_CANCEL}" class="button2" />
- </fieldset>
-
- <div id="gallery">
- <!-- BEGIN avatar_row --><!-- BEGIN avatar_column -->
- <label for="av-{avatar_row.S_ROW_COUNT}-{avatar_row.avatar_column.S_ROW_COUNT}"><img src="{avatar_row.avatar_column.AVATAR_IMAGE}" alt="" /><br />
- <input type="radio" name="avatar_select" id="av-{avatar_row.S_ROW_COUNT}-{avatar_row.avatar_column.S_ROW_COUNT}" value="{avatar_row.avatar_column.AVATAR_FILE}" /></label>
- <!-- END avatar_column --><!-- END avatar_row -->
- </div>
-
- <!-- ENDIF -->
-
- <span class="corners-bottom"><span></span></span></div>
</div>
+
+<!-- INCLUDEJS avatars.js -->
diff --git a/phpBB/styles/prosilver/template/ucp_avatar_options_gravatar.html b/phpBB/styles/prosilver/template/ucp_avatar_options_gravatar.html
new file mode 100644
index 0000000000..b1076c2d14
--- /dev/null
+++ b/phpBB/styles/prosilver/template/ucp_avatar_options_gravatar.html
@@ -0,0 +1,11 @@
+<dl>
+ <dt><label for="avatar_gravatar_email">{L_GRAVATAR_AVATAR_EMAIL}{L_COLON}</label><br /><span>{L_GRAVATAR_AVATAR_EMAIL_EXPLAIN}</span></dt>
+ <dd><input type="email" name="avatar_gravatar_email" id="avatar_gravatar_email" value="{AVATAR_GRAVATAR_EMAIL}" class="inputbox" data-reset-on-edit="#avatar_gravatar_width, #avatar_gravatar_height" /></dd>
+</dl>
+<dl>
+ <dt><label for="avatar_gravatar_width">{L_GRAVATAR_AVATAR_SIZE}{L_COLON}</label><br /><span>{L_GRAVATAR_AVATAR_SIZE_EXPLAIN}</span></dt>
+ <dd>
+ <label for="avatar_gravatar_width"><input type="text" name="avatar_gravatar_width" id="avatar_gravatar_width" size="3" value="{AVATAR_GRAVATAR_WIDTH}" class="inputbox autowidth" /> {L_PIXEL}</label> &times;&nbsp;
+ <label for="avatar_gravatar_height"><input type="text" name="avatar_gravatar_height" id="avatar_gravatar_height" size="3" value="{AVATAR_GRAVATAR_HEIGHT}" class="inputbox autowidth" /> {L_PIXEL}</label>
+ </dd>
+</dl>
diff --git a/phpBB/styles/prosilver/template/ucp_avatar_options_local.html b/phpBB/styles/prosilver/template/ucp_avatar_options_local.html
new file mode 100644
index 0000000000..3946b9d269
--- /dev/null
+++ b/phpBB/styles/prosilver/template/ucp_avatar_options_local.html
@@ -0,0 +1,20 @@
+<!-- IF .avatar_local_cats -->
+<label for="category">{L_AVATAR_CATEGORY}{L_COLON} <select name="avatar_local_cat" id="category">
+<option value="">{L_NO_AVATAR_CATEGORY}</option>
+<!-- BEGIN avatar_local_cats -->
+<option value="{avatar_local_cats.NAME}"<!-- IF avatar_local_cats.SELECTED --> selected="selected"<!-- ENDIF -->>{avatar_local_cats.NAME}</option>
+<!-- END avatar_local_cats -->
+</select></label>
+<input type="submit" value="{L_GO}" name="avatar_local_go" class="button2" />
+
+<div id="gallery">
+<!-- BEGIN avatar_local_row -->
+<!-- BEGIN avatar_local_col -->
+ <label for="av-{avatar_local_row.S_ROW_COUNT}-{avatar_local_row.avatar_local_col.S_ROW_COUNT}"><img src="{avatar_local_row.avatar_local_col.AVATAR_IMAGE}" alt="" /><br />
+ <input type="radio" name="avatar_local_file" id="av-{avatar_local_row.S_ROW_COUNT}-{avatar_local_row.avatar_local_col.S_ROW_COUNT}" value="{avatar_local_row.avatar_local_col.AVATAR_FILE}" /></label>
+<!-- END avatar_local_col -->
+<!-- END avatar_local_row -->
+</div>
+<!-- ELSE -->
+<p><strong>{L_NO_AVATARS}</strong></p>
+<!-- ENDIF -->
diff --git a/phpBB/styles/prosilver/template/ucp_avatar_options_remote.html b/phpBB/styles/prosilver/template/ucp_avatar_options_remote.html
new file mode 100644
index 0000000000..a8f6135fb2
--- /dev/null
+++ b/phpBB/styles/prosilver/template/ucp_avatar_options_remote.html
@@ -0,0 +1,11 @@
+<dl>
+ <dt><label for="avatar_remote_url">{L_LINK_REMOTE_AVATAR}{L_COLON}</label><br /><span>{L_LINK_REMOTE_AVATAR_EXPLAIN}</span></dt>
+ <dd><input type="url" name="avatar_remote_url" id="avatar_remote_url" value="{AVATAR_REMOTE_URL}" class="inputbox" data-reset-on-edit="#avatar_remote_width, #avatar_remote_height" /></dd>
+</dl>
+<dl>
+ <dt><label for="avatar_remote_width">{L_LINK_REMOTE_SIZE}{L_COLON}</label><br /><span>{L_LINK_REMOTE_SIZE_EXPLAIN}</span></dt>
+ <dd>
+ <label for="avatar_remote_width"><input type="text" name="avatar_remote_width" id="avatar_remote_width" size="3" value="{AVATAR_REMOTE_WIDTH}" class="inputbox autowidth" /> {L_PIXEL}</label> &times;&nbsp;
+ <label for="avatar_remote_height"><input type="text" name="avatar_remote_height" id="avatar_remote_height" size="3" value="{AVATAR_REMOTE_HEIGHT}" class="inputbox autowidth" /> {L_PIXEL}</label>
+ </dd>
+</dl>
diff --git a/phpBB/styles/prosilver/template/ucp_avatar_options_upload.html b/phpBB/styles/prosilver/template/ucp_avatar_options_upload.html
new file mode 100644
index 0000000000..63a734ea7d
--- /dev/null
+++ b/phpBB/styles/prosilver/template/ucp_avatar_options_upload.html
@@ -0,0 +1,11 @@
+<dl>
+ <dt><label for="avatar_upload_file">{L_UPLOAD_AVATAR_FILE}{L_COLON}</label></dt>
+ <dd><input type="hidden" name="MAX_FILE_SIZE" value="{AVATAR_UPLOAD_SIZE}" /><input type="file" name="avatar_upload_file" id="avatar_upload_file" class="inputbox autowidth" /></dd>
+</dl>
+
+<!-- IF S_UPLOAD_AVATAR_URL -->
+ <dl>
+ <dt><label for="avatar_upload_url">{L_UPLOAD_AVATAR_URL}{L_COLON}</label><br /><span>{L_UPLOAD_AVATAR_URL_EXPLAIN}</span></dt>
+ <dd><input type="url" name="avatar_upload_url" id="avatar_upload_url" value="" class="inputbox" /></dd>
+ </dl>
+<!-- ENDIF -->
diff --git a/phpBB/styles/prosilver/template/ucp_footer.html b/phpBB/styles/prosilver/template/ucp_footer.html
index 4b3b14b4b7..ea546f7a82 100644
--- a/phpBB/styles/prosilver/template/ucp_footer.html
+++ b/phpBB/styles/prosilver/template/ucp_footer.html
@@ -12,4 +12,4 @@
<!-- INCLUDE jumpbox.html -->
-<!-- INCLUDE overall_footer.html --> \ No newline at end of file
+<!-- INCLUDE overall_footer.html -->
diff --git a/phpBB/styles/prosilver/template/ucp_groups_manage.html b/phpBB/styles/prosilver/template/ucp_groups_manage.html
index 53d2dfffb3..df80135acb 100644
--- a/phpBB/styles/prosilver/template/ucp_groups_manage.html
+++ b/phpBB/styles/prosilver/template/ucp_groups_manage.html
@@ -5,7 +5,7 @@
<form id="ucp" method="post" action="{S_UCP_ACTION}"{S_FORM_ENCTYPE}>
<div class="panel">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<!-- IF S_ERROR -->
<fieldset>
@@ -20,18 +20,18 @@
<fieldset>
<dl>
- <dt><label for="group_name">{L_GROUP_NAME}:</label></dt>
+ <dt><label for="group_name">{L_GROUP_NAME}{L_COLON}</label></dt>
<dd><!-- IF S_SPECIAL_GROUP --><strong<!-- IF GROUP_COLOUR --> style="color: #{GROUP_COLOUR};"<!-- ENDIF -->>{GROUP_NAME}</strong> <input name="group_name" type="hidden" value="{GROUP_INTERNAL_NAME}" />
<!-- ELSE --><input name="group_name" type="text" id="group_name" value="{GROUP_INTERNAL_NAME}" class="inputbox" /><!-- ENDIF --></dd>
</dl>
<dl>
- <dt><label for="group_desc">{L_GROUP_DESC}:</label></dt>
+ <dt><label for="group_desc">{L_GROUP_DESC}{L_COLON}</label></dt>
<dd><textarea id="group_desc" name="group_desc" rows="5" cols="45" class="inputbox">{GROUP_DESC}</textarea></dd>
<dd><label for="desc_parse_bbcode"><input type="checkbox" class="radio" name="desc_parse_bbcode" id="desc_parse_bbcode"<!-- IF S_DESC_BBCODE_CHECKED --> checked="checked"<!-- ENDIF --> /> {L_PARSE_BBCODE}</label>&nbsp;<label for="desc_parse_smilies"><input type="checkbox" class="radio" name="desc_parse_smilies" id="desc_parse_smilies"<!-- IF S_DESC_SMILIES_CHECKED --> checked="checked"<!-- ENDIF --> /> {L_PARSE_SMILIES}</label>&nbsp;<label for="desc_parse_urls"><input type="checkbox" class="radio" name="desc_parse_urls" id="desc_parse_urls"<!-- IF S_DESC_URLS_CHECKED --> checked="checked"<!-- ENDIF --> /> {L_PARSE_URLS}</label></dd>
</dl>
<!-- IF not S_SPECIAL_GROUP -->
<dl>
- <dt><label for="group_type1">{L_GROUP_TYPE}:</label><br /><span>{L_GROUP_TYPE_EXPLAIN}</span></dt>
+ <dt><label for="group_type1">{L_GROUP_TYPE}{L_COLON}</label><br /><span>{L_GROUP_TYPE_EXPLAIN}</span></dt>
<dd>
<label for="group_type1"><input type="radio" class="radio" name="group_type" id="group_type1" value="{GROUP_TYPE_FREE}"{GROUP_FREE} /> {L_GROUP_OPEN}</label>
<label for="group_type2"><input type="radio" class="radio" name="group_type" id="group_type2" value="{GROUP_TYPE_OPEN}"{GROUP_OPEN} /> {L_GROUP_REQUEST}</label>
@@ -44,34 +44,37 @@
<!-- ENDIF -->
</fieldset>
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
<div class="panel">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<h3>{L_GROUP_SETTINGS_SAVE}</h3>
<fieldset>
<dl>
- <dt><label for="group_colour">{L_GROUP_COLOR}:</label><br /><span>{L_GROUP_COLOR_EXPLAIN}</span></dt>
- <dd><input name="group_colour" type="text" id="group_colour" value="{GROUP_COLOUR}" size="6" maxlength="6" class="inputbox narrow" /> <span style="background-color: #{GROUP_COLOUR};">&nbsp;&nbsp;&nbsp;</span> [ <a href="{U_SWATCH}" onclick="popup(this.href, 636, 150, '_swatch'); return false;">{L_COLOUR_SWATCH}</a> ]</dd>
+ <dt><label for="group_colour">{L_GROUP_COLOR}{L_COLON}</label><br /><span>{L_GROUP_COLOR_EXPLAIN}</span></dt>
+ <dd>
+ <input name="group_colour" type="text" id="group_colour" value="{GROUP_COLOUR}" size="6" maxlength="6" class="inputbox narrow" />
+ <span style="background-color: #{GROUP_COLOUR};">&nbsp;&nbsp;&nbsp;</span>
+ [ <a href="#" id="color_palette_toggle">{L_COLOUR_SWATCH}</a> ]
+ <div id="color_palette_placeholder" class="hidden" data-orientation="h" data-height="12" data-width="15" data-target="#group_colour"></div>
+ </dd>
</dl>
<dl>
- <dt><label for="group_rank">{L_GROUP_RANK}:</label></dt>
+ <dt><label for="group_rank">{L_GROUP_RANK}{L_COLON}</label></dt>
<dd><select name="group_rank" id="group_rank">{S_RANK_OPTIONS}</select></dd>
</dl>
</fieldset>
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
<!-- INCLUDE ucp_avatar_options.html -->
<fieldset class="submit-buttons">
{S_HIDDEN_FIELDS}
- <!-- IF S_DISPLAY_GALLERY --><input type="submit" name="display_gallery" value="{L_DISPLAY_GALLERY}" class="button2" />&nbsp; <!-- ENDIF -->
- <!-- IF S_IN_AVATAR_GALLERY --><input type="submit" name="cancel" value="{L_CANCEL}" class="button2" />&nbsp; <!-- ELSE -->
- <input type="reset" value="{L_RESET}" name="reset" class="button2" />&nbsp; <!-- ENDIF -->
+ <input type="reset" value="{L_RESET}" name="reset" class="button2" />&nbsp;
<input type="submit" name="update" value="{L_SUBMIT}" class="button1" />
{S_FORM_TOKEN}
</fieldset>
@@ -79,7 +82,7 @@
<!-- ELSEIF S_LIST -->
<!-- IF .leader -->
- <table class="table1" cellspacing="1">
+ <table class="table1">
<thead>
<tr>
<th class="name">{L_GROUP_LEAD}</th>
@@ -105,7 +108,7 @@
<!-- BEGIN member -->
<!-- IF member.S_PENDING -->
- <table class="table1" cellspacing="1">
+ <table class="table1">
<thead>
<tr>
<th class="name">{L_GROUP_PENDING}</th>
@@ -121,7 +124,7 @@
</tbody>
</table>
<!-- ENDIF -->
- <table class="table1" cellspacing="1">
+ <table class="table1">
<thead>
<tr>
<th class="name">{L_GROUP_APPROVED}</th>
@@ -142,7 +145,7 @@
</tr>
<!-- ENDIF -->
<!-- BEGINELSE -->
- <table class="table1" cellspacing="1">
+ <table class="table1">
<thead>
<tr>
<th class="name">{L_MEMBERS}</th>
@@ -158,11 +161,15 @@
<ul class="linklist">
<li class="leftside pagination">
- <!-- IF PAGINATION --><a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{S_ON_PAGE}</a> &bull; <span>{PAGINATION}</span><!-- ELSE -->{S_ON_PAGE}<!-- ENDIF -->
+ <!-- IF .pagination -->
+ <!-- INCLUDE pagination.html -->
+ <!-- ELSE -->
+ {PAGE_NUMBER}
+ <!-- ENDIF -->
</li>
</ul>
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
<fieldset class="display-actions">
@@ -172,7 +179,7 @@
</fieldset>
<div class="panel">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<h3>{L_ADD_USERS}</h3>
@@ -180,20 +187,20 @@
<fieldset>
<dl>
- <dt><label for="default0">{L_USER_GROUP_DEFAULT}:</label><br /><span>{L_USER_GROUP_DEFAULT_EXPLAIN}</span></dt>
+ <dt><label for="default0">{L_USER_GROUP_DEFAULT}{L_COLON}</label><br /><span>{L_USER_GROUP_DEFAULT_EXPLAIN}</span></dt>
<dd>
<label for="default1"><input type="radio" name="default" id="default1" value="1" /> {L_YES}</label>
<label for="default0"><input type="radio" name="default" id="default0" value="0" checked="checked" /> {L_NO}</label>
</dd>
</dl>
<dl>
- <dt><label for="usernames">{L_USERNAME}:</label><br /><span>{L_USERNAMES_EXPLAIN}</span></dt>
+ <dt><label for="usernames">{L_USERNAME}{L_COLON}</label><br /><span>{L_USERNAMES_EXPLAIN}</span></dt>
<dd><textarea name="usernames" id="usernames" rows="3" cols="30" class="inputbox"></textarea></dd>
<dd><strong><a href="{U_FIND_USERNAME}" onclick="find_username(this.href); return false;">{L_FIND_USERNAME}</a></strong></dd>
</dl>
</fieldset>
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
<fieldset class="submit-buttons">
@@ -204,21 +211,25 @@
<!-- ELSE -->
<!-- IF .leader -->
- <ul class="topiclist">
+ <ul class="topiclist two-long-columns">
<li class="header">
<dl>
- <dt>{L_GROUP_LEADER}</dt>
+ <dt><div class="list-inner">{L_GROUP_LEADER}</div></dt>
<dd class="info"><span>{L_OPTIONS}</span></dd>
</dl>
</li>
</ul>
- <ul class="topiclist cplist">
+ <ul class="topiclist cplist two-long-columns responsive-show-all">
<!-- BEGIN leader -->
<li class="row<!-- IF attachrow.S_ROW_COUNT is odd --> bg1<!-- ELSE --> bg2<!-- ENDIF -->">
<dl>
- <dt><a href="{leader.U_EDIT}" class="topictitle"<!-- IF leader.GROUP_COLOUR --> style="color: #{leader.GROUP_COLOUR};"<!-- ENDIF -->>{leader.GROUP_NAME}</a>
- <!-- IF leader.GROUP_DESC --><br />{leader.GROUP_DESC}<!-- ENDIF --></dt>
+ <dt>
+ <div class="list-inner">
+ <a href="{leader.U_EDIT}" class="topictitle"<!-- IF leader.GROUP_COLOUR --> style="color: #{leader.GROUP_COLOUR};"<!-- ENDIF -->>{leader.GROUP_NAME}</a>
+ <!-- IF leader.GROUP_DESC --><br />{leader.GROUP_DESC}<!-- ENDIF -->
+ </div>
+ </dt>
<dd class="option"><span><a href="{leader.U_EDIT}" >{L_EDIT}</a></span></dd>
<dd class="option"><span><a href="{leader.U_LIST}">{L_GROUP_LIST}</a></span></dd>
</dl>
@@ -229,10 +240,10 @@
<p><strong>{L_NO_LEADERS}</strong></p>
<!-- ENDIF -->
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
<!-- ENDIF -->
</form>
-<!-- INCLUDE ucp_footer.html --> \ No newline at end of file
+<!-- INCLUDE ucp_footer.html -->
diff --git a/phpBB/styles/prosilver/template/ucp_groups_membership.html b/phpBB/styles/prosilver/template/ucp_groups_membership.html
index ef595dd62d..d7df3b02c2 100644
--- a/phpBB/styles/prosilver/template/ucp_groups_membership.html
+++ b/phpBB/styles/prosilver/template/ucp_groups_membership.html
@@ -5,20 +5,20 @@
<form id="ucp" method="post" action="{S_UCP_ACTION}"{S_FORM_ENCTYPE}>
<div class="panel">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<p>{L_GROUPS_EXPLAIN}</p>
<!-- DEFINE $SHOW_BUTTONS = 0 -->
<!-- IF .leader -->
- <ul class="topiclist">
+ <ul class="topiclist two-columns">
<li class="header">
<dl>
- <dt>{L_GROUP_LEADER}</dt>
+ <dt><div class="list-inner">{L_GROUP_LEADER}</div></dt>
<dd class="mark">{L_SELECT}</dd>
</dl>
</li>
</ul>
- <ul class="topiclist cplist">
+ <ul class="topiclist cplist two-columns">
<!-- BEGIN leader -->
<!-- IF not leader.GROUP_SPECIAL -->
@@ -26,10 +26,13 @@
<!-- ENDIF -->
<li class="row<!-- IF leader.S_ROW_COUNT is odd --> bg1<!-- ELSE --> bg2<!-- ENDIF -->">
<dl>
- <dt><!-- IF S_CHANGE_DEFAULT --><input title="{L_CHANGE_DEFAULT_GROUP}" type="radio" name="default"<!-- IF leader.S_GROUP_DEFAULT --> checked="checked"<!-- ENDIF --> value="{leader.GROUP_ID}" /> <!-- ENDIF -->
- <a href="{leader.U_VIEW_GROUP}" class="forumtitle"<!-- IF leader.GROUP_COLOUR --> style="color:#{leader.GROUP_COLOUR}"<!-- ENDIF -->>{leader.GROUP_NAME}</a>
- <!-- IF leader.GROUP_DESC --><br />{leader.GROUP_DESC}<!-- ENDIF -->
- <!-- IF not leader.GROUP_SPECIAL --><br /><i>{leader.GROUP_STATUS}</i><!-- ENDIF -->
+ <dt>
+ <div class="list-inner">
+ <!-- IF S_CHANGE_DEFAULT --><input title="{L_CHANGE_DEFAULT_GROUP}" type="radio" name="default"<!-- IF leader.S_GROUP_DEFAULT --> checked="checked"<!-- ENDIF --> value="{leader.GROUP_ID}" /> <!-- ENDIF -->
+ <a href="{leader.U_VIEW_GROUP}" class="forumtitle"<!-- IF leader.GROUP_COLOUR --> style="color:#{leader.GROUP_COLOUR}"<!-- ENDIF -->>{leader.GROUP_NAME}</a>
+ <!-- IF leader.GROUP_DESC --><br />{leader.GROUP_DESC}<!-- ENDIF -->
+ <!-- IF not leader.GROUP_SPECIAL --><br /><i>{leader.GROUP_STATUS}</i><!-- ENDIF -->
+ </div>
</dt>
<dd class="mark"><input type="radio" name="selected" value="{leader.GROUP_ID}" <!-- IF leader.GROUP_SPECIAL -->disabled="disabled"<!-- ENDIF --> /></dd>
</dl>
@@ -39,15 +42,15 @@
<!-- ENDIF -->
<!-- IF .member -->
- <ul class="topiclist">
+ <ul class="topiclist two-columns">
<li class="header">
<dl>
- <dt>{L_GROUP_MEMBER}</dt>
+ <dt><div class="list-inner">{L_GROUP_MEMBER}</div></dt>
<dd class="mark">{L_SELECT}</dd>
</dl>
</li>
</ul>
- <ul class="topiclist cplist">
+ <ul class="topiclist cplist two-columns">
<!-- BEGIN member -->
<!-- IF not member.GROUP_SPECIAL -->
@@ -55,10 +58,13 @@
<!-- ENDIF -->
<li class="row<!-- IF member.S_ROW_COUNT is odd --> bg1<!-- ELSE --> bg2<!-- ENDIF -->">
<dl>
- <dt><!-- IF S_CHANGE_DEFAULT --><input title="{L_CHANGE_DEFAULT_GROUP}" type="radio" name="default"<!-- IF member.S_GROUP_DEFAULT --> checked="checked"<!-- ENDIF --> value="{member.GROUP_ID}" /> <!-- ENDIF -->
- <a href="{member.U_VIEW_GROUP}" class="forumtitle"<!-- IF member.GROUP_COLOUR --> style="color:#{member.GROUP_COLOUR}"<!-- ENDIF -->>{member.GROUP_NAME}</a>
- <!-- IF member.GROUP_DESC --><br />{member.GROUP_DESC}<!-- ENDIF -->
- <!-- IF not member.GROUP_SPECIAL --><br /><i>{member.GROUP_STATUS}</i><!-- ENDIF -->
+ <dt>
+ <div class="list-inner">
+ <!-- IF S_CHANGE_DEFAULT --><input title="{L_CHANGE_DEFAULT_GROUP}" type="radio" name="default"<!-- IF member.S_GROUP_DEFAULT --> checked="checked"<!-- ENDIF --> value="{member.GROUP_ID}" /> <!-- ENDIF -->
+ <a href="{member.U_VIEW_GROUP}" class="forumtitle"<!-- IF member.GROUP_COLOUR --> style="color:#{member.GROUP_COLOUR}"<!-- ENDIF -->>{member.GROUP_NAME}</a>
+ <!-- IF member.GROUP_DESC --><br />{member.GROUP_DESC}<!-- ENDIF -->
+ <!-- IF not member.GROUP_SPECIAL --><br /><i>{member.GROUP_STATUS}</i><!-- ENDIF -->
+ </div>
</dt>
<dd class="mark"><input type="radio" name="selected" value="{member.GROUP_ID}" <!-- IF member.GROUP_SPECIAL -->disabled="disabled"<!-- ENDIF --> /></dd>
</dl>
@@ -66,21 +72,21 @@
<!-- END member -->
</ul>
<!-- ENDIF -->
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
<!-- IF .pending -->
<div class="panel">
- <div class="inner"><span class="corners-top"><span></span></span>
- <ul class="topiclist">
+ <div class="inner">
+ <ul class="topiclist two-columns">
<li class="header">
<dl>
- <dt>{L_GROUP_PENDING}</dt>
+ <dt><div class="list-inner">{L_GROUP_PENDING}</div></dt>
<dd class="mark">{L_SELECT}</dd>
</dl>
</li>
</ul>
- <ul class="topiclist cplist">
+ <ul class="topiclist cplist two-columns">
<!-- BEGIN pending -->
<!-- IF not pending.GROUP_SPECIAL -->
@@ -89,30 +95,32 @@
<li class="row<!-- IF pending.S_ROW_COUNT is odd --> bg1<!-- ELSE --> bg2<!-- ENDIF -->">
<dl>
<dt>
- <a href="{pending.U_VIEW_GROUP}" class="forumtitle"<!-- IF pending.GROUP_COLOUR --> style="color:#{pending.GROUP_COLOUR}"<!-- ENDIF -->>{pending.GROUP_NAME}</a>
- <!-- IF pending.GROUP_DESC --><br />{pending.GROUP_DESC}<!-- ENDIF -->
- <!-- IF not pending.GROUP_SPECIAL --><br /><i>{pending.GROUP_STATUS}</i><!-- ENDIF -->
+ <div class="list-inner">
+ <a href="{pending.U_VIEW_GROUP}" class="forumtitle"<!-- IF pending.GROUP_COLOUR --> style="color:#{pending.GROUP_COLOUR}"<!-- ENDIF -->>{pending.GROUP_NAME}</a>
+ <!-- IF pending.GROUP_DESC --><br />{pending.GROUP_DESC}<!-- ENDIF -->
+ <!-- IF not pending.GROUP_SPECIAL --><br /><i>{pending.GROUP_STATUS}</i><!-- ENDIF -->
+ </div>
</dt>
<dd class="mark"><input type="radio" name="selected" value="{pending.GROUP_ID}" <!-- IF pending.GROUP_SPECIAL -->disabled="disabled"<!-- ENDIF --> /></dd>
</dl>
</li>
<!-- END pending -->
</ul>
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
<!-- ENDIF -->
<!-- IF .nonmember -->
<div class="panel">
- <div class="inner"><span class="corners-top"><span></span></span>
- <ul class="topiclist">
+ <div class="inner">
+ <ul class="topiclist two-columns">
<li class="header">
<dl>
- <dt>{L_GROUP_NONMEMBER}</dt>
+ <dt><div class="list-inner">{L_GROUP_NONMEMBER}</div></dt>
<dd class="mark">{L_SELECT}</dd>
</dl>
</li>
</ul>
- <ul class="topiclist cplist">
+ <ul class="topiclist cplist two-columns">
<!-- BEGIN nonmember -->
<!-- IF nonmember.S_CAN_JOIN -->
@@ -121,16 +129,18 @@
<li class="row<!-- IF nonmember.S_ROW_COUNT is odd --> bg1<!-- ELSE --> bg2<!-- ENDIF -->">
<dl>
<dt>
- <a href="{nonmember.U_VIEW_GROUP}" class="forumtitle"<!-- IF nonmember.GROUP_COLOUR --> style="color:#{nonmember.GROUP_COLOUR}"<!-- ENDIF -->>{nonmember.GROUP_NAME}</a>
- <!-- IF nonmember.GROUP_DESC --><br />{nonmember.GROUP_DESC}<!-- ENDIF -->
- <!-- IF not nonmember.GROUP_SPECIAL --><br /><i>{nonmember.GROUP_STATUS}</i><!-- ENDIF -->
+ <div class="list-inner">
+ <a href="{nonmember.U_VIEW_GROUP}" class="forumtitle"<!-- IF nonmember.GROUP_COLOUR --> style="color:#{nonmember.GROUP_COLOUR}"<!-- ENDIF -->>{nonmember.GROUP_NAME}</a>
+ <!-- IF nonmember.GROUP_DESC --><br />{nonmember.GROUP_DESC}<!-- ENDIF -->
+ <!-- IF not nonmember.GROUP_SPECIAL --><br /><i>{nonmember.GROUP_STATUS}</i><!-- ENDIF -->
+ </div>
</dt>
<dd class="mark"><input type="radio" name="selected" value="{nonmember.GROUP_ID}" <!-- IF not nonmember.S_CAN_JOIN -->disabled="disabled"<!-- ENDIF --> /></dd>
</dl>
</li>
<!-- END nonmember -->
</ul>
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
<!-- ENDIF -->
@@ -146,7 +156,7 @@
<!-- IF $SHOW_BUTTONS eq 1 -->
<div class="right-box">
- <label for="action">{L_SELECT}:</label>
+ <label for="action">{L_SELECT}{L_COLON}</label>
<select name="action" id="action">
<option value="join">{L_JOIN_SELECTED}</option>
<option value="resign">{L_RESIGN_SELECTED}</option>
@@ -161,4 +171,4 @@
</form>
-<!-- INCLUDE ucp_footer.html --> \ No newline at end of file
+<!-- INCLUDE ucp_footer.html -->
diff --git a/phpBB/styles/prosilver/template/ucp_header.html b/phpBB/styles/prosilver/template/ucp_header.html
index 4d008564c4..8ce2c54294 100644
--- a/phpBB/styles/prosilver/template/ucp_header.html
+++ b/phpBB/styles/prosilver/template/ucp_header.html
@@ -15,7 +15,7 @@
<!-- ENDIF -->
<div class="panel bg3">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<div style="width: 100%;">
@@ -63,7 +63,7 @@
<!-- IF .friends_online or .friends_offline -->
<div class="cp-mini">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<dl class="mini">
<dt>{L_FRIENDS}</dt>
@@ -77,13 +77,13 @@
<!-- END friends_offline -->
</dl>
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
<!-- ENDIF -->
<!-- IF S_SHOW_COLOUR_LEGEND -->
<div class="cp-mini">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<dl class="mini">
<dt>{L_MESSAGE_COLOURS}</dt>
@@ -92,10 +92,10 @@
<!-- END pm_colour_info -->
</dl>
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
<!-- ENDIF -->
</div>
- <div id="cp-main" class="ucp-main">
+ <div id="cp-main" class="ucp-main panel-container">
diff --git a/phpBB/styles/prosilver/template/ucp_login_link.html b/phpBB/styles/prosilver/template/ucp_login_link.html
new file mode 100644
index 0000000000..d3c6931ce3
--- /dev/null
+++ b/phpBB/styles/prosilver/template/ucp_login_link.html
@@ -0,0 +1,58 @@
+<!-- INCLUDE overall_header.html -->
+
+<div class="panel">
+ <div class="inner">
+
+ <h2>{SITENAME} - {L_LOGIN_LINK}</h2>
+
+ <p>{L_LOGIN_LINK_EXPLAIN}</p>
+
+ <!-- IF LOGIN_LINK_ERROR --><div class="content">
+ <div class="error">{LOGIN_LINK_ERROR}</div>
+ </div><!-- ENDIF -->
+
+ <div class="content">
+ <h2>{L_REGISTER}</h2>
+
+ <form action="{REGISTER_ACTION}" method="post" id="register">
+ <fieldset class="fields1">
+ <dl>
+ <dt>&nbsp;</dt>
+ <dd>{S_HIDDEN_FIELDS}<input type="submit" name="register" tabindex="1" value="{L_REGISTER}" class="button1" /></dd>
+ </dl>
+ </fieldset>
+ </form>
+ </div>
+
+ <div class="content">
+ <h2>{L_LOGIN}</h2>
+
+ <form action="{LOGIN_ACTION}" method="post" id="login">
+ <fieldset class="fields1">
+ <!-- IF LOGIN_ERROR --><div class="error">{LOGIN_ERROR}</div><!-- ENDIF -->
+ <dl>
+ <dt><label for="{USERNAME_CREDENTIAL}">{L_USERNAME}{L_COLON}</label></dt>
+ <dd><input type="text" tabindex="2" name="{USERNAME_CREDENTIAL}" id="{USERNAME_CREDENTIAL}" size="25" value="{LOGIN_USERNAME}" class="inputbox autowidth" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="{PASSWORD_CREDENTIAL}">{L_PASSWORD}{L_COLON}</label></dt>
+ <dd><input type="password" tabindex="3" id="{PASSWORD_CREDENTIAL}" name="{PASSWORD_CREDENTIAL}" size="25" class="inputbox autowidth" /></dd>
+ </dl>
+ <!-- IF CAPTCHA_TEMPLATE and S_CONFIRM_CODE -->
+ <!-- DEFINE $CAPTCHA_TAB_INDEX = 4 -->
+ <!-- INCLUDE {CAPTCHA_TEMPLATE} -->
+ <!-- ENDIF -->
+
+ {S_LOGIN_REDIRECT}
+ <dl>
+ <dt>&nbsp;</dt>
+ <dd>{S_HIDDEN_FIELDS}<input type="submit" name="login" tabindex="5" value="{L_LOGIN}" class="button1" /></dd>
+ </dl>
+ </fieldset>
+ </form>
+ </div>
+
+ </div>
+</div>
+
+<!-- INCLUDE overall_footer.html -->
diff --git a/phpBB/styles/prosilver/template/ucp_main_bookmarks.html b/phpBB/styles/prosilver/template/ucp_main_bookmarks.html
index 9d7c4ce1aa..b9e3c16524 100644
--- a/phpBB/styles/prosilver/template/ucp_main_bookmarks.html
+++ b/phpBB/styles/prosilver/template/ucp_main_bookmarks.html
@@ -5,7 +5,7 @@
<h2>{L_TITLE}</h2>
<div class="panel">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<p>{L_BOOKMARKS_EXPLAIN}</p>
@@ -14,33 +14,60 @@
<!-- ELSE -->
<!-- IF .topicrow -->
- <ul class="topiclist">
+ <ul class="topiclist missing-column">
<li class="header">
<dl class="icon">
- <dt>{L_BOOKMARKS}</dt>
+ <dt><div class="list-inner">{L_BOOKMARKS}</div></dt>
<dd class="lastpost"><span>{L_LAST_POST}</span></dd>
+ <dd class="mark">{L_MARK}</dd>
</dl>
</li>
</ul>
- <ul class="topiclist cplist">
+ <ul class="topiclist cplist missing-column">
<!-- BEGIN topicrow -->
<li class="row<!-- IF topicrow.S_TOPIC_REPORTED --> reported<!-- ELSEIF topicrow.S_ROW_COUNT is odd --> bg1<!-- ELSE --> bg2<!-- ENDIF -->">
<!-- IF topicrow.S_DELETED_TOPIC -->
- <dl><dt><strong>{L_DELETED_TOPIC}</strong></dt>
- <dd class="mark"><input type="checkbox" name="t[{topicrow.TOPIC_ID}]" id="t{topicrow.TOPIC_ID}" /></dd>
+ <dl>
+ <dt><div class="list-inner"><strong>{L_DELETED_TOPIC}</strong></div></dt>
+ <dd class="lastpost"><span>&nbsp;</span></dd>
+ <dd class="mark"><input type="checkbox" name="t[{topicrow.TOPIC_ID}]" id="t{topicrow.TOPIC_ID}" /></dd>
</dl>
<!-- ELSE -->
- <dl class="icon" style="background-image: url({topicrow.TOPIC_FOLDER_IMG_SRC}); background-repeat: no-repeat;">
+ <dl class="icon {topicrow.TOPIC_IMG_STYLE}">
<dt<!-- IF topicrow.TOPIC_ICON_IMG --> style="background-image: url({T_ICONS_PATH}{topicrow.TOPIC_ICON_IMG}); background-repeat: no-repeat;"<!-- ENDIF --> title="{topicrow.TOPIC_FOLDER_IMG_ALT}">
- <!-- IF topicrow.S_UNREAD_TOPIC --><a href="{topicrow.U_NEWEST_POST}">{NEWEST_POST_IMG}</a> <!-- ENDIF --><a href="{topicrow.U_VIEW_TOPIC}" class="topictitle">{topicrow.TOPIC_TITLE}</a>
- <!-- IF topicrow.S_TOPIC_UNAPPROVED or topicrow.S_POSTS_UNAPPROVED --><a href="{topicrow.U_MCP_QUEUE}">{topicrow.UNAPPROVED_IMG}</a> <!-- ENDIF -->
- <!-- IF topicrow.S_TOPIC_REPORTED --><a href="{topicrow.U_MCP_REPORT}">{REPORTED_IMG}</a><!-- ENDIF --><br />
- <!-- IF topicrow.PAGINATION --><strong class="pagination"><span>{topicrow.PAGINATION}</span></strong><!-- ENDIF -->
- <!-- IF topicrow.ATTACH_ICON_IMG -->{topicrow.ATTACH_ICON_IMG} <!-- ENDIF -->{L_POST_BY_AUTHOR} {topicrow.TOPIC_AUTHOR_FULL} &raquo; {topicrow.FIRST_POST_TIME}
+ <!-- IF topicrow.S_UNREAD_TOPIC --><a href="{topicrow.U_NEWEST_POST}" class="icon-link"></a><!-- ENDIF -->
+ <div class="list-inner">
+ <!-- IF topicrow.S_UNREAD_TOPIC --><a href="{topicrow.U_NEWEST_POST}">{NEWEST_POST_IMG}</a> <!-- ENDIF --><a href="{topicrow.U_VIEW_TOPIC}" class="topictitle">{topicrow.TOPIC_TITLE}</a>
+ <!-- IF topicrow.S_TOPIC_UNAPPROVED or topicrow.S_POSTS_UNAPPROVED --><a href="{topicrow.U_MCP_QUEUE}">{topicrow.UNAPPROVED_IMG}</a> <!-- ENDIF -->
+ <!-- IF topicrow.S_TOPIC_REPORTED --><a href="{topicrow.U_MCP_REPORT}">{REPORTED_IMG}</a><!-- ENDIF --><br />
+ <!-- IF .topicrow.pagination -->
+ <div class="pagination">
+ <ul>
+ <!-- BEGIN pagination -->
+ <!-- IF topicrow.pagination.S_IS_PREV -->
+ <!-- ELSEIF topicrow.pagination.S_IS_CURRENT --><li class="active"><span>{topicrow.pagination.PAGE_NUMBER}</span></li>
+ <!-- ELSEIF topicrow.pagination.S_IS_ELLIPSIS --><li class="ellipsis"><span>{L_ELLIPSIS}</span></li>
+ <!-- ELSEIF topicrow.pagination.S_IS_NEXT -->
+ <!-- ELSE --><li><a href="{topicrow.pagination.PAGE_URL}">{topicrow.pagination.PAGE_NUMBER}</a></li>
+ <!-- ENDIF -->
+ <!-- END pagination -->
+ </ul>
+ </div>
+ <!-- ENDIF -->
+ <div class="responsive-hide">
+ <!-- IF topicrow.ATTACH_ICON_IMG -->{topicrow.ATTACH_ICON_IMG} <!-- ENDIF -->
+ {L_POST_BY_AUTHOR} {topicrow.TOPIC_AUTHOR_FULL} &raquo; {topicrow.FIRST_POST_TIME}
+ </div>
+ <div class="responsive-show" style="display: none;">
+ <!-- IF topicrow.ATTACH_ICON_IMG -->{topicrow.ATTACH_ICON_IMG} <!-- ENDIF -->
+ {L_LAST_POST} {L_POST_BY_AUTHOR} {topicrow.LAST_POST_AUTHOR_FULL} &laquo;
+ <a href="{topicrow.U_LAST_POST}" title="{L_GOTO_LAST_POST}">{topicrow.LAST_POST_TIME}</a>
+ </div>
+ </div>
</dt>
<dd class="lastpost"><span><dfn>{L_LAST_POST} </dfn>{L_POST_BY_AUTHOR} {topicrow.LAST_POST_AUTHOR_FULL}
- <a href="{topicrow.U_LAST_POST}">{LAST_POST_IMG}</a> <br />{topicrow.LAST_POST_TIME}</span>
+ <a href="{topicrow.U_LAST_POST}" title="{L_GOTO_LAST_POST}">{LAST_POST_IMG}</a> <br />{topicrow.LAST_POST_TIME}</span>
</dd>
<dd class="mark"><input type="checkbox" name="t[{topicrow.TOPIC_ID}]" id="t{topicrow.TOPIC_ID}" /></dd>
</dl>
@@ -50,8 +77,12 @@
</ul>
<ul class="linklist">
<li class="rightside pagination">
- <!-- IF TOTAL_TOPICS --> {TOTAL_TOPICS} <!-- ENDIF -->
- <!-- IF PAGE_NUMBER --><!-- IF PAGINATION --> &bull; <a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{PAGE_NUMBER}</a> &bull; <span>{PAGINATION}</span><!-- ELSE --> &bull; {PAGE_NUMBER}<!-- ENDIF --><!-- ENDIF -->
+ <!-- IF TOTAL_TOPICS --> {TOTAL_TOPICS} &bull; <!-- ENDIF -->
+ <!-- IF .pagination -->
+ <!-- INCLUDE pagination.html -->
+ <!-- ELSE -->
+ {PAGE_NUMBER}
+ <!-- ENDIF -->
</li>
</ul>
<!-- ELSE -->
@@ -60,7 +91,7 @@
<!-- ENDIF -->
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
<!-- IF .topicrow and not S_NO_DISPLAY_BOOKMARKS -->
@@ -72,4 +103,4 @@
<!-- ENDIF -->
</form>
-<!-- INCLUDE ucp_footer.html --> \ No newline at end of file
+<!-- INCLUDE ucp_footer.html -->
diff --git a/phpBB/styles/prosilver/template/ucp_main_drafts.html b/phpBB/styles/prosilver/template/ucp_main_drafts.html
index dffe0a37ef..52ad5b503b 100644
--- a/phpBB/styles/prosilver/template/ucp_main_drafts.html
+++ b/phpBB/styles/prosilver/template/ucp_main_drafts.html
@@ -5,14 +5,14 @@
<h2>{L_TITLE}</h2>
<div class="panel">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<p>{L_DRAFTS_EXPLAIN}</p>
<!-- IF S_EDIT_DRAFT -->
<!-- INCLUDE posting_editor.html -->
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
<fieldset class="submit-buttons">
@@ -24,26 +24,32 @@
<!-- ELSE -->
<!-- IF .draftrow -->
- <ul class="topiclist">
+ <ul class="topiclist missing-column">
<li class="header">
<dl>
- <dt>{L_DRAFT_TITLE}</dt>
+ <dt><div class="list-inner">{L_DRAFT_TITLE}</div></dt>
<dd class="info"><span>{L_SAVE_DATE}</span></dd>
<dd class="mark">{L_MARK}</dd>
</dl>
</li>
</ul>
- <ul class="topiclist cplist">
+ <ul class="topiclist cplist missing-column">
<!-- BEGIN draftrow -->
<li class="row<!-- IF draftrow.S_ROW_COUNT is odd --> bg1<!-- ELSE --> bg2<!-- ENDIF -->">
<dl>
<dt>
- <a class="topictitle" href="{draftrow.U_VIEW_EDIT}">{draftrow.DRAFT_SUBJECT}</a><br />
- <!-- IF draftrow.S_LINK_TOPIC -->{L_TOPIC}: <a href="{draftrow.U_VIEW}">{draftrow.TITLE}</a>
- <!-- ELSEIF draftrow.S_LINK_FORUM -->{L_FORUM}: <a href="{draftrow.U_VIEW}">{draftrow.TITLE}</a>
- <!-- ELSEIF S_PRIVMSGS -->
- <!-- ELSE -->{L_NO_TOPIC_FORUM}<!-- ENDIF -->
+ <div class="list-inner">
+ <a class="topictitle" href="{draftrow.U_VIEW_EDIT}">{draftrow.DRAFT_SUBJECT}</a><br />
+ <!-- IF draftrow.S_LINK_TOPIC -->{L_TOPIC}{L_COLON} <a href="{draftrow.U_VIEW}">{draftrow.TITLE}</a>
+ <!-- ELSEIF draftrow.S_LINK_FORUM -->{L_FORUM}{L_COLON} <a href="{draftrow.U_VIEW}">{draftrow.TITLE}</a>
+ <!-- ELSEIF S_PRIVMSGS -->
+ <!-- ELSE -->{L_NO_TOPIC_FORUM}<!-- ENDIF -->
+ <div class="responsive-show" style="display: none;">
+ {L_SAVE_DATE}{L_COLON} <strong>{draftrow.DATE}</strong><br />
+ <!-- IF draftrow.U_INSERT --><a href="{draftrow.U_INSERT}">{L_LOAD_DRAFT}</a> &bull; <!-- ENDIF --><a href="{draftrow.U_VIEW_EDIT}">{L_VIEW_EDIT}</a>
+ </div>
+ </div>
</dt>
<dd class="info"><span>{draftrow.DATE}<br /><!-- IF draftrow.U_INSERT --><a href="{draftrow.U_INSERT}">{L_LOAD_DRAFT}</a> &bull; <!-- ENDIF --><a href="{draftrow.U_VIEW_EDIT}">{L_VIEW_EDIT}</a></span></dd>
<dd class="mark"><input type="checkbox" name="d[{draftrow.DRAFT_ID}]" id="d{draftrow.DRAFT_ID}" /></dd>
@@ -55,7 +61,7 @@
<p><strong>{L_NO_SAVED_DRAFTS}</strong></p>
<!-- ENDIF -->
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
<!-- IF .draftrow -->
@@ -70,4 +76,4 @@
</form>
-<!-- INCLUDE ucp_footer.html --> \ No newline at end of file
+<!-- INCLUDE ucp_footer.html -->
diff --git a/phpBB/styles/prosilver/template/ucp_main_front.html b/phpBB/styles/prosilver/template/ucp_main_front.html
index 4a6fa3bf86..942d26edc6 100644
--- a/phpBB/styles/prosilver/template/ucp_main_front.html
+++ b/phpBB/styles/prosilver/template/ucp_main_front.html
@@ -3,24 +3,47 @@
<h2>{L_TITLE}</h2>
<div class="panel">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<p>{L_UCP_WELCOME}</p>
<!-- IF .topicrow -->
<h3>{L_IMPORTANT_NEWS}</h3>
- <ul class="topiclist cplist">
+ <ul class="topiclist cplist two-long-columns">
<!-- BEGIN topicrow -->
<li class="row<!-- IF topicrow.S_ROW_COUNT is odd --> bg1<!-- ELSE --> bg2<!-- ENDIF -->">
- <dl class="icon" style="background-image: url({topicrow.TOPIC_FOLDER_IMG_SRC}); background-repeat: no-repeat;">
+ <dl class="icon {topicrow.TOPIC_IMG_STYLE}">
<dt <!-- IF topicrow.TOPIC_ICON_IMG -->style="background-image: url({T_ICONS_PATH}{topicrow.TOPIC_ICON_IMG}); background-repeat: no-repeat;"<!-- ENDIF -->>
- <!-- IF topicrow.S_UNREAD --><a href="{topicrow.U_NEWEST_POST}">{NEWEST_POST_IMG}</a> <!-- ENDIF --><a href="{topicrow.U_VIEW_TOPIC}" class="topictitle">{topicrow.TOPIC_TITLE}</a><br />
- <!-- IF topicrow.PAGINATION --><strong class="pagination"><span>{topicrow.PAGINATION}</span></strong><!-- ENDIF -->
- <!-- IF topicrow.ATTACH_ICON_IMG -->{topicrow.ATTACH_ICON_IMG} <!-- ENDIF -->{L_POST_BY_AUTHOR} {topicrow.TOPIC_AUTHOR_FULL} &raquo; {topicrow.FIRST_POST_TIME}
+ <!-- IF topicrow.S_UNREAD_TOPIC --><a href="{topicrow.U_NEWEST_POST}" class="icon-link"></a><!-- ENDIF -->
+ <div class="list-inner">
+ <!-- IF topicrow.S_UNREAD --><a href="{topicrow.U_NEWEST_POST}">{NEWEST_POST_IMG}</a> <!-- ENDIF --><a href="{topicrow.U_VIEW_TOPIC}" class="topictitle">{topicrow.TOPIC_TITLE}</a><br />
+ <!-- IF .topicrow.pagination -->
+ <div class="pagination">
+ <ul>
+ <!-- BEGIN pagination -->
+ <!-- IF topicrow.pagination.S_IS_PREV -->
+ <!-- ELSEIF topicrow.pagination.S_IS_CURRENT --><li class="active"><span>{topicrow.pagination.PAGE_NUMBER}</span></li>
+ <!-- ELSEIF topicrow.pagination.S_IS_ELLIPSIS --><li class="ellipsis"><span>{L_ELLIPSIS}</span></li>
+ <!-- ELSEIF topicrow.pagination.S_IS_NEXT -->
+ <!-- ELSE --><li><a href="{topicrow.pagination.PAGE_URL}">{topicrow.pagination.PAGE_NUMBER}</a></li>
+ <!-- ENDIF -->
+ <!-- END pagination -->
+ </ul>
+ </div>
+ <!-- ENDIF -->
+ <div class="responsive-hide">
+ <!-- IF topicrow.ATTACH_ICON_IMG -->{topicrow.ATTACH_ICON_IMG} <!-- ENDIF -->
+ {L_POST_BY_AUTHOR} {topicrow.TOPIC_AUTHOR_FULL} &raquo; {topicrow.FIRST_POST_TIME}
+ </div>
+ <div class="responsive-show" style="display: none;">
+ <!-- IF topicrow.ATTACH_ICON_IMG -->{topicrow.ATTACH_ICON_IMG} <!-- ENDIF -->
+ {L_LAST_POST} {L_POST_BY_AUTHOR} {topicrow.LAST_POST_AUTHOR_FULL} &laquo; <a href="{topicrow.U_LAST_POST}" title="{L_GOTO_LAST_POST}">{topicrow.LAST_POST_TIME}</a>
+ </div>
+ </div>
</dt>
<dd class="lastpost"><span>{L_LAST_POST} {L_POST_BY_AUTHOR} {topicrow.LAST_POST_AUTHOR_FULL}
- <a href="{topicrow.U_LAST_POST}">{LAST_POST_IMG}</a> <br />{topicrow.LAST_POST_TIME}</span>
+ <a href="{topicrow.U_LAST_POST}" title="{L_GOTO_LAST_POST}">{LAST_POST_IMG}</a> <br />{topicrow.LAST_POST_TIME}</span>
</dd>
</dl>
</li>
@@ -31,15 +54,15 @@
<h3>{L_YOUR_DETAILS}</h3>
<dl class="details">
- <dt>{L_JOINED}:</dt> <dd>{JOINED}</dd>
- <dt>{L_VISITED}:</dt> <dd>{LAST_VISIT_YOU}</dd>
- <dt>{L_TOTAL_POSTS}:</dt> <dd><!-- IF POSTS_PCT -->{POSTS}<!-- IF S_DISPLAY_SEARCH --> | <strong><a href="{U_SEARCH_USER}">{L_SEARCH_YOUR_POSTS}</a></strong><!-- ENDIF --><br />({POSTS_DAY} / {POSTS_PCT})<!-- ELSE -->{POSTS}<!-- ENDIF --></dd>
- <!-- IF ACTIVE_FORUM != '' --><dt>{L_ACTIVE_IN_FORUM}:</dt> <dd><strong><a href="{U_ACTIVE_FORUM}">{ACTIVE_FORUM}</a></strong><br />({ACTIVE_FORUM_POSTS} / {ACTIVE_FORUM_PCT})</dd><!-- ENDIF -->
- <!-- IF ACTIVE_TOPIC != '' --><dt>{L_ACTIVE_IN_TOPIC}:</dt> <dd><strong><a href="{U_ACTIVE_TOPIC}">{ACTIVE_TOPIC}</a></strong><br />({ACTIVE_TOPIC_POSTS} / {ACTIVE_TOPIC_PCT})</dd><!-- ENDIF -->
- <!-- IF WARNINGS --><dt>{L_YOUR_WARNINGS}:</dt> <dd class="error">{WARNING_IMG} [{WARNINGS}]</dd><!-- ENDIF -->
+ <dt>{L_JOINED}{L_COLON}</dt> <dd>{JOINED}</dd>
+ <dt>{L_LAST_ACTIVE}{L_COLON}</dt> <dd>{LAST_VISIT_YOU}</dd>
+ <dt>{L_TOTAL_POSTS}{L_COLON}</dt> <dd><!-- IF POSTS_PCT -->{POSTS}<!-- IF S_DISPLAY_SEARCH --> | <strong><a href="{U_SEARCH_USER}">{L_SEARCH_YOUR_POSTS}</a></strong><!-- ENDIF --><br />({POSTS_DAY} / {POSTS_PCT})<!-- ELSE -->{POSTS}<!-- ENDIF --></dd>
+ <!-- IF ACTIVE_FORUM != '' --><dt>{L_ACTIVE_IN_FORUM}{L_COLON}</dt> <dd><strong><a href="{U_ACTIVE_FORUM}">{ACTIVE_FORUM}</a></strong><br />({ACTIVE_FORUM_POSTS} / {ACTIVE_FORUM_PCT})</dd><!-- ENDIF -->
+ <!-- IF ACTIVE_TOPIC != '' --><dt>{L_ACTIVE_IN_TOPIC}{L_COLON}</dt> <dd><strong><a href="{U_ACTIVE_TOPIC}">{ACTIVE_TOPIC}</a></strong><br />({ACTIVE_TOPIC_POSTS} / {ACTIVE_TOPIC_PCT})</dd><!-- ENDIF -->
+ <!-- IF WARNINGS --><dt>{L_YOUR_WARNINGS}{L_COLON}</dt> <dd class="error">{WARNING_IMG} [{WARNINGS}]</dd><!-- ENDIF -->
</dl>
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
-<!-- INCLUDE ucp_footer.html --> \ No newline at end of file
+<!-- INCLUDE ucp_footer.html -->
diff --git a/phpBB/styles/prosilver/template/ucp_main_subscribed.html b/phpBB/styles/prosilver/template/ucp_main_subscribed.html
index 210537ced8..74ab5226cb 100644
--- a/phpBB/styles/prosilver/template/ucp_main_subscribed.html
+++ b/phpBB/styles/prosilver/template/ucp_main_subscribed.html
@@ -4,28 +4,39 @@
<h2>{L_TITLE}</h2>
<div class="panel">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<p>{L_WATCHED_EXPLAIN}</p>
<!-- IF .forumrow -->
- <ul class="topiclist">
+ <ul class="topiclist missing-column">
<li class="header">
<dl class="icon">
- <dt>{L_WATCHED_FORUMS}</dt>
- <dd class="lastpost">{L_LAST_POST}</dd>
+ <dt><div class="list-inner">{L_WATCHED_FORUMS}</div></dt>
+ <dd class="lastpost"><span>{L_LAST_POST}</span></dd>
<dd class="mark">{L_MARK}</dd>
</dl>
</li>
</ul>
- <ul class="topiclist cplist">
+ <ul class="topiclist cplist missing-column">
<!-- BEGIN forumrow -->
<li class="row<!-- IF forumrow.S_ROW_COUNT is odd --> bg1<!-- ELSE --> bg2<!-- ENDIF -->">
- <dl class="icon" style="background-image: url({forumrow.FORUM_FOLDER_IMG_SRC}); background-repeat: no-repeat;">
- <dt><a href="{forumrow.U_VIEWFORUM}" class="forumtitle">{forumrow.FORUM_NAME}</a><br />{forumrow.FORUM_DESC}</dt>
+ <dl class="icon {forumrow.FORUM_IMG_STYLE}">
+ <dt>
+ <!-- IF forumrow.S_UNREAD_FORUM --><a href="{forumrow.U_VIEWFORUM}" class="icon-link"></a><!-- ENDIF -->
+ <div class="list-inner">
+ <a href="{forumrow.U_VIEWFORUM}" class="forumtitle">{forumrow.FORUM_NAME}</a><br />
+ {forumrow.FORUM_DESC}
+ <!-- IF forumrow.LAST_POST_TIME -->
+ <div class="responsive-show" style="display: none;">
+ {L_LAST_POST} {L_POST_BY_AUTHOR} {forumrow.LAST_POST_AUTHOR_FULL} &laquo; <a href="{topicrow.U_LAST_POST}">{forumrow.LAST_POST_TIME}</a>
+ </div>
+ <!-- ENDIF -->
+ </div>
+ </dt>
<dd class="lastpost"><!-- IF forumrow.LAST_POST_TIME --><span><dfn>{L_LAST_POST} </dfn>{L_POST_BY_AUTHOR} {forumrow.LAST_POST_AUTHOR_FULL}
- <a href="{topicrow.U_LAST_POST}">{LAST_POST_IMG}</a> <br />{forumrow.LAST_POST_TIME}</span>
+ <a href="{forumrow.U_LAST_POST}">{LAST_POST_IMG}</a> <br />{forumrow.LAST_POST_TIME}</span>
<!-- ELSE -->{L_NO_POSTS}<br />&nbsp;<!-- ENDIF -->
</dd>
<dd class="mark"><input type="checkbox" name="f[{forumrow.FORUM_ID}]" id="f{forumrow.FORUM_ID}" /></dd>
@@ -34,33 +45,64 @@
<!-- END forumrow -->
</ul>
<!-- ELSEIF S_FORUM_NOTIFY -->
+ <ul class="topiclist">
+ <li class="header">
+ <dl class="icon">
+ <dt>{L_WATCHED_FORUMS}</dt>
+ </dl>
+ </li>
+ </ul>
<p><strong>{L_NO_WATCHED_FORUMS}</strong></p>
<!-- ENDIF -->
+ <br />
<!-- IF .topicrow -->
- <ul class="topiclist">
+ <ul class="topiclist missing-column">
<li class="header">
<dl class="icon">
- <dt>{L_WATCHED_TOPICS}</dt>
- <dd class="lastpost">{L_LAST_POST}</dd>
+ <dt><div class="list-inner">{L_WATCHED_TOPICS}</div></dt>
+ <dd class="lastpost"><span>{L_LAST_POST}</span></dd>
<dd class="mark">{L_MARK}</dd>
</dl>
</li>
</ul>
- <ul class="topiclist cplist">
+ <ul class="topiclist cplist missing-column">
<!-- BEGIN topicrow -->
<li class="row<!-- IF topicrow.S_TOPIC_REPORTED --> reported<!-- ELSEIF topicrow.S_ROW_COUNT is odd --> bg1<!-- ELSE --> bg2<!-- ENDIF -->">
- <dl class="icon" style="background-image: url({topicrow.TOPIC_FOLDER_IMG_SRC}); background-repeat: no-repeat;">
+ <dl class="icon {topicrow.TOPIC_IMG_STYLE}">
<dt<!-- IF topicrow.TOPIC_ICON_IMG --> style="background-image: url({T_ICONS_PATH}{topicrow.TOPIC_ICON_IMG}); background-repeat: no-repeat;"<!-- ENDIF --> title="{topicrow.TOPIC_FOLDER_IMG_ALT}">
- <!-- IF topicrow.S_UNREAD_TOPIC --><a href="{topicrow.U_NEWEST_POST}">{NEWEST_POST_IMG}</a> <!-- ENDIF --><a href="{topicrow.U_VIEW_TOPIC}" class="topictitle">{topicrow.TOPIC_TITLE}</a>
- <!-- IF topicrow.S_TOPIC_UNAPPROVED or topicrow.S_POSTS_UNAPPROVED --><a href="{topicrow.U_MCP_QUEUE}">{topicrow.UNAPPROVED_IMG}</a> <!-- ENDIF -->
- <!-- IF topicrow.S_TOPIC_REPORTED --><a href="{topicrow.U_MCP_REPORT}">{REPORTED_IMG}</a><!-- ENDIF --><br />
- <!-- IF topicrow.PAGINATION --><strong class="pagination"><span>{topicrow.PAGINATION}</span></strong><!-- ENDIF -->
- <!-- IF topicrow.ATTACH_ICON_IMG -->{topicrow.ATTACH_ICON_IMG} <!-- ENDIF -->{L_POST_BY_AUTHOR} {topicrow.TOPIC_AUTHOR_FULL} &raquo; {topicrow.FIRST_POST_TIME}
+ <!-- IF topicrow.S_UNREAD_TOPIC --><a href="{topicrow.U_NEWEST_POST}" class="icon-link"></a><!-- ENDIF -->
+ <div class="list-inner">
+ <!-- IF topicrow.S_UNREAD_TOPIC --><a href="{topicrow.U_NEWEST_POST}">{NEWEST_POST_IMG}</a> <!-- ENDIF --><a href="{topicrow.U_VIEW_TOPIC}" class="topictitle">{topicrow.TOPIC_TITLE}</a>
+ <!-- IF topicrow.S_TOPIC_UNAPPROVED or topicrow.S_POSTS_UNAPPROVED --><a href="{topicrow.U_MCP_QUEUE}">{topicrow.UNAPPROVED_IMG}</a> <!-- ENDIF -->
+ <!-- IF topicrow.S_TOPIC_REPORTED --><a href="{topicrow.U_MCP_REPORT}">{REPORTED_IMG}</a><!-- ENDIF --><br />
+ <!-- IF .topicrow.pagination -->
+ <div class="pagination">
+ <ul>
+ <!-- BEGIN pagination -->
+ <!-- IF topicrow.pagination.S_IS_PREV -->
+ <!-- ELSEIF topicrow.pagination.S_IS_CURRENT --><li class="active"><span>{topicrow.pagination.PAGE_NUMBER}</span></li>
+ <!-- ELSEIF topicrow.pagination.S_IS_ELLIPSIS --><li class="ellipsis"><span>{L_ELLIPSIS}</span></li>
+ <!-- ELSEIF topicrow.pagination.S_IS_NEXT -->
+ <!-- ELSE --><li><a href="{topicrow.pagination.PAGE_URL}">{topicrow.pagination.PAGE_NUMBER}</a></li>
+ <!-- ENDIF -->
+ <!-- END pagination -->
+ </ul>
+ </div>
+ <!-- ENDIF -->
+ <div class="responsive-hide">
+ <!-- IF topicrow.ATTACH_ICON_IMG -->{topicrow.ATTACH_ICON_IMG} <!-- ENDIF -->
+ {L_POST_BY_AUTHOR} {topicrow.TOPIC_AUTHOR_FULL} &raquo; {topicrow.FIRST_POST_TIME}
+ </div>
+ <div class="responsive-show" style="display: none;">
+ <!-- IF topicrow.ATTACH_ICON_IMG -->{topicrow.ATTACH_ICON_IMG} <!-- ENDIF -->
+ {L_LAST_POST} {L_POST_BY_AUTHOR} {topicrow.LAST_POST_AUTHOR_FULL} &laquo; <a href="{topicrow.U_LAST_POST}" title="{L_GOTO_LAST_POST}">{topicrow.LAST_POST_TIME}</a>
+ </div>
+ </div>
</dt>
<dd class="lastpost"><span><dfn>{L_LAST_POST} </dfn>{L_POST_BY_AUTHOR} {topicrow.LAST_POST_AUTHOR_FULL}
- <a href="{topicrow.U_LAST_POST}">{LAST_POST_IMG}</a> <br />{topicrow.LAST_POST_TIME}</span>
+ <a href="{topicrow.U_LAST_POST}" title="{L_GOTO_LAST_POST}">{LAST_POST_IMG}</a> <br />{topicrow.LAST_POST_TIME}</span>
</dd>
<dd class="mark"><input type="checkbox" name="t[{topicrow.TOPIC_ID}]" id="t{topicrow.TOPIC_ID}" /></dd>
</dl>
@@ -69,15 +111,26 @@
</ul>
<ul class="linklist">
<li class="rightside pagination">
- <!-- IF TOTAL_TOPICS --> {TOTAL_TOPICS} <!-- ENDIF -->
- <!-- IF PAGE_NUMBER --><!-- IF PAGINATION --> &bull; <a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{PAGE_NUMBER}</a> &bull; <span>{PAGINATION}</span><!-- ELSE --> &bull; {PAGE_NUMBER}<!-- ENDIF --><!-- ENDIF -->
+ <!-- IF TOTAL_TOPICS --> {TOTAL_TOPICS} &bull; <!-- ENDIF -->
+ <!-- IF .pagination -->
+ <!-- INCLUDE pagination.html -->
+ <!-- ELSE -->
+ {PAGE_NUMBER}
+ <!-- ENDIF -->
</li>
</ul>
<!-- ELSEIF S_TOPIC_NOTIFY -->
+ <ul class="topiclist">
+ <li class="header">
+ <dl class="icon">
+ <dt>{L_WATCHED_TOPICS}</dt>
+ </dl>
+ </li>
+ </ul>
<p><strong>{L_NO_WATCHED_TOPICS}</strong></p>
<!-- ENDIF -->
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
<!-- IF .topicrow or .forumrow -->
@@ -89,4 +142,4 @@
<!-- ENDIF -->
</form>
-<!-- INCLUDE ucp_footer.html --> \ No newline at end of file
+<!-- INCLUDE ucp_footer.html -->
diff --git a/phpBB/styles/prosilver/template/ucp_notifications.html b/phpBB/styles/prosilver/template/ucp_notifications.html
new file mode 100644
index 0000000000..6a711cfd30
--- /dev/null
+++ b/phpBB/styles/prosilver/template/ucp_notifications.html
@@ -0,0 +1,125 @@
+<!-- INCLUDE ucp_header.html -->
+
+<form id="ucp" method="post" action="{S_UCP_ACTION}"{S_FORM_ENCTYPE}>
+
+<h2>{TITLE}</h2>
+<div class="panel">
+ <div class="inner">
+
+ <p>{TITLE_EXPLAIN}</p>
+
+ <!-- IF MODE == 'notification_options' -->
+ <table class="table1">
+ <thead>
+ <th>{L_NOTIFICATION_TYPE}</th>
+ <!-- BEGIN notification_methods -->
+ <th class="mark">{notification_methods.NAME}</th>
+ <!-- END notification_methods -->
+ <th class="mark">{L_NOTIFICATIONS}</th>
+ </thead>
+ <tbody>
+ <!-- BEGIN notification_types -->
+ <!-- IF notification_types.GROUP_NAME -->
+ <tr class="bg3">
+ <td colspan="{NOTIFICATION_TYPES_COLS}">{notification_types.GROUP_NAME}</td>
+ </tr>
+ <!-- ELSE -->
+ <tr class="<!-- IF notification_types.S_ROW_COUNT is odd -->bg1<!-- ELSE -->bg2<!-- ENDIF -->">
+ <td>
+ {notification_types.NAME}
+ <!-- IF notification_types.EXPLAIN --><br />&nbsp; &nbsp;{notification_types.EXPLAIN}<!-- ENDIF -->
+ </td>
+ <!-- BEGIN notification_methods -->
+ <td class="mark"><input type="checkbox" name="{notification_types.TYPE}_{notification_methods.METHOD}"<!-- IF notification_methods.SUBSCRIBED --> checked="checked"<!-- ENDIF --> /></td>
+ <!-- END notification_methods -->
+ <td class="mark"><input type="checkbox" name="{notification_types.TYPE}_notification"<!-- IF notification_types.SUBSCRIBED --> checked="checked"<!-- ENDIF --> /></td>
+ </tr>
+ <!-- ENDIF -->
+ <!-- END notification_types -->
+ </tbody>
+ </table>
+ <!-- ELSE -->
+ <!-- IF .notification_list -->
+ <!-- IF .pagination or TOTAL_COUNT -->
+ <div class="topic-actions">
+ <div class="pagination">
+ <!-- IF U_MARK_ALL --><a href="{U_MARK_ALL}">{L_NOTIFICATIONS_MARK_ALL_READ}</a> &bull; <!-- ENDIF -->
+ <!-- IF TOTAL_COUNT -->{L_NOTIFICATIONS} [<strong>{TOTAL_COUNT}</strong>] &bull; <!-- ENDIF -->
+ <!-- IF .pagination -->
+ <!-- INCLUDE pagination.html -->
+ <!-- ELSE -->
+ {PAGE_NUMBER}
+ <!-- ENDIF -->
+ </div>
+ </div>
+ <!-- ENDIF -->
+
+ <div class="notification_list">
+ <ul class="topiclist two-columns">
+ <li class="header">
+ <dl>
+ <dt><div class="list-inner">{L_NOTIFICATIONS}</div></dt>
+ <dd class="mark">{L_MARK_READ}</dd>
+ </dl>
+ </li>
+ </ul>
+ <ul class="topiclist cplist two-columns">
+ <!-- BEGIN notification_list -->
+ <li class="row<!-- IF notification_list.UNREAD --> bg3<!-- ELSE --><!-- IF notification_list.S_ROW_COUNT is odd --> bg1<!-- ELSE --> bg2<!-- ENDIF --><!-- ENDIF -->">
+ <dl>
+ <dt>
+ <div class="list-inner">
+ <!-- IF notification_list.AVATAR -->{notification_list.AVATAR}<!-- ELSE --><img src="{T_THEME_PATH}/images/no_avatar.gif" alt="" /><!-- ENDIF -->
+ <div class="notifications">
+ <!-- IF notification_list.URL --><a href="<!-- IF notification_list.UNREAD -->{notification_list.U_MARK_READ}<!-- ELSE -->{notification_list.URL}<!-- ENDIF -->"><!-- ENDIF -->
+ <p class="notifications_title">{notification_list.FORMATTED_TITLE}</p>
+ <!-- IF notification_list.URL --></a><!-- ENDIF -->
+ <p class="notifications_time">{notification_list.TIME}</p>
+ <!-- IF not notification_list.URL and notification_list.U_MARK_READ -->
+ <p><a href="{notification_list.U_MARK_READ}">{L_MARK_READ}</a></p>
+ <!-- ENDIF -->
+ </div>
+ </div>
+ </dt>
+
+ <dd class="mark">&nbsp;<input type="checkbox" name="mark[]" value="{notification_list.NOTIFICATION_ID}"<!-- IF not notification_list.UNREAD --> disabled="disabled"<!-- ENDIF --> /> <dfn>{L_MARK_READ}</dfn>&nbsp;</dd>
+ </dl>
+ </li>
+ <!-- END notification_list -->
+ </ul>
+ </div>
+
+ <!-- IF .pagination or TOTAL_COUNT -->
+ <div class="topic-actions">
+ <div class="pagination">
+ <!-- IF TOTAL_COUNT -->{L_NOTIFICATIONS} [<strong>{TOTAL_COUNT}</strong>] &bull; <!-- ENDIF -->
+ <!-- IF .pagination -->
+ <!-- INCLUDE pagination.html -->
+ <!-- ELSE -->
+ {PAGE_NUMBER}
+ <!-- ENDIF -->
+ </div>
+ </div>
+ <!-- ENDIF -->
+
+ <!-- ELSE -->
+ <p><strong>{L_NO_NOTIFICATIONS}</strong></p>
+ <!-- ENDIF -->
+
+ <!-- ENDIF -->
+ </div>
+</div>
+
+<!-- IF .notification_types or .notification_list -->
+<fieldset class="display-actions">
+ <input type="hidden" name="form_time" value="{FORM_TIME}" />
+ {S_HIDDEN_FIELDS}
+ <input type="submit" name="submit" value="<!-- IF MODE == 'notification_options' -->{L_SUBMIT}<!-- ELSE -->{L_MARK_READ}<!-- ENDIF -->" class="button1" />
+ <div><a href="#" onclick="$('#ucp input:checkbox').attr('checked', true); return false;">{L_MARK_ALL}</a> &bull; <a href="#" onclick="$('#ucp input:checkbox').attr('checked', false); return false;">{L_UNMARK_ALL}</a></div>
+ {S_FORM_TOKEN}
+</fieldset>
+<!-- ENDIF -->
+
+</form>
+
+<!-- INCLUDE ucp_footer.html -->
diff --git a/phpBB/styles/prosilver/template/ucp_pm_history.html b/phpBB/styles/prosilver/template/ucp_pm_history.html
index 0767920c1b..d08f622d1f 100644
--- a/phpBB/styles/prosilver/template/ucp_pm_history.html
+++ b/phpBB/styles/prosilver/template/ucp_pm_history.html
@@ -1,7 +1,7 @@
<h3 id="review">
<span class="right-box"><a href="#review" onclick="viewableArea(getElementById('topicreview'), true); var rev_text = getElementById('review').getElementsByTagName('a').item(0).firstChild; if (rev_text.data == '{LA_EXPAND_VIEW}'){rev_text.data = '{LA_COLLAPSE_VIEW}'; } else if (rev_text.data == '{LA_COLLAPSE_VIEW}'){rev_text.data = '{LA_EXPAND_VIEW}'};">{L_EXPAND_VIEW}</a></span>
- {L_MESSAGE_HISTORY}:
+ {L_MESSAGE_HISTORY}{L_COLON}
</h3>
<div id="topicreview">
@@ -12,23 +12,24 @@
</script>
<!-- BEGIN history_row -->
<div class="post <!-- IF history_row.S_ROW_COUNT is even -->bg1<!-- ELSE -->bg2<!-- ENDIF -->">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<div class="postbody" id="pr{history_row.MSG_ID}">
+ <h3><a href="{history_row.U_VIEW_MESSAGE}" <!-- IF history_row.S_CURRENT_MSG -->class="current"<!-- ENDIF -->>{history_row.SUBJECT}</a></h3>
+
<!-- IF history_row.U_QUOTE or history_row.MESSAGE_AUTHOR_QUOTE -->
<ul class="profile-icons">
<li class="quote-icon"><a <!-- IF history_row.U_QUOTE -->href="{history_row.U_QUOTE}"<!-- ELSE -->href="#postingbox" onclick="addquote({history_row.MSG_ID}, '{history_row.MESSAGE_AUTHOR_QUOTE}', '{LA_WROTE}');"<!-- ENDIF --> title="{L_QUOTE} {history_row.MESSAGE_AUTHOR}"><span>{L_QUOTE} {history_row.MESSAGE_AUTHOR}</span></a></li>
</ul>
<!-- ENDIF -->
- <h3><a href="{history_row.U_VIEW_MESSAGE}" <!-- IF history_row.S_CURRENT_MSG -->class="current"<!-- ENDIF -->>{history_row.SUBJECT}</a></h3>
- <p class="author">{history_row.MINI_POST_IMG} {L_SENT_AT}: <strong>{history_row.SENT_DATE}</strong><br />
+ <p class="author">{history_row.MINI_POST_IMG} {L_SENT_AT}{L_COLON} <strong>{history_row.SENT_DATE}</strong><br />
{L_MESSAGE_BY_AUTHOR} {history_row.MESSAGE_AUTHOR_FULL}</p>
<div class="content"><!-- IF history_row.MESSAGE -->{history_row.MESSAGE}<!-- ELSE --><span class="error">{L_MESSAGE_REMOVED_FROM_OUTBOX}</span><!-- ENDIF --></div>
<div id="message_{history_row.MSG_ID}" style="display: none;">{history_row.DECODED_MESSAGE}</div>
</div>
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
<!-- END history_row -->
</div>
diff --git a/phpBB/styles/prosilver/template/ucp_pm_message_header.html b/phpBB/styles/prosilver/template/ucp_pm_message_header.html
index ae66dd0a36..a6ef3fc7dd 100644
--- a/phpBB/styles/prosilver/template/ucp_pm_message_header.html
+++ b/phpBB/styles/prosilver/template/ucp_pm_message_header.html
@@ -1,27 +1,31 @@
-<h2>{L_TITLE}<!-- IF CUR_FOLDER_NAME -->: {CUR_FOLDER_NAME}<!-- ENDIF --></h2>
+<h2>{L_TITLE}<!-- IF CUR_FOLDER_NAME -->{L_COLON} {CUR_FOLDER_NAME}<!-- ENDIF --></h2>
<form id="viewfolder" method="post" action="{S_PM_ACTION}">
<div class="panel">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<!-- IF FOLDER_STATUS and FOLDER_MAX_MESSAGES neq 0 --><p>{FOLDER_STATUS}</p><!-- ENDIF -->
<!-- IF U_POST_REPLY_PM or U_POST_NEW_TOPIC or U_FORWARD_PM -->
<div class="buttons">
- <!-- IF U_POST_REPLY_PM --><div class="pmreply-icon"><a title="{L_POST_REPLY_PM}" href="{U_POST_REPLY_PM}"><span></span>{L_POST_REPLY_PM}</a></div>
- <!-- ELSEIF U_POST_NEW_TOPIC --><div class="newpm-icon"><a href="{U_POST_NEW_TOPIC}" accesskey="n" title="{L_UCP_PM_COMPOSE}"><span></span>{L_UCP_PM_COMPOSE}</a></div><!-- ENDIF -->
- <!-- IF U_FORWARD_PM --><div class="forwardpm-icon"><a title="{L_POST_FORWARD_PM}" href="{U_FORWARD_PM}"><span></span>{L_FORWARD_PM}</a></div><!-- ENDIF -->
- <!-- IF U_POST_REPLY_PM and S_PM_RECIPIENTS gt 1 --><div class="reply-all"><a class="left" title="{L_REPLY_TO_ALL}" href="{U_POST_REPLY_ALL}">{L_REPLY_TO_ALL}</a></div><!-- ENDIF -->
+ <!-- IF U_POST_REPLY_PM --><div class="pmreply-icon"><a title="{L_POST_REPLY_PM}" href="{U_POST_REPLY_PM}"><span></span>{L_BUTTON_PM_REPLY}</a></div>
+ <!-- ELSEIF U_POST_NEW_TOPIC --><div class="newpm-icon"><a href="{U_POST_NEW_TOPIC}" accesskey="n" title="{L_UCP_PM_COMPOSE}"><span></span>{L_BUTTON_PM_NEW}</a></div><!-- ENDIF -->
+ <!-- IF U_FORWARD_PM --><div class="forwardpm-icon"><a title="{L_POST_FORWARD_PM}" href="{U_FORWARD_PM}"><span></span>{L_BUTTON_PM_FORWARD}</a></div><!-- ENDIF -->
+ <!-- IF U_POST_REPLY_PM and S_PM_RECIPIENTS gt 1 --><div class="reply-all"><a title="{L_REPLY_TO_ALL}" href="{U_POST_REPLY_ALL}">{L_BUTTON_PM_REPLY_ALL}</a></div><!-- ENDIF -->
</div>
<!-- ENDIF -->
<!-- IF TOTAL_MESSAGES or S_VIEW_MESSAGE -->
<ul class="linklist">
<li class="rightside pagination">
- <!-- IF S_VIEW_MESSAGE --><a class="{S_CONTENT_FLOW_BEGIN}" href="{U_CURRENT_FOLDER}">{L_RETURN_TO} {CUR_FOLDER_NAME}</a><!-- ENDIF -->
+ <!-- IF S_VIEW_MESSAGE --><a class="arrow-{S_CONTENT_FLOW_BEGIN}" href="{U_CURRENT_FOLDER}">{L_RETURN_TO_FOLDER}</a><!-- ENDIF -->
<!-- IF FOLDER_CUR_MESSAGES neq 0 -->
- <!-- IF TOTAL_MESSAGES -->{TOTAL_MESSAGES}<!-- ENDIF -->
- <!-- IF PAGE_NUMBER --><!-- IF PAGINATION --> &bull; <a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{PAGE_NUMBER}</a> &bull; <span>{PAGINATION}</span><!-- ELSE --> &bull; {PAGE_NUMBER}<!-- ENDIF --><!-- ENDIF -->
+ <!-- IF TOTAL_MESSAGES -->{TOTAL_MESSAGES} &bull; <!-- ENDIF -->
+ <!-- IF .pagination -->
+ <!-- INCLUDE pagination.html -->
+ <!-- ELSE -->
+ {PAGE_NUMBER}
+ <!-- ENDIF -->
<!-- ENDIF -->
</li>
</ul>
diff --git a/phpBB/styles/prosilver/template/ucp_pm_options.html b/phpBB/styles/prosilver/template/ucp_pm_options.html
index a8693ac9b9..247be8b6fd 100644
--- a/phpBB/styles/prosilver/template/ucp_pm_options.html
+++ b/phpBB/styles/prosilver/template/ucp_pm_options.html
@@ -5,16 +5,16 @@
<form id="ucp" method="post" action="{S_UCP_ACTION}">
<div class="panel">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<!-- IF ERROR_MESSAGE --><p class="error">{ERROR_MESSAGE}</p><!-- ENDIF -->
<!-- IF NOTIFICATION_MESSAGE --><p class="error">{NOTIFICATION_MESSAGE}</p><!-- ENDIF -->
-
+
<h3>{L_DEFINED_RULES}</h3>
<ol class="def-rules">
<!-- BEGIN rule -->
- <li><div class="right-box"><input type="submit" name="delete_rule[{rule.RULE_ID}]" value="{L_DELETE_RULE}" class="button2" /></div><strong>{L_IF}</strong> {rule.CHECK} <em>{rule.RULE}</em> <!-- IF rule.STRING --><strong>{rule.STRING}</strong> | <!-- ENDIF -->{rule.ACTION}<!-- IF rule.FOLDER -->: {rule.FOLDER}<!-- ENDIF --><div style="clear: both;"></div></li>
+ <li><div class="right-box"><input type="submit" name="delete_rule[{rule.RULE_ID}]" value="{L_DELETE_RULE}" class="button2" /></div><strong>{L_IF}</strong> {rule.CHECK} <em>{rule.RULE}</em> <!-- IF rule.STRING --><strong>{rule.STRING}</strong> | <!-- ENDIF -->{rule.ACTION}<!-- IF rule.FOLDER -->{L_COLON} {rule.FOLDER}<!-- ENDIF --><div style="clear: both;"></div></li>
<!-- BEGINELSE -->
<li><strong>{L_NO_RULES_DEFINED}</strong></li>
<!-- END rule -->
@@ -26,7 +26,7 @@
<!-- IF S_CHECK_DEFINED -->
<dl>
- <dt><label<!-- IF S_CHECK_SELECT --> for="check_option"<!-- ENDIF -->>{L_IF}:</label></dt>
+ <dt><label<!-- IF S_CHECK_SELECT --> for="check_option"<!-- ENDIF -->>{L_IF}{L_COLON}</label></dt>
<dd>
<!-- IF S_CHECK_SELECT --><select name="check_option" id="check_option">{S_CHECK_OPTIONS}</select> <input type="submit" name="next" value="{L_NEXT_STEP}" class="button2" /><!-- ELSE -->{CHECK_CURRENT}<input type="hidden" name="check_option" value="{CHECK_OPTION}" /><!-- ENDIF -->
</dd>
@@ -81,26 +81,26 @@
<!-- IF not S_MAX_FOLDER_ZERO -->
<dl>
- <dt><label for="foldername">{L_ADD_FOLDER}:</label></dt>
+ <dt><label for="foldername">{L_ADD_FOLDER}{L_COLON}</label></dt>
<dd><!-- IF S_MAX_FOLDER_REACHED -->{L_MAX_FOLDER_REACHED}<!-- ELSE --><input type="text" class="inputbox medium" name="foldername" id="foldername" size="30" maxlength="30" /> <input class="button2" type="submit" name="addfolder" value="{L_ADD}" /><!-- ENDIF --></dd>
</dl>
<!-- IF S_FOLDER_OPTIONS --><hr class="dashed" /><!-- ENDIF -->
<!-- ENDIF -->
-
+
<!-- IF S_FOLDER_OPTIONS -->
<dl>
- <dt><label for="rename_folder_id">{L_RENAME_FOLDER}:</label></dt>
+ <dt><label for="rename_folder_id">{L_RENAME_FOLDER}{L_COLON}</label></dt>
<dd><select name="rename_folder_id" id="rename_folder_id">{S_FOLDER_OPTIONS}</select></dd>
- <dt><label for="new_folder_name">{L_NEW_FOLDER_NAME}:</label></dt>
+ <dt><label for="new_folder_name">{L_NEW_FOLDER_NAME}{L_COLON}</label></dt>
<dd><input type="text" class="inputbox tiny" name="new_folder_name" id="new_folder_name" maxlength="30" /> <input class="button2" type="submit" name="rename_folder" value="{L_RENAME}" /></dd>
</dl>
<hr class="dashed" />
<dl>
- <dt><label for="remove_folder_id">{L_REMOVE_FOLDER}:</label></dt>
+ <dt><label for="remove_folder_id">{L_REMOVE_FOLDER}{L_COLON}</label></dt>
<dd><select name="remove_folder_id" id="remove_folder_id">{S_FOLDER_OPTIONS}</select></dd>
- <dd style="margin-top: 3px;"><label for="remove_action1"><input type="radio" name="remove_action" id="remove_action1" value="1" checked="checked" /> {L_MOVE_DELETED_MESSAGES_TO}:</label> <select name="move_to">{S_TO_FOLDER_OPTIONS}</select></dd>
+ <dd style="margin-top: 3px;"><label for="remove_action1"><input type="radio" name="remove_action" id="remove_action1" value="1" checked="checked" /> {L_MOVE_DELETED_MESSAGES_TO}{L_COLON}</label> <select name="move_to">{S_TO_FOLDER_OPTIONS}</select></dd>
<dd style="margin-top: 3px;"><label for="remove_action2"><input type="radio" name="remove_action" id="remove_action2" value="2" /> {L_DELETE_MESSAGES_IN_FOLDER}</label></dd>
<dd style="margin-top: 3px;"><input class="button2" type="submit" name="remove_folder" value="{L_REMOVE}" /></dd>
</dl>
@@ -109,23 +109,23 @@
<hr class="dashed" />
<dl>
- <dt><label for="full_action1">{L_IF_FOLDER_FULL}:</label></dt>
+ <dt><label for="full_action1">{L_IF_FOLDER_FULL}{L_COLON}</label></dt>
<dd style="margin-top: 3px;"><label for="full_action1"><input type="radio" name="full_action" id="full_action1" value="1"{S_DELETE_CHECKED} /> {L_DELETE_OLDEST_MESSAGES}</label></dd>
- <dd style="margin-top: 3px;"><label for="full_action2"><input type="radio" name="full_action" id="full_action2" value="2"{S_MOVE_CHECKED} /> {L_MOVE_TO_FOLDER}:</label> <select name="full_move_to">{S_FULL_FOLDER_OPTIONS}</select></dd>
+ <dd style="margin-top: 3px;"><label for="full_action2"><input type="radio" name="full_action" id="full_action2" value="2"{S_MOVE_CHECKED} /> {L_MOVE_TO_FOLDER}{L_COLON}</label> <select name="full_move_to">{S_FULL_FOLDER_OPTIONS}</select></dd>
<dd style="margin-top: 3px;"><label for="full_action3" style="white-space:normal;"><input type="radio" name="full_action" id="full_action3" value="3"{S_HOLD_CHECKED} /> {L_HOLD_NEW_MESSAGES}</label></dd>
</dl>
<dl>
- <dt><label>{L_DEFAULT_ACTION}:</label><br /><span>{L_DEFAULT_ACTION_EXPLAIN}</span></dt>
+ <dt><label>{L_DEFAULT_ACTION}{L_COLON}</label><br /><span>{L_DEFAULT_ACTION_EXPLAIN}</span></dt>
<dd>{DEFAULT_ACTION}</dd>
<dd><input class="button2" type="submit" name="fullfolder" value="{L_CHANGE}" /></dd>
</dl>
</fieldset>
- <span class="corners-bottom"><span></span></span></div>
+ </div>
{S_FORM_TOKEN}
</div>
</form>
-<!-- INCLUDE ucp_footer.html --> \ No newline at end of file
+<!-- INCLUDE ucp_footer.html -->
diff --git a/phpBB/styles/prosilver/template/ucp_pm_popup.html b/phpBB/styles/prosilver/template/ucp_pm_popup.html
deleted file mode 100644
index 325362dc4d..0000000000
--- a/phpBB/styles/prosilver/template/ucp_pm_popup.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<!-- INCLUDE simple_header.html -->
-
-<script type="text/javascript">
-// <![CDATA[
-/**
-* Jump to inbox
-*/
-function jump_to_inbox(url)
-{
- opener.document.location.href = url.replace(/&amp;/g, '&');
- window.close();
-}
-// ]]>
-</script>
-
-<div class="panel">
- <div class="inner"><span class="corners-top"><span></span></span>
- <div class="content">
- <p><!-- IF S_NOT_LOGGED_IN -->{L_LOGIN_CHECK_PM}<!-- ELSE -->{MESSAGE}<br /><br />{CLICK_TO_VIEW}<!-- ENDIF --></p>
- <p class="small"><a href="#" onclick="window.close(); return false;">{L_CLOSE_WINDOW}</a></p>
- </div>
- <span class="corners-bottom"><span></span></span></div>
-</div>
-
-<!-- INCLUDE simple_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/prosilver/template/ucp_pm_viewfolder.html b/phpBB/styles/prosilver/template/ucp_pm_viewfolder.html
index c9f28cec64..b081c14498 100644
--- a/phpBB/styles/prosilver/template/ucp_pm_viewfolder.html
+++ b/phpBB/styles/prosilver/template/ucp_pm_viewfolder.html
@@ -8,19 +8,19 @@
<h2>{L_EXPORT_AS_CSV}</h2>
<form id="viewfolder" method="post" action="{S_PM_ACTION}">
<div class="panel">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<h3>{L_OPTIONS}</h3>
<fieldset>
<dl>
- <dt><label for="delimiter">{L_DELIMITER}:</label></dt>
+ <dt><label for="delimiter">{L_DELIMITER}{L_COLON}</label></dt>
<dd><input class="inputbox" type="text" id="delimiter" name="delimiter" value="," /></dd>
</dl>
<dl>
- <dt><label for="enclosure">{L_ENCLOSURE}:</label></dt>
+ <dt><label for="enclosure">{L_ENCLOSURE}{L_COLON}</label></dt>
<dd><input class="inputbox" type="text" id="enclosure" name="enclosure" value="&#034;" /></dd>
</dl>
</fieldset>
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
<fieldset class="submit-buttons">
<input type="hidden" name="export_option" value="CSV" />
@@ -45,20 +45,22 @@
<!-- ENDIF -->
<!-- IF .messagerow -->
- <ul class="topiclist">
+ <ul class="topiclist two-columns">
<li class="header">
<dl>
- <dt>{L_MESSAGE}</dt>
+ <dt><div class="list-inner">{L_MESSAGE}</div></dt>
<dd class="mark">{L_MARK}</dd>
</dl>
</li>
</ul>
- <ul class="topiclist cplist pmlist">
+ <ul class="topiclist cplist pmlist responsive-show-all <!-- IF S_SHOW_RECIPIENTS -->missing-column<!-- ELSE -->two-columns<!-- ENDIF -->">
<!-- BEGIN messagerow -->
<li class="row<!-- IF messagerow.S_ROW_COUNT is odd --> bg1<!-- ELSE --> bg2<!-- ENDIF --><!-- IF messagerow.PM_CLASS --> {messagerow.PM_CLASS}<!-- ENDIF -->">
- <dl class="icon" style="background-image: url({messagerow.FOLDER_IMG_SRC}); background-repeat: no-repeat;">
+ <dl class="icon {messagerow.FOLDER_IMG_STYLE}">
<dt<!-- IF messagerow.PM_ICON_URL and S_PM_ICONS --> style="background-image: url({messagerow.PM_ICON_URL}); background-repeat: no-repeat;"<!-- ENDIF -->>
+ <!-- IF messagerow.S_PM_UNREAD and not messagerow.S_PM_DELETED --><a href="{messagerow.U_VIEW_PM}" class="icon-link"></a><!-- ENDIF -->
+ <div class="list-inner">
<!-- IF messagerow.S_PM_DELETED -->
<a href="{messagerow.U_REMOVE_PM}" class="topictitle">{L_DELETE_MESSAGE}</a><br />
@@ -72,8 +74,10 @@
<!-- IF messagerow.S_PM_REPORTED --><a href="{messagerow.U_MCP_REPORT}">{REPORTED_IMG}</a><!-- ENDIF --> {messagerow.ATTACH_ICON_IMG}<br />
<!-- IF S_SHOW_RECIPIENTS -->{L_MESSAGE_TO} {messagerow.RECIPIENTS}<!-- ELSE -->{L_MESSAGE_BY_AUTHOR} {messagerow.MESSAGE_AUTHOR_FULL} &raquo; {messagerow.SENT_TIME}<!-- ENDIF -->
+
+ </div>
</dt>
- <!-- IF S_SHOW_RECIPIENTS --><dd class="info"><span>{L_SENT_AT}: {messagerow.SENT_TIME}</span></dd><!-- ENDIF -->
+ <!-- IF S_SHOW_RECIPIENTS --><dd class="info"><span>{L_SENT_AT}{L_COLON} {messagerow.SENT_TIME}</span></dd><!-- ENDIF -->
<!-- IF S_UNREAD --><dd class="info"><!-- IF messagerow.FOLDER --><a href="{messagerow.U_FOLDER}">{messagerow.FOLDER}</a><!-- ELSE -->{L_UNKNOWN_FOLDER}<!-- ENDIF --></dd><!-- ENDIF -->
<dd class="mark"><input type="checkbox" name="marked_msg_id[]" value="{messagerow.MESSAGE_ID}" /></dd>
</dl>
@@ -93,7 +97,7 @@
<!-- IF FOLDER_CUR_MESSAGES neq 0 -->
<fieldset class="display-actions">
- <div class="left-box"><label for="export_option">{L_EXPORT_FOLDER}: <select name="export_option" id="export_option"><option value="CSV">{L_EXPORT_AS_CSV}</option><option value="CSV_EXCEL">{L_EXPORT_AS_CSV_EXCEL}</option><option value="XML">{L_EXPORT_AS_XML}</option></select></label> <input class="button2" type="submit" name="submit_export" value="{L_GO}" /><br /></div>
+ <div class="left-box"><label for="export_option">{L_EXPORT_FOLDER}{L_COLON} <select name="export_option" id="export_option"><option value="CSV">{L_EXPORT_AS_CSV}</option><option value="CSV_EXCEL">{L_EXPORT_AS_CSV_EXCEL}</option><option value="XML">{L_EXPORT_AS_XML}</option></select></label> <input class="button2" type="submit" name="submit_export" value="{L_GO}" /><br /></div>
<select name="mark_option">{S_MARK_OPTIONS}{S_MOVE_MARKED_OPTIONS}</select> <input class="button2" type="submit" name="submit_mark" value="{L_GO}" />
<div><a href="#" onclick="marklist('viewfolder', 'marked_msg', true); return false;">{L_MARK_ALL}</a> &bull; <a href="#" onclick="marklist('viewfolder', 'marked_msg', false); return false;">{L_UNMARK_ALL}</a></div>
</fieldset>
@@ -103,27 +107,32 @@
<ul class="linklist">
<!-- IF TOTAL_MESSAGES or S_VIEW_MESSAGE -->
<li class="rightside pagination">
- <!-- IF TOTAL_MESSAGES -->{TOTAL_MESSAGES}<!-- ENDIF -->
- <!-- IF PAGE_NUMBER --><!-- IF PAGINATION --> &bull; <a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{PAGE_NUMBER}</a> &bull; <span>{PAGINATION}</span><!-- ELSE --> &bull; {PAGE_NUMBER}<!-- ENDIF --><!-- ENDIF -->
+ <!-- IF TOTAL_MESSAGES -->{TOTAL_MESSAGES} &bull; <!-- ENDIF -->
+ <!-- IF .pagination -->
+ <!-- INCLUDE pagination.html -->
+ <!-- ELSE -->
+ {PAGE_NUMBER}
+ <!-- ENDIF -->
</li>
<!-- ENDIF -->
</ul>
<!-- ENDIF -->
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
<!-- IF FOLDER_CUR_MESSAGES neq 0 -->
<fieldset class="display-options">
- <!-- IF PREVIOUS_PAGE --><a href="{PREVIOUS_PAGE}" class="left-box {S_CONTENT_FLOW_BEGIN}">{L_PREVIOUS}</a><!-- ENDIF -->
- <!-- IF NEXT_PAGE --><a href="{NEXT_PAGE}" class="right-box {S_CONTENT_FLOW_END}">{L_NEXT}</a><!-- ENDIF -->
- <label>{L_DISPLAY}: {S_SELECT_SORT_DAYS}</label>
+ <!-- IF U_PREVIOUS_PAGE --><a href="{U_PREVIOUS_PAGE}" class="left-box arrow-{S_CONTENT_FLOW_BEGIN}">{L_PREVIOUS}</a><!-- ENDIF -->
+ <!-- IF U_NEXT_PAGE --><a href="{U_NEXT_PAGE}" class="right-box arrow-{S_CONTENT_FLOW_END}">{L_NEXT}</a><!-- ENDIF -->
+ <label>{L_DISPLAY}{L_COLON} {S_SELECT_SORT_DAYS}</label>
<label>{L_SORT_BY} {S_SELECT_SORT_KEY}</label>
- <label>{S_SELECT_SORT_DIR} <input type="submit" name="sort" value="{L_GO}" class="button2" /></label>
+ <label>{S_SELECT_SORT_DIR}</label>
+ <input type="submit" name="sort" value="{L_GO}" class="button2" />
<input type="hidden" name="cur_folder_id" value="{CUR_FOLDER_ID}" />
</fieldset>
<!-- ENDIF -->
<!-- INCLUDE ucp_pm_message_footer.html -->
<!-- ENDIF -->
-<!-- INCLUDE ucp_footer.html --> \ No newline at end of file
+<!-- INCLUDE ucp_footer.html -->
diff --git a/phpBB/styles/prosilver/template/ucp_pm_viewmessage.html b/phpBB/styles/prosilver/template/ucp_pm_viewmessage.html
index 1840732b64..d57c73217e 100644
--- a/phpBB/styles/prosilver/template/ucp_pm_viewmessage.html
+++ b/phpBB/styles/prosilver/template/ucp_pm_viewmessage.html
@@ -2,22 +2,62 @@
<!-- INCLUDE ucp_pm_message_header.html -->
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
<!-- IF S_DISPLAY_HISTORY and (U_VIEW_PREVIOUS_HISTORY or U_VIEW_NEXT_HISTORY) -->
<fieldset class="display-options clearfix">
- <!-- IF U_VIEW_PREVIOUS_HISTORY --><a href="{U_VIEW_PREVIOUS_HISTORY}" class="left-box {S_CONTENT_FLOW_BEGIN}">{L_VIEW_PREVIOUS_HISTORY}</a><!-- ENDIF -->
- <!-- IF U_VIEW_NEXT_HISTORY --><a href="{U_VIEW_NEXT_HISTORY}" class="right-box {S_CONTENT_FLOW_END}">{L_VIEW_NEXT_HISTORY}</a><!-- ENDIF -->
+ <!-- IF U_VIEW_PREVIOUS_HISTORY --><a href="{U_VIEW_PREVIOUS_HISTORY}" class="left-box arrow-{S_CONTENT_FLOW_BEGIN}">{L_VIEW_PREVIOUS_HISTORY}</a><!-- ENDIF -->
+ <!-- IF U_VIEW_NEXT_HISTORY --><a href="{U_VIEW_NEXT_HISTORY}" class="right-box arrow-{S_CONTENT_FLOW_END}">{L_VIEW_NEXT_HISTORY}</a><!-- ENDIF -->
</fieldset>
<!-- ENDIF -->
<div id="post-{MESSAGE_ID}" class="post pm<!-- IF S_POST_UNAPPROVED or S_POST_REPORTED --> reported<!-- ENDIF --><!-- IF S_ONLINE --> online<!-- ENDIF -->">
-<div class="inner"><span class="corners-top"><span></span></span>
+<div class="inner">
+
+ <dl class="postprofile" id="profile{MESSAGE_ID}">
+ <dt class="<!-- IF RANK_TITLE or RANK_IMG -->has-profile-rank<!-- ELSE -->no-profile-rank<!-- ENDIF -->"><!-- IF AUTHOR_AVATAR --><a href="{U_MESSAGE_AUTHOR}" class="avatar">{AUTHOR_AVATAR}</a><!-- ENDIF -->{MESSAGE_AUTHOR_FULL}</dt>
+
+ <!-- IF RANK_TITLE or RANK_IMG --><dd class="profile-rank">{RANK_TITLE}<!-- IF RANK_TITLE and RANK_IMG --><br /><!-- ENDIF -->{RANK_IMG}</dd><!-- ENDIF -->
+
+ <dd><strong>{L_POSTS}{L_COLON}</strong> {AUTHOR_POSTS}</dd>
+ <!-- IF AUTHOR_JOINED --><dd><strong>{L_JOINED}{L_COLON}</strong> {AUTHOR_JOINED}</dd><!-- ENDIF -->
+
+ <!-- EVENT ucp_pm_viewmessage_custom_fields_before -->
+ <!-- BEGIN custom_fields -->
+ <!-- IF not custom_fields.S_PROFILE_CONTACT -->
+ <dd><strong>{custom_fields.PROFILE_FIELD_NAME}{L_COLON}</strong> {custom_fields.PROFILE_FIELD_VALUE}</dd>
+ <!-- ENDIF -->
+ <!-- END custom_fields -->
+ <!-- EVENT ucp_pm_viewmessage_custom_fields_after -->
+
+
+ <!-- IF U_PM or U_EMAIL or U_JABBER -->
+ <dd>
+ <ul class="profile-icons">
+ <!-- EVENT ucp_pm_viewmessage_contact_fields_before -->
+ <!-- IF U_PM --><li class="pm-icon"><a href="{U_PM}" title="{L_PRIVATE_MESSAGE}"><span>{L_PRIVATE_MESSAGE}</span></a></li><!-- ENDIF -->
+ <!-- IF U_EMAIL --><li class="email-icon"><a href="{U_EMAIL}" title="{L_SEND_EMAIL_USER} {MESSAGE_AUTHOR}"><span>{L_SEND_EMAIL_USER} {MESSAGE_AUTHOR}</span></a></li><!-- ENDIF -->
+ <!-- IF U_JABBER --><li class="jabber-icon"><a href="{U_JABBER}" onclick="popup(this.href, 550, 320); return false;" title="{L_JABBER}"><span>{L_JABBER}</span></a></li><!-- ENDIF -->
+ <!-- BEGIN custom_fields -->
+ <!-- IF custom_fields.S_PROFILE_CONTACT -->
+ <li class="{custom_fields.PROFILE_FIELD_IDENT}-icon">
+ <a href="<!-- IF custom_fields.PROFILE_FIELD_CONTACT -->{custom_fields.PROFILE_FIELD_CONTACT}<!-- ELSE -->{U_MESSAGE_AUTHOR}<!-- ENDIF -->">
+ <span>{custom_fields.PROFILE_FIELD_NAME}</span>
+ </a>
+ </li>
+ <!-- ENDIF -->
+ <!-- END custom_fields -->
+ <!-- EVENT ucp_pm_viewmessage_contact_fields_after -->
+ </ul>
+ </dd>
+ <!-- ENDIF -->
+ </dl>
<div class="postbody">
+ <h3 class="first">{SUBJECT}</h3>
<!-- IF U_DELETE or U_EDIT or U_QUOTE or U_REPORT -->
<ul class="profile-icons">
@@ -28,34 +68,44 @@
</ul>
<!-- ENDIF -->
- <h3 class="first">{SUBJECT}</h3>
-
<p class="author">
- <strong>{L_SENT_AT}:</strong> {SENT_DATE}
- <br /><strong>{L_PM_FROM}:</strong> {MESSAGE_AUTHOR_FULL}
- <!-- IF S_TO_RECIPIENT --><br /><strong>{L_TO}:</strong> <!-- BEGIN to_recipient --><!-- IF to_recipient.NAME_FULL -->{to_recipient.NAME_FULL}<!-- ELSE --><a href="{to_recipient.U_VIEW}" style="color:<!-- IF to_recipient.COLOUR -->{to_recipient.COLOUR}<!-- ELSEIF to_recipient.IS_GROUP -->#0000FF<!-- ENDIF -->;">{to_recipient.NAME}</a><!-- ENDIF -->&nbsp;<!-- END to_recipient --><!-- ENDIF -->
- <!-- IF S_BCC_RECIPIENT --><br /><strong>{L_BCC}:</strong> <!-- BEGIN bcc_recipient --><!-- IF bcc_recipient.NAME_FULL -->{bcc_recipient.NAME_FULL}<!-- ELSE --><a href="{bcc_recipient.U_VIEW}" style="color:<!-- IF bcc_recipient.COLOUR -->{bcc_recipient.COLOUR}<!-- ELSEIF bcc_recipient.IS_GROUP -->#0000FF<!-- ENDIF -->;">{bcc_recipient.NAME}</a><!-- ENDIF -->&nbsp;<!-- END bcc_recipient --><!-- ENDIF -->
+ <strong>{L_SENT_AT}{L_COLON}</strong> {SENT_DATE}
+ <br /><strong>{L_PM_FROM}{L_COLON}</strong> {MESSAGE_AUTHOR_FULL}
+ <!-- IF S_TO_RECIPIENT --><br /><strong>{L_TO}{L_COLON}</strong> <!-- BEGIN to_recipient --><!-- IF to_recipient.NAME_FULL -->{to_recipient.NAME_FULL}<!-- ELSE --><a href="{to_recipient.U_VIEW}" style="color:<!-- IF to_recipient.COLOUR -->{to_recipient.COLOUR}<!-- ELSEIF to_recipient.IS_GROUP -->#0000FF<!-- ENDIF -->;">{to_recipient.NAME}</a><!-- ENDIF -->&nbsp;<!-- END to_recipient --><!-- ENDIF -->
+ <!-- IF S_BCC_RECIPIENT --><br /><strong>{L_BCC}{L_COLON}</strong> <!-- BEGIN bcc_recipient --><!-- IF bcc_recipient.NAME_FULL -->{bcc_recipient.NAME_FULL}<!-- ELSE --><a href="{bcc_recipient.U_VIEW}" style="color:<!-- IF bcc_recipient.COLOUR -->{bcc_recipient.COLOUR}<!-- ELSEIF bcc_recipient.IS_GROUP -->#0000FF<!-- ENDIF -->;">{bcc_recipient.NAME}</a><!-- ENDIF -->&nbsp;<!-- END bcc_recipient --><!-- ENDIF -->
</p>
<div class="content">{MESSAGE}</div>
<!-- IF S_HAS_ATTACHMENTS -->
- <dl class="attachbox">
- <dt>{L_ATTACHMENTS}</dt>
- <!-- BEGIN attachment -->
- <dd>{attachment.DISPLAY_ATTACHMENT}</dd>
- <!-- END attachment -->
- </dl>
+ <dl class="attachbox">
+ <dt>
+ {L_ATTACHMENTS}
+ <!-- IF S_HAS_MULTIPLE_ATTACHMENTS -->
+ <div class="dl_links">
+ <strong>{L_DOWNLOAD_ALL}{L_COLON}</strong>
+ <ul>
+ <!-- BEGIN dl_method -->
+ <li>[ <a href="{dl_method.LINK}">{dl_method.TYPE}</a> ]</li>
+ <!-- END dl_method -->
+ </ul>
+ </div>
+ <!-- ENDIF -->
+ </dt>
+ <!-- BEGIN attachment -->
+ <dd>{attachment.DISPLAY_ATTACHMENT}</dd>
+ <!-- END attachment -->
+ </dl>
<!-- ENDIF -->
<!-- IF S_DISPLAY_NOTICE -->
- <div class="rules">{L_DOWNLOAD_NOTICE}</div>
+ <div class="post-notice error">{L_DOWNLOAD_NOTICE}</div>
<!-- ENDIF -->
<!-- IF EDITED_MESSAGE or EDIT_REASON -->
<div class="notice">{EDITED_MESSAGE}
- <!-- IF EDIT_REASON --><br /><strong>{L_REASON}:</strong> <em>{EDIT_REASON}</em><!-- ENDIF -->
+ <!-- IF EDIT_REASON --><br /><strong>{L_REASON}{L_COLON}</strong> <em>{EDIT_REASON}</em><!-- ENDIF -->
</div>
<!-- ENDIF -->
@@ -64,43 +114,18 @@
<!-- ENDIF -->
</div>
- <dl class="postprofile" id="profile{MESSAGE_ID}">
- <dt><!-- IF AUTHOR_AVATAR --><a href="{U_MESSAGE_AUTHOR}">{AUTHOR_AVATAR}</a><br /><!-- ENDIF -->{MESSAGE_AUTHOR_FULL}</dt>
- <!-- IF RANK_TITLE --><dd>{RANK_TITLE}</dd><!-- ENDIF -->
- <!-- IF RANK_IMG --><dd>{RANK_IMG}</dd><!-- ENDIF -->
- <dd>&nbsp;</dd>
- <dd><strong>{L_POSTS}:</strong> {AUTHOR_POSTS}</dd>
- <!-- IF AUTHOR_JOINED --><dd><strong>{L_JOINED}:</strong> {AUTHOR_JOINED}</dd><!-- ENDIF -->
- <!-- IF AUTHOR_FROM --><dd><strong>{L_LOCATION}:</strong> {AUTHOR_FROM}</dd><!-- ENDIF -->
-
- <!-- IF U_PM or U_EMAIL or U_WWW or U_MSN or U_ICQ or U_YIM or U_AIM or U_JABBER -->
- <dd>
- <ul class="profile-icons">
- <!-- IF U_PM --><li class="pm-icon"><a href="{U_PM}" title="{L_PRIVATE_MESSAGE}"><span>{L_PRIVATE_MESSAGE}</span></a></li><!-- ENDIF -->
- <!-- IF U_EMAIL --><li class="email-icon"><a href="{U_EMAIL}" title="{L_SEND_EMAIL_USER} {MESSAGE_AUTHOR}"><span>{L_SEND_EMAIL_USER} {MESSAGE_AUTHOR}</span></a></li><!-- ENDIF -->
- <!-- IF U_WWW --><li class="web-icon"><a href="{U_WWW}" title="{L_VISIT_WEBSITE}: {U_WWW}"><span>{L_WEBSITE}</span></a></li><!-- ENDIF -->
- <!-- IF U_MSN --><li class="msnm-icon"><a href="{U_MSN}" onclick="popup(this.href, 550, 320); return false;" title="{L_MSNM}"><span>{L_MSNM}</span></a></li><!-- ENDIF -->
- <!-- IF U_ICQ --><li class="icq-icon"><a href="{U_ICQ}" onclick="popup(this.href, 550, 320); return false;" title="{L_ICQ}"><span>{L_ICQ}</span></a></li><!-- ENDIF -->
- <!-- IF U_YIM --><li class="yahoo-icon"><a href="{U_YIM}" onclick="popup(this.href, 780, 550); return false;" title="{L_YIM}"><span>{L_YIM}</span></a></li><!-- ENDIF -->
- <!-- IF U_AIM --><li class="aim-icon"><a href="{U_AIM}" onclick="popup(this.href, 550, 320); return false;" title="{L_AIM}"><span>{L_AIM}</span></a></li><!-- ENDIF -->
- <!-- IF U_JABBER --><li class="jabber-icon"><a href="{U_JABBER}" onclick="popup(this.href, 550, 320); return false;" title="{L_JABBER}"><span>{L_JABBER}</span></a></li><!-- ENDIF -->
- </ul>
- </dd>
- <!-- ENDIF -->
- </dl>
-
<div class="back2top"><a href="#top" class="top" title="{L_BACK_TO_TOP}">{L_BACK_TO_TOP}</a></div>
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
<!-- IF S_VIEW_MESSAGE -->
<fieldset class="display-options">
- <!-- IF U_PREVIOUS_PM --><a href="{U_PREVIOUS_PM}" class="left-box {S_CONTENT_FLOW_BEGIN}">{L_VIEW_PREVIOUS_PM}</a><!-- ENDIF -->
- <!-- IF U_NEXT_PM --><a href="{U_NEXT_PM}" class="right-box {S_CONTENT_FLOW_END}">{L_VIEW_NEXT_PM}</a><!-- ENDIF -->
+ <!-- IF U_PREVIOUS_PM --><a href="{U_PREVIOUS_PM}" class="left-box arrow-{S_CONTENT_FLOW_BEGIN}">{L_VIEW_PREVIOUS_PM}</a><!-- ENDIF -->
+ <!-- IF U_NEXT_PM --><a href="{U_NEXT_PM}" class="right-box arrow-{S_CONTENT_FLOW_END}">{L_VIEW_NEXT_PM}</a><!-- ENDIF -->
<!-- IF S_MARK_OPTIONS --><label for="mark_option"><select name="mark_option" id="mark_option">{S_MARK_OPTIONS}</select></label>&nbsp;<input class="button2" type="submit" name="submit_mark" value="{L_GO}" /><!-- ENDIF -->
- <!-- IF not S_UNREAD and not S_SPECIAL_FOLDER --><label for="dest_folder"><!-- IF S_VIEW_MESSAGE -->{L_MOVE_TO_FOLDER}: <!-- ELSE -->{L_MOVE_MARKED_TO_FOLDER}<!-- ENDIF --> <select name="dest_folder" id="dest_folder">{S_TO_FOLDER_OPTIONS}</select></label> <input class="button2" type="submit" name="move_pm" value="{L_GO}" /><!-- ENDIF -->
+ <!-- IF not S_UNREAD and not S_SPECIAL_FOLDER --><label for="dest_folder"><!-- IF S_VIEW_MESSAGE -->{L_MOVE_TO_FOLDER}{L_COLON} <!-- ELSE -->{L_MOVE_MARKED_TO_FOLDER}<!-- ENDIF --> <select name="dest_folder" id="dest_folder">{S_TO_FOLDER_OPTIONS}</select></label> <input class="button2" type="submit" name="move_pm" value="{L_GO}" /><!-- ENDIF -->
<input type="hidden" name="marked_msg_id[]" value="{MSG_ID}" />
<input type="hidden" name="cur_folder_id" value="{CUR_FOLDER_ID}" />
<input type="hidden" name="p" value="{MSG_ID}" />
@@ -111,4 +136,4 @@
<!-- IF S_DISPLAY_HISTORY --><!-- INCLUDE ucp_pm_history.html --><!-- ENDIF -->
-<!-- INCLUDE ucp_footer.html --> \ No newline at end of file
+<!-- INCLUDE ucp_footer.html -->
diff --git a/phpBB/styles/prosilver/template/ucp_pm_viewmessage_print.html b/phpBB/styles/prosilver/template/ucp_pm_viewmessage_print.html
index 91dd4606c8..4d7346fda8 100644
--- a/phpBB/styles/prosilver/template/ucp_pm_viewmessage_print.html
+++ b/phpBB/styles/prosilver/template/ucp_pm_viewmessage_print.html
@@ -1,23 +1,17 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}" xml:lang="{S_USER_LANG}">
+<!DOCTYPE html>
+<html dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}">
<head>
-
-<meta http-equiv="content-type" content="text/html; charset={S_CONTENT_ENCODING}" />
-<meta http-equiv="content-style-type" content="text/css" />
-<meta http-equiv="content-language" content="{S_USER_LANG}" />
-<meta http-equiv="imagetoolbar" content="no" />
-<meta name="resource-type" content="document" />
-<meta name="distribution" content="global" />
+<meta charset="utf-8">
<meta name="robots" content="noindex" />
{META}
<title>{SITENAME} &bull; {PAGE_TITLE}</title>
<link href="{T_THEME_PATH}/print.css" rel="stylesheet" type="text/css" />
+<!-- EVENT ucp_pm_viewmessage_print_head_append -->
</head>
-
<body id="phpbb">
<div id="wrap">
- <a id="top" name="top" accesskey="t"></a>
+ <a id="top" accesskey="t"></a>
<div id="page-header">
<h1>{SITENAME}</h1>
@@ -51,4 +45,4 @@
</div>
</body>
-</html> \ No newline at end of file
+</html>
diff --git a/phpBB/styles/prosilver/template/ucp_prefs_personal.html b/phpBB/styles/prosilver/template/ucp_prefs_personal.html
index 600319fc72..8111496dcb 100644
--- a/phpBB/styles/prosilver/template/ucp_prefs_personal.html
+++ b/phpBB/styles/prosilver/template/ucp_prefs_personal.html
@@ -5,89 +5,66 @@
<h2>{L_TITLE}</h2>
<div class="panel">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<fieldset>
<!-- IF ERROR --><p class="error">{ERROR}</p><!-- ENDIF -->
+ <!-- EVENT ucp_prefs_personal_prepend -->
<dl>
- <dt><label for="viewemail0">{L_SHOW_EMAIL}:</label></dt>
+ <dt><label for="viewemail0">{L_SHOW_EMAIL}{L_COLON}</label></dt>
<dd>
- <label for="viewemail1"><input type="radio" name="viewemail" id="viewemail1" value="1"<!-- IF S_VIEW_EMAIL --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
+ <label for="viewemail1"><input type="radio" name="viewemail" id="viewemail1" value="1"<!-- IF S_VIEW_EMAIL --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label for="viewemail0"><input type="radio" name="viewemail" id="viewemail0" value="0"<!-- IF not S_VIEW_EMAIL --> checked="checked"<!-- ENDIF --> /> {L_NO}</label>
</dd>
</dl>
<dl>
- <dt><label for="massemail1">{L_ADMIN_EMAIL}:</label></dt>
+ <dt><label for="massemail1">{L_ADMIN_EMAIL}{L_COLON}</label></dt>
<dd>
- <label for="massemail1"><input type="radio" name="massemail" id="massemail1" value="1"<!-- IF S_MASS_EMAIL --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
+ <label for="massemail1"><input type="radio" name="massemail" id="massemail1" value="1"<!-- IF S_MASS_EMAIL --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label for="massemail0"><input type="radio" name="massemail" id="massemail0" value="0"<!-- IF not S_MASS_EMAIL --> checked="checked"<!-- ENDIF --> /> {L_NO}</label>
</dd>
</dl>
<dl>
- <dt><label for="allowpm1">{L_ALLOW_PM}:</label><br /><span>{L_ALLOW_PM_EXPLAIN}</span></dt>
+ <dt><label for="allowpm1">{L_ALLOW_PM}{L_COLON}</label><br /><span>{L_ALLOW_PM_EXPLAIN}</span></dt>
<dd>
- <label for="allowpm1"><input type="radio" name="allowpm" id="allowpm1" value="1"<!-- IF S_ALLOW_PM --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
+ <label for="allowpm1"><input type="radio" name="allowpm" id="allowpm1" value="1"<!-- IF S_ALLOW_PM --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label for="allowpm0"><input type="radio" name="allowpm" id="allowpm0" value="0"<!-- IF not S_ALLOW_PM --> checked="checked"<!-- ENDIF --> /> {L_NO}</label>
</dd>
</dl>
<!-- IF S_CAN_HIDE_ONLINE -->
<dl>
- <dt><label for="hideonline0">{L_HIDE_ONLINE}:</label><br /><span>{L_HIDE_ONLINE_EXPLAIN}</span></dt>
+ <dt><label for="hideonline0">{L_HIDE_ONLINE}{L_COLON}</label><br /><span>{L_HIDE_ONLINE_EXPLAIN}</span></dt>
<dd>
- <label for="hideonline1"><input type="radio" name="hideonline" id="hideonline1" value="1"<!-- IF S_HIDE_ONLINE --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
+ <label for="hideonline1"><input type="radio" name="hideonline" id="hideonline1" value="1"<!-- IF S_HIDE_ONLINE --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label for="hideonline0"><input type="radio" name="hideonline" id="hideonline0" value="0"<!-- IF not S_HIDE_ONLINE --> checked="checked"<!-- ENDIF --> /> {L_NO}</label>
</dd>
</dl>
- <!-- ENDIF -->
+ <!-- ENDIF -->
<!-- IF S_SELECT_NOTIFY -->
<dl>
- <dt><label for="notifymethod0">{L_NOTIFY_METHOD}:</label></dt>
+ <dt><label for="notifymethod0">{L_NOTIFY_METHOD}{L_COLON}</label></dt>
<dd>
- <label for="notifymethod0"><input type="radio" name="notifymethod" id="notifymethod0" value="0"<!-- IF S_NOTIFY_EMAIL --> checked="checked"<!-- ENDIF --> /> {L_NOTIFY_METHOD_EMAIL}</label>
- <label for="notifymethod1"><input type="radio" name="notifymethod" id="notifymethod1" value="1"<!-- IF S_NOTIFY_IM --> checked="checked"<!-- ENDIF --> /> {L_NOTIFY_METHOD_IM}</label>
+ <label for="notifymethod0"><input type="radio" name="notifymethod" id="notifymethod0" value="0"<!-- IF S_NOTIFY_EMAIL --> checked="checked"<!-- ENDIF --> /> {L_NOTIFY_METHOD_EMAIL}</label>
+ <label for="notifymethod1"><input type="radio" name="notifymethod" id="notifymethod1" value="1"<!-- IF S_NOTIFY_IM --> checked="checked"<!-- ENDIF --> /> {L_NOTIFY_METHOD_IM}</label>
<label for="notifymethod2"><input type="radio" name="notifymethod" id="notifymethod2" value="2"<!-- IF S_NOTIFY_BOTH --> checked="checked"<!-- ENDIF --> /> {L_NOTIFY_METHOD_BOTH}</label>
</dd>
</dl>
<!-- ENDIF -->
- <dl>
- <dt><label for="notifypm1">{L_NOTIFY_ON_PM}:</label></dt>
- <dd>
- <label for="notifypm1"><input type="radio" name="notifypm" id="notifypm1" value="1"<!-- IF S_NOTIFY_PM --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
- <label for="notifypm0"><input type="radio" name="notifypm" id="notifypm0" value="0"<!-- IF not S_NOTIFY_PM --> checked="checked"<!-- ENDIF --> /> {L_NO}</label>
- </dd>
- </dl>
- <dl>
- <dt><label for="popuppm0">{L_POPUP_ON_PM}:</label></dt>
- <dd>
- <label for="popuppm1"><input type="radio" name="popuppm" id="popuppm1" value="1"<!-- IF S_POPUP_PM --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
- <label for="popuppm0"><input type="radio" name="popuppm" id="popuppm0" value="0"<!-- IF not S_POPUP_PM --> checked="checked"<!-- ENDIF --> /> {L_NO}</label>
- </dd>
- </dl>
<!-- IF S_MORE_LANGUAGES -->
<dl>
- <dt><label for="lang">{L_BOARD_LANGUAGE}:</label></dt>
+ <dt><label for="lang">{L_BOARD_LANGUAGE}{L_COLON}</label></dt>
<dd><select name="lang" id="lang">{S_LANG_OPTIONS}</select></dd>
</dl>
<!-- ENDIF -->
<!-- IF S_STYLE_OPTIONS and S_MORE_STYLES -->
<dl>
- <dt><label for="style">{L_BOARD_STYLE}:</label></dt>
+ <dt><label for="style">{L_BOARD_STYLE}{L_COLON}</label></dt>
<dd><select name="style" id="style">{S_STYLE_OPTIONS}</select></dd>
</dl>
<!-- ENDIF -->
+ <!-- INCLUDE timezone_option.html -->
<dl>
- <dt><label for="timezone">{L_BOARD_TIMEZONE}:</label></dt>
- <dd><select name="tz" id="timezone" class="autowidth">{S_TZ_OPTIONS}</select></dd>
- </dl>
- <dl>
- <dt><label for="dst1">{L_BOARD_DST}:</label></dt>
- <dd>
- <label for="dst1"><input type="radio" name="dst" id="dst1" value="1"<!-- IF S_DST --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
- <label for="dst0"><input type="radio" name="dst" id="dst0" value="0"<!-- IF not S_DST --> checked="checked"<!-- ENDIF --> /> {L_NO}</label>
- </dd>
- </dl>
- <dl>
- <dt><label for="dateformat">{L_BOARD_DATE_FORMAT}:</label><br /><span>{L_BOARD_DATE_FORMAT_EXPLAIN}</span></dt>
+ <dt><label for="dateformat">{L_BOARD_DATE_FORMAT}{L_COLON}</label><br /><span>{L_BOARD_DATE_FORMAT_EXPLAIN}</span></dt>
<dd>
<select name="dateoptions" id="dateoptions" onchange="if(this.value=='custom'){dE('custom_date',1);}else{dE('custom_date',-1);} if (this.value == 'custom') { document.getElementById('dateformat').value = default_dateformat; } else { document.getElementById('dateformat').value = this.value; }">
{S_DATEFORMAT_OPTIONS}
@@ -95,13 +72,14 @@
</dd>
<dd id="custom_date" style="display:none;"><input type="text" name="dateformat" id="dateformat" value="{DATE_FORMAT}" maxlength="30" class="inputbox narrow" style="margin-top: 3px;" /></dd>
</dl>
+ <!-- EVENT ucp_prefs_personal_append -->
</fieldset>
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
-
+
<fieldset class="submit-buttons">
- {S_HIDDEN_FIELDS}<input type="reset" value="{L_RESET}" name="reset" class="button2" />&nbsp;
+ {S_HIDDEN_FIELDS}<input type="reset" value="{L_RESET}" name="reset" class="button2" />&nbsp;
<input type="submit" name="submit" value="{L_SUBMIT}" class="button1" />
{S_FORM_TOKEN}
</fieldset>
@@ -115,9 +93,9 @@
function customDates()
{
var e = document.getElementById('dateoptions');
-
+
e.selectedIndex = e.length - 1;
-
+
// Loop and match date_format in menu
for (var i = 0; i < e.length; i++)
{
@@ -127,7 +105,7 @@
break;
}
}
-
+
// Show/hide custom field
if (e.selectedIndex == e.length - 1)
{
@@ -143,4 +121,4 @@
// ]]>
</script>
-<!-- INCLUDE ucp_footer.html --> \ No newline at end of file
+<!-- INCLUDE ucp_footer.html -->
diff --git a/phpBB/styles/prosilver/template/ucp_prefs_post.html b/phpBB/styles/prosilver/template/ucp_prefs_post.html
index 74af90ca5a..891e49af6f 100644
--- a/phpBB/styles/prosilver/template/ucp_prefs_post.html
+++ b/phpBB/styles/prosilver/template/ucp_prefs_post.html
@@ -4,41 +4,43 @@
<h2>{L_TITLE}</h2>
<div class="panel">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<fieldset>
<!-- IF ERROR --><p class="error">{ERROR}</p><!-- ENDIF -->
+ <!-- EVENT ucp_prefs_post_prepend -->
<dl>
- <dt><label for="bbcode1">{L_DEFAULT_BBCODE}:</label></dt>
+ <dt><label for="bbcode1">{L_DEFAULT_BBCODE}{L_COLON}</label></dt>
<dd>
<label for="bbcode1"><input type="radio" name="bbcode" id="bbcode1" value="1"<!-- IF S_BBCODE --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label for="bbcode0"><input type="radio" name="bbcode" id="bbcode0" value="0"<!-- IF not S_BBCODE --> checked="checked"<!-- ENDIF --> /> {L_NO}</label>
</dd>
</dl>
<dl>
- <dt><label for="smilies1">{L_DEFAULT_SMILIES}:</label></dt>
+ <dt><label for="smilies1">{L_DEFAULT_SMILIES}{L_COLON}</label></dt>
<dd>
<label for="smilies1"><input type="radio" name="smilies" id="smilies1" value="1"<!-- IF S_SMILIES --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label for="smilies0"><input type="radio" name="smilies" id="smilies0" value="0"<!-- IF not S_SMILIES --> checked="checked"<!-- ENDIF --> /> {L_NO}</label>
</dd>
</dl>
<dl>
- <dt><label for="sig1">{L_DEFAULT_ADD_SIG}:</label></dt>
+ <dt><label for="sig1">{L_DEFAULT_ADD_SIG}{L_COLON}</label></dt>
<dd>
<label for="sig1"><input type="radio" name="sig" id="sig1" value="1"<!-- IF S_SIG --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label for="sig0"><input type="radio" name="sig" id="sig0" value="0"<!-- IF not S_SIG --> checked="checked"<!-- ENDIF --> /> {L_NO}</label>
</dd>
</dl>
<dl>
- <dt><label for="notify1">{L_DEFAULT_NOTIFY}:</label></dt>
+ <dt><label for="notify1">{L_DEFAULT_NOTIFY}{L_COLON}</label></dt>
<dd>
<label for="notify1"><input type="radio" name="notify" id="notify1" value="1"<!-- IF S_NOTIFY --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label for="notify0"><input type="radio" name="notify" id="notify0" value="0"<!-- IF not S_NOTIFY --> checked="checked"<!-- ENDIF --> /> {L_NO}</label>
</dd>
</dl>
+ <!-- EVENT ucp_prefs_post_append -->
</fieldset>
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
<fieldset class="submit-buttons">
@@ -48,4 +50,4 @@
</fieldset>
</form>
-<!-- INCLUDE ucp_footer.html --> \ No newline at end of file
+<!-- INCLUDE ucp_footer.html -->
diff --git a/phpBB/styles/prosilver/template/ucp_prefs_view.html b/phpBB/styles/prosilver/template/ucp_prefs_view.html
index dc773584df..7f8d0a344c 100644
--- a/phpBB/styles/prosilver/template/ucp_prefs_view.html
+++ b/phpBB/styles/prosilver/template/ucp_prefs_view.html
@@ -5,40 +5,41 @@
<h2>{L_TITLE}</h2>
<div class="panel">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<fieldset>
<!-- IF ERROR --><p class="error">{ERROR}</p><!-- ENDIF -->
+ <!-- EVENT ucp_prefs_view_radio_buttons_prepend -->
<dl>
- <dt><label for="images1">{L_VIEW_IMAGES}:</label></dt>
+ <dt><label for="images1">{L_VIEW_IMAGES}{L_COLON}</label></dt>
<dd>
<label for="images1"><input type="radio" name="images" id="images1" value="1"<!-- IF S_IMAGES --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label for="images0"><input type="radio" name="images" id="images0" value="0"<!-- IF not S_IMAGES --> checked="checked"<!-- ENDIF --> /> {L_NO}</label>
</dd>
</dl>
<dl>
- <dt><label for="flash0">{L_VIEW_FLASH}:</label></dt>
+ <dt><label for="flash0">{L_VIEW_FLASH}{L_COLON}</label></dt>
<dd>
<label for="flash1"><input type="radio" name="flash" id="flash1" value="1"<!-- IF S_FLASH --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label for="flash0"><input type="radio" name="flash" id="flash0" value="0"<!-- IF not S_FLASH --> checked="checked"<!-- ENDIF --> /> {L_NO}</label>
</dd>
</dl>
<dl>
- <dt><label for="smilies1">{L_VIEW_SMILIES}:</label></dt>
+ <dt><label for="smilies1">{L_VIEW_SMILIES}{L_COLON}</label></dt>
<dd>
<label for="smilies1"><input type="radio" name="smilies" id="smilies1" value="1"<!-- IF S_SMILIES --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label for="smilies0"><input type="radio" name="smilies" id="smilies0" value="0"<!-- IF not S_SMILIES --> checked="checked"<!-- ENDIF --> /> {L_NO}</label>
</dd>
</dl>
<dl>
- <dt><label for="sigs1">{L_VIEW_SIGS}:</label></dt>
+ <dt><label for="sigs1">{L_VIEW_SIGS}{L_COLON}</label></dt>
<dd>
<label for="sigs1"><input type="radio" name="sigs" id="sigs1" value="1"<!-- IF S_SIGS --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label for="sigs0"><input type="radio" name="sigs" id="sigs0" value="0"<!-- IF not S_SIGS --> checked="checked"<!-- ENDIF --> /> {L_NO}</label>
</dd>
</dl>
<dl>
- <dt><label for="avatars1">{L_VIEW_AVATARS}:</label></dt>
+ <dt><label for="avatars1">{L_VIEW_AVATARS}{L_COLON}</label></dt>
<dd>
<label for="avatars1"><input type="radio" name="avatars" id="avatars1" value="1"<!-- IF S_AVATARS --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label for="avatars0"><input type="radio" name="avatars" id="avatars0" value="0"<!-- IF not S_AVATARS --> checked="checked"<!-- ENDIF --> /> {L_NO}</label>
@@ -46,42 +47,45 @@
</dl>
<!-- IF S_CHANGE_CENSORS -->
<dl>
- <dt><label for="wordcensor1">{L_DISABLE_CENSORS}:</label></dt>
+ <dt><label for="wordcensor1">{L_DISABLE_CENSORS}{L_COLON}</label></dt>
<dd>
<label for="wordcensor1"><input type="radio" name="wordcensor" id="wordcensor1" value="1"<!-- IF S_DISABLE_CENSORS --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label for="wordcensor0"><input type="radio" name="wordcensor" id="wordcensor0" value="0"<!-- IF not S_DISABLE_CENSORS --> checked="checked"<!-- ENDIF --> /> {L_NO}</label>
</dd>
</dl>
<!-- ENDIF -->
+ <!-- EVENT ucp_prefs_view_radio_buttons_append -->
<hr />
+ <!-- EVENT ucp_prefs_view_select_menu_prepend -->
<dl>
- <dt><label>{L_VIEW_TOPICS_DAYS}:</label></dt>
+ <dt><label>{L_VIEW_TOPICS_DAYS}{L_COLON}</label></dt>
<dd>{S_TOPIC_SORT_DAYS}</dd>
</dl>
<dl>
- <dt><label>{L_VIEW_TOPICS_KEY}:</label></dt>
+ <dt><label>{L_VIEW_TOPICS_KEY}{L_COLON}</label></dt>
<dd>{S_TOPIC_SORT_KEY}</dd>
</dl>
<dl>
- <dt><label>{L_VIEW_TOPICS_DIR}:</label></dt>
+ <dt><label>{L_VIEW_TOPICS_DIR}{L_COLON}</label></dt>
<dd>{S_TOPIC_SORT_DIR}</dd>
</dl>
<hr />
<dl>
- <dt><label>{L_VIEW_POSTS_DAYS}:</label></dt>
+ <dt><label>{L_VIEW_POSTS_DAYS}{L_COLON}</label></dt>
<dd>{S_POST_SORT_DAYS}</dd>
</dl>
<dl>
- <dt><label>{L_VIEW_POSTS_KEY}:</label></dt>
+ <dt><label>{L_VIEW_POSTS_KEY}{L_COLON}</label></dt>
<dd>{S_POST_SORT_KEY}</dd>
</dl>
<dl>
- <dt><label>{L_VIEW_POSTS_DIR}:</label></dt>
+ <dt><label>{L_VIEW_POSTS_DIR}{L_COLON}</label></dt>
<dd>{S_POST_SORT_DIR}</dd>
</dl>
+ <!-- EVENT ucp_prefs_view_select_menu_append -->
</fieldset>
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
<fieldset class="submit-buttons">
@@ -91,4 +95,4 @@
</fieldset>
</form>
-<!-- INCLUDE ucp_footer.html --> \ No newline at end of file
+<!-- INCLUDE ucp_footer.html -->
diff --git a/phpBB/styles/prosilver/template/ucp_profile_autologin_keys.html b/phpBB/styles/prosilver/template/ucp_profile_autologin_keys.html
new file mode 100644
index 0000000000..bf97434bac
--- /dev/null
+++ b/phpBB/styles/prosilver/template/ucp_profile_autologin_keys.html
@@ -0,0 +1,51 @@
+<!-- INCLUDE ucp_header.html -->
+
+<form id="ucp" method="post" action="{S_UCP_ACTION}"{S_FORM_ENCTYPE}>
+
+<h2>{L_TITLE}</h2>
+<div class="panel">
+ <div class="inner">
+
+ <!-- IF .errors -->
+ <p class="error">
+ <!-- BEGIN errors -->
+ {errors} <br />
+ <!-- END errors -->
+ </p>
+ <!-- ENDIF -->
+
+ <p>{L_PROFILE_AUTOLOGIN_KEYS}</p><br />
+ <table class="table1">
+ <thead>
+ <tr>
+ <th>{L_MARK}</th>
+ <th>{L_LOGIN_KEY}</th>
+ <th>{L_IP}</th>
+ <th>{L_LOGIN_TIME}</th>
+ </tr>
+ </thead>
+ <tbody>
+ <!-- BEGIN sessions -->
+ <!-- IF sessions.S_ROW_COUNT is even --><tr class="bg1"><!-- ELSE --><tr class="bg2"><!-- ENDIF -->
+ <td style="text-align: center"><input type="checkbox" name="keys[]" value="{sessions.KEY}" id="{sessions.KEY}"/></td>
+ <td><label for="{sessions.KEY}">{sessions.KEY}</label></td>
+ <td style="text-align: center">{sessions.IP}</td>
+ <td style="text-align: center">{sessions.LOGIN_TIME}</td>
+ </tr>
+ <!-- BEGINELSE -->
+ <tr><td colspan="4" class="bg1" style="text-align: center">{L_PROFILE_NO_AUTOLOGIN_KEYS}</td></tr>
+ <!-- END sessions -->
+ </tbody>
+ </table>
+ </div>
+</div>
+
+<!-- IF .sessions -->
+ <fieldset class="submit-buttons">
+ {S_HIDDEN_FIELDS}<input type="submit" name="submit" value="{L_DELETE}" class="button1" />
+ {S_FORM_TOKEN}
+ </fieldset>
+<!-- ENDIF -->
+</form>
+
+<!-- INCLUDE ucp_footer.html -->
diff --git a/phpBB/styles/prosilver/template/ucp_profile_avatar.html b/phpBB/styles/prosilver/template/ucp_profile_avatar.html
index 2669ed3c22..8157d8c15b 100644
--- a/phpBB/styles/prosilver/template/ucp_profile_avatar.html
+++ b/phpBB/styles/prosilver/template/ucp_profile_avatar.html
@@ -6,14 +6,8 @@
<!-- INCLUDE ucp_avatar_options.html -->
-<fieldset class="submit-buttons">
- {S_HIDDEN_FIELDS}
- <!-- IF S_DISPLAY_GALLERY --><input type="submit" name="display_gallery" value="{L_DISPLAY_GALLERY}" class="button2" />&nbsp; <!-- ENDIF -->
- <!-- IF S_IN_AVATAR_GALLERY --><input type="submit" name="cancel" value="{L_CANCEL}" class="button2" />&nbsp; <!-- ELSE -->
- <input type="reset" value="{L_RESET}" name="reset" class="button2" />&nbsp; <!-- ENDIF -->
- <input type="submit" name="submit" value="{L_SUBMIT}" class="button1" />
- {S_FORM_TOKEN}
-</fieldset>
+{S_HIDDEN_FIELDS}
+{S_FORM_TOKEN}
</form>
-<!-- INCLUDE ucp_footer.html --> \ No newline at end of file
+<!-- INCLUDE ucp_footer.html -->
diff --git a/phpBB/styles/prosilver/template/ucp_profile_profile_info.html b/phpBB/styles/prosilver/template/ucp_profile_profile_info.html
index 1bd54619b9..b8ba163d3b 100644
--- a/phpBB/styles/prosilver/template/ucp_profile_profile_info.html
+++ b/phpBB/styles/prosilver/template/ucp_profile_profile_info.html
@@ -5,60 +5,28 @@
<h2>{L_TITLE}</h2>
<div class="panel">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<p>{L_PROFILE_INFO_NOTICE}</p>
<fieldset>
<!-- IF ERROR --><p class="error">{ERROR}</p><!-- ENDIF -->
- <dl>
- <dt><label for="icq">{L_UCP_ICQ}:</label></dt>
- <dd><input type="text" name="icq" id="icq" maxlength="15" value="{ICQ}" class="inputbox" /></dd>
- </dl>
- <dl>
- <dt><label for="aim">{L_UCP_AIM}:</label></dt>
- <dd><input type="text" name="aim" id="aim" maxlength="255" value="{AIM}" class="inputbox" /></dd>
- </dl>
- <dl>
- <dt><label for="msn">{L_UCP_MSNM}:</label></dt>
- <dd><input type="text" name="msn" id="msn" maxlength="255" value="{MSN}" class="inputbox" /></dd>
- </dl>
- <dl>
- <dt><label for="yim">{L_UCP_YIM}:</label></dt>
- <dd><input type="text" name="yim" id="yim" maxlength="255" value="{YIM}" class="inputbox" /></dd>
- </dl>
- <dl>
- <dt><label for="jabber">{L_UCP_JABBER}:</label></dt>
- <dd><input type="text" name="jabber" id="jabber" maxlength="255" value="{JABBER}" class="inputbox" /></dd>
- </dl>
- <dl>
- <dt><label for="website">{L_WEBSITE}:</label></dt>
- <dd><input type="text" name="website" id="website" maxlength="255" value="{WEBSITE}" class="inputbox" /></dd>
- </dl>
- <dl>
- <dt><label for="location">{L_LOCATION}:</label></dt>
- <dd><input type="text" name="location" id="location" maxlength="255" value="{LOCATION}" class="inputbox" /></dd>
- </dl>
- <dl>
- <dt><label for="occupation">{L_OCCUPATION}:</label></dt>
- <dd><textarea name="occupation" id="occupation" class="inputbox" rows="3" cols="30">{OCCUPATION}</textarea></dd>
- </dl>
- <dl>
- <dt><label for="interests">{L_INTERESTS}:</label></dt>
- <dd><textarea name="interests" id="interests" class="inputbox" rows="3" cols="30">{INTERESTS}</textarea></dd>
- </dl>
<!-- IF S_BIRTHDAYS_ENABLED -->
<dl>
- <dt><label for="bday_day">{L_BIRTHDAY}:</label><br /><span>{L_BIRTHDAY_EXPLAIN}</span></dt>
+ <dt><label for="bday_day">{L_BIRTHDAY}{L_COLON}</label><br /><span>{L_BIRTHDAY_EXPLAIN}</span></dt>
<dd>
- <label for="bday_day">{L_DAY}: <select name="bday_day" id="bday_day" style="width: 4em;">{S_BIRTHDAY_DAY_OPTIONS}</select></label>
- <label for="bday_month">{L_MONTH}: <select name="bday_month" id="bday_month" style="width: 4em;">{S_BIRTHDAY_MONTH_OPTIONS}</select></label>
- <label for="bday_year">{L_YEAR}: <select name="bday_year" id="bday_year" style="width: 6em;">{S_BIRTHDAY_YEAR_OPTIONS}</select></label>
+ <label for="bday_day">{L_DAY}{L_COLON} <select name="bday_day" id="bday_day" style="width: 4em;">{S_BIRTHDAY_DAY_OPTIONS}</select></label>
+ <label for="bday_month">{L_MONTH}{L_COLON} <select name="bday_month" id="bday_month" style="width: 4em;">{S_BIRTHDAY_MONTH_OPTIONS}</select></label>
+ <label for="bday_year">{L_YEAR}{L_COLON} <select name="bday_year" id="bday_year" style="width: 6em;">{S_BIRTHDAY_YEAR_OPTIONS}</select></label>
</dd>
</dl>
<!-- ENDIF -->
+ <dl>
+ <dt><label for="jabber">{L_UCP_JABBER}{L_COLON}</label></dt>
+ <dd><input type="email" name="jabber" id="jabber" maxlength="255" value="{JABBER}" class="inputbox" /></dd>
+ </dl>
<!-- BEGIN profile_fields -->
<dl>
- <dt><label<!-- IF profile_fields.FIELD_ID --> for="{profile_fields.FIELD_ID}"<!-- ENDIF -->>{profile_fields.LANG_NAME}:<!-- IF profile_fields.S_REQUIRED --> *<!-- ENDIF --></label>
+ <dt><label<!-- IF profile_fields.FIELD_ID --> for="{profile_fields.FIELD_ID}"<!-- ENDIF -->>{profile_fields.LANG_NAME}{L_COLON}<!-- IF profile_fields.S_REQUIRED --> *<!-- ENDIF --></label>
<!-- IF profile_fields.LANG_EXPLAIN --><br /><span>{profile_fields.LANG_EXPLAIN}</span><!-- ENDIF --></dt>
<!-- IF profile_fields.ERROR --><dd class="error">{profile_fields.ERROR}</dd><!-- ENDIF -->
<dd>{profile_fields.FIELD}</dd>
@@ -66,14 +34,14 @@
<!-- END profile_fields -->
</fieldset>
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
<fieldset class="submit-buttons">
- {S_HIDDEN_FIELDS}<input type="reset" value="{L_RESET}" name="reset" class="button2" />&nbsp;
+ {S_HIDDEN_FIELDS}<input type="reset" value="{L_RESET}" name="reset" class="button2" />&nbsp;
<input type="submit" name="submit" value="{L_SUBMIT}" class="button1" />
{S_FORM_TOKEN}
</fieldset>
</form>
-<!-- INCLUDE ucp_footer.html --> \ No newline at end of file
+<!-- INCLUDE ucp_footer.html -->
diff --git a/phpBB/styles/prosilver/template/ucp_profile_reg_details.html b/phpBB/styles/prosilver/template/ucp_profile_reg_details.html
index 2f24601645..4b26bc2e99 100644
--- a/phpBB/styles/prosilver/template/ucp_profile_reg_details.html
+++ b/phpBB/styles/prosilver/template/ucp_profile_reg_details.html
@@ -4,7 +4,7 @@
<h2>{L_TITLE}</h2>
<div class="panel">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<!-- IF S_FORCE_PASSWORD -->
<p class="error">{L_FORCE_PASSWORD_EXPLAIN}</p>
@@ -13,44 +13,38 @@
<fieldset>
<!-- IF ERROR --><p class="error">{ERROR}</p><!-- ENDIF -->
<dl>
- <dt><label <!-- IF S_CHANGE_USERNAME -->for="username"<!-- ENDIF -->>{L_USERNAME}:</label><br /><span>{L_USERNAME_EXPLAIN}</span></dt>
+ <dt><label <!-- IF S_CHANGE_USERNAME -->for="username"<!-- ENDIF -->>{L_USERNAME}{L_COLON}</label><br /><span>{L_USERNAME_EXPLAIN}</span></dt>
<dd><!-- IF S_CHANGE_USERNAME --><input type="text" name="username" id="username" value="{USERNAME}" class="inputbox" title="{L_USERNAME}" /><!-- ELSE --><strong>{USERNAME}</strong><!-- ENDIF --></dd>
</dl>
<dl>
- <dt><label for="email">{L_EMAIL_ADDRESS}:</label></dt>
- <dd><!-- IF S_CHANGE_EMAIL --><input type="text" name="email" id="email" maxlength="100" value="{EMAIL}" class="inputbox" title="{L_EMAIL_ADDRESS}" /><!-- ELSE --><strong>{EMAIL}</strong><!-- ENDIF --></dd>
+ <dt><label for="email">{L_EMAIL_ADDRESS}{L_COLON}</label></dt>
+ <dd><!-- IF S_CHANGE_EMAIL --><input type="email" name="email" id="email" maxlength="100" value="{EMAIL}" class="inputbox" title="{L_EMAIL_ADDRESS}" /><!-- ELSE --><strong>{EMAIL}</strong><!-- ENDIF --></dd>
</dl>
- <!-- IF S_CHANGE_EMAIL -->
- <dl>
- <dt><label for="email_confirm">{L_CONFIRM_EMAIL}:</label><br /><span>{L_CONFIRM_EMAIL_EXPLAIN}</span></dt>
- <dd><input type="text" name="email_confirm" id="email_confirm" maxlength="100" value="{CONFIRM_EMAIL}" class="inputbox" title="{L_CONFIRM_EMAIL}" /></dd>
- </dl>
- <!-- ENDIF -->
<!-- IF S_CHANGE_PASSWORD -->
<dl>
- <dt><label for="new_password">{L_NEW_PASSWORD}:</label><br /><span>{L_CHANGE_PASSWORD_EXPLAIN}</span></dt>
+ <dt><label for="new_password">{L_NEW_PASSWORD}{L_COLON}</label><br /><span>{L_CHANGE_PASSWORD_EXPLAIN}</span></dt>
<dd><input type="password" name="new_password" id="new_password" maxlength="255" value="{NEW_PASSWORD}" class="inputbox" title="{L_CHANGE_PASSWORD}" /></dd>
</dl>
<dl>
- <dt><label for="password_confirm">{L_CONFIRM_PASSWORD}:</label><br /><span>{L_CONFIRM_PASSWORD_EXPLAIN}</span></dt>
+ <dt><label for="password_confirm">{L_CONFIRM_PASSWORD}{L_COLON}</label><br /><span>{L_CONFIRM_PASSWORD_EXPLAIN}</span></dt>
<dd><input type="password" name="password_confirm" id="password_confirm" maxlength="255" value="{PASSWORD_CONFIRM}" class="inputbox" title="{L_CONFIRM_PASSWORD}" /></dd>
</dl>
<!-- ENDIF -->
</fieldset>
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
<div class="panel">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<fieldset>
<dl>
- <dt><label for="cur_password">{L_CURRENT_PASSWORD}:</label><br /><span><!-- IF S_CHANGE_PASSWORD -->{L_CURRENT_CHANGE_PASSWORD_EXPLAIN}<!-- ELSE -->{L_CURRENT_PASSWORD_EXPLAIN}<!-- ENDIF --></span></dt>
+ <dt><label for="cur_password">{L_CURRENT_PASSWORD}{L_COLON}</label><br /><span><!-- IF S_CHANGE_PASSWORD -->{L_CURRENT_CHANGE_PASSWORD_EXPLAIN}<!-- ELSE -->{L_CURRENT_PASSWORD_EXPLAIN}<!-- ENDIF --></span></dt>
<dd><input type="password" name="cur_password" id="cur_password" maxlength="255" value="{CUR_PASSWORD}" class="inputbox" title="{L_CURRENT_PASSWORD}" /></dd>
</dl>
</fieldset>
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
<fieldset class="submit-buttons">
diff --git a/phpBB/styles/prosilver/template/ucp_profile_signature.html b/phpBB/styles/prosilver/template/ucp_profile_signature.html
index ab23b84076..614f6f440d 100644
--- a/phpBB/styles/prosilver/template/ucp_profile_signature.html
+++ b/phpBB/styles/prosilver/template/ucp_profile_signature.html
@@ -6,17 +6,17 @@
<!-- IF SIGNATURE_PREVIEW != '' -->
<div class="panel">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<h3>{L_SIGNATURE_PREVIEW}</h3>
<div class="postbody">
- <div class="signature" style="border-top:none; margin-top: 0; ">{SIGNATURE_PREVIEW}</div>
+ <div class="signature standalone">{SIGNATURE_PREVIEW}</div>
+ </div>
</div>
- <span class="corners-bottom"><span></span></span></div>
</div>
<!-- ENDIF -->
<div class="panel">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<p>{L_SIGNATURE_EXPLAIN}</p>
@@ -36,7 +36,7 @@
</fieldset>
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
<fieldset class="submit-buttons">
@@ -48,4 +48,4 @@
</fieldset>
</form>
-<!-- INCLUDE ucp_footer.html --> \ No newline at end of file
+<!-- INCLUDE ucp_footer.html -->
diff --git a/phpBB/styles/prosilver/template/ucp_register.html b/phpBB/styles/prosilver/template/ucp_register.html
index 0c632f5c69..fc469eff36 100644
--- a/phpBB/styles/prosilver/template/ucp_register.html
+++ b/phpBB/styles/prosilver/template/ucp_register.html
@@ -10,18 +10,13 @@
document.forms['register'].change_lang.value = lang_iso;
document.forms['register'].submit.click();
}
-
- <!-- IF CAPTCHA_TEMPLATE and S_CONFIRM_REFRESH -->
- onload_functions.push('apply_onkeypress_event()');
- <!-- ENDIF -->
-
// ]]>
</script>
<form method="post" action="{S_UCP_ACTION}" id="register">
<div class="panel">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<h2>{SITENAME} - {L_REGISTRATION}</h2>
@@ -31,43 +26,37 @@
<dl><dd><strong>{L_REG_COND}</strong></dd></dl>
<!-- ENDIF -->
<dl>
- <dt><label for="username">{L_USERNAME}:</label><br /><span>{L_USERNAME_EXPLAIN}</span></dt>
+ <dt><label for="username">{L_USERNAME}{L_COLON}</label><br /><span>{L_USERNAME_EXPLAIN}</span></dt>
<dd><input type="text" tabindex="1" name="username" id="username" size="25" value="{USERNAME}" class="inputbox autowidth" title="{L_USERNAME}" /></dd>
</dl>
<dl>
- <dt><label for="email">{L_EMAIL_ADDRESS}:</label></dt>
- <dd><input type="text" tabindex="2" name="email" id="email" size="25" maxlength="100" value="{EMAIL}" class="inputbox autowidth" title="{L_EMAIL_ADDRESS}" /></dd>
- </dl>
- <dl>
- <dt><label for="email_confirm">{L_CONFIRM_EMAIL}:</label></dt>
- <dd><input type="text" tabindex="3" name="email_confirm" id="email_confirm" size="25" maxlength="100" value="{EMAIL_CONFIRM}" class="inputbox autowidth" title="{L_CONFIRM_EMAIL}" /></dd>
+ <dt><label for="email">{L_EMAIL_ADDRESS}{L_COLON}</label></dt>
+ <dd><input type="email" tabindex="2" name="email" id="email" size="25" maxlength="100" value="{EMAIL}" class="inputbox autowidth" title="{L_EMAIL_ADDRESS}" /></dd>
</dl>
<dl>
- <dt><label for="new_password">{L_PASSWORD}:</label><br /><span>{L_PASSWORD_EXPLAIN}</span></dt>
+ <dt><label for="new_password">{L_PASSWORD}{L_COLON}</label><br /><span>{L_PASSWORD_EXPLAIN}</span></dt>
<dd><input type="password" tabindex="4" name="new_password" id="new_password" size="25" value="{PASSWORD}" class="inputbox autowidth" title="{L_NEW_PASSWORD}" /></dd>
</dl>
<dl>
- <dt><label for="password_confirm">{L_CONFIRM_PASSWORD}:</label></dt>
- <dd><input type="password" tabindex="5" name="password_confirm" id="password_confirm" size="25" value="{PASSWORD_CONFIRM}" class="inputbox autowidth" title="{L_CONFIRM_PASSWORD}" /></dd>
+ <dt><label for="password_confirm">{L_CONFIRM_PASSWORD}{L_COLON}</label></dt>
+ <dd><input type="password" tabindex="5" name="password_confirm" id="password_confirm" size="25" value="{PASSWORD_CONFIRM}" class="inputbox autowidth" title="{L_CONFIRM_PASSWORD}" /></dd>
</dl>
<hr />
<dl>
- <dt><label for="lang">{L_LANGUAGE}:</label></dt>
+ <dt><label for="lang">{L_LANGUAGE}{L_COLON}</label></dt>
<dd><select name="lang" id="lang" onchange="change_language(this.value); return false;" tabindex="6" title="{L_LANGUAGE}">{S_LANG_OPTIONS}</select></dd>
</dl>
- <dl>
- <dt><label for="tz">{L_TIMEZONE}:</label></dt>
- <dd><select name="tz" id="tz" tabindex="7" class="autowidth">{S_TZ_OPTIONS}</select></dd>
- </dl>
+
+ <!-- INCLUDE timezone_option.html -->
<!-- IF .profile_fields -->
<dl><dd><strong>{L_ITEMS_REQUIRED}</strong></dd></dl>
<!-- BEGIN profile_fields -->
<dl>
- <dt><label<!-- IF profile_fields.FIELD_ID --> for="{profile_fields.FIELD_ID}"<!-- ENDIF -->>{profile_fields.LANG_NAME}:<!-- IF profile_fields.S_REQUIRED --> *<!-- ENDIF --></label>
+ <dt><label<!-- IF profile_fields.FIELD_ID --> for="{profile_fields.FIELD_ID}"<!-- ENDIF -->>{profile_fields.LANG_NAME}{L_COLON}<!-- IF profile_fields.S_REQUIRED --> *<!-- ENDIF --></label>
<!-- IF profile_fields.LANG_EXPLAIN --><br /><span>{profile_fields.LANG_EXPLAIN}</span><!-- ENDIF -->
<!-- IF profile_fields.ERROR --><br /><span class="error">{profile_fields.ERROR}</span><!-- ENDIF --></dt>
<dd>{profile_fields.FIELD}</dd>
@@ -76,7 +65,7 @@
<!-- ENDIF -->
</fieldset>
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
<!-- IF CAPTCHA_TEMPLATE -->
<!-- DEFINE $CAPTCHA_TAB_INDEX = 8 -->
@@ -87,17 +76,17 @@
<div class="panel">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<h4>{L_COPPA_COMPLIANCE}</h4>
<p>{L_COPPA_EXPLAIN}</p>
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
<!-- ENDIF -->
<div class="panel">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<fieldset class="submit-buttons">
{S_HIDDEN_FIELDS}
@@ -106,8 +95,8 @@
{S_FORM_TOKEN}
</fieldset>
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
</form>
-<!-- INCLUDE overall_footer.html --> \ No newline at end of file
+<!-- INCLUDE overall_footer.html -->
diff --git a/phpBB/styles/prosilver/template/ucp_remind.html b/phpBB/styles/prosilver/template/ucp_remind.html
index 7dbc23b733..0ab1251d9e 100644
--- a/phpBB/styles/prosilver/template/ucp_remind.html
+++ b/phpBB/styles/prosilver/template/ucp_remind.html
@@ -3,19 +3,19 @@
<form action="{S_PROFILE_ACTION}" method="post" id="remind">
<div class="panel">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<div class="content">
<h2>{L_SEND_PASSWORD}</h2>
<fieldset>
<dl>
- <dt><label for="username">{L_USERNAME}:</label></dt>
+ <dt><label for="username">{L_USERNAME}{L_COLON}</label></dt>
<dd><input class="inputbox narrow" type="text" name="username" id="username" size="25" /></dd>
</dl>
<dl>
- <dt><label for="email">{L_EMAIL_ADDRESS}:</label><br /><span>{L_EMAIL_REMIND}</span></dt>
- <dd><input class="inputbox narrow" type="text" name="email" id="email" size="25" maxlength="100" /></dd>
+ <dt><label for="email">{L_EMAIL_ADDRESS}{L_COLON}</label><br /><span>{L_EMAIL_REMIND}</span></dt>
+ <dd><input class="inputbox narrow" type="email" name="email" id="email" size="25" maxlength="100" /></dd>
</dl>
<dl>
<dt>&nbsp;</dt>
@@ -25,8 +25,8 @@
</fieldset>
</div>
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
</form>
-<!-- INCLUDE overall_footer.html --> \ No newline at end of file
+<!-- INCLUDE overall_footer.html -->
diff --git a/phpBB/styles/prosilver/template/ucp_resend.html b/phpBB/styles/prosilver/template/ucp_resend.html
index 840e972995..7713efe521 100644
--- a/phpBB/styles/prosilver/template/ucp_resend.html
+++ b/phpBB/styles/prosilver/template/ucp_resend.html
@@ -4,19 +4,19 @@
<form action="{S_PROFILE_ACTION}" method="post" id="resend">
<div class="panel">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<div class="content">
<h2>{L_UCP_RESEND}</h2>
<fieldset>
<dl>
- <dt><label for="username">{L_USERNAME}:</label></dt>
+ <dt><label for="username">{L_USERNAME}{L_COLON}</label></dt>
<dd><input class="inputbox narrow" type="text" name="username" id="username" size="25" /></dd>
</dl>
<dl>
- <dt><label for="email">{L_EMAIL_ADDRESS}:</label><br /><span>{L_EMAIL_REMIND}</span></dt>
- <dd><input class="inputbox narrow" type="text" name="email" id="email" size="25" maxlength="100" /></dd>
+ <dt><label for="email">{L_EMAIL_ADDRESS}{L_COLON}</label><br /><span>{L_EMAIL_REMIND}</span></dt>
+ <dd><input class="inputbox narrow" type="email" name="email" id="email" size="25" maxlength="100" /></dd>
</dl>
<dl>
<dt>&nbsp;</dt>
@@ -25,8 +25,8 @@
</fieldset>
</div>
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
</form>
-<!-- INCLUDE overall_footer.html --> \ No newline at end of file
+<!-- INCLUDE overall_footer.html -->
diff --git a/phpBB/styles/prosilver/template/ucp_zebra_foes.html b/phpBB/styles/prosilver/template/ucp_zebra_foes.html
index 3c1b1cddce..712479dc18 100644
--- a/phpBB/styles/prosilver/template/ucp_zebra_foes.html
+++ b/phpBB/styles/prosilver/template/ucp_zebra_foes.html
@@ -5,14 +5,14 @@
<h2>{L_TITLE}</h2>
<div class="panel">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<p>{L_FOES_EXPLAIN}</p>
<fieldset class="fields2">
<!-- IF ERROR --><p class="error">{ERROR}</p><!-- ENDIF -->
<dl>
- <dt><label <!-- IF S_USERNAME_OPTIONS -->for="usernames"<!-- ENDIF -->>{L_YOUR_FOES}:</label><br /><span>{L_YOUR_FOES_EXPLAIN}</span></dt>
+ <dt><label <!-- IF S_USERNAME_OPTIONS -->for="usernames"<!-- ENDIF -->>{L_YOUR_FOES}{L_COLON}</label><br /><span>{L_YOUR_FOES_EXPLAIN}</span></dt>
<dd>
<!-- IF S_USERNAME_OPTIONS -->
<select name="usernames[]" id="usernames" multiple="multiple" size="5">{S_USERNAME_OPTIONS}</select>
@@ -22,13 +22,13 @@
</dd>
</dl>
<dl>
- <dt><label for="add">{L_ADD_FOES}:</label><br /><span>{L_ADD_FOES_EXPLAIN}</span></dt>
+ <dt><label for="add">{L_ADD_FOES}{L_COLON}</label><br /><span>{L_ADD_FOES_EXPLAIN}</span></dt>
<dd><textarea name="add" id="add" rows="3" cols="30" class="inputbox">{USERNAMES}</textarea></dd>
<dd><strong><a href="{U_FIND_USERNAME}" onclick="find_username(this.href); return false;">{L_FIND_USERNAME}</a></strong></dd>
</dl>
</fieldset>
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
<fieldset class="submit-buttons">
@@ -38,4 +38,4 @@
</fieldset>
</form>
-<!-- INCLUDE ucp_footer.html --> \ No newline at end of file
+<!-- INCLUDE ucp_footer.html -->
diff --git a/phpBB/styles/prosilver/template/ucp_zebra_friends.html b/phpBB/styles/prosilver/template/ucp_zebra_friends.html
index 1e0efbfdf8..fac0a18706 100644
--- a/phpBB/styles/prosilver/template/ucp_zebra_friends.html
+++ b/phpBB/styles/prosilver/template/ucp_zebra_friends.html
@@ -5,14 +5,15 @@
<h2>{L_TITLE}</h2>
<div class="panel">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<p>{L_FRIENDS_EXPLAIN}</p>
<fieldset class="fields2">
<!-- IF ERROR --><p class="error">{ERROR}</p><!-- ENDIF -->
+ <!-- EVENT ucp_friend_list_before -->
<dl>
- <dt><label <!-- IF S_USERNAME_OPTIONS -->for="usernames"<!-- ENDIF -->>{L_YOUR_FRIENDS}:</label><br /><span>{L_YOUR_FRIENDS_EXPLAIN}</span></dt>
+ <dt><label <!-- IF S_USERNAME_OPTIONS -->for="usernames"<!-- ENDIF -->>{L_YOUR_FRIENDS}{L_COLON}</label><br /><span>{L_YOUR_FRIENDS_EXPLAIN}</span></dt>
<dd>
<!-- IF S_USERNAME_OPTIONS -->
<select name="usernames[]" id="usernames" multiple="multiple" size="5">{S_USERNAME_OPTIONS}</select>
@@ -21,14 +22,15 @@
<!-- ENDIF -->
</dd>
</dl>
+ <!-- EVENT ucp_friend_list_after -->
<dl>
- <dt><label for="add">{L_ADD_FRIENDS}:</label><br /><span>{L_ADD_FRIENDS_EXPLAIN}</span></dt>
+ <dt><label for="add">{L_ADD_FRIENDS}{L_COLON}</label><br /><span>{L_ADD_FRIENDS_EXPLAIN}</span></dt>
<dd><textarea name="add" id="add" rows="3" cols="30" class="inputbox">{USERNAMES}</textarea></dd>
<dd><strong><a href="{U_FIND_USERNAME}" onclick="find_username(this.href); return false;">{L_FIND_USERNAME}</a></strong></dd>
</dl>
</fieldset>
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
<fieldset class="submit-buttons">
@@ -38,4 +40,4 @@
</fieldset>
</form>
-<!-- INCLUDE ucp_footer.html --> \ No newline at end of file
+<!-- INCLUDE ucp_footer.html -->
diff --git a/phpBB/styles/prosilver/template/viewforum_body.html b/phpBB/styles/prosilver/template/viewforum_body.html
index 02f42fa097..b464e18470 100644
--- a/phpBB/styles/prosilver/template/viewforum_body.html
+++ b/phpBB/styles/prosilver/template/viewforum_body.html
@@ -1,18 +1,18 @@
<!-- INCLUDE overall_header.html -->
-<!-- IF U_MCP --><p>[&nbsp;<a href="{U_MCP}">{L_MCP}</a>&nbsp;]</p><!-- ENDIF -->
+<!-- IF U_MCP or U_ACP --><p class="responsive-center">[&nbsp;<!-- IF U_ACP --><a href="{U_ACP}" title="{L_ACP}" data-responsive-text="{L_ACP_SHORT}">{L_ACP}</a><!-- IF U_MCP -->&nbsp;|&nbsp;<!-- ENDIF --><!-- ENDIF --><!-- IF U_MCP --><a href="{U_MCP}" title="{L_MCP}" data-responsive-text="{L_MCP_SHORT}">{L_MCP}</a><!-- ENDIF -->&nbsp;]</p><!-- ENDIF -->
<h2><a href="{U_VIEW_FORUM}">{FORUM_NAME}</a></h2>
<!-- IF FORUM_DESC or MODERATORS or U_MCP -->
<div>
<!-- NOTE: remove the style="display: none" when you want to have the forum description on the forum body -->
<!-- IF FORUM_DESC --><div style="display: none !important;">{FORUM_DESC}<br /></div><!-- ENDIF -->
- <!-- IF MODERATORS --><p><strong><!-- IF S_SINGLE_MODERATOR -->{L_MODERATOR}<!-- ELSE -->{L_MODERATORS}<!-- ENDIF -->:</strong> {MODERATORS}</p><!-- ENDIF -->
+ <!-- IF MODERATORS --><p><strong><!-- IF S_SINGLE_MODERATOR -->{L_MODERATOR}<!-- ELSE -->{L_MODERATORS}<!-- ENDIF -->{L_COLON}</strong> {MODERATORS}</p><!-- ENDIF -->
</div>
<!-- ENDIF -->
<!-- IF S_FORUM_RULES -->
- <div class="rules">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="rules<!-- IF U_FORUM_RULES --> rules-link<!-- ENDIF -->">
+ <div class="inner">
<!-- IF U_FORUM_RULES -->
<a href="{U_FORUM_RULES}">{L_FORUM_RULES}</a>
@@ -21,25 +21,25 @@
{FORUM_RULES}
<!-- ENDIF -->
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
<!-- ENDIF -->
<!-- IF S_HAS_SUBFORUM -->
<!-- IF not S_IS_BOT and U_MARK_FORUMS -->
<ul class="linklist">
- <li class="rightside"><a href="{U_MARK_FORUMS}">{L_MARK_SUBFORUMS_READ}</a></li>
+ <li class="rightside mark-read"><a href="{U_MARK_FORUMS}" data-ajax="mark_forums_read" data-overlay="false">{L_MARK_SUBFORUMS_READ}</a></li>
</ul>
<!-- ENDIF -->
<!-- INCLUDE forumlist_body.html -->
<!-- ENDIF -->
-<!-- IF S_DISPLAY_POST_INFO or PAGINATION or TOTAL_POSTS or TOTAL_TOPICS -->
+<!-- IF S_DISPLAY_POST_INFO or .pagination or TOTAL_POSTS or TOTAL_TOPICS -->
<div class="topic-actions" <!-- IF S_HAS_SUBFORUM -->style="margin-top: 2em;"<!-- ENDIF -->>
<!-- IF not S_IS_BOT and S_DISPLAY_POST_INFO -->
<div class="buttons">
- <div class="<!-- IF S_IS_LOCKED -->locked-icon<!-- ELSE -->post-icon<!-- ENDIF -->" title="<!-- IF S_IS_LOCKED -->{L_FORUM_LOCKED}<!-- ELSE -->{L_POST_TOPIC}<!-- ENDIF -->"><a href="{U_POST_NEW_TOPIC}"><span></span><!-- IF S_IS_LOCKED -->{L_FORUM_LOCKED}<!-- ELSE -->{L_POST_TOPIC}<!-- ENDIF --></a></div>
+ <div class="<!-- IF S_IS_LOCKED -->locked-icon<!-- ELSE -->post-icon<!-- ENDIF -->" title="<!-- IF S_IS_LOCKED -->{L_FORUM_LOCKED}<!-- ELSE -->{L_POST_TOPIC}<!-- ENDIF -->"><a href="{U_POST_NEW_TOPIC}"><span></span><!-- IF S_IS_LOCKED -->{L_BUTTON_FORUM_LOCKED}<!-- ELSE -->{L_BUTTON_NEW_TOPIC}<!-- ENDIF --></a></div>
</div>
<!-- ENDIF -->
@@ -47,7 +47,7 @@
<div class="search-box">
<form method="get" id="forum-search" action="{S_SEARCHBOX_ACTION}">
<fieldset>
- <input class="inputbox search tiny" type="text" name="keywords" id="search_keywords" size="20" value="{L_SEARCH_FORUM}" onclick="if (this.value == '{LA_SEARCH_FORUM}') this.value = '';" onblur="if (this.value == '') this.value = '{LA_SEARCH_FORUM}';" />
+ <input class="inputbox search tiny" type="search" name="keywords" id="search_keywords" size="20" placeholder="{L_SEARCH_FORUM}" />
<input class="button2" type="submit" value="{L_SEARCH}" />
{S_SEARCH_LOCAL_HIDDEN_FIELDS}
</fieldset>
@@ -55,14 +55,15 @@
</div>
<!-- ENDIF -->
- <!-- IF PAGINATION or TOTAL_POSTS or TOTAL_TOPICS -->
- <div class="pagination">
- <!-- IF not S_IS_BOT and U_MARK_TOPICS --><a href="{U_MARK_TOPICS}" accesskey="m">{L_MARK_TOPICS_READ}</a> &bull; <!-- ENDIF --><!-- IF TOTAL_TOPICS -->{TOTAL_TOPICS}<!-- ENDIF -->
- <!-- IF PAGE_NUMBER -->
- <!-- IF PAGINATION --> &bull; <a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{PAGE_NUMBER}</a> &bull; <span>{PAGINATION}</span><!-- ELSE --> &bull; {PAGE_NUMBER}<!-- ENDIF -->
- <!-- ENDIF -->
- </div>
- <!-- ENDIF -->
+ <div class="pagination">
+ <!-- IF not S_IS_BOT and U_MARK_TOPICS and .topicrow --><a href="{U_MARK_TOPICS}" accesskey="m" data-ajax="mark_topics_read" data-overlay="false">{L_MARK_TOPICS_READ}</a> &bull; <!-- ENDIF -->
+ {TOTAL_TOPICS} &bull;
+ <!-- IF .pagination -->
+ <!-- INCLUDE pagination.html -->
+ <!-- ELSE -->
+ {PAGE_NUMBER}
+ <!-- ENDIF -->
+ </div>
</div>
<!-- ENDIF -->
@@ -70,9 +71,9 @@
<!-- IF S_NO_READ_ACCESS -->
<div class="panel">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<strong>{L_NO_READ_ACCESS}</strong>
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
<!-- IF not S_USER_LOGGED_IN and not S_IS_BOT -->
@@ -80,18 +81,18 @@
<form action="{S_LOGIN_ACTION}" method="post">
<div class="panel">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<div class="content">
<h3><a href="{U_LOGIN_LOGOUT}">{L_LOGIN_LOGOUT}</a><!-- IF S_REGISTER_ENABLED -->&nbsp; &bull; &nbsp;<a href="{U_REGISTER}">{L_REGISTER}</a><!-- ENDIF --></h3>
<fieldset class="fields1">
<dl>
- <dt><label for="username">{L_USERNAME}:</label></dt>
+ <dt><label for="username">{L_USERNAME}{L_COLON}</label></dt>
<dd><input type="text" tabindex="1" name="username" id="username" size="25" value="{USERNAME}" class="inputbox autowidth" /></dd>
</dl>
<dl>
- <dt><label for="password">{L_PASSWORD}:</label></dt>
+ <dt><label for="password">{L_PASSWORD}{L_COLON}</label></dt>
<dd><input type="password" tabindex="2" id="password" name="password" size="25" class="inputbox autowidth" /></dd>
<!-- IF S_AUTOLOGIN_ENABLED --><dd><label for="autologin"><input type="checkbox" name="autologin" id="autologin" tabindex="3" /> {L_LOG_ME_IN}</label></dd><!-- ENDIF -->
<dd><label for="viewonline"><input type="checkbox" name="viewonline" id="viewonline" tabindex="4" /> {L_HIDE_ME}</label></dd>
@@ -104,7 +105,7 @@
</fieldset>
</div>
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
</form>
@@ -117,17 +118,17 @@
<!-- IF not topicrow.S_TOPIC_TYPE_SWITCH and not topicrow.S_FIRST_ROW -->
</ul>
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
<!-- ENDIF -->
<!-- IF topicrow.S_FIRST_ROW or not topicrow.S_TOPIC_TYPE_SWITCH -->
<div class="forumbg<!-- IF topicrow.S_TOPIC_TYPE_SWITCH and (topicrow.S_POST_ANNOUNCE or topicrow.S_POST_GLOBAL) --> announcement<!-- ENDIF -->">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<ul class="topiclist">
<li class="header">
<dl class="icon">
- <dt><!-- IF S_DISPLAY_ACTIVE -->{L_ACTIVE_TOPICS}<!-- ELSEIF topicrow.S_TOPIC_TYPE_SWITCH and (topicrow.S_POST_ANNOUNCE or topicrow.S_POST_GLOBAL) -->{L_ANNOUNCEMENTS}<!-- ELSE -->{L_TOPICS}<!-- ENDIF --></dt>
+ <dt<!-- IF S_DISPLAY_ACTIVE --> id="active_topics"<!-- ENDIF -->><div class="list-inner"><!-- IF S_DISPLAY_ACTIVE -->{L_ACTIVE_TOPICS}<!-- ELSEIF topicrow.S_TOPIC_TYPE_SWITCH and (topicrow.S_POST_ANNOUNCE or topicrow.S_POST_GLOBAL) -->{L_ANNOUNCEMENTS}<!-- ELSE -->{L_TOPICS}<!-- ENDIF --></div></dt>
<dd class="posts">{L_REPLIES}</dd>
<dd class="views">{L_VIEWS}</dd>
<dd class="lastpost"><span>{L_LAST_POST}</span></dd>
@@ -138,33 +139,65 @@
<!-- ENDIF -->
<li class="row<!-- IF topicrow.S_ROW_COUNT is even --> bg1<!-- ELSE --> bg2<!-- ENDIF --><!-- IF topicrow.S_POST_GLOBAL --> global-announce<!-- ENDIF --><!-- IF topicrow.S_POST_ANNOUNCE --> announce<!-- ENDIF --><!-- IF topicrow.S_POST_STICKY --> sticky<!-- ENDIF --><!-- IF topicrow.S_TOPIC_REPORTED --> reported<!-- ENDIF -->">
- <dl class="icon" style="background-image: url({topicrow.TOPIC_FOLDER_IMG_SRC}); background-repeat: no-repeat;">
- <dt<!-- IF topicrow.TOPIC_ICON_IMG and S_TOPIC_ICONS --> style="background-image: url({T_ICONS_PATH}{topicrow.TOPIC_ICON_IMG}); background-repeat: no-repeat;"<!-- ENDIF --> title="{topicrow.TOPIC_FOLDER_IMG_ALT}"><!-- IF topicrow.S_UNREAD_TOPIC --><a href="{topicrow.U_NEWEST_POST}">{NEWEST_POST_IMG}</a> <!-- ENDIF --><a href="{topicrow.U_VIEW_TOPIC}" class="topictitle">{topicrow.TOPIC_TITLE}</a>
- <!-- IF topicrow.S_TOPIC_UNAPPROVED or topicrow.S_POSTS_UNAPPROVED --><a href="{topicrow.U_MCP_QUEUE}">{topicrow.UNAPPROVED_IMG}</a> <!-- ENDIF -->
- <!-- IF topicrow.S_TOPIC_REPORTED --><a href="{topicrow.U_MCP_REPORT}">{REPORTED_IMG}</a><!-- ENDIF --><br />
- <!-- IF topicrow.PAGINATION --><strong class="pagination"><span>{topicrow.PAGINATION}</span></strong><!-- ENDIF -->
- <!-- IF topicrow.ATTACH_ICON_IMG -->{topicrow.ATTACH_ICON_IMG} <!-- ENDIF -->{L_POST_BY_AUTHOR} {topicrow.TOPIC_AUTHOR_FULL} &raquo; {topicrow.FIRST_POST_TIME}
+ <dl class="icon {topicrow.TOPIC_IMG_STYLE}">
+ <dt<!-- IF topicrow.TOPIC_ICON_IMG and S_TOPIC_ICONS --> style="background-image: url({T_ICONS_PATH}{topicrow.TOPIC_ICON_IMG}); background-repeat: no-repeat;"<!-- ENDIF --> title="{topicrow.TOPIC_FOLDER_IMG_ALT}">
+ <!-- IF topicrow.S_UNREAD_TOPIC and not S_IS_BOT --><a href="{topicrow.U_NEWEST_POST}" class="icon-link"></a><!-- ENDIF -->
+ <div class="list-inner">
+ <!-- EVENT topiclist_row_prepend -->
+ <!-- IF topicrow.S_UNREAD_TOPIC and not S_IS_BOT --><a href="{topicrow.U_NEWEST_POST}">{NEWEST_POST_IMG}</a> <!-- ENDIF --><a href="{topicrow.U_VIEW_TOPIC}" class="topictitle">{topicrow.TOPIC_TITLE}</a>
+ <!-- IF topicrow.S_TOPIC_UNAPPROVED or topicrow.S_POSTS_UNAPPROVED --><a href="{topicrow.U_MCP_QUEUE}">{topicrow.UNAPPROVED_IMG}</a> <!-- ENDIF -->
+ <!-- IF topicrow.S_TOPIC_DELETED --><a href="{topicrow.U_MCP_QUEUE}">{DELETED_IMG}</a> <!-- ENDIF -->
+ <!-- IF topicrow.S_TOPIC_REPORTED --><a href="{topicrow.U_MCP_REPORT}">{REPORTED_IMG}</a><!-- ENDIF --><br />
+ <!-- IF .topicrow.pagination -->
+ <div class="pagination">
+ <ul>
+ <!-- BEGIN pagination -->
+ <!-- IF topicrow.pagination.S_IS_PREV -->
+ <!-- ELSEIF topicrow.pagination.S_IS_CURRENT --><li class="active"><span>{topicrow.pagination.PAGE_NUMBER}</span></li>
+ <!-- ELSEIF topicrow.pagination.S_IS_ELLIPSIS --><li class="ellipsis"><span>{L_ELLIPSIS}</span></li>
+ <!-- ELSEIF topicrow.pagination.S_IS_NEXT -->
+ <!-- ELSE --><li><a href="{topicrow.pagination.PAGE_URL}">{topicrow.pagination.PAGE_NUMBER}</a></li>
+ <!-- ENDIF -->
+ <!-- END pagination -->
+ </ul>
+ </div>
+ <!-- ENDIF -->
+ <div class="responsive-hide">
+ <!-- IF topicrow.ATTACH_ICON_IMG -->{topicrow.ATTACH_ICON_IMG} <!-- ENDIF -->
+ {L_POST_BY_AUTHOR} {topicrow.TOPIC_AUTHOR_FULL} &raquo; {topicrow.FIRST_POST_TIME}
+ <!-- IF topicrow.S_POST_GLOBAL and FORUM_ID != topicrow.FORUM_ID --> &raquo; {L_IN} <a href="{topicrow.U_VIEW_FORUM}">{topicrow.FORUM_NAME}</a><!-- ENDIF -->
+ </div>
+ <!-- IF not S_IS_BOT -->
+ <div class="responsive-show" style="display: none;">
+ {L_LAST_POST} {L_POST_BY_AUTHOR} {topicrow.LAST_POST_AUTHOR_FULL} &laquo; <a href="{topicrow.U_LAST_POST}" title="{L_GOTO_LAST_POST}">{topicrow.LAST_POST_TIME}</a>
+ <!-- IF topicrow.S_POST_GLOBAL and FORUM_ID != topicrow.FORUM_ID --><br />{L_POSTED} {L_IN} <a href="{topicrow.U_VIEW_FORUM}">{topicrow.FORUM_NAME}</a><!-- ENDIF -->
+ <!-- IF topicrow.REPLIES --><br />{L_REPLIES}{L_COLON} <strong>{topicrow.REPLIES}</strong><!-- ENDIF -->
+ </div>
+ <!-- ENDIF -->
+
+ <!-- EVENT topiclist_row_append -->
+ </div>
</dt>
<dd class="posts">{topicrow.REPLIES} <dfn>{L_REPLIES}</dfn></dd>
<dd class="views">{topicrow.VIEWS} <dfn>{L_VIEWS}</dfn></dd>
<dd class="lastpost"><span><dfn>{L_LAST_POST} </dfn>{L_POST_BY_AUTHOR} {topicrow.LAST_POST_AUTHOR_FULL}
- <!-- IF not S_IS_BOT --><a href="{topicrow.U_LAST_POST}">{LAST_POST_IMG}</a> <!-- ENDIF --><br />{topicrow.LAST_POST_TIME}</span>
+ <!-- IF not S_IS_BOT --><a href="{topicrow.U_LAST_POST}" title="{L_GOTO_LAST_POST}">{LAST_POST_IMG}</a> <!-- ENDIF --><br />{topicrow.LAST_POST_TIME}</span>
</dd>
</dl>
</li>
<!-- IF topicrow.S_LAST_ROW -->
</ul>
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
<!-- ENDIF -->
<!-- BEGINELSE -->
<!-- IF S_IS_POSTABLE -->
<div class="panel">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<strong>{L_NO_TOPICS}</strong>
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
<!-- ENDIF -->
<!-- END topicrow -->
@@ -172,12 +205,13 @@
<!-- IF S_SELECT_SORT_DAYS and not S_DISPLAY_ACTIVE -->
<form method="post" action="{S_FORUM_ACTION}">
<fieldset class="display-options">
- <!-- IF PREVIOUS_PAGE --><a href="{PREVIOUS_PAGE}" class="left-box {S_CONTENT_FLOW_BEGIN}">{L_PREVIOUS}</a><!-- ENDIF -->
- <!-- IF NEXT_PAGE --><a href="{NEXT_PAGE}" class="right-box {S_CONTENT_FLOW_END}">{L_NEXT}</a><!-- ENDIF -->
+ <!-- IF U_PREVIOUS_PAGE --><a href="{U_PREVIOUS_PAGE}" class="left-box arrow-{S_CONTENT_FLOW_BEGIN}">{L_PREVIOUS}</a><!-- ENDIF -->
+ <!-- IF U_NEXT_PAGE --><a href="{U_NEXT_PAGE}" class="right-box arrow-{S_CONTENT_FLOW_END}">{L_NEXT}</a><!-- ENDIF -->
<!-- IF not S_IS_BOT -->
- <label>{L_DISPLAY_TOPICS}: {S_SELECT_SORT_DAYS}</label>
+ <label>{L_DISPLAY_TOPICS}{L_COLON} {S_SELECT_SORT_DAYS}</label>
<label>{L_SORT_BY} {S_SELECT_SORT_KEY}</label>
- <label>{S_SELECT_SORT_DIR} <input type="submit" name="sort" value="{L_GO}" class="button2" /></label>
+ <label>{S_SELECT_SORT_DIR}</label>
+ <input type="submit" name="sort" value="{L_GO}" class="button2" />
<!-- ENDIF -->
</fieldset>
</form>
@@ -188,19 +222,19 @@
<div class="topic-actions">
<!-- IF not S_IS_BOT and S_DISPLAY_POST_INFO -->
<div class="buttons">
- <div class="<!-- IF S_IS_LOCKED -->locked-icon<!-- ELSE -->post-icon<!-- ENDIF -->" title="<!-- IF S_IS_LOCKED -->{L_FORUM_LOCKED}<!-- ELSE -->{L_POST_TOPIC}<!-- ENDIF -->"><a href="{U_POST_NEW_TOPIC}"><span></span><!-- IF S_IS_LOCKED -->{L_FORUM_LOCKED}<!-- ELSE -->{L_POST_TOPIC}<!-- ENDIF --></a></div>
+ <div class="<!-- IF S_IS_LOCKED -->locked-icon<!-- ELSE -->post-icon<!-- ENDIF -->" title="<!-- IF S_IS_LOCKED -->{L_FORUM_LOCKED}<!-- ELSE -->{L_POST_TOPIC}<!-- ENDIF -->"><a href="{U_POST_NEW_TOPIC}"><span></span><!-- IF S_IS_LOCKED -->{L_BUTTON_FORUM_LOCKED}<!-- ELSE -->{L_BUTTON_NEW_TOPIC}<!-- ENDIF --></a></div>
</div>
<!-- ENDIF -->
- <!-- IF PAGINATION or TOTAL_POSTS or TOTAL_TOPICS -->
<div class="pagination">
- <!-- IF TOTAL_TOPICS and not S_IS_BOT and U_MARK_TOPICS --><a href="{U_MARK_TOPICS}">{L_MARK_TOPICS_READ}</a> &bull; <!-- ENDIF -->
- <!-- IF TOTAL_POSTS and not NEWEST_USER --> {TOTAL_POSTS}<!-- ELSEIF TOTAL_TOPICS and not NEWEST_USER --> {TOTAL_TOPICS}<!-- ENDIF -->
- <!-- IF TOTAL_USERS -->{TOTAL_USERS}<!-- ENDIF -->
- <!-- IF PAGINATION --> &bull; <a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{PAGE_NUMBER}</a>
- &bull; <span>{PAGINATION}</span><!-- ELSE --> &bull; {PAGE_NUMBER}<!-- ENDIF -->
+ <!-- IF not S_IS_BOT and U_MARK_TOPICS and .topicrow --><a href="{U_MARK_TOPICS}" data-ajax="mark_topics_read" data-overlay="false">{L_MARK_TOPICS_READ}</a> &bull; <!-- ENDIF -->
+ {TOTAL_TOPICS} &bull;
+ <!-- IF .pagination -->
+ <!-- INCLUDE pagination.html -->
+ <!-- ELSE -->
+ {PAGE_NUMBER}
+ <!-- ENDIF -->
</div>
- <!-- ENDIF -->
</div>
<!-- ENDIF -->
@@ -216,4 +250,4 @@
<p><!-- BEGIN rules -->{rules.RULE}<br /><!-- END rules --></p>
<!-- ENDIF -->
-<!-- INCLUDE overall_footer.html --> \ No newline at end of file
+<!-- INCLUDE overall_footer.html -->
diff --git a/phpBB/styles/prosilver/template/viewonline_body.html b/phpBB/styles/prosilver/template/viewonline_body.html
index 3f1f0e64bf..13f459b57f 100644
--- a/phpBB/styles/prosilver/template/viewonline_body.html
+++ b/phpBB/styles/prosilver/template/viewonline_body.html
@@ -4,13 +4,19 @@
<p>{TOTAL_GUEST_USERS_ONLINE}<!-- IF S_SWITCH_GUEST_DISPLAY --> &bull; <a href="{U_SWITCH_GUEST_DISPLAY}">{L_SWITCH_GUEST_DISPLAY}</a><!-- ENDIF --></p>
<ul class="linklist">
- <li class="rightside pagination"><!-- IF PAGINATION --><a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{PAGE_NUMBER}</a> &bull; <span>{PAGINATION}</span><!-- ELSE -->{PAGE_NUMBER}<!-- ENDIF --></li>
+ <li class="rightside pagination">
+ <!-- IF .pagination -->
+ <!-- INCLUDE pagination.html -->
+ <!-- ELSE -->
+ {PAGE_NUMBER}
+ <!-- ENDIF -->
+ </li>
</ul>
<div class="forumbg forumbg-table">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
- <table class="table1" cellspacing="1">
+ <table class="table1">
<!-- IF .user_row -->
<thead>
@@ -23,7 +29,7 @@
<tbody>
<!-- BEGIN user_row -->
<tr class="<!-- IF user_row.S_ROW_COUNT is odd -->bg1<!-- ELSE -->bg2<!-- ENDIF -->">
- <td>{user_row.USERNAME_FULL}<!-- IF user_row.USER_IP --> <span style="margin-left: 30px;">{L_IP}: <a href="{user_row.U_USER_IP}">{user_row.USER_IP}</a> &#187; <a href="{user_row.U_WHOIS}" onclick="popup(this.href, 750, 500); return false;">{L_WHOIS}</a></span><!-- ENDIF -->
+ <td>{user_row.USERNAME_FULL}<!-- IF user_row.USER_IP --> <span style="float: {S_CONTENT_FLOW_END};">{L_IP}{L_COLON} <a href="{user_row.U_USER_IP}">{user_row.USER_IP}</a> &#187; <a href="{user_row.U_WHOIS}" onclick="popup(this.href, 750, 500); return false;">{L_WHOIS}</a></span><!-- ENDIF -->
<!-- IF user_row.USER_BROWSER --><br />{user_row.USER_BROWSER}<!-- ENDIF --></td>
<td class="info"><a href="{user_row.U_FORUM_LOCATION}">{user_row.FORUM_LOCATION}</a></td>
<td class="active">{user_row.LASTUPDATE}</td>
@@ -38,19 +44,25 @@
</tbody>
</table>
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
-<!-- IF PREVIOUS_PAGE or NEXT_PAGE -->
+<!-- IF U_PREVIOUS_PAGE or U_NEXT_PAGE -->
<fieldset class="display-options right-box">
- <!-- IF PREVIOUS_PAGE --><a href="{PREVIOUS_PAGE}" class="{S_CONTENT_FLOW_BEGIN}">{L_PREVIOUS}</a><!-- ELSE -->{L_PREVIOUS}<!-- ENDIF --> &bull; <!-- IF NEXT_PAGE --><a href="{NEXT_PAGE}" class="{S_CONTENT_FLOW_END}">{L_NEXT}</a><!-- ELSE -->{L_NEXT}<!-- ENDIF -->
+ <!-- IF U_PREVIOUS_PAGE --><a href="{U_PREVIOUS_PAGE}" class="arrow-{S_CONTENT_FLOW_BEGIN}">{L_PREVIOUS}</a><!-- ELSE -->{L_PREVIOUS}<!-- ENDIF --> &bull; <!-- IF U_NEXT_PAGE --><a href="{U_NEXT_PAGE}" class="arrow-{S_CONTENT_FLOW_END}">{L_NEXT}</a><!-- ELSE -->{L_NEXT}<!-- ENDIF -->
</fieldset>
<!-- ENDIF -->
-<!-- IF LEGEND --><p><em>{L_LEGEND}: {LEGEND}</em></p><!-- ENDIF -->
+<!-- IF LEGEND --><p><em>{L_LEGEND}{L_COLON} {LEGEND}</em></p><!-- ENDIF -->
<ul class="linklist">
- <li class="rightside pagination"><!-- IF PAGINATION --><a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{PAGE_NUMBER}</a> &bull; <span>{PAGINATION}</span><!-- ELSE -->{PAGE_NUMBER}<!-- ENDIF --></li>
+ <li class="rightside pagination">
+ <!-- IF .pagination -->
+ <!-- INCLUDE pagination.html -->
+ <!-- ELSE -->
+ {PAGE_NUMBER}
+ <!-- ENDIF -->
+ </li>
</ul>
<!-- INCLUDE jumpbox.html -->
diff --git a/phpBB/styles/prosilver/template/viewonline_whois.html b/phpBB/styles/prosilver/template/viewonline_whois.html
index a9c6473727..8abd933efa 100644
--- a/phpBB/styles/prosilver/template/viewonline_whois.html
+++ b/phpBB/styles/prosilver/template/viewonline_whois.html
@@ -3,14 +3,14 @@
<h2>{L_WHOIS}</h2>
<div class="panel">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<div class="postbody"><div class="content">
<pre>{WHOIS}</pre>
</div></div>
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
<a href="#" onclick="window.close(); return false;">{L_CLOSE_WINDOW}</a>
-<!-- INCLUDE simple_footer.html --> \ No newline at end of file
+<!-- INCLUDE simple_footer.html -->
diff --git a/phpBB/styles/prosilver/template/viewtopic_body.html b/phpBB/styles/prosilver/template/viewtopic_body.html
index 57de96d853..8103ecda7f 100644
--- a/phpBB/styles/prosilver/template/viewtopic_body.html
+++ b/phpBB/styles/prosilver/template/viewtopic_body.html
@@ -1,18 +1,18 @@
<!-- INCLUDE overall_header.html -->
-<!-- IF U_MCP --><p>[&nbsp;<a href="{U_MCP}">{L_MCP}</a>&nbsp;]</p><!-- ENDIF -->
-<h2><a href="{U_VIEW_TOPIC}">{TOPIC_TITLE}</a></h2>
+<!-- IF U_MCP or U_ACP --><p class="responsive-center">[&nbsp;<!-- IF U_ACP --><a href="{U_ACP}" title="{L_ACP}" data-responsive-text="{L_ACP_SHORT}">{L_ACP}</a><!-- IF U_MCP -->&nbsp;|&nbsp;<!-- ENDIF --><!-- ENDIF --><!-- IF U_MCP --><a href="{U_MCP}" title="{L_MCP}" data-responsive-text="{L_MCP_SHORT}">{L_MCP}</a><!-- ENDIF -->&nbsp;]</p><!-- ENDIF -->
+<h2><!-- EVENT viewtopic_topic_title_prepend --><a href="{U_VIEW_TOPIC}">{TOPIC_TITLE}</a></h2>
<!-- NOTE: remove the style="display: none" when you want to have the forum description on the topic body -->
<!-- IF FORUM_DESC --><div style="display: none !important;">{FORUM_DESC}<br /></div><!-- ENDIF -->
<!-- IF MODERATORS -->
<p>
- <strong><!-- IF S_SINGLE_MODERATOR -->{L_MODERATOR}<!-- ELSE -->{L_MODERATORS}<!-- ENDIF -->:</strong> {MODERATORS}
+ <strong><!-- IF S_SINGLE_MODERATOR -->{L_MODERATOR}<!-- ELSE -->{L_MODERATORS}<!-- ENDIF -->{L_COLON}</strong> {MODERATORS}
</p>
<!-- ENDIF -->
<!-- IF S_FORUM_RULES -->
- <div class="rules">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="rules<!-- IF U_FORUM_RULES --> rules-link<!-- ENDIF -->">
+ <div class="inner">
<!-- IF U_FORUM_RULES -->
<a href="{U_FORUM_RULES}">{L_FORUM_RULES}</a>
@@ -21,7 +21,7 @@
{FORUM_RULES}
<!-- ENDIF -->
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
<!-- ENDIF -->
@@ -29,15 +29,17 @@
<div class="buttons">
<!-- IF not S_IS_BOT and S_DISPLAY_REPLY_INFO -->
- <div class="<!-- IF S_IS_LOCKED -->locked-icon<!-- ELSE -->reply-icon<!-- ENDIF -->"><a href="{U_POST_REPLY_TOPIC}" title="<!-- IF S_IS_LOCKED -->{L_TOPIC_LOCKED}<!-- ELSE -->{L_POST_REPLY}<!-- ENDIF -->"><span></span><!-- IF S_IS_LOCKED -->{L_TOPIC_LOCKED_SHORT}<!-- ELSE -->{L_POST_REPLY}<!-- ENDIF --></a></div>
+ <div class="<!-- IF S_IS_LOCKED -->locked-icon<!-- ELSE -->reply-icon<!-- ENDIF -->"><a href="{U_POST_REPLY_TOPIC}" title="<!-- IF S_IS_LOCKED -->{L_TOPIC_LOCKED}<!-- ELSE -->{L_POST_REPLY}<!-- ENDIF -->"><span></span><!-- IF S_IS_LOCKED -->{L_BUTTON_TOPIC_LOCKED}<!-- ELSE -->{L_BUTTON_POST_REPLY}<!-- ENDIF --></a></div>
<!-- ENDIF -->
</div>
+ <!-- INCLUDE viewtopic_topic_tools.html -->
+
<!-- IF S_DISPLAY_SEARCHBOX -->
<div class="search-box">
<form method="get" id="topic-search" action="{S_SEARCHBOX_ACTION}">
<fieldset>
- <input class="inputbox search tiny" type="text" name="keywords" id="search_keywords" size="20" value="{L_SEARCH_TOPIC}" onclick="if(this.value=='{LA_SEARCH_TOPIC}')this.value='';" onblur="if(this.value=='')this.value='{LA_SEARCH_TOPIC}';" />
+ <input class="inputbox search tiny" type="search" name="keywords" id="search_keywords" size="20" placeholder="{L_SEARCH_TOPIC}" />
<input class="button2" type="submit" value="{L_SEARCH}" />
{S_SEARCH_LOCAL_HIDDEN_FIELDS}
</fieldset>
@@ -45,191 +47,253 @@
</div>
<!-- ENDIF -->
- <!-- IF PAGINATION or TOTAL_POSTS -->
+ <!-- IF .pagination or TOTAL_POSTS -->
<div class="pagination">
- <!-- IF U_VIEW_UNREAD_POST and not S_IS_BOT --><a href="{U_VIEW_UNREAD_POST}">{L_VIEW_UNREAD_POST}</a> &bull; <!-- ENDIF -->{TOTAL_POSTS}
- <!-- IF PAGE_NUMBER --><!-- IF PAGINATION --> &bull; <a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{PAGE_NUMBER}</a> &bull; <span>{PAGINATION}</span><!-- ELSE --> &bull; {PAGE_NUMBER}<!-- ENDIF --><!-- ENDIF -->
+ <!-- IF U_VIEW_UNREAD_POST and not S_IS_BOT --><a href="{U_VIEW_UNREAD_POST}">{L_VIEW_UNREAD_POST}</a> &bull; <!-- ENDIF -->{TOTAL_POSTS} &bull;
+ <!-- IF .pagination -->
+ <!-- INCLUDE pagination.html -->
+ <!-- ELSE -->
+ {PAGE_NUMBER}
+ <!-- ENDIF -->
</div>
<!-- ENDIF -->
-
+ <div class="clear"></div>
</div>
-<div class="clear"></div>
<!-- IF S_HAS_POLL -->
- <form method="post" action="{S_POLL_ACTION}">
+ <form method="post" action="{S_POLL_ACTION}" data-ajax="vote_poll" class="topic_poll">
<div class="panel">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div class="inner">
<div class="content">
<h2>{POLL_QUESTION}</h2>
- <p class="author">{L_POLL_LENGTH}<!-- IF S_CAN_VOTE and L_POLL_LENGTH --><br /><!-- ENDIF --><!-- IF S_CAN_VOTE -->{L_MAX_VOTES}<!-- ENDIF --></p>
+ <p class="author">{L_POLL_LENGTH}<!-- IF S_CAN_VOTE and L_POLL_LENGTH --><br /><!-- ENDIF --><!-- IF S_CAN_VOTE --><span class="poll_max_votes">{L_MAX_VOTES}</span><!-- ENDIF --></p>
<fieldset class="polls">
<!-- BEGIN poll_option -->
- <dl class="<!-- IF poll_option.POLL_OPTION_VOTED -->voted<!-- ENDIF -->"<!-- IF poll_option.POLL_OPTION_VOTED --> title="{L_POLL_VOTED_OPTION}"<!-- ENDIF -->>
+ <dl class="<!-- IF poll_option.POLL_OPTION_VOTED -->voted<!-- ENDIF -->"<!-- IF poll_option.POLL_OPTION_VOTED --> title="{L_POLL_VOTED_OPTION}"<!-- ENDIF --> data-poll-option-id="{poll_option.POLL_OPTION_ID}">
<dt><!-- IF S_CAN_VOTE --><label for="vote_{poll_option.POLL_OPTION_ID}">{poll_option.POLL_OPTION_CAPTION}</label><!-- ELSE -->{poll_option.POLL_OPTION_CAPTION}<!-- ENDIF --></dt>
- <!-- IF S_CAN_VOTE --><dd style="width: auto;"><!-- IF S_IS_MULTI_CHOICE --><input type="checkbox" name="vote_id[]" id="vote_{poll_option.POLL_OPTION_ID}" value="{poll_option.POLL_OPTION_ID}"<!-- IF poll_option.POLL_OPTION_VOTED --> checked="checked"<!-- ENDIF --> /><!-- ELSE --><input type="radio" name="vote_id[]" id="vote_{poll_option.POLL_OPTION_ID}" value="{poll_option.POLL_OPTION_ID}"<!-- IF poll_option.POLL_OPTION_VOTED --> checked="checked"<!-- ENDIF --> /><!-- ENDIF --></dd><!-- ENDIF -->
- <!-- IF S_DISPLAY_RESULTS --><dd class="resultbar"><div class="<!-- IF poll_option.POLL_OPTION_PCT < 20 -->pollbar1<!-- ELSEIF poll_option.POLL_OPTION_PCT < 40 -->pollbar2<!-- ELSEIF poll_option.POLL_OPTION_PCT < 60 -->pollbar3<!-- ELSEIF poll_option.POLL_OPTION_PCT < 80 -->pollbar4<!-- ELSE -->pollbar5<!-- ENDIF -->" style="width:{poll_option.POLL_OPTION_PERCENT};">{poll_option.POLL_OPTION_RESULT}</div></dd>
- <dd><!-- IF poll_option.POLL_OPTION_RESULT == 0 -->{L_NO_VOTES}<!-- ELSE -->{poll_option.POLL_OPTION_PERCENT}<!-- ENDIF --></dd><!-- ENDIF -->
+ <!-- IF S_CAN_VOTE --><dd style="width: auto;" class="poll_option_select"><!-- IF S_IS_MULTI_CHOICE --><input type="checkbox" name="vote_id[]" id="vote_{poll_option.POLL_OPTION_ID}" value="{poll_option.POLL_OPTION_ID}"<!-- IF poll_option.POLL_OPTION_VOTED --> checked="checked"<!-- ENDIF --> /><!-- ELSE --><input type="radio" name="vote_id[]" id="vote_{poll_option.POLL_OPTION_ID}" value="{poll_option.POLL_OPTION_ID}"<!-- IF poll_option.POLL_OPTION_VOTED --> checked="checked"<!-- ENDIF --> /><!-- ENDIF --></dd><!-- ENDIF -->
+ <dd class="resultbar<!-- IF not S_DISPLAY_RESULTS --> hidden<!-- ENDIF -->"><div class="<!-- IF poll_option.POLL_OPTION_PCT < 20 -->pollbar1<!-- ELSEIF poll_option.POLL_OPTION_PCT < 40 -->pollbar2<!-- ELSEIF poll_option.POLL_OPTION_PCT < 60 -->pollbar3<!-- ELSEIF poll_option.POLL_OPTION_PCT < 80 -->pollbar4<!-- ELSE -->pollbar5<!-- ENDIF -->" style="width:{poll_option.POLL_OPTION_PERCENT};">{poll_option.POLL_OPTION_RESULT}</div></dd>
+ <dd class="poll_option_percent<!-- IF not S_DISPLAY_RESULTS --> hidden<!-- ENDIF -->"><!-- IF poll_option.POLL_OPTION_RESULT == 0 -->{L_NO_VOTES}<!-- ELSE -->{poll_option.POLL_OPTION_PERCENT}<!-- ENDIF --></dd>
</dl>
<!-- END poll_option -->
- <!-- IF S_DISPLAY_RESULTS -->
- <dl>
+ <dl class="poll_total_votes<!-- IF not S_DISPLAY_RESULTS --> hidden<!-- ENDIF -->">
<dt>&nbsp;</dt>
- <dd class="resultbar">{L_TOTAL_VOTES} : {TOTAL_VOTES}</dd>
+ <dd class="resultbar">{L_TOTAL_VOTES}{L_COLON} <span class="poll_total_vote_cnt">{TOTAL_VOTES}</span></dd>
</dl>
- <!-- ENDIF -->
<!-- IF S_CAN_VOTE -->
- <dl style="border-top: none;">
+ <dl style="border-top: none;" class="poll_vote">
<dt>&nbsp;</dt>
<dd class="resultbar"><input type="submit" name="update" value="{L_SUBMIT_VOTE}" class="button1" /></dd>
</dl>
<!-- ENDIF -->
<!-- IF not S_DISPLAY_RESULTS -->
- <dl style="border-top: none;">
+ <dl style="border-top: none;" class="poll_view_results">
<dt>&nbsp;</dt>
<dd class="resultbar"><a href="{U_VIEW_RESULTS}">{L_VIEW_RESULTS}</a></dd>
</dl>
<!-- ENDIF -->
</fieldset>
+ <div class="vote-submitted hidden">{L_VOTE_SUBMITTED}</div>
</div>
- <span class="corners-bottom"><span></span></span></div>
+ </div>
{S_FORM_TOKEN}
{S_HIDDEN_FIELDS}
</div>
-
</form>
<hr />
<!-- ENDIF -->
<!-- BEGIN postrow -->
+ <!-- EVENT viewtopic_body_postrow_post_before -->
<!-- IF postrow.S_FIRST_UNREAD --><a id="unread"></a><!-- ENDIF -->
- <div id="p{postrow.POST_ID}" class="post <!-- IF postrow.S_ROW_COUNT is odd -->bg1<!-- ELSE -->bg2<!-- ENDIF --><!-- IF postrow.S_UNREAD_POST --> unreadpost<!-- ENDIF --><!-- IF postrow.S_POST_REPORTED --> reported<!-- ENDIF --><!-- IF postrow.S_ONLINE and not postrow.S_IGNORE_POST --> online<!-- ENDIF -->">
- <div class="inner"><span class="corners-top"><span></span></span>
+ <div id="p{postrow.POST_ID}" class="post <!-- IF postrow.S_ROW_COUNT is odd -->bg1<!-- ELSE -->bg2<!-- ENDIF --><!-- IF postrow.S_UNREAD_POST --> unreadpost<!-- ENDIF --><!-- IF postrow.S_POST_REPORTED --> reported<!-- ENDIF --><!-- IF postrow.S_POST_DELETED --> deleted<!-- ENDIF --><!-- IF postrow.S_ONLINE and not postrow.S_POST_HIDDEN --> online<!-- ENDIF -->">
+ <div class="inner">
+
+ <dl class="postprofile" id="profile{postrow.POST_ID}"<!-- IF postrow.S_POST_HIDDEN --> style="display: none;"<!-- ENDIF -->>
+ <dt class="<!-- IF postrow.RANK_TITLE or postrow.RANK_IMG -->has-profile-rank<!-- ELSE -->no-profile-rank<!-- ENDIF -->">
+ <!-- IF postrow.POSTER_AVATAR -->
+ <!-- IF postrow.U_POST_AUTHOR --><a href="{postrow.U_POST_AUTHOR}" class="avatar">{postrow.POSTER_AVATAR}</a><!-- ELSE --><span class="avatar">{postrow.POSTER_AVATAR}</span><!-- ENDIF -->
+ <!-- ENDIF -->
+ <!-- IF not postrow.U_POST_AUTHOR --><strong>{postrow.POST_AUTHOR_FULL}</strong><!-- ELSE -->{postrow.POST_AUTHOR_FULL}<!-- ENDIF -->
+ </dt>
+
+ <!-- IF postrow.RANK_TITLE or postrow.RANK_IMG --><dd class="profile-rank">{postrow.RANK_TITLE}<!-- IF postrow.RANK_TITLE and postrow.RANK_IMG --><br /><!-- ENDIF -->{postrow.RANK_IMG}</dd><!-- ENDIF -->
+
+ <!-- IF postrow.POSTER_POSTS != '' --><dd><strong>{L_POSTS}{L_COLON}</strong> {postrow.POSTER_POSTS}</dd><!-- ENDIF -->
+ <!-- IF postrow.POSTER_JOINED --><dd><strong>{L_JOINED}{L_COLON}</strong> {postrow.POSTER_JOINED}</dd><!-- ENDIF -->
+
+ <!-- IF postrow.S_PROFILE_FIELD1 -->
+ <!-- Use a construct like this to include admin defined profile fields. Replace FIELD1 with the name of your field. -->
+ <dd><strong>{postrow.PROFILE_FIELD1_NAME}{L_COLON}</strong> {postrow.PROFILE_FIELD1_VALUE}</dd>
+ <!-- ENDIF -->
+
+ <!-- EVENT viewtopic_body_postrow_custom_fields_before -->
+ <!-- BEGIN custom_fields -->
+ <!-- IF not postrow.custom_fields.S_PROFILE_CONTACT -->
+ <dd><strong>{postrow.custom_fields.PROFILE_FIELD_NAME}{L_COLON}</strong> {postrow.custom_fields.PROFILE_FIELD_VALUE}</dd>
+ <!-- ENDIF -->
+ <!-- END custom_fields -->
+ <!-- EVENT viewtopic_body_postrow_custom_fields_after -->
+
+ <!-- IF not S_IS_BOT -->
+ <!-- IF postrow.U_PM or postrow.U_EMAIL or postrow.U_JABBER -->
+ <dd>
+ <ul class="profile-icons">
+ <!-- IF postrow.U_PM --><li class="pm-icon"><a href="{postrow.U_PM}" title="{L_PRIVATE_MESSAGE}"><span>{L_PRIVATE_MESSAGE}</span></a></li><!-- ENDIF -->
+ <!-- IF postrow.U_EMAIL --><li class="email-icon"><a href="{postrow.U_EMAIL}" title="{L_SEND_EMAIL_USER} {postrow.POST_AUTHOR}"><span>{L_SEND_EMAIL_USER} {postrow.POST_AUTHOR}</span></a></li><!-- ENDIF -->
+ <!-- IF postrow.U_JABBER --><li class="jabber-icon"><a href="{postrow.U_JABBER}" onclick="popup(this.href, 550, 320); return false;" title="{L_JABBER}"><span>{L_JABBER}</span></a></li><!-- ENDIF -->
+ <!-- BEGIN custom_fields -->
+ <!-- IF postrow.custom_fields.S_PROFILE_CONTACT -->
+ <li class="{postrow.custom_fields.PROFILE_FIELD_IDENT}-icon">
+ <a href="<!-- IF postrow.custom_fields.PROFILE_FIELD_CONTACT -->{postrow.custom_fields.PROFILE_FIELD_CONTACT}<!-- ELSE -->{postrow.U_POST_AUTHOR}<!-- ENDIF -->">
+ <span>{postrow.custom_fields.PROFILE_FIELD_NAME}</span>
+ </a>
+ </li>
+ <!-- ENDIF -->
+ <!-- END custom_fields -->
+ </ul>
+ </dd>
+ <!-- ENDIF -->
+ <!-- ENDIF -->
+
+ </dl>
<div class="postbody">
- <!-- IF postrow.S_IGNORE_POST -->
- <div class="ignore">{postrow.L_IGNORE_POST}</div>
- <!-- ELSE -->
+ <!-- IF postrow.S_POST_HIDDEN -->
+ <!-- IF postrow.S_POST_DELETED -->
+ <div class="ignore" id="post_hidden{postrow.POST_ID}">
+ {postrow.L_POST_DELETED_MESSAGE}<br />
+ {postrow.L_POST_DISPLAY}
+ </div>
+ <!-- ELSEIF postrow.S_IGNORE_POST -->
+ <div class="ignore" id="post_hidden{postrow.POST_ID}">
+ {postrow.L_IGNORE_POST}<br />
+ {postrow.L_POST_DISPLAY}
+ </div>
+ <!-- ENDIF -->
+ <!-- ENDIF -->
+ <div id="post_content{postrow.POST_ID}"<!-- IF postrow.S_POST_HIDDEN --> style="display: none;"<!-- ENDIF -->>
+
+ <h3 <!-- IF postrow.S_FIRST_ROW -->class="first"<!-- ENDIF -->><!-- IF postrow.POST_ICON_IMG --><img src="{T_ICONS_PATH}{postrow.POST_ICON_IMG}" width="{postrow.POST_ICON_IMG_WIDTH}" height="{postrow.POST_ICON_IMG_HEIGHT}" alt="" /> <!-- ENDIF --><a href="#p{postrow.POST_ID}">{postrow.POST_SUBJECT}</a></h3>
<!-- IF not S_IS_BOT -->
<!-- IF postrow.U_EDIT or postrow.U_DELETE or postrow.U_REPORT or postrow.U_WARN or postrow.U_INFO or postrow.U_QUOTE -->
<ul class="profile-icons">
+ <!-- EVENT viewtopic_body_post_buttons_before -->
<!-- IF postrow.U_EDIT --><li class="edit-icon"><a href="{postrow.U_EDIT}" title="{L_EDIT_POST}"><span>{L_EDIT_POST}</span></a></li><!-- ENDIF -->
<!-- IF postrow.U_DELETE --><li class="delete-icon"><a href="{postrow.U_DELETE}" title="{L_DELETE_POST}"><span>{L_DELETE_POST}</span></a></li><!-- ENDIF -->
<!-- IF postrow.U_REPORT --><li class="report-icon"><a href="{postrow.U_REPORT}" title="{L_REPORT_POST}"><span>{L_REPORT_POST}</span></a></li><!-- ENDIF -->
<!-- IF postrow.U_WARN --><li class="warn-icon"><a href="{postrow.U_WARN}" title="{L_WARN_USER}"><span>{L_WARN_USER}</span></a></li><!-- ENDIF -->
<!-- IF postrow.U_INFO --><li class="info-icon"><a href="{postrow.U_INFO}" title="{L_INFORMATION}"><span>{L_INFORMATION}</span></a></li><!-- ENDIF -->
<!-- IF postrow.U_QUOTE --><li class="quote-icon"><a href="{postrow.U_QUOTE}" title="{L_REPLY_WITH_QUOTE}"><span>{L_REPLY_WITH_QUOTE}</span></a></li><!-- ENDIF -->
+ <!-- EVENT viewtopic_body_post_buttons_after -->
</ul>
<!-- ENDIF -->
<!-- ENDIF -->
- <h3 <!-- IF postrow.S_FIRST_ROW -->class="first"<!-- ENDIF -->><!-- IF postrow.POST_ICON_IMG --><img src="{T_ICONS_PATH}{postrow.POST_ICON_IMG}" width="{postrow.POST_ICON_IMG_WIDTH}" height="{postrow.POST_ICON_IMG_HEIGHT}" alt="" /> <!-- ENDIF --><a href="#p{postrow.POST_ID}">{postrow.POST_SUBJECT}</a></h3>
- <p class="author"><!-- IF S_IS_BOT -->{postrow.MINI_POST_IMG}<!-- ELSE --><a href="{postrow.U_MINI_POST}">{postrow.MINI_POST_IMG}</a><!-- ENDIF -->{L_POST_BY_AUTHOR} <strong>{postrow.POST_AUTHOR_FULL}</strong> &raquo; {postrow.POST_DATE} </p>
+ <p class="author"><!-- IF S_IS_BOT -->{postrow.MINI_POST_IMG}<!-- ELSE --><a href="{postrow.U_MINI_POST}">{postrow.MINI_POST_IMG}</a><!-- ENDIF --><span class="responsive-hide">{L_POST_BY_AUTHOR} <strong>{postrow.POST_AUTHOR_FULL}</strong> &raquo; </span>{postrow.POST_DATE} </p>
- <!-- IF postrow.S_POST_UNAPPROVED or postrow.S_POST_REPORTED -->
- <p class="rules">
- <!-- IF postrow.S_POST_UNAPPROVED -->{UNAPPROVED_IMG} <a href="{postrow.U_MCP_APPROVE}"><strong>{L_POST_UNAPPROVED}</strong></a><br /><!-- ENDIF -->
- <!-- IF postrow.S_POST_REPORTED -->{REPORTED_IMG} <a href="{postrow.U_MCP_REPORT}"><strong>{L_POST_REPORTED}</strong></a><!-- ENDIF -->
+ <!-- IF postrow.S_POST_UNAPPROVED -->
+ <form method="post" class="mcp_approve" action="{postrow.U_APPROVE_ACTION}">
+ <p class="post-notice unapproved">
+ <strong>{L_POST_UNAPPROVED}</strong>
+ <input class="button2" type="submit" value="{L_DISAPPROVE}" name="action[disapprove]" />
+ <input class="button1" type="submit" value="{L_APPROVE}" name="action[approve]" />
+ <input type="hidden" name="post_id_list[]" value="{postrow.POST_ID}" />
+ {S_FORM_TOKEN}
+ </p>
+ </form>
+ <!-- ELSEIF postrow.S_POST_DELETED -->
+ <form method="post" class="mcp_approve" action="{postrow.U_APPROVE_ACTION}">
+ <p class="post-notice deleted">
+ <strong>{L_POST_DELETED}</strong>
+ <input class="button2" type="submit" value="{L_DELETE}" name="action[disapprove]" />
+ <input class="button1" type="submit" value="{L_RESTORE}" name="action[restore]" />
+ <input type="hidden" name="post_id_list[]" value="{postrow.POST_ID}" />
+ {S_FORM_TOKEN}
</p>
+ </form>
+ <!-- ENDIF -->
+
+ <!-- IF postrow.S_POST_REPORTED -->
+ <p class="post-notice reported">
+ <a href="{postrow.U_MCP_REPORT}"><strong>{L_POST_REPORTED}</strong></a>
+ </p>
<!-- ENDIF -->
<div class="content">{postrow.MESSAGE}</div>
<!-- IF postrow.S_HAS_ATTACHMENTS -->
<dl class="attachbox">
- <dt>{L_ATTACHMENTS}</dt>
+ <dt>
+ {L_ATTACHMENTS}
+ <!-- IF postrow.S_MULTIPLE_ATTACHMENTS -->
+ <div class="dl_links">
+ <strong>{L_DOWNLOAD_ALL}{L_COLON}</strong>
+ <ul>
+ <!-- BEGIN dl_method -->
+ <li>[ <a href="{postrow.dl_method.LINK}">{postrow.dl_method.TYPE}</a> ]</li>
+ <!-- END dl_method -->
+ </ul>
+ </div>
+ <!-- ENDIF -->
+ </dt>
<!-- BEGIN attachment -->
<dd>{postrow.attachment.DISPLAY_ATTACHMENT}</dd>
<!-- END attachment -->
</dl>
<!-- ENDIF -->
+ <!-- EVENT viewtopic_body_postrow_post_notices_before -->
<!-- IF postrow.S_DISPLAY_NOTICE --><div class="rules">{L_DOWNLOAD_NOTICE}</div><!-- ENDIF -->
- <!-- IF postrow.EDITED_MESSAGE or postrow.EDIT_REASON -->
- <div class="notice">{postrow.EDITED_MESSAGE}
- <!-- IF postrow.EDIT_REASON --><br /><strong>{L_REASON}:</strong> <em>{postrow.EDIT_REASON}</em><!-- ENDIF -->
+ <!-- IF postrow.DELETED_MESSAGE or postrow.DELETE_REASON -->
+ <div class="notice post_deleted_msg">
+ {postrow.DELETED_MESSAGE}
+ <!-- IF postrow.DELETE_REASON --><br /><strong>{L_REASON}{L_COLON}</strong> <em>{postrow.DELETE_REASON}</em><!-- ENDIF -->
+ </div>
+ <!-- ELSEIF postrow.EDITED_MESSAGE or postrow.EDIT_REASON -->
+ <div class="notice">
+ {postrow.EDITED_MESSAGE}
+ <!-- IF postrow.EDIT_REASON --><br /><strong>{L_REASON}{L_COLON}</strong> <em>{postrow.EDIT_REASON}</em><!-- ENDIF -->
</div>
<!-- ENDIF -->
<!-- IF postrow.BUMPED_MESSAGE --><div class="notice"><br /><br />{postrow.BUMPED_MESSAGE}</div><!-- ENDIF -->
+ <!-- EVENT viewtopic_body_postrow_post_notices_after -->
<!-- IF postrow.SIGNATURE --><div id="sig{postrow.POST_ID}" class="signature">{postrow.SIGNATURE}</div><!-- ENDIF -->
- <!-- ENDIF -->
+ </div>
</div>
- <!-- IF not postrow.S_IGNORE_POST -->
- <dl class="postprofile" id="profile{postrow.POST_ID}">
- <dt>
- <!-- IF postrow.POSTER_AVATAR -->
- <!-- IF postrow.U_POST_AUTHOR --><a href="{postrow.U_POST_AUTHOR}">{postrow.POSTER_AVATAR}</a><!-- ELSE -->{postrow.POSTER_AVATAR}<!-- ENDIF --><br />
- <!-- ENDIF -->
- <!-- IF not postrow.U_POST_AUTHOR --><strong>{postrow.POST_AUTHOR_FULL}</strong><!-- ELSE -->{postrow.POST_AUTHOR_FULL}<!-- ENDIF -->
- </dt>
-
- <!-- IF postrow.RANK_TITLE or postrow.RANK_IMG --><dd>{postrow.RANK_TITLE}<!-- IF postrow.RANK_TITLE and postrow.RANK_IMG --><br /><!-- ENDIF -->{postrow.RANK_IMG}</dd><!-- ENDIF -->
-
- <dd>&nbsp;</dd>
-
- <!-- IF postrow.POSTER_POSTS != '' --><dd><strong>{L_POSTS}:</strong> {postrow.POSTER_POSTS}</dd><!-- ENDIF -->
- <!-- IF postrow.POSTER_JOINED --><dd><strong>{L_JOINED}:</strong> {postrow.POSTER_JOINED}</dd><!-- ENDIF -->
- <!-- IF postrow.POSTER_FROM --><dd><strong>{L_LOCATION}:</strong> {postrow.POSTER_FROM}</dd><!-- ENDIF -->
-
- <!-- IF postrow.S_PROFILE_FIELD1 -->
- <!-- Use a construct like this to include admin defined profile fields. Replace FIELD1 with the name of your field. -->
- <dd><strong>{postrow.PROFILE_FIELD1_NAME}:</strong> {postrow.PROFILE_FIELD1_VALUE}</dd>
- <!-- ENDIF -->
-
- <!-- BEGIN custom_fields -->
- <dd><strong>{postrow.custom_fields.PROFILE_FIELD_NAME}:</strong> {postrow.custom_fields.PROFILE_FIELD_VALUE}</dd>
- <!-- END custom_fields -->
-
- <!-- IF not S_IS_BOT -->
- <!-- IF postrow.U_PM or postrow.U_EMAIL or postrow.U_WWW or postrow.U_MSN or postrow.U_ICQ or postrow.U_YIM or postrow.U_AIM or postrow.U_JABBER -->
- <dd>
- <ul class="profile-icons">
- <!-- IF postrow.U_PM --><li class="pm-icon"><a href="{postrow.U_PM}" title="{L_PRIVATE_MESSAGE}"><span>{L_PRIVATE_MESSAGE}</span></a></li><!-- ENDIF -->
- <!-- IF postrow.U_EMAIL --><li class="email-icon"><a href="{postrow.U_EMAIL}" title="{L_SEND_EMAIL_USER} {postrow.POST_AUTHOR}"><span>{L_SEND_EMAIL_USER} {postrow.POST_AUTHOR}</span></a></li><!-- ENDIF -->
- <!-- IF postrow.U_WWW --><li class="web-icon"><a href="{postrow.U_WWW}" title="{L_VISIT_WEBSITE}: {postrow.U_WWW}"><span>{L_WEBSITE}</span></a></li><!-- ENDIF -->
- <!-- IF postrow.U_MSN --><li class="msnm-icon"><a href="{postrow.U_MSN}" onclick="popup(this.href, 550, 320); return false;" title="{L_MSNM}"><span>{L_MSNM}</span></a></li><!-- ENDIF -->
- <!-- IF postrow.U_ICQ --><li class="icq-icon"><a href="{postrow.U_ICQ}" onclick="popup(this.href, 550, 320); return false;" title="{L_ICQ}"><span>{L_ICQ}</span></a></li><!-- ENDIF -->
- <!-- IF postrow.U_YIM --><li class="yahoo-icon"><a href="{postrow.U_YIM}" onclick="popup(this.href, 780, 550); return false;" title="{L_YIM}"><span>{L_YIM}</span></a></li><!-- ENDIF -->
- <!-- IF postrow.U_AIM --><li class="aim-icon"><a href="{postrow.U_AIM}" onclick="popup(this.href, 550, 320); return false;" title="{L_AIM}"><span>{L_AIM}</span></a></li><!-- ENDIF -->
- <!-- IF postrow.U_JABBER --><li class="jabber-icon"><a href="{postrow.U_JABBER}" onclick="popup(this.href, 550, 320); return false;" title="{L_JABBER}"><span>{L_JABBER}</span></a></li><!-- ENDIF -->
- </ul>
- </dd>
- <!-- ENDIF -->
- <!-- ENDIF -->
-
- </dl>
- <!-- ENDIF -->
-
<div class="back2top"><a href="#wrap" class="top" title="{L_BACK_TO_TOP}">{L_BACK_TO_TOP}</a></div>
- <span class="corners-bottom"><span></span></span></div>
+ </div>
</div>
<hr class="divider" />
+ <!-- EVENT viewtopic_body_postrow_post_after -->
<!-- END postrow -->
<!-- IF S_QUICK_REPLY -->
<!-- INCLUDE quickreply_editor.html -->
<!-- ENDIF -->
-<!-- IF S_NUM_POSTS > 1 or PREVIOUS_PAGE -->
+<!-- IF S_NUM_POSTS > 1 or U_PREVIOUS_PAGE or U_NEXT_PAGE -->
<form id="viewtopic" method="post" action="{S_TOPIC_ACTION}">
<fieldset class="display-options" style="margin-top: 0; ">
- <!-- IF PREVIOUS_PAGE --><a href="{PREVIOUS_PAGE}" class="left-box {S_CONTENT_FLOW_BEGIN}">{L_PREVIOUS}</a><!-- ENDIF -->
- <!-- IF NEXT_PAGE --><a href="{NEXT_PAGE}" class="right-box {S_CONTENT_FLOW_END}">{L_NEXT}</a><!-- ENDIF -->
+ <!-- IF U_PREVIOUS_PAGE --><a href="{U_PREVIOUS_PAGE}" class="left-box arrow-{S_CONTENT_FLOW_BEGIN}">{L_PREVIOUS}</a><!-- ENDIF -->
+ <!-- IF U_NEXT_PAGE --><a href="{U_NEXT_PAGE}" class="right-box arrow-{S_CONTENT_FLOW_END}">{L_NEXT}</a><!-- ENDIF -->
<!-- IF not S_IS_BOT -->
- <label>{L_DISPLAY_POSTS}: {S_SELECT_SORT_DAYS}</label>
- <label>{L_SORT_BY} {S_SELECT_SORT_KEY}</label> <label>{S_SELECT_SORT_DIR} <input type="submit" name="sort" value="{L_GO}" class="button2" /></label>
+ <label>{L_DISPLAY_POSTS}{L_COLON} {S_SELECT_SORT_DAYS}</label>
+ <label>{L_SORT_BY} {S_SELECT_SORT_KEY}</label> <label>{S_SELECT_SORT_DIR}</label>
+ <input type="submit" name="sort" value="{L_GO}" class="button2" />
<!-- ENDIF -->
</fieldset>
@@ -237,27 +301,42 @@
<hr />
<!-- ENDIF -->
+<!-- EVENT viewtopic_body_topic_actions_before -->
<div class="topic-actions">
<div class="buttons">
<!-- IF not S_IS_BOT and S_DISPLAY_REPLY_INFO -->
- <div class="<!-- IF S_IS_LOCKED -->locked-icon<!-- ELSE -->reply-icon<!-- ENDIF -->"><a href="{U_POST_REPLY_TOPIC}" title="<!-- IF S_IS_LOCKED -->{L_TOPIC_LOCKED}<!-- ELSE -->{L_POST_REPLY}<!-- ENDIF -->"><span></span><!-- IF S_IS_LOCKED -->{L_TOPIC_LOCKED_SHORT}<!-- ELSE -->{L_POST_REPLY}<!-- ENDIF --></a></div>
+ <div class="<!-- IF S_IS_LOCKED -->locked-icon<!-- ELSE -->reply-icon<!-- ENDIF -->"><a href="{U_POST_REPLY_TOPIC}" title="<!-- IF S_IS_LOCKED -->{L_TOPIC_LOCKED}<!-- ELSE -->{L_POST_REPLY}<!-- ENDIF -->"><span></span><!-- IF S_IS_LOCKED -->{L_BUTTON_TOPIC_LOCKED}<!-- ELSE -->{L_BUTTON_POST_REPLY}<!-- ENDIF --></a></div>
<!-- ENDIF -->
</div>
- <!-- IF PAGINATION or TOTAL_POSTS -->
+ <!-- INCLUDE viewtopic_topic_tools.html -->
+
+ <!-- IF .pagination or TOTAL_POSTS -->
<div class="pagination">
- {TOTAL_POSTS}
- <!-- IF PAGE_NUMBER --><!-- IF PAGINATION --> &bull; <a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{PAGE_NUMBER}</a> &bull; <span>{PAGINATION}</span><!-- ELSE --> &bull; {PAGE_NUMBER}<!-- ENDIF --><!-- ENDIF -->
+ {TOTAL_POSTS} &bull;
+ <!-- IF .pagination -->
+ <!-- INCLUDE pagination.html -->
+ <!-- ELSE -->
+ {PAGE_NUMBER}
+ <!-- ENDIF -->
</div>
<!-- ENDIF -->
+ <div class="clear"></div>
</div>
+<!-- EVENT viewtopic_body_footer_before -->
<!-- INCLUDE jumpbox.html -->
-<!-- IF S_TOPIC_MOD -->
- <form method="post" action="{S_MOD_ACTION}">
+<!-- IF .quickmod -->
+ <form method="post" action="{S_MOD_ACTION}" id="quickmodform">
<fieldset class="quickmod">
- <label for="quick-mod-select">{L_QUICK_MOD}:</label> {S_TOPIC_MOD} <input type="submit" value="{L_GO}" class="button2" />
+ <label for="quick-mod-select">{L_QUICK_MOD}{L_COLON}</label>
+ <select name="action" id="quick-mod-select">
+ <!-- BEGIN quickmod -->
+ <option value="{quickmod.VALUE}">{quickmod.TITLE}</option>
+ <!-- END quickmod -->
+ </select>
+ <input type="submit" value="{L_GO}" class="button2" />
{S_FORM_TOKEN}
</fieldset>
</form>
@@ -268,4 +347,4 @@
<p>{LOGGED_IN_USER_LIST}</p>
<!-- ENDIF -->
-<!-- INCLUDE overall_footer.html --> \ No newline at end of file
+<!-- INCLUDE overall_footer.html -->
diff --git a/phpBB/styles/prosilver/template/viewtopic_print.html b/phpBB/styles/prosilver/template/viewtopic_print.html
index 168305a6a4..6c4dcfadf1 100644
--- a/phpBB/styles/prosilver/template/viewtopic_print.html
+++ b/phpBB/styles/prosilver/template/viewtopic_print.html
@@ -1,23 +1,17 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}" xml:lang="{S_USER_LANG}">
+<!DOCTYPE html>
+<html dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}">
<head>
-
-<meta http-equiv="content-type" content="text/html; charset={S_CONTENT_ENCODING}" />
-<meta http-equiv="content-style-type" content="text/css" />
-<meta http-equiv="content-language" content="{S_USER_LANG}" />
-<meta http-equiv="imagetoolbar" content="no" />
-<meta name="resource-type" content="document" />
-<meta name="distribution" content="global" />
+<meta charset="utf-8">
<meta name="robots" content="noindex" />
{META}
<title>{SITENAME} &bull; {PAGE_TITLE}</title>
<link href="{T_THEME_PATH}/print.css" rel="stylesheet" type="text/css" />
+<!-- EVENT viewtopic_print_head_append -->
</head>
-
<body id="phpbb">
<div id="wrap">
- <a id="top" name="top" accesskey="t"></a>
+ <a id="top" accesskey="t"></a>
<div id="page-header">
<h1>{SITENAME}</h1>
@@ -32,7 +26,7 @@
<!-- BEGIN postrow -->
<div class="post">
<h3>{postrow.POST_SUBJECT}</h3>
- <div class="date">{postrow.MINI_POST_IMG}{L_POSTED}: <strong>{postrow.POST_DATE}</strong></div>
+ <div class="date">{L_POSTED}{L_COLON} <strong>{postrow.POST_DATE}</strong></div>
<div class="author">{L_POST_BY_AUTHOR} <strong>{postrow.POST_AUTHOR}</strong></div>
<div class="content">{postrow.MESSAGE}</div>
</div>
@@ -47,4 +41,4 @@
</div>
</body>
-</html> \ No newline at end of file
+</html>
diff --git a/phpBB/styles/prosilver/template/viewtopic_topic_tools.html b/phpBB/styles/prosilver/template/viewtopic_topic_tools.html
new file mode 100644
index 0000000000..ec17185bae
--- /dev/null
+++ b/phpBB/styles/prosilver/template/viewtopic_topic_tools.html
@@ -0,0 +1,39 @@
+<!-- IF not S_IS_BOT and (U_WATCH_TOPIC or U_BOOKMARK_TOPIC or U_BUMP_TOPIC or S_HAS_ATTACHMENTS or S_DISPLAY_TOPIC_TOOLS) -->
+ <div class="dropdown-container dropdown-button-control topic-tools">
+ <span title="{L_TOPIC_TOOLS}" class="dropdown-trigger dropdown-select dropdown-select-icon tools-icon"><span></span></span>
+ <div class="dropdown hidden">
+ <div class="pointer"><div class="pointer-inner"></div></div>
+ <ul class="dropdown-contents">
+ <!-- EVENT viewtopic_topic_tools_before -->
+ <!-- IF U_WATCH_TOPIC -->
+ <li class="small-icon icon-<!-- IF S_WATCHING_TOPIC -->unsubscribe<!-- ELSE -->subscribe<!-- ENDIF -->">
+ <a href="{U_WATCH_TOPIC}" title="{S_WATCH_TOPIC_TITLE}" data-ajax="toggle_link" data-toggle-class="small-icon icon-<!-- IF not S_WATCHING_TOPIC -->unsubscribe<!-- ELSE -->subscribe<!-- ENDIF -->" data-toggle-text="{S_WATCH_TOPIC_TOGGLE}" data-toggle-url="{U_WATCH_TOPIC_TOGGLE}">
+ {S_WATCH_TOPIC_TITLE}
+ </a>
+ </li>
+ <!-- ENDIF -->
+ <!-- IF U_BOOKMARK_TOPIC -->
+ <li class="small-icon icon-bookmark">
+ <a href="{U_BOOKMARK_TOPIC}" title="{L_BOOKMARK_TOPIC}" data-ajax="alt_text" data-alt-text="{S_BOOKMARK_TOGGLE}">
+ {S_BOOKMARK_TOPIC}
+ </a>
+ </li>
+ <!-- ENDIF -->
+ <!-- IF U_BUMP_TOPIC --><li class="small-icon icon-bump"><a href="{U_BUMP_TOPIC}" title="{L_BUMP_TOPIC}" data-ajax="true">{L_BUMP_TOPIC}</a></li><!-- ENDIF -->
+ <!-- IF S_HAS_ATTACHMENTS -->
+ <li class="small-icon icon-download">
+ <a class="dropdown-toggle-submenu" href="{U_DOWNLOAD_ALL_ATTACHMENTS}" title="{L_DOWNLOAD_ALL_ATTACHMENTS}">{L_DOWNLOAD_ALL_ATTACHMENTS}</a>
+ <ul class="dropdown-submenu hidden">
+ <li>
+ <!-- BEGIN dl_method -->
+ <a href="{dl_method.LINK}">{dl_method.TYPE}</a><!-- IF not dl_method.S_LAST_ROW --> &bull; <!-- ENDIF -->
+ <!-- END dl_method -->
+ </li>
+ </ul>
+ </li>
+ <!-- ENDIF -->
+ <!-- EVENT viewtopic_topic_tools_after -->
+ </ul>
+ </div>
+ </div>
+<!-- ENDIF -->
diff --git a/phpBB/styles/prosilver/theme/bidi.css b/phpBB/styles/prosilver/theme/bidi.css
index c258ed1245..850726db89 100644
--- a/phpBB/styles/prosilver/theme/bidi.css
+++ b/phpBB/styles/prosilver/theme/bidi.css
@@ -90,6 +90,28 @@
text-align: left;
}
+/* Bulletin icons for list items
+----------------------------------------*/
+.rtl ul.linklist.bulletin li:before {
+ padding-left: 4px;
+ padding-right: 0;
+}
+
+/* Dropdown menu
+---------------------------------------- */
+.rtl .dropdown-container.topic-tools {
+ float: right;
+}
+
+.rtl .dropdown li {
+ text-align: right;
+}
+
+.rtl .dropdown li li {
+ padding-left: 0;
+ padding-right: 10px;
+}
+
/* Table styles
----------------------------------------*/
.rtl table.table1 thead th {
@@ -183,8 +205,9 @@
/* Pagination in viewforum for multipage topics */
.rtl .row .pagination {
+ background-position: 100% 50%;
float: left;
- padding: 1px 0 1px 15px;
+ padding: 1px 15px 1px 0;
}
.rtl .pagination span {
@@ -231,6 +254,11 @@
unicode-bidi: embed;
}
+ul.linklist li.small-icon > a, ul.linklist li.breadcrumbs span:first-child > a {
+ padding-left: 0;
+ padding-right: 19px;
+}
+
.rtl a.top {
float: left;
}
@@ -258,18 +286,45 @@
/**
* content.css
*/
-.rtl ul.topiclist dfn {
- /* Labels for post/view counts */
- position: relative;
- width: 1px;
- height: 1px;
- overflow: hidden;
- display: block;
- left: 0;
+.rtl ul.topiclist dt, .rtl li.header dt {
+ float: right;
+ margin-right: 0;
+ margin-left: -410px;
}
-.rtl ul.topiclist dt {
- float: right;
+.rtl ul.topiclist.missing-column dt {
+ margin-right: 0;
+ margin-left: -330px;
+}
+
+.rtl ul.topiclist.two-long-columns dt {
+ margin-right: 0;
+ margin-left: -250px;
+}
+
+.rtl ul.topiclist.two-columns dt {
+ margin-right: 0;
+ margin-left: -80px;
+}
+
+.rtl ul.topiclist dt .list-inner {
+ margin-right: 0;
+ margin-left: 410px;
+}
+
+.rtl ul.topiclist.missing-column dt .list-inner {
+ margin-right: 0;
+ margin-left: 330px;
+}
+
+.rtl ul.topiclist.two-long-columns dt .list-inner {
+ margin-right: 0;
+ margin-left: 250px;
+}
+
+.rtl ul.topiclist.two-columns dt .list-inner {
+ margin-right: 0;
+ margin-left: 80px;
}
.rtl ul.topiclist dl {
@@ -300,47 +355,62 @@
}
.rtl li.header dd {
- margin-left: 0;
- margin-right: 1px;
+ padding-left: 0;
+ padding-right: 1px;
}
.rtl dl.icon {
background-position: 99.5% 50%;
}
-.rtl li.header dl.icon dt {
+.rtl li.header dl.icon dt .list-inner {
/* Tweak for headers alignment when folder icon used */
padding-right: 0;
padding-left: 50px;
}
.rtl dl.icon dt {
- padding-left: 0;
- padding-right: 45px; /* Space for folder icon */
background-position: 99.5% 95%; /* Position of topic icon */
}
-.rtl dd.lastpost span, .rtl ul.topiclist dd.searchby span, .rtl ul.topiclist dd.info span, .rtl ul.topiclist dd.time span, .rtl dd.redirect span, .rtl dd.moderation span {
+.rtl dl.icon dt .list-inner {
padding-left: 0;
- padding-right: 5px;
+ padding-right: 45px; /* Space for folder icon */
}
-.rtl dd.mark {
- float: left !important;
+.rtl dl.icon dt { /* fix for topic row icon links */
+ position: relative;
}
-.rtl ul.topiclist dd.searchextra {
+.rtl dl a.icon-link { /* topic row icon links */
+ display: inline-block;
+ left: auto;
+ right: 0;
margin-left: 0;
- margin-right: 5px;
- border-right: none;
+ margin-right: 2px;
+}
+
+.rtl dd.lastpost span, .rtl ul.topiclist dd.info span, .rtl ul.topiclist dd.time span, .rtl dd.redirect span, .rtl dd.moderation span {
+ padding-left: 0;
+ padding-right: 5px;
}
/* Post body styles
----------------------------------------*/
-.rtl .postbody {
+.rtl .postbody, .rtl .postbody h3 {
float: right;
}
+.rtl p.post-notice {
+ padding-left: 5px;
+ padding-right: 26px;
+}
+
+.rtl p.post-notice:before {
+ left: auto;
+ right: 0;
+}
+
/* Topic review panel
----------------------------------------*/
.rtl #topicreview {
@@ -355,11 +425,6 @@
margin-left: 0;
}
-/* Post author */
-.rtl p.author {
- margin: 0 0 0.6em 15em;
-}
-
.rtl .signature {
clear: right;
}
@@ -392,7 +457,7 @@
margin-left: 0;
}
-.rtl blockquote dl.codebox {
+.rtl blockquote .codebox {
margin-right: 0;
}
@@ -447,9 +512,7 @@
/* Poster profile block
----------------------------------------*/
.rtl .postprofile {
- border-left: none;
- border-right-width: 1px;
- border-right-style: solid;
+ border-width: 0 1px 0 0;
float: left;
/* text-align: right; */
}
@@ -491,16 +554,19 @@
/* Sub-header (navigation bar)
--------------------------------------------- */
-.rtl a.print, .rtl a.sendemail, .rtl a.fontsize {
+.rtl a.print, .rtl a.sendemail {
text-align: right;
}
/* Icon images
---------------------------------------- */
-.rtl .sitehome, .rtl .icon-faq, .rtl .icon-members, .rtl .icon-home, .rtl .icon-ucp, .rtl .icon-register, .rtl .icon-logout,
-.rtl .icon-bookmark, .rtl .icon-bump, .rtl .icon-subscribe, .rtl .icon-unsubscribe, .rtl .icon-pages, .rtl .icon-search {
+.rtl .small-icon {
background-position: 100% 50%;
- padding: 1px 17px 0 0;
+ padding: 0 19px 0 0;
+}
+
+.rtl ul.linklist li.small-icon {
+ padding-right: 0;
}
/* Poster profile icons
@@ -547,6 +613,10 @@
margin-left: 0;
}
+.tabs-container h2 {
+ float: right;
+}
+
/* CP tabbed menu
----------------------------------------*/
.rtl #tabs {
@@ -564,7 +634,12 @@
/* Mini tabbed menu used in MCP
----------------------------------------*/
.rtl #minitabs {
- margin: -20px 0 0 7px;
+ margin-right: 0;
+ margin-left: 7px;
+}
+
+.rtl .tabs-container #minitabs {
+ float: left;
}
.rtl #minitabs li {
@@ -659,7 +734,7 @@
}
.rtl fieldset.fields1 dd {
- margin-right: 10em;
+ margin-right: 15em;
margin-left: 0;
border-right-width: 0;
border-left-width: 1px;
@@ -768,3 +843,33 @@
.rtl #wrap, .rtl .headerbar, .rtl #site-description, .rtl .navbar {
position: relative;
}
+
+/* Former imageset */
+.rtl .imageset.site_logo {
+ padding-right: 139px;
+ padding-left: 0;
+}
+.rtl .imageset.forum_link, .rtl .imageset.forum_read, .rtl .imageset.forum_read_locked, .rtl .imageset.forum_read_subforum, .rtl .imageset.forum_unread, .rtl .imageset.forum_unread_locked, .rtl .imageset.forum_unread_subforum, .rtl .imageset.topic_moved, .rtl .imageset.topic_read, .rtl .imageset.topic_read_mine, .rtl .imageset.topic_read_hot, .rtl .imageset.topic_read_hot_mine, .rtl .imageset.topic_read_locked, .rtl .imageset.topic_read_locked_mine, .rtl .imageset.topic_unread, .rtl .imageset.topic_unread_mine, .rtl .imageset.topic_unread_hot, .rtl .imageset.topic_unread_hot_mine, .rtl .imageset.topic_unread_locked, .rtl .imageset.topic_unread_locked_mine, .rtl .imageset.sticky_read, .rtl .imageset.sticky_read_mine, .rtl .imageset.sticky_read_locked, .rtl .imageset.sticky_read_locked_mine, .rtl .imageset.sticky_unread, .rtl .imageset.sticky_unread_mine, .rtl .imageset.sticky_unread_locked, .rtl .imageset.sticky_unread_locked_mine, .rtl .imageset.announce_read, .rtl .imageset.announce_read_mine, .rtl .imageset.announce_read_locked, .rtl .imageset.announce_read_locked_mine, .rtl .imageset.announce_unread, .rtl .imageset.announce_unread_mine, .rtl .imageset.announce_unread_locked, .rtl .imageset.announce_unread_locked_mine, .rtl .imageset.global_read, .rtl .imageset.global_read_mine, .rtl .imageset.global_read_locked, .rtl .imageset.global_read_locked_mine, .rtl .imageset.global_unread, .rtl .imageset.global_unread_mine, .rtl .imageset.global_unread_locked, .rtl .imageset.global_unread_locked_mine, .rtl .imageset.pm_read, .rtl .imageset.pm_unread {
+ padding-right: 27px;
+ padding-left: 0;
+}
+.rtl .imageset.subforum_read, .rtl .imageset.subforum_unread, .rtl .imageset.icon_post_target, .rtl .imageset.icon_post_target_unread, .rtl .imageset.icon_topic_latest, .rtl .imageset.icon_topic_newest {
+ padding-right: 11px;
+ padding-left: 0;
+}
+.rtl .imageset.icon_back_top {
+ padding-right: 11px;
+ padding-left: 0;
+}
+.rtl .imageset.icon_contact_aim, .rtl .imageset.phpbb_aol-icon, .rtl .imageset.icon_contact_email, .rtl .imageset.icon_contact_icq, .rtl .imageset.phpbb_icq-icon, .rtl .imageset.icon_contact_jabber, .rtl .imageset.icon_contact_msnm, .rtl .imageset.phpbb_wlm-icon, .rtl .imageset.icon_contact_www, .rtl .imageset.phpbb_website-icon, .rtl .imageset.icon_contact_yahoo, .rtl .imageset.phpbb_yahoo-icon, .rtl .imageset.icon_post_delete, .rtl .imageset.icon_post_info, .rtl .imageset.icon_post_report, .rtl .imageset.icon_user_warn {
+ padding-right: 20px;
+ padding-left: 0;
+}
+.rtl .imageset.icon_topic_attach {
+ padding-right: 7px;
+ padding-left: 0;
+}
+.rtl .imageset.icon_topic_reported, .rtl .imageset.icon_topic_unapproved {
+ padding-right: 16px;
+ padding-left: 0;
+}
diff --git a/phpBB/styles/prosilver/theme/buttons.css b/phpBB/styles/prosilver/theme/buttons.css
index a9ded9cf98..93c325e416 100644
--- a/phpBB/styles/prosilver/theme/buttons.css
+++ b/phpBB/styles/prosilver/theme/buttons.css
@@ -11,47 +11,99 @@
}
/* Rollover state */
-.buttons div {
+.buttons div, .dropdown-select {
float: left;
margin: 0 5px 0 0;
- background-position: 0 100%;
}
/* Rolloff state */
-.buttons div a {
- display: block;
- width: 100%;
- height: 100%;
- background-position: 0 0;
+.buttons div a, .dropdown-select {
+ display: inline-block;
+ line-height: 17.5px;
+ height: 18px;
+ font-size: 13px;
+ white-space: nowrap;
+ border: 1px solid transparent;
+ border-radius: 4px;
+ background: transparent none 0 0 repeat-x;
+ padding: 2px 22px 2px 8px;
+ font-family: "Open Sans", "Droid Sans", Verdana, Arial, Helvetica;
+ font-weight: 600;
position: relative;
- overflow: hidden;
+ text-decoration: none !important;
+ outline-style: none !important;
+ vertical-align: bottom;
+ *padding-right: 8px;
}
-/* Hide <a> text and hide off-state image when rolling over (prevents flicker in IE) */
-/*.buttons div span { display: none; }*/
-/*.buttons div a:hover { background-image: none; }*/
-.buttons div span { position: absolute; width: 100%; height: 100%; cursor: pointer;}
-.buttons div a:hover span { background-position: 0 100%; }
+.buttons div span { display: none; }
+
+.buttons div a:after, .dropdown-select:after {
+ content: '';
+ display: block;
+ position: absolute;
+ top: 50%;
+ right: 6px;
+ width: 12px;
+ height: 12px;
+ margin-top: -6px;
+ background: transparent 0 0 no-repeat;
+}
+
+.buttons div a:hover:after {
+ background-position: 0 -20px;
+}
+
+.dropdown-select {
+ cursor: pointer;
+ font-family: inherit;
+ font-size: 1em;
+ font-weight: normal;
+}
+
+.dropdown-select:after {
+ background-position: -103px 10px;
+ border-left: 1px solid;
+ margin-top: 0;
+ top: 0;
+ right: 0;
+ height: 21px;
+ width: 15px;
+}
+
+.dropdown-visible .dropdown-select:after, .nojs .dropdown-container:hover .dropdown-select:after {
+ background-position: -103px -10px;
+}
+
+.dropdown-select-icon:before {
+ content: '';
+ display: block;
+ float: left;
+ margin-right: 4px;
+ margin-top: 2px;
+}
/* Big button images */
-.reply-icon span { background: transparent none 0 0 no-repeat; }
-.post-icon span { background: transparent none 0 0 no-repeat; }
-.locked-icon span { background: transparent none 0 0 no-repeat; }
-.pmreply-icon span { background: none 0 0 no-repeat; }
-.newpm-icon span { background: none 0 0 no-repeat; }
-.forwardpm-icon span { background: none 0 0 no-repeat; }
-
-/* Set big button dimensions */
-.buttons div.reply-icon { width: {IMG_BUTTON_TOPIC_REPLY_WIDTH}px; height: {IMG_BUTTON_TOPIC_REPLY_HEIGHT}px; }
-.buttons div.post-icon { width: {IMG_BUTTON_TOPIC_NEW_WIDTH}px; height: {IMG_BUTTON_TOPIC_NEW_HEIGHT}px; }
-.buttons div.locked-icon { width: {IMG_BUTTON_TOPIC_LOCKED_WIDTH}px; height: {IMG_BUTTON_TOPIC_LOCKED_HEIGHT}px; }
-.buttons div.pmreply-icon { width: {IMG_BUTTON_PM_REPLY_WIDTH}px; height: {IMG_BUTTON_PM_REPLY_HEIGHT}px; }
-.buttons div.newpm-icon { width: {IMG_BUTTON_PM_NEW_WIDTH}px; height: {IMG_BUTTON_PM_NEW_HEIGHT}px; }
-.buttons div.forwardpm-icon { width: {IMG_BUTTON_PM_FORWARD_WIDTH}px; height: {IMG_BUTTON_PM_FORWARD_HEIGHT}px; }
+.buttons div.reply-icon a:after, .buttons div.pmreply-icon a:after { background-position: -20px 0; }
+.buttons div.reply-icon a:hover:after, .buttons div.pmreply-icon a:hover:after { background-position: -20px -20px; }
+
+.buttons div.post-icon a:after, .buttons div.newpm-icon a:after { background-position: 0 0; }
+.buttons div.post-icon a:hover:after, .buttons div.newpm-icon a:hover:after { background-position: 0 -20px; }
+
+.buttons div.locked-icon a:after { background-position: -60px 0; }
+.buttons div.locked-icon a:hover:after { background-position: -60px -20px; }
+
+.buttons div.forwardpm-icon a:after { background-position: -40px 0; }
+.buttons div.forwardpm-icon a:hover:after { background-position: -40px -20px; }
+
+.dropdown-select.tools-icon:before { background-position: -80px 0; height: 16px; width: 16px; }
+
+.dropdown-visible .dropdown-select.tools-icon:before,
+.nojs .dropdown-container:hover .dropdown-select.tools-icon:before { background-position: -80px -20px; }
/* Sub-header (navigation bar)
--------------------------------------------- */
-a.print, a.sendemail, a.fontsize {
+a.print, a.sendemail {
display: block;
overflow: hidden;
height: 18px;
@@ -70,25 +122,21 @@ a.sendemail {
width: 22px;
}
-a.fontsize {
- background-image: none;
- background-position: 0 -1px;
- width: 29px;
-}
-
-a.fontsize:hover {
- background-position: 0 -20px;
- text-decoration: none;
-}
-
/* Icon images
---------------------------------------- */
-.sitehome, .icon-faq, .icon-members, .icon-home, .icon-ucp, .icon-register, .icon-logout,
-.icon-bookmark, .icon-bump, .icon-subscribe, .icon-unsubscribe, .icon-pages, .icon-search {
+.small-icon {
background-position: 0 50%;
background-repeat: no-repeat;
background-image: none;
- padding: 1px 0 0 17px;
+ padding: 0 0 0 17px;
+}
+
+ul.linklist li.small-icon {
+ padding-left: 0;
+}
+
+ul.linklist.bulletin li.small-icon:before {
+ display: none;
}
/* Poster profile icons
@@ -128,13 +176,77 @@ ul.profile-icons li a:hover { background: none; }
margin: 0 3px;
}
+/* Responsive icons in postbody */
+.postbody ul.profile-icons.responsive .responsive-menu {
+ position: relative;
+}
+
+ul.profile-icons.responsive a.responsive-menu-link {
+ display: inline-block;
+ position: relative;
+ margin: 0 5px;
+ width: 20px;
+ height: 20px;
+ text-decoration: none;
+ background: none top left no-repeat;
+}
+
+ul.profile-icons.responsive a.responsive-menu-link:hover {
+ background-position: 0 -20px;
+}
+
+ul.profile-icons.responsive a.responsive-menu-link:before {
+ content: '';
+ position: absolute;
+ left: 0;
+ top: 7px;
+ height: .125em;
+ width: 14px;
+ border-bottom: 0.125em solid transparent;
+ border-top: 0.375em double transparent;
+}
+
+.postbody ul.profile-icons.responsive .popup-pointer {
+ left: auto;
+ right: 7px;
+ top: 20px;
+}
+
+.postbody ul.profile-icons .dropdown li, .postbody ul.profile-icons .dropdown li a {
+ display: block;
+ background: transparent none;
+ width: auto;
+ height: auto;
+ margin: 0;
+ padding: 0;
+ float: none;
+ list-style-type: none;
+}
+
+.postbody ul.profile-icons .dropdown li span {
+ display: block;
+ text-align: right;
+ font-size: 1.2em;
+ line-height: 1.8em;
+ white-space: nowrap;
+}
+
+.hasjs .postbody ul.profile-icons {
+ max-width: 40%;
+}
+
/* Profile & navigation icons */
.email-icon, .email-icon a { background: none top left no-repeat; }
.aim-icon, .aim-icon a { background: none top left no-repeat; }
+.phpbb_aol-icon, .phpbb_aol-icon a { background: none top left no-repeat; }
.yahoo-icon, .yahoo-icon a { background: none top left no-repeat; }
+.phpbb_yahoo-icon, .phpbb_yahoo-icon a { background: none top left no-repeat; }
.web-icon, .web-icon a { background: none top left no-repeat; }
+.phpbb_website-icon, .phpbb_website-icon a { background: none top left no-repeat; }
.msnm-icon, .msnm-icon a { background: none top left no-repeat; }
+.phpbb_wlm-icon, .phpbb_wlm-icon a { background: none top left no-repeat; }
.icq-icon, .icq-icon a { background: none top left no-repeat; }
+.phpbb_icq-icon, .phpbb_icq-icon a { background: none top left no-repeat; }
.jabber-icon, .jabber-icon a { background: none top left no-repeat; }
.pm-icon, .pm-icon a { background: none top left no-repeat; }
.quote-icon, .quote-icon a { background: none top left no-repeat; }
@@ -147,20 +259,26 @@ ul.profile-icons li a:hover { background: none; }
.info-icon, .info-icon a { background: none top left no-repeat; }
/* Set profile icon dimensions */
-ul.profile-icons li.email-icon { width: {IMG_ICON_CONTACT_EMAIL_WIDTH}px; height: {IMG_ICON_CONTACT_EMAIL_HEIGHT}px; }
-ul.profile-icons li.aim-icon { width: {IMG_ICON_CONTACT_AIM_WIDTH}px; height: {IMG_ICON_CONTACT_AIM_HEIGHT}px; }
-ul.profile-icons li.yahoo-icon { width: {IMG_ICON_CONTACT_YAHOO_WIDTH}px; height: {IMG_ICON_CONTACT_YAHOO_HEIGHT}px; }
-ul.profile-icons li.web-icon { width: {IMG_ICON_CONTACT_WWW_WIDTH}px; height: {IMG_ICON_CONTACT_WWW_HEIGHT}px; }
-ul.profile-icons li.msnm-icon { width: {IMG_ICON_CONTACT_MSNM_WIDTH}px; height: {IMG_ICON_CONTACT_MSNM_HEIGHT}px; }
-ul.profile-icons li.icq-icon { width: {IMG_ICON_CONTACT_ICQ_WIDTH}px; height: {IMG_ICON_CONTACT_ICQ_HEIGHT}px; }
-ul.profile-icons li.jabber-icon { width: {IMG_ICON_CONTACT_JABBER_WIDTH}px; height: {IMG_ICON_CONTACT_JABBER_HEIGHT}px; }
-ul.profile-icons li.pm-icon { width: {IMG_ICON_CONTACT_PM_WIDTH}px; height: {IMG_ICON_CONTACT_PM_HEIGHT}px; }
-ul.profile-icons li.quote-icon { width: {IMG_ICON_POST_QUOTE_WIDTH}px; height: {IMG_ICON_POST_QUOTE_HEIGHT}px; }
-ul.profile-icons li.report-icon { width: {IMG_ICON_POST_REPORT_WIDTH}px; height: {IMG_ICON_POST_REPORT_HEIGHT}px; }
-ul.profile-icons li.edit-icon { width: {IMG_ICON_POST_EDIT_WIDTH}px; height: {IMG_ICON_POST_EDIT_HEIGHT}px; }
-ul.profile-icons li.delete-icon { width: {IMG_ICON_POST_DELETE_WIDTH}px; height: {IMG_ICON_POST_DELETE_HEIGHT}px; }
-ul.profile-icons li.info-icon { width: {IMG_ICON_POST_INFO_WIDTH}px; height: {IMG_ICON_POST_INFO_HEIGHT}px; }
-ul.profile-icons li.warn-icon { width: {IMG_ICON_USER_WARN_WIDTH}px; height: {IMG_ICON_USER_WARN_HEIGHT}px; }
+ul.profile-icons li.email-icon { width: 20px; height: 20px; }
+ul.profile-icons li.phpbb_aol-icon { width: 20px; height: 20px; }
+ul.profile-icons li.aim-icon { width: 20px; height: 20px; }
+ul.profile-icons li.yahoo-icon { width: 20px; height: 20px; }
+ul.profile-icons li.phpbb_yahoo-icon { width: 20px; height: 20px; }
+ul.profile-icons li.web-icon { width: 20px; height: 20px; }
+ul.profile-icons li.phpbb_website-icon { width: 20px; height: 20px; }
+ul.profile-icons li.msnm-icon { width: 20px; height: 20px; }
+ul.profile-icons li.phpbb_wlm-icon { width: 20px; height: 20px; }
+ul.profile-icons li.icq-icon { width: 20px; height: 20px; }
+ul.profile-icons li.phpbb_icq-icon { width: 20px; height: 20px; }
+ul.profile-icons li.jabber-icon { width: 20px; height: 20px; }
+ul.profile-icons li.pm-icon { width: 28px; height: 20px; }
+ul.profile-icons li.quote-icon { width: 54px; height: 20px; }
+ul.profile-icons li.report-icon { width: 20px; height: 20px; }
+ul.profile-icons li.edit-icon { width: 42px; height: 20px; }
+ul.profile-icons li.delete-icon { width: 20px; height: 20px; }
+ul.profile-icons li.info-icon { width: 20px; height: 20px; }
+ul.profile-icons li.warn-icon { width: 20px; height: 20px; }
+ul.profile-icons a.responsive-menu-link { width: 20px; height: 20px; }
/* Fix profile icon default margins */
ul.profile-icons li.edit-icon { margin: 0 0 0 3px; }
diff --git a/phpBB/styles/prosilver/theme/colours.css b/phpBB/styles/prosilver/theme/colours.css
index ef345e5113..5f6ca4929c 100644
--- a/phpBB/styles/prosilver/theme/colours.css
+++ b/phpBB/styles/prosilver/theme/colours.css
@@ -26,10 +26,6 @@ hr {
border-top-color: #CCCCCC;
}
-hr.dashed {
- border-top-color: #CCCCCC;
-}
-
/* Search box
--------------------------------------------- */
@@ -49,7 +45,7 @@ hr.dashed {
---------------------------------------- */
.headerbar {
background-color: #12A3EB;
- background-image: url("{T_THEME_PATH}/images/bg_header.gif");
+ background-image: url("./images/bg_header.gif");
color: #FFFFFF;
}
@@ -59,12 +55,12 @@ hr.dashed {
.forabg {
background-color: #0076b1;
- background-image: url("{T_THEME_PATH}/images/bg_list.gif");
+ background-image: url("./images/bg_list.gif");
}
.forumbg {
background-color: #12A3EB;
- background-image: url("{T_THEME_PATH}/images/bg_header.gif");
+ background-image: url("./images/bg_header.gif");
}
.panel {
@@ -80,32 +76,30 @@ hr.dashed {
color: #000000;
}
-.bg1 { background-color: #ECF3F7; }
-.bg2 { background-color: #e1ebf2; }
-.bg3 { background-color: #cadceb; }
-
-.ucprowbg {
- background-color: #DCDEE2;
+.bg1 {
+ background-color: #ECF3F7;
}
-.fieldsbg {
- background-color: #E7E8EA;
+table.zebra-list tr:nth-child(odd) td, ul.zebra-list li:nth-child(odd) {
+ background-color: #ECF3F7;
}
-span.corners-top {
- background-image: url("{T_THEME_PATH}/images/corners_left.png");
+.bg2 {
+ background-color: #e1ebf2;
}
-span.corners-top span {
- background-image: url("{T_THEME_PATH}/images/corners_right.png");
+table.zebra-list tr:nth-child(even) td, ul.zebra-list li:nth-child(even) {
+ background-color: #e1ebf2;
}
-span.corners-bottom {
- background-image: url("{T_THEME_PATH}/images/corners_left.png");
+.bg3 { background-color: #cadceb; }
+
+.ucprowbg {
+ background-color: #DCDEE2;
}
-span.corners-bottom span {
- background-image: url("{T_THEME_PATH}/images/corners_right.png");
+.fieldsbg {
+ background-color: #E7E8EA;
}
/* Horizontal lists
@@ -165,25 +159,30 @@ dl.details dd {
/* Pagination
---------------------------------------- */
-.pagination span strong {
- color: #FFFFFF;
- background-color: #4692BF;
- border-color: #4692BF;
-}
-
-.pagination span a, .pagination span a:link, .pagination span a:visited {
+.pagination li a, .pagination li a:link, .pagination li a:visited {
color: #5C758C;
background-color: #ECEDEE;
border-color: #B4BAC0;
}
-.pagination span a:hover {
+.pagination li.ellipsis span {
+ background-color: transparent;
+ color: #000000;
+}
+
+.pagination li.active span {
+ color: #FFFFFF;
+ background-color: #4692BF;
+ border-color: #4692BF;
+}
+
+.pagination li a:hover, .pagination .active a:hover {
border-color: #368AD2;
background-color: #368AD2;
- color: #FFF;
+ color: #FFFFFF;
}
-.pagination span a:active {
+.pagination li a:active, .pagination li.active a:active {
color: #5C758C;
background-color: #ECEDEE;
border-color: #B4BAC0;
@@ -191,7 +190,7 @@ dl.details dd {
/* Pagination in viewforum for multipage topics */
.row .pagination {
- background-image: url("{T_THEME_PATH}/images/icon_pages.gif");
+ background-image: url("./images/icon_pages.gif");
}
.row .pagination span a, li.pagination span a {
@@ -229,11 +228,23 @@ div.rules {
color: #BC2A4D;
}
-p.rules {
+p.post-notice {
background-color: #ECD5D8;
background-image: none;
}
+p.post-notice.deleted:before {
+ background-image: url("./images/icon_topic_deleted.png");
+}
+
+p.post-notice.unapproved:before {
+ background-image: url("./images/icon_topic_unapproved.gif");
+}
+
+p.post-notice.reported:before, p.post-notice.error:before {
+ background-image: url("./images/icon_topic_reported.gif");
+}
+
/*
--------------------------------------------------------------
Colours and backgrounds for links.css
@@ -261,6 +272,11 @@ a:active { color: #368AD2; }
color: #C8E6FF;
}
+/* Notification mark read link */
+.dropdown-extended a.mark_read {
+ background-color: #FFFFFF;
+}
+
/* Links for forum/topic lists */
a.forumtitle {
color: #105289;
@@ -338,28 +354,28 @@ a.topictitle:active {
/* Back to top of page */
a.top {
- background-image: url("{IMG_ICON_BACK_TOP_SRC}");
+ background-image: url("./images/icon_back_top.gif");
}
a.top2 {
- background-image: url("{IMG_ICON_BACK_TOP_SRC}");
+ background-image: url("./images/icon_back_top.gif");
}
/* Arrow links */
-a.up { background-image: url("{T_THEME_PATH}/images/arrow_up.gif"); }
-a.down { background-image: url("{T_THEME_PATH}/images/arrow_down.gif"); }
-a.left { background-image: url("{T_THEME_PATH}/images/arrow_left.gif"); }
-a.right { background-image: url("{T_THEME_PATH}/images/arrow_right.gif"); }
+a.arrow-up { background-image: url("./images/arrow_up.gif"); }
+a.arrow-down { background-image: url("./images/arrow_down.gif"); }
+a.arrow-left { background-image: url("./images/arrow_left.gif"); }
+a.arrow-right { background-image: url("./images/arrow_right.gif"); }
-a.up:hover {
+a.arrow-up:hover {
background-color: transparent;
}
-a.left:hover {
+a.arrow-left:hover {
color: #368AD2;
}
-a.right:hover {
+a.arrow-right:hover {
color: #368AD2;
}
@@ -371,7 +387,7 @@ Colours and backgrounds for content.css
ul.forums {
background-color: #eef5f9;
- background-image: url("{T_THEME_PATH}/images/gradient.gif");
+ background-image: url("./images/gradient.gif");
}
ul.topiclist li {
@@ -388,11 +404,11 @@ ul.topiclist dd {
}
ul.topiclist li.row dt a.subforum.read {
- background-image: url("{IMG_SUBFORUM_READ_SRC}");
+ background-image: url("./images/subforum_read.gif");
}
ul.topiclist li.row dt a.subforum.unread {
- background-image: url("{IMG_SUBFORUM_UNREAD_SRC}");
+ background-image: url("./images/subforum_unread.gif");
}
li.row {
@@ -421,11 +437,6 @@ li.header dt, li.header dd {
color: #FFFFFF;
}
-/* Forum list column styles */
-ul.topiclist dd.searchextra {
- color: #333333;
-}
-
/* Post body styles
----------------------------------------*/
.postbody {
@@ -452,6 +463,10 @@ dl.faq dt {
color: #BC2A4D;
}
+.announce, .unreadpost {
+ /* Highlight the announcements & unread posts box */
+}
+
/* Post signature */
.signature {
border-top-color: #CCCCCC;
@@ -467,12 +482,12 @@ dl.faq dt {
/* Quote block */
blockquote {
background-color: #EBEADD;
- background-image: url("{T_THEME_PATH}/images/quote.gif");
+ background-image: url("./images/quote.gif");
border-color:#DBDBCE;
}
.rtl blockquote {
- background-image: url("{T_THEME_PATH}/images/quote_rtl.gif");
+ background-image: url("./images/quote_rtl.gif");
}
blockquote blockquote {
@@ -486,16 +501,16 @@ blockquote blockquote blockquote {
}
/* Code block */
-dl.codebox {
+.codebox {
background-color: #FFFFFF;
border-color: #C9D2D8;
}
-dl.codebox dt {
+.codebox p {
border-bottom-color: #CCCCCC;
}
-dl.codebox code {
+.codebox code {
color: #2E8B57;
}
@@ -630,21 +645,11 @@ fieldset.polls dd div {
----------------------------------------*/
.postprofile {
color: #666666;
- border-left-color: #FFFFFF;
-}
-
-.rtl .postprofile {
- border-right-color: #FFFFFF;
- border-left-color: transparent;
+ border-color: #FFFFFF;
}
.pm .postprofile {
- border-left-color: #DDDDDD;
-}
-
-.rtl .pm .postprofile {
- border-right-color: #DDDDDD;
- border-left-color: transparent;
+ border-color: #DDDDDD;
}
.postprofile strong {
@@ -652,7 +657,7 @@ fieldset.polls dd div {
}
.online {
- background-image: url("{IMG_ICON_USER_ONLINE_SRC}");
+ background-image: url("./en/icon_user_online.gif");
}
/*
@@ -660,59 +665,154 @@ fieldset.polls dd div {
Colours and backgrounds for buttons.css
-------------------------------------------------------------- */
-/* Big button images */
-.reply-icon span { background-image: url("{IMG_BUTTON_TOPIC_REPLY_SRC}"); }
-.post-icon span { background-image: url("{IMG_BUTTON_TOPIC_NEW_SRC}"); }
-.locked-icon span { background-image: url("{IMG_BUTTON_TOPIC_LOCKED_SRC}"); }
-.pmreply-icon span { background-image: url("{IMG_BUTTON_PM_REPLY_SRC}"); }
-.newpm-icon span { background-image: url("{IMG_BUTTON_PM_NEW_SRC}"); }
-.forwardpm-icon span { background-image: url("{IMG_BUTTON_PM_FORWARD_SRC}"); }
-
a.print {
- background-image: url("{T_THEME_PATH}/images/icon_print.gif");
+ background-image: url("./images/icon_print.gif");
}
a.sendemail {
- background-image: url("{T_THEME_PATH}/images/icon_sendemail.gif");
+ background-image: url("./images/icon_sendemail.gif");
}
-a.fontsize {
- background-image: url("{T_THEME_PATH}/images/icon_fontsize.gif");
+.buttons div a, .dropdown-select {
+ border-color: #C7C3BF;
+ background-color: #FFFFFF;
+ background-image: -moz-linear-gradient(top, #FFFFFF, #E9E9E9);
+ background-image: -webkit-linear-gradient(top, #FFFFFF, #E9E9E9);
+ background-image: -o-linear-gradient(top, #FFFFFF, #E9E9E9);
+ background-image: linear-gradient(to bottom, #FFFFFF, #E9E9E9);
+ -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorStr='#FFFFFF', EndColorStr='#E9E9E9')";
+ box-shadow: 0 0 0 1px #FFFFFF inset;
+ -webkit-box-shadow: 0 0 0 1px #FFFFFF inset;
+ color: #BC2A4D !important;
+}
+
+.dropdown-select {
+ color: #5C6482 !important;
+}
+
+.dropdown-select:after {
+ border-color: #DADADA;
+}
+
+.buttons div a:hover, .dropdown-select:hover, .dropdown-visible .dropdown-select,
+.dropdown-visible .dropdown-select:hover, .nojs .dropdown-container:hover .dropdown-select {
+ border-color: #0a8ed0;
+ background-image: -moz-linear-gradient(top, #E9E9E9, #FFFFFF);
+ background-image: -webkit-linear-gradient(top, #E9E9E9, #FFFFFF);
+ background-image: -o-linear-gradient(top, #E9E9E9, #FFFFFF);
+ background-image: linear-gradient(to bottom, #E9E9E9, #FFFFFF);
+ -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorStr='#E9E9E9', EndColorStr='#FFFFFF')";
+ text-shadow: 1px 1px 0 #FFFFFF, -1px -1px 0 #FFFFFF, -1px -1px 0 rgba(188, 42, 77, 0.2);
+}
+
+.dropdown-select:hover {
+ border-color: #C7C3BF;
+}
+
+.dropdown-visible .dropdown-select, .dropdown-visible .dropdown-select:hover, .nojs .dropdown-container:hover .dropdown-select {
+ border-color: #A6B2BA;
+ color: #105289 !important;
+}
+
+.buttons div a:after, .dropdown-select-icon:before, .dropdown-select:after {
+ background-image: url("images/buttons.png");
}
/* Icon images
---------------------------------------- */
-.sitehome { background-image: url("{T_THEME_PATH}/images/icon_home.gif"); }
-.icon-faq { background-image: url("{T_THEME_PATH}/images/icon_faq.gif"); }
-.icon-members { background-image: url("{T_THEME_PATH}/images/icon_members.gif"); }
-.icon-home { background-image: url("{T_THEME_PATH}/images/icon_home.gif"); }
-.icon-ucp { background-image: url("{T_THEME_PATH}/images/icon_ucp.gif"); }
-.icon-register { background-image: url("{T_THEME_PATH}/images/icon_register.gif"); }
-.icon-logout { background-image: url("{T_THEME_PATH}/images/icon_logout.gif"); }
-.icon-bookmark { background-image: url("{T_THEME_PATH}/images/icon_bookmark.gif"); }
-.icon-bump { background-image: url("{T_THEME_PATH}/images/icon_bump.gif"); }
-.icon-subscribe { background-image: url("{T_THEME_PATH}/images/icon_subscribe.gif"); }
-.icon-unsubscribe { background-image: url("{T_THEME_PATH}/images/icon_unsubscribe.gif"); }
-.icon-pages { background-image: url("{T_THEME_PATH}/images/icon_pages.gif"); }
-.icon-search { background-image: url("{T_THEME_PATH}/images/icon_search.gif"); }
+.icon-faq { background-image: url("./images/icon_faq.gif"); }
+.icon-members { background-image: url("./images/icon_members.gif"); }
+.icon-home { background-image: url("./images/icon_home.gif"); }
+.icon-ucp { background-image: url("./images/icon_ucp.gif"); }
+.icon-register { background-image: url("./images/icon_register.gif"); }
+.icon-logout { background-image: url("./images/icon_logout.gif"); }
+.icon-bookmark { background-image: url("./images/icon_bookmark.gif"); }
+.icon-bump { background-image: url("./images/icon_bump.gif"); }
+.icon-subscribe { background-image: url("./images/icon_subscribe.gif"); }
+.icon-unsubscribe { background-image: url("./images/icon_unsubscribe.gif"); }
+.icon-pages { background-image: url("./images/icon_pages.gif"); }
+.icon-search, .responsive-search a { background-image: url("./images/icon_search.gif"); }
+.icon-notification { background-image: url("./images/icon_notification.gif"); }
+.icon-pm { background-image: url("./images/icon_pm.gif"); }
+.icon-download { background-image: url("./images/icon_download.gif"); }
+.icon-mark { background-image: url("./images/icon_mark.gif"); }
/* Profile & navigation icons */
-.email-icon, .email-icon a { background-image: url("{IMG_ICON_CONTACT_EMAIL_SRC}"); }
-.aim-icon, .aim-icon a { background-image: url("{IMG_ICON_CONTACT_AIM_SRC}"); }
-.yahoo-icon, .yahoo-icon a { background-image: url("{IMG_ICON_CONTACT_YAHOO_SRC}"); }
-.web-icon, .web-icon a { background-image: url("{IMG_ICON_CONTACT_WWW_SRC}"); }
-.msnm-icon, .msnm-icon a { background-image: url("{IMG_ICON_CONTACT_MSNM_SRC}"); }
-.icq-icon, .icq-icon a { background-image: url("{IMG_ICON_CONTACT_ICQ_SRC}"); }
-.jabber-icon, .jabber-icon a { background-image: url("{IMG_ICON_CONTACT_JABBER_SRC}"); }
-.pm-icon, .pm-icon a { background-image: url("{IMG_ICON_CONTACT_PM_SRC}"); }
-.quote-icon, .quote-icon a { background-image: url("{IMG_ICON_POST_QUOTE_SRC}"); }
+.email-icon, .email-icon a { background-image: url("./images/icon_contact_email.gif"); }
+.phpbb_aol-icon, .phpbb_aol-icon a { background-image: url("./images/icon_contact_aim.gif"); }
+.aim-icon, .aim-icon a { background-image: url("./images/icon_contact_aim.gif"); }
+.yahoo-icon, .yahoo-icon a { background-image: url("./images/icon_contact_yahoo.gif"); }
+.phpbb_yahoo-icon, .phpbb_yahoo-icon a { background-image: url("./images/icon_contact_yahoo.gif"); }
+.web-icon, .web-icon a { background-image: url("./images/icon_contact_www.gif"); }
+.phpbb_website-icon, .phpbb_website-icon a { background-image: url("./images/icon_contact_www.gif"); }
+.msnm-icon, .msnm-icon a { background-image: url("./images/icon_contact_msnm.gif"); }
+.phpbb_wlm-icon, .phpbb_wlm-icon a { background-image: url("./images/icon_contact_msnm.gif"); }
+.icq-icon, .icq-icon a { background-image: url("./images/icon_contact_icq.gif"); }
+.phpbb_icq-icon, .phpbb_icq-icon a { background-image: url("./images/icon_contact_icq.gif"); }
+.jabber-icon, .jabber-icon a { background-image: url("./images/icon_contact_jabber.gif"); }
+.pm-icon, .pm-icon a { background-image: url("./en/icon_contact_pm.gif"); }
+.quote-icon, .quote-icon a { background-image: url("./en/icon_post_quote.gif"); }
+ul.profile-icons.responsive a.responsive-menu-link { background-image: url("./images/icon_post_menu.png"); }
/* Moderator icons */
-.report-icon, .report-icon a { background-image: url("{IMG_ICON_POST_REPORT_SRC}"); }
-.edit-icon, .edit-icon a { background-image: url("{IMG_ICON_POST_EDIT_SRC}"); }
-.delete-icon, .delete-icon a { background-image: url("{IMG_ICON_POST_DELETE_SRC}"); }
-.info-icon, .info-icon a { background-image: url("{IMG_ICON_POST_INFO_SRC}"); }
-.warn-icon, .warn-icon a { background-image: url("{IMG_ICON_USER_WARN_SRC}"); } /* Need updated warn icon */
+.report-icon, .report-icon a { background-image: url("./images/icon_post_report.gif"); }
+.edit-icon, .edit-icon a { background-image: url("./en/icon_post_edit.gif"); }
+.delete-icon, .delete-icon a { background-image: url("./images/icon_post_delete.gif"); }
+.info-icon, .info-icon a { background-image: url("./images/icon_post_info.gif"); }
+.warn-icon, .warn-icon a { background-image: url("./images/icon_user_warn.gif"); } /* Need updated warn icon */
+
+/* Forum icons & Topic icons */
+.global_read { background-image: url("./images/announce_read.gif"); }
+.global_read_mine { background-image: url("./images/announce_read_mine.gif"); }
+.global_read_locked { background-image: url("./images/announce_read_locked.gif"); }
+.global_read_locked_mine { background-image: url("./images/announce_read_locked_mine.gif"); }
+.global_unread { background-image: url("./images/announce_unread.gif"); }
+.global_unread_mine { background-image: url("./images/announce_unread_mine.gif"); }
+.global_unread_locked { background-image: url("./images/announce_unread_locked.gif"); }
+.global_unread_locked_mine { background-image: url("./images/announce_unread_locked_mine.gif"); }
+
+.announce_read { background-image: url("./images/announce_read.gif"); }
+.announce_read_mine { background-image: url("./images/announce_read_mine.gif"); }
+.announce_read_locked { background-image: url("./images/announce_read_locked.gif"); }
+.announce_read_locked_mine { background-image: url("./images/announce_read_locked_mine.gif"); }
+.announce_unread { background-image: url("./images/announce_unread.gif"); }
+.announce_unread_mine { background-image: url("./images/announce_unread_mine.gif"); }
+.announce_unread_locked { background-image: url("./images/announce_unread_locked.gif"); }
+.announce_unread_locked_mine { background-image: url("./images/announce_unread_locked_mine.gif"); }
+
+.forum_link { background-image: url("./images/forum_link.gif"); }
+.forum_read { background-image: url("./images/forum_read.gif"); }
+.forum_read_locked { background-image: url("./images/forum_read_locked.gif"); }
+.forum_read_subforum { background-image: url("./images/forum_read_subforum.gif"); }
+.forum_unread { background-image: url("./images/forum_unread.gif"); }
+.forum_unread_locked { background-image: url("./images/forum_unread_locked.gif"); }
+.forum_unread_subforum { background-image: url("./images/forum_unread_subforum.gif"); }
+
+.sticky_read { background-image: url("./images/sticky_read.gif"); }
+.sticky_read_mine { background-image: url("./images/sticky_read_mine.gif"); }
+.sticky_read_locked { background-image: url("./images/sticky_read_locked.gif"); }
+.sticky_read_locked_mine { background-image: url("./images/sticky_read_locked_mine.gif"); }
+.sticky_unread { background-image: url("./images/sticky_unread.gif"); }
+.sticky_unread_mine { background-image: url("./images/sticky_unread_mine.gif"); }
+.sticky_unread_locked { background-image: url("./images/sticky_unread_locked.gif"); }
+.sticky_unread_locked_mine { background-image: url("./images/sticky_unread_locked_mine.gif"); }
+
+.topic_moved { background-image: url("./images/topic_moved.gif"); }
+.topic_read { background-image: url("./images/topic_read.gif"); }
+.topic_read_mine { background-image: url("./images/topic_read_mine.gif"); }
+.topic_read_hot { background-image: url("./images/topic_read_hot.gif"); }
+.topic_read_hot_mine { background-image: url("./images/topic_read_hot_mine.gif"); }
+.topic_read_locked { background-image: url("./images/topic_read_locked.gif"); }
+.topic_read_locked_mine { background-image: url("./images/topic_read_locked_mine.gif"); }
+.topic_unread { background-image: url("./images/topic_unread.gif"); }
+.topic_unread_mine { background-image: url("./images/topic_unread_mine.gif"); }
+.topic_unread_hot { background-image: url("./images/topic_unread_hot.gif"); }
+.topic_unread_hot_mine { background-image: url("./images/topic_unread_hot_mine.gif"); }
+.topic_unread_locked { background-image: url("./images/topic_unread_locked.gif"); }
+.topic_unread_locked_mine { background-image: url("./images/topic_unread_locked_mine.gif"); }
+
+.pm_read { background-image: url("./images/topic_read.gif"); }
+.pm_unread { background-image: url("./images/topic_unread.gif"); }
/*
--------------------------------------------------------------
@@ -722,11 +822,11 @@ Colours and backgrounds for cp.css
/* Main CP box
----------------------------------------*/
-#cp-main h3, #cp-main hr, #cp-menu hr {
+.panel-container h3, .panel-container hr, #cp-menu hr {
border-color: #A4B3BF;
}
-#cp-main .panel li.row {
+.panel-container .panel li.row {
border-bottom-color: #B5C1CB;
border-top-color: #F9F9F9;
}
@@ -735,11 +835,11 @@ ul.cplist {
border-top-color: #B5C1CB;
}
-#cp-main .panel li.header dd, #cp-main .panel li.header dt {
+.panel-container .panel li.header dd, .panel-container .panel li.header dt {
color: #000000;
}
-#cp-main table.table1 thead th {
+.panel-container table.table1 thead th {
color: #333333;
border-bottom-color: #333333;
}
@@ -752,11 +852,11 @@ ul.cplist {
/* CP tabbed menu
----------------------------------------*/
#tabs a {
- background-image: url("{T_THEME_PATH}/images/bg_tabs1.gif");
+ background-image: url("./images/bg_tabs1.gif");
}
#tabs a span {
- background-image: url("{T_THEME_PATH}/images/bg_tabs2.gif");
+ background-image: url("./images/bg_tabs2.gif");
color: #536482;
}
@@ -786,10 +886,20 @@ ul.cplist {
background-color: #F9F9F9;
}
-#minitabs li.activetab a, #minitabs li.activetab a:hover {
+#minitabs li.activetab a span, #minitabs li.activetab a:hover span {
color: #333333;
}
+/* Responsive tabs
+----------------------------------------*/
+.responsive-tab .responsive-tab-link span:before {
+ border-color: #536482;
+}
+
+.responsive-tab .responsive-tab-link:hover span:before {
+ border-color: #BC2A4D;
+}
+
/* UCP navigation menu
----------------------------------------*/
@@ -797,11 +907,11 @@ ul.cplist {
#navigation a {
color: #333;
background-color: #B2C2CF;
- background-image: url("{T_THEME_PATH}/images/bg_menu.gif");
+ background-image: url("./images/bg_menu.gif");
}
.rtl #navigation a {
- background-image: url("{T_THEME_PATH}/images/bg_menu_rtl.gif");
+ background-image: url("./images/bg_menu_rtl.gif");
background-position: 0 100%;
}
@@ -821,13 +931,20 @@ ul.cplist {
color: #D31141;
}
+@media only screen and (max-width: 700px), only screen and (max-device-width: 700px)
+{
+ #navigation a, .rtl #navigation a {
+ background-image: none;
+ }
+}
+
/* Preferences pane layout
----------------------------------------*/
-#cp-main h2 {
+.panel-container h2 {
color: #333333;
}
-#cp-main .panel {
+.panel-container .panel {
background-color: #F9F9F9;
}
@@ -835,39 +952,6 @@ ul.cplist {
background-color: #FFFFFF;
}
-#cp-main span.corners-top, #cp-menu span.corners-top {
- background-image: url("{T_THEME_PATH}/images/corners_left2.gif");
-}
-
-#cp-main span.corners-top span, #cp-menu span.corners-top span {
- background-image: url("{T_THEME_PATH}/images/corners_right2.gif");
-}
-
-#cp-main span.corners-bottom, #cp-menu span.corners-bottom {
- background-image: url("{T_THEME_PATH}/images/corners_left2.gif");
-}
-
-#cp-main span.corners-bottom span, #cp-menu span.corners-bottom span {
- background-image: url("{T_THEME_PATH}/images/corners_right2.gif");
-}
-
-/* Topicreview */
-#cp-main .panel #topicreview span.corners-top, #cp-menu .panel #topicreview span.corners-top {
- background-image: url("{T_THEME_PATH}/images/corners_left.gif");
-}
-
-#cp-main .panel #topicreview span.corners-top span, #cp-menu .panel #topicreview span.corners-top span {
- background-image: url("{T_THEME_PATH}/images/corners_right.gif");
-}
-
-#cp-main .panel #topicreview span.corners-bottom, #cp-menu .panel #topicreview span.corners-bottom {
- background-image: url("{T_THEME_PATH}/images/corners_left.gif");
-}
-
-#cp-main .panel #topicreview span.corners-bottom span, #cp-menu .panel #topicreview span.corners-bottom span {
- background-image: url("{T_THEME_PATH}/images/corners_right.gif");
-}
-
/* Friends list */
.cp-mini {
background-color: #eef5f9;
@@ -908,7 +992,7 @@ dl.mini dt {
/* Avatar gallery */
#gallery label {
- background-color: #FFFFFF;
+ background: #FFFFFF;
border-color: #CCC;
}
@@ -943,6 +1027,10 @@ dd label {
color: #333;
}
+fieldset.fields1 {
+ background-color: transparent;
+}
+
/* Hover effects */
fieldset dl:hover dt label {
color: #000000;
@@ -972,6 +1060,14 @@ fieldset.quick-login input.inputbox {
color: #333333;
}
+.inputbox:-moz-placeholder {
+ color: #333333;
+}
+
+.inputbox::-webkit-input-placeholder {
+ color: #333333;
+}
+
.inputbox:hover {
border-color: #11A3EA;
}
@@ -981,13 +1077,22 @@ fieldset.quick-login input.inputbox {
color: #0F4987;
}
+.inputbox:focus:-moz-placeholder {
+ color: transparent;
+}
+
+.inputbox:focus::-webkit-input-placeholder {
+ color: transparent;
+}
+
+
/* Form button styles
---------------------------------------- */
a.button1, input.button1, input.button3, a.button2, input.button2 {
color: #000;
background-color: #FAFAFA;
- background-image: url("{T_THEME_PATH}/images/bg_button.gif");
+ background-image: url("./images/bg_button.gif");
}
a.button1, input.button1 {
@@ -1014,10 +1119,102 @@ a.button1:hover, input.button1:hover, a.button2:hover, input.button2:hover, inpu
color: #BC2A4D;
}
+/* Focus states */
+input.button1:focus, input.button2:focus, input.button3:focus {
+ border-color: #11A3EA;
+ color: #0F4987;
+}
+
input.search {
- background-image: url("{T_THEME_PATH}/images/icon_textbox_search.gif");
+ background-image: url("./images/icon_textbox_search.gif");
}
input.disabled {
color: #666666;
}
+
+/* jQuery popups
+---------------------------------------- */
+.phpbb_alert {
+ background-color: #FFFFFF;
+ border-color: #999999;
+}
+.phpbb_alert .alert_close {
+ background-image: url("./images/alert_close.png");
+}
+#darken {
+ background-color: #000000;
+}
+
+#loading_indicator {
+ background-color: #000000;
+ background-image: url("./images/loading.gif");
+}
+
+.dropdown-extended ul li {
+ border-bottom-color: #B9B9B9;
+}
+
+.dropdown-extended ul li:hover {
+ background-color: #CFE1F6;
+ color: #000000;
+}
+
+.dropdown-extended .header, .dropdown-extended .footer {
+ border-color: #B9B9B9;
+ color: #000000;
+}
+
+.dropdown-extended .footer {
+ padding: 5px 0;
+ border-top-style: solid;
+ border-top-width: 1px;
+}
+
+.dropdown-extended .header {
+ background: #F1F8FF;
+ background: -moz-linear-gradient(top, #F1F8FF 0%, #CADCEB 100%);
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #F1F8FF), color-stop(100%, #CADCEB));
+ background: -webkit-linear-gradient(top, #F1F8FF 0%, #CADCEB 100%);
+ background: -o-linear-gradient(top, #F1F8FF 0%, #CADCEB 100%);
+ background: -ms-linear-gradient(top, #F1F8FF 0%, #CADCEB 100%);
+ background: linear-gradient(to bottom, #F1F8FF 0%, #CADCEB 100%);
+}
+
+.dropdown .pointer {
+ border-color: #B9B9B9 transparent;
+}
+
+.dropdown .pointer-inner {
+ border-color: #FFF transparent;
+}
+
+.dropdown-extended .pointer-inner, #minitabs .pointer-inner {
+ border-color: #F1F8FF transparent;
+}
+
+ul.linklist li.responsive-menu a.responsive-menu-link:before {
+ border-color: #105289;
+}
+
+ul.linklist li.responsive-menu a.responsive-menu-link:hover:before, ul.linklist li.responsive-menu.visible a.responsive-menu-link:before {
+ border-color: #D31141;
+}
+
+.dropdown .dropdown-contents {
+ background: #fff;
+ border-color: #b9b9b9;
+ box-shadow: 1px 3px 5px rgba(0, 0, 0, 0.2);
+}
+
+.dropdown-up .dropdown-contents {
+ box-shadow: 1px 0 5px rgba(0, 0, 0, 0.2);
+}
+
+.dropdown li, .dropdown li li {
+ border-color: #DCDCDC;
+}
+
+#minitabs .dropdown-contents {
+ background-color: #F1F8FF;
+}
diff --git a/phpBB/styles/prosilver/theme/common.css b/phpBB/styles/prosilver/theme/common.css
index 7eb00bd808..50683c6808 100644
--- a/phpBB/styles/prosilver/theme/common.css
+++ b/phpBB/styles/prosilver/theme/common.css
@@ -1,12 +1,51 @@
-/* General Markup Styles
+/* CSS Reset http://meyerweb.com/eric/tools/css/reset/ v2.0 | 20110126
---------------------------------------- */
-
-* {
- /* Reset browsers default margin, padding and font sizes */
+html, body, div, span, applet, object, iframe,
+h1, h2, h3, h4, h5, h6, p, blockquote, pre,
+a, abbr, acronym, address, big, cite, code,
+del, dfn, em, img, ins, kbd, q, s, samp,
+small, strike, strong, sub, sup, tt, var,
+b, u, i, center,
+dl, dt, dd, ol, ul, li,
+fieldset, form, label, legend,
+table, caption, tbody, tfoot, thead, tr, th, td,
+article, aside, canvas, details, embed,
+figure, figcaption, footer, header, hgroup,
+menu, nav, output, ruby, section, summary,
+time, mark, audio, video {
margin: 0;
padding: 0;
+ border: 0;
+ font-size: 100%;
+ font: inherit;
+ vertical-align: baseline;
+}
+/* HTML5 display-role reset for older browsers */
+article, aside, details, figcaption, figure,
+footer, header, hgroup, menu, nav, section {
+ display: block;
+}
+body {
+ line-height: 1;
+}
+ol, ul {
+ list-style: none;
+}
+blockquote, q {
+ quotes: none;
+}
+blockquote:before, blockquote:after,
+q:before, q:after {
+ content: '';
+ content: none;
+}
+table {
+ border-collapse: collapse;
+ border-spacing: 0;
}
+/* General Markup Styles
+---------------------------------------- */
html {
font-size: 100%;
/* Always show a scrollbar for short pages - stops the jump when the scrollbar appears. non-IE browsers */
@@ -16,19 +55,18 @@ html {
body {
/* Text-Sizing with ems: http://www.clagnut.com/blog/348/ */
font-family: Verdana, Helvetica, Arial, sans-serif;
- color: #828282;
- background-color: #FFFFFF;
/*font-size: 62.5%; This sets the default font size to be equivalent to 10px */
font-size: 10px;
+ line-height: normal;
margin: 0;
padding: 12px 0;
+ word-wrap: break-word;
}
h1 {
/* Forum name */
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
margin-right: 200px;
- color: #FFFFFF;
margin-top: 15px;
font-weight: bold;
font-size: 2em;
@@ -38,7 +76,6 @@ h2 {
/* Forum header titles */
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
font-weight: normal;
- color: #3f3f3f;
font-size: 2em;
margin: 0.8em 0 0.2em 0;
}
@@ -52,11 +89,10 @@ h3 {
font-family: Arial, Helvetica, sans-serif;
font-weight: bold;
text-transform: uppercase;
- border-bottom: 1px solid #CCCCCC;
+ border-bottom: 1px solid transparent;
margin-bottom: 3px;
padding-bottom: 2px;
font-size: 1.05em;
- color: #989898;
margin-top: 20px;
}
@@ -78,8 +114,8 @@ img {
hr {
/* Also see tweaks.css */
- border: 0 none #FFFFFF;
- border-top: 1px solid #CCCCCC;
+ border: 0 solid transparent;
+ border-top-width: 1px;
height: 1px;
margin: 5px 0;
display: block;
@@ -87,7 +123,7 @@ hr {
}
hr.dashed {
- border-top: 1px dashed #CCCCCC;
+ border-top-style: dashed;
margin: 10px 0;
}
@@ -99,6 +135,43 @@ p.right {
text-align: right;
}
+p.jumpbox-return {
+ margin-top: 1em;
+}
+
+b, strong {
+ font-weight: bold;
+}
+
+i, em {
+ font-style: italic;
+}
+
+u {
+ text-decoration: underline;
+}
+
+ul {
+ list-style-type: disc;
+}
+
+ol {
+ list-style-type: decimal;
+}
+
+li {
+ display: list-item;
+}
+
+ul ul, ol ul {
+ list-style-type: circle;
+}
+
+ol ol ul, ol ul ul, ul ol ul, ul ul ul {
+ list-style-type: square;
+}
+
+
/* Main blocks
---------------------------------------- */
#wrap {
@@ -107,7 +180,7 @@ p.right {
}
#simple-wrap {
- padding: 6px 10px;
+ padding: 6px 0;
}
#page-body {
@@ -136,7 +209,6 @@ a#logo:hover {
/* Search box
--------------------------------------------- */
#search-box {
- color: #FFFFFF;
position: relative;
margin-top: 30px;
margin-right: 5px;
@@ -148,11 +220,10 @@ a#logo:hover {
#search-box #keywords {
width: 95px;
- background-color: #FFF;
}
#search-box input {
- border: 1px solid #b0b0b0;
+ border: 1px solid transparent;
}
/* .button1 style defined later, just a few tweaks for the search button version */
@@ -183,122 +254,73 @@ a#logo:hover {
/* Round cornered boxes and backgrounds
---------------------------------------- */
.headerbar {
- background: #ebebeb none repeat-x 0 0;
- color: #FFFFFF;
+ background: transparent none repeat-x 0 0;
margin-bottom: 4px;
- padding: 0 5px;
+ padding: 5px;
+ border-radius: 7px;
}
.navbar {
- background-color: #ebebeb;
padding: 0 10px;
+ padding: 5px 10px 5px 10px;
+ border-radius: 7px;
}
.forabg {
- background: #b1b1b1 none repeat-x 0 0;
+ background: transparent none repeat-x 0 0;
margin-bottom: 4px;
- padding: 0 5px;
+ padding: 5px;
clear: both;
+ border-radius: 7px;
}
.forumbg {
- background: #ebebeb none repeat-x 0 0;
+ background: transparent none repeat-x 0 0;
margin-bottom: 4px;
- padding: 0 5px;
+ padding: 5px;
clear: both;
+ border-radius: 7px;
}
.panel {
margin-bottom: 4px;
- padding: 0 10px;
- background-color: #f3f3f3;
- color: #3f3f3f;
+ padding: 5px 10px;
+ border-radius: 7px;
}
.post {
- padding: 0 10px;
+ padding: 5px 10px;
margin-bottom: 4px;
background-repeat: no-repeat;
background-position: 100% 0;
+ border-radius: 7px;
}
-.post:target .content {
- color: #000000;
-}
-
-.post:target h3 a {
- color: #000000;
+.inner:after {
+ content: '';
+ clear: both;
+ display: block;
}
-.bg1 { background-color: #f7f7f7;}
-.bg2 { background-color: #f2f2f2; }
-.bg3 { background-color: #ebebeb; }
-
.rowbg {
margin: 5px 5px 2px 5px;
}
-.ucprowbg {
- background-color: #e2e2e2;
-}
-
-.fieldsbg {
- /*border: 1px #DBDEE2 solid;*/
- background-color: #eaeaea;
-}
-
-span.corners-top, span.corners-bottom, span.corners-top span, span.corners-bottom span {
- font-size: 1px;
- line-height: 1px;
+/* Horizontal lists
+----------------------------------------*/
+ul.linklist {
display: block;
- height: 5px;
- background-repeat: no-repeat;
-}
-
-span.corners-top {
- background-image: none;
- background-position: 0 0;
- margin: 0 -5px;
-}
-
-span.corners-top span {
- background-image: none;
- background-position: 100% 0;
+ margin: 0;
}
-span.corners-bottom {
- background-image: none;
- background-position: 0 100%;
- margin: 0 -5px;
+ul.linklist:after {
+ content: '';
+ display: block;
clear: both;
}
-span.corners-bottom span {
- background-image: none;
- background-position: 100% 100%;
-}
-
-.headbg span.corners-bottom {
- margin-bottom: -1px;
-}
-
-.post span.corners-top, .post span.corners-bottom, .panel span.corners-top, .panel span.corners-bottom, .navbar span.corners-top, .navbar span.corners-bottom {
- margin: 0 -10px;
-}
-
-.rules span.corners-top {
- margin: 0 -10px 5px -10px;
-}
-
-.rules span.corners-bottom {
- margin: 5px -10px 0 -10px;
-}
-
-/* Horizontal lists
-----------------------------------------*/
-ul.linklist {
- display: block;
- margin: 0;
+#cp-main .panel {
+ padding: 5px 10px;
}
ul.linklist li {
@@ -309,6 +331,7 @@ ul.linklist li {
margin-right: 5px;
font-size: 1.1em;
line-height: 2.2em;
+ padding-top: 1px;
}
ul.linklist li.rightside, p.rightside {
@@ -321,7 +344,7 @@ ul.linklist li.rightside, p.rightside {
ul.navlinks {
padding-bottom: 1px;
margin-bottom: 1px;
- border-bottom: 1px solid #FFFFFF;
+ border-bottom: 1px solid transparent;
font-weight: bold;
}
@@ -339,10 +362,258 @@ ul.rightside {
text-align: right;
}
+ul.linklist li.responsive-menu {
+ position: relative;
+ margin: 0 5px;
+}
+
+ul.linklist li.responsive-menu a.responsive-menu-link {
+ display: inline-block;
+ margin: 0 5px;
+ font-size: 16px;
+ position: relative;
+ width: 16px;
+ line-height: 16.5px;
+ text-decoration: none;
+}
+
+ul.linklist li.responsive-menu a.responsive-menu-link:before {
+ content: '';
+ position: absolute;
+ left: 0;
+ top: 7px;
+ height: .125em;
+ width: 14px;
+ border-bottom: 0.125em solid transparent;
+ border-top: 0.375em double transparent;
+}
+
+.hasjs ul.linklist.leftside, .hasjs ul.linklist.rightside {
+ max-width: 48%;
+}
+
+.hasjs ul.linklist.fullwidth {
+ max-width: none;
+}
+
+li.responsive-menu.dropdown-right .dropdown {
+ left: -9px;
+}
+
+li.responsive-menu.dropdown-left .dropdown {
+ right: -6px;
+}
+
+li.responsive-menu .dropdown .dropdown-contents {
+ padding: 0 5px;
+}
+
+ul.linklist .dropdown-down .dropdown {
+ top: 22px;
+}
+
+ul.linklist .dropdown-up .dropdown {
+ bottom: 18px;
+}
+
+ul.linklist .dropdown li {
+ clear: both;
+}
+
+
+
+/* Bulletin icons for list items
+----------------------------------------*/
+ul.linklist.bulletin li:before {
+ display: inline-block;
+ content: "\2022";
+ font-size: inherit;
+ line-height: inherit;
+ padding-right: 4px;
+}
+
+ul.linklist.bulletin li:first-child:before, ul.linklist.bulletin li.rightside:last-child:before {
+ display: none;
+}
+
+ul.linklist.bulletin li.no-bulletin:before {
+ display: none;
+}
+
+.responsive-menu:before {
+ display: none !important;
+}
+
+/* Dropdown menu
+----------------------------------------*/
+.dropdown-container {
+ position: relative;
+}
+
+.nojs .dropdown-container:hover .dropdown {
+ display: block !important;
+}
+
+.dropdown {
+ position: absolute;
+ left: 0;
+ top: 1.2em;
+ z-index: 2;
+ border: 1px solid transparent;
+ border-radius: 5px;
+ padding: 9px 0 0;
+}
+
+.dropdown-container.topic-tools {
+ float: left;
+}
+
+.dropdown-up .dropdown {
+ top: auto;
+ bottom: 1.2em;
+ padding: 0 0 9px;
+}
+
+.dropdown-left .dropdown, .nojs .rightside .dropdown {
+ left: auto;
+ right: 0;
+}
+
+.dropdown-button-control .dropdown {
+ top: 24px;
+}
+
+.dropdown-button-control.dropdown-up .dropdown {
+ top: auto;
+ bottom: 24px;
+}
+
+.dropdown .pointer, .dropdown .pointer-inner {
+ position: absolute;
+ width: 0;
+ height: 0;
+ border-top-width: 0;
+ border-bottom: 10px solid transparent;
+ border-left: 10px dashed transparent;
+ border-right: 10px dashed transparent;
+ -webkit-transform: rotate(360deg); /* better anti-aliasing in webkit */
+ display: block;
+}
+
+.dropdown-up .pointer, .dropdown-up .pointer-inner {
+ border-bottom-width: 0;
+ border-top: 10px solid transparent;
+}
+
+.dropdown .pointer {
+ right: auto;
+ left: 10px;
+ top: 0;
+ z-index: 3;
+}
+
+.dropdown-up .pointer {
+ bottom: 0;
+ top: auto;
+}
+
+.dropdown-left .dropdown .pointer, .nojs .rightside .dropdown .pointer {
+ left: auto;
+ right: 10px;
+}
+
+.dropdown .pointer-inner {
+ top: auto;
+ bottom: -11px;
+ left: -10px;
+}
+
+.dropdown-up .pointer-inner {
+ bottom: auto;
+ top: -11px;
+}
+
+.dropdown .dropdown-contents {
+ z-index: 2;
+ overflow: hidden;
+ overflow-y: auto;
+ border: 1px solid transparent;
+ border-radius: 5px;
+ padding: 5px;
+ position: relative;
+ min-width: 40px;
+ max-height: 200px;
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
+}
+
+.dropdown li {
+ border-bottom: 1px dotted transparent;
+ float: none !important;
+ line-height: normal !important;
+ font-size: 1em !important;
+ list-style: none;
+ margin: 0;
+ padding-top: 4px;
+ padding-bottom: 4px;
+ white-space: nowrap;
+ text-align: left;
+}
+
+.dropdown li:last-child, .dropdown li li {
+ border-bottom: 0;
+}
+
+.dropdown li li:first-child {
+ margin-top: 4px;
+}
+
+.dropdown li li:last-child {
+ padding-bottom: 0;
+}
+
+.dropdown li li {
+ border-top: 1px dotted transparent;
+ padding-left: 10px;
+}
+
+.wrap .dropdown li, .dropdown.wrap li, .dropdown-extended li {
+ white-space: normal;
+}
+
+.dropdown li:before, .dropdown li:after {
+ display: none !important;
+}
+
+/* Responsive breadcrumbs
+----------------------------------------*/
+.breadcrumbs .crumb {
+ word-wrap: normal;
+}
+
+.breadcrumbs .crumb a {
+ display: inline-block;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+ vertical-align: bottom;
+ overflow: hidden;
+}
+
+.breadcrumbs.wrapped .crumb a { letter-spacing: -.3px; }
+.breadcrumbs.wrapped .crumb.wrapped-medium a { letter-spacing: -.4px; }
+.breadcrumbs.wrapped .crumb.wrapped-tiny a { letter-spacing: -.5px; }
+
+.breadcrumbs .crumb.wrapped-max a { max-width: 120px; }
+.breadcrumbs .crumb.wrapped-wide a { max-width: 100px; }
+.breadcrumbs .crumb.wrapped-medium a { max-width: 80px; }
+.breadcrumbs .crumb.wrapped-small a { max-width: 60px; }
+.breadcrumbs .crumb.wrapped-tiny a { max-width: 40px; }
+
/* Table styles
----------------------------------------*/
table.table1 {
- /* See tweaks.css */
+ width: 100%;
}
#ucp-main table.table1 {
@@ -352,7 +623,6 @@ table.table1 {
table.table1 thead th {
font-weight: normal;
text-transform: uppercase;
- color: #FFFFFF;
line-height: 1.3em;
font-size: 1em;
padding: 0 0 4px 3px;
@@ -363,35 +633,27 @@ table.table1 thead th span {
}
table.table1 tbody tr {
- border: 1px solid #cfcfcf;
-}
-
-table.table1 tbody tr:hover, table.table1 tbody tr.hover {
- background-color: #f6f6f6;
- color: #000;
+ border: 1px solid transparent;
}
table.table1 td {
- color: #6a6a6a;
font-size: 1.1em;
}
table.table1 tbody td {
padding: 5px;
- border-top: 1px solid #FAFAFA;
+ border-top: 1px solid transparent;
}
table.table1 tbody th {
padding: 5px;
- border-bottom: 1px solid #000000;
+ border-bottom: 1px solid transparent;
text-align: left;
- color: #333333;
- background-color: #FFFFFF;
}
/* Specific column styles */
table.table1 .name { text-align: left; }
-table.table1 .posts { text-align: center !important; width: 7%; }
+table.table1 .posts { text-align: center; width: 7%; }
table.table1 .joined { text-align: left; width: 15%; }
table.table1 .active { text-align: left; width: 15%; }
table.table1 .mark { text-align: center; width: 7%; }
@@ -413,7 +675,6 @@ table.info tbody th {
padding: 3px;
text-align: right;
vertical-align: top;
- color: #000000;
font-weight: normal;
}
@@ -425,17 +686,14 @@ table.info tbody th {
margin: 0 -1px;
}
-.forumbg-table > .inner > span.corners-top {
- margin: 0 -4px -1px -4px;
-}
-
-.forumbg-table > .inner > span.corners-bottom {
- margin: -1px -4px 0 -4px;
+#color_palette_placeholder table {
+ border-collapse: separate;
+ border-spacing: 1px;
}
/* Misc layout styles
---------------------------------------- */
-/* column[1-2] styles are containers for two column layouts
+/* column[1-2] styles are containers for two column layouts
Also see tweaks.css */
.column1 {
float: left;
@@ -456,6 +714,10 @@ table.info tbody th {
text-align: left;
}
+.left-box.profile-details {
+ width: 80%;
+}
+
.right-box {
float: right;
width: auto;
@@ -472,7 +734,6 @@ dl.details dt {
clear: left;
width: 30%;
text-align: right;
- color: #000000;
display: block;
}
@@ -480,83 +741,184 @@ dl.details dd {
margin-left: 0;
padding-left: 5px;
margin-bottom: 5px;
- color: #828282;
float: left;
width: 65%;
+ overflow: hidden;
+ text-overflow: ellipsis;
+}
+
+.clearfix, fieldset dl, ul.topiclist dl, dl.polls {
+ overflow: hidden;
+}
+
+fieldset.fields1 ul.recipients {
+ list-style-type: none;
+ line-height: 1.8;
+ max-height: 150px;
+ overflow-y: auto;
+}
+
+fieldset.fields1 dd.recipients {
+ clear: left;
+ margin-left: 1em;
+}
+
+fieldset.fields1 ul.recipients input.button2{
+ font-size: 0.8em;
+ margin-right: 0;
+ padding: 0;
+}
+
+fieldset.fields1 dl.pmlist > dt {
+ width: auto !important;
+}
+
+fieldset.fields1 dl.pmlist dd.recipients {
+ margin-left: 0 !important;
}
/* Pagination
---------------------------------------- */
.pagination {
- height: 1%; /* IE tweak (holly hack) */
width: auto;
text-align: right;
margin-top: 5px;
float: right;
}
-.pagination span.page-sep {
- display: none;
-}
-
li.pagination {
margin-top: 0;
}
-.pagination strong, .pagination b {
- font-weight: normal;
+.pagination img {
+ vertical-align: middle;
}
-.pagination span strong {
- padding: 0 2px;
- margin: 0 2px;
- font-weight: normal;
- color: #FFFFFF;
- background-color: #bfbfbf;
- border: 1px solid #bfbfbf;
- font-size: 0.9em;
+.pagination ul {
+ display: inline-block;
+ *display: inline; /* IE7 inline-block hack */
+ *zoom: 1;
+ margin-left: 0;
+ margin-bottom: 0;
}
-.pagination span a, .pagination span a:link, .pagination span a:visited, .pagination span a:active {
+li.pagination ul {
+ margin-top: -2px;
+ vertical-align: middle;
+}
+
+.pagination ul li, dl .pagination ul li, dl.icon .pagination ul li {
+ display: inline;
+ padding: 0;
+ font-size: 100%;
+ line-height: normal;
+}
+
+.pagination li a, .pagnation li span, li .pagination li a, li .pagination li span, .pagination li.active span, .pagination li.ellipsis span {
font-weight: normal;
text-decoration: none;
- color: #747474;
- margin: 0 2px;
padding: 0 2px;
- background-color: #eeeeee;
- border: 1px solid #bababa;
+ border: 1px solid transparent;
font-size: 0.9em;
line-height: 1.5em;
}
-.pagination span a:hover {
- border-color: #d2d2d2;
- background-color: #d2d2d2;
- color: #FFF;
- text-decoration: none;
-}
-
-.pagination img {
- vertical-align: middle;
-}
-
/* Pagination in viewforum for multipage topics */
.row .pagination {
display: block;
float: right;
width: auto;
margin-top: 0;
- padding: 1px 0 1px 15px;
+ padding: 1px 0 1px 8px;
font-size: 0.9em;
background: none 0 50% no-repeat;
}
-.row .pagination span a, li.pagination span a {
- background-color: #FFFFFF;
+/* jQuery popups
+---------------------------------------- */
+.phpbb_alert {
+ border: 1px solid transparent;
+ display: none;
+ left: 0;
+ padding: 0 25px 20px 25px;
+ position: fixed;
+ right: 0;
+ top: 150px;
+ z-index: 50;
+ width: 620px;
+ margin: 0 auto;
+}
+
+@media only screen and (max-height: 500px), only screen and (max-device-width: 500px)
+{
+ .phpbb_alert {
+ top: 25px;
+ }
+}
+
+.phpbb_alert .alert_close {
+ display: block;
+ float: right;
+ width: 16px;
+ height: 16px;
+ overflow: hidden;
+ text-decoration: none !important;
+ background: transparent none 0 0 no-repeat;
+ margin-top: -7px;
+ margin-right: -31px;
+}
+.phpbb_alert .alert_close:hover {
+ background-position: 0 -16px;
+}
+
+.phpbb_alert p {
+ margin: 8px 0;
+ padding-bottom: 8px;
+}
+
+.phpbb_alert label {
+ display: block;
+ margin: 8px 0;
+ padding-bottom: 8px;
+}
+
+.phpbb_alert div.alert_text > p,
+.phpbb_alert div.alert_text > label,
+.phpbb_alert div.alert_text > select,
+.phpbb_alert div.alert_text > textarea,
+.phpbb_alert div.alert_text > input {
+ font-size: 1.1em;
+}
+
+#darkenwrapper {
+ display: none;
+ position: relative;
+ z-index: 44;
}
-.row .pagination span a:hover, li.pagination span a:hover {
- background-color: #d2d2d2;
+#darken {
+ position: fixed;
+ left: 0;
+ top: 0;
+ width: 100%;
+ height: 100%;
+ opacity: 0.5;
+ z-index: 45;
+}
+
+#loading_indicator {
+ background: center center no-repeat;
+ border-radius: 5px;
+ display: none;
+ opacity: 0.8;
+ margin-top: -50px;
+ margin-left: -50px;
+ height: 50px;
+ width: 50px;
+ position: fixed;
+ left: 50%;
+ top: 50%;
+ z-index: 51;
}
/* Miscellaneous styles
@@ -573,7 +935,6 @@ li.pagination {
.copyright {
padding: 5px;
text-align: center;
- color: #555555;
}
.small {
@@ -589,45 +950,43 @@ li.pagination {
}
.error {
- color: #bcbcbc;
font-weight: bold;
font-size: 1em;
}
-.reported {
- background-color: #f7f7f7;
-}
-
-li.reported:hover {
- background-color: #ececec;
-}
-
div.rules {
- background-color: #ececec;
- color: #bcbcbc;
- padding: 0 10px;
margin: 10px 0;
font-size: 1.1em;
+ padding: 5px 10px;
+ border-radius: 7px;
}
div.rules ul, div.rules ol {
margin-left: 20px;
}
-p.rules {
- background-color: #ececec;
- background-image: none;
+p.post-notice {
+ position: relative;
padding: 5px;
+ padding-left: 26px;
+ min-height: 14px;
+ margin-bottom: 1em;
}
-p.rules img {
- vertical-align: middle;
- padding-top: 5px;
+p.post-notice:before {
+ content: '';
+ display: block;
+ position: absolute;
+ top: 0;
+ bottom: 0;
+ left: 0;
+ width: 28px;
+ background: transparent none 50% 50% no-repeat;
+ pointer-events: none;
}
-p.rules a {
- vertical-align: middle;
- clear: both;
+form > p.post-notice strong {
+ line-height: 20px;
}
#top {
@@ -642,3 +1001,119 @@ p.rules a {
line-height: 1px;
background: transparent;
}
+
+.hidden {
+ display: none;
+}
+
+.smilies {
+ vertical-align: text-bottom;
+}
+
+.icon-notification {
+ position: relative;
+}
+
+.dropdown-extended {
+ display: none;
+ position: absolute;
+ left: 0;
+ width: 330px;
+ z-index: 1;
+ top: 22px;
+}
+
+.dropdown-extended ul {
+ max-height: 350px;
+ overflow-y: auto;
+ overflow-x: hidden;
+ clear: both;
+}
+
+.dropdown-extended ul li {
+ padding: 10px;
+ margin: 0;
+ float: none;
+ border-bottom: 1px solid;
+ list-style-type: none;
+ font-size: 0.95em;
+ clear: both;
+ position: relative;
+}
+
+.dropdown-extended ul li:before, .dropdown-extended ul li:after {
+ display: none;
+}
+
+.dropdown-extended .dropdown-contents {
+ max-height: none;
+ padding: 0;
+}
+
+.dropdown-extended .header {
+ padding: 0 10px;
+ font-family: Arial, "Helvetica Neue", Helvetica, Arial, sans-serif;
+ font-size: 11px;
+ font-weight: bold;
+ text-shadow: 1px 1px 1px white;
+ text-transform: uppercase;
+ line-height: 30px;
+ border-bottom: 1px solid;
+ border-radius: 5px 5px 0 0;
+}
+
+.dropdown-extended .header .header_settings {
+ float: right;
+ font-weight: normal;
+ text-transform: none;
+}
+
+.dropdown-extended .footer {
+ text-align: center;
+ font-size: 1.2em;
+}
+
+.dropdown-extended ul li a, .notification_list dt > a, .dropdown-extended .footer > a {
+ display: block;
+ text-decoration: none;
+}
+
+.notification_list ul li img {
+ float: left;
+ max-height: 50px;
+ width: auto !important;
+ height: auto !important;
+ margin-right: 5px;
+}
+
+.notification_list ul li p {
+ margin: 0;
+}
+
+.notification_list div.notifications {
+ padding: 5px;
+}
+
+.notification_list p.notifications_title {
+ font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
+ font-size: 13px !important;
+ font-weight: bold;
+}
+
+.notification_list p.notifications_time {
+ font-size: 11px !important;
+}
+
+.notification_text:after {
+ content: '';
+ clear: both;
+ display: block;
+}
+
+.compact .icon-notification > a > span, .compact .icon-pm > a > span {
+ display: none;
+}
+
+.compact .icon-notification > a > strong, .compact .icon-pm > a > strong {
+ padding-left: 2px;
+}
diff --git a/phpBB/styles/prosilver/theme/content.css b/phpBB/styles/prosilver/theme/content.css
index 5f627c8f77..33b97a0814 100644
--- a/phpBB/styles/prosilver/theme/content.css
+++ b/phpBB/styles/prosilver/theme/content.css
@@ -8,13 +8,12 @@ ul.topiclist {
}
ul.forums {
- background: #f9f9f9 none repeat-x 0 0;
+ background: transparent none repeat-x 0 0;
}
ul.topiclist li {
display: block;
list-style-type: none;
- color: #777777;
margin: 0;
}
@@ -26,20 +25,53 @@ ul.topiclist li.row dl {
padding: 2px 0;
}
-ul.topiclist dt {
+ul.topiclist dt, ul.topiclist dd {
display: block;
float: left;
- width: 50%;
+}
+
+ul.topiclist dt {
+ width: 100%;
+ margin-right: -410px;
font-size: 1.1em;
+}
+
+ul.topiclist.missing-column dt {
+ margin-right: -330px;
+}
+
+ul.topiclist.two-long-columns dt {
+ margin-right: -250px;
+}
+
+ul.topiclist.two-columns dt {
+ margin-right: -80px;
+}
+
+ul.topiclist dt .list-inner {
+ margin-right: 410px;
padding-left: 5px;
padding-right: 5px;
}
+ul.topiclist.missing-column dt .list-inner {
+ margin-right: 330px;
+}
+
+ul.topiclist.two-long-columns dt .list-inner {
+ margin-right: 250px;
+}
+
+ul.topiclist.two-columns dt .list-inner {
+ margin-right: 80px;
+}
+
ul.topiclist dd {
- display: block;
- float: left;
- border-left: 1px solid #FFFFFF;
+ border-left: 1px solid transparent;
padding: 4px 0;
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
}
ul.topiclist dfn {
@@ -65,28 +97,18 @@ ul.topiclist li.row dt a.subforum {
}
li.row {
- border-top: 1px solid #FFFFFF;
- border-bottom: 1px solid #8f8f8f;
+ border-top: 1px solid transparent;
+ border-bottom: 1px solid transparent;
}
li.row strong {
font-weight: normal;
- color: #000000;
-}
-
-li.row:hover {
- background-color: #f6f6f6;
-}
-
-li.row:hover dd {
- border-left-color: #CCCCCC;
}
li.header dt, li.header dd {
line-height: 1em;
border-left-width: 0;
margin: 2px 0 4px 0;
- color: #FFFFFF;
padding-top: 2px;
padding-bottom: 2px;
font-size: 1em;
@@ -96,17 +118,26 @@ li.header dt, li.header dd {
li.header dt {
font-weight: bold;
+ width: 100%;
+ margin-right: -410px;
+}
+
+li.header dt .list-inner {
+ margin-right: 410px;
}
li.header dd {
- margin-left: 1px;
+ padding-left: 1px;
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
}
-li.header dl.icon {
+li.header dl.icon dt, li.header dl.icon dd {
min-height: 0;
}
-li.header dl.icon dt {
+li.header dl.icon dt .list-inner {
/* Tweak for headers alignment when folder icon used */
padding-left: 0;
padding-right: 50px;
@@ -114,19 +145,37 @@ li.header dl.icon dt {
/* Forum list column styles */
dl.icon {
- min-height: 35px;
background-position: 10px 50%; /* Position of folder icon */
background-repeat: no-repeat;
}
dl.icon dt {
- padding-left: 45px; /* Space for folder icon */
background-repeat: no-repeat;
background-position: 5px 95%; /* Position of topic icon */
}
-dd.posts, dd.topics, dd.views {
- width: 8%;
+dl.icon dt .list-inner {
+ padding-left: 45px; /* Space for folder icon */
+}
+
+dl.icon dt, dl.icon dd {
+ min-height: 35px;
+}
+
+dl a.icon-link { /* topic row icon links */
+ display: block;
+ width: 30px;
+ height: 30px;
+ padding: 0;
+ position: absolute;
+ top: 50%;
+ left: 0;
+ margin-top: -15px;
+ margin-left: 9px;
+}
+
+dd.posts, dd.topics, dd.views, dd.extra, dd.mark {
+ width: 80px;
text-align: center;
line-height: 2.2em;
font-size: 1.2em;
@@ -144,74 +193,35 @@ dl.icon dt li {
list-style-type: inherit;
}
-dd.lastpost {
- width: 25%;
+dd.lastpost, dd.redirect, dd.moderation, dd.time, dd.info {
+ width: 250px;
font-size: 1.1em;
}
dd.redirect {
- font-size: 1.1em;
line-height: 2.5em;
}
-dd.moderation {
- font-size: 1.1em;
-}
-
-dd.lastpost span, ul.topiclist dd.searchby span, ul.topiclist dd.info span, ul.topiclist dd.time span, dd.redirect span, dd.moderation span {
- display: block;
- padding-left: 5px;
-}
-
dd.time {
- width: auto;
line-height: 200%;
- font-size: 1.1em;
}
-dd.extra {
- width: 12%;
- line-height: 200%;
- text-align: center;
- font-size: 1.1em;
+dd.lastpost span, ul.topiclist dd.info span, ul.topiclist dd.time span, dd.redirect span, dd.moderation span {
+ display: block;
+ padding-left: 5px;
}
-dd.mark {
- float: right !important;
- width: 9%;
- text-align: center;
+dd.extra, dd.mark {
line-height: 200%;
- font-size: 1.2em;
-}
-
-dd.info {
- width: 30%;
}
dd.option {
- width: 15%;
+ width: 125px;
line-height: 200%;
text-align: center;
font-size: 1.1em;
}
-dd.searchby {
- width: 47%;
- font-size: 1.1em;
- line-height: 1em;
-}
-
-ul.topiclist dd.searchextra {
- margin-left: 5px;
- padding: 0.2em 0;
- font-size: 1.1em;
- color: #333333;
- border-left: none;
- clear: both;
- width: 98%;
- overflow: hidden;
-}
-
/* Container for post/reply buttons and pagination */
.topic-actions {
margin-bottom: 3px;
@@ -228,10 +238,8 @@ div[class].topic-actions {
.postbody {
padding: 0;
line-height: 1.48em;
- color: #333333;
width: 76%;
float: left;
- clear: both;
}
.postbody .ignore {
@@ -245,6 +253,7 @@ div[class].topic-actions {
.postbody h3 {
/* Postbody requires a different h3 format - so change it here */
+ float: left;
font-size: 1.5em;
padding: 2px 0 0 0;
margin: 0 0 0.3em 0 !important;
@@ -261,6 +270,7 @@ div[class].topic-actions {
.postbody .content {
font-size: 1.3em;
+ overflow-x: auto;
}
.search .postbody {
@@ -300,34 +310,27 @@ div[class].topic-actions {
/* MCP Post details
----------------------------------------*/
-#post_details
-{
+#post_details {
/* This will only work in IE7+, plus the others */
overflow: auto;
max-height: 300px;
}
-#expand
-{
- clear: both;
-}
-
/* Content container styles
----------------------------------------*/
.content {
+ clear: both;
min-height: 3em;
overflow: hidden;
line-height: 1.4em;
font-family: "Lucida Grande", "Trebuchet MS", Verdana, Helvetica, Arial, sans-serif;
font-size: 1em;
- color: #333333;
padding-bottom: 1px;
}
.content h2, .panel h2 {
font-weight: normal;
- color: #989898;
- border-bottom: 1px solid #CCCCCC;
+ border-bottom: 1px solid transparent;
font-size: 1.6em;
margin-top: 0.5em;
margin-bottom: 0.5em;
@@ -351,6 +354,10 @@ div[class].topic-actions {
line-height: 1.4em;
}
+span.corners-top, span.corners-bottom {
+ display: none;
+}
+
dl.faq {
font-family: "Lucida Grande", Verdana, Helvetica, Arial, sans-serif;
font-size: 1.1em;
@@ -361,7 +368,6 @@ dl.faq {
dl.faq dt {
font-weight: bold;
- color: #333333;
}
.content dl.faq {
@@ -379,24 +385,17 @@ dl.faq dt {
}
.posthilit {
- background-color: #f3f3f3;
- color: #BCBCBC;
padding: 0 2px 1px 2px;
}
-.announce, .unreadpost {
- /* Highlight the announcements & unread posts box */
- border-left-color: #BCBCBC;
- border-right-color: #BCBCBC;
-}
-
/* Post author */
p.author {
- margin: 0 15em 0.6em 0;
+ margin-bottom: 0.6em;
padding: 0 0 5px 0;
font-family: Verdana, Helvetica, Arial, sans-serif;
font-size: 1em;
line-height: 1.2em;
+ clear: both;
}
/* Post signature */
@@ -404,13 +403,18 @@ p.author {
margin-top: 1.5em;
padding-top: 0.2em;
font-size: 1.1em;
- border-top: 1px solid #CCCCCC;
+ border-top: 1px solid transparent;
clear: left;
line-height: 140%;
overflow: hidden;
width: 100%;
}
+.signature.standalone {
+ border-top-width: 0;
+ margin-top: 0;
+}
+
dd .signature {
margin: 0;
padding: 0;
@@ -434,7 +438,7 @@ dd .signature {
margin-top: 1.5em;
padding-top: 0.2em;
font-size: 1em;
- border-top: 1px dashed #CCCCCC;
+ border-top: 1px dashed transparent;
clear: left;
line-height: 130%;
}
@@ -450,8 +454,8 @@ ul.searchresults {
----------------------------------------*/
/* Quote block */
blockquote {
- background: #ebebeb none 6px 8px no-repeat;
- border: 1px solid #dbdbdb;
+ background: transparent none 6px 8px no-repeat;
+ border: 1px solid transparent;
font-size: 0.95em;
margin: 0.5em 1px 0 25px;
overflow: hidden;
@@ -460,16 +464,10 @@ blockquote {
blockquote blockquote {
/* Nested quotes */
- background-color: #bababa;
font-size: 1em;
margin: 0.5em 1px 0 15px;
}
-blockquote blockquote blockquote {
- /* Nested quotes */
- background-color: #e4e4e4;
-}
-
blockquote cite {
/* Username/source of quoter */
font-style: normal;
@@ -488,27 +486,26 @@ blockquote.uncited {
}
/* Code block */
-dl.codebox {
+.codebox {
padding: 3px;
- background-color: #FFFFFF;
- border: 1px solid #d8d8d8;
+ border: 1px solid transparent;
font-size: 1em;
}
-dl.codebox dt {
+.codebox p {
text-transform: uppercase;
- border-bottom: 1px solid #CCCCCC;
+ border-bottom: 1px solid transparent;
margin-bottom: 3px;
font-size: 0.8em;
font-weight: bold;
display: block;
}
-blockquote dl.codebox {
+blockquote .codebox {
margin-left: 0;
}
-dl.codebox code {
+.codebox code {
/* Also see tweaks.css */
overflow: auto;
display: block;
@@ -518,31 +515,22 @@ dl.codebox code {
padding-top: 5px;
font: 0.9em Monaco, "Andale Mono","Courier New", Courier, mono;
line-height: 1.3em;
- color: #8b8b8b;
margin: 2px 0;
}
-.syntaxbg { color: #FFFFFF; }
-.syntaxcomment { color: #000000; }
-.syntaxdefault { color: #bcbcbc; }
-.syntaxhtml { color: #000000; }
-.syntaxkeyword { color: #585858; }
-.syntaxstring { color: #a7a7a7; }
-
/* Attachments
----------------------------------------*/
.attachbox {
float: left;
width: auto;
+ max-width: 100%;
margin: 5px 5px 5px 0;
padding: 6px;
- background-color: #FFFFFF;
- border: 1px dashed #d8d8d8;
+ border: 1px dashed transparent;
clear: left;
-}
-
-.pm-message .attachbox {
- background-color: #f3f3f3;
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
}
.attachbox dt {
@@ -554,7 +542,8 @@ dl.codebox code {
margin-top: 4px;
padding-top: 4px;
clear: left;
- border-top: 1px solid #d8d8d8;
+ border-top: 1px solid transparent;
+ overflow-x: auto;
}
.attachbox dd dd {
@@ -563,7 +552,6 @@ dl.codebox code {
.attachbox p {
line-height: 110%;
- color: #666666;
font-weight: normal;
clear: left;
}
@@ -571,20 +559,19 @@ dl.codebox code {
.attachbox p.stats
{
line-height: 110%;
- color: #666666;
font-weight: normal;
clear: left;
}
.attach-image {
margin: 3px 0;
- width: 100%;
+ max-width: 100%;
max-height: 350px;
overflow: auto;
}
.attach-image img {
- border: 1px solid #999999;
+ border: 1px solid transparent;
/* cursor: move; */
cursor: default;
}
@@ -613,19 +600,16 @@ dl.file dt {
}
dl.file dd {
- color: #666666;
margin: 0;
padding: 0;
}
dl.thumbnail img {
padding: 3px;
- border: 1px solid #666666;
- background-color: #FFF;
+ border: 1px solid transparent;
}
dl.thumbnail dd {
- color: #666666;
font-style: italic;
font-family: Verdana, Arial, Helvetica, sans-serif;
}
@@ -634,12 +618,8 @@ dl.thumbnail dd {
font-size: 100%;
}
-dl.thumbnail dt a:hover {
- background-color: #EEEEEE;
-}
-
dl.thumbnail dt a:hover img {
- border: 1px solid #d2d2d2;
+ border: 1px solid transparent;
}
/* Post poll styles
@@ -650,15 +630,13 @@ fieldset.polls {
fieldset.polls dl {
margin-top: 5px;
- border-top: 1px solid #e2e2e2;
+ border-top: 1px solid transparent;
padding: 5px 0 0 0;
line-height: 120%;
- color: #666666;
}
fieldset.polls dl.voted {
font-weight: bold;
- color: #000000;
}
fieldset.polls dt {
@@ -692,41 +670,21 @@ fieldset.polls dd input {
fieldset.polls dd div {
text-align: right;
font-family: Arial, Helvetica, sans-serif;
- color: #FFFFFF;
font-weight: bold;
padding: 0 2px;
overflow: visible;
- min-width: 2%;
-}
-
-.pollbar1 {
- background-color: #aaaaaa;
- border-bottom: 1px solid #747474;
- border-right: 1px solid #747474;
-}
-
-.pollbar2 {
- background-color: #bebebe;
- border-bottom: 1px solid #8c8c8c;
- border-right: 1px solid #8c8c8c;
+ min-width: 8px;
}
-.pollbar3 {
- background-color: #D1D1D1;
- border-bottom: 1px solid #aaaaaa;
- border-right: 1px solid #aaaaaa;
+.pollbar1, .pollbar2, .pollbar3, .pollbar4, .pollbar5 {
+ border-bottom: 1px solid transparent;
+ border-right: 1px solid transparent;
}
-.pollbar4 {
- background-color: #e4e4e4;
- border-bottom: 1px solid #bebebe;
- border-right: 1px solid #bebebe;
-}
-
-.pollbar5 {
- background-color: #f8f8f8;
- border-bottom: 1px solid #D1D1D1;
- border-right: 1px solid #D1D1D1;
+.vote-submitted {
+ font-size: 1.2em;
+ font-weight: bold;
+ text-align: center;
}
/* Poster profile block
@@ -735,31 +693,42 @@ fieldset.polls dd div {
/* Also see tweaks.css */
margin: 5px 0 10px 0;
min-height: 80px;
- color: #666666;
- border-left: 1px solid #FFFFFF;
+ border: 1px solid transparent;
+ border-width: 0 0 0 1px;
width: 22%;
float: right;
display: inline;
}
-.pm .postprofile {
- border-left: 1px solid #DDDDDD;
-}
.postprofile dd, .postprofile dt {
line-height: 1.2em;
margin-left: 8px;
}
+.postprofile dd {
+ overflow: hidden;
+ text-overflow: ellipsis;
+}
+
.postprofile strong {
font-weight: normal;
- color: #000000;
}
-.avatar {
+.postprofile dt.no-profile-rank, .postprofile dd.profile-rank, .postprofile .search-result-date {
+ margin-bottom: 10px;
+}
+
+.postprofile .avatar {
+ display: block;
border: none;
margin-bottom: 3px;
}
+.postprofile .avatar img {
+ max-width: 90%;
+ height: auto !important;
+}
+
.online {
background-image: none;
background-position: 100% 0;
@@ -783,4 +752,42 @@ dl.pmlist dt textarea {
dl.pmlist dd {
margin-left: 61% !important;
margin-bottom: 2px;
-} \ No newline at end of file
+}
+
+.topic-actions div.dl_links {
+ padding: 10px 0 0 10px;
+}
+
+div.dl_links {
+ display: inline-block;
+ text-transform: none;
+}
+
+.dl_links strong {
+ font-weight: bold;
+}
+
+.dl_links ul {
+ list-style-type: none;
+ margin: 0;
+ display: inline-block;
+}
+
+.dl_links li {
+ display: inline-block;
+}
+
+/* Show scrollbars for items with overflow on iOS devices
+----------------------------------------*/
+.postbody .content::-webkit-scrollbar, #topicreview::-webkit-scrollbar, #post_details::-webkit-scrollbar, .codebox code::-webkit-scrollbar, .attachbox dd::-webkit-scrollbar, .attach-image::-webkit-scrollbar, .dropdown-extended ul::-webkit-scrollbar {
+ width: 8px;
+ height: 8px;
+ -webkit-appearance: none;
+ background: rgba(0, 0, 0, .1);
+ border-radius: 3px;
+}
+
+.postbody .content::-webkit-scrollbar-thumb, #topicreview::-webkit-scrollbar-thumb, #post_details::-webkit-scrollbar-thumb, .codebox code::-webkit-scrollbar-thumb, .attachbox dd::-webkit-scrollbar-thumb, .attach-image::-webkit-scrollbar-thumb, .dropdown-extended ul::-webkit-scrollbar-thumb {
+ background: rgba(0, 0, 0, .3);
+ border-radius: 3px;
+}
diff --git a/phpBB/styles/prosilver/theme/cp.css b/phpBB/styles/prosilver/theme/cp.css
index 7c7158bd00..61df82c0ce 100644
--- a/phpBB/styles/prosilver/theme/cp.css
+++ b/phpBB/styles/prosilver/theme/cp.css
@@ -20,46 +20,40 @@
padding: 0;
}
-#cp-main h3, #cp-main hr, #cp-menu hr {
- border-color: #bfbfbf;
-}
-
-#cp-main .panel p {
+.panel-container .panel p {
font-size: 1.1em;
}
-#cp-main .panel ol {
+.panel-container .panel ol {
margin-left: 2em;
font-size: 1.1em;
}
-#cp-main .panel li.row {
- border-bottom: 1px solid #cbcbcb;
- border-top: 1px solid #F9F9F9;
+.panel-container .panel li.row {
+ border-bottom: 1px solid transparent;
+ border-top: 1px solid transparent;
}
ul.cplist {
margin-bottom: 5px;
- border-top: 1px solid #cbcbcb;
+ border-top: 1px solid transparent;
}
-#cp-main .panel li.header dd, #cp-main .panel li.header dt {
- color: #000000;
+.panel-container .panel li.header dd, .panel-container .panel li.header dt {
margin-bottom: 2px;
}
-#cp-main table.table1 {
+.panel-container table.table1 {
margin-bottom: 1em;
}
-#cp-main table.table1 thead th {
- color: #333333;
+.panel-container table.table1 thead th {
font-weight: bold;
- border-bottom: 1px solid #333333;
+ border-bottom: 1px solid transparent;
padding: 5px;
}
-#cp-main table.table1 tbody th {
+.panel-container table.table1 tbody th {
font-style: italic;
background-color: transparent !important;
border-bottom: none;
@@ -76,9 +70,8 @@ ul.cplist {
}
#cp-main .pm-message {
- border: 1px solid #e2e2e2;
+ border: 1px solid transparent;
margin: 10px 0;
- background-color: #FFFFFF;
width: auto;
float: none;
}
@@ -109,11 +102,6 @@ ul.cplist {
margin-bottom: 0px;
}
-.tabs-container #minitabs {
- float: right;
- margin-top: 19px;
-}
-
.tabs-container:after {
display: block;
clear: both;
@@ -125,7 +113,7 @@ ul.cplist {
#tabs {
line-height: normal;
margin: 20px 0 -1px 7px;
- min-width: 570px;
+ *overflow: hidden;
}
#tabs ul {
@@ -134,6 +122,12 @@ ul.cplist {
list-style: none;
}
+#tabs ul:after {
+ content: '';
+ display: block;
+ clear: both;
+}
+
#tabs li {
display: inline;
margin: 0;
@@ -157,23 +151,17 @@ ul.cplist {
display: block;
background: none no-repeat 100% -35px;
padding: 6px 10px 6px 5px;
- color: #828282;
white-space: nowrap;
}
-#tabs a:hover span {
- color: #bcbcbc;
-}
-
#tabs .activetab a {
background-position: 0 0;
- border-bottom: 1px solid #ebebeb;
+ border-bottom: 1px solid transparent;
}
#tabs .activetab a span {
background-position: 100% 0;
padding-bottom: 7px;
- color: #333333;
}
#tabs a:hover {
@@ -189,7 +177,6 @@ ul.cplist {
}
#tabs .activetab a:hover span {
- color: #000000;
background-position: 100% 0;
}
@@ -200,6 +187,12 @@ ul.cplist {
margin: -20px 7px 0 0;
}
+.tabs-container #minitabs {
+ float: right;
+ margin-top: 19px;
+ max-width: 50%;
+}
+
#minitabs ul {
margin:0;
padding: 0;
@@ -209,10 +202,11 @@ ul.cplist {
#minitabs li {
display: block;
float: right;
- padding: 0 10px 4px 10px;
+ border-top-left-radius: 5px;
+ border-top-right-radius: 5px;
+ padding: 5px 10px 4px 10px;
font-size: 1em;
font-weight: bold;
- background-color: #f2f2f2;
margin-left: 2px;
}
@@ -223,14 +217,95 @@ ul.cplist {
text-decoration: none;
}
-#minitabs li.activetab {
- background-color: #F9F9F9;
+/* Responsive tabs
+----------------------------------------*/
+.responsive-tab {
+ position: relative;
+}
+
+.responsive-tab .responsive-tab-link span {
+ display: inline-block;
+ font-size: 16px;
+ position: relative;
+ width: 16px;
+ line-height: 14px;
+ text-decoration: none;
+}
+
+#minitabs .responsive-tab .responsive-tab-link span {
+ display: block;
+}
+
+.responsive-tab .responsive-tab-link span:before {
+ content: '';
+ position: absolute;
+ left: 5px;
+ top: 8px;
+ height: .125em;
+ width: 14px;
+ border-bottom: 0.125em solid transparent;
+ border-top: 0.375em double transparent;
+}
+
+#minitabs .responsive-tab .responsive-tab-link span:before {
+ left: 0;
+ top: 2px;
+}
+
+#tabs ul, #minitabs ul {
+ position: relative;
+}
+
+#tabs .dropdown, #minitabs .dropdown {
+ top: 29px;
+ margin-right: -1px;
+}
+
+#minitabs .dropdown {
+ top: 18px;
+}
+
+#tabs .dropdown-up .dropdown, #minitabs .dropdown-up .dropdown {
+ bottom: -5px;
+ top: auto;
+}
+
+#minitabs .dropdown-up .dropdown {
+ bottom: 18px;
+}
+
+#tabs .dropdown-right .dropdown, #minitabs .dropdown-right .dropdown {
+ margin-left: -41px;
+}
+
+#tabs .dropdown li, #minitabs .dropdown li {
+ display: block !important;
+ background: transparent none;
+ padding: 0;
+}
+
+.tabs-container #minitabs .dropdown a span {
+ display: block;
+}
+
+#tabs .dropdown a, #tabs .dropdown a span, #minitabs .dropdown a, #minitabs .dropdown a span {
+ background: transparent;
+ float: none;
+ margin: 0;
+ padding: 0;
+ text-align: right;
+}
+
+.tabs-container #minitabs .dropdown a span {
+ text-align: left;
}
-#minitabs li.activetab a, #minitabs li.activetab a:hover {
- color: #333333;
+#tabs .dropdown a span, #minitabs .dropdown a span {
+ padding: 5px 8px;
+ color: inherit !important;
}
+
/* UCP navigation menu
----------------------------------------*/
/* Container for sub-navigation list */
@@ -258,92 +333,38 @@ ul.cplist {
margin: 1px 0;
text-decoration: none;
font-weight: bold;
- color: #333;
- background: #cfcfcf none repeat-y 100% 0;
+ background: transparent none repeat-y 100% 0;
}
#navigation a:hover {
text-decoration: none;
- background-color: #c6c6c6;
- color: #bcbcbc;
background-image: none;
}
#navigation #active-subsection a {
display: block;
- color: #d3d3d3;
- background-color: #F9F9F9;
background-image: none;
}
-#navigation #active-subsection a:hover {
- color: #d3d3d3;
-}
-
/* Preferences pane layout
----------------------------------------*/
#cp-main h2 {
border-bottom: none;
padding: 0;
margin-left: 10px;
- color: #333333;
-}
-
-#cp-main .panel {
- background-color: #F9F9F9;
-}
-
-#cp-main .pm {
- background-color: #FFFFFF;
-}
-
-#cp-main span.corners-top, #cp-menu span.corners-top {
- background-image: none;
-}
-
-#cp-main span.corners-top span, #cp-menu span.corners-top span {
- background-image: none;
-}
-
-#cp-main span.corners-bottom, #cp-menu span.corners-bottom {
- background-image: none;
-}
-
-#cp-main span.corners-bottom span, #cp-menu span.corners-bottom span {
- background-image: none;
-}
-
-/* Topicreview */
-#cp-main .panel #topicreview span.corners-top, #cp-menu .panel #topicreview span.corners-top {
- background-image: none;
-}
-
-#cp-main .panel #topicreview span.corners-top span, #cp-menu .panel #topicreview span.corners-top span {
- background-image: none;
-}
-
-#cp-main .panel #topicreview span.corners-bottom, #cp-menu .panel #topicreview span.corners-bottom {
- background-image: none;
-}
-
-#cp-main .panel #topicreview span.corners-bottom span, #cp-menu .panel #topicreview span.corners-bottom span {
- background-image: none;
}
/* Friends list */
.cp-mini {
- background-color: #f9f9f9;
- padding: 0 5px;
margin: 10px 15px 10px 5px;
-}
-
-.cp-mini span.corners-top, .cp-mini span.corners-bottom {
- margin: 0 -5px;
+ max-height: 200px;
+ overflow-y: auto;
+ padding: 5px 10px;
+ border-radius: 7px;
}
dl.mini dt {
font-weight: bold;
- color: #676767;
}
dl.mini dd {
@@ -364,25 +385,6 @@ dl.mini dd {
line-height: 2.5em;
}
-/* PM panel adjustments */
-.reply-all a.left {
- background-position: 3px 60%;
-}
-
-.reply-all a.left:hover {
- background-position: 0px 60%;
-}
-
-.reply-all {
- font-size: 11px;
- padding-top: 5px;
-}
-
-/* PM Message history */
-.current {
- color: #999999;
-}
-
/* Defined rules list for PM options */
ol.def-rules {
padding-left: 0;
@@ -403,31 +405,16 @@ ol.def-rules li {
}
.pmlist li.pm_message_reported_colour, .pm_message_reported_colour {
- border-left-color: #bcbcbc;
- border-right-color: #bcbcbc;
-}
-
-.pmlist li.pm_marked_colour, .pm_marked_colour {
- padding: 0;
- border: solid 3px #ffffff;
- border-width: 0 3px;
-}
-
-.pmlist li.pm_replied_colour, .pm_replied_colour {
- padding: 0;
- border: solid 3px #c2c2c2;
- border-width: 0 3px;
-}
-
-.pmlist li.pm_friend_colour, .pm_friend_colour {
- padding: 0;
- border: solid 3px #bdbdbd;
- border-width: 0 3px;
+ border-left-color: transparent;
+ border-right-color: transparent;
}
+.pmlist li.pm_marked_colour, .pm_marked_colour,
+.pmlist li.pm_replied_colour, .pm_replied_colour,
+.pmlist li.pm_friend_colour, .pm_friend_colour,
.pmlist li.pm_foe_colour, .pm_foe_colour {
padding: 0;
- border: solid 3px #000000;
+ border: solid 3px transparent;
border-width: 0 3px;
}
@@ -446,11 +433,44 @@ ol.def-rules li {
margin: 10px;
padding: 5px;
width: auto;
- background: #FFFFFF;
- border: 1px solid #CCC;
+ border: 1px solid transparent;
text-align: center;
}
-#gallery label:hover {
- background-color: #EEE;
+/* Responsive *CP navigation
+----------------------------------------*/
+@media only screen and (max-width: 900px), only screen and (max-device-width: 900px)
+{
+ .nojs #tabs a span, .nojs #minitabs a span {
+ max-width: 40px;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ letter-spacing: -.5px;
+ }
+
+ #cp-menu, #navigation, #cp-main {
+ float: none;
+ width: auto;
+ margin: 0;
+ }
+
+ #navigation {
+ padding: 0;
+ margin: 0 auto;
+ max-width: 320px;
+ }
+
+ #navigation a {
+ background-image: none;
+ }
+
+ #navigation li:first-child a {
+ border-top-left-radius: 5px;
+ border-top-right-radius: 5px;
+ }
+
+ #navigation li:last-child a {
+ border-bottom-left-radius: 5px;
+ border-bottom-right-radius: 5px;
+ }
}
diff --git a/phpBB/styles/prosilver/imageset/en/icon_contact_pm.gif b/phpBB/styles/prosilver/theme/en/icon_contact_pm.gif
index ec190118fe..ec190118fe 100644
--- a/phpBB/styles/prosilver/imageset/en/icon_contact_pm.gif
+++ b/phpBB/styles/prosilver/theme/en/icon_contact_pm.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/en/icon_post_edit.gif b/phpBB/styles/prosilver/theme/en/icon_post_edit.gif
index 19006f95a7..19006f95a7 100644
--- a/phpBB/styles/prosilver/imageset/en/icon_post_edit.gif
+++ b/phpBB/styles/prosilver/theme/en/icon_post_edit.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/en/icon_post_quote.gif b/phpBB/styles/prosilver/theme/en/icon_post_quote.gif
index c3708a1477..c3708a1477 100644
--- a/phpBB/styles/prosilver/imageset/en/icon_post_quote.gif
+++ b/phpBB/styles/prosilver/theme/en/icon_post_quote.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/en/icon_user_online.gif b/phpBB/styles/prosilver/theme/en/icon_user_online.gif
index 6b571ffce0..6b571ffce0 100644
--- a/phpBB/styles/prosilver/imageset/en/icon_user_online.gif
+++ b/phpBB/styles/prosilver/theme/en/icon_user_online.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/theme/en/stylesheet.css b/phpBB/styles/prosilver/theme/en/stylesheet.css
new file mode 100644
index 0000000000..82b7df0830
--- /dev/null
+++ b/phpBB/styles/prosilver/theme/en/stylesheet.css
@@ -0,0 +1,34 @@
+/* Set profile icon dimensions */
+ul.profile-icons li.pm-icon { width: 28px; height: 20px; }
+ul.profile-icons li.quote-icon { width: 54px; height: 20px; }
+ul.profile-icons li.edit-icon { width: 42px; height: 20px; }
+
+/* Online image */
+.online { background-image: url("./icon_user_online.gif"); }
+
+/* Icon images */
+.pm-icon, .pm-icon a { background-image: url("./icon_contact_pm.gif"); }
+.quote-icon, .quote-icon a { background-image: url("./icon_post_quote.gif"); }
+.edit-icon, .edit-icon a { background-image: url("./icon_post_edit.gif"); }
+
+/* EN Language Pack */
+.imageset.icon_contact_pm {
+ background-image: url("./icon_contact_pm.gif");
+ padding-left: 28px;
+ padding-top: 20px;
+}
+.imageset.icon_post_edit {
+ background-image: url("./icon_post_edit.gif");
+ padding-left: 42px;
+ padding-top: 20px;
+}
+.imageset.icon_post_quote {
+ background-image: url("./icon_post_quote.gif");
+ padding-left: 54px;
+ padding-top: 20px;
+}
+.imageset.icon_user_online {
+ background-image: url("./icon_user_online.gif");
+ padding-left: 58px;
+ padding-top: 58px;
+}
diff --git a/phpBB/styles/prosilver/theme/forms.css b/phpBB/styles/prosilver/theme/forms.css
index 3926da7139..64d2df2d1a 100644
--- a/phpBB/styles/prosilver/theme/forms.css
+++ b/phpBB/styles/prosilver/theme/forms.css
@@ -11,7 +11,6 @@ fieldset {
input {
font-weight: normal;
- cursor: pointer;
vertical-align: middle;
padding: 0 3px;
font-size: 1em;
@@ -23,9 +22,8 @@ select {
font-weight: normal;
cursor: pointer;
vertical-align: middle;
- border: 1px solid #666666;
+ border: 1px solid transparent;
padding: 1px;
- background-color: #FAFAFA;
font-size: 1em;
}
@@ -37,8 +35,9 @@ option {
padding-right: 1em;
}
-option.disabled-option {
- color: graytext;
+select optgroup option {
+ padding-right: 1em;
+ font-family: Verdana, Helvetica, Arial, sans-serif;
}
textarea {
@@ -52,7 +51,6 @@ textarea {
label {
cursor: default;
padding-right: 5px;
- color: #676767;
}
label input {
@@ -93,10 +91,6 @@ fieldset.fields1 dd {
border-left-width: 0;
}
-fieldset.fields1 {
- background-color: transparent;
-}
-
fieldset.fields1 div {
margin-bottom: 3px;
}
@@ -125,7 +119,6 @@ dt label {
dd label {
white-space: nowrap;
- color: #333;
}
dd input, dd textarea {
@@ -141,22 +134,10 @@ dd textarea {
}
/* Hover effects */
-fieldset dl:hover dt label {
- color: #000000;
-}
-
-fieldset.fields2 dl:hover dt label {
- color: inherit;
-}
-
#timezone {
width: 95%;
}
-* html #timezone {
- width: 50%;
-}
-
/* Quick-login on index page */
fieldset.quick-login {
margin-top: 5px;
@@ -170,7 +151,6 @@ fieldset.quick-login input.inputbox {
width: 15%;
vertical-align: middle;
margin-right: 5px;
- background-color: #f3f3f3;
}
fieldset.quick-login label {
@@ -225,7 +205,11 @@ fieldset.forum-selection2 {
fieldset.jumpbox {
text-align: right;
margin-top: 15px;
- height: 2.5em;
+ min-height: 2.5em;
+}
+
+fieldset.jumpbox select {
+ max-width: 50%;
}
fieldset.quickmod {
@@ -272,7 +256,7 @@ fieldset.submit-buttons input {
min-width: 100%;
max-width: 100%;
font-size: 1.2em;
- color: #333333;
+ resize: vertical;
}
/* Emoticons panel */
@@ -288,20 +272,12 @@ fieldset.submit-buttons input {
/* Input field styles
---------------------------------------- */
.inputbox {
- background-color: #FFFFFF;
- border: 1px solid #c0c0c0;
- color: #333333;
+ border: 1px solid transparent;
padding: 2px;
- cursor: text;
}
-.inputbox:hover {
- border: 1px solid #eaeaea;
-}
-
-.inputbox:focus {
- border: 1px solid #eaeaea;
- color: #4b4b4b;
+.inputbox:hover, .inputbox:focus {
+ border: 1px solid transparent;
outline-style: none;
}
@@ -318,6 +294,15 @@ textarea.inputbox {
width: auto !important;
}
+input[type="search"] {
+ -webkit-appearance: textfield;
+ -webkit-box-sizing: content-box;
+}
+
+input[type="search"]::-webkit-search-decoration, input[type="search"]::-webkit-search-results-button, input[type="search"]::-webkit-search-results-decoration {
+ display: none;
+}
+
/* Form button styles
---------------------------------------- */
input.button1, input.button2 {
@@ -329,13 +314,12 @@ a.button1, input.button1, input.button3, a.button2, input.button2 {
padding-top: 1px;
padding-bottom: 1px;
font-family: "Lucida Grande", Verdana, Helvetica, Arial, sans-serif;
- color: #000;
- background: #FAFAFA none repeat-x top left;
+ background: transparent none repeat-x top left;
}
a.button1, input.button1 {
font-weight: bold;
- border: 1px solid #666666;
+ border: 1px solid transparent;
}
input.button3 {
@@ -347,15 +331,18 @@ input.button3 {
font-variant: small-caps;
}
+input[type="button"], input[type="submit"], input[type="reset"], input[type="checkbox"], input[type="radio"] {
+ cursor: pointer;
+}
+
/* Alternative button */
a.button2, input.button2, input.button3 {
- border: 1px solid #666666;
+ border: 1px solid transparent;
}
/* <a> button in the style of the form buttons */
a.button1, a.button1:link, a.button1:visited, a.button1:active, a.button2, a.button2:link, a.button2:visited, a.button2:active {
text-decoration: none;
- color: #000000;
padding: 2px 8px;
line-height: 250%;
vertical-align: text-bottom;
@@ -364,14 +351,12 @@ a.button1, a.button1:link, a.button1:visited, a.button1:active, a.button2, a.but
/* Hover states */
a.button1:hover, input.button1:hover, a.button2:hover, input.button2:hover, input.button3:hover {
- border: 1px solid #BCBCBC;
+ border: 1px solid transparent;
background-position: 0 100%;
- color: #BCBCBC;
}
input.disabled {
font-weight: normal;
- color: #666666;
}
/* Focus states */
diff --git a/phpBB/styles/prosilver/theme/images/alert_close.png b/phpBB/styles/prosilver/theme/images/alert_close.png
new file mode 100644
index 0000000000..79750a013c
--- /dev/null
+++ b/phpBB/styles/prosilver/theme/images/alert_close.png
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/announce_read.gif b/phpBB/styles/prosilver/theme/images/announce_read.gif
index 33e4a5e852..33e4a5e852 100644
--- a/phpBB/styles/prosilver/imageset/announce_read.gif
+++ b/phpBB/styles/prosilver/theme/images/announce_read.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/announce_read_locked.gif b/phpBB/styles/prosilver/theme/images/announce_read_locked.gif
index 76ead8a02c..76ead8a02c 100644
--- a/phpBB/styles/prosilver/imageset/announce_read_locked.gif
+++ b/phpBB/styles/prosilver/theme/images/announce_read_locked.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/announce_read_locked_mine.gif b/phpBB/styles/prosilver/theme/images/announce_read_locked_mine.gif
index 2105d21f10..2105d21f10 100644
--- a/phpBB/styles/prosilver/imageset/announce_read_locked_mine.gif
+++ b/phpBB/styles/prosilver/theme/images/announce_read_locked_mine.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/announce_read_mine.gif b/phpBB/styles/prosilver/theme/images/announce_read_mine.gif
index ad928330e6..ad928330e6 100644
--- a/phpBB/styles/prosilver/imageset/announce_read_mine.gif
+++ b/phpBB/styles/prosilver/theme/images/announce_read_mine.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/announce_unread.gif b/phpBB/styles/prosilver/theme/images/announce_unread.gif
index 4a789f70f0..4a789f70f0 100644
--- a/phpBB/styles/prosilver/imageset/announce_unread.gif
+++ b/phpBB/styles/prosilver/theme/images/announce_unread.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/announce_unread_locked.gif b/phpBB/styles/prosilver/theme/images/announce_unread_locked.gif
index 76dcc6ca71..76dcc6ca71 100644
--- a/phpBB/styles/prosilver/imageset/announce_unread_locked.gif
+++ b/phpBB/styles/prosilver/theme/images/announce_unread_locked.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/announce_unread_locked_mine.gif b/phpBB/styles/prosilver/theme/images/announce_unread_locked_mine.gif
index 53782fc3dc..53782fc3dc 100644
--- a/phpBB/styles/prosilver/imageset/announce_unread_locked_mine.gif
+++ b/phpBB/styles/prosilver/theme/images/announce_unread_locked_mine.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/announce_unread_mine.gif b/phpBB/styles/prosilver/theme/images/announce_unread_mine.gif
index e01e920b59..e01e920b59 100644
--- a/phpBB/styles/prosilver/imageset/announce_unread_mine.gif
+++ b/phpBB/styles/prosilver/theme/images/announce_unread_mine.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/theme/images/buttons.png b/phpBB/styles/prosilver/theme/images/buttons.png
new file mode 100644
index 0000000000..3a8c2f2f65
--- /dev/null
+++ b/phpBB/styles/prosilver/theme/images/buttons.png
Binary files differ
diff --git a/phpBB/styles/prosilver/theme/images/corners_left.gif b/phpBB/styles/prosilver/theme/images/corners_left.gif
deleted file mode 100644
index 206e50368d..0000000000
--- a/phpBB/styles/prosilver/theme/images/corners_left.gif
+++ /dev/null
Binary files differ
diff --git a/phpBB/styles/prosilver/theme/images/corners_left.png b/phpBB/styles/prosilver/theme/images/corners_left.png
deleted file mode 100644
index 256bde3daa..0000000000
--- a/phpBB/styles/prosilver/theme/images/corners_left.png
+++ /dev/null
Binary files differ
diff --git a/phpBB/styles/prosilver/theme/images/corners_right.gif b/phpBB/styles/prosilver/theme/images/corners_right.gif
deleted file mode 100644
index 0ba66d50b2..0000000000
--- a/phpBB/styles/prosilver/theme/images/corners_right.gif
+++ /dev/null
Binary files differ
diff --git a/phpBB/styles/prosilver/theme/images/corners_right.png b/phpBB/styles/prosilver/theme/images/corners_right.png
deleted file mode 100644
index df41823b4c..0000000000
--- a/phpBB/styles/prosilver/theme/images/corners_right.png
+++ /dev/null
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/forum_link.gif b/phpBB/styles/prosilver/theme/images/forum_link.gif
index 01fb1c4e1e..01fb1c4e1e 100644
--- a/phpBB/styles/prosilver/imageset/forum_link.gif
+++ b/phpBB/styles/prosilver/theme/images/forum_link.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/forum_read.gif b/phpBB/styles/prosilver/theme/images/forum_read.gif
index 82ceee0784..82ceee0784 100644
--- a/phpBB/styles/prosilver/imageset/forum_read.gif
+++ b/phpBB/styles/prosilver/theme/images/forum_read.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/forum_read_locked.gif b/phpBB/styles/prosilver/theme/images/forum_read_locked.gif
index 450bf28c3c..450bf28c3c 100644
--- a/phpBB/styles/prosilver/imageset/forum_read_locked.gif
+++ b/phpBB/styles/prosilver/theme/images/forum_read_locked.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/forum_read_subforum.gif b/phpBB/styles/prosilver/theme/images/forum_read_subforum.gif
index 5e97bc94ce..5e97bc94ce 100644
--- a/phpBB/styles/prosilver/imageset/forum_read_subforum.gif
+++ b/phpBB/styles/prosilver/theme/images/forum_read_subforum.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/forum_unread.gif b/phpBB/styles/prosilver/theme/images/forum_unread.gif
index 5a305d2470..5a305d2470 100644
--- a/phpBB/styles/prosilver/imageset/forum_unread.gif
+++ b/phpBB/styles/prosilver/theme/images/forum_unread.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/forum_unread_locked.gif b/phpBB/styles/prosilver/theme/images/forum_unread_locked.gif
index 34f1d46ad7..34f1d46ad7 100644
--- a/phpBB/styles/prosilver/imageset/forum_unread_locked.gif
+++ b/phpBB/styles/prosilver/theme/images/forum_unread_locked.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/forum_unread_subforum.gif b/phpBB/styles/prosilver/theme/images/forum_unread_subforum.gif
index 5ddd1b2cba..5ddd1b2cba 100644
--- a/phpBB/styles/prosilver/imageset/forum_unread_subforum.gif
+++ b/phpBB/styles/prosilver/theme/images/forum_unread_subforum.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/icon_back_top.gif b/phpBB/styles/prosilver/theme/images/icon_back_top.gif
index 4d2b8f3822..4d2b8f3822 100644
--- a/phpBB/styles/prosilver/imageset/icon_back_top.gif
+++ b/phpBB/styles/prosilver/theme/images/icon_back_top.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/icon_contact_aim.gif b/phpBB/styles/prosilver/theme/images/icon_contact_aim.gif
index be039fcde2..be039fcde2 100644
--- a/phpBB/styles/prosilver/imageset/icon_contact_aim.gif
+++ b/phpBB/styles/prosilver/theme/images/icon_contact_aim.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/icon_contact_email.gif b/phpBB/styles/prosilver/theme/images/icon_contact_email.gif
index caa3683005..caa3683005 100644
--- a/phpBB/styles/prosilver/imageset/icon_contact_email.gif
+++ b/phpBB/styles/prosilver/theme/images/icon_contact_email.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/icon_contact_icq.gif b/phpBB/styles/prosilver/theme/images/icon_contact_icq.gif
index 48a09373eb..48a09373eb 100644
--- a/phpBB/styles/prosilver/imageset/icon_contact_icq.gif
+++ b/phpBB/styles/prosilver/theme/images/icon_contact_icq.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/icon_contact_jabber.gif b/phpBB/styles/prosilver/theme/images/icon_contact_jabber.gif
index e335433e97..e335433e97 100644
--- a/phpBB/styles/prosilver/imageset/icon_contact_jabber.gif
+++ b/phpBB/styles/prosilver/theme/images/icon_contact_jabber.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/theme/images/icon_contact_msnm.gif b/phpBB/styles/prosilver/theme/images/icon_contact_msnm.gif
new file mode 100644
index 0000000000..e25469c3a5
--- /dev/null
+++ b/phpBB/styles/prosilver/theme/images/icon_contact_msnm.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/icon_contact_www.gif b/phpBB/styles/prosilver/theme/images/icon_contact_www.gif
index 83cee9728d..83cee9728d 100644
--- a/phpBB/styles/prosilver/imageset/icon_contact_www.gif
+++ b/phpBB/styles/prosilver/theme/images/icon_contact_www.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/icon_contact_yahoo.gif b/phpBB/styles/prosilver/theme/images/icon_contact_yahoo.gif
index 305f297fdb..305f297fdb 100644
--- a/phpBB/styles/prosilver/imageset/icon_contact_yahoo.gif
+++ b/phpBB/styles/prosilver/theme/images/icon_contact_yahoo.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/theme/images/icon_download.gif b/phpBB/styles/prosilver/theme/images/icon_download.gif
new file mode 100644
index 0000000000..70cd61caf2
--- /dev/null
+++ b/phpBB/styles/prosilver/theme/images/icon_download.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/theme/images/icon_fontsize.gif b/phpBB/styles/prosilver/theme/images/icon_fontsize.gif
deleted file mode 100644
index 1c7d83527c..0000000000
--- a/phpBB/styles/prosilver/theme/images/icon_fontsize.gif
+++ /dev/null
Binary files differ
diff --git a/phpBB/styles/prosilver/theme/images/icon_mark.gif b/phpBB/styles/prosilver/theme/images/icon_mark.gif
new file mode 100644
index 0000000000..1a33fc3264
--- /dev/null
+++ b/phpBB/styles/prosilver/theme/images/icon_mark.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/theme/images/icon_notification.gif b/phpBB/styles/prosilver/theme/images/icon_notification.gif
new file mode 100644
index 0000000000..11092f4dce
--- /dev/null
+++ b/phpBB/styles/prosilver/theme/images/icon_notification.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/icon_offline.gif b/phpBB/styles/prosilver/theme/images/icon_offline.gif
index c5e41a41db..c5e41a41db 100644
--- a/phpBB/styles/prosilver/imageset/icon_offline.gif
+++ b/phpBB/styles/prosilver/theme/images/icon_offline.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/icon_online.gif b/phpBB/styles/prosilver/theme/images/icon_online.gif
index 18e43cd0c6..18e43cd0c6 100644
--- a/phpBB/styles/prosilver/imageset/icon_online.gif
+++ b/phpBB/styles/prosilver/theme/images/icon_online.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/theme/images/icon_pm.gif b/phpBB/styles/prosilver/theme/images/icon_pm.gif
new file mode 100644
index 0000000000..103421a26f
--- /dev/null
+++ b/phpBB/styles/prosilver/theme/images/icon_pm.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/icon_post_delete.gif b/phpBB/styles/prosilver/theme/images/icon_post_delete.gif
index f51ffc24a6..f51ffc24a6 100644
--- a/phpBB/styles/prosilver/imageset/icon_post_delete.gif
+++ b/phpBB/styles/prosilver/theme/images/icon_post_delete.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/icon_post_info.gif b/phpBB/styles/prosilver/theme/images/icon_post_info.gif
index af089d8656..af089d8656 100644
--- a/phpBB/styles/prosilver/imageset/icon_post_info.gif
+++ b/phpBB/styles/prosilver/theme/images/icon_post_info.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/theme/images/icon_post_menu.png b/phpBB/styles/prosilver/theme/images/icon_post_menu.png
new file mode 100644
index 0000000000..2b48289fdb
--- /dev/null
+++ b/phpBB/styles/prosilver/theme/images/icon_post_menu.png
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/icon_post_report.gif b/phpBB/styles/prosilver/theme/images/icon_post_report.gif
index 72c6ae89d0..72c6ae89d0 100644
--- a/phpBB/styles/prosilver/imageset/icon_post_report.gif
+++ b/phpBB/styles/prosilver/theme/images/icon_post_report.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/icon_post_target.gif b/phpBB/styles/prosilver/theme/images/icon_post_target.gif
index a29dbffa35..a29dbffa35 100644
--- a/phpBB/styles/prosilver/imageset/icon_post_target.gif
+++ b/phpBB/styles/prosilver/theme/images/icon_post_target.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/icon_post_target_unread.gif b/phpBB/styles/prosilver/theme/images/icon_post_target_unread.gif
index e97eeb2b2e..e97eeb2b2e 100644
--- a/phpBB/styles/prosilver/imageset/icon_post_target_unread.gif
+++ b/phpBB/styles/prosilver/theme/images/icon_post_target_unread.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/icon_rate_bad.gif b/phpBB/styles/prosilver/theme/images/icon_rate_bad.gif
index 7901889408..7901889408 100644
--- a/phpBB/styles/prosilver/imageset/icon_rate_bad.gif
+++ b/phpBB/styles/prosilver/theme/images/icon_rate_bad.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/icon_rate_good.gif b/phpBB/styles/prosilver/theme/images/icon_rate_good.gif
index 6d23034d71..6d23034d71 100644
--- a/phpBB/styles/prosilver/imageset/icon_rate_good.gif
+++ b/phpBB/styles/prosilver/theme/images/icon_rate_good.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/icon_topic_attach.gif b/phpBB/styles/prosilver/theme/images/icon_topic_attach.gif
index 9a70638650..9a70638650 100644
--- a/phpBB/styles/prosilver/imageset/icon_topic_attach.gif
+++ b/phpBB/styles/prosilver/theme/images/icon_topic_attach.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/theme/images/icon_topic_deleted.png b/phpBB/styles/prosilver/theme/images/icon_topic_deleted.png
new file mode 100644
index 0000000000..494b4fb563
--- /dev/null
+++ b/phpBB/styles/prosilver/theme/images/icon_topic_deleted.png
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/icon_topic_latest.gif b/phpBB/styles/prosilver/theme/images/icon_topic_latest.gif
index d79d31ac43..d79d31ac43 100644
--- a/phpBB/styles/prosilver/imageset/icon_topic_latest.gif
+++ b/phpBB/styles/prosilver/theme/images/icon_topic_latest.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/icon_topic_newest.gif b/phpBB/styles/prosilver/theme/images/icon_topic_newest.gif
index 0aa19884b5..0aa19884b5 100644
--- a/phpBB/styles/prosilver/imageset/icon_topic_newest.gif
+++ b/phpBB/styles/prosilver/theme/images/icon_topic_newest.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/icon_topic_reported.gif b/phpBB/styles/prosilver/theme/images/icon_topic_reported.gif
index 006b1e2291..006b1e2291 100644
--- a/phpBB/styles/prosilver/imageset/icon_topic_reported.gif
+++ b/phpBB/styles/prosilver/theme/images/icon_topic_reported.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/icon_topic_unapproved.gif b/phpBB/styles/prosilver/theme/images/icon_topic_unapproved.gif
index 09d8f387a7..09d8f387a7 100644
--- a/phpBB/styles/prosilver/imageset/icon_topic_unapproved.gif
+++ b/phpBB/styles/prosilver/theme/images/icon_topic_unapproved.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/icon_user_warn.gif b/phpBB/styles/prosilver/theme/images/icon_user_warn.gif
index 9c4ad98e5c..9c4ad98e5c 100644
--- a/phpBB/styles/prosilver/imageset/icon_user_warn.gif
+++ b/phpBB/styles/prosilver/theme/images/icon_user_warn.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/theme/images/loading.gif b/phpBB/styles/prosilver/theme/images/loading.gif
new file mode 100644
index 0000000000..e1ed0883e0
--- /dev/null
+++ b/phpBB/styles/prosilver/theme/images/loading.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/theme/images/no_avatar.gif b/phpBB/styles/prosilver/theme/images/no_avatar.gif
index 80539c8c71..ad73330e71 100644
--- a/phpBB/styles/prosilver/theme/images/no_avatar.gif
+++ b/phpBB/styles/prosilver/theme/images/no_avatar.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/site_logo.gif b/phpBB/styles/prosilver/theme/images/site_logo.gif
index 2517fbedd6..2517fbedd6 100644
--- a/phpBB/styles/prosilver/imageset/site_logo.gif
+++ b/phpBB/styles/prosilver/theme/images/site_logo.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/sticky_read.gif b/phpBB/styles/prosilver/theme/images/sticky_read.gif
index 59e42833db..59e42833db 100644
--- a/phpBB/styles/prosilver/imageset/sticky_read.gif
+++ b/phpBB/styles/prosilver/theme/images/sticky_read.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/sticky_read_locked.gif b/phpBB/styles/prosilver/theme/images/sticky_read_locked.gif
index 79f581be79..79f581be79 100644
--- a/phpBB/styles/prosilver/imageset/sticky_read_locked.gif
+++ b/phpBB/styles/prosilver/theme/images/sticky_read_locked.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/sticky_read_locked_mine.gif b/phpBB/styles/prosilver/theme/images/sticky_read_locked_mine.gif
index ad056086e5..ad056086e5 100644
--- a/phpBB/styles/prosilver/imageset/sticky_read_locked_mine.gif
+++ b/phpBB/styles/prosilver/theme/images/sticky_read_locked_mine.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/sticky_read_mine.gif b/phpBB/styles/prosilver/theme/images/sticky_read_mine.gif
index 49e8b3f01c..49e8b3f01c 100644
--- a/phpBB/styles/prosilver/imageset/sticky_read_mine.gif
+++ b/phpBB/styles/prosilver/theme/images/sticky_read_mine.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/sticky_unread.gif b/phpBB/styles/prosilver/theme/images/sticky_unread.gif
index ae6d5954b1..ae6d5954b1 100644
--- a/phpBB/styles/prosilver/imageset/sticky_unread.gif
+++ b/phpBB/styles/prosilver/theme/images/sticky_unread.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/sticky_unread_locked.gif b/phpBB/styles/prosilver/theme/images/sticky_unread_locked.gif
index 5792b8649a..5792b8649a 100644
--- a/phpBB/styles/prosilver/imageset/sticky_unread_locked.gif
+++ b/phpBB/styles/prosilver/theme/images/sticky_unread_locked.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/sticky_unread_locked_mine.gif b/phpBB/styles/prosilver/theme/images/sticky_unread_locked_mine.gif
index 93495770c8..93495770c8 100644
--- a/phpBB/styles/prosilver/imageset/sticky_unread_locked_mine.gif
+++ b/phpBB/styles/prosilver/theme/images/sticky_unread_locked_mine.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/sticky_unread_mine.gif b/phpBB/styles/prosilver/theme/images/sticky_unread_mine.gif
index 2580ca0518..2580ca0518 100644
--- a/phpBB/styles/prosilver/imageset/sticky_unread_mine.gif
+++ b/phpBB/styles/prosilver/theme/images/sticky_unread_mine.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/subforum_read.gif b/phpBB/styles/prosilver/theme/images/subforum_read.gif
index 595595c296..595595c296 100644
--- a/phpBB/styles/prosilver/imageset/subforum_read.gif
+++ b/phpBB/styles/prosilver/theme/images/subforum_read.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/subforum_unread.gif b/phpBB/styles/prosilver/theme/images/subforum_unread.gif
index b2b661dc78..b2b661dc78 100644
--- a/phpBB/styles/prosilver/imageset/subforum_unread.gif
+++ b/phpBB/styles/prosilver/theme/images/subforum_unread.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/topic_moved.gif b/phpBB/styles/prosilver/theme/images/topic_moved.gif
index 3275cd6ef9..3275cd6ef9 100644
--- a/phpBB/styles/prosilver/imageset/topic_moved.gif
+++ b/phpBB/styles/prosilver/theme/images/topic_moved.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/topic_read.gif b/phpBB/styles/prosilver/theme/images/topic_read.gif
index 0347ffc1e9..0347ffc1e9 100644
--- a/phpBB/styles/prosilver/imageset/topic_read.gif
+++ b/phpBB/styles/prosilver/theme/images/topic_read.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/topic_read_hot.gif b/phpBB/styles/prosilver/theme/images/topic_read_hot.gif
index dcb6f3bd60..dcb6f3bd60 100644
--- a/phpBB/styles/prosilver/imageset/topic_read_hot.gif
+++ b/phpBB/styles/prosilver/theme/images/topic_read_hot.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/topic_read_hot_mine.gif b/phpBB/styles/prosilver/theme/images/topic_read_hot_mine.gif
index 1e5498a9be..1e5498a9be 100644
--- a/phpBB/styles/prosilver/imageset/topic_read_hot_mine.gif
+++ b/phpBB/styles/prosilver/theme/images/topic_read_hot_mine.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/topic_read_locked.gif b/phpBB/styles/prosilver/theme/images/topic_read_locked.gif
index 83bc8bd02f..83bc8bd02f 100644
--- a/phpBB/styles/prosilver/imageset/topic_read_locked.gif
+++ b/phpBB/styles/prosilver/theme/images/topic_read_locked.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/topic_read_locked_mine.gif b/phpBB/styles/prosilver/theme/images/topic_read_locked_mine.gif
index 360f9d989a..360f9d989a 100644
--- a/phpBB/styles/prosilver/imageset/topic_read_locked_mine.gif
+++ b/phpBB/styles/prosilver/theme/images/topic_read_locked_mine.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/topic_read_mine.gif b/phpBB/styles/prosilver/theme/images/topic_read_mine.gif
index 4972a4e0a5..4972a4e0a5 100644
--- a/phpBB/styles/prosilver/imageset/topic_read_mine.gif
+++ b/phpBB/styles/prosilver/theme/images/topic_read_mine.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/topic_unread.gif b/phpBB/styles/prosilver/theme/images/topic_unread.gif
index 542a998258..542a998258 100644
--- a/phpBB/styles/prosilver/imageset/topic_unread.gif
+++ b/phpBB/styles/prosilver/theme/images/topic_unread.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/topic_unread_hot.gif b/phpBB/styles/prosilver/theme/images/topic_unread_hot.gif
index e712f6e827..e712f6e827 100644
--- a/phpBB/styles/prosilver/imageset/topic_unread_hot.gif
+++ b/phpBB/styles/prosilver/theme/images/topic_unread_hot.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/topic_unread_hot_mine.gif b/phpBB/styles/prosilver/theme/images/topic_unread_hot_mine.gif
index fa8b167c64..fa8b167c64 100644
--- a/phpBB/styles/prosilver/imageset/topic_unread_hot_mine.gif
+++ b/phpBB/styles/prosilver/theme/images/topic_unread_hot_mine.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/topic_unread_locked.gif b/phpBB/styles/prosilver/theme/images/topic_unread_locked.gif
index 4fb8fa9517..4fb8fa9517 100644
--- a/phpBB/styles/prosilver/imageset/topic_unread_locked.gif
+++ b/phpBB/styles/prosilver/theme/images/topic_unread_locked.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/topic_unread_locked_mine.gif b/phpBB/styles/prosilver/theme/images/topic_unread_locked_mine.gif
index 4ee6cfe423..4ee6cfe423 100644
--- a/phpBB/styles/prosilver/imageset/topic_unread_locked_mine.gif
+++ b/phpBB/styles/prosilver/theme/images/topic_unread_locked_mine.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/imageset/topic_unread_mine.gif b/phpBB/styles/prosilver/theme/images/topic_unread_mine.gif
index e73da38df7..e73da38df7 100644
--- a/phpBB/styles/prosilver/imageset/topic_unread_mine.gif
+++ b/phpBB/styles/prosilver/theme/images/topic_unread_mine.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/theme/imageset.css b/phpBB/styles/prosilver/theme/imageset.css
new file mode 100644
index 0000000000..e6d306c7fd
--- /dev/null
+++ b/phpBB/styles/prosilver/theme/imageset.css
@@ -0,0 +1,380 @@
+/* Former imageset */
+span.imageset {
+ display: inline-block !important;
+ background: transparent none 0 0 no-repeat;
+ margin: 0;
+ padding: 0;
+ width: 0;
+ height: 0;
+ overflow: hidden;
+}
+
+/* Global imageset items */
+.imageset.site_logo {
+ background-image: url("./images/site_logo.gif");
+ padding-left: 149px;
+ padding-top: 52px;
+}
+.imageset.forum_link {
+ background-image: url("./images/forum_link.gif");
+ padding-left: 27px;
+ padding-top: 27px;
+}
+.imageset.forum_read {
+ background-image: url("./images/forum_read.gif");
+ padding-left: 27px;
+ padding-top: 27px;
+}
+.imageset.forum_read_locked {
+ background-image: url("./images/forum_read_locked.gif");
+ padding-left: 27px;
+ padding-top: 27px;
+}
+.imageset.forum_read_subforum {
+ background-image: url("./images/forum_read_subforum.gif");
+ padding-left: 27px;
+ padding-top: 27px;
+}
+.imageset.forum_unread {
+ background-image: url("./images/forum_unread.gif");
+ padding-left: 27px;
+ padding-top: 27px;
+}
+.imageset.forum_unread_locked {
+ background-image: url("./images/forum_unread_locked.gif");
+ padding-left: 27px;
+ padding-top: 27px;
+}
+.imageset.forum_unread_subforum {
+ background-image: url("./images/forum_unread_subforum.gif");
+ padding-left: 27px;
+ padding-top: 27px;
+}
+.imageset.topic_moved {
+ background-image: url("./images/topic_moved.gif");
+ padding-left: 27px;
+ padding-top: 27px;
+}
+.imageset.topic_read {
+ background-image: url("./images/topic_read.gif");
+ padding-left: 27px;
+ padding-top: 27px;
+}
+.imageset.topic_read_mine {
+ background-image: url("./images/topic_read_mine.gif");
+ padding-left: 27px;
+ padding-top: 27px;
+}
+.imageset.topic_read_hot {
+ background-image: url("./images/topic_read_hot.gif");
+ padding-left: 27px;
+ padding-top: 27px;
+}
+.imageset.topic_read_hot_mine {
+ background-image: url("./images/topic_read_hot_mine.gif");
+ padding-left: 27px;
+ padding-top: 27px;
+}
+.imageset.topic_read_locked {
+ background-image: url("./images/topic_read_locked.gif");
+ padding-left: 27px;
+ padding-top: 27px;
+}
+.imageset.topic_read_locked_mine {
+ background-image: url("./images/topic_read_locked_mine.gif");
+ padding-left: 27px;
+ padding-top: 27px;
+}
+.imageset.topic_unread {
+ background-image: url("./images/topic_unread.gif");
+ padding-left: 27px;
+ padding-top: 27px;
+}
+.imageset.topic_unread_mine {
+ background-image: url("./images/topic_unread_mine.gif");
+ padding-left: 27px;
+ padding-top: 27px;
+}
+.imageset.topic_unread_hot {
+ background-image: url("./images/topic_unread_hot.gif");
+ padding-left: 27px;
+ padding-top: 27px;
+}
+.imageset.topic_unread_hot_mine {
+ background-image: url("./images/topic_unread_hot_mine.gif");
+ padding-left: 27px;
+ padding-top: 27px;
+}
+.imageset.topic_unread_locked {
+ background-image: url("./images/topic_unread_locked.gif");
+ padding-left: 27px;
+ padding-top: 27px;
+}
+.imageset.topic_unread_locked_mine {
+ background-image: url("./images/topic_unread_locked_mine.gif");
+ padding-left: 27px;
+ padding-top: 27px;
+}
+.imageset.sticky_read {
+ background-image: url("./images/sticky_read.gif");
+ padding-left: 27px;
+ padding-top: 27px;
+}
+.imageset.sticky_read_mine {
+ background-image: url("./images/sticky_read_mine.gif");
+ padding-left: 27px;
+ padding-top: 27px;
+}
+.imageset.sticky_read_locked {
+ background-image: url("./images/sticky_read_locked.gif");
+ padding-left: 27px;
+ padding-top: 27px;
+}
+.imageset.sticky_read_locked_mine {
+ background-image: url("./images/sticky_read_locked_mine.gif");
+ padding-left: 27px;
+ padding-top: 27px;
+}
+.imageset.sticky_unread {
+ background-image: url("./images/sticky_unread.gif");
+ padding-left: 27px;
+ padding-top: 27px;
+}
+.imageset.sticky_unread_mine {
+ background-image: url("./images/sticky_unread_mine.gif");
+ padding-left: 27px;
+ padding-top: 27px;
+}
+.imageset.sticky_unread_locked {
+ background-image: url("./images/sticky_unread_locked.gif");
+ padding-left: 27px;
+ padding-top: 27px;
+}
+.imageset.sticky_unread_locked_mine {
+ background-image: url("./images/sticky_unread_locked_mine.gif");
+ padding-left: 27px;
+ padding-top: 27px;
+}
+.imageset.announce_read {
+ background-image: url("./images/announce_read.gif");
+ padding-left: 27px;
+ padding-top: 27px;
+}
+.imageset.announce_read_mine {
+ background-image: url("./images/announce_read_mine.gif");
+ padding-left: 27px;
+ padding-top: 27px;
+}
+.imageset.announce_read_locked {
+ background-image: url("./images/announce_read_locked.gif");
+ padding-left: 27px;
+ padding-top: 27px;
+}
+.imageset.announce_read_locked_mine {
+ background-image: url("./images/announce_read_locked_mine.gif");
+ padding-left: 27px;
+ padding-top: 27px;
+}
+.imageset.announce_unread {
+ background-image: url("./images/announce_unread.gif");
+ padding-left: 27px;
+ padding-top: 27px;
+}
+.imageset.announce_unread_mine {
+ background-image: url("./images/announce_unread_mine.gif");
+ padding-left: 27px;
+ padding-top: 27px;
+}
+.imageset.announce_unread_locked {
+ background-image: url("./images/announce_unread_locked.gif");
+ padding-left: 27px;
+ padding-top: 27px;
+}
+.imageset.announce_unread_locked_mine {
+ background-image: url("./images/announce_unread_locked_mine.gif");
+ padding-left: 27px;
+ padding-top: 27px;
+}
+.imageset.global_read {
+ background-image: url("./images/announce_read.gif");
+ padding-left: 27px;
+ padding-top: 27px;
+}
+.imageset.global_read_mine {
+ background-image: url("./images/announce_read_mine.gif");
+ padding-left: 27px;
+ padding-top: 27px;
+}
+.imageset.global_read_locked {
+ background-image: url("./images/announce_read_locked.gif");
+ padding-left: 27px;
+ padding-top: 27px;
+}
+.imageset.global_read_locked_mine {
+ background-image: url("./images/announce_read_locked_mine.gif");
+ padding-left: 27px;
+ padding-top: 27px;
+}
+.imageset.global_unread {
+ background-image: url("./images/announce_unread.gif");
+ padding-left: 27px;
+ padding-top: 27px;
+}
+.imageset.global_unread_mine {
+ background-image: url("./images/announce_unread_mine.gif");
+ padding-left: 27px;
+ padding-top: 27px;
+}
+.imageset.global_unread_locked {
+ background-image: url("./images/announce_unread_locked.gif");
+ padding-left: 27px;
+ padding-top: 27px;
+}
+.imageset.global_unread_locked_mine {
+ background-image: url("./images/announce_unread_locked_mine.gif");
+ padding-left: 27px;
+ padding-top: 27px;
+}
+.imageset.subforum_read {
+ background-image: url("./images/subforum_read.gif");
+ padding-left: 11px;
+ padding-top: 9px;
+}
+.imageset.subforum_unread {
+ background-image: url("./images/subforum_unread.gif");
+ padding-left: 11px;
+ padding-top: 9px;
+}
+.imageset.pm_read {
+ background-image: url("./images/topic_read.gif");
+ padding-left: 27px;
+ padding-top: 27px;
+}
+.imageset.pm_unread {
+ background-image: url("./images/topic_unread.gif");
+ padding-left: 27px;
+ padding-top: 27px;
+}
+.imageset.icon_back_top {
+ background-image: url("./images/icon_back_top.gif");
+ padding-left: 11px;
+ padding-top: 11px;
+}
+.imageset.phpbb_aol-icon, .imageset.icon_contact_aim {
+ background-image: url("./images/icon_contact_aim.gif");
+ padding-left: 20px;
+ padding-top: 20px;
+}
+.imageset.icon_contact_email {
+ background-image: url("./images/icon_contact_email.gif");
+ padding-left: 20px;
+ padding-top: 20px;
+}
+.imageset.icon_contact_icq, .imageset.phpbb_icq-icon {
+ background-image: url("./images/icon_contact_icq.gif");
+ padding-left: 20px;
+ padding-top: 20px;
+}
+.imageset.icon_contact_jabber {
+ background-image: url("./images/icon_contact_jabber.gif");
+ padding-left: 20px;
+ padding-top: 20px;
+}
+.imageset.phpbb_wlm-icon, .imageset.icon_contact_msnm {
+ background-image: url("./images/icon_contact_msnm.gif");
+ padding-left: 20px;
+ padding-top: 20px;
+}
+.imageset.icon_contact_www, .imageset.phpbb_website-icon {
+ background-image: url("./images/icon_contact_www.gif");
+ padding-left: 20px;
+ padding-top: 20px;
+}
+.imageset.icon_contact_yahoo, .imageset.phpbb_yahoo-icon {
+ background-image: url("./images/icon_contact_yahoo.gif");
+ padding-left: 20px;
+ padding-top: 20px;
+}
+.imageset.icon_post_delete {
+ background-image: url("./images/icon_post_delete.gif");
+ padding-left: 20px;
+ padding-top: 20px;
+}
+.imageset.icon_post_info {
+ background-image: url("./images/icon_post_info.gif");
+ padding-left: 20px;
+ padding-top: 20px;
+}
+.imageset.icon_post_report {
+ background-image: url("./images/icon_post_report.gif");
+ padding-left: 20px;
+ padding-top: 20px;
+}
+.imageset.icon_post_target {
+ background-image: url("./images/icon_post_target.gif");
+ padding-left: 11px;
+ padding-top: 9px;
+}
+.imageset.icon_post_target_unread {
+ background-image: url("./images/icon_post_target_unread.gif");
+ padding-left: 11px;
+ padding-top: 9px;
+}
+.imageset.icon_topic_attach {
+ background-image: url("./images/icon_topic_attach.gif");
+ padding-left: 7px;
+ padding-top: 10px;
+}
+.imageset.icon_topic_latest {
+ background-image: url("./images/icon_topic_latest.gif");
+ padding-left: 11px;
+ padding-top: 9px;
+}
+.imageset.icon_topic_newest {
+ background-image: url("./images/icon_topic_newest.gif");
+ padding-left: 11px;
+ padding-top: 9px;
+}
+.imageset.icon_topic_reported {
+ background-image: url("./images/icon_topic_reported.gif");
+ padding-left: 16px;
+ padding-top: 14px;
+}
+.imageset.icon_topic_deleted {
+ background-image: url("./images/icon_topic_deleted.png");
+ padding-left: 16px;
+ padding-top: 14px;
+}
+.imageset.icon_topic_unapproved {
+ background-image: url("./images/icon_topic_unapproved.gif");
+ padding-left: 16px;
+ padding-top: 14px;
+}
+.imageset.icon_user_warn {
+ background-image: url("./images/icon_user_warn.gif");
+ padding-left: 20px;
+ padding-top: 20px;
+}
+
+
+/* English images for fallback */
+.imageset.icon_contact_pm {
+ background-image: url("./en/icon_contact_pm.gif");
+ padding-left: 28px;
+ padding-top: 20px;
+}
+.imageset.icon_post_edit {
+ background-image: url("./en/icon_post_edit.gif");
+ padding-left: 42px;
+ padding-top: 20px;
+}
+.imageset.icon_post_quote {
+ background-image: url("./en/icon_post_quote.gif");
+ padding-left: 54px;
+ padding-top: 20px;
+}
+.imageset.icon_user_online {
+ background-image: url("./en/icon_user_online.gif");
+ padding-left: 58px;
+ padding-top: 58px;
+}
diff --git a/phpBB/styles/prosilver/theme/large.css b/phpBB/styles/prosilver/theme/large.css
deleted file mode 100644
index dfb1d2c2e6..0000000000
--- a/phpBB/styles/prosilver/theme/large.css
+++ /dev/null
@@ -1,3 +0,0 @@
-body {
- font-size: 12px;
-} \ No newline at end of file
diff --git a/phpBB/styles/prosilver/theme/links.css b/phpBB/styles/prosilver/theme/links.css
index 05662b9b44..ff6df7c9a7 100644
--- a/phpBB/styles/prosilver/theme/links.css
+++ b/phpBB/styles/prosilver/theme/links.css
@@ -7,10 +7,17 @@ a {
unicode-bidi: embed;
}
-a:link { color: #898989; text-decoration: none; }
-a:visited { color: #898989; text-decoration: none; }
-a:hover { color: #d3d3d3; text-decoration: underline; }
-a:active { color: #d2d2d2; text-decoration: none; }
+a:link, a:visited {
+ text-decoration: none;
+}
+
+a:hover {
+ text-decoration: underline;
+}
+
+a:active {
+ text-decoration: none;
+}
/* Coloured usernames */
.username-coloured {
@@ -21,120 +28,123 @@ a:active { color: #d2d2d2; text-decoration: none; }
/* Links on gradient backgrounds */
#search-box a:link, .navbg a:link, .forumbg .header a:link, .forabg .header a:link, th a:link {
- color: #FFFFFF;
text-decoration: none;
}
#search-box a:visited, .navbg a:visited, .forumbg .header a:visited, .forabg .header a:visited, th a:visited {
- color: #FFFFFF;
text-decoration: none;
}
#search-box a:hover, .navbg a:hover, .forumbg .header a:hover, .forabg .header a:hover, th a:hover {
- color: #ffffff;
text-decoration: underline;
}
#search-box a:active, .navbg a:active, .forumbg .header a:active, .forabg .header a:active, th a:active {
- color: #ffffff;
text-decoration: none;
}
+/* Navigation bar links */
+ul.linklist li.small-icon > a, ul.linklist li.breadcrumbs span:first-child > a {
+ display: inline-block;
+ padding-left: 17px;
+}
+
+/* Notification mark read link */
+.dropdown-extended a.mark_read {
+ background-position: center center;
+ background-repeat: no-repeat;
+ border-radius: 3px 0 0 3px;
+ display: none;
+ margin-top: -20px;
+ position: absolute;
+ z-index: 2;
+ right: 0;
+ top: 50%;
+ width: 30px;
+ height: 40px;
+}
+
+.dropdown-extended li:hover a.mark_read {
+ display: block;
+}
+
+.dropdown-extended a.mark_read:hover {
+ width: 40px;
+}
+
/* Links for forum/topic lists */
a.forumtitle {
font-family: "Trebuchet MS", Helvetica, Arial, Sans-serif;
font-size: 1.2em;
font-weight: bold;
- color: #898989;
text-decoration: none;
}
-/* a.forumtitle:visited { color: #898989; } */
-
a.forumtitle:hover {
- color: #bcbcbc;
text-decoration: underline;
}
-a.forumtitle:active {
- color: #898989;
-}
-
a.topictitle {
font-family: "Trebuchet MS", Helvetica, Arial, Sans-serif;
font-size: 1.2em;
font-weight: bold;
- color: #898989;
text-decoration: none;
}
-/* a.topictitle:visited { color: #d2d2d2; } */
-
a.topictitle:hover {
- color: #bcbcbc;
text-decoration: underline;
}
-a.topictitle:active {
- color: #898989;
+a.lastsubject {
+ font-weight: bold;
+ text-decoration: none;
+}
+
+a.lastsubject:hover {
+ text-decoration: underline;
}
/* Post body links */
.postlink {
text-decoration: none;
- color: #d2d2d2;
- border-bottom: 1px solid #d2d2d2;
+ border-bottom: 1px solid transparent;
padding-bottom: 0;
}
-/* .postlink:visited { color: #bdbdbd; } */
-
-.postlink:active {
- color: #d2d2d2;
-}
-
.postlink:hover {
- background-color: #f6f6f6;
text-decoration: none;
- color: #404040;
}
.signature a, .signature a:visited, .signature a:hover, .signature a:active {
border: none;
text-decoration: underline;
- background-color: transparent;
}
/* Profile links */
.postprofile a:link, .postprofile a:visited, .postprofile dt.author a {
font-weight: bold;
- color: #898989;
text-decoration: none;
}
.postprofile a:hover, .postprofile dt.author a:hover {
text-decoration: underline;
- color: #d3d3d3;
}
/* CSS spec requires a:link, a:visited, a:hover and a:active rules to be specified in this order. */
/* See http://www.phpbb.com/bugs/phpbb3/59685 */
.postprofile a:active {
font-weight: bold;
- color: #898989;
text-decoration: none;
}
/* Profile searchresults */
.search .postprofile a {
- color: #898989;
text-decoration: none;
font-weight: normal;
}
.search .postprofile a:hover {
- color: #d3d3d3;
text-decoration: underline;
}
@@ -148,8 +158,8 @@ a.topictitle:active {
a.top {
background: none no-repeat top left;
text-decoration: none;
- width: {IMG_ICON_BACK_TOP_WIDTH}px;
- height: {IMG_ICON_BACK_TOP_HEIGHT}px;
+ width: 11px;
+ height: 11px;
display: block;
float: right;
overflow: hidden;
@@ -164,47 +174,44 @@ a.top2 {
}
/* Arrow links */
-a.up { background: none no-repeat left center; }
-a.down { background: none no-repeat right center; }
-a.left { background: none no-repeat 3px 60%; }
-a.right { background: none no-repeat 95% 60%; }
+a.arrow-up { background: none no-repeat left center; }
+a.arrow-down { background: none no-repeat right center; }
+a.arrow-left { background: none no-repeat 3px 60%; }
+a.arrow-right { background: none no-repeat 95% 60%; }
-a.up, a.up:link, a.up:active, a.up:visited {
+a.arrow-up, a.arrow-up:link, a.arrow-up:active, a.arrow-up:visited {
padding-left: 10px;
text-decoration: none;
border-bottom-width: 0;
}
-a.up:hover {
+a.arrow-up:hover {
background-position: left top;
- background-color: transparent;
}
-a.down, a.down:link, a.down:active, a.down:visited {
+a.arrow-down, a.arrow-down:link, a.arrow-down:active, a.arrow-down:visited {
padding-right: 10px;
}
-a.down:hover {
+a.arrow-down:hover {
background-position: right bottom;
text-decoration: none;
}
-a.left, a.left:active, a.left:visited {
+a.arrow-left, a.arrow-left:active, a.arrow-left:visited {
padding-left: 12px;
}
-a.left:hover {
- color: #d2d2d2;
+a.arrow-left:hover {
text-decoration: none;
background-position: 0 60%;
}
-a.right, a.right:active, a.right:visited {
+a.arrow-right, a.arrow-right:active, a.arrow-right:visited {
padding-right: 12px;
}
-a.right:hover {
- color: #d2d2d2;
+a.arrow-right:hover {
text-decoration: none;
background-position: 100% 60%;
}
diff --git a/phpBB/styles/prosilver/theme/medium.css b/phpBB/styles/prosilver/theme/medium.css
deleted file mode 100644
index 4c992f9fd8..0000000000
--- a/phpBB/styles/prosilver/theme/medium.css
+++ /dev/null
@@ -1,3 +0,0 @@
-body {
- font-size: 11px;
-} \ No newline at end of file
diff --git a/phpBB/styles/prosilver/theme/normal.css b/phpBB/styles/prosilver/theme/normal.css
deleted file mode 100644
index d0783d1882..0000000000
--- a/phpBB/styles/prosilver/theme/normal.css
+++ /dev/null
@@ -1,3 +0,0 @@
-body {
- font-size: 10px;
-} \ No newline at end of file
diff --git a/phpBB/styles/prosilver/theme/plupload.css b/phpBB/styles/prosilver/theme/plupload.css
new file mode 100644
index 0000000000..8569eca662
--- /dev/null
+++ b/phpBB/styles/prosilver/theme/plupload.css
@@ -0,0 +1,76 @@
+#attach-panel-multi {
+ display: none;
+ margin-bottom: 1em;
+}
+
+#file-list td {
+ vertical-align: middle;
+}
+
+.attach-name {
+ width: 50%;
+}
+
+.attach-comment {
+ width: 30%;
+}
+
+.attach-filesize {
+ width: 15%;
+}
+
+.attach-status {
+ width: 5%;
+}
+
+.attach-filesize, .attach-status {
+ text-align: center;
+}
+
+.attach-controls {
+ display: inline-block;
+ float: right;
+}
+
+#attach-row-tpl, .nojs .file-inline-bbcode {
+ display: none;
+}
+
+#file-total-progress {
+ height: 2px;
+ display: block;
+ position: relative;
+ margin: 4px -10px -6px -10px;
+}
+
+.file-progress {
+ background-color: #CCCCCC;
+ display:inline-block;
+ height: 8px;
+ width: 50px;
+}
+
+.file-progress-bar, #file-total-progress-bar {
+ background-color: green;
+ display: block;
+ height: 100%;
+ width: 0;
+}
+
+.file-status.file-working {
+ background: url('../../../assets/plupload/img/throbber.gif');
+}
+
+.file-status.file-uploaded {
+ background: url('../../../assets/plupload/img/done.gif');
+}
+
+.file-status.file-error {
+ background: url('../../../assets/plupload/img/error.gif');
+}
+
+.file-status {
+ display: inline-block;
+ height: 16px;
+ width: 16px;
+}
diff --git a/phpBB/styles/prosilver/theme/print.css b/phpBB/styles/prosilver/theme/print.css
index bc3ca80fdc..88de620493 100644
--- a/phpBB/styles/prosilver/theme/print.css
+++ b/phpBB/styles/prosilver/theme/print.css
@@ -136,4 +136,4 @@ div.spacer { clear: both; }
/* Accessibility tweaks: Mozilla.org */
.skip_link { display: none; }
-dl.codebox dt { display: none; }
+.codebox p { display: none; }
diff --git a/phpBB/styles/prosilver/theme/responsive.css b/phpBB/styles/prosilver/theme/responsive.css
new file mode 100644
index 0000000000..13711c1267
--- /dev/null
+++ b/phpBB/styles/prosilver/theme/responsive.css
@@ -0,0 +1,538 @@
+/* Responsive Design
+---------------------------------------- */
+
+.responsive-hide { display: none !important; }
+.responsive-show { display: block !important; }
+.responsive-show-inline { display: inline !important; }
+.responsive-show-inline-block { display: inline-block !important; }
+
+/* Content wrappers
+----------------------------------------*/
+html {
+ height: auto;
+}
+
+body {
+ padding: 0 5px;
+}
+
+#wrap {
+ min-width: 300px;
+ padding: 0;
+}
+
+/* Common block wrappers
+----------------------------------------*/
+.headerbar, .navbar, .forabg, .forumbg, .post, .panel {
+ border-radius: 0;
+ margin-left: -5px;
+ margin-right: -5px;
+}
+
+#cp-main .forabg, #cp-main .forumdb, #cp-main .post, #cp-main .panel {
+ border-radius: 7px;
+}
+
+/* Logo block
+----------------------------------------*/
+#site-description {
+ float: none;
+ width: auto;
+ text-align: center;
+}
+
+#logo {
+ /* change display value to inline-block to show logo */
+ display: none;
+ float: none;
+ padding: 10px;
+}
+
+#site-description h1, #site-description p {
+ text-align: inherit;
+ float: none;
+ margin: 5px;
+ line-height: 1.2em;
+ overflow: hidden;
+ text-overflow: ellipsis;
+}
+
+#site-description p, #search-box {
+ display: none;
+}
+
+/* Navigation
+----------------------------------------*/
+.headerbar + .navbar {
+ margin-top: -5px;
+}
+
+/* Search
+----------------------------------------*/
+.responsive-search { display: block !important; }
+.responsive-search a {
+ display: block;
+ width: 16px;
+ height: 18px;
+ text-indent: 99px;
+ overflow: hidden;
+ background-position: 50% 50%;
+ background-repeat: no-repeat;
+ text-decoration: none;
+}
+
+/* .topiclist lists
+----------------------------------------*/
+li.header dt {
+ text-align: center;
+ text-transform: none;
+ line-height: 1em;
+ font-size: 1.2em;
+ padding-bottom: 4px;
+}
+
+ul.topiclist li.header dt, ul.topiclist li.header dt .list-inner {
+ margin-right: 0 !important;
+ padding-right: 0;
+}
+
+ul.topiclist li.header dd {
+ display: none !important;
+}
+
+ul.topiclist dt, ul.topiclist dt .list-inner,
+ul.topiclist.missing-column dt, ul.topiclist.missing-column dt .list-inner,
+ul.topiclist.two-long-columns dt, ul.topiclist.two-long-columns dt .list-inner,
+ul.topiclist.two-columns dt, ul.topiclist.two-columns dt .list-inner {
+ margin-right: 0;
+}
+
+ul.topiclist dt .list-inner.with-mark {
+ padding-right: 34px;
+}
+
+ul.topiclist dt .list-inner {
+ min-height: 28px;
+}
+
+ul.topiclist li.header dt .list-inner {
+ min-height: 0;
+}
+
+ul.topiclist dd {
+ display: none;
+}
+ul.topiclist dd.mark {
+ display: block;
+}
+
+/* Forums and topics lists
+----------------------------------------*/
+ul.topiclist.forums dt, ul.topiclist.topics dt {
+ margin-right: -250px;
+}
+ul.topiclist.forums dt .list-inner, ul.topiclist.topics dt .list-inner {
+ margin-right: 250px;
+}
+
+ul.topiclist.forums dd.lastpost, ul.topiclist.topics dd.lastpost {
+ display: block;
+}
+
+ul.topiclist dd.mark {
+ display: block;
+ position: absolute;
+ right: 5px;
+ top: 0;
+ margin: 0;
+ width: auto;
+ min-width: 0;
+ text-align: left;
+}
+
+ul.topiclist.forums dd.topics dfn, ul.topiclist.topics dd.posts dfn {
+ position: relative;
+ left: 0;
+ width: auto;
+ display: inline;
+ font-weight: normal;
+}
+
+@media only screen and (max-width: 550px), only screen and (max-device-width: 550px)
+{
+ ul.topiclist.forums dt, ul.topiclist.topics dt {
+ margin-right: 0;
+ }
+
+ ul.topiclist.forums dt .list-inner, ul.topiclist.topics dt .list-inner {
+ margin-right: 0;
+ }
+
+ ul.topiclist.forums dd.lastpost, ul.topiclist.topics dd.lastpost {
+ display: none;
+ }
+}
+
+li.row .responsive-show strong {
+ font-weight: bold;
+ color: inherit;
+}
+
+ul.topiclist li.row dt a.subforum {
+ display: inline-block;
+ vertical-align: bottom;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ max-width: 100px;
+}
+
+/* Notifications list
+----------------------------------------*/
+@media only screen and (max-width: 350px), only screen and (max-device-width: 350px)
+{
+ .dropdown-extended {
+ width: 250px;
+ }
+}
+
+/* Pagination
+----------------------------------------*/
+.pagination {
+ margin: 5px 0;
+}
+
+.pagination li a, .pagination li span {
+ min-width: 10px;
+ display: inline-block;
+ text-align: center;
+}
+
+/* Responsive tables
+----------------------------------------*/
+table.responsive, table.responsive tbody, table.responsive tr, table.responsive td {
+ display: block;
+}
+
+table.responsive thead, table.responsive th {
+ display: none;
+}
+
+table.responsive.show-header thead, table.responsive.show-header th:first-child {
+ display: block;
+ width: auto !important;
+ text-align: left !important;
+}
+
+table.responsive.show-header th:first-child span.rank-img {
+ display: none;
+}
+
+table.responsive tr {
+ margin: 2px 0;
+}
+
+table.responsive td {
+ width: auto !important;
+ text-align: left !important;
+ padding: 4px;
+}
+
+table.responsive td.empty {
+ display: none !important;
+}
+
+table.responsive td > dfn {
+ display: inline-block !important;
+}
+
+table.responsive td > dfn:after {
+ content: ':';
+ padding-right: 5px;
+}
+
+table.responsive span.rank-img {
+ float: none;
+ padding-right: 5px;
+}
+
+table.responsive#memberlist td:first-child input[type="checkbox"] {
+ float: right;
+}
+
+/* Forms
+----------------------------------------*/
+fieldset dt, fieldset.fields1 dt, fieldset.fields2 dt {
+ width: auto;
+ float: none;
+}
+
+fieldset dd, fieldset.fields1 dd, fieldset.fields2 dd {
+ margin-left: 20px;
+}
+
+textarea, dd textarea, #message-box textarea {
+ width: 100%;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
+}
+
+dl.pmlist dt {
+ width: auto !important;
+ margin-bottom: 5px;
+}
+
+dl.pmlist dd {
+ display: inline-block;
+ margin-left: 0 !important;
+}
+
+dl.pmlist dd:first-of-type {
+ padding-left: 20px;
+}
+
+#smiley-box, #message-box {
+ float: none;
+ width: auto;
+}
+
+#smiley-box {
+ margin-top: 5px;
+}
+
+.bbcode-status {
+ display: none;
+}
+
+.colour-palette, .colour-palette tbody, .colour-palette tr {
+ display: block;
+}
+
+.colour-palette td {
+ display: inline-block;
+ margin-right: 2px;
+}
+
+.horizontal-palette td:nth-child(2n), .vertical-palette tr:nth-child(2n) {
+ display: none;
+}
+
+.colour-palette a {
+ display: inline-block !important;
+}
+
+fieldset.quick-login label {
+ display: block;
+ margin-bottom: 5px;
+ white-space: normal;
+}
+
+fieldset.quick-login label > span {
+ display: inline-block;
+ min-width: 100px;
+}
+
+fieldset.quick-login input.inputbox {
+ width: 85%;
+ max-width: 300px;
+ margin-left: 20px;
+}
+
+fieldset.quick-login label[for="autologin"] {
+ display: inline-block;
+ text-align: right;
+ min-width: 50%;
+}
+
+@media only screen and (max-width: 500px), only screen and (max-device-width: 500px)
+{
+ select, .inputbox {
+ max-width: 260px;
+ }
+}
+
+@media only screen and (max-width: 320px), only screen and (max-device-width: 320px)
+{
+ select, .inputbox {
+ max-width: 240px;
+ }
+}
+
+/* User profile
+----------------------------------------*/
+.column1, .column2, .left-box.profile-details {
+ float: none;
+ width: auto;
+}
+
+@media only screen and (max-width: 500px), only screen and (max-device-width: 500px)
+{
+ dl.details dt, dl.details dd {
+ width: auto;
+ float: none;
+ text-align: left;
+ }
+
+ dl.details dd {
+ margin-left: 20px;
+ }
+}
+
+/* Polls
+----------------------------------------*/
+fieldset.polls dt {
+ width: 90%;
+}
+
+fieldset.polls dd.resultbar {
+ padding-left: 20px;
+}
+
+fieldset.polls dd.poll_option_percent {
+ width: 20%;
+}
+
+fieldset.polls dd.resultbar, fieldset.polls dd.poll_option_percent {
+ margin-top: 5px;
+}
+
+/* Post
+----------------------------------------*/
+.postprofile, .postbody, .search .postbody {
+ display: block;
+ width: auto;
+ float: none;
+ padding: 0;
+ min-height: 0;
+}
+
+.post .postprofile {
+ width: auto;
+ border-width: 0 0 1px 0;
+ padding-bottom: 5px;
+ margin: 0;
+ margin-bottom: 5px;
+ overflow: hidden;
+}
+
+.postprofile dd {
+ display: none;
+}
+
+.postprofile dt, .postprofile dd.profile-rank, .search .postprofile dd {
+ display: block;
+ margin: 0;
+}
+
+.postprofile ul.profile-icons {
+ display: none;
+}
+
+.postprofile .avatar {
+ display: block;
+ float: left;
+ margin-right: 5px;
+}
+
+.postprofile .avatar img {
+ width: auto !important;
+ height: auto !important;
+ display: block;
+ max-height: 32px;
+}
+
+@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi), (min-resolution: 1.5dppx)
+{
+ /* Scale online image for HD displays */
+ .online {
+ background-size: 40px;
+ }
+}
+
+/* Misc stuff
+----------------------------------------*/
+h2 {
+ margin-top: .5em;
+}
+
+p {
+ margin-bottom: .5em;
+ overflow: hidden;
+}
+
+p.rightside {
+ margin-bottom: 0;
+}
+
+.column1, .column2 {
+ width: auto;
+ float: none;
+}
+
+fieldset.quickmod {
+ width: auto;
+ float: none;
+ text-align: center;
+}
+
+fieldset.display-options label {
+ display: block;
+ clear: both;
+ margin-bottom: 5px;
+}
+
+dl.mini dd.pm-legend {
+ float: left;
+ min-width: 200px;
+}
+
+#topicreview {
+ margin: 0 -5px;
+ padding: 0 5px;
+}
+
+fieldset.display-actions {
+ white-space: normal;
+}
+
+.phpbb_alert {
+ width: auto;
+ margin: 0 5px;
+}
+
+.attach-comment dfn {
+ width: 100%;
+}
+
+@media only screen and (max-width: 500px), only screen and (max-device-width: 500px)
+{
+ p.responsive-center {
+ float: none;
+ text-align: center;
+ margin: 0;
+ }
+
+ .topic-actions > .pagination, fieldset.jumpbox {
+ text-align: center;
+ }
+
+ .topic-actions > .pagination {
+ float: none;
+ overflow: hidden;
+ clear: both;
+ padding-bottom: 1px;
+ }
+
+ .topic-actions > div.search-box, p.jumpbox-return {
+ display: none;
+ }
+
+ .display-options > label:nth-child(1) {
+ display: block;
+ margin-bottom: 5px;
+ }
+
+ .attach-controls {
+ margin-top: 5px;
+ width: 100%;
+ }
+}
diff --git a/phpBB/styles/prosilver/theme/stylesheet.css b/phpBB/styles/prosilver/theme/stylesheet.css
index 40620179a1..48a00c6803 100644
--- a/phpBB/styles/prosilver/theme/stylesheet.css
+++ b/phpBB/styles/prosilver/theme/stylesheet.css
@@ -1,6 +1,6 @@
/* phpBB3 Style Sheet
--------------------------------------------------------------
- Style name: prosilver (the default phpBB 3.0.x style)
+ Style name: prosilver (the default phpBB 3.1.x style)
Based on style:
Original author: Tom Beddard ( http://www.subblue.com/ )
Modified by: phpBB Group ( https://www.phpbb.com/ )
@@ -13,5 +13,5 @@
@import url("buttons.css");
@import url("cp.css");
@import url("forms.css");
-@import url("tweaks.css");
@import url("colours.css");
+@import url("imageset.css");
diff --git a/phpBB/styles/prosilver/theme/theme.cfg b/phpBB/styles/prosilver/theme/theme.cfg
deleted file mode 100644
index 03d82ed5f6..0000000000
--- a/phpBB/styles/prosilver/theme/theme.cfg
+++ /dev/null
@@ -1,35 +0,0 @@
-#
-# phpBB Theme Configuration File
-#
-# @package phpBB3
-# @copyright (c) 2006 phpBB Group
-# @license http://opensource.org/licenses/gpl-license.php GNU Public License
-#
-#
-# At the left is the name, please do not change this
-# At the right the value is entered
-# For on/off options the valid values are on, off, 1, 0, true and false
-#
-# Values get trimmed, if you want to add a space in front or at the end of
-# the value, then enclose the value with single or double quotes.
-# Single and double quotes do not need to be escaped.
-#
-# Available and used values:
-# parse_css_file
-#
-
-# General Information about this theme
-name = prosilver
-copyright = &copy; phpBB Group, 2007
-version = 3.0.12
-
-# Some configuration options
-
-#
-# You have to turn this option on if you want to use the
-# path template variables ({T_IMAGESET_PATH} for example) within
-# your css file.
-# This is mostly the case if you want to use language specific
-# images within your css file.
-#
-parse_css_file = 1
diff --git a/phpBB/styles/prosilver/theme/tweaks.css b/phpBB/styles/prosilver/theme/tweaks.css
index 0c03020100..456bbf3479 100644
--- a/phpBB/styles/prosilver/theme/tweaks.css
+++ b/phpBB/styles/prosilver/theme/tweaks.css
@@ -1,107 +1,68 @@
/* Style Sheet Tweaks
-These style definitions are mainly IE specific
+These style definitions are IE 7 and 8 specific
tweaks required due to its poor CSS support.
-------------------------------------------------*/
-* html table, * html select, * html input { font-size: 100%; }
-* html hr { margin: 0; }
-* html span.corners-top, * html span.corners-bottom { background-image: url("{T_THEME_PATH}/images/corners_left.gif"); }
-* html span.corners-top span, * html span.corners-bottom span { background-image: url("{T_THEME_PATH}/images/corners_right.gif"); }
-
-table.table1 {
- width: 99%; /* IE < 6 browsers */
- /* Tantek hack */
- voice-family: "\"}\"";
- voice-family: inherit;
- width: 100%;
+/* Clear float fix for IE7 */
+.inner {
+ zoom: 1;
}
-html>body table.table1 { width: 100%; } /* Reset 100% for opera */
-
-* html ul.topiclist li { position: relative; }
-* html .postbody h3 img { vertical-align: middle; }
-
-/* Form styles */
-html>body dd label input { vertical-align: text-bottom; } /* Align checkboxes/radio buttons nicely */
-* html input.button1, * html input.button2 {
- padding-bottom: 0;
- margin-bottom: 1px;
+ul.linklist {
+ zoom: 1;
}
-/* Misc layout styles */
-* html .column1, * html .column2 { width: 45%; }
-
-/* Nice method for clearing floated blocks without having to insert any extra markup (like spacer above)
- From http://www.positioniseverything.net/easyclearing.html
-#tabs:after, #minitabs:after, .post:after, .navbar:after, fieldset dl:after, ul.topiclist dl:after, ul.linklist:after, dl.polls:after {
- content: ".";
- display: block;
- height: 0;
- clear: both;
- visibility: hidden;
-}*/
-
-.clearfix, #tabs, #minitabs, fieldset dl, ul.topiclist dl, dl.polls {
- height: 1%;
- overflow: hidden;
+/* Align checkboxes/radio buttons nicely */
+dd label input {
+ vertical-align: text-bottom;
+ *vertical-align: middle;
}
-/* viewtopic fix */
-* html .post {
- height: 25%;
- overflow: hidden;
+/* Simple fix so forum and topic lists always have a height set */
+dl.icon {
+ *height: 35px;
}
-/* navbar fix */
-* html .clearfix, * html .navbar, ul.linklist {
- height: 4%;
- overflow: hidden;
+/* Correctly clear floating for details on profile view */
+dl.details dd {
+ *margin-left: 30%;
+ *float: none;
}
-/* Simple fix so forum and topic lists always have a min-height set, even in IE6
- From http://www.dustindiaz.com/min-height-fast-hack */
-dl.icon {
- min-height: 35px;
- height: auto !important;
- height: 35px;
+/* Headerbar height fix for IE7 */
+#site-description p {
+ *margin-bottom: 1.0em;
}
-* html li.row dl.icon dt {
- height: 35px;
- overflow: visible;
+/* Forum list column styles for IE7 */
+dl.icon dt, dl.icon dd {
+ *min-height: 32px;
}
-* html #search-box {
- width: 25%;
+dd.posts, dd.topics, dd.views, dd.extra, dd.mark {
+ *width: 79px;
}
-/* Correctly clear floating for details on profile view */
-*:first-child+html dl.details dd {
- margin-left: 30%;
- float: none;
+dd.lastpost, dd.redirect, dd.moderation, dd.time, dd.info {
+ *width: 249px;
}
-* html dl.details dd {
- margin-left: 30%;
- float: none;
+dd.option {
+ *width: 124px;
}
-/* Headerbar height fix for IE7 and below */
-* html #site-description p {
- margin-bottom: 1.0em;
+/* Notifications list for IE7 */
+.dropdown-extended {
+ *left: 0;
}
-*:first-child+html #site-description p {
- margin-bottom: 1.0em;
+.dropdown-extended .header_settings {
+ *position: absolute;
+ *right: 10px;
+ *top: 0;
}
-/* #minitabs fix for IE */
-.tabs-container {
- zoom: 1;
+.icon-notification {
+ *z-index: 2;
}
-
-#minitabs {
- white-space: nowrap;
- *min-width: 50%;
-} \ No newline at end of file
diff --git a/phpBB/styles/subsilver2/imageset/en/icon_contact_msnm.gif b/phpBB/styles/subsilver2/imageset/en/icon_contact_msnm.gif
deleted file mode 100644
index e3a5901bfc..0000000000
--- a/phpBB/styles/subsilver2/imageset/en/icon_contact_msnm.gif
+++ /dev/null
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/en/imageset.cfg b/phpBB/styles/subsilver2/imageset/en/imageset.cfg
deleted file mode 100644
index c0cc699737..0000000000
--- a/phpBB/styles/subsilver2/imageset/en/imageset.cfg
+++ /dev/null
@@ -1,47 +0,0 @@
-#
-# phpBB Imageset Configuration File
-#
-# @package phpBB3
-# @copyright (c) 2005 phpBB Group
-# @license http://opensource.org/licenses/gpl-license.php GNU Public License
-#
-#
-# At the left is the name, please do not change this
-# At the right the value is entered
-# For on/off options the valid values are on, off, 1, 0, true and false
-#
-# Values get trimmed, if you want to add a space in front or at the end of
-# the value, then enclose the value with single or double quotes.
-# Single and double quotes do not need to be escaped.
-#
-#
-
-# Images
-img_icon_contact_aim = icon_contact_aim.gif
-img_icon_contact_email = icon_contact_email.gif
-img_icon_contact_icq = icon_contact_icq.gif
-img_icon_contact_jabber = icon_contact_jabber.gif
-img_icon_contact_msnm = icon_contact_msnm.gif
-img_icon_contact_pm = icon_contact_pm.gif
-img_icon_contact_yahoo = icon_contact_yahoo.gif
-img_icon_contact_www = icon_contact_www.gif
-
-img_icon_post_delete = icon_post_delete.gif
-img_icon_post_edit = icon_post_edit.gif
-img_icon_post_info = icon_post_info.gif
-img_icon_post_quote = icon_post_quote.gif
-img_icon_post_report = icon_post_report.gif
-
-img_icon_user_online = icon_user_online.gif
-img_icon_user_offline = icon_user_offline.gif
-img_icon_user_profile = icon_user_profile.gif
-img_icon_user_search = icon_user_search.gif
-img_icon_user_warn = icon_user_warn.gif
-
-img_button_pm_forward =
-img_button_pm_new = button_pm_new.gif
-img_button_pm_reply = button_pm_reply.gif
-img_button_topic_locked = button_topic_locked.gif
-img_button_topic_new = button_topic_new.gif
-img_button_topic_reply = button_topic_reply.gif
-
diff --git a/phpBB/styles/subsilver2/imageset/imageset.cfg b/phpBB/styles/subsilver2/imageset/imageset.cfg
deleted file mode 100644
index cb48b0fd9f..0000000000
--- a/phpBB/styles/subsilver2/imageset/imageset.cfg
+++ /dev/null
@@ -1,100 +0,0 @@
-#
-# phpBB Imageset Configuration File
-#
-# @package phpBB3
-# @copyright (c) 2005 phpBB Group
-# @license http://opensource.org/licenses/gpl-license.php GNU Public License
-#
-#
-# At the left is the name, please do not change this
-# At the right the value is entered
-# For on/off options the valid values are on, off, 1, 0, true and false
-#
-# Values get trimmed, if you want to add a space in front or at the end of
-# the value, then enclose the value with single or double quotes.
-# Single and double quotes do not need to be escaped.
-#
-#
-
-# General Information about this style
-name = subsilver2
-copyright = &copy; phpBB Group, 2003
-version = 3.0.12
-
-# Images
-img_site_logo = site_logo.gif*94*170
-img_upload_bar = upload_bar.gif*16*280
-img_poll_left = poll_left.gif*12*4
-img_poll_center = poll_center.gif*12*1
-img_poll_right = poll_right.gif*12*4
-img_icon_friend =
-img_icon_foe =
-
-img_forum_link = forum_link.gif*25*46
-img_forum_read = forum_read.gif*25*46
-img_forum_read_locked = forum_read_locked.gif*25*46
-img_forum_read_subforum = forum_read_subforum.gif*25*46
-img_forum_unread = forum_unread.gif*25*46
-img_forum_unread_locked = forum_unread_locked.gif*25*46
-img_forum_unread_subforum = forum_unread_subforum.gif*25*46
-
-img_topic_moved = topic_moved.gif*18*19
-
-img_topic_read = topic_read.gif*18*19
-img_topic_read_mine = topic_read_mine.gif*18*19
-img_topic_read_hot = topic_read_hot.gif*18*19
-img_topic_read_hot_mine = topic_read_hot_mine.gif*18*19
-img_topic_read_locked = topic_read_locked.gif*18*19
-img_topic_read_locked_mine = topic_read_locked_mine.gif*18*19
-
-img_topic_unread = topic_unread.gif*18*19
-img_topic_unread_mine = topic_unread_mine.gif*18*19
-img_topic_unread_hot = topic_unread_hot.gif*18*19
-img_topic_unread_hot_mine = topic_unread_hot_mine.gif*18*19
-img_topic_unread_locked = topic_unread_locked.gif*18*19
-img_topic_unread_locked_mine = topic_unread_locked_mine.gif*18*19
-
-img_sticky_read = sticky_read.gif*18*19
-img_sticky_read_mine = sticky_read_mine.gif*18*19
-img_sticky_read_locked = sticky_read_locked.gif*18*19
-img_sticky_read_locked_mine = sticky_read_locked_mine.gif*18*19
-img_sticky_unread = sticky_unread.gif*18*19
-img_sticky_unread_mine = sticky_unread_mine.gif*18*19
-img_sticky_unread_locked = sticky_unread_locked.gif*18*19
-img_sticky_unread_locked_mine = sticky_unread_locked_mine.gif*18*19
-
-img_announce_read = announce_read.gif*18*19
-img_announce_read_mine = announce_read_mine.gif*18*19
-img_announce_read_locked = announce_read_locked.gif*18*19
-img_announce_read_locked_mine = announce_read_locked_mine.gif*18*19
-img_announce_unread = announce_unread.gif*18*19
-img_announce_unread_mine = announce_unread_mine.gif*18*19
-img_announce_unread_locked = announce_unread_locked.gif*18*19
-img_announce_unread_locked_mine = announce_unread_locked_mine.gif*18*19
-
-img_global_read = announce_read.gif*18*19
-img_global_read_mine = announce_read_mine.gif*18*19
-img_global_read_locked = announce_read_locked.gif*18*19
-img_global_read_locked_mine = announce_read_locked_mine.gif*18*19
-img_global_unread = announce_unread.gif*18*19
-img_global_unread_mine = announce_unread_mine.gif*18*19
-img_global_unread_locked = announce_unread_locked.gif*18*19
-img_global_unread_locked_mine = announce_unread_locked_mine.gif*18*19
-
-img_subforum_read =
-img_subforum_unread =
-
-img_pm_read = topic_read.gif*18*19
-img_pm_unread = topic_unread.gif*18*19
-
-img_icon_back_top =
-
-img_icon_post_target = icon_post_target.gif*9*12
-img_icon_post_target_unread = icon_post_target_unread.gif*9*12
-
-img_icon_topic_attach = icon_topic_attach.gif*18*14
-img_icon_topic_latest = icon_topic_latest.gif*9*18
-img_icon_topic_newest = icon_topic_newest.gif*9*18
-img_icon_topic_reported = icon_topic_reported.gif*18*19
-img_icon_topic_unapproved = icon_topic_unapproved.gif*18*19
-
diff --git a/phpBB/styles/subsilver2/style.cfg b/phpBB/styles/subsilver2/style.cfg
index b0fe5e6639..438ced13f4 100644
--- a/phpBB/styles/subsilver2/style.cfg
+++ b/phpBB/styles/subsilver2/style.cfg
@@ -3,12 +3,11 @@
#
# @package phpBB3
# @copyright (c) 2005 phpBB Group
-# @license http://opensource.org/licenses/gpl-license.php GNU Public License
+# @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
#
#
# At the left is the name, please do not change this
# At the right the value is entered
-# For on/off options the valid values are on, off, 1, 0, true and false
#
# Values get trimmed, if you want to add a space in front or at the end of
# the value, then enclose the value with single or double quotes.
@@ -19,4 +18,12 @@
# General Information about this style
name = subsilver2
copyright = © 2005 phpBB Group
-version = 3.0.12
+style_version = 3.1.0-b1
+phpbb_version = 3.1.0-b1
+
+# Defining a different template bitfield
+# template_bitfield = lNg=
+
+# Parent style
+# Set value to empty or to this style's name if this style does not have a parent style
+parent = subsilver2
diff --git a/phpBB/styles/subsilver2/template/attachment.html b/phpBB/styles/subsilver2/template/attachment.html
index fca620b481..eb5dd91634 100644
--- a/phpBB/styles/subsilver2/template/attachment.html
+++ b/phpBB/styles/subsilver2/template/attachment.html
@@ -6,7 +6,7 @@
<!-- ELSE -->
<!-- IF _file.COMMENT -->
- <span class="gensmall"><b>{L_FILE_COMMENT}:</b> {_file.COMMENT}</span><br />
+ <span class="gensmall"><b>{L_FILE_COMMENT}{L_COLON}</b> {_file.COMMENT}</span><br />
<!-- ENDIF -->
<!-- IF _file.S_THUMBNAIL -->
diff --git a/phpBB/styles/subsilver2/template/avatars.js b/phpBB/styles/subsilver2/template/avatars.js
new file mode 100644
index 0000000000..146aca94d3
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/avatars.js
@@ -0,0 +1,15 @@
+(function($) { // Avoid conflicts with other libraries
+
+"use strict";
+
+function avatarHide() {
+ $('.[class^="avatar_option_"]').hide();
+
+ var selected = $('#avatar_driver').val();
+ $('.avatar_option_' + selected).show();
+}
+
+avatarHide();
+$('#avatar_driver').bind('change', avatarHide);
+
+})(jQuery); // Avoid conflicts with other libraries
diff --git a/phpBB/styles/subsilver2/template/bbcode.html b/phpBB/styles/subsilver2/template/bbcode.html
index 50162740d0..5558716cad 100644
--- a/phpBB/styles/subsilver2/template/bbcode.html
+++ b/phpBB/styles/subsilver2/template/bbcode.html
@@ -9,11 +9,11 @@
<!-- BEGIN listitem_close --></li><!-- END listitem_close -->
<!-- BEGIN quote_username_open -->
-<div class="quotetitle">{USERNAME} {L_WROTE}:</div><div class="quotecontent">
+<div class="quotetitle">{USERNAME} {L_WROTE}{L_COLON}</div><div class="quotecontent">
<!-- END quote_username_open -->
<!-- BEGIN quote_open -->
-<div class="quotetitle"><b>{L_QUOTE}:</b></div><div class="quotecontent">
+<div class="quotetitle"><b>{L_QUOTE}{L_COLON}</b></div><div class="quotecontent">
<!-- END quote_open -->
<!-- BEGIN quote_close -->
@@ -21,15 +21,15 @@
<!-- END quote_close -->
<!-- BEGIN code_open -->
-<div class="codetitle"><b>{L_CODE}:</b></div><div class="codecontent">
+<div class="codetitle"><b>{L_CODE}{L_COLON}</b></div><pre class="codecontent">
<!-- END code_open -->
<!-- BEGIN code_close -->
-</div>
+</pre>
<!-- END code_close -->
<!-- BEGIN inline_attachment_open -->
-<div class="attachtitle">{L_ATTACHMENT}:</div><div class="attachcontent">
+<div class="attachtitle">{L_ATTACHMENT}{L_COLON}</div><div class="attachcontent">
<!-- END inline_attachment_open -->
<!-- BEGIN inline_attachment_close -->
diff --git a/phpBB/styles/subsilver2/template/breadcrumbs.html b/phpBB/styles/subsilver2/template/breadcrumbs.html
index ad180250ce..09ee9a8606 100644
--- a/phpBB/styles/subsilver2/template/breadcrumbs.html
+++ b/phpBB/styles/subsilver2/template/breadcrumbs.html
@@ -1,8 +1,10 @@
+ <!-- IF $S_MICRODATA --><!-- DEFINE $MICRODATA = ' itemtype="http://data-vocabulary.org/Breadcrumb" itemscope=""' --><!-- ELSE --><!-- DEFINE $MICRODATA = '' --><!-- ENDIF -->
<table class="tablebg" width="100%" cellspacing="1" cellpadding="0" style="margin-top: 5px;">
<tr>
<td class="row1">
- <p class="breadcrumbs"><a href="{U_INDEX}">{L_INDEX}</a><!-- BEGIN navlinks --> &#187; <a href="{navlinks.U_VIEW_FORUM}">{navlinks.FORUM_NAME}</a><!-- END navlinks --></p>
+ <p class="breadcrumbs"><!-- IF U_SITE_HOME --><a href="{U_SITE_HOME}"{$MICRODATA}>{L_SITE_HOME}</a> <strong>&#187;</strong> <!-- ENDIF --><a href="{U_INDEX}"{$MICRODATA}>{L_INDEX}</a><!-- BEGIN navlinks --> &#187; <a href="{navlinks.U_VIEW_FORUM}"{$MICRODATA}>{navlinks.FORUM_NAME}</a><!-- END navlinks -->
+ <!-- EVENT overall_header_breadcrumb_append --></p>
<p class="datetime">{S_TIMEZONE}</p>
</td>
</tr>
- </table> \ No newline at end of file
+ </table>
diff --git a/phpBB/styles/subsilver2/template/captcha_default.html b/phpBB/styles/subsilver2/template/captcha_default.html
index e2edf0b810..1be25403ce 100644
--- a/phpBB/styles/subsilver2/template/captcha_default.html
+++ b/phpBB/styles/subsilver2/template/captcha_default.html
@@ -11,7 +11,7 @@
<input type="hidden" name="confirm_id" id="confirm_id" value="{CONFIRM_ID}" /></td>
</tr>
<tr>
- <td class="row1"><b class="genmed">{L_CONFIRM_CODE}:</b><br /><span class="gensmall">{L_CONFIRM_CODE_EXPLAIN}</span></td>
+ <td class="row1"><b class="genmed">{L_CONFIRM_CODE}{L_COLON}</b><br /><span class="gensmall">{L_CONFIRM_CODE_EXPLAIN}</span></td>
<td class="row2"><input class="post" type="text" name="confirm_code" size="8" maxlength="8"<!-- IF $CAPTCHA_TAB_INDEX --> tabindex="{$CAPTCHA_TAB_INDEX}"<!-- ENDIF --> />
<!-- IF S_CONFIRM_REFRESH --><input type="submit" name="refresh_vc" id="refresh_vc" class="btnlite" value="{L_VC_REFRESH}" /><!-- ENDIF --></td>
</tr>
diff --git a/phpBB/styles/subsilver2/template/captcha_qa.html b/phpBB/styles/subsilver2/template/captcha_qa.html
index 3a5778b33e..90a6492400 100644
--- a/phpBB/styles/subsilver2/template/captcha_qa.html
+++ b/phpBB/styles/subsilver2/template/captcha_qa.html
@@ -2,7 +2,7 @@
<th colspan="2" valign="middle">{L_CONFIRM_QUESTION}</th>
</tr>
<tr>
- <td class="row1"><b class="genmed">{QA_CONFIRM_QUESTION}:</b><br /><span class="gensmall">{L_CONFIRM_QUESTION_EXPLAIN}</span></td>
+ <td class="row1"><b class="genmed">{QA_CONFIRM_QUESTION}{L_COLON}</b><br /><span class="gensmall">{L_CONFIRM_QUESTION_EXPLAIN}</span></td>
<td class="row2"><input class="post" type="text" name="qa_answer" size="80"<!-- IF $CAPTCHA_TAB_INDEX --> tabindex="{$CAPTCHA_TAB_INDEX}"<!-- ENDIF --> />
<input type="hidden" name="qa_confirm_id" id="confirm_id" value="{QA_CONFIRM_ID}" /></td>
</tr>
diff --git a/phpBB/styles/subsilver2/template/captcha_recaptcha.html b/phpBB/styles/subsilver2/template/captcha_recaptcha.html
index ec09b28ef5..0d116b361f 100644
--- a/phpBB/styles/subsilver2/template/captcha_recaptcha.html
+++ b/phpBB/styles/subsilver2/template/captcha_recaptcha.html
@@ -3,7 +3,7 @@
<th colspan="2" valign="middle">{L_CONFIRM_CODE}</th>
</tr>
<tr>
- <td class="row1"><b class="genmed">{L_CONFIRM_CODE}:</b><br /><span class="gensmall">{L_RECAPTCHA_EXPLAIN}</span></td>
+ <td class="row1"><b class="genmed">{L_CONFIRM_CODE}{L_COLON}</b><br /><span class="gensmall">{L_RECAPTCHA_EXPLAIN}</span></td>
<td class="row2">
<script type="text/javascript">
// <![CDATA[
diff --git a/phpBB/styles/subsilver2/template/confirm_body.html b/phpBB/styles/subsilver2/template/confirm_body.html
index 92c2481c2d..1712017c38 100644
--- a/phpBB/styles/subsilver2/template/confirm_body.html
+++ b/phpBB/styles/subsilver2/template/confirm_body.html
@@ -9,7 +9,7 @@
<th>{MESSAGE_TITLE}</th>
</tr>
<tr>
- <td class="row1" align="center"><br /><p class="gen">{MESSAGE_TEXT}</p><br />{S_HIDDEN_FIELDS}<input type="submit" name="confirm" value="{YES_VALUE}" class="btnmain" />&nbsp;&nbsp;<input type="submit" name="cancel" value="{L_NO}" class="btnlite" /></td>
+ <td class="row1" align="center"><br /><p class="gen">{MESSAGE_TEXT}</p><br />{S_HIDDEN_FIELDS}<input type="submit" name="confirm" value="{YES_VALUE}" class="btnlite" />&nbsp;&nbsp;<input type="submit" name="cancel" value="{L_NO}" class="btnlite" /></td>
</tr>
</table>
@@ -25,4 +25,4 @@
<div align="{S_CONTENT_FLOW_END}"><!-- INCLUDE jumpbox.html --></div>
-<!-- INCLUDE overall_footer.html --> \ No newline at end of file
+<!-- INCLUDE overall_footer.html -->
diff --git a/phpBB/styles/subsilver2/template/confirm_delete_body.html b/phpBB/styles/subsilver2/template/confirm_delete_body.html
new file mode 100644
index 0000000000..9e416f5195
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/confirm_delete_body.html
@@ -0,0 +1,56 @@
+<!-- INCLUDE overall_header.html -->
+
+<div id="pagecontent">
+
+ <form name="confirm" action="{S_CONFIRM_ACTION}" method="post">
+
+ <table class="tablebg" width="100%" cellspacing="1">
+ <tr>
+ <th>{MESSAGE_TITLE}</th>
+ </tr>
+ <tr>
+ <td class="row1" align="center">
+ <br />
+ <p class="gen">{MESSAGE_TEXT}</p>
+ <br />
+
+ <!-- IF not S_SOFTDELETED and (S_DELETE_REASON or (S_ALLOWED_DELETE and S_ALLOWED_SOFTDELETE)) -->
+ <table border="0" width="90%" cellspacing="2" cellpadding="1">
+ <!-- IF S_ALLOWED_DELETE and S_ALLOWED_SOFTDELETE -->
+ <tr>
+ <td class="row1" width="22%"><b class="gen">{L_DELETE_PERMANENTLY}{L_COLON}</b></td>
+ <td class="row1" width="78%">
+ <input id="delete_permanent" name="delete_permanent" type="checkbox" value="1" {S_CHECKED_PERMANENT} />
+ <!-- IF S_TOPIC_MODE -->{L_DELETE_TOPIC_PERMANENTLY}<!-- ELSE -->{L_DELETE_POST_PERMANENTLY}<!-- ENDIF -->
+ </td>
+ </tr>
+ <!-- ENDIF -->
+ <!-- IF S_DELETE_REASON -->
+ <tr>
+ <td class="row1" valign="top"><span class="gen"><b>{L_DELETE_REASON}{L_COLON}</b></span><br /><span class="gensmall">{L_DELETE_REASON_EXPLAIN}</span></td>
+ <td class="row1"><input type="text" name="delete_reason" value="" class="inputbox autowidth" maxlength="120" size="45" /></td>
+ </tr>
+ <!-- ENDIF -->
+ </table>
+ <br />
+ <!-- ENDIF -->
+ {S_HIDDEN_FIELDS}
+ <input type="submit" name="confirm" value="{L_YES}" class="btnmain" />&nbsp;&nbsp;
+ <input type="submit" name="cancel" value="{L_NO}" class="btnlite" />
+ </td>
+ </tr>
+ </table>
+
+ </form>
+
+</div>
+
+<br clear="all" />
+
+<!-- INCLUDE breadcrumbs.html -->
+
+<br clear="all" />
+
+<div align="{S_CONTENT_FLOW_END}"><!-- INCLUDE jumpbox.html --></div>
+
+<!-- INCLUDE overall_footer.html -->
diff --git a/phpBB/styles/subsilver2/template/custom_profile_fields.html b/phpBB/styles/subsilver2/template/custom_profile_fields.html
deleted file mode 100644
index c8f287ddb4..0000000000
--- a/phpBB/styles/subsilver2/template/custom_profile_fields.html
+++ /dev/null
@@ -1,31 +0,0 @@
-<!-- BEGIN dropdown -->
- <select name="{dropdown.FIELD_IDENT}">
- <!-- BEGIN options --><option value="{dropdown.options.OPTION_ID}"{dropdown.options.SELECTED}>{dropdown.options.VALUE}</option><!-- END options -->
- </select>
-<!-- END dropdown -->
-
-<!-- BEGIN text -->
- <textarea name="{text.FIELD_IDENT}" rows="{text.FIELD_ROWS}" cols="{text.FIELD_COLS}">{text.FIELD_VALUE}</textarea>
-<!-- END text -->
-
-<!-- BEGIN string -->
- <input type="text" class="post" name="{string.FIELD_IDENT}" size="{string.FIELD_LENGTH}" maxlength="{string.FIELD_MAXLEN}" value="{string.FIELD_VALUE}" />
-<!-- END string -->
-
-<!-- BEGIN bool -->
- <!-- IF bool.FIELD_LENGTH eq 1 -->
- <!-- BEGIN options --><input type="radio" class="radio" name="{bool.FIELD_IDENT}" value="{bool.options.OPTION_ID}"{bool.options.CHECKED} /><span class="genmed">{bool.options.VALUE}</span>&nbsp; &nbsp;<!-- END options -->
- <!-- ELSE -->
- <input type="checkbox" class="radio" name="{bool.FIELD_IDENT}" value="1"<!-- IF bool.FIELD_VALUE eq 1 --> checked="checked"<!-- ENDIF --> />
- <!-- ENDIF -->
-<!-- END bool -->
-
-<!-- BEGIN int -->
- <input type="text" class="post" name="{int.FIELD_IDENT}" size="{int.FIELD_LENGTH}" value="{int.FIELD_VALUE}" />
-<!-- END int -->
-
-<!-- BEGIN date -->
- <span class="genmed">{L_DAY}:</span> <select name="{date.FIELD_IDENT}_day">{date.S_DAY_OPTIONS}</select>
- <span class="genmed">{L_MONTH}:</span> <select name="{date.FIELD_IDENT}_month">{date.S_MONTH_OPTIONS}</select>
- <span class="genmed">{L_YEAR}:</span> <select name="{date.FIELD_IDENT}_year">{date.S_YEAR_OPTIONS}</select>
-<!-- END date -->
diff --git a/phpBB/styles/subsilver2/template/faq_body.html b/phpBB/styles/subsilver2/template/faq_body.html
index 6a4df3659c..22c4145a20 100644
--- a/phpBB/styles/subsilver2/template/faq_body.html
+++ b/phpBB/styles/subsilver2/template/faq_body.html
@@ -60,4 +60,4 @@
<div align="{S_CONTENT_FLOW_END}"><!-- INCLUDE jumpbox.html --></div>
-<!-- INCLUDE overall_footer.html --> \ No newline at end of file
+<!-- INCLUDE overall_footer.html -->
diff --git a/phpBB/styles/subsilver2/template/forumlist_body.html b/phpBB/styles/subsilver2/template/forumlist_body.html
index a994e9e676..0d522a6959 100644
--- a/phpBB/styles/subsilver2/template/forumlist_body.html
+++ b/phpBB/styles/subsilver2/template/forumlist_body.html
@@ -9,23 +9,25 @@
<th>&nbsp;{L_LAST_POST}&nbsp;</th>
</tr>
<!-- BEGIN forumrow -->
+ <!-- EVENT forumlist_body_category_header_before -->
<!-- IF forumrow.S_IS_CAT -->
<tr>
<td class="cat" colspan="2"><h4><a href="{forumrow.U_VIEWFORUM}">{forumrow.FORUM_NAME}</a></h4></td>
<td class="catdiv" colspan="3">&nbsp;</td>
</tr>
+ <!-- EVENT forumlist_body_category_header_after -->
<!-- ELSEIF forumrow.S_IS_LINK -->
<tr>
<td class="row1" width="50" align="center">{forumrow.FORUM_FOLDER_IMG}</td>
<td class="row1">
<!-- IF forumrow.FORUM_IMAGE -->
- <div style="float: {S_CONTENT_FLOW_BEGIN}; margin-{S_CONTENT_FLOW_END}: 5px;">{forumrow.FORUM_IMAGE}</div>
+ <div style="float: {S_CONTENT_FLOW_BEGIN}; margin-{S_CONTENT_FLOW_END}{L_COLON} 5px;">{forumrow.FORUM_IMAGE}</div>
<!-- ENDIF -->
<a class="forumlink" href="{forumrow.U_VIEWFORUM}">{forumrow.FORUM_NAME}</a>
<p class="forumdesc">{forumrow.FORUM_DESC}</p>
</td>
<!-- IF forumrow.CLICKS -->
- <td class="row2" colspan="3" align="center"><span class="genmed">{L_REDIRECTS}: {forumrow.CLICKS}</span></td>
+ <td class="row2" colspan="3" align="center"><span class="genmed">{L_REDIRECTS}{L_COLON} {forumrow.CLICKS}</span></td>
<!-- ELSE -->
<td class="row2" colspan="3" align="center">&nbsp;</td>
<!-- ENDIF -->
@@ -41,24 +43,41 @@
<td class="row1" width="50" align="center">{forumrow.FORUM_FOLDER_IMG}</td>
<td class="row1" width="100%">
<!-- IF forumrow.FORUM_IMAGE -->
- <div style="float: {S_CONTENT_FLOW_BEGIN}; margin-{S_CONTENT_FLOW_END}: 5px;">{forumrow.FORUM_IMAGE}</div>
+ <div style="float: {S_CONTENT_FLOW_BEGIN}; margin-{S_CONTENT_FLOW_END}{L_COLON} 5px;">{forumrow.FORUM_IMAGE}</div>
<!-- ENDIF -->
<a class="forumlink" href="{forumrow.U_VIEWFORUM}">{forumrow.FORUM_NAME}</a>
<p class="forumdesc">{forumrow.FORUM_DESC}</p>
<!-- IF forumrow.MODERATORS -->
- <p class="forumdesc"><strong>{forumrow.L_MODERATOR_STR}:</strong> {forumrow.MODERATORS}</p>
+ <p class="forumdesc"><strong>{forumrow.L_MODERATOR_STR}{L_COLON}</strong> {forumrow.MODERATORS}</p>
<!-- ENDIF -->
- <!-- IF forumrow.SUBFORUMS and forumrow.S_LIST_SUBFORUMS -->
- <p class="forumdesc"><strong>{forumrow.L_SUBFORUM_STR}</strong> {forumrow.SUBFORUMS}</p>
+ <!-- IF .forumrow.subforum and forumrow.S_LIST_SUBFORUMS -->
+ <!-- EVENT forumlist_body_subforums_before -->
+ <p class="forumdesc"><strong>{forumrow.L_SUBFORUM_STR}{L_COLON}</strong>
+ <!-- BEGIN subforum -->
+ <a href="{forumrow.subforum.U_SUBFORUM}" class="subforum<!-- IF forumrow.subforum.S_UNREAD --> unread<!-- ELSE --> read<!-- ENDIF -->" title="<!-- IF forumrow.subforum.UNREAD -->{L_UNREAD_POSTS}<!-- ELSE -->{L_NO_UNREAD_POSTS}<!-- ENDIF -->">{forumrow.subforum.SUBFORUM_NAME}</a><!-- IF not forumrow.subforum.S_LAST_ROW -->{L_COMMA_SEPARATOR}<!-- ENDIF -->
+ <!-- END subforum -->
+ </p>
+ <!-- EVENT forumlist_body_subforums_after -->
<!-- ENDIF -->
</td>
<td class="row2" align="center"><p class="topicdetails">{forumrow.TOPICS}</p></td>
<td class="row2" align="center"><p class="topicdetails">{forumrow.POSTS}</p></td>
<td class="row2" align="center" nowrap="nowrap">
<!-- IF forumrow.LAST_POST_TIME -->
- <p class="topicdetails"><!-- IF forumrow.U_UNAPPROVED_TOPICS --><a href="{forumrow.U_UNAPPROVED_TOPICS}">{UNAPPROVED_IMG}</a>&nbsp;<!-- ENDIF -->{forumrow.LAST_POST_TIME}</p>
+ <!-- IF forumrow.S_DISPLAY_SUBJECT -->
+ <!-- EVENT forumlist_body_last_post_title_prepend -->
+ <p class="topicdetails"><a href="{forumrow.U_LAST_POST}" title="{forumrow.LAST_POST_SUBJECT}" class="lastsubject">{forumrow.LAST_POST_SUBJECT_TRUNCATED}</a></p>
+ <!-- ENDIF -->
+ <p class="topicdetails">
+ <!-- IF forumrow.U_UNAPPROVED_TOPICS -->
+ <a href="{forumrow.U_UNAPPROVED_TOPICS}" class="imageset">{UNAPPROVED_IMG}</a>&nbsp;
+ <!-- ELSEIF forumrow.U_UNAPPROVED_POSTS -->
+ <a href="{forumrow.U_UNAPPROVED_POSTS}" class="imageset">{UNAPPROVED_POST_IMG}</a>&nbsp;
+ <!-- ENDIF -->
+ {forumrow.LAST_POST_TIME}
+ </p>
<p class="topicdetails">{forumrow.LAST_POSTER_FULL}
- <!-- IF not S_IS_BOT --><a href="{forumrow.U_LAST_POST}">{LAST_POST_IMG}</a><!-- ENDIF -->
+ <!-- IF not S_IS_BOT --><a href="{forumrow.U_LAST_POST}" class="imageset">{LAST_POST_IMG}</a><!-- ENDIF -->
</p>
<!-- ELSE -->
<p class="topicdetails">{L_NO_POSTS}</p>
@@ -66,9 +85,10 @@
</td>
</tr>
<!-- ENDIF -->
+ <!-- EVENT forumlist_body_last_row_after -->
<!-- BEGINELSE -->
<tr>
<td class="row1" colspan="5" align="center"><p class="gensmall">{L_NO_FORUMS}</p></td>
</tr>
<!-- END forumrow -->
-</table> \ No newline at end of file
+</table>
diff --git a/phpBB/styles/subsilver2/template/index_body.html b/phpBB/styles/subsilver2/template/index_body.html
index 8faf76e9ee..55a62fcf18 100644
--- a/phpBB/styles/subsilver2/template/index_body.html
+++ b/phpBB/styles/subsilver2/template/index_body.html
@@ -1,13 +1,17 @@
<!-- INCLUDE overall_header.html -->
-<!-- IF U_MCP -->
+<!-- EVENT index_body_linklist_before -->
+
+<!-- IF U_MCP or U_ACP -->
<div id="pageheader">
- <p class="linkmcp">[ <a href="{U_MCP}">{L_MCP}</a> ]</p>
+ <p class="linkmcp">[&nbsp;<!-- IF U_ACP --><a href="{U_ACP}">{L_ACP}</a><!-- IF U_MCP -->&nbsp;|&nbsp;<!-- ENDIF --><!-- ENDIF --><!-- IF U_MCP --><a href="{U_MCP}">{L_MCP}</a><!-- ENDIF -->&nbsp;]</p>
</div>
<br clear="all" /><br />
<!-- ENDIF -->
+<!-- EVENT index_body_linklist_after -->
+
<!-- INCLUDE forumlist_body.html -->
<!-- IF not S_IS_BOT or U_TEAM -->
@@ -18,6 +22,8 @@
<!-- INCLUDE breadcrumbs.html -->
+<!-- EVENT index_body_stat_blocks_before -->
+
<!-- IF S_DISPLAY_ONLINE_LIST -->
<br clear="all" />
@@ -50,7 +56,7 @@
</tr>
<tr>
<td class="row1" align="center" valign="middle"><img src="{T_THEME_PATH}/images/whosonline.gif" alt="{L_BIRTHDAYS}" /></td>
- <td class="row1" width="100%"><p class="genmed"><!-- IF BIRTHDAY_LIST -->{L_CONGRATULATIONS}: <b>{BIRTHDAY_LIST}</b><!-- ELSE -->{L_NO_BIRTHDAYS}<!-- ENDIF --></p></td>
+ <td class="row1" width="100%"><p class="genmed"><!-- IF .birthdays -->{L_CONGRATULATIONS}{L_COLON} <b><!-- BEGIN birthdays -->{birthdays.USERNAME}<!-- IF birthdays.AGE !== '' --> ({birthdays.AGE})<!-- ENDIF --><!-- IF not birthdays.S_LAST_ROW -->, <!-- ENDIF --><!-- END birthdays --></b><!-- ELSE -->{L_NO_BIRTHDAYS}<!-- ENDIF --></p></td>
</tr>
</table>
<!-- ENDIF -->
@@ -77,7 +83,7 @@
<td class="cat"><h4><a href="{U_LOGIN_LOGOUT}">{L_LOGIN_LOGOUT}</a></h4></td>
</tr>
<tr>
- <td class="row1" align="center"><span class="genmed">{L_USERNAME}:</span> <input class="post" type="text" name="username" size="10" />&nbsp; <span class="genmed">{L_PASSWORD}:</span> <input class="post" type="password" name="password" size="10" />&nbsp; <!-- IF S_AUTOLOGIN_ENABLED --> <span class="gensmall">{L_LOG_ME_IN}</span> <input type="checkbox" class="radio" name="autologin" /><!-- ENDIF -->&nbsp; <input type="submit" class="btnmain" name="login" value="{L_LOGIN}" /></td>
+ <td class="row1" align="center"><span class="genmed">{L_USERNAME}{L_COLON}</span> <input class="post" type="text" name="username" size="10" />&nbsp; <span class="genmed">{L_PASSWORD}{L_COLON}</span> <input class="post" type="password" name="password" size="10" />&nbsp; <!-- IF U_SEND_PASSWORD --><a href="{U_SEND_PASSWORD}">{L_FORGOT_PASS}</a>&nbsp; <!-- ENDIF --> <!-- IF S_AUTOLOGIN_ENABLED --> <span class="gensmall">{L_LOG_ME_IN}</span> <input type="checkbox" class="radio" name="autologin" /><!-- ENDIF -->&nbsp; <input type="submit" class="btnmain" name="login" value="{L_LOGIN}" /></td>
</tr>
</table>
{S_LOGIN_REDIRECT}
@@ -100,4 +106,4 @@
</tr>
</table>
-<!-- INCLUDE overall_footer.html --> \ No newline at end of file
+<!-- INCLUDE overall_footer.html -->
diff --git a/phpBB/styles/subsilver2/template/jumpbox.html b/phpBB/styles/subsilver2/template/jumpbox.html
index f46fed9f27..e0603c6a6e 100644
--- a/phpBB/styles/subsilver2/template/jumpbox.html
+++ b/phpBB/styles/subsilver2/template/jumpbox.html
@@ -1,10 +1,10 @@
<!-- IF S_DISPLAY_JUMPBOX -->
- <form method="post" name="jumpbox" action="{S_JUMPBOX_ACTION}" onsubmit="if(document.jumpbox.f.value == -1){return false;}">
+ <form method="get" name="jumpbox" action="{S_JUMPBOX_ACTION}" onsubmit="if(document.jumpbox.f.value == -1){return false;}">
<table cellspacing="0" cellpadding="0" border="0">
<tr>
- <td nowrap="nowrap"><span class="gensmall"><!-- IF S_IN_MCP and S_MERGE_SELECT -->{L_SELECT_TOPICS_FROM}<!-- ELSEIF S_IN_MCP -->{L_MODERATE_FORUM}<!-- ELSE -->{L_JUMP_TO}<!-- ENDIF -->:</span>&nbsp;<select name="f" onchange="if(this.options[this.selectedIndex].value != -1){ document.forms['jumpbox'].submit() }">
+ <td nowrap="nowrap">{HIDDEN_FIELDS_FOR_JUMPBOX}<span class="gensmall"><!-- IF S_IN_MCP and S_MERGE_SELECT -->{L_SELECT_TOPICS_FROM}<!-- ELSEIF S_IN_MCP -->{L_MODERATE_FORUM}<!-- ELSE -->{L_JUMP_TO}<!-- ENDIF -->{L_COLON}</span>&nbsp;<select name="f" onchange="if(this.options[this.selectedIndex].value != -1){ document.forms['jumpbox'].submit() }">
<!-- BEGIN jumpbox_forums -->
<!-- IF jumpbox_forums.S_FORUM_COUNT eq 1 --><option value="-1">------------------</option><!-- ENDIF -->
@@ -16,4 +16,4 @@
</table>
</form>
-<!-- ENDIF --> \ No newline at end of file
+<!-- ENDIF -->
diff --git a/phpBB/styles/subsilver2/template/login_body.html b/phpBB/styles/subsilver2/template/login_body.html
index ba316517a9..ed63e748cf 100644
--- a/phpBB/styles/subsilver2/template/login_body.html
+++ b/phpBB/styles/subsilver2/template/login_body.html
@@ -34,7 +34,7 @@
<!-- ENDIF -->
<tr>
- <td valign="top" <!-- IF S_ADMIN_AUTH -->style="width: 50%; text-align: {S_CONTENT_FLOW_END};"<!-- ENDIF -->><b class="gensmall">{L_USERNAME}:</b></td>
+ <td valign="top" <!-- IF S_ADMIN_AUTH -->style="width: 50%; text-align: {S_CONTENT_FLOW_END};"<!-- ENDIF -->><b class="gensmall">{L_USERNAME}{L_COLON}</b></td>
<td><input class="post" type="text" name="{USERNAME_CREDENTIAL}" size="25" value="{USERNAME}" tabindex="1" />
<!-- IF not S_ADMIN_AUTH and S_REGISTER_ENABLED -->
<br /><a class="gensmall" href="{U_REGISTER}">{L_REGISTER}</a>
@@ -42,7 +42,7 @@
</td>
</tr>
<tr>
- <td valign="top" <!-- IF S_ADMIN_AUTH -->style="width: 50%; text-align: {S_CONTENT_FLOW_END};"<!-- ENDIF -->><b class="gensmall">{L_PASSWORD}:</b></td>
+ <td valign="top" <!-- IF S_ADMIN_AUTH -->style="width: 50%; text-align: {S_CONTENT_FLOW_END};"<!-- ENDIF -->><b class="gensmall">{L_PASSWORD}{L_COLON}</b></td>
<td>
<input class="post" type="password" name="{PASSWORD_CREDENTIAL}" size="25" tabindex="2" />
<!-- IF U_SEND_PASSWORD --><br /><a class="gensmall" href="{U_SEND_PASSWORD}">{L_FORGOT_PASS}</a><!-- ENDIF -->
@@ -61,6 +61,9 @@
<td><input type="checkbox" class="radio" name="viewonline" tabindex="4" /> <span class="gensmall">{L_HIDE_ME}</span></td>
</tr>
<!-- ENDIF -->
+ <!-- IF not S_ADMIN_AUTH and PROVIDER_TEMPLATE_FILE -->
+ <!-- INCLUDE {PROVIDER_TEMPLATE_FILE} -->
+ <!-- ENDIF -->
</table>
</td>
</tr>
diff --git a/phpBB/styles/subsilver2/template/login_body_oauth.html b/phpBB/styles/subsilver2/template/login_body_oauth.html
new file mode 100644
index 0000000000..6f374fa4f2
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/login_body_oauth.html
@@ -0,0 +1,7 @@
+<!-- BEGIN oauth -->
+ <tr>
+ <td>
+ <a href="{oauth.REDIRECT_URL}">{oauth.SERVICE_NAME}</a>
+ </td>
+ </tr>
+<!-- END oauth -->
diff --git a/phpBB/styles/subsilver2/template/login_forum.html b/phpBB/styles/subsilver2/template/login_forum.html
index e91a406611..9a141fc295 100644
--- a/phpBB/styles/subsilver2/template/login_forum.html
+++ b/phpBB/styles/subsilver2/template/login_forum.html
@@ -29,7 +29,7 @@
</tr>
<!-- ENDIF -->
<tr>
- <td class="gensmall"><b>{L_PASSWORD}:</b></td>
+ <td class="gensmall"><b>{L_PASSWORD}{L_COLON}</b></td>
<td><input class="post" type="password" name="password" size="25" tabindex="2" /></td>
</tr>
</table>
@@ -53,4 +53,4 @@
<div align="{S_CONTENT_FLOW_END}"><!-- INCLUDE jumpbox.html --></div>
-<!-- INCLUDE overall_footer.html --> \ No newline at end of file
+<!-- INCLUDE overall_footer.html -->
diff --git a/phpBB/styles/subsilver2/template/mcp_approve.html b/phpBB/styles/subsilver2/template/mcp_approve.html
index 2d2013f05c..8c2ef0806b 100644
--- a/phpBB/styles/subsilver2/template/mcp_approve.html
+++ b/phpBB/styles/subsilver2/template/mcp_approve.html
@@ -16,15 +16,15 @@
<!-- IF S_NOTIFY_POSTER -->
<input type="checkbox" class="radio" name="notify_poster" checked="checked" /><span class="gen"><!-- IF S_APPROVE -->{L_NOTIFY_POSTER_APPROVAL}<!-- ELSE -->{L_NOTIFY_POSTER_DISAPPROVAL}<!-- ENDIF --></span><br />
<!-- ENDIF -->
- <!-- IF not S_APPROVE -->
+ <!-- IF not S_APPROVE and not S_RESTORE and .reason -->
<br />
<table border="0" width="90%" cellspacing="2" cellpadding="1">
<tr>
- <td class="row1" width="22%"><b class="gen">{L_DISAPPROVE_REASON}:</b></td>
+ <td class="row1" width="22%"><b class="gen">{L_DISAPPROVE_REASON}{L_COLON}</b></td>
<td class="row1" width="78%"><select name="reason_id"><!-- BEGIN reason --><option value="{reason.ID}"<!-- IF reason.S_SELECTED --> selected="selected"<!-- ENDIF -->>{reason.DESCRIPTION}</option><!-- END reason --></select></td>
</tr>
<tr>
- <td class="row1" valign="top"><span class="gen"><b>{L_MORE_INFO}:</b></span><br /><span class="gensmall">{L_CAN_LEAVE_BLANK}</span></td>
+ <td class="row1" valign="top"><span class="gen"><b>{L_MORE_INFO}{L_COLON}</b></span><br /><span class="gensmall">{L_CAN_LEAVE_BLANK}</span></td>
<td class="row1"><textarea class="post" style="width:500px" name="reason" rows="10" cols="40">{REASON}</textarea></td>
</tr>
</table>
diff --git a/phpBB/styles/subsilver2/template/mcp_ban.html b/phpBB/styles/subsilver2/template/mcp_ban.html
index 706c8b2cd2..edf81c6d76 100644
--- a/phpBB/styles/subsilver2/template/mcp_ban.html
+++ b/phpBB/styles/subsilver2/template/mcp_ban.html
@@ -41,26 +41,26 @@
<td class="row3" colspan="2">{L_EXPLAIN}</td>
</tr>
<tr>
- <td class="row1" width="45%" valign="top"><b>{L_BAN_CELL}:</b></td>
+ <td class="row1" width="45%" valign="top"><b>{L_BAN_CELL}{L_COLON}</b></td>
<td class="row2">
<textarea name="ban" id="ban" cols="40" rows="3" class="post">{USERNAMES}</textarea>
<!-- IF S_USERNAME_BAN --><br />[ <a href="{U_FIND_USERNAME}" onclick="find_username(this.href); return false;">{L_FIND_USERNAME}</a> ]<!-- ENDIF -->
</td>
</tr>
<tr>
- <td class="row1" valign="top"><b>{L_BAN_LENGTH}:</b></td>
+ <td class="row1" valign="top"><b>{L_BAN_LENGTH}{L_COLON}</b></td>
<td class="row2"><select name="banlength">{S_BAN_END_OPTIONS}</select><br /><input type="text" name="banlengthother" class="post" /> {L_YEAR_MONTH_DAY}</td>
</tr>
<tr>
- <td class="row1" valign="top"><b>{L_BAN_EXCLUDE}:</b><br /><span class="gensmall">{L_BAN_EXCLUDE_EXPLAIN}</span></td>
+ <td class="row1" valign="top"><b>{L_BAN_EXCLUDE}{L_COLON}</b><br /><span class="gensmall">{L_BAN_EXCLUDE_EXPLAIN}</span></td>
<td class="row2"><input type="radio" class="radio" name="banexclude" value="1" /> {L_YES} &nbsp; <input type="radio" class="radio" name="banexclude" value="0" checked="checked" /> {L_NO}</td>
</tr>
<tr>
- <td class="row1" valign="top"><b>{L_BAN_REASON}:</b></td>
+ <td class="row1" valign="top"><b>{L_BAN_REASON}{L_COLON}</b></td>
<td class="row2"><input name="banreason" type="text" class="post" maxlength="255" /></td>
</tr>
<tr>
- <td class="row1" valign="top"><b>{L_BAN_GIVE_REASON}:</b></td>
+ <td class="row1" valign="top"><b>{L_BAN_GIVE_REASON}{L_COLON}</b></td>
<td class="row2"><input name="bangivereason" type="text" class="post" maxlength="255" /></td>
</tr>
<tr>
@@ -79,19 +79,19 @@
</tr>
<!-- IF S_BANNED_OPTIONS -->
<tr>
- <td class="row1" valign="top" width="45%"><b>{L_BAN_CELL}:</b></td>
+ <td class="row1" valign="top" width="45%"><b>{L_BAN_CELL}{L_COLON}</b></td>
<td class="row2"><select name="unban[]" multiple="multiple" size="10" style="width: 50%" onchange="if (this.selectedIndex > -1) display_details(this.options[this.selectedIndex].value); else display_details(-1);">{BANNED_OPTIONS}</select></td>
</tr>
<tr>
- <td class="row1" valign="top"><b>{L_BAN_LENGTH}:</b></td>
+ <td class="row1" valign="top"><b>{L_BAN_LENGTH}{L_COLON}</b></td>
<td class="row2"><input style="border: 0; width: 100%" type="text" name="unbanlength" readonly="readonly" /></td>
</tr>
<tr>
- <td class="row1" valign="top"><b>{L_BAN_REASON}:</b></td>
+ <td class="row1" valign="top"><b>{L_BAN_REASON}{L_COLON}</b></td>
<td class="row2"><textarea style="border: 0; width: 100%" name="unbanreason" readonly="readonly" rows="5" cols="80">&nbsp;</textarea></td>
</tr>
<tr>
- <td class="row1" valign="top"><b>{L_BAN_GIVE_REASON}:</b></td>
+ <td class="row1" valign="top"><b>{L_BAN_GIVE_REASON}{L_COLON}</b></td>
<td class="row2"><textarea style="border: 0; width: 100%" name="unbangivereason" readonly="readonly" rows="5" cols="80">&nbsp;</textarea></td>
</tr>
<tr>
@@ -106,4 +106,4 @@
{S_FORM_TOKEN}
</form>
-<!-- INCLUDE mcp_footer.html --> \ No newline at end of file
+<!-- INCLUDE mcp_footer.html -->
diff --git a/phpBB/styles/subsilver2/template/mcp_footer.html b/phpBB/styles/subsilver2/template/mcp_footer.html
index 3105c15ae4..280920b148 100644
--- a/phpBB/styles/subsilver2/template/mcp_footer.html
+++ b/phpBB/styles/subsilver2/template/mcp_footer.html
@@ -3,7 +3,7 @@
</tr>
</table>
- <!-- IF PAGINATION -->
+ <!-- IF .pagination -->
<table width="80%" align="{S_CONTENT_FLOW_END}" cellspacing="1">
<tr>
<td class="nav" valign="middle" nowrap="nowrap">&nbsp;{PAGE_NUMBER}<br /></td>
@@ -24,4 +24,4 @@
<div align="{S_CONTENT_FLOW_END}"><!-- INCLUDE jumpbox.html --></div>
-<!-- INCLUDE overall_footer.html --> \ No newline at end of file
+<!-- INCLUDE overall_footer.html -->
diff --git a/phpBB/styles/subsilver2/template/mcp_forum.html b/phpBB/styles/subsilver2/template/mcp_forum.html
index 80a6047858..b168bf3ac8 100644
--- a/phpBB/styles/subsilver2/template/mcp_forum.html
+++ b/phpBB/styles/subsilver2/template/mcp_forum.html
@@ -10,7 +10,7 @@
<table class="tablebg" width="100%" cellspacing="1">
<tr>
- <td class="cat" colspan="6" align="center"><span class="gensmall">{L_DISPLAY_TOPICS}:</span> {S_SELECT_SORT_DAYS}&nbsp;<span class="gensmall">{L_SORT_BY}</span> {S_SELECT_SORT_KEY} {S_SELECT_SORT_DIR}&nbsp;<input class="btnlite" type="submit" name="sort" value="{L_GO}" /></td>
+ <td class="cat" colspan="6" align="center"><span class="gensmall">{L_DISPLAY_TOPICS}{L_COLON}</span> {S_SELECT_SORT_DAYS}&nbsp;<span class="gensmall">{L_SORT_BY}</span> {S_SELECT_SORT_KEY} {S_SELECT_SORT_DIR}&nbsp;<input class="btnlite" type="submit" name="sort" value="{L_GO}" /></td>
</tr>
<tr>
<th width="4%" nowrap="nowrap">&nbsp;</th>
@@ -31,10 +31,13 @@
<!-- ENDIF -->
<p class="topictitle">{NEWEST_POST_IMG} {topicrow.ATTACH_ICON_IMG} <a href="{topicrow.U_VIEW_TOPIC}">{topicrow.TOPIC_TITLE}</a>
<!-- IF topicrow.S_TOPIC_UNAPPROVED or topicrow.S_POSTS_UNAPPROVED -->
- <a href="{topicrow.U_MCP_QUEUE}">{topicrow.UNAPPROVED_IMG}</a>&nbsp;
+ <a href="{topicrow.U_MCP_QUEUE}" class="imageset">{topicrow.UNAPPROVED_IMG}</a>&nbsp;
+ <!-- ENDIF -->
+ <!-- IF topicrow.S_TOPIC_DELETED or topicrow.S_POSTS_DELETED -->
+ <a href="{topicrow.U_MCP_QUEUE}" class="imageset">{topicrow.DELETED_IMG}</a>&nbsp;
<!-- ENDIF -->
<!-- IF topicrow.S_TOPIC_REPORTED and topicrow.U_MCP_REPORT -->
- <a href="{topicrow.U_MCP_REPORT}">{REPORTED_IMG}</a>&nbsp;
+ <a href="{topicrow.U_MCP_REPORT}" class="imageset">{REPORTED_IMG}</a>&nbsp;
<!-- ENDIF -->
<!-- IF topicrow.S_MOVED_TOPIC and S_CAN_DELETE -->
[ <a href="{topicrow.U_DELETE_TOPIC}">{L_DELETE_SHADOW_TOPIC}</a> ]&nbsp;
@@ -58,6 +61,7 @@
<select name="action">
<option value="" selected="selected">{L_SELECT_ACTION}</option>
<!-- IF S_CAN_DELETE --><option value="delete_topic">{L_DELETE}</option><!-- ENDIF -->
+ <!-- IF S_CAN_RESTORE --><option value="restore_topic">{L_RESTORE}</option><!-- ENDIF -->
<!-- IF S_CAN_MERGE --><option value="merge_topics">{L_MERGE}</option><!-- ENDIF -->
<!-- IF S_CAN_MOVE --><option value="move">{L_MOVE}</option><!-- ENDIF -->
<!-- IF S_CAN_FORK --><option value="fork">{L_FORK}</option><!-- ENDIF -->
@@ -86,4 +90,4 @@
</table>
<!-- ENDIF -->
-<!-- INCLUDE mcp_footer.html --> \ No newline at end of file
+<!-- INCLUDE mcp_footer.html -->
diff --git a/phpBB/styles/subsilver2/template/mcp_front.html b/phpBB/styles/subsilver2/template/mcp_front.html
index 7c63039259..7c17e13c52 100644
--- a/phpBB/styles/subsilver2/template/mcp_front.html
+++ b/phpBB/styles/subsilver2/template/mcp_front.html
@@ -19,21 +19,15 @@
<tr>
<td class="row1" width="15%" valign="top"><span class="gen"><!-- IF unapproved.U_FORUM --><a href="{unapproved.U_FORUM}">{unapproved.FORUM_NAME}</a><!-- ELSE -->{unapproved.FORUM_NAME}<!-- ENDIF --></span><!-- IF unapproved.U_MCP_FORUM --><br /><span class="gensmall">[ <a href="{unapproved.U_MCP_FORUM}">{L_MODERATE}</a> ]</span><!-- ENDIF --></td>
<td class="row2" valign="top"><span class="gen"><a href="{unapproved.U_TOPIC}">{unapproved.TOPIC_TITLE}</a></span><br /><span class="gensmall">[ <a href="{unapproved.U_MCP_TOPIC}">{L_MODERATE}</a> ]</span></td>
- <td class="row1" valign="top"><span class="gen">{unapproved.SUBJECT}</span><br /><span class="gensmall">[ <a href="{unapproved.U_POST_DETAILS}">{L_VIEW_DETAILS}</a> ]</span></td>
+ <td class="row1" valign="top">{unapproved.ATTACH_ICON_IMG} <span class="gen">{unapproved.SUBJECT}</span><br /><span class="gensmall">[ <a href="{unapproved.U_POST_DETAILS}">{L_VIEW_DETAILS}</a> ]</span></td>
<td class="row2" align="center" width="15%" nowrap="nowrap" valign="top"><span class="gen">{unapproved.AUTHOR_FULL}</span></td>
<td class="row1" align="center" width="15%" nowrap="nowrap" valign="top"><span class="gensmall">{unapproved.POST_TIME}</span></td>
<td class="row2" align="center"><input type="checkbox" class="radio" name="post_id_list[]" value="{unapproved.POST_ID}" /></td>
</tr>
- <!-- BEGINELSE -->
- <tr>
- <td class="row1" colspan="6" align="center"><span class="gen">{L_UNAPPROVED_POSTS_ZERO_TOTAL}</span></td>
- </tr>
<!-- END unapproved -->
- <!-- IF S_HAS_UNAPPROVED_POSTS -->
<tr>
<td class="row3" colspan="6"><span class="gensmall">{L_UNAPPROVED_TOTAL}</span></td>
</tr>
- <!-- ENDIF -->
<tr>
<td class="cat" colspan="6" align="center">{S_HIDDEN_FIELDS}<input class="btnmain" type="submit" name="action[approve]" value="{L_APPROVE}" />&nbsp;&nbsp;<input class="btnlite" type="submit" name="action[disapprove]" value="{L_DISAPPROVE}" /></td>
</tr>
@@ -66,20 +60,14 @@
<tr>
<td class="row1" width="15%" valign="top"><span class="gen"><!-- IF report.U_FORUM --><a href="{report.U_FORUM}">{report.FORUM_NAME}</a><!-- ELSE -->{report.FORUM_NAME}<!-- ENDIF --></span><!-- IF report.U_MCP_FORUM --><br /><span class="gensmall">[ <a href="{report.U_MCP_FORUM}">{L_MODERATE}</a> ]</span><!-- ENDIF --></td>
<td class="row2" valign="top"><span class="gen"><a href="{report.U_TOPIC}">{report.TOPIC_TITLE}</a></span><br /><span class="gensmall">[ <a href="{report.U_MCP_TOPIC}">{L_MODERATE}</a> ]</span></td>
- <td class="row1" valign="top"><span class="gen">{report.SUBJECT}</span><br /><span class="gensmall">[ <a href="{report.U_POST_DETAILS}">{L_VIEW_DETAILS}</a> ]</span></td>
+ <td class="row1" valign="top">{report.ATTACH_ICON_IMG} <span class="gen">{report.SUBJECT}</span><br /><span class="gensmall">[ <a href="{report.U_POST_DETAILS}">{L_VIEW_DETAILS}</a> ]</span></td>
<td class="row2" align="center" width="15%" nowrap="nowrap" valign="top"><span class="gen">{report.REPORTER_FULL}</span></td>
<td class="row1" align="center" width="15%" nowrap="nowrap" valign="top"><span class="gensmall">{report.REPORT_TIME}</span></td>
</tr>
- <!-- BEGINELSE -->
- <tr>
- <td class="row1" colspan="5" align="center"><span class="gen">{L_REPORTS_ZERO_TOTAL}</span></td>
- </tr>
<!-- END report -->
- <!-- IF S_HAS_REPORTS -->
<tr>
<td class="row3" colspan="5"><span class="gensmall">{L_REPORTS_TOTAL}</span></td>
</tr>
- <!-- ENDIF -->
</table>
<br clear="all" /><br />
@@ -100,23 +88,17 @@
</tr>
<!-- BEGIN pm_report -->
<tr>
- <td class="row1" valign="top"><span class="gen">{pm_report.PM_SUBJECT}</span><br /><span class="gensmall">[ <a href="{pm_report.U_PM_DETAILS}">{L_VIEW_DETAILS}</a> ]</span></td>
+ <td class="row1" valign="top">{pm_report.ATTACH_ICON_IMG} <span class="gen">{pm_report.PM_SUBJECT}</span><br /><span class="gensmall">[ <a href="{pm_report.U_PM_DETAILS}">{L_VIEW_DETAILS}</a> ]</span></td>
<td class="row2" align="center" width="15%" nowrap="nowrap" valign="top"><span class="gen">{pm_report.PM_AUTHOR_FULL}</span></td>
<td class="row1" align="center" width="15%" nowrap="nowrap" valign="top"><span class="gen">{pm_report.RECIPIENTS}</span></td>
<td class="row2" align="center" width="10%" nowrap="nowrap" valign="top"><span class="gensmall">{pm_report.PM_TIME}</span></td>
<td class="row1" align="center" width="15%" nowrap="nowrap" valign="top"><span class="gen">{pm_report.REPORTER_FULL}</span></td>
<td class="row2" align="center" width="10%" nowrap="nowrap" valign="top"><span class="gensmall">{pm_report.REPORT_TIME}</span></td>
</tr>
- <!-- BEGINELSE -->
- <tr>
- <td class="row1" colspan="6" align="center"><span class="gen">{L_PM_REPORTS_ZERO_TOTAL}</span></td>
- </tr>
<!-- END pm_report -->
- <!-- IF S_HAS_PM_REPORTS -->
<tr>
<td class="row3" colspan="6"><span class="gensmall">{L_PM_REPORTS_TOTAL}</span></td>
</tr>
- <!-- ENDIF -->
</table>
<br clear="all" /><br />
@@ -152,4 +134,4 @@
<br clear="all" />
<!-- ENDIF -->
-<!-- INCLUDE mcp_footer.html --> \ No newline at end of file
+<!-- INCLUDE mcp_footer.html -->
diff --git a/phpBB/styles/subsilver2/template/mcp_header.html b/phpBB/styles/subsilver2/template/mcp_header.html
index f107732234..7144750ed4 100644
--- a/phpBB/styles/subsilver2/template/mcp_header.html
+++ b/phpBB/styles/subsilver2/template/mcp_header.html
@@ -3,9 +3,7 @@
<div id="pageheader">
<!-- IF U_MCP -->
<p class="linkmcp">
- [ <a href="{U_MCP}">{L_MCP}</a><!-- IF U_MCP_FORUM --> | <a href="{U_MCP_FORUM}">{L_MODERATE_FORUM}</a><!-- ENDIF -->
- <!-- IF U_MCP_TOPIC --> | <a href="{U_MCP_TOPIC}">{L_MODERATE_TOPIC}</a><!-- ENDIF -->
- <!-- IF U_MCP_POST --> | <a href="{U_MCP_POST}">{L_MODERATE_POST}</a><!-- ENDIF --> ]
+ [<!-- IF U_ACP -->&nbsp;<a href="{U_ACP}">{L_ACP}</a>&nbsp;|<!-- ENDIF -->&nbsp;<a href="{U_MCP}">{L_MCP}</a><!-- IF U_MCP_FORUM -->&nbsp;|&nbsp;<a href="{U_MCP_FORUM}">{L_MODERATE_FORUM}</a><!-- ENDIF --><!-- IF U_MCP_TOPIC -->&nbsp;|&nbsp;<a href="{U_MCP_TOPIC}">{L_MODERATE_TOPIC}</a><!-- ENDIF --><!-- IF U_MCP_POST -->&nbsp;|&nbsp;<a href="{U_MCP_POST}">{L_MODERATE_POST}</a><!-- ENDIF -->&nbsp;]
</p>
<!-- ENDIF -->
@@ -60,20 +58,3 @@
<br />
<!-- ENDIF -->
-
- <!-- IF CONFIRM_MESSAGE -->
- <form name="confirm" method="post" action="{S_CONFIRM_ACTION}">
-
- <table class="tablebg" width="100%" cellspacing="1">
- <tr>
- <th>{L_PLEASE_CONFIRM}</th>
- </tr>
- <tr>
- <td class="row1" align="center"><span class="gen"><br />{CONFIRM_MESSAGE}<br /><br />{S_HIDDEN_FIELDS}<input class="btnmain" type="submit" name="confirm" value="{L_YES}" />&nbsp;&nbsp;<input class="btnlite" type="submit" name="cancel" value="{L_NO}" /><br /><br /></span></td>
- </tr>
- </table>
-
- </form>
-
- <br />
- <!-- ENDIF -->
diff --git a/phpBB/styles/subsilver2/template/mcp_jumpbox.html b/phpBB/styles/subsilver2/template/mcp_jumpbox.html
deleted file mode 100644
index 14856596f0..0000000000
--- a/phpBB/styles/subsilver2/template/mcp_jumpbox.html
+++ /dev/null
@@ -1,18 +0,0 @@
-<!-- Note: no longer in use... -->
-
-<form name="jumpbox" method="post" action="{S_JUMPBOX_ACTION}">
-
- <span class="gensmall">{L_JUMP_TO}:</span>&nbsp;<select name="f" onChange="if(this.options[this.selectedIndex].value != -1 && this.options[this.selectedIndex].value != document.jumpbox.current_f.value){ document.forms['jumpbox'].submit() }">
-
-<!-- IF S_ENABLE_SELECT_ALL -->
- <option value="0">{L_ALL_FORUMS}</option>
-<!-- ELSE -->
- <option value="-1">{L_SELECT_FORUM}</option>
-<!-- ENDIF -->
-
-<!-- BEGIN options -->
- <option value="{options.VALUE}"<!-- IF options.VALUE eq -1 --> class="disabled-option"<!-- ENDIF -->{options.SELECTED}/>{options.TEXT}</option>
-<!-- BEGINELSE -->
-<!-- END options -->
-</select>&nbsp;<input type="hidden" name="current_f" value="{S_CURRENT_FORUM}" /><input name="jumpbox" class="btnlite" type="submit" value="{L_GO}" onclick="if(document.jumpbox.f.value == -1){return false;}" />
-</form>
diff --git a/phpBB/styles/subsilver2/template/mcp_logs.html b/phpBB/styles/subsilver2/template/mcp_logs.html
index 8b69197b0f..64f2a6a64d 100644
--- a/phpBB/styles/subsilver2/template/mcp_logs.html
+++ b/phpBB/styles/subsilver2/template/mcp_logs.html
@@ -22,10 +22,10 @@
</tr>
<!-- END log -->
<tr align="center">
- <td class="row3" colspan="<!-- IF S_CLEAR_ALLOWED -->5<!-- ELSE -->4<!-- ENDIF -->"><span class="gensmall">{L_SEARCH_KEYWORDS}:</span> <input type="text" name="keywords" value="{S_KEYWORDS}" />&nbsp;<input type="submit" class="btnlite" name="filter" value="{L_SEARCH}" /></td>
+ <td class="row3" colspan="<!-- IF S_CLEAR_ALLOWED -->5<!-- ELSE -->4<!-- ENDIF -->"><span class="gensmall">{L_SEARCH_KEYWORDS}{L_COLON}</span> <input type="text" name="keywords" value="{S_KEYWORDS}" />&nbsp;<input type="submit" class="btnlite" name="filter" value="{L_SEARCH}" /></td>
</tr>
<tr align="center">
- <td class="row3" colspan="<!-- IF S_CLEAR_ALLOWED -->5<!-- ELSE -->4<!-- ENDIF -->"><span class="gensmall">{L_DISPLAY_LOG}:</span> {S_SELECT_SORT_DAYS}&nbsp;<span class="gensmall">{L_SORT_BY}</span> {S_SELECT_SORT_KEY} {S_SELECT_SORT_DIR}&nbsp;<input class="btnlite" type="submit" value="{L_GO}" name="sort" /></td>
+ <td class="row3" colspan="<!-- IF S_CLEAR_ALLOWED -->5<!-- ELSE -->4<!-- ENDIF -->"><span class="gensmall">{L_DISPLAY_LOG}{L_COLON}</span> {S_SELECT_SORT_DAYS}&nbsp;<span class="gensmall">{L_SORT_BY}</span> {S_SELECT_SORT_KEY} {S_SELECT_SORT_DIR}&nbsp;<input class="btnlite" type="submit" value="{L_GO}" name="sort" /></td>
</tr>
<!-- IF S_CLEAR_ALLOWED -->
<tr>
@@ -43,4 +43,4 @@
<br clear="all" /><br />
-<!-- INCLUDE mcp_footer.html --> \ No newline at end of file
+<!-- INCLUDE mcp_footer.html -->
diff --git a/phpBB/styles/subsilver2/template/mcp_message.html b/phpBB/styles/subsilver2/template/mcp_message.html
index 7645e5dd81..5699dd54af 100644
--- a/phpBB/styles/subsilver2/template/mcp_message.html
+++ b/phpBB/styles/subsilver2/template/mcp_message.html
@@ -11,4 +11,4 @@
<br clear="all" />
-<!-- INCLUDE mcp_footer.html --> \ No newline at end of file
+<!-- INCLUDE mcp_footer.html -->
diff --git a/phpBB/styles/subsilver2/template/mcp_move.html b/phpBB/styles/subsilver2/template/mcp_move.html
index db7a6e7241..b8958187e6 100644
--- a/phpBB/styles/subsilver2/template/mcp_move.html
+++ b/phpBB/styles/subsilver2/template/mcp_move.html
@@ -17,7 +17,10 @@
<span class="gen"><br />{L_SELECT_DESTINATION_FORUM}&nbsp;&nbsp;</span>
<select name="to_forum_id">{S_FORUM_SELECT}</select><br />
<!-- IF S_CAN_LEAVE_SHADOW -->
- <input type="checkbox" class="radio" name="move_leave_shadow" checked="checked" /><span class="gen">{L_LEAVE_SHADOW}</span><br />
+ <input type="checkbox" class="radio" name="move_leave_shadow" /><span class="gen">{L_LEAVE_SHADOW}</span><br />
+ <!-- ENDIF -->
+ <!-- IF S_CAN_LOCK_TOPIC -->
+ <input type="checkbox" class="radio" name="move_lock_topics" /><span class="gen">{L_LOCK_TOPIC}</span><br />
<!-- ENDIF -->
<br />{S_HIDDEN_FIELDS}<span class="gen">{MESSAGE_TEXT}</span><br /><br />
<input type="submit" name="confirm" value="{YES_VALUE}" class="btnmain" />&nbsp;&nbsp;<input type="submit" name="cancel" value="{L_NO}" class="btnlite" />
diff --git a/phpBB/styles/subsilver2/template/mcp_notes_front.html b/phpBB/styles/subsilver2/template/mcp_notes_front.html
index 17f389f7f3..e2e14e0150 100644
--- a/phpBB/styles/subsilver2/template/mcp_notes_front.html
+++ b/phpBB/styles/subsilver2/template/mcp_notes_front.html
@@ -7,7 +7,7 @@
<th colspan="2"align="center">{L_SELECT_USER}</th>
</tr>
<tr>
- <td class="row1" width="40%"><b class="gen">{L_FIND_USERNAME}: </b><br /><span class="gensmall">[ <a href="{U_FIND_USERNAME}" onclick="find_username(this.href); return false;">{L_FIND_USERNAME}</a> ]</span></td>
+ <td class="row1" width="40%"><b class="gen">{L_FIND_USERNAME}{L_COLON} </b><br /><span class="gensmall">[ <a href="{U_FIND_USERNAME}" onclick="find_username(this.href); return false;">{L_FIND_USERNAME}</a> ]</span></td>
<td class="row2"><input type="text" class="post" name="username" size="20" /></td>
</tr>
<tr>
@@ -19,4 +19,4 @@
<br clear="all" /><br />
-<!-- INCLUDE mcp_footer.html --> \ No newline at end of file
+<!-- INCLUDE mcp_footer.html -->
diff --git a/phpBB/styles/subsilver2/template/mcp_notes_user.html b/phpBB/styles/subsilver2/template/mcp_notes_user.html
index 4ee3f9e04e..4bd8de6862 100644
--- a/phpBB/styles/subsilver2/template/mcp_notes_user.html
+++ b/phpBB/styles/subsilver2/template/mcp_notes_user.html
@@ -30,15 +30,15 @@
<td class="row1">
<table width="100%" cellspacing="1" cellpadding="2" border="0">
<tr>
- <td class="gen" align="{S_CONTENT_FLOW_END}" nowrap="nowrap">{L_JOINED}: </td>
+ <td class="gen" align="{S_CONTENT_FLOW_END}" nowrap="nowrap">{L_JOINED}{L_COLON} </td>
<td width="100%"><b class="gen">{JOINED}</b></td>
</tr>
<tr>
- <td class="gen" align="{S_CONTENT_FLOW_END}" valign="top" nowrap="nowrap">{L_TOTAL_POSTS}: </td>
+ <td class="gen" align="{S_CONTENT_FLOW_END}" valign="top" nowrap="nowrap">{L_TOTAL_POSTS}{L_COLON} </td>
<td><b class="gen">{POSTS}</b></td>
</tr>
<tr>
- <td class="gen" align="{S_CONTENT_FLOW_END}" valign="top" nowrap="nowrap">{L_WARNINGS}: </td>
+ <td class="gen" align="{S_CONTENT_FLOW_END}" valign="top" nowrap="nowrap">{L_WARNINGS}{L_COLON} </td>
<td><b class="gen">{WARNINGS}</b></td>
</tr>
</table>
@@ -55,10 +55,10 @@
<!-- IF S_USER_NOTES -->
<tr align="center">
- <td colspan="5" class="row3"><span class="gensmall">{L_SEARCH_KEYWORDS}:</span> <input type="text" name="keywords" value="{S_KEYWORDS}" />&nbsp;<input type="submit" class="btnlite" name="filter" value="{L_SEARCH}" /></td>
+ <td colspan="5" class="row3"><span class="gensmall">{L_SEARCH_KEYWORDS}{L_COLON}</span> <input type="text" name="keywords" value="{S_KEYWORDS}" />&nbsp;<input type="submit" class="btnlite" name="filter" value="{L_SEARCH}" /></td>
</tr>
<tr align="center">
- <td colspan="5" class="row3"><span class="gensmall">{L_DISPLAY_LOG}:</span> {S_SELECT_SORT_DAYS}&nbsp;<span class="gensmall">{L_SORT_BY}:</span> {S_SELECT_SORT_KEY} {S_SELECT_SORT_DIR}&nbsp;<input class="btnlite" type="submit" value="{L_GO}" name="sort" /></td>
+ <td colspan="5" class="row3"><span class="gensmall">{L_DISPLAY_LOG}{L_COLON}</span> {S_SELECT_SORT_DAYS}&nbsp;<span class="gensmall">{L_SORT_BY}{L_COLON}</span> {S_SELECT_SORT_KEY} {S_SELECT_SORT_DIR}&nbsp;<input class="btnlite" type="submit" value="{L_GO}" name="sort" /></td>
</tr>
<tr>
<th>{L_REPORT_BY}</th>
@@ -122,4 +122,4 @@
<br clear="all" /><br />
-<!-- INCLUDE mcp_footer.html --> \ No newline at end of file
+<!-- INCLUDE mcp_footer.html -->
diff --git a/phpBB/styles/subsilver2/template/mcp_post.html b/phpBB/styles/subsilver2/template/mcp_post.html
index d026ac22c0..0f000ca931 100644
--- a/phpBB/styles/subsilver2/template/mcp_post.html
+++ b/phpBB/styles/subsilver2/template/mcp_post.html
@@ -8,15 +8,15 @@
<th colspan="2" align="center"><!-- IF S_PM -->{L_PM_REPORT_DETAILS}<!-- ELSE -->{L_REPORT_DETAILS}<!-- ENDIF --></th>
</tr>
<tr>
- <td class="row1"><b class="gen">{L_REPORT_REASON}: </b></td>
+ <td class="row1"><b class="gen">{L_REPORT_REASON}{L_COLON} </b></td>
<td class="row2"><span class="gen">{REPORT_REASON_TITLE} &raquo; {REPORT_REASON_DESCRIPTION}</span></td>
</tr>
<tr>
- <td class="row1" width="20%"><b class="gen">{L_REPORTER}: </b></td>
+ <td class="row1" width="20%"><b class="gen">{L_REPORTER}{L_COLON} </b></td>
<td class="row2" width="80%"><span class="gen"<!-- IF REPORTER_COLOUR --> style="font-weight: bold; color: {REPORTER_COLOUR};"<!-- ENDIF -->>{REPORTER_NAME}</span> &nbsp; <span class="gen">[ <!-- IF U_VIEW_REPORTER_PROFILE --><a href="{U_VIEW_REPORTER_PROFILE}">{L_READ_PROFILE}</a><!-- ENDIF --><!-- IF S_USER_NOTES --><!-- IF U_VIEW_REPORTER_PROFILE --> | <!-- ENDIF --><a href="{U_MCP_REPORTER_NOTES}">{L_VIEW_NOTES}</a> | <a href="{U_MCP_WARN_REPORTER}">{L_WARN_USER}</a><!-- ENDIF --> ]</span></td>
</tr>
<tr>
- <td class="row1"><b class="gen">{L_REPORTED}: </b></td>
+ <td class="row1"><b class="gen">{L_REPORTED}{L_COLON} </b></td>
<td class="row2"><span class="postdetails">{REPORT_DATE}</span></td>
</tr>
<!-- IF REPORT_TEXT -->
@@ -49,16 +49,21 @@
<td class="row3" colspan="2" align="center"><span class="gensmall"><!-- IF S_MCP_QUEUE -->{RETURN_QUEUE} | {RETURN_TOPIC_SIMPLE} | {RETURN_POST}<!-- ELSEIF S_MCP_REPORT -->{RETURN_REPORTS}<!-- IF not S_PM --> | <a href="{U_VIEW_POST}">{L_VIEW_POST}</a> | <a href="{U_VIEW_TOPIC}">{L_VIEW_TOPIC}</a> | <a href="{U_VIEW_FORUM}">{L_VIEW_FORUM}</a><!-- ENDIF --><!-- ELSE -->{RETURN_TOPIC}<!-- ENDIF --></span></td>
</tr>
<tr>
- <td class="row1"><b class="gen"><!-- IF S_PM -->{L_PM_SUBJECT}<!-- ELSE -->{L_POST_SUBJECT}<!-- ENDIF -->: </b></td>
- <td class="row2"><span class="gen">{POST_SUBJECT}</span> <!-- IF S_POST_UNAPPROVED --><span class="postapprove">{UNAPPROVED_IMG} <a href="{U_MCP_APPROVE}">{L_POST_UNAPPROVED}</a></span> <!-- ENDIF --> <!-- IF S_POST_REPORTED and not S_MCP_REPORT --><span class="postreported">{REPORTED_IMG} <a href="{U_MCP_REPORT}">{L_POST_REPORTED}</a></span><!-- ENDIF --></td>
+ <td class="row1"><b class="gen"><!-- IF S_PM -->{L_PM_SUBJECT}<!-- ELSE -->{L_POST_SUBJECT}<!-- ENDIF -->{L_COLON} </b></td>
+ <td class="row2">
+ <span class="gen">{POST_SUBJECT}</span>
+ <!-- IF S_POST_UNAPPROVED --><span class="postapprove">{UNAPPROVED_IMG} <a href="{U_MCP_APPROVE}">{L_POST_UNAPPROVED}</a></span> <!-- ENDIF -->
+ <!-- IF S_POST_DELETED --><span class="postapprove">{DELETED_IMG} <a href="{U_MCP_APPROVE}">{L_POST_DELETED}</a></span> <!-- ENDIF -->
+ <!-- IF S_POST_REPORTED and not S_MCP_REPORT --><span class="postreported">{REPORTED_IMG} <a href="{U_MCP_REPORT}">{L_POST_REPORTED}</a></span><!-- ENDIF -->
+ </td>
</tr>
<tr>
- <td class="row1" width="20%"><b class="gen"><!-- IF S_PM -->{L_PM_FROM}<!-- ELSE -->{L_POSTER}<!-- ENDIF -->: </b></td>
+ <td class="row1" width="20%"><b class="gen"><!-- IF S_PM -->{L_PM_FROM}<!-- ELSE -->{L_POSTER}<!-- ENDIF -->{L_COLON} </b></td>
<td class="row2" width="80%"><span class="gen"<!-- IF POST_AUTHOR_COLOUR --> style="font-weight: bold; color: {POST_AUTHOR_COLOUR}"<!-- ENDIF -->>{POST_AUTHOR}</span><span class="gen"> &nbsp; [ <!-- IF U_POST_AUTHOR --><a href="{U_POST_AUTHOR}">{L_READ_PROFILE}</a><!-- ENDIF --><!-- IF S_USER_NOTES --><!-- IF U_POST_AUTHOR --> | <!-- ENDIF --><a href="{U_MCP_USER_NOTES}">{L_VIEW_NOTES}</a> <!-- IF U_MCP_WARN_USER -->| <a href="{U_MCP_WARN_USER}">{L_WARN_USER}</a><!-- ENDIF --><!-- ENDIF --> ]</span></td>
</tr>
<!-- IF S_CAN_VIEWIP -->
<tr>
- <td class="row1"><b class="gen"><!-- IF S_PM -->{L_THIS_PM_IP}<!-- ELSE -->{L_THIS_POST_IP}<!-- ENDIF -->: </b></td>
+ <td class="row1"><b class="gen"><!-- IF S_PM -->{L_THIS_PM_IP}<!-- ELSE -->{L_THIS_POST_IP}<!-- ENDIF -->{L_COLON} </b></td>
<td class="row2"><span class="gen">
<!-- IF U_WHOIS -->
<a href="{U_WHOIS}"><!-- IF POST_IPADDR -->{POST_IPADDR}<!-- ELSE -->{POST_IP}<!-- ENDIF --></a> (<!-- IF POST_IPADDR -->{POST_IP}<!-- ELSE --><a href="{U_LOOKUP_IP}">{L_LOOKUP_IP}</a><!-- ENDIF -->)
@@ -69,12 +74,12 @@
</tr>
<!-- ENDIF -->
<tr>
- <td class="row1"><b class="gen"><!-- IF S_PM -->{L_SENT_AT}<!-- ELSE -->{L_POSTED}<!-- ENDIF -->: </b></td>
+ <td class="row1"><b class="gen"><!-- IF S_PM -->{L_SENT_AT}<!-- ELSE -->{L_POSTED}<!-- ENDIF -->{L_COLON} </b></td>
<td class="row2"><span class="postdetails">{POST_DATE}</span></td>
</tr>
<!-- IF S_TO_RECIPIENT -->
<tr>
- <td class="row1" nowrap="nowrap" width="150"><b class="gen">{L_TO}:</b></td>
+ <td class="row1" nowrap="nowrap" width="150"><b class="gen">{L_TO}{L_COLON}</b></td>
<td class="row2 gen">
<!-- BEGIN to_recipient -->
<!-- IF to_recipient.IS_GROUP --><span class="sep"><a href="{to_recipient.U_VIEW}">{to_recipient.NAME}</a></span><!-- ELSE -->{to_recipient.NAME_FULL}&nbsp;<!-- ENDIF -->
@@ -85,7 +90,7 @@
<!-- IF S_BCC_RECIPIENT -->
<tr>
- <td class="row1" nowrap="nowrap" width="150"><b class="gen">{L_BCC}:</b></td>
+ <td class="row1" nowrap="nowrap" width="150"><b class="gen">{L_BCC}{L_COLON}</b></td>
<td class="row2 gen">
<!-- BEGIN bcc_recipient -->
<!-- IF bcc_recipient.IS_GROUP --><span class="sep"><a href="{bcc_recipient.U_VIEW}">{bcc_recipient.NAME}</a></span><!-- ELSE -->{bcc_recipient.NAME_FULL}&nbsp;<!-- ENDIF -->
@@ -98,7 +103,7 @@
</tr>
<tr>
<td class="row1" colspan="2">
- <!-- IF U_EDIT --><div class="gen" style="float: {S_CONTENT_FLOW_END};"><a href="{U_EDIT}">{EDIT_IMG}</a></div><!-- ENDIF -->
+ <!-- IF U_EDIT --><div class="gen" style="float: {S_CONTENT_FLOW_END};"><a href="{U_EDIT}" class="imageset">{EDIT_IMG}</a></div><!-- ENDIF -->
<div class="postbody">{POST_PREVIEW}</div>
@@ -107,7 +112,7 @@
<table class="tablebg" width="100%" cellspacing="1">
<tr>
- <td class="row3"><b class="genmed">{L_ATTACHMENTS}: </b></td>
+ <td class="row3"><b class="genmed">{L_ATTACHMENTS}{L_COLON} </b></td>
</tr>
<!-- BEGIN attachment -->
<tr>
@@ -173,7 +178,7 @@
<!-- BEGIN userrow -->
<!-- IF userrow.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
<td><span class="gen"><!-- IF userrow.U_PROFILE --><a href="{userrow.U_PROFILE}">{userrow.USERNAME}</a><!-- ELSE -->{userrow.USERNAME}<!-- ENDIF --> [ {userrow.NUM_POSTS} {userrow.L_POST_S} ]</span></td>
- <td align="center"><a href="{userrow.U_SEARCHPOSTS}">{SEARCH_IMG}</a></td>
+ <td align="center"><a href="{userrow.U_SEARCHPOSTS}" class="imageset">{SEARCH_IMG}</a></td>
</tr>
<!-- BEGINELSE -->
<tr class="row1">
@@ -203,4 +208,4 @@
<!-- ENDIF -->
-<!-- INCLUDE mcp_footer.html --> \ No newline at end of file
+<!-- INCLUDE mcp_footer.html -->
diff --git a/phpBB/styles/subsilver2/template/mcp_queue.html b/phpBB/styles/subsilver2/template/mcp_queue.html
index 4def047e51..7ca659b5da 100644
--- a/phpBB/styles/subsilver2/template/mcp_queue.html
+++ b/phpBB/styles/subsilver2/template/mcp_queue.html
@@ -7,7 +7,7 @@
<th colspan="4" nowrap="nowrap">{L_DISPLAY_OPTIONS}</th>
</tr>
<tr>
- <td colspan="4" class="cat" align="center"><span class="gensmall">{L_DISPLAY_ITEMS}:</span> {S_SELECT_SORT_DAYS}&nbsp;<span class="gensmall">{L_SORT_BY}</span> {S_SELECT_SORT_KEY} {S_SELECT_SORT_DIR}&nbsp;<span class="gensmall">{L_FORUM}</span> <select name="f">{S_FORUM_OPTIONS}</select> &nbsp; <!-- IF TOPIC_ID --><input type="checkbox" class="radio" name="t" value="{TOPIC_ID}" checked="checked" />&nbsp; <b>{L_ONLY_TOPIC}</b> &nbsp; <!-- ENDIF --><input class="btnlite" type="submit" name="sort" value="{L_GO}" /></td>
+ <td colspan="4" class="cat" align="center"><span class="gensmall">{L_DISPLAY_ITEMS}{L_COLON}</span> {S_SELECT_SORT_DAYS}&nbsp;<span class="gensmall">{L_SORT_BY}</span> {S_SELECT_SORT_KEY} {S_SELECT_SORT_DIR}&nbsp;<span class="gensmall">{L_FORUM}</span> <select name="f">{S_FORUM_OPTIONS}</select> &nbsp; <!-- IF TOPIC_ID --><input type="checkbox" class="radio" name="t" value="{TOPIC_ID}" checked="checked" />&nbsp; <b>{L_ONLY_TOPIC}</b> &nbsp; <!-- ENDIF --><input class="btnlite" type="submit" name="sort" value="{L_GO}" /></td>
</tr>
<tr>
<th>&nbsp;<!-- IF S_TOPICS -->{L_TOPIC}<!-- ELSE -->{L_POST}<!-- ENDIF -->&nbsp;</th>
@@ -18,20 +18,42 @@
<!-- BEGIN postrow -->
<!-- IF postrow.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
- <td style="padding: 4px;"><p class="topictitle"><a href="{postrow.U_VIEWPOST}">{postrow.POST_SUBJECT}</a></p>
- <span class="gensmall"><!-- IF postrow.U_VIEWFORUM -->{L_FORUM}: <a href="{postrow.U_VIEWFORUM}">{postrow.FORUM_NAME}</a><!-- ELSE -->{postrow.FORUM_NAME}<!-- ENDIF --></span></td>
+ <td style="padding: 4px;"><p class="topictitle">{postrow.ATTACH_ICON_IMG} <a href="{postrow.U_VIEWPOST}">{postrow.POST_SUBJECT}</a></p>
+ <span class="gensmall"><!-- IF postrow.U_VIEWFORUM -->{L_FORUM}{L_COLON} <a href="{postrow.U_VIEWFORUM}">{postrow.FORUM_NAME}</a><!-- ELSE -->{postrow.FORUM_NAME}<!-- ENDIF --></span></td>
<td style="padding: 4px;" align="{S_CONTENT_FLOW_BEGIN}" valign="top" nowrap="nowrap"><span class="gen">{postrow.POST_AUTHOR_FULL}</span><br />
<span class="gensmall">[ <a href="{postrow.U_VIEW_DETAILS}">{L_VIEW_DETAILS}</a> ]</span></td>
<td class="postdetails" style="padding: 4px;" align="{S_CONTENT_FLOW_BEGIN}" valign="top" nowrap="nowrap">{postrow.POST_TIME}</td>
- <td align="center"><input type="checkbox" class="radio" name="post_id_list[]" value="{postrow.POST_ID}" /></td>
+ <td align="center">
+ <!-- IF S_TOPICS -->
+ <input type="checkbox" class="radio" name="topic_id_list[]" value="{postrow.TOPIC_ID}" />
+ <!-- ELSE -->
+ <input type="checkbox" class="radio" name="post_id_list[]" value="{postrow.POST_ID}" />
+ <!-- ENDIF -->
+ </td>
</tr>
<!-- BEGINELSE -->
<tr>
- <td class="row1" colspan="4" height="30" align="center" valign="middle"><span class="gen"><!-- IF S_TOPICS -->{L_NO_TOPICS_QUEUE}<!-- ELSE -->{L_UNAPPROVED_POSTS_ZERO_TOTAL}<!-- ENDIF --></span></td>
+ <td class="row1" colspan="4" height="30" align="center" valign="middle">
+ <span class="gen">
+ <!-- IF S_RESTORE -->
+ <!-- IF S_TOPICS -->{L_NO_TOPICS_DELETED}<!-- ELSE -->{L_NO_POSTS_DELETED}<!-- ENDIF -->
+ <!-- ELSE -->
+ <!-- IF S_TOPICS -->{L_NO_TOPICS_QUEUE}<!-- ELSE -->{L_NO_POSTS_QUEUE}<!-- ENDIF -->
+ <!-- ENDIF -->
+ </span>
+ </td>
</tr>
<!-- END postrow -->
<tr>
- <td class="cat" colspan="4" align="center"><input class="btnmain" type="submit" name="action[approve]" value="{L_APPROVE}" />&nbsp;&nbsp;<input class="btnlite" type="submit" name="action[disapprove]" value="{L_DISAPPROVE}" /></td>
+ <td class="cat" colspan="4" align="center">
+ <!-- IF S_RESTORE -->
+ <input class="btnlite" type="submit" name="action[delete]" value="{L_DELETE}" />&nbsp;&nbsp;
+ <input class="btnmain" type="submit" name="action[restore]" value="{L_RESTORE}" />
+ <!-- ELSE -->
+ <input class="btnmain" type="submit" name="action[approve]" value="{L_APPROVE}" />&nbsp;&nbsp;
+ <input class="btnlite" type="submit" name="action[disapprove]" value="{L_DISAPPROVE}" />
+ <!-- ENDIF -->
+ </td>
</tr>
</table>
{S_FORM_TOKEN}
@@ -39,8 +61,16 @@
<table width="100%" cellspacing="2" cellpadding="2" border="0" align="center">
<tr>
- <td align="{S_CONTENT_FLOW_END}" valign="top" nowrap="nowrap"><b class="gensmall"><a href="#" onclick="marklist('mcp', '', true); return false;">{L_MARK_ALL}</a> :: <a href="#" onclick="marklist('mcp', '', false); return false;">{L_UNMARK_ALL}</a></b></td>
+ <td align="{S_CONTENT_FLOW_END}" valign="top" nowrap="nowrap">
+ <b class="gensmall">
+ <!-- IF S_TOPICS -->
+ <a href="#" onclick="marklist('mcp', 'topic_id_list', true); return false;">{L_MARK_ALL}</a> :: <a href="#" onclick="marklist('mcp', 'topic_id_list', false); return false;">{L_UNMARK_ALL}</a>
+ <!-- ELSE -->
+ <a href="#" onclick="marklist('mcp', 'post_id_list', true); return false;">{L_MARK_ALL}</a> :: <a href="#" onclick="marklist('mcp', 'post_id_list', false); return false;">{L_UNMARK_ALL}</a>
+ <!-- ENDIF -->
+ </b>
+ </td>
</tr>
</table>
-<!-- INCLUDE mcp_footer.html --> \ No newline at end of file
+<!-- INCLUDE mcp_footer.html -->
diff --git a/phpBB/styles/subsilver2/template/mcp_reports.html b/phpBB/styles/subsilver2/template/mcp_reports.html
index 1b6a3b82b6..158f9c2603 100644
--- a/phpBB/styles/subsilver2/template/mcp_reports.html
+++ b/phpBB/styles/subsilver2/template/mcp_reports.html
@@ -7,7 +7,7 @@
<th colspan="5" nowrap="nowrap">{L_DISPLAY_OPTIONS}</th>
</tr>
<tr>
- <td colspan="5" class="cat" align="center"><span class="gensmall">{L_DISPLAY_POSTS}:</span> {S_SELECT_SORT_DAYS}&nbsp;<span class="gensmall">{L_SORT_BY}</span> {S_SELECT_SORT_KEY} {S_SELECT_SORT_DIR}<!-- IF not S_PM -->&nbsp;<span class="gensmall">{L_FORUM}</span> <select name="f">{S_FORUM_OPTIONS}</select> &nbsp; <!-- IF TOPIC_ID --><input type="checkbox" class="radio" name="t" value="{TOPIC_ID}" checked="checked" />&nbsp; <b>{L_ONLY_TOPIC}</b> &nbsp; <!-- ENDIF --><!-- ENDIF --><input class="btnlite" type="submit" name="sort" value="{L_GO}" /></td>
+ <td colspan="5" class="cat" align="center"><span class="gensmall">{L_DISPLAY_POSTS}{L_COLON}</span> {S_SELECT_SORT_DAYS}&nbsp;<span class="gensmall">{L_SORT_BY}</span> {S_SELECT_SORT_KEY} {S_SELECT_SORT_DIR}<!-- IF not S_PM -->&nbsp;<span class="gensmall">{L_FORUM}</span> <select name="f">{S_FORUM_OPTIONS}</select> &nbsp; <!-- IF TOPIC_ID --><input type="checkbox" class="radio" name="t" value="{TOPIC_ID}" checked="checked" />&nbsp; <b>{L_ONLY_TOPIC}</b> &nbsp; <!-- ENDIF --><!-- ENDIF --><input class="btnlite" type="submit" name="sort" value="{L_GO}" /></td>
</tr>
<tr>
<!-- IF S_PM -->
@@ -25,13 +25,13 @@
<!-- IF postrow.S_ROW_ is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
<!-- IF S_PM -->
- <td style="padding: 4px;"><p class="topictitle"><a href="{postrow.U_VIEW_DETAILS}">{postrow.PM_SUBJECT}</a></p>
- <span class="gensmall">{L_PM_FROM}: {postrow.PM_AUTHOR_FULL}</span></td>
+ <td style="padding: 4px;"><p class="topictitle">{postrow.ATTACH_ICON_IMG} <a href="{postrow.U_VIEW_DETAILS}">{postrow.PM_SUBJECT}</a></p>
+ <span class="gensmall">{L_PM_FROM}{L_COLON} {postrow.PM_AUTHOR_FULL}</span></td>
<td style="padding: 4px;" align="{S_CONTENT_FLOW_BEGIN}" valign="top"><span class="gen">{postrow.RECIPIENTS}</span><br />
- <span class="gensmall">{L_SENT_AT}: {postrow.PM_TIME}</span></td>
+ <span class="gensmall">{L_SENT_AT}{L_COLON} {postrow.PM_TIME}</span></td>
<!-- ELSE -->
- <td style="padding: 4px;"><p class="topictitle"><a href="{postrow.U_VIEWPOST}">{postrow.POST_SUBJECT}</a></p>
- <span class="gensmall"><!-- IF postrow.U_VIEWFORUM -->{L_FORUM}: <a href="{postrow.U_VIEWFORUM}">{postrow.FORUM_NAME}</a><!-- ELSE -->{postrow.FORUM_NAME}<!-- ENDIF --></span></td>
+ <td style="padding: 4px;"><p class="topictitle">{postrow.ATTACH_ICON_IMG} <a href="{postrow.U_VIEWPOST}">{postrow.POST_SUBJECT}</a></p>
+ <span class="gensmall"><!-- IF postrow.U_VIEWFORUM -->{L_FORUM}{L_COLON} <a href="{postrow.U_VIEWFORUM}">{postrow.FORUM_NAME}</a><!-- ELSE -->{postrow.FORUM_NAME}<!-- ENDIF --></span></td>
<td style="padding: 4px;" align="{S_CONTENT_FLOW_BEGIN}" valign="top" nowrap="nowrap"><span class="gen">{postrow.POST_AUTHOR_FULL}</span><br />
<span class="gensmall">{postrow.POST_TIME}</span></td>
<!-- ENDIF -->
@@ -64,4 +64,4 @@
</tr>
</table>
-<!-- INCLUDE mcp_footer.html --> \ No newline at end of file
+<!-- INCLUDE mcp_footer.html -->
diff --git a/phpBB/styles/subsilver2/template/mcp_topic.html b/phpBB/styles/subsilver2/template/mcp_topic.html
index f9f9382ff2..5bd762ec0b 100644
--- a/phpBB/styles/subsilver2/template/mcp_topic.html
+++ b/phpBB/styles/subsilver2/template/mcp_topic.html
@@ -12,7 +12,7 @@
</tr>
<tr>
<td class="row1" nowrap="nowrap"><span class="gen">{L_SPLIT_SUBJECT}</span></td>
- <td class="row2" colspan="2"><input class="post" style="width: 350px" type="text" size="35" maxlength="64" name="subject" value="{SPLIT_SUBJECT}" /></td>
+ <td class="row2" colspan="2"><input class="post" style="width: 350px" type="text" size="35" maxlength="124" name="subject" value="{SPLIT_SUBJECT}" /></td>
</tr>
<tr>
<td class="row1" nowrap="nowrap"><span class="gen">{L_SPLIT_FORUM}</span></td>
@@ -42,7 +42,7 @@
</tr>
<tr>
<td class="row1" nowrap="nowrap"><span class="gen">{L_MERGE_TOPIC_ID}</span></td>
- <td class="row2" colspan="2"><input class="post" type="text" size="6" name="to_topic_id" value="{TO_TOPIC_ID}" /> <a href="{U_SELECT_TOPIC}">{L_SELECT_TOPIC}</a></td>
+ <td class="row2" colspan="2"><input class="post" type="number" min="0" size="6" name="to_topic_id" value="{TO_TOPIC_ID}" /> <a href="{U_SELECT_TOPIC}">{L_SELECT_TOPIC}</a></td>
</tr>
<!-- IF TO_TOPIC_INFO -->
<tr>
@@ -55,13 +55,13 @@
</tr>
<tr>
<td class="row1" nowrap="nowrap"><span class="gen">{L_POSTS_PER_PAGE}</span><br /><span class="gensmall">{L_POSTS_PER_PAGE_EXPLAIN}</span></td>
- <td class="row2" colspan="2"><input class="post" type="text" name="posts_per_page" size="6" value="{POSTS_PER_PAGE}" /></td>
+ <td class="row2" colspan="2"><input class="post" type="number" min="1" name="posts_per_page" size="6" value="{POSTS_PER_PAGE}" /></td>
</tr>
<tr>
- <td class="cat" colspan="3" align="center"><span class="gensmall">{L_DISPLAY_POSTS}:</span> {S_SELECT_SORT_DAYS}&nbsp;<span class="gensmall">{L_SORT_BY}</span> {S_SELECT_SORT_KEY} {S_SELECT_SORT_DIR}&nbsp;<input class="btnlite" type="submit" name="sort" value="{L_GO}" /></td>
+ <td class="cat" colspan="3" align="center"><span class="gensmall">{L_DISPLAY_POSTS}{L_COLON}</span> {S_SELECT_SORT_DAYS}&nbsp;<span class="gensmall">{L_SORT_BY}</span> {S_SELECT_SORT_KEY} {S_SELECT_SORT_DIR}&nbsp;<input class="btnlite" type="submit" name="sort" value="{L_GO}" /></td>
</tr>
<tr>
- <th nowrap="nowrap" colspan="3">{L_TOPIC_REVIEW}: {TOPIC_TITLE}</th>
+ <th nowrap="nowrap" colspan="3">{L_TOPIC_REVIEW}{L_COLON} {TOPIC_TITLE}</th>
</tr>
<tr>
<td class="row3" colspan="3" align="center"><span class="gensmall">{RETURN_TOPIC}</span></td>
@@ -73,13 +73,13 @@
<td align="center"><b class="postauthor">{postrow.POST_AUTHOR_FULL}</b></td>
<td width="100%">
<table width="100%" cellspacing="0" cellpadding="0" border="0">
- <tr valign="top">
- <td class="gensmall" nowrap="nowrap">&nbsp;<b>{L_POST_SUBJECT}:</b>&nbsp;</td>
+ <tr style="vertical-align: top;">
+ <td class="gensmall" nowrap="nowrap">&nbsp;<b>{L_POST_SUBJECT}{L_COLON}</b>&nbsp;</td>
<td class="gensmall" width="100%">{postrow.POST_SUBJECT}</td>
</tr>
</table>
</td>
- <td width="5%" align="center"><a href="{postrow.U_POST_DETAILS}">{INFO_IMG}</a></td>
+ <td width="5%" align="center"><a href="{postrow.U_POST_DETAILS}" class="imageset">{INFO_IMG}</a></td>
</tr>
<!-- IF postrow.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
@@ -94,7 +94,7 @@
<table class="tablebg" width="100%" cellspacing="1">
<tr>
- <td class="row3"><b class="genmed">{L_ATTACHMENTS}: </b></td>
+ <td class="row3"><b class="genmed">{L_ATTACHMENTS}{L_COLON} </b></td>
</tr>
<!-- BEGIN attachment -->
<tr>
@@ -112,10 +112,11 @@
<tr valign="middle">
<td width="100%">
<!-- IF postrow.S_POST_UNAPPROVED and postrow.U_MCP_APPROVE --><span class="postapprove">{UNAPPROVED_IMG} <a href="{postrow.U_MCP_APPROVE}">{L_POST_UNAPPROVED}</a></span><br /><!-- ENDIF -->
+ <!-- IF postrow.S_POST_DELETED and postrow.U_MCP_APPROVE --><span class="postapprove">{DELETED_IMG} <a href="{postrow.U_MCP_APPROVE}">{L_POST_DELETED}</a></span><br /><!-- ENDIF -->
<!-- IF postrow.S_POST_REPORTED and postrow.U_MCP_REPORT --><span class="postreported">{REPORTED_IMG} <a href="{postrow.U_MCP_REPORT}">{L_POST_REPORTED}</a></span><!-- ENDIF -->
</td>
<td width="10" nowrap="nowrap">{postrow.MINI_POST_IMG}</td>
- <td class="gensmall" nowrap="nowrap"><b>{L_POSTED}:</b> {postrow.POST_DATE}</td>
+ <td class="gensmall" nowrap="nowrap"><b>{L_POSTED}{L_COLON}</b> {postrow.POST_DATE}</td>
</tr>
</table>
</td>
@@ -133,6 +134,7 @@
<!-- IF S_CAN_APPROVE --><option value="approve">{L_APPROVE_POSTS}</option><!-- ENDIF -->
<!-- IF S_CAN_LOCK --><option value="lock_post">{L_LOCK_POST_POSTS} [ {L_LOCK_POST_EXPLAIN} ]</option><option value="unlock_post">{L_UNLOCK_POST_POSTS}</option><!-- ENDIF -->
<!-- IF S_CAN_DELETE --><option value="delete_post">{L_DELETE_POSTS}</option><!-- ENDIF -->
+ <!-- IF S_CAN_RESTORE --><option value="restore">{L_RESTORE_POSTS}</option><!-- ENDIF -->
<!-- IF S_CAN_MERGE --><option value="merge_posts"<!-- IF ACTION eq 'merge' --> selected="selected"<!-- ENDIF -->>{L_MERGE_POSTS}</option><!-- ENDIF -->
<!-- IF S_CAN_SPLIT --><option value="split_all"<!-- IF ACTION eq 'split' --> selected="selected"<!-- ENDIF -->>{L_SPLIT_POSTS}</option><option value="split_beyond">{L_SPLIT_AFTER}</option><!-- ENDIF -->
<!-- IF S_CAN_SYNC --><option value="resync">{L_RESYNC}</option><!-- ENDIF -->
diff --git a/phpBB/styles/subsilver2/template/mcp_viewlogs.html b/phpBB/styles/subsilver2/template/mcp_viewlogs.html
deleted file mode 100644
index b6431e4d51..0000000000
--- a/phpBB/styles/subsilver2/template/mcp_viewlogs.html
+++ /dev/null
@@ -1,52 +0,0 @@
-<!-- INCLUDE mcp_header.html -->
-
-<form method="post" name="mcp" action="{S_MCP_ACTION}">
-
-<table class="tablebg" width="100%" cellspacing="1" cellpadding="2" border="0">
-<tr>
- <th colspan="<!-- IF S_TOPIC_ID -->4<!-- ELSE -->5<!-- ENDIF -->" nowrap="nowrap">{L_DISPLAY_OPTIONS}</th>
-</tr>
-<tr>
- <td colspan="<!-- IF S_TOPIC_ID -->4<!-- ELSE -->5<!-- ENDIF -->" class="cat" align="center"><span class="gensmall">{L_DISPLAY_LOG}:</span> {S_SELECT_SORT_DAYS}&nbsp;<span class="gensmall">{L_SORT_BY}</span> {S_SELECT_SORT_KEY} {S_SELECT_SORT_DIR}&nbsp;<input class="btnlite" type="submit" name="sort" value="{L_GO}" /></span></td>
-</tr>
-<tr>
- <th width="15%" nowrap="nowrap">{L_USERNAME}</th>
- <th width="12%" nowrap="nowrap">{L_IP}</th>
- <th width="18%" nowrap="nowrap">{L_TIME}</th>
- <th width="45%" nowrap="nowrap">{L_ACTION}</th>
- <!-- IF not S_TOPIC_ID -->
- <th width="8%" nowrap="nowrap"></th>
- <!-- ENDIF -->
-</tr>
-<!-- IF S_TOPIC_ID -->
- <tr>
- <td class="row3" colspan="5"><span class="gensmall">{L_LOGS_CURRENT_TOPIC} <a href="{U_VIEW_TOPIC}"><b>{TOPIC_NAME}</b></a></span></td>
- </tr>
-<!-- ENDIF -->
-<!-- BEGIN log -->
- <tr>
- <td class="row1" nowrap="nowrap"><span class="gen">{log.USERNAME}</span></td>
- <td class="row1" align="center" nowrap="nowrap"><span class="gen">{log.IP}</span></td>
- <td class="row1" align="center" nowrap="nowrap"><span class="gensmall">{log.TIME}</span></td>
- <td class="row1"><span class="gen">{log.ACTION}</span></td>
- <!-- IF not S_TOPIC_ID -->
- <td class="row1" align="center" nowrap="nowrap"><span class="gensmall"><!-- IF log.U_VIEW_TOPIC --><a href="{log.U_VIEW_TOPIC}">{L_VIEW_TOPIC}</a><!-- IF log.U_VIEWLOGS --> | <!-- ENDIF --><!-- ENDIF --><!-- IF log.U_VIEWLOGS --><a href="{log.U_VIEWLOGS}">{L_VIEW_TOPIC_LOGS}</a><!-- ENDIF --></span></td>
- <!-- ENDIF -->
- </tr>
-<!-- BEGINELSE -->
- <tr>
- <td class="row1" colspan="<!-- IF S_TOPIC_ID -->4<!-- ELSE -->5<!-- ENDIF -->" align="center"><span class="gen">{L_NO_ENTRIES}</span></td>
- </tr>
-<!-- END log -->
-</table>
-{S_FORM_TOKEN}
-</form>
-
-<table width="100%" cellspacing="2" cellpadding="2" border="0" align="center">
-<tr>
- <td class="nav" align="{S_CONTENT_FLOW_BEGIN}" valign="middle">{PAGE_NUMBER}</td>
- <td align="{S_CONTENT_FLOW_END}" valign="top" nowrap="nowrap"><!-- INCLUDE pagination.html --></td>
-</tr>
-</table>
-
-<!-- INCLUDE mcp_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/subsilver2/template/mcp_warn_front.html b/phpBB/styles/subsilver2/template/mcp_warn_front.html
index 78673b690e..f6daec9cc5 100644
--- a/phpBB/styles/subsilver2/template/mcp_warn_front.html
+++ b/phpBB/styles/subsilver2/template/mcp_warn_front.html
@@ -7,7 +7,7 @@
<th colspan="2"align="center">{L_SELECT_USER}</th>
</tr>
<tr>
- <td class="row1" width="40%"><b class="gen">{L_FIND_USERNAME}: </b><br /><span class="gensmall">[ <a href="{U_FIND_USERNAME}" onclick="find_username(this.href); return false;">{L_FIND_USERNAME}</a> ]</span></td>
+ <td class="row1" width="40%"><b class="gen">{L_FIND_USERNAME}{L_COLON} </b><br /><span class="gensmall">[ <a href="{U_FIND_USERNAME}" onclick="find_username(this.href); return false;">{L_FIND_USERNAME}</a> ]</span></td>
<td class="row2"><input type="text" class="post" name="username" size="20" /></td>
</tr>
<tr>
@@ -38,7 +38,7 @@
</tr>
<!-- BEGINELSE -->
<tr>
- <td class="row1" colspan="4" align="center"><span class="gen">{L_WARNINGS_ZERO_TOTAL}</span></td>
+ <td class="row1" colspan="4" align="center"><span class="gen">{L_NO_WARNINGS}</span></td>
</tr>
<!-- END highest -->
</table>
@@ -64,11 +64,11 @@
</tr>
<!-- BEGINELSE -->
<tr>
- <td class="row1" colspan="4" align="center"><span class="gen">{L_WARNINGS_ZERO_TOTAL}</span></td>
+ <td class="row1" colspan="4" align="center"><span class="gen">{L_NO_WARNINGS}</span></td>
</tr>
<!-- END latest -->
</table>
<br clear="all" /><br />
-<!-- INCLUDE mcp_footer.html --> \ No newline at end of file
+<!-- INCLUDE mcp_footer.html -->
diff --git a/phpBB/styles/subsilver2/template/mcp_warn_list.html b/phpBB/styles/subsilver2/template/mcp_warn_list.html
index 078bbc0b34..6e263b6403 100644
--- a/phpBB/styles/subsilver2/template/mcp_warn_list.html
+++ b/phpBB/styles/subsilver2/template/mcp_warn_list.html
@@ -21,11 +21,11 @@
</tr>
<!-- BEGINELSE -->
<tr>
- <td class="row1" colspan="4" align="center"><span class="gen">{L_WARNINGS_ZERO_TOTAL}</span></td>
+ <td class="row1" colspan="4" align="center"><span class="gen">{L_NO_WARNINGS}</span></td>
</tr>
<!-- END user -->
<tr align="center">
- <td class="row3" colspan="4"><span class="gensmall">{L_DISPLAY_POSTS}:</span> {S_SELECT_SORT_DAYS}&nbsp;<span class="gensmall">{L_SORT_BY}</span> {S_SELECT_SORT_KEY} {S_SELECT_SORT_DIR}&nbsp;<input class="btnlite" type="submit" value="{L_GO}" name="sort" /></td>
+ <td class="row3" colspan="4"><span class="gensmall">{L_DISPLAY_POSTS}{L_COLON}</span> {S_SELECT_SORT_DAYS}&nbsp;<span class="gensmall">{L_SORT_BY}</span> {S_SELECT_SORT_KEY} {S_SELECT_SORT_DIR}&nbsp;<input class="btnlite" type="submit" value="{L_GO}" name="sort" /></td>
</tr>
</table>
@@ -40,4 +40,4 @@
<br clear="all" /><br />
-<!-- INCLUDE mcp_footer.html --> \ No newline at end of file
+<!-- INCLUDE mcp_footer.html -->
diff --git a/phpBB/styles/subsilver2/template/mcp_warn_post.html b/phpBB/styles/subsilver2/template/mcp_warn_post.html
index ef0595e48e..223457d158 100644
--- a/phpBB/styles/subsilver2/template/mcp_warn_post.html
+++ b/phpBB/styles/subsilver2/template/mcp_warn_post.html
@@ -59,4 +59,4 @@
<br clear="all" /><br />
-<!-- INCLUDE mcp_footer.html --> \ No newline at end of file
+<!-- INCLUDE mcp_footer.html -->
diff --git a/phpBB/styles/subsilver2/template/mcp_warn_user.html b/phpBB/styles/subsilver2/template/mcp_warn_user.html
index 4bf6cabad3..6b78c71557 100644
--- a/phpBB/styles/subsilver2/template/mcp_warn_user.html
+++ b/phpBB/styles/subsilver2/template/mcp_warn_user.html
@@ -28,15 +28,15 @@
<td class="row1">
<table width="100%" cellspacing="1" cellpadding="2" border="0">
<tr>
- <td class="gen" align="{S_CONTENT_FLOW_END}" nowrap="nowrap">{L_JOINED}: </td>
+ <td class="gen" align="{S_CONTENT_FLOW_END}" nowrap="nowrap">{L_JOINED}{L_COLON} </td>
<td width="100%"><b class="gen">{JOINED}</b></td>
</tr>
<tr>
- <td class="gen" align="{S_CONTENT_FLOW_END}" valign="top" nowrap="nowrap">{L_TOTAL_POSTS}: </td>
+ <td class="gen" align="{S_CONTENT_FLOW_END}" valign="top" nowrap="nowrap">{L_TOTAL_POSTS}{L_COLON} </td>
<td><b class="gen">{POSTS}</b></td>
</tr>
<tr>
- <td class="gen" align="{S_CONTENT_FLOW_END}" valign="top" nowrap="nowrap">{L_WARNINGS}: </td>
+ <td class="gen" align="{S_CONTENT_FLOW_END}" valign="top" nowrap="nowrap">{L_WARNINGS}{L_COLON} </td>
<td><b class="gen">{WARNINGS}</b></td>
</tr>
</table>
@@ -72,4 +72,4 @@
<br clear="all" /><br />
-<!-- INCLUDE mcp_footer.html --> \ No newline at end of file
+<!-- INCLUDE mcp_footer.html -->
diff --git a/phpBB/styles/subsilver2/template/mcp_whois.html b/phpBB/styles/subsilver2/template/mcp_whois.html
index 54b93eec69..3e3b983059 100644
--- a/phpBB/styles/subsilver2/template/mcp_whois.html
+++ b/phpBB/styles/subsilver2/template/mcp_whois.html
@@ -12,4 +12,4 @@
</tr>
</table>
-<!-- INCLUDE mcp_footer.html --> \ No newline at end of file
+<!-- INCLUDE mcp_footer.html -->
diff --git a/phpBB/styles/subsilver2/template/memberlist_body.html b/phpBB/styles/subsilver2/template/memberlist_body.html
index 800162b7b0..ecfb4b69c5 100644
--- a/phpBB/styles/subsilver2/template/memberlist_body.html
+++ b/phpBB/styles/subsilver2/template/memberlist_body.html
@@ -14,7 +14,7 @@
<form method="post" name="charsearch" action="{S_MODE_ACTION}">
<table width="100%" cellspacing="1">
<tr>
- <td align="{S_CONTENT_FLOW_BEGIN}"><span class="genmed">{L_USERNAME_BEGINS_WITH}: </span>
+ <td align="{S_CONTENT_FLOW_BEGIN}"><span class="genmed">{L_USERNAME_BEGINS_WITH}{L_COLON} </span>
<select name="first_char" onchange="this.form.submit();">
<!-- BEGIN first_char -->
<option value="{first_char.VALUE}"<!-- IF first_char.S_SELECTED --> selected="selected"<!-- ENDIF -->>{first_char.DESC}</option>
@@ -45,7 +45,6 @@
<th nowrap="nowrap" width="15%"><a href="{U_SORT_RANK}">{L_RANK}</a></th>
<th nowrap="nowrap" width="11%">{L_SEND_MESSAGE}</th>
<th nowrap="nowrap" width="11%"><a href="{U_SORT_EMAIL}">{L_EMAIL}</a></th>
- <th nowrap="nowrap" width="11%"><a href="{U_SORT_WEBSITE}">{L_WEBSITE}</a></th>
<!-- IF S_IN_SEARCH_POPUP and not S_SELECT_SINGLE --><th width="2%" nowrap="nowrap">{L_MARK}</th><!-- ENDIF -->
</tr>
<!-- BEGIN memberrow -->
@@ -66,13 +65,12 @@
<!-- IF memberrow.S_ROW_COUNT is even --><tr class="row2"><!-- ELSE --> <tr class="row1"><!-- ENDIF -->
<td class="gen" align="center">&nbsp;{memberrow.ROW_NUMBER}&nbsp;</td>
- <td class="genmed" align="{S_CONTENT_FLOW_BEGIN}">{memberrow.USERNAME_FULL}<!-- IF S_SELECT_SINGLE --> [&nbsp;<a href="#" onclick="insert_single('{memberrow.A_USERNAME}'); return false;">{L_SELECT}</a>&nbsp;]<!-- ENDIF --></td>
+ <td class="genmed" align="{S_CONTENT_FLOW_BEGIN}"><!-- EVENT memberlist_body_username_prepend -->{memberrow.USERNAME_FULL}<!-- EVENT memberlist_body_username_append --><!-- IF S_SELECT_SINGLE --> [&nbsp;<a href="#" onclick="insert_single('{memberrow.A_USERNAME}'); return false;">{L_SELECT}</a>&nbsp;]<!-- ENDIF --></td>
<td class="genmed" align="center" nowrap="nowrap">&nbsp;{memberrow.JOINED}&nbsp;</td>
<td class="gen" align="center">{memberrow.POSTS}</td>
<td class="gen" align="center"><!-- IF memberrow.RANK_IMG -->{memberrow.RANK_IMG}<!-- ELSE -->{memberrow.RANK_TITLE}<!-- ENDIF --></td>
- <td class="gen" align="center">&nbsp;<!-- IF memberrow.U_PM --><a href="{memberrow.U_PM}">{PM_IMG}</a><!-- ENDIF -->&nbsp;</td>
- <td class="gen" align="center">&nbsp;<!-- IF memberrow.U_EMAIL --><a href="{memberrow.U_EMAIL}">{EMAIL_IMG}</a><!-- ENDIF -->&nbsp;</td>
- <td class="gen" align="center">&nbsp;<!-- IF memberrow.U_WWW --><a href="{memberrow.U_WWW}">{WWW_IMG}</a><!-- ENDIF -->&nbsp;</td>
+ <td class="gen" align="center">&nbsp;<!-- IF memberrow.U_PM --><a href="{memberrow.U_PM}" class="imageset">{PM_IMG}</a><!-- ENDIF -->&nbsp;</td>
+ <td class="gen" align="center">&nbsp;<!-- IF memberrow.U_EMAIL --><a href="{memberrow.U_EMAIL}" class="imageset">{EMAIL_IMG}</a><!-- ENDIF -->&nbsp;</td>
<!-- IF memberrow.S_PROFILE_FIELD1 -->
<!-- Use a construct like this to include admin defined profile fields. Replace FIELD1 with the name of your field. -->
<td class="gen" align="center">&nbsp;{memberrow.PROFILE_FIELD1_VALUE}</td>
@@ -91,7 +89,7 @@
<!-- END memberrow -->
<tr>
- <td class="cat" colspan="<!-- IF S_IN_SEARCH_POPUP -->9<!-- ELSE -->8<!-- ENDIF -->" align="center"><!-- IF S_IN_SEARCH_POPUP and not S_SELECT_SINGLE --><input class="btnlite" type="submit" value="{L_SELECT_MARKED}" /><!-- ELSE --><span class="gensmall">{L_SELECT_SORT_METHOD}:</span>&nbsp;<select name="sk">{S_MODE_SELECT}</select>&nbsp; <span class="gensmall">{L_ORDER}</span>&nbsp;<select name="sd">{S_ORDER_SELECT}</select>&nbsp; <input type="submit" name="submit" value="{L_SUBMIT}" class="btnlite" /><!-- ENDIF --></td>
+ <td class="cat" colspan="<!-- IF S_IN_SEARCH_POPUP -->9<!-- ELSE -->8<!-- ENDIF -->" align="center"><!-- IF S_IN_SEARCH_POPUP and not S_SELECT_SINGLE --><input class="btnlite" type="submit" value="{L_SELECT_MARKED}" /><!-- ELSE --><span class="gensmall">{L_SELECT_SORT_METHOD}{L_COLON}</span>&nbsp;<select name="sk">{S_MODE_SELECT}</select>&nbsp; <span class="gensmall">{L_ORDER}</span>&nbsp;<select name="sd">{S_ORDER_SELECT}</select>&nbsp; <input type="submit" name="submit" value="{L_SUBMIT}" class="btnlite" /><!-- ENDIF --></td>
</tr>
</table>
{S_FORM_TOKEN}
@@ -118,4 +116,4 @@
<div align="{S_CONTENT_FLOW_END}"><!-- INCLUDE jumpbox.html --></div>
<!-- INCLUDE overall_footer.html -->
-<!-- ENDIF --> \ No newline at end of file
+<!-- ENDIF -->
diff --git a/phpBB/styles/subsilver2/template/memberlist_email.html b/phpBB/styles/subsilver2/template/memberlist_email.html
index 976ac1ad89..88289e53bf 100644
--- a/phpBB/styles/subsilver2/template/memberlist_email.html
+++ b/phpBB/styles/subsilver2/template/memberlist_email.html
@@ -25,7 +25,7 @@
<!-- ELSE -->
<tr>
<td class="row1" width="35%"><b class="genmed">{L_EMAIL_ADDRESS}</b></td>
- <td class="row2"><input class="post" type="text" name="email" size="50" maxlength="100" value="{EMAIL}" /></td>
+ <td class="row2"><input class="post" type="email" name="email" size="50" maxlength="100" value="{EMAIL}" /></td>
</tr>
<tr>
<td class="row1" width="35%"><b class="genmed">{L_REAL_NAME}</b></td>
@@ -70,4 +70,4 @@
<div style="float: {S_CONTENT_FLOW_END};"><!-- INCLUDE jumpbox.html --></div>
-<!-- INCLUDE overall_footer.html --> \ No newline at end of file
+<!-- INCLUDE overall_footer.html -->
diff --git a/phpBB/styles/subsilver2/template/memberlist_group.html b/phpBB/styles/subsilver2/template/memberlist_group.html
index 650868f810..4140c8cdbf 100644
--- a/phpBB/styles/subsilver2/template/memberlist_group.html
+++ b/phpBB/styles/subsilver2/template/memberlist_group.html
@@ -4,14 +4,14 @@
<th colspan="3">{L_GROUP_INFORMATION}</th>
</tr>
<tr>
- <td class="row1" width="20%"><b class="genmed">{L_GROUP_NAME}:</b></td>
+ <td class="row1" width="20%"><b class="genmed">{L_GROUP_NAME}{L_COLON}</b></td>
<td class="row2"><b class="gen"<!-- IF GROUP_COLOR --> style="color:#{GROUP_COLOR}"<!-- ENDIF -->>{GROUP_NAME}</b></td>
<!-- IF AVATAR_IMG or RANK_IMG or GROUP_RANK or U_PM -->
- <td class="row1" width="33%" rowspan="2" align="center"><!-- IF AVATAR_IMG -->{AVATAR_IMG}<br /><!-- ENDIF --><!-- IF RANK_IMG -->{RANK_IMG}<!-- ENDIF --><!-- IF GROUP_RANK --><span class="gensmall">{GROUP_RANK}</span><br /><br /><!-- ENDIF --><!-- IF U_PM --><a href="{U_PM}">{PM_IMG}</a><!-- ENDIF --></td>
+ <td class="row1" width="33%" rowspan="2" align="center"><!-- IF AVATAR_IMG -->{AVATAR_IMG}<br /><!-- ENDIF --><!-- IF RANK_IMG -->{RANK_IMG}<!-- ENDIF --><!-- IF GROUP_RANK --><span class="gensmall">{GROUP_RANK}</span><br /><br /><!-- ENDIF --><!-- IF U_PM --><a href="{U_PM}" class="imageset">{PM_IMG}</a><!-- ENDIF --></td>
<!-- ENDIF -->
</tr>
<tr>
- <td class="row1" width="20%"><b class="genmed">{L_GROUP_DESC}:</b></td>
+ <td class="row1" width="20%"><b class="genmed">{L_GROUP_DESC}{L_COLON}</b></td>
<td class="row2"><span class="gen">{GROUP_DESC}</span><p class="forumdesc">{GROUP_TYPE}</p></td>
</tr>
</table>
diff --git a/phpBB/styles/subsilver2/template/memberlist_im.html b/phpBB/styles/subsilver2/template/memberlist_im.html
index 0a92fd2ba0..a19229605a 100644
--- a/phpBB/styles/subsilver2/template/memberlist_im.html
+++ b/phpBB/styles/subsilver2/template/memberlist_im.html
@@ -2,8 +2,6 @@
<br clear="all" />
-<!-- MSNM info from http://www.cdolive.net/ - doesn't seem to work with MSN Messenger -->
-
<form method="post" action="{S_IM_ACTION}">
<table class="tablebg" width="95%" cellspacing="1" cellpadding="4" border="0" align="center">
<tr>
@@ -13,121 +11,28 @@
<td class="row3" colspan="2"><span class="gensmall">{L_SEND_IM_EXPLAIN}</span></td>
</tr>
<tr>
- <td class="row1"><b class="genmed">{L_IM_RECIPIENT}: </b></td>
- <td class="row2"><span class="gen"><b>{USERNAME}</b><!-- IF S_SEND_ICQ or S_SEND_AIM or S_SEND_MSNM or S_NO_SEND_JABBER --> [ {IM_CONTACT} ]<!-- ENDIF --></span> <!-- IF PRESENCE_IMG -->{PRESENCE_IMG}<!-- ENDIF --></td>
+ <td class="row1"><b class="genmed">{L_IM_RECIPIENT}{L_COLON} </b></td>
+ <td class="row2"><span class="gen"><b>{USERNAME}</b><!-- IF S_NO_SEND_JABBER --> [ {IM_CONTACT} ]<!-- ENDIF --></span> <!-- IF PRESENCE_IMG -->{PRESENCE_IMG}<!-- ENDIF --></td>
</tr>
- <!-- IF S_SEND_AIM -->
- <tr>
- <td class="row1" colspan="2" align="center"><br /><a class="gen" href="{U_AIM_CONTACT}">{L_IM_ADD_CONTACT}</a><br /><a class="gen" href="{U_AIM_MESSAGE}">{L_IM_SEND_MESSAGE}</a><br /><br /><a class="gensmall" href="http://www.aim.com">{L_IM_DOWNLOAD_APP}</a> | <a class="gensmall" href="http://www.aim.com/products/express">{L_IM_AIM_EXPRESS}</a> </td>
- </tr>
- <tr>
- <td class="cat" colspan="2" align="center">&nbsp;</td>
- </tr>
- <!-- ENDIF -->
-
- <!-- IF S_SEND_MSNM -->
- <tr>
- <td class="row1" colspan="2" align="center">
- <object classid="clsid:B69003B3-C55E-4B48-836C-BC5946FC3B28" codetype="application/x-oleobject" id="objMessengerApp" width="0" height="0"></object>
- <script type="text/javascript">
- // <![CDATA[
- var app = document.getElementById('objMessengerApp');
-
- /**
- * Check whether the browser supports this and whether MSNM is connected
- */
- function msn_supported()
- {
- // Does the browser support the MSNM object?
- if (app.MyStatus)
- {
- // Is MSNM connected?
- if (app.MyStatus == 1)
- {
- alert('{LA_IM_MSNM_CONNECT}');
- return false;
- }
- }
- else
- {
- alert('{LA_IM_MSNM_BROWSER}');
- return false;
- }
- return true;
- }
-
- /**
- * Add to your contact list
- */
- function add_contact(address)
- {
- if (msn_supported())
- {
- // Could return an error while MSNM is connecting, don't want that
- try
- {
- app.AddContact(0, address);
- }
- catch (e)
- {
- return;
- }
- }
- }
-
- /**
- * Write IM to contact
- */
- function im_contact(address)
- {
- if (msn_supported())
- {
- // Could return an error while MSNM is connecting, don't want that
- try
- {
- app.InstantMessage(address);
- }
- catch (e)
- {
- return;
- }
- }
- }
- // ]]>
- </script>
-
- <a class="gen" href="#" onclick="add_contact('{A_IM_CONTACT}'); return false;">{L_IM_ADD_CONTACT}</a><br /><a class="gen" href="#" onclick="im_contact('{A_IM_CONTACT}'); return false;">{L_IM_SEND_MESSAGE}</a>
- </td>
- </tr>
- <tr>
- <td class="cat" colspan="2" align="center">&nbsp;</td>
- </tr>
- <!-- ENDIF -->
-
<!-- IF S_SEND_JABBER -->
<tr>
- <td class="row1"><b class="genmed">{L_IM_MESSAGE}: </b></td>
+ <td class="row1"><b class="genmed">{L_IM_MESSAGE}{L_COLON} </b></td>
<td class="row2"><textarea class="post" name="message" rows="5" cols="45"></textarea></td>
</tr>
<tr>
<td class="cat" colspan="2" align="center"><input class="btnmain" name="submit" type="submit" value="{L_IM_SEND}" /></td>
</tr>
- <!-- ENDIF -->
-
- <!-- IF S_NO_SEND_JABBER -->
- <tr>
- <td class="row1" colspan="2"><span class="genmed">{L_IM_NO_JABBER}</span></td>
- </tr>
- <!-- ENDIF -->
-
- <!-- IF S_SENT_JABBER -->
<tr>
<td class="row1" colspan="2" align="center"><span class="gen">{L_IM_SENT_JABBER}</span></td>
</tr>
<tr>
<td class="cat" colspan="2" align="center"></td>
</tr>
+ <!-- ELSEIF S_NO_SEND_JABBER -->
+ <tr>
+ <td class="row1" colspan="2"><span class="genmed">{L_IM_NO_JABBER}</span></td>
+ </tr>
<!-- ENDIF -->
</table>
@@ -136,4 +41,4 @@
<a class="nav" href="#" onclick="window.close(); return false;">{L_CLOSE_WINDOW}</a>
-<!-- INCLUDE simple_footer.html --> \ No newline at end of file
+<!-- INCLUDE simple_footer.html -->
diff --git a/phpBB/styles/subsilver2/template/memberlist_leaders.html b/phpBB/styles/subsilver2/template/memberlist_leaders.html
deleted file mode 100644
index ba6dbde617..0000000000
--- a/phpBB/styles/subsilver2/template/memberlist_leaders.html
+++ /dev/null
@@ -1,71 +0,0 @@
-<!-- INCLUDE overall_header.html -->
-
-<form method="post" action="{S_MODE_ACTION}">
-
-<table class="tablebg" width="100%" cellspacing="1">
-<tr>
- <th nowrap="nowrap" width="20%">{L_USERNAME}</th>
- <th nowrap="nowrap" width="25%">{L_FORUMS}</th>
- <th nowrap="nowrap" width="20%">{L_PRIMARY_GROUP}</th>
- <th nowrap="nowrap" width="15%">{L_RANK}</th>
- <th nowrap="nowrap" width="11%">{L_SEND_MESSAGE}</th>
-</tr>
-<tr class="row3">
- <td colspan="5"><b class="gensmall">{L_ADMINISTRATORS}</b></td>
-</tr>
-<!-- BEGIN admin -->
- <!-- IF admin.S_ROW_COUNT is even --><tr class="row2"><!-- ELSE --><tr class="row1"><!-- ENDIF -->
-
- <td class="gen" align="center"><strong>{admin.USERNAME_FULL}</strong></td>
- <td class="gensmall" align="center">&nbsp;</td>
- <td class="gensmall" align="center" nowrap="nowrap">&nbsp;
- <!-- IF admin.U_GROUP -->
- <a<!-- IF admin.GROUP_COLOR --> style="font-weight: bold; color:#{admin.GROUP_COLOR}"<!-- ENDIF --> href="{admin.U_GROUP}">{admin.GROUP_NAME}</a>
- <!-- ELSE -->
- {admin.GROUP_NAME}
- <!-- ENDIF -->
- &nbsp;</td>
- <td class="gen" align="center"><!-- IF admin.RANK_IMG -->{admin.RANK_IMG}<!-- ELSE -->{admin.RANK_TITLE}<!-- ENDIF --></td>
- <td class="gen" align="center">&nbsp;<!-- IF admin.U_PM --><a href="{admin.U_PM}">{PM_IMG}</a><!-- ENDIF -->&nbsp;</td>
-</tr>
-<!-- BEGINELSE -->
- <tr>
- <td class="row1" colspan="5" align="center"><span class="gen">{L_NO_ADMINISTRATORS}</span></td>
- </tr>
-<!-- END admin -->
-<tr class="row3">
- <td colspan="5"><b class="gensmall">{L_MODERATORS}</b></td>
-</tr>
-<!-- BEGIN mod -->
- <!-- IF mod.S_ROW_COUNT is even --><tr class="row2"><!-- ELSE --><tr class="row1"><!-- ENDIF -->
-
- <td class="gen" align="center"><strong>{mod.USERNAME_FULL}</strong></td>
- <td align="center"><!-- IF not mod.FORUMS -->{L_ALL_FORUMS}<!-- ELSE --><select style="width: 200px;">{mod.FORUMS}</select><!-- ENDIF -->&nbsp;</td>
- <td class="gensmall" align="center" nowrap="nowrap">&nbsp;
- <!-- IF mod.U_GROUP -->
- <a<!-- IF mod.GROUP_COLOR --> style="font-weight: bold; color:#{mod.GROUP_COLOR}"<!-- ENDIF --> href="{mod.U_GROUP}">{mod.GROUP_NAME}</a>
- <!-- ELSE -->
- {mod.GROUP_NAME}
- <!-- ENDIF -->
- &nbsp;</td>
- <td class="gen" align="center"><!-- IF mod.RANK_IMG -->{mod.RANK_IMG}<!-- ELSE -->{mod.RANK_TITLE}<!-- ENDIF --></td>
- <td class="gen" align="center">&nbsp;<!-- IF mod.U_PM --><a href="{mod.U_PM}">{PM_IMG}</a><!-- ENDIF -->&nbsp;</td>
-</tr>
-<!-- BEGINELSE -->
- <tr>
- <td class="row1" colspan="5" align="center"><span class="gen">{L_NO_MODERATORS}</span></td>
- </tr>
-<!-- END mod -->
-</table>
-
-</form>
-
-<br clear="all" />
-
-<!-- INCLUDE breadcrumbs.html -->
-
-<br clear="all" />
-
-<div style="float: {S_CONTENT_FLOW_END};"><!-- INCLUDE jumpbox.html --></div>
-
-<!-- INCLUDE overall_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/subsilver2/template/memberlist_search.html b/phpBB/styles/subsilver2/template/memberlist_search.html
index 96ffad00d6..aa6b61fe22 100644
--- a/phpBB/styles/subsilver2/template/memberlist_search.html
+++ b/phpBB/styles/subsilver2/template/memberlist_search.html
@@ -35,7 +35,7 @@
{
opener.document.forms['{S_FORM_NAME}'].{S_FIELD_NAME}.value = user;
self.close();
- }
+ }
/**
* Mark/unmark checklist
@@ -43,11 +43,7 @@
*/
function marklist(id, name, state)
{
- var parent = document.getElementById(id);
- if (!parent)
- {
- eval('parent = document.' + id);
- }
+ var parent = document.getElementById(id) || document[id];
if (!parent)
{
@@ -55,7 +51,7 @@
}
var rb = parent.getElementsByTagName('input');
-
+
for (var r = 0; r < rb.length; r++)
{
if (rb[r].name.substr(0, name.length) == name)
@@ -78,61 +74,44 @@
<td class="row3" colspan="4"><span class="gensmall">{L_FIND_USERNAME_EXPLAIN}</span></td>
</tr>
<tr>
- <td class="row1"><b class="genmed">{L_USERNAME}:</b></td>
+ <td class="row1"><b class="genmed">{L_USERNAME}{L_COLON}</b></td>
<td class="row2"><input class="post" type="text" name="username" value="{USERNAME}" /></td>
- <td class="row1"><b class="genmed">{L_ICQ}:</b></td>
- <td class="row2"><input class="post" type="text" name="icq" value="{ICQ}" /></td>
+ <!-- IF S_EMAIL_SEARCH_ALLOWED -->
+ <td class="row1"><b class="genmed">{L_EMAIL}{L_COLON}</b></td>
+ <td class="row2"><input class="post" type="email" name="email" value="{EMAIL}" /></td>
+ <!-- ELSE -->
+ <td colspan="2" class="row1">&nbsp;</td>
+ <!-- ENDIF -->
</tr>
<tr>
-<!-- IF S_EMAIL_SEARCH_ALLOWED -->
- <td class="row1"><b class="genmed">{L_EMAIL}:</b></td>
- <td class="row2"><input class="post" type="text" name="email" value="{EMAIL}" /></td>
-<!-- ELSE -->
- <td colspan="2" class="row1">&nbsp;</td>
-<!-- ENDIF -->
- <td class="row1"><b class="genmed">{L_AIM}:</b></td>
- <td class="row2"><input class="post" type="text" name="aim" value="{AIM}" /></td>
-</tr>
-<tr>
- <td class="row1"><b class="genmed">{L_JOINED}:</b></td>
+ <td class="row1"><b class="genmed">{L_JOINED}{L_COLON}</b></td>
<td class="row2"><select name="joined_select">{S_JOINED_TIME_OPTIONS}</select> <input class="post" type="text" name="joined" value="{JOINED}" /></td>
- <td class="row1"><b class="genmed">{L_YIM}:</b></td>
- <td class="row2"><input class="post" type="text" name="yahoo" value="{YAHOO}" /></td>
+ <td class="row1"><b class="genmed">{L_POSTS}{L_COLON}</b></td>
+ <td class="row2"><select name="count_select">{S_COUNT_OPTIONS}</select> <input class="post" type="number" min="0" name="count" value="{COUNT}" /></td>
</tr>
-<tr>
<!-- IF S_VIEWONLINE -->
- <td class="row1"><b class="genmed">{L_LAST_ACTIVE}:</b></td>
+<tr>
+ <td class="row1"><b class="genmed">{L_LAST_ACTIVE}{L_COLON}</b></td>
<td class="row2"><select name="active_select">{S_ACTIVE_TIME_OPTIONS}</select> <input class="post" type="text" name="active" value="{ACTIVE}" /></td>
-<!-- ELSE -->
- <td colspan="2" class="row1">&nbsp;</td>
-<!-- ENDIF -->
- <td class="row1"><b class="genmed">{L_MSNM}:</b></td>
- <td class="row2"><input class="post" type="text" name="msn" value="{MSNM}" /></td>
+ <!-- IF S_IP_SEARCH_ALLOWED -->
+ <td class="row1"><b class="genmed">{L_POST_IP}{L_COLON}</b></td>
+ <td class="row2"><input class="post" type="text" name="ip" value="{IP}" /></td>
+ <!-- ELSE -->
+ <td colspan="2" class="row1">&nbsp;</td>
+ <!-- ENDIF -->
</tr>
+<!-- ENDIF -->
<tr>
- <td class="row1"><b class="genmed">{L_POSTS}:</b></td>
- <td class="row2"><select name="count_select">{S_COUNT_OPTIONS}</select> <input class="post" type="text" name="count" value="{COUNT}" /></td>
- <td class="row1"><b class="genmed">{L_JABBER}:</b></td>
+ <td class="row1"><b class="genmed">{L_GROUP}{L_COLON}</b></td>
+ <td class="row2" nowrap="nowrap"><select name="search_group_id">{S_GROUP_SELECT}</select></td>
+ <td class="row1"><b class="genmed">{L_JABBER}{L_COLON}</b></td>
<td class="row2"><input class="post" type="text" name="jabber" value="{JABBER}" /></td>
</tr>
<tr>
- <td class="row1"><b class="genmed">{L_SORT_BY}:</b></td>
+ <td class="row1"><b class="genmed">{L_SORT_BY}{L_COLON}</b></td>
<td class="row2" nowrap="nowrap"><select name="sk">{S_SORT_OPTIONS}</select> <select name="sd">{S_ORDER_SELECT}</select>&nbsp;</td>
-<!-- IF S_IP_SEARCH_ALLOWED -->
- <td class="row1"><b class="genmed">{L_POST_IP}:</b></td>
- <td class="row2"><input class="post" type="text" name="ip" value="{IP}" /></td>
-</tr>
-<tr>
- <td class="row1"><b class="genmed">{L_GROUP}:</b></td>
- <td class="row2" nowrap="nowrap"><select name="search_group_id">{S_GROUP_SELECT}</select></td>
- <td class="row1">&nbsp;</td>
- <td class="row2">&nbsp;</td>
-</tr>
-<!-- ELSE -->
- <td class="row1"><b class="genmed">{L_GROUP}:</b></td>
- <td class="row2" nowrap="nowrap"><select name="search_group_id">{S_GROUP_SELECT}</select></td>
+ <td colspan="2" class="row1">&nbsp;</td>
</tr>
-<!-- ENDIF -->
<tr>
<td class="cat" colspan="4" align="center"><input class="btnmain" type="submit" name="submit" value="{L_SEARCH}" />&nbsp;&nbsp;<input class="btnlite" type="reset" value="{L_RESET}" /></td>
</tr>
diff --git a/phpBB/styles/subsilver2/template/memberlist_team.html b/phpBB/styles/subsilver2/template/memberlist_team.html
new file mode 100644
index 0000000000..a4f38aafc4
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/memberlist_team.html
@@ -0,0 +1,50 @@
+<!-- INCLUDE overall_header.html -->
+
+<form method="post" action="{S_MODE_ACTION}">
+
+<table class="tablebg" width="100%" cellspacing="1">
+<tr>
+ <th nowrap="nowrap" width="20%">{L_USERNAME}</th>
+ <!-- IF S_DISPLAY_MODERATOR_FORUMS --><th nowrap="nowrap" width="25%">{L_FORUMS}</th><!-- ENDIF -->
+ <th nowrap="nowrap" width="20%">{L_PRIMARY_GROUP}</th>
+ <th nowrap="nowrap" width="15%">{L_RANK}</th>
+ <th nowrap="nowrap" width="11%">{L_SEND_MESSAGE}</th>
+</tr>
+<!-- BEGIN group -->
+<tr class="row3">
+ <td colspan="5"><b class="gensmall"><!-- IF group.U_GROUP --><a href="{group.U_GROUP}">{group.GROUP_NAME}</a><!-- ELSE -->{group.GROUP_NAME}<!-- ENDIF --></b></td>
+</tr>
+<!-- BEGIN user -->
+ <!-- IF group.user.S_ROW_COUNT is even --><tr class="row2"><!-- ELSE --><tr class="row1"><!-- ENDIF -->
+
+ <td class="gen" align="center"><strong>{group.user.USERNAME_FULL}</strong></td>
+ <!-- IF S_DISPLAY_MODERATOR_FORUMS --><td class="gensmall" align="center"><!-- IF group.user.FORUM_OPTIONS --><select style="width: 100%;">{group.user.FORUMS}</select><!-- ELSEIF group.user.FORUMS -->{group.user.FORUMS}<!-- ELSE -->-<!-- ENDIF --></td><!-- ENDIF -->
+ <td class="gensmall" align="center" nowrap="nowrap">&nbsp;
+ <!-- IF group.user.U_GROUP -->
+ <a<!-- IF group.user.GROUP_COLOR --> style="font-weight: bold; color:#{group.user.GROUP_COLOR}"<!-- ENDIF --> href="{group.user.U_GROUP}">{group.user.GROUP_NAME}</a>
+ <!-- ELSE -->
+ {group.user.GROUP_NAME}
+ <!-- ENDIF -->
+ &nbsp;</td>
+ <td class="gen" align="center"><!-- IF group.user.RANK_IMG -->{group.user.RANK_IMG}<!-- ELSE -->{group.user.RANK_TITLE}<!-- ENDIF --></td>
+ <td class="gen" align="center">&nbsp;<!-- IF group.user.U_PM --><a href="{group.user.U_PM}" class="imageset">{PM_IMG}</a><!-- ENDIF -->&nbsp;</td>
+</tr>
+<!-- BEGINELSE -->
+ <tr>
+ <td class="row1" colspan="5" align="center"><span class="gen">{L_NO_MEMBERS}</span></td>
+ </tr>
+<!-- END user -->
+<!-- END group -->
+</table>
+
+</form>
+
+<br clear="all" />
+
+<!-- INCLUDE breadcrumbs.html -->
+
+<br clear="all" />
+
+<div style="float: {S_CONTENT_FLOW_END};"><!-- INCLUDE jumpbox.html --></div>
+
+<!-- INCLUDE overall_footer.html -->
diff --git a/phpBB/styles/subsilver2/template/memberlist_view.html b/phpBB/styles/subsilver2/template/memberlist_view.html
index 7898e9b235..52f40707c0 100644
--- a/phpBB/styles/subsilver2/template/memberlist_view.html
+++ b/phpBB/styles/subsilver2/template/memberlist_view.html
@@ -18,7 +18,7 @@
<table cellspacing="1" cellpadding="2" border="0">
<!-- IF S_USER_INACTIVE -->
<tr>
- <td align="center"><b class="gen inactive">{L_USER_IS_INACTIVE}</b><br />{L_INACTIVE_REASON}: {USER_INACTIVE_REASON}<br /><br /></td>
+ <td align="center"><b class="gen inactive">{L_USER_IS_INACTIVE}</b><br />{L_INACTIVE_REASON}{L_COLON} {USER_INACTIVE_REASON}<br /><br /></td>
</tr>
<!-- ENDIF -->
<tr>
@@ -66,36 +66,38 @@
</td>
<td class="row1">
<table width="100%" cellspacing="1" cellpadding="2" border="0">
+ <!-- EVENT memberlist_view_user_statistics_before -->
<tr>
- <td class="gen" align="{S_CONTENT_FLOW_END}" nowrap="nowrap">{L_JOINED}: </td>
+ <td class="gen" align="{S_CONTENT_FLOW_END}" nowrap="nowrap">{L_JOINED}{L_COLON} </td>
<td width="100%"><b class="gen">{JOINED}</b></td>
</tr>
<tr>
- <td class="gen" align="{S_CONTENT_FLOW_END}" nowrap="nowrap">{L_VISITED}: </td>
- <td width="100%"><b class="gen">{VISITED}</b></td>
+ <td class="gen" align="{S_CONTENT_FLOW_END}" nowrap="nowrap">{L_LAST_ACTIVE}{L_COLON} </td>
+ <td width="100%"><b class="gen">{LAST_ACTIVE}</b></td>
</tr>
<!-- IF S_WARNINGS -->
<tr>
- <td class="gen" align="{S_CONTENT_FLOW_END}" valign="top" nowrap="nowrap">{L_WARNINGS}: </td>
+ <td class="gen" align="{S_CONTENT_FLOW_END}" valign="top" nowrap="nowrap">{L_WARNINGS}{L_COLON} </td>
<td width="100%"><b class="gen">{WARNINGS}</b><!-- IF U_NOTES or U_WARN --><br /><span class="genmed"> [ <!-- IF U_NOTES --><a href="{U_NOTES}">{L_VIEW_NOTES}</a><!-- ENDIF --> <!-- IF U_WARN --><!-- IF U_NOTES --> | <!-- ENDIF --><a href="{U_WARN}">{L_WARN_USER}</a><!-- ENDIF --> ]</span><!-- ENDIF --></td>
</tr>
<!-- ENDIF -->
<tr>
- <td class="gen" align="{S_CONTENT_FLOW_END}" valign="top" nowrap="nowrap">{L_TOTAL_POSTS}: </td>
+ <td class="gen" align="{S_CONTENT_FLOW_END}" valign="top" nowrap="nowrap">{L_TOTAL_POSTS}{L_COLON} </td>
<td><b class="gen">{POSTS}</b><span class="genmed"><!-- IF POSTS_PCT --><br />[{POSTS_PCT} / {POSTS_DAY}]<!-- ENDIF -->
<!-- IF POSTS_IN_QUEUE and U_MCP_QUEUE --><br />[<a href="{U_MCP_QUEUE}">{L_POSTS_IN_QUEUE}</a>]<!-- ELSEIF POSTS_IN_QUEUE --><br />[{L_POSTS_IN_QUEUE}]<!-- ENDIF -->
<!-- IF S_DISPLAY_SEARCH --><br /><a href="{U_SEARCH_USER}">{L_SEARCH_USER_POSTS}</a><!-- ENDIF --></span></td>
</tr>
<!-- IF S_SHOW_ACTIVITY -->
<tr>
- <td class="gen" align="{S_CONTENT_FLOW_END}" valign="top" nowrap="nowrap">{L_ACTIVE_IN_FORUM}: </td>
+ <td class="gen" align="{S_CONTENT_FLOW_END}" valign="top" nowrap="nowrap">{L_ACTIVE_IN_FORUM}{L_COLON} </td>
<td><!-- IF ACTIVE_FORUM != '' --><b><a class="gen" href="{U_ACTIVE_FORUM}">{ACTIVE_FORUM}</a></b><br /><span class="genmed">[ {ACTIVE_FORUM_POSTS} / {ACTIVE_FORUM_PCT} ]</span><!-- ELSE --><span class="gen">-</span><!-- ENDIF --></td>
</tr>
<tr>
- <td class="gen" align="{S_CONTENT_FLOW_END}" valign="top" nowrap="nowrap">{L_ACTIVE_IN_TOPIC}: </td>
+ <td class="gen" align="{S_CONTENT_FLOW_END}" valign="top" nowrap="nowrap">{L_ACTIVE_IN_TOPIC}{L_COLON} </td>
<td><!-- IF ACTIVE_TOPIC != '' --><b><a class="gen" href="{U_ACTIVE_TOPIC}">{ACTIVE_TOPIC}</a></b><br /><span class="genmed">[ {ACTIVE_TOPIC_POSTS} / {ACTIVE_TOPIC_PCT} ]</span><!-- ELSE --><span class="gen">-</span><!-- ENDIF --></td>
</tr>
<!-- ENDIF -->
+ <!-- EVENT memberlist_view_user_statistics_after -->
</table>
</td>
</tr>
@@ -103,85 +105,69 @@
<td class="cat" align="center"><h4>{L_CONTACT_USER}</h4></td>
<td class="cat" align="center"><h4>{L_ABOUT_USER}</h4></td>
</tr>
+ <!-- EVENT memberlist_view_contact_before -->
<tr>
<td class="row1">
<table width="100%" cellspacing="1" cellpadding="2" border="0">
<tr>
- <td class="gen" align="{S_CONTENT_FLOW_END}" nowrap="nowrap">{L_EMAIL_ADDRESS}: </td>
- <td width="100%"><!-- IF U_EMAIL --><a href="{U_EMAIL}">{EMAIL_IMG}</a><!-- ENDIF --></td>
+ <td class="gen" align="{S_CONTENT_FLOW_END}" nowrap="nowrap">{L_EMAIL_ADDRESS}{L_COLON} </td>
+ <td width="100%"><!-- IF U_EMAIL --><a href="{U_EMAIL}" class="imageset">{EMAIL_IMG}</a><!-- ENDIF --></td>
</tr>
<!-- IF U_PM -->
<tr>
- <td class="gen" nowrap="nowrap" align="{S_CONTENT_FLOW_END}">{L_PM}: </td>
- <td><a href="{U_PM}">{PM_IMG}</a></td>
+ <td class="gen" nowrap="nowrap" align="{S_CONTENT_FLOW_END}">{L_PM}{L_COLON} </td>
+ <td><a href="{U_PM}" class="imageset">{PM_IMG}</a></td>
</tr>
<!-- ENDIF -->
<tr>
- <td class="gen" nowrap="nowrap" align="{S_CONTENT_FLOW_END}">{L_MSNM}: </td>
- <td><!-- IF U_MSN --><a href="{U_MSN}" onclick="popup(this.href, 550, 320); return false">{MSN_IMG}</a><!-- ELSEIF USER_MSN -->{USER_MSN}<!-- ENDIF --></td>
- </tr>
- <tr>
- <td class="gen" nowrap="nowrap" align="{S_CONTENT_FLOW_END}">{L_YIM}: </td>
- <td><!-- IF U_YIM --><a href="{U_YIM}" onclick="popup(this.href, 780, 550); return false">{YIM_IMG}</a><!-- ELSEIF USER_YIM -->{USER_YIM}<!-- ENDIF --></td>
- </tr>
- <tr>
- <td class="gen" nowrap="nowrap" align="{S_CONTENT_FLOW_END}">{L_AIM}: </td>
- <td><!-- IF U_AIM --><a href="{U_AIM}" onclick="popup(this.href, 550, 320); return false">{AIM_IMG}</a><!-- ELSEIF USER_AIM -->{USER_AIM}<!-- ENDIF --></td>
- </tr>
- <tr>
- <td class="gen" nowrap="nowrap" align="{S_CONTENT_FLOW_END}">{L_ICQ}: </td>
- <td><!-- IF U_ICQ --><a href="{U_ICQ}" onclick="popup(this.href, 550, 320); return false">{ICQ_IMG}</a><!-- ELSEIF USER_ICQ -->{USER_ICQ}<!-- ENDIF --></td>
- </tr>
- <tr>
- <td class="gen" nowrap="nowrap" align="{S_CONTENT_FLOW_END}">{L_JABBER}: </td>
- <td><!-- IF U_JABBER --><a href="{U_JABBER}" onclick="popup(this.href, 550, 320); return false">{JABBER_IMG}</a><!-- ELSEIF USER_JABBER -->{USER_JABBER_IMG}<!-- ENDIF --></td>
+ <td class="gen" nowrap="nowrap" align="{S_CONTENT_FLOW_END}">{L_JABBER}{L_COLON} </td>
+ <td><!-- IF U_JABBER --><a href="{U_JABBER}" onclick="popup(this.href, 550, 320); return false" class="imageset">{JABBER_IMG}</a><!-- ELSEIF USER_JABBER -->{USER_JABBER_IMG}<!-- ENDIF --></td>
</tr>
+ <!-- BEGIN custom_fields -->
+ <!-- IF custom_fields.S_PROFILE_CONTACT -->
+ <tr>
+ <td class="gen" align="{S_CONTENT_FLOW_END}" nowrap="nowrap">{custom_fields.PROFILE_FIELD_NAME}{L_COLON} </td>
+ <!-- IF custom_fields.PROFILE_FIELD_CONTACT -->
+ <td><a href="{custom_fields.PROFILE_FIELD_CONTACT}"><span class="imageset {custom_fields.PROFILE_FIELD_IDENT}-icon">{custom_fields.PROFILE_FIELD_DESC}</span></a></td>
+ <!-- ELSE -->
+ <td><b class="genmed">{custom_fields.PROFILE_FIELD_VALUE}</b></td>
+ <!-- ENDIF -->
+ </tr>
+ <!-- ENDIF -->
+ <!-- END custom_fields -->
</table>
</td>
<td class="row1">
<table cellspacing="1" cellpadding="2" border="0">
<tr>
- <td class="gen" align="{S_CONTENT_FLOW_END}" nowrap="nowrap">{L_USERGROUPS}: </td>
+ <td class="gen" align="{S_CONTENT_FLOW_END}" nowrap="nowrap">{L_USERGROUPS}{L_COLON} </td>
<td><select name="g">{S_GROUP_OPTIONS}</select> <input class="btnlite" type="submit" name="submit" value="{L_GO}" /></td>
</tr>
- <tr>
- <td class="gen" align="{S_CONTENT_FLOW_END}" nowrap="nowrap">{L_LOCATION}: </td>
- <td><!-- IF LOCATION --><b class="genmed">{LOCATION}</b><!-- ENDIF --></td>
- </tr>
<!-- IF AGE !== '' -->
<tr>
- <td class="gen" align="{S_CONTENT_FLOW_END}" nowrap="nowrap">{L_AGE}: </td>
+ <td class="gen" align="{S_CONTENT_FLOW_END}" nowrap="nowrap">{L_AGE}{L_COLON} </td>
<td><b class="genmed">{AGE}</b></td>
</tr>
<!-- ENDIF -->
- <tr>
- <td class="gen" align="{S_CONTENT_FLOW_END}" nowrap="nowrap">{L_OCCUPATION}: </td>
- <td><!-- IF OCCUPATION --><b class="genmed">{OCCUPATION}</b><!-- ENDIF --></td>
- </tr>
- <tr>
- <td class="gen" align="{S_CONTENT_FLOW_END}" nowrap="nowrap">{L_INTERESTS}: </td>
- <td><!-- IF INTERESTS --><b class="genmed">{INTERESTS}</b><!-- ENDIF --></td>
- </tr>
- <tr>
- <td class="gen" align="{S_CONTENT_FLOW_END}" nowrap="nowrap">{L_WEBSITE}: </td>
- <td><!-- IF U_WWW --><b><a class="genmed" href="{U_WWW}">{U_WWW}</a></b><!-- ENDIF --></td>
- </tr>
<!-- IF S_PROFILE_FIELD1 -->
<!-- Use a construct like this to include admin defined profile fields. Replace FIELD1 with the name of your field. -->
<tr>
- <td class="gen" align="{S_CONTENT_FLOW_END}" nowrap="nowrap">{PROFILE_FIELD1_NAME}: </td>
+ <td class="gen" align="{S_CONTENT_FLOW_END}" nowrap="nowrap">{PROFILE_FIELD1_NAME}{L_COLON} </td>
<td><b class="genmed">{PROFILE_FIELD1_VALUE}</b></td>
</tr>
<!-- ENDIF -->
<!-- BEGIN custom_fields -->
+ <!-- IF not custom_fields.S_PROFILE_CONTACT -->
<tr>
- <td class="gen" align="{S_CONTENT_FLOW_END}" nowrap="nowrap">{custom_fields.PROFILE_FIELD_NAME}: </td>
+ <td class="gen" align="{S_CONTENT_FLOW_END}" nowrap="nowrap">{custom_fields.PROFILE_FIELD_NAME}{L_COLON} </td>
<td><b class="genmed">{custom_fields.PROFILE_FIELD_VALUE}</b></td>
</tr>
+ <!-- ENDIF -->
<!-- END custom_fields -->
</table>
</td>
</tr>
+ <!-- EVENT memberlist_view_contact_after -->
<!-- IF SIGNATURE -->
<tr>
<td class="cat" colspan="2" align="center"><h4>{L_SIGNATURE}</h4></td>
@@ -194,6 +180,8 @@
</form>
+ <!-- EVENT memberlist_view_content_append -->
+
</div>
<br clear="all" />
@@ -204,4 +192,4 @@
<div style="float: {S_CONTENT_FLOW_END};"><!-- INCLUDE jumpbox.html --></div>
-<!-- INCLUDE overall_footer.html --> \ No newline at end of file
+<!-- INCLUDE overall_footer.html -->
diff --git a/phpBB/styles/subsilver2/template/message_body.html b/phpBB/styles/subsilver2/template/message_body.html
index f61a3e6365..b9b502a57f 100644
--- a/phpBB/styles/subsilver2/template/message_body.html
+++ b/phpBB/styles/subsilver2/template/message_body.html
@@ -13,4 +13,4 @@
<!-- INCLUDE breadcrumbs.html -->
-<!-- INCLUDE overall_footer.html --> \ No newline at end of file
+<!-- INCLUDE overall_footer.html -->
diff --git a/phpBB/styles/subsilver2/template/overall_footer.html b/phpBB/styles/subsilver2/template/overall_footer.html
index 6cd7a215b0..d2b6f6a9d7 100644
--- a/phpBB/styles/subsilver2/template/overall_footer.html
+++ b/phpBB/styles/subsilver2/template/overall_footer.html
@@ -1,12 +1,25 @@
+ <!-- EVENT overall_footer_content_after -->
+
<!-- IF not S_IS_BOT -->{RUN_CRON_TASK}<!-- ENDIF -->
</div>
<div id="wrapfooter">
<!-- IF U_ACP --><span class="gensmall">[ <a href="{U_ACP}">{L_ACP}</a> ]</span><br /><br /><!-- ENDIF -->
- <span class="copyright">{CREDIT_LINE}
+ <span class="copyright">
+ <!-- EVENT overall_footer_copyright_prepend -->
+ {CREDIT_LINE}
<!-- IF TRANSLATION_INFO --><br />{TRANSLATION_INFO}<!-- ENDIF -->
+ <!-- EVENT overall_footer_copyright_append -->
<!-- IF DEBUG_OUTPUT --><br /><bdo dir="ltr">[ {DEBUG_OUTPUT} ]</bdo><!-- ENDIF --></span>
</div>
+<script type="text/javascript" src="{T_JQUERY_LINK}"></script>
+<!-- IF S_ALLOW_CDN --><script type="text/javascript">window.jQuery || document.write(unescape('%3Cscript src="{T_ASSETS_PATH}/javascript/jquery.js?assets_version={T_ASSETS_VERSION}" type="text/javascript"%3E%3C/script%3E'));</script><!-- ENDIF -->
+<script type="text/javascript" src="{T_ASSETS_PATH}/javascript/core.js?assets_version={T_ASSETS_VERSION}"></script>
+
+<!-- EVENT overall_footer_after -->
+
+{$SCRIPTS}
+
</body>
-</html> \ No newline at end of file
+</html>
diff --git a/phpBB/styles/subsilver2/template/overall_header.html b/phpBB/styles/subsilver2/template/overall_header.html
index 7eb736aa32..fbf01ce6a8 100644
--- a/phpBB/styles/subsilver2/template/overall_header.html
+++ b/phpBB/styles/subsilver2/template/overall_header.html
@@ -1,17 +1,11 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}" xml:lang="{S_USER_LANG}">
+<!DOCTYPE html>
+<html dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}">
<head>
-
-<meta http-equiv="content-type" content="text/html; charset={S_CONTENT_ENCODING}" />
-<meta http-equiv="content-language" content="{S_USER_LANG}" />
-<meta http-equiv="content-style-type" content="text/css" />
-<meta http-equiv="imagetoolbar" content="no" />
-<meta name="resource-type" content="document" />
-<meta name="distribution" content="global" />
+<meta charset="utf-8">
<meta name="keywords" content="" />
<meta name="description" content="" />
{META}
-<title>{SITENAME} &bull; <!-- IF S_IN_MCP -->{L_MCP} &bull; <!-- ELSEIF S_IN_UCP -->{L_UCP} &bull; <!-- ENDIF -->{PAGE_TITLE}</title>
+<title><!-- IF UNREAD_NOTIFICATIONS_COUNT -->({UNREAD_NOTIFICATIONS_COUNT}) <!-- ENDIF --><!-- IF not S_VIEWTOPIC and not S_VIEWFORUM -->{SITENAME} - <!-- ENDIF --><!-- IF S_IN_MCP -->{L_MCP} - <!-- ELSEIF S_IN_UCP -->{L_UCP} - <!-- ENDIF -->{PAGE_TITLE}<!-- IF S_VIEWTOPIC or S_VIEWFORUM --> - {SITENAME}<!-- ENDIF --></title>
<!-- IF S_ENABLE_FEEDS -->
<!-- IF S_ENABLE_FEEDS_OVERALL --><link rel="alternate" type="application/atom+xml" title="{L_FEED} - {SITENAME}" href="{U_FEED}" /><!-- ENDIF -->
@@ -24,12 +18,10 @@
<!-- ENDIF -->
<link rel="stylesheet" href="{T_STYLESHEET_LINK}" type="text/css" />
+<link rel="stylesheet" href="{T_STYLESHEET_LANG_LINK}" type="text/css" />
<script type="text/javascript">
// <![CDATA[
-<!-- IF S_USER_PM_POPUP and S_NEW_PM -->
- popup('{UA_POPUP_PM}', 400, 225, '_phpbbprivmsg');
-<!-- ENDIF -->
function popup(url, width, height, name)
{
@@ -44,9 +36,9 @@ function popup(url, width, height, name)
function jumpto()
{
- var page = prompt('{LA_JUMP_PAGE}:', '{ON_PAGE}');
+ var page = prompt('{LA_JUMP_PAGE}{L_COLON}', '{CURRENT_PAGE}');
var per_page = '{PER_PAGE}';
- var base_url = '{A_BASE_URL}';
+ var base_url = '{BASE_URL|e('js')}';
if (page !== null && !isNaN(page) && page == Math.floor(page) && page > 0)
{
@@ -76,11 +68,7 @@ function find_username(url)
*/
function marklist(id, name, state)
{
- var parent = document.getElementById(id);
- if (!parent)
- {
- eval('parent = document.' + id);
- }
+ var parent = document.getElementById(id) || document[id];
if (!parent)
{
@@ -88,7 +76,7 @@ function marklist(id, name, state)
}
var rb = parent.getElementsByTagName('input');
-
+
for (var r = 0; r < rb.length; r++)
{
if (rb[r].name.substr(0, name.length) == name)
@@ -138,9 +126,16 @@ function marklist(id, name, state)
// ]]>
</script>
+
+<!-- EVENT overall_header_head_append -->
+
+{$STYLESHEETS}
+
</head>
<body class="{S_CONTENT_DIRECTION}">
+<!-- EVENT overall_header_body_before -->
+
<a name="top"></a>
<div id="wrapheader">
@@ -148,7 +143,7 @@ function marklist(id, name, state)
<div id="logodesc">
<table width="100%" cellspacing="0">
<tr>
- <td><a href="{U_INDEX}">{SITE_LOGO_IMG}</a></td>
+ <td><a href="<!-- IF U_SITE_HOME -->{U_SITE_HOME}<!-- ELSE -->{U_INDEX}<!-- ENDIF -->" class="imageset">{SITE_LOGO_IMG}</a></td>
<td width="100%" align="center"><h1>{SITENAME}</h1><span class="gen">{SITE_DESCRIPTION}</span></td>
</tr>
</table>
@@ -158,23 +153,61 @@ function marklist(id, name, state)
<table width="100%" cellspacing="0">
<tr>
<td class="genmed">
- <!-- IF not S_IS_BOT --><a href="{U_LOGIN_LOGOUT}"><img src="{T_THEME_PATH}/images/icon_mini_login.gif" width="12" height="13" alt="*" /> {L_LOGIN_LOGOUT}</a>&nbsp;<!-- ENDIF -->
- <!-- IF U_RESTORE_PERMISSIONS --> &nbsp;<a href="{U_RESTORE_PERMISSIONS}"><img src="{T_THEME_PATH}/images/icon_mini_login.gif" width="12" height="13" alt="*" /> {L_RESTORE_PERMISSIONS}</a><!-- ENDIF -->
- <!-- IF S_BOARD_DISABLED and S_USER_LOGGED_IN --> &nbsp;<span class="error">{L_BOARD_DISABLED}</span><!-- ENDIF -->
+ <!-- IF S_NOTIFICATIONS_DISPLAY and not S_IS_BOT and S_USER_LOGGED_IN -->
+ <a href="{U_VIEW_ALL_NOTIFICATIONS}" id="notification_list_button"><img src="{T_THEME_PATH}/images/icon_mini_notification.gif" width="12" height="13" alt="*" /> {L_NOTIFICATIONS} [<strong>{NOTIFICATIONS_COUNT}</strong>]</a>&nbsp;
+ <div id="notification_list" class="notification_list">
+ <div class="row1 header">
+ {L_NOTIFICATIONS}
+ <span class="header_settings"><a href="{U_NOTIFICATION_SETTINGS}">{L_SETTINGS}</a></span>
+ </div>
+
+ <div class="notification_scroll">
+ <table class="tablebg" width="310" cellspacing="1">
+ <!-- BEGIN notifications -->
+ <tr class="row<!-- IF notifications.UNREAD -->2<!-- ELSE -->1<!-- ENDIF -->">
+ <td width="50">
+ <!-- IF notifications.AVATAR -->{notifications.AVATAR}<!-- ELSE --><img src="{T_THEME_PATH}/images/no_avatar.gif" alt="" /><!-- ENDIF -->
+ </td>
+ <td valign="top">
+ <div class="notification_title">
+ <!-- IF notifications.URL --><a href="<!-- IF notifications.UNREAD -->{notifications.U_MARK_READ}<!-- ELSE -->{notifications.URL}<!-- ENDIF -->"><!-- ENDIF -->
+ {notifications.FORMATTED_TITLE}
+ <!-- IF notifications.URL --></a><!-- ENDIF -->
+ <br />&raquo; {notifications.TIME}
+ <!-- IF not notifications.URL and notifications.UNREAD -->
+ <br /><a href="{notifications.U_MARK_READ}">{L_MARK_READ}</a>
+ <!-- ENDIF -->
+ </div>
+ </td>
+ </tr>
+ <!-- END notifications -->
+ </table>
+ </div>
+
+ <div class="row1 footer">
+ <a href="{U_VIEW_ALL_NOTIFICATIONS}"><span>{L_SEE_ALL}</span></a>
+ </div>
+ </div>
+ <!-- ENDIF -->
<!-- IF not S_IS_BOT -->
<!-- IF S_USER_LOGGED_IN -->
- <!-- IF S_DISPLAY_PM --> &nbsp;<a href="{U_PRIVATEMSGS}"><img src="{T_THEME_PATH}/images/icon_mini_message.gif" width="12" height="13" alt="*" /> {PRIVATE_MESSAGE_INFO}<!-- IF PRIVATE_MESSAGE_INFO_UNREAD -->, {PRIVATE_MESSAGE_INFO_UNREAD}<!-- ENDIF --></a><!-- ENDIF -->
+ <!-- IF S_DISPLAY_PM --> &nbsp;<a href="{U_PRIVATEMSGS}"><img src="{T_THEME_PATH}/images/icon_mini_message.gif" width="12" height="13" alt="*" /> {L_PRIVATE_MESSAGES} [<strong>{PRIVATE_MESSAGE_COUNT}</strong>]</a><!-- ENDIF -->
<!-- ELSEIF S_REGISTER_ENABLED and not (S_SHOW_COPPA or S_REGISTRATION) --> &nbsp;<a href="{U_REGISTER}"><img src="{T_THEME_PATH}/images/icon_mini_register.gif" width="12" height="13" alt="*" /> {L_REGISTER}</a>
<!-- ENDIF -->
<!-- ENDIF -->
+ <!-- IF not S_IS_BOT --> &nbsp;<a href="{U_LOGIN_LOGOUT}"><img src="{T_THEME_PATH}/images/icon_mini_login.gif" width="12" height="13" alt="*" /> {L_LOGIN_LOGOUT}</a>&nbsp;<!-- ENDIF -->
+ <!-- IF U_RESTORE_PERMISSIONS --> &nbsp;<a href="{U_RESTORE_PERMISSIONS}"><img src="{T_THEME_PATH}/images/icon_mini_login.gif" width="12" height="13" alt="*" /> {L_RESTORE_PERMISSIONS}</a><!-- ENDIF -->
+ <!-- IF S_BOARD_DISABLED and S_USER_LOGGED_IN --> &nbsp;<span class="error">{L_BOARD_DISABLED}</span><!-- ENDIF -->
</td>
<td class="genmed" align="{S_CONTENT_FLOW_END}">
+ <!-- EVENT overall_header_navigation_prepend -->
<a href="{U_FAQ}"><img src="{T_THEME_PATH}/images/icon_mini_faq.gif" width="12" height="13" alt="*" /> {L_FAQ}</a>
<!-- IF S_DISPLAY_SEARCH -->&nbsp; &nbsp;<a href="{U_SEARCH}"><img src="{T_THEME_PATH}/images/icon_mini_search.gif" width="12" height="13" alt="*" /> {L_SEARCH}</a><!-- ENDIF -->
<!-- IF not S_IS_BOT -->
<!-- IF S_DISPLAY_MEMBERLIST -->&nbsp; &nbsp;<a href="{U_MEMBERLIST}"><img src="{T_THEME_PATH}/images/icon_mini_members.gif" width="12" height="13" alt="*" /> {L_MEMBERLIST}</a><!-- ENDIF -->
<!-- IF S_USER_LOGGED_IN -->&nbsp; &nbsp;<a href="{U_PROFILE}"><img src="{T_THEME_PATH}/images/icon_mini_profile.gif" width="12" height="13" alt="*" /> {L_PROFILE}</a><!-- ENDIF -->
<!-- ENDIF -->
+ <!-- EVENT overall_header_navigation_append -->
</td>
</tr>
</table>
@@ -204,6 +237,9 @@ function marklist(id, name, state)
<br style="clear: both;" />
+ <!-- DEFINE $S_MICRODATA = 1 -->
<!-- INCLUDE breadcrumbs.html -->
+ <!-- DEFINE $S_MICRODATA = 0 -->
<br />
+ <!-- EVENT overall_header_content_before -->
diff --git a/phpBB/styles/subsilver2/template/pagination.html b/phpBB/styles/subsilver2/template/pagination.html
index bf9c854d9a..550b28d305 100644
--- a/phpBB/styles/subsilver2/template/pagination.html
+++ b/phpBB/styles/subsilver2/template/pagination.html
@@ -1 +1,11 @@
-<!-- IF PAGINATION --><b><a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{L_GOTO_PAGE}</a> <!-- IF PREVIOUS_PAGE --><a href="{PREVIOUS_PAGE}">{L_PREVIOUS}</a>&nbsp;&nbsp;<!-- ENDIF -->{PAGINATION}<!-- IF NEXT_PAGE --> &nbsp;<a href="{NEXT_PAGE}">{L_NEXT}</a><!-- ENDIF --></b><!-- ENDIF --> \ No newline at end of file
+<!-- IF .pagination -->
+ <!-- IF BASE_URL --><b><a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{L_GOTO_PAGE}</a></b><!-- ENDIF -->
+ <!-- BEGIN pagination -->
+ <!-- IF pagination.S_IS_PREV --><a href="{pagination.PAGE_URL}">{L_PREVIOUS}</a>
+ <!-- ELSEIF pagination.S_IS_CURRENT --><strong>{pagination.PAGE_NUMBER}</strong>
+ <!-- ELSEIF pagination.S_IS_ELLIPSIS --> {L_ELLIPSIS}
+ <!-- ELSEIF pagination.S_IS_NEXT --><a href="{pagination.PAGE_URL}">{L_NEXT}</a>
+ <!-- ELSE --><a href="{pagination.PAGE_URL}">{pagination.PAGE_NUMBER}</a>
+ <!-- ENDIF -->
+ <!-- END pagination -->
+<!-- ENDIF -->
diff --git a/phpBB/styles/subsilver2/template/posting_body.html b/phpBB/styles/subsilver2/template/posting_body.html
index 8e9934c173..321e4227ee 100644
--- a/phpBB/styles/subsilver2/template/posting_body.html
+++ b/phpBB/styles/subsilver2/template/posting_body.html
@@ -5,7 +5,7 @@
<!-- ENDIF -->
<!-- IF S_FORUM_RULES -->
- <div class="forumrules">
+ <div class="forumrules<!-- IF U_FORUM_RULES --> rules-link<!-- ENDIF -->">
<!-- IF U_FORUM_RULES -->
<h3>{L_FORUM_RULES}</h3><br />
<a href="{U_FORUM_RULES}"><b>{L_FORUM_RULES_LINK}</b></a>
@@ -23,10 +23,10 @@
<h2><!-- IF TOPIC_TITLE --><a class="titles" href="{U_VIEW_TOPIC}">{TOPIC_TITLE}</a><!-- ELSE --><a class="titles" href="{U_VIEW_FORUM}">{FORUM_NAME}</a><!-- ENDIF --></h2>
<!-- IF MODERATORS -->
- <p class="moderators">{L_MODERATORS}: {MODERATORS}</p>
+ <p class="moderators">{L_MODERATORS}{L_COLON} {MODERATORS}</p>
<!-- ENDIF -->
- <!-- IF U_MCP -->
- <p class="linkmcp">[ <a href="{U_MCP}">{L_MCP}</a> ]</p>
+ <!-- IF U_MCP or U_ACP -->
+ <p class="linkmcp">[&nbsp;<!-- IF U_ACP --><a href="{U_ACP}">{L_ACP}</a><!-- IF U_MCP -->&nbsp;|&nbsp;<!-- ENDIF --><!-- ENDIF --><!-- IF U_MCP --><a href="{U_MCP}">{L_MCP}</a><!-- ENDIF -->&nbsp;]</p>
<!-- ENDIF -->
</div>
@@ -69,8 +69,8 @@
<td class="postdetails" style="padding: 4px;">{draftrow.DATE}</td>
<td style="padding: 4px;"><b class="gen">{draftrow.DRAFT_SUBJECT}</b>
- <!-- IF draftrow.S_LINK_TOPIC --><br /><span class="gensmall">{L_TOPIC}: <a href="{draftrow.U_VIEW}">{draftrow.TITLE}</a></span>
- <!-- ELSEIF draftrow.S_LINK_FORUM --><br /><span class="gensmall">{L_FORUM}: <a href="{draftrow.U_VIEW}">{draftrow.TITLE}</a></span>
+ <!-- IF draftrow.S_LINK_TOPIC --><br /><span class="gensmall">{L_TOPIC}{L_COLON} <a href="{draftrow.U_VIEW}">{draftrow.TITLE}</a></span>
+ <!-- ELSEIF draftrow.S_LINK_FORUM --><br /><span class="gensmall">{L_FORUM}{L_COLON} <a href="{draftrow.U_VIEW}">{draftrow.TITLE}</a></span>
<!-- ELSEIF draftrow.S_LINK_PM --><br /><span class="gensmall">{L_PRIVATE_MESSAGE}</span>
<!-- ELSE --><br /><span class="gensmall">{L_NO_TOPIC_FORUM}</span><!-- ENDIF -->
</td>
@@ -114,16 +114,9 @@
</tr>
<!-- ENDIF -->
-<!-- IF S_DELETE_ALLOWED -->
- <tr>
- <td class="row1"><b class="genmed">{L_DELETE_POST}:</b></td>
- <td class="row2"><input type="checkbox" class="radio" name="delete" /> <span class="gensmall">[ {L_DELETE_POST_WARN} ]</span></td>
- </tr>
-<!-- ENDIF -->
-
<!-- IF S_SHOW_TOPIC_ICONS or S_SHOW_PM_ICONS -->
<tr>
- <td class="row1"><b class="genmed">{L_ICON}:</b></td>
+ <td class="row1"><b class="genmed">{L_ICON}{L_COLON}</b></td>
<td class="row2">
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
@@ -136,14 +129,14 @@
<!-- IF not S_PRIVMSGS and S_DISPLAY_USERNAME -->
<tr>
- <td class="row1"><b class="genmed">{L_USERNAME}:</b></td>
+ <td class="row1"><b class="genmed">{L_USERNAME}{L_COLON}</b></td>
<td class="row2"><input class="post" type="text" tabindex="1" name="username" size="25" value="{USERNAME}" /></td>
</tr>
<!-- ENDIF -->
<!-- IF S_PRIVMSGS -->
<tr>
- <td class="row1"><b class="genmed">{L_TO}:</b></td>
+ <td class="row1"><b class="genmed">{L_TO}{L_COLON}</b></td>
<td class="row2">
{S_HIDDEN_ADDRESS_FIELD}
<!-- BEGIN to_recipient -->
@@ -157,7 +150,7 @@
</tr>
<!-- IF S_ALLOW_MASS_PM -->
<tr>
- <td class="row1"><b class="genmed">{L_BCC}:</b></td>
+ <td class="row1"><b class="genmed">{L_BCC}{L_COLON}</b></td>
<td class="row2">
<!-- BEGIN bcc_recipient -->
<span class="genmed nowrap"><strong>
@@ -170,13 +163,14 @@
</tr>
<!-- ENDIF -->
<!-- ENDIF -->
-
+<!-- EVENT posting_editor_subject_before -->
<tr>
- <td class="row1" width="22%"><b class="genmed">{L_SUBJECT}:</b></td>
- <td class="row2" width="78%"><input class="post" style="width:450px" type="text" name="subject" size="45" maxlength="<!-- IF S_NEW_MESSAGE -->60<!-- ELSE -->64<!-- ENDIF -->" tabindex="2" value="{SUBJECT}" /></td>
+ <td class="row1" width="22%"><b class="genmed">{L_SUBJECT}{L_COLON}</b></td>
+ <td class="row2" width="78%"><input class="post" style="width:450px" type="text" name="subject" size="45" maxlength="<!-- IF S_NEW_MESSAGE -->120<!-- ELSE -->124<!-- ENDIF -->" tabindex="2" value="{SUBJECT}" /></td>
</tr>
+<!-- EVENT posting_editor_subject_after -->
<tr>
- <td class="row1" valign="top"><b class="genmed">{L_MESSAGE_BODY}:</b><br /><span class="gensmall">{L_MESSAGE_BODY_EXPLAIN}&nbsp;</span><br /><br />
+ <td class="row1" valign="top"><b class="genmed">{L_MESSAGE_BODY}{L_COLON}</b><br /><span class="gensmall">{L_MESSAGE_BODY_EXPLAIN}&nbsp;</span><br /><br />
<!-- IF S_SMILIES_ALLOWED -->
<table width="100%" cellspacing="5" cellpadding="0" border="0" align="center">
<tr>
@@ -209,32 +203,29 @@
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<!-- INCLUDE posting_buttons.html -->
+ <!-- EVENT posting_editor_message_before -->
<tr>
<td valign="top" style="width: 100%;"><textarea name="message" rows="15" cols="76" tabindex="3" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);" onfocus="initInsertions();" style="width: 700px; height: 270px; min-width: 98%; max-width: 98%;">{MESSAGE}</textarea></td>
<!-- IF S_BBCODE_ALLOWED -->
- <td width="80" align="center" valign="top">
- <script type="text/javascript">
- // <![CDATA[
- colorPalette('v', 7, 6)
- // ]]>
- </script>
+ <td width="80" align="center" valign="top" id="color_palette_placeholder" data-orientation="v" data-width="11" data-height="10" data-bbcode="true">
</td>
<!-- ENDIF -->
</tr>
+ <!-- EVENT posting_editor_message_after -->
</table>
</td>
</tr>
<!-- IF S_INLINE_ATTACHMENT_OPTIONS -->
<tr>
- <td class="row1"><b class="genmed">{L_ATTACHMENTS}:</b></td>
+ <td class="row1"><b class="genmed">{L_ATTACHMENTS}{L_COLON}</b></td>
<td class="row2"><select name="attachments">{S_INLINE_ATTACHMENT_OPTIONS}</select>&nbsp;<input type="button" class="btnbbcode" accesskey="a" value="{L_PLACE_INLINE}" name="attachinline" onclick="attach_form = document.forms[form_name].elements['attachments']; attach_inline(attach_form.value, attach_form.options[attach_form.selectedIndex].text);" onmouseover="helpline('a')" onmouseout="helpline('tip')" />
</td>
</tr>
<!-- ENDIF -->
<tr>
- <td class="row1" valign="top"><b class="genmed">{L_OPTIONS}:</b><br />
+ <td class="row1" valign="top"><b class="genmed">{L_OPTIONS}{L_COLON}</b><br />
<table cellspacing="2" cellpadding="0" border="0">
<tr>
<td class="gensmall">{BBCODE_STATUS}</td>
@@ -257,6 +248,7 @@
</td>
<td class="row2">
<table cellpadding="1">
+ <!-- EVENT posting_editor_options_prepend -->
<!-- IF S_BBCODE_ALLOWED -->
<tr>
<td><input type="checkbox" class="radio" name="disable_bbcode"{S_BBCODE_CHECKED} /></td>
@@ -309,8 +301,8 @@
<!-- IF S_TYPE_TOGGLE -->
<tr>
- <td>&nbsp;</td>
- <td class="gen"><!-- IF S_EDIT_POST -->{L_CHANGE_TOPIC_TO}<!-- ELSE -->{L_POST_TOPIC_AS}<!-- ENDIF -->: <!-- BEGIN topic_type --><input type="radio" class="radio" name="topic_type" value="{topic_type.VALUE}"{topic_type.S_CHECKED} />{topic_type.L_TOPIC_TYPE}&nbsp;&nbsp;<!-- END topic_type --></td>
+ <td></td>
+ <td class="gen"><!-- IF S_EDIT_POST -->{L_CHANGE_TOPIC_TO}<!-- ELSE -->{L_POST_TOPIC_AS}<!-- ENDIF -->{L_COLON} <!-- BEGIN topic_type --><input type="radio" class="radio" name="topic_type" value="{topic_type.VALUE}"{topic_type.S_CHECKED} />{topic_type.L_TOPIC_TYPE}&nbsp;&nbsp;<!-- END topic_type --></td>
</tr>
<!-- ENDIF -->
<!-- ENDIF -->
@@ -318,16 +310,36 @@
</td>
</tr>
+<!-- IF S_SOFTDELETE_ALLOWED or S_DELETE_ALLOWED -->
+ <tr>
+ <td class="row1" valign="top"><b class="genmed">{L_DELETE_POST}{L_COLON}</b></td>
+ <td class="row2">
+ <table cellpadding="1">
+ <tr>
+ <td><input type="checkbox" class="radio" name="delete" /></td>
+ <td class="gen">{L_DELETE_POST_WARN}</td>
+ </tr>
+ <!-- IF S_SOFTDELETE_ALLOWED and S_DELETE_ALLOWED -->
+ <tr>
+ <td><input type="checkbox" class="radio" name="delete_permanent" /></td>
+ <td class="gen">{L_DELETE_POST_PERMANENTLY}</td>
+ </tr>
+ <!-- ENDIF -->
+ </table>
+ </td>
+ </tr>
+<!-- ENDIF -->
+
<!-- IF S_TOPIC_TYPE_ANNOUNCE or S_TOPIC_TYPE_STICKY -->
<tr>
- <td class="row1"><b class="genmed">{L_STICK_TOPIC_FOR}:</b><br /><span class="gensmall">{L_STICKY_ANNOUNCE_TIME_LIMIT}</span></td>
- <td class="row2"><input class="post" type="text" name="topic_time_limit" size="3" maxlength="3" value="{TOPIC_TIME_LIMIT}" />&nbsp;<b class="gen">{L_DAYS}</b> <span class="gensmall">{L_STICK_TOPIC_FOR_EXPLAIN}</span></td>
+ <td class="row1"><b class="genmed">{L_STICK_TOPIC_FOR}{L_COLON}</b><br /><span class="gensmall">{L_STICKY_ANNOUNCE_TIME_LIMIT}</span></td>
+ <td class="row2"><input class="post" type="number" min="0" max="999" name="topic_time_limit" size="3" maxlength="3" value="{TOPIC_TIME_LIMIT}" />&nbsp;<b class="gen">{L_DAYS}</b> <span class="gensmall">{L_STICK_TOPIC_FOR_EXPLAIN}</span></td>
</tr>
<!-- ENDIF -->
<!-- IF S_EDIT_REASON -->
<tr>
- <td class="row1" valign="top"><b class="genmed">{L_EDIT_REASON}:</b></td>
+ <td class="row1" valign="top"><b class="genmed">{L_EDIT_REASON}{L_COLON}</b></td>
<td class="row2"><input class="post" type="text" name="edit_reason" size="50" value="{EDIT_REASON}" /></td>
</tr>
<!-- ENDIF -->
@@ -355,7 +367,7 @@
<!-- INCLUDE posting_poll_body.html -->
<!-- ELSEIF S_POLL_DELETE -->
<tr>
- <td class="row1"><span class="genmed"><b>{L_POLL_DELETE}:</b></span></td>
+ <td class="row1"><span class="genmed"><b>{L_POLL_DELETE}{L_COLON}</b></span></td>
<td class="row2"><input type="checkbox" class="radio" name="poll_delete" /></td>
</tr>
<!-- ENDIF -->
@@ -411,4 +423,4 @@
</table>
<!-- INCLUDE overall_footer.html -->
-<!-- ENDIF --> \ No newline at end of file
+<!-- ENDIF -->
diff --git a/phpBB/styles/subsilver2/template/posting_buttons.html b/phpBB/styles/subsilver2/template/posting_buttons.html
index cfe69dee56..d1c0f79a16 100644
--- a/phpBB/styles/subsilver2/template/posting_buttons.html
+++ b/phpBB/styles/subsilver2/template/posting_buttons.html
@@ -33,29 +33,31 @@
// ]]>
</script>
- <script type="text/javascript" src="{T_SUPER_TEMPLATE_PATH}/editor.js"></script>
+ <!-- INCLUDEJS {T_ASSETS_PATH}/javascript/editor.js -->
<!-- IF S_BBCODE_ALLOWED -->
- <input type="button" class="btnbbcode" accesskey="b" name="addbbcode0" value=" B " style="font-weight:bold; width: 30px;" onclick="bbstyle(0)" onmouseover="helpline('b')" onmouseout="helpline('tip')" />
- <input type="button" class="btnbbcode" accesskey="i" name="addbbcode2" value=" i " style="font-style:italic; width: 30px;" onclick="bbstyle(2)" onmouseover="helpline('i')" onmouseout="helpline('tip')" />
- <input type="button" class="btnbbcode" accesskey="u" name="addbbcode4" value=" u " style="text-decoration: underline; width: 30px;" onclick="bbstyle(4)" onmouseover="helpline('u')" onmouseout="helpline('tip')" />
+ <!-- EVENT posting_editor_buttons_before -->
+ <div id="core-bbcode-buttons">
+ <input type="button" class="btnbbcode bbcode-b" accesskey="b" name="addbbcode0" value=" B " style="font-weight:bold; width: 30px;" onclick="bbstyle(0)" onmouseover="helpline('b')" onmouseout="helpline('tip')" />
+ <input type="button" class="btnbbcode bbcode-i" accesskey="i" name="addbbcode2" value=" i " style="font-style:italic; width: 30px;" onclick="bbstyle(2)" onmouseover="helpline('i')" onmouseout="helpline('tip')" />
+ <input type="button" class="btnbbcode bbcode-u" accesskey="u" name="addbbcode4" value=" u " style="text-decoration: underline; width: 30px;" onclick="bbstyle(4)" onmouseover="helpline('u')" onmouseout="helpline('tip')" />
<!-- IF S_BBCODE_QUOTE -->
- <input type="button" class="btnbbcode" accesskey="q" name="addbbcode6" value="Quote" style="width: 50px" onclick="bbstyle(6)" onmouseover="helpline('q')" onmouseout="helpline('tip')" />
+ <input type="button" class="btnbbcode bbcode-quote" accesskey="q" name="addbbcode6" value="Quote" style="width: 50px" onclick="bbstyle(6)" onmouseover="helpline('q')" onmouseout="helpline('tip')" />
<!-- ENDIF -->
- <input type="button" class="btnbbcode" accesskey="c" name="addbbcode8" value="Code" style="width: 40px" onclick="bbstyle(8)" onmouseover="helpline('c')" onmouseout="helpline('tip')" />
- <input type="button" class="btnbbcode" accesskey="l" name="addbbcode10" value="List" style="width: 40px" onclick="bbstyle(10)" onmouseover="helpline('l')" onmouseout="helpline('tip')" />
- <input type="button" class="btnbbcode" accesskey="o" name="addbbcode12" value="List=" style="width: 40px" onclick="bbstyle(12)" onmouseover="helpline('o')" onmouseout="helpline('tip')" />
- <input type="button" class="btnbbcode" accesskey="y" name="addlistitem" value="[*]" style="width: 40px" onclick="bbstyle(-1)" onmouseover="helpline('e')" onmouseout="helpline('tip')" />
+ <input type="button" class="btnbbcode bbcode-code" accesskey="c" name="addbbcode8" value="Code" style="width: 40px" onclick="bbstyle(8)" onmouseover="helpline('c')" onmouseout="helpline('tip')" />
+ <input type="button" class="btnbbcode bbcode-list" accesskey="l" name="addbbcode10" value="List" style="width: 40px" onclick="bbstyle(10)" onmouseover="helpline('l')" onmouseout="helpline('tip')" />
+ <input type="button" class="btnbbcode bbcode-list-" accesskey="o" name="addbbcode12" value="List=" style="width: 40px" onclick="bbstyle(12)" onmouseover="helpline('o')" onmouseout="helpline('tip')" />
+ <input type="button" class="btnbbcode bbcode-asterisk" accesskey="y" name="addlistitem" value="[*]" style="width: 40px" onclick="bbstyle(-1)" onmouseover="helpline('e')" onmouseout="helpline('tip')" />
<!-- IF S_BBCODE_IMG -->
- <input type="button" class="btnbbcode" accesskey="p" name="addbbcode14" value="Img" style="width: 40px" onclick="bbstyle(14)" onmouseover="helpline('p')" onmouseout="helpline('tip')" />
+ <input type="button" class="btnbbcode bbcode-img" accesskey="p" name="addbbcode14" value="Img" style="width: 40px" onclick="bbstyle(14)" onmouseover="helpline('p')" onmouseout="helpline('tip')" />
<!-- ENDIF -->
<!-- IF S_LINKS_ALLOWED -->
- <input type="button" class="btnbbcode" accesskey="w" name="addbbcode16" value="URL" style="text-decoration: underline; width: 40px" onclick="bbstyle(16)" onmouseover="helpline('w')" onmouseout="helpline('tip')" />
+ <input type="button" class="btnbbcode bbcode-url" accesskey="w" name="addbbcode16" value="URL" style="text-decoration: underline; width: 40px" onclick="bbstyle(16)" onmouseover="helpline('w')" onmouseout="helpline('tip')" />
<!-- ENDIF -->
<!-- IF S_BBCODE_FLASH -->
- <input type="button" class="btnbbcode" accesskey="d" name="addbbcode18" value="Flash" onclick="bbstyle(18)" onmouseover="helpline('d')" onmouseout="helpline('tip')" />
+ <input type="button" class="btnbbcode bbcode-flash" accesskey="d" name="addbbcode18" value="Flash" onclick="bbstyle(18)" onmouseover="helpline('d')" onmouseout="helpline('tip')" />
<!-- ENDIF -->
- <span class="genmed nowrap">{L_FONT_SIZE}: <select class="gensmall" name="addbbcode20" onchange="bbfontstyle('[size=' + this.form.addbbcode20.options[this.form.addbbcode20.selectedIndex].value + ']', '[/size]');this.form.addbbcode20.selectedIndex = 2;" onmouseover="helpline('f')" onmouseout="helpline('tip')">
+ <span class="genmed nowrap">{L_FONT_SIZE}{L_COLON} <select class="gensmall bbcode-size" name="addbbcode20" onchange="bbfontstyle('[size=' + this.form.addbbcode20.options[this.form.addbbcode20.selectedIndex].value + ']', '[/size]');this.form.addbbcode20.selectedIndex = 2;" onmouseover="helpline('f')" onmouseout="helpline('tip')">
<option value="50">{L_FONT_TINY}</option>
<option value="85">{L_FONT_SMALL}</option>
<option value="100" selected="selected">{L_FONT_NORMAL}</option>
@@ -66,15 +68,19 @@
<!-- ENDIF -->
<!-- ENDIF -->
</select></span>
+ </div>
+ <!-- EVENT posting_editor_buttons_after -->
<!-- ENDIF -->
</td>
</tr>
<!-- IF S_BBCODE_ALLOWED and .custom_tags -->
<tr valign="middle" align="{S_CONTENT_FLOW_BEGIN}">
<td colspan="2">
+ <div id="custom-bbcode-buttons">
<!-- BEGIN custom_tags -->
- <input type="button" class="btnbbcode" name="addbbcode{custom_tags.BBCODE_ID}" value="{custom_tags.BBCODE_TAG}" onclick="bbstyle({custom_tags.BBCODE_ID})"<!-- IF custom_tags.BBCODE_HELPLINE !== '' --> onmouseover="helpline('cb_{custom_tags.BBCODE_ID}')" onmouseout="helpline('tip')"<!-- ENDIF --> />
+ <input type="button" class="btnbbcode bbcode-{custom_tags.BBCODE_TAG_CLEAN}" name="addbbcode{custom_tags.BBCODE_ID}" value="{custom_tags.BBCODE_TAG}" onclick="bbstyle({custom_tags.BBCODE_ID})"<!-- IF custom_tags.BBCODE_HELPLINE !== '' --> onmouseover="helpline('cb_{custom_tags.BBCODE_ID}')" onmouseout="helpline('tip')"<!-- ENDIF --> />
<!-- END custom_tags -->
+ </div>
</td>
</tr>
<!-- ENDIF -->
diff --git a/phpBB/styles/subsilver2/template/posting_poll_body.html b/phpBB/styles/subsilver2/template/posting_poll_body.html
index 3a523182f7..67996eaf33 100644
--- a/phpBB/styles/subsilver2/template/posting_poll_body.html
+++ b/phpBB/styles/subsilver2/template/posting_poll_body.html
@@ -6,31 +6,31 @@
<td class="row3" colspan="2"><span class="gensmall">{L_ADD_POLL_EXPLAIN}</span></td>
</tr>
<tr>
- <td class="row1"><b class="genmed">{L_POLL_QUESTION}:</b></td>
+ <td class="row1"><b class="genmed">{L_POLL_QUESTION}{L_COLON}</b></td>
<td class="row2"><input class="post" type="text" name="poll_title" size="50" maxlength="255" value="{POLL_TITLE}" /></td>
</tr>
<tr>
- <td class="row1"><b class="genmed">{L_POLL_OPTIONS}:</b><br /><span class="gensmall">{L_POLL_OPTIONS_EXPLAIN}</span></td>
+ <td class="row1"><b class="genmed">{L_POLL_OPTIONS}{L_COLON}</b><br /><span class="gensmall">{L_POLL_OPTIONS_EXPLAIN}</span></td>
<td class="row2"><textarea style="width:450px" name="poll_option_text" rows="5" cols="35">{POLL_OPTIONS}</textarea></td>
</tr>
<tr>
- <td class="row1"><b class="genmed">{L_POLL_MAX_OPTIONS}:</b><br /><span class="gensmall">{L_POLL_MAX_OPTIONS_EXPLAIN}</span></td>
- <td class="row2"><input class="post" type="text" name="poll_max_options" size="3" maxlength="3" value="{POLL_MAX_OPTIONS}" /></td>
+ <td class="row1"><b class="genmed">{L_POLL_MAX_OPTIONS}{L_COLON}</b><br /><span class="gensmall">{L_POLL_MAX_OPTIONS_EXPLAIN}</span></td>
+ <td class="row2"><input class="post" type="number" min="1" max="999" name="poll_max_options" size="3" maxlength="3" value="{POLL_MAX_OPTIONS}" /></td>
</tr>
<tr>
- <td class="row1"><b class="genmed">{L_POLL_FOR}:</b></td>
- <td class="row2"><input class="post" type="text" name="poll_length" size="3" maxlength="3" value="{POLL_LENGTH}" />&nbsp;<b class="gen">{L_DAYS}</b> <span class="gensmall">{L_POLL_FOR_EXPLAIN}</span></td>
+ <td class="row1"><b class="genmed">{L_POLL_FOR}{L_COLON}</b></td>
+ <td class="row2"><input class="post" type="number" min="0" max="999" name="poll_length" size="3" maxlength="3" value="{POLL_LENGTH}" />&nbsp;<b class="gen">{L_DAYS}</b> <span class="gensmall">{L_POLL_FOR_EXPLAIN}</span></td>
</tr>
<!-- IF S_POLL_VOTE_CHANGE -->
<tr>
- <td class="row1"><b class="genmed">{L_POLL_VOTE_CHANGE}:</b><br /><span class="gensmall">{L_POLL_VOTE_CHANGE_EXPLAIN}</span></td>
+ <td class="row1"><b class="genmed">{L_POLL_VOTE_CHANGE}{L_COLON}</b><br /><span class="gensmall">{L_POLL_VOTE_CHANGE_EXPLAIN}</span></td>
<td class="row2"><input type="checkbox" class="radio" name="poll_vote_change"{VOTE_CHANGE_CHECKED} /></td>
</tr>
<!-- ENDIF -->
<!-- IF S_POLL_DELETE -->
<tr>
- <td class="row1"><b class="genmed">{L_POLL_DELETE}:</b></td>
+ <td class="row1"><b class="genmed">{L_POLL_DELETE}{L_COLON}</b></td>
<td class="row2"><input type="checkbox" class="radio" name="poll_delete"<!-- IF S_POLL_DELETE_CHECKED --> checked="checked"<!-- ENDIF --> /></td>
</tr>
<!-- ENDIF -->
diff --git a/phpBB/styles/subsilver2/template/posting_preview.html b/phpBB/styles/subsilver2/template/posting_preview.html
index b990428f36..b0dbef6a5a 100644
--- a/phpBB/styles/subsilver2/template/posting_preview.html
+++ b/phpBB/styles/subsilver2/template/posting_preview.html
@@ -4,7 +4,7 @@
<th>{L_PREVIEW}</th>
</tr>
<tr>
- <td class="row1">{MINI_POST_IMG}<span class="postdetails">{L_POSTED}: {POST_DATE} &nbsp;&nbsp;&nbsp; {L_POST_SUBJECT}: {PREVIEW_SUBJECT}</span></td>
+ <td class="row1">{MINI_POST_IMG}<span class="postdetails">{L_POSTED}{L_COLON} {POST_DATE} &nbsp;&nbsp;&nbsp; {L_POST_SUBJECT}{L_COLON} {PREVIEW_SUBJECT}</span></td>
</tr>
<!-- IF S_HAS_POLL_OPTIONS -->
<tr>
@@ -48,7 +48,7 @@
<table class="tablebg" width="100%" cellspacing="1">
<tr>
- <td class="row3"><b class="genmed">{L_ATTACHMENTS}: </b></td>
+ <td class="row3"><b class="genmed">{L_ATTACHMENTS}{L_COLON} </b></td>
</tr>
<!-- BEGIN attachment -->
<tr>
diff --git a/phpBB/styles/subsilver2/template/posting_review.html b/phpBB/styles/subsilver2/template/posting_review.html
index 13e895e95a..baf159aecd 100644
--- a/phpBB/styles/subsilver2/template/posting_review.html
+++ b/phpBB/styles/subsilver2/template/posting_review.html
@@ -34,7 +34,7 @@
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
<td>&nbsp;</td>
- <td class="gensmall" valign="middle" nowrap="nowrap"><b>{L_POST_SUBJECT}:</b>&nbsp;</td>
+ <td class="gensmall" valign="middle" nowrap="nowrap"><b>{L_POST_SUBJECT}{L_COLON}</b>&nbsp;</td>
<td class="gensmall" width="100%" valign="middle">{post_review_row.POST_SUBJECT}</td>
<td>&nbsp;</td>
</tr>
@@ -57,7 +57,7 @@
<table class="tablebg" width="100%" cellspacing="1">
<tr>
- <td class="row3"><b class="genmed">{L_ATTACHMENTS}: </b></td>
+ <td class="row3"><b class="genmed">{L_ATTACHMENTS}{L_COLON} </b></td>
</tr>
<!-- BEGIN attachment -->
<tr>
@@ -77,8 +77,8 @@
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<tr valign="middle">
<td width="100%">&nbsp;</td>
- <td width="10" nowrap="nowrap"><!-- IF S_IS_BOT -->{post_review_row.MINI_POST_IMG}<!-- ELSE --><a href="{post_review_row.U_MINI_POST}">{post_review_row.MINI_POST_IMG}</a><!-- ENDIF --></td>
- <td class="gensmall" nowrap="nowrap"><b>{L_POSTED}:</b> {post_review_row.POST_DATE}</td>
+ <td width="10" nowrap="nowrap"><!-- IF S_IS_BOT -->{post_review_row.MINI_POST_IMG}<!-- ELSE --><a href="{post_review_row.U_MINI_POST}" class="imageset">{post_review_row.MINI_POST_IMG}</a><!-- ENDIF --></td>
+ <td class="gensmall" nowrap="nowrap"><b>{L_POSTED}{L_COLON}</b> {post_review_row.POST_DATE}</td>
</tr>
</table>
</td>
@@ -96,4 +96,4 @@
</tr>
</table>
-<br clear="all" /> \ No newline at end of file
+<br clear="all" />
diff --git a/phpBB/styles/subsilver2/template/posting_smilies.html b/phpBB/styles/subsilver2/template/posting_smilies.html
index d2224887bc..0be71098db 100644
--- a/phpBB/styles/subsilver2/template/posting_smilies.html
+++ b/phpBB/styles/subsilver2/template/posting_smilies.html
@@ -6,7 +6,7 @@
var text_name = opener.text_name;
// ]]>
</script>
-<script type="text/javascript" src="{T_SUPER_TEMPLATE_PATH}/editor.js"></script>
+<!-- INCLUDEJS {T_ASSETS_PATH}/javascript/editor.js -->
<table width="100%" cellspacing="1" cellpadding="4" border="0">
<tr>
@@ -16,10 +16,23 @@
<th>{L_SMILIES}</th>
</tr>
<tr>
- <td class="row1" align="center" valign="middle"><!-- BEGIN smiley --> <a href="#" onclick="initInsertions(); insert_text('{smiley.A_SMILEY_CODE}', true, true); return false;"><img src="{smiley.SMILEY_IMG}" width="{smiley.SMILEY_WIDTH}" height="{smiley.SMILEY_HEIGHT}" alt="{smiley.SMILEY_CODE}" title="{smiley.SMILEY_DESC}" hspace="2" vspace="2" /></a> <!-- END smiley --><br />{PAGINATION}<br /><a class="nav" href="#" onclick="window.close(); return false;">{L_CLOSE_WINDOW}</a></td>
+ <td class="row1" align="center" valign="middle"><!-- BEGIN smiley --> <a href="#" onclick="initInsertions(); insert_text('{smiley.A_SMILEY_CODE}', true, true); return false;"><img src="{smiley.SMILEY_IMG}" width="{smiley.SMILEY_WIDTH}" height="{smiley.SMILEY_HEIGHT}" alt="{smiley.SMILEY_CODE}" title="{smiley.SMILEY_DESC}" hspace="2" vspace="2" /></a> <!-- END smiley --><br />
+ <!-- IF .pagination -->
+ <b><a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{L_GOTO_PAGE}</a>
+ <!-- BEGIN pagination -->
+ <!-- IF pagination.S_IS_PREV --><a href="{pagination.PAGE_URL}">{pagination.PAGE_NUMBER}</a>
+ <!-- ELSEIF pagination.S_IS_CURRENT --><strong>{pagination.PAGE_NUMBER}</strong>
+ <!-- ELSEIF pagination.S_IS_ELLIPSIS --> {L_ELLIPSIS}
+ <!-- ELSEIF pagination.S_IS_NEXT --><a href="{pagination.PAGE_URL}">{pagination.PAGE_NUMBER}</a>
+ <!-- ELSE --><a href="{pagination.PAGE_URL}">{pagination.PAGE_NUMBER}</a>
+ <!-- ENDIF -->
+ <!-- END pagination -->
+ <br />
+ <!-- ENDIF -->
+ <a class="nav" href="#" onclick="window.close(); return false;">{L_CLOSE_WINDOW}</a></td>
</tr>
</table>
</td>
</tr>
</table>
-<!-- INCLUDE simple_footer.html --> \ No newline at end of file
+<!-- INCLUDE simple_footer.html -->
diff --git a/phpBB/styles/subsilver2/template/posting_topic_review.html b/phpBB/styles/subsilver2/template/posting_topic_review.html
index 54bbf6e553..23ea56a216 100644
--- a/phpBB/styles/subsilver2/template/posting_topic_review.html
+++ b/phpBB/styles/subsilver2/template/posting_topic_review.html
@@ -34,9 +34,9 @@
<table width="100%" cellspacing="0">
<tr>
<td>&nbsp;</td>
- <td class="gensmall" valign="middle" nowrap="nowrap"><b>{L_POST_SUBJECT}:</b>&nbsp;</td>
+ <td class="gensmall" valign="middle" nowrap="nowrap"><b>{L_POST_SUBJECT}{L_COLON}</b>&nbsp;</td>
<td class="gensmall" width="100%" valign="middle">{topic_review_row.POST_SUBJECT}</td>
- <td valign="top" nowrap="nowrap">&nbsp;<!-- IF topic_review_row.POSTER_QUOTE and topic_review_row.DECODED_MESSAGE --><a href="#" onclick="addquote({topic_review_row.POST_ID},'{topic_review_row.POSTER_QUOTE}', '{LA_WROTE}'); return false;">{QUOTE_IMG}</a><!-- ENDIF --></td>
+ <td valign="top" nowrap="nowrap">&nbsp;<!-- IF topic_review_row.POSTER_QUOTE and topic_review_row.DECODED_MESSAGE --><a href="#" onclick="addquote({topic_review_row.POST_ID},'{topic_review_row.POSTER_QUOTE}', '{LA_WROTE}'); return false;" class="imageset">{QUOTE_IMG}</a><!-- ENDIF --></td>
</tr>
</table>
</td>
@@ -51,6 +51,13 @@
<table width="100%" cellspacing="0" cellpadding="2">
<tr>
<td>
+ <!-- IF topic_review_row.POST_ID == REPORTED_POST_ID -->
+ <table width="100%" cellspacing="0">
+ <tr>
+ <span class="postreported">{REPORTED_IMG}</span>
+ </tr>
+ </table>
+ <!-- ENDIF -->
<div class="postbody">{topic_review_row.MESSAGE}</div>
<!-- IF topic_review_row.S_HAS_ATTACHMENTS -->
@@ -58,7 +65,7 @@
<table class="tablebg" width="100%" cellspacing="1">
<tr>
- <td class="row3"><b class="genmed">{L_ATTACHMENTS}: </b></td>
+ <td class="row3"><b class="genmed">{L_ATTACHMENTS}{L_COLON} </b></td>
</tr>
<!-- BEGIN attachment -->
<tr>
@@ -81,8 +88,8 @@
<table width="100%" cellspacing="0">
<tr valign="middle">
<td width="100%" align="{S_CONTENT_FLOW_BEGIN}"><span class="gensmall"><!-- IF topic_review_row.U_MCP_DETAILS -->[ <a href="{topic_review_row.U_MCP_DETAILS}">{L_POST_DETAILS}</a> ]<!-- ENDIF --></span></td>
- <td width="10" nowrap="nowrap"><!-- IF S_IS_BOT -->{topic_review_row.MINI_POST_IMG}<!-- ELSE --><a href="{topic_review_row.U_MINI_POST}">{topic_review_row.MINI_POST_IMG}</a><!-- ENDIF --></td>
- <td class="gensmall" nowrap="nowrap"><b>{L_POSTED}:</b> {topic_review_row.POST_DATE}</td>
+ <td width="10" nowrap="nowrap"><!-- IF S_IS_BOT -->{topic_review_row.MINI_POST_IMG}<!-- ELSE --><a href="{topic_review_row.U_MINI_POST}" class="imageset">{topic_review_row.MINI_POST_IMG}</a><!-- ENDIF --></td>
+ <td class="gensmall" nowrap="nowrap"><b>{L_POSTED}{L_COLON}</b> {topic_review_row.POST_DATE}</td>
</tr>
</table>
</td>
@@ -100,4 +107,4 @@
</tr>
</table>
-<br clear="all" /> \ No newline at end of file
+<br clear="all" />
diff --git a/phpBB/styles/subsilver2/template/profilefields/bool.html b/phpBB/styles/subsilver2/template/profilefields/bool.html
new file mode 100644
index 0000000000..f57bd4e4da
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/profilefields/bool.html
@@ -0,0 +1,7 @@
+<!-- BEGIN bool -->
+ <!-- IF bool.FIELD_LENGTH eq 1 -->
+ <!-- BEGIN options --><input type="radio" class="radio" name="{bool.FIELD_IDENT}" value="{bool.options.OPTION_ID}"{bool.options.CHECKED} /><span class="genmed">{bool.options.VALUE}</span>&nbsp; &nbsp;<!-- END options -->
+ <!-- ELSE -->
+ <input type="checkbox" class="radio" name="{bool.FIELD_IDENT}" value="1"<!-- IF bool.FIELD_VALUE eq 1 --> checked="checked"<!-- ENDIF --> />
+ <!-- ENDIF -->
+<!-- END bool -->
diff --git a/phpBB/styles/subsilver2/template/profilefields/date.html b/phpBB/styles/subsilver2/template/profilefields/date.html
new file mode 100644
index 0000000000..e2da2463a5
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/profilefields/date.html
@@ -0,0 +1,5 @@
+<!-- BEGIN date -->
+<span class="genmed">{L_DAY}{L_COLON}</span> <select name="{date.FIELD_IDENT}_day">{date.S_DAY_OPTIONS}</select>
+<span class="genmed">{L_MONTH}{L_COLON}</span> <select name="{date.FIELD_IDENT}_month">{date.S_MONTH_OPTIONS}</select>
+<span class="genmed">{L_YEAR}{L_COLON}</span> <select name="{date.FIELD_IDENT}_year">{date.S_YEAR_OPTIONS}</select>
+<!-- END date -->
diff --git a/phpBB/styles/subsilver2/template/profilefields/dropdown.html b/phpBB/styles/subsilver2/template/profilefields/dropdown.html
new file mode 100644
index 0000000000..16242da895
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/profilefields/dropdown.html
@@ -0,0 +1,5 @@
+<!-- BEGIN dropdown -->
+<select name="{dropdown.FIELD_IDENT}">
+ <!-- BEGIN options --><option value="{dropdown.options.OPTION_ID}"{dropdown.options.SELECTED}>{dropdown.options.VALUE}</option><!-- END options -->
+</select>
+<!-- END dropdown -->
diff --git a/phpBB/styles/subsilver2/template/profilefields/int.html b/phpBB/styles/subsilver2/template/profilefields/int.html
new file mode 100644
index 0000000000..067921e320
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/profilefields/int.html
@@ -0,0 +1,3 @@
+<!-- BEGIN int -->
+ <input type="number" min="{int.FIELD_MINLEN}" max="{int.FIELD_MAXLEN}" class="post" name="{int.FIELD_IDENT}" size="{int.FIELD_LENGTH}" value="{int.FIELD_VALUE}" />
+<!-- END int -->
diff --git a/phpBB/styles/subsilver2/template/profilefields/string.html b/phpBB/styles/subsilver2/template/profilefields/string.html
new file mode 100644
index 0000000000..5a98562e2a
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/profilefields/string.html
@@ -0,0 +1,3 @@
+<!-- BEGIN string -->
+ <input type="text" class="post" name="{string.FIELD_IDENT}" size="{string.FIELD_LENGTH}" maxlength="{string.FIELD_MAXLEN}" value="{string.FIELD_VALUE}" />
+<!-- END string -->
diff --git a/phpBB/styles/subsilver2/template/profilefields/text.html b/phpBB/styles/subsilver2/template/profilefields/text.html
new file mode 100644
index 0000000000..df2474ad3e
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/profilefields/text.html
@@ -0,0 +1,3 @@
+<!-- BEGIN text -->
+<textarea name="{text.FIELD_IDENT}" rows="{text.FIELD_ROWS}" cols="{text.FIELD_COLS}">{text.FIELD_VALUE}</textarea>
+<!-- END text -->
diff --git a/phpBB/styles/subsilver2/template/profilefields/url.html b/phpBB/styles/subsilver2/template/profilefields/url.html
new file mode 100644
index 0000000000..42805aa98d
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/profilefields/url.html
@@ -0,0 +1,3 @@
+<!-- BEGIN url -->
+ <input type="url" class="post" name="{url.FIELD_IDENT}" id="{url.FIELD_IDENT}" size="{url.FIELD_LENGTH}" maxlength="{url.FIELD_MAXLEN}" value="{url.FIELD_VALUE}" />
+<!-- END url -->
diff --git a/phpBB/styles/subsilver2/template/quickreply_editor.html b/phpBB/styles/subsilver2/template/quickreply_editor.html
index 91a8c9a702..5afc723f48 100644
--- a/phpBB/styles/subsilver2/template/quickreply_editor.html
+++ b/phpBB/styles/subsilver2/template/quickreply_editor.html
@@ -1,27 +1,29 @@
<form method="post" action="{U_QR_ACTION}">
-
+<!-- EVENT quickreply_editor_panel_before -->
<table class="tablebg" width="100%" cellspacing="1">
<tr>
<th align="center" colspan="2">{L_QUICKREPLY}</th>
</tr>
<tr>
- <td class="row1" width="22%"><b class="genmed">{L_SUBJECT}:</b></td>
- <td class="row2" width="78%"><input class="post" style="width:450px" type="text" name="subject" size="45" maxlength="64" tabindex="2" value="{SUBJECT}" /></td>
+ <td class="row1" width="22%"><b class="genmed">{L_SUBJECT}{L_COLON}</b></td>
+ <td class="row2" width="78%"><input class="post" style="width:450px" type="text" name="subject" size="45" maxlength="124" tabindex="2" value="{SUBJECT}" /></td>
</tr>
+ <!-- EVENT quickreply_editor_message_before -->
<tr>
- <td class="row1" width="22%"><b class="genmed">{L_MESSAGE}:</b></td>
+ <td class="row1" width="22%"><b class="genmed">{L_MESSAGE}{L_COLON}</b></td>
<td class="row2" valign="top" align="left" width="78%"><textarea name="message" rows="7" cols="76" tabindex="3" style="width: 700px; height: 130px; min-width: 98%; max-width: 98%;"></textarea> </td>
</tr>
+ <!-- EVENT quickreply_editor_message_after -->
<tr>
<td class="cat" colspan="2" align="center">
- <input class="btnmain" type="submit" accesskey="s" tabindex="6" name="post" value="{L_SUBMIT}" />&nbsp;
- <input class="btnlite" type="submit" accesskey="f" tabindex="7" name="full_editor" value="{L_FULL_EDITOR}" />
+ <input class="btnlite" type="submit" accesskey="f" tabindex="6" name="preview" value="{L_FULL_EDITOR}" />&nbsp;
+ <input class="btnmain" type="submit" accesskey="s" tabindex="7" name="post" value="{L_SUBMIT}" />
{S_FORM_TOKEN}
{QR_HIDDEN_FIELDS}
</td>
</tr>
</table>
-
+<!-- EVENT quickreply_editor_panel_after -->
</form>
-<br clear="all" /> \ No newline at end of file
+<br clear="all" />
diff --git a/phpBB/styles/subsilver2/template/report_body.html b/phpBB/styles/subsilver2/template/report_body.html
index 57747ffac0..906a957ef4 100644
--- a/phpBB/styles/subsilver2/template/report_body.html
+++ b/phpBB/styles/subsilver2/template/report_body.html
@@ -15,19 +15,19 @@
<td class="row3" colspan="2"><span class="gensmall"><!-- IF S_REPORT_POST -->{L_REPORT_POST_EXPLAIN}<!-- ELSE -->{L_REPORT_MESSAGE_EXPLAIN}<!-- ENDIF --></span></td>
</tr>
<tr>
- <td class="row1" width="22%"><b class="gen">{L_REASON}:</b></td>
+ <td class="row1" width="22%"><b class="gen">{L_REASON}{L_COLON}</b></td>
<td class="row2" width="78%"><select name="reason_id">
<!-- BEGIN reason --><option value="{reason.ID}"<!-- IF reason.S_SELECTED --> selected="selected"<!-- ENDIF -->>{reason.TITLE} &raquo; {reason.DESCRIPTION}</option><!-- END reason -->
</select></td>
</tr>
<!-- IF S_CAN_NOTIFY -->
<tr>
- <td class="row1"><span class="gen"><b>{L_REPORT_NOTIFY}:</b></span><br /><span class="gensmall">{L_REPORT_NOTIFY_EXPLAIN}</span></td>
+ <td class="row1"><span class="gen"><b>{L_REPORT_NOTIFY}{L_COLON}</b></span><br /><span class="gensmall">{L_REPORT_NOTIFY_EXPLAIN}</span></td>
<td class="row2"><span class="gen"><input type="radio" class="radio" name="notify" value="1"<!-- IF S_NOTIFY --> checked="checked"<!-- ENDIF --> />&nbsp; {L_YES} &nbsp;<input type="radio" class="radio" name="notify" value="0"<!-- IF not S_NOTIFY --> checked="checked"<!-- ENDIF --> />&nbsp; {L_NO}</span></td>
</tr>
<!-- ENDIF -->
<tr>
- <td class="row1" valign="top"><span class="gen"><b>{L_MORE_INFO}:</b></span><br /><span class="gensmall">{L_CAN_LEAVE_BLANK}</span></td>
+ <td class="row1" valign="top"><span class="gen"><b>{L_MORE_INFO}{L_COLON}</b></span><br /><span class="gensmall">{L_CAN_LEAVE_BLANK}</span></td>
<td class="row2"><textarea class="post" name="report_text" rows="10" cols="50">{REPORT_TEXT}</textarea></td>
</tr>
<!-- IF CAPTCHA_TEMPLATE -->
@@ -46,4 +46,4 @@
<div style="float: {S_CONTENT_FLOW_END};"><!-- INCLUDE jumpbox.html --></div>
-<!-- INCLUDE overall_footer.html --> \ No newline at end of file
+<!-- INCLUDE overall_footer.html -->
diff --git a/phpBB/styles/subsilver2/template/search_body.html b/phpBB/styles/subsilver2/template/search_body.html
index 763a229c83..c0199fbae8 100644
--- a/phpBB/styles/subsilver2/template/search_body.html
+++ b/phpBB/styles/subsilver2/template/search_body.html
@@ -9,36 +9,36 @@
<th colspan="4">{L_SEARCH_QUERY}</th>
</tr>
<tr>
- <td class="row1" colspan="2" width="50%"><b class="genmed">{L_SEARCH_KEYWORDS}: </b><br /><span class="gensmall">{L_SEARCH_KEYWORDS_EXPLAIN}</span></td>
+ <td class="row1" colspan="2" width="50%"><b class="genmed">{L_SEARCH_KEYWORDS}{L_COLON} </b><br /><span class="gensmall">{L_SEARCH_KEYWORDS_EXPLAIN}</span></td>
<td class="row2" colspan="2" valign="top"><input type="text" style="width: 300px" class="post" name="keywords" size="30" /><br /><input type="radio" class="radio" name="terms" value="all" checked="checked" /> <span class="genmed">{L_SEARCH_ALL_TERMS}</span><br /><input type="radio" class="radio" name="terms" value="any" /> <span class="genmed">{L_SEARCH_ANY_TERMS}</span></td>
</tr>
<tr>
- <td class="row1" colspan="2"><b class="genmed">{L_SEARCH_AUTHOR}:</b><br /><span class="gensmall">{L_SEARCH_AUTHOR_EXPLAIN}</span></td>
+ <td class="row1" colspan="2"><b class="genmed">{L_SEARCH_AUTHOR}{L_COLON}</b><br /><span class="gensmall">{L_SEARCH_AUTHOR_EXPLAIN}</span></td>
<td class="row2" colspan="2" valign="middle"><input type="text" style="width: 300px" class="post" name="author" size="30" /></td>
</tr>
<tr>
- <td class="row1" colspan="2"><b class="genmed">{L_SEARCH_FORUMS}: </b><br /><span class="gensmall">{L_SEARCH_FORUMS_EXPLAIN}</span></td>
+ <td class="row1" colspan="2"><b class="genmed">{L_SEARCH_FORUMS}{L_COLON} </b><br /><span class="gensmall">{L_SEARCH_FORUMS_EXPLAIN}</span></td>
<td class="row2" colspan="2"><select name="fid[]" multiple="multiple" size="5">{S_FORUM_OPTIONS}</select></td>
</tr>
<tr>
<th colspan="4">{L_SEARCH_OPTIONS}</th>
</tr>
<tr>
- <td class="row1" width="25%" nowrap="nowrap"><b class="genmed">{L_SEARCH_SUBFORUMS}: </b></td>
+ <td class="row1" width="25%" nowrap="nowrap"><b class="genmed">{L_SEARCH_SUBFORUMS}{L_COLON} </b></td>
<td class="row2" width="25%" nowrap="nowrap"><input type="radio" class="radio" name="sc" value="1" checked="checked" /> <span class="genmed">{L_YES}</span>&nbsp;&nbsp;<input type="radio" class="radio" name="sc" value="0" /> <span class="genmed">{L_NO}</span></td>
- <td class="row1" width="25%" nowrap="nowrap"><b class="genmed">{L_SEARCH_WITHIN}: </b></td>
+ <td class="row1" width="25%" nowrap="nowrap"><b class="genmed">{L_SEARCH_WITHIN}{L_COLON} </b></td>
<td class="row2" width="25%" nowrap="nowrap"><input type="radio" class="radio" name="sf" value="all" checked="checked" /> <span class="genmed">{L_SEARCH_TITLE_MSG}</span><br /><input type="radio" class="radio" name="sf" value="msgonly" /> <span class="genmed">{L_SEARCH_MSG_ONLY}</span> <br /><input type="radio" class="radio" name="sf" value="titleonly" /> <span class="genmed">{L_SEARCH_TITLE_ONLY}</span> <br /><input type="radio" class="radio" name="sf" value="firstpost" /> <span class="genmed">{L_SEARCH_FIRST_POST}</span></td>
</tr>
<tr>
- <td class="row1"><b class="genmed">{L_RESULT_SORT}: </b></td>
+ <td class="row1"><b class="genmed">{L_RESULT_SORT}{L_COLON} </b></td>
<td class="row2" nowrap="nowrap">{S_SELECT_SORT_KEY}<br /><input type="radio" class="radio" name="sd" value="a" /> <span class="genmed">{L_SORT_ASCENDING}</span><br /><input type="radio" class="radio" name="sd" value="d" checked="checked" /> <span class="genmed">{L_SORT_DESCENDING}</span></td>
- <td class="row1" nowrap="nowrap"><b class="genmed">{L_DISPLAY_RESULTS}: </b></td>
+ <td class="row1" nowrap="nowrap"><b class="genmed">{L_DISPLAY_RESULTS}{L_COLON} </b></td>
<td class="row2" nowrap="nowrap"><input type="radio" class="radio" name="sr" value="posts" checked="checked" /> <span class="genmed">{L_POSTS}</span>&nbsp;&nbsp;<input type="radio" class="radio" name="sr" value="topics" /> <span class="genmed">{L_TOPICS}</span></td>
</tr>
<tr>
- <td class="row1" width="25%"><b class="genmed">{L_RESULT_DAYS}: </b></td>
+ <td class="row1" width="25%"><b class="genmed">{L_RESULT_DAYS}{L_COLON} </b></td>
<td class="row2" width="25%" nowrap="nowrap">{S_SELECT_SORT_DAYS}</td>
- <td class="row1" nowrap="nowrap"><b class="genmed">{L_RETURN_FIRST}: </b></td>
+ <td class="row1" nowrap="nowrap"><b class="genmed">{L_RETURN_FIRST}{L_COLON} </b></td>
<td class="row2" nowrap="nowrap"><select name="ch">{S_CHARACTER_OPTIONS}</select> <span class="genmed">{L_POST_CHARACTERS}</span></td>
</tr>
<tr>
diff --git a/phpBB/styles/subsilver2/template/search_results.html b/phpBB/styles/subsilver2/template/search_results.html
index a6c30f97b2..092779055d 100644
--- a/phpBB/styles/subsilver2/template/search_results.html
+++ b/phpBB/styles/subsilver2/template/search_results.html
@@ -7,8 +7,8 @@
<td colspan="2"><span class="titles"><!-- IF SEARCH_TITLE -->{SEARCH_TITLE}<!-- ELSE -->{SEARCH_MATCHES}<!-- ENDIF --></span><br /></td>
</tr>
<tr>
- <td class="genmed"><!-- IF SEARCH_TOPIC -->{L_SEARCHED_TOPIC}: <a href="{U_SEARCH_TOPIC}"><b>{SEARCH_TOPIC}</b></a><br /><!-- ENDIF --><!-- IF SEARCH_WORDS -->{L_SEARCHED_FOR}: <a href="{U_SEARCH_WORDS}"><b>{SEARCH_WORDS}</b></a><!-- ENDIF --><!-- IF IGNORED_WORDS --> {L_IGNORED_TERMS}: <b>{IGNORED_WORDS}</b><!-- ENDIF --></td>
- <td align="{S_CONTENT_FLOW_END}"><!-- IF SEARCH_IN_RESULTS --><span class="genmed">{L_SEARCH_IN_RESULTS}: </span><input class="post" type="text" name="add_keywords" value="" /> <input class="btnlite" type="submit" name="submit" value="{L_GO}" /><!-- ENDIF --></td>
+ <td class="genmed"><!-- IF SEARCH_TOPIC -->{L_SEARCHED_TOPIC}{L_COLON} <a href="{U_SEARCH_TOPIC}"><b>{SEARCH_TOPIC}</b></a><br /><!-- ENDIF --><!-- IF SEARCH_WORDS -->{L_SEARCHED_FOR}{L_COLON} <a href="{U_SEARCH_WORDS}"><b>{SEARCH_WORDS}</b></a><!-- ENDIF --><!-- IF IGNORED_WORDS --> {L_IGNORED_TERMS}{L_COLON} <b>{IGNORED_WORDS}</b><!-- ENDIF --></td>
+ <td align="{S_CONTENT_FLOW_END}"><!-- IF SEARCH_IN_RESULTS --><span class="genmed">{L_SEARCH_IN_RESULTS}{L_COLON} </span><input class="post" type="text" name="add_keywords" value="" /> <input class="btnlite" type="submit" name="submit" value="{L_GO}" /><!-- ENDIF --></td>
</tr>
</table>
@@ -34,22 +34,32 @@
<!-- ENDIF -->
</td>
<td class="row1">
- <!-- IF searchresults.S_UNREAD_TOPIC --><a href="{searchresults.U_NEWEST_POST}">{NEWEST_POST_IMG}</a><!-- ENDIF -->
- {searchresults.ATTACH_ICON_IMG} <a href="{searchresults.U_VIEW_TOPIC}" class="topictitle">{searchresults.TOPIC_TITLE}</a>
+ <!-- EVENT topiclist_row_prepend -->
+ <!-- IF searchresults.S_UNREAD_TOPIC --><a href="{searchresults.U_NEWEST_POST}" class="imageset">{NEWEST_POST_IMG}</a><!-- ENDIF -->
+ {searchresults.ATTACH_ICON_IMG} <a href="<!-- IF not S_IS_BOT and searchresults.S_UNREAD_TOPIC -->{searchresults.U_NEWEST_POST}<!-- ELSE -->{searchresults.U_VIEW_TOPIC}<!-- ENDIF -->" class="topictitle">{searchresults.TOPIC_TITLE}</a>
<!-- IF searchresults.S_TOPIC_UNAPPROVED or searchresults.S_POSTS_UNAPPROVED -->
- <a href="{searchresults.U_MCP_QUEUE}">{searchresults.UNAPPROVED_IMG}</a>&nbsp;
+ <a href="{searchresults.U_MCP_QUEUE}" class="imageset">{searchresults.UNAPPROVED_IMG}</a>&nbsp;
<!-- ENDIF -->
- <!-- IF searchresults.S_TOPIC_REPORTED -->
- <a href="{searchresults.U_MCP_REPORT}">{REPORTED_IMG}</a>&nbsp;
+ <!-- IF searchresults.S_TOPIC_DELETED -->
+ <a href="{searchresults.U_MCP_QUEUE}" class="imageset">{DELETED_IMG}</a>&nbsp;
<!-- ENDIF -->
- <!-- IF searchresults.PAGINATION -->
- <p class="gensmall"> [ {GOTO_PAGE_IMG}{L_GOTO_PAGE}: {searchresults.PAGINATION} ] </p>
+ <!-- IF searchresults.S_TOPIC_REPORTED -->
+ <a href="{searchresults.U_MCP_REPORT}" class="imageset">{REPORTED_IMG}</a>&nbsp;
<!-- ENDIF -->
- <!-- IF searchresults.S_TOPIC_GLOBAL -->
- <p class="gensmall">{L_GLOBAL}</p>
- <!-- ELSE -->
- <p class="gensmall">{L_IN} <a href="{searchresults.U_VIEW_FORUM}">{searchresults.FORUM_TITLE}</a></p>
+ <!-- IF .searchresults.pagination -->
+ <p class="gensmall"> [ {GOTO_PAGE_IMG}{L_GOTO_PAGE}{L_COLON}
+ <!-- BEGIN pagination -->
+ <!-- IF searchresults.pagination.S_IS_PREV -->
+ <!-- ELSEIF searchresults.pagination.S_IS_CURRENT --><strong>{searchresults.pagination.PAGE_NUMBER}</strong>
+ <!-- ELSEIF searchresults.pagination.S_IS_ELLIPSIS --> {L_ELLIPSIS}
+ <!-- ELSEIF searchresults.pagination.S_IS_NEXT -->
+ <!-- ELSE --><a href="{searchresults.pagination.PAGE_URL}">{searchresults.pagination.PAGE_NUMBER}</a>
+ <!-- ENDIF -->
+ <!-- END pagination -->
+ ] </p>
<!-- ENDIF -->
+ <p class="gensmall">{L_IN} <a href="{searchresults.U_VIEW_FORUM}">{searchresults.FORUM_TITLE}</a></p>
+ <!-- EVENT topiclist_row_append -->
</td>
<td class="row2" width="100" align="center"><p class="topicauthor">{searchresults.TOPIC_AUTHOR_FULL}</p></td>
<td class="row1" width="50" align="center"><p class="topicdetails">{searchresults.TOPIC_REPLIES}</p></td>
@@ -57,7 +67,7 @@
<td class="row1" width="120" align="center">
<p class="topicdetails">{searchresults.LAST_POST_TIME}</p>
<p class="topicdetails">{searchresults.LAST_POST_AUTHOR_FULL}
- <a href="{searchresults.U_LAST_POST}">{LAST_POST_IMG}</a>
+ <a href="{searchresults.U_LAST_POST}" class="imageset">{LAST_POST_IMG}</a>
</p>
</td>
</tr>
@@ -67,7 +77,7 @@
</tr>
<!-- END searchresults -->
<tr>
- <td class="cat" colspan="7" valign="middle" align="center"><!-- IF S_SELECT_SORT_DAYS or S_SELECT_SORT_KEY --><span class="gensmall">{L_DISPLAY_POSTS}:</span> {S_SELECT_SORT_DAYS}<!-- IF S_SELECT_SORT_KEY -->&nbsp;<span class="gensmall">{L_SORT_BY}:</span> {S_SELECT_SORT_KEY} {S_SELECT_SORT_DIR}<!-- ENDIF -->&nbsp;<input class="btnlite" type="submit" value="{L_GO}" name="sort" /><!-- ENDIF --></td>
+ <td class="cat" colspan="7" valign="middle" align="center"><!-- IF S_SELECT_SORT_DAYS or S_SELECT_SORT_KEY --><span class="gensmall">{L_DISPLAY_POSTS}{L_COLON}</span> {S_SELECT_SORT_DAYS}<!-- IF S_SELECT_SORT_KEY -->&nbsp;<span class="gensmall">{L_SORT_BY}{L_COLON}</span> {S_SELECT_SORT_KEY} {S_SELECT_SORT_DIR}<!-- ENDIF -->&nbsp;<input class="btnlite" type="submit" value="{L_GO}" name="sort" /><!-- ENDIF --></td>
</tr>
</table>
@@ -84,7 +94,7 @@
<!-- IF searchresults.S_IGNORE_POST -->
<td class="gensmall" colspan="2" height="25" align="center">{searchresults.L_IGNORE_POST}</td>
<!-- ELSE -->
- <td colspan="2" height="25"><p class="topictitle"><a name="p{searchresults.POST_ID}" id="p{searchresults.POST_ID}"></a>&nbsp;<!-- IF searchresults.FORUM_TITLE -->{L_FORUM}: <a href="{searchresults.U_VIEW_FORUM}">{searchresults.FORUM_TITLE}</a><!-- ELSE -->{L_GLOBAL}<!-- ENDIF --> &nbsp; {L_TOPIC}: <a href="{searchresults.U_VIEW_TOPIC}">{searchresults.TOPIC_TITLE}</a> </p></td>
+ <td colspan="2" height="25"><p class="topictitle"><a name="p{searchresults.POST_ID}" id="p{searchresults.POST_ID}"></a>&nbsp;{L_FORUM}{L_COLON} <a href="{searchresults.U_VIEW_FORUM}">{searchresults.FORUM_TITLE}</a> &nbsp; {L_TOPIC}{L_COLON} <a href="{searchresults.U_VIEW_TOPIC}">{searchresults.TOPIC_TITLE}</a> </p></td>
</tr>
<tr class="row1">
<td width="150" align="center" valign="middle"><b class="postauthor">{searchresults.POST_AUTHOR_FULL}</b></td>
@@ -94,19 +104,19 @@
<td class="gensmall">
<div style="float: {S_CONTENT_FLOW_BEGIN};">
<!-- IF searchresults.POST_SUBJECT neq "" -->
- &nbsp;<b>{L_POST_SUBJECT}:</b> <a href="{searchresults.U_VIEW_POST}">{searchresults.POST_SUBJECT}</a>
+ &nbsp;<b>{L_POST_SUBJECT}{L_COLON}</b> <a href="{searchresults.U_VIEW_POST}">{searchresults.POST_SUBJECT}</a>
<!-- ELSE -->
[ <a href="{searchresults.U_VIEW_POST}">{L_JUMP_TO_POST}</a> ]
<!-- ENDIF -->
</div>
- <div style="float: {S_CONTENT_FLOW_END};"><b>{L_POSTED}:</b> {searchresults.POST_DATE}&nbsp;</div>
+ <div style="float: {S_CONTENT_FLOW_END};"><b>{L_POSTED}{L_COLON}</b> {searchresults.POST_DATE}&nbsp;</div>
</td>
</tr>
</table>
</td>
</tr>
<tr class="row1">
- <td width="150" align="center" valign="top"><br /><span class="postdetails">{L_REPLIES}: <b>{searchresults.TOPIC_REPLIES}</b><br />{L_VIEWS}: <b>{searchresults.TOPIC_VIEWS}</b></span><br /><br /></td>
+ <td width="150" align="center" valign="top"><br /><span class="postdetails">{L_REPLIES}{L_COLON} <b>{searchresults.TOPIC_REPLIES}</b><br />{L_VIEWS}{L_COLON} <b>{searchresults.TOPIC_VIEWS}</b></span><br /><br /></td>
<td valign="top">
<table width="100%" cellspacing="5">
<tr>
@@ -125,7 +135,7 @@
</tr>
<!-- END searchresults -->
<tr>
- <td class="cat" colspan="2" align="center"><!-- IF S_SELECT_SORT_KEY --><span class="gensmall">{L_SORT_BY}:</span> {S_SELECT_SORT_KEY} {S_SELECT_SORT_DIR}&nbsp;<input class="btnlite" type="submit" name="sort" value="{L_GO}" /><!-- ENDIF --></td>
+ <td class="cat" colspan="2" align="center"><!-- IF S_SELECT_SORT_KEY --><span class="gensmall">{L_SORT_BY}{L_COLON}</span> {S_SELECT_SORT_KEY} {S_SELECT_SORT_DIR}&nbsp;<input class="btnlite" type="submit" name="sort" value="{L_GO}" /><!-- ENDIF --></td>
</tr>
</table>
<!-- ENDIF -->
@@ -143,4 +153,4 @@
<div align="{S_CONTENT_FLOW_END}"><!-- INCLUDE jumpbox.html --></div>
-<!-- INCLUDE overall_footer.html --> \ No newline at end of file
+<!-- INCLUDE overall_footer.html -->
diff --git a/phpBB/styles/subsilver2/template/searchbox.html b/phpBB/styles/subsilver2/template/searchbox.html
index 622961c881..49de299ea2 100644
--- a/phpBB/styles/subsilver2/template/searchbox.html
+++ b/phpBB/styles/subsilver2/template/searchbox.html
@@ -1 +1 @@
-<form method="get" name="search" action="{S_SEARCHBOX_ACTION}"><span class="gensmall">{L_SEARCH_FOR}:</span> <input class="post" type="text" name="keywords" size="20" /> <input class="btnlite" type="submit" value="{L_GO}" />{S_SEARCH_LOCAL_HIDDEN_FIELDS}</form>
+<form method="get" name="search" action="{S_SEARCHBOX_ACTION}"><span class="gensmall">{L_SEARCH_FOR}{L_COLON}</span> <input class="post" type="text" name="keywords" size="20" /> <input class="btnlite" type="submit" value="{L_GO}" />{S_SEARCH_LOCAL_HIDDEN_FIELDS}</form>
diff --git a/phpBB/styles/subsilver2/template/simple_footer.html b/phpBB/styles/subsilver2/template/simple_footer.html
index 6cb4f401da..6a9c3096bc 100644
--- a/phpBB/styles/subsilver2/template/simple_footer.html
+++ b/phpBB/styles/subsilver2/template/simple_footer.html
@@ -5,5 +5,11 @@
<span class="copyright">{CREDIT_LINE}</span>
</div>
+<script type="text/javascript" src="{T_JQUERY_LINK}"></script>
+<!-- IF S_ALLOW_CDN --><script type="text/javascript">window.jQuery || document.write(unescape('%3Cscript src="{T_ASSETS_PATH}/javascript/jquery.js?assets_version={T_ASSETS_VERSION}" type="text/javascript"%3E%3C/script%3E'));</script><!-- ENDIF -->
+
+<!-- EVENT simple_footer_after -->
+
+{$SCRIPTS}
</body>
-</html> \ No newline at end of file
+</html>
diff --git a/phpBB/styles/subsilver2/template/simple_header.html b/phpBB/styles/subsilver2/template/simple_header.html
index b0dc908bc6..85528e6769 100644
--- a/phpBB/styles/subsilver2/template/simple_header.html
+++ b/phpBB/styles/subsilver2/template/simple_header.html
@@ -1,21 +1,17 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}" xml:lang="{S_USER_LANG}">
+<!DOCTYPE html>
+<html dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}">
<head>
-
-<meta http-equiv="content-type" content="text/html; charset={S_CONTENT_ENCODING}" />
-<meta http-equiv="content-language" content="{S_USER_LANG}" />
-<meta http-equiv="content-style-type" content="text/css" />
-<meta http-equiv="imagetoolbar" content="no" />
-<meta name="resource-type" content="document" />
-<meta name="distribution" content="global" />
+<meta charset="utf-8">
<meta name="keywords" content="" />
<meta name="description" content="" />
{META}
<title>{SITENAME} &bull; <!-- IF S_IN_MCP -->{L_MCP} &bull; <!-- ELSEIF S_IN_UCP -->{L_UCP} &bull; <!-- ENDIF -->{PAGE_TITLE}</title>
<link rel="stylesheet" href="{T_STYLESHEET_LINK}" type="text/css" />
+<link rel="stylesheet" href="{T_STYLESHEET_LANG_LINK}" type="text/css" />
</head>
<body class="{S_CONTENT_DIRECTION}">
+<!-- EVENT simple_header_body_before -->
<a name="top"></a>
-<div id="wrapcentre"> \ No newline at end of file
+<div id="wrapcentre">
diff --git a/phpBB/styles/subsilver2/template/template.cfg b/phpBB/styles/subsilver2/template/template.cfg
deleted file mode 100644
index 0c50275208..0000000000
--- a/phpBB/styles/subsilver2/template/template.cfg
+++ /dev/null
@@ -1,27 +0,0 @@
-#
-# phpBB Template Configuration File
-#
-# @package phpBB3
-# @copyright (c) 2005 phpBB Group
-# @license http://opensource.org/licenses/gpl-license.php GNU Public License
-#
-#
-# At the left is the name, please do not change this
-# At the right the value is entered
-# For on/off options the valid values are on, off, 1, 0, true and false
-#
-# Values get trimmed, if you want to add a space in front or at the end of
-# the value, then enclose the value with single or double quotes.
-# Single and double quotes do not need to be escaped.
-#
-#
-
-# General Information about this template
-name = subsilver2
-copyright = &copy; phpBB Group, 2003
-version = 3.0.12
-
-# Template inheritance
-# See http://blog.phpbb.com/2008/07/31/templating-just-got-easier/
-# Set value to empty to ignore template inheritance
-inherit_from = subsilver2
diff --git a/phpBB/styles/subsilver2/template/timezone.js b/phpBB/styles/subsilver2/template/timezone.js
new file mode 100644
index 0000000000..c5829c0bb1
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/timezone.js
@@ -0,0 +1,21 @@
+(function($) { // Avoid conflicts with other libraries
+
+"use strict";
+
+$('#tz_date').change(function() {
+ phpbb.timezoneSwitchDate(false);
+});
+
+$('#tz_select_date_suggest').click(function(){
+ phpbb.timezonePreselectSelect(true);
+});
+
+$(document).ready(
+ phpbb.timezoneEnableDateSelection
+);
+
+$(document).ready(
+ phpbb.timezonePreselectSelect($('#tz_select_date_suggest').attr('timezone-preselect') == 'true')
+);
+
+})(jQuery); // Avoid conflicts with other libraries
diff --git a/phpBB/styles/subsilver2/template/timezone_option.html b/phpBB/styles/subsilver2/template/timezone_option.html
new file mode 100644
index 0000000000..0f27719f86
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/timezone_option.html
@@ -0,0 +1,20 @@
+<tr>
+ <td class="row1" width="50%"><b class="genmed">{L_BOARD_TIMEZONE}{L_COLON}</b></td>
+ <td class="row2">
+ <!-- IF S_TZ_DATE_OPTIONS -->
+ <div id="tz_select_date" style="display: none;">
+ <select name="tz_date" id="tz_date" class="autowidth tz_select">
+ <option value="">{L_SELECT_CURRENT_TIME}</option>
+ {S_TZ_DATE_OPTIONS}
+ </select><br />
+ <input type="button" id="tz_select_date_suggest" class="btnlite" style="display: none;" timezone-preselect="<!-- IF S_TZ_PRESELECT -->true<!-- ELSE -->false<!-- ENDIF -->" data-l-suggestion="{L_TIMEZONE_DATE_SUGGESTION}" value="{L_TIMEZONE_DATE_SUGGESTION}" />
+ </div>
+ <!-- ENDIF -->
+ <select name="tz" id="timezone" class="autowidth tz_select">
+ <option value="">{L_SELECT_TIMEZONE}</option>
+ {S_TZ_OPTIONS}
+ </select>
+
+ <!-- INCLUDEJS timezone.js -->
+ </td>
+</tr>
diff --git a/phpBB/styles/subsilver2/template/ucp_agreement.html b/phpBB/styles/subsilver2/template/ucp_agreement.html
index d5420f66a6..054d25282f 100644
--- a/phpBB/styles/subsilver2/template/ucp_agreement.html
+++ b/phpBB/styles/subsilver2/template/ucp_agreement.html
@@ -20,7 +20,7 @@
<form method="post" action="{S_UCP_ACTION}" id="register">
<table width="100%" cellspacing="0">
<tr>
- <td class="gensmall" align="{S_CONTENT_FLOW_END}">{L_LANGUAGE}: <select name="lang" id="lang" onchange="change_language(this.value); return false;" title="{L_LANGUAGE}">{S_LANG_OPTIONS}</select></td>
+ <td class="gensmall" align="{S_CONTENT_FLOW_END}">{L_LANGUAGE}{L_COLON} <select name="lang" id="lang" onchange="change_language(this.value); return false;" title="{L_LANGUAGE}">{S_LANG_OPTIONS}</select></td>
</tr>
</table>
{S_HIDDEN_FIELDS}
diff --git a/phpBB/styles/subsilver2/template/ucp_attachments.html b/phpBB/styles/subsilver2/template/ucp_attachments.html
index 35dcd33ac4..0f6101aac7 100644
--- a/phpBB/styles/subsilver2/template/ucp_attachments.html
+++ b/phpBB/styles/subsilver2/template/ucp_attachments.html
@@ -28,7 +28,7 @@
<!-- IF attachrow.S_ROW_COUNT is even --><tr class="row2"><!-- ELSE --><tr class="row1"><!-- ENDIF -->
<td class="genmed" style="padding: 4px;" align="center" width="2%">&nbsp;{attachrow.ROW_NUMBER}&nbsp;</td>
- <td style="padding: 4px;"><a class="gen" href="{attachrow.U_VIEW_ATTACHMENT}">{attachrow.FILENAME}</a><br /><span class="gensmall"><!-- IF attachrow.S_IN_MESSAGE --><b>{L_PM}: </b><!-- ELSE --><b>{L_TOPIC}: </b><!-- ENDIF --><a href="{attachrow.U_VIEW_TOPIC}">{attachrow.TOPIC_TITLE}</a></span></td>
+ <td style="padding: 4px;"><a class="gen" href="{attachrow.U_VIEW_ATTACHMENT}">{attachrow.FILENAME}</a><br /><span class="gensmall"><!-- IF attachrow.S_IN_MESSAGE --><b>{L_PM}{L_COLON} </b><!-- ELSE --><b>{L_TOPIC}{L_COLON} </b><!-- ENDIF --><a href="{attachrow.U_VIEW_TOPIC}">{attachrow.TOPIC_TITLE}</a></span></td>
<td class="gensmall" style="padding: 4px;" align="center" valign="middle" nowrap="nowrap">&nbsp;{attachrow.POST_TIME}&nbsp;</td>
<td class="genmed" style="padding: 4px;" align="center" valign="middle" nowrap="nowrap">{attachrow.SIZE}</td>
<td class="genmed" style="padding: 4px;" align="center">{attachrow.DOWNLOAD_COUNT}</td>
@@ -36,7 +36,7 @@
</tr>
<!-- END attachrow -->
<tr>
- <td class="cat" colspan="6"><div style="float: {S_CONTENT_FLOW_BEGIN};"><span class="gensmall">{L_SORT_BY}: </span><select name="sk">{S_SORT_OPTIONS}</select> <select name="sd">{S_ORDER_SELECT}</select>&nbsp;<input class="btnlite" type="submit" name="sort" value="{L_SORT}" /></div><div style="float: {S_CONTENT_FLOW_END};"><input class="btnlite" type="submit" name="delete" value="{L_DELETE_MARKED}" />&nbsp;</div></td>
+ <td class="cat" colspan="6"><div style="float: {S_CONTENT_FLOW_BEGIN};"><span class="gensmall">{L_SORT_BY}{L_COLON} </span><select name="sk">{S_SORT_OPTIONS}</select> <select name="sd">{S_ORDER_SELECT}</select>&nbsp;<input class="btnlite" type="submit" name="sort" value="{L_SORT}" /></div><div style="float: {S_CONTENT_FLOW_END};"><input class="btnlite" type="submit" name="delete" value="{L_DELETE_MARKED}" />&nbsp;</div></td>
</tr>
</table>
@@ -55,4 +55,4 @@
<!-- ENDIF -->
-<!-- INCLUDE ucp_footer.html --> \ No newline at end of file
+<!-- INCLUDE ucp_footer.html -->
diff --git a/phpBB/styles/subsilver2/template/ucp_auth_link.html b/phpBB/styles/subsilver2/template/ucp_auth_link.html
new file mode 100644
index 0000000000..75e3133fcf
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/ucp_auth_link.html
@@ -0,0 +1,19 @@
+<!-- INCLUDE ucp_header.html -->
+
+<table class="tablebg" width="100%" cellspacing="1">
+ <tr>
+ <th colspan="4">{L_UCP_AUTH_LINK_TITLE}</th>
+ </tr>
+
+ <!-- IF ERROR -->
+ <tr>
+ <td class="row1" colspan="2" align="center"><span class="genmed error">{ERROR}</span></td>
+ </tr>
+ <!-- ENDIF -->
+
+ <!-- IF PROVIDER_TEMPLATE_FILE -->
+ <!-- INCLUDE {PROVIDER_TEMPLATE_FILE} -->
+ <!-- ENDIF -->
+</table>
+
+<!-- INCLUDE ucp_footer.html -->
diff --git a/phpBB/styles/subsilver2/template/ucp_auth_link_oauth.html b/phpBB/styles/subsilver2/template/ucp_auth_link_oauth.html
new file mode 100644
index 0000000000..80564d207b
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/ucp_auth_link_oauth.html
@@ -0,0 +1,34 @@
+<!-- BEGIN oauth -->
+ <tr>
+ <th>{oauth.SERVICE_NAME}</th>
+ </tr>
+
+ <tr>
+ <td class="row1">
+ <form id="ucp" method="post" action="{S_UCP_ACTION}">
+ <table>
+ <!-- IF oauth.UNIQUE_ID -->
+ <tr>
+ <td class="row1">{L_UCP_AUTH_LINK_ID}{L_COLON}</td>
+ <td class="row1">{oauth.UNIQUE_ID}</td>
+ </tr>
+ <tr>
+ <td class="row1">&nbsp;</td>
+ <td class="row1"><input type="submit" name="submit" tabindex="6" value="{L_UCP_AUTH_LINK_UNLINK}" class="button1" /></td>
+ </tr>
+ <!-- ELSE -->
+ <tr>
+ <td class="row1">{L_UCP_AUTH_LINK_ASK}</td>
+ </tr>
+ <tr>
+ <td class="row1"><input type="submit" name="submit" tabindex="6" value="{L_UCP_AUTH_LINK_LINK}" class="button1" /></td>
+ </tr>
+ <!-- ENDIF -->
+ </table>
+ {oauth.HIDDEN_FIELDS}
+ {S_HIDDEN_FIELDS}
+ {S_FORM_TOKEN}
+ </form>
+ </td>
+ </tr>
+<!-- END oauth -->
diff --git a/phpBB/styles/subsilver2/template/ucp_avatar_options_gravatar.html b/phpBB/styles/subsilver2/template/ucp_avatar_options_gravatar.html
new file mode 100644
index 0000000000..b8840e0aab
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/ucp_avatar_options_gravatar.html
@@ -0,0 +1,13 @@
+<table class="tablebg" width="100%" cellspacing="1">
+ <tr>
+ <td class="row1" width="35%"><b class="genmed">{L_GRAVATAR_AVATAR_EMAIL}{L_COLON}</b><br /><span class="gensmall">{L_GRAVATAR_AVATAR_EMAIL_EXPLAIN}</span></td>
+ <td class="row2"><input type="text" name="avatar_gravatar_email" id="avatar_gravatar_email" value="{AVATAR_GRAVATAR_EMAIL}" class="inputbox" /></td>
+ </tr>
+ <tr>
+ <td class="row1" width="35%"><b class="genmed">{L_GRAVATAR_AVATAR_SIZE}{L_COLON}</b><br /><span class="gensmall">{L_GRAVATAR_AVATAR_SIZE_EXPLAIN}</span></td>
+ <td class="row2">
+ <input type="text" name="avatar_gravatar_width" id="avatar_gravatar_width" size="3" value="{AVATAR_GRAVATAR_WIDTH}" class="inputbox autowidth" /> {L_PIXEL} &times;&nbsp;
+ <input type="text" name="avatar_gravatar_height" id="avatar_gravatar_height" size="3" value="{AVATAR_GRAVATAR_HEIGHT}" class="inputbox autowidth" /> {L_PIXEL}
+ </td>
+ </tr>
+</table>
diff --git a/phpBB/styles/subsilver2/template/ucp_avatar_options_local.html b/phpBB/styles/subsilver2/template/ucp_avatar_options_local.html
new file mode 100644
index 0000000000..87e5608fec
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/ucp_avatar_options_local.html
@@ -0,0 +1,39 @@
+<table class="tablebg" width="100%" cellspacing="1">
+ <!-- IF .avatar_local_cats -->
+ <tr>
+ <td class="cat" colspan="2" align="center" valign="middle"><span class="genmed">{L_AVATAR_CATEGORY}{L_COLON} </span><select name="avatar_local_cat" id="category">
+ <option value="">{L_NO_AVATAR_CATEGORY}</option>
+ <!-- BEGIN avatar_local_cats -->
+ <option value="{avatar_local_cats.NAME}"<!-- IF avatar_local_cats.SELECTED --> selected="selected"<!-- ENDIF -->>{avatar_local_cats.NAME}</option>
+ <!-- END avatar_local_cats -->
+ </select>&nbsp; <input class="btnlite" tabindex="0" type="submit" value="{L_GO}" name="avatar_local_go" />
+ </td>
+ </tr>
+ <tr>
+ <td class="row1" colspan="2" align="center">
+ <table cellspacing="1" cellpadding="4" border="0">
+ <!-- BEGIN avatar_local_row -->
+ <tr>
+ <!-- BEGIN avatar_local_col -->
+ <td class="row1" align="center"><img src="{avatar_local_col.avatar_local_col.AVATAR_IMAGE}" alt="{avatar_local_col.avatar_local_col.AVATAR_NAME}" title="{avatar_local_col.avatar_local_col.AVATAR_NAME}" /></td>
+ <!-- END avatar_local_col -->
+ </tr>
+ <tr>
+ <!-- BEGIN avatar_local_option -->
+ <td class="row2" align="center"><input type="radio" class="radio" name="avatar_local_file" value="{avatar_local_col.avatar_local_option.S_OPTIONS_AVATAR}" /></td>
+ <!-- END avatar_local_option -->
+ </tr>
+ <!-- BEGINELSE -->
+ <tr>
+ <td class="row1" colspan="2">{L_NO_AVATAR_CATEGORY}</td>
+ </tr>
+ <!-- END avatar_local_col -->
+ </table>
+ </td>
+ </tr>
+ <!-- ELSE -->
+ <tr>
+ <td class="row1" colspan="2"><strong>{L_NO_AVATARS}</strong></td>
+ </tr>
+ <!-- ENDIF -->
+</table>
diff --git a/phpBB/styles/subsilver2/template/ucp_avatar_options_remote.html b/phpBB/styles/subsilver2/template/ucp_avatar_options_remote.html
new file mode 100644
index 0000000000..50ebb9b93d
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/ucp_avatar_options_remote.html
@@ -0,0 +1,10 @@
+<table class="tablebg" width="100%" cellspacing="1">
+ <tr>
+ <td class="row1" width="35%"><b class="genmed">{L_LINK_REMOTE_AVATAR}{L_COLON} </b><br /><span class="gensmall">{L_LINK_REMOTE_AVATAR_EXPLAIN}</span></td>
+ <td class="row2"><input class="post" type="text" name="avatar_remote_url" size="40" value="{AVATAR_REMOTE_URL}" /></td>
+ </tr>
+ <tr>
+ <td class="row1" width="35%"><b class="genmed">{L_LINK_REMOTE_SIZE}{L_COLON} </b><br /><span class="gensmall">{L_LINK_REMOTE_SIZE_EXPLAIN}</span></td>
+ <td class="row2"><input class="post" type="text" name="avatar_remote_width" size="3" value="{AVATAR_REMOTE_WIDTH}" /> <span class="gen">{L_PIXEL} &times; </span> <input class="post" type="text" name="avatar_remote_height" size="3" value="{AVATAR_REMOTE_HEIGHT}" /> <span class="gen">{L_PIXEL}</span></td>
+ </tr>
+</table>
diff --git a/phpBB/styles/subsilver2/template/ucp_avatar_options_upload.html b/phpBB/styles/subsilver2/template/ucp_avatar_options_upload.html
new file mode 100644
index 0000000000..6b813baeaa
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/ucp_avatar_options_upload.html
@@ -0,0 +1,12 @@
+<table class="tablebg" width="100%" cellspacing="1">
+ <tr>
+ <td class="row1" width="35%"><b class="genmed">{L_UPLOAD_AVATAR_FILE}{L_COLON} </b></td>
+ <td class="row2"><input type="hidden" name="MAX_FILE_SIZE" value="{AVATAR_SIZE}" /><input class="post" type="file" name="avatar_upload_file" /></td>
+ </tr>
+<!-- IF S_UPLOAD_AVATAR_URL -->
+ <tr>
+ <td class="row1" width="35%"><b class="genmed">{L_UPLOAD_AVATAR_URL}{L_COLON} </b><br /><span class="gensmall">{L_UPLOAD_AVATAR_URL_EXPLAIN}</span></td>
+ <td class="row2"><input class="post" type="text" name="avatar_upload_url" size="40" value="" /></td>
+ </tr>
+<!-- ENDIF -->
+</table>
diff --git a/phpBB/styles/subsilver2/template/ucp_footer.html b/phpBB/styles/subsilver2/template/ucp_footer.html
index 1681fe3849..57adb2da97 100644
--- a/phpBB/styles/subsilver2/template/ucp_footer.html
+++ b/phpBB/styles/subsilver2/template/ucp_footer.html
@@ -10,4 +10,4 @@
<div align="{S_CONTENT_FLOW_END}"><!-- INCLUDE jumpbox.html --></div>
-<!-- INCLUDE overall_footer.html --> \ No newline at end of file
+<!-- INCLUDE overall_footer.html -->
diff --git a/phpBB/styles/subsilver2/template/ucp_groups_manage.html b/phpBB/styles/subsilver2/template/ucp_groups_manage.html
index 51e60c8b69..3099fcb1d8 100644
--- a/phpBB/styles/subsilver2/template/ucp_groups_manage.html
+++ b/phpBB/styles/subsilver2/template/ucp_groups_manage.html
@@ -21,18 +21,18 @@
<th colspan="2">{L_GROUP_DETAILS}</th>
</tr>
<tr>
- <td class="row1" width="35%"><label<!-- IF not S_SPECIAL_GROUP --> for="group_name"<!-- ENDIF -->>{L_GROUP_NAME}:</label></td>
+ <td class="row1" width="35%"><label<!-- IF not S_SPECIAL_GROUP --> for="group_name"<!-- ENDIF -->>{L_GROUP_NAME}{L_COLON}</label></td>
<td class="row2"><!-- IF S_SPECIAL_GROUP --><b<!-- IF GROUP_COLOUR --> style="color: #{GROUP_COLOUR};"<!-- ENDIF -->>{GROUP_NAME}</b><!-- ENDIF --><input name="group_name" type="<!-- IF S_SPECIAL_GROUP -->hidden<!-- ELSE -->text<!-- ENDIF -->" id="group_name" value="{GROUP_INTERNAL_NAME}" /></td>
</tr>
<tr>
- <td class="row1" width="35%"><label for="group_desc">{L_GROUP_DESC}:</label></td>
+ <td class="row1" width="35%"><label for="group_desc">{L_GROUP_DESC}{L_COLON}</label></td>
<td class="row2"><textarea id="group_desc" name="group_desc" rows="5" cols="45">{GROUP_DESC}</textarea>
<br /><input type="checkbox" class="radio" name="desc_parse_bbcode"<!-- IF S_DESC_BBCODE_CHECKED --> checked="checked"<!-- ENDIF --> /> {L_PARSE_BBCODE} &nbsp; <input type="checkbox" class="radio" name="desc_parse_smilies"<!-- IF S_DESC_SMILIES_CHECKED --> checked="checked"<!-- ENDIF --> /> {L_PARSE_SMILIES} &nbsp; <input type="checkbox" class="radio" name="desc_parse_urls"<!-- IF S_DESC_URLS_CHECKED --> checked="checked"<!-- ENDIF --> /> {L_PARSE_URLS}
</td>
</tr>
<!-- IF not S_SPECIAL_GROUP -->
<tr>
- <td class="row1" width="35%"><label for="group_type">{L_GROUP_TYPE}:</label><br /><span>{L_GROUP_TYPE_EXPLAIN}</span></td>
+ <td class="row1" width="35%"><label for="group_type">{L_GROUP_TYPE}{L_COLON}</label><br /><span>{L_GROUP_TYPE_EXPLAIN}</span></td>
<td class="row2">
<input name="group_type" type="radio" class="radio" id="group_type" value="{GROUP_TYPE_FREE}"{GROUP_FREE} /> {L_GROUP_OPEN} &nbsp;
<input name="group_type" type="radio" class="radio" value="{GROUP_TYPE_OPEN}"{GROUP_OPEN} /> {L_GROUP_REQUEST} &nbsp;
@@ -48,86 +48,59 @@
<th colspan="2">{L_GROUP_SETTINGS_SAVE}</th>
</tr>
<tr>
- <td class="row1" width="35%"><label for="group_colour">{L_GROUP_COLOR}:</label><br /><span>{L_GROUP_COLOR_EXPLAIN}</span></td>
- <td class="row2"><input name="group_colour" type="text" id="group_colour" value="{GROUP_COLOUR}" size="6" maxlength="6" />&nbsp;&nbsp;<span>[ <a href="{U_SWATCH}" onclick="popup(this.href, 636, 150, '_swatch'); return false;">{L_COLOUR_SWATCH}</a> ]</span></td>
+ <td class="row1" width="35%"><label for="group_colour">{L_GROUP_COLOR}{L_COLON}</label><br /><span>{L_GROUP_COLOR_EXPLAIN}</span></td>
+ <td class="row2">
+ <input name="group_colour" type="text" id="group_colour" value="{GROUP_COLOUR}" size="6" maxlength="6" />&nbsp;&nbsp;
+ <span>[ <a href="#" id="color_palette_toggle">{L_COLOUR_SWATCH}</a> ]</span>
+ <div id="color_palette_placeholder" style="display: none;" data-orientation="h" data-height="12" data-width="15" data-target="#group_colour"></div>
+ </td>
</tr>
<tr>
- <td class="row1" width="35%"><label for="group_rank">{L_GROUP_RANK}:</label></td>
+ <td class="row1" width="35%"><label for="group_rank">{L_GROUP_RANK}{L_COLON}</label></td>
<td class="row2"><select name="group_rank" id="group_rank">{S_RANK_OPTIONS}</select></td>
</tr>
<tr>
<th colspan="2">{L_GROUP_AVATAR}</th>
</tr>
<tr>
- <td class="row1" width="35%"><label>{L_CURRENT_IMAGE}:</label><br /><span>{L_AVATAR_EXPLAIN}</span></td>
- <td class="row2">{AVATAR_IMAGE}<br /><br /><input type="checkbox" class="radio" name="delete" />&nbsp;<span>{L_DELETE_AVATAR}</span></td>
+ <td class="row1" width="35%"><label>{L_CURRENT_IMAGE}{L_COLON}</label><br /><span>{L_AVATAR_EXPLAIN}</span></td>
+ <td class="row2">{AVATAR_IMAGE}<br /><br /><input type="checkbox" class="radio" name="avatar_delete" />&nbsp;<span>{L_DELETE_AVATAR}</span></td>
</tr>
- <!-- IF not S_IN_AVATAR_GALLERY -->
- <!-- IF S_UPLOAD_AVATAR_FILE -->
- <tr>
- <td class="row1" width="35%"><label for="uploadfile">{L_UPLOAD_AVATAR_FILE}:</label></td>
- <td class="row2"><input type="hidden" name="MAX_FILE_SIZE" value="{AVATAR_MAX_FILESIZE}" /><input type="file" id="uploadfile" name="uploadfile" /></td>
- </tr>
- <!-- ENDIF -->
- <!-- IF S_UPLOAD_AVATAR_URL -->
- <tr>
- <td class="row1" width="35%"><label for="uploadurl">{L_UPLOAD_AVATAR_URL}:</label><br /><span>{L_UPLOAD_AVATAR_URL_EXPLAIN}</span></td>
- <td class="row2"><input name="uploadurl" type="text" id="uploadurl" value="" /></td>
- </tr>
- <!-- ENDIF -->
- <!-- IF S_LINK_AVATAR -->
- <tr>
- <td class="row1" width="35%"><label for="remotelink">{L_LINK_REMOTE_AVATAR}:</label><br /><span>{L_LINK_REMOTE_AVATAR_EXPLAIN}</span></td>
- <td class="row2"><input name="remotelink" type="text" id="remotelink" value="" /></td>
- </tr>
- <tr>
- <td class="row1" width="35%"><label for="width">{L_LINK_REMOTE_SIZE}:</label><br /><span>{L_LINK_REMOTE_SIZE_EXPLAIN}</span></td>
- <td class="row2"><input name="width" type="text" id="width" size="3" value="{AVATAR_WIDTH}" /> <span>px X </span> <input type="text" name="height" size="3" value="{AVATAR_HEIGHT}" /> <span>px</span></td>
- </tr>
- <!-- ENDIF -->
- <!-- IF S_DISPLAY_GALLERY -->
- <tr>
- <td class="row1" width="35%"><label>{L_AVATAR_GALLERY}:</label></td>
- <td class="row2"><input class="btnmain" type="submit" name="display_gallery" value="{L_DISPLAY_GALLERY}" /></td>
- </tr>
- <!-- ENDIF -->
- <!-- ELSE -->
-
- <tr>
- <th colspan="2">{L_AVATAR_GALLERY}</th>
- </tr>
- <tr>
- <td class="row1" width="35%"><label for="category">{L_AVATAR_CATEGORY}:</label></td>
- <td class="row2"><select name="category" id="category">{S_CAT_OPTIONS}</select>&nbsp;<input class="btnmain" type="submit" value="{L_GO}" name="display_gallery" /></td>
- </tr>
- <tr>
- <td class="row1" width="35%">
- <table cellspacing="1">
- <!-- BEGIN avatar_row -->
- <tr>
- <!-- BEGIN avatar_column -->
- <td class="row1" style="text-align: center;"><img src="{avatar_row.avatar_column.AVATAR_IMAGE}" alt="{avatar_row.avatar_column.AVATAR_NAME}" title="{avatar_row.avatar_column.AVATAR_NAME}" /></td>
- <!-- END avatar_column -->
- </tr>
- <tr>
- <!-- BEGIN avatar_option_column -->
- <td class="row2" style="text-align: center;"><input type="radio" class="radio" name="avatar_select" value="{avatar_row.avatar_option_column.S_OPTIONS_AVATAR}" /></td>
- <!-- END avatar_option_column -->
- </tr>
- <!-- END avatar_row -->
- </table>
- </td>
- <td class="row2"><input class="btnmain" type="submit" name="cancel" value="{L_CANCEL}" /></td>
- </tr>
-
- <!-- ENDIF -->
+<!-- IF not S_AVATARS_ENABLED -->
+ <tr>
+ <td class="row3" colspan="2" align="center">{L_AVATAR_FEATURES_DISABLED}</td>
+ </tr>
+<!-- ENDIF -->
+ <tr>
+ <th colspan="2">{L_AVATAR_SELECT}</th>
+ </tr>
+ <tr>
+ <td class="row1" width="35%"><b class="genmed">{L_AVATAR_TYPE}{L_COLON}</b></td>
+ <td class="row2">
+ <select name="avatar_driver" id="avatar_driver">
+ <option value="">{L_NO_AVATAR_CATEGORY}</option>
+ <!-- BEGIN avatar_drivers -->
+ <option value="{avatar_drivers.DRIVER}"<!-- IF avatar_drivers.SELECTED --> selected="selected"<!-- ENDIF -->>{avatar_drivers.L_TITLE}</option>
+ <!-- END avatar_drivers -->
+ </select></td>
+ </tr>
+<!-- BEGIN avatar_drivers -->
+ <tr class="avatar_option_{avatar_drivers.DRIVER}">
+ <td class="row1" width="35%" colspan="2"><noscript><b class="genmed">{avatar_drivers.L_TITLE} </b><br /></noscript>{avatar_drivers.L_EXPLAIN}</span></td>
+ </tr>
+ <tr class="avatar_option_{avatar_drivers.DRIVER}">
+ <td colspan="2" style="padding: 0">{avatar_drivers.OUTPUT}</td>
+ </tr>
+<!-- END avatar_drivers -->
<tr>
- <td class="cat" colspan="2" align="center"><input class="btnlite" type="submit" id="submit" name="update" value="{L_SUBMIT}" />&nbsp;
+ <td class="cat" colspan="2" align="center">{S_HIDDEN_FIELDS}<input class="btnlite" type="submit" id="submit" name="update" value="{L_SUBMIT}" />&nbsp;
<input class="btnmain" type="reset" id="reset" name="reset" value="{L_RESET}" /></td>
</tr>
</table>
+<!-- INCLUDEJS avatars.js -->
+
<!-- ELSEIF S_LIST -->
<h1>{L_GROUP_MEMBERS}</h1>
@@ -185,10 +158,10 @@
</table>
<div class="pagination" style="float: {S_CONTENT_FLOW_BEGIN};">
- <!-- IF PAGINATION -->
+ <!-- IF .pagination -->
<!-- INCLUDE pagination.html -->
<!-- ELSE -->
- {S_ON_PAGE}
+ {PAGE_NUMBER}
<!-- ENDIF -->
</div>
@@ -204,11 +177,11 @@
<th colspan="2">{L_ADD_USERS}</th>
</tr>
<tr>
- <td class="row1"><label for="default">{L_USER_GROUP_DEFAULT}:</label><br /><span>{L_USER_GROUP_DEFAULT_EXPLAIN}</span></td>
+ <td class="row1"><label for="default">{L_USER_GROUP_DEFAULT}{L_COLON}</label><br /><span>{L_USER_GROUP_DEFAULT_EXPLAIN}</span></td>
<td class="row2"><input name="default" type="radio" class="radio" value="1" /> {L_YES} &nbsp; <input name="default" type="radio" class="radio" id="default" value="0" checked="checked" /> {L_NO}</td>
</tr>
<tr>
- <td class="row1"><label for="usernames">{L_USERNAME}:</label><br /><span>{L_USERNAMES_EXPLAIN}</span></td>
+ <td class="row1"><label for="usernames">{L_USERNAME}{L_COLON}</label><br /><span>{L_USERNAMES_EXPLAIN}</span></td>
<td class="row2"><textarea id="usernames" name="usernames" cols="40" rows="5"></textarea><br />[ <a href="{U_FIND_USERNAME}" onclick="find_username(this.href); return false;">{L_FIND_USERNAME}</a> ]</td>
</tr>
<tr>
@@ -254,4 +227,4 @@
<!-- ENDIF -->
-<!-- INCLUDE ucp_footer.html --> \ No newline at end of file
+<!-- INCLUDE ucp_footer.html -->
diff --git a/phpBB/styles/subsilver2/template/ucp_groups_membership.html b/phpBB/styles/subsilver2/template/ucp_groups_membership.html
index b92dabc967..846d48007e 100644
--- a/phpBB/styles/subsilver2/template/ucp_groups_membership.html
+++ b/phpBB/styles/subsilver2/template/ucp_groups_membership.html
@@ -86,8 +86,8 @@
<!-- END nonmember -->
<tr>
- <td class="cat" colspan="3"><!-- IF S_CHANGE_DEFAULT --><div style="float: {S_CONTENT_FLOW_BEGIN};"><input class="btnlite" type="submit" name="change_default" value="{L_CHANGE_DEFAULT_GROUP}" /></div><!-- ENDIF --><div style="float: {S_CONTENT_FLOW_END};"><span class="genmed">{L_SELECT}: </span><select name="action"><option value="join">{L_JOIN_SELECTED}</option><option value="resign">{L_RESIGN_SELECTED}</option><option value="demote">{L_DEMOTE_SELECTED}</option></select>&nbsp;<input class="btnmain" type="submit" name="submit" value="{L_SUBMIT}" />&nbsp;</div></td>
+ <td class="cat" colspan="3"><!-- IF S_CHANGE_DEFAULT --><div style="float: {S_CONTENT_FLOW_BEGIN};"><input class="btnlite" type="submit" name="change_default" value="{L_CHANGE_DEFAULT_GROUP}" /></div><!-- ENDIF --><div style="float: {S_CONTENT_FLOW_END};"><span class="genmed">{L_SELECT}{L_COLON} </span><select name="action"><option value="join">{L_JOIN_SELECTED}</option><option value="resign">{L_RESIGN_SELECTED}</option><option value="demote">{L_DEMOTE_SELECTED}</option></select>&nbsp;<input class="btnmain" type="submit" name="submit" value="{L_SUBMIT}" />&nbsp;</div></td>
</tr>
</table>
-<!-- INCLUDE ucp_footer.html --> \ No newline at end of file
+<!-- INCLUDE ucp_footer.html -->
diff --git a/phpBB/styles/subsilver2/template/ucp_header.html b/phpBB/styles/subsilver2/template/ucp_header.html
index 4ad27738fa..e3aaef6943 100644
--- a/phpBB/styles/subsilver2/template/ucp_header.html
+++ b/phpBB/styles/subsilver2/template/ucp_header.html
@@ -15,7 +15,7 @@
</tr>
<!-- IF not S_ALLOW_MASS_PM -->
<tr>
- <td class="row1"><b class="genmed">{L_USERNAME}:</b><br />[ <a href="{U_FIND_USERNAME}" onclick="find_username(this.href); return false;">{L_FIND_USERNAME}</a> ]</td>
+ <td class="row1"><b class="genmed">{L_USERNAME}{L_COLON}</b><br />[ <a href="{U_FIND_USERNAME}" onclick="find_username(this.href); return false;">{L_FIND_USERNAME}</a> ]</td>
</tr>
<tr>
@@ -23,7 +23,7 @@
</tr>
<!-- ELSE -->
<tr>
- <td class="row1"><b class="genmed">{L_USERNAMES}:</b></td>
+ <td class="row1"><b class="genmed">{L_USERNAMES}{L_COLON}</b></td>
</tr>
<tr>
<td class="row2"><textarea name="username_list" rows="5" cols="22" tabindex="1"></textarea><br />
@@ -33,7 +33,7 @@
<!-- ENDIF -->
<!-- IF S_GROUP_OPTIONS -->
<tr>
- <td class="row1"><b class="genmed">{L_USERGROUPS}:</b></td>
+ <td class="row1"><b class="genmed">{L_USERGROUPS}{L_COLON}</b></td>
</tr>
<tr>
<td class="row2"><select name="group_list[]" multiple="multiple" size="5" style="width:150px">{S_GROUP_OPTIONS}</select></td>
diff --git a/phpBB/styles/subsilver2/template/ucp_login_link.html b/phpBB/styles/subsilver2/template/ucp_login_link.html
new file mode 100644
index 0000000000..5d8e3ee27b
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/ucp_login_link.html
@@ -0,0 +1,74 @@
+<!-- INCLUDE overall_header.html -->
+
+<table class="tablebg" width="100%" cellspacing="1">
+ <tr>
+ <th>{SITENAME} - {L_LOGIN_LINK}</th>
+ </tr>
+
+ <tr>
+ <td class="row1" align="center"><span class="genmed">{L_LOGIN_LINK_EXPLAIN}</span></td>
+ </tr>
+
+ <!-- IF LOGIN_LINK_ERROR -->
+ <tr>
+ <td class="row1" align="center"><span class="genmed error">{LOGIN_LINK_ERROR}</span></td>
+ </tr>
+ <!-- ENDIF -->
+
+ <tr>
+ <td class="row1">
+ <form action="{REGISTER_ACTION}" method="post" id="register">
+ <table width="100%" cellspacing="1">
+ <tr>
+ <th colspan="2">{L_REGISTER}</th>
+ </tr>
+
+ <tr>
+ <td>{S_HIDDEN_FIELDS}<input type="submit" name="register" tabindex="1" value="{L_REGISTER}" class="button1" /></td>
+ </tr>
+ </table>
+ </form>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="row1">
+ <form action="{LOGIN_ACTION}" method="post" id="login">
+ <table width="100%" cellspacing="1">
+ <tr>
+ <th colspan="2">{L_LOGIN}</th>
+ </tr>
+
+ <!-- IF LOGIN_ERROR -->
+ <tr>
+ <td class="row1" align="center" colspan="2"><span class="genmed error">{LOGIN_ERROR}</span></td>
+ </tr>
+ <!-- ENDIF -->
+
+ <tr>
+ <td><label for="{USERNAME_CREDENTIAL}">{L_USERNAME}{L_COLON}</label></td>
+ <td><input type="text" tabindex="2" name="{USERNAME_CREDENTIAL}" id="{USERNAME_CREDENTIAL}" size="25" value="{LOGIN_USERNAME}" class="inputbox autowidth" /></td>
+ </tr>
+
+ <tr>
+ <td><label for="{PASSWORD_CREDENTIAL}">{L_PASSWORD}{L_COLON}</label></td>
+ <td><input type="password" tabindex="3" id="{PASSWORD_CREDENTIAL}" name="{PASSWORD_CREDENTIAL}" size="25" class="inputbox autowidth" /></td>
+ </tr>
+
+ <!-- IF CAPTCHA_TEMPLATE and S_CONFIRM_CODE -->
+ <!-- DEFINE $CAPTCHA_TAB_INDEX = 4 -->
+ <!-- INCLUDE {CAPTCHA_TEMPLATE} -->
+ <!-- ENDIF -->
+
+ {S_LOGIN_REDIRECT}
+ <tr>
+ <td>&nbsp;</td>
+ <td>{S_HIDDEN_FIELDS}<input type="submit" name="login" tabindex="5" value="{L_LOGIN}" class="button1" /></td>
+ </tr>
+ </table>
+ </form>
+ </td>
+ </tr>
+</table>
+
+<!-- INCLUDE overall_footer.html -->
diff --git a/phpBB/styles/subsilver2/template/ucp_main_bookmarks.html b/phpBB/styles/subsilver2/template/ucp_main_bookmarks.html
index 191e25c297..a8c6b4a9a8 100644
--- a/phpBB/styles/subsilver2/template/ucp_main_bookmarks.html
+++ b/phpBB/styles/subsilver2/template/ucp_main_bookmarks.html
@@ -41,10 +41,19 @@
<td class="postdetails" style="padding: 4px" width="100%" colspan="2">{L_DELETED_TOPIC}</td>
<!-- ELSE -->
<td style="padding: 4px;" width="100%" valign="top">
- <p class="topictitle"><!-- IF topicrow.S_UNREAD_TOPIC --><a href="{topicrow.U_NEWEST_POST}">{NEWEST_POST_IMG}</a> <!-- ENDIF -->{topicrow.ATTACH_ICON_IMG} <a href="{topicrow.U_VIEW_TOPIC}">{topicrow.TOPIC_TITLE}</a></p>
- <!-- IF topicrow.S_GLOBAL_TOPIC --><span class="gensmall">{L_GLOBAL_ANNOUNCEMENT}</span><!-- ELSE --><span class="gensmall"><b>{L_FORUM}: </b><a href="{topicrow.U_VIEW_FORUM}">{topicrow.FORUM_NAME}</a></span><!-- ENDIF -->
- <!-- IF topicrow.PAGINATION -->
- <p class="gensmall"> [ {GOTO_PAGE_IMG}{L_GOTO_PAGE}: {topicrow.PAGINATION} ] </p>
+ <p class="topictitle"><!-- IF topicrow.S_UNREAD_TOPIC --><a href="{topicrow.U_NEWEST_POST}">{NEWEST_POST_IMG}</a> <!-- ENDIF -->{topicrow.ATTACH_ICON_IMG} <a href="<!-- IF topicrow.S_UNREAD_TOPIC -->{topicrow.U_NEWEST_POST}<!-- ELSE -->{topicrow.U_VIEW_TOPIC}<!-- ENDIF -->">{topicrow.TOPIC_TITLE}</a></p>
+ <!-- IF topicrow.S_GLOBAL_TOPIC --><span class="gensmall">{L_GLOBAL_ANNOUNCEMENT}</span><!-- ELSE --><span class="gensmall"><b>{L_FORUM}{L_COLON} </b><a href="{topicrow.U_VIEW_FORUM}">{topicrow.FORUM_NAME}</a></span><!-- ENDIF -->
+ <!-- IF .topicrow.pagination -->
+ <p class="gensmall"> [ {GOTO_PAGE_IMG}{L_GOTO_PAGE}{L_COLON}
+ <!-- BEGIN pagination -->
+ <!-- IF topicrow.pagination.S_IS_PREV -->
+ <!-- ELSEIF topicrow.pagination.S_IS_CURRENT --><strong>{topicrow.pagination.PAGE_NUMBER}</strong>
+ <!-- ELSEIF topicrow.pagination.S_IS_ELLIPSIS --> {L_ELLIPSIS}
+ <!-- ELSEIF topicrow.pagination.S_IS_NEXT -->
+ <!-- ELSE --><a href="{topicrow.pagination.PAGE_URL}">{topicrow.pagination.PAGE_NUMBER}</a>
+ <!-- ENDIF -->
+ <!-- END pagination -->
+ ] </p>
<!-- ENDIF -->
</td>
<td style="padding: 4px;" align="{S_CONTENT_FLOW_BEGIN}" valign="top" nowrap="nowrap">
@@ -74,4 +83,4 @@
<div class="gensmall" style="float: {S_CONTENT_FLOW_END}; padding-top: 2px;"><b><a href="#" onclick="marklist('ucp', 't', true); return false;">{L_MARK_ALL}</a> :: <a href="#" onclick="marklist('ucp', 't', false); return false;">{L_UNMARK_ALL}</a></b></div>
<!-- ENDIF -->
-<!-- INCLUDE ucp_footer.html --> \ No newline at end of file
+<!-- INCLUDE ucp_footer.html -->
diff --git a/phpBB/styles/subsilver2/template/ucp_main_drafts.html b/phpBB/styles/subsilver2/template/ucp_main_drafts.html
index e61c253b04..d63d678250 100644
--- a/phpBB/styles/subsilver2/template/ucp_main_drafts.html
+++ b/phpBB/styles/subsilver2/template/ucp_main_drafts.html
@@ -32,8 +32,8 @@
<td class="postdetails" style="padding: 4px;" nowrap="nowrap">{draftrow.DATE}</td>
<td style="padding: 4px;" valign="top" width="100%">
<p class="topictitle">{draftrow.DRAFT_SUBJECT}</p>
- <!-- IF draftrow.S_LINK_TOPIC --><span class="gensmall">{L_TOPIC}: <a href="{draftrow.U_VIEW}">{draftrow.TITLE}</a></span>
- <!-- ELSEIF draftrow.S_LINK_FORUM --><span class="gensmall">{L_FORUM}: <a href="{draftrow.U_VIEW}">{draftrow.TITLE}</a></span>
+ <!-- IF draftrow.S_LINK_TOPIC --><span class="gensmall">{L_TOPIC}{L_COLON} <a href="{draftrow.U_VIEW}">{draftrow.TITLE}</a></span>
+ <!-- ELSEIF draftrow.S_LINK_FORUM --><span class="gensmall">{L_FORUM}{L_COLON} <a href="{draftrow.U_VIEW}">{draftrow.TITLE}</a></span>
<!-- ELSEIF draftrow.S_LINK_PM --><span class="gensmall">{L_PRIVATE_MESSAGE}</span>
<!-- ELSE --><span class="gensmall">{L_NO_TOPIC_FORUM}</span><!-- ENDIF -->
</td>
@@ -54,11 +54,11 @@
<!-- ELSEIF S_EDIT_DRAFT -->
<tr>
- <td class="row1" width="22%"><b class="genmed">{L_SUBJECT}:</b></td>
+ <td class="row1" width="22%"><b class="genmed">{L_SUBJECT}{L_COLON}</b></td>
<td class="row2"><input class="post" style="width:450px" type="text" name="subject" size="45" maxlength="64" tabindex="2" value="{DRAFT_SUBJECT}" /></td>
</tr>
<tr>
- <td class="row1" width="22%"><b class="genmed">{L_MESSAGE}: </b><br /><span class="gensmall">{L_EDIT_DRAFT_EXPLAIN}</span></td>
+ <td class="row1" width="22%"><b class="genmed">{L_MESSAGE}{L_COLON} </b><br /><span class="gensmall">{L_EDIT_DRAFT_EXPLAIN}</span></td>
<td class="row2">
<script type="text/javascript">
// <![CDATA[
@@ -75,12 +75,7 @@
<td colspan="9">
<table cellspacing="0" cellpadding="0" border="0" width="100%">
<tr>
- <td align="{S_CONTENT_FLOW_BEGIN}">
- <script type="text/javascript">
- // <![CDATA[
- colorPalette('h', 6, 5)
- // ]]>
- </script>
+ <td align="{S_CONTENT_FLOW_BEGIN}" id="color_palette_placeholder" data-orientation="h" data-width="11" data-height="10" data-bbcode="true">
</td>
</tr>
</table>
@@ -98,4 +93,4 @@
<!-- ENDIF -->
</table>
-<!-- INCLUDE ucp_footer.html --> \ No newline at end of file
+<!-- INCLUDE ucp_footer.html -->
diff --git a/phpBB/styles/subsilver2/template/ucp_main_front.html b/phpBB/styles/subsilver2/template/ucp_main_front.html
index dc945c83d6..bc26266bef 100644
--- a/phpBB/styles/subsilver2/template/ucp_main_front.html
+++ b/phpBB/styles/subsilver2/template/ucp_main_front.html
@@ -16,7 +16,7 @@
<!-- IF topicrow.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
<td class="row1" width="25" align="center">{topicrow.TOPIC_FOLDER_IMG}</td>
<td class="row1" width="100%">
- <p class="topictitle"><!-- IF topicrow.S_UNREAD --><a href="{topicrow.U_NEWEST_POST}">{NEWEST_POST_IMG}</a> <!-- ENDIF -->{topicrow.ATTACH_ICON_IMG} <a href="{topicrow.U_VIEW_TOPIC}">{topicrow.TOPIC_TITLE}</a></p><p class="gensmall">{topicrow.GOTO_PAGE}</p>
+ <p class="topictitle"><!-- IF topicrow.S_UNREAD --><a href="{topicrow.U_NEWEST_POST}">{NEWEST_POST_IMG}</a> <!-- ENDIF -->{topicrow.ATTACH_ICON_IMG} <a href="<!-- IF topicrow.S_UNREAD -->{topicrow.U_NEWEST_POST}<!-- ELSE -->{topicrow.U_VIEW_TOPIC}<!-- ENDIF -->">{topicrow.TOPIC_TITLE}</a></p><p class="gensmall">{topicrow.GOTO_PAGE}</p>
</td>
<td class="row1" width="120" align="center" nowrap="nowrap">
<p class="topicdetails">{topicrow.LAST_POST_TIME}</p>
@@ -38,26 +38,26 @@
<td class="row1" colspan="3">
<table width="100%" cellspacing="1" cellpadding="4">
<tr>
- <td align="{S_CONTENT_FLOW_END}" valign="top" nowrap="nowrap"><b class="genmed">{L_JOINED}: </b></td>
+ <td align="{S_CONTENT_FLOW_END}" valign="top" nowrap="nowrap"><b class="genmed">{L_JOINED}{L_COLON} </b></td>
<td width="100%"><b class="gen">{JOINED}</b></td>
</tr>
<tr>
- <td align="{S_CONTENT_FLOW_END}" valign="top" nowrap="nowrap"><b class="genmed">{L_TOTAL_POSTS}: </b></td>
+ <td align="{S_CONTENT_FLOW_END}" valign="top" nowrap="nowrap"><b class="genmed">{L_TOTAL_POSTS}{L_COLON} </b></td>
<td><!-- IF POSTS_PCT --><b class="gen">{POSTS}</b><br /><span class="genmed">[{POSTS_PCT} / {POSTS_DAY}]<!-- IF S_DISPLAY_SEARCH --><br /><a href="{U_SEARCH_SELF}">{L_SEARCH_YOUR_POSTS}</a><!-- ENDIF --></span><!-- ELSE --><b class="gen">{POSTS}<b><!-- ENDIF --></td>
</tr>
<!-- IF S_SHOW_ACTIVITY -->
<tr>
- <td align="{S_CONTENT_FLOW_END}" valign="top" nowrap="nowrap"><b class="genmed">{L_ACTIVE_IN_FORUM}: </b></td>
+ <td align="{S_CONTENT_FLOW_END}" valign="top" nowrap="nowrap"><b class="genmed">{L_ACTIVE_IN_FORUM}{L_COLON} </b></td>
<td><!-- IF ACTIVE_FORUM != '' --><b><a class="gen" href="{U_ACTIVE_FORUM}">{ACTIVE_FORUM}</a></b><br /><span class="genmed">[ {ACTIVE_FORUM_POSTS} / {ACTIVE_FORUM_PCT} ]</span><!-- ELSE --><span class="gen">-</span><!-- ENDIF --></td>
</tr>
<tr>
- <td align="{S_CONTENT_FLOW_END}" valign="top" nowrap="nowrap"><b class="genmed">{L_ACTIVE_IN_TOPIC}: </b></td>
+ <td align="{S_CONTENT_FLOW_END}" valign="top" nowrap="nowrap"><b class="genmed">{L_ACTIVE_IN_TOPIC}{L_COLON} </b></td>
<td><!-- IF ACTIVE_TOPIC != '' --><b><a class="gen" href="{U_ACTIVE_TOPIC}">{ACTIVE_TOPIC}</a></b><br /><span class="genmed">[ {ACTIVE_TOPIC_POSTS} / {ACTIVE_TOPIC_PCT} ]</span><!-- ELSE --><span class="gen">-</span><!-- ENDIF --></td>
</tr>
<!-- ENDIF -->
<!-- IF WARNINGS -->
<tr>
- <td align="{S_CONTENT_FLOW_END}" valign="middle" nowrap="nowrap"><b class="genmed">{L_YOUR_WARNINGS}: </b></td>
+ <td align="{S_CONTENT_FLOW_END}" valign="middle" nowrap="nowrap"><b class="genmed">{L_YOUR_WARNINGS}{L_COLON} </b></td>
<td class="genmed">{WARNING_IMG} [ <b>{WARNINGS}</b> ]</td>
</tr>
<!-- ENDIF -->
@@ -69,4 +69,4 @@
</tr>
</table>
-<!-- INCLUDE ucp_footer.html --> \ No newline at end of file
+<!-- INCLUDE ucp_footer.html -->
diff --git a/phpBB/styles/subsilver2/template/ucp_main_subscribed.html b/phpBB/styles/subsilver2/template/ucp_main_subscribed.html
index 9335d01f12..9de44dd9ed 100644
--- a/phpBB/styles/subsilver2/template/ucp_main_subscribed.html
+++ b/phpBB/styles/subsilver2/template/ucp_main_subscribed.html
@@ -17,7 +17,7 @@
<!-- IF forumrow.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
<td style="padding: 4px;" width="20" align="center" valign="middle">{forumrow.FORUM_FOLDER_IMG}</td>
<td style="padding: 4px;" width="100%"><p class="topictitle"><a href="{forumrow.U_VIEWFORUM}">{forumrow.FORUM_NAME}</a></p></td>
- <td class="gensmall" style="padding: 4px;" align="center" valign="middle" nowrap="nowrap"><!-- IF forumrow.LAST_POST_TIME -->{forumrow.LAST_POST_TIME}<br />{forumrow.LAST_POST_AUTHOR_FULL} <a href="{forumrow.U_LAST_POST}">{LAST_POST_IMG}</a><!-- ELSE -->{L_NO_POSTS}<!-- ENDIF --></td>
+ <td class="gensmall" style="padding: 4px;" align="center" valign="middle" nowrap="nowrap"><!-- IF forumrow.LAST_POST_TIME -->{forumrow.LAST_POST_TIME}<br />{forumrow.LAST_POST_AUTHOR_FULL} <a href="{forumrow.U_LAST_POST}" class="imageset">{LAST_POST_IMG}</a><!-- ELSE -->{L_NO_POSTS}<!-- ENDIF --></td>
<td style="padding: 4px;"> <input type="checkbox" class="radio" name="f[{forumrow.FORUM_ID}]" /> </td>
</tr>
<!-- BEGINELSE -->
@@ -50,16 +50,25 @@
<!-- IF topicrow.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
<td style="padding: 4px;" width="20" align="center" valign="middle">{topicrow.TOPIC_FOLDER_IMG}</td>
<td style="padding: 4px;" width="100%" valign="top">
- <p class="topictitle"><!-- IF topicrow.S_UNREAD_TOPIC --><a href="{topicrow.U_NEWEST_POST}">{NEWEST_POST_IMG}</a> <!-- ENDIF -->{topicrow.ATTACH_ICON_IMG} <a href="{topicrow.U_VIEW_TOPIC}">{topicrow.TOPIC_TITLE}</a></p>
- <!-- IF topicrow.S_GLOBAL_TOPIC --><span class="gensmall">{L_GLOBAL_ANNOUNCEMENT}</span><!-- ELSE --><span class="gensmall"><b>{L_FORUM}: </b><a href="{topicrow.U_VIEW_FORUM}">{topicrow.FORUM_NAME}</a></span><!-- ENDIF -->
- <!-- IF topicrow.PAGINATION -->
- <p class="gensmall"> [ {GOTO_PAGE_IMG}{L_GOTO_PAGE}: {topicrow.PAGINATION} ] </p>
+ <p class="topictitle"><!-- IF topicrow.S_UNREAD_TOPIC --><a href="{topicrow.U_NEWEST_POST}" class="imageset">{NEWEST_POST_IMG}</a> <!-- ENDIF -->{topicrow.ATTACH_ICON_IMG} <a href="<!-- IF topicrow.S_UNREAD_TOPIC -->{topicrow.U_NEWEST_POST}<!-- ELSE -->{topicrow.U_VIEW_TOPIC}<!-- ENDIF -->">{topicrow.TOPIC_TITLE}</a></p>
+ <!-- IF topicrow.S_GLOBAL_TOPIC --><span class="gensmall">{L_GLOBAL_ANNOUNCEMENT}</span><!-- ELSE --><span class="gensmall"><b>{L_FORUM}{L_COLON} </b><a href="{topicrow.U_VIEW_FORUM}">{topicrow.FORUM_NAME}</a></span><!-- ENDIF -->
+ <!-- IF .topicrow.pagination -->
+ <p class="gensmall"> [ {GOTO_PAGE_IMG}{L_GOTO_PAGE}{L_COLON}
+ <!-- BEGIN pagination -->
+ <!-- IF topicrow.pagination.S_IS_PREV -->
+ <!-- ELSEIF topicrow.pagination.S_IS_CURRENT --><strong>{topicrow.pagination.PAGE_NUMBER}</strong>
+ <!-- ELSEIF topicrow.pagination.S_IS_ELLIPSIS --> {L_ELLIPSIS}
+ <!-- ELSEIF topicrow.pagination.S_IS_NEXT -->
+ <!-- ELSE --><a href="{topicrow.pagination.PAGE_URL}">{topicrow.pagination.PAGE_NUMBER}</a>
+ <!-- ENDIF -->
+ <!-- END pagination -->
+ ] </p>
<!-- ENDIF -->
</td>
<td style="padding: 4px;" align="{S_CONTENT_FLOW_BEGIN}" valign="top" nowrap="nowrap">
<p class="topicdetails">{topicrow.LAST_POST_TIME}</p>
<p class="topicdetails">{topicrow.LAST_POST_AUTHOR_FULL}
- <a href="{topicrow.U_LAST_POST}">{LAST_POST_IMG}</a>
+ <a href="{topicrow.U_LAST_POST}" class="imageset">{LAST_POST_IMG}</a>
</p>
</td>
<td style="padding: 4px;"> <input type="checkbox" class="radio" name="t[{topicrow.TOPIC_ID}]" /> </td>
@@ -81,4 +90,4 @@
<div class="gensmall" style="float: {S_CONTENT_FLOW_END}; padding-top: 2px;"><b><a href="#" onclick="marklist('ucp', 't', true); marklist('ucp', 'f', true); return false;">{L_MARK_ALL}</a> :: <a href="#" onclick="marklist('ucp', 't', false);marklist('ucp', 'f', false); return false;">{L_UNMARK_ALL}</a></b></div>
<!-- ENDIF -->
-<!-- INCLUDE ucp_footer.html --> \ No newline at end of file
+<!-- INCLUDE ucp_footer.html -->
diff --git a/phpBB/styles/subsilver2/template/ucp_notifications.html b/phpBB/styles/subsilver2/template/ucp_notifications.html
new file mode 100644
index 0000000000..a8b0d2b896
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/ucp_notifications.html
@@ -0,0 +1,139 @@
+<!-- INCLUDE ucp_header.html -->
+
+<form id="ucp" method="post" action="{S_UCP_ACTION}"{S_FORM_ENCTYPE}>
+
+<!-- IF MODE == 'notification_options' -->
+ <table width="100%" cellspacing="1">
+ <tr>
+ <th colspan="{NOTIFICATION_TYPES_COLS}">{TITLE}</th>
+ </tr>
+ <tr>
+ <td class="row1" colspan="{NOTIFICATION_TYPES_COLS}" align="center"><span class="genmed">{TITLE_EXPLAIN}</span></td>
+ </tr>
+ <tr>
+ <th>{L_NOTIFICATION_TYPE}</th>
+ <th width="10%">{L_NOTIFICATIONS}</th>
+ <!-- BEGIN notification_methods -->
+ <th width="10%">{notification_methods.NAME}</th>
+ <!-- END notification_methods -->
+ </tr>
+
+ <!-- BEGIN notification_types -->
+ <!-- IF notification_types.GROUP_NAME -->
+ <tr>
+ <td class="row3" colspan="{NOTIFICATION_TYPES_COLS}">{notification_types.GROUP_NAME}</td>
+ </tr>
+ <!-- ELSE -->
+ <!-- IF notification_types.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
+ <td>
+ {notification_types.NAME}
+ <!-- IF notification_types.EXPLAIN --><br />&nbsp; &nbsp;{notification_types.EXPLAIN}<!-- ENDIF -->
+ </td>
+ <td align="center"><input type="checkbox" name="{notification_types.TYPE}_notification"<!-- IF notification_types.SUBSCRIBED --> checked="checked"<!-- ENDIF --> /></td>
+ <!-- BEGIN notification_methods -->
+ <td align="center"><input type="checkbox" name="{notification_types.TYPE}_{notification_methods.METHOD}"<!-- IF notification_methods.SUBSCRIBED --> checked="checked"<!-- ENDIF --> /></td>
+ <!-- END notification_methods -->
+ </tr>
+ <!-- ENDIF -->
+ <!-- END notification_types -->
+ <tr>
+ <td class="cat" colspan="{NOTIFICATION_TYPES_COLS}" align="center">
+ <input type="hidden" name="form_time" value="{FORM_TIME}" />
+ {S_HIDDEN_FIELDS}
+ <input class="btnmain" type="submit" name="submit" value="{L_SUBMIT}" />&nbsp;&nbsp;
+ <input class="btnlite" type="reset" value="{L_RESET}" name="reset" />
+ {S_FORM_TOKEN}
+ </td>
+ </tr>
+ </table>
+<!-- ELSE -->
+ <table class="tablebg" width="100%" cellspacing="1" cellpadding="0">
+ <tr>
+ <td class="row1">
+ <table border="0" cellspacing="0" cellpadding="0" width="100%">
+ <tr>
+ <td align="{S_CONTENT_FLOW_BEGIN}">
+ <!-- IF TOTAL_COUNT -->
+ <table width="100%" cellspacing="1">
+ <tr>
+ <td class="nav" valign="middle" nowrap="nowrap">&nbsp;{PAGE_NUMBER}</td>
+ <td class="gensmall" nowrap="nowrap" width="100%">&nbsp;{L_NOTIFICATIONS} [ <b>{TOTAL_COUNT}</b> ]&nbsp;</td>
+ </tr>
+ </table>
+ <!-- ENDIF -->
+ </td>
+ <td align="{S_CONTENT_FLOW_END}"><!-- INCLUDE pagination.html --></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+
+ <div class="notification_list">
+ <table class="tablebg" width="100%" cellspacing="1">
+ <tr>
+ <td class="cat" colspan="3">
+ <table width="100%" cellspacing="0">
+ <tr class="nav">
+ <td align="{S_CONTENT_FLOW_END}" valign="middle"><!-- IF U_MARK_ALL --><a href="{U_MARK_ALL}">{L_NOTIFICATIONS_MARK_ALL_READ}</a><!-- ENDIF --></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <th colspan="2">{L_NOTIFICATIONS}</th>
+ <th width="15%">{L_MARK_READ}</th>
+ </tr>
+ <!-- BEGIN notification_list -->
+ <tr class="row<!-- IF notification_list.UNREAD -->3<!-- ELSEIF notification_list.S_ROW_COUNT is even -->1<!-- ELSE -->2<!-- ENDIF -->">
+ <td width="50">
+ <!-- IF notification_list.AVATAR -->{notification_list.AVATAR}<!-- ELSE --><img src="{T_THEME_PATH}/images/no_avatar.gif" alt="" /><!-- ENDIF -->
+ </td>
+ <td valign="top">
+ <span class="gen">
+ <!-- IF notification_list.URL --><a href="<!-- IF notification_list.UNREAD -->{notification_list.U_MARK_READ}<!-- ELSE -->{notification_list.URL}<!-- ENDIF -->"><!-- ENDIF -->
+ <strong>{notification_list.FORMATTED_TITLE}</strong>
+ <!-- IF notification_list.URL --></a><!-- ENDIF --><br />
+ {notification_list.TIME}
+ </span>
+ </td>
+ <td align="center">
+ <input type="checkbox" name="mark[]" value="{notification_list.NOTIFICATION_ID}"<!-- IF not notification_list.UNREAD --> disabled="disabled"<!-- ENDIF --> />
+ </td>
+ </tr>
+ <!-- END notification_list -->
+ <tr>
+ <td class="cat" colspan="3" align="center">
+ <input type="hidden" name="form_time" value="{FORM_TIME}" />
+ {S_HIDDEN_FIELDS}
+ <input class="btnmain" type="submit" name="submit" value="{L_MARK_READ}" />
+ {S_FORM_TOKEN}
+ </td>
+ </tr>
+ </table>
+ </div>
+
+ <!-- IF .pagination -->
+ <table class="tablebg" width="100%" cellspacing="1" cellpadding="0">
+ <tr>
+ <td class="row1">
+ <table border="0" cellspacing="0" cellpadding="0" width="100%">
+ <tr>
+ <td align="{S_CONTENT_FLOW_BEGIN}">
+ <!-- INCLUDE pagination.html -->
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ <!-- ENDIF -->
+<!-- ENDIF -->
+
+<!-- IF .notifications -->
+<div class="gensmall" style="float: {S_CONTENT_FLOW_END}; padding-top: 2px;"><b><a href="#" onclick="$('#ucp input:checkbox').attr('checked', true); return false;">{L_MARK_ALL}</a> :: <a href="#" onclick="$('#ucp input:checkbox').attr('checked', false); return false;">{L_UNMARK_ALL}</a></b></div>
+<!-- ENDIF -->
+
+</form>
+
+<!-- INCLUDE ucp_footer.html -->
diff --git a/phpBB/styles/subsilver2/template/ucp_pm_history.html b/phpBB/styles/subsilver2/template/ucp_pm_history.html
index e27417ea3f..ad06da2b7e 100644
--- a/phpBB/styles/subsilver2/template/ucp_pm_history.html
+++ b/phpBB/styles/subsilver2/template/ucp_pm_history.html
@@ -26,7 +26,7 @@
</table>
</td>
<td width="100%"<!-- IF history_row.S_CURRENT_MSG --> class="current"<!-- ENDIF -->>
- <div class="gensmall" style="float: {S_CONTENT_FLOW_BEGIN};"><b>{L_PM_SUBJECT}:</b>&nbsp;{history_row.SUBJECT}</div><div class="gensmall" style="float: {S_CONTENT_FLOW_END};"><b>{L_FOLDER}:</b>&nbsp;{history_row.FOLDER}</div>
+ <div class="gensmall" style="float: {S_CONTENT_FLOW_BEGIN};"><b>{L_PM_SUBJECT}{L_COLON}</b>&nbsp;{history_row.SUBJECT}</div><div class="gensmall" style="float: {S_CONTENT_FLOW_END};"><b>{L_FOLDER}{L_COLON}</b>&nbsp;{history_row.FOLDER}</div>
</td>
</tr>
@@ -48,7 +48,7 @@
<tr valign="middle">
<td width="100%">&nbsp;</td>
<td width="10" nowrap="nowrap">{history_row.MINI_POST_IMG}</td>
- <td class="gensmall" nowrap="nowrap"><b>{L_SENT_AT}:</b> {history_row.SENT_DATE}</td>
+ <td class="gensmall" nowrap="nowrap"><b>{L_SENT_AT}{L_COLON}</b> {history_row.SENT_DATE}</td>
</tr>
</table>
</td>
@@ -59,7 +59,7 @@
<!-- IF history_row.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
<td class="gensmall"><a href="{history_row.U_VIEW_MESSAGE}">{L_VIEW_PM}</a></td>
- <td><div class="gensmall" style="float: {S_CONTENT_FLOW_BEGIN};">&nbsp;<!-- IF history_row.U_PROFILE --><a href="{history_row.U_PROFILE}">{PROFILE_IMG}</a> <!-- ENDIF --> <!-- IF history_row.U_EMAIL --><a href="{history_row.U_EMAIL}">{EMAIL_IMG}</a> <!-- ENDIF -->&nbsp;</div> <div class="gensmall" style="float: {S_CONTENT_FLOW_END};"><!-- IF history_row.U_QUOTE or history_row.MESSAGE_AUTHOR_QUOTE --><a <!-- IF history_row.U_QUOTE -->href="{history_row.U_QUOTE}"<!-- ELSE -->href="#" onclick="addquote({history_row.MSG_ID}, '{history_row.MESSAGE_AUTHOR_QUOTE}', '{LA_WROTE}'); return false;"<!-- ENDIF -->>{QUOTE_IMG}</a> <!-- ENDIF --> <!-- IF history_row.U_POST_REPLY_PM --><a href="{history_row.U_POST_REPLY_PM}">{REPLY_IMG}</a><!-- ENDIF -->&nbsp;</div></td>
+ <td><div class="gensmall" style="float: {S_CONTENT_FLOW_BEGIN};">&nbsp;<!-- IF history_row.U_PROFILE --><a href="{history_row.U_PROFILE}" class="imageset">{PROFILE_IMG}</a> <!-- ENDIF --> <!-- IF history_row.U_EMAIL --><a href="{history_row.U_EMAIL}" class="imageset">{EMAIL_IMG}</a> <!-- ENDIF -->&nbsp;</div> <div class="gensmall" style="float: {S_CONTENT_FLOW_END};"><!-- IF history_row.U_QUOTE or history_row.MESSAGE_AUTHOR_QUOTE --><a <!-- IF history_row.U_QUOTE -->href="{history_row.U_QUOTE}"<!-- ELSE -->href="#" onclick="addquote({history_row.MSG_ID}, '{history_row.MESSAGE_AUTHOR_QUOTE}', '{LA_WROTE}'); return false;"<!-- ENDIF --> class="imageset">{QUOTE_IMG}</a> <!-- ENDIF --> <!-- IF history_row.U_POST_REPLY_PM --><a href="{history_row.U_POST_REPLY_PM}" class="imageset">{REPLY_IMG}</a><!-- ENDIF -->&nbsp;</div></td>
</tr>
<tr>
<td class="spacer" colspan="2"><img src="images/spacer.gif" alt="" width="1" height="1" /></td>
diff --git a/phpBB/styles/subsilver2/template/ucp_pm_message_footer.html b/phpBB/styles/subsilver2/template/ucp_pm_message_footer.html
index d1ef5ebd10..20c5c7fe9f 100644
--- a/phpBB/styles/subsilver2/template/ucp_pm_message_footer.html
+++ b/phpBB/styles/subsilver2/template/ucp_pm_message_footer.html
@@ -31,7 +31,7 @@
<!-- ENDIF -->
<!-- ELSE -->
<form name="sortmsg" method="post" action="{S_PM_ACTION}" style="margin:0px">
- <span class="gensmall">{L_DISPLAY_MESSAGES}:</span> {S_SELECT_SORT_DAYS} <span class="gensmall">{L_SORT_BY}</span> {S_SELECT_SORT_KEY} {S_SELECT_SORT_DIR} <input class="btnlite" type="submit" name="sort" value="{L_GO}" />
+ <span class="gensmall">{L_DISPLAY_MESSAGES}{L_COLON}</span> {S_SELECT_SORT_DAYS} <span class="gensmall">{L_SORT_BY}</span> {S_SELECT_SORT_KEY} {S_SELECT_SORT_DIR} <input class="btnlite" type="submit" name="sort" value="{L_GO}" />
{S_FORM_TOKEN}
</form>
<!-- ENDIF -->
diff --git a/phpBB/styles/subsilver2/template/ucp_pm_options.html b/phpBB/styles/subsilver2/template/ucp_pm_options.html
index 3ff18d8c15..beb867c75a 100644
--- a/phpBB/styles/subsilver2/template/ucp_pm_options.html
+++ b/phpBB/styles/subsilver2/template/ucp_pm_options.html
@@ -20,7 +20,7 @@
</tr>
<!-- IF S_CHECK_DEFINED -->
<tr>
- <td class="row1" width="50" align="{S_CONTENT_FLOW_BEGIN}" valign="top"><b class="gen">{L_IF}:</b></td>
+ <td class="row1" width="50" align="{S_CONTENT_FLOW_BEGIN}" valign="top"><b class="gen">{L_IF}{L_COLON}</b></td>
<td class="row2" align="center" valign="top"><!-- IF S_CHECK_SELECT --><select name="check_option">{S_CHECK_OPTIONS}</select><!-- ELSE --><b class="gen">{CHECK_CURRENT}</b><input type="hidden" name="check_option" value="{CHECK_OPTION}" /><!-- ENDIF --></td>
<td class="row1" width="50" align="{S_CONTENT_FLOW_END}" valign="top"><!-- IF S_CHECK_SELECT --><input type="submit" name="next" value="{L_NEXT_STEP}" class="btnlite" /><!-- ELSE -->&nbsp;<!-- ENDIF --></td>
</tr>
@@ -98,11 +98,11 @@
<th colspan="2">{L_RENAME_FOLDER}</th>
</tr>
<tr>
- <td class="row1" width="200"><b class="gen">{L_RENAME_FOLDER}: </b></td>
+ <td class="row1" width="200"><b class="gen">{L_RENAME_FOLDER}{L_COLON} </b></td>
<td class="row1"><select name="rename_folder_id">{S_FOLDER_OPTIONS}</select></td>
</tr>
<tr>
- <td class="row1" width="200"><b class="gen">{L_NEW_FOLDER_NAME}: </b></td>
+ <td class="row1" width="200"><b class="gen">{L_NEW_FOLDER_NAME}{L_COLON} </b></td>
<td class="row1"><input type="text" class="post" name="new_folder_name" size="30" maxlength="30" /></td>
</tr>
<tr>
@@ -124,7 +124,7 @@
</tr>
<!-- ELSE -->
<tr>
- <td class="row1" width="200"><b class="gen">{L_ADD_FOLDER}: </b></td>
+ <td class="row1" width="200"><b class="gen">{L_ADD_FOLDER}{L_COLON} </b></td>
<td class="row1"><input type="text" class="post" name="foldername" size="30" maxlength="30" /></td>
</tr>
<tr>
@@ -142,7 +142,7 @@
<th colspan="3">{L_REMOVE_FOLDER}</th>
</tr>
<tr>
- <td class="row1" width="200"><b class="gen">{L_REMOVE_FOLDER}: </b></td>
+ <td class="row1" width="200"><b class="gen">{L_REMOVE_FOLDER}{L_COLON} </b></td>
<td class="row1"><select name="remove_folder_id">{S_FOLDER_OPTIONS}</select></td>
<td class="row1"><b class="genmed">{L_AND}</b></td>
</tr>
@@ -168,19 +168,19 @@
<th colspan="2">{L_FOLDER_OPTIONS}</th>
</tr>
<tr>
- <td class="row1" width="200"><span><b class="genmed">{L_IF_FOLDER_FULL}: </b></span></td>
+ <td class="row1" width="200"><span><b class="genmed">{L_IF_FOLDER_FULL}{L_COLON} </b></span></td>
<td class="row1"><input type="radio" class="radio" name="full_action" value="1"{S_DELETE_CHECKED} />&nbsp;<span class="genmed">{L_DELETE_OLDEST_MESSAGES}</span></td>
</tr>
<tr>
<td class="row1" width="200">&nbsp;</td>
- <td class="row1"><input type="radio" class="radio" name="full_action" value="2"{S_MOVE_CHECKED} />&nbsp;<span class="genmed">{L_MOVE_TO_FOLDER}: </span><select name="full_move_to">{S_FULL_FOLDER_OPTIONS}</select></td>
+ <td class="row1"><input type="radio" class="radio" name="full_action" value="2"{S_MOVE_CHECKED} />&nbsp;<span class="genmed">{L_MOVE_TO_FOLDER}{L_COLON} </span><select name="full_move_to">{S_FULL_FOLDER_OPTIONS}</select></td>
</tr>
<tr>
<td class="row1" width="200">&nbsp;</td>
<td class="row1"><input type="radio" class="radio" name="full_action" value="3"{S_HOLD_CHECKED} />&nbsp;<span class="genmed">{L_HOLD_NEW_MESSAGES}</span></td>
</tr>
<tr>
- <td class="row2" width="200"><b class="genmed">{L_DEFAULT_ACTION}: </b><br /><span class="gensmall">{L_DEFAULT_ACTION_EXPLAIN}</span></td>
+ <td class="row2" width="200"><b class="genmed">{L_DEFAULT_ACTION}{L_COLON} </b><br /><span class="gensmall">{L_DEFAULT_ACTION_EXPLAIN}</span></td>
<td class="row2"><span class="genmed">{DEFAULT_ACTION}</span></td>
</tr>
<tr>
diff --git a/phpBB/styles/subsilver2/template/ucp_pm_popup.html b/phpBB/styles/subsilver2/template/ucp_pm_popup.html
deleted file mode 100644
index 68816b88a8..0000000000
--- a/phpBB/styles/subsilver2/template/ucp_pm_popup.html
+++ /dev/null
@@ -1,37 +0,0 @@
-<!-- INCLUDE simple_header.html -->
-
-<script type="text/javascript">
-// <![CDATA[
-/**
-* Jump to inbox
-*/
-function jump_to_inbox(url)
-{
- opener.document.location.href = url.replace(/&amp;/g, '&');
- window.close();
-}
-// ]]>
-</script>
-
-<table width="100%" border="0" cellspacing="0" cellpadding="10">
-<tr>
- <td>
- <table width="100%" border="0" cellspacing="1" cellpadding="4" class="tablebg">
- <tr class="row1">
- <td valign="top" align="center">
- <br /><span class="gen">
- <!-- IF S_NOT_LOGGED_IN -->
- {L_LOGIN_CHECK_PM}
- <!-- ELSE -->
- {MESSAGE}<br /><br />{CLICK_TO_VIEW}
- <!-- ENDIF -->
- </span>
- <br /><br /><span class="genmed"><a href="#" onclick="window.close(); return false;">{L_CLOSE_WINDOW}</a></span><br /><br />
- </td>
- </tr>
- </table>
- </td>
-</tr>
-</table>
-
-<!-- INCLUDE simple_footer.html --> \ No newline at end of file
diff --git a/phpBB/styles/subsilver2/template/ucp_pm_viewfolder.html b/phpBB/styles/subsilver2/template/ucp_pm_viewfolder.html
index f0b076edb2..edcf553b84 100644
--- a/phpBB/styles/subsilver2/template/ucp_pm_viewfolder.html
+++ b/phpBB/styles/subsilver2/template/ucp_pm_viewfolder.html
@@ -22,11 +22,11 @@
<th colspan="2" valign="middle">{L_OPTIONS}</th>
</tr>
<tr>
- <td class="row1" width="35%">{L_DELIMITER}: </td>
+ <td class="row1" width="35%">{L_DELIMITER}{L_COLON} </td>
<td class="row2"><input class="post" type="text" name="delimiter" value="," /></td>
</tr>
<tr>
- <td class="row1" width="35%">{L_ENCLOSURE}: </td>
+ <td class="row1" width="35%">{L_ENCLOSURE}{L_COLON} </td>
<td class="row2"><input class="post" type="text" name="enclosure" value="&#034;" /></td>
</tr>
<tr>
@@ -82,7 +82,7 @@
<a href="{messagerow.U_VIEW_PM}">{messagerow.SUBJECT}</a>
<!-- ENDIF -->
<!-- IF messagerow.S_PM_REPORTED -->
- <a href="{messagerow.U_MCP_REPORT}">{REPORTED_IMG}</a>&nbsp;
+ <a href="{messagerow.U_MCP_REPORT}" class="imageset">{REPORTED_IMG}</a>&nbsp;
<!-- ENDIF -->
<!-- IF messagerow.S_AUTHOR_DELETED -->
<br /><em class="gensmall">{L_PM_FROM_REMOVED_AUTHOR}</em>
diff --git a/phpBB/styles/subsilver2/template/ucp_pm_viewmessage.html b/phpBB/styles/subsilver2/template/ucp_pm_viewmessage.html
index 4971506a6d..be1e27c5f3 100644
--- a/phpBB/styles/subsilver2/template/ucp_pm_viewmessage.html
+++ b/phpBB/styles/subsilver2/template/ucp_pm_viewmessage.html
@@ -8,23 +8,23 @@
<table class="tablebg" width="100%" cellspacing="1" cellpadding="4">
<tr class="row1">
- <td class="genmed" nowrap="nowrap" width="150"><b>{L_PM_SUBJECT}:</b></td>
+ <td class="genmed" nowrap="nowrap" width="150"><b>{L_PM_SUBJECT}{L_COLON}</b></td>
<td class="gen">{SUBJECT}</td>
</tr>
<tr class="row1">
- <td class="genmed" nowrap="nowrap" width="150"><b>{L_PM_FROM}:</b></td>
+ <td class="genmed" nowrap="nowrap" width="150"><b>{L_PM_FROM}{L_COLON}</b></td>
<td class="gen">{MESSAGE_AUTHOR_FULL}</td>
</tr>
<tr class="row1">
- <td class="genmed" nowrap="nowrap" width="150"><b>{L_SENT_AT}:</b></td>
+ <td class="genmed" nowrap="nowrap" width="150"><b>{L_SENT_AT}{L_COLON}</b></td>
<td class="gen">{SENT_DATE}</td>
</tr>
<!-- IF S_TO_RECIPIENT -->
<tr class="row1">
- <td class="genmed" nowrap="nowrap" width="150"><b>{L_TO}:</b></td>
+ <td class="genmed" nowrap="nowrap" width="150"><b>{L_TO}{L_COLON}</b></td>
<td class="gen">
<!-- BEGIN to_recipient -->
<!-- IF to_recipient.IS_GROUP --><span class="sep"><a href="{to_recipient.U_VIEW}">{to_recipient.NAME}</a></span><!-- ELSE -->{to_recipient.NAME_FULL}&nbsp;<!-- ENDIF -->
@@ -35,7 +35,7 @@
<!-- IF S_BCC_RECIPIENT -->
<tr class="row1">
- <td class="genmed" nowrap="nowrap" width="150"><b>{L_BCC}:</b></td>
+ <td class="genmed" nowrap="nowrap" width="150"><b>{L_BCC}{L_COLON}</b></td>
<td class="gen">
<!-- BEGIN bcc_recipient -->
<!-- IF bcc_recipient.IS_GROUP --><span class="sep"><a href="{bcc_recipient.U_VIEW}">{bcc_recipient.NAME}</a></span><!-- ELSE -->{bcc_recipient.NAME_FULL}&nbsp;<!-- ENDIF -->
@@ -69,7 +69,7 @@
<table class="tablebg" width="100%" cellspacing="1">
<tr>
- <td class="row3"><b class="genmed">{L_ATTACHMENTS}: </b></td>
+ <td class="row3"><b class="genmed">{L_ATTACHMENTS}{L_COLON} </b></td>
</tr>
<!-- BEGIN attachment -->
<tr>
@@ -93,7 +93,7 @@
<table width="100%" cellspacing="0">
<tr valign="middle">
- <td class="gensmall" align="{S_CONTENT_FLOW_END}"> <!-- IF U_REPORT --><a href="{U_REPORT}">{REPORT_IMG}</a> <!-- ENDIF --><!-- IF U_DELETE --><a href="{U_DELETE}">{DELETE_IMG}</a> <!-- ENDIF --></td>
+ <td class="gensmall" align="{S_CONTENT_FLOW_END}"> <!-- IF U_REPORT --><a href="{U_REPORT}" class="imageset">{REPORT_IMG}</a> <!-- ENDIF --><!-- IF U_DELETE --><a href="{U_DELETE}" class="imageset">{DELETE_IMG}</a> <!-- ENDIF --></td>
</tr>
</table>
@@ -104,7 +104,7 @@
</tr>
<tr class="row1">
- <td><div class="gensmall" style="float: {S_CONTENT_FLOW_BEGIN};">&nbsp;<!-- IF U_MESSAGE_AUTHOR --><a href="{U_MESSAGE_AUTHOR}">{PROFILE_IMG}</a> <!-- ENDIF --> <!-- IF U_EMAIL --><a href="{U_EMAIL}">{EMAIL_IMG}</a> <!-- ENDIF -->&nbsp;</div> <div class="gensmall" style="float: {S_CONTENT_FLOW_END};"><!-- IF U_EDIT --><a href="{U_EDIT}">{EDIT_IMG}</a> <!-- ENDIF --> <!-- IF U_QUOTE --><a href="{U_QUOTE}">{QUOTE_IMG}</a> <!-- ENDIF --> <!-- IF U_POST_REPLY_PM --><a href="{U_POST_REPLY_PM}">{REPLY_IMG}</a><!-- ENDIF -->&nbsp;</div></td>
+ <td><div class="gensmall" style="float: {S_CONTENT_FLOW_BEGIN};">&nbsp;<!-- IF U_MESSAGE_AUTHOR --><a href="{U_MESSAGE_AUTHOR}" class="imageset">{PROFILE_IMG}</a> <!-- ENDIF --> <!-- IF U_EMAIL --><a href="{U_EMAIL}" class="imageset">{EMAIL_IMG}</a> <!-- ENDIF -->&nbsp;</div> <div class="gensmall" style="float: {S_CONTENT_FLOW_END};"><!-- IF U_EDIT --><a href="{U_EDIT}" class="imageset">{EDIT_IMG}</a> <!-- ENDIF --> <!-- IF U_QUOTE --><a href="{U_QUOTE}" class="imageset">{QUOTE_IMG}</a> <!-- ENDIF --> <!-- IF U_POST_REPLY_PM --><a href="{U_POST_REPLY_PM}" class="imageset">{REPLY_IMG}</a><!-- ENDIF -->&nbsp;</div></td>
</tr>
<tr>
diff --git a/phpBB/styles/subsilver2/template/ucp_pm_viewmessage_print.html b/phpBB/styles/subsilver2/template/ucp_pm_viewmessage_print.html
index 085e26ecd2..abe6199d71 100644
--- a/phpBB/styles/subsilver2/template/ucp_pm_viewmessage_print.html
+++ b/phpBB/styles/subsilver2/template/ucp_pm_viewmessage_print.html
@@ -1,9 +1,7 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<!DOCTYPE html>
<html dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}">
<head>
-<meta http-equiv="Content-Type" content="text/html; charset={S_CONTENT_ENCODING}">
-<meta http-equiv="Content-Style-Type" content="text/css">
-<meta http-equiv="Content-Language" content="{S_USER_LANG}">
+<meta charset="utf-8">
<meta name="robots" content="noindex" />
<title>{SITENAME} :: {PAGE_TITLE}</title>
@@ -56,7 +54,7 @@ hr.sep {
}
//-->
</style>
-
+<!-- EVENT ucp_pm_viewmessage_print_head_append -->
</head>
<body>
@@ -77,13 +75,13 @@ hr.sep {
<table width="85%" cellspacing="3" cellpadding="0" border="0" align="center">
<tr>
- <td width="10%" nowrap="nowrap">{L_PM_FROM}:&nbsp;</td>
+ <td width="10%" nowrap="nowrap">{L_PM_FROM}{L_COLON}&nbsp;</td>
<td><b>{MESSAGE_AUTHOR}</b> [ {SENT_DATE} ]</td>
</tr>
<!-- IF S_TO_RECIPIENT -->
<tr>
- <td width="10%" nowrap="nowrap">{L_TO}:</td>
+ <td width="10%" nowrap="nowrap">{L_TO}{L_COLON}</td>
<td>
<!-- BEGIN to_recipient -->
<span<!-- IF to_recipient.IS_GROUP --> class="sep"<!-- ENDIF -->>{to_recipient.NAME}</span>&nbsp;
@@ -94,7 +92,7 @@ hr.sep {
<!-- IF S_BCC_RECIPIENT -->
<tr>
- <td width="10%" nowrap="nowrap">{L_BCC}:</td>
+ <td width="10%" nowrap="nowrap">{L_BCC}{L_COLON}</td>
<td>
<!-- BEGIN bcc_recipient -->
<!-- IF bcc_recipient.COLOUR --><span style="color:{bcc_recipient.COLOUR}"><!-- ELSE --><span<!-- IF bcc_recipient.IS_GROUP --> class="sep"<!-- ENDIF -->><!-- ENDIF -->{bcc_recipient.NAME}</span>&nbsp;
diff --git a/phpBB/styles/subsilver2/template/ucp_prefs_personal.html b/phpBB/styles/subsilver2/template/ucp_prefs_personal.html
index 4cd0f37a80..cd5fc9a13f 100644
--- a/phpBB/styles/subsilver2/template/ucp_prefs_personal.html
+++ b/phpBB/styles/subsilver2/template/ucp_prefs_personal.html
@@ -29,62 +29,46 @@
<td class="row3" colspan="2" align="center"><span class="gensmall error">{ERROR}</span></td>
</tr>
<!-- ENDIF -->
-<tr>
- <td class="row1" width="50%"><b class="genmed">{L_SHOW_EMAIL}:</b></td>
+<!-- EVENT ucp_prefs_personal_prepend -->
+<tr>
+ <td class="row1" width="50%"><b class="genmed">{L_SHOW_EMAIL}{L_COLON}</b></td>
<td class="row2"><input type="radio" class="radio" name="viewemail" value="1"<!-- IF S_VIEW_EMAIL --> checked="checked"<!-- ENDIF --> /><span class="genmed">{L_YES}</span>&nbsp;&nbsp;<input type="radio" class="radio" name="viewemail" value="0"<!-- IF not S_VIEW_EMAIL --> checked="checked"<!-- ENDIF --> /><span class="genmed">{L_NO}</span></td>
</tr>
-<tr>
- <td class="row1" width="50%"><b class="genmed">{L_ADMIN_EMAIL}:</b></td>
+<tr>
+ <td class="row1" width="50%"><b class="genmed">{L_ADMIN_EMAIL}{L_COLON}</b></td>
<td class="row2"><input type="radio" class="radio" name="massemail" value="1"<!-- IF S_MASS_EMAIL --> checked="checked"<!-- ENDIF --> /><span class="genmed">{L_YES}</span>&nbsp;&nbsp;<input type="radio" class="radio" name="massemail" value="0"<!-- IF not S_MASS_EMAIL --> checked="checked"<!-- ENDIF --> /><span class="genmed">{L_NO}</span></td>
</tr>
-<tr>
- <td class="row1" width="50%"><b class="genmed">{L_ALLOW_PM}:</b><br /><span class="gensmall">{L_ALLOW_PM_EXPLAIN}</span></td>
+<tr>
+ <td class="row1" width="50%"><b class="genmed">{L_ALLOW_PM}{L_COLON}</b><br /><span class="gensmall">{L_ALLOW_PM_EXPLAIN}</span></td>
<td class="row2"><input type="radio" class="radio" name="allowpm" value="1"<!-- IF S_ALLOW_PM --> checked="checked"<!-- ENDIF --> /><span class="genmed">{L_YES}</span>&nbsp;&nbsp;<input type="radio" class="radio" name="allowpm" value="0"<!-- IF not S_ALLOW_PM --> checked="checked"<!-- ENDIF --> /><span class="genmed">{L_NO}</span></td>
</tr>
<!-- IF S_CAN_HIDE_ONLINE -->
- <tr>
- <td class="row1" width="50%"><b class="genmed">{L_HIDE_ONLINE}:</b><br /><span class="gensmall">{L_HIDE_ONLINE_EXPLAIN}</span></td>
+ <tr>
+ <td class="row1" width="50%"><b class="genmed">{L_HIDE_ONLINE}{L_COLON}</b><br /><span class="gensmall">{L_HIDE_ONLINE_EXPLAIN}</span></td>
<td class="row2"><input type="radio" class="radio" name="hideonline" value="1"<!-- IF S_HIDE_ONLINE --> checked="checked"<!-- ENDIF --> /><span class="genmed">{L_YES}</span>&nbsp;&nbsp;<input type="radio" class="radio" name="hideonline" value="0"<!-- IF not S_HIDE_ONLINE --> checked="checked"<!-- ENDIF --> /><span class="genmed">{L_NO}</span></td>
</tr>
<!-- ENDIF -->
<!-- IF S_SELECT_NOTIFY -->
- <tr>
- <td class="row1" width="50%"><b class="genmed">{L_NOTIFY_METHOD}:</b><br /><span class="gensmall">{L_NOTIFY_METHOD_EXPLAIN}</span></td>
+ <tr>
+ <td class="row1" width="50%"><b class="genmed">{L_NOTIFY_METHOD}{L_COLON}</b><br /><span class="gensmall">{L_NOTIFY_METHOD_EXPLAIN}</span></td>
<td class="row2"><input type="radio" class="radio" name="notifymethod" value="0"<!-- IF S_NOTIFY_EMAIL --> checked="checked"<!-- ENDIF --> /><span class="genmed">{L_NOTIFY_METHOD_EMAIL}</span>&nbsp;&nbsp;<input type="radio" class="radio" name="notifymethod" value="1"<!-- IF S_NOTIFY_IM --> checked="checked"<!-- ENDIF --> /><span class="genmed">{L_NOTIFY_METHOD_IM}</span>&nbsp;&nbsp;<input type="radio" class="radio" name="notifymethod" value="2"<!-- IF S_NOTIFY_BOTH --> checked="checked"<!-- ENDIF --> /><span class="genmed">{L_NOTIFY_METHOD_BOTH}</span></td>
</tr>
<!-- ENDIF -->
-<tr>
- <td class="row1" width="50%"><b class="genmed">{L_NOTIFY_ON_PM}:</b></td>
- <td class="row2"><input type="radio" class="radio" name="notifypm" value="1"<!-- IF S_NOTIFY_PM --> checked="checked"<!-- ENDIF --> /><span class="genmed">{L_YES}</span>&nbsp;&nbsp;<input type="radio" class="radio" name="notifypm" value="0"<!-- IF not S_NOTIFY_PM --> checked="checked"<!-- ENDIF --> /><span class="genmed">{L_NO}</span></td>
-</tr>
-<tr>
- <td class="row1" width="50%"><b class="genmed">{L_POPUP_ON_PM}:</b></td>
- <td class="row2"><input type="radio" class="radio" name="popuppm" value="1"<!-- IF S_POPUP_PM --> checked="checked"<!-- ENDIF --> /><span class="genmed">{L_YES}</span>&nbsp;&nbsp;<input type="radio" class="radio" name="popuppm" value="0"<!-- IF not S_POPUP_PM --> checked="checked"<!-- ENDIF --> /><span class="genmed">{L_NO}</span></td>
-</tr>
<!-- IF S_MORE_LANGUAGES -->
<tr>
- <td class="row1" width="50%"><b class="genmed">{L_BOARD_LANGUAGE}:</b></td>
+ <td class="row1" width="50%"><b class="genmed">{L_BOARD_LANGUAGE}{L_COLON}</b></td>
<td class="row2"><select name="lang">{S_LANG_OPTIONS}</select></td>
</tr>
<!-- ENDIF -->
<!-- IF S_STYLE_OPTIONS and S_MORE_STYLES -->
<tr>
- <td class="row1" width="50%"><b class="genmed">{L_BOARD_STYLE}:</b></td>
+ <td class="row1" width="50%"><b class="genmed">{L_BOARD_STYLE}{L_COLON}</b></td>
<td class="row2"><select name="style">{S_STYLE_OPTIONS}</select></td>
</tr>
<!-- ENDIF -->
+<!-- INCLUDE timezone_option.html -->
<tr>
- <td class="row1" width="50%"><b class="genmed">{L_BOARD_TIMEZONE}:</b></td>
- <td class="row2">
- <select id="tz" name="tz">{S_TZ_OPTIONS}</select>
- </td>
-</tr>
-<tr>
- <td class="row1" width="50%"><b class="genmed">{L_BOARD_DST}:</b></td>
- <td class="row2"><input type="radio" class="radio" name="dst" value="1"<!-- IF S_DST --> checked="checked"<!-- ENDIF --> /> <span class="genmed">{L_YES}</span>&nbsp;&nbsp;<input type="radio" class="radio" name="dst" value="0"<!-- IF not S_DST --> checked="checked"<!-- ENDIF --> /> <span class="genmed">{L_NO}</span></td>
-</tr>
-<tr>
- <td class="row1" width="50%"><b class="genmed">{L_BOARD_DATE_FORMAT}:</b><br /><span class="gensmall">{L_BOARD_DATE_FORMAT_EXPLAIN}</span></td>
+ <td class="row1" width="50%"><b class="genmed">{L_BOARD_DATE_FORMAT}{L_COLON}</b><br /><span class="gensmall">{L_BOARD_DATE_FORMAT_EXPLAIN}</span></td>
<td class="row2">
<select name="dateoptions" id="dateoptions" onchange="if(this.value=='custom'){dE('custom_date',1);}else{dE('custom_date',-1);} if (this.value == 'custom') { document.getElementById('dateformat').value = default_dateformat; } else { document.getElementById('dateformat').value = this.value; }">
{S_DATEFORMAT_OPTIONS}
@@ -92,9 +76,10 @@
<div id="custom_date"<!-- IF not S_CUSTOM_DATEFORMAT --> style="display:none;"<!-- ENDIF -->><input type="text" name="dateformat" id="dateformat" value="{DATE_FORMAT}" maxlength="30" class="post" style="margin-top: 3px;" /></div>
</td>
</tr>
+<!-- EVENT ucp_prefs_personal_append -->
<tr>
<td class="cat" colspan="2" align="center">{S_HIDDEN_FIELDS}<input class="btnmain" type="submit" name="submit" value="{L_SUBMIT}" />&nbsp;&nbsp;<input class="btnlite" type="reset" value="{L_RESET}" name="reset" /></td>
</tr>
</table>
-<!-- INCLUDE ucp_footer.html --> \ No newline at end of file
+<!-- INCLUDE ucp_footer.html -->
diff --git a/phpBB/styles/subsilver2/template/ucp_prefs_post.html b/phpBB/styles/subsilver2/template/ucp_prefs_post.html
index edf0070baa..0a558b863c 100644
--- a/phpBB/styles/subsilver2/template/ucp_prefs_post.html
+++ b/phpBB/styles/subsilver2/template/ucp_prefs_post.html
@@ -9,25 +9,27 @@
<td class="row3" colspan="2" align="center"><span class="gensmall error">{ERROR}</span></td>
</tr>
<!-- ENDIF -->
+<!-- EVENT ucp_prefs_post_prepend -->
<tr>
- <td class="row1" width="50%"><b class="genmed">{L_DEFAULT_BBCODE}:</b></td>
+ <td class="row1" width="50%"><b class="genmed">{L_DEFAULT_BBCODE}{L_COLON}</b></td>
<td class="row2"><input type="radio" class="radio" name="bbcode" value="1"<!-- IF S_BBCODE --> checked="checked"<!-- ENDIF --> /><span class="gen">{L_YES}</span>&nbsp; &nbsp;<input type="radio" class="radio" name="bbcode" value="0"<!-- IF not S_BBCODE --> checked="checked"<!-- ENDIF --> /><span class="gen">{L_NO}</span></td>
</tr>
<tr>
- <td class="row1" width="50%"><b class="genmed">{L_DEFAULT_SMILIES}:</b></td>
+ <td class="row1" width="50%"><b class="genmed">{L_DEFAULT_SMILIES}{L_COLON}</b></td>
<td class="row2"><input type="radio" class="radio" name="smilies" value="1"<!-- IF S_SMILIES --> checked="checked"<!-- ENDIF --> /><span class="gen">{L_YES}</span>&nbsp; &nbsp;<input type="radio" class="radio" name="smilies" value="0"<!-- IF not S_SMILIES --> checked="checked"<!-- ENDIF --> /><span class="gen">{L_NO}</span></td>
</tr>
<tr>
- <td class="row1" width="50%"><b class="genmed">{L_DEFAULT_ADD_SIG}:</b></td>
+ <td class="row1" width="50%"><b class="genmed">{L_DEFAULT_ADD_SIG}{L_COLON}</b></td>
<td class="row2"><input type="radio" class="radio" name="sig" value="1"<!-- IF S_SIG --> checked="checked"<!-- ENDIF --> /><span class="gen">{L_YES}</span>&nbsp; &nbsp;<input type="radio" class="radio" name="sig" value="0"<!-- IF not S_SIG --> checked="checked"<!-- ENDIF --> /><span class="gen">{L_NO}</span></td>
</tr>
<tr>
- <td class="row1" width="50%"><b class="genmed">{L_DEFAULT_NOTIFY}:</b></td>
+ <td class="row1" width="50%"><b class="genmed">{L_DEFAULT_NOTIFY}{L_COLON}</b></td>
<td class="row2"><input type="radio" class="radio" name="notify" value="1"<!-- IF S_NOTIFY --> checked="checked"<!-- ENDIF --> /><span class="gen">{L_YES}</span>&nbsp; &nbsp;<input type="radio" class="radio" name="notify" value="0"<!-- IF not S_NOTIFY --> checked="checked"<!-- ENDIF --> /><span class="gen">{L_NO}</span></td>
</tr>
+<!-- EVENT ucp_prefs_post_append -->
<tr>
<td class="cat" colspan="2" align="center">{S_HIDDEN_FIELDS}<input class="btnmain" type="submit" name="submit" value="{L_SUBMIT}" />&nbsp;&nbsp;<input class="btnlite" type="reset" value="{L_RESET}" name="reset" /></td>
</tr>
</table>
-<!-- INCLUDE ucp_footer.html --> \ No newline at end of file
+<!-- INCLUDE ucp_footer.html -->
diff --git a/phpBB/styles/subsilver2/template/ucp_prefs_view.html b/phpBB/styles/subsilver2/template/ucp_prefs_view.html
index b97bcfde00..c10c458627 100644
--- a/phpBB/styles/subsilver2/template/ucp_prefs_view.html
+++ b/phpBB/styles/subsilver2/template/ucp_prefs_view.html
@@ -9,65 +9,69 @@
<td class="row3" colspan="2" align="center"><span class="gensmall error">{ERROR}</span></td>
</tr>
<!-- ENDIF -->
+<!-- EVENT ucp_prefs_view_radio_buttons_prepend -->
<tr>
- <td class="row1" width="50%"><b class="genmed">{L_VIEW_IMAGES}:</b></td>
+ <td class="row1" width="50%"><b class="genmed">{L_VIEW_IMAGES}{L_COLON}</b></td>
<td class="row2"><input type="radio" class="radio" name="images" value="1"<!-- IF S_IMAGES --> checked="checked"<!-- ENDIF --> /><span class="gen">{L_YES}</span>&nbsp; &nbsp;<input type="radio" class="radio" name="images" value="0"<!-- IF not S_IMAGES --> checked="checked"<!-- ENDIF --> /><span class="gen">{L_NO}</span></td>
</tr>
<tr>
- <td class="row1" width="50%"><b class="genmed">{L_VIEW_FLASH}:</b></td>
+ <td class="row1" width="50%"><b class="genmed">{L_VIEW_FLASH}{L_COLON}</b></td>
<td class="row2"><input type="radio" class="radio" name="flash" value="1"<!-- IF S_FLASH --> checked="checked"<!-- ENDIF --> /><span class="gen">{L_YES}</span>&nbsp; &nbsp;<input type="radio" class="radio" name="flash" value="0"<!-- IF not S_FLASH --> checked="checked"<!-- ENDIF --> /><span class="gen">{L_NO}</span></td>
</tr>
<tr>
- <td class="row1" width="50%"><b class="genmed">{L_VIEW_SMILIES}:</b></td>
+ <td class="row1" width="50%"><b class="genmed">{L_VIEW_SMILIES}{L_COLON}</b></td>
<td class="row2"><input type="radio" class="radio" name="smilies" value="1"<!-- IF S_SMILIES --> checked="checked"<!-- ENDIF --> /><span class="gen">{L_YES}</span>&nbsp; &nbsp;<input type="radio" class="radio" name="smilies" value="0"<!-- IF not S_SMILIES --> checked="checked"<!-- ENDIF --> /><span class="gen">{L_NO}</span></td>
</tr>
<tr>
- <td class="row1" width="50%"><b class="genmed">{L_VIEW_SIGS}:</b></td>
+ <td class="row1" width="50%"><b class="genmed">{L_VIEW_SIGS}{L_COLON}</b></td>
<td class="row2"><input type="radio" class="radio" name="sigs" value="1"<!-- IF S_SIGS --> checked="checked"<!-- ENDIF --> /><span class="gen">{L_YES}</span>&nbsp; &nbsp;<input type="radio" class="radio" name="sigs" value="0"<!-- IF not S_SIGS --> checked="checked"<!-- ENDIF --> /><span class="gen">{L_NO}</span></td>
</tr>
<tr>
- <td class="row1" width="50%"><b class="genmed">{L_VIEW_AVATARS}:</b></td>
+ <td class="row1" width="50%"><b class="genmed">{L_VIEW_AVATARS}{L_COLON}</b></td>
<td class="row2"><input type="radio" class="radio" name="avatars" value="1"<!-- IF S_AVATARS --> checked="checked"<!-- ENDIF --> /><span class="gen">{L_YES}</span>&nbsp; &nbsp;<input type="radio" class="radio" name="avatars" value="0"<!-- IF not S_AVATARS --> checked="checked"<!-- ENDIF --> /><span class="gen">{L_NO}</span></td>
</tr>
<!-- IF S_CHANGE_CENSORS -->
<tr>
- <td class="row1" width="50%"><b class="genmed">{L_DISABLE_CENSORS}:</b></td>
+ <td class="row1" width="50%"><b class="genmed">{L_DISABLE_CENSORS}{L_COLON}</b></td>
<td class="row2"><input type="radio" class="radio" name="wordcensor" value="1"<!-- IF S_DISABLE_CENSORS --> checked="checked"<!-- ENDIF --> /><span class="gen">{L_YES}</span>&nbsp; &nbsp;<input type="radio" class="radio" name="wordcensor" value="0"<!-- IF not S_DISABLE_CENSORS --> checked="checked"<!-- ENDIF --> /><span class="gen">{L_NO}</span></td>
</tr>
<!-- ENDIF -->
+<!-- EVENT ucp_prefs_view_radio_buttons_append -->
<tr>
<td colspan="2" class="spacer"></td>
</tr>
+<!-- EVENT ucp_prefs_view_select_menu_prepend -->
<tr>
- <td class="row1" width="50%"><b class="genmed">{L_VIEW_TOPICS_DAYS}:</b></td>
+ <td class="row1" width="50%"><b class="genmed">{L_VIEW_TOPICS_DAYS}{L_COLON}</b></td>
<td class="row2">{S_TOPIC_SORT_DAYS}</td>
</tr>
<tr>
- <td class="row1" width="50%"><b class="genmed">{L_VIEW_TOPICS_KEY}:</b></td>
+ <td class="row1" width="50%"><b class="genmed">{L_VIEW_TOPICS_KEY}{L_COLON}</b></td>
<td class="row2">{S_TOPIC_SORT_KEY}</td>
</tr>
<tr>
- <td class="row1" width="50%"><b class="genmed">{L_VIEW_TOPICS_DIR}:</b></td>
+ <td class="row1" width="50%"><b class="genmed">{L_VIEW_TOPICS_DIR}{L_COLON}</b></td>
<td class="row2">{S_TOPIC_SORT_DIR}</td>
</tr>
<tr>
<td colspan="2" class="spacer"></td>
</tr>
<tr>
- <td class="row1" width="50%"><b class="genmed">{L_VIEW_POSTS_DAYS}:</b></td>
+ <td class="row1" width="50%"><b class="genmed">{L_VIEW_POSTS_DAYS}{L_COLON}</b></td>
<td class="row2">{S_POST_SORT_DAYS}</td>
</tr>
<tr>
- <td class="row1" width="50%"><b class="genmed">{L_VIEW_POSTS_KEY}:</b></td>
+ <td class="row1" width="50%"><b class="genmed">{L_VIEW_POSTS_KEY}{L_COLON}</b></td>
<td class="row2">{S_POST_SORT_KEY}</td>
</tr>
<tr>
- <td class="row1" width="50%"><b class="genmed">{L_VIEW_POSTS_DIR}:</b></td>
+ <td class="row1" width="50%"><b class="genmed">{L_VIEW_POSTS_DIR}{L_COLON}</b></td>
<td class="row2">{S_POST_SORT_DIR}</td>
</tr>
+<!-- EVENT ucp_prefs_view_select_menu_append -->
<tr>
<td class="cat" colspan="2" align="center">{S_HIDDEN_FIELDS}<input class="btnmain" type="submit" name="submit" value="{L_SUBMIT}" />&nbsp;&nbsp;<input class="btnlite" type="reset" value="{L_RESET}" name="reset" /></td>
</tr>
</table>
-<!-- INCLUDE ucp_footer.html --> \ No newline at end of file
+<!-- INCLUDE ucp_footer.html -->
diff --git a/phpBB/styles/subsilver2/template/ucp_profile_autologin_keys.html b/phpBB/styles/subsilver2/template/ucp_profile_autologin_keys.html
new file mode 100644
index 0000000000..1dab9acb9c
--- /dev/null
+++ b/phpBB/styles/subsilver2/template/ucp_profile_autologin_keys.html
@@ -0,0 +1,49 @@
+<!-- INCLUDE ucp_header.html -->
+
+<table class="tablebg" width="100%" cellspacing="1">
+<tr>
+ <th colspan="4" valign="middle">{L_TITLE}</th>
+</tr>
+<!-- IF .errors -->
+ <tr>
+ <td class="row3" colspan="2" align="center"><span class="gensmall error">
+ <!-- BEGIN errors -->
+ {errors} <br />
+ <!-- END errors -->
+ </td>
+ </tr>
+<!-- ENDIF -->
+
+<tr>
+ <td colspan="4" class="row1">{L_PROFILE_AUTOLOGIN_KEYS}</td>
+</tr>
+<tr>
+ <th>{L_MARK}</th>
+ <th>{L_LOGIN_KEY}</th>
+ <th>{L_IP}</th>
+ <th>{L_LOGIN_TIME}</th>
+</tr>
+<!-- BEGIN sessions -->
+ <!-- IF sessions.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
+ <td class="genmed" style="text-align: center"><input type="checkbox" name="keys[]" value="{sessions.KEY}" id="{sessions.KEY}"/></td>
+ <td class="genmed"><label for="{sessions.KEY}">{sessions.KEY}</label></td>
+ <td class="genmed" style="text-align: center">{sessions.IP}</td>
+ <td class="genmed" style="text-align: center">{sessions.LOGIN_TIME}</td>
+ </tr>
+<!-- BEGINELSE -->
+ <tr>
+ <td colspan="4" class="row1" style="text-align: center">{L_PROFILE_NO_AUTOLOGIN_KEYS}</td>
+ </tr>
+<!-- END sessions -->
+
+<!-- IF .sessions -->
+ <tr>
+ <td class="cat" colspan="4" align="center">
+ {S_HIDDEN_FIELDS}<input class="btnmain" type="submit" name="submit" value="{L_DELETE}" />
+ {S_FORM_TOKEN}
+ </td>
+ </tr>
+<!-- ENDIF -->
+</table>
+
+<!-- INCLUDE ucp_footer.html -->
diff --git a/phpBB/styles/subsilver2/template/ucp_profile_avatar.html b/phpBB/styles/subsilver2/template/ucp_profile_avatar.html
index 4188d0e5f2..60a816d00a 100644
--- a/phpBB/styles/subsilver2/template/ucp_profile_avatar.html
+++ b/phpBB/styles/subsilver2/template/ucp_profile_avatar.html
@@ -9,10 +9,10 @@
<td class="row3" colspan="2" align="center"><span class="gensmall error">{ERROR}</span></td>
</tr>
<!-- ENDIF -->
-<tr>
- <td class="row1" width="35%"><b class="genmed">{L_CURRENT_IMAGE}: </b><br /><span class="gensmall">{L_AVATAR_EXPLAIN}</span></td>
+<tr>
+ <td class="row1" width="35%"><b class="genmed">{L_CURRENT_IMAGE}{L_COLON} </b><br /><span class="gensmall">{L_AVATAR_EXPLAIN}</span></td>
<td class="row2" align="center"><br />
- <!-- IF AVATAR -->{AVATAR}<br /><br /><input type="checkbox" class="radio" name="delete" />&nbsp;<span class="gensmall">{L_DELETE_AVATAR}</span>
+ <!-- IF AVATAR -->{AVATAR}<br /><br /><input type="checkbox" class="radio" name="avatar_delete" />&nbsp;<span class="gensmall">{L_DELETE_AVATAR}</span>
<!-- ELSE --><img src="{T_THEME_PATH}/images/no_avatar.gif" alt="" />
<!-- ENDIF --></td>
</tr>
@@ -21,67 +21,33 @@
<td class="row3" colspan="2" align="center">{L_AVATAR_FEATURES_DISABLED}</td>
</tr>
<!-- ENDIF -->
-<!-- IF S_UPLOAD_AVATAR_FILE -->
- <tr>
- <td class="row1" width="35%"><b class="genmed">{L_UPLOAD_AVATAR_FILE}: </b></td>
- <td class="row2"><input type="hidden" name="MAX_FILE_SIZE" value="{AVATAR_SIZE}" /><input class="post" type="file" name="uploadfile" /></td>
- </tr>
-<!-- ENDIF -->
-<!-- IF S_UPLOAD_AVATAR_URL -->
- <tr>
- <td class="row1" width="35%"><b class="genmed">{L_UPLOAD_AVATAR_URL}: </b><br /><span class="gensmall">{L_UPLOAD_AVATAR_URL_EXPLAIN}</span></td>
- <td class="row2"><input class="post" type="text" name="uploadurl" size="40" value="{AVATAR_URL}" /></td>
- </tr>
-<!-- ENDIF -->
-<!-- IF S_LINK_AVATAR -->
- <tr>
- <td class="row1" width="35%"><b class="genmed">{L_LINK_REMOTE_AVATAR}: </b><br /><span class="gensmall">{L_LINK_REMOTE_AVATAR_EXPLAIN}</span></td>
- <td class="row2"><input class="post" type="text" name="remotelink" size="40" value="{AVATAR_REMOTE}" /></td>
- </tr>
- <tr>
- <td class="row1" width="35%"><b class="genmed">{L_LINK_REMOTE_SIZE}: </b><br /><span class="gensmall">{L_LINK_REMOTE_SIZE_EXPLAIN}</span></td>
- <td class="row2"><input class="post" type="text" name="width" size="3" value="{AVATAR_WIDTH}" /> <span class="gen">{L_PIXEL} &times; </span> <input class="post" type="text" name="height" size="3" value="{AVATAR_HEIGHT}" /> <span class="gen">{L_PIXEL}</span></td>
- </tr>
-<!-- ENDIF -->
-<!-- IF S_DISPLAY_GALLERY -->
- <tr>
- <td class="row1" width="35%"><b class="genmed">{L_AVATAR_GALLERY}: </b></td>
- <td class="row2"><strong><a href="{U_GALLERY}">{L_DISPLAY_GALLERY}</a></strong></td>
- </tr>
-<!-- ENDIF -->
-
-<!-- IF S_IN_AVATAR_GALLERY -->
- <tr>
- <th colspan="2">{L_AVATAR_GALLERY}</th>
- </tr>
- <tr>
- <td class="cat" colspan="2" align="center" valign="middle"><span class="genmed">{L_AVATAR_CATEGORY}: </span><select name="category">{S_CAT_OPTIONS}</select>&nbsp; <input class="btnlite" tabindex="0" type="submit" value="{L_GO}" name="display_gallery" /></td>
- </tr>
- <tr>
- <td class="row1" colspan="2" align="center">
- <table cellspacing="1" cellpadding="4" border="0">
- <!-- BEGIN avatar_row -->
- <tr>
- <!-- BEGIN avatar_column -->
- <td class="row1" align="center"><img src="{avatar_row.avatar_column.AVATAR_IMAGE}" alt="{avatar_row.avatar_column.AVATAR_NAME}" title="{avatar_row.avatar_column.AVATAR_NAME}" /></td>
- <!-- END avatar_column -->
- </tr>
- <tr>
- <!-- BEGIN avatar_option_column -->
- <td class="row2" align="center"><input type="radio" class="radio" name="avatar_select" value="{avatar_row.avatar_option_column.S_OPTIONS_AVATAR}" /></td>
- <!-- END avatar_option_column -->
- </tr>
- <!-- END avatar_row -->
- </table>
- </td>
+ <tr>
+ <th colspan="2">{L_AVATAR_SELECT}</th>
</tr>
-<!-- ENDIF -->
+ <tr>
+ <td class="row1" width="35%"><b class="genmed">{L_AVATAR_TYPE}{L_COLON}</b></td>
+ <td class="row2">
+ <select name="avatar_driver" id="avatar_driver">
+ <option value="">{L_NO_AVATAR_CATEGORY}</option>
+ <!-- BEGIN avatar_drivers -->
+ <option value="{avatar_drivers.DRIVER}"<!-- IF avatar_drivers.SELECTED --> selected="selected"<!-- ENDIF -->>{avatar_drivers.L_TITLE}</option>
+ <!-- END avatar_drivers -->
+ </select></td>
+ </tr>
+<!-- BEGIN avatar_drivers -->
+ <tr class="avatar_option_{avatar_drivers.DRIVER}">
+ <td class="row1" width="35%" colspan="2"><noscript><b class="genmed">{avatar_drivers.L_TITLE} </b><br /></noscript>{avatar_drivers.L_EXPLAIN}</span></td>
+ </tr>
+ <tr class="avatar_option_{avatar_drivers.DRIVER}">
+ <td colspan="2" style="padding: 0">{avatar_drivers.OUTPUT}</td>
+ </tr>
+<!-- END avatar_drivers -->
-<!-- IF S_DISPLAY_GALLERY or S_IN_AVATAR_GALLERY or S_LINK_AVATAR or S_UPLOAD_AVATAR_URL or S_UPLOAD_AVATAR_FILE or AVATAR -->
<tr>
<td class="cat" colspan="2" align="center">{S_HIDDEN_FIELDS}<input class="btnmain" type="submit" name="submit" value="{L_SUBMIT}" />&nbsp;&nbsp;<!-- IF S_IN_AVATAR_GALLERY --><input class="btnlite" type="submit" name="cancel" value="{L_CANCEL}" /><!-- ELSE --><input class="btnlite" type="reset" value="{L_RESET}" name="reset" /><!-- ENDIF --></td>
</tr>
-<!-- ENDIF -->
</table>
-<!-- INCLUDE ucp_footer.html --> \ No newline at end of file
+<!-- INCLUDEJS avatars.js -->
+
+<!-- INCLUDE ucp_footer.html -->
diff --git a/phpBB/styles/subsilver2/template/ucp_profile_profile_info.html b/phpBB/styles/subsilver2/template/ucp_profile_profile_info.html
index c08b873834..bf0aa8f899 100644
--- a/phpBB/styles/subsilver2/template/ucp_profile_profile_info.html
+++ b/phpBB/styles/subsilver2/template/ucp_profile_profile_info.html
@@ -9,55 +9,23 @@
<td class="row3" colspan="2" align="center"><span class="gensmall error">{ERROR}</span></td>
</tr>
<!-- ENDIF -->
-<tr>
+<tr>
<td class="row1" colspan="2"><span class="gensmall">{L_PROFILE_INFO_NOTICE}</span></td>
</tr>
-<tr>
- <td class="row1" width="35%"><b class="genmed">{L_UCP_ICQ}: </b></td>
- <td class="row2"><input class="post" type="text" name="icq" size="30" maxlength="15" value="{ICQ}" /></td>
-</tr>
-<tr>
- <td class="row1" width="35%"><b class="genmed">{L_UCP_AIM}: </b></td>
- <td class="row2"><input class="post" type="text" name="aim" size="30" maxlength="255" value="{AIM}" /></td>
-</tr>
-<tr>
- <td class="row1" width="35%"><b class="genmed">{L_UCP_MSNM}: </b></td>
- <td class="row2"><input class="post" type="text" name="msn" size="30" maxlength="255" value="{MSN}" /></td>
-</tr>
-<tr>
- <td class="row1" width="35%"><b class="genmed">{L_UCP_YIM}: </b></td>
- <td class="row2"><input class="post" type="text" name="yim" size="30" maxlength="255" value="{YIM}" /></td>
-</tr>
-<tr>
- <td class="row1" width="35%"><b class="genmed">{L_UCP_JABBER}: </b></td>
+<tr>
+ <td class="row1" width="35%"><b class="genmed">{L_UCP_JABBER}{L_COLON} </b></td>
<td class="row2"><input class="post" type="text" name="jabber" size="30" maxlength="255" value="{JABBER}" /></td>
</tr>
-<tr>
- <td class="row1" width="35%"><b class="genmed">{L_WEBSITE}: </b></td>
- <td class="row2"><input class="post" type="text" name="website" size="30" maxlength="255" value="{WEBSITE}" /></td>
-</tr>
-<tr>
- <td class="row1" width="35%"><b class="genmed">{L_LOCATION}: </b></td>
- <td class="row2"><input class="post" type="text" name="location" size="30" maxlength="100" value="{LOCATION}" /></td>
-</tr>
-<tr>
- <td class="row1" width="35%"><b class="genmed">{L_OCCUPATION}: </b></td>
- <td class="row2"><textarea class="post" name="occupation" rows="3" cols="30">{OCCUPATION}</textarea></td>
-</tr>
-<tr>
- <td class="row1" width="35%"><b class="genmed">{L_INTERESTS}: </b></td>
- <td class="row2"><textarea class="post" name="interests" rows="3" cols="30">{INTERESTS}</textarea></td>
-</tr>
<!-- IF S_BIRTHDAYS_ENABLED -->
- <tr>
- <td class="row1" width="35%"><b class="genmed">{L_BIRTHDAY}: </b><br /><span class="gensmall">{L_BIRTHDAY_EXPLAIN}</span></td>
- <td class="row2"><span class="genmed">{L_DAY}:</span> <select name="bday_day">{S_BIRTHDAY_DAY_OPTIONS}</select> <span class="genmed">{L_MONTH}:</span> <select name="bday_month">{S_BIRTHDAY_MONTH_OPTIONS}</select> <span class="genmed">{L_YEAR}:</span> <select name="bday_year">{S_BIRTHDAY_YEAR_OPTIONS}</select></td>
+ <tr>
+ <td class="row1" width="35%"><b class="genmed">{L_BIRTHDAY}{L_COLON} </b><br /><span class="gensmall">{L_BIRTHDAY_EXPLAIN}</span></td>
+ <td class="row2"><span class="genmed">{L_DAY}{L_COLON}</span> <select name="bday_day">{S_BIRTHDAY_DAY_OPTIONS}</select> <span class="genmed">{L_MONTH}{L_COLON}</span> <select name="bday_month">{S_BIRTHDAY_MONTH_OPTIONS}</select> <span class="genmed">{L_YEAR}{L_COLON}</span> <select name="bday_year">{S_BIRTHDAY_YEAR_OPTIONS}</select></td>
</tr>
<!-- ENDIF -->
<!-- BEGIN profile_fields -->
- <tr>
+ <tr>
<td class="row1" width="35%">
- <b class="genmed">{profile_fields.LANG_NAME}: </b>
+ <b class="genmed">{profile_fields.LANG_NAME}{L_COLON} </b>
<!-- IF profile_fields.S_REQUIRED --><b>*</b><!-- ENDIF -->
<!-- IF profile_fields.LANG_EXPLAIN --><br /><span class="gensmall">{profile_fields.LANG_EXPLAIN}</span><!-- ENDIF -->
</td>
@@ -69,4 +37,4 @@
</tr>
</table>
-<!-- INCLUDE ucp_footer.html --> \ No newline at end of file
+<!-- INCLUDE ucp_footer.html -->
diff --git a/phpBB/styles/subsilver2/template/ucp_profile_reg_details.html b/phpBB/styles/subsilver2/template/ucp_profile_reg_details.html
index 2eca7a93c8..d8fe84bf79 100644
--- a/phpBB/styles/subsilver2/template/ucp_profile_reg_details.html
+++ b/phpBB/styles/subsilver2/template/ucp_profile_reg_details.html
@@ -15,26 +15,20 @@
</tr>
<!-- ENDIF -->
<tr>
- <td class="row1" width="35%"><b class="genmed">{L_USERNAME}: </b><br /><span class="gensmall">{L_USERNAME_EXPLAIN}</span></td>
+ <td class="row1" width="35%"><b class="genmed">{L_USERNAME}{L_COLON} </b><br /><span class="gensmall">{L_USERNAME_EXPLAIN}</span></td>
<td class="row2"><!-- IF S_CHANGE_USERNAME --><input type="text" class="post" name="username" size="30" value="{USERNAME}" /><!-- ELSE --><b class="gen">{USERNAME}</b><!-- ENDIF --></td>
</tr>
<tr>
- <td class="row1" width="35%"><b class="genmed">{L_EMAIL_ADDRESS}: </b></td>
- <td class="row2"><!-- IF S_CHANGE_EMAIL --><input type="text" class="post" name="email" size="30" maxlength="100" value="{EMAIL}" /><!-- ELSE --><b class="gen">{EMAIL}</b><!-- ENDIF --></td>
+ <td class="row1" width="35%"><b class="genmed">{L_EMAIL_ADDRESS}{L_COLON} </b></td>
+ <td class="row2"><!-- IF S_CHANGE_EMAIL --><input type="email" class="post" name="email" size="30" maxlength="100" value="{EMAIL}" /><!-- ELSE --><b class="gen">{EMAIL}</b><!-- ENDIF --></td>
</tr>
-<!-- IF S_CHANGE_EMAIL -->
- <tr>
- <td class="row1" width="35%"><b class="genmed">{L_CONFIRM_EMAIL}: </b><br /><span class="gensmall">{L_CONFIRM_EMAIL_EXPLAIN}</span></td>
- <td class="row2"><input type="text" class="post" name="email_confirm" size="30" maxlength="100" value="{CONFIRM_EMAIL}" /></td>
- </tr>
-<!-- ENDIF -->
<!-- IF S_CHANGE_PASSWORD -->
<tr>
- <td class="row1" width="35%"><b class="genmed">{L_NEW_PASSWORD}: </b><br /><span class="gensmall">{L_CHANGE_PASSWORD_EXPLAIN}</span></td>
+ <td class="row1" width="35%"><b class="genmed">{L_NEW_PASSWORD}{L_COLON} </b><br /><span class="gensmall">{L_CHANGE_PASSWORD_EXPLAIN}</span></td>
<td class="row2"><input type="password" class="post" name="new_password" size="30" maxlength="255" value="{NEW_PASSWORD}" /></td>
</tr>
<tr>
- <td class="row1" width="35%"><b class="genmed">{L_CONFIRM_PASSWORD}: </b><br /><span class="gensmall">{L_CONFIRM_PASSWORD_EXPLAIN}</span></td>
+ <td class="row1" width="35%"><b class="genmed">{L_CONFIRM_PASSWORD}{L_COLON} </b><br /><span class="gensmall">{L_CONFIRM_PASSWORD_EXPLAIN}</span></td>
<td class="row2"><input type="password" class="post" name="password_confirm" size="30" maxlength="255" value="{PASSWORD_CONFIRM}" /></td>
</tr>
<!-- ENDIF -->
@@ -42,7 +36,7 @@
<th colspan="2">{L_CONFIRM_CHANGES}</th>
</tr>
<tr>
- <td class="row1" width="35%"><b class="genmed">{L_CURRENT_PASSWORD}: </b><br /><span class="gensmall"><!-- IF S_CHANGE_PASSWORD -->{L_CURRENT_CHANGE_PASSWORD_EXPLAIN}<!-- ELSE -->{L_CURRENT_PASSWORD_EXPLAIN}<!-- ENDIF --></span></td>
+ <td class="row1" width="35%"><b class="genmed">{L_CURRENT_PASSWORD}{L_COLON} </b><br /><span class="gensmall"><!-- IF S_CHANGE_PASSWORD -->{L_CURRENT_CHANGE_PASSWORD_EXPLAIN}<!-- ELSE -->{L_CURRENT_PASSWORD_EXPLAIN}<!-- ENDIF --></span></td>
<td class="row2"><input type="password" class="post" name="cur_password" size="30" maxlength="255" value="{CUR_PASSWORD}" /></td>
</tr>
<tr>
diff --git a/phpBB/styles/subsilver2/template/ucp_profile_signature.html b/phpBB/styles/subsilver2/template/ucp_profile_signature.html
index 54e8aaa723..5a2690edda 100644
--- a/phpBB/styles/subsilver2/template/ucp_profile_signature.html
+++ b/phpBB/styles/subsilver2/template/ucp_profile_signature.html
@@ -61,12 +61,7 @@
<td colspan="2">
<table cellspacing="0" cellpadding="0" border="0" width="100%">
<tr>
- <td align="{S_CONTENT_FLOW_BEGIN}">
- <script type="text/javascript">
- // <![CDATA[
- colorPalette('h', 6, 5)
- // ]]>
- </script>
+ <td align="{S_CONTENT_FLOW_BEGIN}" id="color_palette_placeholder" data-orientation="h" data-width="11" data-height="10">
</td>
</tr>
</table>
@@ -134,4 +129,4 @@
</tr>
</table>
-<!-- INCLUDE ucp_footer.html --> \ No newline at end of file
+<!-- INCLUDE ucp_footer.html -->
diff --git a/phpBB/styles/subsilver2/template/ucp_register.html b/phpBB/styles/subsilver2/template/ucp_register.html
index ebcdf2d76b..3392c557a2 100644
--- a/phpBB/styles/subsilver2/template/ucp_register.html
+++ b/phpBB/styles/subsilver2/template/ucp_register.html
@@ -34,33 +34,28 @@
<!-- ENDIF -->
<tr>
- <td class="row1" width="38%"><b class="genmed">{L_USERNAME}: </b><br /><span class="gensmall">{L_USERNAME_EXPLAIN}</span></td>
+ <td class="row1" width="38%"><b class="genmed">{L_USERNAME}{L_COLON} </b><br /><span class="gensmall">{L_USERNAME_EXPLAIN}</span></td>
<td class="row2"><input class="post" type="text" name="username" size="25" value="{USERNAME}" /></td>
</tr>
<tr>
- <td class="row1"><b class="genmed">{L_EMAIL_ADDRESS}: </b></td>
- <td class="row2"><input class="post" type="text" name="email" size="25" maxlength="100" value="{EMAIL}" /></td>
+ <td class="row1"><b class="genmed">{L_EMAIL_ADDRESS}{L_COLON} </b></td>
+ <td class="row2"><input class="post" type="email" name="email" size="25" maxlength="100" value="{EMAIL}" /></td>
</tr>
<tr>
- <td class="row1"><b class="genmed">{L_CONFIRM_EMAIL}: </b></td>
- <td class="row2"><input class="post" type="text" name="email_confirm" size="25" maxlength="100" value="{EMAIL_CONFIRM}" /></td>
-</tr>
-<tr>
- <td class="row1"><b class="genmed">{L_PASSWORD}: </b><br /><span class="gensmall">{L_PASSWORD_EXPLAIN}</span></td>
+ <td class="row1"><b class="genmed">{L_PASSWORD}{L_COLON} </b><br /><span class="gensmall">{L_PASSWORD_EXPLAIN}</span></td>
<td class="row2"><input class="post" type="password" name="new_password" size="25" value="{PASSWORD}" /></td>
</tr>
<tr>
- <td class="row1"><b class="genmed">{L_CONFIRM_PASSWORD}: </b></td>
+ <td class="row1"><b class="genmed">{L_CONFIRM_PASSWORD}{L_COLON} </b></td>
<td class="row2"><input class="post" type="password" name="password_confirm" size="25" value="{PASSWORD_CONFIRM}" /></td>
</tr>
<tr>
- <td class="row1"><b class="genmed">{L_LANGUAGE}: </b></td>
+ <td class="row1"><b class="genmed">{L_LANGUAGE}{L_COLON} </b></td>
<td class="row2"><select name="lang" onchange="change_language(this.value); return false;">{S_LANG_OPTIONS}</select></td>
</tr>
-<tr>
- <td class="row1"><b class="genmed">{L_TIMEZONE}: </b></td>
- <td class="row2"><select name="tz">{S_TZ_OPTIONS}</select></td>
-</tr>
+
+<!-- INCLUDE timezone_option.html -->
+
<!-- IF .profile_fields -->
<tr>
<td class="row2" colspan="2"><span class="gensmall">{L_ITEMS_REQUIRED}</span></td>
@@ -68,7 +63,7 @@
<!-- BEGIN profile_fields -->
<tr>
<td class="row1" width="35%">
- <b class="genmed">{profile_fields.LANG_NAME}: </b>
+ <b class="genmed">{profile_fields.LANG_NAME}{L_COLON} </b>
<!-- IF profile_fields.S_REQUIRED --><b>*</b><!-- ENDIF -->
<!-- IF profile_fields.LANG_EXPLAIN --><br /><span class="gensmall">{profile_fields.LANG_EXPLAIN}</span><!-- ENDIF -->
</td>
@@ -98,4 +93,4 @@
{S_FORM_TOKEN}
</form>
-<!-- INCLUDE overall_footer.html --> \ No newline at end of file
+<!-- INCLUDE overall_footer.html -->
diff --git a/phpBB/styles/subsilver2/template/ucp_remind.html b/phpBB/styles/subsilver2/template/ucp_remind.html
index b14fbe8305..f7fde4b3be 100644
--- a/phpBB/styles/subsilver2/template/ucp_remind.html
+++ b/phpBB/styles/subsilver2/template/ucp_remind.html
@@ -9,12 +9,12 @@
<th colspan="2">{L_SEND_PASSWORD}</th>
</tr>
<tr>
- <td class="row1" width="38%"><b class="genmed">{L_USERNAME}: </b></td>
+ <td class="row1" width="38%"><b class="genmed">{L_USERNAME}{L_COLON} </b></td>
<td class="row2"><input type="text" class="post" name="username" size="25" value="{USERNAME}" /></td>
</tr>
<tr>
- <td class="row1"><b class="genmed">{L_EMAIL_ADDRESS}: </b><br /><span class="gensmall">{L_EMAIL_REMIND}</span></td>
- <td class="row2"><input type="text" class="post" name="email" size="25" maxlength="100" value="{EMAIL}" /></td>
+ <td class="row1"><b class="genmed">{L_EMAIL_ADDRESS}{L_COLON} </b><br /><span class="gensmall">{L_EMAIL_REMIND}</span></td>
+ <td class="row2"><input type="email" class="post" name="email" size="25" maxlength="100" value="{EMAIL}" /></td>
</tr>
<tr>
<td class="cat" colspan="2" align="center">{S_HIDDEN_FIELDS}<input type="submit" name="submit" value="{L_SUBMIT}" class="btnmain" />&nbsp;&nbsp;<input type="reset" value="{L_RESET}" name="reset" class="btnlite" /></td>
@@ -25,4 +25,4 @@
</div>
-<!-- INCLUDE overall_footer.html --> \ No newline at end of file
+<!-- INCLUDE overall_footer.html -->
diff --git a/phpBB/styles/subsilver2/template/ucp_resend.html b/phpBB/styles/subsilver2/template/ucp_resend.html
index 3a39f904aa..62e7e96d6b 100644
--- a/phpBB/styles/subsilver2/template/ucp_resend.html
+++ b/phpBB/styles/subsilver2/template/ucp_resend.html
@@ -9,12 +9,12 @@
<th colspan="2">{L_UCP_RESEND}</th>
</tr>
<tr>
- <td class="row1" width="38%"><b class="genmed">{L_USERNAME}: </b></td>
+ <td class="row1" width="38%"><b class="genmed">{L_USERNAME}{L_COLON} </b></td>
<td class="row2"><input type="text" class="post" name="username" size="25" value="{USERNAME}" /></td>
</tr>
<tr>
- <td class="row1"><b class="genmed">{L_EMAIL_ADDRESS}: </b><br /><span class="gensmall">{L_EMAIL_REMIND}</span></td>
- <td class="row2"><input type="text" class="post" name="email" size="25" maxlength="100" value="{EMAIL}" /></td>
+ <td class="row1"><b class="genmed">{L_EMAIL_ADDRESS}{L_COLON} </b><br /><span class="gensmall">{L_EMAIL_REMIND}</span></td>
+ <td class="row2"><input type="email" class="post" name="email" size="25" maxlength="100" value="{EMAIL}" /></td>
</tr>
<tr>
<td class="cat" colspan="2" align="center">{S_HIDDEN_FIELDS}<input type="submit" name="submit" value="{L_SUBMIT}" class="btnmain" />&nbsp;&nbsp;<input type="reset" value="{L_RESET}" name="reset" class="btnlite" /></td>
@@ -26,4 +26,4 @@
</div>
-<!-- INCLUDE overall_footer.html --> \ No newline at end of file
+<!-- INCLUDE overall_footer.html -->
diff --git a/phpBB/styles/subsilver2/template/ucp_zebra_foes.html b/phpBB/styles/subsilver2/template/ucp_zebra_foes.html
index 89be18ccc1..6149a80e69 100644
--- a/phpBB/styles/subsilver2/template/ucp_zebra_foes.html
+++ b/phpBB/styles/subsilver2/template/ucp_zebra_foes.html
@@ -13,11 +13,11 @@
</tr>
<!-- ENDIF -->
<tr>
- <td class="row1" width="40%"><b class="genmed">{L_YOUR_FOES}:</b><br /><span class="gensmall">{L_YOUR_FOES_EXPLAIN}</span></td>
+ <td class="row1" width="40%"><b class="genmed">{L_YOUR_FOES}{L_COLON}</b><br /><span class="gensmall">{L_YOUR_FOES_EXPLAIN}</span></td>
<td class="row2" align="center"><!-- IF S_USERNAME_OPTIONS --><select name="usernames[]" multiple="multiple" size="5">{S_USERNAME_OPTIONS}</select><!-- ELSE --><b class="genmed">{L_NO_FOES}</b><!-- ENDIF --></td>
</tr>
<tr>
- <td class="row1"><b class="genmed">{L_ADD_FOES}:</b><br /><span class="gensmall">{L_ADD_FOES_EXPLAIN} [ <a href="{U_FIND_USERNAME}" onclick="find_username(this.href); return false;">{L_FIND_USERNAME}</a> ]</span></td>
+ <td class="row1"><b class="genmed">{L_ADD_FOES}{L_COLON}</b><br /><span class="gensmall">{L_ADD_FOES_EXPLAIN} [ <a href="{U_FIND_USERNAME}" onclick="find_username(this.href); return false;">{L_FIND_USERNAME}</a> ]</span></td>
<td class="row2" align="center"><textarea name="add" rows="5" cols="30">{USERNAMES}</textarea><br /></td>
</tr>
<tr>
@@ -25,4 +25,4 @@
</tr>
</table>
-<!-- INCLUDE ucp_footer.html --> \ No newline at end of file
+<!-- INCLUDE ucp_footer.html -->
diff --git a/phpBB/styles/subsilver2/template/ucp_zebra_friends.html b/phpBB/styles/subsilver2/template/ucp_zebra_friends.html
index 2abea04b8f..3e18af9969 100644
--- a/phpBB/styles/subsilver2/template/ucp_zebra_friends.html
+++ b/phpBB/styles/subsilver2/template/ucp_zebra_friends.html
@@ -4,6 +4,7 @@
<tr>
<th colspan="2" valign="middle">{L_TITLE}</th>
</tr>
+<!-- EVENT ucp_friend_list_before -->
<tr>
<td class="row3" colspan="2"><span class="gensmall">{L_FRIENDS_EXPLAIN}</span></td>
</tr>
@@ -13,11 +14,12 @@
</tr>
<!-- ENDIF -->
<tr>
- <td class="row1" width="40%"><b class="genmed">{L_YOUR_FRIENDS}:</b><br /><span class="gensmall">{L_YOUR_FRIENDS_EXPLAIN}</span></td>
+ <td class="row1" width="40%"><b class="genmed">{L_YOUR_FRIENDS}{L_COLON}</b><br /><span class="gensmall">{L_YOUR_FRIENDS_EXPLAIN}</span></td>
<td class="row2" align="center"><!-- IF S_USERNAME_OPTIONS --><select name="usernames[]" multiple="multiple" size="5">{S_USERNAME_OPTIONS}</select><!-- ELSE --><b class="genmed">{L_NO_FRIENDS}</b><!-- ENDIF --></td>
</tr>
+<!-- EVENT ucp_friend_list_after -->
<tr>
- <td class="row1"><b class="genmed">{L_ADD_FRIENDS}:</b><br /><span class="gensmall">{L_ADD_FRIENDS_EXPLAIN} [ <a href="{U_FIND_USERNAME}" onclick="find_username(this.href); return false;">{L_FIND_USERNAME}</a> ]</span></td>
+ <td class="row1"><b class="genmed">{L_ADD_FRIENDS}{L_COLON}</b><br /><span class="gensmall">{L_ADD_FRIENDS_EXPLAIN} [ <a href="{U_FIND_USERNAME}" onclick="find_username(this.href); return false;">{L_FIND_USERNAME}</a> ]</span></td>
<td class="row2" align="center"><textarea name="add" rows="5" cols="30">{USERNAMES}</textarea><br /></td>
</tr>
<tr>
@@ -25,4 +27,4 @@
</tr>
</table>
-<!-- INCLUDE ucp_footer.html --> \ No newline at end of file
+<!-- INCLUDE ucp_footer.html -->
diff --git a/phpBB/styles/subsilver2/template/viewforum_body.html b/phpBB/styles/subsilver2/template/viewforum_body.html
index ee6ec26ab2..af14fc0129 100644
--- a/phpBB/styles/subsilver2/template/viewforum_body.html
+++ b/phpBB/styles/subsilver2/template/viewforum_body.html
@@ -1,7 +1,7 @@
<!-- INCLUDE overall_header.html -->
<!-- IF S_FORUM_RULES -->
- <div class="forumrules">
+ <div class="forumrules<!-- IF U_FORUM_RULES --> rules-link<!-- ENDIF -->">
<!-- IF U_FORUM_RULES -->
<h3>{L_FORUM_RULES}</h3><br />
<a href="{U_FORUM_RULES}"><b>{L_FORUM_RULES_LINK}</b></a>
@@ -40,17 +40,31 @@
<td class="row1" width="25" align="center"><!-- IF topicrow.TOPIC_ICON_IMG --><img src="{T_ICONS_PATH}{topicrow.TOPIC_ICON_IMG}" width="{topicrow.TOPIC_ICON_IMG_WIDTH}" height="{topicrow.TOPIC_ICON_IMG_HEIGHT}" alt="" title="" /><!-- ENDIF --></td>
<!-- ENDIF -->
<td class="row1">
- <!-- IF topicrow.S_UNREAD_TOPIC --><a href="{topicrow.U_NEWEST_POST}">{NEWEST_POST_IMG}</a><!-- ENDIF -->
- {topicrow.ATTACH_ICON_IMG} <!-- IF topicrow.S_HAS_POLL or topicrow.S_TOPIC_MOVED --><b>{topicrow.TOPIC_TYPE}</b> <!-- ENDIF --><a title="{L_POSTED}: {topicrow.FIRST_POST_TIME}" href="{topicrow.U_VIEW_TOPIC}"class="topictitle">{topicrow.TOPIC_TITLE}</a>
+ <!-- EVENT topiclist_row_prepend -->
+ <!-- IF topicrow.S_UNREAD_TOPIC --><a href="{topicrow.U_NEWEST_POST}" class="imageset">{NEWEST_POST_IMG}</a><!-- ENDIF -->
+ {topicrow.ATTACH_ICON_IMG} <!-- IF topicrow.S_HAS_POLL or topicrow.S_TOPIC_MOVED --><b>{topicrow.TOPIC_TYPE}</b> <!-- ENDIF --><a title="{L_POSTED}{L_COLON} {topicrow.FIRST_POST_TIME}" href="{topicrow.U_VIEW_TOPIC}"class="topictitle">{topicrow.TOPIC_TITLE}</a>
<!-- IF topicrow.S_TOPIC_UNAPPROVED or topicrow.S_POSTS_UNAPPROVED -->
- <a href="{topicrow.U_MCP_QUEUE}">{UNAPPROVED_IMG}</a>&nbsp;
+ <a href="{topicrow.U_MCP_QUEUE}" class="imageset">{topicrow.UNAPPROVED_IMG}</a>&nbsp;
+ <!-- ENDIF -->
+ <!-- IF topicrow.S_TOPIC_DELETED -->
+ <a href="{topicrow.U_MCP_QUEUE}" class="imageset">{DELETED_IMG}</a>&nbsp;
<!-- ENDIF -->
<!-- IF topicrow.S_TOPIC_REPORTED -->
- <a href="{topicrow.U_MCP_REPORT}">{REPORTED_IMG}</a>&nbsp;
+ <a href="{topicrow.U_MCP_REPORT}" class="imageset">{REPORTED_IMG}</a>&nbsp;
<!-- ENDIF -->
- <!-- IF topicrow.PAGINATION -->
- <p class="gensmall"> [ {GOTO_PAGE_IMG}{L_GOTO_PAGE}: {topicrow.PAGINATION} ] </p>
+ <!-- IF .topicrow.pagination -->
+ <p class="gensmall"> [ {GOTO_PAGE_IMG}{L_GOTO_PAGE}{L_COLON}
+ <!-- BEGIN pagination -->
+ <!-- IF topicrow.pagination.S_IS_PREV -->
+ <!-- ELSEIF topicrow.pagination.S_IS_CURRENT --><strong>{topicrow.pagination.PAGE_NUMBER}</strong>
+ <!-- ELSEIF topicrow.pagination.S_IS_ELLIPSIS --> {L_ELLIPSIS}
+ <!-- ELSEIF topicrow.pagination.S_IS_NEXT -->
+ <!-- ELSE --><a href="{topicrow.pagination.PAGE_URL}">{topicrow.pagination.PAGE_NUMBER}</a>
+ <!-- ENDIF -->
+ <!-- END pagination -->
+ ] </p>
<!-- ENDIF -->
+ <!-- EVENT topiclist_row_append -->
</td>
<td class="row2" width="130" align="center"><p class="topicauthor">{topicrow.TOPIC_AUTHOR_FULL}</p></td>
<td class="row1" width="50" align="center"><p class="topicdetails">{topicrow.REPLIES}</p></td>
@@ -58,7 +72,7 @@
<td class="row1" width="140" align="center">
<p class="topicdetails" style="white-space: nowrap;">{topicrow.LAST_POST_TIME}</p>
<p class="topicdetails">{topicrow.LAST_POST_AUTHOR_FULL}
- <!-- IF not S_IS_BOT --><a href="{topicrow.U_LAST_POST}">{LAST_POST_IMG}</a><!-- ENDIF -->
+ <!-- IF not S_IS_BOT --><a href="{topicrow.U_LAST_POST}" class="imageset">{LAST_POST_IMG}</a><!-- ENDIF -->
</p>
</td>
</tr>
@@ -92,10 +106,10 @@
<h2><a class="titles" href="{U_VIEW_FORUM}">{FORUM_NAME}</a></h2>
<!-- IF MODERATORS -->
- <p class="moderators"><!-- IF S_SINGLE_MODERATOR -->{L_MODERATOR}<!-- ELSE -->{L_MODERATORS}<!-- ENDIF -->: {MODERATORS}</p>
+ <p class="moderators"><!-- IF S_SINGLE_MODERATOR -->{L_MODERATOR}<!-- ELSE -->{L_MODERATORS}<!-- ENDIF -->{L_COLON} {MODERATORS}</p>
<!-- ENDIF -->
<!-- IF U_MCP -->
- <p class="linkmcp">[ <a href="{U_MCP}">{L_MCP}</a> ]</p>
+ <p class="linkmcp">[&nbsp;<!-- IF U_ACP --><a href="{U_ACP}">{L_ACP}</a><!-- IF U_MCP -->&nbsp;|&nbsp;<!-- ENDIF --><!-- ENDIF --><!-- IF U_MCP --><a href="{U_MCP}">{L_MCP}</a><!-- ENDIF -->&nbsp;]</p>
<!-- ENDIF -->
</div>
@@ -122,7 +136,7 @@
<td class="cat"><h4><a href="{U_LOGIN_LOGOUT}">{L_LOGIN_LOGOUT}</a></h4></td>
</tr>
<tr>
- <td class="row1" align="center"><span class="genmed">{L_USERNAME}:</span> <input class="post" type="text" name="username" size="10" />&nbsp; <span class="genmed">{L_PASSWORD}:</span> <input class="post" type="password" name="password" size="10" /><!-- IF S_AUTOLOGIN_ENABLED -->&nbsp; <span class="gensmall">{L_LOG_ME_IN}</span> <input type="checkbox" class="radio" name="autologin" /><!-- ENDIF -->&nbsp; <input type="submit" class="btnmain" name="login" value="{L_LOGIN}" /></td>
+ <td class="row1" align="center"><span class="genmed">{L_USERNAME}{L_COLON}</span> <input class="post" type="text" name="username" size="10" />&nbsp; <span class="genmed">{L_PASSWORD}{L_COLON}</span> <input class="post" type="password" name="password" size="10" /><!-- IF S_AUTOLOGIN_ENABLED -->&nbsp; <span class="gensmall">{L_LOG_ME_IN}</span> <input type="checkbox" class="radio" name="autologin" /><!-- ENDIF -->&nbsp; <input type="submit" class="btnmain" name="login" value="{L_LOGIN}" /></td>
</tr>
</table>
{S_LOGIN_REDIRECT}
@@ -137,7 +151,7 @@
<table width="100%" cellspacing="1">
<tr>
<!-- IF S_DISPLAY_POST_INFO and not S_IS_BOT -->
- <td align="{S_CONTENT_FLOW_BEGIN}" valign="middle"><a href="{U_POST_NEW_TOPIC}">{POST_IMG}</a></td>
+ <td align="{S_CONTENT_FLOW_BEGIN}" valign="middle"><a href="{U_POST_NEW_TOPIC}" class="imageset">{POST_IMG}</a></td>
<!-- ENDIF -->
<!-- IF TOTAL_TOPICS -->
<td class="nav" valign="middle" nowrap="nowrap">&nbsp;{PAGE_NUMBER}<br /></td>
@@ -154,7 +168,7 @@
<td class="cat" colspan="<!-- IF S_TOPIC_ICONS -->7<!-- ELSE -->6<!-- ENDIF -->">
<table width="100%" cellspacing="0">
<tr class="nav">
- <td valign="middle">&nbsp;<!-- IF S_WATCH_FORUM_LINK and not S_IS_BOT --><a href="{S_WATCH_FORUM_LINK}">{S_WATCH_FORUM_TITLE}</a><!-- ENDIF --></td>
+ <td valign="middle">&nbsp;<!-- IF U_WATCH_FORUM_LINK and not S_IS_BOT --><a href="{U_WATCH_FORUM_LINK}">{S_WATCH_FORUM_TITLE}</a><!-- ENDIF --></td>
<td align="{S_CONTENT_FLOW_END}" valign="middle"><!-- IF not S_IS_BOT and U_MARK_TOPICS and .topicrow --><a href="{U_MARK_TOPICS}">{L_MARK_TOPICS_READ}</a><!-- ENDIF -->&nbsp;</td>
</tr>
</table>
@@ -191,17 +205,33 @@
<td class="row1" width="25" align="center"><!-- IF topicrow.TOPIC_ICON_IMG --><img src="{T_ICONS_PATH}{topicrow.TOPIC_ICON_IMG}" width="{topicrow.TOPIC_ICON_IMG_WIDTH}" height="{topicrow.TOPIC_ICON_IMG_HEIGHT}" alt="" title="" /><!-- ENDIF --></td>
<!-- ENDIF -->
<td class="row1">
- <!-- IF topicrow.S_UNREAD_TOPIC --><a href="{topicrow.U_NEWEST_POST}">{NEWEST_POST_IMG}</a><!-- ENDIF -->
- {topicrow.ATTACH_ICON_IMG} <!-- IF topicrow.S_HAS_POLL or topicrow.S_TOPIC_MOVED --><b>{topicrow.TOPIC_TYPE}</b> <!-- ENDIF --><a title="{L_POSTED}: {topicrow.FIRST_POST_TIME}" href="{topicrow.U_VIEW_TOPIC}" class="topictitle">{topicrow.TOPIC_TITLE}</a>
+ <!-- EVENT topiclist_row_prepend -->
+ <!-- IF topicrow.S_UNREAD_TOPIC --><a href="{topicrow.U_NEWEST_POST}" class="imageset">{NEWEST_POST_IMG}</a><!-- ENDIF -->
+ {topicrow.ATTACH_ICON_IMG} <!-- IF topicrow.S_HAS_POLL or topicrow.S_TOPIC_MOVED --><b>{topicrow.TOPIC_TYPE}</b> <!-- ENDIF -->
+ <a title="{L_POSTED}{L_COLON} {topicrow.FIRST_POST_TIME}" href="<!-- IF not S_IS_BOT and topicrow.S_UNREAD_TOPIC -->{topicrow.U_NEWEST_POST}<!-- ELSE -->{topicrow.U_VIEW_TOPIC}<!-- ENDIF -->" class="topictitle">{topicrow.TOPIC_TITLE}</a>
<!-- IF topicrow.S_TOPIC_UNAPPROVED or topicrow.S_POSTS_UNAPPROVED -->
- <a href="{topicrow.U_MCP_QUEUE}">{topicrow.UNAPPROVED_IMG}</a>&nbsp;
+ <a href="{topicrow.U_MCP_QUEUE}" class="imageset">{topicrow.UNAPPROVED_IMG}</a>&nbsp;
+ <!-- ENDIF -->
+ <!-- IF topicrow.S_TOPIC_DELETED -->
+ <a href="{topicrow.U_MCP_QUEUE}" class="imageset">{DELETED_IMG}</a>&nbsp;
<!-- ENDIF -->
<!-- IF topicrow.S_TOPIC_REPORTED -->
- <a href="{topicrow.U_MCP_REPORT}">{REPORTED_IMG}</a>&nbsp;
+ <a href="{topicrow.U_MCP_REPORT}" class="imageset">{REPORTED_IMG}</a>&nbsp;
<!-- ENDIF -->
- <!-- IF topicrow.PAGINATION -->
- <p class="gensmall"> [ {GOTO_PAGE_IMG}{L_GOTO_PAGE}: {topicrow.PAGINATION} ] </p>
+ <!-- IF .topicrow.pagination -->
+ <p class="gensmall"> [ {GOTO_PAGE_IMG}{L_GOTO_PAGE}{L_COLON}
+ <!-- BEGIN pagination -->
+ <!-- IF topicrow.pagination.S_IS_PREV -->
+ <!-- ELSEIF topicrow.pagination.S_IS_CURRENT --><strong>{topicrow.pagination.PAGE_NUMBER}</strong>
+ <!-- ELSEIF topicrow.pagination.S_IS_ELLIPSIS --> {L_ELLIPSIS}
+ <!-- ELSEIF topicrow.pagination.S_IS_NEXT -->
+ <!-- ELSE --><a href="{topicrow.pagination.PAGE_URL}">{topicrow.pagination.PAGE_NUMBER}</a>
+ <!-- ENDIF -->
+ <!-- END pagination -->
+ ] </p>
<!-- ENDIF -->
+ <!-- IF topicrow.S_POST_GLOBAL and FORUM_ID != topicrow.FORUM_ID --><p class="gensmall">{L_IN} <a href="{topicrow.U_VIEW_FORUM}">{topicrow.FORUM_NAME}</a></p><!-- ENDIF -->
+ <!-- EVENT topiclist_row_append -->
</td>
<td class="row2" width="130" align="center"><p class="topicauthor">{topicrow.TOPIC_AUTHOR_FULL}</p></td>
<td class="row1" width="50" align="center"><p class="topicdetails">{topicrow.REPLIES}</p></td>
@@ -209,7 +239,7 @@
<td class="row1" width="140" align="center">
<p class="topicdetails" style="white-space: nowrap;">{topicrow.LAST_POST_TIME}</p>
<p class="topicdetails">{topicrow.LAST_POST_AUTHOR_FULL}
- <!-- IF not S_IS_BOT --><a href="{topicrow.U_LAST_POST}">{LAST_POST_IMG}</a><!-- ENDIF -->
+ <!-- IF not S_IS_BOT --><a href="{topicrow.U_LAST_POST}" class="imageset">{LAST_POST_IMG}</a><!-- ENDIF -->
</p>
</td>
</tr>
@@ -233,7 +263,7 @@
<!-- ELSE -->
<td class="cat" colspan="6">
<!-- ENDIF -->
- <form method="post" action="{S_FORUM_ACTION}"><span class="gensmall">{L_DISPLAY_TOPICS}:</span>&nbsp;{S_SELECT_SORT_DAYS}&nbsp;<span class="gensmall">{L_SORT_BY}</span> {S_SELECT_SORT_KEY} {S_SELECT_SORT_DIR}&nbsp;<input class="btnlite" type="submit" name="sort" value="{L_GO}" /></form>
+ <form method="post" action="{S_FORUM_ACTION}"><span class="gensmall">{L_DISPLAY_TOPICS}{L_COLON}</span>&nbsp;{S_SELECT_SORT_DAYS}&nbsp;<span class="gensmall">{L_SORT_BY}</span> {S_SELECT_SORT_KEY} {S_SELECT_SORT_DIR}&nbsp;<input class="btnlite" type="submit" name="sort" value="{L_GO}" /></form>
</td>
</tr>
<!-- ENDIF -->
@@ -244,7 +274,7 @@
<table width="100%" cellspacing="1">
<tr>
<!-- IF S_DISPLAY_POST_INFO and not S_IS_BOT -->
- <td align="{S_CONTENT_FLOW_BEGIN}" valign="middle"><a href="{U_POST_NEW_TOPIC}">{POST_IMG}</a></td>
+ <td align="{S_CONTENT_FLOW_BEGIN}" valign="middle"><a href="{U_POST_NEW_TOPIC}" class="imageset">{POST_IMG}</a></td>
<!-- ENDIF -->
<!-- IF TOTAL_TOPICS -->
<td class="nav" valign="middle" nowrap="nowrap">&nbsp;{PAGE_NUMBER}<br /></td>
@@ -326,4 +356,4 @@
</tr>
</table>
-<!-- INCLUDE overall_footer.html --> \ No newline at end of file
+<!-- INCLUDE overall_footer.html -->
diff --git a/phpBB/styles/subsilver2/template/viewonline_body.html b/phpBB/styles/subsilver2/template/viewonline_body.html
index 1fcab016b6..70b8b52efa 100644
--- a/phpBB/styles/subsilver2/template/viewonline_body.html
+++ b/phpBB/styles/subsilver2/template/viewonline_body.html
@@ -4,11 +4,11 @@
<h4>{TOTAL_GUEST_USERS_ONLINE}<!-- IF S_SWITCH_GUEST_DISPLAY --> [ <a href="{U_SWITCH_GUEST_DISPLAY}">{L_SWITCH_GUEST_DISPLAY}</a> ]<!-- ENDIF --></h4>
<br />
-<!-- IF PAGINATION -->
+<!-- IF .pagination -->
<table width="100%" cellspacing="1">
<tr>
<td class="nav" valign="middle" nowrap="nowrap">&nbsp;{PAGE_NUMBER}<br /></td>
- <td class="gensmall" width="100%" align="{S_CONTENT_FLOW_END}" nowrap="nowrap"><b><a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{L_GOTO_PAGE}</a> <!-- IF PREVIOUS_PAGE --><a href="{PREVIOUS_PAGE}">{L_PREVIOUS}</a>&nbsp;&nbsp;<!-- ENDIF -->{PAGINATION}<!-- IF NEXT_PAGE -->&nbsp;&nbsp;<a href="{NEXT_PAGE}">{L_NEXT}</a><!-- ENDIF --></b></td>
+ <td class="gensmall" width="100%" align="{S_CONTENT_FLOW_END}" nowrap="nowrap"><!-- INCLUDE pagination.html --></td>
</tr>
</table>
<!-- ENDIF -->
@@ -21,7 +21,7 @@
</tr>
<!-- BEGIN user_row -->
<tr>
- <td class="row1"><p class="gen">{user_row.USERNAME_FULL}</p><!-- IF user_row.USER_IP --><p class="gensmall">{L_IP}: <a href="{user_row.U_USER_IP}">{user_row.USER_IP}</a> &#187; <a href="{user_row.U_WHOIS}" onclick="popup(this.href, 750, 500); return false;">{L_WHOIS}</a></p><!-- ENDIF -->
+ <td class="row1"><p class="gen">{user_row.USERNAME_FULL}</p><!-- IF user_row.USER_IP --><p class="gensmall">{L_IP}{L_COLON} <a href="{user_row.U_USER_IP}">{user_row.USER_IP}</a> &#187; <a href="{user_row.U_WHOIS}" onclick="popup(this.href, 750, 500); return false;">{L_WHOIS}</a></p><!-- ENDIF -->
<!-- IF user_row.USER_BROWSER -->{user_row.USER_BROWSER}<!-- ENDIF --></td>
<td class="row2" align="center" nowrap="nowrap"><p class="genmed">&nbsp;{user_row.LASTUPDATE}</p></td>
<td class="row1"><p class="genmed"><a href="{user_row.U_FORUM_LOCATION}">{user_row.FORUM_LOCATION}</a></p></td>
@@ -35,11 +35,11 @@
<!-- ENDIF -->
</table>
-<!-- IF PAGINATION -->
+<!-- IF .pagination -->
<table width="100%" cellspacing="1">
<tr>
<td class="nav" valign="middle" nowrap="nowrap">&nbsp;{PAGE_NUMBER}<br /></td>
- <td class="gensmall" width="100%" align="{S_CONTENT_FLOW_END}" nowrap="nowrap"><b><a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{L_GOTO_PAGE}</a> <!-- IF PREVIOUS_PAGE --><a href="{PREVIOUS_PAGE}">{L_PREVIOUS}</a>&nbsp;&nbsp;<!-- ENDIF -->{PAGINATION}<!-- IF NEXT_PAGE -->&nbsp;&nbsp;<a href="{NEXT_PAGE}">{L_NEXT}</a><!-- ENDIF --></b></td>
+ <td class="gensmall" width="100%" align="{S_CONTENT_FLOW_END}" nowrap="nowrap"><!-- INCLUDE pagination.html --></td>
</tr>
</table>
<!-- ENDIF -->
@@ -54,4 +54,4 @@
<div align="{S_CONTENT_FLOW_END}"><!-- INCLUDE jumpbox.html --></div>
-<!-- INCLUDE overall_footer.html --> \ No newline at end of file
+<!-- INCLUDE overall_footer.html -->
diff --git a/phpBB/styles/subsilver2/template/viewonline_whois.html b/phpBB/styles/subsilver2/template/viewonline_whois.html
index 033d848ac4..ca5b326df8 100644
--- a/phpBB/styles/subsilver2/template/viewonline_whois.html
+++ b/phpBB/styles/subsilver2/template/viewonline_whois.html
@@ -9,4 +9,4 @@
</tr>
</table>
-<!-- INCLUDE simple_footer.html --> \ No newline at end of file
+<!-- INCLUDE simple_footer.html -->
diff --git a/phpBB/styles/subsilver2/template/viewtopic_body.html b/phpBB/styles/subsilver2/template/viewtopic_body.html
index 630871af61..6f2f1141a9 100644
--- a/phpBB/styles/subsilver2/template/viewtopic_body.html
+++ b/phpBB/styles/subsilver2/template/viewtopic_body.html
@@ -1,7 +1,7 @@
<!-- INCLUDE overall_header.html -->
<!-- IF S_FORUM_RULES -->
- <div class="forumrules">
+ <div class="forumrules<!-- IF U_FORUM_RULES --> rules-link<!-- ENDIF -->">
<!-- IF U_FORUM_RULES -->
<h3>{L_FORUM_RULES}</h3><br />
<a href="{U_FORUM_RULES}"><b>{L_FORUM_RULES_LINK}</b></a>
@@ -15,13 +15,13 @@
<!-- ENDIF -->
<div id="pageheader">
- <h2><a class="titles" href="{U_VIEW_TOPIC}">{TOPIC_TITLE}</a></h2>
+ <h2><!-- EVENT viewtopic_topic_title_prepend --><a class="titles" href="{U_VIEW_TOPIC}">{TOPIC_TITLE}</a></h2>
<!-- IF MODERATORS -->
- <p class="moderators"><!-- IF S_SINGLE_MODERATOR -->{L_MODERATOR}<!-- ELSE -->{L_MODERATORS}<!-- ENDIF -->: {MODERATORS}</p>
+ <p class="moderators"><!-- IF S_SINGLE_MODERATOR -->{L_MODERATOR}<!-- ELSE -->{L_MODERATORS}<!-- ENDIF -->{L_COLON} {MODERATORS}</p>
<!-- ENDIF -->
<!-- IF U_MCP -->
- <p class="linkmcp">[ <a href="{U_MCP}">{L_MCP}</a> ]</p>
+ <p class="linkmcp">[&nbsp;<!-- IF U_ACP --><a href="{U_ACP}">{L_ACP}</a><!-- IF U_MCP -->&nbsp;|&nbsp;<!-- ENDIF --><!-- ENDIF --><!-- IF U_MCP --><a href="{U_MCP}">{L_MCP}</a><!-- ENDIF -->&nbsp;]</p>
<!-- ENDIF -->
</div>
@@ -33,8 +33,8 @@
<tr>
<td align="{S_CONTENT_FLOW_BEGIN}" valign="middle" nowrap="nowrap">
<!-- IF not S_IS_BOT -->
- <!-- IF S_DISPLAY_POST_INFO --><a href="{U_POST_NEW_TOPIC}">{POST_IMG}</a>&nbsp;<!-- ENDIF -->
- <!-- IF S_DISPLAY_REPLY_INFO --><a href="{U_POST_REPLY_TOPIC}">{REPLY_IMG}</a><!-- ENDIF -->
+ <!-- IF S_DISPLAY_POST_INFO --><a href="{U_POST_NEW_TOPIC}" class="imageset">{POST_IMG}</a>&nbsp;<!-- ENDIF -->
+ <!-- IF S_DISPLAY_REPLY_INFO --><a href="{U_POST_REPLY_TOPIC}" class="imageset">{REPLY_IMG}</a><!-- ENDIF -->
<!-- ENDIF -->
</td>
<!-- IF TOTAL_POSTS -->
@@ -52,8 +52,8 @@
<tr>
<td class="nav" nowrap="nowrap">&nbsp;
<!-- IF not S_IS_BOT -->
- <!-- IF U_WATCH_TOPIC --><a href="{U_WATCH_TOPIC}" title="{L_WATCH_TOPIC}">{L_WATCH_TOPIC}</a><!-- IF U_PRINT_TOPIC or U_EMAIL_TOPIC or U_BUMP_TOPIC or U_BOOKMARK_TOPIC --> | <!-- ENDIF --><!-- ENDIF -->
- <!-- IF U_BOOKMARK_TOPIC --><a href="{U_BOOKMARK_TOPIC}" title="{L_BOOKMARK_TOPIC}">{L_BOOKMARK_TOPIC}</a><!-- IF U_PRINT_TOPIC or U_EMAIL_TOPIC or U_BUMP_TOPIC --> | <!-- ENDIF --><!-- ENDIF -->
+ <!-- IF U_WATCH_TOPIC --><a href="{U_WATCH_TOPIC}" title="{S_WATCH_TOPIC_TITLE}">{S_WATCH_TOPIC_TITLE}</a><!-- IF U_PRINT_TOPIC or U_EMAIL_TOPIC or U_BUMP_TOPIC or U_BOOKMARK_TOPIC --> | <!-- ENDIF --><!-- ENDIF -->
+ <!-- IF U_BOOKMARK_TOPIC --><a href="{U_BOOKMARK_TOPIC}" title="{S_BOOKMARK_TOPIC}">{S_BOOKMARK_TOPIC}</a><!-- IF U_PRINT_TOPIC or U_EMAIL_TOPIC or U_BUMP_TOPIC --> | <!-- ENDIF --><!-- ENDIF -->
<!-- IF U_PRINT_TOPIC --><a href="{U_PRINT_TOPIC}" title="{L_PRINT_TOPIC}">{L_PRINT_TOPIC}</a><!-- IF U_EMAIL_TOPIC or U_BUMP_TOPIC --> | <!-- ENDIF --><!-- ENDIF -->
<!-- IF U_EMAIL_TOPIC --><a href="{U_EMAIL_TOPIC}" title="{L_EMAIL_TOPIC}">{L_EMAIL_TOPIC}</a><!-- IF U_BUMP_TOPIC --> | <!-- ENDIF --><!-- ENDIF -->
<!-- IF U_BUMP_TOPIC --><a href="{U_BUMP_TOPIC}" title="{L_BUMP_TOPIC}">{L_BUMP_TOPIC}</a><!-- ENDIF -->
@@ -90,7 +90,7 @@
<!-- ENDIF -->
<td><span class="gen">{poll_option.POLL_OPTION_CAPTION}</span></td>
<!-- IF S_DISPLAY_RESULTS -->
- <td dir="ltr">{POLL_LEFT_CAP_IMG}{poll_option.POLL_OPTION_IMG}{POLL_RIGHT_CAP_IMG}</td>
+ <td dir="ltr">{POLL_LEFT_CAP_IMG}<span class="imageset poll_center" style="width: {poll_option.POLL_OPTION_WIDTH}px; background-repeat: repeat-x;">{poll_option.POLL_OPTION_PERCENT}</span>{POLL_RIGHT_CAP_IMG}</td>
<td class="gen" align="{S_CONTENT_FLOW_END}"><b>&nbsp;{poll_option.POLL_OPTION_PERCENT}&nbsp;</b></td>
<td class="gen" align="center">[ {poll_option.POLL_OPTION_RESULT} ]</td>
<!-- IF poll_option.POLL_OPTION_VOTED -->
@@ -109,7 +109,7 @@
<!-- ENDIF -->
<!-- IF S_DISPLAY_RESULTS -->
<tr>
- <td class="gensmall" colspan="4" align="center"><b>{L_TOTAL_VOTES} : {TOTAL_VOTES}</b></td>
+ <td class="gensmall" colspan="4" align="center"><b>{L_TOTAL_VOTES}{L_COLON} {TOTAL_VOTES}</b></td>
</tr>
<!-- ELSE -->
<tr>
@@ -127,6 +127,7 @@
</table>
<!-- BEGIN postrow -->
+ <!-- EVENT viewtopic_body_postrow_post_before -->
<table class="tablebg" width="100%" cellspacing="1">
<!-- IF postrow.S_FIRST_ROW -->
<tr>
@@ -136,8 +137,19 @@
<!-- ENDIF -->
<!-- IF postrow.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
- <!-- IF postrow.S_IGNORE_POST -->
- <td class="gensmall" colspan="2" height="25" align="center"><!-- IF postrow.S_FIRST_UNREAD --><a name="unread"></a><!-- ENDIF --><a name="p{postrow.POST_ID}"></a>{postrow.L_IGNORE_POST}</td>
+ <!-- IF postrow.S_POST_HIDDEN -->
+ <td class="gensmall" colspan="2" height="25" align="center">
+ <!-- IF postrow.S_FIRST_UNREAD --><a name="unread"></a><!-- ENDIF -->
+ <a name="p{postrow.POST_ID}"></a>
+ <!-- IF postrow.S_POST_HIDDEN -->
+ <!-- IF postrow.S_POST_DELETED -->
+ {postrow.L_POST_DELETED_MESSAGE}
+ <!-- ELSEIF postrow.S_IGNORE_POST -->
+ {postrow.L_IGNORE_POST}
+ <!-- ENDIF -->
+ <br />{postrow.L_POST_DISPLAY}
+ <!-- ENDIF -->
+ </td>
<!-- ELSE -->
<td align="center" valign="middle">
@@ -150,7 +162,7 @@
<!-- IF postrow.POST_ICON_IMG -->
<td><img src="{T_ICONS_PATH}{postrow.POST_ICON_IMG}" width="{postrow.POST_ICON_IMG_WIDTH}" height="{postrow.POST_ICON_IMG_HEIGHT}" alt="" title="" /></td>
<!-- ENDIF -->
- <td class="gensmall" width="100%"><div style="float: {S_CONTENT_FLOW_BEGIN};">&nbsp;<b>{L_POST_SUBJECT}:</b> <a href="#p{postrow.POST_ID}">{postrow.POST_SUBJECT}</a></div><div style="float: {S_CONTENT_FLOW_END};"><!-- IF S_IS_BOT -->{postrow.MINI_POST_IMG}<!-- ELSE --><a href="{postrow.U_MINI_POST}">{postrow.MINI_POST_IMG}</a><!-- ENDIF --><b>{L_POSTED}:</b> {postrow.POST_DATE}&nbsp;</div></td>
+ <td class="gensmall" width="100%"><div style="float: {S_CONTENT_FLOW_BEGIN};">&nbsp;<b>{L_POST_SUBJECT}{L_COLON}</b> <a href="#p{postrow.POST_ID}">{postrow.POST_SUBJECT}</a></div><div style="float: {S_CONTENT_FLOW_END};"><!-- IF S_IS_BOT -->{postrow.MINI_POST_IMG}<!-- ELSE --><a href="{postrow.U_MINI_POST}" class="imageset">{postrow.MINI_POST_IMG}</a><!-- ENDIF --><b>{L_POSTED}{L_COLON}</b> {postrow.POST_DATE}&nbsp;</div></td>
</tr>
</table>
</td>
@@ -188,18 +200,21 @@
</table>
<span class="postdetails">
- <!-- IF postrow.POSTER_JOINED --><br /><b>{L_JOINED}:</b> {postrow.POSTER_JOINED}<!-- ENDIF -->
- <!-- IF postrow.POSTER_POSTS != '' --><br /><b>{L_POSTS}:</b> {postrow.POSTER_POSTS}<!-- ENDIF -->
- <!-- IF postrow.POSTER_FROM --><br /><b>{L_LOCATION}:</b> {postrow.POSTER_FROM}<!-- ENDIF -->
+ <!-- IF postrow.POSTER_JOINED --><br /><b>{L_JOINED}{L_COLON}</b> {postrow.POSTER_JOINED}<!-- ENDIF -->
+ <!-- IF postrow.POSTER_POSTS != '' --><br /><b>{L_POSTS}{L_COLON}</b> {postrow.POSTER_POSTS}<!-- ENDIF -->
<!-- IF postrow.S_PROFILE_FIELD1 -->
<!-- Use a construct like this to include admin defined profile fields. Replace FIELD1 with the name of your field. -->
- <br /><b>{postrow.PROFILE_FIELD1_NAME}:</b> {postrow.PROFILE_FIELD1_VALUE}
+ <br /><b>{postrow.PROFILE_FIELD1_NAME}{L_COLON}</b> {postrow.PROFILE_FIELD1_VALUE}
<!-- ENDIF -->
+ <!-- EVENT viewtopic_body_postrow_custom_fields_before -->
<!-- BEGIN custom_fields -->
- <br /><b>{postrow.custom_fields.PROFILE_FIELD_NAME}:</b> {postrow.custom_fields.PROFILE_FIELD_VALUE}
+ <!-- IF not postrow.custom_fields.S_PROFILE_CONTACT -->
+ <br /><b>{postrow.custom_fields.PROFILE_FIELD_NAME}{L_COLON}</b> {postrow.custom_fields.PROFILE_FIELD_VALUE}
+ <!-- ENDIF -->
<!-- END custom_fields -->
+ <!-- EVENT viewtopic_body_postrow_custom_fields_after -->
</span>
</td>
@@ -207,10 +222,14 @@
<table width="100%" cellspacing="5">
<tr>
<td>
- <!-- IF postrow.S_POST_UNAPPROVED or postrow.S_POST_REPORTED -->
+ <!-- IF postrow.S_POST_UNAPPROVED or postrow.S_POST_DELETED or postrow.S_POST_REPORTED -->
<table width="100%" cellspacing="0">
<tr>
- <td class="gensmall"><!-- IF postrow.S_POST_UNAPPROVED --><span class="postapprove">{UNAPPROVED_IMG} <a href="{postrow.U_MCP_APPROVE}">{L_POST_UNAPPROVED}</a></span><br /> <!-- ENDIF --> <!-- IF postrow.S_POST_REPORTED --><span class="postreported">{REPORTED_IMG} <a href="{postrow.U_MCP_REPORT}">{L_POST_REPORTED}</a></span><!-- ENDIF --></td>
+ <td class="gensmall">
+ <!-- IF postrow.S_POST_UNAPPROVED --><span class="postapprove">{UNAPPROVED_IMG} <a href="{postrow.U_MCP_APPROVE}">{L_POST_UNAPPROVED}</a></span><br /> <!-- ENDIF -->
+ <!-- IF postrow.S_POST_DELETED --><span class="postapprove">{DELETED_IMG} <a href="{postrow.U_MCP_RESTORE}">{L_POST_DELETED}</a></span><br /> <!-- ENDIF -->
+ <!-- IF postrow.S_POST_REPORTED --><span class="postreported">{REPORTED_IMG} <a href="{postrow.U_MCP_REPORT}">{L_POST_REPORTED}</a></span><!-- ENDIF -->
+ </td>
</tr>
</table>
@@ -224,7 +243,7 @@
<table class="tablebg" width="100%" cellspacing="1">
<tr>
- <td class="row3"><b class="genmed">{L_ATTACHMENTS}: </b></td>
+ <td class="row3"><b class="genmed">{L_ATTACHMENTS}{L_COLON} </b></td>
</tr>
<!-- BEGIN attachment -->
<tr>
@@ -241,7 +260,23 @@
<div class="postbody"><br />_________________<br />{postrow.SIGNATURE}</div>
<!-- ENDIF -->
- <!-- IF postrow.EDITED_MESSAGE or postrow.EDIT_REASON -->
+ <!-- EVENT viewtopic_body_postrow_post_notices_before -->
+ <!-- IF postrow.DELETED_MESSAGE or postrow.DELETE_REASON -->
+ <!-- IF postrow.DELETE_REASON -->
+ <br /><br />
+ <table class="tablebg" width="100%" cellspacing="1">
+ <tr>
+ <td class="row3"><span class="gensmall">{postrow.DELETED_MESSAGE}</span></td>
+ </tr>
+ <tr>
+ <td class="row2"><span class="genmed">{postrow.DELETE_REASON}</span></td>
+ </tr>
+ </table>
+ <!-- ELSE -->
+ <br /><br />
+ <span class="gensmall">{postrow.DELETED_MESSAGE}</span>
+ <!-- ENDIF -->
+ <!-- ELSEIF postrow.EDITED_MESSAGE or postrow.EDIT_REASON -->
<!-- IF postrow.EDIT_REASON -->
<br /><br />
<table class="tablebg" width="100%" cellspacing="1">
@@ -261,6 +296,7 @@
<!-- IF postrow.BUMPED_MESSAGE -->
<span class="gensmall"><br /><br />{postrow.BUMPED_MESSAGE}</span>
<!-- ENDIF -->
+ <!-- EVENT viewtopic_body_postrow_post_notices_after -->
<!-- IF not postrow.S_HAS_ATTACHMENTS --><br clear="all" /><br /><!-- ENDIF -->
@@ -268,10 +304,10 @@
<tr valign="middle">
<td class="gensmall" align="{S_CONTENT_FLOW_END}">
<!-- IF not S_IS_BOT -->
- <!-- IF postrow.U_REPORT --><a href="{postrow.U_REPORT}">{REPORT_IMG}</a> <!-- ENDIF -->
- <!-- IF postrow.U_INFO --><a href="{postrow.U_INFO}">{INFO_IMG}</a> <!-- ENDIF -->
- <!-- IF postrow.U_WARN --><a href="{postrow.U_WARN}">{WARN_IMG}</a> <!-- ENDIF -->
- <!-- IF postrow.U_DELETE --><a href="{postrow.U_DELETE}">{DELETE_IMG}</a> <!-- ENDIF -->
+ <!-- IF postrow.U_REPORT --><a href="{postrow.U_REPORT}" class="imageset">{REPORT_IMG}</a> <!-- ENDIF -->
+ <!-- IF postrow.U_INFO --><a href="{postrow.U_INFO}" class="imageset">{INFO_IMG}</a> <!-- ENDIF -->
+ <!-- IF postrow.U_WARN --><a href="{postrow.U_WARN}" class="imageset">{WARN_IMG}</a> <!-- ENDIF -->
+ <!-- IF postrow.U_DELETE --><a href="{postrow.U_DELETE}" class="imageset">{DELETE_IMG}</a> <!-- ENDIF -->
<!-- ENDIF -->
</td>
</tr>
@@ -285,7 +321,21 @@
<!-- IF postrow.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
<td class="profile"><strong><a href="#wrapheader">{L_BACK_TO_TOP}</a></strong></td>
- <td><div class="gensmall" style="float: {S_CONTENT_FLOW_BEGIN};">&nbsp;<!-- IF postrow.U_POST_AUTHOR --><a href="{postrow.U_POST_AUTHOR}">{PROFILE_IMG}</a> <!-- ENDIF --> <!-- IF postrow.U_PM --><a href="{postrow.U_PM}">{PM_IMG}</a> <!-- ENDIF --> <!-- IF postrow.U_EMAIL --><a href="{postrow.U_EMAIL}">{EMAIL_IMG}</a> <!-- ENDIF -->&nbsp;</div> <div class="gensmall" style="float: {S_CONTENT_FLOW_END};"><!-- IF not S_IS_BOT --><!-- IF postrow.U_EDIT --><a href="{postrow.U_EDIT}">{EDIT_IMG}</a> <!-- ENDIF --> <!-- IF postrow.U_QUOTE --><a href="{postrow.U_QUOTE}">{QUOTE_IMG}</a> <!-- ENDIF --> <!-- ENDIF -->&nbsp;</div></td>
+ <td>
+ <div class="gensmall" style="float: {S_CONTENT_FLOW_BEGIN};">
+ &nbsp;<!-- IF postrow.U_POST_AUTHOR --><a href="{postrow.U_POST_AUTHOR}" class="imageset">{PROFILE_IMG}</a><!-- ENDIF -->
+ <!-- IF postrow.U_PM --><a href="{postrow.U_PM}" class="imageset">{PM_IMG}</a><!-- ENDIF -->
+ <!-- IF postrow.U_EMAIL --><a href="{postrow.U_EMAIL}" class="imageset">{EMAIL_IMG}</a><!-- ENDIF -->
+ &nbsp;</div>
+ <div class="gensmall" style="float: {S_CONTENT_FLOW_END};">
+ <!-- EVENT viewtopic_body_post_buttons_before -->
+ <!-- IF not S_IS_BOT -->
+ <!-- IF postrow.U_EDIT --><a href="{postrow.U_EDIT}" class="imageset">{EDIT_IMG}</a><!-- ENDIF -->
+ <!-- IF postrow.U_QUOTE --><a href="{postrow.U_QUOTE}" class="imageset">{QUOTE_IMG}</a><!-- ENDIF -->
+ <!-- ENDIF -->
+ <!-- EVENT viewtopic_body_post_buttons_after -->
+ &nbsp;</div>
+ </td>
<!-- ENDIF -->
</tr>
@@ -293,22 +343,25 @@
<td class="spacer" colspan="2" height="1"><img src="images/spacer.gif" alt="" width="1" height="1" /></td>
</tr>
</table>
+ <!-- EVENT viewtopic_body_postrow_post_after -->
<!-- END postrow -->
<!-- IF not S_IS_BOT -->
<table width="100%" cellspacing="1" class="tablebg">
<tr align="center">
- <td class="cat"><form name="viewtopic" method="post" action="{S_TOPIC_ACTION}"><span class="gensmall">{L_DISPLAY_POSTS}:</span> {S_SELECT_SORT_DAYS}&nbsp;<span class="gensmall">{L_SORT_BY}</span> {S_SELECT_SORT_KEY} {S_SELECT_SORT_DIR}&nbsp;<input class="btnlite" type="submit" value="{L_GO}" name="sort" /></form></td>
+ <td class="cat"><form name="viewtopic" method="post" action="{S_TOPIC_ACTION}"><span class="gensmall">{L_DISPLAY_POSTS}{L_COLON}</span> {S_SELECT_SORT_DAYS}&nbsp;<span class="gensmall">{L_SORT_BY}</span> {S_SELECT_SORT_KEY} {S_SELECT_SORT_DIR}&nbsp;<input class="btnlite" type="submit" value="{L_GO}" name="sort" /></form></td>
</tr>
</table>
<!-- ENDIF -->
+ <!-- EVENT viewtopic_body_topic_actions_before -->
+
<table width="100%" cellspacing="1">
<tr>
<td align="{S_CONTENT_FLOW_BEGIN}" valign="middle" nowrap="nowrap">
<!-- IF not S_IS_BOT -->
- <!-- IF S_DISPLAY_POST_INFO --><a href="{U_POST_NEW_TOPIC}">{POST_IMG}</a>&nbsp;<!-- ENDIF -->
- <!-- IF S_DISPLAY_REPLY_INFO --><a href="{U_POST_REPLY_TOPIC}">{REPLY_IMG}</a><!-- ENDIF -->
+ <!-- IF S_DISPLAY_POST_INFO --><a href="{U_POST_NEW_TOPIC}" class="imageset">{POST_IMG}</a>&nbsp;<!-- ENDIF -->
+ <!-- IF S_DISPLAY_REPLY_INFO --><a href="{U_POST_REPLY_TOPIC}" class="imageset">{REPLY_IMG}</a><!-- ENDIF -->
<!-- ENDIF -->
</td>
<!-- IF TOTAL_POSTS -->
@@ -328,6 +381,7 @@
<!-- INCLUDE quickreply_editor.html -->
<!-- ENDIF -->
+<!-- EVENT viewtopic_body_footer_before -->
<!-- INCLUDE breadcrumbs.html -->
<!-- IF S_DISPLAY_ONLINE_LIST -->
@@ -347,7 +401,19 @@
<table width="100%" cellspacing="1">
<tr>
- <td width="40%" valign="top" nowrap="nowrap" align="{S_CONTENT_FLOW_BEGIN}"><!-- IF S_TOPIC_MOD --><form method="post" action="{S_MOD_ACTION}"><span class="gensmall">{L_QUICK_MOD}:</span> {S_TOPIC_MOD} <input class="btnlite" type="submit" value="{L_GO}" /></form><!-- ENDIF --></td>
+ <td width="40%" valign="top" nowrap="nowrap" align="{S_CONTENT_FLOW_BEGIN}">
+ <!-- IF .quickmod -->
+ <form method="post" action="{S_MOD_ACTION}">
+ <span class="gensmall">{L_QUICK_MOD}{L_COLON}</span>
+ <select name="action" id="quick-mod-select">
+ <!-- BEGIN quickmod -->
+ <option value="{quickmod.VALUE}">{quickmod.TITLE}</option>
+ <!-- END quickmod -->
+ </select>
+ <input class="btnlite" type="submit" value="{L_GO}" />
+ </form>
+ <!-- ENDIF -->
+ </td>
<td align="{S_CONTENT_FLOW_END}" valign="top" nowrap="nowrap"><span class="gensmall"><!-- BEGIN rules -->{rules.RULE}<br /><!-- END rules --></span></td>
</tr>
</table>
@@ -361,4 +427,4 @@
</tr>
</table>
-<!-- INCLUDE overall_footer.html --> \ No newline at end of file
+<!-- INCLUDE overall_footer.html -->
diff --git a/phpBB/styles/subsilver2/template/viewtopic_print.html b/phpBB/styles/subsilver2/template/viewtopic_print.html
index 47b5bdb28e..a4e4c1b691 100644
--- a/phpBB/styles/subsilver2/template/viewtopic_print.html
+++ b/phpBB/styles/subsilver2/template/viewtopic_print.html
@@ -1,9 +1,7 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<!DOCTYPE html>
<html dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}">
<head>
-<meta http-equiv="Content-Type" content="text/html; charset={S_CONTENT_ENCODING}">
-<meta http-equiv="Content-Style-Type" content="text/css">
-<meta http-equiv="Content-Language" content="{S_USER_LANG}">
+<meta charset="utf-8">
<meta name="robots" content="noindex" />
<title>{SITENAME} :: {PAGE_TITLE}</title>
@@ -68,7 +66,7 @@ hr.sep {
}
//-->
</style>
-
+<!-- EVENT viewtopic_print_head_append -->
</head>
<body>
@@ -91,11 +89,11 @@ hr.sep {
<table width="85%" cellspacing="3" cellpadding="0" border="0" align="center">
<tr>
- <td width="10%" nowrap="nowrap">{L_AUTHOR}:&nbsp;</td>
+ <td width="10%" nowrap="nowrap">{L_AUTHOR}{L_COLON}&nbsp;</td>
<td><b>{postrow.POST_AUTHOR}</b> [ {postrow.POST_DATE} ]</td>
</tr>
<tr>
- <td width="10%" nowrap="nowrap">{L_POST_SUBJECT}:&nbsp;</td>
+ <td width="10%" nowrap="nowrap">{L_POST_SUBJECT}{L_COLON}&nbsp;</td>
<td><b>{postrow.POST_SUBJECT}</b></td>
</tr>
<tr>
@@ -106,7 +104,7 @@ hr.sep {
<table class="tablebg" width="100%" cellspacing="1">
<tr>
- <td><b class="genmed">{L_ATTACHMENTS}: </b></td>
+ <td><b class="genmed">{L_ATTACHMENTS}{L_COLON} </b></td>
</tr>
<!-- BEGIN attachment -->
<tr>
@@ -134,4 +132,4 @@ hr.sep {
</table>
</body>
-</html> \ No newline at end of file
+</html>
diff --git a/phpBB/styles/subsilver2/imageset/en/button_pm_new.gif b/phpBB/styles/subsilver2/theme/en/button_pm_new.gif
index 07df748d3a..07df748d3a 100644
--- a/phpBB/styles/subsilver2/imageset/en/button_pm_new.gif
+++ b/phpBB/styles/subsilver2/theme/en/button_pm_new.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/en/button_pm_reply.gif b/phpBB/styles/subsilver2/theme/en/button_pm_reply.gif
index c476f06a44..c476f06a44 100644
--- a/phpBB/styles/subsilver2/imageset/en/button_pm_reply.gif
+++ b/phpBB/styles/subsilver2/theme/en/button_pm_reply.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/en/button_topic_locked.gif b/phpBB/styles/subsilver2/theme/en/button_topic_locked.gif
index 124a2d4a7d..124a2d4a7d 100644
--- a/phpBB/styles/subsilver2/imageset/en/button_topic_locked.gif
+++ b/phpBB/styles/subsilver2/theme/en/button_topic_locked.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/en/button_topic_new.gif b/phpBB/styles/subsilver2/theme/en/button_topic_new.gif
index 66e1007129..66e1007129 100644
--- a/phpBB/styles/subsilver2/imageset/en/button_topic_new.gif
+++ b/phpBB/styles/subsilver2/theme/en/button_topic_new.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/en/button_topic_reply.gif b/phpBB/styles/subsilver2/theme/en/button_topic_reply.gif
index e8fe5115a0..e8fe5115a0 100644
--- a/phpBB/styles/subsilver2/imageset/en/button_topic_reply.gif
+++ b/phpBB/styles/subsilver2/theme/en/button_topic_reply.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/en/icon_contact_aim.gif b/phpBB/styles/subsilver2/theme/en/icon_contact_aim.gif
index c6533e2817..c6533e2817 100644
--- a/phpBB/styles/subsilver2/imageset/en/icon_contact_aim.gif
+++ b/phpBB/styles/subsilver2/theme/en/icon_contact_aim.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/en/icon_contact_email.gif b/phpBB/styles/subsilver2/theme/en/icon_contact_email.gif
index f126a1960d..f126a1960d 100644
--- a/phpBB/styles/subsilver2/imageset/en/icon_contact_email.gif
+++ b/phpBB/styles/subsilver2/theme/en/icon_contact_email.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/en/icon_contact_icq.gif b/phpBB/styles/subsilver2/theme/en/icon_contact_icq.gif
index ba3fa12436..ba3fa12436 100644
--- a/phpBB/styles/subsilver2/imageset/en/icon_contact_icq.gif
+++ b/phpBB/styles/subsilver2/theme/en/icon_contact_icq.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/en/icon_contact_jabber.gif b/phpBB/styles/subsilver2/theme/en/icon_contact_jabber.gif
index be2e53f9c2..be2e53f9c2 100644
--- a/phpBB/styles/subsilver2/imageset/en/icon_contact_jabber.gif
+++ b/phpBB/styles/subsilver2/theme/en/icon_contact_jabber.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/theme/en/icon_contact_msnm.gif b/phpBB/styles/subsilver2/theme/en/icon_contact_msnm.gif
new file mode 100644
index 0000000000..1bf681e9a2
--- /dev/null
+++ b/phpBB/styles/subsilver2/theme/en/icon_contact_msnm.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/en/icon_contact_pm.gif b/phpBB/styles/subsilver2/theme/en/icon_contact_pm.gif
index 26ac558c2f..26ac558c2f 100644
--- a/phpBB/styles/subsilver2/imageset/en/icon_contact_pm.gif
+++ b/phpBB/styles/subsilver2/theme/en/icon_contact_pm.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/en/icon_contact_www.gif b/phpBB/styles/subsilver2/theme/en/icon_contact_www.gif
index 14a33b36a5..14a33b36a5 100644
--- a/phpBB/styles/subsilver2/imageset/en/icon_contact_www.gif
+++ b/phpBB/styles/subsilver2/theme/en/icon_contact_www.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/en/icon_contact_yahoo.gif b/phpBB/styles/subsilver2/theme/en/icon_contact_yahoo.gif
index d11711789f..d11711789f 100644
--- a/phpBB/styles/subsilver2/imageset/en/icon_contact_yahoo.gif
+++ b/phpBB/styles/subsilver2/theme/en/icon_contact_yahoo.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/en/icon_post_delete.gif b/phpBB/styles/subsilver2/theme/en/icon_post_delete.gif
index e008e5ff9f..e008e5ff9f 100644
--- a/phpBB/styles/subsilver2/imageset/en/icon_post_delete.gif
+++ b/phpBB/styles/subsilver2/theme/en/icon_post_delete.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/en/icon_post_edit.gif b/phpBB/styles/subsilver2/theme/en/icon_post_edit.gif
index 1511ee34d3..1511ee34d3 100644
--- a/phpBB/styles/subsilver2/imageset/en/icon_post_edit.gif
+++ b/phpBB/styles/subsilver2/theme/en/icon_post_edit.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/en/icon_post_info.gif b/phpBB/styles/subsilver2/theme/en/icon_post_info.gif
index 166de2724f..166de2724f 100644
--- a/phpBB/styles/subsilver2/imageset/en/icon_post_info.gif
+++ b/phpBB/styles/subsilver2/theme/en/icon_post_info.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/en/icon_post_quote.gif b/phpBB/styles/subsilver2/theme/en/icon_post_quote.gif
index 4cf103280c..4cf103280c 100644
--- a/phpBB/styles/subsilver2/imageset/en/icon_post_quote.gif
+++ b/phpBB/styles/subsilver2/theme/en/icon_post_quote.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/en/icon_post_report.gif b/phpBB/styles/subsilver2/theme/en/icon_post_report.gif
index 9a3f65b1e3..9a3f65b1e3 100644
--- a/phpBB/styles/subsilver2/imageset/en/icon_post_report.gif
+++ b/phpBB/styles/subsilver2/theme/en/icon_post_report.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/en/icon_user_offline.gif b/phpBB/styles/subsilver2/theme/en/icon_user_offline.gif
index 3065f4d7fe..3065f4d7fe 100644
--- a/phpBB/styles/subsilver2/imageset/en/icon_user_offline.gif
+++ b/phpBB/styles/subsilver2/theme/en/icon_user_offline.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/en/icon_user_online.gif b/phpBB/styles/subsilver2/theme/en/icon_user_online.gif
index b950612c57..b950612c57 100644
--- a/phpBB/styles/subsilver2/imageset/en/icon_user_online.gif
+++ b/phpBB/styles/subsilver2/theme/en/icon_user_online.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/en/icon_user_profile.gif b/phpBB/styles/subsilver2/theme/en/icon_user_profile.gif
index d9cf7f4c4a..d9cf7f4c4a 100644
--- a/phpBB/styles/subsilver2/imageset/en/icon_user_profile.gif
+++ b/phpBB/styles/subsilver2/theme/en/icon_user_profile.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/en/icon_user_search.gif b/phpBB/styles/subsilver2/theme/en/icon_user_search.gif
index 46475fbf4c..46475fbf4c 100644
--- a/phpBB/styles/subsilver2/imageset/en/icon_user_search.gif
+++ b/phpBB/styles/subsilver2/theme/en/icon_user_search.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/en/icon_user_warn.gif b/phpBB/styles/subsilver2/theme/en/icon_user_warn.gif
index 44cbcc953a..44cbcc953a 100644
--- a/phpBB/styles/subsilver2/imageset/en/icon_user_warn.gif
+++ b/phpBB/styles/subsilver2/theme/en/icon_user_warn.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/theme/en/stylesheet.css b/phpBB/styles/subsilver2/theme/en/stylesheet.css
new file mode 100644
index 0000000000..57f9fce26d
--- /dev/null
+++ b/phpBB/styles/subsilver2/theme/en/stylesheet.css
@@ -0,0 +1,116 @@
+/* EN Language Pack */
+.imageset.phpbb_aol-icon, .imageset.icon_contact_aim {
+ background-image: url("./icon_contact_aim.gif");
+ padding-left: 72px;
+ padding-top: 20px;
+}
+.imageset.icon_contact_email {
+ background-image: url("./icon_contact_email.gif");
+ padding-left: 72px;
+ padding-top: 20px;
+}
+.imageset.phpbb_icq-icon, .imageset.icon_contact_icq {
+ background-image: url("./icon_contact_icq.gif");
+ padding-left: 72px;
+ padding-top: 20px;
+}
+.imageset.icon_contact_jabber {
+ background-image: url("./icon_contact_jabber.gif");
+ padding-left: 72px;
+ padding-top: 20px;
+}
+.imageset.phpbb_wlm-icon, .imageset.icon_contact_msnm {
+ background-image: url("./icon_contact_msnm.gif");
+ padding-left: 72px;
+ padding-top: 20px;
+}
+.imageset.icon_contact_pm {
+ background-image: url("./icon_contact_pm.gif");
+ padding-left: 72px;
+ padding-top: 20px;
+}
+.imageset.phpbb_yahoo-icon, .imageset.icon_contact_yahoo {
+ background-image: url("./icon_contact_yahoo.gif");
+ padding-left: 72px;
+ padding-top: 20px;
+}
+.imageset.phpbb_website-icon, .imageset.icon_contact_www {
+ background-image: url("./icon_contact_www.gif");
+ padding-left: 72px;
+ padding-top: 20px;
+}
+.imageset.icon_post_delete {
+ background-image: url("./icon_post_delete.gif");
+ padding-left: 20px;
+ padding-top: 20px;
+}
+.imageset.icon_post_edit {
+ background-image: url("./icon_post_edit.gif");
+ padding-left: 90px;
+ padding-top: 20px;
+}
+.imageset.icon_post_info {
+ background-image: url("./icon_post_info.gif");
+ padding-left: 20px;
+ padding-top: 20px;
+}
+.imageset.icon_post_quote {
+ background-image: url("./icon_post_quote.gif");
+ padding-left: 90px;
+ padding-top: 20px;
+}
+.imageset.icon_post_report {
+ background-image: url("./icon_post_report.gif");
+ padding-left: 20px;
+ padding-top: 20px;
+}
+.imageset.icon_user_online {
+ background-image: url("./icon_user_online.gif");
+ padding-left: 72px;
+ padding-top: 20px;
+}
+.imageset.icon_user_offline {
+ background-image: url("./icon_user_offline.gif");
+ padding-left: 72px;
+ padding-top: 20px;
+}
+.imageset.icon_user_profile {
+ background-image: url("./icon_user_profile.gif");
+ padding-left: 72px;
+ padding-top: 20px;
+}
+.imageset.icon_user_search {
+ background-image: url("./icon_user_search.gif");
+ padding-left: 72px;
+ padding-top: 20px;
+}
+.imageset.icon_user_warn {
+ background-image: url("./icon_user_warn.gif");
+ padding-left: 20px;
+ padding-top: 20px;
+}
+.imageset.button_pm_new {
+ background-image: url("./button_pm_new.gif");
+ padding-left: 97px;
+ padding-top: 27px;
+}
+.imageset.button_pm_reply {
+ background-image: url("./button_pm_reply.gif");
+ padding-left: 90px;
+ padding-top: 20px;
+}
+.imageset.button_topic_locked {
+ background-image: url("./button_topic_locked.gif");
+ padding-left: 97px;
+ padding-top: 27px;
+}
+.imageset.button_topic_new {
+ background-image: url("./button_topic_new.gif");
+ padding-left: 97px;
+ padding-top: 27px;
+}
+.imageset.button_topic_reply {
+ background-image: url("./button_topic_reply.gif");
+ padding-left: 97px;
+ padding-top: 27px;
+}
diff --git a/phpBB/styles/subsilver2/imageset/announce_read.gif b/phpBB/styles/subsilver2/theme/images/announce_read.gif
index 0589feb14f..0589feb14f 100644
--- a/phpBB/styles/subsilver2/imageset/announce_read.gif
+++ b/phpBB/styles/subsilver2/theme/images/announce_read.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/announce_read_locked.gif b/phpBB/styles/subsilver2/theme/images/announce_read_locked.gif
index a738616e06..a738616e06 100644
--- a/phpBB/styles/subsilver2/imageset/announce_read_locked.gif
+++ b/phpBB/styles/subsilver2/theme/images/announce_read_locked.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/announce_read_locked_mine.gif b/phpBB/styles/subsilver2/theme/images/announce_read_locked_mine.gif
index f7ffe7f8dd..f7ffe7f8dd 100644
--- a/phpBB/styles/subsilver2/imageset/announce_read_locked_mine.gif
+++ b/phpBB/styles/subsilver2/theme/images/announce_read_locked_mine.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/announce_read_mine.gif b/phpBB/styles/subsilver2/theme/images/announce_read_mine.gif
index 636d353867..636d353867 100644
--- a/phpBB/styles/subsilver2/imageset/announce_read_mine.gif
+++ b/phpBB/styles/subsilver2/theme/images/announce_read_mine.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/announce_unread.gif b/phpBB/styles/subsilver2/theme/images/announce_unread.gif
index 56b2702b17..56b2702b17 100644
--- a/phpBB/styles/subsilver2/imageset/announce_unread.gif
+++ b/phpBB/styles/subsilver2/theme/images/announce_unread.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/announce_unread_locked.gif b/phpBB/styles/subsilver2/theme/images/announce_unread_locked.gif
index 37033da653..37033da653 100644
--- a/phpBB/styles/subsilver2/imageset/announce_unread_locked.gif
+++ b/phpBB/styles/subsilver2/theme/images/announce_unread_locked.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/announce_unread_locked_mine.gif b/phpBB/styles/subsilver2/theme/images/announce_unread_locked_mine.gif
index d91f2520ca..d91f2520ca 100644
--- a/phpBB/styles/subsilver2/imageset/announce_unread_locked_mine.gif
+++ b/phpBB/styles/subsilver2/theme/images/announce_unread_locked_mine.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/announce_unread_mine.gif b/phpBB/styles/subsilver2/theme/images/announce_unread_mine.gif
index e1dd23a0bf..e1dd23a0bf 100644
--- a/phpBB/styles/subsilver2/imageset/announce_unread_mine.gif
+++ b/phpBB/styles/subsilver2/theme/images/announce_unread_mine.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/forum_link.gif b/phpBB/styles/subsilver2/theme/images/forum_link.gif
index d5e86d47d7..d5e86d47d7 100644
--- a/phpBB/styles/subsilver2/imageset/forum_link.gif
+++ b/phpBB/styles/subsilver2/theme/images/forum_link.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/forum_read.gif b/phpBB/styles/subsilver2/theme/images/forum_read.gif
index 9b2bc47c67..9b2bc47c67 100644
--- a/phpBB/styles/subsilver2/imageset/forum_read.gif
+++ b/phpBB/styles/subsilver2/theme/images/forum_read.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/forum_read_locked.gif b/phpBB/styles/subsilver2/theme/images/forum_read_locked.gif
index 436f3d21c8..436f3d21c8 100644
--- a/phpBB/styles/subsilver2/imageset/forum_read_locked.gif
+++ b/phpBB/styles/subsilver2/theme/images/forum_read_locked.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/forum_read_subforum.gif b/phpBB/styles/subsilver2/theme/images/forum_read_subforum.gif
index 9179303e7f..9179303e7f 100644
--- a/phpBB/styles/subsilver2/imageset/forum_read_subforum.gif
+++ b/phpBB/styles/subsilver2/theme/images/forum_read_subforum.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/forum_unread.gif b/phpBB/styles/subsilver2/theme/images/forum_unread.gif
index 5eec565b38..5eec565b38 100644
--- a/phpBB/styles/subsilver2/imageset/forum_unread.gif
+++ b/phpBB/styles/subsilver2/theme/images/forum_unread.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/forum_unread_locked.gif b/phpBB/styles/subsilver2/theme/images/forum_unread_locked.gif
index 58a79c376c..58a79c376c 100644
--- a/phpBB/styles/subsilver2/imageset/forum_unread_locked.gif
+++ b/phpBB/styles/subsilver2/theme/images/forum_unread_locked.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/forum_unread_subforum.gif b/phpBB/styles/subsilver2/theme/images/forum_unread_subforum.gif
index af3c93b1a1..af3c93b1a1 100644
--- a/phpBB/styles/subsilver2/imageset/forum_unread_subforum.gif
+++ b/phpBB/styles/subsilver2/theme/images/forum_unread_subforum.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/theme/images/icon_mini_notification.gif b/phpBB/styles/subsilver2/theme/images/icon_mini_notification.gif
new file mode 100644
index 0000000000..f165d3cb27
--- /dev/null
+++ b/phpBB/styles/subsilver2/theme/images/icon_mini_notification.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/icon_post_target.gif b/phpBB/styles/subsilver2/theme/images/icon_post_target.gif
index d172abb060..d172abb060 100644
--- a/phpBB/styles/subsilver2/imageset/icon_post_target.gif
+++ b/phpBB/styles/subsilver2/theme/images/icon_post_target.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/icon_post_target_unread.gif b/phpBB/styles/subsilver2/theme/images/icon_post_target_unread.gif
index 8ec44a1787..8ec44a1787 100644
--- a/phpBB/styles/subsilver2/imageset/icon_post_target_unread.gif
+++ b/phpBB/styles/subsilver2/theme/images/icon_post_target_unread.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/icon_topic_attach.gif b/phpBB/styles/subsilver2/theme/images/icon_topic_attach.gif
index 1c9c89bc70..1c9c89bc70 100644
--- a/phpBB/styles/subsilver2/imageset/icon_topic_attach.gif
+++ b/phpBB/styles/subsilver2/theme/images/icon_topic_attach.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/theme/images/icon_topic_deleted.png b/phpBB/styles/subsilver2/theme/images/icon_topic_deleted.png
new file mode 100644
index 0000000000..494b4fb563
--- /dev/null
+++ b/phpBB/styles/subsilver2/theme/images/icon_topic_deleted.png
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/icon_topic_latest.gif b/phpBB/styles/subsilver2/theme/images/icon_topic_latest.gif
index b45e57aedb..b45e57aedb 100644
--- a/phpBB/styles/subsilver2/imageset/icon_topic_latest.gif
+++ b/phpBB/styles/subsilver2/theme/images/icon_topic_latest.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/icon_topic_newest.gif b/phpBB/styles/subsilver2/theme/images/icon_topic_newest.gif
index eca2861836..eca2861836 100644
--- a/phpBB/styles/subsilver2/imageset/icon_topic_newest.gif
+++ b/phpBB/styles/subsilver2/theme/images/icon_topic_newest.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/icon_topic_reported.gif b/phpBB/styles/subsilver2/theme/images/icon_topic_reported.gif
index 026092854a..026092854a 100644
--- a/phpBB/styles/subsilver2/imageset/icon_topic_reported.gif
+++ b/phpBB/styles/subsilver2/theme/images/icon_topic_reported.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/icon_topic_unapproved.gif b/phpBB/styles/subsilver2/theme/images/icon_topic_unapproved.gif
index 2ccaf19c23..2ccaf19c23 100644
--- a/phpBB/styles/subsilver2/imageset/icon_topic_unapproved.gif
+++ b/phpBB/styles/subsilver2/theme/images/icon_topic_unapproved.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/theme/images/no_avatar.gif b/phpBB/styles/subsilver2/theme/images/no_avatar.gif
index 80539c8c71..ad73330e71 100644
--- a/phpBB/styles/subsilver2/theme/images/no_avatar.gif
+++ b/phpBB/styles/subsilver2/theme/images/no_avatar.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/poll_center.gif b/phpBB/styles/subsilver2/theme/images/poll_center.gif
index 99473151ec..99473151ec 100644
--- a/phpBB/styles/subsilver2/imageset/poll_center.gif
+++ b/phpBB/styles/subsilver2/theme/images/poll_center.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/poll_left.gif b/phpBB/styles/subsilver2/theme/images/poll_left.gif
index 269088b81d..269088b81d 100644
--- a/phpBB/styles/subsilver2/imageset/poll_left.gif
+++ b/phpBB/styles/subsilver2/theme/images/poll_left.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/poll_right.gif b/phpBB/styles/subsilver2/theme/images/poll_right.gif
index f9584e23a1..f9584e23a1 100644
--- a/phpBB/styles/subsilver2/imageset/poll_right.gif
+++ b/phpBB/styles/subsilver2/theme/images/poll_right.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/site_logo.gif b/phpBB/styles/subsilver2/theme/images/site_logo.gif
index abce3cd51d..abce3cd51d 100644
--- a/phpBB/styles/subsilver2/imageset/site_logo.gif
+++ b/phpBB/styles/subsilver2/theme/images/site_logo.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/sticky_read.gif b/phpBB/styles/subsilver2/theme/images/sticky_read.gif
index 09861a996c..09861a996c 100644
--- a/phpBB/styles/subsilver2/imageset/sticky_read.gif
+++ b/phpBB/styles/subsilver2/theme/images/sticky_read.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/sticky_read_locked.gif b/phpBB/styles/subsilver2/theme/images/sticky_read_locked.gif
index 24bca303d6..24bca303d6 100644
--- a/phpBB/styles/subsilver2/imageset/sticky_read_locked.gif
+++ b/phpBB/styles/subsilver2/theme/images/sticky_read_locked.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/sticky_read_locked_mine.gif b/phpBB/styles/subsilver2/theme/images/sticky_read_locked_mine.gif
index 3fd04ec3a9..3fd04ec3a9 100644
--- a/phpBB/styles/subsilver2/imageset/sticky_read_locked_mine.gif
+++ b/phpBB/styles/subsilver2/theme/images/sticky_read_locked_mine.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/sticky_read_mine.gif b/phpBB/styles/subsilver2/theme/images/sticky_read_mine.gif
index 381634c364..381634c364 100644
--- a/phpBB/styles/subsilver2/imageset/sticky_read_mine.gif
+++ b/phpBB/styles/subsilver2/theme/images/sticky_read_mine.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/sticky_unread.gif b/phpBB/styles/subsilver2/theme/images/sticky_unread.gif
index dd2e366543..dd2e366543 100644
--- a/phpBB/styles/subsilver2/imageset/sticky_unread.gif
+++ b/phpBB/styles/subsilver2/theme/images/sticky_unread.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/sticky_unread_locked.gif b/phpBB/styles/subsilver2/theme/images/sticky_unread_locked.gif
index 608f4822e3..608f4822e3 100644
--- a/phpBB/styles/subsilver2/imageset/sticky_unread_locked.gif
+++ b/phpBB/styles/subsilver2/theme/images/sticky_unread_locked.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/sticky_unread_locked_mine.gif b/phpBB/styles/subsilver2/theme/images/sticky_unread_locked_mine.gif
index fe5e115312..fe5e115312 100644
--- a/phpBB/styles/subsilver2/imageset/sticky_unread_locked_mine.gif
+++ b/phpBB/styles/subsilver2/theme/images/sticky_unread_locked_mine.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/sticky_unread_mine.gif b/phpBB/styles/subsilver2/theme/images/sticky_unread_mine.gif
index b5fc3b3627..b5fc3b3627 100644
--- a/phpBB/styles/subsilver2/imageset/sticky_unread_mine.gif
+++ b/phpBB/styles/subsilver2/theme/images/sticky_unread_mine.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/topic_moved.gif b/phpBB/styles/subsilver2/theme/images/topic_moved.gif
index fe758f02ca..fe758f02ca 100644
--- a/phpBB/styles/subsilver2/imageset/topic_moved.gif
+++ b/phpBB/styles/subsilver2/theme/images/topic_moved.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/topic_read.gif b/phpBB/styles/subsilver2/theme/images/topic_read.gif
index c16bfa75d5..c16bfa75d5 100644
--- a/phpBB/styles/subsilver2/imageset/topic_read.gif
+++ b/phpBB/styles/subsilver2/theme/images/topic_read.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/topic_read_hot.gif b/phpBB/styles/subsilver2/theme/images/topic_read_hot.gif
index a7a7e8fc78..a7a7e8fc78 100644
--- a/phpBB/styles/subsilver2/imageset/topic_read_hot.gif
+++ b/phpBB/styles/subsilver2/theme/images/topic_read_hot.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/topic_read_hot_mine.gif b/phpBB/styles/subsilver2/theme/images/topic_read_hot_mine.gif
index 853452a74b..853452a74b 100644
--- a/phpBB/styles/subsilver2/imageset/topic_read_hot_mine.gif
+++ b/phpBB/styles/subsilver2/theme/images/topic_read_hot_mine.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/topic_read_locked.gif b/phpBB/styles/subsilver2/theme/images/topic_read_locked.gif
index 10eb776972..10eb776972 100644
--- a/phpBB/styles/subsilver2/imageset/topic_read_locked.gif
+++ b/phpBB/styles/subsilver2/theme/images/topic_read_locked.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/topic_read_locked_mine.gif b/phpBB/styles/subsilver2/theme/images/topic_read_locked_mine.gif
index 3f24928b48..3f24928b48 100644
--- a/phpBB/styles/subsilver2/imageset/topic_read_locked_mine.gif
+++ b/phpBB/styles/subsilver2/theme/images/topic_read_locked_mine.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/topic_read_mine.gif b/phpBB/styles/subsilver2/theme/images/topic_read_mine.gif
index 560927aa06..560927aa06 100644
--- a/phpBB/styles/subsilver2/imageset/topic_read_mine.gif
+++ b/phpBB/styles/subsilver2/theme/images/topic_read_mine.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/topic_unread.gif b/phpBB/styles/subsilver2/theme/images/topic_unread.gif
index 4e56157dce..4e56157dce 100644
--- a/phpBB/styles/subsilver2/imageset/topic_unread.gif
+++ b/phpBB/styles/subsilver2/theme/images/topic_unread.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/topic_unread_hot.gif b/phpBB/styles/subsilver2/theme/images/topic_unread_hot.gif
index ceef4919d5..ceef4919d5 100644
--- a/phpBB/styles/subsilver2/imageset/topic_unread_hot.gif
+++ b/phpBB/styles/subsilver2/theme/images/topic_unread_hot.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/topic_unread_hot_mine.gif b/phpBB/styles/subsilver2/theme/images/topic_unread_hot_mine.gif
index 1c748f708a..1c748f708a 100644
--- a/phpBB/styles/subsilver2/imageset/topic_unread_hot_mine.gif
+++ b/phpBB/styles/subsilver2/theme/images/topic_unread_hot_mine.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/topic_unread_locked.gif b/phpBB/styles/subsilver2/theme/images/topic_unread_locked.gif
index 720e210289..720e210289 100644
--- a/phpBB/styles/subsilver2/imageset/topic_unread_locked.gif
+++ b/phpBB/styles/subsilver2/theme/images/topic_unread_locked.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/topic_unread_locked_mine.gif b/phpBB/styles/subsilver2/theme/images/topic_unread_locked_mine.gif
index 90873431ef..90873431ef 100644
--- a/phpBB/styles/subsilver2/imageset/topic_unread_locked_mine.gif
+++ b/phpBB/styles/subsilver2/theme/images/topic_unread_locked_mine.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/topic_unread_mine.gif b/phpBB/styles/subsilver2/theme/images/topic_unread_mine.gif
index 34fd2ec179..34fd2ec179 100644
--- a/phpBB/styles/subsilver2/imageset/topic_unread_mine.gif
+++ b/phpBB/styles/subsilver2/theme/images/topic_unread_mine.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/imageset/upload_bar.gif b/phpBB/styles/subsilver2/theme/images/upload_bar.gif
index 75cf61c59e..75cf61c59e 100644
--- a/phpBB/styles/subsilver2/imageset/upload_bar.gif
+++ b/phpBB/styles/subsilver2/theme/images/upload_bar.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/theme/stylesheet.css b/phpBB/styles/subsilver2/theme/stylesheet.css
index ec36baa251..11fc91af0c 100644
--- a/phpBB/styles/subsilver2/theme/stylesheet.css
+++ b/phpBB/styles/subsilver2/theme/stylesheet.css
@@ -303,6 +303,15 @@ p.topicdetails {
/* Tables
------------ */
+#color_palette_placeholder table {
+ border-collapse: separate;
+ border-spacing: 1px;
+}
+
+#color_palette_placeholder td {
+ padding: 0;
+}
+
th {
color: #FFA34F;
font-size: 1.1em;
@@ -430,6 +439,15 @@ a.topictitle:visited {
text-decoration: none;
}
+a.lastsubject {
+ font-weight: bold;
+ text-decoration: none;
+}
+
+a.lastsubject:hover {
+ text-decoration: underline;
+}
+
th a,
th a:visited {
color: #FFA34F !important;
@@ -680,3 +698,520 @@ pre {
.username-coloured {
font-weight: bold;
}
+
+
+/* Former imageset */
+span.imageset {
+ display: inline-block;
+ background: transparent none 0 0 no-repeat;
+ margin: 0;
+ padding: 0;
+ width: 0;
+ height: 0;
+ overflow: hidden;
+}
+a.imageset {
+ text-decoration: none !important;
+}
+
+/* Global imageset items */
+.imageset.site_logo {
+ background-image: url("./images/site_logo.gif");
+ padding-left: 170px;
+ padding-top: 94px;
+}
+.imageset.upload_bar {
+ background-image: url("./images/upload_bar.gif");
+ padding-left: 280px;
+ padding-top: 16px;
+}
+.imageset.poll_left {
+ background-image: url("./images/poll_left.gif");
+ padding-left: 4px;
+ padding-top: 12px;
+}
+.imageset.poll_center {
+ background-image: url("./images/poll_center.gif");
+ padding-left: 1px;
+ padding-top: 12px;
+}
+.imageset.poll_right {
+ background-image: url("./images/poll_right.gif");
+ padding-left: 4px;
+ padding-top: 12px;
+}
+.imageset.forum_link {
+ background-image: url("./images/forum_link.gif");
+ padding-left: 46px;
+ padding-top: 25px;
+}
+.imageset.forum_read {
+ background-image: url("./images/forum_read.gif");
+ padding-left: 46px;
+ padding-top: 25px;
+}
+.imageset.forum_read_locked {
+ background-image: url("./images/forum_read_locked.gif");
+ padding-left: 46px;
+ padding-top: 25px;
+}
+.imageset.forum_read_subforum {
+ background-image: url("./images/forum_read_subforum.gif");
+ padding-left: 46px;
+ padding-top: 25px;
+}
+.imageset.forum_unread {
+ background-image: url("./images/forum_unread.gif");
+ padding-left: 46px;
+ padding-top: 25px;
+}
+.imageset.forum_unread_locked {
+ background-image: url("./images/forum_unread_locked.gif");
+ padding-left: 46px;
+ padding-top: 25px;
+}
+.imageset.forum_unread_subforum {
+ background-image: url("./images/forum_unread_subforum.gif");
+ padding-left: 46px;
+ padding-top: 25px;
+}
+.imageset.topic_moved {
+ background-image: url("./images/topic_moved.gif");
+ padding-left: 19px;
+ padding-top: 18px;
+}
+.imageset.topic_read {
+ background-image: url("./images/topic_read.gif");
+ padding-left: 19px;
+ padding-top: 18px;
+}
+.imageset.topic_read_mine {
+ background-image: url("./images/topic_read_mine.gif");
+ padding-left: 19px;
+ padding-top: 18px;
+}
+.imageset.topic_read_hot {
+ background-image: url("./images/topic_read_hot.gif");
+ padding-left: 19px;
+ padding-top: 18px;
+}
+.imageset.topic_read_hot_mine {
+ background-image: url("./images/topic_read_hot_mine.gif");
+ padding-left: 19px;
+ padding-top: 18px;
+}
+.imageset.topic_read_locked {
+ background-image: url("./images/topic_read_locked.gif");
+ padding-left: 19px;
+ padding-top: 18px;
+}
+.imageset.topic_read_locked_mine {
+ background-image: url("./images/topic_read_locked_mine.gif");
+ padding-left: 19px;
+ padding-top: 18px;
+}
+.imageset.topic_unread {
+ background-image: url("./images/topic_unread.gif");
+ padding-left: 19px;
+ padding-top: 18px;
+}
+.imageset.topic_unread_mine {
+ background-image: url("./images/topic_unread_mine.gif");
+ padding-left: 19px;
+ padding-top: 18px;
+}
+.imageset.topic_unread_hot {
+ background-image: url("./images/topic_unread_hot.gif");
+ padding-left: 19px;
+ padding-top: 18px;
+}
+.imageset.topic_unread_hot_mine {
+ background-image: url("./images/topic_unread_hot_mine.gif");
+ padding-left: 19px;
+ padding-top: 18px;
+}
+.imageset.topic_unread_locked {
+ background-image: url("./images/topic_unread_locked.gif");
+ padding-left: 19px;
+ padding-top: 18px;
+}
+.imageset.topic_unread_locked_mine {
+ background-image: url("./images/topic_unread_locked_mine.gif");
+ padding-left: 19px;
+ padding-top: 18px;
+}
+.imageset.sticky_read {
+ background-image: url("./images/sticky_read.gif");
+ padding-left: 19px;
+ padding-top: 18px;
+}
+.imageset.sticky_read_mine {
+ background-image: url("./images/sticky_read_mine.gif");
+ padding-left: 19px;
+ padding-top: 18px;
+}
+.imageset.sticky_read_locked {
+ background-image: url("./images/sticky_read_locked.gif");
+ padding-left: 19px;
+ padding-top: 18px;
+}
+.imageset.sticky_read_locked_mine {
+ background-image: url("./images/sticky_read_locked_mine.gif");
+ padding-left: 19px;
+ padding-top: 18px;
+}
+.imageset.sticky_unread {
+ background-image: url("./images/sticky_unread.gif");
+ padding-left: 19px;
+ padding-top: 18px;
+}
+.imageset.sticky_unread_mine {
+ background-image: url("./images/sticky_unread_mine.gif");
+ padding-left: 19px;
+ padding-top: 18px;
+}
+.imageset.sticky_unread_locked {
+ background-image: url("./images/sticky_unread_locked.gif");
+ padding-left: 19px;
+ padding-top: 18px;
+}
+.imageset.sticky_unread_locked_mine {
+ background-image: url("./images/sticky_unread_locked_mine.gif");
+ padding-left: 19px;
+ padding-top: 18px;
+}
+.imageset.announce_read {
+ background-image: url("./images/announce_read.gif");
+ padding-left: 19px;
+ padding-top: 18px;
+}
+.imageset.announce_read_mine {
+ background-image: url("./images/announce_read_mine.gif");
+ padding-left: 19px;
+ padding-top: 18px;
+}
+.imageset.announce_read_locked {
+ background-image: url("./images/announce_read_locked.gif");
+ padding-left: 19px;
+ padding-top: 18px;
+}
+.imageset.announce_read_locked_mine {
+ background-image: url("./images/announce_read_locked_mine.gif");
+ padding-left: 19px;
+ padding-top: 18px;
+}
+.imageset.announce_unread {
+ background-image: url("./images/announce_unread.gif");
+ padding-left: 19px;
+ padding-top: 18px;
+}
+.imageset.announce_unread_mine {
+ background-image: url("./images/announce_unread_mine.gif");
+ padding-left: 19px;
+ padding-top: 18px;
+}
+.imageset.announce_unread_locked {
+ background-image: url("./images/announce_unread_locked.gif");
+ padding-left: 19px;
+ padding-top: 18px;
+}
+.imageset.announce_unread_locked_mine {
+ background-image: url("./images/announce_unread_locked_mine.gif");
+ padding-left: 19px;
+ padding-top: 18px;
+}
+.imageset.global_read {
+ background-image: url("./images/announce_read.gif");
+ padding-left: 19px;
+ padding-top: 18px;
+}
+.imageset.global_read_mine {
+ background-image: url("./images/announce_read_mine.gif");
+ padding-left: 19px;
+ padding-top: 18px;
+}
+.imageset.global_read_locked {
+ background-image: url("./images/announce_read_locked.gif");
+ padding-left: 19px;
+ padding-top: 18px;
+}
+.imageset.global_read_locked_mine {
+ background-image: url("./images/announce_read_locked_mine.gif");
+ padding-left: 19px;
+ padding-top: 18px;
+}
+.imageset.global_unread {
+ background-image: url("./images/announce_unread.gif");
+ padding-left: 19px;
+ padding-top: 18px;
+}
+.imageset.global_unread_mine {
+ background-image: url("./images/announce_unread_mine.gif");
+ padding-left: 19px;
+ padding-top: 18px;
+}
+.imageset.global_unread_locked {
+ background-image: url("./images/announce_unread_locked.gif");
+ padding-left: 19px;
+ padding-top: 18px;
+}
+.imageset.global_unread_locked_mine {
+ background-image: url("./images/announce_unread_locked_mine.gif");
+ padding-left: 19px;
+ padding-top: 18px;
+}
+.imageset.pm_read {
+ background-image: url("./images/topic_read.gif");
+ padding-left: 19px;
+ padding-top: 18px;
+}
+.imageset.pm_unread {
+ background-image: url("./images/topic_unread.gif");
+ padding-left: 19px;
+ padding-top: 18px;
+}
+.imageset.icon_post_target {
+ background-image: url("./images/icon_post_target.gif");
+ padding-left: 12px;
+ padding-top: 9px;
+}
+.imageset.icon_post_target_unread {
+ background-image: url("./images/icon_post_target_unread.gif");
+ padding-left: 12px;
+ padding-top: 9px;
+}
+.imageset.icon_topic_attach {
+ background-image: url("./images/icon_topic_attach.gif");
+ padding-left: 14px;
+ padding-top: 18px;
+}
+.imageset.icon_topic_latest {
+ background-image: url("./images/icon_topic_latest.gif");
+ padding-left: 18px;
+ padding-top: 9px;
+}
+.imageset.icon_topic_newest {
+ background-image: url("./images/icon_topic_newest.gif");
+ padding-left: 18px;
+ padding-top: 9px;
+}
+.imageset.icon_topic_reported {
+ background-image: url("./images/icon_topic_reported.gif");
+ padding-left: 19px;
+ padding-top: 18px;
+}
+.imageset.icon_topic_unapproved {
+ background-image: url("./images/icon_topic_unapproved.gif");
+ padding-left: 19px;
+ padding-top: 18px;
+}
+.imageset.icon_topic_deleted {
+ background-image: url("./images/icon_topic_deleted.png");
+ padding-left: 14px;
+ padding-top: 14px;
+}
+
+
+/* English images for fallback */
+.imageset.phpbb_aol-icon, .imageset.icon_contact_aim {
+ background-image: url("./en/icon_contact_aim.gif");
+ padding-left: 72px;
+ padding-top: 20px;
+}
+.imageset.icon_contact_email {
+ background-image: url("./en/icon_contact_email.gif");
+ padding-left: 72px;
+ padding-top: 20px;
+}
+.imageset.phpbb_icq-icon, .imageset.icon_contact_icq {
+ background-image: url("./en/icon_contact_icq.gif");
+ padding-left: 72px;
+ padding-top: 20px;
+}
+.imageset.icon_contact_jabber {
+ background-image: url("./en/icon_contact_jabber.gif");
+ padding-left: 72px;
+ padding-top: 20px;
+}
+.imageset.phpbb_wlm-icon, .imageset.icon_contact_msnm {
+ background-image: url("./en/icon_contact_msnm.gif");
+ padding-left: 72px;
+ padding-top: 20px;
+}
+.imageset.icon_contact_pm {
+ background-image: url("./en/icon_contact_pm.gif");
+ padding-left: 72px;
+ padding-top: 20px;
+}
+.imageset.phpbb_yahoo-icon, .imageset.icon_contact_yahoo {
+ background-image: url("./en/icon_contact_yahoo.gif");
+ padding-left: 72px;
+ padding-top: 20px;
+}
+.imageset.phpbb_website-icon, .imageset.icon_contact_www {
+ background-image: url("./en/icon_contact_www.gif");
+ padding-left: 72px;
+ padding-top: 20px;
+}
+.imageset.icon_post_delete {
+ background-image: url("./en/icon_post_delete.gif");
+ padding-left: 20px;
+ padding-top: 20px;
+}
+.imageset.icon_post_edit {
+ background-image: url("./en/icon_post_edit.gif");
+ padding-left: 90px;
+ padding-top: 20px;
+}
+.imageset.icon_post_info {
+ background-image: url("./en/icon_post_info.gif");
+ padding-left: 20px;
+ padding-top: 20px;
+}
+.imageset.icon_post_quote {
+ background-image: url("./en/icon_post_quote.gif");
+ padding-left: 90px;
+ padding-top: 20px;
+}
+.imageset.icon_post_report {
+ background-image: url("./en/icon_post_report.gif");
+ padding-left: 20px;
+ padding-top: 20px;
+}
+.imageset.icon_user_online {
+ background-image: url("./en/icon_user_online.gif");
+ padding-left: 72px;
+ padding-top: 20px;
+}
+.imageset.icon_user_offline {
+ background-image: url("./en/icon_user_offline.gif");
+ padding-left: 72px;
+ padding-top: 20px;
+}
+.imageset.icon_user_profile {
+ background-image: url("./en/icon_user_profile.gif");
+ padding-left: 72px;
+ padding-top: 20px;
+}
+.imageset.icon_user_search {
+ background-image: url("./en/icon_user_search.gif");
+ padding-left: 72px;
+ padding-top: 20px;
+}
+.imageset.icon_user_warn {
+ background-image: url("./en/icon_user_warn.gif");
+ padding-left: 20px;
+ padding-top: 20px;
+}
+.imageset.button_pm_new {
+ background-image: url("./en/button_pm_new.gif");
+ padding-left: 97px;
+ padding-top: 27px;
+}
+.imageset.button_pm_reply {
+ background-image: url("./en/button_pm_reply.gif");
+ padding-left: 90px;
+ padding-top: 20px;
+}
+.imageset.button_topic_locked {
+ background-image: url("./en/button_topic_locked.gif");
+ padding-left: 97px;
+ padding-top: 27px;
+}
+.imageset.button_topic_new {
+ background-image: url("./en/button_topic_new.gif");
+ padding-left: 97px;
+ padding-top: 27px;
+}
+.imageset.button_topic_reply {
+ background-image: url("./en/button_topic_reply.gif");
+ padding-left: 97px;
+ padding-top: 27px;
+}
+
+/* RTL imageset entries */
+.rtl .imageset.site_logo {
+ padding-right: 170px;
+ padding-left: 0;
+}
+.rtl .imageset.upload_bar {
+ padding-right: 280px;
+ padding-left: 0;
+}
+.rtl .imageset.poll_left, .rtl .imageset.poll_right {
+ padding-right: 4px;
+ padding-left: 0;
+}
+.rtl .imageset.poll_center {
+ padding-right: 1px;
+ padding-left: 0;
+}
+.rtl .imageset.forum_link, .rtl .imageset.forum_read, .rtl .imageset.forum_read_locked, .rtl .imageset.forum_read_subforum, .rtl .imageset.forum_unread, .rtl .imageset.forum_unread_locked, .rtl .imageset.forum_unread_subforum {
+ padding-right: 46px;
+ padding-left: 0;
+}
+.rtl .imageset.topic_moved, .rtl .imageset.topic_read, .rtl .imageset.topic_read_mine, .rtl .imageset.topic_read_hot, .rtl .imageset.topic_read_hot_mine, .rtl .imageset.topic_read_locked, .rtl .imageset.topic_read_locked_mine, .rtl .imageset.topic_unread, .rtl .imageset.topic_unread_mine, .rtl .imageset.topic_unread_hot, .rtl .imageset.topic_unread_hot_mine, .rtl .imageset.topic_unread_locked, .rtl .imageset.topic_unread_locked_mine, .rtl .imageset.sticky_read, .rtl .imageset.sticky_read_mine, .rtl .imageset.sticky_read_locked, .rtl .imageset.sticky_read_locked_mine, .rtl .imageset.sticky_unread, .rtl .imageset.sticky_unread_mine, .rtl .imageset.sticky_unread_locked, .rtl .imageset.sticky_unread_locked_mine, .rtl .imageset.announce_read, .rtl .imageset.announce_read_mine, .rtl .imageset.announce_read_locked, .rtl .imageset.announce_read_locked_mine, .rtl .imageset.announce_unread, .rtl .imageset.announce_unread_mine, .rtl .imageset.announce_unread_locked, .rtl .imageset.announce_unread_locked_mine, .rtl .imageset.global_read, .rtl .imageset.global_read_mine, .rtl .imageset.global_read_locked, .rtl .imageset.global_read_locked_mine, .rtl .imageset.global_unread, .rtl .imageset.global_unread_mine, .rtl .imageset.global_unread_locked, .rtl .imageset.global_unread_locked_mine, .rtl .imageset.pm_read, .rtl .imageset.pm_unread, .rtl .imageset.icon_topic_reported, .rtl .imageset.icon_topic_unapproved {
+ padding-right: 19px;
+ padding-left: 0;
+}
+.rtl .imageset.icon_post_target, .rtl .imageset.icon_post_target_unread {
+ padding-right: 12px;
+ padding-left: 0;
+}
+.rtl .imageset.icon_topic_attach {
+ padding-right: 14px;
+ padding-left: 0;
+}
+.rtl .imageset.icon_topic_latest, .rtl .imageset.icon_topic_newest {
+ padding-right: 18px;
+ padding-left: 0;
+}
+
+#notification_list {
+ display: none;
+ position: absolute;
+ width: 310px;
+ z-index: 1;
+ box-shadow: 3px 3px 5px darkgray;
+}
+
+#notification_list .notification_scroll {
+ max-height: 350px;
+ overflow-y: auto;
+ overflow-x: hidden;
+}
+
+#notification_list .notification_title {
+ padding: 5px;
+}
+
+#notification_list .header {
+ width: 298px;
+ padding: 5px;
+ font-weight: bold;
+ border: 1px solid #A9B8C2;
+ border-bottom: 0;
+}
+
+#notification_list > .header > .header_settings {
+ float: right;
+ font-weight: normal;
+ text-transform: none;
+}
+
+#notification_list .footer {
+ width: 300px;
+ text-align: center;
+ font-size: 1.2em;
+ border: 1px solid #A9B8C2;
+ border-top: 0;
+}
+
+.notification_list img {
+ max-width: 50px;
+ max-height: 50px;
+}
+
+#notification_list .footer > a {
+ display: block;
+}
diff --git a/phpBB/styles/subsilver2/theme/theme.cfg b/phpBB/styles/subsilver2/theme/theme.cfg
deleted file mode 100644
index 5c58dc65d9..0000000000
--- a/phpBB/styles/subsilver2/theme/theme.cfg
+++ /dev/null
@@ -1,35 +0,0 @@
-#
-# phpBB Theme Configuration File
-#
-# @package phpBB3
-# @copyright (c) 2005 phpBB Group
-# @license http://opensource.org/licenses/gpl-license.php GNU Public License
-#
-#
-# At the left is the name, please do not change this
-# At the right the value is entered
-# For on/off options the valid values are on, off, 1, 0, true and false
-#
-# Values get trimmed, if you want to add a space in front or at the end of
-# the value, then enclose the value with single or double quotes.
-# Single and double quotes do not need to be escaped.
-#
-# Available and used values:
-# parse_css_file
-#
-
-# General Information about this theme
-name = subsilver2
-copyright = &copy; phpBB Group, 2003
-version = 3.0.12
-
-# Some configuration options
-
-#
-# You have to turn this option on if you want to use the
-# path template variables ({T_IMAGESET_PATH} for example) within
-# your css file.
-# This is mostly the case if you want to use language specific
-# images within your css file.
-#
-parse_css_file = off
diff --git a/phpBB/ucp.php b/phpBB/ucp.php
index 520ab3caad..8c773886a6 100644
--- a/phpBB/ucp.php
+++ b/phpBB/ucp.php
@@ -2,9 +2,8 @@
/**
*
* @package ucp
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -22,7 +21,7 @@ require($phpbb_root_path . 'includes/functions_module.' . $phpEx);
$id = request_var('i', '');
$mode = request_var('mode', '');
-if (in_array($mode, array('login', 'logout', 'confirm', 'sendpassword', 'activate')))
+if (in_array($mode, array('login', 'login_link', 'logout', 'confirm', 'sendpassword', 'activate')))
{
define('IN_LOGIN', true);
}
@@ -81,22 +80,31 @@ switch ($mode)
login_box(request_var('redirect', "index.$phpEx"));
break;
+ case 'login_link':
+ if ($user->data['is_registered'])
+ {
+ redirect(append_sid("{$phpbb_root_path}index.$phpEx"));
+ }
+
+ $module->load('ucp', 'login_link');
+ $module->display($user->lang['UCP_LOGIN_LINK']);
+ break;
+
case 'logout':
- if ($user->data['user_id'] != ANONYMOUS && isset($_GET['sid']) && !is_array($_GET['sid']) && $_GET['sid'] === $user->session_id)
+ if ($user->data['user_id'] != ANONYMOUS && $request->is_set('sid') && $request->variable('sid', '') === $user->session_id)
{
$user->session_kill();
$user->session_begin();
- $message = $user->lang['LOGOUT_REDIRECT'];
}
- else
+ else if ($user->data['user_id'] != ANONYMOUS)
{
- $message = ($user->data['user_id'] == ANONYMOUS) ? $user->lang['LOGOUT_REDIRECT'] : $user->lang['LOGOUT_FAILED'];
- }
- meta_refresh(3, append_sid("{$phpbb_root_path}index.$phpEx"));
+ meta_refresh(3, append_sid("{$phpbb_root_path}index.$phpEx"));
- $message = $message . '<br /><br />' . sprintf($user->lang['RETURN_INDEX'], '<a href="' . append_sid("{$phpbb_root_path}index.$phpEx") . '">', '</a> ');
- trigger_error($message);
+ $message = $user->lang['LOGOUT_FAILED'] . '<br /><br />' . sprintf($user->lang['RETURN_INDEX'], '<a href="' . append_sid("{$phpbb_root_path}index.$phpEx") . '">', '</a> ');
+ trigger_error($message);
+ }
+ redirect(append_sid("{$phpbb_root_path}index.$phpEx"));
break;
case 'terms':
@@ -120,7 +128,7 @@ switch ($mode)
);
// Disable online list
- page_header($user->lang[$title], false);
+ page_header($user->lang[$title]);
$template->assign_vars(array(
'S_AGREEMENT' => true,
@@ -141,8 +149,10 @@ switch ($mode)
{
$set_time = time() - 31536000;
- foreach ($_COOKIE as $cookie_name => $cookie_data)
+ foreach ($request->variable_names(\phpbb\request\request_interface::COOKIE) as $cookie_name)
{
+ $cookie_data = $request->variable($cookie_name, '', true, \phpbb\request\request_interface::COOKIE);
+
// Only delete board cookies, no other ones...
if (strpos($cookie_name, $config['cookie_name'] . '_') !== 0)
{
@@ -272,19 +282,19 @@ if ($module->is_active('zebra', 'friends'))
// Output listing of friends online
$update_time = $config['load_online_time'] * 60;
- $sql = $db->sql_build_query('SELECT_DISTINCT', array(
+ $sql_ary = array(
'SELECT' => 'u.user_id, u.username, u.username_clean, u.user_colour, MAX(s.session_time) as online_time, MIN(s.session_viewonline) AS viewonline',
'FROM' => array(
USERS_TABLE => 'u',
- ZEBRA_TABLE => 'z'
+ ZEBRA_TABLE => 'z',
),
'LEFT_JOIN' => array(
array(
'FROM' => array(SESSIONS_TABLE => 's'),
- 'ON' => 's.session_user_id = z.zebra_id'
- )
+ 'ON' => 's.session_user_id = z.zebra_id',
+ ),
),
'WHERE' => 'z.user_id = ' . $user->data['user_id'] . '
@@ -294,8 +304,9 @@ if ($module->is_active('zebra', 'friends'))
'GROUP_BY' => 'z.zebra_id, u.user_id, u.username_clean, u.user_colour, u.username',
'ORDER_BY' => 'u.username_clean ASC',
- ));
+ );
+ $sql = $db->sql_build_query('SELECT_DISTINCT', $sql_ary);
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
@@ -320,6 +331,18 @@ if (!$config['allow_topic_notify'] && !$config['allow_forum_notify'])
$module->set_display('main', 'subscribed', false);
}
+/**
+* Use this event to enable and disable additional UCP modules
+*
+* @event core.ucp_display_module_before
+* @var p_master module Object holding all modules and their status
+* @var mixed id Active module category (can be the int or string)
+* @var string mode Active module
+* @since 3.1-A1
+*/
+$vars = array('module', 'id', 'mode');
+extract($phpbb_dispatcher->trigger_event('core.ucp_display_module_before', compact($vars)));
+
// Select the active module
$module->set_active($id, $mode);
@@ -330,7 +353,7 @@ $module->load_active();
$module->assign_tpl_vars(append_sid("{$phpbb_root_path}ucp.$phpEx"));
// Generate the page, do not display/query online list
-$module->display($module->get_page_title(), false);
+$module->display($module->get_page_title());
/**
* Function for assigning a template var if the zebra module got included
@@ -351,5 +374,3 @@ function _module_zebra($mode, &$module_row)
$template->assign_var('S_ZEBRA_FOES_ENABLED', true);
}
}
-
-?> \ No newline at end of file
diff --git a/phpBB/viewforum.php b/phpBB/viewforum.php
index 6fec662b02..7f194bbcef 100644
--- a/phpBB/viewforum.php
+++ b/phpBB/viewforum.php
@@ -2,9 +2,8 @@
/**
*
* @package phpBB3
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -34,6 +33,8 @@ $sort_days = request_var('st', $default_sort_days);
$sort_key = request_var('sk', $default_sort_key);
$sort_dir = request_var('sd', $default_sort_dir);
+$pagination = $phpbb_container->get('pagination');
+
// Check if the user has actually sent a forum ID with his/her request
// If not give them a nice error page.
if (!$forum_id)
@@ -106,7 +107,7 @@ if ($forum_data['forum_type'] == FORUM_LINK && $forum_data['forum_link'])
if ($forum_data['forum_flags'] & FORUM_FLAG_LINK_TRACK)
{
$sql = 'UPDATE ' . FORUMS_TABLE . '
- SET forum_posts = forum_posts + 1
+ SET forum_posts_approved = forum_posts_approved + 1
WHERE forum_id = ' . $forum_id;
$db->sql_query($sql);
}
@@ -141,8 +142,13 @@ else
}
}
+$phpbb_content_visibility = $phpbb_container->get('content.visibility');
+
// Dump out the page header and load viewforum template
-page_header($user->lang['VIEW_FORUM'] . ' - ' . $forum_data['forum_name'], true, $forum_id);
+$topics_count = $phpbb_content_visibility->get_count('forum_topics', $forum_data, $forum_id);
+$start = $pagination->validate_start($start, $config['topics_per_page'], $topics_count);
+
+page_header($forum_data['forum_name'] . ($start ? ' - ' . $user->lang('PAGE_TITLE_NUMBER', $pagination->get_on_page($config['topics_per_page'], $start)) : ''), true, $forum_id);
$template->set_filenames(array(
'body' => 'viewforum_body.html')
@@ -177,12 +183,25 @@ if ($mark_read == 'topics')
$token = request_var('hash', '');
if (check_link_hash($token, 'global'))
{
- // Add 0 to forums array to mark global announcements correctly
- markread('topics', array($forum_id, 0));
+ markread('topics', array($forum_id), false, request_var('mark_time', 0));
}
$redirect_url = append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $forum_id);
meta_refresh(3, $redirect_url);
+ if ($request->is_ajax())
+ {
+ // Tell the ajax script what language vars and URL need to be replaced
+ $data = array(
+ 'NO_UNREAD_POSTS' => $user->lang['NO_UNREAD_POSTS'],
+ 'UNREAD_POSTS' => $user->lang['UNREAD_POSTS'],
+ 'U_MARK_TOPICS' => ($user->data['is_registered'] || $config['load_anon_lastread']) ? append_sid("{$phpbb_root_path}viewforum.$phpEx", 'hash=' . generate_link_hash('global') . "&f=$forum_id&mark=topics&mark_time=" . time()) : '',
+ 'MESSAGE_TITLE' => $user->lang['INFORMATION'],
+ 'MESSAGE_TEXT' => $user->lang['TOPICS_MARKED']
+ );
+ $json_response = new \phpbb\json_response();
+ $json_response->send($data);
+ }
+
trigger_error($user->lang['TOPICS_MARKED'] . '<br /><br />' . sprintf($user->lang['RETURN_FORUM'], '<a href="' . $redirect_url . '">', '</a>'));
}
@@ -193,15 +212,26 @@ if ($forum_data['forum_topics_per_page'])
}
// Do the forum Prune thang - cron type job ...
-if ($forum_data['prune_next'] < time() && $forum_data['enable_prune'])
+if (!$config['use_system_cron'])
{
- $template->assign_var('RUN_CRON_TASK', '<img src="' . append_sid($phpbb_root_path . 'cron.' . $phpEx, 'cron_type=prune_forum&amp;f=' . $forum_id) . '" alt="cron" width="1" height="1" />');
+ $cron = $phpbb_container->get('cron.manager');
+
+ $task = $cron->find_task('cron.task.core.prune_forum');
+ $task->set_forum_data($forum_data);
+
+ if ($task->is_ready())
+ {
+ $url = $task->get_url();
+ $template->assign_var('RUN_CRON_TASK', '<img src="' . $url . '" width="1" height="1" alt="cron" />');
+ }
}
// Forum rules and subscription info
$s_watching_forum = array(
'link' => '',
+ 'link_toggle' => '',
'title' => '',
+ 'title_toggle' => '',
'is_watching' => false,
);
@@ -218,14 +248,12 @@ gen_forum_auth_level('forum', $forum_id, $forum_data['forum_status']);
$limit_days = array(0 => $user->lang['ALL_TOPICS'], 1 => $user->lang['1_DAY'], 7 => $user->lang['7_DAYS'], 14 => $user->lang['2_WEEKS'], 30 => $user->lang['1_MONTH'], 90 => $user->lang['3_MONTHS'], 180 => $user->lang['6_MONTHS'], 365 => $user->lang['1_YEAR']);
$sort_by_text = array('a' => $user->lang['AUTHOR'], 't' => $user->lang['POST_TIME'], 'r' => $user->lang['REPLIES'], 's' => $user->lang['SUBJECT'], 'v' => $user->lang['VIEWS']);
-$sort_by_sql = array('a' => 't.topic_first_poster_name', 't' => 't.topic_last_post_time', 'r' => 't.topic_replies', 's' => 't.topic_title', 'v' => 't.topic_views');
+$sort_by_sql = array('a' => 't.topic_first_poster_name', 't' => 't.topic_last_post_time', 'r' => (($auth->acl_get('m_approve', $forum_id)) ? 't.topic_posts_approved + t.topic_posts_unapproved + t.topic_posts_softdeleted' : 't.topic_posts_approved'), 's' => 't.topic_title', 'v' => 't.topic_views');
$s_limit_days = $s_sort_key = $s_sort_dir = $u_sort_param = '';
gen_sort_selects($limit_days, $sort_by_text, $sort_days, $sort_key, $sort_dir, $s_limit_days, $s_sort_key, $s_sort_dir, $u_sort_param, $default_sort_days, $default_sort_key, $default_sort_dir);
// Limit topics to certain time frame, obtain correct topic count
-// global announcements must not be counted, normal announcements have to
-// be counted, as forum_topics(_real) includes them
if ($sort_days)
{
$min_post_time = time() - ($sort_days * 86400);
@@ -233,9 +261,10 @@ if ($sort_days)
$sql = 'SELECT COUNT(topic_id) AS num_topics
FROM ' . TOPICS_TABLE . "
WHERE forum_id = $forum_id
- AND ((topic_type <> " . POST_GLOBAL . " AND topic_last_post_time >= $min_post_time)
- OR topic_type = " . POST_ANNOUNCE . ")
- " . (($auth->acl_get('m_approve', $forum_id)) ? '' : 'AND topic_approved = 1');
+ AND (topic_last_post_time >= $min_post_time
+ OR topic_type = " . POST_ANNOUNCE . '
+ OR topic_type = ' . POST_GLOBAL . ')
+ AND ' . $phpbb_content_visibility->get_visibility_sql('topic', $forum_id);
$result = $db->sql_query($sql);
$topics_count = (int) $db->sql_fetchfield('num_topics');
$db->sql_freeresult($result);
@@ -251,16 +280,9 @@ if ($sort_days)
}
else
{
- $topics_count = ($auth->acl_get('m_approve', $forum_id)) ? $forum_data['forum_topics_real'] : $forum_data['forum_topics'];
$sql_limit_time = '';
}
-// Make sure $start is set to the last page if it exceeds the amount
-if ($start < 0 || $start > $topics_count)
-{
- $start = ($start < 0) ? 0 : floor(($topics_count - 1) / $config['topics_per_page']) * $config['topics_per_page'];
-}
-
// Basic pagewide vars
$post_alt = ($forum_data['forum_status'] == ITEM_LOCKED) ? $user->lang['FORUM_LOCKED'] : $user->lang['POST_NEW_TOPIC'];
@@ -283,7 +305,7 @@ if (!empty($_EXTRA_URL))
}
$template->assign_vars(array(
- 'MODERATORS' => (!empty($moderators[$forum_id])) ? implode(', ', $moderators[$forum_id]) : '',
+ 'MODERATORS' => (!empty($moderators[$forum_id])) ? implode($user->lang['COMMA_SEPARATOR'], $moderators[$forum_id]) : '',
'POST_IMG' => ($forum_data['forum_status'] == ITEM_LOCKED) ? $user->img('button_topic_locked', $post_alt) : $user->img('button_topic_new', $post_alt),
'NEWEST_POST_IMG' => $user->img('icon_topic_newest', 'VIEW_NEWEST_POST'),
@@ -301,6 +323,7 @@ $template->assign_vars(array(
'FOLDER_MOVED_IMG' => $user->img('topic_moved', 'TOPIC_MOVED'),
'REPORTED_IMG' => $user->img('icon_topic_reported', 'TOPIC_REPORTED'),
'UNAPPROVED_IMG' => $user->img('icon_topic_unapproved', 'TOPIC_UNAPPROVED'),
+ 'DELETED_IMG' => $user->img('icon_topic_deleted', 'TOPIC_DELETED'),
'GOTO_PAGE_IMG' => $user->img('icon_post_target', 'GOTO_PAGE'),
'L_NO_TOPICS' => ($forum_data['forum_status'] == ITEM_LOCKED) ? $user->lang['POST_FORUM_LOCKED'] : $user->lang['NO_TOPICS'],
@@ -314,8 +337,10 @@ $template->assign_vars(array(
'S_SELECT_SORT_KEY' => $s_sort_key,
'S_SELECT_SORT_DAYS' => $s_limit_days,
'S_TOPIC_ICONS' => ($s_display_active && sizeof($active_forum_ary)) ? max($active_forum_ary['enable_icons']) : (($forum_data['enable_icons']) ? true : false),
- 'S_WATCH_FORUM_LINK' => $s_watching_forum['link'],
+ 'U_WATCH_FORUM_LINK' => $s_watching_forum['link'],
+ 'U_WATCH_FORUM_TOGGLE' => $s_watching_forum['link_toggle'],
'S_WATCH_FORUM_TITLE' => $s_watching_forum['title'],
+ 'S_WATCH_FORUM_TOGGLE' => $s_watching_forum['title_toggle'],
'S_WATCHING_FORUM' => $s_watching_forum['is_watching'],
'S_FORUM_ACTION' => append_sid("{$phpbb_root_path}viewforum.$phpEx", "f=$forum_id" . (($start == 0) ? '' : "&amp;start=$start")),
'S_DISPLAY_SEARCHBOX' => ($auth->acl_get('u_search') && $auth->acl_get('f_search', $forum_id) && $config['load_search']) ? true : false,
@@ -328,14 +353,14 @@ $template->assign_vars(array(
'U_MCP' => ($auth->acl_get('m_', $forum_id)) ? append_sid("{$phpbb_root_path}mcp.$phpEx", "f=$forum_id&amp;i=main&amp;mode=forum_view", true, $user->session_id) : '',
'U_POST_NEW_TOPIC' => ($auth->acl_get('f_post', $forum_id) || $user->data['user_id'] == ANONYMOUS) ? append_sid("{$phpbb_root_path}posting.$phpEx", 'mode=post&amp;f=' . $forum_id) : '',
'U_VIEW_FORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", "f=$forum_id" . ((strlen($u_sort_param)) ? "&amp;$u_sort_param" : '') . (($start == 0) ? '' : "&amp;start=$start")),
- 'U_MARK_TOPICS' => ($user->data['is_registered'] || $config['load_anon_lastread']) ? append_sid("{$phpbb_root_path}viewforum.$phpEx", 'hash=' . generate_link_hash('global') . "&amp;f=$forum_id&amp;mark=topics") : '',
+ 'U_MARK_TOPICS' => ($user->data['is_registered'] || $config['load_anon_lastread']) ? append_sid("{$phpbb_root_path}viewforum.$phpEx", 'hash=' . generate_link_hash('global') . "&amp;f=$forum_id&amp;mark=topics&amp;mark_time=" . time()) : '',
));
// Grab icons
$icons = $cache->obtain_icons();
// Grab all topic data
-$rowset = $announcement_list = $topic_list = $global_announce_list = array();
+$rowset = $announcement_list = $topic_list = $global_announce_forums = array();
$sql_array = array(
'SELECT' => 't.*',
@@ -345,7 +370,17 @@ $sql_array = array(
'LEFT_JOIN' => array(),
);
-$sql_approved = ($auth->acl_get('m_approve', $forum_id)) ? '' : 'AND t.topic_approved = 1';
+/**
+* Event to modify the SQL query before the topic data is retrieved
+*
+* @event core.viewforum_get_topic_data
+* @var array sql_array The SQL array to get the data of all topics
+* @since 3.1-A1
+*/
+$vars = array('sql_array');
+extract($phpbb_dispatcher->trigger_event('core.viewforum_get_topic_data', compact($vars)));
+
+$sql_approved = ' AND ' . $phpbb_content_visibility->get_visibility_sql('topic', $forum_id, 't.');
if ($user->data['is_registered'])
{
@@ -370,40 +405,70 @@ if ($user->data['is_registered'])
if ($forum_data['forum_type'] == FORUM_POST)
{
+ // Get global announcement forums
+ $g_forum_ary = $auth->acl_getf('f_read', true);
+ $g_forum_ary = array_unique(array_keys($g_forum_ary));
+
+ $sql_anounce_array['LEFT_JOIN'] = $sql_array['LEFT_JOIN'];
+ $sql_anounce_array['LEFT_JOIN'][] = array('FROM' => array(FORUMS_TABLE => 'f'), 'ON' => 'f.forum_id = t.forum_id');
+ $sql_anounce_array['SELECT'] = $sql_array['SELECT'] . ', f.forum_name';
+
// Obtain announcements ... removed sort ordering, sort by time in all cases
- $sql = $db->sql_build_query('SELECT', array(
- 'SELECT' => $sql_array['SELECT'],
+ $sql_ary = array(
+ 'SELECT' => $sql_anounce_array['SELECT'],
'FROM' => $sql_array['FROM'],
- 'LEFT_JOIN' => $sql_array['LEFT_JOIN'],
+ 'LEFT_JOIN' => $sql_anounce_array['LEFT_JOIN'],
- 'WHERE' => 't.forum_id IN (' . $forum_id . ', 0)
- AND t.topic_type IN (' . POST_ANNOUNCE . ', ' . POST_GLOBAL . ')',
+ 'WHERE' => '(t.forum_id = ' . $forum_id . '
+ AND t.topic_type = ' . POST_ANNOUNCE . ') OR
+ (' . $db->sql_in_set('t.forum_id', $g_forum_ary) . '
+ AND t.topic_type = ' . POST_GLOBAL . ')',
'ORDER_BY' => 't.topic_time DESC',
- ));
+ );
+ $sql = $db->sql_build_query('SELECT', $sql_ary);
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
{
- if (!$row['topic_approved'] && !$auth->acl_get('m_approve', $row['forum_id']))
+ if ($row['topic_visibility'] != ITEM_APPROVED && !$auth->acl_get('m_approve', $row['forum_id']))
{
- // Do not display announcements that are waiting for approval.
+ // Do not display announcements that are waiting for approval or soft deleted.
continue;
}
$rowset[$row['topic_id']] = $row;
$announcement_list[] = $row['topic_id'];
- if ($row['topic_type'] == POST_GLOBAL)
+ if ($forum_id != $row['forum_id'])
{
- $global_announce_list[$row['topic_id']] = true;
+ $topics_count++;
+ $global_announce_forums[] = $row['forum_id'];
}
- else
+ }
+ $db->sql_freeresult($result);
+}
+
+$forum_tracking_info = array();
+
+if ($user->data['is_registered'])
+{
+ $forum_tracking_info[$forum_id] = $forum_data['mark_time'];
+
+ if (!empty($global_announce_forums) && $config['load_db_lastread'])
+ {
+ $sql = 'SELECT forum_id, mark_time
+ FROM ' . FORUMS_TRACK_TABLE . '
+ WHERE ' . $db->sql_in_set('forum_id', $global_announce_forums) . '
+ AND user_id = ' . $user->data['user_id'];
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
{
- $topics_count--;
+ $forum_tracking_info[$row['forum_id']] = $row['mark_time'];
}
+ $db->sql_freeresult($result);
}
- $db->sql_freeresult($result);
}
// If the user is trying to reach late pages, start searching from the end
@@ -413,14 +478,11 @@ if ($start > $topics_count / 2)
{
$store_reverse = true;
- if ($start + $config['topics_per_page'] > $topics_count)
- {
- $sql_limit = min($config['topics_per_page'], max(1, $topics_count - $start));
- }
-
// Select the sort order
$sql_sort_order = $sort_by_sql[$sort_key] . ' ' . (($sort_dir == 'd') ? 'ASC' : 'DESC');
- $sql_start = max(0, $topics_count - $sql_limit - $start);
+
+ $sql_limit = $pagination->reverse_limit($start, $sql_limit, $topics_count);
+ $sql_start = $pagination->reverse_start($start, $sql_limit, $topics_count);
}
else
{
@@ -494,9 +556,26 @@ if (sizeof($topic_list))
// If we have some shadow topics, update the rowset to reflect their topic information
if (sizeof($shadow_topic_list))
{
- $sql = 'SELECT *
- FROM ' . TOPICS_TABLE . '
- WHERE ' . $db->sql_in_set('topic_id', array_keys($shadow_topic_list));
+ // SQL array for obtaining shadow topics
+ $sql_array = array(
+ 'SELECT' => 't.*',
+ 'FROM' => array(
+ TOPICS_TABLE => 't'
+ ),
+ 'WHERE' => $db->sql_in_set('t.topic_id', array_keys($shadow_topic_list)),
+ );
+
+ /**
+ * Event to modify the SQL query before the shadowtopic data is retrieved
+ *
+ * @event core.viewforum_get_shadowtopic_data
+ * @var array sql_array SQL array to get the data of any shadowtopics
+ * @since 3.1-A1
+ */
+ $vars = array('sql_array');
+ extract($phpbb_dispatcher->trigger_event('core.viewforum_get_shadowtopic_data', compact($vars)));
+
+ $sql = $db->sql_build_query('SELECT', $sql_array);
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
@@ -548,14 +627,16 @@ if ($s_display_active)
$topics_count = 1;
}
-// We need to readd the local announcements to the forums total topic count, otherwise the number is different from the one on the forum list
-$total_topic_count = $topics_count + sizeof($announcement_list) - sizeof($global_announce_list);
+// We need to remove the global announcements from the forums total topic count,
+// otherwise the number is different from the one on the forum list
+$total_topic_count = $topics_count - sizeof($global_announce_forums);
+
+$base_url = append_sid("{$phpbb_root_path}viewforum.$phpEx", "f=$forum_id" . ((strlen($u_sort_param)) ? "&amp;$u_sort_param" : ''));
+$pagination->generate_template_pagination($base_url, 'pagination', 'start', $topics_count, $config['topics_per_page'], $start);
$template->assign_vars(array(
- 'PAGINATION' => generate_pagination(append_sid("{$phpbb_root_path}viewforum.$phpEx", "f=$forum_id" . ((strlen($u_sort_param)) ? "&amp;$u_sort_param" : '')), $topics_count, $config['topics_per_page'], $start),
- 'PAGE_NUMBER' => on_page($topics_count, $config['topics_per_page'], $start),
- 'TOTAL_TOPICS' => ($s_display_active) ? false : (($total_topic_count == 1) ? $user->lang['VIEW_FORUM_TOPIC'] : sprintf($user->lang['VIEW_FORUM_TOPICS'], $total_topic_count)))
-);
+ 'TOTAL_TOPICS' => ($s_display_active) ? false : $user->lang('VIEW_FORUM_TOPICS', (int) $total_topic_count),
+));
$topic_list = ($store_reverse) ? array_merge($announcement_list, array_reverse($topic_list)) : array_merge($announcement_list, $topic_list);
$topic_tracking_info = $tracking_topics = array();
@@ -566,45 +647,44 @@ if (sizeof($topic_list))
$mark_forum_read = true;
$mark_time_forum = 0;
- // Active topics?
- if ($s_display_active && sizeof($active_forum_ary))
+ // Generate topic forum list...
+ $topic_forum_list = array();
+ foreach ($rowset as $t_id => $row)
{
- // Generate topic forum list...
- $topic_forum_list = array();
- foreach ($rowset as $t_id => $row)
+ if (isset($forum_tracking_info[$row['forum_id']]))
{
- $topic_forum_list[$row['forum_id']]['forum_mark_time'] = ($config['load_db_lastread'] && $user->data['is_registered'] && isset($row['forum_mark_time'])) ? $row['forum_mark_time'] : 0;
- $topic_forum_list[$row['forum_id']]['topics'][] = $t_id;
+ $row['forum_mark_time'] = $forum_tracking_info[$row['forum_id']];
}
- if ($config['load_db_lastread'] && $user->data['is_registered'])
+ $topic_forum_list[$row['forum_id']]['forum_mark_time'] = ($config['load_db_lastread'] && $user->data['is_registered'] && isset($row['forum_mark_time'])) ? $row['forum_mark_time'] : 0;
+ $topic_forum_list[$row['forum_id']]['topics'][] = (int) $t_id;
+ }
+
+ if ($config['load_db_lastread'] && $user->data['is_registered'])
+ {
+ foreach ($topic_forum_list as $f_id => $topic_row)
{
- foreach ($topic_forum_list as $f_id => $topic_row)
- {
- $topic_tracking_info += get_topic_tracking($f_id, $topic_row['topics'], $rowset, array($f_id => $topic_row['forum_mark_time']), false);
- }
+ $topic_tracking_info += get_topic_tracking($f_id, $topic_row['topics'], $rowset, array($f_id => $topic_row['forum_mark_time']));
}
- else if ($config['load_anon_lastread'] || $user->data['is_registered'])
+ }
+ else if ($config['load_anon_lastread'] || $user->data['is_registered'])
+ {
+ foreach ($topic_forum_list as $f_id => $topic_row)
{
- foreach ($topic_forum_list as $f_id => $topic_row)
- {
- $topic_tracking_info += get_complete_topic_tracking($f_id, $topic_row['topics'], false);
- }
+ $topic_tracking_info += get_complete_topic_tracking($f_id, $topic_row['topics']);
}
-
- unset($topic_forum_list);
}
- else
+
+ unset($topic_forum_list);
+
+ if (!$s_display_active)
{
if ($config['load_db_lastread'] && $user->data['is_registered'])
{
- $topic_tracking_info = get_topic_tracking($forum_id, $topic_list, $rowset, array($forum_id => $forum_data['mark_time']), $global_announce_list);
$mark_time_forum = (!empty($forum_data['mark_time'])) ? $forum_data['mark_time'] : $user->data['user_lastmark'];
}
else if ($config['load_anon_lastread'] || $user->data['is_registered'])
{
- $topic_tracking_info = get_complete_topic_tracking($forum_id, $topic_list, $global_announce_list);
-
if (!$user->data['is_registered'])
{
$user->data['user_lastmark'] = (isset($tracking_topics['l'])) ? (int) (base_convert($tracking_topics['l'], 36, 10) + $config['board_startdate']) : 0;
@@ -625,7 +705,7 @@ if (sizeof($topic_list))
$s_type_switch_test = ($row['topic_type'] == POST_ANNOUNCE || $row['topic_type'] == POST_GLOBAL) ? 1 : 0;
// Replies
- $replies = ($auth->acl_get('m_approve', $topic_forum_id)) ? $row['topic_replies_real'] : $row['topic_replies'];
+ $replies = $phpbb_content_visibility->get_count('topic_posts', $row, $topic_forum_id) - 1;
if ($row['topic_status'] == ITEM_MOVED)
{
@@ -642,16 +722,19 @@ if (sizeof($topic_list))
topic_status($row, $replies, $unread_topic, $folder_img, $folder_alt, $topic_type);
// Generate all the URIs ...
- $view_topic_url_params = 'f=' . $topic_forum_id . '&amp;t=' . $topic_id;
+ $view_topic_url_params = 'f=' . $row['forum_id'] . '&amp;t=' . $topic_id;
$view_topic_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", $view_topic_url_params);
- $topic_unapproved = (!$row['topic_approved'] && $auth->acl_get('m_approve', $topic_forum_id)) ? true : false;
- $posts_unapproved = ($row['topic_approved'] && $row['topic_replies'] < $row['topic_replies_real'] && $auth->acl_get('m_approve', $topic_forum_id)) ? true : false;
+ $topic_unapproved = ($row['topic_visibility'] == ITEM_UNAPPROVED && $auth->acl_get('m_approve', $row['forum_id']));
+ $posts_unapproved = ($row['topic_visibility'] == ITEM_APPROVED && $row['topic_posts_unapproved'] && $auth->acl_get('m_approve', $row['forum_id']));
+ $topic_deleted = $row['topic_visibility'] == ITEM_DELETED;
+
$u_mcp_queue = ($topic_unapproved || $posts_unapproved) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue&amp;mode=' . (($topic_unapproved) ? 'approve_details' : 'unapproved_posts') . "&amp;t=$topic_id", true, $user->session_id) : '';
+ $u_mcp_queue = (!$u_mcp_queue && $topic_deleted) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue&amp;mode=deleted_topics&amp;t=' . $topic_id, true, $user->session_id) : $u_mcp_queue;
// Send vars to template
- $template->assign_block_vars('topicrow', array(
- 'FORUM_ID' => $topic_forum_id,
+ $topic_row = array(
+ 'FORUM_ID' => $row['forum_id'],
'TOPIC_ID' => $topic_id,
'TOPIC_AUTHOR' => get_username_string('username', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
'TOPIC_AUTHOR_COLOUR' => get_username_string('colour', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
@@ -664,30 +747,29 @@ if (sizeof($topic_list))
'LAST_POST_AUTHOR_COLOUR' => get_username_string('colour', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']),
'LAST_POST_AUTHOR_FULL' => get_username_string('full', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']),
- 'PAGINATION' => topic_generate_pagination($replies, $view_topic_url),
'REPLIES' => $replies,
'VIEWS' => $row['topic_views'],
'TOPIC_TITLE' => censor_text($row['topic_title']),
'TOPIC_TYPE' => $topic_type,
+ 'FORUM_NAME' => (isset($row['forum_name'])) ? $row['forum_name'] : $forum_data['forum_name'],
+ 'TOPIC_IMG_STYLE' => $folder_img,
'TOPIC_FOLDER_IMG' => $user->img($folder_img, $folder_alt),
- 'TOPIC_FOLDER_IMG_SRC' => $user->img($folder_img, $folder_alt, false, '', 'src'),
'TOPIC_FOLDER_IMG_ALT' => $user->lang[$folder_alt],
- 'TOPIC_FOLDER_IMG_WIDTH'=> $user->img($folder_img, '', false, '', 'width'),
- 'TOPIC_FOLDER_IMG_HEIGHT' => $user->img($folder_img, '', false, '', 'height'),
'TOPIC_ICON_IMG' => (!empty($icons[$row['icon_id']])) ? $icons[$row['icon_id']]['img'] : '',
'TOPIC_ICON_IMG_WIDTH' => (!empty($icons[$row['icon_id']])) ? $icons[$row['icon_id']]['width'] : '',
'TOPIC_ICON_IMG_HEIGHT' => (!empty($icons[$row['icon_id']])) ? $icons[$row['icon_id']]['height'] : '',
- 'ATTACH_ICON_IMG' => ($auth->acl_get('u_download') && $auth->acl_get('f_download', $topic_forum_id) && $row['topic_attachment']) ? $user->img('icon_topic_attach', $user->lang['TOTAL_ATTACHMENTS']) : '',
+ 'ATTACH_ICON_IMG' => ($auth->acl_get('u_download') && $auth->acl_get('f_download', $row['forum_id']) && $row['topic_attachment']) ? $user->img('icon_topic_attach', $user->lang['TOTAL_ATTACHMENTS']) : '',
'UNAPPROVED_IMG' => ($topic_unapproved || $posts_unapproved) ? $user->img('icon_topic_unapproved', ($topic_unapproved) ? 'TOPIC_UNAPPROVED' : 'POSTS_UNAPPROVED') : '',
'S_TOPIC_TYPE' => $row['topic_type'],
'S_USER_POSTED' => (isset($row['topic_posted']) && $row['topic_posted']) ? true : false,
'S_UNREAD_TOPIC' => $unread_topic,
- 'S_TOPIC_REPORTED' => (!empty($row['topic_reported']) && $auth->acl_get('m_report', $topic_forum_id)) ? true : false,
+ 'S_TOPIC_REPORTED' => (!empty($row['topic_reported']) && $auth->acl_get('m_report', $row['forum_id'])) ? true : false,
'S_TOPIC_UNAPPROVED' => $topic_unapproved,
'S_POSTS_UNAPPROVED' => $posts_unapproved,
+ 'S_TOPIC_DELETED' => $topic_deleted,
'S_HAS_POLL' => ($row['poll_start']) ? true : false,
'S_POST_ANNOUNCE' => ($row['topic_type'] == POST_ANNOUNCE) ? true : false,
'S_POST_GLOBAL' => ($row['topic_type'] == POST_GLOBAL) ? true : false,
@@ -700,12 +782,28 @@ if (sizeof($topic_list))
'U_LAST_POST_AUTHOR' => get_username_string('profile', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']),
'U_TOPIC_AUTHOR' => get_username_string('profile', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
'U_VIEW_TOPIC' => $view_topic_url,
- 'U_MCP_REPORT' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=reports&amp;mode=reports&amp;f=' . $topic_forum_id . '&amp;t=' . $topic_id, true, $user->session_id),
+ 'U_VIEW_FORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $row['forum_id']),
+ 'U_MCP_REPORT' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=reports&amp;mode=reports&amp;f=' . $row['forum_id'] . '&amp;t=' . $topic_id, true, $user->session_id),
'U_MCP_QUEUE' => $u_mcp_queue,
- 'S_TOPIC_TYPE_SWITCH' => ($s_type_switch == $s_type_switch_test) ? -1 : $s_type_switch_test)
+ 'S_TOPIC_TYPE_SWITCH' => ($s_type_switch == $s_type_switch_test) ? -1 : $s_type_switch_test,
);
+ /**
+ * Modify the topic data before it is assigned to the template
+ *
+ * @event core.viewforum_modify_topicrow
+ * @var array row Array with topic data
+ * @var array topic_row Template array with topic data
+ * @since 3.1-A1
+ */
+ $vars = array('row', 'topic_row');
+ extract($phpbb_dispatcher->trigger_event('core.viewforum_modify_topicrow', compact($vars)));
+
+ $template->assign_block_vars('topicrow', $topic_row);
+
+ $pagination->generate_template_pagination($view_topic_url, 'topicrow.pagination', 'start', $replies + 1, $config['posts_per_page'], 1, true, true);
+
$s_type_switch = ($row['topic_type'] == POST_ANNOUNCE || $row['topic_type'] == POST_GLOBAL) ? 1 : 0;
if ($unread_topic)
@@ -727,5 +825,3 @@ if ($forum_data['forum_type'] == FORUM_POST && sizeof($topic_list) && $mark_foru
}
page_footer();
-
-?> \ No newline at end of file
diff --git a/phpBB/viewonline.php b/phpBB/viewonline.php
index 5eb2894441..87813596fa 100644
--- a/phpBB/viewonline.php
+++ b/phpBB/viewonline.php
@@ -2,9 +2,8 @@
/**
*
* @package phpBB3
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -27,7 +26,7 @@ $session_id = request_var('s', '');
$start = request_var('start', 0);
$sort_key = request_var('sk', 'b');
$sort_dir = request_var('sd', 'd');
-$show_guests= ($config['load_online_guests']) ? request_var('sg', 0) : 0;
+$show_guests = ($config['load_online_guests']) ? request_var('sg', 0) : 0;
// Can this user view profiles/memberlist?
if (!$auth->acl_gets('u_viewprofile', 'a_user', 'a_useradd', 'a_userdel'))
@@ -40,6 +39,8 @@ if (!$auth->acl_gets('u_viewprofile', 'a_user', 'a_useradd', 'a_userdel'))
login_box('', $user->lang['LOGIN_EXPLAIN_VIEWONLINE']);
}
+$pagination = $phpbb_container->get('pagination');
+
$sort_key_text = array('a' => $user->lang['SORT_USERNAME'], 'b' => $user->lang['SORT_JOINED'], 'c' => $user->lang['SORT_LOCATION']);
$sort_key_sql = array('a' => 'u.username_clean', 'b' => 's.session_time', 'c' => 's.session_page');
@@ -122,13 +123,33 @@ if (!$show_guests)
}
// Get user list
-$sql = 'SELECT u.user_id, u.username, u.username_clean, u.user_type, u.user_colour, s.session_id, s.session_time, s.session_page, s.session_ip, s.session_browser, s.session_viewonline, s.session_forum_id
- FROM ' . USERS_TABLE . ' u, ' . SESSIONS_TABLE . ' s
- WHERE u.user_id = s.session_user_id
+$sql_ary = array(
+ 'SELECT' => 'u.user_id, u.username, u.username_clean, u.user_type, u.user_colour, s.session_id, s.session_time, s.session_page, s.session_ip, s.session_browser, s.session_viewonline, s.session_forum_id',
+ 'FROM' => array(
+ USERS_TABLE => 'u',
+ SESSIONS_TABLE => 's',
+ ),
+ 'WHERE' => 'u.user_id = s.session_user_id
AND s.session_time >= ' . (time() - ($config['load_online_time'] * 60)) .
- ((!$show_guests) ? ' AND s.session_user_id <> ' . ANONYMOUS : '') . '
- ORDER BY ' . $order_by;
-$result = $db->sql_query($sql);
+ ((!$show_guests) ? ' AND s.session_user_id <> ' . ANONYMOUS : ''),
+ 'ORDER_BY' => $order_by,
+);
+
+/**
+* Modify the SQL query for getting the user data to display viewonline list
+*
+* @event core.viewonline_modify_sql
+* @var array sql_ary The SQL array
+* @var bool show_guests Do we display guests in the list
+* @var int guest_counter Number of guests displayed
+* @var array forum_data Array with forum data
+* @since 3.1-A1
+* @change 3.1.0-a2 Added vars guest_counter and forum_data
+*/
+$vars = array('sql_ary', 'show_guests', 'guest_counter', 'forum_data');
+extract($phpbb_dispatcher->trigger_event('core.viewonline_modify_sql', compact($vars)));
+
+$result = $db->sql_query($db->sql_build_query('SELECT', $sql_ary));
$prev_id = $prev_ip = $user_list = array();
$logged_visible_online = $logged_hidden_online = $counter = 0;
@@ -200,7 +221,7 @@ while ($row = $db->sql_fetchrow($result))
$location_url = append_sid("{$phpbb_root_path}index.$phpEx");
break;
- case 'adm/index':
+ case $phpbb_adm_relative_path . 'index':
$location = $user->lang['ACP'];
$location_url = append_sid("{$phpbb_root_path}index.$phpEx");
break;
@@ -321,6 +342,21 @@ while ($row = $db->sql_fetchrow($result))
break;
}
+ /**
+ * Overwrite the location's name and URL, which are displayed in the list
+ *
+ * @event core.viewonline_overwrite_location
+ * @var array on_page File name and query string
+ * @var array row Array with the users sql row
+ * @var string location Page name to displayed in the list
+ * @var string location_url Page url to displayed in the list
+ * @var array forum_data Array with forum data
+ * @since 3.1-A1
+ * @change 3.1.0-a2 Added var forum_data
+ */
+ $vars = array('on_page', 'row', 'location', 'location_url', 'forum_data');
+ extract($phpbb_dispatcher->trigger_event('core.viewonline_overwrite_location', compact($vars)));
+
$template->assign_block_vars('user_row', array(
'USERNAME' => $row['username'],
'USERNAME_COLOUR' => $row['user_colour'],
@@ -343,45 +379,18 @@ while ($row = $db->sql_fetchrow($result))
$db->sql_freeresult($result);
unset($prev_id, $prev_ip);
-// Generate reg/hidden/guest online text
-$vars_online = array(
- 'REG' => array('logged_visible_online', 'l_r_user_s'),
- 'HIDDEN'=> array('logged_hidden_online', 'l_h_user_s'),
- 'GUEST' => array('guest_counter', 'l_g_user_s')
-);
-
-foreach ($vars_online as $l_prefix => $var_ary)
-{
- switch ($$var_ary[0])
- {
- case 0:
- $$var_ary[1] = $user->lang[$l_prefix . '_USERS_ZERO_ONLINE'];
- break;
-
- case 1:
- $$var_ary[1] = $user->lang[$l_prefix . '_USER_ONLINE'];
- break;
-
- default:
- $$var_ary[1] = $user->lang[$l_prefix . '_USERS_ONLINE'];
- break;
- }
-}
-unset($vars_online);
-
-$pagination = generate_pagination(append_sid("{$phpbb_root_path}viewonline.$phpEx", "sg=$show_guests&amp;sk=$sort_key&amp;sd=$sort_dir"), $counter, $config['topics_per_page'], $start);
-
+$order_legend = ($config['legend_sort_groupname']) ? 'group_name' : 'group_legend';
// Grab group details for legend display
if ($auth->acl_gets('a_group', 'a_groupadd', 'a_groupdel'))
{
- $sql = 'SELECT group_id, group_name, group_colour, group_type
+ $sql = 'SELECT group_id, group_name, group_colour, group_type, group_legend
FROM ' . GROUPS_TABLE . '
- WHERE group_legend = 1
- ORDER BY group_name ASC';
+ WHERE group_legend > 0
+ ORDER BY ' . $order_legend . ' ASC';
}
else
{
- $sql = 'SELECT g.group_id, g.group_name, g.group_colour, g.group_type
+ $sql = 'SELECT g.group_id, g.group_name, g.group_colour, g.group_type, g.group_legend
FROM ' . GROUPS_TABLE . ' g
LEFT JOIN ' . USER_GROUP_TABLE . ' ug
ON (
@@ -389,9 +398,9 @@ else
AND ug.user_id = ' . $user->data['user_id'] . '
AND ug.user_pending = 0
)
- WHERE g.group_legend = 1
+ WHERE g.group_legend > 0
AND (g.group_type <> ' . GROUP_HIDDEN . ' OR ug.user_id = ' . $user->data['user_id'] . ')
- ORDER BY g.group_name ASC';
+ ORDER BY g.' . $order_legend . ' ASC';
}
$result = $db->sql_query($sql);
@@ -412,13 +421,15 @@ $db->sql_freeresult($result);
// Refreshing the page every 60 seconds...
meta_refresh(60, append_sid("{$phpbb_root_path}viewonline.$phpEx", "sg=$show_guests&amp;sk=$sort_key&amp;sd=$sort_dir&amp;start=$start"));
+$start = $pagination->validate_start($start, $config['topics_per_page'], $counter);
+$base_url = append_sid("{$phpbb_root_path}viewonline.$phpEx", "sg=$show_guests&amp;sk=$sort_key&amp;sd=$sort_dir");
+$pagination->generate_template_pagination($base_url, 'pagination', 'start', $counter, $config['topics_per_page'], $start);
+
// Send data to template
$template->assign_vars(array(
- 'TOTAL_REGISTERED_USERS_ONLINE' => sprintf($l_r_user_s, $logged_visible_online) . sprintf($l_h_user_s, $logged_hidden_online),
- 'TOTAL_GUEST_USERS_ONLINE' => sprintf($l_g_user_s, $guest_counter),
+ 'TOTAL_REGISTERED_USERS_ONLINE' => $user->lang('REG_USERS_ONLINE', (int) $logged_visible_online, $user->lang('HIDDEN_USERS_ONLINE', (int) $logged_hidden_online)),
+ 'TOTAL_GUEST_USERS_ONLINE' => $user->lang('GUEST_USERS_ONLINE', (int) $guest_counter),
'LEGEND' => $legend,
- 'PAGINATION' => $pagination,
- 'PAGE_NUMBER' => on_page($counter, $config['topics_per_page'], $start),
'U_SORT_USERNAME' => append_sid("{$phpbb_root_path}viewonline.$phpEx", 'sk=a&amp;sd=' . (($sort_key == 'a' && $sort_dir == 'a') ? 'd' : 'a') . '&amp;sg=' . ((int) $show_guests)),
'U_SORT_UPDATED' => append_sid("{$phpbb_root_path}viewonline.$phpEx", 'sk=b&amp;sd=' . (($sort_key == 'b' && $sort_dir == 'a') ? 'd' : 'a') . '&amp;sg=' . ((int) $show_guests)),
@@ -441,5 +452,3 @@ $template->set_filenames(array(
make_jumpbox(append_sid("{$phpbb_root_path}viewforum.$phpEx"));
page_footer();
-
-?> \ No newline at end of file
diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php
index e08d6e1ef5..61a28940b1 100644
--- a/phpBB/viewtopic.php
+++ b/phpBB/viewtopic.php
@@ -2,9 +2,8 @@
/**
*
* @package phpBB3
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -44,6 +43,8 @@ $sort_dir = request_var('sd', $default_sort_dir);
$update = request_var('update', false);
+$pagination = $phpbb_container->get('pagination');
+
$s_can_vote = false;
/**
* @todo normalize?
@@ -56,6 +57,8 @@ if (!$topic_id && !$post_id)
trigger_error('NO_TOPIC');
}
+$phpbb_content_visibility = $phpbb_container->get('content.visibility');
+
// Find topic id if user requested a newer or older topic
if ($view && !$post_id)
{
@@ -78,13 +81,12 @@ if ($view && !$post_id)
{
// Get topic tracking info
$topic_tracking_info = get_complete_topic_tracking($forum_id, $topic_id);
-
$topic_last_read = (isset($topic_tracking_info[$topic_id])) ? $topic_tracking_info[$topic_id] : 0;
$sql = 'SELECT post_id, topic_id, forum_id
FROM ' . POSTS_TABLE . "
WHERE topic_id = $topic_id
- " . (($auth->acl_get('m_approve', $forum_id)) ? '' : 'AND post_approved = 1') . "
+ AND " . $phpbb_content_visibility->get_visibility_sql('post', $forum_id) . "
AND post_time > $topic_last_read
AND forum_id = $forum_id
ORDER BY post_time ASC";
@@ -138,7 +140,7 @@ if ($view && !$post_id)
WHERE forum_id = ' . $row['forum_id'] . "
AND topic_moved_id = 0
AND topic_last_post_time $sql_condition {$row['topic_last_post_time']}
- " . (($auth->acl_get('m_approve', $row['forum_id'])) ? '' : 'AND topic_approved = 1') . "
+ AND " . $phpbb_content_visibility->get_visibility_sql('topic', $row['forum_id']) . "
ORDER BY topic_last_post_time $sql_ordering";
$result = $db->sql_query_limit($sql, 1);
$row = $db->sql_fetchrow($result);
@@ -159,26 +161,12 @@ if ($view && !$post_id)
else
{
$topic_id = $row['topic_id'];
-
- // Check for global announcement correctness?
- if (!$row['forum_id'] && !$forum_id)
- {
- trigger_error('NO_TOPIC');
- }
- else if ($row['forum_id'])
- {
- $forum_id = $row['forum_id'];
- }
+ $forum_id = $row['forum_id'];
}
}
}
- // Check for global announcement correctness?
- if ((!isset($row) || !$row['forum_id']) && !$forum_id)
- {
- trigger_error('NO_TOPIC');
- }
- else if (isset($row) && $row['forum_id'])
+ if (isset($row) && $row['forum_id'])
{
$forum_id = $row['forum_id'];
}
@@ -193,17 +181,10 @@ $sql_array = array(
'FROM' => array(FORUMS_TABLE => 'f'),
);
-// Firebird handles two columns of the same name a little differently, this
-// addresses that by forcing the forum_id to come from the forums table.
-if ($db->sql_layer === 'firebird')
-{
- $sql_array['SELECT'] = 'f.forum_id AS forum_id, ' . $sql_array['SELECT'];
-}
-
// The FROM-Order is quite important here, else t.* columns can not be correctly bound.
if ($post_id)
{
- $sql_array['SELECT'] .= ', p.post_approved, p.post_time, p.post_id';
+ $sql_array['SELECT'] .= ', p.post_visibility, p.post_time, p.post_id';
$sql_array['FROM'][POSTS_TABLE] = 'p';
}
@@ -254,26 +235,8 @@ else
$sql_array['WHERE'] = "p.post_id = $post_id AND t.topic_id = p.topic_id";
}
-$sql_array['WHERE'] .= ' AND (f.forum_id = t.forum_id';
+$sql_array['WHERE'] .= ' AND f.forum_id = t.forum_id';
-if (!$forum_id)
-{
- // If it is a global announcement make sure to set the forum id to a postable forum
- $sql_array['WHERE'] .= ' OR (t.topic_type = ' . POST_GLOBAL . '
- AND f.forum_type = ' . FORUM_POST . ')';
-}
-else
-{
- $sql_array['WHERE'] .= ' OR (t.topic_type = ' . POST_GLOBAL . "
- AND f.forum_id = $forum_id)";
-}
-
-$sql_array['WHERE'] .= ')';
-
-// Join to forum table on topic forum_id unless topic forum_id is zero
-// whereupon we join on the forum_id passed as a parameter ... this
-// is done so navigation, forum name, etc. remain consistent with where
-// user clicked to view a global topic
$sql = $db->sql_build_query('SELECT', $sql_array);
$result = $db->sql_query($sql);
$topic_data = $db->sql_fetchrow($result);
@@ -292,11 +255,18 @@ if (!$topic_data)
}
$forum_id = (int) $topic_data['forum_id'];
+
+// Now we know the forum_id and can check the permissions
+if ($topic_data['topic_visibility'] != ITEM_APPROVED && !$auth->acl_get('m_approve', $forum_id))
+{
+ trigger_error('NO_TOPIC');
+}
+
// This is for determining where we are (page)
if ($post_id)
{
// are we where we are supposed to be?
- if (!$topic_data['post_approved'] && !$auth->acl_get('m_approve', $topic_data['forum_id']))
+ if ($topic_data['post_visibility'] == ITEM_UNAPPROVED && !$auth->acl_get('m_approve', $topic_data['forum_id']))
{
// If post_id was submitted, we try at least to display the topic as a last resort...
if ($topic_id)
@@ -312,7 +282,7 @@ if ($post_id)
if ($sort_dir == $check_sort)
{
- $topic_data['prev_posts'] = ($auth->acl_get('m_approve', $forum_id)) ? $topic_data['topic_replies_real'] : $topic_data['topic_replies'];
+ $topic_data['prev_posts'] = $phpbb_content_visibility->get_count('topic_posts', $topic_data, $forum_id) - 1;
}
else
{
@@ -324,7 +294,7 @@ if ($post_id)
$sql = 'SELECT COUNT(p.post_id) AS prev_posts
FROM ' . POSTS_TABLE . " p
WHERE p.topic_id = {$topic_data['topic_id']}
- " . ((!$auth->acl_get('m_approve', $forum_id)) ? 'AND p.post_approved = 1' : '');
+ AND " . $phpbb_content_visibility->get_visibility_sql('post', $forum_id, 'p.');
if ($sort_dir == 'd')
{
@@ -344,8 +314,7 @@ if ($post_id)
}
$topic_id = (int) $topic_data['topic_id'];
-//
-$topic_replies = ($auth->acl_get('m_approve', $forum_id)) ? $topic_data['topic_replies_real'] : $topic_data['topic_replies'];
+$topic_replies = $phpbb_content_visibility->get_count('topic_posts', $topic_data, $forum_id) - 1;
// Check sticky/announcement time limit
if (($topic_data['topic_type'] == POST_STICKY || $topic_data['topic_type'] == POST_ANNOUNCE) && $topic_data['topic_time_limit'] && ($topic_data['topic_time'] + $topic_data['topic_time_limit']) < time())
@@ -362,11 +331,6 @@ if (($topic_data['topic_type'] == POST_STICKY || $topic_data['topic_type'] == PO
// Setup look and feel
$user->setup('viewtopic', $topic_data['forum_style']);
-if (!$topic_data['topic_approved'] && !$auth->acl_get('m_approve', $forum_id))
-{
- trigger_error('NO_TOPIC');
-}
-
// Start auth check
if (!$auth->acl_get('f_read', $forum_id))
{
@@ -385,23 +349,10 @@ if ($topic_data['forum_password'])
login_forum_box($topic_data);
}
-// Redirect to login or to the correct post upon emailed notification links
-if (isset($_GET['e']))
+// Redirect to login upon emailed notification links if user is not logged in.
+if (isset($_GET['e']) && $user->data['user_id'] == ANONYMOUS)
{
- $jump_to = request_var('e', 0);
-
- $redirect_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&amp;t=$topic_id");
-
- if ($user->data['user_id'] == ANONYMOUS)
- {
- login_box($redirect_url . "&amp;p=$post_id&amp;e=$jump_to", $user->lang['LOGIN_NOTIFY_TOPIC']);
- }
-
- if ($jump_to > 0)
- {
- // We direct the already logged in user to the correct post...
- redirect($redirect_url . ((!$post_id) ? "&amp;p=$jump_to" : "&amp;p=$post_id") . "#p$jump_to");
- }
+ login_box(build_url('e') . '#unread', $user->lang['LOGIN_NOTIFY_TOPIC']);
}
// What is start equal to?
@@ -449,7 +400,7 @@ if ($sort_days)
FROM ' . POSTS_TABLE . "
WHERE topic_id = $topic_id
AND post_time >= $min_post_time
- " . (($auth->acl_get('m_approve', $forum_id)) ? '' : 'AND post_approved = 1');
+ AND " . $phpbb_content_visibility->get_visibility_sql('post', $forum_id);
$result = $db->sql_query($sql);
$total_posts = (int) $db->sql_fetchfield('num_posts');
$db->sql_freeresult($result);
@@ -485,10 +436,7 @@ if ($hilit_words)
}
// Make sure $start is set to the last page if it exceeds the amount
-if ($start < 0 || $start >= $total_posts)
-{
- $start = ($start < 0) ? 0 : floor(($total_posts - 1) / $config['posts_per_page']) * $config['posts_per_page'];
-}
+$start = $pagination->validate_start($start, $config['posts_per_page'], $total_posts);
// General Viewtopic URL for return links
$viewtopic_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&amp;t=$topic_id" . (($start == 0) ? '' : "&amp;start=$start") . ((strlen($u_sort_param)) ? "&amp;$u_sort_param" : '') . (($highlight_match) ? "&amp;hilit=$highlight" : ''));
@@ -496,7 +444,9 @@ $viewtopic_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&a
// Are we watching this topic?
$s_watching_topic = array(
'link' => '',
+ 'link_toggle' => '',
'title' => '',
+ 'title_toggle' => '',
'is_watching' => false,
);
@@ -533,11 +483,21 @@ if ($config['allow_bookmarks'] && $user->data['is_registered'] && request_var('b
AND topic_id = $topic_id";
$db->sql_query($sql);
}
- $message = (($topic_data['bookmarked']) ? $user->lang['BOOKMARK_REMOVED'] : $user->lang['BOOKMARK_ADDED']) . '<br /><br />' . sprintf($user->lang['RETURN_TOPIC'], '<a href="' . $viewtopic_url . '">', '</a>');
+ $message = (($topic_data['bookmarked']) ? $user->lang['BOOKMARK_REMOVED'] : $user->lang['BOOKMARK_ADDED']);
+
+ if (!$request->is_ajax())
+ {
+ $message .= '<br /><br />' . $user->lang('RETURN_TOPIC', '<a href="' . $viewtopic_url . '">', '</a>');
+ }
}
else
{
- $message = $user->lang['BOOKMARK_ERR'] . '<br /><br />' . sprintf($user->lang['RETURN_TOPIC'], '<a href="' . $viewtopic_url . '">', '</a>');
+ $message = $user->lang['BOOKMARK_ERR'];
+
+ if (!$request->is_ajax())
+ {
+ $message .= '<br /><br />' . $user->lang('RETURN_TOPIC', '<a href="' . $viewtopic_url . '">', '</a>');
+ }
}
meta_refresh(3, $viewtopic_url);
@@ -564,22 +524,32 @@ gen_forum_auth_level('topic', $forum_id, $topic_data['forum_status']);
// Quick mod tools
$allow_change_type = ($auth->acl_get('m_', $forum_id) || ($user->data['is_registered'] && $user->data['user_id'] == $topic_data['topic_poster'])) ? true : false;
-$topic_mod = '';
-$topic_mod .= ($auth->acl_get('m_lock', $forum_id) || ($auth->acl_get('f_user_lock', $forum_id) && $user->data['is_registered'] && $user->data['user_id'] == $topic_data['topic_poster'] && $topic_data['topic_status'] == ITEM_UNLOCKED)) ? (($topic_data['topic_status'] == ITEM_UNLOCKED) ? '<option value="lock">' . $user->lang['LOCK_TOPIC'] . '</option>' : '<option value="unlock">' . $user->lang['UNLOCK_TOPIC'] . '</option>') : '';
-$topic_mod .= ($auth->acl_get('m_delete', $forum_id)) ? '<option value="delete_topic">' . $user->lang['DELETE_TOPIC'] . '</option>' : '';
-$topic_mod .= ($auth->acl_get('m_move', $forum_id) && $topic_data['topic_status'] != ITEM_MOVED) ? '<option value="move">' . $user->lang['MOVE_TOPIC'] . '</option>' : '';
-$topic_mod .= ($auth->acl_get('m_split', $forum_id)) ? '<option value="split">' . $user->lang['SPLIT_TOPIC'] . '</option>' : '';
-$topic_mod .= ($auth->acl_get('m_merge', $forum_id)) ? '<option value="merge">' . $user->lang['MERGE_POSTS'] . '</option>' : '';
-$topic_mod .= ($auth->acl_get('m_merge', $forum_id)) ? '<option value="merge_topic">' . $user->lang['MERGE_TOPIC'] . '</option>' : '';
-$topic_mod .= ($auth->acl_get('m_move', $forum_id)) ? '<option value="fork">' . $user->lang['FORK_TOPIC'] . '</option>' : '';
-$topic_mod .= ($allow_change_type && $auth->acl_gets('f_sticky', 'f_announce', $forum_id) && $topic_data['topic_type'] != POST_NORMAL) ? '<option value="make_normal">' . $user->lang['MAKE_NORMAL'] . '</option>' : '';
-$topic_mod .= ($allow_change_type && $auth->acl_get('f_sticky', $forum_id) && $topic_data['topic_type'] != POST_STICKY) ? '<option value="make_sticky">' . $user->lang['MAKE_STICKY'] . '</option>' : '';
-$topic_mod .= ($allow_change_type && $auth->acl_get('f_announce', $forum_id) && $topic_data['topic_type'] != POST_ANNOUNCE) ? '<option value="make_announce">' . $user->lang['MAKE_ANNOUNCE'] . '</option>' : '';
-$topic_mod .= ($allow_change_type && $auth->acl_get('f_announce', $forum_id) && $topic_data['topic_type'] != POST_GLOBAL) ? '<option value="make_global">' . $user->lang['MAKE_GLOBAL'] . '</option>' : '';
-$topic_mod .= ($auth->acl_get('m_', $forum_id)) ? '<option value="topic_logs">' . $user->lang['VIEW_TOPIC_LOGS'] . '</option>' : '';
+$quickmod_array = array(
+// 'key' => array('LANG_KEY', $userHasPermissions),
+
+ 'lock' => array('LOCK_TOPIC', ($topic_data['topic_status'] == ITEM_UNLOCKED) && ($auth->acl_get('m_lock', $forum_id) || ($auth->acl_get('f_user_lock', $forum_id) && $user->data['is_registered'] && $user->data['user_id'] == $topic_data['topic_poster'] && $topic_data['topic_status'] == ITEM_UNLOCKED))),
+ 'unlock' => array('UNLOCK_TOPIC', ($topic_data['topic_status'] != ITEM_UNLOCKED) && ($auth->acl_get('m_lock', $forum_id) || ($auth->acl_get('f_user_lock', $forum_id) && $user->data['is_registered'] && $user->data['user_id'] == $topic_data['topic_poster'] && $topic_data['topic_status'] == ITEM_UNLOCKED))),
+ 'delete_topic' => array('DELETE_TOPIC', ($auth->acl_get('m_delete', $forum_id) || (($topic_data['topic_visibility'] != ITEM_DELETED) && $auth->acl_get('m_softdelete', $forum_id)))),
+ 'restore_topic' => array('RESTORE_TOPIC', (($topic_data['topic_visibility'] == ITEM_DELETED) && $auth->acl_get('m_approve', $forum_id))),
+ 'move' => array('MOVE_TOPIC', $auth->acl_get('m_move', $forum_id) && $topic_data['topic_status'] != ITEM_MOVED),
+ 'split' => array('SPLIT_TOPIC', $auth->acl_get('m_split', $forum_id)),
+ 'merge' => array('MERGE_POSTS', $auth->acl_get('m_merge', $forum_id)),
+ 'merge_topic' => array('MERGE_TOPIC', $auth->acl_get('m_merge', $forum_id)),
+ 'fork' => array('FORK_TOPIC', $auth->acl_get('m_move', $forum_id)),
+ 'make_normal' => array('MAKE_NORMAL', ($allow_change_type && $auth->acl_gets('f_sticky', 'f_announce', $forum_id) && $topic_data['topic_type'] != POST_NORMAL)),
+ 'make_sticky' => array('MAKE_STICKY', ($allow_change_type && $auth->acl_get('f_sticky', $forum_id) && $topic_data['topic_type'] != POST_STICKY)),
+ 'make_announce' => array('MAKE_ANNOUNCE', ($allow_change_type && $auth->acl_get('f_announce', $forum_id) && $topic_data['topic_type'] != POST_ANNOUNCE)),
+ 'make_global' => array('MAKE_GLOBAL', ($allow_change_type && $auth->acl_get('f_announce', $forum_id) && $topic_data['topic_type'] != POST_GLOBAL)),
+ 'topic_logs' => array('VIEW_TOPIC_LOGS', $auth->acl_get('m_', $forum_id)),
+);
-// If we've got a hightlight set pass it on to pagination.
-$pagination = generate_pagination(append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&amp;t=$topic_id" . ((strlen($u_sort_param)) ? "&amp;$u_sort_param" : '') . (($highlight_match) ? "&amp;hilit=$highlight" : '')), $total_posts, $config['posts_per_page'], $start);
+foreach($quickmod_array as $option => $qm_ary)
+{
+ if (!empty($qm_ary[1]))
+ {
+ phpbb_add_quickmod_option($option, $qm_ary[0]);
+ }
+}
// Navigation links
generate_forum_nav($topic_data);
@@ -618,6 +588,10 @@ if (!empty($_EXTRA_URL))
}
}
+// If we've got a hightlight set pass it on to pagination.
+$base_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&amp;t=$topic_id" . ((strlen($u_sort_param)) ? "&amp;$u_sort_param" : '') . (($highlight_match) ? "&amp;hilit=$highlight" : ''));
+$pagination->generate_template_pagination($base_url, 'pagination', 'start', $total_posts, $config['posts_per_page'], $start);
+
// Send vars to template
$template->assign_vars(array(
'FORUM_ID' => $forum_id,
@@ -631,27 +605,21 @@ $template->assign_vars(array(
'TOPIC_AUTHOR_COLOUR' => get_username_string('colour', $topic_data['topic_poster'], $topic_data['topic_first_poster_name'], $topic_data['topic_first_poster_colour']),
'TOPIC_AUTHOR' => get_username_string('username', $topic_data['topic_poster'], $topic_data['topic_first_poster_name'], $topic_data['topic_first_poster_colour']),
- 'PAGINATION' => $pagination,
- 'PAGE_NUMBER' => on_page($total_posts, $config['posts_per_page'], $start),
- 'TOTAL_POSTS' => ($total_posts == 1) ? $user->lang['VIEW_TOPIC_POST'] : sprintf($user->lang['VIEW_TOPIC_POSTS'], $total_posts),
+ 'TOTAL_POSTS' => $user->lang('VIEW_TOPIC_POSTS', (int) $total_posts),
'U_MCP' => ($auth->acl_get('m_', $forum_id)) ? append_sid("{$phpbb_root_path}mcp.$phpEx", "i=main&amp;mode=topic_view&amp;f=$forum_id&amp;t=$topic_id" . (($start == 0) ? '' : "&amp;start=$start") . ((strlen($u_sort_param)) ? "&amp;$u_sort_param" : ''), true, $user->session_id) : '',
- 'MODERATORS' => (isset($forum_moderators[$forum_id]) && sizeof($forum_moderators[$forum_id])) ? implode(', ', $forum_moderators[$forum_id]) : '',
+ 'MODERATORS' => (isset($forum_moderators[$forum_id]) && sizeof($forum_moderators[$forum_id])) ? implode($user->lang['COMMA_SEPARATOR'], $forum_moderators[$forum_id]) : '',
'POST_IMG' => ($topic_data['forum_status'] == ITEM_LOCKED) ? $user->img('button_topic_locked', 'FORUM_LOCKED') : $user->img('button_topic_new', 'POST_NEW_TOPIC'),
'QUOTE_IMG' => $user->img('icon_post_quote', 'REPLY_WITH_QUOTE'),
'REPLY_IMG' => ($topic_data['forum_status'] == ITEM_LOCKED || $topic_data['topic_status'] == ITEM_LOCKED) ? $user->img('button_topic_locked', 'TOPIC_LOCKED') : $user->img('button_topic_reply', 'REPLY_TO_TOPIC'),
'EDIT_IMG' => $user->img('icon_post_edit', 'EDIT_POST'),
'DELETE_IMG' => $user->img('icon_post_delete', 'DELETE_POST'),
+ 'DELETED_IMG' => $user->img('icon_topic_deleted', 'POST_DELETED_RESTORE'),
'INFO_IMG' => $user->img('icon_post_info', 'VIEW_INFO'),
'PROFILE_IMG' => $user->img('icon_user_profile', 'READ_PROFILE'),
'SEARCH_IMG' => $user->img('icon_user_search', 'SEARCH_USER_POSTS'),
'PM_IMG' => $user->img('icon_contact_pm', 'SEND_PRIVATE_MESSAGE'),
'EMAIL_IMG' => $user->img('icon_contact_email', 'SEND_EMAIL'),
- 'WWW_IMG' => $user->img('icon_contact_www', 'VISIT_WEBSITE'),
- 'ICQ_IMG' => $user->img('icon_contact_icq', 'ICQ'),
- 'AIM_IMG' => $user->img('icon_contact_aim', 'AIM'),
- 'MSN_IMG' => $user->img('icon_contact_msnm', 'MSNM'),
- 'YIM_IMG' => $user->img('icon_contact_yahoo', 'YIM'),
'JABBER_IMG' => $user->img('icon_contact_jabber', 'JABBER') ,
'REPORT_IMG' => $user->img('icon_post_report', 'REPORT_POST'),
'REPORTED_IMG' => $user->img('icon_topic_reported', 'POST_REPORTED'),
@@ -664,9 +632,9 @@ $template->assign_vars(array(
'S_SELECT_SORT_DAYS' => $s_limit_days,
'S_SINGLE_MODERATOR' => (!empty($forum_moderators[$forum_id]) && sizeof($forum_moderators[$forum_id]) > 1) ? false : true,
'S_TOPIC_ACTION' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&amp;t=$topic_id" . (($start == 0) ? '' : "&amp;start=$start")),
- 'S_TOPIC_MOD' => ($topic_mod != '') ? '<select name="action" id="quick-mod-select">' . $topic_mod . '</select>' : '',
'S_MOD_ACTION' => append_sid("{$phpbb_root_path}mcp.$phpEx", "f=$forum_id&amp;t=$topic_id" . (($start == 0) ? '' : "&amp;start=$start") . "&amp;quickmod=1&amp;redirect=" . urlencode(str_replace('&amp;', '&', $viewtopic_url)), true, $user->session_id),
+ 'L_RETURN_TO_FORUM' => $user->lang('RETURN_TO', $topic_data['forum_name']),
'S_VIEWTOPIC' => true,
'S_DISPLAY_SEARCHBOX' => ($auth->acl_get('u_search') && $auth->acl_get('f_search', $forum_id) && $config['load_search']) ? true : false,
'S_SEARCHBOX_ACTION' => append_sid("{$phpbb_root_path}search.$phpEx"),
@@ -685,12 +653,16 @@ $template->assign_vars(array(
'U_PRINT_TOPIC' => ($auth->acl_get('f_print', $forum_id)) ? $viewtopic_url . '&amp;view=print' : '',
'U_EMAIL_TOPIC' => ($auth->acl_get('f_email', $forum_id) && $config['email_enable']) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", "mode=email&amp;t=$topic_id") : '',
- 'U_WATCH_TOPIC' => $s_watching_topic['link'],
- 'L_WATCH_TOPIC' => $s_watching_topic['title'],
+ 'U_WATCH_TOPIC' => $s_watching_topic['link'],
+ 'U_WATCH_TOPIC_TOGGLE' => $s_watching_topic['link_toggle'],
+ 'S_WATCH_TOPIC_TITLE' => $s_watching_topic['title'],
+ 'S_WATCH_TOPIC_TOGGLE' => $s_watching_topic['title_toggle'],
'S_WATCHING_TOPIC' => $s_watching_topic['is_watching'],
'U_BOOKMARK_TOPIC' => ($user->data['is_registered'] && $config['allow_bookmarks']) ? $viewtopic_url . '&amp;bookmark=1&amp;hash=' . generate_link_hash("topic_$topic_id") : '',
- 'L_BOOKMARK_TOPIC' => ($user->data['is_registered'] && $config['allow_bookmarks'] && $topic_data['bookmarked']) ? $user->lang['BOOKMARK_TOPIC_REMOVE'] : $user->lang['BOOKMARK_TOPIC'],
+ 'S_BOOKMARK_TOPIC' => ($user->data['is_registered'] && $config['allow_bookmarks'] && $topic_data['bookmarked']) ? $user->lang['BOOKMARK_TOPIC_REMOVE'] : $user->lang['BOOKMARK_TOPIC'],
+ 'S_BOOKMARK_TOGGLE' => (!$user->data['is_registered'] || !$config['allow_bookmarks'] || !$topic_data['bookmarked']) ? $user->lang['BOOKMARK_TOPIC_REMOVE'] : $user->lang['BOOKMARK_TOPIC'],
+ 'S_BOOKMARKED_TOPIC' => ($user->data['is_registered'] && $config['allow_bookmarks'] && $topic_data['bookmarked']) ? true : false,
'U_POST_NEW_TOPIC' => ($auth->acl_get('f_post', $forum_id) || $user->data['user_id'] == ANONYMOUS) ? append_sid("{$phpbb_root_path}posting.$phpEx", "mode=post&amp;f=$forum_id") : '',
'U_POST_REPLY_TOPIC' => ($auth->acl_get('f_reply', $forum_id) || $user->data['user_id'] == ANONYMOUS) ? append_sid("{$phpbb_root_path}posting.$phpEx", "mode=reply&amp;f=$forum_id&amp;t=$topic_id") : '',
@@ -708,10 +680,12 @@ if (!empty($topic_data['poll_start']))
ORDER BY o.poll_option_id";
$result = $db->sql_query($sql);
- $poll_info = array();
+ $poll_info = $vote_counts = array();
while ($row = $db->sql_fetchrow($result))
{
$poll_info[] = $row;
+ $option_id = (int) $row['poll_option_id'];
+ $vote_counts[$option_id] = (int) $row['poll_option_total'];
}
$db->sql_freeresult($result);
@@ -735,9 +709,9 @@ if (!empty($topic_data['poll_start']))
// Cookie based guest tracking ... I don't like this but hum ho
// it's oft requested. This relies on "nice" users who don't feel
// the need to delete cookies to mess with results.
- if (isset($_COOKIE[$config['cookie_name'] . '_poll_' . $topic_id]))
+ if ($request->is_set($config['cookie_name'] . '_poll_' . $topic_id, \phpbb\request\request_interface::COOKIE))
{
- $cur_voted_id = explode(',', $_COOKIE[$config['cookie_name'] . '_poll_' . $topic_id]);
+ $cur_voted_id = explode(',', $request->variable($config['cookie_name'] . '_poll_' . $topic_id, '', true, \phpbb\request\request_interface::COOKIE));
$cur_voted_id = array_map('intval', $cur_voted_id);
}
}
@@ -793,6 +767,8 @@ if (!empty($topic_data['poll_start']))
AND topic_id = ' . (int) $topic_id;
$db->sql_query($sql);
+ $vote_counts[$option]++;
+
if ($user->data['is_registered'])
{
$sql_ary = array(
@@ -817,6 +793,8 @@ if (!empty($topic_data['poll_start']))
AND topic_id = ' . (int) $topic_id;
$db->sql_query($sql);
+ $vote_counts[$option]--;
+
if ($user->data['is_registered'])
{
$sql = 'DELETE FROM ' . POLL_VOTES_TABLE . '
@@ -840,9 +818,27 @@ if (!empty($topic_data['poll_start']))
$db->sql_query($sql);
$redirect_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&amp;t=$topic_id" . (($start == 0) ? '' : "&amp;start=$start"));
+ $message = $user->lang['VOTE_SUBMITTED'] . '<br /><br />' . sprintf($user->lang['RETURN_TOPIC'], '<a href="' . $redirect_url . '">', '</a>');
+
+ if ($request->is_ajax())
+ {
+ // Filter out invalid options
+ $valid_user_votes = array_intersect(array_keys($vote_counts), $voted_id);
+
+ $data = array(
+ 'NO_VOTES' => $user->lang['NO_VOTES'],
+ 'success' => true,
+ 'user_votes' => array_flip($valid_user_votes),
+ 'vote_counts' => $vote_counts,
+ 'total_votes' => array_sum($vote_counts),
+ 'can_vote' => !sizeof($valid_user_votes) || ($auth->acl_get('f_votechg', $forum_id) && $topic_data['poll_vote_change']),
+ );
+ $json_response = new \phpbb\json_response();
+ $json_response->send($data);
+ }
meta_refresh(5, $redirect_url);
- trigger_error($user->lang['VOTE_SUBMITTED'] . '<br /><br />' . sprintf($user->lang['RETURN_TOPIC'], '<a href="' . $redirect_url . '">', '</a>'));
+ trigger_error($message);
}
$poll_total = 0;
@@ -851,39 +847,14 @@ if (!empty($topic_data['poll_start']))
$poll_total += $poll_option['poll_option_total'];
}
- if ($poll_info[0]['bbcode_bitfield'])
- {
- $poll_bbcode = new bbcode();
- }
- else
- {
- $poll_bbcode = false;
- }
+ $parse_flags = ($poll_info[0]['bbcode_bitfield'] ? OPTION_FLAG_BBCODE : 0) | OPTION_FLAG_SMILIES;
for ($i = 0, $size = sizeof($poll_info); $i < $size; $i++)
{
- $poll_info[$i]['poll_option_text'] = censor_text($poll_info[$i]['poll_option_text']);
-
- if ($poll_bbcode !== false)
- {
- $poll_bbcode->bbcode_second_pass($poll_info[$i]['poll_option_text'], $poll_info[$i]['bbcode_uid'], $poll_option['bbcode_bitfield']);
- }
-
- $poll_info[$i]['poll_option_text'] = bbcode_nl2br($poll_info[$i]['poll_option_text']);
- $poll_info[$i]['poll_option_text'] = smiley_text($poll_info[$i]['poll_option_text']);
+ $poll_info[$i]['poll_option_text'] = generate_text_for_display($poll_info[$i]['poll_option_text'], $poll_info[$i]['bbcode_uid'], $poll_option['bbcode_bitfield'], $parse_flags, true);
}
- $topic_data['poll_title'] = censor_text($topic_data['poll_title']);
-
- if ($poll_bbcode !== false)
- {
- $poll_bbcode->bbcode_second_pass($topic_data['poll_title'], $poll_info[0]['bbcode_uid'], $poll_info[0]['bbcode_bitfield']);
- }
-
- $topic_data['poll_title'] = bbcode_nl2br($topic_data['poll_title']);
- $topic_data['poll_title'] = smiley_text($topic_data['poll_title']);
-
- unset($poll_bbcode);
+ $topic_data['poll_title'] = generate_text_for_display($topic_data['poll_title'], $poll_info[0]['bbcode_uid'], $poll_info[0]['bbcode_bitfield'], $parse_flags, true);
foreach ($poll_info as $poll_option)
{
@@ -896,7 +867,7 @@ if (!empty($topic_data['poll_start']))
'POLL_OPTION_RESULT' => $poll_option['poll_option_total'],
'POLL_OPTION_PERCENT' => $option_pct_txt,
'POLL_OPTION_PCT' => round($option_pct * 100),
- 'POLL_OPTION_IMG' => $user->img('poll_center', $option_pct_txt, round($option_pct * 250)),
+ 'POLL_OPTION_WIDTH' => round($option_pct * 250),
'POLL_OPTION_VOTED' => (in_array($poll_option['poll_option_id'], $cur_voted_id)) ? true : false)
);
}
@@ -909,7 +880,7 @@ if (!empty($topic_data['poll_start']))
'POLL_LEFT_CAP_IMG' => $user->img('poll_left'),
'POLL_RIGHT_CAP_IMG'=> $user->img('poll_right'),
- 'L_MAX_VOTES' => ($topic_data['poll_max_options'] == 1) ? $user->lang['MAX_OPTION_SELECT'] : sprintf($user->lang['MAX_OPTIONS_SELECT'], $topic_data['poll_max_options']),
+ 'L_MAX_VOTES' => $user->lang('MAX_OPTIONS_SELECT', (int) $topic_data['poll_max_options']),
'L_POLL_LENGTH' => ($topic_data['poll_length']) ? sprintf($user->lang[($poll_end > time()) ? 'POLL_RUN_TILL' : 'POLL_ENDED_AT'], $user->format_date($poll_end)) : '',
'S_HAS_POLL' => true,
@@ -933,14 +904,11 @@ if ($start > $total_posts / 2)
{
$store_reverse = true;
- if ($start + $config['posts_per_page'] > $total_posts)
- {
- $sql_limit = min($config['posts_per_page'], max(1, $total_posts - $start));
- }
-
// Select the sort order
$direction = (($sort_dir == 'd') ? 'ASC' : 'DESC');
- $sql_start = max(0, $total_posts - $sql_limit - $start);
+
+ $sql_limit = $pagination->reverse_limit($start, $sql_limit, $total_posts);
+ $sql_start = $pagination->reverse_start($start, $sql_limit, $total_posts);
}
else
{
@@ -959,7 +927,7 @@ else
}
// Container for user details, only process once
-$post_list = $user_cache = $id_cache = $attachments = $attach_list = $rowset = $update_count = $post_edit_list = array();
+$post_list = $user_cache = $id_cache = $attachments = $attach_list = $rowset = $update_count = $post_edit_list = $post_delete_list = array();
$has_attachments = $display_notice = false;
$bbcode_bitfield = '';
$i = $i_total = 0;
@@ -968,7 +936,7 @@ $i = $i_total = 0;
$sql = 'SELECT p.post_id
FROM ' . POSTS_TABLE . ' p' . (($join_user_sql[$sort_key]) ? ', ' . USERS_TABLE . ' u': '') . "
WHERE p.topic_id = $topic_id
- " . ((!$auth->acl_get('m_approve', $forum_id)) ? 'AND p.post_approved = 1' : '') . "
+ AND " . $phpbb_content_visibility->get_visibility_sql('post', $forum_id, 'p.') . "
" . (($join_user_sql[$sort_key]) ? 'AND u.user_id = p.poster_id': '') . "
$limit_posts_time
ORDER BY $sql_sort_order";
@@ -998,7 +966,7 @@ if (!sizeof($post_list))
// We need to grab it because we do reverse ordering sometimes
$max_post_time = 0;
-$sql = $db->sql_build_query('SELECT', array(
+$sql_ary = array(
'SELECT' => 'u.*, z.friend, z.foe, p.*',
'FROM' => array(
@@ -1009,17 +977,38 @@ $sql = $db->sql_build_query('SELECT', array(
'LEFT_JOIN' => array(
array(
'FROM' => array(ZEBRA_TABLE => 'z'),
- 'ON' => 'z.user_id = ' . $user->data['user_id'] . ' AND z.zebra_id = p.poster_id'
- )
+ 'ON' => 'z.user_id = ' . $user->data['user_id'] . ' AND z.zebra_id = p.poster_id',
+ ),
),
'WHERE' => $db->sql_in_set('p.post_id', $post_list) . '
- AND u.user_id = p.poster_id'
-));
+ AND u.user_id = p.poster_id',
+);
+
+/**
+* Event to modify the SQL query before the post and poster data is retrieved
+*
+* @event core.viewtopic_get_post_data
+* @var int forum_id Forum ID
+* @var int topic_id Topic ID
+* @var array topic_data Array with topic data
+* @var array post_list Array with post_ids we are going to retrieve
+* @var int sort_days Display posts of previous x days
+* @var string sort_key Key the posts are sorted by
+* @var string sort_dir Direction the posts are sorted by
+* @var int start Pagination information
+* @var array sql_ary The SQL array to get the data of posts and posters
+* @since 3.1-A1
+* @change 3.1.0-a2 Added vars forum_id, topic_id, topic_data, post_list, sort_days, sort_key, sort_dir, start
+*/
+$vars = array('forum_id', 'topic_id', 'topic_data', 'post_list', 'sort_days', 'sort_key', 'sort_dir', 'start', 'sql_ary');
+extract($phpbb_dispatcher->trigger_event('core.viewtopic_get_post_data', compact($vars)));
+$sql = $db->sql_build_query('SELECT', $sql_ary);
$result = $db->sql_query($sql);
-$now = phpbb_gmgetdate(time() + $user->timezone + $user->dst);
+$now = $user->create_datetime();
+$now = phpbb_gmgetdate($now->getTimestamp() + $now->getOffset());
// Posts are stored in the $rowset array while $attach_list, $user_cache
// and the global bbcode_bitfield are built
@@ -1038,14 +1027,14 @@ while ($row = $db->sql_fetchrow($result))
{
$attach_list[] = (int) $row['post_id'];
- if ($row['post_approved'])
+ if ($row['post_visibility'] == ITEM_UNAPPROVED)
{
$has_attachments = true;
}
}
- $rowset[$row['post_id']] = array(
- 'hide_post' => ($row['foe'] && ($view != 'show' || $post_id != $row['post_id'])) ? true : false,
+ $rowset_data = array(
+ 'hide_post' => (($row['foe'] || $row['post_visibility'] == ITEM_DELETED) && ($view != 'show' || $post_id != $row['post_id'])) ? true : false,
'post_id' => $row['post_id'],
'post_time' => $row['post_time'],
@@ -1060,11 +1049,14 @@ while ($row = $db->sql_fetchrow($result))
'post_edit_reason' => $row['post_edit_reason'],
'post_edit_user' => $row['post_edit_user'],
'post_edit_locked' => $row['post_edit_locked'],
+ 'post_delete_time' => $row['post_delete_time'],
+ 'post_delete_reason'=> $row['post_delete_reason'],
+ 'post_delete_user' => $row['post_delete_user'],
// Make sure the icon actually exists
'icon_id' => (isset($icons[$row['icon_id']]['img'], $icons[$row['icon_id']]['height'], $icons[$row['icon_id']]['width'])) ? $row['icon_id'] : 0,
'post_attachment' => $row['post_attachment'],
- 'post_approved' => $row['post_approved'],
+ 'post_visibility' => $row['post_visibility'],
'post_reported' => $row['post_reported'],
'post_username' => $row['post_username'],
'post_text' => $row['post_text'],
@@ -1076,6 +1068,19 @@ while ($row = $db->sql_fetchrow($result))
'foe' => $row['foe'],
);
+ /**
+ * Modify the post rowset containing data to be displayed with posts
+ *
+ * @event core.viewtopic_post_rowset_data
+ * @var array rowset_data Array with the rowset data for this post
+ * @var array row Array with original user and post data
+ * @since 3.1-A1
+ */
+ $vars = array('rowset_data', 'row');
+ extract($phpbb_dispatcher->trigger_event('core.viewtopic_post_rowset_data', compact($vars)));
+
+ $rowset[$row['post_id']] = $rowset_data;
+
// Define the global bbcode bitfield, will be used to load bbcodes
$bbcode_bitfield = $bbcode_bitfield | base64_decode($row['bbcode_bitfield']);
@@ -1091,17 +1096,16 @@ while ($row = $db->sql_fetchrow($result))
{
if ($poster_id == ANONYMOUS)
{
- $user_cache[$poster_id] = array(
+ $user_cache_data = array(
'joined' => '',
'posts' => '',
- 'from' => '',
'sig' => '',
'sig_bbcode_uid' => '',
'sig_bbcode_bitfield' => '',
'online' => false,
- 'avatar' => ($user->optionget('viewavatars')) ? get_user_avatar($row['user_avatar'], $row['user_avatar_type'], $row['user_avatar_width'], $row['user_avatar_height']) : '',
+ 'avatar' => ($user->optionget('viewavatars')) ? phpbb_get_user_avatar($row) : '',
'rank_title' => '',
'rank_image' => '',
'rank_image_src' => '',
@@ -1109,12 +1113,6 @@ while ($row = $db->sql_fetchrow($result))
'profile' => '',
'pm' => '',
'email' => '',
- 'www' => '',
- 'icq_status_img' => '',
- 'icq' => '',
- 'aim' => '',
- 'msn' => '',
- 'yim' => '',
'jabber' => '',
'search' => '',
'age' => '',
@@ -1126,13 +1124,27 @@ while ($row = $db->sql_fetchrow($result))
'allow_pm' => 0,
);
+ /**
+ * Modify the guest user's data displayed with the posts
+ *
+ * @event core.viewtopic_cache_guest_data
+ * @var array user_cache_data Array with the user's data
+ * @var int poster_id Poster's user id
+ * @var array row Array with original user and post data
+ * @since 3.1-A1
+ */
+ $vars = array('user_cache_data', 'poster_id', 'row');
+ extract($phpbb_dispatcher->trigger_event('core.viewtopic_cache_guest_data', compact($vars)));
+
+ $user_cache[$poster_id] = $user_cache_data;
+
get_user_rank($row['user_rank'], false, $user_cache[$poster_id]['rank_title'], $user_cache[$poster_id]['rank_image'], $user_cache[$poster_id]['rank_image_src']);
}
else
{
$user_sig = '';
- // We add the signature to every posters entry because enable_sig is post dependant
+ // We add the signature to every posters entry because enable_sig is post dependent
if ($row['user_sig'] && $config['allow_sig'] && $user->optionget('viewsigs'))
{
$user_sig = $row['user_sig'];
@@ -1140,11 +1152,10 @@ while ($row = $db->sql_fetchrow($result))
$id_cache[] = $poster_id;
- $user_cache[$poster_id] = array(
+ $user_cache_data = array(
'joined' => $user->format_date($row['user_regdate']),
'posts' => $row['user_posts'],
'warnings' => (isset($row['user_warnings'])) ? $row['user_warnings'] : 0,
- 'from' => (!empty($row['user_from'])) ? $row['user_from'] : '',
'sig' => $user_sig,
'sig_bbcode_uid' => (!empty($row['user_sig_bbcode_uid'])) ? $row['user_sig_bbcode_uid'] : '',
@@ -1153,7 +1164,7 @@ while ($row = $db->sql_fetchrow($result))
'viewonline' => $row['user_allow_viewonline'],
'allow_pm' => $row['user_allow_pm'],
- 'avatar' => ($user->optionget('viewavatars')) ? get_user_avatar($row['user_avatar'], $row['user_avatar_type'], $row['user_avatar_width'], $row['user_avatar_height']) : '',
+ 'avatar' => ($user->optionget('viewavatars')) ? phpbb_get_user_avatar($row) : '',
'age' => '',
'rank_title' => '',
@@ -1165,10 +1176,6 @@ while ($row = $db->sql_fetchrow($result))
'online' => false,
'profile' => append_sid("{$phpbb_root_path}memberlist.$phpEx", "mode=viewprofile&amp;u=$poster_id"),
- 'www' => $row['user_website'],
- 'aim' => ($row['user_aim'] && $auth->acl_get('u_sendim')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", "mode=contact&amp;action=aim&amp;u=$poster_id") : '',
- 'msn' => ($row['user_msnm'] && $auth->acl_get('u_sendim')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", "mode=contact&amp;action=msnm&amp;u=$poster_id") : '',
- 'yim' => ($row['user_yim']) ? 'http://edit.yahoo.com/config/send_webmesg?.target=' . urlencode($row['user_yim']) . '&amp;.src=pg' : '',
'jabber' => ($row['user_jabber'] && $auth->acl_get('u_sendim')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", "mode=contact&amp;action=jabber&amp;u=$poster_id") : '',
'search' => ($auth->acl_get('u_search')) ? append_sid("{$phpbb_root_path}search.$phpEx", "author_id=$poster_id&amp;sr=posts") : '',
@@ -1178,6 +1185,20 @@ while ($row = $db->sql_fetchrow($result))
'author_profile' => get_username_string('profile', $poster_id, $row['username'], $row['user_colour']),
);
+ /**
+ * Modify the users' data displayed with their posts
+ *
+ * @event core.viewtopic_cache_user_data
+ * @var array user_cache_data Array with the user's data
+ * @var int poster_id Poster's user id
+ * @var array row Array with original user and post data
+ * @since 3.1-A1
+ */
+ $vars = array('user_cache_data', 'poster_id', 'row');
+ extract($phpbb_dispatcher->trigger_event('core.viewtopic_cache_user_data', compact($vars)));
+
+ $user_cache[$poster_id] = $user_cache_data;
+
get_user_rank($row['user_rank'], $row['user_posts'], $user_cache[$poster_id]['rank_title'], $user_cache[$poster_id]['rank_image'], $user_cache[$poster_id]['rank_image_src']);
if ((!empty($row['user_allow_viewemail']) && $auth->acl_get('u_sendemail')) || $auth->acl_get('a_email'))
@@ -1189,17 +1210,6 @@ while ($row = $db->sql_fetchrow($result))
$user_cache[$poster_id]['email'] = '';
}
- if (!empty($row['user_icq']))
- {
- $user_cache[$poster_id]['icq'] = 'http://www.icq.com/people/' . urlencode($row['user_icq']) . '/';
- $user_cache[$poster_id]['icq_status_img'] = '<img src="http://web.icq.com/whitepages/online?icq=' . $row['user_icq'] . '&amp;img=5" width="18" height="18" alt="" />';
- }
- else
- {
- $user_cache[$poster_id]['icq_status_img'] = '';
- $user_cache[$poster_id]['icq'] = '';
- }
-
if ($config['allow_birthdays'] && !empty($row['user_birthday']))
{
list($bday_day, $bday_month, $bday_year) = array_map('intval', explode('-', $row['user_birthday']));
@@ -1227,14 +1237,10 @@ $db->sql_freeresult($result);
// Load custom profile fields
if ($config['load_cpf_viewtopic'])
{
- if (!class_exists('custom_profile'))
- {
- include($phpbb_root_path . 'includes/functions_profile_fields.' . $phpEx);
- }
- $cp = new custom_profile();
+ $cp = $phpbb_container->get('profilefields.manager');
// Grab all profile fields from users in id cache for later use - similar to the poster cache
- $profile_fields_tmp = $cp->generate_profile_fields_template('grab', $id_cache);
+ $profile_fields_tmp = $cp->grab_profile_fields_data($id_cache);
// filter out fields not to be displayed on viewtopic. Yes, it's a hack, but this shouldn't break any MODs.
$profile_fields_cache = array();
@@ -1303,8 +1309,8 @@ if (sizeof($attach_list))
$sql = 'SELECT a.post_msg_id as post_id
FROM ' . ATTACHMENTS_TABLE . ' a, ' . POSTS_TABLE . " p
WHERE p.topic_id = $topic_id
- AND p.post_approved = 1
- AND p.topic_id = a.topic_id";
+ AND p.post_visibility = " . ITEM_APPROVED . '
+ AND p.topic_id = a.topic_id';
$result = $db->sql_query_limit($sql, 1);
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
@@ -1342,6 +1348,17 @@ if (sizeof($attach_list))
}
}
+$methods = phpbb_gen_download_links('topic_id', $topic_id, $phpbb_root_path, $phpEx);
+foreach ($methods as $method)
+{
+ $template->assign_block_vars('dl_method', $method);
+}
+
+$template->assign_vars(array(
+ 'S_HAS_ATTACHMENTS' => $topic_data['topic_attachment'],
+ 'U_DOWNLOAD_ALL_ATTACHMENTS' => $methods[0]['LINK'],
+));
+
// Instantiate BBCode if need be
if ($bbcode_bitfield !== '')
{
@@ -1366,35 +1383,19 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i)
continue;
}
- $row =& $rowset[$post_list[$i]];
+ $row = $rowset[$post_list[$i]];
$poster_id = $row['user_id'];
// End signature parsing, only if needed
if ($user_cache[$poster_id]['sig'] && $row['enable_sig'] && empty($user_cache[$poster_id]['sig_parsed']))
{
- $user_cache[$poster_id]['sig'] = censor_text($user_cache[$poster_id]['sig']);
-
- if ($user_cache[$poster_id]['sig_bbcode_bitfield'])
- {
- $bbcode->bbcode_second_pass($user_cache[$poster_id]['sig'], $user_cache[$poster_id]['sig_bbcode_uid'], $user_cache[$poster_id]['sig_bbcode_bitfield']);
- }
-
- $user_cache[$poster_id]['sig'] = bbcode_nl2br($user_cache[$poster_id]['sig']);
- $user_cache[$poster_id]['sig'] = smiley_text($user_cache[$poster_id]['sig']);
- $user_cache[$poster_id]['sig_parsed'] = true;
+ $parse_flags = ($user_cache[$poster_id]['sig_bbcode_bitfield'] ? OPTION_FLAG_BBCODE : 0) | OPTION_FLAG_SMILIES;
+ $user_cache[$poster_id]['sig'] = generate_text_for_display($user_cache[$poster_id]['sig'], $user_cache[$poster_id]['sig_bbcode_uid'], $user_cache[$poster_id]['sig_bbcode_bitfield'], $parse_flags, true);
}
// Parse the message and subject
- $message = censor_text($row['post_text']);
-
- // Second parse bbcode here
- if ($row['bbcode_bitfield'])
- {
- $bbcode->bbcode_second_pass($message, $row['bbcode_uid'], $row['bbcode_bitfield']);
- }
-
- $message = bbcode_nl2br($message);
- $message = smiley_text($message);
+ $parse_flags = ($row['bbcode_bitfield'] ? OPTION_FLAG_BBCODE : 0) | OPTION_FLAG_SMILIES;
+ $message = generate_text_for_display($row['post_text'], $row['bbcode_uid'], $row['bbcode_bitfield'], $parse_flags, true);
if (!empty($attachments[$row['post_id']]))
{
@@ -1436,8 +1437,6 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i)
unset($post_storage_list);
}
- $l_edit_time_total = ($row['post_edit_count'] == 1) ? $user->lang['EDITED_TIME_TOTAL'] : $user->lang['EDITED_TIMES_TOTAL'];
-
if ($row['post_edit_reason'])
{
// User having edited the post also being the post author?
@@ -1450,7 +1449,7 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i)
$display_username = get_username_string('full', $row['post_edit_user'], $post_edit_list[$row['post_edit_user']]['username'], $post_edit_list[$row['post_edit_user']]['user_colour']);
}
- $l_edited_by = sprintf($l_edit_time_total, $display_username, $user->format_date($row['post_edit_time'], false, true), $row['post_edit_count']);
+ $l_edited_by = $user->lang('EDITED_TIMES_TOTAL', (int) $row['post_edit_count'], $display_username, $user->format_date($row['post_edit_time'], false, true));
}
else
{
@@ -1469,7 +1468,7 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i)
$display_username = get_username_string('full', $row['post_edit_user'], $user_cache[$row['post_edit_user']]['username'], $user_cache[$row['post_edit_user']]['user_colour']);
}
- $l_edited_by = sprintf($l_edit_time_total, $display_username, $user->format_date($row['post_edit_time'], false, true), $row['post_edit_count']);
+ $l_edited_by = $user->lang('EDITED_TIMES_TOTAL', (int) $row['post_edit_count'], $display_username, $user->format_date($row['post_edit_time'], false, true));
}
}
else
@@ -1477,6 +1476,62 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i)
$l_edited_by = '';
}
+ // Deleting information
+ if ($row['post_visibility'] == ITEM_DELETED && $row['post_delete_user'])
+ {
+ // Get usernames for all following posts if not already stored
+ if (!sizeof($post_delete_list) && ($row['post_delete_reason'] || ($row['post_delete_user'] && !isset($user_cache[$row['post_delete_user']]))))
+ {
+ // Remove all post_ids already parsed (we do not have to check them)
+ $post_storage_list = (!$store_reverse) ? array_slice($post_list, $i) : array_slice(array_reverse($post_list), $i);
+
+ $sql = 'SELECT DISTINCT u.user_id, u.username, u.user_colour
+ FROM ' . POSTS_TABLE . ' p, ' . USERS_TABLE . ' u
+ WHERE ' . $db->sql_in_set('p.post_id', $post_storage_list) . '
+ AND p.post_delete_user <> 0
+ AND p.post_delete_user = u.user_id';
+ $result2 = $db->sql_query($sql);
+ while ($user_delete_row = $db->sql_fetchrow($result2))
+ {
+ $post_delete_list[$user_delete_row['user_id']] = $user_delete_row;
+ }
+ $db->sql_freeresult($result2);
+
+ unset($post_storage_list);
+ }
+
+ if ($row['post_delete_user'] && !isset($user_cache[$row['post_delete_user']]))
+ {
+ $user_cache[$row['post_delete_user']] = $post_delete_list[$row['post_delete_user']];
+ }
+
+ $display_postername = get_username_string('full', $poster_id, $row['username'], $row['user_colour'], $row['post_username']);
+
+ // User having deleted the post also being the post author?
+ if (!$row['post_delete_user'] || $row['post_delete_user'] == $poster_id)
+ {
+ $display_username = $display_postername;
+ }
+ else
+ {
+ $display_username = get_username_string('full', $row['post_delete_user'], $user_cache[$row['post_delete_user']]['username'], $user_cache[$row['post_delete_user']]['user_colour']);
+ }
+
+ if ($row['post_delete_reason'])
+ {
+ $l_deleted_message = $user->lang('POST_DELETED_BY_REASON', $display_postername, $display_username, $user->format_date($row['post_delete_time'], false, true), $row['post_delete_reason']);
+ }
+ else
+ {
+ $l_deleted_message = $user->lang('POST_DELETED_BY', $display_postername, $display_username, $user->format_date($row['post_delete_time'], false, true));
+ }
+ $l_deleted_by = $user->lang('DELETED_INFORMATION', $display_username, $user->format_date($row['post_delete_time'], false, true));
+ }
+ else
+ {
+ $l_deleted_by = $l_deleted_message = '';
+ }
+
// Bump information
if ($topic_data['topic_bumped'] && $row['post_id'] == $topic_data['topic_last_post_id'] && isset($user_cache[$topic_data['topic_bumper']]) )
{
@@ -1495,7 +1550,7 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i)
//
if ($config['load_cpf_viewtopic'])
{
- $cp_row = (isset($profile_fields_cache[$poster_id])) ? $cp->generate_profile_fields_template('show', false, $profile_fields_cache[$poster_id]) : array();
+ $cp_row = (isset($profile_fields_cache[$poster_id])) ? $cp->generate_profile_fields_template_data($profile_fields_cache[$poster_id]) : array();
}
$post_unread = (isset($topic_tracking_info[$topic_id]) && $row['post_time'] > $topic_tracking_info[$topic_id]) ? true : false;
@@ -1518,9 +1573,9 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i)
($user->data['user_id'] == ANONYMOUS || $auth->acl_get('f_reply', $forum_id))
);
- $delete_allowed = ($user->data['is_registered'] && ($auth->acl_get('m_delete', $forum_id) || (
+ $delete_allowed = ($user->data['is_registered'] && (($auth->acl_get('m_delete', $forum_id) || ($auth->acl_get('m_softdelete', $forum_id) && $row['post_visibility'] != ITEM_DELETED)) || (
$user->data['user_id'] == $poster_id &&
- $auth->acl_get('f_delete', $forum_id) &&
+ ($auth->acl_get('f_delete', $forum_id) || ($auth->acl_get('f_softdelete', $forum_id) && $row['post_visibility'] != ITEM_DELETED)) &&
$topic_data['topic_status'] != ITEM_LOCKED &&
$topic_data['topic_last_post_id'] == $row['post_id'] &&
($row['post_time'] > time() - ($config['delete_time'] * 60) || !$config['delete_time']) &&
@@ -1529,7 +1584,7 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i)
)));
//
- $postrow = array(
+ $post_row = array(
'POST_AUTHOR_FULL' => ($poster_id != ANONYMOUS) ? $user_cache[$poster_id]['author_full'] : get_username_string('full', $poster_id, $row['username'], $row['user_colour'], $row['post_username']),
'POST_AUTHOR_COLOUR' => ($poster_id != ANONYMOUS) ? $user_cache[$poster_id]['author_colour'] : get_username_string('colour', $poster_id, $row['username'], $row['user_colour'], $row['post_username']),
'POST_AUTHOR' => ($poster_id != ANONYMOUS) ? $user_cache[$poster_id]['author_username'] : get_username_string('username', $poster_id, $row['username'], $row['user_colour'], $row['post_username']),
@@ -1540,7 +1595,6 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i)
'RANK_IMG_SRC' => $user_cache[$poster_id]['rank_image_src'],
'POSTER_JOINED' => $user_cache[$poster_id]['joined'],
'POSTER_POSTS' => $user_cache[$poster_id]['posts'],
- 'POSTER_FROM' => $user_cache[$poster_id]['from'],
'POSTER_AVATAR' => $user_cache[$poster_id]['avatar'],
'POSTER_WARNINGS' => $user_cache[$poster_id]['warnings'],
'POSTER_AGE' => $user_cache[$poster_id]['age'],
@@ -1551,13 +1605,14 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i)
'SIGNATURE' => ($row['enable_sig']) ? $user_cache[$poster_id]['sig'] : '',
'EDITED_MESSAGE' => $l_edited_by,
'EDIT_REASON' => $row['post_edit_reason'],
+ 'DELETED_MESSAGE' => $l_deleted_by,
+ 'DELETE_REASON' => $row['post_delete_reason'],
'BUMPED_MESSAGE' => $l_bumped_by,
'MINI_POST_IMG' => ($post_unread) ? $user->img('icon_post_target_unread', 'UNREAD_POST') : $user->img('icon_post_target', 'POST'),
'POST_ICON_IMG' => ($topic_data['enable_icons'] && !empty($row['icon_id'])) ? $icons[$row['icon_id']]['img'] : '',
'POST_ICON_IMG_WIDTH' => ($topic_data['enable_icons'] && !empty($row['icon_id'])) ? $icons[$row['icon_id']]['width'] : '',
'POST_ICON_IMG_HEIGHT' => ($topic_data['enable_icons'] && !empty($row['icon_id'])) ? $icons[$row['icon_id']]['height'] : '',
- 'ICQ_STATUS_IMG' => $user_cache[$poster_id]['icq_status_img'],
'ONLINE_IMG' => ($poster_id == ANONYMOUS || !$config['load_onlinetrack']) ? '' : (($user_cache[$poster_id]['online']) ? $user->img('icon_user_online', 'ONLINE') : $user->img('icon_user_offline', 'OFFLINE')),
'S_ONLINE' => ($poster_id == ANONYMOUS || !$config['load_onlinetrack']) ? false : (($user_cache[$poster_id]['online']) ? true : false),
@@ -1570,17 +1625,14 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i)
'U_SEARCH' => $user_cache[$poster_id]['search'],
'U_PM' => ($poster_id != ANONYMOUS && $config['allow_privmsg'] && $auth->acl_get('u_sendpm') && ($user_cache[$poster_id]['allow_pm'] || $auth->acl_gets('a_', 'm_') || $auth->acl_getf_global('m_'))) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&amp;mode=compose&amp;action=quotepost&amp;p=' . $row['post_id']) : '',
'U_EMAIL' => $user_cache[$poster_id]['email'],
- 'U_WWW' => $user_cache[$poster_id]['www'],
- 'U_ICQ' => $user_cache[$poster_id]['icq'],
- 'U_AIM' => $user_cache[$poster_id]['aim'],
- 'U_MSN' => $user_cache[$poster_id]['msn'],
- 'U_YIM' => $user_cache[$poster_id]['yim'],
'U_JABBER' => $user_cache[$poster_id]['jabber'],
+ 'U_APPROVE_ACTION' => append_sid("{$phpbb_root_path}mcp.$phpEx", "i=queue&amp;p={$row['post_id']}&amp;f=$forum_id&amp;redirect=" . urlencode(str_replace('&amp;', '&', $viewtopic_url . '&amp;p=' . $row['post_id'] . '#p' . $row['post_id']))),
'U_REPORT' => ($auth->acl_get('f_report', $forum_id)) ? append_sid("{$phpbb_root_path}report.$phpEx", 'f=' . $forum_id . '&amp;p=' . $row['post_id']) : '',
'U_MCP_REPORT' => ($auth->acl_get('m_report', $forum_id)) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=reports&amp;mode=report_details&amp;f=' . $forum_id . '&amp;p=' . $row['post_id'], true, $user->session_id) : '',
'U_MCP_APPROVE' => ($auth->acl_get('m_approve', $forum_id)) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue&amp;mode=approve_details&amp;f=' . $forum_id . '&amp;p=' . $row['post_id'], true, $user->session_id) : '',
- 'U_MINI_POST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'p=' . $row['post_id']) . (($topic_data['topic_type'] == POST_GLOBAL) ? '&amp;f=' . $forum_id : '') . '#p' . $row['post_id'],
+ 'U_MCP_RESTORE' => ($auth->acl_get('m_approve', $forum_id)) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue&amp;mode=' . (($topic_data['topic_visibility'] != ITEM_DELETED) ? 'deleted_posts' : 'deleted_topics') . '&amp;f=' . $forum_id . '&amp;p=' . $row['post_id'], true, $user->session_id) : '',
+ 'U_MINI_POST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'p=' . $row['post_id']) . '#p' . $row['post_id'],
'U_NEXT_POST_ID' => ($i < $i_total && isset($rowset[$post_list[$i + 1]])) ? $rowset[$post_list[$i + 1]]['post_id'] : '',
'U_PREV_POST_ID' => $prev_post_id,
'U_NOTES' => ($auth->acl_getf_global('m_')) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=notes&amp;mode=user_notes&amp;u=' . $poster_id, true, $user->session_id) : '',
@@ -1591,7 +1643,10 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i)
'POSTER_ID' => $poster_id,
'S_HAS_ATTACHMENTS' => (!empty($attachments[$row['post_id']])) ? true : false,
- 'S_POST_UNAPPROVED' => ($row['post_approved']) ? false : true,
+ 'S_MULTIPLE_ATTACHMENTS' => !empty($attachments[$row['post_id']]) && sizeof($attachments[$row['post_id']]) > 1,
+ 'S_POST_UNAPPROVED' => ($row['post_visibility'] == ITEM_UNAPPROVED) ? true : false,
+ 'S_POST_DELETED' => ($row['post_visibility'] == ITEM_DELETED) ? true : false,
+ 'L_POST_DELETED_MESSAGE' => $l_deleted_message,
'S_POST_REPORTED' => ($row['post_reported'] && $auth->acl_get('m_report', $forum_id)) ? true : false,
'S_DISPLAY_NOTICE' => $display_notice && $row['post_attachment'],
'S_FRIEND' => ($row['friend']) ? true : false,
@@ -1600,17 +1655,43 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i)
'S_CUSTOM_FIELDS' => (isset($cp_row['row']) && sizeof($cp_row['row'])) ? true : false,
'S_TOPIC_POSTER' => ($topic_data['topic_poster'] == $poster_id) ? true : false,
- 'S_IGNORE_POST' => ($row['hide_post']) ? true : false,
- 'L_IGNORE_POST' => ($row['hide_post']) ? sprintf($user->lang['POST_BY_FOE'], get_username_string('full', $poster_id, $row['username'], $row['user_colour'], $row['post_username']), '<a href="' . $viewtopic_url . "&amp;p={$row['post_id']}&amp;view=show#p{$row['post_id']}" . '">', '</a>') : '',
+ 'S_IGNORE_POST' => ($row['foe']) ? true : false,
+ 'L_IGNORE_POST' => ($row['foe']) ? sprintf($user->lang['POST_BY_FOE'], get_username_string('full', $poster_id, $row['username'], $row['user_colour'], $row['post_username'])) : '',
+ 'S_POST_HIDDEN' => $row['hide_post'],
+ 'L_POST_DISPLAY' => ($row['hide_post']) ? $user->lang('POST_DISPLAY', '<a class="display_post" data-post-id="' . $row['post_id'] . '" href="' . $viewtopic_url . "&amp;p={$row['post_id']}&amp;view=show#p{$row['post_id']}" . '">', '</a>') : '',
);
+ $user_poster_data = $user_cache[$poster_id];
+
+ $current_row_number = $i;
+
+ /**
+ * Modify the posts template block
+ *
+ * @event core.viewtopic_modify_post_row
+ * @var int start Start item of this page
+ * @var int current_row_number Number of the post on this page
+ * @var int end Number of posts on this page
+ * @var array row Array with original post and user data
+ * @var array cp_row Custom profile field data of the poster
+ * @var array attachments List of attachments
+ * @var array user_poster_data Poster's data from user cache
+ * @var array post_row Template block array of the post
+ * @since 3.1-A1
+ * @change 3.1.0-a3 Added vars start, current_row_number, end, attachments
+ */
+ $vars = array('start', 'current_row_number', 'end', 'row', 'cp_row', 'attachments', 'user_poster_data', 'post_row');
+ extract($phpbb_dispatcher->trigger_event('core.viewtopic_modify_post_row', compact($vars)));
+
+ $i = $current_row_number;
+
if (isset($cp_row['row']) && sizeof($cp_row['row']))
{
- $postrow = array_merge($postrow, $cp_row['row']);
+ $post_row = array_merge($post_row, $cp_row['row']);
}
// Dump vars into template
- $template->assign_block_vars('postrow', $postrow);
+ $template->assign_block_vars('postrow', $post_row);
if (!empty($cp_row['blockrow']))
{
@@ -1629,8 +1710,35 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i)
'DISPLAY_ATTACHMENT' => $attachment)
);
}
+
+ $methods = phpbb_gen_download_links('post_id', $row['post_id'], $phpbb_root_path, $phpEx);
+ foreach ($methods as $method)
+ {
+ $template->assign_block_vars('postrow.dl_method', $method);
+ }
}
+ $current_row_number = $i;
+
+ /**
+ * Event after the post data has been assigned to the template
+ *
+ * @event core.viewtopic_post_row_after
+ * @var int start Start item of this page
+ * @var int current_row_number Number of the post on this page
+ * @var int end Number of posts on this page
+ * @var array row Array with original post and user data
+ * @var array cp_row Custom profile field data of the poster
+ * @var array attachments List of attachments
+ * @var array user_poster_data Poster's data from user cache
+ * @var array post_row Template block array of the post
+ * @since 3.1.0-a3
+ */
+ $vars = array('start', 'current_row_number', 'end', 'row', 'cp_row', 'attachments', 'user_poster_data', 'post_row');
+ extract($phpbb_dispatcher->trigger_event('core.viewtopic_post_row_after', compact($vars)));
+
+ $i = $current_row_number;
+
$prev_post_id = $row['post_id'];
unset($rowset[$post_list[$i]]);
@@ -1656,41 +1764,21 @@ if (isset($user->data['session_page']) && !$user->data['is_bot'] && (strpos($use
}
}
-// Get last post time for all global announcements
-// to keep proper forums tracking
-if ($topic_data['topic_type'] == POST_GLOBAL)
-{
- $sql = 'SELECT topic_last_post_time as forum_last_post_time
- FROM ' . TOPICS_TABLE . '
- WHERE forum_id = 0
- ORDER BY topic_last_post_time DESC';
- $result = $db->sql_query_limit($sql, 1);
- $topic_data['forum_last_post_time'] = (int) $db->sql_fetchfield('forum_last_post_time');
- $db->sql_freeresult($result);
-
- $sql = 'SELECT mark_time as forum_mark_time
- FROM ' . FORUMS_TRACK_TABLE . '
- WHERE forum_id = 0
- AND user_id = ' . $user->data['user_id'];
- $result = $db->sql_query($sql);
- $topic_data['forum_mark_time'] = (int) $db->sql_fetchfield('forum_mark_time');
- $db->sql_freeresult($result);
-}
-
// Only mark topic if it's currently unread. Also make sure we do not set topic tracking back if earlier pages are viewed.
if (isset($topic_tracking_info[$topic_id]) && $topic_data['topic_last_post_time'] > $topic_tracking_info[$topic_id] && $max_post_time > $topic_tracking_info[$topic_id])
{
- markread('topic', (($topic_data['topic_type'] == POST_GLOBAL) ? 0 : $forum_id), $topic_id, $max_post_time);
+ markread('topic', $forum_id, $topic_id, $max_post_time);
// Update forum info
- $all_marked_read = update_forum_tracking_info((($topic_data['topic_type'] == POST_GLOBAL) ? 0 : $forum_id), $topic_data['forum_last_post_time'], (isset($topic_data['forum_mark_time'])) ? $topic_data['forum_mark_time'] : false, false);
+ $all_marked_read = update_forum_tracking_info($forum_id, $topic_data['forum_last_post_time'], (isset($topic_data['forum_mark_time'])) ? $topic_data['forum_mark_time'] : false, false);
}
else
{
$all_marked_read = true;
}
-// If there are absolutely no more unread posts in this forum and unread posts shown, we can savely show the #unread link
+// If there are absolutely no more unread posts in this forum
+// and unread posts shown, we can safely show the #unread link
if ($all_marked_read)
{
if ($post_unread)
@@ -1773,19 +1861,34 @@ if ($s_can_vote || $s_quick_reply)
// We overwrite $_REQUEST['f'] if there is no forum specified
// to be able to display the correct online list.
// One downside is that the user currently viewing this topic/post is not taken into account.
-if (empty($_REQUEST['f']))
+if (!request_var('f', 0))
{
- $_REQUEST['f'] = $forum_id;
+ $request->overwrite('f', $forum_id);
}
// We need to do the same with the topic_id. See #53025.
-if (empty($_REQUEST['t']) && !empty($topic_id))
+if (!request_var('t', 0) && !empty($topic_id))
{
- $_REQUEST['t'] = $topic_id;
+ $request->overwrite('t', $topic_id);
}
+$page_title = $topic_data['topic_title'] . ($start ? ' - ' . sprintf($user->lang['PAGE_TITLE_NUMBER'], $pagination->get_on_page($config['posts_per_page'], $start)) : '');
+
+/**
+* You can use this event to modify the page title of the viewtopic page
+*
+* @event core.viewtopic_modify_page_title
+* @var string page_title Title of the index page
+* @var array topic_data Array with topic data
+* @var int forum_id Forum ID of the topic
+* @var int start Start offset used to calculate the page
+* @since 3.1-A1
+*/
+$vars = array('page_title', 'topic_data', 'forum_id', 'start');
+extract($phpbb_dispatcher->trigger_event('core.viewtopic_modify_page_title', compact($vars)));
+
// Output the page
-page_header($user->lang['VIEW_TOPIC'] . ' - ' . $topic_data['topic_title'], true, $forum_id);
+page_header($page_title, true, $forum_id);
$template->set_filenames(array(
'body' => ($view == 'print') ? 'viewtopic_print.html' : 'viewtopic_body.html')
@@ -1793,5 +1896,3 @@ $template->set_filenames(array(
make_jumpbox(append_sid("{$phpbb_root_path}viewforum.$phpEx"), $forum_id);
page_footer();
-
-?> \ No newline at end of file
diff --git a/phpunit.xml.all b/phpunit.xml.all
index d91a614c97..d5ee606ce2 100644
--- a/phpunit.xml.all
+++ b/phpunit.xml.all
@@ -14,20 +14,23 @@
<testsuites>
<testsuite name="phpBB Test Suite">
<directory suffix="_test.php">./tests/</directory>
- <exclude>./tests/functional</exclude>
<exclude>tests/lint_test.php</exclude>
</testsuite>
<testsuite name="phpBB Lint Test">
<file>tests/lint_test.php</file>
</testsuite>
- <testsuite name="phpBB Functional Tests">
- <directory suffix="_test.php" phpVersion="5.3.0" phpVersionOperator=">=">./tests/functional</directory>
- </testsuite>
</testsuites>
<filter>
<blacklist>
<directory>./tests/</directory>
</blacklist>
+ <whitelist>
+ <directory suffix=".php">./phpBB/includes/</directory>
+ <directory suffix=".php">./phpBB/phpbb/</directory>
+ <exclude>
+ <directory suffix=".php">./phpBB/includes/captcha/</directory>
+ </exclude>
+ </whitelist>
</filter>
</phpunit>
diff --git a/phpunit.xml.dist b/phpunit.xml.dist
index 4c91f8e373..700af8b2b2 100644
--- a/phpunit.xml.dist
+++ b/phpunit.xml.dist
@@ -14,15 +14,11 @@
<testsuites>
<testsuite name="phpBB Test Suite">
<directory suffix="_test.php">./tests/</directory>
- <exclude>./tests/functional</exclude>
<exclude>tests/lint_test.php</exclude>
</testsuite>
<testsuite name="phpBB Lint Test">
<file>tests/lint_test.php</file>
</testsuite>
- <testsuite name="phpBB Functional Tests">
- <directory suffix="_test.php" phpVersion="5.3.0" phpVersionOperator=">=">./tests/functional</directory>
- </testsuite>
</testsuites>
<groups>
@@ -36,5 +32,12 @@
<blacklist>
<directory>./tests/</directory>
</blacklist>
+ <whitelist>
+ <directory suffix=".php">./phpBB/includes/</directory>
+ <directory suffix=".php">./phpBB/phpbb/</directory>
+ <exclude>
+ <directory suffix=".php">./phpBB/includes/captcha/</directory>
+ </exclude>
+ </whitelist>
</filter>
</phpunit>
diff --git a/phpunit.xml.functional b/phpunit.xml.functional
index 919de74dec..44d060e615 100644
--- a/phpunit.xml.functional
+++ b/phpunit.xml.functional
@@ -14,15 +14,11 @@
<testsuites>
<testsuite name="phpBB Test Suite">
<directory suffix="_test.php">./tests/</directory>
- <exclude>./tests/functional</exclude>
<exclude>tests/lint_test.php</exclude>
</testsuite>
<testsuite name="phpBB Lint Test">
<file>tests/lint_test.php</file>
</testsuite>
- <testsuite name="phpBB Functional Tests">
- <directory suffix="_test.php" phpVersion="5.3.0" phpVersionOperator=">=">./tests/functional</directory>
- </testsuite>
</testsuites>
<groups>
@@ -35,5 +31,12 @@
<blacklist>
<directory>./tests/</directory>
</blacklist>
+ <whitelist>
+ <directory suffix=".php">./phpBB/includes/</directory>
+ <directory suffix=".php">./phpBB/phpbb/</directory>
+ <exclude>
+ <directory suffix=".php">./phpBB/includes/captcha/</directory>
+ </exclude>
+ </whitelist>
</filter>
</phpunit>
diff --git a/tests/RUNNING_TESTS.md b/tests/RUNNING_TESTS.md
index 23c74f4411..0778046141 100644
--- a/tests/RUNNING_TESTS.md
+++ b/tests/RUNNING_TESTS.md
@@ -24,6 +24,7 @@ the following PHP extensions must be installed and enabled to run unit tests:
- ctype (also a PHPUnit dependency)
- dom (PHPUnit dependency)
+- json (also a phpBB dependency)
Some of the functionality in phpBB and/or the test suite uses additional
PHP extensions. If these extensions are not loaded, respective tests
@@ -34,8 +35,10 @@ will be skipped:
- interbase, pdo_firebird (Firebird database driver)
- mysql, pdo_mysql (MySQL database driver)
- mysqli, pdo_mysql (MySQLi database driver)
+- pcntl (flock class)
- pdo (any database tests)
- pgsql, pdo_pgsql (PostgreSQL database driver)
+- redis (https://github.com/nicolasff/phpredis, Redis cache driver)
- simplexml (any database tests)
- sqlite, pdo_sqlite (SQLite database driver, requires SQLite 2.x support
in pdo_sqlite)
@@ -54,7 +57,7 @@ found below. More information on configuration options can be found on the
wiki (see below).
<?php
- $dbms = 'mysqli';
+ $dbms = 'phpbb\db\driver\mysqli';
$dbhost = 'localhost';
$dbport = '';
$dbname = 'database';
@@ -98,6 +101,21 @@ to connect to that database in phpBB.
Additionally, you will need to be running the DbUnit fork from
https://github.com/phpbb/dbunit/tree/phpbb.
+Redis
+-----
+
+In order to run tests for the Redis cache driver, at least one of Redis host
+or port must be specified in test configuration. This can be done via
+test_config.php as follows:
+
+ <?php
+ $phpbb_redis_host = 'localhost';
+ $phpbb_redis_port = 6379;
+
+Or via environment variables as follows:
+
+ $ PHPBB_TEST_REDIS_HOST=localhost PHPBB_TEST_REDIS_PORT=6379 phpunit
+
Running
=======
diff --git a/tests/acp_board/auth_provider/invalid.php b/tests/acp_board/auth_provider/invalid.php
new file mode 100644
index 0000000000..acce3b7e2d
--- /dev/null
+++ b/tests/acp_board/auth_provider/invalid.php
@@ -0,0 +1,15 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\auth\provider\acp;
+
+class board_invalid
+{
+
+}
diff --git a/tests/acp_board/auth_provider/valid.php b/tests/acp_board/auth_provider/valid.php
new file mode 100644
index 0000000000..13ec1e3250
--- /dev/null
+++ b/tests/acp_board/auth_provider/valid.php
@@ -0,0 +1,18 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\auth\provider\acp;
+
+class board_valid extends \phpbb\auth\provider\base
+{
+ public function login($username, $password)
+ {
+ return;
+ }
+}
diff --git a/tests/acp_board/select_auth_method_test.php b/tests/acp_board/select_auth_method_test.php
new file mode 100644
index 0000000000..b943554564
--- /dev/null
+++ b/tests/acp_board/select_auth_method_test.php
@@ -0,0 +1,48 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+require_once dirname(__FILE__) . '/../../phpBB/includes/acp/acp_board.php';
+require_once dirname(__FILE__) . '/auth_provider/invalid.php';
+require_once dirname(__FILE__) . '/auth_provider/valid.php';
+
+class phpbb_acp_board_select_auth_method_test extends phpbb_test_case
+{
+ protected $acp_board;
+
+ public static function select_auth_method_data()
+ {
+ return array(
+ array('acp_board_valid', '<option value="acp_board_valid" selected="selected">Acp_board_valid</option>'),
+ array('acp_board_invalid', '<option value="acp_board_valid">Acp_board_valid</option>'),
+ );
+ }
+
+ public function setUp()
+ {
+ parent::setUp();
+
+ global $phpbb_container;
+ $phpbb_container = new phpbb_mock_container_builder();
+
+ $phpbb_container->set('auth.provider_collection', array(
+ 'auth.provider.acp_board_valid' => new phpbb\auth\provider\acp\board_valid,
+ 'auth.provider.acp_board_invalid' => new phpbb\auth\provider\acp\board_invalid,
+ ));
+
+ $this->acp_board = new acp_board();
+ }
+
+ /**
+ * @dataProvider select_auth_method_data
+ */
+ public function test_select_auth_method($selected, $expected)
+ {
+ $this->assertEquals($expected, $this->acp_board->select_auth_method($selected));
+ }
+}
diff --git a/tests/auth/fixtures/oauth_tokens.xml b/tests/auth/fixtures/oauth_tokens.xml
new file mode 100644
index 0000000000..9bfb5a4422
--- /dev/null
+++ b/tests/auth/fixtures/oauth_tokens.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<dataset>
+ <table name="phpbb_oauth_tokens">
+ <column>user_id</column>
+ <column>session_id</column>
+ <column>provider</column>
+ <column>oauth_token</column>
+ </table>
+</dataset>
+
diff --git a/tests/auth/fixtures/user.xml b/tests/auth/fixtures/user.xml
new file mode 100644
index 0000000000..77f707bab3
--- /dev/null
+++ b/tests/auth/fixtures/user.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<dataset>
+ <table name="phpbb_users">
+ <column>user_id</column>
+ <column>username</column>
+ <column>username_clean</column>
+ <column>user_password</column>
+ <column>user_passchg</column>
+ <column>user_pass_convert</column>
+ <column>user_email</column>
+ <column>user_type</column>
+ <column>user_login_attempts</column>
+ <column>user_permissions</column>
+ <column>user_sig</column>
+ <row>
+ <value>1</value>
+ <value>foobar</value>
+ <value>foobar</value>
+ <value>$2y$10$4RmpyVu2y8Yf/lP3.yQBquKvE54TCUuEDEBJYY6FDDFN3LcbCGz9i</value>
+ <value>0</value>
+ <value>0</value>
+ <value>example@example.com</value>
+ <value>0</value>
+ <value>0</value>
+ <value></value>
+ <value></value>
+ </row>
+ <row>
+ <value>2</value>
+ <value>foobar2</value>
+ <value>foobar2</value>
+ <value>$H$9E45lK6J8nLTSm9oJE5aNCSTFK9wqa/</value>
+ <value>0</value>
+ <value>0</value>
+ <value>example@example.com</value>
+ <value>0</value>
+ <value>0</value>
+ <value></value>
+ <value></value>
+ </row>
+ </table>
+</dataset>
diff --git a/tests/auth/fixtures/user_533.xml b/tests/auth/fixtures/user_533.xml
new file mode 100644
index 0000000000..b64f376e5b
--- /dev/null
+++ b/tests/auth/fixtures/user_533.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<dataset>
+ <table name="phpbb_users">
+ <column>user_id</column>
+ <column>username</column>
+ <column>username_clean</column>
+ <column>user_password</column>
+ <column>user_passchg</column>
+ <column>user_pass_convert</column>
+ <column>user_email</column>
+ <column>user_type</column>
+ <column>user_login_attempts</column>
+ <column>user_permissions</column>
+ <column>user_sig</column>
+ <row>
+ <value>1</value>
+ <value>foobar</value>
+ <value>foobar</value>
+ <value>$2a$10$e01Syh9PbJjUkio66eFuUu4FhCE2nRgG7QPc1JACalsPXcIuG2bbi</value>
+ <value>0</value>
+ <value>0</value>
+ <value>example@example.com</value>
+ <value>0</value>
+ <value>0</value>
+ <value></value>
+ <value></value>
+ </row>
+ <row>
+ <value>2</value>
+ <value>foobar2</value>
+ <value>foobar2</value>
+ <value>$H$9E45lK6J8nLTSm9oJE5aNCSTFK9wqa/</value>
+ <value>0</value>
+ <value>0</value>
+ <value>example@example.com</value>
+ <value>0</value>
+ <value>0</value>
+ <value></value>
+ <value></value>
+ </row>
+ </table>
+</dataset>
diff --git a/tests/auth/provider_apache_test.php b/tests/auth/provider_apache_test.php
new file mode 100644
index 0000000000..4b12abd62a
--- /dev/null
+++ b/tests/auth/provider_apache_test.php
@@ -0,0 +1,226 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php';
+require_once dirname(__FILE__) . '/../../phpBB/includes/utf/utf_tools.php';
+
+class phpbb_auth_provider_apache_test extends phpbb_database_test_case
+{
+ protected $provider;
+ protected $user;
+ protected $request;
+
+ protected function setup()
+ {
+ parent::setUp();
+
+ global $phpbb_root_path, $phpEx;
+
+ $db = $this->new_dbal();
+ $config = new \phpbb\config\config(array());
+ $this->request = $this->getMock('\phpbb\request\request');
+ $this->user = $this->getMock('\phpbb\user');
+ $driver_helper = new \phpbb\passwords\driver\helper($config);
+ $passwords_drivers = array(
+ 'passwords.driver.bcrypt_2y' => new \phpbb\passwords\driver\bcrypt_2y($config, $driver_helper),
+ 'passwords.driver.bcrypt' => new \phpbb\passwords\driver\bcrypt($config, $driver_helper),
+ 'passwords.driver.salted_md5' => new \phpbb\passwords\driver\salted_md5($config, $driver_helper),
+ 'passwords.driver.phpass' => new \phpbb\passwords\driver\phpass($config, $driver_helper),
+ );
+
+ $passwords_helper = new \phpbb\passwords\helper;
+ // Set up passwords manager
+ $passwords_manager = new \phpbb\passwords\manager($config, $passwords_drivers, $passwords_helper, array_keys($passwords_drivers));
+
+ if (version_compare(PHP_VERSION, '5.3.7', '<'))
+ {
+ $this->password_hash = '$2a$10$e01Syh9PbJjUkio66eFuUu4FhCE2nRgG7QPc1JACalsPXcIuG2bbi';
+ }
+ else
+ {
+ $this->password_hash = '$2y$10$4RmpyVu2y8Yf/lP3.yQBquKvE54TCUuEDEBJYY6FDDFN3LcbCGz9i';
+ }
+
+ $this->provider = new \phpbb\auth\provider\apache($db, $config, $passwords_manager, $this->request, $this->user, $phpbb_root_path, $phpEx);
+ }
+
+ public function getDataSet()
+ {
+ if ((version_compare(PHP_VERSION, '5.3.7', '<')))
+ {
+ return $this->createXMLDataSet(dirname(__FILE__).'/fixtures/user_533.xml');
+ }
+ else
+ {
+ return $this->createXMLDataSet(dirname(__FILE__).'/fixtures/user.xml');
+ }
+ }
+
+ /**
+ * Test to see if a user is identified to Apache. Expects false if they are.
+ */
+ public function test_init()
+ {
+ $this->user->data['username'] = 'foobar';
+ $this->request->expects($this->once())
+ ->method('is_set')
+ ->with('PHP_AUTH_USER',
+ \phpbb\request\request_interface::SERVER)
+ ->will($this->returnValue(true));
+ $this->request->expects($this->once())
+ ->method('server')
+ ->with('PHP_AUTH_USER')
+ ->will($this->returnValue('foobar'));
+
+ $this->assertFalse($this->provider->init());
+ }
+
+ public function test_login()
+ {
+ $username = 'foobar';
+ $password = 'example';
+
+ $this->request->expects($this->once())
+ ->method('is_set')
+ ->with('PHP_AUTH_USER',
+ \phpbb\request\request_interface::SERVER)
+ ->will($this->returnValue(true));
+ $this->request->expects($this->at(1))
+ ->method('server')
+ ->with('PHP_AUTH_USER')
+ ->will($this->returnValue('foobar'));
+ $this->request->expects($this->at(2))
+ ->method('server')
+ ->with('PHP_AUTH_PW')
+ ->will($this->returnValue('example'));
+
+ $expected = array(
+ 'status' => LOGIN_SUCCESS,
+ 'error_msg' => false,
+ 'user_row' => array(
+ 'user_id' => '1',
+ 'username' => 'foobar',
+ 'user_password' => $this->password_hash,
+ 'user_passchg' => '0',
+ 'user_email' => 'example@example.com',
+ 'user_type' => '0',
+ ),
+ );
+
+ $this->assertEquals($expected, $this->provider->login($username, $password));
+ }
+
+ public function test_autologin()
+ {
+ $this->request->expects($this->once())
+ ->method('is_set')
+ ->with('PHP_AUTH_USER',
+ \phpbb\request\request_interface::SERVER)
+ ->will($this->returnValue(true));
+ $this->request->expects($this->at(1))
+ ->method('server')
+ ->with('PHP_AUTH_USER')
+ ->will($this->returnValue('foobar'));
+ $this->request->expects($this->at(2))
+ ->method('server')
+ ->with('PHP_AUTH_PW')
+ ->will($this->returnValue('example'));
+
+ $expected = array(
+ 'user_id' => '1',
+ 'user_type' => '0',
+ 'group_id' => '3',
+ 'user_permissions' => '',
+ 'user_perm_from' => '0',
+ 'user_ip' => '',
+ 'user_regdate' => '0',
+ 'username' => 'foobar',
+ 'username_clean' => 'foobar',
+ 'user_password' => $this->password_hash,
+ 'user_passchg' => '0',
+ 'user_pass_convert' => '0',
+ 'user_email' => 'example@example.com',
+ 'user_email_hash' => '0',
+ 'user_birthday' => '',
+ 'user_lastvisit' => '0',
+ 'user_lastmark' => '0',
+ 'user_lastpost_time' => '0',
+ 'user_lastpage' => '',
+ 'user_last_confirm_key' => '',
+ 'user_last_search' => '0',
+ 'user_warnings' => '0',
+ 'user_last_warning' => '0',
+ 'user_login_attempts' => '0',
+ 'user_inactive_reason' => '0',
+ 'user_inactive_time' => '0',
+ 'user_posts' => '0',
+ 'user_lang' => '',
+ 'user_timezone' => '',
+ 'user_dateformat' => 'd M Y H:i',
+ 'user_style' => '0',
+ 'user_rank' => '0',
+ 'user_colour' => '',
+ 'user_new_privmsg' => '0',
+ 'user_unread_privmsg' => '0',
+ 'user_last_privmsg' => '0',
+ 'user_message_rules' => '0',
+ 'user_full_folder' => '-3',
+ 'user_emailtime' => '0',
+ 'user_topic_show_days' => '0',
+ 'user_topic_sortby_type' => 't',
+ 'user_topic_sortby_dir' => 'd',
+ 'user_post_show_days' => '0',
+ 'user_post_sortby_type' => 't',
+ 'user_post_sortby_dir' => 'a',
+ 'user_notify' => '0',
+ 'user_notify_pm' => '1',
+ 'user_notify_type' => '0',
+ 'user_allow_pm' => '1',
+ 'user_allow_viewonline' => '1',
+ 'user_allow_viewemail' => '1',
+ 'user_allow_massemail' => '1',
+ 'user_options' => '230271',
+ 'user_avatar' => '',
+ 'user_avatar_type' => '',
+ 'user_avatar_width' => '0',
+ 'user_avatar_height' => '0',
+ 'user_sig' => '',
+ 'user_sig_bbcode_uid' => '',
+ 'user_sig_bbcode_bitfield' => '',
+ 'user_jabber' => '',
+ 'user_actkey' => '',
+ 'user_newpasswd' => '',
+ 'user_form_salt' => '',
+ 'user_new' => '1',
+ 'user_reminded' => '0',
+ 'user_reminded_time' => '0',
+ );
+
+ $this->assertEquals($expected, $this->provider->autologin());
+ }
+
+ public function test_validate_session()
+ {
+ $user = array(
+ 'username' => 'foobar',
+ 'user_type'
+ );
+ $this->request->expects($this->once())
+ ->method('is_set')
+ ->with('PHP_AUTH_USER',
+ \phpbb\request\request_interface::SERVER)
+ ->will($this->returnValue(true));
+ $this->request->expects($this->once())
+ ->method('server')
+ ->with('PHP_AUTH_USER')
+ ->will($this->returnValue('foobar'));
+
+ $this->assertTrue($this->provider->validate_session($user));
+ }
+}
diff --git a/tests/auth/provider_db_test.php b/tests/auth/provider_db_test.php
new file mode 100644
index 0000000000..91ffcdc2a7
--- /dev/null
+++ b/tests/auth/provider_db_test.php
@@ -0,0 +1,83 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php';
+require_once dirname(__FILE__) . '/../../phpBB/includes/utf/utf_tools.php';
+
+class phpbb_auth_provider_db_test extends phpbb_database_test_case
+{
+ public function getDataSet()
+ {
+ if ((version_compare(PHP_VERSION, '5.3.7', '<')))
+ {
+ return $this->createXMLDataSet(dirname(__FILE__).'/fixtures/user_533.xml');
+ }
+ else
+ {
+ return $this->createXMLDataSet(dirname(__FILE__).'/fixtures/user.xml');
+ }
+ }
+
+ public function test_login()
+ {
+ global $phpbb_root_path, $phpEx;
+
+ $db = $this->new_dbal();
+ $config = new \phpbb\config\config(array(
+ 'ip_login_limit_max' => 0,
+ 'ip_login_limit_use_forwarded' => 0,
+ 'max_login_attempts' => 0,
+ ));
+ $request = $this->getMock('\phpbb\request\request');
+ $user = $this->getMock('\phpbb\user');
+ $driver_helper = new \phpbb\passwords\driver\helper($config);
+ $passwords_drivers = array(
+ 'passwords.driver.bcrypt_2y' => new \phpbb\passwords\driver\bcrypt_2y($config, $driver_helper),
+ 'passwords.driver.bcrypt' => new \phpbb\passwords\driver\bcrypt($config, $driver_helper),
+ 'passwords.driver.salted_md5' => new \phpbb\passwords\driver\salted_md5($config, $driver_helper),
+ 'passwords.driver.phpass' => new \phpbb\passwords\driver\phpass($config, $driver_helper),
+ );
+
+ $passwords_helper = new \phpbb\passwords\helper;
+ // Set up passwords manager
+ $passwords_manager = new \phpbb\passwords\manager($config, $passwords_drivers, $passwords_helper, array_keys($passwords_drivers));
+
+ $provider = new \phpbb\auth\provider\db($db, $config, $passwords_manager, $request, $user, $phpbb_root_path, $phpEx);
+ if (version_compare(PHP_VERSION, '5.3.7', '<'))
+ {
+ $password_hash = '$2a$10$e01Syh9PbJjUkio66eFuUu4FhCE2nRgG7QPc1JACalsPXcIuG2bbi';
+ }
+ else
+ {
+ $password_hash = '$2y$10$4RmpyVu2y8Yf/lP3.yQBquKvE54TCUuEDEBJYY6FDDFN3LcbCGz9i';
+ }
+
+ $expected = array(
+ 'status' => LOGIN_SUCCESS,
+ 'error_msg' => false,
+ 'user_row' => array(
+ 'user_id' => '1',
+ 'username' => 'foobar',
+ 'user_password' => $password_hash,
+ 'user_passchg' => '0',
+ 'user_pass_convert' => '0',
+ 'user_email' => 'example@example.com',
+ 'user_type' => '0',
+ 'user_login_attempts' => '0',
+ ),
+ );
+
+ $this->assertEquals($expected, $provider->login('foobar', 'example'));
+
+ // Check if convert works
+ $login_return = $provider->login('foobar2', 'example');
+ $password_start = (version_compare(PHP_VERSION, '5.3.7', '<')) ? '$2a$10$' : '$2y$10$';
+ $this->assertStringStartsWith($password_start, $login_return['user_row']['user_password']);
+ }
+}
diff --git a/tests/auth/provider_oauth_token_storage_test.php b/tests/auth/provider_oauth_token_storage_test.php
new file mode 100644
index 0000000000..fdc08833a3
--- /dev/null
+++ b/tests/auth/provider_oauth_token_storage_test.php
@@ -0,0 +1,207 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+use OAuth\OAuth2\Token\StdOAuth2Token;
+
+class phpbb_auth_provider_oauth_token_storage_test extends phpbb_database_test_case
+{
+ protected $db;
+ protected $service_name;
+ protected $session_id;
+ protected $token_storage;
+ protected $token_storage_table;
+ protected $user;
+
+ protected function setup()
+ {
+ parent::setUp();
+
+ global $phpbb_root_path, $phpEx;
+
+ $this->db = $this->new_dbal();
+ $this->user = $this->getMock('\phpbb\user');
+ $this->service_name = 'auth.provider.oauth.service.testing';
+ $this->token_storage_table = 'phpbb_oauth_tokens';
+
+ // Give the user a session_id that we will remember
+ $this->session_id = '12345';
+ $this->user->data['session_id'] = $this->session_id;
+
+ // Set the user id to anonymous
+ $this->user->data['user_id'] = ANONYMOUS;
+
+ $this->token_storage = new \phpbb\auth\provider\oauth\token_storage($this->db, $this->user, $this->token_storage_table);
+ }
+
+ public function getDataSet()
+ {
+ return $this->createXMLDataSet(dirname(__FILE__).'/fixtures/oauth_tokens.xml');
+ }
+
+ public static function retrieveAccessToken_data()
+ {
+ return array(
+ array(new StdOAuth2Token('access', 'refresh', StdOAuth2Token::EOL_NEVER_EXPIRES, array('extra' => 'param')), null),
+ array(null, 'OAuth\Common\Storage\Exception\TokenNotFoundException'),
+ );
+ }
+
+ /**
+ * @dataProvider retrieveAccessToken_data
+ */
+ public function test_retrieveAccessToken($cache_token, $exception)
+ {
+ if ($cache_token)
+ {
+ $this->token_storage->storeAccessToken($this->service_name, $cache_token);
+ $token = $cache_token;
+ }
+
+ $this->setExpectedException($exception);
+
+ $stored_token = $this->token_storage->retrieveAccessToken($this->service_name);
+ $this->assertEquals($token, $stored_token);
+ }
+
+ public function test_retrieveAccessToken_from_db()
+ {
+ $expected_token = new StdOAuth2Token('access', 'refresh', StdOAuth2Token::EOL_NEVER_EXPIRES);
+
+ // Store a token in the database
+ $temp_storage = new \phpbb\auth\provider\oauth\token_storage($this->db, $this->user, $this->token_storage_table);
+ $temp_storage->storeAccessToken($this->service_name, $expected_token);
+ unset($temp_storage);
+
+ // Test to see if the token can be retrieved
+ $stored_token = $this->token_storage->retrieveAccessToken($this->service_name);
+ $this->assertEquals($expected_token, $stored_token);
+ }
+
+ /**
+ * @dataProvider retrieveAccessToken_data
+ */
+ public function test_retrieve_access_token_by_session($cache_token, $exception)
+ {
+ if ($cache_token)
+ {
+ $this->token_storage->storeAccessToken($this->service_name, $cache_token);
+ $token = $cache_token;
+ }
+
+ $this->setExpectedException($exception);
+
+ $stored_token = $this->token_storage->retrieve_access_token_by_session($this->service_name);
+ $this->assertEquals($token, $stored_token);
+ }
+
+ public function test_retrieve_access_token_by_session_from_db()
+ {
+ $expected_token = new StdOAuth2Token('access', 'refresh', StdOAuth2Token::EOL_NEVER_EXPIRES);
+
+ // Store a token in the database
+ $temp_storage = new \phpbb\auth\provider\oauth\token_storage($this->db, $this->user, $this->token_storage_table);
+ $temp_storage->storeAccessToken($this->service_name, $expected_token);
+ unset($temp_storage);
+
+ // Test to see if the token can be retrieved
+ $stored_token = $this->token_storage->retrieve_access_token_by_session($this->service_name);
+ $this->assertEquals($expected_token, $stored_token);
+ }
+
+ public function test_storeAccessToken()
+ {
+ $token = new StdOAuth2Token('access', 'refresh', StdOAuth2Token::EOL_NEVER_EXPIRES, array('extra' => 'param') );
+ $this->token_storage->storeAccessToken($this->service_name, $token);
+
+ // Confirm that the token is cached
+ $extraParams = $this->token_storage->retrieveAccessToken($this->service_name)->getExtraParams();
+ $this->assertEquals( 'param', $extraParams['extra'] );
+ $this->assertEquals( 'access', $this->token_storage->retrieveAccessToken($this->service_name)->getAccessToken() );
+
+ $row = $this->get_token_row_by_session_id($this->session_id);
+
+ // The token is serialized before stored in the database
+ $this->assertEquals($this->token_storage->json_encode_token($token), $row['oauth_token']);
+ }
+
+ public static function hasAccessToken_data()
+ {
+ return array(
+ array(null, false),
+ array(new StdOAuth2Token('access', 'refresh', StdOAuth2Token::EOL_NEVER_EXPIRES, array('extra' => 'param') ), true),
+ );
+ }
+
+ /**
+ * @dataProvider hasAccessToken_data
+ */
+ public function test_hasAccessToken($token, $expected)
+ {
+ if ($token)
+ {
+ $this->token_storage->storeAccessToken($this->service_name, $token);
+ }
+
+ $has_access_token = $this->token_storage->hasAccessToken($this->service_name);
+ $this->assertEquals($expected, $has_access_token);
+ }
+
+ /**
+ * @dataProvider hasAccessToken_data
+ */
+ public function test_has_access_token_by_session($token, $expected)
+ {
+ if ($token)
+ {
+ $this->token_storage->storeAccessToken($this->service_name, $token);
+ }
+
+ $has_access_token = $this->token_storage->has_access_token_by_session($this->service_name);
+ $this->assertEquals($expected, $has_access_token);
+ }
+
+ public function test_clearToken()
+ {
+ $token = new StdOAuth2Token('access', 'refresh', StdOAuth2Token::EOL_NEVER_EXPIRES, array('extra' => 'param') );
+ $this->token_storage->storeAccessToken($this->service_name, $token);
+
+ $this->token_storage->clearToken($this->service_name);
+
+ // Check that the database has been cleared
+ $row = $this->get_token_row_by_session_id($this->session_id);
+ $this->assertFalse($row);
+
+ // Check that the token is no longer in memory
+ $this->assertFalse($this->token_storage->hasAccessToken($this->service_name));
+ }
+
+ public function test_set_user_id()
+ {
+ $token = new StdOAuth2Token('access', 'refresh', StdOAuth2Token::EOL_NEVER_EXPIRES, array('extra' => 'param') );
+ $this->token_storage->storeAccessToken($this->service_name, $token);
+
+ $new_user_id = ANONYMOUS + 1;
+ $this->token_storage->set_user_id($new_user_id);
+
+ $row = $this->get_token_row_by_session_id($this->session_id);
+ $this->assertEquals($new_user_id, $row['user_id']);
+ }
+
+ protected function get_token_row_by_session_id($session_id)
+ {
+ // Test that the token is stored in the database
+ $sql = 'SELECT * FROM phpbb_oauth_tokens
+ WHERE session_id = \'' . $this->db->sql_escape($session_id) . '\'';
+ $result = $this->db->sql_query($sql);
+ $row = $this->db->sql_fetchrow($result);
+ $this->db->sql_freeresult($result);
+
+ return $row;
+ }
+}
diff --git a/tests/avatar/driver/barfoo.php b/tests/avatar/driver/barfoo.php
new file mode 100644
index 0000000000..0bf30b8a91
--- /dev/null
+++ b/tests/avatar/driver/barfoo.php
@@ -0,0 +1,26 @@
+<?php
+
+namespace phpbb\avatar\driver;
+
+class barfoo extends \phpbb\avatar\driver\driver
+{
+ public function get_data($row)
+ {
+ return array();
+ }
+
+ public function prepare_form($request, $template, $user, $row, &$error)
+ {
+ return false;
+ }
+
+ public function process_form($request, $template, $user, $row, &$error)
+ {
+ return false;
+ }
+
+ public function get_template_name()
+ {
+ return 'barfoo.html';
+ }
+}
diff --git a/tests/avatar/driver/foobar.php b/tests/avatar/driver/foobar.php
new file mode 100644
index 0000000000..aabdaf5ac4
--- /dev/null
+++ b/tests/avatar/driver/foobar.php
@@ -0,0 +1,26 @@
+<?php
+
+namespace phpbb\avatar\driver;
+
+class foobar extends \phpbb\avatar\driver\driver
+{
+ public function get_data($row)
+ {
+ return array();
+ }
+
+ public function prepare_form($request, $template, $user, $row, &$error)
+ {
+ return false;
+ }
+
+ public function process_form($request, $template, $user, $row, &$error)
+ {
+ return false;
+ }
+
+ public function get_template_name()
+ {
+ return 'foobar.html';
+ }
+}
diff --git a/tests/avatar/manager_test.php b/tests/avatar/manager_test.php
new file mode 100644
index 0000000000..527bb223d5
--- /dev/null
+++ b/tests/avatar/manager_test.php
@@ -0,0 +1,268 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+require_once dirname(__FILE__) . '/driver/foobar.php';
+
+class phpbb_avatar_manager_test extends PHPUnit_Framework_TestCase
+{
+ public function setUp()
+ {
+ global $phpbb_root_path, $phpEx;
+
+ // Mock phpbb_container
+ $this->phpbb_container = $this->getMock('Symfony\Component\DependencyInjection\ContainerInterface');
+ $this->phpbb_container->expects($this->any())
+ ->method('get')
+ ->will($this->returnArgument(0));
+
+ // Prepare dependencies for avatar manager and driver
+ $config = new \phpbb\config\config(array());
+ $request = $this->getMock('\phpbb\request\request');
+ $cache = $this->getMock('\phpbb\cache\driver\driver_interface');
+ $path_helper = new \phpbb\path_helper(
+ new \phpbb\symfony_request(
+ new phpbb_mock_request()
+ ),
+ new \phpbb\filesystem(),
+ $this->phpbb_root_path,
+ $this->phpEx
+ );
+
+ // $this->avatar_foobar will be needed later on
+ $this->avatar_foobar = $this->getMock('\phpbb\avatar\driver\foobar', array('get_name'), array($config, $phpbb_root_path, $phpEx, $path_helper, $cache));
+ $this->avatar_foobar->expects($this->any())
+ ->method('get_name')
+ ->will($this->returnValue('avatar.driver.foobar'));
+ // barfoo driver can't be mocked with constructor arguments
+ $this->avatar_barfoo = $this->getMock('\phpbb\avatar\driver\barfoo', array('get_name'));
+ $this->avatar_barfoo->expects($this->any())
+ ->method('get_name')
+ ->will($this->returnValue('avatar.driver.barfoo'));
+ $avatar_drivers = array($this->avatar_foobar, $this->avatar_barfoo);
+
+ foreach ($this->avatar_drivers() as $driver)
+ {
+ $cur_avatar = $this->getMock('\phpbb\avatar\driver\\' . $driver, array('get_name'), array($config, $phpbb_root_path, $phpEx, $path_helper, $cache));
+ $cur_avatar->expects($this->any())
+ ->method('get_name')
+ ->will($this->returnValue('avatar.driver.' . $driver));
+ $config['allow_avatar_' . get_class($cur_avatar)] = false;
+ $avatar_drivers[] = $cur_avatar;
+ }
+
+ $config['allow_avatar_' . get_class($this->avatar_foobar)] = true;
+ $config['allow_avatar_' . get_class($this->avatar_barfoo)] = false;
+
+ // Set up avatar manager
+ $this->manager = new \phpbb\avatar\manager($config, $avatar_drivers, $this->phpbb_container);
+ }
+
+ protected function avatar_drivers()
+ {
+ return array(
+ 'local',
+ 'upload',
+ 'remote',
+ 'gravatar',
+ );
+ }
+
+ public function test_get_all_drivers()
+ {
+ $drivers = $this->manager->get_all_drivers();
+ $this->assertEquals(array(
+ 'avatar.driver.barfoo' => 'avatar.driver.barfoo',
+ 'avatar.driver.foobar' => 'avatar.driver.foobar',
+ 'avatar.driver.local' => 'avatar.driver.local',
+ 'avatar.driver.remote' => 'avatar.driver.remote',
+ 'avatar.driver.upload' => 'avatar.driver.upload',
+ 'avatar.driver.gravatar' => 'avatar.driver.gravatar',
+ ), $drivers);
+ }
+
+ public function test_get_enabled_drivers()
+ {
+ $drivers = $this->manager->get_enabled_drivers();
+ $this->assertArrayHasKey('avatar.driver.foobar', $drivers);
+ $this->assertArrayNotHasKey('avatar.driver.barfoo', $drivers);
+ $this->assertEquals('avatar.driver.foobar', $drivers['avatar.driver.foobar']);
+ }
+
+ public function get_driver_data_enabled()
+ {
+ return array(
+ array('avatar.driver.foobar', 'avatar.driver.foobar'),
+ array('avatar.driver.foo_wrong', null),
+ array('avatar.driver.local', null),
+ array(AVATAR_GALLERY, null),
+ array(AVATAR_UPLOAD, null),
+ array(AVATAR_REMOTE, null),
+ );
+ }
+
+ /**
+ * @dataProvider get_driver_data_enabled
+ */
+ public function test_get_driver_enabled($driver_name, $expected)
+ {
+ $driver = $this->manager->get_driver($driver_name);
+ $this->assertEquals($expected, ($driver === null) ? null : $driver->get_name());
+ }
+
+ public function get_driver_data_all()
+ {
+ return array(
+ array('avatar.driver.foobar', 'avatar.driver.foobar'),
+ array('avatar.driver.foo_wrong', null),
+ array('avatar.driver.local', 'avatar.driver.local'),
+ array(AVATAR_GALLERY, 'avatar.driver.local'),
+ array(AVATAR_UPLOAD, 'avatar.driver.upload'),
+ array(AVATAR_REMOTE, 'avatar.driver.remote'),
+ );
+ }
+
+ /**
+ * @dataProvider get_driver_data_all
+ */
+ public function test_get_driver_all($driver_name, $expected)
+ {
+ $driver = $this->manager->get_driver($driver_name, false);
+ $this->assertEquals($expected, ($driver === null) ? $driver : $driver->get_name());
+ }
+
+ public function test_get_avatar_settings()
+ {
+ $avatar_settings = $this->manager->get_avatar_settings($this->avatar_foobar);
+
+ $expected_settings = array(
+ 'allow_avatar_' . get_class($this->avatar_foobar) => array('lang' => 'ALLOW_' . strtoupper(get_class($this->avatar_foobar)), 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
+ );
+
+ $this->assertEquals($expected_settings, $avatar_settings);
+ }
+
+ public function database_row_data()
+ {
+ return array(
+ array(
+ array(
+ 'user_avatar' => '',
+ 'user_avatar_type' => '',
+ 'user_avatar_width' => '',
+ 'user_avatar_height' => '',
+ 'group_avatar' => '',
+ ),
+ array(
+ 'user_avatar' => '',
+ 'user_avatar_type' => '',
+ 'user_avatar_width' => '',
+ 'user_avatar_height' => '',
+ 'group_avatar' => '',
+ ),
+ 'foobar',
+ ),
+ array(
+ array(),
+ array(
+ 'avatar' => '',
+ 'avatar_type' => '',
+ 'avatar_width' => '',
+ 'avatar_height' => '',
+ ),
+ ),
+ array(
+ array(
+ 'user_avatar' => '',
+ 'user_id' => 5,
+ 'group_id' => 4,
+ ),
+ array(
+ 'user_avatar' => '',
+ 'user_id' => 5,
+ 'group_id' => 4,
+ ),
+ ),
+ array(
+ array(
+ 'user_avatar' => '',
+ 'user_id' => 5,
+ 'group_id' => 4,
+ ),
+ array(
+ 'avatar' => '',
+ 'id' => 5,
+ 'group_id' => 4,
+ ),
+ 'user',
+ ),
+ array(
+ array(
+ 'group_avatar' => '',
+ 'user_id' => 5,
+ 'group_id' => 4,
+ ),
+ array(
+ 'avatar' => '',
+ 'id' => 'g4',
+ 'user_id' => 5,
+ ),
+ 'group',
+ ),
+ );
+ }
+
+ /**
+ * @dataProvider database_row_data
+ */
+ public function test_clean_row(array $input, array $output, $prefix = '')
+ {
+ $cleaned_row = array();
+
+ $cleaned_row = \phpbb\avatar\manager::clean_row($input, $prefix);
+ foreach ($output as $key => $value)
+ {
+ $this->assertArrayHasKey($key, $cleaned_row);
+ $this->assertEquals($cleaned_row[$key], $value);
+ }
+ }
+
+ public function test_clean_driver_name()
+ {
+ $this->assertEquals('avatar.driver.local', $this->manager->clean_driver_name('avatar_driver_local'));
+ }
+
+ public function test_prepare_driver_name()
+ {
+ $this->assertEquals('avatar_driver_local', $this->manager->prepare_driver_name('avatar.driver.local'));
+ }
+
+ public function test_localize_errors()
+ {
+ $user = $this->getMock('\phpbb\user');
+ $lang_array = array(
+ array('FOOBAR_OFF', 'foobar_off'),
+ array('FOOBAR_EXPLAIN', 'FOOBAR_EXPLAIN %s'),
+ );
+ $user->expects($this->any())
+ ->method('lang')
+ ->will($this->returnValueMap($lang_array));
+
+ // Pass error as string
+ $this->assertEquals(array('foobar_off'), $this->manager->localize_errors($user, array('FOOBAR_OFF')));
+
+ // Pass error as array for vsprintf()
+ $this->assertEquals(array('FOOBAR_EXPLAIN foo'), $this->manager->localize_errors($user, array(array('FOOBAR_EXPLAIN', 'foo'))));
+
+ // Pass both types
+ $this->assertEquals(array('foobar_off', 'FOOBAR_EXPLAIN foo'), $this->manager->localize_errors($user, array(
+ 'FOOBAR_OFF',
+ array('FOOBAR_EXPLAIN', 'foo'),
+ )));
+ }
+}
diff --git a/tests/bbcode/parser_test.php b/tests/bbcode/parser_test.php
new file mode 100644
index 0000000000..d0dcce5bbf
--- /dev/null
+++ b/tests/bbcode/parser_test.php
@@ -0,0 +1,265 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php';
+require_once dirname(__FILE__) . '/../../phpBB/includes/functions_content.php';
+require_once dirname(__FILE__) . '/../../phpBB/includes/bbcode.php';
+require_once dirname(__FILE__) . '/../../phpBB/includes/message_parser.php';
+
+class phpbb_bbcode_parser_test extends PHPUnit_Framework_TestCase
+{
+ public function bbcode_firstpass_data()
+ {
+ return array(
+ // Default bbcodes from in their simplest way
+ array(
+ 'Test default bbcodes: simple bold',
+ '[b]bold[/b]',
+ '[b:]bold[/b:]',
+ ),
+ array(
+ 'Test default bbcodes: simple underlined',
+ '[u]underlined[/u]',
+ '[u:]underlined[/u:]',
+ ),
+ array(
+ 'Test default bbcodes: simple italic',
+ '[i]italic[/i]',
+ '[i:]italic[/i:]',
+ ),
+ array(
+ 'Test default bbcodes: simple color rgb',
+ '[color=#FF0000]colored[/color]',
+ '[color=#FF0000:]colored[/color:]',
+ ),
+ array(
+ 'Test default bbcodes: simple color name',
+ '[color=red]colored[/color]',
+ '[color=red:]colored[/color:]',
+ ),
+ array(
+ 'Test default bbcodes: simple size',
+ '[size=75]smaller[/size]',
+ '[size=75:]smaller[/size:]',
+ ),
+ array(
+ 'Test default bbcodes: simple quote',
+ '[quote]quoted[/quote]',
+ '[quote:]quoted[/quote:]',
+ ),
+ array(
+ 'Test default bbcodes: simple quote with username',
+ '[quote=&quot;username&quot;]quoted[/quote]',
+ '[quote=&quot;username&quot;:]quoted[/quote:]',
+ ),
+ array(
+ 'Test default bbcodes: simple code',
+ '[code]unparsed code[/code]',
+ '[code:]unparsed code[/code:]',
+ ),
+ array(
+ 'Test default bbcodes: simple php code',
+ '[code=php]unparsed code[/code]',
+ '[code=php:]<span class="syntaxdefault">unparsed&nbsp;code</span>[/code:]',
+ ),
+ array(
+ 'Test default bbcodes: simple list',
+ '[list]no item[/list]',
+ '[list:]no item[/list:u:]',
+ ),
+ array(
+ 'Test default bbcodes: simple list-item only',
+ '[*]unparsed',
+ '[*]unparsed',
+ ),
+ array(
+ 'Test default bbcodes: simple list-item',
+ '[list][*]item[/list]',
+ '[list:][*:]item[/*:m:][/list:u:]',
+ ),
+ array(
+ 'Test default bbcodes: simple list-item closed',
+ '[list][*]item[/*][/list]',
+ '[list:][*:]item[/*:][/list:u:]',
+ ),
+ array(
+ 'Test default bbcodes: simple list-item numbered',
+ '[list=1][*]item[/list]',
+ '[list=1:][*:]item[/*:m:][/list:o:]',
+ ),
+ array(
+ 'Test default bbcodes: simple list-item alpha',
+ '[list=a][*]item[/list]',
+ '[list=a:][*:]item[/*:m:][/list:o:]',
+ ),
+ array(
+ 'Test default bbcodes: simple list-item roman',
+ '[list=i][*]item[/list]',
+ '[list=i:][*:]item[/*:m:][/list:o:]',
+ ),
+ array(
+ 'Test default bbcodes: simple list-item disc',
+ '[list=disc][*]item[/list]',
+ '[list=disc:][*:]item[/*:m:][/list:u:]',
+ ),
+ array(
+ 'Test default bbcodes: simple list-item circle',
+ '[list=circle][*]item[/list]',
+ '[list=circle:][*:]item[/*:m:][/list:u:]',
+ ),
+ array(
+ 'Test default bbcodes: simple list-item square',
+ '[list=square][*]item[/list]',
+ '[list=square:][*:]item[/*:m:][/list:u:]',
+ ),
+ array(
+ 'Test default bbcodes: simple img',
+ '[img]https://area51.phpbb.com/images/area51.png[/img]',
+ '[img:]https&#58;//area51&#46;phpbb&#46;com/images/area51&#46;png[/img:]',
+ ),
+ array(
+ 'Test default bbcodes: simple url',
+ '[url]https://area51.phpbb.com/[/url]',
+ '[url:]https&#58;//area51&#46;phpbb&#46;com/[/url:]',
+ ),
+ array(
+ 'Test default bbcodes: simple url with description',
+ '[url=https://area51.phpbb.com/]Area51[/url]',
+ '[url=https&#58;//area51&#46;phpbb&#46;com/:]Area51[/url:]',
+ ),
+ array(
+ 'Test default bbcodes: simple email',
+ '[email]bbcode-test@phpbb.com[/email]',
+ '[email:]bbcode-test@phpbb&#46;com[/email:]',
+ ),
+ array(
+ 'Test default bbcodes: simple email with description',
+ '[email=bbcode-test@phpbb.com]Email[/email]',
+ '[email=bbcode-test@phpbb&#46;com:]Email[/email:]',
+ ),
+ array(
+ 'Test default bbcodes: simple attachment',
+ '[attachment=0]filename[/attachment]',
+ '[attachment=0:]<!-- ia0 -->filename<!-- ia0 -->[/attachment:]',
+ ),
+
+ // Special cases for quote which were reported as bugs before
+ array(
+ 'PHPBB3-1401 - correct: parsed',
+ '[quote=&quot;&#91;test]test&quot;]test [ test[/quote]',
+ '[quote=&quot;&#91;test]test&quot;:]test [ test[/quote:]',
+ ),
+ array(
+ 'PHPBB3-6117 - correct: parsed',
+ '[quote]test[/quote] test ] and [ test [quote]test[/quote]',
+ '[quote:]test[/quote:] test ] and [ test [quote:]test[/quote:]',
+ ),
+ array(
+ 'PHPBB3-6200 - correct: parsed',
+ '[quote=&quot;[&quot;]test[/quote]',
+ '[quote=&quot;&#91;&quot;:]test[/quote:]',
+ ),
+ array(
+ 'PHPBB3-9364 - quoted: "test[/[/b]quote] test" / non-quoted: "[/quote] test" - also failed if layout distorted',
+ '[quote]test[/[/b]quote] test [/quote][/quote] test',
+ '[quote:]test[/[/b]quote] test [/quote:][/quote] test',
+ ),
+ array(
+ 'PHPBB3-8096 - first quote tag parsed, second quote tag unparsed',
+ '[quote=&quot;a&quot;]a[/quote][quote=&quot;a]a[/quote]',
+ '[quote=&quot;a&quot;:]a[/quote:][quote=&quot;a]a[/quote]',
+ ),
+
+ // Simple bbcodes nesting
+ array(
+ 'Allow textual bbcodes in textual bbcodes',
+ '[b]bold [i]bold + italic[/i][/b]',
+ '[b:]bold [i:]bold + italic[/i:][/b:]',
+ ),
+ array(
+ 'Allow textual bbcodes in url with description',
+ '[url=https://area51.phpbb.com/]Area51 [i]italic[/i][/url]',
+ '[url=https&#58;//area51&#46;phpbb&#46;com/:]Area51 [i:]italic[/i:][/url:]',
+ ),
+ array(
+ 'Allow url with description in textual bbcodes',
+ '[i]italic [url=https://area51.phpbb.com/]Area51[/url][/i]',
+ '[i:]italic [url=https&#58;//area51&#46;phpbb&#46;com/:]Area51[/url:][/i:]',
+ ),
+
+ // Nesting bbcodes into quote usernames
+ array(
+ 'Allow textual bbcodes in usernames',
+ '[quote=&quot;[i]test[/i]&quot;]test[/quote]',
+ '[quote=&quot;[i:]test[/i:]&quot;:]test[/quote:]',
+ ),
+ array(
+ 'Allow links bbcodes in usernames',
+ '[quote=&quot;[url=https://area51.phpbb.com/]test[/url]&quot;]test[/quote]',
+ '[quote=&quot;[url=https&#58;//area51&#46;phpbb&#46;com/:]test[/url:]&quot;:]test[/quote:]',
+ ),
+ array(
+ 'Allow img bbcodes in usernames - Username displayed the image',
+ '[quote=&quot;[img]https://area51.phpbb.com/images/area51.png[/img]&quot;]test[/quote]',
+ '[quote=&quot;[img:]https&#58;//area51&#46;phpbb&#46;com/images/area51&#46;png[/img:]&quot;:]test[/quote:]',
+ ),
+ array(
+ 'Disallow flash bbcodes in usernames - Username displayed as [flash]http://www.phpbb.com/[/flash]',
+ '[quote=&quot;[flash]http://www.phpbb.com/[/flash]&quot;]test[/quote]',
+ '[quote=&quot;&#91;flash]http://www.phpbb.com/&#91;/flash]&quot;:]test[/quote:]',
+ ),
+ array(
+ 'Disallow quote bbcodes in usernames - Username displayed as [quote]test[/quote]',
+ '[quote=&quot;[quote]test[/quote]&quot;]test[/quote]',
+ '[quote=&quot;&#91;quote]test&#91;/quote]&quot;:]test[/quote:]',
+ ),
+
+ // Do not parse bbcodes in code boxes
+ array(
+ 'Do not parse textual bbcodes in code',
+ '[code]unparsed code [b]bold [i]bold + italic[/i][/b][/code]',
+ '[code:]unparsed code &#91;b&#93;bold &#91;i&#93;bold + italic&#91;/i&#93;&#91;/b&#93;[/code:]',
+ ),
+ array(
+ 'Do not parse quote bbcodes in code',
+ '[code]unparsed code [quote=&quot;username&quot;]quoted[/quote][/code]',
+ '[code:]unparsed code &#91;quote=&quot;username&quot;&#93;quoted&#91;/quote&#93;[/code:]',
+ ),
+
+ // New user friendly mixed nesting
+ array(
+ 'Textual bbcode nesting into textual bbcode',
+ '[b]bold [i]bold + italic[/b] italic[/i]',
+ '[b:]bold [i:]bold + italic[/b:] italic[/i:]',
+ 'Incomplete test case: secondpass parses as [b:]bold [i:]bold + italic[/i:] italic[/b:]',
+ ),
+ );
+ }
+
+ /**
+ * @dataProvider bbcode_firstpass_data
+ */
+ public function test_bbcode_firstpass($description, $message, $expected, $incomplete = false)
+ {
+ if ($incomplete)
+ {
+ $this->markTestIncomplete($incomplete);
+ }
+
+ global $user, $request;
+ $user = new phpbb_mock_user;
+ $request = new phpbb_mock_request;
+
+ $bbcode = new bbcode_firstpass();
+ $bbcode->message = $message;
+ $bbcode->bbcode_init(false);
+ $bbcode->parse_bbcode();
+ $this->assertEquals($expected, $bbcode->message);
+ }
+}
diff --git a/tests/bbcode/url_bbcode_test.php b/tests/bbcode/url_bbcode_test.php
index 6b5afe5808..d5df386714 100644
--- a/tests/bbcode/url_bbcode_test.php
+++ b/tests/bbcode/url_bbcode_test.php
@@ -11,7 +11,6 @@ require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php';
require_once dirname(__FILE__) . '/../../phpBB/includes/functions_content.php';
require_once dirname(__FILE__) . '/../../phpBB/includes/bbcode.php';
require_once dirname(__FILE__) . '/../../phpBB/includes/message_parser.php';
-require_once dirname(__FILE__) . '/../mock/user.php';
class phpbb_url_bbcode_test extends phpbb_test_case
{
@@ -51,8 +50,9 @@ class phpbb_url_bbcode_test extends phpbb_test_case
*/
public function test_url($description, $message, $expected)
{
- global $user;
+ global $user, $request;
$user = new phpbb_mock_user;
+ $request = new phpbb_mock_request;
$bbcode = new bbcode_firstpass();
$bbcode->message = $message;
diff --git a/tests/bootstrap.php b/tests/bootstrap.php
index d687db622a..afb586435c 100644
--- a/tests/bootstrap.php
+++ b/tests/bootstrap.php
@@ -14,28 +14,17 @@ require_once $phpbb_root_path . 'includes/startup.php';
$table_prefix = 'phpbb_';
require_once $phpbb_root_path . 'includes/constants.php';
+require_once $phpbb_root_path . 'phpbb/class_loader.' . $phpEx;
+
+$phpbb_class_loader_mock = new \phpbb\class_loader('phpbb_mock_', $phpbb_root_path . '../tests/mock/', "php");
+$phpbb_class_loader_mock->register();
+$phpbb_class_loader_ext = new \phpbb\class_loader('\\', $phpbb_root_path . 'ext/', "php");
+$phpbb_class_loader_ext->register();
+$phpbb_class_loader = new \phpbb\class_loader('phpbb\\', $phpbb_root_path . 'phpbb/', "php");
+$phpbb_class_loader->register();
require_once 'test_framework/phpbb_test_case_helpers.php';
require_once 'test_framework/phpbb_test_case.php';
require_once 'test_framework/phpbb_database_test_case.php';
require_once 'test_framework/phpbb_database_test_connection_manager.php';
-
-if (version_compare(PHP_VERSION, '5.3.0-dev', '>='))
-{
- if (getenv('PHPBB_NO_COMPOSER_AUTOLOAD'))
- {
- if (getenv('PHPBB_AUTOLOAD'))
- {
- require(getenv('PHPBB_AUTOLOAD'));
- }
- }
- else
- {
- if (!file_exists($phpbb_root_path . 'vendor/autoload.php'))
- {
- trigger_error('You have not set up composer dependencies. See http://getcomposer.org/.', E_USER_ERROR);
- }
- require($phpbb_root_path . 'vendor/autoload.php');
- }
- require_once 'test_framework/phpbb_functional_test_case.php';
-}
+require_once 'test_framework/phpbb_functional_test_case.php';
diff --git a/tests/cache/apc_driver_test.php b/tests/cache/apc_driver_test.php
new file mode 100644
index 0000000000..51f3ac24b6
--- /dev/null
+++ b/tests/cache/apc_driver_test.php
@@ -0,0 +1,53 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+// Important: apc.enable_cli=1 must be in php.ini.
+// http://forums.devshed.com/php-development-5/apc-problem-561290.html
+// http://php.net/manual/en/apc.configuration.php
+
+require_once dirname(__FILE__) . '/common_test_case.php';
+
+class phpbb_cache_apc_driver_test extends phpbb_cache_common_test_case
+{
+ protected static $config;
+ protected $driver;
+
+ public function getDataSet()
+ {
+ return $this->createXMLDataSet(dirname(__FILE__) . '/fixtures/config.xml');
+ }
+
+ static public function setUpBeforeClass()
+ {
+ if (!extension_loaded('apc'))
+ {
+ self::markTestSkipped('APC extension is not loaded');
+ }
+
+ $php_ini = new \phpbb\php\ini;
+
+ if (!$php_ini->get_bool('apc.enabled'))
+ {
+ self::markTestSkipped('APC is not enabled. Make sure apc.enabled=1 in php.ini');
+ }
+
+ if (PHP_SAPI == 'cli' && !$php_ini->get_bool('apc.enable_cli'))
+ {
+ self::markTestSkipped('APC is not enabled for CLI. Set apc.enable_cli=1 in php.ini');
+ }
+ }
+
+ protected function setUp()
+ {
+ parent::setUp();
+
+ $this->driver = new \phpbb\cache\driver\apc;
+ $this->driver->purge();
+ }
+}
diff --git a/tests/cache/common_test_case.php b/tests/cache/common_test_case.php
new file mode 100644
index 0000000000..3fe10c63e1
--- /dev/null
+++ b/tests/cache/common_test_case.php
@@ -0,0 +1,98 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+abstract class phpbb_cache_common_test_case extends phpbb_database_test_case
+{
+ public function test_get_put_exists()
+ {
+ $this->assertFalse($this->driver->_exists('test_key'));
+ $this->assertSame(false, $this->driver->get('test_key'));
+
+ $this->driver->put('test_key', 'test_value');
+
+ $this->assertTrue($this->driver->_exists('test_key'));
+ $this->assertEquals(
+ 'test_value',
+ $this->driver->get('test_key'),
+ 'File ACM put and get'
+ );
+ }
+
+ public function test_purge()
+ {
+ $this->driver->put('test_key', 'test_value');
+
+ $this->assertEquals(
+ 'test_value',
+ $this->driver->get('test_key'),
+ 'File ACM put and get'
+ );
+
+ $this->driver->purge();
+
+ $this->assertSame(false, $this->driver->get('test_key'));
+ }
+
+ public function test_destroy()
+ {
+ $this->driver->put('first_key', 'first_value');
+ $this->driver->put('second_key', 'second_value');
+
+ $this->assertEquals(
+ 'first_value',
+ $this->driver->get('first_key')
+ );
+ $this->assertEquals(
+ 'second_value',
+ $this->driver->get('second_key')
+ );
+
+ $this->driver->destroy('first_key');
+
+ $this->assertFalse($this->driver->_exists('first_key'));
+ $this->assertEquals(
+ 'second_value',
+ $this->driver->get('second_key')
+ );
+ }
+
+ public function test_cache_sql()
+ {
+ global $db, $cache, $phpbb_root_path, $phpEx;
+ $config = new phpbb\config\config(array());
+ $db = $this->new_dbal();
+ $cache = new \phpbb\cache\service($this->driver, $config, $db, $phpbb_root_path, $phpEx);
+
+ $sql = "SELECT * FROM phpbb_config
+ WHERE config_name = 'foo'";
+
+ $result = $db->sql_query($sql, 300);
+ $first_result = $db->sql_fetchrow($result);
+ $expected = array('config_name' => 'foo', 'config_value' => '23', 'is_dynamic' => 0);
+ $this->assertEquals($expected, $first_result);
+
+ $sql = 'DELETE FROM phpbb_config';
+ $result = $db->sql_query($sql);
+
+ $sql = "SELECT * FROM phpbb_config
+ WHERE config_name = 'foo'";
+ $result = $db->sql_query($sql, 300);
+
+ $this->assertEquals($expected, $db->sql_fetchrow($result));
+
+ $sql = "SELECT * FROM phpbb_config
+ WHERE config_name = 'foo'";
+ $result = $db->sql_query($sql);
+
+ $no_cache_result = $db->sql_fetchrow($result);
+ $this->assertSame(false, $no_cache_result);
+
+ $db->sql_close();
+ }
+}
diff --git a/tests/cache/file_driver_test.php b/tests/cache/file_driver_test.php
new file mode 100644
index 0000000000..c0843e8ed9
--- /dev/null
+++ b/tests/cache/file_driver_test.php
@@ -0,0 +1,69 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2010 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+require_once dirname(__FILE__) . '/common_test_case.php';
+
+class phpbb_cache_file_driver_test extends phpbb_cache_common_test_case
+{
+ private $cache_dir;
+ protected $driver;
+
+ public function __construct()
+ {
+ $this->cache_dir = dirname(__FILE__) . '/../tmp/cache/';
+ }
+
+ public function getDataSet()
+ {
+ return $this->createXMLDataSet(dirname(__FILE__) . '/fixtures/config.xml');
+ }
+
+ protected function setUp()
+ {
+ parent::setUp();
+
+ if (file_exists($this->cache_dir))
+ {
+ // cache directory possibly left after aborted
+ // or failed run earlier
+ $this->remove_cache_dir();
+ }
+ $this->create_cache_dir();
+
+ $this->driver = new \phpbb\cache\driver\file($this->cache_dir);
+ }
+
+ protected function tearDown()
+ {
+ if (file_exists($this->cache_dir))
+ {
+ $this->remove_cache_dir();
+ }
+
+ parent::tearDown();
+ }
+
+ private function create_cache_dir()
+ {
+ $this->get_test_case_helpers()->makedirs($this->cache_dir);
+ }
+
+ private function remove_cache_dir()
+ {
+ $iterator = new DirectoryIterator($this->cache_dir);
+ foreach ($iterator as $file)
+ {
+ if ($file != '.' && $file != '..')
+ {
+ unlink($this->cache_dir . '/' . $file);
+ }
+ }
+ rmdir($this->cache_dir);
+ }
+}
diff --git a/tests/cache/fixtures/config.xml b/tests/cache/fixtures/config.xml
new file mode 100644
index 0000000000..9d395b685c
--- /dev/null
+++ b/tests/cache/fixtures/config.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<dataset>
+ <table name="phpbb_config">
+ <column>config_name</column>
+ <column>config_value</column>
+ <column>is_dynamic</column>
+ <row>
+ <value>foo</value>
+ <value>23</value>
+ <value>0</value>
+ </row>
+ <row>
+ <value>bar</value>
+ <value>42</value>
+ <value>1</value>
+ </row>
+ </table>
+</dataset>
diff --git a/tests/cache/null_driver_test.php b/tests/cache/null_driver_test.php
new file mode 100644
index 0000000000..58e57f2b3a
--- /dev/null
+++ b/tests/cache/null_driver_test.php
@@ -0,0 +1,75 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+class phpbb_cache_null_driver_test extends phpbb_database_test_case
+{
+ protected $driver;
+
+ public function getDataSet()
+ {
+ return $this->createXMLDataSet(dirname(__FILE__) . '/fixtures/config.xml');
+ }
+
+ protected function setUp()
+ {
+ parent::setUp();
+
+ $this->driver = new \phpbb\cache\driver\null;
+ }
+
+ public function test_get_put()
+ {
+ $this->assertSame(false, $this->driver->get('key'));
+
+ $this->driver->put('key', 'value');
+
+ // null driver does not cache
+ $this->assertSame(false, $this->driver->get('key'));
+ }
+
+ public function test_purge()
+ {
+ // does nothing
+ $this->driver->purge();
+ }
+
+ public function test_destroy()
+ {
+ // does nothing
+ $this->driver->destroy('foo');
+ }
+
+ public function test_cache_sql()
+ {
+ global $db, $cache, $phpbb_root_path, $phpEx;
+ $config = new phpbb\config\config(array());
+ $db = $this->new_dbal();
+ $cache = new \phpbb\cache\service($this->driver, $config, $db, $phpbb_root_path, $phpEx);
+
+ $sql = "SELECT * FROM phpbb_config
+ WHERE config_name = 'foo'";
+ $result = $db->sql_query($sql, 300);
+ $first_result = $db->sql_fetchrow($result);
+ $expected = array('config_name' => 'foo', 'config_value' => '23', 'is_dynamic' => 0);
+ $this->assertEquals($expected, $first_result);
+
+ $sql = 'DELETE FROM phpbb_config';
+ $result = $db->sql_query($sql);
+
+ // As null cache driver does not actually cache,
+ // this should return no results
+ $sql = "SELECT * FROM phpbb_config
+ WHERE config_name = 'foo'";
+ $result = $db->sql_query($sql, 300);
+
+ $this->assertSame(false, $db->sql_fetchrow($result));
+
+ $db->sql_close();
+ }
+}
diff --git a/tests/cache/redis_driver_test.php b/tests/cache/redis_driver_test.php
new file mode 100644
index 0000000000..3d954dc0db
--- /dev/null
+++ b/tests/cache/redis_driver_test.php
@@ -0,0 +1,49 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+require_once dirname(__FILE__) . '/common_test_case.php';
+
+class phpbb_cache_redis_driver_test extends phpbb_cache_common_test_case
+{
+ protected static $config;
+ protected $driver;
+
+ public function getDataSet()
+ {
+ return $this->createXMLDataSet(dirname(__FILE__) . '/fixtures/config.xml');
+ }
+
+ static public function setUpBeforeClass()
+ {
+ if (!extension_loaded('redis'))
+ {
+ self::markTestSkipped('redis extension is not loaded');
+ }
+
+ $config = phpbb_test_case_helpers::get_test_config();
+ if (isset($config['redis_host']) || isset($config['redis_port']))
+ {
+ $host = isset($config['redis_host']) ? $config['redis_host'] : 'localhost';
+ $port = isset($config['redis_port']) ? $config['redis_port'] : 6379;
+ self::$config = array('host' => $host, 'port' => $port);
+ }
+ else
+ {
+ self::markTestSkipped('Test redis host/port is not specified');
+ }
+ }
+
+ protected function setUp()
+ {
+ parent::setUp();
+
+ $this->driver = new \phpbb\cache\driver\redis(self::$config['host'], self::$config['port']);
+ $this->driver->purge();
+ }
+}
diff --git a/tests/class_loader/class_loader_test.php b/tests/class_loader/class_loader_test.php
new file mode 100644
index 0000000000..6e551f658a
--- /dev/null
+++ b/tests/class_loader/class_loader_test.php
@@ -0,0 +1,97 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2011 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+class phpbb_class_loader_test extends PHPUnit_Framework_TestCase
+{
+ public function setUp()
+ {
+ global $phpbb_class_loader;
+ $phpbb_class_loader->unregister();
+
+ global $phpbb_class_loader_ext;
+ $phpbb_class_loader_ext->unregister();
+ }
+
+ public function tearDown()
+ {
+ global $phpbb_class_loader_ext;
+ $phpbb_class_loader_ext->register();
+
+ global $phpbb_class_loader;
+ $phpbb_class_loader->register();
+ }
+
+ public function test_resolve_path()
+ {
+ $prefix = dirname(__FILE__) . '/';
+ $class_loader = new \phpbb\class_loader('phpbb\\', $prefix . 'phpbb/');
+
+ $prefix .= 'phpbb/';
+
+ $this->assertEquals(
+ $prefix . 'class_name.php',
+ $class_loader->resolve_path('\\phpbb\\class_name'),
+ 'Top level class'
+ );
+ $this->assertEquals(
+ $prefix . 'dir/class_name.php',
+ $class_loader->resolve_path('\\phpbb\\dir\\class_name'),
+ 'Class in a directory'
+ );
+ $this->assertEquals(
+ $prefix . 'dir/subdir/class_name.php',
+ $class_loader->resolve_path('\\phpbb\\dir\\subdir\\class_name'),
+ 'Class in a sub-directory'
+ );
+ $this->assertEquals(
+ $prefix . 'dir2/dir2.php',
+ $class_loader->resolve_path('\\phpbb\\dir2\\dir2'),
+ 'Class with name of dir within dir'
+ );
+ }
+
+ public function test_resolve_cached()
+ {
+ $cache_map = array(
+ 'class_loader___phpbb__' => array('\\phpbb\\a\\cached_name' => 'a/cached_name'),
+ 'class_loader___' => array('\\phpbb\\ext\\foo' => 'foo'),
+ );
+ $cache = new phpbb_mock_cache($cache_map);
+
+ $prefix = dirname(__FILE__) . '/';
+ $class_loader = new \phpbb\class_loader('phpbb\\', $prefix . 'phpbb/', 'php', $cache);
+ $class_loader_ext = new \phpbb\class_loader('\\', $prefix . 'phpbb/', 'php', $cache);
+
+ $prefix .= 'phpbb/';
+
+ $this->assertEquals(
+ $prefix . 'dir/class_name.php',
+ $class_loader->resolve_path('\\phpbb\\dir\\class_name'),
+ 'Class in a directory'
+ );
+
+ $this->assertFalse($class_loader->resolve_path('\\phpbb\\ext\\foo'));
+ $this->assertFalse($class_loader_ext->resolve_path('\\phpbb\\a\\cached_name'));
+
+ $this->assertEquals(
+ $prefix . 'a/cached_name.php',
+ $class_loader->resolve_path('\\phpbb\\a\\cached_name'),
+ 'Cached class found'
+ );
+
+ $this->assertEquals(
+ $prefix . 'foo.php',
+ $class_loader_ext->resolve_path('\\phpbb\\ext\\foo'),
+ 'Cached class found in alternative loader'
+ );
+
+ $cache_map['class_loader___phpbb__']['\\phpbb\\dir\\class_name'] = 'dir/class_name';
+ $cache->check($this, $cache_map);
+ }
+}
diff --git a/tests/class_loader/phpbb/class_name.php b/tests/class_loader/phpbb/class_name.php
new file mode 100644
index 0000000000..64a3fa646e
--- /dev/null
+++ b/tests/class_loader/phpbb/class_name.php
@@ -0,0 +1,8 @@
+<?php
+
+namespace phpbb;
+
+class class_name
+{
+}
+
diff --git a/tests/class_loader/phpbb/dir/class_name.php b/tests/class_loader/phpbb/dir/class_name.php
new file mode 100644
index 0000000000..1cd39a1181
--- /dev/null
+++ b/tests/class_loader/phpbb/dir/class_name.php
@@ -0,0 +1,8 @@
+<?php
+
+namespace phpbb\dir;
+
+class class_name
+{
+}
+
diff --git a/tests/class_loader/phpbb/dir/subdir/class_name.php b/tests/class_loader/phpbb/dir/subdir/class_name.php
new file mode 100644
index 0000000000..89affbc847
--- /dev/null
+++ b/tests/class_loader/phpbb/dir/subdir/class_name.php
@@ -0,0 +1,8 @@
+<?php
+
+namespace phpbb\dir\subdir;
+
+class class_name
+{
+}
+
diff --git a/tests/class_loader/phpbb/dir2/dir2.php b/tests/class_loader/phpbb/dir2/dir2.php
new file mode 100644
index 0000000000..b273511fcd
--- /dev/null
+++ b/tests/class_loader/phpbb/dir2/dir2.php
@@ -0,0 +1,8 @@
+<?php
+
+namespace phpbb;
+
+class dir2
+{
+}
+
diff --git a/tests/compress/compress_test.php b/tests/compress/compress_test.php
index ce193cf3ba..6623f7ed8a 100644
--- a/tests/compress/compress_test.php
+++ b/tests/compress/compress_test.php
@@ -25,6 +25,12 @@ class phpbb_compress_test extends phpbb_test_case
'dir/subdir/4.txt',
);
+ protected $conflicts = array(
+ '1_1.txt',
+ '1_2.txt',
+ 'dir/2_1.txt',
+ );
+
protected function setUp()
{
// Required for compress::add_file
@@ -88,6 +94,11 @@ class phpbb_compress_test extends phpbb_test_case
);
$compress->add_custom_file($this->path . 'dir/3.txt', 'dir/3.txt');
$compress->add_data(file_get_contents($this->path . 'dir/subdir/4.txt'), 'dir/subdir/4.txt');
+
+ // Add multiples of the same file to check conflicts are handled
+ $compress->add_file($this->path . '1.txt', $this->path);
+ $compress->add_file($this->path . '1.txt', $this->path);
+ $compress->add_file($this->path . 'dir/2.txt', $this->path);
}
protected function valid_extraction($extra = array())
@@ -150,7 +161,7 @@ class phpbb_compress_test extends phpbb_test_case
$compress->mode = 'r';
$compress->open();
$compress->extract('tests/compress/' . self::EXTRACT_DIR);
- $this->valid_extraction();
+ $this->valid_extraction($this->conflicts);
}
/**
@@ -168,6 +179,6 @@ class phpbb_compress_test extends phpbb_test_case
$compress = new compress_zip('r', $zip);
$compress->extract('tests/compress/' . self::EXTRACT_DIR);
- $this->valid_extraction();
+ $this->valid_extraction($this->conflicts);
}
}
diff --git a/tests/config/config_test.php b/tests/config/config_test.php
new file mode 100644
index 0000000000..5373fcef5f
--- /dev/null
+++ b/tests/config/config_test.php
@@ -0,0 +1,120 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2010 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+class phpbb_config_test extends phpbb_test_case
+{
+ public function test_offset_exists()
+ {
+ $config = new \phpbb\config\config(array('foo' => 'bar'));
+
+ $this->assertTrue(isset($config['foo']));
+ $this->assertFalse(isset($config['foobar']));
+ }
+
+ public function test_offset_get()
+ {
+ $config = new \phpbb\config\config(array('foo' => 'bar'));
+ $this->assertEquals('bar', $config['foo']);
+ }
+
+ public function test_offset_get_missing()
+ {
+ $config = new \phpbb\config\config(array());
+ $this->assertEquals('', $config['foo']);
+ }
+
+ public function test_offset_set()
+ {
+ $config = new \phpbb\config\config(array());
+ $config['foo'] = 'x';
+ $this->assertEquals('x', $config['foo']);
+ }
+
+ public function test_offset_unset_fails()
+ {
+ $this->setExpectedTriggerError(E_USER_ERROR);
+ $config = new \phpbb\config\config(array('foo' => 'x'));
+ unset($config['foo']);
+ }
+
+ public function test_count()
+ {
+ $config = new \phpbb\config\config(array('foo' => 'bar'));
+ $this->assertEquals(1, count($config));
+ }
+
+ public function test_iterate()
+ {
+ $vars = array('foo' => '23', 'bar' => '42');
+ $config = new \phpbb\config\config($vars);
+
+ $count = 0;
+ foreach ($config as $key => $value)
+ {
+ $this->assertTrue(isset($vars[$key]));
+ $this->assertEquals($vars[$key], $value);
+
+ $count++;
+ }
+
+ $this->assertEquals(count($vars), $count);
+ }
+
+ public function test_set_overwrite()
+ {
+ $config = new \phpbb\config\config(array('foo' => 'x'));
+ $config->set('foo', 'bar');
+ $this->assertEquals('bar', $config['foo']);
+ }
+
+ public function test_set_new()
+ {
+ $config = new \phpbb\config\config(array());
+ $config->set('foo', 'bar');
+ $this->assertEquals('bar', $config['foo']);
+ }
+
+ public function test_set_atomic_overwrite()
+ {
+ $config = new \phpbb\config\config(array('foo' => 'bar'));
+ $this->assertTrue($config->set_atomic('foo', 'bar', '23'));
+ $this->assertEquals('23', $config['foo']);
+ }
+
+ public function test_set_atomic_new()
+ {
+ $config = new \phpbb\config\config(array());
+ $this->assertTrue($config->set_atomic('foo', false, '23'));
+ $this->assertEquals('23', $config['foo']);
+ }
+
+ public function test_set_atomic_failure()
+ {
+ $config = new \phpbb\config\config(array('foo' => 'bar'));
+ $this->assertFalse($config->set_atomic('foo', 'wrong', '23'));
+ $this->assertEquals('bar', $config['foo']);
+ }
+
+ public function test_increment()
+ {
+ $config = new \phpbb\config\config(array('foo' => '23'));
+ $config->increment('foo', 3);
+ $this->assertEquals(26, $config['foo']);
+ $config->increment('foo', 1);
+ $this->assertEquals(27, $config['foo']);
+ }
+
+ public function test_delete()
+ {
+ $config = new \phpbb\config\config(array('foo' => 'bar'));
+
+ $config->delete('foo');
+ $this->assertFalse(isset($config['foo']));
+ }
+}
diff --git a/tests/config/db_test.php b/tests/config/db_test.php
new file mode 100644
index 0000000000..dd1c88f707
--- /dev/null
+++ b/tests/config/db_test.php
@@ -0,0 +1,164 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2010 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+class phpbb_config_db_test extends phpbb_database_test_case
+{
+ private $cache;
+ private $db;
+ private $config;
+
+ public function getDataSet()
+ {
+ return $this->createXMLDataSet(dirname(__FILE__) . '/fixtures/config.xml');
+ }
+
+ public function setUp()
+ {
+ parent::setUp();
+
+ $this->cache = new phpbb_mock_cache;
+ $this->db = $this->new_dbal();
+ $this->config = new \phpbb\config\db($this->db, $this->cache, 'phpbb_config');
+ }
+
+ public function test_load_config()
+ {
+ $this->assertEquals('23', $this->config['foo']);
+ $this->assertEquals('42', $this->config['bar']);
+ }
+
+ public function test_load_cached()
+ {
+ $cache = new phpbb_mock_cache(array('config' => array('x' => 'y')));
+ $this->config = new \phpbb\config\db($this->db, $cache, 'phpbb_config');
+
+ $this->assertTrue(!isset($this->config['foo']));
+ $this->assertEquals('42', $this->config['bar']);
+
+ $this->assertEquals('y', $this->config['x']);
+ }
+
+ public function test_offset_set()
+ {
+ $this->config['foo'] = 'x'; // temporary set
+ $this->assertEquals('x', $this->config['foo']);
+
+ $config2 = new \phpbb\config\db($this->db, $this->cache, 'phpbb_config');
+ $this->assertEquals('23', $config2['foo']);
+ }
+
+ public function test_set_overwrite()
+ {
+ $this->config->set('foo', '17');
+ $this->assertEquals('17', $this->config['foo']);
+
+ // re-read config and populate cache
+ $config2 = new \phpbb\config\db($this->db, $this->cache, 'phpbb_config');
+ $this->cache->checkVar($this, 'config', array('foo' => '17'));
+ }
+
+ public function test_set_overwrite_uncached()
+ {
+ $this->config->set('bar', '17', false);
+
+ // re-read config and populate cache
+ $config2 = new \phpbb\config\db($this->db, $this->cache, 'phpbb_config');
+ $this->cache->checkVar($this, 'config', array('foo' => '23'));
+ }
+
+ public function test_set_new()
+ {
+ $this->config->set('foobar', '5');
+ $this->assertEquals('5', $this->config['foobar']);
+
+ // re-read config and populate cache
+ $config2 = new \phpbb\config\db($this->db, $this->cache, 'phpbb_config');
+ $this->cache->checkVar($this, 'config', array('foo' => '23', 'foobar' => '5'));
+ }
+
+ public function test_set_new_uncached()
+ {
+ $this->config->set('foobar', '5', false);
+ $this->assertEquals('5', $this->config['foobar']);
+
+ // re-read config and populate cache
+ $config2 = new \phpbb\config\db($this->db, $this->cache, 'phpbb_config');
+ $this->cache->checkVar($this, 'config', array('foo' => '23'));
+ }
+
+ public function test_set_atomic_overwrite()
+ {
+ $this->assertTrue($this->config->set_atomic('foo', '23', '17'));
+ $this->assertEquals('17', $this->config['foo']);
+ }
+
+ public function test_set_atomic_new()
+ {
+ $this->assertTrue($this->config->set_atomic('foobar', false, '5'));
+ $this->assertEquals('5', $this->config['foobar']);
+ }
+
+ public function test_set_atomic_failure()
+ {
+ $this->assertFalse($this->config->set_atomic('foo', 'wrong', '17'));
+ $this->assertEquals('23', $this->config['foo']);
+ }
+
+ public function test_increment()
+ {
+ $this->config->increment('foo', 3);
+ $this->assertEquals(26, $this->config['foo']);
+ $this->config->increment('foo', 1);
+ $this->assertEquals(27, $this->config['foo']);
+ }
+
+ public function test_increment_new()
+ {
+ $this->config->increment('foobar', 3);
+ $this->assertEquals(3, $this->config['foobar']);;
+ }
+
+ public function test_delete()
+ {
+ $this->assertTrue(isset($this->config['foo']));
+ $this->config->delete('foo');
+ $this->cache->checkVarUnset($this, 'foo');
+ $this->assertFalse(isset($this->config['foo']));
+
+ // re-read config and populate cache
+ $cache2 = new phpbb_mock_cache;
+ $config2 = new \phpbb\config\db($this->db, $cache2, 'phpbb_config');
+ $cache2->checkVarUnset($this, 'foo');
+ $this->assertFalse(isset($config2['foo']));
+ }
+
+ public function test_delete_write_read_not_cacheable()
+ {
+ // bar is dynamic
+ $this->assertTrue(isset($this->config['bar']));
+ $this->config->delete('bar');
+ $this->cache->checkVarUnset($this, 'bar');
+ $this->assertFalse(isset($this->config['bar']));
+
+ $this->config->set('bar', 'new bar', false);
+ $this->assertEquals('new bar', $this->config['bar']);
+ }
+
+ public function test_delete_write_read_cacheable()
+ {
+ // foo is not dynamic
+ $this->assertTrue(isset($this->config['foo']));
+ $this->config->delete('foo');
+ $this->cache->checkVarUnset($this, 'foo');
+ $this->assertFalse(isset($this->config['foo']));
+
+ $this->config->set('foo', 'new foo', true);
+ $this->assertEquals('new foo', $this->config['foo']);
+ }
+}
diff --git a/tests/config/db_text_test.php b/tests/config/db_text_test.php
new file mode 100644
index 0000000000..354c0efacf
--- /dev/null
+++ b/tests/config/db_text_test.php
@@ -0,0 +1,115 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+class phpbb_config_db_text_test extends phpbb_database_test_case
+{
+ private $db;
+ private $config_text;
+
+ public function getDataSet()
+ {
+ return $this->createXMLDataSet(dirname(__FILE__) . '/fixtures/config_text.xml');
+ }
+
+ public function setUp()
+ {
+ parent::setUp();
+
+ $this->db = $this->new_dbal();
+ $this->config_text = new \phpbb\config\db_text($this->db, 'phpbb_config_text');
+ }
+
+ public function test_get()
+ {
+ $this->assertSame('23', $this->config_text->get('foo'));
+ $this->assertSame('string-de-ding', $this->config_text->get('meh'));
+ }
+
+ public function test_get_nonexisting()
+ {
+ $this->assertNull($this->config_text->get('noooooo'));
+ }
+
+ public function test_set_new_get()
+ {
+ $this->config_text->set('barz', 'phpbb');
+ $this->assertSame('phpbb', $this->config_text->get('barz'));
+ }
+
+ public function test_set_replace_get()
+ {
+ $this->config_text->set('foo', '24');
+ $this->assertSame('24', $this->config_text->get('foo'));
+ }
+
+ public function test_set_get_long_string()
+ {
+ $expected = str_repeat('ABC', 10000);
+ $this->config_text->set('long', $expected);
+ $this->assertSame($expected, $this->config_text->get('long'));
+ }
+
+ public function test_delete_get()
+ {
+ $this->config_text->delete('foo');
+ $this->assertNull($this->config_text->get('foo'));
+
+ $this->assertSame('42', $this->config_text->get('bar'));
+ $this->assertSame('string-de-ding', $this->config_text->get('meh'));
+ }
+
+ public function test_get_array_empty()
+ {
+ $this->assertEmpty($this->config_text->get_array(array('key1', 'key2')));
+ }
+
+ public function test_get_array_subset()
+ {
+ $expected = array(
+ 'bar' => '42',
+ 'foo' => '23',
+ );
+
+ $actual = $this->config_text->get_array(array_keys($expected));
+ ksort($actual);
+
+ $this->assertSame($expected, $actual);
+ }
+
+ public function test_set_array_get_array_subset()
+ {
+ $set_array_param = array(
+ // New entry
+ 'baby' => 'phpBB',
+ // Entry update
+ 'bar' => '64',
+ );
+
+ $this->config_text->set_array($set_array_param);
+
+ $expected = array_merge($set_array_param, array(
+ 'foo' => '23',
+ ));
+
+ $actual = $this->config_text->get_array(array_keys($expected));
+ ksort($actual);
+
+ $this->assertSame($expected, $actual);
+ }
+
+ public function test_delete_array_get_remaining()
+ {
+ $this->config_text->delete_array(array('foo', 'bar'));
+
+ $this->assertNull($this->config_text->get('bar'));
+ $this->assertNull($this->config_text->get('foo'));
+
+ $this->assertSame('string-de-ding', $this->config_text->get('meh'));
+ }
+}
diff --git a/tests/config/fixtures/config.xml b/tests/config/fixtures/config.xml
new file mode 100644
index 0000000000..9d395b685c
--- /dev/null
+++ b/tests/config/fixtures/config.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<dataset>
+ <table name="phpbb_config">
+ <column>config_name</column>
+ <column>config_value</column>
+ <column>is_dynamic</column>
+ <row>
+ <value>foo</value>
+ <value>23</value>
+ <value>0</value>
+ </row>
+ <row>
+ <value>bar</value>
+ <value>42</value>
+ <value>1</value>
+ </row>
+ </table>
+</dataset>
diff --git a/tests/config/fixtures/config_text.xml b/tests/config/fixtures/config_text.xml
new file mode 100644
index 0000000000..5acac13ea3
--- /dev/null
+++ b/tests/config/fixtures/config_text.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<dataset>
+ <table name="phpbb_config_text">
+ <column>config_name</column>
+ <column>config_value</column>
+ <row>
+ <value>foo</value>
+ <value>23</value>
+ </row>
+ <row>
+ <value>bar</value>
+ <value>42</value>
+ </row>
+ <row>
+ <value>meh</value>
+ <value>string-de-ding</value>
+ </row>
+ </table>
+</dataset>
diff --git a/tests/content_visibility/delete_post_test.php b/tests/content_visibility/delete_post_test.php
new file mode 100644
index 0000000000..b2bdcb3b49
--- /dev/null
+++ b/tests/content_visibility/delete_post_test.php
@@ -0,0 +1,310 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php';
+require_once dirname(__FILE__) . '/../../phpBB/includes/functions_admin.php';
+require_once dirname(__FILE__) . '/../../phpBB/includes/functions_content.php';
+require_once dirname(__FILE__) . '/../../phpBB/includes/functions_posting.php';
+require_once dirname(__FILE__) . '/../../phpBB/includes/utf/utf_tools.php';
+require_once dirname(__FILE__) . '/../mock/search.php';
+
+class phpbb_content_visibility_delete_post_test extends phpbb_database_test_case
+{
+ public function getDataSet()
+ {
+ return $this->createXMLDataSet(dirname(__FILE__) . '/fixtures/delete_post.xml');
+ }
+
+ public function delete_post_data()
+ {
+ $info_data = array(
+ 'topic_first_post_id' => 1,
+ 'topic_last_post_id' => 3,
+ 'topic_posts_approved' => 3,
+ 'topic_posts_unapproved' => 0,
+ 'topic_posts_softdeleted' => 0,
+ 'topic_visibility' => ITEM_APPROVED,
+ 'post_time' => 2,
+ 'post_visibility' => ITEM_APPROVED,
+ 'post_postcount' => true,
+ 'poster_id' => 1,
+ 'post_reported' => false,
+ );
+
+ return array(
+ array(
+ 1, 1, 2,
+ array_merge($info_data, array(
+ 'post_time' => 2,
+ )),
+ false, 'harddelete',
+ array(
+ array('post_id' => 1, 'post_visibility' => ITEM_APPROVED, 'post_delete_reason' => ''),
+ //array('post_id' => 2, 'post_visibility' => ITEM_APPROVED, 'post_delete_reason' => ''),
+ array('post_id' => 3, 'post_visibility' => ITEM_APPROVED, 'post_delete_reason' => ''),
+ ),
+ array(
+ array(
+ 'topic_visibility' => ITEM_APPROVED,
+ 'topic_first_post_id' => 1,
+ 'topic_last_post_id' => 3,
+ 'topic_posts_approved' => 2,
+ 'topic_posts_unapproved' => 0,
+ 'topic_posts_softdeleted' => 0,
+ 'topic_delete_reason' => '',
+ ),
+ ),
+ array(
+ array('forum_posts_approved' => 2, 'forum_posts_unapproved' => 0, 'forum_posts_softdeleted' => 0, 'forum_topics_approved' => 1, 'forum_topics_unapproved' => 0, 'forum_topics_softdeleted' => 0, 'forum_last_post_id' => 3),
+ ),
+ ),
+ array(
+ 1, 1, 1,
+ array_merge($info_data, array(
+ 'post_time' => 1,
+ )),
+ false, 'harddelete',
+ array(
+ //array('post_id' => 1, 'post_visibility' => ITEM_APPROVED, 'post_delete_reason' => ''),
+ array('post_id' => 2, 'post_visibility' => ITEM_APPROVED, 'post_delete_reason' => ''),
+ array('post_id' => 3, 'post_visibility' => ITEM_APPROVED, 'post_delete_reason' => ''),
+ ),
+ array(
+ array(
+ 'topic_visibility' => ITEM_APPROVED,
+ 'topic_first_post_id' => 2,
+ 'topic_last_post_id' => 3,
+ 'topic_posts_approved' => 2,
+ 'topic_posts_unapproved' => 0,
+ 'topic_posts_softdeleted' => 0,
+ 'topic_delete_reason' => '',
+ ),
+ ),
+ array(
+ array('forum_posts_approved' => 2, 'forum_posts_unapproved' => 0, 'forum_posts_softdeleted' => 0, 'forum_topics_approved' => 1, 'forum_topics_unapproved' => 0, 'forum_topics_softdeleted' => 0, 'forum_last_post_id' => 3),
+ ),
+ ),
+ array(
+ 1, 1, 3,
+ array_merge($info_data, array(
+ 'post_time' => 3,
+ )),
+ false, 'harddelete',
+ array(
+ array('post_id' => 1, 'post_visibility' => ITEM_APPROVED, 'post_delete_reason' => ''),
+ array('post_id' => 2, 'post_visibility' => ITEM_APPROVED, 'post_delete_reason' => ''),
+ //array('post_id' => 3, 'post_visibility' => ITEM_APPROVED, 'post_delete_reason' => ''),
+ ),
+ array(
+ array(
+ 'topic_visibility' => ITEM_APPROVED,
+ 'topic_first_post_id' => 1,
+ 'topic_last_post_id' => 2,
+ 'topic_posts_approved' => 2,
+ 'topic_posts_unapproved' => 0,
+ 'topic_posts_softdeleted' => 0,
+ 'topic_delete_reason' => '',
+ ),
+ ),
+ array(
+ array('forum_posts_approved' => 2, 'forum_posts_unapproved' => 0, 'forum_posts_softdeleted' => 0, 'forum_topics_approved' => 1, 'forum_topics_unapproved' => 0, 'forum_topics_softdeleted' => 0, 'forum_last_post_id' => 2),
+ ),
+ ),
+ array(
+ 1, 1, 2,
+ array_merge($info_data, array(
+ 'post_time' => 2,
+ )),
+ true, 'soft delete',
+ array(
+ array('post_id' => 1, 'post_visibility' => ITEM_APPROVED, 'post_delete_reason' => ''),
+ array('post_id' => 2, 'post_visibility' => ITEM_DELETED, 'post_delete_reason' => 'soft delete'),
+ array('post_id' => 3, 'post_visibility' => ITEM_APPROVED, 'post_delete_reason' => ''),
+ ),
+ array(
+ array(
+ 'topic_visibility' => ITEM_APPROVED,
+ 'topic_first_post_id' => 1,
+ 'topic_last_post_id' => 3,
+ 'topic_posts_approved' => 2,
+ 'topic_posts_unapproved' => 0,
+ 'topic_posts_softdeleted' => 1,
+ 'topic_delete_reason' => '',
+ ),
+ ),
+ array(
+ array('forum_posts_approved' => 2, 'forum_posts_unapproved' => 0, 'forum_posts_softdeleted' => 1, 'forum_topics_approved' => 1, 'forum_topics_unapproved' => 0, 'forum_topics_softdeleted' => 0, 'forum_last_post_id' => 3),
+ ),
+ ),
+ array(
+ 1, 1, 1,
+ array_merge($info_data, array(
+ 'post_time' => 1,
+ )),
+ true, 'soft delete',
+ array(
+ array('post_id' => 1, 'post_visibility' => ITEM_DELETED, 'post_delete_reason' => 'soft delete'),
+ array('post_id' => 2, 'post_visibility' => ITEM_APPROVED, 'post_delete_reason' => ''),
+ array('post_id' => 3, 'post_visibility' => ITEM_APPROVED, 'post_delete_reason' => ''),
+ ),
+ array(
+ array(
+ 'topic_visibility' => ITEM_APPROVED,
+ 'topic_first_post_id' => 2,
+ 'topic_last_post_id' => 3,
+ 'topic_posts_approved' => 2,
+ 'topic_posts_unapproved' => 0,
+ 'topic_posts_softdeleted' => 1,
+ 'topic_delete_reason' => '',
+ ),
+ ),
+ array(
+ array('forum_posts_approved' => 2, 'forum_posts_unapproved' => 0, 'forum_posts_softdeleted' => 1, 'forum_topics_approved' => 1, 'forum_topics_unapproved' => 0, 'forum_topics_softdeleted' => 0, 'forum_last_post_id' => 3),
+ ),
+ ),
+ array(
+ 1, 1, 3,
+ array_merge($info_data, array(
+ 'post_time' => 3,
+ )),
+ true, 'soft delete',
+ array(
+ array('post_id' => 1, 'post_visibility' => ITEM_APPROVED, 'post_delete_reason' => ''),
+ array('post_id' => 2, 'post_visibility' => ITEM_APPROVED, 'post_delete_reason' => ''),
+ array('post_id' => 3, 'post_visibility' => ITEM_DELETED, 'post_delete_reason' => 'soft delete'),
+ ),
+ array(
+ array(
+ 'topic_visibility' => ITEM_APPROVED,
+ 'topic_first_post_id' => 1,
+ 'topic_last_post_id' => 2,
+ 'topic_posts_approved' => 2,
+ 'topic_posts_unapproved' => 0,
+ 'topic_posts_softdeleted' => 1,
+ 'topic_delete_reason' => '',
+ ),
+ ),
+ array(
+ array('forum_posts_approved' => 2, 'forum_posts_unapproved' => 0, 'forum_posts_softdeleted' => 1, 'forum_topics_approved' => 1, 'forum_topics_unapproved' => 0, 'forum_topics_softdeleted' => 0, 'forum_last_post_id' => 2),
+ ),
+ ),
+
+ array(
+ 2, 2, 4,
+ array(
+ 'topic_first_post_id' => 4,
+ 'topic_last_post_id' => 4,
+ 'topic_posts_approved' => 1,
+ 'topic_posts_unapproved' => 0,
+ 'topic_posts_softdeleted' => 0,
+ 'topic_visibility' => ITEM_APPROVED,
+ 'post_time' => 4,
+ 'post_visibility' => ITEM_APPROVED,
+ 'post_postcount' => true,
+ 'poster_id' => 1,
+ 'post_reported' => false,
+ ),
+ false, 'harddelete',
+ array(
+ ),
+ array(
+ ),
+ array(
+ array('forum_posts_approved' => 0, 'forum_posts_unapproved' => 0, 'forum_posts_softdeleted' => 0, 'forum_topics_approved' => 0, 'forum_topics_unapproved' => 0, 'forum_topics_softdeleted' => 0, 'forum_last_post_id' => 0),
+ ),
+ ),
+
+ array(
+ 2, 2, 4,
+ array(
+ 'topic_first_post_id' => 4,
+ 'topic_last_post_id' => 4,
+ 'topic_posts_approved' => 1,
+ 'topic_posts_unapproved' => 0,
+ 'topic_posts_softdeleted' => 0,
+ 'topic_visibility' => ITEM_APPROVED,
+ 'post_time' => 4,
+ 'post_visibility' => ITEM_APPROVED,
+ 'post_postcount' => true,
+ 'poster_id' => 1,
+ 'post_reported' => false,
+ ),
+ true, 'soft delete',
+ array(
+ array('post_id' => 4, 'post_visibility' => ITEM_DELETED, 'post_delete_reason' => ''),
+ ),
+ array(
+ array(
+ 'topic_visibility' => ITEM_DELETED,
+ 'topic_first_post_id' => 4,
+ 'topic_last_post_id' => 4,
+ 'topic_posts_approved' => 0,
+ 'topic_posts_unapproved' => 0,
+ 'topic_posts_softdeleted' => 1,
+ 'topic_delete_reason' => 'soft delete',
+ ),
+ ),
+ array(
+ array('forum_posts_approved' => 0, 'forum_posts_unapproved' => 0, 'forum_posts_softdeleted' => 1, 'forum_topics_approved' => 0, 'forum_topics_unapproved' => 0, 'forum_topics_softdeleted' => 1, 'forum_last_post_id' => 0),
+ ),
+ ),
+ );
+ }
+
+ /**
+ * @dataProvider delete_post_data
+ */
+ public function test_delete_post($forum_id, $topic_id, $post_id, $data, $is_soft, $reason, $expected_posts, $expected_topic, $expected_forum)
+ {
+ global $auth, $cache, $config, $db, $phpbb_container, $phpbb_root_path, $phpEx;
+
+ $config['search_type'] = 'phpbb_mock_search';
+ $cache = new phpbb_mock_cache;
+ $db = $this->new_dbal();
+ set_config_count(null, null, null, new \phpbb\config\config(array('num_posts' => 3, 'num_topics' => 1)));
+
+ // Create auth mock
+ $auth = $this->getMock('\phpbb\auth\auth');
+ $auth->expects($this->any())
+ ->method('acl_get')
+ ->with($this->stringContains('_'), $this->anything())
+ ->will($this->returnValueMap(array(
+ array('m_approve', 1, true),
+ )));
+ $user = $this->getMock('\phpbb\user');
+
+ $phpbb_container = new phpbb_mock_container_builder();
+ $phpbb_container->set('notification_manager', new phpbb_mock_notification_manager());
+ $phpbb_container->set('content.visibility', new \phpbb\content_visibility($auth, $db, $user, $phpbb_root_path, $phpEx, FORUMS_TABLE, POSTS_TABLE, TOPICS_TABLE, USERS_TABLE));
+
+ delete_post($forum_id, $topic_id, $post_id, $data, $is_soft, $reason);
+
+ $result = $db->sql_query('SELECT post_id, post_visibility, post_delete_reason
+ FROM phpbb_posts
+ WHERE topic_id = ' . $topic_id . '
+ ORDER BY post_id ASC');
+
+ $this->assertEquals($expected_posts, $db->sql_fetchrowset($result));
+ $db->sql_freeresult($result);
+
+ $result = $db->sql_query('SELECT topic_visibility, topic_first_post_id, topic_last_post_id, topic_posts_approved, topic_posts_unapproved, topic_posts_softdeleted, topic_delete_reason
+ FROM phpbb_topics
+ WHERE topic_id = ' . $topic_id);
+
+ $this->assertEquals($expected_topic, $db->sql_fetchrowset($result));
+ $db->sql_freeresult($result);
+
+ $result = $db->sql_query('SELECT forum_posts_approved, forum_posts_unapproved, forum_posts_softdeleted, forum_topics_approved, forum_topics_unapproved, forum_topics_softdeleted, forum_last_post_id
+ FROM phpbb_forums
+ WHERE forum_id = ' . $forum_id);
+
+ $this->assertEquals($expected_forum, $db->sql_fetchrowset($result));
+ $db->sql_freeresult($result);
+ }
+}
diff --git a/tests/content_visibility/fixtures/delete_post.xml b/tests/content_visibility/fixtures/delete_post.xml
new file mode 100644
index 0000000000..c29ad23019
--- /dev/null
+++ b/tests/content_visibility/fixtures/delete_post.xml
@@ -0,0 +1,163 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<dataset>
+ <table name="phpbb_forums">
+ <column>forum_id</column>
+ <column>forum_posts_approved</column>
+ <column>forum_posts_unapproved</column>
+ <column>forum_posts_softdeleted</column>
+ <column>forum_topics_approved</column>
+ <column>forum_topics_unapproved</column>
+ <column>forum_topics_softdeleted</column>
+ <column>forum_last_post_id</column>
+ <column>forum_parents</column>
+ <column>forum_desc</column>
+ <column>forum_rules</column>
+
+ <row>
+ <value>1</value>
+ <value>3</value>
+ <value>0</value>
+ <value>0</value>
+ <value>1</value>
+ <value>0</value>
+ <value>0</value>
+ <value>3</value>
+ <value></value>
+ <value></value>
+ <value></value>
+ </row>
+ <row>
+ <value>2</value>
+ <value>1</value>
+ <value>0</value>
+ <value>0</value>
+ <value>1</value>
+ <value>0</value>
+ <value>0</value>
+ <value>4</value>
+ <value></value>
+ <value></value>
+ <value></value>
+ </row>
+ </table>
+ <table name="phpbb_topics">
+ <column>topic_id</column>
+ <column>forum_id</column>
+ <column>topic_visibility</column>
+ <column>topic_title</column>
+ <column>topic_first_post_id</column>
+ <column>topic_last_post_id</column>
+ <column>topic_delete_user</column>
+ <column>topic_delete_time</column>
+ <column>topic_delete_reason</column>
+ <column>topic_posts_approved</column>
+ <column>topic_posts_unapproved</column>
+ <column>topic_posts_softdeleted</column>
+
+ <row>
+ <value>1</value>
+ <value>1</value>
+ <value>1</value>
+ <value>Approved</value>
+ <value>1</value>
+ <value>3</value>
+ <value>0</value>
+ <value>0</value>
+ <value></value>
+ <value>3</value>
+ <value>0</value>
+ <value>0</value>
+ </row>
+ <row>
+ <value>2</value>
+ <value>2</value>
+ <value>1</value>
+ <value>Approved</value>
+ <value>4</value>
+ <value>4</value>
+ <value>0</value>
+ <value>0</value>
+ <value></value>
+ <value>1</value>
+ <value>0</value>
+ <value>0</value>
+ </row>
+ </table>
+ <table name="phpbb_posts">
+ <column>post_id</column>
+ <column>poster_id</column>
+ <column>topic_id</column>
+ <column>forum_id</column>
+ <column>post_visibility</column>
+ <column>post_time</column>
+ <column>post_text</column>
+ <column>post_delete_user</column>
+ <column>post_delete_time</column>
+ <column>post_delete_reason</column>
+ <row>
+ <value>1</value>
+ <value>1</value>
+ <value>1</value>
+ <value>1</value>
+ <value>1</value>
+ <value>1</value>
+ <value>Approved</value>
+ <value>0</value>
+ <value>0</value>
+ <value></value>
+ </row>
+ <row>
+ <value>2</value>
+ <value>1</value>
+ <value>1</value>
+ <value>1</value>
+ <value>1</value>
+ <value>2</value>
+ <value>Approved</value>
+ <value>0</value>
+ <value>0</value>
+ <value></value>
+ </row>
+ <row>
+ <value>3</value>
+ <value>1</value>
+ <value>1</value>
+ <value>1</value>
+ <value>1</value>
+ <value>3</value>
+ <value>Approved</value>
+ <value>0</value>
+ <value>0</value>
+ <value></value>
+ </row>
+
+ <row>
+ <value>4</value>
+ <value>1</value>
+ <value>2</value>
+ <value>2</value>
+ <value>1</value>
+ <value>4</value>
+ <value>Approved</value>
+ <value>0</value>
+ <value>0</value>
+ <value></value>
+ </row>
+ </table>
+ <table name="phpbb_users">
+ <column>user_id</column>
+ <column>user_posts</column>
+ <column>username</column>
+ <column>username_clean</column>
+ <column>user_permissions</column>
+ <column>user_sig</column>
+ <row>
+ <value>1</value>
+ <value>4</value>
+ <value>user 1</value>
+ <value>user 1</value>
+ <value></value>
+ <value></value>
+ </row>
+ </table>
+</dataset>
diff --git a/tests/content_visibility/fixtures/get_forums_visibility_sql.xml b/tests/content_visibility/fixtures/get_forums_visibility_sql.xml
new file mode 100644
index 0000000000..658d34398f
--- /dev/null
+++ b/tests/content_visibility/fixtures/get_forums_visibility_sql.xml
@@ -0,0 +1,133 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<dataset>
+ <table name="phpbb_topics">
+ <column>topic_id</column>
+ <column>forum_id</column>
+ <column>topic_visibility</column>
+ <column>topic_title</column>
+ <row>
+ <value>1</value>
+ <value>1</value>
+ <value>0</value>
+ <value>Unapproved</value>
+ </row>
+ <row>
+ <value>2</value>
+ <value>1</value>
+ <value>1</value>
+ <value>Approved</value>
+ </row>
+ <row>
+ <value>3</value>
+ <value>1</value>
+ <value>2</value>
+ <value>Softdeleted</value>
+ </row>
+ <row>
+ <value>4</value>
+ <value>2</value>
+ <value>0</value>
+ <value>Unapproved</value>
+ </row>
+ <row>
+ <value>5</value>
+ <value>2</value>
+ <value>1</value>
+ <value>Approved</value>
+ </row>
+ <row>
+ <value>6</value>
+ <value>2</value>
+ <value>2</value>
+ <value>Softdeleted</value>
+ </row>
+ <row>
+ <value>7</value>
+ <value>3</value>
+ <value>0</value>
+ <value>Unapproved</value>
+ </row>
+ <row>
+ <value>8</value>
+ <value>3</value>
+ <value>1</value>
+ <value>Approved</value>
+ </row>
+ <row>
+ <value>9</value>
+ <value>3</value>
+ <value>2</value>
+ <value>Softdeleted</value>
+ </row>
+ </table>
+ <table name="phpbb_posts">
+ <column>post_id</column>
+ <column>topic_id</column>
+ <column>forum_id</column>
+ <column>post_visibility</column>
+ <column>post_text</column>
+ <row>
+ <value>1</value>
+ <value>1</value>
+ <value>1</value>
+ <value>0</value>
+ <value>Unapproved</value>
+ </row>
+ <row>
+ <value>2</value>
+ <value>2</value>
+ <value>1</value>
+ <value>1</value>
+ <value>Approved</value>
+ </row>
+ <row>
+ <value>3</value>
+ <value>3</value>
+ <value>1</value>
+ <value>2</value>
+ <value>Softdeleted</value>
+ </row>
+ <row>
+ <value>4</value>
+ <value>4</value>
+ <value>2</value>
+ <value>0</value>
+ <value>Unapproved</value>
+ </row>
+ <row>
+ <value>5</value>
+ <value>5</value>
+ <value>2</value>
+ <value>1</value>
+ <value>Approved</value>
+ </row>
+ <row>
+ <value>6</value>
+ <value>6</value>
+ <value>2</value>
+ <value>2</value>
+ <value>Softdeleted</value>
+ </row>
+ <row>
+ <value>7</value>
+ <value>7</value>
+ <value>3</value>
+ <value>0</value>
+ <value>Unapproved</value>
+ </row>
+ <row>
+ <value>8</value>
+ <value>8</value>
+ <value>3</value>
+ <value>1</value>
+ <value>Approved</value>
+ </row>
+ <row>
+ <value>9</value>
+ <value>9</value>
+ <value>3</value>
+ <value>2</value>
+ <value>Softdeleted</value>
+ </row>
+ </table>
+</dataset>
diff --git a/tests/content_visibility/fixtures/get_visibility_sql.xml b/tests/content_visibility/fixtures/get_visibility_sql.xml
new file mode 100644
index 0000000000..146244263e
--- /dev/null
+++ b/tests/content_visibility/fixtures/get_visibility_sql.xml
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<dataset>
+ <table name="phpbb_topics">
+ <column>topic_id</column>
+ <column>forum_id</column>
+ <column>topic_visibility</column>
+ <column>topic_title</column>
+ <row>
+ <value>1</value>
+ <value>1</value>
+ <value>0</value>
+ <value>Unapproved</value>
+ </row>
+ <row>
+ <value>2</value>
+ <value>1</value>
+ <value>1</value>
+ <value>Approved</value>
+ </row>
+ <row>
+ <value>3</value>
+ <value>1</value>
+ <value>2</value>
+ <value>Softdeleted</value>
+ </row>
+ </table>
+ <table name="phpbb_posts">
+ <column>post_id</column>
+ <column>topic_id</column>
+ <column>forum_id</column>
+ <column>post_visibility</column>
+ <column>post_text</column>
+ <row>
+ <value>1</value>
+ <value>1</value>
+ <value>1</value>
+ <value>0</value>
+ <value>Unapproved</value>
+ </row>
+ <row>
+ <value>2</value>
+ <value>2</value>
+ <value>1</value>
+ <value>1</value>
+ <value>Approved</value>
+ </row>
+ <row>
+ <value>3</value>
+ <value>3</value>
+ <value>1</value>
+ <value>2</value>
+ <value>Softdeleted</value>
+ </row>
+ </table>
+</dataset>
diff --git a/tests/content_visibility/fixtures/set_post_visibility.xml b/tests/content_visibility/fixtures/set_post_visibility.xml
new file mode 100644
index 0000000000..5f792d0f05
--- /dev/null
+++ b/tests/content_visibility/fixtures/set_post_visibility.xml
@@ -0,0 +1,154 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<dataset>
+ <table name="phpbb_topics">
+ <column>topic_id</column>
+ <column>forum_id</column>
+ <column>topic_visibility</column>
+ <column>topic_title</column>
+ <column>topic_first_post_id</column>
+ <column>topic_last_post_id</column>
+ <column>topic_posts_approved</column>
+ <column>topic_posts_softdeleted</column>
+ <column>topic_posts_unapproved</column>
+ <row>
+ <value>1</value>
+ <value>1</value>
+ <value>1</value>
+ <value>Approved</value>
+ <value>2</value>
+ <value>2</value>
+ <value>1</value>
+ <value>1</value>
+ <value>1</value>
+ </row>
+
+ <row>
+ <value>2</value>
+ <value>1</value>
+ <value>1</value>
+ <value>2 Approved posts</value>
+ <value>5</value>
+ <value>6</value>
+ <value>1</value>
+ <value>1</value>
+ <value>1</value>
+ </row>
+
+ <row>
+ <value>3</value>
+ <value>1</value>
+ <value>1</value>
+ <value>Only 1 Approved posts</value>
+ <value>8</value>
+ <value>8</value>
+ <value>1</value>
+ <value>0</value>
+ <value>0</value>
+ </row>
+ </table>
+ <table name="phpbb_posts">
+ <column>post_id</column>
+ <column>poster_id</column>
+ <column>topic_id</column>
+ <column>forum_id</column>
+ <column>post_visibility</column>
+ <column>post_text</column>
+ <row>
+ <value>1</value>
+ <value>1</value>
+ <value>1</value>
+ <value>1</value>
+ <value>0</value>
+ <value>Unapproved</value>
+ </row>
+ <row>
+ <value>2</value>
+ <value>2</value>
+ <value>1</value>
+ <value>1</value>
+ <value>1</value>
+ <value>Approved</value>
+ </row>
+ <row>
+ <value>3</value>
+ <value>3</value>
+ <value>1</value>
+ <value>1</value>
+ <value>2</value>
+ <value>Softdeleted</value>
+ </row>
+
+ <row>
+ <value>4</value>
+ <value>1</value>
+ <value>2</value>
+ <value>1</value>
+ <value>0</value>
+ <value>Unapproved</value>
+ </row>
+ <row>
+ <value>5</value>
+ <value>2</value>
+ <value>2</value>
+ <value>1</value>
+ <value>1</value>
+ <value>Approved</value>
+ </row>
+ <row>
+ <value>6</value>
+ <value>2</value>
+ <value>2</value>
+ <value>1</value>
+ <value>1</value>
+ <value>Approved 2</value>
+ </row>
+ <row>
+ <value>7</value>
+ <value>3</value>
+ <value>2</value>
+ <value>1</value>
+ <value>2</value>
+ <value>Softdeleted</value>
+ </row>
+ <row>
+ <value>8</value>
+ <value>1</value>
+ <value>3</value>
+ <value>1</value>
+ <value>1</value>
+ <value>Approved</value>
+ </row>
+ </table>
+ <table name="phpbb_users">
+ <column>user_id</column>
+ <column>user_posts</column>
+ <column>username</column>
+ <column>username_clean</column>
+ <column>user_permissions</column>
+ <column>user_sig</column>
+ <row>
+ <value>1</value>
+ <value>1</value>
+ <value>user 1</value>
+ <value>user 1</value>
+ <value></value>
+ <value></value>
+ </row>
+ <row>
+ <value>2</value>
+ <value>1</value>
+ <value>user 2</value>
+ <value>user 2</value>
+ <value></value>
+ <value></value>
+ </row>
+ <row>
+ <value>3</value>
+ <value>1</value>
+ <value>user 3</value>
+ <value>user 3</value>
+ <value></value>
+ <value></value>
+ </row>
+ </table>
+</dataset>
diff --git a/tests/content_visibility/fixtures/set_topic_visibility.xml b/tests/content_visibility/fixtures/set_topic_visibility.xml
new file mode 100644
index 0000000000..02ab5f16fe
--- /dev/null
+++ b/tests/content_visibility/fixtures/set_topic_visibility.xml
@@ -0,0 +1,132 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<dataset>
+ <table name="phpbb_topics">
+ <column>topic_id</column>
+ <column>forum_id</column>
+ <column>topic_visibility</column>
+ <column>topic_title</column>
+ <column>topic_first_post_id</column>
+ <column>topic_last_post_id</column>
+ <column>topic_delete_user</column>
+ <column>topic_delete_time</column>
+ <column>topic_delete_reason</column>
+
+ <row>
+ <value>1</value>
+ <value>1</value>
+ <value>1</value>
+ <value>Approved</value>
+ <value>1</value>
+ <value>1</value>
+ <value>0</value>
+ <value>0</value>
+ <value></value>
+ </row>
+
+ <row>
+ <value>2</value>
+ <value>1</value>
+ <value>2</value>
+ <value>Soft deleted</value>
+ <value>4</value>
+ <value>5</value>
+ <value>2</value>
+ <value>123</value>
+ <value></value>
+ </row>
+ </table>
+ <table name="phpbb_posts">
+ <column>post_id</column>
+ <column>poster_id</column>
+ <column>topic_id</column>
+ <column>forum_id</column>
+ <column>post_visibility</column>
+ <column>post_text</column>
+ <column>post_delete_user</column>
+ <column>post_delete_time</column>
+ <column>post_delete_reason</column>
+ <row>
+ <value>1</value>
+ <value>1</value>
+ <value>1</value>
+ <value>1</value>
+ <value>1</value>
+ <value>Approved</value>
+ <value>2</value>
+ <value>0</value>
+ <value></value>
+ </row>
+ <row>
+ <value>2</value>
+ <value>1</value>
+ <value>1</value>
+ <value>1</value>
+ <value>2</value>
+ <value>Soft deleted</value>
+ <value>2</value>
+ <value>123</value>
+ <value>manually</value>
+ </row>
+ <row>
+ <value>3</value>
+ <value>1</value>
+ <value>1</value>
+ <value>1</value>
+ <value>0</value>
+ <value>Unapproved</value>
+ <value>0</value>
+ <value>0</value>
+ <value></value>
+ </row>
+
+ <row>
+ <value>4</value>
+ <value>1</value>
+ <value>2</value>
+ <value>1</value>
+ <value>2</value>
+ <value>Soft deleted by topic soft delete</value>
+ <value>2</value>
+ <value>123</value>
+ <value></value>
+ </row>
+ <row>
+ <value>5</value>
+ <value>1</value>
+ <value>2</value>
+ <value>1</value>
+ <value>2</value>
+ <value>Soft deleted before the topic was soft deleted</value>
+ <value>2</value>
+ <value>120</value>
+ <value>manually</value>
+ </row>
+ <row>
+ <value>6</value>
+ <value>1</value>
+ <value>2</value>
+ <value>1</value>
+ <value>0</value>
+ <value>Unapproved before the topic was soft deleted</value>
+ <value>0</value>
+ <value>0</value>
+ <value></value>
+ </row>
+ </table>
+ <table name="phpbb_users">
+ <column>user_id</column>
+ <column>user_posts</column>
+ <column>username</column>
+ <column>username_clean</column>
+ <column>user_permissions</column>
+ <column>user_sig</column>
+ <row>
+ <value>1</value>
+ <value>6</value>
+ <value>user 1</value>
+ <value>user 1</value>
+ <value></value>
+ <value></value>
+ </row>
+ </table>
+</dataset>
diff --git a/tests/content_visibility/get_forums_visibility_sql_test.php b/tests/content_visibility/get_forums_visibility_sql_test.php
new file mode 100644
index 0000000000..22f210c406
--- /dev/null
+++ b/tests/content_visibility/get_forums_visibility_sql_test.php
@@ -0,0 +1,143 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+class phpbb_content_visibility_get_forums_visibility_sql_test extends phpbb_database_test_case
+{
+ public function getDataSet()
+ {
+ return $this->createXMLDataSet(dirname(__FILE__) . '/fixtures/get_forums_visibility_sql.xml');
+ }
+
+ public function get_forums_visibility_sql_data()
+ {
+ return array(
+ array(
+ 'phpbb_topics',
+ 'topic', array(1, 2, 3), '',
+ array(
+ array('m_approve', true, array(1 => true, 2 => true, 3 => true)),
+ ),
+ array(
+ array('topic_id' => 1),
+ array('topic_id' => 2),
+ array('topic_id' => 3),
+ array('topic_id' => 4),
+ array('topic_id' => 5),
+ array('topic_id' => 6),
+ array('topic_id' => 7),
+ array('topic_id' => 8),
+ array('topic_id' => 9),
+ ),
+ ),
+ array(
+ 'phpbb_topics',
+ 'topic', array(1, 2), '',
+ array(
+ array('m_approve', true, array(1 => true, 2 => true, 3 => true)),
+ ),
+ array(
+ array('topic_id' => 1),
+ array('topic_id' => 2),
+ array('topic_id' => 3),
+ array('topic_id' => 4),
+ array('topic_id' => 5),
+ array('topic_id' => 6),
+ ),
+ ),
+ array(
+ 'phpbb_topics',
+ 'topic', array(1, 2, 3), '',
+ array(
+ array('m_approve', true, array(2 => true)),
+ ),
+ array(
+ array('topic_id' => 2),
+ array('topic_id' => 4),
+ array('topic_id' => 5),
+ array('topic_id' => 6),
+ array('topic_id' => 8),
+ ),
+ ),
+ array(
+ 'phpbb_posts',
+ 'post', array(1, 2, 3), '',
+ array(
+ array('m_approve', true, array(1 => true, 2 => true, 3 => true)),
+ ),
+ array(
+ array('post_id' => 1),
+ array('post_id' => 2),
+ array('post_id' => 3),
+ array('post_id' => 4),
+ array('post_id' => 5),
+ array('post_id' => 6),
+ array('post_id' => 7),
+ array('post_id' => 8),
+ array('post_id' => 9),
+ ),
+ ),
+ array(
+ 'phpbb_posts',
+ 'post', array(1, 2), '',
+ array(
+ array('m_approve', true, array(1 => true, 2 => true, 3 => true)),
+ ),
+ array(
+ array('post_id' => 1),
+ array('post_id' => 2),
+ array('post_id' => 3),
+ array('post_id' => 4),
+ array('post_id' => 5),
+ array('post_id' => 6),
+ ),
+ ),
+ array(
+ 'phpbb_posts',
+ 'post', array(1, 2, 3), '',
+ array(
+ array('m_approve', true, array(2 => true)),
+ ),
+ array(
+ array('post_id' => 2),
+ array('post_id' => 4),
+ array('post_id' => 5),
+ array('post_id' => 6),
+ array('post_id' => 8),
+ ),
+ ),
+ );
+ }
+
+ /**
+ * @dataProvider get_forums_visibility_sql_data
+ */
+ public function test_get_forums_visibility_sql($table, $mode, $forum_ids, $table_alias, $permissions, $expected)
+ {
+ global $cache, $db, $auth, $phpbb_root_path, $phpEx;
+
+ $cache = new phpbb_mock_cache;
+ $db = $this->new_dbal();
+
+ // Create auth mock
+ $auth = $this->getMock('\phpbb\auth\auth');
+ $auth->expects($this->any())
+ ->method('acl_getf')
+ ->with($this->stringContains('_'), $this->anything())
+ ->will($this->returnValueMap($permissions));
+ $user = $this->getMock('\phpbb\user');
+ $content_visibility = new \phpbb\content_visibility($auth, $db, $user, $phpbb_root_path, $phpEx, FORUMS_TABLE, POSTS_TABLE, TOPICS_TABLE, USERS_TABLE);
+
+ $result = $db->sql_query('SELECT ' . $mode . '_id
+ FROM ' . $table . '
+ WHERE ' . $content_visibility->get_forums_visibility_sql($mode, $forum_ids, $table_alias) . '
+ ORDER BY ' . $mode . '_id ASC');
+
+ $this->assertEquals($expected, $db->sql_fetchrowset($result));
+ }
+}
diff --git a/tests/content_visibility/get_global_visibility_sql_test.php b/tests/content_visibility/get_global_visibility_sql_test.php
new file mode 100644
index 0000000000..9488a8c0b3
--- /dev/null
+++ b/tests/content_visibility/get_global_visibility_sql_test.php
@@ -0,0 +1,143 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+class phpbb_content_visibility_get_global_visibility_sql_test extends phpbb_database_test_case
+{
+ public function getDataSet()
+ {
+ return $this->createXMLDataSet(dirname(__FILE__) . '/fixtures/get_forums_visibility_sql.xml');
+ }
+
+ public function get_global_visibility_sql_data()
+ {
+ return array(
+ array(
+ 'phpbb_topics',
+ 'topic', array(), '',
+ array(
+ array('m_approve', true, array(1 => true, 2 => true, 3 => true)),
+ ),
+ array(
+ array('topic_id' => 1),
+ array('topic_id' => 2),
+ array('topic_id' => 3),
+ array('topic_id' => 4),
+ array('topic_id' => 5),
+ array('topic_id' => 6),
+ array('topic_id' => 7),
+ array('topic_id' => 8),
+ array('topic_id' => 9),
+ ),
+ ),
+ array(
+ 'phpbb_topics',
+ 'topic', array(3), '',
+ array(
+ array('m_approve', true, array(1 => true, 2 => true, 3 => true)),
+ ),
+ array(
+ array('topic_id' => 1),
+ array('topic_id' => 2),
+ array('topic_id' => 3),
+ array('topic_id' => 4),
+ array('topic_id' => 5),
+ array('topic_id' => 6),
+ ),
+ ),
+ array(
+ 'phpbb_topics',
+ 'topic', array(), '',
+ array(
+ array('m_approve', true, array(2 => true)),
+ ),
+ array(
+ array('topic_id' => 2),
+ array('topic_id' => 4),
+ array('topic_id' => 5),
+ array('topic_id' => 6),
+ array('topic_id' => 8),
+ ),
+ ),
+ array(
+ 'phpbb_posts',
+ 'post', array(), '',
+ array(
+ array('m_approve', true, array(1 => true, 2 => true, 3 => true)),
+ ),
+ array(
+ array('post_id' => 1),
+ array('post_id' => 2),
+ array('post_id' => 3),
+ array('post_id' => 4),
+ array('post_id' => 5),
+ array('post_id' => 6),
+ array('post_id' => 7),
+ array('post_id' => 8),
+ array('post_id' => 9),
+ ),
+ ),
+ array(
+ 'phpbb_posts',
+ 'post', array(3), '',
+ array(
+ array('m_approve', true, array(1 => true, 2 => true, 3 => true)),
+ ),
+ array(
+ array('post_id' => 1),
+ array('post_id' => 2),
+ array('post_id' => 3),
+ array('post_id' => 4),
+ array('post_id' => 5),
+ array('post_id' => 6),
+ ),
+ ),
+ array(
+ 'phpbb_posts',
+ 'post', array(), '',
+ array(
+ array('m_approve', true, array(2 => true)),
+ ),
+ array(
+ array('post_id' => 2),
+ array('post_id' => 4),
+ array('post_id' => 5),
+ array('post_id' => 6),
+ array('post_id' => 8),
+ ),
+ ),
+ );
+ }
+
+ /**
+ * @dataProvider get_global_visibility_sql_data
+ */
+ public function test_get_global_visibility_sql($table, $mode, $forum_ids, $table_alias, $permissions, $expected)
+ {
+ global $cache, $db, $auth, $phpbb_root_path, $phpEx;
+
+ $cache = new phpbb_mock_cache;
+ $db = $this->new_dbal();
+
+ // Create auth mock
+ $auth = $this->getMock('\phpbb\auth\auth');
+ $auth->expects($this->any())
+ ->method('acl_getf')
+ ->with($this->stringContains('_'), $this->anything())
+ ->will($this->returnValueMap($permissions));
+ $user = $this->getMock('\phpbb\user');
+ $content_visibility = new \phpbb\content_visibility($auth, $db, $user, $phpbb_root_path, $phpEx, FORUMS_TABLE, POSTS_TABLE, TOPICS_TABLE, USERS_TABLE);
+
+ $result = $db->sql_query('SELECT ' . $mode . '_id
+ FROM ' . $table . '
+ WHERE ' . $content_visibility->get_global_visibility_sql($mode, $forum_ids, $table_alias) . '
+ ORDER BY ' . $mode . '_id ASC');
+
+ $this->assertEquals($expected, $db->sql_fetchrowset($result));
+ }
+}
diff --git a/tests/content_visibility/get_visibility_sql_test.php b/tests/content_visibility/get_visibility_sql_test.php
new file mode 100644
index 0000000000..111e735650
--- /dev/null
+++ b/tests/content_visibility/get_visibility_sql_test.php
@@ -0,0 +1,90 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+class phpbb_content_visibility_get_visibility_sql_test extends phpbb_database_test_case
+{
+ public function getDataSet()
+ {
+ return $this->createXMLDataSet(dirname(__FILE__) . '/fixtures/get_visibility_sql.xml');
+ }
+
+ public function get_visibility_sql_data()
+ {
+ return array(
+ array(
+ 'phpbb_posts',
+ 'post', 1, '',
+ array(
+ array('m_approve', 1, true),
+ ),
+ array(
+ array('post_id' => 1),
+ array('post_id' => 2),
+ array('post_id' => 3),
+ ),
+ ),
+ array(
+ 'phpbb_posts',
+ 'post', 1, '',
+ array(
+ ),
+ array(
+ array('post_id' => 2),
+ ),
+ ),
+ array(
+ 'phpbb_topics',
+ 'topic', 1, '',
+ array(
+ array('m_approve', 1, true),
+ ),
+ array(
+ array('topic_id' => 1),
+ array('topic_id' => 2),
+ array('topic_id' => 3),
+ ),
+ ),
+ array(
+ 'phpbb_topics',
+ 'topic', 1, '',
+ array(),
+ array(
+ array('topic_id' => 2),
+ ),
+ ),
+ );
+ }
+
+ /**
+ * @dataProvider get_visibility_sql_data
+ */
+ public function test_get_visibility_sql($table, $mode, $forum_id, $table_alias, $permissions, $expected)
+ {
+ global $cache, $db, $auth, $phpbb_root_path, $phpEx;
+
+ $cache = new phpbb_mock_cache;
+ $db = $this->new_dbal();
+
+ // Create auth mock
+ $auth = $this->getMock('\phpbb\auth\auth');
+ $auth->expects($this->any())
+ ->method('acl_get')
+ ->with($this->stringContains('_'), $this->anything())
+ ->will($this->returnValueMap($permissions));
+ $user = $this->getMock('\phpbb\user');
+ $content_visibility = new \phpbb\content_visibility($auth, $db, $user, $phpbb_root_path, $phpEx, FORUMS_TABLE, POSTS_TABLE, TOPICS_TABLE, USERS_TABLE);
+
+ $result = $db->sql_query('SELECT ' . $mode . '_id
+ FROM ' . $table . '
+ WHERE ' . $content_visibility->get_visibility_sql($mode, $forum_id, $table_alias) . '
+ ORDER BY ' . $mode . '_id ASC');
+
+ $this->assertEquals($expected, $db->sql_fetchrowset($result));
+ }
+}
diff --git a/tests/content_visibility/set_post_visibility_test.php b/tests/content_visibility/set_post_visibility_test.php
new file mode 100644
index 0000000000..f81b83ff86
--- /dev/null
+++ b/tests/content_visibility/set_post_visibility_test.php
@@ -0,0 +1,143 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php';
+require_once dirname(__FILE__) . '/../../phpBB/includes/functions_admin.php';
+require_once dirname(__FILE__) . '/../../phpBB/includes/functions_content.php';
+require_once dirname(__FILE__) . '/../../phpBB/includes/functions_posting.php';
+require_once dirname(__FILE__) . '/../../phpBB/includes/utf/utf_tools.php';
+
+class phpbb_content_visibility_set_post_visibility_test extends phpbb_database_test_case
+{
+ public function getDataSet()
+ {
+ return $this->createXMLDataSet(dirname(__FILE__) . '/fixtures/set_post_visibility.xml');
+ }
+
+ public function set_post_visibility_data()
+ {
+ return array(
+ array(
+ ITEM_APPROVED,
+ 1, 1, 1,
+ 2, time(), 'approve',
+ true, false,
+ array(
+ array('post_id' => 1, 'post_visibility' => 1, 'post_delete_reason' => 'approve'),
+ array('post_id' => 2, 'post_visibility' => 1, 'post_delete_reason' => ''),
+ array('post_id' => 3, 'post_visibility' => 2, 'post_delete_reason' => ''),
+ ),
+ array(
+ array('topic_visibility' => 1, 'topic_first_post_id' => 1, 'topic_last_post_id' => 2),
+ ),
+ ),
+ array(
+ ITEM_APPROVED,
+ 3, 1, 1,
+ 2, time(), 'approve',
+ false, true,
+ array(
+ array('post_id' => 1, 'post_visibility' => 0, 'post_delete_reason' => ''),
+ array('post_id' => 2, 'post_visibility' => 1, 'post_delete_reason' => ''),
+ array('post_id' => 3, 'post_visibility' => 1, 'post_delete_reason' => 'approve'),
+ ),
+ array(
+ array('topic_visibility' => 1, 'topic_first_post_id' => 2, 'topic_last_post_id' => 3),
+ ),
+ ),
+ array(
+ ITEM_DELETED,
+ 2, 1, 1,
+ 2, time(), 'deleted',
+ true, true,
+ array(
+ array('post_id' => 1, 'post_visibility' => 0, 'post_delete_reason' => ''),
+ array('post_id' => 2, 'post_visibility' => 2, 'post_delete_reason' => 'deleted'),
+ array('post_id' => 3, 'post_visibility' => 2, 'post_delete_reason' => ''),
+ ),
+ array(
+ array('topic_visibility' => 2, 'topic_first_post_id' => 1, 'topic_last_post_id' => 3),
+ ),
+ ),
+ array(
+ ITEM_DELETED,
+ 5, 2, 1,
+ 2, time(), 'deleted',
+ true, false,
+ array(
+ array('post_id' => 4, 'post_visibility' => 0, 'post_delete_reason' => ''),
+ array('post_id' => 5, 'post_visibility' => 2, 'post_delete_reason' => 'deleted'),
+ array('post_id' => 6, 'post_visibility' => 1, 'post_delete_reason' => ''),
+ array('post_id' => 7, 'post_visibility' => 2, 'post_delete_reason' => ''),
+ ),
+ array(
+ array('topic_visibility' => 1, 'topic_first_post_id' => 6, 'topic_last_post_id' => 6),
+ ),
+ ),
+ array(
+ ITEM_DELETED,
+ 6, 2, 1,
+ 2, time(), 'deleted',
+ false, true,
+ array(
+ array('post_id' => 4, 'post_visibility' => 0, 'post_delete_reason' => ''),
+ array('post_id' => 5, 'post_visibility' => 1, 'post_delete_reason' => ''),
+ array('post_id' => 6, 'post_visibility' => 2, 'post_delete_reason' => 'deleted'),
+ array('post_id' => 7, 'post_visibility' => 2, 'post_delete_reason' => ''),
+ ),
+ array(
+ array('topic_visibility' => 1, 'topic_first_post_id' => 5, 'topic_last_post_id' => 5),
+ ),
+ ),
+ array(
+ ITEM_DELETED,
+ 8, 3, 1,
+ 2, time(), 'deleted',
+ true, true,
+ array(
+ array('post_id' => 8, 'post_visibility' => 2, 'post_delete_reason' => 'deleted'),
+ ),
+ array(
+ array('topic_visibility' => 2, 'topic_first_post_id' => 8, 'topic_last_post_id' => 8),
+ ),
+ ),
+ );
+ }
+
+ /**
+ * @dataProvider set_post_visibility_data
+ */
+ public function test_set_post_visibility($visibility, $post_id, $topic_id, $forum_id, $user_id, $time, $reason, $is_starter, $is_latest, $expected, $expected_topic)
+ {
+ global $cache, $db, $auth, $phpbb_root_path, $phpEx;
+
+ $cache = new phpbb_mock_cache;
+ $db = $this->new_dbal();
+ $auth = $this->getMock('\phpbb\auth\auth');
+ $user = $this->getMock('\phpbb\user');
+ $content_visibility = new \phpbb\content_visibility($auth, $db, $user, $phpbb_root_path, $phpEx, FORUMS_TABLE, POSTS_TABLE, TOPICS_TABLE, USERS_TABLE);
+
+ $content_visibility->set_post_visibility($visibility, $post_id, $topic_id, $forum_id, $user_id, $time, $reason, $is_starter, $is_latest);
+
+ $result = $db->sql_query('SELECT post_id, post_visibility, post_delete_reason
+ FROM phpbb_posts
+ WHERE topic_id = ' . $topic_id . '
+ ORDER BY post_id ASC');
+
+ $this->assertEquals($expected, $db->sql_fetchrowset($result));
+ $db->sql_freeresult($result);
+
+ $result = $db->sql_query('SELECT topic_visibility, topic_first_post_id, topic_last_post_id
+ FROM phpbb_topics
+ WHERE topic_id = ' . $topic_id);
+
+ $this->assertEquals($expected_topic, $db->sql_fetchrowset($result));
+ $db->sql_freeresult($result);
+ }
+}
diff --git a/tests/content_visibility/set_topic_visibility_test.php b/tests/content_visibility/set_topic_visibility_test.php
new file mode 100644
index 0000000000..92b1253a15
--- /dev/null
+++ b/tests/content_visibility/set_topic_visibility_test.php
@@ -0,0 +1,107 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php';
+require_once dirname(__FILE__) . '/../../phpBB/includes/functions_admin.php';
+require_once dirname(__FILE__) . '/../../phpBB/includes/functions_content.php';
+require_once dirname(__FILE__) . '/../../phpBB/includes/functions_posting.php';
+require_once dirname(__FILE__) . '/../../phpBB/includes/utf/utf_tools.php';
+
+class phpbb_content_visibility_set_topic_visibility_test extends phpbb_database_test_case
+{
+ public function getDataSet()
+ {
+ return $this->createXMLDataSet(dirname(__FILE__) . '/fixtures/set_topic_visibility.xml');
+ }
+
+ public function set_topic_visibility_data()
+ {
+ return array(
+ array(
+ ITEM_DELETED, 1, 1,
+ 2, time(), 'delete', false,
+ array(
+ array('post_id' => 1, 'post_visibility' => 2, 'post_delete_reason' => ''),
+ array('post_id' => 2, 'post_visibility' => 2, 'post_delete_reason' => 'manually'),
+ array('post_id' => 3, 'post_visibility' => 0, 'post_delete_reason' => ''),
+ ),
+ array(
+ array('topic_visibility' => 2, 'topic_first_post_id' => 1, 'topic_last_post_id' => 3, 'topic_delete_reason' => 'delete'),
+ ),
+ ),
+ array(
+ ITEM_DELETED, 1, 1,
+ 2, time(), 'delete-forced', true,
+ array(
+ array('post_id' => 1, 'post_visibility' => 2, 'post_delete_reason' => ''),
+ array('post_id' => 2, 'post_visibility' => 2, 'post_delete_reason' => ''),
+ array('post_id' => 3, 'post_visibility' => 2, 'post_delete_reason' => ''),
+ ),
+ array(
+ array('topic_visibility' => 2, 'topic_first_post_id' => 1, 'topic_last_post_id' => 3, 'topic_delete_reason' => 'delete-forced'),
+ ),
+ ),
+ array(
+ ITEM_APPROVED, 2, 1,
+ 2, time(), 'approved', false,
+ array(
+ array('post_id' => 4, 'post_visibility' => 1, 'post_delete_reason' => ''),
+ array('post_id' => 5, 'post_visibility' => 2, 'post_delete_reason' => 'manually'),
+ array('post_id' => 6, 'post_visibility' => 0, 'post_delete_reason' => ''),
+ ),
+ array(
+ array('topic_visibility' => 1, 'topic_first_post_id' => 4, 'topic_last_post_id' => 4, 'topic_delete_reason' => 'approved'),
+ ),
+ ),
+ array(
+ ITEM_APPROVED, 2, 1,
+ 2, time(), 'approved-forced', true,
+ array(
+ array('post_id' => 4, 'post_visibility' => 1, 'post_delete_reason' => ''),
+ array('post_id' => 5, 'post_visibility' => 1, 'post_delete_reason' => ''),
+ array('post_id' => 6, 'post_visibility' => 1, 'post_delete_reason' => ''),
+ ),
+ array(
+ array('topic_visibility' => 1, 'topic_first_post_id' => 4, 'topic_last_post_id' => 6, 'topic_delete_reason' => 'approved-forced'),
+ ),
+ ),
+ );
+ }
+
+ /**
+ * @dataProvider set_topic_visibility_data
+ */
+ public function test_set_topic_visibility($visibility, $topic_id, $forum_id, $user_id, $time, $reason, $force_update_all, $expected_posts, $expected_topic)
+ {
+ global $cache, $db, $auth, $phpbb_root_path, $phpEx;
+
+ $cache = new phpbb_mock_cache;
+ $db = $this->new_dbal();
+ $auth = $this->getMock('\phpbb\auth\auth');
+ $user = $this->getMock('\phpbb\user');
+ $content_visibility = new \phpbb\content_visibility($auth, $db, $user, $phpbb_root_path, $phpEx, FORUMS_TABLE, POSTS_TABLE, TOPICS_TABLE, USERS_TABLE);
+
+ $content_visibility->set_topic_visibility($visibility, $topic_id, $forum_id, $user_id, $time, $reason, $force_update_all);
+
+ $result = $db->sql_query('SELECT post_id, post_visibility, post_delete_reason
+ FROM phpbb_posts
+ WHERE topic_id = ' . $topic_id . '
+ ORDER BY post_id ASC');
+
+ $this->assertEquals($expected_posts, $db->sql_fetchrowset($result));
+ $db->sql_freeresult($result);
+
+ $result = $db->sql_query('SELECT topic_visibility, topic_first_post_id, topic_last_post_id, topic_delete_reason
+ FROM phpbb_topics
+ WHERE topic_id = ' . $topic_id);
+
+ $this->assertEquals($expected_topic, $db->sql_fetchrowset($result));
+ $db->sql_freeresult($result);
+ }
+}
diff --git a/tests/controller/config/routing.yml b/tests/controller/config/routing.yml
new file mode 100644
index 0000000000..175b11f130
--- /dev/null
+++ b/tests/controller/config/routing.yml
@@ -0,0 +1,3 @@
+core_controller:
+ pattern: /core_foo
+ defaults: { _controller: core_foo.controller:bar }
diff --git a/tests/controller/config/services.yml b/tests/controller/config/services.yml
new file mode 100644
index 0000000000..e4412af3d7
--- /dev/null
+++ b/tests/controller/config/services.yml
@@ -0,0 +1,3 @@
+services:
+ core_foo.controller:
+ class: phpbb\controller\foo
diff --git a/tests/controller/controller_test.php b/tests/controller/controller_test.php
new file mode 100644
index 0000000000..550679ff07
--- /dev/null
+++ b/tests/controller/controller_test.php
@@ -0,0 +1,81 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+use Symfony\Component\HttpFoundation\Request;
+use Symfony\Component\Routing\Route;
+use Symfony\Component\Routing\RouteCollection;
+use Symfony\Component\Config\FileLocator;
+use Symfony\Component\DependencyInjection\ContainerBuilder;
+use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
+
+class phpbb_controller_controller_test extends phpbb_test_case
+{
+ public function setUp()
+ {
+ $this->extension_manager = new phpbb_mock_extension_manager(
+ dirname(__FILE__) . '/',
+ array(
+ 'vendor2/foo' => array(
+ 'ext_name' => 'vendor2/foo',
+ 'ext_active' => '1',
+ 'ext_path' => 'ext/vendor2/foo/',
+ ),
+ ));
+ }
+
+ public function test_provider()
+ {
+ $provider = new \phpbb\controller\provider($this->extension_manager->get_finder());
+ $routes = $provider->find(__DIR__)->get_routes();
+
+ // This will need to be updated if any new routes are defined
+ $this->assertInstanceOf('Symfony\Component\Routing\Route', $routes->get('core_controller'));
+ $this->assertEquals('/core_foo', $routes->get('core_controller')->getPath());
+
+ $this->assertInstanceOf('Symfony\Component\Routing\Route', $routes->get('controller1'));
+ $this->assertEquals('/foo', $routes->get('controller1')->getPath());
+
+ $this->assertInstanceOf('Symfony\Component\Routing\Route', $routes->get('controller2'));
+ $this->assertEquals('/foo/bar', $routes->get('controller2')->getPath());
+ }
+
+ public function test_controller_resolver()
+ {
+ $container = new ContainerBuilder();
+ // YamlFileLoader only uses one path at a time, so we need to loop
+ // through all of the ones we are using.
+ foreach (array(__DIR__.'/config', __DIR__ . '/ext/vendor2/foo/config') as $path)
+ {
+ $loader = new YamlFileLoader($container, new FileLocator($path));
+ $loader->load('services.yml');
+ }
+
+ // Autoloading classes within the tests folder does not work
+ // so I'll include them manually.
+ if (!class_exists('vendor2\\foo\\controller'))
+ {
+ include(__DIR__ . '/ext/vendor2/foo/controller.php');
+ }
+ if (!class_exists('phpbb\\controller\\foo'))
+ {
+ include(__DIR__.'/phpbb/controller/foo.php');
+ }
+
+ $resolver = new \phpbb\controller\resolver(new \phpbb\user, $container);
+ $symfony_request = new Request();
+ $symfony_request->attributes->set('_controller', 'foo.controller:handle');
+
+ $this->assertEquals($resolver->getController($symfony_request), array(new foo\controller, 'handle'));
+
+ $symfony_request = new Request();
+ $symfony_request->attributes->set('_controller', 'core_foo.controller:bar');
+
+ $this->assertEquals($resolver->getController($symfony_request), array(new phpbb\controller\foo, 'bar'));
+ }
+}
diff --git a/tests/controller/ext/vendor2/foo/config/routing.yml b/tests/controller/ext/vendor2/foo/config/routing.yml
new file mode 100644
index 0000000000..6cc275d96d
--- /dev/null
+++ b/tests/controller/ext/vendor2/foo/config/routing.yml
@@ -0,0 +1,7 @@
+controller1:
+ pattern: /foo
+ defaults: { _controller: foo.controller:handle }
+
+include_controller2:
+ resource: "routing_2.yml"
+ prefix: /foo
diff --git a/tests/controller/ext/vendor2/foo/config/routing_2.yml b/tests/controller/ext/vendor2/foo/config/routing_2.yml
new file mode 100644
index 0000000000..d987a65aea
--- /dev/null
+++ b/tests/controller/ext/vendor2/foo/config/routing_2.yml
@@ -0,0 +1,6 @@
+controller2:
+ pattern: /bar
+ defaults: { _controller: foo.controller:handle }
+controller3:
+ pattern: /bar/p-{p}
+ defaults: { _controller: foo.controller:handle }
diff --git a/tests/controller/ext/vendor2/foo/config/services.yml b/tests/controller/ext/vendor2/foo/config/services.yml
new file mode 100644
index 0000000000..9ed67d5bc2
--- /dev/null
+++ b/tests/controller/ext/vendor2/foo/config/services.yml
@@ -0,0 +1,3 @@
+services:
+ foo.controller:
+ class: foo\controller
diff --git a/tests/controller/ext/vendor2/foo/controller.php b/tests/controller/ext/vendor2/foo/controller.php
new file mode 100644
index 0000000000..ce2233b3c9
--- /dev/null
+++ b/tests/controller/ext/vendor2/foo/controller.php
@@ -0,0 +1,18 @@
+<?php
+
+namespace foo;
+
+use Symfony\Component\HttpFoundation\Response;
+
+class controller
+{
+ /**
+ * Handle method
+ *
+ * @return null
+ */
+ public function handle()
+ {
+ return new Response('Test', 200);
+ }
+}
diff --git a/tests/controller/helper_route_test.php b/tests/controller/helper_route_test.php
new file mode 100644
index 0000000000..5264c788c7
--- /dev/null
+++ b/tests/controller/helper_route_test.php
@@ -0,0 +1,128 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php';
+
+class phpbb_controller_helper_route_test extends phpbb_test_case
+{
+ public function setUp()
+ {
+ global $phpbb_dispatcher, $phpbb_root_path, $phpEx;
+
+ $phpbb_dispatcher = new phpbb_mock_event_dispatcher;
+ $this->user = $this->getMock('\phpbb\user');
+ $phpbb_path_helper = new \phpbb\path_helper(
+ new \phpbb\symfony_request(
+ new phpbb_mock_request()
+ ),
+ new \phpbb\filesystem(),
+ $phpbb_root_path,
+ $phpEx
+ );
+ $this->config = new \phpbb\config\config(array('enable_mod_rewrite' => '0'));
+ $this->template = new phpbb\template\twig\twig($phpbb_path_helper, $this->config, $this->user, new \phpbb\template\context());
+
+ $finder = new \phpbb\extension\finder(
+ new phpbb_mock_extension_manager(
+ dirname(__FILE__) . '/',
+ array(
+ 'vendor2/foo' => array(
+ 'ext_name' => 'vendor2/foo',
+ 'ext_active' => '1',
+ 'ext_path' => 'ext/vendor2/foo/',
+ ),
+ )
+ ),
+ new \phpbb\filesystem(),
+ dirname(__FILE__) . '/',
+ new phpbb_mock_cache()
+ );
+ $this->provider = new \phpbb\controller\provider($finder);
+ $this->provider->find(dirname(__FILE__) . '/');
+ }
+
+ public function helper_url_data_no_rewrite()
+ {
+ return array(
+ array('controller2', array('t' => 1, 'f' => 2), true, false, 'app.php/foo/bar?t=1&amp;f=2', 'parameters in params-argument as array'),
+ array('controller2', array('t' => 1, 'f' => 2), false, false, 'app.php/foo/bar?t=1&f=2', 'parameters in params-argument as array'),
+ array('controller3', array('p' => 3, 't' => 1, 'f' => 2), true, false, 'app.php/foo/bar/p-3?t=1&amp;f=2', 'parameters in params-argument as array'),
+ array('controller3', array('p' => 3, 't' => 1, 'f' => 2), false, false, 'app.php/foo/bar/p-3?t=1&f=2', 'parameters in params-argument as array'),
+
+ // Custom sid parameter
+ array('controller2', array('t' => 1, 'f' => 2), true, 'custom-sid', 'app.php/foo/bar?t=1&amp;f=2&amp;sid=custom-sid', 'params-argument (array) using session_id'),
+ array('controller2', array('t' => 1, 'f' => 2), false, 'custom-sid', 'app.php/foo/bar?t=1&f=2&sid=custom-sid', 'params-argument (array) using session_id'),
+ array('controller3', array('p' => 3, 't' => 1, 'f' => 2), true, 'custom-sid', 'app.php/foo/bar/p-3?t=1&amp;f=2&amp;sid=custom-sid', 'params-argument (array) using session_id'),
+
+ // Testing anchors
+ array('controller2', array('t' => 1, 'f' => 2, '#' => 'anchor'), true, false, 'app.php/foo/bar?t=1&amp;f=2#anchor', 'anchor in params-argument (array)'),
+ array('controller2', array('t' => 1, 'f' => 2, '#' => 'anchor'), false, false, 'app.php/foo/bar?t=1&f=2#anchor', 'anchor in params-argument (array)'),
+ array('controller3', array('p' => 3, 't' => 1, 'f' => 2, '#' => 'anchor'), true, false, 'app.php/foo/bar/p-3?t=1&amp;f=2#anchor', 'anchor in params-argument (array)'),
+
+ // Anchors and custom sid
+ array('controller2', array('t' => 1, 'f' => 2, '#' => 'anchor'), true, 'custom-sid', 'app.php/foo/bar?t=1&amp;f=2&amp;sid=custom-sid#anchor', 'anchor in params-argument (array) using session_id'),
+ array('controller2', array('t' => 1, 'f' => 2, '#' => 'anchor'), false, 'custom-sid', 'app.php/foo/bar?t=1&f=2&sid=custom-sid#anchor', 'anchor in params-argument (array) using session_id'),
+ array('controller3', array('p' => 3, 't' => 1, 'f' => 2, '#' => 'anchor'), true, 'custom-sid', 'app.php/foo/bar/p-3?t=1&amp;f=2&amp;sid=custom-sid#anchor', 'anchor in params-argument (array) using session_id'),
+
+ // Empty parameters should not append the &amp; or ?
+ array('controller2', array(), true, false, 'app.php/foo/bar', 'no params using empty array'),
+ array('controller2', array(), false, false, 'app.php/foo/bar', 'no params using empty array'),
+ array('controller3', array('p' => 3), true, false, 'app.php/foo/bar/p-3', 'no params using empty array'),
+ );
+ }
+
+ /**
+ * @dataProvider helper_url_data_no_rewrite()
+ */
+ public function test_helper_url_no_rewrite($route, $params, $is_amp, $session_id, $expected, $description)
+ {
+ $this->helper = new \phpbb\controller\helper($this->template, $this->user, $this->config, $this->provider, '', 'php');
+ $this->assertEquals($expected, $this->helper->route($route, $params, $is_amp, $session_id));
+ }
+
+ public function helper_url_data_with_rewrite()
+ {
+ return array(
+ array('controller2', array('t' => 1, 'f' => 2), true, false, 'foo/bar?t=1&amp;f=2', 'parameters in params-argument as array'),
+ array('controller2', array('t' => 1, 'f' => 2), false, false, 'foo/bar?t=1&f=2', 'parameters in params-argument as array'),
+ array('controller3', array('p' => 3, 't' => 1, 'f' => 2), true, false, 'foo/bar/p-3?t=1&amp;f=2', 'parameters in params-argument as array'),
+ array('controller3', array('p' => 3, 't' => 1, 'f' => 2), false, false, 'foo/bar/p-3?t=1&f=2', 'parameters in params-argument as array'),
+
+ // Custom sid parameter
+ array('controller2', array('t' => 1, 'f' => 2), true, 'custom-sid', 'foo/bar?t=1&amp;f=2&amp;sid=custom-sid', 'params-argument (array) using session_id'),
+ array('controller2', array('t' => 1, 'f' => 2), false, 'custom-sid', 'foo/bar?t=1&f=2&sid=custom-sid', 'params-argument (array) using session_id'),
+ array('controller3', array('p' => 3, 't' => 1, 'f' => 2), true, 'custom-sid', 'foo/bar/p-3?t=1&amp;f=2&amp;sid=custom-sid', 'params-argument (array) using session_id'),
+
+ // Testing anchors
+ array('controller2', array('t' => 1, 'f' => 2, '#' => 'anchor'), true, false, 'foo/bar?t=1&amp;f=2#anchor', 'anchor in params-argument (array)'),
+ array('controller2', array('t' => 1, 'f' => 2, '#' => 'anchor'), false, false, 'foo/bar?t=1&f=2#anchor', 'anchor in params-argument (array)'),
+ array('controller3', array('p' => 3, 't' => 1, 'f' => 2, '#' => 'anchor'), true, false, 'foo/bar/p-3?t=1&amp;f=2#anchor', 'anchor in params-argument (array)'),
+
+ // Anchors and custom sid
+ array('controller2', array('t' => 1, 'f' => 2, '#' => 'anchor'), true, 'custom-sid', 'foo/bar?t=1&amp;f=2&amp;sid=custom-sid#anchor', 'anchor in params-argument (array) using session_id'),
+ array('controller2', array('t' => 1, 'f' => 2, '#' => 'anchor'), false, 'custom-sid', 'foo/bar?t=1&f=2&sid=custom-sid#anchor', 'anchor in params-argument (array) using session_id'),
+ array('controller3', array('p' => 3, 't' => 1, 'f' => 2, '#' => 'anchor'), true, 'custom-sid', 'foo/bar/p-3?t=1&amp;f=2&amp;sid=custom-sid#anchor', 'anchor in params-argument (array) using session_id'),
+
+ // Empty parameters should not append the &amp; or ?
+ array('controller2', array(), true, false, 'foo/bar', 'no params using empty array'),
+ array('controller2', array(), false, false, 'foo/bar', 'no params using empty array'),
+ array('controller3', array('p' => 3), true, false, 'foo/bar/p-3', 'no params using empty array'),
+ );
+ }
+
+ /**
+ * @dataProvider helper_url_data_with_rewrite()
+ */
+ public function test_helper_url_with_rewrite($route, $params, $is_amp, $session_id, $expected, $description)
+ {
+ $this->config = new \phpbb\config\config(array('enable_mod_rewrite' => '1'));
+ $this->helper = new \phpbb\controller\helper($this->template, $this->user, $this->config, $this->provider, '', 'php');
+ $this->assertEquals($expected, $this->helper->route($route, $params, $is_amp, $session_id));
+ }
+}
diff --git a/tests/controller/phpbb/controller/foo.php b/tests/controller/phpbb/controller/foo.php
new file mode 100644
index 0000000000..98669f428f
--- /dev/null
+++ b/tests/controller/phpbb/controller/foo.php
@@ -0,0 +1,18 @@
+<?php
+
+namespace phpbb\controller;
+
+use Symfony\Component\HttpFoundation\Response;
+
+class foo
+{
+ /**
+ * Bar method
+ *
+ * @return null
+ */
+ public function bar()
+ {
+ return new Response('bar()', 200);
+ }
+}
diff --git a/tests/cron/ext/testext/cron/dummy_task.php b/tests/cron/ext/testext/cron/dummy_task.php
new file mode 100644
index 0000000000..8cdb6b09d5
--- /dev/null
+++ b/tests/cron/ext/testext/cron/dummy_task.php
@@ -0,0 +1,28 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2010 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+class phpbb_ext_testext_cron_dummy_task extends \phpbb\cron\task\base
+{
+ static public $was_run = 0;
+
+ public function get_name()
+ {
+ return get_class($this);
+ }
+
+ public function run()
+ {
+ self::$was_run++;
+ }
+
+ public function should_run()
+ {
+ return true;
+ }
+}
diff --git a/tests/cron/includes/cron/task/core/dummy_task.php b/tests/cron/includes/cron/task/core/dummy_task.php
new file mode 100644
index 0000000000..c34684701b
--- /dev/null
+++ b/tests/cron/includes/cron/task/core/dummy_task.php
@@ -0,0 +1,28 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2010 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+class phpbb_cron_task_core_dummy_task extends \phpbb\cron\task\base
+{
+ static public $was_run = 0;
+
+ public function get_name()
+ {
+ return get_class($this);
+ }
+
+ public function run()
+ {
+ self::$was_run++;
+ }
+
+ public function should_run()
+ {
+ return true;
+ }
+}
diff --git a/tests/cron/includes/cron/task/core/second_dummy_task.php b/tests/cron/includes/cron/task/core/second_dummy_task.php
new file mode 100644
index 0000000000..1b212ab05d
--- /dev/null
+++ b/tests/cron/includes/cron/task/core/second_dummy_task.php
@@ -0,0 +1,28 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2010 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+class phpbb_cron_task_core_second_dummy_task extends \phpbb\cron\task\base
+{
+ static public $was_run = 0;
+
+ public function get_name()
+ {
+ return get_class($this);
+ }
+
+ public function run()
+ {
+ self::$was_run++;
+ }
+
+ public function should_run()
+ {
+ return true;
+ }
+}
diff --git a/tests/cron/manager_test.php b/tests/cron/manager_test.php
new file mode 100644
index 0000000000..713f44c1e2
--- /dev/null
+++ b/tests/cron/manager_test.php
@@ -0,0 +1,76 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2010 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+require_once dirname(__FILE__) . '/includes/cron/task/core/dummy_task.php';
+require_once dirname(__FILE__) . '/includes/cron/task/core/second_dummy_task.php';
+require_once dirname(__FILE__) . '/ext/testext/cron/dummy_task.php';
+require_once dirname(__FILE__) . '/tasks/simple_ready.php';
+require_once dirname(__FILE__) . '/tasks/simple_not_runnable.php';
+require_once dirname(__FILE__) . '/tasks/simple_should_not_run.php';
+
+class phpbb_cron_manager_test extends PHPUnit_Framework_TestCase
+{
+ public function setUp()
+ {
+ $this->manager = $this->create_cron_manager(array(
+ new phpbb_cron_task_core_dummy_task(),
+ new phpbb_cron_task_core_second_dummy_task(),
+ new phpbb_ext_testext_cron_dummy_task(),
+ ));
+ $this->task_name = 'phpbb_cron_task_core_dummy_task';
+ }
+
+ public function test_manager_finds_shipped_task_by_name()
+ {
+ $task = $this->manager->find_task($this->task_name);
+ $this->assertInstanceOf('\phpbb\cron\task\wrapper', $task);
+ $this->assertEquals($this->task_name, $task->get_name());
+ }
+
+ public function test_manager_finds_all_ready_tasks()
+ {
+ $tasks = $this->manager->find_all_ready_tasks();
+ $this->assertEquals(3, sizeof($tasks));
+ }
+
+ public function test_manager_finds_one_ready_task()
+ {
+ $task = $this->manager->find_one_ready_task();
+ $this->assertInstanceOf('\phpbb\cron\task\wrapper', $task);
+ }
+
+ public function test_manager_finds_only_ready_tasks()
+ {
+ $manager = $this->create_cron_manager(array(
+ new phpbb_cron_task_core_simple_ready(),
+ new phpbb_cron_task_core_simple_not_runnable(),
+ new phpbb_cron_task_core_simple_should_not_run(),
+ ));
+ $tasks = $manager->find_all_ready_tasks();
+ $task_names = $this->tasks_to_names($tasks);
+ $this->assertEquals(array('phpbb_cron_task_core_simple_ready'), $task_names);
+ }
+
+ private function tasks_to_names($tasks)
+ {
+ $names = array();
+ foreach ($tasks as $task)
+ {
+ $names[] = $task->get_name();
+ }
+ return $names;
+ }
+
+ private function create_cron_manager($tasks)
+ {
+ global $phpbb_root_path, $phpEx;
+
+ return new \phpbb\cron\manager($tasks, $phpbb_root_path, $phpEx);
+ }
+}
diff --git a/tests/cron/tasks/simple_not_runnable.php b/tests/cron/tasks/simple_not_runnable.php
new file mode 100644
index 0000000000..4951b5b4b9
--- /dev/null
+++ b/tests/cron/tasks/simple_not_runnable.php
@@ -0,0 +1,18 @@
+<?php
+
+class phpbb_cron_task_core_simple_not_runnable extends \phpbb\cron\task\base
+{
+ public function get_name()
+ {
+ return get_class($this);
+ }
+
+ public function run()
+ {
+ }
+
+ public function is_runnable()
+ {
+ return false;
+ }
+}
diff --git a/tests/cron/tasks/simple_ready.php b/tests/cron/tasks/simple_ready.php
new file mode 100644
index 0000000000..245d9ba738
--- /dev/null
+++ b/tests/cron/tasks/simple_ready.php
@@ -0,0 +1,13 @@
+<?php
+
+class phpbb_cron_task_core_simple_ready extends \phpbb\cron\task\base
+{
+ public function get_name()
+ {
+ return get_class($this);
+ }
+
+ public function run()
+ {
+ }
+}
diff --git a/tests/cron/tasks/simple_should_not_run.php b/tests/cron/tasks/simple_should_not_run.php
new file mode 100644
index 0000000000..7bd9df31b6
--- /dev/null
+++ b/tests/cron/tasks/simple_should_not_run.php
@@ -0,0 +1,18 @@
+<?php
+
+class phpbb_cron_task_core_simple_should_not_run extends \phpbb\cron\task\base
+{
+ public function get_name()
+ {
+ return get_class($this);
+ }
+
+ public function run()
+ {
+ }
+
+ public function should_run()
+ {
+ return false;
+ }
+}
diff --git a/tests/datetime/from_format_test.php b/tests/datetime/from_format_test.php
new file mode 100644
index 0000000000..34f7f9ae44
--- /dev/null
+++ b/tests/datetime/from_format_test.php
@@ -0,0 +1,54 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+require_once dirname(__FILE__) . '/../mock/lang.php';
+
+class phpbb_datetime_from_format_test extends phpbb_test_case
+{
+ public function from_format_data()
+ {
+ return array(
+ array(
+ 'UTC',
+ 'Y-m-d',
+ '2012-06-08',
+ ),
+
+ array(
+ 'Europe/Berlin',
+ 'Y-m-d H:i:s',
+ '2012-06-08 14:01:02',
+ ),
+ );
+ }
+
+ /**
+ * @dataProvider from_format_data()
+ */
+ public function test_from_format($timezone, $format, $expected)
+ {
+ global $user;
+
+ $user = new \phpbb\user();
+ $user->timezone = new DateTimeZone($timezone);
+ $user->lang['datetime'] = array(
+ 'TODAY' => 'Today',
+ 'TOMORROW' => 'Tomorrow',
+ 'YESTERDAY' => 'Yesterday',
+ 'AGO' => array(
+ 0 => 'less than a minute ago',
+ 1 => '%d minute ago',
+ 2 => '%d minutes ago',
+ ),
+ );
+
+ $timestamp = $user->get_timestamp_from_format($format, $expected, new DateTimeZone($timezone));
+ $this->assertEquals($expected, $user->format_date($timestamp, $format, true));
+ }
+}
diff --git a/tests/dbal/auto_increment_test.php b/tests/dbal/auto_increment_test.php
index e87fc1c6bd..2196292e83 100644
--- a/tests/dbal/auto_increment_test.php
+++ b/tests/dbal/auto_increment_test.php
@@ -8,7 +8,6 @@
*/
require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php';
-require_once dirname(__FILE__) . '/../../phpBB/includes/db/db_tools.php';
class phpbb_dbal_auto_increment_test extends phpbb_database_test_case
{
@@ -27,7 +26,7 @@ class phpbb_dbal_auto_increment_test extends phpbb_database_test_case
parent::setUp();
$this->db = $this->new_dbal();
- $this->tools = new phpbb_db_tools($this->db);
+ $this->tools = new \phpbb\db\tools($this->db);
$this->table_data = array(
'COLUMNS' => array(
diff --git a/tests/dbal/case_test.php b/tests/dbal/case_test.php
new file mode 100644
index 0000000000..57a1729a39
--- /dev/null
+++ b/tests/dbal/case_test.php
@@ -0,0 +1,69 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+class phpbb_dbal_case_test extends phpbb_database_test_case
+{
+ public function getDataSet()
+ {
+ return $this->createXMLDataSet(dirname(__FILE__).'/fixtures/config.xml');
+ }
+
+ public function test_case_int()
+ {
+ $db = $this->new_dbal();
+
+ $sql = 'SELECT ' . $db->sql_case('1 = 1', '1', '2') . ' AS test_num
+ FROM phpbb_config';
+ $result = $db->sql_query_limit($sql, 1);
+
+ $this->assertEquals(1, (int) $db->sql_fetchfield('test_num'));
+
+ $sql = 'SELECT ' . $db->sql_case('1 = 0', '1', '2') . ' AS test_num
+ FROM phpbb_config';
+ $result = $db->sql_query_limit($sql, 1);
+
+ $this->assertEquals(2, (int) $db->sql_fetchfield('test_num'));
+ }
+
+ public function test_case_string()
+ {
+ $db = $this->new_dbal();
+
+ $sql = 'SELECT ' . $db->sql_case('1 = 1', "'foo'", "'bar'") . ' AS test_string
+ FROM phpbb_config';
+ $result = $db->sql_query_limit($sql, 1);
+
+ $this->assertEquals('foo', $db->sql_fetchfield('test_string'));
+
+ $sql = 'SELECT ' . $db->sql_case('1 = 0', "'foo'", "'bar'") . ' AS test_string
+ FROM phpbb_config';
+ $result = $db->sql_query_limit($sql, 1);
+
+ $this->assertEquals('bar', $db->sql_fetchfield('test_string'));
+ }
+
+ public function test_case_column()
+ {
+ $db = $this->new_dbal();
+
+ $sql = 'SELECT ' . $db->sql_case("config_name = 'config1'", 'config_name', 'config_value') . " AS test_string
+ FROM phpbb_config
+ WHERE config_name = 'config1'";
+ $result = $db->sql_query_limit($sql, 1);
+
+ $this->assertEquals('config1', $db->sql_fetchfield('test_string'));
+
+ $sql = 'SELECT ' . $db->sql_case("config_name = 'config1'", 'config_name', 'config_value') . " AS test_string
+ FROM phpbb_config
+ WHERE config_value = 'bar'";
+ $result = $db->sql_query_limit($sql, 1);
+
+ $this->assertEquals('bar', $db->sql_fetchfield('test_string'));
+ }
+}
diff --git a/tests/dbal/concatenate_test.php b/tests/dbal/concatenate_test.php
new file mode 100644
index 0000000000..0891fa58a0
--- /dev/null
+++ b/tests/dbal/concatenate_test.php
@@ -0,0 +1,64 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+class phpbb_dbal_concatenate_test extends phpbb_database_test_case
+{
+ public function getDataSet()
+ {
+ return $this->createXMLDataSet(dirname(__FILE__).'/fixtures/config.xml');
+ }
+
+ public function test_concatenate_string()
+ {
+ $db = $this->new_dbal();
+
+ $sql = 'SELECT config_name, ' . $db->sql_concatenate('config_name', "'" . $db->sql_escape('append') . "'") . ' AS string
+ FROM phpbb_config';
+ $result = $db->sql_query($sql);
+
+ $db->sql_return_on_error(false);
+
+ $this->assertEquals(array(
+ array(
+ 'config_name' => 'config1',
+ 'string' => 'config1append',
+ ),
+ array(
+ 'config_name' => 'config2',
+ 'string' => 'config2append',
+ ),
+ ),
+ $db->sql_fetchrowset($result)
+ );
+ }
+
+ public function test_concatenate_statement()
+ {
+ $db = $this->new_dbal();
+
+ $sql = 'SELECT config_name, ' . $db->sql_concatenate('config_name', 'config_value') . ' AS string
+ FROM phpbb_config';
+ $result = $db->sql_query($sql);
+
+ $db->sql_return_on_error(false);
+
+ $this->assertEquals(array(
+ array(
+ 'config_name' => 'config1',
+ 'string' => 'config1foo',
+ ),
+ array(
+ 'config_name' => 'config2',
+ 'string' => 'config2bar',
+ ),
+ ),
+ $db->sql_fetchrowset($result)
+ );
+ }
+}
diff --git a/tests/dbal/connect_test.php b/tests/dbal/connect_test.php
index 505ce28fa1..1e352d6b03 100644
--- a/tests/dbal/connect_test.php
+++ b/tests/dbal/connect_test.php
@@ -22,9 +22,7 @@ class phpbb_dbal_connect_test extends phpbb_database_test_case
$config = $this->get_database_config();
- require_once dirname(__FILE__) . '/../../phpBB/includes/db/' . $config['dbms'] . '.php';
- $dbal = 'dbal_' . $config['dbms'];
- $db = new $dbal();
+ $db = new $config['dbms']();
// Failure to connect results in a trigger_error call in dbal.
// phpunit converts triggered errors to exceptions.
diff --git a/tests/dbal/db_tools_test.php b/tests/dbal/db_tools_test.php
index c20e46011f..e25335165a 100644
--- a/tests/dbal/db_tools_test.php
+++ b/tests/dbal/db_tools_test.php
@@ -8,7 +8,6 @@
*/
require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php';
-require_once dirname(__FILE__) . '/../../phpBB/includes/db/db_tools.php';
class phpbb_dbal_db_tools_test extends phpbb_database_test_case
{
@@ -27,7 +26,7 @@ class phpbb_dbal_db_tools_test extends phpbb_database_test_case
parent::setUp();
$this->db = $this->new_dbal();
- $this->tools = new phpbb_db_tools($this->db);
+ $this->tools = new \phpbb\db\tools($this->db);
$this->table_data = array(
'COLUMNS' => array(
@@ -255,7 +254,7 @@ class phpbb_dbal_db_tools_test extends phpbb_database_test_case
public function test_peform_schema_changes_drop_tables()
{
- $db_tools = $this->getMock('phpbb_db_tools', array(
+ $db_tools = $this->getMock('\phpbb\db\tools', array(
'sql_table_exists',
'sql_table_drop',
), array(&$this->db));
@@ -281,7 +280,7 @@ class phpbb_dbal_db_tools_test extends phpbb_database_test_case
public function test_peform_schema_changes_drop_columns()
{
- $db_tools = $this->getMock('phpbb_db_tools', array(
+ $db_tools = $this->getMock('\phpbb\db\tools', array(
'sql_column_exists',
'sql_column_remove',
), array(&$this->db));
diff --git a/tests/dbal/fixtures/massmail_crossjoin.xml b/tests/dbal/fixtures/massmail_crossjoin.xml
index ef0a2b7149..1050ba067e 100644
--- a/tests/dbal/fixtures/massmail_crossjoin.xml
+++ b/tests/dbal/fixtures/massmail_crossjoin.xml
@@ -14,16 +14,12 @@
<column>username_clean</column>
<column>user_permissions</column>
<column>user_sig</column>
- <column>user_occ</column>
- <column>user_interests</column>
<row>
<value>1</value>
<value>mass email</value>
<value>mass email</value>
<value></value>
<value></value>
- <value></value>
- <value></value>
</row>
<row>
<value>2</value>
@@ -31,8 +27,6 @@
<value>banned</value>
<value></value>
<value></value>
- <value></value>
- <value></value>
</row>
<row>
<value>3</value>
@@ -40,8 +34,6 @@
<value>not in group</value>
<value></value>
<value></value>
- <value></value>
- <value></value>
</row>
</table>
<table name="phpbb_user_group">
diff --git a/tests/dbal/fixtures/migrator.xml b/tests/dbal/fixtures/migrator.xml
new file mode 100644
index 0000000000..25be4d4129
--- /dev/null
+++ b/tests/dbal/fixtures/migrator.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<dataset>
+ <table name="phpbb_migrations">
+ <column>migration_name</column>
+ <column>migration_depends_on</column>
+ <column>migration_schema_done</column>
+ <column>migration_data_done</column>
+ <column>migration_data_state</column>
+ <column>migration_start_time</column>
+ <column>migration_end_time</column>
+ <row>
+ <value>installed_migration</value>
+ <value></value>
+ <value>1</value>
+ <value>1</value>
+ <value></value>
+ <value>1234</value>
+ <value>5678</value>
+ </row>
+ </table>
+ <table name="phpbb_config">
+ <column>config_name</column>
+ <column>config_value</column>
+ <row>
+ <value>foo</value>
+ <value>bar</value>
+ </row>
+ </table>
+</dataset>
diff --git a/tests/dbal/fixtures/migrator_module.xml b/tests/dbal/fixtures/migrator_module.xml
new file mode 100644
index 0000000000..32afe7e6f3
--- /dev/null
+++ b/tests/dbal/fixtures/migrator_module.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<dataset>
+ <table name="phpbb_modules">
+ <column>module_id</column>
+ <column>module_enabled</column>
+ <column>module_display</column>
+ <column>module_basename</column>
+ <column>module_class</column>
+ <column>parent_id</column>
+ <column>left_id</column>
+ <column>right_id</column>
+ <column>module_langname</column>
+ <column>module_mode</column>
+ <column>module_auth</column>
+ <row>
+ <value>1</value>
+ <value>1</value>
+ <value>1</value>
+ <value></value>
+ <value>acp</value>
+ <value>0</value>
+ <value>1</value>
+ <value>4</value>
+ <value>ACP_CAT</value>
+ <value></value>
+ <value></value>
+ </row>
+ <row>
+ <value>2</value>
+ <value>1</value>
+ <value>1</value>
+ <value>acp_test</value>
+ <value>acp</value>
+ <value>1</value>
+ <value>2</value>
+ <value>3</value>
+ <value>ACP_MODULE</value>
+ <value>test</value>
+ <value></value>
+ </row>
+ </table>
+</dataset>
diff --git a/tests/dbal/fixtures/migrator_permission.xml b/tests/dbal/fixtures/migrator_permission.xml
new file mode 100644
index 0000000000..08cec42a42
--- /dev/null
+++ b/tests/dbal/fixtures/migrator_permission.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<dataset>
+ <table name="phpbb_acl_options">
+ <column>auth_option_id</column>
+ <column>auth_option</column>
+ <column>is_global</column>
+ <column>is_local</column>
+ <column>founder_only</column>
+ <row>
+ <value>1</value>
+ <value>global</value>
+ <value>1</value>
+ <value>0</value>
+ <value>0</value>
+ </row>
+ <row>
+ <value>2</value>
+ <value>local</value>
+ <value>0</value>
+ <value>1</value>
+ <value>0</value>
+ </row>
+ <row>
+ <value>3</value>
+ <value>both</value>
+ <value>1</value>
+ <value>1</value>
+ <value>0</value>
+ </row>
+ </table>
+</dataset>
diff --git a/tests/dbal/fixtures/styles.xml b/tests/dbal/fixtures/styles.xml
index 47b384c47f..dcbe39d3b0 100644
--- a/tests/dbal/fixtures/styles.xml
+++ b/tests/dbal/fixtures/styles.xml
@@ -5,35 +5,39 @@
<column>style_name</column>
<column>style_copyright</column>
<column>style_active</column>
- <column>template_id</column>
- <column>theme_id</column>
- <column>imageset_id</column>
+ <column>style_path</column>
+ <column>bbcode_bitfield</column>
+ <column>style_parent_id</column>
+ <column>style_parent_tree</column>
<row>
<value>1</value>
<value>prosilver</value>
<value>&amp;copy; phpBB Group</value>
<value>1</value>
- <value>1</value>
- <value>1</value>
- <value>1</value>
+ <value>prosilver</value>
+ <value>kNg=</value>
+ <value>0</value>
+ <value></value>
</row>
<row>
<value>2</value>
<value>prosilver2</value>
<value>&amp;copy; phpBB Group</value>
<value>0</value>
- <value>2</value>
- <value>2</value>
- <value>2</value>
+ <value>prosilver2</value>
+ <value>kNg=</value>
+ <value>0</value>
+ <value></value>
</row>
<row>
<value>3</value>
<value>Prosilver1</value>
<value>&amp;copy; phpBB Group</value>
<value>0</value>
- <value>3</value>
- <value>3</value>
- <value>3</value>
+ <value>prosilver1</value>
+ <value>kNg=</value>
+ <value>1</value>
+ <value>prosilver</value>
</row>
</table>
</dataset>
diff --git a/tests/dbal/fixtures/three_users.xml b/tests/dbal/fixtures/three_users.xml
index a50e3e8634..a601e539e1 100644
--- a/tests/dbal/fixtures/three_users.xml
+++ b/tests/dbal/fixtures/three_users.xml
@@ -5,31 +5,23 @@
<column>username_clean</column>
<column>user_permissions</column>
<column>user_sig</column>
- <column>user_occ</column>
- <column>user_interests</column>
<row>
<value>1</value>
<value>barfoo</value>
<value></value>
<value></value>
- <value></value>
- <value></value>
</row>
<row>
<value>2</value>
<value>foobar</value>
<value></value>
<value></value>
- <value></value>
- <value></value>
</row>
<row>
<value>3</value>
<value>bertie</value>
<value></value>
<value></value>
- <value></value>
- <value></value>
</row>
</table>
</dataset>
diff --git a/tests/dbal/migration/dummy.php b/tests/dbal/migration/dummy.php
new file mode 100644
index 0000000000..041c529855
--- /dev/null
+++ b/tests/dbal/migration/dummy.php
@@ -0,0 +1,27 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2011 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+class phpbb_dbal_migration_dummy extends \phpbb\db\migration\migration
+{
+ static public function depends_on()
+ {
+ return array('installed_migration');
+ }
+
+ function update_schema()
+ {
+ return array(
+ 'add_columns' => array(
+ 'phpbb_config' => array(
+ 'extra_column' => array('UINT', 1),
+ ),
+ ),
+ );
+ }
+}
diff --git a/tests/dbal/migration/fail.php b/tests/dbal/migration/fail.php
new file mode 100644
index 0000000000..d90972720d
--- /dev/null
+++ b/tests/dbal/migration/fail.php
@@ -0,0 +1,41 @@
+<?php
+/**
+*
+* @package migration
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License v2
+*
+*/
+
+class phpbb_dbal_migration_fail extends \phpbb\db\migration\migration
+{
+ function update_schema()
+ {
+ return array(
+ 'add_columns' => array(
+ $this->table_prefix . 'config' => array(
+ 'test_column' => array('BOOL', 1),
+ ),
+ ),
+ );
+ }
+
+ function revert_schema()
+ {
+ return array(
+ 'drop_columns' => array(
+ $this->table_prefix . 'config' => array(
+ 'test_column',
+ ),
+ ),
+ );
+ }
+
+ function update_data()
+ {
+ return array(
+ array('config.add', array('foobar3', true)),
+ array('config.update', array('does_not_exist', true)),
+ );
+ }
+}
diff --git a/tests/dbal/migration/if.php b/tests/dbal/migration/if.php
new file mode 100644
index 0000000000..bbbda60ea3
--- /dev/null
+++ b/tests/dbal/migration/if.php
@@ -0,0 +1,44 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2011 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+class phpbb_dbal_migration_if extends \phpbb\db\migration\migration
+{
+ function update_schema()
+ {
+ return array();
+ }
+
+ function update_data()
+ {
+ return array(
+ array('if', array(
+ true,
+ array('custom', array(array(&$this, 'test_true'))),
+ )),
+ array('if', array(
+ false,
+ array('custom', array(array(&$this, 'test_false'))),
+ )),
+ );
+ }
+
+ function test_true()
+ {
+ global $migrator_test_if_true_failed;
+
+ $migrator_test_if_true_failed = false;
+ }
+
+ function test_false()
+ {
+ global $migrator_test_if_false_failed;
+
+ $migrator_test_if_false_failed = true;
+ }
+}
diff --git a/tests/dbal/migration/installed.php b/tests/dbal/migration/installed.php
new file mode 100644
index 0000000000..4b86896d9c
--- /dev/null
+++ b/tests/dbal/migration/installed.php
@@ -0,0 +1,30 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2011 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+class phpbb_dbal_migration_installed extends \phpbb\db\migration\migration
+{
+ function effectively_installed()
+ {
+ return true;
+ }
+
+ function update_data()
+ {
+ return array(
+ array('custom', array(array(&$this, 'test'))),
+ );
+ }
+
+ function test()
+ {
+ global $migrator_test_installed_failed;
+
+ $migrator_test_installed_failed = true;
+ }
+}
diff --git a/tests/dbal/migration/recall.php b/tests/dbal/migration/recall.php
new file mode 100644
index 0000000000..041d12ad27
--- /dev/null
+++ b/tests/dbal/migration/recall.php
@@ -0,0 +1,38 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2011 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+class phpbb_dbal_migration_recall extends \phpbb\db\migration\migration
+{
+ function update_schema()
+ {
+ return array();
+ }
+
+ function update_data()
+ {
+ return array(
+ array('custom', array(array(&$this, 'test_call'))),
+ );
+ }
+
+ // This function should be called 10 times
+ function test_call($input)
+ {
+ global $migrator_test_call_input;
+
+ $migrator_test_call_input = (int) $input;
+
+ if ($migrator_test_call_input < 10)
+ {
+ return ($migrator_test_call_input + 1);
+ }
+
+ return;
+ }
+}
diff --git a/tests/dbal/migration/revert.php b/tests/dbal/migration/revert.php
new file mode 100644
index 0000000000..1882b20492
--- /dev/null
+++ b/tests/dbal/migration/revert.php
@@ -0,0 +1,40 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2011 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+class phpbb_dbal_migration_revert extends \phpbb\db\migration\migration
+{
+ function update_schema()
+ {
+ return array(
+ 'add_columns' => array(
+ 'phpbb_config' => array(
+ 'bar_column' => array('UINT', 1),
+ ),
+ ),
+ );
+ }
+
+ function revert_schema()
+ {
+ return array(
+ 'drop_columns' => array(
+ 'phpbb_config' => array(
+ 'bar_column',
+ ),
+ ),
+ );
+ }
+
+ function update_data()
+ {
+ return array(
+ array('config.add', array('foobartest', 0)),
+ );
+ }
+}
diff --git a/tests/dbal/migration/revert_with_dependency.php b/tests/dbal/migration/revert_with_dependency.php
new file mode 100644
index 0000000000..0b09fb784d
--- /dev/null
+++ b/tests/dbal/migration/revert_with_dependency.php
@@ -0,0 +1,16 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2011 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+class phpbb_dbal_migration_revert_with_dependency extends \phpbb\db\migration\migration
+{
+ static public function depends_on()
+ {
+ return array('phpbb_dbal_migration_revert');
+ }
+}
diff --git a/tests/dbal/migration/schema.php b/tests/dbal/migration/schema.php
new file mode 100644
index 0000000000..98407eb1bd
--- /dev/null
+++ b/tests/dbal/migration/schema.php
@@ -0,0 +1,44 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2014 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+class phpbb_dbal_migration_schema extends \phpbb\db\migration\migration
+{
+ function update_schema()
+ {
+ return array(
+ 'add_columns' => array(
+ $this->table_prefix . 'config' => array(
+ 'test_column1' => array('BOOL', 1),
+ ),
+ ),
+ 'add_tables' => array(
+ $this->table_prefix . 'foobar' => array(
+ 'COLUMNS' => array(
+ 'module_id' => array('UINT:3', NULL, 'auto_increment'),
+ ),
+ 'PRIMARY_KEY' => 'module_id',
+ ),
+ ),
+ );
+ }
+
+ function revert_schema()
+ {
+ return array(
+ 'drop_columns' => array(
+ $this->table_prefix . 'config' => array(
+ 'test_column1',
+ ),
+ ),
+ 'drop_tables' => array(
+ $this->table_prefix . 'foobar',
+ ),
+ );
+ }
+}
diff --git a/tests/dbal/migration/unfulfillable.php b/tests/dbal/migration/unfulfillable.php
new file mode 100644
index 0000000000..a1cdef9a23
--- /dev/null
+++ b/tests/dbal/migration/unfulfillable.php
@@ -0,0 +1,26 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2011 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+class phpbb_dbal_migration_unfulfillable extends \phpbb\db\migration\migration
+{
+ static public function depends_on()
+ {
+ return array('installed_migration', 'phpbb_dbal_migration_dummy', 'non_existant_migration');
+ }
+
+ function update_schema()
+ {
+ trigger_error('Schema update of migration with unfulfillable dependency was run!');
+ }
+
+ function update_data()
+ {
+ trigger_error('Data update of migration with unfulfillable dependency was run!');
+ }
+}
diff --git a/tests/dbal/migrator_test.php b/tests/dbal/migrator_test.php
new file mode 100644
index 0000000000..f22f5f5b30
--- /dev/null
+++ b/tests/dbal/migrator_test.php
@@ -0,0 +1,293 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2011 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php';
+require_once dirname(__FILE__) . '/migration/dummy.php';
+require_once dirname(__FILE__) . '/migration/unfulfillable.php';
+require_once dirname(__FILE__) . '/migration/if.php';
+require_once dirname(__FILE__) . '/migration/recall.php';
+require_once dirname(__FILE__) . '/migration/revert.php';
+require_once dirname(__FILE__) . '/migration/revert_with_dependency.php';
+require_once dirname(__FILE__) . '/migration/fail.php';
+require_once dirname(__FILE__) . '/migration/installed.php';
+require_once dirname(__FILE__) . '/migration/schema.php';
+
+class phpbb_dbal_migrator_test extends phpbb_database_test_case
+{
+ protected $db;
+ protected $db_tools;
+ protected $migrator;
+
+ public function getDataSet()
+ {
+ return $this->createXMLDataSet(dirname(__FILE__).'/fixtures/migrator.xml');
+ }
+
+ public function setUp()
+ {
+ parent::setUp();
+
+ $this->db = $this->new_dbal();
+ $this->db_tools = new \phpbb\db\tools($this->db);
+
+ $this->config = new \phpbb\config\db($this->db, new phpbb_mock_cache, 'phpbb_config');
+
+ $tools = array(
+ new \phpbb\db\migration\tool\config($this->config),
+ );
+
+ $this->migrator = new \phpbb\db\migrator(
+ $this->config,
+ $this->db,
+ $this->db_tools,
+ 'phpbb_migrations',
+ dirname(__FILE__) . '/../../phpBB/',
+ 'php',
+ 'phpbb_',
+ $tools,
+ new \phpbb\db\migration\helper()
+ );
+
+ $container = new phpbb_mock_container_builder();
+ $container->set('migrator', $migrator);
+
+ $this->extension_manager = new \phpbb\extension\manager(
+ $container,
+ $this->db,
+ $this->config,
+ new phpbb\filesystem(),
+ 'phpbb_ext',
+ dirname(__FILE__) . '/../../phpBB/',
+ 'php',
+ null
+ );
+ }
+
+ public function test_update()
+ {
+ $this->migrator->set_migrations(array('phpbb_dbal_migration_dummy'));
+
+ // schema
+ $this->migrator->update();
+ $this->assertFalse($this->migrator->finished());
+
+ $this->assertSqlResultEquals(
+ array(array('success' => '1')),
+ "SELECT 1 as success
+ FROM phpbb_migrations
+ WHERE migration_name = 'phpbb_dbal_migration_dummy'
+ AND migration_start_time >= " . (time() - 1) . "
+ AND migration_start_time <= " . (time() + 1),
+ 'Start time set correctly'
+ );
+
+ // data
+ $this->migrator->update();
+ $this->assertTrue($this->migrator->finished());
+
+ $this->assertSqlResultEquals(
+ array(array('extra_column' => '1')),
+ "SELECT extra_column FROM phpbb_config WHERE config_name = 'foo'",
+ 'Dummy migration created extra_column with value 1 in all rows.'
+ );
+
+ $this->assertSqlResultEquals(
+ array(array('success' => '1')),
+ "SELECT 1 as success
+ FROM phpbb_migrations
+ WHERE migration_name = 'phpbb_dbal_migration_dummy'
+ AND migration_start_time <= migration_end_time
+ AND migration_end_time >= " . (time() - 1) . "
+ AND migration_end_time <= " . (time() + 1),
+ 'End time set correctly'
+ );
+
+ // cleanup
+ $this->db_tools->sql_column_remove('phpbb_config', 'extra_column');
+ }
+
+ public function test_unfulfillable()
+ {
+ $this->migrator->set_migrations(array('phpbb_dbal_migration_unfulfillable', 'phpbb_dbal_migration_dummy'));
+
+ while (!$this->migrator->finished())
+ {
+ $this->migrator->update();
+ }
+
+ $this->assertTrue($this->migrator->finished());
+
+ $this->assertSqlResultEquals(
+ array(array('extra_column' => '1')),
+ "SELECT extra_column FROM phpbb_config WHERE config_name = 'foo'",
+ 'Dummy migration was run, even though an unfulfillable migration was found.'
+ );
+
+ $this->db_tools->sql_column_remove('phpbb_config', 'extra_column');
+ }
+
+ public function test_if()
+ {
+ $this->migrator->set_migrations(array('phpbb_dbal_migration_if'));
+
+ // Don't like this, but I'm not sure there is any other way to do this
+ global $migrator_test_if_true_failed, $migrator_test_if_false_failed;
+ $migrator_test_if_true_failed = true;
+ $migrator_test_if_false_failed = false;
+
+ while (!$this->migrator->finished())
+ {
+ $this->migrator->update();
+ }
+
+ $this->assertFalse($migrator_test_if_true_failed, 'True test failed');
+ $this->assertFalse($migrator_test_if_false_failed, 'False test failed');
+ }
+
+ public function test_recall()
+ {
+ $this->migrator->set_migrations(array('phpbb_dbal_migration_recall'));
+
+ global $migrator_test_call_input;
+
+ // Run the schema first
+ $this->migrator->update();
+
+ $i = 0;
+ while (!$this->migrator->finished())
+ {
+ $this->migrator->update();
+
+ $this->assertSame($i, $migrator_test_call_input);
+
+ $i++;
+ }
+
+ $this->assertSame(10, $migrator_test_call_input);
+ }
+
+ public function test_revert()
+ {
+ // Make sure there are no other migrations in the db, this could cause issues
+ $this->db->sql_query("DELETE FROM phpbb_migrations");
+ $this->migrator->load_migration_state();
+
+ $this->migrator->set_migrations(array('phpbb_dbal_migration_revert', 'phpbb_dbal_migration_revert_with_dependency'));
+
+ $this->assertFalse($this->migrator->migration_state('phpbb_dbal_migration_revert'));
+ $this->assertFalse($this->migrator->migration_state('phpbb_dbal_migration_revert_with_dependency'));
+
+ // Install the migration first
+ while (!$this->migrator->finished())
+ {
+ $this->migrator->update();
+ }
+
+ $this->assertTrue($this->migrator->migration_state('phpbb_dbal_migration_revert') !== false);
+ $this->assertTrue($this->migrator->migration_state('phpbb_dbal_migration_revert_with_dependency') !== false);
+
+ $this->assertSqlResultEquals(
+ array(array('bar_column' => '1')),
+ "SELECT bar_column FROM phpbb_config WHERE config_name = 'foo'",
+ 'Installing revert migration failed to create bar_column.'
+ );
+
+ $this->assertTrue(isset($this->config['foobartest']));
+
+ while ($this->migrator->migration_state('phpbb_dbal_migration_revert') !== false)
+ {
+ $this->migrator->revert('phpbb_dbal_migration_revert');
+ }
+
+ $this->assertFalse($this->migrator->migration_state('phpbb_dbal_migration_revert'));
+ $this->assertFalse($this->migrator->migration_state('phpbb_dbal_migration_revert_with_dependency'));
+
+ $this->assertFalse(isset($this->config['foobartest']));
+
+ $sql = 'SELECT * FROM phpbb_config';
+ $result = $this->db->sql_query_limit($sql, 1);
+ $row = $this->db->sql_fetchrow($result);
+ $this->db->sql_freeresult($result);
+
+ if (isset($row['bar_column']))
+ {
+ $this->fail('Revert did not remove test_column.');
+ }
+ }
+
+ public function test_fail()
+ {
+ $this->migrator->set_migrations(array('phpbb_dbal_migration_fail'));
+
+ $this->assertFalse(isset($this->config['foobar3']));
+
+ try
+ {
+ while (!$this->migrator->finished())
+ {
+ $this->migrator->update();
+ }
+ }
+ catch (\phpbb\db\migration\exception $e) {}
+
+ // Failure should have caused an automatic roll-back, so this should not exist.
+ $this->assertFalse(isset($this->config['foobar3']));
+
+ $sql = 'SELECT * FROM phpbb_config';
+ $result = $this->db->sql_query_limit($sql, 1);
+ $row = $this->db->sql_fetchrow($result);
+ $this->db->sql_freeresult($result);
+
+ if (isset($row['test_column']))
+ {
+ $this->fail('Revert did not remove test_column.');
+ }
+ }
+
+ public function test_installed()
+ {
+ $this->migrator->set_migrations(array('phpbb_dbal_migration_installed'));
+
+ global $migrator_test_installed_failed;
+ $migrator_test_installed_failed = false;
+
+ while (!$this->migrator->finished())
+ {
+ $this->migrator->update();
+ }
+
+ $this->assertTrue($this->migrator->migration_state('phpbb_dbal_migration_installed') !== false);
+
+ if ($migrator_test_installed_failed)
+ {
+ $this->fail('Installed test failed');
+ }
+ }
+
+ public function test_schema()
+ {
+ $this->migrator->set_migrations(array('phpbb_dbal_migration_schema'));
+
+ while (!$this->migrator->finished())
+ {
+ $this->migrator->update();
+ }
+
+ $this->assertTrue($this->db_tools->sql_column_exists('phpbb_config', 'test_column1'));
+ $this->assertTrue($this->db_tools->sql_table_exists('phpbb_foobar'));
+
+ while ($this->migrator->migration_state('phpbb_dbal_migration_schema'))
+ {
+ $this->migrator->revert('phpbb_dbal_migration_schema');
+ }
+
+ $this->assertFalse($this->db_tools->sql_column_exists('phpbb_config', 'test_column1'));
+ $this->assertFalse($this->db_tools->sql_table_exists('phpbb_foobar'));
+ }
+}
diff --git a/tests/dbal/migrator_tool_config_test.php b/tests/dbal/migrator_tool_config_test.php
new file mode 100644
index 0000000000..807399385c
--- /dev/null
+++ b/tests/dbal/migrator_tool_config_test.php
@@ -0,0 +1,86 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2011 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+class phpbb_dbal_migrator_tool_config_test extends phpbb_test_case
+{
+ public function setup()
+ {
+ $this->config = new \phpbb\config\config(array());
+
+ $this->tool = new \phpbb\db\migration\tool\config($this->config);
+
+ parent::setup();
+ }
+
+ public function test_add()
+ {
+ $this->tool->add('foo', 'bar');
+ $this->assertEquals('bar', $this->config['foo']);
+ }
+
+ public function test_add_twice()
+ {
+ $this->tool->add('foo', 'bar');
+ $this->assertEquals('bar', $this->config['foo']);
+
+ $this->tool->add('foo', 'bar2');
+ $this->assertEquals('bar', $this->config['foo']);
+ }
+
+ public function test_update()
+ {
+ $this->config->set('foo', 'bar');
+
+ $this->tool->update('foo', 'bar2');
+ $this->assertEquals('bar2', $this->config['foo']);
+ }
+
+ public function test_update_if_equals()
+ {
+ $this->config->set('foo', 'bar');
+
+ $this->tool->update_if_equals('', 'foo', 'bar2');
+ $this->assertEquals('bar', $this->config['foo']);
+
+ $this->tool->update_if_equals('bar', 'foo', 'bar2');
+ $this->assertEquals('bar2', $this->config['foo']);
+ }
+
+ public function test_remove()
+ {
+ $this->config->set('foo', 'bar');
+
+ $this->tool->remove('foo');
+ $this->assertFalse(isset($this->config['foo']));
+ }
+
+ public function test_reverse_add()
+ {
+ $this->config->set('foo', 'bar');
+
+ $this->tool->reverse('add', 'foo');
+ $this->assertFalse(isset($this->config['foo']));
+ }
+
+ public function test_reverse_remove()
+ {
+ $this->config->delete('foo');
+
+ $this->tool->reverse('remove', 'foo');
+ $this->assertEquals('', $this->config['foo']);
+ }
+
+ public function test_reverse_update_if_equals()
+ {
+ $this->config->set('foo', 'bar');
+
+ $this->tool->reverse('update_if_equals', 'test', 'foo', 'bar');
+ $this->assertEquals('test', $this->config['foo']);
+ }
+}
diff --git a/tests/dbal/migrator_tool_module_test.php b/tests/dbal/migrator_tool_module_test.php
new file mode 100644
index 0000000000..3c23891348
--- /dev/null
+++ b/tests/dbal/migrator_tool_module_test.php
@@ -0,0 +1,153 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2011 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php';
+
+class phpbb_dbal_migrator_tool_module_test extends phpbb_database_test_case
+{
+ public function getDataSet()
+ {
+ return $this->createXMLDataSet(dirname(__FILE__).'/fixtures/migrator_module.xml');
+ }
+
+ public function setup()
+ {
+ // Need global $db, $user for delete_module function in acp_modules
+ global $phpbb_root_path, $phpEx, $skip_add_log, $db, $user, $phpbb_log;
+
+ parent::setup();
+
+ // Force add_log function to not be used
+ $skip_add_log = true;
+
+ $db = $this->db = $this->new_dbal();
+ $this->cache = new \phpbb\cache\service(new \phpbb\cache\driver\null(), new \phpbb\config\config(array()), $this->db, $phpbb_root_path, $phpEx);
+ $user = $this->user = new \phpbb\user();
+
+ $cache = new phpbb_mock_cache;
+ $phpbb_dispatcher = new phpbb_mock_event_dispatcher();
+ $auth = $this->getMock('\phpbb\auth\auth');
+ $phpbb_log = new \phpbb\log\log($db, $user, $auth, $phpbb_dispatcher, $phpbb_root_path, 'adm/', $phpEx, LOG_TABLE);
+
+ $this->tool = new \phpbb\db\migration\tool\module($this->db, $this->cache, $this->user, $phpbb_root_path, $phpEx, 'phpbb_modules');
+ }
+
+ public function exists_data()
+ {
+ return array(
+ // Test the category
+ array(
+ '',
+ 'ACP_CAT',
+ true,
+ ),
+ array(
+ 0,
+ 'ACP_CAT',
+ true,
+ ),
+
+ // Test the module
+ array(
+ '',
+ 'ACP_MODULE',
+ false,
+ ),
+ array(
+ false,
+ 'ACP_MODULE',
+ true,
+ ),
+ array(
+ 'ACP_CAT',
+ 'ACP_MODULE',
+ true,
+ ),
+ );
+ }
+
+ /**
+ * @dataProvider exists_data
+ */
+ public function test_exists($parent, $module, $expected)
+ {
+ $this->assertEquals($expected, $this->tool->exists('acp', $parent, $module));
+ }
+
+ public function test_add()
+ {
+ try
+ {
+ $this->tool->add('acp', 0, 'ACP_NEW_CAT');
+ }
+ catch (Exception $e)
+ {
+ $this->fail($e);
+ }
+ $this->assertEquals(true, $this->tool->exists('acp', 0, 'ACP_NEW_CAT'));
+
+ // Should throw an exception when trying to add a module that already exists
+ try
+ {
+ $this->tool->add('acp', 0, 'ACP_NEW_CAT');
+ $this->fail('Exception not thrown');
+ }
+ catch (Exception $e) {}
+
+ try
+ {
+ $this->tool->add('acp', 'ACP_NEW_CAT', array(
+ 'module_basename' => 'acp_new_module',
+ 'module_langname' => 'ACP_NEW_MODULE',
+ 'module_mode' => 'test',
+ 'module_auth' => '',
+ ));
+ }
+ catch (Exception $e)
+ {
+ $this->fail($e);
+ }
+ $this->assertEquals(true, $this->tool->exists('acp', 'ACP_NEW_CAT', 'ACP_NEW_MODULE'));
+ }
+
+ public function test_remove()
+ {
+ try
+ {
+ $this->tool->remove('acp', 'ACP_CAT', 'ACP_MODULE');
+ }
+ catch (Exception $e)
+ {
+ $this->fail($e);
+ }
+ $this->assertEquals(false, $this->tool->exists('acp', 'ACP_CAT', 'ACP_MODULE'));
+ }
+
+ public function test_reverse()
+ {
+ try
+ {
+ $this->tool->add('acp', 0, 'ACP_NEW_CAT');
+ }
+ catch (Exception $e)
+ {
+ $this->fail($e);
+ }
+
+ try
+ {
+ $this->tool->reverse('add', 'acp', 0, 'ACP_NEW_CAT');
+ }
+ catch (Exception $e)
+ {
+ $this->fail($e);
+ }
+ $this->assertFalse($this->tool->exists('acp', 0, 'ACP_NEW_CAT'));
+ }
+}
diff --git a/tests/dbal/migrator_tool_permission_test.php b/tests/dbal/migrator_tool_permission_test.php
new file mode 100644
index 0000000000..1090b4726a
--- /dev/null
+++ b/tests/dbal/migrator_tool_permission_test.php
@@ -0,0 +1,157 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2011 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php';
+
+class phpbb_dbal_migrator_tool_permission_test extends phpbb_database_test_case
+{
+ public function getDataSet()
+ {
+ return $this->createXMLDataSet(dirname(__FILE__).'/fixtures/migrator_permission.xml');
+ }
+
+ public function setup()
+ {
+ // Global $db and $cache are needed in acp/auth.php constructor
+ global $phpbb_root_path, $phpEx, $db, $cache;
+
+ parent::setup();
+
+ $db = $this->db = $this->new_dbal();
+ $cache = $this->cache = new \phpbb\cache\service(new \phpbb\cache\driver\null(), new \phpbb\config\config(array()), $this->db, $phpbb_root_path, $phpEx);
+ $this->auth = new \phpbb\auth\auth();
+
+ $this->tool = new \phpbb\db\migration\tool\permission($this->db, $this->cache, $this->auth, $phpbb_root_path, $phpEx);
+ }
+
+ public function exists_data()
+ {
+ return array(
+ array(
+ 'global',
+ true,
+ true,
+ ),
+ array(
+ 'local',
+ false,
+ true,
+ ),
+ array(
+ 'both',
+ true,
+ true,
+ ),
+ array(
+ 'both',
+ false,
+ true,
+ ),
+ array(
+ 'does_not_exist',
+ true,
+ false,
+ ),
+ );
+ }
+
+ /**
+ * @dataProvider exists_data
+ */
+ public function test_exists($auth_option, $global, $expected)
+ {
+ $this->assertEquals($expected, $this->tool->exists($auth_option, $global));
+ }
+
+ public function test_add()
+ {
+ try
+ {
+ $this->tool->add('new', true);
+ }
+ catch (Exception $e)
+ {
+ $this->fail($e);
+ }
+ $this->assertEquals(true, $this->tool->exists('new', true));
+ $this->assertEquals(false, $this->tool->exists('new', false));
+
+ try
+ {
+ $this->tool->add('new', false);
+ }
+ catch (Exception $e)
+ {
+ $this->fail($e);
+ }
+ $this->assertEquals(true, $this->tool->exists('new', false));
+
+ // Should fail (duplicate)
+ try
+ {
+ $this->tool->add('new', true);
+ $this->fail('Did not throw exception on duplicate');
+ }
+ catch (Exception $e) {}
+ }
+
+ public function test_remove()
+ {
+ try
+ {
+ $this->tool->remove('global', true);
+ }
+ catch (Exception $e)
+ {
+ $this->fail($e);
+ }
+ $this->assertEquals(false, $this->tool->exists('global', true));
+
+ try
+ {
+ $this->tool->remove('both', false);
+ }
+ catch (Exception $e)
+ {
+ $this->fail($e);
+ }
+ $this->assertEquals(false, $this->tool->exists('both', false));
+
+ // Should fail (does not exist)
+ try
+ {
+ $this->tool->remove('new', true);
+ $this->fail('Did not throw exception on duplicate');
+ }
+ catch (Exception $e) {}
+ }
+
+ public function test_reverse()
+ {
+ try
+ {
+ $this->tool->reverse('remove', 'global_test', true);
+ }
+ catch (Exception $e)
+ {
+ $this->fail($e);
+ }
+ $this->assertTrue($this->tool->exists('global_test', true));
+
+ try
+ {
+ $this->tool->reverse('add', 'global_test', true);
+ }
+ catch (Exception $e)
+ {
+ $this->fail($e);
+ }
+ $this->assertFalse($this->tool->exists('global_test', true));
+ }
+}
diff --git a/tests/dbal/order_lower_test.php b/tests/dbal/order_lower_test.php
index e17295a4ea..d826765681 100644
--- a/tests/dbal/order_lower_test.php
+++ b/tests/dbal/order_lower_test.php
@@ -38,27 +38,30 @@ class phpbb_dbal_order_lower_test extends phpbb_database_test_case
'style_name' => 'prosilver',
'style_copyright' => '&copy; phpBB Group',
'style_active' => 1,
- 'template_id' => 1,
- 'theme_id' => 1,
- 'imageset_id' => 1
+ 'style_path' => 'prosilver',
+ 'bbcode_bitfield' => 'kNg=',
+ 'style_parent_id' => 0,
+ 'style_parent_tree' => '',
),
array(
'style_id' => 3,
'style_name' => 'Prosilver1',
'style_copyright' => '&copy; phpBB Group',
'style_active' => 0,
- 'template_id' => 3,
- 'theme_id' => 3,
- 'imageset_id' => 3
+ 'style_path' => 'prosilver1',
+ 'bbcode_bitfield' => 'kNg=',
+ 'style_parent_id' => 1,
+ 'style_parent_tree' => 'prosilver',
),
array(
'style_id' => 2,
'style_name' => 'prosilver2',
'style_copyright' => '&copy; phpBB Group',
'style_active' => 0,
- 'template_id' => 2,
- 'theme_id' => 2,
- 'imageset_id' => 2
+ 'style_path' => 'prosilver2',
+ 'bbcode_bitfield' => 'kNg=',
+ 'style_parent_id' => 0,
+ 'style_parent_tree' => '',
)
),
$db->sql_fetchrowset($result)
diff --git a/tests/dbal/schema_test.php b/tests/dbal/schema_test.php
new file mode 100644
index 0000000000..2a332fddba
--- /dev/null
+++ b/tests/dbal/schema_test.php
@@ -0,0 +1,38 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2011 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php';
+
+class phpbb_dbal_schema_test extends phpbb_database_test_case
+{
+ public function getDataSet()
+ {
+ return $this->createXMLDataSet(dirname(__FILE__).'/fixtures/config.xml');
+ }
+
+ public function test_config_value_multibyte()
+ {
+ $db = $this->new_dbal();
+
+ $value = str_repeat("\xC3\x84", 255);
+ $sql = "INSERT INTO phpbb_config
+ (config_name, config_value)
+ VALUES ('name', '$value')";
+ $result = $db->sql_query($sql);
+
+ $sql = "SELECT config_value
+ FROM phpbb_config
+ WHERE config_name = 'name'";
+ $result = $db->sql_query_limit($sql, 1);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ $this->assertEquals($value, $row['config_value']);
+ }
+}
diff --git a/tests/dbal/select_test.php b/tests/dbal/select_test.php
index 6dbab05a41..c8cfad04e0 100644
--- a/tests/dbal/select_test.php
+++ b/tests/dbal/select_test.php
@@ -17,7 +17,7 @@ class phpbb_dbal_select_test extends phpbb_database_test_case
return $this->createXMLDataSet(dirname(__FILE__).'/fixtures/three_users.xml');
}
- static public function return_on_error_select_data()
+ public function return_on_error_select_data()
{
return array(
array('phpbb_users', "username_clean = 'bertie'", array(array('username_clean' => 'bertie'))),
@@ -44,7 +44,7 @@ class phpbb_dbal_select_test extends phpbb_database_test_case
$this->assertEquals($expected, $db->sql_fetchrowset($result));
}
- static public function fetchrow_data()
+ public function fetchrow_data()
{
return array(
array('', array(array('username_clean' => 'barfoo'),
@@ -95,7 +95,7 @@ class phpbb_dbal_select_test extends phpbb_database_test_case
$db->sql_freeresult($result);
}
- static public function fetchfield_data()
+ public function fetchfield_data()
{
return array(
array('', array('barfoo', 'foobar', 'bertie')),
@@ -192,7 +192,7 @@ class phpbb_dbal_select_test extends phpbb_database_test_case
$this->assertEquals($expected, $ary);
}
- static public function like_expression_data()
+ public function like_expression_data()
{
// * = any_char; # = one_char
return array(
@@ -229,7 +229,7 @@ class phpbb_dbal_select_test extends phpbb_database_test_case
$db->sql_freeresult($result);
}
- static public function in_set_data()
+ public function in_set_data()
{
return array(
array('user_id', 3, false, false, array(array('username_clean' => 'bertie'))),
@@ -303,7 +303,7 @@ class phpbb_dbal_select_test extends phpbb_database_test_case
$db->sql_freeresult($result);
}
- static public function build_array_data()
+ public function build_array_data()
{
return array(
array(array('username_clean' => 'barfoo'), array(array('username_clean' => 'barfoo'))),
diff --git a/tests/dbal/sql_insert_buffer_test.php b/tests/dbal/sql_insert_buffer_test.php
new file mode 100644
index 0000000000..a70eea4f7e
--- /dev/null
+++ b/tests/dbal/sql_insert_buffer_test.php
@@ -0,0 +1,116 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+class phpbb_dbal_sql_insert_buffer_test extends phpbb_database_test_case
+{
+ protected $db;
+ protected $buffer;
+
+ public function setUp()
+ {
+ parent::setUp();
+
+ $this->db = $this->new_dbal();
+ $this->buffer = new \phpbb\db\sql_insert_buffer($this->db, 'phpbb_config', 2);
+ $this->assert_config_count(2);
+ }
+
+ public function getDataSet()
+ {
+ return $this->createXMLDataSet(dirname(__FILE__) . '/fixtures/config.xml');
+ }
+
+ public function test_multi_insert_disabled_insert_and_flush()
+ {
+ $this->db->multi_insert = false;
+ $this->assertTrue($this->buffer->insert($this->get_row(1)));
+ $this->assert_config_count(3);
+ $this->assertFalse($this->buffer->flush());
+ $this->assert_config_count(3);
+ }
+
+ public function test_multi_insert_enabled_insert_and_flush()
+ {
+ $this->check_multi_insert_support();
+ $this->assertFalse($this->buffer->insert($this->get_row(1)));
+ $this->assert_config_count(2);
+ $this->assertTrue($this->buffer->flush());
+ $this->assert_config_count(3);
+ }
+
+ public function test_multi_insert_disabled_insert_with_flush()
+ {
+ $this->db->multi_insert = false;
+ $this->assertTrue($this->buffer->insert($this->get_row(1)));
+ $this->assert_config_count(3);
+ $this->assertTrue($this->buffer->insert($this->get_row(2)));
+ $this->assert_config_count(4);
+ }
+
+ public function test_multi_insert_enabled_insert_with_flush()
+ {
+ $this->check_multi_insert_support();
+ $this->assertFalse($this->buffer->insert($this->get_row(1)));
+ $this->assert_config_count(2);
+ $this->assertTrue($this->buffer->insert($this->get_row(2)));
+ $this->assert_config_count(4);
+ }
+
+ public function test_multi_insert_disabled_insert_all_and_flush()
+ {
+ $this->db->multi_insert = false;
+ $this->assertTrue($this->buffer->insert_all($this->get_rows(3)));
+ $this->assert_config_count(5);
+ }
+
+ public function test_multi_insert_enabled_insert_all_and_flush()
+ {
+ $this->check_multi_insert_support();
+ $this->assertTrue($this->buffer->insert_all($this->get_rows(3)));
+ $this->assert_config_count(4);
+ $this->assertTrue($this->buffer->flush());
+ $this->assert_config_count(5);
+ }
+
+ protected function assert_config_count($num_configs)
+ {
+ $sql = 'SELECT COUNT(*) AS num_configs
+ FROM phpbb_config';
+ $result = $this->db->sql_query($sql);
+ $this->assertEquals($num_configs, $this->db->sql_fetchfield('num_configs'));
+ $this->db->sql_freeresult($result);
+ }
+
+ protected function check_multi_insert_support()
+ {
+ if (!$this->db->multi_insert)
+ {
+ $this->markTestSkipped('Database does not support multi_insert');
+ }
+ }
+
+ protected function get_row($rownum)
+ {
+ return array(
+ 'config_name' => "name$rownum",
+ 'config_value' => "value$rownum",
+ 'is_dynamic' => '0',
+ );
+ }
+
+ protected function get_rows($n)
+ {
+ $result = array();
+ for ($i = 0; $i < $n; ++$i)
+ {
+ $result[] = $this->get_row($i);
+ }
+ return $result;
+ }
+}
diff --git a/tests/dbal/write_sequence_test.php b/tests/dbal/write_sequence_test.php
index 8975cfbfb1..5fe0fe8de9 100644
--- a/tests/dbal/write_sequence_test.php
+++ b/tests/dbal/write_sequence_test.php
@@ -33,13 +33,15 @@ class phpbb_dbal_write_sequence_test extends phpbb_database_test_case
{
$db = $this->new_dbal();
+ // dbal uses cache
+ global $cache;
+ $cache = new phpbb_mock_cache();
+
$sql = 'INSERT INTO phpbb_users ' . $db->sql_build_array('INSERT', array(
'username' => $username,
'username_clean' => $username,
'user_permissions' => '',
'user_sig' => '',
- 'user_occ' => '',
- 'user_interests' => '',
));
$db->sql_query($sql);
diff --git a/tests/dbal/write_test.php b/tests/dbal/write_test.php
index ecfd774896..c069d9a796 100644
--- a/tests/dbal/write_test.php
+++ b/tests/dbal/write_test.php
@@ -16,7 +16,7 @@ class phpbb_dbal_write_test extends phpbb_database_test_case
return $this->createXMLDataSet(dirname(__FILE__).'/fixtures/config.xml');
}
- static public function build_array_insert_data()
+ public function build_array_insert_data()
{
return array(
array(array(
@@ -64,7 +64,7 @@ class phpbb_dbal_write_test extends phpbb_database_test_case
FROM phpbb_config';
$result = $db->sql_query($sql);
$rows = $db->sql_fetchrowset($result);
-
+
$this->assertEquals(1, sizeof($rows));
$this->assertEquals('config2', $rows[0]['config_name']);
@@ -104,7 +104,7 @@ class phpbb_dbal_write_test extends phpbb_database_test_case
$db->sql_freeresult($result);
}
- static public function update_data()
+ public function update_data()
{
return array(
array(
diff --git a/tests/di/create_container_test.php b/tests/di/create_container_test.php
new file mode 100644
index 0000000000..a3a1ad3597
--- /dev/null
+++ b/tests/di/create_container_test.php
@@ -0,0 +1,78 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace
+{
+ require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php';
+ require_once dirname(__FILE__) . '/../../phpBB/includes/functions_container.php';
+
+ class phpbb_di_container_test extends phpbb_test_case
+ {
+ public function test_phpbb_create_container()
+ {
+ $phpbb_root_path = __DIR__ . '/../../phpBB/';
+ $extensions = array(
+ new \phpbb\di\extension\config(__DIR__ . '/fixtures/config.php'),
+ new \phpbb\di\extension\core($phpbb_root_path . 'config'),
+ );
+ $container = phpbb_create_container($extensions, $phpbb_root_path, 'php');
+
+ $this->assertInstanceOf('Symfony\Component\DependencyInjection\ContainerBuilder', $container);
+ }
+
+ public function test_phpbb_create_install_container()
+ {
+ $phpbb_root_path = __DIR__ . '/../../phpBB/';
+ $extensions = array(
+ new \phpbb\di\extension\config(__DIR__ . '/fixtures/config.php'),
+ new \phpbb\di\extension\core($phpbb_root_path . 'config'),
+ );
+ $container = phpbb_create_install_container($phpbb_root_path, 'php');
+
+ $this->assertInstanceOf('Symfony\Component\DependencyInjection\ContainerBuilder', $container);
+ $this->assertTrue($container->isFrozen());
+ }
+
+ public function test_phpbb_create_compiled_container()
+ {
+ $phpbb_root_path = __DIR__ . '/../../phpBB/';
+ $config_file = __DIR__ . '/fixtures/config.php';
+ $extensions = array(
+ new \phpbb\di\extension\config(__DIR__ . '/fixtures/config.php'),
+ new \phpbb\di\extension\core($phpbb_root_path . 'config'),
+ );
+ $container = phpbb_create_compiled_container($config_file, $extensions, array(), $phpbb_root_path, 'php');
+
+ $this->assertInstanceOf('Symfony\Component\DependencyInjection\ContainerBuilder', $container);
+ $this->assertTrue($container->isFrozen());
+ }
+ }
+}
+
+namespace phpbb\db\driver
+{
+ class container_mock extends \phpbb\db\driver\driver
+ {
+ public function sql_connect()
+ {
+ }
+
+ public function sql_query()
+ {
+ }
+
+ public function sql_fetchrow()
+ {
+ }
+
+ public function sql_freeresult()
+ {
+ }
+ }
+}
diff --git a/tests/di/fixtures/config.php b/tests/di/fixtures/config.php
new file mode 100644
index 0000000000..04e20f63d8
--- /dev/null
+++ b/tests/di/fixtures/config.php
@@ -0,0 +1,11 @@
+<?php
+// phpBB 3.1.x auto-generated configuration file
+// Do not change anything in this file!
+$dbms = 'container_mock';
+$dbhost = '127.0.0.1';
+$dbport = '';
+$dbname = 'phpbb';
+$dbuser = 'root';
+$dbpasswd = '';
+$table_prefix = 'phpbb_';
+$acm_type = '\phpbb\cache\driver\null';
diff --git a/tests/download/http_byte_range_test.php b/tests/download/http_byte_range_test.php
new file mode 100644
index 0000000000..23b9169fe3
--- /dev/null
+++ b/tests/download/http_byte_range_test.php
@@ -0,0 +1,64 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2010 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+require_once dirname(__FILE__) . '/../../phpBB/includes/functions_download.php';
+
+class phpbb_download_http_byte_range_test extends phpbb_test_case
+{
+ public function test_find_range_request()
+ {
+ // Missing 'bytes=' prefix
+ $GLOBALS['request'] = new phpbb_mock_request();
+ $GLOBALS['request']->set_header('Range', 'bztes=');
+ $this->assertEquals(false, phpbb_find_range_request());
+ unset($GLOBALS['request']);
+
+ $GLOBALS['request'] = new phpbb_mock_request();
+ $_ENV['HTTP_RANGE'] = 'bztes=';
+ $this->assertEquals(false, phpbb_find_range_request());
+ unset($_ENV['HTTP_RANGE']);
+
+ $GLOBALS['request'] = new phpbb_mock_request();
+ $GLOBALS['request']->set_header('Range', 'bytes=0-0,123-125');
+ $this->assertEquals(array('0-0', '123-125'), phpbb_find_range_request());
+ unset($GLOBALS['request']);
+ }
+
+ /**
+ * @dataProvider parse_range_request_data()
+ */
+ public function test_parse_range_request($request_array, $filesize, $expected)
+ {
+ $this->assertEquals($expected, phpbb_parse_range_request($request_array, $filesize));
+ }
+
+ public function parse_range_request_data()
+ {
+ return array(
+ // Does not read until the end of file.
+ array(
+ array('3-4'),
+ 10,
+ false,
+ ),
+
+ // Valid request, handle second range.
+ array(
+ array('0-0', '120-125'),
+ 125,
+ array(
+ 'byte_pos_start' => 120,
+ 'byte_pos_end' => 124,
+ 'bytes_requested' => 5,
+ 'bytes_total' => 125,
+ )
+ ),
+ );
+ }
+}
diff --git a/tests/download/http_user_agent_test.php b/tests/download/http_user_agent_test.php
new file mode 100644
index 0000000000..166a186913
--- /dev/null
+++ b/tests/download/http_user_agent_test.php
@@ -0,0 +1,130 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+require_once dirname(__FILE__) . '/../../phpBB/includes/functions_download.php';
+
+class phpbb_download_http_user_agent_test extends phpbb_test_case
+{
+ public function user_agents_check_greater_ie_version()
+ {
+ return array(
+ // user agent
+ // IE version
+ // expected
+ array(
+ 'Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)',
+ 7,
+ true,
+ ),
+ array(
+ 'Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; WOW64; Trident/6.0)',
+ 7,
+ true,
+ ),
+ array(
+ 'Mozilla/5.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; GTB7.4; InfoPath.2; SV1; .NET CLR 3.3.69573; WOW64; en-US)',
+ 7,
+ true,
+ ),
+ array(
+ 'Mozilla/5.0 (Windows; U; MSIE 7.0; Windows NT 6.0; en-US)',
+ 7,
+ false,
+ ),
+ array(
+ 'Mozilla/4.0 (compatible; MSIE 6.1; Windows XP; .NET CLR 1.1.4322; .NET CLR 2.0.50727)',
+ 7,
+ false,
+ ),
+ array(
+ 'Mozilla/4.0 (compatible; MSIE 6.01; Windows NT 6.0)',
+ 7,
+ false,
+ ),
+ array(
+ 'Mozilla/5.0 (Windows; U; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727)',
+ 7,
+ false,
+ ),
+ array(
+ 'Mozilla/5.0 (Windows NT 6.2; Win64; x64;) Gecko/20100101 Firefox/20.0',
+ 7,
+ false,
+ ),
+ array(
+ 'Mozilla/5.0 (Windows NT 6.2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1464.0 Safari/537.36',
+ 7,
+ false,
+ ),
+ array(
+ 'Googlebot-Image/1.0',
+ 7,
+ false,
+ ),
+ array(
+ 'Googlebot/2.1 ( http://www.google.com/bot.html)',
+ 7,
+ false,
+ ),
+ array(
+ 'Lynx/2.8.3dev.9 libwww-FM/2.14 SSL-MM/1.4.1 OpenSSL/0.9.6',
+ 7,
+ false,
+ ),
+ array(
+ 'Links (0.9x; Linux 2.4.7-10 i686)',
+ 7,
+ false,
+ ),
+ array(
+ 'Opera/9.60 (Windows NT 5.1; U; de) Presto/2.1.1',
+ 7,
+ false,
+ ),
+ array(
+ 'Mozilla/4.0 (compatible; MSIE 5.0; Windows NT;)',
+ 7,
+ false,
+ ),
+ array(
+ 'Mozilla/4.0 (compatible; MSIE 5.0; Windows NT 4.0) Opera 6.01 [en]',
+ 7,
+ false,
+ ),
+ array(
+ 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; en) Opera 9.24',
+ 7,
+ false,
+ ),
+ array(
+ 'Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)',
+ 8,
+ true,
+ ),
+ array(
+ 'Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; WOW64; Trident/6.0)',
+ 9,
+ true,
+ ),
+ array(
+ 'Mozilla/5.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; GTB7.4; InfoPath.2; SV1; .NET CLR 3.3.69573; WOW64; en-US)',
+ 10,
+ false,
+ ),
+ );
+ }
+
+ /**
+ * @dataProvider user_agents_check_greater_ie_version
+ */
+ public function test_is_greater_ie_version($user_agent, $version, $expected)
+ {
+ $this->assertEquals($expected, phpbb_is_greater_ie_version($user_agent, $version));
+ }
+}
diff --git a/tests/error_collector_test.php b/tests/error_collector_test.php
index d67dea3719..0804c64f6f 100644
--- a/tests/error_collector_test.php
+++ b/tests/error_collector_test.php
@@ -8,13 +8,12 @@
*/
require_once dirname(__FILE__) . '/../phpBB/includes/functions.php';
-require_once dirname(__FILE__) . '/../phpBB/includes/error_collector.php';
class phpbb_error_collector_test extends phpbb_test_case
{
public function test_collection()
{
- $collector = new phpbb_error_collector;
+ $collector = new \phpbb\error_collector;
$collector->install();
// Cause a warning
diff --git a/tests/event/dispatcher_test.php b/tests/event/dispatcher_test.php
new file mode 100644
index 0000000000..a76df90809
--- /dev/null
+++ b/tests/event/dispatcher_test.php
@@ -0,0 +1,29 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+class phpbb_event_dispatcher_test extends phpbb_test_case
+{
+ public function test_trigger_event()
+ {
+ $dispatcher = new \phpbb\event\dispatcher(new phpbb_mock_container_builder());
+
+ $dispatcher->addListener('core.test_event', function (\phpbb\event\data $event) {
+ $event['foo'] = $event['foo'] . '2';
+ $event['bar'] = $event['bar'] . '2';
+ });
+
+ $foo = 'foo';
+ $bar = 'bar';
+
+ $vars = array('foo', 'bar');
+ $result = $dispatcher->trigger_event('core.test_event', compact($vars));
+
+ $this->assertSame(array('foo' => 'foo2', 'bar' => 'bar2'), $result);
+ }
+}
diff --git a/tests/extension/ext/barfoo/composer.json b/tests/extension/ext/barfoo/composer.json
new file mode 100644
index 0000000000..d88fd413c9
--- /dev/null
+++ b/tests/extension/ext/barfoo/composer.json
@@ -0,0 +1,22 @@
+{
+ "name": "vendor/barfoo",
+ "type": "phpbb-extension",
+ "description": "An example/sample extension to be used for testing purposes in phpBB Development.",
+ "version": "1.0.0",
+ "time": "2012-02-15 01:01:01",
+ "license": "GNU GPL v2",
+ "authors": [{
+ "name": "John Smith",
+ "username": "JohnSmith27",
+ "email": "email@phpbb.com",
+ "homepage": "http://phpbb.com",
+ "role": "N/A"
+ }],
+ "require": {
+ "php": ">=5.3",
+ "phpbb/phpbb": "3.1.*@dev"
+ },
+ "extra": {
+ "display-name": "phpBB BarFoo Extension"
+ }
+}
diff --git a/tests/extension/ext/barfoo/ext.php b/tests/extension/ext/barfoo/ext.php
new file mode 100644
index 0000000000..0de403424c
--- /dev/null
+++ b/tests/extension/ext/barfoo/ext.php
@@ -0,0 +1,7 @@
+<?php
+
+namespace vendor\barfoo;
+
+class ext extends \phpbb\extension\base
+{
+}
diff --git a/tests/extension/ext/vendor/moo/composer.json b/tests/extension/ext/vendor/moo/composer.json
new file mode 100644
index 0000000000..b8fc544c01
--- /dev/null
+++ b/tests/extension/ext/vendor/moo/composer.json
@@ -0,0 +1,22 @@
+{
+ "name": "vendor/moo",
+ "type": "phpbb-extension",
+ "description": "An example/sample extension to be used for testing purposes in phpBB Development.",
+ "version": "1.0.0",
+ "time": "2012-02-15 01:01:01",
+ "license": "GNU GPL v2",
+ "authors": [{
+ "name": "John Smith",
+ "username": "JohnSmith27",
+ "email": "email@phpbb.com",
+ "homepage": "http://phpbb.com",
+ "role": "N/A"
+ }],
+ "require": {
+ "php": ">=5.3",
+ "phpbb/phpbb": "3.1.*@dev"
+ },
+ "extra": {
+ "display-name": "phpBB Moo Extension"
+ }
+}
diff --git a/tests/extension/ext/vendor/moo/ext.php b/tests/extension/ext/vendor/moo/ext.php
new file mode 100644
index 0000000000..41ef570452
--- /dev/null
+++ b/tests/extension/ext/vendor/moo/ext.php
@@ -0,0 +1,15 @@
+<?php
+
+namespace vendor\moo;
+
+class ext extends \phpbb\extension\base
+{
+ static public $purged;
+
+ public function purge_step($old_state)
+ {
+ self::$purged = true;
+
+ return false;
+ }
+}
diff --git a/tests/extension/ext/vendor/moo/feature_class.php b/tests/extension/ext/vendor/moo/feature_class.php
new file mode 100644
index 0000000000..cb8bb3da56
--- /dev/null
+++ b/tests/extension/ext/vendor/moo/feature_class.php
@@ -0,0 +1,7 @@
+<?php
+
+namespace vendor\moo;
+
+class feature_class
+{
+}
diff --git a/tests/extension/ext/vendor2/bar/acp/a_info.php b/tests/extension/ext/vendor2/bar/acp/a_info.php
new file mode 100644
index 0000000000..8132df587f
--- /dev/null
+++ b/tests/extension/ext/vendor2/bar/acp/a_info.php
@@ -0,0 +1,18 @@
+<?php
+
+namespace vendor2\bar\acp;
+
+class a_info
+{
+ public function module()
+ {
+ return array(
+ 'filename' => 'vendor2\\bar\\acp\\a_module',
+ 'title' => 'Bar',
+ 'version' => '3.1.0-dev',
+ 'modes' => array(
+ 'config' => array('title' => 'Config', 'auth' => '', 'cat' => array('ACP_MODS')),
+ ),
+ );
+ }
+}
diff --git a/tests/extension/ext/vendor2/bar/acp/a_module.php b/tests/extension/ext/vendor2/bar/acp/a_module.php
new file mode 100644
index 0000000000..3a3d105790
--- /dev/null
+++ b/tests/extension/ext/vendor2/bar/acp/a_module.php
@@ -0,0 +1,7 @@
+<?php
+
+namespace vendor2\bar\acp;
+
+class a_module
+{
+}
diff --git a/tests/extension/ext/vendor2/bar/composer.json b/tests/extension/ext/vendor2/bar/composer.json
new file mode 100644
index 0000000000..215e7d59db
--- /dev/null
+++ b/tests/extension/ext/vendor2/bar/composer.json
@@ -0,0 +1,21 @@
+{
+ "name": "vendor2/bar",
+ "type": "phpbb-extension",
+ "description": "An example/sample extension to be used for testing purposes in phpBB Development.",
+ "version": "1.0.0",
+ "time": "2012-02-15 01:01:01",
+ "license": "GPL-2.0",
+ "authors": [{
+ "name": "John Smith",
+ "email": "email@phpbb.com",
+ "homepage": "http://phpbb.com",
+ "role": "N/A"
+ }],
+ "require": {
+ "php": ">=5.3",
+ "phpbb/phpbb": "3.1.*@dev"
+ },
+ "extra": {
+ "display-name": "phpBB Bar Extension"
+ }
+}
diff --git a/tests/extension/ext/vendor2/bar/ext.php b/tests/extension/ext/vendor2/bar/ext.php
new file mode 100644
index 0000000000..f94ab9ad81
--- /dev/null
+++ b/tests/extension/ext/vendor2/bar/ext.php
@@ -0,0 +1,26 @@
+<?php
+
+namespace vendor2\bar;
+
+class ext extends \phpbb\extension\base
+{
+ static public $state;
+
+ public function enable_step($old_state)
+ {
+ // run 4 steps, then quit
+ if ($old_state === 4)
+ {
+ return false;
+ }
+
+ if ($old_state === false)
+ {
+ $old_state = 0;
+ }
+
+ self::$state = ++$old_state;
+
+ return self::$state;
+ }
+}
diff --git a/tests/extension/ext/vendor2/foo/a_class.php b/tests/extension/ext/vendor2/foo/a_class.php
new file mode 100644
index 0000000000..06278c0e0c
--- /dev/null
+++ b/tests/extension/ext/vendor2/foo/a_class.php
@@ -0,0 +1,7 @@
+<?php
+
+namespace vendor2\foo;
+
+class a_class
+{
+}
diff --git a/tests/extension/ext/vendor2/foo/acp/a_info.php b/tests/extension/ext/vendor2/foo/acp/a_info.php
new file mode 100644
index 0000000000..e1eaa340b7
--- /dev/null
+++ b/tests/extension/ext/vendor2/foo/acp/a_info.php
@@ -0,0 +1,18 @@
+<?php
+
+namespace vendor2\foo\acp;
+
+class a_info
+{
+ public function module()
+ {
+ return array(
+ 'filename' => 'vendor2\\foo\\acp\\a_module',
+ 'title' => 'Foobar',
+ 'version' => '3.1.0-dev',
+ 'modes' => array(
+ 'config' => array('title' => 'Config', 'auth' => 'ext_vendor2/foo', 'cat' => array('ACP_MODS')),
+ ),
+ );
+ }
+}
diff --git a/tests/extension/ext/vendor2/foo/acp/a_module.php b/tests/extension/ext/vendor2/foo/acp/a_module.php
new file mode 100644
index 0000000000..78d91af2fe
--- /dev/null
+++ b/tests/extension/ext/vendor2/foo/acp/a_module.php
@@ -0,0 +1,7 @@
+<?php
+
+namespace vendor2\foo\acp;
+
+class a_module
+{
+}
diff --git a/tests/extension/ext/vendor2/foo/acp/fail_info.php b/tests/extension/ext/vendor2/foo/acp/fail_info.php
new file mode 100644
index 0000000000..d9b4353957
--- /dev/null
+++ b/tests/extension/ext/vendor2/foo/acp/fail_info.php
@@ -0,0 +1,22 @@
+<?php
+
+namespace vendor2\foo\acp;
+
+/*
+* Due to the mismatch between the class name and the file name, this module
+* file shouldn't be found by the extension finder
+*/
+class foo_info
+{
+ public function module()
+ {
+ return array(
+ 'filename' => 'vendor2\foo\acp\fail_module',
+ 'title' => 'Foobar',
+ 'version' => '3.1.0-dev',
+ 'modes' => array(
+ 'config' => array('title' => 'Config', 'auth' => '', 'cat' => array('ACP_MODS')),
+ ),
+ );
+ }
+}
diff --git a/tests/extension/ext/vendor2/foo/acp/fail_module.php b/tests/extension/ext/vendor2/foo/acp/fail_module.php
new file mode 100644
index 0000000000..c8a5eae745
--- /dev/null
+++ b/tests/extension/ext/vendor2/foo/acp/fail_module.php
@@ -0,0 +1,11 @@
+<?php
+
+namespace vendor2\foo\acp;
+
+/*
+* Due to the mismatch between the class name and the file name of the module
+* info file, this module's info file shouldn't be found
+*/
+class fail_module
+{
+}
diff --git a/tests/extension/ext/vendor2/foo/b_class.php b/tests/extension/ext/vendor2/foo/b_class.php
new file mode 100644
index 0000000000..3d0f193908
--- /dev/null
+++ b/tests/extension/ext/vendor2/foo/b_class.php
@@ -0,0 +1,7 @@
+<?php
+
+namespace vendor2\foo;
+
+class b_class
+{
+}
diff --git a/tests/extension/ext/vendor2/foo/composer.json b/tests/extension/ext/vendor2/foo/composer.json
new file mode 100644
index 0000000000..7b2a80f5d3
--- /dev/null
+++ b/tests/extension/ext/vendor2/foo/composer.json
@@ -0,0 +1,21 @@
+{
+ "name": "vendor2/foo",
+ "type": "phpbb-extension",
+ "description": "An example/sample extension to be used for testing purposes in phpBB Development.",
+ "version": "1.0.0",
+ "time": "2012-02-15 01:01:01",
+ "license": "GPL-2.0",
+ "authors": [{
+ "name": "John Smith",
+ "email": "email@phpbb.com",
+ "homepage": "http://phpbb.com",
+ "role": "N/A"
+ }],
+ "require": {
+ "php": ">=5.3",
+ "phpbb/phpbb": "3.1.*@dev"
+ },
+ "extra": {
+ "display-name": "phpBB Foo Extension"
+ }
+}
diff --git a/tests/extension/ext/vendor2/foo/ext.php b/tests/extension/ext/vendor2/foo/ext.php
new file mode 100644
index 0000000000..15480fe92a
--- /dev/null
+++ b/tests/extension/ext/vendor2/foo/ext.php
@@ -0,0 +1,15 @@
+<?php
+
+namespace vendor2\foo;
+
+class ext extends \phpbb\extension\base
+{
+ static public $disabled;
+
+ public function disable_step($old_state)
+ {
+ self::$disabled = true;
+
+ return false;
+ }
+}
diff --git a/tests/extension/ext/vendor2/foo/mcp/a_info.php b/tests/extension/ext/vendor2/foo/mcp/a_info.php
new file mode 100644
index 0000000000..b5599fde65
--- /dev/null
+++ b/tests/extension/ext/vendor2/foo/mcp/a_info.php
@@ -0,0 +1,18 @@
+<?php
+
+namespace vendor2\foo\mcp;
+
+class a_info
+{
+ public function module()
+ {
+ return array(
+ 'filename' => 'vendor2\\foo\\mcp\\a_module',
+ 'title' => 'Foobar',
+ 'version' => '3.1.0-dev',
+ 'modes' => array(
+ 'config' => array('title' => 'Config', 'auth' => '', 'cat' => array('MCP_MAIN')),
+ ),
+ );
+ }
+}
diff --git a/tests/extension/ext/vendor2/foo/mcp/a_module.php b/tests/extension/ext/vendor2/foo/mcp/a_module.php
new file mode 100644
index 0000000000..fe29783827
--- /dev/null
+++ b/tests/extension/ext/vendor2/foo/mcp/a_module.php
@@ -0,0 +1,7 @@
+<?php
+
+namespace vendor2\foo\mcp;
+
+class a_module
+{
+}
diff --git a/tests/extension/ext/vendor2/foo/sub/type/alternative.php b/tests/extension/ext/vendor2/foo/sub/type/alternative.php
new file mode 100644
index 0000000000..1eaf794609
--- /dev/null
+++ b/tests/extension/ext/vendor2/foo/sub/type/alternative.php
@@ -0,0 +1,7 @@
+<?php
+
+namespace foo\sub\type;
+
+class alternative
+{
+}
diff --git a/tests/extension/ext/vendor2/foo/type/alternative.php b/tests/extension/ext/vendor2/foo/type/alternative.php
new file mode 100644
index 0000000000..8f753491ef
--- /dev/null
+++ b/tests/extension/ext/vendor2/foo/type/alternative.php
@@ -0,0 +1,7 @@
+<?php
+
+namespace foo\type;
+
+class alternative
+{
+}
diff --git a/phpBB/styles/prosilver/imageset/index.htm b/tests/extension/ext/vendor2/foo/type/dummy/empty.txt
index e69de29bb2..e69de29bb2 100644
--- a/phpBB/styles/prosilver/imageset/index.htm
+++ b/tests/extension/ext/vendor2/foo/type/dummy/empty.txt
diff --git a/tests/extension/ext/vendor2/foo/typewrong/error.php b/tests/extension/ext/vendor2/foo/typewrong/error.php
new file mode 100644
index 0000000000..5020926043
--- /dev/null
+++ b/tests/extension/ext/vendor2/foo/typewrong/error.php
@@ -0,0 +1,7 @@
+<?php
+
+namespace foo\typewrong;
+
+class error
+{
+}
diff --git a/tests/extension/ext/vendor3/bar/ext.php b/tests/extension/ext/vendor3/bar/ext.php
new file mode 100644
index 0000000000..37a5e92059
--- /dev/null
+++ b/tests/extension/ext/vendor3/bar/ext.php
@@ -0,0 +1,26 @@
+<?php
+
+namespace vendor3\bar;
+
+class ext extends \phpbb\extension\base
+{
+ static public $state;
+
+ public function enable_step($old_state)
+ {
+ // run 4 steps, then quit
+ if ($old_state === 4)
+ {
+ return false;
+ }
+
+ if ($old_state === false)
+ {
+ $old_state = 0;
+ }
+
+ self::$state = ++$old_state;
+
+ return self::$state;
+ }
+}
diff --git a/tests/extension/ext/vendor3/bar/my/hidden_class.php b/tests/extension/ext/vendor3/bar/my/hidden_class.php
new file mode 100644
index 0000000000..38eb59aadf
--- /dev/null
+++ b/tests/extension/ext/vendor3/bar/my/hidden_class.php
@@ -0,0 +1,7 @@
+<?php
+
+namespace vendor3\bar\my;
+
+class hidden_class
+{
+}
diff --git a/tests/extension/ext/vendor3/bar/styles/prosilver/template/foobar_body.html b/tests/extension/ext/vendor3/bar/styles/prosilver/template/foobar_body.html
new file mode 100644
index 0000000000..00c2a84a18
--- /dev/null
+++ b/tests/extension/ext/vendor3/bar/styles/prosilver/template/foobar_body.html
@@ -0,0 +1 @@
+bertie rules!
diff --git a/tests/extension/finder_test.php b/tests/extension/finder_test.php
new file mode 100644
index 0000000000..d0ca5956b4
--- /dev/null
+++ b/tests/extension/finder_test.php
@@ -0,0 +1,245 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2011 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php';
+
+class phpbb_extension_finder_test extends phpbb_test_case
+{
+ protected $extension_manager;
+ protected $finder;
+
+ public function setUp()
+ {
+ $this->extension_manager = new phpbb_mock_extension_manager(
+ dirname(__FILE__) . '/',
+ array(
+ 'vendor2/foo' => array(
+ 'ext_name' => 'vendor2/foo',
+ 'ext_active' => '1',
+ 'ext_path' => 'ext/vendor2/foo/',
+ ),
+ 'vendor3/bar' => array(
+ 'ext_name' => 'vendor3/bar',
+ 'ext_active' => '1',
+ 'ext_path' => 'ext/vendor3/bar/',
+ ),
+ ));
+
+ $this->finder = $this->extension_manager->get_finder();
+ }
+
+ public function test_suffix_get_classes()
+ {
+ $classes = $this->finder
+ ->core_path('phpbb/default/')
+ ->extension_suffix('_class')
+ ->get_classes();
+
+ sort($classes);
+ $this->assertEquals(
+ array(
+ '\phpbb\default\implementation',
+ '\vendor2\foo\a_class',
+ '\vendor2\foo\b_class',
+ '\vendor3\bar\my\hidden_class',
+ ),
+ $classes
+ );
+ }
+
+ public function test_get_directories()
+ {
+ $dirs = $this->finder
+ ->directory('/type')
+ ->get_directories();
+
+ sort($dirs);
+ $this->assertEquals(array(
+ dirname(__FILE__) . '/ext/vendor2/foo/type/',
+ ), $dirs);
+ }
+
+ public function test_prefix_get_directories()
+ {
+ $dirs = $this->finder
+ ->prefix('ty')
+ ->get_directories();
+
+ sort($dirs);
+ $this->assertEquals(array(
+ dirname(__FILE__) . '/ext/vendor2/foo/sub/type/',
+ dirname(__FILE__) . '/ext/vendor2/foo/type/',
+ dirname(__FILE__) . '/ext/vendor2/foo/typewrong/',
+ ), $dirs);
+ }
+
+ public function test_prefix_get_classes()
+ {
+ $classes = $this->finder
+ ->core_path('phpbb/default/')
+ ->extension_prefix('hidden_')
+ ->get_classes();
+
+ sort($classes);
+ $this->assertEquals(
+ array(
+ '\phpbb\default\implementation',
+ '\vendor3\bar\my\hidden_class',
+ ),
+ $classes
+ );
+ }
+
+ public function test_directory_get_classes()
+ {
+ $classes = $this->finder
+ ->core_path('phpbb/default/')
+ ->extension_directory('type')
+ ->get_classes();
+
+ sort($classes);
+ $this->assertEquals(
+ array(
+ '\phpbb\default\implementation',
+ '\vendor2\foo\sub\type\alternative',
+ '\vendor2\foo\type\alternative',
+ ),
+ $classes
+ );
+ }
+
+ public function test_absolute_directory_get_classes()
+ {
+ $classes = $this->finder
+ ->directory('/type/')
+ ->get_classes();
+
+ sort($classes);
+ $this->assertEquals(
+ array(
+ '\vendor2\foo\type\alternative',
+ ),
+ $classes
+ );
+ }
+
+ public function test_sub_directory_get_classes()
+ {
+ $classes = $this->finder
+ ->directory('/sub/type')
+ ->get_classes();
+
+ sort($classes);
+ $this->assertEquals(
+ array(
+ '\vendor2\foo\sub\type\alternative',
+ ),
+ $classes
+ );
+ }
+
+ public function test_uncleansub_directory_get_classes()
+ {
+ $classes = $this->finder
+ ->directory('/sub/../sub/type')
+ ->get_classes();
+
+ sort($classes);
+ $this->assertEquals(
+ array(
+ '\vendor2\foo\sub\type\alternative',
+ ),
+ $classes
+ );
+ }
+
+ public function test_find_from_extension()
+ {
+ $files = $this->finder
+ ->extension_directory('/type')
+ ->find_from_extension('vendor2/foo', dirname(__FILE__) . '/ext/vendor2/foo/');
+ $classes = $this->finder->get_classes_from_files($files);
+
+ sort($classes);
+ $this->assertEquals(
+ array(
+ '\vendor2\foo\type\alternative',
+ '\vendor2\foo\type\dummy\empty',
+ ),
+ $classes
+ );
+ }
+
+ /**
+ * These do not work because of changes with PHPBB3-11386
+ * They do not seem neccessary to me, so I am commenting them out for now
+ public function test_get_classes_create_cache()
+ {
+ $cache = new phpbb_mock_cache;
+ $finder = new \phpbb\extension\finder($this->extension_manager, new \phpbb\filesystem(), dirname(__FILE__) . '/', $cache, 'php', '_custom_cache_name');
+ $files = $finder->suffix('_class.php')->get_files();
+
+ $expected_files = array(
+ 'ext/bar/my/hidden_class.php' => 'bar',
+ 'ext/foo/a_class.php' => 'foo',
+ 'ext/foo/b_class.php' => 'foo',
+ );
+
+ $query = array(
+ 'core_path' => false,
+ 'core_suffix' => '_class.php',
+ 'core_prefix' => false,
+ 'core_directory' => false,
+ 'extension_suffix' => '_class.php',
+ 'extension_prefix' => false,
+ 'extension_directory' => false,
+ 'is_dir' => false,
+ );
+
+ $cache->checkAssociativeVar($this, '_custom_cache_name', array(
+ md5(serialize($query)) => $expected_files,
+ ), false);
+ }
+
+ public function test_cached_get_files()
+ {
+ $query = array(
+ 'core_path' => 'phpbb/foo',
+ 'core_suffix' => false,
+ 'core_prefix' => false,
+ 'core_directory' => 'bar',
+ 'extension_suffix' => false,
+ 'extension_prefix' => false,
+ 'extension_directory' => false,
+ 'is_dir' => false,
+ );
+
+ $finder = new \phpbb\extension\finder(
+ $this->extension_manager,
+ new \phpbb\filesystem(),
+ dirname(__FILE__) . '/',
+ new phpbb_mock_cache(array(
+ '_ext_finder' => array(
+ md5(serialize($query)) => array('file_name' => 'extension'),
+ ),
+ ))
+ );
+
+ $classes = $finder
+ ->core_path($query['core_path'])
+ ->core_directory($query['core_directory'])
+ ->get_files();
+
+ sort($classes);
+ $this->assertEquals(
+ array(dirname(__FILE__) . '/file_name'),
+ $classes
+ );
+ }
+ */
+}
diff --git a/tests/extension/fixtures/extensions.xml b/tests/extension/fixtures/extensions.xml
new file mode 100644
index 0000000000..6846162f0f
--- /dev/null
+++ b/tests/extension/fixtures/extensions.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<dataset>
+ <table name="phpbb_ext">
+ <column>ext_name</column>
+ <column>ext_active</column>
+ <column>ext_state</column>
+ <row>
+ <value>vendor2/foo</value>
+ <value>1</value>
+ <value></value>
+ </row>
+ <row>
+ <value>vendor/moo</value>
+ <value>0</value>
+ <value></value>
+ </row>
+ </table>
+</dataset>
diff --git a/tests/extension/includes/acp/acp_foobar.php b/tests/extension/includes/acp/acp_foobar.php
new file mode 100644
index 0000000000..c256a432e2
--- /dev/null
+++ b/tests/extension/includes/acp/acp_foobar.php
@@ -0,0 +1,28 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* @package acp
+*/
+class acp_foobar
+{
+ var $u_action;
+
+ function main($id, $mode)
+ {
+ }
+}
diff --git a/tests/extension/includes/acp/info/acp_foobar.php b/tests/extension/includes/acp/info/acp_foobar.php
new file mode 100644
index 0000000000..b89cfb9574
--- /dev/null
+++ b/tests/extension/includes/acp/info/acp_foobar.php
@@ -0,0 +1,26 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+/**
+* @package module_install
+*/
+class acp_foobar_info
+{
+ function module()
+ {
+ return array(
+ 'filename' => 'acp_foobar',
+ 'title' => 'ACP Foobar',
+ 'version' => '3.1.0-dev',
+ 'modes' => array(
+ 'test' => array('title' => 'Test', 'auth' => '', 'cat' => array('ACP_GENERAL')),
+ ),
+ );
+ }
+}
diff --git a/tests/extension/manager_test.php b/tests/extension/manager_test.php
new file mode 100644
index 0000000000..789dc20d14
--- /dev/null
+++ b/tests/extension/manager_test.php
@@ -0,0 +1,126 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2011 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+require_once dirname(__FILE__) . '/ext/vendor2/bar/ext.php';
+require_once dirname(__FILE__) . '/ext/vendor2/foo/ext.php';
+require_once dirname(__FILE__) . '/ext/vendor/moo/ext.php';
+
+class phpbb_extension_manager_test extends phpbb_database_test_case
+{
+ protected $extension_manager;
+ protected $class_loader;
+
+ public function getDataSet()
+ {
+ return $this->createXMLDataSet(dirname(__FILE__) . '/fixtures/extensions.xml');
+ }
+
+ protected function setUp()
+ {
+ parent::setUp();
+
+ $this->extension_manager = $this->create_extension_manager();
+ }
+
+ public function test_available()
+ {
+ // barfoo and vendor3/bar should not listed due to missing composer.json. barfoo also has incorrect dir structure.
+ $this->assertEquals(array('vendor/moo', 'vendor2/bar', 'vendor2/foo'), array_keys($this->extension_manager->all_available()));
+ }
+
+ public function test_enabled()
+ {
+ $this->assertEquals(array('vendor2/foo'), array_keys($this->extension_manager->all_enabled()));
+ }
+
+ public function test_configured()
+ {
+ $this->assertEquals(array('vendor/moo', 'vendor2/foo'), array_keys($this->extension_manager->all_configured()));
+ }
+
+ public function test_enable()
+ {
+ vendor2\bar\ext::$state = 0;
+
+ $this->assertEquals(array('vendor2/foo'), array_keys($this->extension_manager->all_enabled()));
+ $this->extension_manager->enable('vendor2/bar');
+ $this->assertEquals(array('vendor2/bar', 'vendor2/foo'), array_keys($this->extension_manager->all_enabled()));
+ $this->assertEquals(array('vendor/moo', 'vendor2/bar', 'vendor2/foo'), array_keys($this->extension_manager->all_configured()));
+
+ $this->assertEquals(4, vendor2\bar\ext::$state);
+ }
+
+ public function test_disable()
+ {
+ vendor2\foo\ext::$disabled = false;
+
+ $this->assertEquals(array('vendor2/foo'), array_keys($this->extension_manager->all_enabled()));
+ $this->extension_manager->disable('vendor2/foo');
+ $this->assertEquals(array(), array_keys($this->extension_manager->all_enabled()));
+ $this->assertEquals(array('vendor/moo', 'vendor2/foo'), array_keys($this->extension_manager->all_configured()));
+
+ $this->assertTrue(vendor2\foo\ext::$disabled);
+ }
+
+ public function test_purge()
+ {
+ vendor\moo\ext::$purged = false;
+
+ $this->assertEquals(array('vendor2/foo'), array_keys($this->extension_manager->all_enabled()));
+ $this->assertEquals(array('vendor/moo', 'vendor2/foo'), array_keys($this->extension_manager->all_configured()));
+ $this->extension_manager->purge('vendor/moo');
+ $this->assertEquals(array('vendor2/foo'), array_keys($this->extension_manager->all_enabled()));
+ $this->assertEquals(array('vendor2/foo'), array_keys($this->extension_manager->all_configured()));
+
+ $this->assertTrue(vendor\moo\ext::$purged);
+ }
+
+ public function test_enabled_no_cache()
+ {
+ $extension_manager = $this->create_extension_manager(false);
+
+ $this->assertEquals(array('vendor2/foo'), array_keys($extension_manager->all_enabled()));
+ }
+
+ protected function create_extension_manager($with_cache = true)
+ {
+
+ $config = new \phpbb\config\config(array());
+ $db = $this->new_dbal();
+ $db_tools = new \phpbb\db\tools($db);
+ $phpbb_root_path = __DIR__ . './../../phpBB/';
+ $php_ext = 'php';
+ $table_prefix = 'phpbb_';
+
+ $migrator = new \phpbb\db\migrator(
+ $config,
+ $db,
+ $db_tools,
+ 'phpbb_migrations',
+ $phpbb_root_path,
+ $php_ext,
+ $table_prefix,
+ array(),
+ new \phpbb\db\migration\helper()
+ );
+ $container = new phpbb_mock_container_builder();
+ $container->set('migrator', $migrator);
+
+ return new \phpbb\extension\manager(
+ $container,
+ $db,
+ $config,
+ new \phpbb\filesystem(),
+ 'phpbb_ext',
+ dirname(__FILE__) . '/',
+ $php_ext,
+ ($with_cache) ? new phpbb_mock_cache() : null
+ );
+ }
+}
diff --git a/tests/extension/metadata_manager_test.php b/tests/extension/metadata_manager_test.php
new file mode 100644
index 0000000000..a3584be67b
--- /dev/null
+++ b/tests/extension/metadata_manager_test.php
@@ -0,0 +1,439 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2011 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+class phpbb_extension_metadata_manager_test extends phpbb_database_test_case
+{
+ protected $class_loader;
+ protected $extension_manager;
+
+ protected $cache;
+ protected $config;
+ protected $db;
+ protected $phpbb_root_path;
+ protected $phpEx;
+ protected $template;
+ protected $user;
+
+ public function getDataSet()
+ {
+ return $this->createXMLDataSet(dirname(__FILE__) . '/fixtures/extensions.xml');
+ }
+
+ protected function setUp()
+ {
+ parent::setUp();
+
+ $this->cache = new phpbb_mock_cache();
+ $this->config = new \phpbb\config\config(array(
+ 'version' => '3.1.0',
+ ));
+ $this->db = $this->new_dbal();
+ $this->db_tools = new \phpbb\db\tools($this->db);
+ $this->phpbb_root_path = dirname(__FILE__) . '/';
+ $this->phpEx = 'php';
+ $this->user = new \phpbb\user();
+ $this->table_prefix = 'phpbb_';
+
+ $this->template = new \phpbb\template\twig\twig(
+ new \phpbb\path_helper(
+ new \phpbb\symfony_request(
+ new phpbb_mock_request()
+ ),
+ new \phpbb\filesystem(),
+ $this->phpbb_root_path,
+ $this->phpEx
+ ),
+ $this->config,
+ $this->user,
+ new \phpbb\template\context()
+ );
+
+ $this->migrator = new \phpbb\db\migrator(
+ $this->config,
+ $this->db,
+ $this->db_tools,
+ 'phpbb_migrations',
+ $this->phpbb_root_path,
+ 'php',
+ $this->table_prefix,
+ array(),
+ new \phpbb\db\migration\helper()
+ );
+ $container = new phpbb_mock_container_builder();
+ $container->set('migrator', $migrator);
+
+ $this->extension_manager = new \phpbb\extension\manager(
+ $container,
+ $this->db,
+ $this->config,
+ new \phpbb\filesystem(),
+ 'phpbb_ext',
+ $this->phpbb_root_path,
+ $this->phpEx,
+ $this->cache
+ );
+ }
+
+ // Should fail from missing composer.json
+ public function test_bar()
+ {
+ $ext_name = 'vendor3/bar';
+
+ $manager = $this->get_metadata_manager($ext_name);
+
+ try
+ {
+ $manager->get_metadata();
+ }
+ catch(\phpbb\extension\exception $e){}
+
+ $this->assertEquals((string) $e, 'The required file does not exist: ' . $this->phpbb_root_path . $this->extension_manager->get_extension_path($ext_name) . 'composer.json');
+ }
+
+ // Should be the same as a direct json_decode of the composer.json file
+ public function test_foo()
+ {
+ $ext_name = 'vendor2/foo';
+
+ $manager = $this->get_metadata_manager($ext_name);
+
+ try
+ {
+ $metadata = $manager->get_metadata();
+ }
+ catch(\phpbb\extension\exception $e)
+ {
+ $this->fail($e);
+ }
+
+ $json = json_decode(file_get_contents($this->phpbb_root_path . 'ext/vendor2/foo/composer.json'), true);
+
+ $this->assertEquals($metadata, $json);
+ }
+
+ public function test_validator_non_existant()
+ {
+ $ext_name = 'validator';
+
+ $manager = $this->get_metadata_manager($ext_name);
+
+ // Non-existant data
+ try
+ {
+ $manager->validate('name');
+
+ $this->fail('Exception not triggered');
+ }
+ catch(\phpbb\extension\exception $e)
+ {
+ $this->assertEquals((string) $e, 'Required meta field \'name\' has not been set.');
+ }
+
+ try
+ {
+ $manager->validate('type');
+
+ $this->fail('Exception not triggered');
+ }
+ catch(\phpbb\extension\exception $e)
+ {
+ $this->assertEquals((string) $e, 'Required meta field \'type\' has not been set.');
+ }
+
+ try
+ {
+ $manager->validate('license');
+
+ $this->fail('Exception not triggered');
+ }
+ catch(\phpbb\extension\exception $e)
+ {
+ $this->assertEquals((string) $e, 'Required meta field \'license\' has not been set.');
+ }
+
+ try
+ {
+ $manager->validate('version');
+
+ $this->fail('Exception not triggered');
+ }
+ catch(\phpbb\extension\exception $e)
+ {
+ $this->assertEquals((string) $e, 'Required meta field \'version\' has not been set.');
+ }
+
+ try
+ {
+ $manager->validate_authors();
+
+ $this->fail('Exception not triggered');
+ }
+ catch(\phpbb\extension\exception $e)
+ {
+ $this->assertEquals((string) $e, 'Required meta field \'authors\' has not been set.');
+ }
+
+ $manager->merge_metadata(array(
+ 'authors' => array(
+ array(),
+ ),
+ ));
+
+ try
+ {
+ $manager->validate_authors();
+
+ $this->fail('Exception not triggered');
+ }
+ catch(\phpbb\extension\exception $e)
+ {
+ $this->assertEquals((string) $e, 'Required meta field \'author name\' has not been set.');
+ }
+ }
+
+
+ public function test_validator_invalid()
+ {
+ $ext_name = 'validator';
+
+ $manager = $this->get_metadata_manager($ext_name);
+
+ // Invalid data
+ $manager->set_metadata(array(
+ 'name' => 'asdf',
+ 'type' => 'asdf',
+ 'license' => '',
+ 'version' => '',
+ ));
+
+ try
+ {
+ $manager->validate('name');
+
+ $this->fail('Exception not triggered');
+ }
+ catch(\phpbb\extension\exception $e)
+ {
+ $this->assertEquals((string) $e, 'Meta field \'name\' is invalid.');
+ }
+
+ try
+ {
+ $manager->validate('type');
+
+ $this->fail('Exception not triggered');
+ }
+ catch(\phpbb\extension\exception $e)
+ {
+ $this->assertEquals((string) $e, 'Meta field \'type\' is invalid.');
+ }
+
+ try
+ {
+ $manager->validate('license');
+
+ $this->fail('Exception not triggered');
+ }
+ catch(\phpbb\extension\exception $e)
+ {
+ $this->assertEquals((string) $e, 'Meta field \'license\' is invalid.');
+ }
+
+ try
+ {
+ $manager->validate('version');
+
+ $this->fail('Exception not triggered');
+ }
+ catch(\phpbb\extension\exception $e)
+ {
+ $this->assertEquals((string) $e, 'Meta field \'version\' is invalid.');
+ }
+ }
+
+ public function test_validator_valid()
+ {
+ $ext_name = 'validator';
+
+ $manager = $this->get_metadata_manager($ext_name);
+
+ // Valid data
+ $manager->set_metadata(array(
+ 'name' => 'test/foo',
+ 'type' => 'phpbb-extension',
+ 'license' => 'GPL v2',
+ 'version' => '1.0.0',
+ ));
+
+ try
+ {
+ $this->assertEquals(true, $manager->validate('enable'));
+ }
+ catch(\phpbb\extension\exception $e)
+ {
+ $this->fail($e);
+ }
+ }
+
+
+ public function test_validator_requirements()
+ {
+ $ext_name = 'validator';
+
+ $manager = $this->get_metadata_manager($ext_name);
+ // Too high of requirements
+ $manager->merge_metadata(array(
+ 'require' => array(
+ 'php' => '10.0.0',
+ 'phpbb/phpbb' => '3.2.0', // config is set to 3.1.0
+ ),
+ ));
+
+ try
+ {
+ //$this->assertEquals(false, $manager->validate_require_php());
+ //$this->assertEquals(false, $manager->validate_require_phpbb());
+ }
+ catch(\phpbb\extension\exception $e)
+ {
+ $this->fail($e);
+ }
+
+
+ // Too high of requirements
+ $manager->merge_metadata(array(
+ 'require' => array(
+ 'php' => '5.3.0',
+ 'phpbb/phpbb' => '3.1.0-beta', // config is set to 3.1.0
+ ),
+ ));
+
+ try
+ {
+ $this->assertEquals(true, $manager->validate_require_php());
+ $this->assertEquals(true, $manager->validate_require_phpbb());
+ }
+ catch(\phpbb\extension\exception $e)
+ {
+ $this->fail($e);
+ }
+
+
+ // Too high of requirements
+ $manager->merge_metadata(array(
+ 'require' => array(
+ 'php' => '>' . phpversion(),
+ 'phpbb/phpbb' => '>3.1.0', // config is set to 3.1.0
+ ),
+ ));
+
+ try
+ {
+ //$this->assertEquals(false, $manager->validate_require_php());
+ //$this->assertEquals(false, $manager->validate_require_phpbb());
+ }
+ catch(\phpbb\extension\exception $e)
+ {
+ $this->fail($e);
+ }
+
+
+ // Too high of current install
+ $manager->merge_metadata(array(
+ 'require' => array(
+ 'php' => '<' . phpversion(),
+ 'phpbb/phpbb' => '<3.1.0', // config is set to 3.1.0
+ ),
+ ));
+
+ try
+ {
+ //$this->assertEquals(false, $manager->validate_require_php());
+ //$this->assertEquals(false, $manager->validate_require_phpbb());
+ }
+ catch(\phpbb\extension\exception $e)
+ {
+ $this->fail($e);
+ }
+
+
+ // Matching requirements
+ $manager->merge_metadata(array(
+ 'require' => array(
+ 'php' => phpversion(),
+ 'phpbb/phpbb' => '3.1.0', // config is set to 3.1.0
+ ),
+ ));
+
+ try
+ {
+ $this->assertEquals(true, $manager->validate_require_php());
+ $this->assertEquals(true, $manager->validate_require_phpbb());
+ }
+ catch(\phpbb\extension\exception $e)
+ {
+ $this->fail($e);
+ }
+
+
+ // Matching requirements
+ $manager->merge_metadata(array(
+ 'require' => array(
+ 'php' => '>=' . phpversion(),
+ 'phpbb/phpbb' => '>=3.1.0', // config is set to 3.1.0
+ ),
+ ));
+
+ try
+ {
+ $this->assertEquals(true, $manager->validate_require_php());
+ $this->assertEquals(true, $manager->validate_require_phpbb());
+ }
+ catch(\phpbb\extension\exception $e)
+ {
+ $this->fail($e);
+ }
+
+
+ // Matching requirements
+ $manager->merge_metadata(array(
+ 'require' => array(
+ 'php' => '<=' . phpversion(),
+ 'phpbb/phpbb' => '<=3.1.0', // config is set to 3.1.0
+ ),
+ ));
+
+ try
+ {
+ $this->assertEquals(true, $manager->validate_require_php());
+ $this->assertEquals(true, $manager->validate_require_phpbb());
+ }
+ catch(\phpbb\extension\exception $e)
+ {
+ $this->fail($e);
+ }
+ }
+
+ /**
+ * Get an instance of the metadata manager
+ *
+ * @param string $ext_name
+ * @return phpbb_mock_metadata_manager
+ */
+ private function get_metadata_manager($ext_name)
+ {
+ return new phpbb_mock_metadata_manager(
+ $ext_name,
+ $this->config,
+ $this->extension_manager,
+ $this->template,
+ $this->phpbb_root_path
+ );
+ }
+}
diff --git a/tests/extension/modules_test.php b/tests/extension/modules_test.php
new file mode 100644
index 0000000000..c0a136e173
--- /dev/null
+++ b/tests/extension/modules_test.php
@@ -0,0 +1,232 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+require_once dirname(__FILE__) . '/ext/vendor2/foo/acp/a_info.php';
+require_once dirname(__FILE__) . '/ext/vendor2/foo/mcp/a_info.php';
+require_once dirname(__FILE__) . '/ext/vendor2/foo/acp/fail_info.php';
+require_once dirname(__FILE__) . '/ext/vendor2/bar/acp/a_info.php';
+require_once dirname(__FILE__) . '/../../phpBB/includes/acp/acp_modules.php';
+require_once dirname(__FILE__) . '/../../phpBB/includes/functions_module.php';
+
+class phpbb_extension_modules_test extends phpbb_test_case
+{
+ protected $extension_manager;
+ protected $finder;
+
+ public function setUp()
+ {
+ global $phpbb_extension_manager;
+
+ $this->extension_manager = new phpbb_mock_extension_manager(
+ dirname(__FILE__) . '/',
+ array(
+ 'vendor2/foo' => array(
+ 'ext_name' => 'vendor2/foo',
+ 'ext_active' => '1',
+ 'ext_path' => 'ext/vendor2/foo/',
+ ),
+ 'vendor3/bar' => array(
+ 'ext_name' => 'vendor3/bar',
+ 'ext_active' => '1',
+ 'ext_path' => 'ext/vendor3/bar/',
+ ),
+ ));
+ $phpbb_extension_manager = $this->extension_manager;
+
+ $this->acp_modules = new acp_modules();
+ }
+
+ public function test_get_module_infos()
+ {
+ global $phpbb_root_path;
+
+// $this->markTestIncomplete('Modules no speak namespace! Going to get rid of db modules altogether and fix this test after.');
+
+ // Correctly set the root path for this test to this directory, so the classes can be found
+ $phpbb_root_path = dirname(__FILE__) . '/';
+
+ // Find acp module info files
+ $this->acp_modules->module_class = 'acp';
+ $acp_modules = $this->acp_modules->get_module_infos();
+ $this->assertEquals(array(
+ 'vendor2\\foo\\acp\\a_module' => array(
+ 'filename' => 'vendor2\\foo\\acp\\a_module',
+ 'title' => 'Foobar',
+ 'version' => '3.1.0-dev',
+ 'modes' => array(
+ 'config' => array('title' => 'Config', 'auth' => 'ext_vendor2/foo', 'cat' => array('ACP_MODS')),
+ ),
+ ),
+ 'acp_foobar' => array(
+ 'filename' => 'acp_foobar',
+ 'title' => 'ACP Foobar',
+ 'version' => '3.1.0-dev',
+ 'modes' => array(
+ 'test' => array('title' => 'Test', 'auth' => '', 'cat' => array('ACP_GENERAL')),
+ ),
+ ),
+ ), $acp_modules);
+
+ // Find mcp module info files
+ $this->acp_modules->module_class = 'mcp';
+ $acp_modules = $this->acp_modules->get_module_infos();
+ $this->assertEquals(array(
+ 'vendor2\\foo\\mcp\\a_module' => array(
+ 'filename' => 'vendor2\\foo\\mcp\\a_module',
+ 'title' => 'Foobar',
+ 'version' => '3.1.0-dev',
+ 'modes' => array(
+ 'config' => array('title' => 'Config', 'auth' => '', 'cat' => array('MCP_MAIN')),
+ ),
+ ),
+ ), $acp_modules);
+
+ // Find a specific module info file (mcp_a_module)
+ $this->acp_modules->module_class = 'mcp';
+ $acp_modules = $this->acp_modules->get_module_infos('mcp_a_module');
+ $this->assertEquals(array(
+ 'vendor2\\foo\\mcp\\a_module' => array(
+ 'filename' => 'vendor2\\foo\\mcp\\a_module',
+ 'title' => 'Foobar',
+ 'version' => '3.1.0-dev',
+ 'modes' => array(
+ 'config' => array('title' => 'Config', 'auth' => '', 'cat' => array('MCP_MAIN')),
+ ),
+ ),
+ ), $acp_modules);
+
+ // Find a specific module info file (mcp_a_module) with passing the module_class
+ $this->acp_modules->module_class = '';
+ $acp_modules = $this->acp_modules->get_module_infos('mcp_a_module', 'mcp');
+ $this->assertEquals(array(
+ 'vendor2\\foo\\mcp\\a_module' => array(
+ 'filename' => 'vendor2\\foo\\mcp\\a_module',
+ 'title' => 'Foobar',
+ 'version' => '3.1.0-dev',
+ 'modes' => array(
+ 'config' => array('title' => 'Config', 'auth' => '', 'cat' => array('MCP_MAIN')),
+ ),
+ ),
+ ), $acp_modules);
+
+ // The mcp module info file we're looking for shouldn't exist
+ $this->acp_modules->module_class = 'mcp';
+ $acp_modules = $this->acp_modules->get_module_infos('mcp_a_fail');
+ $this->assertEquals(array(), $acp_modules);
+
+ // As there are no ucp modules we shouldn't find any
+ $this->acp_modules->module_class = 'ucp';
+ $acp_modules = $this->acp_modules->get_module_infos();
+ $this->assertEquals(array(), $acp_modules);
+
+ // Get module info of specified extension module
+ $this->acp_modules->module_class = 'acp';
+ $acp_modules = $this->acp_modules->get_module_infos('foo_acp_a_module');
+ $this->assertEquals(array(
+ 'vendor2\\foo\\acp\\a_module' => array (
+ 'filename' => 'vendor2\\foo\\acp\\a_module',
+ 'title' => 'Foobar',
+ 'version' => '3.1.0-dev',
+ 'modes' => array (
+ 'config' => array ('title' => 'Config', 'auth' => 'ext_vendor2/foo', 'cat' => array ('ACP_MODS')),
+ ),
+ ),
+ ), $acp_modules);
+
+ // No specific module and module class set to an incorrect name
+ $acp_modules = $this->acp_modules->get_module_infos('', 'wcp', true);
+ $this->assertEquals(array(), $acp_modules);
+
+ // No specific module, no module_class set in the function parameter, and an incorrect module class
+ $this->acp_modules->module_class = 'wcp';
+ $acp_modules = $this->acp_modules->get_module_infos();
+ $this->assertEquals(array(), $acp_modules);
+
+ // No specific module, module class set to false (will default to the above acp)
+ // Setting $use_all_available will cause get_module_infos() to also load not enabled extensions (vendor2/bar)
+ $this->acp_modules->module_class = 'acp';
+ $acp_modules = $this->acp_modules->get_module_infos('', false, true);
+ $this->assertEquals(array(
+ 'vendor2\\foo\\acp\\a_module' => array(
+ 'filename' => 'vendor2\\foo\\acp\\a_module',
+ 'title' => 'Foobar',
+ 'version' => '3.1.0-dev',
+ 'modes' => array(
+ 'config' => array('title' => 'Config', 'auth' => 'ext_vendor2/foo', 'cat' => array('ACP_MODS')),
+ ),
+ ),
+ 'acp_foobar' => array(
+ 'filename' => 'acp_foobar',
+ 'title' => 'ACP Foobar',
+ 'version' => '3.1.0-dev',
+ 'modes' => array(
+ 'test' => array('title' => 'Test', 'auth' => '', 'cat' => array('ACP_GENERAL')),
+ ),
+ ),
+ 'vendor2\\bar\\acp\\a_module' => array(
+ 'filename' => 'vendor2\\bar\\acp\\a_module',
+ 'title' => 'Bar',
+ 'version' => '3.1.0-dev',
+ 'modes' => array(
+ 'config' => array('title' => 'Config', 'auth' => '', 'cat' => array('ACP_MODS')),
+ ),
+ )
+ ), $acp_modules);
+
+ // Specific module set to disabled extension
+ $acp_modules = $this->acp_modules->get_module_infos('vendor2_bar_acp_a_module', 'acp', true);
+ $this->assertEquals(array(
+ 'vendor2\\bar\\acp\\a_module' => array(
+ 'filename' => 'vendor2\\bar\\acp\\a_module',
+ 'title' => 'Bar',
+ 'version' => '3.1.0-dev',
+ 'modes' => array(
+ 'config' => array('title' => 'Config', 'auth' => '', 'cat' => array('ACP_MODS')),
+ ),
+ )
+ ), $acp_modules);
+ }
+
+ public function module_auth_test_data()
+ {
+ return array(
+ // module_auth, expected result
+ array('ext_foo', false),
+ array('ext_foo/bar', false),
+ array('ext_vendor3/bar', false),
+ array('ext_vendor2/foo', true),
+ );
+ }
+
+ /**
+ * @dataProvider module_auth_test_data
+ */
+ public function test_modules_auth($module_auth, $expected)
+ {
+ global $phpbb_extension_manager;
+
+ $phpbb_extension_manager = $this->extension_manager = new phpbb_mock_extension_manager(
+ dirname(__FILE__) . '/',
+ array(
+ 'vendor2/foo' => array(
+ 'ext_name' => 'vendor2/foo',
+ 'ext_active' => '1',
+ 'ext_path' => 'ext/vendor2/foo/',
+ ),
+ 'vendor3/bar' => array(
+ 'ext_name' => 'vendor3/bar',
+ 'ext_active' => '0',
+ 'ext_path' => 'ext/vendor3/bar/',
+ ),
+ )
+ );
+
+ $this->assertEquals($expected, p_master::module_auth($module_auth, 0));
+ }
+}
diff --git a/tests/extension/phpbb/default/implementation.php b/tests/extension/phpbb/default/implementation.php
new file mode 100644
index 0000000000..91d5f8aa2f
--- /dev/null
+++ b/tests/extension/phpbb/default/implementation.php
@@ -0,0 +1,5 @@
+<?php
+
+class phpbb_default_impl_class implements phpbb_default_interface
+{
+}
diff --git a/tests/functions/clean_path_test.php b/tests/filesystem/clean_path_test.php
index bcbe9838d9..fedadc103b 100644
--- a/tests/functions/clean_path_test.php
+++ b/tests/filesystem/clean_path_test.php
@@ -7,11 +7,17 @@
*
*/
-require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php';
-
-class phpbb_clean_path_test extends phpbb_test_case
+class phpbb_filesystem_clean_path_test extends phpbb_test_case
{
- public function clean_path_test_data()
+ protected $filesystem;
+
+ public function setUp()
+ {
+ parent::setUp();
+ $this->filesystem = new \phpbb\filesystem();
+ }
+
+ public function clean_path_data()
{
return array(
array('foo', 'foo'),
@@ -33,12 +39,10 @@ class phpbb_clean_path_test extends phpbb_test_case
}
/**
- * @dataProvider clean_path_test_data
+ * @dataProvider clean_path_data
*/
public function test_clean_path($input, $expected)
{
- $output = phpbb_clean_path($input);
-
- $this->assertEquals($expected, $output);
+ $this->assertEquals($expected, $this->filesystem->clean_path($input));
}
}
diff --git a/tests/functional/acp_groups_test.php b/tests/functional/acp_groups_test.php
index 3d8cabb086..cdf8bf5117 100644
--- a/tests/functional/acp_groups_test.php
+++ b/tests/functional/acp_groups_test.php
@@ -14,8 +14,107 @@ require_once dirname(__FILE__) . '/common_groups_test.php';
*/
class phpbb_functional_acp_groups_test extends phpbb_functional_common_groups_test
{
+ protected $form_data;
+
protected function get_url()
{
return 'adm/index.php?i=groups&mode=manage&action=edit';
}
+
+ public function acp_group_test_data()
+ {
+ return array(
+ 'both_yes' => array(
+ 5,
+ true,
+ true,
+ ),
+ 'legend_no_teampage' => array(
+ 5,
+ true,
+ false,
+ ),
+ 'no_legend_teampage' => array(
+ 5,
+ false,
+ true,
+ ),
+ 'both_no' => array(
+ 5,
+ false,
+ false,
+ ),
+ 'no_change' => array(
+ 5,
+ NULL,
+ NULL,
+ ),
+ 'back_to_default' => array(
+ 5,
+ true,
+ true,
+ ),
+ // Remove and add moderators back in order to reset
+ // group order to default one
+ 'mods_both_no' => array(
+ 4,
+ false,
+ false,
+ ),
+ 'mods_back_to_default' => array(
+ 4,
+ true,
+ true,
+ ),
+ );
+ }
+
+ /**
+ * @dataProvider acp_group_test_data
+ */
+ public function test_acp_groups_teampage($group_id, $tick_legend, $tick_teampage)
+ {
+ $this->group_manage_login();
+
+ // Manage Administrators group
+ $form = $this->get_group_manage_form($group_id);
+ $this->form_data[0] = $form->getValues();
+
+ if (isset($tick_legend) && isset($tick_teampage))
+ {
+ if ($tick_legend)
+ {
+ $form['group_legend']->tick();
+ }
+ else
+ {
+ $form['group_legend']->untick();
+ }
+
+ if ($tick_teampage)
+ {
+ $form['group_teampage']->tick();
+ }
+ else
+ {
+ $form['group_teampage']->untick();
+ }
+ }
+ $crawler = self::submit($form);
+ $this->assertContains($this->lang('GROUP_UPDATED'), $crawler->text());
+
+ $form = $this->get_group_manage_form($group_id);
+ if (!isset($tick_legend) && !isset($tick_teampage))
+ {
+ $this->form_data[1] = $form->getValues();
+ unset($this->form_data[0]['creation_time'], $this->form_data[0]['form_token'], $this->form_data[1]['creation_time'], $this->form_data[1]['form_token']);
+ $this->assertEquals($this->form_data[0], $this->form_data[1]);
+ }
+ else
+ {
+ $this->form_data = $form->getValues();
+ $this->assertEquals($tick_legend, $this->form_data['group_legend']);
+ $this->assertEquals($tick_teampage, $this->form_data['group_teampage']);
+ }
+ }
}
diff --git a/tests/functional/acp_permissions_test.php b/tests/functional/acp_permissions_test.php
new file mode 100644
index 0000000000..e17f33dc96
--- /dev/null
+++ b/tests/functional/acp_permissions_test.php
@@ -0,0 +1,123 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+/**
+* @group functional
+*/
+class phpbb_functional_acp_permissions_test extends phpbb_functional_test_case
+{
+ public function setUp()
+ {
+ parent::setUp();
+
+ $this->login();
+ $this->admin_login();
+ $this->add_lang('acp/permissions');
+ }
+
+ public function test_permissions_tab()
+ {
+ // Permissions tab
+ // XXX hardcoded id
+ $crawler = self::request('GET', 'adm/index.php?i=16&sid=' . $this->sid);
+ // these language strings are html
+ $this->assertContains($this->lang('ACP_PERMISSIONS_EXPLAIN'), $this->get_content());
+ }
+
+ public function test_select_user()
+ {
+ // User permissions
+ $crawler = self::request('GET', 'adm/index.php?i=acp_permissions&icat=16&mode=setting_user_global&sid=' . $this->sid);
+ $this->assertContains($this->lang('ACP_USERS_PERMISSIONS_EXPLAIN'), $this->get_content());
+
+ // Select admin
+ $form = $crawler->selectButton($this->lang('SUBMIT'))->form();
+ $data = array('username[0]' => 'admin');
+ $form->setValues($data);
+ $crawler = self::submit($form);
+ $this->assertContains($this->lang('ACL_SET'), $crawler->filter('h1')->eq(1)->text());
+ }
+
+ public function permissions_data()
+ {
+ return array(
+ // description
+ // permission type
+ // permission name
+ // mode
+ // object name
+ // object id
+ array(
+ 'user permission',
+ 'u_',
+ 'u_hideonline',
+ 'setting_user_global',
+ 'user_id',
+ 2,
+ ),
+ array(
+ 'moderator permission',
+ 'm_',
+ 'm_ban',
+ 'setting_mod_global',
+ 'group_id',
+ 4,
+ ),
+ /* Admin does not work yet, probably because founder can do everything
+ array(
+ 'admin permission',
+ 'a_',
+ 'a_forum',
+ 'setting_admin_global',
+ 'group_id',
+ 5,
+ ),
+ */
+ );
+ }
+
+ /**
+ * @dataProvider permissions_data
+ */
+ public function test_change_permission($description, $permission_type, $permission, $mode, $object_name, $object_id)
+ {
+ // Get the form
+ $crawler = self::request('GET', "adm/index.php?i=acp_permissions&icat=16&mode=$mode&${object_name}[0]=$object_id&type=$permission_type&sid=" . $this->sid);
+ $this->assertContains($this->lang('ACL_SET'), $crawler->filter('h1')->eq(1)->text());
+
+ // XXX globals for \phpbb\auth\auth, refactor it later
+ global $db, $cache;
+ $db = $this->get_db();
+ $cache = new phpbb_mock_null_cache;
+
+ $auth = new \phpbb\auth\auth;
+ // XXX hardcoded id
+ $user_data = $auth->obtain_user_data(2);
+ $auth->acl($user_data);
+ $this->assertEquals(1, $auth->acl_get($permission));
+
+ // Set u_hideonline to never
+ $form = $crawler->selectButton($this->lang('APPLY_PERMISSIONS'))->form();
+ // initially it should be a yes
+ $values = $form->getValues();
+ $this->assertEquals(1, $values["setting[$object_id][0][$permission]"]);
+ // set to never
+ $data = array("setting[$object_id][0][$permission]" => '0');
+ $form->setValues($data);
+ $crawler = self::submit($form);
+ $this->assertContains($this->lang('AUTH_UPDATED'), $crawler->text());
+
+ // check acl again
+ $auth = new \phpbb\auth\auth;
+ // XXX hardcoded id
+ $user_data = $auth->obtain_user_data(2);
+ $auth->acl($user_data);
+ $this->assertEquals(0, $auth->acl_get($permission));
+ }
+}
diff --git a/tests/functional/auth_test.php b/tests/functional/auth_test.php
index afb4f15fc2..cfd85571b7 100644
--- a/tests/functional/auth_test.php
+++ b/tests/functional/auth_test.php
@@ -39,10 +39,19 @@ class phpbb_functional_auth_test extends phpbb_functional_test_case
// logout
$crawler = self::request('GET', 'ucp.php?sid=' . $this->sid . '&mode=logout');
- $this->assertContains($this->lang('LOGOUT_REDIRECT'), $crawler->filter('#message')->text());
// look for a register link, which should be visible only when logged out
$crawler = self::request('GET', 'index.php');
$this->assertContains($this->lang('REGISTER'), $crawler->filter('.navbar')->text());
}
+
+ public function test_acp_login()
+ {
+ $this->login();
+ $this->admin_login();
+
+ // check that we are logged in
+ $crawler = self::request('GET', 'adm/index.php?sid=' . $this->sid);
+ $this->assertContains($this->lang('ADMIN_PANEL'), $crawler->filter('h1')->text());
+ }
}
diff --git a/tests/functional/avatar_acp_groups_test.php b/tests/functional/avatar_acp_groups_test.php
new file mode 100644
index 0000000000..5f767b44f2
--- /dev/null
+++ b/tests/functional/avatar_acp_groups_test.php
@@ -0,0 +1,81 @@
+<?php
+/**
+ *
+ * @package testing
+ * @copyright (c) 2013 phpBB Group
+ * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+ *
+ */
+
+require_once dirname(__FILE__) . '/common_avatar_test.php';
+
+/**
+ * @group functional
+ */
+class phpbb_functional_avatar_acp_groups_test extends phpbb_functional_common_avatar_test
+{
+ public function get_url()
+ {
+ return 'adm/index.php?i=acp_groups&mode=manage&action=edit&g=5';
+ }
+
+ public function avatar_acp_groups_data()
+ {
+ return array(
+ // Correct Gravatar
+ array(
+ 'GROUP_UPDATED',
+ 'avatar_driver_gravatar',
+ array(
+ 'avatar_gravatar_email' => 'test@example.com',
+ 'avatar_gravatar_width' => 80,
+ 'avatar_gravatar_height' => 80,
+ ),
+ ),
+ // Gravatar with incorrect size
+ array(
+ 'The submitted avatar is 120 wide and 120 high. Avatars must be at least 20 wide and 20 high, but no larger than 90 wide and 90 high.',
+ 'avatar_driver_gravatar',
+ array(
+ 'avatar_gravatar_email' => 'test@example.com',
+ 'avatar_gravatar_width' => 120,
+ 'avatar_gravatar_height' => 120,
+ ),
+ ),
+ // Delete avatar image to reset group settings
+ array(
+ 'GROUP_UPDATED',
+ 'avatar_driver_gravatar',
+ array(
+ 'avatar_delete' => array('tick', ''),
+ ),
+ ),
+ array(
+ 'The URL you specified is invalid.',
+ 'avatar_driver_remote',
+ array(
+ 'avatar_remote_url' => 'https://www.phpbb.com/avatar/55502f40dc8b7c769880b10874abc9d0.jpg',
+ 'avatar_remote_width' => 80,
+ 'avatar_remote_height' => 80,
+ ),
+ ),
+ );
+ }
+
+ /**
+ * @dataProvider avatar_acp_groups_data
+ */
+ public function test_avatar_acp_groups($expected, $avatar_type, $data)
+ {
+ $this->assert_avatar_submit($expected, $avatar_type, $data);
+ }
+
+ // Test if avatar was really deleted
+ public function test_no_avatar_acp_groups()
+ {
+ $crawler = self::request('GET', $this->get_url() . '&sid=' . $this->sid);
+ $form = $crawler->selectButton($this->lang('SUBMIT'))->form();
+ $form_data = $form->getValues();
+ $this->assertEmpty($form_data['avatar_type']);
+ }
+}
diff --git a/tests/functional/avatar_acp_users_test.php b/tests/functional/avatar_acp_users_test.php
new file mode 100644
index 0000000000..0afd05e530
--- /dev/null
+++ b/tests/functional/avatar_acp_users_test.php
@@ -0,0 +1,61 @@
+<?php
+/**
+ *
+ * @package testing
+ * @copyright (c) 2013 phpBB Group
+ * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+ *
+ */
+
+require_once dirname(__FILE__) . '/common_avatar_test.php';
+
+/**
+ * @group functional
+ */
+class phpbb_functional_avatar_acp_users_test extends phpbb_functional_common_avatar_test
+{
+ public function get_url()
+ {
+ return 'adm/index.php?i=acp_users&u=2&mode=avatar';
+ }
+
+ public function avatar_acp_users_data()
+ {
+ return array(
+ // Gravatar with incorrect email
+ array(
+ 'EMAIL_INVALID_EMAIL',
+ 'avatar_driver_gravatar',
+ array(
+ 'avatar_gravatar_email' => 'test.example.com',
+ 'avatar_gravatar_width' => 80,
+ 'avatar_gravatar_height' => 80,
+ ),
+ ),
+ // Remote avatar with correct link
+ array(
+ 'USER_AVATAR_UPDATED',
+ 'avatar_driver_upload',
+ array(
+ 'avatar_upload_url' => 'https://secure.gravatar.com/avatar/55502f40dc8b7c769880b10874abc9d0.jpg',
+ ),
+ ),
+ // Reset avatar settings
+ array(
+ 'USER_AVATAR_UPDATED',
+ 'avatar_driver_gravatar',
+ array(
+ 'avatar_delete' => array('tick', ''),
+ ),
+ ),
+ );
+ }
+
+ /**
+ * @dataProvider avatar_acp_users_data
+ */
+ public function test_avatar_acp_users($expected, $avatar_type, $data)
+ {
+ $this->assert_avatar_submit($expected, $avatar_type, $data);
+ }
+}
diff --git a/tests/functional/avatar_ucp_groups_test.php b/tests/functional/avatar_ucp_groups_test.php
new file mode 100644
index 0000000000..233b7d36e1
--- /dev/null
+++ b/tests/functional/avatar_ucp_groups_test.php
@@ -0,0 +1,71 @@
+<?php
+/**
+ *
+ * @package testing
+ * @copyright (c) 2013 phpBB Group
+ * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+ *
+ */
+
+require_once dirname(__FILE__) . '/common_avatar_test.php';
+
+/**
+ * @group functional
+ */
+class phpbb_functional_avatar_ucp_groups_test extends phpbb_functional_common_avatar_test
+{
+ public function get_url()
+ {
+ return 'ucp.php?i=ucp_groups&mode=manage&action=edit&g=5';
+ }
+
+ public function avatar_ucp_groups_data()
+ {
+ return array(
+ // Incorrect URL
+ array(
+ 'AVATAR_URL_INVALID',
+ 'avatar_driver_upload',
+ array(
+ 'avatar_upload_url' => 'https://secure.gravatar.com/avatar/55502f40dc8b7c769880b10874abc9d0?s=80',
+ ),
+ ),
+ /*
+ // Does not work due to DomCrawler issue
+ // Valid file upload
+ array(
+ 'GROUP_UPDATED',
+ 'avatar_driver_upload',
+ array(
+ 'avatar_upload_file' => array('upload', $this->path . 'valid.jpg'),
+ ),
+ ),
+ */
+ // Correct remote avatar
+ array(
+ 'GROUP_UPDATED',
+ 'avatar_driver_remote',
+ array(
+ 'avatar_remote_url' => 'https://secure.gravatar.com/avatar/55502f40dc8b7c769880b10874abc9d0.jpg',
+ 'avatar_remote_width' => 80,
+ 'avatar_remote_height' => 80,
+ ),
+ ),
+ array(
+ 'GROUP_UPDATED',
+ 'avatar_driver_gravatar',
+ array(
+ 'avatar_delete' => array('tick', ''),
+ ),
+ ),
+ );
+ }
+
+ /**
+ * @dataProvider avatar_ucp_groups_data
+ */
+ public function test_avatar_ucp_groups($expected, $avatar_type, $data)
+ {
+ $this->assert_avatar_submit($expected, $avatar_type, $data);
+ }
+}
diff --git a/tests/functional/avatar_ucp_users_test.php b/tests/functional/avatar_ucp_users_test.php
new file mode 100644
index 0000000000..f828559e0d
--- /dev/null
+++ b/tests/functional/avatar_ucp_users_test.php
@@ -0,0 +1,78 @@
+<?php
+/**
+ *
+ * @package testing
+ * @copyright (c) 2013 phpBB Group
+ * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+ *
+ */
+
+require_once dirname(__FILE__) . '/common_avatar_test.php';
+
+/**
+ * @group functional
+ */
+class phpbb_functional_avatar_ucp_users_test extends phpbb_functional_common_avatar_test
+{
+ public function get_url()
+ {
+ return 'ucp.php?i=ucp_profile&mode=avatar';
+ }
+
+ public function avatar_ucp_groups_data()
+ {
+ return array(
+ // Gravatar with correct settings
+ array(
+ 'PROFILE_UPDATED',
+ 'avatar_driver_gravatar',
+ array(
+ 'avatar_gravatar_email' => 'test@example.com',
+ 'avatar_gravatar_width' => 80,
+ 'avatar_gravatar_height' => 80,
+ ),
+ ),
+ // Wrong driver selected
+ array(
+ 'NO_AVATAR_SELECTED',
+ 'avatar_driver_upload',
+ array(
+ 'avatar_remote_url' => 'https://secure.gravatar.com/avatar/55502f40dc8b7c769880b10874abc9d0.jpg',
+ 'avatar_remote_width' => 80,
+ 'avatar_remote_height' => 80,
+ ),
+ ),
+ array(
+ 'PROFILE_UPDATED',
+ 'avatar_driver_gravatar',
+ array(
+ 'avatar_delete' => array('tick', ''),
+ ),
+ ),
+ );
+ }
+
+ /**
+ * @dataProvider avatar_ucp_groups_data
+ */
+ public function test_avatar_ucp_groups($expected, $avatar_type, $data)
+ {
+ $this->assert_avatar_submit($expected, $avatar_type, $data);
+ }
+
+ public function test_display_upload_avatar()
+ {
+ $this->assert_avatar_submit('PROFILE_UPDATED',
+ 'avatar_driver_upload',
+ array(
+ 'avatar_upload_url' => 'https://secure.gravatar.com/avatar/55502f40dc8b7c769880b10874abc9d0.jpg',
+ )
+ );
+
+ $crawler = self::request('GET', $this->get_url() . '&sid=' . $this->sid);
+ $avatar_link = $crawler->filter('img')->attr('src');
+ $crawler = self::request('GET', $avatar_link . '&sid=' . $this->sid, array(), false);
+ $content = self::$client->getResponse()->getContent();
+ self::assertEquals(false, stripos(trim($content), 'debug'), 'Output contains debug message');
+ }
+}
diff --git a/tests/functional/browse_test.php b/tests/functional/browse_test.php
index 18a2ad9464..c3be301762 100644
--- a/tests/functional/browse_test.php
+++ b/tests/functional/browse_test.php
@@ -29,4 +29,11 @@ class phpbb_functional_browse_test extends phpbb_functional_test_case
$crawler = self::request('GET', 'viewtopic.php?t=1');
$this->assertGreaterThan(0, $crawler->filter('.postbody')->count());
}
+
+ public function test_feed()
+ {
+ $crawler = self::request('GET', 'feed.php', array(), false);
+ self::assert_response_xml();
+ $this->assertGreaterThan(0, $crawler->filter('entry')->count());
+ }
}
diff --git a/tests/functional/common_avatar_test.php b/tests/functional/common_avatar_test.php
new file mode 100644
index 0000000000..1fd8f2ed6f
--- /dev/null
+++ b/tests/functional/common_avatar_test.php
@@ -0,0 +1,80 @@
+<?php
+/**
+ *
+ * @package testing
+ * @copyright (c) 2013 phpBB Group
+ * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+ *
+ */
+
+/**
+ * @group functional
+ */
+abstract class phpbb_functional_common_avatar_test extends phpbb_functional_test_case
+{
+ private $path;
+ private $form_content;
+
+ abstract function get_url();
+
+ public function setUp()
+ {
+ parent::setUp();
+ $this->path = __DIR__ . '/fixtures/files/';
+ $this->login();
+ $this->admin_login();
+ $this->add_lang(array('acp/board', 'ucp', 'acp/users', 'acp/groups'));
+ $this->set_acp_settings();
+ }
+
+ private function set_acp_settings()
+ {
+ $crawler = self::request('GET', 'adm/index.php?i=acp_board&mode=avatar&sid=' . $this->sid);
+ // Check the default entries we should have
+ $this->assertContainsLang('ALLOW_GRAVATAR', $crawler->text());
+ $this->assertContainsLang('ALLOW_REMOTE_UPLOAD', $crawler->text());
+ $this->assertContainsLang('ALLOW_AVATARS', $crawler->text());
+ $this->assertContainsLang('ALLOW_LOCAL', $crawler->text());
+
+ // Now start setting the needed settings
+ $form = $crawler->selectButton($this->lang('SUBMIT'))->form();
+ $form['config[allow_avatar_local]']->select(1);
+ $form['config[allow_avatar_gravatar]']->select(1);
+ $form['config[allow_avatar_remote]']->select(1);
+ $form['config[allow_avatar_remote_upload]']->select(1);
+ $crawler = self::submit($form);
+ $this->assertContainsLang('CONFIG_UPDATED', $crawler->text());
+ }
+
+ public function assert_avatar_submit($expected, $type, $data, $button_text = 'SUBMIT')
+ {
+ $crawler = self::request('GET', $this->get_url() . '&sid=' . $this->sid);
+
+ // Test if setting a gravatar avatar properly works
+ $form = $crawler->selectButton($this->lang($button_text))->form();
+ $form['avatar_driver']->select($type);
+
+ foreach ($data as $key => $value)
+ {
+ if (is_array($value))
+ {
+ $form[$key]->$value[0]($value[1]);
+ }
+ else
+ {
+ $form[$key]->setValue($value);
+ }
+ }
+
+ $crawler = self::submit($form);
+
+ try
+ {
+ $this->assertContainsLang($expected, $crawler->text());
+ }
+ catch (Exception $e)
+ {
+ $this->assertContains($expected, $crawler->text());
+ }
+ }
+}
diff --git a/tests/functional/common_groups_test.php b/tests/functional/common_groups_test.php
index 427a930cb9..950db24767 100644
--- a/tests/functional/common_groups_test.php
+++ b/tests/functional/common_groups_test.php
@@ -14,6 +14,28 @@ abstract class phpbb_functional_common_groups_test extends phpbb_functional_test
{
abstract protected function get_url();
+ /**
+ * Get group_manage form
+ * @param int $group_id ID of the group that should be managed
+ */
+ protected function get_group_manage_form($group_id = 5)
+ {
+ // Manage Administrators group
+ $crawler = self::request('GET', $this->get_url() . "&g=$group_id&sid=" . $this->sid);
+ $form = $crawler->selectButton($this->lang('SUBMIT'))->form();
+ return $form;
+ }
+
+ /**
+ * Execute login calls and add_lang() calls for tests
+ */
+ protected function group_manage_login()
+ {
+ $this->login();
+ $this->admin_login();
+ $this->add_lang(array('ucp', 'acp/groups'));
+ }
+
// Enable all avatars in the ACP
protected function enable_all_avatars()
{
@@ -21,7 +43,7 @@ abstract class phpbb_functional_common_groups_test extends phpbb_functional_test
$crawler = self::request('GET', 'adm/index.php?i=board&mode=avatar&sid=' . $this->sid);
// Check the default entries we should have
- $this->assertContains($this->lang('ALLOW_REMOTE'), $crawler->text());
+ $this->assertContains($this->lang('ALLOW_REMOTE_UPLOAD'), $crawler->text());
$this->assertContains($this->lang('ALLOW_AVATARS'), $crawler->text());
$this->assertContains($this->lang('ALLOW_LOCAL'), $crawler->text());
@@ -50,13 +72,10 @@ abstract class phpbb_functional_common_groups_test extends phpbb_functional_test
*/
public function test_groups_manage($input, $expected)
{
- $this->login();
- $this->admin_login();
- $this->add_lang(array('ucp', 'acp/groups'));
+ $this->group_manage_login();
// Manage Administrators group
- $crawler = self::request('GET', $this->get_url() . '&g=5&sid=' . $this->sid);
- $form = $crawler->selectButton($this->lang('SUBMIT'))->form();
+ $form = $this->get_group_manage_form();
$form['group_colour']->setValue($input);
$crawler = self::submit($form);
$this->assertContains($this->lang($expected), $crawler->text());
@@ -65,19 +84,19 @@ abstract class phpbb_functional_common_groups_test extends phpbb_functional_test
public function group_avatar_min_max_data()
{
return array(
- array('uploadurl', 'foo', 'TOO_SHORT'),
- array('uploadurl', 'foobar', 'AVATAR_URL_INVALID'),
- array('uploadurl', str_repeat('f', 256), 'TOO_LONG'),
- array('remotelink', 'foo', 'TOO_SHORT'),
- array('remotelink', 'foobar', 'AVATAR_URL_INVALID'),
- array('remotelink', str_repeat('f', 256), 'TOO_LONG'),
+ array('avatar_driver_upload', 'avatar_upload_url', 'foo', 'AVATAR_URL_INVALID'),
+ array('avatar_driver_upload', 'avatar_upload_url', 'foobar', 'AVATAR_URL_INVALID'),
+ array('avatar_driver_upload', 'avatar_upload_url', 'http://www.phpbb.com/' . str_repeat('f', 240) . '.png', 'TOO_LONG'),
+ array('avatar_driver_remote', 'avatar_remote_url', 'foo', 'AVATAR_URL_INVALID'),
+ array('avatar_driver_remote', 'avatar_remote_url', 'foobar', 'AVATAR_URL_INVALID'),
+ array('avatar_driver_remote', 'avatar_remote_url', 'http://www.phpbb.com/' . str_repeat('f', 240) . '.png', 'TOO_LONG'),
);
}
/**
* @dataProvider group_avatar_min_max_data
*/
- public function test_group_avatar_min_max($form_name, $input, $expected)
+ public function test_group_avatar_min_max($avatar_type, $form_name, $input, $expected)
{
$this->login();
$this->admin_login();
@@ -86,6 +105,7 @@ abstract class phpbb_functional_common_groups_test extends phpbb_functional_test
$crawler = self::request('GET', $this->get_url() . '&g=5&sid=' . $this->sid);
$form = $crawler->selectButton($this->lang('SUBMIT'))->form();
+ $form['avatar_driver']->setValue($avatar_type);
$form[$form_name]->setValue($input);
$crawler = self::submit($form);
$this->assertContains($this->lang($expected), $crawler->text());
diff --git a/tests/functional/download_test.php b/tests/functional/download_test.php
new file mode 100644
index 0000000000..24366992d5
--- /dev/null
+++ b/tests/functional/download_test.php
@@ -0,0 +1,345 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2014 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php';
+require_once dirname(__FILE__) . '/../../phpBB/includes/functions_content.php';
+require_once dirname(__FILE__) . '/../../phpBB/includes/functions_posting.php';
+require_once dirname(__FILE__) . '/../../phpBB/includes/utf/utf_tools.php';
+
+/**
+* @group functional
+*/
+class phpbb_functional_download_test extends phpbb_functional_test_case
+{
+ protected $data = array();
+
+ public function test_setup_forums()
+ {
+ $this->login();
+ $this->admin_login();
+
+ $crawler = self::request('GET', "adm/index.php?i=acp_forums&mode=manage&sid={$this->sid}");
+ $form = $crawler->selectButton('addforum')->form(array(
+ 'forum_name' => 'Download #1',
+ ));
+ $crawler = self::submit($form);
+ $form = $crawler->selectButton('update')->form(array(
+ 'forum_perm_from' => 2,
+ ));
+ $crawler = self::submit($form);
+ }
+
+ public function test_create_post()
+ {
+ $this->login();
+ $this->load_ids(array(
+ 'forums' => array(
+ 'Download #1',
+ ),
+ ));
+
+ // Test creating topic
+ $post = $this->create_topic($this->data['forums']['Download #1'], 'Download Topic #1', 'This is a test topic posted by the testing framework.', array('upload_files' => 1));
+ $crawler = self::request('GET', "viewtopic.php?t={$post['topic_id']}&sid={$this->sid}");
+
+ $this->assertContains('Download Topic #1', $crawler->filter('html')->text());
+ $this->data['topics']['Download Topic #1'] = (int) $post['topic_id'];
+ $this->data['posts']['Download Topic #1'] = (int) $this->get_parameter_from_link($crawler->filter('.post')->selectLink($this->lang('POST', '', ''))->link()->getUri(), 'p');
+
+ // Test creating a reply
+ $post2 = $this->create_post($this->data['forums']['Download #1'], $post['topic_id'], 'Re: Download Topic #1-#2', 'This is a test post posted by the testing framework.', array('upload_files' => 1));
+ $crawler = self::request('GET', "viewtopic.php?t={$post2['topic_id']}&sid={$this->sid}");
+
+ $this->assertContains('Re: Download Topic #1-#2', $crawler->filter('html')->text());
+ $this->data['posts']['Re: Download Topic #1-#2'] = (int) $this->get_parameter_from_link($crawler->filter('.post')->eq(1)->selectLink($this->lang('POST', '', ''))->link()->getUri(), 'p');
+ }
+
+ public function test_download_accessible()
+ {
+ $this->load_ids(array(
+ 'forums' => array(
+ 'Download #1',
+ ),
+ 'topics' => array(
+ 'Download Topic #1',
+ ),
+ 'posts' => array(
+ 'Download Topic #1',
+ 'Re: Download Topic #1-#2',
+ ),
+ 'attachments' => true,
+ ));
+
+ // Download topic archive as guest
+ $crawler = self::request('GET', "download/file.php?archive=.zip&topic_id={$this->data['topics']['Download Topic #1']}", array(), false);
+ self::assert_response_status_code(200);
+ $content = self::$client->getResponse()->getContent();
+ $finfo = new finfo(FILEINFO_MIME_TYPE);
+ self::assertEquals('application/zip', $finfo->buffer($content));
+
+ // Download post archive as guest
+ $crawler = self::request('GET', "download/file.php?archive=.zip&post_id={$this->data['posts']['Re: Download Topic #1-#2']}", array(), false);
+ self::assert_response_status_code(200);
+ $content = self::$client->getResponse()->getContent();
+ $finfo = new finfo(FILEINFO_MIME_TYPE);
+ self::assertEquals('application/zip', $finfo->buffer($content));
+
+ // Download attachment as guest
+ $crawler = self::request('GET', "download/file.php?id={$this->data['attachments'][$this->data['posts']['Re: Download Topic #1-#2']]}", array(), false);
+ self::assert_response_status_code(200);
+ $content = self::$client->getResponse()->getContent();
+ $finfo = new finfo(FILEINFO_MIME_TYPE);
+ self::assertEquals('image/jpeg', $finfo->buffer($content));
+ }
+
+ public function test_softdelete_post()
+ {
+ $this->login();
+ $this->load_ids(array(
+ 'forums' => array(
+ 'Download #1',
+ ),
+ 'topics' => array(
+ 'Download Topic #1',
+ ),
+ 'posts' => array(
+ 'Download Topic #1',
+ 'Re: Download Topic #1-#2',
+ ),
+ ));
+ $this->add_lang('posting');
+
+ $crawler = self::request('GET', "posting.php?mode=delete&f={$this->data['forums']['Download #1']}&p={$this->data['posts']['Re: Download Topic #1-#2']}&sid={$this->sid}");
+ $this->assertContainsLang('DELETE_PERMANENTLY', $crawler->text());
+
+ $form = $crawler->selectButton('Yes')->form();
+ $crawler = self::submit($form);
+ $this->assertContainsLang('POST_DELETED', $crawler->text());
+
+ $crawler = self::request('GET', "viewtopic.php?t={$this->data['topics']['Download Topic #1']}&sid={$this->sid}");
+ $this->assertContains($this->lang('POST_DISPLAY', '', ''), $crawler->text());
+ }
+
+ public function test_download_softdeleted_post()
+ {
+ $this->load_ids(array(
+ 'forums' => array(
+ 'Download #1',
+ ),
+ 'topics' => array(
+ 'Download Topic #1',
+ ),
+ 'posts' => array(
+ 'Download Topic #1',
+ 'Re: Download Topic #1-#2',
+ ),
+ 'attachments' => true,
+ ));
+ $this->add_lang('viewtopic');
+
+ // Download topic archive as guest: still works
+ $crawler = self::request('GET', "download/file.php?archive=.zip&topic_id={$this->data['topics']['Download Topic #1']}", array(), false);
+ self::assert_response_status_code(200);
+ $content = self::$client->getResponse()->getContent();
+ $finfo = new finfo(FILEINFO_MIME_TYPE);
+ self::assertEquals('application/zip', $finfo->buffer($content));
+
+ // No download post archive as guest
+ $crawler = self::request('GET', "download/file.php?archive=.zip&post_id={$this->data['posts']['Re: Download Topic #1-#2']}", array(), false);
+ self::assert_response_html(404);
+ $this->assertContainsLang('ERROR_NO_ATTACHMENT', $crawler->filter('#message')->text());
+
+ // No download attachment as guest
+ $crawler = self::request('GET', "download/file.php?id={$this->data['attachments'][$this->data['posts']['Re: Download Topic #1-#2']]}", array(), false);
+ self::assert_response_html(404);
+ $this->assertContainsLang('ERROR_NO_ATTACHMENT', $crawler->filter('#message')->text());
+
+ // Login as admin and try again, should work now.
+ $this->login();
+
+ // Download topic archive as admin
+ $crawler = self::request('GET', "download/file.php?archive=.zip&topic_id={$this->data['topics']['Download Topic #1']}", array(), false);
+ self::assert_response_status_code(200);
+ $content = self::$client->getResponse()->getContent();
+ $finfo = new finfo(FILEINFO_MIME_TYPE);
+ self::assertEquals('application/zip', $finfo->buffer($content));
+
+ // Download post archive as admin
+ $crawler = self::request('GET', "download/file.php?archive=.zip&post_id={$this->data['posts']['Re: Download Topic #1-#2']}", array(), false);
+ self::assert_response_status_code(200);
+ $content = self::$client->getResponse()->getContent();
+ $finfo = new finfo(FILEINFO_MIME_TYPE);
+ self::assertEquals('application/zip', $finfo->buffer($content));
+
+ // Download attachment as admin
+ $crawler = self::request('GET', "download/file.php?id={$this->data['attachments'][$this->data['posts']['Re: Download Topic #1-#2']]}", array(), false);
+ self::assert_response_status_code(200);
+ $content = self::$client->getResponse()->getContent();
+ $finfo = new finfo(FILEINFO_MIME_TYPE);
+ self::assertEquals('image/jpeg', $finfo->buffer($content));
+ }
+
+ public function test_softdelete_topic()
+ {
+ $this->login();
+ $this->load_ids(array(
+ 'forums' => array(
+ 'Download #1',
+ ),
+ 'topics' => array(
+ 'Download Topic #1',
+ ),
+ 'posts' => array(
+ 'Download Topic #1',
+ 'Re: Download Topic #1-#2',
+ ),
+ ));
+
+ $crawler = self::request('GET', "viewtopic.php?t={$this->data['topics']['Download Topic #1']}&sid={$this->sid}");
+
+ $this->add_lang('posting');
+ $form = $crawler->selectButton('Go')->eq(2)->form();
+ $form['action']->select('delete_topic');
+ $crawler = self::submit($form);
+ $this->assertContainsLang('DELETE_PERMANENTLY', $crawler->text());
+
+ $this->add_lang('mcp');
+ $form = $crawler->selectButton('Yes')->form();
+ $crawler = self::submit($form);
+ $this->assertContainsLang('TOPIC_DELETED_SUCCESS', $crawler->text());
+
+ $crawler = self::request('GET', "viewtopic.php?t={$this->data['topics']['Download Topic #1']}&sid={$this->sid}");
+ $this->assertContains('Download Topic #1', $crawler->filter('h2')->text());
+ }
+
+ public function test_download_softdeleted_topic()
+ {
+ $this->load_ids(array(
+ 'forums' => array(
+ 'Download #1',
+ ),
+ 'topics' => array(
+ 'Download Topic #1',
+ ),
+ 'posts' => array(
+ 'Download Topic #1',
+ 'Re: Download Topic #1-#2',
+ ),
+ 'attachments' => true,
+ ));
+ $this->add_lang('viewtopic');
+
+ // Download topic archive as guest: still works
+ $crawler = self::request('GET', "download/file.php?archive=.zip&topic_id={$this->data['topics']['Download Topic #1']}", array(), false);
+ self::assert_response_html(404);
+ $this->assertContainsLang('ERROR_NO_ATTACHMENT', $crawler->filter('#message')->text());
+
+ // No download post archive as guest
+ $crawler = self::request('GET', "download/file.php?archive=.zip&post_id={$this->data['posts']['Re: Download Topic #1-#2']}", array(), false);
+ self::assert_response_html(404);
+ $this->assertContainsLang('ERROR_NO_ATTACHMENT', $crawler->filter('#message')->text());
+
+ // No download attachment as guest
+ $crawler = self::request('GET', "download/file.php?id={$this->data['attachments'][$this->data['posts']['Re: Download Topic #1-#2']]}", array(), false);
+ self::assert_response_html(404);
+ $this->assertContainsLang('ERROR_NO_ATTACHMENT', $crawler->filter('#message')->text());
+
+ // Login as admin and try again, should work now.
+ $this->login();
+
+ // Download topic archive as admin
+ $crawler = self::request('GET', "download/file.php?archive=.zip&topic_id={$this->data['topics']['Download Topic #1']}", array(), false);
+ self::assert_response_status_code(200);
+ $content = self::$client->getResponse()->getContent();
+ $finfo = new finfo(FILEINFO_MIME_TYPE);
+ self::assertEquals('application/zip', $finfo->buffer($content));
+
+ // Download post archive as admin
+ $crawler = self::request('GET', "download/file.php?archive=.zip&post_id={$this->data['posts']['Re: Download Topic #1-#2']}", array(), false);
+ self::assert_response_status_code(200);
+ $content = self::$client->getResponse()->getContent();
+ $finfo = new finfo(FILEINFO_MIME_TYPE);
+ self::assertEquals('application/zip', $finfo->buffer($content));
+
+ // Download attachment as admin
+ $crawler = self::request('GET', "download/file.php?id={$this->data['attachments'][$this->data['posts']['Re: Download Topic #1-#2']]}", array(), false);
+ self::assert_response_status_code(200);
+ $content = self::$client->getResponse()->getContent();
+ $finfo = new finfo(FILEINFO_MIME_TYPE);
+ self::assertEquals('image/jpeg', $finfo->buffer($content));
+ }
+
+ public function load_ids($data)
+ {
+ $this->db = $this->get_db();
+
+ if (!empty($data['forums']))
+ {
+ $sql = 'SELECT *
+ FROM phpbb_forums
+ WHERE ' . $this->db->sql_in_set('forum_name', $data['forums']);
+ $result = $this->db->sql_query($sql);
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ if (in_array($row['forum_name'], $data['forums']))
+ {
+ $this->data['forums'][$row['forum_name']] = (int) $row['forum_id'];
+ }
+ }
+ $this->db->sql_freeresult($result);
+ }
+
+ if (!empty($data['topics']))
+ {
+ $sql = 'SELECT *
+ FROM phpbb_topics
+ WHERE ' . $this->db->sql_in_set('topic_title', $data['topics']);
+ $result = $this->db->sql_query($sql);
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ if (in_array($row['topic_title'], $data['topics']))
+ {
+ $this->data['topics'][$row['topic_title']] = (int) $row['topic_id'];
+ }
+ }
+ $this->db->sql_freeresult($result);
+ }
+
+ $post_ids = array();
+ if (!empty($data['posts']))
+ {
+ $sql = 'SELECT *
+ FROM phpbb_posts
+ WHERE ' . $this->db->sql_in_set('post_subject', $data['posts']);
+ $result = $this->db->sql_query($sql);
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ if (in_array($row['post_subject'], $data['posts']))
+ {
+ $this->data['posts'][$row['post_subject']] = (int) $row['post_id'];
+ $post_ids[] = (int) $row['post_id'];
+ }
+ }
+ $this->db->sql_freeresult($result);
+
+ if (isset($data['attachments']))
+ {
+ $sql = 'SELECT *
+ FROM phpbb_attachments
+ WHERE in_message = 0 AND ' . $this->db->sql_in_set('post_msg_id', $post_ids);
+ $result = $this->db->sql_query($sql);
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ $this->data['attachments'][(int) $row['post_msg_id']] = (int) $row['attach_id'];
+ }
+ $this->db->sql_freeresult($result);
+ }
+ }
+ }
+}
diff --git a/tests/functional/extension_acp_test.php b/tests/functional/extension_acp_test.php
new file mode 100644
index 0000000000..1d79043eae
--- /dev/null
+++ b/tests/functional/extension_acp_test.php
@@ -0,0 +1,227 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2011 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+/**
+* @group functional
+*/
+class phpbb_functional_extension_acp_test extends phpbb_functional_test_case
+{
+ static private $helper;
+
+ static protected $fixtures = array(
+ './',
+ );
+
+ static public function setUpBeforeClass()
+ {
+ parent::setUpBeforeClass();
+
+ self::$helper = new phpbb_test_case_helpers(self);
+ self::$helper->copy_ext_fixtures(dirname(__FILE__) . '/../extension/ext/', self::$fixtures);
+ }
+
+ static public function tearDownAfterClass()
+ {
+ parent::tearDownAfterClass();
+
+ self::$helper->restore_original_ext_dir();
+ }
+
+ public function setUp()
+ {
+ parent::setUp();
+
+ $this->get_db();
+
+ // Clear the phpbb_ext table
+ $this->db->sql_query('DELETE FROM phpbb_ext');
+
+ // Insert our base data
+ $insert_rows = array(
+ array(
+ 'ext_name' => 'vendor2/foo',
+ 'ext_active' => true,
+ 'ext_state' => 'b:0;',
+ ),
+ array(
+ 'ext_name' => 'vendor/moo',
+ 'ext_active' => false,
+ 'ext_state' => 'b:0;',
+ ),
+
+ // do not exist
+ array(
+ 'ext_name' => 'vendor/test2',
+ 'ext_active' => true,
+ 'ext_state' => 'b:0;',
+ ),
+ array(
+ 'ext_name' => 'vendor/test3',
+ 'ext_active' => false,
+ 'ext_state' => 'b:0;',
+ ),
+ );
+ $this->db->sql_multi_insert('phpbb_ext', $insert_rows);
+
+ $this->login();
+ $this->admin_login();
+
+ $this->add_lang('acp/extensions');
+ }
+
+ public function test_list()
+ {
+ $crawler = self::request('GET', 'adm/index.php?i=acp_extensions&mode=main&sid=' . $this->sid);
+
+ $this->assertCount(1, $crawler->filter('.ext_enabled'));
+ $this->assertCount(4, $crawler->filter('.ext_disabled'));
+
+ $this->assertContains('phpBB Foo Extension', $crawler->filter('.ext_enabled')->eq(0)->text());
+ $this->assertContainsLang('EXTENSION_DISABLE', $crawler->filter('.ext_enabled')->eq(0)->text());
+
+ $this->assertContains('phpBB Moo Extension', $crawler->filter('.ext_disabled')->eq(1)->text());
+ $this->assertContainsLang('DETAILS', $crawler->filter('.ext_disabled')->eq(1)->text());
+ $this->assertContainsLang('EXTENSION_ENABLE', $crawler->filter('.ext_disabled')->eq(1)->text());
+ $this->assertContainsLang('EXTENSION_DELETE_DATA', $crawler->filter('.ext_disabled')->eq(1)->text());
+
+ $this->assertContains('The “vendor/test2” extension is not valid.', $crawler->filter('.ext_disabled')->eq(0)->text());
+
+ $this->assertContains('The “vendor/test3” extension is not valid.', $crawler->filter('.ext_disabled')->eq(2)->text());
+
+ $this->assertContains('phpBB Bar Extension', $crawler->filter('.ext_disabled')->eq(3)->text());
+ $this->assertContainsLang('DETAILS', $crawler->filter('.ext_disabled')->eq(3)->text());
+ $this->assertContainsLang('EXTENSION_ENABLE', $crawler->filter('.ext_disabled')->eq(3)->text());
+
+ // Check that invalid extensions are not listed.
+ $this->assertNotContains('phpBB BarFoo Extension', $crawler->filter('.table1')->text());
+ $this->assertNotContains('barfoo', $crawler->filter('.table1')->text());
+
+ $this->assertNotContains('vendor3/bar', $crawler->filter('.table1')->text());
+ }
+
+ public function test_details()
+ {
+ $crawler = self::request('GET', 'adm/index.php?i=acp_extensions&mode=main&action=details&ext_name=vendor2%2Ffoo&sid=' . $this->sid);
+
+ $validation = array(
+ 'DISPLAY_NAME' => 'phpBB Foo Extension',
+ 'CLEAN_NAME' => 'vendor2/foo',
+ 'TYPE' => 'phpbb-extension',
+ 'DESCRIPTION' => 'An example/sample extension to be used for testing purposes in phpBB Development.',
+ 'VERSION' => '1.0.0',
+ 'TIME' => '2012-02-15 01:01:01',
+ 'LICENSE' => 'GPL-2.0',
+ 'PHPBB_VERSION' => '3.1.*@dev',
+ 'PHP_VERSION' => '>=5.3',
+ 'AUTHOR_NAME' => 'John Smith',
+ 'AUTHOR_EMAIL' => 'email@phpbb.com',
+ 'AUTHOR_HOMEPAGE' => 'http://phpbb.com',
+ 'AUTHOR_ROLE' => 'N/A',
+ );
+
+ for ($i = 0; $i < $crawler->filter('dl')->count(); $i++)
+ {
+ $text = $crawler->filter('dl')->eq($i)->text();
+
+ $match = false;
+
+ foreach ($validation as $language_key => $expected)
+ {
+ if (strpos($text, $this->lang($language_key)) === 0)
+ {
+ $match = true;
+
+ $this->assertContains($expected, $text);
+ }
+ }
+
+ if (!$match)
+ {
+ $this->fail('Unexpected field: "' . $text . '"');
+ }
+ }
+ }
+
+ public function test_enable_pre()
+ {
+ // Foo is already enabled (redirect to list)
+ $crawler = self::request('GET', 'adm/index.php?i=acp_extensions&mode=main&action=enable_pre&ext_name=vendor2%2Ffoo&sid=' . $this->sid);
+ $this->assertContainsLang('EXTENSION_NAME', $crawler->filter('div.main thead')->text());
+ $this->assertContainsLang('EXTENSION_OPTIONS', $crawler->filter('div.main thead')->text());
+ $this->assertContainsLang('EXTENSION_ACTIONS', $crawler->filter('div.main thead')->text());
+
+ $crawler = self::request('GET', 'adm/index.php?i=acp_extensions&mode=main&action=enable_pre&ext_name=vendor%2Fmoo&sid=' . $this->sid);
+ $this->assertContains($this->lang('EXTENSION_ENABLE_CONFIRM', 'phpBB Moo Extension'), $crawler->filter('.errorbox')->text());
+ }
+
+ public function test_disable_pre()
+ {
+ // Moo is not enabled (redirect to list)
+ $crawler = self::request('GET', 'adm/index.php?i=acp_extensions&mode=main&action=disable_pre&ext_name=vendor%2Fmoo&sid=' . $this->sid);
+ $this->assertContainsLang('EXTENSION_NAME', $crawler->filter('div.main thead')->text());
+ $this->assertContainsLang('EXTENSION_OPTIONS', $crawler->filter('div.main thead')->text());
+ $this->assertContainsLang('EXTENSION_ACTIONS', $crawler->filter('div.main thead')->text());
+
+ $crawler = self::request('GET', 'adm/index.php?i=acp_extensions&mode=main&action=disable_pre&ext_name=vendor2%2Ffoo&sid=' . $this->sid);
+ $this->assertContains($this->lang('EXTENSION_DISABLE_CONFIRM', 'phpBB Foo Extension'), $crawler->filter('.errorbox')->text());
+ }
+
+ public function test_delete_data_pre()
+ {
+ // test2 is not available (error)
+ $crawler = self::request('GET', 'adm/index.php?i=acp_extensions&mode=main&action=delete_data_pre&ext_name=test2&sid=' . $this->sid);
+ $this->assertContains('The required file does not exist', $crawler->filter('.errorbox')->text());
+
+ // foo is not disabled (redirect to list)
+ $crawler = self::request('GET', 'adm/index.php?i=acp_extensions&mode=main&action=delete_data_pre&ext_name=vendor2%2Ffoo&sid=' . $this->sid);
+ $this->assertContainsLang('EXTENSION_NAME', $crawler->filter('div.main thead')->text());
+ $this->assertContainsLang('EXTENSION_OPTIONS', $crawler->filter('div.main thead')->text());
+ $this->assertContainsLang('EXTENSION_ACTIONS', $crawler->filter('div.main thead')->text());
+
+ $crawler = self::request('GET', 'adm/index.php?i=acp_extensions&mode=main&action=delete_data_pre&ext_name=vendor%2Fmoo&sid=' . $this->sid);
+ $this->assertContains('Are you sure that you wish to delete the data associated with “phpBB Moo Extension”?', $crawler->filter('.errorbox')->text());
+ }
+
+ public function test_actions()
+ {
+ // Access enable page without hash
+ $crawler = self::request('GET', 'adm/index.php?i=acp_extensions&mode=main&action=enable&ext_name=vendor%2Fmoo&sid=' . $this->sid);
+ $this->assertContainsLang('FORM_INVALID', $crawler->filter('.errorbox')->text());
+
+ // Correctly submit the enable form
+ $crawler = self::request('GET', 'adm/index.php?i=acp_extensions&mode=main&action=enable_pre&ext_name=vendor%2Fmoo&sid=' . $this->sid);
+ $form = $crawler->selectButton('enable')->form();
+ $crawler = self::submit($form);
+ $this->assertContainsLang('EXTENSION_ENABLE_SUCCESS', $crawler->filter('.successbox')->text());
+
+ // Access disable page without hash
+ $crawler = self::request('GET', 'adm/index.php?i=acp_extensions&mode=main&action=disable&ext_name=vendor%2Fmoo&sid=' . $this->sid);
+ $this->assertContainsLang('FORM_INVALID', $crawler->filter('.errorbox')->text());
+
+ // Correctly submit the disable form
+ $crawler = self::request('GET', 'adm/index.php?i=acp_extensions&mode=main&action=disable_pre&ext_name=vendor%2Fmoo&sid=' . $this->sid);
+ $form = $crawler->selectButton('disable')->form();
+ $crawler = self::submit($form);
+ $this->assertContainsLang('EXTENSION_DISABLE_SUCCESS', $crawler->filter('.successbox')->text());
+
+ // Access delete_data page without hash
+ $crawler = self::request('GET', 'adm/index.php?i=acp_extensions&mode=main&action=delete_data&ext_name=vendor%2Fmoo&sid=' . $this->sid);
+ $this->assertContainsLang('FORM_INVALID', $crawler->filter('.errorbox')->text());
+
+ // Correctly submit the delete data form
+ $crawler = self::request('GET', 'adm/index.php?i=acp_extensions&mode=main&action=delete_data_pre&ext_name=vendor%2Fmoo&sid=' . $this->sid);
+ $form = $crawler->selectButton('delete_data')->form();
+ $crawler = self::submit($form);
+ $this->assertContainsLang('EXTENSION_DELETE_DATA_SUCCESS', $crawler->filter('.successbox')->text());
+
+ // Attempt to enable invalid extension
+ $crawler = self::request('GET', 'adm/index.php?i=acp_extensions&mode=main&action=enable_pre&ext_name=barfoo&sid=' . $this->sid);
+ $this->assertContainsLang('EXTENSION_DIR_INVALID', $crawler->filter('.errorbox')->text());
+ }
+}
diff --git a/tests/functional/extension_controller_test.php b/tests/functional/extension_controller_test.php
new file mode 100644
index 0000000000..57b0f56bee
--- /dev/null
+++ b/tests/functional/extension_controller_test.php
@@ -0,0 +1,163 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2011 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+/**
+* @group functional
+*/
+class phpbb_functional_extension_controller_test extends phpbb_functional_test_case
+{
+ protected $phpbb_extension_manager;
+
+ static private $helper;
+
+ static protected $fixtures = array(
+ 'foo/bar/config/',
+ 'foo/bar/controller/',
+ 'foo/bar/event/',
+ 'foo/bar/language/en/',
+ 'foo/bar/styles/prosilver/template/',
+ );
+
+ static public function setUpBeforeClass()
+ {
+ parent::setUpBeforeClass();
+
+ self::$helper = new phpbb_test_case_helpers(self);
+ self::$helper->copy_ext_fixtures(dirname(__FILE__) . '/fixtures/ext/', self::$fixtures);
+ }
+
+ static public function tearDownAfterClass()
+ {
+ parent::tearDownAfterClass();
+
+ self::$helper->restore_original_ext_dir();
+ }
+
+ public function setUp()
+ {
+ parent::setUp();
+
+ $this->phpbb_extension_manager = $this->get_extension_manager();
+
+ $this->purge_cache();
+ }
+
+ /**
+ * Check a controller for extension foo/bar.
+ */
+ public function test_foo_bar()
+ {
+ $this->phpbb_extension_manager->enable('foo/bar');
+ $crawler = self::request('GET', 'app.php/foo/bar', array(), false);
+ self::assert_response_status_code();
+ $this->assertContains("foo/bar controller handle() method", $crawler->filter('body')->text());
+ $this->phpbb_extension_manager->purge('foo/bar');
+ }
+
+ /**
+ * Check the output of a controller using the template system
+ */
+ public function test_controller_with_template()
+ {
+ $this->phpbb_extension_manager->enable('foo/bar');
+ $crawler = self::request('GET', 'app.php/foo/template');
+ $this->assertContains("I am a variable", $crawler->filter('#content')->text());
+ $this->phpbb_extension_manager->purge('foo/bar');
+ }
+
+ /**
+ * Check the error produced by calling a controller without a required
+ * argument.
+ */
+ public function test_missing_argument()
+ {
+ $this->phpbb_extension_manager->enable('foo/bar');
+ $crawler = self::request('GET', 'app.php/foo/baz', array(), false);
+ $this->assert_response_html(500);
+ $this->assertContains('Missing value for argument #1: test in class foo\bar\controller\controller:baz', $crawler->filter('body')->text());
+ $this->phpbb_extension_manager->purge('foo/bar');
+ }
+
+ /**
+ * Check the status code resulting from an exception thrown by a controller
+ */
+ public function test_exception_should_result_in_500_status_code()
+ {
+ $this->phpbb_extension_manager->enable('foo/bar');
+ $crawler = self::request('GET', 'app.php/foo/exception', array(), false);
+ $this->assert_response_html(500);
+ $this->assertContains('Exception thrown from foo/exception route', $crawler->filter('body')->text());
+ $this->phpbb_extension_manager->purge('foo/bar');
+ }
+
+ /**
+ * Check the error produced by extension at ./ext/does/not/exist.
+ *
+ * If an extension is disabled, its routes are not loaded. Because we
+ * are not looking for a controller based on a specified extension,
+ * we don't know the difference between a route in a disabled
+ * extension and a route that is not defined anyway; it is the same
+ * error message.
+ */
+ public function test_error_ext_disabled_or_404()
+ {
+ $crawler = self::request('GET', 'app.php/does/not/exist', array(), false);
+ $this->assert_response_html(404);
+ $this->assertContains('No route found for "GET /does/not/exist"', $crawler->filter('body')->text());
+ }
+
+ /**
+ * Check the redirect after using the login_box() form
+ */
+ public function test_login_redirect()
+ {
+ $this->markTestIncomplete('Session table contains incorrect data for controllers on travis,'
+ . 'therefor the redirect fails.');
+
+ $this->phpbb_extension_manager->enable('foo/bar');
+ $crawler = self::request('GET', 'app.php/foo/login_redirect');
+ $this->assertContainsLang('LOGIN', $crawler->filter('h2')->text());
+ $form = $crawler->selectButton('login')->form(array(
+ 'username' => 'admin',
+ 'password' => 'adminadmin',
+ ));
+ $this->assertStringStartsWith('./app.php/foo/login_redirect', $form->get('redirect')->getValue());
+
+ $crawler = self::submit($form);
+ $this->assertContains("I am a variable", $crawler->filter('#content')->text(), 'Unsuccessful redirect after using login_box()');
+ $this->phpbb_extension_manager->purge('foo/bar');
+ }
+
+ /**
+ * Check the output of a controller using the template system
+ */
+ public function test_redirect()
+ {
+ $this->phpbb_extension_manager->enable('foo/bar');
+ $crawler = self::request('GET', 'app.php/foo/redirect');
+
+ $nodes = $crawler->filter('div')->extract(array('id'));
+
+ foreach ($nodes as $redirect)
+ {
+ if (strpos($redirect, 'redirect_expected') !== 0)
+ {
+ continue;
+ }
+
+ $row_num = str_replace('redirect_expected_', '', $redirect);
+
+ $redirect = $crawler->filter('#redirect_' . $row_num)->text();
+ $redirect = substr($redirect, 0, strpos($redirect, 'sid') - 1);
+ $this->assertEquals($crawler->filter('#redirect_expected_' . $row_num)->text(), $redirect);
+ }
+
+ $this->phpbb_extension_manager->purge('foo/bar');
+ }
+}
diff --git a/tests/functional/extension_global_lang_test.php b/tests/functional/extension_global_lang_test.php
new file mode 100644
index 0000000000..094eda8257
--- /dev/null
+++ b/tests/functional/extension_global_lang_test.php
@@ -0,0 +1,64 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+/**
+* @group functional
+*/
+class phpbb_functional_extension_global_lang_test extends phpbb_functional_test_case
+{
+ protected $phpbb_extension_manager;
+
+ static private $helper;
+
+ static protected $fixtures = array(
+ 'foo/bar/config/',
+ 'foo/bar/event/',
+ 'foo/bar/language/en/',
+ );
+
+ static public function setUpBeforeClass()
+ {
+ parent::setUpBeforeClass();
+
+ self::$helper = new phpbb_test_case_helpers(self);
+ self::$helper->copy_ext_fixtures(dirname(__FILE__) . '/fixtures/ext/', self::$fixtures);
+ }
+
+ static public function tearDownAfterClass()
+ {
+ parent::tearDownAfterClass();
+
+ self::$helper->restore_original_ext_dir();
+ }
+
+ public function setUp()
+ {
+ parent::setUp();
+
+ $this->get_db();
+
+ $this->phpbb_extension_manager = $this->get_extension_manager();
+
+ $this->purge_cache();
+ }
+
+ public function test_load_extension_lang_globally()
+ {
+ $this->phpbb_extension_manager->enable('foo/bar');
+
+ // The board index, which should contain an overwritten translation
+ $crawler = self::request('GET', 'index.php');
+
+ // language from language/en/common.php
+ $this->assertNotContains('Skip to content', $crawler->filter('.skiplink')->text());
+
+ // language from ext/foo/bar/language/en/foo_global.php
+ $this->assertContains('Overwritten by foo', $crawler->filter('.skiplink')->text());
+ }
+}
diff --git a/tests/functional/extension_module_test.php b/tests/functional/extension_module_test.php
new file mode 100644
index 0000000000..ba025d582e
--- /dev/null
+++ b/tests/functional/extension_module_test.php
@@ -0,0 +1,132 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+require_once dirname(__FILE__) . '/../../phpBB/includes/acp/acp_modules.php';
+
+/**
+* @group functional
+*/
+class phpbb_functional_extension_module_test extends phpbb_functional_test_case
+{
+ protected $phpbb_extension_manager;
+
+ static private $helper;
+
+ static protected $fixtures = array(
+ './',
+ );
+
+ static public function setUpBeforeClass()
+ {
+ parent::setUpBeforeClass();
+
+ self::$helper = new phpbb_test_case_helpers(self);
+ self::$helper->copy_ext_fixtures(dirname(__FILE__) . '/fixtures/ext/', self::$fixtures);
+ }
+
+ static public function tearDownAfterClass()
+ {
+ parent::tearDownAfterClass();
+
+ self::$helper->restore_original_ext_dir();
+ }
+
+ public function setUp()
+ {
+ global $db;
+
+ parent::setUp();
+
+ $this->phpbb_extension_manager = $this->get_extension_manager();
+ $this->phpbb_extension_manager->enable('foo/bar');
+
+ $modules = new acp_modules();
+ $db = $this->get_db();
+
+ $sql = 'SELECT module_id
+ FROM ' . MODULES_TABLE . "
+ WHERE module_langname = 'acp'
+ AND module_class = 'ACP_CAT_DOT_MODS'";
+ $result = $db->sql_query($sql);
+ $module_id = (int) $db->sql_fetchfield('module_id');
+ $db->sql_freeresult($result);
+
+ $parent_data = array(
+ 'module_basename' => '',
+ 'module_enabled' => 1,
+ 'module_display' => 1,
+ 'parent_id' => $module_id,
+ 'module_class' => 'acp',
+ 'module_langname' => 'ACP_FOOBAR_TITLE',
+ 'module_mode' => '',
+ 'module_auth' => '',
+ );
+ $modules->update_module_data($parent_data, true);
+
+ $module_data = array(
+ 'module_basename' => 'foo\\bar\\acp\\main_module',
+ 'module_enabled' => 1,
+ 'module_display' => 1,
+ 'parent_id' => $parent_data['module_id'],
+ 'module_class' => 'acp',
+ 'module_langname' => 'ACP_FOOBAR_TITLE',
+ 'module_mode' => 'mode',
+ 'module_auth' => '',
+ );
+ $modules->update_module_data($module_data, true);
+
+ $parent_data = array(
+ 'module_basename' => '',
+ 'module_enabled' => 1,
+ 'module_display' => 1,
+ 'parent_id' => 0,
+ 'module_class' => 'ucp',
+ 'module_langname' => 'UCP_FOOBAR_TITLE',
+ 'module_mode' => '',
+ 'module_auth' => '',
+ );
+ $modules->update_module_data($parent_data, true);
+
+ $module_data = array(
+ 'module_basename' => 'foo\\bar\\ucp\\main_module',
+ 'module_enabled' => 1,
+ 'module_display' => 1,
+ 'parent_id' => $parent_data['module_id'],
+ 'module_class' => 'ucp',
+ 'module_langname' => 'UCP_FOOBAR_TITLE',
+ 'module_mode' => 'mode',
+ 'module_auth' => '',
+ );
+ $modules->update_module_data($module_data, true);
+
+ $this->purge_cache();
+ }
+
+ public function test_acp()
+ {
+ $this->login();
+ $this->admin_login();
+
+ $crawler = self::request('GET', 'adm/index.php?i=foo%5cbar%5cacp%5cmain_module&mode=mode&sid=' . $this->sid);
+ $this->assertContains('Bertie rulez!', $crawler->filter('#main')->text());
+ }
+
+ public function test_ucp()
+ {
+ $this->login();
+
+ $crawler = self::request('GET', 'ucp.php?sid=' . $this->sid);
+ $this->assertContains('UCP_FOOBAR_TITLE', $crawler->filter('#tabs')->text());
+
+ $link = $crawler->selectLink('UCP_FOOBAR_TITLE')->link()->getUri();
+ $crawler = self::request('GET', substr($link, strpos($link, 'ucp.')));
+ $this->assertContains('UCP Extension Template Test Passed!', $crawler->filter('#content')->text());
+
+ $this->phpbb_extension_manager->purge('foo/bar');
+ }
+}
diff --git a/tests/functional/extension_permission_lang_test.php b/tests/functional/extension_permission_lang_test.php
new file mode 100644
index 0000000000..e922abdaf1
--- /dev/null
+++ b/tests/functional/extension_permission_lang_test.php
@@ -0,0 +1,82 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+/**
+* @group functional
+*/
+class phpbb_functional_extension_permission_lang_test extends phpbb_functional_test_case
+{
+ protected $phpbb_extension_manager;
+
+ static private $helper;
+
+ static protected $fixtures = array(
+ 'foo/bar/config/',
+ 'foo/bar/event/',
+ 'foo/bar/language/en/',
+ );
+
+ static public function setUpBeforeClass()
+ {
+ parent::setUpBeforeClass();
+
+ self::$helper = new phpbb_test_case_helpers(self);
+ self::$helper->copy_ext_fixtures(dirname(__FILE__) . '/fixtures/ext/', self::$fixtures);
+ }
+
+ static public function tearDownAfterClass()
+ {
+ parent::tearDownAfterClass();
+
+ self::$helper->restore_original_ext_dir();
+ }
+
+ public function setUp()
+ {
+ parent::setUp();
+
+ $this->get_db();
+
+ $acl_ary = array(
+ 'auth_option' => 'u_foo',
+ 'is_global' => 1,
+ );
+
+ $sql = 'INSERT INTO phpbb_acl_options ' . $this->db->sql_build_array('INSERT', $acl_ary);
+ $this->db->sql_query($sql);
+
+ $this->phpbb_extension_manager = $this->get_extension_manager();
+
+ $this->purge_cache();
+
+ $this->login();
+ $this->admin_login();
+ $this->add_lang('acp/permissions');
+ }
+
+ public function test_auto_include_permission_lang_from_extensions()
+ {
+ $this->phpbb_extension_manager->enable('foo/bar');
+
+ // User permissions
+ $crawler = self::request('GET', 'adm/index.php?i=acp_permissions&icat=16&mode=setting_user_global&sid=' . $this->sid);
+
+ // Select admin
+ $form = $crawler->selectButton($this->lang('SUBMIT'))->form();
+ $data = array('username[0]' => 'admin');
+ $form->setValues($data);
+ $crawler = self::submit($form);
+
+ // language from language/en/acp/permissions_phpbb.php
+ $this->assertContains('Can attach files', $crawler->filter('body')->text());
+
+ // language from ext/foo/bar/language/en/permissions_foo.php
+ $this->assertContains('Can view foobar', $crawler->filter('body')->text());
+ }
+}
diff --git a/tests/functional/fileupload_form_test.php b/tests/functional/fileupload_form_test.php
new file mode 100644
index 0000000000..c291712c71
--- /dev/null
+++ b/tests/functional/fileupload_form_test.php
@@ -0,0 +1,100 @@
+<?php
+/**
+ *
+ * @package testing
+ * @copyright (c) 2012 phpBB Group
+ * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+ *
+ */
+
+/**
+ * @group functional
+ */
+class phpbb_functional_fileupload_form_test extends phpbb_functional_test_case
+{
+ private $path;
+
+ public function setUp()
+ {
+ parent::setUp();
+ $this->path = __DIR__ . '/fixtures/files/';
+ $this->add_lang('posting');
+ }
+
+ public function tearDown()
+ {
+ $iterator = new DirectoryIterator(__DIR__ . '/../../phpBB/files/');
+ foreach ($iterator as $fileinfo)
+ {
+ if (
+ $fileinfo->isDot()
+ || $fileinfo->isDir()
+ || $fileinfo->getFilename() === 'index.htm'
+ || $fileinfo->getFilename() === '.htaccess'
+ )
+ {
+ continue;
+ }
+
+ unlink($fileinfo->getPathname());
+ }
+ }
+
+ private function upload_file($filename, $mimetype)
+ {
+ $file = array(
+ 'tmp_name' => $this->path . $filename,
+ 'name' => $filename,
+ 'type' => $mimetype,
+ 'size' => filesize($this->path . $filename),
+ 'error' => UPLOAD_ERR_OK,
+ );
+
+ $crawler = self::$client->request(
+ 'POST',
+ 'posting.php?mode=reply&f=2&t=1&sid=' . $this->sid,
+ array('add_file' => $this->lang('ADD_FILE')),
+ array('fileupload' => $file)
+ );
+
+ return $crawler;
+ }
+
+ public function test_empty_file()
+ {
+ $this->login();
+
+ $crawler = $this->upload_file('empty.png', 'image/png');
+ $this->assertEquals($this->lang('EMPTY_FILEUPLOAD'), $crawler->filter('p.error')->text());
+ }
+
+ public function test_invalid_extension()
+ {
+ $this->login();
+
+ $crawler = $this->upload_file('illegal-extension.bif', 'application/octet-stream');
+ $this->assertEquals($this->lang('DISALLOWED_EXTENSION', 'bif'), $crawler->filter('p.error')->text());
+ }
+
+ public function test_too_large()
+ {
+ $this->create_user('fileupload');
+ $this->login('fileupload');
+
+ $crawler = $this->upload_file('too-large.png', 'image/png');
+ $this->assertEquals($this->lang('WRONG_FILESIZE', '256', 'KiB'), $crawler->filter('p.error')->text());
+ }
+
+ public function test_valid_file()
+ {
+ $this->login();
+
+ $crawler = $this->upload_file('valid.jpg', 'image/jpeg');
+
+ // Ensure there was no error message rendered
+ $this->assertNotContains('<h2>' . $this->lang('INFORMATION') . '</h2>', $this->get_content());
+
+ // Also the file name should be in the first row of the files table
+ $this->assertEquals('valid.jpg', $crawler->filter('span.file-name')->eq(1)->text());
+ }
+}
diff --git a/tests/functional/fileupload_remote_test.php b/tests/functional/fileupload_remote_test.php
new file mode 100644
index 0000000000..65c4b6b7c4
--- /dev/null
+++ b/tests/functional/fileupload_remote_test.php
@@ -0,0 +1,73 @@
+<?php
+/**
+ *
+ * @package testing
+ * @copyright (c) 2012 phpBB Group
+ * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+ *
+ */
+
+/**
+ * @group functional
+ */
+class phpbb_functional_fileupload_remote_test extends phpbb_functional_test_case
+{
+ public function setUp()
+ {
+ parent::setUp();
+ // Only doing this within the functional framework because we need a
+ // URL
+
+ // Global $config required by unique_id
+ // Global $user required by fileupload::remote_upload
+ global $config, $user;
+
+ if (!is_array($config))
+ {
+ $config = array();
+ }
+
+ $config['rand_seed'] = '';
+ $config['rand_seed_last_update'] = time() + 600;
+
+ $user = new phpbb_mock_user();
+ $user->lang = new phpbb_mock_lang();
+ }
+
+ public function tearDown()
+ {
+ global $config, $user;
+ $user = null;
+ $config = array();
+ }
+
+ public function test_invalid_extension()
+ {
+ $upload = new fileupload('', array('jpg'), 100);
+ $file = $upload->remote_upload(self::$root_url . 'develop/blank.gif');
+ $this->assertEquals('URL_INVALID', $file->error[0]);
+ }
+
+ public function test_empty_file()
+ {
+ $upload = new fileupload('', array('jpg'), 100);
+ $file = $upload->remote_upload(self::$root_url . 'develop/blank.jpg');
+ $this->assertEquals('EMPTY_REMOTE_DATA', $file->error[0]);
+ }
+
+ public function test_successful_upload()
+ {
+ $upload = new fileupload('', array('gif'), 1000);
+ $file = $upload->remote_upload(self::$root_url . 'styles/prosilver/theme/images/forum_read.gif');
+ $this->assertEquals(0, sizeof($file->error));
+ $this->assertTrue(file_exists($file->filename));
+ }
+
+ public function test_too_large()
+ {
+ $upload = new fileupload('', array('gif'), 100);
+ $file = $upload->remote_upload(self::$root_url . 'styles/prosilver/theme/images/forum_read.gif');
+ $this->assertEquals(1, sizeof($file->error));
+ $this->assertEquals('WRONG_FILESIZE', $file->error[0]);
+ }
+}
diff --git a/tests/functional/fixtures/ext/foo/bar/acp/main_info.php b/tests/functional/fixtures/ext/foo/bar/acp/main_info.php
new file mode 100644
index 0000000000..2ad6d08503
--- /dev/null
+++ b/tests/functional/fixtures/ext/foo/bar/acp/main_info.php
@@ -0,0 +1,34 @@
+<?php
+
+/**
+*
+* @package testing
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace foo\bar\acp;
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+class main_info
+{
+ function module()
+ {
+ return array(
+ 'filename' => 'foo\bar\acp\main_module',
+ 'title' => 'ACP_FOOBAR_TITLE',
+ 'version' => '1.0.0',
+ 'modes' => array(
+ 'mode' => array('title' => 'ACP_FOOBAR_MODE', 'auth' => '', 'cat' => array('ACP_FOOBAR_TITLE')),
+ ),
+ );
+ }
+}
diff --git a/tests/functional/fixtures/ext/foo/bar/acp/main_module.php b/tests/functional/fixtures/ext/foo/bar/acp/main_module.php
new file mode 100644
index 0000000000..c59b3c6820
--- /dev/null
+++ b/tests/functional/fixtures/ext/foo/bar/acp/main_module.php
@@ -0,0 +1,30 @@
+<?php
+
+/**
+*
+* @package testing
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace foo\bar\acp;
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+class main_module
+{
+ var $u_action;
+
+ function main($id, $mode)
+ {
+ $this->tpl_name = 'foobar';
+ $this->page_title = 'Bertie';
+ }
+}
diff --git a/tests/functional/fixtures/ext/foo/bar/adm/style/foobar.html b/tests/functional/fixtures/ext/foo/bar/adm/style/foobar.html
new file mode 100644
index 0000000000..3cb45c269c
--- /dev/null
+++ b/tests/functional/fixtures/ext/foo/bar/adm/style/foobar.html
@@ -0,0 +1,3 @@
+<!-- INCLUDE overall_header.html -->
+Bertie rulez!
+<!-- INCLUDE overall_footer.html -->
diff --git a/tests/functional/fixtures/ext/foo/bar/composer.json b/tests/functional/fixtures/ext/foo/bar/composer.json
new file mode 100644
index 0000000000..2f91426d2a
--- /dev/null
+++ b/tests/functional/fixtures/ext/foo/bar/composer.json
@@ -0,0 +1,22 @@
+{
+ "name": "foo/bar",
+ "type": "phpbb-extension",
+ "description": "Testing extensions",
+ "homepage": "",
+ "version": "1.0.0",
+ "time": "2013-03-21 01:01:01",
+ "license": "GPL-2.0",
+ "authors": [{
+ "name": "Joas Schilling",
+ "email": "nickvergessen@phpbb.com",
+ "homepage": "http://www.phpbb.com",
+ "role": "Developer"
+ }],
+ "require": {
+ "php": ">=5.3",
+ "phpbb/phpbb": "3.1.*@dev"
+ },
+ "extra": {
+ "display-name": "phpBB 3.1 Extension Testing"
+ }
+}
diff --git a/tests/functional/fixtures/ext/foo/bar/config/routing.yml b/tests/functional/fixtures/ext/foo/bar/config/routing.yml
new file mode 100644
index 0000000000..08bc73038f
--- /dev/null
+++ b/tests/functional/fixtures/ext/foo/bar/config/routing.yml
@@ -0,0 +1,35 @@
+foo_bar_controller:
+ pattern: /foo/bar
+ defaults: { _controller: foo_bar.controller:handle }
+
+foo_baz_controller:
+ pattern: /foo/baz
+ defaults: { _controller: foo_bar.controller:baz }
+
+foo_template_controller:
+ pattern: /foo/template
+ defaults: { _controller: foo_bar.controller:template }
+
+foo_exception_controller:
+ pattern: /foo/exception
+ defaults: { _controller: foo_bar.controller:exception }
+
+foo_login_redirect_controller:
+ pattern: /foo/login_redirect
+ defaults: { _controller: foo_bar.controller:login_redirect }
+
+foo_redirect_controller:
+ pattern: /foo/redirect
+ defaults: { _controller: foo_bar.controller:redirect }
+
+foo_index_controller:
+ pattern: /index
+ defaults: { _controller: foo_bar.controller:redirect }
+
+foo_tests_index_controller:
+ pattern: /tests/index
+ defaults: { _controller: foo_bar.controller:redirect }
+
+foo_tests_dotdot_index_controller:
+ pattern: /tests/../index
+ defaults: { _controller: foo_bar.controller:redirect }
diff --git a/tests/functional/fixtures/ext/foo/bar/config/services.yml b/tests/functional/fixtures/ext/foo/bar/config/services.yml
new file mode 100644
index 0000000000..d35be7955a
--- /dev/null
+++ b/tests/functional/fixtures/ext/foo/bar/config/services.yml
@@ -0,0 +1,20 @@
+services:
+ foo_bar.controller:
+ class: foo\bar\controller\controller
+ arguments:
+ - @controller.helper
+ - @path_helper
+ - @template
+ - @config
+ - @user
+ - %core.root_path%
+ - %core.php_ext%
+
+ foo_bar.listener.permission:
+ class: foo\bar\event\permission
+ tags:
+ - { name: event.listener }
+ foo_bar.listener.user_setup:
+ class: foo\bar\event\user_setup
+ tags:
+ - { name: event.listener }
diff --git a/tests/functional/fixtures/ext/foo/bar/controller/controller.php b/tests/functional/fixtures/ext/foo/bar/controller/controller.php
new file mode 100644
index 0000000000..47d856a5df
--- /dev/null
+++ b/tests/functional/fixtures/ext/foo/bar/controller/controller.php
@@ -0,0 +1,109 @@
+<?php
+
+namespace foo\bar\controller;
+
+use Symfony\Component\HttpFoundation\Response;
+
+class controller
+{
+ protected $template;
+ protected $helper;
+ protected $path_helper;
+ protected $config;
+ protected $user;
+
+ public function __construct(\phpbb\controller\helper $helper, \phpbb\path_helper $path_helper, \phpbb\template\template $template, \phpbb\config\config $config, \phpbb\user $user, $root_path, $php_ext)
+ {
+ $this->template = $template;
+ $this->helper = $helper;
+ $this->path_helper = $path_helper;
+ $this->config = $config;
+ $this->user = $user;
+ $this->root_path = $root_path;
+ $this->php_ext = $php_ext;
+ }
+
+ public function handle()
+ {
+ return new Response('foo/bar controller handle() method', 200);
+ }
+
+ public function baz($test)
+ {
+ return new Response('Value of "test" URL argument is: ' . $test);
+ }
+
+ public function template()
+ {
+ $this->template->assign_var('A_VARIABLE', 'I am a variable');
+
+ return $this->helper->render('foo_bar_body.html');
+ }
+
+ public function exception()
+ {
+ throw new \phpbb\controller\exception('Exception thrown from foo/exception route');
+ }
+
+ public function login_redirect()
+ {
+ if (!$this->user->data['is_registered'])
+ {
+ login_box();
+ }
+
+ $this->template->assign_var('A_VARIABLE', 'I am a variable');
+
+ return $this->helper->render('foo_bar_body.html');
+ }
+
+ public function redirect()
+ {
+ $url_root = generate_board_url();
+
+ $rewrite_prefix = (!empty($this->config['enable_mod_rewrite'])) ? '' : 'app.php/';
+
+ $redirects = array(
+ array(
+ append_sid($this->root_path . 'index.' . $this->php_ext),
+ 'index.php',
+ ),
+ array(
+ append_sid($this->root_path . 'foo/bar/index.' . $this->php_ext),
+ 'foo/bar/index.php',
+ ),
+ array(
+ append_sid($this->root_path . 'tests/index.' . $this->php_ext),
+ 'tests/index.php',
+ ),
+ array(
+ $this->helper->route('foo_index_controller'),
+ $rewrite_prefix . 'index',
+ ),
+ array(
+ $this->helper->route('foo_tests_index_controller'),
+ $rewrite_prefix . 'tests/index',
+ ),
+ /**
+ * Symfony does not allow /../ in routes
+ array(
+ $this->helper->route('foo_tests_dotdot_index_controller'),
+ $rewrite_prefix . 'index',
+ ),
+ */
+ );
+
+ foreach ($redirects as $redirect)
+ {
+ $this->template->assign_block_vars('redirects', array(
+ 'URL' => redirect($redirect[0], true),
+ ));
+
+ $this->template->assign_block_vars('redirects_expected', array(
+ 'URL' => $this->path_helper->clean_url($url_root . '/' . $redirect[1]),
+ ));
+ }
+
+ return $this->helper->render('redirect_body.html');
+ }
+}
diff --git a/tests/functional/fixtures/ext/foo/bar/event/permission.php b/tests/functional/fixtures/ext/foo/bar/event/permission.php
new file mode 100644
index 0000000000..9b319dd35f
--- /dev/null
+++ b/tests/functional/fixtures/ext/foo/bar/event/permission.php
@@ -0,0 +1,33 @@
+<?php
+
+/**
+*
+* @package testing
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace foo\bar\event;
+
+/**
+* Event listener
+*/
+use Symfony\Component\EventDispatcher\EventSubscriberInterface;
+
+class permission implements EventSubscriberInterface
+{
+ static public function getSubscribedEvents()
+ {
+ return array(
+ 'core.permissions' => 'add_permissions',
+ );
+ }
+
+ public function add_permissions($event)
+ {
+ $permissions = $event['permissions'];
+ $permissions['u_foo'] = array('lang' => 'ACL_U_FOOBAR', 'cat' => 'post');
+ $event['permissions'] = $permissions;
+ }
+}
diff --git a/tests/functional/fixtures/ext/foo/bar/event/user_setup.php b/tests/functional/fixtures/ext/foo/bar/event/user_setup.php
new file mode 100644
index 0000000000..8fa7ac97da
--- /dev/null
+++ b/tests/functional/fixtures/ext/foo/bar/event/user_setup.php
@@ -0,0 +1,36 @@
+<?php
+
+/**
+*
+* @package testing
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace foo\bar\event;
+
+/**
+* Event listener
+*/
+use Symfony\Component\EventDispatcher\EventSubscriberInterface;
+
+class user_setup implements EventSubscriberInterface
+{
+ static public function getSubscribedEvents()
+ {
+ return array(
+ 'core.user_setup' => 'add_global_translations',
+ );
+ }
+
+ public function add_global_translations($event)
+ {
+ $lang_set_ext = $event['lang_set_ext'];
+ $lang_set_ext[] = array(
+ 'ext_name' => 'foo/bar',
+ 'lang_set' => 'foo_global',
+ );
+ $event['lang_set_ext'] = $lang_set_ext;
+ }
+}
diff --git a/tests/functional/fixtures/ext/foo/bar/ext.php b/tests/functional/fixtures/ext/foo/bar/ext.php
new file mode 100644
index 0000000000..1288edd5ec
--- /dev/null
+++ b/tests/functional/fixtures/ext/foo/bar/ext.php
@@ -0,0 +1,8 @@
+<?php
+
+namespace foo\bar;
+
+class ext extends \phpbb\extension\base
+{
+
+}
diff --git a/tests/functional/fixtures/ext/foo/bar/language/en/foo_global.php b/tests/functional/fixtures/ext/foo/bar/language/en/foo_global.php
new file mode 100644
index 0000000000..a6af8680d3
--- /dev/null
+++ b/tests/functional/fixtures/ext/foo/bar/language/en/foo_global.php
@@ -0,0 +1,5 @@
+<?php
+
+$lang = array_merge($lang, array(
+ 'SKIP' => 'Overwritten by foo',
+));
diff --git a/tests/functional/fixtures/ext/foo/bar/language/en/permissions_foo.php b/tests/functional/fixtures/ext/foo/bar/language/en/permissions_foo.php
new file mode 100644
index 0000000000..64b497c394
--- /dev/null
+++ b/tests/functional/fixtures/ext/foo/bar/language/en/permissions_foo.php
@@ -0,0 +1,5 @@
+<?php
+
+$lang = array_merge($lang, array(
+ 'ACL_U_FOOBAR' => 'Can view foobar with permission foo',
+));
diff --git a/tests/functional/fixtures/ext/foo/bar/styles/prosilver/template/foo_bar_body.html b/tests/functional/fixtures/ext/foo/bar/styles/prosilver/template/foo_bar_body.html
new file mode 100644
index 0000000000..8fb6994d3d
--- /dev/null
+++ b/tests/functional/fixtures/ext/foo/bar/styles/prosilver/template/foo_bar_body.html
@@ -0,0 +1,3 @@
+<!-- INCLUDE overall_header.html -->
+<div id="content">{A_VARIABLE}</div>
+<!-- INCLUDE overall_footer.html -->
diff --git a/tests/functional/fixtures/ext/foo/bar/styles/prosilver/template/foobar.html b/tests/functional/fixtures/ext/foo/bar/styles/prosilver/template/foobar.html
new file mode 100644
index 0000000000..cbded623f4
--- /dev/null
+++ b/tests/functional/fixtures/ext/foo/bar/styles/prosilver/template/foobar.html
@@ -0,0 +1,3 @@
+<!-- INCLUDE overall_header.html -->
+<div id="content">UCP Extension Template Test Passed!</div>
+<!-- INCLUDE overall_footer.html -->
diff --git a/tests/functional/fixtures/ext/foo/bar/styles/prosilver/template/redirect_body.html b/tests/functional/fixtures/ext/foo/bar/styles/prosilver/template/redirect_body.html
new file mode 100644
index 0000000000..2b70b0fe59
--- /dev/null
+++ b/tests/functional/fixtures/ext/foo/bar/styles/prosilver/template/redirect_body.html
@@ -0,0 +1,8 @@
+<!-- INCLUDE overall_header.html -->
+<!-- BEGIN redirects -->
+<div id="redirect_{redirects.S_ROW_COUNT}">{redirects.URL}</div>
+<!-- END redirects -->
+<!-- BEGIN redirects_expected -->
+<div id="redirect_expected_{redirects_expected.S_ROW_COUNT}">{redirects_expected.URL}</div>
+<!-- END redirects_expected -->
+<!-- INCLUDE overall_footer.html -->
diff --git a/tests/functional/fixtures/ext/foo/bar/ucp/main_info.php b/tests/functional/fixtures/ext/foo/bar/ucp/main_info.php
new file mode 100644
index 0000000000..2ba37f3050
--- /dev/null
+++ b/tests/functional/fixtures/ext/foo/bar/ucp/main_info.php
@@ -0,0 +1,26 @@
+<?php
+
+/**
+*
+* @package testing
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace foo\bar\ucp;
+
+class main_info
+{
+ function module()
+ {
+ return array(
+ 'filename' => '\foo\bar\ucp\main_module',
+ 'title' => 'ACP_FOOBAR_TITLE',
+ 'version' => '1.0.0',
+ 'modes' => array(
+ 'mode' => array('title' => 'ACP_FOOBAR_MODE', 'auth' => '', 'cat' => array('ACP_FOOBAR_TITLE')),
+ ),
+ );
+ }
+}
diff --git a/tests/functional/fixtures/ext/foo/bar/ucp/main_module.php b/tests/functional/fixtures/ext/foo/bar/ucp/main_module.php
new file mode 100644
index 0000000000..cd3dacc9db
--- /dev/null
+++ b/tests/functional/fixtures/ext/foo/bar/ucp/main_module.php
@@ -0,0 +1,22 @@
+<?php
+
+/**
+*
+* @package testing
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace foo\bar\ucp;
+
+class main_module
+{
+ var $u_action;
+
+ function main($id, $mode)
+ {
+ $this->tpl_name = 'foobar';
+ $this->page_title = 'Bertie';
+ }
+}
diff --git a/tests/functional/fixtures/files/empty.png b/tests/functional/fixtures/files/empty.png
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/tests/functional/fixtures/files/empty.png
diff --git a/tests/functional/fixtures/files/illegal-extension.bif b/tests/functional/fixtures/files/illegal-extension.bif
new file mode 100644
index 0000000000..3cd5038e38
--- /dev/null
+++ b/tests/functional/fixtures/files/illegal-extension.bif
Binary files differ
diff --git a/tests/functional/fixtures/files/too-large.png b/tests/functional/fixtures/files/too-large.png
new file mode 100644
index 0000000000..ed4b0abd80
--- /dev/null
+++ b/tests/functional/fixtures/files/too-large.png
Binary files differ
diff --git a/tests/functional/fixtures/files/valid.jpg b/tests/functional/fixtures/files/valid.jpg
new file mode 100644
index 0000000000..95a87ddbdf
--- /dev/null
+++ b/tests/functional/fixtures/files/valid.jpg
Binary files differ
diff --git a/tests/functional/forgot_password_test.php b/tests/functional/forgot_password_test.php
new file mode 100644
index 0000000000..3b6fd15d02
--- /dev/null
+++ b/tests/functional/forgot_password_test.php
@@ -0,0 +1,57 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+/**
+* @group functional
+*/
+class phpbb_functional_forgot_password_test extends phpbb_functional_test_case
+{
+ public function test_forgot_password_enabled()
+ {
+ global $config;
+ $this->add_lang('ucp');
+ $crawler = self::request('GET', 'ucp.php?mode=sendpassword');
+ $this->assertEquals($this->lang('SEND_PASSWORD'), $crawler->filter('h2')->text());
+ }
+
+ public function test_forgot_password_disabled()
+ {
+ $this->login();
+ $this->admin_login();
+ $this->add_lang('ucp');
+ $crawler = self::request('GET', 'adm/index.php?sid=' . $this->sid . '&i=acp_board&mode=security');
+
+ $form = $crawler->selectButton('Submit')->form();
+ $values = $form->getValues();
+
+ $values["config[allow_password_reset]"] = 0;
+ $form->setValues($values);
+ $crawler = self::submit($form);
+
+ $this->logout();
+
+ $crawler = self::request('GET', 'ucp.php?mode=sendpassword');
+ $this->assertContains($this->lang('UCP_PASSWORD_RESET_DISABLED', '', ''), $crawler->text());
+
+ }
+
+ public function tearDown()
+ {
+ $this->login();
+ $this->admin_login();
+
+ $crawler = self::request('GET', 'adm/index.php?sid=' . $this->sid . '&i=acp_board&mode=security');
+
+ // Enable allow_password_reset again after test
+ $form = $crawler->selectButton('Submit')->form(array(
+ 'config[allow_password_reset]' => 1,
+ ));
+ $crawler = self::submit($form);
+ }
+}
diff --git a/tests/functional/forum_password_test.php b/tests/functional/forum_password_test.php
new file mode 100644
index 0000000000..40a8059ad1
--- /dev/null
+++ b/tests/functional/forum_password_test.php
@@ -0,0 +1,55 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+/**
+* @group functional
+*/
+class phpbb_functional_forum_password_test extends phpbb_functional_test_case
+{
+ public function test_setup_forum_with_password()
+ {
+ $this->login();
+ $this->admin_login();
+
+ $crawler = self::request('GET', "adm/index.php?i=acp_forums&mode=manage&sid={$this->sid}");
+ $form = $crawler->selectButton('addforum')->form(array(
+ 'forum_name' => 'Password protected',
+ ));
+ $crawler = self::submit($form);
+ $form = $crawler->selectButton('update')->form(array(
+ 'forum_perm_from' => 2,
+ 'forum_password' => 'foobar',
+ 'forum_password_confirm' => 'foobar',
+ ));
+ $crawler = self::submit($form);
+ }
+
+ public function data_enter_forum_with_password()
+ {
+ return array(
+ array('foowrong', 'WRONG_PASSWORD'),
+ array('foobar', 'NO_TOPICS'),
+ );
+ }
+
+ /**
+ * @dataProvider data_enter_forum_with_password
+ */
+ public function test_enter_forum_with_password($password, $message)
+ {
+ $crawler = self::request('GET', "index.php?sid={$this->sid}");
+ preg_match('/.?f=([0-9])/', $crawler->selectLink('Password protected')->link()->getUri(), $match);
+ $crawler = self::request('GET', "viewforum.php?f={$match[1]}&sid={$this->sid}");
+ $form = $crawler->selectButton('login')->form(array(
+ 'password' => $password,
+ ));
+ $crawler = self::submit($form);
+ $this->assertContainsLang($message, $crawler->text());
+ }
+}
diff --git a/tests/functional/group_create_test.php b/tests/functional/group_create_test.php
new file mode 100644
index 0000000000..96780069f7
--- /dev/null
+++ b/tests/functional/group_create_test.php
@@ -0,0 +1,31 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+/**
+* @group functional
+*/
+class phpbb_functional_group_create_test extends phpbb_functional_test_case
+{
+
+ public function test_create_group()
+ {
+ $this->login();
+ $this->admin_login();
+ $this->add_lang('acp/groups');
+
+ $crawler = self::request('GET', 'adm/index.php?i=acp_groups&mode=manage&sid=' . $this->sid);
+ $form = $crawler->selectButton($this->lang('SUBMIT'))->form();
+ $crawler = self::submit($form, array('group_name' => 'testtest'));
+
+ $form = $crawler->selectButton($this->lang('SUBMIT'))->form();
+ $crawler = self::submit($form, array('group_name' => 'testtest'));
+
+ $this->assertContainsLang('GROUP_CREATED', $crawler->filter('#main')->text());
+ }
+}
diff --git a/tests/functional/memberlist_test.php b/tests/functional/memberlist_test.php
new file mode 100644
index 0000000000..b7f7a1823d
--- /dev/null
+++ b/tests/functional/memberlist_test.php
@@ -0,0 +1,105 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+/**
+* @group functional
+*/
+class phpbb_functional_memberlist_test extends phpbb_functional_test_case
+{
+ public function test_memberlist()
+ {
+ $this->create_user('memberlist-test-user');
+ // logs in as admin
+ $this->login();
+ $crawler = self::request('GET', 'memberlist.php?sid=' . $this->sid);
+ $this->assertContains('memberlist-test-user', $crawler->text());
+
+ // restrict by first character
+ $crawler = self::request('GET', 'memberlist.php?first_char=m&sid=' . $this->sid);
+ $this->assertContains('memberlist-test-user', $crawler->text());
+
+ // make sure results for wrong character are not returned
+ $crawler = self::request('GET', 'memberlist.php?first_char=a&sid=' . $this->sid);
+ $this->assertNotContains('memberlist-test-user', $crawler->text());
+ }
+
+ public function test_viewprofile()
+ {
+ $this->login();
+ // XXX hardcoded user id
+ $crawler = self::request('GET', 'memberlist.php?mode=viewprofile&u=2&sid=' . $this->sid);
+ $this->assertContains('admin', $crawler->filter('h2')->text());
+ }
+
+ protected function get_memberlist_leaders_table_crawler()
+ {
+ $crawler = self::request('GET', 'memberlist.php?mode=team&sid=' . $this->sid);
+ return $crawler->filter('.forumbg-table');
+ }
+
+ public function test_leaders()
+ {
+ $this->login();
+ $this->create_user('memberlist-test-moderator');
+
+ $crawler = $this->get_memberlist_leaders_table_crawler();
+
+ // Admin in admin group, but not in moderators
+ $this->assertContains('admin', $crawler->eq(0)->text());
+ $this->assertNotContains('admin', $crawler->eq(1)->text());
+
+ // memberlist-test-user in neither group
+ $this->assertNotContains('memberlist-test-user', $crawler->eq(0)->text());
+ $this->assertNotContains('memberlist-test-user', $crawler->eq(1)->text());
+
+ // memberlist-test-moderator in neither group
+ $this->assertNotContains('memberlist-test-moderator', $crawler->eq(0)->text());
+ $this->assertNotContains('memberlist-test-moderator', $crawler->eq(1)->text());
+ }
+
+ public function test_leaders_remove_users()
+ {
+ $this->login();
+
+ // Remove admin from admins, but is now in moderators
+ $this->remove_user_group('ADMINISTRATORS', array('admin'));
+ $crawler = $this->get_memberlist_leaders_table_crawler();
+ $this->assertNotContains('admin', $crawler->eq(0)->text());
+ $this->assertContains('admin', $crawler->eq(1)->text());
+
+ // Remove admin from moderators, should not be visible anymore
+ $this->remove_user_group('GLOBAL_MODERATORS', array('admin'));
+ $crawler = $this->get_memberlist_leaders_table_crawler();
+ $this->assertNotContains('admin', $crawler->eq(0)->text());
+ $this->assertNotContains('admin', $crawler->eq(1)->text());
+ }
+
+ public function test_leaders_add_users()
+ {
+ $this->login();
+
+ // Add memberlist-test-moderator to moderators
+ $this->add_user_group('GLOBAL_MODERATORS', array('memberlist-test-moderator'));
+ $crawler = $this->get_memberlist_leaders_table_crawler();
+ $this->assertNotContains('memberlist-test-moderator', $crawler->eq(0)->text());
+ $this->assertContains('memberlist-test-moderator', $crawler->eq(1)->text());
+
+ // Add admin to moderators, should be visible as moderator
+ $this->add_user_group('GLOBAL_MODERATORS', array('admin'), true);
+ $crawler = $this->get_memberlist_leaders_table_crawler();
+ $this->assertNotContains('admin', $crawler->eq(0)->text());
+ $this->assertContains('admin', $crawler->eq(1)->text());
+
+ // Add admin to admins as leader, should be visible as admin, not moderator
+ $this->add_user_group('ADMINISTRATORS', array('admin'), true, true);
+ $crawler = $this->get_memberlist_leaders_table_crawler();
+ $this->assertContains('admin', $crawler->eq(0)->text());
+ $this->assertNotContains('admin', $crawler->eq(1)->text());
+ }
+}
diff --git a/tests/functional/metadata_manager_test.php b/tests/functional/metadata_manager_test.php
new file mode 100644
index 0000000000..ac08a44e30
--- /dev/null
+++ b/tests/functional/metadata_manager_test.php
@@ -0,0 +1,83 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+/**
+* @group functional
+*/
+class phpbb_functional_metadata_manager_test extends phpbb_functional_test_case
+{
+ protected $phpbb_extension_manager;
+
+ static private $helper;
+
+ static protected $fixtures = array(
+ 'foo/bar/',
+ );
+
+ static public function setUpBeforeClass()
+ {
+ parent::setUpBeforeClass();
+
+ self::$helper = new phpbb_test_case_helpers(self);
+ self::$helper->copy_ext_fixtures(dirname(__FILE__) . '/fixtures/ext/', self::$fixtures);
+ }
+
+ static public function tearDownAfterClass()
+ {
+ parent::tearDownAfterClass();
+
+ self::$helper->restore_original_ext_dir();
+ }
+
+ public function setUp()
+ {
+ parent::setUp();
+
+ $this->phpbb_extension_manager = $this->get_extension_manager();
+
+ $this->purge_cache();
+ $this->phpbb_extension_manager->enable('foo/bar');
+
+ $this->login();
+ $this->admin_login();
+ $this->add_lang('acp/extensions');
+ }
+
+ public function test_extensions_list()
+ {
+ $crawler = self::request('GET', 'adm/index.php?i=acp_extensions&mode=main&sid=' . $this->sid);
+ $this->assertContains($this->lang('EXTENSIONS_EXPLAIN'), $crawler->filter('#main')->text());
+ $this->assertContains('phpBB 3.1 Extension Testing', $crawler->filter('#main')->text());
+ $this->assertContains('Details', $crawler->filter('#main')->text());
+ }
+
+ public function test_extensions_details()
+ {
+ $crawler = self::request('GET', 'adm/index.php?i=acp_extensions&mode=main&action=details&ext_name=foo%2Fbar&sid=' . $this->sid);
+
+ // Test whether the details are displayed
+ $this->assertContains($this->lang('CLEAN_NAME'), $crawler->filter('#main')->text());
+ $this->assertContains('foo/bar', $crawler->filter('#meta_name')->text());
+
+ $this->assertContains($this->lang('PHP_VERSION'), $crawler->filter('#main')->text());
+ $this->assertContains('>=5.3', $crawler->filter('#require_php')->text());
+ // Details should be html escaped
+ // However, text() only returns the displayed text, so HTML Special Chars are decoded.
+ // So we test this directly on the content of the response.
+ $this->assertContains('<span id="require_php">&gt;=5.3</span>', $this->get_content());
+ }
+
+ public function test_extensions_details_notexists()
+ {
+ $crawler = self::request('GET', 'adm/index.php?i=acp_extensions&mode=main&action=details&ext_name=not%2Fexists&sid=' . $this->sid);
+
+ // Error message because the files do not exist
+ $this->assertContains('The required file does not exist:', $crawler->filter('#main')->text());
+ }
+}
diff --git a/tests/functional/notification_test.php b/tests/functional/notification_test.php
new file mode 100644
index 0000000000..dd1b8ec981
--- /dev/null
+++ b/tests/functional/notification_test.php
@@ -0,0 +1,88 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+/**
+* @group functional
+*/
+class phpbb_functional_notification_test extends phpbb_functional_test_case
+{
+ static public function user_subscription_data()
+ {
+ return array(
+ // Rows inserted by phpBB/install/schemas/schema_data.sql
+ // Also see PHPBB3-11460
+ array('post_notification', true),
+ array('topic_notification', true),
+ array('post_email', true),
+ array('topic_email', true),
+
+ // Default behaviour for in-board notifications:
+ // If user did not opt-out, in-board notifications are on.
+ array('bookmark_notification', true),
+ array('quote_notification', true),
+
+ // Default behaviour for email notifications:
+ // If user did not opt-in, email notifications are off.
+ array('bookmark_email', false),
+ array('quote_email', false),
+ );
+ }
+
+ /**
+ * @dataProvider user_subscription_data
+ */
+ public function test_user_subscriptions($checkbox_name, $expected_status)
+ {
+ $this->login();
+ $crawler = self::request('GET', 'ucp.php?i=ucp_notifications&mode=notification_options');
+
+ $cplist = $crawler->filter('.table1');
+ if ($expected_status)
+ {
+ $this->assert_checkbox_is_checked($cplist, $checkbox_name);
+ }
+ else
+ {
+ $this->assert_checkbox_is_unchecked($cplist, $checkbox_name);
+ }
+ }
+
+ public function test_mark_notifications_read()
+ {
+ // Create a new standard user
+ $this->create_user('notificationtestuser');
+ $this->add_user_group('NEWLY_REGISTERED', array('notificationtestuser'));
+ $this->login('notificationtestuser');
+ $crawler = self::request('GET', 'index.php');
+ $this->assertContains('notificationtestuser', $crawler->filter('.icon-logout')->text());
+
+ // Post a new post that needs approval
+ $this->create_post(2, 1, 'Re: Welcome to phpBB3', 'This is a test [b]post[/b] posted by notificationtestuser.', array(), 'POST_STORED_MOD');
+ $crawler = self::request('GET', "viewtopic.php?t=1&sid={$this->sid}");
+ $this->assertNotContains('This is a test post posted by notificationtestuser.', $crawler->filter('html')->text());
+
+ // logout
+ $crawler = self::request('GET', 'ucp.php?sid=' . $this->sid . '&mode=logout');
+
+ // admin login
+ $this->login();
+ $this->add_lang('ucp');
+ $crawler = self::request('GET', 'ucp.php?i=ucp_notifications');
+
+ // At least one notification should exist
+ $this->assertGreaterThan(0, $crawler->filter('#notification_list_button strong')->text());
+
+ // Get form token
+ $link = $crawler->selectLink($this->lang('NOTIFICATIONS_MARK_ALL_READ'))->link()->getUri();
+ $crawler = self::request('GET', substr($link, strpos($link, 'ucp.')));
+ $form = $crawler->selectButton($this->lang('YES'))->form();
+ $crawler = self::submit($form);
+ $this->assertEquals(0, $crawler->filter('#notification_list_button strong')->text());
+ }
+}
diff --git a/tests/functional/paging_test.php b/tests/functional/paging_test.php
new file mode 100644
index 0000000000..91f14cb75d
--- /dev/null
+++ b/tests/functional/paging_test.php
@@ -0,0 +1,39 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+/**
+* @group functional
+*/
+class phpbb_functional_paging_test extends phpbb_functional_test_case
+{
+
+ public function test_pagination()
+ {
+ $this->login();
+
+ $post = $this->create_topic(2, 'Test Topic 1', 'This is a test topic posted by the testing framework.');
+ for ($post_id = 1; $post_id <= 11; $post_id++)
+ {
+ $this->create_post(2, $post['topic_id'], 'Re: Test Topic 1', 'This is a test post no' . $post_id . ' posted by the testing framework.');
+ }
+ $crawler = self::request('GET', "viewtopic.php?t={$post['topic_id']}&sid={$this->sid}");
+ $this->assertContains('post no9', $crawler->text());
+ $this->assertNotContains('post no11', $crawler->text());
+
+ $next_link = $crawler->filter('#viewtopic > fieldset > a.arrow-right')->attr('href');
+ $crawler = self::request('GET', $next_link);
+ $this->assertContains('post no11', $crawler->text());
+ $this->assertNotContains('post no9', $crawler->text());
+
+ $prev_link = $crawler->filter('#viewtopic > fieldset > a.arrow-left')->attr('href');
+ $crawler = self::request('GET', $prev_link);
+ $this->assertContains('post no9', $crawler->text());
+ $this->assertNotContains('post no11', $crawler->text());
+ }
+}
diff --git a/tests/functional/plupload_test.php b/tests/functional/plupload_test.php
new file mode 100644
index 0000000000..a91e70c7bb
--- /dev/null
+++ b/tests/functional/plupload_test.php
@@ -0,0 +1,149 @@
+<?php
+/**
+ *
+ * @package testing
+ * @copyright (c) 2012 phpBB Group
+ * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+ *
+ */
+
+/**
+ * @group functional
+ */
+class phpbb_functional_plupload_test extends phpbb_functional_test_case
+{
+ const CHUNKS = 4;
+ private $path;
+
+ protected function set_extension_group_permission($val)
+ {
+ $db = $this->get_db();
+ $query = "
+ UPDATE phpbb_extension_groups
+ SET allow_in_pm = '$val'
+ WHERE group_name = 'IMAGES'
+ ";
+ $db->sql_query($query);
+ }
+
+ public function setUp()
+ {
+ parent::setUp();
+ $this->set_extension_group_permission(1);
+ $this->path = __DIR__ . '/fixtures/files/';
+ $this->add_lang('posting');
+ $this->login();
+ }
+
+ public function tearDown()
+ {
+ $this->set_extension_group_permission(0);
+ $iterator = new DirectoryIterator(__DIR__ . '/../../phpBB/files/');
+ foreach ($iterator as $fileinfo)
+ {
+ if (
+ $fileinfo->isDot()
+ || $fileinfo->isDir()
+ || $fileinfo->getFilename() === 'index.htm'
+ || $fileinfo->getFilename() === '.htaccess'
+ )
+ {
+ continue;
+ }
+
+ unlink($fileinfo->getPathname());
+ }
+ }
+
+ public function get_urls()
+ {
+ return array(
+ array('posting.php?mode=reply&f=2&t=1'),
+ array('ucp.php?i=pm&mode=compose'),
+ );
+ }
+
+ /**
+ * @dataProvider get_urls
+ */
+ public function test_chunked_upload($url)
+ {
+ $chunk_size = ceil(filesize($this->path . 'valid.jpg') / self::CHUNKS);
+ $handle = fopen($this->path . 'valid.jpg', 'rb');
+
+ for ($i = 0; $i < self::CHUNKS; $i++)
+ {
+ $chunk = fread($handle, $chunk_size);
+ file_put_contents($this-> path . 'chunk', $chunk);
+
+ $file = array(
+ 'tmp_name' => $this->path . 'chunk',
+ 'name' => 'blob',
+ 'type' => 'application/octet-stream',
+ 'size' => strlen($chunk),
+ 'error' => UPLOAD_ERR_OK,
+ );
+
+ self::$client->setServerParameter('HTTP_X_PHPBB_USING_PLUPLOAD', '1');
+
+ $crawler = self::$client->request(
+ 'POST',
+ $url . '&sid=' . $this->sid,
+ array(
+ 'chunk' => $i,
+ 'chunks' => self::CHUNKS,
+ 'name' => md5('valid') . '.jpg',
+ 'real_filename' => 'valid.jpg',
+ 'add_file' => $this->lang('ADD_FILE'),
+ ),
+ array('fileupload' => $file),
+ array('X-PHPBB-USING-PLUPLOAD' => '1')
+ );
+
+ if ($i < self::CHUNKS - 1)
+ {
+ $this->assertContains('{"jsonrpc":"2.0","id":"id","result":null}', self::$client->getResponse()->getContent());
+ }
+ else
+ {
+ $response = json_decode(self::$client->getResponse()->getContent(), true);
+ $this->assertEquals('valid.jpg', $response['data'][0]['real_filename']);
+ }
+
+ unlink($this->path . 'chunk');
+ }
+
+ fclose($handle);
+ }
+
+ /**
+ * @dataProvider get_urls
+ */
+ public function test_normal_upload($url)
+ {
+ $file = array(
+ 'tmp_name' => $this->path . 'valid.jpg',
+ 'name' => 'valid.jpg',
+ 'type' => 'image/jpeg',
+ 'size' => filesize($this->path . 'valid.jpg'),
+ 'error' => UPLOAD_ERR_OK,
+ );
+
+ $crawler = self::$client->request(
+ 'POST',
+ $url . '&sid=' . $this->sid,
+ array(
+ 'chunk' => '0',
+ 'chunks' => '1',
+ 'name' => md5('valid') . '.jpg',
+ 'real_filename' => 'valid.jpg',
+ 'add_file' => $this->lang('ADD_FILE'),
+ ),
+ array('fileupload' => $file),
+ array('X-PHPBB-USING-PLUPLOAD' => '1')
+ );
+
+ $response = json_decode(self::$client->getResponse()->getContent(), true);
+ $this->assertEquals('valid.jpg', $response['data'][0]['real_filename']);
+ }
+}
diff --git a/tests/functional/posting_test.php b/tests/functional/posting_test.php
index 7fd1e4fdcf..dd95704952 100644
--- a/tests/functional/posting_test.php
+++ b/tests/functional/posting_test.php
@@ -22,8 +22,8 @@ class phpbb_functional_posting_test extends phpbb_functional_test_case
$crawler = self::request('GET', "viewtopic.php?t={$post['topic_id']}&sid={$this->sid}");
$this->assertContains('This is a test topic posted by the testing framework.', $crawler->filter('html')->text());
- // Test creating a reply
- $post2 = $this->create_post(2, $post['topic_id'], 'Re: Test Topic 1', 'This is a test post posted by the testing framework.');
+ // Test creating a reply with bbcode
+ $post2 = $this->create_post(2, $post['topic_id'], 'Re: Test Topic 1', 'This is a test [b]post[/b] posted by the testing framework.');
$crawler = self::request('GET', "viewtopic.php?t={$post2['topic_id']}&sid={$this->sid}");
$this->assertContains('This is a test post posted by the testing framework.', $crawler->filter('html')->text());
diff --git a/tests/functional/registration_test.php b/tests/functional/registration_test.php
new file mode 100644
index 0000000000..5baf33c59e
--- /dev/null
+++ b/tests/functional/registration_test.php
@@ -0,0 +1,52 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+/**
+* @group functional
+*/
+class phpbb_functional_registration_test extends phpbb_functional_test_case
+{
+ public function test_disable_captcha_on_registration()
+ {
+ $this->login();
+ $this->admin_login();
+
+ $crawler = self::request('GET', "adm/index.php?i=acp_board&mode=registration&sid={$this->sid}");
+ $form = $crawler->selectButton('Submit')->form();
+ $form['config[enable_confirm]']->setValue('0');
+ $crawler = self::submit($form);
+
+ $this->assertContainsLang('CONFIG_UPDATED', $crawler->filter('#main .successbox')->text());
+ }
+
+ /**
+ * @depends test_disable_captcha_on_registration
+ */
+ public function test_register_new_account()
+ {
+ $this->add_lang('ucp');
+
+ $crawler = self::request('GET', 'ucp.php?mode=register');
+ $this->assertContainsLang('REGISTRATION', $crawler->filter('div.content h2')->text());
+
+ $form = $crawler->selectButton('I agree to these terms')->form();
+ $crawler = self::submit($form);
+
+ $form = $crawler->selectButton('Submit')->form(array(
+ 'username' => 'user-reg-test',
+ 'email' => 'user-reg-test@phpbb.com',
+ 'new_password' => 'testtest',
+ 'password_confirm' => 'testtest',
+ ));
+ $form['tz']->select('Europe/Berlin');
+ $crawler = self::submit($form);
+
+ $this->assertContainsLang('ACCOUNT_ADDED', $crawler->filter('#message')->text());
+ }
+}
diff --git a/tests/functional/search/base.php b/tests/functional/search/base.php
new file mode 100644
index 0000000000..0bd9bf01ab
--- /dev/null
+++ b/tests/functional/search/base.php
@@ -0,0 +1,100 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+/**
+* @group functional
+*/
+abstract class phpbb_functional_search_base extends phpbb_functional_test_case
+{
+ protected function assert_search_found($keywords, $posts_found, $words_highlighted)
+ {
+ $crawler = self::request('GET', 'search.php?keywords=' . $keywords);
+ $this->assertEquals($posts_found, $crawler->filter('.postbody')->count());
+ $this->assertEquals($words_highlighted, $crawler->filter('.posthilit')->count());
+ }
+
+ protected function assert_search_not_found($keywords)
+ {
+ $crawler = self::request('GET', 'search.php?keywords=' . $keywords);
+ $this->assertEquals(0, $crawler->filter('.postbody')->count());
+ $split_keywords_string = str_replace(array('+', '-'), ' ', $keywords);
+ $this->assertEquals($split_keywords_string, $crawler->filter('#keywords')->attr('value'));
+ }
+
+ public function test_search_backend()
+ {
+ $this->login();
+ $this->admin_login();
+
+ $post = $this->create_topic(2, 'Test Topic 1 foosubject', 'This is a test topic posted by the barsearch testing framework.');
+
+ $crawler = self::request('GET', 'adm/index.php?i=acp_search&mode=settings&sid=' . $this->sid);
+ $form = $crawler->selectButton('Submit')->form();
+ $values = $form->getValues();
+
+ if ($values["config[search_type]"] != $this->search_backend)
+ {
+ $values["config[search_type]"] = $this->search_backend;
+ $form->setValues($values);
+ $crawler = self::submit($form);
+
+ $form = $crawler->selectButton('Yes')->form();
+ $values = $form->getValues();
+ $crawler = self::submit($form);
+
+ // check if search backend is not supported
+ if ($crawler->filter('.errorbox')->count() > 0)
+ {
+ $this->delete_topic($post['topic_id']);
+ $this->markTestSkipped("Search backend is not supported/running");
+ }
+ $this->create_search_index();
+ }
+
+ $this->logout();
+ $this->assert_search_found('phpbb3+installation', 1, 3);
+ $this->assert_search_found('foosubject+barsearch', 1, 2);
+ $this->assert_search_not_found('loremipsumdedo');
+
+ $this->login();
+ $this->admin_login();
+ $this->delete_search_index();
+ $this->delete_topic($post['topic_id']);
+ }
+
+ protected function create_search_index()
+ {
+ $this->add_lang('acp/search');
+ $crawler = self::request(
+ 'POST',
+ 'adm/index.php?i=acp_search&mode=index&sid=' . $this->sid,
+ array(
+ 'search_type' => $this->search_backend,
+ 'action' => 'create',
+ 'submit' => true,
+ )
+ );
+ $this->assertContainsLang('SEARCH_INDEX_CREATED', $crawler->text());
+ }
+
+ protected function delete_search_index()
+ {
+ $this->add_lang('acp/search');
+ $crawler = self::request(
+ 'POST',
+ 'adm/index.php?i=acp_search&mode=index&sid=' . $this->sid,
+ array(
+ 'search_type' => $this->search_backend,
+ 'action' => 'delete',
+ 'submit' => true,
+ )
+ );
+ $this->assertContainsLang('SEARCH_INDEX_REMOVED', $crawler->text());
+ }
+}
diff --git a/tests/functional/search/mysql_test.php b/tests/functional/search/mysql_test.php
new file mode 100644
index 0000000000..52a7b14f40
--- /dev/null
+++ b/tests/functional/search/mysql_test.php
@@ -0,0 +1,19 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+require_once dirname(__FILE__) . '/base.php';
+
+/**
+* @group functional
+*/
+class phpbb_functional_search_mysql_test extends phpbb_functional_search_base
+{
+ protected $search_backend = '\phpbb\search\fulltext_mysql';
+
+}
diff --git a/tests/functional/search/native_test.php b/tests/functional/search/native_test.php
new file mode 100644
index 0000000000..512c6f2830
--- /dev/null
+++ b/tests/functional/search/native_test.php
@@ -0,0 +1,18 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+require_once dirname(__FILE__) . '/base.php';
+
+/**
+* @group functional
+*/
+class phpbb_functional_search_native_test extends phpbb_functional_search_base
+{
+ protected $search_backend = '\phpbb\search\fulltext_native';
+}
diff --git a/tests/functional/search/postgres_test.php b/tests/functional/search/postgres_test.php
new file mode 100644
index 0000000000..974b417659
--- /dev/null
+++ b/tests/functional/search/postgres_test.php
@@ -0,0 +1,19 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+require_once dirname(__FILE__) . '/base.php';
+
+/**
+* @group functional
+*/
+class phpbb_functional_search_postgres_test extends phpbb_functional_search_base
+{
+ protected $search_backend = '\phpbb\search\fulltext_postgres';
+
+}
diff --git a/tests/functional/search/sphinx_test.php b/tests/functional/search/sphinx_test.php
new file mode 100644
index 0000000000..ef2522f9ed
--- /dev/null
+++ b/tests/functional/search/sphinx_test.php
@@ -0,0 +1,23 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+require_once dirname(__FILE__) . '/base.php';
+
+/**
+* @group functional
+*/
+class phpbb_functional_search_sphinx_test extends phpbb_functional_search_base
+{
+ protected $search_backend = '\phpbb\search\fulltext_sphinx';
+
+ public function test_search_backend()
+ {
+ $this->markTestIncomplete('Sphinx Tests are not supported');
+ }
+}
diff --git a/tests/functional/softdelete_test.php b/tests/functional/softdelete_test.php
new file mode 100644
index 0000000000..bd4d34cf99
--- /dev/null
+++ b/tests/functional/softdelete_test.php
@@ -0,0 +1,761 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+/**
+* @group functional
+*/
+class phpbb_functional_softdelete_test extends phpbb_functional_test_case
+{
+ protected $data = array();
+
+ public function test_setup_forums()
+ {
+ $this->login();
+ $this->admin_login();
+
+ $crawler = self::request('GET', "adm/index.php?i=acp_forums&mode=manage&sid={$this->sid}");
+ $form = $crawler->selectButton('addforum')->form(array(
+ 'forum_name' => 'Soft Delete #1',
+ ));
+ $crawler = self::submit($form);
+ $form = $crawler->selectButton('update')->form(array(
+ 'forum_perm_from' => 2,
+ ));
+ $crawler = self::submit($form);
+
+ $crawler = self::request('GET', "adm/index.php?i=acp_forums&mode=manage&sid={$this->sid}");
+ $form = $crawler->selectButton('addforum')->form(array(
+ 'forum_name' => 'Soft Delete #2',
+ ));
+ $crawler = self::submit($form);
+ $form = $crawler->selectButton('update')->form(array(
+ 'forum_perm_from' => 2,
+ ));
+ $crawler = self::submit($form);
+ }
+
+ public function test_create_post()
+ {
+ $this->login();
+ $this->load_ids(array(
+ 'forums' => array(
+ 'Soft Delete #1',
+ 'Soft Delete #2',
+ ),
+ ));
+
+ $this->assert_forum_details($this->data['forums']['Soft Delete #1'], array(
+ 'forum_posts_approved' => 0,
+ 'forum_posts_unapproved' => 0,
+ 'forum_posts_softdeleted' => 0,
+ 'forum_topics_approved' => 0,
+ 'forum_topics_unapproved' => 0,
+ 'forum_topics_softdeleted' => 0,
+ 'forum_last_post_id' => 0,
+ ), 'initial comparison');
+
+ // Test creating topic
+ $post = $this->create_topic($this->data['forums']['Soft Delete #1'], 'Soft Delete Topic #1', 'This is a test topic posted by the testing framework.');
+ $crawler = self::request('GET', "viewtopic.php?t={$post['topic_id']}&sid={$this->sid}");
+
+ $this->assertContains('Soft Delete Topic #1', $crawler->filter('html')->text());
+ $this->data['topics']['Soft Delete Topic #1'] = (int) $post['topic_id'];
+ $this->data['posts']['Soft Delete Topic #1'] = (int) $this->get_parameter_from_link($crawler->filter('.post')->selectLink($this->lang('POST', '', ''))->link()->getUri(), 'p');
+
+ $this->assert_forum_details($this->data['forums']['Soft Delete #1'], array(
+ 'forum_posts_approved' => 1,
+ 'forum_posts_unapproved' => 0,
+ 'forum_posts_softdeleted' => 0,
+ 'forum_topics_approved' => 1,
+ 'forum_topics_unapproved' => 0,
+ 'forum_topics_softdeleted' => 0,
+ 'forum_last_post_id' => $this->data['posts']['Soft Delete Topic #1'],
+ ), 'after creating topic #1');
+
+ // Test creating a reply
+ $post2 = $this->create_post($this->data['forums']['Soft Delete #1'], $post['topic_id'], 'Re: Soft Delete Topic #1-#2', 'This is a test post posted by the testing framework.');
+ $crawler = self::request('GET', "viewtopic.php?t={$post2['topic_id']}&sid={$this->sid}");
+
+ $this->assertContains('Re: Soft Delete Topic #1-#2', $crawler->filter('html')->text());
+ $this->data['posts']['Re: Soft Delete Topic #1-#2'] = (int) $this->get_parameter_from_link($crawler->filter('.post')->eq(1)->selectLink($this->lang('POST', '', ''))->link()->getUri(), 'p');
+
+ $this->assert_forum_details($this->data['forums']['Soft Delete #1'], array(
+ 'forum_posts_approved' => 2,
+ 'forum_posts_unapproved' => 0,
+ 'forum_posts_softdeleted' => 0,
+ 'forum_topics_approved' => 1,
+ 'forum_topics_unapproved' => 0,
+ 'forum_topics_softdeleted' => 0,
+ 'forum_last_post_id' => $this->data['posts']['Re: Soft Delete Topic #1-#2'],
+ ), 'after replying');
+ }
+
+ public function test_softdelete_post()
+ {
+ $this->login();
+ $this->load_ids(array(
+ 'forums' => array(
+ 'Soft Delete #1',
+ 'Soft Delete #2',
+ ),
+ 'topics' => array(
+ 'Soft Delete Topic #1',
+ ),
+ 'posts' => array(
+ 'Soft Delete Topic #1',
+ 'Re: Soft Delete Topic #1-#2',
+ ),
+ ));
+
+ $this->assert_forum_details($this->data['forums']['Soft Delete #1'], array(
+ 'forum_posts_approved' => 2,
+ 'forum_posts_unapproved' => 0,
+ 'forum_posts_softdeleted' => 0,
+ 'forum_topics_approved' => 1,
+ 'forum_topics_unapproved' => 0,
+ 'forum_topics_softdeleted' => 0,
+ 'forum_last_post_id' => $this->data['posts']['Re: Soft Delete Topic #1-#2'],
+ ), 'before softdelete');
+
+ $this->add_lang('posting');
+ $crawler = self::request('GET', "posting.php?mode=delete&f={$this->data['forums']['Soft Delete #1']}&p={$this->data['posts']['Re: Soft Delete Topic #1-#2']}&sid={$this->sid}");
+ $this->assertContainsLang('DELETE_PERMANENTLY', $crawler->text());
+
+ $form = $crawler->selectButton('Yes')->form();
+ $crawler = self::submit($form);
+ $this->assertContainsLang('POST_DELETED', $crawler->text());
+
+ $this->assert_forum_details($this->data['forums']['Soft Delete #1'], array(
+ 'forum_posts_approved' => 1,
+ 'forum_posts_unapproved' => 0,
+ 'forum_posts_softdeleted' => 1,
+ 'forum_topics_approved' => 1,
+ 'forum_topics_unapproved' => 0,
+ 'forum_topics_softdeleted' => 0,
+ 'forum_last_post_id' => $this->data['posts']['Soft Delete Topic #1'],
+ ), 'after softdelete');
+
+ $crawler = self::request('GET', "viewtopic.php?t={$this->data['topics']['Soft Delete Topic #1']}&sid={$this->sid}");
+ $this->assertContains($this->lang('POST_DISPLAY', '', ''), $crawler->text());
+ }
+
+ public function test_move_softdeleted_post()
+ {
+ $this->login();
+ $this->load_ids(array(
+ 'forums' => array(
+ 'Soft Delete #1',
+ 'Soft Delete #2',
+ ),
+ 'topics' => array(
+ 'Soft Delete Topic #1',
+ ),
+ 'posts' => array(
+ 'Soft Delete Topic #1',
+ 'Re: Soft Delete Topic #1-#2',
+ ),
+ ));
+
+ $this->assert_forum_details($this->data['forums']['Soft Delete #1'], array(
+ 'forum_posts_approved' => 1,
+ 'forum_posts_unapproved' => 0,
+ 'forum_posts_softdeleted' => 1,
+ 'forum_topics_approved' => 1,
+ 'forum_topics_unapproved' => 0,
+ 'forum_topics_softdeleted' => 0,
+ 'forum_last_post_id' => $this->data['posts']['Soft Delete Topic #1'],
+ ), 'before moving #1');
+
+ $this->assert_forum_details($this->data['forums']['Soft Delete #2'], array(
+ 'forum_posts_approved' => 0,
+ 'forum_posts_unapproved' => 0,
+ 'forum_posts_softdeleted' => 0,
+ 'forum_topics_approved' => 0,
+ 'forum_topics_unapproved' => 0,
+ 'forum_topics_softdeleted' => 0,
+ 'forum_last_post_id' => 0,
+ ), 'before moving #2');
+
+ $crawler = self::request('GET', "viewtopic.php?t={$this->data['topics']['Soft Delete Topic #1']}&sid={$this->sid}");
+
+ $form = $crawler->selectButton('Go')->eq(2)->form();
+ $form['action']->select('move');
+ $crawler = self::submit($form);
+ $this->assertContainsLang('SELECT_DESTINATION_FORUM', $crawler->text());
+
+ $this->add_lang('mcp');
+ $form = $crawler->selectButton('Yes')->form();
+ $form['to_forum_id']->select($this->data['forums']['Soft Delete #2']);
+ $crawler = self::submit($form);
+ $this->assertContainsLang('TOPIC_MOVED_SUCCESS', $crawler->text());
+
+ $crawler = self::request('GET', "viewtopic.php?t={$this->data['topics']['Soft Delete Topic #1']}&sid={$this->sid}");
+ $this->assertContains('Soft Delete #2', $crawler->filter('.navlinks')->text());
+ $this->assertContains('Soft Delete Topic #1', $crawler->filter('h2')->text());
+
+ $this->assert_forum_details($this->data['forums']['Soft Delete #1'], array(
+ 'forum_posts_approved' => 0,
+ 'forum_posts_unapproved' => 0,
+ 'forum_posts_softdeleted' => 0,
+ 'forum_topics_approved' => 0,
+ 'forum_topics_unapproved' => 0,
+ 'forum_topics_softdeleted' => 0,
+ 'forum_last_post_id' => 0,
+ ), 'after moving #1');
+
+ $this->assert_forum_details($this->data['forums']['Soft Delete #2'], array(
+ 'forum_posts_approved' => 1,
+ 'forum_posts_unapproved' => 0,
+ 'forum_posts_softdeleted' => 1,
+ 'forum_topics_approved' => 1,
+ 'forum_topics_unapproved' => 0,
+ 'forum_topics_softdeleted' => 0,
+ 'forum_last_post_id' => $this->data['posts']['Soft Delete Topic #1'],
+ ), 'after moving #2');
+ }
+
+ public function test_softdelete_topic()
+ {
+ $this->login();
+ $this->load_ids(array(
+ 'forums' => array(
+ 'Soft Delete #1',
+ 'Soft Delete #2',
+ ),
+ 'topics' => array(
+ 'Soft Delete Topic #1',
+ ),
+ 'posts' => array(
+ 'Soft Delete Topic #1',
+ 'Re: Soft Delete Topic #1-#2',
+ ),
+ ));
+
+ $this->assert_forum_details($this->data['forums']['Soft Delete #1'], array(
+ 'forum_posts_approved' => 0,
+ 'forum_posts_unapproved' => 0,
+ 'forum_posts_softdeleted' => 0,
+ 'forum_topics_approved' => 0,
+ 'forum_topics_unapproved' => 0,
+ 'forum_topics_softdeleted' => 0,
+ 'forum_last_post_id' => 0,
+ ), 'before softdeleting #1');
+
+ $this->assert_forum_details($this->data['forums']['Soft Delete #2'], array(
+ 'forum_posts_approved' => 1,
+ 'forum_posts_unapproved' => 0,
+ 'forum_posts_softdeleted' => 1,
+ 'forum_topics_approved' => 1,
+ 'forum_topics_unapproved' => 0,
+ 'forum_topics_softdeleted' => 0,
+ 'forum_last_post_id' => $this->data['posts']['Soft Delete Topic #1'],
+ ), 'before softdeleting #2');
+
+ $crawler = self::request('GET', "viewtopic.php?t={$this->data['topics']['Soft Delete Topic #1']}&sid={$this->sid}");
+
+ $this->add_lang('posting');
+ $form = $crawler->selectButton('Go')->eq(2)->form();
+ $form['action']->select('delete_topic');
+ $crawler = self::submit($form);
+ $this->assertContainsLang('DELETE_PERMANENTLY', $crawler->text());
+
+ $this->add_lang('mcp');
+ $form = $crawler->selectButton('Yes')->form();
+ $crawler = self::submit($form);
+ $this->assertContainsLang('TOPIC_DELETED_SUCCESS', $crawler->text());
+
+ $crawler = self::request('GET', "viewtopic.php?t={$this->data['topics']['Soft Delete Topic #1']}&sid={$this->sid}");
+ $this->assertContains('Soft Delete #2', $crawler->filter('.navlinks')->text());
+ $this->assertContains('Soft Delete Topic #1', $crawler->filter('h2')->text());
+
+ $this->assert_forum_details($this->data['forums']['Soft Delete #1'], array(
+ 'forum_posts_approved' => 0,
+ 'forum_posts_unapproved' => 0,
+ 'forum_posts_softdeleted' => 0,
+ 'forum_topics_approved' => 0,
+ 'forum_topics_unapproved' => 0,
+ 'forum_topics_softdeleted' => 0,
+ 'forum_last_post_id' => 0,
+ ), 'after moving #1');
+
+ $this->assert_forum_details($this->data['forums']['Soft Delete #2'], array(
+ 'forum_posts_approved' => 0,
+ 'forum_posts_unapproved' => 0,
+ 'forum_posts_softdeleted' => 2,
+ 'forum_topics_approved' => 0,
+ 'forum_topics_unapproved' => 0,
+ 'forum_topics_softdeleted' => 1,
+ 'forum_last_post_id' => 0,
+ ), 'after moving #2');
+ }
+
+ public function test_move_softdeleted_topic()
+ {
+ $this->login();
+ $this->load_ids(array(
+ 'forums' => array(
+ 'Soft Delete #1',
+ 'Soft Delete #2',
+ ),
+ 'topics' => array(
+ 'Soft Delete Topic #1',
+ ),
+ 'posts' => array(
+ 'Soft Delete Topic #1',
+ 'Re: Soft Delete Topic #1-#2',
+ ),
+ ));
+
+ $this->assert_forum_details($this->data['forums']['Soft Delete #1'], array(
+ 'forum_posts_approved' => 0,
+ 'forum_posts_unapproved' => 0,
+ 'forum_posts_softdeleted' => 0,
+ 'forum_topics_approved' => 0,
+ 'forum_topics_unapproved' => 0,
+ 'forum_topics_softdeleted' => 0,
+ 'forum_last_post_id' => 0,
+ ), 'before moving #1');
+
+ $this->assert_forum_details($this->data['forums']['Soft Delete #2'], array(
+ 'forum_posts_approved' => 0,
+ 'forum_posts_unapproved' => 0,
+ 'forum_posts_softdeleted' => 2,
+ 'forum_topics_approved' => 0,
+ 'forum_topics_unapproved' => 0,
+ 'forum_topics_softdeleted' => 1,
+ 'forum_last_post_id' => 0,
+ ), 'before moving #2');
+
+ $crawler = self::request('GET', "viewtopic.php?t={$this->data['topics']['Soft Delete Topic #1']}&sid={$this->sid}");
+
+ $form = $crawler->selectButton('Go')->eq(2)->form();
+ $form['action']->select('move');
+ $crawler = self::submit($form);
+ $this->assertContainsLang('SELECT_DESTINATION_FORUM', $crawler->text());
+
+ $this->add_lang('mcp');
+ $form = $crawler->selectButton('Yes')->form();
+ $form['to_forum_id']->select($this->data['forums']['Soft Delete #1']);
+ $crawler = self::submit($form);
+ $this->assertContainsLang('TOPIC_MOVED_SUCCESS', $crawler->text());
+
+ $crawler = self::request('GET', "viewtopic.php?t={$this->data['topics']['Soft Delete Topic #1']}&sid={$this->sid}");
+ $this->assertContains('Soft Delete #1', $crawler->filter('.navlinks')->text());
+ $this->assertContains('Soft Delete Topic #1', $crawler->filter('h2')->text());
+
+ $this->assert_forum_details($this->data['forums']['Soft Delete #1'], array(
+ 'forum_posts_approved' => 0,
+ 'forum_posts_unapproved' => 0,
+ 'forum_posts_softdeleted' => 2,
+ 'forum_topics_approved' => 0,
+ 'forum_topics_unapproved' => 0,
+ 'forum_topics_softdeleted' => 1,
+ 'forum_last_post_id' => 0,
+ ), 'after moving #1');
+
+ $this->assert_forum_details($this->data['forums']['Soft Delete #2'], array(
+ 'forum_posts_approved' => 0,
+ 'forum_posts_unapproved' => 0,
+ 'forum_posts_softdeleted' => 0,
+ 'forum_topics_approved' => 0,
+ 'forum_topics_unapproved' => 0,
+ 'forum_topics_softdeleted' => 0,
+ 'forum_last_post_id' => 0,
+ ), 'after moving #2');
+ }
+
+ public function test_restore_post()
+ {
+ $this->login();
+ $this->load_ids(array(
+ 'forums' => array(
+ 'Soft Delete #1',
+ 'Soft Delete #2',
+ ),
+ 'topics' => array(
+ 'Soft Delete Topic #1',
+ ),
+ 'posts' => array(
+ 'Soft Delete Topic #1',
+ 'Re: Soft Delete Topic #1-#2',
+ ),
+ ));
+
+ $this->assert_forum_details($this->data['forums']['Soft Delete #1'], array(
+ 'forum_posts_approved' => 0,
+ 'forum_posts_unapproved' => 0,
+ 'forum_posts_softdeleted' => 2,
+ 'forum_topics_approved' => 0,
+ 'forum_topics_unapproved' => 0,
+ 'forum_topics_softdeleted' => 1,
+ 'forum_last_post_id' => 0,
+ ), 'before restoring #1');
+
+ $this->assert_forum_details($this->data['forums']['Soft Delete #2'], array(
+ 'forum_posts_approved' => 0,
+ 'forum_posts_unapproved' => 0,
+ 'forum_posts_softdeleted' => 0,
+ 'forum_topics_approved' => 0,
+ 'forum_topics_unapproved' => 0,
+ 'forum_topics_softdeleted' => 0,
+ 'forum_last_post_id' => 0,
+ ), 'before restoring #2');
+
+ $crawler = self::request('GET', "viewtopic.php?t={$this->data['topics']['Soft Delete Topic #1']}&sid={$this->sid}");
+
+ $this->add_lang('mcp');
+ $form = $crawler->selectButton($this->lang('RESTORE'))->form();
+ $crawler = self::submit($form);
+ $this->assertContainsLang('RESTORE_POST', $crawler->text());
+
+ $form = $crawler->selectButton('Yes')->form();
+ $crawler = self::submit($form);
+ $this->assertContainsLang('POST_RESTORED_SUCCESS', $crawler->text());
+
+ $crawler = self::request('GET', "viewtopic.php?t={$this->data['topics']['Soft Delete Topic #1']}&sid={$this->sid}");
+ $this->assertContains('Soft Delete #1', $crawler->filter('.navlinks')->text());
+ $this->assertContains('Soft Delete Topic #1', $crawler->filter('h2')->text());
+
+ $this->assert_forum_details($this->data['forums']['Soft Delete #1'], array(
+ 'forum_posts_approved' => 1,
+ 'forum_posts_unapproved' => 0,
+ 'forum_posts_softdeleted' => 1,
+ 'forum_topics_approved' => 1,
+ 'forum_topics_unapproved' => 0,
+ 'forum_topics_softdeleted' => 0,
+ 'forum_last_post_id' => $this->data['posts']['Soft Delete Topic #1'],
+ ), 'after restoring #1');
+
+ $this->assert_forum_details($this->data['forums']['Soft Delete #2'], array(
+ 'forum_posts_approved' => 0,
+ 'forum_posts_unapproved' => 0,
+ 'forum_posts_softdeleted' => 0,
+ 'forum_topics_approved' => 0,
+ 'forum_topics_unapproved' => 0,
+ 'forum_topics_softdeleted' => 0,
+ 'forum_last_post_id' => 0,
+ ), 'after restoring #2');
+ }
+
+ public function test_split_topic()
+ {
+ $this->login();
+ $this->load_ids(array(
+ 'forums' => array(
+ 'Soft Delete #1',
+ 'Soft Delete #2',
+ ),
+ 'topics' => array(
+ 'Soft Delete Topic #1',
+ ),
+ 'posts' => array(
+ 'Soft Delete Topic #1',
+ 'Re: Soft Delete Topic #1-#2',
+ ),
+ ));
+
+ $this->assert_forum_details($this->data['forums']['Soft Delete #1'], array(
+ 'forum_posts_approved' => 1,
+ 'forum_posts_unapproved' => 0,
+ 'forum_posts_softdeleted' => 1,
+ 'forum_topics_approved' => 1,
+ 'forum_topics_unapproved' => 0,
+ 'forum_topics_softdeleted' => 0,
+ 'forum_last_post_id' => $this->data['posts']['Soft Delete Topic #1'],
+ ), 'before splitting #1');
+
+ $this->assert_forum_details($this->data['forums']['Soft Delete #2'], array(
+ 'forum_posts_approved' => 0,
+ 'forum_posts_unapproved' => 0,
+ 'forum_posts_softdeleted' => 0,
+ 'forum_topics_approved' => 0,
+ 'forum_topics_unapproved' => 0,
+ 'forum_topics_softdeleted' => 0,
+ 'forum_last_post_id' => 0,
+ ), 'before splitting #2');
+
+ $crawler = self::request('GET', "viewtopic.php?t={$this->data['topics']['Soft Delete Topic #1']}&sid={$this->sid}");
+
+ $this->add_lang('mcp');
+ $form = $crawler->selectButton('Go')->eq(2)->form();
+ $form['action']->select('split');
+ $crawler = self::submit($form);
+ $this->assertContainsLang('SPLIT_TOPIC_EXPLAIN', $crawler->text());
+
+ $form = $crawler->selectButton('Submit')->form(array(
+ 'subject' => 'Soft Delete Topic #2',
+ ));
+ $form['to_forum_id']->select($this->data['forums']['Soft Delete #2']);
+ $form['post_id_list'][1]->tick();
+ $crawler = self::submit($form);
+
+ $form = $crawler->selectButton('Yes')->form();
+ $crawler = self::submit($form);
+ $this->assertContainsLang('TOPIC_SPLIT_SUCCESS', $crawler->text());
+
+ $crawler = self::request('GET', "viewtopic.php?t={$this->data['topics']['Soft Delete Topic #1']}&sid={$this->sid}");
+ $this->assertContains('Soft Delete Topic #1', $crawler->filter('h2')->text());
+ $this->assertNotContains('Re: Soft Delete Topic #1-#2', $crawler->text());
+
+ $this->assert_forum_details($this->data['forums']['Soft Delete #1'], array(
+ 'forum_posts_approved' => 1,
+ 'forum_posts_unapproved' => 0,
+ 'forum_posts_softdeleted' => 0,
+ 'forum_topics_approved' => 1,
+ 'forum_topics_unapproved' => 0,
+ 'forum_topics_softdeleted' => 0,
+ 'forum_last_post_id' => $this->data['posts']['Soft Delete Topic #1'],
+ ), 'after restoring #1');
+
+ $this->assert_forum_details($this->data['forums']['Soft Delete #2'], array(
+ 'forum_posts_approved' => 0,
+ 'forum_posts_unapproved' => 0,
+ 'forum_posts_softdeleted' => 1,
+ 'forum_topics_approved' => 0,
+ 'forum_topics_unapproved' => 0,
+ 'forum_topics_softdeleted' => 1,
+ 'forum_last_post_id' => 0,
+ ), 'after restoring #2');
+ }
+
+ public function test_move_topic_back()
+ {
+ $this->login();
+ $this->load_ids(array(
+ 'forums' => array(
+ 'Soft Delete #1',
+ 'Soft Delete #2',
+ ),
+ 'topics' => array(
+ 'Soft Delete Topic #1',
+ 'Soft Delete Topic #2',
+ ),
+ 'posts' => array(
+ 'Soft Delete Topic #1',
+ 'Re: Soft Delete Topic #1-#2',
+ ),
+ ));
+
+ $crawler = self::request('GET', "viewtopic.php?t={$this->data['topics']['Soft Delete Topic #2']}&sid={$this->sid}");
+
+ $form = $crawler->selectButton('Go')->eq(1)->form();
+ $form['action']->select('move');
+ $crawler = self::submit($form);
+
+ $form = $crawler->selectButton('Yes')->form();
+ $form['to_forum_id']->select($this->data['forums']['Soft Delete #1']);
+ $crawler = self::submit($form);
+
+ $this->assert_forum_details($this->data['forums']['Soft Delete #1'], array(
+ 'forum_posts_approved' => 1,
+ 'forum_posts_unapproved' => 0,
+ 'forum_posts_softdeleted' => 1,
+ 'forum_topics_approved' => 1,
+ 'forum_topics_unapproved' => 0,
+ 'forum_topics_softdeleted' => 1,
+ 'forum_last_post_id' => $this->data['posts']['Soft Delete Topic #1'],
+ ), 'after moving back');
+ }
+
+ public function test_merge_topics()
+ {
+ $this->login();
+ $this->load_ids(array(
+ 'forums' => array(
+ 'Soft Delete #1',
+ 'Soft Delete #2',
+ ),
+ 'topics' => array(
+ 'Soft Delete Topic #1',
+ 'Soft Delete Topic #2',
+ ),
+ 'posts' => array(
+ 'Soft Delete Topic #1',
+ 'Re: Soft Delete Topic #1-#2',
+ ),
+ ));
+
+ $this->assert_forum_details($this->data['forums']['Soft Delete #1'], array(
+ 'forum_posts_approved' => 1,
+ 'forum_posts_unapproved' => 0,
+ 'forum_posts_softdeleted' => 1,
+ 'forum_topics_approved' => 1,
+ 'forum_topics_unapproved' => 0,
+ 'forum_topics_softdeleted' => 1,
+ 'forum_last_post_id' => $this->data['posts']['Soft Delete Topic #1'],
+ ), 'before merging #1');
+
+ $crawler = self::request('GET', "viewtopic.php?t={$this->data['topics']['Soft Delete Topic #2']}&sid={$this->sid}");
+
+ $this->add_lang('mcp');
+ $form = $crawler->selectButton('Go')->eq(1)->form();
+ $form['action']->select('merge_topic');
+ $crawler = self::submit($form);
+ $this->assertContainsLang('SELECT_MERGE', $crawler->text());
+
+ $crawler = self::request('GET', "mcp.php?f={$this->data['forums']['Soft Delete #1']}&t={$this->data['topics']['Soft Delete Topic #2']}&i=main&mode=forum_view&action=merge_topic&to_topic_id={$this->data['topics']['Soft Delete Topic #1']}");
+ $this->assertContainsLang('MERGE_TOPICS_CONFIRM', $crawler->text());
+
+ $form = $crawler->selectButton('Yes')->form();
+ $crawler = self::submit($form);
+ $this->assertContainsLang('POSTS_MERGED_SUCCESS', $crawler->text());
+
+ $crawler = self::request('GET', "viewtopic.php?t={$this->data['topics']['Soft Delete Topic #1']}&sid={$this->sid}");
+ $this->assertContains('Soft Delete Topic #1', $crawler->filter('h2')->text());
+ $this->assertContainsLang('POST_DELETED', $crawler->filter('body')->text());
+
+ $this->assert_forum_details($this->data['forums']['Soft Delete #1'], array(
+ 'forum_posts_approved' => 1,
+ 'forum_posts_unapproved' => 0,
+ 'forum_posts_softdeleted' => 1,
+ 'forum_topics_approved' => 1,
+ 'forum_topics_unapproved' => 0,
+ 'forum_topics_softdeleted' => 0,
+ 'forum_last_post_id' => $this->data['posts']['Soft Delete Topic #1'],
+ ), 'after merging #1');
+ }
+
+ public function test_fork_topic()
+ {
+ $this->login();
+ $this->load_ids(array(
+ 'forums' => array(
+ 'Soft Delete #1',
+ 'Soft Delete #2',
+ ),
+ 'topics' => array(
+ 'Soft Delete Topic #1',
+ ),
+ 'posts' => array(
+ 'Soft Delete Topic #1',
+ 'Re: Soft Delete Topic #1-#2',
+ ),
+ ));
+
+ $this->assert_forum_details($this->data['forums']['Soft Delete #1'], array(
+ 'forum_posts_approved' => 1,
+ 'forum_posts_unapproved' => 0,
+ 'forum_posts_softdeleted' => 1,
+ 'forum_topics_approved' => 1,
+ 'forum_topics_unapproved' => 0,
+ 'forum_topics_softdeleted' => 0,
+ 'forum_last_post_id' => $this->data['posts']['Soft Delete Topic #1'],
+ ), 'before forking #1');
+
+ $this->assert_forum_details($this->data['forums']['Soft Delete #2'], array(
+ 'forum_posts_approved' => 0,
+ 'forum_posts_unapproved' => 0,
+ 'forum_posts_softdeleted' => 0,
+ 'forum_topics_approved' => 0,
+ 'forum_topics_unapproved' => 0,
+ 'forum_topics_softdeleted' => 0,
+ 'forum_last_post_id' => 0,
+ ), 'before forking #2');
+
+ $crawler = self::request('GET', "viewtopic.php?t={$this->data['topics']['Soft Delete Topic #1']}&sid={$this->sid}");
+
+ $this->add_lang('mcp');
+ $form = $crawler->selectButton('Go')->eq(2)->form();
+ $form['action']->select('fork');
+ $crawler = self::submit($form);
+ $this->assertContainsLang('FORK_TOPIC', $crawler->text());
+
+ $form = $crawler->selectButton('Yes')->form();
+ $form['to_forum_id']->select($this->data['forums']['Soft Delete #2']);
+ $crawler = self::submit($form);
+ $this->assertContainsLang('TOPIC_FORKED_SUCCESS', $crawler->text());
+
+ $this->assert_forum_details($this->data['forums']['Soft Delete #1'], array(
+ 'forum_posts_approved' => 1,
+ 'forum_posts_unapproved' => 0,
+ 'forum_posts_softdeleted' => 1,
+ 'forum_topics_approved' => 1,
+ 'forum_topics_unapproved' => 0,
+ 'forum_topics_softdeleted' => 0,
+ 'forum_last_post_id' => $this->data['posts']['Soft Delete Topic #1'],
+ ), 'after forking #1');
+
+ $this->assert_forum_details($this->data['forums']['Soft Delete #2'], array(
+ 'forum_posts_approved' => 1,
+ 'forum_posts_unapproved' => 0,
+ 'forum_posts_softdeleted' => 1,
+ 'forum_topics_approved' => 1,
+ 'forum_topics_unapproved' => 0,
+ 'forum_topics_softdeleted' => 0,
+ 'forum_last_post_id' => $this->data['posts']['Soft Delete Topic #1'] + 2,
+ ), 'after forking #2');
+ }
+
+ public function assert_forum_details($forum_id, $details, $additional_error_message = '')
+ {
+ $this->db = $this->get_db();
+
+ $sql = 'SELECT ' . implode(', ', array_keys($details)) . '
+ FROM phpbb_forums
+ WHERE forum_id = ' . (int) $forum_id;
+ $result = $this->db->sql_query($sql);
+ $data = $this->db->sql_fetchrow($result);
+ $this->db->sql_freeresult($result);
+
+ $this->assertEquals($details, $data, "Forum {$forum_id} does not match expected {$additional_error_message}");
+ }
+
+ public function load_ids($data)
+ {
+ $this->db = $this->get_db();
+
+ if (!empty($data['forums']))
+ {
+ $sql = 'SELECT *
+ FROM phpbb_forums
+ WHERE ' . $this->db->sql_in_set('forum_name', $data['forums']);
+ $result = $this->db->sql_query($sql);
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ if (in_array($row['forum_name'], $data['forums']))
+ {
+ $this->data['forums'][$row['forum_name']] = (int) $row['forum_id'];
+ }
+ }
+ $this->db->sql_freeresult($result);
+ }
+
+ if (!empty($data['topics']))
+ {
+ $sql = 'SELECT *
+ FROM phpbb_topics
+ WHERE ' . $this->db->sql_in_set('topic_title', $data['topics']);
+ $result = $this->db->sql_query($sql);
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ if (in_array($row['topic_title'], $data['topics']))
+ {
+ $this->data['topics'][$row['topic_title']] = (int) $row['topic_id'];
+ }
+ }
+ $this->db->sql_freeresult($result);
+ }
+
+ if (!empty($data['posts']))
+ {
+ $sql = 'SELECT *
+ FROM phpbb_posts
+ WHERE ' . $this->db->sql_in_set('post_subject', $data['posts']);
+ $result = $this->db->sql_query($sql);
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ if (in_array($row['post_subject'], $data['posts']))
+ {
+ $this->data['posts'][$row['post_subject']] = (int) $row['post_id'];
+ }
+ }
+ $this->db->sql_freeresult($result);
+ }
+ }
+}
diff --git a/tests/functional/ucp_groups_test.php b/tests/functional/ucp_groups_test.php
index 9c6b1edc5e..f48c793ea1 100644
--- a/tests/functional/ucp_groups_test.php
+++ b/tests/functional/ucp_groups_test.php
@@ -14,8 +14,40 @@ require_once dirname(__FILE__) . '/common_groups_test.php';
*/
class phpbb_functional_ucp_groups_test extends phpbb_functional_common_groups_test
{
+ protected $db;
+
protected function get_url()
{
return 'ucp.php?i=groups&mode=manage&action=edit';
}
+
+ protected function get_teampage_settings()
+ {
+ if (!isset($this->db))
+ {
+ $this->db = $this->get_db();
+ }
+ $sql = 'SELECT g.group_legend AS group_legend, t.teampage_position AS group_teampage
+ FROM ' . GROUPS_TABLE . ' g
+ LEFT JOIN ' . TEAMPAGE_TABLE . ' t
+ ON (t.group_id = g.group_id)
+ WHERE g.group_id = 5';
+ $result = $this->db->sql_query($sql);
+ $group_row = $this->db->sql_fetchrow($result);
+ $this->db->sql_freeresult($result);
+ return $group_row;
+ }
+
+ public function test_ucp_groups_teampage()
+ {
+ $this->group_manage_login();
+
+ // Test if group_legend or group_teampage are modified while
+ // submitting the ucp_group_manage page
+ $form = $this->get_group_manage_form();
+ $teampage_settings = $this->get_teampage_settings();
+ $crawler = self::submit($form);
+ $this->assertContains($this->lang('GROUP_UPDATED'), $crawler->text());
+ $this->assertEquals($teampage_settings, $this->get_teampage_settings());
+ }
}
diff --git a/tests/functional/ucp_pm_test.php b/tests/functional/ucp_pm_test.php
new file mode 100644
index 0000000000..09521cc9f4
--- /dev/null
+++ b/tests/functional/ucp_pm_test.php
@@ -0,0 +1,48 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+/**
+* @group functional
+*/
+class phpbb_functional_ucp_pm_test extends phpbb_functional_test_case
+{
+ public function setUp()
+ {
+ parent::setUp();
+ $this->login();
+ $this->admin_login();
+ }
+
+ public function test_pm_enabled()
+ {
+ $crawler = self::request('GET', 'ucp.php');
+ $this->assertContainsLang('PRIVATE_MESSAGES', $crawler->filter('html')->text());
+ }
+
+ public function test_pm_disabled()
+ {
+ $this->set_allow_pm(0);
+ $crawler = self::request('GET', 'ucp.php');
+ $this->assertNotContainsLang('PRIVATE_MESSAGES', $crawler->filter('html')->text());
+ $this->set_allow_pm(1);
+ }
+
+ protected function set_allow_pm($enable_pm)
+ {
+ $crawler = self::request('GET', 'adm/index.php?sid=' . $this->sid . '&i=acp_board&mode=message');
+
+ $form = $crawler->selectButton('Submit')->form();
+ $values = $form->getValues();
+
+ $values["config[allow_privmsg]"] = $enable_pm;
+ $form->setValues($values);
+ $crawler = self::submit($form);
+ $this->assertGreaterThan(0, $crawler->filter('.successbox')->count());
+ }
+}
diff --git a/tests/functional/user_password_reset_test.php b/tests/functional/user_password_reset_test.php
new file mode 100644
index 0000000000..65222c1aa6
--- /dev/null
+++ b/tests/functional/user_password_reset_test.php
@@ -0,0 +1,122 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2014 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+/**
+* @group functional
+*/
+class phpbb_functional_user_password_reset_test extends phpbb_functional_test_case
+{
+ protected $user_data;
+
+ public function test_password_reset()
+ {
+ $this->add_lang('ucp');
+ $user_id = $this->create_user('reset-password-test-user');
+
+ $crawler = self::request('GET', "ucp.php?mode=sendpassword&sid={$this->sid}");
+ $form = $crawler->selectButton('submit')->form(array(
+ 'username' => 'reset-password-test-user',
+ ));
+ $crawler = self::submit($form);
+ $this->assertContainsLang('NO_EMAIL_USER', $crawler->text());
+
+ $crawler = self::request('GET', "ucp.php?mode=sendpassword&sid={$this->sid}");
+ $form = $crawler->selectButton('submit')->form(array(
+ 'username' => 'reset-password-test-user',
+ 'email' => 'nobody@example.com',
+ ));
+ $crawler = self::submit($form);
+ $this->assertContainsLang('PASSWORD_UPDATED', $crawler->text());
+
+ // Check if columns in database were updated for password reset
+ $this->get_user_data();
+ $this->assertNotNull($this->user_data['user_actkey']);
+ $this->assertNotNull($this->user_data['user_newpasswd']);
+
+ // Make sure we know the password
+ $db = $this->get_db();
+ $this->passwords_manager = $this->get_passwords_manager();
+ $sql = 'UPDATE ' . USERS_TABLE . "
+ SET user_newpasswd = '" . $db->sql_escape($this->passwords_manager->hash('reset-password-test-user')) . "'
+ WHERE user_id = " . $user_id;
+ $db->sql_query($sql);
+ }
+
+ public function test_login_after_reset()
+ {
+ $this->login('reset-password-test-user');
+ }
+
+ public function data_activate_new_password()
+ {
+ return array(
+ array('WRONG_ACTIVATION', false, 'FOOBAR'),
+ array('ALREADY_ACTIVATED', 2, 'FOOBAR'),
+ array('PASSWORD_ACTIVATED', false, false),
+ array('ALREADY_ACTIVATED', false, false),
+ );
+ }
+
+ /**
+ * @dataProvider data_activate_new_password
+ */
+ public function test_activate_new_password($expected, $user_id, $act_key)
+ {
+ $this->add_lang('ucp');
+ $this->get_user_data();
+ $user_id = (!$user_id) ? $this->user_data['user_id'] : $user_id;
+ $act_key = (!$act_key) ? $this->user_data['user_actkey'] : $act_key;
+
+ $crawler = self::request('GET', "ucp.php?mode=activate&u=$user_id&k=$act_key&sid={$this->sid}");
+ $this->assertContainsLang($expected, $crawler->text());
+ }
+
+ public function test_login()
+ {
+ $this->add_lang('ucp');
+ $crawler = self::request('GET', 'ucp.php');
+ $this->assertContains($this->lang('LOGIN_EXPLAIN_UCP'), $crawler->filter('html')->text());
+
+ $form = $crawler->selectButton($this->lang('LOGIN'))->form();
+ $crawler = self::submit($form, array('username' => 'reset-password-test-user', 'password' => 'reset-password-test-user'));
+ $this->assertNotContains($this->lang('LOGIN'), $crawler->filter('.navbar')->text());
+
+ $cookies = self::$cookieJar->all();
+
+ // The session id is stored in a cookie that ends with _sid - we assume there is only one such cookie
+ foreach ($cookies as $cookie);
+ {
+ if (substr($cookie->getName(), -4) == '_sid')
+ {
+ $this->sid = $cookie->getValue();
+ }
+ }
+
+ $this->logout();
+
+ $crawler = self::request('GET', 'ucp.php');
+ $this->assertContains($this->lang('LOGIN_EXPLAIN_UCP'), $crawler->filter('html')->text());
+
+ $form = $crawler->selectButton($this->lang('LOGIN'))->form();
+ // Try logging in with the old password
+ $crawler = self::submit($form, array('username' => 'reset-password-test-user', 'password' => 'reset-password-test-userreset-password-test-user'));
+ $this->assertContains($this->lang('LOGIN_ERROR_PASSWORD', '', ''), $crawler->filter('html')->text());
+ }
+
+ protected function get_user_data()
+ {
+ $db = $this->get_db();
+ $sql = 'SELECT user_id, username, user_type, user_email, user_newpasswd, user_lang, user_notify_type, user_actkey, user_inactive_reason
+ FROM ' . USERS_TABLE . "
+ WHERE username = 'reset-password-test-user'";
+ $result = $db->sql_query($sql);
+ $this->user_data = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+ }
+}
diff --git a/tests/functions/build_hidden_fields_for_query_params_test.php b/tests/functions/build_hidden_fields_for_query_params_test.php
new file mode 100644
index 0000000000..ef2f5744d3
--- /dev/null
+++ b/tests/functions/build_hidden_fields_for_query_params_test.php
@@ -0,0 +1,71 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php';
+
+class phpbb_build_hidden_fields_for_query_params_test extends phpbb_test_case
+{
+ public function build_hidden_fields_for_query_params_test_data()
+ {
+ return array(
+ // get
+ // post
+ // exclude
+ // expected
+ array(
+ array('foo' => 'bar'),
+ array(),
+ array(),
+ "<input type='hidden' name=\"foo\" value=\"bar\" />",
+ ),
+ array(
+ array('foo' => 'bar', 'a' => 'b'),
+ array(),
+ array(),
+ "<input type='hidden' name=\"foo\" value=\"bar\" /><input type='hidden' name=\"a\" value=\"b\" />",
+ ),
+ array(
+ array('a' => 'quote"', 'b' => '<less>'),
+ array(),
+ array(),
+ "<input type='hidden' name=\"a\" value='quote\"' /><input type='hidden' name=\"b\" value=\"&lt;less&gt;\" />",
+ ),
+ array(
+ array('a' => "quotes'\""),
+ array(),
+ array(),
+ "<input type='hidden' name=\"a\" value=\"quotes'&quot;\" />",
+ ),
+ array(
+ array('foo' => 'bar', 'a' => 'b'),
+ array('a' => 'c'),
+ array(),
+ "<input type='hidden' name=\"foo\" value=\"bar\" />",
+ ),
+ // strict equality check
+ array(
+ array('foo' => 'bar', 'a' => '0'),
+ array('a' => ''),
+ array(),
+ "<input type='hidden' name=\"foo\" value=\"bar\" />",
+ ),
+ );
+ }
+
+ /**
+ * @dataProvider build_hidden_fields_for_query_params_test_data
+ */
+ public function test_build_hidden_fields_for_query_params($get, $post, $exclude, $expected)
+ {
+ $request = new phpbb_mock_request($get, $post);
+ $result = phpbb_build_hidden_fields_for_query_params($request, $exclude);
+
+ $this->assertEquals($expected, $result);
+ }
+}
diff --git a/tests/functions/convert_30_dbms_to_31_test.php b/tests/functions/convert_30_dbms_to_31_test.php
new file mode 100644
index 0000000000..4d210d7b29
--- /dev/null
+++ b/tests/functions/convert_30_dbms_to_31_test.php
@@ -0,0 +1,40 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php';
+
+class phpbb_convert_30_dbms_to_31_test extends phpbb_test_case
+{
+ public function convert_30_dbms_to_31_data()
+ {
+ return array(
+ array('firebird'),
+ array('mssql'),
+ array('mssql_odbc'),
+ array('mssqlnative'),
+ array('mysql'),
+ array('mysqli'),
+ array('oracle'),
+ array('postgres'),
+ array('sqlite'),
+ );
+ }
+
+ /**
+ * @dataProvider convert_30_dbms_to_31_data
+ */
+ public function test_convert_30_dbms_to_31($input)
+ {
+ $expected = "phpbb\\db\\driver\\$input";
+
+ $output = phpbb_convert_30_dbms_to_31($input);
+
+ $this->assertEquals($expected, $output);
+ }
+}
diff --git a/tests/functions/fixtures/obtain_online.xml b/tests/functions/fixtures/obtain_online.xml
index 05bbe6a05e..14621a3287 100644
--- a/tests/functions/fixtures/obtain_online.xml
+++ b/tests/functions/fixtures/obtain_online.xml
@@ -15,8 +15,6 @@
<column>user_allow_viewonline</column>
<column>user_permissions</column>
<column>user_sig</column>
- <column>user_occ</column>
- <column>user_interests</column>
<row>
<value>1</value>
<value>anonymous</value>
@@ -24,8 +22,6 @@
<value>1</value>
<value></value>
<value></value>
- <value></value>
- <value></value>
</row>
<row>
<value>2</value>
@@ -34,8 +30,6 @@
<value>1</value>
<value></value>
<value></value>
- <value></value>
- <value></value>
</row>
<row>
<value>3</value>
@@ -44,8 +38,6 @@
<value>1</value>
<value></value>
<value></value>
- <value></value>
- <value></value>
</row>
<row>
<value>4</value>
@@ -54,8 +46,6 @@
<value>1</value>
<value></value>
<value></value>
- <value></value>
- <value></value>
</row>
<row>
<value>5</value>
@@ -64,8 +54,6 @@
<value>1</value>
<value></value>
<value></value>
- <value></value>
- <value></value>
</row>
<row>
<value>6</value>
@@ -74,8 +62,6 @@
<value>0</value>
<value></value>
<value></value>
- <value></value>
- <value></value>
</row>
<row>
<value>7</value>
@@ -84,8 +70,6 @@
<value>0</value>
<value></value>
<value></value>
- <value></value>
- <value></value>
</row>
<row>
<value>8</value>
@@ -94,8 +78,6 @@
<value>0</value>
<value></value>
<value></value>
- <value></value>
- <value></value>
</row>
<row>
<value>9</value>
@@ -104,8 +86,6 @@
<value>0</value>
<value></value>
<value></value>
- <value></value>
- <value></value>
</row>
<row>
<value>10</value>
@@ -114,8 +94,6 @@
<value>0</value>
<value></value>
<value></value>
- <value></value>
- <value></value>
</row>
</table>
</dataset>
diff --git a/tests/functions/fixtures/style_select.xml b/tests/functions/fixtures/style_select.xml
index 12d6392ab5..ca95f94461 100644
--- a/tests/functions/fixtures/style_select.xml
+++ b/tests/functions/fixtures/style_select.xml
@@ -4,20 +4,24 @@
<column>style_id</column>
<column>style_name</column>
<column>style_active</column>
+ <column>style_parent_tree</column>
<row>
<value>1</value>
<value>prosilver</value>
<value>1</value>
+ <value></value>
</row>
<row>
<value>2</value>
<value>subsilver2</value>
<value>1</value>
+ <value></value>
</row>
<row>
<value>3</value>
<value>zoo</value>
<value>0</value>
+ <value></value>
</row>
</table>
</dataset>
diff --git a/tests/functions/fixtures/validate_email.xml b/tests/functions/fixtures/validate_email.xml
index de7fce8a08..eb4fd90217 100644
--- a/tests/functions/fixtures/validate_email.xml
+++ b/tests/functions/fixtures/validate_email.xml
@@ -6,8 +6,6 @@
<column>username_clean</column>
<column>user_permissions</column>
<column>user_sig</column>
- <column>user_occ</column>
- <column>user_interests</column>
<column>user_email_hash</column>
<row>
<value>1</value>
@@ -15,8 +13,6 @@
<value>admin</value>
<value></value>
<value></value>
- <value></value>
- <value></value>
<value>143317126117</value>
</row>
</table>
diff --git a/tests/functions/fixtures/validate_username.xml b/tests/functions/fixtures/validate_username.xml
index fbe398469c..1b85a2f06d 100644
--- a/tests/functions/fixtures/validate_username.xml
+++ b/tests/functions/fixtures/validate_username.xml
@@ -14,16 +14,12 @@
<column>username_clean</column>
<column>user_permissions</column>
<column>user_sig</column>
- <column>user_occ</column>
- <column>user_interests</column>
<row>
<value>1</value>
<value>admin</value>
<value>admin</value>
<value></value>
<value></value>
- <value></value>
- <value></value>
</row>
<row>
<value>2</value>
@@ -31,8 +27,6 @@
<value>moderator</value>
<value></value>
<value></value>
- <value></value>
- <value></value>
</row>
</table>
</dataset>
diff --git a/tests/functions/generate_string_list.php b/tests/functions/generate_string_list.php
new file mode 100644
index 0000000000..cfc150c1f4
--- /dev/null
+++ b/tests/functions/generate_string_list.php
@@ -0,0 +1,60 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2014 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+require_once dirname(__FILE__) . '/../../phpBB/includes/functions_content.php';
+require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php';
+
+class phpbb_generate_string_list_test extends phpbb_test_case
+{
+ public $user;
+
+ public function setUp()
+ {
+ parent::setUp();
+
+ $this->user = new \phpbb\user();
+ $this->user->data = array('user_lang' => 'en');
+ $this->user->add_lang('common');
+ }
+
+ public function generate_string_list_data()
+ {
+ return array(
+ array(
+ array(),
+ '',
+ ),
+ array(
+ array('A'),
+ 'A',
+ ),
+ array(
+ array(2 => 'A', 3 => 'B'),
+ 'A and B',
+ ),
+ array(
+ array('A' => 'A', 'B' => 'B', 'C' => 'C'),
+ 'A, B, and C',
+ ),
+ array(
+ array('A', 'B', 'C', 'D'),
+ 'A, B, C, and D',
+ )
+ );
+ }
+
+ /**
+ * @dataProvider generate_string_list_data
+ */
+ public function test_generate_string_list($items, $expected_result)
+ {
+ $result = phpbb_generate_string_list($items, $this->user);
+ $this->assertEquals($expected_result, $result);
+ }
+}
diff --git a/tests/functions/is_absolute_test.php b/tests/functions/is_absolute_test.php
index 7630b7c58c..6d26793d82 100644
--- a/tests/functions/is_absolute_test.php
+++ b/tests/functions/is_absolute_test.php
@@ -51,6 +51,6 @@ class phpbb_functions_is_absolute_test extends phpbb_test_case
*/
public function test_is_absolute($path, $expected)
{
- $this->assertEquals($expected, is_absolute($path));
+ $this->assertEquals($expected, phpbb_is_absolute($path));
}
}
diff --git a/tests/functions/obtain_online_test.php b/tests/functions/obtain_online_test.php
index de6451a0db..cf42fd5b58 100644
--- a/tests/functions/obtain_online_test.php
+++ b/tests/functions/obtain_online_test.php
@@ -9,7 +9,6 @@
require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php';
require_once dirname(__FILE__) . '/../../phpBB/includes/functions_content.php';
-require_once dirname(__FILE__) . '/../../phpBB/includes/auth.php';
class phpbb_functions_obtain_online_test extends phpbb_database_test_case
{
@@ -126,27 +125,27 @@ class phpbb_functions_obtain_online_test extends phpbb_database_test_case
return array(
array(0, false, array(
'online_userlist' => 'REGISTERED_USERS 2, 3',
- 'l_online_users' => 'ONLINE_USERS_TOTAL 5REG_USERS_TOTAL_AND 2HIDDEN_USERS_TOTAL 3',
+ 'l_online_users' => 'ONLINE_USERS_TOTAL 5 REG_USERS_TOTAL 2 HIDDEN_USERS_TOTAL 3',
)),
array(0, true, array(
'online_userlist' => 'REGISTERED_USERS 2, 3',
- 'l_online_users' => 'ONLINE_USERS_TOTAL 7REG_USERS_TOTAL 2HIDDEN_USERS_TOTAL_AND 3GUEST_USERS_TOTAL 2',
+ 'l_online_users' => 'ONLINE_USERS_TOTAL_GUESTS 7 REG_USERS_TOTAL 2 HIDDEN_USERS_TOTAL 3 GUEST_USERS_TOTAL 2',
)),
array(1, false, array(
'online_userlist' => 'BROWSING_FORUM 3',
- 'l_online_users' => 'ONLINE_USERS_TOTAL 2REG_USER_TOTAL_AND 1HIDDEN_USER_TOTAL 1',
+ 'l_online_users' => 'ONLINE_USERS_TOTAL 2 REG_USERS_TOTAL 1 HIDDEN_USERS_TOTAL 1',
)),
array(1, true, array(
- 'online_userlist' => 'BROWSING_FORUM_GUEST 3 1',
- 'l_online_users' => 'ONLINE_USERS_TOTAL 3REG_USER_TOTAL 1HIDDEN_USER_TOTAL_AND 1GUEST_USER_TOTAL 1',
+ 'online_userlist' => 'BROWSING_FORUM_GUESTS 1 3',
+ 'l_online_users' => 'ONLINE_USERS_TOTAL_GUESTS 3 REG_USERS_TOTAL 1 HIDDEN_USERS_TOTAL 1 GUEST_USERS_TOTAL 1',
)),
array(2, false, array(
'online_userlist' => 'BROWSING_FORUM NO_ONLINE_USERS',
- 'l_online_users' => 'ONLINE_USERS_ZERO_TOTAL 0REG_USERS_ZERO_TOTAL_AND 0HIDDEN_USERS_ZERO_TOTAL 0',
+ 'l_online_users' => 'ONLINE_USERS_TOTAL 0 REG_USERS_TOTAL 0 HIDDEN_USERS_TOTAL 0',
)),
array(2, true, array(
- 'online_userlist' => 'BROWSING_FORUM_GUESTS NO_ONLINE_USERS 0',
- 'l_online_users' => 'ONLINE_USERS_ZERO_TOTAL 0REG_USERS_ZERO_TOTAL 0HIDDEN_USERS_ZERO_TOTAL_AND 0GUEST_USERS_ZERO_TOTAL 0',
+ 'online_userlist' => 'BROWSING_FORUM_GUESTS 0 NO_ONLINE_USERS',
+ 'l_online_users' => 'ONLINE_USERS_TOTAL_GUESTS 0 REG_USERS_TOTAL 0 HIDDEN_USERS_TOTAL 0 GUEST_USERS_TOTAL 0',
)),
);
}
@@ -158,18 +157,21 @@ class phpbb_functions_obtain_online_test extends phpbb_database_test_case
{
$this->db->sql_query('DELETE FROM phpbb_sessions');
- global $config, $user, $auth;
+ global $config, $user, $auth, $phpbb_dispatcher;
$config['load_online_guests'] = $display_guests;
+ $user = new phpbb_mock_lang();
$user->lang = $this->load_language();
- $auth = $this->getMock('auth');
+ $auth = $this->getMock('\phpbb\auth\auth');
$acl_get_map = array(
array('u_viewonline', true),
+ array('u_viewprofile', true),
);
$auth->expects($this->any())
->method('acl_get')
->with($this->stringContains('_'),
$this->anything())
->will($this->returnValueMap($acl_get_map));
+ $phpbb_dispatcher = new phpbb_mock_event_dispatcher();
$time = time();
$this->create_guest_sessions($time);
@@ -215,25 +217,12 @@ class phpbb_functions_obtain_online_test extends phpbb_database_test_case
protected function load_language()
{
- $lang = array(
+ return array(
'NO_ONLINE_USERS' => 'NO_ONLINE_USERS',
'REGISTERED_USERS' => 'REGISTERED_USERS',
'BROWSING_FORUM' => 'BROWSING_FORUM %s',
'BROWSING_FORUM_GUEST' => 'BROWSING_FORUM_GUEST %s %d',
'BROWSING_FORUM_GUESTS' => 'BROWSING_FORUM_GUESTS %s %d',
);
- $vars_online = array('ONLINE', 'REG', 'HIDDEN', 'GUEST');
- foreach ($vars_online as $online)
- {
- $lang = array_merge($lang, array(
- $online . '_USERS_ZERO_TOTAL' => $online . '_USERS_ZERO_TOTAL %d',
- $online . '_USER_TOTAL' => $online . '_USER_TOTAL %d',
- $online . '_USERS_TOTAL' => $online . '_USERS_TOTAL %d',
- $online . '_USERS_ZERO_TOTAL_AND' => $online . '_USERS_ZERO_TOTAL_AND %d',
- $online . '_USER_TOTAL_AND' => $online . '_USER_TOTAL_AND %d',
- $online . '_USERS_TOTAL_AND' => $online . '_USERS_TOTAL_AND %d',
- ));
- }
- return $lang;
}
}
diff --git a/tests/functions/quoteattr_test.php b/tests/functions/quoteattr_test.php
new file mode 100644
index 0000000000..9d2a7d470e
--- /dev/null
+++ b/tests/functions/quoteattr_test.php
@@ -0,0 +1,44 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php';
+
+class phpbb_quoteattr_test extends phpbb_test_case
+{
+ public function quoteattr_test_data()
+ {
+ return array(
+ array('foo', null, '"foo"'),
+ array('', null, '""'),
+ array(' ', null, '" "'),
+ array('<a>', null, '"&lt;a&gt;"'),
+ array('&amp;', null, '"&amp;amp;"'),
+ array('"hello"', null, "'\"hello\"'"),
+ array("'hello'", null, "\"'hello'\""),
+ array("\"'", null, "\"&quot;'\""),
+ array("a\nb", null, '"a&#10;b"'),
+ array("a\r\nb", null, '"a&#13;&#10;b"'),
+ array("a\tb", null, '"a&#9;b"'),
+ array('a b', null, '"a b"'),
+ array('"a<b"', null, "'\"a&lt;b\"'"),
+ array('foo', array('f' => 'z'), '"zoo"'),
+ array('<a>', array('a' => '&amp;'), '"&lt;&amp;&gt;"'),
+ );
+ }
+
+ /**
+ * @dataProvider quoteattr_test_data
+ */
+ public function test_quoteattr($input, $entities, $expected)
+ {
+ $output = phpbb_quoteattr($input, $entities);
+
+ $this->assertEquals($expected, $output);
+ }
+}
diff --git a/tests/functions/validate_password_test.php b/tests/functions/validate_password_test.php
index 4639f6cc89..82c5fa03c1 100644
--- a/tests/functions/validate_password_test.php
+++ b/tests/functions/validate_password_test.php
@@ -7,6 +7,7 @@
*
*/
+require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php';
require_once dirname(__FILE__) . '/../../phpBB/includes/functions_user.php';
require_once dirname(__FILE__) . '/validate_data_helper.php';
diff --git a/tests/functions_acp/build_cfg_template_test.php b/tests/functions_acp/build_cfg_template_test.php
new file mode 100644
index 0000000000..7f8db799c5
--- /dev/null
+++ b/tests/functions_acp/build_cfg_template_test.php
@@ -0,0 +1,287 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2010 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+require_once dirname(__FILE__) . '/../../phpBB/includes/functions_acp.php';
+
+class phpbb_functions_acp_build_cfg_template_test extends phpbb_test_case
+{
+ public function build_cfg_template_text_data()
+ {
+ return array(
+ array(
+ array('text', 20, 255),
+ 'key_name',
+ array('config_key_name' => '1'),
+ 'config_key_name',
+ array(),
+ '<input id="key_name" type="text" size="20" maxlength="255" name="config[config_key_name]" value="1" />',
+ ),
+ array(
+ array('password', 20, 128),
+ 'key_name',
+ array('config_key_name' => '2'),
+ 'config_key_name',
+ array(),
+ '<input id="key_name" type="password" size="20" maxlength="128" name="config[config_key_name]" value="2" autocomplete="off" />',
+ ),
+ array(
+ array('text', 0, 255),
+ 'key_name',
+ array('config_key_name' => '3'),
+ 'config_key_name',
+ array(),
+ '<input id="key_name" type="text" maxlength="255" name="config[config_key_name]" value="3" />',
+ ),
+ );
+ }
+
+ /**
+ * @dataProvider build_cfg_template_text_data
+ */
+ public function test_build_cfg_template_text($tpl_type, $key, $new, $config_key, $vars, $expected)
+ {
+ global $user, $phpbb_dispatcher;
+
+ $phpbb_dispatcher = new phpbb_mock_event_dispatcher();
+ $user = new phpbb_mock_user();
+ $user->lang = new phpbb_mock_lang();
+
+ $this->assertEquals($expected, build_cfg_template($tpl_type, $key, $new, $config_key, $vars));
+ }
+
+ public function build_cfg_template_dimension_data()
+ {
+ return array(
+ array(
+ array('dimension', 5, 15),
+ 'number_key_name',
+ array('config_key_name_width' => 10, 'config_key_name_height' => 20),
+ 'config_key_name',
+ array(),
+ '<input id="number_key_name" type="number" size="2" maxlength="2" min="5" max="15" name="config[config_key_name_width]" value="10" /> x <input type="number" size="2" maxlength="2" min="5" max="15" name="config[config_key_name_height]" value="20" />',
+ ),
+ array(
+ array('dimension', 0, 15),
+ 'number_key_name',
+ array('config_key_name_width' => 10, 'config_key_name_height' => 20),
+ 'config_key_name',
+ array(),
+ '<input id="number_key_name" type="number" size="2" maxlength="2" min="0" max="15" name="config[config_key_name_width]" value="10" /> x <input type="number" size="2" maxlength="2" min="0" max="15" name="config[config_key_name_height]" value="20" />',
+ ),
+ );
+ }
+
+ /**
+ * @dataProvider build_cfg_template_dimension_data
+ */
+ public function test_build_cfg_template_dimension($tpl_type, $key, $new, $config_key, $vars, $expected)
+ {
+ global $user, $phpbb_dispatcher;
+
+ $phpbb_dispatcher = new phpbb_mock_event_dispatcher();
+ $user = new phpbb_mock_user();
+ $user->lang = new phpbb_mock_lang();
+
+ $this->assertEquals($expected, build_cfg_template($tpl_type, $key, $new, $config_key, $vars));
+ }
+
+ public function build_cfg_template_number_data()
+ {
+ return array(
+ array(
+ array('number', 5, 15),
+ 'number_key_name',
+ array('config_key_name' => 10),
+ 'config_key_name',
+ array(),
+ '<input id="number_key_name" type="number" maxlength="2" min="5" max="15" name="config[config_key_name]" value="10" />',
+ ),
+ array(
+ array('number', -1, 9999),
+ 'number_key_name',
+ array('config_key_name' => 10),
+ 'config_key_name',
+ array(),
+ '<input id="number_key_name" type="number" maxlength="4" min="-1" max="9999" name="config[config_key_name]" value="10" />',
+ ),
+ );
+ }
+
+ /**
+ * @dataProvider build_cfg_template_number_data
+ */
+ public function test_build_cfg_template_number($tpl_type, $key, $new, $config_key, $vars, $expected)
+ {
+ global $user, $phpbb_dispatcher;
+
+ $phpbb_dispatcher = new phpbb_mock_event_dispatcher();
+ $user = new phpbb_mock_user();
+ $user->lang = new phpbb_mock_lang();
+
+ $this->assertEquals($expected, build_cfg_template($tpl_type, $key, $new, $config_key, $vars));
+ }
+
+ public function build_cfg_template_textarea_data()
+ {
+ return array(
+ array(
+ array('textarea', 5, 30),
+ 'key_name',
+ array('config_key_name' => 'phpBB'),
+ 'config_key_name',
+ array(),
+ '<textarea id="key_name" name="config[config_key_name]" rows="5" cols="30">phpBB</textarea>',
+ ),
+ );
+ }
+
+ /**
+ * @dataProvider build_cfg_template_textarea_data
+ */
+ public function test_build_cfg_template_textarea($tpl_type, $key, $new, $config_key, $vars, $expected)
+ {
+ global $user, $phpbb_dispatcher;
+
+ $phpbb_dispatcher = new phpbb_mock_event_dispatcher();
+ $user = new phpbb_mock_user();
+ $user->lang = new phpbb_mock_lang();
+
+ $this->assertEquals($expected, build_cfg_template($tpl_type, $key, $new, $config_key, $vars));
+ }
+
+ public function build_cfg_template_radio_data()
+ {
+ return array(
+ array(
+ array('radio', 'enabled_disabled'),
+ 'key_name',
+ array('config_key_name' => '0'),
+ 'config_key_name',
+ array(),
+ '<label><input type="radio" id="key_name" name="config[config_key_name]" value="1" class="radio" /> ENABLED</label><label><input type="radio" name="config[config_key_name]" value="0" checked="checked" class="radio" /> DISABLED</label>',
+ ),
+ array(
+ array('radio', 'enabled_disabled'),
+ 'key_name',
+ array('config_key_name' => '1'),
+ 'config_key_name',
+ array(),
+ '<label><input type="radio" id="key_name" name="config[config_key_name]" value="1" checked="checked" class="radio" /> ENABLED</label><label><input type="radio" name="config[config_key_name]" value="0" class="radio" /> DISABLED</label>',
+ ),
+ array(
+ array('radio', 'yes_no'),
+ 'key_name',
+ array('config_key_name' => '0'),
+ 'config_key_name',
+ array(),
+ '<label><input type="radio" id="key_name" name="config[config_key_name]" value="1" class="radio" /> YES</label><label><input type="radio" name="config[config_key_name]" value="0" checked="checked" class="radio" /> NO</label>',
+ ),
+ array(
+ array('radio', 'yes_no'),
+ 'key_name',
+ array('config_key_name' => '1'),
+ 'config_key_name',
+ array(),
+ '<label><input type="radio" id="key_name" name="config[config_key_name]" value="1" checked="checked" class="radio" /> YES</label><label><input type="radio" name="config[config_key_name]" value="0" class="radio" /> NO</label>',
+ ),
+ );
+ }
+
+ /**
+ * @dataProvider build_cfg_template_radio_data
+ */
+ public function test_build_cfg_template_radio($tpl_type, $key, $new, $config_key, $vars, $expected)
+ {
+ global $user, $phpbb_dispatcher;
+
+ $phpbb_dispatcher = new phpbb_mock_event_dispatcher();
+ $user = new phpbb_mock_user();
+ $user->lang = new phpbb_mock_lang();
+
+ $this->assertEquals($expected, build_cfg_template($tpl_type, $key, $new, $config_key, $vars));
+ }
+
+ public function build_cfg_template_append_data()
+ {
+ return array(
+ array(
+ array('textarea', 5, 30),
+ 'key_name',
+ array('config_key_name' => 'phpBB'),
+ 'config_key_name',
+ array('append' => 'Bertie is cool!'),
+ '<textarea id="key_name" name="config[config_key_name]" rows="5" cols="30">phpBB</textarea>Bertie is cool!',
+ ),
+ );
+ }
+
+ /**
+ * @dataProvider build_cfg_template_append_data
+ */
+ public function test_build_cfg_template_append($tpl_type, $key, $new, $config_key, $vars, $expected)
+ {
+ global $user, $phpbb_dispatcher;
+
+ $phpbb_dispatcher = new phpbb_mock_event_dispatcher();
+ $user = new phpbb_mock_user();
+ $user->lang = new phpbb_mock_lang();
+
+ $this->assertEquals($expected, build_cfg_template($tpl_type, $key, $new, $config_key, $vars));
+ }
+
+ public function build_cfg_template_select_data()
+ {
+ return array(
+ array(
+ array('select'),
+ 'key_name',
+ array('config_key_name' => '0'),
+ 'config_key_name',
+ array('method' => 'select_helper'),
+ '<select id="key_name" name="config[config_key_name]"><option value="1">First_Option</option><option value="2" selected="selected">Second_Option</option><option value="3">Third_Option</option></select>',
+ ),
+ array(
+ array('select', 8),
+ 'key_name',
+ array('config_key_name' => '1'),
+ 'config_key_name',
+ array('method' => 'select_helper'),
+ '<select id="key_name" name="config[config_key_name]" size="8"><option value="1">First_Option</option><option value="2" selected="selected">Second_Option</option><option value="3">Third_Option</option></select>',
+ ),
+ );
+ }
+
+ /**
+ * @dataProvider build_cfg_template_select_data
+ */
+ public function test_build_cfg_template_select($tpl_type, $key, $new, $config_key, $vars, $expected)
+ {
+ global $module, $user, $phpbb_dispatcher;
+
+ $phpbb_dispatcher = new phpbb_mock_event_dispatcher();
+ $user = new phpbb_mock_user();
+ $user->lang = new phpbb_mock_lang();
+ $user->module = $this;
+ $module = $user;
+
+ $this->assertEquals($expected, build_cfg_template($tpl_type, $key, $new, $config_key, $vars));
+ }
+
+ public function select_helper()
+ {
+ return build_select(
+ array(
+ '1' => 'First_Option',
+ '2' => 'Second_Option',
+ '3' => 'Third_Option',
+ ),
+ '2'
+ );
+ }
+}
diff --git a/tests/functions_acp/build_select_test.php b/tests/functions_acp/build_select_test.php
new file mode 100644
index 0000000000..c44fd97ec3
--- /dev/null
+++ b/tests/functions_acp/build_select_test.php
@@ -0,0 +1,61 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2010 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+require_once dirname(__FILE__) . '/../../phpBB/includes/functions_acp.php';
+
+class phpbb_functions_acp_built_select_test extends phpbb_test_case
+{
+ protected function setUp()
+ {
+ parent::setUp();
+
+ global $user;
+
+ $user = new phpbb_mock_user();
+ $user->lang = new phpbb_mock_lang();
+ }
+
+ public function build_select_data()
+ {
+ return array(
+ array(
+ array(
+ 'test' => 'TEST',
+ 'second' => 'SEC_OPTION',
+ ),
+ false,
+ '<option value="test">TEST</option><option value="second">SEC_OPTION</option>',
+ ),
+ array(
+ array(
+ 'test' => 'TEST',
+ 'second' => 'SEC_OPTION',
+ ),
+ 'test',
+ '<option value="test" selected="selected">TEST</option><option value="second">SEC_OPTION</option>',
+ ),
+ array(
+ array(
+ 'test' => 'TEST',
+ 'second' => 'SEC_OPTION',
+ ),
+ 'second',
+ '<option value="test">TEST</option><option value="second" selected="selected">SEC_OPTION</option>',
+ ),
+ );
+ }
+
+ /**
+ * @dataProvider build_select_data
+ */
+ public function test_build_select($option_ary, $option_default, $expected)
+ {
+ $this->assertEquals($expected, build_select($option_ary, $option_default));
+ }
+}
diff --git a/tests/functions_acp/h_radio_test.php b/tests/functions_acp/h_radio_test.php
new file mode 100644
index 0000000000..4c1872d341
--- /dev/null
+++ b/tests/functions_acp/h_radio_test.php
@@ -0,0 +1,126 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2010 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+require_once dirname(__FILE__) . '/../../phpBB/includes/functions_acp.php';
+
+class phpbb_functions_acp_h_radio_test extends phpbb_test_case
+{
+ protected function setUp()
+ {
+ parent::setUp();
+
+ global $user;
+
+ $user = new phpbb_mock_user();
+ $user->lang = new phpbb_mock_lang();
+ }
+
+ public function h_radio_data()
+ {
+ return array(
+ array(
+ 'test_name',
+ array(
+ 'test' => 'TEST',
+ 'second' => 'SEC_OPTION',
+ ),
+ false,
+ false,
+ false,
+ '<label><input type="radio" name="test_name" value="test" class="radio" /> TEST</label><label><input type="radio" name="test_name" value="second" class="radio" /> SEC_OPTION</label>',
+ ),
+ array(
+ 'test_name',
+ array(
+ 'test' => 'TEST',
+ 'second' => 'SEC_OPTION',
+ ),
+ 'test',
+ false,
+ false,
+ '<label><input type="radio" name="test_name" value="test" checked="checked" class="radio" /> TEST</label><label><input type="radio" name="test_name" value="second" class="radio" /> SEC_OPTION</label>',
+ ),
+ array(
+ 'test_name',
+ array(
+ 'test' => 'TEST',
+ 'second' => 'SEC_OPTION',
+ ),
+ false,
+ 'test_id',
+ false,
+ '<label><input type="radio" name="test_name" id="test_id" value="test" class="radio" /> TEST</label><label><input type="radio" name="test_name" value="second" class="radio" /> SEC_OPTION</label>',
+ ),
+ array(
+ 'test_name',
+ array(
+ 'test' => 'TEST',
+ 'second' => 'SEC_OPTION',
+ ),
+ 'test',
+ 'test_id',
+ false,
+ '<label><input type="radio" name="test_name" id="test_id" value="test" checked="checked" class="radio" /> TEST</label><label><input type="radio" name="test_name" value="second" class="radio" /> SEC_OPTION</label>',
+ ),
+
+ array(
+ 'test_name',
+ array(
+ 'test' => 'TEST',
+ 'second' => 'SEC_OPTION',
+ ),
+ false,
+ false,
+ 'k',
+ '<label><input type="radio" name="test_name" value="test" accesskey="k" class="radio" /> TEST</label><label><input type="radio" name="test_name" value="second" accesskey="k" class="radio" /> SEC_OPTION</label>',
+ ),
+ array(
+ 'test_name',
+ array(
+ 'test' => 'TEST',
+ 'second' => 'SEC_OPTION',
+ ),
+ 'test',
+ false,
+ 'k',
+ '<label><input type="radio" name="test_name" value="test" checked="checked" accesskey="k" class="radio" /> TEST</label><label><input type="radio" name="test_name" value="second" accesskey="k" class="radio" /> SEC_OPTION</label>',
+ ),
+ array(
+ 'test_name',
+ array(
+ 'test' => 'TEST',
+ 'second' => 'SEC_OPTION',
+ ),
+ false,
+ 'test_id',
+ 'k',
+ '<label><input type="radio" name="test_name" id="test_id" value="test" accesskey="k" class="radio" /> TEST</label><label><input type="radio" name="test_name" value="second" accesskey="k" class="radio" /> SEC_OPTION</label>',
+ ),
+ array(
+ 'test_name',
+ array(
+ 'test' => 'TEST',
+ 'second' => 'SEC_OPTION',
+ ),
+ 'test',
+ 'test_id',
+ 'k',
+ '<label><input type="radio" name="test_name" id="test_id" value="test" checked="checked" accesskey="k" class="radio" /> TEST</label><label><input type="radio" name="test_name" value="second" accesskey="k" class="radio" /> SEC_OPTION</label>',
+ ),
+ );
+ }
+
+ /**
+ * @dataProvider h_radio_data
+ */
+ public function test_h_radio($name, $input_ary, $input_default, $id, $key, $expected)
+ {
+ $this->assertEquals($expected, h_radio($name, $input_ary, $input_default, $id, $key));
+ }
+}
diff --git a/tests/functions_acp/validate_config_vars_test.php b/tests/functions_acp/validate_config_vars_test.php
new file mode 100644
index 0000000000..acc98fbf0d
--- /dev/null
+++ b/tests/functions_acp/validate_config_vars_test.php
@@ -0,0 +1,161 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2010 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+require_once dirname(__FILE__) . '/../../phpBB/includes/functions_acp.php';
+require_once dirname(__FILE__) . '/../../phpBB/includes/utf/utf_tools.php';
+
+class phpbb_functions_acp_validate_config_vars_test extends phpbb_test_case
+{
+ protected function setUp()
+ {
+ parent::setUp();
+
+ global $user;
+
+ $user = new phpbb_mock_user();
+ $user->lang = new phpbb_mock_lang();
+ }
+
+ /**
+ * Data sets that don't throw an error.
+ */
+ public function validate_config_vars_fit_data()
+ {
+ return array(
+ array(
+ array(
+ 'test_bool' => array('lang' => 'TEST_BOOL', 'validate' => 'bool'),
+ 'test_string' => array('lang' => 'TEST_STRING', 'validate' => 'string'),
+ 'test_string' => array('lang' => 'TEST_STRING', 'validate' => 'string'),
+ 'test_string_128' => array('lang' => 'TEST_STRING_128', 'validate' => 'string:128'),
+ 'test_string_128' => array('lang' => 'TEST_STRING_128', 'validate' => 'string:128'),
+ 'test_string_32_64' => array('lang' => 'TEST_STRING_32_64', 'validate' => 'string:32:64'),
+ 'test_string_32_64' => array('lang' => 'TEST_STRING_32_64', 'validate' => 'string:32:64'),
+ 'test_int' => array('lang' => 'TEST_INT', 'validate' => 'int'),
+ 'test_int_32' => array('lang' => 'TEST_INT', 'validate' => 'int:32'),
+ 'test_int_32_64' => array('lang' => 'TEST_INT', 'validate' => 'int:32:64'),
+ 'test_lang' => array('lang' => 'TEST_LANG', 'validate' => 'lang'),
+ /*
+ 'test_sp' => array('lang' => 'TEST_SP', 'validate' => 'script_path'),
+ 'test_rpath' => array('lang' => 'TEST_RPATH', 'validate' => 'rpath'),
+ 'test_rwpath' => array('lang' => 'TEST_RWPATH', 'validate' => 'rwpath'),
+ 'test_path' => array('lang' => 'TEST_PATH', 'validate' => 'path'),
+ 'test_wpath' => array('lang' => 'TEST_WPATH', 'validate' => 'wpath'),
+ */
+ ),
+ array(
+ 'test_bool' => true,
+ 'test_string' => str_repeat('a', 255),
+ 'test_string' => str_repeat("\xC3\x84", 255),
+ 'test_string_128' => str_repeat('a', 128),
+ 'test_string_128' => str_repeat("\xC3\x84", 128),
+ 'test_string_32_64' => str_repeat('a', 48),
+ 'test_string_32_64' => str_repeat("\xC3\x84", 48),
+ 'test_int' => 128,
+ 'test_int_32' => 32,
+ 'test_int_32_64' => 48,
+ 'test_lang' => 'en',
+ ),
+ ),
+ );
+ }
+
+ /**
+ * @dataProvider validate_config_vars_fit_data
+ */
+ public function test_validate_config_vars_fit($test_data, $cfg_array)
+ {
+ $phpbb_error = array();
+ validate_config_vars($test_data, $cfg_array, $phpbb_error);
+
+ $this->assertEquals(array(), $phpbb_error);
+ }
+
+ /**
+ * Data sets that throw the error.
+ */
+ public function validate_config_vars_error_data()
+ {
+ return array(
+ array(
+ array('test_string_32_64' => array('lang' => 'TEST_STRING_32_64', 'validate' => 'string:32:64')),
+ array('test_string_32_64' => str_repeat('a', 20)),
+ array('SETTING_TOO_SHORT'),
+ ),
+ array(
+ array('test_string_32_64' => array('lang' => 'TEST_STRING_32_64', 'validate' => 'string:32:64')),
+ array('test_string_32_64' => str_repeat("\xC3\x84", 20)),
+ array('SETTING_TOO_SHORT'),
+ ),
+ array(
+ array('test_string' => array('lang' => 'TEST_STRING', 'validate' => 'string')),
+ array('test_string' => str_repeat('a', 256)),
+ array('SETTING_TOO_LONG'),
+ ),
+ array(
+ array('test_string' => array('lang' => 'TEST_STRING', 'validate' => 'string')),
+ array('test_string' => str_repeat("\xC3\x84", 256)),
+ array('SETTING_TOO_LONG'),
+ ),
+ array(
+ array('test_string_32_64' => array('lang' => 'TEST_STRING_32_64', 'validate' => 'string:32:64')),
+ array('test_string_32_64' => str_repeat('a', 65)),
+ array('SETTING_TOO_LONG'),
+ ),
+ array(
+ array('test_string_32_64' => array('lang' => 'TEST_STRING_32_64', 'validate' => 'string:32:64')),
+ array('test_string_32_64' => str_repeat("\xC3\x84", 65)),
+ array('SETTING_TOO_LONG'),
+ ),
+
+ array(
+ array('test_int_32' => array('lang' => 'TEST_INT', 'validate' => 'int:32')),
+ array('test_int_32' => 31),
+ array('SETTING_TOO_LOW'),
+ ),
+ array(
+ array('test_int_32_64' => array('lang' => 'TEST_INT', 'validate' => 'int:32:64')),
+ array('test_int_32_64' => 31),
+ array('SETTING_TOO_LOW'),
+ ),
+ array(
+ array('test_int_32_64' => array('lang' => 'TEST_INT', 'validate' => 'int:32:64')),
+ array('test_int_32_64' => 65),
+ array('SETTING_TOO_BIG'),
+ ),
+ array(
+ array(
+ 'test_int_min' => array('lang' => 'TEST_INT_MIN', 'validate' => 'int:32:64'),
+ 'test_int_max' => array('lang' => 'TEST_INT_MAX', 'validate' => 'int:32:64'),
+ ),
+ array(
+ 'test_int_min' => 52,
+ 'test_int_max' => 48,
+ ),
+ array('SETTING_TOO_LOW'),
+ ),
+ array(
+ array('test_lang' => array('lang' => 'TEST_LANG', 'validate' => 'lang')),
+ array('test_lang' => 'this_is_no_language'),
+ array('WRONG_DATA_LANG'),
+ ),
+ );
+ }
+
+ /**
+ * @dataProvider validate_config_vars_error_data
+ */
+ public function test_validate_config_vars_error($test_data, $cfg_array, $expected)
+ {
+ $phpbb_error = array();
+ validate_config_vars($test_data, $cfg_array, $phpbb_error);
+
+ $this->assertEquals($expected, $phpbb_error);
+ }
+}
diff --git a/tests/functions_acp/validate_range_test.php b/tests/functions_acp/validate_range_test.php
new file mode 100644
index 0000000000..cb028d4d07
--- /dev/null
+++ b/tests/functions_acp/validate_range_test.php
@@ -0,0 +1,164 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2010 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+require_once dirname(__FILE__) . '/../../phpBB/includes/utf/utf_tools.php';
+require_once dirname(__FILE__) . '/../../phpBB/includes/functions_acp.php';
+
+class phpbb_functions_acp_validate_range_test extends phpbb_test_case
+{
+ protected function setUp()
+ {
+ parent::setUp();
+
+ global $user;
+
+ $user = new phpbb_mock_user();
+ $user->lang = new phpbb_mock_lang();
+ }
+
+ /**
+ * Data sets that don't throw an error.
+ */
+ public function validate_range_data_fit()
+ {
+ return array(
+ array(array(array('column_type' => 'BOOL', 'lang' => 'TEST', 'value' => 0))),
+ array(array(array('column_type' => 'BOOL', 'lang' => 'TEST', 'value' => 1))),
+
+ array(array(array('column_type' => 'USINT', 'lang' => 'TEST', 'value' => 0))),
+ array(array(array('column_type' => 'USINT', 'lang' => 'TEST', 'value' => 65535))),
+ array(array(array('column_type' => 'USINT:32:128', 'lang' => 'TEST', 'value' => 35))),
+
+ array(array(array('column_type' => 'UINT', 'lang' => 'TEST', 'value' => 0))),
+ array(array(array('column_type' => 'UINT', 'lang' => 'TEST', 'value' => (int) 0x7fffffff))),
+ array(array(array('column_type' => 'UINT:32:128', 'lang' => 'TEST', 'value' => 35))),
+
+ array(array(array('column_type' => 'INT', 'lang' => 'TEST', 'value' => (int) -2147483648))),
+ array(array(array('column_type' => 'INT', 'lang' => 'TEST', 'value' => (int) 0x7fffffff))),
+ array(array(array('column_type' => 'INT:-32:128', 'lang' => 'TEST', 'value' => -28))),
+ array(array(array('column_type' => 'INT:-32:128', 'lang' => 'TEST', 'value' => 35))),
+
+ array(array(array('column_type' => 'TINT', 'lang' => 'TEST', 'value' => -128))),
+ array(array(array('column_type' => 'TINT', 'lang' => 'TEST', 'value' => 127))),
+ array(array(array('column_type' => 'TINT:-32:64', 'lang' => 'TEST', 'value' => -16))),
+ array(array(array('column_type' => 'TINT:-32:64', 'lang' => 'TEST', 'value' => 16))),
+
+ array(array(array('column_type' => 'VCHAR', 'lang' => 'TEST', 'value' => ''))),
+ array(array(array('column_type' => 'VCHAR', 'lang' => 'TEST', 'value' => str_repeat('a', 255)))),
+ array(array(array('column_type' => 'VCHAR', 'lang' => 'TEST', 'value' => str_repeat("\xC3\x84", 255)))),
+ array(array(array('column_type' => 'VCHAR:128', 'lang' => 'TEST', 'value' => str_repeat('a', 128)))),
+ array(array(array('column_type' => 'VCHAR:128', 'lang' => 'TEST', 'value' => str_repeat("\xC3\x84", 128)))),
+ );
+ }
+
+ /**
+ * @dataProvider validate_range_data_fit
+ */
+ public function test_validate_range_fit($test_data)
+ {
+ $phpbb_error = array();
+ validate_range($test_data, $phpbb_error);
+
+ $this->assertEquals(array(), $phpbb_error);
+ }
+
+ /**
+ * Data sets that throw the SETTING_TOO_LOW-error.
+ */
+ public function validate_range_data_too_low()
+ {
+ return array(
+ array(array(array('column_type' => 'BOOL', 'lang' => 'TEST', 'value' => -1))),
+
+ array(array(array('column_type' => 'USINT', 'lang' => 'TEST', 'value' => -1))),
+ array(array(array('column_type' => 'USINT:32:128', 'lang' => 'TEST', 'value' => 31))),
+
+ array(array(array('column_type' => 'UINT', 'lang' => 'TEST', 'value' => -1))),
+ array(array(array('column_type' => 'UINT:32:128', 'lang' => 'TEST', 'value' => 31))),
+
+ array(array(array('column_type' => 'INT', 'lang' => 'TEST', 'value' => ((int) -2147483648) - 1))),
+ array(array(array('column_type' => 'INT:32:128', 'lang' => 'TEST', 'value' => 31))),
+ array(array(array('column_type' => 'INT:-32:128', 'lang' => 'TEST', 'value' => -33))),
+
+ array(array(array('column_type' => 'TINT', 'lang' => 'TEST', 'value' => -129))),
+ array(array(array('column_type' => 'TINT:32:64', 'lang' => 'TEST', 'value' => 31))),
+ array(array(array('column_type' => 'TINT:-32:64', 'lang' => 'TEST', 'value' => -33))),
+ );
+ }
+
+ /**
+ * @dataProvider validate_range_data_too_low
+ */
+ public function test_validate_range_too_low($test_data)
+ {
+ $phpbb_error = array();
+ validate_range($test_data, $phpbb_error);
+
+ $this->assertEquals(array('SETTING_TOO_LOW'), $phpbb_error);
+ }
+
+ /**
+ * Data sets that throw the SETTING_TOO_BIG-error.
+ */
+ public function validate_range_data_too_big()
+ {
+ return array(
+ array(array(array('column_type' => 'BOOL', 'lang' => 'TEST', 'value' => 2))),
+
+ array(array(array('column_type' => 'USINT', 'lang' => 'TEST', 'value' => 65536))),
+ array(array(array('column_type' => 'USINT:32:128', 'lang' => 'TEST', 'value' => 129))),
+
+ array(array(array('column_type' => 'UINT', 'lang' => 'TEST', 'value' => ((int) 0x7fffffff) + 1))),
+ array(array(array('column_type' => 'UINT:32:128', 'lang' => 'TEST', 'value' => 129))),
+
+ array(array(array('column_type' => 'INT', 'lang' => 'TEST', 'value' => ((int) 0x7fffffff) + 1))),
+ array(array(array('column_type' => 'INT:-32:-16', 'lang' => 'TEST', 'value' => -15))),
+ array(array(array('column_type' => 'INT:-32:128', 'lang' => 'TEST', 'value' => 129))),
+
+ array(array(array('column_type' => 'TINT', 'lang' => 'TEST', 'value' => 128))),
+ array(array(array('column_type' => 'TINT:-32:-16', 'lang' => 'TEST', 'value' => -15))),
+ array(array(array('column_type' => 'TINT:-32:64', 'lang' => 'TEST', 'value' => 65))),
+ );
+ }
+
+ /**
+ * @dataProvider validate_range_data_too_big
+ */
+ public function test_validate_range_too_big($test_data)
+ {
+ $phpbb_error = array();
+ validate_range($test_data, $phpbb_error);
+
+ $this->assertEquals(array('SETTING_TOO_BIG'), $phpbb_error);
+ }
+
+ /**
+ * Data sets that throw the SETTING_TOO_LONG-error.
+ */
+ public function validate_range_data_too_long()
+ {
+ return array(
+ array(array(array('column_type' => 'VCHAR', 'lang' => 'TEST', 'value' => str_repeat('a', 256)))),
+ array(array(array('column_type' => 'VCHAR', 'lang' => 'TEST', 'value' => str_repeat("\xC3\x84", 256)))),
+ array(array(array('column_type' => 'VCHAR:128', 'lang' => 'TEST', 'value' => str_repeat('a', 129)))),
+ array(array(array('column_type' => 'VCHAR:128', 'lang' => 'TEST', 'value' => str_repeat("\xC3\x84", 129)))),
+ );
+ }
+
+ /**
+ * @dataProvider validate_range_data_too_long
+ */
+ public function test_validate_range_too_long($test_data)
+ {
+ $phpbb_error = array();
+ validate_range($test_data, $phpbb_error);
+
+ $this->assertEquals(array('SETTING_TOO_LONG'), $phpbb_error);
+ }
+}
diff --git a/tests/functions_install/ignore_new_file_on_update_test.php b/tests/functions_install/ignore_new_file_on_update_test.php
new file mode 100644
index 0000000000..703da4e435
--- /dev/null
+++ b/tests/functions_install/ignore_new_file_on_update_test.php
@@ -0,0 +1,41 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+require_once dirname(__FILE__) . '/../../phpBB/includes/functions_install.php';
+
+class phpbb_functions_install_ignore_new_file_on_update_test extends phpbb_test_case
+{
+ static public function ignore_new_file_on_update_data()
+ {
+ return array(
+ array('willneverexist.php', false),
+ array('includes/dirwillneverexist/newfile.php', false),
+
+ array('language/en/email/short/bookmark.txt', false),
+ array('language/languagewillneverexist/email/short/bookmark.txt', true),
+
+ array('styles/prosilver/template/bbcode.html', false),
+ array('styles/stylewillneverexist/template/bbcode.html', true),
+
+ array('styles/prosilver/theme/en/icon_user_online.gif', false),
+ array('styles/prosilver/theme/languagewillneverexist/icon_user_online.gif', true),
+
+ array('styles/prosilver/theme/imageset.css', false),
+ );
+ }
+
+ /**
+ * @dataProvider ignore_new_file_on_update_data
+ */
+ public function test_ignore_new_file_on_update($file, $expected)
+ {
+ global $phpbb_root_path;
+ $this->assertEquals($expected, phpbb_ignore_new_file_on_update($phpbb_root_path, $file));
+ }
+}
diff --git a/tests/functions_user/fixtures/group_user_attributes.xml b/tests/functions_user/fixtures/group_user_attributes.xml
new file mode 100644
index 0000000000..9b1f1f504b
--- /dev/null
+++ b/tests/functions_user/fixtures/group_user_attributes.xml
@@ -0,0 +1,113 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<dataset>
+ <table name="phpbb_groups">
+ <column>group_id</column>
+ <column>group_avatar</column>
+ <column>group_rank</column>
+ <column>group_desc</column>
+ <row>
+ <value>1</value>
+ <value>default</value>
+ <value>1</value>
+ <value></value>
+ </row>
+ <row>
+ <value>2</value>
+ <value></value>
+ <value>0</value>
+ <value></value>
+ </row>
+ <row>
+ <value>3</value>
+ <value>default2</value>
+ <value>3</value>
+ <value></value>
+ </row>
+ </table>
+ <table name="phpbb_users">
+ <column>user_id</column>
+ <column>group_id</column>
+ <column>user_avatar</column>
+ <column>user_rank</column>
+ <column>username_clean</column>
+ <column>user_permissions</column>
+ <column>user_sig</column>
+ <row>
+ <value>1</value>
+ <value>1</value>
+ <value></value>
+ <value>0</value>
+ <value>barfoo</value>
+ <value></value>
+ <value></value>
+ </row>
+ <row>
+ <value>2</value>
+ <value>1</value>
+ <value>default</value>
+ <value>1</value>
+ <value>foobar</value>
+ <value></value>
+ <value></value>
+ </row>
+ <row>
+ <value>3</value>
+ <value>1</value>
+ <value>custom</value>
+ <value>2</value>
+ <value>bertie</value>
+ <value></value>
+ <value></value>
+ </row>
+ </table>
+ <table name="phpbb_user_group">
+ <column>user_id</column>
+ <column>group_id</column>
+ <column>user_pending</column>
+ <row>
+ <value>1</value>
+ <value>1</value>
+ <value>0</value>
+ </row>
+ <row>
+ <value>1</value>
+ <value>2</value>
+ <value>0</value>
+ </row>
+ <row>
+ <value>1</value>
+ <value>3</value>
+ <value>0</value>
+ </row>
+ <row>
+ <value>2</value>
+ <value>1</value>
+ <value>0</value>
+ </row>
+ <row>
+ <value>2</value>
+ <value>2</value>
+ <value>0</value>
+ </row>
+ <row>
+ <value>2</value>
+ <value>3</value>
+ <value>0</value>
+ </row>
+ <row>
+ <value>3</value>
+ <value>1</value>
+ <value>0</value>
+ </row>
+ <row>
+ <value>3</value>
+ <value>2</value>
+ <value>0</value>
+ </row>
+ <row>
+ <value>3</value>
+ <value>3</value>
+ <value>0</value>
+ </row>
+ </table>
+</dataset>
diff --git a/tests/functions_user/group_user_attributes_test.php b/tests/functions_user/group_user_attributes_test.php
new file mode 100644
index 0000000000..86e4767970
--- /dev/null
+++ b/tests/functions_user/group_user_attributes_test.php
@@ -0,0 +1,158 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2008 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php';
+require_once dirname(__FILE__) . '/../../phpBB/includes/functions_user.php';
+require_once dirname(__FILE__) . '/../../phpBB/includes/utf/utf_tools.php';
+
+class phpbb_functions_user_group_user_attributes_test extends phpbb_database_test_case
+{
+ public function getDataSet()
+ {
+ return $this->createXMLDataSet(dirname(__FILE__).'/fixtures/group_user_attributes.xml');
+ }
+
+ public function group_user_attributes_data()
+ {
+ return array(
+ array(
+ 'Setting new default group without settings for user with no settings - no change',
+ 1,
+ 2,
+ array(
+ 'group_avatar' => '',
+ 'group_avatar_type' => '',
+ 'group_avatar_height' => 0,
+ 'group_avatar_width' => 0,
+ 'group_rank' => 0,
+ ),
+ array(
+ 'user_avatar' => '',
+ 'user_rank' => 0,
+ ),
+ ),
+ array(
+ 'Setting new default group without settings for user with default settings - user settings overwritten',
+ 2,
+ 2,
+ array(
+ 'group_avatar' => '',
+ 'group_avatar_type' => '',
+ 'group_avatar_height' => 0,
+ 'group_avatar_width' => 0,
+ 'group_rank' => 0,
+ ),
+ array(
+ 'user_avatar' => '',
+ 'user_rank' => 0,
+ ),
+ ),
+ array(
+ 'Setting new default group without settings for user with custom settings - no change',
+ 3,
+ 2,
+ array(
+ 'group_avatar' => '',
+ 'group_avatar_type' => '',
+ 'group_avatar_height' => 0,
+ 'group_avatar_width' => 0,
+ 'group_rank' => 0,
+ ),
+ array(
+ 'user_avatar' => 'custom',
+ 'user_rank' => 2,
+ ),
+ ),
+ array(
+ 'Setting new default group with settings for user with no settings - user settings overwritten',
+ 1,
+ 3,
+ array(
+ 'group_avatar' => 'default2',
+ 'group_avatar_type' => 'avatar.driver.upload',
+ 'group_avatar_height' => 1,
+ 'group_avatar_width' => 1,
+ 'group_rank' => 3,
+ ),
+ array(
+ 'user_avatar' => 'default2',
+ 'user_rank' => 3,
+ ),
+ ),
+ array(
+ 'Setting new default group with settings for user with default settings - user settings overwritten',
+ 2,
+ 3,
+ array(
+ 'group_avatar' => 'default2',
+ 'group_avatar_type' => 'avatar.driver.upload',
+ 'group_avatar_height' => 1,
+ 'group_avatar_width' => 1,
+ 'group_rank' => 3,
+ ),
+ array(
+ 'user_avatar' => 'default2',
+ 'user_rank' => 3,
+ ),
+ ),
+ array(
+ 'Setting new default group with settings for user with custom settings - no change',
+ 3,
+ 3,
+ array(
+ 'group_avatar' => 'default2',
+ 'group_avatar_type' => 'avatar.driver.upload',
+ 'group_avatar_height' => 1,
+ 'group_avatar_width' => 1,
+ 'group_rank' => 3,
+ ),
+ array(
+ 'user_avatar' => 'custom',
+ 'user_rank' => 2,
+ ),
+ ),
+ );
+ }
+
+ /**
+ * @dataProvider group_user_attributes_data
+ */
+ public function test_group_user_attributes($description, $user_id, $group_id, $group_row, $expected)
+ {
+ global $auth, $cache, $db, $phpbb_dispatcher, $user, $phpbb_container, $phpbb_log, $phpbb_root_path, $phpEx;
+
+ $user = new phpbb_mock_user;
+ $user->ip = '';
+ $cache = new phpbb_mock_cache;
+ $db = $this->new_dbal();
+ $phpbb_dispatcher = new phpbb_mock_event_dispatcher();
+ $auth = $this->getMock('\phpbb\auth\auth');
+ $auth->expects($this->any())
+ ->method('acl_clear_prefetch');
+ $cache_driver = new \phpbb\cache\driver\null();
+ $phpbb_container = $this->getMock('Symfony\Component\DependencyInjection\ContainerInterface');
+ $phpbb_container
+ ->expects($this->any())
+ ->method('get')
+ ->with('cache.driver')
+ ->will($this->returnValue($cache_driver));
+ $phpbb_log = new \phpbb\log\log($db, $user, $auth, $phpbb_dispatcher, $phpbb_root_path, 'adm/', $phpEx, LOG_TABLE);
+
+ group_user_attributes('default', $group_id, array($user_id), false, 'group_name', $group_row);
+
+ $sql = 'SELECT user_avatar, user_rank
+ FROM ' . USERS_TABLE . '
+ WHERE user_id = ' . $user_id;
+ $result = $db->sql_query($sql);
+
+ $this->assertEquals(array($expected), $db->sql_fetchrowset($result));
+
+ $db->sql_freeresult($result);
+ }
+}
diff --git a/tests/groupposition/fixtures/legend.xml b/tests/groupposition/fixtures/legend.xml
new file mode 100644
index 0000000000..a9209309bd
--- /dev/null
+++ b/tests/groupposition/fixtures/legend.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<dataset>
+ <table name="phpbb_groups">
+ <column>group_id</column>
+ <column>group_legend</column>
+ <column>group_desc</column>
+ <row>
+ <value>1</value>
+ <value>0</value>
+ <value></value>
+ </row>
+ <row>
+ <value>2</value>
+ <value>1</value>
+ <value></value>
+ </row>
+ <row>
+ <value>3</value>
+ <value>2</value>
+ <value></value>
+ </row>
+ </table>
+</dataset>
diff --git a/tests/groupposition/fixtures/teampage.xml b/tests/groupposition/fixtures/teampage.xml
new file mode 100644
index 0000000000..b6c39045e3
--- /dev/null
+++ b/tests/groupposition/fixtures/teampage.xml
@@ -0,0 +1,102 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<dataset>
+ <table name="phpbb_groups">
+ <column>group_id</column>
+ <column>group_desc</column>
+ <row>
+ <value>1</value>
+ <value></value>
+ </row>
+ <row>
+ <value>2</value>
+ <value></value>
+ </row>
+ <row>
+ <value>3</value>
+ <value></value>
+ </row>
+ <row>
+ <value>4</value>
+ <value></value>
+ </row>
+ <row>
+ <value>5</value>
+ <value></value>
+ </row>
+ <row>
+ <value>6</value>
+ <value></value>
+ </row>
+ <row>
+ <value>7</value>
+ <value></value>
+ </row>
+ <row>
+ <value>8</value>
+ <value></value>
+ </row>
+ </table>
+ <table name="phpbb_teampage">
+ <column>teampage_id</column>
+ <column>group_id</column>
+ <column>teampage_name</column>
+ <column>teampage_position</column>
+ <column>teampage_parent</column>
+ <row>
+ <value>1</value>
+ <value>1</value>
+ <value></value>
+ <value>1</value>
+ <value>0</value>
+ </row>
+ <row>
+ <value>2</value>
+ <value>0</value>
+ <value>category - 2 children</value>
+ <value>2</value>
+ <value>0</value>
+ </row>
+ <row>
+ <value>3</value>
+ <value>2</value>
+ <value></value>
+ <value>3</value>
+ <value>2</value>
+ </row>
+ <row>
+ <value>4</value>
+ <value>3</value>
+ <value></value>
+ <value>4</value>
+ <value>2</value>
+ </row>
+ <row>
+ <value>5</value>
+ <value>0</value>
+ <value>category2 - 2 children</value>
+ <value>5</value>
+ <value>0</value>
+ </row>
+ <row>
+ <value>6</value>
+ <value>4</value>
+ <value></value>
+ <value>6</value>
+ <value>5</value>
+ </row>
+ <row>
+ <value>7</value>
+ <value>5</value>
+ <value></value>
+ <value>7</value>
+ <value>5</value>
+ </row>
+ <row>
+ <value>8</value>
+ <value>6</value>
+ <value></value>
+ <value>8</value>
+ <value>0</value>
+ </row>
+ </table>
+</dataset>
diff --git a/tests/groupposition/legend_test.php b/tests/groupposition/legend_test.php
new file mode 100644
index 0000000000..ac54a86b8e
--- /dev/null
+++ b/tests/groupposition/legend_test.php
@@ -0,0 +1,403 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+
+class phpbb_groupposition_legend_test extends phpbb_database_test_case
+{
+ public function getDataSet()
+ {
+ return $this->createXMLDataSet(dirname(__FILE__) . '/fixtures/legend.xml');
+ }
+
+ public function get_group_value_data()
+ {
+ return array(
+ array(1, 0, ''),
+ array(3, 2, ''),
+ array(4, 0, '\phpbb\groupposition\exception'),
+ );
+ }
+
+ /**
+ * @dataProvider get_group_value_data
+ */
+ public function test_get_group_value($group_id, $expected, $throws_exception)
+ {
+ global $cache;
+
+ $cache = new phpbb_mock_cache;
+ $db = $this->new_dbal();
+ $user = new \phpbb\user;
+ $user->lang = array();
+
+ if ($throws_exception)
+ {
+ $this->setExpectedException($throws_exception);
+ }
+
+ $test_class = new \phpbb\groupposition\legend($db, $user);
+ $this->assertEquals($expected, $test_class->get_group_value($group_id));
+ }
+
+ public function test_get_group_count()
+ {
+ global $cache;
+
+ $cache = new phpbb_mock_cache;
+ $db = $this->new_dbal();
+ $user = new \phpbb\user;
+ $user->lang = array();
+
+ $test_class = new \phpbb\groupposition\legend($db, $user);
+ $this->assertEquals(2, $test_class->get_group_count());
+ }
+
+ public function add_group_data()
+ {
+ return array(
+ array(
+ 1,
+ true,
+ array(
+ array('group_id' => 1, 'group_legend' => 3),
+ array('group_id' => 2, 'group_legend' => 1),
+ array('group_id' => 3, 'group_legend' => 2),
+ ),
+ ),
+ array(
+ 2,
+ false,
+ array(
+ array('group_id' => 1, 'group_legend' => 0),
+ array('group_id' => 2, 'group_legend' => 1),
+ array('group_id' => 3, 'group_legend' => 2),
+ ),
+ ),
+ );
+ }
+
+ /**
+ * @dataProvider add_group_data
+ */
+ public function test_add_group($group_id, $expected_added, $expected)
+ {
+ global $cache;
+
+ $cache = new phpbb_mock_cache;
+ $db = $this->new_dbal();
+ $user = new \phpbb\user;
+ $user->lang = array();
+
+ $test_class = new \phpbb\groupposition\legend($db, $user);
+ $this->assertEquals($expected_added, $test_class->add_group($group_id));
+
+ $result = $db->sql_query('SELECT group_id, group_legend
+ FROM ' . GROUPS_TABLE . '
+ ORDER BY group_id ASC');
+
+ $this->assertEquals($expected, $db->sql_fetchrowset($result));
+ }
+
+ public function delete_group_data()
+ {
+ return array(
+ array(
+ 1,
+ false,
+ false,
+ array(
+ array('group_id' => 1, 'group_legend' => 0),
+ array('group_id' => 2, 'group_legend' => 1),
+ array('group_id' => 3, 'group_legend' => 2),
+ ),
+ ),
+ array(
+ 2,
+ false,
+ true,
+ array(
+ array('group_id' => 1, 'group_legend' => 0),
+ array('group_id' => 2, 'group_legend' => 0),
+ array('group_id' => 3, 'group_legend' => 1),
+ ),
+ ),
+ array(
+ 3,
+ false,
+ true,
+ array(
+ array('group_id' => 1, 'group_legend' => 0),
+ array('group_id' => 2, 'group_legend' => 1),
+ array('group_id' => 3, 'group_legend' => 0),
+ ),
+ ),
+ array(
+ 1,
+ true,
+ false,
+ array(
+ array('group_id' => 1, 'group_legend' => 0),
+ array('group_id' => 2, 'group_legend' => 1),
+ array('group_id' => 3, 'group_legend' => 2),
+ ),
+ ),
+ array(
+ 2,
+ true,
+ true,
+ array(
+ array('group_id' => 1, 'group_legend' => 0),
+ array('group_id' => 2, 'group_legend' => 1),
+ array('group_id' => 3, 'group_legend' => 1),
+ ),
+ ),
+ array(
+ 3,
+ true,
+ true,
+ array(
+ array('group_id' => 1, 'group_legend' => 0),
+ array('group_id' => 2, 'group_legend' => 1),
+ array('group_id' => 3, 'group_legend' => 2),
+ ),
+ ),
+ );
+ }
+
+ /**
+ * @dataProvider delete_group_data
+ */
+ public function test_delete_group($group_id, $skip_group, $expected_deleted, $expected)
+ {
+ global $cache;
+
+ $cache = new phpbb_mock_cache;
+ $db = $this->new_dbal();
+ $user = new \phpbb\user;
+ $user->lang = array();
+
+ $test_class = new \phpbb\groupposition\legend($db, $user);
+ $this->assertEquals($expected_deleted, $test_class->delete_group($group_id, $skip_group));
+
+ $result = $db->sql_query('SELECT group_id, group_legend
+ FROM ' . GROUPS_TABLE . '
+ ORDER BY group_id ASC');
+
+ $this->assertEquals($expected, $db->sql_fetchrowset($result));
+ }
+
+ public function move_up_data()
+ {
+ return array(
+ array(
+ 1,
+ false,
+ array(
+ array('group_id' => 1, 'group_legend' => 0),
+ array('group_id' => 2, 'group_legend' => 1),
+ array('group_id' => 3, 'group_legend' => 2),
+ ),
+ ),
+ array(
+ 2,
+ false,
+ array(
+ array('group_id' => 1, 'group_legend' => 0),
+ array('group_id' => 2, 'group_legend' => 1),
+ array('group_id' => 3, 'group_legend' => 2),
+ ),
+ ),
+ array(
+ 3,
+ true,
+ array(
+ array('group_id' => 1, 'group_legend' => 0),
+ array('group_id' => 2, 'group_legend' => 2),
+ array('group_id' => 3, 'group_legend' => 1),
+ ),
+ ),
+ );
+ }
+
+ /**
+ * @dataProvider move_up_data
+ */
+ public function test_move_up($group_id, $excepted_moved, $expected)
+ {
+ global $cache;
+
+ $cache = new phpbb_mock_cache;
+ $db = $this->new_dbal();
+ $user = new \phpbb\user;
+ $user->lang = array();
+
+ $test_class = new \phpbb\groupposition\legend($db, $user);
+ $this->assertEquals($excepted_moved, $test_class->move_up($group_id));
+
+ $result = $db->sql_query('SELECT group_id, group_legend
+ FROM ' . GROUPS_TABLE . '
+ ORDER BY group_id ASC');
+
+ $this->assertEquals($expected, $db->sql_fetchrowset($result));
+ }
+
+ public function move_down_data()
+ {
+ return array(
+ array(
+ 1,
+ false,
+ array(
+ array('group_id' => 1, 'group_legend' => 0),
+ array('group_id' => 2, 'group_legend' => 1),
+ array('group_id' => 3, 'group_legend' => 2),
+ ),
+ ),
+ array(
+ 2,
+ true,
+ array(
+ array('group_id' => 1, 'group_legend' => 0),
+ array('group_id' => 2, 'group_legend' => 2),
+ array('group_id' => 3, 'group_legend' => 1),
+ ),
+ ),
+ array(
+ 3,
+ false,
+ array(
+ array('group_id' => 1, 'group_legend' => 0),
+ array('group_id' => 2, 'group_legend' => 1),
+ array('group_id' => 3, 'group_legend' => 2),
+ ),
+ ),
+ );
+ }
+
+ /**
+ * @dataProvider move_down_data
+ */
+ public function test_move_down($group_id, $excepted_moved, $expected)
+ {
+ global $cache;
+
+ $cache = new phpbb_mock_cache;
+ $db = $this->new_dbal();
+ $user = new \phpbb\user;
+ $user->lang = array();
+
+ $test_class = new \phpbb\groupposition\legend($db, $user);
+ $this->assertEquals($excepted_moved, $test_class->move_down($group_id));
+
+ $result = $db->sql_query('SELECT group_id, group_legend
+ FROM ' . GROUPS_TABLE . '
+ ORDER BY group_id ASC');
+
+ $this->assertEquals($expected, $db->sql_fetchrowset($result));
+ }
+
+ public function move_data()
+ {
+ return array(
+ array(
+ 1,
+ 1,
+ false,
+ array(
+ array('group_id' => 1, 'group_legend' => 0),
+ array('group_id' => 2, 'group_legend' => 1),
+ array('group_id' => 3, 'group_legend' => 2),
+ ),
+ ),
+ array(
+ 1,
+ -1,
+ false,
+ array(
+ array('group_id' => 1, 'group_legend' => 0),
+ array('group_id' => 2, 'group_legend' => 1),
+ array('group_id' => 3, 'group_legend' => 2),
+ ),
+ ),
+ array(
+ 3,
+ 3,
+ true,
+ array(
+ array('group_id' => 1, 'group_legend' => 0),
+ array('group_id' => 2, 'group_legend' => 2),
+ array('group_id' => 3, 'group_legend' => 1),
+ ),
+ ),
+ array(
+ 2,
+ 0,
+ false,
+ array(
+ array('group_id' => 1, 'group_legend' => 0),
+ array('group_id' => 2, 'group_legend' => 1),
+ array('group_id' => 3, 'group_legend' => 2),
+ ),
+ ),
+ array(
+ 2,
+ -1,
+ true,
+ array(
+ array('group_id' => 1, 'group_legend' => 0),
+ array('group_id' => 2, 'group_legend' => 2),
+ array('group_id' => 3, 'group_legend' => 1),
+ ),
+ ),
+ array(
+ 2,
+ -3,
+ true,
+ array(
+ array('group_id' => 1, 'group_legend' => 0),
+ array('group_id' => 2, 'group_legend' => 2),
+ array('group_id' => 3, 'group_legend' => 1),
+ ),
+ ),
+ array(
+ 3,
+ -1,
+ false,
+ array(
+ array('group_id' => 1, 'group_legend' => 0),
+ array('group_id' => 2, 'group_legend' => 1),
+ array('group_id' => 3, 'group_legend' => 2),
+ ),
+ ),
+ );
+ }
+
+ /**
+ * @dataProvider move_data
+ */
+ public function test_move($group_id, $increment, $excepted_moved, $expected)
+ {
+ global $cache;
+
+ $cache = new phpbb_mock_cache;
+ $db = $this->new_dbal();
+ $user = new \phpbb\user;
+ $user->lang = array();
+
+ $test_class = new \phpbb\groupposition\legend($db, $user);
+ $this->assertEquals($excepted_moved, $test_class->move($group_id, $increment));
+
+ $result = $db->sql_query('SELECT group_id, group_legend
+ FROM ' . GROUPS_TABLE . '
+ ORDER BY group_id ASC');
+
+ $this->assertEquals($expected, $db->sql_fetchrowset($result));
+ }
+}
+
diff --git a/tests/groupposition/teampage_test.php b/tests/groupposition/teampage_test.php
new file mode 100644
index 0000000000..ec89f56775
--- /dev/null
+++ b/tests/groupposition/teampage_test.php
@@ -0,0 +1,641 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+require_once dirname(__FILE__) . '/../../phpBB/includes/utf/utf_tools.php';
+require_once dirname(__FILE__) . '/../../phpBB/includes/functions_content.php';
+
+class phpbb_groupposition_teampage_test extends phpbb_database_test_case
+{
+ public function getDataSet()
+ {
+ return $this->createXMLDataSet(dirname(__FILE__) . '/fixtures/teampage.xml');
+ }
+
+ public function get_group_value_data()
+ {
+ return array(
+ array(2, 3, ''),
+ array(6, 8, ''),
+ array(10, 0, '\phpbb\groupposition\exception'),
+ );
+ }
+
+ /**
+ * @dataProvider get_group_value_data
+ */
+ public function test_get_group_value($group_id, $expected, $throws_exception)
+ {
+ global $cache;
+
+ $cache = new phpbb_mock_cache;
+ $db = $this->new_dbal();
+ $user = new \phpbb\user;
+ $user->lang = array();
+
+ if ($throws_exception)
+ {
+ $this->setExpectedException($throws_exception);
+ }
+
+ $test_class = new \phpbb\groupposition\teampage($db, $user, $cache);
+ $this->assertEquals($expected, $test_class->get_group_value($group_id));
+ }
+
+ public function test_get_group_count()
+ {
+ global $cache;
+
+ $cache = new phpbb_mock_cache;
+ $db = $this->new_dbal();
+ $user = new \phpbb\user;
+ $user->lang = array();
+
+ $test_class = new \phpbb\groupposition\teampage($db, $user, $cache);
+ $this->assertEquals(8, $test_class->get_group_count());
+ }
+
+ public function add_group_teampage_data()
+ {
+ return array(
+ array(
+ 1,
+ 2,
+ false,
+ array(
+ array('teampage_position' => 1, 'group_id' => 1, 'teampage_parent' => 0, 'teampage_name' => ''),
+ array('teampage_position' => 2, 'group_id' => 0, 'teampage_parent' => 0, 'teampage_name' => 'category - 2 children'),
+ array('teampage_position' => 3, 'group_id' => 2, 'teampage_parent' => 2, 'teampage_name' => ''),
+ array('teampage_position' => 4, 'group_id' => 3, 'teampage_parent' => 2, 'teampage_name' => ''),
+ array('teampage_position' => 5, 'group_id' => 0, 'teampage_parent' => 0, 'teampage_name' => 'category2 - 2 children'),
+ array('teampage_position' => 6, 'group_id' => 4, 'teampage_parent' => 5, 'teampage_name' => ''),
+ array('teampage_position' => 7, 'group_id' => 5, 'teampage_parent' => 5, 'teampage_name' => ''),
+ array('teampage_position' => 8, 'group_id' => 6, 'teampage_parent' => 0, 'teampage_name' => ''),
+ ),
+ ),
+ array(
+ 6,
+ 2,
+ false,
+ array(
+ array('teampage_position' => 1, 'group_id' => 1, 'teampage_parent' => 0, 'teampage_name' => ''),
+ array('teampage_position' => 2, 'group_id' => 0, 'teampage_parent' => 0, 'teampage_name' => 'category - 2 children'),
+ array('teampage_position' => 3, 'group_id' => 2, 'teampage_parent' => 2, 'teampage_name' => ''),
+ array('teampage_position' => 4, 'group_id' => 3, 'teampage_parent' => 2, 'teampage_name' => ''),
+ array('teampage_position' => 5, 'group_id' => 0, 'teampage_parent' => 0, 'teampage_name' => 'category2 - 2 children'),
+ array('teampage_position' => 6, 'group_id' => 4, 'teampage_parent' => 5, 'teampage_name' => ''),
+ array('teampage_position' => 7, 'group_id' => 5, 'teampage_parent' => 5, 'teampage_name' => ''),
+ array('teampage_position' => 8, 'group_id' => 6, 'teampage_parent' => 0, 'teampage_name' => ''),
+ ),
+ ),
+ array(
+ 7,
+ 2,
+ true,
+ array(
+ array('teampage_position' => 1, 'group_id' => 1, 'teampage_parent' => 0, 'teampage_name' => ''),
+ array('teampage_position' => 2, 'group_id' => 0, 'teampage_parent' => 0, 'teampage_name' => 'category - 2 children'),
+ array('teampage_position' => 3, 'group_id' => 2, 'teampage_parent' => 2, 'teampage_name' => ''),
+ array('teampage_position' => 4, 'group_id' => 3, 'teampage_parent' => 2, 'teampage_name' => ''),
+ array('teampage_position' => 5, 'group_id' => 7, 'teampage_parent' => 2, 'teampage_name' => ''),
+ array('teampage_position' => 6, 'group_id' => 0, 'teampage_parent' => 0, 'teampage_name' => 'category2 - 2 children'),
+ array('teampage_position' => 7, 'group_id' => 4, 'teampage_parent' => 5, 'teampage_name' => ''),
+ array('teampage_position' => 8, 'group_id' => 5, 'teampage_parent' => 5, 'teampage_name' => ''),
+ array('teampage_position' => 9, 'group_id' => 6, 'teampage_parent' => 0, 'teampage_name' => ''),
+ ),
+ ),
+ array(
+ 7,
+ 0,
+ true,
+ array(
+ array('teampage_position' => 1, 'group_id' => 1, 'teampage_parent' => 0, 'teampage_name' => ''),
+ array('teampage_position' => 2, 'group_id' => 0, 'teampage_parent' => 0, 'teampage_name' => 'category - 2 children'),
+ array('teampage_position' => 3, 'group_id' => 2, 'teampage_parent' => 2, 'teampage_name' => ''),
+ array('teampage_position' => 4, 'group_id' => 3, 'teampage_parent' => 2, 'teampage_name' => ''),
+ array('teampage_position' => 5, 'group_id' => 0, 'teampage_parent' => 0, 'teampage_name' => 'category2 - 2 children'),
+ array('teampage_position' => 6, 'group_id' => 4, 'teampage_parent' => 5, 'teampage_name' => ''),
+ array('teampage_position' => 7, 'group_id' => 5, 'teampage_parent' => 5, 'teampage_name' => ''),
+ array('teampage_position' => 8, 'group_id' => 6, 'teampage_parent' => 0, 'teampage_name' => ''),
+ array('teampage_position' => 9, 'group_id' => 7, 'teampage_parent' => 0, 'teampage_name' => ''),
+ ),
+ ),
+ );
+ }
+
+ /**
+ * @dataProvider add_group_teampage_data
+ */
+ public function test_add_group_teampage($group_id, $parent_id, $expected_added, $expected)
+ {
+ global $cache;
+
+ $cache = new phpbb_mock_cache;
+ $db = $this->new_dbal();
+ $user = new \phpbb\user;
+ $user->lang = array();
+
+ $test_class = new \phpbb\groupposition\teampage($db, $user, $cache);
+ $this->assertEquals($expected_added, $test_class->add_group_teampage($group_id, $parent_id));
+
+ $result = $db->sql_query('SELECT teampage_position, group_id, teampage_parent, teampage_name
+ FROM ' . TEAMPAGE_TABLE . '
+ ORDER BY teampage_position ASC');
+
+ $this->assertEquals($expected, $db->sql_fetchrowset($result));
+ }
+
+ public function add_category_teampage_data()
+ {
+ return array(
+ array(
+ 'new',
+ true,
+ array(
+ array('teampage_position' => 1, 'group_id' => 1, 'teampage_parent' => 0, 'teampage_name' => ''),
+ array('teampage_position' => 2, 'group_id' => 0, 'teampage_parent' => 0, 'teampage_name' => 'category - 2 children'),
+ array('teampage_position' => 3, 'group_id' => 2, 'teampage_parent' => 2, 'teampage_name' => ''),
+ array('teampage_position' => 4, 'group_id' => 3, 'teampage_parent' => 2, 'teampage_name' => ''),
+ array('teampage_position' => 5, 'group_id' => 0, 'teampage_parent' => 0, 'teampage_name' => 'category2 - 2 children'),
+ array('teampage_position' => 6, 'group_id' => 4, 'teampage_parent' => 5, 'teampage_name' => ''),
+ array('teampage_position' => 7, 'group_id' => 5, 'teampage_parent' => 5, 'teampage_name' => ''),
+ array('teampage_position' => 8, 'group_id' => 6, 'teampage_parent' => 0, 'teampage_name' => ''),
+ array('teampage_position' => 9, 'group_id' => 0, 'teampage_parent' => 0, 'teampage_name' => 'new'),
+ ),
+ ),
+ );
+ }
+
+ /**
+ * @dataProvider add_category_teampage_data
+ */
+ public function test_add_category_teampage($group_name, $expected_added, $expected)
+ {
+ global $cache;
+
+ $cache = new phpbb_mock_cache;
+ $db = $this->new_dbal();
+ $user = new \phpbb\user;
+ $user->lang = array();
+
+ $test_class = new \phpbb\groupposition\teampage($db, $user, $cache);
+ $this->assertEquals($expected_added, $test_class->add_category_teampage($group_name));
+
+ $result = $db->sql_query('SELECT teampage_position, group_id, teampage_parent, teampage_name
+ FROM ' . TEAMPAGE_TABLE . '
+ ORDER BY teampage_position ASC');
+
+ $this->assertEquals($expected, $db->sql_fetchrowset($result));
+ }
+
+ public function delete_group_data()
+ {
+ return array(
+ array(
+ 1,
+ true,
+ array(
+ array('teampage_position' => 1, 'group_id' => 0, 'teampage_parent' => 0, 'teampage_name' => 'category - 2 children'),
+ array('teampage_position' => 2, 'group_id' => 2, 'teampage_parent' => 2, 'teampage_name' => ''),
+ array('teampage_position' => 3, 'group_id' => 3, 'teampage_parent' => 2, 'teampage_name' => ''),
+ array('teampage_position' => 4, 'group_id' => 0, 'teampage_parent' => 0, 'teampage_name' => 'category2 - 2 children'),
+ array('teampage_position' => 5, 'group_id' => 4, 'teampage_parent' => 5, 'teampage_name' => ''),
+ array('teampage_position' => 6, 'group_id' => 5, 'teampage_parent' => 5, 'teampage_name' => ''),
+ array('teampage_position' => 7, 'group_id' => 6, 'teampage_parent' => 0, 'teampage_name' => ''),
+ ),
+ ),
+ array(
+ 2,
+ true,
+ array(
+ array('teampage_position' => 1, 'group_id' => 1, 'teampage_parent' => 0, 'teampage_name' => ''),
+ array('teampage_position' => 2, 'group_id' => 0, 'teampage_parent' => 0, 'teampage_name' => 'category - 2 children'),
+ array('teampage_position' => 3, 'group_id' => 3, 'teampage_parent' => 2, 'teampage_name' => ''),
+ array('teampage_position' => 4, 'group_id' => 0, 'teampage_parent' => 0, 'teampage_name' => 'category2 - 2 children'),
+ array('teampage_position' => 5, 'group_id' => 4, 'teampage_parent' => 5, 'teampage_name' => ''),
+ array('teampage_position' => 6, 'group_id' => 5, 'teampage_parent' => 5, 'teampage_name' => ''),
+ array('teampage_position' => 7, 'group_id' => 6, 'teampage_parent' => 0, 'teampage_name' => ''),
+ ),
+ ),
+ array(
+ 6,
+ true,
+ array(
+ array('teampage_position' => 1, 'group_id' => 1, 'teampage_parent' => 0, 'teampage_name' => ''),
+ array('teampage_position' => 2, 'group_id' => 0, 'teampage_parent' => 0, 'teampage_name' => 'category - 2 children'),
+ array('teampage_position' => 3, 'group_id' => 2, 'teampage_parent' => 2, 'teampage_name' => ''),
+ array('teampage_position' => 4, 'group_id' => 3, 'teampage_parent' => 2, 'teampage_name' => ''),
+ array('teampage_position' => 5, 'group_id' => 0, 'teampage_parent' => 0, 'teampage_name' => 'category2 - 2 children'),
+ array('teampage_position' => 6, 'group_id' => 4, 'teampage_parent' => 5, 'teampage_name' => ''),
+ array('teampage_position' => 7, 'group_id' => 5, 'teampage_parent' => 5, 'teampage_name' => ''),
+ ),
+ ),
+ );
+ }
+
+ /**
+ * @dataProvider delete_group_data
+ */
+ public function test_delete_group($group_id, $expected_deleted, $expected)
+ {
+ global $cache;
+
+ $cache = new phpbb_mock_cache;
+ $db = $this->new_dbal();
+ $user = new \phpbb\user;
+ $user->lang = array();
+
+ $test_class = new \phpbb\groupposition\teampage($db, $user, $cache);
+ $this->assertEquals($expected_deleted, $test_class->delete_group($group_id, false));
+
+ $result = $db->sql_query('SELECT teampage_position, group_id, teampage_parent, teampage_name
+ FROM ' . TEAMPAGE_TABLE . '
+ ORDER BY teampage_position ASC');
+
+ $this->assertEquals($expected, $db->sql_fetchrowset($result));
+ }
+
+ public function delete_teampage_data()
+ {
+ return array(
+ array(
+ 1,
+ true,
+ array(
+ array('teampage_position' => 1, 'group_id' => 0, 'teampage_parent' => 0, 'teampage_name' => 'category - 2 children'),
+ array('teampage_position' => 2, 'group_id' => 2, 'teampage_parent' => 2, 'teampage_name' => ''),
+ array('teampage_position' => 3, 'group_id' => 3, 'teampage_parent' => 2, 'teampage_name' => ''),
+ array('teampage_position' => 4, 'group_id' => 0, 'teampage_parent' => 0, 'teampage_name' => 'category2 - 2 children'),
+ array('teampage_position' => 5, 'group_id' => 4, 'teampage_parent' => 5, 'teampage_name' => ''),
+ array('teampage_position' => 6, 'group_id' => 5, 'teampage_parent' => 5, 'teampage_name' => ''),
+ array('teampage_position' => 7, 'group_id' => 6, 'teampage_parent' => 0, 'teampage_name' => ''),
+ ),
+ ),
+ array(
+ 2,
+ true,
+ array(
+ array('teampage_position' => 1, 'group_id' => 1, 'teampage_parent' => 0, 'teampage_name' => ''),
+ array('teampage_position' => 2, 'group_id' => 0, 'teampage_parent' => 0, 'teampage_name' => 'category2 - 2 children'),
+ array('teampage_position' => 3, 'group_id' => 4, 'teampage_parent' => 5, 'teampage_name' => ''),
+ array('teampage_position' => 4, 'group_id' => 5, 'teampage_parent' => 5, 'teampage_name' => ''),
+ array('teampage_position' => 5, 'group_id' => 6, 'teampage_parent' => 0, 'teampage_name' => ''),
+ ),
+ ),
+ );
+ }
+
+ /**
+ * @dataProvider delete_teampage_data
+ */
+ public function test_delete_teampage($teampage_id, $expected_deleted, $expected)
+ {
+ global $cache;
+
+ $cache = new phpbb_mock_cache;
+ $db = $this->new_dbal();
+ $user = new \phpbb\user;
+ $user->lang = array();
+
+ $test_class = new \phpbb\groupposition\teampage($db, $user, $cache);
+ $this->assertEquals($expected_deleted, $test_class->delete_teampage($teampage_id, false));
+
+ $result = $db->sql_query('SELECT teampage_position, group_id, teampage_parent, teampage_name
+ FROM ' . TEAMPAGE_TABLE . '
+ ORDER BY teampage_position ASC');
+
+ $this->assertEquals($expected, $db->sql_fetchrowset($result));
+ }
+
+ public function move_data()
+ {
+ return array(
+ array(
+ 1,
+ 1,
+ false,
+ array(
+ array('teampage_position' => 1, 'group_id' => 1, 'teampage_parent' => 0, 'teampage_name' => ''),
+ array('teampage_position' => 2, 'group_id' => 0, 'teampage_parent' => 0, 'teampage_name' => 'category - 2 children'),
+ array('teampage_position' => 3, 'group_id' => 2, 'teampage_parent' => 2, 'teampage_name' => ''),
+ array('teampage_position' => 4, 'group_id' => 3, 'teampage_parent' => 2, 'teampage_name' => ''),
+ array('teampage_position' => 5, 'group_id' => 0, 'teampage_parent' => 0, 'teampage_name' => 'category2 - 2 children'),
+ array('teampage_position' => 6, 'group_id' => 4, 'teampage_parent' => 5, 'teampage_name' => ''),
+ array('teampage_position' => 7, 'group_id' => 5, 'teampage_parent' => 5, 'teampage_name' => ''),
+ array('teampage_position' => 8, 'group_id' => 6, 'teampage_parent' => 0, 'teampage_name' => ''),
+ ),
+ ),
+ array(
+ 2,
+ 1,
+ false,
+ array(
+ array('teampage_position' => 1, 'group_id' => 1, 'teampage_parent' => 0, 'teampage_name' => ''),
+ array('teampage_position' => 2, 'group_id' => 0, 'teampage_parent' => 0, 'teampage_name' => 'category - 2 children'),
+ array('teampage_position' => 3, 'group_id' => 2, 'teampage_parent' => 2, 'teampage_name' => ''),
+ array('teampage_position' => 4, 'group_id' => 3, 'teampage_parent' => 2, 'teampage_name' => ''),
+ array('teampage_position' => 5, 'group_id' => 0, 'teampage_parent' => 0, 'teampage_name' => 'category2 - 2 children'),
+ array('teampage_position' => 6, 'group_id' => 4, 'teampage_parent' => 5, 'teampage_name' => ''),
+ array('teampage_position' => 7, 'group_id' => 5, 'teampage_parent' => 5, 'teampage_name' => ''),
+ array('teampage_position' => 8, 'group_id' => 6, 'teampage_parent' => 0, 'teampage_name' => ''),
+ ),
+ ),
+ array(
+ 5,
+ 1,
+ true,
+ array(
+ array('teampage_position' => 1, 'group_id' => 1, 'teampage_parent' => 0, 'teampage_name' => ''),
+ array('teampage_position' => 2, 'group_id' => 0, 'teampage_parent' => 0, 'teampage_name' => 'category - 2 children'),
+ array('teampage_position' => 3, 'group_id' => 2, 'teampage_parent' => 2, 'teampage_name' => ''),
+ array('teampage_position' => 4, 'group_id' => 3, 'teampage_parent' => 2, 'teampage_name' => ''),
+ array('teampage_position' => 5, 'group_id' => 0, 'teampage_parent' => 0, 'teampage_name' => 'category2 - 2 children'),
+ array('teampage_position' => 6, 'group_id' => 5, 'teampage_parent' => 5, 'teampage_name' => ''),
+ array('teampage_position' => 7, 'group_id' => 4, 'teampage_parent' => 5, 'teampage_name' => ''),
+ array('teampage_position' => 8, 'group_id' => 6, 'teampage_parent' => 0, 'teampage_name' => ''),
+ ),
+ ),
+ array(
+ 6,
+ 1,
+ true,
+ array(
+ array('teampage_position' => 1, 'group_id' => 1, 'teampage_parent' => 0, 'teampage_name' => ''),
+ array('teampage_position' => 2, 'group_id' => 0, 'teampage_parent' => 0, 'teampage_name' => 'category - 2 children'),
+ array('teampage_position' => 3, 'group_id' => 2, 'teampage_parent' => 2, 'teampage_name' => ''),
+ array('teampage_position' => 4, 'group_id' => 3, 'teampage_parent' => 2, 'teampage_name' => ''),
+ array('teampage_position' => 5, 'group_id' => 6, 'teampage_parent' => 0, 'teampage_name' => ''),
+ array('teampage_position' => 6, 'group_id' => 0, 'teampage_parent' => 0, 'teampage_name' => 'category2 - 2 children'),
+ array('teampage_position' => 7, 'group_id' => 4, 'teampage_parent' => 5, 'teampage_name' => ''),
+ array('teampage_position' => 8, 'group_id' => 5, 'teampage_parent' => 5, 'teampage_name' => ''),
+ ),
+ ),
+ array(
+ 1,
+ -1,
+ true,
+ array(
+ array('teampage_position' => 1, 'group_id' => 0, 'teampage_parent' => 0, 'teampage_name' => 'category - 2 children'),
+ array('teampage_position' => 2, 'group_id' => 2, 'teampage_parent' => 2, 'teampage_name' => ''),
+ array('teampage_position' => 3, 'group_id' => 3, 'teampage_parent' => 2, 'teampage_name' => ''),
+ array('teampage_position' => 4, 'group_id' => 1, 'teampage_parent' => 0, 'teampage_name' => ''),
+ array('teampage_position' => 5, 'group_id' => 0, 'teampage_parent' => 0, 'teampage_name' => 'category2 - 2 children'),
+ array('teampage_position' => 6, 'group_id' => 4, 'teampage_parent' => 5, 'teampage_name' => ''),
+ array('teampage_position' => 7, 'group_id' => 5, 'teampage_parent' => 5, 'teampage_name' => ''),
+ array('teampage_position' => 8, 'group_id' => 6, 'teampage_parent' => 0, 'teampage_name' => ''),
+ ),
+ ),
+ array(
+ 2,
+ -1,
+ true,
+ array(
+ array('teampage_position' => 1, 'group_id' => 1, 'teampage_parent' => 0, 'teampage_name' => ''),
+ array('teampage_position' => 2, 'group_id' => 0, 'teampage_parent' => 0, 'teampage_name' => 'category - 2 children'),
+ array('teampage_position' => 3, 'group_id' => 3, 'teampage_parent' => 2, 'teampage_name' => ''),
+ array('teampage_position' => 4, 'group_id' => 2, 'teampage_parent' => 2, 'teampage_name' => ''),
+ array('teampage_position' => 5, 'group_id' => 0, 'teampage_parent' => 0, 'teampage_name' => 'category2 - 2 children'),
+ array('teampage_position' => 6, 'group_id' => 4, 'teampage_parent' => 5, 'teampage_name' => ''),
+ array('teampage_position' => 7, 'group_id' => 5, 'teampage_parent' => 5, 'teampage_name' => ''),
+ array('teampage_position' => 8, 'group_id' => 6, 'teampage_parent' => 0, 'teampage_name' => ''),
+ ),
+ ),
+ array(
+ 5,
+ -1,
+ false,
+ array(
+ array('teampage_position' => 1, 'group_id' => 1, 'teampage_parent' => 0, 'teampage_name' => ''),
+ array('teampage_position' => 2, 'group_id' => 0, 'teampage_parent' => 0, 'teampage_name' => 'category - 2 children'),
+ array('teampage_position' => 3, 'group_id' => 2, 'teampage_parent' => 2, 'teampage_name' => ''),
+ array('teampage_position' => 4, 'group_id' => 3, 'teampage_parent' => 2, 'teampage_name' => ''),
+ array('teampage_position' => 5, 'group_id' => 0, 'teampage_parent' => 0, 'teampage_name' => 'category2 - 2 children'),
+ array('teampage_position' => 6, 'group_id' => 4, 'teampage_parent' => 5, 'teampage_name' => ''),
+ array('teampage_position' => 7, 'group_id' => 5, 'teampage_parent' => 5, 'teampage_name' => ''),
+ array('teampage_position' => 8, 'group_id' => 6, 'teampage_parent' => 0, 'teampage_name' => ''),
+ ),
+ ),
+ array(
+ 6,
+ -1,
+ false,
+ array(
+ array('teampage_position' => 1, 'group_id' => 1, 'teampage_parent' => 0, 'teampage_name' => ''),
+ array('teampage_position' => 2, 'group_id' => 0, 'teampage_parent' => 0, 'teampage_name' => 'category - 2 children'),
+ array('teampage_position' => 3, 'group_id' => 2, 'teampage_parent' => 2, 'teampage_name' => ''),
+ array('teampage_position' => 4, 'group_id' => 3, 'teampage_parent' => 2, 'teampage_name' => ''),
+ array('teampage_position' => 5, 'group_id' => 0, 'teampage_parent' => 0, 'teampage_name' => 'category2 - 2 children'),
+ array('teampage_position' => 6, 'group_id' => 4, 'teampage_parent' => 5, 'teampage_name' => ''),
+ array('teampage_position' => 7, 'group_id' => 5, 'teampage_parent' => 5, 'teampage_name' => ''),
+ array('teampage_position' => 8, 'group_id' => 6, 'teampage_parent' => 0, 'teampage_name' => ''),
+ ),
+ ),
+ array(
+ 6,
+ 3,
+ true,
+ array(
+ array('teampage_position' => 1, 'group_id' => 6, 'teampage_parent' => 0, 'teampage_name' => ''),
+ array('teampage_position' => 2, 'group_id' => 1, 'teampage_parent' => 0, 'teampage_name' => ''),
+ array('teampage_position' => 3, 'group_id' => 0, 'teampage_parent' => 0, 'teampage_name' => 'category - 2 children'),
+ array('teampage_position' => 4, 'group_id' => 2, 'teampage_parent' => 2, 'teampage_name' => ''),
+ array('teampage_position' => 5, 'group_id' => 3, 'teampage_parent' => 2, 'teampage_name' => ''),
+ array('teampage_position' => 6, 'group_id' => 0, 'teampage_parent' => 0, 'teampage_name' => 'category2 - 2 children'),
+ array('teampage_position' => 7, 'group_id' => 4, 'teampage_parent' => 5, 'teampage_name' => ''),
+ array('teampage_position' => 8, 'group_id' => 5, 'teampage_parent' => 5, 'teampage_name' => ''),
+ ),
+ ),
+ );
+ }
+
+ /**
+ * @dataProvider move_data
+ */
+ public function test_move($group_id, $move_delta, $excepted_moved, $expected)
+ {
+ global $cache;
+
+ $cache = new phpbb_mock_cache;
+ $db = $this->new_dbal();
+ $user = new \phpbb\user;
+ $user->lang = array();
+
+ $test_class = new \phpbb\groupposition\teampage($db, $user, $cache);
+ $this->assertEquals($excepted_moved, $test_class->move($group_id, $move_delta));
+
+ $result = $db->sql_query('SELECT teampage_position, group_id, teampage_parent, teampage_name
+ FROM ' . TEAMPAGE_TABLE . '
+ ORDER BY teampage_position ASC');
+
+ $this->assertEquals($expected, $db->sql_fetchrowset($result));
+ }
+
+ public function move_teampage_data()
+ {
+ return array(
+ array(
+ 1,
+ 1,
+ false,
+ array(
+ array('teampage_position' => 1, 'group_id' => 1, 'teampage_parent' => 0, 'teampage_name' => ''),
+ array('teampage_position' => 2, 'group_id' => 0, 'teampage_parent' => 0, 'teampage_name' => 'category - 2 children'),
+ array('teampage_position' => 3, 'group_id' => 2, 'teampage_parent' => 2, 'teampage_name' => ''),
+ array('teampage_position' => 4, 'group_id' => 3, 'teampage_parent' => 2, 'teampage_name' => ''),
+ array('teampage_position' => 5, 'group_id' => 0, 'teampage_parent' => 0, 'teampage_name' => 'category2 - 2 children'),
+ array('teampage_position' => 6, 'group_id' => 4, 'teampage_parent' => 5, 'teampage_name' => ''),
+ array('teampage_position' => 7, 'group_id' => 5, 'teampage_parent' => 5, 'teampage_name' => ''),
+ array('teampage_position' => 8, 'group_id' => 6, 'teampage_parent' => 0, 'teampage_name' => ''),
+ ),
+ ),
+ array(
+ 2,
+ 1,
+ true,
+ array(
+ array('teampage_position' => 1, 'group_id' => 0, 'teampage_parent' => 0, 'teampage_name' => 'category - 2 children'),
+ array('teampage_position' => 2, 'group_id' => 2, 'teampage_parent' => 2, 'teampage_name' => ''),
+ array('teampage_position' => 3, 'group_id' => 3, 'teampage_parent' => 2, 'teampage_name' => ''),
+ array('teampage_position' => 4, 'group_id' => 1, 'teampage_parent' => 0, 'teampage_name' => ''),
+ array('teampage_position' => 5, 'group_id' => 0, 'teampage_parent' => 0, 'teampage_name' => 'category2 - 2 children'),
+ array('teampage_position' => 6, 'group_id' => 4, 'teampage_parent' => 5, 'teampage_name' => ''),
+ array('teampage_position' => 7, 'group_id' => 5, 'teampage_parent' => 5, 'teampage_name' => ''),
+ array('teampage_position' => 8, 'group_id' => 6, 'teampage_parent' => 0, 'teampage_name' => ''),
+ ),
+ ),
+ array(
+ 5,
+ 1,
+ true,
+ array(
+ array('teampage_position' => 1, 'group_id' => 1, 'teampage_parent' => 0, 'teampage_name' => ''),
+ array('teampage_position' => 2, 'group_id' => 0, 'teampage_parent' => 0, 'teampage_name' => 'category2 - 2 children'),
+ array('teampage_position' => 3, 'group_id' => 4, 'teampage_parent' => 5, 'teampage_name' => ''),
+ array('teampage_position' => 4, 'group_id' => 5, 'teampage_parent' => 5, 'teampage_name' => ''),
+ array('teampage_position' => 5, 'group_id' => 0, 'teampage_parent' => 0, 'teampage_name' => 'category - 2 children'),
+ array('teampage_position' => 6, 'group_id' => 2, 'teampage_parent' => 2, 'teampage_name' => ''),
+ array('teampage_position' => 7, 'group_id' => 3, 'teampage_parent' => 2, 'teampage_name' => ''),
+ array('teampage_position' => 8, 'group_id' => 6, 'teampage_parent' => 0, 'teampage_name' => ''),
+ ),
+ ),
+ array(
+ 6,
+ 1,
+ false,
+ array(
+ array('teampage_position' => 1, 'group_id' => 1, 'teampage_parent' => 0, 'teampage_name' => ''),
+ array('teampage_position' => 2, 'group_id' => 0, 'teampage_parent' => 0, 'teampage_name' => 'category - 2 children'),
+ array('teampage_position' => 3, 'group_id' => 2, 'teampage_parent' => 2, 'teampage_name' => ''),
+ array('teampage_position' => 4, 'group_id' => 3, 'teampage_parent' => 2, 'teampage_name' => ''),
+ array('teampage_position' => 5, 'group_id' => 0, 'teampage_parent' => 0, 'teampage_name' => 'category2 - 2 children'),
+ array('teampage_position' => 6, 'group_id' => 4, 'teampage_parent' => 5, 'teampage_name' => ''),
+ array('teampage_position' => 7, 'group_id' => 5, 'teampage_parent' => 5, 'teampage_name' => ''),
+ array('teampage_position' => 8, 'group_id' => 6, 'teampage_parent' => 0, 'teampage_name' => ''),
+ ),
+ ),
+ array(
+ 1,
+ -1,
+ true,
+ array(
+ array('teampage_position' => 1, 'group_id' => 0, 'teampage_parent' => 0, 'teampage_name' => 'category - 2 children'),
+ array('teampage_position' => 2, 'group_id' => 2, 'teampage_parent' => 2, 'teampage_name' => ''),
+ array('teampage_position' => 3, 'group_id' => 3, 'teampage_parent' => 2, 'teampage_name' => ''),
+ array('teampage_position' => 4, 'group_id' => 1, 'teampage_parent' => 0, 'teampage_name' => ''),
+ array('teampage_position' => 5, 'group_id' => 0, 'teampage_parent' => 0, 'teampage_name' => 'category2 - 2 children'),
+ array('teampage_position' => 6, 'group_id' => 4, 'teampage_parent' => 5, 'teampage_name' => ''),
+ array('teampage_position' => 7, 'group_id' => 5, 'teampage_parent' => 5, 'teampage_name' => ''),
+ array('teampage_position' => 8, 'group_id' => 6, 'teampage_parent' => 0, 'teampage_name' => ''),
+ ),
+ ),
+ array(
+ 2,
+ -1,
+ true,
+ array(
+ array('teampage_position' => 1, 'group_id' => 1, 'teampage_parent' => 0, 'teampage_name' => ''),
+ array('teampage_position' => 2, 'group_id' => 0, 'teampage_parent' => 0, 'teampage_name' => 'category2 - 2 children'),
+ array('teampage_position' => 3, 'group_id' => 4, 'teampage_parent' => 5, 'teampage_name' => ''),
+ array('teampage_position' => 4, 'group_id' => 5, 'teampage_parent' => 5, 'teampage_name' => ''),
+ array('teampage_position' => 5, 'group_id' => 0, 'teampage_parent' => 0, 'teampage_name' => 'category - 2 children'),
+ array('teampage_position' => 6, 'group_id' => 2, 'teampage_parent' => 2, 'teampage_name' => ''),
+ array('teampage_position' => 7, 'group_id' => 3, 'teampage_parent' => 2, 'teampage_name' => ''),
+ array('teampage_position' => 8, 'group_id' => 6, 'teampage_parent' => 0, 'teampage_name' => ''),
+ ),
+ ),
+ array(
+ 5,
+ -1,
+ true,
+ array(
+ array('teampage_position' => 1, 'group_id' => 1, 'teampage_parent' => 0, 'teampage_name' => ''),
+ array('teampage_position' => 2, 'group_id' => 0, 'teampage_parent' => 0, 'teampage_name' => 'category - 2 children'),
+ array('teampage_position' => 3, 'group_id' => 2, 'teampage_parent' => 2, 'teampage_name' => ''),
+ array('teampage_position' => 4, 'group_id' => 3, 'teampage_parent' => 2, 'teampage_name' => ''),
+ array('teampage_position' => 5, 'group_id' => 6, 'teampage_parent' => 0, 'teampage_name' => ''),
+ array('teampage_position' => 6, 'group_id' => 0, 'teampage_parent' => 0, 'teampage_name' => 'category2 - 2 children'),
+ array('teampage_position' => 7, 'group_id' => 4, 'teampage_parent' => 5, 'teampage_name' => ''),
+ array('teampage_position' => 8, 'group_id' => 5, 'teampage_parent' => 5, 'teampage_name' => ''),
+ ),
+ ),
+ array(
+ 6,
+ -1,
+ true,
+ array(
+ array('teampage_position' => 1, 'group_id' => 1, 'teampage_parent' => 0, 'teampage_name' => ''),
+ array('teampage_position' => 2, 'group_id' => 0, 'teampage_parent' => 0, 'teampage_name' => 'category - 2 children'),
+ array('teampage_position' => 3, 'group_id' => 2, 'teampage_parent' => 2, 'teampage_name' => ''),
+ array('teampage_position' => 4, 'group_id' => 3, 'teampage_parent' => 2, 'teampage_name' => ''),
+ array('teampage_position' => 5, 'group_id' => 0, 'teampage_parent' => 0, 'teampage_name' => 'category2 - 2 children'),
+ array('teampage_position' => 6, 'group_id' => 5, 'teampage_parent' => 5, 'teampage_name' => ''),
+ array('teampage_position' => 7, 'group_id' => 4, 'teampage_parent' => 5, 'teampage_name' => ''),
+ array('teampage_position' => 8, 'group_id' => 6, 'teampage_parent' => 0, 'teampage_name' => ''),
+ ),
+ ),
+ array(
+ 8,
+ 3,
+ true,
+ array(
+ array('teampage_position' => 1, 'group_id' => 6, 'teampage_parent' => 0, 'teampage_name' => ''),
+ array('teampage_position' => 2, 'group_id' => 1, 'teampage_parent' => 0, 'teampage_name' => ''),
+ array('teampage_position' => 3, 'group_id' => 0, 'teampage_parent' => 0, 'teampage_name' => 'category - 2 children'),
+ array('teampage_position' => 4, 'group_id' => 2, 'teampage_parent' => 2, 'teampage_name' => ''),
+ array('teampage_position' => 5, 'group_id' => 3, 'teampage_parent' => 2, 'teampage_name' => ''),
+ array('teampage_position' => 6, 'group_id' => 0, 'teampage_parent' => 0, 'teampage_name' => 'category2 - 2 children'),
+ array('teampage_position' => 7, 'group_id' => 4, 'teampage_parent' => 5, 'teampage_name' => ''),
+ array('teampage_position' => 8, 'group_id' => 5, 'teampage_parent' => 5, 'teampage_name' => ''),
+ ),
+ ),
+ );
+ }
+
+ /**
+ * @dataProvider move_teampage_data
+ */
+ public function test_move_teampage($teampage_id, $move_delta, $excepted_moved, $expected)
+ {
+ global $cache;
+
+ $cache = new phpbb_mock_cache;
+ $db = $this->new_dbal();
+ $user = new \phpbb\user;
+ $user->lang = array();
+
+ $test_class = new \phpbb\groupposition\teampage($db, $user, $cache);
+ $this->assertEquals($excepted_moved, $test_class->move_teampage($teampage_id, $move_delta));
+
+ $result = $db->sql_query('SELECT teampage_position, group_id, teampage_parent, teampage_name
+ FROM ' . TEAMPAGE_TABLE . '
+ ORDER BY teampage_position ASC');
+
+ $this->assertEquals($expected, $db->sql_fetchrowset($result));
+ }
+}
+
diff --git a/tests/lock/db_test.php b/tests/lock/db_test.php
new file mode 100644
index 0000000000..da689b7fa3
--- /dev/null
+++ b/tests/lock/db_test.php
@@ -0,0 +1,97 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2010 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php';
+
+class phpbb_lock_db_test extends phpbb_database_test_case
+{
+ private $db;
+ private $config;
+ private $lock;
+
+ public function getDataSet()
+ {
+ return $this->createXMLDataSet(dirname(__FILE__).'/fixtures/config.xml');
+ }
+
+ public function setUp()
+ {
+ global $db, $config;
+
+ $db = $this->db = $this->new_dbal();
+ $config = $this->config = new \phpbb\config\config(array('rand_seed' => '', 'rand_seed_last_update' => '0'));
+ set_config(null, null, null, $this->config);
+ $this->lock = new \phpbb\lock\db('test_lock', $this->config, $this->db);
+ }
+
+ public function test_new_lock()
+ {
+ $this->assertFalse($this->lock->owns_lock());
+
+ $this->assertTrue($this->lock->acquire());
+ $this->assertTrue($this->lock->owns_lock());
+ $this->assertTrue(isset($this->config['test_lock']), 'Lock was created');
+
+ $lock2 = new \phpbb\lock\db('test_lock', $this->config, $this->db);
+ $this->assertFalse($lock2->acquire());
+ $this->assertFalse($lock2->owns_lock());
+
+ $this->lock->release();
+ $this->assertFalse($this->lock->owns_lock());
+ $this->assertEquals('0', $this->config['test_lock'], 'Lock was released');
+ }
+
+ public function test_expire_lock()
+ {
+ $lock = new \phpbb\lock\db('foo_lock', $this->config, $this->db);
+ $this->assertTrue($lock->acquire());
+ }
+
+ public function test_double_lock()
+ {
+ $this->assertFalse($this->lock->owns_lock());
+
+ $this->assertTrue($this->lock->acquire());
+ $this->assertTrue($this->lock->owns_lock());
+ $this->assertTrue(isset($this->config['test_lock']), 'Lock was created');
+
+ $value = $this->config['test_lock'];
+
+ $this->assertFalse($this->lock->acquire());
+ $this->assertTrue($this->lock->owns_lock());
+ $this->assertEquals($value, $this->config['test_lock'], 'Second lock failed');
+
+ $this->lock->release();
+ $this->assertFalse($this->lock->owns_lock());
+ $this->assertEquals('0', $this->config['test_lock'], 'Lock was released');
+ }
+
+ public function test_double_unlock()
+ {
+ $this->assertTrue($this->lock->acquire());
+ $this->assertTrue($this->lock->owns_lock());
+ $this->assertFalse(empty($this->config['test_lock']), 'First lock is acquired');
+
+ $this->lock->release();
+ $this->assertFalse($this->lock->owns_lock());
+ $this->assertEquals('0', $this->config['test_lock'], 'First lock is released');
+
+ $lock2 = new \phpbb\lock\db('test_lock', $this->config, $this->db);
+ $this->assertTrue($lock2->acquire());
+ $this->assertTrue($lock2->owns_lock());
+ $this->assertFalse(empty($this->config['test_lock']), 'Second lock is acquired');
+
+ $this->lock->release();
+ $this->assertTrue($lock2->owns_lock());
+ $this->assertFalse(empty($this->config['test_lock']), 'Double release of first lock is ignored');
+
+ $lock2->release();
+ $this->assertEquals('0', $this->config['test_lock'], 'Second lock is released');
+ }
+}
diff --git a/tests/lock/fixtures/config.xml b/tests/lock/fixtures/config.xml
new file mode 100644
index 0000000000..f36c8b929a
--- /dev/null
+++ b/tests/lock/fixtures/config.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<dataset>
+ <table name="phpbb_config">
+ <column>config_name</column>
+ <column>config_value</column>
+ <column>is_dynamic</column>
+ <row>
+ <value>foo_lock</value>
+ <value>1 abcd</value>
+ <value>1</value>
+ </row>
+ </table>
+</dataset>
diff --git a/tests/lock/flock_test.php b/tests/lock/flock_test.php
new file mode 100644
index 0000000000..5e5ac5aa78
--- /dev/null
+++ b/tests/lock/flock_test.php
@@ -0,0 +1,120 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+class phpbb_lock_flock_test extends phpbb_test_case
+{
+ public function test_lock()
+ {
+ $path = __DIR__ . '/../tmp/precious';
+
+ $lock = new \phpbb\lock\flock($path);
+ $ok = $lock->acquire();
+ $this->assertTrue($ok);
+ $lock->release();
+ }
+
+ public function test_consecutive_locking()
+ {
+ $path = __DIR__ . '/../tmp/precious';
+
+ $lock = new \phpbb\lock\flock($path);
+ $ok = $lock->acquire();
+ $this->assertTrue($ok);
+ $this->assertTrue($lock->owns_lock());
+ $lock->release();
+ $this->assertFalse($lock->owns_lock());
+
+ $ok = $lock->acquire();
+ $this->assertTrue($ok);
+ $this->assertTrue($lock->owns_lock());
+ $lock->release();
+ $this->assertFalse($lock->owns_lock());
+
+ $ok = $lock->acquire();
+ $this->assertTrue($ok);
+ $this->assertTrue($lock->owns_lock());
+ $lock->release();
+ $this->assertFalse($lock->owns_lock());
+ }
+
+ /* This hangs the process.
+ public function test_concurrent_locking_fail()
+ {
+ $path = __DIR__ . '/../tmp/precious';
+
+ $lock1 = new \phpbb\lock\flock($path);
+ $ok = $lock1->acquire();
+ $this->assertTrue($ok);
+
+ $lock2 = new \phpbb\lock\flock($path);
+ $ok = $lock2->acquire();
+ $this->assertFalse($ok);
+
+ $lock->release();
+ $ok = $lock2->acquire();
+ $this->assertTrue($ok);
+ }
+ */
+
+ public function test_concurrent_locking()
+ {
+ if (!function_exists('pcntl_fork'))
+ {
+ $this->markTestSkipped('pcntl extension and pcntl_fork are required for this test');
+ }
+
+ $path = __DIR__ . '/../tmp/precious';
+
+ $pid = pcntl_fork();
+ if ($pid)
+ {
+ // parent
+ // wait 0.5 s, acquire the lock, note how long it took
+ sleep(1);
+
+ $lock = new \phpbb\lock\flock($path);
+ $start = time();
+ $ok = $lock->acquire();
+ $delta = time() - $start;
+ $this->assertTrue($ok);
+ $this->assertTrue($lock->owns_lock());
+ $this->assertGreaterThan(0.5, $delta, 'First lock acquired too soon');
+
+ $lock->release();
+ $this->assertFalse($lock->owns_lock());
+
+ // acquire again, this should be instantaneous
+ $start = time();
+ $ok = $lock->acquire();
+ $delta = time() - $start;
+ $this->assertTrue($ok);
+ $this->assertTrue($lock->owns_lock());
+ $this->assertLessThan(0.1, $delta, 'Second lock not acquired instantaneously');
+
+ // reap the child
+ $status = null;
+ pcntl_waitpid($pid, $status);
+ }
+ else
+ {
+ // child
+ // immediately acquire the lock and sleep for 2 s
+ $lock = new \phpbb\lock\flock($path);
+ $ok = $lock->acquire();
+ $this->assertTrue($ok);
+ $this->assertTrue($lock->owns_lock());
+ sleep(2);
+ $lock->release();
+ $this->assertFalse($lock->owns_lock());
+
+ // and go away silently
+ pcntl_exec('/usr/bin/env', array('true'));
+ }
+ }
+}
diff --git a/tests/log/add_test.php b/tests/log/add_test.php
new file mode 100644
index 0000000000..032546f002
--- /dev/null
+++ b/tests/log/add_test.php
@@ -0,0 +1,88 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php';
+
+class phpbb_log_add_test extends phpbb_database_test_case
+{
+ public function getDataSet()
+ {
+ return $this->createXMLDataSet(dirname(__FILE__) . '/fixtures/empty_log.xml');
+ }
+
+ public function test_log_enabled()
+ {
+ global $phpbb_root_path, $phpEx, $db, $phpbb_dispatcher;
+
+ $db = $this->new_dbal();
+ $cache = new phpbb_mock_cache;
+ $phpbb_dispatcher = new phpbb_mock_event_dispatcher();
+ $user = $this->getMock('\phpbb\user');
+ $auth = $this->getMock('\phpbb\auth\auth');
+
+ $log = new \phpbb\log\log($db, $user, $auth, $phpbb_dispatcher, $phpbb_root_path, 'adm/', $phpEx, LOG_TABLE);
+
+ $this->assertTrue($log->is_enabled(), 'Initialise failed');
+
+ $log->disable();
+ $this->assertFalse($log->is_enabled(), 'Disable all failed');
+
+ $log->enable();
+ $this->assertTrue($log->is_enabled(), 'Enable all failed');
+
+ $log->disable('admin');
+ $this->assertFalse($log->is_enabled('admin'), 'Disable admin failed');
+ $this->assertTrue($log->is_enabled('user'), 'User should be enabled, is disabled');
+ $this->assertTrue($log->is_enabled(), 'Disable admin disabled all');
+
+ $log->enable('admin');
+ $this->assertTrue($log->is_enabled('admin'), 'Enable admin failed');
+ }
+
+ public function test_log_add()
+ {
+ global $phpbb_root_path, $phpEx, $db, $phpbb_dispatcher;
+
+ $db = $this->new_dbal();
+ $cache = new phpbb_mock_cache;
+ $phpbb_dispatcher = new phpbb_mock_event_dispatcher();
+ $user = $this->getMock('\phpbb\user');
+ $auth = $this->getMock('\phpbb\auth\auth');
+
+ $log = new \phpbb\log\log($db, $user, $auth, $phpbb_dispatcher, $phpbb_root_path, 'adm/', $phpEx, LOG_TABLE);
+
+ $mode = 'critical';
+ $user_id = ANONYMOUS;
+ $log_ip = 'user_ip';
+ $log_time = time();
+ $log_operation = 'LOG_OPERATION';
+ $additional_data = array();
+
+ // Add an entry successful
+ $this->assertEquals(1, $log->add($mode, $user_id, $log_ip, $log_operation, $log_time));
+
+ // Disable logging for all types
+ $log->disable();
+ $this->assertFalse($log->add($mode, $user_id, $log_ip, $log_operation, $log_time), 'Disable for all types failed');
+ $log->enable();
+
+ // Disable logging for same type
+ $log->disable('critical');
+ $this->assertFalse($log->add($mode, $user_id, $log_ip, $log_operation, $log_time), 'Disable for same type failed');
+ $log->enable();
+
+ // Disable logging for different type
+ $log->disable('admin');
+ $this->assertEquals(2, $log->add($mode, $user_id, $log_ip, $log_operation, $log_time), 'Disable for different types failed');
+ $log->enable();
+
+ // Invalid mode specified
+ $this->assertFalse($log->add('mode_does_not_exist', $user_id, $log_ip, $log_operation, $log_time));
+ }
+}
diff --git a/tests/log/fixtures/empty_log.xml b/tests/log/fixtures/empty_log.xml
new file mode 100644
index 0000000000..261b6a622a
--- /dev/null
+++ b/tests/log/fixtures/empty_log.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<dataset>
+ <table name="phpbb_log">
+ <column>log_id</column>
+ <column>log_type</column>
+ <column>user_id</column>
+ <column>forum_id</column>
+ <column>topic_id</column>
+ <column>reportee_id</column>
+ <column>log_ip</column>
+ <column>log_time</column>
+ <column>log_operation</column>
+ <column>log_data</column>
+ </table>
+</dataset>
diff --git a/tests/log/fixtures/full_log.xml b/tests/log/fixtures/full_log.xml
new file mode 100644
index 0000000000..a10c224e0e
--- /dev/null
+++ b/tests/log/fixtures/full_log.xml
@@ -0,0 +1,160 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<dataset>
+ <table name="phpbb_log">
+ <column>log_id</column>
+ <column>log_type</column>
+ <column>user_id</column>
+ <column>forum_id</column>
+ <column>topic_id</column>
+ <column>reportee_id</column>
+ <column>log_ip</column>
+ <column>log_time</column>
+ <column>log_operation</column>
+ <column>log_data</column>
+ <row>
+ <value>1</value>
+ <value>0</value>
+ <value>1</value>
+ <value>0</value>
+ <value>0</value>
+ <value>0</value>
+ <value>127.0.0.1</value>
+ <value>1</value>
+ <value>LOG_INSTALL_INSTALLED</value>
+ <value>a:1:{i:0;s:9:"3.1.0-dev";}</value>
+ </row>
+ <row>
+ <value>2</value>
+ <value>0</value>
+ <value>1</value>
+ <value>0</value>
+ <value>0</value>
+ <value>0</value>
+ <value>127.0.0.1</value>
+ <value>1</value>
+ <value>LOG_KEY_NOT_EXISTS</value>
+ <value>a:1:{i:0;s:15:"additional_data";}</value>
+ </row>
+ <row>
+ <value>3</value>
+ <value>2</value>
+ <value>1</value>
+ <value>0</value>
+ <value>0</value>
+ <value>0</value>
+ <value>127.0.0.1</value>
+ <value>1</value>
+ <value>LOG_CRITICAL</value>
+ <value>a:1:{i:0;s:13:"critical data";}</value>
+ </row>
+ <row>
+ <value>4</value>
+ <value>1</value>
+ <value>1</value>
+ <value>12</value>
+ <value>34</value>
+ <value>0</value>
+ <value>127.0.0.1</value>
+ <value>1</value>
+ <value>LOG_MOD</value>
+ <value></value>
+ </row>
+ <row>
+ <value>5</value>
+ <value>1</value>
+ <value>1</value>
+ <value>12</value>
+ <value>45</value>
+ <value>0</value>
+ <value>127.0.0.1</value>
+ <value>1</value>
+ <value>LOG_MOD</value>
+ <value></value>
+ </row>
+ <row>
+ <value>6</value>
+ <value>1</value>
+ <value>1</value>
+ <value>23</value>
+ <value>56</value>
+ <value>0</value>
+ <value>127.0.0.1</value>
+ <value>1</value>
+ <value>LOG_MOD</value>
+ <value></value>
+ </row>
+ <row>
+ <value>7</value>
+ <value>1</value>
+ <value>1</value>
+ <value>12</value>
+ <value>45</value>
+ <value>0</value>
+ <value>127.0.0.1</value>
+ <value>1</value>
+ <value>LOG_MOD2</value>
+ <value></value>
+ </row>
+ <row>
+ <value>8</value>
+ <value>3</value>
+ <value>1</value>
+ <value>0</value>
+ <value>0</value>
+ <value>2</value>
+ <value>127.0.0.1</value>
+ <value>1</value>
+ <value>LOG_USER</value>
+ <value>a:1:{i:0;s:5:"admin";}</value>
+ </row>
+ <row>
+ <value>9</value>
+ <value>3</value>
+ <value>1</value>
+ <value>0</value>
+ <value>0</value>
+ <value>1</value>
+ <value>127.0.0.1</value>
+ <value>1</value>
+ <value>LOG_USER</value>
+ <value>a:1:{i:0;s:5:"guest";}</value>
+ </row>
+ </table>
+ <table name="phpbb_users">
+ <column>user_id</column>
+ <column>username</column>
+ <column>username_clean</column>
+ <column>user_permissions</column>
+ <column>user_sig</column>
+ <row>
+ <value>1</value>
+ <value>Anonymous</value>
+ <value>Anonymous</value>
+ <value></value>
+ <value></value>
+ </row>
+ <row>
+ <value>2</value>
+ <value>admin</value>
+ <value>admin</value>
+ <value></value>
+ <value></value>
+ </row>
+ </table>
+ <table name="phpbb_topics">
+ <column>topic_id</column>
+ <column>forum_id</column>
+ <row>
+ <value>34</value>
+ <value>12</value>
+ </row>
+ <row>
+ <value>45</value>
+ <value>12</value>
+ </row>
+ <row>
+ <value>56</value>
+ <value>23</value>
+ </row>
+ </table>
+</dataset>
diff --git a/tests/log/function_add_log_test.php b/tests/log/function_add_log_test.php
new file mode 100644
index 0000000000..e1bcd4acaf
--- /dev/null
+++ b/tests/log/function_add_log_test.php
@@ -0,0 +1,193 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php';
+
+class phpbb_log_function_add_log_test extends phpbb_database_test_case
+{
+ public function getDataSet()
+ {
+ return $this->createXMLDataSet(dirname(__FILE__) . '/fixtures/empty_log.xml');
+ }
+
+ public static function add_log_function_data()
+ {
+ return array(
+ /**
+ * Case documentation
+ array(
+ // Row that is in the database afterwards
+ array(
+ 'user_id' => ANONYMOUS,
+ 'log_type' => LOG_MOD,
+ 'log_operation' => 'LOG_MOD_ADDITIONAL',
+ // log_data will be serialized
+ 'log_data' => array(
+ 'argument3',
+ ),
+ 'reportee_id' => 0,
+ 'forum_id' => 56,
+ 'topic_id' => 78,
+ ),
+ // user_id Can also be false, then ANONYMOUS is used
+ false,
+ // log_mode Used to determine the log_type
+ 'mod',
+ // Followed by some additional arguments
+ // forum_id, topic_id and reportee_id are specified before log_operation
+ // The rest is specified afterwards.
+ 56,
+ 78,
+ 'LOG_MOD_ADDITIONAL', // log_operation
+ 'argument3',
+ ),
+ */
+ array(
+ array(
+ 'user_id' => 2,
+ 'log_type' => LOG_CRITICAL,
+ 'log_operation' => 'LOG_NO_ADDITIONAL',
+ 'log_data' => '',
+ 'reportee_id' => 0,
+ 'forum_id' => 0,
+ 'topic_id' => 0,
+ ),
+ 2, 'critical', 'LOG_NO_ADDITIONAL',
+ ),
+ array(
+ array(
+ 'user_id' => 2,
+ 'log_type' => LOG_CRITICAL,
+ 'log_operation' => 'LOG_ONE_ADDITIONAL',
+ 'log_data' => array(
+ 'argument1',
+ ),
+ 'reportee_id' => 0,
+ 'forum_id' => 0,
+ 'topic_id' => 0,
+ ),
+ 2, 'critical', 'LOG_ONE_ADDITIONAL', 'argument1',
+ ),
+ array(
+ array(
+ 'user_id' => ANONYMOUS,
+ 'log_type' => LOG_ADMIN,
+ 'log_operation' => 'LOG_TWO_ADDITIONAL',
+ 'log_data' => array(
+ 'argument1',
+ 'argument2',
+ ),
+ 'reportee_id' => 0,
+ 'forum_id' => 0,
+ 'topic_id' => 0,
+ ),
+ false, 'admin', 'LOG_TWO_ADDITIONAL', 'argument1', 'argument2',
+ ),
+ array(
+ array(
+ 'user_id' => ANONYMOUS,
+ 'log_type' => LOG_USERS,
+ 'log_operation' => 'LOG_USERS_ADDITIONAL',
+ 'log_data' => array(
+ 'argument2',
+ ),
+ 'reportee_id' => 2,
+ 'forum_id' => 0,
+ 'topic_id' => 0,
+ ),
+ false, 'user', 2, 'LOG_USERS_ADDITIONAL', 'argument2',
+ ),
+ array(
+ array(
+ 'user_id' => ANONYMOUS,
+ 'log_type' => LOG_MOD,
+ 'log_operation' => 'LOG_MOD_TOPIC_AND_FORUM',
+ 'log_data' => '',
+ 'reportee_id' => 0,
+ 'forum_id' => 12,
+ 'topic_id' => 34,
+ ),
+ false, 'mod', 12, 34, 'LOG_MOD_TOPIC_AND_FORUM',
+ ),
+ array(
+ array(
+ 'user_id' => ANONYMOUS,
+ 'log_type' => LOG_MOD,
+ 'log_operation' => 'LOG_MOD_ADDITIONAL',
+ 'log_data' => array(
+ 'argument3',
+ ),
+ 'reportee_id' => 0,
+ 'forum_id' => 56,
+ 'topic_id' => 78,
+ ),
+ false, 'mod', 56, 78, 'LOG_MOD_ADDITIONAL', 'argument3',
+ ),
+ array(
+ array(
+ ),
+ false, 'mode_does_not_exist', 'LOG_MOD_ADDITIONAL', 'argument1',
+ ),
+ );
+ }
+
+ /**
+ * @dataProvider add_log_function_data
+ */
+ public function test_add_log_function($expected, $user_id, $mode, $required1, $additional1 = null, $additional2 = null, $additional3 = null)
+ {
+ global $db, $cache, $user, $phpbb_log, $phpbb_dispatcher, $phpbb_root_path, $phpEx;
+
+ if ($expected)
+ {
+ // Serialize the log data if we have some
+ if (is_array($expected['log_data']))
+ {
+ $expected['log_data'] = serialize($expected['log_data']);
+ }
+ $expected = array($expected);
+ }
+
+ $db = $this->new_dbal();
+ $cache = new phpbb_mock_cache;
+ $phpbb_dispatcher = new phpbb_mock_event_dispatcher();
+ $user = $this->getMock('\phpbb\user');
+ $auth = $this->getMock('\phpbb\auth\auth');
+
+ $phpbb_log = new \phpbb\log\log($db, $user, $auth, $phpbb_dispatcher, $phpbb_root_path, 'adm/', $phpEx, LOG_TABLE);
+
+ $user->ip = 'user_ip';
+ if ($user_id)
+ {
+ $user->data['user_id'] = $user_id;
+ }
+
+ if ($additional3 != null)
+ {
+ add_log($mode, $required1, $additional1, $additional2, $additional3);
+ }
+ else if ($additional2 != null)
+ {
+ add_log($mode, $required1, $additional1, $additional2);
+ }
+ else if ($additional1 != null)
+ {
+ add_log($mode, $required1, $additional1);
+ }
+ else
+ {
+ add_log($mode, $required1);
+ }
+
+ $result = $db->sql_query('SELECT user_id, log_type, log_operation, log_data, reportee_id, forum_id, topic_id
+ FROM ' . LOG_TABLE);
+
+ $this->assertEquals($expected, $db->sql_fetchrowset($result));
+ }
+}
diff --git a/tests/log/function_view_log_test.php b/tests/log/function_view_log_test.php
new file mode 100644
index 0000000000..017484e8a7
--- /dev/null
+++ b/tests/log/function_view_log_test.php
@@ -0,0 +1,343 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php';
+require_once dirname(__FILE__) . '/../../phpBB/includes/functions_admin.php';
+require_once dirname(__FILE__) . '/../../phpBB/includes/functions_content.php';
+require_once dirname(__FILE__) . '/../../phpBB/includes/utf/utf_tools.php';
+require_once dirname(__FILE__) . '/../mock/user.php';
+require_once dirname(__FILE__) . '/../mock/cache.php';
+
+class phpbb_log_function_view_log_test extends phpbb_database_test_case
+{
+ public function getDataSet()
+ {
+ return $this->createXMLDataSet(dirname(__FILE__) . '/fixtures/full_log.xml');
+ }
+
+ public static function view_log_function_data()
+ {
+ global $phpEx, $phpbb_dispatcher;
+ $phpbb_dispatcher = new phpbb_mock_event_dispatcher();
+
+ $expected_data_sets = array(
+ 1 => array(
+ 'id' => 1,
+
+ 'reportee_id' => 0,
+ 'reportee_username' => '',
+ 'reportee_username_full'=> '',
+
+ 'user_id' => 1,
+ 'username' => 'Anonymous',
+ 'username_full' => 'Anonymous',
+
+ 'ip' => '127.0.0.1',
+ 'time' => 1,
+ 'forum_id' => 0,
+ 'topic_id' => 0,
+
+ 'viewforum' => '',
+ 'action' => 'installed: 3.1.0-dev',
+ ),
+ 2 => array(
+ 'id' => 2,
+
+ 'reportee_id' => 0,
+ 'reportee_username' => '',
+ 'reportee_username_full'=> '',
+
+ 'user_id' => 1,
+ 'username' => 'Anonymous',
+ 'username_full' => 'Anonymous',
+
+ 'ip' => '127.0.0.1',
+ 'time' => 1,
+ 'forum_id' => 0,
+ 'topic_id' => 0,
+
+ 'viewforum' => '',
+ 'action' => '{LOG KEY NOT EXISTS}<br />additional_data',
+ ),
+ 3 => array(
+ 'id' => 3,
+
+ 'reportee_id' => 0,
+ 'reportee_username' => '',
+ 'reportee_username_full'=> '',
+
+ 'user_id' => 1,
+ 'username' => 'Anonymous',
+ 'username_full' => 'Anonymous',
+
+ 'ip' => '127.0.0.1',
+ 'time' => 1,
+ 'forum_id' => 0,
+ 'topic_id' => 0,
+
+ 'viewforum' => '',
+ 'action' => '{LOG CRITICAL}<br />critical data',
+ ),
+ 4 => array(
+ 'id' => 4,
+
+ 'reportee_id' => 0,
+ 'reportee_username' => '',
+ 'reportee_username_full'=> '',
+
+ 'user_id' => 1,
+ 'username' => 'Anonymous',
+ 'username_full' => 'Anonymous',
+
+ 'ip' => '127.0.0.1',
+ 'time' => 1,
+ 'forum_id' => 12,
+ 'topic_id' => 34,
+
+ 'viewforum' => '',
+ 'action' => '{LOG MOD}',
+ 'viewtopic' => '',
+ 'viewlogs' => '',
+ ),
+ 5 => array(
+ 'id' => 5,
+
+ 'reportee_id' => 0,
+ 'reportee_username' => '',
+ 'reportee_username_full'=> '',
+
+ 'user_id' => 1,
+ 'username' => 'Anonymous',
+ 'username_full' => 'Anonymous',
+
+ 'ip' => '127.0.0.1',
+ 'time' => 1,
+ 'forum_id' => 12,
+ 'topic_id' => 45,
+
+ 'viewforum' => '',
+ 'action' => '{LOG MOD}',
+ 'viewtopic' => '',
+ 'viewlogs' => '',
+ ),
+ 6 => array(
+ 'id' => 6,
+
+ 'reportee_id' => 0,
+ 'reportee_username' => '',
+ 'reportee_username_full'=> '',
+
+ 'user_id' => 1,
+ 'username' => 'Anonymous',
+ 'username_full' => 'Anonymous',
+
+ 'ip' => '127.0.0.1',
+ 'time' => 1,
+ 'forum_id' => 23,
+ 'topic_id' => 56,
+
+ 'viewforum' => append_sid("phpBB/viewforum.$phpEx", 'f=23'),
+ 'action' => '{LOG MOD}',
+ 'viewtopic' => append_sid("phpBB/viewtopic.$phpEx", 'f=23&amp;t=56'),
+ 'viewlogs' => append_sid("phpBB/mcp.$phpEx", 'i=logs&amp;mode=topic_logs&amp;t=56'),
+ ),
+ 7 => array(
+ 'id' => 7,
+
+ 'reportee_id' => 0,
+ 'reportee_username' => '',
+ 'reportee_username_full'=> '',
+
+ 'user_id' => 1,
+ 'username' => 'Anonymous',
+ 'username_full' => 'Anonymous',
+
+ 'ip' => '127.0.0.1',
+ 'time' => 1,
+ 'forum_id' => 12,
+ 'topic_id' => 45,
+
+ 'viewforum' => '',
+ 'action' => '{LOG MOD2}',
+ 'viewtopic' => '',
+ 'viewlogs' => '',
+ ),
+ 8 => array(
+ 'id' => 8,
+
+ 'reportee_id' => 2,
+ 'reportee_username' => 'admin',
+ 'reportee_username_full'=> 'admin',
+
+ 'user_id' => 1,
+ 'username' => 'Anonymous',
+ 'username_full' => 'Anonymous',
+
+ 'ip' => '127.0.0.1',
+ 'time' => 1,
+ 'forum_id' => 0,
+ 'topic_id' => 0,
+
+ 'viewforum' => '',
+ 'action' => '{LOG USER}<br />admin',
+ ),
+ 9 => array(
+ 'id' => 9,
+
+ 'reportee_id' => 1,
+ 'reportee_username' => 'Anonymous',
+ 'reportee_username_full'=> 'Anonymous',
+
+ 'user_id' => 1,
+ 'username' => 'Anonymous',
+ 'username_full' => 'Anonymous',
+
+ 'ip' => '127.0.0.1',
+ 'time' => 1,
+ 'forum_id' => 0,
+ 'topic_id' => 0,
+
+ 'viewforum' => '',
+ 'action' => '{LOG USER}<br />guest',
+ ),
+ );
+
+ $test_cases = array(
+ /**
+ * Case documentation
+ array(
+ // Array of datasets that should be in $log after running the function
+ 'expected' => array(5, 7),
+ // Offset that will be returned from the function
+ 'expected_returned' => 0,
+ // view_log parameters (see includes/functions_admin.php for docblock)
+ // $log is ommited!
+ 'mod', 5, 0, 12, 45,
+ ),
+ */
+ array(
+ 'expected' => array(1, 2),
+ 'expected_returned' => 0,
+ 'admin', false,
+ ),
+ array(
+ 'expected' => array(1),
+ 'expected_returned' => 0,
+ 'admin', false, 1,
+ ),
+ array(
+ 'expected' => array(2),
+ 'expected_returned' => 1,
+ 'admin', false, 1, 1,
+ ),
+ array(
+ 'expected' => array(2),
+ 'expected_returned' => 1,
+ 'admin', 0, 1, 1,
+ ),
+ array(
+ 'expected' => array(2),
+ 'expected_returned' => 1,
+ 'admin', 0, 1, 5,
+ ),
+ array(
+ 'expected' => array(3),
+ 'expected_returned' => 0,
+ 'critical', false,
+ ),
+ array(
+ 'expected' => array(),
+ 'expected_returned' => null,
+ 'mode_does_not_exist', false,
+ ),
+ array(
+ 'expected' => array(4, 5, 7),
+ 'expected_returned' => 0,
+ 'mod', 0, 5, 0, 12,
+ ),
+ array(
+ 'expected' => array(5, 7),
+ 'expected_returned' => 0,
+ 'mod', 0, 5, 0, 12, 45,
+ ),
+ array(
+ 'expected' => array(6),
+ 'expected_returned' => 0,
+ 'mod', 0, 5, 0, 23,
+ ),
+ array(
+ 'expected' => array(8),
+ 'expected_returned' => 0,
+ 'user', 0, 5, 0, 0, 0, 2,
+ ),
+ array(
+ 'expected' => array(8, 9),
+ 'expected_returned' => 0,
+ 'users', 0,
+ ),
+ );
+
+ foreach ($test_cases as $case => $case_data)
+ {
+ foreach ($case_data['expected'] as $data_set => $expected)
+ {
+ $test_cases[$case]['expected'][$data_set] = $expected_data_sets[$expected];
+ }
+ }
+
+ return $test_cases;
+ }
+
+ /**
+ * @dataProvider view_log_function_data
+ */
+ public function test_view_log_function($expected, $expected_returned, $mode, $log_count, $limit = 5, $offset = 0, $forum_id = 0, $topic_id = 0, $user_id = 0, $limit_days = 0, $sort_by = 'l.log_id ASC', $keywords = '')
+ {
+ global $cache, $db, $user, $auth, $phpbb_log, $phpbb_dispatcher, $phpbb_root_path, $phpEx;
+
+ $db = $this->new_dbal();
+ $cache = new phpbb_mock_cache;
+ $phpbb_dispatcher = new phpbb_mock_event_dispatcher();
+
+ // Create auth mock
+ $auth = $this->getMock('\phpbb\auth\auth');
+ $acl_get_map = array(
+ array('f_read', 23, true),
+ array('m_', 23, true),
+ );
+ $acl_gets_map = array(
+ array('a_', 'm_', 23, true),
+ );
+
+ $auth->expects($this->any())
+ ->method('acl_get')
+ ->with($this->stringContains('_'),
+ $this->anything())
+ ->will($this->returnValueMap($acl_get_map));
+ $auth->expects($this->any())
+ ->method('acl_gets')
+ ->with($this->stringContains('_'),
+ $this->anything())
+ ->will($this->returnValueMap($acl_gets_map));
+
+ $user = new phpbb_mock_user;
+ $user->optionset('viewcensors', false);
+ // Test sprintf() of the data into the action
+ $user->lang = array(
+ 'LOG_INSTALL_INSTALLED' => 'installed: %s',
+ );
+
+ $phpbb_log = new \phpbb\log\log($db, $user, $auth, $phpbb_dispatcher, $phpbb_root_path, 'adm/', $phpEx, LOG_TABLE);
+
+ $log = array();
+ $this->assertEquals($expected_returned, view_log($mode, $log, $log_count, $limit, $offset, $forum_id, $topic_id, $user_id, $limit_days, $sort_by, $keywords));
+
+ $this->assertEquals($expected, $log);
+ }
+}
diff --git a/tests/migrator/get_schema_steps_test.php b/tests/migrator/get_schema_steps_test.php
new file mode 100644
index 0000000000..226535754e
--- /dev/null
+++ b/tests/migrator/get_schema_steps_test.php
@@ -0,0 +1,200 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2014 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+class get_schema_steps_test extends phpbb_test_case
+{
+ public function setUp()
+ {
+ parent::setUp();
+
+ $this->helper = new \phpbb\db\migration\helper();
+ }
+
+ public function schema_provider()
+ {
+ return array(
+ array(
+ array(
+ 'add_tables' => array(
+ 'foo' => array(
+ 'COLUMNS' => array(
+ 'foobar' => array('BOOL', 0),
+ 'foobar2' => array('BOOL', 0),
+ ),
+ 'PRIMARY_KEY' => array('foobar'),
+ ),
+ 'bar' => array(
+ 'COLUMNS' => array(
+ 'barfoo' => array('BOOL', 0),
+ 'barfoor2' => array('BOOL', 0),
+ ),
+ 'PRIMARY_KEY' => array('barfoo'),
+ ),
+ ),
+ 'drop_tables' => array('table1', 'table2', 'table3'),
+ 'add_index' => array(
+ 'table1' => array(
+ 'index1' => 'column1',
+ 'index2' => 'column2',
+ ),
+ 'table2' => array(
+ 'index1' => 'column1',
+ 'index2' => 'column2',
+ ),
+ ),
+ 'add_columns' => array(
+ 'table1' => array(
+ 'column1' => array('foo'),
+ 'column2' => array('bar'),
+ ),
+ ),
+ 'change_columns' => array(
+ 'table1' => array(
+ 'column1' => array('foo'),
+ 'column2' => array('bar'),
+ ),
+ ),
+ 'drop_columns' => array(
+ 'table1' => array(
+ 'column1',
+ 'column2',
+ ),
+ ),
+ 'add_unique_index' => array(
+ 'table1' => array(
+ 'index1' => 'column1',
+ 'index2' => 'column2',
+ ),
+ ),
+ 'drop_keys' => array(
+ 'table1' => array(
+ 'column1',
+ 'column2',
+ ),
+ ),
+ 'add_primary_keys' => array(
+ 'table1' => array('foo'),
+ 'table2' => array('bar'),
+ 'table3' => array('foobar'),
+ ),
+ ),
+ array(
+ array('dbtools.perform_schema_changes', array(array('drop_tables' => array('table1')))),
+ array('dbtools.perform_schema_changes', array(array('drop_tables' => array('table2')))),
+ array('dbtools.perform_schema_changes', array(array('drop_tables' => array('table3')))),
+ array('dbtools.perform_schema_changes', array(array('add_tables' => array(
+ 'foo' => array(
+ 'COLUMNS' => array(
+ 'foobar' => array('BOOL', 0),
+ 'foobar2' => array('BOOL', 0),
+ ),
+ 'PRIMARY_KEY' => array('foobar'),
+ ),
+ )))),
+ array('dbtools.perform_schema_changes', array(array('add_tables' => array(
+ 'bar' => array(
+ 'COLUMNS' => array(
+ 'barfoo' => array('BOOL', 0),
+ 'barfoor2' => array('BOOL', 0),
+ ),
+ 'PRIMARY_KEY' => array('barfoo'),
+ ),
+ )))),
+ array('dbtools.perform_schema_changes', array(array('change_columns' => array(
+ 'table1' => array(
+ 'column1' => array('foo'),
+ ),
+ )))),
+ array('dbtools.perform_schema_changes', array(array('change_columns' => array(
+ 'table1' => array(
+ 'column2' => array('bar'),
+ ),
+ )))),
+ array('dbtools.perform_schema_changes', array(array('add_columns' => array(
+ 'table1' => array(
+ 'column1' => array('foo'),
+ ),
+ )))),
+ array('dbtools.perform_schema_changes', array(array('add_columns' => array(
+ 'table1' => array(
+ 'column2' => array('bar'),
+ ),
+ )))),
+ array('dbtools.perform_schema_changes', array(array('drop_keys' => array(
+ 'table1' => array(
+ 0 => 'column1',
+ ),
+ )))),
+ array('dbtools.perform_schema_changes', array(array('drop_keys' => array(
+ 'table1' => array(
+ 1 => 'column2',
+ ),
+ )))),
+ array('dbtools.perform_schema_changes', array(array('drop_columns' => array(
+ 'table1' => array(
+ 0 => 'column1',
+ ),
+ )))),
+ array('dbtools.perform_schema_changes', array(array('drop_columns' => array(
+ 'table1' => array(
+ 1 => 'column2',
+ ),
+ )))),
+ array('dbtools.perform_schema_changes', array(array('add_primary_keys' => array(
+ 'table1' => array('foo'),
+ )))),
+ array('dbtools.perform_schema_changes', array(array('add_primary_keys' => array(
+ 'table2' => array('bar'),
+ )))),
+ array('dbtools.perform_schema_changes', array(array('add_primary_keys' => array(
+ 'table3' => array('foobar'),
+ )))),
+ array('dbtools.perform_schema_changes', array(array('add_unique_index' => array(
+ 'table1' => array(
+ 'index1' => 'column1',
+ ),
+ )))),
+ array('dbtools.perform_schema_changes', array(array('add_unique_index' => array(
+ 'table1' => array(
+ 'index2' => 'column2',
+ ),
+ )))),
+ array('dbtools.perform_schema_changes', array(array('add_index' => array(
+ 'table1' => array(
+ 'index1' => 'column1',
+ ),
+ )))),
+ array('dbtools.perform_schema_changes', array(array('add_index' => array(
+ 'table1' => array(
+ 'index2' => 'column2',
+ ),
+ )))),
+ array('dbtools.perform_schema_changes', array(array('add_index' => array(
+ 'table2' => array(
+ 'index1' => 'column1',
+ ),
+ )))),
+ array('dbtools.perform_schema_changes', array(array('add_index' => array(
+ 'table2' => array(
+ 'index2' => 'column2',
+ ),
+ )))),
+ ),
+ ),
+ );
+ }
+
+ /**
+ * @dataProvider schema_provider
+ */
+ public function test_get_schema_steps($schema_changes, $expected)
+ {
+ $this->assertEquals($expected, $this->helper->get_schema_steps($schema_changes));
+ }
+}
diff --git a/tests/mimetype/fixtures/jpg b/tests/mimetype/fixtures/jpg
new file mode 100644
index 0000000000..3cd5038e38
--- /dev/null
+++ b/tests/mimetype/fixtures/jpg
Binary files differ
diff --git a/tests/mimetype/guesser_test.php b/tests/mimetype/guesser_test.php
new file mode 100644
index 0000000000..9f0371262b
--- /dev/null
+++ b/tests/mimetype/guesser_test.php
@@ -0,0 +1,166 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\mimetype;
+
+require_once dirname(__FILE__) . '/null_guesser.php';
+require_once dirname(__FILE__) . '/incorrect_guesser.php';
+
+function function_exists($name)
+{
+ return guesser_test::$function_exists;
+}
+
+class guesser_test extends \phpbb_test_case
+{
+ public static $function_exists = true;
+
+ public function setUp()
+ {
+ global $phpbb_root_path;
+
+ $guessers = array(
+ new \Symfony\Component\HttpFoundation\File\MimeType\FileinfoMimeTypeGuesser(),
+ new \Symfony\Component\HttpFoundation\File\MimeType\FileBinaryMimeTypeGuesser(),
+ );
+ $this->guesser = new \phpbb\mimetype\guesser($guessers);
+ $this->path = dirname(__FILE__);
+ $this->jpg_file = $this->path . '/fixtures/jpg';
+ $this->phpbb_root_path = $phpbb_root_path;
+ }
+
+ public function data_guess_files()
+ {
+ return array(
+ array('image/gif', 'gif'),
+ array('image/png', 'png'),
+ array('image/jpeg', 'jpg'),
+ array('image/tiff', 'tif'),
+ array('text/html', 'txt'),
+ array(false, 'foobar'),
+ );
+ }
+
+ /**
+ * @dataProvider data_guess_files
+ */
+ public function test_guess_files($expected, $file)
+ {
+ $this->assertEquals($expected, $this->guesser->guess($this->path . '/../upload/fixture/' . $file));
+ }
+
+ public function test_file_not_readable()
+ {
+ @chmod($this->jpg_file, 0000);
+ if (is_readable($this->jpg_file))
+ {
+ @chmod($this->jpg_file, 0644);
+ $this->markTestSkipped('is_readable always returns true if user is superuser or chmod does not work');
+ }
+ $this->assertEquals(false, $this->guesser->guess($this->jpg_file));
+ @chmod($this->jpg_file, 0644);
+ $this->assertEquals('image/jpeg', $this->guesser->guess($this->jpg_file));
+ }
+
+ public function test_null_guess()
+ {
+ $guesser = new \phpbb\mimetype\guesser(array(new \phpbb\mimetype\null_guesser));
+ $this->assertEquals('application/octet-stream', $guesser->guess($this->jpg_file));
+ }
+
+ public function data_incorrect_guessers()
+ {
+ return array(
+ array(array(new \phpbb\mimetype\incorrect_guesser)),
+ array(array(new \phpbb\mimetype\null_guesser(false))),
+ array(array()),
+ );
+ }
+
+ /**
+ * @dataProvider data_incorrect_guessers
+ *
+ * @expectedException \LogicException
+ */
+ public function test_incorrect_guesser($guessers)
+ {
+ $guesser = new \phpbb\mimetype\guesser($guessers);
+ }
+
+ public function data_content_guesser()
+ {
+ return array(
+ array(
+ array(
+ 'image/jpeg',
+ 'image/jpeg',
+ ),
+ array(new \phpbb\mimetype\content_guesser),
+ false,
+ ),
+ array(
+ array(
+ 'application/octet-stream',
+ 'application/octet-stream',
+ ),
+ array(new \phpbb\mimetype\content_guesser),
+ true,
+ ),
+ array(
+ array(
+ 'application/octet-stream',
+ 'image/jpeg',
+ ),
+ array(new \phpbb\mimetype\extension_guesser),
+ ),
+ );
+ }
+
+ /**
+ * @dataProvider data_content_guesser
+ */
+ public function test_content_guesser($expected, $guessers, $overload = false)
+ {
+ $supported = false;
+ self::$function_exists = !$overload;
+
+ // Cover possible LogicExceptions
+ foreach ($guessers as $cur_guesser)
+ {
+ $supported += $cur_guesser->is_supported();
+ }
+
+ if (!$supported)
+ {
+ $this->setExpectedException('\LogicException');
+ }
+
+ $guesser = new \phpbb\mimetype\guesser($guessers);
+ $this->assertEquals($expected[0], $guesser->guess($this->jpg_file));
+ $this->assertEquals($expected[1], $guesser->guess($this->jpg_file, $this->jpg_file . '.jpg'));
+ @copy($this->jpg_file, $this->jpg_file . '.jpg');
+ $this->assertEquals($expected[1], $guesser->guess($this->jpg_file . '.jpg'));
+ @unlink($this->jpg_file . '.jpg');
+ }
+
+ public function test_sort_priority()
+ {
+ $guessers = array(
+ 'FileinfoMimeTypeGuesser' => new \Symfony\Component\HttpFoundation\File\MimeType\FileinfoMimeTypeGuesser,
+ 'extension_guesser' => new \phpbb\mimetype\extension_guesser,
+ 'FileBinaryMimeTypeGuesser' => new \Symfony\Component\HttpFoundation\File\MimeType\FileBinaryMimeTypeGuesser,
+ 'content_guesser' => new \phpbb\mimetype\content_guesser,
+ );
+ $guessers['content_guesser']->set_priority(5);
+ $guessers['extension_guesser']->set_priority(-5);
+ usort($guessers, array($this->guesser, 'sort_priority'));
+ $this->assertInstanceOf('\phpbb\mimetype\content_guesser', $guessers[0]);
+ $this->assertInstanceOf('\phpbb\mimetype\extension_guesser', $guessers[3]);
+ }
+}
diff --git a/tests/mimetype/incorrect_guesser.php b/tests/mimetype/incorrect_guesser.php
new file mode 100644
index 0000000000..3939826faa
--- /dev/null
+++ b/tests/mimetype/incorrect_guesser.php
@@ -0,0 +1,18 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\mimetype;
+
+class incorrect_guesser
+{
+ public function guess($file)
+ {
+ return 'image/jpeg';
+ }
+}
diff --git a/tests/mimetype/null_guesser.php b/tests/mimetype/null_guesser.php
new file mode 100644
index 0000000000..5316d3726f
--- /dev/null
+++ b/tests/mimetype/null_guesser.php
@@ -0,0 +1,30 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\mimetype;
+
+class null_guesser
+{
+ protected $is_supported;
+
+ public function __construct($is_supported = true)
+ {
+ $this->is_supported = $is_supported;
+ }
+
+ public function is_supported()
+ {
+ return $this->is_supported;
+ }
+
+ public function guess($file)
+ {
+ return null;
+ }
+}
diff --git a/tests/mock/auth_provider.php b/tests/mock/auth_provider.php
new file mode 100644
index 0000000000..734e682ee9
--- /dev/null
+++ b/tests/mock/auth_provider.php
@@ -0,0 +1,23 @@
+<?php
+/**
+ *
+ * @package testing
+ * @copyright (c) 2013 phpBB Group
+ * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+ *
+ */
+
+/**
+ * Mock auth provider class with basic functions to help test sessions.
+ */
+class phpbb_mock_auth_provider extends \phpbb\auth\provider\base
+{
+ public function login($username, $password)
+ {
+ return array(
+ 'status' => "",
+ 'error_msg' => "",
+ 'user_row' => "",
+ );
+ }
+}
diff --git a/tests/mock/cache.php b/tests/mock/cache.php
index acf4288319..83bbb8ef30 100644
--- a/tests/mock/cache.php
+++ b/tests/mock/cache.php
@@ -2,21 +2,18 @@
/**
*
* @package testing
-* @copyright (c) 2008 phpBB Group
+* @copyright (c) 2011 phpBB Group
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
-class phpbb_mock_cache
+class phpbb_mock_cache implements \phpbb\cache\driver\driver_interface
{
+ protected $data;
+
public function __construct($data = array())
{
$this->data = $data;
-
- if (!isset($this->data['_bots']))
- {
- $this->data['_bots'] = array();
- }
}
public function get($var_name)
@@ -34,24 +31,6 @@ class phpbb_mock_cache
$this->data[$var_name] = $var;
}
- public function destroy($var_name, $table = '')
- {
- if ($table)
- {
- throw new Exception('Destroying tables is not implemented yet');
- }
-
- unset($this->data[$var_name]);
- }
-
- /**
- * Obtain active bots
- */
- public function obtain_bots()
- {
- return $this->data['_bots'];
- }
-
/**
* Obtain list of word censors. We don't need to parse them here,
* that is tested elsewhere.
@@ -89,17 +68,32 @@ class phpbb_mock_cache
}
}
- public function set_bots($bots)
+ public function checkVar(PHPUnit_Framework_Assert $test, $var_name, $data)
{
- $this->data['_bots'] = $bots;
+ $test->assertTrue(isset($this->data[$var_name]));
+ $test->assertEquals($data, $this->data[$var_name]);
}
- public function checkVar(PHPUnit_Framework_Assert $test, $var_name, $data)
+ public function checkAssociativeVar(PHPUnit_Framework_Assert $test, $var_name, $data, $sort = true)
{
$test->assertTrue(isset($this->data[$var_name]));
+
+ if ($sort)
+ {
+ foreach ($this->data[$var_name] as &$content)
+ {
+ sort($content);
+ }
+ }
+
$test->assertEquals($data, $this->data[$var_name]);
}
+ public function checkVarUnset(PHPUnit_Framework_Assert $test, $var_name)
+ {
+ $test->assertFalse(isset($this->data[$var_name]));
+ }
+
public function check(PHPUnit_Framework_Assert $test, $data, $ignore_db_info = true)
{
$cache_data = $this->data;
@@ -116,5 +110,58 @@ class phpbb_mock_cache
$test->assertEquals($data, $cache_data);
}
-}
+ function load()
+ {
+ }
+ function unload()
+ {
+ }
+ function save()
+ {
+ }
+ function tidy()
+ {
+ }
+ function purge()
+ {
+ }
+ function destroy($var_name, $table = '')
+ {
+ unset($this->data[$var_name]);
+ }
+ public function _exists($var_name)
+ {
+ }
+ public function sql_load($query)
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function sql_save(\phpbb\db\driver\driver $db, $query, $query_result, $ttl)
+ {
+ return $query_result;
+ }
+ public function sql_exists($query_id)
+ {
+ }
+ public function sql_fetchrow($query_id)
+ {
+ }
+ public function sql_fetchfield($query_id, $field)
+ {
+ }
+ public function sql_rowseek($rownum, $query_id)
+ {
+ }
+ public function sql_freeresult($query_id)
+ {
+ }
+
+ public function obtain_bots()
+ {
+ return isset($this->data['_bots']) ? $this->data['_bots'] : array();
+ }
+}
diff --git a/tests/mock/container_builder.php b/tests/mock/container_builder.php
new file mode 100644
index 0000000000..734d3e1741
--- /dev/null
+++ b/tests/mock/container_builder.php
@@ -0,0 +1,179 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+use Symfony\Component\DependencyInjection\ContainerInterface;
+use Symfony\Component\DependencyInjection\ScopeInterface;
+
+class phpbb_mock_container_builder implements ContainerInterface
+{
+ protected $services = array();
+ protected $parameters = array();
+
+ /**
+ * Sets a service.
+ *
+ * @param string $id The service identifier
+ * @param object $service The service instance
+ * @param string $scope The scope of the service
+ *
+ * @api
+ */
+ public function set($id, $service, $scope = self::SCOPE_CONTAINER)
+ {
+ $this->services[$id] = $service;
+ }
+
+ /**
+ * Gets a service.
+ *
+ * @param string $id The service identifier
+ * @param int $invalidBehavior The behavior when the service does not exist
+ *
+ * @return object The associated service
+ *
+ * @throws InvalidArgumentException if the service is not defined
+ * @throws ServiceCircularReferenceException When a circular reference is detected
+ * @throws ServiceNotFoundException When the service is not defined
+ *
+ * @see Reference
+ *
+ * @api
+ */
+ public function get($id, $invalidBehavior = self::EXCEPTION_ON_INVALID_REFERENCE)
+ {
+ if ($this->has($id))
+ {
+ return $this->services[$id];
+ }
+
+ throw new Exception('Could not find service: ' . $id);
+ }
+
+ /**
+ * Returns true if the given service is defined.
+ *
+ * @param string $id The service identifier
+ *
+ * @return Boolean true if the service is defined, false otherwise
+ *
+ * @api
+ */
+ public function has($id)
+ {
+ return isset($this->services[$id]);
+ }
+
+ /**
+ * Gets a parameter.
+ *
+ * @param string $name The parameter name
+ *
+ * @return mixed The parameter value
+ *
+ * @throws InvalidArgumentException if the parameter is not defined
+ *
+ * @api
+ */
+ public function getParameter($name)
+ {
+ if ($this->hasParameter($name))
+ {
+ return $this->parameters[$name];
+ }
+
+ throw new Exception('Could not find parameter: ' . $name);
+ }
+
+ /**
+ * Checks if a parameter exists.
+ *
+ * @param string $name The parameter name
+ *
+ * @return Boolean The presence of parameter in container
+ *
+ * @api
+ */
+ public function hasParameter($name)
+ {
+ return isset($this->parameters[$name]);
+ }
+
+ /**
+ * Sets a parameter.
+ *
+ * @param string $name The parameter name
+ * @param mixed $value The parameter value
+ *
+ * @api
+ */
+ public function setParameter($name, $value)
+ {
+ $this->parameters[$name] = $value;
+ }
+
+ /**
+ * Enters the given scope
+ *
+ * @param string $name
+ *
+ * @api
+ */
+ public function enterScope($name)
+ {
+ }
+
+ /**
+ * Leaves the current scope, and re-enters the parent scope
+ *
+ * @param string $name
+ *
+ * @api
+ */
+ public function leaveScope($name)
+ {
+ }
+
+ /**
+ * Adds a scope to the container
+ *
+ * @param ScopeInterface $scope
+ *
+ * @api
+ */
+ public function addScope(ScopeInterface $scope)
+ {
+ }
+
+ /**
+ * Whether this container has the given scope
+ *
+ * @param string $name
+ *
+ * @return Boolean
+ *
+ * @api
+ */
+ public function hasScope($name)
+ {
+ }
+
+ /**
+ * Determines whether the given scope is currently active.
+ *
+ * It does however not check if the scope actually exists.
+ *
+ * @param string $name
+ *
+ * @return Boolean
+ *
+ * @api
+ */
+ public function isScopeActive($name)
+ {
+ }
+}
diff --git a/tests/mock/event_dispatcher.php b/tests/mock/event_dispatcher.php
new file mode 100644
index 0000000000..8887b16163
--- /dev/null
+++ b/tests/mock/event_dispatcher.php
@@ -0,0 +1,16 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+class phpbb_mock_event_dispatcher
+{
+ public function trigger_event($eventName, $data)
+ {
+ return array();
+ }
+}
diff --git a/tests/mock/extension_manager.php b/tests/mock/extension_manager.php
new file mode 100644
index 0000000000..7049cbdc50
--- /dev/null
+++ b/tests/mock/extension_manager.php
@@ -0,0 +1,19 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2011 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+class phpbb_mock_extension_manager extends \phpbb\extension\manager
+{
+ public function __construct($phpbb_root_path, $extensions = array())
+ {
+ $this->phpbb_root_path = $phpbb_root_path;
+ $this->php_ext = 'php';
+ $this->extensions = $extensions;
+ $this->filesystem = new \phpbb\filesystem();
+ }
+}
diff --git a/tests/mock/filespec.php b/tests/mock/filespec.php
new file mode 100644
index 0000000000..9d2a5c84de
--- /dev/null
+++ b/tests/mock/filespec.php
@@ -0,0 +1,32 @@
+<?php
+/**
+ *
+ * @package testing
+ * @copyright (c) 2012 phpBB Group
+ * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+ *
+ */
+
+/**
+ * Mock filespec class with some basic values to help with testing the
+ * fileupload class
+ */
+class phpbb_mock_filespec
+{
+ public $filesize;
+ public $realname;
+ public $extension;
+ public $width;
+ public $height;
+ public $error = array();
+
+ public function check_content($disallowed_content)
+ {
+ return true;
+ }
+
+ public function get($property)
+ {
+ return $this->$property;
+ }
+}
diff --git a/tests/mock/filesystem_extension_manager.php b/tests/mock/filesystem_extension_manager.php
new file mode 100644
index 0000000000..c5a51bbb3f
--- /dev/null
+++ b/tests/mock/filesystem_extension_manager.php
@@ -0,0 +1,32 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+class phpbb_mock_filesystem_extension_manager extends phpbb_mock_extension_manager
+{
+ public function __construct($phpbb_root_path)
+ {
+ $extensions = array();
+ $iterator = new DirectoryIterator($phpbb_root_path . 'ext/');
+ foreach ($iterator as $fileinfo)
+ {
+ if ($fileinfo->isDir() && substr($fileinfo->getFilename(), 0, 1) != '.')
+ {
+ $name = $fileinfo->getFilename();
+ $extension = array(
+ 'ext_name' => $name,
+ 'ext_active' => true,
+ 'ext_path' => 'ext/' . $name . '/',
+ );
+ $extensions[$name] = $extension;
+ }
+ }
+ ksort($extensions);
+ parent::__construct($phpbb_root_path, $extensions);
+ }
+}
diff --git a/tests/mock/fileupload.php b/tests/mock/fileupload.php
new file mode 100644
index 0000000000..cbcbf4a6ab
--- /dev/null
+++ b/tests/mock/fileupload.php
@@ -0,0 +1,23 @@
+<?php
+/**
+ *
+ * @package testing
+ * @copyright (c) 2012 phpBB Group
+ * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+ *
+ */
+
+/**
+ * Mock fileupload class with some basic values to help with testing the
+ * filespec class
+ */
+class phpbb_mock_fileupload
+{
+ public $max_filesize = 100;
+ public $error_prefix = '';
+
+ public function valid_dimensions($filespec)
+ {
+ return true;
+ }
+}
diff --git a/tests/mock/lang.php b/tests/mock/lang.php
new file mode 100644
index 0000000000..ac814b45db
--- /dev/null
+++ b/tests/mock/lang.php
@@ -0,0 +1,38 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2010 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+/**
+* phpbb_mock_lang
+* mock a user with some language-keys specified
+*/
+class phpbb_mock_lang implements ArrayAccess
+{
+ public function offsetExists($offset)
+ {
+ return true;
+ }
+
+ public function offsetGet($offset)
+ {
+ return $offset;
+ }
+
+ public function offsetSet($offset, $value)
+ {
+ }
+
+ public function offsetUnset($offset)
+ {
+ }
+
+ public function lang()
+ {
+ return implode(' ', func_get_args());
+ }
+}
diff --git a/tests/mock/metadata_manager.php b/tests/mock/metadata_manager.php
new file mode 100644
index 0000000000..b6489acfa4
--- /dev/null
+++ b/tests/mock/metadata_manager.php
@@ -0,0 +1,21 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+class phpbb_mock_metadata_manager extends \phpbb\extension\metadata_manager
+{
+ public function set_metadata($metadata)
+ {
+ $this->metadata = $metadata;
+ }
+
+ public function merge_metadata($metadata)
+ {
+ $this->metadata = array_merge($this->metadata, $metadata);
+ }
+}
diff --git a/tests/mock/notification_manager.php b/tests/mock/notification_manager.php
new file mode 100644
index 0000000000..47fe30730f
--- /dev/null
+++ b/tests/mock/notification_manager.php
@@ -0,0 +1,94 @@
+<?php
+/**
+*
+* @package notifications
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* Notifications service class
+* @package notifications
+*/
+class phpbb_mock_notification_manager
+{
+ public function load_notifications()
+ {
+ return array(
+ 'notifications' => array(),
+ 'unread_count' => 0,
+ );
+ }
+
+ public function mark_notifications_read()
+ {
+ }
+
+ public function mark_notifications_read_by_parent()
+ {
+ }
+
+ public function mark_notifications_read_by_id()
+ {
+ }
+
+
+ public function add_notifications()
+ {
+ return array();
+ }
+
+ public function add_notifications_for_users()
+ {
+ }
+
+ public function update_notifications()
+ {
+ }
+
+ public function delete_notifications()
+ {
+ }
+
+ public function get_subscription_types()
+ {
+ return array();
+ }
+
+ public function get_subscription_methods()
+ {
+ return array();
+ }
+
+
+ public function get_global_subscriptions()
+ {
+ return array();
+ }
+
+ public function add_subscription()
+ {
+ }
+
+ public function delete_subscription()
+ {
+ }
+
+ public function load_users()
+ {
+ }
+
+ public function get_user()
+ {
+ return null;
+ }
+}
diff --git a/tests/mock/notification_type_post.php b/tests/mock/notification_type_post.php
new file mode 100644
index 0000000000..80f2afbae0
--- /dev/null
+++ b/tests/mock/notification_type_post.php
@@ -0,0 +1,36 @@
+<?php
+/**
+*
+* @package notifications
+* @copyright (c) 2014 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+class phpbb_mock_notification_type_post extends \phpbb\notification\type\post
+{
+ public function __construct($user_loader, $db, $cache, $user, $auth, $config, $phpbb_root_path, $php_ext, $notification_types_table, $notifications_table, $user_notifications_table)
+ {
+ $this->user_loader = $user_loader;
+ $this->db = $db;
+ $this->cache = $cache;
+ $this->user = $user;
+ $this->auth = $auth;
+ $this->config = $config;
+
+ $this->phpbb_root_path = $phpbb_root_path;
+ $this->php_ext = $php_ext;
+
+ $this->notification_types_table = $notification_types_table;
+ $this->notifications_table = $notifications_table;
+ $this->user_notifications_table = $user_notifications_table;
+ }
+}
diff --git a/tests/mock/notifications_auth.php b/tests/mock/notifications_auth.php
new file mode 100644
index 0000000000..2d387d8c00
--- /dev/null
+++ b/tests/mock/notifications_auth.php
@@ -0,0 +1,40 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+class phpbb_mock_notifications_auth extends \phpbb\auth\auth
+{
+ function acl_get_list($user_id = false, $opts = false, $forum_id = false)
+ {
+ $user_id = (!is_array($user_id)) ? array($user_id) : $user_id;
+ $opts = (!is_array($opts)) ? array($opts) : $opts;
+ $forum_id = (!is_array($forum_id)) ? array($forum_id) : $forum_id;
+
+ $auth_list = array();
+
+ foreach ($forum_id as $fid)
+ {
+ foreach ($opts as $opt)
+ {
+ $auth_list[$fid][$opt] = array();
+
+ foreach ($user_id as $uid)
+ {
+ $auth_list[$fid][$opt][] = $uid;
+ }
+ }
+ }
+
+ return $auth_list;
+ }
+
+ function acl_get($opt, $f = 0)
+ {
+ return true;
+ }
+}
diff --git a/tests/mock/null_cache.php b/tests/mock/null_cache.php
index aca20ca77b..7bd33b441b 100644
--- a/tests/mock/null_cache.php
+++ b/tests/mock/null_cache.php
@@ -39,4 +39,9 @@ class phpbb_mock_null_cache
public function set_bots($bots)
{
}
+
+ public function sql_exists($query_id)
+ {
+ return false;
+ }
}
diff --git a/tests/mock/request.php b/tests/mock/request.php
new file mode 100644
index 0000000000..60ba725abd
--- /dev/null
+++ b/tests/mock/request.php
@@ -0,0 +1,94 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2011 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+class phpbb_mock_request implements \phpbb\request\request_interface
+{
+ protected $data;
+
+ public function __construct($get = array(), $post = array(), $cookie = array(), $server = array(), $request = false, $files = array())
+ {
+ $this->data[\phpbb\request\request_interface::GET] = $get;
+ $this->data[\phpbb\request\request_interface::POST] = $post;
+ $this->data[\phpbb\request\request_interface::COOKIE] = $cookie;
+ $this->data[\phpbb\request\request_interface::REQUEST] = ($request === false) ? $post + $get : $request;
+ $this->data[\phpbb\request\request_interface::SERVER] = $server;
+ $this->data[\phpbb\request\request_interface::FILES] = $files;
+ }
+
+ public function overwrite($var_name, $value, $super_global = \phpbb\request\request_interface::REQUEST)
+ {
+ $this->data[$super_global][$var_name] = $value;
+ }
+
+ public function variable($var_name, $default, $multibyte = false, $super_global = \phpbb\request\request_interface::REQUEST)
+ {
+ return isset($this->data[$super_global][$var_name]) ? $this->data[$super_global][$var_name] : $default;
+ }
+
+ public function server($var_name, $default = '')
+ {
+ $super_global = \phpbb\request\request_interface::SERVER;
+ return isset($this->data[$super_global][$var_name]) ? $this->data[$super_global][$var_name] : $default;
+ }
+
+ public function header($header_name, $default = '')
+ {
+ $var_name = 'HTTP_' . str_replace('-', '_', strtoupper($header_name));
+ return $this->server($var_name, $default);
+ }
+
+ public function file($form_name)
+ {
+ $super_global = \phpbb\request\request_interface::FILES;
+ return isset($this->data[$super_global][$form_name]) ? $this->data[$super_global][$form_name] : array();
+ }
+
+ public function is_set_post($name)
+ {
+ return $this->is_set($name, \phpbb\request\request_interface::POST);
+ }
+
+ public function is_set($var, $super_global = \phpbb\request\request_interface::REQUEST)
+ {
+ return isset($this->data[$super_global][$var]);
+ }
+
+ public function is_ajax()
+ {
+ return false;
+ }
+
+ public function is_secure()
+ {
+ return false;
+ }
+
+ public function variable_names($super_global = \phpbb\request\request_interface::REQUEST)
+ {
+ return array_keys($this->data[$super_global]);
+ }
+
+ public function get_super_global($super_global = \phpbb\request\request_interface::REQUEST)
+ {
+ return $this->data[$super_global];
+ }
+
+ /* custom methods */
+
+ public function set_header($header_name, $value)
+ {
+ $var_name = 'HTTP_' . str_replace('-', '_', strtoupper($header_name));
+ $this->data[\phpbb\request\request_interface::SERVER][$var_name] = $value;
+ }
+
+ public function merge($super_global = \phpbb\request\request_interface::REQUEST, $values)
+ {
+ $this->data[$super_global] = array_merge($this->data[$super_global], $values);
+ }
+}
diff --git a/tests/mock/search.php b/tests/mock/search.php
new file mode 100644
index 0000000000..6739719216
--- /dev/null
+++ b/tests/mock/search.php
@@ -0,0 +1,23 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+/**
+*/
+class phpbb_mock_search
+{
+
+ public function __construct($error, $phpbb_root_path, $phpEx, $auth, $config, $db, $user)
+ {
+ }
+
+ public function index_remove($post_ids, $poster_ids, $forum_ids)
+ {
+ }
+}
+
diff --git a/tests/mock/session_testable.php b/tests/mock/session_testable.php
index 70a58fb6cc..d81ae3163e 100644
--- a/tests/mock/session_testable.php
+++ b/tests/mock/session_testable.php
@@ -8,7 +8,6 @@
*/
require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php';
-require_once dirname(__FILE__) . '/../../phpBB/includes/session.php';
/**
* Extends the session class to overwrite the setting of cookies.
@@ -17,7 +16,7 @@ require_once dirname(__FILE__) . '/../../phpBB/includes/session.php';
* test it without warnings about sent headers. This class only stores cookie
* data for later verification.
*/
-class phpbb_mock_session_testable extends session
+class phpbb_mock_session_testable extends \phpbb\session
{
private $_cookies = array();
@@ -59,5 +58,9 @@ class phpbb_mock_session_testable extends session
}
}
}
+
+ public function setup()
+ {
+ }
}
diff --git a/tests/mock/sql_insert_buffer.php b/tests/mock/sql_insert_buffer.php
new file mode 100644
index 0000000000..aa7c54dddd
--- /dev/null
+++ b/tests/mock/sql_insert_buffer.php
@@ -0,0 +1,21 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+class phpbb_mock_sql_insert_buffer extends \phpbb\db\sql_insert_buffer
+{
+ public function flush()
+ {
+ return (sizeof($this->buffer)) ? true : false;
+ }
+
+ public function get_buffer()
+ {
+ return $this->buffer;
+ }
+}
diff --git a/tests/network/inet_ntop_pton_test.php b/tests/network/inet_ntop_pton_test.php
new file mode 100644
index 0000000000..a59c2103bd
--- /dev/null
+++ b/tests/network/inet_ntop_pton_test.php
@@ -0,0 +1,54 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2010 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php';
+
+class phpbb_network_inet_ntop_pton_test extends phpbb_test_case
+{
+ public function data_provider()
+ {
+ return array(
+ array('127.0.0.1', '7f000001'),
+ array('192.232.131.223', 'c0e883df'),
+ array('13.1.68.3', '0d014403'),
+ array('129.144.52.38', '81903426'),
+
+ array('2001:280:0:10::5', '20010280000000100000000000000005'),
+ array('fe80::200:4cff:fefe:172f', 'fe8000000000000002004cfffefe172f'),
+
+ array('::', '00000000000000000000000000000000'),
+ array('::1', '00000000000000000000000000000001'),
+ array('1::', '00010000000000000000000000000000'),
+
+ array('1:1:0:0:1::', '00010001000000000001000000000000'),
+
+ array('0:2:3:4:5:6:7:8', '00000002000300040005000600070008'),
+ array('1:2:0:4:5:6:7:8', '00010002000000040005000600070008'),
+ array('1:2:3:4:5:6:7:0', '00010002000300040005000600070000'),
+
+ array('2001:0:0:1::1', '20010000000000010000000000000001'),
+ );
+ }
+
+ /**
+ * @dataProvider data_provider
+ */
+ public function test_inet_ntop($address, $hex)
+ {
+ $this->assertEquals($address, phpbb_inet_ntop(pack('H*', $hex)));
+ }
+
+ /**
+ * @dataProvider data_provider
+ */
+ public function test_inet_pton($address, $hex)
+ {
+ $this->assertEquals($hex, bin2hex(phpbb_inet_pton($address)));
+ }
+}
diff --git a/tests/network/ip_normalise_test.php b/tests/network/ip_normalise_test.php
new file mode 100644
index 0000000000..28059f376a
--- /dev/null
+++ b/tests/network/ip_normalise_test.php
@@ -0,0 +1,64 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2010 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php';
+
+class phpbb_network_ip_normalise_test extends phpbb_test_case
+{
+ public function data_provider()
+ {
+ return array(
+ // From: A Recommendation for IPv6 Address Text Representation
+ // http://tools.ietf.org/html/draft-ietf-6man-text-addr-representation-07
+
+ // Section 4: A Recommendation for IPv6 Text Representation
+ // Section 4.1: Handling Leading Zeros in a 16 Bit Field
+ array('2001:0db8::0001', '2001:db8::1'),
+
+ // Section 4.2: "::" Usage
+ // Section 4.2.1: Shorten As Much As Possible
+ array('2001:db8::0:1', '2001:db8::1'),
+
+ // Section 4.2.2: Handling One 16 Bit 0 Field
+ array('2001:db8::1:1:1:1:1', '2001:db8:0:1:1:1:1:1'),
+
+ // Section 4.2.3: Choice in Placement of "::"
+ array('2001:db8:0:0:1:0:0:1', '2001:db8::1:0:0:1'),
+
+ // Section 4.3: Lower Case
+ array('2001:DB8::1', '2001:db8::1'),
+
+ // Section 5: Text Representation of Special Addresses
+ // We want to show IPv4-mapped addresses as plain IPv4 addresses, though.
+ array('::ffff:192.168.0.1', '192.168.0.1'),
+ array('0000::0000:ffff:c000:0280', '192.0.2.128'),
+
+ // IPv6 addresses with the last 32-bit written in dotted-quad notation
+ // should be converted to hex-only IPv6 addresses.
+ array('2001:db8::192.0.2.128', '2001:db8::c000:280'),
+
+ // Any string not passing the IPv4 or IPv6 regular expression
+ // is supposed to result in false being returned.
+ // Valid and invalid IP addresses are tested in
+ // tests/regex/ipv4.php and tests/regex/ipv6.php.
+ array('', false),
+ array('192.168.1.256', false),
+ array('::ffff:192.168.255.256', false),
+ array('::1111:2222:3333:4444:5555:6666::', false),
+ );
+ }
+
+ /**
+ * @dataProvider data_provider
+ */
+ public function test_ip_normalise($ip_address, $expected)
+ {
+ $this->assertEquals($expected, phpbb_ip_normalise($ip_address));
+ }
+}
diff --git a/tests/notification/base.php b/tests/notification/base.php
new file mode 100644
index 0000000000..f6333866c3
--- /dev/null
+++ b/tests/notification/base.php
@@ -0,0 +1,132 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+require_once dirname(__FILE__) . '/manager_helper.php';
+
+abstract class phpbb_tests_notification_base extends phpbb_database_test_case
+{
+ protected $notifications, $db, $container, $user, $config, $auth, $cache;
+
+ protected function get_notification_types()
+ {
+ return array(
+ 'test',
+ 'approve_post',
+ 'approve_topic',
+ 'bookmark',
+ 'disapprove_post',
+ 'disapprove_topic',
+ 'pm',
+ 'post',
+ 'post_in_queue',
+ 'quote',
+ 'report_pm',
+ 'report_pm_closed',
+ 'report_post',
+ 'report_post_closed',
+ 'topic',
+ 'topic_in_queue',
+ );
+ }
+
+ protected function setUp()
+ {
+ parent::setUp();
+
+ global $phpbb_root_path, $phpEx;
+
+ include_once(__DIR__ . '/ext/test/notification/type/test.' . $phpEx);
+
+ global $db, $config, $user, $auth, $cache, $phpbb_container;
+
+ $db = $this->db = $this->new_dbal();
+ $config = $this->config = new \phpbb\config\config(array(
+ 'allow_privmsg' => true,
+ 'allow_bookmarks' => true,
+ 'allow_topic_notify' => true,
+ 'allow_forum_notify' => true,
+ ));
+ $user = $this->user = new \phpbb\user();
+ $this->user_loader = new \phpbb\user_loader($this->db, $phpbb_root_path, $phpEx, 'phpbb_users');
+ $auth = $this->auth = new phpbb_mock_notifications_auth();
+ $cache = $this->cache = new \phpbb\cache\service(
+ new \phpbb\cache\driver\null(),
+ $this->config,
+ $this->db,
+ $phpbb_root_path,
+ $phpEx
+ );
+
+ $phpbb_container = $this->container = new phpbb_mock_container_builder();
+
+ $this->notifications = new phpbb_notification_manager_helper(
+ array(),
+ array(),
+ $this->container,
+ $this->user_loader,
+ $this->config,
+ $this->db,
+ $this->cache,
+ $this->user,
+ $phpbb_root_path,
+ $phpEx,
+ 'phpbb_notification_types',
+ 'phpbb_notifications',
+ 'phpbb_user_notifications'
+ );
+
+ $phpbb_container->set('notification_manager', $this->notifications);
+
+ $this->notifications->setDependencies($this->auth, $this->config);
+
+ $types = array();
+ foreach ($this->get_notification_types() as $type)
+ {
+ $class = $this->build_type('phpbb\notification\type\\' . $type);
+
+ $types[$type] = $class;
+ $this->container->set('notification.type.' . $type, $class);
+ }
+
+ $this->notifications->set_var('notification_types', $types);
+
+ $this->db->sql_query('DELETE FROM phpbb_notification_types');
+ $this->db->sql_query('DELETE FROM phpbb_notifications');
+ $this->db->sql_query('DELETE FROM phpbb_user_notifications');
+ }
+
+ protected function build_type($type)
+ {
+ global $phpbb_root_path, $phpEx;
+
+ return new $type($this->user_loader, $this->db, $this->cache->get_driver(), $this->user, $this->auth, $this->config, $phpbb_root_path, $phpEx, 'phpbb_notification_types', 'phpbb_notifications', 'phpbb_user_notifications');
+ }
+
+ protected function assert_notifications($expected, $options = array())
+ {
+ $notifications = $this->notifications->load_notifications(array_merge(array(
+ 'count_unread' => true,
+ 'order_by' => 'notification_time',
+ 'order_dir' => 'ASC',
+ ), $options));
+
+ $this->assertEquals(sizeof($expected), $notifications['unread_count']);
+
+ $i = 0;
+ foreach ($notifications['notifications'] as $notification)
+ {
+ foreach ($expected[$i] as $key => $value)
+ {
+ $this->assertEquals($value, $notification->$key, $i . ' ' . $key);
+ }
+
+ $i++;
+ }
+ }
+}
diff --git a/tests/notification/convert_test.php b/tests/notification/convert_test.php
new file mode 100644
index 0000000000..c692f40b57
--- /dev/null
+++ b/tests/notification/convert_test.php
@@ -0,0 +1,108 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+require_once dirname(__FILE__) . '/../mock/sql_insert_buffer.php';
+
+class phpbb_notification_convert_test extends phpbb_database_test_case
+{
+ protected $notifications, $db, $container, $user, $config, $auth, $cache;
+
+ public function getDataSet()
+ {
+ return $this->createXMLDataSet(dirname(__FILE__) . '/fixtures/convert.xml');
+ }
+
+ protected function setUp()
+ {
+ parent::setUp();
+
+ global $phpbb_root_path, $phpEx;
+
+ $this->db = $this->new_dbal();
+
+ $this->migration = new \phpbb\db\migration\data\v310\notification_options_reconvert(
+ new \phpbb\config\config(array()),
+ $this->db,
+ new \phpbb\db\tools($this->db),
+ $phpbb_root_path,
+ $phpEx,
+ 'phpbb_'
+ );
+ }
+
+ public function test_convert()
+ {
+ $buffer = new phpbb_mock_sql_insert_buffer($this->db, 'phpbb_user_notifications');
+ $this->migration->perform_conversion($buffer, 0);
+
+ $expected = array_merge(
+ $this->create_expected('post', 1, 'email'),
+ $this->create_expected('topic', 1, 'email'),
+
+ $this->create_expected('post', 2, 'email'),
+ $this->create_expected('topic', 2, 'email'),
+ $this->create_expected('pm', 2, 'email'),
+
+ $this->create_expected('post', 3, 'jabber'),
+ $this->create_expected('topic', 3, 'jabber'),
+
+ $this->create_expected('post', 4, 'jabber'),
+ $this->create_expected('topic', 4, 'jabber'),
+ $this->create_expected('pm', 4, 'jabber'),
+
+ $this->create_expected('post', 5, 'both'),
+ $this->create_expected('topic', 5, 'both'),
+
+ $this->create_expected('post', 6, 'both'),
+ $this->create_expected('topic', 6, 'both'),
+ $this->create_expected('pm', 6, 'both')
+ );
+
+ $this->assertEquals($expected, $buffer->get_buffer());
+ }
+
+ protected function create_expected($type, $user_id, $method = '')
+ {
+ $return = array();
+
+ if ($method !== '')
+ {
+ $return[] = array(
+ 'item_type' => $type,
+ 'item_id' => 0,
+ 'user_id' => $user_id,
+ 'method' => '',
+ 'notify' => 1,
+ );
+ }
+
+ if ($method === 'email' || $method === 'both')
+ {
+ $return[] = array(
+ 'item_type' => $type,
+ 'item_id' => 0,
+ 'user_id' => $user_id,
+ 'method' => 'email',
+ 'notify' => 1,
+ );
+ }
+
+ if ($method === 'jabber' || $method === 'both')
+ {
+ $return[] = array(
+ 'item_type' => $type,
+ 'item_id' => 0,
+ 'user_id' => $user_id,
+ 'method' => 'jabber',
+ 'notify' => 1,
+ );
+ }
+
+ return $return;
+ }
+}
diff --git a/tests/notification/ext/test/notification/type/test.php b/tests/notification/ext/test/notification/type/test.php
new file mode 100644
index 0000000000..cdb921ca3b
--- /dev/null
+++ b/tests/notification/ext/test/notification/type/test.php
@@ -0,0 +1,87 @@
+<?php
+/**
+*
+* @package notifications
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\notification\type;
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+class test extends \phpbb\notification\type\base
+{
+ public function get_type()
+ {
+ return 'test';
+ }
+
+ public static function get_item_id($post)
+ {
+ return (int) $post['post_id'];
+ }
+
+ public static function get_item_parent_id($post)
+ {
+ return (int) $post['topic_id'];
+ }
+
+ public function find_users_for_notification($post, $options = array())
+ {
+ return $this->check_user_notification_options(array(0), $options);
+ }
+
+ public function create_insert_array($post, $pre_create_data = array())
+ {
+ $this->notification_time = $post['post_time'];
+
+ return parent::create_insert_array($post, $pre_create_data);
+ }
+
+ public function create_update_array($type_data)
+ {
+ $data = $this->create_insert_array($type_data);
+
+ // Unset data unique to each row
+ unset(
+ $data['notification_id'],
+ $data['notification_read'],
+ $data['user_id']
+ );
+
+ return $data;
+ }
+
+ public function get_title()
+ {
+ return 'test title';
+ }
+
+ public function users_to_query()
+ {
+ return array();
+ }
+
+ public function get_url()
+ {
+ return '';
+ }
+
+ public function get_email_template()
+ {
+ return false;
+ }
+
+ public function get_email_template_variables()
+ {
+ return array();
+ }
+}
diff --git a/tests/notification/fixtures/convert.xml b/tests/notification/fixtures/convert.xml
new file mode 100644
index 0000000000..c9d8fafa97
--- /dev/null
+++ b/tests/notification/fixtures/convert.xml
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<dataset>
+ <table name="phpbb_users">
+ <column>user_id</column>
+ <column>username</column>
+ <column>username_clean</column>
+ <column>user_notify_type</column>
+ <column>user_notify_pm</column>
+ <column>user_permissions</column>
+ <column>user_sig</column>
+ <row>
+ <value>1</value>
+ <value>1</value>
+ <value>1</value>
+ <value>0</value>
+ <value>0</value>
+ <value></value>
+ <value></value>
+ </row>
+ <row>
+ <value>2</value>
+ <value>2</value>
+ <value>2</value>
+ <value>0</value>
+ <value>1</value>
+ <value></value>
+ <value></value>
+ </row>
+ <row>
+ <value>3</value>
+ <value>3</value>
+ <value>3</value>
+ <value>1</value>
+ <value>0</value>
+ <value></value>
+ <value></value>
+ </row>
+ <row>
+ <value>4</value>
+ <value>4</value>
+ <value>4</value>
+ <value>1</value>
+ <value>1</value>
+ <value></value>
+ <value></value>
+ </row>
+ <row>
+ <value>5</value>
+ <value>5</value>
+ <value>5</value>
+ <value>2</value>
+ <value>0</value>
+ <value></value>
+ <value></value>
+ </row>
+ <row>
+ <value>6</value>
+ <value>6</value>
+ <value>6</value>
+ <value>2</value>
+ <value>1</value>
+ <value></value>
+ <value></value>
+ </row>
+ </table>
+</dataset>
diff --git a/tests/notification/fixtures/group_request.xml b/tests/notification/fixtures/group_request.xml
new file mode 100644
index 0000000000..fbaee0a326
--- /dev/null
+++ b/tests/notification/fixtures/group_request.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<dataset>
+ <table name="phpbb_users">
+ <column>user_id</column>
+ <column>username</column>
+ <column>username_clean</column>
+ <column>user_permissions</column>
+ <column>user_sig</column>
+ <row>
+ <value>2</value>
+ <value>2</value>
+ <value>2</value>
+ <value></value>
+ <value></value>
+ </row>
+ <row>
+ <value>3</value>
+ <value>3</value>
+ <value>3</value>
+ <value></value>
+ <value></value>
+ </row>
+ </table>
+</dataset>
diff --git a/tests/notification/fixtures/notification.xml b/tests/notification/fixtures/notification.xml
new file mode 100644
index 0000000000..c7b2d03ff1
--- /dev/null
+++ b/tests/notification/fixtures/notification.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<dataset>
+ <table name="phpbb_bookmarks">
+ </table>
+ <table name="phpbb_notifications">
+ </table>
+ <table name="phpbb_notification_types">
+ </table>
+ <table name="phpbb_topics_watch">
+ </table>
+ <table name="phpbb_user_notifications">
+ </table>
+</dataset>
diff --git a/tests/notification/fixtures/submit_post_bookmark.xml b/tests/notification/fixtures/submit_post_bookmark.xml
new file mode 100644
index 0000000000..525d0484e0
--- /dev/null
+++ b/tests/notification/fixtures/submit_post_bookmark.xml
@@ -0,0 +1,161 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<dataset>
+ <table name="phpbb_bookmarks">
+ <column>topic_id</column>
+ <column>user_id</column>
+ <row>
+ <value>1</value>
+ <value>2</value>
+ </row>
+ <row>
+ <value>1</value>
+ <value>3</value>
+ </row>
+ <row>
+ <value>1</value>
+ <value>4</value>
+ </row>
+ <row>
+ <value>1</value>
+ <value>5</value>
+ </row>
+ <row>
+ <value>1</value>
+ <value>6</value>
+ </row>
+ <row>
+ <value>1</value>
+ <value>7</value>
+ </row>
+ </table>
+ <table name="phpbb_notifications">
+ <column>notification_type_id</column>
+ <column>user_id</column>
+ <column>item_id</column>
+ <column>item_parent_id</column>
+ <column>notification_read</column>
+ <column>notification_data</column>
+ <row>
+ <value>1</value>
+ <value>5</value>
+ <value>1</value>
+ <value>1</value>
+ <value>0</value>
+ <value></value>
+ </row>
+ </table>
+ <table name="phpbb_notification_types">
+ <column>notification_type_id</column>
+ <column>notification_type_name</column>
+ <column>notification_type_enabled</column>
+ <row>
+ <value>1</value>
+ <value>bookmark</value>
+ <value>1</value>
+ </row>
+ </table>
+ <table name="phpbb_posts">
+ <column>post_id</column>
+ <column>topic_id</column>
+ <column>forum_id</column>
+ <column>post_text</column>
+ <row>
+ <value>1</value>
+ <value>1</value>
+ <value>1</value>
+ <value></value>
+ </row>
+ </table>
+ <table name="phpbb_topics">
+ <column>topic_id</column>
+ <column>forum_id</column>
+ <row>
+ <value>1</value>
+ <value>1</value>
+ </row>
+ </table>
+ <table name="phpbb_users">
+ <column>user_id</column>
+ <column>username_clean</column>
+ <column>user_permissions</column>
+ <column>user_sig</column>
+ <row>
+ <value>2</value>
+ <value>poster</value>
+ <value></value>
+ <value></value>
+ </row>
+ <row>
+ <value>3</value>
+ <value>test</value>
+ <value></value>
+ <value></value>
+ </row>
+ <row>
+ <value>4</value>
+ <value>unauthorized</value>
+ <value></value>
+ <value></value>
+ </row>
+ <row>
+ <value>5</value>
+ <value>notified</value>
+ <value></value>
+ <value></value>
+ </row>
+ <row>
+ <value>6</value>
+ <value>disabled</value>
+ <value></value>
+ <value></value>
+ </row>
+ <row>
+ <value>7</value>
+ <value>default</value>
+ <value></value>
+ <value></value>
+ </row>
+ </table>
+ <table name="phpbb_user_notifications">
+ <column>item_type</column>
+ <column>item_id</column>
+ <column>user_id</column>
+ <column>method</column>
+ <column>notify</column>
+ <row>
+ <value>bookmark</value>
+ <value>0</value>
+ <value>2</value>
+ <value></value>
+ <value>1</value>
+ </row>
+ <row>
+ <value>bookmark</value>
+ <value>0</value>
+ <value>3</value>
+ <value></value>
+ <value>1</value>
+ </row>
+ <row>
+ <value>bookmark</value>
+ <value>0</value>
+ <value>4</value>
+ <value></value>
+ <value>1</value>
+ </row>
+ <row>
+ <value>bookmark</value>
+ <value>0</value>
+ <value>5</value>
+ <value></value>
+ <value>1</value>
+ </row>
+ <row>
+ <value>bookmark</value>
+ <value>0</value>
+ <value>6</value>
+ <value></value>
+ <value>0</value>
+ </row>
+ </table>
+</dataset>
diff --git a/tests/notification/fixtures/submit_post_post.xml b/tests/notification/fixtures/submit_post_post.xml
new file mode 100644
index 0000000000..a38ca77ea0
--- /dev/null
+++ b/tests/notification/fixtures/submit_post_post.xml
@@ -0,0 +1,205 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<dataset>
+ <table name="phpbb_forums_watch">
+ <column>forum_id</column>
+ <column>user_id</column>
+ <column>notify_status</column>
+ <row>
+ <value>1</value>
+ <value>6</value>
+ <value>0</value>
+ </row>
+ <row>
+ <value>1</value>
+ <value>7</value>
+ <value>0</value>
+ </row>
+ <row>
+ <value>1</value>
+ <value>8</value>
+ <value>0</value>
+ </row>
+ </table>
+ <table name="phpbb_notifications">
+ <column>notification_type_id</column>
+ <column>user_id</column>
+ <column>item_id</column>
+ <column>item_parent_id</column>
+ <column>notification_read</column>
+ <column>notification_data</column>
+ <row>
+ <value>1</value>
+ <value>5</value>
+ <value>1</value>
+ <value>1</value>
+ <value>0</value>
+ <value></value>
+ </row>
+ <row>
+ <value>1</value>
+ <value>8</value>
+ <value>1</value>
+ <value>1</value>
+ <value>0</value>
+ <value></value>
+ </row>
+ </table>
+ <table name="phpbb_notification_types">
+ <column>notification_type_id</column>
+ <column>notification_type_name</column>
+ <column>notification_type_enabled</column>
+ <row>
+ <value>1</value>
+ <value>post</value>
+ <value>1</value>
+ </row>
+ </table>
+ <table name="phpbb_posts">
+ <column>post_id</column>
+ <column>topic_id</column>
+ <column>forum_id</column>
+ <column>post_text</column>
+ <row>
+ <value>1</value>
+ <value>1</value>
+ <value>1</value>
+ <value></value>
+ </row>
+ </table>
+ <table name="phpbb_topics">
+ <column>topic_id</column>
+ <column>forum_id</column>
+ <row>
+ <value>1</value>
+ <value>1</value>
+ </row>
+ </table>
+ <table name="phpbb_topics_watch">
+ <column>topic_id</column>
+ <column>user_id</column>
+ <column>notify_status</column>
+ <row>
+ <value>1</value>
+ <value>2</value>
+ <value>0</value>
+ </row>
+ <row>
+ <value>1</value>
+ <value>3</value>
+ <value>0</value>
+ </row>
+ <row>
+ <value>1</value>
+ <value>4</value>
+ <value>0</value>
+ </row>
+ <row>
+ <value>1</value>
+ <value>5</value>
+ <value>0</value>
+ </row>
+ <row>
+ <value>1</value>
+ <value>6</value>
+ <value>0</value>
+ </row>
+ </table>
+ <table name="phpbb_users">
+ <column>user_id</column>
+ <column>username_clean</column>
+ <column>user_permissions</column>
+ <column>user_sig</column>
+ <row>
+ <value>2</value>
+ <value>poster</value>
+ <value></value>
+ <value></value>
+ </row>
+ <row>
+ <value>3</value>
+ <value>test</value>
+ <value></value>
+ <value></value>
+ </row>
+ <row>
+ <value>4</value>
+ <value>unauthorized</value>
+ <value></value>
+ <value></value>
+ </row>
+ <row>
+ <value>5</value>
+ <value>notified</value>
+ <value></value>
+ <value></value>
+ </row>
+ <row>
+ <value>6</value>
+ <value>disabled</value>
+ <value></value>
+ <value></value>
+ </row>
+ <row>
+ <value>7</value>
+ <value>default</value>
+ <value></value>
+ <value></value>
+ </row>
+ </table>
+ <table name="phpbb_user_notifications">
+ <column>item_type</column>
+ <column>item_id</column>
+ <column>user_id</column>
+ <column>method</column>
+ <column>notify</column>
+ <row>
+ <value>post</value>
+ <value>0</value>
+ <value>2</value>
+ <value></value>
+ <value>1</value>
+ </row>
+ <row>
+ <value>post</value>
+ <value>0</value>
+ <value>3</value>
+ <value></value>
+ <value>1</value>
+ </row>
+ <row>
+ <value>post</value>
+ <value>0</value>
+ <value>4</value>
+ <value></value>
+ <value>1</value>
+ </row>
+ <row>
+ <value>post</value>
+ <value>0</value>
+ <value>5</value>
+ <value></value>
+ <value>1</value>
+ </row>
+ <row>
+ <value>post</value>
+ <value>0</value>
+ <value>6</value>
+ <value></value>
+ <value>1</value>
+ </row>
+ <row>
+ <value>post</value>
+ <value>0</value>
+ <value>7</value>
+ <value></value>
+ <value>1</value>
+ </row>
+ <row>
+ <value>post</value>
+ <value>0</value>
+ <value>8</value>
+ <value></value>
+ <value>1</value>
+ </row>
+ </table>
+</dataset>
diff --git a/tests/notification/fixtures/submit_post_post_in_queue.xml b/tests/notification/fixtures/submit_post_post_in_queue.xml
new file mode 100644
index 0000000000..28cb69be36
--- /dev/null
+++ b/tests/notification/fixtures/submit_post_post_in_queue.xml
@@ -0,0 +1,159 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<dataset>
+ <table name="phpbb_notifications">
+ <column>notification_type_id</column>
+ <column>user_id</column>
+ <column>item_id</column>
+ <column>item_parent_id</column>
+ <column>notification_read</column>
+ <column>notification_data</column>
+ <row>
+ <value>1</value>
+ <value>6</value>
+ <value>1</value>
+ <value>1</value>
+ <value>0</value>
+ <value></value>
+ </row>
+ </table>
+ <table name="phpbb_notification_types">
+ <column>notification_type_id</column>
+ <column>notification_type_name</column>
+ <column>notification_type_enabled</column>
+ <row>
+ <value>1</value>
+ <value>post_in_queue</value>
+ <value>1</value>
+ </row>
+ </table>
+ <table name="phpbb_posts">
+ <column>post_id</column>
+ <column>topic_id</column>
+ <column>forum_id</column>
+ <column>post_text</column>
+ <row>
+ <value>1</value>
+ <value>1</value>
+ <value>1</value>
+ <value></value>
+ </row>
+ </table>
+ <table name="phpbb_topics">
+ <column>topic_id</column>
+ <column>forum_id</column>
+ <row>
+ <value>1</value>
+ <value>1</value>
+ </row>
+ </table>
+ <table name="phpbb_users">
+ <column>user_id</column>
+ <column>username_clean</column>
+ <column>user_permissions</column>
+ <column>user_sig</column>
+ <row>
+ <value>2</value>
+ <value>poster</value>
+ <value></value>
+ <value></value>
+ </row>
+ <row>
+ <value>3</value>
+ <value>test</value>
+ <value></value>
+ <value></value>
+ </row>
+ <row>
+ <value>4</value>
+ <value>unauthorized-mod</value>
+ <value></value>
+ <value></value>
+ </row>
+ <row>
+ <value>5</value>
+ <value>unauthorized-read</value>
+ <value></value>
+ <value></value>
+ </row>
+ <row>
+ <value>6</value>
+ <value>notified</value>
+ <value></value>
+ <value></value>
+ </row>
+ <row>
+ <value>7</value>
+ <value>disabled</value>
+ <value></value>
+ <value></value>
+ </row>
+ <row>
+ <value>8</value>
+ <value>default</value>
+ <value></value>
+ <value></value>
+ </row>
+ <row>
+ <value>9</value>
+ <value>test glboal-permissions</value>
+ <value></value>
+ <value></value>
+ </row>
+ </table>
+ <table name="phpbb_user_notifications">
+ <column>item_type</column>
+ <column>item_id</column>
+ <column>user_id</column>
+ <column>method</column>
+ <column>notify</column>
+ <row>
+ <value>needs_approval</value>
+ <value>0</value>
+ <value>2</value>
+ <value></value>
+ <value>1</value>
+ </row>
+ <row>
+ <value>needs_approval</value>
+ <value>0</value>
+ <value>3</value>
+ <value></value>
+ <value>1</value>
+ </row>
+ <row>
+ <value>needs_approval</value>
+ <value>0</value>
+ <value>4</value>
+ <value></value>
+ <value>1</value>
+ </row>
+ <row>
+ <value>needs_approval</value>
+ <value>0</value>
+ <value>5</value>
+ <value></value>
+ <value>1</value>
+ </row>
+ <row>
+ <value>needs_approval</value>
+ <value>0</value>
+ <value>6</value>
+ <value></value>
+ <value>1</value>
+ </row>
+ <row>
+ <value>needs_approval</value>
+ <value>0</value>
+ <value>7</value>
+ <value></value>
+ <value>0</value>
+ </row>
+ <row>
+ <value>needs_approval</value>
+ <value>0</value>
+ <value>9</value>
+ <value></value>
+ <value>1</value>
+ </row>
+ </table>
+</dataset>
diff --git a/tests/notification/fixtures/submit_post_quote.xml b/tests/notification/fixtures/submit_post_quote.xml
new file mode 100644
index 0000000000..2b11992e54
--- /dev/null
+++ b/tests/notification/fixtures/submit_post_quote.xml
@@ -0,0 +1,133 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<dataset>
+ <table name="phpbb_notifications">
+ <column>notification_type_id</column>
+ <column>user_id</column>
+ <column>item_id</column>
+ <column>item_parent_id</column>
+ <column>notification_read</column>
+ <column>notification_data</column>
+ <row>
+ <value>1</value>
+ <value>5</value>
+ <value>1</value>
+ <value>1</value>
+ <value>0</value>
+ <value></value>
+ </row>
+ </table>
+ <table name="phpbb_notification_types">
+ <column>notification_type_id</column>
+ <column>notification_type_name</column>
+ <column>notification_type_enabled</column>
+ <row>
+ <value>1</value>
+ <value>quote</value>
+ <value>1</value>
+ </row>
+ </table>
+ <table name="phpbb_posts">
+ <column>post_id</column>
+ <column>topic_id</column>
+ <column>forum_id</column>
+ <column>post_text</column>
+ <row>
+ <value>1</value>
+ <value>1</value>
+ <value>1</value>
+ <value></value>
+ </row>
+ </table>
+ <table name="phpbb_topics">
+ <column>topic_id</column>
+ <column>forum_id</column>
+ <row>
+ <value>1</value>
+ <value>1</value>
+ </row>
+ </table>
+ <table name="phpbb_users">
+ <column>user_id</column>
+ <column>username_clean</column>
+ <column>user_permissions</column>
+ <column>user_sig</column>
+ <row>
+ <value>2</value>
+ <value>poster</value>
+ <value></value>
+ <value></value>
+ </row>
+ <row>
+ <value>3</value>
+ <value>test</value>
+ <value></value>
+ <value></value>
+ </row>
+ <row>
+ <value>4</value>
+ <value>unauthorized</value>
+ <value></value>
+ <value></value>
+ </row>
+ <row>
+ <value>5</value>
+ <value>notified</value>
+ <value></value>
+ <value></value>
+ </row>
+ <row>
+ <value>6</value>
+ <value>disabled</value>
+ <value></value>
+ <value></value>
+ </row>
+ <row>
+ <value>7</value>
+ <value>default</value>
+ <value></value>
+ <value></value>
+ </row>
+ </table>
+ <table name="phpbb_user_notifications">
+ <column>item_type</column>
+ <column>item_id</column>
+ <column>user_id</column>
+ <column>method</column>
+ <column>notify</column>
+ <row>
+ <value>quote</value>
+ <value>0</value>
+ <value>2</value>
+ <value></value>
+ <value>1</value>
+ </row>
+ <row>
+ <value>quote</value>
+ <value>0</value>
+ <value>3</value>
+ <value></value>
+ <value>1</value>
+ </row>
+ <row>
+ <value>quote</value>
+ <value>0</value>
+ <value>4</value>
+ <value></value>
+ <value>1</value>
+ </row>
+ <row>
+ <value>quote</value>
+ <value>0</value>
+ <value>5</value>
+ <value></value>
+ <value>1</value>
+ </row>
+ <row>
+ <value>quote</value>
+ <value>0</value>
+ <value>6</value>
+ <value></value>
+ <value>0</value>
+ </row>
+ </table>
+</dataset>
diff --git a/tests/notification/fixtures/user_list_trim.xml b/tests/notification/fixtures/user_list_trim.xml
new file mode 100644
index 0000000000..4f708714da
--- /dev/null
+++ b/tests/notification/fixtures/user_list_trim.xml
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<dataset>
+ <table name="phpbb_users">
+ <column>user_id</column>
+ <column>username</column>
+ <column>username_clean</column>
+ <column>user_colour</column>
+ <column>user_permissions</column>
+ <column>user_sig</column>
+ <row>
+ <value>2</value>
+ <value>A</value>
+ <value>a</value>
+ <value></value>
+ <value></value>
+ <value></value>
+ </row>
+ <row>
+ <value>3</value>
+ <value>B</value>
+ <value>b</value>
+ <value></value>
+ <value></value>
+ <value></value>
+ </row>
+ <row>
+ <value>4</value>
+ <value>C</value>
+ <value>c</value>
+ <value></value>
+ <value></value>
+ <value></value>
+ </row>
+ <row>
+ <value>5</value>
+ <value>D</value>
+ <value>d</value>
+ <value></value>
+ <value></value>
+ <value></value>
+ </row>
+ <row>
+ <value>6</value>
+ <value>E</value>
+ <value>e</value>
+ <value></value>
+ <value></value>
+ <value></value>
+ </row>
+ </table>
+</dataset>
diff --git a/tests/notification/group_request_test.php b/tests/notification/group_request_test.php
new file mode 100644
index 0000000000..b812fff8f8
--- /dev/null
+++ b/tests/notification/group_request_test.php
@@ -0,0 +1,109 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+require_once dirname(__FILE__) . '/base.php';
+
+class phpbb_notification_group_request_test extends phpbb_tests_notification_base
+{
+ public function getDataSet()
+ {
+ return $this->createXMLDataSet(dirname(__FILE__) . '/fixtures/group_request.xml');
+ }
+
+ protected function get_notification_types()
+ {
+ return array_merge(
+ parent::get_notification_types(),
+ array(
+ 'group_request',
+ 'group_request_approved',
+ )
+ );
+ }
+
+ public function test_notifications()
+ {
+ global $phpbb_root_path, $phpEx, $phpbb_dispatcher, $phpbb_log;
+
+ include_once($phpbb_root_path . 'includes/utf/utf_tools.' . $phpEx);
+ include_once($phpbb_root_path . 'includes/functions_user.' . $phpEx);
+ include_once($phpbb_root_path . 'includes/functions_content.' . $phpEx);
+
+ set_config(false, false, false, $this->config);
+
+ $this->container->set('groupposition.legend', new \phpbb\groupposition\legend(
+ $this->db,
+ $this->user
+ ));
+ $this->container->set('groupposition.teampage', new \phpbb\groupposition\teampage(
+ $this->db,
+ $this->user,
+ $this->cache->get_driver()
+ ));
+ $phpbb_dispatcher = new phpbb_mock_event_dispatcher;
+ $phpbb_log = new \phpbb\log\null();
+
+ // Now on to the actual test
+
+ $group_id = false;
+ group_create($group_id, GROUP_OPEN, 'test', 'test group', array());
+
+ // Add user 2 as group leader
+ group_user_add($group_id, 2, false, false, false, true, false);
+
+ // Add user 3 as pending
+ group_user_add($group_id, 3, false, false, false, false, true);
+
+ $this->assert_notifications(
+ array(
+ // user 3 pending notification
+ array(
+ 'item_id' => 3, // user_id of requesting join
+ 'item_parent_id' => $group_id,
+ 'user_id' => 2,
+ 'notification_read' => 0,
+ 'notification_data' => array(
+ 'group_name' => 'test',
+ ),
+ ),
+ ),
+ array(
+ 'user_id' => 2,
+ )
+ );
+
+ // Approve user 3 joining the group
+ group_user_attributes('approve', $group_id, array(3));
+
+ // user 3 pending notification should have been deleted
+ $this->assert_notifications(
+ array(),
+ array(
+ 'user_id' => 2,
+ )
+ );
+
+ $this->assert_notifications(
+ array(
+ // user 3 approved notification
+ array(
+ 'item_id' => $group_id, // user_id of requesting join
+ 'user_id' => 3,
+ 'notification_read' => 0,
+ 'notification_data' => array(
+ 'group_name' => 'test',
+ ),
+ ),
+ ),
+ array(
+ 'user_id' => 3,
+ )
+ );
+ }
+}
diff --git a/tests/notification/manager_helper.php b/tests/notification/manager_helper.php
new file mode 100644
index 0000000000..731dd00b7a
--- /dev/null
+++ b/tests/notification/manager_helper.php
@@ -0,0 +1,67 @@
+<?php
+/**
+*
+* @package notifications
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* Notifications service class
+* @package notifications
+*/
+class phpbb_notification_manager_helper extends \phpbb\notification\manager
+{
+ public function set_var($name, $value)
+ {
+ $this->$name = $value;
+ }
+
+ // Extra dependencies for get_*_class functions
+ protected $auth = null;
+ protected $config = null;
+ public function setDependencies($auth, $config)
+ {
+ $this->auth = $auth;
+ $this->config = $config;
+ }
+
+ /**
+ * Helper to get the notifications item type class and set it up
+ */
+ public function get_item_type_class($item_type, $data = array())
+ {
+ $item_type = 'phpbb\notification\type\\' . $item_type;
+
+ $item = new $item_type($this->user_loader, $this->db, $this->cache->get_driver(), $this->user, $this->auth, $this->config, $this->phpbb_root_path, $this->php_ext, $this->notification_types_table, $this->notifications_table, $this->user_notifications_table);
+
+ $item->set_notification_manager($this);
+
+ $item->set_initial_data($data);
+
+ return $item;
+ }
+
+ /**
+ * Helper to get the notifications method class and set it up
+ */
+ public function get_method_class($method_name)
+ {
+ $method_name = 'phpbb\notification\method\\' . $method_name;
+
+ $method = new $method_name($this->user_loader, $this->db, $this->cache->get_driver(), $this->user, $this->auth, $this->config, $this->phpbb_root_path, $this->php_ext, $this->notification_types_table, $this->notifications_table, $this->user_notifications_table);
+
+ $method->set_notification_manager($this);
+
+ return $method;
+ }
+}
diff --git a/tests/notification/notification_test.php b/tests/notification/notification_test.php
new file mode 100644
index 0000000000..e1788e8670
--- /dev/null
+++ b/tests/notification/notification_test.php
@@ -0,0 +1,305 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+require_once dirname(__FILE__) . '/base.php';
+
+class phpbb_notification_test extends phpbb_tests_notification_base
+{
+ protected $notifications, $db, $container, $user, $config, $auth, $cache;
+
+ public function getDataSet()
+ {
+ return $this->createXMLDataSet(dirname(__FILE__) . '/fixtures/notification.xml');
+ }
+
+ public function test_get_notification_type_id()
+ {
+ // They should be inserted the first time
+ $post_type_id = $this->notifications->get_notification_type_id('post');
+ $quote_type_id = $this->notifications->get_notification_type_id('quote');
+ $test_type_id = $this->notifications->get_notification_type_id('test');
+
+ $this->assertEquals(array(
+ 'test' => $test_type_id,
+ 'quote' => $quote_type_id,
+ 'post' => $post_type_id,
+ ),
+ $this->notifications->get_notification_type_ids(array(
+ 'test',
+ 'quote',
+ 'post',
+ )
+ ));
+ $this->assertEquals($quote_type_id, $this->notifications->get_notification_type_id('quote'));
+
+ try
+ {
+ $this->assertEquals(false, $this->notifications->get_notification_type_id('fail'));
+
+ $this->fail('Non-existent type should throw an exception');
+ }
+ catch (Exception $e) {}
+ }
+
+ public function test_get_subscription_types()
+ {
+ $subscription_types = $this->notifications->get_subscription_types();
+
+ $this->assertArrayHasKey('NOTIFICATION_GROUP_MISCELLANEOUS', $subscription_types);
+ $this->assertArrayHasKey('NOTIFICATION_GROUP_POSTING', $subscription_types);
+
+ $this->assertArrayHasKey('bookmark', $subscription_types['NOTIFICATION_GROUP_POSTING']);
+ $this->assertArrayHasKey('post', $subscription_types['NOTIFICATION_GROUP_POSTING']);
+ $this->assertArrayHasKey('quote', $subscription_types['NOTIFICATION_GROUP_POSTING']);
+ $this->assertArrayHasKey('topic', $subscription_types['NOTIFICATION_GROUP_POSTING']);
+
+ $this->assertArrayHasKey('pm', $subscription_types['NOTIFICATION_GROUP_MISCELLANEOUS']);
+
+ //get_subscription_types
+ //get_subscription_methods
+ }
+
+ public function test_subscriptions()
+ {
+ $this->notifications->delete_subscription('post', 0, '', 2);
+
+ $this->assertArrayNotHasKey('post', $this->notifications->get_global_subscriptions(2));
+
+ $this->notifications->add_subscription('post', 0, '', 2);
+
+ $this->assertArrayHasKey('post', $this->notifications->get_global_subscriptions(2));
+ }
+
+ public function test_notifications()
+ {
+ $this->db->sql_query('DELETE FROM phpbb_notification_types');
+
+ $types = array('quote', 'bookmark', 'post', 'test');
+ foreach ($types as $id => $type)
+ {
+ $this->db->sql_query('INSERT INTO phpbb_notification_types ' .
+ $this->db->sql_build_array('INSERT', array(
+ 'notification_type_id' => ($id + 1),
+ 'notification_type_name' => $type,
+ 'notification_type_enabled' => 1,
+ ))
+ );
+ }
+
+ // Used to test post notifications later
+ $this->db->sql_query('INSERT INTO ' . TOPICS_WATCH_TABLE . ' ' . $this->db->sql_build_array('INSERT', array(
+ 'topic_id' => 2,
+ 'notify_status' => NOTIFY_YES,
+ 'user_id' => 0,
+ )));
+
+ $this->assertEquals(array(
+ 'notifications' => array(),
+ 'unread_count' => 0,
+ 'total_count' => 0,
+ ), $this->notifications->load_notifications(array(
+ 'count_unread' => true,
+ )));
+
+ $this->notifications->add_notifications('test', array(
+ 'post_id' => '1',
+ 'topic_id' => '1',
+ 'post_time' => 1349413321,
+ ));
+
+ $this->notifications->add_notifications('test', array(
+ 'post_id' => '2',
+ 'topic_id' => '2',
+ 'post_time' => 1349413322,
+ ));
+
+ $this->notifications->add_notifications('test', array(
+ 'post_id' => '3',
+ 'topic_id' => '2',
+ 'post_time' => 1349413323,
+ ));
+
+ $this->notifications->add_notifications(array('quote', 'bookmark', 'post', 'test'), array(
+ 'post_id' => '4',
+ 'topic_id' => '2',
+ 'post_time' => 1349413324,
+ 'poster_id' => 2,
+ 'topic_title' => 'test-title',
+ 'post_subject' => 'Re: test-title',
+ 'forum_id' => 2,
+ 'forum_name' => 'Your first forum',
+ ));
+
+ $this->db->sql_query('INSERT INTO ' . BOOKMARKS_TABLE . ' ' . $this->db->sql_build_array('INSERT', array(
+ 'topic_id' => 2,
+ 'user_id' => 0,
+ )));
+
+ $this->notifications->add_notifications(array('quote', 'bookmark', 'post', 'test'), array(
+ 'post_id' => '5',
+ 'topic_id' => '2',
+ 'post_time' => 1349413325,
+ 'poster_id' => 2,
+ 'topic_title' => 'test-title',
+ 'post_subject' => 'Re: test-title',
+ 'forum_id' => 2,
+ 'forum_name' => 'Your first forum',
+ ));
+
+ $this->notifications->delete_subscription('test');
+
+ $this->notifications->add_notifications('test', array(
+ 'post_id' => '6',
+ 'topic_id' => '2',
+ 'post_time' => 1349413326,
+ ));
+
+ $this->assert_notifications(
+ array(
+ array(
+ 'item_id' => 1,
+ 'item_parent_id' => 1,
+ 'user_id' => 0,
+ 'notification_read' => 0,
+ 'notification_time' => 1349413321,
+ 'notification_data' => array(),
+ ),
+ array(
+ 'item_id' => 2,
+ 'item_parent_id' => 2,
+ 'user_id' => 0,
+ 'notification_read' => 0,
+ 'notification_time' => 1349413322,
+ 'notification_data' => array(),
+ ),
+ array(
+ 'item_id' => 3,
+ 'item_parent_id' => 2,
+ 'user_id' => 0,
+ 'notification_read' => 0,
+ 'notification_time' => 1349413323,
+ 'notification_data' => array(),
+ ),
+ array(
+ 'item_id' => 4,
+ 'item_parent_id' => 2,
+ 'user_id' => 0,
+ 'notification_read' => 0,
+ 'notification_time' => 1349413324,
+ 'notification_data' => array(
+ 'poster_id' => 2,
+ 'topic_title' => 'test-title',
+ 'post_subject' => 'Re: test-title',
+ 'post_username' => '',
+ 'forum_id' => 2,
+ 'forum_name' => 'Your first forum',
+ ),
+ ),
+ array(
+ 'item_id' => 5,
+ 'item_parent_id' => 2,
+ 'user_id' => 0,
+ 'notification_read' => 0,
+ 'notification_time' => 1349413325,
+ 'notification_data' => array(
+ 'poster_id' => 2,
+ 'topic_title' => 'test-title',
+ 'post_subject' => 'Re: test-title',
+ 'post_username' => '',
+ 'forum_id' => 2,
+ 'forum_name' => 'Your first forum',
+ ),
+ ),
+ )
+ );
+
+ // Now test updating -------------------------------
+
+ $this->notifications->update_notifications('test', array(
+ 'post_id' => '1',
+ 'topic_id' => '2', // change parent_id
+ 'post_time' => 1349413321,
+ ));
+
+ $this->notifications->update_notifications('test', array(
+ 'post_id' => '3',
+ 'topic_id' => '2',
+ 'post_time' => 1234, // change time
+ ));
+
+ $this->notifications->update_notifications(array('quote', 'bookmark', 'post', 'test'), array(
+ 'post_id' => '5',
+ 'topic_id' => '2',
+ 'poster_id' => 2,
+ 'topic_title' => 'test-title2', // change topic_title
+ 'post_subject' => 'Re: test-title2', // change post_subject
+ 'forum_id' => 3, // change forum_id
+ 'forum_name' => 'Your second forum', // change forum_name
+ ));
+
+ $this->assert_notifications(
+ array(
+ array(
+ 'item_id' => 3,
+ 'item_parent_id' => 2,
+ 'user_id' => 0,
+ 'notification_read' => 0,
+ 'notification_time' => 1234,
+ 'notification_data' => array(),
+ ),
+ array(
+ 'item_id' => 1,
+ 'item_parent_id' => 2,
+ 'user_id' => 0,
+ 'notification_read' => 0,
+ 'notification_time' => 1349413321,
+ 'notification_data' => array(),
+ ),
+ array(
+ 'item_id' => 2,
+ 'item_parent_id' => 2,
+ 'user_id' => 0,
+ 'notification_read' => 0,
+ 'notification_time' => 1349413322,
+ 'notification_data' => array(),
+ ),
+ array(
+ 'item_id' => 4,
+ 'item_parent_id' => 2,
+ 'user_id' => 0,
+ 'notification_read' => 0,
+ 'notification_time' => 1349413324,
+ 'notification_data' => array(
+ 'poster_id' => 2,
+ 'topic_title' => 'test-title',
+ 'post_subject' => 'Re: test-title',
+ 'post_username' => '',
+ 'forum_id' => 2,
+ 'forum_name' => 'Your first forum',
+ ),
+ ),
+ array(
+ 'item_id' => 5,
+ 'item_parent_id' => 2,
+ 'user_id' => 0,
+ 'notification_read' => 0,
+ 'notification_time' => 1349413325,
+ 'notification_data' => array(
+ 'poster_id' => 2,
+ 'topic_title' => 'test-title2',
+ 'post_subject' => 'Re: test-title2',
+ 'post_username' => '',
+ 'forum_id' => 3,
+ 'forum_name' => 'Your second forum',
+ ),
+ ),
+ )
+ );
+ }
+}
diff --git a/tests/notification/submit_post_base.php b/tests/notification/submit_post_base.php
new file mode 100644
index 0000000000..10d676c687
--- /dev/null
+++ b/tests/notification/submit_post_base.php
@@ -0,0 +1,149 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php';
+require_once dirname(__FILE__) . '/../../phpBB/includes/functions_content.php';
+require_once dirname(__FILE__) . '/../../phpBB/includes/functions_posting.php';
+require_once dirname(__FILE__) . '/../../phpBB/includes/utf/utf_tools.php';
+
+abstract class phpbb_notification_submit_post_base extends phpbb_database_test_case
+{
+ protected $notifications, $db, $container, $user, $config, $auth, $cache;
+
+ protected $item_type = '';
+
+ protected $poll_data = array();
+ protected $post_data = array(
+ 'forum_id' => 1,
+ 'topic_id' => 1,
+ 'topic_title' => 'topic_title',
+ 'icon_id' => 0,
+ 'enable_bbcode' => 0,
+ 'enable_smilies' => 0,
+ 'enable_urls' => 0,
+ 'enable_sig' => 0,
+ 'message' => '',
+ 'message_md5' => '',
+ 'attachment_data' => array(),
+ 'bbcode_bitfield' => '',
+ 'bbcode_uid' => '',
+ 'post_edit_locked' => false,
+ //'force_approved_state' => 1,
+ );
+
+ public function getDataSet()
+ {
+ return $this->createXMLDataSet(dirname(__FILE__) . '/fixtures/submit_post_' . $this->item_type . '.xml');
+ }
+
+ public function setUp()
+ {
+ parent::setUp();
+
+ global $auth, $cache, $config, $db, $phpbb_container, $phpbb_dispatcher, $user, $request, $phpEx, $phpbb_root_path;
+
+ // Database
+ $this->db = $this->new_dbal();
+ $db = $this->db;
+
+ // Auth
+ $auth = $this->getMock('\phpbb\auth\auth');
+ $auth->expects($this->any())
+ ->method('acl_get')
+ ->with($this->stringContains('_'),
+ $this->anything())
+ ->will($this->returnValueMap(array(
+ array('f_noapprove', 1, true),
+ array('f_postcount', 1, true),
+ array('m_edit', 1, false),
+ )));
+
+ // Config
+ $config = new \phpbb\config\config(array('num_topics' => 1,'num_posts' => 1,));
+ set_config(null, null, null, $config);
+ set_config_count(null, null, null, $config);
+
+ $cache = new \phpbb\cache\service(
+ new \phpbb\cache\driver\null(),
+ $config,
+ $db,
+ $phpbb_root_path,
+ $phpEx
+ );
+
+ // Event dispatcher
+ $phpbb_dispatcher = new phpbb_mock_event_dispatcher();
+
+ // User
+ $user = $this->getMock('\phpbb\user');
+ $user->ip = '';
+ $user->data = array(
+ 'user_id' => 2,
+ 'username' => 'user-name',
+ 'is_registered' => true,
+ 'user_colour' => '',
+ );
+
+ // Request
+ $type_cast_helper = $this->getMock('\phpbb\request\type_cast_helper_interface');
+ $request = $this->getMock('\phpbb\request\request');
+
+ // Container
+ $phpbb_container = new phpbb_mock_container_builder();
+ $phpbb_container->set('content.visibility', new \phpbb\content_visibility($auth, $db, $user, $phpbb_root_path, $phpEx, FORUMS_TABLE, POSTS_TABLE, TOPICS_TABLE, USERS_TABLE));
+
+ $user_loader = new \phpbb\user_loader($db, $phpbb_root_path, $phpEx, USERS_TABLE);
+
+ // Notification Types
+ $notification_types = array('quote', 'bookmark', 'post', 'post_in_queue', 'topic', 'approve_topic', 'approve_post');
+ $notification_types_array = array();
+ foreach ($notification_types as $type)
+ {
+ $class_name = '\phpbb\notification\type\\' . $type;
+ $class = new $class_name(
+ $user_loader, $db, $cache->get_driver(), $user, $auth, $config,
+ $phpbb_root_path, $phpEx,
+ NOTIFICATION_TYPES_TABLE, NOTIFICATIONS_TABLE, USER_NOTIFICATIONS_TABLE);
+
+ $phpbb_container->set('notification.type.' . $type, $class);
+
+ $notification_types_array['notification.type.' . $type] = $class;
+ }
+
+ // Notification Manager
+ $phpbb_notifications = new \phpbb\notification\manager($notification_types_array, array(),
+ $phpbb_container, $user_loader, $config, $db, $cache, $user,
+ $phpbb_root_path, $phpEx,
+ NOTIFICATION_TYPES_TABLE, NOTIFICATIONS_TABLE, USER_NOTIFICATIONS_TABLE);
+ $phpbb_container->set('notification_manager', $phpbb_notifications);
+ }
+
+ /**
+ * @dataProvider submit_post_data
+ */
+ public function test_submit_post($additional_post_data, $expected_before, $expected_after)
+ {
+ $sql = 'SELECT user_id, item_id, item_parent_id
+ FROM ' . NOTIFICATIONS_TABLE . ' n, ' . NOTIFICATION_TYPES_TABLE . " nt
+ WHERE nt.notification_type_name = '" . $this->item_type . "'
+ AND n.notification_type_id = nt.notification_type_id
+ ORDER BY user_id ASC, item_id ASC";
+ $result = $this->db->sql_query($sql);
+ $this->assertEquals($expected_before, $this->db->sql_fetchrowset($result));
+ $this->db->sql_freeresult($result);
+
+ $poll_data = $this->poll_data;
+ $post_data = array_merge($this->post_data, $additional_post_data);
+ submit_post('reply', '', 'poster-name', POST_NORMAL, $poll_data, $post_data, false, false);
+
+ $result = $this->db->sql_query($sql);
+ $this->assertEquals($expected_after, $this->db->sql_fetchrowset($result));
+ $this->db->sql_freeresult($result);
+ }
+}
diff --git a/tests/notification/submit_post_type_bookmark_test.php b/tests/notification/submit_post_type_bookmark_test.php
new file mode 100644
index 0000000000..4e4a3f6c9a
--- /dev/null
+++ b/tests/notification/submit_post_type_bookmark_test.php
@@ -0,0 +1,90 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+require_once dirname(__FILE__) . '/submit_post_base.php';
+
+class phpbb_notification_submit_post_type_bookmark_test extends phpbb_notification_submit_post_base
+{
+ protected $item_type = 'bookmark';
+
+ public function setUp()
+ {
+ parent::setUp();
+
+ global $auth;
+
+ // Add additional permissions
+ $auth->expects($this->any())
+ ->method('acl_get_list')
+ ->with($this->anything(),
+ $this->stringContains('_'),
+ $this->greaterThan(0))
+ ->will($this->returnValueMap(array(
+ array(
+ array(3, 4, 5, 6, 7),
+ 'f_read',
+ 1,
+ array(
+ 1 => array(
+ 'f_read' => array(3, 5, 6, 7),
+ ),
+ ),
+ ),
+ )));
+ }
+
+ /**
+ * submit_post() Notifications test
+ *
+ * submit_post() $mode = 'reply'
+ * Notification item_type = 'bookmark'
+ */
+ public function submit_post_data()
+ {
+ return array(
+ /**
+ * Normal post
+ *
+ * User => State description
+ * 2 => Poster, should NOT receive a notification
+ * 3 => Bookmarked, should receive a notification
+ * 4 => Bookmarked, but unauthed to read, should NOT receive a notification
+ * 5 => Bookmarked, but already notified, should NOT receive a new notification
+ * 6 => Bookmarked, but option disabled, should NOT receive a notification
+ * 7 => Bookmarked, option set to default, should receive a notification
+ */
+ array(
+ array(),
+ array(
+ array('user_id' => 5, 'item_id' => 1, 'item_parent_id' => 1),
+ ),
+ array(
+ array('user_id' => 3, 'item_id' => 2, 'item_parent_id' => 1),
+ array('user_id' => 5, 'item_id' => 1, 'item_parent_id' => 1),
+ array('user_id' => 7, 'item_id' => 2, 'item_parent_id' => 1),
+ ),
+ ),
+
+ /**
+ * Unapproved post
+ *
+ * No new notifications
+ */
+ array(
+ array('force_approved_state' => false),
+ array(
+ array('user_id' => 5, 'item_id' => 1, 'item_parent_id' => 1),
+ ),
+ array(
+ array('user_id' => 5, 'item_id' => 1, 'item_parent_id' => 1),
+ ),
+ ),
+ );
+ }
+}
diff --git a/tests/notification/submit_post_type_post_in_queue_test.php b/tests/notification/submit_post_type_post_in_queue_test.php
new file mode 100644
index 0000000000..6a7ac44e39
--- /dev/null
+++ b/tests/notification/submit_post_type_post_in_queue_test.php
@@ -0,0 +1,107 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+require_once dirname(__FILE__) . '/submit_post_base.php';
+
+class phpbb_notification_submit_post_type_post_in_queue_test extends phpbb_notification_submit_post_base
+{
+ protected $item_type = 'post_in_queue';
+
+ public function setUp()
+ {
+ parent::setUp();
+
+ global $auth;
+
+ // Add additional permissions
+ $auth->expects($this->any())
+ ->method('acl_get_list')
+ ->with($this->anything(),
+ $this->stringContains('_'),
+ $this->greaterThan(0))
+ ->will($this->returnValueMap(array(
+ array(
+ false,
+ 'm_approve',
+ array(1, 0),
+ array(
+ 0 => array(
+ 'm_approve' => array(9),
+ ),
+ 1 => array(
+ 'm_approve' => array(3, 4, 6, 7, 8),
+ ),
+ ),
+ ),
+ array(
+ array(3, 4, 6, 7, 8, 9),
+ 'f_read',
+ 1,
+ array(
+ 1 => array(
+ 'f_read' => array(3, 6, 7, 8, 9),
+ ),
+ ),
+ ),
+ )));
+ }
+
+ /**
+ * submit_post() Notifications test
+ *
+ * submit_post() $mode = 'reply'
+ * Notification item_type = 'post_in_queue'
+ */
+ public function submit_post_data()
+ {
+ return array(
+ /**
+ * Normal post
+ *
+ * No new notifications
+ */
+ array(
+ array(),
+ array(
+ array('user_id' => 6, 'item_id' => 1, 'item_parent_id' => 1),
+ ),
+ array(
+ array('user_id' => 6, 'item_id' => 1, 'item_parent_id' => 1),
+ ),
+ ),
+
+ /**
+ * Unapproved post
+ *
+ * User => State description
+ * 2 => Poster, should NOT receive a notification
+ * 3 => Moderator, should receive a notification
+ * 4 => Moderator, but unauthed to read, should NOT receive a notification
+ * 5 => Moderator, but unauthed to approve, should NOT receive a notification
+ * 6 => Moderator, but already notified, should STILL receive a new notification
+ * 7 => Moderator, but option disabled, should NOT receive a notification
+ * 8 => Moderator, option set to default, should receive a notification
+ * 9 => Moderator, has only global mod permissions, should receive a notification
+ */
+ array(
+ array('force_approved_state' => false),
+ array(
+ array('user_id' => 6, 'item_id' => 1, 'item_parent_id' => 1),
+ ),
+ array(
+ array('user_id' => 3, 'item_id' => 2, 'item_parent_id' => 1),
+ array('user_id' => 6, 'item_id' => 1, 'item_parent_id' => 1),
+ array('user_id' => 6, 'item_id' => 2, 'item_parent_id' => 1),
+ array('user_id' => 8, 'item_id' => 2, 'item_parent_id' => 1),
+ array('user_id' => 9, 'item_id' => 2, 'item_parent_id' => 1),
+ ),
+ ),
+ );
+ }
+}
diff --git a/tests/notification/submit_post_type_post_test.php b/tests/notification/submit_post_type_post_test.php
new file mode 100644
index 0000000000..c2eb419522
--- /dev/null
+++ b/tests/notification/submit_post_type_post_test.php
@@ -0,0 +1,96 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+require_once dirname(__FILE__) . '/submit_post_base.php';
+
+class phpbb_notification_submit_post_type_post_test extends phpbb_notification_submit_post_base
+{
+ protected $item_type = 'post';
+
+ public function setUp()
+ {
+ parent::setUp();
+
+ global $auth;
+
+ // Add additional permissions
+ $auth->expects($this->any())
+ ->method('acl_get_list')
+ ->with($this->anything(),
+ $this->stringContains('_'),
+ $this->greaterThan(0))
+ ->will($this->returnValueMap(array(
+ array(
+ array(3, 4, 5, 6, 7, 8),
+ 'f_read',
+ 1,
+ array(
+ 1 => array(
+ 'f_read' => array(3, 5, 6, 7, 8),
+ ),
+ ),
+ ),
+ )));
+ }
+
+ /**
+ * submit_post() Notifications test
+ *
+ * submit_post() $mode = 'reply'
+ * Notification item_type = 'post'
+ */
+ public function submit_post_data()
+ {
+ return array(
+ /**
+ * Normal post
+ *
+ * User => State description
+ * 2 => Poster, should NOT receive a notification
+ * 3 => Topic subscribed, should receive a notification
+ * 4 => Topic subscribed, but unauthed to read, should NOT receive a notification
+ * 5 => Topic subscribed, but already notified, should NOT receive a new notification
+ * 6 => Topic and forum subscribed, should receive ONE notification
+ * 7 => Forum subscribed, should receive a notification
+ * 8 => Forum subscribed, but already notified, should NOT receive a new notification
+ */
+ array(
+ array(),
+ array(
+ array('user_id' => 5, 'item_id' => 1, 'item_parent_id' => 1),
+ array('user_id' => 8, 'item_id' => 1, 'item_parent_id' => 1),
+ ),
+ array(
+ array('user_id' => 3, 'item_id' => 2, 'item_parent_id' => 1),
+ array('user_id' => 5, 'item_id' => 1, 'item_parent_id' => 1),
+ array('user_id' => 6, 'item_id' => 2, 'item_parent_id' => 1),
+ array('user_id' => 7, 'item_id' => 2, 'item_parent_id' => 1),
+ array('user_id' => 8, 'item_id' => 1, 'item_parent_id' => 1),
+ ),
+ ),
+
+ /**
+ * Unapproved post
+ *
+ * No new notifications
+ */
+ array(
+ array('force_approved_state' => false),
+ array(
+ array('user_id' => 5, 'item_id' => 1, 'item_parent_id' => 1),
+ array('user_id' => 8, 'item_id' => 1, 'item_parent_id' => 1),
+ ),
+ array(
+ array('user_id' => 5, 'item_id' => 1, 'item_parent_id' => 1),
+ array('user_id' => 8, 'item_id' => 1, 'item_parent_id' => 1),
+ ),
+ ),
+ );
+ }
+}
diff --git a/tests/notification/submit_post_type_quote_test.php b/tests/notification/submit_post_type_quote_test.php
new file mode 100644
index 0000000000..a849cb7b1b
--- /dev/null
+++ b/tests/notification/submit_post_type_quote_test.php
@@ -0,0 +1,113 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+require_once dirname(__FILE__) . '/submit_post_base.php';
+
+class phpbb_notification_submit_post_type_quote_test extends phpbb_notification_submit_post_base
+{
+ protected $item_type = 'quote';
+
+ public function setUp()
+ {
+ parent::setUp();
+
+ global $auth;
+
+ // Add additional permissions
+ $auth->expects($this->any())
+ ->method('acl_get_list')
+ ->with($this->anything(),
+ $this->stringContains('_'),
+ $this->greaterThan(0))
+ ->will($this->returnValueMap(array(
+ array(
+ array(3, 4, 5, 6, 7),
+ 'f_read',
+ 1,
+ array(
+ 1 => array(
+ 'f_read' => array(3, 5, 6, 7),
+ ),
+ ),
+ ),
+ )));
+ }
+
+ /**
+ * submit_post() Notifications test
+ *
+ * submit_post() $mode = 'reply'
+ * Notification item_type = 'quote'
+ */
+ public function submit_post_data()
+ {
+ return array(
+ /**
+ * Normal post
+ *
+ * User => State description
+ * 2 => Poster, should NOT receive a notification
+ * 3 => Quoted, should receive a notification
+ * 4 => Quoted, but unauthed to read, should NOT receive a notification
+ * 5 => Quoted, but already notified, should NOT receive a new notification
+ * 6 => Quoted, but option disabled, should NOT receive a notification
+ * 7 => Quoted, option set to default, should receive a notification
+ */
+ array(
+ array(
+ 'message' => implode(' ', array(
+ '[quote=&quot;poster&quot;:uid]poster should not be notified[/quote:uid]',
+ '[quote=&quot;test&quot;:uid]test should be notified[/quote:uid]',
+ '[quote=&quot;unauthorized&quot;:uid]unauthorized to read, should not receive a notification[/quote:uid]',
+ '[quote=&quot;notified&quot;:uid]already notified, should not receive a new notification[/quote:uid]',
+ '[quote=&quot;disabled&quot;:uid]option disabled, should not receive a notification[/quote:uid]',
+ '[quote=&quot;default&quot;:uid]option set to default, should receive a notification[/quote:uid]',
+ '[quote=&quot;doesn\'t exist&quot;:uid]user does not exist, should not receive a notification[/quote:uid]',
+ )),
+ 'bbcode_uid' => 'uid',
+ ),
+ array(
+ array('user_id' => 5, 'item_id' => 1, 'item_parent_id' => 1),
+ ),
+ array(
+ array('user_id' => 3, 'item_id' => 2, 'item_parent_id' => 1),
+ array('user_id' => 5, 'item_id' => 1, 'item_parent_id' => 1),
+ array('user_id' => 7, 'item_id' => 2, 'item_parent_id' => 1),
+ ),
+ ),
+
+ /**
+ * Unapproved post
+ *
+ * No new notifications
+ */
+ array(
+ array(
+ 'message' => implode(' ', array(
+ '[quote=&quot;poster&quot;:uid]poster should not be notified[/quote:uid]',
+ '[quote=&quot;test&quot;:uid]test should be notified[/quote:uid]',
+ '[quote=&quot;unauthorized&quot;:uid]unauthorized to read, should not receive a notification[/quote:uid]',
+ '[quote=&quot;notified&quot;:uid]already notified, should not receive a new notification[/quote:uid]',
+ '[quote=&quot;disabled&quot;:uid]option disabled, should not receive a notification[/quote:uid]',
+ '[quote=&quot;default&quot;:uid]option set to default, should receive a notification[/quote:uid]',
+ '[quote=&quot;doesn\'t exist&quot;:uid]user does not exist, should not receive a notification[/quote:uid]',
+ )),
+ 'bbcode_uid' => 'uid',
+ 'force_approved_state' => false,
+ ),
+ array(
+ array('user_id' => 5, 'item_id' => 1, 'item_parent_id' => 1),
+ ),
+ array(
+ array('user_id' => 5, 'item_id' => 1, 'item_parent_id' => 1),
+ ),
+ ),
+ );
+ }
+}
diff --git a/tests/notification/user_list_trim_test.php b/tests/notification/user_list_trim_test.php
new file mode 100644
index 0000000000..a8422f80b5
--- /dev/null
+++ b/tests/notification/user_list_trim_test.php
@@ -0,0 +1,139 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2014 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+require_once dirname(__FILE__) . '/../../phpBB/includes/functions_content.php';
+require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php';
+
+class phpbb_notification_user_list_trim_test extends phpbb_database_test_case
+{
+ protected $notification;
+
+ public function getDataSet()
+ {
+ return $this->createXMLDataSet(dirname(__FILE__) . '/fixtures/user_list_trim.xml');
+ }
+
+ public function setUp()
+ {
+ global $phpbb_root_path, $phpEx, $phpbb_dispatcher, $user, $cache, $auth;
+
+ parent::setUp();
+
+ $phpbb_dispatcher = new phpbb_mock_event_dispatcher();
+ $db = $this->new_dbal();
+
+ $config = new \phpbb\config\config(array());
+ set_config(null, null, null, $config);
+ set_config_count(null, null, null, $config);
+
+ $cache = new \phpbb\cache\service(
+ new \phpbb\cache\driver\null(),
+ $config,
+ $db,
+ $phpbb_root_path,
+ $phpEx
+ );
+
+ $auth = $this->getMock('\phpbb\auth\auth');
+ $auth->expects($this->any())
+ ->method('acl_get')
+ ->with($this->stringContains('_'),
+ $this->anything())
+ ->will($this->returnValueMap(array(
+ array('u_viewprofile', 1, false),
+ )));
+
+ $user = new \phpbb\user();
+ $user->data = array('user_lang' => 'en');
+ $user->add_lang('common');
+
+ $user_loader = new phpbb\user_loader($db, $phpbb_root_path, $phpEx, USERS_TABLE);
+ $user_loader->load_users(array(2, 3, 4, 5, 6));
+
+ $this->notification = new phpbb_mock_notification_type_post(
+ $user_loader, null, null, $user, null, null, $phpbb_root_path, $phpEx, null, null, null
+ );
+ }
+
+ public function user_list_trim_data()
+ {
+ return array(
+ array(
+ array(
+ 'topic_title' => 'Test',
+ 'poster_id' => 2,
+ 'post_username' => 'A',
+ 'responders' => null,
+ ),
+ 'A replied to the topic “Test”.',
+ ),
+ array(
+ array(
+ 'topic_title' => 'Test',
+ 'poster_id' => 2,
+ 'post_username' => 'A',
+ 'responders' => array(
+ array('username' => '', 'poster_id' => 3),
+ ),
+ ),
+ 'A and B replied to the topic “Test”.',
+ ),
+ array(
+ array(
+ 'topic_title' => 'Test',
+ 'poster_id' => 2,
+ 'post_username' => 'A',
+ 'responders' => array(
+ array('username' => '', 'poster_id' => 3),
+ array('username' => '', 'poster_id' => 4),
+ ),
+ ),
+ 'A, B, and C replied to the topic “Test”.',
+ ),
+ array(
+ array(
+ 'topic_title' => 'Test',
+ 'poster_id' => 2,
+ 'post_username' => 'A',
+ 'responders' => array(
+ array('username' => '', 'poster_id' => 3),
+ array('username' => '', 'poster_id' => 4),
+ array('username' => '', 'poster_id' => 5),
+ ),
+ ),
+ 'A, B, C, and D replied to the topic “Test”.',
+ ),
+ array(
+ array(
+ 'topic_title' => 'Test',
+ 'poster_id' => 2,
+ 'post_username' => 'A',
+ 'responders' => array(
+ array('username' => '', 'poster_id' => 3),
+ array('username' => '', 'poster_id' => 4),
+ array('username' => '', 'poster_id' => 5),
+ array('username' => '', 'poster_id' => 6),
+ ),
+ ),
+ 'A, B, C, and 2 others replied to the topic “Test”.',
+ ),
+ );
+ }
+
+ /**
+ * @dataProvider user_list_trim_data
+ */
+ public function test_user_list_trim($data, $expected_result)
+ {
+ $data = array('notification_data' => serialize($data));
+ $this->notification->set_initial_data($data);
+
+ $this->assertEquals($expected_result, $this->notification->get_title());
+ }
+}
diff --git a/tests/pagination/config/routing.yml b/tests/pagination/config/routing.yml
new file mode 100644
index 0000000000..dd667274cd
--- /dev/null
+++ b/tests/pagination/config/routing.yml
@@ -0,0 +1,6 @@
+core_controller:
+ pattern: /test
+ defaults: { _controller: core_foo.controller:bar, page: 1}
+core_page_controller:
+ pattern: /test/page/{page}
+ defaults: { _controller: core_foo.controller:bar}
diff --git a/tests/pagination/pagination_test.php b/tests/pagination/pagination_test.php
new file mode 100644
index 0000000000..71206dff58
--- /dev/null
+++ b/tests/pagination/pagination_test.php
@@ -0,0 +1,280 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+require_once dirname(__FILE__) . '/../template/template_test_case.php';
+
+class phpbb_pagination_pagination_test extends phpbb_template_template_test_case
+{
+ protected $test_path = 'tests/pagination';
+
+ public function return_callback_implode()
+ {
+ return implode('-', func_get_args());
+ }
+
+ public function setUp()
+ {
+ parent::setUp();
+
+ global $phpbb_dispatcher;
+
+ $phpbb_dispatcher = new phpbb_mock_event_dispatcher;
+ $this->user = $this->getMock('\phpbb\user');
+ $this->user->expects($this->any())
+ ->method('lang')
+ ->will($this->returnCallback(array($this, 'return_callback_implode')));
+
+ $this->finder = new \phpbb\extension\finder(
+ new phpbb_mock_extension_manager(dirname(__FILE__) . '/', array()),
+ new \phpbb\filesystem(),
+ dirname(__FILE__) . '/',
+ new phpbb_mock_cache()
+ );
+
+ $this->config = new \phpbb\config\config(array('enable_mod_rewrite' => '1'));
+ $provider = new \phpbb\controller\provider($this->finder);
+ $provider->find(dirname(__FILE__) . '/');
+ $this->helper = new \phpbb\controller\helper($this->template, $this->user, $this->config, $provider, '', 'php');
+ $this->pagination = new \phpbb\pagination($this->template, $this->user, $this->helper);
+ }
+
+ public function generate_template_pagination_data()
+ {
+ return array(
+ array(
+ 'page.php',
+ 'start',
+ 95,
+ 10,
+ 10,
+ 'pagination
+ :per_page:10
+ :current_page:2
+ :base_url:page.php
+ :previous::page.php
+ :else:1:page.php
+ :current:2:page.php?start=10
+ :else:3:page.php?start=20
+ :else:4:page.php?start=30
+ :else:5:page.php?start=40
+ :ellipsis:9:page.php?start=80
+ :else:10:page.php?start=90
+ :next::page.php?start=20
+ :u_prev:page.php
+ :u_next:page.php?start=20',
+ ),
+ array(
+ 'page.php',
+ 'start',
+ 95,
+ 10,
+ 20,
+ 'pagination
+ :per_page:10
+ :current_page:3
+ :base_url:page.php
+ :previous::page.php?start=10
+ :else:1:page.php
+ :else:2:page.php?start=10
+ :current:3:page.php?start=20
+ :else:4:page.php?start=30
+ :else:5:page.php?start=40
+ :else:6:page.php?start=50
+ :ellipsis:9:page.php?start=80
+ :else:10:page.php?start=90
+ :next::page.php?start=30
+ :u_prev:page.php?start=10
+ :u_next:page.php?start=30',
+ ),
+ array(
+ array('routes' => array(
+ 'core_controller',
+ 'core_page_controller',
+ )),
+ 'page',
+ 95,
+ 10,
+ 10,
+ 'pagination
+ :per_page:10
+ :current_page:2
+ :base_url:
+ :previous::test
+ :else:1:test
+ :current:2:test/page/2
+ :else:3:test/page/3
+ :else:4:test/page/4
+ :else:5:test/page/5
+ :ellipsis:9:test/page/9
+ :else:10:test/page/10
+ :next::test/page/3
+ :u_prev:test
+ :u_next:test/page/3',
+ ),
+ array(
+ array('routes' => array(
+ 'core_controller',
+ 'core_page_controller',
+ )),
+ 'page',
+ 95,
+ 10,
+ 20,
+ 'pagination
+ :per_page:10
+ :current_page:3
+ :base_url:
+ :previous::test/page/2
+ :else:1:test
+ :else:2:test/page/2
+ :current:3:test/page/3
+ :else:4:test/page/4
+ :else:5:test/page/5
+ :else:6:test/page/6
+ :ellipsis:9:test/page/9
+ :else:10:test/page/10
+ :next::test/page/4
+ :u_prev:test/page/2
+ :u_next:test/page/4',
+ ),
+ );
+ }
+
+ /**
+ * @dataProvider generate_template_pagination_data
+ */
+ public function test_generate_template_pagination($base_url, $start_name, $num_items, $per_page, $start_item, $expect)
+ {
+ $this->pagination->generate_template_pagination($base_url, 'pagination', $start_name, $num_items, $per_page, $start_item);
+ $this->template->set_filenames(array('test' => 'pagination.html'));
+
+ $this->assertEquals(str_replace("\t", '', $expect), $this->display('test'));
+ }
+
+ public function on_page_data()
+ {
+ return array(
+ array(
+ 10,
+ 10,
+ 0,
+ 'PAGE_OF-1-1',
+ ),
+ );
+ }
+
+ /**
+ * @dataProvider on_page_data
+ */
+ public function test_on_page($num_items, $per_page, $start_item, $expect_return)
+ {
+ $this->assertEquals($expect_return, $this->pagination->on_page($num_items, $per_page, $start_item));
+ }
+
+ public function validate_start_data()
+ {
+ return array(
+ array(
+ 0,
+ 0,
+ 0,
+ ),
+ array(
+ -1,
+ 20,
+ 0,
+ ),
+ array(
+ 20,
+ -30,
+ 0,
+ ),
+ array(
+ 0,
+ 20,
+ 0,
+ ),
+ array(
+ 10,
+ 20,
+ 10,
+ ),
+ array(
+ 20,
+ 20,
+ 10,
+ ),
+ array(
+ 30,
+ 20,
+ 10,
+ ),
+ );
+ }
+
+ /**
+ * @dataProvider validate_start_data
+ */
+ public function test_validate_start($start, $num_items, $expect)
+ {
+ $this->assertEquals($expect, $this->pagination->validate_start($start, 10, $num_items));
+ }
+
+ public function reverse_start_data()
+ {
+ return array(
+ array(
+ 10,
+ 5,
+ 15,
+ 0,
+ ),
+ array(
+ 10,
+ 10,
+ 25,
+ 5,
+ ),
+ );
+ }
+
+ /**
+ * @dataProvider reverse_start_data
+ */
+ public function test_reverse_start($start, $limit, $num_items, $expect)
+ {
+ $this->assertEquals($expect, $this->pagination->reverse_start($start, $limit, $num_items));
+ }
+
+ public function reverse_limit_data()
+ {
+ return array(
+ array(
+ 10,
+ 10,
+ 15,
+ 5,
+ ),
+ array(
+ 20,
+ 10,
+ 15,
+ 1,
+ ),
+ );
+ }
+
+ /**
+ * @dataProvider reverse_limit_data
+ */
+ public function test_reverse_limit($start, $per_page, $num_items, $expect)
+ {
+ $this->assertEquals($expect, $this->pagination->reverse_limit($start, $per_page, $num_items));
+ }
+}
diff --git a/tests/pagination/templates/pagination.html b/tests/pagination/templates/pagination.html
new file mode 100644
index 0000000000..db63258585
--- /dev/null
+++ b/tests/pagination/templates/pagination.html
@@ -0,0 +1,15 @@
+pagination
+:per_page:{PER_PAGE}
+:current_page:{CURRENT_PAGE}
+:base_url:{BASE_URL}
+<!-- BEGIN pagination -->
+<!-- IF pagination.S_IS_PREV -->:previous:{pagination.PAGE_NUMBER}:{pagination.PAGE_URL}
+<!-- ELSEIF pagination.S_IS_CURRENT -->:current:{pagination.PAGE_NUMBER}:{pagination.PAGE_URL}
+<!-- ELSEIF pagination.S_IS_ELLIPSIS -->:ellipsis:{pagination.PAGE_NUMBER}:{pagination.PAGE_URL}
+<!-- ELSEIF pagination.S_IS_NEXT -->:next:{pagination.PAGE_NUMBER}:{pagination.PAGE_URL}
+<!-- ELSE -->:else:{pagination.PAGE_NUMBER}:{pagination.PAGE_URL}
+<!-- ENDIF -->
+<!-- END pagination -->
+<!-- IF U_PREVIOUS_PAGE -->:u_prev:{U_PREVIOUS_PAGE}<!-- ENDIF -->
+
+<!-- IF U_NEXT_PAGE -->:u_next:{U_NEXT_PAGE}<!-- ENDIF -->
diff --git a/tests/passwords/drivers_test.php b/tests/passwords/drivers_test.php
new file mode 100644
index 0000000000..2d26be7da5
--- /dev/null
+++ b/tests/passwords/drivers_test.php
@@ -0,0 +1,81 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+class phpbb_passwords_helper_test extends PHPUnit_Framework_TestCase
+{
+ public function setUp()
+ {
+ // Prepare dependencies for drivers
+ $config = new \phpbb\config\config(array());
+ $this->driver_helper = new \phpbb\passwords\driver\helper($config);
+
+ $this->passwords_drivers = array(
+ 'passwords.driver.bcrypt_2y' => new \phpbb\passwords\driver\bcrypt_2y($config, $this->driver_helper),
+ 'passwords.driver.bcrypt' => new \phpbb\passwords\driver\bcrypt($config, $this->driver_helper),
+ 'passwords.driver.salted_md5' => new \phpbb\passwords\driver\salted_md5($config, $this->driver_helper),
+ 'passwords.driver.phpass' => new \phpbb\passwords\driver\phpass($config, $this->driver_helper),
+ );
+ }
+
+ public function data_helper_encode64()
+ {
+ return array(
+ array('foobar', 6, 'axqPW3aQ'),
+ array('foobar', 7, 'axqPW3aQ..'),
+ array('foobar', 5, 'axqPW34'),
+ );
+ }
+
+ /**
+ * @dataProvider data_helper_encode64
+ */
+ public function test_helper_encode64($input, $length, $output)
+ {
+ $return = $this->driver_helper->hash_encode64($input, $length);
+ $this->assertEquals($output, $return);
+ }
+
+ public function data_get_random_salt()
+ {
+ return array(
+ array(24, false),
+ array(24, '/dev/foobar'),
+ );
+ }
+
+ /**
+ * @dataProvider data_get_random_salt
+ */
+ public function test_get_random_salt($length, $rand_seed)
+ {
+ $rand_string = (empty($rand_seed)) ? $this->driver_helper->get_random_salt($length) : $this->driver_helper->get_random_salt($length, $rand_seed);
+ $start = microtime(true);
+
+ // Run each test for max. 1 second
+ while ((microtime(true) - $start) < 1)
+ {
+ $urandom_string = (empty($rand_seed)) ? $this->driver_helper->get_random_salt($length) : $this->driver_helper->get_random_salt($length, $rand_seed);
+ $this->assertEquals($length, strlen($urandom_string));
+ $this->assertNotEquals($rand_string, $urandom_string);
+ }
+ }
+
+ public function test_get_hash_settings_salted_md5()
+ {
+ $settings = $this->passwords_drivers['passwords.driver.salted_md5']->get_hash_settings('$H$9isfrtKXWqrz8PvztXlL3.daw4U0zI1');
+ $this->assertEquals(array(
+ 'count' => pow(2, 11),
+ 'salt' => 'isfrtKXW',
+ 'full' => '$H$9isfrtKXW',
+ ),
+ $settings
+ );
+ $this->assertEquals(false, $this->passwords_drivers['passwords.driver.salted_md5']->get_hash_settings(false));
+ }
+}
diff --git a/tests/passwords/manager_test.php b/tests/passwords/manager_test.php
new file mode 100644
index 0000000000..ee295ff043
--- /dev/null
+++ b/tests/passwords/manager_test.php
@@ -0,0 +1,295 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+class phpbb_passwords_manager_test extends PHPUnit_Framework_TestCase
+{
+ protected $passwords_drivers;
+
+ protected $pw_characters = '0123456789abcdefghijklmnopqrstuvwyzABCDEFGHIJKLMNOPQRSTUVXYZ.,_!?/\\';
+
+ protected $default_pw = 'foobar';
+
+ public function setUp()
+ {
+ // Prepare dependencies for manager and driver
+ $config = new \phpbb\config\config(array());
+ $this->driver_helper = new \phpbb\passwords\driver\helper($config);
+
+ $this->passwords_drivers = array(
+ 'passwords.driver.bcrypt_2y' => new \phpbb\passwords\driver\bcrypt_2y($config, $this->driver_helper),
+ 'passwords.driver.bcrypt' => new \phpbb\passwords\driver\bcrypt($config, $this->driver_helper),
+ 'passwords.driver.salted_md5' => new \phpbb\passwords\driver\salted_md5($config, $this->driver_helper),
+ 'passwords.driver.phpass' => new \phpbb\passwords\driver\phpass($config, $this->driver_helper),
+ );
+
+ $this->helper = new \phpbb\passwords\helper;
+ // Set up passwords manager
+ $this->manager = new \phpbb\passwords\manager($config, $this->passwords_drivers, $this->helper, array_keys($this->passwords_drivers));
+ }
+
+ public function hash_password_data()
+ {
+ if (version_compare(PHP_VERSION, '5.3.7', '<'))
+ {
+ return array(
+ array('', '2a', 60),
+ array('passwords.driver.bcrypt_2y', '2a', 60),
+ array('passwords.driver.bcrypt', '2a', 60),
+ array('passwords.driver.salted_md5', 'H', 34),
+ array('passwords.driver.foobar', '', false),
+ );
+ }
+ else
+ {
+ return array(
+ array('', '2y', 60),
+ array('passwords.driver.bcrypt_2y', '2y', 60),
+ array('passwords.driver.bcrypt', '2a', 60),
+ array('passwords.driver.salted_md5', 'H', 34),
+ array('passwords.driver.foobar', '', false),
+ );
+ }
+ }
+
+ /**
+ * @dataProvider hash_password_data
+ */
+ public function test_hash_password($type, $prefix, $length)
+ {
+ $password = $this->default_pw;
+
+ if (!$length)
+ {
+ $this->assertEquals(false, $hash = $this->manager->hash($password, $type));
+ return;
+ }
+ $time = microtime(true);
+
+ // Limit each test to 1 second
+ while ((microtime(true) - $time) < 1)
+ {
+ $hash = $this->manager->hash($password, $type);
+ preg_match('#^\$([a-zA-Z0-9\\\]*?)\$#', $hash, $match);
+ $this->assertEquals($prefix, $match[1]);
+ $this->assertEquals($length, strlen($hash));
+ $password .= $this->pw_characters[mt_rand(0, 66)];
+ }
+ }
+
+ public function check_password_data()
+ {
+ if (version_compare(PHP_VERSION, '5.3.7', '<'))
+ {
+ return array(
+ array('passwords.driver.bcrypt'),
+ array('passwords.driver.salted_md5'),
+ array('passwords.driver.phpass'),
+ );
+ }
+ else
+ {
+ return array(
+ array('passwords.driver.bcrypt_2y'),
+ array('passwords.driver.bcrypt'),
+ array('passwords.driver.salted_md5'),
+ array('passwords.driver.phpass'),
+ );
+ }
+ }
+
+ /**
+ * @dataProvider check_password_data
+ */
+ public function test_check_password($hash_type)
+ {
+ $password = $this->default_pw;
+ $time = microtime(true);
+ // Limit each test to 1 second
+ while ((microtime(true) - $time) < 1)
+ {
+ $hash = $this->manager->hash($password, $hash_type);
+ $this->assertEquals(true, $this->manager->check($password, $hash));
+ $password .= $this->pw_characters[mt_rand(0, 66)];
+ $this->assertEquals(false, $this->manager->check($password, $hash));
+ }
+
+ // Check if convert_flag is correctly set
+ $default_type = (version_compare(PHP_VERSION, '5.3.7', '<')) ? 'passwords.driver.bcrypt' : 'passwords.driver.bcrypt_2y';
+ $this->assertEquals(($hash_type !== $default_type), $this->manager->convert_flag);
+ }
+
+
+ public function check_hash_exceptions_data()
+ {
+ return array(
+ array('foobar', '3858f62230ac3c915f300c664312c63f', true),
+ array('foobar', '$S$b57a939fa4f2c04413a4eea9734a0903647b7adb93181295', false),
+ array('foobar', '$2a\S$kkkkaakdkdiej39023903204j2k3490234jk234j02349', false),
+ array('foobar', '$H$kklk938d023k//k3023', false),
+ array('foobar', '$H$3PtYMgXb39lrIWkgoxYLWtRkZtY3AY/', false),
+ array('foobar', '$2a$kwiweorurlaeirw', false),
+ );
+ }
+
+ /**
+ * @dataProvider check_hash_exceptions_data
+ */
+ public function test_check_hash_exceptions($password, $hash, $expected)
+ {
+ $this->assertEquals($expected, $this->manager->check($password, $hash));
+ }
+
+ public function data_hash_password_length()
+ {
+ return array(
+ array('passwords.driver.bcrypt', false),
+ array('passwords.driver.bcrypt_2y', false),
+ array('passwords.driver.salted_md5', '3858f62230ac3c915f300c664312c63f'),
+ array('passwords.driver.phpass', '3858f62230ac3c915f300c664312c63f'),
+ );
+ }
+
+ /**
+ * @dataProvider data_hash_password_length
+ */
+ public function test_hash_password_length($driver, $expected)
+ {
+ $this->assertEquals($expected, $this->passwords_drivers[$driver]->hash('foobar', 'foobar'));
+ }
+
+ public function test_hash_password_8bit_bcrypt()
+ {
+ $this->assertEquals(false, $this->manager->hash('foobar𝄞', 'passwords.driver.bcrypt'));
+ if (version_compare(PHP_VERSION, '5.3.7', '<'))
+ {
+ $this->assertEquals(false, $this->manager->hash('foobar𝄞', 'passwords.driver.bcrypt_2y'));
+ }
+ else
+ {
+ $this->assertNotEquals(false, $this->manager->hash('foobar𝄞', 'passwords.driver.bcrypt_2y'));
+ }
+ }
+
+ public function test_combined_hash_data()
+ {
+ if (version_compare(PHP_VERSION, '5.3.7', '<'))
+ {
+ return array(
+ array(
+ 'passwords.driver.salted_md5',
+ array('passwords.driver.bcrypt'),
+ ),
+ array(
+ 'passwords.driver.phpass',
+ array('passwords.driver.salted_md5'),
+ ),
+ array(
+ 'passwords.driver.salted_md5',
+ array('passwords.driver.phpass', 'passwords.driver.bcrypt'),
+ ),
+ array(
+ 'passwords.driver.salted_md5',
+ array('passwords.driver.salted_md5'),
+ false,
+ ),
+ array(
+ '$H$',
+ array('$2a$'),
+ ),
+ );
+ }
+ else
+ {
+ return array(
+ array(
+ 'passwords.driver.salted_md5',
+ array('passwords.driver.bcrypt_2y'),
+ ),
+ array(
+ 'passwords.driver.salted_md5',
+ array('passwords.driver.bcrypt'),
+ ),
+ array(
+ 'passwords.driver.phpass',
+ array('passwords.driver.salted_md5'),
+ ),
+ array(
+ 'passwords.driver.salted_md5',
+ array('passwords.driver.bcrypt_2y', 'passwords.driver.bcrypt'),
+ ),
+ array(
+ 'passwords.driver.salted_md5',
+ array('passwords.driver.salted_md5'),
+ false,
+ ),
+ array(
+ 'passwords.driver.bcrypt_2y',
+ array('passwords.driver.salted_md4'),
+ false,
+ ),
+ array(
+ '$H$',
+ array('$2y$'),
+ ),
+ );
+ }
+ }
+
+ /**
+ * @dataProvider test_combined_hash_data
+ */
+ public function test_combined_hash_password($first_type, $second_type, $expected = true)
+ {
+ $password = $this->default_pw;
+ $time = microtime(true);
+ // Limit each test to 1 second
+ while ((microtime(true) - $time) < 1)
+ {
+ $hash = $this->manager->hash($password, $first_type);
+ $combined_hash = $this->manager->hash($hash, $second_type);
+ $this->assertEquals($expected, $this->manager->check($password, $combined_hash));
+ $password .= $this->pw_characters[mt_rand(0, 66)];
+ $this->assertEquals(false, $this->manager->check($password, $combined_hash));
+
+ // If we are expecting the check to fail then there is
+ // no need to run this more than once
+ if (!$expected)
+ {
+ break;
+ }
+ }
+ }
+
+ public function test_unique_id()
+ {
+ $time = microtime(true);
+ $first_id = $this->driver_helper->unique_id();
+ // Limit test to 1 second
+ while ((microtime(true) - $time) < 1)
+ {
+ $this->assertNotEquals($first_id, $this->driver_helper->unique_id());
+ }
+ }
+
+ public function test_check_hash_with_large_input()
+ {
+ // 16 MB password, should be rejected quite fast
+ $start_time = time();
+ $this->assertFalse($this->manager->check(str_repeat('a', 1024 * 1024 * 16), '$H$9isfrtKXWqrz8PvztXlL3.daw4U0zI1'));
+ $this->assertLessThanOrEqual(5, time() - $start_time);
+ }
+
+ public function test_hash_password_with_large_input()
+ {
+ // 16 MB password, should be rejected quite fast
+ $start_time = time();
+ $this->assertFalse($this->manager->hash(str_repeat('a', 1024 * 1024 * 16)));
+ $this->assertLessThanOrEqual(5, time() - $start_time);
+ }
+}
diff --git a/tests/path_helper/web_root_path_test.php b/tests/path_helper/web_root_path_test.php
new file mode 100644
index 0000000000..2c22511402
--- /dev/null
+++ b/tests/path_helper/web_root_path_test.php
@@ -0,0 +1,172 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+class phpbb_path_helper_web_root_path_test extends phpbb_test_case
+{
+ protected $path_helper;
+ protected $phpbb_root_path = '';
+
+ public function setUp()
+ {
+ parent::setUp();
+
+ $this->set_phpbb_root_path();
+
+ $this->path_helper = new \phpbb\path_helper(
+ new \phpbb\symfony_request(
+ new phpbb_mock_request()
+ ),
+ new \phpbb\filesystem(),
+ $this->phpbb_root_path,
+ 'php'
+ );
+ }
+
+ /**
+ * Set the phpbb_root_path
+ *
+ * This is necessary because dataProvider functions are called
+ * before setUp or setUpBeforeClass; so we must set the path
+ * any time we wish to use it in one of these functions (and
+ * also in general for everything else)
+ */
+ public function set_phpbb_root_path()
+ {
+ $this->phpbb_root_path = dirname(__FILE__) . './../../phpBB/';
+ }
+
+ public function test_get_web_root_path()
+ {
+ // Symfony Request = null, so always should return phpbb_root_path
+ $this->assertEquals($this->phpbb_root_path, $this->path_helper->get_web_root_path());
+ }
+
+ public function basic_update_web_root_path_data()
+ {
+ $this->set_phpbb_root_path();
+
+ return array(
+ array(
+ 'http://www.test.com/test.php',
+ 'http://www.test.com/test.php',
+ '/',
+ ),
+ array(
+ $this->phpbb_root_path . 'test.php',
+ $this->phpbb_root_path . 'test.php',
+ ),
+ array(
+ 'test.php',
+ 'test.php',
+ ),
+ array(
+ $this->phpbb_root_path . $this->phpbb_root_path . 'test.php',
+ $this->phpbb_root_path . $this->phpbb_root_path . 'test.php',
+ ),
+ );
+ }
+
+ /**
+ * @dataProvider basic_update_web_root_path_data
+ */
+ public function test_basic_update_web_root_path($input, $expected)
+ {
+ $this->assertEquals($expected, $this->path_helper->update_web_root_path($input, $symfony_request));
+ }
+
+ public function update_web_root_path_data()
+ {
+ $this->set_phpbb_root_path();
+
+ return array(
+ array(
+ $this->phpbb_root_path . 'test.php',
+ $this->phpbb_root_path . 'test.php',
+ '/',
+ ),
+ array(
+ $this->phpbb_root_path . 'test.php',
+ $this->phpbb_root_path . '../test.php',
+ '//',
+ ),
+ array(
+ $this->phpbb_root_path . 'test.php',
+ $this->phpbb_root_path . '../test.php',
+ '//',
+ 'foo/bar.php',
+ 'bar.php',
+ ),
+ array(
+ $this->phpbb_root_path . 'test.php',
+ $this->phpbb_root_path . '../../test.php',
+ '/foo/template',
+ '/phpbb3-fork/phpBB/app.php/foo/template',
+ '/phpbb3-fork/phpBB/app.php',
+ ),
+ array(
+ $this->phpbb_root_path . 'test.php',
+ $this->phpbb_root_path . '../test.php',
+ '/foo/template',
+ '/phpbb3-fork/phpBB/foo/template',
+ '/phpbb3-fork/phpBB/app.php',
+ ),
+ );
+ }
+
+ /**
+ * @dataProvider update_web_root_path_data
+ */
+ public function test_update_web_root_path($input, $expected, $getPathInfo, $getRequestUri = null, $getScriptName = null)
+ {
+ $symfony_request = $this->getMock("\phpbb\symfony_request", array(), array(
+ new phpbb_mock_request(),
+ ));
+ $symfony_request->expects($this->any())
+ ->method('getPathInfo')
+ ->will($this->returnValue($getPathInfo));
+ $symfony_request->expects($this->any())
+ ->method('getRequestUri')
+ ->will($this->returnValue($getRequestUri));
+ $symfony_request->expects($this->any())
+ ->method('getScriptName')
+ ->will($this->returnValue($getScriptName));
+
+ $path_helper = new \phpbb\path_helper(
+ $symfony_request,
+ new \phpbb\filesystem(),
+ $this->phpbb_root_path,
+ 'php'
+ );
+
+ $this->assertEquals($expected, $path_helper->update_web_root_path($input, $symfony_request));
+ }
+
+ public function clean_url_data()
+ {
+ return array(
+ array('', ''),
+ array('://', '://'),
+ array('http://', 'http://'),
+ array('http://one/two/three', 'http://one/two/three'),
+ array('http://../one/two', 'http://../one/two'),
+ array('http://one/../two/three', 'http://two/three'),
+ array('http://one/two/../three', 'http://one/three'),
+ array('http://one/two/../../three', 'http://three'),
+ array('http://one/two/../../../three', 'http://../three'),
+ );
+ }
+
+ /**
+ * @dataProvider clean_url_data
+ */
+ public function test_clean_url($input, $expected)
+ {
+ $this->assertEquals($expected, $this->path_helper->clean_url($input));
+ }
+}
diff --git a/tests/privmsgs/delete_user_pms_test.php b/tests/privmsgs/delete_user_pms_test.php
index f705825262..92ee7c5f2a 100644
--- a/tests/privmsgs/delete_user_pms_test.php
+++ b/tests/privmsgs/delete_user_pms_test.php
@@ -81,10 +81,13 @@ class phpbb_privmsgs_delete_user_pms_test extends phpbb_database_test_case
*/
public function test_delete_user_pms($delete_user, $remaining_privmsgs, $remaining_privmsgs_to)
{
- global $db;
+ global $db, $phpbb_container;
$db = $this->new_dbal();
+ $phpbb_container = new phpbb_mock_container_builder();
+ $phpbb_container->set('notification_manager', new phpbb_mock_notification_manager());
+
phpbb_delete_user_pms($delete_user);
$sql = 'SELECT msg_id
diff --git a/tests/privmsgs/fixtures/delete_user_pms.xml b/tests/privmsgs/fixtures/delete_user_pms.xml
index 9a86501b7a..5f705c9fd2 100644
--- a/tests/privmsgs/fixtures/delete_user_pms.xml
+++ b/tests/privmsgs/fixtures/delete_user_pms.xml
@@ -8,8 +8,6 @@
<column>user_unread_privmsg</column>
<column>user_permissions</column>
<column>user_sig</column>
- <column>user_occ</column>
- <column>user_interests</column>
<row>
<value>2</value>
<value>sender</value>
@@ -18,8 +16,6 @@
<value>0</value>
<value></value>
<value></value>
- <value></value>
- <value></value>
</row>
<row>
<value>3</value>
@@ -29,8 +25,6 @@
<value>0</value>
<value></value>
<value></value>
- <value></value>
- <value></value>
</row>
<row>
<value>4</value>
@@ -40,8 +34,6 @@
<value>2</value>
<value></value>
<value></value>
- <value></value>
- <value></value>
</row>
<row>
<value>5</value>
@@ -51,8 +43,6 @@
<value>0</value>
<value></value>
<value></value>
- <value></value>
- <value></value>
</row>
</table>
<table name="phpbb_privmsgs">
diff --git a/tests/profile/custom_string_test.php b/tests/profile/custom_string_test.php
new file mode 100644
index 0000000000..bd0b20573c
--- /dev/null
+++ b/tests/profile/custom_string_test.php
@@ -0,0 +1,116 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2014 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+require_once dirname(__FILE__) . '/../../phpBB/includes/utf/utf_tools.php';
+
+class phpbb_profile_custom_string_test extends phpbb_database_test_case
+{
+ public function getDataSet()
+ {
+ return $this->createXMLDataSet(dirname(__FILE__) . '/fixtures/profile_fields.xml');
+ }
+
+ static public function string_fields()
+ {
+ return array(
+ // note, there is an offset of 1 between option_id (0-indexed)
+ // in the database and values (1-indexed) to avoid problems with
+ // transmitting 0 in an HTML form
+ // required, value, validation, expected, description
+ array(
+ 1,
+ 'H3110',
+ '[0-9]+',
+ 'FIELD_INVALID_CHARS_NUMBERS_ONLY-field',
+ 'Required field should reject characters in a numbers-only field',
+ ),
+ array(
+ 1,
+ 'This string is too long',
+ '.*',
+ 'FIELD_TOO_LONG-10-field',
+ 'Required field should reject a field too long',
+ ),
+ array(
+ 0,
+ '&lt;&gt;&quot;&amp;%&amp;&gt;&lt;&gt;',
+ '.*',
+ false,
+ 'Optional field should accept html entities',
+ ),
+ array(
+ 1,
+ 'ö ä ü ß',
+ '.*',
+ false,
+ 'Required field should accept UTF-8 string',
+ ),
+ array(
+ 1,
+ 'This ö ä string has to b',
+ '.*',
+ 'FIELD_TOO_LONG-10-field',
+ 'Required field should reject an UTF-8 string which is too long',
+ ),
+ array(
+ 1,
+ 'ö äö äö ä',
+ '[\w]+',
+ 'FIELD_INVALID_CHARS_ALPHA_ONLY-field',
+ 'Required field should reject UTF-8 in alpha only field',
+ ),
+ array(
+ 1,
+ 'Hello',
+ '[\w]+',
+ false,
+ 'Required field should accept a characters only field',
+ ),
+ );
+ }
+
+ /**
+ * @dataProvider string_fields
+ */
+ public function test_string_validate($field_required, $field_value, $field_validation, $expected, $description)
+ {
+ $db = $this->new_dbal();
+
+ $field_data = array(
+ 'field_id' => 1,
+ 'lang_id' => 1,
+ 'lang_name' => 'field',
+ 'field_novalue' => 1,
+ 'field_required' => $field_required,
+ 'field_maxlen' => 10,
+ 'field_validation' => $field_validation,
+ );
+ $user = $this->getMock('\phpbb\user');
+ $user->expects($this->any())
+ ->method('lang')
+ ->will($this->returnCallback(array($this, 'return_callback_implode')));
+
+ $request = $this->getMock('\phpbb\request\request');
+ $template = $this->getMock('\phpbb\template\template');
+
+ $cp = new \phpbb\profilefields\type\type_string(
+ $request,
+ $template,
+ $user
+ );
+ $result = $cp->validate_profile_field($field_value, $field_data);
+
+ $this->assertEquals($expected, $result, $description);
+ }
+
+ public function return_callback_implode()
+ {
+ return implode('-', func_get_args());
+ }
+}
diff --git a/tests/profile/custom_test.php b/tests/profile/custom_test.php
index 1f33b45ba9..e68f1f7c4b 100644
--- a/tests/profile/custom_test.php
+++ b/tests/profile/custom_test.php
@@ -7,49 +7,65 @@
*
*/
-require_once dirname(__FILE__) . '/../../phpBB/includes/functions_profile_fields.php';
-
class phpbb_profile_custom_test extends phpbb_database_test_case
{
public function getDataSet()
{
- return $this->createXMLDataSet(dirname(__FILE__).'/fixtures/profile_fields.xml');
+ return $this->createXMLDataSet(dirname(__FILE__) . '/fixtures/profile_fields.xml');
}
- static public function dropdownFields()
+ static public function dropdown_fields()
{
return array(
// note, there is an offset of 1 between option_id (0-indexed)
// in the database and values (1-indexed) to avoid problems with
// transmitting 0 in an HTML form
// required, value, expected
- array(1, '0', 'FIELD_INVALID_VALUE', 'Required field should throw error for out-of-range value'),
- array(1, '1', 'FIELD_REQUIRED', 'Required field should throw error for default value'),
- array(1, '2', false, 'Required field should accept non-default value'),
- array(0, '0', 'FIELD_INVALID_VALUE', 'Optional field should throw error for out-of-range value'),
- array(0, '1', false, 'Optional field should accept default value'),
- array(0, '2', false, 'Optional field should accept non-default value'),
+ array(1, '0', 'FIELD_INVALID_VALUE-field', 'Required field should throw error for out-of-range value'),
+ array(1, '1', 'FIELD_REQUIRED-field', 'Required field should throw error for default value'),
+ array(1, '2', false, 'Required field should accept non-default value'),
+ array(0, '0', 'FIELD_INVALID_VALUE-field', 'Optional field should throw error for out-of-range value'),
+ array(0, '1', false, 'Optional field should accept default value'),
+ array(0, '2', false, 'Optional field should accept non-default value'),
);
}
/**
- * @dataProvider dropdownFields
+ * @dataProvider dropdown_fields
*/
public function test_dropdown_validate($field_required, $field_value, $expected, $description)
{
- global $db;
+ global $db, $table_prefix;
$db = $this->new_dbal();
$field_data = array(
'field_id' => 1,
'lang_id' => 1,
+ 'lang_name' => 'field',
'field_novalue' => 1,
'field_required' => $field_required,
);
+ $user = $this->getMock('\phpbb\user');
+ $user->expects($this->any())
+ ->method('lang')
+ ->will($this->returnCallback(array($this, 'return_callback_implode')));
+
+ $request = $this->getMock('\phpbb\request\request');
+ $template = $this->getMock('\phpbb\template\template');
- $cp = new custom_profile;
- $result = $cp->validate_profile_field(FIELD_DROPDOWN, $field_value, $field_data);
+ $cp = new \phpbb\profilefields\type\type_dropdown(
+ new \phpbb\profilefields\lang_helper($db, $table_prefix . 'profile_fields_lang'),
+ $request,
+ $template,
+ $user
+ );
+ $result = $cp->validate_profile_field($field_value, $field_data);
$this->assertEquals($expected, $result, $description);
}
+
+ public function return_callback_implode()
+ {
+ return implode('-', func_get_args());
+ }
}
diff --git a/tests/profile/fixtures/profile_fields.xml b/tests/profile/fixtures/profile_fields.xml
index 0b2929f625..e0c260bbf5 100644
--- a/tests/profile/fixtures/profile_fields.xml
+++ b/tests/profile/fixtures/profile_fields.xml
@@ -10,21 +10,21 @@
<value>1</value>
<value>1</value>
<value>0</value>
- <value>5</value>
+ <value>profilefields.type.dropdown</value>
<value>Default Option</value>
</row>
<row>
<value>1</value>
<value>1</value>
<value>1</value>
- <value>5</value>
+ <value>profilefields.type.dropdown</value>
<value>First Alternative</value>
</row>
<row>
<value>1</value>
<value>1</value>
<value>2</value>
- <value>5</value>
+ <value>profilefields.type.dropdown</value>
<value>Third Alternative</value>
</row>
</table>
diff --git a/tests/profile/get_profile_value_test.php b/tests/profile/get_profile_value_test.php
index a5f37a85ce..e867455a03 100644
--- a/tests/profile/get_profile_value_test.php
+++ b/tests/profile/get_profile_value_test.php
@@ -7,21 +7,19 @@
*
*/
-require_once dirname(__FILE__) . '/../../phpBB/includes/functions_profile_fields.php';
-
class phpbb_profile_get_profile_value_test extends phpbb_test_case
{
static public function get_profile_value_int_data()
{
return array(
- array(FIELD_INT, '10', true, 10),
- array(FIELD_INT, '0', true, 0),
- array(FIELD_INT, '', true, 0),
- array(FIELD_INT, null, true, 0),
- array(FIELD_INT, '10', false, 10),
- array(FIELD_INT, '0', false, 0),
- array(FIELD_INT, '', false, null),
- array(FIELD_INT, null, false, null),
+ array('\phpbb\profilefields\type\type_int', '10', true, 10),
+ array('\phpbb\profilefields\type\type_int', '0', true, 0),
+ array('\phpbb\profilefields\type\type_int', '', true, 0),
+ array('\phpbb\profilefields\type\type_int', null, true, 0),
+ array('\phpbb\profilefields\type\type_int', '10', false, 10),
+ array('\phpbb\profilefields\type\type_int', '0', false, 0),
+ array('\phpbb\profilefields\type\type_int', '', false, null),
+ array('\phpbb\profilefields\type\type_int', null, false, null),
);
}
@@ -30,13 +28,15 @@ class phpbb_profile_get_profile_value_test extends phpbb_test_case
*/
public function test_get_profile_value_int($type, $value, $show_novalue, $expected)
{
- $cp = new custom_profile;
- $this->assertSame($expected, $cp->get_profile_value(array(
- 'value' => $value,
- 'data' => array(
- 'field_type' => $type,
- 'field_show_novalue' => $show_novalue,
- ),
+ $cp = new $type(
+ $this->getMock('\phpbb\request\request'),
+ $this->getMock('\phpbb\template\template'),
+ $this->getMock('\phpbb\user')
+ );
+
+ $this->assertSame($expected, $cp->get_profile_value($value, array(
+ 'field_type' => $type,
+ 'field_show_novalue' => $show_novalue,
)));
}
}
diff --git a/tests/regex/password_complexity_test.php b/tests/regex/password_complexity_test.php
index 07453555ee..e2aefdaac8 100644
--- a/tests/regex/password_complexity_test.php
+++ b/tests/regex/password_complexity_test.php
@@ -7,6 +7,7 @@
*
*/
+require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php';
require_once dirname(__FILE__) . '/../../phpBB/includes/functions_user.php';
class phpbb_password_complexity_test extends phpbb_test_case
diff --git a/tests/request/deactivated_super_global_test.php b/tests/request/deactivated_super_global_test.php
new file mode 100644
index 0000000000..d28bd87eec
--- /dev/null
+++ b/tests/request/deactivated_super_global_test.php
@@ -0,0 +1,22 @@
+<?php
+/**
+*
+* @package testing
+* @version $Id$
+* @copyright (c) 2009 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+class phpbb_deactivated_super_global_test extends phpbb_test_case
+{
+ /**
+ * Checks that on write access the correct error is thrown
+ */
+ public function test_write_triggers_error()
+ {
+ $this->setExpectedTriggerError(E_USER_ERROR);
+ $obj = new \phpbb\request\deactivated_super_global($this->getMock('\phpbb\request\request_interface'), 'obj', \phpbb\request\request_interface::POST);
+ $obj->offsetSet(0, 0);
+ }
+}
diff --git a/tests/request/request_test.php b/tests/request/request_test.php
new file mode 100644
index 0000000000..a25792e051
--- /dev/null
+++ b/tests/request/request_test.php
@@ -0,0 +1,168 @@
+<?php
+/**
+*
+* @package testing
+* @version $Id$
+* @copyright (c) 2009 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+class phpbb_request_test extends phpbb_test_case
+{
+ private $type_cast_helper;
+ private $request;
+
+ protected function setUp()
+ {
+ // populate super globals
+ $_POST['test'] = 1;
+ $_GET['test'] = 2;
+ $_COOKIE['test'] = 3;
+ $_REQUEST['test'] = 3;
+ $_GET['unset'] = '';
+ $_FILES['test'] = array(
+ 'name' => 'file',
+ 'tmp_name' => 'tmp',
+ 'size' => 256,
+ 'type' => 'application/octet-stream',
+ 'error' => UPLOAD_ERR_OK,
+ );
+
+ $_SERVER['HTTP_HOST'] = 'example.com';
+ $_SERVER['HTTP_ACCEPT'] = 'application/json';
+ $_SERVER['HTTP_SOMEVAR'] = '<value>';
+
+ $this->type_cast_helper = $this->getMock('\phpbb\request\type_cast_helper_interface');
+ $this->request = new \phpbb\request\request($this->type_cast_helper);
+ }
+
+ public function test_toggle_super_globals()
+ {
+ $this->assertTrue($this->request->super_globals_disabled(), 'Superglobals were not disabled');
+
+ $this->request->enable_super_globals();
+
+ $this->assertFalse($this->request->super_globals_disabled(), 'Superglobals were not enabled');
+
+ $this->assertEquals(1, $_POST['test'], 'Checking $_POST after enable_super_globals');
+ $this->assertEquals(2, $_GET['test'], 'Checking $_GET after enable_super_globals');
+ $this->assertEquals(3, $_COOKIE['test'], 'Checking $_COOKIE after enable_super_globals');
+ $this->assertEquals(3, $_REQUEST['test'], 'Checking $_REQUEST after enable_super_globals');
+ $this->assertEquals(256, $_FILES['test']['size']);
+
+ $_POST['x'] = 2;
+ $this->assertEquals($_POST, $GLOBALS['_POST'], 'Checking whether $_POST can still be accessed via $GLOBALS[\'_POST\']');
+ }
+
+ public function test_server()
+ {
+ $this->assertEquals('example.com', $this->request->server('HTTP_HOST'));
+ }
+
+ public function test_server_escaping()
+ {
+ $this->type_cast_helper
+ ->expects($this->once())
+ ->method('recursive_set_var')
+ ->with(
+ $this->anything(),
+ '',
+ true
+ );
+
+ $this->request->server('HTTP_SOMEVAR');
+ }
+
+ public function test_header()
+ {
+ $this->assertEquals('application/json', $this->request->header('Accept'));
+ }
+
+ public function test_header_escaping()
+ {
+ $this->type_cast_helper
+ ->expects($this->once())
+ ->method('recursive_set_var')
+ ->with(
+ $this->anything(),
+ '',
+ true
+ );
+
+ $this->request->header('SOMEVAR');
+ }
+
+ public function test_file()
+ {
+ $file = $this->request->file('test');
+ $this->assertEquals('file', $file['name']);
+ $this->assertEquals('tmp', $file['tmp_name']);
+ $this->assertEquals(256, $file['size']);
+ $this->assertEquals('application/octet-stream', $file['type']);
+ $this->assertEquals(UPLOAD_ERR_OK, $file['error']);
+ }
+
+ public function test_file_not_exists()
+ {
+ $file = $this->request->file('404');
+ $this->assertTrue(is_array($file));
+ $this->assertTrue(empty($file));
+ }
+
+ /**
+ * Checks that directly accessing $_POST will trigger
+ * an error.
+ */
+ public function test_disable_post_super_global()
+ {
+ $this->setExpectedTriggerError(E_USER_ERROR);
+ $_POST['test'] = 3;
+ }
+
+ public function test_is_set_post()
+ {
+ $this->assertTrue($this->request->is_set_post('test'));
+ $this->assertFalse($this->request->is_set_post('unset'));
+ }
+
+ public function test_is_ajax_without_ajax()
+ {
+ $this->assertFalse($this->request->is_ajax());
+ }
+
+ public function test_is_ajax_with_ajax()
+ {
+ $this->request->enable_super_globals();
+ $_SERVER['HTTP_X_REQUESTED_WITH'] = 'XMLHttpRequest';
+ $this->request = new \phpbb\request\request($this->type_cast_helper);
+
+ $this->assertTrue($this->request->is_ajax());
+ }
+
+ public function test_is_secure()
+ {
+ $this->assertFalse($this->request->is_secure());
+
+ $this->request->enable_super_globals();
+ $_SERVER['HTTPS'] = 'on';
+ $this->request = new \phpbb\request\request($this->type_cast_helper);
+
+ $this->assertTrue($this->request->is_secure());
+ }
+
+ public function test_variable_names()
+ {
+ $expected = array('test', 'unset');
+ $result = $this->request->variable_names();
+ $this->assertEquals($expected, $result);
+ }
+
+ /**
+ * Makes sure super globals work properly after these tests
+ */
+ protected function tearDown()
+ {
+ $this->request->enable_super_globals();
+ }
+}
diff --git a/tests/request/request_var_test.php b/tests/request/request_var_test.php
index 0c07fe11a3..d126fe1e8b 100644
--- a/tests/request/request_var_test.php
+++ b/tests/request/request_var_test.php
@@ -10,9 +10,18 @@
require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php';
require_once dirname(__FILE__) . '/../../phpBB/includes/utf/utf_tools.php';
-class phpbb_request_request_var_test extends phpbb_test_case
+class phpbb_request_var_test extends phpbb_test_case
{
/**
+ * Makes sure request_var has its standard behaviour.
+ */
+ protected function setUp()
+ {
+ parent::setUp();
+ request_var(false, false, false, false, false);
+ }
+
+ /**
* @dataProvider request_variables
*/
public function test_post($variable_value, $default, $multibyte, $expected)
@@ -73,7 +82,48 @@ class phpbb_request_request_var_test extends phpbb_test_case
unset($_GET[$var], $_POST[$var], $_REQUEST[$var], $_COOKIE[$var]);
}
- static public function request_variables()
+ /**
+ * @dataProvider deep_access
+ * Only possible with 3.1.x (later)
+ */
+ public function test_deep_multi_dim_array_access($path, $default, $expected)
+ {
+ $this->unset_variables('var');
+
+ // cannot set $_REQUEST directly because in \phpbb\request\request implementation
+ // $_REQUEST = $_POST + $_GET
+ $_POST['var'] = array(
+ 0 => array(
+ 'b' => array(
+ true => array(
+ 5 => 'c',
+ 6 => 'd',
+ ),
+ ),
+ ),
+ 2 => array(
+ 3 => array(
+ false => 5,
+ ),
+ ),
+ );
+
+ $result = request_var($path, $default);
+ $this->assertEquals($expected, $result, 'Testing deep access to multidimensional input arrays: ' . $path);
+ }
+
+ public function deep_access()
+ {
+ return array(
+ // array(path, default, expected result)
+ array(array('var', 0, 'b', true, 5), '', 'c'),
+ array(array('var', 0, 'b', true, 6), '', 'd'),
+ array(array('var', 2, 3, false), 0, 5),
+ array(array('var', 0, 'b', true), array(0 => ''), array(5 => 'c', 6 => 'd')),
+ );
+ }
+
+ public function request_variables()
{
return array(
// strings
@@ -173,6 +223,50 @@ class phpbb_request_request_var_test extends phpbb_test_case
'abc' => array()
)
),
+ array(
+ // input:
+ array(
+ 0 => array(0 => array(3, '4', 'ab'), 1 => array()),
+ 1 => array(array(3, 4)),
+ ),
+ // default:
+ array(0 => array(0 => array(0))),
+ false,
+ // expected:
+ array(
+ 0 => array(0 => array(3, 4, 0), 1 => array()),
+ 1 => array(array(3, 4))
+ )
+ ),
+ array(
+ // input:
+ array(
+ 'ü' => array(array('c' => 'd')),
+ 'ä' => array(4 => array('a' => 2, 'ö' => 3)),
+ ),
+ // default:
+ array('' => array(0 => array('' => 0))),
+ false,
+ // expected:
+ array(
+ '??' => array(4 => array('a' => 2, '??' => 3)),
+ )
+ ),
+ array(
+ // input:
+ array(
+ 'ü' => array(array('c' => 'd')),
+ 'ä' => array(4 => array('a' => 2, 'ö' => 3)),
+ ),
+ // default:
+ array('' => array(0 => array('' => 0))),
+ true,
+ // expected:
+ array(
+ 'ü' => array(array('c' => 0)),
+ 'ä' => array(4 => array('a' => 2, 'ö' => 3)),
+ )
+ ),
);
}
diff --git a/tests/request/type_cast_helper_test.php b/tests/request/type_cast_helper_test.php
new file mode 100644
index 0000000000..98f4538c08
--- /dev/null
+++ b/tests/request/type_cast_helper_test.php
@@ -0,0 +1,71 @@
+<?php
+/**
+*
+* @package testing
+* @version $Id$
+* @copyright (c) 2009 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+require_once dirname(__FILE__) . '/../../phpBB/includes/utf/utf_tools.php';
+
+class phpbb_type_cast_helper_test extends phpbb_test_case
+{
+ private $type_cast_helper;
+
+ protected function setUp()
+ {
+ $this->type_cast_helper = new \phpbb\request\type_cast_helper();
+ }
+
+ public function test_addslashes_recursively()
+ {
+ $data = array('some"string' => array('that"' => 'really"', 'needs"' => '"escaping'));
+ $expected = array('some\\"string' => array('that\\"' => 'really\\"', 'needs\\"' => '\\"escaping'));
+
+ $this->type_cast_helper->addslashes_recursively($data);
+
+ $this->assertEquals($expected, $data);
+ }
+
+ public function test_simple_recursive_set_var()
+ {
+ $data = 'eviL<3';
+ $expected = 'eviL&lt;3';
+
+ $this->type_cast_helper->recursive_set_var($data, '', true);
+
+ $this->assertEquals($expected, $data);
+ }
+
+ public function test_nested_recursive_set_var()
+ {
+ $data = array('eviL<3');
+ $expected = array('eviL&lt;3');
+
+ $this->type_cast_helper->recursive_set_var($data, array(0 => ''), true);
+
+ $this->assertEquals($expected, $data);
+ }
+
+ public function test_simple_untrimmed_recursive_set_var()
+ {
+ $data = " eviL<3\t\t";
+ $expected = " eviL&lt;3\t\t";
+
+ $this->type_cast_helper->recursive_set_var($data, '', true, false);
+
+ $this->assertEquals($expected, $data);
+ }
+
+ public function test_nested_untrimmed_recursive_set_var()
+ {
+ $data = array(" eviL<3\t\t");
+ $expected = array(" eviL&lt;3\t\t");
+
+ $this->type_cast_helper->recursive_set_var($data, array(0 => ''), true, false);
+
+ $this->assertEquals($expected, $data);
+ }
+}
diff --git a/tests/search/common_test_case.php b/tests/search/common_test_case.php
new file mode 100644
index 0000000000..029637b00b
--- /dev/null
+++ b/tests/search/common_test_case.php
@@ -0,0 +1,204 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+require_once dirname(__FILE__) . '/../test_framework/phpbb_search_test_case.php';
+
+abstract class phpbb_search_common_test_case extends phpbb_search_test_case
+{
+ public function keywords()
+ {
+ return array(
+ // keywords
+ // terms
+ // ok
+ // split words
+ // common words
+ array(
+ 'fooo',
+ 'all',
+ true,
+ array('fooo'),
+ array(),
+ ),
+ array(
+ 'fooo baar',
+ 'all',
+ true,
+ array('fooo', 'baar'),
+ array(),
+ ),
+ // leading, trailing and multiple spaces
+ array(
+ ' fooo baar ',
+ 'all',
+ true,
+ array('fooo', 'baar'),
+ array(),
+ ),
+ // words too short
+ array(
+ 'f',
+ 'all',
+ false,
+ null,
+ // short words count as "common" words
+ array('f'),
+ ),
+ array(
+ 'f o o',
+ 'all',
+ false,
+ null,
+ array('f', 'o', 'o'),
+ ),
+ array(
+ 'f -o -o',
+ 'all',
+ false,
+ null,
+ array('f', '-o', '-o'),
+ ),
+ array(
+ 'fooo -baar',
+ 'all',
+ true,
+ array('-baar', 'fooo'),
+ array(),
+ ),
+ // all negative
+ array(
+ '-fooo',
+ 'all',
+ true,
+ array('-fooo'),
+ array(),
+ ),
+ array(
+ '-fooo -baar',
+ 'all',
+ true,
+ array('-fooo', '-baar'),
+ array(),
+ ),
+ array(
+ 'fooo -fooo',
+ 'all',
+ true,
+ array('fooo', '-fooo'),
+ array(),
+ ),
+ array(
+ 'fooo fooo-',
+ 'all',
+ true,
+ array('fooo', 'fooo'),
+ array(),
+ ),
+ array(
+ '-fooo fooo',
+ 'all',
+ true,
+ array('-fooo', 'fooo'),
+ array(),
+ ),
+ array(
+ 'fooo- fooo',
+ 'all',
+ true,
+ array('fooo', 'fooo'),
+ array(),
+ ),
+ array(
+ 'fooo-baar fooo',
+ 'all',
+ true,
+ array('fooo', 'baar', 'fooo'),
+ array(),
+ ),
+ array(
+ 'fooo-baar -fooo',
+ 'all',
+ true,
+ array('fooo', 'baar', '-fooo'),
+ array(),
+ ),
+ array(
+ 'fooo-baar fooo-',
+ 'all',
+ true,
+ array('fooo', 'baar', 'fooo'),
+ array(),
+ ),
+ array(
+ 'fooo-baar baar',
+ 'all',
+ true,
+ array('fooo', 'baar', 'baar'),
+ array(),
+ ),
+ array(
+ 'fooo-baar -baar',
+ 'all',
+ true,
+ array('fooo', 'baar', '-baar'),
+ array(),
+ ),
+ array(
+ 'fooo-baar baar-',
+ 'all',
+ true,
+ array('fooo', 'baar', 'baar'),
+ array(),
+ ),
+ array(
+ 'fooo-baar fooo-baar',
+ 'all',
+ true,
+ array('fooo', 'baar', 'fooo', 'baar'),
+ array(),
+ ),
+ array(
+ 'fooo-baar -fooo-baar',
+ 'all',
+ true,
+ array('fooo', 'baar', '-fooo', 'baar'),
+ array(),
+ ),
+ array(
+ 'fooo-baar fooo-baar-',
+ 'all',
+ true,
+ array('fooo', 'baar', 'fooo', 'baar'),
+ array(),
+ ),
+ array(
+ 'fooo-baar-baaz',
+ 'all',
+ true,
+ array('fooo', 'baar', 'baaz'),
+ array(),
+ ),
+ );
+ }
+
+ /**
+ * @dataProvider keywords
+ */
+ public function test_split_keywords($keywords, $terms, $ok, $split_words, $common)
+ {
+ $rv = $this->search->split_keywords($keywords, $terms);
+ $this->assertEquals($ok, $rv);
+ if ($ok)
+ {
+ // only check criteria if the search is going to be performed
+ $this->assert_array_content_equals($split_words, $this->search->get_split_words());
+ }
+ $this->assert_array_content_equals($common, $this->search->get_common_words());
+ }
+}
diff --git a/tests/search/fixtures/posts.xml b/tests/search/fixtures/posts.xml
new file mode 100644
index 0000000000..7b249ee303
--- /dev/null
+++ b/tests/search/fixtures/posts.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<dataset>
+ <table name="phpbb_posts">
+ <column>post_username</column>
+ <column>post_subject</column>
+ <column>post_text</column>
+ <row>
+ <value>foo</value>
+ <value>foo</value>
+ <value>foo</value>
+ </row>
+ <row>
+ <value>bar</value>
+ <value>bar</value>
+ <value>bar</value>
+ </row>
+ <row>
+ <value>commonword</value>
+ <value>commonword</value>
+ <value>commonword</value>
+ </row>
+ </table>
+ <table name="phpbb_search_wordlist">
+ <column>word_id</column>
+ <column>word_text</column>
+ <column>word_common</column>
+ <row>
+ <value>1</value>
+ <value>foo</value>
+ <value>0</value>
+ </row>
+ <row>
+ <value>2</value>
+ <value>bar</value>
+ <value>0</value>
+ </row>
+ <row>
+ <value>3</value>
+ <value>commonword</value>
+ <value>1</value>
+ </row>
+ </table>
+</dataset>
diff --git a/tests/search/mysql_test.php b/tests/search/mysql_test.php
new file mode 100644
index 0000000000..c08484c78d
--- /dev/null
+++ b/tests/search/mysql_test.php
@@ -0,0 +1,40 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+require_once dirname(__FILE__) . '/common_test_case.php';
+
+class phpbb_search_mysql_test extends phpbb_search_common_test_case
+{
+ protected $db;
+ protected $search;
+
+ public function getDataSet()
+ {
+ return $this->createXMLDataSet(dirname(__FILE__) . '/../fixtures/empty.xml');
+ }
+
+ protected function setUp()
+ {
+ global $phpbb_root_path, $phpEx, $config, $user, $cache;
+
+ parent::setUp();
+
+ // dbal uses cache
+ $cache = new phpbb_mock_cache();
+
+ // set config values
+ $config['fulltext_mysql_min_word_len'] = 4;
+ $config['fulltext_mysql_max_word_len'] = 254;
+
+ $this->db = $this->new_dbal();
+ $error = null;
+ $class = self::get_search_wrapper('\phpbb\search\fulltext_mysql');
+ $this->search = new $class($error, $phpbb_root_path, $phpEx, null, $config, $this->db, $user);
+ }
+}
diff --git a/tests/search/native_test.php b/tests/search/native_test.php
new file mode 100644
index 0000000000..e860a4f89a
--- /dev/null
+++ b/tests/search/native_test.php
@@ -0,0 +1,207 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+require_once dirname(__FILE__) . '/../test_framework/phpbb_search_test_case.php';
+
+class phpbb_search_native_test extends phpbb_search_test_case
+{
+ protected $db;
+ protected $search;
+
+ public function getDataSet()
+ {
+ return $this->createXMLDataSet(dirname(__FILE__) . '/fixtures/posts.xml');
+ }
+
+ protected function setUp()
+ {
+ global $phpbb_root_path, $phpEx, $config, $user, $cache;
+
+ parent::setUp();
+
+ // dbal uses cache
+ $cache = new phpbb_mock_cache();
+
+ $this->db = $this->new_dbal();
+ $error = null;
+ $class = self::get_search_wrapper('\phpbb\search\fulltext_native');
+ $this->search = new $class($error, $phpbb_root_path, $phpEx, null, $config, $this->db, $user);
+ }
+
+ public function keywords()
+ {
+ return array(
+ // keywords
+ // terms
+ // ok
+ // must contain ids
+ // must not contain ids
+ // common words
+ array(
+ 'foo',
+ 'all',
+ true,
+ array(1),
+ array(),
+ array(),
+ ),
+ array(
+ 'foo bar',
+ 'all',
+ true,
+ array(1, 2),
+ array(),
+ array(),
+ ),
+ // leading, trailing and multiple spaces
+ array(
+ ' foo bar ',
+ 'all',
+ true,
+ array(1, 2),
+ array(),
+ array(),
+ ),
+ // words too short
+ array(
+ 'f',
+ 'all',
+ false,
+ null,
+ null,
+ // short words count as "common" words
+ array('f'),
+ ),
+ array(
+ 'f o o',
+ 'all',
+ false,
+ null,
+ null,
+ array('f', 'o', 'o'),
+ ),
+ array(
+ 'f -o -o',
+ 'all',
+ false,
+ null,
+ null,
+ array('f', 'o', 'o'),
+ ),
+ array(
+ 'foo -bar',
+ 'all',
+ true,
+ array(1),
+ array(2),
+ array(),
+ ),
+ // all negative
+ array(
+ '-foo',
+ 'all',
+ true,
+ array(),
+ array(1),
+ array(),
+ ),
+ array(
+ '-foo -bar',
+ 'all',
+ true,
+ array(),
+ array(1, 2),
+ array(),
+ ),
+ array(
+ 'foo -foo',
+ 'all',
+ true,
+ array(1),
+ array(1),
+ array(),
+ ),
+ array(
+ '-foo foo',
+ 'all',
+ true,
+ array(1),
+ array(1),
+ array(),
+ ),
+ // some creative edge cases
+ array(
+ 'foo foo-',
+ 'all',
+ true,
+ array(1),
+ array(),
+ array(),
+ ),
+ array(
+ 'foo- foo',
+ 'all',
+ true,
+ array(1),
+ array(),
+ array(),
+ ),
+ array(
+ 'foo-bar',
+ 'all',
+ true,
+ array(1, 2),
+ array(),
+ array(),
+ ),
+ array(
+ 'foo-bar-foo',
+ 'all',
+ true,
+ array(1, 2),
+ array(),
+ array(),
+ ),
+ // all common
+ array(
+ 'commonword',
+ 'all',
+ false,
+ null,
+ null,
+ array('commonword'),
+ ),
+ // some common
+ array(
+ 'commonword foo',
+ 'all',
+ true,
+ array(1),
+ array(),
+ array('commonword'),
+ ),
+ );
+ }
+
+ /**
+ * @dataProvider keywords
+ */
+ public function test_split_keywords($keywords, $terms, $ok, $must_contain, $must_not_contain, $common)
+ {
+ $rv = $this->search->split_keywords($keywords, $terms);
+ $this->assertEquals($ok, $rv);
+ if ($ok)
+ {
+ // only check criteria if the search is going to be performed
+ $this->assert_array_content_equals($must_contain, $this->search->get_must_contain_ids());
+ $this->assert_array_content_equals($must_not_contain, $this->search->get_must_not_contain_ids());
+ }
+ $this->assert_array_content_equals($common, $this->search->get_common_words());
+ }
+}
diff --git a/tests/search/postgres_test.php b/tests/search/postgres_test.php
new file mode 100644
index 0000000000..a59f5abc7d
--- /dev/null
+++ b/tests/search/postgres_test.php
@@ -0,0 +1,40 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+require_once dirname(__FILE__) . '/common_test_case.php';
+
+class phpbb_search_postgres_test extends phpbb_search_common_test_case
+{
+ protected $db;
+ protected $search;
+
+ public function getDataSet()
+ {
+ return $this->createXMLDataSet(dirname(__FILE__) . '/../fixtures/empty.xml');
+ }
+
+ protected function setUp()
+ {
+ global $phpbb_root_path, $phpEx, $config, $user, $cache;
+
+ parent::setUp();
+
+ // dbal uses cache
+ $cache = new phpbb_mock_cache();
+
+ // set config values
+ $config['fulltext_postgres_min_word_len'] = 4;
+ $config['fulltext_postgres_max_word_len'] = 254;
+
+ $this->db = $this->new_dbal();
+ $error = null;
+ $class = self::get_search_wrapper('\phpbb\search\fulltext_postgres');
+ $this->search = new $class($error, $phpbb_root_path, $phpEx, null, $config, $this->db, $user);
+ }
+}
diff --git a/tests/security/base.php b/tests/security/base.php
index 2658798237..3ab2d1cfec 100644
--- a/tests/security/base.php
+++ b/tests/security/base.php
@@ -14,20 +14,20 @@ abstract class phpbb_security_test_base extends phpbb_test_case
*/
protected function setUp()
{
- global $user, $phpbb_root_path;
+ global $user, $phpbb_root_path, $phpEx, $request, $symfony_request, $phpbb_filesystem;
// Put this into a global function being run by every test to init a proper user session
- $_SERVER['HTTP_HOST'] = 'localhost';
- $_SERVER['SERVER_NAME'] = 'localhost';
- $_SERVER['SERVER_ADDR'] = '127.0.0.1';
- $_SERVER['SERVER_PORT'] = 80;
- $_SERVER['REMOTE_ADDR'] = '127.0.0.1';
- $_SERVER['QUERY_STRING'] = '';
- $_SERVER['REQUEST_URI'] = '/tests/';
- $_SERVER['SCRIPT_NAME'] = '/tests/index.php';
- $_SERVER['PHP_SELF'] = '/tests/index.php';
- $_SERVER['HTTP_USER_AGENT'] = 'Mozilla/5.0 (Windows; U; Windows NT 6.0; de; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14';
- $_SERVER['HTTP_ACCEPT_LANGUAGE'] = 'de-de,de;q=0.8,en-us;q=0.5,en;q=0.3';
+ $server['HTTP_HOST'] = 'localhost';
+ $server['SERVER_NAME'] = 'localhost';
+ $server['SERVER_ADDR'] = '127.0.0.1';
+ $server['SERVER_PORT'] = 80;
+ $server['REMOTE_ADDR'] = '127.0.0.1';
+ $server['QUERY_STRING'] = '';
+ $server['REQUEST_URI'] = '/tests/';
+ $server['SCRIPT_NAME'] = '/tests/index.php';
+ $server['PHP_SELF'] = '/tests/index.php';
+ $server['HTTP_USER_AGENT'] = 'Mozilla/5.0 (Windows; U; Windows NT 6.0; de; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14';
+ $server['HTTP_ACCEPT_LANGUAGE'] = 'de-de,de;q=0.8,en-us;q=0.5,en;q=0.3';
/*
[HTTP_ACCEPT_ENCODING] => gzip,deflate
@@ -36,14 +36,32 @@ abstract class phpbb_security_test_base extends phpbb_test_case
[SCRIPT_FILENAME] => /var/www/tests/index.php
*/
+ $request = new phpbb_mock_request(array(), array(), array(), $server);
+ $symfony_request = $this->getMock("\phpbb\symfony_request", array(), array(
+ $request,
+ ));
+ $symfony_request->expects($this->any())
+ ->method('getScriptName')
+ ->will($this->returnValue($server['SCRIPT_NAME']));
+ $symfony_request->expects($this->any())
+ ->method('getQueryString')
+ ->will($this->returnValue($server['QUERY_STRING']));
+ $symfony_request->expects($this->any())
+ ->method('getBasePath')
+ ->will($this->returnValue($server['REQUEST_URI']));
+ $symfony_request->expects($this->any())
+ ->method('getPathInfo')
+ ->will($this->returnValue('/'));
+ $phpbb_filesystem = new \phpbb\filesystem($symfony_request, $phpbb_root_path, $phpEx);
+
// Set no user and trick a bit to circumvent errors
- $user = new user();
+ $user = new \phpbb\user();
$user->lang = true;
- $user->browser = (!empty($_SERVER['HTTP_USER_AGENT'])) ? htmlspecialchars((string) $_SERVER['HTTP_USER_AGENT']) : '';
- $user->referer = (!empty($_SERVER['HTTP_REFERER'])) ? htmlspecialchars((string) $_SERVER['HTTP_REFERER']) : '';
- $user->forwarded_for = (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) ? (string) $_SERVER['HTTP_X_FORWARDED_FOR'] : '';
- $user->host = (!empty($_SERVER['HTTP_HOST'])) ? (string) strtolower($_SERVER['HTTP_HOST']) : ((!empty($_SERVER['SERVER_NAME'])) ? $_SERVER['SERVER_NAME'] : getenv('SERVER_NAME'));
- $user->page = session::extract_current_page($phpbb_root_path);
+ $user->browser = $server['HTTP_USER_AGENT'];
+ $user->referer = '';
+ $user->forwarded_for = '';
+ $user->host = $server['HTTP_HOST'];
+ $user->page = \phpbb\session::extract_current_page($phpbb_root_path);
}
protected function tearDown()
diff --git a/tests/security/extract_current_page_test.php b/tests/security/extract_current_page_test.php
index 0f5128884b..1284aab94c 100644
--- a/tests/security/extract_current_page_test.php
+++ b/tests/security/extract_current_page_test.php
@@ -10,11 +10,10 @@
require_once dirname(__FILE__) . '/base.php';
require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php';
-require_once dirname(__FILE__) . '/../../phpBB/includes/session.php';
class phpbb_security_extract_current_page_test extends phpbb_security_test_base
{
- static public function security_variables()
+ public function security_variables()
{
return array(
array('http://localhost/phpBB/index.php', 'mark=forums&x="><script>alert(/XSS/);</script>', 'mark=forums&x=%22%3E%3Cscript%3Ealert(/XSS/);%3C/script%3E'),
@@ -27,10 +26,24 @@ class phpbb_security_extract_current_page_test extends phpbb_security_test_base
*/
public function test_query_string_php_self($url, $query_string, $expected)
{
- $_SERVER['PHP_SELF'] = $url;
- $_SERVER['QUERY_STRING'] = $query_string;
+ global $symfony_request, $request;
- $result = session::extract_current_page('./');
+ $symfony_request = $this->getMock("\phpbb\symfony_request", array(), array(
+ $request,
+ ));
+ $symfony_request->expects($this->any())
+ ->method('getScriptName')
+ ->will($this->returnValue($url));
+ $symfony_request->expects($this->any())
+ ->method('getQueryString')
+ ->will($this->returnValue($query_string));
+ $symfony_request->expects($this->any())
+ ->method('getBasePath')
+ ->will($this->returnValue($server['REQUEST_URI']));
+ $symfony_request->expects($this->any())
+ ->method('getPathInfo')
+ ->will($this->returnValue('/'));
+ $result = \phpbb\session::extract_current_page('./');
$label = 'Running extract_current_page on ' . $query_string . ' with PHP_SELF filled.';
$this->assertEquals($expected, $result['query_string'], $label);
@@ -41,13 +54,27 @@ class phpbb_security_extract_current_page_test extends phpbb_security_test_base
*/
public function test_query_string_request_uri($url, $query_string, $expected)
{
- $_SERVER['REQUEST_URI'] = $url . '?' . $query_string;
- $_SERVER['QUERY_STRING'] = $query_string;
+ global $symfony_request, $request;
- $result = session::extract_current_page('./');
+ $symfony_request = $this->getMock("\phpbb\symfony_request", array(), array(
+ $request,
+ ));
+ $symfony_request->expects($this->any())
+ ->method('getScriptName')
+ ->will($this->returnValue($url));
+ $symfony_request->expects($this->any())
+ ->method('getQueryString')
+ ->will($this->returnValue($query_string));
+ $symfony_request->expects($this->any())
+ ->method('getBasePath')
+ ->will($this->returnValue($server['REQUEST_URI']));
+ $symfony_request->expects($this->any())
+ ->method('getPathInfo')
+ ->will($this->returnValue('/'));
+
+ $result = \phpbb\session::extract_current_page('./');
$label = 'Running extract_current_page on ' . $query_string . ' with REQUEST_URI filled.';
$this->assertEquals($expected, $result['query_string'], $label);
}
}
-
diff --git a/tests/security/hash_test.php b/tests/security/hash_test.php
index e226365ef3..32aa234316 100644
--- a/tests/security/hash_test.php
+++ b/tests/security/hash_test.php
@@ -7,10 +7,35 @@
*
*/
-require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php';
+require_once dirname(__FILE__) . '/../../phpBB/includes/functions_compatibility.php';
class phpbb_security_hash_test extends phpbb_test_case
{
+ public function setUp()
+ {
+ global $phpbb_container;
+
+ $config = new \phpbb\config\config(array());
+ $phpbb_container = $this->getMock('Symfony\Component\DependencyInjection\ContainerInterface');
+ $driver_helper = new \phpbb\passwords\driver\helper($config);
+ $passwords_drivers = array(
+ 'passwords.driver.bcrypt_2y' => new \phpbb\passwords\driver\bcrypt_2y($config, $driver_helper),
+ 'passwords.driver.bcrypt' => new \phpbb\passwords\driver\bcrypt($config, $driver_helper),
+ 'passwords.driver.salted_md5' => new \phpbb\passwords\driver\salted_md5($config, $driver_helper),
+ 'passwords.driver.phpass' => new \phpbb\passwords\driver\phpass($config, $driver_helper),
+ );
+
+ $passwords_helper = new \phpbb\passwords\helper;
+ // Set up passwords manager
+ $passwords_manager = new \phpbb\passwords\manager($config, $passwords_drivers, $passwords_helper, array_keys($passwords_drivers));
+
+ $phpbb_container
+ ->expects($this->any())
+ ->method('get')
+ ->with('passwords.manager')
+ ->will($this->returnValue($passwords_manager));
+ }
+
public function test_check_hash_with_phpass()
{
$this->assertTrue(phpbb_check_hash('test', '$H$9isfrtKXWqrz8PvztXlL3.daw4U0zI1'));
diff --git a/tests/security/redirect_test.php b/tests/security/redirect_test.php
index 872a331dc7..e5ff3b1541 100644
--- a/tests/security/redirect_test.php
+++ b/tests/security/redirect_test.php
@@ -10,51 +10,103 @@
require_once dirname(__FILE__) . '/base.php';
require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php';
-require_once dirname(__FILE__) . '/../../phpBB/includes/session.php';
class phpbb_security_redirect_test extends phpbb_security_test_base
{
- static public function provider()
+ protected $path_helper;
+
+ public function provider()
{
// array(Input -> redirect(), expected triggered error (else false), expected returned result url (else false))
return array(
- array('data://x', false, 'http://localhost/phpBB'),
- array('bad://localhost/phpBB/index.php', 'Tried to redirect to potentially insecure url.', false),
- array('http://www.otherdomain.com/somescript.php', false, 'http://localhost/phpBB'),
- array("http://localhost/phpBB/memberlist.php\n\rConnection: close", 'Tried to redirect to potentially insecure url.', false),
- array('javascript:test', false, 'http://localhost/phpBB/../javascript:test'),
- array('http://localhost/phpBB/index.php;url=', 'Tried to redirect to potentially insecure url.', false),
+ array('data://x', false, false, 'http://localhost/phpBB'),
+ array('bad://localhost/phpBB/index.php', false, 'INSECURE_REDIRECT', false),
+ array('http://www.otherdomain.com/somescript.php', false, false, 'http://localhost/phpBB'),
+ array("http://localhost/phpBB/memberlist.php\n\rConnection: close", false, 'INSECURE_REDIRECT', false),
+ array('javascript:test', false, false, 'http://localhost/phpBB/javascript:test'),
+ array('http://localhost/phpBB/index.php;url=', false, 'INSECURE_REDIRECT', false),
+ array('http://localhost/phpBB/app.php/foobar', false, false, 'http://localhost/phpBB/app.php/foobar'),
+ array('./app.php/foobar', false, false, 'http://localhost/phpBB/app.php/foobar'),
+ array('app.php/foobar', false, false, 'http://localhost/phpBB/app.php/foobar'),
+ array('./../app.php/foobar', false, false, 'http://localhost/app.php/foobar'),
+ array('./../app.php/foobar', true, false, 'http://localhost/app.php/foobar'),
+ array('./../app.php/foo/bar', false, false, 'http://localhost/app.php/foo/bar'),
+ array('./../app.php/foo/bar', true, false, 'http://localhost/app.php/foo/bar'),
+ array('./../foo/bar', false, false, 'http://localhost/foo/bar'),
+ array('./../foo/bar', true, false, 'http://localhost/foo/bar'),
+ array('app.php/', false, false, 'http://localhost/phpBB/app.php/'),
+ array('app.php/a', false, false, 'http://localhost/phpBB/app.php/a'),
+ array('app.php/a/b', false, false, 'http://localhost/phpBB/app.php/a/b'),
+ array('./app.php/', false, false, 'http://localhost/phpBB/app.php/'),
+ array('foobar', false, false, 'http://localhost/phpBB/foobar'),
+ array('./foobar', false, false, 'http://localhost/phpBB/foobar'),
+ array('foo/bar', false, false, 'http://localhost/phpBB/foo/bar'),
+ array('./foo/bar', false, false, 'http://localhost/phpBB/foo/bar'),
+ array('./../index.php', false, false, 'http://localhost/index.php'),
+ array('./../index.php', true, false, 'http://localhost/index.php'),
+ array('../index.php', false, false, 'http://localhost/index.php'),
+ array('../index.php', true, false, 'http://localhost/index.php'),
+ array('./index.php', false, false, 'http://localhost/phpBB/index.php'),
);
}
+ protected function get_path_helper()
+ {
+ if (!($this->path_helper instanceof \phpbb\path_helper))
+ {
+ $this->path_helper = new \phpbb\path_helper(
+ new \phpbb\symfony_request(
+ new phpbb_mock_request()
+ ),
+ new \phpbb\filesystem(),
+ $this->phpbb_root_path,
+ 'php'
+ );
+ }
+ return $this->path_helper;
+ }
+
protected function setUp()
{
parent::setUp();
-
+
$GLOBALS['config'] = array(
'force_server_vars' => '0',
);
+
+ $this->path_helper = $this->get_path_helper();
}
/**
* @dataProvider provider
*/
- public function test_redirect($test, $expected_error, $expected_result)
+ public function test_redirect($test, $disable_cd_check, $expected_error, $expected_result)
{
- global $user;
+ global $user, $phpbb_root_path, $phpbb_path_helper;
+
+ $phpbb_path_helper = $this->path_helper;
+
+ $temp_phpbb_root_path = $phpbb_root_path;
+ $temp_page_dir = $user->page['page_dir'];
+ // We need to hack phpbb_root_path and the user's page_dir here
+ // so it matches the actual fileinfo of the testing script.
+ // Otherwise the paths are returned incorrectly.
+ $phpbb_root_path = '';
+ $user->page['page_dir'] = '';
if ($expected_error !== false)
{
$this->setExpectedTriggerError(E_USER_ERROR, $expected_error);
}
- $result = redirect($test, true);
+ $result = redirect($test, true, $disable_cd_check);
// only verify result if we did not expect an error
if ($expected_error === false)
{
$this->assertEquals($expected_result, $result);
}
+ $phpbb_root_path = $temp_phpbb_root_path;
+ $user->page['page_dir'] = $temp_page_dir;
}
}
-
diff --git a/tests/session/append_sid_test.php b/tests/session/append_sid_test.php
index ce7bf71215..b9e9ac1aa9 100644
--- a/tests/session/append_sid_test.php
+++ b/tests/session/append_sid_test.php
@@ -45,6 +45,10 @@ class phpbb_session_append_sid_test extends phpbb_test_case
*/
public function test_append_sid($url, $params, $is_amp, $session_id, $expected, $description)
{
+ global $phpbb_dispatcher;
+
+ $phpbb_dispatcher = new phpbb_mock_event_dispatcher;
$this->assertEquals($expected, append_sid($url, $params, $is_amp, $session_id));
}
}
+
diff --git a/tests/session/check_ban_test.php b/tests/session/check_ban_test.php
new file mode 100644
index 0000000000..3f13b9f216
--- /dev/null
+++ b/tests/session/check_ban_test.php
@@ -0,0 +1,78 @@
+<?php
+/**
+ *
+ * @package testing
+ * @copyright (c) 2013 phpBB Group
+ * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+ *
+ */
+
+require_once dirname(__FILE__) . '/../test_framework/phpbb_session_test_case.php';
+
+class phpbb_session_check_ban_test extends phpbb_session_test_case
+{
+ protected $user_id = 4;
+ protected $key_id = 4;
+ protected $session;
+ protected $backup_cache;
+
+ public function getDataSet()
+ {
+ return $this->createXMLDataSet(dirname(__FILE__) . '/fixtures/sessions_banlist.xml');
+ }
+
+ static function check_banned_data()
+ {
+ return array(
+ array('All false values, should not be banned',
+ false, false, false, false, /* should be banned? -> */ false),
+ array('Matching values in the database, should be banned',
+ 4, '127.0.0.1', 'bar@example.org', true, /* should be banned? -> */ true),
+ array('IP Banned, should be banned',
+ false, '127.1.1.1', false, false, /* should be banned? -> */ true),
+ );
+ }
+
+ public function setUp()
+ {
+ parent::setUp();
+ // Get session here so that config is mocked correctly
+ $this->session = $this->session_factory->get_session($this->db);
+ global $cache, $config, $phpbb_root_path, $phpEx;
+ $this->backup_cache = $cache;
+ // Change the global cache object for this test because
+ // the mock cache object does not hit the database as is needed
+ // for this test.
+ $cache = new \phpbb\cache\service(
+ new \phpbb\cache\driver\file(),
+ $config,
+ $this->db,
+ $phpbb_root_path,
+ $phpEx
+ );
+ }
+
+ public function tearDown()
+ {
+ parent::tearDown();
+ // Set cache back to what it was before the test changed it
+ global $cache;
+ $cache = $this->backup_cache;
+ }
+
+ /** @dataProvider check_banned_data */
+ public function test_check_is_banned($test_msg, $user_id, $user_ips, $user_email, $return, $should_be_banned)
+ {
+ try
+ {
+ $is_banned = $this->session->check_ban($user_id, $user_ips, $user_email, $return);
+ }
+ catch (PHPUnit_Framework_Error_Notice $e)
+ {
+ // User error was triggered, user must have been banned
+ $is_banned = true;
+ }
+
+ $this->assertEquals($should_be_banned, $is_banned, $test_msg);
+ }
+}
diff --git a/tests/session/check_isvalid_test.php b/tests/session/check_isvalid_test.php
new file mode 100644
index 0000000000..760e2a6f24
--- /dev/null
+++ b/tests/session/check_isvalid_test.php
@@ -0,0 +1,61 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+require_once dirname(__FILE__) . '/../test_framework/phpbb_session_test_case.php';
+
+class phpbb_session_check_isvalid_test extends phpbb_session_test_case
+{
+ public function getDataSet()
+ {
+ return $this->createXMLDataSet(dirname(__FILE__) . '/fixtures/sessions_full.xml');
+ }
+
+ protected function access_with($session_id, $user_id, $user_agent, $ip)
+ {
+ $this->session_factory->merge_test_data($session_id, $user_id, $user_agent, $ip);
+
+ $session = $this->session_factory->get_session($this->db);
+ $session->page = array('page' => 'page', 'forum' => 0);
+
+ $session->session_begin();
+ $this->session_factory->check($this);
+ return $session;
+ }
+
+ public function test_session_valid_session_exists()
+ {
+ $session = $this->access_with('bar_session000000000000000000000', '4', 'user agent', '127.0.0.1');
+ $session->check_cookies($this, array());
+
+ $this->check_sessions_equals(array(
+ array('session_id' => 'anon_session00000000000000000000', 'session_user_id' => 1),
+ array('session_id' => 'bar_session000000000000000000000', 'session_user_id' => 4),
+ ),
+ 'If a request comes with a valid session id with matching user agent and IP, no new session should be created.'
+ );
+ }
+
+ public function test_session_invalid_make_new_annon_session()
+ {
+ $session = $this->access_with('anon_session00000000000000000000', '4', 'user agent', '127.0.0.1');
+ $session->check_cookies($this, array(
+ 'u' => array('1', null),
+ 'k' => array(null, null),
+ 'sid' => array($session->session_id, null),
+ ));
+
+ $this->check_sessions_equals(array(
+ array('session_id' => $session->session_id, 'session_user_id' => 1), // use generated SID
+ array('session_id' => 'bar_session000000000000000000000', 'session_user_id' => 4),
+ ),
+ 'If a request comes with a valid session id and IP but different user id and user agent,
+ a new anonymous session is created and the session matching the supplied session id is deleted.'
+ );
+ }
+}
diff --git a/tests/session/continue_test.php b/tests/session/continue_test.php
deleted file mode 100644
index c4f7f8d75b..0000000000
--- a/tests/session/continue_test.php
+++ /dev/null
@@ -1,121 +0,0 @@
-<?php
-/**
-*
-* @package testing
-* @copyright (c) 2011 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
-*
-*/
-
-require_once dirname(__FILE__) . '/../mock/cache.php';
-require_once dirname(__FILE__) . '/testable_factory.php';
-
-class phpbb_session_continue_test extends phpbb_database_test_case
-{
- public function getDataSet()
- {
- return $this->createXMLDataSet(dirname(__FILE__).'/fixtures/sessions_full.xml');
- }
-
- static public function session_begin_attempts()
- {
- // The session_id field is defined as CHAR(32) in the database schema.
- // Thus the data we put in session_id fields has to have a length of 32 characters on stricter DBMSes.
- // Thus we fill those strings up with zeroes until they have a string length of 32.
-
- return array(
- array(
- 'bar_session000000000000000000000', '4', 'user agent', '127.0.0.1',
- array(
- array('session_id' => 'anon_session00000000000000000000', 'session_user_id' => 1),
- array('session_id' => 'bar_session000000000000000000000', 'session_user_id' => 4),
- ),
- array(),
- 'If a request comes with a valid session id with matching user agent and IP, no new session should be created.',
- ),
- array(
- 'anon_session00000000000000000000', '4', 'user agent', '127.0.0.1',
- array(
- array('session_id' => '__new_session_id__', 'session_user_id' => 1), // use generated SID
- array('session_id' => 'bar_session000000000000000000000', 'session_user_id' => 4),
- ),
- array(
- 'u' => array('1', null),
- 'k' => array(null, null),
- 'sid' => array('__new_session_id__', null),
- ),
- 'If a request comes with a valid session id and IP but different user id and user agent, a new anonymous session is created and the session matching the supplied session id is deleted.',
- ),
- );
- }
-
- /**
- * @dataProvider session_begin_attempts
- */
- public function test_session_begin_valid_session($session_id, $user_id, $user_agent, $ip, $expected_sessions, $expected_cookies, $message)
- {
- $db = $this->new_dbal();
- $session_factory = new phpbb_session_testable_factory;
- $session_factory->set_cookies(array(
- '_sid' => $session_id,
- '_u' => $user_id,
- ));
- $session_factory->merge_config_data(array(
- 'session_length' => time(), // need to do this to allow sessions started at time 0
- ));
- $session_factory->merge_server_data(array(
- 'HTTP_USER_AGENT' => $user_agent,
- 'REMOTE_ADDR' => $ip,
- ));
-
- $session = $session_factory->get_session($db);
- $session->page = array('page' => 'page', 'forum' => 0);
-
- $session->session_begin();
-
- $sql = 'SELECT session_id, session_user_id
- FROM phpbb_sessions
- ORDER BY session_user_id';
-
- $expected_sessions = $this->replace_session($expected_sessions, $session->session_id);
- $expected_cookies = $this->replace_session($expected_cookies, $session->session_id);
-
- $this->assertSqlResultEquals(
- $expected_sessions,
- $sql,
- $message
- );
-
- $session->check_cookies($this, $expected_cookies);
-
- $session_factory->check($this);
- }
-
- /**
- * Replaces recursively the value __new_session_id__ with the given session
- * id.
- *
- * @param array $array An array of data
- * @param string $session_id The new session id to use instead of the
- * placeholder.
- * @return array The input array with all occurances of __new_session_id__
- * replaced.
- */
- public function replace_session($array, $session_id)
- {
- foreach ($array as $key => &$value)
- {
- if ($value === '__new_session_id__')
- {
- $value = $session_id;
- }
-
- if (is_array($value))
- {
- $value = $this->replace_session($value, $session_id);
- }
- }
-
- return $array;
- }
-}
diff --git a/tests/session/create_test.php b/tests/session/create_test.php
new file mode 100644
index 0000000000..442445599b
--- /dev/null
+++ b/tests/session/create_test.php
@@ -0,0 +1,43 @@
+<?php
+/**
+ *
+ * @package testing
+ * @copyright (c) 2013 phpBB Group
+ * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+ *
+ */
+
+require_once dirname(__FILE__) . '/../test_framework/phpbb_session_test_case.php';
+
+class phpbb_session_create_test extends phpbb_session_test_case
+{
+ public function getDataSet()
+ {
+ return $this->createXMLDataSet(dirname(__FILE__) . '/fixtures/sessions_full.xml');
+ }
+
+ static function bot($bot_agent, $user_id, $bot_ip)
+ {
+ return array(array(
+ 'bot_agent' => $bot_agent,
+ 'user_id' => $user_id,
+ 'bot_ip' => $bot_ip,
+ ));
+ }
+
+ function test_bot_session()
+ {
+ $output = $this->session_facade->session_create(
+ false,
+ false,
+ false,
+ false,
+ array(),
+ 'user agent',
+ '127.0.0.1',
+ self::bot('user agent', 13, '127.0.0.1'),
+ ''
+ );
+ $this->assertEquals(true, $output->data['is_bot'], 'should be a bot');
+ }
+}
diff --git a/tests/session/creation_test.php b/tests/session/creation_test.php
deleted file mode 100644
index bef52c6554..0000000000
--- a/tests/session/creation_test.php
+++ /dev/null
@@ -1,57 +0,0 @@
-<?php
-/**
-*
-* @package testing
-* @copyright (c) 2011 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
-*
-*/
-
-require_once dirname(__FILE__) . '/../mock/cache.php';
-require_once dirname(__FILE__) . '/testable_factory.php';
-
-class phpbb_session_creation_test extends phpbb_database_test_case
-{
- public function getDataSet()
- {
- return $this->createXMLDataSet(dirname(__FILE__).'/fixtures/sessions_empty.xml');
- }
-
- // also see security/extract_current_page.php
-
- public function test_login_session_create()
- {
- $db = $this->new_dbal();
- $session_factory = new phpbb_session_testable_factory;
-
- $session = $session_factory->get_session($db);
- $session->page = array('page' => 'page', 'forum' => 0);
-
- $session->session_create(3);
-
- $sql = 'SELECT session_user_id
- FROM phpbb_sessions';
-
- $this->assertSqlResultEquals(
- array(array('session_user_id' => 3)),
- $sql,
- 'Check if exactly one session for user id 3 was created'
- );
-
- $one_year_in_seconds = 365 * 24 * 60 * 60;
- $cookie_expire = $session->time_now + $one_year_in_seconds;
-
- $session->check_cookies($this, array(
- 'u' => array(null, $cookie_expire),
- 'k' => array(null, $cookie_expire),
- 'sid' => array($session->session_id, $cookie_expire),
- ));
-
- global $SID, $_SID;
- $this->assertEquals($session->session_id, $_SID);
- $this->assertEquals('?sid=' . $session->session_id, $SID);
-
- $session_factory->check($this);
- }
-}
-
diff --git a/tests/session/extract_hostname_test.php b/tests/session/extract_hostname_test.php
new file mode 100644
index 0000000000..bd183fd438
--- /dev/null
+++ b/tests/session/extract_hostname_test.php
@@ -0,0 +1,51 @@
+<?php
+/**
+ *
+ * @package testing
+ * @copyright (c) 2013 phpBB Group
+ * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+ *
+ */
+
+require_once dirname(__FILE__) . '/../test_framework/phpbb_session_test_case.php';
+
+class phpbb_session_extract_hostname_test extends phpbb_session_test_case
+{
+ public function getDataSet()
+ {
+ return $this->createXMLDataSet(dirname(__FILE__) . '/fixtures/sessions_empty.xml');
+ }
+
+ static public function extract_current_hostname_data()
+ {
+ return array (
+ // [Input] $host, $server_name_config, $cookie_domain_config, [Expected] $output
+ // If host is ip use that
+ // ipv4
+ array('127.0.0.1', 'skipped.org', 'skipped.org', '127.0.0.1'),
+ // ipv6
+ array('::1', 'skipped.org', 'skipped.org', ':'),
+ array('2002::3235:51f9', 'skipped.org', 'skipped.org', '2002::3235'),
+ // If no host but server name matches cookie_domain use that
+ array('', 'example.org', 'example.org', 'example.org'),
+ // If there is a host uri use that
+ array('example.org', false, false, 'example.org'),
+ // 'best approach' guessing
+ array('', 'example.org', false, 'example.org'),
+ array('', false, '127.0.0.1', '127.0.0.1'),
+ array('', false, false, php_uname('n')),
+ );
+ }
+
+ /** @dataProvider extract_current_hostname_data */
+ function test_extract_current_hostname($host, $server_name_config, $cookie_domain_config, $expected)
+ {
+ $output = $this->session_facade->extract_current_hostname(
+ $host,
+ $server_name_config,
+ $cookie_domain_config
+ );
+
+ $this->assertEquals($expected, $output);
+ }
+}
diff --git a/tests/session/extract_page_test.php b/tests/session/extract_page_test.php
new file mode 100644
index 0000000000..6e137e28b8
--- /dev/null
+++ b/tests/session/extract_page_test.php
@@ -0,0 +1,165 @@
+<?php
+/**
+ *
+ * @package testing
+ * @copyright (c) 2013 phpBB Group
+ * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+ *
+ */
+
+require_once dirname(__FILE__) . '/../test_framework/phpbb_session_test_case.php';
+
+class phpbb_session_extract_page_test extends phpbb_session_test_case
+{
+ public function getDataSet()
+ {
+ return $this->createXMLDataSet(dirname(__FILE__) . '/fixtures/sessions_empty.xml');
+ }
+
+ static public function extract_current_page_data()
+ {
+ return array(
+ array(
+ './',
+ '/phpBB/index.php',
+ '',
+ '/phpBB/',
+ '/',
+ array(
+ 'page_name' => 'index.php',
+ 'page_dir' => '',
+ 'query_string' => '',
+ 'script_path' => '/phpBB/',
+ 'root_script_path' => '/phpBB/',
+ 'page' => 'index.php',
+ 'forum' => 0,
+ ),
+ ),
+ array(
+ './',
+ '/phpBB/ucp.php',
+ 'mode=login',
+ '/phpBB/',
+ '/',
+ array(
+ 'page_name' => 'ucp.php',
+ 'page_dir' => '',
+ 'query_string' => 'mode=login',
+ 'script_path' => '/phpBB/',
+ 'root_script_path' => '/phpBB/',
+ 'page' => 'ucp.php?mode=login',
+ 'forum' => 0,
+ ),
+ ),
+ array(
+ './',
+ '/phpBB/ucp.php',
+ 'mode=register',
+ '/phpBB/',
+ '/',
+ array(
+ 'page_name' => 'ucp.php',
+ 'page_dir' => '',
+ 'query_string' => 'mode=register',
+ 'script_path' => '/phpBB/',
+ 'root_script_path' => '/phpBB/',
+ 'page' => 'ucp.php?mode=register',
+ 'forum' => 0,
+ ),
+ ),
+ array(
+ './',
+ '/phpBB/ucp.php',
+ 'mode=register',
+ '/phpBB/',
+ '/',
+ array(
+ 'page_name' => 'ucp.php',
+ 'page_dir' => '',
+ 'query_string' => 'mode=register',
+ 'script_path' => '/phpBB/',
+ 'root_script_path' => '/phpBB/',
+ 'page' => 'ucp.php?mode=register',
+ 'forum' => 0,
+ ),
+ ),
+ array(
+ './../',
+ '/phpBB/adm/index.php',
+ 'sid=e7215d958cdd41a6fc13509bebe53e42',
+ '/phpBB/adm/',
+ '/',
+ array(
+ 'page_name' => 'index.php',
+ //'page_dir' => 'adm',
+ // ^-- Ignored because .. returns different directory in live vs testing
+ 'query_string' => '',
+ 'script_path' => '/phpBB/adm/',
+ //'root_script_path' => '/phpBB/',
+ //'page' => 'adm/index.php',
+ 'forum' => 0,
+ ),
+ ),
+ array(
+ './',
+ '/phpBB/adm/app.php',
+ 'page=1&test=2',
+ '/phpBB/',
+ '/foo/bar',
+ array(
+ 'page_name' => 'app.php/foo/bar',
+ 'page_dir' => '',
+ 'query_string' => 'page=1&test=2',
+ 'script_path' => '/phpBB/',
+ 'root_script_path' => '/phpBB/',
+ 'page' => 'app.php/foo/bar?page=1&test=2',
+ 'forum' => 0,
+ ),
+ ),
+ array(
+ './../phpBB/',
+ '/test/test.php',
+ 'page=1&test=2',
+ '/test/',
+ '',
+ array(
+ 'page_name' => 'test.php',
+ //'page_dir' => '',
+ 'query_string' => 'page=1&test=2',
+ 'script_path' => '/test/',
+ //'root_script_path' => '../phpBB/',
+ //'page' => '../test/test.php/foo/bar?page=1&test=2',
+ 'forum' => 0,
+ ),
+ ),
+ );
+ }
+
+ /** @dataProvider extract_current_page_data */
+ function test_extract_current_page($root_path, $getScriptName, $getQueryString, $getBasePath, $getPathInfo, $expected)
+ {
+ global $symfony_request;
+
+ $symfony_request = $this->getMock("\phpbb\symfony_request", array(), array(
+ new phpbb_mock_request(),
+ ));
+ $symfony_request->expects($this->any())
+ ->method('getScriptName')
+ ->will($this->returnValue($getScriptName));
+ $symfony_request->expects($this->any())
+ ->method('getQueryString')
+ ->will($this->returnValue($getQueryString));
+ $symfony_request->expects($this->any())
+ ->method('getBasePath')
+ ->will($this->returnValue($getBasePath));
+ $symfony_request->expects($this->any())
+ ->method('getPathInfo')
+ ->will($this->returnValue($getPathInfo));
+
+ $output = \phpbb\session::extract_current_page($root_path);
+
+ // This compares the result of the output.
+ // Any keys that are not in the expected array are overwritten by the output (aka not checked).
+ $this->assert_array_content_equals(array_merge($output, $expected), $output);
+ }
+}
diff --git a/tests/session/fixtures/sessions_banlist.xml b/tests/session/fixtures/sessions_banlist.xml
new file mode 100644
index 0000000000..e720e35f0a
--- /dev/null
+++ b/tests/session/fixtures/sessions_banlist.xml
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<dataset>
+ <table name="phpbb_users">
+ <column>user_id</column>
+ <column>username_clean</column>
+ <column>user_permissions</column>
+ <column>user_sig</column>
+ <row>
+ <value>1</value>
+ <value>anonymous</value>
+ <value></value>
+ <value></value>
+ </row>
+ </table>
+ <table name="phpbb_sessions">
+ <column>session_id</column>
+ <column>session_user_id</column>
+ <column>session_ip</column>
+ <column>session_browser</column>
+ <column>session_admin</column>
+ <row>
+ <value>bar_session000000000000000000000</value>
+ <value>4</value>
+ <value>127.0.0.1</value>
+ <value>user agent</value>
+ <value>1</value>
+ </row>
+ </table>
+ <table name="phpbb_banlist">
+ <column>ban_id</column>
+ <column>ban_userid</column>
+ <column>ban_ip</column>
+ <column>ban_email</column>
+ <column>ban_start</column>
+ <column>ban_end</column>
+ <column>ban_exclude</column>
+ <column>ban_reason</column>
+ <column>ban_give_reason</column>
+ <row>
+ <value>2</value>
+ <value>4</value>
+ <value>127.0.0.1</value>
+ <value>bar@example.org</value>
+ <value>1111</value>
+ <value>0</value>
+ <value>0</value>
+ <value>HAHAHA</value>
+ <value>1</value>
+ </row>
+ <row>
+ <value>3</value>
+ <value>0</value>
+ <value>127.1.1.1</value>
+ <value></value>
+ <value>1111</value>
+ <value>0</value>
+ <value>0</value>
+ <value>HAHAHA</value>
+ <value>1</value>
+ </row>
+ </table>
+</dataset>
diff --git a/tests/session/fixtures/sessions_empty.xml b/tests/session/fixtures/sessions_empty.xml
index 0e6ddccd88..2acba58f45 100644
--- a/tests/session/fixtures/sessions_empty.xml
+++ b/tests/session/fixtures/sessions_empty.xml
@@ -5,31 +5,23 @@
<column>username_clean</column>
<column>user_permissions</column>
<column>user_sig</column>
- <column>user_occ</column>
- <column>user_interests</column>
<row>
<value>1</value>
<value>anonymous</value>
<value></value>
<value></value>
- <value></value>
- <value></value>
</row>
<row>
<value>3</value>
<value>foo</value>
<value></value>
<value></value>
- <value></value>
- <value></value>
</row>
<row>
<value>4</value>
<value>bar</value>
<value></value>
<value></value>
- <value></value>
- <value></value>
</row>
</table>
<table name="phpbb_sessions">
diff --git a/tests/session/fixtures/sessions_full.xml b/tests/session/fixtures/sessions_full.xml
index 509687f4d2..4fb6b9dfd4 100644
--- a/tests/session/fixtures/sessions_full.xml
+++ b/tests/session/fixtures/sessions_full.xml
@@ -5,31 +5,23 @@
<column>username_clean</column>
<column>user_permissions</column>
<column>user_sig</column>
- <column>user_occ</column>
- <column>user_interests</column>
<row>
<value>1</value>
<value>anonymous</value>
<value></value>
<value></value>
- <value></value>
- <value></value>
</row>
<row>
<value>3</value>
<value>foo</value>
<value></value>
<value></value>
- <value></value>
- <value></value>
</row>
<row>
<value>4</value>
<value>bar</value>
<value></value>
<value></value>
- <value></value>
- <value></value>
</row>
</table>
<table name="phpbb_sessions">
@@ -37,17 +29,20 @@
<column>session_user_id</column>
<column>session_ip</column>
<column>session_browser</column>
+ <column>session_admin</column>
<row>
<value>anon_session00000000000000000000</value>
<value>1</value>
<value>127.0.0.1</value>
<value>anonymous user agent</value>
+ <value>0</value>
</row>
<row>
<value>bar_session000000000000000000000</value>
<value>4</value>
<value>127.0.0.1</value>
<value>user agent</value>
+ <value>1</value>
</row>
</table>
</dataset>
diff --git a/tests/session/fixtures/sessions_garbage.xml b/tests/session/fixtures/sessions_garbage.xml
new file mode 100644
index 0000000000..5eace839d0
--- /dev/null
+++ b/tests/session/fixtures/sessions_garbage.xml
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<dataset>
+ <table name="phpbb_users">
+ <column>user_id</column>
+ <column>username_clean</column>
+ <column>user_permissions</column>
+ <column>user_sig</column>
+ <row>
+ <value>4</value>
+ <value>bar</value>
+ <value></value>
+ <value></value>
+ </row>
+ </table>
+ <table name="phpbb_sessions">
+ <column>session_id</column>
+ <column>session_user_id</column>
+ <column>session_ip</column>
+ <column>session_browser</column>
+ <column>session_admin</column>
+ <row>
+ <value>anon_session00000000000000000000</value>
+ <value>1</value>
+ <value>127.0.0.1</value>
+ <value>anonymous user agent</value>
+ <value>0</value>
+ </row>
+ <row>
+ <value>bar_session000000000000000000000</value>
+ <value>4</value>
+ <value>127.0.0.1</value>
+ <value>user agent</value>
+ <value>1</value>
+ </row>
+ </table>
+ <table name="phpbb_login_attempts">
+ <column>attempt_ip</column>
+ <column>attempt_browser</column>
+ <column>attempt_forwarded_for</column>
+ <column>attempt_time</column>
+ <column>user_id</column>
+ <column>username</column>
+ <column>username_clean</column>
+ <row>
+ <value>127.0.0.1</value>
+ <value>browser</value>
+ <value></value>
+ <value>0001</value>
+ <value>4</value>
+ <value>bar</value>
+ <value>bar</value>
+ </row>
+ </table>
+</dataset>
diff --git a/tests/session/fixtures/sessions_key.xml b/tests/session/fixtures/sessions_key.xml
new file mode 100644
index 0000000000..4f349cd282
--- /dev/null
+++ b/tests/session/fixtures/sessions_key.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<dataset>
+ <table name="phpbb_sessions_keys">
+ <column>key_id</column>
+ <column>user_id</column>
+ <column>last_ip</column>
+ <column>last_login</column>
+ <row>
+ <value>a87ff679a2f3e71d9181a67b7542122c</value>
+ <value>4</value>
+ <value>127.0.0.1</value>
+ <value>0</value>
+ </row>
+ </table>
+ <table name="phpbb_sessions">
+ <column>session_id</column>
+ <column>session_user_id</column>
+ <column>session_ip</column>
+ <column>session_browser</column>
+ <row>
+ <value>bar_session000000000000000000000</value>
+ <value>4</value>
+ <value>127.0.0.1</value>
+ <value>user agent</value>
+ <value>1</value>
+ </row>
+ </table>
+ <table name="phpbb_users">
+ <column>user_id</column>
+ <column>username_clean</column>
+ <column>user_permissions</column>
+ <column>user_sig</column>
+ <row>
+ <value>4</value>
+ <value>bar</value>
+ <value></value>
+ <value></value>
+ </row>
+ </table>
+</dataset>
diff --git a/tests/session/garbage_collection_test.php b/tests/session/garbage_collection_test.php
new file mode 100644
index 0000000000..e7d01785dd
--- /dev/null
+++ b/tests/session/garbage_collection_test.php
@@ -0,0 +1,53 @@
+<?php
+/**
+ *
+ * @package testing
+ * @copyright (c) 2013 phpBB Group
+ * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+ *
+ */
+
+require_once dirname(__FILE__) . '/../test_framework/phpbb_session_test_case.php';
+
+class phpbb_session_garbage_collection_test extends phpbb_session_test_case
+{
+ public $session;
+
+ public function getDataSet()
+ {
+ return $this->createXMLDataSet(dirname(__FILE__) . '/fixtures/sessions_garbage.xml');
+ }
+
+ public function setUp()
+ {
+ parent::setUp();
+ $this->session = $this->session_factory->get_session($this->db);
+ }
+
+ public function test_cleanup_all()
+ {
+ $this->check_sessions_equals(
+ array(
+ array(
+ 'session_id' => 'anon_session00000000000000000000',
+ 'session_user_id' => 1,
+ ),
+ array(
+ 'session_id' => 'bar_session000000000000000000000',
+ 'session_user_id' => 4,
+ ),
+ ),
+ 'Before test, should have some sessions.'
+ );
+ // Set session length so it clears all
+ global $config;
+ $config['session_length'] = 0;
+ // There is an error unless the captcha plugin is set
+ $config['captcha_plugin'] = 'phpbb_captcha_nogd';
+ $this->session->session_gc();
+ $this->check_sessions_equals(
+ array(),
+ 'After setting session time to 0, should remove all.'
+ );
+ }
+}
diff --git a/tests/session/session_key_test.php b/tests/session/session_key_test.php
new file mode 100644
index 0000000000..1cf2101385
--- /dev/null
+++ b/tests/session/session_key_test.php
@@ -0,0 +1,51 @@
+<?php
+/**
+ *
+ * @package testing
+ * @copyright (c) 2013 phpBB Group
+ * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+ *
+ */
+
+require_once dirname(__FILE__) . '/../test_framework/phpbb_session_test_case.php';
+
+class phpbb_session_login_keys_test extends phpbb_session_test_case
+{
+ protected $user_id = 4;
+ protected $key_id = 4;
+
+ public function getDataSet()
+ {
+ return $this->createXMLDataSet(dirname(__FILE__) . '/fixtures/sessions_key.xml');
+ }
+
+ public function test_set_key_manually()
+ {
+ // With AutoLogin setup
+ $this->session_factory->merge_config_data(array('allow_autologin' => true));
+ $session = $this->session_factory->get_session($this->db);
+ // Using a user_id and key that is already in the database
+ $session->cookie_data['u'] = $this->user_id;
+ $session->cookie_data['k'] = $this->key_id;
+ // Try to access session
+ $session->session_create($this->user_id, false, $this->user_id);
+
+ $this->assertEquals($this->user_id, $session->data['user_id'], "session should automatically login");
+ }
+
+ public function test_reset_keys()
+ {
+ // With AutoLogin setup
+ $this->session_factory->merge_config_data(array('allow_autologin' => true));
+ $session = $this->session_factory->get_session($this->db);
+ // Reset of the keys for this user
+ $session->reset_login_keys($this->user_id);
+ // Using a user_id and key that was in the database (before reset)
+ $session->cookie_data['u'] = $this->user_id;
+ $session->cookie_data['k'] = $this->key_id;
+ // Try to access session
+ $session->session_create($this->user_id, false, $this->user_id);
+
+ $this->assertNotEquals($this->user_id, $session->data['user_id'], "session should be cleared");
+ }
+}
diff --git a/tests/session/testable_facade.php b/tests/session/testable_facade.php
new file mode 100644
index 0000000000..2600a46cc4
--- /dev/null
+++ b/tests/session/testable_facade.php
@@ -0,0 +1,126 @@
+<?php
+/**
+ *
+ * @package testing
+ * @copyright (c) 2013 phpBB Group
+ * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+ *
+ */
+
+require_once dirname(__FILE__) . '/testable_factory.php';
+require_once dirname(__FILE__) . '/../../phpBB/phpbb/session.php';
+
+/**
+ * This class exists to expose session.php's functions in a more testable way.
+ *
+ * Since many functions in session.php have global variables inside the function,
+ * this exposes those functions through a testable facade that uses
+ * testable_factory's mock global variables to modify global variables used in
+ * the functions.
+ *
+ * This is using the facade pattern to provide a testable "front" to the
+ * functions in sessions.php.
+ *
+ */
+class phpbb_session_testable_facade
+{
+ protected $db;
+ protected $session_factory;
+
+ function __construct($db, $session_factory)
+ {
+ $this->db = $db;
+ $this->session_factory = $session_factory;
+ }
+
+ function extract_current_hostname(
+ $host,
+ $server_name_config,
+ $cookie_domain_config
+ )
+ {
+ $session = $this->session_factory->get_session($this->db);
+ global $config, $request;
+ $config['server_name'] = $server_name_config;
+ $config['cookie_domain'] = $cookie_domain_config;
+ $request->overwrite('SERVER_NAME', $host, \phpbb\request\request_interface::SERVER);
+ $request->overwrite('Host', $host, \phpbb\request\request_interface::SERVER);
+ // Note: There is a php_uname function used as a fallthrough
+ // that this function doesn't override
+ return $session->extract_current_hostname();
+ }
+
+ /**
+ *
+ * This function has a lot of dependencies, so instead of naming them all,
+ * just ask for overrides
+ *
+ * @param update_session_page Boolean of whether to set page of the session
+ * @param config_overrides An array of overrides for the global config object
+ * @param request_overrides An array of overrides for the global request object
+ * @return boolean False if the user is identified, otherwise true.
+ */
+ function session_begin(
+ $update_session_page = true,
+ $config_overrides = array(),
+ $request_overrides = array(),
+ $cookies_overrides = array()
+ )
+ {
+ $this->session_factory->merge_config_data($config_overrides);
+ $this->session_factory->merge_server_data($request_overrides);
+ $this->session_factory->set_cookies($cookies_overrides);
+ $session = $this->session_factory->get_session($this->db);
+ $session->session_begin($update_session_page);
+ return $session;
+ }
+
+ function session_create(
+ $user_id = false,
+ $set_admin = false,
+ $persist_login = false,
+ $viewonline = true,
+ array $config_overrides = array(),
+ $user_agent = 'user agent',
+ $ip_address = '127.0.0.1',
+ array $bot_overrides = array(),
+ $uri_sid = ""
+ )
+ {
+ $this->session_factory->merge_config_data($config_overrides);
+ // Bots
+ $this->session_factory->merge_cache_data(array('_bots' => $bot_overrides));
+ global $request;
+ $session = $this->session_factory->get_session($this->db);
+ $session->browser = $user_agent;
+ $session->ip = $ip_address;
+ // Uri sid
+ if ($uri_sid)
+ {
+ $_GET['sid'] = $uri_sid;
+ }
+ $session->session_create($user_id, $set_admin, $persist_login, $viewonline);
+ return $session;
+ }
+
+ function validate_referer(
+ $check_script_path,
+ $referer,
+ $host,
+ $force_server_vars,
+ $server_port,
+ $server_name,
+ $root_script_path
+ )
+ {
+ $session = $this->session_factory->get_session($this->db);
+ global $config, $request;
+ $session->referer = $referer;
+ $session->page['root_script_path'] = $root_script_path;
+ $session->host = $host;
+ $config['force_server_vars'] = $force_server_vars;
+ $config['server_name'] = $server_name;
+ $request->overwrite('SERVER_PORT', $server_port, \phpbb\request\request_interface::SERVER);
+ return $session->validate_referer($check_script_path);
+ }
+}
diff --git a/tests/session/testable_factory.php b/tests/session/testable_factory.php
index 00f79738ef..a58e208efc 100644
--- a/tests/session/testable_factory.php
+++ b/tests/session/testable_factory.php
@@ -2,12 +2,13 @@
/**
*
* @package testing
-* @copyright (c) 2011 phpBB Group
+* @copyright (c) 2013 phpBB Group
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
-require_once dirname(__FILE__) . '/../mock/session_testable.php';
+require_once dirname(__FILE__) . '/../mock/container_builder.php';
+require_once dirname(__FILE__) . '/../mock/auth_provider.php';
/**
* This class exists to setup an instance of phpbb's session class for testing.
@@ -18,12 +19,14 @@ require_once dirname(__FILE__) . '/../mock/session_testable.php';
*/
class phpbb_session_testable_factory
{
+ protected $container;
protected $config_data;
protected $cache_data;
protected $cookies;
protected $config;
protected $cache;
+ protected $request;
/**
* Initialises the factory with a set of default config and cache values.
@@ -60,22 +63,35 @@ class phpbb_session_testable_factory
/**
* Retrieve the configured session class instance
*
- * @param dbal $dbal The database connection to use for session data
+ * @param \phpbb\db\driver\driver $dbal The database connection to use for session data
* @return phpbb_mock_session_testable A session instance
*/
- public function get_session(dbal $dbal)
+ public function get_session(\phpbb\db\driver\driver $dbal)
{
// set up all the global variables used by session
- global $SID, $_SID, $db, $config, $cache;
+ global $SID, $_SID, $db, $config, $cache, $request, $phpbb_container;
+
+ $request = $this->request = new phpbb_mock_request(
+ array(),
+ array(),
+ $this->cookies,
+ $this->server_data
+ );
+ request_var(null, null, null, null, $request);
+
+ $config = $this->config = new \phpbb\config\config($this->get_config_data());
+ set_config(null, null, null, $config);
- $config = $this->config = $this->get_config_data();
$db = $dbal;
$cache = $this->cache = new phpbb_mock_cache($this->get_cache_data());
$SID = $_SID = null;
- $_COOKIE = $this->cookies;
- $_SERVER = $this->server_data;
+ $phpbb_container = $this->container = new phpbb_mock_container_builder();
+ $phpbb_container->set(
+ 'auth.provider.db',
+ new phpbb_mock_auth_provider()
+ );
$session = new phpbb_mock_session_testable;
return $session;
@@ -159,6 +175,32 @@ class phpbb_session_testable_factory
}
/**
+ * Set cookies, merge config and server data in one step.
+ *
+ * New values overwrite old ones.
+ *
+ * @param $session_id
+ * @param $user_id
+ * @param $user_agent
+ * @param $ip
+ * @param int $time
+ */
+ public function merge_test_data($session_id, $user_id, $user_agent, $ip, $time = 0)
+ {
+ $this->set_cookies(array(
+ '_sid' => $session_id,
+ '_u' => $user_id,
+ ));
+ $this->merge_config_data(array(
+ 'session_length' => time() + $time, // need to do this to allow sessions started at time 0
+ ));
+ $this->merge_server_data(array(
+ 'HTTP_USER_AGENT' => $user_agent,
+ 'REMOTE_ADDR' => $ip,
+ ));
+ }
+
+ /**
* Retrieve all server variables to be passed to the session.
*
* @return array Server variables
diff --git a/tests/session/unset_admin_test.php b/tests/session/unset_admin_test.php
new file mode 100644
index 0000000000..1d5b1759ab
--- /dev/null
+++ b/tests/session/unset_admin_test.php
@@ -0,0 +1,48 @@
+<?php
+/**
+ *
+ * @package testing
+ * @copyright (c) 2013 phpBB Group
+ * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+ *
+ */
+
+require_once dirname(__FILE__) . '/../test_framework/phpbb_session_test_case.php';
+
+class phpbb_session_unset_admin_test extends phpbb_session_test_case
+{
+ public function getDataSet()
+ {
+ return $this->createXMLDataSet(dirname(__FILE__) . '/fixtures/sessions_full.xml');
+ }
+
+ function get_test_session()
+ {
+ return $this->session_facade->session_begin(
+ true,
+ // Config
+ array(
+ 'session_length' => time(), // need to do this to allow sessions started at time 0
+ ),
+ // Server
+ array(
+ 'HTTP_USER_AGENT' => "user agent",
+ 'REMOTE_ADDR' => "127.0.0.1",
+ ),
+ // Cookies
+ array(
+ '_sid' => 'bar_session000000000000000000000',
+ '_u' => 4,
+ )
+ );
+ }
+
+ public function test_unset_admin()
+ {
+ $session = $this->get_test_session();
+ $this->assertEquals(1, $session->data['session_admin'], 'should be an admin before test starts');
+ $session->unset_admin();
+ $session = $this->get_test_session();
+ $this->assertEquals(0, $session->data['session_admin'], 'should be not be an admin after unset_admin');
+ }
+}
diff --git a/tests/session/validate_referrer_test.php b/tests/session/validate_referrer_test.php
new file mode 100644
index 0000000000..a302229287
--- /dev/null
+++ b/tests/session/validate_referrer_test.php
@@ -0,0 +1,70 @@
+<?php
+/**
+ *
+ * @package testing
+ * @copyright (c) 2013 phpBB Group
+ * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+ *
+ */
+
+require_once dirname(__FILE__) . '/../test_framework/phpbb_session_test_case.php';
+
+class phpbb_session_validate_referrer_test extends phpbb_session_test_case
+{
+ public function getDataSet()
+ {
+ return $this->createXMLDataSet(dirname(__FILE__) . '/fixtures/sessions_empty.xml');
+ }
+
+ static function referrer_inputs()
+ {
+ $ex = "example.org";
+ $alt = "example.com";
+ return array(
+ // checkpath referrer host forcevars port servername rootpath pass?
+ // 0 Referrer or host wasn't collected, therefore should validate
+ array(false, '', $ex, false, 80, $ex, '', true),
+ array(false, $ex, '', false, 80, $ex, '', true),
+ // 2 Referrer doesn't match host or server_name
+ array(false, $alt, $ex, false, 80, $ex, '', false),
+ // 3 Everything should check out
+ array(false, $ex, $ex, false, 80, $ex, '', true),
+ // 4 Check Script Path
+ array(true, $ex, $ex, false, 80, $ex, '', true),
+ array(true, "$ex/foo", $ex, false, 80, $ex, "/foo", true),
+ array(true, "$ex/bar", $ex, false, 80, $ex, "/foo", false),
+ // 7 Port (This is not checked unless path is checked)
+ array(true, "$ex:80/foo", "$ex:80", false, 80, "$ex:80", "/foo", true),
+ array(true, "$ex:80/bar", "$ex:80", false, 80, "$ex:80", "/foo", false),
+ array(true, "$ex:79/foo", "$ex:81", false, 81, "$ex:81", "/foo", false),
+ );
+ }
+
+ /** @dataProvider referrer_inputs */
+ function test_referrer_inputs(
+ $check_script_path,
+ $referrer,
+ $host,
+ $force_server_vars,
+ $server_port,
+ $server_name,
+ $root_script_path,
+ $pass_or_fail
+ )
+ {
+ // Referrer needs http:// because it's going to get stripped in function.
+ $referrer = $referrer ? 'http://' . $referrer : '';
+ $this->assertEquals(
+ $pass_or_fail,
+ $this->session_facade->validate_referer(
+ $check_script_path,
+ $referrer,
+ $host,
+ $force_server_vars,
+ $server_port,
+ $server_name,
+ $root_script_path
+ ),
+ "referrer should" . ($pass_or_fail ? '' : "n't") . " be validated");
+ }
+}
diff --git a/tests/template/datasets/event_inheritance/ext/kappa/styles/all/template/event/test.html b/tests/template/datasets/event_inheritance/ext/kappa/styles/all/template/event/test.html
new file mode 100644
index 0000000000..3eb906a09e
--- /dev/null
+++ b/tests/template/datasets/event_inheritance/ext/kappa/styles/all/template/event/test.html
@@ -0,0 +1 @@
+Kappa test event in all
diff --git a/tests/template/datasets/event_inheritance/ext/kappa/styles/silver/template/event/test.html b/tests/template/datasets/event_inheritance/ext/kappa/styles/silver/template/event/test.html
new file mode 100644
index 0000000000..3b65d80a6d
--- /dev/null
+++ b/tests/template/datasets/event_inheritance/ext/kappa/styles/silver/template/event/test.html
@@ -0,0 +1 @@
+Kappa test event in silver
diff --git a/tests/template/datasets/event_inheritance/ext/kappa/styles/silver_inherit/template/event/test.html b/tests/template/datasets/event_inheritance/ext/kappa/styles/silver_inherit/template/event/test.html
new file mode 100644
index 0000000000..26826d59e3
--- /dev/null
+++ b/tests/template/datasets/event_inheritance/ext/kappa/styles/silver_inherit/template/event/test.html
@@ -0,0 +1 @@
+Kappa test event in silver_inherit
diff --git a/tests/template/datasets/event_inheritance/ext/omega/styles/all/template/event/test.html b/tests/template/datasets/event_inheritance/ext/omega/styles/all/template/event/test.html
new file mode 100644
index 0000000000..003d193dc3
--- /dev/null
+++ b/tests/template/datasets/event_inheritance/ext/omega/styles/all/template/event/test.html
@@ -0,0 +1 @@
+Omega test event in all
diff --git a/tests/template/datasets/event_inheritance/ext/omega/styles/silver/template/event/test.html b/tests/template/datasets/event_inheritance/ext/omega/styles/silver/template/event/test.html
new file mode 100644
index 0000000000..6bf06f5457
--- /dev/null
+++ b/tests/template/datasets/event_inheritance/ext/omega/styles/silver/template/event/test.html
@@ -0,0 +1 @@
+Omega test event in silver
diff --git a/tests/template/datasets/event_inheritance/ext/omega/styles/silver/template/event/two.html b/tests/template/datasets/event_inheritance/ext/omega/styles/silver/template/event/two.html
new file mode 100644
index 0000000000..7f8058f4e4
--- /dev/null
+++ b/tests/template/datasets/event_inheritance/ext/omega/styles/silver/template/event/two.html
@@ -0,0 +1 @@
+two in silver in omega
diff --git a/tests/template/datasets/event_inheritance/ext/zeta/styles/all/template/event/test.html b/tests/template/datasets/event_inheritance/ext/zeta/styles/all/template/event/test.html
new file mode 100644
index 0000000000..5fc7e5ac12
--- /dev/null
+++ b/tests/template/datasets/event_inheritance/ext/zeta/styles/all/template/event/test.html
@@ -0,0 +1 @@
+Zeta test event in all
diff --git a/tests/template/datasets/event_inheritance/styles/silver/template/event_test.html b/tests/template/datasets/event_inheritance/styles/silver/template/event_test.html
new file mode 100644
index 0000000000..4d78dddb12
--- /dev/null
+++ b/tests/template/datasets/event_inheritance/styles/silver/template/event_test.html
@@ -0,0 +1 @@
+<!-- EVENT test -->
diff --git a/tests/template/datasets/event_inheritance/styles/silver/template/event_two.html b/tests/template/datasets/event_inheritance/styles/silver/template/event_two.html
new file mode 100644
index 0000000000..fe46be3782
--- /dev/null
+++ b/tests/template/datasets/event_inheritance/styles/silver/template/event_two.html
@@ -0,0 +1 @@
+<!-- EVENT two -->
diff --git a/tests/template/datasets/event_inheritance/styles/silver_inherit/template/event_test.html b/tests/template/datasets/event_inheritance/styles/silver_inherit/template/event_test.html
new file mode 100644
index 0000000000..4d78dddb12
--- /dev/null
+++ b/tests/template/datasets/event_inheritance/styles/silver_inherit/template/event_test.html
@@ -0,0 +1 @@
+<!-- EVENT test -->
diff --git a/tests/template/datasets/ext_trivial/ext/trivial/styles/all/template/event/event_variable_spacing.html b/tests/template/datasets/ext_trivial/ext/trivial/styles/all/template/event/event_variable_spacing.html
new file mode 100644
index 0000000000..028f8aa0d1
--- /dev/null
+++ b/tests/template/datasets/ext_trivial/ext/trivial/styles/all/template/event/event_variable_spacing.html
@@ -0,0 +1,6 @@
+|{VARIABLE}|
+{VARIABLE}|{VARIABLE}|
+
+|{VARIABLE}
+
+<div class="{VARIABLE}">test</div>
diff --git a/tests/template/datasets/ext_trivial/ext/trivial/styles/all/template/event/test_event_loop.html b/tests/template/datasets/ext_trivial/ext/trivial/styles/all/template/event/test_event_loop.html
new file mode 100644
index 0000000000..235e129f85
--- /dev/null
+++ b/tests/template/datasets/ext_trivial/ext/trivial/styles/all/template/event/test_event_loop.html
@@ -0,0 +1 @@
+{event_loop.S_ROW_COUNT}<!-- IF not event_loop.S_LAST_ROW -->|<!-- ENDIF -->
diff --git a/tests/template/datasets/ext_trivial/ext/trivial/styles/all/template/event/universal.html b/tests/template/datasets/ext_trivial/ext/trivial/styles/all/template/event/universal.html
new file mode 100644
index 0000000000..f2c5762ade
--- /dev/null
+++ b/tests/template/datasets/ext_trivial/ext/trivial/styles/all/template/event/universal.html
@@ -0,0 +1 @@
+Universal in trivial extension.
diff --git a/tests/template/datasets/ext_trivial/ext/trivial/styles/silver/template/event/simple.html b/tests/template/datasets/ext_trivial/ext/trivial/styles/silver/template/event/simple.html
new file mode 100644
index 0000000000..fe32a1ed3f
--- /dev/null
+++ b/tests/template/datasets/ext_trivial/ext/trivial/styles/silver/template/event/simple.html
@@ -0,0 +1 @@
+Simple in trivial extension.
diff --git a/tests/template/datasets/ext_trivial/styles/silver/template/event_loop.html b/tests/template/datasets/ext_trivial/styles/silver/template/event_loop.html
new file mode 100644
index 0000000000..c70d8f86d7
--- /dev/null
+++ b/tests/template/datasets/ext_trivial/styles/silver/template/event_loop.html
@@ -0,0 +1,3 @@
+<!-- BEGIN event_loop -->
+event_loop<!-- EVENT test_event_loop -->
+<!-- END event_loop -->
diff --git a/tests/template/datasets/ext_trivial/styles/silver/template/event_simple.html b/tests/template/datasets/ext_trivial/styles/silver/template/event_simple.html
new file mode 100644
index 0000000000..604c1acdce
--- /dev/null
+++ b/tests/template/datasets/ext_trivial/styles/silver/template/event_simple.html
@@ -0,0 +1 @@
+<!-- EVENT simple -->
diff --git a/tests/template/datasets/ext_trivial/styles/silver/template/event_universal.html b/tests/template/datasets/ext_trivial/styles/silver/template/event_universal.html
new file mode 100644
index 0000000000..15425cacc3
--- /dev/null
+++ b/tests/template/datasets/ext_trivial/styles/silver/template/event_universal.html
@@ -0,0 +1 @@
+<!-- EVENT universal -->
diff --git a/tests/template/datasets/ext_trivial/styles/silver/template/variable_spacing.html b/tests/template/datasets/ext_trivial/styles/silver/template/variable_spacing.html
new file mode 100644
index 0000000000..49d8a6b873
--- /dev/null
+++ b/tests/template/datasets/ext_trivial/styles/silver/template/variable_spacing.html
@@ -0,0 +1 @@
+<!-- EVENT event_variable_spacing -->
diff --git a/tests/template/includephp_test.php b/tests/template/includephp_test.php
new file mode 100644
index 0000000000..a0dd8368cf
--- /dev/null
+++ b/tests/template/includephp_test.php
@@ -0,0 +1,56 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2011 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+require_once dirname(__FILE__) . '/template_test_case.php';
+
+class phpbb_template_includephp_test extends phpbb_template_template_test_case
+{
+ public function test_includephp_relative()
+ {
+ $this->setup_engine(array('tpl_allow_php' => true));
+
+ $this->run_template('includephp_relative.html', array(), array(), array(), "Path is relative to board root.\ntesting included php");
+
+ $this->template->set_filenames(array('test' => 'includephp_relative.html'));
+ $this->assertEquals("Path is relative to board root.\ntesting included php", $this->display('test'), "Testing INCLUDEPHP");
+ }
+
+ public function test_includephp_variables()
+ {
+ $this->setup_engine(array('tpl_allow_php' => true));
+
+ $this->run_template('includephp_variables.html', array('TEMPLATES' => 'templates'), array(), array(), "Path includes variables.\ntesting included php");
+
+ $this->template->set_filenames(array('test' => 'includephp_variables.html'));
+ $this->assertEquals("Path includes variables.\ntesting included php", $this->display('test'), "Testing INCLUDEPHP");
+ }
+
+ public function test_includephp_absolute()
+ {
+ global $phpbb_root_path;
+
+ $path_to_php = str_replace('\\', '/', dirname(__FILE__)) . '/templates/_dummy_include.php.inc';
+ $this->assertTrue(phpbb_is_absolute($path_to_php));
+ $template_text = "Path is absolute.\n<!-- INCLUDEPHP $path_to_php -->";
+
+ $cache_dir = $phpbb_root_path . 'cache/';
+ $fp = fopen($cache_dir . 'includephp_absolute.html', 'w');
+ fputs($fp, $template_text);
+ fclose($fp);
+
+ $this->setup_engine(array('tpl_allow_php' => true));
+
+ $this->template->set_custom_style('tests', $cache_dir);
+
+ $this->run_template('includephp_absolute.html', array(), array(), array(), "Path is absolute.\ntesting included php");
+
+ $this->template->set_filenames(array('test' => 'includephp_absolute.html'));
+ $this->assertEquals("Path is absolute.\ntesting included php", $this->display('test'), "Testing INCLUDEPHP");
+ }
+}
diff --git a/tests/template/parent_templates/parent_and_child.html b/tests/template/parent_templates/parent_and_child.html
new file mode 100644
index 0000000000..71984b48ad
--- /dev/null
+++ b/tests/template/parent_templates/parent_and_child.html
@@ -0,0 +1 @@
+Parent template.
diff --git a/tests/template/parent_templates/parent_and_child.js b/tests/template/parent_templates/parent_and_child.js
new file mode 100644
index 0000000000..6d9bb163bf
--- /dev/null
+++ b/tests/template/parent_templates/parent_and_child.js
@@ -0,0 +1 @@
+// JavaScript file in a parent style.
diff --git a/tests/template/parent_templates/parent_only.css b/tests/template/parent_templates/parent_only.css
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/tests/template/parent_templates/parent_only.css
diff --git a/tests/template/parent_templates/parent_only.html b/tests/template/parent_templates/parent_only.html
new file mode 100644
index 0000000000..8cfb90eca2
--- /dev/null
+++ b/tests/template/parent_templates/parent_only.html
@@ -0,0 +1 @@
+Only in parent.
diff --git a/tests/template/parent_templates/parent_only.js b/tests/template/parent_templates/parent_only.js
new file mode 100644
index 0000000000..9c3007d83f
--- /dev/null
+++ b/tests/template/parent_templates/parent_only.js
@@ -0,0 +1 @@
+// JavaScript file only in parent style.
diff --git a/tests/template/subdir/includephp_from_subdir_test.php b/tests/template/subdir/includephp_from_subdir_test.php
new file mode 100644
index 0000000000..6f9bc1efa6
--- /dev/null
+++ b/tests/template/subdir/includephp_from_subdir_test.php
@@ -0,0 +1,27 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2011 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+require_once dirname(__FILE__) . '/../template_test_case.php';
+
+class phpbb_template_subdir_includephp_from_subdir_test extends phpbb_template_template_test_case
+{
+ // Exact copy of test_includephp_relatve from ../includephp_test.php.
+ // Verifies that relative php inclusion works when including script
+ // (and thus current working directory) is in a subdirectory of
+ // board root.
+ public function test_includephp_relative()
+ {
+ $this->setup_engine(array('tpl_allow_php' => true));
+
+ $this->run_template('includephp_relative.html', array(), array(), array(), "Path is relative to board root.\ntesting included php");
+
+ $this->template->set_filenames(array('test' => 'includephp_relative.html'));
+ $this->assertEquals("Path is relative to board root.\ntesting included php", $this->display('test'), "Testing INCLUDEPHP");
+ }
+}
diff --git a/tests/template/template_events_test.php b/tests/template/template_events_test.php
new file mode 100644
index 0000000000..41e00e86a7
--- /dev/null
+++ b/tests/template/template_events_test.php
@@ -0,0 +1,130 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2011 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+require_once dirname(__FILE__) . '/template_test_case.php';
+
+class phpbb_template_template_events_test extends phpbb_template_template_test_case
+{
+ public function template_data()
+ {
+ return array(
+ /*
+ array(
+ '', // Description
+ '', // dataset
+ array(), // style names
+ '', // file
+ array(), // vars
+ array(), // block vars
+ array(), // destroy
+ '', // expected result
+ ),
+ */
+ array(
+ 'Simple template event',
+ 'ext_trivial',
+ array(),
+ 'event_simple.html',
+ array(),
+ array(),
+ array(),
+ "Simple in trivial extension.",
+ ),
+ array(
+ 'Universal template event ("all" style)',
+ 'ext_trivial',
+ array(),
+ 'event_universal.html',
+ array(),
+ array(),
+ array(),
+ "Universal in trivial extension.",
+ ),
+ array(
+ 'Template event with inheritance - parent',
+ 'event_inheritance',
+ array('silver'),
+ 'event_test.html',
+ array(),
+ array(),
+ array(),
+'Kappa test event in silver
+Omega test event in silver
+Zeta test event in all',
+ ),
+ array(
+ 'Template event with inheritance - child',
+ 'event_inheritance',
+ array('silver_inherit', 'silver'),
+ 'event_test.html',
+ array(),
+ array(),
+ array(),
+'Kappa test event in silver_inherit
+Omega test event in silver
+Zeta test event in all',
+ ),
+ array(
+ 'Definition in parent style',
+ 'event_inheritance',
+ array('silver_inherit', 'silver'),
+ 'event_two.html',
+ array(),
+ array(),
+ array(),
+'two in silver in omega',
+ ),
+ array(
+ 'EVENT in loop',
+ 'ext_trivial',
+ array('silver'),
+ 'event_loop.html',
+ array(),
+ array('event_loop' => array(array(), array(), array())),
+ array(),
+ 'event_loop0|event_loop1|event_loop2',
+ ),
+ );
+ }
+
+ /**
+ * @dataProvider template_data
+ */
+ public function test_event($desc, $dataset, $style_names, $file, array $vars, array $block_vars, array $destroy, $expected)
+ {
+ // Reset the engine state
+ $this->setup_engine_for_events($dataset, $style_names);
+
+ // Run test
+ $this->run_template($file, $vars, $block_vars, $destroy, $expected);
+ }
+
+ protected function setup_engine_for_events($dataset, $style_names, array $new_config = array())
+ {
+ global $phpbb_root_path, $phpEx, $user;
+
+ $defaults = $this->config_defaults();
+ $config = new \phpbb\config\config(array_merge($defaults, $new_config));
+
+ $this->template_path = dirname(__FILE__) . "/datasets/$dataset/styles/silver/template";
+ $this->extension_manager = new phpbb_mock_filesystem_extension_manager(
+ dirname(__FILE__) . "/datasets/$dataset/"
+ );
+ $path_helper = new \phpbb\path_helper(
+ new \phpbb\symfony_request(
+ new phpbb_mock_request()
+ ),
+ new \phpbb\filesystem(),
+ $phpbb_root_path,
+ $phpEx
+ );
+ $this->template = new \phpbb\template\twig\twig($path_helper, $config, $user, new \phpbb\template\context, $this->extension_manager);
+ $this->template->set_custom_style(((!empty($style_names)) ? $style_names : 'silver'), array($this->template_path));
+ }
+}
diff --git a/tests/template/template_includecss_test.php b/tests/template/template_includecss_test.php
new file mode 100644
index 0000000000..9ed8bd0947
--- /dev/null
+++ b/tests/template/template_includecss_test.php
@@ -0,0 +1,28 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+require_once dirname(__FILE__) . '/template_test_case_with_tree.php';
+
+class phpbb_template_template_includecss_test extends phpbb_template_template_test_case_with_tree
+{
+ public function test_includecss_compilation()
+ {
+ // Reset the engine state
+ $this->setup_engine(array('assets_version' => 1));
+
+ // Prepare correct result
+ $scripts = array(
+ '<link href="tests/template/templates/child_only.css?assets_version=1" rel="stylesheet" type="text/css" media="screen, projection" />',
+ '<link href="tests/template/parent_templates/parent_only.css?assets_version=1" rel="stylesheet" type="text/css" media="screen, projection" />',
+ );
+
+ // Run test
+ $this->run_template('includecss.html', array(), array(), array(), implode('', $scripts));
+ }
+}
diff --git a/tests/template/template_includejs_test.php b/tests/template/template_includejs_test.php
new file mode 100644
index 0000000000..b20d068a64
--- /dev/null
+++ b/tests/template/template_includejs_test.php
@@ -0,0 +1,105 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2011 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+require_once dirname(__FILE__) . '/template_test_case_with_tree.php';
+
+class phpbb_template_template_includejs_test extends phpbb_template_template_test_case_with_tree
+{
+ public function template_data()
+ {
+ $this->setup_engine();
+
+ return array(
+ /*
+ array(
+ // vars
+ // expected
+ ),
+ */
+ array(
+ array('TEST' => 1),
+ '<script type="text/javascript" src="tests/template/templates/parent_and_child.js?assets_version=1"></script>',
+ ),
+ array(
+ array('TEST' => 2),
+ '<script type="text/javascript" src="tests/template/templates/parent_and_child.js?assets_version=0"></script>',
+ ),
+ array(
+ array('TEST' => 3),
+ '<script type="text/javascript" src="tests/template/templates/parent_and_child.js?test=1&assets_version=0"></script>',
+ ),
+ array(
+ array('TEST' => 4),
+ '<script type="text/javascript" src="tests/template/templates/parent_and_child.js?test=1&amp;assets_version=0"></script>',
+ ),
+ array(
+ array('TEST' => 6),
+ '<script type="text/javascript" src="tests/template/parent_templates/parent_only.js?assets_version=1"></script>',
+ ),
+ array(
+ array('TEST' => 7),
+ '<script type="text/javascript" src="tests/template/templates/child_only.js?assets_version=1"></script>',
+ ),
+ array(
+ array('TEST' => 8),
+ '<script type="text/javascript" src="tests/template/templates/subdir/parent_only.js?assets_version=1"></script>',
+ ),
+ array(
+ array('TEST' => 9),
+ '<script type="text/javascript" src="tests/template/templates/subdir/subsubdir/parent_only.js?assets_version=1"></script>',
+ ),
+ array(
+ array('TEST' => 10),
+ '<script type="text/javascript" src="tests/template/templates/subdir/parent_only.js?assets_version=1"></script>',
+ ),
+ array(
+ array('TEST' => 11),
+ '<script type="text/javascript" src="tests/template/templates/child_only.js?test1=1&amp;test2=2&amp;assets_version=1#test3"></script>',
+ ),
+ array(
+ array('TEST' => 12),
+ '<script type="text/javascript" src="tests/template/parent_templates/parent_only.js?test1=1&amp;test2=2&amp;assets_version=1#test3"></script>',
+ ),
+ array(
+ array('TEST' => 14),
+ '<script type="text/javascript" src="tests/template/parent_templates/parent_only.js?test1=&quot;&amp;assets_version=1#test3"></script>',
+ ),
+ array(
+ array('TEST' => 15),
+ '<script type="text/javascript" src="http://phpbb.com/b.js?c=d#f"></script>',
+ ),
+ array(
+ array('TEST' => 16),
+ '<script type="text/javascript" src="http://phpbb.com/b.js?c=d&assets_version=2#f"></script>',
+ ),
+ array(
+ array('TEST' => 17),
+ '<script type="text/javascript" src="//phpbb.com/b.js"></script>',
+ ),
+ array(
+ array('TEST' => 18),
+ '<script type="text/javascript" src="tests/template/templates/parent_and_child.js?test=1&test2=0&amp;assets_version=1"></script>',
+ ),
+ );
+ }
+
+ /**
+ * @dataProvider template_data
+ */
+ public function test_includejs_compilation($vars, $expected)
+ {
+ // Reset the engine state
+ $this->setup_engine(array('assets_version' => 1));
+
+ $this->template->assign_vars($vars);
+
+ // Run test
+ $this->run_template('includejs.html', array_merge(array('PARENT' => 'parent_only.js', 'SUBDIR' => 'subdir', 'EXT' => 'js'), $vars), array(), array(), $expected);
+ }
+}
diff --git a/tests/template/template_inheritance_test.php b/tests/template/template_inheritance_test.php
new file mode 100644
index 0000000000..cc71ff99e0
--- /dev/null
+++ b/tests/template/template_inheritance_test.php
@@ -0,0 +1,55 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2011 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+require_once dirname(__FILE__) . '/template_test_case_with_tree.php';
+
+class phpbb_template_template_inheritance_test extends phpbb_template_template_test_case_with_tree
+{
+ /**
+ * @todo put test data into templates/xyz.test
+ */
+ public function template_data()
+ {
+ return array(
+ // First element of the array is test name - keep them distinct
+ array(
+ 'simple inheritance - only parent template exists',
+ 'parent_only.html',
+ array(),
+ array(),
+ array(),
+ "Only in parent.",
+ ),
+ array(
+ 'simple inheritance - only child template exists',
+ 'child_only.html',
+ array(),
+ array(),
+ array(),
+ "Only in child.",
+ ),
+ array(
+ 'simple inheritance - both parent and child templates exist',
+ 'parent_and_child.html',
+ array(),
+ array(),
+ array(),
+ "Child template.",
+ ),
+ );
+ }
+
+ /**
+ * @dataProvider template_data
+ */
+ public function test_template($name, $file, array $vars, array $block_vars, array $destroy, $expected)
+ {
+ $this->run_template($file, $vars, $block_vars, $destroy, $expected);
+ }
+}
diff --git a/tests/template/template_parser_test.php b/tests/template/template_parser_test.php
new file mode 100644
index 0000000000..c200770adf
--- /dev/null
+++ b/tests/template/template_parser_test.php
@@ -0,0 +1,29 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php';
+require_once dirname(__FILE__) . '/template_test_case.php';
+
+class phpbb_template_template_parser_test extends phpbb_template_template_test_case
+{
+ public function test_set_filenames()
+ {
+ $this->template->set_filenames(array(
+ 'basic' => 'basic.html',
+ ));
+
+ $this->assertEquals("passpasspass<!-- DUMMY var -->", str_replace(array("\n", "\r", "\t"), '', $this->template->assign_display('basic')));
+
+ $this->template->set_filenames(array(
+ 'basic' => 'if.html',
+ ));
+
+ $this->assertEquals("03!false", str_replace(array("\n", "\r", "\t"), '', $this->template->assign_display('basic')));
+ }
+}
diff --git a/tests/template/template_test.php b/tests/template/template_test.php
index 94ec2ab8a7..74baa3d5b6 100644
--- a/tests/template/template_test.php
+++ b/tests/template/template_test.php
@@ -8,104 +8,14 @@
*/
require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php';
-require_once dirname(__FILE__) . '/../../phpBB/includes/template.php';
+require_once dirname(__FILE__) . '/template_test_case.php';
-class phpbb_template_template_test extends phpbb_test_case
+class phpbb_template_template_test extends phpbb_template_template_test_case
{
- private $template;
- private $template_path;
-
- // Keep the contents of the cache for debugging?
- const PRESERVE_CACHE = true;
-
- private function display($handle)
- {
- // allow the templates to throw notices
- $error_level = error_reporting();
- error_reporting($error_level & ~E_NOTICE);
-
- ob_start();
-
- try
- {
- $this->assertTrue($this->template->display($handle, false));
- }
- catch (Exception $exception)
- {
- // reset the error level even when an error occurred
- // PHPUnit turns trigger_error into exceptions as well
- error_reporting($error_level);
- ob_end_clean();
- throw $exception;
- }
-
- $result = self::trim_template_result(ob_get_clean());
-
- // reset error level
- error_reporting($error_level);
- return $result;
- }
-
- private static function trim_template_result($result)
- {
- return str_replace("\n\n", "\n", implode("\n", array_map('trim', explode("\n", trim($result)))));
- }
-
- private function setup_engine()
- {
- $this->template_path = dirname(__FILE__) . '/templates';
- $this->template = new template();
- $this->template->set_custom_template($this->template_path, 'tests');
- }
-
- protected function setUp()
- {
- // Test the engine can be used
- $this->setup_engine();
-
- $template_cache_dir = dirname($this->template->cachepath);
- if (!is_writable($template_cache_dir))
- {
- $this->markTestSkipped("Template cache directory ({$template_cache_dir}) is not writable.");
- }
-
- $file_array = scandir($template_cache_dir);
- $file_prefix = basename($this->template->cachepath);
- foreach ($file_array as $file)
- {
- if (strpos($file, $file_prefix) === 0)
- {
- unlink($template_cache_dir . '/' . $file);
- }
- }
-
- $GLOBALS['config'] = array(
- 'load_tplcompile' => true,
- 'tpl_allow_php' => false,
- );
- }
-
- protected function tearDown()
- {
- if (is_object($this->template))
- {
- $template_cache_dir = dirname($this->template->cachepath);
- $file_array = scandir($template_cache_dir);
- $file_prefix = basename($this->template->cachepath);
- foreach ($file_array as $file)
- {
- if (strpos($file, $file_prefix) === 0)
- {
- unlink($template_cache_dir . '/' . $file);
- }
- }
- }
- }
-
/**
* @todo put test data into templates/xyz.test
*/
- static public function template_data()
+ public function template_data()
{
return array(
/*
@@ -122,7 +32,7 @@ class phpbb_template_template_test extends phpbb_test_case
array(),
array(),
array(),
- "pass\npass\n<!-- DUMMY var -->",
+ "pass\npass\npass\n<!-- DUMMY var -->",
),
array(
'variable.html',
@@ -136,28 +46,56 @@ class phpbb_template_template_test extends phpbb_test_case
array(),
array(),
array(),
- '0',
+ '03!false',
),
array(
'if.html',
array('S_VALUE' => true),
array(),
array(),
- "1\n0",
+ '1!false',
),
array(
'if.html',
array('S_VALUE' => true, 'S_OTHER_VALUE' => true),
array(),
array(),
- '1',
+ '1!false',
+ ),
+ array(
+ 'if.html',
+ array('S_OTHER_OTHER_VALUE' => true),
+ array(),
+ array(),
+ '|S_OTHER_OTHER_VALUE|!false',
),
array(
'if.html',
array('S_VALUE' => false, 'S_OTHER_VALUE' => true),
array(),
array(),
- '2',
+ '2!false',
+ ),
+ array(
+ 'if.html',
+ array('S_TEST' => false),
+ array(),
+ array(),
+ '03false',
+ ),
+ array(
+ 'if.html',
+ array('S_TEST' => 0),
+ array(),
+ array(),
+ '03!false',
+ ),
+ array(
+ 'if.html',
+ array('VALUE_TEST' => 'value'),
+ array(),
+ array(),
+ '03!falsevalue',
),
array(
'loop.html',
@@ -169,65 +107,88 @@ class phpbb_template_template_test extends phpbb_test_case
array(
'loop.html',
array(),
- array('loop' => array(array())),
+ array('test_loop' => array(array())),
array(),
"loop\nloop",
),
array(
'loop.html',
array(),
- array('loop' => array(array(), array()), 'loop.block' => array(array())),
+ array('test_loop' => array(array(), array()), 'test_loop.block' => array(array())),
array(),
"loop\nloop\nloop\nloop",
),
array(
'loop.html',
array(),
- array('loop' => array(array(), array()), 'loop.block' => array(array()), 'block' => array(array(), array())),
+ array('test_loop' => array(array(), array()), 'test_loop.block' => array(array()), 'block' => array(array(), array())),
array(),
"loop\nloop\nloop\nloop\nloop#0-block#0\nloop#0-block#1\nloop#1-block#0\nloop#1-block#1",
),
array(
'loop_vars.html',
array(),
- array('loop' => array(array('VARIABLE' => 'x'))),
+ array('test_loop' => array(array('VARIABLE' => 'x'))),
array(),
- "first\n0\nx\nset\nlast",
- ),/* no nested top level loops
+ "first\n0 - a\nx - b\nset\nlast",
+ ),
array(
'loop_vars.html',
array(),
- array('loop' => array(array('VARIABLE' => 'x'), array('VARIABLE' => 'y'))),
+ array('test_loop' => array(array('VARIABLE' => 'x'), array('VARIABLE' => 'y'))),
array(),
- "first\n0\n0\n2\nx\nset\n1\n1\n2\ny\nset\nlast",
+ "first\n0 - a\nx - b\nset\n1 - a\ny - b\nset\nlast",
),
array(
'loop_vars.html',
array(),
- array('loop' => array(array('VARIABLE' => 'x'), array('VARIABLE' => 'y')), 'loop.inner' => array(array(), array())),
+ array('test_loop' => array(array('VARIABLE' => 'x'), array('VARIABLE' => 'y')), 'test_loop.inner' => array(array(), array())),
array(),
- "first\n0\n0\n2\nx\nset\n1\n1\n2\ny\nset\nlast\n0\n\n1\nlast inner\ninner loop",
- ),*/
+ "first\n0 - a\nx - b\nset\n1 - a\ny - b\nset\nlast\n0 - c\n1 - c\nlast inner",
+ ),
array(
'loop_advanced.html',
array(),
- array('loop' => array(array(), array(), array(), array(), array(), array(), array())),
+ array('test_loop' => array(array(), array(), array(), array(), array(), array(), array())),
array(),
"101234561\nx\n101234561\nx\n101234561\nx\n1234561\nx\n1\nx\n101\nx\n234\nx\n10\nx\n561\nx\n561",
),
array(
+ 'loop_nested2.html',
+ array(),
+ array('outer' => array(array(), array()), 'outer.middle' => array(array(), array())),
+ array(),
+ "o0o1m01m11",
+ ),
+ array(
'define.html',
array(),
- array('loop' => array(array(), array(), array(), array(), array(), array(), array()), 'test' => array(array()), 'test.deep' => array(array()), 'test.deep.defines' => array(array())),
+ array('test_loop' => array(array(), array(), array(), array(), array(), array(), array()), 'test' => array(array()), 'test.deep' => array(array()), 'test.deep.defines' => array(array())),
+ array(),
+ "xyz\nabc\n\$VALUE == 'abc'\n(\$VALUE == 'abc')\n((\$VALUE == 'abc'))\n!\$DOESNT_EXIST\n(!\$DOESNT_EXIST)\nabc\nbar\nbar\nabc\ntest!@#$%^&*()_-=+{}[]:;\",<.>/?[]|foobar|false",
+ ),
+ array(
+ 'define_advanced.html',
array(),
- "xyz\nabc",
+ array('test_loop' => array(array(), array(), array(), array(), array(), array(), array()), 'test' => array(array()), 'test.deep' => array(array()), 'test.deep.defines' => array(array())),
+ array(),
+ "abc\nzxc\ncde\nbcd",
),
array(
'expressions.html',
array(),
array(),
array(),
- trim(str_repeat("pass", 39)),
+ trim(str_repeat("pass\n", 10) . "\n"
+ . str_repeat("pass\n", 4) . "\n"
+ . str_repeat("pass\n", 2) . "\n"
+ . str_repeat("pass\n", 6) . "\n"
+ . str_repeat("pass\n", 2) . "\n"
+ . str_repeat("pass\n", 6) . "\n"
+ . str_repeat("pass\n", 2) . "\n"
+ . str_repeat("pass\n", 2) . "\n"
+ . str_repeat("pass\n", 3) . "\n"
+ . str_repeat("pass\n", 2) . "\n"),
),
array(
'php.html',
@@ -251,10 +212,31 @@ class phpbb_template_template_test extends phpbb_test_case
'value',
),
array(
+ 'include_loop.html',
+ array(),
+ array('test_loop' => array(array('NESTED_FILE' => 'include_loop1.html')), 'test_loop.inner' => array(array('NESTED_FILE' => 'include_loop1.html'), array('NESTED_FILE' => 'include_loop2.html'), array('NESTED_FILE' => 'include_loop3.html'))),
+ array(),
+ "1\n_1\n_02\n_3",
+ ),
+ array(
+ 'include_variable.html',
+ array('FILE' => 'variable.html', 'VARIABLE' => 'value'),
+ array(),
+ array(),
+ 'value',
+ ),
+ array(
+ 'include_variables.html',
+ array('SUBDIR' => 'subdir', 'VARIABLE' => 'value'),
+ array(),
+ array(),
+ 'value',
+ ),
+ array(
'loop_vars.html',
array(),
- array('loop' => array(array('VARIABLE' => 'x'), array('VARIABLE' => 'y')), 'loop.inner' => array(array(), array())),
- array('loop'),
+ array('test_loop' => array(array('VARIABLE' => 'x'), array('VARIABLE' => 'y')), 'test_loop.inner' => array(array(), array())),
+ array('test_loop'),
'',
),
array(
@@ -262,12 +244,12 @@ class phpbb_template_template_test extends phpbb_test_case
array('VARIABLE' => 'variable.html'),
array(),
array(),
- 'variable.html',
+ "variable.html\nvariable.html\nvariable.html",
),
array(
'include_loop_define.html',
array('VARIABLE' => 'value'),
- array('loop' => array(array('NESTED_FILE' => 'variable.html'))),
+ array('test_loop' => array(array('NESTED_FILE' => 'variable.html'))),
array(),
'value',
),
@@ -275,30 +257,85 @@ class phpbb_template_template_test extends phpbb_test_case
array(
'loop_vars.html',
array(),
- array('loop' => array(array('VARIABLE' => 'x'), array('VARIABLE' => 'y')), 'loop.inner' => array(array(), array())),
- array('loop.inner'),
+ array('test_loop' => array(array('VARIABLE' => 'x'), array('VARIABLE' => 'y')), 'test_loop.inner' => array(array(), array())),
+ array('test_loop.inner'),
"first\n0\n0\n2\nx\nset\n1\n1\n2\ny\nset\nlast",
),*/
array(
- 'lang.html',
+ // Just like a regular loop but the name begins
+ // with an underscore
+ 'loop_underscore.html',
array(),
array(),
array(),
- "{ VARIABLE }\n{ VARIABLE }",
+ "noloop\nnoloop",
),
array(
'lang.html',
- array('L_VARIABLE' => "Value'"),
array(),
array(),
- "Value'\nValue\'",
+ array(),
+ "VARIABLE\n1_VARIABLE\nVARIABLE\n1_VARIABLE",
),
array(
'lang.html',
- array('LA_VARIABLE' => "Value'"),
array(),
array(),
- "{ VARIABLE }\nValue'",
+ array(),
+ "Value'\n1 O'Clock\nValue\'\n1 O\'Clock",
+ array('VARIABLE' => "Value'", '1_VARIABLE' => "1 O'Clock"),
+ ),
+ array(
+ 'loop_nested_multilevel_ref.html',
+ array(),
+ array(),
+ array(),
+ "top-level content",
+ ),
+ array(
+ 'loop_nested_multilevel_ref.html',
+ array(),
+ array('outer' => array(array('VARIABLE' => 'x'), array('VARIABLE' => 'y')), 'outer.inner' => array(array('VARIABLE' => 'z'), array('VARIABLE' => 'zz'))),
+ array(),
+ "top-level content\nouter x\nouter y\ninner z\nfirst row\n\ninner zz",
+ ),
+ array(
+ 'loop_nested_deep_multilevel_ref.html',
+ array(),
+ array('outer' => array(array()), 'outer.middle' => array(array()), 'outer.middle.inner' => array(array('VARIABLE' => 'z'), array('VARIABLE' => 'zz'))),
+ array(),
+ "top-level content\nouter\nmiddle\ninner z\nfirst row of 2 in inner\n\ninner zz",
+ ),
+ array(
+ 'loop_size.html',
+ array(),
+ array('test_loop' => array(array()), 'empty_loop' => array()),
+ array(),
+ "nonexistent = 0\n! nonexistent\n\nempty = 0\n! empty\nloop\n\nin loop",
+ ),
+ array(
+ 'loop_include.html',
+ array(),
+ array('test_loop' => array(array('foo' => 'bar'), array('foo' => 'bar1'))),
+ array(),
+ "barbarbar1bar1",
+ ),
+ /* Does not pass with the current implementation.
+ array(
+ 'loop_reuse.html',
+ array(),
+ array('one' => array(array('VAR' => 'a'), array('VAR' => 'b')), 'one.one' => array(array('VAR' => 'c'), array('VAR' => 'd'))),
+ array(),
+ // Not entirely sure what should be outputted but the current output of "a" is most certainly wrong
+ "a\nb\nc\nd",
+ ),
+ */
+ array(
+ 'twig.html',
+ array('VARIABLE' => 'FOObar',),
+ array(),
+ array(),
+ "13FOOBAR|foobar",
),
);
}
@@ -310,149 +347,96 @@ class phpbb_template_template_test extends phpbb_test_case
$this->template->set_filenames(array('test' => $filename));
$this->assertFileNotExists($this->template_path . '/' . $filename, 'Testing missing file, file cannot exist');
- $expecting = sprintf('template->_tpl_load_file(): File %s does not exist or is empty', realpath($this->template_path . '/../') . '/templates/' . $filename);
- $this->setExpectedTriggerError(E_USER_ERROR, $expecting);
+ $this->setExpectedException('Twig_Error_Loader');
$this->display('test');
}
- public function test_empty_file()
- {
- $expecting = 'template->set_filenames: Empty filename specified for test';
-
- $this->setExpectedTriggerError(E_USER_ERROR, $expecting);
- $this->template->set_filenames(array('test' => ''));
- }
public function test_invalid_handle()
{
- $expecting = 'template->_tpl_load(): No file specified for handle test';
- $this->setExpectedTriggerError(E_USER_ERROR, $expecting);
+ $this->setExpectedException('Twig_Error_Loader');
$this->display('test');
}
- private function run_template($file, array $vars, array $block_vars, array $destroy, $expected, $cache_file)
- {
- $this->template->set_filenames(array('test' => $file));
- $this->template->assign_vars($vars);
-
- foreach ($block_vars as $block => $loops)
- {
- foreach ($loops as $_vars)
- {
- $this->template->assign_block_vars($block, $_vars);
- }
- }
-
- foreach ($destroy as $block)
- {
- $this->template->destroy_block_vars($block);
- }
-
- try
- {
- $this->assertEquals($expected, $this->display('test'), "Testing $file");
- $this->assertFileExists($cache_file);
- }
- catch (ErrorException $e)
- {
- if (file_exists($cache_file))
- {
- copy($cache_file, str_replace('ctpl_', 'tests_ctpl_', $cache_file));
- }
-
- throw $e;
- }
-
- // For debugging
- if (self::PRESERVE_CACHE)
- {
- copy($cache_file, str_replace('ctpl_', 'tests_ctpl_', $cache_file));
- }
- }
-
/**
* @dataProvider template_data
*/
- public function test_template($file, array $vars, array $block_vars, array $destroy, $expected)
+ public function test_template($file, array $vars, array $block_vars, array $destroy, $expected, $lang_vars = array())
{
- $cache_file = $this->template->cachepath . str_replace('/', '.', $file) . '.php';
+ $this->run_template($file, $vars, $block_vars, $destroy, $expected, $lang_vars);
+ }
- $this->assertFileNotExists($cache_file);
+ public function test_assign_display()
+ {
+ $this->run_template('basic.html', array(), array(), array(), "pass\npass\npass\n<!-- DUMMY var -->");
- $this->run_template($file, $vars, $block_vars, $destroy, $expected, $cache_file);
+ $this->template->set_filenames(array(
+ 'test' => 'basic.html',
+ 'container' => 'variable.html',
+ ));
- // Reset the engine state
- $this->setup_engine();
+ $this->template->assign_display('test', 'VARIABLE', false);
- $this->run_template($file, $vars, $block_vars, $destroy, $expected, $cache_file);
+ $this->assertEquals("pass\npass\npass\n<!-- DUMMY var -->", $this->display('container'), "Testing assign_display($file)");
}
- /**
- * @dataProvider template_data
- */
- public function test_assign_display($file, array $vars, array $block_vars, array $destroy, $expected)
+ public function test_append_var_without_assign_var()
{
$this->template->set_filenames(array(
- 'test' => $file,
- 'container' => 'variable.html',
+ 'append_var' => 'variable.html'
));
- $this->template->assign_vars($vars);
- foreach ($block_vars as $block => $loops)
- {
- foreach ($loops as $_vars)
- {
- $this->template->assign_block_vars($block, $_vars);
- }
- }
+ $items = array('This ', 'is ', 'a ', 'test');
+ $expecting = implode('', $items);
- foreach ($destroy as $block)
+ foreach ($items as $word)
{
- $this->template->destroy_block_vars($block);
+ $this->template->append_var('VARIABLE', $word);
}
- $error_level = error_reporting();
- error_reporting($error_level & ~E_NOTICE);
-
- $this->assertEquals($expected, self::trim_template_result($this->template->assign_display('test')), "Testing assign_display($file)");
-
- $this->template->assign_display('test', 'VARIABLE', false);
-
- error_reporting($error_level);
-
- $this->assertEquals($expected, $this->display('container'), "Testing assign_display($file)");
+ $this->assertEquals($expecting, $this->display('append_var'));
}
- public function test_php()
+ public function test_append_var_with_assign_var()
{
- $GLOBALS['config']['tpl_allow_php'] = true;
-
- $cache_file = $this->template->cachepath . 'php.html.php';
+ $this->template->set_filenames(array(
+ 'append_var' => 'variable.html'
+ ));
- $this->assertFileNotExists($cache_file);
+ $start = 'This ';
+ $items = array('is ', 'a ', 'test');
+ $expecting = $start . implode('', $items);
- $this->run_template('php.html', array(), array(), array(), 'test', $cache_file);
+ $this->template->assign_var('VARIABLE', $start);
+ foreach ($items as $word)
+ {
+ $this->template->append_var('VARIABLE', $word);
+ }
- $GLOBALS['config']['tpl_allow_php'] = false;
+ $this->assertEquals($expecting, $this->display('append_var'));
}
- public function test_includephp()
+ public function test_php()
{
- $GLOBALS['config']['tpl_allow_php'] = true;
+ global $phpbb_root_path;
+
+ $template_text = '<!-- PHP -->echo "test";<!-- ENDPHP -->';
- $cache_file = $this->template->cachepath . 'includephp.html.php';
+ $cache_dir = $phpbb_root_path . 'cache/';
+ $fp = fopen($cache_dir . 'php.html', 'w');
+ fputs($fp, $template_text);
+ fclose($fp);
- $this->run_template('includephp.html', array(), array(), array(), 'testing included php', $cache_file);
+ $this->setup_engine(array('tpl_allow_php' => true));
- $this->template->set_filenames(array('test' => 'includephp.html'));
- $this->assertEquals('testing included php', $this->display('test'), "Testing INCLUDEPHP");
+ $this->template->set_custom_style('tests', $cache_dir);
- $GLOBALS['config']['tpl_allow_php'] = false;
+ $this->run_template('php.html', array(), array(), array(), 'test');
}
- static public function alter_block_array_data()
+ public function alter_block_array_data()
{
return array(
array(
@@ -555,10 +539,82 @@ EOT
$this->template->assign_block_vars('outer.middle', array());
$this->template->assign_block_vars('outer.middle', array());
- $this->assertEquals("outer - 0\nmiddle - 0\nmiddle - 1\nouter - 1\nmiddle - 0\nmiddle - 1\nouter - 2\nmiddle - 0\nmiddle - 1", $this->display('test'), 'Ensuring template is built correctly before modification');
+ $this->assertEquals("outer - 0middle - 0middle - 1outer - 1middle - 0middle - 1outer - 2middle - 0middle - 1", $this->display('test'), 'Ensuring template is built correctly before modification');
$this->template->alter_block_array($alter_block, $vararray, $key, $mode);
- $this->assertEquals($expect, $this->display('test'), $description);
+ $this->assertEquals(str_replace(array("\n", "\r", "\t"), '', $expect), str_replace(array("\n", "\r", "\t"), '', $this->display('test')), $description);
}
-}
+ public function test_more_alter_block_array()
+ {
+ $this->template->set_filenames(array('test' => 'loop_nested.html'));
+
+ $this->template->assign_var('TEST_MORE', true);
+
+ // @todo Change this
+ $this->template->assign_block_vars('outer', array());
+ $this->template->assign_block_vars('outer.middle', array());
+ $this->template->assign_block_vars('outer', array());
+ $this->template->assign_block_vars('outer.middle', array());
+ $this->template->assign_block_vars('outer.middle', array());
+ $this->template->assign_block_vars('outer', array());
+ $this->template->assign_block_vars('outer.middle', array());
+ $this->template->assign_block_vars('outer.middle', array());
+ $this->template->assign_block_vars('outer.middle', array());
+
+ $expect = 'outer - 0[outer|3]middle - 0[middle|1]outer - 1[outer|3]middle - 0[middle|2]middle - 1[middle|2]outer - 2[outer|3]middle - 0[middle|3]middle - 1[middle|3]middle - 2[middle|3]';
+ $this->assertEquals($expect, str_replace(array("\n", "\r", "\t"), '', $this->display('test')), 'Ensuring template is built correctly before modification');
+
+ $this->template->alter_block_array('outer', array());
+
+ $expect = 'outer - 0[outer|4]outer - 1[outer|4]middle - 0[middle|1]outer - 2[outer|4]middle - 0[middle|2]middle - 1[middle|2]outer - 3[outer|4]middle - 0[middle|3]middle - 1[middle|3]middle - 2[middle|3]';
+ $this->assertEquals($expect, str_replace(array("\n", "\r", "\t"), '', $this->display('test')), 'Ensuring S_NUM_ROWS is correct after insertion');
+
+ $this->template->alter_block_array('outer', array('VARIABLE' => 'test'), 2, 'change');
+
+ $expect = 'outer - 0[outer|4]outer - 1[outer|4]middle - 0[middle|1]outer - 2 - test[outer|4]middle - 0[middle|2]middle - 1[middle|2]outer - 3[outer|4]middle - 0[middle|3]middle - 1[middle|3]middle - 2[middle|3]';
+ $this->assertEquals($expect, str_replace(array("\n", "\r", "\t"), '', $this->display('test')), 'Ensuring S_NUM_ROWS is correct after modification');
+ }
+
+ public function assign_block_vars_array_data()
+ {
+ return array(
+ array(
+ array(
+ 'outer' => array(
+ array('VARIABLE' => 'Test assigning block vars array loop 0:'),
+ array('VARIABLE' => 'Test assigning block vars array loop 1:'),
+ ),
+ 'outer.middle' => array(
+ array('VARIABLE' => '1st iteration',),
+ array('VARIABLE' => '2nd iteration',),
+ array('VARIABLE' => '3rd iteration',),
+ ),
+ )
+ )
+ );
+ }
+
+ /**
+ * @dataProvider assign_block_vars_array_data
+ */
+ public function test_assign_block_vars_array($block_data)
+ {
+ $this->template->set_filenames(array('test' => 'loop_nested.html'));
+
+ foreach ($block_data as $blockname => $block_vars_array)
+ {
+ $this->template->assign_block_vars_array($blockname, $block_vars_array);
+ }
+
+ $this->assertEquals("outer - 0 - Test assigning block vars array loop 0:outer - 1 - Test assigning block vars array loop 1:middle - 0 - 1st iterationmiddle - 1 - 2nd iterationmiddle - 2 - 3rd iteration", $this->display('test'), 'Ensuring assigning block vars array to template is working correctly');
+ }
+
+ /**
+ * @expectedException Twig_Error_Syntax
+ */
+ public function test_define_error()
+ {
+ $this->run_template('define_error.html', array(), array(), array(), '');
+ }
+}
diff --git a/tests/template/template_test_case.php b/tests/template/template_test_case.php
new file mode 100644
index 0000000000..c75b1e5065
--- /dev/null
+++ b/tests/template/template_test_case.php
@@ -0,0 +1,127 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2011 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php';
+
+class phpbb_template_template_test_case extends phpbb_test_case
+{
+ protected $template;
+ protected $template_path;
+ protected $user;
+
+ protected $test_path = 'tests/template';
+
+ // Keep the contents of the cache for debugging?
+ const PRESERVE_CACHE = true;
+
+ protected function display($handle)
+ {
+ ob_start();
+
+ try
+ {
+ $this->template->display($handle, false);
+ }
+ catch (Exception $exception)
+ {
+ // reset output buffering even when an error occurred
+ // PHPUnit turns trigger_error into exceptions as well
+ ob_end_clean();
+ throw $exception;
+ }
+
+ $result = self::trim_template_result(ob_get_clean());
+
+ return $result;
+ }
+
+ protected static function trim_template_result($result)
+ {
+ return str_replace("\n\n", "\n", implode("\n", array_map('trim', explode("\n", trim($result)))));
+ }
+
+ protected function config_defaults()
+ {
+ $defaults = array(
+ 'load_tplcompile' => true,
+ 'tpl_allow_php' => false,
+ );
+ return $defaults;
+ }
+
+ protected function setup_engine(array $new_config = array())
+ {
+ global $phpbb_root_path, $phpEx;
+
+ $defaults = $this->config_defaults();
+ $config = new \phpbb\config\config(array_merge($defaults, $new_config));
+ $this->user = new \phpbb\user;
+
+ $path_helper = new \phpbb\path_helper(
+ new \phpbb\symfony_request(
+ new phpbb_mock_request()
+ ),
+ new \phpbb\filesystem(),
+ $phpbb_root_path,
+ $phpEx
+ );
+
+ $this->template_path = $this->test_path . '/templates';
+ $this->template = new \phpbb\template\twig\twig($path_helper, $config, $this->user, new \phpbb\template\context());
+ $this->template->set_custom_style('tests', $this->template_path);
+ }
+
+ protected function setUp()
+ {
+ // Test the engine can be used
+ $this->setup_engine();
+
+ $this->template->clear_cache();
+ }
+
+ protected function tearDown()
+ {
+ if ($this->template)
+ {
+ $this->template->clear_cache();
+ }
+ }
+
+ protected function run_template($file, array $vars, array $block_vars, array $destroy, $expected, $lang_vars = array())
+ {
+ $this->template->set_filenames(array('test' => $file));
+ $this->template->assign_vars($vars);
+
+ foreach ($block_vars as $block => $loops)
+ {
+ foreach ($loops as $_vars)
+ {
+ $this->template->assign_block_vars($block, $_vars);
+ }
+ }
+
+ foreach ($destroy as $block)
+ {
+ $this->template->destroy_block_vars($block);
+ }
+
+ // Previous functionality was $cachefile (string), which was removed, check to prevent errors
+ if (is_array($lang_vars))
+ {
+ foreach ($lang_vars as $name => $value)
+ {
+ $this->user->lang[$name] = $value;
+ }
+ }
+
+ $expected = str_replace(array("\n", "\r", "\t"), '', $expected);
+ $output = str_replace(array("\n", "\r", "\t"), '', $this->display('test'));
+ $this->assertEquals($expected, $output, "Testing $file");
+ }
+}
diff --git a/tests/template/template_test_case_with_tree.php b/tests/template/template_test_case_with_tree.php
new file mode 100644
index 0000000000..e614c42d73
--- /dev/null
+++ b/tests/template/template_test_case_with_tree.php
@@ -0,0 +1,35 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2011 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+require_once dirname(__FILE__) . '/template_test_case.php';
+
+class phpbb_template_template_test_case_with_tree extends phpbb_template_template_test_case
+{
+ protected function setup_engine(array $new_config = array())
+ {
+ global $phpbb_root_path, $phpEx, $user;
+
+ $defaults = $this->config_defaults();
+ $config = new \phpbb\config\config(array_merge($defaults, $new_config));
+
+ $this->phpbb_path_helper = new \phpbb\path_helper(
+ new \phpbb\symfony_request(
+ new phpbb_mock_request()
+ ),
+ new \phpbb\filesystem(),
+ $phpbb_root_path,
+ $phpEx
+ );
+
+ $this->template_path = $this->test_path . '/templates';
+ $this->parent_template_path = $this->test_path . '/parent_templates';
+ $this->template = new phpbb\template\twig\twig($this->phpbb_path_helper, $config, $user, new phpbb\template\context());
+ $this->template->set_custom_style('tests', array($this->template_path, $this->parent_template_path));
+ }
+}
diff --git a/tests/template/templates/basic.html b/tests/template/templates/basic.html
index c1dd690260..e5c6f280fb 100644
--- a/tests/template/templates/basic.html
+++ b/tests/template/templates/basic.html
@@ -16,5 +16,8 @@ fail
<!-- BEGINELSE -->
pass
<!-- END empty -->
+<!-- IF not S_EMPTY -->
+pass
+<!-- ENDIF -->
<!-- DUMMY var -->
diff --git a/tests/template/templates/child_only.css b/tests/template/templates/child_only.css
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/tests/template/templates/child_only.css
diff --git a/tests/template/templates/child_only.html b/tests/template/templates/child_only.html
new file mode 100644
index 0000000000..6121fef5c5
--- /dev/null
+++ b/tests/template/templates/child_only.html
@@ -0,0 +1 @@
+Only in child.
diff --git a/tests/template/templates/child_only.js b/tests/template/templates/child_only.js
new file mode 100644
index 0000000000..542b26526c
--- /dev/null
+++ b/tests/template/templates/child_only.js
@@ -0,0 +1 @@
+// JavaScript file only in a child style.
diff --git a/tests/template/templates/define.html b/tests/template/templates/define.html
index 82237d21a3..276d2ebb99 100644
--- a/tests/template/templates/define.html
+++ b/tests/template/templates/define.html
@@ -2,7 +2,36 @@
{$VALUE}
<!-- DEFINE $VALUE = 'abc' -->
{$VALUE}
+<!-- IF $VALUE != 'abc' -->
+$VALUE != 'abc'
+<!-- ELSEIF $VALUE == 'abc' -->
+$VALUE == 'abc'
+<!-- ENDIF -->
+<!-- IF ($VALUE == 'abc') -->
+($VALUE == 'abc')
+<!-- ENDIF -->
+<!-- IF (($VALUE == 'abc')) -->
+(($VALUE == 'abc'))
+<!-- ENDIF -->
+<!-- IF !$DOESNT_EXIST -->
+!$DOESNT_EXIST
+<!-- ENDIF -->
+<!-- IF (!$DOESNT_EXIST) -->
+(!$DOESNT_EXIST)
+<!-- ENDIF -->
+<!-- INCLUDE define_include.html -->
+{$INCLUDED_VALUE}
+{$VALUE}
<!-- UNDEFINE $VALUE -->
{$VALUE}
-<!-- DEFINE $VALUE -->
-
+<!-- DEFINE $VALUE = 'test!@#$%^&*()_-=+{}[]:;",<.>/?' -->
+{$VALUE}
+<!-- DEFINE $VALUE = '' -->
+[{$VALUE}]
+<!-- DEFINE $TEST -->foobar<!-- ENDDEFINE -->|{$TEST}|
+<!-- DEFINE $VAR = false -->
+<!-- IF $VAR -->
+true
+<!-- ELSE -->
+false
+<!-- ENDIF -->
diff --git a/tests/template/templates/define_advanced.html b/tests/template/templates/define_advanced.html
new file mode 100644
index 0000000000..83467a5b4b
--- /dev/null
+++ b/tests/template/templates/define_advanced.html
@@ -0,0 +1,12 @@
+<!-- DEFINE $VALUE -->
+abc
+<!-- ENDDEFINE -->
+{$VALUE}
+<!-- DEFINE $VALUE1 -->
+bcd
+<!-- ENDDEFINE -->
+<!-- DEFINE $VALUE2 -->
+cde
+<!-- ENDDEFINE -->
+<!-- INCLUDE define_include2.html -->
+{$INCLUDED_VALUE3}
diff --git a/tests/template/templates/define_error.html b/tests/template/templates/define_error.html
new file mode 100644
index 0000000000..72ab1ba033
--- /dev/null
+++ b/tests/template/templates/define_error.html
@@ -0,0 +1,2 @@
+<!-- DEFINE $VAR = foo -->
+{$VAR}
diff --git a/tests/template/templates/define_include.html b/tests/template/templates/define_include.html
new file mode 100644
index 0000000000..9c470c296a
--- /dev/null
+++ b/tests/template/templates/define_include.html
@@ -0,0 +1,3 @@
+{$VALUE}
+<!-- DEFINE $INCLUDED_VALUE = 'bar' -->
+{$INCLUDED_VALUE}
diff --git a/tests/template/templates/define_include2.html b/tests/template/templates/define_include2.html
new file mode 100644
index 0000000000..874f3e1852
--- /dev/null
+++ b/tests/template/templates/define_include2.html
@@ -0,0 +1,11 @@
+<!-- DEFINE $INCLUDED_VALUE1 -->
+zxc
+<!-- ENDDEFINE -->
+<!-- DEFINE $INCLUDED_VALUE2 -->
+qwe
+<!-- ENDDEFINE -->
+{$INCLUDED_VALUE1}
+<!-- DEFINE $INCLUDED_VALUE3 -->
+{$VALUE2}
+{$VALUE1}
+<!-- ENDDEFINE -->
diff --git a/tests/template/templates/events.html b/tests/template/templates/events.html
new file mode 100644
index 0000000000..c44a7469e7
--- /dev/null
+++ b/tests/template/templates/events.html
@@ -0,0 +1,4 @@
+<!-- EVENT child_only -->
+<!-- EVENT parent_only -->
+<!-- EVENT parent_and_child -->
+<!-- EVENT random_event -->
diff --git a/tests/template/templates/expressions.html b/tests/template/templates/expressions.html
index c40d967dab..e1283f165f 100644
--- a/tests/template/templates/expressions.html
+++ b/tests/template/templates/expressions.html
@@ -1,86 +1,57 @@
<!-- IF 10 is even -->pass<!-- ELSE -->fail<!-- ENDIF -->
-
<!-- IF 9 is even -->fail<!-- ELSE -->pass<!-- ENDIF -->
-
<!-- IF not 390 is even -->fail<!-- ELSE -->pass<!-- ENDIF -->
-
<!-- IF 9 is odd -->pass<!-- ELSE -->fail<!-- ENDIF -->
-
<!-- IF 32 is odd -->fail<!-- ELSE -->pass<!-- ENDIF -->
-
<!-- IF 32 is div by 16 -->pass<!-- ELSE -->fail<!-- ENDIF -->
-
<!-- IF 10 is not even -->fail<!-- ELSE -->pass<!-- ENDIF -->
-
<!-- IF 24 == 24 -->pass<!-- ELSE -->fail<!-- ENDIF -->
-
<!-- IF 24 eq 24 -->pass<!-- ELSE -->fail<!-- ENDIF -->
-
<!-- IF ((((((24 == 24)))))) -->pass<!-- ELSE -->fail<!-- ENDIF -->
<!-- IF 24 != 20 -->pass<!-- ELSE -->fail<!-- ENDIF -->
-
<!-- IF 24 <> 20 -->pass<!-- ELSE -->fail<!-- ENDIF -->
-
<!-- IF 24 ne 20 -->pass<!-- ELSE -->fail<!-- ENDIF -->
-
<!-- IF 24 neq 20 -->pass<!-- ELSE -->fail<!-- ENDIF -->
<!-- IF 10 lt 20 -->pass<!-- ELSE -->fail<!-- ENDIF -->
-
<!-- IF 10 < 20 -->pass<!-- ELSE -->fail<!-- ENDIF -->
<!-- IF 10 le 20 -->pass<!-- ELSE -->fail<!-- ENDIF -->
-
<!-- IF 10 lte 20 -->pass<!-- ELSE -->fail<!-- ENDIF -->
-
<!-- IF 10 <= 20 -->pass<!-- ELSE -->fail<!-- ENDIF -->
-
<!-- IF 20 le 20 -->pass<!-- ELSE -->fail<!-- ENDIF -->
-
<!-- IF 20 lte 20 -->pass<!-- ELSE -->fail<!-- ENDIF -->
-
<!-- IF 20 <= 20 -->pass<!-- ELSE -->fail<!-- ENDIF -->
<!-- IF 9 gt 1 -->pass<!-- ELSE -->fail<!-- ENDIF -->
-
<!-- IF 9 > 1 -->pass<!-- ELSE -->fail<!-- ENDIF -->
<!-- IF 9 >= 1 -->pass<!-- ELSE -->fail<!-- ENDIF -->
-
<!-- IF 9 gte 1 -->pass<!-- ELSE -->fail<!-- ENDIF -->
-
<!-- IF 9 ge 1 -->pass<!-- ELSE -->fail<!-- ENDIF -->
-
<!-- IF 9 >= 9 -->pass<!-- ELSE -->fail<!-- ENDIF -->
-
<!-- IF 9 gte 9 -->pass<!-- ELSE -->fail<!-- ENDIF -->
-
<!-- IF 9 ge 9 -->pass<!-- ELSE -->fail<!-- ENDIF -->
<!-- IF true && (10 > 4) -->pass<!-- ELSE -->fail<!-- ENDIF -->
-
<!-- IF true and (10 > 4) -->pass<!-- ELSE -->fail<!-- ENDIF -->
<!-- IF false || true -->pass<!-- ELSE -->fail<!-- ENDIF -->
-
<!-- IF false or true -->pass<!-- ELSE -->fail<!-- ENDIF -->
<!-- IF !false -->pass<!-- ELSE -->fail<!-- ENDIF -->
-
<!-- IF not false -->pass<!-- ELSE -->fail<!-- ENDIF -->
-
<!-- IF not not not false -->pass<!-- ELSE -->fail<!-- ENDIF -->
<!-- IF 6 % 4 == 2 -->pass<!-- ELSE -->fail<!-- ENDIF -->
-
<!-- IF 24 mod 12 == 0 -->pass<!-- ELSE -->fail<!-- ENDIF -->
diff --git a/tests/template/templates/if.html b/tests/template/templates/if.html
index c502e52f51..71312f994c 100644
--- a/tests/template/templates/if.html
+++ b/tests/template/templates/if.html
@@ -2,10 +2,24 @@
1
<!-- ELSEIF S_OTHER_VALUE -->
2
+<!-- ELSE IF S_OTHER_OTHER_VALUE -->
+|S_OTHER_OTHER_VALUE|
<!-- ELSE -->
-0
+03
<!-- ENDIF -->
-<!-- IF (S_VALUE > S_OTHER_VALUE) -->
-0
+<!-- IF S_VALUE and S_OTHER_VALUE and (S_VALUE > S_OTHER_VALUE) -->
+04
+<!-- ENDIF -->
+
+<!-- IF S_TEST === false -->
+false
+<!-- ENDIF -->
+
+<!-- IF S_TEST !== false -->
+!false
+<!-- ENDIF -->
+
+<!-- IF VALUE_TEST is defined -->
+{VALUE_TEST}
<!-- ENDIF -->
diff --git a/tests/template/templates/include_define_variable.html b/tests/template/templates/include_define_variable.html
index aff9b574c2..6052657c97 100644
--- a/tests/template/templates/include_define_variable.html
+++ b/tests/template/templates/include_define_variable.html
@@ -1,2 +1,8 @@
<!-- DEFINE $DEF = '{VARIABLE}' -->
<!-- INCLUDE {$DEF} -->
+
+<!-- DEFINE $DEF_WITH_UNDERSCORES = '{VARIABLE}' -->
+<!-- INCLUDE {$DEF_WITH_UNDERSCORES} -->
+
+<!-- DEFINE $DEF123 = '{VARIABLE}' -->
+<!-- INCLUDE {$DEF123} -->
diff --git a/tests/template/templates/include_loop.html b/tests/template/templates/include_loop.html
new file mode 100644
index 0000000000..5cad34b363
--- /dev/null
+++ b/tests/template/templates/include_loop.html
@@ -0,0 +1,4 @@
+<!-- BEGIN test_loop -->
+<!-- INCLUDE {test_loop.NESTED_FILE} -->
+<!-- BEGIN inner -->_<!-- INCLUDE {test_loop.inner.NESTED_FILE} --><!-- END inner -->
+<!-- END test_loop -->
diff --git a/tests/template/templates/include_loop1.html b/tests/template/templates/include_loop1.html
new file mode 100644
index 0000000000..d00491fd7e
--- /dev/null
+++ b/tests/template/templates/include_loop1.html
@@ -0,0 +1 @@
+1
diff --git a/tests/template/templates/include_loop2.html b/tests/template/templates/include_loop2.html
new file mode 100644
index 0000000000..9e22bcb8e3
--- /dev/null
+++ b/tests/template/templates/include_loop2.html
@@ -0,0 +1 @@
+02
diff --git a/tests/template/templates/include_loop3.html b/tests/template/templates/include_loop3.html
new file mode 100644
index 0000000000..00750edc07
--- /dev/null
+++ b/tests/template/templates/include_loop3.html
@@ -0,0 +1 @@
+3
diff --git a/tests/template/templates/include_loop_define.html b/tests/template/templates/include_loop_define.html
index f539b21396..4bab09422e 100644
--- a/tests/template/templates/include_loop_define.html
+++ b/tests/template/templates/include_loop_define.html
@@ -1,4 +1,4 @@
-<!-- BEGIN loop -->
-<!-- DEFINE $DEF = '{loop.NESTED_FILE}' -->
+<!-- BEGIN test_loop -->
+<!-- DEFINE $DEF = '{test_loop.NESTED_FILE}' -->
<!-- INCLUDE {$DEF} -->
-<!-- END loop -->
+<!-- END test_loop -->
diff --git a/tests/template/templates/include_variable.html b/tests/template/templates/include_variable.html
new file mode 100644
index 0000000000..b907e0b44f
--- /dev/null
+++ b/tests/template/templates/include_variable.html
@@ -0,0 +1 @@
+<!-- INCLUDE {FILE} -->
diff --git a/tests/template/templates/include_variables.html b/tests/template/templates/include_variables.html
new file mode 100644
index 0000000000..8371a061b5
--- /dev/null
+++ b/tests/template/templates/include_variables.html
@@ -0,0 +1 @@
+<!-- INCLUDE {SUBDIR}/variable.html -->
diff --git a/tests/template/templates/includecss.html b/tests/template/templates/includecss.html
new file mode 100644
index 0000000000..a09e44f240
--- /dev/null
+++ b/tests/template/templates/includecss.html
@@ -0,0 +1,3 @@
+<!-- INCLUDECSS child_only.css -->
+<!-- INCLUDECSS parent_only.css -->
+{$STYLESHEETS}
diff --git a/tests/template/templates/includejs.html b/tests/template/templates/includejs.html
new file mode 100644
index 0000000000..0bcdf1a815
--- /dev/null
+++ b/tests/template/templates/includejs.html
@@ -0,0 +1,36 @@
+<!-- IF TEST === 1 -->
+ <!-- INCLUDEJS parent_and_child.js -->
+<!-- ELSEIF TEST === 2 -->
+ <!-- INCLUDEJS parent_and_child.js?assets_version=0 -->
+<!-- ELSEIF TEST === 3 -->
+ <!-- INCLUDEJS parent_and_child.js?test=1&assets_version=0 -->
+<!-- ELSEIF TEST === 4 -->
+ <!-- INCLUDEJS parent_and_child.js?test=1&amp;assets_version=0 -->
+<!-- ELSEIF TEST === 6 -->
+ <!-- INCLUDEJS {PARENT} -->
+<!-- ELSEIF TEST === 7 -->
+ <!-- DEFINE $TEST = 'child_only.js' -->
+ <!-- INCLUDEJS {$TEST} -->
+<!-- ELSEIF TEST === 8 -->
+ <!-- INCLUDEJS subdir/{PARENT} -->
+<!-- ELSEIF TEST === 9 -->
+ <!-- INCLUDEJS {SUBDIR}/subsubdir/{PARENT} -->
+<!-- ELSEIF TEST === 10 -->
+ <!-- INCLUDEJS {SUBDIR}/parent_only.{EXT} -->
+<!-- ELSEIF TEST === 11 -->
+ <!-- DEFINE $TEST = 'child_only.js?test1=1&amp;test2=2#test3' -->
+ <!-- INCLUDEJS {$TEST} -->
+<!-- ELSEIF TEST === 12 -->
+ <!-- INCLUDEJS parent_only.js?test1=1&amp;test2=2#test3 -->
+<!-- ELSEIF TEST === 14 -->
+ <!-- INCLUDEJS parent_only.js?test1=&quot;#test3 -->
+<!-- ELSEIF TEST === 15 -->
+ <!-- INCLUDEJS http://phpbb.com/b.js?c=d#f -->
+<!-- ELSEIF TEST === 16 -->
+ <!-- INCLUDEJS http://phpbb.com/b.js?c=d&assets_version=2#f -->
+<!-- ELSEIF TEST === 17 -->
+ <!-- INCLUDEJS //phpbb.com/b.js -->
+<!-- ELSEIF TEST === 18 -->
+ <!-- INCLUDEJS parent_and_child.js?test=1&test2=0 -->
+<!-- ENDIF -->
+{$SCRIPTS}
diff --git a/tests/template/templates/includephp.html b/tests/template/templates/includephp_relative.html
index 70ebdac0d0..297c9efcb0 100644
--- a/tests/template/templates/includephp.html
+++ b/tests/template/templates/includephp_relative.html
@@ -1 +1,2 @@
+Path is relative to board root.
<!-- INCLUDEPHP ../tests/template/templates/_dummy_include.php.inc -->
diff --git a/tests/template/templates/includephp_variables.html b/tests/template/templates/includephp_variables.html
new file mode 100644
index 0000000000..6106efc86a
--- /dev/null
+++ b/tests/template/templates/includephp_variables.html
@@ -0,0 +1,2 @@
+Path includes variables.
+<!-- INCLUDEPHP ../tests/template/{TEMPLATES}/_dummy_include.php.inc -->
diff --git a/tests/template/templates/invalid/endif_without_if.html b/tests/template/templates/invalid/endif_without_if.html
new file mode 100644
index 0000000000..e371ffd150
--- /dev/null
+++ b/tests/template/templates/invalid/endif_without_if.html
@@ -0,0 +1 @@
+<!-- ENDIF -->
diff --git a/tests/template/templates/invalid/output/endif_without_if.html b/tests/template/templates/invalid/output/endif_without_if.html
new file mode 100644
index 0000000000..5f2239c964
--- /dev/null
+++ b/tests/template/templates/invalid/output/endif_without_if.html
@@ -0,0 +1 @@
+Parse error (fatal, destroys php runtime).
diff --git a/tests/template/templates/invalid/output/include_nonexistent_file.html b/tests/template/templates/invalid/output/include_nonexistent_file.html
new file mode 100644
index 0000000000..8a118d2713
--- /dev/null
+++ b/tests/template/templates/invalid/output/include_nonexistent_file.html
@@ -0,0 +1 @@
+style resource locator: File for handle nonexistent.html does not exist. Could not find:
diff --git a/tests/template/templates/invalid/output/unknown_tag.html b/tests/template/templates/invalid/output/unknown_tag.html
new file mode 100644
index 0000000000..1489e5e31a
--- /dev/null
+++ b/tests/template/templates/invalid/output/unknown_tag.html
@@ -0,0 +1 @@
+<!-- UNKNOWNTAG variable.html -->
diff --git a/tests/template/templates/lang.html b/tests/template/templates/lang.html
index 2b5ea1cafe..3eecc298cb 100644
--- a/tests/template/templates/lang.html
+++ b/tests/template/templates/lang.html
@@ -1,3 +1,5 @@
{L_VARIABLE}
+{L_1_VARIABLE}
{LA_VARIABLE}
+{LA_1_VARIABLE}
diff --git a/tests/template/templates/loop.html b/tests/template/templates/loop.html
index de1a10004d..f541e934df 100644
--- a/tests/template/templates/loop.html
+++ b/tests/template/templates/loop.html
@@ -1,21 +1,21 @@
-<!-- BEGIN loop -->
+<!-- BEGIN test_loop -->
loop
<!-- BEGINELSE -->
noloop
-<!-- END loop -->
+<!-- END test_loop -->
-<!-- IF .loop -->
+<!-- IF .test_loop -->
loop
<!-- ELSE -->
noloop
<!-- ENDIF -->
-<!-- IF .loop == 2 -->
+<!-- IF .test_loop == 2 -->
loop
<!-- ENDIF -->
-<!-- BEGIN loop -->
+<!-- BEGIN test_loop -->
<!-- BEGIN !block -->
-loop#{loop.S_ROW_COUNT}-block#{block.S_ROW_COUNT}
+loop#{test_loop.S_ROW_COUNT}-block#{block.S_ROW_COUNT}
<!-- END !block -->
-<!-- END loop -->
+<!-- END test_loop -->
diff --git a/tests/template/templates/loop_advanced.html b/tests/template/templates/loop_advanced.html
index c75fe55f03..1f56686eaa 100644
--- a/tests/template/templates/loop_advanced.html
+++ b/tests/template/templates/loop_advanced.html
@@ -1,19 +1,19 @@
-<!-- BEGIN loop -->{loop.S_FIRST_ROW}{loop.S_ROW_COUNT}{loop.S_LAST_ROW}<!-- END loop -->
+<!-- BEGIN test_loop -->{test_loop.S_FIRST_ROW}{test_loop.S_ROW_COUNT}{test_loop.S_LAST_ROW}<!-- END test_loop -->
x
-<!-- BEGIN loop(0) -->{loop.S_FIRST_ROW}{loop.S_ROW_COUNT}{loop.S_LAST_ROW}<!-- END loop -->
+<!-- BEGIN test_loop(0) -->{test_loop.S_FIRST_ROW}{test_loop.S_ROW_COUNT}{test_loop.S_LAST_ROW}<!-- END test_loop -->
x
-<!-- BEGIN loop(0,-1) -->{loop.S_FIRST_ROW}{loop.S_ROW_COUNT}{loop.S_LAST_ROW}<!-- END loop -->
+<!-- BEGIN test_loop(0,-1) -->{test_loop.S_FIRST_ROW}{test_loop.S_ROW_COUNT}{test_loop.S_LAST_ROW}<!-- END test_loop -->
x
-<!-- BEGIN loop(1) -->{loop.S_FIRST_ROW}{loop.S_ROW_COUNT}{loop.S_LAST_ROW}<!-- END loop -->
+<!-- BEGIN test_loop(1) -->{test_loop.S_FIRST_ROW}{test_loop.S_ROW_COUNT}{test_loop.S_LAST_ROW}<!-- END test_loop -->
x
-<!-- BEGIN loop(1,1) -->{loop.S_FIRST_ROW}{loop.S_ROW_COUNT}{loop.S_LAST_ROW}<!-- END loop -->
+<!-- BEGIN test_loop(1,1) -->{test_loop.S_FIRST_ROW}{test_loop.S_ROW_COUNT}{test_loop.S_LAST_ROW}<!-- END test_loop -->
x
-<!-- BEGIN loop(0,1) -->{loop.S_FIRST_ROW}{loop.S_ROW_COUNT}{loop.S_LAST_ROW}<!-- END loop -->
+<!-- BEGIN test_loop(0,1) -->{test_loop.S_FIRST_ROW}{test_loop.S_ROW_COUNT}{test_loop.S_LAST_ROW}<!-- END test_loop -->
x
-<!-- BEGIN loop(2,4) -->{loop.S_FIRST_ROW}{loop.S_ROW_COUNT}{loop.S_LAST_ROW}<!-- END loop -->
+<!-- BEGIN test_loop(2,4) -->{test_loop.S_FIRST_ROW}{test_loop.S_ROW_COUNT}{test_loop.S_LAST_ROW}<!-- END test_loop -->
x
-<!-- BEGIN loop(0,-7) -->{loop.S_FIRST_ROW}{loop.S_ROW_COUNT}{loop.S_LAST_ROW}<!-- END loop -->
+<!-- BEGIN test_loop(0,-7) -->{test_loop.S_FIRST_ROW}{test_loop.S_ROW_COUNT}{test_loop.S_LAST_ROW}<!-- END test_loop -->
x
-<!-- BEGIN loop(-2,6) -->{loop.S_FIRST_ROW}{loop.S_ROW_COUNT}{loop.S_LAST_ROW}<!-- END loop -->
+<!-- BEGIN test_loop(-2,6) -->{test_loop.S_FIRST_ROW}{test_loop.S_ROW_COUNT}{test_loop.S_LAST_ROW}<!-- END test_loop -->
x
-<!-- BEGIN loop(-2,-1) -->{loop.S_FIRST_ROW}{loop.S_ROW_COUNT}{loop.S_LAST_ROW}<!-- END loop -->
+<!-- BEGIN test_loop(-2,-1) -->{test_loop.S_FIRST_ROW}{test_loop.S_ROW_COUNT}{test_loop.S_LAST_ROW}<!-- END test_loop -->
diff --git a/tests/template/templates/loop_expressions.html b/tests/template/templates/loop_expressions.html
new file mode 100644
index 0000000000..6bff53f388
--- /dev/null
+++ b/tests/template/templates/loop_expressions.html
@@ -0,0 +1,11 @@
+<!-- BEGIN loop -->
+
+<!-- IF loop.S_ROW_NUM is even by 4 -->on<!-- ELSE -->off<!-- ENDIF -->
+
+<!-- END loop -->
+
+<!-- BEGIN loop -->
+
+<!-- IF loop.S_ROW_NUM is odd by 3 -->on<!-- ELSE -->off<!-- ENDIF -->
+
+<!-- END loop -->
diff --git a/tests/template/templates/loop_include.html b/tests/template/templates/loop_include.html
new file mode 100644
index 0000000000..7bbdfc4248
--- /dev/null
+++ b/tests/template/templates/loop_include.html
@@ -0,0 +1,4 @@
+<!-- BEGIN test_loop -->
+{test_loop.foo}
+ <!-- INCLUDE loop_include1.html -->
+<!-- END test_loop -->
diff --git a/tests/template/templates/loop_include1.html b/tests/template/templates/loop_include1.html
new file mode 100644
index 0000000000..851f6e6e75
--- /dev/null
+++ b/tests/template/templates/loop_include1.html
@@ -0,0 +1 @@
+{test_loop.foo}
diff --git a/tests/template/templates/loop_nested.html b/tests/template/templates/loop_nested.html
index 9b251cd453..cf099ecc15 100644
--- a/tests/template/templates/loop_nested.html
+++ b/tests/template/templates/loop_nested.html
@@ -1,8 +1,6 @@
<!-- BEGIN outer -->
- outer - {outer.S_ROW_COUNT}<!-- IF outer.VARIABLE --> - {outer.VARIABLE}<!-- ENDIF -->
-
- <!-- BEGIN middle -->
- middle - {middle.S_ROW_COUNT}<!-- IF middle.VARIABLE --> - {middle.VARIABLE}<!-- ENDIF -->
-
- <!-- END middle -->
+outer - {outer.S_ROW_COUNT}<!-- IF outer.VARIABLE --> - {outer.VARIABLE}<!-- ENDIF --><!-- IF TEST_MORE -->[{outer.S_BLOCK_NAME}|{outer.S_NUM_ROWS}]<!-- ENDIF -->
+<!-- BEGIN middle -->
+middle - {outer.middle.S_ROW_COUNT}<!-- IF outer.middle.VARIABLE --> - {outer.middle.VARIABLE}<!-- ENDIF --><!-- IF TEST_MORE -->[{outer.middle.S_BLOCK_NAME}|{outer.middle.S_NUM_ROWS}]<!-- ENDIF -->
+<!-- END middle -->
<!-- END outer -->
diff --git a/tests/template/templates/loop_nested2.html b/tests/template/templates/loop_nested2.html
new file mode 100644
index 0000000000..3eeeb5e36a
--- /dev/null
+++ b/tests/template/templates/loop_nested2.html
@@ -0,0 +1,6 @@
+<!-- BEGIN outer -->
+o{outer.S_ROW_COUNT}
+<!-- BEGIN middle -->
+m{outer.middle.S_ROW_COUNT}{outer.S_ROW_COUNT}
+<!-- END middle -->
+<!-- END outer -->
diff --git a/tests/template/templates/loop_nested_deep_multilevel_ref.html b/tests/template/templates/loop_nested_deep_multilevel_ref.html
new file mode 100644
index 0000000000..bcc2a7c07b
--- /dev/null
+++ b/tests/template/templates/loop_nested_deep_multilevel_ref.html
@@ -0,0 +1,13 @@
+top-level content
+<!-- BEGIN outer -->
+ outer
+ <!-- BEGIN middle -->
+ {outer.middle.S_BLOCK_NAME}
+ <!-- BEGIN inner -->
+ inner {inner.VARIABLE}
+ <!-- IF outer.middle.inner.S_FIRST_ROW -->
+ first row of {outer.middle.inner.S_NUM_ROWS} in {middle.inner.S_BLOCK_NAME}
+ <!-- ENDIF -->
+ <!-- END inner -->
+ <!-- END middle -->
+<!-- END outer -->
diff --git a/tests/template/templates/loop_nested_multilevel_ref.html b/tests/template/templates/loop_nested_multilevel_ref.html
new file mode 100644
index 0000000000..f2f1c746ed
--- /dev/null
+++ b/tests/template/templates/loop_nested_multilevel_ref.html
@@ -0,0 +1,10 @@
+top-level content
+<!-- BEGIN outer -->
+ outer {outer.VARIABLE}
+ <!-- BEGIN inner -->
+ inner {inner.VARIABLE}
+ <!-- IF outer.inner.S_FIRST_ROW -->
+ first row
+ <!-- ENDIF -->
+ <!-- END inner -->
+<!-- END outer -->
diff --git a/tests/template/templates/loop_reuse.html b/tests/template/templates/loop_reuse.html
new file mode 100644
index 0000000000..bd0354ae6f
--- /dev/null
+++ b/tests/template/templates/loop_reuse.html
@@ -0,0 +1,6 @@
+<!-- BEGIN one -->
+ {one.VAR}
+ <!-- BEGIN one -->
+ {one.one.VAR}
+ <!-- END one -->
+<!-- END one -->
diff --git a/tests/template/templates/loop_size.html b/tests/template/templates/loop_size.html
new file mode 100644
index 0000000000..2b1fcd2dd4
--- /dev/null
+++ b/tests/template/templates/loop_size.html
@@ -0,0 +1,39 @@
+<!-- IF .nonexistent_loop -->
+ nonexistent
+<!-- ENDIF -->
+
+<!-- IF .nonexistent_loop == 0 -->
+ nonexistent = 0
+<!-- ENDIF -->
+
+<!-- IF ! .nonexistent_loop -->
+ ! nonexistent
+<!-- ENDIF -->
+
+<!-- IF .empty_loop -->
+ empty
+<!-- ENDIF -->
+
+<!-- IF .empty_loop == 0 -->
+ empty = 0
+<!-- ENDIF -->
+
+<!-- IF ! .empty_loop -->
+ ! empty
+<!-- ENDIF -->
+
+<!-- IF .test_loop -->
+ loop
+<!-- ENDIF -->
+
+<!-- IF .test_loop == 0 -->
+ loop = 0
+<!-- ENDIF -->
+
+<!-- IF ! .test_loop -->
+ ! loop
+<!-- ENDIF -->
+
+<!-- BEGIN test_loop -->
+ in loop
+<!-- END test_loop -->
diff --git a/tests/template/templates/loop_underscore.html b/tests/template/templates/loop_underscore.html
new file mode 100644
index 0000000000..4001007868
--- /dev/null
+++ b/tests/template/templates/loop_underscore.html
@@ -0,0 +1,21 @@
+<!-- BEGIN _underscore_loop -->
+loop
+<!-- BEGINELSE -->
+noloop
+<!-- END _underscore_loop -->
+
+<!-- IF ._underscore_loop -->
+loop
+<!-- ELSE -->
+noloop
+<!-- ENDIF -->
+
+<!-- IF ._underscore_loop == 2 -->
+loop
+<!-- ENDIF -->
+
+<!-- BEGIN _underscore_loop -->
+<!-- BEGIN !block -->
+loop#{loop.S_ROW_COUNT}-block#{block.S_ROW_COUNT}
+<!-- END !block -->
+<!-- END _underscore_loop -->
diff --git a/tests/template/templates/loop_vars.html b/tests/template/templates/loop_vars.html
index 4f02fd2e6c..70a3eb2cec 100644
--- a/tests/template/templates/loop_vars.html
+++ b/tests/template/templates/loop_vars.html
@@ -1,21 +1,13 @@
-<!-- BEGIN loop -->
-<!-- IF loop.S_FIRST_ROW -->first<!-- ENDIF -->
-
-{loop.S_ROW_COUNT}
-
-{loop.VARIABLE}
-
-<!-- IF loop.VARIABLE -->set<!-- ENDIF -->
-
-<!-- IF loop.S_LAST_ROW -->
+<!-- BEGIN test_loop -->
+<!-- IF test_loop.S_FIRST_ROW -->first<!-- ENDIF -->
+{test_loop.S_ROW_NUM} - a
+{test_loop.VARIABLE} - b
+<!-- IF test_loop.VARIABLE -->set<!-- ENDIF -->
+<!-- IF test_loop.S_LAST_ROW -->
last
<!-- ENDIF -->
<!-- BEGIN inner -->
-
-{inner.S_ROW_COUNT}
-
-<!-- IF inner.S_LAST_ROW and inner.S_ROW_COUNT and inner.S_NUM_ROWS -->last inner<!-- ENDIF -->
-
+{test_loop.inner.S_ROW_NUM} - c
+<!-- IF test_loop.inner.S_LAST_ROW and test_loop.inner.S_ROW_COUNT and test_loop.inner.S_NUM_ROWS -->last inner<!-- ENDIF -->
<!-- END inner -->
-<!-- END loop -->
-<!-- IF .loop.inner -->inner loop<!-- ENDIF -->
+<!-- END test_loop -->
diff --git a/tests/template/templates/parent_and_child.html b/tests/template/templates/parent_and_child.html
new file mode 100644
index 0000000000..16223d91e7
--- /dev/null
+++ b/tests/template/templates/parent_and_child.html
@@ -0,0 +1 @@
+Child template.
diff --git a/tests/template/templates/parent_and_child.js b/tests/template/templates/parent_and_child.js
new file mode 100644
index 0000000000..d544d94d83
--- /dev/null
+++ b/tests/template/templates/parent_and_child.js
@@ -0,0 +1 @@
+// JavaScript file in a child style.
diff --git a/tests/template/templates/subdir/parent_only.js b/tests/template/templates/subdir/parent_only.js
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/tests/template/templates/subdir/parent_only.js
diff --git a/tests/template/templates/subdir/subsubdir/parent_only.js b/tests/template/templates/subdir/subsubdir/parent_only.js
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/tests/template/templates/subdir/subsubdir/parent_only.js
diff --git a/tests/template/templates/subdir/variable.html b/tests/template/templates/subdir/variable.html
new file mode 100644
index 0000000000..f68f91597c
--- /dev/null
+++ b/tests/template/templates/subdir/variable.html
@@ -0,0 +1 @@
+{VARIABLE}
diff --git a/tests/template/templates/trivial.html b/tests/template/templates/trivial.html
new file mode 100644
index 0000000000..3a1c1c5324
--- /dev/null
+++ b/tests/template/templates/trivial.html
@@ -0,0 +1 @@
+This is a trivial template.
diff --git a/tests/template/templates/twig.html b/tests/template/templates/twig.html
new file mode 100644
index 0000000000..17b94ad8d4
--- /dev/null
+++ b/tests/template/templates/twig.html
@@ -0,0 +1,6 @@
+<!-- EXTENDS "twig_parent.html" -->
+
+<!-- BLOCK overwritten -->
+3{VARIABLE|upper}|{VARIABLE|lower}
+<!-- ENDBLOCK -->
+
diff --git a/tests/template/templates/twig_parent.html b/tests/template/templates/twig_parent.html
new file mode 100644
index 0000000000..e9863221e1
--- /dev/null
+++ b/tests/template/templates/twig_parent.html
@@ -0,0 +1,7 @@
+<!-- BLOCK notoverwritten -->
+1
+<!-- ENDBLOCK -->
+
+<!-- BLOCK overwritten -->
+2
+<!-- ENDBLOCK -->
diff --git a/tests/template/templates/variable_spacing.html b/tests/template/templates/variable_spacing.html
new file mode 100644
index 0000000000..028f8aa0d1
--- /dev/null
+++ b/tests/template/templates/variable_spacing.html
@@ -0,0 +1,6 @@
+|{VARIABLE}|
+{VARIABLE}|{VARIABLE}|
+
+|{VARIABLE}
+
+<div class="{VARIABLE}">test</div>
diff --git a/tests/test_framework/phpbb_database_test_case.php b/tests/test_framework/phpbb_database_test_case.php
index 28d3a716f0..aacdb1bef4 100644
--- a/tests/test_framework/phpbb_database_test_case.php
+++ b/tests/test_framework/phpbb_database_test_case.php
@@ -82,7 +82,7 @@ abstract class phpbb_database_test_case extends PHPUnit_Extensions_Database_Test
$db_config = $this->get_database_config();
// Firebird requires table and column names to be uppercase
- if ($db_config['dbms'] == 'firebird')
+ if ($db_config['dbms'] == 'phpbb\db\driver\firebird')
{
$xml_data = file_get_contents($path);
$xml_data = preg_replace_callback('/(?:(<table name="))([a-z_]+)(?:(">))/', 'phpbb_database_test_case::to_upper', $xml_data);
@@ -138,7 +138,7 @@ abstract class phpbb_database_test_case extends PHPUnit_Extensions_Database_Test
if (!self::$already_connected)
{
- $manager->load_schema();
+ $manager->load_schema($this->new_dbal());
self::$already_connected = true;
}
@@ -151,9 +151,7 @@ abstract class phpbb_database_test_case extends PHPUnit_Extensions_Database_Test
$config = $this->get_database_config();
- require_once dirname(__FILE__) . '/../../phpBB/includes/db/' . $config['dbms'] . '.php';
- $dbal = 'dbal_' . $config['dbms'];
- $db = new $dbal();
+ $db = new $config['dbms']();
$db->sql_connect($config['dbhost'], $config['dbuser'], $config['dbpasswd'], $config['dbname'], $config['dbport']);
$this->db_connections[] = $db;
@@ -194,4 +192,20 @@ abstract class phpbb_database_test_case extends PHPUnit_Extensions_Database_Test
{
return $matches[1] . strtoupper($matches[2]) . $matches[3];
}
+
+ public function assert_array_content_equals($one, $two)
+ {
+ // http://stackoverflow.com/questions/3838288/phpunit-assert-two-arrays-are-equal-but-order-of-elements-not-important
+ // but one array_diff is not enough!
+ if (sizeof(array_diff($one, $two)) || sizeof(array_diff($two, $one)))
+ {
+ // get a nice error message
+ $this->assertEquals($one, $two);
+ }
+ else
+ {
+ // increase assertion count
+ $this->assertTrue(true);
+ }
+ }
}
diff --git a/tests/test_framework/phpbb_database_test_connection_manager.php b/tests/test_framework/phpbb_database_test_connection_manager.php
index 30f1fa6589..5d8dae4a30 100644
--- a/tests/test_framework/phpbb_database_test_connection_manager.php
+++ b/tests/test_framework/phpbb_database_test_connection_manager.php
@@ -108,7 +108,7 @@ class phpbb_database_test_connection_manager
// These require different connection strings on the phpBB side than they do in PDO
// so you must provide a DSN string for ODBC separately
- if (!empty($this->config['custom_dsn']) && ($this->config['dbms'] == 'mssql' || $this->config['dbms'] == 'firebird'))
+ if (!empty($this->config['custom_dsn']) && ($this->config['dbms'] == 'phpbb\db\driver\mssql' || $this->config['dbms'] == 'phpbb\db\driver\firebird'))
{
$dsn = 'odbc:' . $this->config['custom_dsn'];
}
@@ -117,12 +117,12 @@ class phpbb_database_test_connection_manager
{
switch ($this->config['dbms'])
{
- case 'mssql':
- case 'mssql_odbc':
+ case 'phpbb\db\driver\mssql':
+ case 'phpbb\db\driver\mssql_odbc':
$this->pdo = new phpbb_database_connection_odbc_pdo_wrapper('mssql', 0, $dsn, $this->config['dbuser'], $this->config['dbpasswd']);
break;
- case 'firebird':
+ case 'phpbb\db\driver\firebird':
if (!empty($this->config['custom_dsn']))
{
$this->pdo = new phpbb_database_connection_odbc_pdo_wrapper('firebird', 0, $dsn, $this->config['dbuser'], $this->config['dbpasswd']);
@@ -138,15 +138,15 @@ class phpbb_database_test_connection_manager
catch (PDOException $e)
{
$cleaned_dsn = str_replace($this->config['dbpasswd'], '*password*', $dsn);
- throw new Exception("Unable do connect to $cleaned_dsn using PDO with error: {$e->getMessage()}");
+ throw new Exception("Unable to connect to $cleaned_dsn using PDO with error: {$e->getMessage()}");
}
$this->pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
switch ($this->config['dbms'])
{
- case 'mysql':
- case 'mysqli':
+ case 'phpbb\db\driver\mysql':
+ case 'phpbb\db\driver\mysqli':
$this->pdo->exec('SET NAMES utf8');
/*
@@ -169,12 +169,12 @@ class phpbb_database_test_connection_manager
/**
* Load the phpBB database schema into the database
*/
- public function load_schema()
+ public function load_schema($db)
{
$this->ensure_connected(__METHOD__);
$directory = dirname(__FILE__) . '/../../phpBB/install/schemas/';
- $this->load_schema_from_file($directory);
+ $this->load_schema_from_file($directory, $db);
}
/**
@@ -187,8 +187,8 @@ class phpbb_database_test_connection_manager
{
switch ($this->config['dbms'])
{
- case 'sqlite':
- case 'firebird':
+ case 'phpbb\db\driver\sqlite':
+ case 'phpbb\db\driver\firebird':
$this->connect();
// Drop all of the tables
foreach ($this->get_tables() as $table)
@@ -198,7 +198,7 @@ class phpbb_database_test_connection_manager
$this->purge_extras();
break;
- case 'oracle':
+ case 'phpbb\db\driver\oracle':
$this->connect();
// Drop all of the tables
foreach ($this->get_tables() as $table)
@@ -208,7 +208,7 @@ class phpbb_database_test_connection_manager
$this->purge_extras();
break;
- case 'postgres':
+ case 'phpbb\db\driver\postgres':
$this->connect();
// Drop all of the tables
foreach ($this->get_tables() as $table)
@@ -258,39 +258,38 @@ class phpbb_database_test_connection_manager
switch ($this->config['dbms'])
{
- case 'mysql':
- case 'mysql4':
- case 'mysqli':
+ case 'phpbb\db\driver\mysql':
+ case 'phpbb\db\driver\mysqli':
$sql = 'SHOW TABLES';
break;
- case 'sqlite':
+ case 'phpbb\db\driver\sqlite':
$sql = 'SELECT name
FROM sqlite_master
WHERE type = "table"';
break;
- case 'mssql':
- case 'mssql_odbc':
- case 'mssqlnative':
+ case 'phpbb\db\driver\mssql':
+ case 'phpbb\db\driver\mssql_odbc':
+ case 'phpbb\db\driver\mssqlnative':
$sql = "SELECT name
FROM sysobjects
WHERE type='U'";
break;
- case 'postgres':
+ case 'phpbb\db\driver\postgres':
$sql = 'SELECT relname
FROM pg_stat_user_tables';
break;
- case 'firebird':
+ case 'phpbb\db\driver\firebird':
$sql = 'SELECT rdb$relation_name
FROM rdb$relations
WHERE rdb$view_source is null
AND rdb$system_flag = 0';
break;
- case 'oracle':
+ case 'phpbb\db\driver\oracle':
$sql = 'SELECT table_name
FROM USER_TABLES';
break;
@@ -322,11 +321,11 @@ class phpbb_database_test_connection_manager
* Compile the correct schema filename (as per create_schema_files) and
* load it into the database.
*/
- protected function load_schema_from_file($directory)
+ protected function load_schema_from_file($directory, \phpbb\db\driver\driver $db)
{
$schema = $this->dbms['SCHEMA'];
- if ($this->config['dbms'] == 'mysql')
+ if ($this->config['dbms'] == 'phpbb\db\driver\mysql')
{
$sth = $this->pdo->query('SELECT VERSION() AS version');
$row = $sth->fetch(PDO::FETCH_ASSOC);
@@ -352,6 +351,23 @@ class phpbb_database_test_connection_manager
{
$this->pdo->exec($query);
}
+
+ // Ok we have the db info go ahead and work on building the table
+ $db_table_schema = file_get_contents($directory . 'schema.json');
+ $db_table_schema = json_decode($db_table_schema, true);
+
+ $db_tools = new \phpbb\db\tools($db, true);
+ foreach ($db_table_schema as $table_name => $table_data)
+ {
+ $queries = $db_tools->sql_create_table(
+ $table_name,
+ $table_data
+ );
+ foreach ($queries as $query)
+ {
+ $this->pdo->exec($query);
+ }
+ }
}
/**
@@ -360,47 +376,47 @@ class phpbb_database_test_connection_manager
protected function get_dbms_data($dbms)
{
$available_dbms = array(
- 'firebird' => array(
+ 'phpbb\db\driver\firebird' => array(
'SCHEMA' => 'firebird',
'DELIM' => ';;',
'PDO' => 'firebird',
),
- 'mysqli' => array(
+ 'phpbb\db\driver\mysqli' => array(
'SCHEMA' => 'mysql_41',
'DELIM' => ';',
'PDO' => 'mysql',
),
- 'mysql' => array(
+ 'phpbb\db\driver\mysql' => array(
'SCHEMA' => 'mysql',
'DELIM' => ';',
'PDO' => 'mysql',
),
- 'mssql' => array(
+ 'phpbb\db\driver\mssql' => array(
'SCHEMA' => 'mssql',
'DELIM' => 'GO',
'PDO' => 'odbc',
),
- 'mssql_odbc'=> array(
+ 'phpbb\db\driver\mssql_odbc'=> array(
'SCHEMA' => 'mssql',
'DELIM' => 'GO',
'PDO' => 'odbc',
),
- 'mssqlnative' => array(
+ 'phpbb\db\driver\mssqlnative' => array(
'SCHEMA' => 'mssql',
'DELIM' => 'GO',
'PDO' => 'sqlsrv',
),
- 'oracle' => array(
+ 'phpbb\db\driver\oracle' => array(
'SCHEMA' => 'oracle',
'DELIM' => '/',
'PDO' => 'oci',
),
- 'postgres' => array(
+ 'phpbb\db\driver\postgres' => array(
'SCHEMA' => 'postgres',
'DELIM' => ';',
'PDO' => 'pgsql',
),
- 'sqlite' => array(
+ 'phpbb\db\driver\sqlite' => array(
'SCHEMA' => 'sqlite',
'DELIM' => ';',
'PDO' => 'sqlite2',
@@ -429,7 +445,7 @@ class phpbb_database_test_connection_manager
switch ($this->config['dbms'])
{
- case 'firebird':
+ case 'phpbb\db\driver\firebird':
$sql = 'SELECT RDB$GENERATOR_NAME
FROM RDB$GENERATORS
WHERE RDB$SYSTEM_FLAG = 0';
@@ -441,7 +457,7 @@ class phpbb_database_test_connection_manager
}
break;
- case 'oracle':
+ case 'phpbb\db\driver\oracle':
$sql = 'SELECT sequence_name
FROM USER_SEQUENCES';
$result = $this->pdo->query($sql);
@@ -452,7 +468,7 @@ class phpbb_database_test_connection_manager
}
break;
- case 'postgres':
+ case 'phpbb\db\driver\postgres':
$sql = 'SELECT sequence_name
FROM information_schema.sequences';
$result = $this->pdo->query($sql);
@@ -510,7 +526,7 @@ class phpbb_database_test_connection_manager
switch ($this->config['dbms'])
{
- case 'oracle':
+ case 'phpbb\db\driver\oracle':
// Get all of the information about the sequences
$sql = "SELECT t.table_name, tc.column_name, d.referenced_name as sequence_name, s.increment_by, s.min_value
FROM USER_TRIGGERS t
@@ -545,14 +561,14 @@ class phpbb_database_test_connection_manager
* Since we have no objects attached to our sequencers (triggers aren't attached), this works fine.
*/
$queries[] = 'DROP SEQUENCE ' . $row['SEQUENCE_NAME'];
- $queries[] = "CREATE SEQUENCE {$row['SEQUENCE_NAME']}
- MINVALUE {$row['MIN_VALUE']}
- INCREMENT BY {$row['INCREMENT_BY']}
+ $queries[] = "CREATE SEQUENCE {$row['SEQUENCE_NAME']}
+ MINVALUE {$row['MIN_VALUE']}
+ INCREMENT BY {$row['INCREMENT_BY']}
START WITH $max_val";
}
break;
- case 'postgres':
+ case 'phpbb\db\driver\postgres':
// Get the sequences attached to the tables
$sql = 'SELECT column_name, table_name FROM information_schema.columns
WHERE table_name IN (' . implode(', ', $table_names) . ")
diff --git a/tests/test_framework/phpbb_functional_test_case.php b/tests/test_framework/phpbb_functional_test_case.php
index 5dfe07d380..c0e58d1104 100644
--- a/tests/test_framework/phpbb_functional_test_case.php
+++ b/tests/test_framework/phpbb_functional_test_case.php
@@ -9,8 +9,6 @@
use Symfony\Component\BrowserKit\CookieJar;
require_once __DIR__ . '/../../phpBB/includes/functions_install.php';
-require_once __DIR__ . '/../../phpBB/includes/acm/acm_file.php';
-require_once __DIR__ . '/../../phpBB/includes/cache.php';
class phpbb_functional_test_case extends phpbb_test_case
{
@@ -20,6 +18,7 @@ class phpbb_functional_test_case extends phpbb_test_case
protected $cache = null;
protected $db = null;
+ protected $extension_manager = null;
/**
* Session ID for current test's session (each test makes its own)
@@ -43,6 +42,12 @@ class phpbb_functional_test_case extends phpbb_test_case
self::$config = phpbb_test_case_helpers::get_test_config();
self::$root_url = self::$config['phpbb_functional_url'];
+ // Important: this is used both for installation and by
+ // test cases for querying the tables.
+ // Therefore table prefix must be set before a board is
+ // installed, and also before each test case is run.
+ self::$config['table_prefix'] = 'phpbb_';
+
if (!isset(self::$config['phpbb_functional_url']))
{
self::markTestSkipped('phpbb_functional_url was not set in test_config and wasn\'t set as PHPBB_FUNCTIONAL_URL environment variable either.');
@@ -132,18 +137,23 @@ class phpbb_functional_test_case extends phpbb_test_case
{
}
+ public function __construct($name = NULL, array $data = array(), $dataName = '')
+ {
+ parent::__construct($name, $data, $dataName);
+
+ $this->backupStaticAttributesBlacklist += array(
+ 'phpbb_functional_test_case' => array('config', 'already_installed'),
+ );
+ }
+
protected function get_db()
{
global $phpbb_root_path, $phpEx;
// so we don't reopen an open connection
- if (!($this->db instanceof dbal))
+ if (!($this->db instanceof \phpbb\db\driver\driver))
{
- if (!class_exists('dbal_' . self::$config['dbms']))
- {
- include($phpbb_root_path . 'includes/db/' . self::$config['dbms'] . ".$phpEx");
- }
- $sql_db = 'dbal_' . self::$config['dbms'];
- $this->db = new $sql_db();
+ $dbms = self::$config['dbms'];
+ $this->db = new $dbms();
$this->db->sql_connect(self::$config['dbhost'], self::$config['dbuser'], self::$config['dbpasswd'], self::$config['dbname'], self::$config['dbport']);
}
return $this->db;
@@ -153,7 +163,7 @@ class phpbb_functional_test_case extends phpbb_test_case
{
if (!$this->cache)
{
- $this->cache = new cache();
+ $this->cache = new \phpbb\cache\driver\file;
}
return $this->cache;
@@ -168,20 +178,46 @@ class phpbb_functional_test_case extends phpbb_test_case
$cache->load();
}
- public function __construct($name = NULL, array $data = array(), $dataName = '')
+ protected function get_extension_manager()
{
- parent::__construct($name, $data, $dataName);
+ global $phpbb_root_path, $phpEx;
- $this->backupStaticAttributesBlacklist += array(
- 'phpbb_functional_test_case' => array('config', 'already_installed'),
+ $config = new \phpbb\config\config(array());
+ $db = $this->get_db();
+ $db_tools = new \phpbb\db\tools($db);
+
+ $migrator = new \phpbb\db\migrator(
+ $config,
+ $db,
+ $db_tools,
+ self::$config['table_prefix'] . 'migrations',
+ $phpbb_root_path,
+ $phpEx,
+ self::$config['table_prefix'],
+ array(),
+ new \phpbb\db\migration\helper()
);
+ $container = new phpbb_mock_container_builder();
+ $container->set('migrator', $migrator);
+
+ $extension_manager = new \phpbb\extension\manager(
+ $container,
+ $db,
+ $config,
+ new phpbb\filesystem(),
+ self::$config['table_prefix'] . 'ext',
+ dirname(__FILE__) . '/',
+ $phpEx,
+ $this->get_cache_driver()
+ );
+
+ return $extension_manager;
}
static protected function install_board()
{
global $phpbb_root_path, $phpEx;
- self::$config['table_prefix'] = 'phpbb_';
self::recreate_database(self::$config);
$config_file = $phpbb_root_path . "config.$phpEx";
@@ -230,7 +266,7 @@ class phpbb_functional_test_case extends phpbb_test_case
self::assertContains('Database configuration', $crawler->filter('#main')->text());
$form = $crawler->selectButton('submit')->form(array(
// Installer uses 3.0-style dbms name
- 'dbms' => str_replace('phpbb_db_driver_', '', self::$config['dbms']),
+ 'dbms' => str_replace('phpbb\db\driver\\', '', self::$config['dbms']),
'dbhost' => self::$config['dbhost'],
'dbport' => self::$config['dbport'],
'dbname' => self::$config['dbname'],
@@ -252,8 +288,7 @@ class phpbb_functional_test_case extends phpbb_test_case
'admin_name' => 'admin',
'admin_pass1' => 'adminadmin',
'admin_pass2' => 'adminadmin',
- 'board_email1' => 'nobody@example.com',
- 'board_email2' => 'nobody@example.com',
+ 'board_email' => 'nobody@example.com',
));
// install/index.php?mode=install&sub=administrator
@@ -265,7 +300,7 @@ class phpbb_functional_test_case extends phpbb_test_case
// because that step will create a config.php file if phpBB has the
// permission to do so. We have to create the config file on our own
// in order to get the DEBUG constants defined.
- $config_php_data = phpbb_create_config_file_data(self::$config, self::$config['dbms'], array(), true, true);
+ $config_php_data = phpbb_create_config_file_data(self::$config, self::$config['dbms'], true, true);
$config_created = file_put_contents($config_file, $config_php_data) !== false;
if (!$config_created)
{
@@ -336,51 +371,67 @@ class phpbb_functional_test_case extends phpbb_test_case
global $phpbb_root_path;
$db = $this->get_db();
- $sql = 'INSERT INTO ' . STYLES_TABLE . ' ' . $db->sql_build_array('INSERT', array(
- 'style_id' => $style_id,
- 'style_name' => $style_path,
- 'style_copyright' => '',
- 'style_active' => 1,
- 'template_id' => $style_id,
- 'theme_id' => $style_id,
- 'imageset_id' => $style_id,
- ));
- $db->sql_query($sql);
-
- $sql = 'INSERT INTO ' . STYLES_IMAGESET_TABLE . ' ' . $db->sql_build_array('INSERT', array(
- 'imageset_id' => $style_id,
- 'imageset_name' => $style_path,
- 'imageset_copyright' => '',
- 'imageset_path' => $style_path,
- ));
- $db->sql_query($sql);
-
- $sql = 'INSERT INTO ' . STYLES_TEMPLATE_TABLE . ' ' . $db->sql_build_array('INSERT', array(
- 'template_id' => $style_id,
- 'template_name' => $style_path,
- 'template_copyright' => '',
- 'template_path' => $style_path,
- 'bbcode_bitfield' => 'kNg=',
- 'template_inherits_id' => $parent_style_id,
- 'template_inherit_path' => $parent_style_path,
- ));
- $db->sql_query($sql);
-
- $sql = 'INSERT INTO ' . STYLES_THEME_TABLE . ' ' . $db->sql_build_array('INSERT', array(
- 'theme_id' => $style_id,
- 'theme_name' => $style_path,
- 'theme_copyright' => '',
- 'theme_path' => $style_path,
- 'theme_storedb' => 0,
- 'theme_mtime' => 0,
- 'theme_data' => '',
- ));
- $db->sql_query($sql);
-
- if ($style_path != 'prosilver' && $style_path != 'subsilver2')
+ if (version_compare(PHPBB_VERSION, '3.1.0-dev', '<'))
+ {
+ $sql = 'INSERT INTO ' . STYLES_TABLE . ' ' . $db->sql_build_array('INSERT', array(
+ 'style_id' => $style_id,
+ 'style_name' => $style_path,
+ 'style_copyright' => '',
+ 'style_active' => 1,
+ 'template_id' => $style_id,
+ 'theme_id' => $style_id,
+ 'imageset_id' => $style_id,
+ ));
+ $db->sql_query($sql);
+
+ $sql = 'INSERT INTO ' . STYLES_IMAGESET_TABLE . ' ' . $db->sql_build_array('INSERT', array(
+ 'imageset_id' => $style_id,
+ 'imageset_name' => $style_path,
+ 'imageset_copyright' => '',
+ 'imageset_path' => $style_path,
+ ));
+ $db->sql_query($sql);
+
+ $sql = 'INSERT INTO ' . STYLES_TEMPLATE_TABLE . ' ' . $db->sql_build_array('INSERT', array(
+ 'template_id' => $style_id,
+ 'template_name' => $style_path,
+ 'template_copyright' => '',
+ 'template_path' => $style_path,
+ 'bbcode_bitfield' => 'kNg=',
+ 'template_inherits_id' => $parent_style_id,
+ 'template_inherit_path' => $parent_style_path,
+ ));
+ $db->sql_query($sql);
+
+ $sql = 'INSERT INTO ' . STYLES_THEME_TABLE . ' ' . $db->sql_build_array('INSERT', array(
+ 'theme_id' => $style_id,
+ 'theme_name' => $style_path,
+ 'theme_copyright' => '',
+ 'theme_path' => $style_path,
+ 'theme_storedb' => 0,
+ 'theme_mtime' => 0,
+ 'theme_data' => '',
+ ));
+ $db->sql_query($sql);
+
+ if ($style_path != 'prosilver' && $style_path != 'subsilver2')
+ {
+ @mkdir($phpbb_root_path . 'styles/' . $style_path, 0777);
+ @mkdir($phpbb_root_path . 'styles/' . $style_path . '/template', 0777);
+ }
+ }
+ else
{
- @mkdir($phpbb_root_path . 'styles/' . $style_path, 0777);
- @mkdir($phpbb_root_path . 'styles/' . $style_path . '/template', 0777);
+ $db->sql_multi_insert(STYLES_TABLE, array(
+ 'style_id' => $style_id,
+ 'style_name' => $style_path,
+ 'style_copyright' => '',
+ 'style_active' => 1,
+ 'style_path' => $style_path,
+ 'bbcode_bitfield' => 'kNg=',
+ 'style_parent_id' => $parent_style_id,
+ 'style_parent_tree' => $parent_style_path,
+ ));
}
}
@@ -396,14 +447,17 @@ class phpbb_functional_test_case extends phpbb_test_case
$db = $this->get_db();
$db->sql_query('DELETE FROM ' . STYLES_TABLE . ' WHERE style_id = ' . $style_id);
- $db->sql_query('DELETE FROM ' . STYLES_IMAGESET_TABLE . ' WHERE imageset_id = ' . $style_id);
- $db->sql_query('DELETE FROM ' . STYLES_TEMPLATE_TABLE . ' WHERE template_id = ' . $style_id);
- $db->sql_query('DELETE FROM ' . STYLES_THEME_TABLE . ' WHERE theme_id = ' . $style_id);
-
- if ($style_path != 'prosilver' && $style_path != 'subsilver2')
+ if (version_compare(PHPBB_VERSION, '3.1.0-dev', '<'))
{
- @rmdir($phpbb_root_path . 'styles/' . $style_path . '/template');
- @rmdir($phpbb_root_path . 'styles/' . $style_path);
+ $db->sql_query('DELETE FROM ' . STYLES_IMAGESET_TABLE . ' WHERE imageset_id = ' . $style_id);
+ $db->sql_query('DELETE FROM ' . STYLES_TEMPLATE_TABLE . ' WHERE template_id = ' . $style_id);
+ $db->sql_query('DELETE FROM ' . STYLES_THEME_TABLE . ' WHERE theme_id = ' . $style_id);
+
+ if ($style_path != 'prosilver' && $style_path != 'subsilver2')
+ {
+ @rmdir($phpbb_root_path . 'styles/' . $style_path . '/template');
+ @rmdir($phpbb_root_path . 'styles/' . $style_path);
+ }
}
}
@@ -418,10 +472,7 @@ class phpbb_functional_test_case extends phpbb_test_case
// Required by unique_id
global $config;
- if (!is_array($config))
- {
- $config = array();
- }
+ $config = new \phpbb\config\config(array());
/*
* Add required config entries to the config array to prevent
@@ -436,7 +487,7 @@ class phpbb_functional_test_case extends phpbb_test_case
$config['rand_seed_last_update'] = time() + 600;
// Required by user_add
- global $db, $cache;
+ global $db, $cache, $phpbb_dispatcher, $phpbb_container;
$db = $this->get_db();
if (!function_exists('phpbb_mock_null_cache'))
{
@@ -444,6 +495,14 @@ class phpbb_functional_test_case extends phpbb_test_case
}
$cache = new phpbb_mock_null_cache;
+ $cache_driver = new \phpbb\cache\driver\null();
+ $phpbb_container = $this->getMock('Symfony\Component\DependencyInjection\ContainerInterface');
+ $phpbb_container
+ ->expects($this->any())
+ ->method('get')
+ ->with('cache.driver')
+ ->will($this->returnValue($cache_driver));
+
if (!function_exists('utf_clean_string'))
{
require_once(__DIR__ . '/../../phpBB/includes/utf/utf_tools.php');
@@ -452,6 +511,10 @@ class phpbb_functional_test_case extends phpbb_test_case
{
require_once(__DIR__ . '/../../phpBB/includes/functions_user.php');
}
+ set_config(null, null, null, $config);
+ set_config_count(null, null, null, $config);
+ $phpbb_dispatcher = new phpbb_mock_event_dispatcher();
+ $passwords_manager = $this->get_passwords_manager();
$user_row = array(
'username' => $username,
@@ -461,11 +524,92 @@ class phpbb_functional_test_case extends phpbb_test_case
'user_lang' => 'en',
'user_timezone' => 0,
'user_dateformat' => '',
- 'user_password' => phpbb_hash($username . $username),
+ 'user_password' => $passwords_manager->hash($username . $username),
);
return user_add($user_row);
}
+ protected function remove_user_group($group_name, $usernames)
+ {
+ global $db, $cache, $auth, $config, $phpbb_dispatcher, $phpbb_log, $phpbb_container, $phpbb_root_path, $phpEx;
+
+ $config = new \phpbb\config\config(array());
+ $config['coppa_enable'] = 0;
+
+ $db = $this->get_db();
+ $phpbb_dispatcher = new phpbb_mock_event_dispatcher();
+ $user = $this->getMock('\phpbb\user');
+ $auth = $this->getMock('\phpbb\auth\auth');
+
+ $phpbb_log = new \phpbb\log\log($db, $user, $auth, $phpbb_dispatcher, $phpbb_root_path, 'adm/', $phpEx, LOG_TABLE);
+ $cache = new phpbb_mock_null_cache;
+
+ $cache_driver = new \phpbb\cache\driver\null();
+ $phpbb_container = new phpbb_mock_container_builder();
+ $phpbb_container->set('cache.driver', $cache_driver);
+ $phpbb_container->set('notification_manager', new phpbb_mock_notification_manager());
+
+ if (!function_exists('utf_clean_string'))
+ {
+ require_once(__DIR__ . '/../../phpBB/includes/utf/utf_tools.php');
+ }
+ if (!function_exists('group_user_del'))
+ {
+ require_once(__DIR__ . '/../../phpBB/includes/functions_user.php');
+ }
+
+ $sql = 'SELECT group_id
+ FROM ' . GROUPS_TABLE . "
+ WHERE group_name = '" . $db->sql_escape($group_name) . "'";
+ $result = $db->sql_query($sql);
+ $group_id = (int) $db->sql_fetchfield('group_id');
+ $db->sql_freeresult($result);
+
+ return group_user_del($group_id, false, $usernames, $group_name);
+ }
+
+ protected function add_user_group($group_name, $usernames, $default = false, $leader = false)
+ {
+ global $db, $cache, $auth, $config, $phpbb_dispatcher, $phpbb_log, $phpbb_container, $phpbb_root_path, $phpEx;
+
+ $config = new \phpbb\config\config(array());
+ $config['coppa_enable'] = 0;
+
+ $db = $this->get_db();
+ $phpbb_dispatcher = new phpbb_mock_event_dispatcher();
+ $user = $this->getMock('\phpbb\user');
+ $auth = $this->getMock('\phpbb\auth\auth');
+
+ $phpbb_log = new \phpbb\log\log($db, $user, $auth, $phpbb_dispatcher, $phpbb_root_path, 'adm/', $phpEx, LOG_TABLE);
+ $cache = new phpbb_mock_null_cache;
+
+ $cache_driver = new \phpbb\cache\driver\null();
+ $phpbb_container = $this->getMock('Symfony\Component\DependencyInjection\ContainerInterface');
+ $phpbb_container
+ ->expects($this->any())
+ ->method('get')
+ ->with('cache.driver')
+ ->will($this->returnValue($cache_driver));
+
+ if (!function_exists('utf_clean_string'))
+ {
+ require_once(__DIR__ . '/../../phpBB/includes/utf/utf_tools.php');
+ }
+ if (!function_exists('group_user_del'))
+ {
+ require_once(__DIR__ . '/../../phpBB/includes/functions_user.php');
+ }
+
+ $sql = 'SELECT group_id
+ FROM ' . GROUPS_TABLE . "
+ WHERE group_name = '" . $db->sql_escape($group_name) . "'";
+ $result = $db->sql_query($sql);
+ $group_id = (int) $db->sql_fetchfield('group_id');
+ $db->sql_freeresult($result);
+
+ return group_user_add($group_id, false, $usernames, $group_name, $default, $leader);
+ }
+
protected function login($username = 'admin')
{
$this->add_lang('ucp');
@@ -475,7 +619,7 @@ class phpbb_functional_test_case extends phpbb_test_case
$form = $crawler->selectButton($this->lang('LOGIN'))->form();
$crawler = self::submit($form, array('username' => $username, 'password' => $username . $username));
- $this->assertContains($this->lang('LOGIN_REDIRECT'), $crawler->filter('html')->text());
+ $this->assertNotContains($this->lang('LOGIN'), $crawler->filter('.navbar')->text());
$cookies = self::$cookieJar->all();
@@ -489,6 +633,16 @@ class phpbb_functional_test_case extends phpbb_test_case
}
}
+ protected function logout()
+ {
+ $this->add_lang('ucp');
+
+ $crawler = self::request('GET', 'ucp.php?sid=' . $this->sid . '&mode=logout');
+ $this->assertContains($this->lang('REGISTER'), $crawler->filter('.navbar')->text());
+ unset($this->sid);
+
+ }
+
/**
* Login to the ACP
* You must run login() before calling this.
@@ -514,7 +668,7 @@ class phpbb_functional_test_case extends phpbb_test_case
if (strpos($field, 'password_') === 0)
{
$crawler = self::submit($form, array('username' => $username, $field => $username . $username));
- $this->assertContains($this->lang('LOGIN_ADMIN_SUCCESS'), $crawler->filter('html')->text());
+ $this->assertContains($this->lang('ADMIN_PANEL'), $crawler->filter('h1')->text());
$cookies = self::$cookieJar->all();
@@ -570,6 +724,30 @@ class phpbb_functional_test_case extends phpbb_test_case
}
/**
+ * assertContains for language strings
+ *
+ * @param string $needle Search string
+ * @param string $haystack Search this
+ * @param string $message Optional failure message
+ */
+ public function assertContainsLang($needle, $haystack, $message = null)
+ {
+ $this->assertContains(html_entity_decode($this->lang($needle), ENT_QUOTES), $haystack, $message);
+ }
+
+ /**
+ * assertNotContains for language strings
+ *
+ * @param string $needle Search string
+ * @param string $haystack Search this
+ * @param string $message Optional failure message
+ */
+ public function assertNotContainsLang($needle, $haystack, $message = null)
+ {
+ $this->assertNotContains(html_entity_decode($this->lang($needle), ENT_QUOTES), $haystack, $message);
+ }
+
+ /*
* Perform some basic assertions for the page
*
* Checks for debug/error output before the actual page content and the status code
@@ -590,6 +768,27 @@ class phpbb_functional_test_case extends phpbb_test_case
self::assertStringStartsWith('<!DOCTYPE', trim($content), 'Output found before DOCTYPE specification.');
}
+ /*
+ * Perform some basic assertions for an xml page
+ *
+ * Checks for debug/error output before the actual page content and the status code
+ *
+ * @param mixed $status_code Expected status code, false to disable check
+ * @return null
+ */
+ static public function assert_response_xml($status_code = 200)
+ {
+ if ($status_code !== false)
+ {
+ self::assert_response_status_code($status_code);
+ }
+
+ // Any output before the xml opening means there was an error
+ $content = self::$client->getResponse()->getContent();
+ self::assertNotContains('[phpBB Debug]', $content);
+ self::assertStringStartsWith('<?xml', trim($content), 'Output found before XML specification.');
+ }
+
/**
* Heuristic function to check that the response is success.
*
@@ -604,6 +803,86 @@ class phpbb_functional_test_case extends phpbb_test_case
self::assertEquals($status_code, self::$client->getResponse()->getStatus());
}
+ public function assert_filter($crawler, $expr, $msg = null)
+ {
+ $nodes = $crawler->filter($expr);
+ if ($msg)
+ {
+ $msg .= "\n";
+ }
+ else
+ {
+ $msg = '';
+ }
+ $msg .= "`$expr` not found in DOM.";
+ $this->assertGreaterThan(0, count($nodes), $msg);
+ return $nodes;
+ }
+
+ /**
+ * Asserts that exactly one checkbox with name $name exists within the scope
+ * of $crawler and that the checkbox is checked.
+ *
+ * @param Symfony\Component\DomCrawler\Crawler $crawler
+ * @param string $name
+ * @param string $message
+ *
+ * @return null
+ */
+ public function assert_checkbox_is_checked($crawler, $name, $message = '')
+ {
+ $this->assertSame(
+ 'checked',
+ $this->assert_find_one_checkbox($crawler, $name)->attr('checked'),
+ $message ?: "Failed asserting that checkbox $name is checked."
+ );
+ }
+
+ /**
+ * Asserts that exactly one checkbox with name $name exists within the scope
+ * of $crawler and that the checkbox is unchecked.
+ *
+ * @param Symfony\Component\DomCrawler\Crawler $crawler
+ * @param string $name
+ * @param string $message
+ *
+ * @return null
+ */
+ public function assert_checkbox_is_unchecked($crawler, $name, $message = '')
+ {
+ $this->assertSame(
+ '',
+ $this->assert_find_one_checkbox($crawler, $name)->attr('checked'),
+ $message ?: "Failed asserting that checkbox $name is unchecked."
+ );
+ }
+
+ /**
+ * Searches for an input element of type checkbox with the name $name using
+ * $crawler. Contains an assertion that only one such checkbox exists within
+ * the scope of $crawler.
+ *
+ * @param Symfony\Component\DomCrawler\Crawler $crawler
+ * @param string $name
+ * @param string $message
+ *
+ * @return Symfony\Component\DomCrawler\Crawler
+ */
+ public function assert_find_one_checkbox($crawler, $name, $message = '')
+ {
+ $query = sprintf('//input[@type="checkbox" and @name="%s"]', $name);
+ $result = $crawler->filterXPath($query);
+
+ $this->assertEquals(
+ 1,
+ sizeof($result),
+ $message ?: 'Failed asserting that exactly one checkbox with name' .
+ " $name exists in crawler scope."
+ );
+
+ return $result;
+ }
+
/**
* Creates a topic
*
@@ -613,9 +892,10 @@ class phpbb_functional_test_case extends phpbb_test_case
* @param string $subject
* @param string $message
* @param array $additional_form_data Any additional form data to be sent in the request
- * @return array post_id, topic_id
+ * @param string $expected Lang var of expected message after posting
+ * @return array|null post_id, topic_id if message is empty
*/
- public function create_topic($forum_id, $subject, $message, $additional_form_data = array())
+ public function create_topic($forum_id, $subject, $message, $additional_form_data = array(), $expected = '')
{
$posting_url = "posting.php?mode=post&f={$forum_id}&sid={$this->sid}";
@@ -625,7 +905,7 @@ class phpbb_functional_test_case extends phpbb_test_case
'post' => true,
), $additional_form_data);
- return self::submit_post($posting_url, 'POST_TOPIC', $form_data);
+ return self::submit_post($posting_url, 'POST_TOPIC', $form_data, $expected);
}
/**
@@ -638,9 +918,10 @@ class phpbb_functional_test_case extends phpbb_test_case
* @param string $subject
* @param string $message
* @param array $additional_form_data Any additional form data to be sent in the request
- * @return array post_id, topic_id
+ * @param string $expected Lang var of expected message after posting
+ * @return array|null post_id, topic_id if message is empty
*/
- public function create_post($forum_id, $topic_id, $subject, $message, $additional_form_data = array())
+ public function create_post($forum_id, $topic_id, $subject, $message, $additional_form_data = array(), $expected = '')
{
$posting_url = "posting.php?mode=reply&f={$forum_id}&t={$topic_id}&sid={$this->sid}";
@@ -650,7 +931,7 @@ class phpbb_functional_test_case extends phpbb_test_case
'post' => true,
), $additional_form_data);
- return self::submit_post($posting_url, 'POST_REPLY', $form_data);
+ return self::submit_post($posting_url, 'POST_REPLY', $form_data, $expected);
}
/**
@@ -659,15 +940,33 @@ class phpbb_functional_test_case extends phpbb_test_case
* @param string $posting_url
* @param string $posting_contains
* @param array $form_data
- * @return array post_id, topic_id
+ * @param string $expected Lang var of expected message after posting
+ * @return array|null post_id, topic_id if message is empty
*/
- protected function submit_post($posting_url, $posting_contains, $form_data)
+ protected function submit_post($posting_url, $posting_contains, $form_data, $expected = '')
{
$this->add_lang('posting');
$crawler = self::request('GET', $posting_url);
$this->assertContains($this->lang($posting_contains), $crawler->filter('html')->text());
+ if (!empty($form_data['upload_files']))
+ {
+ for ($i = 0; $i < $form_data['upload_files']; $i++)
+ {
+ $file = array(
+ 'tmp_name' => __DIR__ . '/../functional/fixtures/files/valid.jpg',
+ 'name' => 'valid.jpg',
+ 'type' => 'image/jpeg',
+ 'size' => filesize(__DIR__ . '/../functional/fixtures/files/valid.jpg'),
+ 'error' => UPLOAD_ERR_OK,
+ );
+
+ $crawler = self::$client->request('POST', $posting_url, array('add_file' => $this->lang('ADD_FILE')), array('fileupload' => $file));
+ }
+ unset($form_data['upload_files']);
+ }
+
$hidden_fields = array(
$crawler->filter('[type="hidden"]')->each(function ($node, $i) {
return array('name' => $node->attr('name'), 'value' => $node->attr('value'));
@@ -690,8 +989,13 @@ class phpbb_functional_test_case extends phpbb_test_case
// contained in one of the actual form fields that the browser sees (i.e. it ignores "hidden" inputs)
// Instead, I send it as a request with the submit button "post" set to true.
$crawler = self::request('POST', $posting_url, $form_data);
- $this->assertContains($this->lang('POST_STORED'), $crawler->filter('html')->text());
- $url = $crawler->selectLink($this->lang('VIEW_MESSAGE', '', ''))->link()->getUri();
+
+ if ($expected !== '')
+ {
+ $this->assertContainsLang($expected, $crawler->filter('html')->text());
+ return null;
+ }
+ $url = $crawler->selectLink($form_data['subject'])->link()->getUri();
return array(
'topic_id' => $this->get_parameter_from_link($url, 't'),
@@ -700,6 +1004,52 @@ class phpbb_functional_test_case extends phpbb_test_case
}
/**
+ * Deletes a topic
+ *
+ * Be sure to login before creating
+ *
+ * @param int $topic_id
+ * @return null
+ */
+ public function delete_topic($topic_id)
+ {
+ $crawler = self::request('GET', "viewtopic.php?t={$topic_id}&sid={$this->sid}");
+
+ $this->add_lang('posting');
+ $form = $crawler->selectButton('Go')->eq(1)->form();
+ $form['action']->select('delete_topic');
+ $crawler = self::submit($form);
+ $this->assertContainsLang('DELETE_PERMANENTLY', $crawler->text());
+
+ $this->add_lang('mcp');
+ $form = $crawler->selectButton('Yes')->form();
+ $form['delete_permanent'] = 1;
+ $crawler = self::submit($form);
+ $this->assertContainsLang('TOPIC_DELETED_SUCCESS', $crawler->text());
+ }
+
+ /**
+ * Deletes a post
+ *
+ * Be sure to login before creating
+ *
+ * @param int $forum_id
+ * @param int $topic_id
+ * @return null
+ */
+ public function delete_post($forum_id, $post_id)
+ {
+ $this->add_lang('posting');
+ $crawler = self::request('GET', "posting.php?mode=delete&f={$forum_id}&p={$post_id}&sid={$this->sid}");
+ $this->assertContainsLang('DELETE_PERMANENTLY', $crawler->text());
+
+ $form = $crawler->selectButton('Yes')->form();
+ $form['delete_permanent'] = 1;
+ $crawler = self::submit($form);
+ $this->assertContainsLang('POST_DELETED', $crawler->text());
+ }
+
+ /**
* Returns the requested parameter from a URL
*
* @param string $url
@@ -734,4 +1084,29 @@ class phpbb_functional_test_case extends phpbb_test_case
}
return null;
}
+
+ /**
+ * Return a passwords manager instance
+ *
+ * @return phpbb\passwords\manager
+ */
+ public function get_passwords_manager()
+ {
+ // Prepare dependencies for manager and driver
+ $config = new \phpbb\config\config(array());
+ $driver_helper = new \phpbb\passwords\driver\helper($config);
+
+ $passwords_drivers = array(
+ 'passwords.driver.bcrypt_2y' => new \phpbb\passwords\driver\bcrypt_2y($config, $driver_helper),
+ 'passwords.driver.bcrypt' => new \phpbb\passwords\driver\bcrypt($config, $driver_helper),
+ 'passwords.driver.salted_md5' => new \phpbb\passwords\driver\salted_md5($config, $driver_helper),
+ 'passwords.driver.phpass' => new \phpbb\passwords\driver\phpass($config, $driver_helper),
+ );
+
+ $passwords_helper = new \phpbb\passwords\helper;
+ // Set up passwords manager
+ $manager = new \phpbb\passwords\manager($config, $passwords_drivers, $passwords_helper, array_keys($passwords_drivers));
+
+ return $manager;
+ }
}
diff --git a/tests/test_framework/phpbb_search_test_case.php b/tests/test_framework/phpbb_search_test_case.php
new file mode 100644
index 0000000000..b929e740ea
--- /dev/null
+++ b/tests/test_framework/phpbb_search_test_case.php
@@ -0,0 +1,29 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+abstract class phpbb_search_test_case extends phpbb_database_test_case
+{
+ static protected function get_search_wrapper($class)
+ {
+ $wrapped = str_replace('\\', '_', $class) . '_wrapper';
+ if (!class_exists($wrapped))
+ {
+ $code = "
+class $wrapped extends $class
+{
+ public function get_must_contain_ids() { return \$this->must_contain_ids; }
+ public function get_must_not_contain_ids() { return \$this->must_not_contain_ids; }
+ public function get_split_words() { return \$this->split_words; }
+}
+ ";
+ eval($code);
+ }
+ return $wrapped;
+ }
+}
diff --git a/tests/test_framework/phpbb_session_test_case.php b/tests/test_framework/phpbb_session_test_case.php
new file mode 100644
index 0000000000..0a2f767845
--- /dev/null
+++ b/tests/test_framework/phpbb_session_test_case.php
@@ -0,0 +1,49 @@
+<?php
+/**
+ *
+ * @package testing
+ * @copyright (c) 2013 phpBB Group
+ * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+ *
+ */
+
+require_once dirname(__FILE__) . '/../session/testable_factory.php';
+require_once dirname(__FILE__) . '/../session/testable_facade.php';
+
+abstract class phpbb_session_test_case extends phpbb_database_test_case
+{
+ protected $session_factory;
+ protected $session_facade;
+ protected $db;
+
+ function setUp()
+ {
+ parent::setUp();
+
+ global $symfony_request, $phpbb_filesystem, $phpbb_path_helper, $request, $phpbb_root_path, $phpEx;
+ $symfony_request = new \phpbb\symfony_request(
+ new phpbb_mock_request()
+ );
+ $phpbb_filesystem = new \phpbb\filesystem();
+ $phpbb_path_helper = new \phpbb\path_helper(
+ $symfony_request,
+ $phpbb_filesystem,
+ $phpbb_root_path,
+ $phpEx
+ );
+
+ $this->session_factory = new phpbb_session_testable_factory;
+ $this->db = $this->new_dbal();
+ $this->session_facade =
+ new phpbb_session_testable_facade($this->db, $this->session_factory);
+ }
+
+ protected function check_sessions_equals($expected_sessions, $message)
+ {
+ $sql = 'SELECT session_id, session_user_id
+ FROM phpbb_sessions
+ ORDER BY session_user_id';
+
+ $this->assertSqlResultEquals($expected_sessions, $sql, $message);
+ }
+}
diff --git a/tests/test_framework/phpbb_test_case_helpers.php b/tests/test_framework/phpbb_test_case_helpers.php
index 29adfc6817..2f225fe7af 100644
--- a/tests/test_framework/phpbb_test_case_helpers.php
+++ b/tests/test_framework/phpbb_test_case_helpers.php
@@ -18,6 +18,56 @@ class phpbb_test_case_helpers
$this->test_case = $test_case;
}
+ /**
+ * This should only be called once before the tests are run.
+ * This is used to copy the fixtures to the phpBB install
+ */
+ public function copy_ext_fixtures($fixtures_dir, $fixtures)
+ {
+ global $phpbb_root_path;
+
+ if (file_exists($phpbb_root_path . 'ext/'))
+ {
+ // First, move any extensions setup on the board to a temp directory
+ $this->copy_dir($phpbb_root_path . 'ext/', $phpbb_root_path . 'store/temp_ext/');
+
+ // Then empty the ext/ directory on the board (for accurate test cases)
+ $this->empty_dir($phpbb_root_path . 'ext/');
+ }
+
+ // Copy our ext/ files from the test case to the board
+ foreach ($fixtures as $fixture)
+ {
+ $this->copy_dir($fixtures_dir . $fixture, $phpbb_root_path . 'ext/' . $fixture);
+ }
+ }
+
+ /**
+ * This should only be called once after the tests are run.
+ * This is used to remove the fixtures from the phpBB install
+ */
+ public function restore_original_ext_dir()
+ {
+ global $phpbb_root_path;
+
+ // Remove all of the files we copied from test ext -> board ext
+ $this->empty_dir($phpbb_root_path . 'ext/');
+
+ // Copy back the board installed extensions from the temp directory
+ if (file_exists($phpbb_root_path . 'store/temp_ext/'))
+ {
+ $this->copy_dir($phpbb_root_path . 'store/temp_ext/', $phpbb_root_path . 'ext/');
+
+ // Remove all of the files we copied from board ext -> temp_ext
+ $this->empty_dir($phpbb_root_path . 'store/temp_ext/');
+ }
+
+ if (file_exists($phpbb_root_path . 'store/temp_ext/'))
+ {
+ $this->empty_dir($phpbb_root_path . 'store/temp_ext/');
+ }
+ }
+
public function setExpectedTriggerError($errno, $message = '')
{
$exceptionName = '';
@@ -42,6 +92,14 @@ class phpbb_test_case_helpers
$this->test_case->setExpectedException($exceptionName, (string) $message, $errno);
}
+ public function makedirs($path)
+ {
+ // PHP bug #55124 (fixed in 5.4.0)
+ $path = str_replace('/./', '/', $path);
+
+ mkdir($path, 0777, true);
+ }
+
static public function get_test_config()
{
$config = array();
@@ -49,7 +107,7 @@ class phpbb_test_case_helpers
if (extension_loaded('sqlite') && version_compare(PHPUnit_Runner_Version::id(), '3.4.15', '>='))
{
$config = array_merge($config, array(
- 'dbms' => 'sqlite',
+ 'dbms' => 'phpbb\db\driver\sqlite',
'dbhost' => dirname(__FILE__) . '/../phpbb_unit_tests.sqlite2', // filename
'dbport' => '',
'dbname' => '',
@@ -72,8 +130,13 @@ class phpbb_test_case_helpers
{
include($test_config);
+ if (!function_exists('phpbb_convert_30_dbms_to_31'))
+ {
+ require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php';
+ }
+
$config = array_merge($config, array(
- 'dbms' => $dbms,
+ 'dbms' => phpbb_convert_30_dbms_to_31($dbms),
'dbhost' => $dbhost,
'dbport' => $dbport,
'dbname' => $dbname,
@@ -86,12 +149,31 @@ class phpbb_test_case_helpers
{
$config['phpbb_functional_url'] = $phpbb_functional_url;
}
+
+ if (isset($phpbb_redis_host))
+ {
+ $config['redis_host'] = $phpbb_redis_host;
+ }
+ if (isset($phpbb_redis_port))
+ {
+ $config['redis_port'] = $phpbb_redis_port;
+ }
+
+ if (isset($fulltext_sphinx_id))
+ {
+ $config['fulltext_sphinx_id'] = $fulltext_sphinx_id;
+ }
}
if (isset($_SERVER['PHPBB_TEST_DBMS']))
{
+ if (!function_exists('phpbb_convert_30_dbms_to_31'))
+ {
+ require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php';
+ }
+
$config = array_merge($config, array(
- 'dbms' => isset($_SERVER['PHPBB_TEST_DBMS']) ? $_SERVER['PHPBB_TEST_DBMS'] : '',
+ 'dbms' => isset($_SERVER['PHPBB_TEST_DBMS']) ? phpbb_convert_30_dbms_to_31($_SERVER['PHPBB_TEST_DBMS']) : '',
'dbhost' => isset($_SERVER['PHPBB_TEST_DBHOST']) ? $_SERVER['PHPBB_TEST_DBHOST'] : '',
'dbport' => isset($_SERVER['PHPBB_TEST_DBPORT']) ? $_SERVER['PHPBB_TEST_DBPORT'] : '',
'dbname' => isset($_SERVER['PHPBB_TEST_DBNAME']) ? $_SERVER['PHPBB_TEST_DBNAME'] : '',
@@ -108,6 +190,103 @@ class phpbb_test_case_helpers
));
}
+ if (isset($_SERVER['PHPBB_TEST_REDIS_HOST']))
+ {
+ $config['redis_host'] = $_SERVER['PHPBB_TEST_REDIS_HOST'];
+ }
+
+ if (isset($_SERVER['PHPBB_TEST_REDIS_PORT']))
+ {
+ $config['redis_port'] = $_SERVER['PHPBB_TEST_REDIS_PORT'];
+ }
+
return $config;
}
+
+ /**
+ * Recursive directory copying function
+ *
+ * @param string $source
+ * @param string $dest
+ * @return array list of files copied
+ */
+ public function copy_dir($source, $dest)
+ {
+ $source = (substr($source, -1) == '/') ? $source : $source . '/';
+ $dest = (substr($dest, -1) == '/') ? $dest : $dest . '/';
+
+ $copied_files = array();
+
+ if (!is_dir($dest))
+ {
+ $this->makedirs($dest);
+ }
+
+ $files = scandir($source);
+ foreach ($files as $file)
+ {
+ if ($file == '.' || $file == '..')
+ {
+ continue;
+ }
+
+ if (is_dir($source . $file))
+ {
+ $created_dir = false;
+ if (!is_dir($dest . $file))
+ {
+ $created_dir = true;
+ $this->makedirs($dest . $file);
+ }
+
+ $copied_files = array_merge($copied_files, self::copy_dir($source . $file, $dest . $file));
+
+ if ($created_dir)
+ {
+ $copied_files[] = $dest . $file;
+ }
+ }
+ else
+ {
+ if (!file_exists($dest . $file))
+ {
+ copy($source . $file, $dest . $file);
+
+ $copied_files[] = $dest . $file;
+ }
+ }
+ }
+
+ return $copied_files;
+ }
+
+ /**
+ * Empty directory (remove any subdirectories/files below)
+ *
+ * @param array $file_list
+ */
+ public function empty_dir($path)
+ {
+ $path = (substr($path, -1) == '/') ? $path : $path . '/';
+
+ $files = scandir($path);
+ foreach ($files as $file)
+ {
+ if ($file == '.' || $file == '..')
+ {
+ continue;
+ }
+
+ if (is_dir($path . $file))
+ {
+ $this->empty_dir($path . $file);
+
+ rmdir($path . $file);
+ }
+ else
+ {
+ unlink($path . $file);
+ }
+ }
+ }
}
diff --git a/tests/text_processing/censor_text_test.php b/tests/text_processing/censor_text_test.php
index f0e13638a5..043d8eb27d 100644
--- a/tests/text_processing/censor_text_test.php
+++ b/tests/text_processing/censor_text_test.php
@@ -9,8 +9,6 @@
require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php';
require_once dirname(__FILE__) . '/../../phpBB/includes/functions_content.php';
-require_once dirname(__FILE__) . '/../mock/user.php';
-require_once dirname(__FILE__) . '/../mock/cache.php';
class phpbb_text_processing_censor_text_test extends phpbb_test_case
{
@@ -19,7 +17,7 @@ class phpbb_text_processing_censor_text_test extends phpbb_test_case
global $cache, $user;
$cache = new phpbb_mock_cache;
$user = new phpbb_mock_user;
-
+
$user->optionset('viewcensors', false);
return array(
@@ -61,7 +59,7 @@ class phpbb_text_processing_censor_text_test extends phpbb_test_case
array('badword1 badword2 badword3 badword4', 'replacement1 replacement2 replacement3 replacement4'),
array('badword1 badword2 badword3 badword4d', 'replacement1 replacement2 replacement3 badword4d'),
array('abadword1 badword2 badword3 badword4', 'replacement1 replacement2 replacement3 replacement4'),
-
+
array("new\nline\ntest", "new\nline\ntest"),
array("tab\ttest\t", "tab\ttest\t"),
array('öäü', 'öäü'),
diff --git a/tests/text_processing/generate_text_for_display_test.php b/tests/text_processing/generate_text_for_display_test.php
index a157fe7d9a..15905535ac 100644
--- a/tests/text_processing/generate_text_for_display_test.php
+++ b/tests/text_processing/generate_text_for_display_test.php
@@ -16,7 +16,7 @@ class phpbb_text_processing_generate_text_for_display_test extends phpbb_test_ca
{
public function setUp()
{
- global $cache, $user;
+ global $cache, $user, $phpbb_dispatcher;
parent::setUp();
@@ -24,6 +24,8 @@ class phpbb_text_processing_generate_text_for_display_test extends phpbb_test_ca
$user = new phpbb_mock_user;
$user->optionset('viewcensors', false);
+
+ $phpbb_dispatcher = new phpbb_mock_event_dispatcher();
}
public function test_empty_string()
diff --git a/tests/text_processing/make_clickable_test.php b/tests/text_processing/make_clickable_test.php
index db0812319d..d94fac2ae4 100644
--- a/tests/text_processing/make_clickable_test.php
+++ b/tests/text_processing/make_clickable_test.php
@@ -12,7 +12,7 @@ require_once dirname(__FILE__) . '/../../phpBB/includes/functions_content.php';
class phpbb_text_processing_make_clickable_test extends phpbb_test_case
{
- static public function make_clickable_data()
+ public function make_clickable_data()
{
// value => whether it should work
$prefix_texts = array(
diff --git a/tests/tree/fixtures/phpbb_forums.xml b/tests/tree/fixtures/phpbb_forums.xml
new file mode 100644
index 0000000000..8f133078a9
--- /dev/null
+++ b/tests/tree/fixtures/phpbb_forums.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<dataset>
+ <table name="phpbb_forums">
+ <column>forum_id</column>
+ <column>parent_id</column>
+ <column>left_id</column>
+ <column>right_id</column>
+ <column>forum_parents</column>
+ <column>forum_name</column>
+ <column>forum_desc</column>
+ <column>forum_rules</column>
+ </table>
+</dataset>
diff --git a/tests/tree/nestedset_forum_base.php b/tests/tree/nestedset_forum_base.php
new file mode 100644
index 0000000000..ce03c1fc21
--- /dev/null
+++ b/tests/tree/nestedset_forum_base.php
@@ -0,0 +1,115 @@
+<?php
+/**
+*
+* @package tree
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+class phpbb_tests_tree_nestedset_forum_base extends phpbb_database_test_case
+{
+ public function getDataSet()
+ {
+ return $this->createXMLDataSet(dirname(__FILE__) . '/fixtures/phpbb_forums.xml');
+ }
+
+ protected $forum_data = array(
+ // \__/
+ 1 => array('forum_id' => 1, 'parent_id' => 0, 'user_id' => 0, 'left_id' => 1, 'right_id' => 6, 'forum_parents' => 'a:0:{}'),
+ 2 => array('forum_id' => 2, 'parent_id' => 1, 'user_id' => 0, 'left_id' => 2, 'right_id' => 3, 'forum_parents' => 'a:0:{}'),
+ 3 => array('forum_id' => 3, 'parent_id' => 1, 'user_id' => 0, 'left_id' => 4, 'right_id' => 5, 'forum_parents' => 'a:0:{}'),
+
+ // \ /
+ // \/
+ 4 => array('forum_id' => 4, 'parent_id' => 0, 'user_id' => 0, 'left_id' => 7, 'right_id' => 12, 'forum_parents' => 'a:0:{}'),
+ 5 => array('forum_id' => 5, 'parent_id' => 4, 'user_id' => 0, 'left_id' => 8, 'right_id' => 11, 'forum_parents' => 'a:0:{}'),
+ 6 => array('forum_id' => 6, 'parent_id' => 5, 'user_id' => 0, 'left_id' => 9, 'right_id' => 10, 'forum_parents' => 'a:0:{}'),
+
+ // \_ _/
+ // \/
+ 7 => array('forum_id' => 7, 'parent_id' => 0, 'user_id' => 0, 'left_id' => 13, 'right_id' => 22, 'forum_parents' => 'a:0:{}'),
+ 8 => array('forum_id' => 8, 'parent_id' => 7, 'user_id' => 0, 'left_id' => 14, 'right_id' => 15, 'forum_parents' => 'a:0:{}'),
+ 9 => array('forum_id' => 9, 'parent_id' => 7, 'user_id' => 0, 'left_id' => 16, 'right_id' => 19, 'forum_parents' => 'a:0:{}'),
+ 10 => array('forum_id' => 10, 'parent_id' => 9, 'user_id' => 0, 'left_id' => 17, 'right_id' => 18, 'forum_parents' => 'a:0:{}'),
+ 11 => array('forum_id' => 11, 'parent_id' => 7, 'user_id' => 0, 'left_id' => 20, 'right_id' => 21, 'forum_parents' => 'a:0:{}'),
+
+ // Non-existent forums
+ 0 => array('forum_id' => 0, 'parent_id' => 0, 'user_id' => 0, 'left_id' => 0, 'right_id' => 0, 'forum_parents' => 'a:0:{}'),
+ 200 => array('forum_id' => 200, 'parent_id' => 0, 'user_id' => 0, 'left_id' => 0, 'right_id' => 0, 'forum_parents' => 'a:0:{}'),
+ );
+
+ protected $set,
+ $config,
+ $lock,
+ $db;
+
+ public function setUp()
+ {
+ parent::setUp();
+
+ $this->db = $this->new_dbal();
+
+ global $config;
+
+ $config = $this->config = new \phpbb\config\config(array('nestedset_forum_lock' => 0));
+ set_config(null, null, null, $this->config);
+
+ $this->lock = new \phpbb\lock\db('nestedset_forum_lock', $this->config, $this->db);
+ $this->set = new \phpbb\tree\nestedset_forum($this->db, $this->lock, 'phpbb_forums');
+
+ $this->set_up_forums();
+ }
+
+ protected function set_up_forums()
+ {
+ static $forums;
+
+ if (empty($forums))
+ {
+ $this->create_forum('Parent with two flat children');
+ $this->create_forum('Flat child #1', 1);
+ $this->create_forum('Flat child #2', 1);
+
+ $this->create_forum('Parent with two nested children');
+ $this->create_forum('Nested child #1', 4);
+ $this->create_forum('Nested child #2', 5);
+
+ $this->create_forum('Parent with flat and nested children');
+ $this->create_forum('Mixed child #1', 7);
+ $this->create_forum('Mixed child #2', 7);
+ $this->create_forum('Nested child #1 of Mixed child #2', 9);
+ $this->create_forum('Mixed child #3', 7);
+
+ // Updating forum_parents column here so it's not empty
+ // This is required, so we can see whether the methods
+ // correctly clear the values.
+ $sql = "UPDATE phpbb_forums
+ SET forum_parents = 'a:0:{}'";
+ $this->db->sql_query($sql);
+
+ // Copy the forums into a static array, so we can reuse the list later
+ $sql = 'SELECT *
+ FROM phpbb_forums';
+ $result = $this->db->sql_query($sql);
+ $forums = $this->db->sql_fetchrowset($result);
+ $this->db->sql_freeresult($result);
+ }
+ else
+ {
+ $buffer = new \phpbb\db\sql_insert_buffer($this->db, 'phpbb_forums');
+ $buffer->insert_all($forums);
+ $buffer->flush();
+
+ $this->database_synchronisation(array(
+ 'phpbb_forums' => array('forum_id'),
+ ));
+ }
+ }
+
+ protected function create_forum($name, $parent_id = 0)
+ {
+ $forum = $this->set->insert(array('forum_name' => $name, 'forum_desc' => '', 'forum_rules' => ''));
+ $this->set->change_parent($forum['forum_id'], $parent_id);
+ }
+}
diff --git a/tests/tree/nestedset_forum_get_data_test.php b/tests/tree/nestedset_forum_get_data_test.php
new file mode 100644
index 0000000000..a0d0778e82
--- /dev/null
+++ b/tests/tree/nestedset_forum_get_data_test.php
@@ -0,0 +1,135 @@
+<?php
+/**
+*
+* @package tree
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+require_once dirname(__FILE__) . '/nestedset_forum_base.php';
+
+class phpbb_tests_tree_nestedset_forum_get_data_test extends phpbb_tests_tree_nestedset_forum_base
+{
+ public function get_path_and_subtree_data_data()
+ {
+ return array(
+ array(1, true, true, array(1, 2, 3)),
+ array(1, true, false, array(2, 3)),
+ array(1, false, true, array(3, 2, 1)),
+ array(1, false, false, array(3, 2)),
+
+ array(2, true, true, array(1, 2)),
+ array(2, true, false, array(1)),
+ array(2, false, true, array(2, 1)),
+ array(2, false, false, array(1)),
+
+ array(5, true, true, array(4, 5, 6)),
+ array(5, true, false, array(4, 6)),
+ array(5, false, true, array(6, 5, 4)),
+ array(5, false, false, array(6, 4)),
+ );
+ }
+
+ /**
+ * @dataProvider get_path_and_subtree_data_data
+ */
+ public function test_get_path_and_subtree_data($forum_id, $order_asc, $include_item, $expected)
+ {
+ $this->assertEquals($expected, array_keys($this->set->get_path_and_subtree_data($forum_id, $order_asc, $include_item)));
+ }
+
+ public function get_path_data_data()
+ {
+ return array(
+ array(1, true, true, array(1)),
+ array(1, true, false, array()),
+ array(1, false, true, array(1)),
+ array(1, false, false, array()),
+
+ array(2, true, true, array(1, 2)),
+ array(2, true, false, array(1)),
+ array(2, false, true, array(2, 1)),
+ array(2, false, false, array(1)),
+
+ array(5, true, true, array(4, 5)),
+ array(5, true, false, array(4)),
+ array(5, false, true, array(5, 4)),
+ array(5, false, false, array(4)),
+ );
+ }
+
+ /**
+ * @dataProvider get_path_data_data
+ */
+ public function test_get_path_data($forum_id, $order_asc, $include_item, $expected)
+ {
+ $this->assertEquals($expected, array_keys($this->set->get_path_data($forum_id, $order_asc, $include_item)));
+ }
+
+ public function get_subtree_data_data()
+ {
+ return array(
+ array(1, true, true, array(1, 2, 3)),
+ array(1, true, false, array(2, 3)),
+ array(1, false, true, array(3, 2, 1)),
+ array(1, false, false, array(3, 2)),
+
+ array(2, true, true, array(2)),
+ array(2, true, false, array()),
+ array(2, false, true, array(2)),
+ array(2, false, false, array()),
+
+ array(5, true, true, array(5, 6)),
+ array(5, true, false, array(6)),
+ array(5, false, true, array(6, 5)),
+ array(5, false, false, array(6)),
+ );
+ }
+
+ /**
+ * @dataProvider get_subtree_data_data
+ */
+ public function test_get_subtree_data($forum_id, $order_asc, $include_item, $expected)
+ {
+ $this->assertEquals($expected, array_keys($this->set->get_subtree_data($forum_id, $order_asc, $include_item)));
+ }
+
+ public function get_path_basic_data_data()
+ {
+ return array(
+ array(1, '', array()),
+ array(1, serialize(array()), array()),
+ array(2, '', array(1)),
+ array(2, serialize(array(1 => array())), array(1)),
+ array(10, '', array(7, 9)),
+ array(10, serialize(array(7 => array(), 9 => array())), array(7, 9)),
+ );
+ }
+
+ /**
+ * @dataProvider get_path_basic_data_data
+ */
+ public function test_get_path_basic_data($forum_id, $forum_parents, $expected)
+ {
+ $forum_data = $this->forum_data[$forum_id];
+ $forum_data['forum_parents'] = $forum_parents;
+ $this->assertEquals($expected, array_keys($this->set->get_path_basic_data($forum_data)));
+ }
+
+ public function get_all_tree_data_data()
+ {
+ return array(
+ array(true, array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11)),
+ array(false, array(11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1)),
+ );
+ }
+
+ /**
+ * @dataProvider get_all_tree_data_data
+ */
+ public function test_get_all_tree_data($order_asc, $expected)
+ {
+ $this->assertEquals($expected, array_keys($this->set->get_all_tree_data($order_asc)));
+ }
+}
diff --git a/tests/tree/nestedset_forum_insert_delete_test.php b/tests/tree/nestedset_forum_insert_delete_test.php
new file mode 100644
index 0000000000..d0e9e02c2e
--- /dev/null
+++ b/tests/tree/nestedset_forum_insert_delete_test.php
@@ -0,0 +1,120 @@
+<?php
+/**
+*
+* @package tree
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+require_once dirname(__FILE__) . '/nestedset_forum_base.php';
+
+class phpbb_tests_tree_nestedset_forum_add_remove_test extends phpbb_tests_tree_nestedset_forum_base
+{
+ public function delete_data()
+ {
+ return array(
+ array(1, array(1, 2, 3), array(
+ array('forum_id' => 4, 'parent_id' => 0, 'left_id' => 1, 'right_id' => 6),
+ array('forum_id' => 5, 'parent_id' => 4, 'left_id' => 2, 'right_id' => 5),
+ array('forum_id' => 6, 'parent_id' => 5, 'left_id' => 3, 'right_id' => 4),
+ array('forum_id' => 7, 'parent_id' => 0, 'left_id' => 7, 'right_id' => 16),
+ array('forum_id' => 8, 'parent_id' => 7, 'left_id' => 8, 'right_id' => 9),
+ array('forum_id' => 9, 'parent_id' => 7, 'left_id' => 10, 'right_id' => 13),
+ array('forum_id' => 10, 'parent_id' => 9, 'left_id' => 11, 'right_id' => 12),
+ array('forum_id' => 11, 'parent_id' => 7, 'left_id' => 14, 'right_id' => 15),
+ )),
+ array(2, array(2), array(
+ array('forum_id' => 1, 'parent_id' => 0, 'left_id' => 1, 'right_id' => 4),
+ array('forum_id' => 3, 'parent_id' => 1, 'left_id' => 2, 'right_id' => 3),
+ array('forum_id' => 4, 'parent_id' => 0, 'left_id' => 5, 'right_id' => 10),
+ array('forum_id' => 5, 'parent_id' => 4, 'left_id' => 6, 'right_id' => 9),
+ array('forum_id' => 6, 'parent_id' => 5, 'left_id' => 7, 'right_id' => 8),
+ array('forum_id' => 7, 'parent_id' => 0, 'left_id' => 11, 'right_id' => 20),
+ array('forum_id' => 8, 'parent_id' => 7, 'left_id' => 12, 'right_id' => 13),
+ array('forum_id' => 9, 'parent_id' => 7, 'left_id' => 14, 'right_id' => 17),
+ array('forum_id' => 10, 'parent_id' => 9, 'left_id' => 15, 'right_id' => 16),
+ array('forum_id' => 11, 'parent_id' => 7, 'left_id' => 18, 'right_id' => 19),
+ )),
+ );
+ }
+
+ /**
+ * @dataProvider delete_data
+ */
+ public function test_delete($forum_id, $expected_deleted, $expected)
+ {
+ $this->assertEquals($expected_deleted, $this->set->delete($forum_id));
+
+ $result = $this->db->sql_query("SELECT forum_id, parent_id, left_id, right_id
+ FROM phpbb_forums
+ ORDER BY left_id, forum_id ASC");
+ $this->assertEquals($expected, $this->db->sql_fetchrowset($result));
+ }
+
+ public function delete_throws_data()
+ {
+ return array(
+ array('Not an item', 0),
+ array('Item does not exist', 200),
+ );
+ }
+
+ /**
+ * @dataProvider delete_throws_data
+ *
+ * @expectedException OutOfBoundsException
+ * @expectedExceptionMessage FORUM_NESTEDSET_INVALID_ITEM
+ */
+ public function test_delete_throws($explain, $forum_id)
+ {
+ $this->set->delete($forum_id);
+ }
+
+ public function insert_data()
+ {
+ return array(
+ array(array(
+ 'forum_desc' => '',
+ 'forum_rules' => '',
+ 'forum_id' => 12,
+ 'parent_id' => 0,
+ 'left_id' => 23,
+ 'right_id' => 24,
+ 'forum_parents' => '',
+ ), array(
+ array('forum_id' => 1, 'parent_id' => 0, 'left_id' => 1, 'right_id' => 6),
+ array('forum_id' => 2, 'parent_id' => 1, 'left_id' => 2, 'right_id' => 3),
+ array('forum_id' => 3, 'parent_id' => 1, 'left_id' => 4, 'right_id' => 5),
+
+ array('forum_id' => 4, 'parent_id' => 0, 'left_id' => 7, 'right_id' => 12),
+ array('forum_id' => 5, 'parent_id' => 4, 'left_id' => 8, 'right_id' => 11),
+ array('forum_id' => 6, 'parent_id' => 5, 'left_id' => 9, 'right_id' => 10),
+
+ array('forum_id' => 7, 'parent_id' => 0, 'left_id' => 13, 'right_id' => 22),
+ array('forum_id' => 8, 'parent_id' => 7, 'left_id' => 14, 'right_id' => 15),
+ array('forum_id' => 9, 'parent_id' => 7, 'left_id' => 16, 'right_id' => 19),
+ array('forum_id' => 10, 'parent_id' => 9, 'left_id' => 17, 'right_id' => 18),
+ array('forum_id' => 11, 'parent_id' => 7, 'left_id' => 20, 'right_id' => 21),
+
+ array('forum_id' => 12, 'parent_id' => 0, 'left_id' => 23, 'right_id' => 24),
+ )),
+ );
+ }
+
+ /**
+ * @dataProvider insert_data
+ */
+ public function test_insert($expected_data, $expected)
+ {
+ $this->assertEquals($expected_data, $this->set->insert(array(
+ 'forum_desc' => '',
+ 'forum_rules' => '',
+ )));
+
+ $result = $this->db->sql_query('SELECT forum_id, parent_id, left_id, right_id
+ FROM phpbb_forums
+ ORDER BY left_id, forum_id ASC');
+ $this->assertEquals($expected, $this->db->sql_fetchrowset($result));
+ }
+}
diff --git a/tests/tree/nestedset_forum_move_test.php b/tests/tree/nestedset_forum_move_test.php
new file mode 100644
index 0000000000..fe506c8278
--- /dev/null
+++ b/tests/tree/nestedset_forum_move_test.php
@@ -0,0 +1,569 @@
+<?php
+/**
+*
+* @package tree
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+require_once dirname(__FILE__) . '/nestedset_forum_base.php';
+
+class phpbb_tests_tree_nestedset_forum_move_test extends phpbb_tests_tree_nestedset_forum_base
+{
+ public function move_data()
+ {
+ return array(
+ array('Move first item up',
+ 1, 1, false, array(
+ array('forum_id' => 1, 'parent_id' => 0, 'left_id' => 1, 'right_id' => 6),
+ array('forum_id' => 2, 'parent_id' => 1, 'left_id' => 2, 'right_id' => 3),
+ array('forum_id' => 3, 'parent_id' => 1, 'left_id' => 4, 'right_id' => 5),
+ array('forum_id' => 4, 'parent_id' => 0, 'left_id' => 7, 'right_id' => 12),
+ array('forum_id' => 5, 'parent_id' => 4, 'left_id' => 8, 'right_id' => 11),
+ array('forum_id' => 6, 'parent_id' => 5, 'left_id' => 9, 'right_id' => 10),
+ array('forum_id' => 7, 'parent_id' => 0, 'left_id' => 13, 'right_id' => 22),
+ array('forum_id' => 8, 'parent_id' => 7, 'left_id' => 14, 'right_id' => 15),
+ array('forum_id' => 9, 'parent_id' => 7, 'left_id' => 16, 'right_id' => 19),
+ array('forum_id' => 10, 'parent_id' => 9, 'left_id' => 17, 'right_id' => 18),
+ array('forum_id' => 11, 'parent_id' => 7, 'left_id' => 20, 'right_id' => 21),
+ )),
+ array('Move last item down',
+ 7, -1, false, array(
+ array('forum_id' => 1, 'parent_id' => 0, 'left_id' => 1, 'right_id' => 6),
+ array('forum_id' => 2, 'parent_id' => 1, 'left_id' => 2, 'right_id' => 3),
+ array('forum_id' => 3, 'parent_id' => 1, 'left_id' => 4, 'right_id' => 5),
+ array('forum_id' => 4, 'parent_id' => 0, 'left_id' => 7, 'right_id' => 12),
+ array('forum_id' => 5, 'parent_id' => 4, 'left_id' => 8, 'right_id' => 11),
+ array('forum_id' => 6, 'parent_id' => 5, 'left_id' => 9, 'right_id' => 10),
+ array('forum_id' => 7, 'parent_id' => 0, 'left_id' => 13, 'right_id' => 22),
+ array('forum_id' => 8, 'parent_id' => 7, 'left_id' => 14, 'right_id' => 15),
+ array('forum_id' => 9, 'parent_id' => 7, 'left_id' => 16, 'right_id' => 19),
+ array('forum_id' => 10, 'parent_id' => 9, 'left_id' => 17, 'right_id' => 18),
+ array('forum_id' => 11, 'parent_id' => 7, 'left_id' => 20, 'right_id' => 21),
+ )),
+ array('Move first item down',
+ 1, -1, true, array(
+ array('forum_id' => 4, 'parent_id' => 0, 'left_id' => 1, 'right_id' => 6),
+ array('forum_id' => 5, 'parent_id' => 4, 'left_id' => 2, 'right_id' => 5),
+ array('forum_id' => 6, 'parent_id' => 5, 'left_id' => 3, 'right_id' => 4),
+ array('forum_id' => 1, 'parent_id' => 0, 'left_id' => 7, 'right_id' => 12),
+ array('forum_id' => 2, 'parent_id' => 1, 'left_id' => 8, 'right_id' => 9),
+ array('forum_id' => 3, 'parent_id' => 1, 'left_id' => 10, 'right_id' => 11),
+ array('forum_id' => 7, 'parent_id' => 0, 'left_id' => 13, 'right_id' => 22),
+ array('forum_id' => 8, 'parent_id' => 7, 'left_id' => 14, 'right_id' => 15),
+ array('forum_id' => 9, 'parent_id' => 7, 'left_id' => 16, 'right_id' => 19),
+ array('forum_id' => 10, 'parent_id' => 9, 'left_id' => 17, 'right_id' => 18),
+ array('forum_id' => 11, 'parent_id' => 7, 'left_id' => 20, 'right_id' => 21),
+ )),
+ array('Move second item up',
+ 4, 1, true, array(
+ array('forum_id' => 4, 'parent_id' => 0, 'left_id' => 1, 'right_id' => 6),
+ array('forum_id' => 5, 'parent_id' => 4, 'left_id' => 2, 'right_id' => 5),
+ array('forum_id' => 6, 'parent_id' => 5, 'left_id' => 3, 'right_id' => 4),
+ array('forum_id' => 1, 'parent_id' => 0, 'left_id' => 7, 'right_id' => 12),
+ array('forum_id' => 2, 'parent_id' => 1, 'left_id' => 8, 'right_id' => 9),
+ array('forum_id' => 3, 'parent_id' => 1, 'left_id' => 10, 'right_id' => 11),
+ array('forum_id' => 7, 'parent_id' => 0, 'left_id' => 13, 'right_id' => 22),
+ array('forum_id' => 8, 'parent_id' => 7, 'left_id' => 14, 'right_id' => 15),
+ array('forum_id' => 9, 'parent_id' => 7, 'left_id' => 16, 'right_id' => 19),
+ array('forum_id' => 10, 'parent_id' => 9, 'left_id' => 17, 'right_id' => 18),
+ array('forum_id' => 11, 'parent_id' => 7, 'left_id' => 20, 'right_id' => 21),
+ )),
+ array('Move last item up',
+ 7, 1, true, array(
+ array('forum_id' => 1, 'parent_id' => 0, 'left_id' => 1, 'right_id' => 6),
+ array('forum_id' => 2, 'parent_id' => 1, 'left_id' => 2, 'right_id' => 3),
+ array('forum_id' => 3, 'parent_id' => 1, 'left_id' => 4, 'right_id' => 5),
+ array('forum_id' => 7, 'parent_id' => 0, 'left_id' => 7, 'right_id' => 16),
+ array('forum_id' => 8, 'parent_id' => 7, 'left_id' => 8, 'right_id' => 9),
+ array('forum_id' => 9, 'parent_id' => 7, 'left_id' => 10, 'right_id' => 13),
+ array('forum_id' => 10, 'parent_id' => 9, 'left_id' => 11, 'right_id' => 12),
+ array('forum_id' => 11, 'parent_id' => 7, 'left_id' => 14, 'right_id' => 15),
+ array('forum_id' => 4, 'parent_id' => 0, 'left_id' => 17, 'right_id' => 22),
+ array('forum_id' => 5, 'parent_id' => 4, 'left_id' => 18, 'right_id' => 21),
+ array('forum_id' => 6, 'parent_id' => 5, 'left_id' => 19, 'right_id' => 20),
+ )),
+ array('Move last item up by 2',
+ 7, 2, true, array(
+ array('forum_id' => 7, 'parent_id' => 0, 'left_id' => 1, 'right_id' => 10),
+ array('forum_id' => 8, 'parent_id' => 7, 'left_id' => 2, 'right_id' => 3),
+ array('forum_id' => 9, 'parent_id' => 7, 'left_id' => 4, 'right_id' => 7),
+ array('forum_id' => 10, 'parent_id' => 9, 'left_id' => 5, 'right_id' => 6),
+ array('forum_id' => 11, 'parent_id' => 7, 'left_id' => 8, 'right_id' => 9),
+ array('forum_id' => 1, 'parent_id' => 0, 'left_id' => 11, 'right_id' => 16),
+ array('forum_id' => 2, 'parent_id' => 1, 'left_id' => 12, 'right_id' => 13),
+ array('forum_id' => 3, 'parent_id' => 1, 'left_id' => 14, 'right_id' => 15),
+ array('forum_id' => 4, 'parent_id' => 0, 'left_id' => 17, 'right_id' => 22),
+ array('forum_id' => 5, 'parent_id' => 4, 'left_id' => 18, 'right_id' => 21),
+ array('forum_id' => 6, 'parent_id' => 5, 'left_id' => 19, 'right_id' => 20),
+ )),
+ array('Move last item up by 100',
+ 7, 100, true, array(
+ array('forum_id' => 7, 'parent_id' => 0, 'left_id' => 1, 'right_id' => 10),
+ array('forum_id' => 8, 'parent_id' => 7, 'left_id' => 2, 'right_id' => 3),
+ array('forum_id' => 9, 'parent_id' => 7, 'left_id' => 4, 'right_id' => 7),
+ array('forum_id' => 10, 'parent_id' => 9, 'left_id' => 5, 'right_id' => 6),
+ array('forum_id' => 11, 'parent_id' => 7, 'left_id' => 8, 'right_id' => 9),
+ array('forum_id' => 1, 'parent_id' => 0, 'left_id' => 11, 'right_id' => 16),
+ array('forum_id' => 2, 'parent_id' => 1, 'left_id' => 12, 'right_id' => 13),
+ array('forum_id' => 3, 'parent_id' => 1, 'left_id' => 14, 'right_id' => 15),
+ array('forum_id' => 4, 'parent_id' => 0, 'left_id' => 17, 'right_id' => 22),
+ array('forum_id' => 5, 'parent_id' => 4, 'left_id' => 18, 'right_id' => 21),
+ array('forum_id' => 6, 'parent_id' => 5, 'left_id' => 19, 'right_id' => 20),
+ )),
+ );
+ }
+
+ /**
+ * @dataProvider move_data
+ */
+ public function test_move($explain, $forum_id, $delta, $expected_moved, $expected)
+ {
+ $this->assertEquals($expected_moved, $this->set->move($forum_id, $delta));
+
+ $result = $this->db->sql_query("SELECT forum_id, parent_id, left_id, right_id
+ FROM phpbb_forums
+ ORDER BY left_id, forum_id ASC");
+ $this->assertEquals($expected, $this->db->sql_fetchrowset($result));
+ }
+
+ public function move_down_data()
+ {
+ return array(
+ array('Move last item down',
+ 7, false, array(
+ array('forum_id' => 1, 'parent_id' => 0, 'left_id' => 1, 'right_id' => 6),
+ array('forum_id' => 2, 'parent_id' => 1, 'left_id' => 2, 'right_id' => 3),
+ array('forum_id' => 3, 'parent_id' => 1, 'left_id' => 4, 'right_id' => 5),
+ array('forum_id' => 4, 'parent_id' => 0, 'left_id' => 7, 'right_id' => 12),
+ array('forum_id' => 5, 'parent_id' => 4, 'left_id' => 8, 'right_id' => 11),
+ array('forum_id' => 6, 'parent_id' => 5, 'left_id' => 9, 'right_id' => 10),
+ array('forum_id' => 7, 'parent_id' => 0, 'left_id' => 13, 'right_id' => 22),
+ array('forum_id' => 8, 'parent_id' => 7, 'left_id' => 14, 'right_id' => 15),
+ array('forum_id' => 9, 'parent_id' => 7, 'left_id' => 16, 'right_id' => 19),
+ array('forum_id' => 10, 'parent_id' => 9, 'left_id' => 17, 'right_id' => 18),
+ array('forum_id' => 11, 'parent_id' => 7, 'left_id' => 20, 'right_id' => 21),
+ )),
+ array('Move first item down',
+ 1, true, array(
+ array('forum_id' => 4, 'parent_id' => 0, 'left_id' => 1, 'right_id' => 6),
+ array('forum_id' => 5, 'parent_id' => 4, 'left_id' => 2, 'right_id' => 5),
+ array('forum_id' => 6, 'parent_id' => 5, 'left_id' => 3, 'right_id' => 4),
+ array('forum_id' => 1, 'parent_id' => 0, 'left_id' => 7, 'right_id' => 12),
+ array('forum_id' => 2, 'parent_id' => 1, 'left_id' => 8, 'right_id' => 9),
+ array('forum_id' => 3, 'parent_id' => 1, 'left_id' => 10, 'right_id' => 11),
+ array('forum_id' => 7, 'parent_id' => 0, 'left_id' => 13, 'right_id' => 22),
+ array('forum_id' => 8, 'parent_id' => 7, 'left_id' => 14, 'right_id' => 15),
+ array('forum_id' => 9, 'parent_id' => 7, 'left_id' => 16, 'right_id' => 19),
+ array('forum_id' => 10, 'parent_id' => 9, 'left_id' => 17, 'right_id' => 18),
+ array('forum_id' => 11, 'parent_id' => 7, 'left_id' => 20, 'right_id' => 21),
+ )),
+ );
+ }
+
+ /**
+ * @dataProvider move_down_data
+ */
+ public function test_move_down($explain, $forum_id, $expected_moved, $expected)
+ {
+ $this->assertEquals($expected_moved, $this->set->move_down($forum_id));
+
+ $result = $this->db->sql_query("SELECT forum_id, parent_id, left_id, right_id
+ FROM phpbb_forums
+ ORDER BY left_id, forum_id ASC");
+ $this->assertEquals($expected, $this->db->sql_fetchrowset($result));
+ }
+
+ public function move_up_data()
+ {
+ return array(
+ array('Move first item up',
+ 1, false, array(
+ array('forum_id' => 1, 'parent_id' => 0, 'left_id' => 1, 'right_id' => 6),
+ array('forum_id' => 2, 'parent_id' => 1, 'left_id' => 2, 'right_id' => 3),
+ array('forum_id' => 3, 'parent_id' => 1, 'left_id' => 4, 'right_id' => 5),
+ array('forum_id' => 4, 'parent_id' => 0, 'left_id' => 7, 'right_id' => 12),
+ array('forum_id' => 5, 'parent_id' => 4, 'left_id' => 8, 'right_id' => 11),
+ array('forum_id' => 6, 'parent_id' => 5, 'left_id' => 9, 'right_id' => 10),
+ array('forum_id' => 7, 'parent_id' => 0, 'left_id' => 13, 'right_id' => 22),
+ array('forum_id' => 8, 'parent_id' => 7, 'left_id' => 14, 'right_id' => 15),
+ array('forum_id' => 9, 'parent_id' => 7, 'left_id' => 16, 'right_id' => 19),
+ array('forum_id' => 10, 'parent_id' => 9, 'left_id' => 17, 'right_id' => 18),
+ array('forum_id' => 11, 'parent_id' => 7, 'left_id' => 20, 'right_id' => 21),
+ )),
+ array('Move second item up',
+ 4, true, array(
+ array('forum_id' => 4, 'parent_id' => 0, 'left_id' => 1, 'right_id' => 6),
+ array('forum_id' => 5, 'parent_id' => 4, 'left_id' => 2, 'right_id' => 5),
+ array('forum_id' => 6, 'parent_id' => 5, 'left_id' => 3, 'right_id' => 4),
+ array('forum_id' => 1, 'parent_id' => 0, 'left_id' => 7, 'right_id' => 12),
+ array('forum_id' => 2, 'parent_id' => 1, 'left_id' => 8, 'right_id' => 9),
+ array('forum_id' => 3, 'parent_id' => 1, 'left_id' => 10, 'right_id' => 11),
+ array('forum_id' => 7, 'parent_id' => 0, 'left_id' => 13, 'right_id' => 22),
+ array('forum_id' => 8, 'parent_id' => 7, 'left_id' => 14, 'right_id' => 15),
+ array('forum_id' => 9, 'parent_id' => 7, 'left_id' => 16, 'right_id' => 19),
+ array('forum_id' => 10, 'parent_id' => 9, 'left_id' => 17, 'right_id' => 18),
+ array('forum_id' => 11, 'parent_id' => 7, 'left_id' => 20, 'right_id' => 21),
+ )),
+ );
+ }
+
+ /**
+ * @dataProvider move_up_data
+ */
+ public function test_move_up($explain, $forum_id, $expected_moved, $expected)
+ {
+ $this->assertEquals($expected_moved, $this->set->move_up($forum_id));
+
+ $result = $this->db->sql_query("SELECT forum_id, parent_id, left_id, right_id
+ FROM phpbb_forums
+ ORDER BY left_id, forum_id ASC");
+ $this->assertEquals($expected, $this->db->sql_fetchrowset($result));
+ }
+
+ public function move_children_data()
+ {
+ return array(
+ array('Item has no children',
+ 2, 1, false, array(
+ array('forum_id' => 1, 'parent_id' => 0, 'left_id' => 1, 'right_id' => 6, 'forum_parents' => 'a:0:{}'),
+ array('forum_id' => 2, 'parent_id' => 1, 'left_id' => 2, 'right_id' => 3, 'forum_parents' => 'a:0:{}'),
+ array('forum_id' => 3, 'parent_id' => 1, 'left_id' => 4, 'right_id' => 5, 'forum_parents' => 'a:0:{}'),
+
+ array('forum_id' => 4, 'parent_id' => 0, 'left_id' => 7, 'right_id' => 12, 'forum_parents' => 'a:0:{}'),
+ array('forum_id' => 5, 'parent_id' => 4, 'left_id' => 8, 'right_id' => 11, 'forum_parents' => 'a:0:{}'),
+ array('forum_id' => 6, 'parent_id' => 5, 'left_id' => 9, 'right_id' => 10, 'forum_parents' => 'a:0:{}'),
+
+ array('forum_id' => 7, 'parent_id' => 0, 'left_id' => 13, 'right_id' => 22, 'forum_parents' => 'a:0:{}'),
+ array('forum_id' => 8, 'parent_id' => 7, 'left_id' => 14, 'right_id' => 15, 'forum_parents' => 'a:0:{}'),
+ array('forum_id' => 9, 'parent_id' => 7, 'left_id' => 16, 'right_id' => 19, 'forum_parents' => 'a:0:{}'),
+ array('forum_id' => 10, 'parent_id' => 9, 'left_id' => 17, 'right_id' => 18, 'forum_parents' => 'a:0:{}'),
+ array('forum_id' => 11, 'parent_id' => 7, 'left_id' => 20, 'right_id' => 21, 'forum_parents' => 'a:0:{}'),
+ )),
+ array('Move to same parent',
+ 4, 4, false, array(
+ array('forum_id' => 1, 'parent_id' => 0, 'left_id' => 1, 'right_id' => 6, 'forum_parents' => 'a:0:{}'),
+ array('forum_id' => 2, 'parent_id' => 1, 'left_id' => 2, 'right_id' => 3, 'forum_parents' => 'a:0:{}'),
+ array('forum_id' => 3, 'parent_id' => 1, 'left_id' => 4, 'right_id' => 5, 'forum_parents' => 'a:0:{}'),
+
+ array('forum_id' => 4, 'parent_id' => 0, 'left_id' => 7, 'right_id' => 12, 'forum_parents' => 'a:0:{}'),
+ array('forum_id' => 5, 'parent_id' => 4, 'left_id' => 8, 'right_id' => 11, 'forum_parents' => 'a:0:{}'),
+ array('forum_id' => 6, 'parent_id' => 5, 'left_id' => 9, 'right_id' => 10, 'forum_parents' => 'a:0:{}'),
+
+ array('forum_id' => 7, 'parent_id' => 0, 'left_id' => 13, 'right_id' => 22, 'forum_parents' => 'a:0:{}'),
+ array('forum_id' => 8, 'parent_id' => 7, 'left_id' => 14, 'right_id' => 15, 'forum_parents' => 'a:0:{}'),
+ array('forum_id' => 9, 'parent_id' => 7, 'left_id' => 16, 'right_id' => 19, 'forum_parents' => 'a:0:{}'),
+ array('forum_id' => 10, 'parent_id' => 9, 'left_id' => 17, 'right_id' => 18, 'forum_parents' => 'a:0:{}'),
+ array('forum_id' => 11, 'parent_id' => 7, 'left_id' => 20, 'right_id' => 21, 'forum_parents' => 'a:0:{}'),
+ )),
+ array('Move single child up',
+ 5, 1, true, array(
+ array('forum_id' => 1, 'parent_id' => 0, 'left_id' => 1, 'right_id' => 8, 'forum_parents' => 'a:0:{}'),
+ array('forum_id' => 2, 'parent_id' => 1, 'left_id' => 2, 'right_id' => 3, 'forum_parents' => 'a:0:{}'),
+ array('forum_id' => 3, 'parent_id' => 1, 'left_id' => 4, 'right_id' => 5, 'forum_parents' => 'a:0:{}'),
+ array('forum_id' => 6, 'parent_id' => 1, 'left_id' => 6, 'right_id' => 7, 'forum_parents' => ''),
+
+ array('forum_id' => 4, 'parent_id' => 0, 'left_id' => 9, 'right_id' => 12, 'forum_parents' => 'a:0:{}'),
+ array('forum_id' => 5, 'parent_id' => 4, 'left_id' => 10, 'right_id' => 11, 'forum_parents' => 'a:0:{}'),
+
+ array('forum_id' => 7, 'parent_id' => 0, 'left_id' => 13, 'right_id' => 22, 'forum_parents' => 'a:0:{}'),
+ array('forum_id' => 8, 'parent_id' => 7, 'left_id' => 14, 'right_id' => 15, 'forum_parents' => 'a:0:{}'),
+ array('forum_id' => 9, 'parent_id' => 7, 'left_id' => 16, 'right_id' => 19, 'forum_parents' => 'a:0:{}'),
+ array('forum_id' => 10, 'parent_id' => 9, 'left_id' => 17, 'right_id' => 18, 'forum_parents' => 'a:0:{}'),
+ array('forum_id' => 11, 'parent_id' => 7, 'left_id' => 20, 'right_id' => 21, 'forum_parents' => 'a:0:{}'),
+ )),
+ array('Move nested children up',
+ 4, 1, true, array(
+ array('forum_id' => 1, 'parent_id' => 0, 'left_id' => 1, 'right_id' => 10, 'forum_parents' => 'a:0:{}'),
+ array('forum_id' => 2, 'parent_id' => 1, 'left_id' => 2, 'right_id' => 3, 'forum_parents' => 'a:0:{}'),
+ array('forum_id' => 3, 'parent_id' => 1, 'left_id' => 4, 'right_id' => 5, 'forum_parents' => 'a:0:{}'),
+ array('forum_id' => 5, 'parent_id' => 1, 'left_id' => 6, 'right_id' => 9, 'forum_parents' => ''),
+ array('forum_id' => 6, 'parent_id' => 5, 'left_id' => 7, 'right_id' => 8, 'forum_parents' => ''),
+
+ array('forum_id' => 4, 'parent_id' => 0, 'left_id' => 11, 'right_id' => 12, 'forum_parents' => 'a:0:{}'),
+
+ array('forum_id' => 7, 'parent_id' => 0, 'left_id' => 13, 'right_id' => 22, 'forum_parents' => 'a:0:{}'),
+ array('forum_id' => 8, 'parent_id' => 7, 'left_id' => 14, 'right_id' => 15, 'forum_parents' => 'a:0:{}'),
+ array('forum_id' => 9, 'parent_id' => 7, 'left_id' => 16, 'right_id' => 19, 'forum_parents' => 'a:0:{}'),
+ array('forum_id' => 10, 'parent_id' => 9, 'left_id' => 17, 'right_id' => 18, 'forum_parents' => 'a:0:{}'),
+ array('forum_id' => 11, 'parent_id' => 7, 'left_id' => 20, 'right_id' => 21, 'forum_parents' => 'a:0:{}'),
+ )),
+ array('Move single child down',
+ 5, 7, true, array(
+ array('forum_id' => 1, 'parent_id' => 0, 'left_id' => 1, 'right_id' => 6, 'forum_parents' => 'a:0:{}'),
+ array('forum_id' => 2, 'parent_id' => 1, 'left_id' => 2, 'right_id' => 3, 'forum_parents' => 'a:0:{}'),
+ array('forum_id' => 3, 'parent_id' => 1, 'left_id' => 4, 'right_id' => 5, 'forum_parents' => 'a:0:{}'),
+
+ array('forum_id' => 4, 'parent_id' => 0, 'left_id' => 7, 'right_id' => 10, 'forum_parents' => 'a:0:{}'),
+ array('forum_id' => 5, 'parent_id' => 4, 'left_id' => 8, 'right_id' => 9, 'forum_parents' => 'a:0:{}'),
+
+ array('forum_id' => 7, 'parent_id' => 0, 'left_id' => 11, 'right_id' => 22, 'forum_parents' => 'a:0:{}'),
+ array('forum_id' => 8, 'parent_id' => 7, 'left_id' => 12, 'right_id' => 13, 'forum_parents' => 'a:0:{}'),
+ array('forum_id' => 9, 'parent_id' => 7, 'left_id' => 14, 'right_id' => 17, 'forum_parents' => 'a:0:{}'),
+ array('forum_id' => 10, 'parent_id' => 9, 'left_id' => 15, 'right_id' => 16, 'forum_parents' => 'a:0:{}'),
+ array('forum_id' => 11, 'parent_id' => 7, 'left_id' => 18, 'right_id' => 19, 'forum_parents' => 'a:0:{}'),
+ array('forum_id' => 6, 'parent_id' => 7, 'left_id' => 20, 'right_id' => 21, 'forum_parents' => ''),
+
+ )),
+ array('Move nested children down',
+ 4, 7, true, array(
+ array('forum_id' => 1, 'parent_id' => 0, 'left_id' => 1, 'right_id' => 6, 'forum_parents' => 'a:0:{}'),
+ array('forum_id' => 2, 'parent_id' => 1, 'left_id' => 2, 'right_id' => 3, 'forum_parents' => 'a:0:{}'),
+ array('forum_id' => 3, 'parent_id' => 1, 'left_id' => 4, 'right_id' => 5, 'forum_parents' => 'a:0:{}'),
+
+ array('forum_id' => 4, 'parent_id' => 0, 'left_id' => 7, 'right_id' => 8, 'forum_parents' => 'a:0:{}'),
+
+ array('forum_id' => 7, 'parent_id' => 0, 'left_id' => 9, 'right_id' => 22, 'forum_parents' => 'a:0:{}'),
+ array('forum_id' => 8, 'parent_id' => 7, 'left_id' => 10, 'right_id' => 11, 'forum_parents' => 'a:0:{}'),
+ array('forum_id' => 9, 'parent_id' => 7, 'left_id' => 12, 'right_id' => 15, 'forum_parents' => 'a:0:{}'),
+ array('forum_id' => 10, 'parent_id' => 9, 'left_id' => 13, 'right_id' => 14, 'forum_parents' => 'a:0:{}'),
+ array('forum_id' => 11, 'parent_id' => 7, 'left_id' => 16, 'right_id' => 17, 'forum_parents' => 'a:0:{}'),
+ array('forum_id' => 5, 'parent_id' => 7, 'left_id' => 18, 'right_id' => 21, 'forum_parents' => ''),
+ array('forum_id' => 6, 'parent_id' => 5, 'left_id' => 19, 'right_id' => 20, 'forum_parents' => ''),
+ )),
+ array('Move single child to parent 0',
+ 5, 0, true, array(
+ array('forum_id' => 1, 'parent_id' => 0, 'left_id' => 1, 'right_id' => 6, 'forum_parents' => 'a:0:{}'),
+ array('forum_id' => 2, 'parent_id' => 1, 'left_id' => 2, 'right_id' => 3, 'forum_parents' => 'a:0:{}'),
+ array('forum_id' => 3, 'parent_id' => 1, 'left_id' => 4, 'right_id' => 5, 'forum_parents' => 'a:0:{}'),
+
+ array('forum_id' => 4, 'parent_id' => 0, 'left_id' => 7, 'right_id' => 10, 'forum_parents' => 'a:0:{}'),
+ array('forum_id' => 5, 'parent_id' => 4, 'left_id' => 8, 'right_id' => 9, 'forum_parents' => 'a:0:{}'),
+
+ array('forum_id' => 7, 'parent_id' => 0, 'left_id' => 11, 'right_id' => 20, 'forum_parents' => 'a:0:{}'),
+ array('forum_id' => 8, 'parent_id' => 7, 'left_id' => 12, 'right_id' => 13, 'forum_parents' => 'a:0:{}'),
+ array('forum_id' => 9, 'parent_id' => 7, 'left_id' => 14, 'right_id' => 17, 'forum_parents' => 'a:0:{}'),
+ array('forum_id' => 10, 'parent_id' => 9, 'left_id' => 15, 'right_id' => 16, 'forum_parents' => 'a:0:{}'),
+ array('forum_id' => 11, 'parent_id' => 7, 'left_id' => 18, 'right_id' => 19, 'forum_parents' => 'a:0:{}'),
+
+ array('forum_id' => 6, 'parent_id' => 0, 'left_id' => 21, 'right_id' => 22, 'forum_parents' => ''),
+ )),
+ array('Move nested children to parent 0',
+ 4, 0, true, array(
+ array('forum_id' => 1, 'parent_id' => 0, 'left_id' => 1, 'right_id' => 6, 'forum_parents' => 'a:0:{}'),
+ array('forum_id' => 2, 'parent_id' => 1, 'left_id' => 2, 'right_id' => 3, 'forum_parents' => 'a:0:{}'),
+ array('forum_id' => 3, 'parent_id' => 1, 'left_id' => 4, 'right_id' => 5, 'forum_parents' => 'a:0:{}'),
+
+ array('forum_id' => 4, 'parent_id' => 0, 'left_id' => 7, 'right_id' => 8, 'forum_parents' => 'a:0:{}'),
+
+ array('forum_id' => 7, 'parent_id' => 0, 'left_id' => 9, 'right_id' => 18, 'forum_parents' => 'a:0:{}'),
+ array('forum_id' => 8, 'parent_id' => 7, 'left_id' => 10, 'right_id' => 11, 'forum_parents' => 'a:0:{}'),
+ array('forum_id' => 9, 'parent_id' => 7, 'left_id' => 12, 'right_id' => 15, 'forum_parents' => 'a:0:{}'),
+ array('forum_id' => 10, 'parent_id' => 9, 'left_id' => 13, 'right_id' => 14, 'forum_parents' => 'a:0:{}'),
+ array('forum_id' => 11, 'parent_id' => 7, 'left_id' => 16, 'right_id' => 17, 'forum_parents' => 'a:0:{}'),
+
+ array('forum_id' => 5, 'parent_id' => 0, 'left_id' => 19, 'right_id' => 22, 'forum_parents' => ''),
+ array('forum_id' => 6, 'parent_id' => 5, 'left_id' => 20, 'right_id' => 21, 'forum_parents' => ''),
+ )),
+ );
+ }
+
+ /**
+ * @dataProvider move_children_data
+ */
+ public function test_move_children($explain, $forum_id, $target_id, $expected_moved, $expected)
+ {
+ $this->assertEquals($expected_moved, $this->set->move_children($forum_id, $target_id));
+
+ $result = $this->db->sql_query("SELECT forum_id, parent_id, left_id, right_id, forum_parents
+ FROM phpbb_forums
+ ORDER BY left_id, forum_id ASC");
+ $this->assertEquals($expected, $this->db->sql_fetchrowset($result));
+ }
+
+ public function move_children_throws_item_data()
+ {
+ return array(
+ array('Item 0 does not exist', 0, 5),
+ array('Item does not exist', 200, 5),
+ );
+ }
+
+ /**
+ * @dataProvider move_children_throws_item_data
+ *
+ * @expectedException OutOfBoundsException
+ * @expectedExceptionMessage FORUM_NESTEDSET_INVALID_ITEM
+ */
+ public function test_move_children_throws_item($explain, $forum_id, $target_id)
+ {
+ $this->set->move_children($forum_id, $target_id);
+ }
+
+ public function move_children_throws_parent_data()
+ {
+ return array(
+ array('New parent is child', 4, 5),
+ array('New parent is child 2', 7, 9),
+ array('New parent does not exist', 1, 200),
+ );
+ }
+
+ /**
+ * @dataProvider move_children_throws_parent_data
+ *
+ * @expectedException OutOfBoundsException
+ * @expectedExceptionMessage FORUM_NESTEDSET_INVALID_PARENT
+ */
+ public function test_move_children_throws_parent($explain, $forum_id, $target_id)
+ {
+ $this->set->move_children($forum_id, $target_id);
+ }
+
+ public function change_parent_data()
+ {
+ return array(
+ array('Move single child up',
+ 6, 1, true, array(
+ array('forum_id' => 1, 'parent_id' => 0, 'left_id' => 1, 'right_id' => 8, 'forum_parents' => 'a:0:{}'),
+ array('forum_id' => 2, 'parent_id' => 1, 'left_id' => 2, 'right_id' => 3, 'forum_parents' => 'a:0:{}'),
+ array('forum_id' => 3, 'parent_id' => 1, 'left_id' => 4, 'right_id' => 5, 'forum_parents' => 'a:0:{}'),
+ array('forum_id' => 6, 'parent_id' => 1, 'left_id' => 6, 'right_id' => 7, 'forum_parents' => ''),
+
+ array('forum_id' => 4, 'parent_id' => 0, 'left_id' => 9, 'right_id' => 12, 'forum_parents' => 'a:0:{}'),
+ array('forum_id' => 5, 'parent_id' => 4, 'left_id' => 10, 'right_id' => 11, 'forum_parents' => 'a:0:{}'),
+
+ array('forum_id' => 7, 'parent_id' => 0, 'left_id' => 13, 'right_id' => 22, 'forum_parents' => 'a:0:{}'),
+ array('forum_id' => 8, 'parent_id' => 7, 'left_id' => 14, 'right_id' => 15, 'forum_parents' => 'a:0:{}'),
+ array('forum_id' => 9, 'parent_id' => 7, 'left_id' => 16, 'right_id' => 19, 'forum_parents' => 'a:0:{}'),
+ array('forum_id' => 10, 'parent_id' => 9, 'left_id' => 17, 'right_id' => 18, 'forum_parents' => 'a:0:{}'),
+ array('forum_id' => 11, 'parent_id' => 7, 'left_id' => 20, 'right_id' => 21, 'forum_parents' => 'a:0:{}'),
+ )),
+ array('Move nested children up',
+ 5, 1, true, array(
+ array('forum_id' => 1, 'parent_id' => 0, 'left_id' => 1, 'right_id' => 10, 'forum_parents' => 'a:0:{}'),
+ array('forum_id' => 2, 'parent_id' => 1, 'left_id' => 2, 'right_id' => 3, 'forum_parents' => 'a:0:{}'),
+ array('forum_id' => 3, 'parent_id' => 1, 'left_id' => 4, 'right_id' => 5, 'forum_parents' => 'a:0:{}'),
+ array('forum_id' => 5, 'parent_id' => 1, 'left_id' => 6, 'right_id' => 9, 'forum_parents' => ''),
+ array('forum_id' => 6, 'parent_id' => 5, 'left_id' => 7, 'right_id' => 8, 'forum_parents' => ''),
+
+ array('forum_id' => 4, 'parent_id' => 0, 'left_id' => 11, 'right_id' => 12, 'forum_parents' => 'a:0:{}'),
+
+ array('forum_id' => 7, 'parent_id' => 0, 'left_id' => 13, 'right_id' => 22, 'forum_parents' => 'a:0:{}'),
+ array('forum_id' => 8, 'parent_id' => 7, 'left_id' => 14, 'right_id' => 15, 'forum_parents' => 'a:0:{}'),
+ array('forum_id' => 9, 'parent_id' => 7, 'left_id' => 16, 'right_id' => 19, 'forum_parents' => 'a:0:{}'),
+ array('forum_id' => 10, 'parent_id' => 9, 'left_id' => 17, 'right_id' => 18, 'forum_parents' => 'a:0:{}'),
+ array('forum_id' => 11, 'parent_id' => 7, 'left_id' => 20, 'right_id' => 21, 'forum_parents' => 'a:0:{}'),
+ )),
+ array('Move single child down',
+ 6, 7, true, array(
+ array('forum_id' => 1, 'parent_id' => 0, 'left_id' => 1, 'right_id' => 6, 'forum_parents' => 'a:0:{}'),
+ array('forum_id' => 2, 'parent_id' => 1, 'left_id' => 2, 'right_id' => 3, 'forum_parents' => 'a:0:{}'),
+ array('forum_id' => 3, 'parent_id' => 1, 'left_id' => 4, 'right_id' => 5, 'forum_parents' => 'a:0:{}'),
+
+ array('forum_id' => 4, 'parent_id' => 0, 'left_id' => 7, 'right_id' => 10, 'forum_parents' => 'a:0:{}'),
+ array('forum_id' => 5, 'parent_id' => 4, 'left_id' => 8, 'right_id' => 9, 'forum_parents' => 'a:0:{}'),
+
+ array('forum_id' => 7, 'parent_id' => 0, 'left_id' => 11, 'right_id' => 22, 'forum_parents' => 'a:0:{}'),
+ array('forum_id' => 8, 'parent_id' => 7, 'left_id' => 12, 'right_id' => 13, 'forum_parents' => 'a:0:{}'),
+ array('forum_id' => 9, 'parent_id' => 7, 'left_id' => 14, 'right_id' => 17, 'forum_parents' => 'a:0:{}'),
+ array('forum_id' => 10, 'parent_id' => 9, 'left_id' => 15, 'right_id' => 16, 'forum_parents' => 'a:0:{}'),
+ array('forum_id' => 11, 'parent_id' => 7, 'left_id' => 18, 'right_id' => 19, 'forum_parents' => 'a:0:{}'),
+ array('forum_id' => 6, 'parent_id' => 7, 'left_id' => 20, 'right_id' => 21, 'forum_parents' => ''),
+ )),
+ array('Move nested children down',
+ 5, 7, true, array(
+ array('forum_id' => 1, 'parent_id' => 0, 'left_id' => 1, 'right_id' => 6, 'forum_parents' => 'a:0:{}'),
+ array('forum_id' => 2, 'parent_id' => 1, 'left_id' => 2, 'right_id' => 3, 'forum_parents' => 'a:0:{}'),
+ array('forum_id' => 3, 'parent_id' => 1, 'left_id' => 4, 'right_id' => 5, 'forum_parents' => 'a:0:{}'),
+
+ array('forum_id' => 4, 'parent_id' => 0, 'left_id' => 7, 'right_id' => 8, 'forum_parents' => 'a:0:{}'),
+
+ array('forum_id' => 7, 'parent_id' => 0, 'left_id' => 9, 'right_id' => 22, 'forum_parents' => 'a:0:{}'),
+ array('forum_id' => 8, 'parent_id' => 7, 'left_id' => 10, 'right_id' => 11, 'forum_parents' => 'a:0:{}'),
+ array('forum_id' => 9, 'parent_id' => 7, 'left_id' => 12, 'right_id' => 15, 'forum_parents' => 'a:0:{}'),
+ array('forum_id' => 10, 'parent_id' => 9, 'left_id' => 13, 'right_id' => 14, 'forum_parents' => 'a:0:{}'),
+ array('forum_id' => 11, 'parent_id' => 7, 'left_id' => 16, 'right_id' => 17, 'forum_parents' => 'a:0:{}'),
+ array('forum_id' => 5, 'parent_id' => 7, 'left_id' => 18, 'right_id' => 21, 'forum_parents' => ''),
+ array('forum_id' => 6, 'parent_id' => 5, 'left_id' => 19, 'right_id' => 20, 'forum_parents' => ''),
+ )),
+ array('Move single child to parent 0',
+ 6, 0, true, array(
+ array('forum_id' => 1, 'parent_id' => 0, 'left_id' => 1, 'right_id' => 6, 'forum_parents' => 'a:0:{}'),
+ array('forum_id' => 2, 'parent_id' => 1, 'left_id' => 2, 'right_id' => 3, 'forum_parents' => 'a:0:{}'),
+ array('forum_id' => 3, 'parent_id' => 1, 'left_id' => 4, 'right_id' => 5, 'forum_parents' => 'a:0:{}'),
+
+ array('forum_id' => 4, 'parent_id' => 0, 'left_id' => 7, 'right_id' => 10, 'forum_parents' => 'a:0:{}'),
+ array('forum_id' => 5, 'parent_id' => 4, 'left_id' => 8, 'right_id' => 9, 'forum_parents' => 'a:0:{}'),
+
+ array('forum_id' => 7, 'parent_id' => 0, 'left_id' => 11, 'right_id' => 20, 'forum_parents' => 'a:0:{}'),
+ array('forum_id' => 8, 'parent_id' => 7, 'left_id' => 12, 'right_id' => 13, 'forum_parents' => 'a:0:{}'),
+ array('forum_id' => 9, 'parent_id' => 7, 'left_id' => 14, 'right_id' => 17, 'forum_parents' => 'a:0:{}'),
+ array('forum_id' => 10, 'parent_id' => 9, 'left_id' => 15, 'right_id' => 16, 'forum_parents' => 'a:0:{}'),
+ array('forum_id' => 11, 'parent_id' => 7, 'left_id' => 18, 'right_id' => 19, 'forum_parents' => 'a:0:{}'),
+
+ array('forum_id' => 6, 'parent_id' => 0, 'left_id' => 21, 'right_id' => 22, 'forum_parents' => ''),
+ )),
+ array('Move nested children to parent 0',
+ 5, 0, true, array(
+ array('forum_id' => 1, 'parent_id' => 0, 'left_id' => 1, 'right_id' => 6, 'forum_parents' => 'a:0:{}'),
+ array('forum_id' => 2, 'parent_id' => 1, 'left_id' => 2, 'right_id' => 3, 'forum_parents' => 'a:0:{}'),
+ array('forum_id' => 3, 'parent_id' => 1, 'left_id' => 4, 'right_id' => 5, 'forum_parents' => 'a:0:{}'),
+
+ array('forum_id' => 4, 'parent_id' => 0, 'left_id' => 7, 'right_id' => 8, 'forum_parents' => 'a:0:{}'),
+
+ array('forum_id' => 7, 'parent_id' => 0, 'left_id' => 9, 'right_id' => 18, 'forum_parents' => 'a:0:{}'),
+ array('forum_id' => 8, 'parent_id' => 7, 'left_id' => 10, 'right_id' => 11, 'forum_parents' => 'a:0:{}'),
+ array('forum_id' => 9, 'parent_id' => 7, 'left_id' => 12, 'right_id' => 15, 'forum_parents' => 'a:0:{}'),
+ array('forum_id' => 10, 'parent_id' => 9, 'left_id' => 13, 'right_id' => 14, 'forum_parents' => 'a:0:{}'),
+ array('forum_id' => 11, 'parent_id' => 7, 'left_id' => 16, 'right_id' => 17, 'forum_parents' => 'a:0:{}'),
+
+ array('forum_id' => 5, 'parent_id' => 0, 'left_id' => 19, 'right_id' => 22, 'forum_parents' => ''),
+ array('forum_id' => 6, 'parent_id' => 5, 'left_id' => 20, 'right_id' => 21, 'forum_parents' => ''),
+ )),
+ );
+ }
+
+ /**
+ * @dataProvider change_parent_data
+ */
+ public function test_change_parent($explain, $forum_id, $target_id, $expected_moved, $expected)
+ {
+ $this->assertEquals($expected_moved, $this->set->change_parent($forum_id, $target_id));
+
+ $result = $this->db->sql_query("SELECT forum_id, parent_id, left_id, right_id, forum_parents
+ FROM phpbb_forums
+ ORDER BY left_id, forum_id ASC");
+ $this->assertEquals($expected, $this->db->sql_fetchrowset($result));
+ }
+
+ public function change_parent_throws_item_data()
+ {
+ return array(
+ array('Item 0 does not exist', 0, 5),
+ array('Item does not exist', 200, 5),
+ );
+ }
+
+ /**
+ * @dataProvider change_parent_throws_item_data
+ *
+ * @expectedException OutOfBoundsException
+ * @expectedExceptionMessage FORUM_NESTEDSET_INVALID_ITEM
+ */
+ public function test_change_parent_throws_item($explain, $forum_id, $target_id)
+ {
+ $this->set->change_parent($forum_id, $target_id);
+ }
+
+ public function change_parent_throws_parent_data()
+ {
+ return array(
+ array('New parent is child', 4, 5),
+ array('New parent is child 2', 7, 9),
+ array('New parent does not exist', 1, 200),
+ );
+ }
+
+ /**
+ * @dataProvider change_parent_throws_parent_data
+ *
+ * @expectedException OutOfBoundsException
+ * @expectedExceptionMessage FORUM_NESTEDSET_INVALID_PARENT
+ */
+ public function test_change_parent_throws_parent($explain, $forum_id, $target_id)
+ {
+ $this->set->change_parent($forum_id, $target_id);
+ }
+}
diff --git a/tests/tree/nestedset_forum_regenerate_test.php b/tests/tree/nestedset_forum_regenerate_test.php
new file mode 100644
index 0000000000..38338dbc4d
--- /dev/null
+++ b/tests/tree/nestedset_forum_regenerate_test.php
@@ -0,0 +1,72 @@
+<?php
+/**
+*
+* @package tree
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+require_once dirname(__FILE__) . '/nestedset_forum_base.php';
+
+class phpbb_tests_tree_nestedset_forum_regenerate_test extends phpbb_tests_tree_nestedset_forum_base
+{
+ protected $fixed_set = array(
+ array('forum_id' => 1, 'parent_id' => 0, 'left_id' => 1, 'right_id' => 6, 'forum_parents' => ''),
+ array('forum_id' => 2, 'parent_id' => 1, 'left_id' => 2, 'right_id' => 3, 'forum_parents' => ''),
+ array('forum_id' => 3, 'parent_id' => 1, 'left_id' => 4, 'right_id' => 5, 'forum_parents' => ''),
+
+ array('forum_id' => 4, 'parent_id' => 0, 'left_id' => 7, 'right_id' => 12, 'forum_parents' => ''),
+ array('forum_id' => 5, 'parent_id' => 4, 'left_id' => 8, 'right_id' => 11, 'forum_parents' => ''),
+ array('forum_id' => 6, 'parent_id' => 5, 'left_id' => 9, 'right_id' => 10, 'forum_parents' => ''),
+
+ array('forum_id' => 7, 'parent_id' => 0, 'left_id' => 13, 'right_id' => 22, 'forum_parents' => ''),
+ array('forum_id' => 8, 'parent_id' => 7, 'left_id' => 14, 'right_id' => 15, 'forum_parents' => ''),
+ array('forum_id' => 9, 'parent_id' => 7, 'left_id' => 16, 'right_id' => 19, 'forum_parents' => ''),
+ array('forum_id' => 10, 'parent_id' => 9, 'left_id' => 17, 'right_id' => 18, 'forum_parents' => ''),
+ array('forum_id' => 11, 'parent_id' => 7, 'left_id' => 20, 'right_id' => 21, 'forum_parents' => ''),
+ );
+
+ public function regenerate_left_right_ids_data()
+ {
+ return array(
+ array('UPDATE phpbb_forums
+ SET left_id = 0,
+ right_id = 0', false),
+ array('UPDATE phpbb_forums
+ SET left_id = 28,
+ right_id = 28
+ WHERE left_id > 12', false),
+ array('UPDATE phpbb_forums
+ SET left_id = left_id * 2,
+ right_id = right_id * 2', false),
+ array('UPDATE phpbb_forums
+ SET left_id = left_id * 2,
+ right_id = right_id * 2
+ WHERE left_id > 12', false),
+ array('UPDATE phpbb_forums
+ SET left_id = left_id - 4,
+ right_id = right_id * 4
+ WHERE left_id > 4', false),
+ array('UPDATE phpbb_forums
+ SET left_id = 0,
+ right_id = 0
+ WHERE left_id > 12', true),
+ );
+ }
+
+ /**
+ * @dataProvider regenerate_left_right_ids_data
+ */
+ public function test_regenerate_left_right_ids($breaking_query, $reset_ids)
+ {
+ $result = $this->db->sql_query($breaking_query);
+
+ $this->assertEquals(23, $this->set->regenerate_left_right_ids(1, 0, $reset_ids));
+
+ $result = $this->db->sql_query('SELECT forum_id, parent_id, left_id, right_id, forum_parents
+ FROM phpbb_forums
+ ORDER BY left_id, forum_id ASC');
+ $this->assertEquals($this->fixed_set, $this->db->sql_fetchrowset($result));
+ }
+}
diff --git a/tests/tree/nestedset_forum_test.php b/tests/tree/nestedset_forum_test.php
new file mode 100644
index 0000000000..516c794ffc
--- /dev/null
+++ b/tests/tree/nestedset_forum_test.php
@@ -0,0 +1,116 @@
+<?php
+/**
+*
+* @package tree
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+require_once dirname(__FILE__) . '/nestedset_forum_base.php';
+
+class pphpbb_tests_tree_nestedset_forum_test extends phpbb_tests_tree_nestedset_forum_base
+{
+ public function forum_constructor_data()
+ {
+ return array(
+ array(array(
+ array('forum_id' => 1, 'parent_id' => 0, 'left_id' => 1, 'right_id' => 6),
+ array('forum_id' => 2, 'parent_id' => 1, 'left_id' => 2, 'right_id' => 3),
+ array('forum_id' => 3, 'parent_id' => 1, 'left_id' => 4, 'right_id' => 5),
+
+ array('forum_id' => 4, 'parent_id' => 0, 'left_id' => 7, 'right_id' => 12),
+ array('forum_id' => 5, 'parent_id' => 4, 'left_id' => 8, 'right_id' => 11),
+ array('forum_id' => 6, 'parent_id' => 5, 'left_id' => 9, 'right_id' => 10),
+
+ array('forum_id' => 7, 'parent_id' => 0, 'left_id' => 13, 'right_id' => 22),
+ array('forum_id' => 8, 'parent_id' => 7, 'left_id' => 14, 'right_id' => 15),
+ array('forum_id' => 9, 'parent_id' => 7, 'left_id' => 16, 'right_id' => 19),
+ array('forum_id' => 10, 'parent_id' => 9, 'left_id' => 17, 'right_id' => 18),
+ array('forum_id' => 11, 'parent_id' => 7, 'left_id' => 20, 'right_id' => 21),
+ )),
+ );
+ }
+
+ /**
+ * @dataProvider forum_constructor_data
+ */
+ public function test_forum_constructor($expected)
+ {
+ $result = $this->db->sql_query('SELECT forum_id, parent_id, left_id, right_id
+ FROM phpbb_forums
+ ORDER BY left_id, forum_id ASC');
+ $this->assertEquals($expected, $this->db->sql_fetchrowset($result));
+ }
+
+ public function get_sql_where_data()
+ {
+ return array(
+ array('SELECT forum_id
+ FROM phpbb_forums
+ %s
+ ORDER BY forum_id ASC',
+ 'WHERE', '', array(
+ array('forum_id' => 1),
+ array('forum_id' => 2),
+ array('forum_id' => 3),
+
+ array('forum_id' => 4),
+ array('forum_id' => 5),
+ array('forum_id' => 6),
+
+ array('forum_id' => 7),
+ array('forum_id' => 8),
+ array('forum_id' => 9),
+ array('forum_id' => 10),
+ array('forum_id' => 11),
+ )),
+ array('SELECT f.forum_id
+ FROM phpbb_forums f
+ %s
+ ORDER BY f.forum_id ASC',
+ 'WHERE', 'f.', array(
+ array('forum_id' => 1),
+ array('forum_id' => 2),
+ array('forum_id' => 3),
+
+ array('forum_id' => 4),
+ array('forum_id' => 5),
+ array('forum_id' => 6),
+
+ array('forum_id' => 7),
+ array('forum_id' => 8),
+ array('forum_id' => 9),
+ array('forum_id' => 10),
+ array('forum_id' => 11),
+ )),
+ array('SELECT forum_id
+ FROM phpbb_forums
+ WHERE forum_id < 4 %s
+ ORDER BY forum_id ASC',
+ 'AND', '', array(
+ array('forum_id' => 1),
+ array('forum_id' => 2),
+ array('forum_id' => 3),
+ )),
+ array('SELECT f.forum_id
+ FROM phpbb_forums f
+ WHERE f.forum_id < 4 %s
+ ORDER BY f.forum_id ASC',
+ 'AND', 'f.', array(
+ array('forum_id' => 1),
+ array('forum_id' => 2),
+ array('forum_id' => 3),
+ )),
+ );
+ }
+
+ /**
+ * @dataProvider get_sql_where_data
+ */
+ public function test_get_sql_where($sql_query, $operator, $column_prefix, $expected)
+ {
+ $result = $this->db->sql_query(sprintf($sql_query, $this->set->get_sql_where($operator, $column_prefix)));
+ $this->assertEquals($expected, $this->db->sql_fetchrowset($result));
+ }
+}
diff --git a/tests/upload/filespec_test.php b/tests/upload/filespec_test.php
new file mode 100644
index 0000000000..87cd00197f
--- /dev/null
+++ b/tests/upload/filespec_test.php
@@ -0,0 +1,274 @@
+<?php
+/**
+ *
+ * @package testing
+ * @copyright (c) 2012 phpBB Group
+ * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+ *
+ */
+
+require_once __DIR__ . '/../../phpBB/includes/functions.php';
+require_once __DIR__ . '/../../phpBB/includes/utf/utf_tools.php';
+require_once __DIR__ . '/../../phpBB/includes/functions_upload.php';
+
+class phpbb_filespec_test extends phpbb_test_case
+{
+ const TEST_COUNT = 100;
+ const PREFIX = 'phpbb_';
+ const MAX_STR_LEN = 50;
+ const UPLOAD_MAX_FILESIZE = 1000;
+
+ private $config;
+ public $path;
+
+ protected function setUp()
+ {
+ // Global $config required by unique_id
+ // Global $user required by filespec::additional_checks and
+ // filespec::move_file
+ global $config, $user;
+
+ if (!is_array($config))
+ {
+ $config = array();
+ }
+
+ $config['rand_seed'] = '';
+ $config['rand_seed_last_update'] = time() + 600;
+ // This config value is normally pulled from the database which is set
+ // to this value at install time.
+ // See: phpBB/install/schemas/schema_data.sql
+ $config['mime_triggers'] = 'body|head|html|img|plaintext|a href|pre|script|table|title';
+
+ $user = new phpbb_mock_user();
+ $user->lang = new phpbb_mock_lang();
+
+ $this->config = &$config;
+ $this->path = __DIR__ . '/fixture/';
+
+ // Create copies of the files for use in testing move_file
+ $iterator = new DirectoryIterator($this->path);
+ foreach ($iterator as $fileinfo)
+ {
+ if ($fileinfo->isDot() || $fileinfo->isDir())
+ {
+ continue;
+ }
+
+ copy($fileinfo->getPathname(), $this->path . 'copies/' . $fileinfo->getFilename() . '_copy');
+ if ($fileinfo->getFilename() === 'txt')
+ {
+ copy($fileinfo->getPathname(), $this->path . 'copies/' . $fileinfo->getFilename() . '_copy_2');
+ }
+ }
+ }
+
+ private function get_filespec($override = array())
+ {
+ // Initialise a blank filespec object for use with trivial methods
+ $upload_ary = array(
+ 'name' => '',
+ 'type' => '',
+ 'size' => '',
+ 'tmp_name' => '',
+ 'error' => '',
+ );
+
+ return new filespec(array_merge($upload_ary, $override), null);
+ }
+
+ protected function tearDown()
+ {
+ global $user;
+ $this->config = array();
+ $user = null;
+
+ $iterator = new DirectoryIterator($this->path . 'copies');
+ foreach ($iterator as $fileinfo)
+ {
+ $name = $fileinfo->getFilename();
+ if ($name[0] !== '.')
+ {
+ unlink($fileinfo->getPathname());
+ }
+ }
+ }
+
+ public function additional_checks_variables()
+ {
+ // False here just indicates the file is too large and fails the
+ // filespec::additional_checks method because of it. All other code
+ // paths in that method are covered elsewhere.
+ return array(
+ array('gif', true),
+ array('jpg', false),
+ array('png', true),
+ array('tif', false),
+ array('txt', false),
+ );
+ }
+
+ /**
+ * @dataProvider additional_checks_variables
+ */
+ public function test_additional_checks($filename, $expected)
+ {
+ $upload = new phpbb_mock_fileupload();
+ $filespec = $this->get_filespec();
+ $filespec->upload = $upload;
+ $filespec->file_moved = true;
+ $filespec->filesize = $filespec->get_filesize($this->path . $filename);
+
+ $this->assertEquals($expected, $filespec->additional_checks());
+ }
+
+ public function check_content_variables()
+ {
+ // False here indicates that a file is non-binary and contains
+ // disallowed content that makes IE report the mimetype incorrectly.
+ return array(
+ array('gif', true),
+ array('jpg', true),
+ array('png', true),
+ array('tif', true),
+ array('txt', false),
+ );
+ }
+
+ /**
+ * @dataProvider check_content_variables
+ */
+ public function test_check_content($filename, $expected)
+ {
+ $disallowed_content = explode('|', $this->config['mime_triggers']);
+ $filespec = $this->get_filespec(array('tmp_name' => $this->path . $filename));
+ $this->assertEquals($expected, $filespec->check_content($disallowed_content));
+ }
+
+ public function clean_filename_variables()
+ {
+ $chunks = str_split('abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\'\\" /:*?<>|[];(){},#+=-_`', 8);
+ return array(
+ array($chunks[0] . $chunks[7]),
+ array($chunks[1] . $chunks[8]),
+ array($chunks[2] . $chunks[9]),
+ array($chunks[3] . $chunks[4]),
+ array($chunks[5] . $chunks[6]),
+ );
+ }
+
+ /**
+ * @dataProvider clean_filename_variables
+ */
+ public function test_clean_filename_real($filename)
+ {
+ $bad_chars = array("'", "\\", ' ', '/', ':', '*', '?', '"', '<', '>', '|');
+ $filespec = $this->get_filespec(array('name' => $filename));
+ $filespec->clean_filename('real', self::PREFIX);
+ $name = $filespec->realname;
+
+ $this->assertEquals(0, preg_match('/%(\w{2})/', $name));
+ foreach ($bad_chars as $char)
+ {
+ $this->assertFalse(strpos($name, $char));
+ }
+ }
+
+ public function test_clean_filename_unique()
+ {
+ $filenames = array();
+ for ($tests = 0; $tests < self::TEST_COUNT; $tests++)
+ {
+ $filespec = $this->get_filespec();
+ $filespec->clean_filename('unique', self::PREFIX);
+ $name = $filespec->realname;
+
+ $this->assertEquals(strlen($name), 32 + strlen(self::PREFIX));
+ $this->assertRegExp('#^[A-Za-z0-9]+$#', substr($name, strlen(self::PREFIX)));
+ $this->assertFalse(isset($filenames[$name]));
+ $filenames[$name] = true;
+ }
+ }
+
+ public function get_extension_variables()
+ {
+ return array(
+ array('file.png', 'png'),
+ array('file.phpbb.gif', 'gif'),
+ array('file..', ''),
+ array('.file..jpg.webp', 'webp'),
+ );
+ }
+
+ /**
+ * @dataProvider get_extension_variables
+ */
+ public function test_get_extension($filename, $expected)
+ {
+ $this->assertEquals($expected, filespec::get_extension($filename));
+ }
+
+ public function is_image_variables()
+ {
+ return array(
+ array('gif', 'image/gif', true),
+ array('jpg', 'image/jpg', true),
+ array('png', 'image/png', true),
+ array('tif', 'image/tif', true),
+ array('txt', 'text/plain', false),
+ );
+ }
+
+ /**
+ * @dataProvider is_image_variables
+ */
+ public function test_is_image($filename, $mimetype, $expected)
+ {
+ $filespec = $this->get_filespec(array('tmp_name' => $this->path . $filename, 'type' => $mimetype));
+ $this->assertEquals($expected, $filespec->is_image());
+ }
+
+ public function move_file_variables()
+ {
+ return array(
+ array('gif_copy', 'gif_moved', 'image/gif', 'gif', false, true),
+ array('non_existant', 'still_non_existant', 'text/plain', 'txt', 'GENERAL_UPLOAD_ERROR', false),
+ array('txt_copy', 'txt_as_img', 'image/jpg', 'txt', false, true),
+ array('txt_copy_2', 'txt_moved', 'text/plain', 'txt', false, true),
+ array('jpg_copy', 'jpg_moved', 'image/png', 'jpg', false, true),
+ array('png_copy', 'png_moved', 'image/png', 'jpg', 'IMAGE_FILETYPE_MISMATCH', true),
+ );
+ }
+
+ /**
+ * @dataProvider move_file_variables
+ */
+ public function test_move_file($tmp_name, $realname, $mime_type, $extension, $error, $expected)
+ {
+ // Global $phpbb_root_path and $phpEx are required by phpbb_chmod
+ global $phpbb_root_path, $phpEx;
+ $phpbb_root_path = '';
+ $phpEx = 'php';
+
+ $upload = new phpbb_mock_fileupload();
+ $upload->max_filesize = self::UPLOAD_MAX_FILESIZE;
+
+ $filespec = $this->get_filespec(array(
+ 'tmp_name' => $this->path . 'copies/' . $tmp_name,
+ 'name' => $realname,
+ 'type' => $mime_type,
+ ));
+ $filespec->extension = $extension;
+ $filespec->upload = $upload;
+ $filespec->local = true;
+
+ $this->assertEquals($expected, $filespec->move_file($this->path . 'copies'));
+ $this->assertEquals($filespec->file_moved, file_exists($this->path . 'copies/' . $realname));
+ if ($error)
+ {
+ $this->assertEquals($error, $filespec->error[0]);
+ }
+
+ $phpEx = '';
+ }
+}
diff --git a/tests/upload/fileupload_test.php b/tests/upload/fileupload_test.php
new file mode 100644
index 0000000000..8b9df33a63
--- /dev/null
+++ b/tests/upload/fileupload_test.php
@@ -0,0 +1,120 @@
+<?php
+/**
+ *
+ * @package testing
+ * @copyright (c) 2012 phpBB Group
+ * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+ *
+ */
+
+require_once __DIR__ . '/../../phpBB/includes/functions.php';
+require_once __DIR__ . '/../../phpBB/includes/utf/utf_tools.php';
+require_once __DIR__ . '/../../phpBB/includes/functions_upload.php';
+require_once __DIR__ . '/../mock/filespec.php';
+
+class phpbb_fileupload_test extends phpbb_test_case
+{
+ private $path;
+
+ protected function setUp()
+ {
+ // Global $config required by unique_id
+ // Global $user required by several functions dealing with translations
+ // Global $request required by form_upload, local_upload and is_valid
+ global $config, $user, $request;
+
+ if (!is_array($config))
+ {
+ $config = array();
+ }
+
+ $config['rand_seed'] = '';
+ $config['rand_seed_last_update'] = time() + 600;
+
+ $user = new phpbb_mock_user();
+ $user->lang = new phpbb_mock_lang();
+
+ $request = new phpbb_mock_request();
+
+ $this->path = __DIR__ . '/fixture/';
+ }
+
+ private function gen_valid_filespec()
+ {
+ $filespec = new phpbb_mock_filespec();
+ $filespec->filesize = 1;
+ $filespec->extension = 'jpg';
+ $filespec->realname = 'valid';
+ $filespec->width = 2;
+ $filespec->height = 2;
+
+ return $filespec;
+ }
+
+ protected function tearDown()
+ {
+ // Clear globals
+ global $config, $user;
+ $config = array();
+ $user = null;
+ }
+
+ public function test_common_checks_invalid_extension()
+ {
+ $upload = new fileupload('', array('png'), 100);
+ $file = $this->gen_valid_filespec();
+ $upload->common_checks($file);
+ $this->assertEquals('DISALLOWED_EXTENSION', $file->error[0]);
+ }
+
+ public function test_common_checks_invalid_filename()
+ {
+ $upload = new fileupload('', array('jpg'), 100);
+ $file = $this->gen_valid_filespec();
+ $file->realname = 'invalid?';
+ $upload->common_checks($file);
+ $this->assertEquals('INVALID_FILENAME', $file->error[0]);
+ }
+
+ public function test_common_checks_too_large()
+ {
+ $upload = new fileupload('', array('jpg'), 100);
+ $file = $this->gen_valid_filespec();
+ $file->filesize = 1000;
+ $upload->common_checks($file);
+ $this->assertEquals('WRONG_FILESIZE', $file->error[0]);
+ }
+
+ public function test_common_checks_valid_file()
+ {
+ $upload = new fileupload('', array('jpg'), 1000);
+ $file = $this->gen_valid_filespec();
+ $upload->common_checks($file);
+ $this->assertEquals(0, sizeof($file->error));
+ }
+
+ public function test_local_upload()
+ {
+ $upload = new fileupload('', array('jpg'), 1000);
+
+ copy($this->path . 'jpg', $this->path . 'jpg.jpg');
+ $file = $upload->local_upload($this->path . 'jpg.jpg');
+ $this->assertEquals(0, sizeof($file->error));
+ unlink($this->path . 'jpg.jpg');
+ }
+
+ public function test_valid_dimensions()
+ {
+ $upload = new fileupload('', false, false, 1, 1, 100, 100);
+
+ $file1 = $this->gen_valid_filespec();
+ $file2 = $this->gen_valid_filespec();
+ $file2->height = 101;
+ $file3 = $this->gen_valid_filespec();
+ $file3->width = 0;
+
+ $this->assertTrue($upload->valid_dimensions($file1));
+ $this->assertFalse($upload->valid_dimensions($file2));
+ $this->assertFalse($upload->valid_dimensions($file3));
+ }
+}
diff --git a/tests/upload/fixture/copies/.gitkeep b/tests/upload/fixture/copies/.gitkeep
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/tests/upload/fixture/copies/.gitkeep
diff --git a/tests/upload/fixture/gif b/tests/upload/fixture/gif
new file mode 100644
index 0000000000..b636f4b8df
--- /dev/null
+++ b/tests/upload/fixture/gif
Binary files differ
diff --git a/tests/upload/fixture/jpg b/tests/upload/fixture/jpg
new file mode 100644
index 0000000000..3cd5038e38
--- /dev/null
+++ b/tests/upload/fixture/jpg
Binary files differ
diff --git a/tests/upload/fixture/png b/tests/upload/fixture/png
new file mode 100644
index 0000000000..5514ad40e9
--- /dev/null
+++ b/tests/upload/fixture/png
Binary files differ
diff --git a/tests/upload/fixture/tif b/tests/upload/fixture/tif
new file mode 100644
index 0000000000..248b50f9cb
--- /dev/null
+++ b/tests/upload/fixture/tif
Binary files differ
diff --git a/tests/upload/fixture/txt b/tests/upload/fixture/txt
new file mode 100644
index 0000000000..a78c858f5c
--- /dev/null
+++ b/tests/upload/fixture/txt
@@ -0,0 +1,2 @@
+<HTML>mime trigger</HTML>
+The HTML tags should remain uppercase so that case-insensitivity can be checked.
diff --git a/tests/user/fixtures/user_loader.xml b/tests/user/fixtures/user_loader.xml
new file mode 100644
index 0000000000..f676f468a6
--- /dev/null
+++ b/tests/user/fixtures/user_loader.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<dataset>
+ <table name="phpbb_users">
+ <column>user_id</column>
+ <column>user_permissions</column>
+ <column>username</column>
+ <column>username_clean</column>
+ <column>user_sig</column>
+ <row>
+ <value>1</value>
+ <value></value>
+ <value>Guest</value>
+ <value>guest</value>
+ <value></value>
+ </row>
+ <row>
+ <value>2</value>
+ <value></value>
+ <value>Admin</value>
+ <value>admin</value>
+ <value></value>
+ </row>
+ <row>
+ <value>3</value>
+ <value></value>
+ <value>Test</value>
+ <value>test</value>
+ <value></value>
+ </row>
+ </table>
+</dataset>
diff --git a/tests/user/lang_test.php b/tests/user/lang_test.php
index d33f430955..9cb9e320b3 100644
--- a/tests/user/lang_test.php
+++ b/tests/user/lang_test.php
@@ -7,13 +7,13 @@
*
*/
-require_once dirname(__FILE__) . '/../../phpBB/includes/session.php';
+require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php';
class phpbb_user_lang_test extends phpbb_test_case
{
public function test_user_lang_sprintf()
{
- $user = new user;
+ $user = new \phpbb\user;
$user->lang = array(
'FOO' => 'BAR',
'BARZ' => 'PENG',
@@ -26,6 +26,26 @@ class phpbb_user_lang_test extends phpbb_test_case
1 => '1 post', // 1
2 => '%d posts', // 2+
),
+ 'ARRY_NO_ZERO' => array(
+ 1 => '1 post', // 1
+ 2 => '%d posts', // 0, 2+
+ ),
+ 'ARRY_MISSING' => array(
+ 1 => '%d post', // 1
+ //Missing second plural
+ ),
+ 'ARRY_FLOAT' => array(
+ 1 => '1 post', // 1.x
+ 2 => '%1$.1f posts', // 0.x, 2+.x
+ ),
+ 'ARRY_EMPTY' => array(
+ ),
+ 'dateformat' => array(
+ 'AGO' => array(
+ 1 => '%d second',
+ 2 => '%d seconds',
+ ),
+ ),
);
// No param
@@ -51,8 +71,45 @@ class phpbb_user_lang_test extends phpbb_test_case
$this->assertEquals($user->lang('ARRY', 2), '2 posts');
$this->assertEquals($user->lang('ARRY', 123), '123 posts');
- // Bug PHPBB3-9949
+ // Empty array returns the language key
+ $this->assertEquals($user->lang('ARRY_EMPTY', 123), 'ARRY_EMPTY');
+
+ // No 0 key defined
+ $this->assertEquals($user->lang('ARRY_NO_ZERO', 0), '0 posts');
+ $this->assertEquals($user->lang('ARRY_NO_ZERO', 1), '1 post');
+ $this->assertEquals($user->lang('ARRY_NO_ZERO', 2), '2 posts');
+
+ // Array with missing keys
+ $this->assertEquals($user->lang('ARRY_MISSING', 2), '2 post');
+
+ // Floats as array key
+ $this->assertEquals($user->lang('ARRY_FLOAT', 1.3), '1 post');
+ $this->assertEquals($user->lang('ARRY_FLOAT', 2.0), '2.0 posts');
+ $this->assertEquals($user->lang('ARRY_FLOAT', 2.51), '2.5 posts');
+
+ // Use sub key, if first paramenter is an array
+ $this->assertEquals($user->lang(array('dateformat', 'AGO'), 2), '2 seconds');
+
+ // ticket PHPBB3-9949 - use first int to determinate the plural-form to use
$this->assertEquals($user->lang('ARRY', 1, 2), '1 post');
$this->assertEquals($user->lang('ARRY', 1, 's', 2), '1 post');
+
+ // ticket PHPBB3-10345 - different plural rules, not just 0/1/2+
+ $user = new \phpbb\user;
+ $user->lang = array(
+ 'PLURAL_RULE' => 13,
+ 'ARRY' => array(
+ 0 => '%d is 0', // 0
+ 1 => '%d is 1', // 1
+ 2 => '%d ends with 01-10', // ending with 01-10
+ 3 => '%d ends with 11-19', // ending with 11-19
+ 4 => '%d is part of the last rule', // everything else
+ ),
+ );
+ $this->assertEquals($user->lang('ARRY', 0), '0 is 0');
+ $this->assertEquals($user->lang('ARRY', 1), '1 is 1');
+ $this->assertEquals($user->lang('ARRY', 103), '103 ends with 01-10');
+ $this->assertEquals($user->lang('ARRY', 15), '15 ends with 11-19');
+ $this->assertEquals($user->lang('ARRY', 300), '300 is part of the last rule');
}
}
diff --git a/tests/user/user_loader_test.php b/tests/user/user_loader_test.php
new file mode 100644
index 0000000000..13c35030f9
--- /dev/null
+++ b/tests/user/user_loader_test.php
@@ -0,0 +1,63 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+include_once(__DIR__ . '/../../phpBB/includes/utf/utf_tools.php');
+
+class phpbb_user_loader_test extends phpbb_database_test_case
+{
+ protected $db;
+ protected $user_loader;
+
+ public function getDataSet()
+ {
+ return $this->createXMLDataSet(dirname(__FILE__) . '/fixtures/user_loader.xml');
+ }
+
+ public function setUp()
+ {
+ parent::setUp();
+
+ $this->db = $this->new_dbal();
+ $this->user_loader = new \phpbb\user_loader($this->db, __DIR__ . '/../../phpBB/', 'php', 'phpbb_users');
+ }
+
+ public function test_load_get()
+ {
+ $this->user_loader->load_users(array(2));
+
+ $user = $this->user_loader->get_user(1);
+ $this->assertEquals(1, $user['user_id']);
+ $this->assertEquals('Guest', $user['username']);
+
+ $user = $this->user_loader->get_user(2);
+ $this->assertEquals(2, $user['user_id']);
+ $this->assertEquals('Admin', $user['username']);
+ }
+
+ public function test_load_get_unloaded()
+ {
+ $this->user_loader->load_users(array(2));
+
+ $user = $this->user_loader->get_user(3);
+ $this->assertEquals(1, $user['user_id']);
+ $this->assertEquals('Guest', $user['username']);
+
+ $user = $this->user_loader->get_user(3, true);
+ $this->assertEquals(3, $user['user_id']);
+ $this->assertEquals('Test', $user['username']);
+ }
+
+ public function test_load_user_by_username()
+ {
+ $user_id = $this->user_loader->load_user_by_username('Test');
+ $user = $this->user_loader->get_user($user_id);
+ $this->assertEquals(3, $user['user_id']);
+ $this->assertEquals('Test', $user['username']);
+ }
+}
diff --git a/tests/utf/utf8_clean_string_test.php b/tests/utf/utf8_clean_string_test.php
index 5ebf6409af..ae11e00fbd 100644
--- a/tests/utf/utf8_clean_string_test.php
+++ b/tests/utf/utf8_clean_string_test.php
@@ -11,7 +11,7 @@ require_once dirname(__FILE__) . '/../../phpBB/includes/utf/utf_tools.php';
class phpbb_utf_utf8_clean_string_test extends phpbb_test_case
{
- static public function cleanable_strings()
+ public function cleanable_strings()
{
return array(
array('MiXed CaSe', 'mixed case', 'Checking case folding'),
diff --git a/tests/version/version_fetch_test.php b/tests/version/version_fetch_test.php
new file mode 100644
index 0000000000..7b3ba5e717
--- /dev/null
+++ b/tests/version/version_fetch_test.php
@@ -0,0 +1,58 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2014 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+/*
+* @group slow
+*/
+class phpbb_version_helper_fetch_test extends phpbb_test_case
+{
+ public function setUp()
+ {
+ parent::setUp();
+
+ global $phpbb_root_path, $phpEx;
+
+ include_once($phpbb_root_path . 'includes/functions.' . $phpEx);
+
+ $this->cache = $this->getMockBuilder('\phpbb\cache\service')
+ ->disableOriginalConstructor()
+ ->getMock();
+
+ $this->version_helper = new \phpbb\version_helper(
+ $this->cache,
+ new \phpbb\config\config(array(
+ 'version' => '3.1.0',
+ )),
+ new \phpbb\user()
+ );
+ }
+
+ public function test_version_phpbb_com()
+ {
+ global $phpbb_root_path, $phpEx;
+ include_once($phpbb_root_path . 'includes/functions.' . $phpEx);
+
+ if (!phpbb_checkdnsrr('version.phpbb.com', 'A'))
+ {
+ $this->markTestSkipped(sprintf(
+ 'Could not find a DNS record for hostname %s. ' .
+ 'Assuming network is down.',
+ 'version.phpbb.com'
+ ));
+ }
+
+ $this->version_helper->get_versions();
+
+ // get_versions checks to make sure we got a valid versions file or
+ // throws an exception if we did not. We don't need to test anything
+ // here, but adding an assertion so we do not get a warning about no
+ // assertions in this test
+ $this->assertSame(true, true);
+ }
+}
diff --git a/tests/version/version_test.php b/tests/version/version_test.php
new file mode 100644
index 0000000000..2e2398bd45
--- /dev/null
+++ b/tests/version/version_test.php
@@ -0,0 +1,318 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2014 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+class phpbb_version_helper_test extends phpbb_test_case
+{
+ public function setUp()
+ {
+ parent::setUp();
+
+ global $phpbb_root_path, $phpEx;
+
+ include_once($phpbb_root_path . 'includes/functions.' . $phpEx);
+
+ $this->cache = $this->getMockBuilder('\phpbb\cache\service')
+ ->disableOriginalConstructor()
+ ->getMock();
+
+ $this->version_helper = new \phpbb\version_helper(
+ $this->cache,
+ new \phpbb\config\config(array(
+ 'version' => '3.1.0',
+ )),
+ new \phpbb\user()
+ );
+ }
+
+ public function is_stable_data()
+ {
+ return array(
+ array(
+ '3.0.0-a1',
+ false,
+ ),
+ array(
+ '3.0.0-b1',
+ false,
+ ),
+ array(
+ '3.0.0-rc1',
+ false,
+ ),
+ array(
+ '3.0.0-RC1',
+ false,
+ ),
+ array(
+ '3.0.0',
+ true,
+ ),
+ array(
+ '3.0.0-pl1',
+ true,
+ ),
+ array(
+ '3.0.0.1-pl1',
+ true,
+ ),
+ array(
+ '3.1-dev',
+ false,
+ ),
+ array(
+ 'foobar',
+ false,
+ ),
+ );
+ }
+
+ /**
+ * @dataProvider is_stable_data
+ */
+ public function test_is_stable($version, $expected)
+ {
+ $this->assertSame($expected, $this->version_helper->is_stable($version));
+ }
+
+ public function get_suggested_updates_data()
+ {
+ return array(
+ array(
+ '1.0.0',
+ array(
+ '1.0' => array(
+ 'current' => '1.0.1',
+ ),
+ '1.1' => array(
+ 'current' => '1.1.1',
+ ),
+ ),
+ array(
+ '1.0' => array(
+ 'current' => '1.0.1',
+ ),
+ '1.1' => array(
+ 'current' => '1.1.1',
+ ),
+ ),
+ ),
+ array(
+ '1.0.1',
+ array(
+ '1.0' => array(
+ 'current' => '1.0.1',
+ ),
+ '1.1' => array(
+ 'current' => '1.1.1',
+ ),
+ ),
+ array(
+ '1.1' => array(
+ 'current' => '1.1.1',
+ ),
+ ),
+ ),
+ array(
+ '1.0.1-a1',
+ array(
+ '1.0' => array(
+ 'current' => '1.0.1-a2',
+ ),
+ '1.1' => array(
+ 'current' => '1.1.0',
+ ),
+ ),
+ array(
+ '1.0' => array(
+ 'current' => '1.0.1-a2',
+ ),
+ '1.1' => array(
+ 'current' => '1.1.0',
+ ),
+ ),
+ ),
+ array(
+ '1.1.0',
+ array(
+ '1.0' => array(
+ 'current' => '1.0.1',
+ ),
+ '1.1' => array(
+ 'current' => '1.1.1',
+ ),
+ ),
+ array(
+ '1.1' => array(
+ 'current' => '1.1.1',
+ ),
+ ),
+ ),
+ array(
+ '1.1.1',
+ array(
+ '1.0' => array(
+ 'current' => '1.0.1',
+ ),
+ '1.1' => array(
+ 'current' => '1.1.1',
+ ),
+ ),
+ array(),
+ ),
+ array(
+ '1.1.0-a1',
+ array(
+ '1.0' => array(
+ 'current' => '1.0.1',
+ ),
+ '1.1' => array(
+ 'current' => '1.1.0-a2',
+ ),
+ ),
+ array(
+ '1.1' => array(
+ 'current' => '1.1.0-a2',
+ ),
+ ),
+ ),
+ );
+ }
+
+ /**
+ * @dataProvider get_suggested_updates_data
+ */
+ public function test_get_suggested_updates($current_version, $versions, $expected)
+ {
+ $version_helper = $this
+ ->getMockBuilder('\phpbb\version_helper')
+ ->setMethods(array(
+ 'get_versions_matching_stability',
+ ))
+ ->setConstructorArgs(array(
+ $this->cache,
+ new \phpbb\config\config(array(
+ 'version' => $current_version,
+ )),
+ new \phpbb\user(),
+ ))
+ ->getMock()
+ ;
+
+ $version_helper->expects($this->any())
+ ->method('get_versions_matching_stability')
+ ->will($this->returnValue($versions));
+
+ $this->assertSame($expected, $version_helper->get_suggested_updates());
+ }
+
+ public function get_latest_on_current_branch_data()
+ {
+ return array(
+ array(
+ '1.0.0',
+ array(
+ '1.0' => array(
+ 'current' => '1.0.1',
+ ),
+ '1.1' => array(
+ 'current' => '1.1.1',
+ ),
+ ),
+ '1.0.1',
+ ),
+ array(
+ '1.0.1',
+ array(
+ '1.0' => array(
+ 'current' => '1.0.1',
+ ),
+ '1.1' => array(
+ 'current' => '1.1.1',
+ ),
+ ),
+ '1.0.1',
+ ),
+ array(
+ '1.0.1-a1',
+ array(
+ '1.0' => array(
+ 'current' => '1.0.1-a2',
+ ),
+ '1.1' => array(
+ 'current' => '1.1.0',
+ ),
+ ),
+ '1.0.1-a2',
+ ),
+ array(
+ '1.1.0',
+ array(
+ '1.0' => array(
+ 'current' => '1.0.1',
+ ),
+ '1.1' => array(
+ 'current' => '1.1.1',
+ ),
+ ),
+ '1.1.1',
+ ),
+ array(
+ '1.1.1',
+ array(
+ '1.0' => array(
+ 'current' => '1.0.1',
+ ),
+ '1.1' => array(
+ 'current' => '1.1.1',
+ ),
+ ),
+ '1.1.1',
+ ),
+ array(
+ '1.1.0-a1',
+ array(
+ '1.0' => array(
+ 'current' => '1.0.1',
+ ),
+ '1.1' => array(
+ 'current' => '1.1.0-a2',
+ ),
+ ),
+ '1.1.0-a2',
+ ),
+ );
+ }
+
+ /**
+ * @dataProvider get_latest_on_current_branch_data
+ */
+ public function test_get_latest_on_current_branch($current_version, $versions, $expected)
+ {
+ $version_helper = $this
+ ->getMockBuilder('\phpbb\version_helper')
+ ->setMethods(array(
+ 'get_versions_matching_stability',
+ ))
+ ->setConstructorArgs(array(
+ $this->cache,
+ new \phpbb\config\config(array(
+ 'version' => $current_version,
+ )),
+ new \phpbb\user(),
+ ))
+ ->getMock()
+ ;
+
+ $version_helper->expects($this->any())
+ ->method('get_versions_matching_stability')
+ ->will($this->returnValue($versions));
+
+ $this->assertSame($expected, $version_helper->get_latest_on_current_branch());
+ }
+}
diff --git a/tests/wrapper/phpbb_php_ini_fake.php b/tests/wrapper/phpbb_php_ini_fake.php
new file mode 100644
index 0000000000..d9e96447e3
--- /dev/null
+++ b/tests/wrapper/phpbb_php_ini_fake.php
@@ -0,0 +1,16 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2011 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+class phpbb_php_ini_fake extends \phpbb\php\ini
+{
+ function get($varname)
+ {
+ return $varname;
+ }
+}
diff --git a/tests/wrapper/phpbb_php_ini_test.php b/tests/wrapper/phpbb_php_ini_test.php
new file mode 100644
index 0000000000..8e08d5c204
--- /dev/null
+++ b/tests/wrapper/phpbb_php_ini_test.php
@@ -0,0 +1,86 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2011 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+require_once dirname(__FILE__) . '/phpbb_php_ini_fake.php';
+require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php';
+
+class phpbb_wrapper_phpbb_php_ini_test extends phpbb_test_case
+{
+ protected $php_ini;
+
+ public function setUp()
+ {
+ $this->php_ini = new phpbb_php_ini_fake;
+ }
+
+ public function test_get_string()
+ {
+ $this->assertSame(false, $this->php_ini->get_string(false));
+ $this->assertSame('phpbb', $this->php_ini->get_string(' phpbb '));
+ }
+
+ public function test_get_bool()
+ {
+ $this->assertSame(true, $this->php_ini->get_bool('ON'));
+ $this->assertSame(true, $this->php_ini->get_bool('on'));
+ $this->assertSame(true, $this->php_ini->get_bool('1'));
+
+ $this->assertSame(false, $this->php_ini->get_bool('OFF'));
+ $this->assertSame(false, $this->php_ini->get_bool('off'));
+ $this->assertSame(false, $this->php_ini->get_bool('0'));
+ $this->assertSame(false, $this->php_ini->get_bool(''));
+ }
+
+ public function test_get_int()
+ {
+ $this->assertSame(1234, $this->php_ini->get_int('1234'));
+ $this->assertSame(-12345, $this->php_ini->get_int('-12345'));
+ $this->assertSame(false, $this->php_ini->get_int('phpBB'));
+ }
+
+ public function test_get_float()
+ {
+ $this->assertSame(1234.0, $this->php_ini->get_float('1234'));
+ $this->assertSame(-12345.0, $this->php_ini->get_float('-12345'));
+ $this->assertSame(false, $this->php_ini->get_float('phpBB'));
+ }
+
+ public function test_get_bytes_invalid()
+ {
+ $this->assertSame(false, $this->php_ini->get_bytes(false));
+ $this->assertSame(false, $this->php_ini->get_bytes('phpBB'));
+ $this->assertSame(false, $this->php_ini->get_bytes('k'));
+ $this->assertSame(false, $this->php_ini->get_bytes('-k'));
+ $this->assertSame(false, $this->php_ini->get_bytes('M'));
+ $this->assertSame(false, $this->php_ini->get_bytes('-M'));
+ }
+
+ /**
+ * @dataProvider get_bytes_data
+ */
+ public function test_get_bytes($expected, $value)
+ {
+ $actual = $this->php_ini->get_bytes($value);
+
+ $this->assertTrue(is_float($actual) || is_int($actual));
+ $this->assertEquals($expected, $actual);
+ }
+
+ static public function get_bytes_data()
+ {
+ return array(
+ array(32 * pow(2, 20), '32m'),
+ array(- 32 * pow(2, 20), '-32m'),
+ array(8 * pow(2, 30), '8G'),
+ array(- 8 * pow(2, 30), '-8G'),
+ array(1234, '1234'),
+ array(-12345, '-12345'),
+ );
+ }
+}
diff --git a/travis/phpunit-mysql-travis.xml b/travis/phpunit-mysql-travis.xml
index e99f8d6cee..5fa6c06e46 100644
--- a/travis/phpunit-mysql-travis.xml
+++ b/travis/phpunit-mysql-travis.xml
@@ -32,12 +32,13 @@
</groups>
<php>
- <server name="PHPBB_TEST_DBMS" value="mysqli" />
+ <server name="PHPBB_TEST_DBMS" value="phpbb\db\driver\mysqli" />
<server name="PHPBB_TEST_DBHOST" value="0.0.0.0" />
<server name="PHPBB_TEST_DBPORT" value="3306" />
<server name="PHPBB_TEST_DBNAME" value="phpbb_tests" />
<server name="PHPBB_TEST_DBUSER" value="root" />
<server name="PHPBB_TEST_DBPASSWD" value="" />
+ <server name="PHPBB_TEST_REDIS_HOST" value="localhost" />
<server name="PHPBB_TEST_TABLE_PREFIX" value="phpbb_"/>
<server name="PHPBB_FUNCTIONAL_URL" value="http://localhost/" />
</php>
diff --git a/travis/phpunit-postgres-travis.xml b/travis/phpunit-postgres-travis.xml
index aa829f4d30..88d9e0f46a 100644
--- a/travis/phpunit-postgres-travis.xml
+++ b/travis/phpunit-postgres-travis.xml
@@ -31,12 +31,13 @@
<php>
<!-- "Real" test database -->
<!-- uncomment, otherwise sqlite memory runs -->
- <server name="PHPBB_TEST_DBMS" value="postgres"/>
+ <server name="PHPBB_TEST_DBMS" value="phpbb\db\driver\postgres"/>
<server name="PHPBB_TEST_DBHOST" value="localhost" />
<server name="PHPBB_TEST_DBPORT" value="5432" />
<server name="PHPBB_TEST_DBNAME" value="phpbb_tests" />
<server name="PHPBB_TEST_DBUSER" value="postgres" />
<server name="PHPBB_TEST_DBPASSWD" value="" />
+ <server name="PHPBB_TEST_REDIS_HOST" value="localhost" />
<server name="PHPBB_TEST_TABLE_PREFIX" value="phpbb_"/>
<server name="PHPBB_FUNCTIONAL_URL" value="http://localhost/" />
</php>
diff --git a/travis/setup-php-extensions.sh b/travis/setup-php-extensions.sh
new file mode 100755
index 0000000000..826ee7409a
--- /dev/null
+++ b/travis/setup-php-extensions.sh
@@ -0,0 +1,57 @@
+#!/bin/bash
+#
+# @copyright (c) 2013 phpBB Group
+# @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+#
+set -e
+set -x
+
+function find_php_ini
+{
+ echo $(php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||")
+}
+
+# $1 - PHP extension name
+# $2 - PHP ini file path
+function register_php_extension
+{
+ echo "extension=$1.so" >> "$2"
+}
+
+# $1 - PHP extension name
+# $2 - PHP ini file path
+function install_php_extension
+{
+ echo "Installing $1 PHP extension"
+
+ # See http://www.php.net/manual/en/install.pecl.phpize.php
+ cd "$1"
+ phpize
+ ./configure
+ make
+ make install
+ cd ..
+
+ register_php_extension "$1" "$2"
+}
+
+php_ini_file=$(find_php_ini)
+
+# disable broken opcache on PHP 5.5.7 and 5.5.8
+if [ `php -r "echo (int) version_compare(PHP_VERSION, '5.5.9', '<');"` == "1" ]
+then
+ sed -i '/opcache.so/d' "$php_ini_file"
+fi
+
+# apc
+if [ `php -r "echo (int) version_compare(PHP_VERSION, '5.5.0-dev', '<');"` == "1" ]
+then
+ echo 'Enabling APC PHP extension'
+ register_php_extension 'apc' "$php_ini_file"
+ echo 'apc.enable_cli=1' >> "$php_ini_file"
+fi
+
+# redis
+# Disabled redis for now as it causes travis to fail
+# git clone git://github.com/nicolasff/phpredis.git redis
+# install_php_extension 'redis' "$php_ini_file"